gsequencer-1.4.24/0000755000175000017500000000000013256233676010761 500000000000000gsequencer-1.4.24/gsequencer-mac-os-x.patch0000644000175000017500000001336513246707333015510 00000000000000--- gsequencer/Makefile.am 2017-09-16 06:47:39.562018167 +0200 +++ gsequencer-mac-os-x/Makefile.am 2017-09-15 04:23:13.000000000 +0200 @@ -6,7 +6,11 @@ SUBDIRS = po ACLOCAL_AMFLAGS = -I m4 -AM_CPPFLAGS = -std=gnu99 -include /usr/include/errno.h -I$(top_srcdir) -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"$(DESTDIR)$(datadir)\" -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -DAGS_LIBRARY_SUFFIX=\".so\" -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security +AM_CPPFLAGS = -std=gnu99 -fnested-functions -include /usr/include/errno.h -I$(top_srcdir) -I/opt/gsequencer/usr/include -I/opt/gsequencer/usr/include/dssi -I/opt/gsequencer/usr/include/dssi/alsa -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"$(DESTDIR)$(datadir)\" -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security + +# AM_CPPFLAGS += -DAGS_LIBRARY_SUFFIX=\".so\" + +AM_CPPFLAGS += -DAGS_MAC_BUNDLE=1 -DAGS_LIBRARY_SUFFIX=\".dylib\" # what flags you want to pass to the C compiler & linker CFLAGS = @CFLAGS@ @@ -32,7 +36,7 @@ bin_PROGRAMS = gsequencer midi2xml -libgsequencerdir = $(libdir)/gsequencer +libgsequencerdir = $(libdir) libgsequencer_LTLIBRARIES = libgsequencer.la EXTRA_DIST = config.rpath \ @@ -254,32 +258,32 @@ # library libags libags_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(UUID_CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) $(GIO_CFLAGS) -libags_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags.sym -version-info 0:7:0 -shared -fPIC -Wl,-soname,libags.so -pthread +libags_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags.sym -version-info 0:7:0 -shared -fPIC -Wl,-install_name,libags.dylib -pthread libags_la_LIBADD = -ldl -lm $(UUID_LIBS) $(LIBXML2_LIBS) $(GOBJECT_LIBS) $(GIO_LIBS) # library libags-thread libags_thread_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) -libags_thread_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_thread.sym -version-info 0:7:0 -shared -fPIC -Wl,-soname,libags_thread.so -pthread +libags_thread_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_thread.sym -version-info 0:7:0 -shared -fPIC -Wl,-install_name,libags_thread.dylib -pthread libags_thread_la_LIBADD = libags.la -ldl -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # library libags-server libags_server_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) -libags_server_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_server.sym -version-info 0:7:0 -shared -fPIC -Wl,-soname,libags_server.so -pthread +libags_server_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_server.sym -version-info 0:7:0 -shared -fPIC -Wl,-install_name,libags_server.dylib -pthread libags_server_la_LIBADD = libags_thread.la libags.la -ldl -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # library libags-audio libags_audio_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(CORE_AUDIO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SAMPLERATE_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(PULSE_CFLAGS) -libags_audio_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_audio.sym -version-info 0:7:0 -shared -fPIC -soname,libags_audio.so -pthread +libags_audio_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_audio.sym -version-info 0:7:0 -shared -fPIC -install_name,libags_audio.dylib -pthread libags_audio_la_LIBADD = libags_server.la libags_thread.la libags.la -ldl -lm $(CORE_AUDIO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SAMPLERATE_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(PULSE_LIBS) # library libags-gui libags_gui_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(GOBJECT_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) -libags_gui_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_gui.sym -version-info 0:7:0 -shared -fPIC -Wl,-soname,libags_gui.so -pthread +libags_gui_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_gui.sym -version-info 0:7:0 -shared -fPIC -Wl,-install_name,libags_gui.dylib -pthread libags_gui_la_LIBADD = -ldl -lm $(GOBJECT_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) # library libgsequencer libgsequencer_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(CORE_AUDIO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(JACK_CFLAGS) $(PULSE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) $(GTK_MAC_INTEGRATION_CFLAGS) -libgsequencer_la_LDFLAGS = $(LDFLAGS) -version-info 0:1:0 -shared -fPIC -Wl,-soname,libgsequencer.so -pthread +libgsequencer_la_LDFLAGS = $(LDFLAGS) -version-info 0:1:0 -shared -fPIC -Wl,-install_name,libgsequencer.dylib -pthread libgsequencer_la_LIBADD = libags_audio.la libags_server.la libags_gui.la libags_thread.la libags.la -ldl -lm $(CORE_AUDIO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(JACK_LIBS) $(PULSE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) $(GTK_MAC_INTEGRATION_LIBS) # gsequencer --- gsequencer/ags/audio/ags_recall_dssi.c 2017-09-16 06:49:03.698982317 +0200 +++ gsequencer-mac-os-x/ags/audio/ags_recall_dssi.c 2017-09-15 03:21:12.000000000 +0200 @@ -37,7 +37,7 @@ #include -#include +#include #include #include --- gsequencer/ags/audio/recall/ags_play_dssi_audio.c 2017-09-16 06:49:03.722982591 +0200 +++ gsequencer-mac-os-x/ags/audio/recall/ags_play_dssi_audio.c 2017-09-15 03:31:10.000000000 +0200 @@ -37,7 +37,7 @@ #include -#include +#include #include #include gsequencer-1.4.24/po/0000755000175000017500000000000013256233677011400 500000000000000gsequencer-1.4.24/po/Makefile.in.in0000644000175000017500000004225113256163135013765 00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. # # Origin: gettext-0.19.8 GETTEXT_MACRO_VERSION = 0.19 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SED = @SED@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ # When building gettext-tools, we prefer to use the built programs # rather than installed programs. However, we can't do that when we # are cross compiling. CROSS_COMPILING = @CROSS_COMPILING@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot POFILESDEPS_yes = $(POFILESDEPS_) POFILESDEPS_no = POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) DISTFILESDEPS_ = update-po DISTFILESDEPS_yes = $(DISTFILESDEPS_) DISTFILESDEPS_no = DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: all-@USE_NLS@ all-yes: stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. CHECK_MACRO_VERSION = \ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot @$(CHECK_MACRO_VERSION) test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. # The determination of whether the package xyz is a GNU one is based on the # heuristic whether some file in the top level directory mentions "GNU xyz". # If GNU 'find' is available, we avoid grepping through monster files. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed package_gnu="$(PACKAGE_GNU)"; \ test -n "$$package_gnu" || { \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \ -size -10000000c -exec grep 'GNU @PACKAGE@' \ /dev/null '{}' ';' 2>/dev/null; \ else \ LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ fi; \ } | grep -v 'libtool:' >/dev/null; then \ package_gnu=yes; \ else \ package_gnu=no; \ fi; \ }; \ if test "$$package_gnu" = "yes"; then \ package_prefix='GNU '; \ else \ package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_prefix}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot-header; then \ sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \ rm -f $(DOMAIN).1po; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(POFILESDEPS) @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: # Recreate Makefile by invoking config.status. Explicitly invoke the shell, # because execution permission bits may not work on the current file system. # Use @SHELL@, which is the shell determined by autoconf for the use by its # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && @SHELL@ ./config.status $(subdir)/$@.in po-directories force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gsequencer-1.4.24/po/Rules-quot0000644000175000017500000000423313246707333013317 00000000000000# This file, Rules-quot, can be copied and used freely without restrictions. # Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \ { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ ;; \ *) \ $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ ;; \ esac } 2>/dev/null > $$tmpdir/$$lang.new.po \ ; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header gsequencer-1.4.24/po/POTFILES.in0000644000175000017500000005464113256163135013076 00000000000000./ags/X/ags_audio_preferences.c ./ags/X/ags_audio_preferences_callbacks.c ./ags/X/ags_automation_editor.c ./ags/X/ags_automation_editor_callbacks.c ./ags/X/ags_automation_window.c ./ags/X/ags_automation_window_callbacks.c ./ags/X/ags_bulk_member.c ./ags/X/ags_bulk_member_callbacks.c ./ags/X/ags_connection_editor.c ./ags/X/ags_connection_editor_callbacks.c ./ags/X/ags_context_menu.c ./ags/X/ags_dssi_browser.c ./ags/X/ags_dssi_browser_callbacks.c ./ags/X/ags_effect_bridge.c ./ags/X/ags_effect_bridge_callbacks.c ./ags/X/ags_effect_bulk.c ./ags/X/ags_effect_bulk_callbacks.c ./ags/X/ags_effect_line.c ./ags/X/ags_effect_line_callbacks.c ./ags/X/ags_effect_pad.c ./ags/X/ags_effect_pad_callbacks.c ./ags/X/ags_effect_separator.c ./ags/X/ags_export_soundcard.c ./ags/X/ags_export_soundcard_callbacks.c ./ags/X/ags_export_window.c ./ags/X/ags_export_window_callbacks.c ./ags/X/ags_generic_preferences.c ./ags/X/ags_generic_preferences_callbacks.c ./ags/X/ags_history_browser.c ./ags/X/ags_history_browser_callbacks.c ./ags/X/ags_ladspa_browser.c ./ags/X/ags_ladspa_browser_callbacks.c ./ags/X/ags_line.c ./ags/X/ags_line_callbacks.c ./ags/X/ags_line_editor.c ./ags/X/ags_line_editor_callbacks.c ./ags/X/ags_line_member.c ./ags/X/ags_line_member_callbacks.c ./ags/X/ags_line_member_editor.c ./ags/X/ags_line_member_editor_callbacks.c ./ags/X/ags_link_collection_editor.c ./ags/X/ags_link_collection_editor_callbacks.c ./ags/X/ags_link_editor.c ./ags/X/ags_link_editor_callbacks.c ./ags/X/ags_listing_editor.c ./ags/X/ags_listing_editor_callbacks.c ./ags/X/ags_lv2_browser.c ./ags/X/ags_lv2_browser_callbacks.c ./ags/X/ags_machine.c ./ags/X/ags_machine_callbacks.c ./ags/X/ags_machine_editor.c ./ags/X/ags_machine_editor_callbacks.c ./ags/X/ags_menu_action_callbacks.c ./ags/X/ags_menu_bar.c ./ags/X/ags_midi_dialog.c ./ags/X/ags_midi_dialog_callbacks.c ./ags/X/ags_midi_preferences.c ./ags/X/ags_midi_preferences_callbacks.c ./ags/X/ags_navigation.c ./ags/X/ags_navigation_callbacks.c ./ags/X/ags_notation_editor.c ./ags/X/ags_notation_editor_callbacks.c ./ags/X/ags_output_collection_editor.c ./ags/X/ags_output_collection_editor_callbacks.c ./ags/X/ags_output_editor.c ./ags/X/ags_output_editor_callbacks.c ./ags/X/ags_output_listing_editor.c ./ags/X/ags_output_listing_editor_callbacks.c ./ags/X/ags_pad.c ./ags/X/ags_pad_callbacks.c ./ags/X/ags_pad_editor.c ./ags/X/ags_pad_editor_callbacks.c ./ags/X/ags_performance_preferences.c ./ags/X/ags_performance_preferences_callbacks.c ./ags/X/ags_playback_window.c ./ags/X/ags_playback_window_callbacks.c ./ags/X/ags_plugin_browser.c ./ags/X/ags_plugin_browser_callbacks.c ./ags/X/ags_plugin_preferences.c ./ags/X/ags_plugin_preferences_callbacks.c ./ags/X/ags_preferences.c ./ags/X/ags_preferences_callbacks.c ./ags/X/ags_property_collection_editor.c ./ags/X/ags_property_collection_editor_callbacks.c ./ags/X/ags_property_editor.c ./ags/X/ags_property_editor_callbacks.c ./ags/X/ags_property_listing_editor.c ./ags/X/ags_resize_editor.c ./ags/X/ags_sequencer_editor.c ./ags/X/ags_sequencer_editor_callbacks.c ./ags/X/ags_server_preferences.c ./ags/X/ags_server_preferences_callbacks.c ./ags/X/ags_soundcard_editor.c ./ags/X/ags_soundcard_editor_callbacks.c ./ags/X/ags_ui_provider.c ./ags/X/ags_wave_editor.c ./ags/X/ags_wave_editor_callbacks.c ./ags/X/ags_wave_window.c ./ags/X/ags_wave_window_callbacks.c ./ags/X/ags_window.c ./ags/X/ags_window_callbacks.c ./ags/X/ags_xorg_application_context.c ./ags/X/editor/ags_automation_edit.c ./ags/X/editor/ags_automation_edit_box.c ./ags/X/editor/ags_automation_edit_callbacks.c ./ags/X/editor/ags_automation_toolbar.c ./ags/X/editor/ags_automation_toolbar_callbacks.c ./ags/X/editor/ags_crop_note_dialog.c ./ags/X/editor/ags_crop_note_dialog_callbacks.c ./ags/X/editor/ags_envelope_dialog.c ./ags/X/editor/ags_envelope_dialog_callbacks.c ./ags/X/editor/ags_envelope_editor.c ./ags/X/editor/ags_envelope_editor_callbacks.c ./ags/X/editor/ags_envelope_info.c ./ags/X/editor/ags_envelope_info_callbacks.c ./ags/X/editor/ags_file_selection.c ./ags/X/editor/ags_file_selection_callbacks.c ./ags/X/editor/ags_inline_player.c ./ags/X/editor/ags_inline_player_callbacks.c ./ags/X/editor/ags_machine_radio_button.c ./ags/X/editor/ags_machine_radio_button_callbacks.c ./ags/X/editor/ags_machine_selection.c ./ags/X/editor/ags_machine_selector.c ./ags/X/editor/ags_machine_selector_callbacks.c ./ags/X/editor/ags_move_note_dialog.c ./ags/X/editor/ags_move_note_dialog_callbacks.c ./ags/X/editor/ags_notation_edit.c ./ags/X/editor/ags_notation_edit_callbacks.c ./ags/X/editor/ags_notation_toolbar.c ./ags/X/editor/ags_notation_toolbar_callbacks.c ./ags/X/editor/ags_pattern_envelope.c ./ags/X/editor/ags_pattern_envelope_callbacks.c ./ags/X/editor/ags_position_automation_cursor_dialog.c ./ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c ./ags/X/editor/ags_position_notation_cursor_dialog.c ./ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c ./ags/X/editor/ags_ramp_acceleration_dialog.c ./ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c ./ags/X/editor/ags_scrolled_automation_edit_box.c ./ags/X/editor/ags_scrolled_wave_edit_box.c ./ags/X/editor/ags_select_acceleration_dialog.c ./ags/X/editor/ags_select_acceleration_dialog_callbacks.c ./ags/X/editor/ags_select_note_dialog.c ./ags/X/editor/ags_select_note_dialog_callbacks.c ./ags/X/editor/ags_sf2_chooser.c ./ags/X/editor/ags_sf2_chooser_callbacks.c ./ags/X/editor/ags_vautomation_edit_box.c ./ags/X/editor/ags_vwave_edit_box.c ./ags/X/editor/ags_wave_edit.c ./ags/X/editor/ags_wave_edit_box.c ./ags/X/editor/ags_wave_edit_callbacks.c ./ags/X/editor/ags_wave_toolbar.c ./ags/X/editor/ags_wave_toolbar_callbacks.c ./ags/X/export/ags_machine_collection.c ./ags/X/export/ags_machine_collection_callbacks.c ./ags/X/export/ags_machine_collection_entry.c ./ags/X/export/ags_machine_collection_entry_callbacks.c ./ags/X/export/ags_midi_export_wizard.c ./ags/X/export/ags_midi_export_wizard_callbacks.c ./ags/X/file/ags_gui_file_xml.c ./ags/X/file/ags_simple_file.c ./ags/X/import/ags_midi_import_wizard.c ./ags/X/import/ags_midi_import_wizard_callbacks.c ./ags/X/import/ags_track_collection.c ./ags/X/import/ags_track_collection_callbacks.c ./ags/X/import/ags_track_collection_mapper.c ./ags/X/import/ags_track_collection_mapper_callbacks.c ./ags/X/machine/ags_audiorec.c ./ags/X/machine/ags_audiorec_callbacks.c ./ags/X/machine/ags_cell_pattern.c ./ags/X/machine/ags_cell_pattern_callbacks.c ./ags/X/machine/ags_drum.c ./ags/X/machine/ags_drum_callbacks.c ./ags/X/machine/ags_drum_input_line.c ./ags/X/machine/ags_drum_input_line_callbacks.c ./ags/X/machine/ags_drum_input_pad.c ./ags/X/machine/ags_drum_input_pad_callbacks.c ./ags/X/machine/ags_drum_output_line.c ./ags/X/machine/ags_drum_output_line_callbacks.c ./ags/X/machine/ags_drum_output_pad.c ./ags/X/machine/ags_drum_output_pad_callbacks.c ./ags/X/machine/ags_dssi_bridge.c ./ags/X/machine/ags_dssi_bridge_callbacks.c ./ags/X/machine/ags_ffplayer.c ./ags/X/machine/ags_ffplayer_bridge.c ./ags/X/machine/ags_ffplayer_bridge_callbacks.c ./ags/X/machine/ags_ffplayer_bulk_input.c ./ags/X/machine/ags_ffplayer_bulk_input_callbacks.c ./ags/X/machine/ags_ffplayer_callbacks.c ./ags/X/machine/ags_ffplayer_input_line.c ./ags/X/machine/ags_ffplayer_input_line_callbacks.c ./ags/X/machine/ags_ffplayer_input_pad.c ./ags/X/machine/ags_ffplayer_input_pad_callbacks.c ./ags/X/machine/ags_ladspa_bridge.c ./ags/X/machine/ags_ladspa_bridge_callbacks.c ./ags/X/machine/ags_live_dssi_bridge.c ./ags/X/machine/ags_live_dssi_bridge_callbacks.c ./ags/X/machine/ags_live_lv2_bridge.c ./ags/X/machine/ags_live_lv2_bridge_callbacks.c ./ags/X/machine/ags_lv2_bridge.c ./ags/X/machine/ags_lv2_bridge_callbacks.c ./ags/X/machine/ags_matrix.c ./ags/X/machine/ags_matrix_bridge.c ./ags/X/machine/ags_matrix_bridge_callbacks.c ./ags/X/machine/ags_matrix_bulk_input.c ./ags/X/machine/ags_matrix_bulk_input_callbacks.c ./ags/X/machine/ags_matrix_callbacks.c ./ags/X/machine/ags_mixer.c ./ags/X/machine/ags_mixer_callbacks.c ./ags/X/machine/ags_mixer_input_line.c ./ags/X/machine/ags_mixer_input_pad.c ./ags/X/machine/ags_oscillator.c ./ags/X/machine/ags_oscillator_callbacks.c ./ags/X/machine/ags_panel.c ./ags/X/machine/ags_panel_callbacks.c ./ags/X/machine/ags_panel_input_line.c ./ags/X/machine/ags_panel_input_line_callbacks.c ./ags/X/machine/ags_panel_input_pad.c ./ags/X/machine/ags_pattern_box.c ./ags/X/machine/ags_pattern_box_callbacks.c ./ags/X/machine/ags_syncsynth.c ./ags/X/machine/ags_syncsynth_callbacks.c ./ags/X/machine/ags_synth.c ./ags/X/machine/ags_synth_callbacks.c ./ags/X/machine/ags_synth_input_line.c ./ags/X/machine/ags_synth_input_line_callbacks.c ./ags/X/machine/ags_synth_input_pad.c ./ags/X/task/ags_add_bulk_member.c ./ags/X/task/ags_add_line_member.c ./ags/X/task/ags_add_sequencer_editor_jack.c ./ags/X/task/ags_add_soundcard_editor_sink.c ./ags/X/task/ags_blink_cell_pattern_cursor.c ./ags/X/task/ags_change_indicator.c ./ags/X/task/ags_change_tact.c ./ags/X/task/ags_display_tact.c ./ags/X/task/ags_remove_sequencer_editor_jack.c ./ags/X/task/ags_remove_soundcard_editor_sink.c ./ags/X/task/ags_simple_file_read.c ./ags/X/task/ags_simple_file_write.c ./ags/X/task/ags_toggle_led.c ./ags/X/task/ags_update_bulk_member.c ./ags/X/thread/ags_gui_thread.c ./ags/X/thread/ags_simple_autosave_thread.c ./ags/audio/ags_acceleration.c ./ags/audio/ags_audio.c ./ags/audio/ags_audio_application_context.c ./ags/audio/ags_audio_buffer_util.c ./ags/audio/ags_audio_connection.c ./ags/audio/ags_audio_signal.c ./ags/audio/ags_automation.c ./ags/audio/ags_buffer.c ./ags/audio/ags_channel.c ./ags/audio/ags_channel_iter.c ./ags/audio/ags_devin.c ./ags/audio/ags_devout.c ./ags/audio/ags_fifoout.c ./ags/audio/ags_input.c ./ags/audio/ags_message.c ./ags/audio/ags_midiin.c ./ags/audio/ags_notation.c ./ags/audio/ags_note.c ./ags/audio/ags_output.c ./ags/audio/ags_pattern.c ./ags/audio/ags_playable.c ./ags/audio/ags_playback.c ./ags/audio/ags_playback_domain.c ./ags/audio/ags_port.c ./ags/audio/ags_preset.c ./ags/audio/ags_recall.c ./ags/audio/ags_recall_adaptor_run.c ./ags/audio/ags_recall_audio.c ./ags/audio/ags_recall_audio_run.c ./ags/audio/ags_recall_audio_signal.c ./ags/audio/ags_recall_channel.c ./ags/audio/ags_recall_channel_run.c ./ags/audio/ags_recall_channel_run_dummy.c ./ags/audio/ags_recall_container.c ./ags/audio/ags_recall_dependency.c ./ags/audio/ags_recall_dssi.c ./ags/audio/ags_recall_dssi_run.c ./ags/audio/ags_recall_factory.c ./ags/audio/ags_recall_id.c ./ags/audio/ags_recall_ladspa.c ./ags/audio/ags_recall_ladspa_run.c ./ags/audio/ags_recall_lv2.c ./ags/audio/ags_recall_lv2_run.c ./ags/audio/ags_recall_recycling.c ./ags/audio/ags_recall_recycling_dummy.c ./ags/audio/ags_recycling.c ./ags/audio/ags_recycling_context.c ./ags/audio/ags_sound_provider.c ./ags/audio/ags_synth_generator.c ./ags/audio/ags_synth_util.c ./ags/audio/ags_wave.c ./ags/audio/client/ags_remote_channel.c ./ags/audio/client/ags_remote_input.c ./ags/audio/client/ags_remote_output.c ./ags/audio/core-audio/ags_core_audio_client.c ./ags/audio/core-audio/ags_core_audio_devout.c ./ags/audio/core-audio/ags_core_audio_midiin.c ./ags/audio/core-audio/ags_core_audio_port.c ./ags/audio/core-audio/ags_core_audio_server.c ./ags/audio/file/ags_audio_file.c ./ags/audio/file/ags_audio_file_link.c ./ags/audio/file/ags_audio_file_xml.c ./ags/audio/file/ags_audio_xml_serialization_factory.c ./ags/audio/file/ags_ipatch.c ./ags/audio/file/ags_ipatch_dls2_reader.c ./ags/audio/file/ags_ipatch_sf2_reader.c ./ags/audio/file/ags_sndfile.c ./ags/audio/jack/ags_jack_client.c ./ags/audio/jack/ags_jack_devin.c ./ags/audio/jack/ags_jack_devout.c ./ags/audio/jack/ags_jack_midiin.c ./ags/audio/jack/ags_jack_port.c ./ags/audio/jack/ags_jack_server.c ./ags/audio/midi/ags_midi_buffer_util.c ./ags/audio/midi/ags_midi_builder.c ./ags/audio/midi/ags_midi_file.c ./ags/audio/midi/ags_midi_parser.c ./ags/audio/midi/ags_midi_util.c ./ags/audio/pulse/ags_pulse_client.c ./ags/audio/pulse/ags_pulse_devin.c ./ags/audio/pulse/ags_pulse_devout.c ./ags/audio/pulse/ags_pulse_port.c ./ags/audio/pulse/ags_pulse_server.c ./ags/audio/recall/ags_buffer_audio_signal.c ./ags/audio/recall/ags_buffer_channel.c ./ags/audio/recall/ags_buffer_channel_run.c ./ags/audio/recall/ags_buffer_recycling.c ./ags/audio/recall/ags_capture_sound_audio.c ./ags/audio/recall/ags_capture_sound_audio_run.c ./ags/audio/recall/ags_copy_audio_signal.c ./ags/audio/recall/ags_copy_channel.c ./ags/audio/recall/ags_copy_channel_run.c ./ags/audio/recall/ags_copy_notation_audio.c ./ags/audio/recall/ags_copy_notation_audio_run.c ./ags/audio/recall/ags_copy_pattern_audio.c ./ags/audio/recall/ags_copy_pattern_audio_run.c ./ags/audio/recall/ags_copy_pattern_channel.c ./ags/audio/recall/ags_copy_pattern_channel_run.c ./ags/audio/recall/ags_copy_recycling.c ./ags/audio/recall/ags_count_beats_audio.c ./ags/audio/recall/ags_count_beats_audio_run.c ./ags/audio/recall/ags_delay_audio.c ./ags/audio/recall/ags_delay_audio_run.c ./ags/audio/recall/ags_envelope_audio_signal.c ./ags/audio/recall/ags_envelope_channel.c ./ags/audio/recall/ags_envelope_channel_run.c ./ags/audio/recall/ags_envelope_recycling.c ./ags/audio/recall/ags_feed_audio_signal.c ./ags/audio/recall/ags_feed_channel.c ./ags/audio/recall/ags_feed_channel_run.c ./ags/audio/recall/ags_feed_recycling.c ./ags/audio/recall/ags_loop_channel.c ./ags/audio/recall/ags_loop_channel_run.c ./ags/audio/recall/ags_mute_audio.c ./ags/audio/recall/ags_mute_audio_run.c ./ags/audio/recall/ags_mute_audio_signal.c ./ags/audio/recall/ags_mute_channel.c ./ags/audio/recall/ags_mute_channel_run.c ./ags/audio/recall/ags_mute_recycling.c ./ags/audio/recall/ags_peak_audio_signal.c ./ags/audio/recall/ags_peak_channel.c ./ags/audio/recall/ags_peak_channel_run.c ./ags/audio/recall/ags_peak_recycling.c ./ags/audio/recall/ags_play_audio.c ./ags/audio/recall/ags_play_audio_file.c ./ags/audio/recall/ags_play_audio_signal.c ./ags/audio/recall/ags_play_channel.c ./ags/audio/recall/ags_play_channel_run.c ./ags/audio/recall/ags_play_channel_run_master.c ./ags/audio/recall/ags_play_dssi_audio.c ./ags/audio/recall/ags_play_dssi_audio_run.c ./ags/audio/recall/ags_play_lv2_audio.c ./ags/audio/recall/ags_play_lv2_audio_run.c ./ags/audio/recall/ags_play_notation_audio.c ./ags/audio/recall/ags_play_notation_audio_run.c ./ags/audio/recall/ags_play_note.c ./ags/audio/recall/ags_play_recycling.c ./ags/audio/recall/ags_prepare_audio_signal.c ./ags/audio/recall/ags_prepare_channel.c ./ags/audio/recall/ags_prepare_channel_run.c ./ags/audio/recall/ags_prepare_recycling.c ./ags/audio/recall/ags_record_midi_audio.c ./ags/audio/recall/ags_record_midi_audio_run.c ./ags/audio/recall/ags_route_dssi_audio.c ./ags/audio/recall/ags_route_dssi_audio_run.c ./ags/audio/recall/ags_route_lv2_audio.c ./ags/audio/recall/ags_route_lv2_audio_run.c ./ags/audio/recall/ags_rt_stream_audio_signal.c ./ags/audio/recall/ags_rt_stream_channel.c ./ags/audio/recall/ags_rt_stream_channel_run.c ./ags/audio/recall/ags_rt_stream_recycling.c ./ags/audio/recall/ags_stream_audio_signal.c ./ags/audio/recall/ags_stream_channel.c ./ags/audio/recall/ags_stream_channel_run.c ./ags/audio/recall/ags_stream_recycling.c ./ags/audio/recall/ags_volume_audio_signal.c ./ags/audio/recall/ags_volume_channel.c ./ags/audio/recall/ags_volume_channel_run.c ./ags/audio/recall/ags_volume_recycling.c ./ags/audio/task/ags_add_audio.c ./ags/audio/task/ags_add_audio_signal.c ./ags/audio/task/ags_add_effect.c ./ags/audio/task/ags_add_note.c ./ags/audio/task/ags_add_point_to_selection.c ./ags/audio/task/ags_add_recall.c ./ags/audio/task/ags_add_recall_container.c ./ags/audio/task/ags_add_region_to_selection.c ./ags/audio/task/ags_add_soundcard.c ./ags/audio/task/ags_append_audio.c ./ags/audio/task/ags_append_audio_threaded.c ./ags/audio/task/ags_append_channel.c ./ags/audio/task/ags_append_recall.c ./ags/audio/task/ags_apply_presets.c ./ags/audio/task/ags_apply_synth.c ./ags/audio/task/ags_cancel_audio.c ./ags/audio/task/ags_cancel_channel.c ./ags/audio/task/ags_cancel_recall.c ./ags/audio/task/ags_change_soundcard.c ./ags/audio/task/ags_clear_audio_signal.c ./ags/audio/task/ags_clear_buffer.c ./ags/audio/task/ags_crop_note.c ./ags/audio/task/ags_export_output.c ./ags/audio/task/ags_free_selection.c ./ags/audio/task/ags_init_audio.c ./ags/audio/task/ags_init_channel.c ./ags/audio/task/ags_link_channel.c ./ags/audio/task/ags_move_note.c ./ags/audio/task/ags_notify_soundcard.c ./ags/audio/task/ags_open_file.c ./ags/audio/task/ags_open_sf2_sample.c ./ags/audio/task/ags_open_single_file.c ./ags/audio/task/ags_remove_audio.c ./ags/audio/task/ags_remove_audio_signal.c ./ags/audio/task/ags_remove_note.c ./ags/audio/task/ags_remove_point_from_selection.c ./ags/audio/task/ags_remove_recall.c ./ags/audio/task/ags_remove_recall_container.c ./ags/audio/task/ags_remove_region_from_selection.c ./ags/audio/task/ags_remove_soundcard.c ./ags/audio/task/ags_reset_audio_connection.c ./ags/audio/task/ags_resize_audio.c ./ags/audio/task/ags_save_file.c ./ags/audio/task/ags_seek_soundcard.c ./ags/audio/task/ags_set_audio_channels.c ./ags/audio/task/ags_set_buffer_size.c ./ags/audio/task/ags_set_format.c ./ags/audio/task/ags_set_input_device.c ./ags/audio/task/ags_set_output_device.c ./ags/audio/task/ags_set_samplerate.c ./ags/audio/task/ags_start_sequencer.c ./ags/audio/task/ags_start_soundcard.c ./ags/audio/task/ags_switch_buffer_flag.c ./ags/audio/task/ags_tic_device.c ./ags/audio/task/ags_toggle_pattern_bit.c ./ags/audio/task/ags_unref_audio_signal.c ./ags/audio/task/recall/ags_apply_bpm.c ./ags/audio/task/recall/ags_apply_sequencer_length.c ./ags/audio/task/recall/ags_apply_tact.c ./ags/audio/task/recall/ags_reset_peak.c ./ags/audio/task/recall/ags_set_muted.c ./ags/audio/thread/ags_audio_loop.c ./ags/audio/thread/ags_audio_thread.c ./ags/audio/thread/ags_channel_thread.c ./ags/audio/thread/ags_export_thread.c ./ags/audio/thread/ags_iterator_thread.c ./ags/audio/thread/ags_record_thread.c ./ags/audio/thread/ags_recycling_thread.c ./ags/audio/thread/ags_recycling_thread_callbacks.c ./ags/audio/thread/ags_sequencer_thread.c ./ags/audio/thread/ags_soundcard_thread.c ./ags/file/ags_file.c ./ags/file/ags_file_id_ref.c ./ags/file/ags_file_launch.c ./ags/file/ags_file_link.c ./ags/file/ags_file_lookup.c ./ags/file/ags_file_util.c ./ags/file/ags_xml_serialization_factory.c ./ags/lib/ags_buffer_util.c ./ags/lib/ags_complex.c ./ags/lib/ags_conversion.c ./ags/lib/ags_endian.c ./ags/lib/ags_function.c ./ags/lib/ags_log.c ./ags/lib/ags_parameter.c ./ags/lib/ags_regex.c ./ags/lib/ags_string_util.c ./ags/lib/ags_time.c ./ags/lib/ags_turtle.c ./ags/lib/ags_turtle_manager.c ./ags/object/ags_applicable.c ./ags/object/ags_application_context.c ./ags/object/ags_async_queue.c ./ags/object/ags_concurrent_tree.c ./ags/object/ags_config.c ./ags/object/ags_connectable.c ./ags/object/ags_connection.c ./ags/object/ags_connection_manager.c ./ags/object/ags_countable.c ./ags/object/ags_distributed_manager.c ./ags/object/ags_dynamic_connectable.c ./ags/object/ags_main_loop.c ./ags/object/ags_marshal.c ./ags/object/ags_mutable.c ./ags/object/ags_packable.c ./ags/object/ags_plugin.c ./ags/object/ags_portlet.c ./ags/object/ags_seekable.c ./ags/object/ags_sequencer.c ./ags/object/ags_soundcard.c ./ags/object/ags_tactable.c ./ags/object/ags_tree_iterator.c ./ags/plugin/ags_base_plugin.c ./ags/plugin/ags_dssi_manager.c ./ags/plugin/ags_dssi_plugin.c ./ags/plugin/ags_ladspa_conversion.c ./ags/plugin/ags_ladspa_manager.c ./ags/plugin/ags_ladspa_plugin.c ./ags/plugin/ags_lv2_conversion.c ./ags/plugin/ags_lv2_event_manager.c ./ags/plugin/ags_lv2_log_manager.c ./ags/plugin/ags_lv2_manager.c ./ags/plugin/ags_lv2_option_manager.c ./ags/plugin/ags_lv2_plugin.c ./ags/plugin/ags_lv2_preset.c ./ags/plugin/ags_lv2_uri_map_manager.c ./ags/plugin/ags_lv2_urid_manager.c ./ags/plugin/ags_lv2_worker.c ./ags/plugin/ags_lv2_worker_manager.c ./ags/plugin/ags_lv2ui_manager.c ./ags/plugin/ags_lv2ui_plugin.c ./ags/plugin/ags_plugin_factory.c ./ags/server/ags_registry.c ./ags/server/ags_server.c ./ags/server/ags_server_application_context.c ./ags/server/ags_server_status.c ./ags/server/ags_service_provider.c ./ags/server/controller/ags_controller.c ./ags/server/controller/ags_front_controller.c ./ags/server/controller/ags_local_factory_controller.c ./ags/server/controller/ags_local_registry_controller.c ./ags/server/controller/ags_local_serialization_controller.c ./ags/server/controller/ags_local_task_controller.c ./ags/server/security/ags_authentication.c ./ags/server/security/ags_authentication_manager.c ./ags/server/security/ags_business_group.c ./ags/server/security/ags_certificate.c ./ags/server/security/ags_certificate_manager.c ./ags/server/security/ags_password_store.c ./ags/server/security/ags_password_store_manager.c ./ags/server/security/ags_security_context.c ./ags/server/security/ags_xml_authentication.c ./ags/server/security/ags_xml_certificate.c ./ags/server/security/ags_xml_password_store.c ./ags/server/thread/ags_remote_task.c ./ags/server/thread/ags_remote_task_thread.c ./ags/thread/ags_autosave_thread.c ./ags/thread/ags_concurrency_provider.c ./ags/thread/ags_condition_manager.c ./ags/thread/ags_destroy_worker.c ./ags/thread/ags_generic_main_loop.c ./ags/thread/ags_history.c ./ags/thread/ags_message_delivery.c ./ags/thread/ags_message_queue.c ./ags/thread/ags_mutex_manager.c ./ags/thread/ags_poll_fd.c ./ags/thread/ags_polling_thread.c ./ags/thread/ags_returnable_thread.c ./ags/thread/ags_single_thread.c ./ags/thread/ags_task.c ./ags/thread/ags_task_completion.c ./ags/thread/ags_task_thread.c ./ags/thread/ags_thread-posix.c ./ags/thread/ags_thread_application_context.c ./ags/thread/ags_thread_pool.c ./ags/thread/ags_timestamp.c ./ags/thread/ags_timestamp_factory.c ./ags/thread/ags_timestamp_thread.c ./ags/thread/ags_worker_thread.c ./ags/thread/file/ags_thread_file_xml.c ./ags/thread/file/ags_thread_xml_serialization_factory.c ./ags/util/ags_destroy_util.c ./ags/util/ags_id_generator.c ./ags/util/ags_list_util.c ./ags/widget/ags_cartesian.c ./ags/widget/ags_container.c ./ags/widget/ags_dial.c ./ags/widget/ags_expander.c ./ags/widget/ags_expander_set.c ./ags/widget/ags_hindicator.c ./ags/widget/ags_hled_array.c ./ags/widget/ags_hlevel_box.c ./ags/widget/ags_hscale_box.c ./ags/widget/ags_htimebar.c ./ags/widget/ags_indicator.c ./ags/widget/ags_led.c ./ags/widget/ags_led_array.c ./ags/widget/ags_level.c ./ags/widget/ags_level_box.c ./ags/widget/ags_notebook.c ./ags/widget/ags_piano.c ./ags/widget/ags_ruler.c ./ags/widget/ags_scale.c ./ags/widget/ags_scale_box.c ./ags/widget/ags_scrolled_level_box.c ./ags/widget/ags_scrolled_piano.c ./ags/widget/ags_scrolled_scale_box.c ./ags/widget/ags_table.c ./ags/widget/ags_timebar.c ./ags/widget/ags_vindicator.c ./ags/widget/ags_vled_array.c ./ags/widget/ags_vlevel_box.c ./ags/widget/ags_vscale_box.c ./ags/widget/ags_waveform.c ./ags/widget/ags_widget_marshal.c gsequencer-1.4.24/po/Makevars0000644000175000017500000000654613246707333013021 00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=i18n --keyword=i18nM --keyword=i18nP:1,2 # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Joël Krähemann # This tells whether or not to prepend "GNU " prefix to the package # name that gets inserted into the header of the $(DOMAIN).pot file. # Possible values are "yes", "no", or empty. If it is empty, try to # detect it automatically by scanning the files in $(top_srcdir) for # "GNU packagename" string. PACKAGE_GNU = # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = jkraehemann-guest@users.alioth.debian.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' # context. Possible values are "yes" and "no". Set this to yes if the # package uses functions taking also a message context, like pgettext(), or # if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. USE_MSGCTXT = no # These options get passed to msgmerge. # Useful options are in particular: # --previous to keep previous msgids of translated messages, # --quiet to reduce the verbosity. MSGMERGE_OPTIONS = # These options get passed to msginit. # If you want to disable line wrapping when writing PO files, add # --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and # MSGINIT_OPTIONS. MSGINIT_OPTIONS = # This tells whether or not to regenerate a PO file when $(DOMAIN).pot # has changed. Possible values are "yes" and "no". Set this to no if # the POT file is checked in the repository and the version control # program ignores timestamps. PO_DEPENDS_ON_POT = yes # This tells whether or not to forcibly update $(DOMAIN).pot and # regenerate PO files on "make dist". Possible values are "yes" and # "no". Set this to no if the POT file and PO files are maintained # externally. DIST_DEPENDS_ON_UPDATE_PO = yes gsequencer-1.4.24/po/stamp-po0000644000175000017500000000001213256226667012775 00000000000000timestamp gsequencer-1.4.24/po/ChangeLog0000644000175000017500000000075613246707333013074 000000000000002017-06-08 gettextize * Makefile.in.in: New file, from gettext-0.19.8.1. * Rules-quot: New file, from gettext-0.19.8.1. * boldquot.sed: New file, from gettext-0.19.8.1. * en@boldquot.header: New file, from gettext-0.19.8.1. * en@quot.header: New file, from gettext-0.19.8.1. * insert-header.sin: New file, from gettext-0.19.8.1. * quot.sed: New file, from gettext-0.19.8.1. * remove-potcdate.sin: New file, from gettext-0.19.8.1. * POTFILES.in: New file. gsequencer-1.4.24/po/quot.sed0000644000175000017500000000023113246707333012773 00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g gsequencer-1.4.24/po/en@quot.header0000644000175000017500000000226313246707333014102 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # gsequencer-1.4.24/po/insert-header.sin0000644000175000017500000000124013246707333014554 00000000000000# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } gsequencer-1.4.24/po/remove-potcdate.sin0000644000175000017500000000066013246707333015125 00000000000000# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } gsequencer-1.4.24/po/gsequencer.pot0000644000175000017500000005171213256226667014214 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Joël Krähemann # This file is distributed under the same license as the gsequencer package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gsequencer 1.4.24\n" "Report-Msgid-Bugs-To: jkraehemann-guest@users.alioth.debian.org\n" "POT-Creation-Date: 2018-03-26 19:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ags/X/ags_audio_preferences.c:188 msgid "JACK driver" msgstr "" #: ags/X/ags_audio_preferences.c:204 msgid "JACK server" msgstr "" #: ags/X/ags_audio_preferences.c:220 msgid "start" msgstr "" #: ags/X/ags_audio_preferences.c:226 msgid "stop" msgstr "" #: ags/X/ags_audio_preferences_callbacks.c:52 msgid "connect sink" msgstr "" #: ags/X/ags_automation_editor.c:239 msgid "automation" msgstr "" #: ags/X/ags_automation_editor.c:271 ags/X/ags_preferences.c:176 msgid "audio" msgstr "" #: ags/X/ags_automation_editor.c:342 ags/X/ags_connection_editor.c:217 #: ags/X/ags_machine_editor.c:217 msgid "output" msgstr "" #: ags/X/ags_automation_editor.c:367 ags/X/ags_automation_editor.c:451 #: ags/X/ags_wave_editor.c:286 msgid "line" msgstr "" #: ags/X/ags_automation_editor.c:426 ags/X/ags_machine_editor.c:224 msgid "input" msgstr "" #: ags/X/ags_bulk_member.c:532 ags/X/machine/ags_dssi_bridge.c:390 #: ags/X/machine/ags_live_dssi_bridge.c:393 msgid "Plugin file not present" msgstr "" #: ags/X/ags_connection_editor.c:199 msgid "connections" msgstr "" #: ags/X/ags_connection_editor.c:224 msgid "connect output" msgstr "" #: ags/X/ags_context_menu.c:151 ags/X/ags_export_window.c:342 #: ags/X/ags_menu_bar.c:143 msgid "export" msgstr "" #: ags/X/ags_context_menu.c:179 ags/X/ags_menu_bar.c:171 msgid "Panel" msgstr "" #: ags/X/ags_context_menu.c:182 ags/X/ags_menu_bar.c:174 msgid "Mixer" msgstr "" #: ags/X/ags_context_menu.c:185 ags/X/ags_menu_bar.c:177 msgid "Drum" msgstr "" #: ags/X/ags_context_menu.c:188 ags/X/ags_menu_bar.c:180 msgid "Matrix" msgstr "" #: ags/X/ags_context_menu.c:191 ags/X/ags_menu_bar.c:183 msgid "Synth" msgstr "" #: ags/X/ags_context_menu.c:194 ags/X/ags_menu_bar.c:186 msgid "Syncsynth" msgstr "" #: ags/X/ags_context_menu.c:198 ags/X/ags_menu_bar.c:190 msgid "FPlayer" msgstr "" #: ags/X/ags_context_menu.c:203 ags/X/ags_menu_bar.c:201 msgid "LADSPA" msgstr "" #: ags/X/ags_context_menu.c:207 ags/X/ags_context_menu.c:222 #: ags/X/ags_menu_bar.c:205 ags/X/ags_menu_bar.c:220 msgid "DSSI" msgstr "" #: ags/X/ags_context_menu.c:211 ags/X/ags_context_menu.c:226 #: ags/X/ags_menu_bar.c:209 ags/X/ags_menu_bar.c:224 msgid "Lv2" msgstr "" #: ags/X/ags_context_menu.c:231 ags/X/ags_menu_bar.c:228 msgid "Automation" msgstr "" #: ags/X/ags_dssi_browser.c:160 ags/X/ags_ladspa_browser.c:155 #: ags/X/ags_lv2_browser.c:156 msgid "filename: " msgstr "" #: ags/X/ags_dssi_browser.c:188 ags/X/ags_ladspa_browser.c:184 #: ags/X/ags_lv2_browser.c:185 msgid "effect: " msgstr "" #: ags/X/ags_dssi_browser.c:209 ags/X/ags_ladspa_browser.c:206 msgid "Label: " msgstr "" #: ags/X/ags_dssi_browser.c:218 ags/X/ags_ladspa_browser.c:215 msgid "Maker: " msgstr "" #: ags/X/ags_dssi_browser.c:227 ags/X/ags_ladspa_browser.c:224 msgid "Copyright: " msgstr "" #: ags/X/ags_dssi_browser.c:236 ags/X/ags_ladspa_browser.c:233 msgid "Ports: " msgstr "" #: ags/X/ags_dssi_browser_callbacks.c:137 #: ags/X/ags_dssi_browser_callbacks.c:227 #: ags/X/ags_ladspa_browser_callbacks.c:128 #: ags/X/ags_ladspa_browser_callbacks.c:239 msgid "Label" msgstr "" #: ags/X/ags_dssi_browser_callbacks.c:148 #: ags/X/ags_dssi_browser_callbacks.c:236 #: ags/X/ags_ladspa_browser_callbacks.c:139 #: ags/X/ags_ladspa_browser_callbacks.c:248 msgid "Maker" msgstr "" #: ags/X/ags_dssi_browser_callbacks.c:159 #: ags/X/ags_dssi_browser_callbacks.c:245 #: ags/X/ags_ladspa_browser_callbacks.c:150 #: ags/X/ags_ladspa_browser_callbacks.c:257 msgid "Copyright" msgstr "" #: ags/X/ags_dssi_browser_callbacks.c:174 #: ags/X/ags_dssi_browser_callbacks.c:254 #: ags/X/ags_ladspa_browser_callbacks.c:165 #: ags/X/ags_ladspa_browser_callbacks.c:266 ags/X/ags_lv2_browser.c:245 #: ags/X/ags_lv2_browser_callbacks.c:140 ags/X/ags_lv2_browser_callbacks.c:246 msgid "Ports" msgstr "" #: ags/X/ags_effect_line.c:337 ags/X/ags_line.c:433 msgid "group" msgstr "" #: ags/X/ags_export_soundcard.c:163 ags/X/ags_sequencer_editor.c:160 #: ags/X/ags_soundcard_editor.c:153 msgid "backend" msgstr "" #: ags/X/ags_export_soundcard.c:211 ags/X/ags_output_collection_editor.c:240 #: ags/X/ags_soundcard_editor.c:201 msgid "soundcard" msgstr "" #: ags/X/ags_export_soundcard.c:231 msgid "file" msgstr "" #: ags/X/ags_export_soundcard.c:259 msgid "open" msgstr "" #: ags/X/ags_export_soundcard.c:266 msgid "output format" msgstr "" #: ags/X/ags_export_window.c:184 msgid "export to audio data" msgstr "" #: ags/X/ags_export_window.c:208 msgid "live export" msgstr "" #: ags/X/ags_export_window.c:220 ags/X/ags_navigation.c:298 msgid "exclude sequencers" msgstr "" #: ags/X/ags_export_window.c:236 msgid "mode" msgstr "" #: ags/X/ags_export_window.c:263 msgid "tact" msgstr "" #: ags/X/ags_export_window.c:285 msgid "time" msgstr "" #: ags/X/ags_generic_preferences.c:137 msgid "autosave thread" msgstr "" #: ags/X/ags_generic_preferences.c:151 msgid "segmentation" msgstr "" #: ags/X/ags_generic_preferences.c:175 msgid "engine mode" msgstr "" #: ags/X/ags_generic_preferences.c:193 msgid "rt-safe" msgstr "" #: ags/X/ags_line.c:721 ags/X/ags_line.c:729 ags/X/ags_notation_editor.c:277 msgid "channel" msgstr "" #: ags/X/ags_link_collection_editor.c:201 msgid "link" msgstr "" #: ags/X/ags_link_collection_editor.c:248 #: ags/X/ags_output_collection_editor.c:192 msgid "first line" msgstr "" #: ags/X/ags_link_collection_editor.c:275 msgid "first link line" msgstr "" #: ags/X/ags_link_collection_editor.c:301 #: ags/X/ags_output_collection_editor.c:216 msgid "count" msgstr "" #: ags/X/ags_link_editor_callbacks.c:170 msgid "select audio file" msgstr "" #: ags/X/ags_link_editor_callbacks.c:185 msgid "audio channel: " msgstr "" #: ags/X/ags_lv2_browser.c:206 ags/X/ags_lv2_browser_callbacks.c:109 #: ags/X/ags_lv2_browser_callbacks.c:219 msgid "Name" msgstr "" #: ags/X/ags_lv2_browser.c:219 ags/X/ags_lv2_browser_callbacks.c:119 #: ags/X/ags_lv2_browser_callbacks.c:228 msgid "Homepage" msgstr "" #: ags/X/ags_lv2_browser.c:232 ags/X/ags_lv2_browser_callbacks.c:129 #: ags/X/ags_lv2_browser_callbacks.c:237 msgid "M-Box" msgstr "" #: ags/X/ags_machine.c:2021 ags/X/machine/ags_audiorec_callbacks.c:37 msgid "Open audio files" msgstr "" #: ags/X/ags_machine.c:2029 msgid "open in new channel" msgstr "" #: ags/X/ags_machine.c:2034 msgid "overwrite existing links" msgstr "" #: ags/X/ags_machine.c:2421 ags/X/editor/ags_pattern_envelope.c:657 msgid "move up" msgstr "" #: ags/X/ags_machine.c:2424 ags/X/editor/ags_pattern_envelope.c:664 msgid "move down" msgstr "" #: ags/X/ags_machine.c:2427 msgid "hide" msgstr "" #: ags/X/ags_machine.c:2430 msgid "show" msgstr "" #: ags/X/ags_machine.c:2433 msgid "destroy" msgstr "" #: ags/X/ags_machine.c:2436 ags/X/ags_machine_callbacks.c:222 msgid "rename" msgstr "" #: ags/X/ags_machine.c:2439 ags/X/ags_machine_editor.c:196 msgid "properties" msgstr "" #: ags/X/ags_machine.c:2442 msgid "sticky controls" msgstr "" #: ags/X/ags_machine.c:2500 ags/X/editor/ags_pattern_envelope.c:226 #: ags/X/machine/ags_drum_input_pad.c:187 msgid "edit" msgstr "" #: ags/X/ags_machine.c:2511 msgid "copy pattern" msgstr "" #: ags/X/ags_machine.c:2521 msgid "paste pattern" msgstr "" #: ags/X/ags_machine.c:2531 msgid "envelope" msgstr "" #: ags/X/ags_machine.c:2560 msgid "connection" msgstr "" #: ags/X/ags_machine.c:2571 msgid "audio connection" msgstr "" #: ags/X/ags_machine.c:2581 msgid "MIDI dialog" msgstr "" #: ags/X/ags_machine_editor.c:232 msgid "link output" msgstr "" #: ags/X/ags_machine_editor.c:239 msgid "link input" msgstr "" #: ags/X/ags_machine_editor.c:245 msgid "resize channels" msgstr "" #: ags/X/ags_menu_bar.c:195 msgid "Audiorec" msgstr "" #: ags/X/ags_menu_bar.c:235 msgid "Wave" msgstr "" #: ags/X/ags_midi_dialog.c:208 msgid "midi channel" msgstr "" #: ags/X/ags_midi_dialog.c:251 msgid "audio start mapping" msgstr "" #: ags/X/ags_midi_dialog.c:273 msgid "audio end mapping" msgstr "" #: ags/X/ags_midi_dialog.c:295 msgid "midi start mapping" msgstr "" #: ags/X/ags_midi_dialog.c:317 msgid "midi end mapping" msgstr "" #: ags/X/ags_midi_dialog.c:353 msgid "midi device" msgstr "" #: ags/X/ags_navigation.c:203 msgid "bpm" msgstr "" #: ags/X/ags_navigation.c:243 ags/X/machine/ags_drum.c:292 msgid "loop" msgstr "" #: ags/X/ags_navigation.c:276 msgid "loop L" msgstr "" #: ags/X/ags_navigation.c:282 msgid "loop R" msgstr "" #: ags/X/ags_notation_editor.c:245 msgid "notation" msgstr "" #: ags/X/ags_output_collection_editor.c:262 #: ags/X/editor/ags_envelope_info.c:231 msgid "audio channel" msgstr "" #: ags/X/ags_pad_editor.c:438 msgid "pad" msgstr "" #: ags/X/ags_performance_preferences.c:145 msgid "Auto-sense on stream" msgstr "" #: ags/X/ags_performance_preferences.c:152 msgid "Super threaded - audio" msgstr "" #: ags/X/ags_performance_preferences.c:159 msgid "Super threaded - channel" msgstr "" #: ags/X/ags_performance_preferences.c:173 msgid "thread pool - max unused threads" msgstr "" #: ags/X/ags_performance_preferences.c:195 msgid "max precision of threads [Hz]" msgstr "" #: ags/X/ags_plugin_browser.c:154 msgid "Plugin type:" msgstr "" #: ags/X/ags_preferences.c:157 msgid "preferences" msgstr "" #: ags/X/ags_preferences.c:171 msgid "generic" msgstr "" #: ags/X/ags_preferences.c:181 msgid "midi" msgstr "" #: ags/X/ags_preferences.c:186 msgid "performance" msgstr "" #: ags/X/ags_preferences.c:201 msgid "server" msgstr "" #: ags/X/ags_property_editor.c:102 ags/X/editor/ags_envelope_editor.c:166 #: ags/X/export/ags_machine_collection_entry.c:173 #: ags/X/import/ags_track_collection_mapper.c:222 msgid "enabled" msgstr "" #: ags/X/ags_resize_editor.c:152 ags/X/ags_soundcard_editor.c:247 msgid "audio channels" msgstr "" #: ags/X/ags_resize_editor.c:179 msgid "outputs" msgstr "" #: ags/X/ags_resize_editor.c:206 msgid "inputs" msgstr "" #: ags/X/ags_sequencer_editor.c:203 msgid "MIDI card" msgstr "" #: ags/X/ags_server_preferences.c:152 msgid "start server" msgstr "" #: ags/X/ags_server_preferences.c:164 msgid "address" msgstr "" #: ags/X/ags_server_preferences.c:186 ags/X/editor/ags_automation_toolbar.c:231 msgid "port" msgstr "" #: ags/X/ags_server_preferences.c:208 msgid "username" msgstr "" #: ags/X/ags_server_preferences.c:230 msgid "password" msgstr "" #: ags/X/ags_soundcard_editor.c:269 msgid "samplerate" msgstr "" #: ags/X/ags_soundcard_editor.c:290 msgid "buffer size" msgstr "" #: ags/X/ags_soundcard_editor.c:311 msgid "format" msgstr "" #: ags/X/ags_wave_editor.c:237 ags/X/machine/ags_oscillator.c:155 msgid "wave" msgstr "" #: ags/X/ags_xorg_application_context.c:1374 #, c-format msgid "unknown soundcard backend - %s" msgstr "" #: ags/X/ags_xorg_application_context.c:1384 msgid "unknown soundcard backend - NULL" msgstr "" #: ags/X/ags_xorg_application_context.c:1540 #, c-format msgid "unknown sequencer backend - %s" msgstr "" #: ags/X/ags_xorg_application_context.c:1550 msgid "unknown sequencer backend - NULL" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:119 #: ags/X/editor/ags_notation_toolbar.c:115 msgid "Position" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:145 #: ags/X/editor/ags_notation_toolbar.c:136 msgid "Select" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:158 msgid "copy automation" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:166 msgid "cut automation" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:200 #: ags/X/editor/ags_notation_toolbar.c:196 ags/X/editor/ags_wave_toolbar.c:161 msgid "tool" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:203 #: ags/X/editor/ags_notation_toolbar.c:199 ags/X/editor/ags_wave_toolbar.c:164 msgid "additional tools" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:218 #: ags/X/editor/ags_notation_toolbar.c:213 ags/X/editor/ags_wave_toolbar.c:178 msgid "zoom" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:908 #: ags/X/editor/ags_select_acceleration_dialog.c:201 msgid "select accelerations" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:911 #: ags/X/editor/ags_ramp_acceleration_dialog.c:203 msgid "ramp accelerations" msgstr "" #: ags/X/editor/ags_automation_toolbar.c:914 #: ags/X/editor/ags_notation_toolbar.c:118 #: ags/X/editor/ags_notation_toolbar.c:429 ags/X/editor/ags_wave_toolbar.c:241 msgid "position cursor" msgstr "" #: ags/X/editor/ags_crop_note_dialog.c:202 #: ags/X/editor/ags_notation_toolbar.c:423 msgid "crop notes" msgstr "" #: ags/X/editor/ags_crop_note_dialog.c:212 #: ags/X/editor/ags_move_note_dialog.c:221 msgid "absolute" msgstr "" #: ags/X/editor/ags_crop_note_dialog.c:220 msgid "in-place" msgstr "" #: ags/X/editor/ags_crop_note_dialog.c:228 msgid "do resize" msgstr "" #: ags/X/editor/ags_crop_note_dialog.c:242 msgid "crop note" msgstr "" #: ags/X/editor/ags_crop_note_dialog.c:267 msgid "padding note" msgstr "" #: ags/X/editor/ags_envelope_dialog.c:177 msgid "Envelope" msgstr "" #: ags/X/editor/ags_envelope_dialog.c:198 msgid "editor" msgstr "" #: ags/X/editor/ags_envelope_dialog.c:209 msgid "info" msgstr "" #: ags/X/editor/ags_envelope_dialog.c:451 ags/X/machine/ags_drum.c:286 msgid "pattern" msgstr "" #: ags/X/editor/ags_envelope_editor.c:176 #: ags/X/editor/ags_pattern_envelope.c:240 ags/X/machine/ags_ffplayer.c:269 #: ags/X/machine/ags_live_lv2_bridge.c:1626 ags/X/machine/ags_lv2_bridge.c:2003 msgid "preset" msgstr "" #: ags/X/editor/ags_envelope_editor.c:291 #: ags/X/editor/ags_pattern_envelope.c:454 ags/X/machine/ags_oscillator.c:205 msgid "attack" msgstr "" #: ags/X/editor/ags_envelope_editor.c:333 #: ags/X/editor/ags_pattern_envelope.c:496 msgid "decay" msgstr "" #: ags/X/editor/ags_envelope_editor.c:375 #: ags/X/editor/ags_pattern_envelope.c:538 msgid "sustain" msgstr "" #: ags/X/editor/ags_envelope_editor.c:417 #: ags/X/editor/ags_pattern_envelope.c:580 msgid "release" msgstr "" #: ags/X/editor/ags_envelope_editor.c:459 #: ags/X/editor/ags_pattern_envelope.c:622 msgid "ratio" msgstr "" #: ags/X/editor/ags_envelope_editor_callbacks.c:100 #: ags/X/editor/ags_pattern_envelope_callbacks.c:1195 msgid "preset name" msgstr "" #: ags/X/editor/ags_envelope_info.c:224 ags/X/editor/ags_pattern_envelope.c:233 msgid "plot" msgstr "" #: ags/X/editor/ags_envelope_info.c:238 msgid "Note:x0" msgstr "" #: ags/X/editor/ags_envelope_info.c:245 msgid "Note:x1" msgstr "" #: ags/X/editor/ags_envelope_info.c:252 msgid "Note:y" msgstr "" #: ags/X/editor/ags_machine_selection.c:123 msgid "select machines" msgstr "" #: ags/X/editor/ags_machine_selector.c:405 msgid "add index" msgstr "" #: ags/X/editor/ags_machine_selector.c:408 msgid "remove index" msgstr "" #: ags/X/editor/ags_machine_selector.c:411 msgid "link index" msgstr "" #: ags/X/editor/ags_machine_selector.c:415 msgid "reverse mapping" msgstr "" #: ags/X/editor/ags_machine_selector.c:420 msgid "shift piano" msgstr "" #: ags/X/editor/ags_move_note_dialog.c:202 #: ags/X/editor/ags_notation_toolbar.c:420 msgid "move notes" msgstr "" #: ags/X/editor/ags_move_note_dialog.c:213 msgid "relative" msgstr "" #: ags/X/editor/ags_move_note_dialog.c:235 msgid "move x" msgstr "" #: ags/X/editor/ags_move_note_dialog.c:260 msgid "move y" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:125 msgid "edit notes" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:132 msgid "clear notes" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:141 #: ags/X/editor/ags_notation_toolbar.c:426 #: ags/X/editor/ags_select_note_dialog.c:200 msgid "select notes" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:150 msgid "copy notes" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:157 msgid "cut notes" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:167 msgid "match audio channel" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:174 msgid "no duplicates" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:184 msgid "paste notes" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:190 msgid "invert" msgstr "" #: ags/X/editor/ags_notation_toolbar.c:192 msgid "invert notes" msgstr "" #: ags/X/editor/ags_pattern_envelope.c:247 #: ags/X/editor/ags_pattern_envelope.c:308 msgid "audio channel start" msgstr "" #: ags/X/editor/ags_pattern_envelope.c:254 #: ags/X/editor/ags_pattern_envelope.c:331 msgid "audio channel end" msgstr "" #: ags/X/editor/ags_pattern_envelope.c:261 #: ags/X/editor/ags_pattern_envelope.c:354 msgid "pad start" msgstr "" #: ags/X/editor/ags_pattern_envelope.c:268 #: ags/X/editor/ags_pattern_envelope.c:377 msgid "pad end" msgstr "" #: ags/X/editor/ags_pattern_envelope.c:275 #: ags/X/editor/ags_pattern_envelope.c:400 msgid "x start" msgstr "" #: ags/X/editor/ags_pattern_envelope.c:282 #: ags/X/editor/ags_pattern_envelope.c:423 msgid "x end" msgstr "" #: ags/X/editor/ags_position_automation_cursor_dialog.c:206 msgid "position automation cursor" msgstr "" #: ags/X/editor/ags_position_automation_cursor_dialog.c:216 #: ags/X/editor/ags_position_notation_cursor_dialog.c:213 msgid "set focus" msgstr "" #: ags/X/editor/ags_position_automation_cursor_dialog.c:232 #: ags/X/editor/ags_position_notation_cursor_dialog.c:229 msgid "position x" msgstr "" #: ags/X/editor/ags_position_notation_cursor_dialog.c:203 msgid "position notation cursor" msgstr "" #: ags/X/editor/ags_position_notation_cursor_dialog.c:254 msgid "position y" msgstr "" #: ags/X/editor/ags_ramp_acceleration_dialog.c:228 msgid "ramp x0" msgstr "" #: ags/X/editor/ags_ramp_acceleration_dialog.c:255 msgid "ramp y0" msgstr "" #: ags/X/editor/ags_ramp_acceleration_dialog.c:280 msgid "ramp x1" msgstr "" #: ags/X/editor/ags_ramp_acceleration_dialog.c:307 msgid "ramp y1" msgstr "" #: ags/X/editor/ags_ramp_acceleration_dialog.c:332 msgid "ramp step count" msgstr "" #: ags/X/editor/ags_select_acceleration_dialog.c:212 #: ags/X/editor/ags_select_note_dialog.c:210 msgid "copy selection" msgstr "" #: ags/X/editor/ags_select_acceleration_dialog.c:243 #: ags/X/editor/ags_select_note_dialog.c:226 msgid "select x0" msgstr "" #: ags/X/editor/ags_select_acceleration_dialog.c:270 #: ags/X/editor/ags_select_note_dialog.c:276 msgid "select x1" msgstr "" #: ags/X/editor/ags_select_note_dialog.c:251 msgid "select y0" msgstr "" #: ags/X/editor/ags_select_note_dialog.c:301 msgid "select y1" msgstr "" #: ags/X/editor/ags_wave_toolbar.c:238 msgid "select audio data" msgstr "" #: ags/X/export/ags_machine_collection_entry.c:216 #: ags/X/import/ags_track_collection_mapper.c:251 msgid "sequence: " msgstr "" #: ags/X/import/ags_track_collection_mapper.c:241 msgid "instrument: " msgstr "" #: ags/X/import/ags_track_collection_mapper.c:338 #: ags/X/machine/ags_ffplayer.c:284 msgid "instrument" msgstr "" #: ags/X/import/ags_track_collection_mapper.c:371 msgid "sequence" msgstr "" #: ags/X/machine/ags_drum.c:270 msgid "kit" msgstr "" #: ags/X/machine/ags_drum.c:277 msgid "default" msgstr "" #: ags/X/machine/ags_drum.c:298 msgid "run" msgstr "" #: ags/X/machine/ags_drum.c:351 ags/X/machine/ags_oscillator.c:212 msgid "length" msgstr "" #: ags/X/machine/ags_drum_input_pad_callbacks.c:55 msgid "Open File" msgstr "" #: ags/X/machine/ags_drum_input_pad_callbacks.c:70 msgid "channel: " msgstr "" #: ags/X/machine/ags_dssi_bridge.c:318 ags/X/machine/ags_live_dssi_bridge.c:321 #: ags/X/machine/ags_live_lv2_bridge.c:1565 ags/X/machine/ags_lv2_bridge.c:1942 msgid "program" msgstr "" #: ags/X/machine/ags_live_lv2_bridge.c:455 ags/X/machine/ags_lv2_bridge.c:433 msgid "show GUI" msgstr "" #: ags/X/machine/ags_oscillator.c:187 msgid "sawtooth" msgstr "" #: ags/X/machine/ags_oscillator.c:192 msgid "square" msgstr "" #: ags/X/machine/ags_oscillator.c:197 msgid "triangle" msgstr "" #: ags/X/machine/ags_oscillator.c:219 msgid "phase" msgstr "" #: ags/X/machine/ags_oscillator.c:226 msgid "frequency" msgstr "" #: ags/X/machine/ags_oscillator.c:238 msgid "volume" msgstr "" #: ags/X/machine/ags_oscillator.c:247 msgid "sync" msgstr "" #: ags/X/machine/ags_syncsynth.c:267 ags/X/machine/ags_synth.c:215 msgid "auto update" msgstr "" #: ags/X/machine/ags_syncsynth.c:270 ags/X/machine/ags_synth.c:218 msgid "update" msgstr "" #: ags/X/machine/ags_syncsynth.c:279 ags/X/machine/ags_synth.c:227 msgid "lower" msgstr "" #: ags/X/machine/ags_syncsynth.c:302 ags/X/machine/ags_synth.c:250 msgid "loop start" msgstr "" #: ags/X/machine/ags_syncsynth.c:322 ags/X/machine/ags_synth.c:270 msgid "loop end" msgstr "" #: ags/server/ags_registry.c:130 ags/server/controller/ags_controller.c:112 msgid "assigned server" msgstr "" #: ags/server/ags_registry.c:131 ags/server/controller/ags_controller.c:113 msgid "The assigned server" msgstr "" #: ags/server/ags_server.c:147 msgid "application context object" msgstr "" #: ags/server/ags_server.c:148 msgid "The application context object" msgstr "" #: ags/server/security/ags_security_context.c:107 msgid "certificates as string" msgstr "" #: ags/server/security/ags_security_context.c:108 msgid "The certificates as string" msgstr "" gsequencer-1.4.24/po/en@boldquot.header0000644000175000017500000000247113246707333014744 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # gsequencer-1.4.24/po/boldquot.sed0000644000175000017500000000033113246707333013635 00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g gsequencer-1.4.24/INSTALL0000644000175000017500000003661013246707333011733 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command `./configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. gsequencer-1.4.24/libags_thread.sym0000644000175000017500000001061313247044247014216 00000000000000ags_task_thread_get_type ags_task_thread_append_task ags_task_thread_append_tasks ags_task_thread_append_cyclic_task ags_task_thread_remove_cyclic_task ags_task_thread_clear_cache ags_task_thread_new ags_poll_fd_get_type ags_poll_fd_dispatch ags_poll_fd_new ags_message_delivery_get_type ags_message_delivery_add_queue ags_message_delivery_remove_queue ags_message_delivery_find_namespace ags_message_delivery_add_message ags_message_delivery_remove_message ags_message_delivery_find_sender ags_message_delivery_find_recipient ags_message_delivery_query_message ags_message_delivery_get_instance ags_message_delivery_new ags_task_get_type ags_task_launch ags_task_failure ags_task_new ags_timestamp_get_type ags_timestamp_new ags_worker_thread_get_type ags_woker_thread_do_poll_loop ags_worker_thread_do_poll ags_worker_thread_new ags_autosave_thread_get_type ags_autosave_thread_new ags_mutex_manager_get_type ags_mutex_manager_get_application_mutex ags_mutex_manager_insert ags_mutex_manager_remove ags_mutex_manager_lookup ags_mutex_manager_get_instance ags_mutex_manager_new ags_destroy_worker_get_type ags_destroy_entry_alloc ags_destroy_worker_add ags_destroy_worker_new ags_timestamp_factory_get_type ags_timestamp_factory_create ags_timestamp_factory_get_instance ags_timestamp_factory_new ags_concurrency_provider_get_type ags_concurrency_provider_get_mutex_manager ags_concurrency_provider_get_main_loop ags_concurrency_provider_get_task_thread ags_concurrency_provider_get_thread_pool ags_concurrency_provider_get_worker ags_concurrency_provider_set_worker ags_returnable_thread_get_type ags_returnable_thread_safe_run ags_returnable_thread_connect_safe_run ags_returnable_thread_disconnect_safe_run ags_returnable_thread_new ags_message_queue_get_type ags_message_envelope_alloc ags_message_envelope_free ags_message_queue_add_message ags_message_queue_remove_message ags_message_queue_find_sender ags_message_queue_find_recipient ags_message_queue_query_message ags_message_queue_new ags_single_thread_get_type ags_single_thread_new ags_condition_manager_get_type ags_condition_manager_insert ags_condition_manager_remove ags_condition_manager_lookup ags_condition_manager_get_instance ags_condition_manager_new ags_polling_thread_get_type ags_polling_thread_fd_position ags_polling_thread_add_poll_fd ags_polling_thread_remove_poll_fd ags_polling_thread_new ags_thread_xml_serialization_factory_get_type ags_thread_xml_serialization_factory_create ags_thread_xml_serialization_factory_get_instance ags_thread_xml_serialization_factory_new ags_file_read_thread ags_file_write_thread ags_file_read_thread_list ags_file_write_thread_list ags_file_read_thread_pool ags_file_write_thread_pool ags_file_read_timestamp ags_file_write_timestamp ags_file_read_timestamp_list ags_file_write_timestamp_list ags_thread_pool_get_type ags_thread_pool_pull ags_thread_pool_start ags_thread_pool_new ags_thread_application_context_get_type ags_thread_application_context_register_types ags_thread_application_context_new ags_generic_main_loop_get_type ags_generic_main_loop_new ags_history_get_type ags_history_new ags_thread_resume ags_thread_get_type ags_thread_resume_handler ags_thread_suspend_handler ags_thread_set_sync ags_thread_set_sync_all ags_thread_reset_all ags_thread_lock ags_thread_trylock ags_thread_unlock ags_thread_get_toplevel ags_thread_first ags_thread_last ags_thread_remove_child ags_thread_add_child ags_thread_add_child_extended ags_thread_parental_is_locked ags_thread_sibling_is_locked ags_thread_children_is_locked ags_thread_is_current_ready ags_thread_is_tree_ready ags_thread_next_parent_locked ags_thread_next_sibling_locked ags_thread_next_children_locked ags_thread_lock_parent ags_thread_lock_sibling ags_thread_lock_children ags_thread_lock_all ags_thread_unlock_parent ags_thread_unlock_sibling ags_thread_unlock_children ags_thread_unlock_all ags_thread_wait_parent ags_thread_wait_sibling ags_thread_wait_children ags_thread_signal_parent ags_thread_signal_sibling ags_thread_signal_children ags_thread_clock ags_thread_add_start_queue ags_thread_add_start_queue_all ags_thread_start ags_thread_run ags_thread_suspend ags_thread_resume ags_thread_timelock ags_thread_stop ags_thread_interrupted ags_thread_hangcheck ags_thread_find_type ags_thread_self ags_thread_chaos_tree ags_thread_is_chaos_tree ags_thread_new ags_task_completion_get_type ags_task_completion_complete ags_task_completion_new ags_timestamp_thread_get_type ags_timestamp_thread_new gsequencer-1.4.24/libags_server.sym0000644000175000017500000001040013247044247014247 00000000000000ags_registry_get_type ags_registry_entry_alloc ags_registry_entry_free ags_registry_add_entry ags_registry_find_entry ags_registry_new ags_password_store_manager_get_type ags_password_store_manager_get_password_store ags_password_store_manager_add_password_store ags_password_store_manager_remove_password_store ags_password_store_manager_check_password ags_password_store_manager_get_instance ags_password_store_manager_new ags_business_group_get_type ags_business_group_set_business_group_name ags_business_group_get_business_group_name ags_business_group_set_user_id ags_business_group_get_user_id ags_business_group_set_context_path_with_read_permission ags_business_group_get_context_path_with_read_permission ags_business_group_set_context_path_with_write_permission ags_business_group_get_context_path_with_write_permission ags_business_group_set_context_path_with_execute_permission ags_business_group_get_context_path_with_execute_permission ags_password_store_get_type ags_password_store_set_login_name ags_password_store_get_login_name ags_password_store_set_password ags_password_store_get_password ags_password_store_encrypt_password ags_certificate_manager_get_type ags_certificate_manager_get_certificate ags_certificate_manager_add_certificate ags_certificate_manager_remove_certificate ags_certificate_manager_verify_certificate ags_certificate_manager_get_instance ags_certificate_manager_new ags_certificate_get_type ags_certificate_verify ags_xml_certificate_get_type ags_xml_certificate_new ags_security_context_get_type ags_security_context_add_server_context ags_security_context_remove_server_context ags_security_context_new ags_authentication_manager_get_type ags_authentication_manager_get_authentication ags_authentication_manager_add_authentication ags_authentication_manager_remove_authentication ags_authentication_manager_login ags_authentication_manager_is_session_active ags_authentication_manager_get_instance ags_authentication_manager_new ags_xml_authentication_get_type ags_xml_authentication_find_user_uuid ags_xml_authentication_new ags_authentication_get_type ags_authentication_get_authentication_module ags_authentication_login ags_authentication_logout ags_authentication_generate_token ags_authentication_get_groups ags_authentication_get_permission ags_authentication_is_session_active ags_xml_password_store_get_type ags_xml_password_store_find_login ags_xml_password_store_new ags_server_get_type ags_server_info_alloc ags_server_start ags_server_lookup ags_server_new ags_server_status_get_type ags_server_status_new ags_remote_task_get_type ags_remote_task_launch ags_remote_task_launch_timed ags_remote_task_new ags_remote_task_thread_get_type ags_remote_task_thread_new ags_service_provider_get_type ags_service_provider_is_operating ags_service_provider_server_status ags_service_provider_get_env ags_service_provider_set_registry ags_service_provider_get_registry ags_service_provider_set_server ags_service_provider_get_server ags_service_provider_set_certificate_manager ags_service_provider_get_certificate_manager ags_service_provider_set_password_store_manager ags_service_provider_get_password_store_manager ags_service_provider_set_authentication_manager ags_service_provider_get_authentication_manager ags_local_factory_controller_get_type ags_local_factory_controller_create_instance ags_local_factory_controller_new ags_front_controller_get_type ags_front_controller_authenticate ags_front_controller_do_request ags_front_controller_new ags_controller_get_type ags_controller_resource_alloc ags_controller_resource_free ags_controller_add_resource ags_controller_remove_resource ags_controller_lookup_resource ags_controller_query_security_context ags_controller_new ags_local_task_controller_get_type ags_local_task_controller_launch ags_local_task_controller_launch_timed ags_local_task_controller_new ags_local_serialization_controller_get_type ags_local_serialization_controller_send_object ags_local_serialization_controller_send_object_property ags_local_serialization_controller_receive_object ags_local_serialization_controller_receive_object_property ags_local_serialization_controller_new ags_local_registry_controller_get_type ags_local_registry_controller_entry_bulk ags_local_registry_controller_new ags_server_application_context_get_type ags_server_application_context_new gsequencer-1.4.24/ags/0000755000175000017500000000000013256233676011533 500000000000000gsequencer-1.4.24/ags/thread/0000755000175000017500000000000013256233675013001 500000000000000gsequencer-1.4.24/ags/thread/file/0000755000175000017500000000000013256233675013720 500000000000000gsequencer-1.4.24/ags/thread/file/ags_thread_file_xml.h0000644000175000017500000000401513246707333017765 00000000000000/* 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 . */ #ifndef __AGS_FILE_THREAD_H__ #define __AGS_FILE_THREAD_H__ #include #include #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include void ags_file_read_thread(AgsFile *file, xmlNode *node, AgsThread **thread); xmlNode* ags_file_write_thread(AgsFile *file, xmlNode *parent, AgsThread *thread); void ags_file_read_thread_list(AgsFile *file, xmlNode *node, GList **thread); xmlNode* ags_file_write_thread_list(AgsFile *file, xmlNode *parent, GList *thread); void ags_file_read_thread_pool(AgsFile *file, xmlNode *node, AgsThreadPool **thread_pool); xmlNode* ags_file_write_thread_pool(AgsFile *file, xmlNode *parent, AgsThreadPool *thread_pool); /* AgsTimestamp */ void ags_file_read_timestamp(AgsFile *file, xmlNode *node, AgsTimestamp **timestamp); xmlNode* ags_file_write_timestamp(AgsFile *file, xmlNode *parent, AgsTimestamp *timestamp); void ags_file_read_timestamp_list(AgsFile *file, xmlNode *node, GList **timestamp); xmlNode* ags_file_write_timestamp_list(AgsFile *file, xmlNode *parent, GList *timestamp); #endif /*__AGS_FILE_THREAD_H__*/ gsequencer-1.4.24/ags/thread/file/ags_thread_xml_serialization_factory.h0000644000175000017500000000511513246707333023454 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_THREAD_XML_SERIALIZATION_FACTORY_H__ #define __AGS_THREAD_XML_SERIALIZATION_FACTORY_H__ #include #include #include #define AGS_TYPE_THREAD_XML_SERIALIZATION_FACTORY (ags_thread_xml_serialization_factory_get_type()) #define AGS_THREAD_XML_SERIALIZATION_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_THREAD_XML_SERIALIZATION_FACTORY, AgsThreadXmlSerializationFactory)) #define AGS_THREAD_XML_SERIALIZATION_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_THREAD_XML_SERIALIZATION_FACTORY, AgsThreadXmlSerializationFactoryClass)) #define AGS_IS_THREAD_XML_SERIALIZATION_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_THREAD_XML_SERIALIZATION_FACTORY)) #define AGS_IS_THREAD_XML_SERIALIZATION_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_THREAD_XML_SERIALIZATION_FACTORY)) #define AGS_THREAD_XML_SERIALIZATION_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_THREAD_XML_SERIALIZATION_FACTORY, AgsThreadXmlSerializationFactoryClass)) typedef struct _AgsThreadXmlSerializationFactory AgsThreadXmlSerializationFactory; typedef struct _AgsThreadXmlSerializationFactoryClass AgsThreadXmlSerializationFactoryClass; struct _AgsThreadXmlSerializationFactory { GObject object; }; struct _AgsThreadXmlSerializationFactoryClass { GObjectClass object; }; GType ags_thread_xml_serialization_factory_get_type(); gpointer ags_thread_xml_serialization_factory_create(AgsThreadXmlSerializationFactory *thread_xml_serialization_factory, xmlNode *node); /* */ AgsThreadXmlSerializationFactory* ags_thread_xml_serialization_factory_get_instance(); AgsThreadXmlSerializationFactory* ags_thread_xml_serialization_factory_new(); #endif /*__AGS_THREAD_XML_SERIALIZATION_FACTORY_H__*/ gsequencer-1.4.24/ags/thread/file/ags_thread_xml_serialization_factory.c0000644000175000017500000001034213246707333023445 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_thread_xml_serialization_factory_class_init(AgsThreadXmlSerializationFactoryClass *thread_xml_serialization_factory_class); void ags_thread_xml_serialization_factory_connectable_interface_init(AgsConnectableInterface *connectable); void ags_thread_xml_serialization_factory_init(AgsThreadXmlSerializationFactory *thread_xml_serialization_factory); /** * SECTION:ags_thread_xml_serialization_factory * @short_description: Factory pattern * @title: AgsThreadXmlSerializationFactory * @section_id: * @include: ags/thread/file/ags_thread_xml_serialization_factory.h * * #AgsThreadXmlSerializationFactory allocates or instantiates specified #xmlNode-struct. */ static gpointer ags_thread_xml_serialization_factory_parent_class = NULL; GType ags_thread_xml_serialization_factory_get_type (void) { static GType ags_type_thread_xml_serialization_factory = 0; if(!ags_type_thread_xml_serialization_factory){ static const GTypeInfo ags_thread_xml_serialization_factory_info = { sizeof (AgsThreadXmlSerializationFactoryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_thread_xml_serialization_factory_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsThreadXmlSerializationFactory), 0, /* n_preallocs */ (GInstanceInitFunc) ags_thread_xml_serialization_factory_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_thread_xml_serialization_factory_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_thread_xml_serialization_factory = g_type_register_static(G_TYPE_OBJECT, "AgsThreadXmlSerializationFactory", &ags_thread_xml_serialization_factory_info, 0); g_type_add_interface_static(ags_type_thread_xml_serialization_factory, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_thread_xml_serialization_factory); } void ags_thread_xml_serialization_factory_class_init(AgsThreadXmlSerializationFactoryClass *thread_xml_serialization_factory) { ags_thread_xml_serialization_factory_parent_class = g_type_class_peek_parent(thread_xml_serialization_factory); } void ags_thread_xml_serialization_factory_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = NULL; connectable->remove_from_registry = NULL; connectable->connect = NULL; connectable->disconnect = NULL; } void ags_thread_xml_serialization_factory_init(AgsThreadXmlSerializationFactory *thread_xml_serialization_factory) { } gpointer ags_thread_xml_serialization_factory_create(AgsThreadXmlSerializationFactory *thread_xml_serialization_factory, xmlNode *node) { gpointer ret_val; ret_val = NULL; //TODO:JK: implement me return(ret_val); } /** * ags_thread_xml_serialization_factory_new: * * Creates a #AgsThreadXmlSerializationFactory * * Returns: a new #AgsThreadXmlSerializationFactory * * Since: 1.0.0 */ AgsThreadXmlSerializationFactory* ags_thread_xml_serialization_factory_new() { AgsThreadXmlSerializationFactory *thread_xml_serialization_factory; thread_xml_serialization_factory = (AgsThreadXmlSerializationFactory *) g_object_new(AGS_TYPE_THREAD_XML_SERIALIZATION_FACTORY, NULL); return(thread_xml_serialization_factory); } gsequencer-1.4.24/ags/thread/file/ags_thread_file_xml.c0000644000175000017500000003250013246707333017760 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_file_read_thread_start(AgsFileLaunch *file_launch, AgsThread *thread); void ags_file_read_thread_pool_start(AgsFileLaunch *file_launch, AgsThreadPool *thread_pool); void ags_file_read_thread(AgsFile *file, xmlNode *node, AgsThread **thread) { AgsFileLaunch *file_launch; AgsThread *gobject; xmlNode *child; xmlChar *type_name; xmlChar *str; guint orig_flags; static gboolean thread_type_is_registered = FALSE; if(*thread != NULL && AGS_IS_RETURNABLE_THREAD(*thread)){ return; } if(*thread == NULL){ GType type; if(!thread_type_is_registered){ ags_thread_application_context_register_types(AGS_APPLICATION_CONTEXT(file->application_context)); thread_type_is_registered = TRUE; } type_name = xmlGetProp(node, AGS_FILE_TYPE_PROP); type = g_type_from_name(type_name); if(type == AGS_TYPE_RETURNABLE_THREAD){ return; } gobject = g_object_new(type, NULL); *thread = gobject; }else{ gobject = *thread; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); orig_flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); g_atomic_int_set(&(gobject->flags), ((~(AGS_THREAD_RUNNING)) & (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16))); str = xmlGetProp(node, "sync-flags"); if(str != NULL){ g_atomic_int_set(&(gobject->sync_flags), ((~(AGS_THREAD_WAIT_0 | AGS_THREAD_WAIT_1 | AGS_THREAD_WAIT_2)) & (guint) g_ascii_strtoull(str, NULL, 16))); } str = xmlGetProp(node, "frequency"); if(str != NULL){ gobject->freq = (guint) g_ascii_strtod(str, NULL); } /* start */ if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(orig_flags)))) != 0){ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, NULL); ags_file_add_launch(file, (GObject *) file_launch); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_file_read_thread_start), gobject); } /* read children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-thread-list", 16)){ GList *list; list = NULL; ags_file_read_thread_list(file, child, &list); while(list != NULL){ ags_thread_add_child(gobject, list->data); list = list->next; } } } child = child->next; } } void ags_file_read_thread_start(AgsFileLaunch *file_launch, AgsThread *thread) { g_atomic_int_and(&(thread->flags), ~AGS_THREAD_RUNNING); ags_thread_start(thread); /* wait thread */ pthread_mutex_lock(thread->start_mutex); g_atomic_int_set(&(thread->start_wait), TRUE); if(g_atomic_int_get(&(thread->start_wait)) == TRUE && g_atomic_int_get(&(thread->start_done)) == FALSE){ while(g_atomic_int_get(&(thread->start_wait)) == TRUE && g_atomic_int_get(&(thread->start_done)) == FALSE){ pthread_cond_wait(thread->start_cond, thread->start_mutex); } } pthread_mutex_unlock(thread->start_mutex); } xmlNode* ags_file_write_thread(AgsFile *file, xmlNode *parent, AgsThread *thread) { AgsThread *current; xmlNode *node, *child; gchar *id; if(AGS_IS_RETURNABLE_THREAD(thread)){ return(NULL); } id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-thread"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", thread, NULL)); xmlNewProp(node, AGS_FILE_TYPE_PROP, G_OBJECT_TYPE_NAME(thread)); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", g_atomic_int_get(&(thread->flags)))); xmlNewProp(node, "sync-flags", g_strdup_printf("%x", g_atomic_int_get(&(thread->sync_flags)))); xmlNewProp(node, "frequency", g_strdup_printf("%.01f", thread->freq)); /* add to parent */ xmlAddChild(parent, node); /* child elements */ current = g_atomic_pointer_get(&(thread->children)); if(current != NULL){ child = xmlNewNode(NULL, "ags-thread-list"); xmlAddChild(node, child); while(current != NULL){ ags_file_write_thread(file, child, current); current = g_atomic_pointer_get(&(current->next)); } } return(node); } void ags_file_read_thread_list(AgsFile *file, xmlNode *node, GList **thread) { AgsThread *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-thread", 11)){ current = NULL; ags_file_read_thread(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } // list = g_list_reverse(list); *thread = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_thread_list(AgsFile *file, xmlNode *parent, GList *thread) { AgsThread *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-thread-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = thread; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); //TODO:JK: generate id and add id ref while(list != NULL){ ags_file_write_thread(file, node, AGS_THREAD(list->data)); list = list->next; } return(node); } void ags_file_read_thread_pool(AgsFile *file, xmlNode *node, AgsThreadPool **thread_pool) { AgsThreadPool *gobject; AgsFileLookup *file_lookup; xmlNode *child; xmlChar *prop, *content; if(*thread_pool == NULL){ gobject = g_object_new(AGS_TYPE_THREAD_POOL, NULL); *thread_pool = gobject; }else{ gobject = *thread_pool; } //TODO:JK: implement me // g_object_set(G_OBJECT(gobject), // "ags-main", file->application_context, // NULL); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); } xmlNode* ags_file_write_thread_pool(AgsFile *file, xmlNode *parent, AgsThreadPool *thread_pool) { AgsFileLookup *file_lookup; xmlNode *node, *child; gchar *id; guint i; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-thread-pool"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", thread_pool, NULL)); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", thread_pool->flags)); xmlAddChild(parent, node); return(node); } void ags_file_read_thread_pool_start(AgsFileLaunch *file_launch, AgsThreadPool *thread_pool) { ags_thread_pool_start(thread_pool); } void ags_file_read_timestamp(AgsFile *file, xmlNode *node, AgsTimestamp **timestamp) { AgsTimestamp *gobject; if(*timestamp == NULL){ gobject = (AgsTimestamp *) g_object_new(AGS_TYPE_TIMESTAMP, NULL); *timestamp = gobject; }else{ gobject = *timestamp; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->delay = (guint) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "delay"), NULL); gobject->attack = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "attack"), NULL, 10); gobject->timer.unix_time.time_val = (guint) g_ascii_strtoull((gchar *) xmlNodeGetContent(node), NULL, 10); } xmlNode* ags_file_write_timestamp(AgsFile *file, xmlNode *parent, AgsTimestamp *timestamp) { xmlNode *node; gchar *id; if(timestamp == NULL){ return(NULL); } id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-timestamp"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", timestamp, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", timestamp->flags)); xmlNewProp(node, (xmlChar *) "delay", (xmlChar *) g_strdup_printf("%.01f", timestamp->delay)); xmlNewProp(node, (xmlChar *) "attack", (xmlChar *) g_strdup_printf("%d", timestamp->attack)); xmlAddChild(parent, node); xmlNodeAddContent(node, (xmlChar *) g_strdup_printf("%li", timestamp->timer.unix_time.time_val)); return(node); } void ags_file_read_timestamp_list(AgsFile *file, xmlNode *node, GList **timestamp) { AgsTimestamp *current; xmlNode *child; GList *list; child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-timestamp", 14)){ current = NULL; ags_file_read_timestamp(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *timestamp = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_timestamp_list(AgsFile *file, xmlNode *parent, GList *timestamp) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-timestamp-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", timestamp, NULL)); xmlAddChild(parent, node); list = timestamp; while(list != NULL){ ags_file_write_timestamp(file, node, AGS_TIMESTAMP(list->data)); list = list->next; } return(node); } gsequencer-1.4.24/ags/thread/ags_poll_fd.h0000644000175000017500000000517213246707333015344 00000000000000/* 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 . */ #ifndef __AGS_POLL_FD_H__ #define __AGS_POLL_FD_H__ #include #include #include #include #define AGS_TYPE_POLL_FD (ags_poll_fd_get_type()) #define AGS_POLL_FD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_POLL_FD, AgsPollFd)) #define AGS_POLL_FD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_POLL_FD, AgsPollFdClass)) #define AGS_IS_POLL_FD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_POLL_FD)) #define AGS_IS_POLL_FD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_POLL_FD)) #define AGS_POLL_FD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_POLL_FD, AgsPollFdClass)) typedef struct _AgsPollFd AgsPollFd; typedef struct _AgsPollFdClass AgsPollFdClass; /** * AgsPollFdFlags: * @AGS_POLL_FD_READY: not used * @AGS_POLL_FD_THROUGHPUT: not used * @AGS_POLL_FD_INPUT: there is input to read * @AGS_POLL_FD_PRIORITY_INPUT: there is priority input to read * @AGS_POLL_FD_OUTPUT: there is output available * @AGS_POLL_FD_HANG_UP: hang up * * Enum values to control the behavior or indicate internal state of #AgsPollFd by * enable/disable as flags. */ typedef enum{ AGS_POLL_FD_READY = 1, AGS_POLL_FD_THROUGHPUT = 1 << 1, AGS_POLL_FD_INPUT = 1 << 2, AGS_POLL_FD_PRIORITY_INPUT = 1 << 3, AGS_POLL_FD_OUTPUT = 1 << 4, AGS_POLL_FD_HANG_UP = 1 << 5, }AgsPollFdFlags; struct _AgsPollFd { GObject gobject; guint flags; AgsPollingThread *polling_thread; int fd; struct pollfd *poll_fd; gdouble delay; gdouble delay_counter; }; struct _AgsPollFdClass { GObjectClass gobject; void (*dispatch)(AgsPollFd *poll_fd); }; GType ags_poll_fd_get_type(); void ags_poll_fd_dispatch(AgsPollFd *poll_fd); AgsPollFd* ags_poll_fd_new(); #endif /*__AGS_POLL_FD_H__*/ gsequencer-1.4.24/ags/thread/ags_history.h0000644000175000017500000000343513246707333015426 00000000000000/* 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 . */ #ifndef __AGS_HISTORY_H__ #define __AGS_HISTORY_H__ #include #include #include #define AGS_TYPE_HISTORY (ags_history_get_type()) #define AGS_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_HISTORY, AgsHistory)) #define AGS_HISTORY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_HISTORY, AgsHistory)) #define AGS_IS_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_HISTORY)) #define AGS_IS_HISTORY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_HISTORY)) #define AGS_HISTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_HISTORY, AgsHistoryClass)) typedef struct _AgsHistory AgsHistory; typedef struct _AgsHistoryClass AgsHistoryClass; typedef struct _AgsHistoryAppend AgsHistoryAppend; struct _AgsHistory { GObject gobject; GList *task; }; struct _AgsHistoryClass { GObjectClass gobject; }; GType ags_history_get_type(); AgsHistory* ags_history_new(); #endif /*__AGS_HISTORY_H__*/ gsequencer-1.4.24/ags/thread/ags_message_delivery.c0000644000175000017500000003527613247044247017256 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_message_delivery_class_init(AgsMessageDeliveryClass *message_delivery); void ags_message_delivery_connectable_interface_init(AgsConnectableInterface *connectable); void ags_message_delivery_init(AgsMessageDelivery *message_delivery); void ags_message_delivery_connect(AgsConnectable *connectable); void ags_message_delivery_disconnect(AgsConnectable *connectable); void ags_message_delivery_dispose(GObject *gobject); void ags_message_delivery_finalize(GObject *gobject); /** * SECTION:ags_message_delivery * @short_description: message delivery * @title: AgsMessageDelivery * @section_id: * @include: ags/thread/ags_message_delivery.h * * The #AgsMessageDelivery acts as messages passing system. */ AgsMessageDelivery *ags_message_delivery = NULL; static gpointer ags_message_delivery_parent_class = NULL; GType ags_message_delivery_get_type() { static GType ags_type_message_delivery = 0; if(!ags_type_message_delivery){ static const GTypeInfo ags_message_delivery_info = { sizeof (AgsMessageDeliveryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_message_delivery_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMessageDelivery), 0, /* n_preallocs */ (GInstanceInitFunc) ags_message_delivery_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_message_delivery_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_message_delivery = g_type_register_static(G_TYPE_OBJECT, "AgsMessageDelivery", &ags_message_delivery_info, 0); g_type_add_interface_static(ags_type_message_delivery, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_message_delivery); } void ags_message_delivery_class_init(AgsMessageDeliveryClass *message_delivery) { GObjectClass *gobject; ags_message_delivery_parent_class = g_type_class_peek_parent(message_delivery); /* GObjectClass */ gobject = (GObjectClass *) message_delivery; gobject->dispose = ags_message_delivery_dispose; gobject->finalize = ags_message_delivery_finalize; } void ags_message_delivery_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_message_delivery_connect; connectable->disconnect = ags_message_delivery_disconnect; } void ags_message_delivery_init(AgsMessageDelivery *message_delivery) { message_delivery->mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(message_delivery->mutexattr); pthread_mutexattr_settype(message_delivery->mutexattr, PTHREAD_MUTEX_RECURSIVE); message_delivery->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(message_delivery->mutex, message_delivery->mutexattr); message_delivery->message_queue = NULL; } void ags_message_delivery_connect(AgsConnectable *connectable) { /* empty */ } void ags_message_delivery_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_message_delivery_dispose(GObject *gobject) { AgsMessageDelivery *message_delivery; message_delivery = AGS_MESSAGE_DELIVERY(gobject); /* message queue */ if(message_delivery->message_queue != NULL){ g_list_free_full(message_delivery->message_queue, g_object_unref); message_delivery->message_queue = NULL; } /* call parent */ G_OBJECT_CLASS(ags_message_delivery_parent_class)->dispose(gobject); } void ags_message_delivery_finalize(GObject *gobject) { AgsMessageDelivery *message_delivery; message_delivery = AGS_MESSAGE_DELIVERY(gobject); /* mutex */ pthread_mutexattr_destroy(message_delivery->mutexattr); free(message_delivery->mutexattr); pthread_mutex_destroy(message_delivery->mutex); free(message_delivery->mutex); /* message queue */ if(message_delivery->message_queue != NULL){ g_list_free_full(message_delivery->message_queue, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_message_delivery_parent_class)->finalize(gobject); } /** * ags_message_delivery_add_queue: * @message_delivery: the #AgsMessageDelivery * @message_queue: the #AgsMessageQueue * * Add @message_queue to @message_delivery. * * Since: 1.2.0 */ void ags_message_delivery_add_queue(AgsMessageDelivery *message_delivery, GObject *message_queue) { if(!AGS_IS_MESSAGE_DELIVERY(message_delivery) || !AGS_IS_MESSAGE_QUEUE(message_queue)){ return; } pthread_mutex_lock(message_delivery->mutex); message_delivery->message_queue = g_list_prepend(message_delivery->message_queue, message_queue); pthread_mutex_unlock(message_delivery->mutex); } /** * ags_message_delivery_remove_queue: * @message_delivery: the #AgsMessageDelivery * @message_queue: the #AgsMessageQueue * * Remove @message_queue to @message_delivery. * * Since: 1.2.0 */ void ags_message_delivery_remove_queue(AgsMessageDelivery *message_delivery, GObject *message_queue) { if(!AGS_IS_MESSAGE_DELIVERY(message_delivery) || !AGS_IS_MESSAGE_QUEUE(message_queue)){ return; } pthread_mutex_lock(message_delivery->mutex); message_delivery->message_queue = g_list_remove(message_delivery->message_queue, message_queue); pthread_mutex_unlock(message_delivery->mutex); } /** * ags_message_delivery_find_namespace: * @message_delivery: the #AgsMessageDelivery to search * @namespace: the namespace as string to find * * Find namespace of #AgsMessageQueue in @message_delivery. * * Returns: the matching #AgsMessageQueue * * Since: 1.2.0 */ GObject* ags_message_delivery_find_namespace(AgsMessageDelivery *message_delivery, gchar *namespace) { AgsMessageQueue *message_queue; GList *list; if(!AGS_IS_MESSAGE_DELIVERY(message_delivery) || namespace == NULL){ return(NULL); } pthread_mutex_lock(message_delivery->mutex); list = message_delivery->message_queue; pthread_mutex_unlock(message_delivery->mutex); while(list != NULL){ pthread_mutex_lock(message_delivery->mutex); message_queue = AGS_MESSAGE_QUEUE(list->data); pthread_mutex_unlock(message_delivery->mutex); /* compare namespace */ pthread_mutex_lock(message_queue->mutex); if(!g_strcmp0(namespace, message_queue->namespace)){ pthread_mutex_unlock(message_queue->mutex); return(message_queue); } pthread_mutex_unlock(message_queue->mutex); /* iterate */ pthread_mutex_lock(message_delivery->mutex); list = list->next; pthread_mutex_unlock(message_delivery->mutex); } return(NULL); } /** * ags_message_delivery_add_message: * @message_delivery: the #AgsMessageDelivery * @namespace: the namespace as string * @message: the #AgsMessageEnvelope * * Add @message to an #AgsMessageQueue specified by @namespace. * * Since: 1.2.0 */ void ags_message_delivery_add_message(AgsMessageDelivery *message_delivery, gchar *namespace, gpointer message) { AgsMessageQueue *message_queue; if(!AGS_IS_MESSAGE_DELIVERY(message_delivery) || namespace == NULL){ return; } message_queue = ags_message_delivery_find_namespace(message_delivery, namespace); if(message_queue == NULL){ message_queue = ags_message_queue_new(namespace); ags_message_delivery_add_queue(message_delivery, message_queue); } ags_message_queue_add_message(message_queue, message); } /** * ags_message_delivery_remove_message: * @message_delivery: the #AgsMessageDelivery * @namespace: the namespace as string * @message: the #AgsMessageEnvelope * * Remove @message from an #AgsMessageQueue specified by @namespace. * * Since: 1.2.0 */ void ags_message_delivery_remove_message(AgsMessageDelivery *message_delivery, gchar *namespace, gpointer message) { AgsMessageQueue *message_queue; if(!AGS_IS_MESSAGE_DELIVERY(message_delivery) || namespace == NULL){ return; } message_queue = ags_message_delivery_find_namespace(message_delivery, namespace); ags_message_queue_remove_message(message_queue, message); } /** * ags_message_delivery_find_sender: * @message_delivery: the #AgsMessageDelivery * @namespace: the namespace as string, maybe %NULL * @sender: the sender as #GObject * * Find @sender for @namespace matching #AgsMessageQueue. If @namespace equals %NULL match * all available message queues. * * Returns: all matching #AgsMessageEnvelope as #GList-struct * * Since: 1.2.0 */ GList* ags_message_delivery_find_sender(AgsMessageDelivery *message_delivery, gchar *namespace, GObject *sender) { AgsMessageQueue *message_queue; GList *list; GList *current_match, *match; if(!AGS_IS_MESSAGE_DELIVERY(message_delivery)){ return(NULL); } match = NULL; if(namespace == NULL){ pthread_mutex_lock(message_delivery->mutex); list = message_delivery->message_queue; pthread_mutex_unlock(message_delivery->mutex); while(list != NULL){ pthread_mutex_lock(message_delivery->mutex); message_queue = list->data; pthread_mutex_unlock(message_delivery->mutex); current_match = ags_message_queue_find_sender(message_queue, sender); if(current_match != NULL){ if(match == NULL){ match = current_match; }else{ match = g_list_concat(current_match, match); } } /* iterate */ pthread_mutex_lock(message_delivery->mutex); list = list->next; pthread_mutex_unlock(message_delivery->mutex); } }else{ message_queue = ags_message_delivery_find_namespace(message_delivery, namespace); match = ags_message_queue_find_sender(message_queue, sender); } return(match); } /** * ags_message_delivery_find_recipient: * @message_delivery: the #AgsMessageDelivery * @namespace: the namespace as string, maybe %NULL * @recipient: the recipient as #GObject * * Find @recipient for @namespace matching #AgsMessageQueue. If @namespace equals %NULL match * all available message queues. * * Returns: all matching #AgsMessageEnvelope as #GList-struct * * Since: 1.2.0 */ GList* ags_message_delivery_find_recipient(AgsMessageDelivery *message_delivery, gchar *namespace, GObject *recipient) { AgsMessageQueue *message_queue; GList *list; GList *current_match, *match; if(!AGS_IS_MESSAGE_DELIVERY(message_delivery)){ return(NULL); } match = NULL; if(namespace == NULL){ pthread_mutex_lock(message_delivery->mutex); list = message_delivery->message_queue; pthread_mutex_unlock(message_delivery->mutex); while(list != NULL){ pthread_mutex_lock(message_delivery->mutex); message_queue = list->data; pthread_mutex_unlock(message_delivery->mutex); current_match = ags_message_queue_find_recipient(message_queue, recipient); if(current_match != NULL){ if(match == NULL){ match = current_match; }else{ match = g_list_concat(current_match, match); } } /* iterate */ pthread_mutex_lock(message_delivery->mutex); list = list->next; pthread_mutex_unlock(message_delivery->mutex); } }else{ message_queue = ags_message_delivery_find_namespace(message_delivery, namespace); match = ags_message_queue_find_recipient(message_queue, recipient); } return(match); } /** * ags_message_delivery_query_message: * @message_delivery: the #AgsMessageDelivery * @namespace: the namespace as string, maybe %NULL * @xpath: the xpath to query * * Query @xpath for @namespace matching #AgsMessageQueue. If @namespace equals %NULL match * all available message queues. * * Returns: all matching #AgsMessageEnvelope as #GList-struct * * Since: 1.2.0 */ GList* ags_message_delivery_query_message(AgsMessageDelivery *message_delivery, gchar *namespace, gchar *xpath) { AgsMessageQueue *message_queue; GList *list; GList *current_match, *match; if(!AGS_IS_MESSAGE_DELIVERY(message_delivery)){ return(NULL); } match = NULL; if(namespace == NULL){ pthread_mutex_lock(message_delivery->mutex); list = message_delivery->message_queue; pthread_mutex_unlock(message_delivery->mutex); while(list != NULL){ pthread_mutex_lock(message_delivery->mutex); message_queue = list->data; pthread_mutex_unlock(message_delivery->mutex); current_match = ags_message_queue_query_message(message_queue, xpath); if(current_match != NULL){ if(match == NULL){ match = current_match; }else{ match = g_list_concat(current_match, match); } } /* iterate */ pthread_mutex_lock(message_delivery->mutex); list = list->next; pthread_mutex_unlock(message_delivery->mutex); } }else{ message_queue = ags_message_delivery_find_namespace(message_delivery, namespace); match = ags_message_queue_query_message(message_queue, xpath); } return(match); } /** * ags_message_delivery_get_instance: * * Get the #AgsMessageDelivery instance. * * Returns: the #AgsMessageDelivery * * Since: 1.2.0 */ AgsMessageDelivery* ags_message_delivery_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_message_delivery == NULL){ ags_message_delivery = ags_message_delivery_new(); } pthread_mutex_unlock(&mutex); return(ags_message_delivery); } /** * ags_message_delivery_new: * * Create a new #AgsMessageDelivery. * * Returns: the new #AgsMessageDelivery * * Since: 1.2.0 */ AgsMessageDelivery* ags_message_delivery_new() { AgsMessageDelivery *message_delivery; message_delivery = (AgsMessageDelivery *) g_object_new(AGS_TYPE_MESSAGE_DELIVERY, NULL); return(message_delivery); } gsequencer-1.4.24/ags/thread/ags_autosave_thread.c0000644000175000017500000002336113246707333017076 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_autosave_thread_class_init(AgsAutosaveThreadClass *autosave_thread); void ags_autosave_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_autosave_thread_main_loop_interface_init(AgsMainLoopInterface *main_loop); void ags_autosave_thread_init(AgsAutosaveThread *autosave_thread); void ags_autosave_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_autosave_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_autosave_thread_connect(AgsConnectable *connectable); void ags_autosave_thread_disconnect(AgsConnectable *connectable); void ags_autosave_thread_set_tic(AgsMainLoop *main_loop, guint tic); guint ags_autosave_thread_get_tic(AgsMainLoop *main_loop); void ags_autosave_thread_set_last_sync(AgsMainLoop *main_loop, guint last_sync); guint ags_autosave_thread_get_last_sync(AgsMainLoop *main_loop); void ags_autosave_thread_finalize(GObject *gobject); void ags_autosave_thread_start(AgsThread *thread); void ags_autosave_thread_run(AgsThread *thread); /** * SECTION:ags_autosave_thread * @short_description: auto safe * @title: AgsAutosaveThread * @section_id: * @include: ags/thread/ags_autosave_thread.h * * The #AgsAutosaveThread performs auto-safe. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, }; static gpointer ags_autosave_thread_parent_class = NULL; static AgsConnectableInterface *ags_autosave_thread_parent_connectable_interface; GType ags_autosave_thread_get_type() { static GType ags_type_autosave_thread = 0; if(!ags_type_autosave_thread){ static const GTypeInfo ags_autosave_thread_info = { sizeof (AgsAutosaveThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_autosave_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAutosaveThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_autosave_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_autosave_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_main_loop_interface_info = { (GInterfaceInitFunc) ags_autosave_thread_main_loop_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_autosave_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsAutosaveThread", &ags_autosave_thread_info, 0); g_type_add_interface_static(ags_type_autosave_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_autosave_thread, AGS_TYPE_MAIN_LOOP, &ags_main_loop_interface_info); } return (ags_type_autosave_thread); } void ags_autosave_thread_class_init(AgsAutosaveThreadClass *autosave_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_autosave_thread_parent_class = g_type_class_peek_parent(autosave_thread); /* GObject */ gobject = (GObjectClass *) autosave_thread; gobject->get_property = ags_autosave_thread_get_property; gobject->set_property = ags_autosave_thread_set_property; gobject->finalize = ags_autosave_thread_finalize; /* properties */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context to check against"), i18n_pspec("The application context to check against serialization"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* AgsThread */ thread = (AgsThreadClass *) autosave_thread; thread->start = ags_autosave_thread_start; thread->run = ags_autosave_thread_run; } void ags_autosave_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_autosave_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_autosave_thread_connect; connectable->disconnect = ags_autosave_thread_disconnect; } void ags_autosave_thread_main_loop_interface_init(AgsMainLoopInterface *main_loop) { main_loop->set_tic = ags_autosave_thread_set_tic; main_loop->get_tic = ags_autosave_thread_get_tic; main_loop->set_last_sync = ags_autosave_thread_set_last_sync; main_loop->get_last_sync = ags_autosave_thread_get_last_sync; } void ags_autosave_thread_init(AgsAutosaveThread *autosave_thread) { AgsThread *thread; thread = AGS_THREAD(autosave_thread); thread->freq = AGS_AUTOSAVE_THREAD_DEFAULT_JIFFIE; g_atomic_int_set(&(autosave_thread->tic), 0); g_atomic_int_set(&(autosave_thread->last_sync), 0); autosave_thread->application_context = NULL; autosave_thread->counter = 0; } void ags_autosave_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAutosaveThread *autosave_thread; autosave_thread = AGS_AUTOSAVE_THREAD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(autosave_thread->application_context == (GObject *) application_context){ return; } if(autosave_thread->application_context != NULL){ g_object_unref(autosave_thread->application_context); } if(application_context != NULL){ g_object_ref(application_context); } autosave_thread->application_context = (GObject *) application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_autosave_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAutosaveThread *autosave_thread; autosave_thread = AGS_AUTOSAVE_THREAD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, autosave_thread->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_autosave_thread_connect(AgsConnectable *connectable) { ags_autosave_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_autosave_thread_disconnect(AgsConnectable *connectable) { ags_autosave_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_autosave_thread_set_tic(AgsMainLoop *main_loop, guint tic) { g_atomic_int_set(&(AGS_AUTOSAVE_THREAD(main_loop)->tic), tic); } guint ags_autosave_thread_get_tic(AgsMainLoop *main_loop) { return(g_atomic_int_get(&(AGS_AUTOSAVE_THREAD(main_loop)->tic))); } void ags_autosave_thread_set_last_sync(AgsMainLoop *main_loop, guint last_sync) { g_atomic_int_set(&(AGS_AUTOSAVE_THREAD(main_loop)->last_sync), last_sync); } guint ags_autosave_thread_get_last_sync(AgsMainLoop *main_loop) { gint val; val = g_atomic_int_get(&(AGS_AUTOSAVE_THREAD(main_loop)->last_sync)); return(val); } void ags_autosave_thread_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_autosave_thread_parent_class)->finalize(gobject); /* empty */ } void ags_autosave_thread_start(AgsThread *thread) { AGS_THREAD_CLASS(ags_autosave_thread_parent_class)->start(thread); } void ags_autosave_thread_run(AgsThread *thread) { AgsAutosaveThread *autosave_thread; static const struct timespec delay = { 1, 0, }; autosave_thread = AGS_AUTOSAVE_THREAD(thread); if(autosave_thread->counter != autosave_thread->delay){ autosave_thread->counter += 1; }else{ AgsFile *file; struct passwd *pw; uid_t uid; gchar *filename; autosave_thread->counter = 0; uid = getuid(); pw = getpwuid(uid); filename = g_strdup_printf("%s/%s/%d-%s", pw->pw_dir, AGS_DEFAULT_DIRECTORY, getpid(), AGS_AUTOSAVE_THREAD_DEFAULT_FILENAME); file = (AgsFile *) g_object_new(AGS_TYPE_FILE, "application-context", autosave_thread->application_context, "filename", filename, NULL); ags_file_write_concurrent(file); g_object_unref(file); } nanosleep(&delay, NULL); } /** * ags_autosave_thread_new: * @application_context: the #AgsApplicationContext * * Create a new #AgsAutosaveThread. * * Returns: the new #AgsAutosaveThread * * Since: 1.0.0 */ AgsAutosaveThread* ags_autosave_thread_new(GObject *application_context) { AgsAutosaveThread *autosave_thread; autosave_thread = (AgsAutosaveThread *) g_object_new(AGS_TYPE_AUTOSAVE_THREAD, "application-context", application_context, NULL); return(autosave_thread); } gsequencer-1.4.24/ags/thread/ags_timestamp_thread.c0000644000175000017500000001277513246707333017261 00000000000000/* 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 . */ #include #include #include void ags_timestamp_thread_class_init(AgsTimestampThreadClass *timestamp_thread); void ags_timestamp_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_timestamp_thread_init(AgsTimestampThread *timestamp_thread); void ags_timestamp_thread_connect(AgsConnectable *connectable); void ags_timestamp_thread_disconnect(AgsConnectable *connectable); void ags_timestamp_thread_finalize(GObject *gobject); void ags_timestamp_thread_run(AgsThread *thread); static gpointer ags_timestamp_thread_parent_class = NULL; static AgsConnectableInterface *ags_timestamp_thread_parent_connectable_interface; GType ags_timestamp_thread_get_type() { static GType ags_type_timestamp_thread = 0; if(!ags_type_timestamp_thread){ static const GTypeInfo ags_timestamp_thread_info = { sizeof (AgsTimestampThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_timestamp_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTimestampThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_timestamp_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_timestamp_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_timestamp_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsTimestampThread", &ags_timestamp_thread_info, 0); g_type_add_interface_static(ags_type_timestamp_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_timestamp_thread); } void ags_timestamp_thread_class_init(AgsTimestampThreadClass *timestamp_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_timestamp_thread_parent_class = g_type_class_peek_parent(timestamp_thread); /* GObject */ gobject = (GObjectClass *) timestamp_thread; gobject->finalize = ags_timestamp_thread_finalize; /* AgsThread */ thread = (AgsThreadClass *) timestamp_thread; thread->run = ags_timestamp_thread_run; } void ags_timestamp_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_timestamp_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_timestamp_thread_connect; connectable->disconnect = ags_timestamp_thread_disconnect; } void ags_timestamp_thread_init(AgsTimestampThread *timestamp_thread) { timestamp_thread->current_timestamp = (GObject *) ags_timestamp_new(); timestamp_thread->current_latency = (GObject *) ags_timestamp_new(); } void ags_timestamp_thread_connect(AgsConnectable *connectable) { AgsThread *thread; thread = AGS_THREAD(connectable); if((AGS_THREAD_CONNECTED & (g_atomic_int_get(&(thread->flags)))) != 0){ return; } /* call parent */ ags_timestamp_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_timestamp_thread_disconnect(AgsConnectable *connectable) { AgsThread *thread; thread = AGS_THREAD(connectable); if((AGS_THREAD_CONNECTED & (g_atomic_int_get(&(thread->flags)))) == 0){ return; } /* call parent */ ags_timestamp_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_timestamp_thread_finalize(GObject *gobject) { AgsTimestampThread *timestamp_thread; timestamp_thread = AGS_TIMESTAMP_THREAD(gobject); if(timestamp_thread->current_timestamp != NULL){ g_object_unref(timestamp_thread->current_timestamp); } if(timestamp_thread->current_latency != NULL){ g_object_unref(timestamp_thread->current_latency); } /* */ G_OBJECT_CLASS(ags_timestamp_thread_parent_class)->finalize(gobject); } void ags_timestamp_thread_run(AgsThread *thread) { AgsTimestampThread *timestamp_thread; //FIXME:JK: deprecated /* AgsDevout *devout; guint duration; time_t timer; timestamp_thread = AGS_TIMESTAMP_THREAD(thread); devout = AGS_DEVOUT(thread->devout); duration = (devout->tic_counter / (devout->frequency / devout->buffer_size) * AGS_MICROSECONDS_PER_SECOND); timer = time(&(AGS_TIMESTAMP(timestamp_thread->current_timestamp)->timer.unix_time.time_val)); AGS_TIMESTAMP(timestamp_thread->current_latency)->timer.unix_time.time_val = timer - duration; AGS_TIMESTAMP(timestamp_thread->timestamp)->timer.unix_time.time_val = duration; */ } AgsTimestampThread* ags_timestamp_thread_new() { AgsTimestampThread *timestamp_thread; timestamp_thread = (AgsTimestampThread *) g_object_new(AGS_TYPE_TIMESTAMP_THREAD, NULL); return(timestamp_thread); } gsequencer-1.4.24/ags/thread/ags_timestamp.c0000644000175000017500000000515213246707333015721 00000000000000/* 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 . */ #include void ags_timestamp_class_init(AgsTimestampClass *timestamp); void ags_timestamp_init (AgsTimestamp *timestamp); void ags_timestamp_finalize(GObject *gobject); /** * SECTION:ags_timestamp * @short_description: Timestamp unix and alike * @title: AgsTimestamp * @section_id: * @include: ags/thread/ags_timestamp.h * * #AgsTimestamp measure of time. */ static gpointer ags_timestamp_parent_class = NULL; GType ags_timestamp_get_type (void) { static GType ags_type_timestamp = 0; if(!ags_type_timestamp){ static const GTypeInfo ags_timestamp_info = { sizeof (AgsTimestampClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_timestamp_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTimestamp), 0, /* n_preallocs */ (GInstanceInitFunc) ags_timestamp_init, }; ags_type_timestamp = g_type_register_static(G_TYPE_OBJECT, "AgsTimestamp", &ags_timestamp_info, 0); } return (ags_type_timestamp); } void ags_timestamp_class_init(AgsTimestampClass *timestamp) { GObjectClass *gobject; ags_timestamp_parent_class = g_type_class_peek_parent(timestamp); /* GObjectClass */ gobject = (GObjectClass *) timestamp; gobject->finalize = ags_timestamp_finalize; } void ags_timestamp_init(AgsTimestamp *timestamp) { timestamp->flags = AGS_TIMESTAMP_UNIX; time(&(timestamp->timer.unix_time.time_val)); timestamp->delay = 0.0; timestamp->attack = 0; } void ags_timestamp_finalize(GObject *gobject) { /* empty */ } /** * ags_timestamp_new: * * Creates an #AgsTimestamp * * Returns: a new #AgsTimestamp * * Since: 1.0.0 */ AgsTimestamp* ags_timestamp_new() { AgsTimestamp *timestamp; timestamp = (AgsTimestamp *) g_object_new(AGS_TYPE_TIMESTAMP, NULL); return(timestamp); } gsequencer-1.4.24/ags/thread/ags_task_completion.h0000644000175000017500000000533113246707333017115 00000000000000/* 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 . */ #ifndef __AGS_TASK_COMPLETION_H__ #define __AGS_TASK_COMPLETION_H__ #include #include #define AGS_TYPE_TASK_COMPLETION (ags_task_completion_get_type()) #define AGS_TASK_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TASK_COMPLETION, AgsTaskCompletion)) #define AGS_TASK_COMPLETION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_TASK_COMPLETION, AgsTaskCompletionClass)) #define AGS_IS_TASK_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TASK_COMPLETION)) #define AGS_IS_TASK_COMPLETION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TASK_COMPLETION)) #define AGS_TASK_COMPLETION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_TASK_COMPLETION, AgsTaskCompletionClass)) typedef struct _AgsTaskCompletion AgsTaskCompletion; typedef struct _AgsTaskCompletionClass AgsTaskCompletionClass; /** * AgsTaskCompletionFlags: * @AGS_TASK_COMPLETION_QUEUED: the assigned task has been queued * @AGS_TASK_COMPLETION_BUSY: the assigned task is busy * @AGS_TASK_COMPLETION_READY: the assigned task is ready * @AGS_TASK_COMPLETION_COMPLETED: the assigned task has been completed * * Enum values to control the behavior or indicate internal state of #AgsTaskCompletion by * enable/disable as flags. */ typedef enum{ AGS_TASK_COMPLETION_QUEUED = 1, AGS_TASK_COMPLETION_BUSY = 1 << 1, AGS_TASK_COMPLETION_READY = 1 << 2, AGS_TASK_COMPLETION_COMPLETED = 1 << 3, }AgsTaskCompletionFlags; struct _AgsTaskCompletion { GObject gobject; volatile guint flags; GObject *task; gpointer data; }; struct _AgsTaskCompletionClass { GObjectClass gobject; void (*complete)(AgsTaskCompletion *task_completion); }; GType ags_task_completion_get_type(); void ags_task_completion_complete(AgsTaskCompletion *task_completion); AgsTaskCompletion* ags_task_completion_new(GObject *task, gpointer data); #endif /*__AGS_TASK_COMPLETION_H__*/ gsequencer-1.4.24/ags/thread/ags_task.h0000644000175000017500000000427613246707333014673 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_TASK_H__ #define __AGS_TASK_H__ #include #include #define AGS_TYPE_TASK (ags_task_get_type()) #define AGS_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TASK, AgsTask)) #define AGS_TASK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TASK, AgsTaskClass)) #define AGS_IS_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_TASK)) #define AGS_IS_TASK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_TASK)) #define AGS_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_TASK, AgsTaskClass)) typedef struct _AgsTask AgsTask; typedef struct _AgsTaskClass AgsTaskClass; /** * AgsTaskFlags: * @AGS_TASK_LOCKED: the task is locked * @AGS_TASK_CYCLIC: call task repeatedly * * Enum values to control the behavior or indicate internal state of #AgsTask by * enable/disable as flags. */ typedef enum{ AGS_TASK_LOCKED = 1, AGS_TASK_CYCLIC = 1 << 1, }AgsTaskFlags; struct _AgsTask { GObject object; guint flags; char *name; guint delay; pthread_cond_t wait_sync_task_cond; GObject *task_thread; }; struct _AgsTaskClass { GObjectClass object; void (*launch)(AgsTask *task); void (*failure)(AgsTask *task, GError *error); }; GType ags_task_get_type(); void ags_task_launch(AgsTask *task); void ags_task_failure(AgsTask *task, GError *error); AgsTask* ags_task_new(); #endif /*__AGS_TASK_H__*/ gsequencer-1.4.24/ags/thread/ags_thread_pool.h0000644000175000017500000000620113247044247016216 00000000000000/* 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 . */ #ifndef __AGS_THREAD_POOL_H__ #define __AGS_THREAD_POOL_H__ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_THREAD_POOL (ags_thread_pool_get_type()) #define AGS_THREAD_POOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_THREAD_POOL, AgsThreadPool)) #define AGS_THREAD_POOL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_THREAD_POOL, AgsThreadPoolClass)) #define AGS_IS_THREAD_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_THREAD_POOL)) #define AGS_IS_THREAD_POOL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_THREAD_POOL)) #define AGS_THREAD_POOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_THREAD_POOL, AgsThreadPoolClass)) #define AGS_THREAD_POOL_DEFAULT_MAX_UNUSED_THREADS 4 #define AGS_THREAD_POOL_DEFAULT_MAX_THREADS 1024 #ifndef AGS_THREAD_POOL_RT_PRIORITY #define AGS_THREAD_POOL_RT_PRIORITY (99) #endif typedef struct _AgsThreadPool AgsThreadPool; typedef struct _AgsThreadPoolClass AgsThreadPoolClass; /** * AgsThreadPoolFlags: * @AGS_THREAD_POOL_RUNNING: the thread pool is running * @AGS_THREAD_POOL_RT_SETUP: realtime setup has been performed * * Enum values to control the behavior or indicate internal state of #AgsThreadPool by * enable/disable as sync_flags. */ typedef enum{ AGS_THREAD_POOL_RUNNING = 1, AGS_THREAD_POOL_RT_SETUP = 1 << 1, }AgsThreadPoolFlags; struct _AgsThreadPool { GObject object; volatile guint flags; volatile guint max_unused_threads; volatile guint max_threads; pthread_t *thread; volatile guint queued; pthread_mutexattr_t *creation_mutexattr; pthread_mutex_t *creation_mutex; pthread_cond_t *creation_cond; volatile gboolean create_threads; volatile gboolean idle; pthread_mutex_t *idle_mutex; pthread_mutexattr_t *idle_mutexattr; pthread_cond_t *idle_cond; AgsThread *parent; volatile GList *returnable_thread; }; struct _AgsThreadPoolClass { GObjectClass object; void (*start)(AgsThreadPool *thread_pool); }; GType ags_thread_pool_get_type(); AgsThread* ags_thread_pool_pull(AgsThreadPool *thread_pool); void ags_thread_pool_start(AgsThreadPool *thread_pool); AgsThreadPool* ags_thread_pool_new(AgsThread *parent); #endif /*__AGS_THREAD_POOL_H__*/ gsequencer-1.4.24/ags/thread/ags_timestamp_factory.h0000644000175000017500000000476113246707333017462 00000000000000/* 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 . */ #ifndef __AGS_TIMESTAMP_FACTORY_H__ #define __AGS_TIMESTAMP_FACTORY_H__ #include #include #include #define AGS_TYPE_TIMESTAMP_FACTORY (ags_timestamp_factory_get_type()) #define AGS_TIMESTAMP_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TIMESTAMP_FACTORY, AgsTimestampFactory)) #define AGS_TIMESTAMP_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TIMESTAMP_FACTORY, AgsTimestampFactoryClass)) #define AGS_IS_TIMESTAMP_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TIMESTAMP_FACTORY)) #define AGS_IS_TIMESTAMP_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TIMESTAMP_FACTORY)) #define AGS_TIMESTAMP_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_TIMESTAMP_FACTORY, AgsTimestampFactoryClass)) typedef struct _AgsTimestampFactory AgsTimestampFactory; typedef struct _AgsTimestampFactoryClass AgsTimestampFactoryClass; typedef enum{ AGS_TIMESTAMP_FACTORY_UNIX = 1, AGS_TIMESTAMP_FACTORY_OFFSET = 1 << 1, }AgsTimestampFactoryFlags; struct _AgsTimestampFactory { GObject object; guint flags; time_t time_val; guint64 offset; }; struct _AgsTimestampFactoryClass { GObjectClass object; AgsTimestamp* (*create)(AgsTimestampFactory *timestamp_factory, AgsTimestamp *predecor); }; G_DEPRECATED GType ags_timestamp_factory_get_type(void); G_DEPRECATED AgsTimestamp* ags_timestamp_factory_create(AgsTimestampFactory *timestamp_factory, AgsTimestamp *predecor); /* */ G_DEPRECATED AgsTimestampFactory* ags_timestamp_factory_get_instance(); G_DEPRECATED AgsTimestampFactory* ags_timestamp_factory_new(); #endif /*__AGS_TIMESTAMP_FACTORY_H__*/ gsequencer-1.4.24/ags/thread/ags_thread_application_context.c0000644000175000017500000005044213246707333021316 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_thread_application_context_class_init(AgsThreadApplicationContextClass *thread_application_context); void ags_thread_application_context_connectable_interface_init(AgsConnectableInterface *connectable); void ags_thread_application_context_concurrency_provider_interface_init(AgsConcurrencyProviderInterface *concurrency_provider); void ags_thread_application_context_init(AgsThreadApplicationContext *thread_application_context); void ags_thread_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_thread_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_thread_application_context_connect(AgsConnectable *connectable); void ags_thread_application_context_disconnect(AgsConnectable *connectable); AgsThread* ags_thread_application_context_get_main_loop(AgsConcurrencyProvider *concurrency_provider); AgsThread* ags_thread_application_context_get_task_thread(AgsConcurrencyProvider *concurrency_provider); AgsThreadPool* ags_thread_application_context_get_thread_pool(AgsConcurrencyProvider *concurrency_provider); GList* ags_thread_application_context_get_worker(AgsConcurrencyProvider *concurrency_provider); void ags_thread_application_context_set_worker(AgsConcurrencyProvider *concurrency_provider, GList *worker); void ags_thread_application_context_finalize(GObject *gobject); void ags_thread_application_context_load_config(AgsApplicationContext *application_context); void ags_thread_application_context_read(AgsFile *file, xmlNode *node, GObject **application_context); xmlNode* ags_thread_application_context_write(AgsFile *file, xmlNode *parent, GObject *application_context); void ags_thread_application_context_set_value_callback(AgsConfig *config, gchar *group, gchar *key, gchar *value, AgsThreadApplicationContext *thread_application_context); /** * SECTION:ags_thread_application_context * @short_description: threaded application context * @title: AgsThreadApplicationContext * @section_id: * @include: ags/thread/ags_thread_application_context.h * * The #AgsThreadApplicationContext provides you multi-threaded functionality. */ enum{ PROP_0, PROP_AUTOSAVE_THREAD, PROP_THREAD_POOL, }; static gpointer ags_thread_application_context_parent_class = NULL; static AgsConnectableInterface* ags_thread_application_context_parent_connectable_interface; extern AgsApplicationContext *ags_application_context; GType ags_thread_application_context_get_type() { static GType ags_type_thread_application_context = 0; if(!ags_type_thread_application_context){ static const GTypeInfo ags_thread_application_context_info = { sizeof (AgsThreadApplicationContextClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_thread_application_context_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsThreadApplicationContext), 0, /* n_preallocs */ (GInstanceInitFunc) ags_thread_application_context_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_thread_application_context_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_concurrency_provider_interface_info = { (GInterfaceInitFunc) ags_thread_application_context_concurrency_provider_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_thread_application_context = g_type_register_static(AGS_TYPE_APPLICATION_CONTEXT, "AgsThreadApplicationContext", &ags_thread_application_context_info, 0); g_type_add_interface_static(ags_type_thread_application_context, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_thread_application_context, AGS_TYPE_CONCURRENCY_PROVIDER, &ags_concurrency_provider_interface_info); } return (ags_type_thread_application_context); } void ags_thread_application_context_class_init(AgsThreadApplicationContextClass *thread_application_context) { GObjectClass *gobject; AgsApplicationContextClass *application_context; GParamSpec *param_spec; ags_thread_application_context_parent_class = g_type_class_peek_parent(thread_application_context); /* GObjectClass */ gobject = (GObjectClass *) thread_application_context; gobject->set_property = ags_thread_application_context_set_property; gobject->get_property = ags_thread_application_context_get_property; gobject->finalize = ags_thread_application_context_finalize; /** * AgsThreadApplicationContext:autosave-thread: * * The assigned thread pool. * * Since: 1.0.0 */ param_spec = g_param_spec_object("autosave-thread", i18n_pspec("thread pool of thread application context"), i18n_pspec("The thread pool which this thread application context assigned to"), AGS_TYPE_AUTOSAVE_THREAD, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_THREAD_POOL, param_spec); /** * AgsThreadApplicationContext:thread-pool: * * The assigned thread pool. * * Since: 1.0.0 */ param_spec = g_param_spec_object("thread-pool", i18n_pspec("thread pool of thread application context"), i18n_pspec("The thread pool which this thread application context assigned to"), AGS_TYPE_THREAD_POOL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_THREAD_POOL, param_spec); /* AgsThreadApplicationContextClass */ application_context = (AgsApplicationContextClass *) thread_application_context; application_context->load_config = ags_thread_application_context_load_config; application_context->register_types = ags_thread_application_context_register_types; application_context->read = ags_thread_application_context_read; application_context->write = ags_thread_application_context_write; } void ags_thread_application_context_connectable_interface_init(AgsConnectableInterface *connectable) { ags_thread_application_context_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_thread_application_context_connect; connectable->disconnect = ags_thread_application_context_disconnect; } void ags_thread_application_context_concurrency_provider_interface_init(AgsConcurrencyProviderInterface *concurrency_provider) { concurrency_provider->get_main_loop = ags_thread_application_context_get_main_loop; concurrency_provider->get_task_thread = ags_thread_application_context_get_task_thread; concurrency_provider->get_thread_pool = ags_thread_application_context_get_thread_pool; concurrency_provider->get_worker = ags_thread_application_context_get_worker; concurrency_provider->set_worker = ags_thread_application_context_set_worker; } void ags_thread_application_context_init(AgsThreadApplicationContext *thread_application_context) { AgsGenericMainLoop *generic_main_loop; if(ags_application_context == NULL){ ags_application_context = thread_application_context; } thread_application_context->flags = 0; /* AgsGenericMainLoop */ generic_main_loop = (AgsGenericMainLoop *) ags_generic_main_loop_new((GObject *) thread_application_context); AGS_APPLICATION_CONTEXT(thread_application_context)->main_loop = (GObject *) generic_main_loop; g_object_set(thread_application_context, "main-loop", generic_main_loop, NULL); g_object_ref(generic_main_loop); ags_connectable_connect(AGS_CONNECTABLE(generic_main_loop)); /* AgsTaskThread */ AGS_APPLICATION_CONTEXT(thread_application_context)->task_thread = (GObject *) ags_task_thread_new(); ags_thread_add_child_extended(AGS_THREAD(generic_main_loop), AGS_THREAD(AGS_APPLICATION_CONTEXT(thread_application_context)->task_thread), TRUE, TRUE); ags_main_loop_set_async_queue(AGS_MAIN_LOOP(generic_main_loop), AGS_APPLICATION_CONTEXT(thread_application_context)->task_thread); /* AgsAutosaveThread */ thread_application_context->autosave_thread = NULL; /* AgsWorkerThread */ thread_application_context->worker = NULL; /* AgsThreadPool */ thread_application_context->thread_pool = AGS_TASK_THREAD(AGS_APPLICATION_CONTEXT(thread_application_context)->task_thread)->thread_pool; } void ags_thread_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsThreadApplicationContext *thread_application_context; thread_application_context = AGS_THREAD_APPLICATION_CONTEXT(gobject); switch(prop_id){ case PROP_AUTOSAVE_THREAD: { AgsAutosaveThread *autosave_thread; autosave_thread = (AgsAutosaveThread *) g_value_get_object(value); if(autosave_thread == (AgsAutosaveThread *) thread_application_context->autosave_thread) return; if(thread_application_context->autosave_thread != NULL){ g_object_unref(thread_application_context->autosave_thread); } if(autosave_thread != NULL){ g_object_ref(G_OBJECT(autosave_thread)); } thread_application_context->autosave_thread = (AgsThread *) autosave_thread; } break; case PROP_THREAD_POOL: { AgsThreadPool *thread_pool; thread_pool = (AgsThreadPool *) g_value_get_object(value); if(thread_pool == thread_application_context->thread_pool) return; if(thread_application_context->thread_pool != NULL) g_object_unref(thread_application_context->thread_pool); if(thread_pool != NULL) g_object_ref(G_OBJECT(thread_pool)); thread_application_context->thread_pool = thread_pool; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_thread_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsThreadApplicationContext *thread_application_context; thread_application_context = AGS_THREAD_APPLICATION_CONTEXT(gobject); switch(prop_id){ case PROP_AUTOSAVE_THREAD: { g_value_set_object(value, thread_application_context->autosave_thread); } break; case PROP_THREAD_POOL: { g_value_set_object(value, thread_application_context->thread_pool); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_thread_application_context_connect(AgsConnectable *connectable) { AgsThreadApplicationContext *thread_application_context; thread_application_context = AGS_THREAD_APPLICATION_CONTEXT(connectable); if((AGS_APPLICATION_CONTEXT_CONNECTED & (AGS_APPLICATION_CONTEXT(thread_application_context)->flags)) != 0){ return; } ags_thread_application_context_parent_connectable_interface->connect(connectable); ags_connectable_connect(AGS_CONNECTABLE(thread_application_context->autosave_thread)); ags_connectable_connect(AGS_CONNECTABLE(AGS_APPLICATION_CONTEXT(thread_application_context)->main_loop)); ags_connectable_connect(AGS_CONNECTABLE(thread_application_context->thread_pool)); } void ags_thread_application_context_disconnect(AgsConnectable *connectable) { AgsThreadApplicationContext *thread_application_context; thread_application_context = AGS_THREAD_APPLICATION_CONTEXT(connectable); if((AGS_APPLICATION_CONTEXT_CONNECTED & (AGS_APPLICATION_CONTEXT(thread_application_context)->flags)) == 0){ return; } ags_connectable_disconnect(AGS_CONNECTABLE(thread_application_context->autosave_thread)); ags_connectable_disconnect(AGS_CONNECTABLE(AGS_APPLICATION_CONTEXT(thread_application_context)->main_loop)); ags_connectable_disconnect(AGS_CONNECTABLE(thread_application_context->thread_pool)); ags_thread_application_context_parent_connectable_interface->disconnect(connectable); } AgsThread* ags_thread_application_context_get_main_loop(AgsConcurrencyProvider *concurrency_provider) { return((AgsThread *) AGS_APPLICATION_CONTEXT(concurrency_provider)->main_loop); } AgsThread* ags_thread_application_context_get_task_thread(AgsConcurrencyProvider *concurrency_provider) { return((AgsThread *) AGS_APPLICATION_CONTEXT(concurrency_provider)->task_thread); } AgsThreadPool* ags_thread_application_context_get_thread_pool(AgsConcurrencyProvider *concurrency_provider) { return((AgsThreadPool *) AGS_THREAD_APPLICATION_CONTEXT(concurrency_provider)->thread_pool); } GList* ags_thread_application_context_get_worker(AgsConcurrencyProvider *concurrency_provider) { return(AGS_THREAD_APPLICATION_CONTEXT(concurrency_provider)->worker); } void ags_thread_application_context_set_worker(AgsConcurrencyProvider *concurrency_provider, GList *worker) { AGS_THREAD_APPLICATION_CONTEXT(concurrency_provider)->worker = worker; } void ags_thread_application_context_finalize(GObject *gobject) { AgsThreadApplicationContext *thread_application_context; thread_application_context = AGS_THREAD_APPLICATION_CONTEXT(gobject); if(thread_application_context->autosave_thread != NULL){ g_object_unref(thread_application_context->autosave_thread); } if(thread_application_context->thread_pool != NULL){ g_object_unref(thread_application_context->thread_pool); } /* call parent */ G_OBJECT_CLASS(ags_thread_application_context_parent_class)->finalize(gobject); } void ags_thread_application_context_load_config(AgsApplicationContext *application_context) { AgsConfig *config; gchar *model; config = application_context->config; model = ags_config_get_value(config, AGS_CONFIG_THREAD, "model"); if(model != NULL){ if(!g_ascii_strncasecmp(model, "single-threaded", 16)){ //TODO:JK: implement me }else if(!g_ascii_strncasecmp(model, "multi-threaded", 15)){ //TODO:JK: implement me }else if(!g_ascii_strncasecmp(model, "super-threaded", 15)){ //TODO:JK: implement me } } } void ags_thread_application_context_register_types(AgsApplicationContext *application_context) { ags_thread_get_type(); ags_task_thread_get_type(); ags_timestamp_thread_get_type(); ags_thread_pool_get_type(); ags_returnable_thread_get_type(); } void ags_thread_application_context_read(AgsFile *file, xmlNode *node, GObject **application_context) { AgsThreadApplicationContext *gobject; GList *list; xmlNode *child; if(*application_context == NULL){ gobject = (AgsThreadApplicationContext *) g_object_new(AGS_TYPE_THREAD_APPLICATION_CONTEXT, NULL); *application_context = (GObject *) gobject; }else{ gobject = (AgsThreadApplicationContext *) *application_context; } file->application_context = (GObject *) gobject; g_object_set(G_OBJECT(file), "application-context", gobject, NULL); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* properties */ AGS_APPLICATION_CONTEXT(gobject)->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); AGS_APPLICATION_CONTEXT(gobject)->version = xmlGetProp(node, AGS_FILE_VERSION_PROP); AGS_APPLICATION_CONTEXT(gobject)->build_id = xmlGetProp(node, AGS_FILE_BUILD_ID_PROP); //TODO:JK: check version compatibelity /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-thread", child->name, 11)){ ags_file_read_thread(file, child, (AgsThread **) &(AGS_APPLICATION_CONTEXT(gobject)->main_loop)); }else if(!xmlStrncmp("ags-thread-pool", child->name, 16)){ ags_file_read_thread_pool(file, child, (AgsThreadPool **) &(gobject->thread_pool)); } } child = child->next; } //TODO:JK: decide about returnable thread } xmlNode* ags_thread_application_context_write(AgsFile *file, xmlNode *parent, GObject *application_context) { xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-application-context"); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", application_context, NULL)); xmlNewProp(node, AGS_FILE_CONTEXT_PROP, "thread"); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", ((~AGS_APPLICATION_CONTEXT_CONNECTED) & (AGS_APPLICATION_CONTEXT(application_context)->flags)))); xmlNewProp(node, AGS_FILE_VERSION_PROP, AGS_APPLICATION_CONTEXT(application_context)->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, AGS_APPLICATION_CONTEXT(application_context)->build_id); /* add to parent */ xmlAddChild(parent, node); /* child elements */ ags_file_write_thread(file, node, AGS_THREAD(AGS_APPLICATION_CONTEXT(application_context)->main_loop)); ags_file_write_thread_pool(file, node, AGS_THREAD_POOL(AGS_THREAD_APPLICATION_CONTEXT(application_context)->thread_pool)); return(node); } void ags_thread_application_context_set_value_callback(AgsConfig *config, gchar *group, gchar *key, gchar *value, AgsThreadApplicationContext *thread_application_context) { if(!g_ascii_strncasecmp(group, AGS_CONFIG_GENERIC, 8)){ if(!g_ascii_strncasecmp(key, "autosave-thread", 15)){ AgsAutosaveThread *autosave_thread; if(thread_application_context == NULL || thread_application_context->autosave_thread == NULL){ return; } autosave_thread = (AgsAutosaveThread *) thread_application_context->autosave_thread; if(!g_ascii_strncasecmp(value, "true", 5)){ ags_thread_start((AgsThread *) autosave_thread); }else{ ags_thread_stop((AgsThread *) autosave_thread); } } }else if(!g_ascii_strncasecmp(group, AGS_CONFIG_THREAD, 7)){ if(!g_ascii_strncasecmp(key, "model", 6)){ //TODO:JK: implement me }else if(!g_ascii_strncasecmp(key, "lock-global", 11)){ //TODO:JK: implement me }else if(!g_ascii_strncasecmp(key, "lock-parent", 11)){ //TODO:JK: implement me } } } AgsThreadApplicationContext* ags_thread_application_context_new() { AgsThreadApplicationContext *thread_application_context; thread_application_context = (AgsThreadApplicationContext *) g_object_new(AGS_TYPE_THREAD_APPLICATION_CONTEXT, NULL); return(thread_application_context); } gsequencer-1.4.24/ags/thread/ags_timestamp_factory.c0000644000175000017500000001134213256163135017443 00000000000000/* 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 . */ #include #include void ags_timestamp_factory_class_init(AgsTimestampFactoryClass *timestamp_factory); void ags_timestamp_factory_init (AgsTimestampFactory *timestamp_factory); void ags_timestamp_factory_finalize(GObject *gobject); AgsTimestamp* ags_timestamp_factory_real_create(AgsTimestampFactory *timestamp_factory, AgsTimestamp *predecor); /** * SECTION:ags_timestamp_factory * @short_description: Factory pattern * @title: AgsTimestampFactory * @section_id: * @include: ags/thread/ags_timestamp_factory.h * * #AgsTimestampFactory pattern. */ enum{ CREATE, LAST_SIGNAL, }; static gpointer ags_timestamp_factory_parent_class = NULL; static guint timestamp_factory_signals[LAST_SIGNAL]; static AgsTimestampFactory *ags_timestamp_factory = NULL; GType ags_timestamp_factory_get_type (void) { static GType ags_type_timestamp_factory = 0; if(!ags_type_timestamp_factory){ static const GTypeInfo ags_timestamp_factory_info = { sizeof (AgsTimestampFactoryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_timestamp_factory_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTimestampFactory), 0, /* n_preallocs */ (GInstanceInitFunc) ags_timestamp_factory_init, }; ags_type_timestamp_factory = g_type_register_static(G_TYPE_OBJECT, "AgsTimestampFactory\0", &ags_timestamp_factory_info, 0); } return (ags_type_timestamp_factory); } void ags_timestamp_factory_class_init(AgsTimestampFactoryClass *timestamp_factory) { GObjectClass *gobject; ags_timestamp_factory_parent_class = g_type_class_peek_parent(timestamp_factory); /* GObjectClass */ gobject = (GObjectClass *) timestamp_factory; gobject->finalize = ags_timestamp_factory_finalize; /* */ timestamp_factory->create = ags_timestamp_factory_real_create; timestamp_factory_signals[CREATE] = g_signal_new("create\0", G_TYPE_FROM_CLASS (timestamp_factory), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsTimestampFactoryClass, create), NULL, NULL, g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT, G_TYPE_OBJECT, 2, G_TYPE_OBJECT, G_TYPE_OBJECT); } void ags_timestamp_factory_init(AgsTimestampFactory *timestamp_factory) { timestamp_factory->flags = 0; } void ags_timestamp_factory_finalize(GObject *gobject) { //TODO:JK: implement me } AgsTimestamp* ags_timestamp_factory_real_create(AgsTimestampFactory *timestamp_factory, AgsTimestamp *predecor) { AgsTimestamp *timestamp; timestamp = ags_timestamp_new(); if(predecor != NULL){ //TODO:JK: implement me } return(timestamp); } /** * ags_timestamp_factory_create: * @timestamp_factory: the #AgsTimestampFactory * @predecor: the preceeding #AgsTimestamp * * * Since: 1.0.0 */ AgsTimestamp* ags_timestamp_factory_create(AgsTimestampFactory *timestamp_factory, AgsTimestamp *predecor) { AgsTimestamp *timestamp; g_return_val_if_fail(AGS_IS_TIMESTAMP_FACTORY(timestamp_factory), NULL); g_object_ref(G_OBJECT(timestamp_factory)); g_signal_emit(G_OBJECT(timestamp_factory), timestamp_factory_signals[CREATE], 0, predecor, ×tamp); g_object_unref(G_OBJECT(timestamp_factory)); g_object_unref(timestamp_factory); return(timestamp); } AgsTimestampFactory* ags_timestamp_factory_get_instance() { pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&(mutex)); if(ags_timestamp_factory == NULL){ ags_timestamp_factory = ags_timestamp_factory_new(); } pthread_mutex_unlock(&(mutex)); return(ags_timestamp_factory); } /** * ags_timestamp_factory_new: * * Creates an #AgsTimestampFactory * * Returns: a new #AgsTimestampFactory * * Since: 1.0.0 */ AgsTimestampFactory* ags_timestamp_factory_new() { AgsTimestampFactory *timestamp_factory; timestamp_factory = (AgsTimestampFactory *) g_object_new(AGS_TYPE_TIMESTAMP_FACTORY, NULL); return(timestamp_factory); } gsequencer-1.4.24/ags/thread/ags_task_completion.c0000644000175000017500000001324113246707333017107 00000000000000/* 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 . */ #include #include #include void ags_task_completion_class_init(AgsTaskCompletionClass *task_completion); void ags_task_completion_connectable_interface_init(AgsConnectableInterface *connectable); void ags_task_completion_init(AgsTaskCompletion *task_completion); void ags_task_completion_connect(AgsConnectable *connectable); void ags_task_completion_disconnect(AgsConnectable *connectable); void ags_task_completion_finalize(GObject *gobject); void ags_task_completion_launch_callback(AgsTask *task, AgsTaskCompletion *task_completion); /** * SECTION:ags_task_completion * @short_description: task completion * @title: AgsTaskCompletion * @section_id: * @include: ags/thread/ags_task_completion.h * * The #AgsTaskCompletion should be used to complete tasks from caller thread. */ enum{ COMPLETE, LAST_SIGNAL, }; static gpointer ags_task_completion_parent_class = NULL; static guint task_completion_signals[LAST_SIGNAL]; GType ags_task_completion_get_type() { static GType ags_type_task_completion = 0; if(!ags_type_task_completion){ static const GTypeInfo ags_task_completion_info = { sizeof (AgsTaskCompletionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_task_completion_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTaskCompletion), 0, /* n_preallocs */ (GInstanceInitFunc) ags_task_completion_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_task_completion_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_task_completion = g_type_register_static(G_TYPE_OBJECT, "AgsTaskCompletion", &ags_task_completion_info, 0); g_type_add_interface_static(ags_type_task_completion, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_task_completion); } void ags_task_completion_class_init(AgsTaskCompletionClass *task_completion) { GObjectClass *gobject; ags_task_completion_parent_class = g_type_class_peek_parent(task_completion); /* GObject */ gobject = (GObjectClass *) task_completion; gobject->finalize = ags_task_completion_finalize; /* AgsTaskClass */ task_completion->complete = NULL; /* signals */ /** * AgsTaskCompletion::complete: * @task_completion: the object to complete. * * The ::complete signal is emited as a task was finished */ task_completion_signals[COMPLETE] = g_signal_new("complete", G_TYPE_FROM_CLASS(task_completion), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsTaskCompletionClass, complete), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_task_completion_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_task_completion_connect; connectable->disconnect = ags_task_completion_disconnect; } void ags_task_completion_init(AgsTaskCompletion *task_completion) { g_atomic_int_set(&(task_completion->flags), 0); task_completion->task = NULL; task_completion->data = NULL; } void ags_task_completion_connect(AgsConnectable *connectable) { AgsTaskCompletion *task_completion; task_completion = AGS_TASK_COMPLETION(connectable); g_atomic_int_or(&(task_completion->flags), AGS_TASK_COMPLETION_QUEUED); g_signal_connect_after(task_completion->task, "launch", G_CALLBACK(ags_task_completion_launch_callback), task_completion); } void ags_task_completion_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_task_completion_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_task_completion_parent_class)->finalize(gobject); /* empty */ } void ags_task_completion_complete(AgsTaskCompletion *task_completion) { g_return_if_fail(AGS_IS_TASK_COMPLETION(task_completion)); g_object_ref(G_OBJECT(task_completion)); g_signal_emit(G_OBJECT(task_completion), task_completion_signals[COMPLETE], 0); g_object_unref(G_OBJECT(task_completion)); } void ags_task_completion_launch_callback(AgsTask *task, AgsTaskCompletion *task_completion) { g_atomic_int_and(&(task_completion->flags), (~(AGS_TASK_COMPLETION_QUEUED | AGS_TASK_COMPLETION_BUSY))); g_atomic_int_or(&(task_completion->flags), AGS_TASK_COMPLETION_READY); } /** * ags_task_completion_new: * @task: the #AgsTask * @data: pointer to user data * * Create a new #AgsTaskCompletion. * * Returns: the new #AgsTaskCompletion * * Since: 1.0.0 */ AgsTaskCompletion* ags_task_completion_new(GObject *task, gpointer data) { AgsTaskCompletion *task_completion; task_completion = (AgsTaskCompletion *) g_object_new(AGS_TYPE_TASK_COMPLETION, NULL); task_completion->task = task; g_object_ref(task); task_completion->data = data; return(task_completion); } gsequencer-1.4.24/ags/thread/ags_returnable_thread.h0000644000175000017500000000640213247044247017413 00000000000000/* 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 . */ #ifndef __AGS_RETURNABLE_THREAD_H__ #define __AGS_RETURNABLE_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_RETURNABLE_THREAD (ags_returnable_thread_get_type()) #define AGS_RETURNABLE_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RETURNABLE_THREAD, AgsReturnableThread)) #define AGS_RETURNABLE_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_RETURNABLE_THREAD, AgsReturnableThreadClass)) #define AGS_IS_RETURNABLE_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RETURNABLE_THREAD)) #define AGS_IS_RETURNABLE_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RETURNABLE_THREAD)) #define AGS_RETURNABLE_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_RETURNABLE_THREAD, AgsReturnableThreadClass)) #define AGS_RETURNABLE_THREAD_DEFAULT_JIFFIE (AGS_THREAD_DEFAULT_MAX_PRECISION) typedef struct _AgsReturnableThread AgsReturnableThread; typedef struct _AgsReturnableThreadClass AgsReturnableThreadClass; typedef void (*AgsReturnableThreadCallback)(AgsReturnableThread *returnable_thread, gpointer data); /** * AgsReturnableThreadFlags: * @AGS_RETURNABLE_THREAD_IN_USE: the thread is in use * @AGS_RETURNABLE_THREAD_RESET: not used * @AGS_RETURNABLE_THREAD_RUN_ONCE: call #AgsThread::run() only one time * * Enum values to control the behavior or indicate internal state of #AgsReturnableThread by * enable/disable as flags. */ typedef enum{ AGS_RETURNABLE_THREAD_IN_USE = 1, AGS_RETURNABLE_THREAD_RESET = 1 << 1, AGS_RETURNABLE_THREAD_RUN_ONCE = 1 << 2, }AgsReturnableThreadFlags; struct _AgsReturnableThread { AgsThread thread; volatile guint flags; GObject *thread_pool; pthread_mutex_t *reset_mutex; volatile void *safe_data; gulong handler; }; struct _AgsReturnableThreadClass { AgsThreadClass thread; void (*safe_run)(AgsReturnableThread *returnable_thread); }; GType ags_returnable_thread_get_type(); void ags_returnable_thread_safe_run(AgsReturnableThread *returnable_thread); void ags_returnable_thread_connect_safe_run(AgsReturnableThread *returnable_thread, AgsReturnableThreadCallback callback); void ags_returnable_thread_disconnect_safe_run(AgsReturnableThread *returnable_thread); AgsReturnableThread* ags_returnable_thread_new(GObject *thread_pool); #endif /*__AGS_RETURNABLE_THREAD_H__*/ gsequencer-1.4.24/ags/thread/ags_polling_thread.h0000644000175000017500000000613613246707333016721 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_POLLING_THREAD_H__ #define __AGS_POLLING_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #define AGS_TYPE_POLLING_THREAD (ags_polling_thread_get_type()) #define AGS_POLLING_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_POLLING_THREAD, AgsPollingThread)) #define AGS_POLLING_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_POLLING_THREAD, AgsPollingThreadClass)) #define AGS_IS_POLLING_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_POLLING_THREAD)) #define AGS_IS_POLLING_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_POLLING_THREAD)) #define AGS_POLLING_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_POLLING_THREAD, AgsPollingThreadClass)) #ifndef AGS_POLLING_THREAD_RT_PRIORITY #define AGS_POLLING_THREAD_RT_PRIORITY (95) #endif #define AGS_POLLING_THREAD_DEFAULT_JIFFIE (100.0) //NOTE:JK: take care of AGS_POLLING_THREAD_UNDERLOAD as exceeding AGS_THREAD_HERTZ_JIFFIE #define AGS_POLLING_THREAD_UNDERLOAD (4500) typedef struct _AgsPollingThread AgsPollingThread; typedef struct _AgsPollingThreadClass AgsPollingThreadClass; /** * AgsPollingThreadFlags: * @AGS_POLLING_THREAD_PERFORMANCE: not used * @AGS_POLLING_THREAD_OMIT: omit poll * * Enum values to control the behavior or indicate internal state of #AgsPollingThread by * enable/disable as flags. */ typedef enum{ AGS_POLLING_THREAD_PERFORMANCE = 1, AGS_POLLING_THREAD_OMIT = 1 << 1, }AgsPollingThreadFlags; struct _AgsPollingThread { AgsThread thread; volatile guint flags; volatile guint omit_count; pthread_mutexattr_t *fd_mutexattr; pthread_mutex_t *fd_mutex; struct pollfd *fds; GList *poll_fd; }; struct _AgsPollingThreadClass { AgsThreadClass thread; }; GType ags_polling_thread_get_type(); gint ags_polling_thread_fd_position(AgsPollingThread *polling_thread, int fd); void ags_polling_thread_add_poll_fd(AgsPollingThread *polling_thread, GObject *gobject); void ags_polling_thread_remove_poll_fd(AgsPollingThread *polling_thread, GObject *gobject); AgsPollingThread* ags_polling_thread_new(); #endif /*__AGS_POLLING_THREAD_H__*/ gsequencer-1.4.24/ags/thread/ags_task.c0000644000175000017500000001620313246707333014657 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include void ags_task_class_init(AgsTaskClass *task); void ags_task_connectable_interface_init(AgsConnectableInterface *connectable); void ags_task_init(AgsTask *task); void ags_task_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_task_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_task_connect(AgsConnectable *connectable); void ags_task_disconnect(AgsConnectable *connectable); void ags_task_finalize(GObject *gobject); /** * SECTION:ags_task * @short_description: Perform operations in a thread safe context. * @title: AgsTask * @section_id: * @include: ags/thread/ags_task.h * * #AgsTask object acts an interceptor in a thread safe context. */ enum{ PROP_0, PROP_TASK_THREAD, }; enum{ LAUNCH, FAILURE, LAST_SIGNAL, }; static gpointer ags_task_parent_class = NULL; static guint task_signals[LAST_SIGNAL]; GType ags_task_get_type() { static GType ags_type_task = 0; if(!ags_type_task){ static const GTypeInfo ags_task_info = { sizeof (AgsTaskClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_task_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTask), 0, /* n_preallocs */ (GInstanceInitFunc) ags_task_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_task_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_task = g_type_register_static(G_TYPE_OBJECT, "AgsTask", &ags_task_info, 0); g_type_add_interface_static(ags_type_task, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_task); } void ags_task_class_init(AgsTaskClass *task) { GObjectClass *gobject; GParamSpec *param_spec; ags_task_parent_class = g_type_class_peek_parent(task); /* GObjectClass */ gobject = (GObjectClass *) task; gobject->set_property = ags_task_set_property; gobject->get_property = ags_task_get_property; gobject->finalize = ags_task_finalize; /* properties */ /** * AgsTask:task-thread: * * The assigned #AgsTaskThread * * Since: 1.0.0 */ param_spec = g_param_spec_object("task-thread", i18n_pspec("the task thread object"), i18n_pspec("The task thread object"), AGS_TYPE_TASK_THREAD, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TASK_THREAD, param_spec); /* AgsTaskClass */ task->launch = NULL; task->failure = NULL; /* signals */ /** * AgsTask::launch: * @task: the #AgsTask to launch. * * The ::launch signal is emited in a thread safe context * * Since: 1.0.0 */ task_signals[LAUNCH] = g_signal_new("launch", G_TYPE_FROM_CLASS (task), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsTaskClass, launch), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsTask::failure: * @task: the #AgsTask failed to do its work. * @error: the #GError-struct * * The ::failure signal is emited if ::launch fails * * Since: 1.0.0 */ task_signals[FAILURE] = g_signal_new("failure", G_TYPE_FROM_CLASS (task), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsTaskClass, failure), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); } void ags_task_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_task_connect; connectable->disconnect = ags_task_disconnect; } void ags_task_init(AgsTask *task) { task->flags = 0; task->name = NULL; task->delay = 0; pthread_cond_init(&(task->wait_sync_task_cond), NULL); task->task_thread = NULL; } void ags_task_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsTask *task; task = AGS_TASK(gobject); switch(prop_id){ case PROP_TASK_THREAD: { AgsTaskThread *task_thread; task_thread = (AgsTaskThread *) g_value_get_object(value); if(task->task_thread == (GObject *) task_thread){ return; } if(task->task_thread != NULL){ g_object_unref(G_OBJECT(task->task_thread)); } if(task_thread != NULL){ g_object_ref(G_OBJECT(task_thread)); } task->task_thread = (GObject *) task_thread; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_task_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsTask *task; task = AGS_TASK(gobject); switch(prop_id){ case PROP_TASK_THREAD: { g_value_set_object(value, task->task_thread); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_task_connect(AgsConnectable *connectable) { /* empty */ } void ags_task_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_task_finalize(GObject *gobject) { AgsTask *task; task = AGS_TASK(gobject); if(task->name != NULL){ g_free(task->name); } pthread_cond_destroy(&(task->wait_sync_task_cond)); G_OBJECT_CLASS(ags_task_parent_class)->finalize(gobject); } /** * ags_task_launch: * @task: an #AgsTask * * Intercept task. * * Since: 1.0.0 */ void ags_task_launch(AgsTask *task) { g_return_if_fail(AGS_IS_TASK(task)); g_object_ref(G_OBJECT(task)); g_signal_emit(G_OBJECT(task), task_signals[LAUNCH], 0); g_object_unref(G_OBJECT(task)); } /** * ags_task_failure: * @task: an #AgsTask * @error: is %NULL on success * * Signals failure of task. * * Since: 1.0.0 */ void ags_task_failure(AgsTask *task, GError *error) { g_return_if_fail(AGS_IS_TASK(task)); g_object_ref(G_OBJECT(task)); g_signal_emit(G_OBJECT(task), task_signals[FAILURE], 0, error); g_object_unref(G_OBJECT(task)); } /** * ags_task_new: * * Creates a #AgsTask * * Returns: a new #AgsTask * * Since: 1.0.0 */ AgsTask* ags_task_new() { AgsTask *task; task = (AgsTask *) g_object_new(AGS_TYPE_TASK, NULL); return(task); } gsequencer-1.4.24/ags/thread/ags_concurrency_provider.c0000644000175000017500000001376113246707333020167 00000000000000/* 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 . */ #include #include void ags_concurrency_provider_class_init(AgsConcurrencyProviderInterface *interface); /** * SECTION:ags_concurrency_provider * @short_description: concurrency interface * @title: AgsConcurrencyProvider * @section_id: AgsConcurrencyProvider * @include: ags/thread/ags_concurrency_provider.h * * The #AgsConcurrencyProvider gives you unique access to threads. */ GType ags_concurrency_provider_get_type() { static GType ags_type_concurrency_provider = 0; if(!ags_type_concurrency_provider){ ags_type_concurrency_provider = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsConcurrencyProvider", sizeof(AgsConcurrencyProviderInterface), (GClassInitFunc) ags_concurrency_provider_class_init, 0, NULL, 0); } return(ags_type_concurrency_provider); } void ags_concurrency_provider_class_init(AgsConcurrencyProviderInterface *interface) { /* empty */ } /** * ags_concurrency_provider_get_mutex_manager: * @concurrency_provider: the #AgsConcurrencyProvider * * Get mutex manager of application context. * * Returns: the assigned #AgsMutexManager * * Since: 1.0.0 */ AgsMutexManager* ags_concurrency_provider_get_mutex_manager(AgsConcurrencyProvider *concurrency_provider) { AgsConcurrencyProviderInterface *concurrency_provider_interface; g_return_val_if_fail(AGS_IS_CONCURRENCY_PROVIDER(concurrency_provider), NULL); concurrency_provider_interface = AGS_CONCURRENCY_PROVIDER_GET_INTERFACE(concurrency_provider); g_return_val_if_fail(concurrency_provider_interface->get_mutex_manager, NULL); return(concurrency_provider_interface->get_mutex_manager(concurrency_provider)); } /** * ags_concurrency_provider_get_main_loop: * @concurrency_provider: the #AgsConcurrencyProvider * * Get main loop of application context. * * Returns: the #AgsThread implementing #AgsMainLoop interface * * Since: 1.0.0 */ AgsThread* ags_concurrency_provider_get_main_loop(AgsConcurrencyProvider *concurrency_provider) { AgsConcurrencyProviderInterface *concurrency_provider_interface; g_return_val_if_fail(AGS_IS_CONCURRENCY_PROVIDER(concurrency_provider), NULL); concurrency_provider_interface = AGS_CONCURRENCY_PROVIDER_GET_INTERFACE(concurrency_provider); g_return_val_if_fail(concurrency_provider_interface->get_main_loop, NULL); return(concurrency_provider_interface->get_main_loop(concurrency_provider)); } /** * ags_concurrency_provider_get_task_thread: * @concurrency_provider: the #AgsConcurrencyProvider * * Get task thread of application context. * * Returns: the #AgsThread implementing #AgsAsyncQueue interface * * Since: 1.0.0 */ AgsThread* ags_concurrency_provider_get_task_thread(AgsConcurrencyProvider *concurrency_provider) { AgsConcurrencyProviderInterface *concurrency_provider_interface; g_return_val_if_fail(AGS_IS_CONCURRENCY_PROVIDER(concurrency_provider), NULL); concurrency_provider_interface = AGS_CONCURRENCY_PROVIDER_GET_INTERFACE(concurrency_provider); g_return_val_if_fail(concurrency_provider_interface->get_task_thread, NULL); return(concurrency_provider_interface->get_task_thread(concurrency_provider)); } /** * ags_concurrency_provider_get_thread_pool: * @concurrency_provider: the #AgsConcurrencyProvider * * Get thread pool of application context. * * Returns: the #AgsThreadPool * * Since: 1.0.0 */ AgsThreadPool* ags_concurrency_provider_get_thread_pool(AgsConcurrencyProvider *concurrency_provider) { AgsConcurrencyProviderInterface *concurrency_provider_interface; g_return_val_if_fail(AGS_IS_CONCURRENCY_PROVIDER(concurrency_provider), NULL); concurrency_provider_interface = AGS_CONCURRENCY_PROVIDER_GET_INTERFACE(concurrency_provider); g_return_val_if_fail(concurrency_provider_interface->get_thread_pool, NULL); return(concurrency_provider_interface->get_thread_pool(concurrency_provider)); } /** * ags_concurrency_provider_get_worker: * @concurrency_provider: the #AgsConcurrencyProvider * * Get workers of application context. * * Returns: the #GList-struct containing workers * * Since: 1.0.0 */ GList* ags_concurrency_provider_get_worker(AgsConcurrencyProvider *concurrency_provider) { AgsConcurrencyProviderInterface *concurrency_provider_interface; g_return_val_if_fail(AGS_IS_CONCURRENCY_PROVIDER(concurrency_provider), NULL); concurrency_provider_interface = AGS_CONCURRENCY_PROVIDER_GET_INTERFACE(concurrency_provider); g_return_val_if_fail(concurrency_provider_interface->get_worker, NULL); return(concurrency_provider_interface->get_worker(concurrency_provider)); } /** * ags_concurrency_provider_set_worker: * @concurrency_provider: the #AgsConcurrencyProvider * @worker: the #GList-struct containing workers * * Set workers of application context. * * Since: 1.0.0 */ void ags_concurrency_provider_set_worker(AgsConcurrencyProvider *concurrency_provider, GList *worker) { AgsConcurrencyProviderInterface *concurrency_provider_interface; g_return_if_fail(AGS_IS_CONCURRENCY_PROVIDER(concurrency_provider)); concurrency_provider_interface = AGS_CONCURRENCY_PROVIDER_GET_INTERFACE(concurrency_provider); g_return_if_fail(concurrency_provider_interface->set_worker); concurrency_provider_interface->set_worker(concurrency_provider, worker); } gsequencer-1.4.24/ags/thread/ags_worker_thread.h0000644000175000017500000000564013247044247016564 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WORKER_THREAD_H__ #define __AGS_WORKER_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_WORKER_THREAD (ags_worker_thread_get_type()) #define AGS_WORKER_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WORKER_THREAD, AgsWorkerThread)) #define AGS_WORKER_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_WORKER_THREAD, AgsWorkerThreadClass)) #define AGS_IS_WORKER_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_WORKER_THREAD)) #define AGS_IS_WORKER_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_WORKER_THREAD)) #define AGS_WORKER_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_WORKER_THREAD, AgsWorkerThreadClass)) #define AGS_WORKER_THREAD_DEFAULT_JIFFIE (AGS_THREAD_DEFAULT_MAX_PRECISION) typedef struct _AgsWorkerThread AgsWorkerThread; typedef struct _AgsWorkerThreadClass AgsWorkerThreadClass; /** * AgsWorkerThreadFlags: * @AGS_WORKER_THREAD_RUNNING: the worker is running * @AGS_WORKER_THREAD_RUN_WAIT: sync wait * @AGS_WORKER_THREAD_RUN_DONE: sync done * @AGS_WORKER_THREAD_RUN_SYNC: do sync * * Enum values to control the behavior or indicate internal state of #AgsWorkerThread by * enable/disable as sync_flags. */ typedef enum{ AGS_WORKER_THREAD_RUNNING = 1, AGS_WORKER_THREAD_RUN_WAIT = 1 << 1, AGS_WORKER_THREAD_RUN_DONE = 1 << 2, AGS_WORKER_THREAD_RUN_SYNC = 1 << 3, }AgsWorkerThreadFlags; struct _AgsWorkerThread { AgsThread thread; volatile guint flags; pthread_mutex_t *run_mutex; pthread_mutexattr_t *run_mutexattr; pthread_cond_t *run_cond; pthread_t *worker_thread; pthread_attr_t *worker_thread_attr; }; struct _AgsWorkerThreadClass { AgsThreadClass thread; void (*do_poll)(AgsWorkerThread *worker_thread); }; GType ags_worker_thread_get_type(); void* ags_woker_thread_do_poll_loop(void *ptr); void ags_worker_thread_do_poll(AgsWorkerThread *worker_thread); AgsWorkerThread* ags_worker_thread_new(); #endif /*__AGS_WORKER_THREAD_H__*/ gsequencer-1.4.24/ags/thread/ags_worker_thread.c0000644000175000017500000002225713246707333016563 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_worker_thread_class_init(AgsWorkerThreadClass *worker_thread); void ags_worker_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_worker_thread_init(AgsWorkerThread *worker_thread); void ags_worker_thread_connect(AgsConnectable *connectable); void ags_worker_thread_disconnect(AgsConnectable *connectable); void ags_worker_thread_finalize(GObject *gobject); void ags_worker_thread_start(AgsThread *thread); void ags_worker_thread_run(AgsThread *thread); void ags_worker_thread_stop(AgsThread *thread); void* ags_woker_thread_do_poll_loop(void *ptr); /** * SECTION:ags_worker_thread * @short_description: worker thread * @title: AgsWorkerThread * @section_id: * @include: ags/thread/ags_worker_thread.h * * The #AgsWorkerThread does non-realtime work. You might want * to synchronize to the run signal within your ::do_poll() method. */ enum{ DO_POLL, LAST_SIGNAL, }; static gpointer ags_worker_thread_parent_class = NULL; static guint worker_thread_signals[LAST_SIGNAL]; GType ags_worker_thread_get_type() { static GType ags_type_worker_thread = 0; if(!ags_type_worker_thread){ static const GTypeInfo ags_worker_thread_info = { sizeof (AgsWorkerThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_worker_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsWorkerThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_worker_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_worker_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_worker_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsWorkerThread", &ags_worker_thread_info, 0); g_type_add_interface_static(ags_type_worker_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_worker_thread); } void ags_worker_thread_class_init(AgsWorkerThreadClass *worker_thread) { GObjectClass *gobject; AgsThreadClass *thread; ags_worker_thread_parent_class = g_type_class_peek_parent(worker_thread); /* GObject */ gobject = (GObjectClass *) worker_thread; gobject->finalize = ags_worker_thread_finalize; /* AgsThread */ thread = (AgsThreadClass *) worker_thread; thread->start = ags_worker_thread_start; thread->run = ags_worker_thread_run; thread->stop = ags_worker_thread_stop; /* AgsWorkerThread */ worker_thread->do_poll = NULL; /* signals */ /** * AgsWorkerThread::do-poll: * @thread: the #AgsWorkerThread * * The ::do_poll() signal runs independently of ::run() but * might be synchronized using a conditional lock. * * Since: 1.0.0.8 */ worker_thread_signals[DO_POLL] = g_signal_new("do-poll", G_TYPE_FROM_CLASS (thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsWorkerThreadClass, do_poll), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_worker_thread_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_worker_thread_connect; connectable->disconnect = ags_worker_thread_disconnect; } void ags_worker_thread_init(AgsWorkerThread *worker_thread) { AgsThread *thread; thread = (AgsThread *) worker_thread; thread->freq = AGS_WORKER_THREAD_DEFAULT_JIFFIE; g_atomic_int_set(&(worker_thread->flags), 0); /* synchronization */ worker_thread->run_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(worker_thread->run_mutexattr); pthread_mutexattr_settype(worker_thread->run_mutexattr, PTHREAD_MUTEX_RECURSIVE); worker_thread->run_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(worker_thread->run_mutex, worker_thread->run_mutexattr); worker_thread->run_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(worker_thread->run_cond, NULL); /* worker thread */ worker_thread->worker_thread = (pthread_t *) malloc(sizeof(pthread_t)); } void ags_worker_thread_connect(AgsConnectable *connectable) { /* empty */ } void ags_worker_thread_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_worker_thread_finalize(GObject *gobject) { AgsWorkerThread *worker_thread; gboolean running; gboolean do_exit; pthread_t *thread_ptr; pthread_attr_t *thread_attr; void *stackaddr; size_t stacksize; worker_thread = AGS_WORKER_THREAD(gobject); if(worker_thread == ags_thread_self()){ do_exit = TRUE; }else{ do_exit = FALSE; } thread_attr = worker_thread->worker_thread_attr; thread_ptr = worker_thread->worker_thread; running = ((AGS_WORKER_THREAD_RUNNING & (g_atomic_int_get(&(worker_thread->flags)))) != 0) ? TRUE: FALSE; /* */ pthread_attr_getstack(thread_attr, &stackaddr, &stacksize); /* run mutex and condition */ pthread_mutex_destroy(worker_thread->run_mutex); free(worker_thread->run_mutex); pthread_cond_destroy(worker_thread->run_cond); free(worker_thread->run_cond); /* call parent */ G_OBJECT_CLASS(ags_worker_thread_parent_class)->finalize(gobject); if(running){ pthread_detach(*thread_ptr); } pthread_attr_destroy(thread_attr); free(thread_attr); // free(*thread_ptr); free(thread_ptr); if(stackaddr != NULL){ free(stackaddr); } if(do_exit){ pthread_exit(NULL); } } void ags_worker_thread_start(AgsThread *thread) { AgsWorkerThread *worker_thread; worker_thread = AGS_WORKER_THREAD(thread); /* */ if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ AGS_THREAD_CLASS(ags_worker_thread_parent_class)->start(thread); } g_atomic_int_or(&(worker_thread->flags), AGS_WORKER_THREAD_RUNNING); pthread_create(worker_thread->worker_thread, worker_thread->worker_thread_attr, ags_woker_thread_do_poll_loop, worker_thread); } void ags_worker_thread_run(AgsThread *thread) { AgsWorkerThread *worker_thread; worker_thread = AGS_WORKER_THREAD(thread); /* synchronization point */ if((AGS_WORKER_THREAD_RUN_WAIT & (g_atomic_int_get(&(worker_thread->flags)))) != 0 && (AGS_WORKER_THREAD_RUN_DONE & (g_atomic_int_get(&(worker_thread->flags)))) == 0){ pthread_mutex_lock(worker_thread->run_mutex); g_atomic_int_or(&(worker_thread->flags), AGS_WORKER_THREAD_RUN_SYNC); while((AGS_WORKER_THREAD_RUN_WAIT & (g_atomic_int_get(&(worker_thread->flags)))) != 0 && (AGS_WORKER_THREAD_RUN_DONE & (g_atomic_int_get(&(worker_thread->flags)))) == 0){ pthread_cond_wait(worker_thread->run_cond, worker_thread->run_mutex); } g_atomic_int_and(&(worker_thread->flags), (~(AGS_WORKER_THREAD_RUN_WAIT | AGS_WORKER_THREAD_RUN_DONE))); pthread_mutex_unlock(worker_thread->run_mutex); } } void ags_worker_thread_stop(AgsThread *thread) { AgsWorkerThread *worker_thread; worker_thread = AGS_WORKER_THREAD(thread); g_atomic_int_and(&(worker_thread->flags), (~(AGS_WORKER_THREAD_RUNNING))); /* call parent */ AGS_THREAD_CLASS(ags_worker_thread_parent_class)->stop(thread); } /** * ags_woker_thread_do_poll_loop: * @ptr: the #AgsWorkerThread * * Do loop and invoke ags_worker_thread_do_poll() unless flag * AGS_WORKER_THREAD_RUNNING was unset. * * Since: 1.0.0.8 */ void* ags_woker_thread_do_poll_loop(void *ptr) { AgsWorkerThread *worker_thread; worker_thread = (AgsWorkerThread *) ptr; while((AGS_WORKER_THREAD_RUNNING & (g_atomic_int_get(&(worker_thread->flags)))) != 0){ ags_worker_thread_do_poll(worker_thread); } pthread_exit(NULL); } /** * ags_worker_thread_do_poll: * @worker_thread: the #AgsWorkerThread * * Do poll your work. It is called of the worker thread. * * Since: 1.0.0.8 */ void ags_worker_thread_do_poll(AgsWorkerThread *worker_thread) { g_return_if_fail(AGS_IS_WORKER_THREAD(worker_thread)); g_object_ref(worker_thread); g_signal_emit(worker_thread, worker_thread_signals[DO_POLL], 0); g_object_unref(worker_thread); } /** * ags_worker_thread_new: * * Create a new #AgsWorkerThread. * * Returns: the new #AgsWorkerThread * * Since: 1.0.0.8 */ AgsWorkerThread* ags_worker_thread_new() { AgsWorkerThread *worker_thread; worker_thread = (AgsWorkerThread *) g_object_new(AGS_TYPE_WORKER_THREAD, NULL); return(worker_thread); } gsequencer-1.4.24/ags/thread/ags_thread-posix.h0000644000175000017500000003100513256163135016323 00000000000000/* 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 . */ #ifndef __AGS_THREAD_H__ #define __AGS_THREAD_H__ #include #include #include #define _GNU_SOURCE #include #define _GNU_SOURCE #include #include #define AGS_TYPE_THREAD (ags_thread_get_type()) #define AGS_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_THREAD, AgsThread)) #define AGS_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_THREAD, AgsThreadClass)) #define AGS_IS_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_THREAD)) #define AGS_IS_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_THREAD)) #define AGS_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_THREAD, AgsThreadClass)) #define AGS_THREAD_RESUME_SIG SIGUSR2 #define AGS_THREAD_SUSPEND_SIG SIGUSR1 #ifndef AGS_RT_PRIORITY #define AGS_RT_PRIORITY (45) #endif #define AGS_THREAD_HERTZ_JIFFIE (1000.0) #define AGS_THREAD_YIELD_JIFFIE (2.0) #define AGS_THREAD_DEFAULT_JIFFIE (250.0) #define AGS_THREAD_DEFAULT_MAX_PRECISION (1000.0) #define AGS_THREAD_MAX_PRECISION (1000.0) #define AGS_THREAD_DEFAULT_ATTACK (1.0) #define AGS_THREAD_TOLERANCE (0.0) typedef struct _AgsThread AgsThread; typedef struct _AgsThreadClass AgsThreadClass; /** * AgsThreadFlags: * @AGS_THREAD_CONNECTED: the thread was connected by #AgsConnectable::connect() * @AGS_THREAD_SINGLE_LOOP: the thread doesn't actually run in its owns thread * @AGS_THREAD_INITIAL_SYNC: initial sync indicates the thread wasn't synced before * @AGS_THREAD_INITIAL_RUN: the first call to #AgsThread:run() * @AGS_THREAD_RT_SETUP: realtime setup was performed * @AGS_THREAD_WAITING: the thread is waiting * @AGS_THREAD_RUNNING: the thread is running * @AGS_THREAD_IDLE: the thread is in idle mode * @AGS_THREAD_LOCKED: the thread is locked * @AGS_THREAD_SUSPENDED: the thread is suspended * @AGS_THREAD_READY: the thread is ready * @AGS_THREAD_UNREF_ON_EXIT: call g_object_unref() before pthread_exit() * @AGS_THREAD_IS_CHAOS_TREE: the thread is not synced * @AGS_THREAD_IMMEDIATE_SYNC: do sync immediately * @AGS_THREAD_RECOVER_INTERRUPTED: check if thread was interrupted * @AGS_THREAD_RESUME_INTERRUPTED: call ags_thread_resume() if @AGS_THREAD_SUSPENDED is set * @AGS_THREAD_TIMING: do timing * @AGS_THREAD_INTERMEDIATE_PRE_SYNC: intermediate pre sync to parent thread * @AGS_THREAD_INTERMEDIATE_POST_SYNC: intermediate post sync to parent thread * * Enum values to control the behavior or indicate internal state of #AgsThread by * enable/disable as flags. */ typedef enum{ AGS_THREAD_CONNECTED = 1, AGS_THREAD_SINGLE_LOOP = 1 << 1, AGS_THREAD_INITIAL_SYNC = 1 << 2, AGS_THREAD_INITIAL_RUN = 1 << 3, AGS_THREAD_RT_SETUP = 1 << 4, AGS_THREAD_WAITING = 1 << 5, AGS_THREAD_RUNNING = 1 << 6, AGS_THREAD_IDLE = 1 << 7, AGS_THREAD_LOCKED = 1 << 8, AGS_THREAD_SUSPENDED = 1 << 9, AGS_THREAD_READY = 1 << 10, AGS_THREAD_UNREF_ON_EXIT = 1 << 11, AGS_THREAD_IS_CHAOS_TREE = 1 << 12, AGS_THREAD_IMMEDIATE_SYNC = 1 << 13, AGS_THREAD_RECOVER_INTERRUPTED = 1 << 14, AGS_THREAD_RESUME_INTERRUPTED = 1 << 15, AGS_THREAD_TIMING = 1 << 16, AGS_THREAD_INTERMEDIATE_PRE_SYNC = 1 << 17, AGS_THREAD_INTERMEDIATE_POST_SYNC = 1 << 18, }AgsThreadFlags; /** * AgsThreadSyncFlags: * @AGS_THREAD_WAIT_FOR_PARENT: wait for parent * @AGS_THREAD_WAIT_FOR_SIBLING: wait for sibling * @AGS_THREAD_WAIT_FOR_CHILDREN: wait for children * @AGS_THREAD_WAIT_FOR_BARRIER: wait for barrier * @AGS_THREAD_WAITING_FOR_PARENT: the thread is waiting for parent * @AGS_THREAD_WAITING_FOR_SIBLING: the thread is waiting for sibling * @AGS_THREAD_WAITING_FOR_CHILDREN: the thread is waiting for children * @AGS_THREAD_WAITING_FOR_BARRIER: the thread is waiting for barrier * @AGS_THREAD_BROADCAST_PARENT: broadcast parent * @AGS_THREAD_BROADCAST_SIBLING: broadcast sibling * @AGS_THREAD_BROADCAST_CHILDREN: broadcast children * @AGS_THREAD_TREE_SYNC_0: exclusively synced tic group * @AGS_THREAD_WAIT_0: wait tree to be synced * @AGS_THREAD_TREE_SYNC_1: exclusively synced tic group * @AGS_THREAD_WAIT_1: wait tree to be synced * @AGS_THREAD_TREE_SYNC_2: exclusively synced tic group * @AGS_THREAD_WAIT_2: wait tree to be synced * @AGS_THREAD_TIMELOCK_RUN: run timelock * @AGS_THREAD_TIMELOCK_WAIT: timelock wait * @AGS_THREAD_TIMELOCK_RESUME: timelock resume * @AGS_THREAD_SKIP_NON_GREEDY: skip non greedy * @AGS_THREAD_SKIPPED_BY_TIMELOCK: thread was skipped by timelock * @AGS_THREAD_LOCK_GREEDY_RUN_MUTEX: you shall lock run mutex of greedy locks * @AGS_THREAD_START_SYNCED_FREQ: sync frequency as starting thread * @AGS_THREAD_SYNCED_FREQ: the frequency was synced * @AGS_THREAD_INTERRUPTED: the thread is interrupted * @AGS_THREAD_MONITORING: the thread is monitoring interrupts * @AGS_THREAD_WAIT_ASYNC_QUEUE: wait exclusive async running queue * @AGS_THREAD_DONE_ASYNC_QUEUE: done exclusive async running queue * * Enum values to control the behavior or indicate internal state of #AgsThread by * enable/disable as sync_flags. */ typedef enum{ AGS_THREAD_WAIT_FOR_PARENT = 1, AGS_THREAD_WAIT_FOR_SIBLING = 1 << 1, AGS_THREAD_WAIT_FOR_CHILDREN = 1 << 2, AGS_THREAD_WAIT_FOR_BARRIER = 1 << 3, AGS_THREAD_WAITING_FOR_PARENT = 1 << 4, AGS_THREAD_WAITING_FOR_SIBLING = 1 << 5, AGS_THREAD_WAITING_FOR_CHILDREN = 1 << 6, AGS_THREAD_WAITING_FOR_BARRIER = 1 << 7, AGS_THREAD_BROADCAST_PARENT = 1 << 8, AGS_THREAD_BROADCAST_SIBLING = 1 << 9, AGS_THREAD_BROADCAST_CHILDREN = 1 << 10, AGS_THREAD_TREE_SYNC_0 = 1 << 11, AGS_THREAD_WAIT_0 = 1 << 12, AGS_THREAD_TREE_SYNC_1 = 1 << 13, AGS_THREAD_WAIT_1 = 1 << 14, AGS_THREAD_TREE_SYNC_2 = 1 << 15, AGS_THREAD_WAIT_2 = 1 << 16, AGS_THREAD_TIMELOCK_RUN = 1 << 17, AGS_THREAD_TIMELOCK_WAIT = 1 << 18, AGS_THREAD_TIMELOCK_RESUME = 1 << 19, /* * prefered way would be unlocking greedy_locks * and the suspend to not become greedy * but while pthread_suspend and pthread_resume * are missing you need this as work-around */ AGS_THREAD_SKIP_NON_GREEDY = 1 << 20, AGS_THREAD_SKIPPED_BY_TIMELOCK = 1 << 21, AGS_THREAD_LOCK_GREEDY_RUN_MUTEX = 1 << 22, AGS_THREAD_START_SYNCED_FREQ = 1 << 23, AGS_THREAD_SYNCED_FREQ = 1 << 24, AGS_THREAD_INTERRUPTED = 1 << 25, AGS_THREAD_MONITORING = 1 << 26, AGS_THREAD_WAIT_ASYNC_QUEUE = 1 << 27, AGS_THREAD_DONE_ASYNC_QUEUE = 1 << 28, }AgsThreadSyncFlags; struct _AgsThread { GObject object; volatile guint flags; volatile guint sync_flags; sigset_t wait_mask; pthread_mutex_t *obj_mutex; pthread_mutexattr_t *obj_mutexattr; pthread_mutex_t *obj_cond; pthread_mutexattr_t *obj_condattr; guint delay; guint tic_delay; guint current_tic; guint cycle_iteration; volatile guint time_late; struct timespec *computing_time; pthread_t *thread; pthread_attr_t *thread_attr; gdouble freq; gdouble max_precision; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; pthread_cond_t *cond; volatile GList *start_queue; pthread_mutex_t *start_mutex; pthread_cond_t *start_cond; volatile gboolean start_wait; volatile gboolean start_done; #ifndef __APPLE__ pthread_barrier_t **barrier; #else gpointer barrier; #endif gboolean first_barrier; int wait_count[2]; pthread_t *timelock_thread; pthread_mutex_t *timelock_mutex; pthread_cond_t *timelock_cond; pthread_mutex_t *greedy_mutex; pthread_cond_t *greedy_cond; pthread_mutex_t *greedy_run_mutex; volatile guint locked_greedy; struct timespec timelock; GList *greedy_locks; pthread_mutex_t *suspend_mutex; volatile gboolean critical_region; volatile gboolean timer_wait; volatile gboolean timer_expired; pthread_mutex_t *timer_mutex; pthread_cond_t *timer_cond; volatile AgsThread *parent; volatile AgsThread *next; volatile AgsThread *prev; volatile AgsThread *children; gpointer data; }; struct _AgsThreadClass { GObjectClass object; guint (*clock)(AgsThread *thread); void (*start)(AgsThread *thread); void (*run)(AgsThread *thread); void (*suspend)(AgsThread *thread); void (*resume)(AgsThread *thread); void (*timelock)(AgsThread *thread); void (*stop)(AgsThread *thread); guint (*interrupted)(AgsThread *thread, int sig, guint time_cycle, guint *time_spent); }; GType ags_thread_get_type(); void ags_thread_resume_handler(int sig); void ags_thread_suspend_handler(int sig); void ags_thread_set_sync(AgsThread *thread, guint tic); void ags_thread_set_sync_all(AgsThread *thread, guint tic); void ags_thread_reset_all(AgsThread *thread); void ags_thread_lock(AgsThread *thread); gboolean ags_thread_trylock(AgsThread *thread); void ags_thread_unlock(AgsThread *thread); AgsThread* ags_thread_get_toplevel(AgsThread *thread); AgsThread* ags_thread_first(AgsThread *thread); AgsThread* ags_thread_last(AgsThread *thread); void ags_thread_remove_child(AgsThread *thread, AgsThread *child); void ags_thread_add_child(AgsThread *thread, AgsThread *child); void ags_thread_add_child_extended(AgsThread *thread, AgsThread *child, gboolean no_start, gboolean no_wait); gboolean ags_thread_parental_is_locked(AgsThread *thread, AgsThread *parent); gboolean ags_thread_sibling_is_locked(AgsThread *thread); gboolean ags_thread_children_is_locked(AgsThread *thread); gboolean ags_thread_is_current_ready(AgsThread *current, guint tic); gboolean ags_thread_is_tree_ready(AgsThread *thread, guint tic); AgsThread* ags_thread_next_parent_locked(AgsThread *thread, AgsThread *parent); AgsThread* ags_thread_next_sibling_locked(AgsThread *thread); AgsThread* ags_thread_next_children_locked(AgsThread *thread); void ags_thread_lock_parent(AgsThread *thread, AgsThread *parent); void ags_thread_lock_sibling(AgsThread *thread); void ags_thread_lock_children(AgsThread *thread); void ags_thread_lock_all(AgsThread *thread); void ags_thread_unlock_parent(AgsThread *thread, AgsThread *parent); void ags_thread_unlock_sibling(AgsThread *thread); void ags_thread_unlock_children(AgsThread *thread); void ags_thread_unlock_all(AgsThread *thread); void ags_thread_wait_parent(AgsThread *thread, AgsThread *parent); void ags_thread_wait_sibling(AgsThread *thread); void ags_thread_wait_children(AgsThread *thread); void ags_thread_signal_parent(AgsThread *thread, AgsThread *parent, gboolean broadcast); void ags_thread_signal_sibling(AgsThread *thread, gboolean broadcast); void ags_thread_signal_children(AgsThread *thread, gboolean broadcast); guint ags_thread_clock(AgsThread *thread); void ags_thread_add_start_queue(AgsThread *thread, AgsThread *child); void ags_thread_add_start_queue_all(AgsThread *thread, GList *child); void ags_thread_start(AgsThread *thread); void ags_thread_run(AgsThread *thread); void ags_thread_suspend(AgsThread *thread); void ags_thread_resume(AgsThread *thread); void ags_thread_timelock(AgsThread *thread); void ags_thread_stop(AgsThread *thread); guint ags_thread_interrupted(AgsThread *thread, int sig, guint time_cycle, guint *time_spent); void ags_thread_hangcheck(AgsThread *thread); AgsThread* ags_thread_find_type(AgsThread *thread, GType type); AgsThread* ags_thread_self(void); AgsThread* ags_thread_chaos_tree(AgsThread *thread); gboolean ags_thread_is_chaos_tree(AgsThread *thread, guint tic_delay, gboolean is_chaos_tree); AgsThread* ags_thread_new(gpointer data); #endif /*__AGS_THREAD_H__*/ gsequencer-1.4.24/ags/thread/ags_thread_pool.c0000644000175000017500000004561713247044247016227 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_thread_pool_class_init(AgsThreadPoolClass *thread_pool); void ags_thread_pool_connectable_interface_init(AgsConnectableInterface *connectable); void ags_thread_pool_init(AgsThreadPool *thread_pool); void ags_thread_pool_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_thread_pool_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_thread_pool_connect(AgsConnectable *connectable); void ags_thread_pool_disconnect(AgsConnectable *connectable); void ags_thread_pool_finalize(GObject *gobject); void* ags_thread_pool_creation_thread(void *ptr); void ags_thread_pool_real_start(AgsThreadPool *thread_pool); /** * SECTION:ags_thread_pool * @short_description: thread pool * @title: AgsThreadPool * @section_id: * @include: ags/thread/ags_thread_pool.h * * The #AgsThreadPool acts as preinstantiated threads store. * This can achieve enormeous performance. */ enum{ PROP_0, PROP_MAX_UNUSED_THREADS, PROP_MAX_THREADS, }; enum{ START, LAST_SIGNAL, }; static gpointer ags_thread_pool_parent_class = NULL; static guint thread_pool_signals[LAST_SIGNAL]; GType ags_thread_pool_get_type() { static GType ags_type_thread_pool = 0; if(!ags_type_thread_pool){ static const GTypeInfo ags_thread_pool_info = { sizeof (AgsThreadPoolClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_thread_pool_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsThreadPool), 0, /* n_preallocs */ (GInstanceInitFunc) ags_thread_pool_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_thread_pool_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_thread_pool = g_type_register_static(G_TYPE_OBJECT, "AgsThreadPool", &ags_thread_pool_info, 0); g_type_add_interface_static(ags_type_thread_pool, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_thread_pool); } void ags_thread_pool_class_init(AgsThreadPoolClass *thread_pool) { GObjectClass *gobject; GParamSpec *param_spec; ags_thread_pool_parent_class = g_type_class_peek_parent(thread_pool); /* GObjectClass */ gobject = (GObjectClass *) thread_pool; gobject->set_property = ags_thread_pool_set_property; gobject->get_property = ags_thread_pool_get_property; gobject->finalize = ags_thread_pool_finalize; /* properties */ /** * AgsThreadPool:max-unused-threads: * * The maximum amount of unused threads available. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("max-unused-threads", i18n_pspec("maximum unused threads"), i18n_pspec("The maximum of unused threads"), 1, 65535, AGS_THREAD_POOL_DEFAULT_MAX_UNUSED_THREADS, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAX_UNUSED_THREADS, param_spec); /** * AgsThreadPool:max-threads: * * The maximum amount of threads available. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("max-threads", i18n_pspec("maximum threads to use"), i18n_pspec("The maximum of threads to be created"), 1, 65535, AGS_THREAD_POOL_DEFAULT_MAX_THREADS, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAX_THREADS, param_spec); /* AgsThreadPoolClass */ thread_pool->start = ags_thread_pool_real_start; /* signals */ /** * AgsThreadPool::start: * @thread_pool: the #AgsThreadPool * * The ::start() signal is invoked in order to started the pool. * * Since: 1.0.0 */ thread_pool_signals[START] = g_signal_new("start", G_TYPE_FROM_CLASS (thread_pool), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsThreadPoolClass, start), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_thread_pool_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_thread_pool_connect; connectable->disconnect = ags_thread_pool_disconnect; } void ags_thread_pool_init(AgsThreadPool *thread_pool) { AgsThread *thread; AgsConfig *config; GList *list; gchar *str; guint i; config = ags_config_get_instance(); g_atomic_int_set(&(thread_pool->flags), 0); /* max unused threads */ str = ags_config_get_value(config, AGS_CONFIG_THREAD, "thread-pool-max-unused-threads"); if(str != NULL){ g_atomic_int_set(&(thread_pool->max_unused_threads), g_ascii_strtoull(str, NULL, 10)); }else{ g_atomic_int_set(&(thread_pool->max_unused_threads), AGS_THREAD_POOL_DEFAULT_MAX_UNUSED_THREADS); } /* max threads */ str = ags_config_get_value(config, AGS_CONFIG_THREAD, "thread-pool-max-threads"); if(str != NULL){ g_atomic_int_set(&(thread_pool->max_threads), g_ascii_strtoull(str, NULL, 10)); }else{ g_atomic_int_set(&(thread_pool->max_threads), AGS_THREAD_POOL_DEFAULT_MAX_THREADS); } thread_pool->thread = (pthread_t *) malloc(sizeof(pthread_t)); /* creation mutex and condition */ g_atomic_int_set(&(thread_pool->queued), 0); thread_pool->creation_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(thread_pool->creation_mutexattr); pthread_mutexattr_settype(thread_pool->creation_mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(thread_pool->creation_mutexattr, PTHREAD_PRIO_INHERIT); #endif thread_pool->creation_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(thread_pool->creation_mutex, thread_pool->creation_mutexattr); thread_pool->creation_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(thread_pool->creation_cond, NULL); /* idle mutex and condition */ g_atomic_int_set(&(thread_pool->create_threads), FALSE); g_atomic_int_set(&(thread_pool->idle), FALSE); thread_pool->idle_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(thread_pool->idle_mutexattr); pthread_mutexattr_settype(thread_pool->idle_mutexattr, PTHREAD_MUTEX_RECURSIVE); thread_pool->idle_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(thread_pool->idle_mutex, thread_pool->idle_mutexattr); thread_pool->idle_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(thread_pool->idle_cond, NULL); /* returnable thread */ thread_pool->parent = NULL; list = NULL; for(i = 0; i < g_atomic_int_get(&(thread_pool->max_unused_threads)); i++){ thread = (AgsThread *) ags_returnable_thread_new((GObject *) thread_pool); g_object_ref(thread); list = g_list_prepend(list, thread); } g_atomic_pointer_set(&(thread_pool->returnable_thread), list); } void ags_thread_pool_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsThreadPool *thread_pool; thread_pool = AGS_THREAD_POOL(gobject); switch(prop_id){ case PROP_MAX_UNUSED_THREADS: { g_atomic_int_set(&(thread_pool->max_unused_threads), g_value_get_uint(value)); } break; case PROP_MAX_THREADS: { g_atomic_int_set(&(thread_pool->max_threads), g_value_get_uint(value)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_thread_pool_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsThreadPool *thread_pool; thread_pool = AGS_THREAD_POOL(gobject); switch(prop_id){ case PROP_MAX_UNUSED_THREADS: { g_value_set_uint(value, g_atomic_int_get(&(thread_pool->max_unused_threads))); } break; case PROP_MAX_THREADS: { g_value_set_uint(value, g_atomic_int_get(&(thread_pool->max_threads))); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_thread_pool_connect(AgsConnectable *connectable) { /* empty */ } void ags_thread_pool_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_thread_pool_finalize(GObject *gobject) { AgsThreadPool *thread_pool; thread_pool = AGS_THREAD_POOL(gobject); /* creation mutex and condition */ pthread_mutexattr_destroy(thread_pool->creation_mutexattr); free(thread_pool->creation_mutexattr); pthread_mutex_destroy(thread_pool->creation_mutex); free(thread_pool->creation_mutex); pthread_cond_destroy(thread_pool->creation_cond); free(thread_pool->creation_cond); /* idle mutex and condition */ pthread_mutexattr_destroy(thread_pool->idle_mutexattr); free(thread_pool->idle_mutexattr); pthread_mutex_destroy(thread_pool->idle_mutex); free(thread_pool->idle_mutex); pthread_cond_destroy(thread_pool->idle_cond); free(thread_pool->idle_cond); /* returnable thread */ g_list_free_full(g_atomic_pointer_get(&(thread_pool->returnable_thread)), g_object_unref); /* call parent */ G_OBJECT_CLASS(ags_thread_pool_parent_class)->finalize(gobject); } void* ags_thread_pool_creation_thread(void *ptr) { AgsThreadPool *thread_pool; AgsThread *returnable_thread; AgsMutexManager *mutex_manager; GList *start_queue; guint n_threads; guint i, i_stop; pthread_mutex_t *application_mutex; pthread_mutex_t *parent_mutex; thread_pool = AGS_THREAD_POOL(ptr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); parent_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) thread_pool->parent); pthread_mutex_unlock(application_mutex); /* real-time setup */ #ifdef AGS_WITH_RT if((AGS_THREAD_POOL_RT_SETUP & (g_atomic_int_get(&(thread_pool->flags)))) == 0){ struct sched_param param; /* Declare ourself as a real time task */ param.sched_priority = AGS_THREAD_POOL_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } g_atomic_int_or(&(thread_pool->flags), AGS_THREAD_POOL_RT_SETUP); } #endif #ifdef AGS_DEBUG g_message("ags_thread_pool_creation_thread"); #endif while((AGS_THREAD_POOL_RUNNING & (g_atomic_int_get(&(thread_pool->flags)))) != 0){ #ifdef AGS_DEBUG g_message("ags_thread_pool_creation_thread@loopStart"); #endif pthread_mutex_lock(thread_pool->idle_mutex); if(!g_atomic_int_get(&(thread_pool->create_threads))){ g_atomic_int_set(&(thread_pool->idle), TRUE); while(g_atomic_int_get(&(thread_pool->idle)) && !g_atomic_int_get(&(thread_pool->create_threads))){ pthread_cond_wait(thread_pool->idle_cond, thread_pool->idle_mutex); } } g_atomic_int_set(&(thread_pool->idle), FALSE); g_atomic_int_set(&(thread_pool->create_threads), FALSE); pthread_mutex_unlock(thread_pool->idle_mutex); pthread_mutex_lock(thread_pool->creation_mutex); n_threads = g_list_length(g_atomic_pointer_get(&(thread_pool->returnable_thread))); if(n_threads < g_atomic_int_get(&(thread_pool->max_threads)) && n_threads < g_atomic_int_get(&(thread_pool->max_unused_threads))){ i_stop = g_atomic_int_get(&(thread_pool->max_unused_threads)) - n_threads; }else{ i_stop = 0; } start_queue = NULL; for(i = 0; i < i_stop; i++){ guint val; returnable_thread = (AgsThread *) ags_returnable_thread_new((GObject *) thread_pool); g_object_ref(returnable_thread); ags_thread_add_child_extended(thread_pool->parent, returnable_thread, TRUE, TRUE); ags_connectable_connect(AGS_CONNECTABLE(returnable_thread)); ags_thread_start(returnable_thread); /* wait returnable_thread */ pthread_mutex_lock(returnable_thread->start_mutex); g_atomic_int_set(&(returnable_thread->start_wait), TRUE); if(g_atomic_int_get(&(returnable_thread->start_wait)) == TRUE && g_atomic_int_get(&(returnable_thread->start_done)) == FALSE){ while(g_atomic_int_get(&(returnable_thread->start_wait)) == TRUE && g_atomic_int_get(&(returnable_thread->start_done)) == FALSE){ pthread_cond_wait(returnable_thread->start_cond, returnable_thread->start_mutex); } } pthread_mutex_unlock(returnable_thread->start_mutex); // start_queue = g_list_prepend(start_queue, // returnable_thread); g_atomic_pointer_set(&(thread_pool->returnable_thread), g_list_prepend(g_atomic_pointer_get(&(thread_pool->returnable_thread)), returnable_thread)); } if(g_atomic_int_get(&(thread_pool->queued)) != 0){ pthread_cond_signal(thread_pool->creation_cond); } pthread_mutex_unlock(thread_pool->creation_mutex); if(thread_pool->parent != NULL){ pthread_mutex_lock(parent_mutex); if(start_queue != NULL){ if(g_atomic_pointer_get(&(thread_pool->parent->start_queue)) != NULL){ g_atomic_pointer_set(&(thread_pool->parent->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(thread_pool->parent->start_queue)))); }else{ g_atomic_pointer_set(&(thread_pool->parent->start_queue), start_queue); } } pthread_mutex_unlock(parent_mutex); } #ifdef AGS_DEBUG g_message("ags_thread_pool_creation_thread@loopEND"); #endif } return(NULL); } /** * ags_thread_pool_pull: * @thread_pool: the #AgsThreadPool * * Pull a previously instantiated #AgsReturnableThread. Note this * function may block until a new thread is available. * * Returns: a new #AgsThread * * Since: 1.0.0 */ AgsThread* ags_thread_pool_pull(AgsThreadPool *thread_pool) { AgsThread *returnable_thread; GList *list; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; if(!AGS_IS_THREAD_POOL(thread_pool)){ return(NULL); } returnable_thread = NULL; pthread_mutex_lock(&mutex); /* */ pthread_mutex_lock(thread_pool->creation_mutex); if(g_atomic_pointer_get(&(thread_pool->returnable_thread)) == NULL){ g_atomic_int_inc(&(thread_pool->queued)); while(g_atomic_int_get(&(thread_pool->queued)) != 0 && g_atomic_pointer_get(&(thread_pool->returnable_thread)) == NULL){ pthread_cond_wait(thread_pool->creation_cond, thread_pool->creation_mutex); } } list = g_list_last(g_atomic_pointer_get(&(thread_pool->returnable_thread))); returnable_thread = list->data; g_atomic_pointer_set(&(thread_pool->returnable_thread), g_list_remove(g_atomic_pointer_get(&(thread_pool->returnable_thread)), returnable_thread)); g_atomic_int_dec_and_test(&(thread_pool->queued)); pthread_mutex_unlock(thread_pool->creation_mutex); pthread_mutex_unlock(&mutex); /* signal create threads */ pthread_mutex_lock(thread_pool->idle_mutex); g_atomic_int_set(&(thread_pool->create_threads), TRUE); if(g_atomic_int_get(&(thread_pool->idle))){ pthread_cond_signal(thread_pool->idle_cond); } pthread_mutex_unlock(thread_pool->idle_mutex); return(AGS_THREAD(returnable_thread)); } void ags_thread_pool_real_start(AgsThreadPool *thread_pool) { AgsMutexManager *mutex_manager; GList *list; GList *start_queue; gint n_threads; gint i; pthread_mutex_t *application_mutex; pthread_mutex_t *parent_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get parent mutex */ if(thread_pool->parent != NULL){ pthread_mutex_lock(application_mutex); parent_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) thread_pool->parent); pthread_mutex_unlock(application_mutex); }else{ parent_mutex = NULL; } /* set running */ g_atomic_int_or(&(thread_pool->flags), AGS_THREAD_POOL_RUNNING); pthread_create(thread_pool->thread, NULL, &(ags_thread_pool_creation_thread), thread_pool); list = g_atomic_pointer_get(&(thread_pool->returnable_thread)); start_queue = NULL; while(list != NULL){ if(thread_pool->parent != NULL){ ags_thread_add_child_extended(AGS_THREAD(thread_pool->parent), AGS_THREAD(list->data), TRUE, TRUE); }else{ ags_thread_start(list->data); } ags_connectable_connect(AGS_CONNECTABLE(list->data)); // ags_thread_start(AGS_THREAD(list->data)); start_queue = g_list_prepend(start_queue, list->data); list = list->next; } if(parent_mutex != NULL){ pthread_mutex_lock(parent_mutex); if(start_queue != NULL){ if(g_atomic_pointer_get(&(thread_pool->parent->start_queue)) != NULL){ g_atomic_pointer_set(&(thread_pool->parent->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(thread_pool->parent->start_queue)))); }else{ g_atomic_pointer_set(&(thread_pool->parent->start_queue), start_queue); } } pthread_mutex_unlock(parent_mutex); } } /** * ags_thread_pool_start: * @thread_pool: the #AgsThreadPool * * Start the thread pool. * * Since: 1.0.0 */ void ags_thread_pool_start(AgsThreadPool *thread_pool) { g_return_if_fail(AGS_IS_THREAD_POOL(thread_pool)); g_object_ref(G_OBJECT(thread_pool)); g_signal_emit(G_OBJECT(thread_pool), thread_pool_signals[START], 0); g_object_unref(G_OBJECT(thread_pool)); } /** * ags_thread_pool_new: * @parent: the parent #AgsThread of returnable threads * * Create a new #AgsThreadPool. * * Returns: the new #AgsThreadPool * * Since: 1.0.0 */ AgsThreadPool* ags_thread_pool_new(AgsThread *parent) { AgsThreadPool *thread_pool; thread_pool = (AgsThreadPool *) g_object_new(AGS_TYPE_THREAD_POOL, NULL); thread_pool->parent = parent; return(thread_pool); } gsequencer-1.4.24/ags/thread/ags_message_delivery.h0000644000175000017500000000607113247044247017252 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MESSAGE_DELIVERY_H__ #define __AGS_MESSAGE_DELIVERY_H__ #include #include #include #include #define AGS_TYPE_MESSAGE_DELIVERY (ags_message_delivery_get_type()) #define AGS_MESSAGE_DELIVERY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MESSAGE_DELIVERY, AgsMessageDelivery)) #define AGS_MESSAGE_DELIVERY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_MESSAGE_DELIVERY, AgsMessageDelivery)) #define AGS_IS_MESSAGE_DELIVERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MESSAGE_DELIVERY)) #define AGS_IS_MESSAGE_DELIVERY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MESSAGE_DELIVERY)) #define AGS_MESSAGE_DELIVERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_MESSAGE_DELIVERY, AgsMessageDeliveryClass)) typedef struct _AgsMessageDelivery AgsMessageDelivery; typedef struct _AgsMessageDeliveryClass AgsMessageDeliveryClass; struct _AgsMessageDelivery { GObject gobject; pthread_mutexattr_t *mutexattr; pthread_mutex_t *mutex; GList *message_queue; }; struct _AgsMessageDeliveryClass { GObjectClass gobject; }; GType ags_message_delivery_get_type(); void ags_message_delivery_add_queue(AgsMessageDelivery *message_delivery, GObject *message_queue); void ags_message_delivery_remove_queue(AgsMessageDelivery *message_delivery, GObject *message_queue); GObject* ags_message_delivery_find_namespace(AgsMessageDelivery *message_delivery, gchar *namespace); void ags_message_delivery_add_message(AgsMessageDelivery *message_delivery, gchar *namespace, gpointer message); void ags_message_delivery_remove_message(AgsMessageDelivery *message_delivery, gchar *namespace, gpointer message); GList* ags_message_delivery_find_sender(AgsMessageDelivery *message_delivery, gchar *namespace, GObject *sender); GList* ags_message_delivery_find_recipient(AgsMessageDelivery *message_delivery, gchar *namespace, GObject *recipient); GList* ags_message_delivery_query_message(AgsMessageDelivery *message_delivery, gchar *namespace, gchar *xpath); AgsMessageDelivery* ags_message_delivery_get_instance(); AgsMessageDelivery* ags_message_delivery_new(); #endif /*__AGS_MESSAGE_DELIVERY_H__*/ gsequencer-1.4.24/ags/thread/ags_condition_manager.c0000644000175000017500000001531313246707333017376 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_condition_manager_class_init(AgsConditionManagerClass *condition_manager); void ags_condition_manager_connectable_interface_init(AgsConnectableInterface *connectable); void ags_condition_manager_init(AgsConditionManager *condition_manager); void ags_condition_manager_connect(AgsConnectable *connectable); void ags_condition_manager_disconnect(AgsConnectable *connectable); void ags_condition_manager_finalize(GObject *gobject); void ags_condition_manager_destroy_data(gpointer data); /** * SECTION:ags_condition_manager * @short_description: condition manager * @title: AgsConditionManager * @section_id: * @include: ags/thread/ags_condition_manager.h * * The #AgsConditionManager keeps your condition in a hash table where you can lookup your * conditions. */ static gpointer ags_condition_manager_parent_class = NULL; AgsConditionManager *ags_condition_manager = NULL; GType ags_condition_manager_get_type() { static GType ags_type_condition_manager = 0; if(!ags_type_condition_manager){ const GTypeInfo ags_condition_manager_info = { sizeof (AgsConditionManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_condition_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsConditionManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_condition_manager_init, }; const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_condition_manager_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_condition_manager = g_type_register_static(G_TYPE_OBJECT, "AgsConditionManager", &ags_condition_manager_info, 0); g_type_add_interface_static(ags_type_condition_manager, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_condition_manager); } void ags_condition_manager_class_init(AgsConditionManagerClass *condition_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_condition_manager_parent_class = g_type_class_peek_parent(condition_manager); /* GObject */ gobject = (GObjectClass *) condition_manager; gobject->finalize = ags_condition_manager_finalize; } void ags_condition_manager_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_condition_manager_connect; connectable->disconnect = ags_condition_manager_disconnect; } void ags_condition_manager_init(AgsConditionManager *condition_manager) { condition_manager->lock_object = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) ags_condition_manager_destroy_data); } void ags_condition_manager_connect(AgsConnectable *connectable) { /* empty */ } void ags_condition_manager_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_condition_manager_finalize(GObject *gobject) { AgsConditionManager *condition_manager; condition_manager = AGS_CONDITION_MANAGER(gobject); g_hash_table_destroy(condition_manager->lock_object); if(condition_manager == ags_condition_manager){ ags_condition_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_condition_manager_parent_class)->finalize(gobject); } void ags_condition_manager_destroy_data(gpointer data) { pthread_cond_destroy((pthread_cond_t *) data); } /** * ags_condition_manager_insert: * @condition_manager: the #AgsConditionManager * @lock_object: the object as key * @cond: the condition to insert * * Inserts a condition into hash map associated with @lock_object. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0.8 */ gboolean ags_condition_manager_insert(AgsConditionManager *condition_manager, GObject *lock_object, pthread_cond_t *cond) { if(condition_manager == NULL || lock_object == NULL || cond == NULL){ return(FALSE); } g_hash_table_insert(condition_manager->lock_object, lock_object, cond); return(TRUE); } /** * ags_condition_manager_remove: * @condition_manager: the #AgsConditionManager * @lock_object: the object to remove * * Removes a lock associated with @lock_object.3 * * Returns: %TRUE as successfully removed, otherwise %FALSE * * Since: 1.0.0.8 */ gboolean ags_condition_manager_remove(AgsConditionManager *condition_manager, GObject *lock_object) { pthread_cond_t *cond; cond = g_hash_table_lookup(condition_manager->lock_object, lock_object); if(cond == NULL){ return(FALSE); } g_hash_table_remove(condition_manager->lock_object, lock_object); free(cond); return(TRUE); } /** * ags_condition_manager_lookup: * @condition_manager: the #AgsConditionManager * @lock_object: the object to lookup * * Lookup a condition associated with @lock_object in @condition_manager * * Returns: the condition on success, else %NULL * * Since: 1.0.0.8 */ pthread_cond_t* ags_condition_manager_lookup(AgsConditionManager *condition_manager, GObject *lock_object) { pthread_cond_t *cond; cond = (pthread_cond_t *) g_hash_table_lookup(condition_manager->lock_object, lock_object); return(cond); } /** * ags_condition_manager_get_instance: * * Singleton function to optain the condition manager instance. * * Returns: an instance of #AgsConditionManager * * Since: 1.0.0.8 */ AgsConditionManager* ags_condition_manager_get_instance() { if(ags_condition_manager == NULL){ ags_condition_manager = ags_condition_manager_new(); } return(ags_condition_manager); } /** * ags_condition_manager_new: * * Instantiate a condition manager. * * Returns: a new #AgsConditionManager * * Since: 1.0.0.8 */ AgsConditionManager* ags_condition_manager_new() { AgsConditionManager *condition_manager; condition_manager = (AgsConditionManager *) g_object_new(AGS_TYPE_CONDITION_MANAGER, NULL); return(condition_manager); } gsequencer-1.4.24/ags/thread/ags_returnable_thread.c0000644000175000017500000002755413246707333017422 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_returnable_thread_class_init(AgsReturnableThreadClass *returnable_thread); void ags_returnable_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_returnable_thread_init(AgsReturnableThread *returnable_thread); void ags_returnable_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_returnable_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_returnable_thread_connect(AgsConnectable *connectable); void ags_returnable_thread_disconnect(AgsConnectable *connectable); void ags_returnable_thread_dispose(GObject *gobject); void ags_returnable_thread_finalize(GObject *gobject); void ags_returnable_thread_start(AgsThread *thread); void ags_returnable_thread_run(AgsThread *thread); void ags_returnable_thread_stop(AgsThread *thread); void ags_returnable_thread_resume(AgsThread *thread); /** * SECTION:ags_returnable_thread * @short_description: returnable thread * @title: AgsReturnableThread * @section_id: * @include: ags/thread/ags_returnable_thread.h * * The #AgsReturnableThread acts as thread. It should return after a short * while because of limited thread pool. */ enum{ PROP_0, PROP_THREAD_POOL, }; enum{ SAFE_RUN, LAST_SIGNAL, }; static gpointer ags_returnable_thread_parent_class = NULL; static AgsConnectableInterface *ags_returnable_thread_parent_connectable_interface; static guint returnable_thread_signals[LAST_SIGNAL]; GType ags_returnable_thread_get_type() { static GType ags_type_returnable_thread = 0; if(!ags_type_returnable_thread){ static const GTypeInfo ags_returnable_thread_info = { sizeof (AgsReturnableThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_returnable_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsReturnableThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_returnable_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_returnable_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_returnable_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsReturnableThread", &ags_returnable_thread_info, 0); g_type_add_interface_static(ags_type_returnable_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_returnable_thread); } void ags_returnable_thread_class_init(AgsReturnableThreadClass *returnable_thread) { AgsThreadClass *thread; GObjectClass *gobject; GParamSpec *param_spec; ags_returnable_thread_parent_class = g_type_class_peek_parent(returnable_thread); /* GObjectClass */ gobject = (GObjectClass *) returnable_thread; gobject->set_property = ags_returnable_thread_set_property; gobject->get_property = ags_returnable_thread_get_property; gobject->dispose = ags_returnable_thread_dispose; gobject->finalize = ags_returnable_thread_finalize; /* properties */ /** * AgsReturnableThread:thread-pool: * * The assigned #AgsThreadPool providing default settings. * * Since: 1.0.0 */ param_spec = g_param_spec_object("thread-pool", i18n_pspec("assigned thread pool"), i18n_pspec("The thread pool it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_THREAD_POOL, param_spec); /* AgsThreadClass */ thread = (AgsThreadClass *) returnable_thread; thread->start = ags_returnable_thread_start; thread->run = ags_returnable_thread_run; thread->stop = ags_returnable_thread_stop; thread->resume = ags_returnable_thread_resume; /* AgsReturnableThreadClass */ returnable_thread->safe_run = NULL; /* signals */ /** * AgsReturnableThread::safe-run: * @returnable_thread: the #AgsReturnableThread * * The ::safe-run is invoked durin AgsThread::run as * a context safe wrapper. * * Since: 1.0.0 */ returnable_thread_signals[SAFE_RUN] = g_signal_new("safe-run", G_TYPE_FROM_CLASS (returnable_thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsReturnableThreadClass, safe_run), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_returnable_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_returnable_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_returnable_thread_connect; connectable->disconnect = ags_returnable_thread_disconnect; } void ags_returnable_thread_init(AgsReturnableThread *returnable_thread) { AgsThread *thread; thread = AGS_THREAD(returnable_thread); g_atomic_int_or(&(thread->flags), AGS_THREAD_UNREF_ON_EXIT); thread->freq = AGS_RETURNABLE_THREAD_DEFAULT_JIFFIE; g_atomic_int_set(&(returnable_thread->flags), AGS_RETURNABLE_THREAD_RUN_ONCE); returnable_thread->thread_pool = NULL; returnable_thread->reset_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(returnable_thread->reset_mutex, NULL); g_atomic_pointer_set(&(returnable_thread->safe_data), NULL); returnable_thread->handler = 0; } void ags_returnable_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsReturnableThread *returnable_thread; returnable_thread = AGS_RETURNABLE_THREAD(gobject); switch(prop_id){ case PROP_THREAD_POOL: { GObject *thread_pool; thread_pool = g_value_get_object(value); if(returnable_thread->thread_pool == thread_pool) return; if(returnable_thread->thread_pool != NULL){ g_object_unref(returnable_thread->thread_pool); } if(thread_pool != NULL){ g_object_ref(thread_pool); } returnable_thread->thread_pool = thread_pool; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_returnable_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsReturnableThread *returnable_thread; returnable_thread = AGS_RETURNABLE_THREAD(gobject); switch(prop_id){ case PROP_THREAD_POOL: { g_value_set_object(value, returnable_thread->thread_pool); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_returnable_thread_connect(AgsConnectable *connectable) { ags_returnable_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_returnable_thread_disconnect(AgsConnectable *connectable) { ags_returnable_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_returnable_thread_dispose(GObject *gobject) { AgsReturnableThread *returnable_thread; returnable_thread = (AgsReturnableThread *) gobject; /* thread pool */ if(returnable_thread->thread_pool != NULL){ g_object_unref(returnable_thread->thread_pool); returnable_thread->thread_pool = NULL; } /* call parent */ G_OBJECT_CLASS(ags_returnable_thread_parent_class)->dispose(gobject); } void ags_returnable_thread_finalize(GObject *gobject) { AgsReturnableThread *returnable_thread; returnable_thread = (AgsReturnableThread *) gobject; /* thread pool */ if(returnable_thread->thread_pool != NULL){ g_object_unref(returnable_thread->thread_pool); } /* reset mutex */ pthread_mutex_destroy(AGS_RETURNABLE_THREAD(gobject)->reset_mutex); free(AGS_RETURNABLE_THREAD(gobject)->reset_mutex); /* call parent */ G_OBJECT_CLASS(ags_returnable_thread_parent_class)->finalize(gobject); } void ags_returnable_thread_start(AgsThread *thread) { AGS_THREAD_CLASS(ags_returnable_thread_parent_class)->start(thread); } void ags_returnable_thread_run(AgsThread *thread) { AgsReturnableThread *returnable_thread; AgsTaskThread *task_thread; GList *tmplist; gboolean unref_thread; // g_message("reset:0"); /* retrieve some variables */ returnable_thread = AGS_RETURNABLE_THREAD(thread); unref_thread = FALSE; /* safe run */ if((AGS_RETURNABLE_THREAD_IN_USE & (g_atomic_int_get(&(returnable_thread->flags)))) != 0){ ags_returnable_thread_safe_run(returnable_thread); if((AGS_RETURNABLE_THREAD_RUN_ONCE & (g_atomic_int_get(&(returnable_thread->flags)))) != 0){ g_atomic_int_and(&(returnable_thread->flags), (~AGS_RETURNABLE_THREAD_IN_USE)); ags_thread_stop(thread); unref_thread = TRUE; } task_thread = (AgsTaskThread *) ags_thread_find_type(ags_thread_get_toplevel(AGS_THREAD_POOL(returnable_thread->thread_pool)->parent), AGS_TYPE_TASK_THREAD); ags_task_thread_clear_cache(task_thread); } if(unref_thread){ // g_object_unref(thread); } } void ags_returnable_thread_safe_run(AgsReturnableThread *returnable_thread) { guint returnable_thread_signal; returnable_thread_signal = returnable_thread_signals[SAFE_RUN]; g_return_if_fail(AGS_IS_RETURNABLE_THREAD(returnable_thread)); g_object_ref(returnable_thread); g_signal_emit(returnable_thread, returnable_thread_signal, 0); g_object_unref(returnable_thread); } void ags_returnable_thread_stop(AgsThread *thread) { AGS_THREAD_CLASS(ags_returnable_thread_parent_class)->stop(thread); } void ags_returnable_thread_resume(AgsThread *thread) { /* empty */ } /** * ags_returnable_thread_connect_safe_run: * @returnable_thread: the thread to connect * @callback: the callback * * Connects @callback to @thread. * * Since: 1.0.0 */ void ags_returnable_thread_connect_safe_run(AgsReturnableThread *returnable_thread, AgsReturnableThreadCallback callback) { if(returnable_thread->handler > 0){ return; } returnable_thread->handler = g_signal_connect(G_OBJECT(returnable_thread), "safe-run", G_CALLBACK(callback), returnable_thread); } /** * ags_returnable_thread_disconnect_safe_run: * @returnable_thread: the thread to disconnect * * Disconnects callback of @thread. * * Since: 1.0.0 */ void ags_returnable_thread_disconnect_safe_run(AgsReturnableThread *returnable_thread) { if(returnable_thread->handler == 0){ return; } g_signal_handler_disconnect(G_OBJECT(returnable_thread), returnable_thread->handler); returnable_thread->handler = 0; } /** * ags_returnable_thread_new: * @thread_pool: the #AgsThreadPool * * Create a new #AgsReturnableThread. * * Returns: the new #AgsReturnableThread * * Since: 1.0.0 */ AgsReturnableThread* ags_returnable_thread_new(GObject *thread_pool) { AgsReturnableThread *returnable_thread; returnable_thread = (AgsReturnableThread *) g_object_new(AGS_TYPE_RETURNABLE_THREAD, "thread-pool", thread_pool, NULL); return(returnable_thread); } gsequencer-1.4.24/ags/thread/ags_timestamp_thread.h0000644000175000017500000000516713246707333017263 00000000000000/* 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 . */ #ifndef __AGS_TIMESTAMP_THREAD_H__ #define __AGS_TIMESTAMP_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_TIMESTAMP_THREAD (ags_timestamp_thread_get_type()) #define AGS_TIMESTAMP_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TIMESTAMP_THREAD, AgsTimestampThread)) #define AGS_TIMESTAMP_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_TIMESTAMP_THREAD, AgsTimestampThread)) #define AGS_IS_TIMESTAMP_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TIMESTAMP_THREAD)) #define AGS_IS_TIMESTAMP_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TIMESTAMP_THREAD)) #define AGS_TIMESTAMP_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_TIMESTAMP_THREAD, AgsTimestampThreadClass)) #define AGS_MICROSECONDS_PER_SECOND (1000000.0) #define AGS_TIMESTAMP_THREAD_DEFAULT_BPM (120.0) #define AGS_TIMESTAMP_THREAD_DEFAULT_SAMPLERATE (44100.0) #define AGS_TIMESTAMP_THREAD_DEFAULT_BUFFER_SIZE (256.0) #define AGS_TIMESTAMP_THREAD_DEFAULT_JIFFIE (AGS_MICROSECONDS_PER_SECOND * \ 60.0 / AGS_TIMESTAMP_THREAD_DEFAULT_BPM) #define AGS_TIMESTAMP_THREAD_DEFAULT_TIC (AGS_TIMESTAMP_THREAD_DEFAULT_JIFFIE / \ AGS_TIMESTAMP_THREAD_DEFAULT_SAMPLERATE / AGS_TIMESTAMP_THREAD_DEFAULT_BUFFER_SIZE) typedef struct _AgsTimestampThread AgsTimestampThread; typedef struct _AgsTimestampThreadClass AgsTimestampThreadClass; struct _AgsTimestampThread { AgsThread thread; GObject *current_timestamp; GObject *current_latency; GObject *timestamp; }; struct _AgsTimestampThreadClass { AgsThreadClass thread; }; GType ags_timestamp_thread_get_type(); AgsTimestampThread* ags_timestamp_thread_new(); #endif /*__AGS_TIMESTAMP_THREAD_H__*/ gsequencer-1.4.24/ags/thread/ags_generic_main_loop.h0000644000175000017500000000452713246707333017401 00000000000000/* 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 . */ #ifndef __AGS_GENERIC_MAIN_LOOP_H__ #define __AGS_GENERIC_MAIN_LOOP_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_GENERIC_MAIN_LOOP (ags_generic_main_loop_get_type()) #define AGS_GENERIC_MAIN_LOOP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_GENERIC_MAIN_LOOP, AgsGenericMainLoop)) #define AGS_GENERIC_MAIN_LOOP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_GENERIC_MAIN_LOOP, AgsGenericMainLoopClass)) #define AGS_IS_GENERIC_MAIN_LOOP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_GENERIC_MAIN_LOOP)) #define AGS_IS_GENERIC_MAIN_LOOP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_GENERIC_MAIN_LOOP)) #define AGS_GENERIC_MAIN_LOOP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_GENERIC_MAIN_LOOP, AgsGenericMainLoopClass)) #define AGS_GENERIC_MAIN_LOOP_DEFAULT_JIFFIE (AGS_THREAD_DEFAULT_JIFFIE) typedef struct _AgsGenericMainLoop AgsGenericMainLoop; typedef struct _AgsGenericMainLoopClass AgsGenericMainLoopClass; struct _AgsGenericMainLoop { AgsThread thread; volatile guint tic; volatile guint last_sync; GObject *application_context; GObject *async_queue; pthread_mutexattr_t tree_lock_mutexattr; pthread_mutex_t *tree_lock; }; struct _AgsGenericMainLoopClass { AgsThreadClass thread; }; GType ags_generic_main_loop_get_type(); AgsGenericMainLoop* ags_generic_main_loop_new(GObject *application_context); #endif /*__AGS_GENERIC_MAIN_LOOP_H__*/ gsequencer-1.4.24/ags/thread/ags_generic_main_loop.c0000644000175000017500000002010313246707333017360 00000000000000/* 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 . */ #include #include #include void ags_generic_main_loop_class_init(AgsGenericMainLoopClass *generic_main_loop); void ags_generic_main_loop_connectable_interface_init(AgsConnectableInterface *connectable); void ags_generic_main_loop_main_loop_interface_init(AgsMainLoopInterface *main_loop); void ags_generic_main_loop_init(AgsGenericMainLoop *generic_main_loop); void ags_generic_main_loop_connect(AgsConnectable *connectable); void ags_generic_main_loop_disconnect(AgsConnectable *connectable); pthread_mutex_t* ags_generic_main_loop_get_tree_lock(AgsMainLoop *main_loop); void ags_generic_main_loop_set_async_queue(AgsMainLoop *main_loop, GObject *async_queue); GObject* ags_generic_main_loop_get_async_queue(AgsMainLoop *main_loop); void ags_generic_main_loop_set_tic(AgsMainLoop *main_loop, guint tic); guint ags_generic_main_loop_get_tic(AgsMainLoop *main_loop); void ags_generic_main_loop_set_last_sync(AgsMainLoop *main_loop, guint last_sync); guint ags_generic_main_loop_get_last_sync(AgsMainLoop *main_loop); void ags_generic_main_loop_finalize(GObject *gobject); void ags_generic_main_loop_start(AgsThread *thread); /** * SECTION:ags_generic_main_loop * @short_description: generic loop * @title: AgsGenericMainLoop * @section_id: * @include: ags/thread/ags_generic_main_loop.h * * The #AgsGenericMainLoop is suitable as #AgsMainLoop and does * generic processing. */ static gpointer ags_generic_main_loop_parent_class = NULL; static AgsConnectableInterface *ags_generic_main_loop_parent_connectable_interface; GType ags_generic_main_loop_get_type() { static GType ags_type_generic_main_loop = 0; if(!ags_type_generic_main_loop){ static const GTypeInfo ags_generic_main_loop_info = { sizeof (AgsGenericMainLoopClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_generic_main_loop_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsGenericMainLoop), 0, /* n_preallocs */ (GInstanceInitFunc) ags_generic_main_loop_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_generic_main_loop_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_main_loop_interface_info = { (GInterfaceInitFunc) ags_generic_main_loop_main_loop_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_generic_main_loop = g_type_register_static(AGS_TYPE_THREAD, "AgsGenericMainLoop", &ags_generic_main_loop_info, 0); g_type_add_interface_static(ags_type_generic_main_loop, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_generic_main_loop, AGS_TYPE_MAIN_LOOP, &ags_main_loop_interface_info); } return (ags_type_generic_main_loop); } void ags_generic_main_loop_class_init(AgsGenericMainLoopClass *generic_main_loop) { GObjectClass *gobject; AgsThreadClass *thread; ags_generic_main_loop_parent_class = g_type_class_peek_parent(generic_main_loop); /* GObject */ gobject = (GObjectClass *) generic_main_loop; gobject->finalize = ags_generic_main_loop_finalize; /* AgsThread */ thread = (AgsThreadClass *) generic_main_loop; thread->start = ags_generic_main_loop_start; /* AgsGenericMainLoop */ } void ags_generic_main_loop_connectable_interface_init(AgsConnectableInterface *connectable) { ags_generic_main_loop_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_generic_main_loop_connect; connectable->disconnect = ags_generic_main_loop_disconnect; } void ags_generic_main_loop_main_loop_interface_init(AgsMainLoopInterface *main_loop) { main_loop->get_tree_lock = ags_generic_main_loop_get_tree_lock; main_loop->set_async_queue = ags_generic_main_loop_set_async_queue; main_loop->get_async_queue = ags_generic_main_loop_get_async_queue; main_loop->set_tic = ags_generic_main_loop_set_tic; main_loop->get_tic = ags_generic_main_loop_get_tic; main_loop->set_last_sync = ags_generic_main_loop_set_last_sync; main_loop->get_last_sync = ags_generic_main_loop_get_last_sync; } void ags_generic_main_loop_init(AgsGenericMainLoop *generic_main_loop) { AgsThread *thread; /* calculate frequency */ thread = (AgsThread *) generic_main_loop; thread->freq = AGS_GENERIC_MAIN_LOOP_DEFAULT_JIFFIE; g_atomic_int_set(&(generic_main_loop->tic), 0); g_atomic_int_set(&(generic_main_loop->last_sync), 0); generic_main_loop->application_context = NULL; /* tree lock mutex */ pthread_mutexattr_init(&(generic_main_loop->tree_lock_mutexattr)); pthread_mutexattr_settype(&(generic_main_loop->tree_lock_mutexattr), PTHREAD_MUTEX_RECURSIVE); generic_main_loop->tree_lock = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(generic_main_loop->tree_lock, &(generic_main_loop->tree_lock_mutexattr)); } void ags_generic_main_loop_connect(AgsConnectable *connectable) { ags_generic_main_loop_parent_connectable_interface->connect(connectable); /* empty */ } void ags_generic_main_loop_disconnect(AgsConnectable *connectable) { ags_generic_main_loop_parent_connectable_interface->disconnect(connectable); /* empty */ } pthread_mutex_t* ags_generic_main_loop_get_tree_lock(AgsMainLoop *main_loop) { return(AGS_GENERIC_MAIN_LOOP(main_loop)->tree_lock); } void ags_generic_main_loop_set_async_queue(AgsMainLoop *main_loop, GObject *async_queue) { AGS_GENERIC_MAIN_LOOP(main_loop)->async_queue = async_queue; } GObject* ags_generic_main_loop_get_async_queue(AgsMainLoop *main_loop) { return(AGS_GENERIC_MAIN_LOOP(main_loop)->async_queue); } void ags_generic_main_loop_set_tic(AgsMainLoop *main_loop, guint tic) { g_atomic_int_set(&(AGS_GENERIC_MAIN_LOOP(main_loop)->tic), tic); } guint ags_generic_main_loop_get_tic(AgsMainLoop *main_loop) { return(g_atomic_int_get(&(AGS_GENERIC_MAIN_LOOP(main_loop)->tic))); } void ags_generic_main_loop_set_last_sync(AgsMainLoop *main_loop, guint last_sync) { g_atomic_int_set(&(AGS_GENERIC_MAIN_LOOP(main_loop)->last_sync), last_sync); } guint ags_generic_main_loop_get_last_sync(AgsMainLoop *main_loop) { gint val; val = g_atomic_int_get(&(AGS_GENERIC_MAIN_LOOP(main_loop)->last_sync)); return(val); } void ags_generic_main_loop_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_generic_main_loop_parent_class)->finalize(gobject); } void ags_generic_main_loop_start(AgsThread *thread) { if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ /* */ AGS_THREAD_CLASS(ags_generic_main_loop_parent_class)->start(thread); } } /** * ags_generic_main_loop_new: * @application_context: the #AgsMain * * Create a new #AgsGenericMainLoop. * * Returns: the new #AgsGenericMainLoop * * Since: 1.0.0 */ AgsGenericMainLoop* ags_generic_main_loop_new(GObject *application_context) { AgsGenericMainLoop *generic_main_loop; generic_main_loop = (AgsGenericMainLoop *) g_object_new(AGS_TYPE_GENERIC_MAIN_LOOP, NULL); if(application_context != NULL){ g_object_ref(G_OBJECT(application_context)); generic_main_loop->application_context = application_context; } return(generic_main_loop); } gsequencer-1.4.24/ags/thread/ags_destroy_worker.h0000644000175000017500000000527013246707333017006 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_DESTROY_WORKER_H__ #define __AGS_DESTROY_WORKER_H__ #include #include #include #include #include #define AGS_TYPE_DESTROY_WORKER (ags_destroy_worker_get_type()) #define AGS_DESTROY_WORKER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DESTROY_WORKER, AgsDestroyWorker)) #define AGS_DESTROY_WORKER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_DESTROY_WORKER, AgsDestroyWorkerClass)) #define AGS_IS_DESTROY_WORKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_DESTROY_WORKER)) #define AGS_IS_DESTROY_WORKER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_DESTROY_WORKER)) #define AGS_DESTROY_WORKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_DESTROY_WORKER, AgsDestroyWorkerClass)) #define AGS_DESTROY_ENTRY(ptr) ((AgsDestroyEntry *) (ptr)) typedef struct _AgsDestroyWorker AgsDestroyWorker; typedef struct _AgsDestroyWorkerClass AgsDestroyWorkerClass; typedef struct _AgsDestroyEntry AgsDestroyEntry; typedef void (*AgsDestroyFunc)(gpointer ptr); struct _AgsDestroyWorker { AgsWorkerThread worker_thread; struct timespec *destroy_interval; pthread_mutex_t *destroy_mutex; pthread_mutexattr_t *destroy_mutexattr; GList *destroy_list; }; struct _AgsDestroyWorkerClass { AgsWorkerThreadClass worker_thread; }; /** * AgsDestroyEntry: * @ptr: the entry to destroy * @destroy_func: the destroy function * * The struct to specify an entry to destroy. */ struct _AgsDestroyEntry { gpointer ptr; void (*destroy_func)(gpointer ptr); }; GType ags_destroy_worker_get_type(); AgsDestroyEntry* ags_destroy_entry_alloc(gpointer ptr, AgsDestroyFunc destroy_func); void ags_destroy_worker_add(AgsDestroyWorker *destroy_worker, gpointer ptr, AgsDestroyFunc destroy_func); AgsDestroyWorker* ags_destroy_worker_new(); #endif /*__AGS_DESTROY_WORKER_H__*/ gsequencer-1.4.24/ags/thread/ags_autosave_thread.h0000644000175000017500000000442213246707333017100 00000000000000/* 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 . */ #ifndef __AGS_AUTOSAVE_THREAD_H__ #define __AGS_AUTOSAVE_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_AUTOSAVE_THREAD (ags_autosave_thread_get_type()) #define AGS_AUTOSAVE_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTOSAVE_THREAD, AgsAutosaveThread)) #define AGS_AUTOSAVE_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_AUTOSAVE_THREAD, AgsAutosaveThreadClass)) #define AGS_IS_AUTOSAVE_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUTOSAVE_THREAD)) #define AGS_IS_AUTOSAVE_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUTOSAVE_THREAD)) #define AGS_AUTOSAVE_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_AUTOSAVE_THREAD, AgsAutosaveThreadClass)) #define AGS_AUTOSAVE_THREAD_DEFAULT_JIFFIE (0.2) #define AGS_AUTOSAVE_THREAD_DEFAULT_FILENAME "ags-autosaved.xml\0" typedef struct _AgsAutosaveThread AgsAutosaveThread; typedef struct _AgsAutosaveThreadClass AgsAutosaveThreadClass; struct _AgsAutosaveThread { AgsThread thread; volatile guint tic; volatile guint last_sync; GObject *application_context; guint delay; guint counter; }; struct _AgsAutosaveThreadClass { AgsThreadClass thread; }; GType ags_autosave_thread_get_type(); AgsAutosaveThread* ags_autosave_thread_new(GObject *application_context); #endif /*__AGS_AUTOSAVE_THREAD_H__*/ gsequencer-1.4.24/ags/thread/ags_condition_manager.h0000644000175000017500000000460013246707333017400 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CONDITION_MANAGER_H__ #define __AGS_CONDITION_MANAGER_H__ #include #include #define AGS_TYPE_CONDITION_MANAGER (ags_condition_manager_get_type()) #define AGS_CONDITION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONDITION_MANAGER, AgsConditionManager)) #define AGS_CONDITION_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_CONDITION_MANAGER, AgsConditionManagerClass)) #define AGS_IS_CONDITION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CONDITION_MANAGER)) #define AGS_IS_CONDITION_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CONDITION_MANAGER)) #define AGS_CONDITION_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_CONDITION_MANAGER, AgsConditionManagerClass)) typedef struct _AgsConditionManager AgsConditionManager; typedef struct _AgsConditionManagerClass AgsConditionManagerClass; struct _AgsConditionManager { GObject object; GHashTable *lock_object; }; struct _AgsConditionManagerClass { GObjectClass object; }; GType ags_condition_manager_get_type(); gboolean ags_condition_manager_insert(AgsConditionManager *condition_manager, GObject *lock_object, pthread_cond_t *cond); gboolean ags_condition_manager_remove(AgsConditionManager *condition_manager, GObject *lock_object); pthread_cond_t* ags_condition_manager_lookup(AgsConditionManager *condition_manager, GObject *lock_object); AgsConditionManager* ags_condition_manager_get_instance(); AgsConditionManager* ags_condition_manager_new(); #endif /*__AGS_CONDITION_MANAGER_H__*/ gsequencer-1.4.24/ags/thread/ags_mutex_manager.c0000644000175000017500000001636013246707333016555 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_mutex_manager_class_init(AgsMutexManagerClass *mutex_manager); void ags_mutex_manager_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mutex_manager_init(AgsMutexManager *mutex_manager); void ags_mutex_manager_connect(AgsConnectable *connectable); void ags_mutex_manager_disconnect(AgsConnectable *connectable); void ags_mutex_manager_finalize(GObject *gobject); void ags_mutex_manager_destroy_data(gpointer data); /** * SECTION:ags_mutex_manager * @short_description: mutex manager * @title: AgsMutexManager * @section_id: * @include: ags/thread/ags_mutex_manager.h * * The #AgsMutexManager keeps your mutex in a hash table where you can lookup your * mutices. */ static gpointer ags_mutex_manager_parent_class = NULL; AgsMutexManager *ags_mutex_manager = NULL; pthread_mutex_t *ags_application_mutex = NULL; GType ags_mutex_manager_get_type() { static GType ags_type_mutex_manager = 0; if(!ags_type_mutex_manager){ const GTypeInfo ags_mutex_manager_info = { sizeof (AgsMutexManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mutex_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMutexManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mutex_manager_init, }; const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mutex_manager_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mutex_manager = g_type_register_static(G_TYPE_OBJECT, "AgsMutexManager", &ags_mutex_manager_info, 0); g_type_add_interface_static(ags_type_mutex_manager, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_mutex_manager); } void ags_mutex_manager_class_init(AgsMutexManagerClass *mutex_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_mutex_manager_parent_class = g_type_class_peek_parent(mutex_manager); /* GObject */ gobject = (GObjectClass *) mutex_manager; gobject->finalize = ags_mutex_manager_finalize; } void ags_mutex_manager_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_mutex_manager_connect; connectable->disconnect = ags_mutex_manager_disconnect; } void ags_mutex_manager_init(AgsMutexManager *mutex_manager) { mutex_manager->lock_object = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) ags_mutex_manager_destroy_data); } void ags_mutex_manager_connect(AgsConnectable *connectable) { /* empty */ } void ags_mutex_manager_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_mutex_manager_finalize(GObject *gobject) { AgsMutexManager *mutex_manager; mutex_manager = AGS_MUTEX_MANAGER(gobject); g_hash_table_destroy(mutex_manager->lock_object); if(mutex_manager == ags_mutex_manager){ ags_mutex_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_mutex_manager_parent_class)->finalize(gobject); } void ags_mutex_manager_destroy_data(gpointer data) { pthread_mutex_destroy((pthread_mutex_t *) data); } /** * ags_mutex_manager_get_application_mutex: * @mutex_manager: the #AgsMutexManager * * Retrieve the application mutex as per process pointer. * * Returns: the application mutex * * Since: 1.0.0 */ pthread_mutex_t* ags_mutex_manager_get_application_mutex(AgsMutexManager *mutex_manager) { if(ags_application_mutex == NULL){ pthread_mutexattr_t *attr; attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif ags_application_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(ags_application_mutex, attr); } return(ags_application_mutex); } /** * ags_mutex_manager_insert: * @mutex_manager: the #AgsMutexManager * @lock_object: the object as key * @mutex: the mutex to insert * * Inserts a mutex into hash map associated with @lock_object. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_mutex_manager_insert(AgsMutexManager *mutex_manager, GObject *lock_object, pthread_mutex_t *mutex) { if(mutex_manager == NULL || lock_object == NULL || mutex == NULL){ return(FALSE); } g_hash_table_insert(mutex_manager->lock_object, lock_object, mutex); return(TRUE); } /** * ags_mutex_manager_remove: * @mutex_manager: the #AgsMutexManager * @lock_object: the object to remove * * Removes a lock associated with @lock_object.3 * * Returns: %TRUE as successfully removed, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_mutex_manager_remove(AgsMutexManager *mutex_manager, GObject *lock_object) { pthread_mutex_t *mutex; mutex = g_hash_table_lookup(mutex_manager->lock_object, lock_object); if(mutex == NULL || pthread_mutex_trylock(mutex) != 0){ return(FALSE); } g_hash_table_remove(mutex_manager->lock_object, lock_object); pthread_mutex_unlock(mutex); pthread_mutex_destroy(mutex); free(mutex); return(TRUE); } /** * ags_mutex_manager_lookup: * @mutex_manager: the #AgsMutexManager * @lock_object: the object to lookup * * Lookup a mutex associated with @lock_object in @mutex_manager * * Returns: the mutex on success, else %NULL * * Since: 1.0.0 */ pthread_mutex_t* ags_mutex_manager_lookup(AgsMutexManager *mutex_manager, GObject *lock_object) { pthread_mutex_t *mutex; mutex = (pthread_mutex_t *) g_hash_table_lookup(mutex_manager->lock_object, lock_object); return(mutex); } /** * ags_mutex_manager_get_instance: * * Singleton function to optain the mutex manager instance. * * Returns: an instance of #AgsMutexManager * * Since: 1.0.0 */ AgsMutexManager* ags_mutex_manager_get_instance() { if(ags_mutex_manager == NULL){ ags_mutex_manager = ags_mutex_manager_new(); } return(ags_mutex_manager); } /** * ags_mutex_manager_new: * * Instantiate a mutex manager. * * Returns: a new #AgsMutexManager * * Since: 1.0.0 */ AgsMutexManager* ags_mutex_manager_new() { AgsMutexManager *mutex_manager; mutex_manager = (AgsMutexManager *) g_object_new(AGS_TYPE_MUTEX_MANAGER, NULL); return(mutex_manager); } gsequencer-1.4.24/ags/thread/ags_single_thread.c0000644000175000017500000001533713246707333016534 00000000000000/* 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 . */ #include #include #include #ifdef __APPLE__ #include #include #endif void ags_single_thread_class_init(AgsSingleThreadClass *single_thread); void ags_single_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_single_thread_init(AgsSingleThread *single_thread); void ags_single_thread_connect(AgsConnectable *connectable); void ags_single_thread_disconnect(AgsConnectable *connectable); void ags_single_thread_finalize(GObject *gobject); void ags_single_thread_start(AgsThread *thread); void ags_single_thread_run(AgsThread *thread); void ags_single_thread_stop(AgsThread *thread); void* ags_single_thread_loop(void *ptr); /** * SECTION:ags_single_thread * @short_description: single threaded environment * @title: AgsSingleThread * @section_id: * @include: ags/thread/ags_single_thread.h * * The #AgsSingleThread runs the application within one single thread. */ static gpointer ags_single_thread_parent_class = NULL; static AgsConnectableInterface *ags_single_thread_parent_connectable_interface; GType ags_single_thread_get_type() { static GType ags_type_single_thread = 0; if(!ags_type_single_thread){ static const GTypeInfo ags_single_thread_info = { sizeof (AgsSingleThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_single_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSingleThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_single_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_single_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_single_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsSingleThread", &ags_single_thread_info, 0); g_type_add_interface_static(ags_type_single_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_single_thread); } void ags_single_thread_class_init(AgsSingleThreadClass *single_thread) { GObjectClass *gobject; AgsThreadClass *thread; ags_single_thread_parent_class = g_type_class_peek_parent(single_thread); /* GObject */ gobject = (GObjectClass *) single_thread; gobject->finalize = ags_single_thread_finalize; /* AgsThread */ thread = (AgsThreadClass *) single_thread; thread->start = ags_single_thread_start; thread->run = ags_single_thread_run; thread->stop = ags_single_thread_stop; } void ags_single_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_single_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_single_thread_connect; connectable->disconnect = ags_single_thread_disconnect; } void ags_single_thread_init(AgsSingleThread *single_thread) { /* empty */ } void ags_single_thread_connect(AgsConnectable *connectable) { ags_single_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_single_thread_disconnect(AgsConnectable *connectable) { ags_single_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_single_thread_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_single_thread_parent_class)->finalize(gobject); /* empty */ } void ags_single_thread_start(AgsThread *thread) { g_atomic_int_or(&(thread->flags), (AGS_THREAD_RUNNING | AGS_THREAD_INITIAL_RUN)); ags_single_thread_run(thread); } void* ags_single_thread_loop(void *ptr) { ags_single_thread_run(AGS_THREAD(ptr)); pthread_exit(NULL); } void ags_single_thread_run(AgsThread *thread) { AgsSingleThread *single_thread; AgsThread *child; #ifdef __APPLE__ clock_serv_t cclock; mach_timespec_t mts; #endif struct timespec play_start, play_exceeded, play_idle, current; single_thread = AGS_SINGLE_THREAD(thread); play_idle.tv_sec = 0; play_idle.tv_nsec = floor((double) NSEC_PER_SEC / (double) AGS_SINGLE_THREAD_DEFAULT_JIFFIE); while((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0){ /* initial value to calculate timing */ #ifdef __APPLE__ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); play_start.tv_sec = mts.tv_sec; play_start.tv_nsec = mts.tv_nsec; #else clock_gettime(CLOCK_MONOTONIC, &play_start); #endif child = g_atomic_pointer_get(&(AGS_THREAD(single_thread)->children)); while(child != NULL){ ags_thread_run(child); child = g_atomic_pointer_get(&(child->next)); } /* do timing */ #ifdef __APPLE__ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); play_exceeded.tv_sec = mts.tv_sec; play_exceeded.tv_nsec = mts.tv_nsec; #else clock_gettime(CLOCK_MONOTONIC, &play_exceeded); #endif if(play_start.tv_sec < play_exceeded.tv_sec){ play_exceeded.tv_nsec += NSEC_PER_SEC; play_exceeded.tv_sec--; } if(play_start.tv_sec < play_exceeded.tv_sec){ continue; } /* calculate timing */ current.tv_sec = 0; current.tv_nsec = play_idle.tv_nsec - (play_exceeded.tv_nsec - play_start.tv_nsec); // nanosleep(¤t, NULL); } } void ags_single_thread_stop(AgsThread *thread) { AgsSingleThread *single_thread; AgsThread *child; single_thread = AGS_SINGLE_THREAD(thread); child = g_atomic_pointer_get(&(AGS_THREAD(single_thread)->children)); while(child != NULL){ ags_thread_run(child); child = g_atomic_pointer_get(&(child->next)); } } AgsSingleThread* ags_single_thread_new() { AgsSingleThread *single_thread; single_thread = (AgsSingleThread *) g_object_new(AGS_TYPE_SINGLE_THREAD, NULL); return(single_thread); } gsequencer-1.4.24/ags/thread/ags_single_thread.h0000644000175000017500000000403413246707333016531 00000000000000/* 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 . */ #ifndef __AGS_SINGLE_THREAD_H__ #define __AGS_SINGLE_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #define AGS_TYPE_SINGLE_THREAD (ags_single_thread_get_type()) #define AGS_SINGLE_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SINGLE_THREAD, AgsSingleThread)) #define AGS_SINGLE_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SINGLE_THREAD, AgsSingleThreadClass)) #define AGS_IS_SINGLE_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SINGLE_THREAD)) #define AGS_IS_SINGLE_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SINGLE_THREAD)) #define AGS_SINGLE_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SINGLE_THREAD, AgsSingleThreadClass)) #define AGS_SINGLE_THREAD_DEFAULT_JIFFIE (48.0) typedef struct _AgsSingleThread AgsSingleThread; typedef struct _AgsSingleThreadClass AgsSingleThreadClass; struct _AgsSingleThread { AgsThread thread; }; struct _AgsSingleThreadClass { AgsThreadClass thread; }; GType ags_single_thread_get_type(); AgsSingleThread* ags_single_thread_new(); #endif /*__AGS_SINGLE_THREAD_H__*/ gsequencer-1.4.24/ags/thread/ags_destroy_worker.c0000644000175000017500000001740013246707333016777 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_destroy_worker_class_init(AgsDestroyWorkerClass *destroy_worker); void ags_destroy_worker_connectable_interface_init(AgsConnectableInterface *connectable); void ags_destroy_worker_init(AgsDestroyWorker *destroy_worker); void ags_destroy_worker_connect(AgsConnectable *connectable); void ags_destroy_worker_disconnect(AgsConnectable *connectable); void ags_destroy_worker_finalize(GObject *gobject); void ags_destroy_worker_start(AgsThread *thread); void ags_destroy_worker_stop(AgsThread *thread); void ags_destroy_worker_do_poll(AgsWorkerThread *worker_thread); /** * SECTION:ags_destroy_worker * @short_description: destroy worker * @title: AgsDestroyWorker * @section_id: * @include: ags/worker/ags_destroy_worker.h * * The #AgsDestroyWorker does non-realtime work. You might want * give it the responsibility to destroy your objects. */ static gpointer ags_destroy_worker_parent_class = NULL; GType ags_destroy_worker_get_type() { static GType ags_type_destroy_worker = 0; if(!ags_type_destroy_worker){ static const GTypeInfo ags_destroy_worker_info = { sizeof (AgsDestroyWorkerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_destroy_worker_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsDestroyWorker), 0, /* n_preallocs */ (GInstanceInitFunc) ags_destroy_worker_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_destroy_worker_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_destroy_worker = g_type_register_static(AGS_TYPE_WORKER_THREAD, "AgsDestroyWorker", &ags_destroy_worker_info, 0); g_type_add_interface_static(ags_type_destroy_worker, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_destroy_worker); } void ags_destroy_worker_class_init(AgsDestroyWorkerClass *destroy_worker) { GObjectClass *gobject; AgsThreadClass *thread; AgsWorkerThreadClass *worker_thread; ags_destroy_worker_parent_class = g_type_class_peek_parent(destroy_worker); /* GObject */ gobject = (GObjectClass *) destroy_worker; gobject->finalize = ags_destroy_worker_finalize; /* AgsThread */ thread = (AgsThreadClass *) destroy_worker; thread->start = ags_destroy_worker_start; thread->run = NULL; thread->stop = ags_destroy_worker_stop; /* AgsDestroyWorker */ worker_thread = (AgsWorkerThreadClass *) destroy_worker; worker_thread->do_poll = ags_destroy_worker_do_poll; } void ags_destroy_worker_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_destroy_worker_connect; connectable->disconnect = ags_destroy_worker_disconnect; } void ags_destroy_worker_init(AgsDestroyWorker *destroy_worker) { destroy_worker->destroy_interval = (struct timespec *) malloc(sizeof(struct timespec)); destroy_worker->destroy_interval->tv_sec = 1; destroy_worker->destroy_interval->tv_nsec = 0; /* lock destroy list */ destroy_worker->destroy_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(destroy_worker->destroy_mutexattr); pthread_mutexattr_settype(destroy_worker->destroy_mutexattr, PTHREAD_MUTEX_RECURSIVE); destroy_worker->destroy_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(destroy_worker->destroy_mutex, destroy_worker->destroy_mutexattr); /* destroy list */ destroy_worker->destroy_list = NULL; } void ags_destroy_worker_connect(AgsConnectable *connectable) { /* empty */ } void ags_destroy_worker_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_destroy_worker_finalize(GObject *gobject) { AgsDestroyWorker *destroy_worker; destroy_worker = AGS_DESTROY_WORKER(gobject); if(destroy_worker->destroy_interval != NULL){ free(destroy_worker->destroy_interval); } /* destroy mutex */ pthread_mutex_destroy(destroy_worker->destroy_mutex); free(destroy_worker->destroy_mutex); /* call parent */ G_OBJECT_CLASS(ags_destroy_worker_parent_class)->finalize(gobject); } void ags_destroy_worker_start(AgsThread *thread) { AgsWorkerThread *worker_thread; worker_thread = AGS_WORKER_THREAD(thread); g_atomic_int_or(&(worker_thread->flags), AGS_WORKER_THREAD_RUNNING); pthread_create(worker_thread->worker_thread, worker_thread->worker_thread_attr, ags_woker_thread_do_poll_loop, worker_thread); } void ags_destroy_worker_stop(AgsThread *thread) { AgsWorkerThread *worker_thread; worker_thread = AGS_WORKER_THREAD(thread); g_atomic_int_and(&(worker_thread->flags), (~(AGS_WORKER_THREAD_RUNNING))); } void ags_destroy_worker_do_poll(AgsWorkerThread *worker_thread) { AgsDestroyWorker *destroy_worker; GList *list, *list_start; destroy_worker = AGS_DESTROY_WORKER(worker_thread); pthread_mutex_lock(destroy_worker->destroy_mutex); list_start = list = destroy_worker->destroy_list; destroy_worker->destroy_list = NULL; pthread_mutex_unlock(destroy_worker->destroy_mutex); while(list != NULL){ AGS_DESTROY_ENTRY(list->data)->destroy_func(AGS_DESTROY_ENTRY(list->data)->ptr); list = list->next; } g_list_free_full(list_start, g_free); nanosleep(destroy_worker->destroy_interval, NULL); } /** * ags_destroy_entry_alloc: * @ptr: a pointer * @destroy_func: the @ptr's destroy function * * Allocated a destroy entry. * * Returns: the allocated #AgsDestroyEntry * * Since: 1.0.0.8 */ AgsDestroyEntry* ags_destroy_entry_alloc(gpointer ptr, AgsDestroyFunc destroy_func) { AgsDestroyEntry *destroy_entry; destroy_entry = (AgsDestroyEntry *) malloc(sizeof(AgsDestroyEntry)); destroy_entry->ptr = ptr; destroy_entry->destroy_func = destroy_func; return(destroy_entry); } /** * ags_destroy_worker_add: * @destroy_worker: the #AgsDestroyWorker * @ptr: the gpointer to destroy * @destroy_func: the AgsDestroyFunc * * Add @ptr for destruction using @destroy_func. * * Since: 1.0.0.8 */ void ags_destroy_worker_add(AgsDestroyWorker *destroy_worker, gpointer ptr, AgsDestroyFunc destroy_func) { AgsDestroyEntry *destroy_entry; if(!AGS_IS_DESTROY_WORKER(destroy_worker) || ptr == NULL || destroy_func == NULL){ return; } destroy_entry = ags_destroy_entry_alloc(ptr, destroy_func); pthread_mutex_lock(destroy_worker->destroy_mutex); destroy_worker->destroy_list = g_list_prepend(destroy_worker->destroy_list, destroy_entry); pthread_mutex_unlock(destroy_worker->destroy_mutex); } /** * ags_destroy_worker_new: * * Create a new #AgsDestroyWorker. * * Returns: the new #AgsDestroyWorker * * Since: 1.0.0.8 */ AgsDestroyWorker* ags_destroy_worker_new() { AgsDestroyWorker *destroy_worker; destroy_worker = (AgsDestroyWorker *) g_object_new(AGS_TYPE_DESTROY_WORKER, NULL); return(destroy_worker); } gsequencer-1.4.24/ags/thread/ags_concurrency_provider.h0000644000175000017500000000637313246707333020175 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CONCURRENCY_PROVIDER_H__ #define __AGS_CONCURRENCY_PROVIDER_H__ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #define AGS_TYPE_CONCURRENCY_PROVIDER (ags_concurrency_provider_get_type()) #define AGS_CONCURRENCY_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONCURRENCY_PROVIDER, AgsConcurrencyProvider)) #define AGS_CONCURRENCY_PROVIDER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_CONCURRENCY_PROVIDER, AgsConcurrencyProviderInterface)) #define AGS_IS_CONCURRENCY_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CONCURRENCY_PROVIDER)) #define AGS_IS_CONCURRENCY_PROVIDER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_CONCURRENCY_PROVIDER)) #define AGS_CONCURRENCY_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_CONCURRENCY_PROVIDER, AgsConcurrencyProviderInterface)) typedef struct _AgsConcurrencyProvider AgsConcurrencyProvider; typedef struct _AgsConcurrencyProviderInterface AgsConcurrencyProviderInterface; struct _AgsConcurrencyProviderInterface { GTypeInterface ginterface; AgsMutexManager* (*get_mutex_manager)(AgsConcurrencyProvider *concurrency_provider); AgsThread* (*get_main_loop)(AgsConcurrencyProvider *concurrency_provider); AgsThread* (*get_task_thread)(AgsConcurrencyProvider *concurrency_provider); AgsThreadPool* (*get_thread_pool)(AgsConcurrencyProvider *concurrency_provider); GList* (*get_worker)(AgsConcurrencyProvider *concurrency_provider); void (*set_worker)(AgsConcurrencyProvider *concurrency_provider, GList *worker); }; GType ags_concurrency_provider_get_type(); AgsMutexManager* ags_concurrency_provider_get_mutex_manager(AgsConcurrencyProvider *concurrency_provider); AgsThread* ags_concurrency_provider_get_main_loop(AgsConcurrencyProvider *concurrency_provider); AgsThread* ags_concurrency_provider_get_task_thread(AgsConcurrencyProvider *concurrency_provider); AgsThreadPool* ags_concurrency_provider_get_thread_pool(AgsConcurrencyProvider *concurrency_provider); GList* ags_concurrency_provider_get_worker(AgsConcurrencyProvider *concurrency_provider); void ags_concurrency_provider_set_worker(AgsConcurrencyProvider *concurrency_provider, GList *worker); #endif /*__AGS_CONCURRENCY_PROVIDER_H__*/ gsequencer-1.4.24/ags/thread/ags_mutex_manager.h0000644000175000017500000000447313246707333016564 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MUTEX_MANAGER_H__ #define __AGS_MUTEX_MANAGER_H__ #include #include #define AGS_TYPE_MUTEX_MANAGER (ags_mutex_manager_get_type()) #define AGS_MUTEX_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTEX_MANAGER, AgsMutexManager)) #define AGS_MUTEX_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_MUTEX_MANAGER, AgsMutexManagerClass)) #define AGS_IS_MUTEX_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MUTEX_MANAGER)) #define AGS_IS_MUTEX_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MUTEX_MANAGER)) #define AGS_MUTEX_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_MUTEX_MANAGER, AgsMutexManagerClass)) typedef struct _AgsMutexManager AgsMutexManager; typedef struct _AgsMutexManagerClass AgsMutexManagerClass; struct _AgsMutexManager { GObject object; GHashTable *lock_object; }; struct _AgsMutexManagerClass { GObjectClass object; }; GType ags_mutex_manager_get_type(); pthread_mutex_t* ags_mutex_manager_get_application_mutex(AgsMutexManager *mutex_manager); gboolean ags_mutex_manager_insert(AgsMutexManager *mutex_manager, GObject *lock_object, pthread_mutex_t *mutex); gboolean ags_mutex_manager_remove(AgsMutexManager *mutex_manager, GObject *lock_object); pthread_mutex_t* ags_mutex_manager_lookup(AgsMutexManager *mutex_manager, GObject *lock_object); AgsMutexManager* ags_mutex_manager_get_instance(); AgsMutexManager* ags_mutex_manager_new(); #endif /*__AGS_MUTEX_MANAGER_H__*/ gsequencer-1.4.24/ags/thread/ags_message_queue.h0000644000175000017500000000562213256163135016552 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MESSAGE_QUEUE_H__ #define __AGS_MESSAGE_QUEUE_H__ #include #include #include #include #define AGS_TYPE_MESSAGE_QUEUE (ags_message_queue_get_type()) #define AGS_MESSAGE_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MESSAGE_QUEUE, AgsMessageQueue)) #define AGS_MESSAGE_QUEUE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_MESSAGE_QUEUE, AgsMessageQueue)) #define AGS_IS_MESSAGE_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MESSAGE_QUEUE)) #define AGS_IS_MESSAGE_QUEUE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MESSAGE_QUEUE)) #define AGS_MESSAGE_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_MESSAGE_QUEUE, AgsMessageQueueClass)) #define AGS_MESSAGE_ENVELOPE(ptr) ((AgsMessageEnvelope *)(ptr)) typedef struct _AgsMessageQueue AgsMessageQueue; typedef struct _AgsMessageQueueClass AgsMessageQueueClass; typedef struct _AgsMessageEnvelope AgsMessageEnvelope; struct _AgsMessageQueue { GObject gobject; gchar *namespace; pthread_mutexattr_t *mutexattr; pthread_mutex_t *mutex; GList *message; }; struct _AgsMessageQueueClass { GObjectClass gobject; }; struct _AgsMessageEnvelope { GObject *sender; GObject *recipient; xmlDoc *doc; GParameter *parameter; guint n_params; }; GType ags_message_queue_get_type(); AgsMessageEnvelope* ags_message_envelope_alloc(GObject *sender, GObject *recipient, xmlDoc *doc); void ags_message_envelope_free(AgsMessageEnvelope *message); void ags_message_queue_add_message(AgsMessageQueue *message_queue, gpointer message); void ags_message_queue_remove_message(AgsMessageQueue *message_queue, gpointer message); GList* ags_message_queue_find_sender(AgsMessageQueue *message_queue, GObject *sender); GList* ags_message_queue_find_recipient(AgsMessageQueue *message_queue, GObject *recipient); GList* ags_message_queue_query_message(AgsMessageQueue *message_queue, gchar *xpath); AgsMessageQueue* ags_message_queue_new(gchar *namespace); #endif /*__AGS_MESSAGE_QUEUE_H__*/ gsequencer-1.4.24/ags/thread/ags_polling_thread.c0000644000175000017500000003164513246707333016717 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #define _GNU_SOURCE #include #include void ags_polling_thread_class_init(AgsPollingThreadClass *polling_thread); void ags_polling_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_polling_thread_init(AgsPollingThread *polling_thread); void ags_polling_thread_connect(AgsConnectable *connectable); void ags_polling_thread_disconnect(AgsConnectable *connectable); void ags_polling_thread_finalize(GObject *gobject); void ags_polling_thread_start(AgsThread *thread); void ags_polling_thread_run(AgsThread *thread); void ags_polling_thread_stop(AgsThread *thread); guint ags_polling_thread_interrupted(AgsThread *thread, int sig, guint time_cycle, guint *time_spent); /** * SECTION:ags_polling_thread * @short_description: polling thread * @title: AgsPollingThread * @section_id: * @include: ags/thread/ags_polling_thread.h * * The #AgsPollingThread polls on the given file descriptors. */ static gpointer ags_polling_thread_parent_class = NULL; GType ags_polling_thread_get_type() { static GType ags_type_polling_thread = 0; if(!ags_type_polling_thread){ static const GTypeInfo ags_polling_thread_info = { sizeof (AgsPollingThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_polling_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPollingThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_polling_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_polling_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_polling_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsPollingThread", &ags_polling_thread_info, 0); g_type_add_interface_static(ags_type_polling_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_polling_thread); } void ags_polling_thread_class_init(AgsPollingThreadClass *polling_thread) { GObjectClass *gobject; AgsThreadClass *thread; ags_polling_thread_parent_class = g_type_class_peek_parent(polling_thread); /* GObject */ gobject = (GObjectClass *) polling_thread; gobject->finalize = ags_polling_thread_finalize; /* AgsThread */ thread = (AgsThreadClass *) polling_thread; thread->start = ags_polling_thread_start; thread->run = ags_polling_thread_run; thread->stop = ags_polling_thread_stop; thread->interrupted = ags_polling_thread_interrupted; } void ags_polling_thread_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_polling_thread_connect; connectable->disconnect = ags_polling_thread_disconnect; } void ags_polling_thread_init(AgsPollingThread *polling_thread) { AgsThread *thread; thread = (AgsThread *) polling_thread; g_atomic_int_or(&(thread->sync_flags), (AGS_THREAD_RESUME_INTERRUPTED)); thread->freq = AGS_POLLING_THREAD_DEFAULT_JIFFIE; g_atomic_int_set(&(polling_thread->flags), 0); g_atomic_int_set(&(polling_thread->omit_count), 0); /* fd mutex */ polling_thread->fd_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(polling_thread->fd_mutexattr); pthread_mutexattr_settype(polling_thread->fd_mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(polling_thread->fd_mutexattr, PTHREAD_PRIO_INHERIT); #endif polling_thread->fd_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(polling_thread->fd_mutex, polling_thread->fd_mutexattr); polling_thread->fds = NULL; polling_thread->poll_fd = NULL; } void ags_polling_thread_connect(AgsConnectable *connectable) { /* empty */ } void ags_polling_thread_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_polling_thread_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_polling_thread_parent_class)->finalize(gobject); /* empty */ } void ags_polling_thread_start(AgsThread *thread) { /* */ if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ AGS_THREAD_CLASS(ags_polling_thread_parent_class)->start(thread); } } void ags_polling_thread_run(AgsThread *thread) { AgsPollingThread *polling_thread; AgsThread *main_loop; GList *list; struct timespec timeout; sigset_t sigmask; gint position; int ret; polling_thread = AGS_POLLING_THREAD(thread); main_loop = ags_thread_get_toplevel(thread); /* real-time setup */ #ifdef AGS_WITH_RT if((AGS_THREAD_RT_SETUP & (g_atomic_int_get(&(thread->flags)))) == 0){ struct sched_param param; /* Declare ourself as a real time task */ param.sched_priority = AGS_POLLING_THREAD_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } g_atomic_int_or(&(thread->flags), AGS_THREAD_RT_SETUP); } #endif sigemptyset(&sigmask); timeout.tv_sec = 0; if(g_atomic_int_get(&(main_loop->time_late)) != 0){ timeout.tv_nsec = 0; }else{ if(main_loop->tic_delay == main_loop->delay){ if(AGS_THREAD_TOLERANCE > 0.0){ timeout.tv_nsec = 0; }else{ timeout.tv_nsec = -1 * AGS_THREAD_TOLERANCE; } }else{ if(thread->freq > AGS_THREAD_HERTZ_JIFFIE){ timeout.tv_nsec = (NSEC_PER_SEC / thread->freq + AGS_POLLING_THREAD_UNDERLOAD); }else{ timeout.tv_nsec = (NSEC_PER_SEC / AGS_THREAD_HERTZ_JIFFIE + AGS_POLLING_THREAD_UNDERLOAD); } } } pthread_mutex_lock(polling_thread->fd_mutex); if((AGS_POLLING_THREAD_OMIT & (g_atomic_int_get(&(polling_thread->flags)))) == 0){ list = polling_thread->poll_fd; /* pre flag */ while(list != NULL){ position = ags_polling_thread_fd_position(polling_thread, AGS_POLL_FD(list->data)->fd); if(position != -1 && AGS_POLL_FD(list->data)->poll_fd != NULL){ AGS_POLL_FD(list->data)->poll_fd->events = polling_thread->fds[position].events; } list = list->next; } /* poll */ if(polling_thread->fds != NULL){ #ifndef __APPLE__ ppoll(polling_thread->fds, g_list_length(polling_thread->poll_fd), &timeout, &sigmask); #else poll(polling_thread->fds, g_list_length(polling_thread->poll_fd), timeout.tv_nsec / 1000); #endif } /* post flag */ list = polling_thread->poll_fd; while(list != NULL){ if(AGS_POLL_FD(list->data)->delay_counter >= AGS_POLL_FD(list->data)->delay){ position = ags_polling_thread_fd_position(polling_thread, AGS_POLL_FD(list->data)->fd); if(position != -1){ if((POLLIN & (polling_thread->fds[position].revents)) != 0){ AGS_POLL_FD(list->data)->flags |= AGS_POLL_FD_INPUT; } if((POLLPRI & (polling_thread->fds[position].revents)) != 0){ AGS_POLL_FD(list->data)->flags |= AGS_POLL_FD_PRIORITY_INPUT; } if((POLLOUT & (polling_thread->fds[position].revents)) != 0){ AGS_POLL_FD(list->data)->flags |= AGS_POLL_FD_OUTPUT; } if((POLLHUP & (polling_thread->fds[position].revents)) != 0){ AGS_POLL_FD(list->data)->flags |= AGS_POLL_FD_HANG_UP; } /* do legacy */ if(AGS_POLL_FD(list->data)->poll_fd != NULL){ AGS_POLL_FD(list->data)->poll_fd->revents = polling_thread->fds[position].revents; } ags_poll_fd_dispatch(list->data); AGS_POLL_FD(list->data)->flags &= (~(AGS_POLL_FD_INPUT | AGS_POLL_FD_PRIORITY_INPUT | AGS_POLL_FD_OUTPUT | AGS_POLL_FD_HANG_UP)); AGS_POLL_FD(list->data)->delay_counter = 0.0; }else{ AGS_POLL_FD(list->data)->delay_counter += 1.0; } } list = list->next; } } pthread_mutex_unlock(polling_thread->fd_mutex); } void ags_polling_thread_stop(AgsThread *thread) { /* */ AGS_THREAD_CLASS(ags_polling_thread_parent_class)->stop(thread); } guint ags_polling_thread_interrupted(AgsThread *thread, int sig, guint time_cycle, guint *time_spent) { AgsPollingThread *polling_thread; polling_thread = (AgsPollingThread *) thread; if((AGS_THREAD_INTERRUPTED & (g_atomic_int_get(&(thread->sync_flags)))) == 0){ g_atomic_int_or(&(polling_thread->flags), AGS_POLLING_THREAD_OMIT); } return(0); } /** * ags_polling_thread_fd_position: * @polling_thread: the #AgsPollingThread * @fd: file descriptor to find * * Tell position of fd within pollfd struct array. * * Returns: the position if found, otherwise -1 * * Since: 1.0.0 */ gint ags_polling_thread_fd_position(AgsPollingThread *polling_thread, int fd) { gint i; if(!AGS_IS_POLLING_THREAD(polling_thread) || polling_thread->fds == NULL){ return(-1); } pthread_mutex_lock(polling_thread->fd_mutex); for(i = 0; i < g_list_length(polling_thread->poll_fd); i++){ if(fd == polling_thread->fds[i].fd){ pthread_mutex_unlock(polling_thread->fd_mutex); return(i); } } pthread_mutex_unlock(polling_thread->fd_mutex); return(-1); } /** * ags_polling_thread_add_poll_fd: * @polling_thread: the #AgsPollingThread * @gobject: the #AgsPollFd to add * * Add a @gobject to #AgsPollingThread. * * Since: 1.0.0 */ void ags_polling_thread_add_poll_fd(AgsPollingThread *polling_thread, GObject *gobject) { guint length; gint nth; if(!AGS_IS_POLLING_THREAD(polling_thread) || !(AGS_IS_POLL_FD(gobject))){ return; } pthread_mutex_lock(polling_thread->fd_mutex); nth = g_list_position(polling_thread->poll_fd, (gpointer) g_list_find(polling_thread->poll_fd, gobject)); if(nth >= 0){ pthread_mutex_unlock(polling_thread->fd_mutex); return; } AGS_POLL_FD(gobject)->polling_thread = polling_thread; length = g_list_length(polling_thread->poll_fd); if(length == 0){ polling_thread->fds = (struct pollfd *) malloc(sizeof(struct pollfd)); }else{ polling_thread->fds = (struct pollfd *) realloc(polling_thread->fds, (length + 1) * sizeof(struct pollfd)); } polling_thread->fds[length].fd = AGS_POLL_FD(gobject)->fd; polling_thread->fds[length].events = 0; polling_thread->fds[length].revents = 0; /* add to list */ g_object_ref(gobject); polling_thread->poll_fd = g_list_prepend(polling_thread->poll_fd, gobject); pthread_mutex_unlock(polling_thread->fd_mutex); } /** * ags_polling_thread_new: * @polling_thread: the #AgsPollingThread * @gobject: the #AgsPollFd * * Remove @gobject from #AgsPollingThread. * * Since: 1.0.0 */ void ags_polling_thread_remove_poll_fd(AgsPollingThread *polling_thread, GObject *gobject) { struct pollfd *fds; guint length; gint nth; if(!AGS_IS_POLLING_THREAD(polling_thread) || !(AGS_IS_POLL_FD(gobject))){ return; } pthread_mutex_lock(polling_thread->fd_mutex); /* find fd */ nth = g_list_position(polling_thread->poll_fd, (gpointer) g_list_find(polling_thread->poll_fd, gobject)); if(nth < 0){ pthread_mutex_unlock(polling_thread->fd_mutex); return; } AGS_POLL_FD(gobject)->polling_thread = NULL; /* realloc array */ length = g_list_length(polling_thread->poll_fd); fds = (struct pollfd *) malloc((length - 1) * sizeof(struct pollfd)); if(nth != 0){ memcpy(fds, polling_thread->fds, nth * sizeof(struct pollfd)); } if(nth + 1 < length){ memcpy(&(fds[nth]), &(polling_thread->fds[nth + 1]), (length - nth - 1) * sizeof(struct pollfd)); } free(polling_thread->fds); polling_thread->fds = fds; /* remove from list */ polling_thread->poll_fd = g_list_remove(polling_thread->poll_fd, gobject); g_object_unref(gobject); pthread_mutex_unlock(polling_thread->fd_mutex); } /** * ags_polling_thread_new: * * Create a new #AgsPollingThread. * * Returns: the new #AgsPollingThread * * Since: 1.0.0 */ AgsPollingThread* ags_polling_thread_new() { AgsPollingThread *polling_thread; polling_thread = (AgsPollingThread *) g_object_new(AGS_TYPE_POLLING_THREAD, NULL); return(polling_thread); } gsequencer-1.4.24/ags/thread/ags_thread_application_context.h0000644000175000017500000000613713246707333021325 00000000000000/* 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 . */ #ifndef __AGS_THREAD_APPLICATION_CONTEXT_H__ #define __AGS_THREAD_APPLICATION_CONTEXT_H__ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #define AGS_TYPE_THREAD_APPLICATION_CONTEXT (ags_thread_application_context_get_type()) #define AGS_THREAD_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_THREAD_APPLICATION_CONTEXT, AgsThreadApplicationContext)) #define AGS_THREAD_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_THREAD_APPLICATION_CONTEXT, AgsThreadApplicationContextClass)) #define AGS_IS_THREAD_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_THREAD_APPLICATION_CONTEXT)) #define AGS_IS_THREAD_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_THREAD_APPLICATION_CONTEXT)) #define AGS_THREAD_APPLICATION_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_THREAD_APPLICATION_CONTEXT, AgsThreadApplicationContextClass)) #define AGS_THREAD_DEFAULT_VERSION "0.7.122.8\0" #define AGS_THREAD_BUILD_ID "Tue Mar 21 20:03:29 CET 2017\0" typedef struct _AgsThreadApplicationContext AgsThreadApplicationContext; typedef struct _AgsThreadApplicationContextClass AgsThreadApplicationContextClass; /** * AgsThreadApplicationContextFlags: * @AGS_THREAD_APPLICATION_CONTEXT_SINGLE_THREAD: run as threads in one single loop * * Enum values to control the behavior or indicate internal state of #AgsThreadApplicationContext by * enable/disable as sync_flags. */ typedef enum{ AGS_THREAD_APPLICATION_CONTEXT_SINGLE_THREAD = 1, }AgsThreadApplicationContextFlags; struct _AgsThreadApplicationContext { AgsApplicationContextClass application_contex; guint flags; AgsThread *autosave_thread; AgsThreadPool *thread_pool; GList *worker; }; struct _AgsThreadApplicationContextClass { AgsApplicationContextClass application_contex; }; GType ags_thread_application_context_get_type(); void ags_thread_application_context_register_types(AgsApplicationContext *application_context); AgsThreadApplicationContext* ags_thread_application_context_new(); #endif /*__AGS_THREAD_APPLICATION_CONTEXT_H__*/ gsequencer-1.4.24/ags/thread/ags_thread-posix.c0000644000175000017500000026226313256163135016332 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef __APPLE__ #include #include #endif #include #include void ags_thread_class_init(AgsThreadClass *thread); void ags_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_thread_init(AgsThread *thread); void ags_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_thread_connect(AgsConnectable *connectable); void ags_thread_disconnect(AgsConnectable *connectable); void ags_thread_finalize(GObject *gobject); guint ags_thread_real_clock(AgsThread *thread); void ags_thread_real_start(AgsThread *thread); void* ags_thread_timer(void *ptr); void* ags_thread_loop(void *ptr); void ags_thread_real_timelock(AgsThread *thread); void* ags_thread_timelock_loop(void *ptr); void ags_thread_real_stop(AgsThread *thread); void ags_thread_interrupt_callback(AgsMainLoop *main_loop, int sig, guint time_cycle, guint *time_spent, AgsThread *thread); static void ags_thread_self_create(); /** * SECTION:ags_thread-posix * @short_description: threads * @title: AgsThread * @section_id: * @include: ags/thread/ags_thread.h * * The #AgsThread base class. It supports organizing them within a tree, * perform syncing and frequencies. */ enum{ PROP_0, PROP_FREQUENCY, PROP_MAX_PRECISION, }; enum{ CLOCK, START, RUN, SUSPEND, RESUME, TIMELOCK, STOP, INTERRUPTED, LAST_SIGNAL, }; static gpointer ags_thread_parent_class = NULL; static guint thread_signals[LAST_SIGNAL]; /* Key for the thread-specific AgsThread */ static pthread_key_t ags_thread_key; /* Once-only initialisation of the key */ static pthread_once_t ags_thread_key_once = PTHREAD_ONCE_INIT; GType ags_thread_get_type() { static GType ags_type_thread = 0; if(!ags_type_thread){ const GTypeInfo ags_thread_info = { sizeof (AgsThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_thread_init, }; const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_thread = g_type_register_static(G_TYPE_OBJECT, "AgsThread", &ags_thread_info, 0); g_type_add_interface_static(ags_type_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_thread); } void ags_thread_class_init(AgsThreadClass *thread) { GObjectClass *gobject; GParamSpec *param_spec; ags_thread_parent_class = g_type_class_peek_parent(thread); /* GObject */ gobject = (GObjectClass *) thread; gobject->set_property = ags_thread_set_property; gobject->get_property = ags_thread_get_property; gobject->finalize = ags_thread_finalize; /* properties */ /** * AgsThread:frequency: * * The frequency to run at in Hz. * * Since: 1.0.0 */ param_spec = g_param_spec_double("frequency", i18n_pspec("frequency as JIFFIE"), i18n_pspec("frequency as JIFFIE"), 0.01, AGS_THREAD_DEFAULT_MAX_PRECISION, AGS_THREAD_DEFAULT_JIFFIE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FREQUENCY, param_spec); /** * AgsThread:max-precision: * * The max-frequency to run at in Hz. * * Since: 1.0.0 */ param_spec = g_param_spec_double("max-precision", i18n_pspec("max precision as JIFFIE"), i18n_pspec("The max precision as JIFFIE"), 0.01, AGS_THREAD_MAX_PRECISION, AGS_THREAD_DEFAULT_MAX_PRECISION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FREQUENCY, param_spec); /* AgsThread */ thread->clock = ags_thread_real_clock; thread->start = ags_thread_real_start; thread->run = NULL; thread->suspend = NULL; thread->resume = NULL; thread->timelock = ags_thread_real_timelock; thread->stop = ags_thread_real_stop; thread->interrupted = NULL; /* signals */ /** * AgsThread::clock: * @thread: the #AgsThread * * The ::clock() signal is invoked every thread tic. * * Returns: the number of cycles to perform * * Since: 1.0.0 */ thread_signals[CLOCK] = g_signal_new("clock", G_TYPE_FROM_CLASS (thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsThreadClass, clock), NULL, NULL, g_cclosure_user_marshal_UINT__VOID, G_TYPE_UINT, 0); /** * AgsThread::start: * @thread: the #AgsThread * * The ::start() signal is invoked as thread started. * * Since: 1.0.0 */ thread_signals[START] = g_signal_new("start", G_TYPE_FROM_CLASS (thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsThreadClass, start), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsThread::run: * @thread: the #AgsThread * * The ::run() signal is invoked during run loop. * * Since: 1.0.0 */ thread_signals[RUN] = g_signal_new("run", G_TYPE_FROM_CLASS (thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsThreadClass, run), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsThread::suspend: * @thread: the #AgsThread * * The ::suspend() signal is invoked during suspending. * * Since: 1.0.0 */ thread_signals[SUSPEND] = g_signal_new("suspend", G_TYPE_FROM_CLASS (thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsThreadClass, suspend), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsThread::resume: * @thread: the #AgsThread * * The ::resume() signal is invoked during resuming. * * Since: 1.0.0 */ thread_signals[RESUME] = g_signal_new("resume", G_TYPE_FROM_CLASS (thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsThreadClass, resume), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsThread::timelock: * @thread: the #AgsThread * * The ::timelock() signal is invoked as standard compution * time exceeded. * * Since: 1.0.0 */ thread_signals[TIMELOCK] = g_signal_new("timelock", G_TYPE_FROM_CLASS (thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsThreadClass, timelock), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsThread::stop: * @thread: the #AgsThread * * The ::stop() signal is invoked as @thread stopped. * * Since: 1.0.0 */ thread_signals[STOP] = g_signal_new("stop", G_TYPE_FROM_CLASS (thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsThreadClass, stop), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsThread::interrupted: * @thread: the #AgsThread * @sig: the signal number * @time_cycle: the cycles duration * @time_spent: the time spent * * The ::interrupted() signal is invoked as @thread should resume from interrupt. * * Returns: the time spent * * Since: 1.0.0 */ thread_signals[INTERRUPTED] = g_signal_new("interrupted", G_TYPE_FROM_CLASS (thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsThreadClass, interrupted), NULL, NULL, g_cclosure_user_marshal_UINT__INT_UINT_POINTER, G_TYPE_UINT, 3, G_TYPE_INT, G_TYPE_UINT, G_TYPE_POINTER); } void ags_thread_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_thread_connect; connectable->disconnect = ags_thread_disconnect; } void ags_thread_init(AgsThread *thread) { AgsMutexManager *mutex_manager; AgsConditionManager *condition_manager; AgsConfig *config; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_cond_t *cond; pthread_mutexattr_t *attr; int err; config = ags_config_get_instance(); /* insert audio loop mutex */ thread->obj_mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ err = pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); if(err != 0){ g_warning("no priority inheritance"); } #endif thread->obj_mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) thread, mutex); pthread_mutex_unlock(application_mutex); /* the condition */ thread->obj_condattr = NULL; thread->obj_cond = cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(cond, NULL); condition_manager = ags_condition_manager_get_instance(); pthread_mutex_lock(application_mutex); ags_condition_manager_insert(condition_manager, (GObject *) thread, cond); pthread_mutex_unlock(application_mutex); /* fields */ g_atomic_int_set(&(thread->flags), 0); g_atomic_int_set(&(thread->sync_flags), 0); /* clock */ thread->delay = 0; thread->tic_delay = 0; thread->current_tic = 0; thread->cycle_iteration = 0; g_atomic_int_set(&(thread->time_late), 0); thread->computing_time = (struct timespec *) malloc(sizeof(struct timespec)); thread->computing_time->tv_sec = 0; thread->computing_time->tv_nsec = 0; /* thread, mutex and cond */ thread->thread = (pthread_t *) malloc(sizeof(pthread_t)); thread->thread_attr = (pthread_attr_t *) malloc(sizeof(pthread_attr_t)); pthread_attr_init(thread->thread_attr); thread->freq = AGS_THREAD_DEFAULT_JIFFIE; thread->max_precision = AGS_THREAD_DEFAULT_MAX_PRECISION; /* max precision */ str = ags_config_get_value(config, AGS_CONFIG_THREAD, "max-precision"); if(str != NULL){ thread->max_precision = g_ascii_strtod(str, NULL); } thread->mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(thread->mutexattr); pthread_mutexattr_settype(thread->mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(thread->mutexattr, PTHREAD_PRIO_INHERIT); #endif thread->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(thread->mutex, thread->mutexattr); thread->cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(thread->cond, NULL); /* start notify */ g_atomic_pointer_set(&(thread->start_queue), NULL); thread->start_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(thread->start_mutex, NULL); thread->start_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(thread->start_cond, NULL); g_atomic_int_set(&(thread->start_wait), FALSE); g_atomic_int_set(&(thread->start_done), FALSE); /* barrier */ #ifndef __APPLE__ thread->barrier = (pthread_barrier_t **) malloc(2 * sizeof(pthread_barrier_t *)); thread->barrier[0] = (pthread_barrier_t *) malloc(sizeof(pthread_barrier_t)); thread->barrier[1] = (pthread_barrier_t *) malloc(sizeof(pthread_barrier_t)); #else thread->barrier = NULL; #endif thread->first_barrier = TRUE; thread->wait_count[0] = 1; thread->wait_count[1] = 1; /* timelock */ thread->timelock_thread = (pthread_t *) malloc(sizeof(pthread_t)); thread->timelock_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(thread->timelock_mutex, NULL); thread->timelock_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(thread->timelock_cond, NULL); thread->greedy_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(thread->greedy_mutex, NULL); thread->greedy_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(thread->greedy_cond, NULL); g_atomic_int_set(&(thread->locked_greedy), 0); thread->timelock.tv_sec = 0; thread->timelock.tv_nsec = floor(NSEC_PER_SEC / AGS_THREAD_HERTZ_JIFFIE / 5); thread->greedy_locks = NULL; g_atomic_int_set(&(thread->timer_wait), FALSE); g_atomic_int_set(&(thread->timer_expired), FALSE); thread->suspend_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(thread->suspend_mutex, NULL); thread->timer_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(thread->timer_mutex, NULL); thread->timer_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(thread->timer_cond, NULL); /* tree */ g_atomic_pointer_set(&(thread->parent), NULL); g_atomic_pointer_set(&(thread->children), NULL); g_atomic_pointer_set(&(thread->next), NULL); g_atomic_pointer_set(&(thread->prev), NULL); thread->data = NULL; } void ags_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsThread *thread; thread = AGS_THREAD(gobject); switch(prop_id){ case PROP_FREQUENCY: { gdouble freq; freq = g_value_get_double(value); if(freq == thread->freq){ return; } thread->freq = freq; thread->delay = (guint) ceil((AGS_THREAD_HERTZ_JIFFIE / thread->freq) / (AGS_THREAD_HERTZ_JIFFIE / thread->max_precision)); thread->tic_delay = 0; if((AGS_THREAD_INTERMEDIATE_POST_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ thread->tic_delay = thread->delay; }else if((AGS_THREAD_INTERMEDIATE_PRE_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ thread->tic_delay = 1; }else{ thread->tic_delay = 0; } } break; case PROP_MAX_PRECISION: { gdouble max_precision; gdouble old_max_precision; max_precision = g_value_get_double(value); if(max_precision == thread->max_precision){ return; } old_max_precision = thread->max_precision; thread->max_precision = max_precision; thread->freq = thread->freq / old_max_precision * max_precision; thread->delay = (guint) ceil((AGS_THREAD_HERTZ_JIFFIE / thread->freq) / (AGS_THREAD_HERTZ_JIFFIE / thread->max_precision)); thread->tic_delay = 0; if((AGS_THREAD_INTERMEDIATE_POST_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ thread->tic_delay = thread->delay; }else if((AGS_THREAD_INTERMEDIATE_PRE_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ thread->tic_delay = 1; }else{ thread->tic_delay = 0; } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsThread *thread; thread = AGS_THREAD(gobject); switch(prop_id){ case PROP_FREQUENCY: { g_value_set_double(value, thread->freq); } break; case PROP_MAX_PRECISION: { g_value_set_double(value, thread->max_precision); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_thread_connect(AgsConnectable *connectable) { AgsThread *thread, *child; thread = AGS_THREAD(connectable); if((AGS_THREAD_CONNECTED & (g_atomic_int_get(&(thread->flags)))) != 0){ return; } #ifdef AGS_DEBUG g_message("connecting thread"); #endif child = g_atomic_pointer_get(&(thread->children)); while(child != NULL){ ags_connectable_connect(AGS_CONNECTABLE(child)); child = g_atomic_pointer_get(&(child->next)); } } void ags_thread_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_thread_finalize(GObject *gobject) { AgsThread *thread, *parent; AgsMutexManager *mutex_manager; AgsConditionManager *condition_manager; gboolean running; gboolean do_exit; pthread_t *thread_ptr; pthread_attr_t *thread_attr; pthread_mutex_t *application_mutex; void *stackaddr; size_t stacksize; thread = AGS_THREAD(gobject); if(thread == ags_thread_self()){ do_exit = TRUE; }else{ do_exit = FALSE; } thread_attr = thread->thread_attr; thread_ptr = thread->thread; running = ((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0) ? TRUE: FALSE; #ifdef AGS_DEBUG g_message("fin %s", G_OBJECT_TYPE_NAME(gobject)); #endif if((parent = g_atomic_pointer_get(&(thread->parent))) != NULL){ pthread_mutex_lock(parent->start_mutex); g_atomic_pointer_set(&(parent->start_queue), g_list_remove(g_atomic_pointer_get(&(parent->start_queue)), thread)); pthread_mutex_unlock(parent->start_mutex); ags_thread_remove_child(parent, thread); } /* */ mutex_manager = ags_mutex_manager_get_instance(); condition_manager = ags_condition_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, (GObject *) thread); pthread_mutexattr_destroy(thread->obj_mutexattr); free(thread->obj_mutexattr); ags_condition_manager_remove(condition_manager, (GObject *) thread); /* */ free(thread->computing_time); /* */ if(thread->barrier != NULL){ #ifndef __APPLE__ free(thread->barrier[0]); free(thread->barrier[1]); free(thread->barrier); #endif } /* */ pthread_attr_getstack(thread_attr, &stackaddr, &stacksize); pthread_mutexattr_destroy(thread->mutexattr); pthread_mutex_destroy(thread->mutex); free(thread->mutex); pthread_cond_destroy(thread->cond); free(thread->cond); /* */ pthread_mutex_lock(thread->start_mutex); pthread_cond_destroy(thread->start_cond); free(thread->start_cond); pthread_mutex_unlock(thread->start_mutex); pthread_mutex_destroy(thread->start_mutex); free(thread->start_mutex); pthread_mutex_destroy(thread->timelock_mutex); free(thread->timelock_mutex); pthread_cond_destroy(thread->timelock_cond); free(thread->timelock_cond); pthread_mutex_destroy(thread->greedy_mutex); free(thread->greedy_mutex); pthread_cond_destroy(thread->greedy_cond); free(thread->greedy_cond); pthread_mutex_destroy(thread->suspend_mutex); free(thread->suspend_mutex); /* */ pthread_mutex_destroy(thread->timer_mutex); free(thread->timer_mutex); pthread_cond_destroy(thread->timer_cond); free(thread->timer_cond); /* call parent */ G_OBJECT_CLASS(ags_thread_parent_class)->finalize(gobject); if(running){ pthread_detach(*thread_ptr); } pthread_mutex_unlock(application_mutex); pthread_attr_destroy(thread_attr); free(thread_attr); // free(*thread_ptr); free(thread_ptr); if(stackaddr != NULL){ // free(stackaddr); } if(do_exit){ pthread_exit(NULL); } } void ags_thread_resume_handler(int sig) { if(ags_thread_self() == NULL){ return; } #ifdef AGS_DEBUG g_message("thread resume"); #endif g_atomic_int_and(&(ags_thread_self()->flags), (~AGS_THREAD_SUSPENDED)); ags_thread_resume(ags_thread_self()); } void ags_thread_suspend_handler(int sig) { #ifdef AGS_DEBUG g_message("thread suspend"); #endif if(ags_thread_self == NULL){ return; } if ((AGS_THREAD_SUSPENDED & (g_atomic_int_get(&(ags_thread_self()->flags)))) != 0) return; g_atomic_int_or(&(ags_thread_self()->flags), AGS_THREAD_SUSPENDED); ags_thread_suspend(ags_thread_self()); do sigsuspend(&(ags_thread_self()->wait_mask)); while ((AGS_THREAD_SUSPENDED & (g_atomic_int_get(&(ags_thread_self()->flags)))) != 0); } /** * ags_thread_set_sync: * @thread: an #AgsThread * @tic: the tic as sync occured. * * Unsets AGS_THREAD_WAIT_0, AGS_THREAD_WAIT_1 or AGS_THREAD_WAIT_2. * Additionaly the thread is woken up by this function if waiting. * * Since: 1.0.0 */ void ags_thread_set_sync(AgsThread *thread, guint tic) { guint next_tic; guint flags, sync_flags; gboolean broadcast; gboolean waiting; if(thread == NULL){ return; } broadcast = FALSE; waiting = FALSE; if(tic > 2){ tic = tic % 3; } pthread_mutex_lock(thread->mutex); flags = g_atomic_int_get(&(thread->flags)); sync_flags = g_atomic_int_get(&(thread->sync_flags)); /* return if no immediate sync and initial run */ if((AGS_THREAD_IMMEDIATE_SYNC & (g_atomic_int_get(&(thread->flags)))) == 0){ if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) != 0){ pthread_mutex_unlock(thread->mutex); return; } } /* get next tic and check waiting */ switch(tic){ case 0: { if((AGS_THREAD_WAIT_0 & sync_flags) != 0){ next_tic = 1; waiting = TRUE; } } break; case 1: { if((AGS_THREAD_WAIT_1 & sync_flags) != 0){ next_tic = 2; waiting = TRUE; } } break; case 2: { if((AGS_THREAD_WAIT_2 & sync_flags) != 0){ next_tic = 0; waiting = TRUE; } } break; } /* unset wait flag */ switch(tic){ case 0: { if((AGS_THREAD_WAIT_0 & sync_flags) != 0){ g_atomic_int_and(&(thread->sync_flags), (~AGS_THREAD_WAIT_0)); } } break; case 1: { if((AGS_THREAD_WAIT_1 & sync_flags) != 0){ g_atomic_int_and(&(thread->sync_flags), (~AGS_THREAD_WAIT_1)); } } break; case 2: { if((AGS_THREAD_WAIT_2 & sync_flags) != 0){ g_atomic_int_and(&(thread->sync_flags), (~AGS_THREAD_WAIT_2)); } } break; } /* signal waiting thread */ if((AGS_THREAD_WAITING & (g_atomic_int_get(&(thread->flags)))) != 0){ g_atomic_int_and(&(thread->flags), (~AGS_THREAD_WAITING)); if(broadcast){ pthread_cond_broadcast(thread->cond); }else{ pthread_cond_signal(thread->cond); } } thread->current_tic = next_tic; g_atomic_int_and(&(thread->flags), (~AGS_THREAD_WAITING)); /* */ pthread_mutex_unlock(thread->mutex); } /** * ags_thread_set_sync_all: * @thread: an #AgsThread * @tic: the tic as sync occured. * * Calls ags_thread_set_sync() on all threads. * * Since: 1.0.0 */ void ags_thread_set_sync_all(AgsThread *thread, guint tic) { AgsThread *main_loop; auto void ags_thread_set_sync_all_reset(AgsThread *thread); auto void ags_thread_set_sync_all_recursive(AgsThread *thread, guint tic); void ags_thread_set_sync_all_reset(AgsThread *thread){ AgsThread *child; /* reset chaos tree */ g_atomic_int_and(&(thread->flags), ~AGS_THREAD_IS_CHAOS_TREE); /* descend */ child = g_atomic_pointer_get(&(thread->children)); while(child != NULL){ ags_thread_set_sync_all_reset(child); child = g_atomic_pointer_get(&(child->next)); } /* increment delay counter and set run per cycle */ if(thread->freq >= thread->max_precision){ thread->tic_delay = 0; }else{ if(thread->tic_delay < thread->delay){ thread->tic_delay++; }else{ thread->tic_delay = 0; } } } void ags_thread_set_sync_all_recursive(AgsThread *thread, guint tic){ AgsThread *child; ags_thread_set_sync(thread, tic); child = g_atomic_pointer_get(&(thread->children)); while(child != NULL){ ags_thread_set_sync_all_recursive(child, tic); child = g_atomic_pointer_get(&(child->next)); } } /* entry point */ main_loop = ags_thread_get_toplevel(thread); ags_thread_set_sync_all_reset(main_loop); ags_thread_set_sync_all_recursive(main_loop, tic); } /** * ags_thread_reset_all: * @thread: the #AgsThread * * Reset all threads. E.g. suspended threads. A synchronization * stage after #AgsAsyncQueue run. * * Since: 1.0.0 */ void ags_thread_reset_all(AgsThread *thread) { AgsThread *main_loop; auto void ags_thread_reset_all_recursive(AgsThread *thread); void ags_thread_reset_all_recursive(AgsThread *thread){ AgsThread *child; /* check main loop monitor if suspended and interrupted */ if((AGS_THREAD_SUSPENDED & g_atomic_int_get(&(thread->flags))) == 0){ if((AGS_THREAD_INTERRUPTED & g_atomic_int_get(&(thread->sync_flags))) != 0){ if(ags_main_loop_monitor(AGS_MAIN_LOOP(main_loop), 0, NULL)){ g_atomic_int_and(&(thread->sync_flags), ~(AGS_THREAD_INTERRUPTED | AGS_THREAD_MONITORING)); } } }else{ if((AGS_THREAD_INTERRUPTED & g_atomic_int_get(&(thread->sync_flags))) != 0){ if(ags_main_loop_monitor(AGS_MAIN_LOOP(main_loop), 0, NULL)){ if((AGS_THREAD_RESUME_INTERRUPTED & g_atomic_int_get(&(thread->sync_flags))) != 0 || (AGS_THREAD_RECOVER_INTERRUPTED & g_atomic_int_get(&(thread->sync_flags))) != 0){ #ifdef AGS_PTHREAD_RESUME pthread_resume(thread->thread); #else pthread_kill(*(thread->thread), AGS_THREAD_RESUME_SIG); #endif } if((AGS_THREAD_RECOVER_INTERRUPTED & g_atomic_int_get(&(thread->sync_flags))) != 0 || ((AGS_THREAD_RESUME_INTERRUPTED & g_atomic_int_get(&(thread->sync_flags))) != 0 && (AGS_THREAD_MONITORING & g_atomic_int_get(&(thread->sync_flags))) != 0)){ g_atomic_int_and(&(thread->sync_flags), ~(AGS_THREAD_INTERRUPTED | AGS_THREAD_MONITORING)); }else{ g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_MONITORING); } }else{ g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_MONITORING); } } } /* descend */ child = g_atomic_pointer_get(&(thread->children)); while(child != NULL){ ags_thread_reset_all_recursive(child); child = g_atomic_pointer_get(&(child->next)); } } /* entry point */ main_loop = ags_thread_get_toplevel(thread); ags_thread_reset_all_recursive(main_loop); } /** * ags_thread_lock: * @thread: an #AgsThread * * Locks the threads own mutex and sets the appropriate flag. * * Since: 1.0.0 */ void ags_thread_lock(AgsThread *thread) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(thread == NULL){ return; } /* lookup mutices */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) thread); pthread_mutex_unlock(application_mutex); /* lock */ pthread_mutex_lock(mutex); g_atomic_int_or(&(thread->flags), (AGS_THREAD_LOCKED)); } /** * ags_thread_trylock: * @thread: an #AgsThread * * Locks the threads own mutex if available and sets the * appropriate flag and returning %TRUE. Otherwise return %FALSE * without lock. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_thread_trylock(AgsThread *thread) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(thread == NULL){ return(FALSE); } /* lookup mutices */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) thread); pthread_mutex_unlock(application_mutex); /* lock */ if(pthread_mutex_trylock(mutex) != 0){ return(FALSE); } g_atomic_int_or(&(thread->flags), (AGS_THREAD_LOCKED)); return(TRUE); } /** * ags_thread_unlock: * @thread: an #AgsThread * * Unlocks the threads own mutex and unsets the appropriate flag. * * Since: 1.0.0 */ void ags_thread_unlock(AgsThread *thread) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(thread == NULL){ return; } /* lookup mutices */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) thread); pthread_mutex_unlock(application_mutex); /* unlock */ g_atomic_int_and(&(thread->flags), (~AGS_THREAD_LOCKED)); pthread_mutex_unlock(mutex); } /** * ags_thread_get_toplevel: * @thread: an #AgsThread * * Retrieve toplevel thread. * * Returns: the toplevevel #AgsThread * * Since: 1.0.0 */ AgsThread* ags_thread_get_toplevel(AgsThread *thread) { if(thread == NULL){ return(NULL); } while(g_atomic_pointer_get(&(thread->parent)) != NULL){ thread = g_atomic_pointer_get(&(thread->parent)); } return(thread); } /** * ags_thread_first: * @thread: an #AgsThread * * Retrieve first sibling. * * Returns: the very first #AgsThread within same tree level * * Since: 1.0.0 */ AgsThread* ags_thread_first(AgsThread *thread) { if(thread == NULL){ return(NULL); } while(g_atomic_pointer_get(&(thread->prev)) != NULL){ thread = g_atomic_pointer_get(&(thread->prev)); } return(thread); } /** * ags_thread_last: * @thread: an #AgsThread * * Retrieve last sibling. * * Returns: the very last @AgsThread within same tree level * * Since: 1.0.0 */ AgsThread* ags_thread_last(AgsThread *thread) { if(thread == NULL){ return(NULL); } while(g_atomic_pointer_get(&(thread->next)) != NULL){ thread = g_atomic_pointer_get(&(thread->next)); } return(thread); } /** * ags_thread_remove_child: * @thread: an #AgsThread * @child: the child to remove * * Remove child of thread. * * Since: 1.0.0 */ void ags_thread_remove_child(AgsThread *thread, AgsThread *child) { AgsThread *main_loop; AgsThread *prev, *next; if(thread == NULL || child == NULL){ return; } main_loop = ags_thread_get_toplevel(thread); // pthread_mutex_lock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); if(g_atomic_pointer_get(&(thread->children)) == child){ g_atomic_pointer_set(&(thread->children), g_atomic_pointer_get(&(child->next))); } //FIXME:JK: should be protected by a mutex if((prev = g_atomic_pointer_get(&(child->prev))) != NULL){ g_atomic_pointer_set(&(prev->next), g_atomic_pointer_get(&(child->next))); } if((next = g_atomic_pointer_get(&(child->next))) != NULL){ g_atomic_pointer_set(&(next->prev), g_atomic_pointer_get(&(child->prev))); } g_atomic_pointer_set(&(child->parent), NULL); g_atomic_pointer_set(&(child->prev), NULL); g_atomic_pointer_set(&(child->next), NULL); g_object_unref(thread); g_object_unref(child); // pthread_mutex_unlock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); } /** * ags_thread_add_child: * @thread: an #AgsThread * @child: the child to remove * * Add child to thread. * * Since: 1.0.0 */ void ags_thread_add_child(AgsThread *thread, AgsThread *child) { ags_thread_add_child_extended(thread, child, FALSE, TRUE); } /** * ags_thread_add_child_extended: * @thread: an #AgsThread * @child: the child to remove * @no_start: don't start thread * @no_wait: don't wait until started * * Add child to thread. * * Since: 1.0.0 */ void ags_thread_add_child_extended(AgsThread *thread, AgsThread *child, gboolean no_start, gboolean no_wait) { AgsThread *main_loop; if(thread == NULL || child == NULL || g_atomic_pointer_get(&(child->parent)) == thread){ return; } main_loop = ags_thread_get_toplevel(thread); if(AGS_IS_MAIN_LOOP(main_loop)){ pthread_mutex_lock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); g_signal_connect(AGS_MAIN_LOOP(main_loop), "interrupt", G_CALLBACK(ags_thread_interrupt_callback), child); } g_object_ref(thread); g_object_ref(child); g_atomic_pointer_set(&(child->parent), thread); if(g_atomic_pointer_get(&(thread->children)) == NULL){ g_atomic_pointer_set(&(thread->children), child); }else{ AgsThread *sibling; sibling = ags_thread_last(g_atomic_pointer_get(&(thread->children))); g_atomic_pointer_set(&(sibling->next), child); g_atomic_pointer_set(&(child->prev), sibling); } if(AGS_IS_MAIN_LOOP(main_loop)){ pthread_mutex_unlock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); } if(!no_start){ if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) == 0){ /* start child */ ags_thread_start(child); if(!no_wait){ guint val; /* wait child */ pthread_mutex_lock(child->start_mutex); g_atomic_int_set(&(child->start_wait), TRUE); if(g_atomic_int_get(&(child->start_wait)) == TRUE && g_atomic_int_get(&(child->start_done)) == FALSE){ while(g_atomic_int_get(&(child->start_wait)) == TRUE && g_atomic_int_get(&(child->start_done)) == FALSE){ pthread_cond_wait(child->start_cond, child->start_mutex); } } pthread_mutex_unlock(child->start_mutex); } } } } /** * ags_thread_parental_is_locked: * @thread: an #AgsThread * @parent: where to stop iteration * * Check the AGS_THREAD_LOCKED flag in parental levels. * * Returns: %TRUE if locked otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_thread_parental_is_locked(AgsThread *thread, AgsThread *parent) { AgsThread *current; if(thread == NULL){ return(FALSE); } current = g_atomic_pointer_get(&(thread->parent)); while(current != parent){ if((AGS_THREAD_LOCKED & (g_atomic_int_get(&(current->flags)))) != 0){ return(TRUE); } current = g_atomic_pointer_get(&(current->parent)); } return(FALSE); } /** * ags_thread_sibling_is_locked: * @thread: an #AgsThread * * Check the AGS_THREAD_LOCKED flag within sibling. * * Returns: %TRUE if locked otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_thread_sibling_is_locked(AgsThread *thread) { AgsThread *iter; if(thread == NULL){ return(FALSE); } iter = ags_thread_first(thread); while(iter != NULL){ if(iter != thread && (AGS_THREAD_LOCKED & (g_atomic_int_get(&(iter->flags)))) != 0){ return(TRUE); } iter = g_atomic_pointer_get(&(iter->next)); } return(FALSE); } /** * ags_thread_children_is_locked: * @thread: an #AgsThread * * Check the AGS_THREAD_LOCKED flag within children. * * Returns: %TRUE if locked otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_thread_children_is_locked(AgsThread *thread) { auto gboolean ags_thread_children_is_locked_recursive(AgsThread *thread); gboolean ags_thread_children_is_locked_recursive(AgsThread *thread){ AgsThread *child; if(thread == NULL){ return(FALSE); } if((AGS_THREAD_LOCKED & (g_atomic_int_get(&(thread->flags)))) != 0){ return(TRUE); } child = g_atomic_pointer_get(&(thread->children)); while(child != NULL){ if(ags_thread_children_is_locked_recursive(child)){ return(TRUE); } child = g_atomic_pointer_get(&(child->next)); } return(FALSE); } if(thread == NULL){ return(FALSE); } return(ags_thread_children_is_locked_recursive(thread)); } gboolean ags_thread_is_current_ready(AgsThread *current, guint tic) { AgsThread *toplevel; guint flags, sync_flags; gboolean retval; toplevel = ags_thread_get_toplevel(current); pthread_mutex_lock(current->mutex); flags = g_atomic_int_get(&(current->flags)); sync_flags = g_atomic_int_get(&(current->sync_flags)); retval = FALSE; if((AGS_THREAD_RUNNING & flags) == 0){ retval = TRUE; } if((AGS_THREAD_IMMEDIATE_SYNC & flags) == 0){ if((AGS_THREAD_INITIAL_RUN & flags) != 0){ pthread_mutex_unlock(current->mutex); return(FALSE); } } if((AGS_THREAD_READY & flags) != 0){ retval = TRUE; } if((AGS_THREAD_SUSPENDED & flags) != 0 && (AGS_THREAD_INTERRUPTED & sync_flags) != 0){ retval = TRUE; } if(retval){ pthread_mutex_unlock(current->mutex); return(TRUE); } if(tic > 2){ tic = tic % 3; } switch(tic){ case 0: { if((AGS_THREAD_WAIT_0 & sync_flags) == 0){ retval = TRUE; } } break; case 1: { if((AGS_THREAD_WAIT_1 & sync_flags) == 0){ retval = TRUE; } } break; case 2: { if((AGS_THREAD_WAIT_2 & sync_flags) == 0){ retval = TRUE; } } break; } pthread_mutex_unlock(current->mutex); return(retval); } gboolean ags_thread_is_tree_ready(AgsThread *thread, guint tic) { AgsThread *main_loop; gboolean retval; auto gboolean ags_thread_is_tree_ready_current_tic(AgsThread *current); auto gboolean ags_thread_is_tree_ready_recursive(AgsThread *current); gboolean ags_thread_is_tree_ready_current_tic(AgsThread *current){ AgsThread *toplevel; guint flags, sync_flags; gboolean retval; toplevel = ags_thread_get_toplevel(current); pthread_mutex_lock(current->mutex); flags = g_atomic_int_get(&(current->flags)); sync_flags = g_atomic_int_get(&(current->sync_flags)); retval = FALSE; if((AGS_THREAD_RUNNING & flags) == 0){ retval = TRUE; } if((AGS_THREAD_IMMEDIATE_SYNC & (g_atomic_int_get(&(thread->flags)))) == 0){ if((AGS_THREAD_INITIAL_RUN & flags) != 0){ pthread_mutex_unlock(current->mutex); return(FALSE); } } if((AGS_THREAD_READY & flags) != 0){ retval = TRUE; } if((AGS_THREAD_SUSPENDED & flags) != 0 && (AGS_THREAD_INTERRUPTED & sync_flags) != 0){ retval = TRUE; } if(retval){ pthread_mutex_unlock(current->mutex); return(TRUE); } if(tic > 2){ tic = tic % 3; } switch(tic){ case 0: { if((AGS_THREAD_WAIT_0 & sync_flags) != 0){ retval = TRUE; } } break; case 1: { if((AGS_THREAD_WAIT_1 & sync_flags) != 0){ retval = TRUE; } } break; case 2: { if((AGS_THREAD_WAIT_2 & sync_flags) != 0){ retval = TRUE; } } break; } pthread_mutex_unlock(current->mutex); return(retval); } gboolean ags_thread_is_tree_ready_recursive(AgsThread *current){ AgsThread *children; children = g_atomic_pointer_get(&(current->children)); if(!ags_thread_is_tree_ready_current_tic(current)){ return(FALSE); } while(children != NULL){ if(!ags_thread_is_tree_ready_recursive(children)){ return(FALSE); } children = g_atomic_pointer_get(&(children->next)); } return(TRUE); } main_loop = ags_thread_get_toplevel(thread); retval = ags_thread_is_tree_ready_recursive(main_loop); return(retval); } /** * ags_thread_next_parent_locked: * @thread: an #AgsThread * @parent: the parent #AgsThread where to stop. * * Retrieve next locked thread above @thread. * * Returns: next matching #AgsThread * * Since: 1.0.0 */ AgsThread* ags_thread_next_parent_locked(AgsThread *thread, AgsThread *parent) { AgsThread *current; if(thread == NULL){ return(NULL); } current = g_atomic_pointer_get(&(thread->parent)); while(current != parent){ if((AGS_THREAD_WAITING_FOR_CHILDREN & (g_atomic_int_get(&(current->sync_flags)))) != 0){ return(current); } current = g_atomic_pointer_get(&(current->parent)); } return(NULL); } /** * ags_thread_next_sibling_locked: * @thread: an #AgsThread * * Retrieve next locked thread neighbooring @thread * * Returns: next matching #AgsThread * * Since: 1.0.0 */ AgsThread* ags_thread_next_sibling_locked(AgsThread *thread) { AgsThread *current; if(thread == NULL){ return(NULL); } current = ags_thread_first(thread); while(current != NULL){ if(current == thread){ current = g_atomic_pointer_get(&(current->next)); continue; } if((AGS_THREAD_WAITING_FOR_SIBLING & (g_atomic_int_get(&(current->sync_flags)))) != 0){ return(current); } current = g_atomic_pointer_get(&(current->next)); } return(NULL); } /** * ags_thread_next_children_locked: * @thread: an #AgsThread * * Retrieve next locked thread following @thread * * Returns: next matching #AgsThread * * Since: 1.0.0 */ AgsThread* ags_thread_next_children_locked(AgsThread *thread) { auto AgsThread* ags_thread_next_children_locked_recursive(AgsThread *thread); AgsThread* ags_thread_next_children_locked_recursive(AgsThread *child){ AgsThread *current, *retval; current = ags_thread_last(child); while(current != NULL){ retval = ags_thread_next_children_locked_recursive(g_atomic_pointer_get(&(current->children))); if(retval != NULL){ return(retval); } if((AGS_THREAD_WAITING_FOR_PARENT & (g_atomic_int_get(&(current->sync_flags)))) != 0){ return(current); } current = g_atomic_pointer_get(&(current->prev)); } return(NULL); } if(thread == NULL){ return(NULL); } return(ags_thread_next_children_locked_recursive(g_atomic_pointer_get(&(thread->children)))); } /** * ags_thread_lock_parent: * @thread: an #AgsThread * @parent: the parent #AgsThread where to stop. * * Lock parent tree structure. * * Since: 1.0.0 */ void ags_thread_lock_parent(AgsThread *thread, AgsThread *parent) { AgsThread *current; if(thread == NULL){ return; } ags_thread_lock(thread); current = g_atomic_pointer_get(&(thread->parent)); while(current != parent){ ags_thread_lock(current); g_atomic_int_or(&(current->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); current = g_atomic_pointer_get(&(current->parent)); } } /** * ags_thread_lock_sibling: * @thread: an #AgsThread * * Lock sibling tree structure. * * Since: 1.0.0 */ void ags_thread_lock_sibling(AgsThread *thread) { AgsThread *current; if(thread == NULL){ return; } ags_thread_lock(thread); current = ags_thread_first(thread); while(current != NULL){ if(current == thread){ current = g_atomic_pointer_get(&(current->next)); continue; } ags_thread_lock(current); g_atomic_int_or(&(current->sync_flags), AGS_THREAD_WAITING_FOR_SIBLING); current = g_atomic_pointer_get(&(current->next)); } } /** * ags_thread_lock_children: * @thread: an #AgsThread * * Lock child tree structure. * * Since: 1.0.0 */ void ags_thread_lock_children(AgsThread *thread) { auto void ags_thread_lock_children_recursive(AgsThread *child); void ags_thread_lock_children_recursive(AgsThread *child){ AgsThread *current; current = ags_thread_last(child); while(current != NULL){ ags_thread_lock_children_recursive(g_atomic_pointer_get(&(current->children))); ags_thread_lock(current); g_atomic_int_or(&(current->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); current = g_atomic_pointer_get(&(current->prev)); } } ags_thread_lock(thread); ags_thread_lock_children_recursive(g_atomic_pointer_get(&(thread->children))); } void ags_thread_lock_all(AgsThread *thread) { ags_thread_lock_parent(thread, NULL); ags_thread_lock_sibling(thread); ags_thread_lock_children(thread); } /** * ags_thread_unlock_parent: * @thread: an #AgsThread * @parent: the parent #AgsThread where to stop. * * Unlock parent tree structure. * * Since: 1.0.0 */ void ags_thread_unlock_parent(AgsThread *thread, AgsThread *parent) { AgsThread *current; if(thread == NULL){ return; } ags_thread_unlock(thread); current = g_atomic_pointer_get(&(thread->parent)); while(current != parent){ g_atomic_int_and(&(current->sync_flags), (~AGS_THREAD_WAITING_FOR_CHILDREN)); if((AGS_THREAD_BROADCAST_PARENT & (g_atomic_int_get(&(thread->sync_flags)))) == 0){ pthread_cond_signal(current->cond); }else{ pthread_cond_broadcast(current->cond); } ags_thread_unlock(current); current = g_atomic_pointer_get(&(current->parent)); } } /** * ags_thread_unlock_sibling: * @thread: an #AgsThread * * Unlock sibling tree structure. * * Since: 1.0.0 */ void ags_thread_unlock_sibling(AgsThread *thread) { AgsThread *current; if(thread == NULL){ return; } ags_thread_unlock(thread); current = ags_thread_first(thread); while(current != NULL){ if(current == thread){ current = g_atomic_pointer_get(&(current->next)); continue; } g_atomic_int_and(&(current->sync_flags), (~AGS_THREAD_WAITING_FOR_SIBLING)); if((AGS_THREAD_BROADCAST_SIBLING & (g_atomic_int_get(&(thread->sync_flags)))) == 0){ pthread_cond_signal(current->cond); }else{ pthread_cond_broadcast(current->cond); } ags_thread_unlock(current); current = g_atomic_pointer_get(&(current->next)); } } /** * ags_thread_unlock_children: * @thread: an #AgsThread * * Unlock child tree structure. * * Since: 1.0.0 */ void ags_thread_unlock_children(AgsThread *thread) { auto void ags_thread_unlock_children_recursive(AgsThread *child); void ags_thread_unlock_children_recursive(AgsThread *child){ AgsThread *current; if(child == NULL){ return; } current = ags_thread_last(child); while(current != NULL){ ags_thread_unlock_children_recursive(g_atomic_pointer_get(&(current->children))); g_atomic_int_and(&(current->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) == 0 && !AGS_IS_MAIN_LOOP(thread)){ if((AGS_THREAD_BROADCAST_CHILDREN & (g_atomic_int_get(&(thread->sync_flags)))) == 0){ pthread_cond_signal(current->cond); }else{ pthread_cond_broadcast(current->cond); } } ags_thread_unlock(current); current = g_atomic_pointer_get(&(current->prev)); } } if(thread == NULL){ return; } ags_thread_unlock(thread); ags_thread_unlock_children_recursive(g_atomic_pointer_get(&(thread->children))); } void ags_thread_unlock_all(AgsThread *thread) { ags_thread_unlock_parent(thread, NULL); ags_thread_unlock_sibling(thread); ags_thread_unlock_children(thread); } /** * ags_thread_wait_parent: * @thread: an #AgsThread * @parent: the parent #AgsThread where to stop. * * Wait on parent tree structure. * * Since: 1.0.0 */ void ags_thread_wait_parent(AgsThread *thread, AgsThread *parent) { AgsThread *current; if(thread == NULL || thread == parent){ return; } /* wait parent */ current = g_atomic_pointer_get(&(thread->parent)); while((current != NULL && current != parent) && (((AGS_THREAD_IDLE & (g_atomic_int_get(&(current->flags)))) != 0 || (AGS_THREAD_WAITING_FOR_CHILDREN & (g_atomic_int_get(&(current->sync_flags)))) == 0) || g_atomic_pointer_get(&(current->parent)) != parent)){ pthread_cond_wait(current->cond, current->mutex); if(!((AGS_THREAD_IDLE & (g_atomic_int_get(&(current->flags)))) != 0 || (AGS_THREAD_WAITING_FOR_CHILDREN & (g_atomic_int_get(&(current->sync_flags)))) == 0)){ current = g_atomic_pointer_get(&(current->parent)); } } /* unset flag */ g_atomic_int_and(&(thread->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); } /** * ags_thread_wait_sibling: * @thread: an #AgsThread * * Wait on sibling tree structure. * * Since: 1.0.0 */ void ags_thread_wait_sibling(AgsThread *thread) { AgsThread *current; if(thread == NULL){ return; } /* wait sibling */ current = ags_thread_first(thread); while(current != NULL && (((AGS_THREAD_IDLE & (g_atomic_int_get(&(current->flags)))) != 0 || (AGS_THREAD_WAITING_FOR_SIBLING & (g_atomic_int_get(&(current->sync_flags)))) == 0) || g_atomic_pointer_get(&(current->next)) != NULL)){ if(current == thread){ current = g_atomic_pointer_get(&(current->next)); continue; } pthread_cond_wait(current->cond, current->mutex); if(!((AGS_THREAD_IDLE & (g_atomic_int_get(&(current->flags)))) != 0 || (AGS_THREAD_WAITING_FOR_SIBLING & (g_atomic_int_get(&(current->sync_flags)))) == 0)){ current = g_atomic_pointer_get(&(current->next)); } } /* unset flags */ g_atomic_int_and(&(thread->sync_flags), (~AGS_THREAD_WAITING_FOR_SIBLING)); } /** * ags_thread_wait_children: * @thread: an #AgsThread * * Wait on child tree structure. * * Since: 1.0.0 */ void ags_thread_wait_children(AgsThread *thread) { auto void ags_thread_wait_children_recursive(AgsThread *child); void ags_thread_wait_children_recursive(AgsThread *child){ gboolean initial_run; if(child == NULL){ return; } initial_run = TRUE; while(child != NULL && (((AGS_THREAD_IDLE & (g_atomic_int_get(&(child->flags)))) != 0 || (AGS_THREAD_WAITING_FOR_PARENT & (g_atomic_int_get(&(child->sync_flags)))) == 0) || g_atomic_pointer_get(&(child->next)) != NULL)){ if(initial_run){ ags_thread_wait_children_recursive(g_atomic_pointer_get(&(child->children))); initial_run = FALSE; } pthread_cond_wait(child->cond, child->mutex); if(!((AGS_THREAD_IDLE & (g_atomic_int_get(&(child->flags)))) != 0 || (AGS_THREAD_WAITING_FOR_PARENT & (g_atomic_int_get(&(child->sync_flags)))) == 0)){ child = g_atomic_pointer_get(&(child->next)); initial_run = TRUE; } } } if(thread == NULL){ return; } /* wait children */ ags_thread_wait_children_recursive(g_atomic_pointer_get(&(thread->children))); /* unset flags */ g_atomic_int_and(&(thread->sync_flags), (~AGS_THREAD_WAITING_FOR_CHILDREN)); } /** * ags_thread_signal_parent: * @thread: an #AgsThread * @parent: the parent #AgsThread * @broadcast: whether to perforam a signal or to broadcast * * Signals the tree in higher levels. * * Since: 1.0.0 */ void ags_thread_signal_parent(AgsThread *thread, AgsThread *parent, gboolean broadcast) { AgsThread *current; current = g_atomic_pointer_get(&(thread->parent)); while(current != NULL){ if((AGS_THREAD_WAIT_FOR_CHILDREN & (g_atomic_int_get(&(current->sync_flags)))) != 0){ if(!broadcast){ pthread_cond_signal(current->cond); }else{ pthread_cond_broadcast(current->cond); } } current = g_atomic_pointer_get(&(current->parent)); } } /** * ags_thread_signal_sibling: * @thread: an #AgsThread * @broadcast: whether to perforam a signal or to broadcast * * Signals the tree on same level. * * Since: 1.0.0 */ void ags_thread_signal_sibling(AgsThread *thread, gboolean broadcast) { AgsThread *current; current = ags_thread_first(thread); while(current != NULL){ if((AGS_THREAD_WAIT_FOR_SIBLING & (g_atomic_int_get(&(current->sync_flags)))) != 0){ if(!broadcast){ pthread_cond_signal(current->cond); }else{ pthread_cond_broadcast(current->cond); } } current = g_atomic_pointer_get(&(current->next)); } } /** * ags_thread_signal_children: * @thread: an #AgsThread * @broadcast: whether to perforam a signal or to broadcast * * Signals the tree in lower levels. * * Since: 1.0.0 */ void ags_thread_signal_children(AgsThread *thread, gboolean broadcast) { auto void ags_thread_signal_children_recursive(AgsThread *thread, gboolean broadcast); void ags_thread_signal_children_recursive(AgsThread *thread, gboolean broadcast){ AgsThread *current; if(thread == NULL){ return; } current = thread; while(current != NULL){ if((AGS_THREAD_WAIT_FOR_PARENT & (g_atomic_int_get(&(current->sync_flags)))) != 0){ if(!broadcast){ pthread_cond_signal(current->cond); }else{ pthread_cond_broadcast(current->cond); } } ags_thread_signal_children_recursive(current, broadcast); current = g_atomic_pointer_get(&(current->next)); } } ags_thread_signal_children(g_atomic_pointer_get(&(thread->children)), broadcast); } guint ags_thread_real_clock(AgsThread *thread) { AgsThread *main_loop, *async_queue; AgsMutexManager *mutex_manager; #ifdef __APPLE__ clock_serv_t cclock; mach_timespec_t mts; #endif struct timespec time_now; gdouble main_loop_delay; gdouble delay_per_hertz; guint steps; gboolean async_queue_running; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex, *main_loop_mutex; pthread_cond_t *run_cond; pthread_mutex_t *run_mutex; auto void ags_thread_clock_sync(AgsThread *thread); auto void ags_thread_clock_wait_async(); void ags_thread_clock_sync(AgsThread *thread){ guint next_tic, current_tic; /* sync */ pthread_mutex_lock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) != 0){ thread->current_tic = ags_main_loop_get_tic(AGS_MAIN_LOOP(main_loop)); if((AGS_THREAD_START_SYNCED_FREQ & (g_atomic_int_get(&(thread->flags)))) != 0 && g_atomic_pointer_get(&(thread->parent)) != NULL){ AgsThread *chaos_tree; chaos_tree = main_loop;//ags_thread_chaos_tree(thread); /* ordinary sync */ thread->tic_delay = chaos_tree->tic_delay; if((AGS_THREAD_INTERMEDIATE_PRE_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ if(thread->freq >= thread->max_precision){ thread->tic_delay = 0; }else{ if(thread->tic_delay < thread->delay){ thread->tic_delay++; }else{ thread->tic_delay = 0; } } } if((AGS_THREAD_INTERMEDIATE_POST_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ if(thread->freq >= thread->max_precision){ thread->tic_delay = 0; }else{ if(thread->tic_delay > 0){ thread->tic_delay--; }else{ thread->tic_delay = thread->delay; } } } g_atomic_int_or(&(thread->flags), AGS_THREAD_SYNCED_FREQ); } g_atomic_int_and(&(thread->flags), (~AGS_THREAD_INITIAL_RUN)); } /* thread tree */ current_tic = thread->current_tic; if(current_tic == 2){ next_tic = 0; }else if(current_tic == 0){ next_tic = 1; }else if(current_tic == 1){ next_tic = 2; } switch(thread->current_tic){ case 0: { g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAIT_0); } break; case 1: { g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAIT_1); } break; case 2: { g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAIT_2); } break; } if(!ags_thread_is_tree_ready(thread, current_tic)){ // ags_thread_hangcheck(main_loop); pthread_mutex_unlock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); if(!ags_thread_is_current_ready(thread, current_tic)){ pthread_mutex_lock(thread->mutex); g_atomic_int_or(&(thread->flags), AGS_THREAD_WAITING); while(!ags_thread_is_current_ready(thread, current_tic) && (AGS_THREAD_WAITING & (g_atomic_int_get(&(thread->flags)))) != 0){ pthread_cond_wait(thread->cond, thread->mutex); } pthread_mutex_unlock(thread->mutex); } }else{ /* async-queue */ if(async_queue != NULL){ if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(async_queue->flags)))) == 0){ ags_async_queue_set_run(AGS_ASYNC_QUEUE(async_queue), FALSE); } async_queue_running = ((AGS_THREAD_RUNNING & (g_atomic_int_get(&(async_queue->flags)))) != 0) ? TRUE: FALSE; }else{ async_queue_running = FALSE; } ags_main_loop_set_last_sync(AGS_MAIN_LOOP(main_loop), thread->current_tic); ags_main_loop_set_tic(AGS_MAIN_LOOP(main_loop), next_tic); ags_thread_set_sync_all(main_loop, thread->current_tic); ags_thread_reset_all(main_loop); pthread_mutex_unlock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); } } void ags_thread_clock_wait_async(){ if(async_queue == NULL){ return; } /* async-queue */ if(!AGS_IS_ASYNC_QUEUE(thread)){ if(async_queue_running){ pthread_mutex_lock(run_mutex); // g_message("blocked"); if(!ags_async_queue_is_run(AGS_ASYNC_QUEUE(async_queue)) && (AGS_THREAD_DONE_ASYNC_QUEUE & (g_atomic_int_get(&(thread->sync_flags)))) == 0){ ags_async_queue_increment_wait_ref(AGS_ASYNC_QUEUE(async_queue)); // g_message("wait"); g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAIT_ASYNC_QUEUE); while(!ags_async_queue_is_run(AGS_ASYNC_QUEUE(async_queue)) && ags_async_queue_get_wait_ref(AGS_ASYNC_QUEUE(async_queue)) != 0 && (AGS_THREAD_WAIT_ASYNC_QUEUE & (g_atomic_int_get(&(thread->sync_flags)))) != 0 && (AGS_THREAD_DONE_ASYNC_QUEUE & (g_atomic_int_get(&(thread->sync_flags)))) == 0){ pthread_cond_wait(run_cond, run_mutex); } } g_atomic_int_and(&(thread->sync_flags), (~(AGS_THREAD_WAIT_ASYNC_QUEUE | AGS_THREAD_DONE_ASYNC_QUEUE))); pthread_mutex_unlock(run_mutex); } }else{ // g_message("not blocked"); } } main_loop = ags_thread_get_toplevel(thread); if(!AGS_IS_MAIN_LOOP(main_loop)){ if(thread->tic_delay == 0){ if(thread->freq >= thread->max_precision){ steps = 1.0 / thread->delay; }else{ steps = 1; } }else{ steps = 0; } return(steps); } steps = 0; /* async-queue */ if(AGS_IS_MAIN_LOOP(main_loop)){ async_queue = (AgsThread *) ags_main_loop_get_async_queue(AGS_MAIN_LOOP(main_loop)); async_queue_running = FALSE; if(async_queue != NULL){ 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)); } }else{ async_queue = NULL; } /* lookup mutices */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); main_loop_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) main_loop); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) thread); pthread_mutex_unlock(application_mutex); /* calculate main loop delay */ pthread_mutex_lock(main_loop_mutex); main_loop_delay = main_loop->max_precision / main_loop->freq / (AGS_THREAD_HERTZ_JIFFIE / main_loop->max_precision); pthread_mutex_unlock(main_loop_mutex); /* calculate thread delay */ pthread_mutex_lock(mutex); thread->delay = (guint) ceil((AGS_THREAD_HERTZ_JIFFIE / thread->freq) / (AGS_THREAD_HERTZ_JIFFIE / thread->max_precision)); delay_per_hertz = AGS_THREAD_HERTZ_JIFFIE / thread->max_precision; if(thread->delay < thread->tic_delay){ thread->tic_delay = thread->delay; } if(g_atomic_pointer_get(&(thread->parent)) == NULL){ // g_message("%d %d %f", thread->tic_delay, thread->delay, thread->freq); } pthread_mutex_unlock(mutex); /* check initial sync or immediate sync */ if((AGS_THREAD_IMMEDIATE_SYNC & (g_atomic_int_get(&(thread->flags)))) == 0){ if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) != 0 && (AGS_THREAD_INITIAL_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ #ifdef __APPLE__ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); thread->computing_time->tv_sec = mts.tv_sec; thread->computing_time->tv_nsec = mts.tv_nsec; #else clock_gettime(CLOCK_MONOTONIC, thread->computing_time); #endif g_atomic_int_and(&(thread->flags), (~AGS_THREAD_INITIAL_SYNC)); return(1); } }else{ if((AGS_THREAD_INITIAL_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ g_atomic_int_and(&(thread->flags), (~AGS_THREAD_INITIAL_SYNC)); } } /* idle */ #ifdef AGS_USE_TIMER if(g_atomic_pointer_get(&(thread->parent)) == NULL){ pthread_mutex_lock(thread->timer_mutex); if(!g_atomic_int_get(&(thread->timer_expired))){ g_atomic_int_set(&(thread->timer_wait), TRUE); while(!g_atomic_int_get(&(thread->timer_expired))){ pthread_cond_wait(thread->timer_cond, thread->timer_mutex); } } g_atomic_int_set(&(thread->timer_wait), FALSE); g_atomic_int_set(&(thread->timer_expired), FALSE); pthread_mutex_unlock(thread->timer_mutex); } #else if(thread->tic_delay == thread->delay && (AGS_THREAD_TIMING & (g_atomic_int_get(&(thread->flags)))) != 0){ gdouble time_spent, relative_time_spent; gdouble time_cycle; static const gdouble nsec_per_jiffie = NSEC_PER_SEC / AGS_THREAD_HERTZ_JIFFIE; struct timespec timed_sleep = { 0, 0, }; #ifdef __APPLE__ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); time_now.tv_sec = mts.tv_sec; time_now.tv_nsec = mts.tv_nsec; #else clock_gettime(CLOCK_MONOTONIC, &time_now); #endif if(time_now.tv_sec == thread->computing_time->tv_sec + 1){ time_spent = (time_now.tv_nsec) + (NSEC_PER_SEC - thread->computing_time->tv_nsec); }else if(time_now.tv_sec > thread->computing_time->tv_sec + 1){ time_spent = (time_now.tv_sec - thread->computing_time->tv_sec) * NSEC_PER_SEC; time_spent += (time_now.tv_nsec - thread->computing_time->tv_nsec); }else{ time_spent = time_now.tv_nsec - thread->computing_time->tv_nsec; } time_cycle = NSEC_PER_SEC / thread->freq; relative_time_spent = time_cycle - time_spent - AGS_THREAD_TOLERANCE; if(relative_time_spent - (gdouble) g_atomic_int_get(&(thread->time_late)) < 0.0){ if(g_atomic_int_get(&(thread->time_late)) - (gint) ceil(1.25 * relative_time_spent) < 0){ g_atomic_int_set(&(thread->time_late), 0); }else{ g_atomic_int_set(&(thread->time_late), g_atomic_int_get(&(thread->time_late)) - (gint) ceil(1.25 * relative_time_spent)); } }else if(relative_time_spent > 0.0 && relative_time_spent - (gdouble) g_atomic_int_get(&(thread->time_late)) < (44.0 / 45.0) * time_cycle){ g_atomic_int_set(&(thread->time_late), 0); timed_sleep.tv_nsec = (long) relative_time_spent - (gdouble) g_atomic_int_get(&(thread->time_late)) - (1.0 / 45.0) * time_cycle; nanosleep(&timed_sleep, NULL); }else{ g_atomic_int_set(&(thread->time_late), 0); } #ifdef __APPLE__ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); thread->computing_time->tv_sec = mts.tv_sec; thread->computing_time->tv_nsec = mts.tv_nsec; #else clock_gettime(CLOCK_MONOTONIC, thread->computing_time); #endif } #endif // g_message("%s", G_OBJECT_TYPE_NAME(thread)); /* sync */ /* run in hierarchy */ // pthread_mutex_lock(thread->mutex); ags_thread_clock_sync(thread); ags_thread_clock_wait_async(); // pthread_mutex_unlock(thread->mutex); /* increment delay counter and set run per cycle */ if(thread->tic_delay == 0){ if(thread->freq >= thread->max_precision){ steps = 1.0 / thread->delay; }else{ steps = 1; } }else{ steps = 0; } /* nth cycle */ if(thread->cycle_iteration != thread->max_precision){ thread->cycle_iteration++; }else{ thread->cycle_iteration = 0; } return(steps); } /** * ags_thread_clock: * @thread: the #AgsThread instance * * Clock the thread. * * Returns: the cycles to be performed * * Since: 1.0.0 */ guint ags_thread_clock(AgsThread *thread) { guint thread_signal; guint cycles; thread_signal = thread_signals[CLOCK]; g_return_val_if_fail(AGS_IS_THREAD(thread), 0); g_object_ref(thread); g_signal_emit(thread, thread_signal, 0, &cycles); g_object_unref(thread); return(cycles); } void ags_thread_real_start(AgsThread *thread) { AgsMainLoop *main_loop; guint val; main_loop = ags_thread_get_toplevel(thread); if(!AGS_IS_MAIN_LOOP(main_loop)){ main_loop = NULL; } /* set/unset run flags */ g_atomic_int_or(&(thread->flags), (AGS_THREAD_RUNNING | AGS_THREAD_INITIAL_RUN | AGS_THREAD_INITIAL_SYNC)); g_atomic_int_and(&(thread->flags), (~(AGS_THREAD_RT_SETUP | AGS_THREAD_WAITING))); g_atomic_int_and(&(thread->sync_flags), (~(AGS_THREAD_WAIT_0 | AGS_THREAD_WAIT_1 | AGS_THREAD_WAIT_2))); g_atomic_int_and(&(thread->sync_flags), (~(AGS_THREAD_SYNCED_FREQ))); #ifdef AGS_DEBUG g_message("thread start: %s", G_OBJECT_TYPE_NAME(thread)); #endif /* */ val = g_atomic_int_get(&(thread->sync_flags)); if((AGS_THREAD_TIMELOCK_RUN & val) != 0){ pthread_create(thread->timelock_thread, NULL, ags_thread_timelock_loop, thread); } /* */ pthread_create(thread->thread, thread->thread_attr, ags_thread_loop, thread); } /** * ags_thread_add_start_queue: * @thread: the #AgsThread * @child: the child #AgsThread to start * * Add @child to @thread's start queue. * * Since: 1.0.0 */ void ags_thread_add_start_queue(AgsThread *thread, AgsThread *child) { GList *start_queue; pthread_mutex_lock(thread->start_mutex); start_queue = g_atomic_pointer_get(&(thread->start_queue)); start_queue = g_list_prepend(start_queue, child); g_atomic_pointer_set(&(thread->start_queue), start_queue); pthread_mutex_unlock(thread->start_mutex); } /** * ags_thread_add_start_queue: * @thread: the #AgsThread * @child: the children as #GList-struct containing #AgsThread to start * * Add @child to @thread's start queue. * * Since: 1.0.0 */ void ags_thread_add_start_queue_all(AgsThread *thread, GList *child) { GList *start_queue; pthread_mutex_lock(thread->start_mutex); start_queue = g_atomic_pointer_get(&(thread->start_queue)); start_queue = g_list_concat(start_queue, g_list_copy(child)); g_atomic_pointer_set(&(thread->start_queue), start_queue); pthread_mutex_unlock(thread->start_mutex); } /** * ags_thread_start: * @thread: the #AgsThread instance * * Start the thread. * * Since: 1.0.0 */ void ags_thread_start(AgsThread *thread) { guint thread_signal; thread_signal = thread_signals[START]; g_return_if_fail(AGS_IS_THREAD(thread)); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0){ return; } g_object_ref(thread); g_signal_emit(thread, thread_signal, 0); g_object_unref(thread); } void* ags_thread_timer(void *ptr) { //TODO:JK: implement me return(NULL); } void* ags_thread_loop(void *ptr) { AgsThread *thread, *main_loop; AgsThread *async_queue; AgsMutexManager *mutex_manager; AgsThread *queued_thread; GList *start_start_queue, *start_queue, *start_queue_next; guint val, running, locked_greedy; guint i, i_stop; gboolean wait_for_parent, wait_for_sibling, wait_for_children; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; thread = (AgsThread *) ptr; g_object_ref(thread); pthread_once(&ags_thread_key_once, ags_thread_self_create); pthread_setspecific(ags_thread_key, thread); main_loop = ags_thread_get_toplevel(thread); if(!AGS_IS_MAIN_LOOP(main_loop)){ main_loop = NULL; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) thread); pthread_mutex_unlock(application_mutex); if(main_loop != NULL){ pthread_mutex_lock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); thread->current_tic = ags_main_loop_get_tic(AGS_MAIN_LOOP(main_loop)); pthread_mutex_unlock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); }else{ thread->current_tic = 0; } running = g_atomic_int_get(&(thread->flags)); /* get start computing time */ #ifndef AGS_USE_TIMER if(g_atomic_pointer_get(&(thread->parent)) == NULL){ #ifdef __APPLE__ clock_serv_t cclock; mach_timespec_t mts; #endif thread->delay = thread->tic_delay = (AGS_THREAD_HERTZ_JIFFIE / thread->freq) / (AGS_THREAD_HERTZ_JIFFIE / thread->max_precision); #ifdef __APPLE__ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); thread->computing_time->tv_sec = mts.tv_sec; thread->computing_time->tv_nsec = mts.tv_nsec; #else clock_gettime(CLOCK_MONOTONIC, thread->computing_time); #endif } #endif while((AGS_THREAD_RUNNING & running) != 0){ /* start queue */ pthread_mutex_lock(mutex); start_start_queue = start_queue = g_atomic_pointer_get(&(thread->start_queue)); g_atomic_pointer_set(&(thread->start_queue), NULL); pthread_mutex_unlock(mutex); while(start_queue != NULL){ start_queue_next = start_queue->next; queued_thread = (AgsThread *) start_queue->data; g_object_ref(queued_thread); /* */ ags_thread_start(queued_thread); pthread_mutex_lock(queued_thread->start_mutex); if(g_atomic_int_get(&(queued_thread->start_done)) == FALSE){ if(main_loop != NULL){ pthread_mutex_lock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); } /* ordinary sync */ queued_thread->tic_delay = thread->tic_delay; if((AGS_THREAD_INTERMEDIATE_PRE_SYNC & (g_atomic_int_get(&(queued_thread->flags)))) != 0){ if(queued_thread->freq >= queued_thread->max_precision){ queued_thread->tic_delay = 0; }else{ if(queued_thread->tic_delay < queued_thread->delay){ queued_thread->tic_delay++; }else{ queued_thread->tic_delay = 0; } } } if((AGS_THREAD_INTERMEDIATE_POST_SYNC & (g_atomic_int_get(&(queued_thread->flags)))) != 0){ if(queued_thread->freq >= queued_thread->max_precision){ queued_thread->tic_delay = 0; }else{ if(queued_thread->tic_delay > 0){ queued_thread->tic_delay--; }else{ queued_thread->tic_delay = queued_thread->delay; } } } /* */ if(main_loop != NULL){ pthread_mutex_unlock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); } g_atomic_int_set(&(queued_thread->start_wait), TRUE); while(g_atomic_int_get(&(queued_thread->start_wait)) == TRUE && g_atomic_int_get(&(queued_thread->start_done)) == FALSE){ pthread_cond_wait(queued_thread->start_cond, queued_thread->start_mutex); } } pthread_mutex_unlock(queued_thread->start_mutex); g_object_unref(queued_thread); start_queue = start_queue_next; } g_list_free(start_start_queue); /* notify start */ /* signal AgsAudioLoop */ pthread_mutex_lock(thread->start_mutex); g_atomic_int_set(&(thread->start_done), TRUE); if(g_atomic_int_get(&(thread->start_wait)) == TRUE){ pthread_cond_broadcast(thread->start_cond); } pthread_mutex_unlock(thread->start_mutex); /* barrier */ if((AGS_THREAD_WAITING_FOR_BARRIER & (g_atomic_int_get(&(thread->sync_flags)))) != 0){ int wait_count; if(thread->first_barrier){ /* retrieve wait count */ ags_thread_lock(thread); wait_count = thread->wait_count[0]; ags_thread_unlock(thread); /* init and wait */ #ifndef __APPLE__ pthread_barrier_init(thread->barrier[0], NULL, wait_count); pthread_barrier_wait(thread->barrier[0]); #endif }else{ /* retrieve wait count */ ags_thread_lock(thread); wait_count = thread->wait_count[1]; ags_thread_unlock(thread); /* init and wait */ #ifndef __APPLE__ pthread_barrier_init(thread->barrier[1], NULL, wait_count); pthread_barrier_wait(thread->barrier[1]); #endif } } /* run clock synchronization */ i_stop = ags_thread_clock(thread); /* if still running */ running = g_atomic_int_get(&(thread->flags)); for(i = 0; i < i_stop && (AGS_THREAD_RUNNING & running) != 0; i++){ /* do cycles */ running = g_atomic_int_get(&(thread->flags)); /* set idle flag */ g_atomic_int_or(&(thread->flags), AGS_THREAD_IDLE); if((AGS_THREAD_WAIT_FOR_PARENT & (g_atomic_int_get(&(thread->sync_flags)))) != 0){ wait_for_parent = TRUE; g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); ags_thread_lock_parent(thread, NULL); }else{ wait_for_parent = FALSE; } /* lock sibling */ if((AGS_THREAD_WAIT_FOR_SIBLING & (g_atomic_int_get(&(thread->sync_flags)))) != 0){ wait_for_sibling = TRUE; g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAITING_FOR_SIBLING); ags_thread_lock_sibling(thread); }else{ wait_for_sibling = FALSE; } /* lock_children */ if((AGS_THREAD_WAIT_FOR_CHILDREN & (g_atomic_int_get(&(thread->sync_flags)))) != 0){ wait_for_children = TRUE; g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); ags_thread_lock_children(thread); }else{ wait_for_children = FALSE; } /* skip very first sync of AgsAudioLoop */ if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) == 0 && !AGS_IS_MAIN_LOOP(thread)){ /* wait parent */ if(wait_for_parent){ ags_thread_wait_parent(thread, NULL); } /* wait sibling */ if(wait_for_sibling){ ags_thread_wait_sibling(thread); } /* wait children */ if(wait_for_children){ ags_thread_wait_children(thread); } } /* check for greedy to announce */ if(thread->greedy_locks != NULL){ GList *greedy_locks; greedy_locks = thread->greedy_locks; while(greedy_locks != NULL){ pthread_mutex_lock(AGS_THREAD(greedy_locks->data)->greedy_mutex); locked_greedy = g_atomic_int_get(&(AGS_THREAD(greedy_locks->data)->locked_greedy)); locked_greedy++; g_atomic_int_set(&(AGS_THREAD(greedy_locks->data)->locked_greedy), locked_greedy); pthread_mutex_unlock(AGS_THREAD(greedy_locks->data)->greedy_mutex); greedy_locks = greedy_locks->next; } } /* greedy work around */ pthread_mutex_lock(thread->greedy_mutex); locked_greedy = g_atomic_int_get(&(thread->locked_greedy)); if(locked_greedy != 0){ while(locked_greedy != 0){ pthread_cond_wait(thread->greedy_cond, thread->greedy_mutex); locked_greedy = g_atomic_int_get(&(thread->locked_greedy)); } } pthread_mutex_unlock(thread->greedy_mutex); /* run */ if((AGS_THREAD_INTERRUPTED & (g_atomic_int_get(&(thread->sync_flags)))) == 0 && (AGS_THREAD_MONITORING & (g_atomic_int_get(&(thread->sync_flags)))) == 0){ /* timed lock (suspend) */ pthread_mutex_lock(thread->timelock_mutex); val = g_atomic_int_get(&(thread->sync_flags)); if((AGS_THREAD_TIMELOCK_RUN & val) != 0){ guint locked; locked = g_atomic_int_get(&(thread->sync_flags)); g_atomic_int_and(&(thread->sync_flags), (~AGS_THREAD_TIMELOCK_WAIT)); if((AGS_THREAD_TIMELOCK_WAIT & locked) != 0){ pthread_cond_signal(thread->timelock_cond); } } pthread_mutex_unlock(thread->timelock_mutex); ags_thread_run(thread); } // g_printf("%s\n", G_OBJECT_TYPE_NAME(thread)); /* */ running = g_atomic_int_get(&(thread->flags)); /* check for greedy to release */ if(thread->greedy_locks != NULL){ GList *greedy_locks; greedy_locks = thread->greedy_locks; while(greedy_locks != NULL){ pthread_mutex_lock(AGS_THREAD(greedy_locks->data)->greedy_mutex); locked_greedy = g_atomic_int_get(&(AGS_THREAD(greedy_locks->data)->locked_greedy)); locked_greedy--; g_atomic_int_set(&(AGS_THREAD(greedy_locks->data)->locked_greedy), locked_greedy); pthread_cond_signal(AGS_THREAD(greedy_locks->data)->greedy_cond); pthread_mutex_unlock(AGS_THREAD(greedy_locks->data)->greedy_mutex); greedy_locks = greedy_locks->next; } } /* unset idle flag */ g_atomic_int_and(&(thread->flags), (~AGS_THREAD_IDLE)); /* unlock parent */ if(wait_for_parent){ ags_thread_unlock_parent(thread, NULL); } /* unlock sibling */ if(wait_for_sibling){ ags_thread_unlock_sibling(thread); } /* unlock children */ if(wait_for_children){ ags_thread_unlock_children(thread); } } /* yield */ #ifndef __APPLE__ if(main_loop != NULL && main_loop->tic_delay != main_loop->delay && thread->cycle_iteration % (guint) floor(AGS_THREAD_HERTZ_JIFFIE / AGS_THREAD_YIELD_JIFFIE) == 0){ pthread_yield(); } #endif } // g_object_ref(thread); if(main_loop != NULL){ pthread_mutex_lock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); } if(main_loop != NULL && (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) != 0 || (AGS_THREAD_INITIAL_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ AgsThread *chaos_tree; chaos_tree = main_loop;//ags_thread_chaos_tree(thread); /* ordinary sync */ thread->tic_delay = chaos_tree->tic_delay; if((AGS_THREAD_INTERMEDIATE_PRE_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ if(thread->freq >= thread->max_precision){ thread->tic_delay = 0; }else{ if(thread->tic_delay > 0){ thread->tic_delay--; }else{ thread->tic_delay = thread->delay; } } } if((AGS_THREAD_INTERMEDIATE_POST_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0){ if(thread->freq >= thread->max_precision){ thread->tic_delay = 0; }else{ if(thread->tic_delay < thread->delay){ thread->tic_delay++; }else{ thread->tic_delay = 0; } } } g_atomic_int_and(&(thread->flags), (~AGS_THREAD_INITIAL_RUN)); } switch(thread->current_tic){ case 0: { g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAIT_0); } break; case 1: { g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAIT_1); } break; case 2: { g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_WAIT_2); } break; } if(ags_thread_is_tree_ready(thread, thread->current_tic)){ guint next_tic, current_tic; current_tic = thread->current_tic; /* thread tree */ if(current_tic == 2){ next_tic = 0; }else if(current_tic == 0){ next_tic = 1; }else if(current_tic == 1){ next_tic = 2; } /* async-queue */ if(async_queue != NULL){ ags_async_queue_set_run(AGS_ASYNC_QUEUE(async_queue), FALSE); } if(main_loop != NULL){ ags_main_loop_set_last_sync(AGS_MAIN_LOOP(main_loop), thread->current_tic); ags_main_loop_set_tic(AGS_MAIN_LOOP(main_loop), next_tic); ags_thread_set_sync_all(main_loop, thread->current_tic); } } if((AGS_THREAD_UNREF_ON_EXIT & (g_atomic_int_get(&(thread->flags)))) != 0){ ags_thread_remove_child(g_atomic_pointer_get(&(thread->parent)), thread); g_object_unref(thread); } if(main_loop != NULL){ pthread_mutex_unlock(ags_main_loop_get_tree_lock(AGS_MAIN_LOOP(main_loop))); } #ifdef AGS_DEBUG g_message("thread finished"); #endif g_object_unref(thread); // g_object_ref(thread); /* exit thread */ pthread_exit(NULL); } /** * ags_thread_run: * @thread: the #AgsThread instance * * Only for internal use of ags_thread_loop but you may want to set the your very own * class function namely your thread's routine. * * Since: 1.0.0 */ void ags_thread_run(AgsThread *thread) { guint thread_signal; thread_signal = thread_signals[RUN]; g_return_if_fail(AGS_IS_THREAD(thread)); g_object_ref(thread); g_signal_emit(thread, thread_signal, 0); g_object_unref(thread); } void ags_thread_suspend(AgsThread *thread) { g_return_if_fail(AGS_IS_THREAD(thread)); g_object_ref(G_OBJECT(thread)); g_signal_emit(G_OBJECT(thread), thread_signals[SUSPEND], 0); g_object_unref(G_OBJECT(thread)); } void ags_thread_resume(AgsThread *thread) { g_return_if_fail(AGS_IS_THREAD(thread)); g_object_ref(G_OBJECT(thread)); g_signal_emit(G_OBJECT(thread), thread_signals[RESUME], 0); g_object_unref(G_OBJECT(thread)); } void* ags_thread_timelock_loop(void *ptr) { AgsThread *thread; int retval; guint flags, sync_flags; thread = AGS_THREAD(ptr); //FIXME:JK: not thread safe flags = g_atomic_int_get(&(thread->flags)); sync_flags = g_atomic_int_get(&(thread->sync_flags)); pthread_mutex_lock(thread->timelock_mutex); g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_TIMELOCK_WAIT); while((AGS_THREAD_RUNNING & (flags)) != 0){ g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_TIMELOCK_WAIT); sync_flags = g_atomic_int_get(&(thread->sync_flags)); while((AGS_THREAD_TIMELOCK_WAIT & (sync_flags)) != 0){ retval = pthread_cond_wait(thread->timelock_cond, thread->timelock_mutex); sync_flags = g_atomic_int_get(&(thread->sync_flags)); } nanosleep(&(thread->timelock), NULL); // ndelay(thread->timelock.tv_nsec); sync_flags = g_atomic_int_get(&(thread->sync_flags)); if((AGS_THREAD_WAIT_0 & sync_flags || AGS_THREAD_WAIT_1 & sync_flags || AGS_THREAD_WAIT_2 & sync_flags) != 0){ #ifdef AGS_DEBUG g_message("thread in realtime"); #endif }else{ #ifdef AGS_DEBUG g_message("thread timelock"); #endif ags_thread_timelock(thread); } flags = g_atomic_int_get(&(thread->flags)); } pthread_mutex_unlock(thread->timelock_mutex); return(NULL); } void ags_thread_real_timelock(AgsThread *thread) { g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_INTERRUPTED); /* throughput is mandatory */ #ifdef AGS_PTHREAD_SUSPEND pthread_suspend(thread->thread); #else pthread_kill(*(thread->thread), AGS_THREAD_SUSPEND_SIG); #endif } void ags_thread_timelock(AgsThread *thread) { g_return_if_fail(AGS_IS_THREAD(thread)); g_object_ref(G_OBJECT(thread)); g_signal_emit(G_OBJECT(thread), thread_signals[TIMELOCK], 0); g_object_unref(G_OBJECT(thread)); } void ags_thread_real_stop(AgsThread *thread) { g_atomic_int_and(&(thread->flags), (~AGS_THREAD_RUNNING)); pthread_detach(*(thread->thread)); } /** * ags_thread_stop: * @thread: the #AgsThread instance * * Stop the threads loop by unsetting AGS_THREAD_RUNNING flag. * * Since: 1.0.0 */ void ags_thread_stop(AgsThread *thread) { guint thread_signal; thread_signal = thread_signals[STOP]; g_return_if_fail(AGS_IS_THREAD(thread)); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) == 0){ return; } g_object_ref(G_OBJECT(thread)); g_signal_emit(G_OBJECT(thread), thread_signal, 0); g_object_unref(G_OBJECT(thread)); } /** * ags_thread_interrupted: * @thread: the #AgsThread * @sig: signal number * @time_cycle: duration of the time cycle * @time_spent: time spent since last cycle * * Notify to resume interrupted thread. * * Returns: the time spent * * Since: 1.0.0 */ guint ags_thread_interrupted(AgsThread *thread, int sig, guint time_cycle, guint *time_spent) { guint retval; guint thread_signal; return(0); thread_signal = thread_signals[INTERRUPTED]; g_return_val_if_fail(AGS_IS_THREAD(thread), 0); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) == 0){ return(0); } g_object_ref(G_OBJECT(thread)); g_signal_emit(G_OBJECT(thread), thread_signal, 0, sig, time_cycle, time_spent, &retval); g_object_unref(G_OBJECT(thread)); return(retval); } /** * ags_thread_hangcheck: * @thread: the #AgsThread instance * * Performs hangcheck of thread. * * Since: 1.0.0 */ void ags_thread_hangcheck(AgsThread *thread) { AgsThread *toplevel; gboolean synced[3]; auto void ags_thread_hangcheck_recursive(AgsThread *thread); auto void ags_thread_hangcheck_unsync_all(AgsThread *thread, gboolean broadcast); void ags_thread_hangcheck_recursive(AgsThread *thread){ AgsThread *child; guint sync_flags; sync_flags = g_atomic_int_get(&(thread->sync_flags)); if((AGS_THREAD_WAIT_0 & sync_flags) != 0){ synced[0] = TRUE; } if((AGS_THREAD_WAIT_1 & sync_flags) != 0){ synced[1] = TRUE; } if((AGS_THREAD_WAIT_2 & sync_flags) != 0){ synced[2] = TRUE; } /* iterate tree */ child = g_atomic_pointer_get(&(thread->children)); while(child != NULL){ ags_thread_hangcheck_recursive(child); child = g_atomic_pointer_get(&(child->next)); } } void ags_thread_hangcheck_unsync_all(AgsThread *thread, gboolean broadcast){ AgsThread *child; guint sync_flags; sync_flags = g_atomic_int_get(&(thread->sync_flags)); g_atomic_int_and(&(thread->sync_flags), (~(AGS_THREAD_WAIT_0 | AGS_THREAD_WAIT_1 | AGS_THREAD_WAIT_2))); if(AGS_THREAD_WAIT_0 & sync_flags){ if(broadcast){ pthread_cond_broadcast(thread->cond); }else{ pthread_cond_signal(thread->cond); } } if(AGS_THREAD_WAIT_1 & sync_flags){ if(broadcast){ pthread_cond_broadcast(thread->cond); }else{ pthread_cond_signal(thread->cond); } } if(AGS_THREAD_WAIT_2 & sync_flags){ if(broadcast){ pthread_cond_broadcast(thread->cond); }else{ pthread_cond_signal(thread->cond); } } /* iterate tree */ child = g_atomic_pointer_get(&(thread->children)); while(child != NULL){ ags_thread_hangcheck_unsync_all(child, broadcast); child = g_atomic_pointer_get(&(child->next)); } } /* detect memory corruption */ synced[0] = FALSE; synced[1] = FALSE; synced[2] = FALSE; /* fill synced array */ toplevel = ags_thread_get_toplevel(thread); ags_thread_hangcheck_recursive(toplevel); /* */ if(!((synced[0] && !synced[1] && !synced[2]) || (!synced[0] && synced[1] && !synced[2]) || (!synced[0] && !synced[1] && synced[2]))){ g_warning("thread tree hung up"); ags_thread_hangcheck_unsync_all(toplevel, FALSE); } } AgsThread* ags_thread_find_type(AgsThread *thread, GType type) { AgsThread *current, *retval; if(thread == NULL || type == G_TYPE_NONE){ return(NULL); } if(g_type_is_a(G_OBJECT_TYPE(thread), type)){ return(thread); } current = g_atomic_pointer_get(&(thread->children)); while(current != NULL){ if((retval = ags_thread_find_type(current, type)) != NULL){ return(retval); } current = g_atomic_pointer_get(&(current->next)); } return(NULL); } void ags_thread_interrupt_callback(AgsMainLoop *main_loop, int sig, guint time_cycle, guint *time_spent, AgsThread *thread) { ags_thread_interrupted(thread, sig, time_cycle, time_spent); } static void ags_thread_self_create() { pthread_key_create(&ags_thread_key, NULL); } AgsThread* ags_thread_self(void) { return((AgsThread *) pthread_getspecific(ags_thread_key)); } /** * ags_thread_chaos_tree: * @thread: the #AgsThread * * Escape chaos tree, get syncing point. * * Returns: the first ordered thread * * Since: 1.0.0 */ AgsThread* ags_thread_chaos_tree(AgsThread *thread) { while((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) != 0 && g_atomic_pointer_get(&(thread->parent)) != NULL){ thread = g_atomic_pointer_get(&(thread->parent)); } return(thread); } /** * ags_thread_is_chaos_tree: * @thread: the #AgsThread * @tic_delay: the tic to sync with * @is_chaos_tree: if %TRUE AGS_THREAD_IS_CHAOS_TREE flag is set * * Check chaos tree and flag threads. * * Returns: %TRUE if tree is in chaos, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_thread_is_chaos_tree(AgsThread *thread, guint tic_delay, gboolean is_chaos_tree) { AgsThread *child; gboolean retval; ags_thread_lock(thread); retval = is_chaos_tree; if(!is_chaos_tree){ if((AGS_THREAD_INITIAL_SYNC & (g_atomic_int_get(&(thread->flags)))) != 0 || (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) != 0){ retval = TRUE; } if(!retval && (AGS_THREAD_START_SYNCED_FREQ & (g_atomic_int_get(&(thread->flags)))) != 0 && (AGS_THREAD_SYNCED_FREQ & (g_atomic_int_get(&(thread->flags)))) == 0){ retval = TRUE; } if(!retval){ child = g_atomic_pointer_get(&(thread->children)); while(!retval && child != NULL){ retval = ags_thread_is_chaos_tree(child, tic_delay, FALSE); child = g_atomic_pointer_get(&(child->next)); } } } if(is_chaos_tree || retval){ /* flag thread */ g_atomic_int_or(&(thread->flags), AGS_THREAD_IS_CHAOS_TREE); /* apply recursive */ child = g_atomic_pointer_get(&(thread->children)); while(child != NULL){ ags_thread_is_chaos_tree(child, tic_delay, TRUE); child = g_atomic_pointer_get(&(child->next)); } } ags_thread_unlock(thread); return(retval); } /** * ags_thread_new: * @data: an #GObject * * Create a new #AgsThread you may provide a #gpointer as @data * to your thread routine. * * Returns: the new #AgsThread * * Since: 1.0.0 */ AgsThread* ags_thread_new(gpointer data) { AgsThread *thread; thread = (AgsThread *) g_object_new(AGS_TYPE_THREAD, NULL); thread->data = data; return(thread); } gsequencer-1.4.24/ags/thread/ags_message_queue.c0000644000175000017500000003054213256163135016544 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_message_queue_class_init(AgsMessageQueueClass *message_queue); void ags_message_queue_connectable_interface_init(AgsConnectableInterface *connectable); void ags_message_queue_init(AgsMessageQueue *message_queue); void ags_message_queue_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_message_queue_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_message_queue_connect(AgsConnectable *connectable); void ags_message_queue_disconnect(AgsConnectable *connectable); void ags_message_queue_dispose(GObject *gobject); void ags_message_queue_finalize(GObject *gobject); /** * SECTION:ags_message_queue * @short_description: message queue * @title: AgsMessageQueue * @section_id: * @include: ags/thread/ags_message_queue.h * * The #AgsMessageQueue acts as messages passing system. */ enum{ PROP_0, PROP_NAMESPACE, }; static gpointer ags_message_queue_parent_class = NULL; static AgsConnectableInterface *ags_message_queue_parent_connectable_interface; GType ags_message_queue_get_type() { static GType ags_type_message_queue = 0; if(!ags_type_message_queue){ static const GTypeInfo ags_message_queue_info = { sizeof (AgsMessageQueueClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_message_queue_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMessageQueue), 0, /* n_preallocs */ (GInstanceInitFunc) ags_message_queue_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_message_queue_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_message_queue = g_type_register_static(G_TYPE_OBJECT, "AgsMessageQueue", &ags_message_queue_info, 0); g_type_add_interface_static(ags_type_message_queue, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_message_queue); } void ags_message_queue_class_init(AgsMessageQueueClass *message_queue) { GObjectClass *gobject; GParamSpec *param_spec; ags_message_queue_parent_class = g_type_class_peek_parent(message_queue); /* GObjectClass */ gobject = (GObjectClass *) message_queue; gobject->set_property = ags_message_queue_set_property; gobject->get_property = ags_message_queue_get_property; gobject->dispose = ags_message_queue_dispose; gobject->finalize = ags_message_queue_finalize; /* properties */ /** * AgsMessageQueue:namespace: * * The assigned namespace. * * Since: 1.2.0 */ param_spec = g_param_spec_string("namespace", i18n_pspec("namespace of message queue"), i18n_pspec("The namespace this message queue is assigned to"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NAMESPACE, param_spec); } void ags_message_queue_connectable_interface_init(AgsConnectableInterface *connectable) { ags_message_queue_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_message_queue_connect; connectable->disconnect = ags_message_queue_disconnect; } void ags_message_queue_init(AgsMessageQueue *message_queue) { message_queue->namespace = NULL; message_queue->mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(message_queue->mutexattr); pthread_mutexattr_settype(message_queue->mutexattr, PTHREAD_MUTEX_RECURSIVE); message_queue->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(message_queue->mutex, message_queue->mutexattr); message_queue->message = NULL; } void ags_message_queue_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMessageQueue *message_queue; message_queue = AGS_MESSAGE_QUEUE(gobject); switch(prop_id){ case PROP_NAMESPACE: { gchar *namespace; namespace = (gchar *) g_value_get_string(value); if(message_queue->namespace == namespace){ return; } if(message_queue->namespace != NULL){ g_free(message_queue->namespace); } message_queue->namespace = g_strdup(namespace); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_message_queue_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMessageQueue *message_queue; message_queue = AGS_MESSAGE_QUEUE(gobject); switch(prop_id){ case PROP_NAMESPACE: { g_value_set_string(value, message_queue->namespace); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_message_queue_connect(AgsConnectable *connectable) { /* empty */ ags_message_queue_parent_connectable_interface->connect(connectable); } void ags_message_queue_disconnect(AgsConnectable *connectable) { ags_message_queue_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_message_queue_dispose(GObject *gobject) { AgsMessageQueue *message_queue; message_queue = AGS_MESSAGE_QUEUE(gobject); /* call parent */ G_OBJECT_CLASS(ags_message_queue_parent_class)->dispose(gobject); } void ags_message_queue_finalize(GObject *gobject) { AgsMessageQueue *message_queue; message_queue = AGS_MESSAGE_QUEUE(gobject); g_free(message_queue->namespace); /* mutex */ pthread_mutexattr_destroy(message_queue->mutexattr); free(message_queue->mutexattr); pthread_mutex_destroy(message_queue->mutex); free(message_queue->mutex); /* message */ if(message_queue->message != NULL){ g_list_free_full(message_queue->message, ags_message_envelope_free); } /* call parent */ G_OBJECT_CLASS(ags_message_queue_parent_class)->finalize(gobject); } /** * ags_message_envelope_alloc: * @sender: the sender as #GObject * @recipient: the recipient as #GObject * @doc: the message document * * Allocate #AgsMessageEnvelope. * * Since: 1.2.0 */ AgsMessageEnvelope* ags_message_envelope_alloc(GObject *sender, GObject *recipient, xmlDoc *doc) { AgsMessageEnvelope *message; message = (AgsMessageEnvelope *) malloc(sizeof(AgsMessageEnvelope)); if(sender != NULL){ g_object_ref(sender); } message->sender = sender; if(recipient != NULL){ g_object_ref(recipient); } message->recipient = recipient; message->doc = doc; message->parameter = NULL; message->n_params = 0; return(message); } /** * ags_message_envelope_free: * @message: the #AgsMessageEnvelope * * Free @message. * * Since: 1.2.0 */ void ags_message_envelope_free(AgsMessageEnvelope *message) { if(message == NULL){ return; } if(message->sender != NULL){ g_object_unref(message->sender); } if(message->recipient != NULL){ g_object_unref(message->recipient); } if(message->doc != NULL){ xmlFreeDoc(message->doc); } g_free(message->parameter); g_free(message); } /** * ags_message_queue_add_message: * @message_queue: the #AgsMessageQueue * @message: the #AgsMessageEnvelope * * Add @message to @message_queue. * * Since: 1.2.0 */ void ags_message_queue_add_message(AgsMessageQueue *message_queue, gpointer message) { if(!AGS_IS_MESSAGE_QUEUE(message_queue) || message == NULL){ return; } pthread_mutex_lock(message_queue->mutex); message_queue->message = g_list_prepend(message_queue->message, message); pthread_mutex_unlock(message_queue->mutex); } /** * ags_message_queue_remove_message: * @message_queue: the #AgsMessageQueue * @message: the #AgsMessageEnvelope * * Remove @message from @message_queue. * * Since: 1.2.0 */ void ags_message_queue_remove_message(AgsMessageQueue *message_queue, gpointer message) { if(!AGS_IS_MESSAGE_QUEUE(message_queue) || message == NULL){ return; } pthread_mutex_lock(message_queue->mutex); message_queue->message = g_list_remove(message_queue->message, message); pthread_mutex_unlock(message_queue->mutex); } /** * ags_message_queue_find_sender: * @message_queue: the #AgsMessageQueue * @sender: the sender as #GObject * * Find @sender in @message_queue's messages. * * Returns: all matching #AgsMessageEnvelope as #GList-struct * * Since: 1.2.0 */ GList* ags_message_queue_find_sender(AgsMessageQueue *message_queue, GObject *sender) { GList *message; GList *match; if(!AGS_IS_MESSAGE_QUEUE(message_queue)){ return(NULL); } match = NULL; pthread_mutex_lock(message_queue->mutex); message = message_queue->message; while(message != NULL){ if(AGS_MESSAGE_ENVELOPE(message->data)->sender == sender){ match = g_list_prepend(match, message->data); } message = message->next; } pthread_mutex_unlock(message_queue->mutex); return(match); } /** * ags_message_queue_find_recipient: * @message_queue: the #AgsMessageQueue * @recipient: the recipient as #GObject * * Find @recipient in @message_queue's messages. * * Returns: all matching #AgsMessageEnvelope as #GList-struct * * Since: 1.2.0 */ GList* ags_message_queue_find_recipient(AgsMessageQueue *message_queue, GObject *recipient) { GList *message; GList *match; if(!AGS_IS_MESSAGE_QUEUE(message_queue)){ return(NULL); } match = NULL; pthread_mutex_lock(message_queue->mutex); message = message_queue->message; while(message != NULL){ if(AGS_MESSAGE_ENVELOPE(message->data)->recipient == recipient){ match = g_list_prepend(match, message->data); } message = message->next; } pthread_mutex_unlock(message_queue->mutex); return(match); } /** * ags_message_queue_query_message: * @message_queue: the #AgsMessageQueue * @recipient: the recipient as #GObject * * Query @xpath in @message_queue's messages. * * Returns: all matching #AgsMessageEnvelope as #GList-struct * * Since: 1.2.0 */ GList* ags_message_queue_query_message(AgsMessageQueue *message_queue, gchar *xpath) { GList *message; GList *match; if(!AGS_IS_MESSAGE_QUEUE(message_queue)){ return(NULL); } match = NULL; pthread_mutex_lock(message_queue->mutex); message = message_queue->message; while(message != NULL){ xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; guint i; xpath_context = xmlXPathNewContext(AGS_MESSAGE_ENVELOPE(message->data)->doc); xpath_object = xmlXPathEval((xmlChar *) xpath, xpath_context); if(xpath_object->nodesetval != NULL){ node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ match = g_list_prepend(match, message->data); break; } } } message = message->next; } pthread_mutex_unlock(message_queue->mutex); return(match); } /** * ags_message_queue_new: * * Create a new #AgsMessageQueue. * * Returns: the new #AgsMessageQueue * * Since: 1.2.0 */ AgsMessageQueue* ags_message_queue_new(gchar *namespace) { AgsMessageQueue *message_queue; message_queue = (AgsMessageQueue *) g_object_new(AGS_TYPE_MESSAGE_QUEUE, "namespace", namespace, NULL); return(message_queue); } gsequencer-1.4.24/ags/thread/ags_task_thread.c0000644000175000017500000006014413247044247016210 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include 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_increment_wait_ref(AgsAsyncQueue *async_queue); guint ags_task_thread_get_wait_ref(AgsAsyncQueue *async_queue); void ags_task_thread_schedule_task(AgsAsyncQueue *async_queue, GObject *task); void ags_task_thread_schedule_task_list(AgsAsyncQueue *async_queue, GList *task_list); void ags_task_thread_start(AgsThread *thread); void ags_task_thread_run(AgsThread *thread); void ags_task_thread_append_task_queue(AgsReturnableThread *returnable_thread, gpointer data); void ags_task_thread_append_tasks_queue(AgsReturnableThread *returnable_thread, gpointer data); /** * SECTION:ags_task_thread * @short_description: task thread * @title: AgsTaskThread * @section_id: * @include: ags/thread/ags_task_thread.h * * The #AgsTaskThread acts as task queue thread. */ enum{ CLEAR_CACHE, LAST_SIGNAL, }; static gpointer ags_task_thread_parent_class = NULL; static AgsConnectableInterface *ags_task_thread_parent_connectable_interface; static guint task_thread_signals[LAST_SIGNAL]; GType ags_task_thread_get_type() { static GType ags_type_task_thread = 0; if(!ags_type_task_thread){ static const GTypeInfo ags_task_thread_info = { sizeof (AgsTaskThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_task_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTaskThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_task_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_task_thread_connectable_interface_init, 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", &ags_task_thread_info, 0); 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); } void ags_task_thread_class_init(AgsTaskThreadClass *task_thread) { GObjectClass *gobject; AgsThreadClass *thread; ags_task_thread_parent_class = g_type_class_peek_parent(task_thread); /* GObject */ gobject = (GObjectClass *) task_thread; gobject->finalize = ags_task_thread_finalize; /* AgsThread */ thread = (AgsThreadClass *) task_thread; thread->start = ags_task_thread_start; thread->run = ags_task_thread_run; /* AgsTaskThread */ task_thread->clear_cache = NULL; /* signals */ /** * AgsTaskThread::clear-cache: * @task_thread: the object playing. * * The ::clear-cache signal is invoked to clear the cache libraries * might have been allocated. * * Since: 1.0.0 */ task_thread_signals[CLEAR_CACHE] = g_signal_new("clear-cache", G_TYPE_FROM_CLASS (task_thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsTaskThreadClass, clear_cache), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_task_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_task_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_task_thread_connect; connectable->disconnect = ags_task_thread_disconnect; } 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; async_queue->increment_wait_ref = ags_task_thread_increment_wait_ref; async_queue->get_wait_ref = ags_task_thread_get_wait_ref; async_queue->schedule_task = ags_task_thread_schedule_task; async_queue->schedule_task_list = ags_task_thread_schedule_task_list; } void ags_task_thread_init(AgsTaskThread *task_thread) { AgsThread *thread; thread = AGS_THREAD(task_thread); // g_atomic_int_or(&(thread->flags), // AGS_THREAD_LOCK_GREEDY_RUN_MUTEX); thread->freq = AGS_TASK_THREAD_DEFAULT_JIFFIE; task_thread->flags = 0; /* async queue */ g_atomic_int_set(&(task_thread->is_run), FALSE); g_atomic_int_set(&(task_thread->wait_ref), 0); /* sync mutex and cond */ task_thread->sync_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(task_thread->sync_mutexattr); pthread_mutexattr_settype(task_thread->sync_mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(task_thread->sync_mutexattr, PTHREAD_PRIO_INHERIT); #endif task_thread->sync_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(task_thread->sync_mutex, task_thread->sync_mutexattr); task_thread->sync_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(task_thread->sync_cond, NULL); /* extern sync mutex and cond */ task_thread->extern_sync_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(task_thread->extern_sync_mutexattr); pthread_mutexattr_settype(task_thread->extern_sync_mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(task_thread->extern_sync_mutexattr, PTHREAD_PRIO_INHERIT); #endif task_thread->extern_sync_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(task_thread->extern_sync_mutex, task_thread->extern_sync_mutexattr); task_thread->extern_sync_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(task_thread->extern_sync_cond, NULL); /* run mutex and cond */ task_thread->run_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(task_thread->run_mutexattr); pthread_mutexattr_settype(task_thread->run_mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(task_thread->run_mutexattr, PTHREAD_PRIO_INHERIT); #endif task_thread->run_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(task_thread->run_mutex, task_thread->run_mutexattr); task_thread->run_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(task_thread->run_cond, NULL); /* read mutex */ task_thread->read_mutexattr = NULL; task_thread->read_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(task_thread->read_mutex, NULL); /* launch mutex */ task_thread->launch_mutexattr = NULL; task_thread->launch_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(task_thread->launch_mutex, NULL); /* queue and exec */ g_atomic_int_set(&(task_thread->queued), 0); g_atomic_int_set(&(task_thread->pending), 0); g_atomic_pointer_set(&(task_thread->exec), NULL); g_atomic_pointer_set(&(task_thread->queue), NULL); /* cyclic task */ task_thread->cyclic_task_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(task_thread->cyclic_task_mutexattr); pthread_mutexattr_settype(task_thread->cyclic_task_mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(task_thread->cyclic_task_mutexattr, PTHREAD_PRIO_INHERIT); #endif task_thread->cyclic_task_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(task_thread->cyclic_task_mutex, task_thread->cyclic_task_mutexattr); g_atomic_pointer_set(&(task_thread->cyclic_task), NULL); /* thread pool */ task_thread->thread_pool = ags_thread_pool_new((AgsThread *) task_thread); task_thread->thread_pool->parent = (AgsThread *) task_thread; } void ags_task_thread_connect(AgsConnectable *connectable) { /* empty */ ags_task_thread_parent_connectable_interface->connect(connectable); } void ags_task_thread_disconnect(AgsConnectable *connectable) { ags_task_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_task_thread_finalize(GObject *gobject) { AgsTaskThread *task_thread; task_thread = AGS_TASK_THREAD(gobject); /* sync mutex and cond */ pthread_mutexattr_destroy(task_thread->sync_mutexattr); free(task_thread->sync_mutexattr); pthread_mutex_destroy(task_thread->sync_mutex); free(task_thread->sync_mutex); pthread_cond_destroy(task_thread->sync_cond); free(task_thread->sync_cond); /* extern sync mutex and cond */ pthread_mutexattr_destroy(task_thread->extern_sync_mutexattr); free(task_thread->extern_sync_mutexattr); pthread_mutex_destroy(task_thread->extern_sync_mutex); free(task_thread->extern_sync_mutex); pthread_cond_destroy(task_thread->extern_sync_cond); free(task_thread->extern_sync_cond); /* run mutex and cond */ pthread_mutexattr_destroy(task_thread->run_mutexattr); free(task_thread->run_mutexattr); pthread_mutex_destroy(task_thread->run_mutex); free(task_thread->run_mutex); pthread_cond_destroy(task_thread->run_cond); free(task_thread->run_cond); /* read mutex */ pthread_mutex_destroy(task_thread->read_mutex); free(task_thread->read_mutex); /* launch mutex */ pthread_mutex_destroy(task_thread->launch_mutex); free(task_thread->launch_mutex); /* free AgsTask lists */ g_list_free_full(g_atomic_pointer_get(&(task_thread->exec)), g_object_unref); g_list_free_full(g_atomic_pointer_get(&(task_thread->queue)), g_object_unref); /* cyclic task */ pthread_mutexattr_destroy(task_thread->cyclic_task_mutexattr); free(task_thread->cyclic_task_mutexattr); pthread_mutex_destroy(task_thread->cyclic_task_mutex); free(task_thread->cyclic_task_mutex); g_list_free_full(g_atomic_pointer_get(&(task_thread->cyclic_task)), g_object_unref); /* */ G_OBJECT_CLASS(ags_task_thread_parent_class)->finalize(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_increment_wait_ref(AgsAsyncQueue *async_queue) { g_atomic_int_inc(&(AGS_TASK_THREAD(async_queue)->wait_ref)); } guint ags_task_thread_get_wait_ref(AgsAsyncQueue *async_queue) { return(g_atomic_int_get(&(AGS_TASK_THREAD(async_queue)->wait_ref))); } void ags_task_thread_schedule_task(AgsAsyncQueue *async_queue, GObject *task) { ags_task_thread_append_task(AGS_TASK_THREAD(async_queue), task); } void ags_task_thread_schedule_task_list(AgsAsyncQueue *async_queue, GList *task_list) { ags_task_thread_append_tasks(AGS_TASK_THREAD(async_queue), task_list); } void ags_task_thread_start(AgsThread *thread) { if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ AGS_THREAD_CLASS(ags_task_thread_parent_class)->start(thread); } } void ags_task_thread_run(AgsThread *thread) { AgsTaskThread *task_thread; GList *list; guint flags; guint prev_pending; gboolean do_sync; static gboolean initialized = FALSE; task_thread = AGS_TASK_THREAD(thread); if(!initialized){ // play_idle.tv_sec = 0; // play_idle.tv_nsec = 10 * round(sysconf(_SC_CLK_TCK) * (double) buffer_size / (double) samplerate); // idle = sysconf(_SC_CLK_TCK) * round(sysconf(_SC_CLK_TCK) * (double) buffer_size / (double) samplerate / 8.0); initialized = TRUE; } /* real-time setup */ #ifdef AGS_WITH_RT if((AGS_THREAD_RT_SETUP & (g_atomic_int_get(&(thread->flags)))) == 0){ struct sched_param param; /* Declare ourself as a real time task */ param.sched_priority = AGS_TASK_THREAD_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } g_atomic_int_or(&(thread->flags), AGS_THREAD_RT_SETUP); } #endif /* */ pthread_mutex_lock(task_thread->read_mutex); g_atomic_pointer_set(&(task_thread->exec), g_atomic_pointer_get(&(task_thread->queue))); g_atomic_pointer_set(&(task_thread->queue), NULL); list = g_atomic_pointer_get(&(task_thread->exec)); prev_pending = g_atomic_int_get(&(task_thread->pending)); g_atomic_int_set(&(task_thread->pending), g_list_length(list)); g_atomic_int_set(&(task_thread->queued), g_atomic_int_get(&(task_thread->queued)) - prev_pending); pthread_mutex_unlock(task_thread->read_mutex); /* */ flags = g_atomic_int_get(&(task_thread->flags)); do_sync = FALSE; if((AGS_TASK_THREAD_EXTERN_SYNC & flags) != 0){ if((AGS_TASK_THREAD_EXTERN_READY & flags) != 0){ g_atomic_int_or(&(task_thread->flags), AGS_TASK_THREAD_EXTERN_AVAILABLE); do_sync = TRUE; pthread_mutex_lock(task_thread->sync_mutex); g_atomic_int_and(&(task_thread->flags), (~AGS_TASK_THREAD_SYNC_DONE)); if((AGS_TASK_THREAD_SYNC_WAIT & (g_atomic_int_get(&(task_thread->flags)))) != 0 && (AGS_TASK_THREAD_SYNC_DONE & (g_atomic_int_get(&(task_thread->flags)))) == 0){ while((AGS_TASK_THREAD_SYNC_WAIT & (g_atomic_int_get(&(task_thread->flags)))) != 0 && (AGS_TASK_THREAD_SYNC_DONE & (g_atomic_int_get(&(task_thread->flags)))) == 0){ pthread_cond_wait(task_thread->sync_cond, task_thread->sync_mutex); } } g_atomic_int_or(&(task_thread->flags), (AGS_TASK_THREAD_SYNC_WAIT | AGS_TASK_THREAD_SYNC_DONE)); pthread_mutex_unlock(task_thread->sync_mutex); } } /* launch tasks */ if(list != NULL){ AgsTask *task; int i; pthread_mutex_lock(task_thread->launch_mutex); for(i = 0; i < g_atomic_int_get(&(task_thread->pending)); i++){ task = AGS_TASK(list->data); #ifdef AGS_DEBUG g_message("ags_task_thread - launching task: %s", G_OBJECT_TYPE_NAME(task)); #endif ags_task_launch(task); list = list->next; } pthread_mutex_unlock(task_thread->launch_mutex); } pthread_mutex_lock(task_thread->read_mutex); list = g_atomic_pointer_get(&(task_thread->exec)); g_atomic_pointer_set(&(task_thread->exec), NULL); g_list_free_full(list, g_object_unref); pthread_mutex_unlock(task_thread->read_mutex); /* cyclic task */ pthread_mutex_lock(task_thread->cyclic_task_mutex); list = g_atomic_pointer_get(&(task_thread->cyclic_task)); if(list != NULL){ AgsTask *task; int i; while(list != NULL){ task = AGS_TASK(list->data); #ifdef AGS_DEBUG g_message("ags_task_thread - launching cyclic task: %s", G_OBJECT_TYPE_NAME(task)); #endif ags_task_launch(task); list = list->next; } } pthread_mutex_unlock(task_thread->cyclic_task_mutex); if(do_sync){ pthread_mutex_lock(task_thread->extern_sync_mutex); g_atomic_int_and(&(task_thread->flags), (~AGS_TASK_THREAD_EXTERN_SYNC_WAIT)); if((AGS_TASK_THREAD_EXTERN_SYNC_DONE & (g_atomic_int_get(&(task_thread->flags)))) == 0){ pthread_cond_signal(task_thread->extern_sync_cond); } pthread_mutex_unlock(task_thread->extern_sync_mutex); } /* async queue */ pthread_mutex_lock(task_thread->run_mutex); ags_async_queue_set_run(AGS_ASYNC_QUEUE(task_thread), TRUE); if(ags_async_queue_get_wait_ref(AGS_ASYNC_QUEUE(task_thread)) != 0){ pthread_cond_broadcast(task_thread->run_cond); } g_atomic_int_set(&(task_thread->wait_ref), 0); pthread_mutex_unlock(task_thread->run_mutex); /* clean-up */ ags_task_thread_clear_cache(task_thread); } void ags_task_thread_append_task_queue(AgsReturnableThread *returnable_thread, gpointer data) { AgsTask *task; AgsTaskThread *task_thread; AgsTaskThreadAppend *append; GList *tmplist; gboolean initial_wait; int ret; append = (AgsTaskThreadAppend *) g_atomic_pointer_get(&(returnable_thread->safe_data)); task_thread = g_atomic_pointer_get(&(append->task_thread)); task = AGS_TASK(g_atomic_pointer_get(&(append->data))); free(append); /* lock */ pthread_mutex_lock(task_thread->read_mutex); /* append to queue */ g_atomic_int_set(&(task_thread->queued), g_atomic_int_get(&(task_thread->queued)) + 1); tmplist = g_atomic_pointer_get(&(task_thread->queue)); g_atomic_pointer_set(&(task_thread->queue), g_list_append(tmplist, task)); /* unlock */ pthread_mutex_unlock(task_thread->read_mutex); /* */ // g_message("ags_task_thread_append_task_thread ------------------------- %d", devout->append_task_suspend); g_object_unref(returnable_thread); } /** * ags_task_thread_append_task: * @task_thread: an #AgsTaskThread * @task: an #AgsTask * * Adds the task to @task_thread. * * Since: 1.0.0 */ void ags_task_thread_append_task(AgsTaskThread *task_thread, AgsTask *task) { AgsTaskThreadAppend *append; AgsThread *thread; guint flags; #ifdef AGS_DEBUG g_message("append task"); #endif append = (AgsTaskThreadAppend *) malloc(sizeof(AgsTaskThreadAppend)); g_atomic_pointer_set(&(append->task_thread), task_thread); g_atomic_pointer_set(&(append->data), task); thread = ags_thread_pool_pull(task_thread->thread_pool); // g_object_ref(thread); pthread_mutex_lock(AGS_RETURNABLE_THREAD(thread)->reset_mutex); g_atomic_pointer_set(&(AGS_RETURNABLE_THREAD(thread)->safe_data), append); ags_returnable_thread_connect_safe_run(AGS_RETURNABLE_THREAD(thread), ags_task_thread_append_task_queue); g_atomic_int_or(&(AGS_RETURNABLE_THREAD(thread)->flags), AGS_RETURNABLE_THREAD_IN_USE); pthread_mutex_unlock(AGS_RETURNABLE_THREAD(thread)->reset_mutex); } void ags_task_thread_append_tasks_queue(AgsReturnableThread *returnable_thread, gpointer data) { AgsTask *task; AgsTaskThread *task_thread; AgsTaskThreadAppend *append; GList *list, *tmplist; gboolean initial_wait; int ret; append = (AgsTaskThreadAppend *) g_atomic_pointer_get(&(returnable_thread->safe_data)); task_thread = g_atomic_pointer_get(&(append->task_thread)); list = (GList *) g_atomic_pointer_get(&(append->data)); free(append); /* lock */ pthread_mutex_lock(task_thread->read_mutex); /* append to queue */ g_atomic_int_set(&(task_thread->queued), g_atomic_int_get(&(task_thread->queued)) + g_list_length(list)); tmplist = g_atomic_pointer_get(&(task_thread->queue)); g_atomic_pointer_set(&(task_thread->queue), g_list_concat(tmplist, list)); /* */ pthread_mutex_unlock(task_thread->read_mutex); g_object_unref(returnable_thread); } /** * ags_task_thread_append_tasks: * @task_thread: an #AgsTaskThread * @list: a GList with #AgsTask as data * * Concats the list with @task_thread's internal task list. Don't * free the list you pass. It will be freed for you. * * Since: 1.0.0 */ void ags_task_thread_append_tasks(AgsTaskThread *task_thread, GList *list) { AgsTaskThreadAppend *append; AgsThread *thread; guint flags; #ifdef AGS_DEBUG g_message("append tasks"); #endif /* pull */ append = (AgsTaskThreadAppend *) malloc(sizeof(AgsTaskThreadAppend)); g_atomic_pointer_set(&(append->task_thread), task_thread); g_atomic_pointer_set(&(append->data), list); thread = ags_thread_pool_pull(task_thread->thread_pool); // g_object_ref(thread); /* set safe data and run */ pthread_mutex_lock(AGS_RETURNABLE_THREAD(thread)->reset_mutex); g_atomic_pointer_set(&(AGS_RETURNABLE_THREAD(thread)->safe_data), append); ags_returnable_thread_connect_safe_run(AGS_RETURNABLE_THREAD(thread), ags_task_thread_append_tasks_queue); g_atomic_int_or(&(AGS_RETURNABLE_THREAD(thread)->flags), AGS_RETURNABLE_THREAD_IN_USE); pthread_mutex_unlock(AGS_RETURNABLE_THREAD(thread)->reset_mutex); } /** * ags_task_thread_append_cyclic_task: * @task_thread: the #AgsTaskThread * @task: the #AgsTask * * Add cyclic task. * * Since: 1.0.0 */ void ags_task_thread_append_cyclic_task(AgsTaskThread *task_thread, AgsTask *task) { pthread_mutex_lock(task_thread->cyclic_task_mutex); g_atomic_pointer_set(&(task_thread->cyclic_task), g_list_append(g_atomic_pointer_get(&(task_thread->cyclic_task)), task)); pthread_mutex_unlock(task_thread->cyclic_task_mutex); } /** * ags_task_thread_remove_cyclic_task: * @task_thread: the #AgsTaskThread * @task: the #AgsTask * * Remove cyclic task. * * Since: 1.0.0 */ void ags_task_thread_remove_cyclic_task(AgsTaskThread *task_thread, AgsTask *task) { pthread_mutex_lock(task_thread->cyclic_task_mutex); g_atomic_pointer_set(&(task_thread->cyclic_task), g_list_remove(g_atomic_pointer_get(&(task_thread->cyclic_task)), task)); pthread_mutex_unlock(task_thread->cyclic_task_mutex); } /** * ags_task_thread_clear_cache: * @task_thread: the #AgsTaskThread * * Clear cache signal. * * Since: 1.0.0 */ void ags_task_thread_clear_cache(AgsTaskThread *task_thread) { g_return_if_fail(AGS_IS_TASK_THREAD(task_thread)); g_object_ref(task_thread); g_signal_emit(task_thread, task_thread_signals[CLEAR_CACHE], 0); g_object_unref(task_thread); } /** * ags_task_thread_new: * * Create a new #AgsTaskThread. * * Returns: the new #AgsTaskThread * * Since: 1.0.0 */ AgsTaskThread* ags_task_thread_new() { AgsTaskThread *task_thread; task_thread = (AgsTaskThread *) g_object_new(AGS_TYPE_TASK_THREAD, NULL); return(task_thread); } gsequencer-1.4.24/ags/thread/ags_history.c0000644000175000017500000000603413246707333015417 00000000000000/* 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 . */ #include #include void ags_history_class_init(AgsHistoryClass *history); void ags_history_connectable_interface_init(AgsConnectableInterface *connectable); void ags_history_init(AgsHistory *history); void ags_history_connect(AgsConnectable *connectable); void ags_history_disconnect(AgsConnectable *connectable); void ags_history_finalize(GObject *gobject); enum{ LAUNCH, FAILURE, LAST_SIGNAL, }; static gpointer ags_history_parent_class = NULL; static guint history_signals[LAST_SIGNAL]; GType ags_history_get_type() { static GType ags_type_history = 0; if(!ags_type_history){ static const GTypeInfo ags_history_info = { sizeof (AgsHistoryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_history_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsHistory), 0, /* n_preallocs */ (GInstanceInitFunc) ags_history_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_history_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_history = g_type_register_static(G_TYPE_OBJECT, "AgsHistory", &ags_history_info, 0); g_type_add_interface_static(ags_type_history, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_history); } void ags_history_class_init(AgsHistoryClass *history) { GObjectClass *gobject; ags_history_parent_class = g_type_class_peek_parent(history); /* GObjectClass */ gobject = (GObjectClass *) history; gobject->finalize = ags_history_finalize; } void ags_history_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_history_connect; connectable->disconnect = ags_history_disconnect; } void ags_history_init(AgsHistory *history) { } void ags_history_connect(AgsConnectable *connectable) { /* empty */ } void ags_history_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_history_finalize(GObject *gobject) { } AgsHistory* ags_history_new() { AgsHistory *history; history = (AgsHistory *) g_object_new(AGS_TYPE_HISTORY, NULL); return(history); } gsequencer-1.4.24/ags/thread/ags_task_thread.h0000644000175000017500000001131013247044247016204 00000000000000/* 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 . */ #ifndef __AGS_TASK_THREAD_H__ #define __AGS_TASK_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #include #define AGS_TYPE_TASK_THREAD (ags_task_thread_get_type()) #define AGS_TASK_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TASK_THREAD, AgsTaskThread)) #define AGS_TASK_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_TASK_THREAD, AgsTaskThread)) #define AGS_IS_TASK_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TASK_THREAD)) #define AGS_IS_TASK_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TASK_THREAD)) #define AGS_TASK_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_TASK_THREAD, AgsTaskThreadClass)) #ifndef AGS_TASK_THREAD_RT_PRIORITY #define AGS_TASK_THREAD_RT_PRIORITY (95) #endif #define AGS_TASK_THREAD_DEFAULT_JIFFIE (AGS_THREAD_DEFAULT_MAX_PRECISION) typedef struct _AgsTaskThread AgsTaskThread; typedef struct _AgsTaskThreadClass AgsTaskThreadClass; typedef struct _AgsTaskThreadAppend AgsTaskThreadAppend; /** * AgsTaskThreadFlags: * @AGS_TASK_THREAD_EXTERN_SYNC: sync with external thread * @AGS_TASK_THREAD_EXTERN_READY: sync with exeternal thread ready * @AGS_TASK_THREAD_EXTERN_AVAILABLE: the external thread is available * @AGS_TASK_THREAD_SYNC_WAIT: sync external thread wait - producer * @AGS_TASK_THREAD_SYNC_DONE: sync external thread done - producer * @AGS_TASK_THREAD_EXTERN_SYNC_WAIT: sync external thread wait - consumer * @AGS_TASK_THREAD_EXTERN_SYNC_DONE: sync external thread done - consumer * * Enum values to control the behavior or indicate internal state of #AgsTaskThread by * enable/disable as flags. */ typedef enum{ AGS_TASK_THREAD_EXTERN_SYNC = 1, AGS_TASK_THREAD_EXTERN_READY = 1 << 1, AGS_TASK_THREAD_EXTERN_AVAILABLE = 1 << 2, AGS_TASK_THREAD_SYNC_WAIT = 1 << 3, AGS_TASK_THREAD_SYNC_DONE = 1 << 4, AGS_TASK_THREAD_EXTERN_SYNC_WAIT = 1 << 5, AGS_TASK_THREAD_EXTERN_SYNC_DONE = 1 << 6, }AgsTaskThreadFlags; struct _AgsTaskThread { AgsThread thread; volatile guint flags; volatile gboolean is_run; volatile guint wait_ref; pthread_mutexattr_t *sync_mutexattr; pthread_mutex_t *sync_mutex; pthread_cond_t *sync_cond; pthread_mutexattr_t *extern_sync_mutexattr; pthread_mutex_t *extern_sync_mutex; pthread_cond_t *extern_sync_cond; pthread_mutexattr_t *run_mutexattr; pthread_mutex_t *run_mutex; pthread_cond_t *run_cond; pthread_mutexattr_t *read_mutexattr; pthread_mutex_t *read_mutex; pthread_mutexattr_t *launch_mutexattr; pthread_mutex_t *launch_mutex; volatile guint queued; volatile guint pending; volatile GList *exec; volatile GList *queue; pthread_mutexattr_t *cyclic_task_mutexattr; pthread_mutex_t *cyclic_task_mutex; volatile GList *cyclic_task; AgsThreadPool *thread_pool; }; struct _AgsTaskThreadClass { AgsThreadClass thread; void (*clear_cache)(AgsTaskThread *task_thread); }; /** * AgsTaskThreadAppend: * @task_thread: the #AgsTaskThread * @data: the #AgsTask * * #AgsTaskThreadAppend is used to add tasks non-blocking. */ struct _AgsTaskThreadAppend { volatile AgsTaskThread *task_thread; volatile gpointer data; }; GType ags_task_thread_get_type(); void ags_task_thread_append_task(AgsTaskThread *task_thread, AgsTask *task); void ags_task_thread_append_tasks(AgsTaskThread *task_thread, GList *list); void ags_task_thread_append_cyclic_task(AgsTaskThread *task_thread, AgsTask *task); void ags_task_thread_remove_cyclic_task(AgsTaskThread *task_thread, AgsTask *task); void ags_task_thread_clear_cache(AgsTaskThread *task_thread); AgsTaskThread* ags_task_thread_new(); #endif /*__AGS_TASK_THREAD_H__*/ gsequencer-1.4.24/ags/thread/ags_poll_fd.c0000644000175000017500000001313513246707333015335 00000000000000/* 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 . */ #include #include #include void ags_poll_fd_class_init(AgsPollFdClass *poll_fd); void ags_poll_fd_connectable_interface_init(AgsConnectableInterface *connectable); void ags_poll_fd_init(AgsPollFd *poll_fd); void ags_poll_fd_connect(AgsConnectable *connectable); void ags_poll_fd_disconnect(AgsConnectable *connectable); void ags_poll_fd_finalize(GObject *gobject); /** * SECTION:ags_poll_fd * @short_description: Perform operations in a thread safe context. * @title: AgsPollFd * @section_id: * @include: ags/thread/ags_poll_fd.h * * #AgsPollFd object acts an interceptor in a thread safe context. */ enum{ DISPATCH, LAST_SIGNAL, }; static gpointer ags_poll_fd_parent_class = NULL; static guint poll_fd_signals[LAST_SIGNAL]; GType ags_poll_fd_get_type() { static GType ags_type_poll_fd = 0; if(!ags_type_poll_fd){ static const GTypeInfo ags_poll_fd_info = { sizeof (AgsPollFdClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_poll_fd_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPollFd), 0, /* n_preallocs */ (GInstanceInitFunc) ags_poll_fd_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_poll_fd_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_poll_fd = g_type_register_static(G_TYPE_OBJECT, "AgsPollFd", &ags_poll_fd_info, 0); g_type_add_interface_static(ags_type_poll_fd, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_poll_fd); } void ags_poll_fd_class_init(AgsPollFdClass *poll_fd) { GObjectClass *gobject; ags_poll_fd_parent_class = g_type_class_peek_parent(poll_fd); /* GObjectClass */ gobject = (GObjectClass *) poll_fd; gobject->finalize = ags_poll_fd_finalize; /* AgsPollFdClass */ poll_fd->dispatch = NULL; /** * AgsPollFd::dispatch: * @poll_fd: the #AgsPollFd * * The ::dispatch signal is emited during poll * * Since: 1.0.0 */ poll_fd_signals[DISPATCH] = g_signal_new("dispatch", G_TYPE_FROM_CLASS (poll_fd), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsPollFdClass, dispatch), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_poll_fd_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_poll_fd_connect; connectable->disconnect = ags_poll_fd_disconnect; } void ags_poll_fd_init(AgsPollFd *poll_fd) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t attr; /* insert devout mutex */ //FIXME:JK: memory leak pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, &attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) poll_fd, mutex); pthread_mutex_unlock(application_mutex); /* */ poll_fd->flags = 0; poll_fd->polling_thread = NULL; poll_fd->poll_fd = NULL; /* */ poll_fd->delay = 0.0; poll_fd->delay_counter = 0.0; } void ags_poll_fd_connect(AgsConnectable *connectable) { /* empty */ } void ags_poll_fd_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_poll_fd_finalize(GObject *gobject) { /* empty */ G_OBJECT_CLASS(ags_poll_fd_parent_class)->finalize(gobject); } /** * ags_poll_fd_dispatch: * @poll_fd: the #AgsPollFd * * Dispatch IO. * * Since: 1.0.0 */ void ags_poll_fd_dispatch(AgsPollFd *poll_fd) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) poll_fd); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); g_return_if_fail(AGS_IS_POLL_FD(poll_fd)); g_object_ref(G_OBJECT(poll_fd)); g_signal_emit(G_OBJECT(poll_fd), poll_fd_signals[DISPATCH], 0); g_object_unref(G_OBJECT(poll_fd)); pthread_mutex_unlock(mutex); } /** * ags_poll_fd_new: * * Creates a #AgsPollFd * * Returns: a new #AgsPollFd * * Since: 1.0.0 */ AgsPollFd* ags_poll_fd_new() { AgsPollFd *poll_fd; poll_fd = (AgsPollFd *) g_object_new(AGS_TYPE_POLL_FD, NULL); return(poll_fd); } gsequencer-1.4.24/ags/thread/ags_timestamp.h0000644000175000017500000000456313246707333015733 00000000000000/* 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 . */ #ifndef __AGS_TIMESTAMP_H__ #define __AGS_TIMESTAMP_H__ #include #include #define AGS_TYPE_TIMESTAMP (ags_timestamp_get_type()) #define AGS_TIMESTAMP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TIMESTAMP, AgsTimestamp)) #define AGS_TIMESTAMP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TIMESTAMP, AgsTimestampClass)) #define AGS_IS_TIMESTAMP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TIMESTAMP)) #define AGS_IS_TIMESTAMP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TIMESTAMP)) #define AGS_TIMESTAMP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_TIMESTAMP, AgsTimestampClass)) typedef struct _AgsTimestamp AgsTimestamp; typedef struct _AgsTimestampClass AgsTimestampClass; /** * AgsTimestampFlags: * @AGS_TIMESTAMP_UNIX: unix timestamp is used * @AGS_TIMESTAMP_OFFSET: internal offset is used * @AGS_TIMESTAMP_OUTDATED: the timestamp is outdated * * Enum values to control the behavior or indicate internal state of #AgsTimestamp by * enable/disable as sync_flags. */ typedef enum{ AGS_TIMESTAMP_UNIX = 1, AGS_TIMESTAMP_OFFSET = 1 << 1, AGS_TIMESTAMP_OUTDATED = 1 << 2, }AgsTimestampFlags; struct _AgsTimestamp { GObject object; guint flags; union{ struct _unix{ time_t time_val; }unix_time; struct _ags{ guint64 offset; }ags_offset; }timer; gdouble delay; guint attack; }; struct _AgsTimestampClass { GObjectClass object; }; GType ags_timestamp_get_type(void); /* */ AgsTimestamp* ags_timestamp_new(); #endif /*__AGS_TIMESTAMP_H__*/ gsequencer-1.4.24/ags/libags-gui.h0000644000175000017500000000354013247044247013643 00000000000000/* 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 . */ #ifndef __LIBAGS_GUI_H__ #define __LIBAGS_GUI_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif /*__LIBAGS_GUI_H__*/ gsequencer-1.4.24/ags/file/0000755000175000017500000000000013256233676012452 500000000000000gsequencer-1.4.24/ags/file/ags_file_util.h0000644000175000017500000000522513246707333015350 00000000000000/* 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 . */ #ifndef __AGS_FILE_UTIL_H__ #define __AGS_FILE_UTIL_H__ #include #include #include #include #include #include /* gvalue */ void ags_file_util_read_value(AgsFile *file, xmlNode *node, gchar **id, GValue *value, xmlChar **xpath); xmlNode* ags_file_util_write_value(AgsFile *file, xmlNode *parent, gchar *id, GValue *value, GType pointer_type, guint arr_length); /* parameter */ void ags_file_util_read_parameter(AgsFile *file, xmlNode *node, gchar **id, GParameter **parameter, gint *n_params, xmlChar ***xpath); xmlNode* ags_file_util_write_parameter(AgsFile *file, xmlNode *parent, gchar *id, GParameter *parameter, gint n_params); /* dependency */ void ags_file_util_read_dependency(AgsFile *file, xmlNode *node, gchar **id, gchar **name, xmlChar **xpath); xmlNode* ags_file_util_write_dependency(AgsFile *file, xmlNode *parent, gchar *id, gchar *name, xmlChar *xpath); /* object */ void ags_file_util_read_object(AgsFile *file, xmlNode *node, GObject **gobject); xmlNode* ags_file_util_write_object(AgsFile *file, xmlNode *parent, GObject *gobject); /* history */ void ags_file_util_read_history(AgsFile *file, xmlNode *node, AgsHistory **history); xmlNode* ags_file_util_write_history(AgsFile *file, xmlNode *parent, AgsHistory *history); /* file link */ void ags_file_read_file_link(AgsFile *file, xmlNode *node, AgsFileLink **file_link); xmlNode* ags_file_write_file_link(AgsFile *file, xmlNode *parent, AgsFileLink *file_link); void ags_file_read_file_link_list(AgsFile *file, xmlNode *node, GList **file_link); xmlNode* ags_file_write_file_link_list(AgsFile *file, xmlNode *parent, GList *file_link); #endif /*__AGS_FILE_UTIL_H__*/ gsequencer-1.4.24/ags/file/ags_file_lookup.c0000644000175000017500000001741713246707333015705 00000000000000/* 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 . */ #include #include void ags_file_lookup_class_init(AgsFileLookupClass *file_lookup); void ags_file_lookup_init (AgsFileLookup *file_lookup); void ags_file_lookup_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_file_lookup_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_file_lookup_finalize(GObject *gobject); /** * SECTION:ags_file_lookup * @short_description: resolve objects read of file. * @title: AgsFileLookup * @section_id: * @include: ags/file/ags_file_lookup.h * * The #AgsFileLookup resolve objects of file. */ enum{ RESOLVE, LAST_SIGNAL, }; enum{ PROP_0, PROP_FILE, PROP_NODE, PROP_REFERENCE, }; static gpointer ags_file_lookup_parent_class = NULL; static guint file_lookup_signals[LAST_SIGNAL]; GType ags_file_lookup_get_type (void) { static GType ags_type_file_lookup = 0; if(!ags_type_file_lookup){ static const GTypeInfo ags_file_lookup_info = { sizeof (AgsFileLookupClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_file_lookup_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFileLookup), 0, /* n_preallocs */ (GInstanceInitFunc) ags_file_lookup_init, }; ags_type_file_lookup = g_type_register_static(G_TYPE_OBJECT, "AgsFileLookup", &ags_file_lookup_info, 0); } return (ags_type_file_lookup); } void ags_file_lookup_class_init(AgsFileLookupClass *file_lookup) { GObjectClass *gobject; GParamSpec *param_spec; ags_file_lookup_parent_class = g_type_class_peek_parent(file_lookup); /* GObjectClass */ gobject = (GObjectClass *) file_lookup; gobject->get_property = ags_file_lookup_get_property; gobject->set_property = ags_file_lookup_set_property; gobject->finalize = ags_file_lookup_finalize; /* properties */ /** * AgsFile:file: * * The assigned #AgsFile to resolve. * * Since: 1.0.0 */ param_spec = g_param_spec_object("file", i18n_pspec("assigned file"), i18n_pspec("The file it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILE, param_spec); /** * AgsFile:node: * * The assigned #xmlNode to resolve. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("node", i18n_pspec("assigned node"), i18n_pspec("The node it is assigned with"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NODE, param_spec); /** * AgsFile:reference: * * The assigned #gpointer to resolve. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("reference", i18n_pspec("assigned reference"), i18n_pspec("The reference it is assigned with"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_REFERENCE, param_spec); /* AgsFileLookupClass */ file_lookup->resolve = NULL; /** * AgsFile::resolve: * @file_lookup: the #AgsFileLookup * * Resolve @file_lookup either for reading or writing XPath and retrieving * appropriate UUID. * * Since: 1.0.0 */ file_lookup_signals[RESOLVE] = g_signal_new("resolve", G_TYPE_FROM_CLASS(file_lookup), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileLookupClass, resolve), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_file_lookup_init(AgsFileLookup *file_lookup) { file_lookup->file = NULL; file_lookup->node = NULL; file_lookup->ref = NULL; } void ags_file_lookup_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsFileLookup *file_lookup; file_lookup = AGS_FILE_LOOKUP(gobject); switch(prop_id){ case PROP_FILE: { AgsFile *file; file = (AgsFile *) g_value_get_object(value); if(file_lookup->file == file){ return; } if(file_lookup->file != NULL){ g_object_unref(G_OBJECT(file_lookup->file)); } if(file != NULL){ g_object_ref(file); } file_lookup->file = file; } break; case PROP_NODE: { xmlNode *node; node = (xmlNode *) g_value_get_pointer(value); file_lookup->node = node; } break; case PROP_REFERENCE: { gpointer ref; ref = (gpointer) g_value_get_pointer(value); file_lookup->ref = ref; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_lookup_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsFileLookup *file_lookup; file_lookup = AGS_FILE_LOOKUP(gobject); switch(prop_id){ case PROP_FILE: g_value_set_object(value, file_lookup->file); break; case PROP_NODE: g_value_set_pointer(value, file_lookup->node); break; case PROP_REFERENCE: g_value_set_pointer(value, file_lookup->ref); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_lookup_finalize(GObject *gobject) { AgsFileLookup *file_lookup; file_lookup = AGS_FILE_LOOKUP(gobject); if(file_lookup->file != NULL){ g_object_unref(G_OBJECT(file_lookup->file)); } } /** * ags_file_lookup_resolve: * @file_lookup: the #AgsFileLookup * * The ::resolve signal. * * Since: 1.0.0 */ void ags_file_lookup_resolve(AgsFileLookup *file_lookup) { g_return_if_fail(AGS_IS_FILE_LOOKUP(file_lookup)); g_object_ref((GObject *) file_lookup); g_signal_emit(G_OBJECT(file_lookup), file_lookup_signals[RESOLVE], 0); g_object_unref((GObject *) file_lookup); } /** * ags_file_lookup_find_by_node: * @file_lookup: the #GList containing #AgsFileLookup * @node: a #xmlNode * * Find #AgsFileLookup by #xmlNode * * Returns: The list containing #AgsFileLookup if found otherwise %NULL * * Since: 1.0.0 */ GList* ags_file_lookup_find_by_node(GList *file_lookup, xmlNode *node) { while(file_lookup != NULL && AGS_FILE_LOOKUP(file_lookup->data)->node != node){ file_lookup = file_lookup->next; } return(file_lookup); } /** * ags_file_lookup_find_by_reference: * @file_lookup: the #GList containing #AgsFileLookup * @ref: a #gpointer * * Find #AgsFileLookup by @ref * * Returns: The list containing #AgsFileLookup if found otherwise %NULL * * Since: 1.0.0 */ GList* ags_file_lookup_find_by_reference(GList *file_lookup, gpointer ref) { while(file_lookup != NULL && AGS_FILE_LOOKUP(file_lookup->data)->ref != ref){ file_lookup = file_lookup->next; } return(file_lookup); } /** * ags_file_lookup_new: * * Creates an #AgsFileLookup * * Returns: a new #AgsFileLookup * * Since: 1.0.0 */ AgsFileLookup* ags_file_lookup_new() { AgsFileLookup *file_lookup; file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, NULL); return(file_lookup); } gsequencer-1.4.24/ags/file/ags_file_launch.c0000644000175000017500000002001213246707333015627 00000000000000/* 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 . */ #include #include void ags_file_launch_class_init(AgsFileLaunchClass *file_launch); void ags_file_launch_init (AgsFileLaunch *file_launch); void ags_file_launch_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_file_launch_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_file_launch_finalize(GObject *gobject); /** * SECTION:ags_file_launch * @short_description: launch objects read of file. * @title: AgsFileLaunch * @section_id: * @include: ags/file/ags_file_launch.h * * The #AgsFileLaunch launches read objects of file. */ enum{ START, LAST_SIGNAL, }; enum{ PROP_0, PROP_REFERENCE, PROP_NODE, PROP_FILE, PROP_APPLICATION_CONTEXT, }; static gpointer ags_file_launch_parent_class = NULL; static guint file_launch_signals[LAST_SIGNAL]; GType ags_file_launch_get_type (void) { static GType ags_type_file_launch = 0; if(!ags_type_file_launch){ static const GTypeInfo ags_file_launch_info = { sizeof (AgsFileLaunchClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_file_launch_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFileLaunch), 0, /* n_preallocs */ (GInstanceInitFunc) ags_file_launch_init, }; ags_type_file_launch = g_type_register_static(G_TYPE_OBJECT, "AgsFileLaunch", &ags_file_launch_info, 0); } return (ags_type_file_launch); } void ags_file_launch_class_init(AgsFileLaunchClass *file_launch) { GObjectClass *gobject; GParamSpec *param_spec; ags_file_launch_parent_class = g_type_class_peek_parent(file_launch); /* GObjectClass */ gobject = (GObjectClass *) file_launch; gobject->set_property = ags_file_launch_set_property; gobject->get_property = ags_file_launch_get_property; gobject->finalize = ags_file_launch_finalize; /* properties */ /** * AgsFileLaunch:node: * * The assigned xmlNode being refered by this #AgsFileLaunch. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("node", i18n_pspec("the node"), i18n_pspec("The node to find the element"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NODE, param_spec); /** * AgsFileLaunch:reference: * * The object refered by this #AgsFileLaunch. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("reference", i18n_pspec("the reference"), i18n_pspec("The reference to find the element"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_REFERENCE, param_spec); /** * AgsFileLaunch:file: * * The #AgsFile this #AgsFileLaunch belongs to. * * Since: 1.0.0 */ param_spec = g_param_spec_object("file", i18n_pspec("file assigned to"), i18n_pspec("The entire file assigned to"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILE, param_spec); /** * AgsFileLaunch:application-context: * * The #AgsApplicationContext to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context access"), i18n_pspec("The application context to access the tree"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* AgsFileLaunchClass */ file_launch->start = NULL; /** * AgsFileLaunch::start: * @file_id_ref: the #AgsFileLaunch * * Signal ::start to notify about start :reference. * * Since: 1.0.0 */ file_launch_signals[START] = g_signal_new("start", G_TYPE_FROM_CLASS(file_launch), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileLaunchClass, start), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_file_launch_init(AgsFileLaunch *file_launch) { file_launch->application_context = NULL; file_launch->reference = NULL; file_launch->node = NULL; file_launch->file = NULL; } void ags_file_launch_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsFileLaunch *file_launch; file_launch = AGS_FILE_LAUNCH(gobject); switch(prop_id){ case PROP_NODE: { xmlNode *node; node = (xmlNode *) g_value_get_pointer(value); file_launch->node = node; } break; case PROP_REFERENCE: { gpointer ref; ref = g_value_get_pointer(value); file_launch->reference = ref; } break; case PROP_FILE: { GObject *file; file = (GObject *) g_value_get_object(value); if(file_launch->file != NULL) g_object_unref(file_launch->file); if(file != NULL) g_object_ref(file); file_launch->file = file; } break; case PROP_APPLICATION_CONTEXT: { GObject *application_context; application_context = (GObject *) g_value_get_object(value); if(file_launch->application_context != NULL) g_object_unref(file_launch->application_context); if(application_context != NULL) g_object_ref(application_context); file_launch->application_context = application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_launch_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsFileLaunch *file_launch; file_launch = AGS_FILE_LAUNCH(gobject); switch(prop_id){ case PROP_NODE: { g_value_set_pointer(value, file_launch->node); } break; case PROP_REFERENCE: { g_value_set_pointer(value, file_launch->reference); } break; case PROP_FILE: { g_value_set_object(value, file_launch->file); } break; case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, file_launch->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_launch_finalize(GObject *gobject) { AgsFileLaunch *file_launch; file_launch = AGS_FILE_LAUNCH(gobject); if(file_launch->file != NULL){ g_object_unref(file_launch->file); } if(file_launch->application_context != NULL){ g_object_unref(file_launch->application_context); } G_OBJECT_CLASS(ags_file_launch_parent_class)->finalize(gobject); } /** * ags_file_launch_start: * @file_launch: the #AgsFileLaunch * * Start #AgsFileLaunch to fulfill a task. * * Since: 1.0.0 */ void ags_file_launch_start(AgsFileLaunch *file_launch) { g_return_if_fail(AGS_IS_FILE_LAUNCH(file_launch)); g_object_ref((GObject *) file_launch); g_signal_emit(G_OBJECT(file_launch), file_launch_signals[START], 0); g_object_unref((GObject *) file_launch); } /** * ags_file_launch_new: * * Creates an #AgsFileLaunch * * Returns: a new #AgsFileLaunch * * Since: 1.0.0 */ AgsFileLaunch* ags_file_launch_new() { AgsFileLaunch *file_launch; file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, NULL); return(file_launch); } gsequencer-1.4.24/ags/file/ags_file_launch.h0000644000175000017500000000401013246707333015634 00000000000000/* 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 . */ #ifndef __AGS_FILE_LAUNCH_H__ #define __AGS_FILE_LAUNCH_H__ #include #include #include #define AGS_TYPE_FILE_LAUNCH (ags_file_launch_get_type()) #define AGS_FILE_LAUNCH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FILE_LAUNCH, AgsFileLaunch)) #define AGS_FILE_LAUNCH_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FILE_LAUNCH, AgsFileLaunchClass)) #define AGS_IS_FILE_LAUNCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FILE_LAUNCH)) #define AGS_IS_FILE_LAUNCH_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FILE_LAUNCH)) #define AGS_FILE_LAUNCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_FILE_LAUNCH, AgsFileLaunchClass)) typedef struct _AgsFileLaunch AgsFileLaunch; typedef struct _AgsFileLaunchClass AgsFileLaunchClass; struct _AgsFileLaunch { GObject object; GObject *application_context; gpointer reference; xmlNode *node; GObject *file; }; struct _AgsFileLaunchClass { GObjectClass object; void (*start)(AgsFileLaunch *file_launch); }; GType ags_file_launch_get_type(void); void ags_file_launch_start(AgsFileLaunch *file_launch); /* */ AgsFileLaunch* ags_file_launch_new(); #endif /*__AGS_FILE_LAUNCH_H__*/ gsequencer-1.4.24/ags/file/ags_file_stock.h0000644000175000017500000000411313246707333015511 00000000000000/* 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 . */ #ifndef __AGS_FILE_STOCK_H__ #define __AGS_FILE_STOCK_H__ #include #include #define AGS_FILE_DEFAULT_VERSION "0.4.2\0" #define AGS_FILE_EFFECTS_DEFAULT_VERSION "0.4.2\0" #define AGS_CLIPBOARD_DEFAULT_VERSION "0.4.2\0" #define AGS_FILE_FALSE "FALSE\0" #define AGS_FILE_TRUE "TRUE\0" #define AGS_FILE_BOOLEAN_PROP "gboolean\0" #define AGS_FILE_CHAR_PROP "gchar\0" #define AGS_FILE_INT64_PROP "gint64\0" #define AGS_FILE_UINT64_PROP "guint64\0" #define AGS_FILE_FLOAT_PROP "gfloat\0" #define AGS_FILE_DOUBLE_PROP "gdouble\0" #define AGS_FILE_POINTER_PROP "gpointer\0" #define AGS_FILE_OBJECT_PROP "GObject\0" #define AGS_FILE_BOOLEAN_POINTER_PROP "gboolean-pointer\0" #define AGS_FILE_CHAR_POINTER_PROP "gchar-pointer\0" #define AGS_FILE_INT64_POINTER_PROP "gint64-pointer\0" #define AGS_FILE_UINT64_POINTER_PROP "guint64-pointer\0" #define AGS_FILE_FLOAT_POINTER_PROP "gfloat-pointer\0" #define AGS_FILE_DOUBLE_POINTER_PROP "gdouble-pointer\0" #define AGS_FILE_ID_PROP "id\0" #define AGS_FILE_NAME_PROP "name\0" #define AGS_FILE_TYPE_PROP "type\0" #define AGS_FILE_SCOPE_PROP "scope\0" #define AGS_FILE_VERSION_PROP "version\0" #define AGS_FILE_BUILD_ID_PROP "build-id\0" #define AGS_FILE_XPATH_PROP "xpath\0" #define AGS_FILE_FLAGS_PROP "flags\0" #define AGS_FILE_CONTEXT_PROP "context\0" #endif /*__AGS_FILE_STOCK_H__*/ gsequencer-1.4.24/ags/file/ags_xml_serialization_factory.h0000644000175000017500000000457113246707333020663 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_XML_SERIALIZATION_FACTORY_H__ #define __AGS_XML_SERIALIZATION_FACTORY_H__ #include #include #include #define AGS_TYPE_XML_SERIALIZATION_FACTORY (ags_xml_serialization_factory_get_type()) #define AGS_XML_SERIALIZATION_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_XML_SERIALIZATION_FACTORY, AgsXmlSerializationFactory)) #define AGS_XML_SERIALIZATION_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_XML_SERIALIZATION_FACTORY, AgsXmlSerializationFactoryClass)) #define AGS_IS_XML_SERIALIZATION_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_XML_SERIALIZATION_FACTORY)) #define AGS_IS_XML_SERIALIZATION_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_XML_SERIALIZATION_FACTORY)) #define AGS_XML_SERIALIZATION_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_XML_SERIALIZATION_FACTORY, AgsXmlSerializationFactoryClass)) typedef struct _AgsXmlSerializationFactory AgsXmlSerializationFactory; typedef struct _AgsXmlSerializationFactoryClass AgsXmlSerializationFactoryClass; struct _AgsXmlSerializationFactory { GObject object; }; struct _AgsXmlSerializationFactoryClass { GObjectClass object; }; GType ags_xml_serialization_factory_get_type(); gpointer ags_xml_serialization_factory_create(AgsXmlSerializationFactory *xml_serialization_factory, xmlNode *node); /* */ AgsXmlSerializationFactory* ags_xml_serialization_factory_get_instance(); AgsXmlSerializationFactory* ags_xml_serialization_factory_new(); #endif /*__AGS_XML_SERIALIZATION_FACTORY_H__*/ gsequencer-1.4.24/ags/file/ags_file.c0000644000175000017500000007505513256163135014313 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #include #include #include #include #include #include #include void ags_file_class_init(AgsFileClass *file); void ags_file_init(AgsFile *file); void ags_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_file_finalize(GObject *gobject); void ags_file_real_open(AgsFile *file, GError **error); void ags_file_real_open_from_data(AgsFile *file, gchar *data, guint length, GError **error); void ags_file_real_rw_open(AgsFile *file, gboolean create, GError **error); void ags_file_real_write(AgsFile *file); void ags_file_real_write_concurrent(AgsFile *file); void ags_file_real_write_resolve(AgsFile *file); void ags_file_real_read(AgsFile *file); void ags_file_real_read_resolve(AgsFile *file); void ags_file_real_read_start(AgsFile *file); /** * SECTION:ags_file * @short_description: read/write XML file * @title: AgsFile * @section_id: * @include: ags/file/ags_file.h * * The #AgsFile is an object to read or write files using XML. It * is the persisting layer of Advanced Gtk+ Sequencer. */ enum{ PROP_0, PROP_FILENAME, PROP_ENCODING, PROP_AUDIO_FORMAT, PROP_AUDIO_ENCODING, PROP_XML_DOC, PROP_APPLICATION_CONTEXT, }; enum{ OPEN, OPEN_FROM_DATA, RW_OPEN, WRITE, WRITE_CONCURRENT, WRITE_RESOLVE, READ, READ_RESOLVE, READ_START, LAST_SIGNAL, }; static gpointer ags_file_parent_class = NULL; static guint file_signals[LAST_SIGNAL] = { 0 }; GType ags_file_get_type (void) { static GType ags_type_file = 0; if(!ags_type_file){ static const GTypeInfo ags_file_info = { sizeof (AgsFileClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_file_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFile), 0, /* n_preallocs */ (GInstanceInitFunc) ags_file_init, }; ags_type_file = g_type_register_static(G_TYPE_OBJECT, "AgsFile", &ags_file_info, 0); } return (ags_type_file); } void ags_file_class_init(AgsFileClass *file) { GObjectClass *gobject; GParamSpec *param_spec; ags_file_parent_class = g_type_class_peek_parent(file); /* GObjectClass */ gobject = (GObjectClass *) file; gobject->get_property = ags_file_get_property; gobject->set_property = ags_file_set_property; gobject->finalize = ags_file_finalize; /* properties */ /** * AgsFile:filename: * * The assigned filename to open and read from. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("filename to read or write"), i18n_pspec("The filename to read or write to"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsFile:encoding: * * The charset encoding to use. * * Since: 1.0.0 */ param_spec = g_param_spec_string("encoding", i18n_pspec("encoding to use"), i18n_pspec("The encoding of the XML document"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ENCODING, param_spec); /** * AgsFile:audio-format: * * The format of embedded audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_string("audio-format", i18n_pspec("audio format to use"), i18n_pspec("The audio format used by embedded audio"), AGS_FILE_DEFAULT_AUDIO_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_FORMAT, param_spec); /** * AgsFile:audio-encoding: * * The encoding to use for embedding audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_string("audio-encoding", i18n_pspec("audio encoding to use"), i18n_pspec("The audio encoding used by embedded audio"), AGS_FILE_DEFAULT_AUDIO_ENCODING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_ENCODING, param_spec); /** * AgsFile:xml-doc: * * The assigned xml-doc. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("xml-doc", i18n_pspec("xml document of file"), i18n_pspec("The xml document assigned with file"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_XML_DOC, param_spec); /** * AgsFile:application-context: * * The application context assigned with. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context of file"), i18n_pspec("The application context to write to file"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* AgsFileClass */ file->open = ags_file_real_open; file->rw_open = ags_file_real_rw_open; file->open_from_data = ags_file_real_open_from_data; file->write = ags_file_real_write; file->write_concurrent = ags_file_real_write_concurrent; file->write_resolve = ags_file_real_write_resolve; file->read = ags_file_real_read; file->read_resolve = ags_file_real_read_resolve; file->read_start = ags_file_real_read_start; /* signals */ /** * AgsFile::open: * @file: the #AgsFile * @error: a #GError-struct pointer to return error * * Open @file with appropriate filename. * * Since: 1.0.0 */ file_signals[OPEN] = g_signal_new("open", G_TYPE_FROM_CLASS(file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileClass, open), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsFile::open-from-data: * @file: the #AgsFile * @buffer: the buffer containing the file * @length: the buffer length * @error: a #GError-struct pointer to return error * * Open @file from a buffer containing the file. * * Since: 1.0.0 */ file_signals[OPEN_FROM_DATA] = g_signal_new("open-from-data", G_TYPE_FROM_CLASS(file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileClass, open_from_data), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_UINT_POINTER, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_POINTER); /** * AgsFile::open-from-data: * @file: the #AgsFile * @create: if %TRUE the file will be created if not exists * @error: a #GError-struct pointer to return error * * Open @file in read-write mode. * * Since: 1.0.0 */ file_signals[RW_OPEN] = g_signal_new("rw-open", G_TYPE_FROM_CLASS(file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileClass, rw_open), NULL, NULL, g_cclosure_user_marshal_VOID__BOOLEAN_POINTER, G_TYPE_NONE, 2, G_TYPE_BOOLEAN, G_TYPE_POINTER); /** * AgsFile::write: * @file: the #AgsFile * * Write XML Document to disk. * * Since: 1.0.0 */ file_signals[WRITE] = g_signal_new("write", G_TYPE_FROM_CLASS(file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileClass, write), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); file_signals[WRITE_CONCURRENT] = g_signal_new("write_concurrent", G_TYPE_FROM_CLASS(file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileClass, write_concurrent), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsFile::write-resolve: * @file: the #AgsFile * * Resolve references and generate thus XPath expressions just * before writing to disk. * * Since: 1.0.0 */ file_signals[WRITE_RESOLVE] = g_signal_new("write_resolve", G_TYPE_FROM_CLASS(file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileClass, write_resolve), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsFile::read: * @file: the #AgsFile * * Read a XML document from disk with specified filename. * * Since: 1.0.0 */ file_signals[READ] = g_signal_new("read", G_TYPE_FROM_CLASS(file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileClass, read), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsFile::read-resolve: * @file: the #AgsFile * * Resolve XPath expressions to their counterpart the newly created * instances refering to. * * Since: 1.0.0 */ file_signals[READ_RESOLVE] = g_signal_new("read_resolve", G_TYPE_FROM_CLASS(file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileClass, read_resolve), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsFile::read-start: * @file: the #AgsFile * * Hook after reading XML document to update or start the application. * * Since: 1.0.0 */ file_signals[READ_START] = g_signal_new("read_start", G_TYPE_FROM_CLASS(file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileClass, read_start), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } GQuark ags_file_error_quark() { return(g_quark_from_static_string("ags-file-error-quark")); } void ags_file_init(AgsFile *file) { file->flags = 0; file->out = NULL; file->buffer = NULL; file->filename = NULL; file->encoding = AGS_FILE_DEFAULT_ENCODING; file->dtd = AGS_FILE_DEFAULT_DTD; file->audio_format = AGS_FILE_DEFAULT_AUDIO_FORMAT; file->audio_encoding = AGS_FILE_DEFAULT_AUDIO_ENCODING; file->doc = NULL; file->id_refs = NULL; file->lookup = NULL; file->launch = NULL; file->application_context = NULL; file->clipboard = NULL; file->property = NULL; file->script = NULL; file->cluster = NULL; file->client = NULL; file->server = NULL; file->history = NULL; file->embedded_audio = NULL; file->file_link = NULL; } void ags_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsFile *file; file = AGS_FILE(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(file->filename == filename){ return; } if(file->filename != NULL){ g_free(file->filename); } file->filename = g_strdup(filename); } break; case PROP_ENCODING: { gchar *encoding; encoding = g_value_get_string(value); file->encoding = encoding; } break; case PROP_AUDIO_FORMAT: { gchar *audio_format; audio_format = g_value_get_string(value); file->audio_format = audio_format; } break; case PROP_AUDIO_ENCODING: { gchar *audio_encoding; audio_encoding = g_value_get_string(value); file->audio_encoding = audio_encoding; } break; case PROP_XML_DOC: { xmlDoc *doc; doc = (xmlDoc *) g_value_get_pointer(value); file->doc = doc; } break; case PROP_APPLICATION_CONTEXT: { GObject *application_context; application_context = g_value_get_object(value); if(file->application_context == application_context){ return; } if(file->application_context != NULL){ g_object_unref(file->application_context); } if(application_context != NULL){ g_object_ref(application_context); } file->application_context = application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsFile *file; file = AGS_FILE(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, file->filename); } break; case PROP_ENCODING: { g_value_set_string(value, file->encoding); } break; case PROP_AUDIO_FORMAT: { g_value_set_string(value, file->audio_format); } break; case PROP_AUDIO_ENCODING: { g_value_set_string(value, file->audio_encoding); } break; case PROP_XML_DOC: { g_value_set_pointer(value, file->doc); } break; case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, file->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_finalize(GObject *gobject) { AgsFile *file; void ags_file_destroy_node(xmlNodePtr node){ xmlNodePtr child; child = node->children; while(child != NULL){ ags_file_destroy_node(child); child = child->next; } } file = (AgsFile *) gobject; if((AGS_FILE_READ & (file->flags)) != 0){ }else if((AGS_FILE_WRITE & (file->flags)) != 0){ }else{ return; } xmlFreeDoc(file->doc); // xmlCleanupParser(); // xmlMemoryDump(); G_OBJECT_CLASS(ags_file_parent_class)->finalize(gobject); } /** * ags_file_str2md5: * @content: the string buffer * @content_length: the length of the string * * Compute MD5 sums of a buffer. * * Returns: the md5 checksum * * Since: 1.0.0 */ gchar* ags_file_str2md5(gchar *content, guint content_length) { GChecksum *checksum; gchar *str; str = g_compute_checksum_for_string(G_CHECKSUM_MD5, content, content_length); return(str); } /** * ags_file_add_id_ref: * @file: the @AgsFile * @id_ref: a reference * * Adds @id_ref to @file. * * Since: 1.0.0 */ void ags_file_add_id_ref(AgsFile *file, GObject *id_ref) { if(id_ref == NULL) return; g_object_ref(id_ref); file->id_refs = g_list_prepend(file->id_refs, id_ref); } /** * ags_file_add_id_ref_by_node: * @file: the @AgsFile * @node: a XML node * * Find a reference by its XML node. * * Returns: the matching #GObject * * Since: 1.0.0 */ GObject* ags_file_find_id_ref_by_node(AgsFile *file, xmlNode *node) { AgsFileIdRef *file_id_ref; GList *list; list = file->id_refs; while(list != NULL){ file_id_ref = AGS_FILE_ID_REF(list->data); if(file_id_ref->node == node){ return((GObject *) file_id_ref); } list = list->next; } return(NULL); } /** * ags_file_find_id_ref_by_xpath: * @file: the #AgsFile * @xpath: a XPath expression * * Lookup a reference by @xpath. * * Returns: the matching #GObject * * Since: 1.0.0 */ GObject* ags_file_find_id_ref_by_xpath(AgsFile *file, gchar *xpath) { AgsFileIdRef *file_id_ref; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; guint i; if(file == NULL || xpath == NULL || !g_str_has_prefix(xpath, "xpath=")){ g_message("invalid xpath: %s", xpath); return(NULL); } xpath = &(xpath[6]); /* Create xpath evaluation context */ xpath_context = xmlXPathNewContext(file->doc); if(xpath_context == NULL) { g_warning("Error: unable to create new XPath context"); return(NULL); } /* Evaluate xpath expression */ xpath_object = xmlXPathEval(xpath, xpath_context); if(xpath_object == NULL) { g_warning("Error: unable to evaluate xpath expression \"%s\"", xpath); xmlXPathFreeContext(xpath_context); return(NULL); } node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ return(ags_file_find_id_ref_by_node(file, node[i])); } } g_message("no xpath match: %s", xpath); return(NULL); } /** * ags_file_find_id_ref_by_reference: * @file: the #AgsFile * @ref: a %gpointer * * Find a reference matching @ref. * * Returns: the matching #GObject * * Since: 1.0.0 */ GObject* ags_file_find_id_ref_by_reference(AgsFile *file, gpointer ref) { AgsFileIdRef *file_id_ref; GList *list; list = file->id_refs; while(list != NULL){ file_id_ref = AGS_FILE_ID_REF(list->data); if(file_id_ref->ref == ref){ return((GObject *) file_id_ref); } list = list->next; } return(NULL); } /** * ags_file_add_lookup: * @file: the #AgsFile * @file_lookup: a #AgsFileLookup * * Add @file_lookup for later invoking. * * Since: 1.0.0 */ void ags_file_add_lookup(AgsFile *file, GObject *file_lookup) { if(file == NULL || file_lookup == NULL){ return; } g_object_ref(G_OBJECT(file_lookup)); file->lookup = g_list_prepend(file->lookup, file_lookup); } /** * ags_file_add_launch: * @file: the #AgsFile * @file_launch: a #AgsFileLaunch * * Add @file_launch for later invoking. * * Since: 1.0.0 */ void ags_file_add_launch(AgsFile *file, GObject *file_launch) { if(file == NULL || file_launch == NULL){ return; } g_object_ref(G_OBJECT(file_launch)); file->launch = g_list_prepend(file->launch, file_launch); } void ags_file_real_open(AgsFile *file, GError **error) { if(file == NULL){ return; } /* parse the file and get the DOM */ file->doc = xmlReadFile(file->filename, NULL, 0); if(file->doc == NULL){ g_warning("ags_file.c - failed to read XML document %s", file->filename); if(error != NULL){ g_set_error(error, AGS_FILE_ERROR, AGS_FILE_ERROR_PARSER_FAILURE, "unable to parse document: %s\n", file->filename); } }else{ /*Get the root element node */ file->root_node = xmlDocGetRootElement(file->doc); } } /** * ags_file_open: * @file: the #AgsFile * @error: the return location for errors * * Opens the file specified by :filename property. * * Since: 1.0.0 */ void ags_file_open(AgsFile *file, GError **error) { g_return_if_fail(AGS_IS_FILE(file)); g_object_ref(G_OBJECT(file)); g_signal_emit(G_OBJECT(file), file_signals[OPEN], 0, error); g_object_unref(G_OBJECT(file)); } void ags_file_real_open_from_data(AgsFile *file, gchar *data, guint length, GError **error) { if(file == NULL){ return; } file->doc = xmlReadMemory(data, length, file->filename, NULL, 0); if(file->doc == NULL){ g_warning("ags_file.c - failed to read XML document %s", file->filename); if(error != NULL){ g_set_error(error, AGS_FILE_ERROR, AGS_FILE_ERROR_PARSER_FAILURE, "unable to parse document from data: %s\n", file->filename); } }else{ /*Get the root element node */ file->root_node = xmlDocGetRootElement(file->doc); } } /** * ags_file_open_from_data: * @file: the #AgsFile * @data: a buffer containing the XML document * @length: the buffer length * @error: the return location for errors * * Opens the file provided by @data. * * Since: 1.0.0 */ void ags_file_open_from_data(AgsFile *file, gchar *data, guint length, GError **error) { g_return_if_fail(AGS_IS_FILE(file)); g_object_ref(G_OBJECT(file)); g_signal_emit(G_OBJECT(file), file_signals[OPEN_FROM_DATA], 0, data, length, error); g_object_unref(G_OBJECT(file)); } void ags_file_real_rw_open(AgsFile *file, gboolean create, GError **error) { if(file == NULL){ return; } file->out = fopen(file->filename, "w+"); file->doc = xmlNewDoc("1.0"); file->root_node = xmlNewNode(NULL, "ags"); xmlDocSetRootElement(file->doc, file->root_node); } /** * ags_file_rw_open: * @file: the #AgsFile * @create: if %TRUE create the file as needed * @error: the return location for errors * * Opens the file specified by :filename property in read-write mode. * * Since: 1.0.0 */ void ags_file_rw_open(AgsFile *file, gboolean create, GError **error) { g_return_if_fail(AGS_IS_FILE(file)); g_object_ref(G_OBJECT(file)); g_signal_emit(G_OBJECT(file), file_signals[RW_OPEN], 0, create, error); g_object_unref(G_OBJECT(file)); } /** * ags_file_open_filename: * @file: the #AgsFile * @filename: a path * * Opens the file specified by @filename property. * * Since: 1.0.0 */ void ags_file_open_filename(AgsFile *file, gchar *filename) { GError *error; if(file == NULL){ return; } if(file->filename != NULL){ ags_file_close(file); } error = NULL; g_object_set(file, "filename", filename, NULL); ags_file_open(file, &error); } /** * ags_file_close: * @file: the #AgsFile * * Closes @file. */ void ags_file_close(AgsFile *file) { if(file == NULL){ return; } if(file->out != NULL){ fclose(file->out); } /*free the document */ xmlFreeDoc(file->doc); /* *Free the global variables that may *have been allocated by the parser. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); file->filename = NULL; } void ags_file_real_write(AgsFile *file) { AgsApplicationContext *application_context; GList *list; int size; // ags_file_rw_open(file, // TRUE); /* write clip board */ //TODO:JK: implement me /* write scripts */ //TODO:JK: implement me /* write cluster */ //TODO:JK: implement me /* write client */ //TODO:JK: implement me /* write server */ //TODO:JK: implement me /* write application context */ ags_file_write_application_context(file, file->root_node, file->application_context); /* write embedded audio */ //TODO:JK: implement me /* write file link */ //TODO:JK: implement me /* write history */ //TODO:JK: implement me /* resolve */ ags_file_write_resolve(file); /* * Dumping document to file */ // xmlSaveFormatFileEnc(file->filename, file->doc, "UTF-8", 1); xmlDocDumpFormatMemoryEnc(file->doc, &(file->buffer), &size, file->encoding, TRUE); fwrite(file->buffer, size, sizeof(xmlChar), file->out); fflush(file->out); } /** * ags_file_write: * @file: the #AgsFile * * Write the XML document to disk. * * Since: 1.0.0 */ void ags_file_write(AgsFile *file) { g_return_if_fail(AGS_IS_FILE(file)); g_object_ref(G_OBJECT(file)); g_signal_emit(G_OBJECT(file), file_signals[WRITE], 0); g_object_unref(G_OBJECT(file)); } void ags_file_real_write_concurrent(AgsFile *file) { AgsApplicationContext *application_context; AgsThread *main_loop, *gui_thread, *task_thread; xmlNode *root_node; FILE *file_out; GList *list; xmlChar *buffer; int size; xmlNode *parent, *node, *child; gchar *id; main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(file->application_context)->main_loop; //gui_thread = AGS_AUDIO_LOOP(main_loop)->gui_thread; //task_thread = AGS_AUDIO_LOOP(main_loop)->task_thread; application_context = (AgsApplicationContext *) file->application_context; file->doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags"); xmlDocSetRootElement(file->doc, root_node); parent = root_node; /* write clip board */ //TODO:JK: implement me /* write scripts */ //TODO:JK: implement me /* write cluster */ //TODO:JK: implement me /* write client */ //TODO:JK: implement me /* write server */ //TODO:JK: implement me /* the main code - write main */ //TODO:JK: implement me /* write embedded audio */ //TODO:JK: implement me /* write file link */ //TODO:JK: implement me /* write history */ //TODO:JK: implement me /* resolve */ ags_file_write_resolve(file); /* * Dumping document to file */ // xmlSaveFormatFileEnc(file->filename, file->doc, "UTF-8", 1); xmlDocDumpFormatMemoryEnc(file->doc, &buffer, &size, file->encoding, TRUE); file_out = fopen(file->filename, "w+"); fwrite(buffer, size, sizeof(xmlChar), file_out); fflush(file_out); fclose(file_out); /*free the document */ xmlFreeDoc(file->doc); /* *Free the global variables that may *have been allocated by the parser. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); } void ags_file_write_concurrent(AgsFile *file) { g_return_if_fail(AGS_IS_FILE(file)); g_object_ref(G_OBJECT(file)); g_signal_emit(G_OBJECT(file), file_signals[WRITE_CONCURRENT], 0); g_object_unref(G_OBJECT(file)); } void ags_file_real_write_resolve(AgsFile *file) { GList *list; file->lookup = g_list_prepend(file->lookup, NULL); list = file->lookup; while(list != NULL){ ags_file_lookup_resolve(AGS_FILE_LOOKUP(list->data)); list = list->next; } } /** * ags_file_write_resolve: * @file: the #AgsFile * * Resolve references to XPath expressions. * * Since: 1.0.0 */ void ags_file_write_resolve(AgsFile *file) { g_return_if_fail(AGS_IS_FILE(file)); g_object_ref(G_OBJECT(file)); g_signal_emit(G_OBJECT(file), file_signals[WRITE_RESOLVE], 0); g_object_unref(G_OBJECT(file)); } void ags_file_real_read(AgsFile *file) { AgsApplicationContext *application_context; xmlNode *root_node, *child; pid_t pid_num; root_node = file->root_node; /* child elements */ child = root_node->children; application_context = (AgsApplicationContext *) file->application_context; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-main", child->name, 9)){ ags_file_read_application_context(file, child, (GObject **) &application_context); }else if(!xmlStrncmp("ags-embedded-audio-list", child->name, 24)){ //TODO:JK: implement me }else if(!xmlStrncmp("ags-file-link-list", child->name, 19)){ //TODO:JK: implement me }else if(!xmlStrncmp("ags-history", child->name, 12)){ //TODO:JK: implement me } } child = child->next; } /* resolve */ ags_file_read_resolve(file); g_message("XML file resolved"); ags_connectable_connect(AGS_CONNECTABLE(application_context)); g_message("XML file connected"); /* start */ ags_file_read_start(file); } /** * ags_file_read: * @file: the #AgsFile * * Read XML document from disk. * * Since: 1.0.0 */ void ags_file_read(AgsFile *file) { g_return_if_fail(AGS_IS_FILE(file)); g_object_ref(G_OBJECT(file)); g_signal_emit(G_OBJECT(file), file_signals[READ], 0); g_object_unref(G_OBJECT(file)); } void ags_file_real_read_resolve(AgsFile *file) { GList *list; file->lookup = g_list_prepend(file->lookup, NULL); list = g_list_reverse(file->lookup); while(list != NULL){ ags_file_lookup_resolve(AGS_FILE_LOOKUP(list->data)); list = list->next; } } /** * ags_file_read: * @file: the #AgsFile * * Resolve XPath expressions to references. * * Since: 1.0.0 */ void ags_file_read_resolve(AgsFile *file) { g_return_if_fail(AGS_IS_FILE(file)); g_object_ref(G_OBJECT(file)); g_signal_emit(G_OBJECT(file), file_signals[READ_RESOLVE], 0); g_object_unref(G_OBJECT(file)); } void ags_file_real_read_start(AgsFile *file) { GList *list; list = g_list_reverse(file->launch); while(list != NULL){ ags_file_launch_start(AGS_FILE_LAUNCH(list->data)); list = list->next; } } /** * ags_file_read: * @file: the #AgsFile * * Update or start the application. * * Since: 1.0.0 */ void ags_file_read_start(AgsFile *file) { g_return_if_fail(AGS_IS_FILE(file)); g_object_ref(G_OBJECT(file)); g_signal_emit(G_OBJECT(file), file_signals[READ_START], 0); g_object_unref(G_OBJECT(file)); } void ags_file_read_config(AgsFile *file, xmlNode *node, GObject **config) { AgsConfig *gobject; gchar *id; char *buffer; gsize buffer_length; gobject = (AgsConfig *) *config; gobject->version = xmlGetProp(node, AGS_FILE_VERSION_PROP); gobject->build_id = xmlGetProp(node, AGS_FILE_BUILD_ID_PROP); buffer = xmlNodeGetContent(node); buffer_length = xmlStrlen(buffer); ags_config_load_from_data(gobject, buffer, buffer_length); } void ags_file_write_config(AgsFile *file, xmlNode *parent, GObject *config) { xmlNode *node; xmlNode *cdata; gchar *id; char *buffer; gsize buffer_length; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-config"); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", config, NULL)); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, AGS_FILE_VERSION_PROP, AGS_CONFIG(config)->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, AGS_CONFIG(config)->build_id); xmlAddChild(parent, node); /* cdata */ ags_config_to_data(AGS_CONFIG(config), &buffer, &buffer_length); cdata = xmlNewCDataBlock(file->doc, buffer, buffer_length); xmlAddChild(node, cdata); } void ags_file_read_application_context(AgsFile *file, xmlNode *node, GObject **application_context) { GList *list; gchar *context; context = xmlGetProp(node, "context"); AGS_APPLICATION_CONTEXT_GET_CLASS(file->application_context)->register_types(AGS_APPLICATION_CONTEXT(file->application_context)); AGS_APPLICATION_CONTEXT_GET_CLASS(file->application_context)->read(file, node, application_context); } void ags_file_write_application_context(AgsFile *file, xmlNode *parent, GObject *application_context) { AGS_APPLICATION_CONTEXT_GET_CLASS(file->application_context)->register_types(AGS_APPLICATION_CONTEXT(file->application_context)); AGS_APPLICATION_CONTEXT_GET_CLASS(application_context)->write(file, parent, application_context); } /** * ags_file_new: * * Creates an #AgsFile * * Returns: a new #AgsFile * * Since: 1.0.0 */ AgsFile* ags_file_new() { AgsFile *file; file = (AgsFile *) g_object_new(AGS_TYPE_FILE, NULL); return(file); } gsequencer-1.4.24/ags/file/ags_file_id_ref.h0000644000175000017500000000435213246707333015623 00000000000000/* 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 . */ #ifndef __AGS_FILE_ID_REF_H__ #define __AGS_FILE_ID_REF_H__ #include #include #include #define AGS_TYPE_FILE_ID_REF (ags_file_id_ref_get_type()) #define AGS_FILE_ID_REF(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FILE_ID_REF, AgsFileIdRef)) #define AGS_FILE_ID_REF_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_FILE_ID_REF, AgsFileIdRef)) #define AGS_IS_FILE_ID_REF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FILE_ID_REF)) #define AGS_IS_FILE_ID_REF_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FILE_ID_REF)) #define AGS_FILE_ID_REF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_FILE_ID_REF, AgsFileIdRefClass)) #define AGS_FILE_RESOLVE(f) ((AgsFileResolve)(f)) #define AGS_FILE_ID_REF_SERIALIZE_DATA "ags-file-id-ref-serizalize-data\0" #define AGS_FILE_ID_REF_RESOLVE_DATA "ags-file-id-ref-resolve-data\0" typedef struct _AgsFileIdRef AgsFileIdRef; typedef struct _AgsFileIdRefClass AgsFileIdRefClass; typedef void (*AgsFileResolve)(void); struct _AgsFileIdRef { GObject object; GObject *application_context; GObject *file; xmlNode *node; gchar *xpath; gpointer ref; }; struct _AgsFileIdRefClass { GObjectClass object; void (*resolved)(AgsFileIdRef *file_id_ref); }; GType ags_file_id_ref_get_type(); void ags_file_id_ref_resolved(AgsFileIdRef *file_id_ref); AgsFileIdRef* ags_file_id_ref_new(); #endif /*__AGS_FILE_ID_REF_H__*/ gsequencer-1.4.24/ags/file/ags_file.h0000644000175000017500000001222413246707333014310 00000000000000/* 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 . */ #ifndef __AGS_FILE_H__ #define __AGS_FILE_H__ #include #include #include #define AGS_TYPE_FILE (ags_file_get_type()) #define AGS_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FILE, AgsFile)) #define AGS_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FILE, AgsFileClass)) #define AGS_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FILE)) #define AGS_IS_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FILE)) #define AGS_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_FILE, AgsFileClass)) #define AGS_FILE_DEFAULT_ENCODING "UTF-8\0" #define AGS_FILE_DEFAULT_DTD "ags_file.dtd\0" #define AGS_FILE_CHECKSUM_LENGTH (32) #define AGS_FILE_DEFAULT_AUDIO_FORMAT "raw\0" #define AGS_FILE_DEFAULT_AUDIO_ENCODING "base64\0" typedef struct _AgsFile AgsFile; typedef struct _AgsFileClass AgsFileClass; /** * AgsFileFlags: * @AGS_FILE_READ: opened file for reading * @AGS_FILE_READ_AUDIO_SIGNAL: read audio signal * @AGS_FILE_READ_EMBEDDED_AUDIO: read embedded audio data * @AGS_FILE_WRITE: opened file for writing * @AGS_FILE_WRITE_AUDIO_SIGNAL: write audio signal * @AGS_FILE_WRITE_EMBEDDED_AUDIO: write embedded audio data * * Enum values to control the behavior or indicate internal state of #AgsFile by * enable/disable as flags. */ typedef enum{ AGS_FILE_READ = 1, AGS_FILE_READ_AUDIO_SIGNAL = 1 << 1, AGS_FILE_READ_EMBEDDED_AUDIO = 1 << 2, AGS_FILE_WRITE = 1 << 3, AGS_FILE_WRITE_AUDIO_SIGNAL = 1 << 4, AGS_FILE_WRITE_EMBEDDED_AUDIO = 1 << 5, }AgsFileFlags; #define AGS_FILE_ERROR (ags_file_error_quark()) /** * AgsFileError: * @AGS_FILE_ERROR_PARSER_FAILURE: the parser failed * * Enum values to indicated failures to used with #GError-struct. */ typedef enum{ AGS_FILE_ERROR_PARSER_FAILURE, }AgsFileError; struct _AgsFile { GObject object; guint flags; FILE *out; xmlChar *buffer; gchar *filename; gchar *encoding; gchar *dtd; gchar *audio_format; gchar *audio_encoding; xmlDoc *doc; xmlNode *root_node; GList *id_refs; GList *lookup; GList *launch; GObject *application_context; GObject *clipboard; GList *property; GList *script; GObject *cluster; GObject *client; GObject *server; GObject *history; GList *embedded_audio; GList *file_link; }; struct _AgsFileClass { GObjectClass object; void (*open)(AgsFile *file, GError **error); void (*open_from_data)(AgsFile *file, gchar *data, guint length, GError **error); void (*rw_open)(AgsFile *file, gboolean create, GError **error); void (*write)(AgsFile *file); void (*write_concurrent)(AgsFile *file); void (*write_resolve)(AgsFile *file); void (*read)(AgsFile *file); void (*read_resolve)(AgsFile *file); void (*read_start)(AgsFile *file); }; GType ags_file_get_type(void); gchar* ags_file_str2md5(gchar *content, guint content_length); void ags_file_add_id_ref(AgsFile *file, GObject *id_ref); GObject* ags_file_find_id_ref_by_node(AgsFile *file, xmlNode *node); GObject* ags_file_find_id_ref_by_xpath(AgsFile *file, gchar *xpath); GObject* ags_file_find_id_ref_by_reference(AgsFile *file, gpointer ref); void ags_file_add_lookup(AgsFile *file, GObject *file_lookup); void ags_file_add_launch(AgsFile *file, GObject *file_launch); /* */ void ags_file_open(AgsFile *file, GError **error); void ags_file_open_from_data(AgsFile *file, gchar *data, guint length, GError **error); void ags_file_rw_open(AgsFile *file, gboolean create, GError **error); void ags_file_open_filename(AgsFile *file, gchar *filename); void ags_file_close(AgsFile *file); /* */ void ags_file_write(AgsFile *file); void ags_file_write_concurrent(AgsFile *file); void ags_file_write_resolve(AgsFile *file); void ags_file_read(AgsFile *file); void ags_file_read_resolve(AgsFile *file); void ags_file_read_start(AgsFile *file); void ags_file_read_config(AgsFile *file, xmlNode *node, GObject **ags_config); void ags_file_write_config(AgsFile *file, xmlNode *parent, GObject *ags_config); /* */ void ags_file_read_application_context(AgsFile *file, xmlNode *node, GObject **application_context); void ags_file_write_application_context(AgsFile *file, xmlNode *parent, GObject *application_context); /* */ AgsFile* ags_file_new(); #endif /*__AGS_FILE_H__*/ gsequencer-1.4.24/ags/file/ags_xml_serialization_factory.c0000644000175000017500000000755213246707333020660 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_xml_serialization_factory_class_init(AgsXmlSerializationFactoryClass *xml_serialization_factory_class); void ags_xml_serialization_factory_connectable_interface_init(AgsConnectableInterface *connectable); void ags_xml_serialization_factory_init(AgsXmlSerializationFactory *xml_serialization_factory); /** * SECTION:ags_xml_serialization_factory * @short_description: Factory pattern * @title: AgsXmlSerializationFactory * @section_id: * @include: ags/file/ags_xml_serialization_factory.h * * #AgsXmlSerializationFactory allocates or instantiates specified #xmlNode-struct. */ static gpointer ags_xml_serialization_factory_parent_class = NULL; GType ags_xml_serialization_factory_get_type (void) { static GType ags_type_xml_serialization_factory = 0; if(!ags_type_xml_serialization_factory){ static const GTypeInfo ags_xml_serialization_factory_info = { sizeof (AgsXmlSerializationFactoryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_xml_serialization_factory_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsXmlSerializationFactory), 0, /* n_preallocs */ (GInstanceInitFunc) ags_xml_serialization_factory_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_xml_serialization_factory_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_xml_serialization_factory = g_type_register_static(G_TYPE_OBJECT, "AgsXmlSerializationFactory", &ags_xml_serialization_factory_info, 0); g_type_add_interface_static(ags_type_xml_serialization_factory, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_xml_serialization_factory); } void ags_xml_serialization_factory_class_init(AgsXmlSerializationFactoryClass *xml_serialization_factory) { ags_xml_serialization_factory_parent_class = g_type_class_peek_parent(xml_serialization_factory); } void ags_xml_serialization_factory_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = NULL; connectable->remove_from_registry = NULL; connectable->connect = NULL; connectable->disconnect = NULL; } void ags_xml_serialization_factory_init(AgsXmlSerializationFactory *xml_serialization_factory) { } gpointer ags_xml_serialization_factory_create(AgsXmlSerializationFactory *xml_serialization_factory, xmlNode *node) { gpointer ret_val; ret_val = NULL; //TODO:JK: implement me return(ret_val); } /** * ags_xml_serialization_factory_new: * * Creates a #AgsXmlSerializationFactory * * Returns: a new #AgsXmlSerializationFactory * * Since: 1.0.0 */ AgsXmlSerializationFactory* ags_xml_serialization_factory_new() { AgsXmlSerializationFactory *xml_serialization_factory; xml_serialization_factory = (AgsXmlSerializationFactory *) g_object_new(AGS_TYPE_XML_SERIALIZATION_FACTORY, NULL); return(xml_serialization_factory); } gsequencer-1.4.24/ags/file/ags_file_util.c0000644000175000017500000006105113246707333015342 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_file_util_read_value_resolve(AgsFileLookup *file_lookup, GValue *value); void ags_file_util_write_value_resolve(AgsFileLookup *file_lookup, GValue *value); void ags_file_util_read_value(AgsFile *file, xmlNode *node, gchar **id, GValue *value, xmlChar **xpath) { AgsFileLookup *file_lookup; xmlChar *type_str; xmlChar *value_str; xmlChar *content; if(id != NULL){ *id = xmlGetProp(node, AGS_FILE_ID_PROP); } type_str = xmlGetProp(node, "type"); content = xmlNodeGetContent(node); if(value == NULL){ value = (GValue *) g_new0(GValue, 1); memset(value, 0, sizeof(GValue)); } if(!xmlStrncmp(type_str, AGS_FILE_BOOLEAN_PROP, 7)){ if(!G_VALUE_HOLDS_BOOLEAN(value)){ g_value_init(value, G_TYPE_BOOLEAN); } g_value_set_boolean(value, ((!xmlStrncmp(content, AGS_FILE_TRUE, 5)) ? TRUE: FALSE)); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_CHAR_PROP, 5)){ if(!G_VALUE_HOLDS_CHAR(value)){ g_value_init(value, G_TYPE_CHAR); } g_value_set_schar(value, content[0]); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_INT64_PROP, 7)){ if(!G_VALUE_HOLDS_INT64(value)){ g_value_init(value, G_TYPE_INT64); } g_value_set_int64(value, g_ascii_strtoll(content, NULL, 10)); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_UINT64_PROP, 8)){ if(!G_VALUE_HOLDS_UINT64(value)){ g_value_init(value, G_TYPE_UINT64); } g_value_set_uint64(value, g_ascii_strtoull(content, NULL, 10)); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_FLOAT_PROP, 6)){ if(!G_VALUE_HOLDS_FLOAT(value)){ g_value_init(value, G_TYPE_FLOAT); } g_value_set_float(value, g_ascii_strtod(content, NULL)); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_DOUBLE_PROP, 7)){ if(!G_VALUE_HOLDS_DOUBLE(value)){ g_value_init(value, G_TYPE_DOUBLE); } g_value_set_double(value, g_ascii_strtod(content, NULL)); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_CHAR_POINTER_PROP, 13)){ if(!G_VALUE_HOLDS_STRING(value)){ g_value_init(value, G_TYPE_STRING); } g_value_set_static_string(value, content); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_BOOLEAN_POINTER_PROP, 14)){ gchar **str_arr, **str_iter; gboolean *arr; guint i; str_arr = g_strsplit(content, " ", -1); g_value_init(value, G_TYPE_POINTER); arr = NULL; str_iter = str_arr; i = 0; while(*str_iter != NULL){ if(arr == NULL){ arr = (gboolean *) malloc(sizeof(gboolean)); }else{ arr = (gboolean *) realloc(arr, (i + 1) * sizeof(gboolean)); } if(!xmlStrcmp(*str_iter, AGS_FILE_TRUE)){ arr[i] = TRUE; }else{ arr[i] = FALSE; } str_iter++; i++; } g_value_set_pointer(value, (gpointer) arr); g_free(str_arr); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_INT64_POINTER_PROP, 11)){ gchar **str_arr, **str_iter; gint64 *arr; guint i; str_arr = g_strsplit(content, " ", -1); g_value_init(value, G_TYPE_POINTER); arr = NULL; str_iter = str_arr; i = 0; while(*str_iter != NULL){ if(arr == NULL){ arr = (gint64 *) malloc(sizeof(gint64)); }else{ arr = (gint64 *) realloc(arr, (i + 1) * sizeof(gint64)); } arr[i] = g_ascii_strtoll(*str_iter, NULL, 10); str_iter++; i++; } g_value_set_pointer(value, (gpointer) arr); g_free(str_arr); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_UINT64_POINTER_PROP, 12)){ gchar **str_arr, **str_iter; guint64 *arr; guint i; str_arr = g_strsplit(content, " ", -1); g_value_init(value, G_TYPE_POINTER); arr = NULL; str_iter = str_arr; i = 0; while(*str_iter != NULL){ if(arr == NULL){ arr = (guint64 *) malloc(sizeof(guint64)); }else{ arr = (guint64 *) realloc(arr, (i + 1) * sizeof(guint64)); } arr[i] = g_ascii_strtoll(*str_iter, NULL, 10); str_iter++; i++; } g_value_set_pointer(value, (gpointer) arr); g_free(str_arr); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_FLOAT_POINTER_PROP, 14)){ gchar **str_arr, **str_iter; gfloat *arr; guint i; str_arr = g_strsplit(content, " ", -1); g_value_init(value, G_TYPE_POINTER); arr = NULL; str_iter = str_arr; i = 0; while(*str_iter != NULL){ if(arr == NULL){ arr = (gfloat *) malloc(sizeof(gfloat)); }else{ arr = (gfloat *) realloc(arr, (i + 1) * sizeof(gfloat)); } arr[i] = g_ascii_strtod(*str_iter, NULL); str_iter++; i++; } g_value_set_pointer(value, (gpointer) arr); g_free(str_arr); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_DOUBLE_POINTER_PROP, 15)){ gchar **str_arr, **str_iter; gdouble *arr; guint i; str_arr = g_strsplit(content, " ", -1); g_value_init(value, G_TYPE_POINTER); arr = NULL; str_iter = str_arr; i = 0; while(*str_iter != NULL){ if(arr == NULL){ arr = (gdouble *) malloc(sizeof(gdouble)); }else{ arr = (gdouble *) realloc(arr, (i + 1) * sizeof(gdouble)); } arr[i] = g_ascii_strtod(*str_iter, NULL); str_iter++; i++; } g_value_set_pointer(value, (gpointer) arr); g_free(str_arr); if(xpath != NULL){ *xpath = NULL; } }else if(!xmlStrncmp(type_str, AGS_FILE_POINTER_PROP, 9)){ g_value_init(value, G_TYPE_POINTER); /* gpointer */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", value, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_util_read_value_resolve), value); /* xpath */ if(xpath != NULL){ *xpath = xmlGetProp(node, "link"); } }else if(!xmlStrncmp(type_str, AGS_FILE_OBJECT_PROP, 8)){ g_value_init(value, G_TYPE_OBJECT); /* GObject */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", value, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_util_read_value_resolve), value); /* xpath */ if(xpath != NULL){ *xpath = xmlGetProp(node, "link"); } }else{ g_warning("ags_file_util_read_value: unsupported type: %s", type_str); return; } } void ags_file_util_read_value_resolve(AgsFileLookup *file_lookup, GValue *value) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "link"); if(xpath == NULL || value == NULL){ return; } id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref == NULL){ g_warning("can't resolve xpath: %s", xpath); return; } if(G_VALUE_HOLDS(value, G_TYPE_POINTER)){ g_value_set_pointer(value, (gpointer) id_ref->ref); }else if(G_VALUE_HOLDS(value, G_TYPE_OBJECT)){ g_value_set_object(value, (GObject *) id_ref->ref); }else if(G_VALUE_HOLDS(value, G_TYPE_STRING)){ g_value_set_string(value, (gchar *) id_ref->ref); }else{ g_warning("ags_file_util_read_value_resolve: unknown type of GValue %s", G_VALUE_TYPE_NAME(value)); } } xmlNode* ags_file_util_write_value(AgsFile *file, xmlNode *parent, gchar *id, GValue *value, GType pointer_type, guint array_length) { AgsFileLookup *file_lookup; xmlNode *node; xmlChar *type_str; xmlChar *content; if(value == NULL){ return(NULL); } node = xmlNewNode(NULL, "ags-value"); xmlNewProp(node, AGS_FILE_ID_PROP, id); content = NULL; switch(G_VALUE_TYPE(value)){ case G_TYPE_CHAR: { content = BAD_CAST g_strdup_printf("%c", g_value_get_schar(value)); type_str = AGS_FILE_CHAR_PROP; } break; case G_TYPE_BOOLEAN: { content = BAD_CAST g_strdup_printf("%s", ((g_value_get_boolean(value)) ? AGS_FILE_TRUE: AGS_FILE_FALSE)); type_str = AGS_FILE_BOOLEAN_PROP; } break; case G_TYPE_INT64: { content = BAD_CAST g_strdup_printf("%ld", g_value_get_int64(value)); type_str = AGS_FILE_INT64_PROP; } break; case G_TYPE_UINT64: { content = BAD_CAST g_strdup_printf("%ld", g_value_get_uint64(value)); type_str = AGS_FILE_UINT64_PROP; } break; case G_TYPE_FLOAT: { content = BAD_CAST g_strdup_printf("%f", g_value_get_float(value)); type_str = AGS_FILE_FLOAT_PROP; } break; case G_TYPE_DOUBLE: { content = BAD_CAST g_strdup_printf("%f", g_value_get_double(value)); type_str = AGS_FILE_DOUBLE_PROP; } break; case G_TYPE_STRING: { content = BAD_CAST g_strdup_printf("%s", g_value_get_string(value)); type_str = AGS_FILE_CHAR_POINTER_PROP; } break; case G_TYPE_POINTER: { gchar *str; guint i; if(pointer_type == G_TYPE_CHAR){ content = BAD_CAST g_strdup_printf("%s", g_value_get_string(value)); type_str = AGS_FILE_CHAR_POINTER_PROP; }else if(pointer_type == G_TYPE_INT64){ gint64 *arr; arr = (gint64 *) g_value_get_pointer(value); for(i = 0; i < array_length; i++){ if(i == 0){ content = g_strdup_printf("%ld", arr[i]); }else{ str = content; content = g_strdup_printf("%s %ld", str, arr[i]); g_free(str); } } type_str = AGS_FILE_INT64_POINTER_PROP; }else if(pointer_type == G_TYPE_UINT64){ guint64 *arr; arr = (guint64 *) g_value_get_pointer(value); for(i = 0; i < array_length; i++){ if(i == 0){ content = g_strdup_printf("%lu", arr[i]); }else{ str = content; content = g_strdup_printf("%s %lu", str, arr[i]); g_free(str); } } type_str = AGS_FILE_UINT64_POINTER_PROP; }else if(pointer_type == G_TYPE_FLOAT){ gfloat *arr; arr = (gfloat *) g_value_get_pointer(value); for(i = 0; i < array_length; i++){ if(i == 0){ content = g_strdup_printf("%f", arr[i]); }else{ str = content; content = g_strdup_printf("%s %f", str, arr[i]); g_free(str); } } type_str = AGS_FILE_DOUBLE_POINTER_PROP; }else if(pointer_type == G_TYPE_DOUBLE){ gdouble *arr; arr = (gdouble *) g_value_get_pointer(value); for(i = 0; i < array_length; i++){ if(i == 0){ content = g_strdup_printf("%f", arr[i]); }else{ str = content; content = g_strdup_printf("%s %f", str, arr[i]); g_free(str); } } type_str = AGS_FILE_DOUBLE_POINTER_PROP; }else{ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", value, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_util_write_value_resolve), value); type_str = AGS_FILE_POINTER_PROP; } } break; case G_TYPE_OBJECT: { file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", value, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_util_write_value_resolve), value); type_str = AGS_FILE_OBJECT_PROP; } break; default: g_warning("ags_file_util_write_value %s", G_VALUE_TYPE_NAME(value)); } xmlNewProp(node, AGS_FILE_TYPE_PROP, type_str); xmlNodeSetContent(node, content); xmlAddChild(parent, node); return(node); } void ags_file_util_write_value_resolve(AgsFileLookup *file_lookup, GValue *value) { AgsFileIdRef *id_ref; gchar *id; id_ref = NULL; if(G_VALUE_HOLDS(value, G_TYPE_OBJECT)){ id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, g_value_get_object(value)); }else if(G_VALUE_HOLDS(value, G_TYPE_POINTER)){ id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, g_value_get_pointer(value)); } if(id_ref == NULL){ return; } id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "link", g_strdup_printf("xpath=//*[@id='%s']", id)); // g_value_unset(value); // g_free(value); } void ags_file_util_read_parameter(AgsFile *file, xmlNode *node, gchar **id, GParameter **parameter, gint *n_params, xmlChar ***xpath) { xmlNode *child; GParameter *parameter_arr; gchar **name_arr, **name_iter; xmlChar **xpath_arr, **xpath_iter; guint i; name_arr = g_strsplit(xmlGetProp(node, AGS_FILE_NAME_PROP), " ", -1); parameter_arr = NULL; xpath_arr = NULL; /* */ name_iter = name_arr; child = node->children; i = 0; while(*name_iter != NULL && child != NULL){ if(child->type == XML_ELEMENT_NODE && !xmlStrncmp(child->name, "ags-value", 11)){ if(parameter_arr == NULL){ parameter_arr = (GParameter *) g_new(GParameter, 1); xpath_arr = (xmlChar **) malloc(sizeof(xmlChar *)); }else{ parameter_arr = (GParameter *) g_renew(GParameter, parameter_arr, i + 1); xpath_arr = (xmlChar **) realloc(xpath_arr, (i + 1) * sizeof(xmlChar *)); } name_iter++; i++; } child = child->next; } /* */ name_iter = name_arr; child = node->children; i = 0; while(*name_iter != NULL && child != NULL){ if(child->type == XML_ELEMENT_NODE && !xmlStrncmp(child->name, "ags-value", 11)){ xpath_iter = xpath_arr + i; parameter_arr[i].name = name_arr[i]; memset(&(parameter_arr[i].value), 0, sizeof(GValue)); ags_file_util_read_value(file, child, NULL, &(parameter_arr[i].value), (xmlChar **) &xpath_iter); name_iter++; i++; } child = child->next; } g_free(name_arr); if(id != NULL){ *id = (gchar *) xmlGetProp(node, AGS_FILE_ID_PROP); } if(parameter != NULL){ *parameter = parameter_arr; }else{ g_free(parameter); } if(n_params != NULL){ *n_params = i; } if(xpath != NULL){ *xpath = xpath_arr; }else{ free(xpath_arr); } } xmlNode* ags_file_util_write_parameter(AgsFile *file, xmlNode *parent, gchar *id, GParameter *parameter, gint n_params) { xmlNode *node; xmlChar *name, *old_name; gchar *child_id; guint i; if(parameter == NULL){ return(NULL); } node = xmlNewNode(NULL, "ags-parameter"); xmlNewProp(node, AGS_FILE_ID_PROP, id); name = NULL; for(i = 0; i < n_params; i++){ if(name == NULL){ name = g_strdup(parameter[i].name); }else{ old_name = name; name = (xmlChar *) g_strdup_printf("%s %s", name, parameter[i].name); free(old_name); } child_id = ags_id_generator_create_uuid(); ags_file_util_write_value(file, node, child_id, &(parameter[i].value), G_TYPE_NONE, 0); } xmlNewProp(node, AGS_FILE_NAME_PROP, name); xmlAddChild(parent, node); return(node); } void ags_file_util_read_dependency(AgsFile *file, xmlNode *node, gchar **id, gchar **name, xmlChar **xpath) { *id = xmlGetProp(node, AGS_FILE_ID_PROP); *name = xmlGetProp(node, AGS_FILE_NAME_PROP); *xpath = xmlGetProp(node, AGS_FILE_XPATH_PROP); } xmlNode* ags_file_util_write_dependency(AgsFile *file, xmlNode *parent, gchar *id, gchar *name, xmlChar *xpath) { xmlNode *node; node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, AGS_FILE_NAME_PROP, name); xmlNewProp(node, AGS_FILE_XPATH_PROP, xpath); xmlAddChild(parent, node); return(node); } void ags_file_util_read_object(AgsFile *file, xmlNode *node, GObject **ptr) { GObject *gobject; xmlNode *child; if(ptr == NULL){ return; }else{ gobject = *ptr; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "node", node, "xpath", g_strdup_printf("xpath=//[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-parameter", 14)){ GParameter *parameter; guint n_params; guint i; parameter = NULL; ags_file_util_read_parameter(file, child, NULL, ¶meter, &n_params, NULL); for(i = 0; i < n_params; i++){ g_object_set_property(gobject, parameter[i].name, &(parameter[i].value)); } }else if(!xmlStrncmp(child->name, "ags-widget", 11)){ //FIXME:JK: /* ags_file_read_widget(file, child, gobject); */ } } child = child->next; } } xmlNode* ags_file_util_write_object(AgsFile *file, xmlNode *parent, GObject *gobject) { xmlNode *node; GParamSpec **param_spec; GParameter *parameter; gchar *id; guint n_properties; guint i; if(gobject == NULL){ return(NULL); } id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-object"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "node", node, "xpath", g_strdup_printf("xpath=//[@id='%s']", id), "reference", gobject, NULL)); xmlAddChild(parent, node); /* child elements */ param_spec = g_object_class_list_properties(G_OBJECT_GET_CLASS(gobject), &n_properties); parameter = NULL; for(i = 0; i < n_properties; i++){ if(parameter == NULL){ parameter = (GParameter *) g_new(GParameter, 1); }else{ parameter = (GParameter *) g_renew(GParameter, parameter, (i + 1)); } memset(¶meter[i].value, 0, sizeof(GValue)); g_value_init(¶meter[i].value, param_spec[i]->value_type); parameter[i].name = param_spec[i]->name; g_object_get_property(G_OBJECT(gobject), param_spec[i]->name, &(parameter[i].value)); } n_properties = i; ags_file_util_write_parameter(file, node, ags_id_generator_create_uuid(), parameter, n_properties); //FIXME:JK: /* if(GTK_IS_WIDGET(gobject)){ ags_file_write_widget(file, node, GTK_WIDGET(gobject)); } */ return(node); } void ags_file_read_history(AgsFile *file, xmlNode *node, AgsHistory **history) { //TODO:JK: implement me } xmlNode* ags_file_write_history(AgsFile *file, xmlNode *parent, AgsHistory *history) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_file_link(AgsFile *file, xmlNode *node, AgsFileLink **file_link) { AgsFileLink *gobject; xmlNode *child; if(*file_link == NULL){ gobject = g_object_new(AGS_TYPE_FILE_LINK, NULL); *file_link = gobject; }else{ gobject = *file_link; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* iterate children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp(child->name, ags_plugin_get_xml_type(AGS_PLUGIN(gobject)))){ /* read current plugin file link */ ags_plugin_read(file, child, AGS_PLUGIN(gobject)); } } /* iterate */ child = child->next; } } xmlNode* ags_file_write_file_link(AgsFile *file, xmlNode *parent, AgsFileLink *file_link) { xmlNode *node; gchar *id; gchar *filename; if(file_link == NULL){ return(NULL); } /* allocate new node with uuid */ id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-file-link"); xmlNewProp(node, AGS_FILE_ID_PROP, id); /* add reference and node to file object */ ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", file_link, NULL)); /* write type with URL */ xmlNewProp(node, "type", g_strdup("url")); /* write filename */ if(file_link->filename != NULL){ #ifdef AGS_DEBUG g_message("XML outputting: %s", file_link->filename); #endif xmlNewProp(node, "filename", g_strdup(file_link->filename)); }else{ xmlNewProp(node, "filename", g_strdup("(null)")); } /* add to parent node */ xmlAddChild(parent, node); /* children */ ags_plugin_write(file, node, AGS_PLUGIN(file_link)); return(node); } void ags_file_read_file_link_list(AgsFile *file, xmlNode *node, GList **file_link) { AgsFileLink *current; xmlNode *child; GList *list; xmlChar *id; /* get uuid */ id = xmlGetProp(node, AGS_FILE_ID_PROP); /* iterate children */ child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-file-link", 11)){ /* read current file link */ current = NULL; ags_file_read_file_link(file, child, ¤t); list = g_list_prepend(list, current); } } /* iterate */ child = child->next; } /* reverse the created list */ list = g_list_reverse(list); /* return reference */ *file_link = list; /* add reference and node to file object */ ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_file_link_list(AgsFile *file, xmlNode *parent, GList *file_link) { AgsFileLink *current; xmlNode *node; GList *list; gchar *id; /* allocate new node with uuid */ id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-file-link-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = file_link; /* add reference and node to file object */ ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); /* add to parent node */ xmlAddChild(parent, node); /* iterate list and write file link */ while(list != NULL){ ags_file_write_file_link(file, node, AGS_FILE_LINK(list->data)); list = list->next; } /* return created node */ return(node); } gsequencer-1.4.24/ags/file/ags_file_id_ref.c0000644000175000017500000002160513246707333015616 00000000000000/* 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 . */ #include #include void ags_file_id_ref_class_init(AgsFileIdRefClass *file_id_ref); void ags_file_id_ref_init(AgsFileIdRef *file_id_ref); void ags_file_id_ref_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_file_id_ref_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_file_id_ref_finalize(GObject *gobject); /** * SECTION:ags_file_id_ref * @short_description: file id reference * @title: AgsFileIdRef * @section_id: * @include: ags/file/ags_file_id_ref.h * * The #AgsFileIdRef referes a XML node by its ID. It's used * to perform XPath lookup. */ enum{ RESOLVED, LAST_SIGNAL, }; enum{ PROP_0, PROP_NODE, PROP_XPATH, PROP_REFERENCE, PROP_FILE, PROP_APPLICATION_CONTEXT, }; static gpointer ags_file_id_ref_parent_class = NULL; static guint file_id_ref_signals[LAST_SIGNAL]; GType ags_file_id_ref_get_type() { static GType ags_type_file_id_ref = 0; if(!ags_type_file_id_ref){ static const GTypeInfo ags_file_id_ref_info = { sizeof (AgsFileIdRefClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_file_id_ref_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFileIdRef), 0, /* n_preallocs */ (GInstanceInitFunc) ags_file_id_ref_init, }; ags_type_file_id_ref = g_type_register_static(G_TYPE_OBJECT, "AgsFileIdRef", &ags_file_id_ref_info, 0); } return (ags_type_file_id_ref); } void ags_file_id_ref_class_init(AgsFileIdRefClass *file_id_ref) { GObjectClass *gobject; GParamSpec *param_spec; ags_file_id_ref_parent_class = g_type_class_peek_parent(file_id_ref); /* GObjectClass */ gobject = (GObjectClass *) file_id_ref; gobject->set_property = ags_file_id_ref_set_property; gobject->get_property = ags_file_id_ref_get_property; gobject->finalize = ags_file_id_ref_finalize; /* properties */ /** * AgsFileIdRef:node: * * The assigned xmlNode being refered by this #AgsFileIdRef. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("node", i18n_pspec("the node"), i18n_pspec("The node to find the element"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NODE, param_spec); /** * AgsFileIdRef:xpath: * * The XPath short-cut that can be used with this #AgsFileIdRef. * * Since: 1.0.0 */ param_spec = g_param_spec_string("xpath", i18n_pspec("the xpath"), i18n_pspec("The xpath to find the element"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_XPATH, param_spec); /** * AgsFileIdRef:reference: * * The object refered by this #AgsFileIdRef. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("reference", i18n_pspec("reference of the locator"), i18n_pspec("The reference resulted by the xpath locator"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_REFERENCE, param_spec); /** * AgsFileIdRef:file: * * The #AgsFile this #AgsFileIdRef belongs to. * * Since: 1.0.0 */ param_spec = g_param_spec_object("file", i18n_pspec("file assigned to"), i18n_pspec("The entire file assigned to"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILE, param_spec); /** * AgsFileIdRef:application-context: * * The #AgsApplicationContext to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context access"), i18n_pspec("The application-context object to access the tree"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* signals */ /** * AgsFileIdRef::resolved: * @file_id_ref: the #AgsFileIdRef * * Signal ::resolved to notify about resolved :reference. * * Since: 1.0.0 */ file_id_ref_signals[RESOLVED] = g_signal_new("resolved", G_TYPE_FROM_CLASS(file_id_ref), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileIdRefClass, resolved), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_file_id_ref_init(AgsFileIdRef *file_id_ref) { file_id_ref->application_context = NULL; file_id_ref->file = NULL; file_id_ref->node = NULL; file_id_ref->xpath = NULL; file_id_ref->ref = NULL; } void ags_file_id_ref_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsFileIdRef *file_id_ref; file_id_ref = AGS_FILE_ID_REF(gobject); switch(prop_id){ case PROP_NODE: { xmlNode *node; node = (xmlNode *) g_value_get_pointer(value); file_id_ref->node = node; } break; case PROP_XPATH: { char *xpath; xpath = (char *) g_value_get_string(value); if(file_id_ref->xpath != NULL) g_free(file_id_ref->xpath); file_id_ref->xpath = xpath; } break; case PROP_REFERENCE: { gpointer ref; ref = (gpointer) g_value_get_pointer(value); file_id_ref->ref = ref; } break; case PROP_FILE: { GObject *file; file = (GObject *) g_value_get_object(value); if(file_id_ref->file != NULL) g_object_unref(file_id_ref->file); if(file != NULL) g_object_ref(file); file_id_ref->file = file; } break; case PROP_APPLICATION_CONTEXT: { GObject *application_context; application_context = (GObject *) g_value_get_object(value); if(file_id_ref->application_context != NULL) g_object_unref(file_id_ref->application_context); if(application_context != NULL) g_object_ref(application_context); file_id_ref->application_context = application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_id_ref_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsFileIdRef *file_id_ref; file_id_ref = AGS_FILE_ID_REF(gobject); switch(prop_id){ case PROP_NODE: { g_value_set_pointer(value, file_id_ref->node); } break; case PROP_XPATH: { g_value_set_string(value, file_id_ref->xpath); } break; case PROP_REFERENCE: { g_value_set_pointer(value, file_id_ref->ref); } break; case PROP_FILE: { g_value_set_object(value, file_id_ref->file); } break; case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, file_id_ref->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_id_ref_finalize(GObject *gobject) { AgsFileIdRef *file_id_ref; file_id_ref = AGS_FILE_ID_REF(gobject); if(file_id_ref->xpath != NULL){ g_free(file_id_ref->xpath); } if(file_id_ref->ref != NULL){ g_object_unref(file_id_ref->ref); } if(file_id_ref->file != NULL){ g_object_unref(file_id_ref->file); } if(file_id_ref->application_context != NULL){ g_object_unref(file_id_ref->application_context); } G_OBJECT_CLASS(ags_file_id_ref_parent_class)->finalize(gobject); } /** * ags_file_id_ref_resolved: * @file_id_ref: the #AgsFileIdRef * * Notify about resolved reference. * * Since: 1.0.0 */ void ags_file_id_ref_resolved(AgsFileIdRef *file_id_ref) { g_return_if_fail(AGS_IS_FILE_ID_REF(file_id_ref)); g_object_ref((GObject *) file_id_ref); g_signal_emit(G_OBJECT(file_id_ref), file_id_ref_signals[RESOLVED], 0); g_object_unref((GObject *) file_id_ref); } /** * ags_file_id_ref_new: * * Creates an #AgsFileIdRef * * Returns: a new #AgsFileIdRef * * Since: 1.0.0 */ AgsFileIdRef* ags_file_id_ref_new() { AgsFileIdRef *file_id_ref; file_id_ref = (AgsFileIdRef *) g_object_new(AGS_TYPE_FILE_ID_REF, NULL); return(file_id_ref); } gsequencer-1.4.24/ags/file/ags_file.dtd0000644000175000017500000012030213246707333014631 00000000000000 buffer-size NMTOKEN 940 format PCDATA #REQUIRED bpm NMTOKEN 120.0 delay-factor NMTOKEN 0.25 note-offset NMTOKEN 0 > delay NMTOKEN #REQUIRED attack NMTOKEN #REQUIRED > > gsequencer-1.4.24/ags/file/ags_file_link.c0000644000175000017500000002174213246707333015325 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_file_link_class_init(AgsFileLinkClass *file_link); void ags_file_link_plugin_interface_init(AgsPluginInterface *plugin); void ags_file_link_init(AgsFileLink *file_link); void ags_file_link_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_file_link_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); gchar* ags_file_link_get_name(AgsPlugin *plugin); void ags_file_link_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_file_link_get_version(AgsPlugin *plugin); void ags_file_link_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_file_link_get_build_id(AgsPlugin *plugin); void ags_file_link_set_build_id(AgsPlugin *plugin, gchar *build_id); gchar* ags_file_link_get_xml_type(AgsPlugin *plugin); void ags_file_link_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_file_link_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_file_link_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_file_link_finalize(GObject *gobject); /** * SECTION:ags_file_link * @short_description: link objects read of file. * @title: AgsFileLink * @section_id: * @include: ags/file/ags_file_link.h * * The #AgsFileLink links read objects of file. */ enum{ PROP_0, PROP_FILENAME, PROP_DATA, }; static gpointer ags_file_link_parent_class = NULL; GType ags_file_link_get_type() { static GType ags_type_file_link = 0; if(!ags_type_file_link){ static const GTypeInfo ags_file_link_info = { sizeof (AgsFileLinkClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_file_link_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFileLink), 0, /* n_preallocs */ (GInstanceInitFunc) ags_file_link_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_file_link_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_file_link = g_type_register_static(G_TYPE_OBJECT, "AgsFileLink", &ags_file_link_info, 0); g_type_add_interface_static(ags_type_file_link, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_file_link); } void ags_file_link_class_init(AgsFileLinkClass *file_link) { GObjectClass *gobject; GParamSpec *param_spec; ags_file_link_parent_class = g_type_class_peek_parent(file_link); /* GObjectClass */ gobject = (GObjectClass *) file_link; gobject->set_property = ags_file_link_set_property; gobject->get_property = ags_file_link_get_property; gobject->finalize = ags_file_link_finalize; /* properties */ /** * AgsFileLink:filename: * * The filename this #AgsFileLink refers. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the filename"), i18n_pspec("The filename to locate the file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsFileLink:data: * * The data this #AgsFileLink contains. * * Since: 1.0.0 */ param_spec = g_param_spec_string("data", i18n_pspec("the data"), i18n_pspec("The embedded data"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DATA, param_spec); } void ags_file_link_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_file_link_get_name; plugin->set_name = ags_file_link_set_name; plugin->get_version = ags_file_link_get_version; plugin->set_version = ags_file_link_set_version; plugin->get_build_id = ags_file_link_get_build_id; plugin->set_build_id = ags_file_link_set_build_id; plugin->get_xml_type = ags_file_link_get_xml_type; plugin->set_xml_type = ags_file_link_set_xml_type; plugin->get_ports = NULL; plugin->read = ags_file_link_read; plugin->write = ags_file_link_write; plugin->set_ports = NULL; } void ags_file_link_init(AgsFileLink *file_link) { file_link->version = NULL; file_link->build_id = NULL; file_link->name = NULL; file_link->xml_type = NULL; file_link->filename = NULL; file_link->data = NULL; } void ags_file_link_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsFileLink *file_link; file_link = AGS_FILE_LINK(gobject); switch(prop_id){ case PROP_FILENAME: { char *filename; filename = (char *) g_value_get_string(value); if(filename == file_link->filename){ return; } if(file_link->filename != NULL){ free(file_link->filename); } file_link->filename = g_strdup(filename); } break; case PROP_DATA: { char *data; data = (char *) g_value_get_string(value); if(data == file_link->data){ return; } file_link->data = g_strdup(data); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_link_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsFileLink *file_link; file_link = AGS_FILE_LINK(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, file_link->filename); } break; case PROP_DATA: { g_value_set_string(value, file_link->data); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_file_link_finalize(GObject *gobject) { AgsFileLink *file_link; file_link = AGS_FILE_LINK(gobject); /* filename */ if(file_link->filename != NULL){ g_free(file_link->filename); } /* data */ if(file_link->data != NULL){ g_free(file_link->data); } } gchar* ags_file_link_get_name(AgsPlugin *plugin) { return(AGS_FILE_LINK(plugin)->name); } void ags_file_link_set_name(AgsPlugin *plugin, gchar *name) { AGS_FILE_LINK(plugin)->name = name; } gchar* ags_file_link_get_version(AgsPlugin *plugin) { return(AGS_FILE_LINK(plugin)->version); } void ags_file_link_set_version(AgsPlugin *plugin, gchar *version) { AGS_FILE_LINK(plugin)->version = version; } gchar* ags_file_link_get_build_id(AgsPlugin *plugin) { return(AGS_FILE_LINK(plugin)->build_id); } void ags_file_link_set_build_id(AgsPlugin *plugin, gchar *build_id) { AGS_FILE_LINK(plugin)->build_id = build_id; } gchar* ags_file_link_get_xml_type(AgsPlugin *plugin) { return(AGS_FILE_LINK(plugin)->xml_type); } void ags_file_link_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_FILE_LINK(plugin)->xml_type = xml_type; } void ags_file_link_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLink *file_link; file_link = AGS_FILE_LINK(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", file_link, NULL)); } xmlNode* ags_file_link_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLink *file_link; xmlNode *node; gchar *id; file_link = AGS_FILE_LINK(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, AGS_FILE_LINK(plugin)->xml_type); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", file_link, NULL)); xmlAddChild(parent, node); return(node); } /** * ags_file_link_new: * * Creates an #AgsFileLink * * Returns: a new #AgsFileLink * * Since: 1.0.0 */ AgsFileLink* ags_file_link_new() { AgsFileLink *file_link; file_link = (AgsFileLink *) g_object_new(AGS_TYPE_FILE_LINK, NULL); return(file_link); } gsequencer-1.4.24/ags/file/ags_file_link.h0000644000175000017500000000370413246707333015330 00000000000000/* 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 . */ #ifndef __AGS_FILE_LINK_H__ #define __AGS_FILE_LINK_H__ #include #include #define AGS_TYPE_FILE_LINK (ags_file_link_get_type()) #define AGS_FILE_LINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FILE_LINK, AgsFileLink)) #define AGS_FILE_LINK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_FILE_LINK, AgsFileLink)) #define AGS_IS_FILE_LINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FILE_LINK)) #define AGS_IS_FILE_LINK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FILE_LINK)) #define AGS_FILE_LINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_FILE_LINK, AgsFileLinkClass)) #define AGS_FILE_LINK_DEFAULT_VERSION "0.7.0\0" #define AGS_FILE_LINK_DEFAULT_BUILD_ID "CEST 13-10-2015 15:53\0" typedef struct _AgsFileLink AgsFileLink; typedef struct _AgsFileLinkClass AgsFileLinkClass; struct _AgsFileLink { GObject object; gchar *version; gchar *build_id; gchar *name; gchar *xml_type; gchar *filename; gchar *data; }; struct _AgsFileLinkClass { GObjectClass object; }; GType ags_file_link_get_type(); AgsFileLink* ags_file_link_new(); #endif /*__AGS_FILE_LINK_H__*/ gsequencer-1.4.24/ags/file/ags_file_lookup.h0000644000175000017500000000424113246707333015701 00000000000000/* 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 . */ #ifndef __AGS_FILE_LOOKUP_H__ #define __AGS_FILE_LOOKUP_H__ #include #include #include #include #define AGS_TYPE_FILE_LOOKUP (ags_file_lookup_get_type()) #define AGS_FILE_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FILE_LOOKUP, AgsFileLookup)) #define AGS_FILE_LOOKUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FILE_LOOKUP, AgsFileLookupClass)) #define AGS_IS_FILE_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FILE_LOOKUP)) #define AGS_IS_FILE_LOOKUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FILE_LOOKUP)) #define AGS_FILE_LOOKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_FILE_LOOKUP, AgsFileLookupClass)) typedef struct _AgsFileLookup AgsFileLookup; typedef struct _AgsFileLookupClass AgsFileLookupClass; struct _AgsFileLookup { GObject object; AgsFile *file; xmlNode *node; gpointer ref; }; struct _AgsFileLookupClass { GObjectClass object; void (*resolve)(AgsFileLookup *lookup); }; GType ags_file_lookup_get_type(void); GList* ags_file_lookup_find_by_node(GList *file_lookup, xmlNode *node); GList* ags_file_lookup_find_by_reference(GList *file_lookup, gpointer ref); void ags_file_lookup_resolve(AgsFileLookup *file_lookup); /* */ AgsFileLookup* ags_file_lookup_new(); #endif /*__AGS_FILE_LOOKUP_H__*/ gsequencer-1.4.24/ags/widget/0000755000175000017500000000000013256233675013015 500000000000000gsequencer-1.4.24/ags/widget/ags_container.c0000644000175000017500000000251613246707333015715 00000000000000/* 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 . */ #include /** * SECTION:ags_container * @short_description: Complete GtkContainer * @title: AgsContainer * @section_id: * @include: ags/widget/ags_container.h * * Functions completing #GtkContainer API. */ /** * ags_container_remove_all: * @container: the #GtkContainer * * Adds all #GtkWidget pointed by #GList to @container. * * Since: 1.0.0 */ void ags_container_add_all(GtkContainer *container, GList *list) { while(list != NULL){ gtk_container_add(container, GTK_WIDGET(list->data)); list = list->next; } } gsequencer-1.4.24/ags/widget/ags_vled_array.h0000644000175000017500000000350613246707333016070 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_VLED_ARRAY_H__ #define __AGS_VLED_ARRAY_H__ #include #include #include #include "ags_led_array.h" #define AGS_TYPE_VLED_ARRAY (ags_vled_array_get_type()) #define AGS_VLED_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_VLED_ARRAY, AgsVLedArray)) #define AGS_VLED_ARRAY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_VLED_ARRAY, AgsVLedArrayClass)) #define AGS_IS_VLED_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_VLED_ARRAY)) #define AGS_IS_VLED_ARRAY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_VLED_ARRAY)) #define AGS_VLED_ARRAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_VLED_ARRAY, AgsVLedArrayClass)) typedef struct _AgsVLedArray AgsVLedArray; typedef struct _AgsVLedArrayClass AgsVLedArrayClass; struct _AgsVLedArray { AgsLedArray led_array; }; struct _AgsVLedArrayClass { AgsLedArrayClass led_array; }; GType ags_vled_array_get_type(void); AgsVLedArray* ags_vled_array_new(); #endif /*__AGS_VLED_ARRAY_H__*/ gsequencer-1.4.24/ags/widget/ags_expander.h0000644000175000017500000000477413246707333015556 00000000000000/* 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 . */ #ifndef __AGS_EXPANDER_H__ #define __AGS_EXPANDER_H__ #include #include #include #define AGS_TYPE_EXPANDER (ags_expander_get_type()) #define AGS_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EXPANDER, AgsExpander)) #define AGS_EXPANDER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EXPANDER, AgsExpanderClass)) #define AGS_IS_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_EXPANDER)) #define AGS_IS_EXPANDER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_EXPANDER)) #define AGS_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_EXPANDER, AgsExpanderClass)) #define AGS_EXPANDER_CHILD(ptr) ((AgsExpanderChild *)(ptr)) typedef struct _AgsExpander AgsExpander; typedef struct _AgsExpanderClass AgsExpanderClass; typedef struct _AgsExpanderChild AgsExpanderChild; typedef enum{ AGS_EXPANDER_DRAW_BORDER = 1, }AgsExpanderFlags; struct _AgsExpander { GtkExpander expander; guint flags; GtkTable *table; GList *children; }; struct _AgsExpanderClass { GtkExpanderClass expander; }; struct _AgsExpanderChild { GtkWidget *child; guint x; guint y; guint width; guint height; }; GType ags_expander_get_type(void); AgsExpanderChild* ags_expander_child_alloc(guint x, guint y, guint width, guint height); AgsExpanderChild* ags_expander_child_find(AgsExpander *expander, GtkWidget *child); void ags_expander_add(AgsExpander *expander, GtkWidget *widget, guint x, guint y, guint width, guint height); void ags_expander_remove(AgsExpander *expander, GtkWidget *widget); AgsExpander* ags_expander_new(guint width, guint height); #endif /*__AGS_EXPANDER_H__*/ gsequencer-1.4.24/ags/widget/ags_hindicator.c0000644000175000017500000001227313246707333016060 00000000000000/* 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 . */ #include "ags_hindicator.h" void ags_hindicator_class_init(AgsHIndicatorClass *indicator); void ags_hindicator_init(AgsHIndicator *indicator); void ags_hindicator_show(GtkWidget *widget); gboolean ags_hindicator_expose(GtkWidget *widget, GdkEventExpose *event); gboolean ags_hindicator_configure(GtkWidget *widget, GdkEventConfigure *event); void ags_hindicator_draw(AgsHIndicator *indicator); /** * SECTION:ags_hindicator * @short_description: A horizontal indicator widget * @title: AgsHIndicator * @section_id: * @include: ags/widget/ags_hindicator.h * * #AgsHIndicator is a widget visualizing a #GtkAdjustment. */ static gpointer ags_hindicator_parent_class = NULL; GType ags_hindicator_get_type(void) { static GType ags_type_hindicator = 0; if(!ags_type_hindicator){ static const GTypeInfo ags_hindicator_info = { sizeof(AgsHIndicatorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_hindicator_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsHIndicator), 0, /* n_preallocs */ (GInstanceInitFunc) ags_hindicator_init, }; ags_type_hindicator = g_type_register_static(AGS_TYPE_INDICATOR, "AgsHIndicator\0", &ags_hindicator_info, 0); } return(ags_type_hindicator); } void ags_hindicator_class_init(AgsHIndicatorClass *indicator) { GtkWidgetClass *widget; ags_hindicator_parent_class = g_type_class_peek_parent(indicator); /* GtkWidgetClass */ widget = (GtkWidgetClass *) indicator; widget->expose_event = ags_hindicator_expose; widget->configure_event = ags_hindicator_configure; } void ags_hindicator_init(AgsHIndicator *indicator) { gtk_widget_set_size_request((GtkWidget *) indicator, 100, 16); } gboolean ags_hindicator_configure(GtkWidget *widget, GdkEventConfigure *event) { ags_hindicator_draw((AgsHIndicator *) widget); return(FALSE); } gboolean ags_hindicator_expose(GtkWidget *widget, GdkEventExpose *event) { ags_hindicator_draw((AgsHIndicator *) widget); return(FALSE); } void ags_hindicator_draw(AgsHIndicator *indicator) { GtkWidget *widget; GtkAdjustment *adjustment; GtkStyle *indicator_style; cairo_t *cr; gdouble value; guint width, height; guint segment_width, segment_height; guint padding; guint i; static const gdouble white_gc = 65535.0; widget = GTK_WIDGET(indicator); indicator_style = gtk_widget_get_style(widget); adjustment = AGS_INDICATOR(indicator)->adjustment; if(adjustment == NULL){ return; } // g_message("draw %f\0", adjustment->value); cr = gdk_cairo_create(widget->window); if(cr == NULL){ return; } width = 100; height = 16; segment_width = 7; segment_height = height; padding = 3; cairo_surface_flush(cairo_get_target(cr)); cairo_push_group(cr); for(i = 0; i < width / (segment_width + padding); i++){ if(adjustment->value > 0.0 && (1.0 / adjustment->value * i < (width / (segment_width + padding)))){ /* active */ cairo_set_source_rgb(cr, indicator_style->light[0].red / white_gc, indicator_style->light[0].green / white_gc, indicator_style->light[0].blue / white_gc); }else{ /* normal */ cairo_set_source_rgb(cr, indicator_style->dark[0].red / white_gc, indicator_style->dark[0].green / white_gc, indicator_style->dark[0].blue / white_gc); } cairo_rectangle(cr, width - i * (segment_width + padding) - segment_width, 0, segment_width, segment_height); cairo_fill(cr); /* outline */ cairo_set_source_rgb(cr, indicator_style->fg[0].red / white_gc, indicator_style->fg[0].green / white_gc, indicator_style->fg[0].blue / white_gc); cairo_rectangle(cr, width - i * (segment_width + padding) - segment_width, 0, segment_width, segment_height); cairo_stroke(cr); } cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } /** * ags_hindicator_new: * * Creates an #AgsHIndicator. * * Returns: a new #AgsHIndicator * * Since: 1.0.0 */ AgsHIndicator* ags_hindicator_new() { AgsHIndicator *indicator; GtkAdjustment *adjustment; adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); indicator = (AgsHIndicator *) g_object_new(AGS_TYPE_HINDICATOR, "adjustment\0", adjustment, NULL); return(indicator); } gsequencer-1.4.24/ags/widget/ags_scale.h0000644000175000017500000000572013247044247015026 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SCALE_H__ #define __AGS_SCALE_H__ #include #include #include #define AGS_TYPE_SCALE (ags_scale_get_type()) #define AGS_SCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SCALE, AgsScale)) #define AGS_SCALE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SCALE, AgsScaleClass)) #define AGS_IS_SCALE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SCALE)) #define AGS_IS_SCALE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SCALE)) #define AGS_SCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SCALE, AgsScaleClass)) #define AGS_SCALE_DEFAULT_WIDTH (60) #define AGS_SCALE_DEFAULT_HEIGHT (128) #define AGS_SCALE_DEFAULT_LOWER (0.0) #define AGS_SCALE_DEFAULT_UPPER (1.0) #define AGS_SCALE_DEFAULT_VALUE (0.0) #define AGS_SCALE_DEFAULT_STEP_COUNT (16.0) #define AGS_SCALE_DEFAULT_PAGE_SIZE (8.0) typedef struct _AgsScale AgsScale; typedef struct _AgsScaleClass AgsScaleClass; typedef enum{ AGS_SCALE_LOGARITHMIC = 1, }AgsScaleFlags; typedef enum{ AGS_SCALE_BUTTON_1_PRESSED = 1, }AgsScaleButtonState; typedef enum{ AGS_SCALE_KEY_L_CONTROL = 1, AGS_SCALE_KEY_R_CONTROL = 1 << 1, AGS_SCALE_KEY_L_SHIFT = 1 << 2, AGS_SCALE_KEY_R_SHIFT = 1 << 3, }AgsScaleKeyMask; typedef enum{ AGS_SCALE_LAYOUT_VERTICAL, AGS_SCALE_LAYOUT_HORIZONTAL, }AgsScaleLayout; typedef enum{ AGS_SCALE_STEP_UP, AGS_SCALE_STEP_DOWN, AGS_SCALE_PAGE_UP, AGS_SCALE_PAGE_DOWN, }AgsScaleAction; struct _AgsScale { GtkWidget widget; guint flags; guint key_mask; guint button_state; guint layout; guint font_size; guint scale_width; guint scale_height; gchar *control_name; gdouble lower; gdouble upper; gdouble default_value; guint step_count; gdouble page_size; gint scale_step_count; gchar **scale_point; gdouble *scale_value; }; struct _AgsScaleClass { GtkWidgetClass widget; void (*value_changed)(AgsScale *scale, gdouble default_value); }; GType ags_scale_get_type(void); void ags_scale_value_changed(AgsScale *scale, gdouble default_value); AgsScale* ags_scale_new(); #endif /*__AGS_SCALE_H__*/ gsequencer-1.4.24/ags/widget/ags_cartesian.c0000644000175000017500000013314413247044247015705 00000000000000/* 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 . */ #include #include #include void ags_cartesian_class_init(AgsCartesianClass *cartesian); void ags_cartesian_init(AgsCartesian *cartesian); void ags_cartesian_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_cartesian_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_cartesian_finalize(GObject *gobject); void ags_cartesian_show(GtkWidget *widget); void ags_cartesian_map(GtkWidget *widget); void ags_cartesian_realize(GtkWidget *widget); void ags_cartesian_size_request(GtkWidget *widget, GtkRequisition *requisition); void ags_cartesian_size_allocate(GtkWidget *widget, GtkAllocation *allocation); gboolean ags_cartesian_expose(GtkWidget *widget, GdkEventExpose *event); void ags_cartesian_draw(AgsCartesian *cartesian); enum{ PROP_0, PROP_X_MARGIN, PROP_Y_MARGIN, PROP_CENTER, PROP_LINE_WIDTH, PROP_POINT_RADIUS, PROP_FONT_SIZE, PROP_X_STEP_WIDTH, PROP_Y_STEP_HEIGHT, PROP_X_SCALE_STEP_WIDTH, PROP_Y_SCALE_STEP_HEIGHT, PROP_X_UNIT_X0, PROP_X_UNIT_Y0, PROP_X_UNIT_SIZE, PROP_Y_UNIT_X0, PROP_Y_UNIT_Y0, PROP_Y_UNIT_SIZE, PROP_X_LABEL_START, PROP_X_LABEL_STEP_WIDTH, PROP_Y_LABEL_START, PROP_Y_LABEL_STEP_HEIGHT, PROP_X_STEP, PROP_Y_STEP, PROP_X_START, PROP_X_END, PROP_Y_START, PROP_Y_END, PROP_X_UNIT, PROP_Y_UNIT, PROP_X_LABEL, PROP_Y_LABEL, PROP_X_STEP_DATA, PROP_X_STEP_FACTOR, PROP_Y_STEP_DATA, PROP_Y_STEP_FACTOR, PROP_TRANSLATE_DATA, PROP_X_TRANSLATE_POINT, PROP_Y_TRANSLATE_POINT, PROP_X_SCALE_DATA, PROP_X_SMALL_SCALE_FACTOR, PROP_X_BIG_SCALE_FACTOR, PROP_Y_SCALE_DATA, PROP_Y_SMALL_SCALE_FACTOR, PROP_Y_BIG_SCALE_FACTOR, PROP_X_LABEL_DATA, PROP_X_LABEL_FACTOR, PROP_X_LABEL_PRECISISON, PROP_Y_LABEL_DATA, PROP_Y_LABEL_FACTOR, PROP_Y_LABEL_PRECISISON, PROP_SURFACE, PROP_PLOT, }; static gpointer ags_cartesian_parent_class = NULL; GType ags_cartesian_get_type(void) { static GType ags_type_cartesian = 0; if(!ags_type_cartesian){ static const GTypeInfo ags_cartesian_info = { sizeof(AgsCartesianClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_cartesian_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsCartesian), 0, /* n_preallocs */ (GInstanceInitFunc) ags_cartesian_init, }; ags_type_cartesian = g_type_register_static(GTK_TYPE_WIDGET, "AgsCartesian", &ags_cartesian_info, 0); } return(ags_type_cartesian); } void ags_cartesian_class_init(AgsCartesianClass *cartesian) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_cartesian_parent_class = g_type_class_peek_parent(cartesian); /* GObjectClass */ gobject = (GObjectClass *) cartesian; gobject->set_property = ags_cartesian_set_property; gobject->get_property = ags_cartesian_get_property; gobject->finalize = ags_cartesian_finalize; /* properties */ /** * AgsCartesian:x-margin: * * The horizontal x margin. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-margin", "x margin", "The horizontal x margin", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_X_MARGIN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_MARGIN, param_spec); /** * AgsCartesian:y-margin: * * The horizontal y margin. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-margin", "y margin", "The vertical y margin", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_Y_MARGIN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_MARGIN, param_spec); /** * AgsCartesian:center: * * The center of lines * * Since: 1.0.0 */ param_spec = g_param_spec_double("center", "center of lines", "The center of lines", 0.0, G_MAXDOUBLE, 0.5, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CENTER, param_spec); /** * AgsCartesian:line-width: * * The line width. * * Since: 1.0.0 */ param_spec = g_param_spec_double("line-width", "line width", "The line width", 0.0, G_MAXDOUBLE, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LINE_WIDTH, param_spec); /** * AgsCartesian:point-radius: * * The points radius. * * Since: 1.0.0 */ param_spec = g_param_spec_double("point-radius", "point radius", "The points radius", 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_POINT_RADIUS, param_spec); /** * AgsCartesian:font-size: * * The font's size to draw labels and units. * * Since: 1.0.0 */ param_spec = g_param_spec_double("font-size", "font size", "The font's size", 0.0, G_MAXDOUBLE, 12.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FONT_SIZE, param_spec); /** * AgsCartesian:x-step-width: * * The width of a x step. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-step-width", "x step width", "The x step width", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_X_STEP_WIDTH, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_STEP_WIDTH, param_spec); /** * AgsCartesian:y-step-height: * * The height of a y step. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-step-height", "y step height", "The y step height", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_Y_STEP_HEIGHT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_STEP_HEIGHT, param_spec); /** * AgsCartesian:x-scale-step-width: * * The width of a x scale step. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-scale-step-width", "x scale step width", "The x step width", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_X_SCALE_STEP_WIDTH, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_SCALE_STEP_WIDTH, param_spec); /** * AgsCartesian:y-scale-step-height: * * The height of a y scale step. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-scale-step-height", "y scale step height", "The y scale step height", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_Y_SCALE_STEP_HEIGHT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_SCALE_STEP_HEIGHT, param_spec); /** * AgsCartesian:x-step: * * The x step. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-step", "x step", "The x step", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_X_STEP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_STEP, param_spec); /** * AgsCartesian:y-step: * * The y step. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-step", "y step", "The y step", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_Y_STEP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_STEP, param_spec); /** * AgsCartesian:x-start: * * The x start. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-start", "x start", "The x start", -1.0 * G_MAXDOUBLE, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_X_START, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_START, param_spec); /** * AgsCartesian:x-end: * * The x end. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-end", "x end", "The x end", -1.0 * G_MAXDOUBLE, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_X_END, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_END, param_spec); /** * AgsCartesian:y-start: * * The y start. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-start", "y start", "The y start", -1.0 * G_MAXDOUBLE, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_Y_START, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_START, param_spec); /** * AgsCartesian:y-end: * * The y end. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-end", "y end", "The y end", -1.0 * G_MAXDOUBLE, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_Y_END, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_END, param_spec); /** * AgsCartesian:x-unit-x0: * * The x unit's x0 position. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-unit-x0", "x unit x0", "The x unit's x0 position", 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_UNIT_X0, param_spec); /** * AgsCartesian:x-unit-y0: * * The x unit's y0 position. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-unit-y0", "x unit y0", "The x unit's y0 position", 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_UNIT_Y0, param_spec); /** * AgsCartesian:x-unit: * * The x unit label. * * Since: 1.0.0 */ param_spec = g_param_spec_string("x-unit", "x unit", "The x unit label", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_UNIT, param_spec); /** * AgsCartesian:y-unit-x0: * * The y unit's x0 position. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-unit-x0", "y unit x0", "The y unit's x0 position", 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_UNIT_X0, param_spec); /** * AgsCartesian:y-unit-y0: * * The y unit's y0 position. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-unit-y0", "y unit y0", "The y unit's y0 position", 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_UNIT_Y0, param_spec); /** * AgsCartesian:y-unit: * * The y unit label. * * Since: 1.0.0 */ param_spec = g_param_spec_string("y-unit", "y unit", "The y unit label", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_UNIT, param_spec); /** * AgsCartesian:x-label-start: * * The x label start position. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-label-start", "x label start", "The x label start position", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_X_LABEL_START, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_LABEL_START, param_spec); /** * AgsCartesian:x-label-step-width: * * The x label step width. * * Since: 1.0.0 */ param_spec = g_param_spec_double("x-label-step-width", "x label step width", "The x label step width", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_X_LABEL_STEP_WIDTH, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_LABEL_STEP_WIDTH, param_spec); /** * AgsCartesian:x-label: * * The x labels as a string array. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("x-label", "x label", "The x labels as string array", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_LABEL, param_spec); /** * AgsCartesian:y-label-start: * * The y label start position. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-label-start", "y label start", "The y label start position", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_Y_LABEL_START, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_LABEL_START, param_spec); /** * AgsCartesian:y-label-step-height: * * The y label step height. * * Since: 1.0.0 */ param_spec = g_param_spec_double("y-label-step-height", "y label step height", "The y label step height", 0.0, G_MAXDOUBLE, AGS_CARTESIAN_DEFAULT_Y_LABEL_STEP_HEIGHT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_LABEL_STEP_HEIGHT, param_spec); /** * AgsCartesian:y-label: * * The y labels as a string array. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("y-label", "y label", "The y labels as string array", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y_LABEL, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) cartesian; // widget->map = ags_cartesian_map; widget->realize = ags_cartesian_realize; widget->expose_event = ags_cartesian_expose; widget->size_request = ags_cartesian_size_request; widget->size_allocate = ags_cartesian_size_allocate; widget->show = ags_cartesian_show; } void ags_cartesian_init(AgsCartesian *cartesian) { guint i, i_stop; g_object_set(G_OBJECT(cartesian), "app-paintable", TRUE, NULL); /* flags */ cartesian->flags = (AGS_CARTESIAN_ABSCISSAE | AGS_CARTESIAN_ORDINATE | AGS_CARTESIAN_X_SCALE | AGS_CARTESIAN_Y_SCALE | AGS_CARTESIAN_X_UNIT | AGS_CARTESIAN_Y_UNIT | AGS_CARTESIAN_X_LABEL | AGS_CARTESIAN_Y_LABEL); /* margin */ cartesian->x_margin = AGS_CARTESIAN_DEFAULT_X_MARGIN; cartesian->y_margin = AGS_CARTESIAN_DEFAULT_Y_MARGIN; /* line width */ cartesian->center = 0.5; cartesian->line_width = 1.0; cartesian->point_radius = 1.2; cartesian->font_size = 8.0; /* step */ cartesian->x_step_width = AGS_CARTESIAN_DEFAULT_X_STEP_WIDTH; cartesian->y_step_height = AGS_CARTESIAN_DEFAULT_Y_STEP_HEIGHT; /* scale step */ cartesian->x_scale_step_width = AGS_CARTESIAN_DEFAULT_X_SCALE_STEP_WIDTH; cartesian->y_scale_step_height = AGS_CARTESIAN_DEFAULT_Y_SCALE_STEP_HEIGHT; /* x unit position and font size */ cartesian->x_unit_x0 = (AGS_CARTESIAN_DEFAULT_X_END + AGS_CARTESIAN_DEFAULT_X_MARGIN) - 12.0; cartesian->x_unit_y0 = 0.0; cartesian->x_unit_size = 12.0; /* y unit position and font size */ cartesian->y_unit_x0 = 0.0; cartesian->y_unit_y0 = (AGS_CARTESIAN_DEFAULT_Y_END + AGS_CARTESIAN_DEFAULT_Y_MARGIN) - 12.0; cartesian->y_unit_size = 12.0; /* label step width */ cartesian->x_label_start = AGS_CARTESIAN_DEFAULT_X_LABEL_START; cartesian->x_label_step_width = AGS_CARTESIAN_DEFAULT_X_LABEL_STEP_WIDTH; cartesian->y_label_start = AGS_CARTESIAN_DEFAULT_Y_LABEL_START; cartesian->y_label_step_height = AGS_CARTESIAN_DEFAULT_Y_LABEL_STEP_HEIGHT; /* region alignment */ cartesian->x_step = AGS_CARTESIAN_DEFAULT_X_STEP; cartesian->y_step = AGS_CARTESIAN_DEFAULT_Y_STEP; cartesian->x_start = AGS_CARTESIAN_DEFAULT_X_START; cartesian->x_end = AGS_CARTESIAN_DEFAULT_X_END; cartesian->y_start = AGS_CARTESIAN_DEFAULT_Y_START; cartesian->y_end = AGS_CARTESIAN_DEFAULT_Y_END; /* unit */ cartesian->x_unit = "x"; cartesian->y_unit = "y"; /* label */ cartesian->x_label = NULL; cartesian->y_label = NULL; /* * Here are some common conversion and translate functions. * As well functions to calculate scale and fill their labels. */ /* conversion function */ cartesian->step_conversion_func = ags_cartesian_linear_step_conversion_func; /* translate function */ cartesian->translate_func = ags_cartesian_linear_translate_func; /* scale functions */ cartesian->x_small_scale_func = ags_cartesian_linear_x_small_scale_func; cartesian->x_big_scale_func = ags_cartesian_linear_x_big_scale_func; cartesian->y_small_scale_func = ags_cartesian_linear_y_small_scale_func; cartesian->y_big_scale_func = ags_cartesian_linear_y_big_scale_func; /* label functions */ cartesian->x_label_func = ags_cartesian_linear_x_label_func; cartesian->y_label_func = ags_cartesian_linear_y_label_func; /* factors */ cartesian->x_step_data = cartesian; cartesian->x_step_factor = 1.0; cartesian->y_step_data = cartesian; cartesian->y_step_factor = 1.0; cartesian->x_scale_data = cartesian; cartesian->x_small_scale_factor = 1.0; cartesian->x_big_scale_factor = 5.0; cartesian->y_scale_data = cartesian; cartesian->y_small_scale_factor = 1.0; cartesian->y_big_scale_factor = 5.0; cartesian->x_label_data = cartesian; cartesian->x_label_factor = 5.0; cartesian->x_label_precision = 3.0; cartesian->y_label_data = cartesian; cartesian->y_label_factor = 5.0; cartesian->y_label_precision = 3.0; /* plot */ cartesian->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, cartesian->x_end - cartesian->x_start, cartesian->y_end - cartesian->y_start); cartesian->plot = NULL; /* * reallocate and fill label */ ags_cartesian_reallocate_label(cartesian, TRUE); ags_cartesian_reallocate_label(cartesian, FALSE); ags_cartesian_fill_label(cartesian, TRUE); ags_cartesian_fill_label(cartesian, FALSE); } void ags_cartesian_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { //TODO:JK: implement me } void ags_cartesian_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { //TODO:JK: implement me } void ags_cartesian_finalize(GObject *gobject) { //TODO:JK: implement me G_OBJECT_CLASS(ags_cartesian_parent_class)->finalize(gobject); } void ags_cartesian_map(GtkWidget *widget) { if(gtk_widget_get_realized (widget) && !gtk_widget_get_mapped(widget)){ GTK_WIDGET_CLASS(ags_cartesian_parent_class)->map(widget); gdk_window_show(widget->window); ags_cartesian_draw((AgsCartesian *) widget); } } void ags_cartesian_realize(GtkWidget *widget) { AgsCartesian *cartesian; GdkWindowAttr attributes; gint attributes_mask; g_return_if_fail(widget != NULL); g_return_if_fail(AGS_IS_CARTESIAN(widget)); cartesian = AGS_CARTESIAN(widget); gtk_widget_set_realized(widget, TRUE); /* */ attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; attributes.window_type = GDK_WINDOW_CHILD; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask |= (GDK_EXPOSURE_MASK); widget->window = gdk_window_new(gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data(widget->window, cartesian); widget->style = gtk_style_attach(widget->style, widget->window); gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); gtk_widget_queue_resize(widget); } void ags_cartesian_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_cartesian_parent_class)->show(widget); } void ags_cartesian_size_request(GtkWidget *widget, GtkRequisition *requisition) { GTK_WIDGET_CLASS(ags_cartesian_parent_class)->size_request(widget, requisition); //TODO:JK: implement me } void ags_cartesian_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { GTK_WIDGET_CLASS(ags_cartesian_parent_class)->size_allocate(widget, allocation); //TODO:JK: implement me } gboolean ags_cartesian_expose(GtkWidget *widget, GdkEventExpose *event) { ags_cartesian_draw(AGS_CARTESIAN(widget)); return(FALSE); } void ags_cartesian_draw(AgsCartesian *cartesian) { GtkWidget *widget; GtkStyle *cartesian_style; cairo_t *cr; cairo_text_extents_t te_x_unit, te_y_unit; GList *list; unsigned char *data; guint32 *data_ptr; gdouble x, y; gdouble x_offset, y_offset; gdouble width, height; gdouble factor; gdouble scale_point; guint32 clear_color; guint stride; guint i_stop; guint i; static const gdouble white_gc = 65535.0; auto void ags_cartesian_draw_area(); auto void ags_cartesian_draw_x_label(); auto void ags_cartesian_draw_y_label(); auto void ags_cartesian_draw_x_small_scale(); auto void ags_cartesian_draw_x_big_scale(); auto void ags_cartesian_draw_y_small_scale(); auto void ags_cartesian_draw_y_big_scale(); auto void ags_cartesian_draw_putpixel(int x, int y, unsigned long int pixel); auto void ags_cartesian_draw_plot(AgsPlot *plot); void ags_cartesian_draw_area(){ static const double dashes[] = { 2.0, 3.0 }; /* line width */ cairo_set_line_width(cr, cartesian->line_width); /* color */ cairo_set_source_rgb(cr, cartesian_style->mid[0].red / white_gc, cartesian_style->mid[0].green / white_gc, cartesian_style->mid[0].blue / white_gc); /* dash */ cairo_set_dash(cr, dashes, 2, 0.0); /* draw small area steps */ factor = (cartesian->x_scale_step_width / cartesian->x_step_width); for(x = cartesian->x_start; ; ){ scale_point = cartesian->x_small_scale_func(x, cartesian->x_scale_data); if(scale_point < factor * cartesian->x_start){ x += cartesian->x_step_width; continue; } if(scale_point < factor * cartesian->x_end + cartesian->x_scale_step_width){ /* draw scale step */ cairo_move_to(cr, x_offset + scale_point, y_offset - cartesian->y_start - height); cairo_line_to(cr, x_offset + scale_point, y_offset - cartesian->y_start); cairo_stroke(cr); }else{ break; } x += cartesian->x_step_width; } /* draw small scale steps */ factor = (cartesian->y_scale_step_height / cartesian->y_step_height); for(y = cartesian->y_start; ; ){ scale_point = cartesian->y_small_scale_func(y, cartesian->y_scale_data); if(scale_point < factor * cartesian->y_start){ y += cartesian->y_step_height; continue; } if(scale_point < factor * cartesian->y_end + cartesian->y_scale_step_height){ /* draw scale step */ cairo_move_to(cr, x_offset + cartesian->x_start, y_offset - scale_point); cairo_line_to(cr, x_offset + cartesian->x_start + width, y_offset - scale_point); cairo_stroke(cr); }else{ break; } y += cartesian->y_step_height; } /* undash */ cairo_set_dash(cr, NULL, 0, 0.0); /* draw big area steps */ factor = (cartesian->x_scale_step_width / cartesian->x_step_width); for(x = cartesian->x_start; ; ){ scale_point = cartesian->x_big_scale_func(x, cartesian->x_scale_data); if(scale_point <= factor * cartesian->x_start){ x += cartesian->x_step_width; continue; } if(scale_point < factor * cartesian->x_end + cartesian->x_scale_step_width){ /* draw scale step */ cairo_move_to(cr, x_offset + scale_point, y_offset - cartesian->y_start - height); cairo_line_to(cr, x_offset + scale_point, y_offset - cartesian->y_start); cairo_stroke(cr); }else{ break; } x += cartesian->x_step_width; } /* draw big scale steps */ factor = (cartesian->y_scale_step_height / cartesian->y_step_height); for(y = cartesian->y_start; ; ){ scale_point = cartesian->y_big_scale_func(y, cartesian->y_scale_data); if(scale_point < factor * cartesian->y_start){ y += cartesian->y_step_height; continue; } if(scale_point < factor * cartesian->y_end + cartesian->y_scale_step_height){ /* draw scale step */ cairo_move_to(cr, x_offset + cartesian->x_start, y_offset - scale_point); cairo_line_to(cr, x_offset + cartesian->x_start + width, y_offset - scale_point); cairo_stroke(cr); }else{ break; } y += cartesian->y_step_height; } } void ags_cartesian_draw_x_label(){ cairo_text_extents_t te_x_label; guint i; for(i = 0; i < width / cartesian->x_label_step_width; i++){ if(cartesian->x_label[i] == NULL){ break; } cairo_text_extents(cr, cartesian->x_label[i], &te_x_label); cairo_move_to(cr, cartesian->x_margin + cartesian->x_label_start + (i * cartesian->x_label_step_width) + cartesian->font_size / 3.0, cartesian->y_margin + height + cartesian->y_start + cartesian->font_size + te_x_label.height); cairo_show_text(cr, cartesian->x_label[i]); } cairo_stroke(cr); } void ags_cartesian_draw_y_label(){ cairo_text_extents_t te_y_label; guint i; for(i = 0; i < height / cartesian->y_label_step_height; i++){ if(cartesian->y_label[i] == NULL){ break; } cairo_text_extents(cr, cartesian->y_label[i], &te_y_label); cairo_move_to(cr, cartesian->x_margin - cartesian->x_start + cartesian->font_size / 2.0, cartesian->y_margin + height - cartesian->y_label_start - (i * cartesian->y_label_step_height) - cartesian->font_size / 3.0); cairo_show_text(cr, cartesian->y_label[i]); } cairo_stroke(cr); } void ags_cartesian_draw_x_small_scale(){ /* line width */ cairo_set_line_width(cr, cartesian->line_width); /* color */ cairo_set_source_rgb(cr, cartesian_style->fg[0].red / white_gc, cartesian_style->fg[0].green / white_gc, cartesian_style->fg[0].blue / white_gc); /* draw line */ cairo_move_to(cr, x_offset + cartesian->x_start, y_offset); cairo_line_to(cr, x_offset + cartesian->x_start + width, y_offset); cairo_stroke(cr); /* draw small scale steps */ factor = (cartesian->x_scale_step_width / cartesian->x_step_width); for(x = cartesian->x_start; ; ){ scale_point = cartesian->x_small_scale_func(x, cartesian->x_scale_data); if(scale_point < factor * cartesian->x_start){ x += cartesian->x_step_width; continue; } if(scale_point < factor * cartesian->x_end + cartesian->x_scale_step_width){ /* draw scale step */ cairo_move_to(cr, x_offset + scale_point, y_offset - 4.0); cairo_line_to(cr, x_offset + scale_point, y_offset + 4.0); cairo_stroke(cr); }else{ break; } x += cartesian->x_step_width; } } void ags_cartesian_draw_x_big_scale(){ /* line width */ cairo_set_line_width(cr, cartesian->line_width); /* color */ cairo_set_source_rgb(cr, cartesian_style->fg[0].red / white_gc, cartesian_style->fg[0].green / white_gc, cartesian_style->fg[0].blue / white_gc); /* draw big scale steps */ factor = (cartesian->x_scale_step_width / cartesian->x_step_width); for(x = cartesian->x_start; ; ){ scale_point = cartesian->x_big_scale_func(x, cartesian->x_scale_data); if(scale_point < factor * cartesian->x_start){ x += cartesian->x_step_width; continue; } if(scale_point < factor * cartesian->x_end + cartesian->x_scale_step_width){ /* draw scale step */ cairo_move_to(cr, x_offset + scale_point, y_offset - 6.0); cairo_line_to(cr, x_offset + scale_point, y_offset + 6.0); cairo_stroke(cr); }else{ break; } x += cartesian->x_step_width; } } void ags_cartesian_draw_y_small_scale(){ /* color and line width */ cairo_set_source_rgb(cr, cartesian_style->fg[0].red / white_gc, cartesian_style->fg[0].green / white_gc, cartesian_style->fg[0].blue / white_gc); cairo_set_line_width(cr, cartesian->line_width); /* draw line */ cairo_move_to(cr, x_offset, y_offset - cartesian->y_start); cairo_line_to(cr, x_offset, y_offset - cartesian->y_start - height); cairo_stroke(cr); /* draw small scale steps */ factor = (cartesian->y_scale_step_height / cartesian->y_step_height); for(y = cartesian->y_start; ; ){ scale_point = cartesian->y_small_scale_func(y, cartesian->y_scale_data); if(scale_point < factor * cartesian->y_start){ y += cartesian->y_step_height; continue; } if(scale_point < factor * cartesian->y_end + cartesian->y_scale_step_height){ /* draw scale step */ cairo_move_to(cr, x_offset - 4.0, y_offset - scale_point); cairo_line_to(cr, x_offset + 4.0, y_offset - scale_point); cairo_stroke(cr); }else{ break; } y += cartesian->y_step_height; } } void ags_cartesian_draw_y_big_scale(){ /* line width */ cairo_set_line_width(cr, cartesian->line_width); /* color */ cairo_set_source_rgb(cr, cartesian_style->fg[0].red / white_gc, cartesian_style->fg[0].green / white_gc, cartesian_style->fg[0].blue / white_gc); /* draw big scale steps */ factor = (cartesian->y_scale_step_height / cartesian->y_step_height); for(y = cartesian->y_start; ; ){ scale_point = cartesian->y_big_scale_func(y, cartesian->y_scale_data); if(scale_point < factor * cartesian->y_start){ y += cartesian->y_step_height; continue; } if(scale_point < factor * cartesian->y_end + cartesian->y_scale_step_height){ /* draw scale step */ cairo_move_to(cr, x_offset - 6.0, y_offset - scale_point); cairo_line_to(cr, x_offset + 6.0, y_offset - scale_point); cairo_stroke(cr); }else{ break; } y += cartesian->y_step_height; } } void ags_cartesian_draw_putpixel(int x, int y, unsigned long int pixel){ int bpp = stride / width; /* Here p is the address to the pixel we want to set */ unsigned char *p = data + y * stride + x * bpp; switch(bpp) { case 1: *p = pixel; break; case 2: *(unsigned short int *)p = pixel; break; case 3: p[0] = pixel & 0xff; p[1] = (pixel >> 8) & 0xff; p[2] = (pixel >> 16) & 0xff; break; case 4: *(unsigned long int *)p = pixel; break; } } void ags_cartesian_draw_plot(AgsPlot *plot){ guint i; cairo_set_source_rgb(cr, cartesian_style->fg[0].red / white_gc, cartesian_style->fg[0].green / white_gc, cartesian_style->fg[0].blue / white_gc); /* points */ for(i = 0; i < plot->n_points; i++){ if(plot->point[i] != NULL){ if(plot->point_color != NULL && plot->point_color[i] != NULL){ cairo_set_source_rgb(cr, plot->point_color[i][0], plot->point_color[i][1], plot->point_color[i][2]); } #ifdef AGS_DEBUG g_message("%f %f", plot->point[i][0], plot->point[i][1]); #endif cairo_arc(cr, x_offset + plot->point[i][0] - cartesian->point_radius, y_offset - (plot->point[i][1] - cartesian->point_radius), cartesian->point_radius, -1.0 * M_PI, 1.0 * M_PI); if(plot->join_points){ if(i == 0){ cairo_move_to(cr, x_offset, y_offset); cairo_line_to(cr, x_offset + plot->point[i][0], y_offset - plot->point[i][1]); }else{ cairo_line_to(cr, x_offset + plot->point[i][0], y_offset - plot->point[i][1]); } } } } cairo_stroke(cr); cairo_fill(cr); /* bitmaps */ for(i = 0; i < plot->n_bitmaps; i++){ if(plot->bitmap[i] != NULL){ unsigned long int pixel; guint nth; guint x, y; if(plot->bitmap_color != NULL && plot->bitmap_color[i] != NULL){ pixel = ((255 << 16) * plot->bitmap_color[i][0] + (255 << 8) * plot->bitmap_color[i][1] + 255 * plot->bitmap_color[i][0]); }else{ pixel = 0xffffff; } for(y = 0, nth = 0; y < height; y++){ for(x = 0; x < width; x++, nth++){ if(((1 << (nth % 8)) & (plot->bitmap[i][(guint) floor(nth / 8.0)])) != 0){ ags_cartesian_draw_putpixel(x, y, pixel); } } } } } /* pixmaps */ for(i = 0; i < plot->n_pixmaps; i++){ if(plot->pixmap[i] != NULL){ guint nth; guint x, y; for(y = 0, nth = 0; y < height; y++){ for(x = 0; x < width; x++, nth++){ if(plot->pixmap[i][nth] != NULL){ unsigned long int pixel; pixel = ((255 << 16) * plot->pixmap[i][nth][0] + (255 << 8) * plot->pixmap[i][nth][1] + 255 * plot->pixmap[i][nth][0]); ags_cartesian_draw_putpixel(x, y, pixel); } } } } } } /* entry point */ widget = GTK_WIDGET(cartesian); cartesian_style = gtk_widget_get_style(widget); cr = gdk_cairo_create(widget->window); if(cr == NULL){ return; } /* clear bg */ cairo_set_source_rgb(cr, cartesian_style->bg[0].red / white_gc, cartesian_style->bg[0].green / white_gc, cartesian_style->bg[0].blue / white_gc); cairo_rectangle(cr, 0.0, 0.0, widget->allocation.width, widget->allocation.height); cairo_fill(cr); /* cartesian offset, width and height */ width = (cartesian->x_end - cartesian->x_start); height = (cartesian->y_end - cartesian->y_start); x_offset = cartesian->x_margin - cartesian->x_start - cartesian->center; y_offset = cartesian->y_margin + cartesian->y_start + height + cartesian->center; /* clear surface to white */ data = cairo_image_surface_get_data(cartesian->surface); stride = cairo_image_surface_get_stride(cartesian->surface); data_ptr = data; clear_color = (cartesian_style->base[0].red << 16) | (cartesian_style->base[0].green << 8) | (cartesian_style->base[0].blue); // memset(data, clear_color, (4 * width * height * sizeof(unsigned char))); for(i = 0; i < width * height; i++){ data_ptr[i] = clear_color; } cairo_surface_flush(cartesian->surface); /* surface */ cairo_set_source_surface(cr, cartesian->surface, cartesian->x_margin, cartesian->y_margin); cairo_surface_mark_dirty(cartesian->surface); cairo_paint(cr); /* draw plot */ list = cartesian->plot; while(list != NULL){ ags_cartesian_draw_plot(list->data); list = list->next; } /* push group */ cairo_push_group(cr); ags_cartesian_draw_area(); /* abscissae */ if((AGS_CARTESIAN_ABSCISSAE & (cartesian->flags)) != 0){ if((cartesian->x_end == 0.0) || (cartesian->x_start == 0.0) || (cartesian->x_start < 0.0 && cartesian->x_end > 0.0)){ ags_cartesian_draw_y_small_scale(); ags_cartesian_draw_y_big_scale(); } } /* ordinate */ if((AGS_CARTESIAN_ORDINATE & (cartesian->flags)) != 0){ if((cartesian->y_end == 0.0) || (cartesian->y_start == 0.0) || (cartesian->y_start < 0.0 && cartesian->y_end > 0.0)){ ags_cartesian_draw_x_small_scale(); ags_cartesian_draw_x_big_scale(); } } /* x and y label */ cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size(cr, (gdouble) cartesian->font_size); if((AGS_CARTESIAN_X_LABEL & (cartesian->flags)) != 0){ ags_cartesian_draw_x_label(); } if((AGS_CARTESIAN_Y_LABEL & (cartesian->flags)) != 0){ ags_cartesian_draw_y_label(); } /* x unit */ if((AGS_CARTESIAN_X_UNIT & (cartesian->flags)) != 0){ cairo_text_extents(cr, cartesian->x_unit, &te_x_unit); cairo_move_to(cr, cartesian->x_margin - te_x_unit.width - 3.0, cartesian->y_margin + height + cartesian->y_start); cairo_show_text(cr, cartesian->x_unit); cairo_stroke(cr); } /* y unit */ if((AGS_CARTESIAN_Y_UNIT & (cartesian->flags)) != 0){ cairo_text_extents(cr, cartesian->y_unit, &te_y_unit); cairo_move_to(cr, cartesian->x_margin - cartesian->x_start, cartesian->y_margin + height + te_y_unit.height + 3.0); cairo_show_text(cr, cartesian->y_unit); cairo_stroke(cr); } /* pop group */ cairo_pop_group_to_source(cr); /* paint */ cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } AgsPlot* ags_plot_alloc(guint n_points, guint n_bitmaps, guint n_pixmaps) { AgsPlot *plot; guint i; plot = (AgsPlot *) malloc(sizeof(AgsPlot)); plot->fill_flags = AGS_PLOT_FILL_REPLACE; /* points */ plot->n_points = n_points; plot->join_points = FALSE; if(n_points == 0){ plot->point = NULL; plot->point_color = NULL; }else{ plot->point = (gdouble **) malloc(n_points * sizeof(gdouble)); plot->point_color = (gdouble **) malloc(n_points * sizeof(gdouble)); plot->point_label = (gchar **) malloc((n_points + 1) * sizeof(gchar *)); for(i = 0; i < n_points; i++){ plot->point[i] = (gdouble *) malloc(2 * sizeof(gdouble)); plot->point[i][0] = 0.0; plot->point[i][1] = 0.0; plot->point_color[i] = (gdouble *) malloc(3 * sizeof(gdouble)); plot->point_color[i][0] = 0.0; plot->point_color[i][1] = 0.0; plot->point_color[i][2] = 0.0; plot->point_label[i] = NULL; } plot->point_label[i] = NULL; } /* bitmaps */ plot->n_bitmaps = n_bitmaps; if(n_bitmaps == 0){ plot->bitmap = NULL; plot->bitmap_color = NULL; }else{ plot->bitmap = (unsigned char **) malloc(n_bitmaps * sizeof(unsigned char *)); plot->bitmap_color = (gdouble **) malloc(n_bitmaps * sizeof(gdouble *)); for(i = 0; i < n_bitmaps; i++){ plot->bitmap[i] = NULL; plot->bitmap_color[i] = (gdouble *) malloc(3 * sizeof(gdouble)); plot->bitmap_color[i][0] = 1.0; plot->bitmap_color[i][1] = 0.0; plot->bitmap_color[i][2] = 0.0; } } /* pixmaps */ plot->n_pixmaps = n_pixmaps; if(n_pixmaps == 0){ plot->pixmap = NULL; }else{ plot->pixmap = (gdouble ***) malloc(n_pixmaps * sizeof(gdouble **)); for(i = 0; i < n_pixmaps; i++){ plot->pixmap[i] = NULL; } } return(plot); } void ags_plot_free(AgsPlot *plot) { //TODO:JK: implement me } void ags_cartesian_add_plot(AgsCartesian *cartesian, AgsPlot *plot) { if(!AGS_IS_CARTESIAN(cartesian)){ return; } cartesian->plot = g_list_prepend(cartesian->plot, plot); } void ags_cartesian_remove_plot(AgsCartesian *cartesian, AgsPlot *plot) { if(!AGS_IS_CARTESIAN(cartesian)){ return; } cartesian->plot = g_list_remove(cartesian->plot, plot); } gdouble ags_cartesian_linear_step_conversion_func(gdouble current, gboolean is_abscissae, gpointer data) { if(data == NULL || !AGS_IS_CARTESIAN(data)){ return(current); } if(is_abscissae){ return(AGS_CARTESIAN(data)->x_step_factor * current); }else{ return(AGS_CARTESIAN(data)->y_step_factor * current); } } void ags_cartesian_linear_translate_func(gdouble x, gdouble y, gdouble *ret_x, gdouble *ret_y, gpointer data) { if(data == NULL || !AGS_IS_CARTESIAN(data)){ if(ret_x != NULL){ *ret_x = x; } if(ret_y != NULL){ *ret_y = y; } return; } if(ret_x != NULL){ *ret_x = (AGS_CARTESIAN(data)->x_translate_point) - (x - AGS_CARTESIAN(data)->x_translate_point); } if(ret_y != NULL){ *ret_y = (AGS_CARTESIAN(data)->y_translate_point) - (y - AGS_CARTESIAN(data)->y_translate_point); } } gdouble ags_cartesian_linear_x_small_scale_func(gdouble value, gpointer data) { if(data == NULL || !AGS_IS_CARTESIAN(data)){ return(value); } return(AGS_CARTESIAN(data)->x_small_scale_factor * value); } gdouble ags_cartesian_linear_x_big_scale_func(gdouble value, gpointer data) { if(data == NULL || !AGS_IS_CARTESIAN(data)){ return(value); } return(AGS_CARTESIAN(data)->x_big_scale_factor * value); } gdouble ags_cartesian_linear_y_small_scale_func(gdouble value, gpointer data) { if(data == NULL || !AGS_IS_CARTESIAN(data)){ return(value); } return(AGS_CARTESIAN(data)->y_small_scale_factor * value); } gdouble ags_cartesian_linear_y_big_scale_func(gdouble value, gpointer data) { if(data == NULL || !AGS_IS_CARTESIAN(data)){ return(value); } return(AGS_CARTESIAN(data)->y_big_scale_factor * value); } gchar* ags_cartesian_linear_x_label_func(gdouble value, gpointer data) { gchar *format; gchar *str; if(data == NULL || !AGS_IS_CARTESIAN(data)){ str = g_strdup_printf("%f", value); return(str); } format = g_strdup_printf("%%.%df", (guint) ceil(AGS_CARTESIAN(data)->x_label_precision)); str = g_strdup_printf(format, value); g_free(format); return(str); } gchar* ags_cartesian_linear_y_label_func(gdouble value, gpointer data) { gchar *format; gchar *str; if(data == NULL || !AGS_IS_CARTESIAN(data)){ str = g_strdup_printf("%f", value); return(str); } format = g_strdup_printf("%%.%df", (guint) ceil(AGS_CARTESIAN(data)->y_label_precision)); str = g_strdup_printf(format, value); g_free(format); return(str); } void ags_cartesian_reallocate_label(AgsCartesian *cartesian, gboolean do_x_label) { guint i_start, i_stop; guint i; if(cartesian == NULL || !AGS_IS_CARTESIAN(cartesian)){ return; } if(do_x_label){ i_stop = (guint) ceil((1.0 / cartesian->x_label_step_width) * (cartesian->x_end - cartesian->x_start)); if(cartesian->x_label == NULL){ /* allocate */ cartesian->x_label = (gchar **) malloc((i_stop + 1) * sizeof(gchar *)); /* iteration control */ i_start = 0; i = 0; }else{ /* reallocate */ cartesian->x_label = (gchar **) realloc(cartesian->x_label, i_stop); /* iteration control */ i_start = g_strv_length(cartesian->x_label); if(i_start < i_stop){ i = i_start; }else{ i = i_stop; if(i_stop == 0){ /* set label to NULL */ cartesian->x_label = NULL; } } } if(cartesian->x_label != NULL){ for(; i < i_stop; i++){ /* initialize array to NULL */ cartesian->x_label[i] = NULL; } /* NULL terminated end */ cartesian->x_label[i] = NULL; } }else{ i_stop = (guint) ceil((1.0 / cartesian->y_label_step_height) * (cartesian->y_end - cartesian->y_start)); if(cartesian->y_label == NULL){ /* allocate */ cartesian->y_label = (gchar **) malloc((i_stop + 1) * sizeof(gchar *)); /* iteration control */ i_start = 0; i = 0; }else{ /* reallocate */ cartesian->y_label = (gchar **) realloc(cartesian->y_label, i_stop); /* iteration control */ i_start = g_strv_length(cartesian->y_label); if(i_start < i_stop){ i = i_start; }else{ i = i_stop; if(i_stop == 0){ /* set label to NULL */ cartesian->y_label = NULL; } } } if(cartesian->y_label != NULL){ for(; i < i_stop; i++){ /* initialize array to NULL */ cartesian->y_label[i] = NULL; } /* NULL terminated end */ cartesian->y_label[i] = NULL; } } } void ags_cartesian_fill_label(AgsCartesian *cartesian, gboolean do_x_label) { guint i_stop; guint i; if(cartesian == NULL || !AGS_IS_CARTESIAN(cartesian)){ return; } if(do_x_label){ i_stop = (guint) ceil((1.0 / cartesian->x_label_step_width) * (cartesian->x_end - cartesian->x_start)); for(i = 0; i < i_stop; i++){ /* fill x label */ cartesian->x_label[i] = cartesian->x_label_func((cartesian->x_label_factor * (gdouble) i + (cartesian->x_start / cartesian->x_step_width) + (cartesian->x_label_start / cartesian->x_step_width)), cartesian->x_label_data); } }else{ i_stop = (guint) ceil((1.0 / cartesian->y_label_step_height) * (cartesian->y_end - cartesian->y_start)); for(i = 0; i < i_stop; i++){ /* fill y label */ cartesian->y_label[i] = cartesian->y_label_func((cartesian->y_label_factor * (gdouble) i + (cartesian->y_start / cartesian->y_step_height) + (cartesian->y_label_start / cartesian->y_step_height)), cartesian->y_label_data); } } } AgsCartesian* ags_cartesian_new() { AgsCartesian *cartesian; cartesian = (AgsCartesian *) g_object_new(AGS_TYPE_CARTESIAN, NULL); return(cartesian); } gsequencer-1.4.24/ags/widget/ags_led.c0000644000175000017500000001434013247044247014474 00000000000000/* 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 . */ #include "ags_led.h" #include #include void ags_led_class_init(AgsLedClass *led); void ags_led_init(AgsLed *led); void ags_led_size_request(AgsLed *led, GtkRequisition *requisition); void ags_led_size_allocate(AgsLed *led, GtkAllocation *allocation); void ags_led_realize(GtkWidget *widget); gint ags_led_expose(GtkWidget *widget, GdkEventExpose *event); gboolean ags_led_expose(GtkWidget *widget, GdkEventExpose *event); void ags_led_show(GtkWidget *widget); void ags_led_draw(AgsLed *led); /** * SECTION:ags_led * @short_description: A led widget * @title: AgsLed * @section_id: * @include: ags/widget/ags_led.h * * #AgsLed is a widget visualizing a #gboolean value. */ static gpointer ags_led_parent_class = NULL; GType ags_led_get_type(void) { static GType ags_type_led = 0; if(!ags_type_led){ static const GTypeInfo ags_led_info = { sizeof(AgsLedClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_led_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsLed), 0, /* n_preallocs */ (GInstanceInitFunc) ags_led_init, }; ags_type_led = g_type_register_static(GTK_TYPE_BIN, "AgsLed\0", &ags_led_info, 0); } return(ags_type_led); } void ags_led_class_init(AgsLedClass *led) { GtkWidgetClass *widget; ags_led_parent_class = g_type_class_peek_parent(led); widget = (GtkWidgetClass *) led; widget->size_request = ags_led_size_request; widget->size_allocate = ags_led_size_allocate; widget->realize = ags_led_realize; widget->expose_event = ags_led_expose; widget->show = ags_led_show; } void ags_led_init(AgsLed *led) { g_object_set(G_OBJECT(led), "app-paintable\0", TRUE, NULL); led->flags = 0; } void ags_led_size_allocate(AgsLed *led, GtkAllocation *allocation) { GTK_WIDGET(led)->allocation = *allocation; allocation->width = AGS_LED_DEFAULT_WIDTH; allocation->height = AGS_LED_DEFAULT_HEIGHT; } void ags_led_size_request(AgsLed *led, GtkRequisition *requisition) { requisition->height = AGS_LED_DEFAULT_HEIGHT; requisition->width = AGS_LED_DEFAULT_WIDTH; } void ags_led_realize(GtkWidget *widget) { GdkWindowAttr attributes; gint attributes_mask; g_return_if_fail (widget != NULL); g_return_if_fail (AGS_IS_LED (widget)); GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); /* */ //TODO:JK: apply borders of container widgets attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes.wclass = GDK_INPUT_OUTPUT; attributes.window_type = GDK_WINDOW_CHILD; attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; widget->window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributes_mask); widget->style = gtk_style_attach(widget->style, widget->window); gdk_window_set_user_data(widget->window, widget); gtk_style_set_background(widget->style, widget->window, GTK_STATE_ACTIVE); /* call parent */ GTK_WIDGET_CLASS(ags_led_parent_class)->realize(widget); } void ags_led_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_led_parent_class)->show(widget); } gboolean ags_led_expose(GtkWidget *widget, GdkEventExpose *event) { GTK_WIDGET_CLASS(ags_led_parent_class)->expose_event(widget, event); ags_led_draw(AGS_LED(widget)); return(FALSE); } void ags_led_draw(AgsLed *led) { GtkWidget *widget; GdkWindow *window; GtkStyle *led_style; cairo_t *cr; static const gdouble white_gc = 65535.0; widget = GTK_WIDGET(led); led_style = gtk_widget_get_style(widget); cr = gdk_cairo_create(widget->window); if(cr == NULL){ return; } /* */ if((AGS_LED_ACTIVE & (led->flags)) != 0){ /* active */ cairo_set_source_rgb(cr, led_style->light[0].red / white_gc, led_style->light[0].green / white_gc, led_style->light[0].blue / white_gc); }else{ /* normal */ cairo_set_source_rgb(cr, led_style->dark[0].red / white_gc, led_style->dark[0].green / white_gc, led_style->dark[0].blue / white_gc); } cairo_rectangle(cr, widget->allocation.x, widget->allocation.y, widget->allocation.width, widget->allocation.height); cairo_fill(cr); /* outline */ cairo_set_source_rgb(cr, led_style->fg[0].red / white_gc, led_style->fg[0].green / white_gc, led_style->fg[0].blue / white_gc); cairo_set_line_width(cr, 1.0); cairo_rectangle(cr, widget->allocation.x, widget->allocation.y, widget->allocation.width, widget->allocation.height); cairo_stroke(cr); /* */ cairo_destroy(cr); } void ags_led_set_active(AgsLed *led) { led->flags |= AGS_LED_ACTIVE; gtk_widget_queue_draw((GtkWidget *) led); // ags_led_draw(led); } void ags_led_unset_active(AgsLed *led) { led->flags &= (~AGS_LED_ACTIVE); gtk_widget_queue_draw((GtkWidget *) led); // ags_led_draw(led); } /** * ags_led_new: * * Creates an #AgsLed. * * Returns: a new #AgsLed * * Since: 1.0.0 */ AgsLed* ags_led_new() { AgsLed *led; led = (AgsLed *) g_object_new(AGS_TYPE_LED, NULL); return(led); } gsequencer-1.4.24/ags/widget/ags_piano.c0000644000175000017500000011061613247044247015041 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include static GType ags_accessible_piano_get_type(void); void ags_piano_class_init(AgsPianoClass *piano); void ags_piano_init(AgsPiano *piano); void ags_accessible_piano_class_init(AtkObject *object); void ags_accessible_piano_value_interface_init(AtkValueIface *value); void ags_accessible_piano_action_interface_init(AtkActionIface *action); void ags_piano_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_piano_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_piano_finalize(GObject *gobject); AtkObject* ags_piano_get_accessible(GtkWidget *widget); void ags_piano_show(GtkWidget *widget); void ags_accessible_piano_get_value_and_text(AtkValue *value, gdouble *current_value, gchar **text); #ifdef HAVE_ATK_2_12 AtkRange* ags_accessible_piano_get_range(AtkValue *value); #endif gdouble ags_accessible_piano_get_increment(AtkValue *value); void ags_accessible_piano_set_value(AtkValue *value, gdouble new_value); gboolean ags_accessible_piano_do_action(AtkAction *action, gint i); gint ags_accessible_piano_get_n_actions(AtkAction *action); const gchar* ags_accessible_piano_get_description(AtkAction *action, gint i); const gchar* ags_accessible_piano_get_name(AtkAction *action, gint i); const gchar* ags_accessible_piano_get_keybinding(AtkAction *action, gint i); gboolean ags_accessible_piano_set_description(AtkAction *action, gint i); gchar* ags_accessible_piano_get_localized_name(AtkAction *action, gint i); void ags_piano_map(GtkWidget *widget); void ags_piano_realize(GtkWidget *widget); void ags_piano_size_request(GtkWidget *widget, GtkRequisition *requisition); void ags_piano_size_allocate(GtkWidget *widget, GtkAllocation *allocation); gboolean ags_piano_expose(GtkWidget *widget, GdkEventExpose *event); gboolean ags_piano_button_press(GtkWidget *widget, GdkEventButton *event); gboolean ags_piano_button_release(GtkWidget *widget, GdkEventButton *event); gboolean ags_piano_key_press(GtkWidget *widget, GdkEventKey *event); gboolean ags_piano_key_release(GtkWidget *widget, GdkEventKey *event); gboolean ags_piano_motion_notify(GtkWidget *widget, GdkEventMotion *event); void ags_piano_draw(AgsPiano *piano); void ags_piano_real_key_pressed(AgsPiano *piano, gchar *note, gint key_code); void ags_piano_real_key_released(AgsPiano *piano, gchar *note, gint key_code); void ags_piano_real_key_clicked(AgsPiano *piano, gchar *note, gint key_code); /** * SECTION:ags_piano * @short_description: A piano widget * @title: AgsPiano * @section_id: * @include: ags/widget/ags_piano.h * * #AgsPiano is a widget representing a clavier. */ enum{ KEY_PRESSED, KEY_RELEASED, KEY_CLICKED, LAST_SIGNAL, }; enum{ PROP_0, PROP_BASE_NOTE, PROP_BASE_KEY_CODE, PROP_KEY_WIDTH, PROP_KEY_HEIGHT, PROP_KEY_COUNT, }; static gpointer ags_piano_parent_class = NULL; static guint piano_signals[LAST_SIGNAL]; static GQuark quark_accessible_object = 0; GType ags_piano_get_type(void) { static GType ags_type_piano = 0; if(!ags_type_piano){ static const GTypeInfo ags_piano_info = { sizeof(AgsPianoClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_piano_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsPiano), 0, /* n_preallocs */ (GInstanceInitFunc) ags_piano_init, }; ags_type_piano = g_type_register_static(GTK_TYPE_WIDGET, "AgsPiano", &ags_piano_info, 0); } return(ags_type_piano); } static GType ags_accessible_piano_get_type(void) { static GType ags_type_accessible_piano = 0; if(!ags_type_accessible_piano){ const GTypeInfo ags_accesssible_piano_info = { sizeof(GtkAccessibleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_accessible_piano_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GtkAccessible), 0, /* n_preallocs */ NULL, NULL }; static const GInterfaceInfo atk_value_interface_info = { (GInterfaceInitFunc) ags_accessible_piano_value_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo atk_action_interface_info = { (GInterfaceInitFunc) ags_accessible_piano_action_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_accessible_piano = g_type_register_static(GTK_TYPE_ACCESSIBLE, "AgsAccessiblePiano", &ags_accesssible_piano_info, 0); g_type_add_interface_static(ags_type_accessible_piano, ATK_TYPE_VALUE, &atk_value_interface_info); g_type_add_interface_static(ags_type_accessible_piano, ATK_TYPE_ACTION, &atk_action_interface_info); } return(ags_type_accessible_piano); } void ags_piano_class_init(AgsPianoClass *piano) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_piano_parent_class = g_type_class_peek_parent(piano); quark_accessible_object = g_quark_from_static_string("ags-accessible-object"); /* GObjectClass */ gobject = (GObjectClass *) piano; gobject->set_property = ags_piano_set_property; gobject->get_property = ags_piano_get_property; gobject->finalize = ags_piano_finalize; /* properties */ /** * AgsPiano:base-note: * * The base note to use as lower. * * Since: 1.2.0 */ param_spec = g_param_spec_string("base-note", "base note", "The base note to use as lower", AGS_PIANO_DEFAULT_BASE_NOTE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BASE_NOTE, param_spec); /** * AgsPiano:base-key-code: * * The base key code. * * Since: 1.2.0 */ param_spec = g_param_spec_uint("base-key-code", "base key code", "The base key code", 0, G_MAXUINT, AGS_PIANO_DEFAULT_BASE_KEY_CODE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BASE_KEY_CODE, param_spec); /** * AgsPiano:key-width: * * The key width to use for drawing a key. * * Since: 1.2.0 */ param_spec = g_param_spec_uint("key-width", "key width", "The key width to use for drawing", 0, G_MAXUINT, AGS_PIANO_DEFAULT_KEY_WIDTH, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_KEY_WIDTH, param_spec); /** * AgsPiano:key-height: * * The key height to use for drawing a key. * * Since: 1.2.0 */ param_spec = g_param_spec_uint("key-height", "key height", "The key height to use for drawing", 0, G_MAXUINT, AGS_PIANO_DEFAULT_KEY_HEIGHT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_KEY_HEIGHT, param_spec); /** * AgsPiano:key-count: * * The count of keys to be drawn. * * Since: 1.2.0 */ param_spec = g_param_spec_uint("key-count", "key count", "The count of keys to draw", 0, G_MAXUINT, AGS_PIANO_DEFAULT_KEY_COUNT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_KEY_COUNT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) piano; widget->get_accessible = ags_piano_get_accessible; // widget->map = ags_piano_map; widget->realize = ags_piano_realize; widget->expose_event = ags_piano_expose; widget->size_request = ags_piano_size_request; widget->size_allocate = ags_piano_size_allocate; widget->button_press_event = ags_piano_button_press; widget->button_release_event = ags_piano_button_release; widget->key_press_event = ags_piano_key_press; widget->key_release_event = ags_piano_key_release; widget->motion_notify_event = ags_piano_motion_notify; widget->show = ags_piano_show; /* AgsPianoClass */ piano->key_pressed = ags_piano_real_key_pressed; piano->key_released = ags_piano_real_key_released; piano->key_clicked = NULL; /* signals */ /** * AgsPiano::key-pressed: * @piano: the #AgsPiano * @note: the note as string * @key_code: the numeric representation of the note * * The ::key-pressed signal notifies about key pressed. * * Since: 1.2.0 */ piano_signals[KEY_PRESSED] = g_signal_new("key-pressed", G_TYPE_FROM_CLASS(piano), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsPianoClass, key_pressed), NULL, NULL, ags_widget_cclosure_marshal_VOID__STRING_INT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_INT); /** * AgsPiano::key-released: * @piano: the #AgsPiano * @note: the note as string * @key_code: the numeric representation of the note * * The ::key-released signal notifies about key released. * * Since: 1.2.0 */ piano_signals[KEY_RELEASED] = g_signal_new("key-released", G_TYPE_FROM_CLASS(piano), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsPianoClass, key_released), NULL, NULL, ags_widget_cclosure_marshal_VOID__STRING_INT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_INT); /** * AgsPiano::key-clicked: * @piano: the #AgsPiano * @note: the note as string * @key_code: the numeric representation of the note * * The ::key-clicked signal notifies about key clicked. * * Since: 1.2.0 */ piano_signals[KEY_CLICKED] = g_signal_new("key-clicked", G_TYPE_FROM_CLASS(piano), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsPianoClass, key_clicked), NULL, NULL, ags_widget_cclosure_marshal_VOID__STRING_INT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_INT); } void ags_accessible_piano_class_init(AtkObject *object) { /* empty */ } void ags_accessible_piano_value_interface_init(AtkValueIface *value) { value->get_current_value = NULL; value->get_maximum_value = NULL; value->get_minimum_value = NULL; value->set_current_value = NULL; value->get_minimum_increment = NULL; #ifdef HAVE_ATK_2_12 value->get_value_and_text = ags_accessible_piano_get_value_and_text; value->get_range = ags_accessible_piano_get_range; value->get_increment = ags_accessible_piano_get_increment; value->get_sub_ranges = NULL; value->set_value = ags_accessible_piano_set_value; #endif } void ags_accessible_piano_action_interface_init(AtkActionIface *action) { action->do_action = ags_accessible_piano_do_action; action->get_n_actions = ags_accessible_piano_get_n_actions; action->get_description = ags_accessible_piano_get_description; action->get_name = ags_accessible_piano_get_name; action->get_keybinding = ags_accessible_piano_get_keybinding; action->set_description = ags_accessible_piano_set_description; action->get_localized_name = ags_accessible_piano_get_localized_name; } void ags_piano_init(AgsPiano *piano) { AtkObject *accessible; g_object_set(G_OBJECT(piano), "app-paintable", TRUE, "can-focus", TRUE, NULL); accessible = gtk_widget_get_accessible((GtkWidget *) piano); g_object_set(accessible, "accessible-name", "piano", "accessible-description", "Hit a key at cursor position", NULL); piano->flags = 0; piano->button_state = 0; piano->layout = AGS_PIANO_LAYOUT_VERTICAL; piano->font_size = 12; piano->base_note = g_strdup(AGS_PIANO_DEFAULT_BASE_NOTE); piano->base_key_code = AGS_PIANO_DEFAULT_BASE_KEY_CODE; piano->key_width = AGS_PIANO_DEFAULT_KEY_WIDTH; piano->key_height = AGS_PIANO_DEFAULT_KEY_HEIGHT; piano->key_count = AGS_PIANO_DEFAULT_KEY_COUNT; piano->cursor_position = -1; piano->current_key = 0; piano->active_key = NULL; piano->active_key_count = 0; } void ags_piano_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPiano *piano; piano = AGS_PIANO(gobject); switch(prop_id){ case PROP_BASE_NOTE: { gchar *base_note; base_note = g_value_get_string(value); if(base_note == piano->base_note){ return; } g_free(piano->base_note); piano->base_note = g_strdup(base_note); } break; case PROP_BASE_KEY_CODE: { piano->base_key_code = g_value_get_uint(value); } break; case PROP_KEY_WIDTH: { piano->key_width = g_value_get_uint(value); } break; case PROP_KEY_HEIGHT: { piano->key_height = g_value_get_uint(value); } break; case PROP_KEY_COUNT: { piano->key_count = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_piano_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPiano *piano; piano = AGS_PIANO(gobject); switch(prop_id){ case PROP_BASE_NOTE: { g_value_set_string(value, piano->base_note); } break; case PROP_BASE_KEY_CODE: { g_value_set_uint(value, piano->base_key_code); } break; case PROP_KEY_WIDTH: { g_value_set_uint(value, piano->key_width); } break; case PROP_KEY_HEIGHT: { g_value_set_uint(value, piano->key_height); } break; case PROP_KEY_COUNT: { g_value_set_uint(value, piano->key_count); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_piano_finalize(GObject *gobject) { AgsPiano *piano; piano = AGS_PIANO(gobject); g_free(piano->base_note); /* call parent */ G_OBJECT_CLASS(ags_piano_parent_class)->finalize(gobject); } void ags_accessible_piano_get_value_and_text(AtkValue *value, gdouble *current_value, gchar **text) { AgsPiano *piano; piano = (AgsPiano *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); if(current_value != NULL){ *current_value = (gdouble) piano->cursor_position; } if(text != NULL){ *text = g_strdup_printf("%d", piano->cursor_position); } } #ifdef HAVE_ATK_2_12 AtkRange* ags_accessible_piano_get_range(AtkValue *value) { AgsPiano *piano; AtkRange *range; piano = (AgsPiano *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); range = atk_range_new((gdouble) piano->base_key_code, (gdouble) (piano->base_key_code + piano->key_count), "Valid lower and upper input range of this piano"); } #endif gdouble ags_accessible_piano_get_increment(AtkValue *value) { AgsPiano *piano; piano = (AgsPiano *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); return(1.0); } void ags_accessible_piano_set_value(AtkValue *value, gdouble new_value) { AgsPiano *piano; piano = (AgsPiano *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); piano->cursor_position = (gint) new_value; gtk_widget_queue_draw((GtkWidget *) piano); } gboolean ags_accessible_piano_do_action(AtkAction *action, gint i) { AgsPiano *piano; GdkEventKey *key_press, *key_release; if(!(i >= 0 && i < 3)){ return(FALSE); } piano = (AgsPiano *) gtk_accessible_get_widget(GTK_ACCESSIBLE(action)); key_press = gdk_event_new(GDK_KEY_PRESS); key_release = gdk_event_new(GDK_KEY_RELEASE); switch(i){ case AGS_PIANO_MOVE_CURSOR_UP: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) piano, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) piano, (GdkEvent *) key_release); } break; case AGS_PIANO_MOVE_CURSOR_DOWN: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) piano, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) piano, (GdkEvent *) key_release); } break; case AGS_PIANO_HIT_KEY: { key_press->keyval = key_release->keyval = GDK_KEY_space; /* send event */ gtk_widget_event((GtkWidget *) piano, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) piano, (GdkEvent *) key_release); } break; } return(TRUE); } gint ags_accessible_piano_get_n_actions(AtkAction *action) { return(3); } const gchar* ags_accessible_piano_get_description(AtkAction *action, gint i) { static const gchar *actions[] = { "move up one piano key", "move down one piano key", "hit current piano key", }; if(i >= 0 && i < 3){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_piano_get_name(AtkAction *action, gint i) { static const gchar *actions[] = { "move-up", "move-down", "hit-key", }; if(i >= 0 && i < 3){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_piano_get_keybinding(AtkAction *action, gint i) { static const gchar *actions[] = { "up", "down", "space" }; if(i >= 0 && i < 3){ return(actions[i]); }else{ return(NULL); } } gboolean ags_accessible_piano_set_description(AtkAction *action, gint i) { //TODO:JK: implement me return(FALSE); } gchar* ags_accessible_piano_get_localized_name(AtkAction *action, gint i) { //TODO:JK: implement me return(NULL); } void ags_piano_map(GtkWidget *widget) { if(gtk_widget_get_realized (widget) && !gtk_widget_get_mapped(widget)){ GTK_WIDGET_CLASS(ags_piano_parent_class)->map(widget); gdk_window_show(widget->window); ags_piano_draw((AgsPiano *) widget); } } void ags_piano_realize(GtkWidget *widget) { AgsPiano *piano; GdkWindowAttr attributes; gint attributes_mask; g_return_if_fail(widget != NULL); g_return_if_fail(AGS_IS_PIANO(widget)); piano = AGS_PIANO(widget); gtk_widget_set_realized(widget, TRUE); /* */ attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask |= (GDK_EXPOSURE_MASK); widget->window = gdk_window_new(gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data(widget->window, piano); widget->style = gtk_style_attach(widget->style, widget->window); gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); gtk_widget_queue_resize(widget); } AtkObject* ags_piano_get_accessible(GtkWidget *widget) { AtkObject* accessible; accessible = g_object_get_qdata(G_OBJECT(widget), quark_accessible_object); if(!accessible){ accessible = g_object_new(ags_accessible_piano_get_type(), NULL); g_object_set_qdata(G_OBJECT(widget), quark_accessible_object, accessible); gtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), widget); } return(accessible); } void ags_piano_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_piano_parent_class)->show(widget); } void ags_piano_size_request(GtkWidget *widget, GtkRequisition *requisition) { AgsPiano *piano; piano = AGS_PIANO(widget); if(piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ requisition->width = piano->key_width; requisition->height = piano->key_count * piano->key_height; }else if(piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ requisition->width = piano->key_count * piano->key_height; requisition->height = piano->key_width; } } void ags_piano_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsPiano *piano; piano = AGS_PIANO(widget); widget->allocation = *allocation; if(piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ widget->allocation.width = piano->key_width; widget->allocation.height = piano->key_count * piano->key_height; }else if(piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ widget->allocation.width = piano->key_count * piano->key_height; widget->allocation.height = piano->key_width; } } gboolean ags_piano_expose(GtkWidget *widget, GdkEventExpose *event) { ags_piano_draw(AGS_PIANO(widget)); return(FALSE); } gboolean ags_piano_button_press(GtkWidget *widget, GdkEventButton *event) { AgsPiano *piano; guint width, height; guint x_start, y_start; piano = AGS_PIANO(widget); width = widget->allocation.width; height = widget->allocation.height; x_start = 0; y_start = 0; if(event->x >= x_start && event->x < width && event->y >= y_start && event->y < height){ if(event->button == 1){ gchar *note; piano->button_state |= AGS_PIANO_BUTTON_1_PRESSED; if(piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ piano->current_key = floor(event->y / piano->key_height); }else if(piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ piano->current_key = floor(event->x / piano->key_height); } note = ags_piano_key_code_to_note(piano->current_key); ags_piano_key_pressed(piano, note, piano->current_key); g_free(note); } } return(FALSE); } gboolean ags_piano_button_release(GtkWidget *widget, GdkEventButton *event) { AgsPiano *piano; gtk_widget_grab_focus(widget); piano = AGS_PIANO(widget); if(event->button == 1){ if((AGS_PIANO_BUTTON_1_PRESSED & (piano->button_state)) != 0){ gchar *note; note = ags_piano_key_code_to_note(piano->current_key); ags_piano_key_released(piano, note, piano->current_key); ags_piano_key_clicked(piano, note, piano->current_key); g_free(note); } piano->button_state &= (~AGS_PIANO_BUTTON_1_PRESSED); } return(FALSE); } gboolean ags_piano_key_press(GtkWidget *widget, GdkEventKey *event) { if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ return(GTK_WIDGET_CLASS(ags_piano_parent_class)->key_press_event(widget, event)); } return(TRUE); } gboolean ags_piano_key_release(GtkWidget *widget, GdkEventKey *event) { AgsPiano *piano; //TODO:JK: implement me if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ return(GTK_WIDGET_CLASS(ags_piano_parent_class)->key_release_event(widget, event)); } piano = AGS_PIANO(widget); switch(event->keyval){ case GDK_KEY_Up: case GDK_KEY_uparrow: { guint value, step, upper; value = piano->cursor_position; step = 1; upper = piano->base_key_code + piano->key_count; if(value + step > upper){ piano->cursor_position = upper; }else{ piano->cursor_position = value + step; } gtk_widget_queue_draw(widget); } break; case GDK_KEY_Down: case GDK_KEY_downarrow: { guint value, step, lower; value = piano->cursor_position; step = 1; lower = piano->base_key_code; if(value - step < lower){ piano->cursor_position = lower; }else{ piano->cursor_position = value - step; } gtk_widget_queue_draw(widget); } break; case GDK_KEY_space: { gchar *note; guint key_code; note = ags_piano_key_code_to_note(piano->cursor_position); key_code = piano->cursor_position; ags_piano_key_pressed(piano, note, key_code); ags_piano_key_released(piano, note, key_code); ags_piano_key_clicked(piano, note, key_code); } break; } return(TRUE); } gboolean ags_piano_motion_notify(GtkWidget *widget, GdkEventMotion *event) { AgsPiano *piano; guint width, height; guint x_start, y_start; gint new_current_key; piano = AGS_PIANO(widget); width = widget->allocation.width; height = widget->allocation.height; x_start = 0; y_start = 0; if((AGS_PIANO_BUTTON_1_PRESSED & (piano->button_state)) != 0){ if(piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ new_current_key = floor(event->y / piano->key_height); }else if(piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ new_current_key = floor(event->x / piano->key_height); } /* emit released */ if(new_current_key != piano->current_key){ gchar *note; note = ags_piano_key_code_to_note(piano->current_key); ags_piano_key_released(piano, note, piano->current_key); ags_piano_key_clicked(piano, note, piano->current_key); g_free(note); } /* emit pressed */ if(event->x >= x_start && event->x < width && event->y >= y_start && event->y < height){ gchar *note; piano->current_key = new_current_key; note = ags_piano_key_code_to_note(new_current_key); ags_piano_key_pressed(piano, note, new_current_key); g_free(note); } } return(FALSE); } void ags_piano_draw(AgsPiano *piano) { cairo_t *cr; guint width, height; guint x_start, y_start; guint big_control_width, big_control_height; guint small_control_width, small_control_height; guint control_x0, control_y0; gint *active_key; guint active_key_count; gint active_position; gboolean current_is_active; guint i, j; static const gdouble white_gc = 65535.0; static const guint bitmap = 0x52a52a; if(!AGS_IS_PIANO(piano)){ return; } cr = gdk_cairo_create(GTK_WIDGET(piano)->window); if(cr == NULL){ return; } if(piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ width = GTK_WIDGET(piano)->allocation.width; if(piano->key_count * piano->key_height < GTK_WIDGET(piano)->allocation.height){ height = piano->key_count * piano->key_height; }else{ height = GTK_WIDGET(piano)->allocation.height; } }else if(piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ if(piano->key_count * piano->key_height < GTK_WIDGET(piano)->allocation.width){ width = piano->key_count * piano->key_height; }else{ width = GTK_WIDGET(piano)->allocation.width; } height = GTK_WIDGET(piano)->allocation.height; } x_start = 0; y_start = 0; cairo_surface_flush(cairo_get_target(cr)); cairo_push_group(cr); /* fill bg */ cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); cairo_rectangle(cr, (double) x_start, (double) y_start, (double) width, (double) height); cairo_fill(cr); /* draw */ control_x0 = x_start; control_y0 = y_start; if(piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ big_control_width = piano->key_width; big_control_height = piano->key_height; small_control_width = (2.0 / 3.0) * piano->key_width; small_control_height = piano->key_height; }else if(piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ big_control_width = piano->key_height; big_control_height = piano->key_width; small_control_width = piano->key_height; small_control_height = (2.0 / 3.0) * piano->key_width; } active_key = ags_piano_get_active_key(piano, &active_key_count); active_position = -1; cairo_set_line_width(cr, 1.0); /* apply base note */ j = piano->base_key_code % 12; for(i = 0; i < piano->key_count; i++){ /* check active */ current_is_active = FALSE; if(active_key != NULL && active_position + 1 < active_key_count && active_key[active_position] == piano->base_key_code + i){ current_is_active = TRUE; active_position++; } if(((1 << j) & bitmap) != 0){ /* draw semi tone key */ cairo_set_source_rgb(cr, 0.2, 0.2, 0.2); cairo_rectangle(cr, (double) control_x0, (double) control_y0, small_control_width, (double) small_control_height); cairo_fill(cr); cairo_set_source_rgb(cr, 0.68, 0.68, 0.68); cairo_move_to(cr, (double) (control_x0 + small_control_width), (double) (control_y0 + small_control_height / 2)); cairo_line_to(cr, (double) (control_x0 + big_control_width), (double) (control_y0 + small_control_height / 2)); cairo_stroke(cr); }else{ /* draw no semi tone key */ cairo_set_source_rgb(cr, 0.68, 0.68, 0.68); if(((1 << (j + 1)) & bitmap) == 0){ cairo_move_to(cr, (double) control_x0, (double) (control_y0 + big_control_height)); cairo_line_to(cr, (double) (control_x0 + big_control_width), (double) (control_y0 + big_control_height)); cairo_stroke(cr); } cairo_move_to(cr, (double) (control_x0 + big_control_width), (double) control_y0); cairo_line_to(cr, (double) (control_x0 + big_control_width), (double) (control_y0 + big_control_height)); cairo_stroke(cr); } /* iterate - offset */ if(piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ control_y0 += piano->key_height; }else if(piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ control_x0 += piano->key_height; } /* iterate - bitmap */ if(j == 11){ j = 0; }else{ j++; } } g_free(active_key); cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } /** * ags_piano_key_code_to_note: * @key_code: the key code * * Get note from key code. * * Returns: the note as string * * Since: 1.2.0 */ gchar* ags_piano_key_code_to_note(gint key_code) { gchar *note; gchar *prefix; gchar *suffix; guint tic_count; guint i; static const gchar **note_map = { AGS_PIANO_KEYS_OCTAVE_2_C, AGS_PIANO_KEYS_OCTAVE_2_CIS, AGS_PIANO_KEYS_OCTAVE_2_D, AGS_PIANO_KEYS_OCTAVE_2_DIS, AGS_PIANO_KEYS_OCTAVE_2_E, AGS_PIANO_KEYS_OCTAVE_2_F, AGS_PIANO_KEYS_OCTAVE_2_FIS, AGS_PIANO_KEYS_OCTAVE_2_G, AGS_PIANO_KEYS_OCTAVE_2_GIS, AGS_PIANO_KEYS_OCTAVE_2_A, AGS_PIANO_KEYS_OCTAVE_2_AIS, AGS_PIANO_KEYS_OCTAVE_2_H, AGS_PIANO_KEYS_OCTAVE_3_C, AGS_PIANO_KEYS_OCTAVE_3_CIS, AGS_PIANO_KEYS_OCTAVE_3_D, AGS_PIANO_KEYS_OCTAVE_3_DIS, AGS_PIANO_KEYS_OCTAVE_3_E, AGS_PIANO_KEYS_OCTAVE_3_F, AGS_PIANO_KEYS_OCTAVE_3_FIS, AGS_PIANO_KEYS_OCTAVE_3_G, AGS_PIANO_KEYS_OCTAVE_3_GIS, AGS_PIANO_KEYS_OCTAVE_3_A, AGS_PIANO_KEYS_OCTAVE_3_AIS, AGS_PIANO_KEYS_OCTAVE_3_H, }; note = NULL; if(key_code < 2 * 12){ /* prefix */ if(key_code >= 0){ prefix = note_map[key_code % 12]; }else{ prefix = note_map[(12 + (key_code % 12)) % 12]; } /* suffix */ tic_count = floor((24.0 - key_code) / 12.0); suffix = (gchar *) malloc((tic_count + 1) * sizeof(gchar)); for(i = 0; i < tic_count; i++){ suffix[i] = ','; } suffix[i] = '\0'; /* note */ note = g_strdup_printf("%s%s", prefix, suffix); }else if(key_code >= 2 * 12 && key_code < 3 * 12){ note = g_strdup(note_map[key_code - 2 * 12]); }else if(key_code >= 3 * 12 && key_code < 4 * 12){ note = g_strdup(note_map[key_code - 3 * 12]); }else{ /* prefix */ prefix = note_map[(key_code % 12) + 12]; /* suffix */ tic_count = floor((key_code - 48.0) / 12.0); suffix = (gchar *) malloc((tic_count + 1) * sizeof(gchar)); for(i = 0; i < tic_count; i++){ suffix[i] = '\''; } suffix[i] = '\0'; /* note */ note = g_strdup_printf("%s%s", prefix, suffix); } return(note); } void ags_piano_real_key_pressed(AgsPiano *piano, gchar *note, gint key_code) { guint i; i = piano->active_key_count; if(piano->active_key == NULL){ piano->active_key = (gint *) malloc(sizeof(gint)); }else{ piano->active_key = (gint *) realloc(piano->active_key, (i + 1) * sizeof(gint)); } piano->active_key[i] = key_code; piano->active_key_count += 1; /* queue draw */ gtk_widget_queue_draw(piano); } /** * ags_piano_key_pressed: * @piano: the #AgsPiano * @note: the string representation of key * @key_code: the key code * * Emits ::key-pressed event. * * Since: 1.2.0 */ void ags_piano_key_pressed(AgsPiano *piano, gchar *note, gint key_code) { g_return_if_fail(AGS_IS_PIANO(piano)); g_object_ref((GObject *) piano); g_signal_emit(G_OBJECT(piano), piano_signals[KEY_PRESSED], 0, note, key_code); g_object_unref((GObject *) piano); } void ags_piano_real_key_released(AgsPiano *piano, gchar *note, gint key_code) { gint position; position = -1; while(position < piano->active_key_count){ position++; if(piano->active_key[position] == key_code){ break; } } if(position != -1 && position < piano->active_key_count){ if(piano->active_key_count > 1){ gint *old_active_key; old_active_key = ags_piano_get_active_key(piano, NULL); piano->active_key = (gint *) realloc(piano->active_key, (piano->active_key_count - 1) * sizeof(gint)); if(position < piano->active_key_count - 1){ memcpy(&(piano->active_key[position]), &(old_active_key[position + 1]), (piano->active_key_count - position - 1) * sizeof(gint)); } free(old_active_key); }else{ free(piano->active_key); piano->active_key = NULL; } piano->active_key_count -= 1; } /* queue draw */ gtk_widget_queue_draw(piano); } /** * ags_piano_key_released: * @piano: the #AgsPiano * @note: the string representation of key * @key_code: the key code * * Emits ::key-released event. * * Since: 1.2.0 */ void ags_piano_key_released(AgsPiano *piano, gchar *note, gint key_code) { g_return_if_fail(AGS_IS_PIANO(piano)); g_object_ref((GObject *) piano); g_signal_emit(G_OBJECT(piano), piano_signals[KEY_RELEASED], 0, note, key_code); g_object_unref((GObject *) piano); } /** * ags_piano_key_clicked: * @piano: the #AgsPiano * @note: the string representation of key * @key_code: the key code * * Emits ::key-clicked event. * * Since: 1.2.0 */ void ags_piano_key_clicked(AgsPiano *piano, gchar *note, gint key_code) { g_return_if_fail(AGS_IS_PIANO(piano)); g_object_ref((GObject *) piano); g_signal_emit(G_OBJECT(piano), piano_signals[KEY_CLICKED], 0, note, key_code); g_object_unref((GObject *) piano); } /** * ags_piano_get_active_key: * @piano: the #AgsPiano * @active_key_count: return location of count of active keys * * Get active keys. * * Returns: the active keys as gint array * * Since: 1.2.0 */ gint* ags_piano_get_active_key(AgsPiano *piano, guint *active_key_count) { gint *active_key; if(!AGS_IS_PIANO(piano)){ if(active_key_count != NULL){ *active_key_count = 0; } return(NULL); } if(piano->active_key_count > 0){ active_key = (gint *) malloc(piano->active_key_count * sizeof(gint)); memcpy(active_key, piano->active_key, piano->active_key_count * sizeof(gint)); }else{ active_key = NULL; } if(active_key_count != NULL){ *active_key_count = piano->active_key_count; } return(active_key); } /** * ags_piano_new: * * Create a new instance of #AgsPiano. * * Returns: the new #AgsPiano instance * * Since: 1.2.0 */ AgsPiano* ags_piano_new() { AgsPiano *piano; piano = (AgsPiano *) g_object_new(AGS_TYPE_PIANO, NULL); return(piano); } gsequencer-1.4.24/ags/widget/ags_dial.c0000644000175000017500000012023513247044247014642 00000000000000/* 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 . */ #include "ags_dial.h" #include #include #include #include static GType ags_accessible_dial_get_type(void); void ags_dial_class_init(AgsDialClass *dial); void ags_accessible_dial_class_init(AtkObject *object); void ags_accessible_dial_value_interface_init(AtkValueIface *value); void ags_accessible_dial_action_interface_init(AtkActionIface *action); void ags_dial_init(AgsDial *dial); void ags_dial_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_dial_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); AtkObject* ags_dial_get_accessible(GtkWidget *widget); void ags_dial_show(GtkWidget *widget); void ags_accessible_dial_get_value_and_text(AtkValue *value, gdouble *current_value, gchar **text); #ifdef HAVE_ATK_2_12 AtkRange* ags_accessible_dial_get_range(AtkValue *value); #endif gdouble ags_accessible_dial_get_increment(AtkValue *value); void ags_accessible_dial_set_value(AtkValue *value, gdouble new_value); gboolean ags_accessible_dial_do_action(AtkAction *action, gint i); gint ags_accessible_dial_get_n_actions(AtkAction *action); const gchar* ags_accessible_dial_get_description(AtkAction *action, gint i); const gchar* ags_accessible_dial_get_name(AtkAction *action, gint i); const gchar* ags_accessible_dial_get_keybinding(AtkAction *action, gint i); gboolean ags_accessible_dial_set_description(AtkAction *action, gint i); gchar* ags_accessible_dial_get_localized_name(AtkAction *action, gint i); void ags_dial_map(GtkWidget *widget); void ags_dial_realize(GtkWidget *widget); void ags_dial_size_request(GtkWidget *widget, GtkRequisition *requisition); void ags_dial_size_allocate(GtkWidget *widget, GtkAllocation *allocation); gboolean ags_dial_expose(GtkWidget *widget, GdkEventExpose *event); gboolean ags_dial_button_press(GtkWidget *widget, GdkEventButton *event); gboolean ags_dial_button_release(GtkWidget *widget, GdkEventButton *event); gboolean ags_dial_key_press(GtkWidget *widget, GdkEventKey *event); gboolean ags_dial_key_release(GtkWidget *widget, GdkEventKey *event); gboolean ags_dial_motion_notify(GtkWidget *widget, GdkEventMotion *event); void ags_dial_adjustment_changed_callback(GtkAdjustment *adjustment, AgsDial *dial); /** * SECTION:ags_dial * @short_description: A dial widget * @title: AgsDial * @section_id: * @include: ags/widget/ags_dial.h * * #AgsDial is a widget representing a #GtkAdjustment. */ enum{ VALUE_CHANGED, LAST_SIGNAL, }; enum{ PROP_0, PROP_ADJUSTMENT, PROP_SCALE_PRECISION, }; static gpointer ags_dial_parent_class = NULL; static guint dial_signals[LAST_SIGNAL]; static GQuark quark_accessible_object = 0; GType ags_dial_get_type(void) { static GType ags_type_dial = 0; if(!ags_type_dial){ static const GTypeInfo ags_dial_info = { sizeof(AgsDialClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_dial_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsDial), 0, /* n_preallocs */ (GInstanceInitFunc) ags_dial_init, }; ags_type_dial = g_type_register_static(GTK_TYPE_WIDGET, "AgsDial", &ags_dial_info, 0); } return(ags_type_dial); } static GType ags_accessible_dial_get_type(void) { static GType ags_type_accessible_dial = 0; if(!ags_type_accessible_dial){ const GTypeInfo ags_accesssible_dial_info = { sizeof(GtkAccessibleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_accessible_dial_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GtkAccessible), 0, /* n_preallocs */ NULL, NULL }; static const GInterfaceInfo atk_value_interface_info = { (GInterfaceInitFunc) ags_accessible_dial_value_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo atk_action_interface_info = { (GInterfaceInitFunc) ags_accessible_dial_action_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_accessible_dial = g_type_register_static(GTK_TYPE_ACCESSIBLE, "AgsAccessibleDial", &ags_accesssible_dial_info, 0); g_type_add_interface_static(ags_type_accessible_dial, ATK_TYPE_VALUE, &atk_value_interface_info); g_type_add_interface_static(ags_type_accessible_dial, ATK_TYPE_ACTION, &atk_action_interface_info); } return(ags_type_accessible_dial); } void ags_dial_class_init(AgsDialClass *dial) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_dial_parent_class = g_type_class_peek_parent(dial); quark_accessible_object = g_quark_from_static_string("ags-accessible-object"); /* GObjectClass */ gobject = (GObjectClass *) dial; gobject->set_property = ags_dial_set_property; gobject->get_property = ags_dial_get_property; /* properties */ /** * AgsDial:adjustment: * * The adjustment storing current value and boundaries. * * Since: 1.0.0 */ param_spec = g_param_spec_object("adjustment", "assigned adjustment", "The adjustment it is assigned with", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ADJUSTMENT, param_spec); /** * AgsDial:scale-precision: * * The precision of the scale. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("scale-precision", "scale precision", "The precision of the scale", 0, G_MAXUINT, AGS_DIAL_DEFAULT_PRECISION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCALE_PRECISION, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) dial; widget->get_accessible = ags_dial_get_accessible; // widget->map = ags_dial_map; widget->realize = ags_dial_realize; widget->expose_event = ags_dial_expose; widget->size_request = ags_dial_size_request; widget->size_allocate = ags_dial_size_allocate; widget->button_press_event = ags_dial_button_press; widget->button_release_event = ags_dial_button_release; widget->key_press_event = ags_dial_key_press; widget->key_release_event = ags_dial_key_release; widget->motion_notify_event = ags_dial_motion_notify; widget->show = ags_dial_show; /* AgsDialClass */ dial->value_changed = NULL; /* signals */ /** * AgsDial::value-changed: * @dial: the #AgsDial * @port_data: the port's data * * The ::value-changed signal notifies adjustment value changed. * * Since: 1.0.0 */ dial_signals[VALUE_CHANGED] = g_signal_new("value-changed", G_TYPE_FROM_CLASS(dial), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsDialClass, value_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_accessible_dial_class_init(AtkObject *object) { /* empty */ } void ags_accessible_dial_value_interface_init(AtkValueIface *value) { value->get_current_value = NULL; value->get_maximum_value = NULL; value->get_minimum_value = NULL; value->set_current_value = NULL; value->get_minimum_increment = NULL; #ifdef HAVE_ATK_2_12 value->get_value_and_text = ags_accessible_dial_get_value_and_text; value->get_range = ags_accessible_dial_get_range; value->get_increment = ags_accessible_dial_get_increment; value->get_sub_ranges = NULL; value->set_value = ags_accessible_dial_set_value; #endif } void ags_accessible_dial_action_interface_init(AtkActionIface *action) { action->do_action = ags_accessible_dial_do_action; action->get_n_actions = ags_accessible_dial_get_n_actions; action->get_description = ags_accessible_dial_get_description; action->get_name = ags_accessible_dial_get_name; action->get_keybinding = ags_accessible_dial_get_keybinding; action->set_description = ags_accessible_dial_set_description; action->get_localized_name = ags_accessible_dial_get_localized_name; } void ags_dial_init(AgsDial *dial) { AtkObject *accessible; gtk_widget_set_can_focus((GtkWidget *) dial, TRUE); accessible = gtk_widget_get_accessible((GtkWidget *) dial); g_object_set(accessible, "accessible-name", "dial", "accessible-description", "Adjust a value", NULL); g_object_set(G_OBJECT(dial), "app-paintable", TRUE, "can-focus", TRUE, NULL); dial->flags = (AGS_DIAL_WITH_BUTTONS | AGS_DIAL_SEEMLESS_MODE); dial->adjustment = NULL; dial->radius = AGS_DIAL_DEFAULT_RADIUS; dial->scale_precision = AGS_DIAL_DEFAULT_PRECISION; dial->scale_max_precision = AGS_DIAL_DEFAULT_PRECISION; dial->outline_strength = AGS_DIAL_DEFAULT_OUTLINE_STRENGTH; dial->font_size = 6; dial->button_width = AGS_DIAL_DEFAULT_BUTTON_WIDTH; dial->button_height = 0; dial->margin_left = AGS_DIAL_DEFAULT_MARGIN; dial->margin_right = AGS_DIAL_DEFAULT_MARGIN; dial->tolerance = 0.9; dial->negated_tolerance = 1.1; dial->gravity_x = 0.0; dial->gravity_y = 0.0; dial->current_x = 0.0; dial->current_y = 0.0; } void ags_dial_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsDial *dial; dial = AGS_DIAL(gobject); switch(prop_id){ case PROP_ADJUSTMENT: { GtkAdjustment *adjustment; adjustment = (GtkAdjustment *) g_value_get_object(value); if(dial->adjustment == adjustment){ return; } if(dial->adjustment != NULL){ g_object_unref(G_OBJECT(dial->adjustment)); } if(adjustment != NULL){ g_object_ref(G_OBJECT(adjustment)); g_signal_connect(adjustment, "value-changed", G_CALLBACK(ags_dial_adjustment_changed_callback), dial); } dial->adjustment = adjustment; } break; case PROP_SCALE_PRECISION: { guint scale_precision; scale_precision = g_value_get_uint(value); if(scale_precision > dial->scale_max_precision){ dial->scale_precision = dial->scale_max_precision; }else if(scale_precision == 0){ dial->scale_precision = 1; }else{ dial->scale_precision = scale_precision; } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_dial_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsDial *dial; dial = AGS_DIAL(gobject); switch(prop_id){ case PROP_ADJUSTMENT: g_value_set_object(value, dial->adjustment); break; case PROP_SCALE_PRECISION: { g_value_set_uint(value, dial->scale_precision); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_accessible_dial_get_value_and_text(AtkValue *value, gdouble *current_value, gchar **text) { AgsDial *dial; dial = (AgsDial *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); if(current_value != NULL){ *current_value = gtk_adjustment_get_value(dial->adjustment); } if(text != NULL){ *text = g_strdup_printf("%f", gtk_adjustment_get_value(dial->adjustment)); } } #ifdef HAVE_ATK_2_12 AtkRange* ags_accessible_dial_get_range(AtkValue *value) { AgsDial *dial; AtkRange *range; dial = (AgsDial *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); range = atk_range_new(gtk_adjustment_get_lower(dial->adjustment), gtk_adjustment_get_upper(dial->adjustment), "Valid lower and upper input range of this dial"); } #endif gdouble ags_accessible_dial_get_increment(AtkValue *value) { AgsDial *dial; dial = (AgsDial *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); return(gtk_adjustment_get_step_increment(dial->adjustment)); } void ags_accessible_dial_set_value(AtkValue *value, gdouble new_value) { AgsDial *dial; dial = (AgsDial *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); gtk_adjustment_set_value(dial->adjustment, new_value); gtk_widget_queue_draw((GtkWidget *) dial); } gboolean ags_accessible_dial_do_action(AtkAction *action, gint i) { AgsDial *dial; GdkEventKey *key_press, *key_release; if(!(i >= 0 && i < 2)){ return(FALSE); } dial = (AgsDial *) gtk_accessible_get_widget(GTK_ACCESSIBLE(action)); key_press = gdk_event_new(GDK_KEY_PRESS); key_release = gdk_event_new(GDK_KEY_RELEASE); switch(i){ case AGS_DIAL_INCREMENT: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) dial, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) dial, (GdkEvent *) key_release); } break; case AGS_DIAL_DECREMENT: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) dial, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) dial, (GdkEvent *) key_release); } break; } return(TRUE); } gint ags_accessible_dial_get_n_actions(AtkAction *action) { return(2); } const gchar* ags_accessible_dial_get_description(AtkAction *action, gint i) { static const gchar *actions[] = { "increment dial value", "decrement dial value", }; if(i >= 0 && i < 2){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_dial_get_name(AtkAction *action, gint i) { static const gchar *actions[] = { "increment", "decrement", }; if(i >= 0 && i < 2){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_dial_get_keybinding(AtkAction *action, gint i) { static const gchar *actions[] = { "up", "down", }; if(i >= 0 && i < 2){ return(actions[i]); }else{ return(NULL); } } gboolean ags_accessible_dial_set_description(AtkAction *action, gint i) { //TODO:JK: implement me return(FALSE); } gchar* ags_accessible_dial_get_localized_name(AtkAction *action, gint i) { //TODO:JK: implement me return(NULL); } void ags_dial_map(GtkWidget *widget) { if (gtk_widget_get_realized (widget) && !gtk_widget_get_mapped (widget)) { GTK_WIDGET_CLASS (ags_dial_parent_class)->map(widget); gdk_window_show(widget->window); ags_dial_draw((AgsDial *) widget); } } void ags_dial_realize(GtkWidget *widget) { AgsDial *dial; GdkWindowAttr attributes; gint attributes_mask; gint buttons_width; gint border_left, border_top; g_return_if_fail (widget != NULL); g_return_if_fail (AGS_IS_DIAL (widget)); dial = AGS_DIAL(widget); gtk_widget_set_realized (widget, TRUE); /* calculate some display dependend fields */ buttons_width = 0; if((AGS_DIAL_WITH_BUTTONS & (dial->flags)) != 0){ cairo_t *cr; cairo_text_extents_t te_up, te_down; cr = gdk_cairo_create(widget->parent->window); if(cr == NULL){ return; } cairo_select_font_face (cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size (cr, (gdouble) dial->font_size); cairo_text_extents (cr, "-", &te_down); cairo_text_extents (cr, "+", &te_up); if(te_down.width < te_up.width){ dial->button_width = te_up.width * 3; }else{ dial->button_width = te_down.width * 3; } buttons_width = 2 * dial->button_width; if(te_down.height < te_up.height){ dial->button_height = te_up.height * 2; }else{ dial->button_height = te_down.height * 2; } cairo_destroy(cr); } /* */ attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; attributes.window_type = GDK_WINDOW_CHILD; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data (widget->window, dial); widget->style = gtk_style_attach(widget->style, widget->window); gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); gtk_widget_queue_resize (widget); } AtkObject* ags_dial_get_accessible(GtkWidget *widget) { AtkObject* accessible; accessible = g_object_get_qdata(G_OBJECT(widget), quark_accessible_object); if(!accessible){ accessible = g_object_new(ags_accessible_dial_get_type(), NULL); g_object_set_qdata(G_OBJECT(widget), quark_accessible_object, accessible); gtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), widget); } return(accessible); } void ags_dial_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_dial_parent_class)->show(widget); } void ags_dial_size_request(GtkWidget *widget, GtkRequisition *requisition) { requisition->height = AGS_DIAL_DEFAULT_HEIGHT; requisition->width = AGS_DIAL_DEFAULT_WIDTH; //TODO:JK: improve me } void ags_dial_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { allocation->height = AGS_DIAL_DEFAULT_HEIGHT; allocation->width = AGS_DIAL_DEFAULT_WIDTH; widget->allocation = *allocation; //TODO:JK: improve me GTK_WIDGET_CLASS(ags_dial_parent_class)->size_allocate(widget, allocation); } gboolean ags_dial_expose(GtkWidget *widget, GdkEventExpose *event) { ags_dial_draw(AGS_DIAL(widget)); return(FALSE); } gboolean ags_dial_button_press(GtkWidget *widget, GdkEventButton *event) { AgsDial *dial; gint border_left, border_top; gint dial_left_position; auto gboolean ags_dial_button_press_is_down_event(); auto gboolean ags_dial_button_press_is_up_event(); auto gboolean ags_dial_button_press_is_dial_event(); gboolean ags_dial_button_press_is_down_event(){ if(event->x >= border_left && event->x <= border_left + dial->button_width && event->y >= border_top + 2 * dial->radius + 2 * dial->outline_strength - dial->button_height && event->y <= border_top + 2 * dial->radius + 2 * dial->outline_strength){ return(TRUE); }else{ return(FALSE); } } gboolean ags_dial_button_press_is_up_event(){ gint offset; offset = border_left + dial->button_width + 2 * dial->radius + dial->margin_left + dial->margin_right; if(event->x >= offset && event->x <= offset + dial->button_width && event->y >= border_top + 2 * dial->radius + 2 * dial->outline_strength - dial->button_height && event->y <= border_top + 2 * dial->radius + 2 * dial->outline_strength){ return(TRUE); }else{ return(FALSE); } } gboolean ags_dial_button_press_is_dial_event(){ if(event->x >= dial_left_position && event->x <= dial_left_position + 2 * dial->radius + 2 * dial->outline_strength){ if((cos(event->y) < 0.0 && cos(event->y) >= -1.0) || (sin(event->y) > 0.0 && sin(event->y) <= 1.0) || (cos(event->y) < 0.0 && sin(event->y) >= -1.0) || (sin(event->y) < 0.0 && cos(event->y) >= -1.0)){ return(TRUE); }else{ return(FALSE); } }else{ return(FALSE); } } // GTK_WIDGET_CLASS(ags_dial_parent_class)->button_press_event(widget, event); dial = AGS_DIAL(widget); dial->flags |= AGS_DIAL_MOUSE_BUTTON_PRESSED; //TODO:JK: retrieve borders border_left = 0; border_top = 0; if((AGS_DIAL_WITH_BUTTONS & (dial->flags)) != 0){ if(ags_dial_button_press_is_down_event()){ dial->flags |= AGS_DIAL_BUTTON_DOWN_PRESSED; }else if(ags_dial_button_press_is_up_event()){ dial->flags |= AGS_DIAL_BUTTON_UP_PRESSED; }else{ dial_left_position = border_left + dial->button_width; if(ags_dial_button_press_is_dial_event()){ dial->flags |= AGS_DIAL_MOTION_CAPTURING; } } }else{ dial_left_position = border_left; if(ags_dial_button_press_is_dial_event()){ dial->gravity_x = event->x; dial->gravity_y = event->y; dial->current_x = event->x; dial->current_y = event->y; dial->flags |= AGS_DIAL_MOTION_CAPTURING_INIT; dial->flags |= AGS_DIAL_MOTION_CAPTURING; } } return(FALSE); } gboolean ags_dial_button_release(GtkWidget *widget, GdkEventButton *event) { AgsDial *dial; // GTK_WIDGET_CLASS(ags_dial_parent_class)->button_release_event(widget, event); gtk_widget_grab_focus(widget); dial = AGS_DIAL(widget); dial->flags &= (~AGS_DIAL_MOUSE_BUTTON_PRESSED); if((AGS_DIAL_BUTTON_DOWN_PRESSED & (dial->flags)) != 0){ GtkAdjustment *adjustment; adjustment = dial->adjustment; if(adjustment->value > adjustment->lower){ gtk_adjustment_set_value(adjustment, adjustment->value - adjustment->step_increment); ags_dial_draw(dial); } dial->flags &= (~AGS_DIAL_BUTTON_DOWN_PRESSED); }else if((AGS_DIAL_BUTTON_UP_PRESSED & (dial->flags)) != 0){ GtkAdjustment *adjustment; adjustment = dial->adjustment; if(adjustment->value < adjustment->upper){ gtk_adjustment_set_value(adjustment, adjustment->value + adjustment->step_increment); ags_dial_draw(dial); } dial->flags &= (~AGS_DIAL_BUTTON_UP_PRESSED); }else if((AGS_DIAL_MOTION_CAPTURING & (dial->flags)) != 0){ dial->flags &= (~AGS_DIAL_MOTION_CAPTURING); } return(FALSE); } gboolean ags_dial_key_press(GtkWidget *widget, GdkEventKey *event) { if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ return(GTK_WIDGET_CLASS(ags_dial_parent_class)->key_press_event(widget, event)); } return(TRUE); } gboolean ags_dial_key_release(GtkWidget *widget, GdkEventKey *event) { AgsDial *dial; if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ return(GTK_WIDGET_CLASS(ags_dial_parent_class)->key_release_event(widget, event)); } dial = AGS_DIAL(widget); switch(event->keyval){ case GDK_KEY_Up: case GDK_KEY_uparrow: { gdouble value, step, upper; value = gtk_adjustment_get_value(dial->adjustment); step = gtk_adjustment_get_step_increment(dial->adjustment); upper = gtk_adjustment_get_upper(dial->adjustment); if(value + step > upper){ gtk_adjustment_set_value(dial->adjustment, upper); }else{ gtk_adjustment_set_value(dial->adjustment, value + step); } gtk_widget_queue_draw(widget); } break; case GDK_KEY_Down: case GDK_KEY_downarrow: { gdouble value, step, lower; value = gtk_adjustment_get_value(dial->adjustment); step = gtk_adjustment_get_step_increment(dial->adjustment); lower = gtk_adjustment_get_lower(dial->adjustment); if(value - step < lower){ gtk_adjustment_set_value(dial->adjustment, lower); }else{ gtk_adjustment_set_value(dial->adjustment, value - step); } gtk_widget_queue_draw(widget); } break; } return(TRUE); } gboolean ags_dial_motion_notify(GtkWidget *widget, GdkEventMotion *event) { AgsDial *dial; auto void ags_dial_motion_notify_do_dial(); auto void ags_dial_motion_notify_do_seemless_dial(); void ags_dial_motion_notify_do_dial(){ GtkAdjustment *adjustment; guint i; gint sign_one; gboolean gravity_up; static const gboolean movement_matrix[] = { FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, }; adjustment = dial->adjustment; gravity_up = FALSE; for(i = 0; i < 8 ; i++){ if(!movement_matrix[i]){ sign_one = -1; }else{ sign_one = 1; } if((movement_matrix[i] && (sign_one * (dial->gravity_x - dial->current_x) < sign_one * (dial->gravity_y - dial->current_y))) || (!movement_matrix[i] && (sign_one * (dial->gravity_x - dial->current_x) > sign_one * (dial->gravity_y - dial->current_y)))){ gravity_up = TRUE; break; } } if(!gravity_up){ if(adjustment->value > adjustment->lower){ gtk_adjustment_set_value(adjustment, adjustment->value - adjustment->step_increment); ags_dial_draw(dial); } }else{ if(adjustment->value < adjustment->upper){ gtk_adjustment_set_value(adjustment, adjustment->value + adjustment->step_increment); ags_dial_draw(dial); } } } void ags_dial_motion_notify_do_seemless_dial(){ GtkAdjustment *adjustment; cairo_t *cr; gdouble radius; gdouble border_left, border_top; gdouble range; gdouble a0, quarter; gdouble x0, y0, x1, y1; gdouble translated_x; gboolean x_toggled, y_toggled; //TODO:JK: optimize me adjustment = dial->adjustment; range = (dial->adjustment->upper - dial->adjustment->lower); if(range == 0.0){ return; } radius = dial->radius; border_left = 0.0; border_top = 0.0; x1 = event->x - (1.0 + dial->button_width + dial->margin_left + radius + border_left); y1 = event->y - (dial->outline_strength + radius + border_top); y1 *= -1.0; x_toggled = FALSE; y_toggled = FALSE; if(x1 < 0.0){ x_toggled = TRUE; } if(y1 < 0.0){ y_toggled = TRUE; } if(radius == 0.0){ return; } //FIXME:JK: ugly hack x1 = round(x1 + 1.0); y1 = round(y1 - 1.0); if(x1 == 0.0 && y1 == 0.0){ return; }else if(x1 == 0.0){ a0 = 1.0; #if 0 x0 = 0.0; y0 = 1.0 * radius; #endif }else if(y1 == 0.0){ a0 = 0.0; #if 0 x0 = 1.0 * radius; y0 = 0.0; #endif }else{ a0 = y1 / x1; #if 0 x0 = cos(a0) * radius; y0 = sin(a0) * radius; #endif } /* origin correction */ #if 0 if(x_toggled && y_toggled){ if(x0 > 0.0){ x0 *= -1.0; } if(y0 > 0.0){ y0 *= -1.0; } }else if(y_toggled){ if(x0 < 0.0){ x0 *= -1.0; } if(y0 > 0.0){ y0 *= -1.0; } }else if(x_toggled){ if(y0 < 0.0){ y0 *= -1.0; } if(x0 > 0.0){ x0 *= -1.0; } }else{ if(x0 < 0.0){ x0 *= -1.0; } if(y0 < 0.0){ y0 *= -1.0; } } #endif if(a0 > 2.0 * M_PI / 4.0){ a0 = (2.0 * M_PI / 4.0); }else if(a0 < -2.0 * M_PI / 4.0){ a0 = (-2.0 * M_PI / 4.0); } /* translated_x */ translated_x = a0 * radius; quarter = (2.0 * M_PI / 4.0) * radius; if(x_toggled && y_toggled){ if(translated_x < 0.0){ translated_x = quarter + translated_x; }else{ translated_x = quarter - translated_x; } }else if(y_toggled){ if(translated_x < 0.0){ translated_x *= -1.0; } translated_x += 3.0 * quarter; }else if(x_toggled){ if(translated_x < 0.0){ translated_x *= -1.0; } translated_x += quarter; }else{ if(translated_x < 0.0){ translated_x = quarter + translated_x; }else{ translated_x = quarter - translated_x; } translated_x += 2.0 * quarter; } translated_x = ((4.0 / 3.0) * range) / (4.0 * quarter) * translated_x; translated_x -= (range / 3.0 / 2.0); translated_x = adjustment->lower + translated_x; if(translated_x < adjustment->lower){ translated_x = adjustment->lower; }else if(translated_x > adjustment->upper){ translated_x = adjustment->upper; } gtk_adjustment_set_value(adjustment, translated_x); ags_dial_draw(dial); } // GTK_WIDGET_CLASS(ags_dial_parent_class)->motion_notify_event(widget, event); dial = AGS_DIAL(widget); if((AGS_DIAL_MOTION_CAPTURING & (dial->flags)) != 0){ if((AGS_DIAL_SEEMLESS_MODE & (dial->flags)) != 0){ if((AGS_DIAL_MOTION_CAPTURING_INIT & (dial->flags)) != 0){ dial->current_x = event->x; dial->current_y = event->y; }else{ dial->gravity_x = dial->current_x; dial->gravity_y = dial->current_y; dial->current_x = event->x; dial->current_y = event->y; } ags_dial_motion_notify_do_seemless_dial(); }else{ if((AGS_DIAL_MOTION_CAPTURING_INIT & (dial->flags)) != 0){ dial->current_x = event->x; dial->current_y = event->y; dial->flags &= (~AGS_DIAL_MOTION_CAPTURING_INIT); ags_dial_motion_notify_do_dial(); }else{ dial->gravity_x = dial->current_x; dial->gravity_y = dial->current_y; dial->current_x = event->x; dial->current_y = event->y; ags_dial_motion_notify_do_dial(); } } } return(FALSE); } /** * ags_dial_draw: * @dial: an #AgsDial * * draws the widget * * Since: 1.0.0 */ void ags_dial_draw(AgsDial *dial) { GtkWidget *widget; GtkStyle *dial_style; cairo_t *cr; cairo_text_extents_t te_up, te_down; gdouble button_width, button_height, margin_left, margin_right; gdouble radius, outline_strength; gdouble unused; gdouble scale_area, scale_width, scale_inverted_width; gdouble starter_angle; gdouble translated_value; gdouble range; guint scale_precision; guint i; static const gdouble white_gc = 65535.0; widget = GTK_WIDGET(dial); dial_style = gtk_widget_get_style(widget); cr = gdk_cairo_create(widget->window); if(cr == NULL){ return; } radius = (gdouble) dial->radius; outline_strength = (gdouble) dial->outline_strength; margin_left = (gdouble) dial->margin_left; margin_right = (gdouble) dial->margin_right; cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size (cr, (gdouble) dial->font_size); cairo_text_extents (cr, "-", &te_down); cairo_text_extents (cr, "+", &te_up); button_width = dial->button_width; button_height = dial->button_height; /* clear bg */ cairo_set_source_rgb(cr, dial_style->fg[0].red / white_gc, dial_style->fg[0].green / white_gc, dial_style->fg[0].blue / white_gc); cairo_rectangle(cr, 0.0, 0.0, widget->allocation.width, widget->allocation.height); cairo_fill(cr); if((AGS_DIAL_WITH_BUTTONS & (dial->flags)) != 0){ /* bg */ cairo_set_source_rgb(cr, dial_style->bg[0].red / white_gc, dial_style->bg[0].green / white_gc, dial_style->bg[0].blue / white_gc); cairo_rectangle(cr, 0.0, (2.0 * radius) - button_height + outline_strength - 1.0, button_width + 2.0, button_height + 2.0); cairo_fill(cr); /* draw controller button down */ cairo_set_source_rgb(cr, dial_style->fg[0].red / white_gc, dial_style->fg[0].green / white_gc, dial_style->fg[0].blue / white_gc); cairo_set_line_width(cr, 2.0); cairo_rectangle(cr, 1.0, (2.0 * radius) - button_height + outline_strength, button_width, button_height); cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); cairo_stroke(cr); cairo_move_to (cr, 1.0 + 0.5 - te_down.width / 2.0 - te_down.x_bearing + button_width / 2.25, 0.5 - te_down.height / 2.0 - te_down.y_bearing + (radius * 2.0) - button_height / 2.0 + outline_strength); cairo_show_text (cr, "-"); } if((AGS_DIAL_WITH_BUTTONS & (dial->flags)) != 0){ /* bg */ cairo_set_source_rgb(cr, dial_style->bg[0].red / white_gc, dial_style->bg[0].green / white_gc, dial_style->bg[0].blue / white_gc); cairo_rectangle(cr, (2.0 * radius) + button_width + margin_left + margin_right, (2.0 * radius) - button_height + outline_strength - 1.0, button_width + 2.0, button_height + 2.0); cairo_fill(cr); /* draw controller button up */ cairo_set_source_rgb(cr, dial_style->fg[0].red / white_gc, dial_style->fg[0].green / white_gc, dial_style->fg[0].blue / white_gc); cairo_set_line_width(cr, 2.0); cairo_rectangle(cr, 1.0 + (2.0 * radius) + button_width + margin_left + margin_right, (2.0 * radius) - button_height + outline_strength, button_width, button_height); cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); cairo_stroke(cr); cairo_move_to (cr, 1.0 + 0.5 - te_up.width / 2.0 - te_up.x_bearing + (radius * 2.0) + margin_left + margin_right + button_width + button_width / 2.25, 0.5 - te_up.height / 2.0 - te_up.y_bearing + (radius * 2.0) - button_height / 2.0 + outline_strength); cairo_show_text (cr, "+"); } /* border fill * / cairo_set_source_rgb(cr, dial_style->fg[0].red / white_gc, dial_style->fg[0].green / white_gc, dial_style->fg[0].blue / white_gc); cairo_arc(cr, 1.0 + button_width + margin_left + radius, radius + outline_strength, radius + 2.0, -1.0 * M_PI, 1.0 * M_PI); cairo_stroke(cr); */ /* bg */ cairo_set_source_rgb(cr, dial_style->bg[0].red / white_gc, dial_style->bg[0].green / white_gc, dial_style->bg[0].blue / white_gc); cairo_arc(cr, 1.0 + button_width + margin_left + radius, radius + outline_strength, radius + outline_strength - 1.25, -1.0 * M_PI, 1.0 * M_PI); cairo_fill(cr); /* background */ cairo_set_source_rgb(cr, dial_style->dark[0].red / white_gc, dial_style->dark[0].green / white_gc, dial_style->dark[0].blue / white_gc); cairo_arc(cr, 1.0 + button_width + margin_left + radius, radius + outline_strength, radius, -1.0 * M_PI, 1.0 * M_PI); cairo_fill(cr); /* light effect */ cairo_set_source_rgba(cr, dial_style->light[0].red / white_gc, dial_style->light[0].green / white_gc, dial_style->light[0].blue / white_gc, 0.3); cairo_line_to(cr, 1.0 + button_width + margin_left + radius, radius + 2.0 * outline_strength - 2.0 - outline_strength); cairo_line_to(cr, 1.0 + sin(-1 * (0.35 * M_PI) / (0.65 * M_PI)) + button_width + margin_left + radius, cos((0.65 * M_PI) / (0.35 * M_PI)) + radius + 2.0 * outline_strength - 1.0); cairo_line_to(cr, 1.0 + sin((0.65 * M_PI) / (0.35 * M_PI)) + button_width + margin_left + radius, -1 * cos((0.35 * M_PI) / (0.65 * M_PI)) + radius + 2.0 * outline_strength - 1.0); cairo_close_path(cr); cairo_arc(cr, 1.0 + button_width + margin_left + radius, radius + outline_strength, radius, 0.35 * M_PI, 0.65 * M_PI); cairo_fill(cr); cairo_line_to(cr, 1.0 + cos((0.65 * M_PI) / (0.35 * M_PI)) + button_width + margin_left + radius, -1 * sin((0.35 * M_PI) / (0.65 * M_PI)) + radius + 2.0 * outline_strength - 1.0); cairo_line_to(cr, 1.0 + -1 * cos((0.35 * M_PI) / (0.65 * M_PI)) + button_width + margin_left + radius, sin((0.65 * M_PI) / (0.35 * M_PI)) + radius + 2.0 * outline_strength - 1.0); cairo_line_to(cr, 1.0 + button_width + margin_left + radius, radius + 2.0 * outline_strength - 1.0); cairo_close_path(cr); cairo_arc(cr, 1.0 + button_width + margin_left + radius, radius + outline_strength, radius, -0.65 * M_PI, -0.35 * M_PI); cairo_fill(cr); /* outline */ cairo_set_source_rgb(cr, dial_style->fg[0].red / white_gc, dial_style->fg[0].green / white_gc, dial_style->fg[0].blue / white_gc); // cairo_set_line_width(cr, 1.0 - (2.0 / M_PI)); cairo_set_line_width(cr, 1.0); cairo_arc(cr, 1.0 + button_width + margin_left + radius, radius + outline_strength, radius, -1.0 * M_PI, 1.0 * M_PI); cairo_stroke(cr); /* scale */ cairo_set_source_rgb(cr, dial_style->fg[0].red / white_gc, dial_style->fg[0].green / white_gc, dial_style->fg[0].blue / white_gc); cairo_set_line_width(cr, 3.0); unused = 0.25 * 2.0 * M_PI; starter_angle = (2.0 * M_PI - unused) * 0.5; scale_precision = (gdouble) dial->scale_precision; scale_inverted_width = (2.0 * (radius + outline_strength) * M_PI - ((radius + outline_strength) * unused)) / scale_precision - 4.0; scale_width = (2.0 * (radius + outline_strength) * M_PI - ((radius + outline_strength) * unused)) / scale_precision - scale_inverted_width; scale_inverted_width /= (radius + outline_strength); scale_width /= (radius + outline_strength); for(i = 0; i <= scale_precision; i++){ cairo_arc(cr, 1.0 + button_width + margin_left + radius, radius + outline_strength, radius + outline_strength / M_PI, starter_angle + ((gdouble) i * scale_inverted_width) + ((gdouble) i * scale_width), starter_angle + ((gdouble) i * scale_inverted_width) + ((gdouble) i * scale_width) + scale_width); cairo_stroke(cr); } /* draw value */ range = (dial->adjustment->upper - dial->adjustment->lower); if(range != 0.0){ /* this is odd */ translated_value = (dial->adjustment->value - dial->adjustment->lower); translated_value = (gdouble) scale_precision * (translated_value / range); // g_message("value: %f\nupper: %f\ntranslated_value: %f\n", GTK_RANGE(dial)->adjustment->value, GTK_RANGE(dial)->adjustment->upper, translated_value); cairo_set_line_width(cr, 4.0); cairo_set_source_rgb(cr, dial_style->fg[0].red / white_gc, dial_style->fg[0].green / white_gc, dial_style->fg[0].blue / white_gc); cairo_arc(cr, 1.0 + button_width + margin_left + radius, radius + outline_strength, radius - (outline_strength + 4.0) / M_PI, starter_angle + (translated_value * scale_inverted_width) + (translated_value * scale_width), starter_angle + (translated_value * scale_inverted_width) + (translated_value * scale_width) + scale_width); cairo_stroke(cr); }else{ g_warning("ags_dial.c - range = 0.0"); } cairo_destroy(cr); } /** * ags_dial_value_changed: * @dial: an #AgsDial * * draws the widget * * Since: 1.0.0 */ void ags_dial_value_changed(AgsDial *dial) { g_return_if_fail(AGS_IS_DIAL(dial)); g_object_ref((GObject *) dial); g_signal_emit(G_OBJECT(dial), dial_signals[VALUE_CHANGED], 0); g_object_unref((GObject *) dial); } void ags_dial_adjustment_changed_callback(GtkAdjustment *adjustment, AgsDial *dial) { ags_dial_value_changed(dial); } /** * ags_dial_value_changed: * @dial: an #AgsDial * @value: the value to set * * Set value * * Since: 1.0.0 */ void ags_dial_set_value(AgsDial *dial, gdouble value) { if(!AGS_IS_DIAL(dial)){ return; } gtk_adjustment_set_value(dial->adjustment, value); gtk_widget_queue_draw(dial); } /** * ags_dial_new: * * Creates an #AgsDial * * Returns: a new #AgsDial * * Since: 1.0.0 */ AgsDial* ags_dial_new() { AgsDial *dial; GtkAdjustment *adjustment; adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); dial = (AgsDial *) g_object_new(AGS_TYPE_DIAL, "adjustment", adjustment, NULL); return(dial); } gsequencer-1.4.24/ags/widget/ags_scrolled_piano.c0000644000175000017500000002330613247044247016727 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_scrolled_piano_class_init(AgsScrolledPianoClass *scrolled_piano); void ags_scrolled_piano_init(AgsScrolledPiano *scrolled_piano); void ags_scrolled_piano_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_scrolled_piano_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_scrolled_piano_finalize(GObject *gobject); void ags_scrolled_piano_size_allocate(GtkWidget *widget, GtkAllocation *allocation); void ags_scrolled_piano_size_request(GtkWidget *widget, GtkRequisition *requisition); /** * SECTION:ags_scrolled_piano * @short_description: scrolled piano widget * @title: AgsScrolledPiano * @section_id: * @include: ags/widget/ags_scrolled_piano.h * * The #AgsScrolledPiano lets you to have a scrolled piano widget. */ enum{ PROP_0, PROP_MARGIN_TOP, PROP_MARGIN_BOTTOM, PROP_MARGIN_LEFT, PROP_MARGIN_RIGHT, }; static gpointer ags_scrolled_piano_parent_class = NULL; GType ags_scrolled_piano_get_type(void) { static GType ags_type_scrolled_piano = 0; if(!ags_type_scrolled_piano){ static const GTypeInfo ags_scrolled_piano_info = { sizeof (AgsScrolledPianoClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_scrolled_piano_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsScrolledPiano), 0, /* n_preallocs */ (GInstanceInitFunc) ags_scrolled_piano_init, }; ags_type_scrolled_piano = g_type_register_static(GTK_TYPE_BIN, "AgsScrolledPiano", &ags_scrolled_piano_info, 0); } return(ags_type_scrolled_piano); } void ags_scrolled_piano_class_init(AgsScrolledPianoClass *scrolled_piano) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_scrolled_piano_parent_class = g_type_class_peek_parent(scrolled_piano); /* GObjectClass */ gobject = (GObjectClass *) scrolled_piano; gobject->set_property = ags_scrolled_piano_set_property; gobject->get_property = ags_scrolled_piano_get_property; gobject->finalize = ags_scrolled_piano_finalize; /* properties */ /** * AgsScrolledPiano:margin-top: * * The margin top. * * Since: 1.2.0 */ param_spec = g_param_spec_uint("margin-top", "margin top", "The margin top", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_TOP, param_spec); /** * AgsScrolledPiano:margin-bottom: * * The margin bottom. * * Since: 1.2.0 */ param_spec = g_param_spec_uint("margin-bottom", "margin bottom", "The margin bottom", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_BOTTOM, param_spec); /** * AgsScrolledPiano:margin-left: * * The margin left. * * Since: 1.2.0 */ param_spec = g_param_spec_uint("margin-left", "margin left", "The margin left", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_LEFT, param_spec); /** * AgsScrolledPiano:margin-right: * * The margin right. * * Since: 1.2.0 */ param_spec = g_param_spec_uint("margin-right", "margin right", "The margin right", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_RIGHT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) scrolled_piano; widget->size_request = ags_scrolled_piano_size_request; widget->size_allocate = ags_scrolled_piano_size_allocate; } void ags_scrolled_piano_init(AgsScrolledPiano *scrolled_piano) { scrolled_piano->margin_top = 0; scrolled_piano->margin_bottom = 0; scrolled_piano->margin_left = 0; scrolled_piano->margin_right = 0; /* viewport */ scrolled_piano->viewport = gtk_viewport_new(NULL, NULL); g_object_set(scrolled_piano->viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_container_add(scrolled_piano, scrolled_piano->viewport); /* piano */ scrolled_piano->piano = ags_piano_new(); gtk_container_add(scrolled_piano->viewport, scrolled_piano->piano); } void ags_scrolled_piano_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsScrolledPiano *scrolled_piano; scrolled_piano = AGS_SCROLLED_PIANO(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { scrolled_piano->margin_top = g_value_get_uint(value); } break; case PROP_MARGIN_BOTTOM: { scrolled_piano->margin_bottom = g_value_get_uint(value); } break; case PROP_MARGIN_LEFT: { scrolled_piano->margin_left = g_value_get_uint(value); } break; case PROP_MARGIN_RIGHT: { scrolled_piano->margin_right = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_piano_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsScrolledPiano *scrolled_piano; scrolled_piano = AGS_SCROLLED_PIANO(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { g_value_set_uint(value, scrolled_piano->margin_top); } break; case PROP_MARGIN_BOTTOM: { g_value_set_uint(value, scrolled_piano->margin_bottom); } break; case PROP_MARGIN_LEFT: { g_value_set_uint(value, scrolled_piano->margin_left); } break; case PROP_MARGIN_RIGHT: { g_value_set_uint(value, scrolled_piano->margin_right); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_piano_finalize(GObject *gobject) { AgsScrolledPiano *scrolled_piano; scrolled_piano = AGS_SCROLLED_PIANO(gobject); /* call parent */ G_OBJECT_CLASS(ags_scrolled_piano_parent_class)->finalize(gobject); } void ags_scrolled_piano_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsScrolledPiano *scrolled_piano; GtkAllocation child_allocation; scrolled_piano = AGS_SCROLLED_PIANO(widget); widget->allocation = *allocation; if(scrolled_piano->piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ widget->allocation.width = scrolled_piano->piano->key_width + (scrolled_piano->margin_left + scrolled_piano->margin_right); }else if(scrolled_piano->piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ widget->allocation.height = scrolled_piano->piano->key_width + (scrolled_piano->margin_top + scrolled_piano->margin_bottom); } /* viewport allocation */ child_allocation.x = allocation->x + scrolled_piano->margin_left; child_allocation.y = allocation->y + scrolled_piano->margin_top; if(scrolled_piano->piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ child_allocation.width = scrolled_piano->piano->key_width; if(widget->allocation.height > (scrolled_piano->margin_top + scrolled_piano->margin_bottom)){ child_allocation.height = widget->allocation.height - (scrolled_piano->margin_top + scrolled_piano->margin_bottom); }else{ child_allocation.height = 0; } }else if(scrolled_piano->piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ if(widget->allocation.width > (scrolled_piano->margin_left + scrolled_piano->margin_right)){ child_allocation.width = widget->allocation.width - (scrolled_piano->margin_left + scrolled_piano->margin_right); }else{ child_allocation.width = 0; } child_allocation.height = scrolled_piano->piano->key_width; } gtk_widget_size_allocate((GtkWidget *) scrolled_piano->viewport, &child_allocation); } void ags_scrolled_piano_size_request(GtkWidget *widget, GtkRequisition *requisition) { AgsScrolledPiano *scrolled_piano; GtkRequisition child_requisition; scrolled_piano = AGS_SCROLLED_PIANO(widget); if(scrolled_piano->piano->layout == AGS_PIANO_LAYOUT_VERTICAL){ requisition->width = scrolled_piano->piano->key_width + (scrolled_piano->margin_left + scrolled_piano->margin_right); requisition->height = -1; }else if(scrolled_piano->piano->layout == AGS_PIANO_LAYOUT_HORIZONTAL){ requisition->width = -1; requisition->height = scrolled_piano->piano->key_width + (scrolled_piano->margin_top + scrolled_piano->margin_bottom); } gtk_widget_size_request((GtkWidget *) gtk_bin_get_child(scrolled_piano), &child_requisition); } /** * ags_scrolled_piano_new: * * Create a new #AgsScrolledPiano. * * Returns: a new #AgsScrolledPiano * * Since: 1.2.0 */ AgsScrolledPiano* ags_scrolled_piano_new() { AgsScrolledPiano *scrolled_piano; scrolled_piano = (AgsScrolledPiano *) g_object_new(AGS_TYPE_SCROLLED_PIANO, NULL); return(scrolled_piano); } gsequencer-1.4.24/ags/widget/ags_vscale_box.h0000644000175000017500000000352213247044247016062 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_VSCALE_BOX_H__ #define __AGS_VSCALE_BOX_H__ #include #include #include #include #define AGS_TYPE_VSCALE_BOX (ags_vscale_box_get_type()) #define AGS_VSCALE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_VSCALE_BOX, AgsVScaleBox)) #define AGS_VSCALE_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_VSCALE_BOX, AgsVScaleBoxClass)) #define AGS_IS_VSCALE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_VSCALE_BOX)) #define AGS_IS_VSCALE_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_VSCALE_BOX)) #define AGS_VSCALE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_VSCALE_BOX, AgsVScaleBoxClass)) typedef struct _AgsVScaleBox AgsVScaleBox; typedef struct _AgsVScaleBoxClass AgsVScaleBoxClass; struct _AgsVScaleBox { AgsScaleBox scale_box; }; struct _AgsVScaleBoxClass { AgsScaleBoxClass scale_box; }; GType ags_vscale_box_get_type(void); AgsVScaleBox* ags_vscale_box_new(); #endif /*__AGS_VSCALE_BOX_H__*/ gsequencer-1.4.24/ags/widget/ags_level_box.c0000644000175000017500000001321313247044247015705 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_level_box_class_init(AgsLevelBoxClass *level_box); void ags_level_box_init(AgsLevelBox *level_box); void ags_level_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_level_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_level_box_finalize(GObject *gobject); GType ags_level_box_child_type(GtkContainer *container); /** * SECTION:ags_level_box * @short_description: abstract box widget * @title: AgsLevelBox * @section_id: * @include: ags/widget/ags_level_box.h * * The #AgsLevelBox is an abstract box widget containing #AgsLevel. */ enum{ PROP_0, PROP_FIXED_LEVEL_WIDTH, PROP_FIXED_LEVEL_HEIGHT, }; static gpointer ags_level_box_parent_class = NULL; GType ags_level_box_get_type(void) { static GType ags_type_level_box = 0; if(!ags_type_level_box){ static const GTypeInfo ags_level_box_info = { sizeof (AgsLevelBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_level_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLevelBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_level_box_init, }; ags_type_level_box = g_type_register_static(GTK_TYPE_BOX, "AgsLevelBox", &ags_level_box_info, 0); } return(ags_type_level_box); } void ags_level_box_class_init(AgsLevelBoxClass *level_box) { GObjectClass *gobject; GtkWidgetClass *widget; GtkContainerClass *container; GParamSpec *param_spec; ags_level_box_parent_class = g_type_class_peek_parent(level_box); /* GObjectClass */ gobject = (GObjectClass *) level_box; gobject->set_property = ags_level_box_set_property; gobject->get_property = ags_level_box_get_property; gobject->finalize = ags_level_box_finalize; /* properties */ /** * AgsLevelBox:fixed-level-width: * * The fixed width of a level. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("fixed-level-width", "fixed level width", "The fixed width of a level", 0, G_MAXUINT, AGS_LEVEL_BOX_DEFAULT_FIXED_LEVEL_WIDTH, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIXED_LEVEL_WIDTH, param_spec); /** * AgsLevelBox:fixed-level-height: * * The fixed height of a level. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("fixed-level-height", "fixed level height", "The fixed height of a level", 0, G_MAXUINT, AGS_LEVEL_BOX_DEFAULT_FIXED_LEVEL_HEIGHT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIXED_LEVEL_HEIGHT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) level_box; /* GtkContainerClass */ container = (GtkWidgetClass *) level_box; container->child_type = ags_level_box_child_type; } void ags_level_box_init(AgsLevelBox *level_box) { g_object_set(level_box, "homogeneous", FALSE, "spacing", 0, NULL); level_box->flags = 0; level_box->fixed_level_width = AGS_LEVEL_BOX_DEFAULT_FIXED_LEVEL_WIDTH; level_box->fixed_level_height = AGS_LEVEL_BOX_DEFAULT_FIXED_LEVEL_HEIGHT; } void ags_level_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLevelBox *level_box; level_box = AGS_LEVEL_BOX(gobject); switch(prop_id){ case PROP_FIXED_LEVEL_WIDTH: { level_box->fixed_level_width = g_value_get_uint(value); } break; case PROP_FIXED_LEVEL_HEIGHT: { level_box->fixed_level_height = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_level_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLevelBox *level_box; level_box = AGS_LEVEL_BOX(gobject); switch(prop_id){ case PROP_FIXED_LEVEL_WIDTH: { g_value_set_uint(value, level_box->fixed_level_width); } break; case PROP_FIXED_LEVEL_HEIGHT: { g_value_set_uint(value, level_box->fixed_level_height); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_level_box_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_level_box_parent_class)->finalize(gobject); } GType ags_level_box_child_type(GtkContainer *container) { return(AGS_TYPE_LEVEL); } /** * ags_level_box_new: * * Create a new instance of #AgsLevelBox. * * Returns: the new #AgsLevelBox instance * * Since: 1.4.0 */ AgsLevelBox* ags_level_box_new() { AgsLevelBox *level_box; level_box = (AgsLevelBox *) g_object_new(AGS_TYPE_LEVEL_BOX, NULL); return(level_box); } gsequencer-1.4.24/ags/widget/ags_htimebar.c0000644000175000017500000000144713246707333015530 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/widget/ags_expander_set.h0000644000175000017500000000565313246707333016426 00000000000000/* 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 . */ #ifndef __AGS_EXPANDER_SET_H__ #define __AGS_EXPANDER_SET_H__ #include #include #include #define AGS_TYPE_EXPANDER_SET (ags_expander_set_get_type()) #define AGS_EXPANDER_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EXPANDER_SET, AgsExpanderSet)) #define AGS_EXPANDER_SET_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EXPANDER_SET, AgsExpanderSetClass)) #define AGS_IS_EXPANDER_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_EXPANDER_SET)) #define AGS_IS_EXPANDER_SET_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_EXPANDER_SET)) #define AGS_EXPANDER_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_EXPANDER_SET, AgsExpanderSetClass)) #define AGS_EXPANDER_SET_CHILD(ptr) ((AgsExpanderSetChild *)(ptr)) typedef struct _AgsExpanderSet AgsExpanderSet; typedef struct _AgsExpanderSetClass AgsExpanderSetClass; typedef struct _AgsExpanderSetChild AgsExpanderSetChild; typedef enum{ AGS_EXPANDER_SET_DRAW_GHOST = 1, AGS_EXPANDER_SET_DRAW_LEFT_ENDING = 1 << 1, AGS_EXPANDER_SET_DRAW_RIGHT_ENDING = 1 << 2, AGS_EXPANDER_SET_DRAW_LEFT_CONNECTOR = 1 << 3, AGS_EXPANDER_SET_DRAW_RIGHT_CONNECTOR = 1 << 4, }AgsExpanderSetFlags; struct _AgsExpanderSet { GtkTable table; guint flags; GList *ghost; GList *location; }; struct _AgsExpanderSetClass { GtkTableClass table; }; struct _AgsExpanderSetChild { GtkWidget *child; guint x; guint y; guint width; guint height; }; GType ags_expander_set_get_type(void); AgsExpanderSetChild* ags_expander_set_child_alloc(guint x, guint y, guint width, guint height); AgsExpanderSetChild* ags_expander_set_child_find(AgsExpanderSet *expander_set, GtkWidget *child); void ags_expander_set_set_flags(AgsExpanderSet *expander_set, guint flags); void ags_expander_set_add(AgsExpanderSet *expander_set, GtkWidget *widget, guint x, guint y, guint width, guint height); void ags_expander_set_remove(AgsExpanderSet *expander_set, GtkWidget *widget); AgsExpanderSet* ags_expander_set_new(guint width, guint height); #endif /*__AGS_EXPANDER_SET_H__*/ gsequencer-1.4.24/ags/widget/ags_hled_array.h0000644000175000017500000000350613246707333016052 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_HLED_ARRAY_H__ #define __AGS_HLED_ARRAY_H__ #include #include #include #include "ags_led_array.h" #define AGS_TYPE_HLED_ARRAY (ags_hled_array_get_type()) #define AGS_HLED_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_HLED_ARRAY, AgsHLedArray)) #define AGS_HLED_ARRAY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_HLED_ARRAY, AgsHLedArrayClass)) #define AGS_IS_HLED_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_HLED_ARRAY)) #define AGS_IS_HLED_ARRAY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_HLED_ARRAY)) #define AGS_HLED_ARRAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_HLED_ARRAY, AgsHLedArrayClass)) typedef struct _AgsHLedArray AgsHLedArray; typedef struct _AgsHLedArrayClass AgsHLedArrayClass; struct _AgsHLedArray { AgsLedArray led_array; }; struct _AgsHLedArrayClass { AgsLedArrayClass led_array; }; GType ags_hled_array_get_type(void); AgsHLedArray* ags_hled_array_new(); #endif /*__AGS_HLED_ARRAY_H__*/ gsequencer-1.4.24/ags/widget/ags_hlevel_box.c0000644000175000017500000000453513247044247016064 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_hlevel_box_class_init(AgsHLevelBoxClass *hlevel_box); void ags_hlevel_box_init(AgsHLevelBox *hlevel_box); /** * SECTION:ags_hlevel_box * @short_description: horizontal box widget * @title: AgsHLevelBox * @section_id: * @include: ags/widget/ags_hlevel_box.h * * The #AgsHLevelBox is an horizontal box widget containing #AgsLevel. */ static gpointer ags_hlevel_box_parent_class = NULL; GType ags_hlevel_box_get_type(void) { static GType ags_type_hlevel_box = 0; if(!ags_type_hlevel_box){ static const GTypeInfo ags_hlevel_box_info = { sizeof (AgsHLevelBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_hlevel_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsHLevelBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_hlevel_box_init, }; ags_type_hlevel_box = g_type_register_static(AGS_TYPE_LEVEL_BOX, "AgsHLevelBox", &ags_hlevel_box_info, 0); } return(ags_type_hlevel_box); } void ags_hlevel_box_class_init(AgsHLevelBoxClass *hlevel_box) { } void ags_hlevel_box_init(AgsHLevelBox *hlevel_box) { gtk_orientable_set_orientation(GTK_ORIENTABLE(hlevel_box), GTK_ORIENTATION_HORIZONTAL); } /** * ags_hlevel_box_new: * * Create a new instance of #AgsHLevelBox. * * Returns: the new #AgsHLevelBox instance * * Since: 1.4.0 */ AgsHLevelBox* ags_hlevel_box_new() { AgsHLevelBox *hlevel_box; hlevel_box = (AgsHLevelBox *) g_object_new(AGS_TYPE_HLEVEL_BOX, NULL); return(hlevel_box); } gsequencer-1.4.24/ags/widget/ags_timebar.h0000644000175000017500000000326113246707333015361 00000000000000/* 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 . */ #ifndef __AGS_TIMEBAR_H__ #define __AGS_TIMEBAR_H__ #include #include #include #define AGS_TYPE_TIMEBAR (ags_timebar_get_type()) #define AGS_TIMEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TIMEBAR, AgsTimebar)) #define AGS_TIMEBAR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TIMEBAR, AgsTimebarClass)) #define AGS_IS_TIMEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_TIMEBAR)) #define AGS_IS_TIMEBAR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_TIMEBAR)) #define AGS_TIMEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_TIMEBAR, AgsTimebarClass)) typedef struct _AgsTimebar AgsTimebar; typedef struct _AgsTimebarClass AgsTimebarClass; struct _AgsTimebar { GtkRange range; }; struct _AgsTimebarClass { GtkRangeClass range; }; AgsTimebar* ags_timebar_new(); #endif /*__AGS_TIMEBAR_H__*/ gsequencer-1.4.24/ags/widget/ags_vlevel_box.c0000644000175000017500000000444213247044247016077 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_vlevel_box_class_init(AgsVLevelBoxClass *vlevel_box); void ags_vlevel_box_init(AgsVLevelBox *vlevel_box); /** * SECTION:ags_vlevel_box * @short_description: vertical box widget * @title: AgsVLevelBox * @section_id: * @include: ags/widget/ags_vlevel_box.h * * The #AgsVLevelBox is an vertical box widget containing #AgsLevel. */ GType ags_vlevel_box_get_type(void) { static GType ags_type_vlevel_box = 0; if(!ags_type_vlevel_box){ static const GTypeInfo ags_vlevel_box_info = { sizeof (AgsVLevelBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_vlevel_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsVLevelBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_vlevel_box_init, }; ags_type_vlevel_box = g_type_register_static(AGS_TYPE_LEVEL_BOX, "AgsVLevelBox", &ags_vlevel_box_info, 0); } return(ags_type_vlevel_box); } void ags_vlevel_box_class_init(AgsVLevelBoxClass *vlevel_box) { } void ags_vlevel_box_init(AgsVLevelBox *vlevel_box) { gtk_orientable_set_orientation(GTK_ORIENTABLE(vlevel_box), GTK_ORIENTATION_VERTICAL); } /** * ags_vlevel_box_new: * * Create a new instance of #AgsVLevelBox. * * Returns: the new #AgsVLevelBox instance * * Since: 1.4.0 */ AgsVLevelBox* ags_vlevel_box_new() { AgsVLevelBox *vlevel_box; vlevel_box = (AgsVLevelBox *) g_object_new(AGS_TYPE_VLEVEL_BOX, NULL); return(vlevel_box); } gsequencer-1.4.24/ags/widget/ags_cartesian.h0000644000175000017500000001643213246707333015713 00000000000000/* 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 . */ #ifndef __AGS_CARTESIAN_H__ #define __AGS_CARTESIAN_H__ #include #include #include #include #define AGS_TYPE_CARTESIAN (ags_cartesian_get_type()) #define AGS_CARTESIAN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CARTESIAN, AgsCartesian)) #define AGS_CARTESIAN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CARTESIAN, AgsCartesianClass)) #define AGS_IS_CARTESIAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CARTESIAN)) #define AGS_IS_CARTESIAN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CARTESIAN)) #define AGS_CARTESIAN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CARTESIAN, AgsCartesianClass)) #define AGS_PLOT(ptr) ((AgsPlot *)(ptr)) #define AGS_CARTESIAN_STEP_CONVERSION_FUNC(current, is_abscissae, data) ((AgsCartesianStepConversionFunc)(current, is_abscissae, data)) #define AGS_CARTESIAN_TRANSLATE_FUNCT(x, y, ret_x, ret_y, data) ((AgsCartesianTranslateFunc)(x, y, ret_x, ret_y, data)) #define AGS_CARTESIAN_SCALE_FUNC(value, data) ((AgsCartesianScaleFunc)(value, data)) #define AGS_CARTESIAN_LABEL_FUNC(value, data) ((AgsCartesianLabelFunc)(value, data)) #define AGS_CARTESIAN_DEFAULT_X_MARGIN (24.0) #define AGS_CARTESIAN_DEFAULT_Y_MARGIN (24.0) #define AGS_CARTESIAN_DEFAULT_X_STEP_WIDTH (10.0) #define AGS_CARTESIAN_DEFAULT_Y_STEP_HEIGHT (10.0) #define AGS_CARTESIAN_DEFAULT_X_SCALE_STEP_WIDTH (10.0) #define AGS_CARTESIAN_DEFAULT_Y_SCALE_STEP_HEIGHT (10.0) #define AGS_CARTESIAN_DEFAULT_X_STEP (1.0) #define AGS_CARTESIAN_DEFAULT_Y_STEP (1.0) #define AGS_CARTESIAN_DEFAULT_X_START (-60.0) #define AGS_CARTESIAN_DEFAULT_X_END (199.0) #define AGS_CARTESIAN_DEFAULT_Y_START (-70.0) #define AGS_CARTESIAN_DEFAULT_Y_END (99.0) #define AGS_CARTESIAN_DEFAULT_X_LABEL_START (10.0) #define AGS_CARTESIAN_DEFAULT_X_LABEL_STEP_WIDTH (50.0) #define AGS_CARTESIAN_DEFAULT_Y_LABEL_START (20.0) #define AGS_CARTESIAN_DEFAULT_Y_LABEL_STEP_HEIGHT (50.0) typedef struct _AgsCartesian AgsCartesian; typedef struct _AgsCartesianClass AgsCartesianClass; typedef struct _AgsPlot AgsPlot; typedef gdouble (*AgsCartesianStepConversionFunc)(gdouble current, gboolean is_abscissae, gpointer data); typedef void (*AgsCartesianTranslateFunc)(gdouble x, gdouble y, gdouble *ret_x, gdouble *ret_y, gpointer data); typedef gdouble (*AgsCartesianScaleFunc)(gdouble value, gpointer data); typedef gchar* (*AgsCartesianLabelFunc)(gdouble value, gpointer data); typedef enum{ AGS_CARTESIAN_ABSCISSAE = 1, AGS_CARTESIAN_ORDINATE = 1 << 1, AGS_CARTESIAN_X_SCALE = 1 << 2, AGS_CARTESIAN_Y_SCALE = 1 << 3, AGS_CARTESIAN_X_UNIT = 1 << 4, AGS_CARTESIAN_Y_UNIT = 1 << 5, AGS_CARTESIAN_X_LABEL = 1 << 6, AGS_CARTESIAN_Y_LABEL = 1 << 7, }AgsCartesianFlags; typedef enum{ AGS_PLOT_FILL_REPLACE = 1, //TODO:JK: implement me AGS_PLOT_FILL_ADDITIVE = 1 << 1, }AgsPlotFillFlags; struct _AgsCartesian { GtkWidget widget; guint flags; gdouble x_margin; gdouble y_margin; gdouble center; gdouble line_width; gdouble point_radius; gdouble font_size; gdouble x_step_width; gdouble y_step_height; gdouble x_scale_step_width; gdouble y_scale_step_height; gdouble x_step; gdouble y_step; gdouble x_start; gdouble x_end; gdouble y_start; gdouble y_end; gdouble x_unit_x0; gdouble x_unit_y0; gdouble x_unit_size; gchar *x_unit; gdouble y_unit_x0; gdouble y_unit_y0; gdouble y_unit_size; gchar *y_unit; gdouble x_label_start; gdouble x_label_step_width; gchar **x_label; gdouble y_label_start; gdouble y_label_step_height; gchar **y_label; gdouble (*step_conversion_func)(gdouble current, gboolean is_abscissae, gpointer data); void (*translate_func)(gdouble x, gdouble y, gdouble *ret_x, gdouble *ret_y, gpointer data); gdouble (*x_small_scale_func)(gdouble value, gpointer data); gdouble (*x_big_scale_func)(gdouble value, gpointer data); gdouble (*y_small_scale_func)(gdouble value, gpointer data); gdouble (*y_big_scale_func)(gdouble value, gpointer data); gchar* (*x_label_func)(gdouble value, gpointer data); gchar* (*y_label_func)(gdouble value, gpointer data); gpointer x_step_data; gdouble x_step_factor; gpointer y_step_data; gdouble y_step_factor; gpointer translate_data; gdouble x_translate_point; gdouble y_translate_point; gpointer x_scale_data; gdouble x_small_scale_factor; gdouble x_big_scale_factor; gpointer y_scale_data; gdouble y_small_scale_factor; gdouble y_big_scale_factor; gpointer x_label_data; gdouble x_label_factor; gdouble x_label_precision; gpointer y_label_data; gdouble y_label_factor; gdouble y_label_precision; cairo_surface_t *surface; GList *plot; }; struct _AgsCartesianClass { GtkWidgetClass widget; }; struct _AgsPlot { guint fill_flags; guint n_points; gboolean join_points; gdouble **point; gdouble **point_color; gchar **point_label; guint n_bitmaps; unsigned char **bitmap; gdouble **bitmap_color; guint n_pixmaps; gdouble ***pixmap; }; GType ags_cartesian_get_type(void); /* plot data */ AgsPlot* ags_plot_alloc(guint n_points, guint n_bitmaps, guint n_pixmaps); void ags_plot_free(AgsPlot *plot); void ags_cartesian_add_plot(AgsCartesian *cartesian, AgsPlot *plot); void ags_cartesian_remove_plot(AgsCartesian *cartesian, AgsPlot *plot); /* predefined linear system */ gdouble ags_cartesian_linear_step_conversion_func(gdouble current, gboolean is_abscissae, gpointer data); void ags_cartesian_linear_translate_func(gdouble x, gdouble y, gdouble *ret_x, gdouble *ret_y, gpointer data); gdouble ags_cartesian_linear_x_small_scale_func(gdouble value, gpointer data); gdouble ags_cartesian_linear_x_big_scale_func(gdouble value, gpointer data); gdouble ags_cartesian_linear_y_small_scale_func(gdouble value, gpointer data); gdouble ags_cartesian_linear_y_big_scale_func(gdouble value, gpointer data); gchar* ags_cartesian_linear_x_label_func(gdouble value, gpointer data); gchar* ags_cartesian_linear_y_label_func(gdouble value, gpointer data); /* label functions */ void ags_cartesian_reallocate_label(AgsCartesian *cartesian, gboolean do_x_label); void ags_cartesian_fill_label(AgsCartesian *cartesian, gboolean do_x_label); AgsCartesian* ags_cartesian_new(); #endif /*__AGS_CARTESIAN_H__*/ gsequencer-1.4.24/ags/widget/ags_vled_array.c0000644000175000017500000000465313246707333016067 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include "ags_vled_array.h" void ags_vled_array_class_init(AgsVLedArrayClass *vled_array); void ags_vled_array_init(AgsVLedArray *vled_array); /** * SECTION:ags_vled_array * @short_description: A vertical led array widget * @title: AgsVLedArray * @section_id: * @include: ags/widget/ags_vled_array.h * * #AgsVLedArray is a widget representing an array of vertical leds. */ static gpointer ags_vled_array_parent_class = NULL; GType ags_vled_array_get_type(void) { static GType ags_type_vled_array = 0; if(!ags_type_vled_array){ static const GTypeInfo ags_vled_array_info = { sizeof(AgsVLedArrayClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_vled_array_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsVLedArray), 0, /* n_preallocs */ (GInstanceInitFunc) ags_vled_array_init, }; ags_type_vled_array = g_type_register_static(AGS_TYPE_LED_ARRAY, "AgsVLedArray\0", &ags_vled_array_info, 0); } return(ags_type_vled_array); } void ags_vled_array_class_init(AgsVLedArrayClass *vled_array) { /* empty */ } void ags_vled_array_init(AgsVLedArray *vled_array) { AGS_LED_ARRAY(vled_array)->box = gtk_vbox_new(FALSE, 0); gtk_container_add(vled_array, AGS_LED_ARRAY(vled_array)->box); gtk_widget_show(AGS_LED_ARRAY(vled_array)->box); } /** * ags_vled_array_new: * * Creates an #AgsVLedArray. * * Returns: a new #AgsVLedArray * * Since: 1.0.0.7 */ AgsVLedArray* ags_vled_array_new() { AgsVLedArray *vled_array; vled_array = (AgsVLedArray *) g_object_new(AGS_TYPE_VLED_ARRAY, NULL); return(vled_array); } gsequencer-1.4.24/ags/widget/ags_indicator.c0000644000175000017500000001714213247044247015707 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include "ags_indicator.h" void ags_indicator_class_init(AgsIndicatorClass *indicator); void ags_indicator_init(AgsIndicator *indicator); void ags_indicator_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_indicator_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_indicator_show(GtkWidget *widget); void ags_indicator_map(GtkWidget *widget); void ags_indicator_realize(GtkWidget *widget); void ags_indicator_size_request(GtkWidget *widget, GtkRequisition *requisition); void ags_indicator_size_allocate(GtkWidget *widget, GtkAllocation *allocation); /** * SECTION:ags_indicator * @short_description: A indicator widget * @title: AgsIndicator * @section_id: * @include: ags/widget/ags_indicator.h * * #AgsIndicator is a widget representing a #GtkAdjustment. */ enum{ PROP_0, PROP_ADJUSTMENT, }; static gpointer ags_indicator_parent_class = NULL; GType ags_indicator_get_type(void) { static GType ags_type_indicator = 0; if(!ags_type_indicator){ static const GTypeInfo ags_indicator_info = { sizeof(AgsIndicatorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_indicator_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsIndicator), 0, /* n_preallocs */ (GInstanceInitFunc) ags_indicator_init, }; ags_type_indicator = g_type_register_static(GTK_TYPE_WIDGET, "AgsIndicator\0", &ags_indicator_info, 0); } return(ags_type_indicator); } void ags_indicator_class_init(AgsIndicatorClass *indicator) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_indicator_parent_class = g_type_class_peek_parent(indicator); /* GObjectClass */ gobject = (GObjectClass *) indicator; gobject->set_property = ags_indicator_set_property; gobject->get_property = ags_indicator_get_property; /* GtkWidgetClass */ widget = (GtkWidgetClass *) indicator; widget->realize = ags_indicator_realize; widget->size_request = ags_indicator_size_request; widget->size_allocate = ags_indicator_size_allocate; widget->show = ags_indicator_show; /* properties */ /** * AgsIndicator:adjustment: * * The adjustment giving indicator value. * * Since: 1.0.0 */ param_spec = g_param_spec_object("adjustment\0", "assigned adjustment\0", "The adjustment it is assigned with\0", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ADJUSTMENT, param_spec); } void ags_indicator_init(AgsIndicator *indicator) { g_object_set(G_OBJECT(indicator), "app-paintable\0", TRUE, NULL); indicator->adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 10.0, 1.0, 1.0, 10.0); g_object_ref(indicator->adjustment); } void ags_indicator_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsIndicator *indicator; indicator = AGS_INDICATOR(gobject); switch(prop_id){ case PROP_ADJUSTMENT: { GtkAdjustment *adjustment; adjustment = (GtkAdjustment *) g_value_get_object(value); if(indicator->adjustment == adjustment){ return; } if(indicator->adjustment != NULL){ g_object_unref(G_OBJECT(indicator->adjustment)); } if(adjustment != NULL){ g_object_ref(G_OBJECT(adjustment)); } indicator->adjustment = adjustment; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_indicator_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsIndicator *indicator; indicator = AGS_INDICATOR(gobject); switch(prop_id){ case PROP_ADJUSTMENT: { g_value_set_object(value, indicator->adjustment); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_indicator_map(GtkWidget *widget) { if (gtk_widget_get_realized (widget) && !gtk_widget_get_mapped (widget)) { GTK_WIDGET_CLASS (ags_indicator_parent_class)->map(widget); gdk_window_show(widget->window); // ags_indicator_draw(widget); } } void ags_indicator_realize(GtkWidget *widget) { AgsIndicator *indicator; GdkWindowAttr attributes; gint attributes_mask; gint buttons_width; gint border_left, border_top; g_return_if_fail (widget != NULL); g_return_if_fail (AGS_IS_INDICATOR (widget)); indicator = AGS_INDICATOR(widget); gtk_widget_set_realized (widget, TRUE); /* */ attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; attributes.window_type = GDK_WINDOW_CHILD; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); widget->window = gdk_window_new(gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data(widget->window, indicator); widget->style = gtk_style_attach(widget->style, widget->window); gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); gtk_widget_queue_resize (widget); } void ags_indicator_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_indicator_parent_class)->show(widget); } void ags_indicator_size_request(GtkWidget *widget, GtkRequisition *requisition) { GTK_WIDGET_CLASS(ags_indicator_parent_class)->size_request(widget, requisition); /* implement me */ //TODO:JK: } void ags_indicator_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { GTK_WIDGET_CLASS(ags_indicator_parent_class)->size_allocate(widget, allocation); /* implement me */ //TODO:JK: } /** * ags_indicator_new: * * Creates an #AgsIndicator. Note, use rather its implementation #AgsVIndicator or * #AgsHIndicator. * * Returns: a new #AgsIndicator * * Since: 1.0.0 */ AgsIndicator* ags_indicator_new() { AgsIndicator *indicator; indicator = (AgsIndicator *) g_object_new(AGS_TYPE_INDICATOR, NULL); return(indicator); } gsequencer-1.4.24/ags/widget/ags_indicator.h0000644000175000017500000000345413246707333015716 00000000000000/* 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 . */ #ifndef __AGS_INDICATOR_H__ #define __AGS_INDICATOR_H__ #include #include #include #define AGS_TYPE_INDICATOR (ags_indicator_get_type()) #define AGS_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_INDICATOR, AgsIndicator)) #define AGS_INDICATOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_INDICATOR, AgsIndicatorClass)) #define AGS_IS_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_INDICATOR)) #define AGS_IS_INDICATOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_INDICATOR)) #define AGS_INDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_INDICATOR, AgsIndicatorClass)) typedef struct _AgsIndicator AgsIndicator; typedef struct _AgsIndicatorClass AgsIndicatorClass; struct _AgsIndicator { GtkWidget widget; GtkAdjustment *adjustment; }; struct _AgsIndicatorClass { GtkWidgetClass widget; }; GType ags_indicator_get_type(void); AgsIndicator* ags_indicator_new(); #endif /*__AGS_INDICATOR_H__*/ gsequencer-1.4.24/ags/widget/ags_hlevel_box.h0000644000175000017500000000352213247044247016064 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_HLEVEL_BOX_H__ #define __AGS_HLEVEL_BOX_H__ #include #include #include #include #define AGS_TYPE_HLEVEL_BOX (ags_hlevel_box_get_type()) #define AGS_HLEVEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_HLEVEL_BOX, AgsHLevelBox)) #define AGS_HLEVEL_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_HLEVEL_BOX, AgsHLevelBoxClass)) #define AGS_IS_HLEVEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_HLEVEL_BOX)) #define AGS_IS_HLEVEL_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_HLEVEL_BOX)) #define AGS_HLEVEL_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_HLEVEL_BOX, AgsHLevelBoxClass)) typedef struct _AgsHLevelBox AgsHLevelBox; typedef struct _AgsHLevelBoxClass AgsHLevelBoxClass; struct _AgsHLevelBox { AgsLevelBox level_box; }; struct _AgsHLevelBoxClass { AgsLevelBoxClass level_box; }; GType ags_hlevel_box_get_type(void); AgsHLevelBox* ags_hlevel_box_new(); #endif /*__AGS_HLEVEL_BOX_H__*/ gsequencer-1.4.24/ags/widget/ags_level_box.h0000644000175000017500000000377013247044247015721 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LEVEL_BOX_H__ #define __AGS_LEVEL_BOX_H__ #include #include #include #define AGS_TYPE_LEVEL_BOX (ags_level_box_get_type()) #define AGS_LEVEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LEVEL_BOX, AgsLevelBox)) #define AGS_LEVEL_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LEVEL_BOX, AgsLevelBoxClass)) #define AGS_IS_LEVEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LEVEL_BOX)) #define AGS_IS_LEVEL_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LEVEL_BOX)) #define AGS_LEVEL_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_LEVEL_BOX, AgsLevelBoxClass)) #define AGS_LEVEL_BOX_DEFAULT_FIXED_LEVEL_WIDTH (60) #define AGS_LEVEL_BOX_DEFAULT_FIXED_LEVEL_HEIGHT (128) typedef struct _AgsLevelBox AgsLevelBox; typedef struct _AgsLevelBoxClass AgsLevelBoxClass; typedef enum{ AGS_LEVEL_BOX_FIXED_LEVEL_SIZE = 1, }AgsLevelBoxFlags; struct _AgsLevelBox { GtkBox box; guint flags; guint fixed_level_width; guint fixed_level_height; }; struct _AgsLevelBoxClass { GtkBoxClass box; }; GType ags_level_box_get_type(void); AgsLevelBox* ags_level_box_new(); #endif /*__AGS_LEVEL_BOX_H__*/ gsequencer-1.4.24/ags/widget/ags_dial.h0000644000175000017500000000606313246707333014652 00000000000000/* 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 . */ #ifndef __AGS_DIAL_H__ #define __AGS_DIAL_H__ #include #include #include #define AGS_TYPE_DIAL (ags_dial_get_type()) #define AGS_DIAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DIAL, AgsDial)) #define AGS_DIAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_DIAL, AgsDialClass)) #define AGS_IS_DIAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DIAL)) #define AGS_IS_DIAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_DIAL)) #define AGS_DIAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_DIAL, AgsDialClass)) #define AGS_DIAL_DEFAULT_PRECISION (8.0) #define AGS_DIAL_DEFAULT_RADIUS (8) #define AGS_DIAL_DEFAULT_OUTLINE_STRENGTH (4) #define AGS_DIAL_DEFAULT_BUTTON_WIDTH (10) #define AGS_DIAL_DEFAULT_MARGIN (4.0) #define AGS_DIAL_DEFAULT_HEIGHT (2 * (AGS_DIAL_DEFAULT_RADIUS + AGS_DIAL_DEFAULT_OUTLINE_STRENGTH + 1)) #define AGS_DIAL_DEFAULT_WIDTH (2 * (AGS_DIAL_DEFAULT_BUTTON_WIDTH + AGS_DIAL_DEFAULT_MARGIN + AGS_DIAL_DEFAULT_RADIUS + AGS_DIAL_DEFAULT_OUTLINE_STRENGTH + 2)) typedef struct _AgsDial AgsDial; typedef struct _AgsDialClass AgsDialClass; typedef enum{ AGS_DIAL_WITH_BUTTONS = 1, AGS_DIAL_MOUSE_BUTTON_PRESSED = 1 << 1, AGS_DIAL_BUTTON_DOWN_PRESSED = 1 << 2, AGS_DIAL_BUTTON_UP_PRESSED = 1 << 3, AGS_DIAL_MOTION_CAPTURING_INIT = 1 << 4, AGS_DIAL_MOTION_CAPTURING = 1 << 5, AGS_DIAL_SEEMLESS_MODE = 1 << 6, }AgsDialFlags; typedef enum{ AGS_DIAL_INCREMENT, AGS_DIAL_DECREMENT, }AgsDialAction; struct _AgsDial { GtkWidget widget; guint flags; guint radius; guint outline_strength; guint scale_precision; guint scale_max_precision; guint font_size; gint button_width; gint button_height; gint margin_left; gint margin_right; gdouble tolerance; gdouble negated_tolerance; GtkAdjustment *adjustment; gdouble gravity_x; gdouble gravity_y; gdouble current_x; gdouble current_y; }; struct _AgsDialClass { GtkWidgetClass widget; void (*value_changed)(AgsDial *dial); }; GType ags_dial_get_type(void); void ags_dial_draw(AgsDial *dial); void ags_dial_value_changed(AgsDial *dial); void ags_dial_set_value(AgsDial *dial, gdouble value); AgsDial* ags_dial_new(); #endif /*__AGS_DIAL_H__*/ gsequencer-1.4.24/ags/widget/ags_expander.c0000644000175000017500000002664313246707333015550 00000000000000/* 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 . */ #include "ags_expander.h" #include void ags_expander_class_init(AgsExpanderClass *expander); void ags_expander_init(AgsExpander *expander); void ags_expander_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_expander_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_expander_finalize(GObject *gobject); void ags_expander_show(GtkWidget *widget); void ags_expander_realize(GtkWidget *widget); void ags_expander_size_request(GtkWidget *widget, GtkRequisition *requisition); void ags_expander_size_allocate(GtkWidget *widget, GtkAllocation *allocation); gboolean ags_expander_expose(GtkWidget *widget, GdkEventExpose *event); void ags_expander_activate(GtkExpander *expander); void ags_expander_width_changed(GObject *gobject, GParamSpec *pspec, AgsExpander *expander); void ags_expander_height_changed(GObject *gobject, GParamSpec *pspec, AgsExpander *expander); void ags_expander_draw(AgsExpander *expander); void ags_expander_insert_child(AgsExpander *expander, AgsExpanderChild *child); void ags_expander_remove_child(AgsExpander *expander, AgsExpanderChild *child); /** * SECTION:ags_expander * @short_description: A expander widget * @title: AgsExpander * @section_id: * @include: ags/widget/ags_expander.h * * #AgsExpander is a composite widget containing a #GtkTable. It * is mainly used to layout childs in rows and columns that can * be expanded. */ enum{ PROP_0, PROP_WIDTH, PROP_HEIGHT, PROP_CHILD, }; static gpointer ags_expander_parent_class = NULL; GType ags_expander_get_type(void) { static GType ags_type_expander = 0; if(!ags_type_expander){ static const GTypeInfo ags_expander_info = { sizeof(AgsExpanderClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_expander_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsExpander), 0, /* n_preallocs */ (GInstanceInitFunc) ags_expander_init, }; ags_type_expander = g_type_register_static(GTK_TYPE_EXPANDER, "AgsExpander\0", &ags_expander_info, 0); } return(ags_type_expander); } void ags_expander_class_init(AgsExpanderClass *expander) { GObjectClass *gobject; // GtkWidgetClass *widget; GtkExpanderClass *parent; GParamSpec *param_spec; ags_expander_parent_class = g_type_class_peek_parent(expander); /* GObjectClass */ gobject = G_OBJECT_CLASS(expander); gobject->set_property = ags_expander_set_property; gobject->get_property = ags_expander_get_property; gobject->finalize = ags_expander_finalize; /* properties */ param_spec = g_param_spec_uint("width\0", "width of expander grid\0", "The width of the expander's grid\0", 0, G_MAXUINT, 1, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_WIDTH, param_spec); param_spec = g_param_spec_uint("height\0", "height of expander\0", "The height which this expander is packed into\0", 0, G_MAXUINT, 1, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_HEIGHT, param_spec); param_spec = g_param_spec_object("child\0", "child of expander\0", "The child which this expander is packed into\0", GTK_TYPE_WIDGET, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHILD, param_spec); /* GtkWidgetClass */ // widget = (GtkWidgetClass *) expander; // widget->realize = ags_expander_realize; // widget->expose_event = ags_expander_expose; // widget->size_request = ags_expander_size_request; // widget->size_allocate = ags_expander_size_allocate; /* GtkExpanderClass */ parent = (GtkExpanderClass *) expander; parent->activate = ags_expander_activate; } void ags_expander_init(AgsExpander *expander) { g_object_set(G_OBJECT(expander), "app-paintable\0", TRUE, NULL); g_signal_connect(expander, "notify::width\0", G_CALLBACK(ags_expander_width_changed), expander); g_signal_connect(expander, "notify::height\0", G_CALLBACK(ags_expander_height_changed), expander); expander->flags = 0; expander->table = (GtkTable *) gtk_table_new(2, 2, FALSE); gtk_container_add(GTK_CONTAINER(expander), GTK_WIDGET(expander->table)); expander->children = NULL; } void ags_expander_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsExpander *expander; expander = AGS_EXPANDER(gobject); switch(prop_id){ case PROP_WIDTH: { guint width, height; gtk_table_get_size(expander->table, &width, &height); width = g_value_get_uint(value); gtk_table_resize(expander->table, width, height); } break; case PROP_HEIGHT: { guint width, height; gtk_table_get_size(expander->table, &width, &height); height = g_value_get_uint(value); gtk_table_resize(expander->table, width, height); } break; case PROP_CHILD: { AgsExpanderChild *child; child = (AgsExpanderChild *) g_value_get_pointer(value); ags_expander_insert_child(expander, child); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_expander_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsExpander *expander; expander = AGS_EXPANDER(gobject); switch(prop_id){ case PROP_WIDTH: { guint width, height; gtk_table_get_size(expander->table, &width, &height); g_value_set_uint(value, width); } break; case PROP_HEIGHT: { guint width, height; gtk_table_get_size(expander->table, &width, &height); g_value_set_uint(value, height); } break; case PROP_CHILD: g_value_set_pointer(value, expander->children); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_expander_finalize(GObject *gobject) { AgsExpander *expander; expander = AGS_EXPANDER(gobject); if(expander->children != NULL){ g_list_free_full(expander->children, g_free); } /* call parent */ G_OBJECT_CLASS(ags_expander_parent_class)->finalize(gobject); } void ags_expander_realize(GtkWidget *widget) { //TODO:JK: implement me } void ags_expander_size_request(GtkWidget *widget, GtkRequisition *requisition) { //TODO:JK: implement me } void ags_expander_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { //TODO:JK: implement me } gboolean ags_expander_expose(GtkWidget *widget, GdkEventExpose *event) { //TODO:JK: implement me return(FALSE); } void ags_expander_activate(GtkExpander *expander) { GTK_EXPANDER_CLASS(ags_expander_parent_class)->activate(expander); if(gtk_expander_get_expanded(expander)){ gtk_widget_show_all(GTK_WIDGET(AGS_EXPANDER(expander)->table)); }else{ gtk_widget_hide(GTK_WIDGET(AGS_EXPANDER(expander)->table)); } } void ags_expander_width_changed(GObject *gobject, GParamSpec *pspec, AgsExpander *expander) { //TODO:JK: implement me } void ags_expander_height_changed(GObject *gobject, GParamSpec *pspec, AgsExpander *expander) { //TODO:JK: implement me } void ags_expander_flags(AgsExpander *expander, guint flags) { //TODO:JK: implement me } AgsExpanderChild* ags_expander_child_alloc(guint x, guint y, guint width, guint height) { AgsExpanderChild *child; child = (AgsExpanderChild *) malloc(sizeof(AgsExpanderChild)); child->x = x; child->y = y; child->width = width; child->height = height; return(child); } void ags_expander_draw(AgsExpander *expander) { //TODO:JK: implement me } AgsExpanderChild* ags_expander_child_find(AgsExpander *expander, GtkWidget *child) { GList *list; list = expander->children; while(list != NULL){ if(AGS_EXPANDER_CHILD(list->data)->child == child){ return((AgsExpanderChild *) list->data); } list = list->next; } return(NULL); } void ags_expander_insert_child(AgsExpander *expander, AgsExpanderChild *child) { GList *list; guint i; list = expander->children; i = 0; while(list != NULL){ if(AGS_EXPANDER_CHILD(list->data)->x > child->x){ break; } if(AGS_EXPANDER_CHILD(list->data)->x == child->x){ while(list != NULL){ if(AGS_EXPANDER_CHILD(list->data)->x > child->x){ break; } if(AGS_EXPANDER_CHILD(list->data)->x == child->x && AGS_EXPANDER_CHILD(list->data)->y >= child->y){ break; } i++; list = list->next; } break; } i++; list = list->next; } gtk_table_attach(expander->table, child->child, child->x, child->x + child->width, child->y, child->y + child->height, GTK_FILL, GTK_FILL, 0, 0); expander->children = g_list_insert(expander->children, child, i); } void ags_expander_remove_child(AgsExpander *expander, AgsExpanderChild *child) { gtk_container_remove(GTK_CONTAINER(expander->table), child->child); expander->children = g_list_remove(expander->children, child); free(child); } /** * ags_expander_add: * @expander: the #AgsExpander * @widget: the child #GtkWidget * @x: x-position * @y: y-position * @width: allocation width * @height: allocation height * * Adds a #GtkWidget to #AgsExpander * * Since: 1.0.0 */ void ags_expander_add(AgsExpander *expander, GtkWidget *widget, guint x, guint y, guint width, guint height) { AgsExpanderChild *child; child = ags_expander_child_alloc(x, y, width, height); child->child = widget; ags_expander_insert_child(expander, child); if(GTK_WIDGET_VISIBLE(expander)){ gtk_widget_show_all(child->child); } } /** * ags_expander_remove: * @expander: the #AgsExpander * @widget: the child #GtkWidget * * Removes a #GtkWidget of #AgsExpander * * Since: 1.0.0 */ void ags_expander_remove(AgsExpander *expander, GtkWidget *widget) { ags_expander_remove_child(expander, ags_expander_child_find(expander, widget)); } /** * ags_expander_new: * @height: the table's height * @width: the table's width * * Creates an #AgsExpander * * Returns: a new #AgsExpander * * Since: 1.0.0 */ AgsExpander* ags_expander_new(guint width, guint height) { AgsExpander *expander; expander = (AgsExpander *) g_object_new(AGS_TYPE_EXPANDER, "width\0", width, "height\0", height, NULL); return(expander); } gsequencer-1.4.24/ags/widget/ags_vscale_box.c0000644000175000017500000000444213247044247016057 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_vscale_box_class_init(AgsVScaleBoxClass *vscale_box); void ags_vscale_box_init(AgsVScaleBox *vscale_box); /** * SECTION:ags_vscale_box * @short_description: vertical box widget * @title: AgsVScaleBox * @section_id: * @include: ags/widget/ags_vscale_box.h * * The #AgsVScaleBox is an vertical box widget containing #AgsScale. */ GType ags_vscale_box_get_type(void) { static GType ags_type_vscale_box = 0; if(!ags_type_vscale_box){ static const GTypeInfo ags_vscale_box_info = { sizeof (AgsVScaleBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_vscale_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsVScaleBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_vscale_box_init, }; ags_type_vscale_box = g_type_register_static(AGS_TYPE_SCALE_BOX, "AgsVScaleBox", &ags_vscale_box_info, 0); } return(ags_type_vscale_box); } void ags_vscale_box_class_init(AgsVScaleBoxClass *vscale_box) { } void ags_vscale_box_init(AgsVScaleBox *vscale_box) { gtk_orientable_set_orientation(GTK_ORIENTABLE(vscale_box), GTK_ORIENTATION_VERTICAL); } /** * ags_vscale_box_new: * * Create a new instance of #AgsVScaleBox. * * Returns: the new #AgsVScaleBox instance * * Since: 1.3.0 */ AgsVScaleBox* ags_vscale_box_new() { AgsVScaleBox *vscale_box; vscale_box = (AgsVScaleBox *) g_object_new(AGS_TYPE_VSCALE_BOX, NULL); return(vscale_box); } gsequencer-1.4.24/ags/widget/ags_vindicator.c0000644000175000017500000001230613246707333016073 00000000000000/* 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 . */ #include "ags_vindicator.h" void ags_vindicator_class_init(AgsVIndicatorClass *indicator); void ags_vindicator_init(AgsVIndicator *indicator); void ags_vindicator_show(GtkWidget *widget); gboolean ags_vindicator_expose(GtkWidget *widget, GdkEventExpose *event); gboolean ags_vindicator_configure(GtkWidget *widget, GdkEventConfigure *event); void ags_vindicator_draw(AgsVIndicator *indicator); /** * SECTION:ags_vindicator * @short_description: A vertical indicator widget * @title: AgsVIndicator * @section_id: * @include: ags/widget/ags_vindicator.h * * #AgsVIndicator is a widget visualizing a #GtkAdjustment. */ static gpointer ags_vindicator_parent_class = NULL; GType ags_vindicator_get_type(void) { static GType ags_type_vindicator = 0; if(!ags_type_vindicator){ static const GTypeInfo ags_vindicator_info = { sizeof(AgsVIndicatorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_vindicator_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsVIndicator), 0, /* n_preallocs */ (GInstanceInitFunc) ags_vindicator_init, }; ags_type_vindicator = g_type_register_static(AGS_TYPE_INDICATOR, "AgsVIndicator\0", &ags_vindicator_info, 0); } return(ags_type_vindicator); } void ags_vindicator_class_init(AgsVIndicatorClass *indicator) { GtkWidgetClass *widget; ags_vindicator_parent_class = g_type_class_peek_parent(indicator); /* GtkWidgetClass */ widget = (GtkWidgetClass *) indicator; widget->expose_event = ags_vindicator_expose; widget->configure_event = ags_vindicator_configure; } void ags_vindicator_init(AgsVIndicator *indicator) { gtk_widget_set_size_request((GtkWidget *) indicator, 16, 100); } gboolean ags_vindicator_configure(GtkWidget *widget, GdkEventConfigure *event) { ags_vindicator_draw((AgsVIndicator *) widget); return(FALSE); } gboolean ags_vindicator_expose(GtkWidget *widget, GdkEventExpose *event) { ags_vindicator_draw((AgsVIndicator *) widget); return(FALSE); } void ags_vindicator_draw(AgsVIndicator *indicator) { GtkWidget *widget; GtkAdjustment *adjustment; GtkStyle *indicator_style; cairo_t *cr; gdouble value; guint width, height; guint segment_width, segment_height; guint padding; guint i; static const gdouble white_gc = 65535.0; widget = GTK_WIDGET(indicator); indicator_style = gtk_widget_get_style(widget); adjustment = AGS_INDICATOR(indicator)->adjustment; if(adjustment == NULL){ return; } // g_message("draw %f\0", adjustment->value); cr = gdk_cairo_create(widget->window); if(cr == NULL){ return; } width = 16; height = 100; segment_width = width; segment_height = 7; padding = 3; cairo_surface_flush(cairo_get_target(cr)); cairo_push_group(cr); for(i = 0; i < height / (segment_height + padding); i++){ if(adjustment->value > 0.0 && (1.0 / adjustment->value * i < (height / (segment_height + padding)))){ /* active */ cairo_set_source_rgb(cr, indicator_style->light[0].red / white_gc, indicator_style->light[0].green / white_gc, indicator_style->light[0].blue / white_gc); }else{ /* normal */ cairo_set_source_rgb(cr, indicator_style->dark[0].red / white_gc, indicator_style->dark[0].green / white_gc, indicator_style->dark[0].blue / white_gc); } cairo_rectangle(cr, 0, height - i * (segment_height + padding) - segment_height, segment_width, segment_height); cairo_fill(cr); /* outline */ cairo_set_source_rgb(cr, indicator_style->fg[0].red / white_gc, indicator_style->fg[0].green / white_gc, indicator_style->fg[0].blue / white_gc); cairo_rectangle(cr, 0, height - i * (segment_height + padding) - segment_height, segment_width, segment_height); cairo_stroke(cr); } cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } /** * ags_vindicator_new: * * Creates an #AgsVIndicator. * * Returns: a new #AgsVIndicator * * Since: 1.0.0 */ AgsVIndicator* ags_vindicator_new() { AgsVIndicator *indicator; GtkAdjustment *adjustment; adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); indicator = (AgsVIndicator *) g_object_new(AGS_TYPE_VINDICATOR, "adjustment\0", adjustment, NULL); return(indicator); } gsequencer-1.4.24/ags/widget/ags_ruler.h0000644000175000017500000000373413247044247015073 00000000000000/* 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 . */ #ifndef __AGS_RULER_H__ #define __AGS_RULER_H__ #include #include #include #define AGS_TYPE_RULER (ags_ruler_get_type()) #define AGS_RULER(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_RULER, AgsRuler)) #define AGS_RULER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_RULER, AgsRulerClass)) #define AGS_IS_RULER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RULER)) #define AGS_IS_RULER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RULER)) #define AGS_RULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_RULER, AgsRulerClass)) #define AGS_RULER_FONT_SIZE (12) #define AGS_RULER_FREE_SPACE (4.0) #define AGS_RULER_DEFAULT_STEP (16) #define AGS_RULER_LARGE_STEP (8.0) #define AGS_RULER_SMALL_STEP (6.0) typedef struct _AgsRuler AgsRuler; typedef struct _AgsRulerClass AgsRulerClass; struct _AgsRuler { GtkWidget widget; guint flags; guint font_size; GtkAdjustment *adjustment; guint step; gdouble factor; gdouble precision; gdouble scale_precision; }; struct _AgsRulerClass { GtkWidgetClass widget; }; GType ags_ruler_get_type(); AgsRuler* ags_ruler_new(); #endif /*__AGS_RULER_H__*/ gsequencer-1.4.24/ags/widget/ags_container.h0000644000175000017500000000174613246707333015726 00000000000000/* 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 . */ #ifndef __AGS_CONTAINER_H__ #define __AGS_CONTAINER_H__ #include #include #include void ags_container_add_all(GtkContainer *container, GList *list); #endif /*__AGS_CONTAINER_H__*/ gsequencer-1.4.24/ags/widget/ags_led_array.c0000644000175000017500000001701613247044247015675 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include "ags_led_array.h" #include void ags_led_array_class_init(AgsLedArrayClass *led_array); void ags_led_array_init(AgsLedArray *led_array); void ags_led_array_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_led_array_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_led_array_realize(GtkWidget *widget); /** * SECTION:ags_led_array * @short_description: A led array widget * @title: AgsLedArray * @section_id: * @include: ags/widget/ags_led_array.h * * #AgsLedArray is a widget representing an array of leds. */ enum{ PROP_0, PROP_LED_WIDTH, PROP_LED_HEIGHT, PROP_LED_COUNT, }; static gpointer ags_led_array_parent_class = NULL; GtkStyle *led_array_style = NULL; GType ags_led_array_get_type(void) { static GType ags_type_led_array = 0; if(!ags_type_led_array){ static const GTypeInfo ags_led_array_info = { sizeof(AgsLedArrayClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_led_array_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsLedArray), 0, /* n_preallocs */ (GInstanceInitFunc) ags_led_array_init, }; ags_type_led_array = g_type_register_static(GTK_TYPE_ALIGNMENT, "AgsLedArray", &ags_led_array_info, 0); } return(ags_type_led_array); } void ags_led_array_class_init(AgsLedArrayClass *led_array) { GtkWidgetClass *widget; GObjectClass *gobject; GParamSpec *param_spec; ags_led_array_parent_class = g_type_class_peek_parent(led_array); /* GObjectClass */ gobject = (GObjectClass *) led_array; gobject->set_property = ags_led_array_set_property; gobject->get_property = ags_led_array_get_property; /* properties */ /** * AgsLedArray:led-width: * * The width of one led. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("led-width", "width of led", "The width of one led", 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LED_WIDTH, param_spec); /** * AgsLedArray:led-height: * * The height of one led. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("led-height", "height of led", "The height of one led", 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LED_HEIGHT, param_spec); /** * AgsLedArray:led-count: * * The count of leds available. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("led-count", "count of leds", "The count of leds available", 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LED_COUNT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) led_array; widget->realize = ags_led_array_realize; } void ags_led_array_init(AgsLedArray *led_array) { led_array->led_width = 12; led_array->led_height = 10; led_array->led = NULL; led_array->led_count = 0; } void ags_led_array_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLedArray *led_array; led_array = AGS_LED_ARRAY(gobject); switch(prop_id){ case PROP_LED_COUNT: { guint led_count; led_count = g_value_get_uint(value); ags_led_array_set_led_count(led_array, led_count); } break; case PROP_LED_WIDTH: { guint led_width; led_array->led_width = g_value_get_uint(value); } break; case PROP_LED_HEIGHT: { guint led_height; led_array->led_height = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_led_array_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLedArray *led_array; led_array = AGS_LED_ARRAY(gobject); switch(prop_id){ case PROP_LED_COUNT: { g_value_set_uint(value, led_array->led_count); } break; case PROP_LED_WIDTH: { g_value_set_uint(value, led_array->led_width); } break; case PROP_LED_HEIGHT: { g_value_set_uint(value, led_array->led_height); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_led_array_realize(GtkWidget *widget) { AgsLedArray *led_array; led_array = widget; /* call parent */ GTK_WIDGET_CLASS(ags_led_array_parent_class)->realize(widget); if(led_array_style == NULL){ led_array_style = gtk_style_copy(gtk_widget_get_style(led_array)); } gtk_widget_set_style((GtkWidget *) led_array, led_array_style); } void ags_led_array_set_led_count(AgsLedArray *led_array, guint led_count) { guint i; if(led_array == NULL || led_array->led_count == led_count){ return; } if(led_count < led_array->led_count){ /* shrink */ for(i = led_count; i < led_array->led_count; i++){ gtk_widget_destroy(led_array->led[i]); } if(led_array->led == NULL){ led_array->led = (AgsLed **) malloc(led_count * sizeof(AgsLed *)); }else{ led_array->led = (AgsLed **) realloc(led_array->led, led_count * sizeof(AgsLed *)); } }else{ /* grow */ if(led_array->led == NULL){ led_array->led = (AgsLed **) malloc(led_count * sizeof(AgsLed *)); }else{ led_array->led = (AgsLed **) realloc(led_array->led, led_count * sizeof(AgsLed *)); } for(i = led_array->led_count; i < led_count; i++){ led_array->led[i] = ags_led_new(); gtk_widget_set_size_request((GtkWidget *) led_array->led[i], led_array->led_width, led_array->led_height); gtk_box_pack_start(led_array->box, led_array->led[i], TRUE, FALSE, 0); gtk_widget_show(led_array->led[i]); } } led_array->led_count = led_count; } void ags_led_array_unset_all(AgsLedArray *led_array) { guint i; if(led_array == NULL){ return; } for(i = 0; i < led_array->led_count; i++){ ags_led_unset_active(led_array->led[i]); } } void ags_led_array_set_nth(AgsLedArray *led_array, guint nth) { if(led_array == NULL || nth >= led_array->led_count){ return; } ags_led_set_active(led_array->led[nth]); } /** * ags_led_array_new: * * Creates an #AgsLedArray. Note, use rather its implementation #AgsVLedArray or * #AgsHLedArray. * * Returns: a new #AgsLedArray * * Since: 1.0.0 */ AgsLedArray* ags_led_array_new() { AgsLedArray *led_array; led_array = (AgsLedArray *) g_object_new(AGS_TYPE_LED_ARRAY, NULL); return(led_array); } gsequencer-1.4.24/ags/widget/ags_scrolled_scale_box.c0000644000175000017500000002212313247044247017554 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_scrolled_scale_box_class_init(AgsScrolledScaleBoxClass *scrolled_scale_box); void ags_scrolled_scale_box_init(AgsScrolledScaleBox *scrolled_scale_box); void ags_scrolled_scale_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_scrolled_scale_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_scrolled_scale_box_finalize(GObject *gobject); void ags_scrolled_scale_box_size_allocate(GtkWidget *widget, GtkAllocation *allocation); void ags_scrolled_scale_box_size_request(GtkWidget *widget, GtkRequisition *requisition); /** * SECTION:ags_scrolled_scale_box * @short_description: scrolled scale box widget * @title: AgsScrolledScaleBox * @section_id: * @include: ags/widget/ags_scrolled_scale_box.h * * The #AgsScrolledScaleBox lets you to have a scrolled scale box widget. */ enum{ PROP_0, PROP_MARGIN_TOP, PROP_MARGIN_BOTTOM, PROP_MARGIN_LEFT, PROP_MARGIN_RIGHT, }; static gpointer ags_scrolled_scale_box_parent_class = NULL; GType ags_scrolled_scale_box_get_type(void) { static GType ags_type_scrolled_scale_box = 0; if(!ags_type_scrolled_scale_box){ static const GTypeInfo ags_scrolled_scale_box_info = { sizeof (AgsScrolledScaleBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_scrolled_scale_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsScrolledScaleBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_scrolled_scale_box_init, }; ags_type_scrolled_scale_box = g_type_register_static(GTK_TYPE_BIN, "AgsScrolledScaleBox", &ags_scrolled_scale_box_info, 0); } return(ags_type_scrolled_scale_box); } void ags_scrolled_scale_box_class_init(AgsScrolledScaleBoxClass *scrolled_scale_box) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_scrolled_scale_box_parent_class = g_type_class_peek_parent(scrolled_scale_box); /* GObjectClass */ gobject = (GObjectClass *) scrolled_scale_box; gobject->set_property = ags_scrolled_scale_box_set_property; gobject->get_property = ags_scrolled_scale_box_get_property; gobject->finalize = ags_scrolled_scale_box_finalize; /* properties */ /** * AgsScrolledScaleBox:margin-top: * * The margin top. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("margin-top", "margin top", "The margin top", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_TOP, param_spec); /** * AgsScrolledScaleBox:margin-bottom: * * The margin bottom. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("margin-bottom", "margin bottom", "The margin bottom", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_BOTTOM, param_spec); /** * AgsScrolledScaleBox:margin-left: * * The margin left. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("margin-left", "margin left", "The margin left", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_LEFT, param_spec); /** * AgsScrolledScaleBox:margin-right: * * The margin right. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("margin-right", "margin right", "The margin right", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_RIGHT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) scrolled_scale_box; widget->size_request = ags_scrolled_scale_box_size_request; widget->size_allocate = ags_scrolled_scale_box_size_allocate; } void ags_scrolled_scale_box_init(AgsScrolledScaleBox *scrolled_scale_box) { scrolled_scale_box->margin_top = 0; scrolled_scale_box->margin_bottom = 0; scrolled_scale_box->margin_left = 0; scrolled_scale_box->margin_right = 0; /* viewport */ scrolled_scale_box->viewport = gtk_viewport_new(NULL, NULL); g_object_set(scrolled_scale_box->viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_container_add(scrolled_scale_box, scrolled_scale_box->viewport); /* scale box */ scrolled_scale_box->scale_box = NULL; #if 0 scrolled_scale_box->scale_box = ags_vscale_box_new(); gtk_container_add(scrolled_scale_box->viewport, scrolled_scale_box->scale_box); #endif } void ags_scrolled_scale_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsScrolledScaleBox *scrolled_scale_box; scrolled_scale_box = AGS_SCROLLED_SCALE_BOX(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { scrolled_scale_box->margin_top = g_value_get_uint(value); } break; case PROP_MARGIN_BOTTOM: { scrolled_scale_box->margin_bottom = g_value_get_uint(value); } break; case PROP_MARGIN_LEFT: { scrolled_scale_box->margin_left = g_value_get_uint(value); } break; case PROP_MARGIN_RIGHT: { scrolled_scale_box->margin_right = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_scale_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsScrolledScaleBox *scrolled_scale_box; scrolled_scale_box = AGS_SCROLLED_SCALE_BOX(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { g_value_set_uint(value, scrolled_scale_box->margin_top); } break; case PROP_MARGIN_BOTTOM: { g_value_set_uint(value, scrolled_scale_box->margin_bottom); } break; case PROP_MARGIN_LEFT: { g_value_set_uint(value, scrolled_scale_box->margin_left); } break; case PROP_MARGIN_RIGHT: { g_value_set_uint(value, scrolled_scale_box->margin_right); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_scale_box_finalize(GObject *gobject) { AgsScrolledScaleBox *scrolled_scale_box; scrolled_scale_box = AGS_SCROLLED_SCALE_BOX(gobject); /* call parent */ G_OBJECT_CLASS(ags_scrolled_scale_box_parent_class)->finalize(gobject); } void ags_scrolled_scale_box_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsScrolledScaleBox *scrolled_scale_box; GtkAllocation child_allocation; GtkRequisition child_requisition; scrolled_scale_box = AGS_SCROLLED_SCALE_BOX(widget); /* viewport allocation */ gtk_widget_get_child_requisition((GtkWidget *) scrolled_scale_box->viewport, &child_requisition); child_allocation.x = allocation->x; child_allocation.y = allocation->y; child_allocation.width = allocation->width; child_allocation.height = allocation->height; gtk_widget_size_allocate((GtkWidget *) scrolled_scale_box->viewport, &child_allocation); /* box */ gtk_widget_get_child_requisition((GtkWidget *) scrolled_scale_box->scale_box, &child_requisition); child_allocation.x = 0; child_allocation.y = 0; child_allocation.width = allocation->width; child_allocation.height = child_requisition.height; gtk_widget_size_allocate((GtkWidget *) scrolled_scale_box->scale_box, &child_allocation); } void ags_scrolled_scale_box_size_request(GtkWidget *widget, GtkRequisition *requisition) { GtkRequisition child_requisition; requisition->width = AGS_SCALE_DEFAULT_WIDTH; requisition->height = -1; gtk_widget_size_request(gtk_bin_get_child((GtkContainer *) widget), &child_requisition); } /** * ags_scrolled_scale_box_new: * * Create a new #AgsScrolledScaleBox. * * Returns: a new #AgsScrolledScaleBox * * Since: 1.3.0 */ AgsScrolledScaleBox* ags_scrolled_scale_box_new() { AgsScrolledScaleBox *scrolled_scale_box; scrolled_scale_box = (AgsScrolledScaleBox *) g_object_new(AGS_TYPE_SCROLLED_SCALE_BOX, NULL); return(scrolled_scale_box); } gsequencer-1.4.24/ags/widget/ags_timebar.c0000644000175000017500000000144713246707333015360 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/widget/ags_scrolled_piano.h0000644000175000017500000000405313247044247016732 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SCROLLED_PIANO_H__ #define __AGS_SCROLLED_PIANO_H__ #include #include #include #include #define AGS_TYPE_SCROLLED_PIANO (ags_scrolled_piano_get_type()) #define AGS_SCROLLED_PIANO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SCROLLED_PIANO, AgsScrolledPiano)) #define AGS_SCROLLED_PIANO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SCROLLED_PIANO, AgsScrolledPianoClass)) #define AGS_IS_SCROLLED_PIANO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SCROLLED_PIANO)) #define AGS_IS_SCROLLED_PIANO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SCROLLED_PIANO)) #define AGS_SCROLLED_PIANO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SCROLLED_PIANO, AgsScrolledPianoClass)) typedef struct _AgsScrolledPiano AgsScrolledPiano; typedef struct _AgsScrolledPianoClass AgsScrolledPianoClass; struct _AgsScrolledPiano { GtkBin bin; guint margin_top; guint margin_bottom; guint margin_left; guint margin_right; GtkViewport *viewport; AgsPiano *piano; }; struct _AgsScrolledPianoClass { GtkBinClass bin; }; GType ags_scrolled_piano_get_type(void); AgsScrolledPiano* ags_scrolled_piano_new(); #endif /*__AGS_SCROLLED_PIANO_H__*/ gsequencer-1.4.24/ags/widget/ags_widget_marshal.c0000644000175000017500000001002513247044247016716 00000000000000#include #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) #define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) #define g_marshal_value_peek_long(v) g_value_get_long (v) #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) #define g_marshal_value_peek_enum(v) g_value_get_enum (v) #define g_marshal_value_peek_flags(v) g_value_get_flags (v) #define g_marshal_value_peek_float(v) g_value_get_float (v) #define g_marshal_value_peek_double(v) g_value_get_double (v) #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) #define g_marshal_value_peek_param(v) g_value_get_param (v) #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) #define g_marshal_value_peek_variant(v) g_value_get_variant (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the * g_value_get_*() functions */ #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int #define g_marshal_value_peek_char(v) (v)->data[0].v_int #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint #define g_marshal_value_peek_int(v) (v)->data[0].v_int #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint #define g_marshal_value_peek_long(v) (v)->data[0].v_long #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong #define g_marshal_value_peek_float(v) (v)->data[0].v_float #define g_marshal_value_peek_double(v) (v)->data[0].v_double #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ /* VOID:STRING,INT (ags_widget_marshallers.list:1) */ void ags_widget_cclosure_marshal_VOID__STRING_INT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_INT) (gpointer data1, gpointer arg1, gint arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__STRING_INT callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_INT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_int (param_values + 2), data2); } gsequencer-1.4.24/ags/widget/ags_vindicator.h0000644000175000017500000000352413246707333016102 00000000000000/* 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 . */ #ifndef __AGS_VINDICATOR_H__ #define __AGS_VINDICATOR_H__ #include #include #include #include "ags_indicator.h" #define AGS_TYPE_VINDICATOR (ags_vindicator_get_type()) #define AGS_VINDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_VINDICATOR, AgsVIndicator)) #define AGS_VINDICATOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_VINDICATOR, AgsVIndicatorClass)) #define AGS_IS_VINDICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_VINDICATOR)) #define AGS_IS_VINDICATOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_VINDICATOR)) #define AGS_VINDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_VINDICATOR, AgsVIndicatorClass)) typedef struct _AgsVIndicator AgsVIndicator; typedef struct _AgsVIndicatorClass AgsVIndicatorClass; struct _AgsVIndicator { AgsIndicator indicator; }; struct _AgsVIndicatorClass { AgsIndicatorClass indicator; }; GType ags_vindicator_get_type(void); AgsVIndicator* ags_vindicator_new(); #endif /*__AGS_VINDICATOR_H__*/ gsequencer-1.4.24/ags/widget/ags_scrolled_level_box.c0000644000175000017500000002212313247044247017574 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_scrolled_level_box_class_init(AgsScrolledLevelBoxClass *scrolled_level_box); void ags_scrolled_level_box_init(AgsScrolledLevelBox *scrolled_level_box); void ags_scrolled_level_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_scrolled_level_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_scrolled_level_box_finalize(GObject *gobject); void ags_scrolled_level_box_size_allocate(GtkWidget *widget, GtkAllocation *allocation); void ags_scrolled_level_box_size_request(GtkWidget *widget, GtkRequisition *requisition); /** * SECTION:ags_scrolled_level_box * @short_description: scrolled level box widget * @title: AgsScrolledLevelBox * @section_id: * @include: ags/widget/ags_scrolled_level_box.h * * The #AgsScrolledLevelBox lets you to have a scrolled level box widget. */ enum{ PROP_0, PROP_MARGIN_TOP, PROP_MARGIN_BOTTOM, PROP_MARGIN_LEFT, PROP_MARGIN_RIGHT, }; static gpointer ags_scrolled_level_box_parent_class = NULL; GType ags_scrolled_level_box_get_type(void) { static GType ags_type_scrolled_level_box = 0; if(!ags_type_scrolled_level_box){ static const GTypeInfo ags_scrolled_level_box_info = { sizeof (AgsScrolledLevelBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_scrolled_level_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsScrolledLevelBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_scrolled_level_box_init, }; ags_type_scrolled_level_box = g_type_register_static(GTK_TYPE_BIN, "AgsScrolledLevelBox", &ags_scrolled_level_box_info, 0); } return(ags_type_scrolled_level_box); } void ags_scrolled_level_box_class_init(AgsScrolledLevelBoxClass *scrolled_level_box) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_scrolled_level_box_parent_class = g_type_class_peek_parent(scrolled_level_box); /* GObjectClass */ gobject = (GObjectClass *) scrolled_level_box; gobject->set_property = ags_scrolled_level_box_set_property; gobject->get_property = ags_scrolled_level_box_get_property; gobject->finalize = ags_scrolled_level_box_finalize; /* properties */ /** * AgsScrolledLevelBox:margin-top: * * The margin top. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("margin-top", "margin top", "The margin top", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_TOP, param_spec); /** * AgsScrolledLevelBox:margin-bottom: * * The margin bottom. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("margin-bottom", "margin bottom", "The margin bottom", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_BOTTOM, param_spec); /** * AgsScrolledLevelBox:margin-left: * * The margin left. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("margin-left", "margin left", "The margin left", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_LEFT, param_spec); /** * AgsScrolledLevelBox:margin-right: * * The margin right. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("margin-right", "margin right", "The margin right", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_RIGHT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) scrolled_level_box; widget->size_request = ags_scrolled_level_box_size_request; widget->size_allocate = ags_scrolled_level_box_size_allocate; } void ags_scrolled_level_box_init(AgsScrolledLevelBox *scrolled_level_box) { scrolled_level_box->margin_top = 0; scrolled_level_box->margin_bottom = 0; scrolled_level_box->margin_left = 0; scrolled_level_box->margin_right = 0; /* viewport */ scrolled_level_box->viewport = gtk_viewport_new(NULL, NULL); g_object_set(scrolled_level_box->viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_container_add(scrolled_level_box, scrolled_level_box->viewport); /* level box */ scrolled_level_box->level_box = NULL; #if 0 scrolled_level_box->level_box = ags_vlevel_box_new(); gtk_container_add(scrolled_level_box->viewport, scrolled_level_box->level_box); #endif } void ags_scrolled_level_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsScrolledLevelBox *scrolled_level_box; scrolled_level_box = AGS_SCROLLED_LEVEL_BOX(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { scrolled_level_box->margin_top = g_value_get_uint(value); } break; case PROP_MARGIN_BOTTOM: { scrolled_level_box->margin_bottom = g_value_get_uint(value); } break; case PROP_MARGIN_LEFT: { scrolled_level_box->margin_left = g_value_get_uint(value); } break; case PROP_MARGIN_RIGHT: { scrolled_level_box->margin_right = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_level_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsScrolledLevelBox *scrolled_level_box; scrolled_level_box = AGS_SCROLLED_LEVEL_BOX(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { g_value_set_uint(value, scrolled_level_box->margin_top); } break; case PROP_MARGIN_BOTTOM: { g_value_set_uint(value, scrolled_level_box->margin_bottom); } break; case PROP_MARGIN_LEFT: { g_value_set_uint(value, scrolled_level_box->margin_left); } break; case PROP_MARGIN_RIGHT: { g_value_set_uint(value, scrolled_level_box->margin_right); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_level_box_finalize(GObject *gobject) { AgsScrolledLevelBox *scrolled_level_box; scrolled_level_box = AGS_SCROLLED_LEVEL_BOX(gobject); /* call parent */ G_OBJECT_CLASS(ags_scrolled_level_box_parent_class)->finalize(gobject); } void ags_scrolled_level_box_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsScrolledLevelBox *scrolled_level_box; GtkAllocation child_allocation; GtkRequisition child_requisition; scrolled_level_box = AGS_SCROLLED_LEVEL_BOX(widget); /* viewport allocation */ gtk_widget_get_child_requisition((GtkWidget *) scrolled_level_box->viewport, &child_requisition); child_allocation.x = allocation->x; child_allocation.y = allocation->y; child_allocation.width = allocation->width; child_allocation.height = allocation->height; gtk_widget_size_allocate((GtkWidget *) scrolled_level_box->viewport, &child_allocation); /* box */ gtk_widget_get_child_requisition((GtkWidget *) scrolled_level_box->level_box, &child_requisition); child_allocation.x = 0; child_allocation.y = 0; child_allocation.width = allocation->width; child_allocation.height = child_requisition.height; gtk_widget_size_allocate((GtkWidget *) scrolled_level_box->level_box, &child_allocation); } void ags_scrolled_level_box_size_request(GtkWidget *widget, GtkRequisition *requisition) { GtkRequisition child_requisition; requisition->width = AGS_LEVEL_DEFAULT_WIDTH; requisition->height = -1; gtk_widget_size_request(gtk_bin_get_child((GtkContainer *) widget), &child_requisition); } /** * ags_scrolled_level_box_new: * * Create a new #AgsScrolledLevelBox. * * Returns: a new #AgsScrolledLevelBox * * Since: 1.4.0 */ AgsScrolledLevelBox* ags_scrolled_level_box_new() { AgsScrolledLevelBox *scrolled_level_box; scrolled_level_box = (AgsScrolledLevelBox *) g_object_new(AGS_TYPE_SCROLLED_LEVEL_BOX, NULL); return(scrolled_level_box); } gsequencer-1.4.24/ags/widget/ags_waveform.h0000644000175000017500000000336413247044247015567 00000000000000/* 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 . */ #ifndef __AGS_WAVEFORM_H__ #define __AGS_WAVEFORM_H__ #include #include #include #define AGS_TYPE_WAVEFORM (ags_waveform_get_type()) #define AGS_WAVEFORM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WAVEFORM, AgsWaveform)) #define AGS_WAVEFORM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_WAVEFORM, AgsWaveformClass)) #define AGS_IS_WAVEFORM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_WAVEFORM)) #define AGS_IS_WAVEFORM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_WAVEFORM)) #define AGS_WAVEFORM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_WAVEFORM, AgsWaveformClass)) typedef struct _AgsWaveform AgsWaveform; typedef struct _AgsWaveformClass AgsWaveformClass; struct _AgsWaveform { GtkWidget widget; }; struct _AgsWaveformClass { GtkWidgetClass widget; }; GType ags_waveform_get_type(void); AgsWaveform* ags_waveform_new(); #endif /*__AGS_WAVEFORM_H__*/ gsequencer-1.4.24/ags/widget/ags_scrolled_level_box.h0000644000175000017500000000423013247044247017600 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SCROLLED_LEVEL_BOX_H__ #define __AGS_SCROLLED_LEVEL_BOX_H__ #include #include #include #include #define AGS_TYPE_SCROLLED_LEVEL_BOX (ags_scrolled_level_box_get_type()) #define AGS_SCROLLED_LEVEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SCROLLED_LEVEL_BOX, AgsScrolledLevelBox)) #define AGS_SCROLLED_LEVEL_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SCROLLED_LEVEL_BOX, AgsScrolledLevelBoxClass)) #define AGS_IS_SCROLLED_LEVEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SCROLLED_LEVEL_BOX)) #define AGS_IS_SCROLLED_LEVEL_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SCROLLED_LEVEL_BOX)) #define AGS_SCROLLED_LEVEL_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SCROLLED_LEVEL_BOX, AgsScrolledLevelBoxClass)) typedef struct _AgsScrolledLevelBox AgsScrolledLevelBox; typedef struct _AgsScrolledLevelBoxClass AgsScrolledLevelBoxClass; struct _AgsScrolledLevelBox { GtkBin bin; guint margin_top; guint margin_bottom; guint margin_left; guint margin_right; GtkViewport *viewport; AgsLevelBox *level_box; }; struct _AgsScrolledLevelBoxClass { GtkBinClass bin; }; GType ags_scrolled_level_box_get_type(void); AgsScrolledLevelBox* ags_scrolled_level_box_new(); #endif /*__AGS_SCROLLED_LEVEL_BOX_H__*/ gsequencer-1.4.24/ags/widget/ags_level.h0000644000175000017500000000625313247044247015050 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LEVEL_H__ #define __AGS_LEVEL_H__ #include #include #include #define AGS_TYPE_LEVEL (ags_level_get_type()) #define AGS_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LEVEL, AgsLevel)) #define AGS_LEVEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LEVEL, AgsLevelClass)) #define AGS_IS_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LEVEL)) #define AGS_IS_LEVEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LEVEL)) #define AGS_LEVEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_LEVEL, AgsLevelClass)) #define AGS_LEVEL_DEFAULT_WIDTH (60) #define AGS_LEVEL_DEFAULT_HEIGHT (256) #define AGS_LEVEL_DEFAULT_LOWER (0.0) #define AGS_LEVEL_DEFAULT_UPPER (1.0) #define AGS_LEVEL_DEFAULT_NORMALIZED_VOLUME (0.0) #define AGS_LEVEL_DEFAULT_STEP_COUNT (0.1) #define AGS_LEVEL_DEFAULT_PAGE_SIZE (0.25) #define AGS_LEVEL_DEFAULT_SAMPLERATE (44100) typedef struct _AgsLevel AgsLevel; typedef struct _AgsLevelClass AgsLevelClass; typedef enum{ AGS_LEVEL_PCM_S8 = 1, AGS_LEVEL_PCM_S16 = 1 << 1, AGS_LEVEL_PCM_S24 = 1 << 2, AGS_LEVEL_PCM_S32 = 1 << 3, AGS_LEVEL_PCM_S64 = 1 << 4, AGS_LEVEL_PCM_FLOAT = 1 << 5, AGS_LEVEL_PCM_DOUBLE = 1 << 6, }AgsLevelFlags; typedef enum{ AGS_LEVEL_BUTTON_1_PRESSED = 1, }AgsLevelButtonState; typedef enum{ AGS_LEVEL_KEY_L_CONTROL = 1, AGS_LEVEL_KEY_R_CONTROL = 1 << 1, AGS_LEVEL_KEY_L_SHIFT = 1 << 2, AGS_LEVEL_KEY_R_SHIFT = 1 << 3, }AgsLevelKeyMask; typedef enum{ AGS_LEVEL_LAYOUT_VERTICAL, AGS_LEVEL_LAYOUT_HORIZONTAL, }AgsLevelLayout; typedef enum{ AGS_LEVEL_STEP_UP, AGS_LEVEL_STEP_DOWN, AGS_LEVEL_PAGE_UP, AGS_LEVEL_PAGE_DOWN, }AgsLevelAction; struct _AgsLevel { GtkWidget widget; guint flags; guint key_mask; guint button_state; guint layout; guint font_size; guint level_width; guint level_height; gdouble lower; gdouble upper; gdouble normalized_volume; guint step_count; gdouble page_size; guint samplerate; guint *audio_channel; guint audio_channel_count; }; struct _AgsLevelClass { GtkWidgetClass widget; void (*value_changed)(AgsLevel *level, gdouble normalized_volume); }; GType ags_level_get_type(void); AgsLevel* ags_level_new(); #endif /*__AGS_LEVEL_H__*/ gsequencer-1.4.24/ags/widget/ags_notebook.h0000644000175000017500000000631213247044247015555 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTEBOOK_H__ #define __AGS_NOTEBOOK_H__ #include #include #include #define AGS_TYPE_NOTEBOOK (ags_notebook_get_type()) #define AGS_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_NOTEBOOK, AgsNotebook)) #define AGS_NOTEBOOK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NOTEBOOK, AgsNotebookClass)) #define AGS_IS_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_NOTEBOOK)) #define AGS_IS_NOTEBOOK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_NOTEBOOK)) #define AGS_NOTEBOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_NOTEBOOK, AgsNotebookClass)) #define AGS_NOTEBOOK_TAB(x) ((AgsNotebookTab *)(x)) #define AGS_NOTEBOOK_TAB_DEFAULT_WIDTH (100) #define AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT (32) #define AGS_NOTEBOOK_TAB_DEFAULT_PREFIX "tab" typedef struct _AgsNotebook AgsNotebook; typedef struct _AgsNotebookClass AgsNotebookClass; typedef struct _AgsNotebookTab AgsNotebookTab; typedef enum{ AGS_NOTEBOOK_TAB_PREFIXED_LABEL = 1, AGS_NOTEBOOK_TAB_ENUMERATE = 1 << 1, }; struct _AgsNotebook { GtkVBox vbox; guint flags; guint tab_width; guint tab_height; gchar *prefix; GtkHBox *navigation; GtkButton *scroll_prev; GtkButton *scroll_next; GtkViewport *viewport; GtkHBox *hbox; GList *tab; GDestroyNotify tab_free_func; }; struct _AgsNotebookClass { GtkVBoxClass vbox; }; struct _AgsNotebookTab { gpointer data; GtkToggleButton *toggle; }; GType ags_notebook_get_type(void); AgsNotebookTab* ags_notebook_tab_alloc(); void ags_notebook_tab_free(AgsNotebookTab *tab); void ags_notebook_tab_set_data(AgsNotebook *notebook, gint position, gpointer data); gint ags_notebook_tab_index(AgsNotebook *notebook, gpointer data); gint ags_notebook_next_active_tab(AgsNotebook *notebook, gint position); gint ags_notebook_add_tab(AgsNotebook *notebook); gint ags_notebook_add_tab_with_label(AgsNotebook *notebook, gchar *label); void ags_notebook_insert_tab(AgsNotebook *notebook, gint position); void ags_notebook_insert_tab_with_label(AgsNotebook *notebook, gchar *label, gint position); void ags_notebook_remove_tab(AgsNotebook *notebook, gint position); void ags_notebook_remove_tab_with_data(AgsNotebook *notebook, gpointer data); AgsNotebook* ags_notebook_new(); #endif /*__AGS_NOTEBOOK_H__*/ gsequencer-1.4.24/ags/widget/ags_level.c0000644000175000017500000006771413247044247015054 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #ifndef __APPLE__ #include #endif #include #include #include static GType ags_accessible_level_get_type(void); void ags_level_class_init(AgsLevelClass *level); void ags_level_init(AgsLevel *level); void ags_accessible_level_class_init(AtkObject *object); void ags_accessible_level_value_interface_init(AtkValueIface *value); void ags_accessible_level_action_interface_init(AtkActionIface *action); void ags_level_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_level_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_level_finalize(GObject *gobject); AtkObject* ags_level_get_accessible(GtkWidget *widget); void ags_level_show(GtkWidget *widget); void ags_accessible_level_get_value_and_text(AtkValue *value, gdouble *current_value, gchar **text); #ifdef HAVE_ATK_2_12 AtkRange* ags_accessible_level_get_range(AtkValue *value); #endif gdouble ags_accessible_level_get_increment(AtkValue *value); void ags_accessible_level_set_value(AtkValue *value, gdouble new_value); gboolean ags_accessible_level_do_action(AtkAction *action, gint i); gint ags_accessible_level_get_n_actions(AtkAction *action); const gchar* ags_accessible_level_get_description(AtkAction *action, gint i); const gchar* ags_accessible_level_get_name(AtkAction *action, gint i); const gchar* ags_accessible_level_get_keybinding(AtkAction *action, gint i); gboolean ags_accessible_level_set_description(AtkAction *action, gint i); gchar* ags_accessible_level_get_localized_name(AtkAction *action, gint i); void ags_level_map(GtkWidget *widget); void ags_level_realize(GtkWidget *widget); void ags_level_size_request(GtkWidget *widget, GtkRequisition *requisition); void ags_level_size_allocate(GtkWidget *widget, GtkAllocation *allocation); gboolean ags_level_expose(GtkWidget *widget, GdkEventExpose *event); gboolean ags_level_button_press(GtkWidget *widget, GdkEventButton *event); gboolean ags_level_button_release(GtkWidget *widget, GdkEventButton *event); gboolean ags_level_key_press(GtkWidget *widget, GdkEventKey *event); gboolean ags_level_key_release(GtkWidget *widget, GdkEventKey *event); gboolean ags_level_motion_notify(GtkWidget *widget, GdkEventMotion *event); void ags_level_draw(AgsLevel *level); /** * SECTION:ags_level * @short_description: A level widget * @title: AgsLevel * @section_id: * @include: ags/widget/ags_level.h * * #AgsLevel is a widget that shows you a meter. */ enum{ VALUE_CHANGED, LAST_SIGNAL, }; enum{ PROP_0, PROP_LOWER, PROP_UPPER, PROP_NORMALIZED_VOLUME, }; static gpointer ags_level_parent_class = NULL; static guint level_signals[LAST_SIGNAL]; static GQuark quark_accessible_object = 0; GType ags_level_get_type(void) { static GType ags_type_level = 0; if(!ags_type_level){ static const GTypeInfo ags_level_info = { sizeof(AgsLevelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_level_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsLevel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_level_init, }; ags_type_level = g_type_register_static(GTK_TYPE_WIDGET, "AgsLevel", &ags_level_info, 0); } return(ags_type_level); } static GType ags_accessible_level_get_type(void) { static GType ags_type_accessible_level = 0; if(!ags_type_accessible_level){ const GTypeInfo ags_accesssible_level_info = { sizeof(GtkAccessibleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_accessible_level_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GtkAccessible), 0, /* n_preallocs */ NULL, NULL }; static const GInterfaceInfo atk_value_interface_info = { (GInterfaceInitFunc) ags_accessible_level_value_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo atk_action_interface_info = { (GInterfaceInitFunc) ags_accessible_level_action_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_accessible_level = g_type_register_static(GTK_TYPE_ACCESSIBLE, "AgsAccessibleLevel", &ags_accesssible_level_info, 0); g_type_add_interface_static(ags_type_accessible_level, ATK_TYPE_VALUE, &atk_value_interface_info); g_type_add_interface_static(ags_type_accessible_level, ATK_TYPE_ACTION, &atk_action_interface_info); } return(ags_type_accessible_level); } void ags_level_class_init(AgsLevelClass *level) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_level_parent_class = g_type_class_peek_parent(level); quark_accessible_object = g_quark_from_static_string("ags-accessible-object"); /* GObjectClass */ gobject = (GObjectClass *) level; gobject->set_property = ags_level_set_property; gobject->get_property = ags_level_get_property; gobject->finalize = ags_level_finalize; /* properties */ /** * AgsLevel:lower: * * The level's lower range. * * Since: 1.4.0 */ param_spec = g_param_spec_double("lower", "lower", "The lower of level", -G_MAXDOUBLE, G_MAXDOUBLE, AGS_LEVEL_DEFAULT_LOWER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LOWER, param_spec); /** * AgsLevel:upper: * * The level's upper range. * * Since: 1.4.0 */ param_spec = g_param_spec_double("upper", "upper", "The upper of level", -G_MAXDOUBLE, G_MAXDOUBLE, AGS_LEVEL_DEFAULT_UPPER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UPPER, param_spec); /** * AgsLevel:normalized-volume: * * The level's default value. * * Since: 1.4.0 */ param_spec = g_param_spec_double("normalized-volume", "normalized volume", "The normalized volume of level", -G_MAXDOUBLE, G_MAXDOUBLE, AGS_LEVEL_DEFAULT_NORMALIZED_VOLUME, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NORMALIZED_VOLUME, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) level; widget->get_accessible = ags_level_get_accessible; // widget->map = ags_level_map; widget->realize = ags_level_realize; widget->expose_event = ags_level_expose; widget->size_request = ags_level_size_request; widget->size_allocate = ags_level_size_allocate; widget->button_press_event = ags_level_button_press; widget->button_release_event = ags_level_button_release; widget->key_press_event = ags_level_key_press; widget->key_release_event = ags_level_key_release; widget->motion_notify_event = ags_level_motion_notify; widget->show = ags_level_show; /* AgsLevelClass */ level->value_changed = NULL; /* signals */ /** * AgsLevel::value-changed: * @level: the #AgsLevel * @normalized_volume: the changed default value * * The ::value-changed signal notifies about modified default value. * * Since: 1.4.0 */ level_signals[VALUE_CHANGED] = g_signal_new("value-changed", G_TYPE_FROM_CLASS(level), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLevelClass, value_changed), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); } void ags_accessible_level_class_init(AtkObject *object) { /* empty */ } void ags_accessible_level_value_interface_init(AtkValueIface *value) { value->get_current_value = NULL; value->get_maximum_value = NULL; value->get_minimum_value = NULL; value->set_current_value = NULL; value->get_minimum_increment = NULL; #ifdef HAVE_ATK_2_12 value->get_value_and_text = ags_accessible_level_get_value_and_text; value->get_range = ags_accessible_level_get_range; value->get_increment = ags_accessible_level_get_increment; value->get_sub_ranges = NULL; value->set_value = ags_accessible_level_set_value; #endif } void ags_accessible_level_action_interface_init(AtkActionIface *action) { action->do_action = ags_accessible_level_do_action; action->get_n_actions = ags_accessible_level_get_n_actions; action->get_description = ags_accessible_level_get_description; action->get_name = ags_accessible_level_get_name; action->get_keybinding = ags_accessible_level_get_keybinding; action->set_description = ags_accessible_level_set_description; action->get_localized_name = ags_accessible_level_get_localized_name; } void ags_level_init(AgsLevel *level) { AtkObject *accessible; g_object_set(G_OBJECT(level), "app-paintable", TRUE, "can-focus", TRUE, NULL); accessible = gtk_widget_get_accessible((GtkWidget *) level); g_object_set(accessible, "accessible-name", "level", "accessible-description", "Specify a default value", NULL); level->flags = 0; level->key_mask = 0; level->button_state = 0; level->layout = AGS_LEVEL_LAYOUT_VERTICAL; level->font_size = 11; level->level_width = AGS_LEVEL_DEFAULT_WIDTH; level->level_height = AGS_LEVEL_DEFAULT_HEIGHT; level->lower = AGS_LEVEL_DEFAULT_LOWER; level->upper = AGS_LEVEL_DEFAULT_UPPER; level->normalized_volume = AGS_LEVEL_DEFAULT_NORMALIZED_VOLUME; level->step_count = AGS_LEVEL_DEFAULT_STEP_COUNT; level->page_size = AGS_LEVEL_DEFAULT_PAGE_SIZE; level->samplerate = AGS_LEVEL_DEFAULT_SAMPLERATE; level->audio_channel = NULL; level->audio_channel_count = 0; } void ags_level_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLevel *level; level = AGS_LEVEL(gobject); switch(prop_id){ case PROP_LOWER: { level->lower = g_value_get_double(value); gtk_widget_queue_draw(level); } break; case PROP_UPPER: { level->upper = g_value_get_double(value); gtk_widget_queue_draw(level); } break; case PROP_NORMALIZED_VOLUME: { level->normalized_volume = g_value_get_double(value); gtk_widget_queue_draw(level); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_level_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLevel *level; level = AGS_LEVEL(gobject); switch(prop_id){ case PROP_LOWER: { g_value_set_double(value, level->lower); } break; case PROP_UPPER: { g_value_set_double(value, level->upper); } break; case PROP_NORMALIZED_VOLUME: { g_value_set_double(value, level->normalized_volume); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_level_finalize(GObject *gobject) { AgsLevel *level; level = AGS_LEVEL(gobject); /* call parent */ G_OBJECT_CLASS(ags_level_parent_class)->finalize(gobject); } void ags_accessible_level_get_value_and_text(AtkValue *value, gdouble *current_value, gchar **text) { AgsLevel *level; level = (AgsLevel *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); if(current_value != NULL){ *current_value = level->normalized_volume; } if(text != NULL){ *text = g_strdup_printf("%f", level->normalized_volume); } } #ifdef HAVE_ATK_2_12 AtkRange* ags_accessible_level_get_range(AtkValue *value) { AgsLevel *level; AtkRange *range; level = (AgsLevel *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); range = atk_range_new(level->lower, level->upper, "Valid lower and upper input range of this level"); } #endif gdouble ags_accessible_level_get_increment(AtkValue *value) { AgsLevel *level; level = (AgsLevel *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); return((level->upper - level->lower) / level->step_count); } void ags_accessible_level_set_value(AtkValue *value, gdouble new_value) { AgsLevel *level; level = (AgsLevel *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); level->normalized_volume = new_value; gtk_widget_queue_draw((GtkWidget *) level); } gboolean ags_accessible_level_do_action(AtkAction *action, gint i) { AgsLevel *level; GdkEventKey *key_press, *key_release; if(!(i >= 0 && i < 4)){ return(FALSE); } level = (AgsLevel *) gtk_accessible_get_widget(GTK_ACCESSIBLE(action)); key_press = gdk_event_new(GDK_KEY_PRESS); key_release = gdk_event_new(GDK_KEY_RELEASE); switch(i){ case AGS_LEVEL_STEP_UP: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) level, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) level, (GdkEvent *) key_release); } break; case AGS_LEVEL_STEP_DOWN: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) level, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) level, (GdkEvent *) key_release); } break; case AGS_LEVEL_PAGE_UP: { key_press->keyval = key_release->keyval = GDK_KEY_Page_Up; /* send event */ gtk_widget_event((GtkWidget *) level, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) level, (GdkEvent *) key_release); } break; case AGS_LEVEL_PAGE_DOWN: { key_press->keyval = key_release->keyval = GDK_KEY_Page_Down; /* send event */ gtk_widget_event((GtkWidget *) level, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) level, (GdkEvent *) key_release); } break; } return(TRUE); } gint ags_accessible_level_get_n_actions(AtkAction *action) { return(4); } const gchar* ags_accessible_level_get_description(AtkAction *action, gint i) { static const gchar *actions[] = { "step up level default value", "step down level default value", "page up level default value", "page down level default value", }; if(i >= 0 && i < 4){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_level_get_name(AtkAction *action, gint i) { static const gchar *actions[] = { "step-up", "step-down", "page-up", "page-down", }; if(i >= 0 && i < 4){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_level_get_keybinding(AtkAction *action, gint i) { static const gchar *actions[] = { "up", "down", "page-up", "page-down", }; if(i >= 0 && i < 4){ return(actions[i]); }else{ return(NULL); } } gboolean ags_accessible_level_set_description(AtkAction *action, gint i) { //TODO:JK: implement me return(FALSE); } gchar* ags_accessible_level_get_localized_name(AtkAction *action, gint i) { //TODO:JK: implement me return(NULL); } void ags_level_map(GtkWidget *widget) { if(gtk_widget_get_realized (widget) && !gtk_widget_get_mapped(widget)){ GTK_WIDGET_CLASS(ags_level_parent_class)->map(widget); gdk_window_show(widget->window); ags_level_draw((AgsLevel *) widget); } } void ags_level_realize(GtkWidget *widget) { AgsLevel *level; GdkWindowAttr attributes; gint attributes_mask; g_return_if_fail(widget != NULL); g_return_if_fail(AGS_IS_LEVEL(widget)); level = AGS_LEVEL(widget); gtk_widget_set_realized(widget, TRUE); /* */ attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = AGS_LEVEL_DEFAULT_WIDTH; attributes.height = AGS_LEVEL_DEFAULT_HEIGHT; attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask |= (GDK_EXPOSURE_MASK); widget->window = gdk_window_new(gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data(widget->window, level); widget->style = gtk_style_attach(widget->style, widget->window); gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); gtk_widget_queue_resize(widget); } AtkObject* ags_level_get_accessible(GtkWidget *widget) { AtkObject* accessible; accessible = g_object_get_qdata(G_OBJECT(widget), quark_accessible_object); if(!accessible){ accessible = g_object_new(ags_accessible_level_get_type(), NULL); g_object_set_qdata(G_OBJECT(widget), quark_accessible_object, accessible); gtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), widget); } return(accessible); } void ags_level_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_level_parent_class)->show(widget); } void ags_level_size_request(GtkWidget *widget, GtkRequisition *requisition) { AgsLevel *level; level = AGS_LEVEL(widget); if(level->layout == AGS_LEVEL_LAYOUT_VERTICAL){ requisition->width = level->level_width; requisition->height = level->level_height; }else if(level->layout == AGS_LEVEL_LAYOUT_HORIZONTAL){ requisition->width = level->level_height; requisition->height = level->level_width; } } void ags_level_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsLevel *level; GdkWindow *window; level = AGS_LEVEL(widget); widget->allocation = *allocation; window = gtk_widget_get_window(widget); gdk_window_move(window, allocation->x, allocation->y); if(level->layout == AGS_LEVEL_LAYOUT_VERTICAL){ widget->allocation.width = level->level_width; widget->allocation.height = level->level_height; allocation->height = level->level_height; }else if(level->layout == AGS_LEVEL_LAYOUT_HORIZONTAL){ widget->allocation.width = level->level_height; widget->allocation.height = level->level_width; allocation->width = level->level_height; } } gboolean ags_level_expose(GtkWidget *widget, GdkEventExpose *event) { ags_level_draw(AGS_LEVEL(widget)); return(FALSE); } gboolean ags_level_button_press(GtkWidget *widget, GdkEventButton *event) { AgsLevel *level; guint width, height; guint x_start, y_start; level = AGS_LEVEL(widget); width = widget->allocation.width; height = widget->allocation.height; x_start = 0; y_start = 0; if(event->x >= x_start && event->x < width && event->y >= y_start && event->y < height){ if(event->button == 1){ gdouble c_range; gdouble normalized_volume; level->button_state |= AGS_LEVEL_BUTTON_1_PRESSED; c_range = level->upper - level->lower; if(level->layout == AGS_LEVEL_LAYOUT_VERTICAL){ normalized_volume = event->y / c_range; }else if(level->layout == AGS_LEVEL_LAYOUT_HORIZONTAL){ normalized_volume = event->x / c_range; } level->normalized_volume = normalized_volume; gtk_widget_queue_draw(level); ags_level_value_changed(level, normalized_volume); } } return(FALSE); } gboolean ags_level_button_release(GtkWidget *widget, GdkEventButton *event) { AgsLevel *level; gtk_widget_grab_focus(widget); level = AGS_LEVEL(widget); if(event->button == 1){ if((AGS_LEVEL_BUTTON_1_PRESSED & (level->button_state)) != 0){ gdouble c_range; gdouble normalized_volume; level->button_state |= AGS_LEVEL_BUTTON_1_PRESSED; c_range = level->upper - level->lower; if(level->layout == AGS_LEVEL_LAYOUT_VERTICAL){ normalized_volume = event->y / c_range; }else if(level->layout == AGS_LEVEL_LAYOUT_HORIZONTAL){ normalized_volume = event->x / c_range; } level->normalized_volume = normalized_volume; gtk_widget_queue_draw(level); ags_level_value_changed(level, normalized_volume); } level->button_state &= (~AGS_LEVEL_BUTTON_1_PRESSED); } return(FALSE); } gboolean ags_level_key_press(GtkWidget *widget, GdkEventKey *event) { if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ return(GTK_WIDGET_CLASS(ags_level_parent_class)->key_press_event(widget, event)); } return(TRUE); } gboolean ags_level_key_release(GtkWidget *widget, GdkEventKey *event) { AgsLevel *level; //TODO:JK: implement me if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ return(GTK_WIDGET_CLASS(ags_level_parent_class)->key_release_event(widget, event)); } level = AGS_LEVEL(widget); switch(event->keyval){ case GDK_KEY_Up: case GDK_KEY_uparrow: { gdouble c_range; gdouble step; c_range = level->upper - level->lower; step = c_range / level->step_count; if(level->normalized_volume + log(step) > level->upper){ level->normalized_volume = level->upper; }else{ level->normalized_volume += log(step); } gtk_widget_queue_draw(widget); ags_level_value_changed(level, level->normalized_volume); } break; case GDK_KEY_Down: case GDK_KEY_downarrow: { gdouble c_range; gdouble step; c_range = level->upper - level->lower; step = c_range / level->step_count; if(level->normalized_volume - log(step) < level->lower){ level->normalized_volume = level->lower; }else{ level->normalized_volume -= log(step); } gtk_widget_queue_draw(widget); ags_level_value_changed(level, level->normalized_volume); } break; case GDK_KEY_Page_Up: case GDK_KEY_KP_Page_Up: { gdouble c_range; gdouble page; c_range = level->upper - level->lower; page = level->page_size * (c_range / level->step_count); if(level->normalized_volume + log(page) > level->upper){ level->normalized_volume = level->upper; }else{ level->normalized_volume += log(page); } gtk_widget_queue_draw(widget); ags_level_value_changed(level, level->normalized_volume); } break; case GDK_KEY_Page_Down: case GDK_KEY_KP_Page_Down: { gdouble c_range; gdouble page; c_range = level->upper - level->lower; page = level->page_size * (c_range / level->step_count); if(level->normalized_volume - log(page) < level->lower){ level->normalized_volume = level->lower; }else{ level->normalized_volume -= log(page); } gtk_widget_queue_draw(widget); ags_level_value_changed(level, level->normalized_volume); } break; } return(TRUE); } gboolean ags_level_motion_notify(GtkWidget *widget, GdkEventMotion *event) { AgsLevel *level; guint width, height; guint x_start, y_start; level = AGS_LEVEL(widget); width = widget->allocation.width; height = widget->allocation.height; x_start = 0; y_start = 0; if((AGS_LEVEL_BUTTON_1_PRESSED & (level->button_state)) != 0){ gdouble c_range; gdouble new_normalized_volume; level->button_state |= AGS_LEVEL_BUTTON_1_PRESSED; c_range = level->upper - level->lower; if(level->layout == AGS_LEVEL_LAYOUT_VERTICAL){ new_normalized_volume = event->y / c_range; }else if(level->layout == AGS_LEVEL_LAYOUT_HORIZONTAL){ new_normalized_volume = event->x / c_range; } if(new_normalized_volume != level->normalized_volume){ level->normalized_volume = new_normalized_volume; gtk_widget_queue_draw(level); ags_level_value_changed(level, new_normalized_volume); } } return(FALSE); } void ags_level_draw(AgsLevel *level) { cairo_t *cr; gchar *str; guint width, height; guint x_start, y_start; void ags_level_draw_string(cairo_t *cr, gchar *str){ PangoLayout *layout; PangoFontDescription *desc; layout = pango_cairo_create_layout(cr); pango_layout_set_text(layout, str, -1); desc = pango_font_description_from_string("Sans Slant"); //pango_font_description_copy_static("Georgia Bold 11"); pango_font_description_set_size(desc, level->font_size * PANGO_SCALE); pango_layout_set_font_description(layout, desc); pango_font_description_free(desc); pango_cairo_update_layout(cr, layout); pango_cairo_show_layout(cr, layout); #ifndef __APPLE__ pango_fc_font_map_cache_clear(pango_cairo_font_map_get_default()); #endif g_object_unref(layout); } static const gdouble white_gc = 65535.0; if(!AGS_IS_LEVEL(level)){ return; } cr = gdk_cairo_create(GTK_WIDGET(level)->window); if(cr == NULL){ return; } width = GTK_WIDGET(level)->allocation.width; height = GTK_WIDGET(level)->allocation.height; x_start = 0; y_start = 0; cairo_surface_flush(cairo_get_target(cr)); cairo_push_group(cr); /* background */ cairo_set_source_rgb(cr, 0.0, 0.0, 0.0); cairo_rectangle(cr, (gdouble) x_start, (gdouble) y_start, (gdouble) width, (gdouble) height); cairo_fill(cr); /* box */ cairo_set_source_rgb(cr, 0.5, 0.4, 0.0); cairo_set_line_width(cr, 1.0); cairo_rectangle(cr, (gdouble) x_start, (gdouble) y_start, (gdouble) width, (gdouble) height); cairo_stroke(cr); /* draw level */ //TODO:JK: implement me /* show samplerate */ str = g_strdup_printf("%u", level->samplerate); cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); if(level->layout == AGS_LEVEL_LAYOUT_VERTICAL){ cairo_move_to(cr, x_start + level->font_size, y_start + height - 1.0); cairo_rotate(cr, 2 * M_PI * 0.75); }else{ cairo_move_to(cr, x_start + level->font_size, y_start + 1.0); } ags_level_draw_string(cr, str); cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } /** * ags_level_value_changed: * @level: the #AgsLevel * @normalized_volume: the normalized volume * * Emits ::value-changed event. * * Since: 1.4.0 */ void ags_level_value_changed(AgsLevel *level, gdouble normalized_volume) { g_return_if_fail(AGS_IS_LEVEL(level)); g_object_ref((GObject *) level); g_signal_emit(G_OBJECT(level), level_signals[VALUE_CHANGED], 0, normalized_volume); g_object_unref((GObject *) level); } /** * ags_level_new: * * Create a new instance of #AgsLevel. * * Returns: the new #AgsLevel instance * * Since: 1.4.0 */ AgsLevel* ags_level_new() { AgsLevel *level; level = (AgsLevel *) g_object_new(AGS_TYPE_LEVEL, NULL); return(level); } gsequencer-1.4.24/ags/widget/ags_htimebar.h0000644000175000017500000000336613246707333015537 00000000000000/* 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 . */ #ifndef __AGS_HTIMEBAR_H__ #define __AGS_HTIMEBAR_H__ #include #include #include #include #define AGS_TYPE_HTIMEBAR (ags_htimebar_get_type()) #define AGS_HTIMEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_HTIMEBAR, AgsHTimebar)) #define AGS_HTIMEBAR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_HTIMEBAR, AgsHTimebarClass)) #define AGS_IS_HTIMEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_HTIMEBAR)) #define AGS_IS_HTIMEBAR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_HTIMEBAR)) #define AGS_HTIMEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_HTIMEBAR, AgsHTimebarClass)) typedef struct _AgsHTimebar AgsHTimebar; typedef struct _AgsHTimebarClass AgsHTimebarClass; struct _AgsHTimebar { AgsTimebar range; }; struct _AgsHTimebarClass { AgsTimebarClass timebar; }; AgsHTimebar* ags_htimebar_new(); #endif /*__AGS_HTIMEBAR_H__*/ gsequencer-1.4.24/ags/widget/ags_waveform.c0000644000175000017500000000402613247044247015556 00000000000000/* 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 . */ #include "ags_waveform.h" void ags_waveform_class_init(AgsWaveformClass *waveform); void ags_waveform_init(AgsWaveform *waveform); void ags_waveform_show(GtkWidget *widget); static gpointer ags_waveform_parent_class = NULL; GType ags_waveform_get_type(void) { static GType ags_type_waveform = 0; if(!ags_type_waveform){ static const GTypeInfo ags_waveform_info = { sizeof(AgsWaveformClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_waveform_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsWaveform), 0, /* n_preallocs */ (GInstanceInitFunc) ags_waveform_init, }; ags_type_waveform = g_type_register_static(GTK_TYPE_WIDGET, "AgsWaveform", &ags_waveform_info, 0); } return(ags_type_waveform); } void ags_waveform_class_init(AgsWaveformClass *waveform) { GtkWidgetClass *widget; ags_waveform_parent_class = g_type_class_peek_parent(waveform); } void ags_waveform_init(AgsWaveform *waveform) { g_object_set(G_OBJECT(waveform), "app-paintable", TRUE, NULL); } AgsWaveform* ags_waveform_new() { AgsWaveform *waveform; waveform = (AgsWaveform *) g_object_new(AGS_TYPE_WAVEFORM, NULL); return(waveform); } gsequencer-1.4.24/ags/widget/ags_ruler.c0000644000175000017500000002651213247044247015065 00000000000000/* 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 . */ #include #include #ifndef __APPLE__ #include #endif #include void ags_ruler_class_init(AgsRulerClass *ruler); void ags_ruler_init(AgsRuler *ruler); void ags_ruler_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_ruler_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_ruler_show(GtkWidget *widget); void ags_ruler_map(GtkWidget *widget); void ags_ruler_realize(GtkWidget *widget); void ags_ruler_size_allocate(GtkWidget *widget, GtkAllocation *allocation); void ags_ruler_size_request(GtkWidget *widget, GtkRequisition *requisition); gboolean ags_ruler_expose(GtkWidget *widget, GdkEventExpose *event); void ags_ruler_draw(AgsRuler *ruler); /** * SECTION:ags_ruler * @short_description: A ruler widget * @title: AgsRuler * @section_id: * @include: ags/widget/ags_ruler.h * * #AgsRuler is a widget representing a #GtkAdjustment. */ enum{ PROP_0, PROP_ADJUSTMENT, }; static gpointer ags_ruler_parent_class = NULL; GType ags_ruler_get_type() { static GType ags_type_ruler = 0; if(!ags_type_ruler){ static const GTypeInfo ags_ruler_info = { sizeof(AgsRulerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ruler_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsRuler), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ruler_init, }; ags_type_ruler = g_type_register_static(GTK_TYPE_WIDGET, "AgsRuler\0", &ags_ruler_info, 0); } return(ags_type_ruler); } void ags_ruler_class_init(AgsRulerClass *ruler) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_ruler_parent_class = g_type_class_peek_parent(ruler); /* GObjectClass */ gobject = (GObjectClass *) ruler; gobject->set_property = ags_ruler_set_property; gobject->get_property = ags_ruler_get_property; /* GtkWidgetClass */ widget = (GtkWidgetClass *) ruler; // widget->map = ags_ruler_map; widget->realize = ags_ruler_realize; widget->expose_event = ags_ruler_expose; widget->size_allocate = ags_ruler_size_allocate; widget->size_request = ags_ruler_size_request; widget->show = ags_ruler_show; /* properties */ param_spec = g_param_spec_object("adjustment\0", "assigned adjustment\0", "The adjustment it is assigned with\0", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ADJUSTMENT, param_spec); } void ags_ruler_init(AgsRuler *ruler) { g_object_set(G_OBJECT(ruler), "app-paintable\0", TRUE, NULL); ruler->flags = 0; ruler->font_size = AGS_RULER_FONT_SIZE; ruler->adjustment = NULL; ruler->step = AGS_RULER_DEFAULT_STEP; ruler->factor = 16.0; ruler->precision = 1.0; ruler->scale_precision = 1.0; gtk_widget_set_size_request((GtkWidget *) ruler, 20, 24); } void ags_ruler_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRuler *ruler; ruler = AGS_RULER(gobject); switch(prop_id){ case PROP_ADJUSTMENT: { GtkAdjustment *adjustment; adjustment = (GtkAdjustment *) g_value_get_object(value); if(ruler->adjustment == adjustment) return; if(ruler->adjustment != NULL){ g_object_unref(G_OBJECT(ruler->adjustment)); } if(adjustment != NULL){ g_object_ref(G_OBJECT(adjustment)); } ruler->adjustment = adjustment; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ruler_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRuler *ruler; ruler = AGS_RULER(gobject); switch(prop_id){ case PROP_ADJUSTMENT: g_value_set_object(value, ruler->adjustment); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ruler_map(GtkWidget *widget) { if (gtk_widget_get_realized (widget) && !gtk_widget_get_mapped (widget)) { GTK_WIDGET_CLASS (ags_ruler_parent_class)->map(widget); gdk_window_show(widget->window); ags_ruler_draw((AgsRuler *) widget); } } void ags_ruler_realize(GtkWidget *widget) { AgsRuler *ruler; GdkWindowAttr attributes; gint attributes_mask; gint border_left, border_top; g_return_if_fail (widget != NULL); g_return_if_fail (AGS_IS_RULER (widget)); ruler = AGS_RULER(widget); gtk_widget_set_realized (widget, TRUE); /* */ attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; attributes.window_type = GDK_WINDOW_CHILD; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data (widget->window, ruler); widget->style = gtk_style_attach (widget->style, widget->window); gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); gtk_widget_queue_resize (widget); } void ags_ruler_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_ruler_parent_class)->show(widget); } void ags_ruler_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsRuler *ruler; ruler = AGS_RULER(widget); /* call parent */ GTK_WIDGET_CLASS(ags_ruler_parent_class)->size_allocate(widget, allocation); } void ags_ruler_size_request(GtkWidget *widget, GtkRequisition *requisition) { AgsRuler *ruler; ruler = AGS_RULER(widget); requisition->width = -1; requisition->height = (gint) (ruler->font_size + AGS_RULER_LARGE_STEP + (2 * AGS_RULER_FREE_SPACE)); } gboolean ags_ruler_expose(GtkWidget *widget, GdkEventExpose *event) { ags_ruler_draw(AGS_RULER(widget)); return(FALSE); } /** * ags_ruler_draw: * @ruler an #AgsRuler * * draws the widget */ void ags_ruler_draw(AgsRuler *ruler) { GtkWidget *widget; cairo_t *cr; gchar *str; gdouble tact_factor, zoom_factor; gdouble tact; guint offset; guint step; guint x0; guint z; guint i, i_stop; auto void ags_ruler_draw_string(cairo_t *cr, gchar *str); void ags_ruler_draw_string(cairo_t *cr, gchar *str){ PangoLayout *layout; PangoFontDescription *desc; layout = pango_cairo_create_layout(cr); pango_layout_set_text(layout, str, -1); desc = pango_font_description_from_string("Sans Slant"); //pango_font_description_copy_static("Georgia Bold 11"); pango_font_description_set_size(desc, ruler->font_size * PANGO_SCALE); pango_layout_set_font_description(layout, desc); pango_font_description_free(desc); pango_cairo_update_layout(cr, layout); pango_cairo_show_layout(cr, layout); #ifndef __APPLE__ pango_fc_font_map_cache_clear(pango_cairo_font_map_get_default()); #endif g_object_unref(layout); } widget = GTK_WIDGET(ruler); cr = gdk_cairo_create(widget->window); if(cr == NULL){ return; } cairo_surface_flush(cairo_get_target(cr)); cairo_push_group(cr); /* calculate base step */ tact = ruler->precision; step = ruler->step * 0.25 * ruler->factor * ruler->precision; /* draw bg */ cairo_set_source_rgba(cr, 0.0, 0.0, 0.125, 1.0); cairo_rectangle(cr, 0, 0, widget->allocation.width, widget->allocation.height); cairo_fill(cr); cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 1.0); cairo_set_line_width(cr, 1.25); /* draw scale */ offset = (ruler->adjustment->value * step); x0 = offset % step; z = (guint) floor((offset - x0) / step); i_stop = (guint) ceil((double) (widget->allocation.width + (step + x0)) / (double) step); for(i = 0; i < i_stop; i++, z++){ cairo_move_to(cr, (double) (i * step - x0), (double) (widget->allocation.height)); if(tact < 1.0){ /* draw large step */ cairo_set_line_width(cr, 1.75); cairo_line_to(cr, (double) (i * step - x0), (double) (widget->allocation.height - AGS_RULER_LARGE_STEP)); /* draw scale step */ cairo_move_to(cr, (double) (i * step - x0), (double) (widget->allocation.height - AGS_RULER_LARGE_STEP - (ruler->font_size + AGS_RULER_FREE_SPACE))); str = g_strdup_printf("%u\0", (guint) ((gdouble) z / tact)); ags_ruler_draw_string(cr, str); g_free(str); }else{ if(z % (guint) floor(tact) == 0){ /* draw large step */ cairo_set_line_width(cr, 1.75); cairo_line_to(cr, (double) (i * step - x0), (double) (widget->allocation.height - AGS_RULER_LARGE_STEP)); /* draw scale step */ cairo_move_to(cr, (double) (i * step - x0), (double) (widget->allocation.height - AGS_RULER_LARGE_STEP - (ruler->font_size + AGS_RULER_FREE_SPACE))); str = g_strdup_printf("%u\0", (guint) ((gdouble) z / tact)); ags_ruler_draw_string(cr, str); g_free(str); }else{ /* draw small step */ cairo_set_line_width(cr, 1.25); cairo_line_to(cr, (double) (i * step - x0), (double) (widget->allocation.height - AGS_RULER_SMALL_STEP)); } } cairo_stroke(cr); } cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } /** * ags_ruler_new: * * Creates an #AgsRuler * * Returns: a new #AgsRuler * * Since: 1.0.0 */ AgsRuler* ags_ruler_new() { AgsRuler *ruler; GtkAdjustment *adjustment; adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); ruler = (AgsRuler *) g_object_new(AGS_TYPE_RULER, "adjustment\0", adjustment, NULL); return(ruler); } gsequencer-1.4.24/ags/widget/ags_notebook.c0000644000175000017500000005050413247044247015552 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_notebook_class_init(AgsNotebookClass *notebook); void ags_notebook_init(AgsNotebook *notebook); void ags_notebook_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_notebook_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_notebook_finalize(GObject *gobject); void ags_notebook_size_allocate(AgsNotebook *notebook, GtkAllocation *allocation); void ags_notebook_size_request(AgsNotebook *notebook, GtkRequisition *requisition); void ags_notebook_scroll_prev_callback(GtkWidget *button, AgsNotebook *notebook); void ags_notebook_scroll_next_callback(GtkWidget *button, AgsNotebook *notebook); /** * SECTION:ags_notebook * @short_description: selection widget * @title: AgsNotebook * @section_id: * @include: ags/widget/ags_notebook.h * * The #AgsNotebook lets you select/deselect tabs and assign data to them. */ enum{ PROP_0, PROP_PREFIX, }; static gpointer ags_notebook_parent_class = NULL; GType ags_notebook_get_type(void) { static GType ags_type_notebook = 0; if(!ags_type_notebook){ static const GTypeInfo ags_notebook_info = { sizeof (AgsNotebookClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_notebook_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsNotebook), 0, /* n_preallocs */ (GInstanceInitFunc) ags_notebook_init, }; ags_type_notebook = g_type_register_static(GTK_TYPE_VBOX, "AgsNotebook", &ags_notebook_info, 0); } return(ags_type_notebook); } void ags_notebook_class_init(AgsNotebookClass *notebook) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_notebook_parent_class = g_type_class_peek_parent(notebook); /* GObjectClass */ gobject = (GObjectClass *) notebook; gobject->set_property = ags_notebook_set_property; gobject->get_property = ags_notebook_get_property; gobject->finalize = ags_notebook_finalize; /** * AgsNotebook:prefix: * * The prefix used to do enumerated labels. * * Since: 1.0.0 */ param_spec = g_param_spec_string("prefix", "enumeration prefix", "The label's enumeration prefix", AGS_NOTEBOOK_TAB_DEFAULT_PREFIX, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PREFIX, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) notebook; widget->size_allocate = ags_notebook_size_allocate; widget->size_request = ags_notebook_size_request; } void ags_notebook_init(AgsNotebook *notebook) { GtkArrow *arrow; notebook->flags = 0; notebook->tab_width = AGS_NOTEBOOK_TAB_DEFAULT_WIDTH; notebook->tab_height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; notebook->prefix = g_strdup(AGS_NOTEBOOK_TAB_DEFAULT_PREFIX); /* navigation */ notebook->navigation = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(notebook), GTK_WIDGET(notebook->navigation), FALSE, FALSE, 0); /* arrow left */ arrow = (GtkArrow *) gtk_arrow_new(GTK_ARROW_LEFT, GTK_SHADOW_NONE); notebook->scroll_prev = g_object_new(GTK_TYPE_BUTTON, "child", arrow, "relief", GTK_RELIEF_NONE, NULL); gtk_box_pack_start(GTK_BOX(notebook->navigation), GTK_WIDGET(notebook->scroll_prev), FALSE, FALSE, 0); g_signal_connect(G_OBJECT(notebook->scroll_prev), "clicked", G_CALLBACK(ags_notebook_scroll_prev_callback), notebook); /* arrow right */ arrow = (GtkArrow *) gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE); notebook->scroll_next = g_object_new(GTK_TYPE_BUTTON, "child", arrow, "relief", GTK_RELIEF_NONE, NULL); gtk_box_pack_start(GTK_BOX(notebook->navigation), GTK_WIDGET(notebook->scroll_next), FALSE, FALSE, 0); g_signal_connect(G_OBJECT(notebook->scroll_next), "clicked", G_CALLBACK(ags_notebook_scroll_next_callback), notebook); /* viewport with selection */ notebook->viewport = (GtkViewport *) gtk_viewport_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(notebook->navigation), GTK_WIDGET(notebook->viewport)); notebook->hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_container_add((GtkContainer *) notebook->viewport, (GtkWidget *) notebook->hbox); notebook->tab = NULL; notebook->tab_free_func = ags_notebook_tab_free; } void ags_notebook_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsNotebook *notebook; notebook = AGS_NOTEBOOK(gobject); switch(prop_id){ case PROP_PREFIX: { gchar *prefix; prefix = g_value_get_string(value); if(notebook->prefix == prefix){ return; } g_free(notebook->prefix); notebook->prefix = g_strdup(prefix); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notebook_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsNotebook *notebook; notebook = AGS_NOTEBOOK(gobject); switch(prop_id){ case PROP_PREFIX: { g_value_set_string(value, notebook->prefix); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notebook_finalize(GObject *gobject) { AgsNotebook *notebook; notebook = AGS_NOTEBOOK(gobject); g_free(notebook->prefix); if(notebook->tab_free_func != NULL){ g_list_free_full(notebook->tab, notebook->tab_free_func); }else{ g_list_free_full(notebook, g_free); } /* call parent */ G_OBJECT_CLASS(ags_notebook_parent_class)->finalize(gobject); } void ags_notebook_size_allocate(AgsNotebook *notebook, GtkAllocation *allocation) { GtkAllocation child_allocation; GtkRequisition child_requisition; GList *list, *list_start; guint x; GTK_WIDGET(notebook->navigation)->allocation = *allocation; if(allocation->width < (2 * AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT) + (5 * AGS_NOTEBOOK_TAB_DEFAULT_WIDTH)){ allocation->width = (2 * AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT) + (5 * AGS_NOTEBOOK_TAB_DEFAULT_WIDTH); } allocation->height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; /* */ gtk_widget_get_child_requisition((GtkWidget *) notebook->navigation, &child_requisition); child_allocation.x = allocation->x; child_allocation.y = allocation->y; child_allocation.width = 2 * AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; child_allocation.height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; gtk_widget_size_allocate((GtkWidget *) notebook->navigation, &child_allocation); /* */ gtk_widget_get_child_requisition((GtkWidget *) notebook->scroll_prev, &child_requisition); child_allocation.x = allocation->x; child_allocation.y = allocation->y; child_allocation.width = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; child_allocation.height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; gtk_widget_size_allocate((GtkWidget *) notebook->scroll_prev, &child_allocation); gtk_widget_get_child_requisition(gtk_bin_get_child((GtkBin *) notebook->scroll_prev), &child_requisition); child_allocation.x = allocation->x + 4; child_allocation.y = allocation->y + 4; child_allocation.width = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT - 8; child_allocation.height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT - 8; gtk_widget_size_allocate(gtk_bin_get_child((GtkBin *) notebook->scroll_prev), &child_allocation); /* */ gtk_widget_get_child_requisition((GtkWidget *) notebook->scroll_next, &child_requisition); child_allocation.x = allocation->x + AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; child_allocation.y = allocation->y; child_allocation.width = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; child_allocation.height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; gtk_widget_size_allocate((GtkWidget *) notebook->scroll_next, &child_allocation); gtk_widget_get_child_requisition(gtk_bin_get_child((GtkBin *) notebook->scroll_next), &child_requisition); child_allocation.x = allocation->x + AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT + 4; child_allocation.y = allocation->y + 4; child_allocation.width = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT - 8; child_allocation.height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT - 8; gtk_widget_size_allocate(gtk_bin_get_child((GtkBin *) notebook->scroll_next), &child_allocation); /* */ gtk_widget_get_child_requisition((GtkWidget *) notebook->viewport, &child_requisition); child_allocation.x = allocation->x + 2 * AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; child_allocation.y = allocation->y; child_allocation.width = allocation->width - 2 * AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; child_allocation.height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; gtk_widget_size_allocate((GtkWidget *) notebook->viewport, &child_allocation); /* */ list_start = list = gtk_container_get_children((GtkContainer *) notebook->hbox); /* */ gtk_widget_get_child_requisition((GtkWidget *) notebook->hbox, &child_requisition); child_allocation.x = 0; child_allocation.y = 0; child_allocation.width = g_list_length(list) * AGS_NOTEBOOK_TAB_DEFAULT_WIDTH; if(child_allocation.width < allocation->width - 2 * AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT){ child_allocation.width = allocation->width - 2 * AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; } child_allocation.height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; gtk_widget_size_allocate((GtkWidget *) notebook->hbox, &child_allocation); x = 0; while(list != NULL){ gtk_widget_get_child_requisition((GtkWidget *) list->data, &child_requisition); child_allocation.x = x; child_allocation.y = 0; child_allocation.width = AGS_NOTEBOOK_TAB_DEFAULT_WIDTH; child_allocation.height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; gtk_widget_size_allocate(list->data, &child_allocation); x += AGS_NOTEBOOK_TAB_DEFAULT_WIDTH; list = list->next; } g_list_free(list_start); // gtk_widget_size_allocate(notebook->hbox); } void ags_notebook_size_request(AgsNotebook *notebook, GtkRequisition *requisition) { GtkRequisition child_requisition; GList *list, *list_start; requisition->height = AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT; requisition->width = -1; list_start = list = gtk_container_get_children((GtkContainer *) notebook); while(list != NULL){ gtk_widget_size_request((GtkWidget *) list->data, &child_requisition); list = list->next; } g_list_free(list_start); //FIXME:JK: ugh if(GTK_WIDGET(notebook)->parent == NULL){ return; } } void ags_notebook_scroll_prev_callback(GtkWidget *button, AgsNotebook *notebook) { GtkAdjustment *adjustment; adjustment = gtk_viewport_get_hadjustment(notebook->viewport); if(adjustment->value - adjustment->step_increment > 0){ gtk_adjustment_set_value(adjustment, adjustment->value - adjustment->step_increment); }else{ gtk_adjustment_set_value(adjustment, 0.0); } gtk_widget_show_all((GtkWidget *) notebook->hbox); } void ags_notebook_scroll_next_callback(GtkWidget *button, AgsNotebook *notebook) { GtkAdjustment *adjustment; adjustment = gtk_viewport_get_hadjustment(notebook->viewport); if(adjustment->value + adjustment->step_increment < adjustment->upper - adjustment->page_size){ gtk_adjustment_set_value(adjustment, adjustment->value + adjustment->step_increment); }else{ gtk_adjustment_set_value(adjustment, adjustment->upper - adjustment->page_size); } gtk_widget_show_all((GtkWidget *) notebook->hbox); } /** * ags_notebook_tab_alloc: * * Allocate #AgsNotebookTab-struct. * * Returns: the newly allocated #AgsNotebookTab-struct * * Since: 1.0.0 */ AgsNotebookTab* ags_notebook_tab_alloc() { AgsNotebookTab *notebook_tab; notebook_tab = (AgsNotebookTab *) malloc(sizeof(AgsNotebookTab)); notebook_tab->data = NULL; notebook_tab->toggle = NULL; return(notebook_tab); } /** * ags_notebook_tab_free: * @tab: the #AgsNotebookTab-struct * * Free @tab's memory. * * Since: 1.0.0 */ void ags_notebook_tab_free(AgsNotebookTab *tab) { if(tab == NULL){ return; } g_free(tab->data); g_free(tab); } /** * ags_notebook_tab_set_data: * @notebook: the #AgsNotebook * @position: the tab's position * @data: the data to set * * Set the data field of #AgsNotebookTab-struct at @position. * * Since: 1.2.0 */ void ags_notebook_tab_set_data(AgsNotebook *notebook, gint position, gpointer data) { GList *tab; if(!AGS_IS_NOTEBOOK(notebook) || position < 0){ return; } tab = g_list_nth(notebook->tab, position); if(tab != NULL && tab->data != NULL){ AGS_NOTEBOOK_TAB(tab->data)->data = data; } } /** * ags_notebook_tab_index: * @notebook: the #AgsNotebook * @data: the assigned data * * Retrieve tab index assigned with @data. * * Returns: the position as integer * * Since: 1.0.0 */ gint ags_notebook_tab_index(AgsNotebook *notebook, gpointer data) { GList *list; gint i; if(!AGS_IS_NOTEBOOK(notebook)){ return(-1); } list = notebook->tab; for(i = g_list_length(notebook->tab) - 1; list != NULL; i--){ if(AGS_NOTEBOOK_TAB(list->data)->data == data){ return(i); } list = list->next; } return(-1); } /** * ags_notebook_next_active_tab: * @notebook: the #AgsNotebook * @position: the position as integer * * Get next active tab following @position. * * Returns: the position of next active tab as integer * * Since: 1.0.0 */ gint ags_notebook_next_active_tab(AgsNotebook *notebook, gint position) { GList *list, *list_start; gint i; if(!AGS_IS_NOTEBOOK(notebook)){ return(-1); } list_start = g_list_copy(notebook->tab); list_start = list = g_list_reverse(list_start); list = g_list_nth(list, position); for(i = 0; list != NULL;){ if(gtk_toggle_button_get_active(AGS_NOTEBOOK_TAB(list->data)->toggle)){ g_list_free(list_start); return(position + i); } /* iterate */ list = list->next; i++; } g_list_free(list_start); return(-1); } /** * ags_notebook_add_tab: * @notebook: the #AgsNotebook * * Add a new #AgsNotebookTab-struct to @notebook. * * Returns: the position as integer * * Since: 1.0.0 */ gint ags_notebook_add_tab(AgsNotebook *notebook) { AgsNotebookTab *tab; GtkViewport *viewport; GtkAdjustment *adjustment; gchar *str; gint tab_index; gint length; guint width; if(!AGS_IS_NOTEBOOK(notebook)){ return(-1); } /* new tab */ tab = ags_notebook_tab_alloc(); notebook->tab = g_list_prepend(notebook->tab, tab); tab_index = g_list_length(notebook->tab); str = NULL; if((AGS_NOTEBOOK_TAB_PREFIXED_LABEL & (notebook->flags)) != 0 && (AGS_NOTEBOOK_TAB_ENUMERATE & (notebook->flags)) != 0){ str = g_strdup_printf("%s %d", notebook->prefix, tab_index); }else if((AGS_NOTEBOOK_TAB_PREFIXED_LABEL & (notebook->flags)) != 0){ str = g_strdup_printf("%s", notebook->prefix); }else if((AGS_NOTEBOOK_TAB_ENUMERATE & (notebook->flags)) != 0){ str = g_strdup_printf("%d", tab_index); } tab->toggle = (GtkToggleButton *) g_object_new(tab->toggle, "label", str, "xalign", 0.0, "yalign", 0.0, "active", TRUE, NULL); gtk_widget_set_size_request((GtkWidget *) tab->toggle, AGS_NOTEBOOK_TAB_DEFAULT_WIDTH, AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT); gtk_box_pack_start(GTK_BOX(notebook->hbox), GTK_WIDGET(tab->toggle), FALSE, FALSE, 0); gtk_widget_show_all((GtkWidget *) notebook->hbox); g_free(str); return(tab_index); } /** * ags_notebook_add_tab_with_label: * @notebook: the #AgsNotebook * @data: the assigned data * * Add a new #AgsNotebookTab-struct to @notebook and set specified @label. * * Returns: the position as integer * * Since: 1.2.0 */ gint ags_notebook_add_tab_with_label(AgsNotebook *notebook, gchar *label) { GList *tab; gint position; if(!AGS_IS_NOTEBOOK(notebook)){ return(-1); } position = ags_notebook_add_tab(notebook); tab = g_list_nth(notebook->tab, position); if(tab != NULL){ g_object_set(AGS_NOTEBOOK_TAB(tab->data)->toggle, "label", label, NULL); } return(position); } /** * ags_notebook_insert_tab: * @notebook: the #AgsNotebook * @position: the position as integer * * Insert a new #AgsNotebookTab-struct to @notebook. * * Since: 1.2.0 */ void ags_notebook_insert_tab(AgsNotebook *notebook, gint position) { AgsNotebookTab *tab; GtkAdjustment *adjustment; gint length; guint width; if(!AGS_IS_NOTEBOOK(notebook)){ return; } /* insert tab */ length = g_list_length(notebook->tab); tab = ags_notebook_tab_alloc(); notebook->tab = g_list_insert(notebook->tab, tab, length - position); tab->toggle = (GtkToggleButton *) gtk_toggle_button_new_with_label(g_strdup_printf("%s %d", notebook->prefix, position + 1)); g_object_set(tab->toggle, "xalign", 0.0, "yalign", 0.0, NULL); gtk_widget_set_size_request((GtkWidget *) tab->toggle, AGS_NOTEBOOK_TAB_DEFAULT_WIDTH, AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT); gtk_box_pack_start(GTK_BOX(notebook->hbox), GTK_WIDGET(tab->toggle), FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(notebook->hbox), GTK_WIDGET(tab->toggle), position); gtk_widget_show_all((GtkWidget *) notebook->hbox); } /** * ags_notebook_insert_tab_with_label: * @notebook: the #AgsNotebook * @label: the label as string * @position: the position as integer * * Insert a new #AgsNotebookTab-struct to @notebook at @position and set specified @label. * * Since: 1.2.0 */ void ags_notebook_insert_tab_with_label(AgsNotebook *notebook, gchar *label, gint position) { GList *tab; if(!AGS_IS_NOTEBOOK(notebook)){ return; } ags_notebook_insert_tab(notebook, position); tab = g_list_nth(notebook->tab, position); if(tab != NULL){ g_object_set(AGS_NOTEBOOK_TAB(tab->data)->toggle, "label", label, NULL); } } /** * ags_notebook_remove_tab: * @notebook: the #AgsNotebook * @position: the position of the tab * * Remove #AgsNotebookTab at @position. * * Since: 1.0.0 */ void ags_notebook_remove_tab(AgsNotebook *notebook, gint position) { AgsNotebookTab *tab; gint length; if(!AGS_IS_NOTEBOOK(notebook) || notebook->tab == NULL || position < 0){ return; } length = g_list_length(notebook->tab); tab = g_list_nth_data(notebook->tab, length - position - 1); if(tab != NULL){ notebook->tab = g_list_remove(notebook->tab, tab); gtk_widget_destroy(GTK_WIDGET(tab->toggle)); if(notebook->tab_free_func != NULL){ notebook->tab_free_func(tab); } } } /** * ags_notebook_remove_tab_with_data: * @notebook: the #AgsNotebook * @data: the data to lookup * * Remove #AgsNotebookTab assigned with @data. * * Since: 1.2.0 */ void ags_notebook_remove_tab_with_data(AgsNotebook *notebook, gpointer data) { gint position; if(!AGS_IS_NOTEBOOK(notebook)){ return; } position = ags_notebook_tab_index(notebook, data); ags_notebook_remove_tab(notebook, position); } /** * ags_notebook_new: * * Create a new #AgsNotebook. * * Returns: a new #AgsNotebook * * Since: 1.0.0 */ AgsNotebook* ags_notebook_new() { AgsNotebook *notebook; notebook = (AgsNotebook *) g_object_new(AGS_TYPE_NOTEBOOK, NULL); return(notebook); } gsequencer-1.4.24/ags/widget/ags_led.h0000644000175000017500000000350113246707333014477 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LED_H__ #define __AGS_LED_H__ #include #include #include #define AGS_TYPE_LED (ags_led_get_type()) #define AGS_LED(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LED, AgsLed)) #define AGS_LED_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LED, AgsLedClass)) #define AGS_IS_LED(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_LED)) #define AGS_IS_LED_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_LED)) #define AGS_LED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_LED, AgsLedClass)) #define AGS_LED_DEFAULT_WIDTH (12) #define AGS_LED_DEFAULT_HEIGHT (8) typedef struct _AgsLed AgsLed; typedef struct _AgsLedClass AgsLedClass; typedef enum{ AGS_LED_ACTIVE = 1, }AgsLedFlags; struct _AgsLed { GtkBin bin; guint flags; }; struct _AgsLedClass { GtkBinClass bin; }; GType ags_led_get_type(void); void ags_led_set_active(AgsLed *led); void ags_led_unset_active(AgsLed *led); AgsLed* ags_led_new(); #endif /*__AGS_LED_H__*/ gsequencer-1.4.24/ags/widget/ags_table.h0000644000175000017500000000331513246707333015025 00000000000000/* 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 . */ #ifndef __AGS_TABLE_H__ #define __AGS_TABLE_H__ #include #include #include #define AGS_TYPE_TABLE (ags_table_get_type()) #define AGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TABLE, AgsTable)) #define AGS_TABLE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TABLE, AgsTableClass)) #define AGS_IS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_TABLE)) #define AGS_IS_TABLE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_TABLE)) #define AGS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_TABLE, AgsTableClass)) typedef struct _AgsTable AgsTable; typedef struct _AgsTableClass AgsTableClass; struct _AgsTable { GtkTable table; }; struct _AgsTableClass { GtkTableClass table; }; GType ags_table_get_type(void); AgsTable* ags_table_new(guint row, guint columns, gboolean homogeneous); #endif /*__AGS_TABLE_H__*/ gsequencer-1.4.24/ags/widget/ags_vlevel_box.h0000644000175000017500000000352213247044247016102 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_VLEVEL_BOX_H__ #define __AGS_VLEVEL_BOX_H__ #include #include #include #include #define AGS_TYPE_VLEVEL_BOX (ags_vlevel_box_get_type()) #define AGS_VLEVEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_VLEVEL_BOX, AgsVLevelBox)) #define AGS_VLEVEL_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_VLEVEL_BOX, AgsVLevelBoxClass)) #define AGS_IS_VLEVEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_VLEVEL_BOX)) #define AGS_IS_VLEVEL_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_VLEVEL_BOX)) #define AGS_VLEVEL_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_VLEVEL_BOX, AgsVLevelBoxClass)) typedef struct _AgsVLevelBox AgsVLevelBox; typedef struct _AgsVLevelBoxClass AgsVLevelBoxClass; struct _AgsVLevelBox { AgsLevelBox level_box; }; struct _AgsVLevelBoxClass { AgsLevelBoxClass level_box; }; GType ags_vlevel_box_get_type(void); AgsVLevelBox* ags_vlevel_box_new(); #endif /*__AGS_VLEVEL_BOX_H__*/ gsequencer-1.4.24/ags/widget/ags_hindicator.h0000644000175000017500000000352213246707333016062 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_HINDICATOR_H__ #define __AGS_HINDICATOR_H__ #include #include #include #include "ags_indicator.h" #define AGS_TYPE_HINDICATOR (ags_hindicator_get_type()) #define AGS_HINDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_HINDICATOR, AgsHIndicator)) #define AGS_HINDICATOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_HINDICATOR, AgsHIndicatorClass)) #define AGS_IS_HINDICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_HINDICATOR)) #define AGS_IS_HINDICATOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_HINDICATOR)) #define AGS_HINDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_HINDICATOR, AgsHIndicatorClass)) typedef struct _AgsHIndicator AgsHIndicator; typedef struct _AgsHIndicatorClass AgsHIndicatorClass; struct _AgsHIndicator { AgsIndicator indicator; }; struct _AgsHIndicatorClass { AgsIndicatorClass indicator; }; GType ags_hindicator_get_type(void); AgsHIndicator* ags_hindicator_new(); #endif /*__AGS_HINDICATOR_H__*/ gsequencer-1.4.24/ags/widget/ags_hled_array.c0000644000175000017500000000465713246707333016055 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include "ags_hled_array.h" void ags_hled_array_class_init(AgsHLedArrayClass *hled_array); void ags_hled_array_init(AgsHLedArray *hled_array); /** * SECTION:ags_hled_array * @short_description: A horizontal led array widget * @title: AgsHLedArray * @section_id: * @include: ags/widget/ags_hled_array.h * * #AgsHLedArray is a widget representing an array of horizontal leds. */ static gpointer ags_hled_array_parent_class = NULL; GType ags_hled_array_get_type(void) { static GType ags_type_hled_array = 0; if(!ags_type_hled_array){ static const GTypeInfo ags_hled_array_info = { sizeof(AgsHLedArrayClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_hled_array_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsHLedArray), 0, /* n_preallocs */ (GInstanceInitFunc) ags_hled_array_init, }; ags_type_hled_array = g_type_register_static(AGS_TYPE_LED_ARRAY, "AgsHLedArray\0", &ags_hled_array_info, 0); } return(ags_type_hled_array); } void ags_hled_array_class_init(AgsHLedArrayClass *hled_array) { /* empty */ } void ags_hled_array_init(AgsHLedArray *hled_array) { AGS_LED_ARRAY(hled_array)->box = gtk_hbox_new(FALSE, 0); gtk_container_add(hled_array, AGS_LED_ARRAY(hled_array)->box); gtk_widget_show(AGS_LED_ARRAY(hled_array)->box); } /** * ags_hled_array_new: * * Creates an #AgsHLedArray. * * Returns: a new #AgsHLedArray * * Since: 1.0.0.7 */ AgsHLedArray* ags_hled_array_new() { AgsHLedArray *hled_array; hled_array = (AgsHLedArray *) g_object_new(AGS_TYPE_HLED_ARRAY, NULL); return(hled_array); } gsequencer-1.4.24/ags/widget/ags_scale_box.h0000644000175000017500000000377013247044247015701 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SCALE_BOX_H__ #define __AGS_SCALE_BOX_H__ #include #include #include #define AGS_TYPE_SCALE_BOX (ags_scale_box_get_type()) #define AGS_SCALE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SCALE_BOX, AgsScaleBox)) #define AGS_SCALE_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SCALE_BOX, AgsScaleBoxClass)) #define AGS_IS_SCALE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SCALE_BOX)) #define AGS_IS_SCALE_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SCALE_BOX)) #define AGS_SCALE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SCALE_BOX, AgsScaleBoxClass)) #define AGS_SCALE_BOX_DEFAULT_FIXED_SCALE_WIDTH (60) #define AGS_SCALE_BOX_DEFAULT_FIXED_SCALE_HEIGHT (128) typedef struct _AgsScaleBox AgsScaleBox; typedef struct _AgsScaleBoxClass AgsScaleBoxClass; typedef enum{ AGS_SCALE_BOX_FIXED_SCALE_SIZE = 1, }AgsScaleBoxFlags; struct _AgsScaleBox { GtkBox box; guint flags; guint fixed_scale_width; guint fixed_scale_height; }; struct _AgsScaleBoxClass { GtkBoxClass box; }; GType ags_scale_box_get_type(void); AgsScaleBox* ags_scale_box_new(); #endif /*__AGS_SCALE_BOX_H__*/ gsequencer-1.4.24/ags/widget/ags_piano.h0000644000175000017500000000671113247044247015046 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PIANO_H__ #define __AGS_PIANO_H__ #include #include #include #include #define AGS_TYPE_PIANO (ags_piano_get_type()) #define AGS_PIANO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PIANO, AgsPiano)) #define AGS_PIANO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PIANO, AgsPianoClass)) #define AGS_IS_PIANO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PIANO)) #define AGS_IS_PIANO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PIANO)) #define AGS_PIANO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PIANO, AgsPianoClass)) #define AGS_PIANO_DEFAULT_BASE_NOTE AGS_PIANO_KEYS_OCTAVE_0_C #define AGS_PIANO_DEFAULT_BASE_KEY_CODE (0) #define AGS_PIANO_DEFAULT_KEY_WIDTH (60) #define AGS_PIANO_DEFAULT_KEY_HEIGHT (14) #define AGS_PIANO_DEFAULT_KEY_COUNT (128) typedef struct _AgsPiano AgsPiano; typedef struct _AgsPianoClass AgsPianoClass; typedef enum{ AGS_PIANO_DRAW_FULL_SCALE = 1, AGS_PIANO_DRAW_OCTAVE_SCALE = 1 << 1, }AgsPianoFlags; typedef enum{ AGS_PIANO_BUTTON_1_PRESSED = 1, }AgsPianoButtonState; typedef enum{ AGS_PIANO_LAYOUT_VERTICAL, AGS_PIANO_LAYOUT_HORIZONTAL, }AgsPianoLayout; typedef enum{ AGS_PIANO_MOVE_CURSOR_UP, AGS_PIANO_MOVE_CURSOR_DOWN, AGS_PIANO_HIT_KEY, }AgsPianoAction; typedef enum{ AGS_PIANO_NOTE_C, AGS_PIANO_NOTE_CIS, AGS_PIANO_NOTE_D, AGS_PIANO_NOTE_DIS, AGS_PIANO_NOTE_E, AGS_PIANO_NOTE_F, AGS_PIANO_NOTE_FIS, AGS_PIANO_NOTE_G, AGS_PIANO_NOTE_GIS, AGS_PIANO_NOTE_A, AGS_PIANO_NOTE_AIS, AGS_PIANO_NOTE_H, }AgsPianoOctave; struct _AgsPiano { GtkWidget widget; guint flags; guint button_state; guint layout; guint font_size; gchar *base_note; gint base_key_code; guint key_width; guint key_height; guint key_count; gint cursor_position; gint current_key; gint *active_key; guint active_key_count; }; struct _AgsPianoClass { GtkWidgetClass widget; void (*key_pressed)(AgsPiano *piano, gchar *note, gint key_code); void (*key_released)(AgsPiano *piano, gchar *note, gint key_code); void (*key_clicked)(AgsPiano *piano, gchar *note, gint key_code); }; GType ags_piano_get_type(void); gchar* ags_piano_key_code_to_note(gint key_code); void ags_piano_key_pressed(AgsPiano *piano, gchar *note, gint key_code); void ags_piano_key_released(AgsPiano *piano, gchar *note, gint key_code); void ags_piano_key_clicked(AgsPiano *piano, gchar *note, gint key_code); gint* ags_piano_get_active_key(AgsPiano *piano, guint *active_key_count); AgsPiano* ags_piano_new(); #endif /*__AGS_PIANO_H__*/ gsequencer-1.4.24/ags/widget/ags_scrolled_scale_box.h0000644000175000017500000000423013247044247017560 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SCROLLED_SCALE_BOX_H__ #define __AGS_SCROLLED_SCALE_BOX_H__ #include #include #include #include #define AGS_TYPE_SCROLLED_SCALE_BOX (ags_scrolled_scale_box_get_type()) #define AGS_SCROLLED_SCALE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SCROLLED_SCALE_BOX, AgsScrolledScaleBox)) #define AGS_SCROLLED_SCALE_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SCROLLED_SCALE_BOX, AgsScrolledScaleBoxClass)) #define AGS_IS_SCROLLED_SCALE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SCROLLED_SCALE_BOX)) #define AGS_IS_SCROLLED_SCALE_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SCROLLED_SCALE_BOX)) #define AGS_SCROLLED_SCALE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SCROLLED_SCALE_BOX, AgsScrolledScaleBoxClass)) typedef struct _AgsScrolledScaleBox AgsScrolledScaleBox; typedef struct _AgsScrolledScaleBoxClass AgsScrolledScaleBoxClass; struct _AgsScrolledScaleBox { GtkBin bin; guint margin_top; guint margin_bottom; guint margin_left; guint margin_right; GtkViewport *viewport; AgsScaleBox *scale_box; }; struct _AgsScrolledScaleBoxClass { GtkBinClass bin; }; GType ags_scrolled_scale_box_get_type(void); AgsScrolledScaleBox* ags_scrolled_scale_box_new(); #endif /*__AGS_SCROLLED_SCALE_BOX_H__*/ gsequencer-1.4.24/ags/widget/ags_hscale_box.h0000644000175000017500000000352213247044247016044 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_HSCALE_BOX_H__ #define __AGS_HSCALE_BOX_H__ #include #include #include #include #define AGS_TYPE_HSCALE_BOX (ags_hscale_box_get_type()) #define AGS_HSCALE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_HSCALE_BOX, AgsHScaleBox)) #define AGS_HSCALE_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_HSCALE_BOX, AgsHScaleBoxClass)) #define AGS_IS_HSCALE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_HSCALE_BOX)) #define AGS_IS_HSCALE_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_HSCALE_BOX)) #define AGS_HSCALE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_HSCALE_BOX, AgsHScaleBoxClass)) typedef struct _AgsHScaleBox AgsHScaleBox; typedef struct _AgsHScaleBoxClass AgsHScaleBoxClass; struct _AgsHScaleBox { AgsScaleBox scale_box; }; struct _AgsHScaleBoxClass { AgsScaleBoxClass scale_box; }; GType ags_hscale_box_get_type(void); AgsHScaleBox* ags_hscale_box_new(); #endif /*__AGS_HSCALE_BOX_H__*/ gsequencer-1.4.24/ags/widget/ags_piano_keys.h0000644000175000017500000001444313247044247016102 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 Joël Krähemann * * Th 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 . */ #ifndef __AGS_PIANO_KEYS_H__ #define __AGS_PIANO_KEYS_H__ #define AGS_PIANO_KEYS_OCTAVE_0_C "C,," #define AGS_PIANO_KEYS_OCTAVE_0_CIS "C#,," #define AGS_PIANO_KEYS_OCTAVE_0_D "D,," #define AGS_PIANO_KEYS_OCTAVE_0_DIS "D#,," #define AGS_PIANO_KEYS_OCTAVE_0_E "E,," #define AGS_PIANO_KEYS_OCTAVE_0_F "F,," #define AGS_PIANO_KEYS_OCTAVE_0_FIS "F#,," #define AGS_PIANO_KEYS_OCTAVE_0_G "G,," #define AGS_PIANO_KEYS_OCTAVE_0_GIS "G#,," #define AGS_PIANO_KEYS_OCTAVE_0_A "A,," #define AGS_PIANO_KEYS_OCTAVE_0_AIS "A#,," #define AGS_PIANO_KEYS_OCTAVE_0_H "H,," #define AGS_PIANO_KEYS_OCTAVE_1_C "C," #define AGS_PIANO_KEYS_OCTAVE_1_CIS "C#," #define AGS_PIANO_KEYS_OCTAVE_1_D "D," #define AGS_PIANO_KEYS_OCTAVE_1_DIS "D#," #define AGS_PIANO_KEYS_OCTAVE_1_E "E," #define AGS_PIANO_KEYS_OCTAVE_1_F "F," #define AGS_PIANO_KEYS_OCTAVE_1_FIS "F#," #define AGS_PIANO_KEYS_OCTAVE_1_G "G," #define AGS_PIANO_KEYS_OCTAVE_1_GIS "G#," #define AGS_PIANO_KEYS_OCTAVE_1_A "A," #define AGS_PIANO_KEYS_OCTAVE_1_AIS "A#," #define AGS_PIANO_KEYS_OCTAVE_1_H "H," #define AGS_PIANO_KEYS_OCTAVE_2_C "C" #define AGS_PIANO_KEYS_OCTAVE_2_CIS "C#" #define AGS_PIANO_KEYS_OCTAVE_2_D "D" #define AGS_PIANO_KEYS_OCTAVE_2_DIS "D#" #define AGS_PIANO_KEYS_OCTAVE_2_E "E" #define AGS_PIANO_KEYS_OCTAVE_2_F "F" #define AGS_PIANO_KEYS_OCTAVE_2_FIS "F#" #define AGS_PIANO_KEYS_OCTAVE_2_G "G" #define AGS_PIANO_KEYS_OCTAVE_2_GIS "G#" #define AGS_PIANO_KEYS_OCTAVE_2_A "A" #define AGS_PIANO_KEYS_OCTAVE_2_AIS "A#" #define AGS_PIANO_KEYS_OCTAVE_2_H "H" #define AGS_PIANO_KEYS_OCTAVE_3_C "c" #define AGS_PIANO_KEYS_OCTAVE_3_CIS "c#" #define AGS_PIANO_KEYS_OCTAVE_3_D "d" #define AGS_PIANO_KEYS_OCTAVE_3_DIS "d#" #define AGS_PIANO_KEYS_OCTAVE_3_E "e" #define AGS_PIANO_KEYS_OCTAVE_3_F "f" #define AGS_PIANO_KEYS_OCTAVE_3_FIS "f#" #define AGS_PIANO_KEYS_OCTAVE_3_G "g" #define AGS_PIANO_KEYS_OCTAVE_3_GIS "g#" #define AGS_PIANO_KEYS_OCTAVE_3_A "a" #define AGS_PIANO_KEYS_OCTAVE_3_AIS "a#" #define AGS_PIANO_KEYS_OCTAVE_3_H "h" #define AGS_PIANO_KEYS_OCTAVE_4_C "c'" #define AGS_PIANO_KEYS_OCTAVE_4_CIS "c#'" #define AGS_PIANO_KEYS_OCTAVE_4_D "d'" #define AGS_PIANO_KEYS_OCTAVE_4_DIS "d#'" #define AGS_PIANO_KEYS_OCTAVE_4_E "e'" #define AGS_PIANO_KEYS_OCTAVE_4_F "f'" #define AGS_PIANO_KEYS_OCTAVE_4_FIS "f#'" #define AGS_PIANO_KEYS_OCTAVE_4_G "g'" #define AGS_PIANO_KEYS_OCTAVE_4_GIS "g#'" #define AGS_PIANO_KEYS_OCTAVE_4_A "a'" #define AGS_PIANO_KEYS_OCTAVE_4_AIS "a#'" #define AGS_PIANO_KEYS_OCTAVE_4_H "h'" #define AGS_PIANO_KEYS_OCTAVE_5_C "c''" #define AGS_PIANO_KEYS_OCTAVE_5_CIS "c#''" #define AGS_PIANO_KEYS_OCTAVE_5_D "d''" #define AGS_PIANO_KEYS_OCTAVE_5_DIS "d#''" #define AGS_PIANO_KEYS_OCTAVE_5_E "e''" #define AGS_PIANO_KEYS_OCTAVE_5_F "f''" #define AGS_PIANO_KEYS_OCTAVE_5_FIS "f#''" #define AGS_PIANO_KEYS_OCTAVE_5_G "g''" #define AGS_PIANO_KEYS_OCTAVE_5_GIS "g#''" #define AGS_PIANO_KEYS_OCTAVE_5_A "a''" #define AGS_PIANO_KEYS_OCTAVE_5_AIS "a#''" #define AGS_PIANO_KEYS_OCTAVE_5_H "h''" #define AGS_PIANO_KEYS_OCTAVE_6_C "c'''" #define AGS_PIANO_KEYS_OCTAVE_6_CIS "c#'''" #define AGS_PIANO_KEYS_OCTAVE_6_D "d'''" #define AGS_PIANO_KEYS_OCTAVE_6_DIS "d#'''" #define AGS_PIANO_KEYS_OCTAVE_6_E "e'''" #define AGS_PIANO_KEYS_OCTAVE_6_F "f'''" #define AGS_PIANO_KEYS_OCTAVE_6_FIS "f#'''" #define AGS_PIANO_KEYS_OCTAVE_6_G "g'''" #define AGS_PIANO_KEYS_OCTAVE_6_GIS "g#'''" #define AGS_PIANO_KEYS_OCTAVE_6_A "a'''" #define AGS_PIANO_KEYS_OCTAVE_6_AIS "a#'''" #define AGS_PIANO_KEYS_OCTAVE_6_H "h'''" #define AGS_PIANO_KEYS_OCTAVE_7_C "c''''" #define AGS_PIANO_KEYS_OCTAVE_7_CIS "c#''''" #define AGS_PIANO_KEYS_OCTAVE_7_D "d''''" #define AGS_PIANO_KEYS_OCTAVE_7_DIS "d#''''" #define AGS_PIANO_KEYS_OCTAVE_7_E "e''''" #define AGS_PIANO_KEYS_OCTAVE_7_F "f''''" #define AGS_PIANO_KEYS_OCTAVE_7_FIS "f#''''" #define AGS_PIANO_KEYS_OCTAVE_7_G "g''''" #define AGS_PIANO_KEYS_OCTAVE_7_GIS "g#''''" #define AGS_PIANO_KEYS_OCTAVE_7_A "a''''" #define AGS_PIANO_KEYS_OCTAVE_7_AIS "a#''''" #define AGS_PIANO_KEYS_OCTAVE_7_H "h''''" #define AGS_PIANO_KEYS_OCTAVE_8_C "c'''''" #define AGS_PIANO_KEYS_OCTAVE_8_CIS "c#'''''" #define AGS_PIANO_KEYS_OCTAVE_8_D "d'''''" #define AGS_PIANO_KEYS_OCTAVE_8_DIS "d#'''''" #define AGS_PIANO_KEYS_OCTAVE_8_E "e'''''" #define AGS_PIANO_KEYS_OCTAVE_8_F "f'''''" #define AGS_PIANO_KEYS_OCTAVE_8_FIS "f#'''''" #define AGS_PIANO_KEYS_OCTAVE_8_G "g'''''" #define AGS_PIANO_KEYS_OCTAVE_8_GIS "g#'''''" #define AGS_PIANO_KEYS_OCTAVE_8_A "a'''''" #define AGS_PIANO_KEYS_OCTAVE_8_AIS "a#'''''" #define AGS_PIANO_KEYS_OCTAVE_8_H "h'''''" #define AGS_PIANO_KEYS_OCTAVE_9_C "c''''''" #define AGS_PIANO_KEYS_OCTAVE_9_CIS "c#''''''" #define AGS_PIANO_KEYS_OCTAVE_9_D "d''''''" #define AGS_PIANO_KEYS_OCTAVE_9_DIS "d#''''''" #define AGS_PIANO_KEYS_OCTAVE_9_E "e''''''" #define AGS_PIANO_KEYS_OCTAVE_9_F "f''''''" #define AGS_PIANO_KEYS_OCTAVE_9_FIS "f#''''''" #define AGS_PIANO_KEYS_OCTAVE_9_G "g''''''" #define AGS_PIANO_KEYS_OCTAVE_9_GIS "g#''''''" #define AGS_PIANO_KEYS_OCTAVE_9_A "a''''''" #define AGS_PIANO_KEYS_OCTAVE_9_AIS "a#''''''" #define AGS_PIANO_KEYS_OCTAVE_9_H "h''''''" #define AGS_PIANO_KEYS_OCTAVE_10_C "c'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_CIS "c#'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_D "d'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_DIS "d#'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_E "e'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_F "f'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_FIS "f#'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_G "g'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_GIS "g#'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_A "a'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_AIS "a#'''''''" #define AGS_PIANO_KEYS_OCTAVE_10_H "h'''''''" #endif /*__AGS_PIANO_KEYS_H__*/ gsequencer-1.4.24/ags/widget/ags_led_array.h0000644000175000017500000000424713246707333015705 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LED_ARRAY_H__ #define __AGS_LED_ARRAY_H__ #include #include #include #include "ags_led.h" #define AGS_TYPE_LED_ARRAY (ags_led_array_get_type()) #define AGS_LED_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LED_ARRAY, AgsLedArray)) #define AGS_LED_ARRAY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LED_ARRAY, AgsLedArrayClass)) #define AGS_IS_LED_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_LED_ARRAY)) #define AGS_IS_LED_ARRAY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_LED_ARRAY)) #define AGS_LED_ARRAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_LED_ARRAY, AgsLedArrayClass)) typedef struct _AgsLedArray AgsLedArray; typedef struct _AgsLedArrayClass AgsLedArrayClass; typedef enum{ AGS_LED_ARRAY_ACTIVE = 1, }AgsLedArrayFlags; struct _AgsLedArray { GtkAlignment alignment; guint flags; GtkBox *box; guint led_width; guint led_height; AgsLed **led; guint led_count; }; struct _AgsLedArrayClass { GtkAlignmentClass alignment; }; GType ags_led_array_get_type(void); void ags_led_array_set_led_count(AgsLedArray *led_array, guint led_count); void ags_led_array_unset_all(AgsLedArray *led_array); void ags_led_array_set_nth(AgsLedArray *led_array, guint nth); AgsLedArray* ags_led_array_new(); #endif /*__AGS_LED_ARRAY_H__*/ gsequencer-1.4.24/ags/widget/ags_expander_set.c0000644000175000017500000002524413246707333016417 00000000000000/* 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 . */ #include "ags_expander_set.h" #include void ags_expander_set_class_init(AgsExpanderSetClass *expander_set); void ags_expander_set_init(AgsExpanderSet *expander_set); void ags_expander_set_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_expander_set_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_expander_set_finalize(GObject *gobject); void ags_expander_set_show(GtkWidget *widget); void ags_expander_set_realize(GtkWidget *widget); void ags_expander_set_size_request(GtkWidget *widget, GtkRequisition *requisition); void ags_expander_set_size_allocate(GtkWidget *widget, GtkAllocation *allocation); gboolean ags_expander_set_expose(GtkWidget *widget, GdkEventExpose *event); void ags_expander_set_width_changed(GObject *gobject, GParamSpec *pspec, AgsExpanderSet *expander_set); void ags_expander_set_height_changed(GObject *gobject, GParamSpec *pspec, AgsExpanderSet *expander_set); void ags_expander_set_draw(AgsExpanderSet *expander_set); void ags_expander_set_insert_child(AgsExpanderSet *expander_set, AgsExpanderSetChild *child, gboolean ghost); void ags_expander_set_remove_child(AgsExpanderSet *expander_set, AgsExpanderSetChild *child, gboolean ghost); /** * SECTION:ags_expander_set * @short_description: A container * @title: AgsExpanderSet * @section_id: * @include: ags/widget/ags_expander_set.h * * #AgsExpanderSet is a composite widget containing a #GtkTable. */ enum{ PROP_0, PROP_GHOST, PROP_LOCATION, }; static gpointer ags_expander_set_parent_class = NULL; GType ags_expander_set_get_type(void) { static GType ags_type_expander_set = 0; if(!ags_type_expander_set){ static const GTypeInfo ags_expander_set_info = { sizeof(AgsExpanderSetClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_expander_set_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsExpanderSet), 0, /* n_preallocs */ (GInstanceInitFunc) ags_expander_set_init, }; ags_type_expander_set = g_type_register_static(GTK_TYPE_TABLE, "AgsExpanderSet\0", &ags_expander_set_info, 0); } return(ags_type_expander_set); } void ags_expander_set_class_init(AgsExpanderSetClass *expander_set) { GObjectClass *gobject; // GtkWidgetClass *widget; GParamSpec *param_spec; ags_expander_set_parent_class = g_type_class_peek_parent(expander_set); /* GObjectClass */ gobject = G_OBJECT_CLASS(expander_set); gobject->set_property = ags_expander_set_set_property; gobject->get_property = ags_expander_set_get_property; gobject->finalize = ags_expander_set_finalize; /* GtkWidgetClass */ // widget = (GtkWidgetClass *) expander_set; // widget->realize = ags_expander_set_realize; // widget->expose_event = ags_expander_set_expose; // widget->size_request = ags_expander_set_size_request; // widget->size_allocate = ags_expander_set_size_allocate; } void ags_expander_set_init(AgsExpanderSet *expander_set) { g_object_set(G_OBJECT(expander_set), "app-paintable\0", TRUE, "homogeneous", FALSE, NULL); g_signal_connect(expander_set, "notify::n-columns\0", G_CALLBACK(ags_expander_set_width_changed), expander_set); g_signal_connect(expander_set, "notify::n-rows\0", G_CALLBACK(ags_expander_set_height_changed), expander_set); expander_set->flags = 0; expander_set->ghost = NULL; expander_set->location = NULL; } void ags_expander_set_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsExpanderSet *expander_set; expander_set = AGS_EXPANDER_SET(gobject); switch(prop_id){ case PROP_GHOST: { AgsExpanderSetChild *ghost; ghost = (AgsExpanderSetChild *) g_value_get_pointer(value); ags_expander_set_insert_child(expander_set, ghost, TRUE); } break; case PROP_LOCATION: { AgsExpanderSetChild *location; location = (AgsExpanderSetChild *) g_value_get_pointer(value); ags_expander_set_insert_child(expander_set, location, FALSE); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_expander_set_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsExpanderSet *expander_set; expander_set = AGS_EXPANDER_SET(gobject); switch(prop_id){ case PROP_GHOST: g_value_set_pointer(value, expander_set->ghost); break; case PROP_LOCATION: g_value_set_pointer(value, expander_set->location); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_expander_set_finalize(GObject *gobject) { AgsExpanderSet *expander_set; expander_set = AGS_EXPANDER_SET(gobject); if(expander_set->ghost != NULL){ g_list_free_full(expander_set->ghost, g_free); } if(expander_set->location != NULL){ g_list_free_full(expander_set->location, g_free); } /* call parent */ G_OBJECT_CLASS(ags_expander_set_parent_class)->finalize(gobject); } void ags_expander_set_realize(GtkWidget *widget) { //TODO:JK: implement me } void ags_expander_set_size_request(GtkWidget *widget, GtkRequisition *requisition) { //TODO:JK: implement me } void ags_expander_set_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { //TODO:JK: implement me } gboolean ags_expander_set_expose(GtkWidget *widget, GdkEventExpose *event) { //TODO:JK: implement me return(FALSE); } void ags_expander_set_width_changed(GObject *gobject, GParamSpec *pspec, AgsExpanderSet *expander_set) { //TODO:JK: implement me } void ags_expander_set_height_changed(GObject *gobject, GParamSpec *pspec, AgsExpanderSet *expander_set) { //TODO:JK: implement me } void ags_expander_set_set_flags(AgsExpanderSet *expander_set, guint flags) { //TODO:JK: implement me } AgsExpanderSetChild* ags_expander_set_child_alloc(guint x, guint y, guint width, guint height) { AgsExpanderSetChild *child; child = (AgsExpanderSetChild *) malloc(sizeof(AgsExpanderSetChild)); child->x = x; child->y = y; child->width = width; child->height = height; return(child); } AgsExpanderSetChild* ags_expander_set_child_find(AgsExpanderSet *expander_set, GtkWidget *child) { GList *list; list = expander_set->location; while(list != NULL){ if(AGS_EXPANDER_SET_CHILD(list->data)->child == child){ return((AgsExpanderSetChild *) list->data); } list = list->next; } return(NULL); } void ags_expander_set_draw(AgsExpanderSet *expander_set) { //TODO:JK: implement me } void ags_expander_set_insert_child(AgsExpanderSet *expander_set, AgsExpanderSetChild *child, gboolean ghost) { GList *list; guint i; if(ghost){ list = expander_set->ghost; }else{ list = expander_set->location; } i = 0; while(list != NULL){ if(AGS_EXPANDER_SET_CHILD(list->data)->x > child->x){ break; } if(AGS_EXPANDER_SET_CHILD(list->data)->x == child->x){ while(list != NULL){ if(AGS_EXPANDER_SET_CHILD(list->data)->x > child->x){ break; } if(AGS_EXPANDER_SET_CHILD(list->data)->x == child->x && AGS_EXPANDER_SET_CHILD(list->data)->y >= child->y){ break; } i++; list = list->next; } break; } i++; list = list->next; } gtk_table_attach(GTK_TABLE(expander_set), child->child, child->x, child->x + child->width, child->y, child->y + child->height, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); if(ghost){ expander_set->ghost = g_list_insert(expander_set->ghost, child, i); }else{ expander_set->location = g_list_insert(expander_set->location, child, i); } } void ags_expander_set_remove_child(AgsExpanderSet *expander_set, AgsExpanderSetChild *child, gboolean ghost) { gtk_container_remove(GTK_CONTAINER(expander_set), child->child); if(ghost){ expander_set->ghost = g_list_remove(expander_set->ghost, child); }else{ expander_set->location = g_list_remove(expander_set->location, child); } free(child); } /** * ags_expander_set_add: * @expander_set: the #AgsExpanderSet * @widget: the child #GtkWidget * @x: x-position * @y: y-position * @width: allocation width * @height: allocation height * * Adds a #GtkWidget to #AgsExpanderSet * * Since: 1.0.0 */ void ags_expander_set_add(AgsExpanderSet *expander_set, GtkWidget *widget, guint x, guint y, guint width, guint height) { AgsExpanderSetChild *child; child = ags_expander_set_child_alloc(x, y, width, height); child->child = widget; if(widget != NULL){ ags_expander_set_insert_child(expander_set, child, FALSE); }else{ ags_expander_set_insert_child(expander_set, child, TRUE); } } /** * ags_expander_set_remove: * @expander_set: the #AgsExpanderSet * @widget: the child #GtkWidget * * Removes a #GtkWidget of #AgsExpanderSet * * Since: 1.0.0 */ void ags_expander_set_remove(AgsExpanderSet *expander_set, GtkWidget *widget) { ags_expander_set_remove_child(expander_set, ags_expander_set_child_find(expander_set, widget), FALSE); } /** * ags_expander_set_new: * @height: the table's height * @width: the table's width * * Creates an #AgsExpanderSet * * Returns: a new #AgsExpanderSet * * Since: 1.0.0 */ AgsExpanderSet* ags_expander_set_new(guint width, guint height) { AgsExpanderSet *expander_set; expander_set = (AgsExpanderSet *) g_object_new(AGS_TYPE_EXPANDER_SET, "n-columns\0", width, "n-rows\0", height, NULL); return(expander_set); } gsequencer-1.4.24/ags/widget/ags_widget_marshal.h0000644000175000017500000000144313247044247016727 00000000000000/* This file is generated, all changes will be lost */ #ifndef __AGS_WIDGET_CCLOSURE_MARSHAL_MARSHAL_H__ #define __AGS_WIDGET_CCLOSURE_MARSHAL_MARSHAL_H__ #include G_BEGIN_DECLS /* VOID:STRING,INT (ags_widget_marshallers.list:1) */ extern void ags_widget_cclosure_marshal_VOID__STRING_INT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); G_END_DECLS #endif /* __AGS_WIDGET_CCLOSURE_MARSHAL_MARSHAL_H__ */ gsequencer-1.4.24/ags/widget/ags_hscale_box.c0000644000175000017500000000453513247044247016044 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_hscale_box_class_init(AgsHScaleBoxClass *hscale_box); void ags_hscale_box_init(AgsHScaleBox *hscale_box); /** * SECTION:ags_hscale_box * @short_description: horizontal box widget * @title: AgsHScaleBox * @section_id: * @include: ags/widget/ags_hscale_box.h * * The #AgsHScaleBox is an horizontal box widget containing #AgsScale. */ static gpointer ags_hscale_box_parent_class = NULL; GType ags_hscale_box_get_type(void) { static GType ags_type_hscale_box = 0; if(!ags_type_hscale_box){ static const GTypeInfo ags_hscale_box_info = { sizeof (AgsHScaleBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_hscale_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsHScaleBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_hscale_box_init, }; ags_type_hscale_box = g_type_register_static(AGS_TYPE_SCALE_BOX, "AgsHScaleBox", &ags_hscale_box_info, 0); } return(ags_type_hscale_box); } void ags_hscale_box_class_init(AgsHScaleBoxClass *hscale_box) { } void ags_hscale_box_init(AgsHScaleBox *hscale_box) { gtk_orientable_set_orientation(GTK_ORIENTABLE(hscale_box), GTK_ORIENTATION_HORIZONTAL); } /** * ags_hscale_box_new: * * Create a new instance of #AgsHScaleBox. * * Returns: the new #AgsHScaleBox instance * * Since: 1.3.0 */ AgsHScaleBox* ags_hscale_box_new() { AgsHScaleBox *hscale_box; hscale_box = (AgsHScaleBox *) g_object_new(AGS_TYPE_HSCALE_BOX, NULL); return(hscale_box); } gsequencer-1.4.24/ags/widget/ags_table.c0000644000175000017500000000347313246707333015025 00000000000000/* 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 . */ #include void ags_table_class_init(AgsTableClass *table); void ags_table_init(AgsTable *table); GType ags_table_get_type(void) { static GType ags_type_table = 0; if(!ags_type_table){ static const GTypeInfo ags_table_info = { sizeof(AgsTableClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_table_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsTable), 0, /* n_preallocs */ (GInstanceInitFunc) ags_table_init, }; ags_type_table = g_type_register_static(GTK_TYPE_TABLE, "AgsTable\0", &ags_table_info, 0); } return(ags_type_table); } void ags_table_class_init(AgsTableClass *table) { } void ags_table_init(AgsTable *table) { } AgsTable* ags_table_new(guint row, guint columns, gboolean homogeneous) { AgsTable *table; table = (AgsTable *) g_object_new(AGS_TYPE_TABLE, "n-rows\0", row, "n-columns\0", columns, "homogeneous\0", homogeneous, NULL); return(table); } gsequencer-1.4.24/ags/widget/ags_scale_box.c0000644000175000017500000001321313247044247015665 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_scale_box_class_init(AgsScaleBoxClass *scale_box); void ags_scale_box_init(AgsScaleBox *scale_box); void ags_scale_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_scale_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_scale_box_finalize(GObject *gobject); GType ags_scale_box_child_type(GtkContainer *container); /** * SECTION:ags_scale_box * @short_description: abstract box widget * @title: AgsScaleBox * @section_id: * @include: ags/widget/ags_scale_box.h * * The #AgsScaleBox is an abstract box widget containing #AgsScale. */ enum{ PROP_0, PROP_FIXED_SCALE_WIDTH, PROP_FIXED_SCALE_HEIGHT, }; static gpointer ags_scale_box_parent_class = NULL; GType ags_scale_box_get_type(void) { static GType ags_type_scale_box = 0; if(!ags_type_scale_box){ static const GTypeInfo ags_scale_box_info = { sizeof (AgsScaleBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_scale_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsScaleBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_scale_box_init, }; ags_type_scale_box = g_type_register_static(GTK_TYPE_BOX, "AgsScaleBox", &ags_scale_box_info, 0); } return(ags_type_scale_box); } void ags_scale_box_class_init(AgsScaleBoxClass *scale_box) { GObjectClass *gobject; GtkWidgetClass *widget; GtkContainerClass *container; GParamSpec *param_spec; ags_scale_box_parent_class = g_type_class_peek_parent(scale_box); /* GObjectClass */ gobject = (GObjectClass *) scale_box; gobject->set_property = ags_scale_box_set_property; gobject->get_property = ags_scale_box_get_property; gobject->finalize = ags_scale_box_finalize; /* properties */ /** * AgsScaleBox:fixed-scale-width: * * The fixed width of a scale. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("fixed-scale-width", "fixed scale width", "The fixed width of a scale", 0, G_MAXUINT, AGS_SCALE_BOX_DEFAULT_FIXED_SCALE_WIDTH, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIXED_SCALE_WIDTH, param_spec); /** * AgsScaleBox:fixed-scale-height: * * The fixed height of a scale. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("fixed-scale-height", "fixed scale height", "The fixed height of a scale", 0, G_MAXUINT, AGS_SCALE_BOX_DEFAULT_FIXED_SCALE_HEIGHT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIXED_SCALE_HEIGHT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) scale_box; /* GtkContainerClass */ container = (GtkWidgetClass *) scale_box; container->child_type = ags_scale_box_child_type; } void ags_scale_box_init(AgsScaleBox *scale_box) { g_object_set(scale_box, "homogeneous", FALSE, "spacing", 0, NULL); scale_box->flags = 0; scale_box->fixed_scale_width = AGS_SCALE_BOX_DEFAULT_FIXED_SCALE_WIDTH; scale_box->fixed_scale_height = AGS_SCALE_BOX_DEFAULT_FIXED_SCALE_HEIGHT; } void ags_scale_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsScaleBox *scale_box; scale_box = AGS_SCALE_BOX(gobject); switch(prop_id){ case PROP_FIXED_SCALE_WIDTH: { scale_box->fixed_scale_width = g_value_get_uint(value); } break; case PROP_FIXED_SCALE_HEIGHT: { scale_box->fixed_scale_height = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scale_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsScaleBox *scale_box; scale_box = AGS_SCALE_BOX(gobject); switch(prop_id){ case PROP_FIXED_SCALE_WIDTH: { g_value_set_uint(value, scale_box->fixed_scale_width); } break; case PROP_FIXED_SCALE_HEIGHT: { g_value_set_uint(value, scale_box->fixed_scale_height); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scale_box_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_scale_box_parent_class)->finalize(gobject); } GType ags_scale_box_child_type(GtkContainer *container) { return(AGS_TYPE_SCALE); } /** * ags_scale_box_new: * * Create a new instance of #AgsScaleBox. * * Returns: the new #AgsScaleBox instance * * Since: 1.3.0 */ AgsScaleBox* ags_scale_box_new() { AgsScaleBox *scale_box; scale_box = (AgsScaleBox *) g_object_new(AGS_TYPE_SCALE_BOX, NULL); return(scale_box); } gsequencer-1.4.24/ags/widget/ags_scale.c0000644000175000017500000007234313247044247015026 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #ifndef __APPLE__ #include #endif #include #include #include static GType ags_accessible_scale_get_type(void); void ags_scale_class_init(AgsScaleClass *scale); void ags_scale_init(AgsScale *scale); void ags_accessible_scale_class_init(AtkObject *object); void ags_accessible_scale_value_interface_init(AtkValueIface *value); void ags_accessible_scale_action_interface_init(AtkActionIface *action); void ags_scale_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_scale_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_scale_finalize(GObject *gobject); AtkObject* ags_scale_get_accessible(GtkWidget *widget); void ags_scale_show(GtkWidget *widget); void ags_accessible_scale_get_value_and_text(AtkValue *value, gdouble *current_value, gchar **text); #ifdef HAVE_ATK_2_12 AtkRange* ags_accessible_scale_get_range(AtkValue *value); #endif gdouble ags_accessible_scale_get_increment(AtkValue *value); void ags_accessible_scale_set_value(AtkValue *value, gdouble new_value); gboolean ags_accessible_scale_do_action(AtkAction *action, gint i); gint ags_accessible_scale_get_n_actions(AtkAction *action); const gchar* ags_accessible_scale_get_description(AtkAction *action, gint i); const gchar* ags_accessible_scale_get_name(AtkAction *action, gint i); const gchar* ags_accessible_scale_get_keybinding(AtkAction *action, gint i); gboolean ags_accessible_scale_set_description(AtkAction *action, gint i); gchar* ags_accessible_scale_get_localized_name(AtkAction *action, gint i); void ags_scale_map(GtkWidget *widget); void ags_scale_realize(GtkWidget *widget); void ags_scale_size_request(GtkWidget *widget, GtkRequisition *requisition); void ags_scale_size_allocate(GtkWidget *widget, GtkAllocation *allocation); gboolean ags_scale_expose(GtkWidget *widget, GdkEventExpose *event); gboolean ags_scale_button_press(GtkWidget *widget, GdkEventButton *event); gboolean ags_scale_button_release(GtkWidget *widget, GdkEventButton *event); gboolean ags_scale_key_press(GtkWidget *widget, GdkEventKey *event); gboolean ags_scale_key_release(GtkWidget *widget, GdkEventKey *event); gboolean ags_scale_motion_notify(GtkWidget *widget, GdkEventMotion *event); void ags_scale_draw(AgsScale *scale); /** * SECTION:ags_scale * @short_description: A scale widget * @title: AgsScale * @section_id: * @include: ags/widget/ags_scale.h * * #AgsScale is a widget that shows you a meter. */ enum{ VALUE_CHANGED, LAST_SIGNAL, }; enum{ PROP_0, PROP_CONTROL_NAME, PROP_LOWER, PROP_UPPER, PROP_DEFAULT_VALUE, }; static gpointer ags_scale_parent_class = NULL; static guint scale_signals[LAST_SIGNAL]; static GQuark quark_accessible_object = 0; GType ags_scale_get_type(void) { static GType ags_type_scale = 0; if(!ags_type_scale){ static const GTypeInfo ags_scale_info = { sizeof(AgsScaleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_scale_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsScale), 0, /* n_preallocs */ (GInstanceInitFunc) ags_scale_init, }; ags_type_scale = g_type_register_static(GTK_TYPE_WIDGET, "AgsScale", &ags_scale_info, 0); } return(ags_type_scale); } static GType ags_accessible_scale_get_type(void) { static GType ags_type_accessible_scale = 0; if(!ags_type_accessible_scale){ const GTypeInfo ags_accesssible_scale_info = { sizeof(GtkAccessibleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_accessible_scale_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GtkAccessible), 0, /* n_preallocs */ NULL, NULL }; static const GInterfaceInfo atk_value_interface_info = { (GInterfaceInitFunc) ags_accessible_scale_value_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo atk_action_interface_info = { (GInterfaceInitFunc) ags_accessible_scale_action_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_accessible_scale = g_type_register_static(GTK_TYPE_ACCESSIBLE, "AgsAccessibleScale", &ags_accesssible_scale_info, 0); g_type_add_interface_static(ags_type_accessible_scale, ATK_TYPE_VALUE, &atk_value_interface_info); g_type_add_interface_static(ags_type_accessible_scale, ATK_TYPE_ACTION, &atk_action_interface_info); } return(ags_type_accessible_scale); } void ags_scale_class_init(AgsScaleClass *scale) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_scale_parent_class = g_type_class_peek_parent(scale); quark_accessible_object = g_quark_from_static_string("ags-accessible-object"); /* GObjectClass */ gobject = (GObjectClass *) scale; gobject->set_property = ags_scale_set_property; gobject->get_property = ags_scale_get_property; gobject->finalize = ags_scale_finalize; /* properties */ /** * AgsScale:control-name: * * The scale's control name. * * Since: 1.3.0 */ param_spec = g_param_spec_string("control-name", "control name", "The control name of scale", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTROL_NAME, param_spec); /** * AgsScale:lower: * * The scale's lower range. * * Since: 1.3.0 */ param_spec = g_param_spec_double("lower", "lower", "The lower of scale", -G_MAXDOUBLE, G_MAXDOUBLE, AGS_SCALE_DEFAULT_LOWER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LOWER, param_spec); /** * AgsScale:upper: * * The scale's upper range. * * Since: 1.3.0 */ param_spec = g_param_spec_double("upper", "upper", "The upper of scale", -G_MAXDOUBLE, G_MAXDOUBLE, AGS_SCALE_DEFAULT_UPPER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UPPER, param_spec); /** * AgsScale:default-value: * * The scale's default value. * * Since: 1.3.0 */ param_spec = g_param_spec_double("default-value", "default value", "The default value of scale", -G_MAXDOUBLE, G_MAXDOUBLE, AGS_SCALE_DEFAULT_VALUE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEFAULT_VALUE, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) scale; widget->get_accessible = ags_scale_get_accessible; // widget->map = ags_scale_map; widget->realize = ags_scale_realize; widget->expose_event = ags_scale_expose; widget->size_request = ags_scale_size_request; widget->size_allocate = ags_scale_size_allocate; widget->button_press_event = ags_scale_button_press; widget->button_release_event = ags_scale_button_release; widget->key_press_event = ags_scale_key_press; widget->key_release_event = ags_scale_key_release; widget->motion_notify_event = ags_scale_motion_notify; widget->show = ags_scale_show; /* AgsScaleClass */ scale->value_changed = NULL; /* signals */ /** * AgsScale::value-changed: * @scale: the #AgsScale * @default_value: the changed default value * * The ::value-changed signal notifies about modified default value. * * Since: 1.3.0 */ scale_signals[VALUE_CHANGED] = g_signal_new("value-changed", G_TYPE_FROM_CLASS(scale), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsScaleClass, value_changed), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); } void ags_accessible_scale_class_init(AtkObject *object) { /* empty */ } void ags_accessible_scale_value_interface_init(AtkValueIface *value) { value->get_current_value = NULL; value->get_maximum_value = NULL; value->get_minimum_value = NULL; value->set_current_value = NULL; value->get_minimum_increment = NULL; #ifdef HAVE_ATK_2_12 value->get_value_and_text = ags_accessible_scale_get_value_and_text; value->get_range = ags_accessible_scale_get_range; value->get_increment = ags_accessible_scale_get_increment; value->get_sub_ranges = NULL; value->set_value = ags_accessible_scale_set_value; #endif } void ags_accessible_scale_action_interface_init(AtkActionIface *action) { action->do_action = ags_accessible_scale_do_action; action->get_n_actions = ags_accessible_scale_get_n_actions; action->get_description = ags_accessible_scale_get_description; action->get_name = ags_accessible_scale_get_name; action->get_keybinding = ags_accessible_scale_get_keybinding; action->set_description = ags_accessible_scale_set_description; action->get_localized_name = ags_accessible_scale_get_localized_name; } void ags_scale_init(AgsScale *scale) { AtkObject *accessible; g_object_set(G_OBJECT(scale), "app-paintable", TRUE, "can-focus", TRUE, NULL); accessible = gtk_widget_get_accessible((GtkWidget *) scale); g_object_set(accessible, "accessible-name", "scale", "accessible-description", "Specify a default value", NULL); scale->flags = 0; scale->key_mask = 0; scale->button_state = 0; scale->layout = AGS_SCALE_LAYOUT_VERTICAL; scale->font_size = 11; scale->scale_width = AGS_SCALE_DEFAULT_WIDTH; scale->scale_height = AGS_SCALE_DEFAULT_HEIGHT; scale->control_name = NULL; scale->lower = AGS_SCALE_DEFAULT_LOWER; scale->upper = AGS_SCALE_DEFAULT_UPPER; scale->default_value = AGS_SCALE_DEFAULT_VALUE; scale->step_count = AGS_SCALE_DEFAULT_STEP_COUNT; scale->page_size = AGS_SCALE_DEFAULT_PAGE_SIZE; scale->scale_step_count = -1; scale->scale_point = NULL; scale->scale_value = NULL; } void ags_scale_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsScale *scale; scale = AGS_SCALE(gobject); switch(prop_id){ case PROP_CONTROL_NAME: { gchar *control_name; control_name = g_value_get_string(value); g_free(scale->control_name); scale->control_name = g_strdup(control_name); } break; case PROP_LOWER: { scale->lower = g_value_get_double(value); gtk_widget_queue_draw(scale); } break; case PROP_UPPER: { scale->upper = g_value_get_double(value); gtk_widget_queue_draw(scale); } break; case PROP_DEFAULT_VALUE: { scale->default_value = g_value_get_double(value); gtk_widget_queue_draw(scale); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scale_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsScale *scale; scale = AGS_SCALE(gobject); switch(prop_id){ case PROP_CONTROL_NAME: { g_value_set_string(value, scale->control_name); } break; case PROP_LOWER: { g_value_set_double(value, scale->lower); } break; case PROP_UPPER: { g_value_set_double(value, scale->upper); } break; case PROP_DEFAULT_VALUE: { g_value_set_double(value, scale->default_value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scale_finalize(GObject *gobject) { AgsScale *scale; scale = AGS_SCALE(gobject); g_free(scale->control_name); /* call parent */ G_OBJECT_CLASS(ags_scale_parent_class)->finalize(gobject); } void ags_accessible_scale_get_value_and_text(AtkValue *value, gdouble *current_value, gchar **text) { AgsScale *scale; scale = (AgsScale *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); if(current_value != NULL){ *current_value = scale->default_value; } if(text != NULL){ *text = g_strdup_printf("%f", scale->default_value); } } #ifdef HAVE_ATK_2_12 AtkRange* ags_accessible_scale_get_range(AtkValue *value) { AgsScale *scale; AtkRange *range; scale = (AgsScale *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); range = atk_range_new(scale->lower, scale->upper, "Valid lower and upper input range of this scale"); } #endif gdouble ags_accessible_scale_get_increment(AtkValue *value) { AgsScale *scale; scale = (AgsScale *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); return((scale->upper - scale->lower) / scale->step_count); } void ags_accessible_scale_set_value(AtkValue *value, gdouble new_value) { AgsScale *scale; scale = (AgsScale *) gtk_accessible_get_widget(GTK_ACCESSIBLE(value)); scale->default_value = new_value; gtk_widget_queue_draw((GtkWidget *) scale); } gboolean ags_accessible_scale_do_action(AtkAction *action, gint i) { AgsScale *scale; GdkEventKey *key_press, *key_release; if(!(i >= 0 && i < 4)){ return(FALSE); } scale = (AgsScale *) gtk_accessible_get_widget(GTK_ACCESSIBLE(action)); key_press = gdk_event_new(GDK_KEY_PRESS); key_release = gdk_event_new(GDK_KEY_RELEASE); switch(i){ case AGS_SCALE_STEP_UP: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) scale, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) scale, (GdkEvent *) key_release); } break; case AGS_SCALE_STEP_DOWN: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) scale, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) scale, (GdkEvent *) key_release); } break; case AGS_SCALE_PAGE_UP: { key_press->keyval = key_release->keyval = GDK_KEY_Page_Up; /* send event */ gtk_widget_event((GtkWidget *) scale, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) scale, (GdkEvent *) key_release); } break; case AGS_SCALE_PAGE_DOWN: { key_press->keyval = key_release->keyval = GDK_KEY_Page_Down; /* send event */ gtk_widget_event((GtkWidget *) scale, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) scale, (GdkEvent *) key_release); } break; } return(TRUE); } gint ags_accessible_scale_get_n_actions(AtkAction *action) { return(4); } const gchar* ags_accessible_scale_get_description(AtkAction *action, gint i) { static const gchar *actions[] = { "step up scale default value", "step down scale default value", "page up scale default value", "page down scale default value", }; if(i >= 0 && i < 4){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_scale_get_name(AtkAction *action, gint i) { static const gchar *actions[] = { "step-up", "step-down", "page-up", "page-down", }; if(i >= 0 && i < 4){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_scale_get_keybinding(AtkAction *action, gint i) { static const gchar *actions[] = { "up", "down", "page-up", "page-down", }; if(i >= 0 && i < 4){ return(actions[i]); }else{ return(NULL); } } gboolean ags_accessible_scale_set_description(AtkAction *action, gint i) { //TODO:JK: implement me return(FALSE); } gchar* ags_accessible_scale_get_localized_name(AtkAction *action, gint i) { //TODO:JK: implement me return(NULL); } void ags_scale_map(GtkWidget *widget) { if(gtk_widget_get_realized (widget) && !gtk_widget_get_mapped(widget)){ GTK_WIDGET_CLASS(ags_scale_parent_class)->map(widget); gdk_window_show(widget->window); ags_scale_draw((AgsScale *) widget); } } void ags_scale_realize(GtkWidget *widget) { AgsScale *scale; GdkWindowAttr attributes; gint attributes_mask; g_return_if_fail(widget != NULL); g_return_if_fail(AGS_IS_SCALE(widget)); scale = AGS_SCALE(widget); gtk_widget_set_realized(widget, TRUE); /* */ attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = AGS_SCALE_DEFAULT_WIDTH; attributes.height = AGS_SCALE_DEFAULT_HEIGHT; attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask |= (GDK_EXPOSURE_MASK); widget->window = gdk_window_new(gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data(widget->window, scale); widget->style = gtk_style_attach(widget->style, widget->window); gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); gtk_widget_queue_resize(widget); } AtkObject* ags_scale_get_accessible(GtkWidget *widget) { AtkObject* accessible; accessible = g_object_get_qdata(G_OBJECT(widget), quark_accessible_object); if(!accessible){ accessible = g_object_new(ags_accessible_scale_get_type(), NULL); g_object_set_qdata(G_OBJECT(widget), quark_accessible_object, accessible); gtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), widget); } return(accessible); } void ags_scale_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_scale_parent_class)->show(widget); } void ags_scale_size_request(GtkWidget *widget, GtkRequisition *requisition) { AgsScale *scale; scale = AGS_SCALE(widget); if(scale->layout == AGS_SCALE_LAYOUT_VERTICAL){ requisition->width = scale->scale_width; requisition->height = scale->scale_height; }else if(scale->layout == AGS_SCALE_LAYOUT_HORIZONTAL){ requisition->width = scale->scale_height; requisition->height = scale->scale_width; } } void ags_scale_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsScale *scale; GdkWindow *window; scale = AGS_SCALE(widget); widget->allocation = *allocation; window = gtk_widget_get_window(widget); gdk_window_move(window, allocation->x, allocation->y); if(scale->layout == AGS_SCALE_LAYOUT_VERTICAL){ widget->allocation.width = scale->scale_width; widget->allocation.height = scale->scale_height; allocation->height = scale->scale_height; }else if(scale->layout == AGS_SCALE_LAYOUT_HORIZONTAL){ widget->allocation.width = scale->scale_height; widget->allocation.height = scale->scale_width; allocation->width = scale->scale_height; } } gboolean ags_scale_expose(GtkWidget *widget, GdkEventExpose *event) { ags_scale_draw(AGS_SCALE(widget)); return(FALSE); } gboolean ags_scale_button_press(GtkWidget *widget, GdkEventButton *event) { AgsScale *scale; guint width, height; guint x_start, y_start; scale = AGS_SCALE(widget); width = widget->allocation.width; height = widget->allocation.height; x_start = 0; y_start = 0; if(event->x >= x_start && event->x < width && event->y >= y_start && event->y < height){ if(event->button == 1){ gdouble c_range; gdouble default_value; scale->button_state |= AGS_SCALE_BUTTON_1_PRESSED; if((AGS_SCALE_LOGARITHMIC & (scale->flags)) != 0){ c_range = exp(scale->upper) - exp(scale->lower); }else{ c_range = scale->upper - scale->lower; } if(scale->layout == AGS_SCALE_LAYOUT_VERTICAL){ default_value = event->y / c_range; }else if(scale->layout == AGS_SCALE_LAYOUT_HORIZONTAL){ default_value = event->x / c_range; } scale->default_value = default_value; gtk_widget_queue_draw(scale); ags_scale_value_changed(scale, default_value); } } return(FALSE); } gboolean ags_scale_button_release(GtkWidget *widget, GdkEventButton *event) { AgsScale *scale; gtk_widget_grab_focus(widget); scale = AGS_SCALE(widget); if(event->button == 1){ if((AGS_SCALE_BUTTON_1_PRESSED & (scale->button_state)) != 0){ gdouble c_range; gdouble default_value; scale->button_state |= AGS_SCALE_BUTTON_1_PRESSED; if((AGS_SCALE_LOGARITHMIC & (scale->flags)) != 0){ c_range = exp(scale->upper) - exp(scale->lower); }else{ c_range = scale->upper - scale->lower; } if(scale->layout == AGS_SCALE_LAYOUT_VERTICAL){ default_value = event->y / c_range; }else if(scale->layout == AGS_SCALE_LAYOUT_HORIZONTAL){ default_value = event->x / c_range; } scale->default_value = default_value; gtk_widget_queue_draw(scale); ags_scale_value_changed(scale, default_value); } scale->button_state &= (~AGS_SCALE_BUTTON_1_PRESSED); } return(FALSE); } gboolean ags_scale_key_press(GtkWidget *widget, GdkEventKey *event) { if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ return(GTK_WIDGET_CLASS(ags_scale_parent_class)->key_press_event(widget, event)); } return(TRUE); } gboolean ags_scale_key_release(GtkWidget *widget, GdkEventKey *event) { AgsScale *scale; //TODO:JK: implement me if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ return(GTK_WIDGET_CLASS(ags_scale_parent_class)->key_release_event(widget, event)); } scale = AGS_SCALE(widget); switch(event->keyval){ case GDK_KEY_Up: case GDK_KEY_uparrow: { gdouble c_range; gdouble step; if((AGS_SCALE_LOGARITHMIC & (scale->flags)) != 0){ c_range = exp(scale->upper) - exp(scale->lower); }else{ c_range = scale->upper - scale->lower; } step = c_range / scale->step_count; if(scale->default_value + log(step) > scale->upper){ scale->default_value = scale->upper; }else{ scale->default_value += log(step); } gtk_widget_queue_draw(widget); ags_scale_value_changed(scale, scale->default_value); } break; case GDK_KEY_Down: case GDK_KEY_downarrow: { gdouble c_range; gdouble step; if((AGS_SCALE_LOGARITHMIC & (scale->flags)) != 0){ c_range = exp(scale->upper) - exp(scale->lower); }else{ c_range = scale->upper - scale->lower; } step = c_range / scale->step_count; if(scale->default_value - log(step) < scale->lower){ scale->default_value = scale->lower; }else{ scale->default_value -= log(step); } gtk_widget_queue_draw(widget); ags_scale_value_changed(scale, scale->default_value); } break; case GDK_KEY_Page_Up: case GDK_KEY_KP_Page_Up: { gdouble c_range; gdouble page; if((AGS_SCALE_LOGARITHMIC & (scale->flags)) != 0){ c_range = exp(scale->upper) - exp(scale->lower); }else{ c_range = scale->upper - scale->lower; } page = scale->page_size * (c_range / scale->step_count); if(scale->default_value + log(page) > scale->upper){ scale->default_value = scale->upper; }else{ scale->default_value += log(page); } gtk_widget_queue_draw(widget); ags_scale_value_changed(scale, scale->default_value); } break; case GDK_KEY_Page_Down: case GDK_KEY_KP_Page_Down: { gdouble c_range; gdouble page; if((AGS_SCALE_LOGARITHMIC & (scale->flags)) != 0){ c_range = exp(scale->upper) - exp(scale->lower); }else{ c_range = scale->upper - scale->lower; } page = scale->page_size * (c_range / scale->step_count); if(scale->default_value - log(page) < scale->lower){ scale->default_value = scale->lower; }else{ scale->default_value -= log(page); } gtk_widget_queue_draw(widget); ags_scale_value_changed(scale, scale->default_value); } break; } return(TRUE); } gboolean ags_scale_motion_notify(GtkWidget *widget, GdkEventMotion *event) { AgsScale *scale; guint width, height; guint x_start, y_start; scale = AGS_SCALE(widget); width = widget->allocation.width; height = widget->allocation.height; x_start = 0; y_start = 0; if((AGS_SCALE_BUTTON_1_PRESSED & (scale->button_state)) != 0){ gdouble c_range; gdouble new_default_value; scale->button_state |= AGS_SCALE_BUTTON_1_PRESSED; if((AGS_SCALE_LOGARITHMIC & (scale->flags)) != 0){ c_range = exp(scale->upper) - exp(scale->lower); }else{ c_range = scale->upper - scale->lower; } if(scale->layout == AGS_SCALE_LAYOUT_VERTICAL){ new_default_value = event->y / c_range; }else if(scale->layout == AGS_SCALE_LAYOUT_HORIZONTAL){ new_default_value = event->x / c_range; } if(new_default_value != scale->default_value){ scale->default_value = new_default_value; gtk_widget_queue_draw(scale); ags_scale_value_changed(scale, new_default_value); } } return(FALSE); } void ags_scale_draw(AgsScale *scale) { cairo_t *cr; guint width, height; guint x_start, y_start; void ags_scale_draw_string(cairo_t *cr, gchar *str){ PangoLayout *layout; PangoFontDescription *desc; layout = pango_cairo_create_layout(cr); pango_layout_set_text(layout, str, -1); desc = pango_font_description_from_string("Sans Slant"); //pango_font_description_copy_static("Georgia Bold 11"); pango_font_description_set_size(desc, scale->font_size * PANGO_SCALE); pango_layout_set_font_description(layout, desc); pango_font_description_free(desc); pango_cairo_update_layout(cr, layout); pango_cairo_show_layout(cr, layout); #ifndef __APPLE__ pango_fc_font_map_cache_clear(pango_cairo_font_map_get_default()); #endif g_object_unref(layout); } static const gdouble white_gc = 65535.0; if(!AGS_IS_SCALE(scale)){ return; } cr = gdk_cairo_create(GTK_WIDGET(scale)->window); if(cr == NULL){ return; } width = GTK_WIDGET(scale)->allocation.width; height = GTK_WIDGET(scale)->allocation.height; x_start = 0; y_start = 0; cairo_surface_flush(cairo_get_target(cr)); cairo_push_group(cr); /* background */ cairo_set_source_rgb(cr, 0.0, 0.0, 0.0); cairo_rectangle(cr, (gdouble) x_start, (gdouble) y_start, (gdouble) width, (gdouble) height); cairo_fill(cr); /* box */ cairo_set_source_rgb(cr, 0.5, 0.4, 0.0); cairo_set_line_width(cr, 1.0); cairo_rectangle(cr, (gdouble) x_start, (gdouble) y_start, (gdouble) width, (gdouble) height); cairo_stroke(cr); /* draw scale */ //TODO:JK: implement me /* show control name */ cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); if(scale->layout == AGS_SCALE_LAYOUT_VERTICAL){ cairo_move_to(cr, x_start + scale->font_size, y_start + height - 1.0); cairo_rotate(cr, 2 * M_PI * 0.75); }else{ cairo_move_to(cr, x_start + scale->font_size, y_start + 1.0); } ags_scale_draw_string(cr, scale->control_name); cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } /** * ags_scale_value_changed: * @scale: the #AgsScale * @default_value: the default value * * Emits ::value-changed event. * * Since: 1.3.0 */ void ags_scale_value_changed(AgsScale *scale, gdouble default_value) { g_return_if_fail(AGS_IS_SCALE(scale)); g_object_ref((GObject *) scale); g_signal_emit(G_OBJECT(scale), scale_signals[VALUE_CHANGED], 0, default_value); g_object_unref((GObject *) scale); } /** * ags_scale_new: * * Create a new instance of #AgsScale. * * Returns: the new #AgsScale instance * * Since: 1.3.0 */ AgsScale* ags_scale_new() { AgsScale *scale; scale = (AgsScale *) g_object_new(AGS_TYPE_SCALE, NULL); return(scale); } gsequencer-1.4.24/ags/server/0000755000175000017500000000000013256233675013040 500000000000000gsequencer-1.4.24/ags/server/ags_server_status.h0000644000175000017500000000443113246707333016672 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_SERVER_STATUS_H__ #define __AGS_SERVER_STATUS_H__ #include #include #define AGS_TYPE_SERVER_STATUS (ags_server_status_get_type()) #define AGS_SERVER_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SERVER_STATUS, AgsServerStatus)) #define AGS_SERVER_STATUS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SERVER_STATUS, AgsServerStatusClass)) #define AGS_IS_SERVER_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SERVER_STATUS)) #define AGS_IS_SERVER_STATUS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SERVER_STATUS)) #define AGS_SERVER_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SERVER_STATUS, AgsServerStatusClass)) typedef struct _AgsServerStatus AgsServerStatus; typedef struct _AgsServerStatusClass AgsServerStatusClass; /** * AgsServerStatusFlags: * @AGS_SERVER_STATUS_CONNECTED: the server status was connected by #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsServerStatus by * enable/disable as flags. */ typedef enum{ AGS_SERVER_STATUS_CONNECTED = 1, }AgsServerStatusFlags; struct _AgsServerStatus { GObject object; guint flags; gchar **authentication_module; guint maximum_connections; guint connection_count; }; struct _AgsServerStatusClass { GObjectClass object; }; GType ags_server_status_get_type(); AgsServerStatus* ags_server_status_new(); #endif /*__AGS_SERVER_STATUS_H__*/ gsequencer-1.4.24/ags/server/thread/0000755000175000017500000000000013256233675014307 500000000000000gsequencer-1.4.24/ags/server/thread/ags_remote_task_thread.h0000644000175000017500000000423013246707333021071 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_REMOTE_TASK_THREAD_H__ #define __AGS_REMOTE_TASK_THREAD_H__ #include #include #include #define AGS_TYPE_REMOTE_TASK_THREAD (ags_remote_task_thread_get_type()) #define AGS_REMOTE_TASK_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOTE_TASK_THREAD, AgsRemoteTaskThread)) #define AGS_REMOTE_TASK_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_REMOTE_TASK_THREAD, AgsRemoteTaskThread)) #define AGS_IS_REMOTE_TASK_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_REMOTE_TASK_THREAD)) #define AGS_IS_REMOTE_TASK_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_REMOTE_TASK_THREAD)) #define AGS_REMOTE_TASK_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_REMOTE_TASK_THREAD, AgsRemoteTaskThreadClass)) #define AGS_REMOTE_TASK_THREAD_RT_PRIORITY (95) #define AGS_REMOTE_TASK_THREAD_DEFAULT_JIFFIE (AGS_THREAD_MAX_PRECISION) typedef struct _AgsRemoteTaskThread AgsRemoteTaskThread; typedef struct _AgsRemoteTaskThreadClass AgsRemoteTaskThreadClass; struct _AgsRemoteTaskThread { AgsTaskThread task_thread; }; struct _AgsRemoteTaskThreadClass { AgsTaskThreadClass task_thread; }; GType ags_remote_task_thread_get_type(); AgsRemoteTaskThread* ags_remote_task_thread_new(); #endif /*__AGS_REMOTE_TASK_THREAD_H__*/ gsequencer-1.4.24/ags/server/thread/ags_remote_task.c0000644000175000017500000001414113246707333017537 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include void ags_remote_task_class_init(AgsRemoteTaskClass *remote_task); void ags_remote_task_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remote_task_init(AgsRemoteTask *remote_task); void ags_remote_task_add_to_registry(AgsConnectable *connectable); void ags_remote_task_remove_from_registry(AgsConnectable *connectable); void ags_remote_task_connect(AgsConnectable *connectable); void ags_remote_task_disconnect(AgsConnectable *connectable); void ags_remote_task_finalize(GObject *gobject); void* ags_remote_task_launch_timed_thread(void *ptr); static gpointer ags_remote_task_parent_class = NULL; GType ags_remote_task_get_type() { static GType ags_type_remote_task = 0; if(!ags_type_remote_task){ static const GTypeInfo ags_remote_task_info = { sizeof (AgsRemoteTaskClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remote_task_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoteTask), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remote_task_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remote_task_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remote_task = g_type_register_static(G_TYPE_OBJECT, "AgsRemoteTask\0", &ags_remote_task_info, 0); g_type_add_interface_static(ags_type_remote_task, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remote_task); } void ags_remote_task_class_init(AgsRemoteTaskClass *remote_task) { GObjectClass *gobject; ags_remote_task_parent_class = g_type_class_peek_parent(remote_task); /* GObjectClass */ gobject = (GObjectClass *) remote_task; gobject->finalize = ags_remote_task_finalize; } void ags_remote_task_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = ags_remote_task_add_to_registry; connectable->remove_from_registry = ags_remote_task_remove_from_registry; connectable->connect = ags_remote_task_connect; connectable->disconnect = ags_remote_task_disconnect; } void ags_remote_task_init(AgsRemoteTask *remote_task) { remote_task->server = NULL; } void ags_remote_task_add_to_registry(AgsConnectable *connectable) { // AgsServer *server; // AgsRegistry *registry; AgsRemoteTask *remote_task; struct xmlrpc_method_info3 *method_info; remote_task = AGS_REMOTE_TASK(connectable); // server = AGS_SERVER(remote_task->server); // registry = AGS_REGISTRY(server->registry); #ifdef AGS_WITH_XMLRPC_C /* bulk */ method_info = (struct xmlrpc_method_info3 *) malloc(sizeof(struct xmlrpc_method_info3)); method_info->methodName = "ags_remote_task_launch\0"; method_info->methodFunction = &ags_remote_task_launch; method_info->serverInfo = NULL; xmlrpc_registry_add_method3(&(AGS_MAIN(server->main)->env), registry->registry, method_info); #endif /* AGS_WITH_XMLRPC_C */ } void ags_remote_task_remove_from_registry(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_remote_task_connect(AgsConnectable *connectable) { /* empty */ } void ags_remote_task_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_remote_task_finalize(GObject *gobject) { AgsRemoteTask *remote_task; remote_task = AGS_REMOTE_TASK(gobject); G_OBJECT_CLASS(ags_remote_task_parent_class)->finalize(gobject); } #ifdef AGS_WITH_XMLRPC_C xmlrpc_value* ags_remote_task_launch(xmlrpc_env *env, xmlrpc_value *param_array, void *server_info) { // AgsServer *server; AgsTask *task; AgsRegistryEntry *registry_entry; gchar *registry_id; xmlrpc_value *item; if(xmlrpc_array_size(env, param_array) != 1){ return(NULL); } // server = ags_server_lookup(server_info); /* read registry id */ xmlrpc_array_read_item(env, param_array, 1, &item); xmlrpc_read_string(env, item, ®istry_id); xmlrpc_DECREF(item); // registry_entry = ags_registry_entry_find(server->registry, // registry_id); task = (AgsTask *) g_value_get_object(&(registry_entry->entry)); /* launch */ ags_task_launch(task); return(NULL); } void* ags_remote_task_launch_timed_thread(void *ptr) { //TODO:JK: implement me } xmlrpc_value* ags_remote_task_launch_timed(xmlrpc_env *env, xmlrpc_value *param_array, void *server_info) { // AgsServer *server; AgsTask *task; AgsRegistryEntry *registry_entry; gchar *registry_id; xmlrpc_value *item; if(xmlrpc_array_size(env, param_array) != 1){ return(NULL); } // server = ags_server_lookup(server_info); /* read registry id */ xmlrpc_array_read_item(env, param_array, 1, &item); xmlrpc_read_string(env, item, ®istry_id); xmlrpc_DECREF(item); // registry_entry = ags_registry_entry_find(server->registry, // registry_id); task = (AgsTask *) g_value_get_object(&(registry_entry->entry)); /* launch timed */ //TODO:JK: implement me } #endif /* AGS_WITH_XMLRPC_C */ AgsRemoteTask* ags_remote_task_new() { AgsRemoteTask *remote_task; remote_task = (AgsRemoteTask *) g_object_new(AGS_TYPE_REMOTE_TASK, NULL); return(remote_task); } gsequencer-1.4.24/ags/server/thread/ags_remote_task.h0000644000175000017500000000425113246707333017545 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_REMOTE_TASK_H__ #define __AGS_REMOTE_TASK_H__ #include #include #ifdef AGS_WITH_XMLRPC_C #include #include #endif #define AGS_TYPE_REMOTE_TASK (ags_remote_task_get_type()) #define AGS_REMOTE_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOTE_TASK, AgsRemoteTask)) #define AGS_REMOTE_TASK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_REMOTE_TASK, AgsRemoteTaskClass)) #define AGS_IS_REMOTE_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_REMOTE_TASK)) #define AGS_IS_REMOTE_TASK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_REMOTE_TASK)) #define AGS_REMOTE_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_REMOTE_TASK, AgsRemoteTaskClass)) typedef struct _AgsRemoteTask AgsRemoteTask; typedef struct _AgsRemoteTaskClass AgsRemoteTaskClass; struct _AgsRemoteTask { GObject object; GObject *server; }; struct _AgsRemoteTaskClass { GObjectClass object; }; GType ags_remote_task_get_type(); #ifdef AGS_WITH_XMLRPC_C xmlrpc_value* ags_remote_task_launch(xmlrpc_env *env, xmlrpc_value *param_array, void *server_info); xmlrpc_value* ags_remote_task_launch_timed(xmlrpc_env *env, xmlrpc_value *param_array, void *server_info); #endif AgsRemoteTask* ags_remote_task_new(); #endif /*__AGS_REMOTE_TASK_H__*/ gsequencer-1.4.24/ags/server/thread/ags_remote_task_thread.c0000644000175000017500000001151213246707333021065 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include void ags_remote_task_thread_class_init(AgsRemoteTaskThreadClass *remote_task_thread); void ags_remote_task_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remote_task_thread_init(AgsRemoteTaskThread *remote_task_thread); void ags_remote_task_thread_connect(AgsConnectable *connectable); void ags_remote_task_thread_disconnect(AgsConnectable *connectable); void ags_remote_task_thread_finalize(GObject *gobject); void ags_remote_task_thread_start(AgsThread *thread); void ags_remote_task_thread_run(AgsThread *thread); /** * SECTION:ags_remote_task_thread * @short_description: remote task thread * @title: AgsRemoteTaskThread * @section_id: * @include: ags/server/thread/ags_remote_task_thread.h * * The #AgsRemoteTaskThread invokes remote tasks thread-safe. */ static gpointer ags_remote_task_thread_parent_class = NULL; static AgsConnectableInterface *ags_remote_task_thread_parent_connectable_interface; GType ags_remote_task_thread_get_type() { static GType ags_type_remote_task_thread = 0; if(!ags_type_remote_task_thread){ static const GTypeInfo ags_remote_task_thread_info = { sizeof (AgsRemoteTaskThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remote_task_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoteTaskThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remote_task_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remote_task_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remote_task_thread = g_type_register_static(AGS_TYPE_TASK_THREAD, "AgsRemoteTaskThread\0", &ags_remote_task_thread_info, 0); g_type_add_interface_static(ags_type_remote_task_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remote_task_thread); } void ags_remote_task_thread_class_init(AgsRemoteTaskThreadClass *remote_task_thread) { GObjectClass *gobject; AgsThreadClass *thread; ags_remote_task_thread_parent_class = g_type_class_peek_parent(remote_task_thread); /* GObjectClass */ gobject = (GObjectClass *) remote_task_thread; gobject->finalize = ags_remote_task_thread_finalize; /* AgsThreadClass */ thread = (AgsThreadClass *) remote_task_thread; thread->start = ags_remote_task_thread_start; thread->run = ags_remote_task_thread_run; } void ags_remote_task_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remote_task_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remote_task_thread_connect; connectable->disconnect = ags_remote_task_thread_disconnect; } void ags_remote_task_thread_init(AgsRemoteTaskThread *remote_task_thread) { } void ags_remote_task_thread_connect(AgsConnectable *connectable) { ags_remote_task_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remote_task_thread_disconnect(AgsConnectable *connectable) { ags_remote_task_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remote_task_thread_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_remote_task_thread_parent_class)->finalize(gobject); } void ags_remote_task_thread_start(AgsThread *thread) { AGS_THREAD_CLASS(ags_remote_task_thread_parent_class)->start(thread); } void ags_remote_task_thread_run(AgsThread *thread) { //TODO:JK: implement me } /** * ags_remote_task_thread_new: * * Instantiate a new #AgsRemoteTaskThread * * Returns: the new #AgsRemoteTaskThread * * Since: 1.0.0 */ AgsRemoteTaskThread* ags_remote_task_thread_new() { AgsRemoteTaskThread *remote_task_thread; remote_task_thread = (AgsRemoteTaskThread *) g_object_new(AGS_TYPE_REMOTE_TASK_THREAD, NULL); return(remote_task_thread); } gsequencer-1.4.24/ags/server/ags_server_application_context.h0000644000175000017500000000701213246707333021414 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_SERVER_APPLICATION_CONTEXT_H__ #define __AGS_SERVER_APPLICATION_CONTEXT_H__ #ifdef AGS_WITH_XMLRPC_C #include #include #include #include #endif #include #include #include #include #include #include #include #include #include #define AGS_TYPE_SERVER_APPLICATION_CONTEXT (ags_server_application_context_get_type()) #define AGS_SERVER_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SERVER_APPLICATION_CONTEXT, AgsServerApplicationContext)) #define AGS_SERVER_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SERVER_APPLICATION_CONTEXT, AgsServerApplicationContextClass)) #define AGS_IS_SERVER_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SERVER_APPLICATION_CONTEXT)) #define AGS_IS_SERVER_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SERVER_APPLICATION_CONTEXT)) #define AGS_SERVER_APPLICATION_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SERVER_APPLICATION_CONTEXT, AgsServerApplicationContextClass)) #define AGS_SERVER_BUILD_ID "Sun Feb 26 23:03:41 CET 2017\0" #define AGS_SERVER_DEFAULT_VERSION "1.0.0\0" typedef struct _AgsServerApplicationContext AgsServerApplicationContext; typedef struct _AgsServerApplicationContextClass AgsServerApplicationContextClass; /** * AgsServerApplicationContextFlags: * @AGS_SERVER_APPLICATION_CONTEXT_ENABLE_SERVER: enable the server * * Enum values to control the behavior or indicate internal state of #AgsServerApplicationContext by * enable/disable as flags. */ typedef enum{ AGS_SERVER_APPLICATION_CONTEXT_ENABLE_SERVER = 1, }AgsServerApplicationContextFlags; struct _AgsServerApplicationContext { AgsApplicationContext application_context; guint flags; gchar *version; gchar *build_id; AgsThreadPool *thread_pool; #ifdef AGS_WITH_XMLRPC_C xmlrpc_env *env; #else void *env; #endif AgsRegistry *registry; AgsServer *server; AgsCertificateManager *certificate_manager; AgsPasswordStoreManager *password_store_manager; AgsAuthenticationManager *authentication_manager; }; struct _AgsServerApplicationContextClass { AgsApplicationContextClass application_context; }; GType ags_server_application_context_get_type(); AgsServerApplicationContext* ags_server_application_context_new(); #endif /*__AGS_SERVER_APPLICATION_CONTEXT_H__*/ gsequencer-1.4.24/ags/server/controller/0000755000175000017500000000000013256233675015223 500000000000000gsequencer-1.4.24/ags/server/controller/ags_controller.h0000644000175000017500000000602413246707333020327 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_CONTROLLER_H__ #define __AGS_CONTROLLER_H__ #include #include #define AGS_TYPE_CONTROLLER (ags_controller_get_type()) #define AGS_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONTROLLER, AgsController)) #define AGS_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_CONTROLLER, AgsControllerClass)) #define AGS_IS_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CONTROLLER)) #define AGS_IS_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CONTROLLER)) #define AGS_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_CONTROLLER, AgsControllerClass)) #define AGS_CONTROLLER_BASE_PATH "/ags-server" typedef struct _AgsController AgsController; typedef struct _AgsControllerClass AgsControllerClass; typedef struct _AgsControllerResource AgsControllerResource; struct _AgsController { GObject gobject; GObject *server; gchar *context_path; GHashTable *resource; }; struct _AgsControllerClass { GObjectClass gobject; gboolean (*query_security_context)(AgsController *controller, GObject *security_context, gchar *login); }; /** * AgsControllerResource: * @group_id: the group id of permissions * @user_id: the user id of permissions * @access_mode: the access mode of permissions * * Specifing attributes of resources. */ struct _AgsControllerResource { gchar *group_id; gchar *user_id; guint access_mode; }; GType ags_controller_get_type(); AgsControllerResource* ags_controller_resource_alloc(gchar *group_id, gchar *user_id, guint access_mode); void ags_controller_resource_free(AgsControllerResource *controller_resource); void ags_controller_add_resource(AgsController *controller, gchar *resource_name, AgsControllerResource *controller_resource); void ags_controller_remove_resource(AgsController *controller, gchar *resource_name); AgsControllerResource* ags_controller_lookup_resource(AgsController *controller, gchar *resource_name); gboolean ags_controller_query_security_context(AgsController *controller, GObject *security_context, gchar *login); AgsController* ags_controller_new(); #endif /*__AGS_CONTROLLER_H__*/ gsequencer-1.4.24/ags/server/controller/ags_local_serialization_controller.h0000644000175000017500000000712513246707333024441 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_LOCAL_SERIALIZATION_CONTROLLER_H__ #define __AGS_LOCAL_SERIALIZATION_CONTROLLER_H__ #include #include #include #define AGS_TYPE_LOCAL_SERIALIZATION_CONTROLLER (ags_local_serialization_controller_get_type()) #define AGS_LOCAL_SERIALIZATION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LOCAL_SERIALIZATION_CONTROLLER, AgsLocalSerializationController)) #define AGS_LOCAL_SERIALIZATION_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_LOCAL_SERIALIZATION_CONTROLLER, AgsLocalSerializationControllerClass)) #define AGS_IS_LOCAL_SERIALIZATION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LOCAL_SERIALIZATION_CONTROLLER)) #define AGS_IS_LOCAL_SERIALIZATION_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LOCAL_SERIALIZATION_CONTROLLER)) #define AGS_LOCAL_SERIALIZATION_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_LOCAL_SERIALIZATION_CONTROLLER, AgsLocalSerializationControllerClass)) #define AGS_LOCAL_SERIALIZATION_CONTROLLER_CONTEXT_PATH "serialization" typedef struct _AgsLocalSerializationController AgsLocalSerializationController; typedef struct _AgsLocalSerializationControllerClass AgsLocalSerializationControllerClass; struct _AgsLocalSerializationController { AgsController controller; }; struct _AgsLocalSerializationControllerClass { AgsControllerClass controller; gpointer (*send_object)(AgsLocalSerializationController *local_serialization_controller, GObject *gobject); gpointer (*send_object_property)(AgsLocalSerializationController *local_serialization_controller, GObject *gobject, gchar **property_name); gpointer (*receive_object)(AgsLocalSerializationController *local_serialization_controller, gchar *str); gpointer (*receive_object_property)(AgsLocalSerializationController *local_serialization_controller, gchar *object_id, gchar *str); }; GType ags_local_serialization_controller_get_type(); gpointer ags_local_serialization_controller_send_object(AgsLocalSerializationController *local_serialization_controller, GObject *gobject); gpointer ags_local_serialization_controller_send_object_property(AgsLocalSerializationController *local_serialization_controller, GObject *gobject, gchar **property_name); gpointer ags_local_serialization_controller_receive_object(AgsLocalSerializationController *local_serialization_controller, gchar *str); gpointer ags_local_serialization_controller_receive_object_property(AgsLocalSerializationController *local_serialization_controller, gchar *object_id, gchar *str); AgsLocalSerializationController* ags_local_serialization_controller_new(); #endif /*__AGS_LOCAL_SERIALIZATION_CONTROLLER_H__*/ gsequencer-1.4.24/ags/server/controller/ags_front_controller.c0000644000175000017500000005020513256163135021527 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #ifdef AGS_WITH_XMLRPC_C #include #include #include #include #include #endif void ags_front_controller_class_init(AgsFrontControllerClass *front_controller); void ags_front_controller_connectable_interface_init(AgsConnectableInterface *connectable); void ags_front_controller_init(AgsFrontController *front_controller); void ags_front_controller_add_to_registry(AgsConnectable *connectable); void ags_front_controller_remove_from_registry(AgsConnectable *connectable); void ags_front_controller_connect(AgsConnectable *connectable); void ags_front_controller_disconnect(AgsConnectable *connectable); void ags_front_controller_finalize(GObject *gobject); #ifdef AGS_WITH_XMLRPC_C xmlrpc_value* ags_front_controller_xmlrpc_request(xmlrpc_env *env, xmlrpc_value *param_array, void *server_info); #endif gpointer ags_front_controller_real_authenticate(AgsFrontController *front_controller, gchar *authentication_module, gchar *login, gchar *password, gchar *certs); gpointer ags_front_controller_delegate_local_factory_controller(AgsFrontController *front_controller, AgsLocalFactoryController *local_factory_controller, GObject *security_context, gchar *context_path, gchar *login, gchar *security_token, GParameter *params, guint n_params); gpointer ags_front_controller_real_do_request(AgsFrontController *front_controller, GObject *security_context, gchar *context_path, gchar *user_uuid, gchar *security_token, GParameter *params, guint n_params); /** * SECTION:ags_front_controller * @short_description: handle all XMLRPC requests * @title: AgsFrontController * @section_id: * @include: ags/server/controller/ags_front_controller.h * * The #AgsFrontController is an object to handle XMLRPC requests. */ enum{ AUTHENTICATE, DO_REQUEST, LAST_SIGNAL, }; static gpointer ags_front_controller_parent_class = NULL; static guint front_controller_signals[LAST_SIGNAL]; GType ags_front_controller_get_type() { static GType ags_type_front_controller = 0; if(!ags_type_front_controller){ static const GTypeInfo ags_front_controller_info = { sizeof (AgsFrontControllerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_front_controller_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFrontController), 0, /* n_preallocs */ (GInstanceInitFunc) ags_front_controller_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_front_controller_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_front_controller = g_type_register_static(G_TYPE_OBJECT, "AgsFrontController", &ags_front_controller_info, 0); g_type_add_interface_static(ags_type_front_controller, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_front_controller); } void ags_front_controller_class_init(AgsFrontControllerClass *front_controller) { GObjectClass *gobject; GParamSpec *param_spec; ags_front_controller_parent_class = g_type_class_peek_parent(front_controller); /* GObjectClass */ gobject = (GObjectClass *) front_controller; gobject->finalize = ags_front_controller_finalize; /* AgsFrontController */ front_controller->authenticate = ags_front_controller_real_authenticate; front_controller->do_request = ags_front_controller_real_do_request; /* signals */ /** * AgsFrontController::authenticate: * @front_controller: the #AgsFrontController * @authentication_module: the authentication module * @login: the login * @password: the password * @certs: certificate * * Authenticate to the front controller. * * Returns: on success a new #AgsSecurityContext, otherwise %NULL * * Since: 1.0.0 */ front_controller_signals[AUTHENTICATE] = g_signal_new("authenticate", G_TYPE_FROM_CLASS(front_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFrontControllerClass, authenticate), NULL, NULL, g_cclosure_user_marshal_POINTER__STRING_STRING_STRING_STRING, G_TYPE_POINTER, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); /** * AgsFrontController::do-request: * @front_controller: the #AgsFrontController * @security_context: the #AgsSecurityContext * @context_path: the context path to access * @user: the user's UUID * @security_token: the security token * @params: the #GParameter-struct * * Do a request on the front controller. * * Returns: the response * * Since: 1.0.0 */ front_controller_signals[DO_REQUEST] = g_signal_new("do-request", G_TYPE_FROM_CLASS(front_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFrontControllerClass, do_request), NULL, NULL, g_cclosure_user_marshal_POINTER__OBJECT_STRING_STRING_STRING_POINTER, G_TYPE_POINTER, 5, G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); } void ags_front_controller_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = ags_front_controller_add_to_registry; connectable->remove_from_registry = ags_front_controller_remove_from_registry; connectable->connect = ags_front_controller_connect; connectable->disconnect = ags_front_controller_disconnect; } void ags_front_controller_init(AgsFrontController *front_controller) { //TODO:JK: implement me } void ags_front_controller_add_to_registry(AgsConnectable *connectable) { AgsServer *server; AgsRegistry *registry; AgsFrontController *front_controller; AgsApplicationContext *application_context; struct xmlrpc_method_info3 *method_info; front_controller = AGS_FRONT_CONTROLLER(connectable); server = AGS_SERVER(AGS_CONTROLLER(front_controller)->server); application_context = server->application_context; registry = ags_service_provider_get_registry(AGS_SERVICE_PROVIDER(application_context)); #ifdef AGS_WITH_XMLRPC_C /* bulk */ method_info = (struct xmlrpc_method_info3 *) malloc(sizeof(struct xmlrpc_method_info3)); method_info->methodName = "ags_front_controller_xmlrpc_request"; method_info->methodFunction = &ags_front_controller_xmlrpc_request; method_info->serverInfo = server->server_info; xmlrpc_registry_add_method3(ags_service_provider_get_env(AGS_SERVICE_PROVIDER(application_context)), registry->registry, method_info); #endif /* AGS_WITH_XMLRPC_C */ } void ags_front_controller_remove_from_registry(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_front_controller_connect(AgsConnectable *connectable) { /* empty */ } void ags_front_controller_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_front_controller_finalize(GObject *gobject) { AgsFrontController *front_controller; front_controller = AGS_FRONT_CONTROLLER(gobject); G_OBJECT_CLASS(ags_front_controller_parent_class)->finalize(gobject); } #ifdef AGS_WITH_XMLRPC_C xmlrpc_value* ags_front_controller_xmlrpc_request(xmlrpc_env *env, xmlrpc_value *param_array, void *server_info) { AgsServer *server; AgsRegistry *registry; AgsSecurityContext *security_context; AgsFrontController *front_controller; GParameter *parameter; GType gtype; GList *list; xmlrpc_value *item; gpointer response; gchar *param_name; gchar *context_path; gchar *login, *password, *certs; gchar *security_token; guint entry_count; guint n_params; guint i; auto void ags_front_controller_xmlrpc_request_read_certs(); auto void ags_front_controller_xmlrpc_request_read_parameter(); void ags_front_controller_xmlrpc_request_read_certs(){ xmlrpc_array_read_item(env, param_array, 3, &item); xmlrpc_read_string(env, item, &security_token); xmlrpc_DECREF(item); /* * read certs */ if(entry_count > 6){ /* read parameter name */ xmlrpc_array_read_item(env, param_array, 6, &item); xmlrpc_read_string(env, item, ¶m_name); xmlrpc_DECREF(item); /* read certs */ if(param_name != NULL && !g_ascii_strncasecmp(param_name, "certs", 6)){ xmlrpc_array_read_item(env, param_array, 7, &item); xmlrpc_read_string(env, item, &certs); xmlrpc_DECREF(item); } i = 1; } } void ags_front_controller_xmlrpc_request_read_parameter(){ /* * read parameters */ n_params = entry_count / 2 - 3; if(n_params > 0){ parameter = g_new(GParameter, n_params); }else{ parameter = NULL; } for(; i < n_params; i++){ AgsRegistryEntry *registry_entry; gchar *registry_id; gchar *error; /* read parameter name */ xmlrpc_array_read_item(env, param_array, 6 + i * 2, &item); xmlrpc_read_string(env, item, ¶m_name); xmlrpc_DECREF(item); parameter[i].name = param_name; parameter[i].value.g_type = G_TYPE_NONE; /* read registry id */ xmlrpc_array_read_item(env, param_array, 7 + i * 2 + 1, &item); xmlrpc_read_string(env, item, ®istry_id); xmlrpc_DECREF(item); /* find registry entry */ registry_entry = ags_registry_entry_find(registry, registry_id); /* copy GValue from registry entry to parameter array */ g_value_init(&(parameter[i].value), G_VALUE_TYPE(&(registry_entry->entry))); g_value_copy(&(registry_entry->entry), &(parameter[i].value)); /* free not needed strings */ g_free(param_name); g_free(registry_id); if(error){ g_warning ("%s: %s", G_STRFUNC, error); g_free (error); g_value_unset (¶meter[i].value); break; } } } entry_count = xmlrpc_array_size(env, param_array); if(entry_count % 2 != 0 && entry_count < 6){ return(NULL); } server = ags_server_lookup(server_info); registry = ags_service_provider_get_registry(AGS_SERVICE_PROVIDER(server->application_context)); front_controller = NULL; list = ags_list_util_find_type(server->controller, AGS_TYPE_FRONT_CONTROLLER); if(list != NULL){ front_controller = AGS_FRONT_CONTROLLER(list->data); }else{ return(NULL); } /* * read context path */ /* read parameter name */ xmlrpc_array_read_item(env, param_array, 0, &item); xmlrpc_read_string(env, item, ¶m_name); xmlrpc_DECREF(item); /* read context_path */ if(param_name != NULL && !g_ascii_strncasecmp(param_name, "context-path", 11)){ xmlrpc_array_read_item(env, param_array, 1, &item); xmlrpc_read_string(env, item, &context_path); xmlrpc_DECREF(item); }else{ return(NULL); } /* * read login */ /* read parameter name */ xmlrpc_array_read_item(env, param_array, 2, &item); xmlrpc_read_string(env, item, ¶m_name); xmlrpc_DECREF(item); /* read login */ if(param_name != NULL && !g_ascii_strncasecmp(param_name, "login", 6)){ xmlrpc_array_read_item(env, param_array, 3, &item); xmlrpc_read_string(env, item, &login); xmlrpc_DECREF(item); }else{ return(NULL); } /* * read password/security-token */ response = NULL; /* read parameter name */ xmlrpc_array_read_item(env, param_array, 4, &item); xmlrpc_read_string(env, item, ¶m_name); xmlrpc_DECREF(item); certs = NULL; i = 0; /* read password/security-token */ if(param_name != NULL && !g_ascii_strncasecmp(param_name, "password", 9)){ xmlrpc_array_read_item(env, param_array, 5, &item); xmlrpc_read_string(env, item, &password); xmlrpc_DECREF(item); /* * read certs */ certs = NULL; if(entry_count > 6){ /* read parameter name */ xmlrpc_array_read_item(env, param_array, 6, &item); xmlrpc_read_string(env, item, ¶m_name); xmlrpc_DECREF(item); /* read certs */ if(param_name != NULL && !g_ascii_strncasecmp(param_name, "certs", 6)){ xmlrpc_array_read_item(env, param_array, 7, &item); xmlrpc_read_string(env, item, &certs); xmlrpc_DECREF(item); } } response = ags_front_controller_authenticate(front_controller, server->auth_module, login, password, certs); }else if(param_name != NULL && !g_ascii_strncasecmp(param_name, "security-token", 15)){ ags_front_controller_xmlrpc_request_read_certs(); security_context = ags_security_context_new(); g_object_set(security_context, "certs", certs, NULL); ags_security_context_add_server_context(security_context, context_path); g_object_ref(security_context); if(ags_authentication_manager_is_session_active(ags_authentication_manager_get_instance(), security_context, login, security_token)){ ags_front_controller_xmlrpc_request_read_parameter(); response = ags_front_controller_do_request(front_controller, security_context, context_path, login, security_token, parameter, n_params); } g_object_unref(security_context); }else{ return(NULL); } return(response); } #endif gpointer ags_front_controller_real_authenticate(AgsFrontController *front_controller, gchar *authentication_module, gchar *login, gchar *password, gchar *certs) { gchar *context_path; context_path = g_strdup_printf("%s", AGS_CONTROLLER_BASE_PATH); g_object_set(front_controller, "context-path", context_path, NULL); g_free(context_path); //TODO:JK: implement me return(NULL); } /** * ags_front_controller_authenticate: * @front_controller: the #AgsFrontController * @authentication_module: the authentication module to use * @login: the login * @password: the password * @certs: the certs data * * Authenticate to the server. * * Returns: on success the #GParameter-struct containing user's uuid and security token, * otherwise %NULL. * * Since: 1.0.0 */ gpointer ags_front_controller_authenticate(AgsFrontController *front_controller, gchar *authentication_module, gchar *login, gchar *password, gchar *certs) { gpointer retval; g_return_val_if_fail(AGS_IS_FRONT_CONTROLLER(front_controller), NULL); g_object_ref((GObject *) front_controller); g_signal_emit(G_OBJECT(front_controller), front_controller_signals[AUTHENTICATE], 0, authentication_module, login, password, certs, &retval); g_object_unref((GObject *) front_controller); return(retval); } gpointer ags_front_controller_delegate_local_factory_controller(AgsFrontController *front_controller, AgsLocalFactoryController *local_factory_controller, GObject *security_context, gchar *context_path, gchar *login, gchar *security_token, GParameter *params, guint n_params) { gpointer response; gchar *resource; response = NULL; resource = strstr(context_path, AGS_CONTROLLER(local_factory_controller)->context_path); if(n_params < 1 || resource == NULL){ return(NULL); } resource += strlen(AGS_CONTROLLER(local_factory_controller)->context_path); if(ags_controller_query_security_context(local_factory_controller, security_context, login)){ if(!g_ascii_strncasecmp(resource, AGS_LOCAL_FACTORY_CONTROLLER_RESOURCE_CREATE_INSTANCE, strlen(AGS_LOCAL_FACTORY_CONTROLLER_RESOURCE_CREATE_INSTANCE))){ if(g_strv_contains(AGS_SECURITY_CONTEXT(security_context)->permitted_context, resource)){ response = ags_local_factory_controller_create_instance(local_factory_controller, g_value_get_ulong(&(params[0].value)), ((n_params > 1) ? &(params[1]): NULL), n_params - 1); } } } return(response); } gpointer ags_front_controller_real_do_request(AgsFrontController *front_controller, GObject *security_context, gchar *context_path, gchar *login, gchar *security_token, GParameter *params, guint n_params) { AgsServer *server; AgsAuthenticationManager *authentication_manager; AgsLocalFactoryController *local_factory_controller; GList *list; gpointer response; if(context_path == NULL || security_context == NULL || login == NULL || security_token == NULL){ return(NULL); } //TODO:JK: use certs server = AGS_CONTROLLER(front_controller)->server; local_factory_controller = NULL; list = ags_list_util_find_type(server->controller, AGS_TYPE_LOCAL_FACTORY_CONTROLLER); if(list != NULL){ local_factory_controller = AGS_LOCAL_FACTORY_CONTROLLER(list->data); } response = NULL; if(local_factory_controller != NULL && AGS_CONTROLLER(local_factory_controller)->context_path != NULL && !g_ascii_strncasecmp(context_path, AGS_CONTROLLER(local_factory_controller)->context_path, strlen(AGS_CONTROLLER(local_factory_controller)->context_path))){ response = ags_front_controller_delegate_local_factory_controller(front_controller, local_factory_controller, security_context, context_path, login, security_token, params, n_params); } //TODO:JK: implement me return(response); } /** * ags_front_controller_do_request: * @front_controller: the #AgsFrontController * @security_context: the #AgsSecurityContext * @context_path: the context path to access * @login: the login * @security_token: the security token * @params: the #GParameter-struct containing parameters * @n_params: the count of @params * * Do a XML-RPC request for the given @context_path with @params. * * Returns: the response, on success the #GParameter-struct containing requested parameters, otherwise %NULL. * * Since: 1.0.0 */ gpointer ags_front_controller_do_request(AgsFrontController *front_controller, GObject *security_context, gchar *context_path, gchar *login, gchar *security_token, GParameter *params, guint n_params) { gpointer retval; g_return_val_if_fail(AGS_IS_FRONT_CONTROLLER(front_controller), NULL); g_object_ref((GObject *) front_controller); g_signal_emit(G_OBJECT(front_controller), front_controller_signals[DO_REQUEST], 0, context_path, login, security_token, params, n_params, &retval); g_object_unref((GObject *) front_controller); return(retval); } /** * ags_front__controller_new: * * Instantiate new #AgsFrontController * * Returns: the #AgsFrontController * * Since: 1.0.0 */ AgsFrontController* ags_front_controller_new() { AgsFrontController *front_controller; front_controller = (AgsFrontController *) g_object_new(AGS_TYPE_FRONT_CONTROLLER, NULL); return(front_controller); } gsequencer-1.4.24/ags/server/controller/ags_local_factory_controller.c0000644000175000017500000001624013256163135023221 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include #include #include #include #include #include void ags_local_factory_controller_class_init(AgsLocalFactoryControllerClass *local_factory_controller); void ags_local_factory_controller_init(AgsLocalFactoryController *local_factory_controller); void ags_local_factory_controller_finalize(GObject *gobject); gpointer ags_local_factory_controller_real_create_instance(AgsLocalFactoryController *local_factory_controller, GType type_name, GParameter *parameter, guint n_params); /** * SECTION:ags_local_factory_controller * @short_description: local factory controller * @title: AgsLocalFactoryController * @section_id: * @include: ags/server/controller/ags_local_factory_controller.h * * The #AgsLocalFactoryController is a controller. */ enum{ CREATE_INSTANCE, LAST_SIGNAL, }; static gpointer ags_local_factory_controller_parent_class = NULL; static guint local_factory_controller_signals[LAST_SIGNAL]; GType ags_local_factory_controller_get_type() { static GType ags_type_local_factory_controller = 0; if(!ags_type_local_factory_controller){ static const GTypeInfo ags_local_factory_controller_info = { sizeof (AgsLocalFactoryControllerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_local_factory_controller_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLocalFactoryController), 0, /* n_preallocs */ (GInstanceInitFunc) ags_local_factory_controller_init, }; ags_type_local_factory_controller = g_type_register_static(G_TYPE_OBJECT, "AgsLocalFactoryController", &ags_local_factory_controller_info, 0); } return (ags_type_local_factory_controller); } void ags_local_factory_controller_class_init(AgsLocalFactoryControllerClass *local_factory_controller) { GObjectClass *gobject; GParamSpec *param_spec; ags_local_factory_controller_parent_class = g_type_class_peek_parent(local_factory_controller); /* GObjectClass */ gobject = (GObjectClass *) local_factory_controller; gobject->finalize = ags_local_factory_controller_finalize; /* AgsLocalFactoryController */ local_factory_controller->create_instance = ags_local_factory_controller_real_create_instance; /* signals */ /** * AgsLocalFactoryController::create-instance: * @local_factory_controller: the #AgsLocalFactoryController * @type_name: the type name * @parameter: parameters to set as properties * @n_params: the count of parameters * * The ::create-instance signal is used to create an instance. * * Returns: the response * * Since: 1.0.0 */ local_factory_controller_signals[CREATE_INSTANCE] = g_signal_new("create-instance", G_TYPE_FROM_CLASS(local_factory_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLocalFactoryControllerClass, create_instance), NULL, NULL, g_cclosure_user_marshal_POINTER__ULONG_POINTER_UINT, G_TYPE_POINTER, 3, G_TYPE_ULONG, G_TYPE_POINTER, G_TYPE_UINT); } void ags_local_factory_controller_init(AgsLocalFactoryController *local_factory_controller) { gchar *context_path; context_path = g_strdup_printf("%s%s", AGS_CONTROLLER_BASE_PATH, AGS_LOCAL_FACTORY_CONTROLLER_CONTEXT_PATH); g_object_set(local_factory_controller, "context-path", context_path, NULL); g_free(context_path); //TODO:JK: implement me } void ags_local_factory_controller_finalize(GObject *gobject) { AgsLocalFactoryController *local_factory_controller; local_factory_controller = AGS_LOCAL_FACTORY_CONTROLLER(gobject); G_OBJECT_CLASS(ags_local_factory_controller_parent_class)->finalize(gobject); } gpointer ags_local_factory_controller_real_create_instance(AgsLocalFactoryController *local_factory_controller, GType gtype, GParameter *parameter, guint n_params) { AgsServer *server; AgsRegistry *registry; AgsApplicationContext *application_context; GObject *gobject; AgsRegistryEntry *registry_entry; gpointer response; server = AGS_CONTROLLER(local_factory_controller)->server; application_context = server->application_context; registry = ags_service_provider_get_registry(AGS_SERVICE_PROVIDER(application_context)); /* instantiate object */ gobject = g_object_newv(gtype, n_params, parameter); registry_entry = ags_registry_entry_alloc(registry); g_value_init(&(registry_entry->entry), G_TYPE_OBJECT); g_value_set_object(&(registry_entry->entry), gobject); /* create return value */ #ifdef AGS_WITH_XMLRPC_C response = xmlrpc_string_new(ags_service_provider_get_env(AGS_SERVICE_PROVIDER(application_context)), registry_entry->id); #else response = NULL; #endif return(response); } /** * ags_local_factory_controller_create_instance: * @local_factory_controller: the #AgsLocalFactoryController * @gtype: the type name * @parameter: the #GParameter-struct * @n_params: the parameter count * * Creates an instance of @gtype and passes @parameter to g_object_newv() * * Returns: the response * * Since: 1.0.0 */ gpointer ags_local_factory_controller_create_instance(AgsLocalFactoryController *local_factory_controller, GType gtype, GParameter *parameter, guint n_params) { gpointer retval; g_return_val_if_fail(AGS_IS_LOCAL_FACTORY_CONTROLLER(local_factory_controller), NULL); g_object_ref((GObject *) local_factory_controller); g_signal_emit(G_OBJECT(local_factory_controller), local_factory_controller_signals[CREATE_INSTANCE], 0, gtype, parameter, n_params, &retval); g_object_unref((GObject *) local_factory_controller); return(retval); } /** * ags_local_factory_controller_new: * * Instantiate new #AgsLocalFactoryController * * Returns: the #AgsLocalFactoryController * * Since: 1.0.0 */ AgsLocalFactoryController* ags_local_factory_controller_new() { AgsLocalFactoryController *local_factory_controller; local_factory_controller = (AgsLocalFactoryController *) g_object_new(AGS_TYPE_LOCAL_FACTORY_CONTROLLER, NULL); return(local_factory_controller); } gsequencer-1.4.24/ags/server/controller/ags_local_serialization_controller.c0000644000175000017500000003034013256163135024424 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include void ags_local_serialization_controller_class_init(AgsLocalSerializationControllerClass *local_serialization_controller); void ags_local_serialization_controller_init(AgsLocalSerializationController *local_serialization_controller); void ags_local_serialization_controller_finalize(GObject *gobject); gpointer ags_local_serialization_controller_real_send_object(AgsLocalSerializationController *local_serialization_controller, GObject *gobject); gpointer ags_local_serialization_controller_real_send_object_property(AgsLocalSerializationController *local_serialization_controller, GObject *gobject, gchar **property_name); gpointer ags_local_serialization_controller_real_receive_object(AgsLocalSerializationController *local_serialization_controller, gchar *str); gpointer ags_local_serialization_controller_real_receive_object_property(AgsLocalSerializationController *local_serialization_controller, gchar *object_id, gchar *str); /** * SECTION:ags_local_serialization_controller * @short_description: local serialization controller * @title: AgsLocalSerializationController * @section_id: * @include: ags/server/controller/ags_local_serialization_controller.h * * The #AgsLocalSerializationController is a controller. */ enum{ SEND_OBJECT, SEND_OBJECT_PROPERTY, RECEIVE_OBJECT, RECEIVE_OBJECT_PROPERTY, LAST_SIGNAL, }; static gpointer ags_local_serialization_controller_parent_class = NULL; static guint local_serialization_controller_signals[LAST_SIGNAL]; GType ags_local_serialization_controller_get_type() { static GType ags_type_local_serialization_controller = 0; if(!ags_type_local_serialization_controller){ static const GTypeInfo ags_local_serialization_controller_info = { sizeof (AgsLocalSerializationControllerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_local_serialization_controller_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLocalSerializationController), 0, /* n_preallocs */ (GInstanceInitFunc) ags_local_serialization_controller_init, }; ags_type_local_serialization_controller = g_type_register_static(G_TYPE_OBJECT, "AgsLocalSerializationController", &ags_local_serialization_controller_info, 0); } return (ags_type_local_serialization_controller); } void ags_local_serialization_controller_class_init(AgsLocalSerializationControllerClass *local_serialization_controller) { GObjectClass *gobject; GParamSpec *param_spec; ags_local_serialization_controller_parent_class = g_type_class_peek_parent(local_serialization_controller); /* GObjectClass */ gobject = (GObjectClass *) local_serialization_controller; gobject->finalize = ags_local_serialization_controller_finalize; /* AgsLocalSerializationController */ local_serialization_controller->send_object = ags_local_serialization_controller_real_send_object; /* signals */ /** * AgsLocalSerializationController::send-object: * @local_serialization_controller: the #AgsLocalSerializationController * @gobject: the #GObject to send * * The ::send-object signal is used to send a serialized object. * * Returns: the response * * Since: 1.0.0 */ local_serialization_controller_signals[SEND_OBJECT] = g_signal_new("send-object", G_TYPE_FROM_CLASS(local_serialization_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLocalSerializationControllerClass, send_object), NULL, NULL, g_cclosure_user_marshal_POINTER__OBJECT, G_TYPE_POINTER, 1, G_TYPE_OBJECT); /** * AgsLocalSerializationController::send-object-property: * @local_serialization_controller: the #AgsLocalSerializationController * @gobject: the #GObject to send * @property_name: a %NULL terminated string vector containing property names * * The ::send-object-property signal is used to send a serialized object properties. * * Returns: the response * * Since: 1.0.0 */ local_serialization_controller_signals[SEND_OBJECT_PROPERTY] = g_signal_new("send-object-property", G_TYPE_FROM_CLASS(local_serialization_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLocalSerializationControllerClass, send_object_property), NULL, NULL, g_cclosure_user_marshal_POINTER__OBJECT, G_TYPE_POINTER, 2, G_TYPE_OBJECT, G_TYPE_POINTER); /** * AgsLocalSerializationController::receive-object: * @local_serialization_controller: the #AgsLocalSerializationController * @str: the string representation of the object * * The ::receive-object signal is used to receive a serialized object. * * Returns: the response * * Since: 1.0.0 */ local_serialization_controller_signals[RECEIVE_OBJECT] = g_signal_new("receive-object", G_TYPE_FROM_CLASS(local_serialization_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLocalSerializationControllerClass, receive_object), NULL, NULL, g_cclosure_user_marshal_POINTER__OBJECT, G_TYPE_POINTER, 1, G_TYPE_OBJECT); /** * AgsLocalSerializationController::receive-object-property: * @local_serialization_controller: the #AgsLocalSerializationController * @object_id: the object's id * @str: the string representation of the properties * * The ::receive-object-property signal is used to receive a serialized object properties. * * Returns: the response * * Since: 1.0.0 */ local_serialization_controller_signals[RECEIVE_OBJECT_PROPERTY] = g_signal_new("receive-object-property", G_TYPE_FROM_CLASS(local_serialization_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLocalSerializationControllerClass, receive_object_property), NULL, NULL, g_cclosure_user_marshal_POINTER__OBJECT, G_TYPE_POINTER, 2, G_TYPE_OBJECT, G_TYPE_POINTER); } void ags_local_serialization_controller_init(AgsLocalSerializationController *local_serialization_controller) { gchar *context_path; context_path = g_strdup_printf("%s%s", AGS_CONTROLLER_BASE_PATH, AGS_LOCAL_SERIALIZATION_CONTROLLER_CONTEXT_PATH); g_object_set(local_serialization_controller, "context-path", context_path, NULL); g_free(context_path); //TODO:JK: implement me } void ags_local_serialization_controller_finalize(GObject *gobject) { AgsLocalSerializationController *local_serialization_controller; local_serialization_controller = AGS_LOCAL_SERIALIZATION_CONTROLLER(gobject); G_OBJECT_CLASS(ags_local_serialization_controller_parent_class)->finalize(gobject); } gpointer ags_local_serialization_controller_real_send_object(AgsLocalSerializationController *local_serialization_controller, GObject *gobject) { //TODO:JK: implement me return(NULL); } /** * ags_local_serialization_controller_send_object: * @local_serialization_controller: the #AgsLocalSerializationController * @gobject: the #GObject to send * * Send object. * * Returns: the response * * Since: 1.0.0 */ gpointer ags_local_serialization_controller_send_object(AgsLocalSerializationController *local_serialization_controller, GObject *gobject) { gpointer retval; g_return_val_if_fail(AGS_IS_LOCAL_SERIALIZATION_CONTROLLER(local_serialization_controller), NULL); g_object_ref((GObject *) local_serialization_controller); g_signal_emit(G_OBJECT(local_serialization_controller), local_serialization_controller_signals[SEND_OBJECT], 0, gobject, &retval); g_object_unref((GObject *) local_serialization_controller); return(retval); } gpointer ags_local_serialization_controller_real_send_object_property(AgsLocalSerializationController *local_serialization_controller, GObject *gobject, gchar **property_name) { //TODO:JK: implement me return(NULL); } /** * ags_local_serialization_controller_send_object_property: * @local_serialization_controller: the #AgsLocalSerializationController * @gobject: the #GObject containing the properties to send * @property_name: the property names as %NULL terminated string vector * * Send object property. * * Returns: the response * * Since: 1.0.0 */ gpointer ags_local_serialization_controller_send_object_property(AgsLocalSerializationController *local_serialization_controller, GObject *gobject, gchar **property_name) { gpointer retval; g_return_val_if_fail(AGS_IS_LOCAL_SERIALIZATION_CONTROLLER(local_serialization_controller), NULL); g_object_ref((GObject *) local_serialization_controller); g_signal_emit(G_OBJECT(local_serialization_controller), local_serialization_controller_signals[SEND_OBJECT_PROPERTY], 0, gobject, property_name, &retval); g_object_unref((GObject *) local_serialization_controller); return(retval); } gpointer ags_local_serialization_controller_real_receive_object(AgsLocalSerializationController *local_serialization_controller, gchar *str) { //TODO:JK: implement me return(NULL); } /** * ags_local_serialization_controller_receive_object: * @local_serialization_controller: the #AgsLocalSerializationController * @str: the string representation of the object * * Receive object. * * Returns: the response * * Since: 1.0.0 */ gpointer ags_local_serialization_controller_receive_object(AgsLocalSerializationController *local_serialization_controller, gchar *str) { gpointer retval; g_return_val_if_fail(AGS_IS_LOCAL_SERIALIZATION_CONTROLLER(local_serialization_controller), NULL); g_object_ref((GObject *) local_serialization_controller); g_signal_emit(G_OBJECT(local_serialization_controller), local_serialization_controller_signals[RECEIVE_OBJECT], 0, str, &retval); g_object_unref((GObject *) local_serialization_controller); return(retval); } gpointer ags_local_serialization_controller_real_receive_object_property(AgsLocalSerializationController *local_serialization_controller, gchar *object_id, gchar *str) { //TODO:JK: implement me return(NULL); } /** * ags_local_serialization_controller_receive_object_property: * @local_serialization_controller: the #AgsLocalSerializationController * @object_id: the id of the object to set the properties * @str: the string representation of the object properties * * Receive object. * * Returns: the response * * Since: 1.0.0 */ gpointer ags_local_serialization_controller_receive_object_property(AgsLocalSerializationController *local_serialization_controller, gchar *object_id, gchar *str) { gpointer retval; g_return_val_if_fail(AGS_IS_LOCAL_SERIALIZATION_CONTROLLER(local_serialization_controller), NULL); g_object_ref((GObject *) local_serialization_controller); g_signal_emit(G_OBJECT(local_serialization_controller), local_serialization_controller_signals[RECEIVE_OBJECT_PROPERTY], 0, object_id, str, &retval); g_object_unref((GObject *) local_serialization_controller); return(retval); } /** * ags_local_serialization_controller_new: * * Instantiate new #AgsLocalSerializationController * * Returns: the #AgsLocalSerializationController * * Since: 1.0.0 */ AgsLocalSerializationController* ags_local_serialization_controller_new() { AgsLocalSerializationController *local_serialization_controller; local_serialization_controller = (AgsLocalSerializationController *) g_object_new(AGS_TYPE_LOCAL_SERIALIZATION_CONTROLLER, NULL); return(local_serialization_controller); } gsequencer-1.4.24/ags/server/controller/ags_controller.c0000644000175000017500000002254213246707333020325 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include #include void ags_controller_class_init(AgsControllerClass *controller); void ags_controller_init(AgsController *controller); void ags_controller_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_controller_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_controller_dispose(GObject *gobject); void ags_controller_finalize(GObject *gobject); /** * SECTION:ags_controller * @short_description: base controller * @title: AgsController * @section_id: * @include: ags/server/controller/ags_controller.h * * The #AgsController is a base object to implement controllers. */ enum{ PROP_0, PROP_SERVER, PROP_CONTEXT_PATH, }; static gpointer ags_controller_parent_class = NULL; GType ags_controller_get_type() { static GType ags_type_controller = 0; if(!ags_type_controller){ static const GTypeInfo ags_controller_info = { sizeof (AgsControllerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_controller_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsController), 0, /* n_preallocs */ (GInstanceInitFunc) ags_controller_init, }; ags_type_controller = g_type_register_static(G_TYPE_OBJECT, "AgsController", &ags_controller_info, 0); } return (ags_type_controller); } void ags_controller_class_init(AgsControllerClass *controller) { GObjectClass *gobject; GParamSpec *param_spec; ags_controller_parent_class = g_type_class_peek_parent(controller); /* GObjectClass */ gobject = (GObjectClass *) controller; gobject->set_property = ags_controller_set_property; gobject->get_property = ags_controller_get_property; gobject->dispose = ags_controller_dispose; gobject->finalize = ags_controller_finalize; /* properties */ /** * AgsController:server: * * The assigned #AgsServer * * Since: 1.0.0 */ param_spec = g_param_spec_object("server", i18n("assigned server"), i18n("The assigned server"), AGS_TYPE_SERVER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SERVER, param_spec); /** * AgsController:context-path: * * The context path provided. * * Since: 1.0.0 */ param_spec = g_param_spec_string("context-path", i18n_pspec("context path to provide"), i18n_pspec("The context path provided by this controller"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTEXT_PATH, param_spec); } void ags_controller_init(AgsController *controller) { controller->server = NULL; controller->context_path = NULL; controller->resource = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) ags_controller_resource_free); } void ags_controller_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsController *controller; controller = AGS_CONTROLLER(gobject); switch(prop_id){ case PROP_SERVER: { AgsServer *server; server = (AgsServer *) g_value_get_object(value); if(controller->server == (GObject *) server){ return; } if(controller->server != NULL){ g_object_unref(G_OBJECT(controller->server)); } if(server != NULL){ g_object_ref(G_OBJECT(server)); } controller->server = server; } break; case PROP_CONTEXT_PATH: { char *context_path; context_path = (char *) g_value_get_string(value); controller->context_path = g_strdup(context_path); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_controller_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsController *controller; controller = AGS_CONTROLLER(gobject); switch(prop_id){ case PROP_SERVER: { g_value_set_object(value, controller->server); } break; case PROP_CONTEXT_PATH: { g_value_set_string(value, controller->context_path); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_controller_dispose(GObject *gobject) { AgsController *controller; controller = AGS_CONTROLLER(gobject); if(controller->server != NULL){ g_object_unref(controller->server); controller->server = NULL; } /* call parent */ G_OBJECT_CLASS(ags_controller_parent_class)->dispose(gobject); } void ags_controller_finalize(GObject *gobject) { AgsController *controller; controller = AGS_CONTROLLER(gobject); if(controller->server != NULL){ g_object_unref(controller->server); } g_free(controller->context_path); /* call parent */ G_OBJECT_CLASS(ags_controller_parent_class)->finalize(gobject); } /** * ags_controller_resource_alloc: * @group_id: the group id * @user_id: the user id * @access_mode: the access mode * * Allocated #AgsControllerResource-struct. * * Returns: the newly allocated #AgsControllerResource-struct * * Since: 1.0.0 */ AgsControllerResource* ags_controller_resource_alloc(gchar *group_id, gchar *user_id, guint access_mode) { AgsControllerResource *controller_resource; controller_resource = (AgsControllerResource *) malloc(sizeof(AgsControllerResource)); controller_resource->group_id = g_strdup(group_id); controller_resource->user_id = g_strdup(user_id); controller_resource->access_mode = access_mode; return(controller_resource); } /** * ags_controller_resource_free: * @controller_resource: the #AgsControllerResource-struct * * Free @controller_resource. * * Since: 1.0.0 */ void ags_controller_resource_free(AgsControllerResource *controller_resource) { if(controller_resource == NULL){ return; } g_free(controller_resource->group_id); g_free(controller_resource->user_id); g_free(controller_resource); } /** * ags_controller_add_resource: * @controller: the #AgsController * @resource_name: the resource name as string * @controller_resource: the #AgsControllerResource-struct * * Add @controller_resource with key @resource_name to hash table. * * Since: 1.0.0 */ void ags_controller_add_resource(AgsController *controller, gchar *resource_name, AgsControllerResource *controller_resource) { if(!AGS_IS_CONTROLLER(controller) || resource_name == NULL || controller_resource == NULL){ return; } g_hash_table_insert(controller->resource, g_strdup(resource_name), controller_resource); } /** * ags_controller_remove_resource: * @controller: the #AgsController * @resource_name: the resource name as string * * Remove key @resource_name from hash table. * * Since: 1.0.0 */ void ags_controller_remove_resource(AgsController *controller, gchar *resource_name) { if(!AGS_IS_CONTROLLER(controller) || resource_name == NULL){ return; } g_hash_table_remove(controller->resource, resource_name); } /** * ags_controller_lookup_resource: * @controller: the #AgsController * @resource_name: the resource name as string * * Lookup key @resource_name in hash table. * * Returns: the matchin #AgsControllerResource-struct * * Since: 1.0.0 */ AgsControllerResource* ags_controller_lookup_resource(AgsController *controller, gchar *resource_name) { AgsControllerResource *resource; if(!AGS_IS_CONTROLLER(controller) || resource_name == NULL){ return(NULL); } resource = (AgsControllerResource *) g_hash_table_lookup(controller->resource, resource_name); return(resource); } /** * ags_controller_query_security_context: * @controller: the #AgsController * @security_context: the #AgsSecurityContext * @login: the login to query * * Query @security_context for @login. * * Returns: %TRUE if allowed to proceed, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_controller_query_security_context(AgsController *controller, GObject *security_context, gchar *login) { //TODO:JK: implement me return(FALSE); } /** * ags_controller_new: * * Instantiate new #AgsController * * Returns: the #AgsController * * Since: 1.0.0 */ AgsController* ags_controller_new() { AgsController *controller; controller = (AgsController *) g_object_new(AGS_TYPE_CONTROLLER, NULL); return(controller); } gsequencer-1.4.24/ags/server/controller/ags_local_task_controller.h0000644000175000017500000000532113246707333022522 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_LOCAL_TASK_CONTROLLER_H__ #define __AGS_LOCAL_TASK_CONTROLLER_H__ #include #include #include #include #include #define AGS_TYPE_LOCAL_TASK_CONTROLLER (ags_local_task_controller_get_type()) #define AGS_LOCAL_TASK_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LOCAL_TASK_CONTROLLER, AgsLocalTaskController)) #define AGS_LOCAL_TASK_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_LOCAL_TASK_CONTROLLER, AgsLocalTaskControllerClass)) #define AGS_IS_LOCAL_TASK_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LOCAL_TASK_CONTROLLER)) #define AGS_IS_LOCAL_TASK_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LOCAL_TASK_CONTROLLER)) #define AGS_LOCAL_TASK_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_LOCAL_TASK_CONTROLLER, AgsLocalTaskControllerClass)) #define AGS_LOCAL_TASK_CONTROLLER_CONTEXT_PATH "/task" typedef struct _AgsLocalTaskController AgsLocalTaskController; typedef struct _AgsLocalTaskControllerClass AgsLocalTaskControllerClass; struct _AgsLocalTaskController { AgsController controller; }; struct _AgsLocalTaskControllerClass { AgsControllerClass controller; gpointer (*launch)(AgsLocalTaskController *local_task_controller, AgsTask *task); gpointer (*launch_timed)(AgsLocalTaskController *local_task_controller, AgsTask *task, AgsTimestamp *timestamp); }; GType ags_local_task_controller_get_type(); gpointer ags_local_task_controller_launch(AgsLocalTaskController *local_task_controller, AgsTask *task); gpointer ags_local_task_controller_launch_timed(AgsLocalTaskController *local_task_controller, AgsTask *task, AgsTimestamp *timestamp); AgsLocalTaskController* ags_local_task_controller_new(); #endif /*__AGS_LOCAL_TASK_CONTROLLER_H__*/ gsequencer-1.4.24/ags/server/controller/ags_local_task_controller.c0000644000175000017500000001615513256163135022521 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include void ags_local_task_controller_class_init(AgsLocalTaskControllerClass *local_task_controller); void ags_local_task_controller_init(AgsLocalTaskController *local_task_controller); void ags_local_task_controller_finalize(GObject *gobject); gpointer ags_local_task_controller_real_launch(AgsLocalTaskController *local_task_controller, AgsTask *task); gpointer ags_local_task_controller_real_launch_timed(AgsLocalTaskController *local_task_controller, AgsTask *task, AgsTimestamp *timestamp); /** * SECTION:ags_local_task_controller * @short_description: local task controller * @title: AgsLocalTaskController * @section_id: * @include: ags/server/controller/ags_local_task_controller.h * * The #AgsLocalTaskController is a controller. */ enum{ LAUNCH, LAUNCH_TIMED, LAST_SIGNAL, }; static gpointer ags_local_task_controller_parent_class = NULL; static guint local_task_controller_signals[LAST_SIGNAL]; GType ags_local_task_controller_get_type() { static GType ags_type_local_task_controller = 0; if(!ags_type_local_task_controller){ static const GTypeInfo ags_local_task_controller_info = { sizeof (AgsLocalTaskControllerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_local_task_controller_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLocalTaskController), 0, /* n_preallocs */ (GInstanceInitFunc) ags_local_task_controller_init, }; ags_type_local_task_controller = g_type_register_static(G_TYPE_OBJECT, "AgsLocalTaskController", &ags_local_task_controller_info, 0); } return (ags_type_local_task_controller); } void ags_local_task_controller_class_init(AgsLocalTaskControllerClass *local_task_controller) { GObjectClass *gobject; GParamSpec *param_spec; ags_local_task_controller_parent_class = g_type_class_peek_parent(local_task_controller); /* GObjectClass */ gobject = (GObjectClass *) local_task_controller; gobject->finalize = ags_local_task_controller_finalize; /* AgsLocalTaskController */ local_task_controller->launch = ags_local_task_controller_real_launch; local_task_controller->launch_timed = ags_local_task_controller_real_launch_timed; /* signals */ /** * AgsLocalTaskController::launch: * @local_task_controller: the #AgsLocalTaskController * @task: the #AgsTask to launch * * The ::launch signal is used to launch a task. * * Returns: the response * * Since: 1.0.0 */ local_task_controller_signals[LAUNCH] = g_signal_new("launch", G_TYPE_FROM_CLASS(local_task_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLocalTaskControllerClass, launch), NULL, NULL, g_cclosure_user_marshal_POINTER__OBJECT, G_TYPE_POINTER, 1, G_TYPE_OBJECT); /** * AgsLocalTaskController::launch: * @local_task_controller: the #AgsLocalTaskController * @task: the #AgsTask to launch * @timestamp: the #AgsTimestamp specify the start time * * The ::launch-timed signal is used to launch a task delayed. * * Returns: the response * * Since: 1.0.0 */ local_task_controller_signals[LAUNCH_TIMED] = g_signal_new("launch-timed", G_TYPE_FROM_CLASS(local_task_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLocalTaskControllerClass, launch_timed), NULL, NULL, g_cclosure_user_marshal_POINTER__OBJECT_OBJECT, G_TYPE_POINTER, 2, G_TYPE_OBJECT, G_TYPE_OBJECT); } void ags_local_task_controller_init(AgsLocalTaskController *local_task_controller) { gchar *context_path; context_path = g_strdup_printf("%s%s", AGS_CONTROLLER_BASE_PATH, AGS_LOCAL_TASK_CONTROLLER_CONTEXT_PATH); g_object_set(local_task_controller, "context-path", context_path, NULL); g_free(context_path); //TODO:JK: implement me } void ags_local_task_controller_finalize(GObject *gobject) { AgsLocalTaskController *local_task_controller; local_task_controller = AGS_LOCAL_TASK_CONTROLLER(gobject); G_OBJECT_CLASS(ags_local_task_controller_parent_class)->finalize(gobject); } gpointer ags_local_task_controller_real_launch(AgsLocalTaskController *local_task_controller, AgsTask *task) { //TODO:JK: implement me return(NULL); } /** * ags_local_task_controller_launch: * @local_task_controller: the #AgsLocalTaskController * @task: the #AgsTask * * Launch task. * * Returns: the response * * Since: 1.0.0 */ gpointer ags_local_task_controller_launch(AgsLocalTaskController *local_task_controller, AgsTask *task) { gpointer retval; g_return_val_if_fail(AGS_IS_LOCAL_TASK_CONTROLLER(local_task_controller), NULL); g_object_ref((GObject *) local_task_controller); g_signal_emit(G_OBJECT(local_task_controller), local_task_controller_signals[LAUNCH], 0, task, &retval); g_object_unref((GObject *) local_task_controller); return(retval); } gpointer ags_local_task_controller_real_launch_timed(AgsLocalTaskController *local_task_controller, AgsTask *task, AgsTimestamp *timestamp) { //TODO:JK: implement me return(NULL); } /** * ags_local_task_controller_launch_timed: * @local_task_controller: the #AgsLocalTaskController * @task: the #AgsTask * @timestamp: the #AgsTimestamp * * Launch task. * * Returns: the response * * Since: 1.0.0 */ gpointer ags_local_task_controller_launch_timed(AgsLocalTaskController *local_task_controller, AgsTask *task, AgsTimestamp *timestamp) { gpointer retval; g_return_val_if_fail(AGS_IS_LOCAL_TASK_CONTROLLER(local_task_controller), NULL); g_object_ref((GObject *) local_task_controller); g_signal_emit(G_OBJECT(local_task_controller), local_task_controller_signals[LAUNCH_TIMED], 0, task, timestamp, &retval); g_object_unref((GObject *) local_task_controller); return(retval); } /** * ags_local_task_controller_new: * * Instantiate new #AgsLocalTaskController * * Returns: the #AgsLocalTaskController * * Since: 1.0.0 */ AgsLocalTaskController* ags_local_task_controller_new() { AgsLocalTaskController *local_task_controller; local_task_controller = (AgsLocalTaskController *) g_object_new(AGS_TYPE_LOCAL_TASK_CONTROLLER, NULL); return(local_task_controller); } gsequencer-1.4.24/ags/server/controller/ags_local_registry_controller.c0000644000175000017500000001301413256163135023416 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include void ags_local_registry_controller_class_init(AgsLocalRegistryControllerClass *local_registry_controller); void ags_local_registry_controller_init(AgsLocalRegistryController *local_registry_controller); void ags_local_registry_controller_finalize(GObject *gobject); gpointer ags_local_registry_controller_real_entry_bulk(AgsLocalRegistryController *local_registry_controller); /** * SECTION:ags_local_registry_controller * @short_description: local registry controller * @title: AgsLocalRegistryController * @section_id: * @include: ags/server/controller/ags_local_registry_controller.h * * The #AgsLocalRegistryController is a controller. */ enum{ ENTRY_BULK, LAST_SIGNAL, }; static gpointer ags_local_registry_controller_parent_class = NULL; static guint local_registry_controller_signals[LAST_SIGNAL]; GType ags_local_registry_controller_get_type() { static GType ags_type_local_registry_controller = 0; if(!ags_type_local_registry_controller){ static const GTypeInfo ags_local_registry_controller_info = { sizeof (AgsLocalRegistryControllerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_local_registry_controller_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLocalRegistryController), 0, /* n_preallocs */ (GInstanceInitFunc) ags_local_registry_controller_init, }; ags_type_local_registry_controller = g_type_register_static(G_TYPE_OBJECT, "AgsLocalRegistryController", &ags_local_registry_controller_info, 0); } return (ags_type_local_registry_controller); } void ags_local_registry_controller_class_init(AgsLocalRegistryControllerClass *local_registry_controller) { GObjectClass *gobject; GParamSpec *param_spec; ags_local_registry_controller_parent_class = g_type_class_peek_parent(local_registry_controller); /* GObjectClass */ gobject = (GObjectClass *) local_registry_controller; gobject->finalize = ags_local_registry_controller_finalize; /* AgsLocalRegistryController */ local_registry_controller->entry_bulk = ags_local_registry_controller_real_entry_bulk; /* signals */ /** * AgsLocalRegistryController::entry-bulk: * @local_registry_controller: the #AgsLocalRegistryController * * The ::entry-bulk signal is used to retrieve all registry entries. * * Returns: the response * * Since: 1.0.0 */ local_registry_controller_signals[ENTRY_BULK] = g_signal_new("entry-bulk", G_TYPE_FROM_CLASS(local_registry_controller), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLocalRegistryControllerClass, entry_bulk), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); } void ags_local_registry_controller_init(AgsLocalRegistryController *local_registry_controller) { gchar *context_path; context_path = g_strdup_printf("%s%s", AGS_CONTROLLER_BASE_PATH, AGS_LOCAL_REGISTRY_CONTROLLER_CONTEXT_PATH); g_object_set(local_registry_controller, "context-path", context_path, NULL); g_free(context_path); //TODO:JK: implement me } void ags_local_registry_controller_finalize(GObject *gobject) { AgsLocalRegistryController *local_registry_controller; local_registry_controller = AGS_LOCAL_REGISTRY_CONTROLLER(gobject); G_OBJECT_CLASS(ags_local_registry_controller_parent_class)->finalize(gobject); } gpointer ags_local_registry_controller_real_entry_bulk(AgsLocalRegistryController *local_registry_controller) { return(NULL); } /** * ags_local_registry_controller_entry_bulk: * @local_registry_controller: the #AgsLocalRegistryController * * Retrieve entry bulk of registry. * * Returns: the response * * Since: 1.0.0 */ gpointer ags_local_registry_controller_entry_bulk(AgsLocalRegistryController *local_registry_controller) { gpointer retval; g_return_val_if_fail(AGS_IS_LOCAL_REGISTRY_CONTROLLER(local_registry_controller), NULL); g_object_ref((GObject *) local_registry_controller); g_signal_emit(G_OBJECT(local_registry_controller), local_registry_controller_signals[ENTRY_BULK], 0, &retval); g_object_unref((GObject *) local_registry_controller); return(retval); } /** * ags_local_registry_controller_new: * * Instantiate new #AgsLocalRegistryController * * Returns: the #AgsLocalRegistryController * * Since: 1.0.0 */ AgsLocalRegistryController* ags_local_registry_controller_new() { AgsLocalRegistryController *local_registry_controller; local_registry_controller = (AgsLocalRegistryController *) g_object_new(AGS_TYPE_LOCAL_REGISTRY_CONTROLLER, NULL); return(local_registry_controller); } gsequencer-1.4.24/ags/server/controller/ags_front_controller.h0000644000175000017500000000544213246707333021542 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_FRONT_CONTROLLER_H__ #define __AGS_FRONT_CONTROLLER_H__ #include #include #include #define AGS_TYPE_FRONT_CONTROLLER (ags_front_controller_get_type()) #define AGS_FRONT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FRONT_CONTROLLER, AgsFrontController)) #define AGS_FRONT_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_FRONT_CONTROLLER, AgsFrontControllerClass)) #define AGS_IS_FRONT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FRONT_CONTROLLER)) #define AGS_IS_FRONT_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FRONT_CONTROLLER)) #define AGS_FRONT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_FRONT_CONTROLLER, AgsFrontControllerClass)) typedef struct _AgsFrontController AgsFrontController; typedef struct _AgsFrontControllerClass AgsFrontControllerClass; struct _AgsFrontController { AgsController controller; }; struct _AgsFrontControllerClass { AgsControllerClass controller; gpointer (*authenticate)(AgsFrontController *front_controller, gchar *authentication_module, gchar *login, gchar *password, gchar *certs); gpointer (*do_request)(AgsFrontController *front_controller, GObject *security_context, gchar *context_path, gchar *login, gchar *security_token, GParameter *params, guint n_params); }; GType ags_front_controller_get_type(); gpointer ags_front_controller_authenticate(AgsFrontController *front_controller, gchar *authentication_module, gchar *login, gchar *password, gchar *certs); gpointer ags_front_controller_do_request(AgsFrontController *front_controller, GObject *security_context, gchar *context_path, gchar *login, gchar *security_token, GParameter *params, guint n_params); AgsFrontController* ags_front_controller_new(); #endif /*__AGS_FRONT_CONTROLLER_H__*/ gsequencer-1.4.24/ags/server/controller/ags_local_registry_controller.h0000644000175000017500000000506113246707333023431 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_LOCAL_REGISTRY_CONTROLLER_H__ #define __AGS_LOCAL_REGISTRY_CONTROLLER_H__ #include #include #include #include #include #define AGS_TYPE_LOCAL_REGISTRY_CONTROLLER (ags_local_registry_controller_get_type()) #define AGS_LOCAL_REGISTRY_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LOCAL_REGISTRY_CONTROLLER, AgsLocalRegistryController)) #define AGS_LOCAL_REGISTRY_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_LOCAL_REGISTRY_CONTROLLER, AgsLocalRegistryControllerClass)) #define AGS_IS_LOCAL_REGISTRY_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LOCAL_REGISTRY_CONTROLLER)) #define AGS_IS_LOCAL_REGISTRY_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LOCAL_REGISTRY_CONTROLLER)) #define AGS_LOCAL_REGISTRY_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_LOCAL_REGISTRY_CONTROLLER, AgsLocalRegistryControllerClass)) #define AGS_LOCAL_REGISTRY_CONTROLLER_CONTEXT_PATH "/registry" typedef struct _AgsLocalRegistryController AgsLocalRegistryController; typedef struct _AgsLocalRegistryControllerClass AgsLocalRegistryControllerClass; struct _AgsLocalRegistryController { AgsController controller; }; struct _AgsLocalRegistryControllerClass { AgsControllerClass controller; gpointer (*entry_bulk)(AgsLocalRegistryController *local_registry_controller); }; GType ags_local_registry_controller_get_type(); gpointer ags_local_registry_controller_entry_bulk(AgsLocalRegistryController *local_registry_controller); AgsLocalRegistryController* ags_local_registry_controller_new(); #endif /*__AGS_LOCAL_REGISTRY_CONTROLLER_H__*/ gsequencer-1.4.24/ags/server/controller/ags_local_factory_controller.h0000644000175000017500000000531513246707333023232 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_LOCAL_FACTORY_CONTROLLER_H__ #define __AGS_LOCAL_FACTORY_CONTROLLER_H__ #include #include #include #define AGS_TYPE_LOCAL_FACTORY_CONTROLLER (ags_local_factory_controller_get_type()) #define AGS_LOCAL_FACTORY_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LOCAL_FACTORY_CONTROLLER, AgsLocalFactoryController)) #define AGS_LOCAL_FACTORY_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_LOCAL_FACTORY_CONTROLLER, AgsLocalFactoryControllerClass)) #define AGS_IS_LOCAL_FACTORY_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LOCAL_FACTORY_CONTROLLER)) #define AGS_IS_LOCAL_FACTORY_CONTROLLER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LOCAL_FACTORY_CONTROLLER)) #define AGS_LOCAL_FACTORY_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_LOCAL_FACTORY_CONTROLLER, AgsLocalFactoryControllerClass)) #define AGS_LOCAL_FACTORY_CONTROLLER_CONTEXT_PATH "/local-factory" #define AGS_LOCAL_FACTORY_CONTROLLER_RESOURCE_CREATE_INSTANCE "/create-instance" typedef struct _AgsLocalFactoryController AgsLocalFactoryController; typedef struct _AgsLocalFactoryControllerClass AgsLocalFactoryControllerClass; struct _AgsLocalFactoryController { AgsController controller; }; struct _AgsLocalFactoryControllerClass { AgsControllerClass controller; gpointer (*create_instance)(AgsLocalFactoryController *local_factory_controller, GType gtype, GParameter *parameter, guint n_params); }; GType ags_local_factory_controller_get_type(); gpointer ags_local_factory_controller_create_instance(AgsLocalFactoryController *local_factory_controller, GType gtype, GParameter *parameter, guint n_params); AgsLocalFactoryController* ags_local_factory_controller_new(); #endif /*__AGS_LOCAL_FACTORY_CONTROLLER_H__*/ gsequencer-1.4.24/ags/server/ags_registry.c0000644000175000017500000002551313256163135015625 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include #include #include #include #include void ags_registry_class_init(AgsRegistryClass *registry); void ags_registry_connectable_interface_init(AgsConnectableInterface *connectable); void ags_registry_init(AgsRegistry *registry); void ags_registry_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_registry_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_registry_add_to_registry(AgsConnectable *connectable); void ags_registry_remove_from_registry(AgsConnectable *connectable); void ags_registry_connect(AgsConnectable *connectable); void ags_registry_disconnect(AgsConnectable *connectable); void ags_registry_dispose(GObject *gobject); void ags_registry_finalize(GObject *gobject); /** * SECTION:ags_registry * @short_description: remote control registry * @title: AgsRegistry * @section_id: * @include: ags/server/ags_registry.h * * The #AgsRegistry is a registry where you are able to lookup objects. */ enum{ PROP_0, PROP_SERVER, }; static gpointer ags_registry_parent_class = NULL; GType ags_registry_get_type() { static GType ags_type_registry = 0; if(!ags_type_registry){ static const GTypeInfo ags_registry_info = { sizeof (AgsRegistryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_registry_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRegistry), 0, /* n_preallocs */ (GInstanceInitFunc) ags_registry_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_registry_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_registry = g_type_register_static(G_TYPE_OBJECT, "AgsRegistry", &ags_registry_info, 0); g_type_add_interface_static(ags_type_registry, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_registry); } void ags_registry_class_init(AgsRegistryClass *registry) { GObjectClass *gobject; GParamSpec *param_spec; ags_registry_parent_class = g_type_class_peek_parent(registry); /* GObjectClass */ gobject = (GObjectClass *) registry; gobject->set_property = ags_registry_set_property; gobject->get_property = ags_registry_get_property; gobject->dispose = ags_registry_dispose; gobject->finalize = ags_registry_finalize; /* properties */ /** * AgsRegistry:server: * * The assigned #AgsServer * * Since: 1.0.0 */ param_spec = g_param_spec_object("server", i18n("assigned server"), i18n("The assigned server"), AGS_TYPE_SERVER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SERVER, param_spec); } void ags_registry_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = ags_registry_add_to_registry; connectable->remove_from_registry = ags_registry_remove_from_registry; connectable->connect = ags_registry_connect; connectable->disconnect = ags_registry_disconnect; } void ags_registry_init(AgsRegistry *registry) { AgsApplicationContext *application_context; application_context = ags_application_context_get_instance(); registry->flags = 0; registry->mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(registry->mutexattr); pthread_mutexattr_settype(registry->mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(registry->mutexattr, PTHREAD_PRIO_INHERIT); #endif registry->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(registry->mutex, registry->mutexattr); registry->previous = NULL; registry->current = NULL; #ifdef AGS_WITH_XMLRPC_C registry->registry = xmlrpc_registry_new(ags_service_provider_get_env(AGS_SERVICE_PROVIDER(application_context))); #else registry->registry = NULL; #endif registry->id_length = AGS_REGISTRY_DEFAULT_ID_LENGTH; registry->counter = 0; registry->entry = NULL; } void ags_registry_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRegistry *registry; registry = AGS_REGISTRY(gobject); switch(prop_id){ case PROP_SERVER: { AgsServer *server; server = (AgsServer *) g_value_get_object(value); if(registry->server == (GObject *) server){ return; } if(registry->server != NULL){ g_object_unref(G_OBJECT(registry->server)); } if(server != NULL){ g_object_ref(G_OBJECT(server)); } registry->server = server; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_registry_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRegistry *registry; registry = AGS_REGISTRY(gobject); switch(prop_id){ case PROP_SERVER: { g_value_set_object(value, registry->server); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_registry_add_to_registry(AgsConnectable *connectable) { AgsRegistry *registry; registry = AGS_REGISTRY(connectable); //TODO:JK: implement me } void ags_registry_remove_from_registry(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_registry_connect(AgsConnectable *connectable) { /* empty */ } void ags_registry_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_registry_dispose(GObject *gobject) { AgsRegistry *registry; registry = AGS_REGISTRY(gobject); if(registry->previous != NULL){ g_object_unref(registry->previous); registry->previous = NULL; } if(registry->current != NULL){ g_object_unref(registry->current); registry->current = NULL; } if(registry->server != NULL){ g_object_unref(registry->server); registry->server = NULL; } g_list_free_full(registry->entry, ags_registry_entry_free); registry->entry = NULL; /* call parent */ G_OBJECT_CLASS(ags_registry_parent_class)->dispose(gobject); } void ags_registry_finalize(GObject *gobject) { AgsRegistry *registry; registry = AGS_REGISTRY(gobject); if(registry->previous != NULL){ g_object_unref(registry->previous); } if(registry->current != NULL){ g_object_unref(registry->current); } if(registry->server != NULL){ g_object_unref(registry->server); } g_list_free_full(registry->entry, ags_registry_entry_free); /* mutex */ pthread_mutex_destroy(registry->mutex); free(registry->mutex); pthread_mutexattr_destroy(registry->mutexattr); free(registry->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_registry_parent_class)->finalize(gobject); } /** * ags_registry_entry_alloc: * * Allocated #AgsRegistryEntry-struct. * * Returns: the newly allocated #AgsRegistryEntry-struct * * Since: 1.0.0 */ AgsRegistryEntry* ags_registry_entry_alloc() { AgsRegistryEntry *registry_entry; registry_entry = (AgsRegistryEntry *) malloc(sizeof(AgsRegistryEntry)); registry_entry->id = ags_id_generator_create_uuid(); memset(&(registry_entry->entry), 0, sizeof(GValue)); g_value_init(&(registry_entry->entry), G_TYPE_OBJECT); return(registry_entry); } /** * ags_registry_entry_free: * @registry_entry: the #AgsRegistryEntry-struct * * Free @registry_entry * * Since: 1.0.0 */ void ags_registry_entry_free(AgsRegistryEntry *registry_entry) { GObject *gobject; gobject = g_value_get_object(&(registry_entry->entry)); if(gobject != NULL){ g_object_unref(gobject); } g_value_unset(&(registry_entry->entry)); free(registry_entry); } /** * ags_registry_add_entry: * @registry: the #AgsRegistry * @registry_entry: the #AgsRegistryEntry-struct to add * * Add @registry_entry to @registry. * * Since: 1.0.0 */ void ags_registry_add_entry(AgsRegistry *registry, AgsRegistryEntry *registry_entry) { pthread_mutex_lock(registry->mutex); registry->entry = g_list_prepend(registry->entry, registry_entry); pthread_mutex_unlock(registry->mutex); } /** * ags_registry_find_entry: * @registry: the #AgsRegistry * @id: the id to find * * Find @id as #AgsRegistryEntry-struct in @registry. * * Since: 1.0.0 */ AgsRegistryEntry* ags_registry_find_entry(AgsRegistry *registry, gchar *id) { GList *current; AgsRegistryEntry *entry; pthread_mutex_lock(registry->mutex); current = registry->entry; while(current != NULL){ entry = (AgsRegistryEntry *) current->data; if(!g_ascii_strncasecmp(entry->id, id, registry->id_length)){ return(entry); } current = current->next; } pthread_mutex_unlock(registry->mutex); return(entry); } #ifdef AGS_WITH_XMLRPC_C xmlrpc_value* ags_registry_entry_bulk(xmlrpc_env *env, xmlrpc_value *param_array, void *server_info) { AgsServer *server; AgsRegistry *registry; AgsRegistryEntry *entry; GList *current; xmlrpc_value *bulk; xmlrpc_value *item; server = ags_server_lookup(server_info); registry = ags_service_provider_get_registry(AGS_SERVICE_PROVIDER(server->application_context)); bulk = xmlrpc_array_new(env); pthread_mutex_lock(&(registry->mutex)); current = registry->entry; while(current != NULL){ entry = (AgsRegistryEntry *) current->data; item = xmlrpc_string_new(env, entry->id); xmlrpc_array_append_item(env, bulk, item); current = current->next; } pthread_mutex_unlock(&(registry->mutex)); return(bulk); } #endif /* AGS_WITH_XMLRPC_C */ AgsRegistry* ags_registry_new() { AgsRegistry *registry; registry = (AgsRegistry *) g_object_new(AGS_TYPE_REGISTRY, NULL); return(registry); } gsequencer-1.4.24/ags/server/ags_service_provider.c0000644000175000017500000002370513246707333017333 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include void ags_service_provider_class_init(AgsServiceProviderInterface *interface); GType ags_service_provider_get_type() { static GType ags_type_service_provider = 0; if(!ags_type_service_provider){ ags_type_service_provider = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsServiceProvider\0", sizeof(AgsServiceProviderInterface), (GClassInitFunc) ags_service_provider_class_init, 0, NULL, 0); } return(ags_type_service_provider); } void ags_service_provider_class_init(AgsServiceProviderInterface *interface) { /* empty */ } /** * ags_service_provider_is_operating: * @service_provider: the #AgsServiceProvider * * Check if is operating. * * Returns: %TRUE if operating, otherwise %FALSE * * Since: 1.0.0 */ gboolean is_operating(AgsServiceProvider *service_provider) { AgsServiceProviderInterface *service_provider_interface; g_return_val_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider), NULL); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_val_if_fail(service_provider_interface->is_operating, NULL); return(service_provider_interface->is_operating(service_provider)); } /** * ags_service_provider_server_status: * @service_provider: the #AgsServiceProvider * * Get server status. * * Returns: the #AgsServerStatus * * Since: 1.0.0 */ AgsServerStatus* ags_service_provider_server_status(AgsServiceProvider *service_provider) { AgsServiceProviderInterface *service_provider_interface; g_return_val_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider), NULL); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_val_if_fail(service_provider_interface->server_status, NULL); return(service_provider_interface->server_status(service_provider)); } /** * ags_service_provider_get_env: * @service_provider: the #AgsServiceProvider * * Get xmlrpc_env. * * Returns: the xmlrpc_env * * Since: 1.0.0 */ gpointer ags_service_provider_get_env(AgsServiceProvider *service_provider) { AgsServiceProviderInterface *service_provider_interface; g_return_val_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider), NULL); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_val_if_fail(service_provider_interface->get_env, NULL); return(service_provider_interface->get_env(service_provider)); } /** * ags_service_provider_set_registry: * @service_provider: the #AgsServiceProvider * @registry: the #AgsRegistry * * Set registry. * * Since: 1.0.0 */ void ags_service_provider_set_registry(AgsServiceProvider *service_provider, GObject *registry) { AgsServiceProviderInterface *service_provider_interface; g_return_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider)); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_if_fail(service_provider_interface->set_registry); service_provider_interface->set_registry(service_provider, registry); } /** * ags_service_provider_get_registry: * @service_provider: the #AgsServiceProvider * * Get registry. * * Returns: the #AgsRegistry * * Since: 1.0.0 */ GObject* ags_service_provider_get_registry(AgsServiceProvider *service_provider) { AgsServiceProviderInterface *service_provider_interface; g_return_val_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider), NULL); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_val_if_fail(service_provider_interface->get_registry, NULL); return(service_provider_interface->get_registry(service_provider)); } /** * ags_service_provider_set_server: * @service_provider: the #AgsServiceProvider * @server: the #GList-struct containing #AgsServer * * Set server. * * Since: 1.0.0 */ void ags_service_provider_set_server(AgsServiceProvider *service_provider, GList *server) { AgsServiceProviderInterface *service_provider_interface; g_return_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider)); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_if_fail(service_provider_interface->set_server); service_provider_interface->set_server(service_provider, server); } /** * ags_service_provider_get_server: * @service_provider: the #AgsServiceProvider * * Get server. * * Returns: the #GList-struct containing #AgsServer * * Since: 1.0.0 */ GList* ags_service_provider_get_server(AgsServiceProvider *service_provider) { AgsServiceProviderInterface *service_provider_interface; g_return_val_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider), NULL); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_val_if_fail(service_provider_interface->get_server, NULL); return(service_provider_interface->get_server(service_provider)); } /** * ags_service_provider_set_certificate_manager: * @service_provider: the #AgsServiceProvider * @certificate_manager: the #AgsCertificateManager * * Set certificate manager. * * Since: 1.0.0 */ void ags_service_provider_set_certificate_manager(AgsServiceProvider *service_provider, AgsCertificateManager *certificate_manager) { AgsServiceProviderInterface *service_provider_interface; g_return_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider)); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_if_fail(service_provider_interface->set_certificate_manager); service_provider_interface->set_certificate_manager(service_provider, certificate_manager); } /** * ags_service_provider_get_certificate_manager: * @service_provider: the #AgsServiceProvider * * Get certificate manager. * * Returns: the #AgsCertificateManager * * Since: 1.0.0 */ AgsCertificateManager* ags_service_provider_get_certificate_manager(AgsServiceProvider *service_provider) { AgsServiceProviderInterface *service_provider_interface; g_return_val_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider), NULL); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_val_if_fail(service_provider_interface->get_certificate_manager, NULL); return(service_provider_interface->get_certificate_manager(service_provider)); } /** * ags_service_provider_set_password_store_manager: * @service_provider: the #AgsServiceProvider * @password_store_manager: the #AgsPasswordStoreManager * * Set password store manager. * * Since: 1.0.0 */ void ags_service_provider_set_password_store_manager(AgsServiceProvider *service_provider, AgsPasswordStoreManager *password_store_manager) { AgsServiceProviderInterface *service_provider_interface; g_return_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider)); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_if_fail(service_provider_interface->set_password_store_manager); service_provider_interface->set_password_store_manager(service_provider, password_store_manager); } /** * ags_service_provider_get_password_store_manager: * @service_provider: the #AgsServiceProvider * * Get password store manager. * * Returns: the #AgsPasswordStoreManager * * Since: 1.0.0 */ AgsPasswordStoreManager* ags_service_provider_get_password_store_manager(AgsServiceProvider *service_provider) { AgsServiceProviderInterface *service_provider_interface; g_return_val_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider), NULL); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_val_if_fail(service_provider_interface->get_password_store_manager, NULL); return(service_provider_interface->get_password_store_manager(service_provider)); } /** * ags_service_provider_set_authentication_manager: * @service_provider: the #AgsServiceProvider * @authentication_manager: the #AgsAuthenticationManager * * Set authentication manager. * * Since: 1.0.0 */ void ags_service_provider_set_authentication_manager(AgsServiceProvider *service_provider, AgsAuthenticationManager *authentication_manager) { AgsServiceProviderInterface *service_provider_interface; g_return_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider)); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_if_fail(service_provider_interface->set_authentication_manager); service_provider_interface->set_authentication_manager(service_provider, authentication_manager); } /** * ags_service_provider_get_authentication_manager: * @service_provider: the #AgsServiceProvider * * Get authentication manager. * * Returns: the #AgsAuthenticationManager * * Since: 1.0.0 */ AgsAuthenticationManager* ags_service_provider_get_authentication_manager(AgsServiceProvider *service_provider) { AgsServiceProviderInterface *service_provider_interface; g_return_val_if_fail(AGS_IS_SERVICE_PROVIDER(service_provider), NULL); service_provider_interface = AGS_SERVICE_PROVIDER_GET_INTERFACE(service_provider); g_return_val_if_fail(service_provider_interface->get_authentication_manager, NULL); return(service_provider_interface->get_authentication_manager(service_provider)); } gsequencer-1.4.24/ags/server/ags_server.h0000644000175000017500000000661113246707333015271 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_SERVER_H__ #define __AGS_SERVER_H__ #include #include #include #include #include #include #ifdef AGS_WITH_XMLRPC_C #include #include #include #include #include #endif #include #define AGS_TYPE_SERVER (ags_server_get_type()) #define AGS_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SERVER, AgsServer)) #define AGS_SERVER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SERVER, AgsServerClass)) #define AGS_IS_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SERVER)) #define AGS_IS_SERVER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SERVER)) #define AGS_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SERVER, AgsServerClass)) #define AGS_SERVER_DEFAULT_AUTH_MODULE "ags-xml-password-store" typedef struct _AgsServer AgsServer; typedef struct _AgsServerClass AgsServerClass; typedef struct _AgsServerInfo AgsServerInfo; /** * AgsServerFlags: * @AGS_SERVER_CONNECTED: the server was connected by #AgsConnectable::connect() * @AGS_SERVER_STARTED: the server was started * @AGS_SERVER_RUNNING: the server is up and running * * Enum values to control the behavior or indicate internal state of #AgsServer by * enable/disable as flags. */ typedef enum{ AGS_SERVER_CONNECTED = 1, AGS_SERVER_STARTED = 1 << 1, AGS_SERVER_RUNNING = 1 << 2, }AgsServerFlags; struct _AgsServer { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; AgsServerInfo *server_info; #ifdef AGS_WITH_XMLRPC_C TServer *abyss_server; TSocket *socket; #else void *abyss_server; void *socket; #endif int socket_fd; struct sockaddr_in *address; gchar *auth_module; GList *controller; GObject *application_context; pthread_mutex_t *application_mutex; }; struct _AgsServerClass { GObjectClass object; void (*start)(AgsServer *server); }; /** * AgsServerInfo: * @uuid: the assigned uuid * @server_name: the server's name * * #AgsServerInfo does identify the server and provides some basic information about it. */ struct _AgsServerInfo { gchar *uuid; gchar *server_name; }; GType ags_server_get_type(); AgsServerInfo* ags_server_info_alloc(gchar *server_name); void ags_server_start(AgsServer *server); AgsServer* ags_server_lookup(AgsServerInfo *server_info); AgsServer* ags_server_new(GObject *application_context); #endif /*__AGS_SERVER_H__*/ gsequencer-1.4.24/ags/server/ags_server_application_context.c0000644000175000017500000003733513246707333021422 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_server_application_context_class_init(AgsServerApplicationContextClass *server_application_context); void ags_server_application_context_concurrency_provider_interface_init(AgsConcurrencyProviderInterface *concurrency_provider); void ags_server_application_context_service_provider_interface_init(AgsServiceProviderInterface *service_provider); void ags_server_application_context_connectable_interface_init(AgsConnectableInterface *connectable); void ags_server_application_context_init(AgsServerApplicationContext *server_application_context); void ags_server_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_server_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_server_application_context_connect(AgsConnectable *connectable); void ags_server_application_context_disconnect(AgsConnectable *connectable); void ags_server_application_context_finalize(GObject *gobject); AgsThread* ags_server_application_context_get_main_loop(AgsConcurrencyProvider *concurrency_provider); AgsThread* ags_server_application_context_get_task_thread(AgsConcurrencyProvider *concurrency_provider); AgsThreadPool* ags_server_application_context_get_thread_pool(AgsConcurrencyProvider *concurrency_provider); gboolean ags_server_application_context_is_operating(AgsServiceProvider *service_provider); AgsServerStatus* ags_server_application_context_server_status(AgsServiceProvider *service_provider); void ags_server_application_context_set_registry(AgsServiceProvider *service_provider, GObject *registry); GObject* ags_server_application_context_get_registry(AgsServiceProvider *service_provider); void ags_server_application_context_set_server(AgsServiceProvider *service_provider, GList *server); GList* ags_server_application_context_get_server(AgsServiceProvider *service_provider); void ags_server_application_context_set_certificate_manager(AgsServiceProvider *service_provider, AgsCertificateManager *certificate_manager); AgsCertificateManager* ags_server_application_context_get_certificate_manager(AgsServiceProvider *service_provider); void ags_server_application_context_set_password_store_manager(AgsServiceProvider *service_provider, AgsPasswordStoreManager *password_store_manager); AgsPasswordStoreManager* ags_server_application_context_get_password_store_manager(AgsServiceProvider *service_provider); void ags_server_application_context_set_authentication_manager(AgsServiceProvider *service_provider, AgsAuthenticationManager *authentication_manager); AgsAuthenticationManager* ags_server_application_context_get_authentication_manager(AgsServiceProvider *service_provider); static gpointer ags_server_application_context_parent_class = NULL; static AgsConnectableInterface* ags_server_application_context_parent_connectable_interface; GType ags_server_application_context_get_type() { static GType ags_type_server_application_context = 0; if(!ags_type_server_application_context){ static const GTypeInfo ags_server_application_context_info = { sizeof (AgsServerApplicationContextClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_server_application_context_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsServerApplicationContext), 0, /* n_preallocs */ (GInstanceInitFunc) ags_server_application_context_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_server_application_context_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_concurrency_provider_interface_info = { (GInterfaceInitFunc) ags_server_application_context_concurrency_provider_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_service_provider_interface_info = { (GInterfaceInitFunc) ags_server_application_context_service_provider_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_server_application_context = g_type_register_static(AGS_TYPE_APPLICATION_CONTEXT, "AgsServerApplicationContext\0", &ags_server_application_context_info, 0); g_type_add_interface_static(ags_type_server_application_context, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_server_application_context, AGS_TYPE_CONCURRENCY_PROVIDER, &ags_concurrency_provider_interface_info); g_type_add_interface_static(ags_type_server_application_context, AGS_TYPE_SERVICE_PROVIDER, &ags_service_provider_interface_info); } return (ags_type_server_application_context); } void ags_server_application_context_class_init(AgsServerApplicationContextClass *server_application_context) { GObjectClass *gobject; AgsApplicationContextClass *application_context; ags_server_application_context_parent_class = g_type_class_peek_parent(server_application_context); /* GObjectClass */ gobject = (GObjectClass *) server_application_context; gobject->set_property = ags_server_application_context_set_property; gobject->get_property = ags_server_application_context_get_property; gobject->finalize = ags_server_application_context_finalize; /* AgsServerApplicationContextClass */ application_context = (AgsApplicationContextClass *) server_application_context; application_context->load_config = NULL; application_context->register_types = NULL; } void ags_server_application_context_concurrency_provider_interface_init(AgsConcurrencyProviderInterface *concurrency_provider) { concurrency_provider->get_main_loop = ags_server_application_context_get_main_loop; concurrency_provider->get_task_thread = ags_server_application_context_get_task_thread; concurrency_provider->get_thread_pool = ags_server_application_context_get_thread_pool; } void ags_server_application_context_service_provider_interface_init(AgsServiceProviderInterface *service_provider) { service_provider->is_operating = ags_server_application_context_is_operating; service_provider->server_status = ags_server_application_context_server_status; service_provider->set_registry = ags_server_application_context_set_registry; service_provider->get_registry = ags_server_application_context_get_registry; service_provider->set_server = ags_server_application_context_set_server; service_provider->get_server = ags_server_application_context_get_server; service_provider->set_certificate_manager = ags_server_application_context_set_certificate_manager; service_provider->get_certificate_manager = ags_server_application_context_get_certificate_manager; service_provider->set_password_store_manager = ags_server_application_context_set_password_store_manager; service_provider->get_password_store_manager = ags_server_application_context_get_password_store_manager; service_provider->set_authentication_manager = ags_server_application_context_set_authentication_manager; service_provider->get_authentication_manager = ags_server_application_context_get_authentication_manager; } void ags_server_application_context_connectable_interface_init(AgsConnectableInterface *connectable) { ags_server_application_context_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_server_application_context_connect; connectable->disconnect = ags_server_application_context_disconnect; } void ags_server_application_context_init(AgsServerApplicationContext *server_application_context) { AgsGenericMainLoop *generic_main_loop; AgsConfig *config; server_application_context->flags = 0; server_application_context->version = AGS_SERVER_DEFAULT_VERSION; server_application_context->build_id = AGS_SERVER_BUILD_ID; #ifdef AGS_WITH_XMLRPC_C server_application_context->env = (xmlrpc_env *) malloc(sizeof(xmlrpc_env)); #else server_application_context->env = NULL; #endif /**/ AGS_APPLICATION_CONTEXT(server_application_context)->log = NULL; /* set config */ config = ags_config_get_instance(); AGS_APPLICATION_CONTEXT(server_application_context)->config = config; g_object_set(config, "application-context\0", server_application_context, NULL); /* registry */ server_application_context->registry = ags_registry_new(); /* server */ server_application_context->server = NULL; /* manager */ server_application_context->certificate_manager = ags_certificate_manager_get_instance(); server_application_context->password_store_manager = ags_password_store_manager_get_instance(); server_application_context->authentication_manager = ags_authentication_manager_get_instance(); /* AgsGenericMainLoop */ generic_main_loop = ags_generic_main_loop_new((GObject *) server_application_context); g_object_set(server_application_context, "main-loop\0", generic_main_loop, NULL); g_object_ref(generic_main_loop); ags_connectable_connect(AGS_CONNECTABLE(generic_main_loop)); /* AgsTaskThread */ AGS_APPLICATION_CONTEXT(server_application_context)->task_thread = (GObject *) ags_task_thread_new(); ags_main_loop_set_async_queue(AGS_MAIN_LOOP(generic_main_loop), AGS_APPLICATION_CONTEXT(server_application_context)->task_thread); ags_thread_add_child_extended(AGS_THREAD(generic_main_loop), AGS_THREAD(AGS_APPLICATION_CONTEXT(server_application_context)->task_thread), TRUE, TRUE); /* AgsThreadPool */ server_application_context->thread_pool = AGS_TASK_THREAD(AGS_APPLICATION_CONTEXT(server_application_context)->task_thread)->thread_pool; } void ags_server_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsServerApplicationContext *server_application_context; server_application_context = AGS_SERVER_APPLICATION_CONTEXT(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_server_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsServerApplicationContext *server_application_context; server_application_context = AGS_SERVER_APPLICATION_CONTEXT(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_server_application_context_connect(AgsConnectable *connectable) { AgsServerApplicationContext *server_application_context; server_application_context = AGS_SERVER_APPLICATION_CONTEXT(connectable); if((AGS_APPLICATION_CONTEXT_CONNECTED & (AGS_APPLICATION_CONTEXT(server_application_context)->flags)) != 0){ return; } ags_server_application_context_parent_connectable_interface->connect(connectable); } void ags_server_application_context_disconnect(AgsConnectable *connectable) { AgsServerApplicationContext *server_application_context; server_application_context = AGS_SERVER_APPLICATION_CONTEXT(connectable); if((AGS_APPLICATION_CONTEXT_CONNECTED & (AGS_APPLICATION_CONTEXT(server_application_context)->flags)) == 0){ return; } ags_server_application_context_parent_connectable_interface->disconnect(connectable); } void ags_server_application_context_finalize(GObject *gobject) { AgsServerApplicationContext *server_application_context; G_OBJECT_CLASS(ags_server_application_context_parent_class)->finalize(gobject); server_application_context = AGS_SERVER_APPLICATION_CONTEXT(gobject); } AgsThread* ags_server_application_context_get_main_loop(AgsConcurrencyProvider *concurrency_provider) { return((AgsThread *) AGS_APPLICATION_CONTEXT(concurrency_provider)->main_loop); } AgsThread* ags_server_application_context_get_task_thread(AgsConcurrencyProvider *concurrency_provider) { return((AgsThread *) AGS_APPLICATION_CONTEXT(concurrency_provider)->task_thread); } AgsThreadPool* ags_server_application_context_get_thread_pool(AgsConcurrencyProvider *concurrency_provider) { return(AGS_SERVER_APPLICATION_CONTEXT(concurrency_provider)->thread_pool); } gboolean ags_server_application_context_is_operating(AgsServiceProvider *service_provider) { //TODO:JK: implement me return(FALSE); } AgsServerStatus* ags_server_application_context_server_status(AgsServiceProvider *service_provider) { //TODO:JK: implement me return(NULL); } void ags_server_application_context_set_registry(AgsServiceProvider *service_provider, GObject *registry) { //TODO:JK: implement me } GObject* ags_server_application_context_get_registry(AgsServiceProvider *service_provider) { //TODO:JK: implement me return(NULL); } void ags_server_application_context_set_server(AgsServiceProvider *service_provider, GList *server) { //TODO:JK: implement me } GList* ags_server_application_context_get_server(AgsServiceProvider *service_provider) { //TODO:JK: implement me return(NULL); } void ags_server_application_context_set_certificate_manager(AgsServiceProvider *service_provider, AgsCertificateManager *certificate_manager) { //TODO:JK: implement me } AgsCertificateManager* ags_server_application_context_get_certificate_manager(AgsServiceProvider *service_provider) { //TODO:JK: implement me return(NULL); } void ags_server_application_context_set_password_store_manager(AgsServiceProvider *service_provider, AgsPasswordStoreManager *password_store_manager) { //TODO:JK: implement me } AgsPasswordStoreManager* ags_server_application_context_get_password_store_manager(AgsServiceProvider *service_provider) { //TODO:JK: implement me return(NULL); } void ags_server_application_context_set_authentication_manager(AgsServiceProvider *service_provider, AgsAuthenticationManager *authentication_manager) { //TODO:JK: implement me } AgsAuthenticationManager* ags_server_application_context_get_authentication_manager(AgsServiceProvider *service_provider) { //TODO:JK: implement me return(NULL); } AgsServerApplicationContext* ags_server_application_context_new() { AgsServerApplicationContext *server_application_context; server_application_context = (AgsServerApplicationContext *) g_object_new(AGS_TYPE_SERVER_APPLICATION_CONTEXT, NULL); return(server_application_context); } gsequencer-1.4.24/ags/server/ags_server.c0000644000175000017500000002635413246707333015272 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_server_class_init(AgsServerClass *server); void ags_server_connectable_interface_init(AgsConnectableInterface *connectable); void ags_server_init(AgsServer *server); void ags_server_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_server_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_server_add_to_registry(AgsConnectable *connectable); void ags_server_remove_from_registry(AgsConnectable *connectable); void ags_server_connect(AgsConnectable *connectable); void ags_server_disconnect(AgsConnectable *connectable); void ags_server_finalize(GObject *gobject); void ags_server_real_start(AgsServer *server); /** * SECTION:ags_server * @short_description: remote control server * @title: AgsServer * @section_id: * @include: ags/server/ags_server.h * * The #AgsServer is a XML-RPC server. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, }; enum{ START, LAST_SIGNAL, }; static gpointer ags_server_parent_class = NULL; static guint server_signals[LAST_SIGNAL]; static GList *ags_server_list = NULL; GType ags_server_get_type() { static GType ags_type_server = 0; if(!ags_type_server){ static const GTypeInfo ags_server = { sizeof (AgsServerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_server_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsServer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_server_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_server_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_server = g_type_register_static(G_TYPE_OBJECT, "AgsServer", &ags_server, 0); g_type_add_interface_static(ags_type_server, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_server); } void ags_server_class_init(AgsServerClass *server) { GObjectClass *gobject; GParamSpec *param_spec; ags_server_parent_class = g_type_class_peek_parent(server); /* GObjectClass */ gobject = (GObjectClass *) server; gobject->set_property = ags_server_set_property; gobject->get_property = ags_server_get_property; gobject->finalize = ags_server_finalize; /* properties */ /** * AgsServer:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n("application context object"), i18n("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* AgsServer */ server->start = ags_server_real_start; /* signals */ /** * AgsServer::start: * @server: the #AgsServer * * The ::start signal is emitted as the server starts. * * Since: 1.0.0 */ server_signals[START] = g_signal_new("start", G_TYPE_FROM_CLASS(server), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsServerClass, start), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_server_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = ags_server_add_to_registry; connectable->remove_from_registry = ags_server_remove_from_registry; connectable->connect = ags_server_connect; connectable->disconnect = ags_server_disconnect; } void ags_server_init(AgsServer *server) { server->flags = 0; server->mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(server->mutexattr); pthread_mutexattr_settype(server->mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(server->mutexattr, PTHREAD_PRIO_INHERIT); #endif server->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(server->mutex, server->mutexattr); /* */ server->server_info = ags_server_info_alloc("localhost"); #ifdef AGS_WITH_XMLRPC_C server->abyss_server = (TServer *) malloc(sizeof(TServer)); server->socket = NULL; #else server->abyss_server = NULL; server->socket = NULL; #endif server->address = (struct sockaddr_in *) malloc(sizeof(struct sockaddr_in)); memset(server->address, 0, sizeof(struct sockaddr_in)); server->address->sin_port = 8080; server->address->sin_family = AF_INET; inet_aton("127.0.0.1", &(server->address->sin_addr.s_addr)); server->auth_module = AGS_SERVER_DEFAULT_AUTH_MODULE; server->controller = NULL; server->application_context = NULL; server->application_mutex = NULL; } void ags_server_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsServer *server; server = AGS_SERVER(gobject); //TODO:JK: implement set functionality switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(server->application_context == (GObject *) application_context){ return; } if(server->application_context != NULL){ g_object_unref(G_OBJECT(server->application_context)); } if(application_context != NULL){ g_object_ref(G_OBJECT(application_context)); server->application_mutex = application_context->mutex; }else{ server->application_mutex = NULL; } server->application_context = application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_server_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsServer *server; server = AGS_SERVER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, server->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_server_add_to_registry(AgsConnectable *connectable) { AgsServer *server; // AgsRegistry *registry; server = AGS_SERVER(connectable); /* children */ // ags_connectable_add_to_registry(AGS_CONNECTABLE(server->registry)); // ags_connectable_add_to_registry(AGS_CONNECTABLE(server->remote_task)); } void ags_server_remove_from_registry(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_server_connect(AgsConnectable *connectable) { /* empty */ } void ags_server_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_server_finalize(GObject *gobject) { AgsServer *server; server = AGS_SERVER(gobject); /* mutex */ pthread_mutex_destroy(server->mutex); free(server->mutex); pthread_mutexattr_destroy(server->mutexattr); free(server->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_server_parent_class)->finalize(gobject); } /** * ags_server_info_alloc: * @server_name: the server name * * Allocate server info. * * Returns: the allocated #AgsServerInfo-struct * * Since: 1.0.0 */ AgsServerInfo* ags_server_info_alloc(gchar *server_name) { AgsServerInfo *server_info; server_info = (AgsServerInfo *) malloc(sizeof(AgsServerInfo)); server_info->uuid = ags_id_generator_create_uuid(); server_info->server_name = server_name; return(server_info); } void ags_server_real_start(AgsServer *server) { AgsRegistry *registry; const char *error; registry = ags_service_provider_get_registry(AGS_SERVICE_PROVIDER(server->application_context)); ags_connectable_add_to_registry(AGS_CONNECTABLE(server->application_context)); // xmlrpc_registry_set_shutdown(registry, // &requestShutdown, &terminationRequested); server->socket_fd = socket(AF_INET, SOCK_RDM, PF_INET); bind(server->socket_fd, server->address, sizeof(struct sockaddr_in)); #ifdef AGS_WITH_XMLRPC_C SocketUnixCreateFd(server->socket_fd, &(server->socket)); ServerCreateSocket2(server->abyss_server, server->socket, &error); xmlrpc_server_abyss_set_handlers2(server->abyss_server, "/RPC2", registry->registry); ServerInit(server->abyss_server); // setupSignalHandlers(); while((AGS_SERVER_RUNNING & (server->flags)) != 0){ printf("Waiting for next RPC...\n"); ServerRunOnce(server->abyss_server); /* This waits for the next connection, accepts it, reads the HTTP POST request, executes the indicated RPC, and closes the connection. */ } #endif /* AGS_WITH_XMLRPC_C */ } /** * ags_server_start: * @server: the #AgsServer * * Start the XMLRPC-C abyss server. * * Since: 1.0.0 */ void ags_server_start(AgsServer *server) { g_return_if_fail(AGS_IS_SERVER(server)); g_object_ref((GObject *) server); g_signal_emit(G_OBJECT(server), server_signals[START], 0); g_object_unref((GObject *) server); } /** * ags_server_lookup: * @server_info: the #AgsServerInfo-struct * * Lookup #AgsServer by @server_info. * * Returns: the associated #AgsServer if found, else %NULL * * Since: 1.0.0 */ AgsServer* ags_server_lookup(AgsServerInfo *server_info) { GList *current; if(server_info == NULL){ return(NULL); } current = ags_server_list; while(current != NULL){ if(AGS_SERVER(current->data)->server_info != NULL && !g_ascii_strcasecmp(server_info->uuid, AGS_SERVER(current->data)->server_info->uuid) && !g_strcmp0(server_info->server_name, AGS_SERVER(current->data)->server_info->server_name)){ return(AGS_SERVER(current->data)); } current = current->next; } return(NULL); } /** * ags_server_new: * @application_context: the #AgsApplicationContext * * Instantiate #AgsServer. * * Returns: a new #AgsServer * * Since: 1.0.0 */ AgsServer* ags_server_new(GObject *application_context) { AgsServer *server; server = (AgsServer *) g_object_new(AGS_TYPE_SERVER, "application-context", application_context, NULL); return(server); } gsequencer-1.4.24/ags/server/ags_service_provider.h0000644000175000017500000001121413246707333017330 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_SERVICE_PROVIDER_H__ #define __AGS_SERVICE_PROVIDER_H__ #include #include #include #include #include #include #define AGS_TYPE_SERVICE_PROVIDER (ags_service_provider_get_type()) #define AGS_SERVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SERVICE_PROVIDER, AgsServiceProvider)) #define AGS_SERVICE_PROVIDER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_SERVICE_PROVIDER, AgsServiceProviderInterface)) #define AGS_IS_SERVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SERVICE_PROVIDER)) #define AGS_IS_SERVICE_PROVIDER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_SERVICE_PROVIDER)) #define AGS_SERVICE_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_SERVICE_PROVIDER, AgsServiceProviderInterface)) typedef struct _AgsServiceProvider AgsServiceProvider; typedef struct _AgsServiceProviderInterface AgsServiceProviderInterface; struct _AgsServiceProviderInterface { GTypeInterface ginterface; gboolean (*is_operating)(AgsServiceProvider *service_provider); AgsServerStatus* (*server_status)(AgsServiceProvider *service_provider); gpointer (*get_env)(AgsServiceProvider *service_provider); void (*set_registry)(AgsServiceProvider *service_provider, GObject *registry); GObject* (*get_registry)(AgsServiceProvider *service_provider); void (*set_server)(AgsServiceProvider *service_provider, GList *server); GList* (*get_server)(AgsServiceProvider *service_provider); void (*set_certificate_manager)(AgsServiceProvider *service_provider, AgsCertificateManager *certificate_manager); AgsCertificateManager* (*get_certificate_manager)(AgsServiceProvider *service_provider); void (*set_password_store_manager)(AgsServiceProvider *service_provider, AgsPasswordStoreManager *password_store_manager); AgsPasswordStoreManager* (*get_password_store_manager)(AgsServiceProvider *service_provider); void (*set_authentication_manager)(AgsServiceProvider *service_provider, AgsAuthenticationManager *authentication_manager); AgsAuthenticationManager* (*get_authentication_manager)(AgsServiceProvider *service_provider); }; GType ags_service_provider_get_type(); gboolean ags_service_provider_is_operating(AgsServiceProvider *service_provider); AgsServerStatus* ags_service_provider_server_status(AgsServiceProvider *service_provider); gpointer ags_service_provider_get_env(AgsServiceProvider *service_provider); void ags_service_provider_set_registry(AgsServiceProvider *service_provider, GObject *registry); GObject* ags_service_provider_get_registry(AgsServiceProvider *service_provider); void ags_service_provider_set_server(AgsServiceProvider *service_provider, GList *server); GList* ags_service_provider_get_server(AgsServiceProvider *service_provider); void ags_service_provider_set_certificate_manager(AgsServiceProvider *service_provider, AgsCertificateManager *certificate_manager); AgsCertificateManager* ags_service_provider_get_certificate_manager(AgsServiceProvider *service_provider); void ags_service_provider_set_password_store_manager(AgsServiceProvider *service_provider, AgsPasswordStoreManager *password_store_manager); AgsPasswordStoreManager* ags_service_provider_get_password_store_manager(AgsServiceProvider *service_provider); void ags_service_provider_set_authentication_manager(AgsServiceProvider *service_provider, AgsAuthenticationManager *authentication_manager); AgsAuthenticationManager* ags_service_provider_get_authentication_manager(AgsServiceProvider *service_provider); #endif /*__AGS_SERVICE_PROVIDER_H__*/ gsequencer-1.4.24/ags/server/ags_server_status.c0000644000175000017500000001135113246707333016664 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include void ags_server_status_class_init(AgsServerStatusClass *server_status); void ags_server_status_connectable_interface_init(AgsConnectableInterface *connectable); void ags_server_status_init(AgsServerStatus *server_status); void ags_server_status_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_server_status_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_server_status_connect(AgsConnectable *connectable); void ags_server_status_disconnect(AgsConnectable *connectable); void ags_server_status_finalize(GObject *gobject); enum{ PROP_0, PROP_MAXIMUM_CONNECTIONS, PROP_CONNECTION_COUNT, }; static gpointer ags_server_status_parent_class = NULL; GType ags_server_status_get_type() { static GType ags_type_server_status = 0; if(!ags_type_server_status){ static const GTypeInfo ags_server_status_info = { sizeof (AgsServerStatusClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_server_status_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsServerStatus), 0, /* n_preallocs */ (GInstanceInitFunc) ags_server_status_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_server_status_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_server_status = g_type_register_static(G_TYPE_OBJECT, "AgsServerStatus", &ags_server_status_info, 0); g_type_add_interface_static(ags_type_server_status, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_server_status); } void ags_server_status_class_init(AgsServerStatusClass *server_status) { GObjectClass *gobject; GParamSpec *param_spec; ags_server_status_parent_class = g_type_class_peek_parent(server_status); /* GObjectClass */ gobject = (GObjectClass *) server_status; gobject->set_property = ags_server_status_set_property; gobject->get_property = ags_server_status_get_property; gobject->finalize = ags_server_status_finalize; } void ags_server_status_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_server_status_connect; connectable->disconnect = ags_server_status_disconnect; } void ags_server_status_init(AgsServerStatus *server_status) { server_status->flags = 0; } void ags_server_status_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsServerStatus *server_status; server_status = AGS_SERVER_STATUS(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_server_status_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsServerStatus *server_status; server_status = AGS_SERVER_STATUS(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_server_status_connect(AgsConnectable *connectable) { /* empty */ } void ags_server_status_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_server_status_finalize(GObject *gobject) { AgsServerStatus *server_status; server_status = AGS_SERVER_STATUS(gobject); /* call parent */ G_OBJECT_CLASS(ags_server_status_parent_class)->finalize(gobject); } /** * ags_server_status_new: * * Instantiate #AgsServerStatus. * * Returns: a new #AgsServerStatus * * Since: 1.0.0 */ AgsServerStatus* ags_server_status_new() { AgsServerStatus *server_status; server_status = (AgsServerStatus *) g_object_new(AGS_TYPE_SERVER_STATUS, NULL); return(server_status); } gsequencer-1.4.24/ags/server/ags_registry.h0000644000175000017500000000643113256163135015630 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_REGISTRY_H__ #define __AGS_REGISTRY_H__ #include #include #include #ifdef AGS_WITH_XMLRPC_C #include #include #endif #include #define AGS_TYPE_REGISTRY (ags_registry_get_type()) #define AGS_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REGISTRY, AgsRegistry)) #define AGS_REGISTRY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_REGISTRY, AgsRegistryClass)) #define AGS_IS_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_REGISTRY)) #define AGS_IS_REGISTRY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_REGISTRY)) #define AGS_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_REGISTRY, AgsRegistryClass)) #define AGS_REGISTRY_DEFAULT_ID_LENGTH (36) typedef struct _AgsRegistry AgsRegistry; typedef struct _AgsRegistryClass AgsRegistryClass; typedef struct _AgsRegistryEntry AgsRegistryEntry; /** * AgsRegistryFlags: * @AGS_REGISTRY_CONNECTED: the registry was connected by #AgsConnectable::connect() * @AGS_REGISTRY_XML_DOCUMENT: //TODO:JK: implement me * @AGS_REGISTRY_XML_RPC: //TODO:JK: implement me * @AGS_REGISTRY_DIRTY: //TODO:JK: implement me * * Enum values to control the behavior or indicate internal state of #AgsRegistry by * enable/disable as flags. */ typedef enum{ AGS_REGISTRY_CONNECTED = 1, AGS_REGISTRY_XML_DOCUMENT = 1 << 1, AGS_REGISTRY_XML_RPC = 1 << 2, AGS_REGISTRY_DIRTY = 1 << 3, }AgsRegistryFlags; struct _AgsRegistry { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; AgsFile *previous; AgsFile *current; #ifdef AGS_WITH_XMLRPC_C xmlrpc_registry *registry; #else gpointer registry; #endif GObject *server; guint id_length; guint counter; GList *entry; }; struct _AgsRegistryClass { GObjectClass object; }; /** * AgsRegistryEntry: * @id: the id * @entry: the actual entry * * #AgsRegistryEntry is an entry that you might want to lookup remotely. */ struct _AgsRegistryEntry { gchar *id; GValue entry; }; GType ags_registry_get_type(); AgsRegistryEntry* ags_registry_entry_alloc(); void ags_registry_entry_free(AgsRegistryEntry *registry_entry); void ags_registry_add_entry(AgsRegistry *registry, AgsRegistryEntry *registry_entry); AgsRegistryEntry* ags_registry_find_entry(AgsRegistry *registry, gchar *id); AgsRegistry* ags_registry_new(); #endif /*__AGS_REGISTRY_H__*/ gsequencer-1.4.24/ags/server/security/0000755000175000017500000000000013256233676014710 500000000000000gsequencer-1.4.24/ags/server/security/ags_password_store.c0000644000175000017500000001410013246707333020673 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include void ags_password_store_base_init(AgsPasswordStoreInterface *interface); /** * SECTION:ags_password_store * @short_description: password storage * @title: AgsPasswordStore * @section_id: AgsPasswordStore * @include: ags/server/security/ags_password_store.h * * The #AgsPasswordStore interface gives you password storage. */ GType ags_password_store_get_type() { static GType ags_type_password_store = 0; if(!ags_type_password_store){ static const GTypeInfo ags_password_store_info = { sizeof(AgsPasswordStoreInterface), (GBaseInitFunc) ags_password_store_base_init, NULL, /* base_finalize */ }; ags_type_password_store = g_type_register_static(G_TYPE_INTERFACE, "AgsPasswordStore\0", &ags_password_store_info, 0); } return(ags_type_password_store); } void ags_password_store_base_init(AgsPasswordStoreInterface *interface) { /* empty */ } /** * ags_password_store_set_login_name: * @password_store: the #AgsPasswordStore * @security_context: the #AgsSecurityContext * @user_uuid: the users unique identifier * @security_token: the security token * @login_name: the login name * @error: the #GError-struct * * Set login name. * * Since: 1.0.0 */ void ags_password_store_set_login_name(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, gchar *login_name, GError **error) { AgsPasswordStoreInterface *password_store_interface; g_return_if_fail(AGS_IS_PASSWORD_STORE(password_store)); password_store_interface = AGS_PASSWORD_STORE_GET_INTERFACE(password_store); g_return_if_fail(password_store_interface->set_login_name); password_store_interface->set_login_name(password_store, security_context, user_uuid, security_token, login_name, error); } /** * ags_password_store_get_login_name: * @password_store: the #AgsPasswordStore * @security_context: the #AgsSecurityContext * @user_uuid: the users unique identifier * @security_token: the security token * @error: the #GError-struct * * Get login name. * * Returns: the login name * * Since: 1.0.0 */ gchar* ags_password_store_get_login_name(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, GError **error) { AgsPasswordStoreInterface *password_store_interface; g_return_val_if_fail(AGS_IS_PASSWORD_STORE(password_store), NULL); password_store_interface = AGS_PASSWORD_STORE_GET_INTERFACE(password_store); g_return_val_if_fail(password_store_interface->get_login_name, NULL); return(password_store_interface->get_login_name(password_store, security_context, user_uuid, security_token, error)); } /** * ags_password_store_set_password: * @password_store: the #AgsPasswordStore * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @password: the password * @error: the #GError-struct * * Set login name. * * Since: 1.0.0 */ void ags_password_store_set_password(AgsPasswordStore *password_store, GObject *security_context, gchar *login, gchar *security_token, gchar *password, GError **error) { AgsPasswordStoreInterface *password_store_interface; g_return_if_fail(AGS_IS_PASSWORD_STORE(password_store)); password_store_interface = AGS_PASSWORD_STORE_GET_INTERFACE(password_store); g_return_if_fail(password_store_interface->set_password); password_store_interface->set_password(password_store, security_context, login, security_token, password, error); } /** * ags_password_store_get_password: * @password_store: the #AgsPasswordStore * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @error: the #GError-struct * * Get login name. * * Returns: the password * * Since: 1.0.0 */ gchar* ags_password_store_get_password(AgsPasswordStore *password_store, GObject *security_context, gchar *login, gchar *security_token, GError **error) { AgsPasswordStoreInterface *password_store_interface; g_return_val_if_fail(AGS_IS_PASSWORD_STORE(password_store), NULL); password_store_interface = AGS_PASSWORD_STORE_GET_INTERFACE(password_store); g_return_val_if_fail(password_store_interface->get_password, NULL); return(password_store_interface->get_password(password_store, security_context, login, security_token, error)); } /** * ags_password_store_encrypt_password: * @password_store: the #AgsPasswordStore * @password: the password * @salt: your salt * @error: the #GError-struct * * Encrypt password. * * Returns: the encrypted bytes * * Since: 1.0.0 */ gchar* ags_password_store_encrypt_password(AgsPasswordStore *password_store, gchar *password, gchar *salt, GError **error) { AgsPasswordStoreInterface *password_store_interface; g_return_val_if_fail(AGS_IS_PASSWORD_STORE(password_store), NULL); password_store_interface = AGS_PASSWORD_STORE_GET_INTERFACE(password_store); g_return_val_if_fail(password_store_interface->encrypt_password, NULL); return(password_store_interface->encrypt_password(password_store, password, salt, error)); } gsequencer-1.4.24/ags/server/security/ags_authentication_manager.h0000644000175000017500000000607613246707333022350 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_AUTHENTICATION_MANAGER_H__ #define __AGS_AUTHENTICATION_MANAGER_H__ #include #include #include #define AGS_TYPE_AUTHENTICATION_MANAGER (ags_authentication_manager_get_type()) #define AGS_AUTHENTICATION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTHENTICATION_MANAGER, AgsAuthenticationManager)) #define AGS_AUTHENTICATION_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUTHENTICATION_MANAGER, AgsAuthenticationManagerClass)) #define AGS_IS_AUTHENTICATION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUTHENTICATION_MANAGER)) #define AGS_IS_AUTHENTICATION_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUTHENTICATION_MANAGER)) #define AGS_AUTHENTICATION_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_AUTHENTICATION_MANAGER, AgsAuthenticationManagerClass)) typedef struct _AgsAuthenticationManager AgsAuthenticationManager; typedef struct _AgsAuthenticationManagerClass AgsAuthenticationManagerClass; struct _AgsAuthenticationManager { GObject object; GList *authentication; }; struct _AgsAuthenticationManagerClass { GObjectClass object; }; GType ags_authentication_manager_get_type(void); GList* ags_authentication_manager_get_authentication(AgsAuthenticationManager *authentication_manager); void ags_authentication_manager_add_authentication(AgsAuthenticationManager *authentication_manager, GObject *authentication); void ags_authentication_manager_remove_authentication(AgsAuthenticationManager *authentication_manager, GObject *authentication); /* */ gboolean ags_authentication_manager_login(AgsAuthenticationManager *authentication_manager, gchar *authentication_module, gchar *login, gchar *password, gchar **user_uuid, gchar **security_token); gboolean ags_authentication_manager_is_session_active(AgsAuthenticationManager *authentication_manager, GObject *security_context, gchar *login, gchar *security_token); /* */ AgsAuthenticationManager* ags_authentication_manager_get_instance(); AgsAuthenticationManager* ags_authentication_manager_new(); #endif /*__AGS_AUTHENTICATION_MANAGER_H__*/ gsequencer-1.4.24/ags/server/security/ags_certificate.c0000644000175000017500000000462113246707333020106 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include void ags_certificate_base_init(AgsCertificateInterface *interface); /** * SECTION:ags_certificate * @short_description: base password certificate * @title: AgsCertificate * @section_id: AgsCertificate * @include: ags/server/security/ags_certificate.h * * The #AgsCertificate interface gives you a unique access to all objects * and is responsible to set up signal handlers. */ GType ags_certificate_get_type() { static GType ags_type_certificate = 0; if(!ags_type_certificate){ static const GTypeInfo ags_certificate_info = { sizeof(AgsCertificateInterface), (GBaseInitFunc) ags_certificate_base_init, NULL, /* base_finalize */ }; ags_type_certificate = g_type_register_static(G_TYPE_INTERFACE, "AgsCertificate\0", &ags_certificate_info, 0); } return(ags_type_certificate); } void ags_certificate_base_init(AgsCertificateInterface *interface) { /* empty */ } /** * ags_certificate_verify: * @certificate: the #AgsCertificate * @certs: the certificate data * @error: the #GError-struct * * Verify @certs. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_certificate_verify(AgsCertificate *certificate, gchar *certs, GError **error) { AgsCertificateInterface *certificate_interface; g_return_val_if_fail(AGS_IS_CERTIFICATE(certificate), FALSE); certificate_interface = AGS_CERTIFICATE_GET_INTERFACE(certificate); g_return_val_if_fail(certificate_interface->verify, FALSE); return(certificate_interface->verify(certificate, certs, error)); } gsequencer-1.4.24/ags/server/security/ags_security_context.c0000644000175000017500000001344113246707333021237 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include void ags_security_context_class_init(AgsSecurityContextClass *security_context); void ags_security_context_init(AgsSecurityContext *security_context); void ags_security_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_security_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_security_context_finalize(GObject *gobject); /** * SECTION:ags_security_context * @short_description: current security context * @title: AgsSecurityContext * @section_id: * @include: ags/server/security/ags_security_context.h * * The #AgsSecurityContext is an object to track active server contices. */ enum{ PROP_0, PROP_CERTS, }; static gpointer ags_security_context_parent_class = NULL; GType ags_security_context_get_type() { static GType ags_type_security_context = 0; if(!ags_type_security_context){ static const GTypeInfo ags_security_context_info = { sizeof (AgsSecurityContextClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_security_context_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSecurityContext), 0, /* n_preallocs */ (GInstanceInitFunc) ags_security_context_init, }; ags_type_security_context = g_type_register_static(G_TYPE_OBJECT, "AgsSecurityContext\0", &ags_security_context_info, 0); } return (ags_type_security_context); } void ags_security_context_class_init(AgsSecurityContextClass *security_context) { GObjectClass *gobject; GParamSpec *param_spec; ags_security_context_parent_class = g_type_class_peek_parent(security_context); /* GObjectClass */ gobject = (GObjectClass *) security_context; gobject->set_property = ags_security_context_set_property; gobject->get_property = ags_security_context_get_property; gobject->finalize = ags_security_context_finalize; /* properties */ /** * AgsSecurityContext:certs: * * The assigned certificates as string. * * Since: 1.0.0 */ param_spec = g_param_spec_string("certs", i18n("certificates as string"), i18n("The certificates as string"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CERTS, param_spec); } void ags_security_context_init(AgsSecurityContext *security_context) { security_context->certs = NULL; security_context->permitted_context = NULL; security_context->server_context = NULL; } void ags_security_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSecurityContext *security_context; security_context = AGS_SECURITY_CONTEXT(gobject); switch(prop_id){ case PROP_CERTS: { gchar *certs; certs = g_value_get_string(value); security_context->certs = g_strdup(certs); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_security_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSecurityContext *security_context; security_context = AGS_SECURITY_CONTEXT(gobject); switch(prop_id){ case PROP_CERTS: { g_value_set_string(value, security_context->certs); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_security_context_finalize(GObject *gobject) { AgsSecurityContext *security_context; gchar **strv; security_context = AGS_SECURITY_CONTEXT(gobject); g_free(security_context->certs); /* permitted contex */ if(security_context->permitted_context != NULL){ strv = security_context->permitted_context; for(; *strv != NULL; strv++){ free(*strv); } free(security_context->permitted_context); } /* server context */ if(security_context->server_context != NULL){ strv = security_context->server_context; for(; *strv != NULL; strv++){ free(*strv); } free(security_context->server_context); } /* call parent */ G_OBJECT_CLASS(ags_security_context_parent_class)->finalize(gobject); } void ags_security_context_add_server_context(AgsSecurityContext *security_context, gchar *server_context) { //TODO:JK: implement me } gboolean ags_security_context_remove_server_context(AgsSecurityContext *security_context, gchar *server_context) { //TODO:JK: implement me return(TRUE); } /** * ags_security_context_new: * * Create #AgsSecurityContext. * * Returns: the new #AgsSecurityContext instance * * Since: 1.0.0 */ AgsSecurityContext* ags_security_context_new() { AgsSecurityContext *security_context; security_context = (AgsSecurityContext *) g_object_new(AGS_TYPE_SECURITY_CONTEXT, NULL); return(security_context); } gsequencer-1.4.24/ags/server/security/ags_authentication.c0000644000175000017500000001733313246707333020647 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include void ags_authentication_base_init(AgsAuthenticationInterface *interface); /** * SECTION:ags_authentication * @short_description: base password authentication * @title: AgsAuthentication * @section_id: * @include: ags/server/security/ags_authentication.h * * The #AgsAuthentication interface gives you base authentication functions. */ GType ags_authentication_get_type() { static GType ags_type_authentication = 0; if(!ags_type_authentication){ static const GTypeInfo ags_authentication_info = { sizeof(AgsAuthenticationInterface), (GBaseInitFunc) ags_authentication_base_init, NULL, /* base_finalize */ }; ags_type_authentication = g_type_register_static(G_TYPE_INTERFACE, "AgsAuthentication\0", &ags_authentication_info, 0); } return(ags_type_authentication); } void ags_authentication_base_init(AgsAuthenticationInterface *interface) { /* empty */ } /** * ags_authentication_get_authentication_module: * @authentication: the #AgsAuthentication * * Available authentication modules. * * Returns: a %NULL terminated array of strings of available authentication modules * * Since: 1.0.0 */ gchar** ags_authentication_get_authentication_module(AgsAuthentication *authentication) { AgsAuthenticationInterface *authentication_interface; g_return_val_if_fail(AGS_IS_AUTHENTICATION(authentication), NULL); authentication_interface = AGS_AUTHENTICATION_GET_INTERFACE(authentication); g_return_val_if_fail(authentication_interface->get_authentication_module, NULL); return(authentication_interface->get_authentication_module(authentication)); } /** * ags_authentication_login: * @authentication: the #AgsAuthentication * @login: the login * @password: the password * @user_uuid: return location of the user's uuid * @security_token: return location of the security token * @error: the #GError-struct * * Login. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_authentication_login(AgsAuthentication *authentication, gchar *login, gchar *password, gchar **user_uuid, gchar **security_token, GError **error) { AgsAuthenticationInterface *authentication_interface; g_return_val_if_fail(AGS_IS_AUTHENTICATION(authentication), NULL); authentication_interface = AGS_AUTHENTICATION_GET_INTERFACE(authentication); g_return_val_if_fail(authentication_interface->login, NULL); return(authentication_interface->login(authentication, login, password, user_uuid, security_token, error)); } /** * ags_authentication_logout: * @authentication: the #AgsAuthentication * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @error: the #GError-struct * * Logout. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_authentication_logout(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error) { AgsAuthenticationInterface *authentication_interface; g_return_val_if_fail(AGS_IS_AUTHENTICATION(authentication), FALSE); authentication_interface = AGS_AUTHENTICATION_GET_INTERFACE(authentication); g_return_val_if_fail(authentication_interface->logout, FALSE); return(authentication_interface->logout(authentication, security_context, login, security_token, error)); } /** * ags_authentication_generate_token: * @authentication: the #AgsAuthentication * @error: the #GError-struct * * Generate token. * * Returns: the generated token * * Since: 1.0.0 */ gchar* ags_authentication_generate_token(AgsAuthentication *authentication, GError **error) { AgsAuthenticationInterface *authentication_interface; g_return_val_if_fail(AGS_IS_AUTHENTICATION(authentication), NULL); authentication_interface = AGS_AUTHENTICATION_GET_INTERFACE(authentication); g_return_val_if_fail(authentication_interface->generate_token, NULL); return(authentication_interface->generate_token(authentication, error)); } /** * ags_authentication_get_groups: * @authentication: the #AgsAuthentication * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @error: the #GError-struct * * Get groups. * * Returns: a %NULL-terminated string array containing groups * * Since: 1.0.0 */ gchar** ags_authentication_get_groups(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error) { AgsAuthenticationInterface *authentication_interface; g_return_val_if_fail(AGS_IS_AUTHENTICATION(authentication), NULL); authentication_interface = AGS_AUTHENTICATION_GET_INTERFACE(authentication); g_return_val_if_fail(authentication_interface->get_groups, NULL); return(authentication_interface->get_groups(authentication, security_context, login, security_token, error)); } /** * ags_authentication_get_permission: * @authentication: the #AgsAuthentication * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @group_name: the group name to query * @error: the #GError-struct * * Get permission of group. * * Returns: one or more of 'r', 'w' and 'x'. * * Since: 1.0.0 */ gchar* ags_authentication_get_permission(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, gchar *group_name, GError **error) { AgsAuthenticationInterface *authentication_interface; g_return_val_if_fail(AGS_IS_AUTHENTICATION(authentication), NULL); authentication_interface = AGS_AUTHENTICATION_GET_INTERFACE(authentication); g_return_val_if_fail(authentication_interface->get_permission, NULL); return(authentication_interface->get_permission(authentication, security_context, login, security_token, group_name, error)); } /** * ags_authentication_is_session_active: * @authentication: the #AgsAuthentication * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @error: the #GError-struct * * Check session. * * Returns: %TRUE if session active, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_authentication_is_session_active(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error) { AgsAuthenticationInterface *authentication_interface; g_return_val_if_fail(AGS_IS_AUTHENTICATION(authentication), FALSE); authentication_interface = AGS_AUTHENTICATION_GET_INTERFACE(authentication); g_return_val_if_fail(authentication_interface->is_session_active, FALSE); return(authentication_interface->is_session_active(authentication, security_context, login, security_token, error)); } gsequencer-1.4.24/ags/server/security/ags_xml_certificate.c0000644000175000017500000001042613246707333020766 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include #include #include #include #include #include #include void ags_xml_certificate_class_init(AgsXmlCertificateClass *xml_certificate); void ags_xml_certificate_certificate_interface_init(AgsCertificateInterface *certificate); void ags_xml_certificate_init(AgsXmlCertificate *xml_certificate); void ags_xml_certificate_finalize(GObject *gobject); gboolean ags_xml_certificate_verify(AgsCertificate *certificate, gchar *certs, GError **error); /** * SECTION:ags_xml_certificate * @short_description: certificate by XML file * @title: AgsXmlCertificate * @section_id: * @include: ags/server/security/ags_xml_certificate.h * * The #AgsXmlCertificate is an object to verify certificates. */ static gpointer ags_xml_certificate_parent_class = NULL; GType ags_xml_certificate_get_type() { static GType ags_type_xml_certificate = 0; if(!ags_type_xml_certificate){ static const GTypeInfo ags_xml_certificate_info = { sizeof (AgsXmlCertificateClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_xml_certificate_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsXmlCertificate), 0, /* n_preallocs */ (GInstanceInitFunc) ags_xml_certificate_init, }; static const GInterfaceInfo ags_certificate_interface_info = { (GInterfaceInitFunc) ags_xml_certificate_certificate_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_xml_certificate = g_type_register_static(G_TYPE_OBJECT, "AgsXmlCertificate\0", &ags_xml_certificate_info, 0); g_type_add_interface_static(ags_type_xml_certificate, AGS_TYPE_CERTIFICATE, &ags_certificate_interface_info); } return (ags_type_xml_certificate); } void ags_xml_certificate_class_init(AgsXmlCertificateClass *xml_certificate) { GObjectClass *gobject; GParamSpec *param_spec; ags_xml_certificate_parent_class = g_type_class_peek_parent(xml_certificate); /* GObjectClass */ gobject = (GObjectClass *) xml_certificate; gobject->finalize = ags_xml_certificate_finalize; } void ags_xml_certificate_certificate_interface_init(AgsCertificateInterface *certificate) { certificate->verify = ags_xml_certificate_verify; } void ags_xml_certificate_init(AgsXmlCertificate *xml_certificate) { xml_certificate->filename = NULL; xml_certificate->encoding = NULL; xml_certificate->dtd = NULL; xml_certificate->doc = NULL; xml_certificate->root_node = NULL; } void ags_xml_certificate_finalize(GObject *gobject) { AgsXmlCertificate *xml_certificate; xml_certificate = AGS_XML_CERTIFICATE(gobject); G_OBJECT_CLASS(ags_xml_certificate_parent_class)->finalize(gobject); } gboolean ags_xml_certificate_verify(AgsCertificate *certificate, gchar *certs, GError **error) { if(certs == NULL){ return(FALSE); } //TODO:JK: implement me return(FALSE); } /** * ags_xml_certificate_new: * * Create #AgsXmlCertificate. * * Returns: the new #AgsXmlCertificate instance * * Since: 1.0.0 */ AgsXmlCertificate* ags_xml_certificate_new() { AgsXmlCertificate *xml_certificate; xml_certificate = (AgsXmlCertificate *) g_object_new(AGS_TYPE_XML_CERTIFICATE, NULL); return(xml_certificate); } gsequencer-1.4.24/ags/server/security/ags_authentication_manager.c0000644000175000017500000001561713246707333022344 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include void ags_authentication_manager_class_init(AgsAuthenticationManagerClass *authentication_manager); void ags_authentication_manager_init (AgsAuthenticationManager *authentication_manager); void ags_authentication_manager_finalize(GObject *gobject); /** * SECTION:ags_authentication_manager * @short_description: Singleton pattern to organize authentication * @title: AgsAuthenticationManager * @section_id: * @include: ags/server/security/ags_authentication_manager.h * * The #AgsAuthenticationManager manages your authentication. */ static gpointer ags_authentication_manager_parent_class = NULL; AgsAuthenticationManager *ags_authentication_manager = NULL; GType ags_authentication_manager_get_type (void) { static GType ags_type_authentication_manager = 0; if(!ags_type_authentication_manager){ static const GTypeInfo ags_authentication_manager_info = { sizeof (AgsAuthenticationManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_authentication_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAuthenticationManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_authentication_manager_init, }; ags_type_authentication_manager = g_type_register_static(G_TYPE_OBJECT, "AgsAuthenticationManager\0", &ags_authentication_manager_info, 0); } return (ags_type_authentication_manager); } void ags_authentication_manager_class_init(AgsAuthenticationManagerClass *authentication_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_authentication_manager_parent_class = g_type_class_peek_parent(authentication_manager); /* GObjectClass */ gobject = (GObjectClass *) authentication_manager; gobject->finalize = ags_authentication_manager_finalize; } void ags_authentication_manager_init(AgsAuthenticationManager *authentication_manager) { authentication_manager->authentication = NULL; } void ags_authentication_manager_finalize(GObject *gobject) { AgsAuthenticationManager *authentication_manager; authentication_manager = AGS_AUTHENTICATION_MANAGER(gobject); if(authentication_manager->authentication != NULL){ g_list_free_full(authentication_manager->authentication, g_object_unref); } G_OBJECT_CLASS(ags_authentication_manager_parent_class)->finalize(gobject); } GList* ags_authentication_manager_get_authentication(AgsAuthenticationManager *authentication_manager) { if(authentication_manager == NULL){ authentication_manager = ags_authentication_manager_get_instance(); } return(authentication_manager->authentication); } void ags_authentication_manager_add_authentication(AgsAuthenticationManager *authentication_manager, GObject *authentication) { if(authentication_manager == NULL){ authentication_manager = ags_authentication_manager_get_instance(); } authentication_manager->authentication = g_list_prepend(authentication_manager->authentication, authentication); } void ags_authentication_manager_remove_authentication(AgsAuthenticationManager *authentication_manager, GObject *authentication) { if(authentication_manager == NULL){ authentication_manager = ags_authentication_manager_get_instance(); } authentication_manager->authentication = g_list_remove(authentication_manager->authentication, authentication); } gboolean ags_authentication_manager_login(AgsAuthenticationManager *authentication_manager, gchar *authentication_module, gchar *login, gchar *password, gchar **user_uuid, gchar **security_token) { GList *authentication; gchar *current_token, *current_uuid; authentication = authentication_manager->authentication; current_uuid = NULL; current_token = NULL; while(authentication != NULL){ GError *error; error = NULL; if(g_strv_contains(ags_authentication_get_authentication_module(AGS_AUTHENTICATION(authentication->data)), authentication_module) && ags_authentication_login(AGS_AUTHENTICATION(authentication->data), login, password, ¤t_uuid, ¤t_token, &error)){ if(user_uuid != NULL){ *user_uuid = current_uuid; } if(security_token != NULL){ *security_token = current_token; } return(TRUE); } if(error != NULL){ g_warning("%s\0", error->message); } authentication = authentication->next; } return(FALSE); } gboolean ags_authentication_manager_is_session_active(AgsAuthenticationManager *authentication_manager, GObject *security_context, gchar *login, gchar *security_token) { GList *authentication; authentication = authentication_manager->authentication; while(authentication != NULL){ GError *error; error = NULL; if(ags_authentication_is_session_active(AGS_AUTHENTICATION(authentication->data), security_context, login, security_token, &error)){ return(TRUE); } if(error != NULL){ g_warning("%s\0", error->message); } authentication = authentication->next; } return(FALSE); } /** * ags_authentication_manager_get_instance: * * Get instance. * * Returns: the #AgsAuthenticationManager * * Since: 1.0.0 */ AgsAuthenticationManager* ags_authentication_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&(mutex)); if(ags_authentication_manager == NULL){ ags_authentication_manager = ags_authentication_manager_new(); pthread_mutex_unlock(&(mutex)); }else{ pthread_mutex_unlock(&(mutex)); } return(ags_authentication_manager); } /** * ags_authentication_manager_new: * * Creates an #AgsAuthenticationManager * * Returns: a new #AgsAuthenticationManager * * Since: 1.0.0 */ AgsAuthenticationManager* ags_authentication_manager_new() { AgsAuthenticationManager *authentication_manager; authentication_manager = (AgsAuthenticationManager *) g_object_new(AGS_TYPE_AUTHENTICATION_MANAGER, NULL); return(authentication_manager); } gsequencer-1.4.24/ags/server/security/ags_xml_password_store.c0000644000175000017500000002024213247044247021556 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include #ifndef __APPLE__ #define __USE_GNU #define _GNU_SOURCE #include #endif #include #include #include #include #include #include #include void ags_xml_password_store_class_init(AgsXmlPasswordStoreClass *xml_password_store); void ags_xml_password_store_password_store_interface_init(AgsPasswordStoreInterface *password_store); void ags_xml_password_store_init(AgsXmlPasswordStore *xml_password_store); void ags_xml_password_store_finalize(GObject *gobject); gchar* ags_xml_password_store_get_login_name(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, GError **error); void ags_xml_password_store_set_login_name(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, gchar *login_name, GError **error); gchar* ags_xml_password_store_get_password(AgsPasswordStore *password_store, GObject *security_context, gchar *user, gchar *security_token, GError **error); void ags_xml_password_store_set_password(AgsPasswordStore *password_store, GObject *security_context, gchar *user, gchar *security_token, gchar *password, GError **error); char* ags_xml_password_store_encrypt_password(AgsPasswordStore *password_store, gchar *password, gchar *salt, GError **error); /** * SECTION:ags_xml_password_store * @short_description: password store by XML file * @title: AgsXmlPasswordStore * @section_id: * @include: ags/server/security/ags_xml_password_store.h * * The #AgsXmlPasswordStore is an object to keep passwords. */ static gpointer ags_xml_password_store_parent_class = NULL; GType ags_xml_password_store_get_type() { static GType ags_type_xml_password_store = 0; if(!ags_type_xml_password_store){ static const GTypeInfo ags_xml_password_store_info = { sizeof (AgsXmlPasswordStoreClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_xml_password_store_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsXmlPasswordStore), 0, /* n_preallocs */ (GInstanceInitFunc) ags_xml_password_store_init, }; static const GInterfaceInfo ags_password_store_interface_info = { (GInterfaceInitFunc) ags_xml_password_store_password_store_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_xml_password_store = g_type_register_static(G_TYPE_OBJECT, "AgsXmlPasswordStore\0", &ags_xml_password_store_info, 0); g_type_add_interface_static(ags_type_xml_password_store, AGS_TYPE_PASSWORD_STORE, &ags_password_store_interface_info); } return (ags_type_xml_password_store); } void ags_xml_password_store_class_init(AgsXmlPasswordStoreClass *xml_password_store) { GObjectClass *gobject; GParamSpec *param_spec; ags_xml_password_store_parent_class = g_type_class_peek_parent(xml_password_store); /* GObjectClass */ gobject = (GObjectClass *) xml_password_store; gobject->finalize = ags_xml_password_store_finalize; } void ags_xml_password_store_password_store_interface_init(AgsPasswordStoreInterface *password_store) { password_store->get_login_name = ags_xml_password_store_get_login_name; password_store->set_login_name = ags_xml_password_store_set_login_name; password_store->get_password = ags_xml_password_store_get_password; password_store->set_password = ags_xml_password_store_set_password; password_store->encrypt_password = ags_xml_password_store_encrypt_password; } void ags_xml_password_store_init(AgsXmlPasswordStore *xml_password_store) { xml_password_store->filename = NULL; xml_password_store->encoding = NULL; xml_password_store->dtd = NULL; xml_password_store->doc = NULL; xml_password_store->root_node = NULL; } void ags_xml_password_store_finalize(GObject *gobject) { AgsXmlPasswordStore *xml_password_store; xml_password_store = AGS_XML_PASSWORD_STORE(gobject); G_OBJECT_CLASS(ags_xml_password_store_parent_class)->finalize(gobject); } void ags_xml_password_store_set_login_name(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, gchar *login_name, GError **error) { //TODO:JK: implement me } gchar* ags_xml_password_store_get_login_name(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, GError **error) { //TODO:JK: implement me return(NULL); } void ags_xml_password_store_set_password(AgsPasswordStore *password_store, GObject *security_context, gchar *user, gchar *security_token, gchar *password, GError **error) { //TODO:JK: implement me } gchar* ags_xml_password_store_get_password(AgsPasswordStore *password_store, GObject *security_context, gchar *user, gchar *security_token, GError **error) { //TODO:JK: implement me return(NULL); } gchar* ags_xml_password_store_encrypt_password(AgsPasswordStore *password_store, gchar *password, gchar *salt, GError **error) { #ifndef __APPLE__ struct crypt_data *data; #endif gchar *password_hash; #ifndef __APPLE__ data = (struct crypt_data *) malloc(sizeof(struct crypt_data)); data->initialized = 0; password_hash = crypt_r(password, salt, data); #else password_hash = crypt(password, salt); #endif return(password_hash); } xmlNode* ags_xml_password_store_find_login(AgsXmlPasswordStore *xml_password_store, gchar *login) { xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; xmlNode *user_node; xmlChar *xpath; guint i; if(!AGS_IS_XML_PASSWORD_STORE(xml_password_store) || login == NULL){ return(NULL); } /* retrieve user node */ xpath = g_strdup_printf("(//ags-srv-user)/ags-srv-user-login[content()='%s']", login); /* Create xpath evaluation context */ xpath_context = xmlXPathNewContext(xml_password_store->doc); if(xpath_context == NULL) { g_warning("Error: unable to create new XPath context\0"); return(NULL); } /* Evaluate xpath expression */ xpath_object = xmlXPathEval(xpath, xpath_context); if(xpath_object == NULL) { g_warning("Error: unable to evaluate xpath expression\0"); xmlXPathFreeContext(xpath_context); return(NULL); } /* find node */ node = xpath_object->nodesetval->nodeTab; user_node = NULL; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ user_node = node[i]; break; } } /* free xpath and return */ g_free(xpath); return(user_node); } /** * ags_xml_password_store_new: * * Create #AgsXmlPasswordStore. * * Returns: the new #AgsXmlPasswordStore instance * * Since: 1.0.0 */ AgsXmlPasswordStore* ags_xml_password_store_new() { AgsXmlPasswordStore *xml_password_store; xml_password_store = (AgsXmlPasswordStore *) g_object_new(AGS_TYPE_XML_PASSWORD_STORE, NULL); return(xml_password_store); } gsequencer-1.4.24/ags/server/security/ags_authentication.h0000644000175000017500000000774013246707333020655 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_AUTHENTICATION_H__ #define __AGS_AUTHENTICATION_H__ #include #include #define AGS_TYPE_AUTHENTICATION (ags_authentication_get_type()) #define AGS_AUTHENTICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTHENTICATION, AgsAuthentication)) #define AGS_AUTHENTICATION_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_AUTHENTICATION, AgsAuthenticationInterface)) #define AGS_IS_AUTHENTICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_AUTHENTICATION)) #define AGS_IS_AUTHENTICATION_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_AUTHENTICATION)) #define AGS_AUTHENTICATION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_AUTHENTICATION, AgsAuthenticationInterface)) typedef struct _AgsAuthentication AgsAuthentication; typedef struct _AgsAuthenticationInterface AgsAuthenticationInterface; struct _AgsAuthenticationInterface { GTypeInterface interface; gchar** (*get_authentication_module)(AgsAuthentication *authentication); gboolean (*login)(AgsAuthentication *authentication, gchar *login, gchar *password, gchar **user_uuid, gchar **security_token, GError **error); gboolean (*logout)(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error); gchar* (*generate_token)(AgsAuthentication *authentication, GError **error); gchar** (*get_groups)(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error); gchar* (*get_permission)(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, gchar *group_name, GError **error); gboolean (*is_session_active)(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error); }; GType ags_authentication_get_type(); gchar** ags_authentication_get_authentication_module(AgsAuthentication *authentication); gboolean ags_authentication_login(AgsAuthentication *authentication, gchar *login, gchar *password, gchar **user_uuid, gchar **security_token, GError **error); gboolean ags_authentication_logout(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error); gchar* ags_authentication_generate_token(AgsAuthentication *authentication, GError **error); gchar** ags_authentication_get_groups(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error); gchar* ags_authentication_get_permission(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, gchar *group_name, GError **error); gboolean ags_authentication_is_session_active(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error); #endif /*__AGS_AUTHENTICATION_H__*/ gsequencer-1.4.24/ags/server/security/ags_xml_authentication.c0000644000175000017500000002236213246707333021525 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include #include #include #include #include #include #include #include #include void ags_xml_authentication_class_init(AgsXmlAuthenticationClass *xml_authentication); void ags_xml_authentication_authentication_interface_init(AgsAuthenticationInterface *authentication); void ags_xml_authentication_init(AgsXmlAuthentication *xml_authentication); void ags_xml_authentication_finalize(GObject *gobject); gchar** ags_xml_authenticaiton_get_authentication_module(AgsAuthentication *authentication); gboolean ags_xml_authentication_login(AgsAuthentication *authentication, gchar *login, gchar *password, gchar **user_uuid, gchar **security_token, GError **error); gboolean ags_xml_authentication_logout(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error); gchar* ags_xml_authentication_generate_token(AgsAuthentication *authentication, GError **error); gchar** ags_xml_authentication_get_groups(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error); gchar* ags_xml_authentication_get_permission(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, gchar *group_name, GError **error); gboolean ags_xml_authentication_is_session_active(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error); /** * SECTION:ags_xml_authentication * @short_description: authentication by XML file * @title: AgsXmlAuthentication * @section_id: * @include: ags/server/security/ags_xml_authentication.h * * The #AgsXmlAuthentication is an object to authenticate to Advanced Gtk+ Sequencer's * server. */ static gpointer ags_xml_authentication_parent_class = NULL; GType ags_xml_authentication_get_type() { static GType ags_type_xml_authentication = 0; if(!ags_type_xml_authentication){ static const GTypeInfo ags_xml_authentication_info = { sizeof (AgsXmlAuthenticationClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_xml_authentication_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsXmlAuthentication), 0, /* n_preallocs */ (GInstanceInitFunc) ags_xml_authentication_init, }; static const GInterfaceInfo ags_authentication_interface_info = { (GInterfaceInitFunc) ags_xml_authentication_authentication_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_xml_authentication = g_type_register_static(G_TYPE_OBJECT, "AgsXmlAuthentication\0", &ags_xml_authentication_info, 0); g_type_add_interface_static(ags_type_xml_authentication, AGS_TYPE_AUTHENTICATION, &ags_authentication_interface_info); } return (ags_type_xml_authentication); } void ags_xml_authentication_class_init(AgsXmlAuthenticationClass *xml_authentication) { GObjectClass *gobject; GParamSpec *param_spec; ags_xml_authentication_parent_class = g_type_class_peek_parent(xml_authentication); /* GObjectClass */ gobject = (GObjectClass *) xml_authentication; gobject->finalize = ags_xml_authentication_finalize; } void ags_xml_authentication_authentication_interface_init(AgsAuthenticationInterface *authentication) { authentication->get_authentication_module = ags_xml_authenticaiton_get_authentication_module; authentication->login = ags_xml_authentication_login; authentication->logout = ags_xml_authentication_logout; authentication->generate_token = ags_xml_authentication_generate_token; authentication->get_groups = ags_xml_authentication_get_groups; authentication->get_permission = ags_xml_authentication_get_permission; authentication->is_session_active = ags_xml_authentication_is_session_active; } void ags_xml_authentication_init(AgsXmlAuthentication *xml_authentication) { xml_authentication->filename = NULL; xml_authentication->encoding = NULL; xml_authentication->dtd = NULL; xml_authentication->doc = NULL; xml_authentication->root_node = NULL; } void ags_xml_authentication_finalize(GObject *gobject) { AgsXmlAuthentication *xml_authentication; xml_authentication = AGS_XML_AUTHENTICATION(gobject); G_OBJECT_CLASS(ags_xml_authentication_parent_class)->finalize(gobject); } gchar** ags_xml_authenticaiton_get_authentication_module(AgsAuthentication *authentication) { static gchar **authentication_module = NULL; if(authentication_module == NULL){ authentication_module = (gchar **) malloc(3 * sizeof(gchar *)); authentication_module[0] = "ags-base-authentication\0"; authentication_module[1] = "ags-xml-authentication\0"; authentication_module[2] = NULL; } return(authentication_module); } gboolean ags_xml_authentication_login(AgsAuthentication *authentication, gchar *login, gchar *password, gchar **user_uuid, gchar **security_token, GError **error) { AgsXmlAuthentication *xml_authentication; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; xmlNode *auth_node; xmlNode *user_node; gchar *current_uuid; gchar *current_token; xmlChar *xpath; guint i; if(login == NULL || password == NULL){ return(NULL); } xml_authentication = AGS_XML_AUTHENTICATION(authentication); current_uuid = NULL; current_token = NULL; return(FALSE); } gboolean ags_xml_authentication_logout(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error) { //TODO:JK: implement me return(FALSE); } gchar* ags_xml_authentication_generate_token(AgsAuthentication *authentication, GError **error) { //TODO:JK: implement me return(NULL); } gchar** ags_xml_authentication_get_groups(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error) { //TODO:JK: implement me return(NULL); } gchar* ags_xml_authentication_get_permission(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, gchar *group_name, GError **error) { //TODO:JK: implement me return(NULL); } gboolean ags_xml_authentication_is_session_active(AgsAuthentication *authentication, GObject *security_context, gchar *login, gchar *security_token, GError **error) { //TODO:JK: implement me return(FALSE); } xmlNode* ags_xml_authentication_find_user_uuid(AgsXmlAuthentication *xml_authentication, gchar *user_uuid) { xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; xmlNode *auth_node; xmlChar *xpath; guint i; if(!AGS_IS_XML_AUTHENTICATION(xml_authentication) || user_uuid == NULL){ return(NULL); } /* retrieve auth node */ xpath = g_strdup_printf("(//ags-srv-auth)/ags-srv-user-uuid[content()='%s']", user_uuid); /* Create xpath evaluation context */ xpath_context = xmlXPathNewContext(xml_authentication->doc); if(xpath_context == NULL) { g_warning("Error: unable to create new XPath context\0"); return(NULL); } /* Evaluate xpath expression */ xpath_object = xmlXPathEval(xpath, xpath_context); if(xpath_object == NULL) { g_warning("Error: unable to evaluate xpath expression\0"); xmlXPathFreeContext(xpath_context); return(NULL); } /* find node */ node = xpath_object->nodesetval->nodeTab; auth_node = NULL; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ auth_node = node[i]; break; } } /* free xpath and return */ g_free(xpath); return(auth_node); } /** * ags_xml_authentication_new: * * Create #AgsXmlAuthentication. * * Returns: the new #AgsXmlAuthentication instance * * Since: 1.0.0 */ AgsXmlAuthentication* ags_xml_authentication_new() { AgsXmlAuthentication *xml_authentication; xml_authentication = (AgsXmlAuthentication *) g_object_new(AGS_TYPE_XML_AUTHENTICATION, NULL); return(xml_authentication); } gsequencer-1.4.24/ags/server/security/ags_certificate.h0000644000175000017500000000374113246707333020115 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_CERTIFICATE_H__ #define __AGS_CERTIFICATE_H__ #include #include #define AGS_TYPE_CERTIFICATE (ags_certificate_get_type()) #define AGS_CERTIFICATE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CERTIFICATE, AgsCertificate)) #define AGS_CERTIFICATE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_CERTIFICATE, AgsCertificateInterface)) #define AGS_IS_CERTIFICATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CERTIFICATE)) #define AGS_IS_CERTIFICATE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_CERTIFICATE)) #define AGS_CERTIFICATE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_CERTIFICATE, AgsCertificateInterface)) typedef struct _AgsCertificate AgsCertificate; typedef struct _AgsCertificateInterface AgsCertificateInterface; struct _AgsCertificateInterface { GTypeInterface interface; gboolean (*verify)(AgsCertificate *certificate, gchar *certs, GError **error); }; GType ags_certificate_get_type(); gboolean ags_certificate_verify(AgsCertificate *certificate, gchar *certs, GError **error); #endif /*__AGS_CERTIFICATE_H__*/ gsequencer-1.4.24/ags/server/security/ags_certificate_manager.h0000644000175000017500000000516513246707333021611 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_CERTIFICATE_MANAGER_H__ #define __AGS_CERTIFICATE_MANAGER_H__ #include #include #include #define AGS_TYPE_CERTIFICATE_MANAGER (ags_certificate_manager_get_type()) #define AGS_CERTIFICATE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CERTIFICATE_MANAGER, AgsCertificateManager)) #define AGS_CERTIFICATE_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CERTIFICATE_MANAGER, AgsCertificateManagerClass)) #define AGS_IS_CERTIFICATE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CERTIFICATE_MANAGER)) #define AGS_IS_CERTIFICATE_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CERTIFICATE_MANAGER)) #define AGS_CERTIFICATE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_CERTIFICATE_MANAGER, AgsCertificateManagerClass)) typedef struct _AgsCertificateManager AgsCertificateManager; typedef struct _AgsCertificateManagerClass AgsCertificateManagerClass; struct _AgsCertificateManager { GObject object; GList *certificate; }; struct _AgsCertificateManagerClass { GObjectClass object; }; GType ags_certificate_manager_get_type(void); GList* ags_certificate_manager_get_certificate(AgsCertificateManager *certificate_manager); void ags_certificate_manager_add_certificate(AgsCertificateManager *certificate_manager, GObject *certificate); void ags_certificate_manager_remove_certificate(AgsCertificateManager *certificate_manager, GObject *certificate); /* */ gboolean ags_certificate_manager_verify_certificate(AgsCertificateManager *certificate_manager, gchar *certs); /* */ AgsCertificateManager* ags_certificate_manager_get_instance(); AgsCertificateManager* ags_certificate_manager_new(); #endif /*__AGS_CERTIFICATE_MANAGER_H__*/ gsequencer-1.4.24/ags/server/security/ags_xml_password_store.h0000644000175000017500000000430413246707333021565 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_XML_PASSWORD_STORE_H__ #define __AGS_XML_PASSWORD_STORE_H__ #include #include #include #define AGS_TYPE_XML_PASSWORD_STORE (ags_xml_password_store_get_type()) #define AGS_XML_PASSWORD_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_XML_PASSWORD_STORE, AgsXmlPasswordStore)) #define AGS_XML_PASSWORD_STORE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_XML_PASSWORD_STORE, AgsXmlPasswordStoreClass)) #define AGS_IS_XML_PASSWORD_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_XML_PASSWORD_STORE)) #define AGS_IS_XML_PASSWORD_STORE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_XML_PASSWORD_STORE)) #define AGS_XML_PASSWORD_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_XML_PASSWORD_STORE, AgsXmlPasswordStoreClass)) typedef struct _AgsXmlPasswordStore AgsXmlPasswordStore; typedef struct _AgsXmlPasswordStoreClass AgsXmlPasswordStoreClass; struct _AgsXmlPasswordStore { GObject object; gchar *filename; gchar *encoding; gchar *dtd; xmlDoc *doc; xmlNode *root_node; }; struct _AgsXmlPasswordStoreClass { GObjectClass object; }; GType ags_xml_password_store_get_type(); xmlNode* ags_xml_password_store_find_login(AgsXmlPasswordStore *xml_password_store, gchar *login); AgsXmlPasswordStore* ags_xml_password_store_new(); #endif /*__AGS_XML_PASSWORD_STORE_H__*/ gsequencer-1.4.24/ags/server/security/ags_xml_certificate.h0000644000175000017500000000402113246707333020765 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_XML_CERTIFICATE_H__ #define __AGS_XML_CERTIFICATE_H__ #include #include #include #define AGS_TYPE_XML_CERTIFICATE (ags_xml_certificate_get_type()) #define AGS_XML_CERTIFICATE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_XML_CERTIFICATE, AgsXmlCertificate)) #define AGS_XML_CERTIFICATE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_XML_CERTIFICATE, AgsXmlCertificateClass)) #define AGS_IS_XML_CERTIFICATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_XML_CERTIFICATE)) #define AGS_IS_XML_CERTIFICATE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_XML_CERTIFICATE)) #define AGS_XML_CERTIFICATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_XML_CERTIFICATE, AgsXmlCertificateClass)) typedef struct _AgsXmlCertificate AgsXmlCertificate; typedef struct _AgsXmlCertificateClass AgsXmlCertificateClass; struct _AgsXmlCertificate { GObject object; gchar *filename; gchar *encoding; gchar *dtd; xmlDoc *doc; xmlNode *root_node; }; struct _AgsXmlCertificateClass { GObjectClass object; }; GType ags_xml_certificate_get_type(); AgsXmlCertificate* ags_xml_certificate_new(); #endif /*__AGS_XML_CERTIFICATE_H__*/ gsequencer-1.4.24/ags/server/security/ags_certificate_manager.c0000644000175000017500000001175313246707333021604 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include void ags_certificate_manager_class_init(AgsCertificateManagerClass *certificate_manager); void ags_certificate_manager_init (AgsCertificateManager *certificate_manager); void ags_certificate_manager_finalize(GObject *gobject); /** * SECTION:ags_certificate_manager * @short_description: Singleton pattern to organize certificate * @title: AgsCertificateManager * @section_id: * @include: ags/server/security/ags_certificate_manager.h * * The #AgsCertificateManager manages your certificate. */ static gpointer ags_certificate_manager_parent_class = NULL; AgsCertificateManager *ags_certificate_manager = NULL; GType ags_certificate_manager_get_type (void) { static GType ags_type_certificate_manager = 0; if(!ags_type_certificate_manager){ static const GTypeInfo ags_certificate_manager_info = { sizeof (AgsCertificateManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_certificate_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCertificateManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_certificate_manager_init, }; ags_type_certificate_manager = g_type_register_static(G_TYPE_OBJECT, "AgsCertificateManager\0", &ags_certificate_manager_info, 0); } return (ags_type_certificate_manager); } void ags_certificate_manager_class_init(AgsCertificateManagerClass *certificate_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_certificate_manager_parent_class = g_type_class_peek_parent(certificate_manager); /* GObjectClass */ gobject = (GObjectClass *) certificate_manager; gobject->finalize = ags_certificate_manager_finalize; } void ags_certificate_manager_init(AgsCertificateManager *certificate_manager) { certificate_manager->certificate = NULL; } void ags_certificate_manager_finalize(GObject *gobject) { AgsCertificateManager *certificate_manager; certificate_manager = AGS_CERTIFICATE_MANAGER(gobject); if(certificate_manager->certificate != NULL){ g_list_free_full(certificate_manager->certificate, g_object_unref); } G_OBJECT_CLASS(ags_certificate_manager_parent_class)->finalize(gobject); } GList* ags_certificate_manager_get_certificate(AgsCertificateManager *certificate_manager) { if(certificate_manager == NULL){ certificate_manager = ags_certificate_manager_get_instance(); } return(certificate_manager->certificate); } void ags_certificate_manager_add_certificate(AgsCertificateManager *certificate_manager, GObject *certificate) { if(certificate_manager == NULL){ certificate_manager = ags_certificate_manager_get_instance(); } certificate_manager->certificate = g_list_prepend(certificate_manager->certificate, certificate); } void ags_certificate_manager_remove_certificate(AgsCertificateManager *certificate_manager, GObject *certificate) { if(certificate_manager == NULL){ certificate_manager = ags_certificate_manager_get_instance(); } certificate_manager->certificate = g_list_remove(certificate_manager->certificate, certificate); } gboolean ags_certificate_manager_verify_certificate(AgsCertificateManager *certificate_manager, gchar *certs) { //TODO:JK: implement me return(FALSE); } /** * ags_certificate_manager_get_instance: * * Get instance. * * Returns: the #AgsCertificateManager * * Since: 1.0.0 */ AgsCertificateManager* ags_certificate_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&(mutex)); if(ags_certificate_manager == NULL){ ags_certificate_manager = ags_certificate_manager_new(); pthread_mutex_unlock(&(mutex)); }else{ pthread_mutex_unlock(&(mutex)); } return(ags_certificate_manager); } /** * ags_certificate_manager_new: * * Creates an #AgsCertificateManager * * Returns: a new #AgsCertificateManager * * Since: 1.0.0 */ AgsCertificateManager* ags_certificate_manager_new() { AgsCertificateManager *certificate_manager; certificate_manager = (AgsCertificateManager *) g_object_new(AGS_TYPE_CERTIFICATE_MANAGER, NULL); return(certificate_manager); } gsequencer-1.4.24/ags/server/security/ags_password_store_manager.h0000644000175000017500000000542013246707333022377 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_PASSWORD_STORE_MANAGER_H__ #define __AGS_PASSWORD_STORE_MANAGER_H__ #include #include #include #define AGS_TYPE_PASSWORD_STORE_MANAGER (ags_password_store_manager_get_type()) #define AGS_PASSWORD_STORE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PASSWORD_STORE_MANAGER, AgsPasswordStoreManager)) #define AGS_PASSWORD_STORE_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PASSWORD_STORE_MANAGER, AgsPasswordStoreManagerClass)) #define AGS_IS_PASSWORD_STORE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PASSWORD_STORE_MANAGER)) #define AGS_IS_PASSWORD_STORE_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PASSWORD_STORE_MANAGER)) #define AGS_PASSWORD_STORE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PASSWORD_STORE_MANAGER, AgsPasswordStoreManagerClass)) typedef struct _AgsPasswordStoreManager AgsPasswordStoreManager; typedef struct _AgsPasswordStoreManagerClass AgsPasswordStoreManagerClass; struct _AgsPasswordStoreManager { GObject object; GList *password_store; }; struct _AgsPasswordStoreManagerClass { GObjectClass object; }; GType ags_password_store_manager_get_type(void); GList* ags_password_store_manager_get_password_store(AgsPasswordStoreManager *password_store_manager); void ags_password_store_manager_add_password_store(AgsPasswordStoreManager *password_store_manager, GObject *password_store); void ags_password_store_manager_remove_password_store(AgsPasswordStoreManager *password_store_manager, GObject *password_store); /* */ gboolean ags_password_store_manager_check_password(AgsPasswordStoreManager *password_store_manager, gchar *login, gchar *password); /* */ AgsPasswordStoreManager* ags_password_store_manager_get_instance(); AgsPasswordStoreManager* ags_password_store_manager_new(); #endif /*__AGS_PASSWORD_STORE_MANAGER_H__*/ gsequencer-1.4.24/ags/server/security/ags_xml_authentication.h0000644000175000017500000000433313246707333021530 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_XML_AUTHENTICATION_H__ #define __AGS_XML_AUTHENTICATION_H__ #include #include #include #define AGS_TYPE_XML_AUTHENTICATION (ags_xml_authentication_get_type()) #define AGS_XML_AUTHENTICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_XML_AUTHENTICATION, AgsXmlAuthentication)) #define AGS_XML_AUTHENTICATION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_XML_AUTHENTICATION, AgsXmlAuthenticationClass)) #define AGS_IS_XML_AUTHENTICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_XML_AUTHENTICATION)) #define AGS_IS_XML_AUTHENTICATION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_XML_AUTHENTICATION)) #define AGS_XML_AUTHENTICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_XML_AUTHENTICATION, AgsXmlAuthenticationClass)) typedef struct _AgsXmlAuthentication AgsXmlAuthentication; typedef struct _AgsXmlAuthenticationClass AgsXmlAuthenticationClass; struct _AgsXmlAuthentication { GObject object; gchar *filename; gchar *encoding; gchar *dtd; xmlDoc *doc; xmlNode *root_node; }; struct _AgsXmlAuthenticationClass { GObjectClass object; }; GType ags_xml_authentication_get_type(); xmlNode* ags_xml_authentication_find_user_uuid(AgsXmlAuthentication *xml_authentication, gchar *user_uuid); AgsXmlAuthentication* ags_xml_authentication_new(); #endif /*__AGS_XML_AUTHENTICATION_H__*/ gsequencer-1.4.24/ags/server/security/ags_business_group.c0000644000175000017500000003210413246707333020670 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include void ags_business_group_base_init(AgsBusinessGroupInterface *interface); /** * SECTION:ags_business_group * @short_description: base group permissions * @title: AgsBusinessGroup * @section_id: AgsBusinessGroup * @include: ags/server/security/ags_business_group.h * * The #AgsBusinessGroup interface gives you base group permissions. */ GType ags_business_group_get_type() { static GType ags_type_business_group = 0; if(!ags_type_business_group){ static const GTypeInfo ags_business_group_info = { sizeof(AgsBusinessGroupInterface), (GBaseInitFunc) ags_business_group_base_init, NULL, /* base_finalize */ }; ags_type_business_group = g_type_register_static(G_TYPE_INTERFACE, "AgsBusinessGroup\0", &ags_business_group_info, 0); } return(ags_type_business_group); } void ags_business_group_base_init(AgsBusinessGroupInterface *interface) { /* empty */ } /** * ags_business_group_set_business_group_name: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @group_id: the group's id * @business_group_name: the business group name * @error: the #GError-struct * * Set business group name. * * Since: 1.0.0 */ void ags_business_group_set_business_group_name(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *group_id, gchar *business_group_name, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_if_fail(AGS_IS_BUSINESS_GROUP(business_group)); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_if_fail(business_group_interface->set_business_group_name); business_group_interface->set_business_group_name(business_group, security_context, login, security_token, group_id, business_group_name, error); } /** * ags_business_group_get_business_group_name: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @group_id: the group's id * @error: the #GError-struct * * Get business group name. * * Returns: the business group name as string * * Since: 1.0.0 */ gchar* ags_business_group_get_business_group_name(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *group_id, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_val_if_fail(AGS_IS_BUSINESS_GROUP(business_group), NULL); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_val_if_fail(business_group_interface->get_business_group_name, NULL); return(business_group_interface->get_business_group_name(business_group, security_context, login, security_token, group_id, error)); } /** * ags_business_group_set_user_id: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @business_group_name: the business group name * @user_id: the string array containing ids of users * @error: the #GError-struct * * Set business group ids of users as string array. * * Since: 1.0.0 */ void ags_business_group_set_user_id(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar** user_id, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_if_fail(AGS_IS_BUSINESS_GROUP(business_group)); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_if_fail(business_group_interface->set_user_id); business_group_interface->set_user_id(business_group, security_context, login, security_token, business_group_name, user_id, error); } /** * ags_business_group_get_user_id: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @business_group_name: the business group name * @error: the #GError-struct * * Get business group name. * * Returns: the business group's ids of users as string array * * Since: 1.0.0 */ gchar** ags_business_group_get_user_id(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_val_if_fail(AGS_IS_BUSINESS_GROUP(business_group), NULL); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_val_if_fail(business_group_interface->get_user_id, NULL); return(business_group_interface->get_user_id(business_group, security_context, login, security_token, business_group_name, error)); } /** * ags_business_group_set_context_path_with_read_permission: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @business_group_name: the business group name * @context_path: the string array containing context paths * @error: the #GError-struct * * Set business group context paths as string array. * * Since: 1.0.0 */ void ags_business_group_set_context_path_with_read_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar **context_path, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_if_fail(AGS_IS_BUSINESS_GROUP(business_group)); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_if_fail(business_group_interface->set_context_path_with_read_permission); business_group_interface->set_context_path_with_read_permission(business_group, security_context, login, security_token, business_group_name, context_path, error); } /** * ags_business_group_get_context_path_with_read_permission: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @business_group_name: the business group name * @error: the #GError-struct * * Get business group name. * * Returns: the business group's context paths as string array * * Since: 1.0.0 */ gchar** ags_business_group_get_context_path_with_read_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_val_if_fail(AGS_IS_BUSINESS_GROUP(business_group), NULL); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_val_if_fail(business_group_interface->get_context_path_with_read_permission, NULL); return(business_group_interface->get_context_path_with_read_permission(business_group, security_context, login, security_token, business_group_name, error)); } /** * ags_business_group_set_context_path_with_write_permission: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @business_group_name: the business group name * @context_path: the string array containing context paths * @error: the #GError-struct * * Set business group context paths as string array. * * Since: 1.0.0 */ void ags_business_group_set_context_path_with_write_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar **context_path, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_if_fail(AGS_IS_BUSINESS_GROUP(business_group)); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_if_fail(business_group_interface->set_context_path_with_write_permission); business_group_interface->set_context_path_with_write_permission(business_group, security_context, login, security_token, business_group_name, context_path, error); } /** * ags_business_group_get_context_path_with_write_permission: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @business_group_name: the business group name * @error: the #GError-struct * * Get business group name. * * Returns: the business group's context paths as string array * * Since: 1.0.0 */ gchar** ags_business_group_get_context_path_with_write_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_val_if_fail(AGS_IS_BUSINESS_GROUP(business_group), NULL); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_val_if_fail(business_group_interface->get_context_path_with_write_permission, NULL); return(business_group_interface->get_context_path_with_write_permission(business_group, security_context, login, security_token, business_group_name, error)); } /** * ags_business_group_set_context_path_with_execute_permission: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @business_group_name: the business group name * @context_path: the string array containing context paths * @error: the #GError-struct * * Set business group context paths as string array. * * Since: 1.0.0 */ void ags_business_group_set_context_path_with_execute_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar **context_path, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_if_fail(AGS_IS_BUSINESS_GROUP(business_group)); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_if_fail(business_group_interface->set_context_path_with_execute_permission); business_group_interface->set_context_path_with_execute_permission(business_group, security_context, login, security_token, business_group_name, context_path, error); } /** * ags_business_group_get_context_path_with_execute_permission: * @business_group: the #AgsBusinessGroup * @security_context: the #AgsSecurityContext * @login: the login * @security_token: the security token * @business_group_name: the business group name * @error: the #GError-struct * * Get business group name. * * Returns: the business group's context paths as string array * * Since: 1.0.0 */ gchar** ags_business_group_get_context_path_with_execute_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error) { AgsBusinessGroupInterface *business_group_interface; g_return_val_if_fail(AGS_IS_BUSINESS_GROUP(business_group), NULL); business_group_interface = AGS_BUSINESS_GROUP_GET_INTERFACE(business_group); g_return_val_if_fail(business_group_interface->get_context_path_with_execute_permission, NULL); return(business_group_interface->get_context_path_with_execute_permission(business_group, security_context, login, security_token, business_group_name, error)); } gsequencer-1.4.24/ags/server/security/ags_authentication.dtd0000644000175000017500000000207513246707333021175 00000000000000 gsequencer-1.4.24/ags/server/security/ags_password_store.h0000644000175000017500000000726613246707333020717 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_PASSWORD_STORE_H__ #define __AGS_PASSWORD_STORE_H__ #include #include #include #define AGS_TYPE_PASSWORD_STORE (ags_password_store_get_type()) #define AGS_PASSWORD_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PASSWORD_STORE, AgsPasswordStore)) #define AGS_PASSWORD_STORE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_PASSWORD_STORE, AgsPasswordStoreInterface)) #define AGS_IS_PASSWORD_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PASSWORD_STORE)) #define AGS_IS_PASSWORD_STORE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_PASSWORD_STORE)) #define AGS_PASSWORD_STORE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_PASSWORD_STORE, AgsPasswordStoreInterface)) typedef struct _AgsPasswordStore AgsPasswordStore; typedef struct _AgsPasswordStoreInterface AgsPasswordStoreInterface; struct _AgsPasswordStoreInterface { GTypeInterface interface; void (*set_login_name)(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, gchar *login_name, GError **error); gchar* (*get_login_name)(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, GError **error); void (*set_password)(AgsPasswordStore *password_store, GObject *security_context, gchar *login, gchar *security_token, gchar *password, GError **error); gchar* (*get_password)(AgsPasswordStore *password_store, GObject *security_context, gchar *login, gchar *security_token, GError **error); gchar* (*encrypt_password)(AgsPasswordStore *password_store, gchar *password, gchar *salt, GError **error); }; GType ags_password_store_get_type(); void ags_password_store_set_login_name(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, gchar *login_name, GError **error); gchar* ags_password_store_get_login_name(AgsPasswordStore *password_store, GObject *security_context, gchar *user_uuid, gchar *security_token, GError **error); void ags_password_store_set_password(AgsPasswordStore *password_store, GObject *security_context, gchar *login, gchar *security_token, gchar *password, GError **error); gchar* ags_password_store_get_password(AgsPasswordStore *password_store, GObject *security_context, gchar *login, gchar *security_token, GError **error); gchar* ags_password_store_encrypt_password(AgsPasswordStore *password_store, gchar *password, gchar *salt, GError **error); #endif /*__AGS_PASSWORD_STORE_H__*/ gsequencer-1.4.24/ags/server/security/ags_password_store.dtd0000644000175000017500000000137313246707333021234 00000000000000 gsequencer-1.4.24/ags/server/security/ags_business_group.h0000644000175000017500000001540113246707333020676 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_BUSINESS_GROUP_H__ #define __AGS_BUSINESS_GROUP_H__ #include #include #define AGS_TYPE_BUSINESS_GROUP (ags_business_group_get_type()) #define AGS_BUSINESS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BUSINESS_GROUP, AgsBusinessGroup)) #define AGS_BUSINESS_GROUP_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_BUSINESS_GROUP, AgsBusinessGroupInterface)) #define AGS_IS_BUSINESS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_BUSINESS_GROUP)) #define AGS_IS_BUSINESS_GROUP_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_BUSINESS_GROUP)) #define AGS_BUSINESS_GROUP_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_BUSINESS_GROUP, AgsBusinessGroupInterface)) typedef struct _AgsBusinessGroup AgsBusinessGroup; typedef struct _AgsBusinessGroupInterface AgsBusinessGroupInterface; struct _AgsBusinessGroupInterface { GTypeInterface interface; void (*set_business_group_name)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *group_id, gchar *business_group_name, GError **error); gchar* (*get_business_group_name)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *group_id, GError **error); void (*set_user_id)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar** user_id, GError **error); gchar** (*get_user_id)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error); void (*set_context_path_with_read_permission)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar **context_path, GError **error); gchar** (*get_context_path_with_read_permission)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error); void (*set_context_path_with_write_permission)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar **context_path, GError **error); gchar** (*get_context_path_with_write_permission)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error); void (*set_context_path_with_execute_permission)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar **context_path, GError **error); gchar** (*get_context_path_with_execute_permission)(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error); }; GType ags_business_group_get_type(); void ags_business_group_set_business_group_name(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *group_id, gchar *business_group_name, GError **error); gchar* ags_business_group_get_business_group_name(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *group_id, GError **error); void ags_business_group_set_user_id(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar** user_id, GError **error); gchar** ags_business_group_get_user_id(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error); void ags_business_group_set_context_path_with_read_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar **context_path, GError **error); gchar** ags_business_group_get_context_path_with_read_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error); void ags_business_group_set_context_path_with_write_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar **context_path, GError **error); gchar** ags_business_group_get_context_path_with_write_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error); void ags_business_group_set_context_path_with_execute_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, gchar **context_path, GError **error); gchar** ags_business_group_get_context_path_with_execute_permission(AgsBusinessGroup *business_group, GObject *security_context, gchar *login, gchar *security_token, gchar *business_group_name, GError **error); #endif /*__AGS_BUSINESS_GROUP_H__*/ gsequencer-1.4.24/ags/server/security/ags_certificate.dtd0000644000175000017500000000116613246707333020440 00000000000000 gsequencer-1.4.24/ags/server/security/ags_security_context.h0000644000175000017500000000571313246707333021247 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #ifndef __AGS_SECURITY_CONTEXT_H__ #define __AGS_SECURITY_CONTEXT_H__ #include #include #define AGS_TYPE_SECURITY_CONTEXT (ags_security_context_get_type()) #define AGS_SECURITY_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SECURITY_CONTEXT, AgsSecurityContext)) #define AGS_SECURITY_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SECURITY_CONTEXT, AgsSecurityContextClass)) #define AGS_IS_SECURITY_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SECURITY_CONTEXT)) #define AGS_IS_SECURITY_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SECURITY_CONTEXT)) #define AGS_SECURITY_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SECURITY_CONTEXT, AgsSecurityContextClass)) typedef struct _AgsSecurityContext AgsSecurityContext; typedef struct _AgsSecurityContextClass AgsSecurityContextClass; /** * AgsSecurityContextMode: * @AGS_SECURITY_CONTEXT_RPC_READ: allowed to read using RPC * @AGS_SECURITY_CONTEXT_RPC_WRITE: allowed to write using RPC * @AGS_SECURITY_CONTEXT_RPC_EXECUTE: allowed to execute using RPC * @AGS_SECURITY_CONTEXT_ACCOUNT_READ: allowed to read account information * @AGS_SECURITY_CONTEXT_ACCOUNT_WRITE: allowed to write account information * * The #AgsSecurityContextMode specifies basic account permissions. */ typedef enum{ AGS_SECURITY_CONTEXT_RPC_READ = 1, AGS_SECURITY_CONTEXT_RPC_WRITE = 1 << 1, AGS_SECURITY_CONTEXT_RPC_EXECUTE = 1 << 2, AGS_SECURITY_CONTEXT_ACCOUNT_READ = 1 << 3, AGS_SECURITY_CONTEXT_ACCOUNT_WRITE = 1 << 4, }AgsSecurityContextMode; struct _AgsSecurityContext { GObject object; gchar *certs; gchar **permitted_context; gchar **server_context; }; struct _AgsSecurityContextClass { GObjectClass object; }; GType ags_security_context_get_type(); void ags_security_context_add_server_context(AgsSecurityContext *security_context, gchar *server_context); gboolean ags_security_context_remove_server_context(AgsSecurityContext *security_context, gchar *server_context); AgsSecurityContext* ags_security_context_new(); #endif /*__AGS_SECURITY_CONTEXT_H__*/ gsequencer-1.4.24/ags/server/security/ags_password_store_manager.c0000644000175000017500000001247013246707333022375 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with GSequencer. If not, see . */ #include void ags_password_store_manager_class_init(AgsPasswordStoreManagerClass *password_store_manager); void ags_password_store_manager_init (AgsPasswordStoreManager *password_store_manager); void ags_password_store_manager_finalize(GObject *gobject); /** * SECTION:ags_password_store_manager * @short_description: Singleton pattern to organize password stores * @title: AgsPasswordStoreManager * @section_id: * @include: ags/server/security/ags_password_store_manager.h * * The #AgsPasswordStoreManager manages your password stores. */ static gpointer ags_password_store_manager_parent_class = NULL; AgsPasswordStoreManager *ags_password_store_manager = NULL; GType ags_password_store_manager_get_type (void) { static GType ags_type_password_store_manager = 0; if(!ags_type_password_store_manager){ static const GTypeInfo ags_password_store_manager_info = { sizeof (AgsPasswordStoreManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_password_store_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPasswordStoreManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_password_store_manager_init, }; ags_type_password_store_manager = g_type_register_static(G_TYPE_OBJECT, "AgsPasswordStoreManager\0", &ags_password_store_manager_info, 0); } return (ags_type_password_store_manager); } void ags_password_store_manager_class_init(AgsPasswordStoreManagerClass *password_store_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_password_store_manager_parent_class = g_type_class_peek_parent(password_store_manager); /* GObjectClass */ gobject = (GObjectClass *) password_store_manager; gobject->finalize = ags_password_store_manager_finalize; } void ags_password_store_manager_init(AgsPasswordStoreManager *password_store_manager) { password_store_manager->password_store = NULL; } void ags_password_store_manager_finalize(GObject *gobject) { AgsPasswordStoreManager *password_store_manager; password_store_manager = AGS_PASSWORD_STORE_MANAGER(gobject); if(password_store_manager->password_store != NULL){ g_list_free_full(password_store_manager->password_store, g_object_unref); } G_OBJECT_CLASS(ags_password_store_manager_parent_class)->finalize(gobject); } GList* ags_password_store_manager_get_password_store(AgsPasswordStoreManager *password_store_manager) { if(password_store_manager == NULL){ password_store_manager = ags_password_store_manager_get_instance(); } return(password_store_manager->password_store); } void ags_password_store_manager_add_password_store(AgsPasswordStoreManager *password_store_manager, GObject *password_store) { if(password_store_manager == NULL){ password_store_manager = ags_password_store_manager_get_instance(); } password_store_manager->password_store = g_list_prepend(password_store_manager->password_store, password_store); } void ags_password_store_manager_remove_password_store(AgsPasswordStoreManager *password_store_manager, GObject *password_store) { if(password_store_manager == NULL){ password_store_manager = ags_password_store_manager_get_instance(); } password_store_manager->password_store = g_list_remove(password_store_manager->password_store, password_store); } gboolean ags_password_store_manager_check_password(AgsPasswordStoreManager *password_store_manager, gchar *login, gchar *password) { //TODO:JK: implement me return(FALSE); } /** * ags_password_store_manager_get_instance: * * Get instance. * * Returns: the #AgsPasswordStoreManager * * Since: 1.0.0 */ AgsPasswordStoreManager* ags_password_store_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&(mutex)); if(ags_password_store_manager == NULL){ ags_password_store_manager = ags_password_store_manager_new(); pthread_mutex_unlock(&(mutex)); }else{ pthread_mutex_unlock(&(mutex)); } return(ags_password_store_manager); } /** * ags_password_store_manager_new: * * Creates an #AgsPasswordStoreManager * * Returns: a new #AgsPasswordStoreManager * * Since: 1.0.0 */ AgsPasswordStoreManager* ags_password_store_manager_new() { AgsPasswordStoreManager *password_store_manager; password_store_manager = (AgsPasswordStoreManager *) g_object_new(AGS_TYPE_PASSWORD_STORE_MANAGER, NULL); return(password_store_manager); } gsequencer-1.4.24/ags/lib/0000755000175000017500000000000013256233674012277 500000000000000gsequencer-1.4.24/ags/lib/ags_parameter.c0000644000175000017500000000664213247044247015201 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 1995 Spencer Kimball and Peter Mattis * * 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 the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include /** * SECTION:ags_parameter * @short_description: Complete GParameter * @title: AgsParameter * @section_id: * @include: ags/lib/ags_parameter.h * * Functions completing #GParameter API. */ static GParamSpecPool *pspec_pool = NULL; /** * ags_parameter_grow: * @object_type: the #GType of the object's properties * @params: the #GParameter array * @n_params: location to store new size * @...: a %NULL-terminated list of properties name and value * * Grow parameter array of @object_type object. This function is mainly used to * prepare a #GParameter array to instantiate a new #GObject by using g_object_newv(). * * Returns: the resized GParameter array * * Since: 1.0.0 */ GParameter* ags_parameter_grow(GType object_type, GParameter *params, guint *n_params, ...) { //Thank you gimp GObjectClass *object_class; gchar *param_name; va_list ap; object_class = g_type_class_ref (object_type); va_start(ap, n_params); param_name = va_arg (ap, gchar *); while (param_name) { gchar *error; GParamSpec *pspec; error = NULL; pspec = g_object_class_find_property(object_class, param_name); if (! pspec) { g_warning ("%s: object class `%s' has no property named `%s'", G_STRFUNC, g_type_name (object_type), param_name); break; } if(params != NULL){ params = g_renew (GParameter, params, *n_params + 1); }else{ params = g_new(GParameter, 1); } params[*n_params].name = param_name; params[*n_params].value.g_type = 0; g_value_init (¶ms[*n_params].value, G_PARAM_SPEC_VALUE_TYPE (pspec)); G_VALUE_COLLECT (¶ms[*n_params].value, ap, 0, &error); if (error) { g_warning ("%s: %s", G_STRFUNC, error); g_free (error); g_value_unset (¶ms[*n_params].value); break; } *n_params = *n_params + 1; param_name = va_arg (ap, gchar *); } return(params); } /** * ags_parameter_find: * @params: the #GParameter-struct * @n_params: the count of @params * @name: the string to match against name of @params * * Find #GValue-struct matching @name. * * Returns: the matching #GValue-struct or %NULL if not found * * Since: 1.2.0 */ GValue* ags_parameter_find(GParameter *params, guint n_params, gchar *name) { guint i; for(i = 0; i < n_params; i++){ if(!g_strcmp0(params[i].name, name)){ return(&(params[i].value)); } } return(NULL); } gsequencer-1.4.24/ags/lib/ags_function.h0000644000175000017500000001127713247044247015053 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2016 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 . */ #ifndef __AGS_FUNCTION_H__ #define __AGS_FUNCTION_H__ #include #include #include #include #define AGS_TYPE_FUNCTION (ags_function_get_type()) #define AGS_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FUNCTION, AgsFunction)) #define AGS_FUNCTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FUNCTION, AgsFunctionClass)) #define AGS_IS_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FUNCTION)) #define AGS_IS_FUNCTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FUNCTION)) #define AGS_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_FUNCTION, AgsFunctionClass)) #define AGS_SYMBOLIC_EULER "ℯ" #define AGS_SYMBOLIC_PI "𝜋" #define AGS_SYMBOLIC_INFINIT "∞" #define AGS_SYMBOLIC_COMPLEX_UNIT "𝑖" typedef struct _AgsFunction AgsFunction; typedef struct _AgsFunctionClass AgsFunctionClass; typedef struct _AgsSolverMatrix AgsSolverMatrix; typedef struct _AgsSolverVector AgsSolverVector; /** * AgsFunctionFlags: * @AGS_FUNCTION_LINEAR: the function is linear * @AGS_FUNCTION_EXPONENTIAL: the function is exponential * @AGS_FUNCTION_LOGARITHMIC: the function is logarithmic * @AGS_FUNCTION_IS_UNIQUE: the function is unique * @AGS_FUNCTION_SOLVE_PIVOT_TABLE: do solve using pivot table * @AGS_FUNCTION_SOLVE_MAXIMUM_COLON: solve using maximum colon strategy * @AGS_FUNCTION_SOLVE_GAUSS: solve using gauss strategy * * Enum values to control the behavior or indicate internal state of #AgsFunction by * enable/disable as flags. */ typedef enum{ AGS_FUNCTION_LINEAR = 1, AGS_FUNCTION_EXPONENTIAL = 1 << 1, AGS_FUNCTION_LOGARITHMIC = 1 << 2, AGS_FUNCTION_IS_UNIQUE = 1 << 3, AGS_FUNCTION_SOLVE_PIVOT_TABLE = 1 << 4, AGS_FUNCTION_SOLVE_MAXIMUM_COLON = 1 << 5, AGS_FUNCTION_SOLVE_GAUSS = 1 << 6, }AgsFunctionFlags; struct _AgsFunction { AgsConversion conversion; guint flags; gboolean is_pushing; gchar **equation; guint equation_count; gchar **transformed_equation; guint transformed_equation_count; gchar *source_function; gchar *normalized_function; gchar **symbol; guint symbol_count; GList *solver_matrix; guint pivot_table_count; guint *row_count; guint *column_count; AgsComplex*** pivot_table; guint solver_level; AgsComplex **solver_vector; }; struct _AgsFunctionClass { AgsConversionClass conversion; void (*literal_solve)(AgsFunction *function); }; struct _AgsSolverMatrix { gchar **function_history; gchar *source_function; AgsSolverVector **term_table; guint row_count; guint column_count; }; struct _AgsSolverVector { gchar *term; gchar *term_exp; AgsComplex *numeric_value; gchar *symbol; AgsComplex *exp_value; }; GType ags_function_get_type(void); gchar** ags_function_collapse_parantheses(AgsFunction *function, guint *function_count); gchar** ags_function_find_literals(AgsFunction *function, guint *symbol_count); void ags_function_literal_solve(AgsFunction *function); gboolean ags_function_push_equation(AgsFunction *function, gchar *equation); void ags_function_pop_equation(AgsFunction *function, GError **error); gchar* ags_function_get_expanded(AgsFunction *function, gchar **symbol, guint symbol_count); gchar* ags_funciton_get_normalized(AgsFunction *function); AgsComplex* ags_function_compute_term(gchar *term, gchar *substitute_symbol, AgsComplex *substitute_value); AgsComplex** ags_function_symbolic_translate_value(AgsFunction *function, gchar *symbol, AgsComplex *value); gboolean ags_function_substitute_values(AgsFunction *function, gchar *symbol, ...); AgsComplex* ags_function_translate_value(AgsFunction *function, AgsComplex *value); AgsFunction* ags_function_new(gchar *source_function); #endif /*__AGS_FUNCTION_H__*/ gsequencer-1.4.24/ags/lib/ags_endian.c0000644000175000017500000000277113256163135014454 00000000000000/* 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 . */ #include /** * SECTION:ags_endian * @short_description: dealing with endiannes * @title: AgsEndian * @section_id: * @include: ags/lib/ags_endian.h * * Some common routines dealing with endiannes. */ /** * ags_endian_swap_float: * @x: the float to swap * * Swaps the floating point numbers endianness. * * Returns: the byte-swapped float * * Since: 1.0.0 */ gfloat ags_endian_swap_float(gfloat x) { char c; union{ gfloat float_data; char char_data[4]; }data; data.float_data = x; c = data.char_data[0]; data.char_data[0] = data.char_data[3]; data.char_data[3] = c; c = data.char_data[1]; data.char_data[1] = data.char_data[2]; data.char_data[2] = c; return(data.float_data); } gsequencer-1.4.24/ags/lib/ags_log.c0000644000175000017500000000761013246707333013777 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2016 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 . */ #include #include void ags_log_class_init(AgsLogClass *log); void ags_log_init (AgsLog *log); void ags_log_finalize(GObject *gobject); /** * SECTION:ags_log * @short_description: Log * @title: AgsLog * @section_id: * @include: ags/lib/ags_log.h * * The #AgsLog logging class. */ static gpointer ags_log_parent_class = NULL; AgsLog *ags_log = NULL; GType ags_log_get_type(void) { static GType ags_type_log = 0; if(!ags_type_log){ static const GTypeInfo ags_log_info = { sizeof (AgsLogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_log_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_log_init, }; ags_type_log = g_type_register_static(G_TYPE_OBJECT, "AgsLog", &ags_log_info, 0); } return (ags_type_log); } void ags_log_class_init(AgsLogClass *log) { GObjectClass *gobject; ags_log_parent_class = g_type_class_peek_parent(log); /* GObjectClass */ gobject = (GObjectClass *) log; gobject->finalize = ags_log_finalize; } void ags_log_init(AgsLog *log) { pthread_mutexattr_t *attr; log->flags = 0; /* create mutex */ //FIXME:JK: memory leak attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); log->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(log->mutex, attr); log->messages = NULL; } void ags_log_finalize(GObject *gobject) { AgsLog *log; log = AGS_LOG(gobject); /* free messages and list */ g_list_free_full(g_atomic_pointer_get(&(log->messages)), g_free); if(log == ags_log){ ags_log = NULL; } /* call parent */ G_OBJECT_CLASS(ags_log_parent_class)->finalize(gobject); } /** * ags_log_get_instance: * * Get your logging instance. * * Returns: the #AgsLog instance * * Since: 1.0.0 */ AgsLog* ags_log_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_log == NULL){ ags_log = ags_log_new(); } pthread_mutex_unlock(&mutex); return(ags_log); } /** * ags_log_add_message: * @log: the #AgsLog * @str: the message * * Add a message to @log. * * Since: 1.0.0 */ void ags_log_add_message(AgsLog *log, gchar *str) { pthread_mutex_lock(log->mutex); g_atomic_pointer_set(&(log->messages), g_list_prepend(g_atomic_pointer_get(&(log->messages)), g_strdup(str))); pthread_mutex_unlock(log->mutex); } /** * ags_log_get_messages: * @log: the #AgsLog * * Get log messages as #GList-struct containing strings. * * Returns: the #GList-struct containing log messages * * Since: 1.0.0 */ GList* ags_log_get_messages(AgsLog *log) { return(g_atomic_pointer_get(&(log->messages))); } /** * ags_log_new: * * Instantiate a new #AgsLog. * * Returns: the new instance * * Since: 1.0.0 */ AgsLog* ags_log_new() { AgsLog *log; log = g_object_new(AGS_TYPE_LOG, NULL); return(log); } gsequencer-1.4.24/ags/lib/ags_buffer_util.c0000644000175000017500000006365613256163135015535 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #include #include #include /** * ags_buffer_util_s8_to_char_buffer: * @buffer: the signed char buffer * @buffer_length: the buffer length * * Pack @buffer into an unsigned char buffer. * * Returns: the unsigned char buffer * * Since: 1.4.0 */ unsigned char* ags_buffer_util_s8_to_char_buffer(signed char *buffer, guint buffer_length) { unsigned char *cbuffer; guint limit; guint i; cbuffer = (unsigned char *) malloc(buffer_length * sizeof(unsigned char)); i = 0; if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); cbuffer[1] = (unsigned char) (0xff & buffer[1]); cbuffer[2] = (unsigned char) (0xff & buffer[2]); cbuffer[3] = (unsigned char) (0xff & buffer[3]); cbuffer[4] = (unsigned char) (0xff & buffer[4]); cbuffer[5] = (unsigned char) (0xff & buffer[5]); cbuffer[6] = (unsigned char) (0xff & buffer[6]); cbuffer[7] = (unsigned char) (0xff & buffer[7]); buffer += 8; cbuffer += 8; } } for(; i < buffer_length; i++){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); buffer++; cbuffer++; } return(cbuffer); } /** * ags_buffer_util_s16_to_char_buffer: * @buffer: the signed short buffer * @buffer_length: the buffer length * * Pack @buffer into an unsigned char buffer. * * Returns: the unsigned char buffer * * Since: 1.4.0 */ unsigned char* ags_buffer_util_s16_to_char_buffer(signed short *buffer, guint buffer_length) { unsigned char *cbuffer; guint limit; guint i; cbuffer = (unsigned char *) malloc((2 * buffer_length) * sizeof(unsigned char)); i = 0; if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); cbuffer[1] = (unsigned char) ((0xff00 & buffer[0]) >> 8); cbuffer[2] = (unsigned char) (0xff & buffer[1]); cbuffer[3] = (unsigned char) ((0xff00 & buffer[1]) >> 8); cbuffer[4] = (unsigned char) (0xff & buffer[2]); cbuffer[5] = (unsigned char) ((0xff00 & buffer[2]) >> 8); cbuffer[6] = (unsigned char) (0xff & buffer[3]); cbuffer[7] = (unsigned char) ((0xff00 & buffer[3]) >> 8); cbuffer[8] = (unsigned char) (0xff & buffer[4]); cbuffer[9] = (unsigned char) ((0xff00 & buffer[4]) >> 8); cbuffer[10] = (unsigned char) (0xff & buffer[5]); cbuffer[11] = (unsigned char) ((0xff00 & buffer[5]) >> 8); cbuffer[12] = (unsigned char) (0xff & buffer[6]); cbuffer[13] = (unsigned char) ((0xff00 & buffer[6]) >> 8); cbuffer[14] = (unsigned char) (0xff & buffer[7]); cbuffer[15] = (unsigned char) ((0xff00 & buffer[7]) >> 8); buffer += 8; cbuffer += (2 * 8); } } for(; i < buffer_length; i++){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); cbuffer[1] = (unsigned char) ((0xff00 & buffer[0]) >> 8); buffer++; cbuffer += 2; } return(cbuffer); } /** * ags_buffer_util_s24_to_char_buffer: * @buffer: the signed long buffer * @buffer_length: the buffer length * * Pack @buffer into an unsigned char buffer. * * Returns: the unsigned char buffer * * Since: 1.4.0 */ unsigned char* ags_buffer_util_s24_to_char_buffer(signed long *buffer, guint buffer_length) { unsigned char *cbuffer; guint limit; guint i; cbuffer = (unsigned char *) malloc((3 * buffer_length) * sizeof(unsigned char)); i = 0; if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); cbuffer[1] = (unsigned char) ((0xff00 & buffer[0]) >> 8); cbuffer[2] = (unsigned char) ((0xff0000 & buffer[0]) >> 16); cbuffer[3] = (unsigned char) (0xff & buffer[1]); cbuffer[4] = (unsigned char) ((0xff00 & buffer[1]) >> 8); cbuffer[5] = (unsigned char) ((0xff0000 & buffer[1]) >> 16); cbuffer[6] = (unsigned char) (0xff & buffer[2]); cbuffer[7] = (unsigned char) ((0xff00 & buffer[2]) >> 8); cbuffer[8] = (unsigned char) ((0xff0000 & buffer[2]) >> 16); cbuffer[9] = (unsigned char) (0xff & buffer[3]); cbuffer[10] = (unsigned char) ((0xff00 & buffer[3]) >> 8); cbuffer[11] = (unsigned char) ((0xff0000 & buffer[3]) >> 16); cbuffer[12] = (unsigned char) (0xff & buffer[4]); cbuffer[13] = (unsigned char) ((0xff00 & buffer[4]) >> 8); cbuffer[14] = (unsigned char) ((0xff0000 & buffer[4]) >> 16); cbuffer[15] = (unsigned char) (0xff & buffer[5]); cbuffer[16] = (unsigned char) ((0xff00 & buffer[5]) >> 8); cbuffer[17] = (unsigned char) ((0xff0000 & buffer[5]) >> 16); cbuffer[18] = (unsigned char) (0xff & buffer[6]); cbuffer[19] = (unsigned char) ((0xff00 & buffer[6]) >> 8); cbuffer[20] = (unsigned char) ((0xff0000 & buffer[6]) >> 16); cbuffer[21] = (unsigned char) (0xff & buffer[7]); cbuffer[22] = (unsigned char) ((0xff00 & buffer[7]) >> 8); cbuffer[23] = (unsigned char) ((0xff0000 & buffer[7]) >> 16); buffer += 8; cbuffer += (3 * 8); } } for(; i < buffer_length; i++){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); cbuffer[1] = (unsigned char) ((0xff00 & buffer[0]) >> 8); cbuffer[2] = (unsigned char) ((0xff0000 & buffer[0]) >> 16); buffer++; cbuffer += 3; } return(cbuffer); } /** * ags_buffer_util_s32_to_char_buffer: * @buffer: the signed long buffer * @buffer_length: the buffer length * * Pack @buffer into an unsigned char buffer. * * Returns: the unsigned char buffer * * Since: 1.4.0 */ unsigned char* ags_buffer_util_s32_to_char_buffer(signed long *buffer, guint buffer_length) { unsigned char *cbuffer; guint limit; guint i; cbuffer = (unsigned char *) malloc((4 * buffer_length) * sizeof(unsigned char)); i = 0; if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); cbuffer[1] = (unsigned char) ((0xff00 & buffer[0]) >> 8); cbuffer[2] = (unsigned char) ((0xff0000 & buffer[0]) >> 16); cbuffer[3] = (unsigned char) ((0xff000000 & buffer[0]) >> 24); cbuffer[4] = (unsigned char) (0xff & buffer[1]); cbuffer[5] = (unsigned char) ((0xff00 & buffer[1]) >> 8); cbuffer[6] = (unsigned char) ((0xff0000 & buffer[1]) >> 16); cbuffer[7] = (unsigned char) ((0xff000000 & buffer[1]) >> 24); cbuffer[8] = (unsigned char) (0xff & buffer[2]); cbuffer[9] = (unsigned char) ((0xff00 & buffer[2]) >> 8); cbuffer[10] = (unsigned char) ((0xff0000 & buffer[2]) >> 16); cbuffer[11] = (unsigned char) ((0xff000000 & buffer[2]) >> 24); cbuffer[12] = (unsigned char) (0xff & buffer[3]); cbuffer[13] = (unsigned char) ((0xff00 & buffer[3]) >> 8); cbuffer[14] = (unsigned char) ((0xff0000 & buffer[3]) >> 16); cbuffer[15] = (unsigned char) ((0xff000000 & buffer[3]) >> 24); cbuffer[16] = (unsigned char) (0xff & buffer[4]); cbuffer[17] = (unsigned char) ((0xff00 & buffer[4]) >> 8); cbuffer[18] = (unsigned char) ((0xff0000 & buffer[4]) >> 16); cbuffer[19] = (unsigned char) ((0xff000000 & buffer[4]) >> 24); cbuffer[20] = (unsigned char) (0xff & buffer[5]); cbuffer[21] = (unsigned char) ((0xff00 & buffer[5]) >> 8); cbuffer[22] = (unsigned char) ((0xff0000 & buffer[5]) >> 16); cbuffer[23] = (unsigned char) ((0xff000000 & buffer[5]) >> 24); cbuffer[24] = (unsigned char) (0xff & buffer[6]); cbuffer[25] = (unsigned char) ((0xff00 & buffer[6]) >> 8); cbuffer[26] = (unsigned char) ((0xff0000 & buffer[6]) >> 16); cbuffer[27] = (unsigned char) ((0xff000000 & buffer[6]) >> 24); cbuffer[28] = (unsigned char) (0xff & buffer[7]); cbuffer[29] = (unsigned char) ((0xff00 & buffer[7]) >> 8); cbuffer[30] = (unsigned char) ((0xff0000 & buffer[7]) >> 16); cbuffer[31] = (unsigned char) ((0xff000000 & buffer[7]) >> 24); buffer += 8; cbuffer += (4 * 8); } } for(; i < buffer_length; i++){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); cbuffer[1] = (unsigned char) ((0xff00 & buffer[0]) >> 8); cbuffer[2] = (unsigned char) ((0xff0000 & buffer[0]) >> 16); cbuffer[3] = (unsigned char) ((0xff000000 & buffer[0]) >> 24); buffer++; cbuffer += 4; } return(cbuffer); } /** * ags_buffer_util_s64_to_char_buffer: * @buffer: the signed long long buffer * @buffer_length: the buffer length * * Pack @buffer into an unsigned char buffer. * * Returns: the unsigned char buffer * * Since: 1.4.0 */ unsigned char* ags_buffer_util_s64_to_char_buffer(signed long long *buffer, guint buffer_length) { unsigned char *cbuffer; guint limit; guint i; cbuffer = (unsigned char *) malloc((8 * buffer_length) * sizeof(unsigned char)); i = 0; if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); cbuffer[1] = (unsigned char) ((0xff00 & buffer[0]) >> 8); cbuffer[2] = (unsigned char) ((0xff0000 & buffer[0]) >> 16); cbuffer[3] = (unsigned char) ((0xff000000 & buffer[0]) >> 24); cbuffer[4] = (unsigned char) ((0xff00000000 & buffer[0]) >> 32); cbuffer[5] = (unsigned char) ((0xff0000000000 & buffer[0]) >> 40); cbuffer[6] = (unsigned char) ((0xff000000000000 & buffer[0]) >> 48); cbuffer[7] = (unsigned char) ((0xff00000000000000 & buffer[0]) >> 56); cbuffer[8] = (unsigned char) (0xff & buffer[1]); cbuffer[9] = (unsigned char) ((0xff00 & buffer[1]) >> 8); cbuffer[10] = (unsigned char) ((0xff0000 & buffer[1]) >> 16); cbuffer[11] = (unsigned char) ((0xff000000 & buffer[1]) >> 24); cbuffer[12] = (unsigned char) ((0xff00000000 & buffer[1]) >> 32); cbuffer[13] = (unsigned char) ((0xff0000000000 & buffer[1]) >> 40); cbuffer[14] = (unsigned char) ((0xff000000000000 & buffer[1]) >> 48); cbuffer[15] = (unsigned char) ((0xff00000000000000 & buffer[1]) >> 56); cbuffer[16] = (unsigned char) (0xff & buffer[2]); cbuffer[17] = (unsigned char) ((0xff00 & buffer[2]) >> 8); cbuffer[18] = (unsigned char) ((0xff0000 & buffer[2]) >> 16); cbuffer[19] = (unsigned char) ((0xff000000 & buffer[2]) >> 24); cbuffer[20] = (unsigned char) ((0xff00000000 & buffer[2]) >> 32); cbuffer[21] = (unsigned char) ((0xff0000000000 & buffer[2]) >> 40); cbuffer[22] = (unsigned char) ((0xff000000000000 & buffer[2]) >> 48); cbuffer[23] = (unsigned char) ((0xff00000000000000 & buffer[2]) >> 56); cbuffer[24] = (unsigned char) (0xff & buffer[3]); cbuffer[25] = (unsigned char) ((0xff00 & buffer[3]) >> 8); cbuffer[26] = (unsigned char) ((0xff0000 & buffer[3]) >> 16); cbuffer[27] = (unsigned char) ((0xff000000 & buffer[3]) >> 24); cbuffer[28] = (unsigned char) ((0xff00000000 & buffer[3]) >> 32); cbuffer[29] = (unsigned char) ((0xff0000000000 & buffer[3]) >> 40); cbuffer[30] = (unsigned char) ((0xff000000000000 & buffer[3]) >> 48); cbuffer[31] = (unsigned char) ((0xff00000000000000 & buffer[3]) >> 56); cbuffer[32] = (unsigned char) (0xff & buffer[4]); cbuffer[33] = (unsigned char) ((0xff00 & buffer[4]) >> 8); cbuffer[34] = (unsigned char) ((0xff0000 & buffer[4]) >> 16); cbuffer[35] = (unsigned char) ((0xff000000 & buffer[4]) >> 24); cbuffer[36] = (unsigned char) ((0xff00000000 & buffer[4]) >> 32); cbuffer[37] = (unsigned char) ((0xff0000000000 & buffer[4]) >> 40); cbuffer[38] = (unsigned char) ((0xff000000000000 & buffer[4]) >> 48); cbuffer[39] = (unsigned char) ((0xff00000000000000 & buffer[4]) >> 56); cbuffer[40] = (unsigned char) (0xff & buffer[5]); cbuffer[41] = (unsigned char) ((0xff00 & buffer[5]) >> 8); cbuffer[42] = (unsigned char) ((0xff0000 & buffer[5]) >> 16); cbuffer[43] = (unsigned char) ((0xff000000 & buffer[5]) >> 24); cbuffer[44] = (unsigned char) ((0xff00000000 & buffer[5]) >> 32); cbuffer[45] = (unsigned char) ((0xff0000000000 & buffer[5]) >> 40); cbuffer[46] = (unsigned char) ((0xff000000000000 & buffer[5]) >> 48); cbuffer[47] = (unsigned char) ((0xff00000000000000 & buffer[5]) >> 56); cbuffer[48] = (unsigned char) (0xff & buffer[6]); cbuffer[49] = (unsigned char) ((0xff00 & buffer[6]) >> 8); cbuffer[50] = (unsigned char) ((0xff0000 & buffer[6]) >> 16); cbuffer[51] = (unsigned char) ((0xff000000 & buffer[6]) >> 24); cbuffer[52] = (unsigned char) ((0xff00000000 & buffer[6]) >> 32); cbuffer[53] = (unsigned char) ((0xff0000000000 & buffer[6]) >> 40); cbuffer[54] = (unsigned char) ((0xff000000000000 & buffer[6]) >> 48); cbuffer[55] = (unsigned char) ((0xff00000000000000 & buffer[6]) >> 56); cbuffer[56] = (unsigned char) (0xff & buffer[7]); cbuffer[57] = (unsigned char) ((0xff00 & buffer[7]) >> 8); cbuffer[58] = (unsigned char) ((0xff0000 & buffer[7]) >> 16); cbuffer[59] = (unsigned char) ((0xff000000 & buffer[7]) >> 24); cbuffer[60] = (unsigned char) ((0xff00000000 & buffer[7]) >> 32); cbuffer[61] = (unsigned char) ((0xff0000000000 & buffer[7]) >> 40); cbuffer[62] = (unsigned char) ((0xff000000000000 & buffer[7]) >> 48); cbuffer[63] = (unsigned char) ((0xff00000000000000 & buffer[7]) >> 56); buffer += 8; cbuffer += (8 * 8); } } for(; i < buffer_length; i++){ cbuffer[0] = (unsigned char) (0xff & buffer[0]); cbuffer[1] = (unsigned char) ((0xff00 & buffer[0]) >> 8); cbuffer[2] = (unsigned char) ((0xff0000 & buffer[0]) >> 16); cbuffer[3] = (unsigned char) ((0xff000000 & buffer[0]) >> 24); cbuffer[4] = (unsigned char) ((0xff00000000 & buffer[0]) >> 32); cbuffer[5] = (unsigned char) ((0xff0000000000 & buffer[0]) >> 40); cbuffer[6] = (unsigned char) ((0xff000000000000 & buffer[0]) >> 48); cbuffer[7] = (unsigned char) ((0xff00000000000000 & buffer[0]) >> 56); buffer++; cbuffer += 8; } return(cbuffer); } /** * ags_buffer_util_char_buffer_to_s8: * @cbuffer: the unsigned char buffer * @buffer_size: the buffer size * * Unpack @cbuffer to a signed char buffer * * Returns: the signed char buffer * * Since: 1.4.0 */ signed char* ags_buffer_util_char_buffer_to_s8(unsigned char *cbuffer, guint buffer_size) { signed char *buffer; guint limit; guint i; buffer = (signed char *) malloc(buffer_size * sizeof(signed char)); memset(buffer, 0, buffer_size * sizeof(signed char)); i = 0; if(buffer_size > 8){ limit = buffer_size - 8; for(; i < limit; i += 8){ buffer[0] |= (0xff & cbuffer[0]); buffer[1] |= (0xff & cbuffer[1]); buffer[2] |= (0xff & cbuffer[2]); buffer[3] |= (0xff & cbuffer[3]); buffer[4] |= (0xff & cbuffer[4]); buffer[5] |= (0xff & cbuffer[5]); buffer[6] |= (0xff & cbuffer[6]); buffer[7] |= (0xff & cbuffer[7]); buffer += 8; cbuffer += 8; } } for(; i < buffer_size; i++){ buffer[0] |= (0xff & cbuffer[0]); buffer++; cbuffer++; } return(buffer); } /** * ags_buffer_util_char_buffer_to_s16: * @cbuffer: the unsigned char buffer * @buffer_size: the buffer size * * Unpack @cbuffer to a signed short buffer * * Returns: the signed short buffer * * Since: 1.4.0 */ signed short* ags_buffer_util_char_buffer_to_s16(unsigned char *cbuffer, guint buffer_size) { signed short *buffer; guint limit; guint i; buffer = (signed short *) malloc((buffer_size / 2) * sizeof(signed short)); memset(buffer, 0, (buffer_size / 2) * sizeof(signed short)); i = 0; if(buffer_size / 2 > 8){ limit = (buffer_size / 2) - 8; for(; i < limit; i += 8){ buffer[0] |= (0xff & cbuffer[0]); buffer[0] |= ((0xff & cbuffer[1]) << 8); buffer[1] |= (0xff & cbuffer[2]); buffer[1] |= ((0xff & cbuffer[3]) << 8); buffer[2] |= (0xff & cbuffer[4]); buffer[2] |= ((0xff & cbuffer[5]) << 8); buffer[3] |= (0xff & cbuffer[6]); buffer[3] |= ((0xff & cbuffer[7]) << 8); buffer[4] |= (0xff & cbuffer[8]); buffer[4] |= ((0xff & cbuffer[9]) << 8); buffer[5] |= (0xff & cbuffer[10]); buffer[5] |= ((0xff & cbuffer[11]) << 8); buffer[6] |= (0xff & cbuffer[12]); buffer[6] |= ((0xff & cbuffer[13]) << 8); buffer[7] |= (0xff & cbuffer[14]); buffer[7] |= ((0xff & cbuffer[15]) << 8); buffer += 8; cbuffer += (2 * 8); } } for(; i < buffer_size; i += 2){ buffer[0] |= (0xff & cbuffer[0]); buffer[0] |= ((0xff & cbuffer[1]) << 8); buffer++; cbuffer += 2; } return(buffer); } /** * ags_buffer_util_char_buffer_to_s24: * @cbuffer: the unsigned char buffer * @buffer_size: the buffer size * * Unpack @cbuffer to a signed long buffer * * Returns: the signed long buffer * * Since: 1.4.0 */ signed long* ags_buffer_util_char_buffer_to_s24(unsigned char *cbuffer, guint buffer_size) { signed long *buffer; guint limit; guint i; buffer = (signed long *) malloc((buffer_size / 3) * sizeof(signed long)); memset(buffer, 0, (buffer_size / 3) * sizeof(signed long)); i = 0; if(buffer_size / 3 > 8){ limit = (buffer_size / 3) - 8; for(; i < limit; i += 8){ buffer[0] |= (0xff & cbuffer[0]); buffer[0] |= ((0xff & cbuffer[1]) << 8); buffer[0] |= ((0xff & cbuffer[2]) << 16); buffer[1] |= (0xff & cbuffer[3]); buffer[1] |= ((0xff & cbuffer[4]) << 8); buffer[1] |= ((0xff & cbuffer[5]) << 16); buffer[2] |= (0xff & cbuffer[6]); buffer[2] |= ((0xff & cbuffer[7]) << 8); buffer[2] |= ((0xff & cbuffer[8]) << 16); buffer[3] |= (0xff & cbuffer[9]); buffer[3] |= ((0xff & cbuffer[10]) << 8); buffer[3] |= ((0xff & cbuffer[11]) << 16); buffer[4] |= (0xff & cbuffer[12]); buffer[4] |= ((0xff & cbuffer[13]) << 8); buffer[4] |= ((0xff & cbuffer[14]) << 16); buffer[5] |= (0xff & cbuffer[15]); buffer[5] |= ((0xff & cbuffer[16]) << 8); buffer[5] |= ((0xff & cbuffer[17]) << 16); buffer[6] |= (0xff & cbuffer[18]); buffer[6] |= ((0xff & cbuffer[19]) << 8); buffer[6] |= ((0xff & cbuffer[20]) << 16); buffer[7] |= (0xff & cbuffer[21]); buffer[7] |= ((0xff & cbuffer[22]) << 8); buffer[7] |= ((0xff & cbuffer[23]) << 16); buffer += 8; cbuffer += (3 * 8); } } for(; i < buffer_size; i += 3){ buffer[0] |= (0xff & cbuffer[0]); buffer[0] |= ((0xff & cbuffer[1]) << 8); buffer[0] |= ((0xff & cbuffer[2]) << 16); buffer++; cbuffer += 3; } return(buffer); } /** * ags_buffer_util_char_buffer_to_s32: * @cbuffer: the unsigned char buffer * @buffer_size: the buffer size * * Unpack @cbuffer to a signed long buffer * * Returns: the signed long buffer * * Since: 1.4.0 */ signed long* ags_buffer_util_char_buffer_to_s32(unsigned char *cbuffer, guint buffer_size) { signed long *buffer; guint limit; guint i; buffer = (signed long *) malloc((buffer_size / 4) * sizeof(signed long)); memset(buffer, 0, (buffer_size / 4) * sizeof(signed long)); i = 0; if((buffer_size / 4) > 8){ limit = (buffer_size / 4) - 8; for(; i < limit; i += 8){ buffer[0] |= (0xff & cbuffer[0]); buffer[0] |= ((0xff & cbuffer[1]) << 8); buffer[0] |= ((0xff & cbuffer[2]) << 16); buffer[0] |= ((0xff & cbuffer[3]) << 24); buffer[1] |= (0xff & cbuffer[4]); buffer[1] |= ((0xff & cbuffer[5]) << 8); buffer[1] |= ((0xff & cbuffer[6]) << 16); buffer[1] |= ((0xff & cbuffer[7]) << 24); buffer[2] |= (0xff & cbuffer[8]); buffer[2] |= ((0xff & cbuffer[9]) << 8); buffer[2] |= ((0xff & cbuffer[10]) << 16); buffer[2] |= ((0xff & cbuffer[11]) << 24); buffer[3] |= (0xff & cbuffer[12]); buffer[3] |= ((0xff & cbuffer[13]) << 8); buffer[3] |= ((0xff & cbuffer[14]) << 16); buffer[3] |= ((0xff & cbuffer[15]) << 24); buffer[4] |= (0xff & cbuffer[16]); buffer[4] |= ((0xff & cbuffer[17]) << 8); buffer[4] |= ((0xff & cbuffer[18]) << 16); buffer[4] |= ((0xff & cbuffer[19]) << 24); buffer[5] |= (0xff & cbuffer[20]); buffer[5] |= ((0xff & cbuffer[21]) << 8); buffer[5] |= ((0xff & cbuffer[22]) << 16); buffer[5] |= ((0xff & cbuffer[23]) << 24); buffer[6] |= (0xff & cbuffer[24]); buffer[6] |= ((0xff & cbuffer[25]) << 8); buffer[6] |= ((0xff & cbuffer[26]) << 16); buffer[6] |= ((0xff & cbuffer[27]) << 24); buffer[7] |= (0xff & cbuffer[28]); buffer[7] |= ((0xff & cbuffer[29]) << 8); buffer[7] |= ((0xff & cbuffer[30]) << 16); buffer[7] |= ((0xff & cbuffer[31]) << 24); buffer += 8; cbuffer += (4 * 8); } } for(; i < buffer_size; i += 4){ buffer[0] |= (0xff & cbuffer[0]); buffer[0] |= ((0xff & cbuffer[1]) << 8); buffer[0] |= ((0xff & cbuffer[2]) << 16); buffer[0] |= ((0xff & cbuffer[3]) << 24); buffer++; cbuffer += 4; } return(buffer); } /** * ags_buffer_util_char_buffer_to_s64: * @cbuffer: the unsigned char buffer * @buffer_size: the buffer size * * Unpack @cbuffer to a signed long long buffer * * Returns: the signed long long buffer * * Since: 1.4.0 */ signed long long* ags_buffer_util_char_buffer_to_s64(unsigned char *cbuffer, guint buffer_size) { signed long long *buffer; guint limit; guint i; buffer = (signed long long *) malloc((buffer_size / 8) * sizeof(signed long long)); memset(buffer, 0, (buffer_size / 8) * sizeof(signed long long)); i = 0; if(buffer_size / 8 > 8){ limit = (buffer_size / 8) - 8; for(; i < limit; i += 8){ buffer[0] |= (0xff & cbuffer[0]); buffer[0] |= ((0xff & cbuffer[1]) << 8); buffer[0] |= ((0xff & cbuffer[2]) << 16); buffer[0] |= ((0xff & cbuffer[3]) << 24); buffer[0] |= ((0xff & cbuffer[4]) << 32); buffer[0] |= ((0xff & cbuffer[5]) << 40); buffer[0] |= ((0xff & cbuffer[6]) << 48); buffer[0] |= ((0xff & cbuffer[7]) << 56); buffer[1] |= (0xff & cbuffer[8]); buffer[1] |= ((0xff & cbuffer[9]) << 8); buffer[1] |= ((0xff & cbuffer[10]) << 16); buffer[1] |= ((0xff & cbuffer[11]) << 24); buffer[1] |= ((0xff & cbuffer[12]) << 32); buffer[1] |= ((0xff & cbuffer[13]) << 40); buffer[1] |= ((0xff & cbuffer[14]) << 48); buffer[1] |= ((0xff & cbuffer[15]) << 56); buffer[2] |= (0xff & cbuffer[16]); buffer[2] |= ((0xff & cbuffer[17]) << 8); buffer[2] |= ((0xff & cbuffer[18]) << 16); buffer[2] |= ((0xff & cbuffer[19]) << 24); buffer[2] |= ((0xff & cbuffer[20]) << 32); buffer[2] |= ((0xff & cbuffer[21]) << 40); buffer[2] |= ((0xff & cbuffer[22]) << 48); buffer[2] |= ((0xff & cbuffer[23]) << 56); buffer[3] |= (0xff & cbuffer[24]); buffer[3] |= ((0xff & cbuffer[25]) << 8); buffer[3] |= ((0xff & cbuffer[26]) << 16); buffer[3] |= ((0xff & cbuffer[27]) << 24); buffer[3] |= ((0xff & cbuffer[28]) << 32); buffer[3] |= ((0xff & cbuffer[29]) << 40); buffer[3] |= ((0xff & cbuffer[30]) << 48); buffer[3] |= ((0xff & cbuffer[31]) << 56); buffer[4] |= (0xff & cbuffer[32]); buffer[4] |= ((0xff & cbuffer[33]) << 8); buffer[4] |= ((0xff & cbuffer[34]) << 16); buffer[4] |= ((0xff & cbuffer[35]) << 24); buffer[4] |= ((0xff & cbuffer[36]) << 32); buffer[4] |= ((0xff & cbuffer[37]) << 40); buffer[4] |= ((0xff & cbuffer[38]) << 48); buffer[4] |= ((0xff & cbuffer[39]) << 56); buffer[5] |= (0xff & cbuffer[40]); buffer[5] |= ((0xff & cbuffer[41]) << 8); buffer[5] |= ((0xff & cbuffer[42]) << 16); buffer[5] |= ((0xff & cbuffer[43]) << 24); buffer[5] |= ((0xff & cbuffer[44]) << 32); buffer[5] |= ((0xff & cbuffer[45]) << 40); buffer[5] |= ((0xff & cbuffer[46]) << 48); buffer[5] |= ((0xff & cbuffer[47]) << 56); buffer[6] |= (0xff & cbuffer[48]); buffer[6] |= ((0xff & cbuffer[49]) << 8); buffer[6] |= ((0xff & cbuffer[50]) << 16); buffer[6] |= ((0xff & cbuffer[51]) << 24); buffer[6] |= ((0xff & cbuffer[52]) << 32); buffer[6] |= ((0xff & cbuffer[53]) << 40); buffer[6] |= ((0xff & cbuffer[54]) << 48); buffer[6] |= ((0xff & cbuffer[55]) << 56); buffer[7] |= (0xff & cbuffer[56]); buffer[7] |= ((0xff & cbuffer[57]) << 8); buffer[7] |= ((0xff & cbuffer[58]) << 16); buffer[7] |= ((0xff & cbuffer[59]) << 24); buffer[7] |= ((0xff & cbuffer[60]) << 32); buffer[7] |= ((0xff & cbuffer[61]) << 40); buffer[7] |= ((0xff & cbuffer[62]) << 48); buffer[7] |= ((0xff & cbuffer[63]) << 56); buffer += 8; cbuffer += (8 * 8); } } for(; i < buffer_size; i += 8){ buffer[0] |= (0xff & cbuffer[0]); buffer[0] |= ((0xff & cbuffer[1]) << 8); buffer[0] |= ((0xff & cbuffer[2]) << 16); buffer[0] |= ((0xff & cbuffer[3]) << 24); buffer[0] |= ((0xff & cbuffer[4]) << 32); buffer[0] |= ((0xff & cbuffer[5]) << 40); buffer[0] |= ((0xff & cbuffer[6]) << 48); buffer[0] |= ((0xff & cbuffer[7]) << 56); buffer++; cbuffer += 8; } return(buffer); } gsequencer-1.4.24/ags/lib/ags_regex.c0000644000175000017500000000624613246707333014334 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #ifdef __APPLE__ #include #endif #define _GNU_SOURCE #include #include /** * SECTION:ags_regex * @short_description: coding-neutral regex * @title: AgsRegex * @section_id: * @include: ags/lib/ags_regex.h * * Wrapper around glibc regex functions to provide language coding-neutral * processing. */ static pthread_mutex_t locale_mutex = PTHREAD_MUTEX_INITIALIZER; #ifndef __APPLE__ static locale_t c_locale; #else static char *locale_env; #endif static gboolean locale_initialized = FALSE; /** * ags_regcomp: * @preg: pattern buffer storage area * @regex: regular expression as string * @cflags: flags * * Compile regular expression language independent. It sets temporaly * the locale to C and then reverts it. * * Since: 1.0.0 */ int ags_regcomp(regex_t *preg, const char *regex, int cflags) { int retval; #ifndef __APPLE__ locale_t current; #endif pthread_mutex_lock(&locale_mutex); if(!locale_initialized){ #ifndef __APPLE__ c_locale = newlocale(LC_ALL_MASK, "C", (locale_t) 0); #else locale_env = getenv("LC_ALL"); #endif locale_initialized = TRUE; } pthread_mutex_unlock(&locale_mutex); #ifndef __APPLE__ current = uselocale(c_locale); #else setlocale(LC_ALL, "C"); #endif retval = regcomp(preg, regex, cflags); #ifndef __APPLE__ uselocale(current); #else setlocale(LC_ALL, locale_env); #endif return(retval); } /** * ags_regexec: * @preg: pattern buffer storage area * @string: the string to match * @nmatch: match count * @pmatch: match array * @eflags: error flags * * Execute regular expression language independent. It sets temporaly * the locale to C and then reverts it. * * Since: 1.0.0 */ int ags_regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) { int retval; #ifndef __APPLE__ locale_t current; #endif pthread_mutex_lock(&locale_mutex); if(!locale_initialized){ #ifndef __APPLE__ c_locale = newlocale(LC_ALL_MASK, "C", (locale_t) 0); #else locale_env = getenv("LC_ALL"); #endif locale_initialized = TRUE; } pthread_mutex_unlock(&locale_mutex); #ifndef __APPLE__ current = uselocale(c_locale); #else setlocale(LC_ALL, "C"); #endif retval = regexec(preg, string, nmatch, pmatch, eflags); #ifndef __APPLE__ uselocale(current); #else setlocale(LC_ALL, locale_env); #endif return(retval); } gsequencer-1.4.24/ags/lib/ags_conversion.c0000644000175000017500000001646513256163135015410 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2016 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 . */ #include #include #include void ags_conversion_class_init(AgsConversionClass *conversion); void ags_conversion_init (AgsConversion *conversion); void ags_conversion_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_conversion_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_conversion_finalize(GObject *gobject); gdouble ags_conversion_real_convert(AgsConversion *conversion, gdouble value, gboolean reverse); /** * SECTION:ags_conversion * @short_description: abstract conversion * @title: AgsConversion * @section_id: * @include: ags/lib/ags_conversion.h * * AgsConversion does a zero conversion it returns * during ::convert() the very same value. */ enum{ CONVERT, LAST_SIGNAL, }; enum{ PROP_0, PROP_NAME, PROP_DESCRIPTION, }; static gpointer ags_conversion_parent_class = NULL; static guint conversion_signals[LAST_SIGNAL]; GType ags_conversion_get_type(void) { static GType ags_type_conversion = 0; if(!ags_type_conversion){ static const GTypeInfo ags_conversion_info = { sizeof (AgsConversionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_conversion_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsConversion), 0, /* n_preallocs */ (GInstanceInitFunc) ags_conversion_init, }; ags_type_conversion = g_type_register_static(G_TYPE_OBJECT, "AgsConversion", &ags_conversion_info, 0); } return (ags_type_conversion); } void ags_conversion_class_init(AgsConversionClass *conversion) { GObjectClass *gobject; GParamSpec *param_spec; ags_conversion_parent_class = g_type_class_peek_parent(conversion); /* GObjectClass */ gobject = (GObjectClass *) conversion; gobject->set_property = ags_conversion_set_property; gobject->get_property = ags_conversion_get_property; gobject->finalize = ags_conversion_finalize; /* properties */ /** * AgsConversion:name: * * The name of the conversion. * * Since: 1.0.0 */ param_spec = g_param_spec_string("name", i18n_pspec("name of conversion"), i18n_pspec("The name of the conversion"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NAME, param_spec); /** * AgsConversion:description: * * The description of the conversion. * * Since: 1.0.0 */ param_spec = g_param_spec_string("description", i18n_pspec("description of conversion"), i18n_pspec("The description of the conversion"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DESCRIPTION, param_spec); /* AgsConversionClass */ conversion->convert = ags_conversion_real_convert; /* signals */ /** * AgsConversion::convert: * @conversion: the #AgsConversion to modify * @value: the value to convert * @reverse: the direction to translate * * The ::convert signal notifies about converted value. * * Returns: the converted value * * Since: 1.0.0 */ conversion_signals[CONVERT] = g_signal_new("convert", G_TYPE_FROM_CLASS(conversion), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsConversionClass, convert), NULL, NULL, g_cclosure_user_marshal_DOUBLE__DOUBLE_BOOLEAN, G_TYPE_DOUBLE, 2, G_TYPE_DOUBLE, G_TYPE_BOOLEAN); } void ags_conversion_init(AgsConversion *conversion) { conversion->name = NULL; conversion->description = NULL; } void ags_conversion_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsConversion *conversion; conversion = AGS_CONVERSION(gobject); switch(prop_id){ case PROP_NAME: { gchar *name; name = (gchar *) g_value_get_string(value); if(conversion->name == name){ return; } if(conversion->name != NULL){ g_free(conversion->name); } conversion->name = g_strdup(name); } break; case PROP_DESCRIPTION: { gchar *description; description = (gchar *) g_value_get_string(value); if(conversion->description == description){ return; } if(conversion->description != NULL){ g_free(conversion->description); } conversion->description = g_strdup(description); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_conversion_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsConversion *conversion; conversion = AGS_CONVERSION(gobject); switch(prop_id){ case PROP_NAME: g_value_set_string(value, conversion->name); break; case PROP_DESCRIPTION: g_value_set_string(value, conversion->description); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_conversion_finalize(GObject *gobject) { AgsConversion *conversion; conversion = AGS_CONVERSION(gobject); if(conversion->name != NULL){ g_free(conversion->name); } if(conversion->description != NULL){ g_free(conversion->description); } /* call parent */ G_OBJECT_CLASS(ags_conversion_parent_class)->finalize(gobject); } gdouble ags_conversion_real_convert(AgsConversion *conversion, gdouble value, gboolean reverse) { return(value); } /** * ags_conversion_convert: * @conversion: the #AgsConversion * @value: the value to convert * @reverse: the direction to convert * * Convert a value if @reverse is %FALSE then use the target format * otherwise if %TRUE convert back to original format. * * Returns: the converted value as gdouble * * Since: 1.0.0 */ gdouble ags_conversion_convert(AgsConversion *conversion, gdouble value, gboolean reverse) { gdouble retval; g_return_val_if_fail(AGS_IS_CONVERSION(conversion), value); g_object_ref((GObject *) conversion); g_signal_emit(G_OBJECT(conversion), conversion_signals[CONVERT], 0, value, reverse, &retval); g_object_unref((GObject *) conversion); return(retval); } /** * ags_conversion_new: * * Instantiate a new #AgsConversion. * * Returns: the new instance * * Since: 1.0.0 */ AgsConversion* ags_conversion_new() { AgsConversion *conversion; conversion = g_object_new(AGS_TYPE_CONVERSION, NULL); return(conversion); } gsequencer-1.4.24/ags/lib/ags_time.h0000644000175000017500000000226013246707333014155 00000000000000/* 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 . */ #ifndef __AGS_TIME__ #define __AGS_TIME__ #include #include #define AGS_TIME_ZERO "0000:00.000\0" #define USEC_PER_SEC (1000000) /* The number of msecs per sec. */ #define NSEC_PER_SEC (1000000000) /* The number of nsecs per sec. */ gchar* ags_time_get_uptime_from_offset(guint offset, gdouble bpm, gdouble delay, gdouble delay_factor); #endif /*__AGS_TIME__*/ gsequencer-1.4.24/ags/lib/ags_function.c0000644000175000017500000005617413247044247015053 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2016 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 . */ #include #include #include #include void ags_function_class_init(AgsFunctionClass *function); void ags_function_init (AgsFunction *function); void ags_function_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_function_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_function_finalize(GObject *gobject); /** * SECTION:ags_function * @short_description: Function to translate values * @title: AgsFunction * @section_id: * @include: ags/lib/ags_function.h * * The #AgsFunction translates values from linear math to a given * function. */ #define AGS_FUNCTION_EXPONENT_PATTERN "^((exp\\()(([0-9]|" \ AGS_SYMBOLIC_EULER "|" \ AGS_SYMBOLIC_PI "|" \ AGS_SYMBOLIC_INFINIT "|" \ AGS_SYMBOLIC_COMPLEX_UNIT ")+)(\\)))" #define ags_function_print_sin(term) (g_strdup_printf("1 / 2 * %s * exp(- %s * (%s) * log(%s)) - 1 / 2 * %s * exp(%s * (%s) * log(%s))", \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_EULER, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_EULER)) #define ags_function_print_cos(term) (g_strdup_printf("(%s * exp(- %s * (%s) * log(%s))) / 2 + (%s * exp(%s * (%s) * log(%s))) / 2", \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_EULER, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_EULER)) #define ags_function_print_tan(term) (g_strdup_printf("(%s * (exp(- %s * (%s) * log(%s)) - exp(%s * (%s) * log(%s)))) / (exp(- %s * (%s) * log(%s)) + exp(%s * (%s) * log(%s)))", \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_EULER, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_EULER, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_EULER, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_EULER)) #define ags_function_print_asin(term) (g_strdup_printf("(-%s * (log(exp(0.5 * log(1 - exp(2 * (%s)))) + %s * (%s))))", \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term)) #define ags_function_print_acos(term) (g_strdup_printf("(%s / 2 + %s * log(exp(0.5 * log(1 - exp(2 * (%s)))) + %s * (%s))))", \ AGS_SYMBOLIC_PI, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term)) #define ags_function_print_atan(term) (g_strdup_printf("(0.5 * %s * log(1 - %s * %s) - 0.5 * %s * log(1 + %s * %s))", \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ AGS_SYMBOLIC_COMPLEX_UNIT, \ term)) enum{ PROP_0, PROP_SOURCE_FUNCTION, PROP_NORMALIZED_FUNCTION, PROP_PIVOT_TABLE, PROP_FUNCTION_VECTOR_TABLE, PROP_SOLVER_LEVEL, }; static gpointer ags_function_parent_class = NULL; static pthread_mutex_t regex_mutex = PTHREAD_MUTEX_INITIALIZER; GType ags_function_get_type(void) { static GType ags_type_function = 0; if(!ags_type_function){ static const GTypeInfo ags_function_info = { sizeof (AgsFunctionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_function_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFunction), 0, /* n_preallocs */ (GInstanceInitFunc) ags_function_init, }; ags_type_function = g_type_register_static(AGS_TYPE_CONVERSION, "AgsFunction", &ags_function_info, 0); } return (ags_type_function); } void ags_function_class_init(AgsFunctionClass *function) { GObjectClass *gobject; GParamSpec *param_spec; ags_function_parent_class = g_type_class_peek_parent(function); /* GObjectClass */ gobject = (GObjectClass *) function; gobject->set_property = ags_function_set_property; gobject->get_property = ags_function_get_property; gobject->finalize = ags_function_finalize; /* properties */ /** * AgsFunction:source-function: * * The source function. * * Since: 1.0.0 */ param_spec = g_param_spec_string("source-function", i18n_pspec("function as string"), i18n_pspec("The function to use to translate values"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOURCE_FUNCTION, param_spec); /** * AgsFunction:normalized-function: * * The normalized function. * * Since: 1.0.0 */ param_spec = g_param_spec_string("normalized-function", i18n_pspec("normalized form of function as string"), i18n_pspec("The normalized form of function to use to translate values"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NORMALIZED_FUNCTION, param_spec); /** * AgsFunction:pivot-table: * * The pivot table. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("pivot-table", i18n_pspec("pivot table representation"), i18n_pspec("The original pivot table representation"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PIVOT_TABLE, param_spec); } void ags_function_init(AgsFunction *function) { function->flags = 0; function->is_pushing = TRUE; function->equation = NULL; function->transformed_equation = NULL; function->equation_count = 0; function->source_function = NULL; function->normalized_function = NULL; function->symbol = NULL; function->symbol_count = 0; function->solver_matrix = NULL; function->pivot_table_count = 0; function->column_count = NULL; function->row_count = NULL; function->pivot_table = NULL; function->solver_level = 0; function->solver_vector = NULL; } void ags_function_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsFunction *function; function = AGS_FUNCTION(gobject); switch(prop_id){ case PROP_SOURCE_FUNCTION: { gchar *source_function; source_function = (gchar *) g_value_get_string(value); if(function->source_function == source_function){ return; } if(function->source_function != NULL){ g_free(function->source_function); } function->source_function = g_strdup(source_function); } break; case PROP_NORMALIZED_FUNCTION: { gchar *normalized_function; normalized_function = (gchar *) g_value_get_string(value); if(function->normalized_function == normalized_function){ return; } if(function->normalized_function != NULL){ g_free(function->normalized_function); } function->normalized_function = g_strdup(normalized_function); } break; case PROP_PIVOT_TABLE: { AgsComplex ***pivot_table; pivot_table = (AgsComplex ***) g_value_get_pointer(value); if(pivot_table == function->pivot_table){ return; } function->pivot_table = pivot_table; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_function_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsFunction *function; function = AGS_FUNCTION(gobject); switch(prop_id){ case PROP_SOURCE_FUNCTION: g_value_set_string(value, function->source_function); break; case PROP_NORMALIZED_FUNCTION: g_value_set_string(value, function->normalized_function); break; case PROP_PIVOT_TABLE: g_value_set_pointer(value, function->pivot_table); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_function_finalize(GObject *gobject) { AgsFunction *function; guint i, j, k; function = AGS_FUNCTION(gobject); if(function->equation != NULL){ for(i = 0; i < function->equation_count; i++){ free(function->equation[i]); } free(function->equation); } if(function->source_function != NULL){ free(function->source_function); } if(function->normalized_function != NULL){ free(function->normalized_function); } if(function->symbol != NULL){ for(i = 0; i < function->symbol_count; i++){ free(function->symbol[i]); } free(function->symbol); } if(function->pivot_table != NULL){ for(i = 0; i < function->pivot_table_count; i++){ for(j = 0; j < function->row_count[i]; j++){ for(k = 0; k < function->column_count[i]; k++){ ags_complex_free(function->pivot_table[i][j][k]); } free(function->pivot_table[i][j]); } free(function->pivot_table[i]); } free(function->pivot_table); } /* call parent */ G_OBJECT_CLASS(ags_function_parent_class)->finalize(gobject); } /** * ags_function_collapse_parantheses: * @function: the @AgsFunction * @function_count: return location of count of possible functions * * Collapse parantheses by respecting many possibilities. * * Returns: the one-dimensional array of possible functions as strings * * Since: 1.2.0 */ gchar** ags_function_collapse_parantheses(AgsFunction *function, guint *function_count) { gchar **functions; functions = NULL; //TODO:JK: implement me return(functions); } /** * ags_function_find_literals: * @function: The #AgsFunction * @symbol_count: return location of symbols count * * Find literal symbols i.e. variable names. * * Returns: The string vector containing symbols * * Since: 1.0.0 */ gchar** ags_function_find_literals(AgsFunction *function, guint *symbol_count) { regmatch_t match_arr[1]; gchar **literals; gchar *str; guint n_literals; static gboolean regex_compiled = FALSE; static regex_t literal_regex; static const char *literal_pattern = "^((?!log|exp|sin|cos|tan|asin|acos|atan)([a-zA-Z][0-9]*))"; static const size_t max_matches = 1; literals = NULL; n_literals = 0; /* compile regex */ pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; regcomp(&literal_regex, literal_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); /* find literals */ str = function->source_function; while(str != NULL && *str != '\0'){ if(regexec(&literal_regex, str, max_matches, match_arr, 0) == 0){ if(literals == NULL){ literals = (gchar **) malloc((n_literals + 1) * sizeof(gchar *)); literals[n_literals] = g_strndup(str, match_arr[0].rm_eo - match_arr[0].rm_so); n_literals++; }else{ gchar *current_literal; current_literal = g_strndup(str, match_arr[0].rm_eo - match_arr[0].rm_so); if(!g_strv_contains(literals, current_literal)){ literals = (gchar **) realloc(literals, (n_literals + 1) * sizeof(gchar *)); literals[n_literals] = current_literal; n_literals++; }else{ g_free(current_literal); } } if(str[match_arr[0].rm_eo - match_arr[0].rm_so] != '\0'){ str += (match_arr[0].rm_eo - match_arr[0].rm_so); }else{ break; } }else{ break; } } /* return symbols and its count*/ if(symbol_count != NULL){ *symbol_count = n_literals; } return(literals); } /** * ags_function_literal_solve: * @function: the #AgsFunction * * Solves :source-function literally, allocates the pivot table and * creates the normalized function. * * Since: 1.0.0 */ void ags_function_literal_solve(AgsFunction *function) { gchar *transformed_function; gchar *normalized_function; gchar *str; guint max_exponent, available_exponent; guint i, j; auto gchar* ags_function_literal_solve_expand_functions(gchar *transformed_function); auto gchar* ags_function_literal_solve_numeric_exponent_only(gchar *transformed_function); auto guint ags_function_literal_solve_find_max_exponent(gchar *transformed_function); gchar* ags_function_literal_solve_expand_functions(gchar *transformed_function){ regmatch_t match_arr[1]; gchar *expanded_functions; gchar *offset, *close_offset; gchar *str; gchar *open_paranthesis, *close_paranthesis, *tmp_paranthesis; int regexec_result; static gboolean regex_compiled = FALSE; static regex_t function_regex; static const char *function_pattern = "^(sin|cos|tan|asin|acos|atan)"; static const size_t max_matches = 1; /* compile regex */ pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; regcomp(&function_regex, function_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); /* */ expanded_functions = NULL; str = offset = g_strdup(transformed_function); close_offset = NULL; regexec_result = 0; while(regexec_result != REG_NOMATCH){ if((regexec_result = regexec(&function_regex, offset, max_matches, match_arr, 0)) == 0){ if(close_offset == NULL || close_offset > match_arr[0].rm_so){ offset = (gchar *) match_arr[0].rm_so; /* find close paranthesis */ open_paranthesis = offset; while((open_paranthesis = strchr(open_paranthesis, '(')) != NULL && close_paranthesis == NULL){ close_paranthesis = strchr(open_paranthesis, ')'); tmp_paranthesis = strchr(open_paranthesis, '('); if(tmp_paranthesis < close_paranthesis){ close_paranthesis = NULL; } } close_offset = close_paranthesis; }else{ if(close_offset != NULL){ if(!g_strcmp0(offset, "sin")){ }else if(!g_strcmp0(offset, "cos")){ }else if(!g_strcmp0(offset, "tan")){ }else if(!g_strcmp0(offset, "asin")){ }else if(!g_strcmp0(offset, "acos")){ }else if(!g_strcmp0(offset, "atan")){ } }else{ //NOTE:JK: you should report paranthesis mismatch break; } } } } return(expanded_functions); } gchar* ags_function_literal_solve_numeric_exponent_only(gchar *transformed_function){ gchar *numeric_exponent_only; guint n_terms; numeric_exponent_only = NULL; return(numeric_exponent_only); } guint ags_function_literal_solve_find_max_exponent(gchar *transformed_function){ regmatch_t match_arr[5]; static gboolean regex_compiled = FALSE; static regex_t exponent_regex; static const char *exponent_pattern = AGS_FUNCTION_EXPONENT_PATTERN; static const size_t max_matches = 5; max_exponent = 1; return(max_exponent); } normalized_function = NULL; /* compute dimensions */ transformed_function = g_strdup(function->source_function); max_exponent = function->symbol_count; /* step #0 of normalization - eliminate trigonometric functions */ str = transformed_function; transformed_function = ags_function_literal_solve_expand_functions(transformed_function); g_free(str); /* step #1 of normalization - numeric only exponents */ str = transformed_function; transformed_function = ags_function_literal_solve_numeric_exponent_only(transformed_function); g_free(str); /* find maximum exponent */ available_exponent = ags_function_literal_solve_find_max_exponent(transformed_function); if(max_exponent < available_exponent){ max_exponent = available_exponent; } //TODO:JK: implement me /* parse and merge terms */ //TODO:JK: implement me function->normalized_function = normalized_function; } /** * ags_function_push_equation: * @function: the #AgsFunction * @equation: an equation as string * * Push an equation to the solver stack. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_function_push_equation(AgsFunction *function, gchar *equation) { gchar *str; guint i; if(!AGS_IS_FUNCTION(function)){ return(FALSE); } i = function->equation_count; if(function->equation_count == 0){ function->equation = (gchar **) malloc(sizeof(gchar*)); function->transformed_equation = (gchar **) malloc(sizeof(gchar*)); }else{ function->equation = (gchar **) realloc(function->equation, (i + 1) * sizeof(gchar*)); function->transformed_equation = (gchar **) realloc(function->equation, (i + 1) * sizeof(gchar*)); } /* assume normalized else use right side as term - use subtraction */ if((str = strchr(equation, '=')) == NULL){ function->equation[i] = g_strdup(equation); }else{ gchar *offset; guint num_bytes; guint tmp0, tmp1; tmp0 = num_bytes = strlen(equation); num_bytes += 5; function->equation[i] = (gchar *) malloc(sizeof(gchar)); function->equation[i][num_bytes - 1] = '\0'; offset = function->equation[i]; *offset = '('; offset++; tmp1 = (str - equation); memcpy(offset, equation, tmp1 * sizeof(gchar)); offset += tmp1; *offset = ')'; offset++; *offset = '-'; offset++; *offset = '('; offset++; tmp0 = tmp0 - tmp1 - 1; memcpy(offset, equation + tmp1 + 1, tmp0 * sizeof(gchar)); *offset = ')'; offset++; } function->transformed_equation[i] = NULL; function->equation_count += 1; return(TRUE); } /** * ags_function_pop_equation: * @function: the #AgsFunction * @error: a #GError * * Pops the functions of the equation stack. Call this function as you're * finished with pushing equations. * * Since: 1.0.0 */ void ags_function_pop_equation(AgsFunction *function, GError **error) { guint length; guint i; if(!AGS_IS_FUNCTION(function)){ return; } /* retrieve of all equations string length */ length = 0; for(i = 0; i < function->equation_count; i++){ length += strlen(function->equation[i]); } /* allocate source function and memcpy equations - use addition */ if(function->equation_count > 0){ if(function->equation_count > 1){ length += (function->equation_count * 2) + (function->equation_count - 1) + 1; }else{ length += 1; } function->source_function = (gchar *) malloc(length * sizeof(gchar)); function->source_function[length - 1] = '\0'; if(function->equation_count > 1){ gchar *offset; guint num_bytes; offset = function->source_function; for(i = 0; i < function->equation_count; i++){ if(i != 0){ *offset = '+'; offset++; } *offset = '('; offset++; num_bytes = strlen(function->equation[i]); memcpy(offset, function->equation[i], num_bytes * sizeof(gchar)); offset += num_bytes; *offset = ')'; offset++; } }else{ memcpy(function->source_function, function->equation[0], strlen(function->equation[0]) * sizeof(gchar)); } }else{ function->source_function = NULL; return; } /* find literals and literal solve */ function->symbol = ags_function_find_literals(function, &(function->symbol_count)); ags_function_literal_solve(function); function->is_pushing = FALSE; } /** * ags_function_get_expanded: * @function: the #AgsFunction * @symbol: the symbols to compute * @symbol_count: the count of symbols * * Expands @symbols to normalized form. * * Returns: the normalized form as string * * Since: 1.0.0 */ gchar* ags_function_get_expanded(AgsFunction *function, gchar **symbol, guint symbol_count) { //TODO:JK: implement me return(NULL); } /** * ags_funciton_get_normalized: * @function: the #AgsFunction * * Get internal normalized string. * * Returns: the normalized string * * Since: 1.0.0 */ gchar* ags_funciton_get_normalized(AgsFunction *function) { if(!AGS_IS_FUNCTION(function)){ return(NULL); } return(function->normalized_function); } /** * ags_function_compute_term: * @term: the term as string to compute * @substitute_symbol: a variable to substitute * @substitute_value: the #AgsComplex value representing @substitute_symbol * * Compute term by substituting @substitute_symbol with @substitue_value and do basic * solving. * * Returns: the #AgsComplex value resulted by substitution * * Since: 1.0.0 */ AgsComplex* ags_function_compute_term(gchar *term, gchar *substitute_symbol, AgsComplex *substitute_value) { AgsComplex *complex_value; complex_value = ags_complex_alloc(); //TODO:JK: implement me return(complex_value); } /** * ags_function_symbolic_translate_value: * @function: the #AgsFunction * @symbol: the symbol to translate * @value: the value to substitute * * Symbolic translate to @value for @symbol and compute resulting * vector. * * Returns: the new #AgsComplex vector * * Since: 1.0.0 */ AgsComplex** ags_function_symbolic_translate_value(AgsFunction *function, gchar *symbol, AgsComplex *value) { //TODO:JK: implement me return(NULL); } /** * ags_function_substitute_values: * @function: the #AgsFunction * @symbol: the first symbol as string, or %NULL if no more symbol and value pair. * @...: %NULL terminated symbol and value pairs of list. * * Verify :source-function to be %TRUE or %FALSE by substitution. * * Returns: %TRUE if function evaluates, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_function_substitute_values(AgsFunction *function, gchar *symbol, ...) { //TODO:JK: implement me return(TRUE); } /** * ags_function_translate_value: * @function: the #AgsFunction * @value: the #AgsComplex value to translate * * Translates @value by source function. * * Returns: the solution as #AgsComplex boxed-type. * * Since: 1.0.0 */ AgsComplex* ags_function_translate_value(AgsFunction *function, AgsComplex *value) { AgsComplex *retval; retval = NULL; //TODO:JK: implement me return(retval); } /** * ags_function_new: * @source_function: the source function * * Instantiate a new #AgsFunction. * * Returns: the new instance * * Since: 1.0.0 */ AgsFunction* ags_function_new(gchar *source_function) { AgsFunction *function; function = g_object_new(AGS_TYPE_FUNCTION, "source-function", source_function, NULL); return(function); } gsequencer-1.4.24/ags/lib/ags_turtle_manager.c0000644000175000017500000001210413246707333016221 00000000000000/* 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 . */ #include #include void ags_turtle_manager_class_init(AgsTurtleManagerClass *turtle_manager); void ags_turtle_manager_init (AgsTurtleManager *turtle_manager); void ags_turtle_manager_dispose(GObject *gobject); void ags_turtle_manager_finalize(GObject *gobject); /** * SECTION:ags_turtle_manager * @short_description: Singleton pattern to organize turtles * @title: AgsTurtleManager * @section_id: * @include: ags/lib/ags_turtle_manager.h * * The #AgsTurtleManager keeps track of your turtles. */ static gpointer ags_turtle_manager_parent_class = NULL; AgsTurtleManager *ags_turtle_manager = NULL; GType ags_turtle_manager_get_type (void) { static GType ags_type_turtle_manager = 0; if(!ags_type_turtle_manager){ static const GTypeInfo ags_turtle_manager_info = { sizeof (AgsTurtleManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_turtle_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTurtleManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_turtle_manager_init, }; ags_type_turtle_manager = g_type_register_static(G_TYPE_OBJECT, "AgsTurtleManager", &ags_turtle_manager_info, 0); } return (ags_type_turtle_manager); } void ags_turtle_manager_class_init(AgsTurtleManagerClass *turtle_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_turtle_manager_parent_class = g_type_class_peek_parent(turtle_manager); /* GObjectClass */ gobject = (GObjectClass *) turtle_manager; gobject->dispose = ags_turtle_manager_dispose; gobject->finalize = ags_turtle_manager_finalize; } void ags_turtle_manager_init(AgsTurtleManager *turtle_manager) { turtle_manager->turtle = NULL; } void ags_turtle_manager_dispose(GObject *gobject) { AgsTurtleManager *turtle_manager; GList *turtle; turtle_manager = AGS_TURTLE_MANAGER(gobject); turtle = turtle_manager->turtle; turtle_manager->turtle = NULL; g_list_free_full(turtle, g_object_unref); /* call parent */ G_OBJECT_CLASS(ags_turtle_manager_parent_class)->dispose(gobject); } void ags_turtle_manager_finalize(GObject *gobject) { AgsTurtleManager *turtle_manager; GList *turtle; turtle_manager = AGS_TURTLE_MANAGER(gobject); turtle = turtle_manager->turtle; if(turtle != NULL){ g_list_free_full(turtle, g_object_unref); } if(turtle_manager == ags_turtle_manager){ ags_turtle_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_turtle_manager_parent_class)->finalize(gobject); } /** * ags_turtle_manager_find: * @turtle_manager: the #AgsTurtleManager * @filename: the filename as string * * Find @filename in @turtle_manager. * * Since: 1.0.0 */ GObject* ags_turtle_manager_find(AgsTurtleManager *turtle_manager, gchar *filename) { GList *turtle; turtle = turtle_manager->turtle; while(turtle != NULL){ if(!g_ascii_strcasecmp(AGS_TURTLE(turtle->data)->filename, filename)){ return(turtle->data); } turtle = turtle->next; } return(NULL); } /** * ags_turtle_manager_add: * @turtle_manager: the #AgsTurtleManager * @turtle: the #AgsTurtle * * Adds @turtle to @turtle_manager. * * Since: 1.0.0 */ void ags_turtle_manager_add(AgsTurtleManager *turtle_manager, GObject *turtle) { if(turtle_manager == NULL || turtle == NULL){ return; } turtle_manager->turtle = g_list_prepend(turtle_manager->turtle, turtle); } /** * ags_turtle_manager_get_instance: * * Get instance of #AgsTurtleManager. * * Returns: the #AgsTurtleManager * * Since: 1.0.0 */ AgsTurtleManager* ags_turtle_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&(mutex)); if(ags_turtle_manager == NULL){ ags_turtle_manager = ags_turtle_manager_new(); pthread_mutex_unlock(&(mutex)); }else{ pthread_mutex_unlock(&(mutex)); } return(ags_turtle_manager); } /** * ags_turtle_manager_new: * * Creates an #AgsTurtleManager * * Returns: a new #AgsTurtleManager * * Since: 1.0.0 */ AgsTurtleManager* ags_turtle_manager_new() { AgsTurtleManager *turtle_manager; turtle_manager = (AgsTurtleManager *) g_object_new(AGS_TYPE_TURTLE_MANAGER, NULL); return(turtle_manager); } gsequencer-1.4.24/ags/lib/ags_conversion.h0000644000175000017500000000401313246707333015402 00000000000000/* 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 . */ #ifndef __AGS_CONVERSION_H__ #define __AGS_CONVERSION_H__ #include #include #define AGS_TYPE_CONVERSION (ags_conversion_get_type()) #define AGS_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONVERSION, AgsConversion)) #define AGS_CONVERSION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CONVERSION, AgsConversionClass)) #define AGS_IS_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CONVERSION)) #define AGS_IS_CONVERSION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CONVERSION)) #define AGS_CONVERSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_CONVERSION, AgsConversionClass)) typedef struct _AgsConversion AgsConversion; typedef struct _AgsConversionClass AgsConversionClass; struct _AgsConversion { GObject gobject; gchar *name; gchar *description; }; struct _AgsConversionClass { GObjectClass gobject; gdouble (*convert)(AgsConversion *conversion, gdouble value, gboolean reverse); }; GType ags_conversion_get_type(void); gdouble ags_conversion_convert(AgsConversion *conversion, gdouble value, gboolean reverse); AgsConversion* ags_conversion_new(); #endif /*__AGS_CONVERSION_H__*/ gsequencer-1.4.24/ags/lib/ags_parameter.h0000644000175000017500000000210213247044247015171 00000000000000/* 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 . */ #ifndef __AGS_PARAMETER_H__ #define __AGS_PARAMETER_H__ #include #include GParameter* ags_parameter_grow(GType object_type, GParameter *params, guint *n_params, ...); GValue* ags_parameter_find(GParameter *params, guint n_params, gchar *name); #endif /*__AGS_PARAMETER_H__*/ gsequencer-1.4.24/ags/lib/ags_regex.h0000644000175000017500000000212113246707333014325 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REGEX_H__ #define __AGS_REGEX_H__ #include #include #include #include int ags_regcomp(regex_t *preg, const char *regex, int cflags); int ags_regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); #endif /*__AGS_REGEX_H__*/ gsequencer-1.4.24/ags/lib/ags_complex.h0000644000175000017500000000235513256163135014670 00000000000000/* 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 . */ #ifndef __AGS_COMPLEX__ #define __AGS_COMPLEX__ #include #include #include #define AGS_TYPE_COMPLEX (ags_complex_get_type()) typedef long double AgsComplex[2]; GType ags_complex_get_type(void); AgsComplex* ags_complex_alloc(); gpointer ags_complex_copy(AgsComplex *ptr); void ags_complex_free(AgsComplex *ptr); complex ags_complex_get(AgsComplex *ptr); void ags_complex_set(AgsComplex *ptr, complex z); #endif /*__AGS_COMPLEX__*/ gsequencer-1.4.24/ags/lib/ags_string_util.c0000644000175000017500000000610413246707333015556 00000000000000/* 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 . */ #include #include #include /** * SECTION:ags_string_util * @short_description: string util * @title: AgsStringUtil * @section_id: * @include: ags/lib/ags_string_util.h * * Common string utility functions. */ /** * ags_string_util_escape_single_quote: * @str: the string to escape * * Escape all occurence of single quotes. * * Returns: the newly allocated string * * Since: 1.0.0 */ gchar* ags_string_util_escape_single_quote(gchar *str) { gchar *retval; gchar *iter, *prev; guint count; guint n_chars; guint offset; iter = str; count = 0; while((iter = index(iter, '\'')) != NULL){ count++; iter++; } if(count > 0){ n_chars = strlen(str); retval = (gchar *) malloc((n_chars + (5 * count) + 1) * sizeof(gchar)); retval[n_chars + (5 * count)] = '\0'; iter = str; prev = str; offset = 0; while((iter = index(iter, '\'')) != NULL){ memcpy(&(retval[offset]), prev, (iter - prev) * sizeof(char)); retval[offset + (iter - prev)] = '&'; retval[offset + (iter - prev + 1)] = 'a'; retval[offset + (iter - prev + 2)] = 'p'; retval[offset + (iter - prev + 3)] = 'o'; retval[offset + (iter - prev + 4)] = 's'; retval[offset + (iter - prev + 5)] = ';'; offset += (iter - prev + 6); iter++; prev = iter; } memcpy(&(retval[offset]), prev, (index(str, '\0') - prev) * sizeof(char)); }else{ retval = g_strdup(str); } return(retval); } /** * ags_strv_length: * @str_array: the string vector * * Count the number of non-%NULL entries in the array. * * Returns: the length of the vector * * Since: 1.0.0 */ guint ags_strv_length(gchar **str_array) { guint i; if(str_array == NULL){ return(0); } for(i = 0; *str_array != NULL; i++, str_array++); return(i); } /** * ags_strv_contains: * @str_array: the string vector * @str: the string to match * * Check occurence of @str within @str_array * * Returns: %TRUE if found, else %FALSE * * Since: 1.0.0 */ gboolean ags_strv_contains(gchar **str_array, gchar *str) { guint i; if(str_array == NULL){ return(FALSE); } for(i = 0; *str_array != NULL; i++, str_array++){ if(*str_array == str){ return(TRUE); } } return(FALSE); } gsequencer-1.4.24/ags/lib/ags_buffer_util.h0000644000175000017500000000360613256163135015527 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_BUFFER_UTIL_H__ #define __AGS_BUFFER_UTIL_H__ #include #include unsigned char* ags_buffer_util_s8_to_char_buffer(signed char *buffer, guint buffer_length); unsigned char* ags_buffer_util_s16_to_char_buffer(signed short *buffer, guint buffer_length); unsigned char* ags_buffer_util_s24_to_char_buffer(signed long *buffer, guint buffer_length); unsigned char* ags_buffer_util_s32_to_char_buffer(signed long *buffer, guint buffer_length); unsigned char* ags_buffer_util_s64_to_char_buffer(signed long long *buffer, guint buffer_length); signed char* ags_buffer_util_char_buffer_to_s8(unsigned char *cbuffer, guint buffer_size); signed short* ags_buffer_util_char_buffer_to_s16(unsigned char *cbuffer, guint buffer_size); signed long* ags_buffer_util_char_buffer_to_s24(unsigned char *cbuffer, guint buffer_size); signed long* ags_buffer_util_char_buffer_to_s32(unsigned char *cbuffer, guint buffer_size); signed long long* ags_buffer_util_char_buffer_to_s64(unsigned char *cbuffer, guint buffer_size); #endif /*__AGS_BUFFER_UTIL_H__*/ gsequencer-1.4.24/ags/lib/ags_turtle.c0000644000175000017500000020001513246707333014527 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include /** * SECTION:ags_turtle * @short_description: Terse RDF Triple Language * @title: AgsTurtle * @section_id: * @include: ags/lib/ags_turtle.h * * The #AgsTurtle object converts Terse RDF Triple Language files * into XML. */ void ags_turtle_class_init(AgsTurtleClass *turtle); void ags_turtle_init (AgsTurtle *turtle); void ags_turtle_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_turtle_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_turtle_finalize(GObject *gobject); enum{ PROP_0, PROP_FILENAME, PROP_XML_DOC, }; static gpointer ags_turtle_parent_class = NULL; static pthread_mutex_t regex_mutex = PTHREAD_MUTEX_INITIALIZER; GType ags_turtle_get_type(void) { static GType ags_type_turtle = 0; if(!ags_type_turtle){ static const GTypeInfo ags_turtle_info = { sizeof (AgsTurtleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_turtle_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTurtle), 0, /* n_preallocs */ (GInstanceInitFunc) ags_turtle_init, }; ags_type_turtle = g_type_register_static(G_TYPE_OBJECT, "AgsTurtle", &ags_turtle_info, 0); } return (ags_type_turtle); } void ags_turtle_class_init(AgsTurtleClass *turtle) { GObjectClass *gobject; GParamSpec *param_spec; ags_turtle_parent_class = g_type_class_peek_parent(turtle); /* GObjectClass */ gobject = (GObjectClass *) turtle; gobject->set_property = ags_turtle_set_property; gobject->get_property = ags_turtle_get_property; gobject->finalize = ags_turtle_finalize; /* properties */ /** * AgsTurtle:filename: * * The assigned filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("filename of turtle"), i18n_pspec("The filename this turtle is assigned to"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsTurtle:xml-doc: * * The assigned xml-doc. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("xml-doc", i18n_pspec("xml document of turtle"), i18n_pspec("The xml document turtle was converted to"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_XML_DOC, param_spec); } void ags_turtle_init(AgsTurtle *turtle) { turtle->flags = AGS_TURTLE_TOLOWER; turtle->filename = NULL; turtle->doc = NULL; } void ags_turtle_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsTurtle *turtle; turtle = AGS_TURTLE(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *filename; filename = (gchar *) g_value_get_string(value); if(turtle->filename == filename){ return; } if(turtle->filename != NULL){ g_free(turtle->filename); } turtle->filename = g_strdup(filename); } break; case PROP_XML_DOC: { xmlDoc *doc; doc = (xmlDoc *) g_value_get_pointer(value); turtle->doc = doc; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_turtle_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsTurtle *turtle; turtle = AGS_TURTLE(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, turtle->filename); } break; case PROP_XML_DOC: { g_value_set_pointer(value, turtle->doc); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_turtle_finalize(GObject *gobject) { AgsTurtle *turtle; gchar **str; turtle = AGS_TURTLE(gobject); if(turtle->filename != NULL){ g_free(turtle->filename); } if(turtle->doc != NULL){ xmlFreeDoc(turtle->doc); } /* call parent */ G_OBJECT_CLASS(ags_turtle_parent_class)->finalize(gobject); } /** * ags_turtle_read_iriref: * @offset: the string pointer * @end_ptr: the end of @offset * * Read iriref value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_iriref(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t iriref_regex; static gboolean regex_compiled = FALSE; //FIXME:JK: do like in specs explained static const gchar *iriref_pattern = "^(<([^>\x20]*)>)"; static const size_t max_matches = 1; str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&iriref_regex, iriref_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&iriref_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); #ifdef AGS_DEBUG g_message("iriref %s", str); #endif } return(str); } /** * ags_turtle_read_pname_ns: * @offset: the string pointer * @end_ptr: the end of @offset * * Read prefixed-name namespace value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_pname_ns(gchar *offset, gchar *end_ptr) { gchar *pn_prefix; gchar *str; pn_prefix = ags_turtle_read_pn_prefix(offset, end_ptr); if(pn_prefix != NULL && &(offset[strlen(pn_prefix)]) < end_ptr && offset[strlen(pn_prefix)] == ':'){ str = g_strdup_printf("%s:", pn_prefix); }else{ if(offset[0] == ':'){ str = g_strdup(":"); }else{ str = NULL; } } if(pn_prefix != NULL){ free(pn_prefix); } return(str); } /** * ags_turtle_read_pname_ln: * @offset: the string pointer * @end_ptr: the end of @offset * * Read prefixed-name localized name value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_pname_ln(gchar *offset, gchar *end_ptr) { gchar *pname_ns, *pn_local; gchar *str; str = NULL; pname_ns = ags_turtle_read_pname_ns(offset, end_ptr); pn_local = NULL; if(pname_ns != NULL){ offset += strlen(pname_ns); pn_local = ags_turtle_read_pn_local(offset, end_ptr); if(pn_local != NULL){ str = g_strdup_printf("%s%s", pname_ns, pn_local); } } if(pname_ns != NULL){ free(pname_ns); } if(pn_local != NULL){ free(pn_local); } return(str); } /** * ags_turtle_read_blank_node_label: * @offset: the string pointer * @end_ptr: the end of @offset * * Read blank node label value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_blank_node_label(gchar *offset, gchar *end_ptr) { gchar *str; gchar *tmp, *tmp_str; gboolean initial_find, found_str; gboolean last_is_point; if(offset + 2 >= end_ptr){ return(NULL); } str = NULL; tmp_str = NULL; if(!g_str_has_prefix(offset, "_:")){ return(NULL); } if((tmp = ags_turtle_read_pn_chars_u(offset + 2, end_ptr)) != NULL || g_ascii_isdigit(offset[2])){ if(tmp == NULL){ str = g_strdup_printf("_:%c", offset[2]); offset += 3; }else{ str = g_strdup_printf("_:%s", tmp); offset += (2 + strlen(tmp)); free(tmp); } } initial_find = TRUE; found_str = FALSE; last_is_point = FALSE; while(initial_find || found_str){ initial_find = FALSE; found_str = FALSE; last_is_point = FALSE; tmp = ags_turtle_read_pn_chars(offset, end_ptr); if(tmp == NULL){ if(*offset == '.'){ tmp_str = g_strdup_printf("%s.", str); free(str); str = tmp_str; offset++; found_str = TRUE; last_is_point = TRUE; }else{ if(initial_find){ return(NULL); }else{ break; } } }else{ tmp_str = g_strdup_printf("%s%s", str, tmp); offset += strlen(tmp); free(str); free(tmp); str = tmp_str; found_str = TRUE; } } if(last_is_point){ g_warning("ags_turtle.c - syntax error"); } return(str); } /** * ags_turtle_read_langtag: * @offset: the string pointer * @end_ptr: the end of @offset * * Read langtag value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_langtag(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t langtag_regex; static gboolean regex_compiled = FALSE; static const char *langtag_pattern = "^(@[a-zA-Z]+(-[a-zA-Z0-9]+)*)"; static const size_t max_matches = 1; str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&langtag_regex, langtag_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&langtag_regex, offset, max_matches, match_arr, 0) == 0){ if(match_arr[0].rm_eo > match_arr[0].rm_so){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } } return(str); } /** * ags_turtle_read_boolean: * @offset: the string pointer * @end_ptr: the end of @offset * * Read boolean value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_boolean(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t boolean_literal_regex; static gboolean regex_compiled = FALSE; static const char *boolean_literal_pattern = "^(true|false)"; static const size_t max_matches = 1; str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&boolean_literal_regex, boolean_literal_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&boolean_literal_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } return(str); } /** * ags_turtle_read_integer: * @offset: the string pointer * @end_ptr: the end of @offset * * Read integer value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_integer(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t integer_literal_regex; static gboolean regex_compiled = FALSE; static const char *integer_literal_pattern = "^([+-]?[0-9]+)"; static const size_t max_matches = 1; str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&integer_literal_regex, integer_literal_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&integer_literal_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } return(str); } /** * ags_turtle_read_decimal: * @offset: the string pointer * @end_ptr: the end of @offset * * Read decimal value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_decimal(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t decimal_literal_regex; static gboolean regex_compiled = FALSE; static const char *decimal_literal_pattern = "^([\\+\\-]?[0-9]*\\.[0-9]+)"; static const size_t max_matches = 1; str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&decimal_literal_regex, decimal_literal_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&decimal_literal_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } return(str); } /** * ags_turtle_read_double: * @offset: the string pointer * @end_ptr: the end of @offset * * Read double value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_double(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t double_literal_regex; static gboolean regex_compiled = FALSE; static const char *double_literal_pattern = "^([\\+\\-]?(([0-9]+\\.[0-9]*[eE][\\+\\-]?[0-9]+)|(\\.[0-9]+[eE][\\+\\-]?[0-9]+)|([0-9]+[eE][+-]?[0-9]+)))"; static const size_t max_matches = 1; str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&double_literal_regex, double_literal_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&double_literal_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } return(str); } /** * ags_turtle_read_exponent: * @offset: the string pointer * @end_ptr: the end of @offset * * Read exponent value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_exponent(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t exponent_literal_regex; static gboolean regex_compiled = FALSE; static const char *exponent_literal_pattern = "^([eE][+-]?[0-9]+)"; static const size_t max_matches = 1; str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&exponent_literal_regex, exponent_literal_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&exponent_literal_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } return(str); } /** * ags_turtle_read_string: * @offset: the string pointer * @end_ptr: the end of @offset * * Read string value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_string(gchar *offset, gchar *end_ptr) { gchar *str; str = ags_turtle_read_string_literal_long_quote(offset, end_ptr); if(str != NULL){ return(str); } str = ags_turtle_read_string_literal_long_single_quote(offset, end_ptr); if(str != NULL){ return(str); } str = ags_turtle_read_string_literal_quote(offset, end_ptr); if(str != NULL){ return(str); } str = ags_turtle_read_string_literal_single_quote(offset, end_ptr); if(str != NULL){ return(str); } return(NULL); } /** * ags_turtle_read_string_literal_quote: * @offset: the string pointer * @end_ptr: the end of @offset * * Read string literal quote value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_string_literal_quote(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t string_literal_double_quote_regex; static gboolean regex_compiled = FALSE; static const char *string_literal_double_quote_pattern = "^(\"((([\\\\]['])|[^\"])*)\")"; static const size_t max_matches = 1; if(offset >= end_ptr){ return(NULL); } str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&string_literal_double_quote_regex, string_literal_double_quote_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&string_literal_double_quote_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } return(str); } /** * ags_turtle_read_string_literal_single_quote: * @offset: the string pointer * @end_ptr: the end of @offset * * Read string literal single quote value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_string_literal_single_quote(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t string_literal_single_quote_regex; static gboolean regex_compiled = FALSE; static const char *string_literal_single_quote_pattern = "^('((([\\\\]['])|[^'])*)')"; static const size_t max_matches = 1; if(offset >= end_ptr){ return(NULL); } str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&string_literal_single_quote_regex, string_literal_single_quote_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&string_literal_single_quote_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } return(str); } /** * ags_turtle_read_string_literal_long_quote: * @offset: the string pointer * @end_ptr: the end of @offset * * Read string literal long quote value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_string_literal_long_quote(gchar *offset, gchar *end_ptr) { gchar *str, *end; str = NULL; if(g_str_has_prefix(offset, "\"\"\"")){ end = offset + 3; while((end = strstr(end, "\"\"\"")) != NULL && *(end - 1) == '\\'){ end++; } if(end != NULL){ str = g_strndup(offset, end - offset + 3); } } return(str); } /** * ags_turtle_read_string_literal_long_single_quote: * @offset: the string pointer * @end_ptr: the end of @offset * * Read string literal long single quote value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_string_literal_long_single_quote(gchar *offset, gchar *end_ptr) { gchar *str, *end; str = NULL; if(g_str_has_prefix(offset, "'''")){ end = offset + 3; while((end = strstr(end, "'''")) != NULL && *(end - 1) == '\\'){ end++; } if(end != NULL){ str = g_strndup(offset, end - offset + 3); } } return(str); } /** * ags_turtle_read_uchar: * @offset: the string pointer * @end_ptr: the end of @offset * * Read uchar value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_uchar(gchar *offset, gchar *end_ptr) { gchar *str; guint hex_digit_count; guint i; gboolean success; if(offset + 1 >= end_ptr){ return(NULL); } str = NULL; if(g_str_has_prefix(offset, "\\u")){ hex_digit_count = 4; }else if(g_str_has_prefix(offset, "\\U")){ hex_digit_count = 8; }else{ return(NULL); } success = TRUE; for(i = 0; i < hex_digit_count; i++){ if(!g_ascii_isxdigit(offset[i + 2])){ success = FALSE; break; } } if(success){ str = g_strndup(offset, hex_digit_count + 2); } return(str); } /** * ags_turtle_read_echar: * @offset: the string pointer * @end_ptr: the end of @offset * * Read echar value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_echar(gchar *offset, gchar *end_ptr) { gchar *str; static const gchar *echar = "tbnrf\""; if(offset + 1 >= end_ptr){ return(NULL); } str = NULL; if(*offset == '\\'){ if(index(echar, offset[1]) != NULL){ str = g_strndup(offset, 2); } } return(str); } /** * ags_turtle_read_ws: * @offset: the string pointer * @end_ptr: the end of @offset * * Read ws value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_ws(gchar *offset, gchar *end_ptr) { gchar *str; static const gchar *ws = "\x20\x09\x0D\x0A"; str = NULL; if(offset < end_ptr && index(ws, *offset) != NULL){ str = g_strndup(offset, 1); } return(str); } /** * ags_turtle_read_anon: * @offset: the string pointer * @end_ptr: the end of @offset * * Read anon value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_anon(gchar *offset, gchar *end_ptr) { gchar *str; gchar *tmp, *tmp_str; gboolean success; static const gchar *ws = "\x20\x09\x0D\x0A"; if(offset >= end_ptr){ return(NULL); } str = NULL; success = FALSE; if(*offset == '['){ tmp = index(offset + 1, ']'); if(tmp != NULL){ success = TRUE; for(tmp_str = offset + 1; tmp_str < tmp; tmp_str++){ if(index(ws, *tmp_str) == NULL){ success = FALSE; break; } } } } if(success){ str = g_strndup(offset, tmp - offset + 1); } return(str); } #define AGS_TURTLE_UTF8_RANGE_0 "([A-Za-z])" #define AGS_TURTLE_UTF8_RANGE_1 "(\xC3[\x80-\x96])" #define AGS_TURTLE_UTF8_RANGE_2 "(\xC3[\x98-\xB6])" #define AGS_TURTLE_UTF8_RANGE_3 "((\xC3[\xB8-\xBF])|([\xC3-\xCA][\x80-\xBF])|(\xCB[\x80-\xBF]))" #define AGS_TURTLE_UTF8_RANGE_4 "(\xCD[\xB0-\xBD])" #define AGS_TURTLE_UTF8_RANGE_5 "((\xCD[\xBF-\xDF])|([\xCE-\xDF][\x80-\xBF])|([\xE0-\xE1][\x80-\xBF][\x80-\xBF]))" #define AGS_TURTLE_UTF8_RANGE_6 "(\xE2\x80[\x8C-\x8D])" #define AGS_TURTLE_UTF8_RANGE_7 "((\xE2\x81[\xB0-\xBF])|(\xE2[\x81-\x85][\x80-\xBF])|(\xE2\x86[\x80-\x8F]))" #define AGS_TURTLE_UTF8_RANGE_8 "((\xE2[\xB0-\xBE][\x80-\xBF])|(\xE2\xBF[\x80-\xAF]))" #define AGS_TURTLE_UTF8_RANGE_9 "((\xE3[\x80-\xBF][\x81-\xBF])|([\xE4-\xEC][\x80-\x9F][\x80-\xBF]))" #define AGS_TURTLE_UTF8_RANGE_10 "((\xEF[\xA4-\xB6][\x80-\xBF])|(\xEF\xB7[\x80-\x8F]))" #define AGS_TURTLE_UTF8_RANGE_11 "((\xEF\xB7[\xB0-\xBF])|(\xEF[\xB8-\xBE][\x80-\xBF])|(\xEF\xBF[\x80-\xBD]))" #define AGS_TURTLE_UTF8_RANGE_12 "(([\xF0-\xF3][\x90-\xAF][\x80-\xBF][\x80-\xBF]))" #define AGS_TURTLE_UTF8_RANGE_ALL "(" AGS_TURTLE_UTF8_RANGE_0 "|" \ AGS_TURTLE_UTF8_RANGE_1 "|" \ AGS_TURTLE_UTF8_RANGE_2 "|" \ AGS_TURTLE_UTF8_RANGE_3 "|" \ AGS_TURTLE_UTF8_RANGE_4 "|" \ AGS_TURTLE_UTF8_RANGE_5 "|" \ AGS_TURTLE_UTF8_RANGE_6 "|" \ AGS_TURTLE_UTF8_RANGE_7 "|" \ AGS_TURTLE_UTF8_RANGE_8 "|" \ AGS_TURTLE_UTF8_RANGE_9 "|" \ AGS_TURTLE_UTF8_RANGE_10 "|" \ AGS_TURTLE_UTF8_RANGE_11 "|" \ AGS_TURTLE_UTF8_RANGE_12 ")" #define AGS_TURLTE_UTF8_RANGE_ALL_PATTERN "^" AGS_TURTLE_UTF8_RANGE_ALL /** * ags_turtle_read_pn_chars_base: * @offset: the string pointer * @end_ptr: the end of @offset * * Read prefixed-name chars base value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_pn_chars_base(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t chars_base_regex; static gboolean regex_compiled = FALSE; static const char *chars_base_pattern = AGS_TURLTE_UTF8_RANGE_ALL_PATTERN; static const size_t max_matches = 1; if(offset == NULL || offset >= end_ptr){ return(NULL); } str = NULL; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; if(ags_regcomp(&chars_base_regex, chars_base_pattern, REG_EXTENDED)){ g_warning("failed to compile regex: %s", chars_base_pattern); } } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&chars_base_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } return(str); } /** * ags_turtle_read_pn_chars_u: * @offset: the string pointer * @end_ptr: the end of @offset * * Read prefixed-name chars underscore value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_pn_chars_u(gchar *offset, gchar *end_ptr) { gchar *str; str = ags_turtle_read_pn_chars_base(offset, end_ptr); if(str == NULL && offset < end_ptr && *offset == '_'){ str = g_strdup("_"); } return(str); } /** * ags_turtle_read_pn_chars: * @offset: the string pointer * @end_ptr: the end of @offset * * Read prefixed-name chars value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_pn_chars(gchar *offset, gchar *end_ptr) { regmatch_t match_arr[1]; gchar *str; static regex_t chars_regex; static gboolean regex_compiled = FALSE; static const char *chars_pattern = "^(([0-9])|(\xC2\xB7)|((\xCC[\x80-\xBF])|(\xCD[\x80-\xAF]))|((\xE2\x80\xBF)|(\xE2\x81\x80)))"; static const size_t max_matches = 1; str = ags_turtle_read_pn_chars_u(offset, end_ptr); if(str == NULL && offset < end_ptr && *offset == '-'){ str = g_strdup("-"); } if(str == NULL && offset < end_ptr){ pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&chars_regex, chars_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); if(ags_regexec(&chars_regex, offset, max_matches, match_arr, 0) == 0){ str = g_strndup(offset, match_arr[0].rm_eo - match_arr[0].rm_so); } } return(str); } /** * ags_turtle_read_pn_prefix: * @offset: the string pointer * @end_ptr: the end of @offset * * Read prefixe-name prefix value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_pn_prefix(gchar *offset, gchar *end_ptr) { gchar *str; gchar *tmp, *str_tmp; gboolean last_is_point; if(offset == NULL || offset >= end_ptr){ return(NULL); } str = ags_turtle_read_pn_chars_base(offset, end_ptr); if(str != NULL){ offset += strlen(str); last_is_point = FALSE; while((tmp = ags_turtle_read_pn_chars(offset, end_ptr)) != NULL || *offset == '.'){ if(tmp == NULL){ last_is_point = TRUE; }else{ last_is_point = FALSE; } if(tmp != NULL){ str_tmp = g_strdup_printf("%s%s", str, tmp); offset += strlen(tmp); free(str); free(tmp); str = str_tmp; }else{ str_tmp = g_strdup_printf("%s.", str); offset++; free(str); str = str_tmp; } } } return(str); } /** * ags_turtle_read_pn_local: * @offset: the string pointer * @end_ptr: the end of @offset * * Read prefixed-name local value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_pn_local(gchar *offset, gchar *end_ptr) { gchar *str; gchar *tmp_str, *tmp; gboolean initial_find, found_str; gboolean last_is_point; if(offset >= end_ptr){ return(NULL); } tmp_str = NULL; found_str = FALSE; tmp = ags_turtle_read_pn_chars_u(offset, end_ptr); if(tmp == NULL && *offset == ':'){ tmp = g_strdup(":"); } if(tmp == NULL && g_ascii_isdigit(*offset)){ tmp = g_strndup(offset, 1); } if(tmp == NULL){ tmp = ags_turtle_read_plx(offset, end_ptr); } str = tmp; if(str != NULL){ offset += strlen(str); initial_find = TRUE; last_is_point = FALSE; while(initial_find || found_str){ found_str = FALSE; initial_find = FALSE; last_is_point = FALSE; tmp = ags_turtle_read_pn_chars(offset, end_ptr); if(tmp == NULL && *offset == '.'){ tmp = g_strdup("."); last_is_point = TRUE; } if(tmp == NULL && *offset == ':'){ tmp = g_strdup(":"); } if(tmp == NULL){ tmp = ags_turtle_read_plx(offset, end_ptr); } /* concat new strings */ if(tmp != NULL){ found_str = TRUE; if(str != NULL){ tmp_str = g_strdup_printf("%s%s", str, tmp); offset += strlen(tmp); free(str); free(tmp); str = tmp_str; }else{ str = tmp; offset += strlen(tmp); } } } } return(str); } /** * ags_turtle_read_plx: * @offset: the string pointer * @end_ptr: the end of @offset * * Read plx value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_plx(gchar *offset, gchar *end_ptr) { gchar *str; str = ags_turtle_read_percent(offset, end_ptr); if(str == NULL){ str = ags_turtle_read_pn_local_esc(offset, end_ptr); } return(str); } /** * ags_turtle_read_percent: * @offset: the string pointer * @end_ptr: the end of @offset * * Read percent value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_percent(gchar *offset, gchar *end_ptr) { gchar *str; str = NULL; if(offset != NULL && offset + 2 < end_ptr && offset[0] == '%' && g_ascii_isxdigit(offset[1]) && g_ascii_isxdigit(offset[2])){ str = g_strndup(offset, 3); } return(str); } /** * ags_turtle_read_hex: * @offset: the string pointer * @end_ptr: the end of @offset * * Read hex value. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_hex(gchar *offset, gchar *end_ptr) { gchar *str; str = NULL; if(g_ascii_isxdigit(*offset)){ str = g_strndup(offset, 1); } return(str); } /** * ags_turtle_read_pn_local_esc: * @offset: the string pointer * @end_ptr: the end of @offset * * Read prefixed name local escapes. * * Returns: a string on success otherwise %NULL * * Since: 1.0.0 */ gchar* ags_turtle_read_pn_local_esc(gchar *offset, gchar *end_ptr) { static const gchar *escapes = "_~.-!$&'()*+,;=/?#@%"; gchar *str; str = NULL; if(offset != NULL && offset + 1 < end_ptr && *offset == '\\' && (index(escapes, offset[1])) != NULL){ str = g_strndup(offset, 2); } return(str); } /** * ags_turtle_find_xpath: * @turtle: the #AgsTurtle * @xpath: a XPath expression as string * * Lookup XPath expression withing @turtle. * * Returns: a #GList-struct containing xmlNode * * Since: 1.0.0 */ GList* ags_turtle_find_xpath(AgsTurtle *turtle, gchar *xpath) { xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; GList *list; guint i; xpath_context = xmlXPathNewContext(turtle->doc); xpath_object = xmlXPathEval((xmlChar *) xpath, xpath_context); list = NULL; if(xpath_object->nodesetval != NULL){ node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ list = g_list_prepend(list, node[i]); } } } list = g_list_reverse(list); return(list); } /** * ags_turtle_find_xpath_with_context_node: * @turtle: the #AgsTurtle * @xpath: a XPath expression as string * @context_node: a #xmlNode-struct * * Lookup XPath expression from @context_node withing @turtle. * * Returns: a #GList-struct containing xmlNode * * Since: 1.0.0 */ GList* ags_turtle_find_xpath_with_context_node(AgsTurtle *turtle, gchar *xpath, xmlNode *context_node) { xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; GList *list; guint i; xpath_context = xmlXPathNewContext(turtle->doc); xpath_context->node = context_node; xpath_object = xmlXPathEval((xmlChar *) xpath, xpath_context); list = NULL; if(xpath_object->nodesetval != NULL){ node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ list = g_list_prepend(list, node[i]); } } } if(list != NULL){ list = g_list_reverse(list); } return(list); } gchar* ags_turtle_string_convert(AgsTurtle *turtle, gchar *str) { if((AGS_TURTLE_TOLOWER & (turtle->flags)) != 0){ str = g_ascii_strdown(str, -1); } return(str); } /** * ags_turtle_load: * @turtle: the #AgsTurtle * @error: a pointer to a #GError * * Loads a RDF triple file into an XML Document. * * Returns: a #xmlDoc pointer * * Since: 1.0.0 */ xmlDoc* ags_turtle_load(AgsTurtle *turtle, GError **error) { xmlDoc *doc; xmlNode *root_node, *rdf_statement_node; FILE *file; struct stat *sb; gchar *buffer, *iter; size_t n_read; auto gchar* ags_turtle_load_skip_comments_and_blanks(gchar **iter); auto xmlNode* ags_turtle_load_read_iriref(gchar **iter); auto xmlNode* ags_turtle_load_read_anon(gchar **iter); auto xmlNode* ags_turtle_load_read_pname_ns(gchar **iter); auto xmlNode* ags_turtle_load_read_pname_ln(gchar **iter); auto xmlNode* ags_turtle_load_read_numeric(gchar **iter); auto xmlNode* ags_turtle_load_read_string(gchar **iter); auto xmlNode* ags_turtle_load_read_langtag(gchar **iter); auto xmlNode* ags_turtle_load_read_literal(gchar **iter); auto xmlNode* ags_turtle_load_read_iri(gchar **iter); auto xmlNode* ags_turtle_load_read_prefix_id(gchar **iter); auto xmlNode* ags_turtle_load_read_base(gchar **iter); auto xmlNode* ags_turtle_load_read_sparql_prefix(gchar **iter); auto xmlNode* ags_turtle_load_read_sparql_base(gchar **iter); auto xmlNode* ags_turtle_load_read_prefixed_name(gchar **iter); auto xmlNode* ags_turtle_load_read_blank_node(gchar **iter); auto xmlNode* ags_turtle_load_read_statement(gchar **iter); auto xmlNode* ags_turtle_load_read_verb(gchar **iter); auto xmlNode* ags_turtle_load_read_predicate(gchar **iter); auto xmlNode* ags_turtle_load_read_object(gchar **iter); auto xmlNode* ags_turtle_load_read_directive(gchar **iter); auto xmlNode* ags_turtle_load_read_triple(gchar **iter); auto xmlNode* ags_turtle_load_read_subject(gchar **iter); auto xmlNode* ags_turtle_load_read_object_list(gchar **iter); auto xmlNode* ags_turtle_load_read_collection(gchar **iter); auto xmlNode* ags_turtle_load_read_blank_node_property_list(gchar **iter); auto xmlNode* ags_turtle_load_read_predicate_object_list(gchar **iter); gchar* ags_turtle_load_skip_comments_and_blanks(gchar **iter){ gchar *look_ahead; if(iter == NULL){ return(NULL); } look_ahead = *iter; if(look_ahead == NULL){ return(NULL); } /* skip whitespaces and comments */ for(; (look_ahead < &(buffer[sb->st_size])) && *look_ahead != '\0'; look_ahead++){ /* skip comments */ if(buffer == look_ahead){ if(*buffer == '#'){ look_ahead = index(look_ahead, '\n') + 1; continue; } }else if(buffer[look_ahead - buffer - 1] == '\n' && *look_ahead == '#'){ look_ahead = index(look_ahead, '\n') + 1; continue; } /* spaces */ if(!(*look_ahead == ' ' || *look_ahead == '\t' || *look_ahead == '\n')){ break; } } return(look_ahead); } xmlNode* ags_turtle_load_read_iriref(gchar **iter){ xmlNode *node; gchar *look_ahead; gchar *str; node = NULL; look_ahead = *iter; /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* read iriref */ str = ags_turtle_read_iriref(look_ahead, &(buffer[sb->st_size])); if(str != NULL){ node = xmlNewNode(NULL, "rdf-iriref"); xmlNodeSetContent(node, str); // xmlNodeSetContent(node, // g_ascii_strdown(str, // -1)); #ifdef AGS_DEBUG g_message("iriref = %s", str); #endif *iter = look_ahead + strlen(str); } return(node); } xmlNode* ags_turtle_load_read_anon(gchar **iter){ xmlNode *node; gchar *look_ahead; gchar *str; node = NULL; look_ahead = *iter; /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* read anon */ str = ags_turtle_read_anon(look_ahead, &(buffer[sb->st_size])); if(str != NULL){ node = xmlNewNode(NULL, "rdf-anon"); xmlNodeSetContent(node, g_ascii_strdown(str, -1)); #ifdef AGS_DEBUG g_message("anon - %s", str); #endif *iter = look_ahead + strlen(str); } return(node); } xmlNode* ags_turtle_load_read_pname_ns(gchar **iter){ xmlNode *node; gchar *look_ahead; gchar *str; node = NULL; look_ahead = *iter; /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* read pname-ns */ str = ags_turtle_read_pname_ns(look_ahead, &(buffer[sb->st_size])); if(str != NULL){ node = xmlNewNode(NULL, "rdf-pname-ns"); xmlNodeSetContent(node, g_ascii_strdown(str, -1)); #ifdef AGS_DEBUG g_message("pname-ns - %s", str); #endif *iter = look_ahead + strlen(str); } return(node); } xmlNode* ags_turtle_load_read_pname_ln(gchar **iter){ xmlNode *node; gchar *look_ahead; gchar *str; node = NULL; look_ahead = *iter; /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* read pname-ln */ str = ags_turtle_read_pname_ln(look_ahead, &(buffer[sb->st_size])); if(str != NULL){ node = xmlNewNode(NULL, "rdf-pname-ln"); xmlNodeSetContent(node, g_ascii_strdown(str, -1)); #ifdef AGS_DEBUG g_message("pname-ln - %s", str); #endif *iter = look_ahead + strlen(str); } return(node); } xmlNode* ags_turtle_load_read_numeric(gchar **iter){ xmlNode *node; gchar *look_ahead; gchar *str; node = NULL; look_ahead = *iter; /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* read numeric */ str = NULL; if(str == NULL){ str = ags_turtle_read_decimal(look_ahead, &(buffer[sb->st_size])); } if(str == NULL){ str = ags_turtle_read_double(look_ahead, &(buffer[sb->st_size])); } if(str == NULL){ str = ags_turtle_read_integer(look_ahead, &(buffer[sb->st_size])); } if(str == NULL){ str = ags_turtle_read_boolean(look_ahead, &(buffer[sb->st_size])); } if(str != NULL){ node = xmlNewNode(NULL, "rdf-numeric"); xmlNodeSetContent(node, g_ascii_strdown(str, -1)); #ifdef AGS_DEBUG g_message("numeric - %s", str); #endif *iter = look_ahead + strlen(str); } return(node); } xmlNode* ags_turtle_load_read_string(gchar **iter){ xmlNode *node; gchar *look_ahead; gchar *str; node = NULL; look_ahead = *iter; /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* read pname-ns */ str = ags_turtle_read_string(look_ahead, &(buffer[sb->st_size])); if(str != NULL){ node = xmlNewNode(NULL, "rdf-string"); xmlNodeSetContent(node, xmlEncodeSpecialChars(doc, str)); #ifdef AGS_DEBUG g_message("string - %s", str); #endif *iter = look_ahead + strlen(str); } return(node); } xmlNode* ags_turtle_load_read_langtag(gchar **iter){ xmlNode *node; gchar *look_ahead; gchar *str; node = NULL; look_ahead = *iter; /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* read langtag */ str = ags_turtle_read_langtag(look_ahead, &(buffer[sb->st_size])); if(str != NULL){ node = xmlNewNode(NULL, "rdf-langtag"); xmlNodeSetContent(node, g_ascii_strdown(str, -1)); #ifdef AGS_DEBUG g_message("langtag - %s", str); #endif *iter = look_ahead + strlen(str); } return(node); } xmlNode* ags_turtle_load_read_literal(gchar **iter){ xmlNode *node; xmlNode *rdf_string_node, *rdf_langtag_node, *rdf_iri_node; gchar *look_ahead; node = NULL; look_ahead = *iter; /* read string */ rdf_string_node = ags_turtle_load_read_string(&look_ahead); if(rdf_string_node != NULL){ node = xmlNewNode(NULL, "rdf-literal"); xmlAddChild(node, rdf_string_node); *iter = look_ahead; /* read optional langtag */ rdf_langtag_node = ags_turtle_load_read_langtag(&look_ahead); if(rdf_langtag_node != NULL){ xmlAddChild(node, rdf_langtag_node); *iter = look_ahead; }else{ /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); if(look_ahead + 2 < &(buffer[sb->st_size]) && look_ahead[0] == '^' && look_ahead[1] == '^'){ /* alternate r2ead optional iri */ rdf_iri_node = ags_turtle_load_read_iri(&look_ahead); if(rdf_iri_node != NULL){ xmlAddChild(node, rdf_iri_node); *iter = look_ahead; } } } }else{ xmlNode *rdf_numeric_node; rdf_numeric_node = ags_turtle_load_read_numeric(&look_ahead); if(rdf_numeric_node != NULL){ node = xmlNewNode(NULL, "rdf-literal"); xmlAddChild(node, rdf_numeric_node); *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_iri(gchar **iter){ xmlNode *node; xmlNode *rdf_iriref_node, *rdf_prefixed_name_node; gchar *look_ahead; node = NULL; look_ahead = *iter; /* read iriref */ rdf_iriref_node = ags_turtle_load_read_iriref(&look_ahead); if(rdf_iriref_node != NULL){ node = xmlNewNode(NULL, "rdf-iri"); xmlAddChild(node, rdf_iriref_node); *iter = look_ahead; }else{ /* alternate read prefixed name */ rdf_prefixed_name_node = ags_turtle_load_read_prefixed_name(&look_ahead); if(rdf_prefixed_name_node != NULL){ node = xmlNewNode(NULL, "rdf-iri"); xmlAddChild(node, rdf_prefixed_name_node); *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_prefix_id(gchar **iter){ xmlNode *node; xmlNode *rdf_pname_ns_node, *rdf_iriref_node; regmatch_t match_arr[1]; gchar *look_ahead; static regex_t prefix_id_regex; static gboolean regex_compiled = FALSE; static const char *prefix_id_pattern = "^(@prefix)"; static const size_t max_matches = 1; node = NULL; look_ahead = *iter; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&prefix_id_regex, prefix_id_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* match @prefix */ if(ags_regexec(&prefix_id_regex, look_ahead, max_matches, match_arr, 0) == 0){ look_ahead += (match_arr[0].rm_eo - match_arr[0].rm_so); rdf_pname_ns_node = ags_turtle_load_read_pname_ns(&look_ahead); rdf_iriref_node = ags_turtle_load_read_iriref(&look_ahead); /* create node if complete prefix id */ if(rdf_pname_ns_node != NULL && rdf_iriref_node != NULL){ node = xmlNewNode(NULL, "rdf-prefix-id"); xmlAddChild(node, rdf_pname_ns_node); xmlAddChild(node, rdf_iriref_node); *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_base(gchar **iter){ xmlNode *node; xmlNode *rdf_iriref_node; regmatch_t match_arr[1]; gchar *look_ahead; static regex_t base_regex; static gboolean regex_compiled = FALSE; static const char *base_pattern = "^(@base)"; static const size_t max_matches = 1; node = NULL; look_ahead = *iter; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&base_regex, base_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* match @base */ if(ags_regexec(&base_regex, look_ahead, max_matches, match_arr, 0) == 0){ look_ahead += (match_arr[0].rm_eo - match_arr[0].rm_so); rdf_iriref_node = ags_turtle_load_read_iriref(&look_ahead); /* create node if complete base */ if(rdf_iriref_node != NULL){ node = xmlNewNode(NULL, "rdf-base"); xmlAddChild(node, rdf_iriref_node); *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_sparql_prefix(gchar **iter){ xmlNode *node; xmlNode *rdf_pname_ns_node, *rdf_iriref_node; regmatch_t match_arr[1]; gchar *look_ahead; static regex_t sparql_prefix_regex; static gboolean regex_compiled = FALSE; static const char *sparql_prefix_pattern = "^(\"PREFIX\")"; static const size_t max_matches = 1; node = NULL; look_ahead = *iter; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&sparql_prefix_regex, sparql_prefix_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* match @prefix */ if(ags_regexec(&sparql_prefix_regex, look_ahead, max_matches, match_arr, 0) == 0){ look_ahead += (match_arr[0].rm_eo - match_arr[0].rm_so); rdf_pname_ns_node = ags_turtle_load_read_pname_ns(&look_ahead); rdf_iriref_node = ags_turtle_load_read_iriref(&look_ahead);; /* create node if complete sparql prefix */ if(rdf_pname_ns_node != NULL && rdf_iriref_node != NULL){ node = xmlNewNode(NULL, "rdf-sparql-prefix"); xmlAddChild(node, rdf_pname_ns_node); xmlAddChild(node, rdf_iriref_node); *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_sparql_base(gchar **iter){ xmlNode *node; xmlNode *rdf_iriref_node; regmatch_t match_arr[1]; gchar *look_ahead; static regex_t sparql_base_regex; static gboolean regex_compiled = FALSE; static const char *sparql_base_pattern = "^(\"BASE\")"; static const size_t max_matches = 1; node = NULL; look_ahead = *iter; pthread_mutex_lock(®ex_mutex); if(!regex_compiled){ regex_compiled = TRUE; ags_regcomp(&sparql_base_regex, sparql_base_pattern, REG_EXTENDED); } pthread_mutex_unlock(®ex_mutex); /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* match @base */ if(ags_regexec(&sparql_base_regex, look_ahead, max_matches, match_arr, 0) == 0){ look_ahead += (match_arr[0].rm_eo - match_arr[0].rm_so); rdf_iriref_node = ags_turtle_load_read_iriref(&look_ahead);; /* create node if complete sparqle base */ if(rdf_iriref_node != NULL){ node = xmlNewNode(NULL, "rdf-sparql-base"); xmlAddChild(node, rdf_iriref_node); *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_prefixed_name(gchar **iter){ xmlNode *node; xmlNode *rdf_pname_ns_node, *rdf_pname_ln_node; gchar *look_ahead; node = NULL; look_ahead = *iter; rdf_pname_ln_node = ags_turtle_load_read_pname_ln(&look_ahead); if(rdf_pname_ln_node != NULL){ node = xmlNewNode(NULL, "rdf-prefixed-name"); xmlAddChild(node, rdf_pname_ln_node); *iter = look_ahead; }else{ rdf_pname_ns_node = ags_turtle_load_read_pname_ns(&look_ahead); if(rdf_pname_ns_node != NULL){ node = xmlNewNode(NULL, "rdf-prefixed-name"); xmlAddChild(node, rdf_pname_ns_node); *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_blank_node(gchar **iter){ xmlNode *node; xmlNode *rdf_anon_node; gchar *rdf_blank_node_label; gchar *look_ahead; node = NULL; look_ahead = *iter; rdf_blank_node_label = ags_turtle_read_blank_node_label(look_ahead, &(buffer[sb->st_size])); if(rdf_blank_node_label != NULL){ node = xmlNewNode(NULL, "rdf-blank-node"); xmlNodeSetContent(node, g_ascii_strdown(rdf_blank_node_label, -1)); *iter = look_ahead; }else{ rdf_anon_node = ags_turtle_load_read_anon(&look_ahead); if(rdf_anon_node != NULL){ node = xmlNewNode(NULL, "rdf-blank-node"); xmlAddChild(node, rdf_anon_node); *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_statement(gchar **iter){ xmlNode *node; xmlNode *rdf_directive_node, *rdf_triple_node; gchar *look_ahead; node = NULL; look_ahead = *iter; rdf_directive_node = ags_turtle_load_read_directive(&look_ahead); if(rdf_directive_node != NULL){ node = xmlNewNode(NULL, "rdf-statement"); xmlAddChild(node, rdf_directive_node); #ifdef AGS_DEBUG g_message("===="); #endif *iter = index(look_ahead, '.') + 1; }else{ rdf_triple_node = ags_turtle_load_read_triple(&look_ahead); if(rdf_triple_node != NULL){ node = xmlNewNode(NULL, "rdf-statement"); xmlAddChild(node, rdf_triple_node); #ifdef AGS_DEBUG g_message("-----"); #endif *iter = index(look_ahead, '.') + 1; } } return(node); } xmlNode* ags_turtle_load_read_verb(gchar **iter){ xmlNode *node; xmlNode *predicate_node; gchar *look_ahead; node = NULL; look_ahead = *iter; /* predicate */ predicate_node = ags_turtle_load_read_predicate(&look_ahead); if(predicate_node != NULL){ #ifdef AGS_DEBUG g_message("read rdf-verb"); #endif node = xmlNewNode(NULL, "rdf-verb"); xmlAddChild(node, predicate_node); *iter = look_ahead; }else{ /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); if(*look_ahead == 'a'){ #ifdef AGS_DEBUG g_message("read - verb: a"); #endif node = xmlNewNode(NULL, "rdf-verb"); /* verb - a */ xmlNewProp(node, "verb", "a"); look_ahead += 1; *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_predicate(gchar **iter){ xmlNode *node; xmlNode *iri_node; gchar *look_ahead; node = NULL; look_ahead = *iter; /* iri - IRIREF */ iri_node = ags_turtle_load_read_iri(&look_ahead); if(iri_node != NULL){ #ifdef AGS_DEBUG g_message("read rdf-predicate"); #endif node = xmlNewNode(NULL, "rdf-predicate"); xmlAddChild(node, iri_node); *iter = look_ahead; } return(node); } xmlNode* ags_turtle_load_read_object(gchar **iter){ xmlNode *node; xmlNode *iri_node; xmlNode *blank_node; xmlNode *collection_node; xmlNode *blank_node_property_list_node; xmlNode *literal_node; gchar *look_ahead; node = NULL; iri_node = NULL; blank_node = NULL; collection_node = NULL; blank_node_property_list_node = NULL; literal_node = NULL; look_ahead = *iter; /* iri - IRIREF */ iri_node = ags_turtle_load_read_iri(&look_ahead); if(iri_node != NULL){ goto ags_turtle_load_read_object_CREATE_NODE; } /* read blank node */ blank_node = ags_turtle_load_read_blank_node(&look_ahead); if(blank_node != NULL){ goto ags_turtle_load_read_object_CREATE_NODE; } /* skip blanks and comments */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); /* collection */ if(*look_ahead == '('){ collection_node = ags_turtle_load_read_collection(&look_ahead); goto ags_turtle_load_read_object_CREATE_NODE; } /* blank node property listimplemented ags_turtle_load_read_object() */ if(*look_ahead == '['){ blank_node_property_list_node = ags_turtle_load_read_blank_node_property_list(&look_ahead); goto ags_turtle_load_read_object_CREATE_NODE; } /* literal */ #ifdef AGS_DEBUG g_message("*** PASS ***"); #endif literal_node = ags_turtle_load_read_literal(&look_ahead); if(literal_node != NULL){ goto ags_turtle_load_read_object_CREATE_NODE; } /* create node */ ags_turtle_load_read_object_CREATE_NODE: if(iri_node != NULL){ node = xmlNewNode(NULL, "rdf-object"); xmlAddChild(node, iri_node); *iter = look_ahead; }else if(blank_node != NULL){ node = xmlNewNode(NULL, "rdf-object"); xmlAddChild(node, blank_node); *iter = look_ahead; }else if(collection_node != NULL){ node = xmlNewNode(NULL, "rdf-object"); xmlAddChild(node, collection_node); *iter = look_ahead; }else if(blank_node_property_list_node != NULL){ node = xmlNewNode(NULL, "rdf-object"); xmlAddChild(node, blank_node_property_list_node); *iter = look_ahead; }else if(literal_node != NULL){ node = xmlNewNode(NULL, "rdf-object"); xmlAddChild(node, literal_node); *iter = look_ahead; } #ifdef AGS_DEBUG if(node != NULL){ g_message("read rdf-object"); } #endif return(node); } xmlNode* ags_turtle_load_read_directive(gchar **iter){ xmlNode *node; xmlNode *rdf_prefix_id_node, *rdf_base_node, *rdf_sparql_prefix_node, *rdf_sparql_base_node; gchar *look_ahead, *current; node = NULL; look_ahead = *iter; rdf_prefix_id_node = ags_turtle_load_read_prefix_id(&look_ahead); if(rdf_prefix_id_node != NULL){ goto ags_turtle_load_read_directive_CREATE_NODE; } rdf_base_node = ags_turtle_load_read_base(&look_ahead); if(rdf_base_node != NULL){ goto ags_turtle_load_read_directive_CREATE_NODE; } rdf_sparql_prefix_node = ags_turtle_load_read_sparql_prefix(&look_ahead); if(rdf_sparql_prefix_node != NULL){ goto ags_turtle_load_read_directive_CREATE_NODE; } rdf_sparql_base_node = ags_turtle_load_read_sparql_base(&look_ahead); if(rdf_sparql_base_node != NULL){ goto ags_turtle_load_read_directive_CREATE_NODE; } /* create node */ ags_turtle_load_read_directive_CREATE_NODE: if(rdf_prefix_id_node != NULL){ #ifdef AGS_DEBUG g_message("read - rdf-directive"); #endif node = xmlNewNode(NULL, "rdf-directive"); xmlAddChild(node, rdf_prefix_id_node); *iter = look_ahead; }else if(rdf_base_node != NULL){ #ifdef AGS_DEBUG g_message("read - rdf-directive"); #endif node = xmlNewNode(NULL, "rdf-directive"); xmlAddChild(node, rdf_base_node); *iter = look_ahead; }else if(rdf_sparql_prefix_node != NULL){ #ifdef AGS_DEBUG g_message("read - rdf-directive"); #endif node = xmlNewNode(NULL, "rdf-directive"); xmlAddChild(node, rdf_sparql_prefix_node); *iter = look_ahead; }else if(rdf_sparql_base_node != NULL){ #ifdef AGS_DEBUG g_message("read - rdf-directive"); #endif node = xmlNewNode(NULL, "rdf-directive"); xmlAddChild(node, rdf_sparql_base_node); *iter = look_ahead; } return(node); } xmlNode* ags_turtle_load_read_triple(gchar **iter){ xmlNode *node; xmlNode *subject_node, *predicate_object_list_node_0, *blank_node_object_list_node, *predicate_object_list_node_1; gchar *look_ahead, *current; node = NULL; look_ahead = *iter; /* subject */ subject_node = ags_turtle_load_read_subject(&look_ahead); /* create triple node */ if(subject_node != NULL){ /* first predicate object list */ predicate_object_list_node_0 = ags_turtle_load_read_predicate_object_list(&look_ahead); if(predicate_object_list_node_0 != NULL){ node = xmlNewNode(NULL, "rdf-triple"); xmlAddChild(node, subject_node); xmlAddChild(node, predicate_object_list_node_0); /* second predicate object list */ predicate_object_list_node_1 = ags_turtle_load_read_predicate_object_list(&look_ahead); if(predicate_object_list_node_1 != NULL){ xmlAddChild(node, predicate_object_list_node_1); } #ifdef AGS_DEBUG g_message("read rdf-triple"); #endif *iter = look_ahead; }else{ /* alternate first blank node object list */ blank_node_object_list_node = ags_turtle_load_read_blank_node_property_list(&look_ahead); if(blank_node_object_list_node != NULL){ node = xmlNewNode(NULL, "rdf-triple"); xmlAddChild(node, blank_node_object_list_node); /* predicate object list */ predicate_object_list_node_1 = ags_turtle_load_read_predicate_object_list(&look_ahead); if(predicate_object_list_node_1 != NULL){ xmlAddChild(node, predicate_object_list_node_1); } #ifdef AGS_DEBUG g_message("read rdf-triple"); #endif *iter = look_ahead; } } } return(node); } xmlNode* ags_turtle_load_read_subject(gchar **iter){ xmlNode *node; xmlNode *iri_node; xmlNode *blank_node; xmlNode *collection_node; gchar *look_ahead; node = NULL; iri_node = NULL; blank_node = NULL; collection_node = NULL; look_ahead = *iter; /* iri - IRIREF */ iri_node = ags_turtle_load_read_iri(&look_ahead); if(iri_node != NULL){ goto ags_turtle_load_read_subject_CREATE_NODE; } /* read blank node */ blank_node = ags_turtle_load_read_blank_node(&look_ahead); if(blank_node != NULL){ goto ags_turtle_load_read_subject_CREATE_NODE; } /* collection */ if(*look_ahead == '('){ collection_node = ags_turtle_load_read_collection(&look_ahead); goto ags_turtle_load_read_subject_CREATE_NODE; } /* create node */ ags_turtle_load_read_subject_CREATE_NODE: if(iri_node != NULL){ node = xmlNewNode(NULL, "rdf-subject"); xmlAddChild(node, iri_node); *iter = look_ahead; }else if(blank_node != NULL){ node = xmlNewNode(NULL, "rdf-subject"); xmlAddChild(node, blank_node); *iter = look_ahead; }else if(collection_node != NULL){ node = xmlNewNode(NULL, "rdf-subject"); xmlAddChild(node, collection_node); *iter = look_ahead; } #ifdef AGS_DEBUG if(node != NULL){ g_message("read rdf-subject"); } #endif return(node); } xmlNode* ags_turtle_load_read_object_list(gchar **iter) { xmlNode *node; xmlNode *object_node; gchar *look_ahead; gchar *start_ptr, *end_ptr; node = NULL; look_ahead = *iter; /* read first object */ object_node = ags_turtle_load_read_object(&look_ahead); if(object_node != NULL){ /* create node */ node = xmlNewNode(NULL, "rdf-object-list"); xmlAddChild(node, object_node); /* iterate */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); while(*look_ahead == ','){ look_ahead++; object_node = ags_turtle_load_read_object(&look_ahead); if(object_node != NULL){ xmlAddChild(node, object_node); look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); } } *iter = look_ahead; } #ifdef AGS_DEBUG if(node != NULL){ g_message("read rdf-object-list"); } #endif return(node); } xmlNode* ags_turtle_load_read_collection(gchar **iter) { xmlNode *node; xmlNode *object_node; gchar *look_ahead; gchar *start_ptr, *end_ptr; node = NULL; look_ahead = *iter; look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); if(*look_ahead == '\0'){ return(NULL); } if(*look_ahead == '('){ start_ptr = look_ahead; look_ahead++; /* create node */ node = xmlNewNode(NULL, "rdf-collection"); /* read objects */ while((object_node = ags_turtle_load_read_object(&look_ahead)) != NULL){ #ifdef AGS_DEBUG g_message("read rdf-collection"); #endif xmlAddChild(node, object_node); } end_ptr = index(look_ahead, ')'); *iter = end_ptr + 1; } return(node); } xmlNode* ags_turtle_load_read_predicate_object_list(gchar **iter) { xmlNode *node; xmlNode *current_verb_node, *current_object_list_node; gchar *look_ahead; node = NULL; look_ahead = *iter; current_verb_node = ags_turtle_load_read_verb(&look_ahead); if(current_verb_node != NULL){ current_object_list_node = ags_turtle_load_read_object_list(&look_ahead); if(current_object_list_node != NULL){ node = xmlNewNode(NULL, "rdf-predicate-object-list"); xmlAddChild(node, current_verb_node); xmlAddChild(node, current_object_list_node); /* iterate */ look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); while(*look_ahead == ';'){ look_ahead++; current_verb_node = ags_turtle_load_read_verb(&look_ahead); if(current_verb_node != NULL){ current_object_list_node = ags_turtle_load_read_object_list(&look_ahead); if(current_object_list_node != NULL){ xmlAddChild(node, current_verb_node); xmlAddChild(node, current_object_list_node); look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); }else{ break; } }else{ break; } } *iter = look_ahead; } } return(node); } xmlNode* ags_turtle_load_read_blank_node_property_list(gchar **iter) { xmlNode *node; xmlNode *predicate_object_list_node; gchar *look_ahead; gchar *start_ptr, *end_ptr; node = NULL; look_ahead = *iter; look_ahead = ags_turtle_load_skip_comments_and_blanks(&look_ahead); if(*look_ahead == '['){ start_ptr = look_ahead; look_ahead++; predicate_object_list_node = ags_turtle_load_read_predicate_object_list(&look_ahead); if(predicate_object_list_node != NULL){ #ifdef AGS_DEBUG g_message("read rdf-blank-node-property-list"); #endif node = xmlNewNode(NULL, "rdf-blank-node-property-list"); xmlAddChild(node, predicate_object_list_node); end_ptr = index(look_ahead, ']'); *iter = end_ptr + 1; } } return(node); } #ifdef AGS_DEBUG g_message("file: %s", turtle->filename); #endif /* entry point - open file and read it */ sb = (struct stat *) malloc(sizeof(struct stat)); stat(turtle->filename, sb); file = fopen(turtle->filename, "r"); if(file == NULL){ return(NULL); } buffer = (gchar *) malloc((sb->st_size + 1) * sizeof(gchar)); if(buffer == NULL){ return(NULL); } n_read = fread(buffer, sizeof(gchar), sb->st_size, file); if(n_read != sb->st_size){ g_critical("number of read bytes doesn't match buffer size"); } buffer[sb->st_size] = '\0'; fclose(file); /* alloc document */ turtle->doc = doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "rdf-turtle-doc"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "version", AGS_TURTLE_DEFAULT_VERSION); iter = buffer; do{ /* skip blanks and comments */ iter = ags_turtle_load_skip_comments_and_blanks(&iter); if(iter >= &(buffer[sb->st_size])){ break; } rdf_statement_node = ags_turtle_load_read_statement(&iter); if(rdf_statement_node != NULL){ xmlAddChild(root_node, rdf_statement_node); } if(rdf_statement_node == NULL){ iter++; } }while(iter < &(buffer[sb->st_size])); free(sb); free(buffer); return(doc); } /** * ags_turtle_new: * @filename: the filename as string * * Instantiate a new #AgsTurtle. * * Returns: the new instance * * Since: 1.0.0 */ AgsTurtle* ags_turtle_new(gchar *filename) { AgsTurtle *turtle; gchar **str; turtle = g_object_new(AGS_TYPE_TURTLE, "filename", filename, NULL); return(turtle); } gsequencer-1.4.24/ags/lib/ags_string_util.h0000644000175000017500000000205313246707333015562 00000000000000/* 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 . */ #ifndef __AGS_STRING_UTIL__ #define __AGS_STRING_UTIL__ #include #include gchar* ags_string_util_escape_single_quote(gchar *str); guint ags_strv_length(gchar **str_array); gboolean ags_strv_contains(gchar **str_array, gchar *str); #endif /*__AGS_STRING_UTIL__*/ gsequencer-1.4.24/ags/lib/ags_time.c0000644000175000017500000000443013246707333014151 00000000000000/* 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 . */ #include #include /** * SECTION:ags_time * @short_description: utility functions of time * @title: AgsTime * @section_id: * @include: ags/lib/ags_time.h * * Functions to help you dealing with time. */ /** * ags_time_get_uptime_from_offset: * @offset: the offset in tics * @bpm: the beats per minute * @delay: the buffer time as delay * @delay_factor: tact segmentation * * Calculates uptime from @offset by applying factors @bpm, @delay and @delay_factor * giving you the result as string. * * Returns: the string containing the time, a minus sign is prepend if factors * are invalid * * Since: 1.0.0 */ gchar* ags_time_get_uptime_from_offset(guint offset, gdouble bpm, gdouble delay, gdouble delay_factor) { gchar *uptime; gdouble delay_min, delay_sec, delay_msec; gdouble tact_redux; guint min, sec, msec; if(bpm <= 0.0 || delay <= 0.0 || delay_factor <= 0.0){ return(g_strdup_printf("-%s", AGS_TIME_ZERO)); } /* translate to time string */ tact_redux = offset; delay_sec = 16.0 * delay_factor * bpm / 60.0; delay_min = delay_sec * 60.0; delay_msec = delay_sec / 1000.0; min = (guint) floor(tact_redux / delay_min); if(min > 0){ tact_redux = tact_redux - (min * delay_min); } sec = (guint) floor(tact_redux / delay_sec); if(sec > 0){ tact_redux = tact_redux - (sec * delay_sec); } msec = (guint) floor(tact_redux / delay_msec); uptime = g_strdup_printf("%.4d:%.2d.%.3d", min, sec, msec); return(uptime); } gsequencer-1.4.24/ags/lib/ags_turtle_manager.h0000644000175000017500000000416613246707333016237 00000000000000/* 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 . */ #ifndef __AGS_TURTLE_MANAGER_H__ #define __AGS_TURTLE_MANAGER_H__ #include #include #define AGS_TYPE_TURTLE_MANAGER (ags_turtle_manager_get_type()) #define AGS_TURTLE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TURTLE_MANAGER, AgsTurtleManager)) #define AGS_TURTLE_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TURTLE_MANAGER, AgsTurtleManagerClass)) #define AGS_IS_TURTLE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TURTLE_MANAGER)) #define AGS_IS_TURTLE_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TURTLE_MANAGER)) #define AGS_TURTLE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_TURTLE_MANAGER, AgsTurtleManagerClass)) typedef struct _AgsTurtleManager AgsTurtleManager; typedef struct _AgsTurtleManagerClass AgsTurtleManagerClass; struct _AgsTurtleManager { GObject object; GList *turtle; }; struct _AgsTurtleManagerClass { GObjectClass object; }; GType ags_turtle_manager_get_type(void); GObject* ags_turtle_manager_find(AgsTurtleManager *turtle_manager, gchar *filename); void ags_turtle_manager_add(AgsTurtleManager *turtle_manager, GObject *turtle); /* */ AgsTurtleManager* ags_turtle_manager_get_instance(); AgsTurtleManager* ags_turtle_manager_new(); #endif /*__AGS_TURTLE_MANAGER_H__*/ gsequencer-1.4.24/ags/lib/ags_complex.c0000644000175000017500000000504313256163135014660 00000000000000/* 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 . */ #include #include /** * SECTION:ags_complex * @short_description: Boxed type of complex * @title: AgsComplex * @section_id: * @include: ags/lib/ags_complex.h * * Boxed type of complex data type. */ GType ags_complex_get_type(void) { static GType ags_type_complex = 0; if(!ags_type_complex){ ags_type_complex = g_boxed_type_register_static("AgsComplex", (GBoxedCopyFunc) ags_complex_copy, (GBoxedFreeFunc) ags_complex_free); } return(ags_type_complex); } /** * ags_complex_alloc: * * Allocate #AgsComplex * * Returns: a new #AgsComplex * * Since: 1.0.0 */ AgsComplex* ags_complex_alloc() { AgsComplex *ptr; ptr = (AgsComplex *) malloc(sizeof(AgsComplex)); ptr[0][0] = 0.0; ptr[0][1] = 0.0; return(ptr); } /** * ags_complex_copy: * @ptr: the original #AgsComplex * * Create a copy of @ptr. * * Returns: a pointer of the new #AgsComplex * * Since: 1.0.0 */ gpointer ags_complex_copy(AgsComplex *ptr) { AgsComplex *new_ptr; new_ptr = (AgsComplex *) malloc(sizeof(AgsComplex)); new_ptr[0][0] = ptr[0][0]; new_ptr[0][1] = ptr[0][1]; return(new_ptr); } /** * ags_complex_free: * @ptr: the #AgsComplex * * Frees the memory of @ptr. * * Since: 1.0.0 */ void ags_complex_free(AgsComplex *ptr) { g_free(ptr); } /** * ags_complex_get: * @ptr: the #AgsComplex * * Get complex number. * * Returns: number as complex data type * * Since: 1.0.0 */ complex ags_complex_get(AgsComplex *ptr) { complex z; z = ptr[0][0] + I * ptr[0][1]; return(z); } /** * ags_complex_set: * @ptr: the #AgsComplex * @z: the complex data to set * * Set complex number. * * Since: 1.0.0 */ void ags_complex_set(AgsComplex *ptr, complex z) { ptr[0][0] = creal(z); ptr[0][1] = cimag(z); } gsequencer-1.4.24/ags/lib/ags_endian.h0000644000175000017500000000160713256163135014456 00000000000000/* 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 . */ #ifndef __AGS_ENDIAN__ #define __AGS_ENDIAN__ #include gfloat ags_endian_swap_float(gfloat x); #endif /*__AGS_ENDIAN__*/ gsequencer-1.4.24/ags/lib/ags_log.h0000644000175000017500000000344313246707333014004 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2016 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 . */ #ifndef __AGS_LOG_H__ #define __AGS_LOG_H__ #include #include #define AGS_TYPE_LOG (ags_log_get_type()) #define AGS_LOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LOG, AgsLog)) #define AGS_LOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LOG, AgsLogClass)) #define AGS_IS_LOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LOG)) #define AGS_IS_LOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LOG)) #define AGS_LOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_LOG, AgsLogClass)) typedef struct _AgsLog AgsLog; typedef struct _AgsLogClass AgsLogClass; struct _AgsLog { GObject gobject; guint flags; pthread_mutex_t *mutex; volatile GList *messages; }; struct _AgsLogClass { GObjectClass gobject; }; GType ags_log_get_type(void); void ags_log_add_message(AgsLog *log, gchar *str); GList* ags_log_get_messages(AgsLog *log); AgsLog* ags_log_get_instance(); AgsLog* ags_log_new(); #endif /*__AGS_LOG_H__*/ gsequencer-1.4.24/ags/lib/ags_turtle.h0000644000175000017500000001110713246707333014536 00000000000000/* 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 . */ #ifndef __AGS_TURTLE_H__ #define __AGS_TURTLE_H__ #include #include #include #define AGS_TYPE_TURTLE (ags_turtle_get_type()) #define AGS_TURTLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TURTLE, AgsTurtle)) #define AGS_TURTLE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TURTLE, AgsTurtleClass)) #define AGS_IS_TURTLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TURTLE)) #define AGS_IS_TURTLE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TURTLE)) #define AGS_TURTLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_TURTLE, AgsTurtleClass)) #define AGS_TURTLE_DEFAULT_ENCODING "UTF-8\0" #define AGS_TURTLE_DEFAULT_VERSION "0.7.3\0" typedef struct _AgsTurtle AgsTurtle; typedef struct _AgsTurtleClass AgsTurtleClass; /** * AgsTurtleFlags: * @AGS_TURTLE_TOLOWER: make all tags and attributes lower case * * Enum values to control the behavior or indicate internal state of #AgsTurtle by * enable/disable as sync_flags. */ typedef enum{ AGS_TURTLE_TOLOWER = 1, }AgsTurtleFlags; struct _AgsTurtle { GObject object; guint flags; gchar *filename; xmlDoc *doc; }; struct _AgsTurtleClass { GObjectClass object; }; GType ags_turtle_get_type(void); /* iri, pname, label and langtag */ gchar* ags_turtle_read_iriref(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_pname_ns(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_pname_ln(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_blank_node_label(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_langtag(gchar *offset, gchar *end_ptr); /* numbers */ gchar* ags_turtle_read_boolean(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_integer(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_decimal(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_double(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_exponent(gchar *offset, gchar *end_ptr); /* literals */ gchar* ags_turtle_read_string(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_string_literal_quote(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_string_literal_single_quote(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_string_literal_long_quote(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_string_literal_long_single_quote(gchar *offset, gchar *end_ptr); /* character ranges might return multi-byte */ gchar* ags_turtle_read_uchar(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_echar(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_ws(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_anon(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_pn_chars_base(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_pn_chars_u(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_pn_chars(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_pn_prefix(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_pn_local(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_plx(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_percent(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_hex(gchar *offset, gchar *end_ptr); gchar* ags_turtle_read_pn_local_esc(gchar *offset, gchar *end_ptr); /* XML related */ GList* ags_turtle_find_xpath(AgsTurtle *turtle, gchar *xpath); GList* ags_turtle_find_xpath_with_context_node(AgsTurtle *turtle, gchar *xpath, xmlNode *context_node); gchar* ags_turtle_string_convert(AgsTurtle *turtle, gchar *str); xmlDoc* ags_turtle_load(AgsTurtle *turtle, GError **error); AgsTurtle* ags_turtle_new(gchar *filename); #endif /*__AGS_TURTLE_H__*/ gsequencer-1.4.24/ags/test/0000755000175000017500000000000013256233673012507 500000000000000gsequencer-1.4.24/ags/test/thread/0000755000175000017500000000000013256233676013761 500000000000000gsequencer-1.4.24/ags/test/thread/file/0000755000175000017500000000000013256233676014700 500000000000000gsequencer-1.4.24/ags/test/thread/file/ags_thread_file_xml_test.c0000644000175000017500000003272313246707333022005 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_thread_file_xml_test_init_suite(); int ags_thread_file_xml_test_clean_suite(); void ags_file_test_read_thread(); void ags_file_test_write_thread(); void ags_file_test_read_thread_list(); void ags_file_test_write_thread_list(); void ags_file_test_read_thread_pool(); void ags_file_test_write_thread_pool(); void ags_file_test_read_timestamp(); void ags_file_test_write_timestamp(); void ags_file_test_read_timestamp_list(); void ags_file_test_write_timestamp_list(); #define AGS_THREAD_XML_FILE_TEST_DOCTYPE_TEMPLATE "\n" #define AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE AGS_THREAD_XML_FILE_TEST_DOCTYPE_TEMPLATE \ "\n" \ "\n" #define AGS_FILE_TEST_READ_THREAD_DOC AGS_THREAD_XML_FILE_TEST_DOCTYPE_TEMPLATE \ "\n" \ "\n" \ "\n" #define AGS_FILE_TEST_READ_THREAD_LIST_DOC AGS_THREAD_XML_FILE_TEST_DOCTYPE_TEMPLATE \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" #define AGS_FILE_TEST_READ_THREAD_POOL_DOC AGS_THREAD_XML_FILE_TEST_DOCTYPE_TEMPLATE \ "\n" \ "\n" \ "\n" #define AGS_FILE_TEST_READ_TIMESTAMP_DOC AGS_THREAD_XML_FILE_TEST_DOCTYPE_TEMPLATE \ "\n" \ "0\n" \ "\n" #define AGS_FILE_TEST_READ_TIMESTAMP_LIST_DOC AGS_THREAD_XML_FILE_TEST_DOCTYPE_TEMPLATE \ "\n" \ "\n" \ "0\n" \ "0\n" \ "0\n" \ "\n" \ "\n" /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_thread_file_xml_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_thread_file_xml_test_clean_suite() { return(0); } void ags_file_test_read_thread() { AgsThread *thread; AgsFile *file; xmlDoc *doc; xmlNode *root_node, *child; thread = NULL; file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_FILE_TEST_READ_THREAD_DOC, strlen(AGS_FILE_TEST_READ_THREAD_DOC), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* child */ child = root_node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-thread", child->name, 11)){ ags_file_read_thread(file, child, &thread); break; } } child = child->next; } CU_ASSERT(AGS_IS_THREAD(thread) && thread->freq == 125.0); } void ags_file_test_write_thread() { AgsThread *thread; AgsFile *file; xmlDoc *doc; xmlNode *root_node, *node; thread = g_object_new(AGS_TYPE_THREAD, NULL); thread->freq = 250.0; file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE, strlen(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* node */ node = ags_file_write_thread(file, root_node, thread); CU_ASSERT(node != NULL && node->parent == root_node && !xmlStrncmp(node->name, "ags-thread", 11) && !xmlStrncmp(xmlGetProp(node, "frequency"), "250.0", 6)); } void ags_file_test_read_thread_list() { AgsFile *file; xmlDoc *doc; xmlNode *root_node, *child; GList *list; list = NULL; file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_FILE_TEST_READ_THREAD_LIST_DOC, strlen(AGS_FILE_TEST_READ_THREAD_LIST_DOC), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* child */ child = root_node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-thread-list", child->name, 16)){ ags_file_read_thread_list(file, child, &list); break; } } child = child->next; } CU_ASSERT(list != NULL && g_list_length(list) == 3); } void ags_file_test_write_thread_list() { AgsThread *thread; AgsFile *file; xmlDoc *doc; xmlNode *root_node, *child; GList *list; list = NULL; /* create some threads */ thread = g_object_new(AGS_TYPE_THREAD, NULL); thread->freq = 250.0; list = g_list_prepend(list, thread); thread = g_object_new(AGS_TYPE_THREAD, NULL); thread->freq = 125.0; list = g_list_prepend(list, thread); thread = g_object_new(AGS_TYPE_THREAD, NULL); thread->freq = 48.0; list = g_list_prepend(list, thread); /* create file object */ file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE, strlen(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* write thread list */ child = ags_file_write_thread_list(file, root_node, list); CU_ASSERT(child != NULL && child->parent == root_node && !xmlStrncmp(child->name, "ags-thread-list", 16)); } void ags_file_test_read_thread_pool() { AgsThreadPool *thread_pool; AgsFile *file; xmlDoc *doc; xmlNode *root_node, *child; thread_pool = NULL; file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_FILE_TEST_READ_THREAD_POOL_DOC, strlen(AGS_FILE_TEST_READ_THREAD_POOL_DOC), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* child */ child = root_node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-thread-pool", child->name, 16)){ ags_file_read_thread_pool(file, child, &thread_pool); break; } } child = child->next; } CU_ASSERT(AGS_IS_THREAD_POOL(thread_pool)); } void ags_file_test_write_thread_pool() { AgsThreadPool *thread_pool; AgsFile *file; xmlDoc *doc; xmlNode *root_node, *child; thread_pool = g_object_new(AGS_TYPE_THREAD_POOL, NULL); file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE, strlen(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* node */ child = ags_file_write_thread_pool(file, root_node, thread_pool); CU_ASSERT(child != NULL && child->parent == root_node && !xmlStrncmp(child->name, "ags-thread-pool", 16)); } void ags_file_test_read_timestamp() { AgsTimestamp *timestamp; AgsFile *file; xmlDoc *doc; xmlNode *root_node, *child; timestamp = NULL; file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_FILE_TEST_READ_TIMESTAMP_DOC, strlen(AGS_FILE_TEST_READ_TIMESTAMP_DOC), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* child */ child = root_node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-timestamp", child->name, 14)){ ags_file_read_timestamp(file, child, ×tamp); break; } } child = child->next; } CU_ASSERT(AGS_IS_TIMESTAMP(timestamp) && timestamp->delay == 0.0 && timestamp->attack == 0); } void ags_file_test_write_timestamp() { AgsTimestamp *timestamp; AgsFile *file; xmlDoc *doc; xmlNode *root_node, *child; timestamp = g_object_new(AGS_TYPE_TIMESTAMP, NULL); file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE, strlen(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* node */ child = ags_file_write_timestamp(file, root_node, timestamp); CU_ASSERT(child != NULL && child->parent == root_node && !xmlStrncmp(child->name, "ags-timestamp", 14)); } void ags_file_test_read_timestamp_list() { AgsFile *file; xmlDoc *doc; xmlNode *root_node, *child; GList *list; list = NULL; file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_FILE_TEST_READ_TIMESTAMP_LIST_DOC, strlen(AGS_FILE_TEST_READ_TIMESTAMP_LIST_DOC), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* child */ child = root_node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-timestamp-list", child->name, 18)){ ags_file_read_timestamp_list(file, child, &list); break; } } child = child->next; } CU_ASSERT(list != NULL && g_list_length(list) == 3); } void ags_file_test_write_timestamp_list() { AgsTimestamp *timestamp; AgsFile *file; xmlDoc *doc; xmlNode *root_node, *child; GList *list; list = NULL; /* create some timestamps */ timestamp = g_object_new(AGS_TYPE_TIMESTAMP, NULL); list = g_list_prepend(list, timestamp); timestamp = g_object_new(AGS_TYPE_TIMESTAMP, NULL); list = g_list_prepend(list, timestamp); timestamp = g_object_new(AGS_TYPE_TIMESTAMP, NULL); list = g_list_prepend(list, timestamp); /* create file object */ file = g_object_new(AGS_TYPE_FILE, NULL); doc = xmlReadMemory(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE, strlen(AGS_THREAD_XML_FILE_TEST_DOC_TEMPLATE), NULL, NULL, 0); root_node = xmlDocGetRootElement(doc); g_object_set(file, "xml-doc", doc, NULL); /* write timestamp list */ child = ags_file_write_timestamp_list(file, root_node, list); CU_ASSERT(child != NULL && child->parent == root_node && !xmlStrncmp(child->name, "ags-timestamp-list", 18)); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsThreadFileXmlTest", ags_thread_file_xml_test_init_suite, ags_thread_file_xml_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsThreadFileXml read thread", ags_file_test_read_thread) == NULL) || (CU_add_test(pSuite, "test of AgsThreadFileXml write thread", ags_file_test_write_thread) == NULL) || (CU_add_test(pSuite, "test of AgsThreadFileXml read thread list", ags_file_test_read_thread_list) == NULL) || (CU_add_test(pSuite, "test of AgsThreadFileXml write thread list", ags_file_test_write_thread_list) == NULL) || (CU_add_test(pSuite, "test of AgsThreadFileXml read thread pool", ags_file_test_read_thread_pool) == NULL) || (CU_add_test(pSuite, "test of AgsThreadFileXml write thread pool", ags_file_test_write_thread_pool) == NULL) || (CU_add_test(pSuite, "test of AgsThreadFileXml read timestamp", ags_file_test_read_timestamp) == NULL) || (CU_add_test(pSuite, "test of AgsThreadFileXml write timestamp", ags_file_test_write_timestamp) == NULL) || (CU_add_test(pSuite, "test of AgsThreadFileXml read timestamp list", ags_file_test_read_timestamp_list) == NULL) || (CU_add_test(pSuite, "test of AgsThreadFileXml write timestamp list", ags_file_test_write_timestamp_list) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_thread_test.c0000644000175000017500000011515613246707333017211 00000000000000/* 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 . */ #include #include #include #include #include #include int ags_thread_test_init_suite(); int ags_thread_test_clean_suite(); void ags_thread_test_sync(); void ags_thread_test_lock(); void ags_thread_test_trylock(); void ags_thread_test_get_toplevel(); void ags_thread_test_first(); void ags_thread_test_last(); void ags_thread_test_remove_child(); void ags_thread_test_add_child(); void ags_thread_test_parental_is_locked(); void ags_thread_test_sibling_is_locked(); void ags_thread_test_children_is_locked(); void ags_thread_test_is_current_ready(); void ags_thread_test_is_tree_ready(); void ags_thread_test_next_parent_locked(); void ags_thread_test_next_sibling_locked(); void ags_thread_test_next_children_locked(); void ags_thread_test_lock_parent(); void ags_thread_test_lock_sibling(); void ags_thread_test_lock_children(); void ags_thread_test_lock_all(); void ags_thread_test_wait_parent(); void ags_thread_test_wait_sibling(); void ags_thread_test_wait_children(); void ags_thread_test_suspend(); void ags_thread_test_timelock(); void ags_thread_test_stop(); #define AGS_THREAD_TEST_SYNC_N_THREADS (16) #define AGS_THREAD_TEST_LOCK_N_THREADS (4) #define AGS_THREAD_TEST_GET_TOPLEVEL_N_LEVELS (7) #define AGS_THREAD_TEST_FIRST_N_THREADS (16) #define AGS_THREAD_TEST_LAST_N_THREADS (16) #define AGS_THREAD_TEST_REMOVE_CHILD_N_THREADS (16) #define AGS_THREAD_TEST_ADD_CHILD_N_THREADS (16) #define AGS_THREAD_TEST_LOCK_PARENT_PARENT_COUNT (8) #define AGS_THREAD_TEST_LOCK_SIBLING_SIBLING_COUNT (64) #define AGS_THREAD_TEST_LOCK_CHILDREN_CHILDREN_COUNT (8) AgsApplicationContext *application_context; AgsThread *main_loop; pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_thread_test_init_suite() { application_context = ags_application_context_new(NULL, NULL); main_loop = ags_generic_main_loop_new(application_context); ags_main_loop_set_async_queue(AGS_MAIN_LOOP(main_loop), ags_task_thread_new()); ags_thread_start(main_loop); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_thread_test_clean_suite() { ags_thread_stop(main_loop); g_object_unref(main_loop); g_object_unref(application_context); return(0); } void ags_thread_test_sync() { AgsThread *main_loop; AgsThread **thread; volatile guint n_waiting; guint i; auto void* ags_thread_test_sync_waiter_thread(void *ptr); void* ags_thread_test_sync_waiter_thread(void *ptr){ AgsThread *thread; thread = (AgsThread *) ptr; pthread_mutex_lock(thread->mutex); g_atomic_int_inc(&n_waiting); while(((AGS_THREAD_WAIT_0 & (g_atomic_int_get(&(thread->flags)))) != 0) || ((AGS_THREAD_WAIT_1 & (g_atomic_int_get(&(thread->flags)))) != 0) || ((AGS_THREAD_WAIT_2 & (g_atomic_int_get(&(thread->flags)))) != 0)){ pthread_cond_wait(thread->cond, thread->mutex); } pthread_mutex_unlock(thread->mutex); pthread_exit(NULL); } main_loop = ags_generic_main_loop_new(application_context); ags_main_loop_set_async_queue(AGS_MAIN_LOOP(main_loop), ags_task_thread_new()); g_atomic_int_set(&n_waiting, 0); thread = (AgsThread **) malloc(AGS_THREAD_TEST_SYNC_N_THREADS * sizeof(AgsThread*)); for(i = 0; i < AGS_THREAD_TEST_SYNC_N_THREADS; i++){ thread[i] = ags_thread_new(NULL); ags_thread_add_child_extended(main_loop, thread[i], TRUE, TRUE); } /* check AGS_THREAD_WAIT_0 - setup */ g_atomic_int_or(&(main_loop->flags), AGS_THREAD_WAIT_0); pthread_create(main_loop->thread, &(main_loop->thread_attr), ags_thread_test_sync_waiter_thread, main_loop); for(i = 0; i < AGS_THREAD_TEST_SYNC_N_THREADS; i++){ g_atomic_int_or(&(thread[i]->flags), AGS_THREAD_WAIT_0); /* since signal expects a thread waiting we do one */ pthread_create(thread[i]->thread, &(thread[i]->thread_attr), ags_thread_test_sync_waiter_thread, thread[i]); } /* wait until all waiting */ while(n_waiting < AGS_THREAD_TEST_SYNC_N_THREADS + 1){ usleep(4); } /* call sync all */ ags_thread_set_sync_all(main_loop, 0); /* assert flag not set anymore */ CU_ASSERT((AGS_THREAD_WAIT_0 & (g_atomic_int_get(&(main_loop->flags)))) == 0); for(i = 0; i < AGS_THREAD_TEST_SYNC_N_THREADS; i++){ CU_ASSERT((AGS_THREAD_WAIT_0 & (g_atomic_int_get(&(thread[i]->flags)))) == 0); } /* check AGS_THREAD_WAIT_1 - setup */ g_atomic_int_or(&(main_loop->flags), AGS_THREAD_WAIT_1); pthread_create(main_loop->thread, &(main_loop->thread_attr), ags_thread_test_sync_waiter_thread, main_loop); for(i = 0; i < AGS_THREAD_TEST_SYNC_N_THREADS; i++){ g_atomic_int_or(&(thread[i]->flags), AGS_THREAD_WAIT_1); /* since signal expects a thread waiting we do one */ pthread_create(thread[i]->thread, &(thread[i]->thread_attr), ags_thread_test_sync_waiter_thread, thread[i]); } /* wait until all waiting */ while(n_waiting < AGS_THREAD_TEST_SYNC_N_THREADS + 1){ usleep(4); } /* call sync all */ ags_thread_set_sync_all(main_loop, 1); /* assert flag not set anymore */ CU_ASSERT((AGS_THREAD_WAIT_1 & (g_atomic_int_get(&(main_loop->flags)))) == 0); for(i = 0; i < AGS_THREAD_TEST_SYNC_N_THREADS; i++){ CU_ASSERT((AGS_THREAD_WAIT_1 & (g_atomic_int_get(&(thread[i]->flags)))) == 0); } /* check AGS_THREAD_WAIT_2 - setup */ g_atomic_int_or(&(main_loop->flags), AGS_THREAD_WAIT_2); pthread_create(main_loop->thread, &(main_loop->thread_attr), ags_thread_test_sync_waiter_thread, main_loop); for(i = 0; i < AGS_THREAD_TEST_SYNC_N_THREADS; i++){ g_atomic_int_or(&(thread[i]->flags), AGS_THREAD_WAIT_2); /* since signal expects a thread waiting we do one */ pthread_create(thread[i]->thread, &(thread[i]->thread_attr), ags_thread_test_sync_waiter_thread, thread[i]); } /* wait until all waiting */ while(n_waiting < AGS_THREAD_TEST_SYNC_N_THREADS + 1){ usleep(4); } /* call sync all */ ags_thread_set_sync_all(main_loop, 2); /* assert flag not set anymore */ CU_ASSERT((AGS_THREAD_WAIT_2 & (g_atomic_int_get(&(main_loop->flags)))) == 0); for(i = 0; i < AGS_THREAD_TEST_SYNC_N_THREADS; i++){ CU_ASSERT((AGS_THREAD_WAIT_2 & (g_atomic_int_get(&(thread[i]->flags)))) == 0); } } void ags_thread_test_lock() { AgsThread **thread; guint i; pthread_t assert_thread; auto void* ags_thread_test_lock_assert_locked(void *ptr); void* ags_thread_test_lock_assert_locked(void *ptr){ AgsThread **thread; guint i; thread = (AgsThread **) ptr; for(i = 0; i < AGS_THREAD_TEST_LOCK_N_THREADS; i++){ CU_ASSERT(ags_thread_trylock(thread[i]) == FALSE); } pthread_exit(NULL); } thread = (AgsThread **) malloc(AGS_THREAD_TEST_LOCK_N_THREADS * sizeof(AgsThread*)); for(i = 0; i < AGS_THREAD_TEST_LOCK_N_THREADS; i++){ thread[i] = ags_thread_new(NULL); ags_thread_add_child_extended(main_loop, thread[i], TRUE, TRUE); } /* lock the threads */ for(i = 0; i < AGS_THREAD_TEST_LOCK_N_THREADS; i++){ ags_thread_lock(thread[i]); } /* try to lock from another thread */ pthread_create(&assert_thread, NULL, ags_thread_test_lock_assert_locked, thread); pthread_join(assert_thread, NULL); /* unlock the threads */ for(i = 0; i < AGS_THREAD_TEST_LOCK_N_THREADS; i++){ ags_thread_unlock(thread[i]); } } void ags_thread_test_trylock() { //TODO:JK: implement me } void ags_thread_test_get_toplevel() { AgsThread *main_loop; AgsThread *thread, *current; guint i; main_loop = ags_generic_main_loop_new(application_context); thread = main_loop; for(i = 0; i < AGS_THREAD_TEST_GET_TOPLEVEL_N_LEVELS; i++){ current = ags_thread_new(NULL); ags_thread_add_child_extended(thread, current, TRUE, TRUE); thread = current; } CU_ASSERT(ags_thread_get_toplevel(thread) == main_loop); } void ags_thread_test_first() { AgsThread *parent; AgsThread **thread; AgsThread *first_thread; guint i; parent = ags_thread_new(NULL); ags_thread_add_child_extended(main_loop, parent, TRUE, TRUE); thread = (AgsThread **) malloc(AGS_THREAD_TEST_FIRST_N_THREADS * sizeof(AgsThread*)); for(i = 0; i < AGS_THREAD_TEST_FIRST_N_THREADS; i++){ thread[i] = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread[i], TRUE, TRUE); } first_thread = thread[0]; for(i = 0; i < AGS_THREAD_TEST_FIRST_N_THREADS; i++){ CU_ASSERT(ags_thread_first(thread[i]) == first_thread); } } void ags_thread_test_last() { AgsThread *parent; AgsThread **thread; AgsThread *last_thread; guint i; parent = ags_thread_new(NULL); ags_thread_add_child_extended(main_loop, parent, TRUE, TRUE); thread = (AgsThread **) malloc(AGS_THREAD_TEST_LAST_N_THREADS * sizeof(AgsThread*)); for(i = 0; i < AGS_THREAD_TEST_LAST_N_THREADS; i++){ thread[i] = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread[i], TRUE, TRUE); } last_thread = thread[AGS_THREAD_TEST_LAST_N_THREADS - 1]; for(i = 0; i < AGS_THREAD_TEST_LAST_N_THREADS; i++){ CU_ASSERT(ags_thread_last(thread[i]) == last_thread); } } void ags_thread_test_remove_child() { AgsThread *parent; AgsThread **thread; AgsThread *current; guint i; parent = ags_thread_new(NULL); ags_thread_add_child_extended(main_loop, parent, TRUE, TRUE); thread = (AgsThread **) malloc(AGS_THREAD_TEST_REMOVE_CHILD_N_THREADS * sizeof(AgsThread*)); for(i = 0; i < AGS_THREAD_TEST_REMOVE_CHILD_N_THREADS; i++){ thread[i] = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread[i], TRUE, TRUE); } for(i = 0; i < AGS_THREAD_TEST_REMOVE_CHILD_N_THREADS; i++){ g_object_ref(thread[i]); ags_thread_remove_child(parent, thread[i]); current = g_atomic_pointer_get(&(parent->children)); while(current != NULL){ CU_ASSERT(current != thread[i]); current = g_atomic_pointer_get(&(current->next)); } CU_ASSERT(g_atomic_pointer_get(&(thread[i]->parent)) == NULL); g_object_unref(thread[i]); } } void ags_thread_test_add_child() { AgsThread *parent; AgsThread **thread; AgsThread *current; guint i; gboolean success; parent = ags_thread_new(NULL); ags_thread_add_child_extended(main_loop, parent, TRUE, TRUE); thread = (AgsThread **) malloc(AGS_THREAD_TEST_ADD_CHILD_N_THREADS * sizeof(AgsThread*)); for(i = 0; i < AGS_THREAD_TEST_ADD_CHILD_N_THREADS; i++){ thread[i] = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread[i], TRUE, TRUE); current = g_atomic_pointer_get(&(parent->children)); success = FALSE; while(current != NULL){ if(current = thread[i]){ success = TRUE; break; } current = g_atomic_pointer_get(&(current->next)); } CU_ASSERT(success); CU_ASSERT(g_atomic_pointer_get(&(thread[i]->parent)) == parent); } } void ags_thread_test_parental_is_locked() { AgsThread *parent; AgsThread *thread; parent = ags_thread_new(NULL); thread = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread, TRUE, TRUE); CU_ASSERT(ags_thread_parental_is_locked(thread, NULL) == FALSE); ags_thread_lock(parent); CU_ASSERT(ags_thread_parental_is_locked(thread, NULL) == TRUE); ags_thread_unlock(parent); } void ags_thread_test_sibling_is_locked() { AgsThread *parent; AgsThread *thread_0, *thread_1; parent = ags_thread_new(NULL); thread_0 = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread_0, TRUE, TRUE); thread_1 = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread_1, TRUE, TRUE); /* thread 0 locked */ CU_ASSERT(ags_thread_sibling_is_locked(thread_1) == FALSE); ags_thread_lock(thread_0); CU_ASSERT(ags_thread_sibling_is_locked(thread_1) == TRUE); ags_thread_unlock(thread_0); /* thread 1 locked */ CU_ASSERT(ags_thread_sibling_is_locked(thread_0) == FALSE); ags_thread_lock(thread_1); CU_ASSERT(ags_thread_sibling_is_locked(thread_0) == TRUE); ags_thread_unlock(thread_1); } void ags_thread_test_children_is_locked() { AgsThread *parent; AgsThread *thread_0, *thread_1; parent = ags_thread_new(NULL); thread_0 = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread_0, TRUE, TRUE); thread_1 = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread_1, TRUE, TRUE); /* thread 0 locked */ CU_ASSERT(ags_thread_children_is_locked(parent) == FALSE); ags_thread_lock(thread_0); CU_ASSERT(ags_thread_children_is_locked(parent) == TRUE); ags_thread_unlock(thread_0); /* thread 1 locked */ CU_ASSERT(ags_thread_children_is_locked(parent) == FALSE); ags_thread_lock(thread_1); CU_ASSERT(ags_thread_children_is_locked(parent) == TRUE); ags_thread_unlock(thread_1); } void ags_thread_test_is_current_ready() { AgsThread *parent; AgsThread *thread; parent = ags_thread_new(NULL); thread = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread, TRUE, TRUE); /* not ready at all */ CU_ASSERT(ags_thread_is_current_ready(parent, 0) == TRUE); CU_ASSERT(ags_thread_is_current_ready(thread, 0) == TRUE); CU_ASSERT(ags_thread_is_current_ready(parent, 1) == TRUE); CU_ASSERT(ags_thread_is_current_ready(thread, 1) == TRUE); CU_ASSERT(ags_thread_is_current_ready(parent, 2) == TRUE); CU_ASSERT(ags_thread_is_current_ready(thread, 2) == TRUE); /* wait 0 ready */ g_atomic_int_or(&(parent->flags), AGS_THREAD_WAIT_0); g_atomic_int_or(&(thread->flags), AGS_THREAD_WAIT_0); CU_ASSERT(ags_thread_is_current_ready(parent, 0) == TRUE); CU_ASSERT(ags_thread_is_current_ready(thread, 0) == TRUE); g_atomic_int_and(&(parent->flags), ~AGS_THREAD_WAIT_0); g_atomic_int_and(&(thread->flags), ~AGS_THREAD_WAIT_0); /* wait 1 ready */ g_atomic_int_or(&(parent->flags), AGS_THREAD_WAIT_1); g_atomic_int_or(&(thread->flags), AGS_THREAD_WAIT_1); CU_ASSERT(ags_thread_is_current_ready(parent, 1) == TRUE); CU_ASSERT(ags_thread_is_current_ready(thread, 1) == TRUE); g_atomic_int_and(&(parent->flags), ~AGS_THREAD_WAIT_1); g_atomic_int_and(&(thread->flags), ~AGS_THREAD_WAIT_1); /* wait 2 ready */ g_atomic_int_or(&(parent->flags), AGS_THREAD_WAIT_2); g_atomic_int_or(&(thread->flags), AGS_THREAD_WAIT_2); CU_ASSERT(ags_thread_is_current_ready(parent, 2) == TRUE); CU_ASSERT(ags_thread_is_current_ready(thread, 2) == TRUE); g_atomic_int_and(&(parent->flags), ~AGS_THREAD_WAIT_2); g_atomic_int_and(&(thread->flags), ~AGS_THREAD_WAIT_2); } void ags_thread_test_is_tree_ready() { AgsThread *parent; AgsThread *thread; parent = ags_thread_new(NULL); thread = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread, TRUE, TRUE); /* not ready at all */ CU_ASSERT(ags_thread_is_tree_ready(parent, 0) == TRUE); CU_ASSERT(ags_thread_is_tree_ready(parent, 1) == TRUE); CU_ASSERT(ags_thread_is_tree_ready(parent, 2) == TRUE); /* wait 0 ready */ g_atomic_int_or(&(parent->flags), AGS_THREAD_WAIT_0); g_atomic_int_or(&(thread->flags), AGS_THREAD_WAIT_0); CU_ASSERT(ags_thread_is_tree_ready(parent, 0) == TRUE); g_atomic_int_and(&(parent->flags), ~AGS_THREAD_WAIT_0); g_atomic_int_and(&(thread->flags), ~AGS_THREAD_WAIT_0); /* wait 1 ready */ g_atomic_int_or(&(parent->flags), AGS_THREAD_WAIT_1); g_atomic_int_or(&(thread->flags), AGS_THREAD_WAIT_1); CU_ASSERT(ags_thread_is_tree_ready(parent, 1) == TRUE); g_atomic_int_and(&(parent->flags), ~AGS_THREAD_WAIT_1); g_atomic_int_and(&(thread->flags), ~AGS_THREAD_WAIT_1); /* wait 2 ready */ g_atomic_int_or(&(parent->flags), AGS_THREAD_WAIT_2); g_atomic_int_or(&(thread->flags), AGS_THREAD_WAIT_2); CU_ASSERT(ags_thread_is_tree_ready(parent, 2) == TRUE); g_atomic_int_and(&(parent->flags), ~AGS_THREAD_WAIT_2); g_atomic_int_and(&(thread->flags), ~AGS_THREAD_WAIT_2); } void ags_thread_test_next_parent_locked() { AgsThread *toplevel; AgsThread *locked_thread_level_1_a; AgsThread *locked_thread_level_2_a; AgsThread *locked_thread_level_3_a; AgsThread *locked_thread_level_1_b; AgsThread *locked_thread_level_2_b; AgsThread *locked_thread_level_1_c; AgsThread *locked_thread_level_1_d; AgsThread *locked_thread_level_3_d; AgsThread *thread_level_4_a; AgsThread *thread_level_4_b; AgsThread *thread_level_4_c; AgsThread *thread_level_4_d; AgsThread *current, *parent; toplevel = ags_generic_main_loop_new(NULL); /* thread group a */ locked_thread_level_1_a = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, locked_thread_level_1_a, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_1_a->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); locked_thread_level_2_a = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_1_a, locked_thread_level_2_a, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_2_a->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); locked_thread_level_3_a = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_2_a, locked_thread_level_3_a, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_3_a->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); thread_level_4_a = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_3_a, thread_level_4_a, TRUE, TRUE); /* thread group b */ locked_thread_level_1_b = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, locked_thread_level_1_b, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_1_b->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); locked_thread_level_2_b = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_1_b, locked_thread_level_2_b, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_2_b->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); current = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_2_b, current, TRUE, TRUE); parent = current; thread_level_4_b = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread_level_4_b, TRUE, TRUE); /* thread group c */ locked_thread_level_1_c = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, locked_thread_level_1_c, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_1_c->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); current = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_1_c, current, TRUE, TRUE); parent = current; current = ags_thread_new(NULL); ags_thread_add_child_extended(parent, current, TRUE, TRUE); parent = current; current = ags_thread_new(NULL); ags_thread_add_child_extended(parent, current, TRUE, TRUE); thread_level_4_c = ags_thread_new(NULL); ags_thread_add_child_extended(current, thread_level_4_c, TRUE, TRUE); /* thread group d */ locked_thread_level_1_d = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, locked_thread_level_1_d, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_1_d->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); current = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_1_d, current, TRUE, TRUE); parent = current; locked_thread_level_3_d = ags_thread_new(NULL); ags_thread_add_child_extended(parent, locked_thread_level_3_d, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_3_d->sync_flags), AGS_THREAD_WAITING_FOR_CHILDREN); thread_level_4_d = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_3_d, thread_level_4_d, TRUE, TRUE); /* assert thread group a */ current = thread_level_4_a; CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == locked_thread_level_3_a); CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == locked_thread_level_2_a); CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == locked_thread_level_1_a); CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == NULL); /* assert thread group b */ current = thread_level_4_b; CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == locked_thread_level_2_b); CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == locked_thread_level_1_b); CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == NULL); /* assert thread group c */ current = thread_level_4_c; CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == locked_thread_level_1_c); CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == NULL); /* assert thread group d */ current = thread_level_4_d; CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == locked_thread_level_3_d); CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == locked_thread_level_1_d); CU_ASSERT((current = ags_thread_next_parent_locked(current, NULL)) == NULL); } void ags_thread_test_next_sibling_locked() { AgsThread *toplevel; AgsThread *sibling0; AgsThread *sibling1; AgsThread *sibling3; AgsThread *sibling7; AgsThread *current, *prev; toplevel = ags_generic_main_loop_new(NULL); /* create sibling */ sibling0 = current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); sibling1 = current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); g_atomic_int_or(&(current->sync_flags), AGS_THREAD_WAITING_FOR_SIBLING); current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); sibling3 = current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); g_atomic_int_or(&(current->sync_flags), AGS_THREAD_WAITING_FOR_SIBLING); current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); sibling7 = current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); g_atomic_int_or(&(current->sync_flags), AGS_THREAD_WAITING_FOR_SIBLING); current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); /* assert sibling */ current = sibling0; CU_ASSERT((current = ags_thread_next_sibling_locked(current)) == sibling1); g_atomic_int_and(&(sibling1->sync_flags), (~AGS_THREAD_WAITING_FOR_SIBLING)); CU_ASSERT((current = ags_thread_next_sibling_locked(current)) == sibling3); g_atomic_int_and(&(sibling3->sync_flags), (~AGS_THREAD_WAITING_FOR_SIBLING)); CU_ASSERT((current = ags_thread_next_sibling_locked(current)) == sibling7); g_atomic_int_and(&(sibling7->sync_flags), (~AGS_THREAD_WAITING_FOR_SIBLING)); CU_ASSERT((current = ags_thread_next_sibling_locked(current)) == NULL); } void ags_thread_test_next_children_locked() { AgsThread *toplevel; AgsThread *locked_thread_level_1_a; AgsThread *locked_thread_level_2_a; AgsThread *locked_thread_level_3_a; AgsThread *locked_thread_level_1_b; AgsThread *locked_thread_level_2_b; AgsThread *locked_thread_level_1_c; AgsThread *locked_thread_level_1_d; AgsThread *locked_thread_level_3_d; AgsThread *thread_level_4_a; AgsThread *thread_level_4_b; AgsThread *thread_level_4_c; AgsThread *thread_level_4_d; AgsThread *current, *parent; toplevel = ags_generic_main_loop_new(NULL); /* thread group a */ locked_thread_level_1_a = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, locked_thread_level_1_a, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_1_a->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); locked_thread_level_2_a = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_1_a, locked_thread_level_2_a, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_2_a->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); locked_thread_level_3_a = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_2_a, locked_thread_level_3_a, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_3_a->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); thread_level_4_a = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_3_a, thread_level_4_a, TRUE, TRUE); /* thread group b */ locked_thread_level_1_b = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, locked_thread_level_1_b, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_1_b->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); locked_thread_level_2_b = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_1_b, locked_thread_level_2_b, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_2_b->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); current = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_2_b, current, TRUE, TRUE); parent = current; thread_level_4_b = ags_thread_new(NULL); ags_thread_add_child_extended(parent, thread_level_4_b, TRUE, TRUE); /* thread group c */ locked_thread_level_1_c = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, locked_thread_level_1_c, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_1_c->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); current = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_1_c, current, TRUE, TRUE); parent = current; current = ags_thread_new(NULL); ags_thread_add_child_extended(parent, current, TRUE, TRUE); parent = current; current = ags_thread_new(NULL); ags_thread_add_child_extended(parent, current, TRUE, TRUE); thread_level_4_c = ags_thread_new(NULL); ags_thread_add_child_extended(current, thread_level_4_c, TRUE, TRUE); /* thread group d */ locked_thread_level_1_d = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, locked_thread_level_1_d, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_1_d->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); current = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_1_d, current, TRUE, TRUE); parent = current; locked_thread_level_3_d = ags_thread_new(NULL); ags_thread_add_child_extended(parent, locked_thread_level_3_d, TRUE, TRUE); g_atomic_int_or(&(locked_thread_level_3_d->sync_flags), AGS_THREAD_WAITING_FOR_PARENT); thread_level_4_d = ags_thread_new(NULL); ags_thread_add_child_extended(locked_thread_level_3_d, thread_level_4_d, TRUE, TRUE); /* assert children */ //NOTE:JK: don't touch because you need the order current = toplevel; /* assert group d */ CU_ASSERT((current = ags_thread_next_children_locked(current)) == locked_thread_level_3_d); g_atomic_int_and(&(locked_thread_level_3_d->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); current = toplevel; CU_ASSERT((current = ags_thread_next_children_locked(current)) == locked_thread_level_1_d); g_atomic_int_and(&(locked_thread_level_1_d->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); /* assert group c */ current = toplevel; CU_ASSERT((current = ags_thread_next_children_locked(current)) == locked_thread_level_1_c); g_atomic_int_and(&(locked_thread_level_1_c->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); /* assert group b */ current = toplevel; CU_ASSERT((current = ags_thread_next_children_locked(current)) == locked_thread_level_2_b); g_atomic_int_and(&(locked_thread_level_2_b->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); current = toplevel; CU_ASSERT((current = ags_thread_next_children_locked(current)) == locked_thread_level_1_b); g_atomic_int_and(&(locked_thread_level_1_b->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); /* assert group a */ current = toplevel; CU_ASSERT((current = ags_thread_next_children_locked(current)) == locked_thread_level_3_a); g_atomic_int_and(&(locked_thread_level_3_a->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); current = toplevel; CU_ASSERT((current = ags_thread_next_children_locked(current)) == locked_thread_level_2_a); g_atomic_int_and(&(locked_thread_level_2_a->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); current = toplevel; CU_ASSERT((current = ags_thread_next_children_locked(current)) == locked_thread_level_1_a); g_atomic_int_and(&(locked_thread_level_1_a->sync_flags), (~AGS_THREAD_WAITING_FOR_PARENT)); /* assert group NULL */ current = toplevel; CU_ASSERT((current = ags_thread_next_children_locked(current)) == NULL); } void ags_thread_test_lock_parent() { AgsThread *toplevel; AgsThread *parent, *current; GList *thread; guint i; gboolean success; //TODO:JK: improve this test toplevel = ags_generic_main_loop_new(NULL); /* create tree */ parent = toplevel; for(i = 0; i < AGS_THREAD_TEST_LOCK_PARENT_PARENT_COUNT; i++){ current = ags_thread_new(NULL); ags_thread_add_child_extended(parent, current, TRUE, TRUE); parent = current; } /* lock parent */ ags_thread_lock_parent(current, NULL); /* assert current not locked */ CU_ASSERT((AGS_THREAD_LOCKED & (g_atomic_int_get(&(current->flags)))) != 0); CU_ASSERT((AGS_THREAD_WAITING_FOR_CHILDREN & (g_atomic_int_get(&(current->sync_flags)))) == 0); /* assert all parent locked */ current = g_atomic_pointer_get(&(current->parent)); success = TRUE; while(current != NULL){ if((AGS_THREAD_LOCKED & (g_atomic_int_get(&(current->flags)))) == 0 || (AGS_THREAD_WAITING_FOR_CHILDREN & (g_atomic_int_get(&(current->sync_flags)))) == 0){ success = FALSE; break; } current = g_atomic_pointer_get(&(current->parent)); } CU_ASSERT(success == TRUE); } void ags_thread_test_lock_sibling() { AgsThread *toplevel; AgsThread *parent, *current, *iter; guint nth; guint i; auto gboolean ags_thread_test_lock_sibling_assert(AgsThread *parent, AgsThread *current){ AgsThread *iter; gboolean success; /* assert sibling */ iter = g_atomic_pointer_get(&(parent->children)); success = TRUE; while(iter != NULL){ if(iter == current){ if((AGS_THREAD_LOCKED & (g_atomic_int_get(&(iter->flags)))) == 0 || (AGS_THREAD_WAITING_FOR_SIBLING & (g_atomic_int_get(&(iter->sync_flags)))) != 0){ success = FALSE; break; } iter = g_atomic_pointer_get(&(iter->next)); continue; } if((AGS_THREAD_LOCKED & (g_atomic_int_get(&(iter->flags)))) == 0 || (AGS_THREAD_WAITING_FOR_SIBLING & (g_atomic_int_get(&(iter->sync_flags)))) == 0){ success = FALSE; break; } iter = g_atomic_pointer_get(&(iter->next)); } return(success); } toplevel = ags_thread_new(NULL); /* create tree */ parent = toplevel; for(i = 0; i < AGS_THREAD_TEST_LOCK_SIBLING_SIBLING_COUNT; i++){ current = ags_thread_new(NULL); ags_thread_add_child_extended(toplevel, current, TRUE, TRUE); } /* lock sibling first */ current = g_atomic_pointer_get(&(parent->children)); ags_thread_lock_sibling(current); /* assert sibling */ CU_ASSERT(ags_thread_test_lock_sibling_assert(parent, current) == TRUE); ags_thread_unlock_sibling(current); /* lock sibling last */ current = ags_thread_last(g_atomic_pointer_get(&(parent->children))); ags_thread_lock_sibling(current); /* assert sibling */ CU_ASSERT(ags_thread_test_lock_sibling_assert(parent, current) == TRUE); ags_thread_unlock_sibling(current); /* lock sibling random 0 */ current = g_atomic_pointer_get(&(parent->children)); nth = rand() % AGS_THREAD_TEST_LOCK_SIBLING_SIBLING_COUNT; for(i = 0; i < nth; i++){ current = g_atomic_pointer_get(&(current->next)); } ags_thread_lock_sibling(current); /* assert sibling */ CU_ASSERT(ags_thread_test_lock_sibling_assert(parent, current) == TRUE); ags_thread_unlock_sibling(current); /* lock sibling random 1 */ current = g_atomic_pointer_get(&(parent->children)); nth = rand() % AGS_THREAD_TEST_LOCK_SIBLING_SIBLING_COUNT; for(i = 0; i < nth; i++){ current = g_atomic_pointer_get(&(current->next)); } ags_thread_lock_sibling(current); /* assert sibling */ CU_ASSERT(ags_thread_test_lock_sibling_assert(parent, current) == TRUE); ags_thread_unlock_sibling(current); } void ags_thread_test_lock_children() { AgsThread *toplevel; AgsThread *parent, *current; GList *thread; guint i; gboolean success; //TODO:JK: improve this test toplevel = ags_generic_main_loop_new(NULL); /* create tree */ parent = toplevel; for(i = 0; i < AGS_THREAD_TEST_LOCK_PARENT_PARENT_COUNT; i++){ current = ags_thread_new(NULL); ags_thread_add_child_extended(parent, current, TRUE, TRUE); parent = current; } /* lock children */ ags_thread_lock_children(toplevel); /* assert toplevel not locked */ CU_ASSERT((AGS_THREAD_LOCKED & (g_atomic_int_get(&(toplevel->flags)))) != 0); CU_ASSERT((AGS_THREAD_WAITING_FOR_PARENT & (g_atomic_int_get(&(toplevel->sync_flags)))) == 0); /* assert all children locked */ current = g_atomic_pointer_get(&(current->children)); success = TRUE; while(current != NULL){ if((AGS_THREAD_LOCKED & (g_atomic_int_get(&(current->flags)))) == 0 || (AGS_THREAD_WAITING_FOR_PARENT & (g_atomic_int_get(&(current->sync_flags)))) == 0){ success = FALSE; break; } current = g_atomic_pointer_get(&(current->children)); } CU_ASSERT(success == TRUE); } void ags_thread_test_lock_all() { //TODO:JK: implement me } void ags_thread_test_wait_parent() { //TODO:JK: implement me } void ags_thread_test_wait_sibling() { //TODO:JK: implement me } void ags_thread_test_wait_children() { //TODO:JK: implement me } void ags_thread_test_suspend() { //TODO:JK: implement me } void ags_thread_test_timelock() { //TODO:JK: implement me } void ags_thread_test_stop() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsThreadTest\0", ags_thread_test_init_suite, ags_thread_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if(/* (CU_add_test(pSuite, "test of AgsThread sync\0", ags_thread_test_sync) == NULL) || - needs fix because of a race-condition */ (CU_add_test(pSuite, "test of AgsThread lock\0", ags_thread_test_lock) == NULL) || (CU_add_test(pSuite, "test of AgsThread trylock\0", ags_thread_test_trylock) == NULL) || (CU_add_test(pSuite, "test of AgsThread get toplevel\0", ags_thread_test_get_toplevel) == NULL) || (CU_add_test(pSuite, "test of AgsThread first\0", ags_thread_test_first) == NULL) || (CU_add_test(pSuite, "test of AgsThread last\0", ags_thread_test_last) == NULL) || (CU_add_test(pSuite, "test of AgsThread remove child\0", ags_thread_test_remove_child) == NULL) || (CU_add_test(pSuite, "test of AgsThread add child\0", ags_thread_test_add_child) == NULL) || (CU_add_test(pSuite, "test of AgsThread parental is locked\0", ags_thread_test_parental_is_locked) == NULL) || (CU_add_test(pSuite, "test of AgsThread sibling is locked\0", ags_thread_test_sibling_is_locked) == NULL) || (CU_add_test(pSuite, "test of AgsThread children is locked\0", ags_thread_test_children_is_locked) == NULL) || (CU_add_test(pSuite, "test of AgsThread is current ready\0", ags_thread_test_is_current_ready) == NULL) || (CU_add_test(pSuite, "test of AgsThread is tree ready\0", ags_thread_test_is_tree_ready) == NULL) || (CU_add_test(pSuite, "test of AgsThread next parent locked\0", ags_thread_test_next_parent_locked) == NULL) || (CU_add_test(pSuite, "test of AgsThread next sibling locked\0", ags_thread_test_next_sibling_locked) == NULL) || (CU_add_test(pSuite, "test of AgsThread next children locked\0", ags_thread_test_next_children_locked) == NULL) || (CU_add_test(pSuite, "test of AgsThread lock parent\0", ags_thread_test_lock_parent) == NULL) || (CU_add_test(pSuite, "test of AgsThread lock sibling\0", ags_thread_test_lock_sibling) == NULL) || (CU_add_test(pSuite, "test of AgsThread lock children\0", ags_thread_test_lock_children) == NULL) || (CU_add_test(pSuite, "test of AgsThread lock all\0", ags_thread_test_lock_all) == NULL) || (CU_add_test(pSuite, "test of AgsThread wait parent\0", ags_thread_test_wait_parent) == NULL) || (CU_add_test(pSuite, "test of AgsThread wait sibling\0", ags_thread_test_wait_sibling) == NULL) || (CU_add_test(pSuite, "test of AgsThread wait children\0", ags_thread_test_wait_children) == NULL) || (CU_add_test(pSuite, "test of AgsThread suspend\0", ags_thread_test_suspend) == NULL) || (CU_add_test(pSuite, "test of AgsThread timelock\0", ags_thread_test_timelock) == NULL) || (CU_add_test(pSuite, "test of AgsThread stop\0", ags_thread_test_stop) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_mutex_manager_test.c0000644000175000017500000001330113246707333020563 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_mutex_manager_test_init_suite(); int ags_mutex_manager_test_clean_suite(); void ags_mutex_manager_test_insert(); void ags_mutex_manager_test_remove(); void ags_mutex_manager_test_lookup(); /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_mutex_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_mutex_manager_test_clean_suite() { return(0); } void ags_mutex_manager_test_insert() { AgsMutexManager *mutex_manager; AgsThread *thread; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); /* create thread and insert */ thread = g_object_new(AGS_TYPE_THREAD, NULL); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, NULL); ags_mutex_manager_insert(mutex_manager, thread, mutex); /* assert contains */ CU_ASSERT(g_hash_table_contains(mutex_manager->lock_object, thread) == TRUE); /* create thread and insert */ thread = g_object_new(AGS_TYPE_THREAD, NULL); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, NULL); ags_mutex_manager_insert(mutex_manager, thread, mutex); /* assert contains */ CU_ASSERT(g_hash_table_contains(mutex_manager->lock_object, thread) == TRUE); g_object_unref(mutex_manager); } void ags_mutex_manager_test_remove() { AgsMutexManager *mutex_manager; AgsThread *thread[3]; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); /* create thread and insert */ thread[0] = g_object_new(AGS_TYPE_THREAD, NULL); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, NULL); ags_mutex_manager_insert(mutex_manager, thread[0], mutex); /* create thread and insert */ thread[1] = g_object_new(AGS_TYPE_THREAD, NULL); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, NULL); ags_mutex_manager_insert(mutex_manager, thread[1], mutex); /* create thread and insert */ thread[2] = g_object_new(AGS_TYPE_THREAD, NULL); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, NULL); ags_mutex_manager_insert(mutex_manager, thread[2], mutex); /* assert contains */ ags_mutex_manager_remove(mutex_manager, thread[1]); CU_ASSERT(g_hash_table_contains(mutex_manager->lock_object, thread[1]) == FALSE); ags_mutex_manager_remove(mutex_manager, thread[2]); CU_ASSERT(g_hash_table_contains(mutex_manager->lock_object, thread[2]) == FALSE); ags_mutex_manager_remove(mutex_manager, thread[0]); CU_ASSERT(g_hash_table_contains(mutex_manager->lock_object, thread[0]) == FALSE); g_object_unref(mutex_manager); } void ags_mutex_manager_test_lookup() { AgsMutexManager *mutex_manager; AgsThread *thread[2]; pthread_mutex_t *mutex[2]; mutex_manager = ags_mutex_manager_get_instance(); /* create thread and insert */ thread[0] = g_object_new(AGS_TYPE_THREAD, NULL); mutex[0] = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex[0], NULL); ags_mutex_manager_insert(mutex_manager, thread[0], mutex[0]); /* create thread and insert */ thread[1] = g_object_new(AGS_TYPE_THREAD, NULL); mutex[1] = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex[1], NULL); ags_mutex_manager_insert(mutex_manager, thread[1], mutex[1]); /* assert lookup */ CU_ASSERT(ags_mutex_manager_lookup(mutex_manager, thread[0]) == mutex[0]); CU_ASSERT(ags_mutex_manager_lookup(mutex_manager, thread[1]) == mutex[1]); g_object_unref(mutex_manager); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsMutexManagerTest\0", ags_mutex_manager_test_init_suite, ags_mutex_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsMutexManager insert\0", ags_mutex_manager_test_insert) == NULL) || (CU_add_test(pSuite, "test of AgsMutexManager remove\0", ags_mutex_manager_test_remove) == NULL) || (CU_add_test(pSuite, "test of AgsMutexManager lookup\0", ags_mutex_manager_test_lookup) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_polling_thread_test.c0000644000175000017500000001331313246707333020725 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_polling_thread_test_init_suite(); int ags_polling_thread_test_clean_suite(); void ags_polling_thread_test_fd_position(); void ags_polling_thread_test_add_poll_fd(); void ags_polling_thread_test_remove_poll_fd(); /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_polling_thread_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_polling_thread_test_clean_suite() { return(0); } void ags_polling_thread_test_fd_position() { AgsPollingThread *polling_thread; AgsPollFd *poll_fd; GList *list; polling_thread = g_object_new(AGS_TYPE_POLLING_THREAD, NULL); /* create poll fd */ list = NULL; poll_fd = g_object_new(AGS_TYPE_POLL_FD, NULL); list = g_list_prepend(list, poll_fd); poll_fd = g_object_new(AGS_TYPE_POLL_FD, NULL); list = g_list_prepend(list, poll_fd); poll_fd = g_object_new(AGS_TYPE_POLL_FD, NULL); list = g_list_prepend(list, poll_fd); polling_thread->poll_fd = g_list_reverse(list); polling_thread->fds = (struct pollfd *) malloc(3 * sizeof(struct pollfd)); polling_thread->fds[0].fd = 0; polling_thread->fds[1].fd = 1; polling_thread->fds[2].fd = 2; /* assert position */ CU_ASSERT(ags_polling_thread_fd_position(polling_thread, 0) == 0); CU_ASSERT(ags_polling_thread_fd_position(polling_thread, 1) == 1); CU_ASSERT(ags_polling_thread_fd_position(polling_thread, 2) == 2); } void ags_polling_thread_test_add_poll_fd() { AgsPollingThread *polling_thread; AgsPollFd *poll_fd[3]; polling_thread = g_object_new(AGS_TYPE_POLLING_THREAD, NULL); /* add poll fd */ poll_fd[0] = g_object_new(AGS_TYPE_POLL_FD, NULL); poll_fd[0]->fd = 0; ags_polling_thread_add_poll_fd(polling_thread, poll_fd[0]); poll_fd[1] = g_object_new(AGS_TYPE_POLL_FD, NULL); poll_fd[1]->fd = 1; ags_polling_thread_add_poll_fd(polling_thread, poll_fd[1]); poll_fd[2] = g_object_new(AGS_TYPE_POLL_FD, NULL); poll_fd[2]->fd = 2; ags_polling_thread_add_poll_fd(polling_thread, poll_fd[2]); /* assert */ CU_ASSERT(g_list_find(polling_thread->poll_fd, poll_fd[0]) != NULL && polling_thread->fds[0].fd == 0); CU_ASSERT(g_list_find(polling_thread->poll_fd, poll_fd[1]) != NULL && polling_thread->fds[1].fd == 1); CU_ASSERT(g_list_find(polling_thread->poll_fd, poll_fd[2]) != NULL && polling_thread->fds[2].fd == 2); } void ags_polling_thread_test_remove_poll_fd() { AgsPollingThread *polling_thread; AgsPollFd *poll_fd[3]; GList *list; polling_thread = g_object_new(AGS_TYPE_POLLING_THREAD, NULL); /* create poll fd */ list = NULL; poll_fd[0] = g_object_new(AGS_TYPE_POLL_FD, NULL); list = g_list_prepend(list, poll_fd[0]); poll_fd[1] = g_object_new(AGS_TYPE_POLL_FD, NULL); list = g_list_prepend(list, poll_fd[1]); poll_fd[2] = g_object_new(AGS_TYPE_POLL_FD, NULL); list = g_list_prepend(list, poll_fd[2]); polling_thread->poll_fd = g_list_reverse(list); polling_thread->fds = (struct pollfd *) malloc(3 * sizeof(struct pollfd)); polling_thread->fds[0].fd = 0; polling_thread->fds[1].fd = 1; polling_thread->fds[2].fd = 2; /* assert remove */ ags_polling_thread_remove_poll_fd(polling_thread, poll_fd[0]); CU_ASSERT(g_list_find(polling_thread->poll_fd, poll_fd[0]) == NULL); ags_polling_thread_remove_poll_fd(polling_thread, poll_fd[1]); CU_ASSERT(g_list_find(polling_thread->poll_fd, poll_fd[1]) == NULL); ags_polling_thread_remove_poll_fd(polling_thread, poll_fd[2]); CU_ASSERT(polling_thread->poll_fd == NULL); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsPollingThreadTest\0", ags_polling_thread_test_init_suite, ags_polling_thread_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsPollingThread fd position\0", ags_polling_thread_test_fd_position) == NULL) || (CU_add_test(pSuite, "test of AgsPollingThread add poll fd\0", ags_polling_thread_test_add_poll_fd) == NULL) || (CU_add_test(pSuite, "test of AgsPollingThread remove poll fd\0", ags_polling_thread_test_remove_poll_fd) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_condition_manager_test.c0000644000175000017500000001365513246707333021423 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_condition_manager_test_init_suite(); int ags_condition_manager_test_clean_suite(); void ags_condition_manager_test_insert(); void ags_condition_manager_test_remove(); void ags_condition_manager_test_lookup(); /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_condition_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_condition_manager_test_clean_suite() { return(0); } void ags_condition_manager_test_insert() { AgsConditionManager *condition_manager; AgsThread *thread; pthread_cond_t *cond; condition_manager = ags_condition_manager_get_instance(); /* create thread and insert */ thread = g_object_new(AGS_TYPE_THREAD, NULL); cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(cond, NULL); ags_condition_manager_insert(condition_manager, thread, cond); /* assert contains */ CU_ASSERT(g_hash_table_contains(condition_manager->lock_object, thread) == TRUE); /* create thread and insert */ thread = g_object_new(AGS_TYPE_THREAD, NULL); cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(cond, NULL); ags_condition_manager_insert(condition_manager, thread, cond); /* assert contains */ CU_ASSERT(g_hash_table_contains(condition_manager->lock_object, thread) == TRUE); g_object_unref(condition_manager); } void ags_condition_manager_test_remove() { AgsConditionManager *condition_manager; AgsThread *thread[3]; pthread_cond_t *cond; condition_manager = ags_condition_manager_get_instance(); /* create thread and insert */ thread[0] = g_object_new(AGS_TYPE_THREAD, NULL); cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(cond, NULL); ags_condition_manager_insert(condition_manager, thread[0], cond); /* create thread and insert */ thread[1] = g_object_new(AGS_TYPE_THREAD, NULL); cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(cond, NULL); ags_condition_manager_insert(condition_manager, thread[1], cond); /* create thread and insert */ thread[2] = g_object_new(AGS_TYPE_THREAD, NULL); cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(cond, NULL); ags_condition_manager_insert(condition_manager, thread[2], cond); /* assert contains */ ags_condition_manager_remove(condition_manager, thread[1]); CU_ASSERT(g_hash_table_contains(condition_manager->lock_object, thread[1]) == FALSE); ags_condition_manager_remove(condition_manager, thread[2]); CU_ASSERT(g_hash_table_contains(condition_manager->lock_object, thread[2]) == FALSE); ags_condition_manager_remove(condition_manager, thread[0]); CU_ASSERT(g_hash_table_contains(condition_manager->lock_object, thread[0]) == FALSE); g_object_unref(condition_manager); } void ags_condition_manager_test_lookup() { AgsConditionManager *condition_manager; AgsThread *thread[2]; pthread_cond_t *cond[2]; condition_manager = ags_condition_manager_get_instance(); /* create thread and insert */ thread[0] = g_object_new(AGS_TYPE_THREAD, NULL); cond[0] = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(cond[0], NULL); ags_condition_manager_insert(condition_manager, thread[0], cond[0]); /* create thread and insert */ thread[1] = g_object_new(AGS_TYPE_THREAD, NULL); cond[1] = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(cond[1], NULL); ags_condition_manager_insert(condition_manager, thread[1], cond[1]); /* assert lookup */ CU_ASSERT(ags_condition_manager_lookup(condition_manager, thread[0]) == cond[0]); CU_ASSERT(ags_condition_manager_lookup(condition_manager, thread[1]) == cond[1]); g_object_unref(condition_manager); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsConditionManagerTest\0", ags_condition_manager_test_init_suite, ags_condition_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsConditionManager insert\0", ags_condition_manager_test_insert) == NULL) || (CU_add_test(pSuite, "test of AgsConditionManager remove\0", ags_condition_manager_test_remove) == NULL) || (CU_add_test(pSuite, "test of AgsConditionManager lookup\0", ags_condition_manager_test_lookup) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_poll_fd_test.c0000644000175000017500000000530213246707333017350 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_poll_fd_test_init_suite(); int ags_poll_fd_test_clean_suite(); void ags_poll_fd_test_dispatch(); void ags_poll_fd_test_stub_dispatch(AgsPollFd *poll_fd); gboolean stub_dispatch = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_poll_fd_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_poll_fd_test_clean_suite() { return(0); } void ags_poll_fd_test_dispatch() { AgsPollFd *poll_fd; gpointer ptr; poll_fd = g_object_new(AGS_TYPE_POLL_FD, NULL); ptr = AGS_POLL_FD_GET_CLASS(poll_fd)->dispatch; AGS_POLL_FD_GET_CLASS(poll_fd)->dispatch = ags_poll_fd_test_stub_dispatch; /* assert dispatch */ ags_poll_fd_dispatch(poll_fd); CU_ASSERT(stub_dispatch == TRUE); AGS_POLL_FD_GET_CLASS(poll_fd)->dispatch = ptr; } void ags_poll_fd_test_stub_dispatch(AgsPollFd *poll_fd) { stub_dispatch = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsPollFdTest\0", ags_poll_fd_test_init_suite, ags_poll_fd_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsPollFd dispatch\0", ags_poll_fd_test_dispatch) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_task_test.c0000644000175000017500000000652313246707333016701 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_task_test_init_suite(); int ags_task_test_clean_suite(); void ags_task_test_launch(); void ags_task_test_failure(); void ags_task_test_stub_launch(AgsTask *task); void ags_task_test_stub_failure(AgsTask *task, GError *error); gboolean stub_launch = FALSE; gboolean stub_failure = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_task_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_task_test_clean_suite() { return(0); } void ags_task_test_launch() { AgsTask *task; gpointer *ptr; task = g_object_new(AGS_TYPE_TASK, NULL); /* stub launch */ ptr = AGS_TASK_GET_CLASS(task)->launch; AGS_TASK_GET_CLASS(task)->launch = ags_task_test_stub_launch; /* launch and assert */ ags_task_launch(task); CU_ASSERT(stub_launch == TRUE); AGS_TASK_GET_CLASS(task)->launch = ptr; } void ags_task_test_failure() { AgsTask *task; gpointer *ptr; GError *error; task = g_object_new(AGS_TYPE_TASK, NULL); /* stub failure */ ptr = AGS_TASK_GET_CLASS(task)->failure; AGS_TASK_GET_CLASS(task)->failure = ags_task_test_stub_failure; /* failure and assert */ error = NULL; ags_task_failure(task, &error); CU_ASSERT(stub_failure == TRUE); AGS_TASK_GET_CLASS(task)->failure = ptr; } void ags_task_test_stub_launch(AgsTask *task) { stub_launch = TRUE; } void ags_task_test_stub_failure(AgsTask *task, GError *error) { stub_failure = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsTaskTest\0", ags_task_test_init_suite, ags_task_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsTask launch\0", ags_task_test_launch) == NULL) || (CU_add_test(pSuite, "test of AgsTask failure\0", ags_task_test_failure) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_destroy_worker_test.c0000644000175000017500000001160513246707333021016 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_destroy_worker_test_init_suite(); int ags_destroy_worker_test_clean_suite(); void ags_destroy_worker_test_add(); void ags_destroy_worker_test_stub_finalize(GObject *gobject); #define AGS_DESTROY_WORKER_TEST_ADD_TOTAL (AGS_DESTROY_WORKER_TEST_ADD_STAGE_0 + \ AGS_DESTROY_WORKER_TEST_ADD_STAGE_1 + \ AGS_DESTROY_WORKER_TEST_ADD_STAGE_2 + \ AGS_DESTROY_WORKER_TEST_ADD_STAGE_3 + \ AGS_DESTROY_WORKER_TEST_ADD_STAGE_4) #define AGS_DESTROY_WORKER_TEST_ADD_INITIAL_DELAY (4000) #define AGS_DESTROY_WORKER_TEST_ADD_FINAL_DELAY (5000000) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_0 (8) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_0_DELAY (4000) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_1 (3) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_1_DELAY (8000) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_2 (2) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_2_DELAY (1500000) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_3 (5) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_3_DELAY (500000) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_4 (7) #define AGS_DESTROY_WORKER_TEST_ADD_STAGE_4_DELAY (125000) guint n_finalize = 0; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_destroy_worker_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_destroy_worker_test_clean_suite() { return(0); } void ags_destroy_worker_test_add() { AgsDestroyWorker *destroy_worker; AgsThread *thread[AGS_DESTROY_WORKER_TEST_ADD_TOTAL]; guint i, nth; destroy_worker = ags_destroy_worker_new(); ags_thread_start(destroy_worker); for(i = 0; i < AGS_DESTROY_WORKER_TEST_ADD_TOTAL; i++){ thread[i] = g_object_new(AGS_TYPE_THREAD, NULL); G_OBJECT_GET_CLASS(thread[i])->finalize = ags_destroy_worker_test_stub_finalize; } /* */ nth = 0; usleep(AGS_DESTROY_WORKER_TEST_ADD_INITIAL_DELAY); for(i = 0; i < AGS_DESTROY_WORKER_TEST_ADD_STAGE_0; i++, nth++){ ags_destroy_worker_add(destroy_worker, thread[nth], g_object_unref); } usleep(AGS_DESTROY_WORKER_TEST_ADD_STAGE_0_DELAY); for(i = 0; i < AGS_DESTROY_WORKER_TEST_ADD_STAGE_1; i++, nth++){ ags_destroy_worker_add(destroy_worker, thread[nth], g_object_unref); } usleep(AGS_DESTROY_WORKER_TEST_ADD_STAGE_1_DELAY); for(i = 0; i < AGS_DESTROY_WORKER_TEST_ADD_STAGE_2; i++, nth++){ ags_destroy_worker_add(destroy_worker, thread[nth], g_object_unref); } usleep(AGS_DESTROY_WORKER_TEST_ADD_STAGE_2_DELAY); for(i = 0; i < AGS_DESTROY_WORKER_TEST_ADD_STAGE_3; i++, nth++){ ags_destroy_worker_add(destroy_worker, thread[nth], g_object_unref); } usleep(AGS_DESTROY_WORKER_TEST_ADD_STAGE_3_DELAY); for(i = 0; i < AGS_DESTROY_WORKER_TEST_ADD_STAGE_4; i++, nth++){ ags_destroy_worker_add(destroy_worker, thread[nth], g_object_unref); } usleep(AGS_DESTROY_WORKER_TEST_ADD_STAGE_4_DELAY); /* assert */ usleep(AGS_DESTROY_WORKER_TEST_ADD_FINAL_DELAY); CU_ASSERT(n_finalize == AGS_DESTROY_WORKER_TEST_ADD_TOTAL); } void ags_destroy_worker_test_stub_finalize(GObject *gobject) { n_finalize++; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsDestroyWorkerTest\0", ags_destroy_worker_test_init_suite, ags_destroy_worker_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsDestroyWorker add\0", ags_destroy_worker_test_add) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_worker_thread_test.c0000644000175000017500000000556113246707333020600 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_worker_thread_test_init_suite(); int ags_worker_thread_test_clean_suite(); void ags_worker_thread_test_do_poll(); void ags_worker_thread_test_stub_do_poll(AgsWorkerThread *worker_thread); gboolean stub_do_poll = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_worker_thread_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_worker_thread_test_clean_suite() { return(0); } void ags_worker_thread_test_do_poll() { AgsWorkerThread *worker_thread; gpointer ptr; worker_thread = g_object_new(AGS_TYPE_WORKER_THREAD, NULL); ptr = AGS_WORKER_THREAD_GET_CLASS(worker_thread)->do_poll; AGS_WORKER_THREAD_GET_CLASS(worker_thread)->do_poll = ags_worker_thread_test_stub_do_poll; /* assert do poll */ ags_worker_thread_do_poll(worker_thread); CU_ASSERT(stub_do_poll == TRUE); AGS_WORKER_THREAD_GET_CLASS(worker_thread)->do_poll = ptr; } void ags_worker_thread_test_stub_do_poll(AgsWorkerThread *worker_thread) { stub_do_poll = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsWorkerThreadTest\0", ags_worker_thread_test_init_suite, ags_worker_thread_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsWorkerThread do poll\0", ags_worker_thread_test_do_poll) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_task_thread_test.c0000644000175000017500000002106113246707333020222 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_task_thread_test_init_suite(); int ags_task_thread_test_clean_suite(); void ags_task_thread_test_append_task(); void ags_task_thread_test_append_tasks(); void ags_task_thread_test_append_cyclic_task(); void ags_task_thread_test_remove_cyclic_task(); void ags_task_thread_test_clear_cache(); void ags_task_thread_test_launch_callback(AgsTask *task, gpointer data); void ags_task_thread_test_stub_clear_cache(AgsTask *task); #define AGS_TASK_THREAD_TEST_INITIAL_DELAY (500000) #define AGS_TASK_THREAD_TEST_DELAY (10000000) guint launch_counter = 0; gboolean stub_clear_cache = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_task_thread_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_task_thread_test_clean_suite() { return(0); } void ags_task_thread_test_append_task() { AgsGenericMainLoop *main_loop; AgsTaskThread *task_thread; AgsThreadPool *thread_pool; AgsTask *task; AgsApplicationContext *application_context; application_context = ags_thread_application_context_new(); main_loop = application_context->main_loop; ags_thread_start(main_loop); task_thread = ags_task_thread_new(); ags_main_loop_set_async_queue(AGS_MAIN_LOOP(main_loop), task_thread); ags_thread_add_child_extended(main_loop, task_thread, TRUE, TRUE); ags_thread_start(task_thread); usleep(AGS_TASK_THREAD_TEST_INITIAL_DELAY); thread_pool = AGS_TASK_THREAD(task_thread)->thread_pool; ags_thread_pool_start(thread_pool); usleep(AGS_TASK_THREAD_TEST_INITIAL_DELAY); /* create some tasks */ launch_counter = 0; task = g_object_new(AGS_TYPE_TASK, NULL); g_signal_connect(task, "launch", G_CALLBACK(ags_task_thread_test_launch_callback), NULL); ags_task_thread_append_task(task_thread, task); task = g_object_new(AGS_TYPE_TASK, NULL); g_signal_connect(task, "launch", G_CALLBACK(ags_task_thread_test_launch_callback), NULL); ags_task_thread_append_task(task_thread, task); task = g_object_new(AGS_TYPE_TASK, NULL); g_signal_connect(task, "launch", G_CALLBACK(ags_task_thread_test_launch_callback), NULL); ags_task_thread_append_task(task_thread, task); /* assert */ usleep(AGS_TASK_THREAD_TEST_DELAY); CU_ASSERT(launch_counter == 3); /* clean-up */ g_object_run_dispose(application_context); g_object_unref(application_context); } void ags_task_thread_test_append_tasks() { AgsGenericMainLoop *main_loop; AgsTaskThread *task_thread; AgsThreadPool *thread_pool; AgsTask *task; AgsApplicationContext *application_context; GList *list0, *list1; application_context = ags_thread_application_context_new(); main_loop = application_context->main_loop; ags_thread_start(main_loop); task_thread = ags_task_thread_new(); ags_main_loop_set_async_queue(AGS_MAIN_LOOP(main_loop), task_thread); ags_thread_add_child_extended(main_loop, task_thread, TRUE, TRUE); ags_thread_start(task_thread); usleep(AGS_TASK_THREAD_TEST_INITIAL_DELAY); thread_pool = AGS_TASK_THREAD(task_thread)->thread_pool; ags_thread_pool_start(thread_pool); usleep(AGS_TASK_THREAD_TEST_INITIAL_DELAY); /* create some tasks */ list0 = NULL; launch_counter = 0; task = g_object_new(AGS_TYPE_TASK, NULL); list0 = g_list_prepend(list0, task); g_signal_connect(task, "launch", G_CALLBACK(ags_task_thread_test_launch_callback), NULL); task = g_object_new(AGS_TYPE_TASK, NULL); list0 = g_list_prepend(list0, task); g_signal_connect(task, "launch", G_CALLBACK(ags_task_thread_test_launch_callback), NULL); ags_task_thread_append_tasks(task_thread, list0); list1 = NULL; task = g_object_new(AGS_TYPE_TASK, NULL); list1 = g_list_prepend(list1, task); g_signal_connect(task, "launch", G_CALLBACK(ags_task_thread_test_launch_callback), NULL); ags_task_thread_append_tasks(task_thread, list1); /* assert */ usleep(AGS_TASK_THREAD_TEST_DELAY); CU_ASSERT(launch_counter == 3); /* clean-up */ g_object_run_dispose(application_context); g_object_unref(application_context); } void ags_task_thread_test_append_cyclic_task() { AgsGenericMainLoop *main_loop; AgsTaskThread *task_thread; AgsThreadPool *thread_pool; AgsTask *task; AgsApplicationContext *application_context; application_context = ags_thread_application_context_new(); main_loop = ags_generic_main_loop_new(application_context); g_object_set(application_context, "main-loop", main_loop, NULL); ags_thread_start(main_loop); task_thread = ags_task_thread_new(); ags_main_loop_set_async_queue(AGS_MAIN_LOOP(main_loop), task_thread); ags_thread_add_child_extended(main_loop, task_thread, TRUE, TRUE); ags_thread_start(task_thread); usleep(AGS_TASK_THREAD_TEST_INITIAL_DELAY); thread_pool = AGS_TASK_THREAD(task_thread)->thread_pool; ags_thread_pool_start(thread_pool); usleep(AGS_TASK_THREAD_TEST_INITIAL_DELAY); /* create a cyclic tasks */ launch_counter = 0; task = g_object_new(AGS_TYPE_TASK, NULL); g_signal_connect(task, "launch", G_CALLBACK(ags_task_thread_test_launch_callback), NULL); ags_task_thread_append_cyclic_task(task_thread, task); /* assert */ usleep(AGS_TASK_THREAD_TEST_DELAY); CU_ASSERT(launch_counter > 0); /* clean-up */ g_object_run_dispose(application_context); g_object_unref(application_context); } void ags_task_thread_test_remove_cyclic_task() { //TODO:JK: implement me, note this is quiet tricky since we are outside of the synced tree } void ags_task_thread_test_clear_cache() { AgsTaskThread *task_thread; gpointer ptr; task_thread = ags_task_thread_new(); /* stub */ ptr = AGS_TASK_THREAD_GET_CLASS(task_thread)->clear_cache; AGS_TASK_THREAD_GET_CLASS(task_thread)->clear_cache = ags_task_thread_test_stub_clear_cache; /* assert */ ags_task_thread_clear_cache(task_thread); CU_ASSERT(stub_clear_cache == TRUE); /* reset */ AGS_TASK_THREAD_GET_CLASS(task_thread)->clear_cache = ptr; } void ags_task_thread_test_launch_callback(AgsTask *task, gpointer data) { launch_counter++; } void ags_task_thread_test_stub_clear_cache(AgsTask *task) { stub_clear_cache = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsTaskThreadTest\0", ags_task_thread_test_init_suite, ags_task_thread_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsTaskThread append task\0", ags_task_thread_test_append_task) == NULL) || (CU_add_test(pSuite, "test of AgsTaskThread append tasks\0", ags_task_thread_test_append_tasks) == NULL) || (CU_add_test(pSuite, "test of AgsTaskThread append cyclic task\0", ags_task_thread_test_append_cyclic_task) == NULL) || (CU_add_test(pSuite, "test of AgsTaskThread remove cyclic task\0", ags_task_thread_test_remove_cyclic_task) == NULL) || (CU_add_test(pSuite, "test of AgsTaskThread clear cache\0", ags_task_thread_test_clear_cache) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_thread_pool_test.c0000644000175000017500000000767613246707333020251 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_thread_pool_test_init_suite(); int ags_thread_pool_test_clean_suite(); void ags_thread_pool_test_pull(); void ags_thread_pool_test_start(); void ags_thread_pool_stub_start(AgsThreadPool *thread_pool); #define AGS_THREAD_POOL_TEST_INITIAL_DELAY (5000000) gboolean stub_start = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_thread_pool_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_thread_pool_test_clean_suite() { return(0); } void ags_thread_pool_test_pull() { AgsThreadPool *thread_pool; AgsThread *parent; AgsReturnableThread *returnable_thread; parent = g_object_new(AGS_TYPE_THREAD, NULL); thread_pool = ags_thread_pool_new(parent); ags_thread_pool_start(thread_pool); usleep(AGS_THREAD_POOL_TEST_INITIAL_DELAY); /* pull and assert */ returnable_thread = ags_thread_pool_pull(thread_pool); CU_ASSERT(AGS_IS_RETURNABLE_THREAD(returnable_thread) && (AGS_THREAD_RUNNING & (g_atomic_int_get(&(AGS_THREAD(returnable_thread)->flags)))) != 0); returnable_thread = ags_thread_pool_pull(thread_pool); CU_ASSERT(AGS_IS_RETURNABLE_THREAD(returnable_thread) && (AGS_THREAD_RUNNING & (g_atomic_int_get(&(AGS_THREAD(returnable_thread)->flags)))) != 0); returnable_thread = ags_thread_pool_pull(thread_pool); CU_ASSERT(AGS_IS_RETURNABLE_THREAD(returnable_thread) && (AGS_THREAD_RUNNING & (g_atomic_int_get(&(AGS_THREAD(returnable_thread)->flags)))) != 0); } void ags_thread_pool_test_start() { AgsThreadPool *thread_pool; gpointer ptr; thread_pool = ags_thread_pool_new(NULL); ptr = AGS_THREAD_POOL_GET_CLASS(thread_pool)->start; /* stub and assert */ AGS_THREAD_POOL_GET_CLASS(thread_pool)->start = ags_thread_pool_stub_start; ags_thread_pool_start(thread_pool); CU_ASSERT(stub_start == TRUE); /* reset */ AGS_THREAD_POOL_GET_CLASS(thread_pool)->start = ptr; } void ags_thread_pool_stub_start(AgsThreadPool *thread_pool) { stub_start = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsThreadPoolTest\0", ags_thread_pool_test_init_suite, ags_thread_pool_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsThreadPool pull\0", ags_thread_pool_test_pull) == NULL) || (CU_add_test(pSuite, "test of AgsThreadPool start\0", ags_thread_pool_test_start) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/thread/ags_returnable_thread_test.c0000644000175000017500000001141313246707333021423 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_returnable_thread_test_init_suite(); int ags_returnable_thread_test_clean_suite(); void ags_returnable_thread_test_safe_run(); void ags_returnable_thread_test_connect_safe_run(); void ags_returnable_thread_test_disconnect_safe_run(); void ags_returnable_thread_test_stub_safe_run(AgsReturnableThread *returnable_thread); void ags_returnable_thread_test_safe_run_callback(AgsReturnableThread *returnable_thread, gpointer data); gboolean stub_safe_run = FALSE; gboolean safe_run_callback; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_returnable_thread_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_returnable_thread_test_clean_suite() { return(0); } void ags_returnable_thread_test_safe_run() { AgsReturnableThread *returnable_thread; gpointer ptr; returnable_thread = g_object_new(AGS_TYPE_RETURNABLE_THREAD, NULL); /* stub safe-run */ ptr = AGS_RETURNABLE_THREAD_GET_CLASS(returnable_thread)->safe_run; AGS_RETURNABLE_THREAD_GET_CLASS(returnable_thread)->safe_run = ags_returnable_thread_test_stub_safe_run; /* assert safe-run */ ags_returnable_thread_safe_run(returnable_thread); CU_ASSERT(stub_safe_run == TRUE); AGS_RETURNABLE_THREAD_GET_CLASS(returnable_thread)->safe_run = ptr; } void ags_returnable_thread_test_connect_safe_run() { AgsReturnableThread *returnable_thread; returnable_thread = g_object_new(AGS_TYPE_RETURNABLE_THREAD, NULL); /* connect safe run and assert */ ags_returnable_thread_connect_safe_run(returnable_thread, ags_returnable_thread_test_safe_run_callback); CU_ASSERT(returnable_thread->handler > 0); /* safe run and assert */ safe_run_callback = FALSE; ags_returnable_thread_safe_run(returnable_thread); CU_ASSERT(safe_run_callback == TRUE); } void ags_returnable_thread_test_disconnect_safe_run() { AgsReturnableThread *returnable_thread; returnable_thread = g_object_new(AGS_TYPE_RETURNABLE_THREAD, NULL); ags_returnable_thread_connect_safe_run(returnable_thread, ags_returnable_thread_test_safe_run_callback); /* connect safe run and assert */ ags_returnable_thread_disconnect_safe_run(returnable_thread); CU_ASSERT(returnable_thread->handler == 0); /* safe run and assert */ safe_run_callback = FALSE; ags_returnable_thread_safe_run(returnable_thread); CU_ASSERT(safe_run_callback == FALSE); } void ags_returnable_thread_test_stub_safe_run(AgsReturnableThread *returnable_thread) { stub_safe_run = TRUE; } void ags_returnable_thread_test_safe_run_callback(AgsReturnableThread *returnable_thread, gpointer data) { safe_run_callback = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsReturnableThreadTest\0", ags_returnable_thread_test_init_suite, ags_returnable_thread_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsReturnableThread safe run\0", ags_returnable_thread_test_safe_run) == NULL) || (CU_add_test(pSuite, "test of AgsReturnableThread connect safe run\0", ags_returnable_thread_test_connect_safe_run) == NULL) || (CU_add_test(pSuite, "test of AgsReturnableThread disconnect safe run\0", ags_returnable_thread_test_disconnect_safe_run) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/file/0000755000175000017500000000000013256233676013431 500000000000000gsequencer-1.4.24/ags/test/file/ags_file_lookup_test.c0000644000175000017500000001227313246707333017716 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_file_lookup_test_init_suite(); int ags_file_lookup_test_clean_suite(); void ags_file_lookup_test_find_by_node(); void ags_file_lookup_test_find_by_reference(); void ags_file_lookup_test_resolve(); void ags_file_lookup_test_stub_resolve(AgsFileLookup *file_lookup); gboolean stub_resolve; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_file_lookup_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_file_lookup_test_clean_suite() { return(0); } void ags_file_lookup_test_find_by_node() { AgsFileLookup *file_lookup[3]; xmlNode *node[3]; GList *list; list = NULL; /* file lookup #0 */ node[0] = xmlNewNode(NULL, "ags-test"); file_lookup[0] = g_object_new(AGS_TYPE_FILE_LOOKUP, "node", node[0], NULL); list = g_list_prepend(list, file_lookup[0]); /* file lookup #1 */ node[1] = xmlNewNode(NULL, "ags-test"); file_lookup[1] = g_object_new(AGS_TYPE_FILE_LOOKUP, "node", node[1], NULL); list = g_list_prepend(list, file_lookup[1]); /* file lookup #2 */ node[2] = xmlNewNode(NULL, "ags-test"); file_lookup[2] = g_object_new(AGS_TYPE_FILE_LOOKUP, "node", node[2], NULL); list = g_list_prepend(list, file_lookup[2]); /* assert find by node */ CU_ASSERT(ags_file_lookup_find_by_node(list, node[0]) != NULL); CU_ASSERT(ags_file_lookup_find_by_node(list, node[1]) != NULL); CU_ASSERT(ags_file_lookup_find_by_node(list, node[2]) != NULL); } void ags_file_lookup_test_find_by_reference() { AgsFileLookup *file_lookup[3]; AgsTurtle *turtle[3]; GList *list; list = NULL; /* file lookup #0 */ turtle[0] = g_object_new(AGS_TYPE_TURTLE, NULL); file_lookup[0] = g_object_new(AGS_TYPE_FILE_LOOKUP, "reference", turtle[0], NULL); list = g_list_prepend(list, file_lookup[0]); /* file lookup #1 */ turtle[1] = g_object_new(AGS_TYPE_TURTLE, NULL); file_lookup[1] = g_object_new(AGS_TYPE_FILE_LOOKUP, "reference", turtle[1], NULL); list = g_list_prepend(list, file_lookup[1]); /* file lookup #2 */ turtle[2] = g_object_new(AGS_TYPE_TURTLE, NULL); file_lookup[2] = g_object_new(AGS_TYPE_FILE_LOOKUP, "reference", turtle[2], NULL); list = g_list_prepend(list, file_lookup[2]); /* assert find by reference */ CU_ASSERT(ags_file_lookup_find_by_reference(list, turtle[0]) != NULL); CU_ASSERT(ags_file_lookup_find_by_reference(list, turtle[1]) != NULL); CU_ASSERT(ags_file_lookup_find_by_reference(list, turtle[2]) != NULL); } void ags_file_lookup_test_resolve() { AgsFileLookup *file_lookup; gpointer ptr; file_lookup = g_object_new(AGS_TYPE_FILE_LOOKUP, NULL); ptr = AGS_FILE_LOOKUP_GET_CLASS(file_lookup)->resolve; AGS_FILE_LOOKUP_GET_CLASS(file_lookup)->resolve = ags_file_lookup_test_stub_resolve; /* assert resolve */ ags_file_lookup_resolve(file_lookup); CU_ASSERT(stub_resolve == TRUE); AGS_FILE_LOOKUP_GET_CLASS(file_lookup)->resolve = ptr; } void ags_file_lookup_test_stub_resolve(AgsFileLookup *file_lookup) { stub_resolve = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFileLookupTest", ags_file_lookup_test_init_suite, ags_file_lookup_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsFileLookup find by node", ags_file_lookup_test_find_by_node) == NULL) || (CU_add_test(pSuite, "test of AgsFileLookup find by reference", ags_file_lookup_test_find_by_reference) == NULL) || (CU_add_test(pSuite, "test of AgsFileLookup resolve", ags_file_lookup_test_resolve) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/file/ags_file_launch_test.c0000644000175000017500000000541113246707333017653 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_file_launch_test_init_suite(); int ags_file_launch_test_clean_suite(); void ags_file_launch_test_start(); void ags_file_launch_test_stub_start(AgsFileLaunch *file_launch); gboolean stub_start; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_file_launch_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_file_launch_test_clean_suite() { return(0); } void ags_file_launch_test_start() { AgsFileLaunch *file_launch; gpointer ptr; file_launch = g_object_new(AGS_TYPE_FILE_LAUNCH, NULL); ptr = AGS_FILE_LAUNCH_GET_CLASS(file_launch)->start; AGS_FILE_LAUNCH_GET_CLASS(file_launch)->start = ags_file_launch_test_stub_start; /* assert start */ ags_file_launch_start(file_launch); CU_ASSERT(stub_start == TRUE); AGS_FILE_LAUNCH_GET_CLASS(file_launch)->start = ptr; } void ags_file_launch_test_stub_start(AgsFileLaunch *file_launch) { stub_start = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFileLaunchTest\0", ags_file_launch_test_init_suite, ags_file_launch_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsFileLaunch start\0", ags_file_launch_test_start) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/file/ags_file_test.c0000644000175000017500000003757013246707333016334 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_file_test_init_suite(); int ags_file_test_clean_suite(); void ags_file_test_str2md5(); void ags_file_test_add_id_ref(); void ags_file_test_find_id_ref_by_node(); void ags_file_test_find_id_ref_by_xpath(); void ags_file_test_find_id_ref_by_reference(); void ags_file_test_add_lookup(); void ags_file_test_add_launch(); void ags_file_test_open(); void ags_file_test_open_from_data(); void ags_file_test_rw_open(); void ags_file_test_open_filename(); void ags_file_test_close(); void ags_file_test_write(); void ags_file_test_write_concurrent(); void ags_file_test_write_resolve(); void ags_file_test_read(); void ags_file_test_read_resolve(); void ags_file_test_read_start(); void ags_file_test_read_config(); void ags_file_test_write_config(); void ags_file_test_read_application_context(); void ags_file_test_write_application_context(); void ags_file_test_stub_open(AgsFile *file, GError **error); void ags_file_test_stub_open_from_data(AgsFile *file, gchar *data, guint length, GError **error); void ags_file_test_stub_rw_open(AgsFile *file, gboolean create, GError **error); void ags_file_test_stub_write(AgsFile *file); void ags_file_test_stub_write_concurrent(AgsFile *file); void ags_file_test_stub_write_resolve(AgsFile *file); void ags_file_test_stub_read(AgsFile *file); void ags_file_test_stub_read_resolve(AgsFile *file); void ags_file_test_stub_read_start(AgsFile *file); #define AGS_FILE_TEST_STR2MD5_CONTENT "GNU's not linux" gboolean stub_open = FALSE; gboolean stub_open_from_data = FALSE; gboolean stub_rw_open = FALSE; gboolean stub_write = FALSE; gboolean stub_write_concurrent = FALSE; gboolean stub_write_resolve = FALSE; gboolean stub_read = FALSE; gboolean stub_read_resolve = FALSE; gboolean stub_read_start = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_file_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_file_test_clean_suite() { return(0); } void ags_file_test_str2md5() { gchar *md5_checksum; md5_checksum = ags_file_str2md5(AGS_FILE_TEST_STR2MD5_CONTENT, strlen(AGS_FILE_TEST_STR2MD5_CONTENT)); CU_ASSERT(strlen(md5_checksum) == AGS_FILE_CHECKSUM_LENGTH); } void ags_file_test_add_id_ref() { AgsFile *file; AgsFileIdRef *file_id_ref[3]; file = g_object_new(AGS_TYPE_FILE, NULL); /* add some id refs */ file_id_ref[0] = g_object_new(AGS_TYPE_FILE_ID_REF, NULL); ags_file_add_id_ref(file, file_id_ref[0]); file_id_ref[1] = g_object_new(AGS_TYPE_FILE_ID_REF, NULL); ags_file_add_id_ref(file, file_id_ref[1]); file_id_ref[2] = g_object_new(AGS_TYPE_FILE_ID_REF, NULL); ags_file_add_id_ref(file, file_id_ref[2]); /* assert to be present */ CU_ASSERT(g_list_find(file->id_refs, file_id_ref[0]) != NULL); CU_ASSERT(g_list_find(file->id_refs, file_id_ref[1]) != NULL); CU_ASSERT(g_list_find(file->id_refs, file_id_ref[2]) != NULL); } void ags_file_test_find_id_ref_by_node() { AgsFile *file; AgsFileIdRef *file_id_ref[3], *current; xmlNode *node[3]; file = g_object_new(AGS_TYPE_FILE, NULL); /* add some id refs */ node[0] = xmlNewNode(NULL, "ags-file-test"); file_id_ref[0] = g_object_new(AGS_TYPE_FILE_ID_REF, "node", node[0], NULL); ags_file_add_id_ref(file, file_id_ref[0]); node[1] = xmlNewNode(NULL, "ags-file-test"); file_id_ref[1] = g_object_new(AGS_TYPE_FILE_ID_REF, "node", node[1], NULL); ags_file_add_id_ref(file, file_id_ref[1]); node[2] = xmlNewNode(NULL, "ags-file-test"); file_id_ref[2] = g_object_new(AGS_TYPE_FILE_ID_REF, "node", node[2], NULL); ags_file_add_id_ref(file, file_id_ref[2]); /* assert find by node */ CU_ASSERT((current = ags_file_find_id_ref_by_node(file, node[0])) != NULL && current == file_id_ref[0]); CU_ASSERT((current = ags_file_find_id_ref_by_node(file, node[1])) != NULL && current == file_id_ref[1]); CU_ASSERT((current = ags_file_find_id_ref_by_node(file, node[2])) != NULL && current == file_id_ref[2]); } void ags_file_test_find_id_ref_by_xpath() { //TODO:JK: implement me } void ags_file_test_find_id_ref_by_reference() { AgsFile *file; AgsFileIdRef *file_id_ref[3], *current; AgsTurtle *turtle[3]; file = g_object_new(AGS_TYPE_FILE, NULL); /* add some id refs */ turtle[0] = g_object_new(AGS_TYPE_TURTLE, NULL); file_id_ref[0] = g_object_new(AGS_TYPE_FILE_ID_REF, "reference", turtle[0], NULL); ags_file_add_id_ref(file, file_id_ref[0]); turtle[1] = g_object_new(AGS_TYPE_TURTLE, NULL); file_id_ref[1] = g_object_new(AGS_TYPE_FILE_ID_REF, "reference", turtle[1], NULL); ags_file_add_id_ref(file, file_id_ref[1]); turtle[2] = g_object_new(AGS_TYPE_TURTLE, NULL); file_id_ref[2] = g_object_new(AGS_TYPE_FILE_ID_REF, "reference", turtle[2], NULL); ags_file_add_id_ref(file, file_id_ref[2]); /* assert find by reference */ CU_ASSERT((current = ags_file_find_id_ref_by_reference(file, turtle[0])) != NULL && current == file_id_ref[0]); CU_ASSERT((current = ags_file_find_id_ref_by_reference(file, turtle[1])) != NULL && current == file_id_ref[1]); CU_ASSERT((current = ags_file_find_id_ref_by_reference(file, turtle[2])) != NULL && current == file_id_ref[2]); } void ags_file_test_add_lookup() { AgsFile *file; AgsFileIdRef *file_lookup[3]; file = g_object_new(AGS_TYPE_FILE, NULL); /* add some id refs */ file_lookup[0] = g_object_new(AGS_TYPE_FILE_LOOKUP, NULL); ags_file_add_lookup(file, file_lookup[0]); file_lookup[1] = g_object_new(AGS_TYPE_FILE_LOOKUP, NULL); ags_file_add_lookup(file, file_lookup[1]); file_lookup[2] = g_object_new(AGS_TYPE_FILE_LOOKUP, NULL); ags_file_add_lookup(file, file_lookup[2]); /* assert to be present */ CU_ASSERT(g_list_find(file->lookup, file_lookup[0]) != NULL); CU_ASSERT(g_list_find(file->lookup, file_lookup[1]) != NULL); CU_ASSERT(g_list_find(file->lookup, file_lookup[2]) != NULL); } void ags_file_test_add_launch() { AgsFile *file; AgsFileIdRef *file_launch[3]; file = g_object_new(AGS_TYPE_FILE, NULL); /* add some id refs */ file_launch[0] = g_object_new(AGS_TYPE_FILE_LAUNCH, NULL); ags_file_add_launch(file, file_launch[0]); file_launch[1] = g_object_new(AGS_TYPE_FILE_LAUNCH, NULL); ags_file_add_launch(file, file_launch[1]); file_launch[2] = g_object_new(AGS_TYPE_FILE_LAUNCH, NULL); ags_file_add_launch(file, file_launch[2]); /* assert to be present */ CU_ASSERT(g_list_find(file->launch, file_launch[0]) != NULL); CU_ASSERT(g_list_find(file->launch, file_launch[1]) != NULL); CU_ASSERT(g_list_find(file->launch, file_launch[2]) != NULL); } void ags_file_test_open() { AgsFile *file; gpointer ptr; GError *error; file = g_object_new(AGS_TYPE_FILE, NULL); /* stub open */ ptr = AGS_FILE_GET_CLASS(file)->open; AGS_FILE_GET_CLASS(file)->open = ags_file_test_stub_open; /* assert open */ error = NULL; ags_file_open(file, &error); CU_ASSERT(stub_open == TRUE); /* reset */ AGS_FILE_GET_CLASS(file)->open = ptr; } void ags_file_test_open_from_data() { AgsFile *file; gpointer ptr; GError *error; file = g_object_new(AGS_TYPE_FILE, NULL); /* stub open from data */ ptr = AGS_FILE_GET_CLASS(file)->open_from_data; AGS_FILE_GET_CLASS(file)->open_from_data = ags_file_test_stub_open_from_data; /* assert open from data */ error = NULL; ags_file_open_from_data(file, NULL, 0, &error); CU_ASSERT(stub_open_from_data == TRUE); /* reset */ AGS_FILE_GET_CLASS(file)->open_from_data = ptr; } void ags_file_test_rw_open() { AgsFile *file; gpointer ptr; GError *error; file = g_object_new(AGS_TYPE_FILE, NULL); /* stub read/write open */ ptr = AGS_FILE_GET_CLASS(file)->rw_open; AGS_FILE_GET_CLASS(file)->rw_open = ags_file_test_stub_rw_open; /* assert read/write open */ error = NULL; ags_file_rw_open(file, FALSE, &error); CU_ASSERT(stub_rw_open == TRUE); /* reset */ AGS_FILE_GET_CLASS(file)->rw_open = ptr; } void ags_file_test_open_filename() { //TODO:JK: implement me } void ags_file_test_close() { //TODO:JK: implement me } void ags_file_test_write() { AgsFile *file; gpointer ptr; file = g_object_new(AGS_TYPE_FILE, NULL); /* stub write */ ptr = AGS_FILE_GET_CLASS(file)->write; AGS_FILE_GET_CLASS(file)->write = ags_file_test_stub_write; /* assert write */ ags_file_write(file); CU_ASSERT(stub_write == TRUE); /* reset */ AGS_FILE_GET_CLASS(file)->write = ptr; } void ags_file_test_write_concurrent() { AgsFile *file; gpointer ptr; file = g_object_new(AGS_TYPE_FILE, NULL); /* stub write concurrent */ ptr = AGS_FILE_GET_CLASS(file)->write_concurrent; AGS_FILE_GET_CLASS(file)->write_concurrent = ags_file_test_stub_write_concurrent; /* assert write concurrent */ ags_file_write_concurrent(file); CU_ASSERT(stub_write_concurrent == TRUE); /* reset */ AGS_FILE_GET_CLASS(file)->write_concurrent = ptr; } void ags_file_test_write_resolve() { AgsFile *file; gpointer ptr; file = g_object_new(AGS_TYPE_FILE, NULL); /* stub write resolve */ ptr = AGS_FILE_GET_CLASS(file)->write_resolve; AGS_FILE_GET_CLASS(file)->write_resolve = ags_file_test_stub_write_resolve; /* assert write resolve */ ags_file_write_resolve(file); CU_ASSERT(stub_write_resolve == TRUE); /* reset */ AGS_FILE_GET_CLASS(file)->write_resolve = ptr; } void ags_file_test_read() { AgsFile *file; gpointer ptr; file = g_object_new(AGS_TYPE_FILE, NULL); /* stub read */ ptr = AGS_FILE_GET_CLASS(file)->read; AGS_FILE_GET_CLASS(file)->read = ags_file_test_stub_read; /* assert read */ ags_file_read(file); CU_ASSERT(stub_read == TRUE); /* reset */ AGS_FILE_GET_CLASS(file)->read = ptr; } void ags_file_test_read_resolve() { AgsFile *file; gpointer ptr; file = g_object_new(AGS_TYPE_FILE, NULL); /* stub read resolve */ ptr = AGS_FILE_GET_CLASS(file)->read_resolve; AGS_FILE_GET_CLASS(file)->read_resolve = ags_file_test_stub_read_resolve; /* assert read resolve */ ags_file_read_resolve(file); CU_ASSERT(stub_read_resolve == TRUE); /* reset */ AGS_FILE_GET_CLASS(file)->read_resolve = ptr; } void ags_file_test_read_start() { AgsFile *file; gpointer ptr; file = g_object_new(AGS_TYPE_FILE, NULL); /* stub read start */ ptr = AGS_FILE_GET_CLASS(file)->read_start; AGS_FILE_GET_CLASS(file)->read_start = ags_file_test_stub_read_start; /* assert read start */ ags_file_read_start(file); CU_ASSERT(stub_read_start == TRUE); /* reset */ AGS_FILE_GET_CLASS(file)->read_start = ptr; } void ags_file_test_read_config() { //TODO:JK: implement me } void ags_file_test_write_config() { //TODO:JK: implement me } void ags_file_test_read_application_context() { //TODO:JK: implement me } void ags_file_test_write_application_context() { //TODO:JK: implement me } void ags_file_test_stub_open(AgsFile *file, GError **error) { stub_open = TRUE; } void ags_file_test_stub_open_from_data(AgsFile *file, gchar *data, guint length, GError **error) { stub_open_from_data = TRUE; } void ags_file_test_stub_rw_open(AgsFile *file, gboolean create, GError **error) { stub_rw_open = TRUE; } void ags_file_test_stub_write(AgsFile *file) { stub_write = TRUE; } void ags_file_test_stub_write_concurrent(AgsFile *file) { stub_write_concurrent = TRUE; } void ags_file_test_stub_write_resolve(AgsFile *file) { stub_write_resolve = TRUE; } void ags_file_test_stub_read(AgsFile *file) { stub_read = TRUE; } void ags_file_test_stub_read_resolve(AgsFile *file) { stub_read_resolve = TRUE; } void ags_file_test_stub_read_start(AgsFile *file) { stub_read_start = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFileTest\0", ags_file_test_init_suite, ags_file_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsFile string to md5 sum\0", ags_file_test_str2md5) == NULL) || (CU_add_test(pSuite, "test of AgsFile add id ref\0", ags_file_test_add_id_ref) == NULL) || (CU_add_test(pSuite, "test of AgsFile find id ref by node\0", ags_file_test_find_id_ref_by_node) == NULL) || (CU_add_test(pSuite, "test of AgsFile find id ref by xpath\0", ags_file_test_find_id_ref_by_xpath) == NULL) || (CU_add_test(pSuite, "test of AgsFile find id ref by reference\0", ags_file_test_find_id_ref_by_reference) == NULL) || (CU_add_test(pSuite, "test of AgsFile add lookup\0", ags_file_test_add_lookup) == NULL) || (CU_add_test(pSuite, "test of AgsFile add launch\0", ags_file_test_add_launch) == NULL) || (CU_add_test(pSuite, "test of AgsFile open\0", ags_file_test_open) == NULL) || (CU_add_test(pSuite, "test of AgsFile open from data\0", ags_file_test_open_from_data) == NULL) || (CU_add_test(pSuite, "test of AgsFile rw open\0", ags_file_test_rw_open) == NULL) || (CU_add_test(pSuite, "test of AgsFile open filename\0", ags_file_test_open_filename) == NULL) || (CU_add_test(pSuite, "test of AgsFile close\0", ags_file_test_close) == NULL) || (CU_add_test(pSuite, "test of AgsFile write\0", ags_file_test_write) == NULL) || (CU_add_test(pSuite, "test of AgsFile write concurrent\0", ags_file_test_write_concurrent) == NULL) || (CU_add_test(pSuite, "test of AgsFile write resolve\0", ags_file_test_write_resolve) == NULL) || (CU_add_test(pSuite, "test of AgsFile read\0", ags_file_test_read) == NULL) || (CU_add_test(pSuite, "test of AgsFile read resolve\0", ags_file_test_read_resolve) == NULL) || (CU_add_test(pSuite, "test of AgsFile read start\0", ags_file_test_read_start) == NULL) || (CU_add_test(pSuite, "test of AgsFile read config\0", ags_file_test_read_config) == NULL) || (CU_add_test(pSuite, "test of AgsFile write config\0", ags_file_test_write_config) == NULL) || (CU_add_test(pSuite, "test of AgsFile read application context\0", ags_file_test_read_application_context) == NULL) || (CU_add_test(pSuite, "test of AgsFile write application context\0", ags_file_test_write_application_context) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/file/ags_file_id_ref_test.c0000644000175000017500000000546113246707333017636 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_file_id_ref_test_init_suite(); int ags_file_id_ref_test_clean_suite(); void ags_file_id_ref_test_resolved(); void ags_file_id_ref_test_stub_resolved(AgsFileIdRef *file_id_ref); gboolean stub_resolved; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_file_id_ref_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_file_id_ref_test_clean_suite() { return(0); } void ags_file_id_ref_test_resolved() { AgsFileIdRef *file_id_ref; gpointer ptr; file_id_ref = g_object_new(AGS_TYPE_FILE_ID_REF, NULL); ptr = AGS_FILE_ID_REF_GET_CLASS(file_id_ref)->resolved; AGS_FILE_ID_REF_GET_CLASS(file_id_ref)->resolved = ags_file_id_ref_test_stub_resolved; /* assert resolved */ ags_file_id_ref_resolved(file_id_ref); CU_ASSERT(stub_resolved == TRUE); AGS_FILE_ID_REF_GET_CLASS(file_id_ref)->resolved = ptr; } void ags_file_id_ref_test_stub_resolved(AgsFileIdRef *file_id_ref) { stub_resolved = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFileIdRefTest\0", ags_file_id_ref_test_init_suite, ags_file_id_ref_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsFileIdRef resolved\0", ags_file_id_ref_test_resolved) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/lib/0000755000175000017500000000000013256233676013260 500000000000000gsequencer-1.4.24/ags/test/lib/ags_turtle_test.c0000644000175000017500000007431713246707333016563 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #include #include #include #include #include #include int ags_turtle_test_init_suite(); int ags_turtle_test_clean_suite(); void ags_turtle_test_read_iriref(); void ags_turtle_test_read_pname_ns(); void ags_turtle_test_read_pname_ln(); void ags_turtle_test_read_blank_node_label(); void ags_turtle_test_read_langtag(); void ags_turtle_test_read_boolean(); void ags_turtle_test_read_integer(); void ags_turtle_test_read_decimal(); void ags_turtle_test_read_double(); void ags_turtle_test_read_exponent(); void ags_turtle_test_read_string(); void ags_turtle_test_read_string_literal_quote(); void ags_turtle_test_read_string_literal_single_quote(); void ags_turtle_test_read_string_literal_long_quote(); void ags_turtle_test_read_string_literal_long_single_quote(); void ags_turtle_test_read_uchar(); void ags_turtle_test_read_echar(); void ags_turtle_test_read_ws(); void ags_turtle_test_read_anon(); void ags_turtle_test_read_pn_chars_base(); void ags_turtle_test_read_pn_chars_u(); void ags_turtle_test_read_pn_chars(); void ags_turtle_test_read_pn_prefix(); void ags_turtle_test_read_pn_local(); void ags_turtle_test_read_plx(); void ags_turtle_test_read_percent(); void ags_turtle_test_read_hex(); void ags_turtle_test_read_pn_local_esc(); #define AGS_TURTLE_TEST_READ_INTEGER_COUNT (1024) #define AGS_TURTLE_TEST_READ_DECIMAL_COUNT (1024) #define AGS_TURTLE_TEST_READ_DOUBLE_COUNT (1024) #define AGS_TURTLE_TEST_READ_PN_CHARS_BASE_ITERATION_COUNT (65535) #define AGS_TURTLE_TEST_READ_PN_CHARS_BASE_ITERATION_COUNT (65535) #define AGS_TURTLE_TEST_READ_PN_CHARS_ITERATION_COUNT (256) /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_turtle_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_turtle_test_clean_suite() { return(0); } void ags_turtle_test_read_iriref() { gchar *iriref_lv2 = "\0"; gchar *no_iriref = "\0"; gchar *str; /* assert iriref lv2 */ str = ags_turtle_read_iriref(iriref_lv2, iriref_lv2 + strlen(iriref_lv2)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(str, "\0", 6)); /* assert no iriref */ str = ags_turtle_read_iriref(no_iriref, no_iriref + strlen(no_iriref)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_pname_ns() { gchar *pname_ns_port = ":port\0"; gchar *pname_ns_swh_plugin = "swh:plugin\0"; gchar *no_pname_ns = "port\0"; gchar *str; /* assert pname ns port */ str = ags_turtle_read_pname_ns(pname_ns_port, pname_ns_port + strlen(pname_ns_port)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(str, ":\0", 2)); /* assert pname ns swh plugin */ str = ags_turtle_read_pname_ns(pname_ns_swh_plugin, pname_ns_swh_plugin + strlen(pname_ns_swh_plugin)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(str, "swh:\0", 5)); /* assert no pname ns */ str = ags_turtle_read_pname_ns(no_pname_ns, no_pname_ns + strlen(no_pname_ns)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_pname_ln() { gchar *pname_ln_port = ":port\0"; gchar *pname_ln_swh_plugin = "swh:plugin\0"; gchar *no_pname_ln = "port\0"; gchar *str; /* assert pname ln port */ str = ags_turtle_read_pname_ln(pname_ln_port, pname_ln_port + strlen(pname_ln_port)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(str, ":port\0", 6)); /* assert pname ln swh plugin */ str = ags_turtle_read_pname_ln(pname_ln_swh_plugin, pname_ln_swh_plugin + strlen(pname_ln_swh_plugin)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(str, "swh:plugin\0", 11)); /* assert no pname ln */ str = ags_turtle_read_pname_ln(no_pname_ln, no_pname_ln + strlen(no_pname_ln)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_blank_node_label() { gchar *blank_node_myid = "_:myid\0"; gchar *no_blank_node = "_ no id\0"; gchar *str; /* assert blank node myid */ str = ags_turtle_read_blank_node_label(blank_node_myid, blank_node_myid + strlen(blank_node_myid)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(str, "_:myid\0", 6)); /* assert no blank_node */ str = ags_turtle_read_blank_node_label(no_blank_node, no_blank_node + strlen(no_blank_node)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_langtag() { gchar *langtag_DE = "@DE\0"; gchar *langtag_DE_CH = "@DE-CH\0"; gchar *langtag_DE_AT = "@DE-AT\0"; gchar *no_langtag = "Fr\0"; gchar *str; /* assert DE */ str = ags_turtle_read_langtag(langtag_DE, langtag_DE + strlen(langtag_DE)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(langtag_DE, str, 4)); /* assert DE-CH */ str = ags_turtle_read_langtag(langtag_DE_CH, langtag_DE_CH + strlen(langtag_DE_CH)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(langtag_DE_CH, str, 4)); /* assert DE-AT */ str = ags_turtle_read_langtag(langtag_DE_AT, langtag_DE_AT + strlen(langtag_DE_AT)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(langtag_DE_AT, str, 4)); /* assert no */ str = ags_turtle_read_langtag(no_langtag, no_langtag + strlen(no_langtag)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_boolean() { gchar *boolean_true = "true\0"; gchar *boolean_false = "false\0"; gchar *not_boolean_0 = "0"; gchar *not_boolean_1 = "1"; gchar *str; /* assert true */ str = ags_turtle_read_boolean(boolean_true, boolean_true + strlen(boolean_true)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(boolean_true, str, 5)); /* assert false */ str = ags_turtle_read_boolean(boolean_false, boolean_false + strlen(boolean_false)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(boolean_false, str, 5)); /* assert not 0 */ str = ags_turtle_read_boolean(not_boolean_0, not_boolean_0 + strlen(not_boolean_0)); CU_ASSERT(str == NULL); /* assert not 1 */ str = ags_turtle_read_boolean(not_boolean_1, not_boolean_1 + strlen(not_boolean_1)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_integer() { gchar *str, *tmp; gchar *no_integer = "!0\0"; guint i; gboolean success; /* check random integer */ success = TRUE; for(i = 0; i < AGS_TURTLE_TEST_READ_INTEGER_COUNT; i++){ tmp = g_strdup_printf("%d\0", rand() % 4294967296 - 2147483648); str = ags_turtle_read_integer(tmp, tmp + strlen(tmp)); if(str == NULL || g_ascii_strcasecmp(tmp, str)){ success = FALSE; break; } free(tmp); } CU_ASSERT(success == TRUE); /* check no */ str = ags_turtle_read_integer(no_integer, no_integer + strlen(no_integer)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_decimal() { gchar *str, *tmp; gchar *no_double = "!0\0"; guint i; gboolean success; /* check random double */ success = TRUE; for(i = 0; i < AGS_TURTLE_TEST_READ_DECIMAL_COUNT; i++){ tmp = g_strdup_printf("%.5f\0", (rand() % 4294967296 - 2147483648) / 31.0); str = ags_turtle_read_decimal(tmp, tmp + strlen(tmp)); if(str == NULL || g_ascii_strcasecmp(tmp, str)){ success = FALSE; break; } free(tmp); } CU_ASSERT(success == TRUE); /* check no */ str = ags_turtle_read_decimal(no_double, no_double + strlen(no_double)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_double() { gchar *str, *tmp; gchar *no_double = "!0E12\0"; gdouble val_0; guint i; gboolean success; /* check random double */ success = TRUE; for(i = 0; i < AGS_TURTLE_TEST_READ_DOUBLE_COUNT; i++){ val_0 = (rand() % 4294967296 - 2147483648) / 31.0; tmp = g_strdup_printf("%01.5fE11\0", val_0); str = ags_turtle_read_double(tmp, tmp + strlen(tmp)); if(str == NULL || g_ascii_strcasecmp(str, tmp)){ success = FALSE; break; } free(tmp); } CU_ASSERT(success == TRUE); /* check no */ str = ags_turtle_read_double(no_double, no_double + strlen(no_double)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_exponent() { gchar *exponent_e10 = "e+10\0"; gchar *exponent_E10 = "E-10\0"; gchar *no_exponent = "e 10\0"; gchar *str; /* assert e+10 */ str = ags_turtle_read_exponent(exponent_e10, exponent_e10 + strlen(exponent_e10)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(exponent_e10, str, 5)); /* assert E-10 */ str = ags_turtle_read_exponent(exponent_E10, exponent_E10 + strlen(exponent_E10)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(exponent_E10, str, 5)); } void ags_turtle_test_read_string() { gchar *string_literal_quote_MY_TURTLE = "\"MY Turtle\"\0"; gchar *string_literal_single_quote_MY_TURTLE = "\'MY Turtle\'\0"; gchar *string_literal_long_quote_MY_TURTLE = "\"\"\"MY Turtle\nis just looking at the mirror\nand is waiting to get feed\"\"\"\0"; gchar *string_literal_long_single_quote_MY_TURTLE = "'''MY Turtle\nis just looking at the mirror\nand is waiting to get feed'''\0"; gchar *str; /* assert my turtle quote */ str = ags_turtle_read_string(string_literal_quote_MY_TURTLE, string_literal_quote_MY_TURTLE + strlen(string_literal_quote_MY_TURTLE)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(string_literal_quote_MY_TURTLE, str, strlen(string_literal_quote_MY_TURTLE))); /* assert my turtle single quote */ str = ags_turtle_read_string(string_literal_single_quote_MY_TURTLE, string_literal_single_quote_MY_TURTLE + strlen(string_literal_single_quote_MY_TURTLE)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(string_literal_single_quote_MY_TURTLE, str, strlen(string_literal_single_quote_MY_TURTLE))); /* assert my turtle long quote */ str = ags_turtle_read_string(string_literal_long_quote_MY_TURTLE, string_literal_long_quote_MY_TURTLE + strlen(string_literal_long_quote_MY_TURTLE)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(string_literal_long_quote_MY_TURTLE, str, strlen(string_literal_long_quote_MY_TURTLE))); /* assert my turtle long single quote */ str = ags_turtle_read_string(string_literal_long_single_quote_MY_TURTLE, string_literal_long_single_quote_MY_TURTLE + strlen(string_literal_long_single_quote_MY_TURTLE)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(string_literal_long_single_quote_MY_TURTLE, str, strlen(string_literal_long_single_quote_MY_TURTLE))); } void ags_turtle_test_read_string_literal_quote() { gchar *string_literal_quote_MY_TURTLE = "\"MY Turtle\"\0"; gchar *str; /* assert my turtle quote */ str = ags_turtle_read_string(string_literal_quote_MY_TURTLE, string_literal_quote_MY_TURTLE + strlen(string_literal_quote_MY_TURTLE)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(string_literal_quote_MY_TURTLE, str, strlen(string_literal_quote_MY_TURTLE))); } void ags_turtle_test_read_string_literal_single_quote() { gchar *string_literal_single_quote_MY_TURTLE = "\'MY Turtle\'\0"; gchar *str; /* assert my turtle single quote */ str = ags_turtle_read_string(string_literal_single_quote_MY_TURTLE, string_literal_single_quote_MY_TURTLE + strlen(string_literal_single_quote_MY_TURTLE)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(string_literal_single_quote_MY_TURTLE, str, strlen(string_literal_single_quote_MY_TURTLE))); } void ags_turtle_test_read_string_literal_long_quote() { gchar *string_literal_long_quote_MY_TURTLE = "\"\"\"MY Turtle\nis just looking at the mirror\nand is waiting to get feed\"\"\"\0"; gchar *str; /* assert my turtle long quote */ str = ags_turtle_read_string(string_literal_long_quote_MY_TURTLE, string_literal_long_quote_MY_TURTLE + strlen(string_literal_long_quote_MY_TURTLE)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(string_literal_long_quote_MY_TURTLE, str, strlen(string_literal_long_quote_MY_TURTLE))); } void ags_turtle_test_read_string_literal_long_single_quote() { gchar *string_literal_long_single_quote_MY_TURTLE = "'''MY Turtle\nis just looking at the mirror\nand is waiting to get feed'''\0"; gchar *str; /* assert my turtle long single quote */ str = ags_turtle_read_string(string_literal_long_single_quote_MY_TURTLE, string_literal_long_single_quote_MY_TURTLE + strlen(string_literal_long_single_quote_MY_TURTLE)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(string_literal_long_single_quote_MY_TURTLE, str, strlen(string_literal_long_single_quote_MY_TURTLE))); } void ags_turtle_test_read_uchar() { gchar *uchar_2_A = "\\u0041\0"; gchar *uchar_2_e_diaresis = "\\u00eb\0"; gchar *uchar_4_A = "\\Uffef0041\0"; gchar *uchar_4_e_diaresis = "\\Uffef00eb\0"; gchar *str; /* assert 2 byte capital A */ str = ags_turtle_read_uchar(uchar_2_A, uchar_2_A + strlen(uchar_2_A)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(uchar_2_A, str, 7)); /* assert 2 byte e diaresis */ str = ags_turtle_read_uchar(uchar_2_e_diaresis, uchar_2_e_diaresis + strlen(uchar_2_e_diaresis)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(uchar_2_e_diaresis, str, 7)); /* assert 4 byte capital A */ str = ags_turtle_read_uchar(uchar_4_A, uchar_4_A + strlen(uchar_4_A)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(uchar_4_A, str, 11)); /* assert 4 byte e diaresis */ str = ags_turtle_read_uchar(uchar_4_e_diaresis, uchar_4_e_diaresis + strlen(uchar_4_e_diaresis)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(uchar_4_e_diaresis, str, 11)); } void ags_turtle_test_read_echar() { gchar current[3]; gchar *echar = "tbnrf\"\0"; gchar *str; guint i; gboolean success; /* assert escaped characters */ current[0] = '\\'; current[2] = '\0'; success = TRUE; for(i = 0; i < 7; i++){ current[1] = echar[i]; str = ags_turtle_read_echar(current, current + 3); if(g_ascii_strncasecmp(current, str, 3)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); /* assert not escaped */ current[1] = 'x'; str = ags_turtle_read_echar(current, current + 3); CU_ASSERT(str == NULL); } void ags_turtle_test_read_ws() { gchar current[2]; gchar *ws = "\x20\x09\x0D\x0A\0"; gchar *str; guint i; gboolean success; /* assert white-space */ current[1] = '\0'; success = TRUE; for(i = 0; i < 4; i++){ current[0] = ws[i]; str = ags_turtle_read_ws(current, current + 2); if(g_ascii_strncasecmp(current, str, 2)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); /* assert no ws */ current[0] = 'a'; str = ags_turtle_read_ws(current, current + 2); CU_ASSERT(str == NULL); } void ags_turtle_test_read_anon() { gchar *anon_empty = "[]\0"; gchar *anon_ws = "[ ]\0"; gchar *anon_tab = "[\t\t\t]\0"; gchar *anon_mixed = "[\t \t ]\0"; gchar *str; /* assert anon empty */ str = ags_turtle_read_anon(anon_empty, anon_empty + 3); CU_ASSERT(str != NULL && !g_ascii_strcasecmp(str, anon_empty)); /* assert anon ws */ str = ags_turtle_read_anon(anon_ws, anon_ws + 5); CU_ASSERT(str != NULL && !g_ascii_strcasecmp(str, anon_ws)); /* assert anon tab */ str = ags_turtle_read_anon(anon_tab, anon_tab + 6); CU_ASSERT(str != NULL && !g_ascii_strcasecmp(str, anon_tab)); /* assert anon mixed */ str = ags_turtle_read_anon(anon_mixed, anon_mixed + 7); CU_ASSERT(str != NULL && !g_ascii_strcasecmp(str, anon_mixed)); } void ags_turtle_test_read_pn_chars_base() { gchar current[25]; gchar *str; guint n_bytes, nth; guint i; gboolean success; /* test single char A-Z */ success = TRUE; for(i = 0; i < 26; i++){ current[0] = 'A' + i; current[1] = '\0'; str = ags_turtle_read_pn_chars_base(current, current + 2); if(g_ascii_strncasecmp(current, str, 2)){ success = FALSE; break; } current[0] = 'a' + i; current[1] = '\0'; str = ags_turtle_read_pn_chars_base(current, current + 2); if(g_ascii_strncasecmp(current, str, 2)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); /* test random string */ success = TRUE; for(i = 0; i < AGS_TURTLE_TEST_READ_PN_CHARS_BASE_ITERATION_COUNT; i++){ guint range; nth = 0; n_bytes = 0; range = rand() % 13; switch(range){ case 0: { if(rand() % 2 == 1){ current[nth] = 'a' + (rand() % 26); }else{ current[nth] = 'A' + (rand() % 26); } n_bytes = 1; } break; case 1: { current[nth] = 0xC3; current[nth + 1] = 0x80 + (rand() % 22); n_bytes = 2; } break; case 2: { current[nth] = 0xC3; current[nth + 1] = 0x98 + (rand() % 30); n_bytes = 2; } break; case 3: { guint sub; sub = rand() % 3; if(sub == 0){ current[nth] = 0xC3; current[nth + 1] = 0xB8 + (rand() % 8); }else if(sub == 1){ current[nth] = 0xC3 + (rand() % 7); current[nth + 1] = 0x80 + (rand() % 64); }else if(sub == 2){ current[nth] = 0xCB; current[nth + 1] = 0x80 + (rand() % 64); } n_bytes = 2; } break; case 4: { current[nth] = 0xCD; current[nth + 1] = 0xB0 + (rand() % 13); n_bytes = 2; } break; case 5: { guint sub; sub = rand() % 3; if(sub == 0){ current[nth] = 0xCD; current[nth + 1] = 0xBF + (rand() % 32); n_bytes = 2; }else if(sub == 1){ current[nth] = 0xCE + (rand() % 7); current[nth + 1] = 0x80 + (rand() % 64); n_bytes = 2; }else if(sub == 2){ current[nth] = 0xE0 + (rand() % 2); current[nth + 1] = 0x80 + (rand() % 64); current[nth + 2] = 0x80 + (rand() % 64); n_bytes = 3; } } break; case 6: { current[nth] = 0xE2; current[nth + 1] = 0x80; current[nth + 2] = 0x8C + (rand() % 2); n_bytes = 3; } break; case 7: { guint sub; sub = rand() % 3; if(sub == 0){ current[nth] = 0xE2; current[nth + 1] = 0x81; current[nth + 2] = 0xB0 + (rand() % 16); }else if(sub == 1){ current[nth] = 0xE2; current[nth + 1] = 0x81 + (rand() % 4); current[nth + 2] = 0x80 + (rand() % 64); }else if(sub == 2){ current[nth] = 0xE2; current[nth + 1] = 0x86; current[nth + 2] = 0x80 + (rand() % 16); } n_bytes = 3; } break; case 8: { guint sub; sub = rand() % 2; if(sub == 0){ current[nth] = 0xE2; current[nth + 1] = 0xB0 + (rand() % 15); current[nth + 2] = 0x80 + (rand() % 64); }else if(sub == 1){ current[nth] = 0xE2; current[nth + 1] = 0xBF; current[nth + 2] = 0x80 + (rand() % 48); } n_bytes = 3; } break; case 9: { guint sub; sub = rand() % 2; if(sub == 0){ current[nth] = 0xE3; current[nth + 1] = 0x80 + (rand() % 64); current[nth + 2] = 0x81 + (rand() % 63); }else if(sub == 1){ current[nth] = 0xE4 + (rand() % 8); current[nth + 1] = 0x80 + (rand() % 16); current[nth + 2] = 0x80 + (rand() % 64); } n_bytes = 3; } break; case 10: { guint sub; sub = rand() % 2; if(sub == 0){ current[nth] = 0xEF; current[nth + 1] = 0xA4 + (rand() % 18); current[nth + 2] = 0x80 + (rand() % 64); }else if(sub == 1){ current[nth] = 0xEF; current[nth + 1] = 0xBF; current[nth + 2] = 0x80 + (rand() % 16); } n_bytes = 3; } break; case 11: { guint sub; sub = rand() % 3; if(sub == 0){ current[nth] = 0xEF; current[nth + 1] = 0xB7; current[nth + 2] = 0xB0 + (rand() % 16); }else if(sub == 1){ current[nth] = 0xEF; current[nth + 1] = 0xB8 + (rand() % 6); current[nth + 2] = 0x80 + (rand() % 64); }else if(sub == 2){ current[nth] = 0xEF; current[nth + 1] = 0xBF; current[nth + 2] = 0x80 + (rand() % 62); } n_bytes = 3; } break; case 12: { current[nth] = 0xF0 + (rand() % 4); current[nth + 1] = 0x90 + (rand() % 32); current[nth + 2] = 0x80 + (rand() % 64); current[nth + 3] = 0x80 + (rand() % 64); n_bytes = 4; } } current[nth + n_bytes] = '\0'; str = ags_turtle_read_pn_chars_base(current, current + n_bytes); if(str == NULL || g_ascii_strncasecmp(current, str, n_bytes)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_turtle_test_read_pn_chars_u() { gchar *underscore = "_\0"; gchar *str; str = ags_turtle_read_pn_chars_u(underscore, underscore + 2); CU_ASSERT(str != NULL || !g_ascii_strncasecmp(underscore, str, 2)); } void ags_turtle_test_read_pn_chars() { gchar *dash = "-\0"; gchar *bullet = "\xC2\xB7\0"; gchar *key_0 = "\xE2\x80\xBF\0"; gchar *key_1 = "\xE2\x81\x80\0"; gchar current[25]; gchar *str; guint n_bytes, nth; guint i; gboolean success; /* test single char 0-9 */ success = TRUE; for(i = 0; i < 10; i++){ current[0] = '0' + i; current[1] = '\0'; str = ags_turtle_read_pn_chars(current, current + 2); if(g_ascii_strncasecmp(current, str, 2)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); /* test dash */ str = ags_turtle_read_pn_chars(dash, dash + 2); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(dash, str, 2)); /* test bullet */ str = ags_turtle_read_pn_chars(bullet, bullet + 2); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(bullet, str, 2)); /* test random string */ success = TRUE; for(i = 0; i < AGS_TURTLE_TEST_READ_PN_CHARS_BASE_ITERATION_COUNT; i++){ guint range; nth = 0; n_bytes = 0; range = rand() % 2; switch(range){ case 0: { current[nth] = 0xCC; current[nth + 1] = 0xB0 + (rand() % 16); n_bytes = 2; } break; case 1: { current[nth] = 0xCD; current[nth + 1] = 0x80 + (rand() % 48); n_bytes = 2; } break; } current[nth + n_bytes] = '\0'; str = ags_turtle_read_pn_chars(current, current + n_bytes); if(str == NULL || g_ascii_strncasecmp(current, str, n_bytes)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); /* test key_0 */ str = ags_turtle_read_pn_chars(key_0, key_0 + 2); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(key_0, str, 2)); /* test key_1 */ str = ags_turtle_read_pn_chars(key_1, key_1 + 2); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(key_1, str, 2)); } void ags_turtle_test_read_pn_prefix() { gchar *no_prefix = ".\0"; gchar *str; static const gchar *prefix[] = { "aa.\0", "aaa...\0", "aaa.zzz\0", "aaa...zzz\0", }; /* test prefix 0 */ str = ags_turtle_read_pn_prefix(prefix[0], prefix[0] + strlen(prefix[0])); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(prefix[0], str, strlen(prefix[0]))); /* test prefix 1 */ str = ags_turtle_read_pn_prefix(prefix[1], prefix[1] + strlen(prefix[1])); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(prefix[1], str, strlen(prefix[1]))); /* test prefix 2 */ str = ags_turtle_read_pn_prefix(prefix[2], prefix[2] + strlen(prefix[2])); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(prefix[2], str, strlen(prefix[2]))); /* test prefix 3 */ str = ags_turtle_read_pn_prefix(prefix[3], prefix[3] + strlen(prefix[3])); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(prefix[3], str, strlen(prefix[3]))); /* test no prefix */ str = ags_turtle_read_pn_prefix(no_prefix, no_prefix + strlen(no_prefix)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_pn_local() { gchar *no_local = "%\0"; gchar *str; static const gchar *local[] = { "::\0", "_:\0", ":_\0", "_a\0", ":%00:\0", ":%ff:\0", "zzz:\0", "000.999\0", "0xff\0", }; guint i; /* test local 0 */ for(i = 0; i < 9; i++){ str = ags_turtle_read_pn_local(local[i], local[i] + strlen(local[i])); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(local[i], str, strlen(local[i]))); } /* test no local */ str = ags_turtle_read_pn_local(no_local, no_local + strlen(no_local)); CU_ASSERT(str == NULL); } void ags_turtle_test_read_plx() { //TODO:JK: implement me } void ags_turtle_test_read_percent() { gchar percent[4]; gchar *hex = "0123456789abcdef\0"; gchar *str; guint i, j; gboolean success; percent[0] = '%'; percent[3] = '\0'; success = TRUE; for(i = 0; i < 16; i++){ percent[1] = hex[i]; for(j = 0; j < 16; j++){ percent[2] = hex[j]; str = ags_turtle_read_percent(percent, percent + strlen(percent)); if(str == NULL || g_ascii_strncasecmp(percent, str, 4)){ success = FALSE; break; } } } CU_ASSERT(success == TRUE); } void ags_turtle_test_read_hex() { gchar hex[2]; //TODO:JK: implement me } void ags_turtle_test_read_pn_local_esc() { gchar local_esc[3]; gchar *escapes = "\\_~.-!$&()*+,;=/?#@%\0"; gchar *str; guint i; local_esc[0] = '\\'; local_esc[2] = '\0'; for(i = 0; i < strlen(escapes); i++){ local_esc[1] = escapes[i]; str = ags_turtle_read_pn_local_esc(local_esc, local_esc + strlen(local_esc)); CU_ASSERT(str != NULL && !g_ascii_strncasecmp(local_esc, str, 3)); } } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsTurtleTest\0", ags_turtle_test_init_suite, ags_turtle_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsTurtle read iriref\0", ags_turtle_test_read_iriref) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read prefixed name namespace\0", ags_turtle_test_read_pname_ns) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read prefixed name localized name\0", ags_turtle_test_read_pname_ln) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read blank node label\0", ags_turtle_test_read_blank_node_label) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read language tag\0", ags_turtle_test_read_langtag) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read boolean\0", ags_turtle_test_read_boolean) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read integer\0", ags_turtle_test_read_integer) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read decimal\0", ags_turtle_test_read_decimal) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read double\0", ags_turtle_test_read_double) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read exponent\0", ags_turtle_test_read_exponent) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read string\0", ags_turtle_test_read_string) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read string literal quote\0", ags_turtle_test_read_string_literal_quote) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read string literal single quote\0", ags_turtle_test_read_string_literal_single_quote) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read string literal long quote\0", ags_turtle_test_read_string_literal_long_quote) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read string literal long single quote\0", ags_turtle_test_read_string_literal_long_single_quote) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read uchar\0", ags_turtle_test_read_uchar) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read echar\0", ags_turtle_test_read_echar) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read ws\0", ags_turtle_test_read_ws) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read anon\0", ags_turtle_test_read_anon) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read pn-chars base\0", ags_turtle_test_read_pn_chars_base) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read pn-chars u\0", ags_turtle_test_read_pn_chars_u) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read pn-chars\0", ags_turtle_test_read_pn_chars) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read pn-prefix\0", ags_turtle_test_read_pn_prefix) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read pn-local\0", ags_turtle_test_read_pn_local) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read plx\0", ags_turtle_test_read_plx) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read percent\0", ags_turtle_test_read_percent) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read hex\0", ags_turtle_test_read_hex) == NULL) || (CU_add_test(pSuite, "test of AgsTurtle read pn-local esc\0", ags_turtle_test_read_pn_local_esc) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/lib/ags_log_test.c0000644000175000017500000001067513246707333016022 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_log_test_init_suite(); int ags_log_test_clean_suite(); void ags_log_test_add_message(); void ags_log_test_get_messages(); #define AGS_LOG_TEST_ADD_MESSAGE_START_ENGINE "start engine" #define AGS_LOG_TEST_ADD_MESSAGE_LOAD_PLUGINS "load plugins" #define AGS_LOG_TEST_ADD_MESSAGE_APPLICATION_READY "application ready" #define AGS_LOG_TEST_ADD_MESSAGE_STOP_ENGINE "stop engine" #define AGS_LOG_TEST_GET_MESSAGES_DEFAULT "default" /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_log_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_log_test_clean_suite() { return(0); } void ags_log_test_add_message() { AgsLog *log; log = ags_log_get_instance(); /* message - start engine */ ags_log_add_message(log, AGS_LOG_TEST_ADD_MESSAGE_START_ENGINE); CU_ASSERT(g_list_find_custom(g_atomic_pointer_get(&(log->messages)), AGS_LOG_TEST_ADD_MESSAGE_START_ENGINE, g_strcmp0) != NULL); /* message - load plugins */ ags_log_add_message(log, AGS_LOG_TEST_ADD_MESSAGE_LOAD_PLUGINS); CU_ASSERT(g_list_find_custom(g_atomic_pointer_get(&(log->messages)), AGS_LOG_TEST_ADD_MESSAGE_LOAD_PLUGINS, g_strcmp0) != NULL); /* message - application ready */ ags_log_add_message(log, AGS_LOG_TEST_ADD_MESSAGE_APPLICATION_READY); CU_ASSERT(g_list_find_custom(g_atomic_pointer_get(&(log->messages)), AGS_LOG_TEST_ADD_MESSAGE_APPLICATION_READY, g_strcmp0) != NULL); /* message - stop engine */ ags_log_add_message(log, AGS_LOG_TEST_ADD_MESSAGE_STOP_ENGINE); CU_ASSERT(g_list_find_custom(g_atomic_pointer_get(&(log->messages)), AGS_LOG_TEST_ADD_MESSAGE_STOP_ENGINE, g_strcmp0) != NULL); /* unref log */ g_object_unref(log); } void ags_log_test_get_messages() { AgsLog *log; gchar *str; guint i; log = ags_log_get_instance(); /* assert initial NULL */ CU_ASSERT(ags_log_get_messages(log) == NULL); /* add messages - #0 */ i = 0; str = g_strdup_printf("%s %d", AGS_LOG_TEST_GET_MESSAGES_DEFAULT, i); i++; ags_log_add_message(log, str); /* add messages - #1 */ str = g_strdup_printf("%s %d", AGS_LOG_TEST_GET_MESSAGES_DEFAULT, i); i++; ags_log_add_message(log, str); /* add messages - #2 */ i = 0; str = g_strdup_printf("%s %d", AGS_LOG_TEST_GET_MESSAGES_DEFAULT, i); i++; ags_log_add_message(log, str); /* assert list length equals 3 */ CU_ASSERT(g_list_length(ags_log_get_messages(log)) == 3); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLogTest\0", ags_log_test_init_suite, ags_log_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLog add message\0", ags_log_test_add_message) == NULL) || (CU_add_test(pSuite, "test of AgsLog get messages\0", ags_log_test_get_messages) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/lib/ags_turtle_manager_test.c0000644000175000017500000001164113246707333020244 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_turtle_manager_test_init_suite(); int ags_turtle_manager_test_clean_suite(); void ags_turtle_manager_test_find(); void ags_turtle_manager_test_add(); #define AGS_TURTLE_MANAGER_TEST_FIND_MICHAELANGELO "Michael-Angelo.rdf" #define AGS_TURTLE_MANAGER_TEST_FIND_RAPHAEL "Raphael.rdf" #define AGS_TURTLE_MANAGER_TEST_FIND_LEONARDO "Leonardo.rdf" #define AGS_TURTLE_MANAGER_TEST_FIND_DONATELLO "Donatello.rdf" #define AGS_TURTLE_MANAGER_TEST_ADD_DEFAULT "Default" /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_turtle_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_turtle_manager_test_clean_suite() { return(0); } void ags_turtle_manager_test_find() { AgsTurtleManager *turtle_manager; AgsTurtle *turtle[4], *current; turtle_manager = ags_turtle_manager_get_instance(); /* turtle #0 */ turtle[0] = ags_turtle_new(AGS_TURTLE_MANAGER_TEST_FIND_MICHAELANGELO); ags_turtle_manager_add(turtle_manager, turtle[0]); /* turtle #1 */ turtle[1] = ags_turtle_new(AGS_TURTLE_MANAGER_TEST_FIND_RAPHAEL); ags_turtle_manager_add(turtle_manager, turtle[1]); /* turtle #2 */ turtle[2] = ags_turtle_new(AGS_TURTLE_MANAGER_TEST_FIND_LEONARDO); ags_turtle_manager_add(turtle_manager, turtle[2]); /* turtle #3 */ turtle[3] = ags_turtle_new(AGS_TURTLE_MANAGER_TEST_FIND_DONATELLO); ags_turtle_manager_add(turtle_manager, turtle[3]); /* assert find */ CU_ASSERT((current = ags_turtle_manager_find(turtle_manager, AGS_TURTLE_MANAGER_TEST_FIND_MICHAELANGELO)) != NULL && current == turtle[0]); CU_ASSERT((current = ags_turtle_manager_find(turtle_manager, AGS_TURTLE_MANAGER_TEST_FIND_RAPHAEL)) != NULL && current == turtle[1]); CU_ASSERT((current = ags_turtle_manager_find(turtle_manager, AGS_TURTLE_MANAGER_TEST_FIND_LEONARDO)) != NULL && current == turtle[2]); CU_ASSERT((current = ags_turtle_manager_find(turtle_manager, AGS_TURTLE_MANAGER_TEST_FIND_DONATELLO)) != NULL && current == turtle[3]); /* unref turtle manager */ g_object_unref(turtle_manager); } void ags_turtle_manager_test_add() { AgsTurtleManager *turtle_manager; AgsTurtle *turtle; gchar *str; guint i; turtle_manager = ags_turtle_manager_get_instance(); /* add turtle - #0 */ i = 0; str = g_strdup_printf("%s %d", AGS_TURTLE_MANAGER_TEST_ADD_DEFAULT, i); i++; turtle = ags_turtle_new(str); ags_turtle_manager_add(turtle_manager, turtle); /* add turtle - #1 */ str = g_strdup_printf("%s %d", AGS_TURTLE_MANAGER_TEST_ADD_DEFAULT, i); i++; turtle = ags_turtle_new(str); ags_turtle_manager_add(turtle_manager, turtle); /* add turtle - #2 */ str = g_strdup_printf("%s %d", AGS_TURTLE_MANAGER_TEST_ADD_DEFAULT, i); i++; turtle = ags_turtle_new(str); ags_turtle_manager_add(turtle_manager, turtle); /* assert count equals 3 */ CU_ASSERT(g_list_length(turtle_manager->turtle) == 3); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsTurtleManagerTest\0", ags_turtle_manager_test_init_suite, ags_turtle_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsTurtleManager find\0", ags_turtle_manager_test_find) == NULL) || (CU_add_test(pSuite, "test of AgsTurtleManager add\0", ags_turtle_manager_test_add) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/lib/ags_complex_test.c0000644000175000017500000001027213246707333016701 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_complex_test_init_suite(); int ags_complex_test_clean_suite(); void ags_complex_test_copy(); void ags_complex_test_get(); void ags_complex_test_set(); /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_complex_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_complex_test_clean_suite() { return(0); } void ags_complex_test_copy() { AgsComplex a; AgsComplex *ptr; /* test x = 1.0 */ a[0] = 1.0; a[1] = 0.0; ptr = ags_complex_copy(&a); CU_ASSERT(ptr[0][0] == a[0] && ptr[0][1] == a[1]); /* test y = 1.0 */ a[0] = 0.0; a[1] = 1.0; ptr = ags_complex_copy(&a); CU_ASSERT(ptr[0][0] == a[0] && ptr[0][1] == a[1]); /* test x = 1.25, y = 2 * M_PI */ a[0] = 1.25; a[1] = 2.0 * M_PI; ptr = ags_complex_copy(&a); CU_ASSERT(ptr[0][0] == a[0] && ptr[0][1] == a[1]); /* test x = 2 * M_PI, y = 1.25 */ a[0] = 2.0 * M_PI; a[1] = 1.25; ptr = ags_complex_copy(&a); CU_ASSERT(ptr[0][0] == a[0] && ptr[0][1] == a[1]); } void ags_complex_test_get() { AgsComplex a; complex z; /* test x = 1.0 */ a[0] = 1.0; a[1] = 0.0; z = ags_complex_get(&a); CU_ASSERT(z == (a[0] + a[1] * I)); /* test y = 1.0 */ a[0] = 0.0; a[1] = 1.0; z = ags_complex_get(&a); CU_ASSERT(z == (a[0] + a[1] * I)); /* test x = 1.25, y = 2 * M_PI */ a[0] = 1.25; a[1] = 2.0 * M_PI; z = ags_complex_get(&a); CU_ASSERT(z == (a[0] + a[1] * I)); /* test x = 2 * M_PI, y = 1.25 */ a[0] = 2.0 * M_PI; a[1] = 1.25; z = ags_complex_get(&a); CU_ASSERT(z == (a[0] + a[1] * I)); } void ags_complex_test_set() { AgsComplex a; complex z; /* test x = 1.0 */ z = 1.0 + 0.0 * I; ags_complex_set(&a, z); CU_ASSERT(a[0] == 1.0 && a[1] == 0.0); /* test y = 1.0 */ z = 0.0 + 1.0 * I; ags_complex_set(&a, z); CU_ASSERT(a[0] == 0.0 && a[1] == 1.0); /* test x = 1.25, y = 2 * M_PI */ z = 1.25 + (2.0 * M_PI) * I; ags_complex_set(&a, z); CU_ASSERT(a[0] == 1.25 && a[1] == 2.0 * M_PI); /* test x = 2 * M_PI, y = 1.25 */ z = (2.0 * M_PI) + 1.25 * I; ags_complex_set(&a, z); CU_ASSERT(a[0] == 2.0 * M_PI && a[1] == 1.25); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsComplexTest\0", ags_complex_test_init_suite, ags_complex_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsComplex copy\0", ags_complex_test_copy) == NULL) || (CU_add_test(pSuite, "test of AgsComplex get\0", ags_complex_test_get) == NULL) || (CU_add_test(pSuite, "test of AgsComplex set\0", ags_complex_test_set) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/0000755000175000017500000000000013256233676014010 500000000000000gsequencer-1.4.24/ags/test/plugin/ags_lv2_worker_manager_test.c0000644000175000017500000000556013246707333021554 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_lv2_worker_manager_test_init_suite(); int ags_lv2_worker_manager_test_clean_suite(); void ags_lv2_worker_manager_test_pull_worker(); #define AGS_LV2_WORKER_MANAGER_TEST_PULL_WORKER_DELAY (5000000) /* Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_worker_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_worker_manager_test_clean_suite() { return(0); } void ags_lv2_worker_manager_test_pull_worker() { AgsLv2WorkerManager *lv2_worker_manager; AgsThreadPool *thread_pool; GObject *worker; lv2_worker_manager = ags_lv2_worker_manager_get_instance(); thread_pool = g_object_new(AGS_TYPE_THREAD_POOL, NULL); lv2_worker_manager->thread_pool = thread_pool; ags_thread_pool_start(thread_pool); usleep(AGS_LV2_WORKER_MANAGER_TEST_PULL_WORKER_DELAY); worker = ags_lv2_worker_manager_pull_worker(lv2_worker_manager); CU_ASSERT(AGS_IS_LV2_WORKER(worker) == TRUE); g_object_unref(lv2_worker_manager); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLv2WorkerManagerTest", ags_lv2_worker_manager_test_init_suite, ags_lv2_worker_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLv2WorkerManager pull worker", ags_lv2_worker_manager_test_pull_worker) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_base_plugin_test.c0000644000175000017500000005572013246707333020261 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_base_plugin_test_init_suite(); int ags_base_plugin_test_clean_suite(); void ags_port_descriptor_test_find_symbol(); void ags_base_plugin_test_find_filename(); void ags_base_plugin_test_find_effect(); void ags_base_plugin_test_find_ui_effect_index(); void ags_base_plugin_test_sort(); void ags_base_plugin_test_apply_port_group_by_prefix(); void ags_base_plugin_test_instantiate(); void ags_base_plugin_test_connect_port(); void ags_base_plugin_test_activate(); void ags_base_plugin_test_deactivate(); void ags_base_plugin_test_run(); void ags_base_plugin_test_load_plugin(); gpointer ags_base_plugin_test_stub_instantiate(AgsBasePlugin *base_plugin, guint samplerate); void ags_base_plugin_test_stub_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location); void ags_base_plugin_test_stub_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_base_plugin_test_stub_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_base_plugin_test_stub_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count); void ags_base_plugin_test_stub_load_plugin(AgsBasePlugin *base_plugin); #define AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_DELAY "delay" #define AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_DRY "dry" #define AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_WET "wet" #define AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_FEEDBACK "feedback" #define AGS_BASE_PLUGIN_TEST_FIND_FILENAME_DEFAULT "default" #define AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT "cmt.so" #define AGS_BASE_PLUGIN_TEST_FIND_EFFECT_PINK_NOISE "pink noise" #define AGS_BASE_PLUGIN_TEST_FIND_EFFECT_ECHO_DELAY "echo delay" #define AGS_BASE_PLUGIN_TEST_FIND_EFFECT_GVERB "gverb" #define AGS_BASE_PLUGIN_TEST_FIND_EFFECT_SWH "swh.so" #define AGS_BASE_PLUGIN_TEST_FIND_EFFECT_AMPLIFIER "amplifier" #define AGS_BASE_PLUGIN_TEST_FIND_EFFECT_ENVELOPE_TRACKER "envelope tracker" #define AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_COMPRESSOR "compressor.so" #define AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_COMPRESSOR_INDEX (3) #define AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_CHORUS "chorus.so" #define AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_CHORUS_INDEX (15) #define AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_FLANGER "flanger.so" #define AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_FLANGER_INDEX (37) #define AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_SPATIALIZER "spatializer.so" #define AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_SPATIALIZER_INDEX (1) #define AGS_BASE_PLUGIN_TEST_SORT_PINK_NOISE "pink noise" #define AGS_BASE_PLUGIN_TEST_SORT_ECHO_DELAY "echo delay" #define AGS_BASE_PLUGIN_TEST_SORT_GVERB "gverb" #define AGS_BASE_PLUGIN_TEST_SORT_AMPLIFIER "amplifier" #define AGS_BASE_PLUGIN_TEST_SORT_ENVELOPE_TRACKER "envelope tracker" #define AGS_BASE_PLUGIN_TEST_SORT_COMPRESSOR "compressor" #define AGS_BASE_PLUGIN_TEST_SORT_CHORUS "chorus" #define AGS_BASE_PLUGIN_TEST_SORT_FLANGER "flanger" #define AGS_BASE_PLUGIN_TEST_SORT_SPATIALIZER "spatializer" #define AGS_BASE_PLUGIN_TEST_INSTANTIATE_SAMPLERATE (48000) #define AGS_BASE_PLUGIN_TEST_RUN_FRAME_COUNT (512) gboolean stub_instantiate = FALSE; gboolean stub_connect_port = FALSE; gboolean stub_activate = FALSE; gboolean stub_deactivate = FALSE; gboolean stub_run = FALSE; gboolean stub_load_plugin = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_base_plugin_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_base_plugin_test_clean_suite() { return(0); } void ags_port_descriptor_test_find_symbol() { AgsPortDescriptor *port_descriptor; GList *list, *current; list = NULL; /* delay */ port_descriptor = ags_port_descriptor_alloc(); port_descriptor->port_symbol = AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_DELAY; list = g_list_prepend(list, port_descriptor); /* dry */ port_descriptor = ags_port_descriptor_alloc(); port_descriptor->port_symbol = AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_DRY; list = g_list_prepend(list, port_descriptor); /* wet */ port_descriptor = ags_port_descriptor_alloc(); port_descriptor->port_symbol = AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_WET; list = g_list_prepend(list, port_descriptor); /* feedback */ port_descriptor = ags_port_descriptor_alloc(); port_descriptor->port_symbol = AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_FEEDBACK; list = g_list_prepend(list, port_descriptor); /* assert find */ CU_ASSERT((current = ags_port_descriptor_find_symbol(list, AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_DELAY)) != NULL && !g_strcmp0(AGS_PORT_DESCRIPTOR(current->data)->port_symbol, AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_DELAY)); CU_ASSERT((current = ags_port_descriptor_find_symbol(list, AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_DRY)) != NULL && !g_strcmp0(AGS_PORT_DESCRIPTOR(current->data)->port_symbol, AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_DRY)); CU_ASSERT((current = ags_port_descriptor_find_symbol(list, AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_WET)) != NULL && !g_strcmp0(AGS_PORT_DESCRIPTOR(current->data)->port_symbol, AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_WET)); CU_ASSERT((current = ags_port_descriptor_find_symbol(list, AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_FEEDBACK)) != NULL && !g_strcmp0(AGS_PORT_DESCRIPTOR(current->data)->port_symbol, AGS_PORT_DESCRIPTOR_TEST_FIND_SYMBOL_FEEDBACK)); } void ags_base_plugin_test_find_filename() { AgsBasePlugin *base_plugin; GList *list, *current; gchar *str[3]; guint i; list = NULL; i = 0; /* base plugin #0 */ str[0] = g_strdup_printf("%s %d", AGS_BASE_PLUGIN_TEST_FIND_FILENAME_DEFAULT, i); i++; base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "filename", str[0], NULL); list = g_list_prepend(list, base_plugin); /* base plugin #1 */ str[1] = g_strdup_printf("%s %d", AGS_BASE_PLUGIN_TEST_FIND_FILENAME_DEFAULT, i); i++; base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "filename", str[1], NULL); list = g_list_prepend(list, base_plugin); /* base plugin #2 */ str[2] = g_strdup_printf("%s %d", AGS_BASE_PLUGIN_TEST_FIND_FILENAME_DEFAULT, i); i++; base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "filename", str[2], NULL); list = g_list_prepend(list, base_plugin); /* assert find filename */ CU_ASSERT((current = ags_base_plugin_find_filename(list, str[0])) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->filename, str[0])); CU_ASSERT((current = ags_base_plugin_find_filename(list, str[1])) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->filename, str[1])); CU_ASSERT((current = ags_base_plugin_find_filename(list, str[2])) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->filename, str[2])); } void ags_base_plugin_test_find_effect() { AgsBasePlugin *base_plugin; GList *list, *current; list = NULL; /* cmt */ base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "filename", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT, "effect", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_PINK_NOISE, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "filename", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT, "effect", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_ECHO_DELAY, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "filename", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT, "effect", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_GVERB, NULL); list = g_list_prepend(list, base_plugin); /* swh */ base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "filename", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_SWH, "effect", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_AMPLIFIER, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "filename", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_SWH, "effect", AGS_BASE_PLUGIN_TEST_FIND_EFFECT_ENVELOPE_TRACKER, NULL); list = g_list_prepend(list, base_plugin); /* assert find - cmt effect */ CU_ASSERT((current = ags_base_plugin_find_effect(list, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_PINK_NOISE)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->filename, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT) && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_PINK_NOISE)); CU_ASSERT((current = ags_base_plugin_find_effect(list, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_ECHO_DELAY)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->filename, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT) && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_ECHO_DELAY)); CU_ASSERT((current = ags_base_plugin_find_effect(list, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_GVERB)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->filename, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_CMT) && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_GVERB)); /* assert find - swh effect */ CU_ASSERT((current = ags_base_plugin_find_effect(list, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_SWH, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_AMPLIFIER)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->filename, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_SWH) && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_AMPLIFIER)); CU_ASSERT((current = ags_base_plugin_find_effect(list, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_SWH, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_ENVELOPE_TRACKER)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->filename, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_SWH) && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_FIND_EFFECT_ENVELOPE_TRACKER)); } void ags_base_plugin_test_find_ui_effect_index() { AgsBasePlugin *base_plugin; GList *list, *current; list = NULL; /* create some base plugin */ base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "ui-filename", AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_COMPRESSOR, "ui-effect-index", AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_COMPRESSOR_INDEX, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "ui-filename", AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_CHORUS, "ui-effect-index", AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_CHORUS_INDEX, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "ui-filename", AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_FLANGER, "ui-effect-index", AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_FLANGER_INDEX, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "ui-filename", AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_SPATIALIZER, "ui-effect-index", AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_SPATIALIZER_INDEX, NULL); list = g_list_prepend(list, base_plugin); /* assert find UI effect index */ CU_ASSERT((current = ags_base_plugin_find_ui_effect_index(list, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_COMPRESSOR, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_COMPRESSOR_INDEX)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->ui_filename, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_COMPRESSOR) && AGS_BASE_PLUGIN(current->data)->ui_effect_index == AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_COMPRESSOR_INDEX); CU_ASSERT((current = ags_base_plugin_find_ui_effect_index(list, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_CHORUS, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_CHORUS_INDEX)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->ui_filename, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_CHORUS) && AGS_BASE_PLUGIN(current->data)->ui_effect_index == AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_CHORUS_INDEX); CU_ASSERT((current = ags_base_plugin_find_ui_effect_index(list, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_FLANGER, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_FLANGER_INDEX)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->ui_filename, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_FLANGER) && AGS_BASE_PLUGIN(current->data)->ui_effect_index == AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_FLANGER_INDEX); CU_ASSERT((current = ags_base_plugin_find_ui_effect_index(list, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_SPATIALIZER, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_SPATIALIZER_INDEX)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(current->data)->ui_filename, AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_SPATIALIZER) && AGS_BASE_PLUGIN(current->data)->ui_effect_index == AGS_BASE_PLUGIN_TEST_FIND_UI_EFFECT_INDEX_SPATIALIZER_INDEX); } void ags_base_plugin_test_sort() { AgsBasePlugin *base_plugin; GList *list, *current; list = NULL; /* add some effects */ base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "effect", AGS_BASE_PLUGIN_TEST_SORT_PINK_NOISE, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "effect", AGS_BASE_PLUGIN_TEST_SORT_ECHO_DELAY, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "effect", AGS_BASE_PLUGIN_TEST_SORT_GVERB, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "effect", AGS_BASE_PLUGIN_TEST_SORT_AMPLIFIER, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "effect", AGS_BASE_PLUGIN_TEST_SORT_ENVELOPE_TRACKER, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "effect", AGS_BASE_PLUGIN_TEST_SORT_COMPRESSOR, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "effect", AGS_BASE_PLUGIN_TEST_SORT_CHORUS, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "effect", AGS_BASE_PLUGIN_TEST_SORT_FLANGER, NULL); list = g_list_prepend(list, base_plugin); base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, "effect", AGS_BASE_PLUGIN_TEST_SORT_SPATIALIZER, NULL); list = g_list_prepend(list, base_plugin); /* sort base plugins */ list = ags_base_plugin_sort(list); /* assert sorted alphabetically */ current = list; CU_ASSERT(!g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_SORT_AMPLIFIER)); current = current->next; CU_ASSERT(!g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_SORT_CHORUS)); current = current->next; CU_ASSERT(!g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_SORT_COMPRESSOR)); current = current->next; CU_ASSERT(!g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_SORT_ECHO_DELAY)); current = current->next; CU_ASSERT(!g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_SORT_ENVELOPE_TRACKER)); current = current->next; CU_ASSERT(!g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_SORT_FLANGER)); current = current->next; CU_ASSERT(!g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_SORT_GVERB)); current = current->next; CU_ASSERT(!g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_SORT_PINK_NOISE)); current = current->next; CU_ASSERT(!g_strcmp0(AGS_BASE_PLUGIN(current->data)->effect, AGS_BASE_PLUGIN_TEST_SORT_SPATIALIZER)); current = current->next; CU_ASSERT(current == NULL); } void ags_base_plugin_test_apply_port_group_by_prefix() { //TODO:JK: implement me } void ags_base_plugin_test_instantiate() { AgsBasePlugin *base_plugin; gpointer ptr; base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, NULL); ptr = AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->instantiate; AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->instantiate = ags_base_plugin_test_stub_instantiate; ags_base_plugin_instantiate(base_plugin, AGS_BASE_PLUGIN_TEST_INSTANTIATE_SAMPLERATE); CU_ASSERT(stub_instantiate == TRUE); AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->instantiate = ptr; } void ags_base_plugin_test_connect_port() { AgsBasePlugin *base_plugin; gpointer ptr; base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, NULL); ptr = AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->connect_port; AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->connect_port = ags_base_plugin_test_stub_connect_port; ags_base_plugin_connect_port(base_plugin, NULL, 0, NULL); CU_ASSERT(stub_connect_port == TRUE); AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->connect_port = ptr; } void ags_base_plugin_test_activate() { AgsBasePlugin *base_plugin; gpointer ptr; base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, NULL); ptr = AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->activate; AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->activate = ags_base_plugin_test_stub_activate; ags_base_plugin_activate(base_plugin, NULL); CU_ASSERT(stub_activate == TRUE); AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->activate = ptr; } void ags_base_plugin_test_deactivate() { AgsBasePlugin *base_plugin; gpointer ptr; base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, NULL); ptr = AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->deactivate; AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->deactivate = ags_base_plugin_test_stub_deactivate; ags_base_plugin_deactivate(base_plugin, NULL); CU_ASSERT(stub_deactivate == TRUE); AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->deactivate = ptr; } void ags_base_plugin_test_run() { AgsBasePlugin *base_plugin; gpointer ptr; base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, NULL); ptr = AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->run; AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->run = ags_base_plugin_test_stub_run; ags_base_plugin_run(base_plugin, NULL, NULL, AGS_BASE_PLUGIN_TEST_RUN_FRAME_COUNT); CU_ASSERT(stub_run == TRUE); AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->run = ptr; } void ags_base_plugin_test_load_plugin() { AgsBasePlugin *base_plugin; base_plugin = g_object_new(AGS_TYPE_BASE_PLUGIN, NULL); AGS_BASE_PLUGIN_GET_CLASS(base_plugin)->load_plugin = ags_base_plugin_test_stub_load_plugin; ags_base_plugin_load_plugin(base_plugin); CU_ASSERT(stub_load_plugin == TRUE); } gpointer ags_base_plugin_test_stub_instantiate(AgsBasePlugin *base_plugin, guint samplerate) { stub_instantiate = TRUE; return(NULL); } void ags_base_plugin_test_stub_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location) { stub_connect_port = TRUE; } void ags_base_plugin_test_stub_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { stub_activate = TRUE; } void ags_base_plugin_test_stub_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { stub_deactivate = TRUE; } void ags_base_plugin_test_stub_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count) { stub_run = TRUE; } void ags_base_plugin_test_stub_load_plugin(AgsBasePlugin *base_plugin) { stub_load_plugin = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsBasePluginTest\0", ags_base_plugin_test_init_suite, ags_base_plugin_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsPortDescriptor find symbol\0", ags_port_descriptor_test_find_symbol) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin find filename\0", ags_base_plugin_test_find_filename) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin find effect\0", ags_base_plugin_test_find_effect) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin find UI effect index\0", ags_base_plugin_test_find_ui_effect_index) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin sort\0", ags_base_plugin_test_sort) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin apply port group by prefix\0", ags_base_plugin_test_apply_port_group_by_prefix) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin instantiate\0", ags_base_plugin_test_instantiate) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin connect port\0", ags_base_plugin_test_connect_port) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin activate\0", ags_base_plugin_test_activate) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin deactivate\0", ags_base_plugin_test_deactivate) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin run\0", ags_base_plugin_test_run) == NULL) || (CU_add_test(pSuite, "test of AgsBasePlugin load plugin\0", ags_base_plugin_test_load_plugin) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_lv2ui_manager_test.c0000644000175000017500000002466713246707333020532 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_lv2ui_manager_test_init_suite(); int ags_lv2ui_manager_test_clean_suite(); void ags_lv2ui_manager_test_get_filenames(); void ags_lv2ui_manager_test_find_lv2ui_plugin(); void ags_lv2ui_manager_test_find_lv2ui_plugin_with_index(); void ags_lv2ui_manager_test_load_blacklist(); void ags_lv2ui_manager_test_load_file(); void ags_lv2ui_manager_test_load_default_directory(); #define AGS_LV2UI_MANAGER_TEST_GET_FILENAMES_DELAY_SWH "plugin.so" #define AGS_LV2UI_MANAGER_TEST_GET_FILENAMES_ZYNADD "zynadd.so" #define AGS_LV2UI_MANAGER_TEST_GET_FILENAMES_HERMES_FILTER "plugin-linux.so" #define AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_INVADA "plugin.so" #define AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_INVADA_EFFECT "mono compressor" #define AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_X42 "x42.so" #define AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_X42_EFFECT "balance" #define AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_INVADA "plugin.so" #define AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_INVADA_INDEX (1) #define AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_X42 "x42.so" #define AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_X42_INDEX (3) gchar **ags_lv2ui_default_path; /* Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2ui_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2ui_manager_test_clean_suite() { return(0); } void ags_lv2ui_manager_test_get_filenames() { AgsLv2uiManager *lv2ui_manager; AgsLv2uiPlugin *lv2ui_plugin; GList *list; gchar **filename; lv2ui_manager = ags_lv2ui_manager_get_instance(); /* assert get NULL */ filename = ags_lv2ui_manager_get_filenames(lv2ui_manager); CU_ASSERT(filename == NULL); /* create some lv2 plugins */ list = NULL; lv2ui_plugin = g_object_new(AGS_TYPE_LV2UI_PLUGIN, "ui-filename", AGS_LV2UI_MANAGER_TEST_GET_FILENAMES_DELAY_SWH, NULL); list = g_list_prepend(list, lv2ui_plugin); lv2ui_plugin = g_object_new(AGS_TYPE_LV2UI_PLUGIN, "ui-filename", AGS_LV2UI_MANAGER_TEST_GET_FILENAMES_ZYNADD, NULL); list = g_list_prepend(list, lv2ui_plugin); lv2ui_plugin = g_object_new(AGS_TYPE_LV2UI_PLUGIN, "ui-filename", AGS_LV2UI_MANAGER_TEST_GET_FILENAMES_HERMES_FILTER, NULL); list = g_list_prepend(list, lv2ui_plugin); /* add plugins to manager */ lv2ui_manager->lv2ui_plugin = list; /* assert get filenames */ filename = ags_lv2ui_manager_get_filenames(lv2ui_manager); CU_ASSERT(g_strv_contains(filename, AGS_LV2UI_MANAGER_TEST_GET_FILENAMES_DELAY_SWH)); CU_ASSERT(g_strv_contains(filename, AGS_LV2UI_MANAGER_TEST_GET_FILENAMES_ZYNADD)); CU_ASSERT(g_strv_contains(filename, AGS_LV2UI_MANAGER_TEST_GET_FILENAMES_HERMES_FILTER)); CU_ASSERT(filename[3] == NULL); g_object_unref(lv2ui_manager); } void ags_lv2ui_manager_test_find_lv2ui_plugin() { AgsLv2uiManager *lv2ui_manager; AgsLv2uiPlugin *lv2ui_plugin; GList *list; lv2ui_manager = ags_lv2ui_manager_get_instance(); CU_ASSERT(ags_lv2ui_manager_find_lv2ui_plugin(lv2ui_manager, NULL, NULL) == NULL); /* create some lv2ui plugins */ list = NULL; lv2ui_plugin = g_object_new(AGS_TYPE_LV2UI_PLUGIN, "ui-filename", AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_INVADA, "effect", AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_INVADA_EFFECT, NULL); list = g_list_prepend(list, lv2ui_plugin); lv2ui_plugin = g_object_new(AGS_TYPE_LV2UI_PLUGIN, "ui-filename", AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_X42, "effect", AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_X42_EFFECT, NULL); list = g_list_prepend(list, lv2ui_plugin); /* add plugins to manager */ lv2ui_manager->lv2ui_plugin = list; /* assert find lv2ui plugin */ CU_ASSERT((lv2ui_plugin = ags_lv2ui_manager_find_lv2ui_plugin(lv2ui_manager, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_INVADA, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_INVADA_EFFECT)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_INVADA) && !g_strcmp0(AGS_BASE_PLUGIN(lv2ui_plugin)->effect, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_INVADA_EFFECT)); CU_ASSERT((lv2ui_plugin = ags_lv2ui_manager_find_lv2ui_plugin(lv2ui_manager, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_X42, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_X42_EFFECT)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_X42) && !g_strcmp0(AGS_BASE_PLUGIN(lv2ui_plugin)->effect, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_X42_EFFECT)); g_object_unref(lv2ui_manager); } void ags_lv2ui_manager_test_find_lv2ui_plugin_with_index() { AgsLv2uiManager *lv2ui_manager; AgsLv2uiPlugin *lv2ui_plugin; GList *list; lv2ui_manager = ags_lv2ui_manager_get_instance(); CU_ASSERT(ags_lv2ui_manager_find_lv2ui_plugin(lv2ui_manager, NULL, NULL) == NULL); /* create some lv2ui plugins */ list = NULL; lv2ui_plugin = g_object_new(AGS_TYPE_LV2UI_PLUGIN, "ui-filename", AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_INVADA, "ui-effect-index", AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_INVADA_INDEX, NULL); list = g_list_prepend(list, lv2ui_plugin); lv2ui_plugin = g_object_new(AGS_TYPE_LV2UI_PLUGIN, "ui-filename", AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_X42, "ui-effect-index", AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_X42_INDEX, NULL); list = g_list_prepend(list, lv2ui_plugin); /* add plugins to manager */ lv2ui_manager->lv2ui_plugin = list; /* assert find lv2ui plugin */ CU_ASSERT((lv2ui_plugin = ags_lv2ui_manager_find_lv2ui_plugin_with_index(lv2ui_manager, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_INVADA, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_INVADA_INDEX)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_INVADA) && AGS_BASE_PLUGIN(lv2ui_plugin)->ui_effect_index == AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_INVADA_INDEX); CU_ASSERT((lv2ui_plugin = ags_lv2ui_manager_find_lv2ui_plugin_with_index(lv2ui_manager, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_X42, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_X42_INDEX)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_X42) && AGS_BASE_PLUGIN(lv2ui_plugin)->ui_effect_index == AGS_LV2UI_MANAGER_TEST_FIND_LV2UI_PLUGIN_WITH_INDEX_X42_INDEX); g_object_unref(lv2ui_manager); } void ags_lv2ui_manager_test_load_blacklist() { AgsLv2uiManager *lv2ui_manager; lv2ui_manager = ags_lv2ui_manager_get_instance(); /* test NULL */ ags_lv2ui_manager_load_blacklist(lv2ui_manager, NULL); CU_ASSERT(lv2ui_manager->lv2ui_plugin_blacklist == NULL); //TODO:JK: implement better test g_object_unref(lv2ui_manager); } void ags_lv2ui_manager_test_load_file() { AgsLv2uiManager *lv2ui_manager; lv2ui_manager = ags_lv2ui_manager_get_instance(); /* test NULL */ ags_lv2ui_manager_load_file(lv2ui_manager, NULL, NULL, NULL, NULL); CU_ASSERT(lv2ui_manager->lv2ui_plugin == NULL); //TODO:JK: implement better test g_object_unref(lv2ui_manager); } void ags_lv2ui_manager_test_load_default_directory() { AgsLv2uiManager *lv2ui_manager; gchar *first_path; lv2ui_manager = ags_lv2ui_manager_get_instance(); /* test NULL */ ags_lv2ui_default_path = ags_lv2ui_manager_get_default_path(); first_path = ags_lv2ui_default_path[0]; ags_lv2ui_default_path[0] = NULL; ags_lv2ui_manager_load_default_directory(lv2ui_manager); CU_ASSERT(lv2ui_manager->lv2ui_plugin == NULL); //TODO:JK: implement better test ags_lv2ui_default_path[0] = first_path; g_object_unref(lv2ui_manager); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLv2uiManagerTest", ags_lv2ui_manager_test_init_suite, ags_lv2ui_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLv2uiManager get filenames", ags_lv2ui_manager_test_get_filenames) == NULL) || (CU_add_test(pSuite, "test of AgsLv2uiManager find lv2ui plugin", ags_lv2ui_manager_test_find_lv2ui_plugin) == NULL) || (CU_add_test(pSuite, "test of AgsLv2uiManager find lv2ui plugin with index", ags_lv2ui_manager_test_find_lv2ui_plugin_with_index) == NULL) || (CU_add_test(pSuite, "test of AgsLv2uiManager load blacklist", ags_lv2ui_manager_test_load_blacklist) == NULL) || (CU_add_test(pSuite, "test of AgsLv2uiManager load file", ags_lv2ui_manager_test_load_file) == NULL) || (CU_add_test(pSuite, "test of AgsLv2uiManager load default directory", ags_lv2ui_manager_test_load_default_directory) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_dssi_plugin_test.c0000644000175000017500000000617613246707333020312 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_dssi_plugin_test_init_suite(); int ags_dssi_plugin_test_clean_suite(); void ags_dssi_plugin_test_change_program(); void ags_dssi_plugin_test_stub_change_program(AgsDssiPlugin *dssi_plugin, gpointer ladspa_handle, guint bank_index, guint program_index); gboolean stub_change_program = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_dssi_plugin_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_dssi_plugin_test_clean_suite() { return(0); } void ags_dssi_plugin_test_change_program() { AgsDssiPlugin *dssi_plugin; gpointer ptr; dssi_plugin = g_object_new(AGS_TYPE_DSSI_PLUGIN, NULL); ptr = AGS_DSSI_PLUGIN_GET_CLASS(dssi_plugin)->change_program; AGS_DSSI_PLUGIN_GET_CLASS(dssi_plugin)->change_program = ags_dssi_plugin_test_stub_change_program; /* assert change program */ ags_dssi_plugin_change_program(dssi_plugin, NULL, 0, 0); CU_ASSERT(stub_change_program == TRUE); AGS_DSSI_PLUGIN_GET_CLASS(dssi_plugin)->change_program = ptr; } void ags_dssi_plugin_test_stub_change_program(AgsDssiPlugin *dssi_plugin, gpointer ladspa_handle, guint bank_index, guint program_index) { stub_change_program = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsDssiPluginTest", ags_dssi_plugin_test_init_suite, ags_dssi_plugin_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsDssiPlugin change program", ags_dssi_plugin_test_change_program) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_ladspa_manager_test.c0000644000175000017500000002000113246707333020707 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_ladspa_manager_test_init_suite(); int ags_ladspa_manager_test_clean_suite(); void ags_ladspa_manager_test_get_filenames(); void ags_ladspa_manager_test_find_ladspa_plugin(); void ags_ladspa_manager_test_load_blacklist(); void ags_ladspa_manager_test_load_file(); void ags_ladspa_manager_test_load_default_directory(); #define AGS_LADSPA_MANAGER_TEST_GET_FILENAMES_CMT "cmt.so" #define AGS_LADSPA_MANAGER_TEST_GET_FILENAMES_SWH "swh.so" #define AGS_LADSPA_MANAGER_TEST_GET_FILENAMES_VOCODER "vocoder.so" #define AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_CMT "cmt.so" #define AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_CMT_EFFECT "freeverb" #define AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_SWH "swh.so" #define AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_SWH_EFFECT "flanger" gchar **ags_ladspa_default_path; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_ladspa_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_ladspa_manager_test_clean_suite() { return(0); } void ags_ladspa_manager_test_get_filenames() { AgsLadspaManager *ladspa_manager; AgsLadspaPlugin *ladspa_plugin; GList *list; gchar **filename; ladspa_manager = ags_ladspa_manager_get_instance(); /* assert get NULL */ filename = ags_ladspa_manager_get_filenames(ladspa_manager); CU_ASSERT(filename == NULL); /* create some ladspa plugins */ list = NULL; ladspa_plugin = g_object_new(AGS_TYPE_LADSPA_PLUGIN, "filename", AGS_LADSPA_MANAGER_TEST_GET_FILENAMES_CMT, NULL); list = g_list_prepend(list, ladspa_plugin); ladspa_plugin = g_object_new(AGS_TYPE_LADSPA_PLUGIN, "filename", AGS_LADSPA_MANAGER_TEST_GET_FILENAMES_SWH, NULL); list = g_list_prepend(list, ladspa_plugin); ladspa_plugin = g_object_new(AGS_TYPE_LADSPA_PLUGIN, "filename", AGS_LADSPA_MANAGER_TEST_GET_FILENAMES_VOCODER, NULL); list = g_list_prepend(list, ladspa_plugin); /* add plugins to manager */ ladspa_manager->ladspa_plugin = list; /* assert get filenames */ filename = ags_ladspa_manager_get_filenames(ladspa_manager); CU_ASSERT(g_strv_contains(filename, AGS_LADSPA_MANAGER_TEST_GET_FILENAMES_CMT)); CU_ASSERT(g_strv_contains(filename, AGS_LADSPA_MANAGER_TEST_GET_FILENAMES_SWH)); CU_ASSERT(g_strv_contains(filename, AGS_LADSPA_MANAGER_TEST_GET_FILENAMES_VOCODER)); CU_ASSERT(filename[3] == NULL); g_object_unref(ladspa_manager); } void ags_ladspa_manager_test_find_ladspa_plugin() { AgsLadspaManager *ladspa_manager; AgsLadspaPlugin *ladspa_plugin; GList *list; ladspa_manager = ags_ladspa_manager_get_instance(); CU_ASSERT(ags_ladspa_manager_find_ladspa_plugin(ladspa_manager, NULL, NULL) == NULL); /* create some ladspa plugins */ list = NULL; ladspa_plugin = g_object_new(AGS_TYPE_LADSPA_PLUGIN, "filename", AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_CMT, "effect", AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_CMT_EFFECT, NULL); list = g_list_prepend(list, ladspa_plugin); ladspa_plugin = g_object_new(AGS_TYPE_LADSPA_PLUGIN, "filename", AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_SWH, "effect", AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_SWH_EFFECT, NULL); list = g_list_prepend(list, ladspa_plugin); /* add plugins to manager */ ladspa_manager->ladspa_plugin = list; /* assert find ladspa plugin */ CU_ASSERT((ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ladspa_manager, AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_CMT, AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_CMT_EFFECT)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(ladspa_plugin)->filename, AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_CMT) && !g_strcmp0(AGS_BASE_PLUGIN(ladspa_plugin)->effect, AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_CMT_EFFECT)); CU_ASSERT((ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ladspa_manager, AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_SWH, AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_SWH_EFFECT)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(ladspa_plugin)->filename, AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_SWH) && !g_strcmp0(AGS_BASE_PLUGIN(ladspa_plugin)->effect, AGS_LADSPA_MANAGER_TEST_FIND_LADSPA_PLUGIN_SWH_EFFECT)); g_object_unref(ladspa_manager); } void ags_ladspa_manager_test_load_blacklist() { AgsLadspaManager *ladspa_manager; ladspa_manager = ags_ladspa_manager_get_instance(); /* test NULL */ ags_ladspa_manager_load_blacklist(ladspa_manager, NULL); CU_ASSERT(ladspa_manager->ladspa_plugin_blacklist == NULL); //TODO:JK: implement better test g_object_unref(ladspa_manager); } void ags_ladspa_manager_test_load_file() { AgsLadspaManager *ladspa_manager; ladspa_manager = ags_ladspa_manager_get_instance(); /* test NULL */ ags_ladspa_manager_load_file(ladspa_manager, NULL, NULL); CU_ASSERT(ladspa_manager->ladspa_plugin == NULL); //TODO:JK: implement better test g_object_unref(ladspa_manager); } void ags_ladspa_manager_test_load_default_directory() { AgsLadspaManager *ladspa_manager; gchar *first_path; ladspa_manager = ags_ladspa_manager_get_instance(); /* test NULL */ ags_ladspa_default_path = ags_ladspa_manager_get_default_path(); first_path = ags_ladspa_default_path[0]; ags_ladspa_default_path[0] = NULL; ags_ladspa_manager_load_default_directory(ladspa_manager); CU_ASSERT(ladspa_manager->ladspa_plugin == NULL); //TODO:JK: implement better test ags_ladspa_default_path[0] = first_path; g_object_unref(ladspa_manager); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLadspaManagerTest\0", ags_ladspa_manager_test_init_suite, ags_ladspa_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLadspaManager get filenames\0", ags_ladspa_manager_test_get_filenames) == NULL) || (CU_add_test(pSuite, "test of AgsLadspaManager find ladspa plugin\0", ags_ladspa_manager_test_find_ladspa_plugin) == NULL) || (CU_add_test(pSuite, "test of AgsLadspaManager load blacklist\0", ags_ladspa_manager_test_load_blacklist) == NULL) || (CU_add_test(pSuite, "test of AgsLadspaManager load file\0", ags_ladspa_manager_test_load_file) == NULL) || (CU_add_test(pSuite, "test of AgsLadspaManager load default directory\0", ags_ladspa_manager_test_load_default_directory) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_dssi_manager_test.c0000644000175000017500000001740213246707333020420 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_dssi_manager_test_init_suite(); int ags_dssi_manager_test_clean_suite(); void ags_dssi_manager_test_get_filenames(); void ags_dssi_manager_test_find_dssi_plugin(); void ags_dssi_manager_test_load_blacklist(); void ags_dssi_manager_test_load_file(); void ags_dssi_manager_test_load_default_directory(); #define AGS_DSSI_MANAGER_TEST_GET_FILENAMES_XSYNTH "xsynth.so" #define AGS_DSSI_MANAGER_TEST_GET_FILENAMES_HEXTER "hexter.so" #define AGS_DSSI_MANAGER_TEST_GET_FILENAMES_YOSHIMI "yoshimi.so" #define AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_WSYNTH "wsynth.so" #define AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_WSYNTH_EFFECT "wsynth" #define AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_YOSHIMI "yoshimi.so" #define AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_YOSHIMI_EFFECT "yoshimi" gchar **ags_dssi_default_path; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_dssi_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_dssi_manager_test_clean_suite() { return(0); } void ags_dssi_manager_test_get_filenames() { AgsDssiManager *dssi_manager; AgsDssiPlugin *dssi_plugin; GList *list; gchar **filename; dssi_manager = ags_dssi_manager_get_instance(); /* assert get NULL */ filename = ags_dssi_manager_get_filenames(dssi_manager); CU_ASSERT(filename == NULL); /* create some dssi plugins */ list = NULL; dssi_plugin = g_object_new(AGS_TYPE_DSSI_PLUGIN, "filename", AGS_DSSI_MANAGER_TEST_GET_FILENAMES_XSYNTH, NULL); list = g_list_prepend(list, dssi_plugin); dssi_plugin = g_object_new(AGS_TYPE_DSSI_PLUGIN, "filename", AGS_DSSI_MANAGER_TEST_GET_FILENAMES_HEXTER, NULL); list = g_list_prepend(list, dssi_plugin); dssi_plugin = g_object_new(AGS_TYPE_DSSI_PLUGIN, "filename", AGS_DSSI_MANAGER_TEST_GET_FILENAMES_YOSHIMI, NULL); list = g_list_prepend(list, dssi_plugin); /* add plugins to manager */ dssi_manager->dssi_plugin = list; /* assert get filenames */ filename = ags_dssi_manager_get_filenames(dssi_manager); CU_ASSERT(g_strv_contains(filename, AGS_DSSI_MANAGER_TEST_GET_FILENAMES_XSYNTH)); CU_ASSERT(g_strv_contains(filename, AGS_DSSI_MANAGER_TEST_GET_FILENAMES_HEXTER)); CU_ASSERT(g_strv_contains(filename, AGS_DSSI_MANAGER_TEST_GET_FILENAMES_YOSHIMI)); CU_ASSERT(filename[3] == NULL); g_object_unref(dssi_manager); } void ags_dssi_manager_test_find_dssi_plugin() { AgsDssiManager *dssi_manager; AgsDssiPlugin *dssi_plugin; GList *list; dssi_manager = ags_dssi_manager_get_instance(); CU_ASSERT(ags_dssi_manager_find_dssi_plugin(dssi_manager, NULL, NULL) == NULL); /* create some dssi plugins */ list = NULL; dssi_plugin = g_object_new(AGS_TYPE_DSSI_PLUGIN, "filename", AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_WSYNTH, "effect", AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_WSYNTH_EFFECT, NULL); list = g_list_prepend(list, dssi_plugin); dssi_plugin = g_object_new(AGS_TYPE_DSSI_PLUGIN, "filename", AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_YOSHIMI, "effect", AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_YOSHIMI_EFFECT, NULL); list = g_list_prepend(list, dssi_plugin); /* add plugins to manager */ dssi_manager->dssi_plugin = list; /* assert find dssi plugin */ CU_ASSERT((dssi_plugin = ags_dssi_manager_find_dssi_plugin(dssi_manager, AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_WSYNTH, AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_WSYNTH_EFFECT)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(dssi_plugin)->filename, AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_WSYNTH) && !g_strcmp0(AGS_BASE_PLUGIN(dssi_plugin)->effect, AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_WSYNTH_EFFECT)); CU_ASSERT((dssi_plugin = ags_dssi_manager_find_dssi_plugin(dssi_manager, AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_YOSHIMI, AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_YOSHIMI_EFFECT)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(dssi_plugin)->filename, AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_YOSHIMI) && !g_strcmp0(AGS_BASE_PLUGIN(dssi_plugin)->effect, AGS_DSSI_MANAGER_TEST_FIND_DSSI_PLUGIN_YOSHIMI_EFFECT)); g_object_unref(dssi_manager); } void ags_dssi_manager_test_load_blacklist() { AgsDssiManager *dssi_manager; dssi_manager = ags_dssi_manager_get_instance(); /* test NULL */ ags_dssi_manager_load_blacklist(dssi_manager, NULL); CU_ASSERT(dssi_manager->dssi_plugin_blacklist == NULL); //TODO:JK: implement better test g_object_unref(dssi_manager); } void ags_dssi_manager_test_load_file() { AgsDssiManager *dssi_manager; dssi_manager = ags_dssi_manager_get_instance(); /* test NULL */ ags_dssi_manager_load_file(dssi_manager, NULL, NULL); CU_ASSERT(dssi_manager->dssi_plugin == NULL); //TODO:JK: implement better test g_object_unref(dssi_manager); } void ags_dssi_manager_test_load_default_directory() { AgsDssiManager *dssi_manager; gchar *first_path; dssi_manager = ags_dssi_manager_get_instance(); /* test NULL */ ags_dssi_default_path = ags_dssi_manager_get_default_path(); first_path = ags_dssi_default_path[0]; ags_dssi_default_path[0] = NULL; ags_dssi_manager_load_default_directory(dssi_manager); CU_ASSERT(dssi_manager->dssi_plugin == NULL); //TODO:JK: implement better test ags_dssi_default_path[0] = first_path; g_object_unref(dssi_manager); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsDssiManagerTest\0", ags_dssi_manager_test_init_suite, ags_dssi_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsDssiManager get filenames\0", ags_dssi_manager_test_get_filenames) == NULL) || (CU_add_test(pSuite, "test of AgsDssiManager find dssi plugin\0", ags_dssi_manager_test_find_dssi_plugin) == NULL) || (CU_add_test(pSuite, "test of AgsDssiManager load blacklist\0", ags_dssi_manager_test_load_blacklist) == NULL) || (CU_add_test(pSuite, "test of AgsDssiManager load file\0", ags_dssi_manager_test_load_file) == NULL) || (CU_add_test(pSuite, "test of AgsDssiManager load default directory\0", ags_dssi_manager_test_load_default_directory) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_lv2_option_manager_test.c0000644000175000017500000003032413246707333021547 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include #include #include int ags_lv2_option_manager_test_init_suite(); int ags_lv2_option_manager_test_clean_suite(); void ags_lv2_option_manager_test_ressource_insert(); void ags_lv2_option_manager_test_ressource_remove(); void ags_lv2_option_manager_test_ressource_lookup(); void ags_lv2_option_manager_test_get_option(); void ags_lv2_option_manager_test_set_option(); void ags_lv2_option_manager_test_lv2_options_get(); void ags_lv2_option_manager_test_lv2_options_set(); void ags_lv2_option_manager_test_stub_get_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval); void ags_lv2_option_manager_test_stub_set_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval); #define AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_PLUGIN_FILENAME "/usr/lib/lv2/delay-swh.lv2/plugin-linux.so" #define AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_PLUGIN_EFFECT "Simple delay line, noninterpolating" #define AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_SAMPLERATE (44100) #define AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_SUBJECT (3) #define AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_SIZE (4) #define AGS_LV2_OPTION_MANAGER_TEST_LV2_OPTIONS_GET_SUBJECT (3) #define AGS_LV2_OPTION_MANAGER_TEST_LV2_OPTIONS_SET_SUBJECT (3) AgsLv2Manager *lv2_manager; AgsLv2UridManager *lv2_urid_manager; guint stub_get_option = 0; guint stub_set_option = 0; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_option_manager_test_init_suite() { lv2_manager = ags_lv2_manager_get_instance(); ags_lv2_manager_load_default_directory(lv2_manager); lv2_urid_manager = ags_lv2_urid_manager_get_instance(); return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_option_manager_test_clean_suite() { return(0); } void ags_lv2_option_manager_test_ressource_insert() { AgsLv2OptionManager *lv2_option_manager; AgsLv2OptionRessource *lv2_option_ressource; GValue value = {0,}; g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, 0); lv2_option_manager = ags_lv2_option_manager_get_instance(); lv2_option_ressource = ags_lv2_option_ressource_alloc(); ags_lv2_option_manager_ressource_insert(lv2_option_manager, lv2_option_ressource, &value); CU_ASSERT(g_hash_table_lookup(lv2_option_manager->ressource, lv2_option_ressource) == &value); g_object_unref(lv2_option_manager); } void ags_lv2_option_manager_test_ressource_remove() { AgsLv2OptionManager *lv2_option_manager; AgsLv2OptionRessource *lv2_option_ressource; GValue value = {0,}; g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, 0); lv2_option_manager = ags_lv2_option_manager_get_instance(); lv2_option_ressource = ags_lv2_option_ressource_alloc(); ags_lv2_option_manager_ressource_insert(lv2_option_manager, lv2_option_ressource, &value); ags_lv2_option_manager_ressource_remove(lv2_option_manager, lv2_option_ressource); CU_ASSERT(g_hash_table_lookup(lv2_option_manager->ressource, lv2_option_ressource) == NULL); g_object_unref(lv2_option_manager); } void ags_lv2_option_manager_test_ressource_lookup() { AgsLv2OptionManager *lv2_option_manager; AgsLv2OptionRessource *lv2_option_ressource; GValue value = {0,}; g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, 0); lv2_option_manager = ags_lv2_option_manager_get_instance(); lv2_option_ressource = ags_lv2_option_ressource_alloc(); ags_lv2_option_manager_ressource_insert(lv2_option_manager, lv2_option_ressource, &value); CU_ASSERT(ags_lv2_option_manager_ressource_lookup(lv2_option_manager, lv2_option_ressource) == &value); g_object_unref(lv2_option_manager); } void ags_lv2_option_manager_test_get_option() { AgsLv2OptionManager *lv2_option_manager; AgsLv2OptionRessource *lv2_option_ressource; AgsLv2Plugin *lv2_plugin; LV2_Handle instance; LV2_Options_Option *option, *current; uint32_t retval; GValue value = {0,}; g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, 0); lv2_option_manager = ags_lv2_option_manager_get_instance(); /* creat plugin instance */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(lv2_manager, AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_PLUGIN_FILENAME, AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_PLUGIN_EFFECT); instance = ags_base_plugin_instantiate(AGS_BASE_PLUGIN(lv2_plugin), AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_SAMPLERATE); lv2_option_ressource = ags_lv2_option_ressource_alloc(); lv2_option_ressource->instance = instance; option = lv2_option_ressource->option; option->context = LV2_OPTIONS_RESOURCE; option->subject = AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_SUBJECT; option->key = ags_lv2_urid_manager_map(NULL, LV2_MIDI_URI); option->type = ags_lv2_urid_manager_map(NULL, LV2_ATOM_URI); option->size = AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_SIZE; option->value = &value; ags_lv2_option_manager_ressource_insert(lv2_option_manager, lv2_option_ressource, &value); /* assert */ current = (LV2_Options_Option *) malloc(sizeof(LV2_Options_Option)); current->context = LV2_OPTIONS_RESOURCE; current->subject = option->subject; current->key = option->key; ags_lv2_option_manager_get_option(lv2_option_manager, (gpointer) instance, (gpointer) current, (gpointer) &retval); CU_ASSERT(retval == 0 && current->type == option->type && current->size == option->size && current->value == option->value); g_object_unref(lv2_option_manager); } void ags_lv2_option_manager_test_set_option() { AgsLv2OptionManager *lv2_option_manager; AgsLv2OptionRessource *lv2_option_ressource; AgsLv2Plugin *lv2_plugin; LV2_Handle instance; LV2_Options_Option *option; uint32_t retval; GValue value = {0,}; g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, 0); lv2_option_manager = ags_lv2_option_manager_get_instance(); /* creat plugin instance */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(lv2_manager, AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_PLUGIN_FILENAME, AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_PLUGIN_EFFECT); instance = ags_base_plugin_instantiate(AGS_BASE_PLUGIN(lv2_plugin), AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_SAMPLERATE); option = (LV2_Options_Option *) malloc(sizeof(LV2_Options_Option)); option->context = LV2_OPTIONS_RESOURCE; option->subject = AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_SUBJECT; option->key = ags_lv2_urid_manager_map(NULL, LV2_MIDI_URI); option->type = ags_lv2_urid_manager_map(NULL, LV2_ATOM_URI); option->size = AGS_LV2_OPTION_MANAGER_TEST_GET_OPTION_SIZE; option->value = &value; /* assert */ ags_lv2_option_manager_set_option(lv2_option_manager, (gpointer) instance, (gpointer) option, (gpointer) &retval); lv2_option_ressource = ags_lv2_option_ressource_alloc(); lv2_option_ressource->instance = instance; lv2_option_ressource->option = option; CU_ASSERT(retval == 0 && ags_lv2_option_manager_ressource_lookup(lv2_option_manager, lv2_option_ressource) == &value); g_object_unref(lv2_option_manager); } void ags_lv2_option_manager_test_lv2_options_get() { AgsLv2OptionManager *lv2_option_manager; LV2_Options_Option options[4]; gpointer ptr; lv2_option_manager = ags_lv2_option_manager_get_instance(); ptr = AGS_LV2_OPTION_MANAGER_GET_CLASS(lv2_option_manager)->get_option; AGS_LV2_OPTION_MANAGER_GET_CLASS(lv2_option_manager)->get_option = ags_lv2_option_manager_test_stub_get_option; options[0].subject = AGS_LV2_OPTION_MANAGER_TEST_LV2_OPTIONS_GET_SUBJECT; options[1].subject = AGS_LV2_OPTION_MANAGER_TEST_LV2_OPTIONS_GET_SUBJECT; options[2].subject = AGS_LV2_OPTION_MANAGER_TEST_LV2_OPTIONS_GET_SUBJECT; options[3].subject = 0; options[3].key = 0; options[3].type = 0; options[3].size = 0; options[3].value = NULL; ags_lv2_option_manager_lv2_options_get(NULL, &options); CU_ASSERT(stub_get_option == 3); AGS_LV2_OPTION_MANAGER_GET_CLASS(lv2_option_manager)->get_option = ptr; g_object_unref(lv2_option_manager); } void ags_lv2_option_manager_test_stub_get_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval) { stub_get_option++; } void ags_lv2_option_manager_test_lv2_options_set() { AgsLv2OptionManager *lv2_option_manager; LV2_Options_Option options[4]; gpointer ptr; lv2_option_manager = ags_lv2_option_manager_get_instance(); ptr = AGS_LV2_OPTION_MANAGER_GET_CLASS(lv2_option_manager)->set_option; AGS_LV2_OPTION_MANAGER_GET_CLASS(lv2_option_manager)->set_option = ags_lv2_option_manager_test_stub_set_option; options[0].subject = AGS_LV2_OPTION_MANAGER_TEST_LV2_OPTIONS_GET_SUBJECT; options[1].subject = AGS_LV2_OPTION_MANAGER_TEST_LV2_OPTIONS_GET_SUBJECT; options[2].subject = AGS_LV2_OPTION_MANAGER_TEST_LV2_OPTIONS_GET_SUBJECT; options[3].subject = 0; options[3].key = 0; options[3].type = 0; options[3].size = 0; options[3].value = NULL; ags_lv2_option_manager_lv2_options_set(NULL, &options); CU_ASSERT(stub_set_option == 3); AGS_LV2_OPTION_MANAGER_GET_CLASS(lv2_option_manager)->set_option = ptr; g_object_unref(lv2_option_manager); } void ags_lv2_option_manager_test_stub_set_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval) { stub_set_option++; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLv2OptionManagerTest\0", ags_lv2_option_manager_test_init_suite, ags_lv2_option_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLv2OptionManager ressource insert\0", ags_lv2_option_manager_test_ressource_insert) == NULL) || (CU_add_test(pSuite, "test of AgsLv2OptionManager ressource remove\0", ags_lv2_option_manager_test_ressource_remove) == NULL) || (CU_add_test(pSuite, "test of AgsLv2OptionManager ressource lookup\0", ags_lv2_option_manager_test_ressource_lookup) == NULL) || (CU_add_test(pSuite, "test of AgsLv2OptionManager get option\0", ags_lv2_option_manager_test_get_option) == NULL) || (CU_add_test(pSuite, "test of AgsLv2OptionManager set option\0", ags_lv2_option_manager_test_set_option) == NULL) || (CU_add_test(pSuite, "test of AgsLv2OptionManager lv2 options get\0", ags_lv2_option_manager_test_lv2_options_get) == NULL) || (CU_add_test(pSuite, "test of AgsLv2OptionManager lv2 options set\0", ags_lv2_option_manager_test_lv2_options_set) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_lv2_manager_test.c0000644000175000017500000001767413246707333020174 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_lv2_manager_test_init_suite(); int ags_lv2_manager_test_clean_suite(); void ags_lv2_manager_test_get_filenames(); void ags_lv2_manager_test_find_lv2_plugin(); void ags_lv2_manager_test_load_blacklist(); void ags_lv2_manager_test_load_preset(); void ags_lv2_manager_test_load_file(); void ags_lv2_manager_test_load_default_directory(); #define AGS_LV2_MANAGER_TEST_GET_FILENAMES_DELAY_SWH "plugin.so" #define AGS_LV2_MANAGER_TEST_GET_FILENAMES_ZYNADD "zynadd.so" #define AGS_LV2_MANAGER_TEST_GET_FILENAMES_HERMES_FILTER "plugin-linux.so" #define AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_INVADA "plugin.so" #define AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_INVADA_EFFECT "mono compressor" #define AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_X42 "x42.so" #define AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_X42_EFFECT "balance" gchar **ags_lv2_default_path; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_manager_test_clean_suite() { return(0); } void ags_lv2_manager_test_get_filenames() { AgsLv2Manager *lv2_manager; AgsLv2Plugin *lv2_plugin; GList *list; gchar **filename; lv2_manager = ags_lv2_manager_get_instance(); /* assert get NULL */ filename = ags_lv2_manager_get_filenames(lv2_manager); CU_ASSERT(filename == NULL); /* create some lv2 plugins */ list = NULL; lv2_plugin = g_object_new(AGS_TYPE_LV2_PLUGIN, "filename", AGS_LV2_MANAGER_TEST_GET_FILENAMES_DELAY_SWH, NULL); list = g_list_prepend(list, lv2_plugin); lv2_plugin = g_object_new(AGS_TYPE_LV2_PLUGIN, "filename", AGS_LV2_MANAGER_TEST_GET_FILENAMES_ZYNADD, NULL); list = g_list_prepend(list, lv2_plugin); lv2_plugin = g_object_new(AGS_TYPE_LV2_PLUGIN, "filename", AGS_LV2_MANAGER_TEST_GET_FILENAMES_HERMES_FILTER, NULL); list = g_list_prepend(list, lv2_plugin); /* add plugins to manager */ lv2_manager->lv2_plugin = list; /* assert get filenames */ filename = ags_lv2_manager_get_filenames(lv2_manager); CU_ASSERT(g_strv_contains(filename, AGS_LV2_MANAGER_TEST_GET_FILENAMES_DELAY_SWH)); CU_ASSERT(g_strv_contains(filename, AGS_LV2_MANAGER_TEST_GET_FILENAMES_ZYNADD)); CU_ASSERT(g_strv_contains(filename, AGS_LV2_MANAGER_TEST_GET_FILENAMES_HERMES_FILTER)); CU_ASSERT(filename[3] == NULL); g_object_unref(lv2_manager); } void ags_lv2_manager_test_find_lv2_plugin() { AgsLv2Manager *lv2_manager; AgsLv2Plugin *lv2_plugin; GList *list; lv2_manager = ags_lv2_manager_get_instance(); CU_ASSERT(ags_lv2_manager_find_lv2_plugin(lv2_manager, NULL, NULL) == NULL); /* create some lv2 plugins */ list = NULL; lv2_plugin = g_object_new(AGS_TYPE_LV2_PLUGIN, "filename", AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_INVADA, "effect", AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_INVADA_EFFECT, NULL); list = g_list_prepend(list, lv2_plugin); lv2_plugin = g_object_new(AGS_TYPE_LV2_PLUGIN, "filename", AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_X42, "effect", AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_X42_EFFECT, NULL); list = g_list_prepend(list, lv2_plugin); /* add plugins to manager */ lv2_manager->lv2_plugin = list; /* assert find lv2 plugin */ CU_ASSERT((lv2_plugin = ags_lv2_manager_find_lv2_plugin(lv2_manager, AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_INVADA, AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_INVADA_EFFECT)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(lv2_plugin)->filename, AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_INVADA) && !g_strcmp0(AGS_BASE_PLUGIN(lv2_plugin)->effect, AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_INVADA_EFFECT)); CU_ASSERT((lv2_plugin = ags_lv2_manager_find_lv2_plugin(lv2_manager, AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_X42, AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_X42_EFFECT)) != NULL && !g_strcmp0(AGS_BASE_PLUGIN(lv2_plugin)->filename, AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_X42) && !g_strcmp0(AGS_BASE_PLUGIN(lv2_plugin)->effect, AGS_LV2_MANAGER_TEST_FIND_LV2_PLUGIN_X42_EFFECT)); g_object_unref(lv2_manager); } void ags_lv2_manager_test_load_blacklist() { AgsLv2Manager *lv2_manager; lv2_manager = ags_lv2_manager_get_instance(); /* test NULL */ ags_lv2_manager_load_blacklist(lv2_manager, NULL); CU_ASSERT(lv2_manager->lv2_plugin_blacklist == NULL); //TODO:JK: implement better test g_object_unref(lv2_manager); } void ags_lv2_manager_test_load_preset() { AgsLv2Manager *lv2_manager; lv2_manager = ags_lv2_manager_get_instance(); //TODO:JK: implement better test g_object_unref(lv2_manager); } void ags_lv2_manager_test_load_file() { AgsLv2Manager *lv2_manager; lv2_manager = ags_lv2_manager_get_instance(); /* test NULL */ ags_lv2_manager_load_file(lv2_manager, NULL, NULL, NULL, NULL); CU_ASSERT(lv2_manager->lv2_plugin == NULL); //TODO:JK: implement better test g_object_unref(lv2_manager); } void ags_lv2_manager_test_load_default_directory() { AgsLv2Manager *lv2_manager; gchar *first_path; lv2_manager = ags_lv2_manager_get_instance(); /* test NULL */ ags_lv2_default_path = ags_lv2_manager_get_default_path(); first_path = ags_lv2_default_path[0]; ags_lv2_default_path[0] = NULL; ags_lv2_manager_load_default_directory(lv2_manager); CU_ASSERT(lv2_manager->lv2_plugin == NULL); //TODO:JK: implement better test ags_lv2_default_path[0] = first_path; g_object_unref(lv2_manager); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLv2ManagerTest\0", ags_lv2_manager_test_init_suite, ags_lv2_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLv2Manager get filenames\0", ags_lv2_manager_test_get_filenames) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Manager find lv2 plugin\0", ags_lv2_manager_test_find_lv2_plugin) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Manager load blacklist\0", ags_lv2_manager_test_load_blacklist) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Manager load file\0", ags_lv2_manager_test_load_file) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Manager load preset\0", ags_lv2_manager_test_load_preset) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Manager load default directory\0", ags_lv2_manager_test_load_default_directory) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_lv2_urid_manager_test.c0000644000175000017500000001365613246707333021213 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_lv2_urid_manager_test_init_suite(); int ags_lv2_urid_manager_test_clean_suite(); void ags_lv2_urid_manager_test_insert(); void ags_lv2_urid_manager_test_remove(); void ags_lv2_urid_manager_test_lookup(); void ags_lv2_urid_manager_test_map(); void ags_lv2_urid_manager_test_unmap(); gboolean ags_lv2_urid_manager_test_map_ghrfunc(gpointer key, gpointer value, gpointer user_data); #define AGS_LV2_URID_MANAGER_TEST_INSERT_URI "http://drobilla.net/plugins/mda/EPiano" #define AGS_LV2_URID_MANAGER_TEST_REMOVE_URI "http://drobilla.net/plugins/mda/EPiano" #define AGS_LV2_URID_MANAGER_TEST_LOOKUP_URI "http://drobilla.net/plugins/mda/EPiano" #define AGS_LV2_URID_MANAGER_TEST_MAP_URI "http://drobilla.net/plugins/mda/EPiano" #define AGS_LV2_URID_MANAGER_TEST_UNMAP_URI "http://drobilla.net/plugins/mda/EPiano" /* Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_urid_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_urid_manager_test_clean_suite() { return(0); } void ags_lv2_urid_manager_test_insert() { AgsLv2UridManager *urid_manager; GValue value; urid_manager = ags_lv2_urid_manager_get_instance(); /* insert and assert */ ags_lv2_urid_manager_insert(urid_manager, AGS_LV2_URID_MANAGER_TEST_INSERT_URI, &value); CU_ASSERT(g_hash_table_lookup(urid_manager->urid, AGS_LV2_URID_MANAGER_TEST_INSERT_URI) == &value); g_object_unref(urid_manager); } void ags_lv2_urid_manager_test_remove() { AgsLv2UridManager *urid_manager; GValue value; urid_manager = ags_lv2_urid_manager_get_instance(); ags_lv2_urid_manager_insert(urid_manager, AGS_LV2_URID_MANAGER_TEST_REMOVE_URI, &value); /* remove and assert */ ags_lv2_urid_manager_remove(urid_manager, AGS_LV2_URID_MANAGER_TEST_REMOVE_URI); CU_ASSERT(g_hash_table_lookup(urid_manager->urid, AGS_LV2_URID_MANAGER_TEST_REMOVE_URI) == NULL); g_object_unref(urid_manager); } void ags_lv2_urid_manager_test_lookup() { AgsLv2UridManager *urid_manager; GValue value; urid_manager = ags_lv2_urid_manager_get_instance(); /* lookup and assert */ ags_lv2_urid_manager_lookup(urid_manager, AGS_LV2_URID_MANAGER_TEST_LOOKUP_URI); CU_ASSERT(g_hash_table_lookup(urid_manager->urid, AGS_LV2_URID_MANAGER_TEST_LOOKUP_URI) != NULL); g_object_unref(urid_manager); } void ags_lv2_urid_manager_test_map() { AgsLv2UridManager *urid_manager; uint32_t id; GValue value = {0,}; urid_manager = ags_lv2_urid_manager_get_instance(); id = ags_lv2_urid_manager_map(NULL, AGS_LV2_URID_MANAGER_TEST_MAP_URI); g_value_init(&value, G_TYPE_ULONG); g_value_set_ulong(&value, id); CU_ASSERT(g_hash_table_find(urid_manager->urid, ags_lv2_urid_manager_test_map_ghrfunc, &value) != NULL); g_object_unref(urid_manager); } void ags_lv2_urid_manager_test_unmap() { AgsLv2UridManager *urid_manager; uint32_t id; GValue value = {0,}; urid_manager = ags_lv2_urid_manager_get_instance(); id = ags_lv2_urid_manager_map(NULL, AGS_LV2_URID_MANAGER_TEST_UNMAP_URI); g_value_init(&value, G_TYPE_ULONG); g_value_set_ulong(&value, id); ags_lv2_urid_manager_unmap(NULL, id); CU_ASSERT(g_hash_table_lookup(urid_manager->urid, AGS_LV2_URID_MANAGER_TEST_UNMAP_URI) == NULL); g_object_unref(urid_manager); } gboolean ags_lv2_urid_manager_test_map_ghrfunc(gpointer key, gpointer value, gpointer user_data) { if(value != NULL && user_data != NULL && g_value_get_ulong((GValue *) value) == g_value_get_ulong((GValue *) user_data)){ return(TRUE); } return(FALSE); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLv2UridManagerTest", ags_lv2_urid_manager_test_init_suite, ags_lv2_urid_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLv2UridManager insert", ags_lv2_urid_manager_test_insert) == NULL) || (CU_add_test(pSuite, "test of AgsLv2UridManager remove", ags_lv2_urid_manager_test_remove) == NULL) || (CU_add_test(pSuite, "test of AgsLv2UridManager lookup", ags_lv2_urid_manager_test_lookup) == NULL) || (CU_add_test(pSuite, "test of AgsLv2UridManager map", ags_lv2_urid_manager_test_map) == NULL) || (CU_add_test(pSuite, "test of AgsLv2UridManager unmap", ags_lv2_urid_manager_test_unmap) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_lv2_preset_test.c0000644000175000017500000001103213246707333020042 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_lv2_preset_test_init_suite(); int ags_lv2_preset_test_clean_suite(); void ags_lv2_preset_test_parse_turtle(); void ags_lv2_preset_test_find_preset_label(); #define AGS_LV2_PRESET_TEST_PARSE_TURTLE_URI "" #define AGS_LV2_PRESET_TEST_PARSE_TURTLE_TTL SRCDIR "/lv2.lib/mda/EPiano-presets.ttl" #define AGS_LV2_PRESET_TEST_FIND_PRESET_LABEL_DEFAULT "Default" #define AGS_LV2_PRESET_TEST_FIND_PRESET_LABEL_BRIGHT "Bright" #define AGS_LV2_PRESET_TEST_FIND_PRESET_LABEL_TREMOLO "Tremolo" /* Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_preset_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_preset_test_clean_suite() { return(0); } void ags_lv2_preset_test_parse_turtle() { AgsLv2Preset *lv2_preset; AgsTurtle *turtle; GError *error; g_message("%s", AGS_LV2_PRESET_TEST_PARSE_TURTLE_TTL); turtle = ags_turtle_new(AGS_LV2_PRESET_TEST_PARSE_TURTLE_TTL); error = NULL; ags_turtle_load(turtle, &error); // xmlSaveFormatFileEnc("-", turtle->doc, "UTF-8", 1); lv2_preset = (AgsLv2Preset *) g_object_new(AGS_TYPE_LV2_PRESET, "turtle", turtle, "uri", AGS_LV2_PRESET_TEST_PARSE_TURTLE_URI, NULL); /* parse and assert */ ags_lv2_preset_parse_turtle(lv2_preset); CU_ASSERT(lv2_preset->port_preset != NULL); } void ags_lv2_preset_test_find_preset_label() { AgsLv2Preset *lv2_preset[3]; GList *list, *current; list = NULL; lv2_preset[0] = (AgsLv2Preset *) g_object_new(AGS_TYPE_LV2_PRESET, "preset-label", AGS_LV2_PRESET_TEST_FIND_PRESET_LABEL_DEFAULT, NULL); list = g_list_prepend(list, lv2_preset[0]); lv2_preset[1] = (AgsLv2Preset *) g_object_new(AGS_TYPE_LV2_PRESET, "preset-label", AGS_LV2_PRESET_TEST_FIND_PRESET_LABEL_BRIGHT, NULL); list = g_list_prepend(list, lv2_preset[1]); lv2_preset[2] = (AgsLv2Preset *) g_object_new(AGS_TYPE_LV2_PRESET, "preset-label", AGS_LV2_PRESET_TEST_FIND_PRESET_LABEL_TREMOLO, NULL); list = g_list_prepend(list, lv2_preset[2]); /* assert */ CU_ASSERT((current = ags_lv2_preset_find_preset_label(list, AGS_LV2_PRESET_TEST_FIND_PRESET_LABEL_DEFAULT)) != NULL && current->data == lv2_preset[0]); CU_ASSERT((current = ags_lv2_preset_find_preset_label(list, AGS_LV2_PRESET_TEST_FIND_PRESET_LABEL_BRIGHT)) != NULL && current->data == lv2_preset[1]); CU_ASSERT((current = ags_lv2_preset_find_preset_label(list, AGS_LV2_PRESET_TEST_FIND_PRESET_LABEL_TREMOLO)) != NULL && current->data == lv2_preset[2]); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLv2PresetTest", ags_lv2_preset_test_init_suite, ags_lv2_preset_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLv2Preset parse turtle", ags_lv2_preset_test_parse_turtle) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Preset find preset label", ags_lv2_preset_test_find_preset_label) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_lv2_uri_map_manager_test.c0000644000175000017500000001312213246707333021670 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_lv2_uri_map_manager_test_init_suite(); int ags_lv2_uri_map_manager_test_clean_suite(); void ags_lv2_uri_map_manager_test_insert(); void ags_lv2_uri_map_manager_test_remove(); void ags_lv2_uri_map_manager_test_lookup(); void ags_lv2_uri_map_manager_test_uri_to_id(); gboolean ags_lv2_uri_map_manager_test_uri_to_id_ghrfunc(gpointer key, gpointer value, gpointer user_data); #define AGS_LV2_URI_MAP_MANAGER_TEST_INSERT_URI "TEST_INSERT" #define AGS_LV2_URI_MAP_MANAGER_TEST_REMOVE_URI "TEST_REMOVE" #define AGS_LV2_URI_MAP_MANAGER_TEST_LOOKUP_URI "TEST_LOOKUP" #define AGS_LV2_URI_MAP_MANAGER_TEST_URI_TO_ID_MAP "TEST_URI_TO_ID" #define AGS_LV2_URI_MAP_MANAGER_TEST_URI_TO_ID_URI "http://drobilla.net/plugins/mda/EPiano" /* Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_uri_map_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_uri_map_manager_test_clean_suite() { return(0); } void ags_lv2_uri_map_manager_test_insert() { AgsLv2UriMapManager *uri_map_manager; GValue value; uri_map_manager = ags_lv2_uri_map_manager_get_instance(); /* insert and assert */ ags_lv2_uri_map_manager_insert(uri_map_manager, AGS_LV2_URI_MAP_MANAGER_TEST_INSERT_URI, &value); CU_ASSERT(g_hash_table_lookup(uri_map_manager->uri_map, AGS_LV2_URI_MAP_MANAGER_TEST_INSERT_URI) == &value); g_object_unref(uri_map_manager); } void ags_lv2_uri_map_manager_test_remove() { AgsLv2UriMapManager *uri_map_manager; GValue value; uri_map_manager = ags_lv2_uri_map_manager_get_instance(); ags_lv2_uri_map_manager_insert(uri_map_manager, AGS_LV2_URI_MAP_MANAGER_TEST_REMOVE_URI, &value); /* remove and assert */ ags_lv2_uri_map_manager_remove(uri_map_manager, AGS_LV2_URI_MAP_MANAGER_TEST_REMOVE_URI); CU_ASSERT(g_hash_table_lookup(uri_map_manager->uri_map, AGS_LV2_URI_MAP_MANAGER_TEST_REMOVE_URI) == NULL); g_object_unref(uri_map_manager); } void ags_lv2_uri_map_manager_test_lookup() { AgsLv2UriMapManager *uri_map_manager; GValue value; uri_map_manager = ags_lv2_uri_map_manager_get_instance(); /* lookup and assert */ ags_lv2_uri_map_manager_lookup(uri_map_manager, AGS_LV2_URI_MAP_MANAGER_TEST_LOOKUP_URI); CU_ASSERT(g_hash_table_lookup(uri_map_manager->uri_map, AGS_LV2_URI_MAP_MANAGER_TEST_LOOKUP_URI) != NULL); g_object_unref(uri_map_manager); } void ags_lv2_uri_map_manager_test_uri_to_id() { AgsLv2UriMapManager *uri_map_manager; uint32_t id; GValue value = {0,}; uri_map_manager = ags_lv2_uri_map_manager_get_instance(); id = ags_lv2_uri_map_manager_uri_to_id(NULL, AGS_LV2_URI_MAP_MANAGER_TEST_URI_TO_ID_MAP, AGS_LV2_URI_MAP_MANAGER_TEST_URI_TO_ID_URI); g_value_init(&value, G_TYPE_ULONG); g_value_set_ulong(&value, id); CU_ASSERT(g_hash_table_find(uri_map_manager->uri_map, ags_lv2_uri_map_manager_test_uri_to_id_ghrfunc, &value) != NULL); g_object_unref(uri_map_manager); } gboolean ags_lv2_uri_map_manager_test_uri_to_id_ghrfunc(gpointer key, gpointer value, gpointer user_data) { if(value != NULL && user_data != NULL && g_value_get_ulong((GValue *) value) == g_value_get_ulong((GValue *) user_data)){ return(TRUE); } return(FALSE); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLv2UriMapManagerTest", ags_lv2_uri_map_manager_test_init_suite, ags_lv2_uri_map_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLv2UriMapManager insert", ags_lv2_uri_map_manager_test_insert) == NULL) || (CU_add_test(pSuite, "test of AgsLv2UriMapManager remove", ags_lv2_uri_map_manager_test_remove) == NULL) || (CU_add_test(pSuite, "test of AgsLv2UriMapManager lookup", ags_lv2_uri_map_manager_test_lookup) == NULL) || (CU_add_test(pSuite, "test of AgsLv2UriMapManager uri to id", ags_lv2_uri_map_manager_test_uri_to_id) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_lv2_plugin_test.c0000644000175000017500000005112213246707333020042 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_lv2_plugin_test_init_suite(); int ags_lv2_plugin_test_clean_suite(); void ags_lv2_plugin_test_concat_event_buffer(); void ags_lv2_plugin_test_event_buffer_concat(); void ags_lv2_plugin_test_event_buffer_append_midi(); void ags_lv2_plugin_test_event_buffer_remove_midi(); void ags_lv2_plugin_test_clear_event_buffer(); void ags_lv2_plugin_test_concat_atom_sequence(); void ags_lv2_plugin_test_atom_sequence_append_midi(); void ags_lv2_plugin_test_atom_sequence_remove_midi(); void ags_lv2_plugin_test_clear_atom_sequence(); void ags_lv2_plugin_test_find_pname(); void ags_lv2_plugin_test_change_program(); void ags_lv2_plugin_test_stub_change_program(AgsLv2Plugin *lv2_plugin, gpointer lv2_handle, guint bank_index, guint program_index); #define AGS_LV2_PLUGIN_TEST_CONCAT_EVENT_BUFFER_LENGTH_0 (1024 * sizeof(char)) #define AGS_LV2_PLUGIN_TEST_CONCAT_EVENT_BUFFER_LENGTH_1 (2048 * sizeof(char)) #define AGS_LV2_PLUGIN_TEST_CONCAT_EVENT_BUFFER_LENGTH_2 (512 * sizeof(char)) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_CONCAT_LENGTH_0 (1024 * sizeof(char)) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_CONCAT_LENGTH_1 (2048 * sizeof(char)) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_CONCAT_LENGTH_2 (512 * sizeof(char)) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_NOTE_0 (32) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_NOTE_1 (48) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_NOTE_2 (64) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_SIZE (1024) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_0 (32) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_1 (48) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_2 (64) #define AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_SIZE (1024) #define AGS_LV2_PLUGIN_TEST_CLEAR_EVENT_BUFFER_NOTE_0 (17) #define AGS_LV2_PLUGIN_TEST_CLEAR_EVENT_BUFFER_SIZE (1024) #define AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_NOTE_0 (32) #define AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_NOTE_1 (48) #define AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_NOTE_2 (64) #define AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_SIZE (1024) #define AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_0 (32) #define AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_1 (48) #define AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_2 (64) #define AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_SIZE (1024) #define AGS_LV2_PLUGIN_TEST_CLEAR_ATOM_SEQUENCE_NOTE_0 (17) #define AGS_LV2_PLUGIN_TEST_CLEAR_ATOM_SEQUENCE_SIZE (1024) #define AGS_LV2_PLUGIN_TEST_FIND_PNAME_SWH "swh" #define AGS_LV2_PLUGIN_TEST_FIND_PNAME_INVADA "invada" #define AGS_LV2_PLUGIN_TEST_FIND_PNAME_ZYN "zyn" AgsLv2UriMapManager *uri_map_manager; AgsLv2UridManager *urid_manager; gboolean stub_change_program = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_plugin_test_init_suite() { uri_map_manager = ags_lv2_uri_map_manager_get_instance(); urid_manager = ags_lv2_urid_manager_get_instance(); return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2_plugin_test_clean_suite() { return(0); } void ags_lv2_plugin_test_concat_event_buffer() { LV2_Event_Buffer *event_buffer[3]; guint length[3]; void *ptr; length[0] = AGS_LV2_PLUGIN_TEST_CONCAT_EVENT_BUFFER_LENGTH_0; length[1] = AGS_LV2_PLUGIN_TEST_CONCAT_EVENT_BUFFER_LENGTH_1; length[2] = AGS_LV2_PLUGIN_TEST_CONCAT_EVENT_BUFFER_LENGTH_2; event_buffer[0] = ags_lv2_plugin_alloc_event_buffer(length[0]); event_buffer[1] = ags_lv2_plugin_alloc_event_buffer(length[1]); event_buffer[2] = ags_lv2_plugin_alloc_event_buffer(length[2]); ptr = ags_lv2_plugin_concat_event_buffer(event_buffer[0], event_buffer[1], event_buffer[2], NULL); CU_ASSERT(AGS_LV2_EVENT_BUFFER(ptr)->capacity == length[0] && AGS_LV2_EVENT_BUFFER(ptr + length[0] + sizeof(LV2_Event_Buffer))->capacity == length[1] && AGS_LV2_EVENT_BUFFER(ptr + length[0] + length[1] + (2 * sizeof(LV2_Event_Buffer)))->capacity == length[2]); } void ags_lv2_plugin_test_event_buffer_concat() { LV2_Event_Buffer *event_buffer[3]; guint length[3]; void *ptr; length[0] = AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_CONCAT_LENGTH_0; length[1] = AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_CONCAT_LENGTH_1; length[2] = AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_CONCAT_LENGTH_2; event_buffer[0] = ags_lv2_plugin_event_buffer_alloc(length[0]); event_buffer[1] = ags_lv2_plugin_event_buffer_alloc(length[1]); event_buffer[2] = ags_lv2_plugin_event_buffer_alloc(length[2]); ptr = ags_lv2_plugin_event_buffer_concat(event_buffer[0], event_buffer[1], event_buffer[2], NULL); CU_ASSERT(AGS_LV2_EVENT_BUFFER(ptr)->capacity == length[0]); ptr += sizeof(LV2_Event_Buffer); CU_ASSERT(AGS_LV2_EVENT_BUFFER(ptr)->capacity == length[1]); ptr += sizeof(LV2_Event_Buffer); CU_ASSERT(AGS_LV2_EVENT_BUFFER(ptr)->capacity == length[2]); } void ags_lv2_plugin_test_event_buffer_append_midi() { LV2_Event_Buffer *event_buffer; snd_seq_event_t seq_event[3]; void *offset; uint32_t id; id = ags_lv2_uri_map_manager_uri_to_id(NULL, LV2_EVENT_URI, LV2_MIDI__MidiEvent); memset(&seq_event, 0, 3 * sizeof(snd_seq_event_t)); /* note #0 */ seq_event[0].type = SND_SEQ_EVENT_NOTEON; seq_event[0].data.note.channel = 0; seq_event[0].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_NOTE_0; seq_event[0].data.note.velocity = 127; /* note #1 */ seq_event[1].type = SND_SEQ_EVENT_NOTEON; seq_event[1].data.note.channel = 0; seq_event[1].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_NOTE_1; seq_event[1].data.note.velocity = 127; /* note #2 */ seq_event[2].type = SND_SEQ_EVENT_NOTEON; seq_event[2].data.note.channel = 0; seq_event[2].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_NOTE_2; seq_event[2].data.note.velocity = 127; /* event buffer */ event_buffer = ags_lv2_plugin_alloc_event_buffer(AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_SIZE); offset = event_buffer->data; /* append midi and assert */ ags_lv2_plugin_event_buffer_append_midi(event_buffer, AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_SIZE, &seq_event, 3); CU_ASSERT(AGS_LV2_EVENT(offset)->type == id && ((uint8_t *) (offset + sizeof(LV2_Event)))[1] == AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_NOTE_0); offset += (sizeof(LV2_Event) + 8); CU_ASSERT(AGS_LV2_EVENT(offset)->type == id && ((uint8_t *) (offset + sizeof(LV2_Event)))[1] == AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_NOTE_1); offset += (sizeof(LV2_Event) + 8); CU_ASSERT(AGS_LV2_EVENT(offset)->type == id && ((uint8_t *) (offset + sizeof(LV2_Event)))[1] == AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_APPEND_MIDI_NOTE_2); } void ags_lv2_plugin_test_event_buffer_remove_midi() { LV2_Event_Buffer *event_buffer; snd_seq_event_t seq_event[3]; void *offset; uint32_t id; id = ags_lv2_uri_map_manager_uri_to_id(NULL, LV2_EVENT_URI, LV2_MIDI__MidiEvent); memset(&seq_event, 0, 3 * sizeof(snd_seq_event_t)); /* note #0 */ seq_event[0].type = SND_SEQ_EVENT_NOTEON; seq_event[0].data.note.channel = 0; seq_event[0].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_0; seq_event[0].data.note.velocity = 127; /* note #1 */ seq_event[1].type = SND_SEQ_EVENT_NOTEON; seq_event[1].data.note.channel = 0; seq_event[1].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_1; seq_event[1].data.note.velocity = 127; /* note #2 */ seq_event[2].type = SND_SEQ_EVENT_NOTEON; seq_event[2].data.note.channel = 0; seq_event[2].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_2; seq_event[2].data.note.velocity = 127; /* event buffer and append midi */ event_buffer = ags_lv2_plugin_alloc_event_buffer(AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_SIZE); ags_lv2_plugin_event_buffer_append_midi(event_buffer, AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_SIZE, &seq_event, 3); /* remove midi and assert */ ags_lv2_plugin_event_buffer_remove_midi(event_buffer, AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_SIZE, AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_1); offset = event_buffer->data; CU_ASSERT(AGS_LV2_EVENT(offset)->type == id && ((uint8_t *) (offset + sizeof(LV2_Event)))[1] == AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_0); offset += (sizeof(LV2_Event) + 8); CU_ASSERT(AGS_LV2_EVENT(offset)->type == id && ((uint8_t *) (offset + sizeof(LV2_Event)))[1] == AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_2); ags_lv2_plugin_event_buffer_remove_midi(event_buffer, AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_SIZE, AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_2); offset = event_buffer->data; CU_ASSERT(AGS_LV2_EVENT(offset)->type == id && ((uint8_t *) (offset + sizeof(LV2_Event)))[1] == AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_0); offset += (sizeof(LV2_Event) + 8); CU_ASSERT(((uint8_t *) (offset + sizeof(LV2_Event)))[1] == 0); ags_lv2_plugin_event_buffer_remove_midi(event_buffer, AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_SIZE, AGS_LV2_PLUGIN_TEST_EVENT_BUFFER_REMOVE_MIDI_NOTE_0); offset = event_buffer->data; CU_ASSERT(((uint8_t *) (offset + sizeof(LV2_Event)))[1] == 0); } void ags_lv2_plugin_test_clear_event_buffer() { LV2_Event_Buffer *event_buffer; snd_seq_event_t seq_event[1]; void *offset; memset(&seq_event, 0, sizeof(snd_seq_event_t)); /* note #0 */ seq_event[0].type = SND_SEQ_EVENT_NOTEON; seq_event[0].data.note.channel = 0; seq_event[0].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_CLEAR_EVENT_BUFFER_NOTE_0; seq_event[0].data.note.velocity = 127; /* event buffer and append midi */ event_buffer = ags_lv2_plugin_alloc_event_buffer(AGS_LV2_PLUGIN_TEST_CLEAR_EVENT_BUFFER_SIZE); ags_lv2_plugin_event_buffer_append_midi(event_buffer, AGS_LV2_PLUGIN_TEST_CLEAR_EVENT_BUFFER_SIZE, &seq_event, 1); /* clear and assert */ ags_lv2_plugin_clear_event_buffer(event_buffer, AGS_LV2_PLUGIN_TEST_CLEAR_EVENT_BUFFER_SIZE); offset = event_buffer->data; CU_ASSERT(((uint8_t *) (offset + sizeof(LV2_Event)))[1] == 0); } void ags_lv2_plugin_test_concat_atom_sequence() { //TODO:JK: not implemented } void ags_lv2_plugin_test_atom_sequence_append_midi() { LV2_Atom_Sequence *aseq; LV2_Atom_Event *aev; snd_seq_event_t seq_event[3]; uint32_t id; id = ags_lv2_urid_manager_map(NULL, LV2_MIDI__MidiEvent); memset(&seq_event, 0, 3 * sizeof(snd_seq_event_t)); /* note #0 */ seq_event[0].type = SND_SEQ_EVENT_NOTEON; seq_event[0].data.note.channel = 0; seq_event[0].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_NOTE_0; seq_event[0].data.note.velocity = 127; /* note #1 */ seq_event[1].type = SND_SEQ_EVENT_NOTEON; seq_event[1].data.note.channel = 0; seq_event[1].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_NOTE_1; seq_event[1].data.note.velocity = 127; /* note #2 */ seq_event[2].type = SND_SEQ_EVENT_NOTEON; seq_event[2].data.note.channel = 0; seq_event[2].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_NOTE_2; seq_event[2].data.note.velocity = 127; /* atom sequence */ aseq = ags_lv2_plugin_alloc_atom_sequence(AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_SIZE); aev = (LV2_Atom_Event *) ((char *) LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)); /* append midi and assert */ ags_lv2_plugin_atom_sequence_append_midi(aseq, AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_SIZE, &seq_event, 3); CU_ASSERT(aev->body.type == id && ((uint8_t *) (LV2_ATOM_BODY(&(aev->body))))[1] == AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_NOTE_0); aev += ((3 + 7) & (~7)); CU_ASSERT(aev->body.type == id && ((uint8_t *) (LV2_ATOM_BODY(&(aev->body))))[1] == AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_NOTE_1); aev += ((3 + 7) & (~7)); CU_ASSERT(aev->body.type == id && ((uint8_t *) (LV2_ATOM_BODY(&(aev->body))))[1] == AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_APPEND_MIDI_NOTE_2); } void ags_lv2_plugin_test_atom_sequence_remove_midi() { LV2_Atom_Sequence *aseq; LV2_Atom_Event *aev; snd_seq_event_t seq_event[3]; uint32_t id; id = ags_lv2_urid_manager_map(NULL, LV2_MIDI__MidiEvent); memset(&seq_event, 0, 3 * sizeof(snd_seq_event_t)); /* note #0 */ seq_event[0].type = SND_SEQ_EVENT_NOTEON; seq_event[0].data.note.channel = 0; seq_event[0].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_0; seq_event[0].data.note.velocity = 127; /* note #1 */ seq_event[1].type = SND_SEQ_EVENT_NOTEON; seq_event[1].data.note.channel = 0; seq_event[1].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_1; seq_event[1].data.note.velocity = 127; /* note #2 */ seq_event[2].type = SND_SEQ_EVENT_NOTEON; seq_event[2].data.note.channel = 0; seq_event[2].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_2; seq_event[2].data.note.velocity = 127; /* atom sequence */ aseq = ags_lv2_plugin_alloc_atom_sequence(AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_SIZE); ags_lv2_plugin_atom_sequence_append_midi(aseq, AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_SIZE, &seq_event, 3); /* remove midi and assert */ ags_lv2_plugin_atom_sequence_remove_midi(aseq, AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_SIZE, AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_1); aev = (LV2_Atom_Event *) ((char *) LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)); CU_ASSERT(aev->body.type == id && ((uint8_t *) (LV2_ATOM_BODY(&(aev->body))))[1] == AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_0); aev += ((3 + 7) & (~7)); CU_ASSERT(aev->body.type == id && ((uint8_t *) (LV2_ATOM_BODY(&(aev->body))))[1] == AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_2); ags_lv2_plugin_atom_sequence_remove_midi(aseq, AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_SIZE, AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_2); aev = (LV2_Atom_Event *) ((char *) LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)); CU_ASSERT(aev->body.type == id && ((uint8_t *) (LV2_ATOM_BODY(&(aev->body))))[1] == AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_0); aev += ((3 + 7) & (~7)); CU_ASSERT(((uint8_t *) (LV2_ATOM_BODY(&(aev->body))))[1] == 0); ags_lv2_plugin_atom_sequence_remove_midi(aseq, AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_SIZE, AGS_LV2_PLUGIN_TEST_ATOM_SEQUENCE_REMOVE_MIDI_NOTE_0); aev = (LV2_Atom_Event *) ((char *) LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)); CU_ASSERT(((uint8_t *) (LV2_ATOM_BODY(&(aev->body))))[1] == 0); } void ags_lv2_plugin_test_clear_atom_sequence() { LV2_Atom_Sequence *aseq; LV2_Atom_Event *aev; snd_seq_event_t seq_event[1]; uint32_t id; id = ags_lv2_urid_manager_map(NULL, LV2_MIDI__MidiEvent); memset(&seq_event, 0, sizeof(snd_seq_event_t)); /* note #0 */ seq_event[0].type = SND_SEQ_EVENT_NOTEON; seq_event[0].data.note.channel = 0; seq_event[0].data.note.note = 0x7f & AGS_LV2_PLUGIN_TEST_CLEAR_ATOM_SEQUENCE_NOTE_0; seq_event[0].data.note.velocity = 127; /* atom sequence */ aseq = ags_lv2_plugin_alloc_atom_sequence(AGS_LV2_PLUGIN_TEST_CLEAR_ATOM_SEQUENCE_SIZE); ags_lv2_plugin_atom_sequence_append_midi(aseq, AGS_LV2_PLUGIN_TEST_CLEAR_ATOM_SEQUENCE_SIZE, &seq_event, 1); /* clear and assert */ ags_lv2_plugin_clear_atom_sequence(aseq, AGS_LV2_PLUGIN_TEST_CLEAR_ATOM_SEQUENCE_SIZE); aev = (LV2_Atom_Event *) ((char *) LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)); CU_ASSERT(((uint8_t *) (LV2_ATOM_BODY(&(aev->body))))[1] == 0); } void ags_lv2_plugin_test_find_pname() { AgsLv2Plugin *lv2_plugin[3]; GList *list, *current; list = NULL; lv2_plugin[0] = (AgsLv2Plugin *) g_object_new(AGS_TYPE_LV2_PLUGIN, "pname", AGS_LV2_PLUGIN_TEST_FIND_PNAME_SWH, NULL); list = g_list_prepend(list, lv2_plugin[0]); lv2_plugin[1] = (AgsLv2Plugin *) g_object_new(AGS_TYPE_LV2_PLUGIN, "pname", AGS_LV2_PLUGIN_TEST_FIND_PNAME_INVADA, NULL); list = g_list_prepend(list, lv2_plugin[1]); lv2_plugin[2] = (AgsLv2Plugin *) g_object_new(AGS_TYPE_LV2_PLUGIN, "pname", AGS_LV2_PLUGIN_TEST_FIND_PNAME_ZYN, NULL); list = g_list_prepend(list, lv2_plugin[2]); /* assert */ CU_ASSERT((current = ags_lv2_plugin_find_pname(list, AGS_LV2_PLUGIN_TEST_FIND_PNAME_SWH)) != NULL && current->data == lv2_plugin[0]); CU_ASSERT((current = ags_lv2_plugin_find_pname(list, AGS_LV2_PLUGIN_TEST_FIND_PNAME_INVADA)) != NULL && current->data == lv2_plugin[1]); CU_ASSERT((current = ags_lv2_plugin_find_pname(list, AGS_LV2_PLUGIN_TEST_FIND_PNAME_ZYN)) != NULL && current->data == lv2_plugin[2]); } void ags_lv2_plugin_test_change_program() { AgsLv2Plugin *lv2_plugin; gpointer ptr; lv2_plugin = (AgsLv2Plugin *) g_object_new(AGS_TYPE_LV2_PLUGIN, NULL); /* stub */ ptr = AGS_LV2_PLUGIN_GET_CLASS(lv2_plugin)->change_program; AGS_LV2_PLUGIN_GET_CLASS(lv2_plugin)->change_program = ags_lv2_plugin_test_stub_change_program; /* assert */ ags_lv2_plugin_change_program(lv2_plugin, NULL, 0, 0); CU_ASSERT(stub_change_program == TRUE); /* reset */ AGS_LV2_PLUGIN_GET_CLASS(lv2_plugin)->change_program = ptr; } void ags_lv2_plugin_test_stub_change_program(AgsLv2Plugin *lv2_plugin, gpointer lv2_handle, guint bank_index, guint program_index) { stub_change_program = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLv2PluginTest", ags_lv2_plugin_test_init_suite, ags_lv2_plugin_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLv2Plugin concat event buffer", ags_lv2_plugin_test_concat_event_buffer) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin event buffer concat", ags_lv2_plugin_test_event_buffer_concat) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin event buffer append midi", ags_lv2_plugin_test_event_buffer_append_midi) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin event buffer remove midi", ags_lv2_plugin_test_event_buffer_remove_midi) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin clear event buffer", ags_lv2_plugin_test_clear_event_buffer) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin concat atom sequence", ags_lv2_plugin_test_concat_atom_sequence) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin atom sequence append midi", ags_lv2_plugin_test_atom_sequence_append_midi) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin atom sequence remove midi", ags_lv2_plugin_test_atom_sequence_remove_midi) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin clear atom sequence", ags_lv2_plugin_test_clear_atom_sequence) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin find pname", ags_lv2_plugin_test_find_pname) == NULL) || (CU_add_test(pSuite, "test of AgsLv2Plugin change program", ags_lv2_plugin_test_change_program) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/plugin/ags_lv2ui_plugin_test.c0000644000175000017500000000722613246707333020406 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_lv2ui_plugin_test_init_suite(); int ags_lv2ui_plugin_test_clean_suite(); void ags_lv2ui_plugin_test_find_gui_uri(); #define AGS_LV2UI_PLUGIN_TEST_FIND_GUI_URI_SWH "http://plugin.org.uk/ladspa-swh" #define AGS_LV2UI_PLUGIN_TEST_FIND_GUI_URI_INVADA "http://invadarecords.com/plugins/lv2" #define AGS_LV2UI_PLUGIN_TEST_FIND_GUI_URI_ZYN "http://home.gna.org/zyn/zynadd" /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2ui_plugin_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_lv2ui_plugin_test_clean_suite() { return(0); } void ags_lv2ui_plugin_test_find_gui_uri() { AgsLv2uiPlugin *lv2ui_plugin[3]; GList *list, *current; list = NULL; lv2ui_plugin[0] = (AgsLv2uiPlugin *) g_object_new(AGS_TYPE_LV2UI_PLUGIN, "gui-uri", AGS_LV2UI_PLUGIN_TEST_FIND_GUI_URI_SWH, NULL); list = g_list_prepend(list, lv2ui_plugin[0]); lv2ui_plugin[1] = (AgsLv2uiPlugin *) g_object_new(AGS_TYPE_LV2UI_PLUGIN, "gui-uri", AGS_LV2UI_PLUGIN_TEST_FIND_GUI_URI_INVADA, NULL); list = g_list_prepend(list, lv2ui_plugin[1]); lv2ui_plugin[2] = (AgsLv2uiPlugin *) g_object_new(AGS_TYPE_LV2UI_PLUGIN, "gui-uri", AGS_LV2UI_PLUGIN_TEST_FIND_GUI_URI_ZYN, NULL); list = g_list_prepend(list, lv2ui_plugin[2]); /* assert */ CU_ASSERT((current = ags_lv2ui_plugin_find_gui_uri(list, AGS_LV2UI_PLUGIN_TEST_FIND_GUI_URI_SWH)) != NULL && current->data == lv2ui_plugin[0]); CU_ASSERT((current = ags_lv2ui_plugin_find_gui_uri(list, AGS_LV2UI_PLUGIN_TEST_FIND_GUI_URI_INVADA)) != NULL && current->data == lv2ui_plugin[1]); CU_ASSERT((current = ags_lv2ui_plugin_find_gui_uri(list, AGS_LV2UI_PLUGIN_TEST_FIND_GUI_URI_ZYN)) != NULL && current->data == lv2ui_plugin[2]); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsLv2uiPluginTest", ags_lv2ui_plugin_test_init_suite, ags_lv2ui_plugin_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsLv2uiPlugin find GUI URI", ags_lv2ui_plugin_test_find_gui_uri) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/X/0000755000175000017500000000000013256233676012721 500000000000000gsequencer-1.4.24/ags/test/X/ags_functional_notation_edit_test.c0000644000175000017500000001457713247044247021770 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include #include "gsequencer_setup_util.h" #include "ags_functional_test_util.h" void ags_functional_notation_edit_test_add_test(); int ags_functional_notation_edit_test_init_suite(); int ags_functional_notation_edit_test_clean_suite(); void ags_functional_notation_edit_test_quit_stub(AgsApplicationContext *application_context); void ags_functional_notation_edit_test_file_setup(); #define AGS_FUNCTIONAL_NOTATION_EDIT_TEST_FILE_SETUP_FILENAME SRCDIR "/" "ags_functional_notation_edit_test.xml" #define AGS_FUNCTIONAL_NOTATION_EDIT_TEST_FILE_SETUP_PLAYBACK_COUNT (3) #define AGS_FUNCTIONAL_NOTATION_EDIT_TEST_FILE_SETUP_PLAYBACK_DURATION (30) #define AGS_FUNCTIONAL_NOTATION_EDIT_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; void ags_functional_notation_edit_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of GSequencer setup by file and editing notes", ags_functional_notation_edit_test_file_setup) == NULL)){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_notation_edit_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_notation_edit_test_clean_suite() { return(0); } void ags_functional_notation_edit_test_quit_stub(AgsApplicationContext *application_context) { g_critical("quit stub"); } void ags_functional_notation_edit_test_file_setup() { GtkButton *play_button; GtkButton *stop_button; struct timespec start_time, current_time; guint i; gboolean expired; gboolean success; while(!g_atomic_int_get(&(AGS_XORG_APPLICATION_CONTEXT(ags_application_context)->file_ready))){ usleep(500000); } usleep(500000); /* get buttons */ ags_test_enter(); play_button = AGS_XORG_APPLICATION_CONTEXT(ags_application_context)->window->navigation->play; stop_button = AGS_XORG_APPLICATION_CONTEXT(ags_application_context)->window->navigation->stop; ags_test_leave(); /* get initial time */ success = TRUE; for(i = 0; success && i < AGS_FUNCTIONAL_NOTATION_EDIT_TEST_FILE_SETUP_PLAYBACK_COUNT; i++){ clock_gettime(CLOCK_MONOTONIC, &start_time); expired = FALSE; g_message("start playback"); ags_functional_test_util_button_click(play_button); while(!expired){ /* check expired */ clock_gettime(CLOCK_MONOTONIC, ¤t_time); if(start_time.tv_sec + AGS_FUNCTIONAL_NOTATION_EDIT_TEST_FILE_SETUP_PLAYBACK_DURATION < current_time.tv_sec){ expired = TRUE; } } g_message("stop playback"); ags_functional_test_util_button_click(stop_button); /* wait some time before next playback */ usleep(5000000); if(!expired){ success = FALSE; } } CU_ASSERT(success == TRUE); } int main(int argc, char **argv) { char **new_argv; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalNoteEditTest", ags_functional_notation_edit_test_init_suite, ags_functional_notation_edit_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); new_argv = (char **) malloc((argc + 3) * sizeof(char *)); memcpy(new_argv, argv, argc * sizeof(char **)); new_argv[argc] = "--filename"; new_argv[argc + 1] = AGS_FUNCTIONAL_NOTATION_EDIT_TEST_FILE_SETUP_FILENAME; new_argv[argc + 2] = NULL; argc += 2; ags_test_init(&argc, &new_argv, AGS_FUNCTIONAL_NOTATION_EDIT_TEST_CONFIG); ags_functional_test_util_do_run(argc, new_argv, ags_functional_notation_edit_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/X/libgsequencer.h0000644000175000017500000002241413247044247015637 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __LIBGSEQUENCER_H__ #define __LIBGSEQUENCER_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif /*__LIBGSEQUENCER_H__*/ gsequencer-1.4.24/ags/test/X/ags_functional_test_util.h0000644000175000017500000004640213247044247020102 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_FUNCTIONAL_TEST_UTIL_H__ #define __AGS_FUNCTIONAL_TEST_UTIL_H__ #include #include #include #define AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_OUTPUT_TAB (0) #define AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB (1) #define AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_OUTPUT_TAB (2) #define AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_INPUT_TAB (3) #define AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_RESIZE_TAB (4) #define AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_4_TO_1 (0) #define AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_2_TO_1 (1) #define AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_1_TO_1 (2) #define AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_1_TO_2 (3) #define AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_1_TO_4 (4) #define AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_1_TO_8 (5) #define AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_1_TO_16 (6) #define AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(f) ((AgsFunctionalTestUtilIdleCondition)(f)) typedef struct _AgsFunctionalTestUtilContainerTest AgsFunctionalTestUtilContainerTest; typedef void (*AgsFunctionalTestUtilAddTest)(); typedef gboolean (*AgsFunctionalTestUtilIdleCondition)(gpointer data); struct _AgsFunctionalTestUtilContainerTest { GtkContainer **container; guint count; }; pthread_t* ags_functional_test_util_self(); /* legacy setup */ void ags_functional_test_util_setup_and_launch(); void ags_functional_test_util_setup_and_launch_filename(gchar *filename); /* gtk_main() related */ void ags_functional_test_util_add_test(AgsFunctionalTestUtilAddTest add_test, volatile gboolean *is_available); void ags_functional_test_util_notify_add_test(volatile gboolean *is_available); void ags_functional_test_util_do_run(int argc, char **argv, AgsFunctionalTestUtilAddTest add_test, volatile gboolean *is_available); /* synchronization */ void ags_functional_test_util_reaction_time(); void ags_functional_test_util_reaction_time_long(); void ags_functional_test_util_idle(); void ags_functional_test_util_idle_condition_and_timeout(AgsFunctionalTestUtilIdleCondition idle_condition, struct timespec *timeout, gpointer data); gboolean ags_functional_test_util_idle_test_widget_visible(GtkWidget **widget); gboolean ags_functional_test_util_idle_test_widget_hidden(GtkWidget **widget); gboolean ags_functional_test_util_idle_test_container_children_count(AgsFunctionalTestUtilContainerTest *container_test); gboolean ags_functional_test_util_idle_test_null(GtkWidget **widget); /* leave */ void ags_functional_test_util_leave(GtkWidget *window); /* common */ GtkMenu* ags_functional_test_util_submenu_find(GtkMenu *menu, gchar *item_label); gboolean ags_functional_test_util_menu_bar_click(gchar *item_label); gboolean ags_functional_test_util_menu_click(GtkMenu *menu, gchar *item_label); gboolean ags_functional_test_util_combo_box_click(GtkComboBox *combo_box, guint nth); gboolean ags_functional_test_util_button_click(GtkButton *button); /* generic dialog */ gboolean ags_functional_test_util_dialog_apply(GtkDialog *dialog); gboolean ags_functional_test_util_dialog_ok(GtkDialog *dialog); gboolean ags_functional_test_util_dialog_cancel(GtkDialog *dialog); #define ags_functional_test_util_dialog_close ags_functional_test_util_dialog_cancel /* file chooser */ gboolean ags_functional_test_util_file_chooser_open_path(GtkFileChooser *file_chooser, gchar *path); gboolean ags_functional_test_util_file_chooser_select_filename(GtkFileChooser *file_chooser, gchar *filename); gboolean ags_functional_test_util_file_chooser_select_filenames(GtkFileChooser *file_chooser, GSList *filename); gboolean ags_functional_test_util_file_chooser_select_all(GtkFileChooser *file_chooser); /* UI control */ gboolean ags_functional_test_util_file_default_window_resize(); gboolean ags_functional_test_util_file_default_editor_resize(); /* file */ gboolean ags_functional_test_util_open(); gboolean ags_functional_test_util_save(); gboolean ags_functional_test_util_save_as(); gboolean ags_functional_test_util_export_open(); gboolean ags_functional_test_util_export_close(); gboolean ags_funcitonal_test_util_export_add(); gboolean ags_funcitonal_test_util_export_tact(gdouble tact); gboolean ags_funcitonal_test_util_export_remove(guint nth); gboolean ags_funcitonal_test_util_export_set_backend(guint nth, gchar *backend); gboolean ags_funcitonal_test_util_export_set_device(guint nth, gchar *device); gboolean ags_funcitonal_test_util_export_set_filename(guint nth, gchar *filename); gboolean ags_funcitonal_test_util_export_open(guint nth); gboolean ags_funcitonal_test_util_export_set_format(guint nth, gchar *format); gboolean ags_funcitonal_test_util_export_do_export(); gboolean ags_functional_test_util_quit(); /* edit */ gboolean ags_functional_test_util_add_machine(gchar *submenu, gchar *machine_name); gboolean ags_functional_test_util_automation_open(); gboolean ags_functional_test_util_automation_close(); gboolean ags_functional_test_util_preferences_open(); gboolean ags_functional_test_util_preferences_close(); /* help */ gboolean ags_functional_test_util_about_open(); gboolean ags_functional_test_util_about_close(); /* navigation */ gboolean ags_functional_test_util_navigation_expand(); gboolean ags_functional_test_util_navigation_bpm(gdouble bpm); gboolean ags_functional_test_util_navigation_rewind(); gboolean ags_functional_test_util_navigation_prev(); gboolean ags_functional_test_util_navigation_play(); gboolean ags_functional_test_util_navigation_stop(); gboolean ags_functional_test_util_navigation_next(); gboolean ags_functional_test_util_navigation_forward(); gboolean ags_functional_test_util_navigation_loop(); gboolean ags_functional_test_util_navigation_position(gdouble position); gboolean ags_functional_test_util_navigation_loop_left(gdouble loop_left); gboolean ags_functional_test_util_navigation_loop_right(gdouble loop_right); gboolean ags_functional_test_util_navigation_exclude_sequencers(); /* notation toolbar */ gboolean ags_functional_test_util_notation_toolbar_cursor_click(); gboolean ags_functional_test_util_notation_toolbar_edit_click(); gboolean ags_functional_test_util_notation_toolbar_delete_click(); gboolean ags_functional_test_util_notation_toolbar_select_click(); gboolean ags_functional_test_util_notation_toolbar_invert_click(); gboolean ags_functional_test_util_notation_toolbar_paste_click(); gboolean ags_functional_test_util_notation_toolbar_copy_click(); gboolean ags_functional_test_util_notation_toolbar_cut_click(); gboolean ags_functional_test_util_notation_toolbar_zoom(guint nth_zoom); /* machine selector */ gboolean ags_functional_test_util_machine_selector_select(guint nth_index); /* machine selection */ gboolean ags_functional_test_util_machine_selection_select(gchar *machine); gboolean ags_functional_test_util_machine_selection_remove_index(); gboolean ags_functional_test_util_machine_selection_add_index(); gboolean ags_functional_test_util_machine_selection_link_index(); gboolean ags_functional_test_util_machine_selection_reverse_mapping(); gboolean ags_functional_test_util_machine_selection_shift_piano(guint nth_shift); /* notation edit */ gboolean ags_functional_test_util_notation_edit_delete_point(guint x, guint y); gboolean ags_functional_test_util_notation_edit_add_point(guint x0, guint x1, guint y); gboolean ags_functional_test_util_notation_edit_select_region(guint x0, guint x1, guint y0, guint y1); /* automation toolbar */ gboolean ags_functional_test_util_automation_toolbar_cursor_click(); gboolean ags_functional_test_util_automation_toolbar_edit_click(); gboolean ags_functional_test_util_automation_toolbar_delete_click(); gboolean ags_functional_test_util_automation_toolbar_select_click(); gboolean ags_functional_test_util_automation_toolbar_paste_click(); gboolean ags_functional_test_util_automation_toolbar_copy_click(); gboolean ags_functional_test_util_automation_toolbar_cut_click(); gboolean ags_functional_test_util_automation_toolbar_zoom(guint nth_zoom); /* automation edit */ gboolean ags_functional_test_util_automation_edit_audio_click(); gboolean ags_functional_test_util_automation_edit_output_click(); gboolean ags_functional_test_util_automation_edit_input_click(); /* automation area */ gboolean ags_functional_test_util_automation_edit_delete_point(guint nth_index, guint x, guint y); gboolean ags_functional_test_util_automation_edit_add_point(guint nth_index, guint x, guint y); gboolean ags_functional_test_util_automation_edit_select_region(guint nth_index, guint x0, guint x1, guint y0, guint y1); /* generic machine */ gboolean ags_functional_test_util_machine_move_up(guint nth_machine); gboolean ags_functional_test_util_machine_move_down(guint nth_machine); gboolean ags_functional_test_util_machine_hide(guint nth_machine); gboolean ags_functional_test_util_machine_show(guint nth_machine); gboolean ags_functional_test_util_machine_destroy(guint nth_machine); gboolean ags_functional_test_util_machine_rename_open(guint nth_machine); gboolean ags_functional_test_util_machine_rename_close(guint nth_machine); gboolean ags_functional_test_util_machine_rename_set_name(guint nth_machine, gchar *name); GtkWidget* ags_functional_test_util_get_line_editor(GtkWidget *machine_editor, guint nth_pad, guint nth_audio_channel, gboolean is_output); gboolean ags_functional_test_util_machine_properties_open(guint nth_machine); gboolean ags_functional_test_util_machine_properties_click_tab(guint nth_machine, guint nth_tab); gboolean ags_functional_test_util_machine_properties_click_enable(guint nth_machine); gboolean ags_functional_test_util_machine_properties_link_set(guint nth_machine, guint pad, guint audio_channel, gchar *link_name, guint link_nth_line); gboolean ags_functional_test_util_machine_properties_link_open(guint nth_machine, guint pad, guint audio_channel); gboolean ags_functional_test_util_machine_properties_effect_add(guint nth_machine, guint pad, guint audio_channel); gboolean ags_functional_test_util_machine_properties_effect_remove(guint nth_machine, guint pad, guint audio_channel, guint nth_effect); gboolean ags_functional_test_util_machine_properties_effect_plugin_type(guint nth_machine, guint pad, guint audio_channel, gchar *plugin_type); gboolean ags_functional_test_util_machine_properties_ladspa_filename(guint nth_machine, guint pad, guint audio_channel, gchar *filename); gboolean ags_functional_test_util_machine_properties_ladspa_effect(guint nth_machine, guint pad, guint audio_channel, gchar *effect); gboolean ags_functional_test_util_machine_properties_lv2_filename(guint nth_machine, guint pad, guint audio_channel, gchar *filename); gboolean ags_functional_test_util_machine_properties_lv2_effect(guint nth_machine, guint pad, guint audio_channel, gchar *effect); gboolean ags_functional_test_util_machine_properties_bulk_add(guint nth_machine); gboolean ags_functional_test_util_machine_properties_bulk_remove(guint nth_machine, guint nth_bulk); gboolean ags_functional_test_util_machine_properties_bulk_link(guint nth_machine, guint nth_bulk, gchar *link); gboolean ags_functional_test_util_machine_properties_bulk_first_line(guint nth_machine, guint nth_bulk, guint first_line); gboolean ags_functional_test_util_machine_properties_bulk_link_line(guint nth_machine, guint nth_bulk, guint first_link_line); gboolean ags_functional_test_util_machine_properties_bulk_count(guint nth_machine, guint nth_bulk, guint count); gboolean ags_functional_test_util_machine_properties_resize_audio_channels(guint nth_machine, guint audio_channels); gboolean ags_functional_test_util_machine_properties_resize_inputs(guint nth_machine, guint inputs); gboolean ags_functional_test_util_machine_properties_resize_outputs(guint nth_machine, guint outputs); gboolean ags_functional_test_util_machine_edit_copy(guint nth_machine); /* line member */ gboolean ags_functional_test_util_line_member_set_toggled(gchar *specifier, gboolean is_toggled); gboolean ags_functional_test_util_line_member_set_value(gchar *specifier, gdouble value); /* audio connection */ gboolean ags_functional_test_util_machine_audio_connection_click_tab(guint nth_machine, guint nth_tab); gboolean ags_functional_test_util_machine_audio_connection_click_enable(guint nth_machine); gboolean ags_functional_test_util_machine_audio_connection_set_device(guint nth_machine, guint pad, guint audio_channel, gchar *device); gboolean ags_functional_test_util_machine_audio_connection_set_line(guint nth_machine, uint pad, guint audio_channel, guint line); gboolean ags_functional_test_util_machine_audio_connection_bulk_add(guint nth_machine); gboolean ags_functional_test_util_machine_audio_connection_bulk_remove(guint nth_machine, guint nth_bulk); gboolean ags_functional_test_util_machine_audio_connection_bulk_first_line(guint nth_machine, guint nth_bulk, guint first_line); gboolean ags_functional_test_util_machine_audio_connection_bulk_count(guint nth_machine, guint nth_bulk, guint count); gboolean ags_functional_test_util_machine_audio_connection_bulk_device(guint nth_machine, guint nth_bulk, gchar *device); /* midi connection */ gboolean ags_functional_test_util_machine_midi_connection_midi_channel(guint nth_machine, guint midi_channel); gboolean ags_functional_test_util_machine_midi_connection_audio_start_mapping(guint nth_machine, guint audio_start_mapping); gboolean ags_functional_test_util_machine_midi_connection_audio_end_mapping(guint nth_machine, guint audio_end_mapping); gboolean ags_functional_test_util_machine_midi_connection_midi_start_mapping(guint nth_machine, guint midi_start_mapping); gboolean ags_functional_test_util_machine_midi_connection_midi_end_mapping(guint nth_machine, guint midi_end_mapping); gboolean ags_functional_test_util_machine_midi_connection_midi_device(guint nth_machine, gchar *device); /* generic pad */ gboolean ags_functional_test_util_pad_group(guint nth_machine, guint nth_pad); gboolean ags_functional_test_util_pad_mute(guint nth_machine, guint nth_pad); gboolean ags_functional_test_util_pad_solo(guint nth_machine, guint nth_pad); gboolean ags_functional_test_util_pad_play(guint nth_machine, guint nth_pad); /* generic line */ gboolean ags_functional_test_util_expander(guint nth_machine, guint nth_pad, guint nth_audio_channel); /* generic effect bulk */ gboolean ags_functional_test_util_effect_bulk_add(guint nth_machine); gboolean ags_functional_test_util_effect_bulk_remove(guint nth_machine, guint nth_bulk_effect); gboolean ags_functional_test_util_effect_bulk_ladspa_filename(guint nth_machine, gchar *filename); gboolean ags_functional_test_util_effect_bulk_ladspa_effect(guint nth_machine, gchar *effect); gboolean ags_functional_test_util_effect_bulk_lv2_filename(guint nth_machine, gchar *filename); gboolean ags_functional_test_util_effect_bulk_lv2_effect(guint nth_machine, gchar *effect); /* panel */ gboolean ags_functional_test_util_panel_mute_line(guint nth_machine, guint nth_pad, guint nth_audio_channel); /* mixer input line */ gboolean ags_functional_test_util_mixer_input_line_volume(guint nth_machine, guint nth_pad, guint nth_audio_channel, gdouble volume); /* drum */ gboolean ags_functional_test_util_drum_open(guint nth_machine); gboolean ags_functional_test_util_drum_run(guint nth_machine); gboolean ags_functional_test_util_drum_loop(guint nth_machine); gboolean ags_functional_test_util_drum_bank_0(guint nth_machine, guint bank_0); gboolean ags_functional_test_util_drum_bank_1(guint nth_machine, guint bank_1); gboolean ags_functional_test_util_drum_length(guint nth_machine, guint length); gboolean ags_functional_test_util_drum_index(guint nth_machine, guint nth_radio); gboolean ags_functional_test_util_drum_pad(guint nth_machine, guint nth_pad); /* drum input pad */ gboolean ags_functional_test_util_drum_pad_open(guint nth_machine, guint nth_pad); gboolean ags_functional_test_util_drum_pad_edit(guint nth_machine, guint nth_pad); /* drum input line */ gboolean ags_functional_test_util_drum_input_line_volume(guint nth_machine, guint nth_pad, guint nth_audio_channel, gdouble volume); /* matrix */ gboolean ags_functional_test_util_matrix_run(guint nth_machine); gboolean ags_functional_test_util_matrix_loop(guint nth_machine); gboolean ags_functional_test_util_matrix_bank_1(guint nth_machine, guint bank_1); gboolean ags_functional_test_util_matrix_length(guint nth_machine, guint length); gboolean ags_functional_test_util_matrix_gutter(guint nth_machine, guint nth_gutter); gboolean ags_functional_test_util_drum_cell(guint nth_machine, guint x, guint y); /* synth */ gboolean ags_functional_test_util_synth_auto_update(guint nth_machine); gboolean ags_functional_test_util_synth_update(guint nth_machine); gboolean ags_functional_test_util_oscillator_wave(guint nth_machine, guint nth_oscillator, gchar *wave); gboolean ags_functional_test_util_oscillator_phase(guint nth_machine, guint nth_oscillator, gdouble phase); gboolean ags_functional_test_util_oscillator_attack(guint nth_machine, guint nth_oscillator, gdouble attack); gboolean ags_functional_test_util_oscillator_frequency(guint nth_machine, guint nth_oscillator, gdouble frequency); gboolean ags_functional_test_util_oscillator_length(guint nth_machine, guint nth_oscillator, gdouble length); gboolean ags_functional_test_util_oscillator_volume(guint nth_machine, guint nth_oscillator, gdouble volume); /* ffplayer */ gboolean ags_functional_test_util_ffplayer_open(guint nth_machine); gboolean ags_functional_test_util_ffplayer_preset(guint nth_machine, gchar *preset); gboolean ags_functional_test_util_ffplayer_instrument(guint nth_machine, gchar *instrument); #endif /*__AGS_FUNCTIONAL_TEST_UTIL_H__*/ gsequencer-1.4.24/ags/test/X/ags_functional_test_util.c0000644000175000017500000033313713247044247020101 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #define AGS_FUNCTIONAL_TEST_UTIL_REACTION_TIME (1000000) #define AGS_FUNCTIONAL_TEST_UTIL_REACTION_TIME_LONG (2000000) gboolean ags_functional_test_util_driver_prepare(GSource *source, gint *timeout_); gboolean ags_functional_test_util_driver_check(GSource *source); gboolean ags_functional_test_util_driver_dispatch(GSource *source, GSourceFunc callback, gpointer user_data); void* ags_functional_test_util_add_test_thread(void *ptr); void* ags_functional_test_util_do_run_thread(void *ptr); pthread_t *ags_functional_test_util_thread = NULL; extern AgsApplicationContext *ags_application_context; extern AgsMutexManager *ags_mutex_manager; extern AgsLadspaManager *ags_ladspa_manager; extern AgsDssiManager *ags_dssi_manager; extern AgsLv2Manager *ags_lv2_manager; extern AgsLv2uiManager *ags_lv2ui_manager; AgsTaskThread *task_thread; AgsGuiThread *gui_thread; struct _AddTest{ AgsFunctionalTestUtilAddTest add_test; volatile gboolean *is_available; }; struct timespec ags_functional_test_util_default_timeout = { 59, 0, }; gboolean ags_functional_test_util_driver_prepare(GSource *source, gint *timeout_) { if(timeout_ != NULL){ *timeout_ = -1; } return(TRUE); } gboolean ags_functional_test_util_driver_check(GSource *source) { return(TRUE); } gboolean ags_functional_test_util_driver_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) { g_main_context_iteration(g_main_context_default(), FALSE); pthread_mutex_unlock(ags_test_get_driver_mutex()); usleep(4000); pthread_mutex_lock(ags_test_get_driver_mutex()); g_main_context_iteration(g_main_context_default(), FALSE); return(G_SOURCE_CONTINUE); } pthread_t* ags_functional_test_util_self() { return(ags_functional_test_util_thread); } void* ags_functional_test_util_add_test_thread(void *ptr) { struct _AddTest *test; ags_functional_test_util_thread = pthread_self(); test = ptr; while(!g_atomic_int_get(test->is_available)){ usleep(12500); } test->add_test(); pthread_exit(NULL); } void ags_functional_test_util_add_test(AgsFunctionalTestUtilAddTest add_test, volatile gboolean *is_available) { struct _AddTest *test; pthread_t thread; test = (struct _AddTest *) malloc(sizeof(struct _AddTest)); test->add_test = add_test; test->is_available = is_available; pthread_create(&thread, NULL, ags_functional_test_util_add_test_thread, test); } void ags_functional_test_util_notify_add_test(volatile gboolean *is_available) { g_atomic_int_set(is_available, TRUE); } void* ags_functional_test_util_do_run_thread(void *ptr) { AgsXorgApplicationContext *xorg_application_context; volatile gboolean *is_available; xorg_application_context = (AgsXorgApplicationContext *) ags_application_context_get_instance(); is_available = ptr; while(g_atomic_int_get(&(xorg_application_context->gui_ready)) == 0){ usleep(500000); } ags_xorg_application_context_setup(xorg_application_context); // g_atomic_int_set(&(xorg_application_context->gui_ready), // FALSE); /* */ while(g_atomic_int_get(&(xorg_application_context->show_animation))){ usleep(500000); } usleep(1000000); /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); ags_functional_test_util_notify_add_test(is_available); pthread_exit(NULL); } void ags_functional_test_util_do_run(int argc, char **argv, AgsFunctionalTestUtilAddTest add_test, volatile gboolean *is_available) { AgsApplicationContext *application_context; AgsLog *log; pthread_t thread; pthread_mutex_t *mutex; GSource *driver_source; GSourceFuncs driver_funcs; /* application context */ application_context = ags_application_context = (AgsApplicationContext *) ags_xorg_application_context_new(); g_object_ref(application_context); application_context->argc = argc; application_context->argv = argv; log = ags_log_get_instance(); ags_log_add_message(log, "Welcome to Advanced Gtk+ Sequencer - Test"); ags_functional_test_util_add_test(add_test, is_available); /* application context */ mutex = ags_test_get_driver_mutex(); pthread_mutex_lock(mutex); pthread_create(&thread, NULL, ags_functional_test_util_do_run_thread, is_available); driver_funcs.prepare = ags_functional_test_util_driver_prepare; driver_funcs.check = ags_functional_test_util_driver_check; driver_funcs.dispatch = ags_functional_test_util_driver_dispatch; driver_funcs.finalize = NULL; driver_source = g_source_new(&driver_funcs, sizeof(GSource)); g_source_attach(driver_source, g_main_context_default()); ags_application_context_prepare(application_context); } void ags_functional_test_util_clear_application_context() { ags_application_context = NULL; // ags_mutex_manager = NULL; // ags_ladspa_manager = NULL; // ags_dssi_manager = NULL; // ags_lv2_manager = NULL; // ags_lv2ui_manager = NULL; } void ags_functional_test_util_setup_and_launch() { gchar *start_arg[] = { "./gsequencer\0" }; gboolean success; ags_functional_test_util_clear_application_context(); ags_test_setup(1, start_arg); /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); /* launch application */ ags_test_launch(FALSE); /* do the work */ while(g_atomic_int_get(&(AGS_XORG_APPLICATION_CONTEXT(ags_application_context)->gui_ready)) == 0){ usleep(500000); } usleep(10000000); } void ags_functional_test_util_setup_and_launch_filename(gchar *filename) { gchar *start_arg[] = { "./gsequencer\0", "--filename\0", filename, }; gboolean success; ags_functional_test_util_clear_application_context(); ags_test_setup(3, start_arg); /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); /* launch application */ ags_test_launch_filename(filename, FALSE); /* do the work */ while(g_atomic_int_get(&(AGS_XORG_APPLICATION_CONTEXT(ags_application_context)->gui_ready)) == 0){ usleep(500000); } usleep(10000000); } void ags_functional_test_util_reaction_time() { usleep(AGS_FUNCTIONAL_TEST_UTIL_REACTION_TIME); } void ags_functional_test_util_reaction_time_long() { usleep(AGS_FUNCTIONAL_TEST_UTIL_REACTION_TIME_LONG); } void ags_functional_test_util_idle() { usleep(5000000); } void ags_functional_test_util_idle_condition_and_timeout(AgsFunctionalTestUtilIdleCondition idle_condition, struct timespec *timeout, gpointer data) { struct timespec start_time, current_time; clock_gettime(CLOCK_MONOTONIC, &start_time); while(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(idle_condition)(data)){ ags_functional_test_util_reaction_time(); clock_gettime(CLOCK_MONOTONIC, ¤t_time); if(start_time.tv_sec + timeout->tv_sec < current_time.tv_sec){ break; } } ags_functional_test_util_reaction_time(); } gboolean ags_functional_test_util_idle_test_widget_visible(GtkWidget **widget) { gboolean do_idle; do_idle = TRUE; ags_test_enter(); if(*widget != NULL && GTK_IS_WIDGET(*widget) && GTK_WIDGET_VISIBLE(*widget)){ do_idle = FALSE; } ags_test_leave(); return(do_idle); } gboolean ags_functional_test_util_idle_test_widget_hidden(GtkWidget **widget) { gboolean do_idle; do_idle = TRUE; ags_test_enter(); if(*widget != NULL && GTK_IS_WIDGET(*widget) && !GTK_WIDGET_VISIBLE(*widget)){ do_idle = FALSE; } ags_test_leave(); return(do_idle); } gboolean ags_functional_test_util_idle_test_null(GtkWidget **widget) { gboolean do_idle; do_idle = TRUE; ags_test_enter(); if(*widget == NULL){ do_idle = FALSE; } ags_test_leave(); return(do_idle); } gboolean ags_functional_test_util_idle_test_container_children_count(AgsFunctionalTestUtilContainerTest *container_test) { gboolean do_idle; do_idle = TRUE; ags_test_enter(); if(*(container_test->container) != NULL && GTK_IS_CONTAINER(*(container_test->container))){ GList *list; list = gtk_container_get_children(*(container_test->container)); if(g_list_length(list) == container_test->count){ do_idle = FALSE; } g_list_free(list); } ags_test_leave(); return(do_idle); } void ags_functional_test_util_leave(GtkWidget *window) { if(!GTK_IS_WINDOW(window)){ return; } ags_test_enter(); gdk_window_destroy(gtk_widget_get_window(window)); ags_test_leave(); ags_functional_test_util_reaction_time_long(); } GtkMenu* ags_functional_test_util_submenu_find(GtkMenu *menu, gchar *item_label) { GtkMenu *submenu; GList *list_start, *list; gchar *str; if(!GTK_IS_MENU(menu) || item_label == NULL){ return(NULL); } ags_test_enter(); list = list_start = gtk_container_get_children(menu); submenu = NULL; while(list != NULL){ if(GTK_IS_MENU_ITEM(list->data)){ str = NULL; g_object_get(list->data, "label\0", &str, NULL); if(!g_ascii_strcasecmp(str, item_label)){ g_object_get(list->data, "submenu\0", &submenu, NULL); break; } } list = list->next; } g_list_free(list_start); ags_test_leave(); return(submenu); } gboolean ags_functional_test_util_menu_bar_click(gchar *item_label) { AgsXorgApplicationContext *xorg_application_context; GtkMenuBar *menu_bar; GList *list_start, *list; gchar *str; gboolean success; if(item_label == NULL){ return(FALSE); } ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); menu_bar = xorg_application_context->window->menu_bar; list = list_start = gtk_container_get_children(menu_bar); success = FALSE; ags_test_leave(); while(list != NULL){ if(GTK_IS_MENU_ITEM(list->data)){ str = NULL; g_object_get(list->data, "label\0", &str, NULL); if(!g_ascii_strcasecmp(str, item_label)){ GtkWidget *widget; GdkWindow *window; GdkEvent *event_motion; struct timespec spec; gint x, y; gint origin_x, origin_y; widget = GTK_WIDGET(list->data); if(!GTK_WIDGET_REALIZED(widget)){ ags_functional_test_util_reaction_time_long(); } /* */ ags_test_enter(); x = widget->allocation.x + widget->allocation.width / 2.0; y = widget->allocation.y + widget->allocation.height / 2.0; window = gtk_widget_get_window(widget); x = widget->allocation.x; y = widget->allocation.y; gdk_window_get_origin(window, &origin_x, &origin_y); gdk_display_warp_pointer(gtk_widget_get_display(widget), gtk_widget_get_screen(widget), origin_x + x + 15, origin_y + y + 5); ags_test_leave(); /* */ ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_PRESS); ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_RELEASE); ags_functional_test_util_reaction_time(); /* */ ags_test_enter(); g_signal_emit_by_name(widget, "activate-item\0"); ags_test_leave(); success = TRUE; break; } } list = list->next; } g_list_free(list_start); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_menu_click(GtkMenu *menu, gchar *item_label) { GList *list_start, *list; gchar *str; gboolean success; if(menu == NULL || item_label == NULL || !GTK_IS_MENU(menu)){ return(FALSE); } ags_test_enter(); list = list_start = gtk_container_get_children(menu); success = FALSE; ags_test_leave(); while(list != NULL){ if(GTK_IS_MENU_ITEM(list->data)){ str = NULL; g_object_get(list->data, "label\0", &str, NULL); if(!g_ascii_strcasecmp(str, item_label)){ GtkWidget *widget; GdkWindow *window; gint x, y; gint origin_x, origin_y; widget = GTK_WIDGET(list->data); if(!GTK_WIDGET_REALIZED(widget)){ ags_functional_test_util_reaction_time_long(); } /* */ ags_test_enter(); window = gtk_widget_get_window(widget); x = widget->allocation.x + widget->allocation.width / 2.0; y = widget->allocation.y + widget->allocation.height / 2.0; gdk_window_get_origin(window, &origin_x, &origin_y); gdk_display_warp_pointer(gtk_widget_get_display(widget), gtk_widget_get_screen(widget), origin_x + x + 15, origin_y + y + 5); ags_test_leave(); ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_PRESS); ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_RELEASE); ags_functional_test_util_reaction_time(); success = TRUE; /* */ ags_test_enter(); g_signal_emit_by_name(widget, "activate-item\0"); ags_test_leave(); break; } } list = list->next; } g_list_free(list_start); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_combo_box_click(GtkComboBox *combo_box, guint nth) { GtkWidget *widget; GdkWindow *window; gint x, y; gint origin_x, origin_y; if(combo_box == NULL || !GTK_IS_COMBO_BOX(combo_box)){ return(FALSE); } widget = combo_box; if(!GTK_WIDGET_REALIZED(widget)){ ags_functional_test_util_reaction_time_long(); } /* */ ags_test_enter(); window = gtk_widget_get_window(widget); x = widget->allocation.x + widget->allocation.width / 2.0; y = widget->allocation.y + widget->allocation.height / 2.0; gdk_window_get_origin(window, &origin_x, &origin_y); gdk_display_warp_pointer(gtk_widget_get_display(widget), gtk_widget_get_screen(widget), origin_x + x + 15, origin_y + y + 5); ags_test_leave(); /* ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_PRESS); ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_RELEASE); ags_functional_test_util_reaction_time(); */ /* */ ags_test_enter(); gtk_combo_box_set_active(combo_box, nth); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_button_click(GtkButton *button) { GtkWidget *widget; GdkWindow *window; gint x, y; gint origin_x, origin_y; if(button == NULL || !GTK_IS_BUTTON(button)){ return(FALSE); } widget = button; if(!GTK_WIDGET_REALIZED(widget)){ ags_functional_test_util_reaction_time_long(); } /* */ ags_test_enter(); window = gtk_widget_get_window(widget); x = widget->allocation.x + widget->allocation.width / 2.0; y = widget->allocation.y + widget->allocation.height / 2.0; gdk_window_get_origin(window, &origin_x, &origin_y); gdk_display_warp_pointer(gtk_widget_get_display(widget), gtk_widget_get_screen(widget), origin_x + x + 15, origin_y + y + 5); ags_test_leave(); /* */ ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_PRESS); ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_RELEASE); ags_functional_test_util_reaction_time(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_menu_tool_button_click(GtkButton *button) { GtkWidget *widget; GtkWidget *arrow_button = NULL; GdkWindow *window; gint x, y; gint origin_x, origin_y; if(button == NULL || !GTK_IS_MENU_TOOL_BUTTON(button)){ return(FALSE); } widget = button; if(arrow_button == NULL){ arrow_button = gtk_container_get_children(gtk_bin_get_child(button))->next->data; } if(!GTK_WIDGET_REALIZED(widget)){ ags_functional_test_util_reaction_time_long(); } ags_test_enter(); window = gtk_widget_get_window(widget); x = widget->allocation.x + widget->allocation.width - (arrow_button->allocation.width / 2.0); y = widget->allocation.y + widget->allocation.height - (arrow_button->allocation.height / 2.0); gdk_window_get_origin(window, &origin_x, &origin_y); gdk_display_warp_pointer(gtk_widget_get_display(widget), gtk_widget_get_screen(widget), origin_x + x, origin_y + y); ags_test_leave(); ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_PRESS); ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x + 5, y + 5, 1, GDK_BUTTON1_MASK, GDK_BUTTON_RELEASE); ags_functional_test_util_reaction_time_long(); #if 0 /* */ ags_test_enter(); g_signal_emit_by_name(widget, "clicked\0"); ags_test_leave(); ags_functional_test_util_idle(); /* */ ags_test_enter(); gtk_menu_popup(gtk_menu_tool_button_get_menu(widget), NULL, NULL, NULL, widget, 1, gtk_get_current_event_time()); ags_test_leave(); ags_functional_test_util_reaction_time_long(); #endif return(TRUE); } gboolean ags_functional_test_util_dialog_apply(GtkDialog *dialog) { if(!GTK_IS_DIALOG(dialog)){ return(FALSE); } ags_test_enter(); gtk_dialog_response(dialog, GTK_RESPONSE_APPLY); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_dialog_ok(GtkDialog *dialog) { GtkButton *ok_button; GList *list_start, *list; gboolean success; if(!GTK_IS_DIALOG(dialog)){ return(FALSE); } ags_test_enter(); ok_button = NULL; list_start = list = gtk_container_get_children(gtk_dialog_get_action_area(dialog)); while(list != NULL){ if(!g_strcmp0(GTK_STOCK_OK, gtk_button_get_label(list->data))){ ok_button = list->data; break; } list = list->next; } ags_test_leave(); g_list_free(list_start); if(ok_button == NULL){ return(FALSE); } success = ags_functional_test_util_button_click(ok_button); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_dialog_cancel(GtkDialog *dialog) { GtkButton *cancel_button; GList *list_start, *list; gboolean success; if(!GTK_IS_DIALOG(dialog)){ return(FALSE); } ags_test_enter(); cancel_button = NULL; list_start = list = gtk_container_get_children(gtk_dialog_get_action_area(dialog)); while(list != NULL){ if(!g_strcmp0(GTK_STOCK_CANCEL, gtk_button_get_label(list->data))){ cancel_button = list->data; break; } list = list->next; } ags_test_leave(); g_list_free(list_start); if(cancel_button == NULL){ return(FALSE); } success = ags_functional_test_util_button_click(cancel_button); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_file_chooser_open_path(GtkFileChooser *file_chooser, gchar *path) { if(file_chooser == NULL || path == NULL || !GTK_IS_FILE_CHOOSER(file_chooser)){ return(FALSE); } ags_test_enter(); gtk_file_chooser_set_current_folder(file_chooser, path); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_file_chooser_select_filename(GtkFileChooser *file_chooser, gchar *filename) { if(file_chooser == NULL || filename == NULL || !GTK_IS_FILE_CHOOSER(file_chooser)){ return(FALSE); } ags_test_enter(); gtk_file_chooser_select_filename(file_chooser, filename); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_file_chooser_select_filenames(GtkFileChooser *file_chooser, GSList *filename) { if(file_chooser == NULL || filename == NULL || !GTK_IS_FILE_CHOOSER(file_chooser)){ return(FALSE); } ags_test_enter(); while(filename != NULL){ gtk_file_chooser_select_filename(file_chooser, filename->data); filename = filename->next; } ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_file_chooser_select_all(GtkFileChooser *file_chooser) { if(file_chooser == NULL || !GTK_IS_FILE_CHOOSER(file_chooser)){ return(FALSE); } ags_test_enter(); gtk_file_chooser_select_all(file_chooser); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_file_default_window_resize() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; gdk_window_move_resize(gtk_widget_get_window(window), 64, 0, 1920 - 128, 1080 - 64); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_file_default_editor_resize() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; GtkPaned *main_paned; GtkPaned *editor_paned; GdkRectangle allocation; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; main_paned = window->paned; editor_paned = notation_editor->paned; gtk_paned_set_position(main_paned, (1080 - 64) * (2.0 / 3.0)); gtk_paned_set_position(editor_paned, (1920 - 128) / 6); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_open() { AgsXorgApplicationContext *xorg_application_context; GtkMenu *menu; gboolean success; if(!ags_functional_test_util_menu_bar_click(GTK_STOCK_FILE)){ return(FALSE); } ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); menu = xorg_application_context->window->menu_bar->file; success = ags_functional_test_util_menu_click(menu, "open\0"); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_save() { AgsXorgApplicationContext *xorg_application_context; GtkMenu *menu; gboolean success; if(!ags_functional_test_util_menu_bar_click(GTK_STOCK_FILE)){ return(FALSE); } ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); menu = xorg_application_context->window->menu_bar->file; success = ags_functional_test_util_menu_click(menu, "save\0"); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_save_as() { AgsXorgApplicationContext *xorg_application_context; GtkMenu *menu; gboolean success; if(!ags_functional_test_util_menu_bar_click(GTK_STOCK_FILE)){ return(FALSE); } ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); menu = xorg_application_context->window->menu_bar->file; success = ags_functional_test_util_menu_click(menu, "save as\0"); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_export_open() { AgsXorgApplicationContext *xorg_application_context; GtkWidget *export_window; GtkMenu *menu; gboolean success; if(!ags_functional_test_util_menu_bar_click(GTK_STOCK_FILE)){ return(FALSE); } ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); menu = xorg_application_context->window->menu_bar->file; export_window = xorg_application_context->window->export_window; ags_test_leave(); success = ags_functional_test_util_menu_click(menu, "export\0"); ags_functional_test_util_reaction_time_long(); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_widget_visible), &ags_functional_test_util_default_timeout, &export_window); return(success); } gboolean ags_functional_test_util_export_close() { AgsXorgApplicationContext *xorg_application_context; GtkWidget *export_window; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); export_window = xorg_application_context->window->export_window; ags_test_leave(); success = ags_functional_test_util_dialog_close(export_window); ags_functional_test_util_reaction_time_long(); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_widget_hidden), &ags_functional_test_util_default_timeout, &export_window); return(success); } gboolean ags_funcitonal_test_util_export_add() { AgsXorgApplicationContext *xorg_application_context; AgsExportWindow *export_window; GtkButton *add_button; AgsFunctionalTestUtilContainerTest container_test; GList *list_start; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); export_window = xorg_application_context->window->export_window; add_button = export_window->add; container_test.container = &(export_window->export_soundcard); list_start = gtk_container_get_children(export_window->export_soundcard); container_test.count = g_list_length(list_start) + 1; ags_test_leave(); g_list_free(list_start); success = ags_functional_test_util_button_click(add_button); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_container_children_count), &ags_functional_test_util_default_timeout, &container_test); return(success); } gboolean ags_funcitonal_test_util_export_tact(gdouble tact) { AgsXorgApplicationContext *xorg_application_context; AgsExportWindow *export_window; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); export_window = xorg_application_context->window->export_window; gtk_spin_button_set_value(export_window->tact, tact); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_funcitonal_test_util_export_remove(guint nth) { AgsXorgApplicationContext *xorg_application_context; AgsExportWindow *export_window; GtkButton *remove_button; AgsFunctionalTestUtilContainerTest container_test; GList *list_start, *list; guint i; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); export_window = xorg_application_context->window->export_window; container_test.container = &(export_window->export_soundcard); list_start = gtk_container_get_children(export_window->export_soundcard); success = FALSE; if(list_start != NULL){ remove_button = NULL; list = list_start; container_test.count = g_list_length(list_start) - 1; for(i = 0; list != NULL; i++){ if(i == nth){ GtkHBox *hbox; GList *tmp_start; hbox = GTK_HBOX(list->data); tmp_start = gtk_container_get_children(hbox); remove_button = gtk_bin_get_child(tmp_start->next->data); g_list_free(tmp_start); success = TRUE; break; } list = list->next; } g_list_free(list_start); ags_test_leave(); g_list_free(list); if(!success){ return(FALSE); } success = ags_functional_test_util_button_click(remove_button); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_container_children_count), &ags_functional_test_util_default_timeout, &container_test); } return(success); } gboolean ags_funcitonal_test_util_export_set_backend(guint nth, gchar *backend) { AgsXorgApplicationContext *xorg_application_context; AgsExportWindow *export_window; GList *list_start, *list; guint i; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); export_window = xorg_application_context->window->export_window; list_start = list = gtk_container_get_children(export_window->export_soundcard); success = FALSE; for(i = 0; list != NULL; i++){ if(i == nth){ AgsExportSoundcard *export_soundcard; GtkHBox *hbox; GtkTreeModel *model; GtkTreeIter iter; GList *tmp_start; gchar *value; guint active; hbox = GTK_HBOX(list->data); tmp_start = gtk_container_get_children(hbox); export_soundcard = AGS_EXPORT_SOUNDCARD(tmp_start->data); g_list_free(tmp_start); model = gtk_combo_box_get_model(GTK_COMBO_BOX(export_soundcard->backend)); active = 0; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(backend, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) export_soundcard->backend, &iter); success = TRUE; break; } }while(gtk_tree_model_iter_next(model, &iter)); } break; } list = list->next; } g_list_free(list_start); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_funcitonal_test_util_export_set_device(guint nth, gchar *device) { AgsXorgApplicationContext *xorg_application_context; AgsExportWindow *export_window; GList *list_start, *list; guint i; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); export_window = xorg_application_context->window->export_window; list_start = list = gtk_container_get_children(export_window->export_soundcard); success = FALSE; for(i = 0; list != NULL; i++){ if(i == nth){ AgsExportSoundcard *export_soundcard; GtkHBox *hbox; GtkTreeModel *model; GtkTreeIter iter; GList *tmp_start; gchar *value; guint active; hbox = GTK_HBOX(list->data); tmp_start = gtk_container_get_children(hbox); export_soundcard = AGS_EXPORT_SOUNDCARD(tmp_start->data); g_list_free(tmp_start); model = gtk_combo_box_get_model(GTK_COMBO_BOX(export_soundcard->card)); active = 0; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(device, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) export_soundcard->card, &iter); success = TRUE; break; } }while(gtk_tree_model_iter_next(model, &iter)); } break; } list = list->next; } g_list_free(list_start); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_funcitonal_test_util_export_set_filename(guint nth, gchar *filename) { AgsXorgApplicationContext *xorg_application_context; AgsExportWindow *export_window; GList *list_start, *list; guint i; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); export_window = xorg_application_context->window->export_window; list_start = list = gtk_container_get_children(export_window->export_soundcard); success = FALSE; for(i = 0; list != NULL; i++){ if(i == nth){ AgsExportSoundcard *export_soundcard; GtkHBox *hbox; GList *tmp_start; hbox = GTK_HBOX(list->data); tmp_start = gtk_container_get_children(hbox); export_soundcard = AGS_EXPORT_SOUNDCARD(tmp_start->data); g_list_free(tmp_start); gtk_entry_set_text(export_soundcard->filename, filename); success = TRUE; break; } list = list->next; } g_list_free(list_start); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_funcitonal_test_util_export_open(guint nth) { //TODO:JK: } gboolean ags_funcitonal_test_util_export_set_format(guint nth, gchar *format) { //TODO:JK: } gboolean ags_funcitonal_test_util_export_do_export(guint nth, gchar *format) { //TODO:JK: } gboolean ags_functional_test_util_quit() { //TODO:JK: } gboolean ags_functional_test_util_add_machine(gchar *submenu, gchar *machine_name) { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsMenuBar *menu_bar; AgsMachine *machine; GtkMenu *add_menu; GList *list_start; AgsFunctionalTestUtilContainerTest container_test; gboolean success; if(machine_name == NULL){ return(FALSE); } if(!ags_functional_test_util_menu_bar_click(GTK_STOCK_EDIT)){ return(FALSE); } ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; menu_bar = window->menu_bar; container_test.container = &(window->machines); list_start = gtk_container_get_children(window->machines); ags_test_leave(); container_test.count = g_list_length(list_start) + 1; success = FALSE; success = ags_functional_test_util_menu_click(menu_bar->edit, GTK_STOCK_ADD); if(!success){ return(FALSE); } add_menu = ags_functional_test_util_submenu_find(menu_bar->edit, GTK_STOCK_ADD); if(submenu == NULL){ success = ags_functional_test_util_menu_click(add_menu, machine_name); }else{ GtkMenu *bridge_menu; bridge_menu = ags_functional_test_util_submenu_find(add_menu, submenu); success = ags_functional_test_util_menu_click(bridge_menu, machine_name); } if(success){ ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_container_children_count), &ags_functional_test_util_default_timeout, &container_test); ags_functional_test_util_reaction_time_long(); ags_test_enter(); list_start = gtk_container_get_children(window->machines); machine = g_list_nth_data(list_start, container_test.count - 1); ags_test_leave(); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_widget_visible), &ags_functional_test_util_default_timeout, &machine); } return(success); } gboolean ags_functional_test_util_automation_open() { //TODO:JK: } gboolean ags_functional_test_util_automation_close() { //TODO:JK: } gboolean ags_functional_test_util_preferences_open() { //TODO:JK: } gboolean ags_functional_test_util_preferences_close() { //TODO:JK: } gboolean ags_functional_test_util_about_open() { //TODO:JK: } gboolean ags_functional_test_util_about_close() { //TODO:JK: } gboolean ags_functional_test_util_navigation_expand() { //TODO:JK: } gboolean ags_functional_test_util_navigation_bpm(gdouble bpm) { //TODO:JK: } gboolean ags_functional_test_util_navigation_rewind() { //TODO:JK: } gboolean ags_functional_test_util_navigation_prev() { //TODO:JK: } gboolean ags_functional_test_util_navigation_play() { //TODO:JK: } gboolean ags_functional_test_util_navigation_stop() { //TODO:JK: } gboolean ags_functional_test_util_navigation_next() { //TODO:JK: } gboolean ags_functional_test_util_navigation_forward() { //TODO:JK: } gboolean ags_functional_test_util_navigation_loop() { //TODO:JK: } gboolean ags_functional_test_util_navigation_position(gdouble position) { //TODO:JK: } gboolean ags_functional_test_util_navigation_loop_left(gdouble loop_left) { //TODO:JK: } gboolean ags_functional_test_util_navigation_loop_right(gdouble loop_right) { //TODO:JK: } gboolean ags_functional_test_util_navigation_exclude_sequencers() { //TODO:JK: } gboolean ags_functional_test_util_notation_toolbar_cursor_click() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkButton *position; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; position = notation_toolbar->position; ags_test_leave(); success = ags_functional_test_util_button_click(position); return(success); } gboolean ags_functional_test_util_notation_toolbar_edit_click() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkButton *edit; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; edit = notation_toolbar->edit; ags_test_leave(); success = ags_functional_test_util_button_click(edit); return(success); } gboolean ags_functional_test_util_notation_toolbar_delete_click() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkButton *clear; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; clear = notation_toolbar->clear; ags_test_leave(); success = ags_functional_test_util_button_click(clear); return(success); } gboolean ags_functional_test_util_notation_toolbar_select_click() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkButton *select; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; select = notation_toolbar->select; ags_test_leave(); success = ags_functional_test_util_button_click(select); return(success); } gboolean ags_functional_test_util_notation_toolbar_invert_click() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkButton *invert; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; invert = notation_toolbar->invert; ags_test_leave(); success = ags_functional_test_util_button_click(invert); return(success); } gboolean ags_functional_test_util_notation_toolbar_paste_click() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkButton *paste; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; paste = notation_toolbar->paste_tool; ags_test_leave(); success = ags_functional_test_util_button_click(paste); return(success); } gboolean ags_functional_test_util_notation_toolbar_copy_click() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkButton *copy; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; copy = notation_toolbar->copy; ags_test_leave(); success = ags_functional_test_util_button_click(copy); return(success); } gboolean ags_functional_test_util_notation_toolbar_cut_click() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkButton *cut; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; cut = notation_toolbar->cut; ags_test_leave(); success = ags_functional_test_util_button_click(cut); return(success); } gboolean ags_functional_test_util_notation_toolbar_zoom(guint nth_zoom) { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkComboBox *zoom; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; zoom = notation_toolbar->zoom; ags_test_leave(); success = ags_functional_test_util_combo_box_click(zoom, nth_zoom); return(success); } gboolean ags_functional_test_util_machine_selector_select(guint nth_index) { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachineSelector *machine_selector; AgsMachineRadioButton *machine_radio_button; GList *list_start, *list; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; machine_selector = notation_editor->machine_selector; list_start = gtk_container_get_children(machine_selector); ags_test_leave(); list = g_list_nth(list_start, nth_index + 1); if(list == NULL){ return(FALSE); } machine_radio_button = list->data; g_list_free(list_start); success = ags_functional_test_util_button_click(machine_radio_button); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_selection_select(gchar *machine) { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachineSelector *machine_selector; AgsMachineSelection *machine_selection; GtkRadioButton *radio_button; GList *list_start, *list; gboolean success; if(machine == NULL){ return(FALSE); } ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; machine_selector = notation_editor->machine_selector; machine_selection = machine_selector->machine_selection; list = list_start = gtk_container_get_children(GTK_DIALOG(machine_selection)->vbox); success = FALSE; while(list != NULL){ if(GTK_IS_RADIO_BUTTON(list->data)){ gchar *str; str = gtk_button_get_label(GTK_BUTTON(list->data)); if(!g_ascii_strcasecmp(machine, str)){ radio_button = list->data; success = TRUE; break; } } list = list->next; } ags_test_leave(); g_list_free(list_start); if(!success){ return(FALSE); } success = ags_functional_test_util_button_click(radio_button); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_selection_remove_index() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachineSelector *machine_selector; GtkButton *menu_tool_button; GtkMenu *popup; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; machine_selector = notation_editor->machine_selector; menu_tool_button = machine_selector->menu_button; popup = machine_selector->popup; ags_test_leave(); success = ags_functional_test_util_menu_tool_button_click(menu_tool_button); if(!success){ return(FALSE); } ags_functional_test_util_reaction_time_long(); success = ags_functional_test_util_menu_click(popup, "remove index\0"); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_selection_add_index() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachineSelector *machine_selector; GtkButton *menu_tool_button; GtkMenu *popup; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; machine_selector = notation_editor->machine_selector; menu_tool_button = machine_selector->menu_button; popup = machine_selector->popup; ags_test_leave(); success = ags_functional_test_util_menu_tool_button_click(menu_tool_button); if(!success){ return(FALSE); } ags_functional_test_util_reaction_time_long(); success = ags_functional_test_util_menu_click(popup, "add index\0"); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_selection_link_index() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachineSelector *machine_selector; GtkButton *menu_tool_button; GtkMenu *popup; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; machine_selector = notation_editor->machine_selector; menu_tool_button = machine_selector->menu_button; popup = machine_selector->popup; ags_test_leave(); success = ags_functional_test_util_menu_tool_button_click(menu_tool_button); if(!success){ return(FALSE); } ags_functional_test_util_reaction_time_long(); success = ags_functional_test_util_menu_click(popup, "link index\0"); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_selection_reverse_mapping() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachineSelector *machine_selector; GtkButton *menu_tool_button; GtkMenu *popup; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; notation_editor = window->notation_editor; machine_selector = notation_editor->machine_selector; menu_tool_button = machine_selector->menu_button; popup = machine_selector->popup; ags_test_leave(); success = ags_functional_test_util_menu_tool_button_click(menu_tool_button); if(!success){ return(FALSE); } ags_functional_test_util_reaction_time_long(); success = ags_functional_test_util_menu_click(popup, "reverse mapping\0"); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_selection_shift_piano(guint nth_shift) { //TODO:JK: } gboolean ags_functional_test_util_notation_edit_delete_point(guint x, guint y) { //TODO:JK: } gboolean ags_functional_test_util_notation_edit_add_point(guint x0, guint x1, guint y) { AgsXorgApplicationContext *xorg_application_context; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; AgsNotationEdit *notation_edit; GtkWidget *widget; GtkScrollbar *hscrollbar; GtkScrollbar *vscrollbar; GtkAdjustment *adjustment; GdkDisplay *display; GdkScreen *screen; GdkWindow *window; gdouble zoom; guint history; guint width, height; guint control_count; guint origin_x, origin_y; guint widget_x, widget_y; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); notation_editor = xorg_application_context->window->notation_editor; notation_toolbar = notation_editor->notation_toolbar; if(notation_editor->selected_machine == NULL){ ags_test_leave(); return(FALSE); } notation_edit = notation_editor->notation_edit; widget = notation_edit->drawing_area; display = gtk_widget_get_display(widget); screen = gtk_widget_get_screen(widget); history = gtk_combo_box_get_active(GTK_COMBO_BOX(notation_toolbar->zoom)); zoom = exp2((double) history - 2.0); ags_test_leave(); /* */ ags_test_enter(); hscrollbar = notation_edit->hscrollbar; vscrollbar = notation_edit->vscrollbar; window = gtk_widget_get_window(widget); widget_x = widget->allocation.x; widget_y = widget->allocation.y; width = widget->allocation.width; height = widget->allocation.height; gdk_window_get_origin(window, &origin_x, &origin_y); /* make visible */ adjustment = GTK_RANGE(hscrollbar)->adjustment; if((x0 * notation_edit->control_width) > adjustment->value + adjustment->page_size){ gtk_adjustment_set_value(adjustment, x0 * notation_edit->control_width); ags_functional_test_util_reaction_time_long(); }else if((x0 * notation_edit->control_width) < adjustment->value){ gtk_adjustment_set_value(adjustment, x0 * notation_edit->control_width); ags_functional_test_util_reaction_time_long(); } x0 = (x0 * notation_edit->control_width) - (adjustment->value); x1 = (x1 * notation_edit->control_width) - (adjustment->value); adjustment = GTK_RANGE(vscrollbar)->adjustment; if((y * notation_edit->control_height) > (adjustment->value + adjustment->page_size)){ gtk_adjustment_set_value(adjustment, (y * notation_edit->control_height)); ags_functional_test_util_reaction_time_long(); }else if((y * notation_edit->control_height) < adjustment->value){ gtk_adjustment_set_value(adjustment, (y * notation_edit->control_height)); ags_functional_test_util_reaction_time_long(); } y = (y * notation_edit->control_height) - (adjustment->value); ags_test_leave(); /* */ gdk_display_warp_pointer(display, screen, origin_x + x0 + 8, origin_y + y + 7); ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x0 + 8, y + 7, 1, GDK_BUTTON1_MASK, GDK_BUTTON_PRESS); ags_functional_test_util_reaction_time(); gdk_display_warp_pointer(display, screen, origin_x + x1 + 8, origin_y + y + 7); ags_functional_test_util_reaction_time(); gdk_test_simulate_button(window, x1 + 8, y + 7, 1, GDK_BUTTON1_MASK, GDK_BUTTON_RELEASE); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_notation_edit_select_region(guint x0, guint x1, guint y0, guint y1) { //TODO:JK: } gboolean ags_functional_test_util_automation_toolbar_cursor_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_toolbar_edit_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_toolbar_delete_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_toolbar_select_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_toolbar_paste_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_toolbar_copy_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_toolbar_cut_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_toolbar_zoom(guint nth_zoom) { //TODO:JK: } gboolean ags_functional_test_util_automation_edit_audio_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_edit_output_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_edit_input_click() { //TODO:JK: } gboolean ags_functional_test_util_automation_edit_delete_point(guint nth_index, guint x, guint y) { //TODO:JK: } gboolean ags_functional_test_util_automation_edit_add_point(guint nth_index, guint x, guint y) { //TODO:JK: } gboolean ags_functional_test_util_automation_edit_select_region(guint nth_index, guint x0, guint x1, guint y0, guint y1) { //TODO:JK: } gboolean ags_functional_test_util_machine_move_up(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_machine_move_down(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_machine_hide(guint nth_machine) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; GtkMenu *popup; GList *list_start, *list; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); ags_test_enter(); popup = machine->popup; ags_test_leave(); /* activate hide */ success = ags_functional_test_util_menu_tool_button_click(machine->menu_tool_button); if(!success){ return(FALSE); } ags_functional_test_util_reaction_time_long(); success = ags_functional_test_util_menu_click(popup, "hide\0"); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_show(guint nth_machine) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; GtkMenu *popup; GList *list_start, *list; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); ags_test_enter(); popup = machine->popup; ags_test_leave(); /* activate show */ success = ags_functional_test_util_menu_tool_button_click(machine->menu_tool_button); ags_functional_test_util_reaction_time_long(); success = ags_functional_test_util_menu_click(popup, "show\0"); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_destroy(guint nth_machine) { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsMachine *machine; GtkMenu *popup; GList *list_start, *list; AgsFunctionalTestUtilContainerTest container_test; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; /* retrieve machine */ container_test.container = &(window->machines); list_start = gtk_container_get_children(window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } container_test.count = g_list_length(list_start) - 1; g_list_free(list_start); ags_test_enter(); popup = machine->popup; ags_test_leave(); /* activate destroy */ success = ags_functional_test_util_menu_tool_button_click(machine->menu_tool_button); success = ags_functional_test_util_menu_click(popup, "destroy\0"); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_container_children_count), &ags_functional_test_util_default_timeout, &container_test); return(success); } gboolean ags_functional_test_util_machine_rename_open(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_machine_rename_close(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_machine_rename_set_name(guint nth_machine, gchar *name) { //TODO:JK: } GtkWidget* ags_functional_test_util_get_line_editor(GtkWidget *machine_editor, guint nth_pad, guint nth_audio_channel, gboolean is_output) { AgsListingEditor *listing_editor; AgsPadEditor *pad_editor; AgsLineEditor *line_editor; GList *list_start, *list; if(machine_editor == NULL){ return(NULL); } ags_test_enter(); if(is_output){ listing_editor = AGS_LISTING_EDITOR(AGS_MACHINE_EDITOR(machine_editor)->output_editor); }else{ listing_editor = AGS_LISTING_EDITOR(AGS_MACHINE_EDITOR(machine_editor)->input_editor); } list_start = gtk_container_get_children(listing_editor->child); list = g_list_nth(list_start, nth_pad); if(list != NULL && AGS_IS_PAD_EDITOR(list->data)){ pad_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); return(NULL); } /* line editor */ list_start = gtk_container_get_children(pad_editor->line_editor); list = g_list_nth(list_start, nth_audio_channel); if(list != NULL && AGS_IS_LINE_EDITOR(list->data)){ line_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); return(NULL); } ags_test_leave(); return(line_editor); } gboolean ags_functional_test_util_machine_properties_open(guint nth_machine) { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsMachine *machine; GtkWidget **properties; GtkMenuToolButton *menu_tool_button; GList *list_start, *list; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); window = xorg_application_context->window; /* retrieve machine */ list_start = gtk_container_get_children(window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* activate destroy */ ags_test_enter(); properties = &(machine->properties); menu_tool_button = machine->menu_tool_button; ags_test_leave(); success = ags_functional_test_util_menu_tool_button_click(menu_tool_button); success = ags_functional_test_util_menu_click(machine->popup, "properties\0"); ags_functional_test_util_reaction_time_long(); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_widget_visible), &ags_functional_test_util_default_timeout, properties); return(success); } gboolean ags_functional_test_util_machine_properties_click_tab(guint nth_machine, guint nth_tab) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; GList *list_start, *list; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* click tab */ ags_test_enter(); machine_editor = machine->properties; gtk_notebook_set_current_page(machine_editor->notebook, nth_tab); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_machine_properties_click_enable(guint nth_machine) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; GtkButton *enable_button; GList *list_start, *list; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ enable_button = NULL; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* click tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case 0: { enable_button = AGS_PROPERTY_EDITOR(machine_editor->output_editor)->enabled; } break; case 1: { enable_button = AGS_PROPERTY_EDITOR(machine_editor->input_editor)->enabled; } break; case 2: { enable_button = AGS_PROPERTY_EDITOR(machine_editor->output_link_editor)->enabled; } break; case 3: { enable_button = AGS_PROPERTY_EDITOR(machine_editor->input_link_editor)->enabled; } break; case 4: { enable_button = AGS_PROPERTY_EDITOR(machine_editor->resize_editor)->enabled; } break; } ags_test_leave(); success = ags_functional_test_util_button_click(enable_button); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_link_set(guint nth_machine, guint pad, guint audio_channel, gchar *link_name, guint link_nth_line) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; AgsPadEditor *pad_editor; AgsLineEditor *line_editor; AgsLinkEditor *link_editor; GtkTreeModel *model; GtkTreeIter iter; GList *list_start, *list; gchar *value; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* set link */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case 0: { listing_editor = AGS_LISTING_EDITOR(machine_editor->output_editor); } break; case 1: { listing_editor = AGS_LISTING_EDITOR(machine_editor->input_editor); } break; default: ags_test_leave(); return(FALSE); } list_start = gtk_container_get_children(listing_editor->child); list = g_list_nth(list_start, pad); if(list != NULL && AGS_IS_PAD_EDITOR(list->data)){ pad_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* expander */ gtk_expander_set_expanded(pad_editor->line_editor_expander, TRUE); ags_test_leave(); ags_functional_test_util_reaction_time_long(); /* line editor */ ags_test_enter(); list_start = gtk_container_get_children(pad_editor->line_editor); list = g_list_nth(list_start, audio_channel); if(list != NULL && AGS_IS_LINE_EDITOR(list->data)){ line_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* link editor */ link_editor = line_editor->link_editor; /* set link */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(link_editor->combo)); success = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(link_name, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) link_editor->combo, &iter); success = TRUE; break; } }while(gtk_tree_model_iter_next(model, &iter)); } ags_test_leave(); ags_functional_test_util_reaction_time_long(); if(!success){ return(FALSE); } /* set link line */ ags_test_enter(); success = TRUE; gtk_spin_button_set_value(link_editor->spin_button, link_nth_line); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_link_open(guint nth_machine, guint pad, guint audio_channel) { //TODO:JK: } gboolean ags_functional_test_util_machine_properties_effect_add(guint nth_machine, guint pad, guint audio_channel) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; AgsPadEditor *pad_editor; AgsLineEditor *line_editor; AgsLineMemberEditor *member_editor; GtkDialog **effect_dialog; GtkButton *add_button; GtkTreeModel *model; GtkTreeIter iter; GList *list_start, *list; gchar *value; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case 0: { listing_editor = AGS_LISTING_EDITOR(machine_editor->output_editor); } break; case 1: { listing_editor = AGS_LISTING_EDITOR(machine_editor->input_editor); } break; default: ags_test_leave(); return(FALSE); } list_start = gtk_container_get_children(listing_editor->child); list = g_list_nth(list_start, pad); if(list != NULL && AGS_IS_PAD_EDITOR(list->data)){ pad_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* expander */ gtk_expander_set_expanded(pad_editor->line_editor_expander, TRUE); ags_test_leave(); ags_functional_test_util_reaction_time_long(); /* line editor */ ags_test_enter(); list_start = gtk_container_get_children(pad_editor->line_editor); list = g_list_nth(list_start, audio_channel); if(list != NULL && AGS_IS_LINE_EDITOR(list->data)){ line_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line member editor */ member_editor = line_editor->member_editor; /* effect dialog and add button */ effect_dialog = &(member_editor->plugin_browser); add_button = member_editor->add; ags_test_leave(); success = ags_functional_test_util_button_click(add_button); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_widget_visible), &ags_functional_test_util_default_timeout, effect_dialog); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_effect_remove(guint nth_machine, guint pad, guint audio_channel, guint nth_effect) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; AgsPadEditor *pad_editor; AgsLineEditor *line_editor; AgsLineMemberEditor *member_editor; GtkDialog **effect_dialog; GtkButton *check_button; GtkButton *remove_button; GtkTreeModel *model; AgsFunctionalTestUtilContainerTest container_test; GtkTreeIter iter; GList *list_start, *list; gchar *value; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case 0: { listing_editor = AGS_LISTING_EDITOR(machine_editor->output_editor); } break; case 1: { listing_editor = AGS_LISTING_EDITOR(machine_editor->input_editor); } break; default: ags_test_leave(); return(FALSE); } list_start = gtk_container_get_children(listing_editor->child); list = g_list_nth(list_start, pad); if(list != NULL && AGS_IS_PAD_EDITOR(list->data)){ pad_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* expander */ gtk_expander_set_expanded(pad_editor->line_editor_expander, TRUE); ags_test_leave(); ags_functional_test_util_reaction_time_long(); /* line editor */ ags_test_enter(); list_start = gtk_container_get_children(pad_editor->line_editor); list = g_list_nth(list_start, audio_channel); if(list != NULL && AGS_IS_LINE_EDITOR(list->data)){ line_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line member editor */ member_editor = line_editor->member_editor; /* effect dialog and remove button */ effect_dialog = &(member_editor->plugin_browser); remove_button = member_editor->remove; /* check button */ container_test.container = &(member_editor->line_member); check_button = NULL; list_start = gtk_container_get_children(member_editor->line_member); container_test.count = g_list_length(list_start) - 1; list = g_list_nth(list_start, nth_effect); if(list != NULL){ GtkHBox *hbox; hbox = list->data; list_start = gtk_container_get_children(hbox); check_button = list_start->data; g_list_free(list_start); } ags_test_leave(); /* click check button */ success = ags_functional_test_util_button_click(check_button); /* click remove */ if(success){ ags_functional_test_util_reaction_time_long(); success = ags_functional_test_util_button_click(remove_button); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_container_children_count), &ags_functional_test_util_default_timeout, &container_test); ags_functional_test_util_reaction_time_long(); } return(success); } gboolean ags_functional_test_util_machine_properties_effect_plugin_type(guint nth_machine, guint pad, guint audio_channel, gchar *plugin_type) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; AgsPadEditor *pad_editor; AgsLineEditor *line_editor; AgsLineMemberEditor *member_editor; AgsPluginBrowser *plugin_browser; GtkTreeModel *model; GtkTreeIter iter; GList *list_start, *list; gchar *value; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case 0: { listing_editor = AGS_LISTING_EDITOR(machine_editor->output_editor); } break; case 1: { listing_editor = AGS_LISTING_EDITOR(machine_editor->input_editor); } break; default: ags_test_leave(); return(FALSE); } /* pad editor */ list_start = gtk_container_get_children(listing_editor->child); list = g_list_nth(list_start, pad); if(list != NULL && AGS_IS_PAD_EDITOR(list->data)){ pad_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line editor */ list_start = gtk_container_get_children(pad_editor->line_editor); list = g_list_nth(list_start, audio_channel); if(list != NULL && AGS_IS_LINE_EDITOR(list->data)){ line_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line member editor */ member_editor = line_editor->member_editor; plugin_browser = member_editor->plugin_browser; /* set plugin type */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(plugin_browser->plugin_type)); success = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(plugin_type, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) plugin_browser->plugin_type, &iter); success = TRUE; break; } }while(gtk_tree_model_iter_next(model, &iter)); } ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_ladspa_filename(guint nth_machine, guint pad, guint audio_channel, gchar *filename) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; AgsPadEditor *pad_editor; AgsLineEditor *line_editor; AgsLineMemberEditor *member_editor; AgsPluginBrowser *plugin_browser; AgsLadspaBrowser *ladspa_browser; GtkTreeModel *model; GtkTreeIter iter; GList *list_start, *list; gchar *value; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case 0: { listing_editor = AGS_LISTING_EDITOR(machine_editor->output_editor); } break; case 1: { listing_editor = AGS_LISTING_EDITOR(machine_editor->input_editor); } break; default: ags_test_leave(); return(FALSE); } list_start = gtk_container_get_children(listing_editor->child); list = g_list_nth(list_start, pad); if(list != NULL && AGS_IS_PAD_EDITOR(list->data)){ pad_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line editor */ list_start = gtk_container_get_children(pad_editor->line_editor); list = g_list_nth(list_start, audio_channel); if(list != NULL && AGS_IS_LINE_EDITOR(list->data)){ line_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line member editor */ member_editor = line_editor->member_editor; plugin_browser = member_editor->plugin_browser; ladspa_browser = plugin_browser->ladspa_browser; /* set plugin filename */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(ladspa_browser->filename)); success = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(filename, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) ladspa_browser->filename, &iter); success = TRUE; break; } }while(gtk_tree_model_iter_next(model, &iter)); } ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_ladspa_effect(guint nth_machine, guint pad, guint audio_channel, gchar *effect) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; AgsPadEditor *pad_editor; AgsLineEditor *line_editor; AgsLineMemberEditor *member_editor; AgsPluginBrowser *plugin_browser; AgsLadspaBrowser *ladspa_browser; GtkTreeModel *model; GtkTreeIter iter; GList *list_start, *list; gchar *value; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case 0: { listing_editor = AGS_LISTING_EDITOR(machine_editor->output_editor); } break; case 1: { listing_editor = AGS_LISTING_EDITOR(machine_editor->input_editor); } break; default: ags_test_leave(); return(FALSE); } list_start = gtk_container_get_children(listing_editor->child); list = g_list_nth(list_start, pad); if(list != NULL && AGS_IS_PAD_EDITOR(list->data)){ pad_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line editor */ list_start = gtk_container_get_children(pad_editor->line_editor); list = g_list_nth(list_start, audio_channel); if(list != NULL && AGS_IS_LINE_EDITOR(list->data)){ line_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line member editor */ member_editor = line_editor->member_editor; plugin_browser = member_editor->plugin_browser; ladspa_browser = plugin_browser->ladspa_browser; /* set plugin effect */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(ladspa_browser->effect)); success = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(effect, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) ladspa_browser->effect, &iter); success = TRUE; break; } }while(gtk_tree_model_iter_next(model, &iter)); } ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_lv2_filename(guint nth_machine, guint pad, guint audio_channel, gchar *filename) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; AgsPadEditor *pad_editor; AgsLineEditor *line_editor; AgsLineMemberEditor *member_editor; AgsPluginBrowser *plugin_browser; AgsLv2Browser *lv2_browser; GtkTreeModel *model; GtkTreeIter iter; GList *list_start, *list; gchar *value; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case 0: { listing_editor = AGS_LISTING_EDITOR(machine_editor->output_editor); } break; case 1: { listing_editor = AGS_LISTING_EDITOR(machine_editor->input_editor); } break; default: ags_test_leave(); return(FALSE); } list_start = gtk_container_get_children(listing_editor->child); list = g_list_nth(list_start, pad); if(list != NULL && AGS_IS_PAD_EDITOR(list->data)){ pad_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line editor */ list_start = gtk_container_get_children(pad_editor->line_editor); list = g_list_nth(list_start, audio_channel); if(list != NULL && AGS_IS_LINE_EDITOR(list->data)){ line_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line member editor */ member_editor = line_editor->member_editor; plugin_browser = member_editor->plugin_browser; lv2_browser = plugin_browser->lv2_browser; /* set plugin filename */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(lv2_browser->filename)); success = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(filename, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) lv2_browser->filename, &iter); success = TRUE; break; } }while(gtk_tree_model_iter_next(model, &iter)); } ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_lv2_effect(guint nth_machine, guint pad, guint audio_channel, gchar *effect) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; AgsPadEditor *pad_editor; AgsLineEditor *line_editor; AgsLineMemberEditor *member_editor; AgsPluginBrowser *plugin_browser; AgsLv2Browser *lv2_browser; GtkTreeModel *model; GtkTreeIter iter; GList *list_start, *list; gchar *value; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case 0: { listing_editor = AGS_LISTING_EDITOR(machine_editor->output_editor); } break; case 1: { listing_editor = AGS_LISTING_EDITOR(machine_editor->input_editor); } break; default: ags_test_leave(); return(FALSE); } list_start = gtk_container_get_children(listing_editor->child); list = g_list_nth(list_start, pad); if(list != NULL && AGS_IS_PAD_EDITOR(list->data)){ pad_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line editor */ list_start = gtk_container_get_children(pad_editor->line_editor); list = g_list_nth(list_start, audio_channel); if(list != NULL && AGS_IS_LINE_EDITOR(list->data)){ line_editor = list->data; g_list_free(list_start); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* line member editor */ member_editor = line_editor->member_editor; plugin_browser = member_editor->plugin_browser; lv2_browser = plugin_browser->lv2_browser; /* set plugin effect */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(lv2_browser->effect)); success = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(effect, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) lv2_browser->effect, &iter); success = TRUE; break; } }while(gtk_tree_model_iter_next(model, &iter)); } ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_bulk_add(guint nth_machine) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsPropertyCollectionEditor *property_collection_editor; GtkButton *add_collection; GList *list_start, *list; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_OUTPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->output_link_editor); } break; case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_INPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->input_link_editor); } break; default: ags_test_leave(); return(FALSE); } add_collection = property_collection_editor->add_collection; ags_test_leave(); /* add collection */ success = ags_functional_test_util_button_click(add_collection); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_bulk_remove(guint nth_machine, guint nth_bulk) { //TODO:JK: } gboolean ags_functional_test_util_machine_properties_bulk_link(guint nth_machine, guint nth_bulk, gchar *link) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsPropertyCollectionEditor *property_collection_editor; AgsLinkCollectionEditor *link_collection_editor; GList *list_start, *list; GtkTreeModel *model; GtkTreeIter iter; gchar *value; guint nth_tab; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get notebook tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_OUTPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->output_link_editor); } break; case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_INPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->input_link_editor); } break; default: ags_test_leave(); return(FALSE); } /* get bulk editor */ list_start = gtk_container_get_children(property_collection_editor->child); list = g_list_nth(list_start, nth_bulk); if(list != NULL){ GtkTable *table; table = list->data; g_list_free(list_start); link_collection_editor = g_object_get_data(table, "AgsChild\0"); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } /* set link */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(link_collection_editor->link)); success = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(link, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) link_collection_editor->link, &iter); success = TRUE; break; } }while(gtk_tree_model_iter_next(model, &iter)); } ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(success); } gboolean ags_functional_test_util_machine_properties_bulk_first_line(guint nth_machine, guint nth_bulk, guint first_line) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsPropertyCollectionEditor *property_collection_editor; AgsLinkCollectionEditor *link_collection_editor; GList *list_start, *list; GtkTreeModel *model; GtkTreeIter iter; gchar *value; guint nth_tab; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get notebook tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_OUTPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->output_link_editor); } break; case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_INPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->input_link_editor); } break; default: ags_test_leave(); return(FALSE); } /* get bulk editor */ list_start = gtk_container_get_children(property_collection_editor->child); list = g_list_nth(list_start, nth_bulk); if(list != NULL){ GtkTable *table; table = list->data; g_list_free(list_start); link_collection_editor = g_object_get_data(table, "AgsChild\0"); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } gtk_spin_button_set_value(link_collection_editor->first_line, first_line); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_machine_properties_bulk_link_line(guint nth_machine, guint nth_bulk, guint first_link_line) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsPropertyCollectionEditor *property_collection_editor; AgsLinkCollectionEditor *link_collection_editor; GList *list_start, *list; GtkTreeModel *model; GtkTreeIter iter; gchar *value; guint nth_tab; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get notebook tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_OUTPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->output_link_editor); } break; case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_INPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->input_link_editor); } break; default: ags_test_leave(); return(FALSE); } /* get bulk editor */ list_start = gtk_container_get_children(property_collection_editor->child); list = g_list_nth(list_start, nth_bulk); if(list != NULL && AGS_IS_LINK_COLLECTION_EDITOR(list->data)){ GtkTable *table; table = list->data; g_list_free(list_start); link_collection_editor = g_object_get_data(table, "AgsChild\0"); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } gtk_spin_button_set_value(link_collection_editor->first_link, first_link_line); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_machine_properties_bulk_count(guint nth_machine, guint nth_bulk, guint count) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsPropertyCollectionEditor *property_collection_editor; AgsLinkCollectionEditor *link_collection_editor; GList *list_start, *list; GtkTreeModel *model; GtkTreeIter iter; gchar *value; guint nth_tab; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* get notebook tab */ ags_test_enter(); machine_editor = machine->properties; nth_tab = gtk_notebook_get_current_page(machine_editor->notebook); switch(nth_tab){ case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_OUTPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->output_link_editor); } break; case AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_INPUT_TAB: { property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(machine_editor->input_link_editor); } break; default: ags_test_leave(); return(FALSE); } /* get bulk editor */ list_start = gtk_container_get_children(property_collection_editor->child); list = g_list_nth(list_start, nth_bulk); if(list != NULL){ GtkTable *table; table = list->data; g_list_free(list_start); link_collection_editor = g_object_get_data(table, "AgsChild\0"); }else{ g_list_free(list_start); ags_test_leave(); return(FALSE); } gtk_spin_button_set_value(link_collection_editor->count, count); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_machine_properties_resize_audio_channels(guint nth_machine, guint audio_channels) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; GList *list_start, *list; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* resize audio channels */ ags_test_enter(); machine_editor = machine->properties; gtk_spin_button_set_value(machine_editor->resize_editor->audio_channels, audio_channels); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_machine_properties_resize_inputs(guint nth_machine, guint inputs) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; GList *list_start, *list; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* resize input pads */ ags_test_enter(); machine_editor = machine->properties; gtk_spin_button_set_value(machine_editor->resize_editor->input_pads, inputs); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_machine_properties_resize_outputs(guint nth_machine, guint outputs) { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; GList *list_start, *list; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve machine */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MACHINE(list->data)){ machine = list->data; }else{ return(FALSE); } g_list_free(list_start); /* resize output pads */ ags_test_enter(); machine_editor = machine->properties; gtk_spin_button_set_value(machine_editor->resize_editor->output_pads, outputs); ags_test_leave(); ags_functional_test_util_reaction_time_long(); return(TRUE); } gboolean ags_functional_test_util_machine_edit_copy(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_line_member_set_toggled(gchar *specifier, gboolean is_toggled) { //TODO:JK: } gboolean ags_functional_test_util_line_member_set_value(gchar *specifier, gdouble value) { //TODO:JK: } gboolean ags_functional_test_util_machine_audio_connection_click_tab(guint nth_machine, guint nth_tab) { //TODO:JK: } gboolean ags_functional_test_util_machine_audio_connection_click_enable(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_machine_audio_connection_set_device(guint nth_machine, guint pad, guint audio_channel, gchar *device) { //TODO:JK: } gboolean ags_functional_test_util_machine_audio_connection_set_line(guint nth_machine, uint pad, guint audio_channel, guint line) { //TODO:JK: } gboolean ags_functional_test_util_machine_audio_connection_bulk_add(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_machine_audio_connection_bulk_remove(guint nth_machine, guint nth_bulk) { //TODO:JK: } gboolean ags_functional_test_util_machine_audio_connection_bulk_first_line(guint nth_machine, guint nth_bulk, guint first_line) { //TODO:JK: } gboolean ags_functional_test_util_machine_audio_connection_bulk_count(guint nth_machine, guint nth_bulk, guint count) { //TODO:JK: } gboolean ags_functional_test_util_machine_audio_connection_bulk_device(guint nth_machine, guint nth_bulk, gchar *device) { //TODO:JK: } gboolean ags_functional_test_util_machine_midi_connection_midi_channel(guint nth_machine, guint midi_channel) { //TODO:JK: } gboolean ags_functional_test_util_machine_midi_connection_audio_start_mapping(guint nth_machine, guint audio_start_mapping) { //TODO:JK: } gboolean ags_functional_test_util_machine_midi_connection_audio_end_mapping(guint nth_machine, guint audio_end_mapping) { //TODO:JK: } gboolean ags_functional_test_util_machine_midi_connection_midi_start_mapping(guint nth_machine, guint midi_start_mapping) { //TODO:JK: } gboolean ags_functional_test_util_machine_midi_connection_midi_end_mapping(guint nth_machine, guint midi_end_mapping) { //TODO:JK: } gboolean ags_functional_test_util_machine_midi_connection_midi_device(guint nth_machine, gchar *device) { //TODO:JK: } gboolean ags_functional_test_util_pad_group(guint nth_machine, guint nth_pad) { //TODO:JK: } gboolean ags_functional_test_util_pad_mute(guint nth_machine, guint nth_pad) { //TODO:JK: } gboolean ags_functional_test_util_pad_solo(guint nth_machine, guint nth_pad) { //TODO:JK: } gboolean ags_functional_test_util_pad_play(guint nth_machine, guint nth_pad) { //TODO:JK: } gboolean ags_functional_test_util_expander(guint nth_machine, guint nth_pad, guint nth_audio_channel) { //TODO:JK: } gboolean ags_functional_test_util_effect_bulk_add(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_effect_bulk_remove(guint nth_machine, guint nth_bulk_effect) { //TODO:JK: } gboolean ags_functional_test_util_effect_bulk_ladspa_filename(guint nth_machine, gchar *filename) { //TODO:JK: } gboolean ags_functional_test_util_effect_bulk_ladspa_effect(guint nth_machine, gchar *effect) { //TODO:JK: } gboolean ags_functional_test_util_effect_bulk_lv2_filename(guint nth_machine, gchar *filename) { //TODO:JK: } gboolean ags_functional_test_util_effect_bulk_lv2_effect(guint nth_machine, gchar *effect) { //TODO:JK: } gboolean ags_functional_test_util_panel_mute_line(guint nth_machine, guint nth_pad, guint nth_audio_channel) { //TODO:JK: } gboolean ags_functional_test_util_mixer_input_line_volume(guint nth_machine, guint nth_pad, guint nth_audio_channel, gdouble volume) { //TODO:JK: } gboolean ags_functional_test_util_drum_open(guint nth_machine) { AgsXorgApplicationContext *xorg_application_context; AgsDrum *drum; GtkButton *open_button; GtkWidget **open_dialog; GList *list_start, *list; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve drum */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_DRUM(list->data)){ drum = list->data; }else{ return(FALSE); } g_list_free(list_start); /* open dialog */ ags_test_enter(); open_button = drum->open; open_dialog = &(drum->open_dialog); ags_test_leave(); /* click open */ success = ags_functional_test_util_button_click(open_button); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_widget_visible), &ags_functional_test_util_default_timeout, open_dialog); return(success); } gboolean ags_functional_test_util_drum_run(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_drum_loop(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_drum_bank_0(guint nth_machine, guint bank_0) { //TODO:JK: } gboolean ags_functional_test_util_drum_bank_1(guint nth_machine, guint bank_1) { //TODO:JK: } gboolean ags_functional_test_util_drum_length(guint nth_machine, guint length) { //TODO:JK: } gboolean ags_functional_test_util_drum_index(guint nth_machine, guint nth_radio) { //TODO:JK: } gboolean ags_functional_test_util_drum_pad(guint nth_machine, guint nth_pad) { //TODO:JK: } gboolean ags_functional_test_util_drum_pad_open(guint nth_machine, guint nth_pad) { //TODO:JK: } gboolean ags_functional_test_util_drum_pad_edit(guint nth_machine, guint nth_pad) { //TODO:JK: } gboolean ags_functional_test_util_drum_input_line_volume(guint nth_machine, guint nth_pad, guint nth_audio_channel, gdouble volume) { //TODO:JK: } gboolean ags_functional_test_util_matrix_run(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_matrix_loop(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_matrix_bank_1(guint nth_machine, guint bank_1) { //TODO:JK: } gboolean ags_functional_test_util_matrix_length(guint nth_machine, guint length) { //TODO:JK: } gboolean ags_functional_test_util_matrix_gutter(guint nth_machine, guint nth_gutter) { //TODO:JK: } gboolean ags_functional_test_util_drum_cell(guint nth_machine, guint x, guint y) { //TODO:JK: } gboolean ags_functional_test_util_synth_auto_update(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_synth_update(guint nth_machine) { //TODO:JK: } gboolean ags_functional_test_util_oscillator_wave(guint nth_machine, guint nth_oscillator, gchar *wave) { //TODO:JK: } gboolean ags_functional_test_util_oscillator_phase(guint nth_machine, guint nth_oscillator, gdouble phase) { //TODO:JK: } gboolean ags_functional_test_util_oscillator_attack(guint nth_machine, guint nth_oscillator, gdouble attack) { //TODO:JK: } gboolean ags_functional_test_util_oscillator_frequency(guint nth_machine, guint nth_oscillator, gdouble frequency) { //TODO:JK: } gboolean ags_functional_test_util_oscillator_length(guint nth_machine, guint nth_oscillator, gdouble length) { //TODO:JK: } gboolean ags_functional_test_util_oscillator_volume(guint nth_machine, guint nth_oscillator, gdouble volume) { //TODO:JK: } gboolean ags_functional_test_util_ffplayer_open(guint nth_machine) { AgsXorgApplicationContext *xorg_application_context; AgsFFPlayer *ffplayer; GtkButton *open_button; GtkWidget **open_dialog; GList *list_start, *list; gboolean success; ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve ffplayer */ list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_FFPLAYER(list->data)){ ffplayer = list->data; }else{ return(FALSE); } g_list_free(list_start); /* open dialog */ ags_test_enter(); open_button = ffplayer->open; open_dialog = &(ffplayer->open_dialog); ags_test_leave(); /* click open */ success = ags_functional_test_util_button_click(open_button); ags_functional_test_util_idle_condition_and_timeout(AGS_FUNCTIONAL_TEST_UTIL_IDLE_CONDITION(ags_functional_test_util_idle_test_widget_visible), &ags_functional_test_util_default_timeout, open_dialog); return(success); } gboolean ags_functional_test_util_ffplayer_preset(guint nth_machine, gchar *preset) { //TODO:JK: } gboolean ags_functional_test_util_ffplayer_instrument(guint nth_machine, gchar *instrument) { //TODO:JK: } gsequencer-1.4.24/ags/test/X/gsequencer_setup_util.c0000644000175000017500000005772413247044247017434 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include "gsequencer_setup_util.h" #include #include #include #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" static void ags_test_driver_mutex_create(); static pthread_mutex_t *ags_test_driver_mutex = NULL; struct sigaction ags_test_sigact; extern AgsApplicationContext *ags_application_context; extern volatile gboolean ags_show_start_animation; void ags_test_enter() { pthread_mutex_lock(ags_test_get_driver_mutex()); gdk_threads_enter(); } void ags_test_leave() { gdk_threads_leave(); pthread_mutex_unlock(ags_test_get_driver_mutex()); } static void ags_test_driver_mutex_create() { pthread_mutex_t *mutex; pthread_mutexattr_t *attr; attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); ags_test_driver_mutex = mutex; } pthread_mutex_t* ags_test_get_driver_mutex() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_test_driver_mutex == NULL){ ags_test_driver_mutex_create(); } pthread_mutex_unlock(&mutex); return(ags_test_driver_mutex); } void ags_test_init(int *argc, char ***argv, gchar *conf_str) { AgsConfig *config; gchar *filename; gboolean single_thread_enabled; gboolean builtin_theme_disabled; guint i; #ifdef AGS_WITH_RT struct sched_param param; struct rlimit rl; #endif struct passwd *pw; gchar *wdir, *config_file; gchar *rc_filename; gchar *base_dir; gchar *str, *data_dir; gchar path[PATH_MAX]; uint32_t size = sizeof(path); uid_t uid; int result; const rlim_t kStackSize = 64L * 1024L * 1024L; // min stack size = 64 Mb base_dir = strdup(SRCDIR); printf("base dir %s\n", base_dir); /* set some environment variables */ sprintf(path, "%s/gsequencer.share/styles", base_dir); data_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "AGS_RC_FILENAME=%s/ags.rc", data_dir); putenv(str); sprintf(path, "%s/gsequencer.share/images", base_dir); data_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "AGS_ANIMATION_FILENAME=%s/ags_supermoon-800x450.png", data_dir); putenv(str); sprintf(path, "%s/gsequencer.share/images", base_dir); data_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "AGS_LOGO_FILENAME=%s/ags.png", data_dir); putenv(str); sprintf(path, "%s", base_dir); data_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "AGS_LICENSE_FILENAME=%s/COPYING", data_dir); putenv(str); /* gettext */ setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); /* parameters */ single_thread_enabled = FALSE; builtin_theme_disabled = FALSE; // g_log_set_fatal_mask("GLib", // "Gtk" , // // G_LOG_LEVEL_CRITICAL); // G_LOG_LEVEL_WARNING #ifdef AGS_WITH_RT result = getrlimit(RLIMIT_STACK, &rl); /* set stack size 64M */ if(result == 0){ if(rl.rlim_cur < kStackSize){ rl.rlim_cur = kStackSize; result = setrlimit(RLIMIT_STACK, &rl); if(result != 0){ //TODO:JK } } } param.sched_priority = GSEQUENCER_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } #endif //#ifdef AGS_WITH_X11 XInitThreads(); //#endif /* parse command line parameter */ filename = NULL; for(i = 0; i < argc[0]; i++){ if(!strncmp(argv[0][i], "--help", 7)){ printf("GSequencer is an audio sequencer and notation editor\n\n"); printf("Usage:\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\n", "Report bugs to \n", "--filename file open file", "--single-thread run in single thread mode", "--no-builtin-theme disable built-in theme", "--help display this help and exit", "--version output version information and exit"); exit(0); }else if(!strncmp(argv[0][i], "--version", 10)){ printf("GSequencer %s\n\n", AGS_VERSION); printf("%s\n%s\n%s\n\n", "Copyright (C) 2005-2017 Joël Krähemann", "This is free software; see the source for copying conditions. There is NO", "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); printf("Written by Joël Krähemann\n"); exit(0); }else if(!strncmp(argv[0][i], "--single-thread", 16)){ single_thread_enabled = TRUE; }else if(!strncmp(argv[0][i], "--no-builtin-theme", 19)){ builtin_theme_disabled = TRUE; }else if(!strncmp(argv[0][i], "--filename", 11)){ filename = *argv[i + 1]; i++; } } uid = getuid(); pw = getpwuid(uid); /* parse rc file */ if(!builtin_theme_disabled){ rc_filename = g_strdup_printf("%s/%s/ags.rc", pw->pw_dir, AGS_DEFAULT_DIRECTORY); if(!g_file_test(rc_filename, G_FILE_TEST_IS_REGULAR)){ g_free(rc_filename); #ifdef AGS_RC_FILENAME rc_filename = g_strdup(AGS_RC_FILENAME); #else if((rc_filename = getenv("AGS_RC_FILENAME")) == NULL){ rc_filename = g_strdup_printf("%s%s", DESTDIR, "/gsequencer/styles/ags.rc"); }else{ rc_filename = g_strdup(rc_filename); } #endif } gtk_rc_parse(rc_filename); g_free(rc_filename); } /**/ LIBXML_TEST_VERSION; ags_gui_init(argc, argv); gtk_init(argc, argv); if(!builtin_theme_disabled){ g_object_set(gtk_settings_get_default(), "gtk-theme-name", "Raleigh", NULL); g_signal_handlers_block_matched(gtk_settings_get_default(), G_SIGNAL_MATCH_DETAIL, g_signal_lookup("set-property", GTK_TYPE_SETTINGS), g_quark_from_string("gtk-theme-name"), NULL, NULL, NULL); } #ifdef AGS_WITH_LIBINSTPATCH ipatch_init(); #endif /* setup */ wdir = g_strdup_printf("%s/%s", pw->pw_dir, AGS_DEFAULT_DIRECTORY); config_file = g_strdup_printf("%s/%s", wdir, AGS_DEFAULT_CONFIG); config = ags_config_get_instance(); if(conf_str != NULL){ ags_config_load_from_data(config, conf_str, strlen(conf_str)); }else{ ags_config_load_from_file(config, config_file); } g_free(wdir); g_free(config_file); } void ags_test_quit() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsGuiThread *gui_thread; xorg_application_context = ags_application_context_get_instance(); ags_test_enter(); window = xorg_application_context->window; gui_thread = xorg_application_context->gui_thread; window->flags |= AGS_WINDOW_TERMINATING; ags_test_leave(); //FIXME:JK: avoids exit to crash :( sleep(5); } void ags_test_show_file_error(gchar *filename, GError *error) { GtkDialog *dialog; g_warning("could not parse file %s\0", filename); dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "Failed to open '%s'\0", filename); gtk_widget_show_all((GtkWidget *) dialog); g_signal_connect(dialog, "response\0", G_CALLBACK(gtk_main_quit), NULL); gtk_main(); } void ags_test_signal_handler(int signr) { if(signr == SIGINT){ //TODO:JK: do backup exit(-1); }else{ sigemptyset(&(ags_test_sigact.sa_mask)); // if(signr == AGS_ASYNC_QUEUE_SIGNAL_HIGH){ // pthread_yield(); // } } } void ags_test_signal_cleanup() { sigemptyset(&(ags_test_sigact.sa_mask)); } void ags_test_setup(int argc, char **argv) { AgsLadspaManager *ladspa_manager; AgsDssiManager *dssi_manager; AgsLv2Manager *lv2_manager; AgsLv2uiManager *lv2ui_manager; AgsLv2WorkerManager *lv2_worker_manager; AgsLog *log; gchar *blacklist_filename; gchar *filename; uid_t uid; guint i; /* check filename */ log = ags_log_get_instance(); filename = NULL; ags_log_add_message(log, "Welcome to Advanced Gtk+ Sequencer\0"); for(i = 0; i < argc; i++){ if(!strncmp(argv[i], "--filename\0", 11)){ AgsSimpleFile *simple_file; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; xmlChar *xpath; gchar *buffer; guint buffer_length; filename = argv[i + 1]; simple_file = ags_simple_file_new(); g_object_set(simple_file, "filename\0", filename, NULL); ags_simple_file_open(simple_file, NULL); xpath = "/ags-simple-file/ags-sf-config"; /* Create xpath evaluation context */ xpath_context = xmlXPathNewContext(simple_file->doc); if(xpath_context == NULL) { g_warning("Error: unable to create new XPath context\0"); break; } /* Evaluate xpath expression */ xpath_object = xmlXPathEval(xpath, xpath_context); if(xpath_object == NULL) { g_warning("Error: unable to evaluate xpath expression \"%s\"\0", xpath); xmlXPathFreeContext(xpath_context); break; } node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ buffer = xmlNodeGetContent(node[i]); buffer_length = strlen(buffer); break; } } if(buffer != NULL){ // ags_config_clear(ags_config_get_instance()); ags_config_load_from_data(ags_config_get_instance(), buffer, buffer_length); } break; } } /* load ladspa manager */ ladspa_manager = ags_ladspa_manager_get_instance(); blacklist_filename = "ladspa.blacklist\0"; ags_ladspa_manager_load_blacklist(ladspa_manager, blacklist_filename); ags_log_add_message(ags_log_get_instance(), "* Loading LADSPA plugins\0"); ags_ladspa_manager_load_default_directory(ladspa_manager); /* load dssi manager */ dssi_manager = ags_dssi_manager_get_instance(); blacklist_filename = "dssi_plugin.blacklist\0"; ags_dssi_manager_load_blacklist(dssi_manager, blacklist_filename); ags_log_add_message(ags_log_get_instance(), "* Loading DSSI plugins\0"); ags_dssi_manager_load_default_directory(dssi_manager); /* load lv2 manager */ lv2_manager = ags_lv2_manager_get_instance(); lv2_worker_manager = ags_lv2_worker_manager_get_instance(); blacklist_filename = "lv2_plugin.blacklist\0"; ags_lv2_manager_load_blacklist(lv2_manager, blacklist_filename); ags_log_add_message(ags_log_get_instance(), "* Loading Lv2 plugins\0"); ags_lv2_manager_load_default_directory(lv2_manager); /* load lv2ui manager */ lv2ui_manager = ags_lv2ui_manager_get_instance(); blacklist_filename = "lv2ui_plugin.blacklist\0"; ags_lv2ui_manager_load_blacklist(lv2ui_manager, blacklist_filename); ags_log_add_message(ags_log_get_instance(), "* Loading Lv2ui plugins\0"); ags_lv2ui_manager_load_default_directory(lv2ui_manager); /* application contex */ ags_application_context = (AgsApplicationContext *) ags_xorg_application_context_new(); ags_application_context->argc = argc; ags_application_context->argv = argv; ags_application_context_register_types(ags_application_context); /* fix cross-references in managers */ lv2_worker_manager->thread_pool = ((AgsXorgApplicationContext *) ags_application_context)->thread_pool; g_atomic_int_set(&(ags_show_start_animation), FALSE); } void ags_test_start_animation(pthread_t *thread) { GtkWindow *window; GdkWindowAttr *attr; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_object_set(window, "decorated\0", FALSE, 0); gtk_widget_set_size_request(window, 800, 450); gtk_widget_show_all(window); pthread_create(thread, NULL, ags_test_start_animation_thread, window); } void* ags_test_start_animation_thread(void *ptr) { GtkWidget *window; GdkRectangle rectangle; cairo_t *gdk_cr, *cr; cairo_surface_t *surface; AgsLog *log; gchar *filename; unsigned char *bg_data, *image_data; /* create a buffer suitable to image size */ GList *list, *start; guint image_size; gdouble x0, y0; guint i, nth; gdk_threads_enter(); window = (GtkWidget *) ptr; rectangle.x = 0; rectangle.y = 0; rectangle.width = 800; rectangle.height = 450; image_size = 4 * 800 * 450; gdk_cr = gdk_cairo_create(window->window); filename = g_strdup_printf("%s/%s\0", SRCDIR, "gsequencer.share/images/ags_supermoon-800x450.png\0"); surface = cairo_image_surface_create_from_png(filename); image_data = cairo_image_surface_get_data(surface); bg_data = (unsigned char *) malloc(image_size * sizeof(unsigned char)); if(image_data != NULL){ memcpy(bg_data, image_data, image_size * sizeof(unsigned char)); } cr = cairo_create(surface); cairo_select_font_face(cr, "Georgia\0", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(cr, (gdouble) 11.0); gdk_window_show(window->window); gdk_threads_leave(); log = ags_log_get_instance(); nth = 0; while(g_atomic_int_get(&(ags_show_start_animation))){ start = list = ags_log_get_messages(log); i = g_list_length(start); if(i > nth){ if(image_data != NULL){ memcpy(image_data, bg_data, image_size * sizeof(unsigned char)); } cairo_set_source_surface(cr, surface, 0, 0); cairo_paint(cr); cairo_surface_flush(surface); x0 = 4.0; y0 = 4.0 + (i * 12.0); while(y0 > 4.0 && list != NULL){ cairo_set_source_rgb(cr, 1.0, 0.0, 1.0); cairo_move_to(cr, x0, y0); cairo_show_text(cr, list->data); list = list->next; y0 -= 12.0; } cairo_move_to(cr, x0, 4.0 + (i + 1) * 12.0); cairo_show_text(cr, "...\0"); nth = g_list_length(start); } cairo_set_source_surface(gdk_cr, surface, 0, 0); cairo_paint(gdk_cr); cairo_surface_flush(surface); gdk_flush(); } free(bg_data); gdk_threads_enter(); gtk_widget_destroy(window); gdk_threads_leave(); } void ags_test_launch(gboolean single_thread) { AgsMutexManager *mutex_manager; AgsThread *audio_loop, *polling_thread, *gui_thread, *task_thread; AgsThreadPool *thread_pool; AgsConfig *config; GList *start_queue; pthread_mutex_t *application_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get threads, thread pool and config */ pthread_mutex_lock(application_mutex); audio_loop = (AgsThread *) ags_application_context->main_loop; task_thread = (AgsThread *) ags_application_context->task_thread; thread_pool = AGS_TASK_THREAD(task_thread)->thread_pool; config = ags_application_context->config; pthread_mutex_unlock(application_mutex); polling_thread = ags_thread_find_type(audio_loop, AGS_TYPE_POLLING_THREAD); gui_thread = ags_thread_find_type(audio_loop, AGS_TYPE_GUI_THREAD); /* start engine */ pthread_mutex_lock(audio_loop->start_mutex); start_queue = NULL; start_queue = g_list_prepend(start_queue, polling_thread); start_queue = g_list_prepend(start_queue, task_thread); // start_queue = g_list_prepend(start_queue, // gui_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); /* start audio loop and thread pool*/ ags_thread_start(audio_loop); ags_thread_pool_start(thread_pool); if(!single_thread){ /* wait for audio loop */ pthread_mutex_lock(audio_loop->start_mutex); if(g_atomic_int_get(&(audio_loop->start_wait)) == TRUE){ g_atomic_int_set(&(audio_loop->start_done), FALSE); while(g_atomic_int_get(&(audio_loop->start_wait)) == TRUE && g_atomic_int_get(&(audio_loop->start_done)) == FALSE){ pthread_cond_wait(audio_loop->start_cond, audio_loop->start_mutex); } } pthread_mutex_unlock(audio_loop->start_mutex); /* start gui thread */ ags_thread_start(gui_thread); /* wait for gui thread */ pthread_mutex_lock(gui_thread->start_mutex); if(g_atomic_int_get(&(gui_thread->start_done)) == FALSE){ g_atomic_int_set(&(gui_thread->start_wait), TRUE); while(g_atomic_int_get(&(gui_thread->start_done)) == FALSE){ g_atomic_int_set(&(gui_thread->start_wait), TRUE); pthread_cond_wait(gui_thread->start_cond, gui_thread->start_mutex); } } pthread_mutex_unlock(gui_thread->start_mutex); g_atomic_int_set(&(AGS_XORG_APPLICATION_CONTEXT(ags_application_context)->gui_ready), 1); /* autosave thread */ if(!g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "autosave-thread\0"), "true\0")){ pthread_mutex_lock(audio_loop->start_mutex); start_queue = g_atomic_pointer_get(&(audio_loop->start_queue)); start_queue = g_list_prepend(start_queue, task_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); } }else{ AgsSingleThread *single_thread; /* single thread */ single_thread = ags_single_thread_new((GObject *) ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(ags_application_context))->data); /* add known threads to single_thread */ ags_thread_add_child(AGS_THREAD(single_thread), audio_loop); /* autosave thread */ if(!g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "autosave-thread\0"), "true\0")){ pthread_mutex_lock(audio_loop->start_mutex); start_queue = g_atomic_pointer_get(&(audio_loop->start_queue)); start_queue = g_list_prepend(start_queue, task_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); } /* start thread tree */ ags_thread_start((AgsThread *) single_thread); } } void ags_test_launch_filename(gchar *filename, gboolean single_thread) { AgsMutexManager *mutex_manager; AgsThread *audio_loop, *polling_thread, *gui_thread, *task_thread; AgsThreadPool *thread_pool; AgsConfig *config; GList *start_queue; pthread_mutex_t *application_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get threads, thread pool and config */ pthread_mutex_lock(application_mutex); audio_loop = (AgsThread *) ags_application_context->main_loop; task_thread =(AgsThread *) ags_application_context->task_thread; thread_pool = AGS_TASK_THREAD(task_thread)->thread_pool; config = ags_application_context->config; pthread_mutex_unlock(application_mutex); polling_thread = ags_thread_find_type(audio_loop, AGS_TYPE_POLLING_THREAD); gui_thread = ags_thread_find_type(audio_loop, AGS_TYPE_GUI_THREAD); /* open file */ if(g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "simple-file\0"), "false\0")){ AgsSimpleFile *simple_file; AgsSimpleFileRead *simple_file_read; GError *error; simple_file = (AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, "application-context\0", ags_application_context, "filename\0", filename, NULL); error = NULL; ags_simple_file_open(simple_file, &error); if(error != NULL){ ags_test_show_file_error(filename, error); ags_application_context_quit(ags_application_context); } /* start engine */ pthread_mutex_lock(audio_loop->start_mutex); start_queue = NULL; start_queue = g_list_prepend(start_queue, polling_thread); start_queue = g_list_prepend(start_queue, task_thread); // start_queue = g_list_prepend(start_queue, // gui_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); /* start audio loop and thread pool */ ags_thread_start(audio_loop); ags_thread_pool_start(thread_pool); if(!single_thread){ /* wait for audio loop */ pthread_mutex_lock(audio_loop->start_mutex); if(g_atomic_int_get(&(audio_loop->start_wait)) == TRUE){ g_atomic_int_set(&(audio_loop->start_done), FALSE); while(g_atomic_int_get(&(audio_loop->start_wait)) == TRUE && g_atomic_int_get(&(audio_loop->start_done)) == FALSE){ pthread_cond_wait(audio_loop->start_cond, audio_loop->start_mutex); } } pthread_mutex_unlock(audio_loop->start_mutex); /* start gui thread */ ags_thread_start(gui_thread); /* wait for gui thread */ pthread_mutex_lock(gui_thread->start_mutex); if(g_atomic_int_get(&(gui_thread->start_done)) == FALSE){ g_atomic_int_set(&(gui_thread->start_wait), TRUE); while(g_atomic_int_get(&(gui_thread->start_done)) == FALSE){ g_atomic_int_set(&(gui_thread->start_wait), TRUE); pthread_cond_wait(gui_thread->start_cond, gui_thread->start_mutex); } } pthread_mutex_unlock(gui_thread->start_mutex); /* autosave thread */ if(!g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "autosave-thread\0"), "true\0")){ pthread_mutex_lock(audio_loop->start_mutex); start_queue = g_atomic_pointer_get(&(audio_loop->start_queue)); start_queue = g_list_prepend(start_queue, task_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); } /* now start read task */ simple_file_read = ags_simple_file_read_new(simple_file); ags_task_thread_append_task((AgsTaskThread *) task_thread, (AgsTask *) simple_file_read); }else{ AgsFile *file; GError *error; file = g_object_new(AGS_TYPE_FILE, "application-context\0", ags_application_context, "filename\0", filename, NULL); error = NULL; ags_file_open(file, &error); if(error != NULL){ ags_test_show_file_error(filename, error); ags_application_context_quit(ags_application_context); } ags_file_read(file); ags_file_close(file); } } } gsequencer-1.4.24/ags/test/X/ags_functional_machine_link_test.c0000644000175000017500000010372513247044247021543 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include "gsequencer_setup_util.h" #include "ags_functional_test_util.h" void ags_functional_machine_link_test_add_test(); int ags_functional_machine_link_test_init_suite(); int ags_functional_machine_link_test_clean_suite(); void ags_functional_machine_link_test_master_mixer(); void ags_functional_machine_link_test_slave_mixer(); void ags_functional_machine_link_test_drum(); void ags_functional_machine_link_test_matrix(); void ags_functional_machine_link_test_synth(); #ifdef AGS_WITH_LIBINSTPATCH void ags_functional_machine_link_test_ffplayer_0(); void ags_functional_machine_link_test_ffplayer_1(); #endif void ags_functional_machine_link_test_relink_all(); void ags_functional_machine_link_test_reset_link_all(); void ags_functional_machine_link_test_destroy_all(); #define AGS_FUNCTIONAL_MACHINE_LINK_TEST_MASTER_MIXER_INPUT_PADS (1) #define AGS_FUNCTIONAL_MACHINE_LINK_TEST_MATRIX_OUTPUT_PADS (2) #define AGS_FUNCTIONAL_MACHINE_LINK_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsXorgApplicationContext *xorg_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; AgsMachine *panel; AgsMachine *master_mixer; AgsMachine *slave_mixer; AgsMachine *drum; AgsMachine *matrix; AgsMachine *synth; #ifdef AGS_WITH_LIBINSTPATCH AgsMachine *ffplayer_0; AgsMachine *ffplayer_1; #endif void ags_functional_machine_link_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of GSequencer machine link master mixer\0", ags_functional_machine_link_test_master_mixer) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine link slave mixer\0", ags_functional_machine_link_test_slave_mixer) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine link drum\0", ags_functional_machine_link_test_drum) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine link matrix\0", ags_functional_machine_link_test_matrix) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine link synth\0", ags_functional_machine_link_test_synth) == NULL) || #ifdef AGS_WITH_LIBINSTPATCH (CU_add_test(pSuite, "functional test of GSequencer machine link fplayer #0\0", ags_functional_machine_link_test_ffplayer_0) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine link fplayer #1\0", ags_functional_machine_link_test_ffplayer_1) == NULL) || #endif (CU_add_test(pSuite, "functional test of GSequencer machine relink all\0", ags_functional_machine_link_test_relink_all) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine reset link all\0", ags_functional_machine_link_test_reset_link_all) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine link destroy all\0", ags_functional_machine_link_test_destroy_all) == NULL)){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_machine_link_test_init_suite() { GList *list_start, *list; guint nth_machine; /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); /* add panel */ ags_functional_test_util_add_machine(NULL, "Panel"); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve panel */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_PANEL(list->data)){ panel = list->data; }else{ panel = NULL; } ags_functional_test_util_machine_hide(nth_machine); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_machine_link_test_clean_suite() { return(0); } void ags_functional_machine_link_test_master_mixer() { GtkDialog *properties; GList *list_start, *list; gchar *link_name; guint resize_tab; guint output_tab; guint nth_machine; gboolean success; /* add mixer */ success = ags_functional_test_util_add_machine(NULL, "Mixer"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); /* retrieve master mixer */ nth_machine = 1; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MIXER(list->data)){ master_mixer = list->data; }else{ master_mixer = NULL; } CU_ASSERT(master_mixer != NULL); /* * resize input pads */ /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); /* click tab */ resize_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_RESIZE_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_machine); CU_ASSERT(success == TRUE); /* resize input */ success = ags_functional_test_util_machine_properties_resize_inputs(nth_machine, AGS_FUNCTIONAL_MACHINE_LINK_TEST_MASTER_MIXER_INPUT_PADS); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(master_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* * link panel with master mixer */ /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); /* click tab */ output_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_OUTPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_machine, output_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(panel), AGS_MACHINE(panel)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_machine, 0, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_machine, 0, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(master_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* hide */ success = ags_functional_test_util_machine_hide(nth_machine); CU_ASSERT(success == TRUE); } void ags_functional_machine_link_test_slave_mixer() { GtkDialog *properties; GList *list_start, *list; gchar *link_name; guint resize_tab; guint output_tab; guint nth_machine; gboolean success; /* add mixer */ success = ags_functional_test_util_add_machine(NULL, "Mixer"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); /* retrieve master mixer */ nth_machine = 2; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MIXER(list->data)){ slave_mixer = list->data; }else{ slave_mixer = NULL; } CU_ASSERT(slave_mixer != NULL); /* * link master mixer with slave mixer */ /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); /* click tab */ output_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_OUTPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_machine, output_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(master_mixer), AGS_MACHINE(master_mixer)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_machine, 0, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_machine, 0, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* hide */ success = ags_functional_test_util_machine_hide(nth_machine); CU_ASSERT(success == TRUE); } void ags_functional_machine_link_test_drum() { GtkDialog *properties; GList *list_start, *list; gchar *link_name; guint resize_tab; guint input_tab; guint nth_parent_machine; guint nth_machine; gboolean success; /* add drum */ success = ags_functional_test_util_add_machine(NULL, "Drum"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); /* retrieve drum */ nth_parent_machine = 2; nth_machine = 3; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_DRUM(list->data)){ drum = list->data; }else{ drum = NULL; } CU_ASSERT(drum != NULL); /* * link slave mixer with drum */ /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(drum), AGS_MACHINE(drum)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 0, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 0, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* hide */ success = ags_functional_test_util_machine_hide(nth_machine); CU_ASSERT(success == TRUE); } void ags_functional_machine_link_test_matrix() { GtkDialog *properties; GList *list_start, *list; gchar *link_name; guint resize_tab; guint input_tab; guint nth_parent_machine; guint nth_machine; gboolean success; /* add matrix */ success = ags_functional_test_util_add_machine(NULL, "Matrix"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); /* retrieve matrix */ nth_parent_machine = 2; nth_machine = 4; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MATRIX(list->data)){ matrix = list->data; }else{ matrix = NULL; } CU_ASSERT(matrix != NULL); /* * resize output pads */ /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); /* click tab */ resize_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_RESIZE_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_machine); CU_ASSERT(success == TRUE); /* resize output */ success = ags_functional_test_util_machine_properties_resize_outputs(nth_machine, AGS_FUNCTIONAL_MACHINE_LINK_TEST_MATRIX_OUTPUT_PADS); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(matrix)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* * link slave mixer with matrix */ /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(matrix), AGS_MACHINE(matrix)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 1, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 1, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* hide */ success = ags_functional_test_util_machine_hide(nth_machine); CU_ASSERT(success == TRUE); } void ags_functional_machine_link_test_synth() { GtkDialog *properties; GList *list_start, *list; gchar *link_name; guint input_line_count; guint input_link_tab; guint nth_parent_machine; guint nth_machine; gboolean success; /* add synth */ success = ags_functional_test_util_add_machine(NULL, "Synth"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); /* retrieve synth */ nth_parent_machine = 4; nth_machine = 5; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_SYNTH(list->data)){ synth = list->data; }else{ synth = NULL; } CU_ASSERT(synth != NULL); /* * link matrix with synth */ /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_link_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_BULK_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_link_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(synth), AGS_MACHINE(synth)->machine_name); input_line_count = matrix->audio->input_lines; ags_test_leave(); success = ags_functional_test_util_machine_properties_bulk_add(nth_parent_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_bulk_link(nth_parent_machine, 0, link_name); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_bulk_count(nth_parent_machine, 0, input_line_count); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(matrix)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* hide */ success = ags_functional_test_util_machine_hide(nth_machine); CU_ASSERT(success == TRUE); } #ifdef AGS_WITH_LIBINSTPATCH void ags_functional_machine_link_test_ffplayer_0() { GtkDialog *properties; GList *list_start, *list; gchar *link_name; guint resize_tab; guint input_tab; guint nth_parent_machine; guint nth_machine; gboolean success; /* add ffplayer #0 */ success = ags_functional_test_util_add_machine(NULL, "FPlayer"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); /* retrieve ffplayer #0 */ nth_parent_machine = 2; nth_machine = 6; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_FFPLAYER(list->data)){ ffplayer_0 = list->data; }else{ ffplayer_0 = NULL; } CU_ASSERT(ffplayer_0 != NULL); /* * link slave mixer with ffplayer #0 */ /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(ffplayer_0), AGS_MACHINE(ffplayer_0)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 2, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 2, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* hide */ success = ags_functional_test_util_machine_hide(nth_machine); CU_ASSERT(success == TRUE); } void ags_functional_machine_link_test_ffplayer_1() { GtkDialog *properties; GList *list_start, *list; gchar *link_name; guint resize_tab; guint input_tab; guint nth_parent_machine; guint nth_machine; gboolean success; /* add ffplayer #1 */ success = ags_functional_test_util_add_machine(NULL, "FPlayer"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); /* retrieve ffplayer #1 */ nth_parent_machine = 2; nth_machine = 7; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_FFPLAYER(list->data)){ ffplayer_1 = list->data; }else{ ffplayer_1 = NULL; } CU_ASSERT(ffplayer_1 != NULL); /* * link slave mixer with ffplayer #1 */ /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(ffplayer_1), AGS_MACHINE(ffplayer_1)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 3, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 3, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* hide */ success = ags_functional_test_util_machine_hide(nth_machine); CU_ASSERT(success == TRUE); } #endif void ags_functional_machine_link_test_relink_all() { GtkDialog *properties; GList *list_start, *list; gchar *link_name; guint resize_tab; guint input_tab; guint nth_parent_machine; guint nth_machine; gboolean success; #ifdef AGS_WITH_LIBINSTPATCH /* * relink slave mixer with ffplayer #0 */ /* */ nth_parent_machine = 2; nth_machine = 6; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(ffplayer_0), AGS_MACHINE(ffplayer_0)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 7, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 7, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); #endif /* * relink slave mixer with drum */ /* */ nth_parent_machine = 2; nth_machine = 3; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(drum), AGS_MACHINE(drum)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 6, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 6, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* * relink slave mixer with matrix */ /* */ nth_parent_machine = 2; nth_machine = 4; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(matrix), AGS_MACHINE(matrix)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 0, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 0, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); } void ags_functional_machine_link_test_reset_link_all() { GtkDialog *properties; GList *list_start, *list; gchar *link_name; guint resize_tab; guint input_tab; guint nth_parent_machine; guint nth_machine; gboolean success; #ifdef AGS_WITH_LIBINSTPATCH /* * reset link slave mixer with ffplayer #0 */ /* */ nth_parent_machine = 2; nth_machine = 6; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(ffplayer_0), AGS_MACHINE(ffplayer_0)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 0, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 0, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); #endif /* * reset link slave mixer with drum */ /* */ nth_parent_machine = 2; nth_machine = 3; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(drum), AGS_MACHINE(drum)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 1, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 1, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* * reset link slave mixer with matrix */ /* */ nth_parent_machine = 2; nth_machine = 4; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(matrix), AGS_MACHINE(matrix)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 1, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 1, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); /* * reset link slave mixer with drum */ /* */ nth_parent_machine = 2; nth_machine = 3; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_parent_machine); CU_ASSERT(success == TRUE); /* click tab */ input_tab = AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB; success = ags_functional_test_util_machine_properties_click_tab(nth_parent_machine, input_tab); CU_ASSERT(success == TRUE); /* click enable */ success = ags_functional_test_util_machine_properties_click_enable(nth_parent_machine); CU_ASSERT(success == TRUE); /* set link */ ags_test_enter(); link_name = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(drum), AGS_MACHINE(drum)->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 2, 0, link_name, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_link_set(nth_parent_machine, 2, 1, link_name, 1); CU_ASSERT(success == TRUE); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(slave_mixer)->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(properties); CU_ASSERT(success == TRUE); } void ags_functional_machine_link_test_destroy_all() { gboolean success; /* destroy master mixer */ success = ags_functional_test_util_machine_destroy(1); CU_ASSERT(success == TRUE); /* destroy master panel */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); /* destroy matrix */ success = ags_functional_test_util_machine_destroy(2); CU_ASSERT(success == TRUE); /* destroy drum */ success = ags_functional_test_util_machine_destroy(1); CU_ASSERT(success == TRUE); /* destroy slave mixer */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); /* destroy synth */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); #ifdef AGS_WITH_LIBINSTPATCH /* destroy ffplayer #0 */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); /* destroy ffplayer #1 */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); #endif } int main(int argc, char **argv) { /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalMachineLinkTest\0", ags_functional_machine_link_test_init_suite, ags_functional_machine_link_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_MACHINE_LINK_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_machine_link_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/X/machine/0000755000175000017500000000000013256233676014325 500000000000000gsequencer-1.4.24/ags/test/X/machine/ags_functional_panel_test.c0000644000175000017500000001666513247044247021633 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include "../gsequencer_setup_util.h" #include "../ags_functional_test_util.h" void ags_functional_panel_test_add_test(); int ags_functional_panel_test_init_suite(); int ags_functional_panel_test_clean_suite(); void ags_functional_panel_test_resize_pads(); void ags_functional_panel_test_resize_audio_channels(); #define AGS_FUNCTIONAL_PANEL_TEST_RESIZE_OUTPUT_PADS (5) #define AGS_FUNCTIONAL_PANEL_TEST_RESIZE_INPUT_PADS (15) #define AGS_FUNCTIONAL_PANEL_TEST_RESIZE_AUDIO_CHANNELS (7) #define AGS_FUNCTIONAL_PANEL_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; void ags_functional_panel_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of AgsPanel resize pads\0", ags_functional_panel_test_resize_pads) == NULL) || (CU_add_test(pSuite, "functional test of AgsPanel resize audio channels\0", ags_functional_panel_test_resize_audio_channels) == NULL)){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_panel_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_panel_test_clean_suite() { return(0); } void ags_functional_panel_test_resize_pads() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsPanel *panel; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add panel */ success = ags_functional_test_util_add_machine(NULL, "Panel"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve panel */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_PANEL(list->data)){ panel = list->data; }else{ panel = NULL; } CU_ASSERT(panel != NULL); /* * resize output and input pads */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output pads */ ags_functional_test_util_machine_properties_resize_outputs(nth_machine, AGS_FUNCTIONAL_PANEL_TEST_RESIZE_OUTPUT_PADS); /* set input pads */ ags_functional_test_util_machine_properties_resize_inputs(nth_machine, AGS_FUNCTIONAL_PANEL_TEST_RESIZE_INPUT_PADS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(panel)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy panel */ success = ags_functional_test_util_machine_destroy(0); } void ags_functional_panel_test_resize_audio_channels() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsPanel *panel; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add panel */ success = ags_functional_test_util_add_machine(NULL, "Panel"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve panel */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_PANEL(list->data)){ panel = list->data; }else{ panel = NULL; } CU_ASSERT(panel != NULL); /* * resize audio channels */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output audio_channels */ ags_functional_test_util_machine_properties_resize_audio_channels(nth_machine, AGS_FUNCTIONAL_PANEL_TEST_RESIZE_AUDIO_CHANNELS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(panel)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy panel */ success = ags_functional_test_util_machine_destroy(0); } int main(int argc, char **argv) { /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalPanelTest\0", ags_functional_panel_test_init_suite, ags_functional_panel_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_PANEL_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_panel_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/X/machine/ags_functional_mixer_test.c0000644000175000017500000001703013247044247021643 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include "../gsequencer_setup_util.h" #include "../ags_functional_test_util.h" void ags_functional_mixer_test_add_test(); int ags_functional_mixer_test_init_suite(); int ags_functional_mixer_test_clean_suite(); void ags_functional_mixer_test_resize_pads(); void ags_functional_mixer_test_resize_audio_channels(); #define AGS_FUNCTIONAL_MIXER_TEST_RESIZE_OUTPUT_PADS (5) #define AGS_FUNCTIONAL_MIXER_TEST_RESIZE_INPUT_PADS (15) #define AGS_FUNCTIONAL_MIXER_TEST_RESIZE_AUDIO_CHANNELS (7) #define AGS_FUNCTIONAL_MIXER_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; void ags_functional_mixer_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of AgsMixer resize pads\0", ags_functional_mixer_test_resize_pads) == NULL) || (CU_add_test(pSuite, "functional test of AgsMixer resize audio channels\0", ags_functional_mixer_test_resize_audio_channels) == NULL)){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_mixer_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_mixer_test_clean_suite() { return(0); } void ags_functional_mixer_test_resize_pads() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsMixer *mixer; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add mixer */ success = ags_functional_test_util_add_machine(NULL, "Mixer"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve mixer */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MIXER(list->data)){ mixer = list->data; }else{ mixer = NULL; } CU_ASSERT(mixer != NULL); /* * resize output and input pads */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output pads */ ags_functional_test_util_machine_properties_resize_outputs(nth_machine, AGS_FUNCTIONAL_MIXER_TEST_RESIZE_OUTPUT_PADS); /* set input pads */ ags_functional_test_util_machine_properties_resize_inputs(nth_machine, AGS_FUNCTIONAL_MIXER_TEST_RESIZE_INPUT_PADS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(mixer)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy mixer */ success = ags_functional_test_util_machine_destroy(0); } void ags_functional_mixer_test_resize_audio_channels() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsMixer *mixer; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add mixer */ success = ags_functional_test_util_add_machine(NULL, "Mixer"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve mixer */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MIXER(list->data)){ mixer = list->data; }else{ mixer = NULL; } CU_ASSERT(mixer != NULL); /* * resize audio channels */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output audio_channels */ ags_functional_test_util_machine_properties_resize_audio_channels(nth_machine, AGS_FUNCTIONAL_MIXER_TEST_RESIZE_AUDIO_CHANNELS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(mixer)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy mixer */ success = ags_functional_test_util_machine_destroy(0); } int main(int argc, char **argv) { /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalMixerTest\0", ags_functional_mixer_test_init_suite, ags_functional_mixer_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_MIXER_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_mixer_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/X/machine/ags_functional_synth_test.c0000644000175000017500000001703213247044247021666 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include "../gsequencer_setup_util.h" #include "../ags_functional_test_util.h" void ags_functional_synth_test_add_test(); int ags_functional_synth_test_init_suite(); int ags_functional_synth_test_clean_suite(); void ags_functional_synth_test_resize_pads(); void ags_functional_synth_test_resize_audio_channels(); #define AGS_FUNCTIONAL_SYNTH_TEST_RESIZE_OUTPUT_PADS (5) #define AGS_FUNCTIONAL_SYNTH_TEST_RESIZE_INPUT_PADS (15) #define AGS_FUNCTIONAL_SYNTH_TEST_RESIZE_AUDIO_CHANNELS (0) #define AGS_FUNCTIONAL_SYNTH_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; void ags_functional_synth_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of AgsSynth resize pads\0", ags_functional_synth_test_resize_pads) == NULL) || (CU_add_test(pSuite, "functional test of AgsSynth resize audio channels\0", ags_functional_synth_test_resize_audio_channels) == NULL)){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_synth_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_synth_test_clean_suite() { return(0); } void ags_functional_synth_test_resize_pads() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsSynth *synth; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add synth */ success = ags_functional_test_util_add_machine(NULL, "Synth"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve synth */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_SYNTH(list->data)){ synth = list->data; }else{ synth = NULL; } CU_ASSERT(synth != NULL); /* * resize output and input pads */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output pads */ ags_functional_test_util_machine_properties_resize_outputs(nth_machine, AGS_FUNCTIONAL_SYNTH_TEST_RESIZE_OUTPUT_PADS); /* set input pads */ ags_functional_test_util_machine_properties_resize_inputs(nth_machine, AGS_FUNCTIONAL_SYNTH_TEST_RESIZE_INPUT_PADS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(synth)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy synth */ success = ags_functional_test_util_machine_destroy(0); } void ags_functional_synth_test_resize_audio_channels() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsSynth *synth; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add synth */ success = ags_functional_test_util_add_machine(NULL, "Synth"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve synth */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_SYNTH(list->data)){ synth = list->data; }else{ synth = NULL; } CU_ASSERT(synth != NULL); /* * resize audio channels */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output audio_channels */ ags_functional_test_util_machine_properties_resize_audio_channels(nth_machine, AGS_FUNCTIONAL_SYNTH_TEST_RESIZE_AUDIO_CHANNELS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(synth)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy synth */ success = ags_functional_test_util_machine_destroy(0); } int main(int argc, char **argv) { /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalSynthTest\0", ags_functional_synth_test_init_suite, ags_functional_synth_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_SYNTH_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_synth_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/X/machine/ags_functional_matrix_test.c0000644000175000017500000001711013247044247022022 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include "../gsequencer_setup_util.h" #include "../ags_functional_test_util.h" void ags_functional_matrix_test_add_test(); int ags_functional_matrix_test_init_suite(); int ags_functional_matrix_test_clean_suite(); void ags_functional_matrix_test_resize_pads(); void ags_functional_matrix_test_resize_audio_channels(); #define AGS_FUNCTIONAL_MATRIX_TEST_RESIZE_OUTPUT_PADS (5) #define AGS_FUNCTIONAL_MATRIX_TEST_RESIZE_INPUT_PADS (15) #define AGS_FUNCTIONAL_MATRIX_TEST_RESIZE_AUDIO_CHANNELS (0) #define AGS_FUNCTIONAL_MATRIX_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; void ags_functional_matrix_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of AgsMatrix resize pads\0", ags_functional_matrix_test_resize_pads) == NULL) || (CU_add_test(pSuite, "functional test of AgsMatrix resize audio channels\0", ags_functional_matrix_test_resize_audio_channels) == NULL)){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_matrix_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_matrix_test_clean_suite() { return(0); } void ags_functional_matrix_test_resize_pads() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsMatrix *matrix; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add matrix */ success = ags_functional_test_util_add_machine(NULL, "Matrix"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve matrix */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MATRIX(list->data)){ matrix = list->data; }else{ matrix = NULL; } CU_ASSERT(matrix != NULL); /* * resize output and input pads */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output pads */ ags_functional_test_util_machine_properties_resize_outputs(nth_machine, AGS_FUNCTIONAL_MATRIX_TEST_RESIZE_OUTPUT_PADS); /* set input pads */ ags_functional_test_util_machine_properties_resize_inputs(nth_machine, AGS_FUNCTIONAL_MATRIX_TEST_RESIZE_INPUT_PADS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(matrix)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy matrix */ success = ags_functional_test_util_machine_destroy(0); } void ags_functional_matrix_test_resize_audio_channels() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsMatrix *matrix; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add matrix */ success = ags_functional_test_util_add_machine(NULL, "Matrix"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve matrix */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MATRIX(list->data)){ matrix = list->data; }else{ matrix = NULL; } CU_ASSERT(matrix != NULL); /* * resize audio channels */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output audio_channels */ ags_functional_test_util_machine_properties_resize_audio_channels(nth_machine, AGS_FUNCTIONAL_MATRIX_TEST_RESIZE_AUDIO_CHANNELS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(matrix)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy matrix */ success = ags_functional_test_util_machine_destroy(0); } int main(int argc, char **argv) { /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalMatrixTest\0", ags_functional_matrix_test_init_suite, ags_functional_matrix_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_MATRIX_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_matrix_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/X/machine/ags_functional_drum_test.c0000644000175000017500000002251313247044247021470 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include "../gsequencer_setup_util.h" #include "../ags_functional_test_util.h" void ags_functional_drum_test_add_test(); int ags_functional_drum_test_init_suite(); int ags_functional_drum_test_clean_suite(); void ags_functional_drum_test_open_drum_kit(); void ags_functional_drum_test_resize_pads(); void ags_functional_drum_test_resize_audio_channels(); #define AGS_FUNCTIONAL_DRUM_TEST_OPEN_DRUM_KIT_PATH "/usr/share/hydrogen/data/drumkits/HardElectro1/" #define AGS_FUNCTIONAL_DRUM_TEST_RESIZE_OUTPUT_PADS (5) #define AGS_FUNCTIONAL_DRUM_TEST_RESIZE_INPUT_PADS (15) #define AGS_FUNCTIONAL_DRUM_TEST_RESIZE_AUDIO_CHANNELS (7) #define AGS_FUNCTIONAL_DRUM_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; void ags_functional_drum_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of AgsDrum open drum kit\0", ags_functional_drum_test_open_drum_kit) == NULL) || (CU_add_test(pSuite, "functional test of AgsDrum resize pads\0", ags_functional_drum_test_resize_pads) == NULL) || (CU_add_test(pSuite, "functional test of AgsDrum resize audio channels\0", ags_functional_drum_test_resize_audio_channels) == NULL)){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_drum_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_drum_test_clean_suite() { return(0); } void ags_functional_drum_test_open_drum_kit() { AgsXorgApplicationContext *xorg_application_context; AgsDrum *drum; GList *list_start, *list; guint nth_machine; gboolean success; /* add drum */ success = ags_functional_test_util_add_machine(NULL, "Drum"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve drum */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_DRUM(list->data)){ drum = list->data; }else{ drum = NULL; } CU_ASSERT(drum != NULL); /* open dialog */ success = ags_functional_test_util_drum_open(0); CU_ASSERT(success == TRUE); /* open path */ success = ags_functional_test_util_file_chooser_open_path(GTK_FILE_CHOOSER(drum->open_dialog), AGS_FUNCTIONAL_DRUM_TEST_OPEN_DRUM_KIT_PATH); CU_ASSERT(success == TRUE); /* select all */ success = ags_functional_test_util_file_chooser_select_all(GTK_FILE_CHOOSER(drum->open_dialog)); CU_ASSERT(success == TRUE); /* response ok */ success = ags_functional_test_util_dialog_ok(GTK_DIALOG(drum->open_dialog)); CU_ASSERT(success == TRUE); /* destroy drum */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); } void ags_functional_drum_test_resize_pads() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsDrum *drum; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add drum */ success = ags_functional_test_util_add_machine(NULL, "Drum"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve drum */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_DRUM(list->data)){ drum = list->data; }else{ drum = NULL; } CU_ASSERT(drum != NULL); /* * resize output and input pads */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output pads */ ags_functional_test_util_machine_properties_resize_outputs(nth_machine, AGS_FUNCTIONAL_DRUM_TEST_RESIZE_OUTPUT_PADS); /* set input pads */ ags_functional_test_util_machine_properties_resize_inputs(nth_machine, AGS_FUNCTIONAL_DRUM_TEST_RESIZE_INPUT_PADS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(drum)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy drum */ success = ags_functional_test_util_machine_destroy(0); } void ags_functional_drum_test_resize_audio_channels() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsDrum *drum; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add drum */ success = ags_functional_test_util_add_machine(NULL, "Drum"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve drum */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_DRUM(list->data)){ drum = list->data; }else{ drum = NULL; } CU_ASSERT(drum != NULL); /* * resize audio channels */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output audio_channels */ ags_functional_test_util_machine_properties_resize_audio_channels(nth_machine, AGS_FUNCTIONAL_DRUM_TEST_RESIZE_AUDIO_CHANNELS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(drum)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy drum */ success = ags_functional_test_util_machine_destroy(0); } int main(int argc, char **argv) { /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalDrumTest\0", ags_functional_drum_test_init_suite, ags_functional_drum_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_DRUM_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_drum_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/X/machine/ags_functional_ffplayer_test.c0000644000175000017500000002311013247044247022323 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include "../gsequencer_setup_util.h" #include "../ags_functional_test_util.h" void ags_functional_ffplayer_test_add_test(); int ags_functional_ffplayer_test_init_suite(); int ags_functional_ffplayer_test_clean_suite(); #ifdef AGS_WITH_LIBINSTPATCH void ags_functional_ffplayer_test_open_sf2(); void ags_functional_ffplayer_test_resize_pads(); void ags_functional_ffplayer_test_resize_audio_channels(); #endif #define AGS_FUNCTIONAL_FFPLAYER_TEST_OPEN_SF2_PATH "/usr/share/sounds/sf2" #define AGS_FUNCTIONAL_FFPLAYER_TEST_OPEN_SF2_FILENAME "/usr/share/sounds/sf2/FluidR3_GM.sf2" #define AGS_FUNCTIONAL_FFPLAYER_TEST_RESIZE_OUTPUT_PADS (5) #define AGS_FUNCTIONAL_FFPLAYER_TEST_RESIZE_INPUT_PADS (15) #define AGS_FUNCTIONAL_FFPLAYER_TEST_RESIZE_AUDIO_CHANNELS (7) #define AGS_FUNCTIONAL_FFPLAYER_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; void ags_functional_ffplayer_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of AgsFFPlayer open sf2\0", ags_functional_ffplayer_test_open_sf2) == NULL) || (CU_add_test(pSuite, "functional test of AgsFFPlayer resize pads\0", ags_functional_ffplayer_test_resize_pads) == NULL) || (CU_add_test(pSuite, "functional test of AgsFFPlayer resize audio channels\0", ags_functional_ffplayer_test_resize_audio_channels) == NULL)){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_ffplayer_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_ffplayer_test_clean_suite() { return(0); } void ags_functional_ffplayer_test_open_sf2() { AgsXorgApplicationContext *xorg_application_context; AgsFFPlayer *ffplayer; GList *list_start, *list; guint nth_machine; gboolean success; /* add ffplayer */ success = ags_functional_test_util_add_machine(NULL, "FPlayer"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve ffplayer */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_FFPLAYER(list->data)){ ffplayer = list->data; }else{ ffplayer = NULL; } CU_ASSERT(ffplayer != NULL); /* open dialog */ success = ags_functional_test_util_ffplayer_open(0); CU_ASSERT(success == TRUE); /* open path */ success = ags_functional_test_util_file_chooser_open_path(GTK_FILE_CHOOSER(ffplayer->open_dialog), AGS_FUNCTIONAL_FFPLAYER_TEST_OPEN_SF2_PATH); CU_ASSERT(success == TRUE); /* select sf2 */ success = ags_functional_test_util_file_chooser_select_filename(GTK_FILE_CHOOSER(ffplayer->open_dialog), AGS_FUNCTIONAL_FFPLAYER_TEST_OPEN_SF2_FILENAME); CU_ASSERT(success == TRUE); /* response ok */ success = ags_functional_test_util_dialog_ok(GTK_DIALOG(ffplayer->open_dialog)); CU_ASSERT(success == TRUE); /* destroy ffplayer */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); } void ags_functional_ffplayer_test_resize_pads() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsFFPlayer *ffplayer; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add ffplayer */ success = ags_functional_test_util_add_machine(NULL, "FPlayer"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve ffplayer */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_FFPLAYER(list->data)){ ffplayer = list->data; }else{ ffplayer = NULL; } CU_ASSERT(ffplayer != NULL); /* * resize output and input pads */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output pads */ ags_functional_test_util_machine_properties_resize_outputs(nth_machine, AGS_FUNCTIONAL_FFPLAYER_TEST_RESIZE_OUTPUT_PADS); /* set input pads */ ags_functional_test_util_machine_properties_resize_inputs(nth_machine, AGS_FUNCTIONAL_FFPLAYER_TEST_RESIZE_INPUT_PADS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(ffplayer)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy ffplayer */ success = ags_functional_test_util_machine_destroy(0); } void ags_functional_ffplayer_test_resize_audio_channels() { GtkDialog *properties; AgsXorgApplicationContext *xorg_application_context; AgsFFPlayer *ffplayer; GList *list_start, *list; guint nth_machine; guint resize_tab; gboolean success; /* add ffplayer */ success = ags_functional_test_util_add_machine(NULL, "FPlayer"); CU_ASSERT(success == TRUE); /* */ ags_test_enter(); xorg_application_context = ags_application_context_get_instance(); /* retrieve ffplayer */ nth_machine = 0; list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_FFPLAYER(list->data)){ ffplayer = list->data; }else{ ffplayer = NULL; } CU_ASSERT(ffplayer != NULL); /* * resize audio channels */ /* open properties */ ags_functional_test_util_machine_properties_open(nth_machine); /* click tab */ resize_tab = 4; ags_functional_test_util_machine_properties_click_tab(nth_machine, resize_tab); /* click enable */ ags_functional_test_util_machine_properties_click_enable(nth_machine); /* set output audio_channels */ ags_functional_test_util_machine_properties_resize_audio_channels(nth_machine, AGS_FUNCTIONAL_FFPLAYER_TEST_RESIZE_AUDIO_CHANNELS); /* response ok */ ags_test_enter(); properties = AGS_MACHINE(ffplayer)->properties; ags_test_leave(); ags_functional_test_util_dialog_ok(properties); /* destroy ffplayer */ success = ags_functional_test_util_machine_destroy(0); } int main(int argc, char **argv) { #ifdef AGS_WITH_LIBINSTPATCH /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalFFPlayerTest\0", ags_functional_ffplayer_test_init_suite, ags_functional_ffplayer_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_FFPLAYER_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_ffplayer_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); #else return(0); #endif } gsequencer-1.4.24/ags/test/X/ags_functional_machine_add_and_destroy_test.c0000644000175000017500000001624413247044247023730 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include "gsequencer_setup_util.h" #include "ags_functional_test_util.h" void ags_functional_machine_add_and_destroy_test_add_test(); int ags_functional_machine_add_and_destroy_test_init_suite(); int ags_functional_machine_add_and_destroy_test_clean_suite(); void ags_functional_machine_add_and_destroy_test_panel(); void ags_functional_machine_add_and_destroy_test_mixer(); void ags_functional_machine_add_and_destroy_test_drum(); void ags_functional_machine_add_and_destroy_test_matrix(); void ags_functional_machine_add_and_destroy_test_synth(); #ifdef AGS_WITH_LIBINSTPATCH void ags_functional_machine_add_and_destroy_test_ffplayer(); #endif #define AGS_FUNCTIONAL_MACHINE_ADD_AND_DESTROY_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; void ags_functional_machine_add_and_destroy_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsPanel\0", ags_functional_machine_add_and_destroy_test_panel) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsMixer\0", ags_functional_machine_add_and_destroy_test_mixer) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsDrum\0", ags_functional_machine_add_and_destroy_test_drum) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsMatrix\0", ags_functional_machine_add_and_destroy_test_matrix) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsSynth\0", ags_functional_machine_add_and_destroy_test_synth) == NULL) #ifdef AGS_WITH_LIBINSTPATCH || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsFFPlayer\0", ags_functional_machine_add_and_destroy_test_ffplayer) == NULL) #endif ){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_machine_add_and_destroy_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_machine_add_and_destroy_test_clean_suite() { return(0); } void ags_functional_machine_add_and_destroy_test_panel() { gboolean success; /* add panel */ success = ags_functional_test_util_add_machine(NULL, "Panel"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* destroy panel */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); } void ags_functional_machine_add_and_destroy_test_mixer() { gboolean success; /* add mixer */ success = ags_functional_test_util_add_machine(NULL, "Mixer"); CU_ASSERT(success == TRUE); /* destroy mixer */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); } void ags_functional_machine_add_and_destroy_test_drum() { gboolean success; /* add drum */ success = ags_functional_test_util_add_machine(NULL, "Drum"); CU_ASSERT(success == TRUE); /* destroy drum */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); } void ags_functional_machine_add_and_destroy_test_matrix() { gboolean success; /* add matrix */ success = ags_functional_test_util_add_machine(NULL, "Matrix"); CU_ASSERT(success == TRUE); /* destroy matrix */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); } void ags_functional_machine_add_and_destroy_test_synth() { gboolean success; /* add synth */ success = ags_functional_test_util_add_machine(NULL, "Synth"); CU_ASSERT(success == TRUE); /* destroy synth */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); } void ags_functional_machine_add_and_destroy_test_ffplayer() { gboolean success; /* add fplayer */ success = ags_functional_test_util_add_machine(NULL, "FPlayer"); CU_ASSERT(success == TRUE); /* destroy fplayer */ success = ags_functional_test_util_machine_destroy(0); CU_ASSERT(success == TRUE); } int main(int argc, char **argv) { /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalMachineAddAndDestroyTest\0", ags_functional_machine_add_and_destroy_test_init_suite, ags_functional_machine_add_and_destroy_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_MACHINE_ADD_AND_DESTROY_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_machine_add_and_destroy_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/X/ags_xorg_application_context_test.c0000644000175000017500000001334513247044247022004 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #define AGS_XORG_APPLICATION_CONTEXT_TEST_DISPOSE_DEVOUT_COUNT (8) int ags_xorg_application_context_test_init_suite(); int ags_xorg_application_context_test_clean_suite(); void ags_xorg_application_context_test_dispose(); void ags_xorg_application_context_test_finalize(); void ags_xorg_application_context_test_finalize_stub(GObject *gobject); #define AGS_XORG_APPLICATION_CONTEXT_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" gboolean xorg_application_context_test_finalized; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_xorg_application_context_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_xorg_application_context_test_clean_suite() { return(0); } void ags_xorg_application_context_test_dispose() { AgsXorgApplicationContext *xorg_application_context; AgsConfig *config; config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_XORG_APPLICATION_CONTEXT_TEST_CONFIG, strlen(AGS_XORG_APPLICATION_CONTEXT_TEST_CONFIG)); xorg_application_context = g_object_new(AGS_TYPE_XORG_APPLICATION_CONTEXT, NULL); /* run dispose */ g_object_run_dispose(xorg_application_context); /* assert */ CU_ASSERT(xorg_application_context->thread_pool == NULL); CU_ASSERT(xorg_application_context->polling_thread == NULL); CU_ASSERT(xorg_application_context->soundcard_thread == NULL); CU_ASSERT(xorg_application_context->export_thread == NULL); CU_ASSERT(xorg_application_context->autosave_thread == NULL); CU_ASSERT(xorg_application_context->server == NULL); CU_ASSERT(xorg_application_context->soundcard == NULL); CU_ASSERT(xorg_application_context->sequencer == NULL); CU_ASSERT(xorg_application_context->distributed_manager == NULL); CU_ASSERT(xorg_application_context->window == NULL); } void ags_xorg_application_context_test_finalize() { AgsXorgApplicationContext *xorg_application_context; AgsConfig *config; config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_XORG_APPLICATION_CONTEXT_TEST_CONFIG, strlen(AGS_XORG_APPLICATION_CONTEXT_TEST_CONFIG)); xorg_application_context = g_object_new(AGS_TYPE_XORG_APPLICATION_CONTEXT, NULL); /* run dispose */ g_object_run_dispose(xorg_application_context); /* stub finalize */ xorg_application_context_test_finalized = FALSE; G_OBJECT_GET_CLASS(xorg_application_context)->finalize = ags_xorg_application_context_test_finalize_stub; /* unref and assert */ g_object_unref(xorg_application_context); CU_ASSERT(xorg_application_context_test_finalized == TRUE); } void ags_xorg_application_context_test_finalize_stub(GObject *gobject) { xorg_application_context_test_finalized = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C"); putenv("LANG=C"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsXorgApplicationContextTest", ags_xorg_application_context_test_init_suite, ags_xorg_application_context_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } gtk_init(NULL, NULL); // g_log_set_fatal_mask(G_LOG_DOMAIN, // "GLib-GObject", // "Gtk" G_LOG_DOMAIN, // G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING); /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsXorgApplicationContext doing dispose", ags_xorg_application_context_test_dispose) == NULL) || (CU_add_test(pSuite, "test of AgsXorgApplicationContext doing finalize", ags_xorg_application_context_test_finalize) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/X/ags_functional_editor_workflow_test.c0000644000175000017500000003254113247044247022337 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include "gsequencer_setup_util.h" #include "ags_functional_test_util.h" void ags_functional_editor_workflow_test_add_test(); int ags_functional_editor_workflow_test_init_suite(); int ags_functional_editor_workflow_test_clean_suite(); void ags_functional_editor_workflow_test_drum(); void ags_functional_editor_workflow_test_matrix(); #ifdef AGS_WITH_LIBINSTPATCH void ags_functional_editor_workflow_test_ffplayer(); #endif void ags_functional_editor_workflow_test_edit_all(); void ags_functional_editor_workflow_test_fill_all(); #define AGS_FUNCTIONAL_EDITOR_WORKFLOW_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; void ags_functional_editor_workflow_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of GSequencer editor workflow AgsDrum\0", ags_functional_editor_workflow_test_drum) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer editor workflow AgsMatrix\0", ags_functional_editor_workflow_test_matrix) == NULL) || #ifdef AGS_WITH_LIBINSTPATCH (CU_add_test(pSuite, "functional test of GSequencer editor workflow AgsFFPlayer\0", ags_functional_editor_workflow_test_ffplayer) == NULL) || #endif (CU_add_test(pSuite, "functional test of GSequencer editor workflow edit all\0", ags_functional_editor_workflow_test_edit_all) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer editor workflow fill all\0", ags_functional_editor_workflow_test_fill_all) == NULL)){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_editor_workflow_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); /* get task thread */ task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); /* window and editor size */ ags_functional_test_util_file_default_window_resize(); ags_functional_test_util_file_default_editor_resize(); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_editor_workflow_test_clean_suite() { return(0); } void ags_functional_editor_workflow_test_drum() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachine *machine; AgsMachineSelector *machine_selector; AgsMachineSelection *machine_selection; GList *list_start, *list; gchar *machine_str; guint nth_machine; gboolean success; xorg_application_context = ags_application_context; nth_machine = 0; /* add drum */ success = ags_functional_test_util_add_machine(NULL, "Drum"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* get machine */ ags_test_enter(); list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_DRUM(list->data)){ machine = list->data; }else{ machine = NULL; } CU_ASSERT(machine != NULL); /* * add machine to editor */ ags_test_enter(); window = xorg_application_context->window; notation_editor = window->notation_editor; ags_test_leave(); /* add index and link */ success = ags_functional_test_util_machine_selection_add_index(); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_selector_select(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_selection_link_index(); CU_ASSERT(success == TRUE); /* select machine */ ags_test_enter(); machine_selector = notation_editor->machine_selector; machine_selection = machine_selector->machine_selection; machine_str = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(machine), machine->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_selection_select(machine_str); CU_ASSERT(success == TRUE); success = ags_functional_test_util_dialog_ok(machine_selection); CU_ASSERT(success == TRUE); } void ags_functional_editor_workflow_test_matrix() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachine *machine; AgsMachineSelector *machine_selector; AgsMachineSelection *machine_selection; GList *list_start, *list; gchar *machine_str; guint nth_machine; gboolean success; xorg_application_context = ags_application_context; nth_machine = 1; /* add matrix */ success = ags_functional_test_util_add_machine(NULL, "Matrix"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* get machine */ ags_test_enter(); list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MATRIX(list->data)){ machine = list->data; }else{ machine = NULL; } CU_ASSERT(machine != NULL); /* * add machine to editor */ ags_test_enter(); window = xorg_application_context->window; notation_editor = window->notation_editor; ags_test_leave(); /* add index set link */ success = ags_functional_test_util_machine_selection_add_index(); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_selector_select(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_selection_link_index(); CU_ASSERT(success == TRUE); /* select machine */ ags_test_enter(); machine_selector = notation_editor->machine_selector; machine_selection = machine_selector->machine_selection; machine_str = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(machine), machine->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_selection_select(machine_str); CU_ASSERT(success == TRUE); success = ags_functional_test_util_dialog_ok(machine_selection); CU_ASSERT(success == TRUE); } #ifdef AGS_WITH_LIBINSTPATCH void ags_functional_editor_workflow_test_ffplayer() { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachine *machine; AgsMachineSelector *machine_selector; AgsMachineSelection *machine_selection; GList *list_start, *list; gchar *machine_str; guint nth_machine; gboolean success; xorg_application_context = ags_application_context; nth_machine = 2; /* add fplayer */ success = ags_functional_test_util_add_machine(NULL, "FPlayer"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* get machine */ ags_test_enter(); list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_FFPLAYER(list->data)){ machine = list->data; }else{ machine = NULL; } CU_ASSERT(machine != NULL); /* * add machine to editor */ ags_test_enter(); window = xorg_application_context->window; notation_editor = window->notation_editor; ags_test_leave(); /* add index and link */ success = ags_functional_test_util_machine_selection_add_index(); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_selector_select(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_selection_link_index(); CU_ASSERT(success == TRUE); /* select machine */ ags_test_enter(); machine_selector = notation_editor->machine_selector; machine_selection = machine_selector->machine_selection; machine_str = g_strdup_printf("%s: %s\0", G_OBJECT_TYPE_NAME(machine), machine->machine_name); ags_test_leave(); success = ags_functional_test_util_machine_selection_select(machine_str); CU_ASSERT(success == TRUE); success = ags_functional_test_util_dialog_ok(machine_selection); CU_ASSERT(success == TRUE); } #endif void ags_functional_editor_workflow_test_edit_all() { guint nth_machine; guint i, j; gboolean success; /* * edit drum */ nth_machine = 0; /* set zoom */ success = ags_functional_test_util_notation_toolbar_zoom(AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_1_TO_4); CU_ASSERT(success == TRUE); /* edit tool */ success = ags_functional_test_util_notation_toolbar_edit_click(); CU_ASSERT(success == TRUE); /* select index */ success = ags_functional_test_util_machine_selector_select(nth_machine); CU_ASSERT(success == TRUE); /* add drum kick pattern 2/4 */ success = TRUE; for(i = 0; i < 64 && success;){ success = ags_functional_test_util_notation_edit_add_point(i, i, 0); i += 8; } for(i = 4; i < 64 && success;){ success = ags_functional_test_util_notation_edit_add_point(i, i, 1); i += 8; } CU_ASSERT(success == TRUE); /* * edit matrix */ nth_machine = 1; /* select index */ success = ags_functional_test_util_machine_selector_select(nth_machine); CU_ASSERT(success == TRUE); /* set zoom */ success = ags_functional_test_util_notation_toolbar_zoom(AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_1_TO_8); CU_ASSERT(success == TRUE); /* add matrix baseline pattern 8/8 */ success = TRUE; for(i = 0; i < 32 && success;){ for(j = 0; j < 56 && success;){ success = ags_functional_test_util_notation_edit_add_point(i * 8 + j, i * 8 + j, 15); j += 8; } if(!success){ break; } success = ags_functional_test_util_notation_edit_add_point(i * 8 + 56, i * 8 + 56, 14); i += 8; } CU_ASSERT(success == TRUE); #ifdef AGS_WITH_LIBINSTPATCH /* * edit ffplayer */ nth_machine = 2; /* select index */ success = ags_functional_test_util_machine_selector_select(nth_machine); CU_ASSERT(success == TRUE); /* set zoom */ success = ags_functional_test_util_notation_toolbar_zoom(AGS_FUNCTIONAL_TEST_UTIL_TOOLBAR_ZOOM_1_TO_4); CU_ASSERT(success == TRUE); /* add ffplayer note 4/4 */ success = TRUE; for(i = 0; i < 64 && success;){ success = ags_functional_test_util_notation_edit_add_point(i, i + 1, rand() % 10); i += 8; } CU_ASSERT(success == TRUE); #endif } void ags_functional_editor_workflow_test_fill_all() { guint nth_machine; } int main(int argc, char **argv) { /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalEditorWorkflowTest\0", ags_functional_editor_workflow_test_init_suite, ags_functional_editor_workflow_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_EDITOR_WORKFLOW_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_editor_workflow_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/X/gsequencer_setup_util.h0000644000175000017500000000306013247044247017421 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __GSEQUENCER_TEST_SETUP_UTIL_H__ #define __GSEQUENCER_TEST_SETUP_UTIL_H__ #include #include #define GSEQUENCER_RT_PRIORITY (95) void ags_test_enter(); void ags_test_leave(); pthread_mutex_t* ags_test_get_driver_mutex(); void ags_test_init(int *argc, char ***argv, gchar *conf_str); void ags_test_quit(); void ags_test_show_file_error(gchar *filename, GError *error); void ags_test_signal_handler(int signr); void ags_test_signal_cleanup(); void ags_test_setup(int argc, char **argv); void ags_test_start_animation(pthread_t *thread); void* ags_test_start_animation_thread(void *ptr); void ags_test_launch(gboolean single_thread); void ags_test_launch_filename(gchar *filename, gboolean single_thread); #endif /*__GSEQUENCER_TEST_SETUP_UTIL_H__*/ gsequencer-1.4.24/ags/test/X/ags_functional_line_member_add_and_destroy_test.c0000644000175000017500000010725513247044247024605 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include "gsequencer_setup_util.h" #include "ags_functional_test_util.h" void ags_functional_line_member_add_and_destroy_test_add_test(); int ags_functional_line_member_add_and_destroy_test_init_suite(); int ags_functional_line_member_add_and_destroy_test_clean_suite(); void ags_functional_line_member_add_and_destroy_test_panel(); void ags_functional_line_member_add_and_destroy_test_mixer(); void ags_functional_line_member_add_and_destroy_test_drum(); void ags_functional_line_member_add_and_destroy_test_matrix(); void ags_functional_line_member_add_and_destroy_test_synth(); #ifdef AGS_WITH_LIBINSTPATCH void ags_functional_line_member_add_and_destroy_test_ffplayer(); #endif #define AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT "/usr/lib/ladspa/cmt.so\0" #define AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_DELAY "Echo Delay Line (Maximum Delay 1s)\0" #define AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_FREEVERB "Freeverb (Version 3)\0" #define AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH "/usr/lib/lv2/gverb-swh.lv2/plugin-linux.so\0" #define AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH_GVERB "GVerb\0" #define AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" CU_pSuite pSuite = NULL; volatile gboolean is_available; extern AgsApplicationContext *ags_application_context; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; void ags_functional_line_member_add_and_destroy_test_add_test() { /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of GSequencer line member add and destroy AgsPanel\0", ags_functional_line_member_add_and_destroy_test_panel) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer line member add and destroy AgsMixer\0", ags_functional_line_member_add_and_destroy_test_mixer) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer line member add and destroy AgsDrum\0", ags_functional_line_member_add_and_destroy_test_drum) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer line member add and destroy AgsMatrix\0", ags_functional_line_member_add_and_destroy_test_matrix) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer line member add and destroy AgsSynth\0", ags_functional_line_member_add_and_destroy_test_synth) == NULL) #ifdef AGS_WITH_LIBINSTPATCH || (CU_add_test(pSuite, "functional test of GSequencer line member add and destroy AgsFFPlayer\0", ags_functional_line_member_add_and_destroy_test_ffplayer) == NULL) #endif ){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error()); } /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_line_member_add_and_destroy_test_init_suite() { /* get gui thread */ gui_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_GUI_THREAD); /* get task thread */ task_thread = ags_thread_find_type(ags_application_context->main_loop, AGS_TYPE_TASK_THREAD); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_line_member_add_and_destroy_test_clean_suite() { return(0); } void ags_functional_line_member_add_and_destroy_test_panel() { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsLineEditor *line_editor; AgsPluginBrowser *plugin_browser; GList *list_start, *list; guint nth_machine; guint nth_pad, nth_audio_channel; gboolean success; xorg_application_context = ags_application_context; /* add panel */ success = ags_functional_test_util_add_machine(NULL, "Panel"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* get machine */ ags_test_enter(); list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_PANEL(list->data)){ machine = list->data; }else{ machine = NULL; } CU_ASSERT(machine != NULL); /* * add line member to input */ nth_machine = 0; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* add ladspa effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* ladspa */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "LADSPA\0"); CU_ASSERT(success == TRUE); /* cmt and delay */ success = ags_functional_test_util_machine_properties_ladspa_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_ladspa_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_DELAY); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* add ladspa effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* ladspa */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "LADSPA\0"); CU_ASSERT(success == TRUE); /* cmt and freeverb */ success = ags_functional_test_util_machine_properties_ladspa_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_ladspa_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_FREEVERB); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = AGS_MACHINE(machine)->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* add lv2 effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* lv2 */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "Lv2\0"); CU_ASSERT(success == TRUE); /* lv2 and gverb */ success = ags_functional_test_util_machine_properties_lv2_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_lv2_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH_GVERB); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* * destroy effects */ nth_machine = 0; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* remove effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 2); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 0); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* destroy panel */ success = ags_functional_test_util_machine_destroy(nth_machine); CU_ASSERT(success == TRUE); } void ags_functional_line_member_add_and_destroy_test_mixer() { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsLineEditor *line_editor; AgsPluginBrowser *plugin_browser; GList *list_start, *list; guint nth_machine; guint nth_pad, nth_audio_channel; gboolean success; xorg_application_context = ags_application_context; /* add mixer */ success = ags_functional_test_util_add_machine(NULL, "Mixer"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* get machine */ ags_test_enter(); list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MIXER(list->data)){ machine = list->data; }else{ machine = NULL; } CU_ASSERT(machine != NULL); /* * add line member to input */ nth_machine = 0; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* add ladspa effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* ladspa */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "LADSPA\0"); CU_ASSERT(success == TRUE); /* cmt and delay */ success = ags_functional_test_util_machine_properties_ladspa_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_ladspa_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_DELAY); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* add ladspa effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* ladspa */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "LADSPA\0"); CU_ASSERT(success == TRUE); /* cmt and freeverb */ success = ags_functional_test_util_machine_properties_ladspa_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_ladspa_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_FREEVERB); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = AGS_MACHINE(machine)->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* add lv2 effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* lv2 */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "Lv2\0"); CU_ASSERT(success == TRUE); /* lv2 and gverb */ success = ags_functional_test_util_machine_properties_lv2_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_lv2_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH_GVERB); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* * destroy effects */ nth_machine = 0; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* remove effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 2); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 0); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* destroy mixer */ success = ags_functional_test_util_machine_destroy(nth_machine); CU_ASSERT(success == TRUE); } void ags_functional_line_member_add_and_destroy_test_drum() { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsLineEditor *line_editor; AgsPluginBrowser *plugin_browser; GList *list_start, *list; guint nth_machine; guint nth_pad, nth_audio_channel; gboolean success; xorg_application_context = ags_application_context; /* add drum */ success = ags_functional_test_util_add_machine(NULL, "Drum"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* get machine */ ags_test_enter(); list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_DRUM(list->data)){ machine = list->data; }else{ machine = NULL; } CU_ASSERT(machine != NULL); /* * add line member to input */ nth_machine = 0; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* add ladspa effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* ladspa */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "LADSPA\0"); CU_ASSERT(success == TRUE); /* cmt and delay */ success = ags_functional_test_util_machine_properties_ladspa_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_ladspa_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_DELAY); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* add ladspa effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* ladspa */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "LADSPA\0"); CU_ASSERT(success == TRUE); /* cmt and freeverb */ success = ags_functional_test_util_machine_properties_ladspa_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_ladspa_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_FREEVERB); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = AGS_MACHINE(machine)->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* add lv2 effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* lv2 */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "Lv2\0"); CU_ASSERT(success == TRUE); /* lv2 and gverb */ success = ags_functional_test_util_machine_properties_lv2_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_lv2_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH_GVERB); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* * destroy effects */ nth_machine = 0; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* remove effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 2); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 0); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* destroy drum */ success = ags_functional_test_util_machine_destroy(nth_machine); CU_ASSERT(success == TRUE); } void ags_functional_line_member_add_and_destroy_test_matrix() { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; GList *list_start, *list; guint nth_machine; gboolean success; xorg_application_context = ags_application_context; /* add matrix */ success = ags_functional_test_util_add_machine(NULL, "Matrix"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* get machine */ ags_test_enter(); list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_MATRIX(list->data)){ machine = list->data; }else{ machine = NULL; } CU_ASSERT(machine != NULL); //TODO:JK: nth_machine = 0; /* destroy matrix */ success = ags_functional_test_util_machine_destroy(nth_machine); CU_ASSERT(success == TRUE); } void ags_functional_line_member_add_and_destroy_test_synth() { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; GList *list_start, *list; guint nth_machine; gboolean success; xorg_application_context = ags_application_context; /* add synth */ success = ags_functional_test_util_add_machine(NULL, "Synth"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* get machine */ ags_test_enter(); list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_SYNTH(list->data)){ machine = list->data; }else{ machine = NULL; } CU_ASSERT(machine != NULL); //TODO:JK: nth_machine = 0; /* destroy synth */ success = ags_functional_test_util_machine_destroy(nth_machine); CU_ASSERT(success == TRUE); } #ifdef AGS_WITH_LIBINSTPATCH void ags_functional_line_member_add_and_destroy_test_ffplayer() { AgsXorgApplicationContext *xorg_application_context; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsLineEditor *line_editor; AgsPluginBrowser *plugin_browser; GList *list_start, *list; guint nth_machine; guint nth_pad, nth_audio_channel; gboolean success; xorg_application_context = ags_application_context; /* add fplayer */ success = ags_functional_test_util_add_machine(NULL, "FPlayer"); CU_ASSERT(success == TRUE); ags_functional_test_util_idle(); /* get machine */ ags_test_enter(); list_start = gtk_container_get_children(xorg_application_context->window->machines); list = g_list_nth(list_start, nth_machine); ags_test_leave(); if(list != NULL && AGS_IS_FFPLAYER(list->data)){ machine = list->data; }else{ machine = NULL; } CU_ASSERT(machine != NULL); /* * add line member to input */ nth_machine = 0; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* add ladspa effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* ladspa */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "LADSPA\0"); CU_ASSERT(success == TRUE); /* cmt and delay */ success = ags_functional_test_util_machine_properties_ladspa_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_ladspa_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_DELAY); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* add ladspa effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* ladspa */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "LADSPA\0"); CU_ASSERT(success == TRUE); /* cmt and freeverb */ success = ags_functional_test_util_machine_properties_ladspa_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_ladspa_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LADSPA_CMT_FREEVERB); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = AGS_MACHINE(machine)->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* add lv2 effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_add(nth_machine, nth_pad, nth_audio_channel); CU_ASSERT(success == TRUE); /* lv2 */ success = ags_functional_test_util_machine_properties_effect_plugin_type(nth_machine, nth_pad, nth_audio_channel, "Lv2\0"); CU_ASSERT(success == TRUE); /* lv2 and gverb */ success = ags_functional_test_util_machine_properties_lv2_filename(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_lv2_effect(nth_machine, nth_pad, nth_audio_channel, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_LV2_SWH_GVERB); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; line_editor = ags_functional_test_util_get_line_editor(machine_editor, nth_pad, nth_audio_channel, FALSE); plugin_browser = line_editor->member_editor->plugin_browser; ags_test_leave(); success = ags_functional_test_util_dialog_ok(plugin_browser); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* * destroy effects */ nth_machine = 0; /* open properties */ success = ags_functional_test_util_machine_properties_open(nth_machine); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_click_tab(nth_machine, AGS_FUNCTIONAL_TEST_UTIL_MACHINE_PROPERTIES_INPUT_TAB); /* remove effect */ nth_pad = 0; nth_audio_channel = 0; success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 2); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 0); CU_ASSERT(success == TRUE); success = ags_functional_test_util_machine_properties_effect_remove(nth_machine, nth_pad, nth_audio_channel, 0); CU_ASSERT(success == TRUE); /* response OK */ ags_test_enter(); machine_editor = machine->properties; ags_test_leave(); success = ags_functional_test_util_dialog_ok(machine_editor); CU_ASSERT(success == TRUE); /* destroy fplayer */ success = ags_functional_test_util_machine_destroy(nth_machine); CU_ASSERT(success == TRUE); } #endif int main(int argc, char **argv) { /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsFuncitonalLineMemberAddAndDestroyTest\0", ags_functional_line_member_add_and_destroy_test_init_suite, ags_functional_line_member_add_and_destroy_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_atomic_int_set(&is_available, FALSE); ags_test_init(&argc, &argv, AGS_FUNCTIONAL_LINE_MEMBER_ADD_AND_DESTROY_TEST_CONFIG); ags_functional_test_util_do_run(argc, argv, ags_functional_line_member_add_and_destroy_test_add_test, &is_available); pthread_join(ags_functional_test_util_self(), NULL); return(-1); } gsequencer-1.4.24/ags/test/object/0000755000175000017500000000000013256233676013760 500000000000000gsequencer-1.4.24/ags/test/object/ags_config_test.c0000644000175000017500000001510413246707333017176 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_config_test_init_suite(); int ags_config_test_clean_suite(); void ags_config_test_load_defaults(); void ags_config_test_load_from_file(); void ags_config_test_load_from_data(); void ags_config_test_set_value(); void ags_config_test_get_value(); void ags_config_test_to_data(); void ags_config_test_save(); void ags_config_test_clear(); void ags_config_test_stub_load_defaults(); void ags_config_test_stub_set_value(); gchar* ags_config_test_stub_get_value(); #define AGS_CONFIG_TEST_SAMPLE_CONF "ags_config_test_sample.conf" #define AGS_CONFIG_TEST_SAMPLE_CONF_DATA "[the-group]\n" \ "subject=very first value\n\n" gboolean stub_load_defaults = FALSE; gboolean stub_set_value = FALSE; gboolean stub_get_value = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_config_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_config_test_clean_suite() { return(0); } void ags_config_test_load_defaults() { AgsConfig *config; gpointer ptr; config = ags_config_get_instance(); /* stub */ ptr = AGS_CONFIG_GET_CLASS(config)->load_defaults; AGS_CONFIG_GET_CLASS(config)->load_defaults = ags_config_test_stub_load_defaults; ags_config_load_defaults(config); CU_ASSERT(stub_load_defaults == TRUE); AGS_CONFIG_GET_CLASS(config)->load_defaults = ptr; g_object_unref(config); } void ags_config_test_load_from_file() { AgsConfig *config; /* test not existing file */ config = ags_config_get_instance(); ags_config_load_from_file(config, NULL); CU_ASSERT(config->key_file != NULL); g_object_unref(config); /* test sample configuration */ config = ags_config_get_instance(); ags_config_load_from_file(config, AGS_CONFIG_TEST_SAMPLE_CONF); CU_ASSERT(config->key_file != NULL); g_object_unref(config); } void ags_config_test_load_from_data() { AgsConfig *config; /* test NULL */ config = ags_config_get_instance(); ags_config_load_from_data(config, NULL, 0); CU_ASSERT(config->key_file != NULL); g_object_unref(config); /* test sample configuration */ config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_CONFIG_TEST_SAMPLE_CONF_DATA, sizeof(AGS_CONFIG_TEST_SAMPLE_CONF_DATA)); CU_ASSERT(config->key_file != NULL); g_object_unref(config); } void ags_config_test_set_value() { AgsConfig *config; gpointer ptr; config = ags_config_get_instance(); /* stub */ ptr = AGS_CONFIG_GET_CLASS(config)->set_value; AGS_CONFIG_GET_CLASS(config)->set_value = ags_config_test_stub_set_value; ags_config_set_value(config, NULL, NULL, NULL); CU_ASSERT(stub_set_value == TRUE); AGS_CONFIG_GET_CLASS(config)->set_value = ptr; g_object_unref(config); } void ags_config_test_get_value() { AgsConfig *config; gpointer ptr; config = ags_config_get_instance(); /* stub */ ptr = AGS_CONFIG_GET_CLASS(config)->get_value; AGS_CONFIG_GET_CLASS(config)->get_value = ags_config_test_stub_get_value; ags_config_get_value(config, NULL, NULL); CU_ASSERT(stub_get_value == TRUE); AGS_CONFIG_GET_CLASS(config)->get_value = ptr; g_object_unref(config); } void ags_config_test_to_data() { AgsConfig *config; char *buffer; gsize buffer_length; /* test NULL */ config = ags_config_get_instance(); ags_config_to_data(config, NULL, 0); g_object_unref(config); /* test default configuration */ config = ags_config_get_instance(); ags_config_load_defaults(config); g_message("%s", g_key_file_to_data(config->key_file, NULL, NULL)); buffer = NULL; buffer_length = 0; ags_config_to_data(config, &buffer, &buffer_length); CU_ASSERT(buffer != NULL); CU_ASSERT(buffer_length > 0); g_object_unref(config); } void ags_config_test_save() { //TODO:JK: implement me } void ags_config_test_clear() { //TODO:JK: implement me } void ags_config_test_stub_load_defaults() { stub_load_defaults = TRUE; } void ags_config_test_stub_set_value() { stub_set_value = TRUE; } gchar* ags_config_test_stub_get_value() { stub_get_value = TRUE; return(NULL); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsConfigTest\0", ags_config_test_init_suite, ags_config_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsConfig load defaults\0", ags_config_test_load_defaults) == NULL) || (CU_add_test(pSuite, "test of AgsConfig load from file\0", ags_config_test_load_from_file) == NULL) || (CU_add_test(pSuite, "test of AgsConfig load from data\0", ags_config_test_load_from_data) == NULL) || (CU_add_test(pSuite, "test of AgsConfig set value\0", ags_config_test_set_value) == NULL) || (CU_add_test(pSuite, "test of AgsConfig get value\0", ags_config_test_get_value) == NULL) || (CU_add_test(pSuite, "test of AgsConfig to data\0", ags_config_test_to_data) == NULL) || (CU_add_test(pSuite, "test of AgsConfig save\0", ags_config_test_save) == NULL) || (CU_add_test(pSuite, "test of AgsConfig clear\0", ags_config_test_clear) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/object/ags_application_context_test.c0000644000175000017500000001333213246707333022001 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_application_context_test_init_suite(); int ags_application_context_test_clean_suite(); void ags_application_context_test_load_config(); void ags_application_context_test_register_types(); void ags_application_context_test_add_sibling(); void ags_application_context_test_remove_sibling(); void ags_application_context_test_find_default(); void ags_application_context_test_find_main_loop(); void ags_application_context_test_quit(); void ags_application_context_test_stub_load_config(AgsApplicationContext *application_context); void ags_application_context_test_stub_register_types(AgsApplicationContext *application_context); void ags_application_context_test_stub_quit(AgsApplicationContext *application_context); gboolean stub_load_config = FALSE; gboolean stub_register_types = FALSE; gboolean stub_read = FALSE; gboolean stub_write = FALSE; gboolean stub_quit = FALSE; /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_application_context_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_application_context_test_clean_suite() { return(0); } void ags_application_context_test_load_config() { AgsApplicationContext *application_context; application_context = ags_application_context_get_instance(); /* stub */ AGS_APPLICATION_CONTEXT_GET_CLASS(application_context)->load_config = ags_application_context_test_stub_load_config; /* assert */ ags_application_context_load_config(application_context); CU_ASSERT(stub_load_config == TRUE); g_object_unref(application_context); } void ags_application_context_test_register_types() { AgsApplicationContext *application_context; application_context = ags_application_context_get_instance(); /* stub */ AGS_APPLICATION_CONTEXT_GET_CLASS(application_context)->register_types = ags_application_context_test_stub_register_types; /* assert */ ags_application_context_register_types(application_context); CU_ASSERT(stub_register_types == TRUE); g_object_unref(application_context); } void ags_application_context_test_add_sibling() { //TODO:JK: implement me } void ags_application_context_test_remove_sibling() { //TODO:JK: implement me } void ags_application_context_test_find_default() { //TODO:JK: implement me } void ags_application_context_test_find_main_loop() { //TODO:JK: implement me } void ags_application_context_test_quit() { AgsApplicationContext *application_context; application_context = ags_application_context_get_instance(); /* stub */ AGS_APPLICATION_CONTEXT_GET_CLASS(application_context)->quit = ags_application_context_test_stub_quit; /* assert */ ags_application_context_quit(application_context); CU_ASSERT(stub_quit == TRUE); g_object_unref(application_context); } void ags_application_context_test_stub_load_config(AgsApplicationContext *application_context) { stub_load_config = TRUE; } void ags_application_context_test_stub_register_types(AgsApplicationContext *application_context) { stub_register_types = TRUE; } void ags_application_context_test_stub_quit(AgsApplicationContext *application_context) { stub_quit = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsApplicationContextTest\0", ags_application_context_test_init_suite, ags_application_context_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsApplicationContext load config\0", ags_application_context_test_load_config) == NULL) || (CU_add_test(pSuite, "test of AgsApplicationContext register types\0", ags_application_context_test_register_types) == NULL) || (CU_add_test(pSuite, "test of AgsApplicationContext add sibling\0", ags_application_context_test_add_sibling) == NULL) || (CU_add_test(pSuite, "test of AgsApplicationContext remove sibling\0", ags_application_context_test_remove_sibling) == NULL) || (CU_add_test(pSuite, "test of AgsApplicationContext find default\0", ags_application_context_test_find_default) == NULL) || (CU_add_test(pSuite, "test of AgsApplicationContext find main loop\0", ags_application_context_test_find_main_loop) == NULL) || (CU_add_test(pSuite, "test of AgsApplicationContext quit\0", ags_application_context_test_quit) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/object/ags_connection_manager_test.c0000644000175000017500000001300413246707333021557 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include int ags_connection_manager_test_init_suite(); int ags_connection_manager_test_clean_suite(); void ags_connection_manager_test_get_connection(); void ags_connection_manager_test_add_connection(); void ags_connection_manager_test_remove_connection(); /* The suite initialization time. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_connection_manager_test_init_suite() { return(0); } /* The suite cleanup time. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_connection_manager_test_clean_suite() { return(0); } void ags_connection_manager_test_get_connection() { AgsConnectionManager *connection_manager; AgsConnection *connection; GList *list; connection_manager = ags_connection_manager_get_instance(); /* create some connection */ list = NULL; connection = g_object_new(AGS_TYPE_CONNECTION, NULL); list = g_list_prepend(list, connection); connection = g_object_new(AGS_TYPE_CONNECTION, NULL); list = g_list_prepend(list, connection); connection = g_object_new(AGS_TYPE_CONNECTION, NULL); list = g_list_prepend(list, connection); connection_manager->connection = list; /* assert get connection */ CU_ASSERT(g_list_length(ags_connection_manager_get_connection(connection_manager)) == 3); g_object_unref(connection_manager); } void ags_connection_manager_test_add_connection() { AgsConnectionManager *connection_manager; AgsConnection *connection; connection_manager = ags_connection_manager_get_instance(); /* add connection */ connection = g_object_new(AGS_TYPE_CONNECTION, NULL); ags_connection_manager_add_connection(connection_manager, connection); CU_ASSERT(g_list_length(connection_manager->connection) == 1); /* add connection */ connection = g_object_new(AGS_TYPE_CONNECTION, NULL); ags_connection_manager_add_connection(connection_manager, connection); CU_ASSERT(g_list_length(connection_manager->connection) == 2); /* add connection */ connection = g_object_new(AGS_TYPE_CONNECTION, NULL); ags_connection_manager_add_connection(connection_manager, connection); CU_ASSERT(g_list_length(connection_manager->connection) == 3); g_object_unref(connection_manager); } void ags_connection_manager_test_remove_connection() { AgsConnectionManager *connection_manager; AgsConnection *connection[3]; connection_manager = ags_connection_manager_get_instance(); /* add connection */ connection[0] = g_object_new(AGS_TYPE_CONNECTION, NULL); ags_connection_manager_add_connection(connection_manager, connection[0]); /* add connection */ connection[1] = g_object_new(AGS_TYPE_CONNECTION, NULL); ags_connection_manager_add_connection(connection_manager, connection[1]); /* add connection */ connection[2] = g_object_new(AGS_TYPE_CONNECTION, NULL); ags_connection_manager_add_connection(connection_manager, connection[2]); /* remove and assert length */ ags_connection_manager_remove_connection(connection_manager, connection[1]); CU_ASSERT(g_list_length(connection_manager->connection) == 2); ags_connection_manager_remove_connection(connection_manager, connection[0]); CU_ASSERT(g_list_length(connection_manager->connection) == 1); ags_connection_manager_remove_connection(connection_manager, connection[2]); CU_ASSERT(connection_manager->connection == NULL); g_object_unref(connection_manager); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsConnectionManagerTest\0", ags_connection_manager_test_init_suite, ags_connection_manager_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsConnectionManager get connection\0", ags_connection_manager_test_get_connection) == NULL) || (CU_add_test(pSuite, "test of AgsConnectionManager add connection\0", ags_connection_manager_test_add_connection) == NULL) || (CU_add_test(pSuite, "test of AgsConnectionManager remove connection\0", ags_connection_manager_test_remove_connection) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/0000755000175000017500000000000013256233676013613 500000000000000gsequencer-1.4.24/ags/test/audio/ags_recycling_test.c0000644000175000017500000005234713246707333017555 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int ags_recycling_test_init_suite(); int ags_recycling_test_clean_suite(); void ags_recycling_test_add_audio_signal(); void ags_recycling_test_remove_audio_signal(); void ags_recycling_test_create_audio_signal_with_defaults(); void ags_recycling_test_create_audio_signal_with_frame_count(); void ags_recycling_test_position(); void ags_recycling_test_find_next_channel(); #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_SAMPLERATE (44100) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_BUFFER_SIZE (944) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_FORMAT (AGS_SOUNDCARD_SIGNED_16_BIT) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_FREQUENCY (440.0) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_FRAMES (AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_SAMPLERATE / \ AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_BUFFER_SIZE * \ 440.0) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_NOTE_DELAY (1.0 / 4.0) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_NOTE_LENGTH (64.0) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_SAMPLERATE (44100) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_BUFFER_SIZE (944) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FORMAT (AGS_SOUNDCARD_SIGNED_16_BIT) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FREQUENCY (440.0) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES (AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_SAMPLERATE * \ (AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_NOTE_LENGTH * \ (1.0 / 16.0 * AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_NOTE_DELAY))) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_LAST_FRAME (AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES % \ AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_BUFFER_SIZE) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_LOOP_START (2.0 * AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES / 5.0 / 16.0) #define AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_LOOP_END (3.5 * AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES / 5.0 / 16.0) #define AGS_RECYCLING_TEST_POSITION_N_RECYCLING (16) #define AGS_RECYCLING_TEST_FIND_NEXT_CHANNEL_N_CHANNEL (8) AgsApplicationContext *application_context; AgsDevout *devout; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recycling_test_init_suite() { application_context = ags_application_context_new(NULL, NULL); devout = ags_devout_new(NULL); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recycling_test_clean_suite() { g_object_unref(devout); g_object_unref(application_context); return(0); } void ags_recycling_test_add_audio_signal() { AgsRecycling *recycling; AgsAudioSignal *audio_signal; /* instantiate recycling */ recycling = ags_recycling_new(G_OBJECT(devout)); /* instantiate audio signal */ audio_signal = ags_audio_signal_new(G_OBJECT(devout), recycling, NULL); /* add audio signal */ ags_recycling_add_audio_signal(recycling, audio_signal); /* assert if audio signal available in recycling */ CU_ASSERT(g_list_find(recycling->audio_signal, audio_signal) != NULL); } void ags_recycling_test_remove_audio_signal() { AgsRecycling *recycling; AgsAudioSignal *audio_signal; /* instantiate recycling */ recycling = ags_recycling_new(G_OBJECT(devout)); /* instantiate audio signal */ audio_signal = ags_audio_signal_new(G_OBJECT(devout), recycling, NULL); /* add audio signal */ ags_recycling_add_audio_signal(recycling, audio_signal); /* assert if audio signal available in recycling */ CU_ASSERT(g_list_find(recycling->audio_signal, audio_signal) != NULL); /* add audio signal */ ags_recycling_remove_audio_signal(recycling, audio_signal); /* assert if no audio signal in recycling */ CU_ASSERT(g_list_find(recycling->audio_signal, audio_signal) == NULL); } void ags_recycling_test_create_audio_signal_with_defaults() { AgsRecycling *recycling; AgsAudioSignal *template, *audio_signal; GList *stream, *template_stream; signed short *buffer; guint i, j; /* instantiate recycling */ recycling = ags_recycling_new(G_OBJECT(devout)); /* instantiate template audio signal */ template = ags_audio_signal_new(G_OBJECT(devout), recycling, NULL); template->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; g_object_set(G_OBJECT(template), "samplerate\0", AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_SAMPLERATE, "buffer-size\0", AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_BUFFER_SIZE, "format\0", AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_FORMAT, NULL); /* fill stream */ stream = NULL; for(i = 0; i < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_FRAMES;){ buffer = (signed short *) malloc(template->buffer_size * sizeof(signed short)); memset(buffer, 0, template->buffer_size * sizeof(signed short)); for(j = 0; j < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_BUFFER_SIZE && i + j < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_FRAMES; j++){ /* generate sin tone */ buffer[j] = (signed short) (0xffff & (int) (32000.0 * (double) (sin ((double)(j) * 2.0 * M_PI * AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_FREQUENCY / (double) AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_SAMPLERATE)))); } /* prepend buffer */ stream = g_list_prepend(stream, buffer); /* iterate */ i += AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_BUFFER_SIZE; } template->stream_end = stream; template->stream_beginning = g_list_reverse(stream); template->length = g_list_length(template->stream_beginning); /* add audio signal to recycling */ ags_recycling_add_audio_signal(recycling, template); /* instantiate audio signal */ audio_signal = ags_audio_signal_new(G_OBJECT(devout), recycling, NULL); audio_signal->format = AGS_SOUNDCARD_SIGNED_16_BIT; /* create defaults */ ags_recycling_create_audio_signal_with_defaults(recycling, audio_signal, 0.0, 0); /* assert audio signal */ CU_ASSERT(audio_signal->samplerate == template->samplerate); CU_ASSERT(audio_signal->buffer_size == template->buffer_size); CU_ASSERT(audio_signal->format == template->format); CU_ASSERT(audio_signal->length == template->length); CU_ASSERT(audio_signal->first_frame == template->first_frame); CU_ASSERT(audio_signal->last_frame == template->last_frame); CU_ASSERT(audio_signal->loop_start == template->loop_start); CU_ASSERT(audio_signal->loop_end == template->loop_end); stream = audio_signal->stream_beginning; template_stream = template->stream_beginning; for(i = 0; i < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_FRAMES;){ for(j = 0; j < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_BUFFER_SIZE && i + j < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_FRAMES; j++){ CU_ASSERT(AGS_AUDIO_BUFFER_S16(stream->data)[j] == AGS_AUDIO_BUFFER_S16(template_stream->data)[j]); } /* iterate */ stream = stream->next; template_stream = template_stream->next; i += AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_DEFAULTS_BUFFER_SIZE; } } void ags_recycling_test_create_audio_signal_with_frame_count() { AgsRecycling *recycling; AgsAudioSignal *template, *audio_signal; GList *stream, *template_stream; signed short *entire_buffer; signed short *buffer; guint frame_count; guint first_frame; guint loop_frame_count; guint shifted_frame_count; guint stream_index, template_stream_index; guint copy_n_frames; guint i, j, k; guint nth; guint copy_mode; gboolean success; struct rlimit rl; int result; const rlim_t kStackSize = 64L * 1024L * 1024L; // min stack size = 64 Mb auto gboolean ags_recycling_test_create_audio_signal_with_frame_count_compare_frames(signed short *destination, signed short *source, guint buffer_size); gboolean ags_recycling_test_create_audio_signal_with_frame_count_compare_frames(signed short *destination, signed short *source, guint buffer_size){ guint i; for(i = 0; i < buffer_size; i++){ if(destination[i] != source[i]){ return(FALSE); } } return(TRUE); } /* instantiate recycling */ recycling = ags_recycling_new(G_OBJECT(devout)); /* instantiate template audio signal */ template = ags_audio_signal_new(G_OBJECT(devout), recycling, NULL); template->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; g_object_set(G_OBJECT(template), "samplerate\0", AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_SAMPLERATE, "buffer-size\0", AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_BUFFER_SIZE, "format\0", AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FORMAT, NULL); /* fill stream */ ags_audio_signal_stream_resize(template, (guint) ceil(AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES / template->buffer_size) + 1); for(i = 0, nth = 0; i < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES / 16.0; nth++){ buffer = (signed short *) g_list_nth_data(template->stream_beginning, nth); for(j = 0; j < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_BUFFER_SIZE && i < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES / 16.0; j++, i++){ /* generate sin tone */ buffer[j] = (signed short) (0xffff & (int) (32000.0 * (double) (sin ((double)(j) * 2.0 * M_PI * AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FREQUENCY / (double) AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_SAMPLERATE)))); } } template->loop_start = AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_LOOP_START; template->loop_end = AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_LOOP_END; /* add audio signal to recycling */ ags_recycling_add_audio_signal(recycling, template); /* instantiate audio signal */ audio_signal = ags_audio_signal_new(G_OBJECT(devout), recycling, NULL); g_object_set(G_OBJECT(audio_signal), "samplerate\0", AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_SAMPLERATE, "buffer-size\0", AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_BUFFER_SIZE, "format\0", AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FORMAT, NULL); /* create frame count */ frame_count = AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES; ags_recycling_create_audio_signal_with_frame_count(recycling, audio_signal, frame_count, 0.0, 0); /* assert audio signal */ CU_ASSERT(audio_signal->samplerate == template->samplerate); CU_ASSERT(audio_signal->buffer_size == template->buffer_size); CU_ASSERT(audio_signal->format == template->format); CU_ASSERT(audio_signal->first_frame == template->first_frame); CU_ASSERT(audio_signal->last_frame == frame_count % AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_BUFFER_SIZE); /* create compare buffer */ template_stream = template->stream_beginning; loop_frame_count = ((frame_count - template->loop_start) / (template->loop_end - template->loop_start)) * template->buffer_size; entire_buffer = (signed short *) malloc(AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES * sizeof(signed short)); memset(entire_buffer, 0, AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES * sizeof(signed short)); copy_mode = ags_audio_buffer_util_get_copy_mode(AGS_AUDIO_BUFFER_UTIL_S16, ags_audio_buffer_util_format_from_soundcard(template->format)); for(i = 0, j = 0; i < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES;){ copy_n_frames = template->buffer_size; /* limit nth loop */ if(i > template->loop_start && i + copy_n_frames > template->loop_start + (template->loop_end - template->loop_start) && i + copy_n_frames < template->loop_start + loop_frame_count && template->loop_start + ((i - template->loop_start) % (template->loop_end - template->loop_start)) + copy_n_frames >= template->loop_end - template->loop_start){ copy_n_frames = template->loop_end - (template->loop_start + ((i - template->loop_start) % (template->loop_end - template->loop_start))); } /* check boundaries */ if(i + copy_n_frames > AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES){ copy_n_frames = AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES - i; } if(j + copy_n_frames > template->buffer_size){ copy_n_frames = template->buffer_size - j; } /* copy */ ags_audio_buffer_util_copy_buffer_to_buffer(entire_buffer, 1, i, template_stream->data, 1, j, copy_n_frames, copy_mode); /* increment and iterate */ if(j + copy_n_frames == template->buffer_size){ template_stream = template_stream->next; } if(i > template->loop_start && i + copy_n_frames > template->loop_start + (template->loop_end - template->loop_start) && i + copy_n_frames < template->loop_start + loop_frame_count && template->loop_start + ((i - template->loop_start) % (template->loop_end - template->loop_start)) + copy_n_frames >= template->loop_end - template->loop_start){ j = template->loop_start % template->buffer_size; template_stream = g_list_nth(template->stream_beginning, floor(template->loop_start / template->buffer_size)); }else{ j += copy_n_frames; } i += copy_n_frames; if(j == template->buffer_size){ j = 0; } } /* check loop */ stream = audio_signal->stream_beginning; i = 0; j = 0; k = 0; success = TRUE; for(i = 0, j = 0; i < AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES;){ copy_n_frames = template->buffer_size; /* limit nth loop */ if(i > template->loop_start && i + copy_n_frames > template->loop_start + (template->loop_end - template->loop_start) && i + copy_n_frames < template->loop_start + loop_frame_count && template->loop_start + ((i - template->loop_start) % (template->loop_end - template->loop_start)) + copy_n_frames >= template->loop_end - template->loop_start){ copy_n_frames = template->loop_end - (template->loop_start + ((i - template->loop_start) % (template->loop_end - template->loop_start))); } /* check boundaries */ if(i + copy_n_frames > AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES){ copy_n_frames = AGS_RECYCLING_TEST_CREATE_AUDIO_SIGNAL_WITH_FRAME_COUNT_FRAMES - i; } if(j + copy_n_frames > template->buffer_size){ copy_n_frames = template->buffer_size - j; } /* copy */ if(!ags_recycling_test_create_audio_signal_with_frame_count_compare_frames(&(((signed short *) stream->data)[i % audio_signal->buffer_size]), entire_buffer + i, copy_n_frames)){ success = FALSE; } /* increment and iterate */ if(j + copy_n_frames == template->buffer_size){ template_stream = template_stream->next; } if(i > template->loop_start && i + copy_n_frames > template->loop_start + (template->loop_end - template->loop_start) && i + copy_n_frames < template->loop_start + loop_frame_count && template->loop_start + ((i - template->loop_start) % (template->loop_end - template->loop_start)) + copy_n_frames >= template->loop_end - template->loop_start){ j = template->loop_start % template->buffer_size; template_stream = g_list_nth(template->stream_beginning, floor(template->loop_start / template->buffer_size)); }else{ j += copy_n_frames; } i += copy_n_frames; if(j == template->buffer_size){ j = 0; } } CU_ASSERT(success == TRUE); } void ags_recycling_test_position() { AgsRecycling *first_recycling, *last_recycling; AgsRecycling *current; guint i; /* instantiate n recycling */ first_recycling = NULL; last_recycling = NULL; for(i = 0; i < AGS_RECYCLING_TEST_POSITION_N_RECYCLING; i++){ if(first_recycling == NULL){ current = ags_recycling_new(G_OBJECT(devout)); first_recycling = current; }else{ current->next = ags_recycling_new(G_OBJECT(devout)); current->next->prev = current; current = current->next; } } last_recycling = current; /* assert every position */ current = first_recycling; for(i = 0; i < AGS_RECYCLING_TEST_POSITION_N_RECYCLING; i++){ CU_ASSERT(ags_recycling_position(first_recycling, last_recycling->next, current) == i); current = current->next; } } void ags_recycling_test_find_next_channel() { AgsChannel *start, *end; AgsChannel *channel; AgsRecycling *recycling, *prev_recycling; guint i; /* instantiate n channel and recycling */ start = NULL; end = NULL; for(i = 0; i < AGS_RECYCLING_TEST_FIND_NEXT_CHANNEL_N_CHANNEL; i++){ if(start == NULL){ recycling = ags_recycling_new(G_OBJECT(devout)); start = channel = g_object_new(AGS_TYPE_CHANNEL, NULL); channel->last_recycling = channel->first_recycling = recycling; g_object_set(G_OBJECT(recycling), "channel\0", channel, NULL); prev_recycling = recycling; }else{ recycling = ags_recycling_new(G_OBJECT(devout)); channel->next = channel->next_pad = g_object_new(AGS_TYPE_CHANNEL, NULL); channel->next->last_recycling = channel->next->first_recycling = recycling; g_object_set(G_OBJECT(recycling), "channel\0", channel->next, NULL); channel->next->prev = channel->next_pad->prev_pad = channel; recycling->prev = prev_recycling; prev_recycling->next = recycling; channel = channel->next; prev_recycling = recycling; } } end = channel; /* assert to find next channel */ channel = start; recycling = start->first_recycling->next; for(i = 0; i + 1 < AGS_RECYCLING_TEST_FIND_NEXT_CHANNEL_N_CHANNEL; i++){ CU_ASSERT(ags_recycling_find_next_channel(recycling, NULL, channel->prev) == recycling); channel = channel->next; recycling = recycling->next; } } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsRecyclingTest\0", ags_recycling_test_init_suite, ags_recycling_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsRecycling add audio signal\0", ags_recycling_test_add_audio_signal) == NULL) || (CU_add_test(pSuite, "test of AgsRecycling remove audio signal\0", ags_recycling_test_remove_audio_signal) == NULL) || (CU_add_test(pSuite, "test of AgsRecycling create audio signal with defaults\0", ags_recycling_test_create_audio_signal_with_defaults) == NULL) || //FIXME:JK: uncomment /* (CU_add_test(pSuite, "test of AgsRecycling create audio signal with frame count\0", ags_recycling_test_create_audio_signal_with_frame_count) == NULL) || */ (CU_add_test(pSuite, "test of AgsRecycling position\0", ags_recycling_test_position) == NULL) || (CU_add_test(pSuite, "test of AgsRecycling find next channel\0", ags_recycling_test_find_next_channel) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_preset_test.c0000644000175000017500000001661713246707333017100 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_preset_test_init_suite(); int ags_preset_test_clean_suite(); void ags_preset_test_find_scope(); void ags_preset_test_find_name(); void ags_preset_test_add_parameter(); void ags_preset_test_remove_parameter(); void ags_preset_test_get_parameter(); #define AGS_PRESET_TEST_ADD_PARAMETER_ATTACK_X "attack-x" #define AGS_PRESET_TEST_ADD_PARAMETER_ATTACK_X_VALUE (128) #define AGS_PRESET_TEST_REMOVE_PARAMETER_ATTACK_X "attack-x" #define AGS_PRESET_TEST_REMOVE_PARAMETER_ATTACK_X_VALUE (128) #define AGS_PRESET_TEST_REMOVE_PARAMETER_DECAY_X "decay-x" #define AGS_PRESET_TEST_REMOVE_PARAMETER_DECAY_X_VALUE (256) #define AGS_PRESET_TEST_GET_PARAMETER_ATTACK_X "attack-x" #define AGS_PRESET_TEST_GET_PARAMETER_ATTACK_X_VALUE (128) /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_preset_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_preset_test_clean_suite() { return(0); } void ags_preset_test_find_scope() { AgsPreset *preset[3]; GList *list, *current; list = NULL; /* preset #0 */ preset[0] = g_object_new(AGS_TYPE_PRESET, "scope", "ags-preset-test-scope-0", NULL); list = g_list_prepend(list, preset[0]); /* preset #1 */ preset[1] = g_object_new(AGS_TYPE_PRESET, "scope", "ags-preset-test-scope-1", NULL); list = g_list_prepend(list, preset[1]); /* preset #2 */ preset[2] = g_object_new(AGS_TYPE_PRESET, "scope", "ags-preset-test-scope-2", NULL); list = g_list_prepend(list, preset[2]); /* assert */ CU_ASSERT((current = ags_preset_find_scope(list, "ags-preset-test-scope-0")) != NULL && current->data == preset[0]); CU_ASSERT((current = ags_preset_find_scope(list, "ags-preset-test-scope-1")) != NULL && current->data == preset[1]); CU_ASSERT((current = ags_preset_find_scope(list, "ags-preset-test-scope-2")) != NULL && current->data == preset[2]); } void ags_preset_test_find_name() { AgsPreset *preset[3]; GList *list, *current; list = NULL; /* preset #0 */ preset[0] = g_object_new(AGS_TYPE_PRESET, "preset-name", "ags-preset-test-name-0", NULL); list = g_list_prepend(list, preset[0]); /* preset #1 */ preset[1] = g_object_new(AGS_TYPE_PRESET, "preset-name", "ags-preset-test-name-1", NULL); list = g_list_prepend(list, preset[1]); /* preset #2 */ preset[2] = g_object_new(AGS_TYPE_PRESET, "preset-name", "ags-preset-test-name-2", NULL); list = g_list_prepend(list, preset[2]); /* assert */ CU_ASSERT((current = ags_preset_find_name(list, "ags-preset-test-name-0")) != NULL && current->data == preset[0]); CU_ASSERT((current = ags_preset_find_name(list, "ags-preset-test-name-1")) != NULL && current->data == preset[1]); CU_ASSERT((current = ags_preset_find_name(list, "ags-preset-test-name-2")) != NULL && current->data == preset[2]); } void ags_preset_test_add_parameter() { AgsPreset *preset; GValue value = {0,}; preset = g_object_new(AGS_TYPE_PRESET, NULL); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, AGS_PRESET_TEST_ADD_PARAMETER_ATTACK_X_VALUE); ags_preset_add_parameter(preset, AGS_PRESET_TEST_ADD_PARAMETER_ATTACK_X, &value); CU_ASSERT(preset->n_params == 1 && !g_strcmp0(preset->parameter[0].name, AGS_PRESET_TEST_ADD_PARAMETER_ATTACK_X) && g_value_get_uint(&preset->parameter[0].value) == AGS_PRESET_TEST_ADD_PARAMETER_ATTACK_X_VALUE); } void ags_preset_test_remove_parameter() { AgsPreset *preset; GValue value = {0,}; preset = g_object_new(AGS_TYPE_PRESET, NULL); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, AGS_PRESET_TEST_REMOVE_PARAMETER_ATTACK_X_VALUE); ags_preset_add_parameter(preset, AGS_PRESET_TEST_REMOVE_PARAMETER_ATTACK_X, &value); g_value_reset(&value); g_value_set_uint(&value, AGS_PRESET_TEST_REMOVE_PARAMETER_DECAY_X_VALUE); ags_preset_add_parameter(preset, AGS_PRESET_TEST_REMOVE_PARAMETER_DECAY_X, &value); /* remove and assert */ ags_preset_remove_parameter(preset, 0); CU_ASSERT(preset->n_params == 1 && !g_strcmp0(preset->parameter[0].name, AGS_PRESET_TEST_REMOVE_PARAMETER_DECAY_X) && g_value_get_uint(&preset->parameter[0].value) == AGS_PRESET_TEST_REMOVE_PARAMETER_DECAY_X_VALUE); ags_preset_remove_parameter(preset, 0); CU_ASSERT(preset->n_params == 0); } void ags_preset_test_get_parameter() { AgsPreset *preset; GValue value = {0,}; GValue ret_value = {0,}; GError *error; preset = g_object_new(AGS_TYPE_PRESET, NULL); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, AGS_PRESET_TEST_GET_PARAMETER_ATTACK_X_VALUE); ags_preset_add_parameter(preset, AGS_PRESET_TEST_GET_PARAMETER_ATTACK_X, &value); /* get and assert */ g_value_init(&ret_value, G_TYPE_UINT); error = NULL; ags_preset_get_parameter(preset, AGS_PRESET_TEST_GET_PARAMETER_ATTACK_X, &ret_value, &error); CU_ASSERT(error == NULL && g_value_get_uint(&ret_value) == AGS_PRESET_TEST_GET_PARAMETER_ATTACK_X_VALUE); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsPresetTest", ags_preset_test_init_suite, ags_preset_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsPreset find scope", ags_preset_test_find_scope) == NULL) || (CU_add_test(pSuite, "test of AgsPreset find name", ags_preset_test_find_name) == NULL) || (CU_add_test(pSuite, "test of AgsPreset add parameter", ags_preset_test_add_parameter) == NULL) || (CU_add_test(pSuite, "test of AgsPreset remove parameter", ags_preset_test_remove_parameter) == NULL) || (CU_add_test(pSuite, "test of AgsPreset get parameter", ags_preset_test_get_parameter) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_audio_test.c0000644000175000017500000012551013247044247016667 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include int ags_audio_test_init_suite(); int ags_audio_test_clean_suite(); void ags_audio_test_set_soundcard(); void ags_audio_test_set_flags(); void ags_audio_test_unset_flags(); void ags_audio_test_dispose(); void ags_audio_test_finalize(); void ags_audio_test_check_connection(); void ags_audio_test_set_audio_channels(); void ags_audio_test_set_pads(); void ags_audio_test_set_samplerate(); void ags_audio_test_set_buffer_size(); void ags_audio_test_set_format(); void ags_audio_test_set_sequence_length(); void ags_audio_test_add_audio_connection(); void ags_audio_test_remove_audio_connection(); void ags_audio_test_add_preset(); void ags_audio_test_remove_preset(); void ags_audio_test_add_notation(); void ags_audio_test_remove_notation(); void ags_audio_test_add_automation(); void ags_audio_test_remove_automation(); void ags_audio_test_add_recall_id(); void ags_audio_test_remove_recall_id(); void ags_audio_test_add_recycling_context(); void ags_audio_test_remove_recycling_context(); void ags_audio_test_add_recall_container(); void ags_audio_test_remove_recall_container(); void ags_audio_test_add_recall(); void ags_audio_test_remove_recall(); void ags_audio_test_init_run(); void ags_audio_test_duplicate_recall(); void ags_audio_test_init_recall(); void ags_audio_test_resolve_recall(); void ags_audio_test_is_playing(); void ags_audio_test_play(); void ags_audio_test_tact(); void ags_audio_test_done(); void ags_audio_test_cancel(); void ags_audio_test_remove(); void ags_audio_test_find_port(); void ags_audio_test_open_files(); void ags_audio_test_recursive_set_property(); void ags_audio_test_recursive_play_init(); void ags_audio_test_link_channel(); void ags_audio_test_finalize_linked_channel(); void ags_audio_test_init_recall(); void ags_audio_test_resolve_recall(); void ags_audio_test_finalize_stub(GObject *gobject); void ags_audio_test_set_link_callback(AgsChannel *channel, AgsChannel *link, GError **error, AgsAudio *audio); void ags_audio_test_init_recall_callback(AgsRecall *recall, gpointer data); void ags_audio_test_resolve_recall_callback(AgsRecall *recall, gpointer data); #define AGS_AUDIO_TEST_DISPOSE_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_DISPOSE_INPUT_PADS (12) #define AGS_AUDIO_TEST_DISPOSE_OUTPUT_PADS (5) #define AGS_AUDIO_TEST_FINALIZE_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_FINALIZE_INPUT_PADS (12) #define AGS_AUDIO_TEST_FINALIZE_OUTPUT_PADS (5) #define AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_SET_PADS_INPUT_PADS (12) #define AGS_AUDIO_TEST_SET_PADS_OUTPUT_PADS (5) #define AGS_AUDIO_TEST_SET_PADS_GROW_INPUT_PADS (18) #define AGS_AUDIO_TEST_SET_PADS_GROW_OUTPUT_PADS (8) #define AGS_AUDIO_TEST_SET_PADS_SHRINK_INPUT_PADS (3) #define AGS_AUDIO_TEST_SET_PADS_SHRINK_OUTPUT_PADS (1) #define AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_AUDIO_CHANNELS (3) #define AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_INPUT_PADS (1) #define AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_OUTPUT_PADS (7) #define AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_GROW_AUDIO_CHANNELS (5) #define AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_SHRINK_AUDIO_CHANNELS (1) #define AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_INPUT_PADS (8) #define AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_OUTPUT_PADS (1) #define AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_0_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_0_INPUT_PADS (8) #define AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_0_OUTPUT_PADS (1) #define AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_1_AUDIO_CHANNELS (1) #define AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_1_INPUT_PADS (128) #define AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_1_OUTPUT_PADS (1) #define AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_2_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_2_INPUT_PADS (1) #define AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_2_OUTPUT_PADS (1) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_INPUT_PADS (8) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_OUTPUT_PADS (1) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_0_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_0_INPUT_PADS (8) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_0_OUTPUT_PADS (1) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_1_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_1_INPUT_PADS (128) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_1_OUTPUT_PADS (1) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_AUDIO_CHANNELS (2) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_INPUT_PADS (1) #define AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_OUTPUT_PADS (1) AgsDevout *devout; gboolean audio_test_finalized; struct{ AgsAudio *master; guint n_link_master; AgsAudio *slave_0; guint n_link_slave_0; AgsAudio *slave_1; guint n_link_slave_1; AgsAudio *slave_2; guint n_link_slave_2; }test_link_channel; struct{ AgsAudio *master; guint n_link_master; AgsAudio *slave_0; guint n_link_slave_0; AgsAudio *slave_1; guint n_link_slave_1; AgsAudio *slave_2; guint n_link_slave_2; }test_finalize_linked_channel; guint test_init_recall_callback_hits_count = 0; guint test_resolve_recall_callback_hits_count = 0; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_audio_test_init_suite() { devout = ags_devout_new(NULL); g_object_ref(devout); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_audio_test_clean_suite() { g_object_unref(devout); return(0); } void ags_audio_test_set_soundcard() { //TODO:JK: implement me } void ags_audio_test_set_flags() { //TODO:JK: implement me } void ags_audio_test_unset_flags() { //TODO:JK: implement me } void ags_audio_test_dispose() { AgsAudio *audio; /* instantiate audio */ audio = ags_audio_new(devout); /* set audio channels */ audio->audio_channels = AGS_AUDIO_TEST_DISPOSE_AUDIO_CHANNELS; /* set input pads */ ags_audio_set_pads(audio, AGS_TYPE_INPUT, AGS_AUDIO_TEST_DISPOSE_INPUT_PADS); /* set output pads */ ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_DISPOSE_OUTPUT_PADS); /* run dispose and assert */ g_object_run_dispose(audio); CU_ASSERT(audio->soundcard == NULL); CU_ASSERT(audio->sequencer == NULL); CU_ASSERT(audio->midi_file == NULL); CU_ASSERT(audio->audio_connection == NULL); CU_ASSERT(audio->output == NULL); CU_ASSERT(audio->input == NULL); CU_ASSERT(audio->playback_domain == NULL); CU_ASSERT(audio->notation == NULL); CU_ASSERT(audio->automation == NULL); CU_ASSERT(audio->recall_id == NULL); CU_ASSERT(audio->recycling_context == NULL); CU_ASSERT(audio->container == NULL); CU_ASSERT(audio->recall == NULL); CU_ASSERT(audio->play == NULL); } void ags_audio_test_finalize() { AgsAudio *audio; /* instantiate audio */ audio = ags_audio_new(devout); /* set audio channels */ audio->audio_channels = AGS_AUDIO_TEST_FINALIZE_AUDIO_CHANNELS; /* set input pads */ ags_audio_set_pads(audio, AGS_TYPE_INPUT, AGS_AUDIO_TEST_FINALIZE_INPUT_PADS); /* set output pads */ ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_FINALIZE_OUTPUT_PADS); /* run dispose */ g_object_run_dispose(audio); /* stub */ audio_test_finalized = FALSE; G_OBJECT_GET_CLASS(audio)->finalize = ags_audio_test_finalize_stub; /* unref and assert */ g_object_unref(audio); CU_ASSERT(audio_test_finalized == TRUE); } void ags_audio_test_check_connection() { //TODO:JK: implement me } void ags_audio_test_set_audio_channels() { AgsAudio *audio; AgsChannel *channel, *current; guint i, j; /* instantiate */ audio = ags_audio_new(devout); CU_ASSERT(audio != NULL); /* set pads */ audio->output_pads = AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_OUTPUT_PADS; audio->input_pads = AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_INPUT_PADS; /* set audio channels */ ags_audio_set_audio_channels(audio, AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_AUDIO_CHANNELS); CU_ASSERT(audio->audio_channels == AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_AUDIO_CHANNELS); /* verify pad count */ channel = audio->input; for(i = 0; channel != ags_channel_nth(audio->input, AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_AUDIO_CHANNELS); i++){ current = channel; for(j = 0; current != NULL; j++){ current = current->next_pad; } CU_ASSERT(j == AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_INPUT_PADS); channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_AUDIO_CHANNELS); /* verify line count */ channel = audio->input; for(i = 0; channel != NULL; i++){ channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_INPUT_PADS * AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_AUDIO_CHANNELS); /* verify pad count */ channel = audio->output; for(i = 0; channel != ags_channel_nth(audio->output, AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_AUDIO_CHANNELS); i++){ current = channel; for(j = 0; current != NULL; j++){ current = current->next_pad; } CU_ASSERT(j == AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_OUTPUT_PADS); channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_AUDIO_CHANNELS); /* verify line count */ channel = audio->output; for(i = 0; channel != NULL; i++){ channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_OUTPUT_PADS * AGS_AUDIO_TEST_SET_AUDIO_CHANNELS_AUDIO_CHANNELS); } void ags_audio_test_set_pads() { AgsAudio *audio; AgsChannel *channel, *current; guint i, j; /* instantiate */ audio = ags_audio_new(devout); CU_ASSERT(audio != NULL); /* set audio channels */ audio->audio_channels = AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS; /* set input pads */ ags_audio_set_pads(audio, AGS_TYPE_INPUT, AGS_AUDIO_TEST_SET_PADS_INPUT_PADS); CU_ASSERT(audio->input_pads == AGS_AUDIO_TEST_SET_PADS_INPUT_PADS); /* verify pad count */ channel = audio->input; for(i = 0; channel != audio->input->next_pad; i++){ current = channel; for(j = 0; current != NULL; j++){ current = current->next_pad; } CU_ASSERT(j == AGS_AUDIO_TEST_SET_PADS_INPUT_PADS); channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* verify reverse pad count */ channel = ags_channel_last(audio->input); for(i = 0; channel != ags_channel_last(audio->input)->prev_pad; i++){ current = channel; for(j = 0; current != NULL; j++){ current = current->prev_pad; } g_message("--- %d", j); CU_ASSERT(j == AGS_AUDIO_TEST_SET_PADS_INPUT_PADS); channel = channel->prev; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* verify line count */ channel = audio->input; for(i = 0; channel != NULL; i++){ channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_INPUT_PADS * AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* verify reverse line count */ channel = ags_channel_last(audio->input); for(i = 0; channel != NULL; i++){ channel = channel->prev; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_INPUT_PADS * AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* set output pads */ ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_SET_PADS_OUTPUT_PADS); CU_ASSERT(audio->output_pads == AGS_AUDIO_TEST_SET_PADS_OUTPUT_PADS); /* verify pad count */ channel = audio->output; for(i = 0; channel != audio->output->next_pad; i++){ current = channel; for(j = 0; current != NULL; j++){ current = current->next_pad; } CU_ASSERT(j == AGS_AUDIO_TEST_SET_PADS_OUTPUT_PADS); channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* verify line count */ channel = audio->output; for(i = 0; channel != NULL; i++){ channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_OUTPUT_PADS * AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* * grow pads */ /* set input pads */ ags_audio_set_pads(audio, AGS_TYPE_INPUT, AGS_AUDIO_TEST_SET_PADS_GROW_INPUT_PADS); CU_ASSERT(audio->input_pads == AGS_AUDIO_TEST_SET_PADS_GROW_INPUT_PADS); /* verify pad count */ channel = audio->input; for(i = 0; channel != audio->input->next_pad; i++){ current = channel; for(j = 0; current != NULL; j++){ current = current->next_pad; } CU_ASSERT(j == AGS_AUDIO_TEST_SET_PADS_GROW_INPUT_PADS); channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* verify line count */ channel = audio->input; for(i = 0; channel != NULL; i++){ channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_GROW_INPUT_PADS * AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* set output pads */ ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_SET_PADS_GROW_OUTPUT_PADS); CU_ASSERT(audio->output_pads == AGS_AUDIO_TEST_SET_PADS_GROW_OUTPUT_PADS); /* verify pad count */ channel = audio->output; for(i = 0; channel != audio->output->next_pad; i++){ current = channel; for(j = 0; current != NULL; j++){ current = current->next_pad; } CU_ASSERT(j == AGS_AUDIO_TEST_SET_PADS_GROW_OUTPUT_PADS); channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* verify line count */ channel = audio->output; for(i = 0; channel != NULL; i++){ channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_GROW_OUTPUT_PADS * AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* * shrink pads */ /* set input pads */ ags_audio_set_pads(audio, AGS_TYPE_INPUT, AGS_AUDIO_TEST_SET_PADS_SHRINK_INPUT_PADS); CU_ASSERT(audio->input_pads == AGS_AUDIO_TEST_SET_PADS_SHRINK_INPUT_PADS); /* verify pad count */ channel = audio->input; for(i = 0; channel != audio->input->next_pad; i++){ current = channel; for(j = 0; current != NULL; j++){ current = current->next_pad; } CU_ASSERT(j == AGS_AUDIO_TEST_SET_PADS_SHRINK_INPUT_PADS); channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* verify line count */ channel = audio->input; for(i = 0; channel != NULL; i++){ channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_SHRINK_INPUT_PADS * AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* set output pads */ ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_SET_PADS_SHRINK_OUTPUT_PADS); CU_ASSERT(audio->output_pads == AGS_AUDIO_TEST_SET_PADS_SHRINK_OUTPUT_PADS); /* verify pad count */ channel = audio->output; for(i = 0; channel != audio->output->next_pad; i++){ current = channel; for(j = 0; current != NULL; j++){ current = current->next_pad; } CU_ASSERT(j == AGS_AUDIO_TEST_SET_PADS_SHRINK_OUTPUT_PADS); channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); /* verify line count */ channel = audio->output; for(i = 0; channel != NULL; i++){ channel = channel->next; } CU_ASSERT(i == AGS_AUDIO_TEST_SET_PADS_SHRINK_OUTPUT_PADS * AGS_AUDIO_TEST_SET_PADS_AUDIO_CHANNELS); } void ags_audio_test_set_samplerate() { //TODO:JK: implement me } void ags_audio_test_set_buffer_size() { //TODO:JK: implement me } void ags_audio_test_set_format() { //TODO:JK: implement me } void ags_audio_test_set_sequence_length() { //TODO:JK: implement me } void ags_audio_test_add_audio_connection() { //TODO:JK: implement me } void ags_audio_test_remove_audio_connection() { //TODO:JK: implement me } void ags_audio_test_add_preset() { //TODO:JK: implement me } void ags_audio_test_remove_preset() { //TODO:JK: implement me } void ags_audio_test_add_notation() { //TODO:JK: implement me } void ags_audio_test_remove_notation() { //TODO:JK: implement me } void ags_audio_test_add_automation() { //TODO:JK: implement me } void ags_audio_test_remove_automation() { //TODO:JK: implement me } void ags_audio_test_add_recall_id() { AgsAudio *audio; AgsRecallID *recall_id; /* instantiate audio */ audio = ags_audio_new(devout); /* instantiate recall */ recall_id = ags_recall_id_new(NULL); /* add to audio */ ags_audio_add_recall_id(audio, recall_id); /* assert to be in audio->recall_id */ CU_ASSERT(g_list_find(audio->recall_id, recall_id) != NULL); } void ags_audio_test_remove_recall_id() { //TODO:JK: implement me } void ags_audio_test_add_recycling_context() { AgsAudio *audio; AgsRecyclingContext *recycling_context; /* instantiate audio */ audio = ags_audio_new(devout); /* instantiate recall */ recycling_context = ags_recycling_context_new(0); /* add to audio */ ags_audio_add_recycling_context(audio, recycling_context); /* assert to be in audio->recycling_context */ CU_ASSERT(g_list_find(audio->recycling_context, recycling_context) != NULL); } void ags_audio_test_remove_recycling_context() { //TODO:JK: implement me } void ags_audio_test_add_recall_container() { AgsAudio *audio; AgsRecallContainer *recall_container; /* instantiate audio */ audio = ags_audio_new(devout); /* instantiate recall */ recall_container = ags_recall_container_new(); /* add to audio */ ags_audio_add_recall_container(audio, recall_container); /* assert to be in audio->recall_container */ CU_ASSERT(g_list_find(audio->container, recall_container) != NULL); } void ags_audio_test_remove_recall_container() { //TODO:JK: implement me } void ags_audio_test_add_recall() { AgsAudio *audio; AgsRecall *recall; /* instantiate audio */ audio = ags_audio_new(devout); /* instantiate recall */ recall = ags_recall_new(); /* add recall to audio */ ags_audio_add_recall(audio, recall, TRUE); /* assert to be in audio->play */ CU_ASSERT(g_list_find(audio->play, recall) != NULL); /* instantiate recall */ recall = ags_recall_new(); /* add recall to audio */ ags_audio_add_recall(audio, recall, FALSE); /* assert to be in audio->recall */ CU_ASSERT(g_list_find(audio->recall, recall) != NULL); } void ags_audio_test_remove_recall() { //TODO:JK: implement me } void ags_audio_test_init_run() { //TODO:JK: implement me } void ags_audio_test_duplicate_recall() { AgsAudio *audio; AgsRecall *recall; AgsRecall *recall_audio_run; AgsRecyclingContext *parent_recycling_context, *recycling_context; AgsRecallID *recall_id; /* instantiate audio */ audio = ags_audio_new(devout); /* case 1: playback recall */ recall = ags_recall_new(); recall->flags |= (AGS_RECALL_TEMPLATE | AGS_RECALL_PLAYBACK); ags_audio_add_recall(audio, recall, TRUE); recall_audio_run = ags_recall_audio_run_new(); recall_audio_run->flags |= (AGS_RECALL_TEMPLATE | AGS_RECALL_PLAYBACK); ags_audio_add_recall(audio, recall_audio_run, TRUE); /* assert inital count */ CU_ASSERT(g_list_length(audio->play) == 2); CU_ASSERT(g_list_length(audio->recall) == 0); /* instantiate recycling context and recall id */ recycling_context = ags_recycling_context_new(0); recall_id = ags_recall_id_new(NULL); recall_id->flags |= AGS_RECALL_ID_PLAYBACK; g_object_set(recall_id, "recycling-context", recycling_context, NULL); /* duplicate recall */ ags_audio_duplicate_recall(audio, recall_id); CU_ASSERT(g_list_length(audio->play) == 4); CU_ASSERT(g_list_length(audio->recall) == 0); /* case 2: true recall */ recall = ags_recall_new(); recall->flags |= (AGS_RECALL_TEMPLATE | AGS_RECALL_PLAYBACK); ags_audio_add_recall(audio, recall, FALSE); recall_audio_run = ags_recall_audio_run_new(); recall_audio_run->flags |= (AGS_RECALL_TEMPLATE | AGS_RECALL_PLAYBACK); ags_audio_add_recall(audio, recall_audio_run, FALSE); /* assert inital count */ CU_ASSERT(g_list_length(audio->play) == 4); CU_ASSERT(g_list_length(audio->recall) == 2); /* instantiate recycling context and recall id */ parent_recycling_context = ags_recycling_context_new(0); recycling_context = ags_recycling_context_new(0); g_object_set(recycling_context, "parent", parent_recycling_context, NULL); recall_id = ags_recall_id_new(NULL); recall_id->flags |= AGS_RECALL_ID_PLAYBACK; g_object_set(recall_id, "recycling-context", recycling_context, NULL); /* duplicate recall */ ags_audio_duplicate_recall(audio, recall_id); CU_ASSERT(g_list_length(audio->play) == 4); CU_ASSERT(g_list_length(audio->recall) == 4); } void ags_audio_test_is_playing() { //TODO:JK: implement me } void ags_audio_test_play() { //TODO:JK: implement me } void ags_audio_test_tact() { //TODO:JK: implement me } void ags_audio_test_done() { //TODO:JK: implement me } void ags_audio_test_cancel() { //TODO:JK: implement me } void ags_audio_test_remove() { //TODO:JK: implement me } void ags_audio_test_find_port() { //TODO:JK: implement me } void ags_audio_test_open_files() { //TODO:JK: implement me } void ags_audio_test_recursive_set_property() { //TODO:JK: implement me } void ags_audio_test_recursive_play_init() { //TODO:JK: implement me } void ags_audio_test_link_channel() { AgsChannel *channel, *link; AgsChannel *output, *first_channel; guint i; GError *error; /* audio - master */ test_link_channel.master = ags_audio_new(devout); test_link_channel.master->flags |= AGS_AUDIO_ASYNC; ags_audio_set_audio_channels(test_link_channel.master, AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS); ags_audio_set_pads(test_link_channel.master, AGS_TYPE_INPUT, AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_INPUT_PADS); ags_audio_set_pads(test_link_channel.master, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_OUTPUT_PADS); /* audio - slave 0 */ test_link_channel.slave_0 = ags_audio_new(devout); test_link_channel.slave_0->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_ASYNC); ags_audio_set_audio_channels(test_link_channel.slave_0, AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_0_AUDIO_CHANNELS); ags_audio_set_pads(test_link_channel.slave_0, AGS_TYPE_INPUT, AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_0_INPUT_PADS); ags_audio_set_pads(test_link_channel.slave_0, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_0_OUTPUT_PADS); /* audio - slave 1 */ test_link_channel.slave_1 = ags_audio_new(devout); test_link_channel.slave_1->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_ASYNC); ags_audio_set_audio_channels(test_link_channel.slave_1, AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_1_AUDIO_CHANNELS); ags_audio_set_pads(test_link_channel.slave_1, AGS_TYPE_INPUT, AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_1_INPUT_PADS); ags_audio_set_pads(test_link_channel.slave_1, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_1_OUTPUT_PADS); /* audio - slave 2 */ test_link_channel.slave_2 = ags_audio_new(devout); test_link_channel.slave_2->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_ASYNC); ags_audio_set_audio_channels(test_link_channel.slave_2, AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_2_AUDIO_CHANNELS); ags_audio_set_pads(test_link_channel.slave_2, AGS_TYPE_INPUT, AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_2_INPUT_PADS); ags_audio_set_pads(test_link_channel.slave_2, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_2_OUTPUT_PADS); /* setup link master to slave_0 */ /* connect callback */ channel = test_link_channel.master->input; link = test_link_channel.slave_0->output; for(i = 0; i < AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_0_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ //TODO:JK: implement me /* g_signal_connect(G_OBJECT(channel), "set-link", G_CALLBACK(ags_audio_test_set_link_callback), test_link_channel.master); g_signal_connect(G_OBJECT(link), "set-link", G_CALLBACK(ags_audio_test_set_link_callback), test_link_channel.slave_0); */ channel = channel->next; link = link->next; } /* set link */ channel = test_link_channel.master->input; link = test_link_channel.slave_0->output; for(i = 0; i < AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_0_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ error = NULL; ags_channel_set_link(channel, link, &error); /* assert link set */ CU_ASSERT(error == NULL); CU_ASSERT(channel->link == link); CU_ASSERT(link->link == channel); /* check recycling */ CU_ASSERT(channel->first_recycling == link->first_recycling); CU_ASSERT(channel->last_recycling == link->last_recycling); /* iterate */ channel = channel->next; link = link->next; } /* check output recycling */ output = test_link_channel.master->output; first_channel = link = test_link_channel.slave_0->output; for(i = 0; i < AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_0_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ CU_ASSERT(output->first_recycling == link->first_recycling); CU_ASSERT(output->last_recycling == link->last_recycling); } /* setup link master to slave_1 */ /* connect callback */ channel = ags_channel_pad_nth(test_link_channel.master->input, 1); link = test_link_channel.slave_1->output; for(i = 0; i < AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_1_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ //TODO:JK: implement me /* g_signal_connect(G_OBJECT(channel), "set-link", G_CALLBACK(ags_audio_test_set_link_callback), test_link_channel.master); g_signal_connect(G_OBJECT(link), "set-link", G_CALLBACK(ags_audio_test_set_link_callback), test_link_channel.slave_1); */ channel = channel->next; link = link->next; } /* set link */ channel = ags_channel_pad_nth(test_link_channel.master->input, 1); link = test_link_channel.slave_1->output; for(i = 0; i < AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_1_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ error = NULL; ags_channel_set_link(channel, link, &error); /* assert link set */ CU_ASSERT(error == NULL); CU_ASSERT(channel->link == link); CU_ASSERT(link->link == channel); /* check recycling */ CU_ASSERT(channel->first_recycling == link->first_recycling); CU_ASSERT(channel->last_recycling == link->last_recycling); /* iterate */ channel = channel->next; link = link->next; } /* check output recycling */ output = test_link_channel.master->output; first_channel = test_link_channel.slave_0->output; link = test_link_channel.slave_1->output; for(i = 0; i < AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_1_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ CU_ASSERT(output->first_recycling == first_channel->first_recycling); CU_ASSERT(output->last_recycling == link->last_recycling); output = output->next; first_channel = first_channel->next; link = link->next; } /* setup link master to slave_2 */ /* connect callback */ channel = ags_channel_pad_nth(test_link_channel.master->input, 2); link = test_link_channel.slave_2->output; for(i = 0; i < AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_2_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ //TODO:JK: implement me /* g_signal_connect(G_OBJECT(channel), "set-link", G_CALLBACK(ags_audio_test_set_link_callback), test_link_channel.master); g_signal_connect(G_OBJECT(link), "set-link", G_CALLBACK(ags_audio_test_set_link_callback), test_link_channel.slave_2); */ channel = channel->next; link = link->next; } /* set link */ channel = ags_channel_pad_nth(test_link_channel.master->input, 2); link = test_link_channel.slave_2->output; for(i = 0; i < AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_2_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ error = NULL; ags_channel_set_link(channel, link, &error); /* assert link set */ CU_ASSERT(error == NULL); CU_ASSERT(channel->link == link); CU_ASSERT(link->link == channel); /* check recycling */ CU_ASSERT(channel->first_recycling == link->first_recycling); CU_ASSERT(channel->last_recycling == link->last_recycling); /* iterate */ channel = channel->next; link = link->next; } /* check output recycling */ output = test_link_channel.master->output; first_channel = test_link_channel.slave_0->output; link = test_link_channel.slave_2->output; for(i = 0; i < AGS_AUDIO_TEST_LINK_CHANNEL_SLAVE_2_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_LINK_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ CU_ASSERT(output->first_recycling == first_channel->first_recycling); CU_ASSERT(output->last_recycling == link->last_recycling); output = output->next; first_channel = first_channel->next; link = link->next; } } void ags_audio_test_finalize_linked_channel() { AgsChannel *channel, *link; AgsChannel *output, *current, *last_channel; guint i; GError *error; /* audio - master */ test_finalize_linked_channel.master = ags_audio_new(devout); test_finalize_linked_channel.master->flags |= AGS_AUDIO_ASYNC; ags_audio_set_audio_channels(test_finalize_linked_channel.master, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS); ags_audio_set_pads(test_finalize_linked_channel.master, AGS_TYPE_INPUT, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_INPUT_PADS); ags_audio_set_pads(test_finalize_linked_channel.master, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_OUTPUT_PADS); /* audio - slave 0 */ test_finalize_linked_channel.slave_0 = ags_audio_new(devout); test_finalize_linked_channel.slave_0->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_ASYNC); ags_audio_set_audio_channels(test_finalize_linked_channel.slave_0, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_0_AUDIO_CHANNELS); ags_audio_set_pads(test_finalize_linked_channel.slave_0, AGS_TYPE_INPUT, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_0_INPUT_PADS); ags_audio_set_pads(test_finalize_linked_channel.slave_0, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_0_OUTPUT_PADS); /* audio - slave 1 */ test_finalize_linked_channel.slave_1 = ags_audio_new(devout); test_finalize_linked_channel.slave_1->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_ASYNC); ags_audio_set_audio_channels(test_finalize_linked_channel.slave_1, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_1_AUDIO_CHANNELS); ags_audio_set_pads(test_finalize_linked_channel.slave_1, AGS_TYPE_INPUT, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_1_INPUT_PADS); ags_audio_set_pads(test_finalize_linked_channel.slave_1, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_1_OUTPUT_PADS); /* audio - slave 2 */ test_finalize_linked_channel.slave_2 = ags_audio_new(devout); test_finalize_linked_channel.slave_2->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_ASYNC); ags_audio_set_audio_channels(test_finalize_linked_channel.slave_2, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_AUDIO_CHANNELS); ags_audio_set_pads(test_finalize_linked_channel.slave_2, AGS_TYPE_INPUT, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_INPUT_PADS); ags_audio_set_pads(test_finalize_linked_channel.slave_2, AGS_TYPE_OUTPUT, AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_OUTPUT_PADS); /* setup link master to slave_0 */ /* set link */ channel = test_finalize_linked_channel.master->input; link = test_finalize_linked_channel.slave_0->output; for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_0_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ error = NULL; ags_channel_set_link(channel, link, &error); /* iterate */ channel = channel->next; link = link->next; } /* setup link master to slave_1 */ /* set link */ channel = ags_channel_pad_nth(test_finalize_linked_channel.master->input, 1); link = test_finalize_linked_channel.slave_1->output; for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_1_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ error = NULL; ags_channel_set_link(channel, link, &error); /* iterate */ channel = channel->next; link = link->next; } /* setup link master to slave_2 */ /* set link */ channel = ags_channel_pad_nth(test_finalize_linked_channel.master->input, 2); link = test_finalize_linked_channel.slave_2->output; for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ error = NULL; ags_channel_set_link(channel, link, &error); /* iterate */ channel = channel->next; link = link->next; } /* asserts */ /* unset link */ channel = test_finalize_linked_channel.master->input; ags_audio_set_pads(test_finalize_linked_channel.slave_0, AGS_TYPE_INPUT, 0); ags_audio_set_pads(test_finalize_linked_channel.slave_0, AGS_TYPE_OUTPUT, 0); g_object_unref(test_finalize_linked_channel.slave_0); for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ /* assert link set */ CU_ASSERT(channel->link == NULL); /* check recycling */ CU_ASSERT(channel->first_recycling == NULL); CU_ASSERT(channel->last_recycling == NULL); /* iterate */ channel = channel->next; } /* check output recycling */ output = test_finalize_linked_channel.master->output; current = test_finalize_linked_channel.slave_1->output; for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_1_AUDIO_CHANNELS; i++){ CU_ASSERT(output->first_recycling == current->first_recycling); output = output->next; current = current->next; } output = test_finalize_linked_channel.master->output; last_channel = test_finalize_linked_channel.slave_2->output; for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_AUDIO_CHANNELS; i++){ CU_ASSERT(output->last_recycling == last_channel->last_recycling); output = output->next; last_channel = last_channel->next; } /* unset link */ channel = ags_channel_pad_nth(test_finalize_linked_channel.master->input, 1); ags_audio_set_pads(test_finalize_linked_channel.slave_1, AGS_TYPE_INPUT, 0); ags_audio_set_pads(test_finalize_linked_channel.slave_1, AGS_TYPE_OUTPUT, 0); g_object_unref(test_finalize_linked_channel.slave_1); for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ /* assert link set */ CU_ASSERT(channel->link == NULL); /* check recycling */ CU_ASSERT(channel->first_recycling == NULL); CU_ASSERT(channel->last_recycling == NULL); /* iterate */ channel = channel->next; } /* check output recycling */ output = test_finalize_linked_channel.master->output; last_channel = test_finalize_linked_channel.slave_2->output; for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_1_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ /* check recycling */ CU_ASSERT(output->first_recycling == last_channel->first_recycling); CU_ASSERT(output->last_recycling == last_channel->last_recycling); output = output->next; last_channel = last_channel->next; } /* unset link */ channel = ags_channel_pad_nth(test_finalize_linked_channel.master->input, 2); ags_audio_set_pads(test_finalize_linked_channel.slave_2, AGS_TYPE_INPUT, 0); ags_audio_set_pads(test_finalize_linked_channel.slave_2, AGS_TYPE_OUTPUT, 0); g_object_unref(test_finalize_linked_channel.slave_2); for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ /* assert link unset */ CU_ASSERT(channel->link == NULL); /* check recycling */ CU_ASSERT(channel->first_recycling == NULL); CU_ASSERT(channel->last_recycling == NULL); /* iterate */ channel = channel->next; } /* check output recycling */ output = test_finalize_linked_channel.master->output; for(i = 0; i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_SLAVE_2_AUDIO_CHANNELS && i < AGS_AUDIO_TEST_FINALIZE_LINKED_CHANNEL_MASTER_AUDIO_CHANNELS; i++){ CU_ASSERT(output->first_recycling == NULL); CU_ASSERT(output->last_recycling == NULL); output = output->next; } } void ags_audio_test_init_recall() { AgsAudio *audio; AgsRecall *recall; AgsRecall *recall_audio_run; AgsRecyclingContext *recycling_context; AgsRecallID *recall_id; /* instantiate audio */ audio = ags_audio_new(devout); /* instantiate recalls */ recall = ags_recall_new(); ags_audio_add_recall(audio, recall, TRUE); g_signal_connect(G_OBJECT(recall), "run-init-pre", G_CALLBACK(ags_audio_test_init_recall_callback), NULL); recall_audio_run = ags_recall_audio_run_new(); ags_audio_add_recall(audio, recall_audio_run, TRUE); g_signal_connect(G_OBJECT(recall_audio_run), "run-init-pre", G_CALLBACK(ags_audio_test_init_recall_callback), NULL); /* instantiate recycling context and recall id */ recycling_context = ags_recycling_context_new(0); recall_id = ags_recall_id_new(NULL); g_object_set(recall_id, "recycling-context", recycling_context, NULL); /* setup recalls */ g_object_set(recall, "recall-id", recall_id, NULL); g_object_set(recall_audio_run, "recall-id", recall_id, NULL); /* init recall */ ags_audio_init_recall(audio, 0, recall_id); CU_ASSERT(test_init_recall_callback_hits_count == 2); } void ags_audio_test_resolve_recall() { AgsAudio *audio; AgsRecall *master_recall_audio_run; AgsRecall *slave_recall_audio_run; AgsRecyclingContext *recycling_context; AgsRecallID *recall_id; /* instantiate audio */ audio = ags_audio_new(devout); /* instantiate recalls */ slave_recall_audio_run = ags_recall_audio_run_new(); ags_audio_add_recall(audio, slave_recall_audio_run, TRUE); g_signal_connect(G_OBJECT(slave_recall_audio_run), "resolve-dependencies", G_CALLBACK(ags_audio_test_resolve_recall_callback), NULL); /* instantiate recycling context and recall id */ recycling_context = ags_recycling_context_new(0); recall_id = ags_recall_id_new(NULL); g_object_set(recall_id, "recycling-context", recycling_context, NULL); /* setup recalls */ g_object_set(slave_recall_audio_run, "recall-id", recall_id, NULL); /* resolve recall */ ags_audio_resolve_recall(audio, recall_id); CU_ASSERT(test_resolve_recall_callback_hits_count == 1); } void ags_audio_test_finalize_stub(GObject *gobject) { audio_test_finalized = TRUE; } void ags_audio_test_set_link_callback(AgsChannel *channel, AgsChannel *link, GError **error, AgsAudio *audio) { //TODO:JK: implement me } void ags_audio_test_init_recall_callback(AgsRecall *recall, gpointer data) { test_init_recall_callback_hits_count++; } void ags_audio_test_resolve_recall_callback(AgsRecall *recall, gpointer data) { test_resolve_recall_callback_hits_count++; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsAudioTest", ags_audio_test_init_suite, ags_audio_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } // g_log_set_fatal_mask("GLib-GObject", // "Gtk" G_LOG_DOMAIN, // G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING); /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsAudio dispose", ags_audio_test_dispose) == NULL) || (CU_add_test(pSuite, "test of AgsAudio finalize", ags_audio_test_finalize) == NULL) || (CU_add_test(pSuite, "test of AgsAudio set pads", ags_audio_test_set_pads) == NULL) || (CU_add_test(pSuite, "test of AgsAudio set audio channels", ags_audio_test_set_audio_channels) == NULL) || (CU_add_test(pSuite, "test of AgsAudio link channel", ags_audio_test_link_channel) == NULL) || (CU_add_test(pSuite, "test of AgsAudio finalize linked channel", ags_audio_test_finalize_linked_channel) == NULL) || (CU_add_test(pSuite, "test of AgsAudio add recall", ags_audio_test_add_recall) == NULL) || (CU_add_test(pSuite, "test of AgsAudio add recall container", ags_audio_test_add_recall_container) == NULL) || (CU_add_test(pSuite, "test of AgsAudio recall id", ags_audio_test_add_recall_id) == NULL) || (CU_add_test(pSuite, "test of AgsAudio recycling context", ags_audio_test_add_recycling_context) == NULL) || (CU_add_test(pSuite, "test of AgsAudio duplicate recall", ags_audio_test_duplicate_recall) == NULL) || (CU_add_test(pSuite, "test of AgsAudio initialize recall", ags_audio_test_init_recall) == NULL) || (CU_add_test(pSuite, "test of AgsAudio resolve recall", ags_audio_test_resolve_recall) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_acceleration_test.c0000644000175000017500000000623213246707333020217 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include int ags_acceleration_test_init_suite(); int ags_acceleration_test_clean_suite(); void ags_acceleration_test_duplicate(); /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_acceleration_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_acceleration_test_clean_suite() { return(0); } void ags_acceleration_test_duplicate() { AgsAcceleration *acceleration, *copy; /* create acceleration */ acceleration = g_object_new(AGS_TYPE_ACCELERATION, "x", 0, "y", 0, "acceleration-name", "initial value", NULL); /* assert duplicate */ copy = ags_acceleration_duplicate(acceleration); CU_ASSERT(AGS_IS_ACCELERATION(copy) && copy->x == acceleration->x && copy->y == acceleration->y && !g_strcmp0(copy->acceleration_name, acceleration->acceleration_name)); /* create acceleration */ acceleration = g_object_new(AGS_TYPE_ACCELERATION, "x", 1024, "y", 52, "acceleration-name", "raise value", NULL); /* assert duplicate */ copy = ags_acceleration_duplicate(acceleration); CU_ASSERT(AGS_IS_ACCELERATION(copy) && copy->x == acceleration->x && copy->y == acceleration->y && !g_strcmp0(copy->acceleration_name, acceleration->acceleration_name)); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsAccelerationTest", ags_acceleration_test_init_suite, ags_acceleration_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsAcceleration duplicate", ags_acceleration_test_duplicate) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_functional_audio_test.c0000644000175000017500000005701513247044247021115 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include int ags_functional_audio_test_init_suite(); int ags_functional_audio_test_clean_suite(); void ags_functional_audio_test_playback(); #define AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS (2) #define AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_PADS (78) #define AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO (4) #define AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_BUFFER (5) #define AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_NOTES (4 * (guint) (1.0 / AGS_NOTATION_MINIMUM_NOTE_LENGTH) * 120) #define AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_STOP_DELAY (120) #define AGS_FUNCTIONAL_AUDIO_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard]\n" \ "backend=alsa\n" \ "device=default\n" \ "samplerate=48000\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" AgsAudioApplicationContext *audio_application_context; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_audio_test_init_suite() { AgsConfig *config; config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_FUNCTIONAL_AUDIO_TEST_CONFIG, strlen(AGS_FUNCTIONAL_AUDIO_TEST_CONFIG)); audio_application_context = ags_audio_application_context_new(); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_functional_audio_test_clean_suite() { g_object_unref(audio_application_context); return(0); } void ags_functional_audio_test_playback() { AgsAudio *panel, *mixer; AgsAudio **audio; AgsChannel *channel, *link, *current; AgsTaskThread *task_thread; AgsThread *audio_loop, *soundcard_thread; GObject *soundcard; GList *start_queue; GList *list; struct timespec start_time; guint i, j, k; GError *error; auto void ags_functional_audio_test_playback_add_sink(AgsAudio *audio); auto void ags_functional_audio_test_playback_add_mixer(AgsAudio *audio); auto void ags_functional_audio_test_playback_add_playback(AgsAudio *audio); auto void ags_functional_audio_test_playback_start_audio(AgsAudio *audio); auto void ags_functional_audio_test_playback_stop_audio(AgsAudio *audio); void ags_functional_audio_test_playback_add_sink(AgsAudio *audio){ AgsChannel *channel; AgsPlayChannel *play_channel; AgsPlayChannelRunMaster *play_channel_run; GList *list; guint n_recall; channel = audio->input; while(channel != NULL){ /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-master\0", channel->audio_channel, channel->audio_channel + 1, channel->pad, channel->pad + 1, (AGS_RECALL_FACTORY_INPUT, AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* set audio channel */ list = channel->play; n_recall = 0; while((list = ags_recall_template_find_type(list, AGS_TYPE_PLAY_CHANNEL)) != NULL){ GValue audio_channel_value = {0,}; CU_ASSERT(AGS_IS_PLAY_CHANNEL(list->data)); play_channel = AGS_PLAY_CHANNEL(list->data); CU_ASSERT(AGS_IS_PORT(play_channel->audio_channel)); g_value_init(&audio_channel_value, G_TYPE_UINT64); g_value_set_uint64(&audio_channel_value, channel->audio_channel); ags_port_safe_write(play_channel->audio_channel, &audio_channel_value); g_value_unset(&audio_channel_value); list = list->next; n_recall++; } CU_ASSERT(n_recall == 1); channel = channel->next; } } void ags_functional_audio_test_playback_add_mixer(AgsAudio *audio){ AgsChannel *channel; GList *list; guint n_recall; channel = audio->input; while(channel != NULL){ /* ags-mute */ ags_recall_factory_create(audio, NULL, NULL, "ags-mute\0", channel->audio_channel, channel->audio_channel + 1, channel->pad, channel->pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); list = channel->play; n_recall = 0; while((list = ags_recall_template_find_type(list, AGS_TYPE_MUTE_CHANNEL)) != NULL){ CU_ASSERT(AGS_IS_MUTE_CHANNEL(list->data)); CU_ASSERT(AGS_IS_PORT(AGS_MUTE_CHANNEL(list->data)->muted)); list = list->next; n_recall++; } CU_ASSERT(n_recall == 1); list = channel->recall; n_recall = 0; while((list = ags_recall_template_find_type(list, AGS_TYPE_MUTE_CHANNEL)) != NULL){ CU_ASSERT(AGS_IS_MUTE_CHANNEL(list->data)); CU_ASSERT(AGS_IS_PORT(AGS_MUTE_CHANNEL(list->data)->muted)); list = list->next; n_recall++; } CU_ASSERT(n_recall == 1); /* ags-volume */ ags_recall_factory_create(audio, NULL, NULL, "ags-volume\0", channel->audio_channel, channel->audio_channel + 1, channel->pad, channel->pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); list = channel->play; n_recall = 0; while((list = ags_recall_template_find_type(list, AGS_TYPE_VOLUME_CHANNEL)) != NULL){ CU_ASSERT(AGS_IS_VOLUME_CHANNEL(list->data)); CU_ASSERT(AGS_IS_PORT(AGS_VOLUME_CHANNEL(list->data)->volume)); list = list->next; n_recall++; } CU_ASSERT(n_recall == 1); list = channel->recall; n_recall = 0; while((list = ags_recall_template_find_type(list, AGS_TYPE_VOLUME_CHANNEL)) != NULL){ CU_ASSERT(AGS_IS_VOLUME_CHANNEL(list->data)); CU_ASSERT(AGS_IS_PORT(AGS_VOLUME_CHANNEL(list->data)->volume)); list = list->next; n_recall++; } CU_ASSERT(n_recall == 1); channel = channel->next; } } void ags_functional_audio_test_playback_add_playback(AgsAudio *audio){ AgsChannel *channel, *input; AgsDelayAudio *play_delay_audio; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsPlayNotationAudio *recall_notation_audio; AgsPlayNotationAudioRun *recall_notation_audio_run; AgsBufferChannel *buffer_channel; AgsBufferChannelRun *buffer_channel_run; GList *list; guint n_recall; /* ags-delay */ ags_recall_factory_create(audio, NULL, NULL, "ags-delay\0", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); list = audio->play; n_recall = 0; while((list = ags_recall_template_find_type(list, AGS_TYPE_DELAY_AUDIO)) != NULL){ CU_ASSERT(AGS_IS_DELAY_AUDIO(list->data)); play_delay_audio = list->data; CU_ASSERT(AGS_IS_PORT(AGS_DELAY_AUDIO(list->data)->notation_delay)); CU_ASSERT(AGS_IS_PORT(AGS_DELAY_AUDIO(list->data)->sequencer_delay)); CU_ASSERT(AGS_IS_PORT(AGS_DELAY_AUDIO(list->data)->notation_duration)); CU_ASSERT(AGS_IS_PORT(AGS_DELAY_AUDIO(list->data)->sequencer_duration)); list = list->next; n_recall++; } CU_ASSERT(n_recall == 1); list = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(list != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(list->data); } /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats\0", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); list = audio->play; n_recall = 0; while((list = ags_recall_template_find_type(list, AGS_TYPE_COUNT_BEATS_AUDIO)) != NULL){ CU_ASSERT(AGS_IS_COUNT_BEATS_AUDIO(list->data)); play_count_beats_audio = list->data; CU_ASSERT(AGS_IS_PORT(AGS_COUNT_BEATS_AUDIO(list->data)->notation_loop)); CU_ASSERT(AGS_IS_PORT(AGS_COUNT_BEATS_AUDIO(list->data)->notation_loop_start)); CU_ASSERT(AGS_IS_PORT(AGS_COUNT_BEATS_AUDIO(list->data)->notation_loop_end)); CU_ASSERT(AGS_IS_PORT(AGS_COUNT_BEATS_AUDIO(list->data)->sequencer_loop)); CU_ASSERT(AGS_IS_PORT(AGS_COUNT_BEATS_AUDIO(list->data)->sequencer_loop_start)); CU_ASSERT(AGS_IS_PORT(AGS_COUNT_BEATS_AUDIO(list->data)->sequencer_loop_end)); list = list->next; n_recall++; } CU_ASSERT(n_recall == 1); list = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ GValue value = {0,}; CU_ASSERT(AGS_IS_COUNT_BEATS_AUDIO_RUN(list->data)); play_count_beats_audio_run = list->data; /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run\0", play_delay_audio_run, NULL); ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run), 0, TRUE); g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, FALSE); ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(play_count_beats_audio_run)->recall_audio)->notation_loop, &value); g_value_unset(&value); } /* ags-play-notation */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-notation\0", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); list = audio->recall; n_recall = 0; while((list = ags_recall_template_find_type(list, AGS_TYPE_PLAY_NOTATION_AUDIO)) != NULL){ CU_ASSERT(AGS_IS_PLAY_NOTATION_AUDIO(list->data)); list = list->next; n_recall++; } CU_ASSERT(n_recall == 1); list = ags_recall_find_type(audio->recall, AGS_TYPE_PLAY_NOTATION_AUDIO_RUN); if(list != NULL){ recall_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "delay-audio-run\0", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "count-beats-audio-run\0", play_count_beats_audio_run, NULL); } channel = audio->output; while(channel != NULL){ /* ags-stream */ ags_recall_factory_create(audio, NULL, NULL, "ags-stream\0", channel->audio_channel, channel->audio_channel + 1, channel->pad, channel->pad + 1, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); input = ags_channel_pad_nth(audio->input, channel->pad); while(input != NULL){ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer\0", 0, audio->audio_channels, input->pad, input->pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); input = input->next_pad; } channel = channel->next; } channel = audio->input; while(channel != NULL){ /* ags-stream */ ags_recall_factory_create(audio, NULL, NULL, "ags-stream\0", channel->audio_channel, channel->audio_channel + 1, channel->pad, channel->pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); channel = channel->next; } } void ags_functional_audio_test_playback_start_audio(AgsAudio *audio){ AgsInitAudio *init_audio; AgsAppendAudio *append_audio; AgsStartSoundcard *start_soundcard; GList *task; task = NULL; init_audio = ags_init_audio_new(audio, FALSE, FALSE, TRUE); task = g_list_prepend(task, init_audio); append_audio = ags_append_audio_new(AGS_APPLICATION_CONTEXT(audio_application_context)->main_loop, audio, FALSE, FALSE, TRUE); task = g_list_prepend(task, append_audio); start_soundcard = ags_start_soundcard_new(audio_application_context); task = g_list_prepend(task, start_soundcard); ags_task_thread_append_tasks(task_thread, task); } void ags_functional_audio_test_playback_stop_audio(AgsAudio *audio){ AgsCancelAudio *cancel_audio; struct timespec sleep_time; clock_gettime(CLOCK_MONOTONIC, &sleep_time); while(sleep_time.tv_sec < start_time.tv_sec + AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_STOP_DELAY){ usleep(USEC_PER_SEC); clock_gettime(CLOCK_MONOTONIC, &sleep_time); g_message("ags_functional_audio_test_playback_stop_audio() - usleep %ds [%x]\0", start_time.tv_sec + AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_STOP_DELAY - sleep_time.tv_sec, audio); } /* create cancel task */ cancel_audio = ags_cancel_audio_new(audio, FALSE, FALSE, TRUE); /* append AgsCancelAudio */ ags_task_thread_append_task((AgsTaskThread *) task_thread, (AgsTask *) cancel_audio); } /* * Setup audio tree sink, mixer and notation player as source */ soundcard = NULL; if(audio_application_context->soundcard != NULL){ soundcard = audio_application_context->soundcard->data; } /* the output panel */ panel = ags_audio_new(soundcard); g_object_ref(panel); panel->flags |= (AGS_AUDIO_SYNC); panel->audio_channels = AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS; ags_audio_set_pads(panel, AGS_TYPE_OUTPUT, 1); ags_audio_set_pads(panel, AGS_TYPE_INPUT, 1); list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), g_list_prepend(list, panel)); ags_functional_audio_test_playback_add_sink(panel); ags_connectable_connect(AGS_CONNECTABLE(panel)); /* assert recycling NULL */ channel = panel->output; for(i = 0; i < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS; i++){ CU_ASSERT(channel->first_recycling == NULL); CU_ASSERT(channel->last_recycling == NULL); channel = channel->next; } channel = panel->input; for(i = 0; i < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS; i++){ CU_ASSERT(channel->first_recycling == NULL); CU_ASSERT(channel->last_recycling == NULL); channel = channel->next; } /* the mixer */ mixer = ags_audio_new(soundcard); g_object_ref(mixer); mixer->flags |= (AGS_AUDIO_ASYNC); mixer->audio_channels = AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS; ags_audio_set_pads(mixer, AGS_TYPE_OUTPUT, 1); ags_audio_set_pads(mixer, AGS_TYPE_INPUT, AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO); list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), g_list_prepend(list, mixer)); ags_functional_audio_test_playback_add_mixer(mixer); ags_connectable_connect(AGS_CONNECTABLE(mixer)); /* set link, assert link set and recycling NULL */ channel = mixer->output; link = panel->input; for(i = 0; i < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS; i++){ error = NULL; ags_channel_set_link(channel, link, &error); CU_ASSERT(error == NULL); CU_ASSERT(channel->link == link); CU_ASSERT(link->link == channel); CU_ASSERT(channel->first_recycling == NULL); CU_ASSERT(channel->last_recycling == NULL); CU_ASSERT(link->first_recycling == NULL); CU_ASSERT(link->last_recycling == NULL); channel = channel->next; link = link->next; } /* create sources */ audio = (AgsAudio **) malloc(AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO * sizeof(AgsAudio *)); for(i = 0; i < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO; i++){ AgsNotation *notation; AgsTimestamp *timestamp; GList *list_notation; audio[i] = ags_audio_new(soundcard); g_object_ref(audio[i]); audio[i]->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_NOTATION_DEFAULT); ags_audio_set_audio_channels(audio[i], AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS); ags_audio_set_pads(audio[i], AGS_TYPE_OUTPUT, 1); ags_audio_set_pads(audio[i], AGS_TYPE_INPUT, AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_PADS); list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), g_list_prepend(list, audio[i])); /* populate notation and set link, assert link set and recycling not NULL */ channel = audio[i]->output; link = ags_channel_pad_nth(mixer->input, i); timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; for(j = 0; j < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS; j++){ AgsAudioSignal *destination; destination = ags_audio_signal_new_with_length(soundcard, channel->first_recycling, NULL, AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_BUFFER); destination->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(channel->first_recycling, destination); /* populate notation */ for(k = 0; k < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_NOTES; k++){ AgsNote *note; note = ags_note_new(); note->x[0] = k + (rand() % 4); note->x[1] = note->x[0] + (rand() % 3) + 1; note->y = rand() % AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_PADS; timestamp->timer.ags_offset.offset = (guint64) AGS_NOTATION_DEFAULT_OFFSET * floor((double) note->x[0] / (double) AGS_NOTATION_DEFAULT_OFFSET); list_notation = audio[i]->notation; list_notation = ags_notation_find_near_timestamp(list_notation, j, timestamp); if(list_notation != NULL){ notation = list_notation->data; }else{ notation = ags_notation_new(audio[i], j); audio[i]->notation = ags_notation_add(audio[i]->notation, notation); } ags_notation_add_note(notation, note, FALSE); } /* set link */ error = NULL; ags_channel_set_link(channel, link, &error); CU_ASSERT(error == NULL); CU_ASSERT(channel->link == link); CU_ASSERT(link->link == channel); CU_ASSERT(channel->first_recycling != NULL); CU_ASSERT(channel->last_recycling != NULL); CU_ASSERT(link->first_recycling == channel->first_recycling); CU_ASSERT(link->last_recycling == channel->last_recycling); channel = channel->next; link = link->next; } channel = audio[i]->input; for(j = 0; j < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_PADS; j++){ AgsAudioSignal *source; source = ags_audio_signal_new_with_length(soundcard, channel->first_recycling, NULL, AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_BUFFER); source->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(channel->first_recycling, source); channel = channel->next; } /* find recycling within mixer */ channel = audio[i]->output; current = mixer->output; for(j = 0; j < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS; j++){ CU_ASSERT(ags_recycling_position(current->first_recycling, current->last_recycling->next, channel->first_recycling) != -1); channel = channel->next; current = current->next; } /* find recycling within panel */ channel = audio[i]->output; current = panel->input; for(j = 0; j < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO_CHANNELS; j++){ CU_ASSERT(ags_recycling_position(current->first_recycling, current->last_recycling->next, channel->first_recycling) != -1); channel = channel->next; current = current->next; } ags_functional_audio_test_playback_add_playback(audio[i]); ags_connectable_connect(AGS_CONNECTABLE(audio[i])); } /* * Start threads and enable playback */ audio_loop = AGS_APPLICATION_CONTEXT(audio_application_context)->main_loop; task_thread = ags_thread_find_type(audio_loop, AGS_TYPE_TASK_THREAD); soundcard_thread = ags_thread_find_type(audio_loop, AGS_TYPE_SOUNDCARD_THREAD); /* start engine */ pthread_mutex_lock(audio_loop->start_mutex); start_queue = NULL; start_queue = g_list_prepend(start_queue, task_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); ags_thread_start(audio_loop); ags_thread_pool_start(audio_application_context->thread_pool); /* wait for audio loop */ pthread_mutex_lock(audio_loop->start_mutex); if(g_atomic_int_get(&(audio_loop->start_wait)) == TRUE){ g_atomic_int_set(&(audio_loop->start_done), FALSE); while(g_atomic_int_get(&(audio_loop->start_wait)) == TRUE && g_atomic_int_get(&(audio_loop->start_done)) == FALSE){ pthread_cond_wait(audio_loop->start_cond, audio_loop->start_mutex); } } pthread_mutex_unlock(audio_loop->start_mutex); /* start playback */ g_message("start playback\0"); for(i = 0; i < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO; i++){ ags_functional_audio_test_playback_start_audio(audio[i]); } clock_gettime(CLOCK_MONOTONIC, &start_time); /* stop playback */ for(i = 0; i < AGS_FUNCTIONAL_AUDIO_TEST_PLAYBACK_N_AUDIO; i++){ ags_functional_audio_test_playback_stop_audio(audio[i]); } g_message("playback stopped\0"); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsAudioTest\0", ags_functional_audio_test_init_suite, ags_functional_audio_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsAudio doing playback\0", ags_functional_audio_test_playback) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_audio_signal_test.c0000644000175000017500000001352113246707333020223 00000000000000/* 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 . */ #include #include #include #include #include #include #include int ags_audio_signal_test_init_suite(); int ags_audio_signal_test_clean_suite(); void ags_audio_signal_test_add_stream(); void ags_audio_signal_test_resize_stream(); void ags_audio_signal_test_realloc_buffer_size(); void ags_audio_signal_test_morph_samplerate(); void ags_audio_signal_test_copy_buffer_to_buffer(); void ags_audio_signal_test_copy_double_buffer_to_buffer(); void ags_audio_signal_test_duplicate_stream(); void ags_audio_signal_test_get_template(); void ags_audio_signal_test_get_stream_current(); void ags_audio_signal_test_get_by_recall_id(); void ags_audio_signal_test_tile(); void ags_audio_signal_test_scale(); #define AGS_AUDIO_SIGNAL_TEST_GET_TEMPLATE_N_AUDIO_SIGNAL (3) #define AGS_AUDIO_SIGNAL_TEST_GET_STREAM_CURRENT_N_AUDIO_SIGNAL (6) AgsDevout *devout; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_audio_signal_test_init_suite() { devout = ags_devout_new(NULL); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_audio_signal_test_clean_suite() { g_object_unref(devout); return(0); } void ags_audio_signal_test_add_stream() { AgsAudioSignal *audio_signal; /* instantiate audio signal */ audio_signal = ags_audio_signal_new(G_OBJECT(devout), NULL, NULL); /* assert add stream */ CU_ASSERT(audio_signal->stream_beginning == NULL); ags_audio_signal_add_stream(audio_signal); CU_ASSERT(audio_signal->stream_beginning != NULL); CU_ASSERT(g_list_length(audio_signal->stream_beginning) == 1); } void ags_audio_signal_test_resize_stream() { AgsAudioSignal *audio_signal; /* instantiate audio signal */ audio_signal = ags_audio_signal_new(G_OBJECT(devout), NULL, NULL); /* assert resize stream */ CU_ASSERT(audio_signal->stream_beginning == NULL); ags_audio_signal_stream_resize(audio_signal, 5); CU_ASSERT(audio_signal->stream_beginning != NULL); CU_ASSERT(g_list_length(audio_signal->stream_beginning) == 5); } void ags_audio_signal_test_realloc_buffer_size() { //TODO:JK: implement me } void ags_audio_signal_test_morph_samplerate() { //TODO:JK: implement me } void ags_audio_signal_test_copy_buffer_to_buffer() { //TODO:JK: implement me } void ags_audio_signal_test_copy_double_buffer_to_buffer() { //TODO:JK: implement me } void ags_audio_signal_test_duplicate_stream() { //TODO:JK: implement me } void ags_audio_signal_test_get_template() { //TODO:JK: implement me } void ags_audio_signal_test_get_stream_current() { //TODO:JK: implement me } void ags_audio_signal_test_get_by_recall_id() { //TODO:JK: implement me } void ags_audio_signal_test_tile() { //TODO:JK: implement me } void ags_audio_signal_test_scale() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsAudioSignalTest\0", ags_audio_signal_test_init_suite, ags_audio_signal_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsAudioSignal add stream\0", ags_audio_signal_test_add_stream) == NULL) || (CU_add_test(pSuite, "test of AgsAudioSignal resize stream\0", ags_audio_signal_test_resize_stream) == NULL) /* || (CU_add_test(pSuite, "test of AgsAudioSignal realloc buffer size\0", ags_audio_signal_test_realloc_buffer_size) == NULL) || (CU_add_test(pSuite, "test of AgsAudioSignal copy buffer to buffer\0", ags_audio_signal_test_copy_buffer_to_buffer) == NULL) || (CU_add_test(pSuite, "test of AgsAudioSignal copy double buffer to buffer\0", ags_audio_signal_test_copy_double_buffer_to_buffer) == NULL) || (CU_add_test(pSuite, "test of AgsAudioSignal duplicate stream\0", ags_audio_signal_test_duplicate_stream) == NULL) || (CU_add_test(pSuite, "test of AgsAudioSignal get template\0", ags_audio_signal_test_get_template) == NULL) || (CU_add_test(pSuite, "test of AgsAudioSignal get stream current\0", ags_audio_signal_test_get_stream_current) == NULL) || (CU_add_test(pSuite, "test of AgsAudioSignal get by recall id\0", ags_audio_signal_test_get_by_recall_id) == NULL) || (CU_add_test(pSuite, "test of AgsAudioSignal tile\0", ags_audio_signal_test_tile) == NULL) || (CU_add_test(pSuite, "test of AgsAudioSignal scale\0", ags_audio_signal_test_scale) == NULL) */ ){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_notation_test.c0000644000175000017500000005035513247044247017425 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #include #include #include #include #include #include #include #include #include int ags_notation_test_init_suite(); int ags_notation_test_clean_suite(); void ags_notation_test_find_near_timestamp(); void ags_notation_test_add_note(); void ags_notation_test_remove_note_at_position(); void ags_notation_test_is_note_selected(); void ags_notation_test_find_point(); void ags_notation_test_find_region(); void ags_notation_test_free_selection(); void ags_notation_test_add_all_to_selection(); void ags_notation_test_add_point_to_selection(); void ags_notation_test_remove_point_from_selection(); void ags_notation_test_add_region_to_selection(); void ags_notation_test_remove_region_from_selection(); void ags_notation_test_copy_selection(); void ags_notation_test_cut_selection(); void ags_notation_test_insert_from_clipboard(); #define AGS_NOTATION_TEST_FIND_NEAR_TIMESTAMP_N_NOTATION (8) #define AGS_NOTATION_TEST_ADD_NOTE_WIDTH (4096) #define AGS_NOTATION_TEST_ADD_NOTE_HEIGHT (88) #define AGS_NOTATION_TEST_ADD_NOTE_COUNT (1024) #define AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_WIDTH (4096) #define AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_HEIGHT (88) #define AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_COUNT (1024) #define AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_REMOVE_COUNT (256) #define AGS_NOTATION_TEST_IS_NOTE_SELECTED_WIDTH (4096) #define AGS_NOTATION_TEST_IS_NOTE_SELECTED_HEIGHT (88) #define AGS_NOTATION_TEST_IS_NOTE_SELECTED_COUNT (1024) #define AGS_NOTATION_TEST_IS_NOTE_SELECTED_SELECTION_COUNT (128) #define AGS_NOTATION_TEST_FIND_POINT_WIDTH (4096) #define AGS_NOTATION_TEST_FIND_POINT_HEIGHT (88) #define AGS_NOTATION_TEST_FIND_POINT_COUNT (1024) #define AGS_NOTATION_TEST_FIND_POINT_N_ATTEMPTS (128) #define AGS_NOTATION_TEST_FIND_REGION_WIDTH (4096) #define AGS_NOTATION_TEST_FIND_REGION_HEIGHT (88) #define AGS_NOTATION_TEST_FIND_REGION_COUNT (1024) #define AGS_NOTATION_TEST_FIND_REGION_N_ATTEMPTS (128) #define AGS_NOTATION_TEST_FIND_REGION_SELECTION_WIDTH (128) #define AGS_NOTATION_TEST_FIND_REGION_SELECTION_HEIGHT (24) #define AGS_NOTATION_TEST_FREE_SELECTION_WIDTH (4096) #define AGS_NOTATION_TEST_FREE_SELECTION_HEIGHT (88) #define AGS_NOTATION_TEST_FREE_SELECTION_COUNT (1024) #define AGS_NOTATION_TEST_FREE_SELECTION_SELECTION_COUNT (64) #define AGS_NOTATION_TEST_ADD_ALL_TO_SELECTION_WIDTH (4096) #define AGS_NOTATION_TEST_ADD_ALL_TO_SELECTION_HEIGHT (88) #define AGS_NOTATION_TEST_ADD_ALL_TO_SELECTION_COUNT (1024) #define AGS_NOTATION_TEST_ADD_POINT_TO_SELECTION_WIDTH (4096) #define AGS_NOTATION_TEST_ADD_POINT_TO_SELECTION_HEIGHT (88) #define AGS_NOTATION_TEST_ADD_POINT_TO_SELECTION_COUNT (1024) #define AGS_NOTATION_TEST_ADD_POINT_TO_SELECTION_N_ATTEMPTS (128) #define AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_WIDTH (4096) #define AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_HEIGHT (88) #define AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_COUNT (1024) #define AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_SELECTION_COUNT (128) #define AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_N_ATTEMPTS (64) AgsAudio *audio; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_notation_test_init_suite() { audio = ags_audio_new(NULL); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_notation_test_clean_suite() { g_object_unref(audio); return(0); } void ags_notation_test_find_near_timestamp() { AgsNotation **notation; AgsTimestamp *timestamp; GList *list, *current; guint i; notation = (AgsNotation **) malloc(AGS_NOTATION_TEST_FIND_NEAR_TIMESTAMP_N_NOTATION * sizeof(AgsNotation *)); list = NULL; for(i = 0; i < AGS_NOTATION_TEST_FIND_NEAR_TIMESTAMP_N_NOTATION; i++){ /* nth notation */ notation[i] = ags_notation_new(audio, 0); timestamp = notation[i]->timestamp; timestamp->timer.ags_offset.offset = i * AGS_NOTATION_DEFAULT_OFFSET; list = g_list_prepend(list, notation[i]); } list = g_list_reverse(list); /* instantiate timestamp to check against */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; /* assert find */ for(i = 0; i < AGS_NOTATION_TEST_FIND_NEAR_TIMESTAMP_N_NOTATION; i++){ timestamp->timer.ags_offset.offset = i * AGS_NOTATION_DEFAULT_OFFSET; current = ags_notation_find_near_timestamp(list, 0, timestamp); CU_ASSERT(current != NULL && current->data == notation[i]); } } void ags_notation_test_add_note() { AgsNotation *notation; AgsNote *note; GList *list; guint x0, y; guint i; gboolean success; /* create notation */ notation = ags_notation_new(audio, 0); for(i = 0; i < AGS_NOTATION_TEST_ADD_NOTE_COUNT; i++){ x0 = rand() % AGS_NOTATION_TEST_ADD_NOTE_WIDTH; y = rand() % AGS_NOTATION_TEST_ADD_NOTE_HEIGHT; note = ags_note_new_with_offset(x0, x0 + 1, y, 0.0, 0); ags_notation_add_note(notation, note, FALSE); } /* assert position */ list = notation->notes; success = TRUE; for(i = 0; i < AGS_NOTATION_TEST_ADD_NOTE_COUNT; i++){ if(list->prev != NULL){ if(!(AGS_NOTE(list->prev->data)->x[0] < AGS_NOTE(list->data)->x[0] || (AGS_NOTE(list->prev->data)->x[0] == AGS_NOTE(list->data)->x[0] && (AGS_NOTE(list->prev->data)->y <= AGS_NOTE(list->data)->y)))){ success = FALSE; break; } } list = list->next; } CU_ASSERT(success == TRUE); CU_ASSERT(list == NULL); } void ags_notation_test_remove_note_at_position() { AgsNotation *notation; AgsNote *note; GList *list, *current; guint x0, y; guint nth; guint i; gboolean success; /* create notation */ notation = ags_notation_new(audio, 0); for(i = 0; i < AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_COUNT; i++){ x0 = rand() % AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_WIDTH; y = rand() % AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_HEIGHT; note = ags_note_new_with_offset(x0, x0 + 1, y, 0.0, 0.0); ags_notation_add_note(notation, note, FALSE); } for(i = 0; i < AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_REMOVE_COUNT; i++){ nth = rand() % (AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_COUNT - i); current = g_list_nth(notation->notes, nth); ags_notation_remove_note_at_position(notation, AGS_NOTE(current->data)->x[0], AGS_NOTE(current->data)->y); } /* assert position */ list = notation->notes; success = TRUE; for(i = 0; i < AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_COUNT - AGS_NOTATION_TEST_REMOVE_NOTE_AT_POSITION_REMOVE_COUNT; i++){ if(list->prev != NULL){ if(!(AGS_NOTE(list->prev->data)->x[0] < AGS_NOTE(list->data)->x[0] || (AGS_NOTE(list->prev->data)->x[0] == AGS_NOTE(list->data)->x[0] && (AGS_NOTE(list->prev->data)->y <= AGS_NOTE(list->data)->y)))){ success = FALSE; break; } } list = list->next; } CU_ASSERT(success == TRUE); CU_ASSERT(list == NULL); } void ags_notation_test_is_note_selected() { AgsNotation *notation; AgsNote *note; GList *list, *current; guint x0, y; guint nth; guint i; gboolean success; /* create notation */ notation = ags_notation_new(audio, 0); for(i = 0; i < AGS_NOTATION_TEST_IS_NOTE_SELECTED_COUNT; i++){ x0 = rand() % AGS_NOTATION_TEST_IS_NOTE_SELECTED_WIDTH; y = rand() % AGS_NOTATION_TEST_IS_NOTE_SELECTED_HEIGHT; note = ags_note_new_with_offset(x0, x0 + 1, y, 0.0, 0.0); ags_notation_add_note(notation, note, FALSE); } /* select notes */ for(i = 0; i < AGS_NOTATION_TEST_IS_NOTE_SELECTED_SELECTION_COUNT; i++){ nth = rand() % (AGS_NOTATION_TEST_IS_NOTE_SELECTED_COUNT - i); current = g_list_nth(notation->notes, nth); ags_notation_add_note(notation, current->data, TRUE); } /* assert position */ list = notation->selection; success = TRUE; for(i = 0; i < AGS_NOTATION_TEST_IS_NOTE_SELECTED_SELECTION_COUNT; i++){ if(list->prev != NULL){ if(!(AGS_NOTE(list->prev->data)->x[0] < AGS_NOTE(list->data)->x[0] || (AGS_NOTE(list->prev->data)->x[0] == AGS_NOTE(list->data)->x[0] && (AGS_NOTE(list->prev->data)->y <= AGS_NOTE(list->data)->y)))){ success = FALSE; break; } } list = list->next; } CU_ASSERT(success == TRUE); CU_ASSERT(list == NULL); } void ags_notation_test_find_point() { AgsNotation *notation; AgsNote *note; GList *list, *current; guint x0, y; guint nth; guint i; gboolean success; /* create notation */ notation = ags_notation_new(audio, 0); for(i = 0; i < AGS_NOTATION_TEST_FIND_POINT_COUNT; i++){ x0 = rand() % AGS_NOTATION_TEST_FIND_POINT_WIDTH; y = rand() % AGS_NOTATION_TEST_FIND_POINT_HEIGHT; note = ags_note_new_with_offset(x0, x0 + 1, y, 0.0, 0.0); ags_notation_add_note(notation, note, FALSE); } /* assert find point */ success = TRUE; for(i = 0; i < AGS_NOTATION_TEST_FIND_POINT_N_ATTEMPTS; i++){ nth = rand() % AGS_NOTATION_TEST_FIND_POINT_COUNT; current = g_list_nth(notation->notes, nth); note = ags_notation_find_point(notation, AGS_NOTE(current->data)->x[0], AGS_NOTE(current->data)->y, FALSE); if(note->x[0] != AGS_NOTE(current->data)->x[0] || note->y != AGS_NOTE(current->data)->y){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_notation_test_find_region() { AgsNotation *notation; AgsNote *note; GList *list, *current, *region; guint x0, y; guint nth; guint i; gboolean success; /* create notation */ notation = ags_notation_new(audio, 0); for(i = 0; i < AGS_NOTATION_TEST_FIND_REGION_COUNT; i++){ x0 = rand() % AGS_NOTATION_TEST_FIND_REGION_WIDTH; y = rand() % AGS_NOTATION_TEST_FIND_REGION_HEIGHT; note = ags_note_new_with_offset(x0, x0 + 1, y, 0.0, 0.0); ags_notation_add_note(notation, note, FALSE); } /* assert find region */ success = TRUE; for(i = 0; i < AGS_NOTATION_TEST_FIND_REGION_N_ATTEMPTS && success; i++){ nth = rand() % AGS_NOTATION_TEST_FIND_REGION_COUNT; current = g_list_nth(notation->notes, nth); region = ags_notation_find_region(notation, AGS_NOTE(current->data)->x[0], AGS_NOTE(current->data)->y, AGS_NOTE(current->data)->x[0] + AGS_NOTATION_TEST_FIND_REGION_SELECTION_WIDTH, AGS_NOTE(current->data)->y + AGS_NOTATION_TEST_FIND_REGION_SELECTION_HEIGHT, FALSE); while(region != NULL){ if(!(AGS_NOTE(region->data)->x[0] >= AGS_NOTE(current->data)->x[0] && AGS_NOTE(current->data)->x[0] < AGS_NOTE(current->data)->x[0] + AGS_NOTATION_TEST_FIND_REGION_SELECTION_WIDTH && AGS_NOTE(region->data)->y >= AGS_NOTE(current->data)->y && AGS_NOTE(current->data)->y < AGS_NOTE(current->data)->y + AGS_NOTATION_TEST_FIND_REGION_SELECTION_HEIGHT)){ success = FALSE; break; } region = region->next; } } CU_ASSERT(success == TRUE); } void ags_notation_test_free_selection() { AgsNotation *notation; AgsNote *note; GList *list, *current; guint x0, y; guint nth; guint i; /* create notation */ notation = ags_notation_new(audio, 0); for(i = 0; i < AGS_NOTATION_TEST_FREE_SELECTION_COUNT; i++){ x0 = rand() % AGS_NOTATION_TEST_FREE_SELECTION_WIDTH; y = rand() % AGS_NOTATION_TEST_FREE_SELECTION_HEIGHT; note = ags_note_new_with_offset(x0, x0 + 1, y, 0.0, 0.0); ags_notation_add_note(notation, note, FALSE); } /* select notes */ for(i = 0; i < AGS_NOTATION_TEST_FREE_SELECTION_SELECTION_COUNT; i++){ nth = rand() % (AGS_NOTATION_TEST_FREE_SELECTION_SELECTION_COUNT - i); current = g_list_nth(notation->notes, nth); ags_notation_add_note(notation, current->data, TRUE); } /* assert free slection */ CU_ASSERT(notation->selection != NULL); ags_notation_free_selection(notation); CU_ASSERT(notation->selection == NULL); } void ags_notation_test_add_all_to_selection() { AgsNotation *notation; AgsNote *note; GList *list, *current, *current_selection; guint x0, y; guint nth; guint i; gboolean success; /* create notation */ notation = ags_notation_new(audio, 0); for(i = 0; i < AGS_NOTATION_TEST_ADD_ALL_TO_SELECTION_COUNT; i++){ x0 = rand() % AGS_NOTATION_TEST_ADD_ALL_TO_SELECTION_WIDTH; y = rand() % AGS_NOTATION_TEST_ADD_ALL_TO_SELECTION_HEIGHT; note = ags_note_new_with_offset(x0, x0 + 1, y, 0.0, 0.0); ags_notation_add_note(notation, note, FALSE); } /* assert all present */ current = notation->notes; current_selection = notation->selection; success = TRUE; while(current != NULL && current_selection != NULL){ if(current->data != current_selection->data){ success = FALSE; break; } current = current->next; current_selection = current_selection->next; } CU_ASSERT(success == TRUE); } void ags_notation_test_add_point_to_selection() { AgsNotation *notation; AgsNote *note; GList *list, *current; guint x0, y; guint nth; guint i; gboolean success; /* create notation */ notation = ags_notation_new(audio, 0); for(i = 0; i < AGS_NOTATION_TEST_ADD_POINT_TO_SELECTION_COUNT; i++){ x0 = rand() % AGS_NOTATION_TEST_ADD_POINT_TO_SELECTION_WIDTH; y = rand() % AGS_NOTATION_TEST_ADD_POINT_TO_SELECTION_HEIGHT; note = ags_note_new_with_offset(x0, x0 + 1, y, 0.0, 0.0); ags_notation_add_note(notation, note, FALSE); } /* assert add point to selection */ success = TRUE; for(i = 0; i < AGS_NOTATION_TEST_ADD_POINT_TO_SELECTION_N_ATTEMPTS; i++){ nth = rand() % AGS_NOTATION_TEST_ADD_POINT_TO_SELECTION_COUNT; current = g_list_nth(notation->notes, nth); ags_notation_add_point_to_selection(notation, AGS_NOTE(current->data)->x[0], AGS_NOTE(current->data)->y, FALSE); if(ags_notation_find_point(notation, AGS_NOTE(current->data)->x[0], AGS_NOTE(current->data)->y, TRUE) == NULL){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_notation_test_remove_point_from_selection() { AgsNotation *notation; AgsNote *note, *match; GList *list, *current, *iter, *next; guint x0, y; guint nth; guint n_matches; guint i; gboolean success; /* create notation */ notation = ags_notation_new(audio, 0); for(i = 0; i < AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_COUNT; i++){ x0 = rand() % AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_WIDTH; y = rand() % AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_HEIGHT; note = ags_note_new_with_offset(x0, x0 + 1, y, 0.0, 0.0); ags_notation_add_note(notation, note, FALSE); } /* add point to selection */ for(i = 0; i < AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_SELECTION_COUNT; i++){ nth = rand() % AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_COUNT; current = g_list_nth(notation->notes, nth); ags_notation_add_point_to_selection(notation, AGS_NOTE(current->data)->x[0], AGS_NOTE(current->data)->y, FALSE); } /* assert remove point from selection */ success = TRUE; for(i = 0; i < AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_N_ATTEMPTS; i++){ nth = rand() % (AGS_NOTATION_TEST_REMOVE_POINT_FROM_SELECTION_N_ATTEMPTS); current = g_list_nth(notation->selection, nth); if(current == NULL){ continue; } iter = current->next; n_matches = 0; while(iter != NULL && AGS_NOTE(iter->data)->x[0] == AGS_NOTE(current->data)->x[0] && AGS_NOTE(iter->data)->y == AGS_NOTE(current->data)->y){ n_matches++; iter = iter->next; } note = AGS_NOTE(current->data); ags_notation_remove_point_from_selection(notation, note->x[0], note->y); if((match = ags_notation_find_point(notation, note->x[0], note->y, TRUE)) != NULL){ if(n_matches == 0){ success = FALSE; break; }else{ next = g_list_find(notation->selection, match); while(next != NULL && AGS_NOTE(next->data)->x[0] == note->x[0] && AGS_NOTE(next->data)->y == note->y){ n_matches--; next = next->next; } if(n_matches != 0){ success = FALSE; break; } } } } CU_ASSERT(success == TRUE); } void ags_notation_test_add_region_to_selection() { //TODO:JK: implement me } void ags_notation_test_remove_region_from_selection() { //TODO:JK: implement me } void ags_notation_test_copy_selection() { //TODO:JK: implement me } void ags_notation_test_cut_selection() { //TODO:JK: implement me } void ags_notation_test_insert_from_clipboard() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsNotationTest\0", ags_notation_test_init_suite, ags_notation_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsNotation find near timestamp\0", ags_notation_test_find_near_timestamp) == NULL) || (CU_add_test(pSuite, "test of AgsNotation add note\0", ags_notation_test_add_note) == NULL) || (CU_add_test(pSuite, "test of AgsNotation remove note at position\0", ags_notation_test_remove_note_at_position) == NULL) || (CU_add_test(pSuite, "test of AgsNotation is note selected\0", ags_notation_test_is_note_selected) == NULL) || (CU_add_test(pSuite, "test of AgsNotation find point\0", ags_notation_test_find_point) == NULL) || (CU_add_test(pSuite, "test of AgsNotation find region\0", ags_notation_test_find_region) == NULL) || (CU_add_test(pSuite, "test of AgsNotation free selection\0", ags_notation_test_free_selection) == NULL) || (CU_add_test(pSuite, "test of AgsNotation add all to selection\0", ags_notation_test_add_all_to_selection) == NULL) || (CU_add_test(pSuite, "test of AgsNotation add point to selection\0", ags_notation_test_add_point_to_selection) == NULL) || (CU_add_test(pSuite, "test of AgsNotation remove point from selection\0", ags_notation_test_remove_point_from_selection) == NULL) || (CU_add_test(pSuite, "test of AgsNotation add region to selection\0", ags_notation_test_add_region_to_selection) == NULL) || (CU_add_test(pSuite, "test of AgsNotation remove region from selection\0", ags_notation_test_remove_region_from_selection) == NULL) || (CU_add_test(pSuite, "test of AgsNotation copy selection\0", ags_notation_test_copy_selection) == NULL) || (CU_add_test(pSuite, "test of AgsNotation cut selection\0", ags_notation_test_cut_selection) == NULL) || (CU_add_test(pSuite, "test of AgsNotation insert from clipboard\0", ags_notation_test_insert_from_clipboard) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_channel_test.c0000644000175000017500000003451013246707333017176 00000000000000/* 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 . */ #include #include #include #include #include #include #include int ags_channel_test_init_suite(); int ags_channel_test_clean_suite(); void ags_channel_test_dispose(); void ags_channel_test_finalize(); void ags_channel_test_add_recall(); void ags_channel_test_add_recall_container(); void ags_channel_test_add_recall_id(); void ags_channel_test_duplicate_recall(); void ags_channel_test_init_recall(); void ags_channel_test_resolve_recall(); void ags_channel_test_finalize_stub(GObject *gobject); void ags_channel_test_run_init_pre_recall_callback(AgsRecall *recall, gpointer data); void ags_channel_test_resolve_recall_callback(AgsRecall *recall, gpointer data); #define AGS_CHANNEL_TEST_DISPOSE_PLAY_COUNT (8) #define AGS_CHANNEL_TEST_DISPOSE_RECALL_COUNT (8) #define AGS_CHANNEL_TEST_FINALIZE_PLAY_COUNT (8) #define AGS_CHANNEL_TEST_FINALIZE_RECALL_COUNT (8) AgsAudio *audio; gboolean channel_test_finalized; guint test_init_recall_callback_hits_count = 0; guint test_resolve_recall_callback_hits_count = 0; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_channel_test_init_suite() { audio = g_object_new(AGS_TYPE_AUDIO, NULL); audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING); g_object_ref(audio); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_channel_test_clean_suite() { g_object_unref(audio); return(0); } void ags_channel_test_dispose() { AgsChannel *channel; AgsRecall *recall; guint i; channel = ags_output_new(audio); channel->first_recycling = channel->last_recycling = ags_recycling_new(NULL); g_object_ref(channel->first_recycling); /* add recall to play context */ for(i = 0; i < AGS_CHANNEL_TEST_DISPOSE_PLAY_COUNT; i++){ /* instantiate play */ recall = ags_recall_new(); /* add play to audio */ ags_audio_add_recall(audio, recall, TRUE); } /* add recall to recall context */ for(i = 0; i < AGS_CHANNEL_TEST_DISPOSE_RECALL_COUNT; i++){ /* instantiate recall */ recall = ags_recall_new(); /* add recall to audio */ ags_audio_add_recall(audio, recall, FALSE); } /* run dispose and assert */ g_object_run_dispose(channel); g_object_run_dispose(channel->playback); channel->playback = NULL; CU_ASSERT(channel->audio == NULL); CU_ASSERT(channel->soundcard == NULL); CU_ASSERT(channel->recall_id == NULL); CU_ASSERT(channel->container == NULL); CU_ASSERT(channel->recall == NULL); CU_ASSERT(channel->play == NULL); CU_ASSERT(channel->first_recycling == NULL); CU_ASSERT(channel->last_recycling == NULL); CU_ASSERT(channel->pattern == NULL); } void ags_channel_test_finalize() { AgsChannel *channel; AgsRecall *recall; guint i; channel = ags_output_new(audio); channel->first_recycling = channel->last_recycling = ags_recycling_new(NULL); g_object_ref(channel->first_recycling); /* add recall to play context */ for(i = 0; i < AGS_CHANNEL_TEST_FINALIZE_PLAY_COUNT; i++){ /* instantiate play */ recall = ags_recall_channel_new(); g_object_set(recall, "source\0", channel, NULL); /* add play to channel */ ags_channel_add_recall(channel, recall, TRUE); } /* add recall to recall context */ for(i = 0; i < AGS_CHANNEL_TEST_FINALIZE_RECALL_COUNT; i++){ /* instantiate recall */ recall = ags_recall_channel_new(); g_object_set(recall, "source\0", channel, NULL); /* add recall to channel */ ags_channel_add_recall(channel, recall, FALSE); } /* run dispose */ g_object_run_dispose(channel); g_object_run_dispose(channel->playback); channel->playback = NULL; /* stub */ channel_test_finalized = FALSE; G_OBJECT_GET_CLASS(channel)->finalize = ags_channel_test_finalize_stub; /* unref and assert */ g_object_unref(channel); CU_ASSERT(channel_test_finalized == TRUE); } void ags_channel_test_add_recall() { AgsChannel *channel; AgsRecall *recall0, *recall1; /* instantiate channel */ channel = ags_channel_new(NULL); /* instantiate recall */ recall0 = ags_recall_new(); /* add recall to channel */ ags_channel_add_recall(channel, recall0, TRUE); /* assert to be in channel->play */ CU_ASSERT(g_list_find(channel->play, recall0) != NULL); /* instantiate recall */ recall1 = ags_recall_new(); /* add recall to channel */ ags_channel_add_recall(channel, recall1, TRUE); /* assert to be in channel->recall */ CU_ASSERT(g_list_find(channel->play, recall0) != NULL); CU_ASSERT(g_list_find(channel->play, recall1) != NULL); /* instantiate recall */ recall0 = ags_recall_new(); /* add recall to channel */ ags_channel_add_recall(channel, recall0, FALSE); /* assert to be in channel->play */ CU_ASSERT(g_list_find(channel->recall, recall0) != NULL); /* instantiate recall */ recall1 = ags_recall_new(); /* add recall to channel */ ags_channel_add_recall(channel, recall1, FALSE); /* assert to be in channel->recall */ CU_ASSERT(g_list_find(channel->recall, recall0) != NULL); CU_ASSERT(g_list_find(channel->recall, recall1) != NULL); } void ags_channel_test_add_recall_container() { AgsChannel *channel; AgsRecallContainer *recall_container0, *recall_container1; /* instantiate channel */ channel = ags_channel_new(NULL); /* instantiate recall */ recall_container0 = ags_recall_container_new(NULL); ags_channel_add_recall_container(channel, recall_container0); /* assert to be in channel->recall_container */ CU_ASSERT(g_list_find(channel->container, recall_container0) != NULL); /* instantiate recall */ recall_container1 = ags_recall_container_new(NULL); ags_channel_add_recall_container(channel, recall_container1); /* assert to be in channel->recall_container */ CU_ASSERT(g_list_find(channel->container, recall_container0) != NULL); CU_ASSERT(g_list_find(channel->container, recall_container1) != NULL); } void ags_channel_test_add_recall_id() { AgsChannel *channel; AgsRecallID *recall_id0, *recall_id1; /* instantiate channel */ channel = ags_channel_new(NULL); /* instantiate recall */ recall_id0 = ags_recall_id_new(NULL); ags_channel_add_recall_id(channel, recall_id0); /* assert to be in channel->recall_id */ CU_ASSERT(g_list_find(channel->recall_id, recall_id0) != NULL); /* instantiate recall */ recall_id1 = ags_recall_id_new(NULL); ags_channel_add_recall_id(channel, recall_id1); /* assert to be in channel->recall_id */ CU_ASSERT(g_list_find(channel->recall_id, recall_id0) != NULL); CU_ASSERT(g_list_find(channel->recall_id, recall_id1) != NULL); } void ags_channel_test_duplicate_recall() { AgsChannel *channel; AgsRecall *recall; AgsRecall *recall_channel_run; AgsRecyclingContext *parent_recycling_context, *recycling_context; AgsRecallID *recall_id; /* instantiate channel */ channel = ags_channel_new(NULL); /* case 1: playback recall */ recall = ags_recall_new(); recall->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, recall, TRUE); recall_channel_run = ags_recall_channel_run_new(); recall_channel_run->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, recall_channel_run, TRUE); /* assert inital count */ CU_ASSERT(g_list_length(channel->play) == 2); CU_ASSERT(g_list_length(channel->recall) == 0); /* instantiate recycling context and recall id */ recycling_context = ags_recycling_context_new(0); recall_id = ags_recall_id_new(NULL); g_object_set(recall_id, "recycling-context\0", recycling_context, NULL); /* duplicate recall */ ags_channel_duplicate_recall(channel, recall_id); CU_ASSERT(g_list_length(channel->play) == 4); CU_ASSERT(g_list_length(channel->recall) == 0); /* case 2: true recall */ recall = ags_recall_new(); recall->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, recall, FALSE); recall_channel_run = ags_recall_channel_run_new(); recall_channel_run->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, recall_channel_run, FALSE); /* assert inital count */ CU_ASSERT(g_list_length(channel->play) == 4); CU_ASSERT(g_list_length(channel->recall) == 2); /* instantiate recycling context and recall id */ parent_recycling_context = ags_recycling_context_new(0); recycling_context = ags_recycling_context_new(0); g_object_set(recycling_context, "parent\0", parent_recycling_context, NULL); recall_id = ags_recall_id_new(NULL); g_object_set(recall_id, "recycling-context\0", recycling_context, NULL); /* duplicate recall */ ags_channel_duplicate_recall(channel, recall_id); CU_ASSERT(g_list_length(channel->play) == 4); CU_ASSERT(g_list_length(channel->recall) == 4); } void ags_channel_test_init_recall() { AgsChannel *channel; AgsRecall *recall; AgsRecall *recall_channel_run; AgsRecyclingContext *recycling_context; AgsRecallID *recall_id; GList *list; /* instantiate channel */ channel = ags_channel_new(NULL); /* instantiate recalls */ recall = ags_recall_new(); recall->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, recall, TRUE); recall_channel_run = ags_recall_channel_run_new(); recall_channel_run->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, recall_channel_run, TRUE); /* instantiate recycling context and recall id */ recycling_context = ags_recycling_context_new(0); recall_id = ags_recall_id_new(NULL); g_object_set(recall_id, "recycling-context\0", recycling_context, NULL); ags_channel_add_recall_id(channel, recall_id); /* init recall */ test_init_recall_callback_hits_count = 0; ags_channel_duplicate_recall(channel, recall_id); ags_channel_resolve_recall(channel, recall_id); list = channel->play; while(list != NULL){ g_signal_connect(G_OBJECT(list->data), "run-init-pre\0", G_CALLBACK(ags_channel_test_run_init_pre_recall_callback), NULL); list = list->next; } ags_channel_init_recall(channel, 0, recall_id); CU_ASSERT(test_init_recall_callback_hits_count == 2); } void ags_channel_test_resolve_recall() { AgsChannel *channel; AgsRecall *master_recall_channel_run; AgsRecall *slave_recall_channel_run; AgsRecyclingContext *recycling_context; AgsRecallID *recall_id; /* instantiate channel */ channel = ags_channel_new(NULL); /* instantiate recalls */ slave_recall_channel_run = ags_recall_channel_run_new(); slave_recall_channel_run->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, slave_recall_channel_run, TRUE); g_signal_connect(G_OBJECT(slave_recall_channel_run), "resolve-dependencies\0", G_CALLBACK(ags_channel_test_resolve_recall_callback), NULL); /* instantiate recycling context and recall id */ recycling_context = ags_recycling_context_new(0); recall_id = ags_recall_id_new(NULL); g_object_set(recall_id, "recycling-context\0", recycling_context, NULL); /* setup recalls */ g_object_set(slave_recall_channel_run, "recall-id\0", recall_id, NULL); /* resolve recall */ test_resolve_recall_callback_hits_count = 0; ags_channel_resolve_recall(channel, recall_id); CU_ASSERT(test_resolve_recall_callback_hits_count == 1); } void ags_channel_test_finalize_stub(GObject *gobject) { channel_test_finalized = TRUE; } void ags_channel_test_run_init_pre_recall_callback(AgsRecall *recall, gpointer data) { test_init_recall_callback_hits_count++; } void ags_channel_test_resolve_recall_callback(AgsRecall *recall, gpointer data) { test_resolve_recall_callback_hits_count++; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsChannelTest\0", ags_channel_test_init_suite, ags_channel_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsChannel dispose\0", ags_channel_test_dispose) == NULL) || (CU_add_test(pSuite, "test of AgsChannel finalize\0", ags_channel_test_finalize) == NULL) || (CU_add_test(pSuite, "test of AgsChannel add recall\0", ags_channel_test_add_recall) == NULL) || (CU_add_test(pSuite, "test of AgsChannel add recall container\0", ags_channel_test_add_recall_container) == NULL) || (CU_add_test(pSuite, "test of AgsChannel add recall id\0", ags_channel_test_add_recall_id) == NULL) || (CU_add_test(pSuite, "test of AgsChannel add duplicate recall\0", ags_channel_test_duplicate_recall) == NULL) || (CU_add_test(pSuite, "test of AgsChannel add resolve recall\0", ags_channel_test_resolve_recall) == NULL) || (CU_add_test(pSuite, "test of AgsChannel add init recall\0", ags_channel_test_init_recall) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_port_test.c0000644000175000017500000001161613246707333016554 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #include #include #include #include #include #include #include int ags_port_test_init_suite(); int ags_port_test_clean_suite(); void ags_port_test_safe_read(); void ags_port_test_safe_write(); void ags_port_test_safe_write_raw(); void ags_port_test_safe_get_property(); void ags_port_test_safe_set_property(); /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_port_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_port_test_clean_suite() { return(0); } void ags_port_test_safe_read() { AgsPort *port; GValue *value; /* * check boolean */ port = ags_port_new(); port->port_value_is_pointer = FALSE; port->port_value_type = G_TYPE_BOOLEAN; port->port_value_size = sizeof(gboolean); port->port_value_length = 1; /* assert false */ port->port_value.ags_port_boolean = FALSE; value = g_new0(GValue, 1); g_value_init(value, G_TYPE_BOOLEAN); ags_port_safe_read(port, value); CU_ASSERT(g_value_get_boolean(value) == FALSE); /* assert true */ port->port_value.ags_port_boolean = TRUE; g_value_reset(value); ags_port_safe_read(port, value); CU_ASSERT(g_value_get_boolean(value) == TRUE); /* * check unsigned int 64 */ port = ags_port_new(); port->port_value_is_pointer = FALSE; port->port_value_type = G_TYPE_UINT64; port->port_value_size = sizeof(guint64); port->port_value_length = 1; /* assert 0 */ port->port_value.ags_port_uint = 0; value = g_new0(GValue, 1); g_value_init(value, G_TYPE_UINT64); ags_port_safe_read(port, value); CU_ASSERT(g_value_get_uint64(value) == 0); /* assert max unsigned int 64 */ port->port_value.ags_port_uint = G_MAXUINT64; g_value_reset(value); ags_port_safe_read(port, value); CU_ASSERT(g_value_get_uint64(value) == G_MAXUINT64); /* * check double */ port = ags_port_new(); port->port_value_is_pointer = FALSE; port->port_value_type = G_TYPE_DOUBLE; port->port_value_size = sizeof(gdouble); port->port_value_length = 1; /* assert 0.0 */ port->port_value.ags_port_double = 0.0; value = g_new0(GValue, 1); g_value_init(value, G_TYPE_DOUBLE); ags_port_safe_read(port, value); CU_ASSERT(g_value_get_double(value) == 0.0); /* assert 1.0 */ port->port_value.ags_port_double = 1.0; g_value_reset(value); ags_port_safe_read(port, value); CU_ASSERT(g_value_get_double(value) == 1.0); } void ags_port_test_safe_write() { //TODO:JK: implement me } void ags_port_test_safe_write_raw() { //TODO:JK: implement me } void ags_port_test_safe_get_property() { //TODO:JK: implement me } void ags_port_test_safe_set_property() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsPortTest", ags_port_test_init_suite, ags_port_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsPort safe read", ags_port_test_safe_read) == NULL) || (CU_add_test(pSuite, "test of AgsPort safe write", ags_port_test_safe_write) == NULL) || (CU_add_test(pSuite, "test of AgsPort safe write raw", ags_port_test_safe_write_raw) == NULL) || (CU_add_test(pSuite, "test of AgsPort safe get property", ags_port_test_safe_get_property) == NULL) || (CU_add_test(pSuite, "test of AgsPort safe set property", ags_port_test_safe_set_property) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_audio_application_context_test.c0000644000175000017500000001365713246707333023027 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #define AGS_AUDIO_APPLICATION_CONTEXT_TEST_DISPOSE_DEVOUT_COUNT (8) int ags_audio_application_context_test_init_suite(); int ags_audio_application_context_test_clean_suite(); void ags_audio_application_context_test_dispose(); void ags_audio_application_context_test_finalize(); void ags_audio_application_context_test_finalize_stub(GObject *gobject); #define AGS_AUDIO_APPLICATION_CONTEXT_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[soundcard-0]\n" \ "backend=alsa\n" \ "device=hw:0,0\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[soundcard-1]\n" \ "backend=alsa\n" \ "device=hw:0,0\n" \ "samplerate=44100\n" \ "buffer-size=1024\n" \ "pcm-channels=2\n" \ "dsp-channels=2\n" \ "format=16\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" gboolean audio_application_context_test_finalized; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_audio_application_context_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_audio_application_context_test_clean_suite() { return(0); } void ags_audio_application_context_test_dispose() { AgsAudioApplicationContext *audio_application_context; AgsConfig *config; config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_AUDIO_APPLICATION_CONTEXT_TEST_CONFIG, strlen(AGS_AUDIO_APPLICATION_CONTEXT_TEST_CONFIG)); audio_application_context = g_object_new(AGS_TYPE_AUDIO_APPLICATION_CONTEXT, NULL); /* run dispose */ g_object_run_dispose(audio_application_context); /* assert */ CU_ASSERT(audio_application_context->thread_pool == NULL); CU_ASSERT(audio_application_context->soundcard_thread == NULL); CU_ASSERT(audio_application_context->export_thread == NULL); CU_ASSERT(audio_application_context->autosave_thread == NULL); CU_ASSERT(audio_application_context->server == NULL); CU_ASSERT(audio_application_context->soundcard == NULL); CU_ASSERT(audio_application_context->sequencer == NULL); CU_ASSERT(audio_application_context->distributed_manager == NULL); } void ags_audio_application_context_test_finalize() { AgsAudioApplicationContext *audio_application_context; AgsConfig *config; config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_AUDIO_APPLICATION_CONTEXT_TEST_CONFIG, strlen(AGS_AUDIO_APPLICATION_CONTEXT_TEST_CONFIG)); audio_application_context = g_object_new(AGS_TYPE_AUDIO_APPLICATION_CONTEXT, NULL); /* run dispose */ g_object_run_dispose(audio_application_context); /* stub finalize */ audio_application_context_test_finalized = FALSE; G_OBJECT_GET_CLASS(audio_application_context)->finalize = ags_audio_application_context_test_finalize_stub; /* unref and assert */ g_object_unref(audio_application_context); CU_ASSERT(audio_application_context_test_finalized == TRUE); } void ags_audio_application_context_test_finalize_stub(GObject *gobject) { audio_application_context_test_finalized = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsAudioApplicationContextTest\0", ags_audio_application_context_test_init_suite, ags_audio_application_context_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } g_log_set_fatal_mask("GLib-GObject\0", // "Gtk\0" G_LOG_DOMAIN, // G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING); /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsAudioApplicationContext doing dispose\0", ags_audio_application_context_test_dispose) == NULL) || (CU_add_test(pSuite, "test of AgsAudioApplicationContext doing finalize\0", ags_audio_application_context_test_finalize) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_playback_test.c0000644000175000017500000002723513246707333017362 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include int ags_playback_test_init_suite(); int ags_playback_test_clean_suite(); void ags_playback_test_set_channel_thread(); void ags_playback_test_get_channel_thread(); void ags_playback_test_set_iterator_thread(); void ags_playback_test_get_iterator_thread(); void ags_playback_test_set_recycling_thread(); void ags_playback_test_get_recycling_thread(); void ags_playback_test_set_recall_id(); void ags_playback_test_get_recall_id(); void ags_playback_test_find_source(); #define AGS_PLAYBACK_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=recycling\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_playback_test_init_suite() { AgsConfig *config; config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_PLAYBACK_TEST_CONFIG, strlen(AGS_PLAYBACK_TEST_CONFIG)); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_playback_test_clean_suite() { return(0); } void ags_playback_test_set_channel_thread() { AgsPlayback *playback; playback = g_object_new(AGS_TYPE_PLAYBACK, NULL); /* set playback to NULL and assert */ ags_playback_set_channel_thread(playback, NULL, AGS_PLAYBACK_SCOPE_PLAYBACK); CU_ASSERT(playback->channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK] == NULL); /* set sequencer to NULL and assert */ ags_playback_set_channel_thread(playback, NULL, AGS_PLAYBACK_SCOPE_SEQUENCER); CU_ASSERT(playback->channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER] == NULL); /* set notation to NULL and assert */ ags_playback_set_channel_thread(playback, NULL, AGS_PLAYBACK_SCOPE_NOTATION); CU_ASSERT(playback->channel_thread[AGS_PLAYBACK_SCOPE_NOTATION] == NULL); } void ags_playback_test_get_channel_thread() { AgsPlayback *playback; AgsThread *thread; playback = g_object_new(AGS_TYPE_PLAYBACK, NULL); /* get playback to NULL and assert */ thread = ags_playback_get_channel_thread(playback, AGS_PLAYBACK_SCOPE_PLAYBACK); CU_ASSERT(playback->channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK] == thread); /* get sequencer to NULL and assert */ thread = ags_playback_get_channel_thread(playback, AGS_PLAYBACK_SCOPE_SEQUENCER); CU_ASSERT(playback->channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER] == thread); /* get notation to NULL and assert */ thread = ags_playback_get_channel_thread(playback, AGS_PLAYBACK_SCOPE_NOTATION); CU_ASSERT(playback->channel_thread[AGS_PLAYBACK_SCOPE_NOTATION] == thread); } void ags_playback_test_set_iterator_thread() { AgsPlayback *playback; playback = g_object_new(AGS_TYPE_PLAYBACK, NULL); /* set playback to NULL and assert */ ags_playback_set_iterator_thread(playback, NULL, AGS_PLAYBACK_SCOPE_PLAYBACK); CU_ASSERT(playback->iterator_thread[AGS_PLAYBACK_SCOPE_PLAYBACK] == NULL); /* set sequencer to NULL and assert */ ags_playback_set_iterator_thread(playback, NULL, AGS_PLAYBACK_SCOPE_SEQUENCER); CU_ASSERT(playback->iterator_thread[AGS_PLAYBACK_SCOPE_SEQUENCER] == NULL); /* set notation to NULL and assert */ ags_playback_set_iterator_thread(playback, NULL, AGS_PLAYBACK_SCOPE_NOTATION); CU_ASSERT(playback->iterator_thread[AGS_PLAYBACK_SCOPE_NOTATION] == NULL); } void ags_playback_test_get_iterator_thread() { AgsPlayback *playback; AgsThread *thread; playback = g_object_new(AGS_TYPE_PLAYBACK, NULL); /* get playback to NULL and assert */ thread = ags_playback_get_iterator_thread(playback, AGS_PLAYBACK_SCOPE_PLAYBACK); CU_ASSERT(playback->iterator_thread[AGS_PLAYBACK_SCOPE_PLAYBACK] == thread); /* get sequencer to NULL and assert */ thread = ags_playback_get_iterator_thread(playback, AGS_PLAYBACK_SCOPE_SEQUENCER); CU_ASSERT(playback->iterator_thread[AGS_PLAYBACK_SCOPE_SEQUENCER] == thread); /* get notation to NULL and assert */ thread = ags_playback_get_iterator_thread(playback, AGS_PLAYBACK_SCOPE_NOTATION); CU_ASSERT(playback->iterator_thread[AGS_PLAYBACK_SCOPE_NOTATION] == thread); } void ags_playback_test_set_recycling_thread() { AgsPlayback *playback; playback = g_object_new(AGS_TYPE_PLAYBACK, NULL); /* set playback to NULL and assert */ ags_playback_set_recycling_thread(playback, NULL, AGS_PLAYBACK_SCOPE_PLAYBACK); CU_ASSERT(playback->recycling_thread[AGS_PLAYBACK_SCOPE_PLAYBACK] == NULL); /* set sequencer to NULL and assert */ ags_playback_set_recycling_thread(playback, NULL, AGS_PLAYBACK_SCOPE_SEQUENCER); CU_ASSERT(playback->recycling_thread[AGS_PLAYBACK_SCOPE_SEQUENCER] == NULL); /* set notation to NULL and assert */ ags_playback_set_recycling_thread(playback, NULL, AGS_PLAYBACK_SCOPE_NOTATION); CU_ASSERT(playback->recycling_thread[AGS_PLAYBACK_SCOPE_NOTATION] == NULL); } void ags_playback_test_get_recycling_thread() { AgsPlayback *playback; AgsThread *thread; playback = g_object_new(AGS_TYPE_PLAYBACK, NULL); /* get playback to NULL and assert */ thread = ags_playback_get_recycling_thread(playback, AGS_PLAYBACK_SCOPE_PLAYBACK); CU_ASSERT(playback->recycling_thread[AGS_PLAYBACK_SCOPE_PLAYBACK] == thread); /* get sequencer to NULL and assert */ thread = ags_playback_get_recycling_thread(playback, AGS_PLAYBACK_SCOPE_SEQUENCER); CU_ASSERT(playback->recycling_thread[AGS_PLAYBACK_SCOPE_SEQUENCER] == thread); /* get notation to NULL and assert */ thread = ags_playback_get_recycling_thread(playback, AGS_PLAYBACK_SCOPE_NOTATION); CU_ASSERT(playback->recycling_thread[AGS_PLAYBACK_SCOPE_NOTATION] == thread); } void ags_playback_test_set_recall_id() { AgsPlayback *playback; AgsRecallID *recall_id[3]; playback = g_object_new(AGS_TYPE_PLAYBACK, NULL); recall_id[0] = g_object_new(AGS_TYPE_RECALL_ID, NULL); recall_id[1] = g_object_new(AGS_TYPE_RECALL_ID, NULL); recall_id[2] = g_object_new(AGS_TYPE_RECALL_ID, NULL); /* set playback to NULL and assert */ ags_playback_set_recall_id(playback, recall_id[0], AGS_PLAYBACK_SCOPE_PLAYBACK); CU_ASSERT(playback->recall_id[AGS_PLAYBACK_SCOPE_PLAYBACK] == recall_id[0]); /* set sequencer to NULL and assert */ ags_playback_set_recall_id(playback, recall_id[1], AGS_PLAYBACK_SCOPE_SEQUENCER); CU_ASSERT(playback->recall_id[AGS_PLAYBACK_SCOPE_SEQUENCER] == recall_id[1]); /* set notation to NULL and assert */ ags_playback_set_recall_id(playback, recall_id[2], AGS_PLAYBACK_SCOPE_NOTATION); CU_ASSERT(playback->recall_id[AGS_PLAYBACK_SCOPE_NOTATION] == recall_id[2]); } void ags_playback_test_get_recall_id() { AgsPlayback *playback; AgsRecallID *recall_id[3]; playback = g_object_new(AGS_TYPE_PLAYBACK, NULL); recall_id[0] = g_object_new(AGS_TYPE_RECALL_ID, NULL); ags_playback_set_recall_id(playback, recall_id[0], AGS_PLAYBACK_SCOPE_PLAYBACK); recall_id[1] = g_object_new(AGS_TYPE_RECALL_ID, NULL); ags_playback_set_recall_id(playback, recall_id[1], AGS_PLAYBACK_SCOPE_SEQUENCER); recall_id[2] = g_object_new(AGS_TYPE_RECALL_ID, NULL); ags_playback_set_recall_id(playback, recall_id[2], AGS_PLAYBACK_SCOPE_NOTATION); /* assert get recall id */ CU_ASSERT(ags_playback_get_recall_id(playback, AGS_PLAYBACK_SCOPE_PLAYBACK) == recall_id[0]); CU_ASSERT(ags_playback_get_recall_id(playback, AGS_PLAYBACK_SCOPE_SEQUENCER) == recall_id[1]); CU_ASSERT(ags_playback_get_recall_id(playback, AGS_PLAYBACK_SCOPE_NOTATION) == recall_id[2]); } void ags_playback_test_find_source() { AgsChannel *channel[3]; AgsPlayback *playback[3]; GList *list; list = NULL; /* playback #0 */ channel[0] = g_object_new(AGS_TYPE_INPUT, NULL); playback[0] = g_object_new(AGS_TYPE_PLAYBACK, "source", channel[0], NULL); list = g_list_prepend(list, playback[0]); /* playback #1 */ channel[1] = g_object_new(AGS_TYPE_INPUT, NULL); playback[1] = g_object_new(AGS_TYPE_PLAYBACK, "source", channel[1], NULL); list = g_list_prepend(list, playback[1]); /* playback #2 */ channel[2] = g_object_new(AGS_TYPE_INPUT, NULL); playback[2] = g_object_new(AGS_TYPE_PLAYBACK, "source", channel[2], NULL); list = g_list_prepend(list, playback[2]); /* assert */ CU_ASSERT(ags_playback_find_source(list, channel[0]) == playback[0]); CU_ASSERT(ags_playback_find_source(list, channel[1]) == playback[1]); CU_ASSERT(ags_playback_find_source(list, channel[2]) == playback[2]); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsPlaybackTest", ags_playback_test_init_suite, ags_playback_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsPlayback set channel thread", ags_playback_test_set_channel_thread) == NULL) || (CU_add_test(pSuite, "test of AgsPlayback get channel thread", ags_playback_test_get_channel_thread) == NULL) || (CU_add_test(pSuite, "test of AgsPlayback set iterator thread", ags_playback_test_set_iterator_thread) == NULL) || (CU_add_test(pSuite, "test of AgsPlayback set iterator thread", ags_playback_test_get_iterator_thread) == NULL) || (CU_add_test(pSuite, "test of AgsPlayback set recycling thread", ags_playback_test_set_recycling_thread) == NULL) || (CU_add_test(pSuite, "test of AgsPlayback get recycling thread", ags_playback_test_get_recycling_thread) == NULL) || (CU_add_test(pSuite, "test of AgsPlayback set recall id", ags_playback_test_set_recall_id) == NULL) || (CU_add_test(pSuite, "test of AgsPlayback get recall id", ags_playback_test_get_recall_id) == NULL) || (CU_add_test(pSuite, "test of AgsPlayback get find source", ags_playback_test_find_source) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_pattern_test.c0000644000175000017500000002036213246707333017243 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include int ags_pattern_test_init_suite(); int ags_pattern_test_clean_suite(); void ags_pattern_test_find_near_timestamp(); void ags_pattern_test_set_dim(); void ags_pattern_test_get_bit(); void ags_pattern_test_toggle_bit(); #define AGS_PATTERN_TEST_FIND_NEAR_TIMESTAMP_N_PATTERN (8) #define AGS_PATTERN_TEST_SET_DIM_BANK_0 (16) #define AGS_PATTERN_TEST_SET_DIM_BANK_1 (4) #define AGS_PATTERN_TEST_SET_DIM_BIT (64) #define AGS_PATTERN_TEST_GET_BIT_BANK_0 (16) #define AGS_PATTERN_TEST_GET_BIT_BANK_1 (4) #define AGS_PATTERN_TEST_GET_BIT_BIT (256) #define AGS_PATTERN_TEST_TOGGLE_BIT_BANK_0 (16) #define AGS_PATTERN_TEST_TOGGLE_BIT_BANK_1 (4) #define AGS_PATTERN_TEST_TOGGLE_BIT_BIT (256) /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_pattern_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_pattern_test_clean_suite() { return(0); } void ags_pattern_test_find_near_timestamp() { AgsPattern **pattern; AgsTimestamp *timestamp; GList *list, *current; guint i; pattern = (AgsPattern **) malloc(AGS_PATTERN_TEST_FIND_NEAR_TIMESTAMP_N_PATTERN * sizeof(AgsPattern *)); list = NULL; for(i = 0; i < AGS_PATTERN_TEST_FIND_NEAR_TIMESTAMP_N_PATTERN; i++){ /* nth pattern */ pattern[i] = ags_pattern_new(); timestamp = ags_timestamp_new(); g_object_set(pattern[i], "timestamp\0", timestamp, NULL); timestamp->timer.unix_time.time_val = AGS_TIMESTAMP(pattern[0]->timestamp)->timer.unix_time.time_val + ((i + 1) * AGS_PATTERN_DEFAULT_DURATION); list = g_list_prepend(list, pattern[i]); } /* instantiate timestamp to check against */ timestamp = ags_timestamp_new(); timestamp->timer.unix_time.time_val = AGS_TIMESTAMP(pattern[0]->timestamp)->timer.unix_time.time_val; /* assert find */ for(i = 0; i + 1 < AGS_PATTERN_TEST_FIND_NEAR_TIMESTAMP_N_PATTERN; i++){ timestamp->timer.unix_time.time_val = AGS_TIMESTAMP(pattern[0]->timestamp)->timer.unix_time.time_val + ((i + 1) * AGS_PATTERN_DEFAULT_DURATION + 1); current = ags_pattern_find_near_timestamp(list, timestamp); CU_ASSERT(current != NULL && current->data == pattern[i + 1]); } } void ags_pattern_test_set_dim() { AgsPattern *pattern; guint i, j; gboolean success; pattern = ags_pattern_new(); ags_pattern_set_dim(pattern, AGS_PATTERN_TEST_SET_DIM_BANK_0, AGS_PATTERN_TEST_SET_DIM_BANK_1, AGS_PATTERN_TEST_SET_DIM_BIT); /* assert dim */ CU_ASSERT(pattern->dim[0] == AGS_PATTERN_TEST_SET_DIM_BANK_0); CU_ASSERT(pattern->dim[1] == AGS_PATTERN_TEST_SET_DIM_BANK_1); CU_ASSERT(pattern->dim[2] == AGS_PATTERN_TEST_SET_DIM_BIT); /* assert pattern */ if(pattern->pattern != NULL){ success = TRUE; }else{ success = FALSE; } for(i = 0; i < AGS_PATTERN_TEST_SET_DIM_BANK_0 && success; i++){ if(pattern->pattern[i] == NULL){ success = FALSE; break; } for(j = 0; j < AGS_PATTERN_TEST_SET_DIM_BANK_1; j++){ if(pattern->pattern[i][j] == NULL){ success = FALSE; break; } } } CU_ASSERT(success == TRUE); } void ags_pattern_test_get_bit() { AgsPattern *pattern; guint ***bitmap; guint i, j, k; gboolean success; /* instantiate pattern */ pattern = ags_pattern_new(); ags_pattern_set_dim(pattern, AGS_PATTERN_TEST_GET_BIT_BANK_0, AGS_PATTERN_TEST_GET_BIT_BANK_1, AGS_PATTERN_TEST_GET_BIT_BIT); /* create and fill bitmap to check against */ bitmap = (guint ***) malloc(AGS_PATTERN_TEST_GET_BIT_BANK_0 * sizeof(guint **)); for(i = 0; i < AGS_PATTERN_TEST_GET_BIT_BANK_0; i++){ bitmap[i] = (guint **) malloc(AGS_PATTERN_TEST_GET_BIT_BANK_1 * sizeof(guint *)); for(j = 0; j < AGS_PATTERN_TEST_GET_BIT_BANK_1; j++){ bitmap[i][j] = (guint *) malloc((int) ceil((double) AGS_PATTERN_TEST_GET_BIT_BIT / (double) (sizeof(guint) * 8)) * sizeof(guint)); memset(bitmap[i][j], 0, (int) ceil((double) AGS_PATTERN_TEST_GET_BIT_BIT / (double) (sizeof(guint) * 8)) * sizeof(guint)); for(k = 0; k < AGS_PATTERN_TEST_GET_BIT_BIT; k++){ if(rand() % 2 == 1){ bitmap[i][j][(guint) floor((double) k / (double) (sizeof(guint) * 8))] |= (1 << (k % (sizeof(guint) * 8))); } } for(k = 0; k < (int) ceil((double) AGS_PATTERN_TEST_GET_BIT_BIT / (double) (sizeof(guint) * 8)); k++){ pattern->pattern[i][j][k] = bitmap[i][j][k]; } } } /* assert values to be present */ for(i = 0; i < AGS_PATTERN_TEST_GET_BIT_BANK_0 && success; i++){ for(j = 0; j < AGS_PATTERN_TEST_GET_BIT_BANK_1 && success; j++){ for(k = 0; k < AGS_PATTERN_TEST_GET_BIT_BIT; k++){ if(((1 << (k % (sizeof(guint) * 8))) & bitmap[i][j][(guint) floor((double) k / (double) (sizeof(guint) * 8))]) != 0){ success = (ags_pattern_get_bit(pattern, i, j, k) == TRUE); }else{ success = (ags_pattern_get_bit(pattern, i, j, k) == FALSE); } if(!success){ break; } } } } CU_ASSERT(success = TRUE); } void ags_pattern_test_toggle_bit() { AgsPattern *pattern; guint i, j, k; gboolean success; /* instantiate pattern */ pattern = ags_pattern_new(); ags_pattern_set_dim(pattern, AGS_PATTERN_TEST_GET_BIT_BANK_0, AGS_PATTERN_TEST_GET_BIT_BANK_1, AGS_PATTERN_TEST_TOGGLE_BIT_BIT); /* assert values to be present */ for(i = 0; i < AGS_PATTERN_TEST_TOGGLE_BIT_BANK_0; i++){ for(j = 0; j < AGS_PATTERN_TEST_TOGGLE_BIT_BANK_1; j++){ for(k = 0; k < AGS_PATTERN_TEST_GET_BIT_BIT; k++){ if(rand() % 2 == 1){ ags_pattern_toggle_bit(pattern, i, j, k); success = (ags_pattern_get_bit(pattern, i, j, k) == TRUE); }else{ ags_pattern_toggle_bit(pattern, i, j, k); ags_pattern_toggle_bit(pattern, i, j, k); success = (ags_pattern_get_bit(pattern, i, j, k) == FALSE); } } } } CU_ASSERT(success = TRUE); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsPatternTest\0", ags_pattern_test_init_suite, ags_pattern_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsPattern find near timestamp\0", ags_pattern_test_find_near_timestamp) == NULL) || (CU_add_test(pSuite, "test of AgsPattern set dim\0", ags_pattern_test_set_dim) == NULL) || (CU_add_test(pSuite, "test of AgsPattern get bit\0", ags_pattern_test_get_bit) == NULL) || (CU_add_test(pSuite, "test of AgsPattern toggle bit\0", ags_pattern_test_toggle_bit) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_note_test.c0000644000175000017500000001177113246707333016537 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include int ags_note_test_init_suite(); int ags_note_test_clean_suite(); void ags_note_test_find_prev(); void ags_note_test_find_next(); void ags_note_test_to_raw_midi(); void ags_note_test_to_seq_event(); void ags_note_test_from_raw_midi(); void ags_note_test_from_seq_event(); void ags_note_test_duplicate(); #define AGS_NOTE_TEST_FIND_PREV_COUNT (128) #define AGS_NOTE_TEST_FIND_NEXT_COUNT (128) /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_note_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_note_test_clean_suite() { return(0); } void ags_note_test_find_prev() { AgsNote *note[AGS_NOTE_TEST_FIND_PREV_COUNT]; GList *list, *current; guint x0, y; guint i; gboolean success; /* create some notes */ list = NULL; for(i = 0; i < AGS_NOTE_TEST_FIND_PREV_COUNT; i++){ x0 = rand() % 256; y = rand() % 8; note[i] = g_object_new(AGS_TYPE_NOTE, "x0", x0, "x1", x0 + 1, "y", y, NULL); list = g_list_prepend(list, note[i]); } list = g_list_sort(list, ags_note_sort_func); /* assert find prev */ success = TRUE; for(i = 0; list != NULL; i += 16){ x0 = i; y = rand() % 8; current = ags_note_find_prev(list, x0, y); if(current != NULL && (AGS_NOTE(current->data)->x[0] > x0 || AGS_NOTE(current->data)->y != y)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_note_test_find_next() { AgsNote *note[AGS_NOTE_TEST_FIND_NEXT_COUNT]; GList *list, *current; guint x0, y; guint i; gboolean success; /* create some notes */ list = NULL; for(i = 0; i < AGS_NOTE_TEST_FIND_NEXT_COUNT; i++){ x0 = rand() % 256; y = rand() % 8; note[i] = g_object_new(AGS_TYPE_NOTE, "x0", x0, "x1", x0 + 1, "y", y, NULL); list = g_list_prepend(list, note[i]); } list = g_list_sort(list, ags_note_sort_func); /* assert find next */ success = TRUE; for(i = 0; list != NULL; i += 16){ x0 = i; y = rand() % 8; current = ags_note_find_next(list, x0, y); if(current != NULL && (AGS_NOTE(current->data)->x[0] < x0 || AGS_NOTE(current->data)->y != y)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_note_test_to_raw_midi() { //TODO:JK: implement me } void ags_note_test_to_seq_event() { //TODO:JK: implement me } void ags_note_test_from_raw_midi() { //TODO:JK: implement me } void ags_note_test_from_seq_event() { //TODO:JK: implement me } void ags_note_test_duplicate() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsNoteTest", ags_note_test_init_suite, ags_note_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsNote find prev", ags_note_test_find_prev) == NULL) || (CU_add_test(pSuite, "test of AgsNote find next", ags_note_test_find_next) == NULL) || (CU_add_test(pSuite, "test of AgsNote to raw midi", ags_note_test_to_raw_midi) == NULL) || (CU_add_test(pSuite, "test of AgsNote to seq event", ags_note_test_to_seq_event) == NULL) || (CU_add_test(pSuite, "test of AgsNote from raw midi", ags_note_test_from_raw_midi) == NULL) || (CU_add_test(pSuite, "test of AgsNote from seq event", ags_note_test_from_seq_event) == NULL) || (CU_add_test(pSuite, "test of AgsNote duplicate", ags_note_test_duplicate) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_recall_channel_run_test.c0000644000175000017500000000643213246707333021406 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_recall_channel_run_test_init_suite(); int ags_recall_channel_run_test_clean_suite(); void ags_recall_channel_run_test_run_order_changed(); void ags_recall_channel_run_test_stub_run_order_changed(AgsRecallChannelRun *recall_channel_run, guint run_order); #define AGS_RECALL_CHANNEL_RUN_TEST_RUN_ORDER_CHANGED_NTH (0) gboolean stub_run_order_changed = FALSE; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_channel_run_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_channel_run_test_clean_suite() { return(0); } void ags_recall_channel_run_test_run_order_changed() { AgsRecallChannelRun *recall_channel_run; gpointer ptr; recall_channel_run = g_object_new(AGS_TYPE_RECALL_CHANNEL_RUN, NULL); ptr = AGS_RECALL_CHANNEL_RUN_GET_CLASS(recall_channel_run)->run_order_changed; AGS_RECALL_CHANNEL_RUN_GET_CLASS(recall_channel_run)->run_order_changed = ags_recall_channel_run_test_stub_run_order_changed; ags_recall_channel_run_run_order_changed(recall_channel_run, AGS_RECALL_CHANNEL_RUN_TEST_RUN_ORDER_CHANGED_NTH); AGS_RECALL_CHANNEL_RUN_GET_CLASS(recall_channel_run)->run_order_changed = ptr; } void ags_recall_channel_run_test_stub_run_order_changed(AgsRecallChannelRun *recall_channel_run, guint run_order) { stub_run_order_changed = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsRecallChannelRunTest", ags_recall_channel_run_test_init_suite, ags_recall_channel_run_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsRecallChannelRun run order changed", ags_recall_channel_run_test_run_order_changed) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_midiin_test.c0000644000175000017500000001354413246707333017043 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #define AGS_MIDIIN_TEST_DISPOSE_AUDIO_COUNT (8) #define AGS_MIDIIN_TEST_FINALIZE_AUDIO_COUNT (8) int ags_midiin_test_init_suite(); int ags_midiin_test_clean_suite(); void ags_midiin_test_dispose(); void ags_midiin_test_finalize(); void ags_midiin_test_finalize_stub(GObject *gobject); #define AGS_MIDIIN_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" AgsAudioApplicationContext *audio_application_context; gboolean midiin_test_finalized; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_midiin_test_init_suite() { AgsConfig *config; config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_MIDIIN_TEST_CONFIG, strlen(AGS_MIDIIN_TEST_CONFIG)); audio_application_context = ags_audio_application_context_new(); g_object_ref(audio_application_context); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_midiin_test_clean_suite() { g_object_unref(audio_application_context); return(0); } void ags_midiin_test_dispose() { AgsMidiin *midiin; AgsAudio *audio; GList *list, *list_start; guint i; gboolean success; midiin = g_object_new(AGS_TYPE_MIDIIN, "application-context", audio_application_context, NULL); g_object_ref(midiin); /* instantiate audio list */ list_start = NULL; for(i = 0; i < AGS_MIDIIN_TEST_DISPOSE_AUDIO_COUNT; i++){ audio = g_object_new(AGS_TYPE_AUDIO, NULL); g_object_ref(audio); list_start = g_list_prepend(list_start, audio); } /* add to sequencer */ list = list_start; while(list != NULL){ /* audio list of sequencer */ ags_sequencer_set_audio(AGS_SEQUENCER(midiin), g_list_prepend(ags_sequencer_get_audio(AGS_SEQUENCER(midiin)), list->data)); g_object_ref(list->data); /* sequencer property of audio */ g_object_set(list->data, "sequencer", midiin, NULL); /* iterate */ list = list->next; } /* run dispose */ g_object_run_dispose(midiin); /* assert no application context */ CU_ASSERT(ags_sequencer_get_application_context(AGS_SEQUENCER(midiin)) == NULL); /* assert no audio */ CU_ASSERT(ags_sequencer_get_audio(AGS_SEQUENCER(midiin)) == NULL); /* verify sequencer equals NULL */ list = list_start; success = TRUE; while(list != NULL){ GObject *sequencer; g_object_get(list->data, "sequencer", &sequencer, NULL); if(sequencer != NULL){ success = FALSE; break; } list = list->next; } /* assert */ CU_ASSERT(success == TRUE); } void ags_midiin_test_finalize() { AgsMidiin *midiin; AgsAudio *audio; guint i; midiin = g_object_new(AGS_TYPE_MIDIIN, "application-context", audio_application_context, NULL); /* audio list */ for(i = 0; i < AGS_MIDIIN_TEST_FINALIZE_AUDIO_COUNT; i++){ /* instantiate audio */ audio = g_object_new(AGS_TYPE_AUDIO, NULL); g_object_ref(audio); /* audio list of sequencer */ ags_sequencer_set_audio(AGS_SEQUENCER(midiin), g_list_prepend(ags_sequencer_get_audio(AGS_SEQUENCER(midiin)), audio)); g_object_ref(audio); /* sequencer property of audio */ g_object_set(audio, "sequencer", midiin, NULL); } /* run dispose */ g_object_run_dispose(midiin); /* stub finalize */ midiin_test_finalized = FALSE; G_OBJECT_GET_CLASS(midiin)->finalize = ags_midiin_test_finalize_stub; /* unref and assert */ g_object_unref(midiin); CU_ASSERT(midiin_test_finalized == TRUE); } void ags_midiin_test_finalize_stub(GObject *gobject) { midiin_test_finalized = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C"); putenv("LANG=C"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsMidiinTest", ags_midiin_test_init_suite, ags_midiin_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsMidiin doing dispose", ags_midiin_test_dispose) == NULL) || (CU_add_test(pSuite, "test of AgsMidiin doing finalize", ags_midiin_test_finalize) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_devout_test.c0000644000175000017500000001373113246707333017076 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #define AGS_DEVOUT_TEST_DISPOSE_AUDIO_COUNT (8) #define AGS_DEVOUT_TEST_FINALIZE_AUDIO_COUNT (8) int ags_devout_test_init_suite(); int ags_devout_test_clean_suite(); void ags_devout_test_dispose(); void ags_devout_test_finalize(); void ags_devout_test_finalize_stub(GObject *gobject); #define AGS_DEVOUT_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=channel\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" AgsAudioApplicationContext *audio_application_context; gboolean devout_test_finalized; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_devout_test_init_suite() { AgsConfig *config; config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_DEVOUT_TEST_CONFIG, strlen(AGS_DEVOUT_TEST_CONFIG)); audio_application_context = ags_audio_application_context_new(); g_object_ref(audio_application_context); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_devout_test_clean_suite() { g_object_unref(audio_application_context); return(0); } void ags_devout_test_dispose() { AgsDevout *devout; AgsAudio *audio; GList *list, *list_start; guint i; gboolean success; devout = g_object_new(AGS_TYPE_DEVOUT, "application-context\0", audio_application_context, NULL); g_object_ref(devout); /* instantiate audio list */ list_start = NULL; for(i = 0; i < AGS_DEVOUT_TEST_DISPOSE_AUDIO_COUNT; i++){ audio = g_object_new(AGS_TYPE_AUDIO, NULL); g_object_ref(audio); list_start = g_list_prepend(list_start, audio); } /* add to soundcard */ list = list_start; while(list != NULL){ /* audio list of soundcard */ ags_soundcard_set_audio(AGS_SOUNDCARD(devout), g_list_prepend(ags_soundcard_get_audio(AGS_SOUNDCARD(devout)), list->data)); g_object_ref(list->data); /* soundcard property of audio */ g_object_set(list->data, "soundcard\0", devout, NULL); /* iterate */ list = list->next; } /* run dispose */ g_object_run_dispose(devout); /* assert no application context */ CU_ASSERT(ags_soundcard_get_application_context(AGS_SOUNDCARD(devout)) == NULL); /* assert no audio */ CU_ASSERT(ags_soundcard_get_audio(AGS_SOUNDCARD(devout)) == NULL); /* verify soundcard equals NULL */ list = list_start; success = TRUE; while(list != NULL){ GObject *soundcard; g_object_get(list->data, "soundcard\0", &soundcard, NULL); if(soundcard != NULL){ success = FALSE; break; } list = list->next; } /* assert */ CU_ASSERT(success == TRUE); } void ags_devout_test_finalize() { AgsDevout *devout; AgsAudio *audio; guint i; devout = g_object_new(AGS_TYPE_DEVOUT, "application-context\0", audio_application_context, NULL); /* audio list */ for(i = 0; i < AGS_DEVOUT_TEST_FINALIZE_AUDIO_COUNT; i++){ /* instantiate audio */ audio = g_object_new(AGS_TYPE_AUDIO, NULL); g_object_ref(audio); /* audio list of soundcard */ ags_soundcard_set_audio(AGS_SOUNDCARD(devout), g_list_prepend(ags_soundcard_get_audio(AGS_SOUNDCARD(devout)), audio)); g_object_ref(audio); /* soundcard property of audio */ g_object_set(audio, "soundcard\0", devout, NULL); } /* run dispose */ g_object_run_dispose(devout); /* stub finalize */ devout_test_finalized = FALSE; G_OBJECT_GET_CLASS(devout)->finalize = ags_devout_test_finalize_stub; /* unref and assert */ g_object_unref(devout); CU_ASSERT(devout_test_finalized == TRUE); } void ags_devout_test_finalize_stub(GObject *gobject) { devout_test_finalized = TRUE; } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsDevoutTest\0", ags_devout_test_init_suite, ags_devout_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsDevout doing dispose\0", ags_devout_test_dispose) == NULL) || (CU_add_test(pSuite, "test of AgsDevout doing finalize\0", ags_devout_test_finalize) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_recall_dependency_test.c0000644000175000017500000002010113246707333021215 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_recall_dependency_test_init_suite(); int ags_recall_dependency_test_clean_suite(); void ags_recall_dependency_test_find_dependency(); void ags_recall_dependency_test_find_dependency_by_provider(); void ags_recall_dependency_test_resolve(); /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_dependency_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_dependency_test_clean_suite() { return(0); } void ags_recall_dependency_test_find_dependency() { AgsRecall *recall[3]; AgsRecallDependency *recall_dependency[3]; GList *list, *current; list = NULL; /* dependency #0 */ recall[0] = g_object_new(AGS_TYPE_RECALL, NULL); recall_dependency[0] = g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", recall[0], NULL); list = g_list_prepend(list, recall_dependency[0]); /* dependency #1 */ recall[1] = g_object_new(AGS_TYPE_RECALL, NULL); recall_dependency[1] = g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", recall[1], NULL); list = g_list_prepend(list, recall_dependency[1]); /* dependency #2 */ recall[2] = g_object_new(AGS_TYPE_RECALL, NULL); recall_dependency[2] = g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", recall[2], NULL); list = g_list_prepend(list, recall_dependency[2]); /* find and assert */ CU_ASSERT((current = ags_recall_dependency_find_dependency(list, recall[0])) != NULL && AGS_RECALL_DEPENDENCY(current->data)->dependency == recall[0]); CU_ASSERT((current = ags_recall_dependency_find_dependency(list, recall[1])) != NULL && AGS_RECALL_DEPENDENCY(current->data)->dependency == recall[1]); CU_ASSERT((current = ags_recall_dependency_find_dependency(list, recall[2])) != NULL && AGS_RECALL_DEPENDENCY(current->data)->dependency == recall[2]); } void ags_recall_dependency_test_find_dependency_by_provider() { AgsChannel *channel[3]; AgsAudio *audio[3]; AgsRecall *recall; AgsRecallAudio *recall_audio; AgsRecallDependency *recall_dependency[6]; GList *list, *current; list = NULL; /* dependency #0 */ audio[0] = g_object_new(AGS_TYPE_AUDIO, NULL); recall_audio = g_object_new(AGS_TYPE_RECALL_AUDIO, "audio", audio[0], NULL); recall = g_object_new(AGS_TYPE_RECALL_AUDIO_RUN, "recall-audio", recall_audio, NULL); recall_dependency[0] = g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", recall, NULL); list = g_list_prepend(list, recall_dependency[0]); /* dependency #1 */ channel[0] = g_object_new(AGS_TYPE_CHANNEL, NULL); recall = g_object_new(AGS_TYPE_RECALL_CHANNEL_RUN, "source", channel[0], NULL); recall_dependency[1] = g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", recall, NULL); list = g_list_prepend(list, recall_dependency[1]); /* dependency #2 */ channel[1] = g_object_new(AGS_TYPE_CHANNEL, NULL); recall = g_object_new(AGS_TYPE_RECALL_CHANNEL_RUN, "source", channel[1], NULL); recall_dependency[2] = g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", recall, NULL); list = g_list_prepend(list, recall_dependency[2]); /* dependency #3 */ audio[1] = g_object_new(AGS_TYPE_AUDIO, NULL); recall_audio = g_object_new(AGS_TYPE_RECALL_AUDIO, "audio", audio[1], NULL); recall = g_object_new(AGS_TYPE_RECALL_AUDIO_RUN, "recall-audio", recall_audio, NULL); recall_dependency[3] = g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", recall, NULL); list = g_list_prepend(list, recall_dependency[3]); /* dependency #4 */ audio[2] = g_object_new(AGS_TYPE_AUDIO, NULL); recall_audio = g_object_new(AGS_TYPE_RECALL_AUDIO, "audio", audio[2], NULL); recall = g_object_new(AGS_TYPE_RECALL_AUDIO_RUN, "recall-audio", recall_audio, NULL); recall_dependency[4] = g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", recall, NULL); list = g_list_prepend(list, recall_dependency[4]); /* dependency #5 */ channel[2] = g_object_new(AGS_TYPE_CHANNEL, NULL); recall = g_object_new(AGS_TYPE_RECALL_CHANNEL_RUN, "source", channel[2], NULL); recall_dependency[5] = g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", recall, NULL); list = g_list_prepend(list, recall_dependency[5]); /* find and assert - audio */ CU_ASSERT((current = ags_recall_dependency_find_dependency_by_provider(list, audio[0])) != NULL && AGS_RECALL_AUDIO_RUN(AGS_RECALL_DEPENDENCY(current->data)->dependency)->recall_audio->audio == audio[0]); CU_ASSERT((current = ags_recall_dependency_find_dependency_by_provider(list, audio[1])) != NULL && AGS_RECALL_AUDIO_RUN(AGS_RECALL_DEPENDENCY(current->data)->dependency)->recall_audio->audio == audio[1]); CU_ASSERT((current = ags_recall_dependency_find_dependency_by_provider(list, audio[2])) != NULL && AGS_RECALL_AUDIO_RUN(AGS_RECALL_DEPENDENCY(current->data)->dependency)->recall_audio->audio == audio[2]); /* find and assert - channel */ CU_ASSERT((current = ags_recall_dependency_find_dependency_by_provider(list, channel[0])) != NULL && AGS_RECALL_CHANNEL_RUN(AGS_RECALL_DEPENDENCY(current->data)->dependency)->source == channel[0]); CU_ASSERT((current = ags_recall_dependency_find_dependency_by_provider(list, channel[1])) != NULL && AGS_RECALL_CHANNEL_RUN(AGS_RECALL_DEPENDENCY(current->data)->dependency)->source == channel[1]); CU_ASSERT((current = ags_recall_dependency_find_dependency_by_provider(list, channel[2])) != NULL && AGS_RECALL_CHANNEL_RUN(AGS_RECALL_DEPENDENCY(current->data)->dependency)->source == channel[2]); } void ags_recall_dependency_test_resolve() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsRecallDependencyTest", ags_recall_dependency_test_init_suite, ags_recall_dependency_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsRecallDependency find dependency", ags_recall_dependency_test_find_dependency) == NULL) || (CU_add_test(pSuite, "test of AgsRecallDependency find dependency by provider", ags_recall_dependency_test_find_dependency_by_provider) == NULL) || (CU_add_test(pSuite, "test of AgsRecallDependency resolve", ags_recall_dependency_test_resolve) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_output_test.c0000644000175000017500000001241713246707333017130 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include int ags_output_test_init_suite(); int ags_output_test_clean_suite(); void ags_output_test_find_first_input_recycling(); void ags_output_test_find_last_input_recycling(); #define AGS_OUTPUT_TEST_FIND_FIRST_INPUT_RECYCLING_AUDIO_CHANNELS (2) #define AGS_OUTPUT_TEST_FIND_FIRST_INPUT_RECYCLING_OUTPUT_PADS (1) #define AGS_OUTPUT_TEST_FIND_FIRST_INPUT_RECYCLING_INPUT_PADS (8) #define AGS_OUTPUT_TEST_FIND_LAST_INPUT_RECYCLING_AUDIO_CHANNELS (2) #define AGS_OUTPUT_TEST_FIND_LAST_INPUT_RECYCLING_OUTPUT_PADS (1) #define AGS_OUTPUT_TEST_FIND_LAST_INPUT_RECYCLING_INPUT_PADS (8) /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_output_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_output_test_clean_suite() { return(0); } void ags_output_test_find_first_input_recycling() { AgsAudio *audio; AgsChannel *current; AgsRecycling *recycling, *first_recycling; guint i; audio = g_object_new(AGS_TYPE_AUDIO, NULL); ags_audio_set_audio_channels(audio, AGS_OUTPUT_TEST_FIND_FIRST_INPUT_RECYCLING_AUDIO_CHANNELS); ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, AGS_OUTPUT_TEST_FIND_FIRST_INPUT_RECYCLING_OUTPUT_PADS); ags_audio_set_pads(audio, AGS_TYPE_INPUT, AGS_OUTPUT_TEST_FIND_FIRST_INPUT_RECYCLING_INPUT_PADS); /* create some recycling */ current = ags_channel_pad_nth(audio->input, 1); first_recycling = current->first_recycling; for(i = 0; i < 2; i++){ current->first_recycling = current->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); current = current->next_pad; } /* create more recycling */ current = ags_channel_pad_nth(audio->input, 5); for(i = 0; i < 2; i++){ current->first_recycling = current->last_recycling= g_object_new(AGS_TYPE_RECYCLING, NULL); current = current->next_pad; } /* assert */ recycling = ags_output_find_first_input_recycling(audio->output); CU_ASSERT(recycling == first_recycling); } void ags_output_test_find_last_input_recycling() { AgsAudio *audio; AgsChannel *current; AgsRecycling *recycling, *last_recycling; guint i; audio = g_object_new(AGS_TYPE_AUDIO, NULL); ags_audio_set_audio_channels(audio, AGS_OUTPUT_TEST_FIND_LAST_INPUT_RECYCLING_AUDIO_CHANNELS); ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, AGS_OUTPUT_TEST_FIND_LAST_INPUT_RECYCLING_OUTPUT_PADS); ags_audio_set_pads(audio, AGS_TYPE_INPUT, AGS_OUTPUT_TEST_FIND_LAST_INPUT_RECYCLING_INPUT_PADS); /* create some recycling */ current = ags_channel_pad_nth(audio->input, 1); for(i = 0; i < 2; i++){ current->first_recycling = current->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); current = current->next_pad; } /* create more recycling */ current = ags_channel_pad_nth(audio->input, 5); for(i = 0; i < 2; i++){ current->first_recycling = current->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); current = current->next_pad; } current = ags_channel_pad_nth(audio->input, 7); last_recycling = current->last_recycling; /* assert */ recycling = ags_output_find_last_input_recycling(audio->output); CU_ASSERT(recycling == last_recycling); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsOutputTest", ags_output_test_init_suite, ags_output_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsOutput find first input recycling", ags_output_test_find_first_input_recycling) == NULL) || (CU_add_test(pSuite, "test of AgsOutput find last input recycling", ags_output_test_find_last_input_recycling) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/midi/0000755000175000017500000000000013256233676014535 500000000000000gsequencer-1.4.24/ags/test/audio/midi/ags_midi_buffer_util_test.c0000644000175000017500000023601713246707333022026 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #include #include #include #include #include #include #include int ags_midi_buffer_util_test_init_suite(); int ags_midi_buffer_util_test_clean_suite(); void ags_midi_buffer_util_test_get_varlength_size(); void ags_midi_buffer_util_test_put_varlength(); void ags_midi_buffer_util_test_get_varlength(); void ags_midi_buffer_util_test_put_int16(); void ags_midi_buffer_util_test_get_int16(); void ags_midi_buffer_util_test_put_int24(); void ags_midi_buffer_util_test_get_int24(); void ags_midi_buffer_util_test_put_int32(); void ags_midi_buffer_util_test_get_int32(); void ags_midi_buffer_util_test_put_header(); void ags_midi_buffer_util_test_get_header(); void ags_midi_buffer_util_test_put_track(); void ags_midi_buffer_util_test_get_track(); void ags_midi_buffer_util_test_put_key_on(); void ags_midi_buffer_util_test_get_key_on(); void ags_midi_buffer_util_test_put_key_off(); void ags_midi_buffer_util_test_get_key_off(); void ags_midi_buffer_util_test_put_key_pressure(); void ags_midi_buffer_util_test_get_key_pressure(); void ags_midi_buffer_util_test_put_change_parameter(); void ags_midi_buffer_util_test_get_change_parameter(); void ags_midi_buffer_util_test_put_pitch_bend(); void ags_midi_buffer_util_test_get_pitch_bend(); void ags_midi_buffer_util_test_put_change_program(); void ags_midi_buffer_util_test_get_change_program(); void ags_midi_buffer_util_test_put_change_pressure(); void ags_midi_buffer_util_test_get_change_pressure(); void ags_midi_buffer_util_test_put_sysex(); void ags_midi_buffer_util_test_get_sysex(); void ags_midi_buffer_util_test_put_quarter_frame(); void ags_midi_buffer_util_test_get_quarter_frame(); void ags_midi_buffer_util_test_put_song_position(); void ags_midi_buffer_util_test_get_song_position(); void ags_midi_buffer_util_test_put_song_select(); void ags_midi_buffer_util_test_get_song_select(); void ags_midi_buffer_util_test_put_tune_request(); void ags_midi_buffer_util_test_get_tune_request(); void ags_midi_buffer_util_test_put_sequence_number(); void ags_midi_buffer_util_test_get_sequence_number(); void ags_midi_buffer_util_test_put_smtpe(); void ags_midi_buffer_util_test_get_smtpe(); void ags_midi_buffer_util_test_put_tempo(); void ags_midi_buffer_util_test_get_tempo(); void ags_midi_buffer_util_test_put_time_signature(); void ags_midi_buffer_util_test_get_time_signature(); void ags_midi_buffer_util_test_put_key_signature(); void ags_midi_buffer_util_test_get_key_signature(); void ags_midi_buffer_util_test_put_sequencer_meta_event(); void ags_midi_buffer_util_test_get_sequencer_meta_event(); void ags_midi_buffer_util_test_put_text_event(); void ags_midi_buffer_util_test_get_text_event(); void ags_midi_buffer_util_test_put_end_of_track(); void ags_midi_buffer_util_test_get_end_of_track(); void ags_midi_buffer_util_test_put_seek_message(); void ags_midi_buffer_util_test_decode(); static const glong varlength[12][3] = { {0x0, 0, 1}, {0x1, 1, 1}, {0x7f, 128 - 1, 1}, {0x8100, 128, 2}, {0x8101, 128 + 1, 2}, {0xff7f, 128 * 128 - 1, 2}, {0x818000, 128 * 128, 3}, {0x818001, 128 * 128 + 1, 3}, {0xffff7f, 128 * 128 * 128 - 1, 3}, {0x81808000, 128 * 128 * 128, 4}, {0x81808001, 128 * 128 * 128 + 1, 4}, {0xffffff7f, 128 * 128 * 128 * 128 - 1, 4}, }; static const unsigned char *varlength_buffer[] = { "\x00", "\x01", "\x7f", "\x81\x00", "\x81\x01", "\xff\x7f", "\x81\x80\x00", "\x81\x80\x01", "\xff\xff\x7f", "\x81\x80\x80\x00", "\x81\x80\x80\x01", "\xff\xff\xff\x7f", }; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_midi_buffer_util_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_midi_buffer_util_test_clean_suite() { return(0); } void ags_midi_buffer_util_test_get_varlength_size() { guint i; gboolean success; /* */ success = TRUE; for(i = 0; i < 12; i++){ if(ags_midi_buffer_util_get_varlength_size(varlength[i][1]) != varlength[i][2]){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_varlength() { unsigned char *buffer; guint mask; guint i, j; gboolean success; /* */ buffer = (unsigned char *) malloc(4 * sizeof(unsigned char)); success = TRUE; for(i = 0; i < 12 && success; i++){ ags_midi_buffer_util_put_varlength(buffer, varlength[i][1]); mask = 0xff; for(j = 0; j < varlength[i][2]; j++){ if(buffer[j] != ((mask << (8 * (varlength[i][2] - j - 1))) & varlength[i][0]) >> (8 * (varlength[i][2] - j - 1))){ success = FALSE; break; } } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_varlength() { unsigned char **iter; glong val; guint n_read; guint i; gboolean success; iter = varlength_buffer; success = TRUE; for(i = 0; i < 12; i++){ n_read = ags_midi_buffer_util_get_varlength(*iter, &val); if(n_read != varlength[i][2] || val != varlength[i][1]){ success = FALSE; break; } iter++; } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_int16() { unsigned char *buffer; guint i, j; gboolean success; static const glong val[] = { 0, 1, 255, 256, 65535, }; static const unsigned char *val_buffer[] = { "\x00\x00", "\x00\x01", "\x00\xff", "\x01\x00", "\xff\xff", }; buffer = (unsigned char *) malloc(2 * sizeof(unsigned char)); success = TRUE; for(i = 0; i < 5 && success; i++){ ags_midi_buffer_util_put_int16(buffer, val[i]); for(j = 0; j < 2; j++){ if(buffer[j] != val_buffer[i][j]){ success = FALSE; break; } } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_int16() { glong current; guint i; gboolean success; static const glong val[] = { 0, 1, 255, 256, 65535, }; static const gchar *val_buffer[] = { "\x00\x00", "\x00\x01", "\x00\xff", "\x01\x00", "\xff\xff", }; success = TRUE; for(i = 0; i < 5 && success; i++){ ags_midi_buffer_util_get_int16(val_buffer[i], ¤t); if(current != val[i]){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_int24() { unsigned char *buffer; guint i, j; gboolean success; static const glong val[] = { 0, 1, 255, 256, 65535, 65536, 16777215, }; static const unsigned char *val_buffer[] = { "\x00\x00\x00", "\x00\x00\x01", "\x00\x00\xff", "\x00\x01\x00", "\x00\xff\xff", "\x01\x00\x00", "\xff\xff\xff", }; buffer = (unsigned char *) malloc(3 * sizeof(unsigned char)); success = TRUE; for(i = 0; i < 7 && success; i++){ ags_midi_buffer_util_put_int24(buffer, val[i]); for(j = 0; j < 3; j++){ if(buffer[j] != val_buffer[i][j]){ success = FALSE; break; } } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_int24() { glong current; guint i; gboolean success; static const glong val[] = { 0, 1, 255, 256, 65535, 65536, 16777215, }; static const unsigned char *val_buffer[] = { "\x00\x00\x00", "\x00\x00\x01", "\x00\x00\xff", "\x00\x01\x00", "\x00\xff\xff", "\x01\x00\x00", "\xff\xff\xff", }; success = TRUE; for(i = 0; i < 7 && success; i++){ ags_midi_buffer_util_get_int24(val_buffer[i], ¤t); if(current != val[i]){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_int32() { unsigned char *buffer; guint i, j; gboolean success; static const glong val[] = { 0, 1, 255, 256, 65535, 65536, 16777215, 16777216, 4294967295, }; static const unsigned char *val_buffer[] = { "\x00\x00\x00\x00", "\x00\x00\x00\x01", "\x00\x00\x00\xff", "\x00\x00\x01\x00", "\x00\x00\xff\xff", "\x00\x01\x00\x00", "\x00\xff\xff\xff", "\x01\x00\x00\x00", "\xff\xff\xff\xff", }; buffer = (unsigned char *) malloc(4 * sizeof(unsigned char)); success = TRUE; for(i = 0; i < 9 && success; i++){ ags_midi_buffer_util_put_int32(buffer, val[i]); for(j = 0; j < 4; j++){ if(buffer[j] != val_buffer[i][j]){ success = FALSE; break; } } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_int32() { glong current; guint i; gboolean success; static const glong val[] = { 0, 1, 255, 256, 65535, 65536, 16777215, 16777216, 4294967295, }; static const unsigned char *val_buffer[] = { "\x00\x00\x00\x00", "\x00\x00\x00\x01", "\x00\x00\x00\xff", "\x00\x00\x01\x00", "\x00\x00\xff\xff", "\x00\x01\x00\x00", "\x00\xff\xff\xff", "\x01\x00\x00\x00", "\xff\xff\xff\xff", }; success = TRUE; for(i = 0; i < 9 && success; i++){ ags_midi_buffer_util_get_int32(val_buffer[i], ¤t); if(current != val[i]){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_header() { unsigned char *buffer; unsigned char *header_format_0 = "MThd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60"; unsigned char *header_format_1 = "MThd\x00\x00\x00\x00\x00\x01\x00\x00\x00\x60"; guint i; gboolean success; buffer = malloc(14 * sizeof(unsigned char)); /* format 0 */ success = TRUE; ags_midi_buffer_util_put_header(buffer, 0, 0, 0, 96); for(i = 0; i < 14; i++){ if(buffer[i] != header_format_0[i]){ success = FALSE; break; } } CU_ASSERT(success == TRUE); /* format 1 */ success = TRUE; ags_midi_buffer_util_put_header(buffer, 0, 1, 0, 96); for(i = 0; i < 14; i++){ if(buffer[i] != header_format_1[i]){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_header() { unsigned char *header_format_0 = "MThd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60"; unsigned char *header_format_1 = "MThd\x00\x00\x00\x00\x00\x01\x00\x00\x00\x60"; glong offset, format, track_count, division; /* invoke with no return location */ ags_midi_buffer_util_get_header(header_format_0, NULL, NULL, NULL, NULL); /* format 0 */ ags_midi_buffer_util_get_header(header_format_0, &offset, &format, &track_count, &division); CU_ASSERT(offset == 0 && format == 0 && track_count == 0 && division == 96); /* format 1 */ ags_midi_buffer_util_get_header(header_format_1, &offset, &format, &track_count, &division); CU_ASSERT(offset == 0 && format == 1 && track_count == 0 && division == 96); } void ags_midi_buffer_util_test_put_track() { unsigned char *buffer; unsigned char *track = "MTrk\x00\x00\x00\x00"; guint i; gboolean success; buffer = (unsigned char *) malloc(8 * sizeof(unsigned char)); /* track */ success = TRUE; ags_midi_buffer_util_put_track(buffer, 0); for(i = 0; i < 8; i++){ if(buffer[i] != track[i]){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_track() { unsigned char *track = "MTrk\x00\x00\x00\x00"; glong offset; /* invoke with no return location */ ags_midi_buffer_util_get_track(track, NULL); /* track */ ags_midi_buffer_util_get_track(track, &offset); CU_ASSERT(offset == 0); } void ags_midi_buffer_util_test_put_key_on() { unsigned char *buffer; unsigned char *key_on = "\x90\x36\x7f"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ ags_midi_buffer_util_put_key_on(buffer, varlength[i][1], 0, 54, 127); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], key_on, 3)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_key_on() { unsigned char *buffer; unsigned char *key_on = "\x90\x36\x7f"; guint i; glong delta_time, channel, key, velocity; gboolean success; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], key_on, 3); ags_midi_buffer_util_get_key_on(buffer, NULL, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], key_on, 3); ags_midi_buffer_util_get_key_on(buffer, &delta_time, &channel, &key, &velocity); if(delta_time != varlength[i][1] || channel != 0 || key != 54 || velocity != 127){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_key_off() { unsigned char *buffer; unsigned char *key_off = "\x80\x36\x7f"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ ags_midi_buffer_util_put_key_off(buffer, varlength[i][1], 0, 54, 127); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], key_off, 3)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_key_off() { unsigned char *buffer; unsigned char *key_off = "\x80\x36\x7f"; guint i; glong delta_time, channel, key, velocity; gboolean success; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], key_off, 3); ags_midi_buffer_util_get_key_off(buffer, NULL, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], key_off, 3); ags_midi_buffer_util_get_key_off(buffer, &delta_time, &channel, &key, &velocity); if(delta_time != varlength[i][1] || channel != 0 || key != 54 || velocity != 127){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_key_pressure() { unsigned char *buffer; unsigned char *key_pressure = "\xa0\x36\x7f"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ ags_midi_buffer_util_put_key_pressure(buffer, varlength[i][1], 0, 54, 127); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], key_pressure, 3)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_key_pressure() { unsigned char *buffer; unsigned char *key_pressure = "\xa0\x36\x7f"; guint i; glong delta_time, channel, key, velocity; gboolean success; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], key_pressure, 3); ags_midi_buffer_util_get_key_pressure(buffer, NULL, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], key_pressure, 3); ags_midi_buffer_util_get_key_pressure(buffer, &delta_time, &channel, &key, &velocity); if(delta_time != varlength[i][1] || channel != 0 || key != 54 || velocity != 127){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_change_parameter() { unsigned char *buffer; unsigned char *change_parameter = "\xb0\x00\x7f"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ ags_midi_buffer_util_put_change_parameter(buffer, varlength[i][1], 0, 0, 127); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], change_parameter, 3)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_change_parameter() { unsigned char *buffer; unsigned char *change_parameter = "\xb0\x00\x7f"; guint i; glong delta_time, channel, control, value; gboolean success; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], change_parameter, 3); ags_midi_buffer_util_get_change_parameter(buffer, NULL, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], change_parameter, 3); ags_midi_buffer_util_get_change_parameter(buffer, &delta_time, &channel, &control, &value); if(delta_time != varlength[i][1] || channel != 0 || control != 0 || value != 127){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_pitch_bend() { unsigned char *buffer; unsigned char *pitch_bend = "\xe0\x00\x7f"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ ags_midi_buffer_util_put_pitch_bend(buffer, varlength[i][1], 0, 0, 127); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], pitch_bend, 3)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_pitch_bend() { unsigned char *buffer; unsigned char *pitch_bend = "\xe0\x00\x7f"; guint i; glong delta_time, channel, pitch, transmitter; gboolean success; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], pitch_bend, 3); ags_midi_buffer_util_get_pitch_bend(buffer, NULL, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], pitch_bend, 3); ags_midi_buffer_util_get_pitch_bend(buffer, &delta_time, &channel, &pitch, &transmitter); if(delta_time != varlength[i][1] || channel != 0 || pitch != 0 || transmitter != 127){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_change_program() { unsigned char *buffer; unsigned char *change_program = "\xc0\x00"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(6 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ ags_midi_buffer_util_put_change_program(buffer, varlength[i][1], 0, 0); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], change_program, 2)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_change_program() { unsigned char *buffer; unsigned char *change_program = "\xc0\x00"; guint i; glong delta_time, channel, program; gboolean success; buffer = (unsigned char *) malloc(6 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], change_program, 2); ags_midi_buffer_util_get_change_program(buffer, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], change_program, 2); ags_midi_buffer_util_get_change_program(buffer, &delta_time, &channel, &program); if(delta_time != varlength[i][1] || channel != 0 || program != 0){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_change_pressure() { unsigned char *buffer; unsigned char *change_pressure = "\xd0\x7f"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(6 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ ags_midi_buffer_util_put_change_pressure(buffer, varlength[i][1], 0, 127); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], change_pressure, 2)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_change_pressure() { unsigned char *buffer; unsigned char *change_pressure = "\xd0\x7f"; guint i; glong delta_time, channel, pressure; gboolean success; buffer = (unsigned char *) malloc(6 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], change_pressure, 2); ags_midi_buffer_util_get_change_pressure(buffer, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], change_pressure, 2); ags_midi_buffer_util_get_change_pressure(buffer, &delta_time, &channel, &pressure); if(delta_time != varlength[i][1] || channel != 0 || pressure != 127){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_sysex() { //TODO:JK: implement me } void ags_midi_buffer_util_test_get_sysex() { //TODO:JK: implement me } void ags_midi_buffer_util_test_put_quarter_frame() { unsigned char *buffer; unsigned char *quarter_frame; unsigned char *quarter_frame_frame_number_0_lsb = "\xf1\x00"; unsigned char *quarter_frame_frame_number_0_msb = "\xf1\x10"; unsigned char *quarter_frame_frame_number_30_lsb = "\xf1\x0e"; unsigned char *quarter_frame_frame_number_30_msb = "\xf1\x11"; unsigned char *quarter_frame_seconds_0_lsb = "\xf1\x20"; unsigned char *quarter_frame_seconds_0_msb = "\xf1\x30"; unsigned char *quarter_frame_seconds_59_lsb = "\xf1\x2c"; unsigned char *quarter_frame_seconds_59_msb = "\xf1\x33"; unsigned char *quarter_frame_minutes_0_lsb = "\xf1\x40"; unsigned char *quarter_frame_minutes_0_msb = "\xf1\x50"; unsigned char *quarter_frame_minutes_59_lsb = "\xf1\x4c"; unsigned char *quarter_frame_minutes_59_msb = "\xf1\x53"; unsigned char *quarter_frame_hours_0_lsb = "\xf1\x60"; unsigned char *quarter_frame_hours_0_msb = "\xf1\x70"; unsigned char *quarter_frame_hours_23_lsb = "\xf1\x67"; unsigned char *quarter_frame_hours_23_msb = "\xf1\x71"; guint i; gboolean success; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); quarter_frame = (unsigned char *) malloc(7 * sizeof(unsigned char)); success = TRUE; for(i = 0; i < 12; i++){ /* frame number 0 - lsb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_frame_number_0_lsb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_LSB, 0); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* frame number 0 - msb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_frame_number_0_msb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_MSB, 0); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* frame number 30 - lsb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_frame_number_30_lsb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_LSB, (0x0f & 0x1e)); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* frame number 30 - msb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_frame_number_30_msb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_MSB, ((0x10 & 0x1e) >> 4)); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* seconds 0 - lsb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_seconds_0_lsb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_LSB, 0); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* seconds 0 - msb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_seconds_0_msb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_MSB, 0); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* seconds 59 - lsb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_seconds_59_lsb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_LSB, (0x0f & 0x3c)); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* seconds 59 - msb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_seconds_59_msb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_MSB, ((0x30 & (0x3c)) >> 4)); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* minutes 0 - lsb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_minutes_0_lsb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_LSB, 0); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* minutes 0 - msb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_minutes_0_msb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_MSB, 0); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* minutes 59 - lsb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_minutes_59_lsb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_LSB, (0x0f & 0x3c)); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* minutes 59 - msb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_minutes_59_msb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_MSB, ((0x30 & (0x3c)) >> 4)); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* hours 0 - lsb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_hours_0_lsb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_LSB, 0); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* hours 0 - msb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_hours_0_msb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_MSB, 0); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* hours 23 - lsb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_hours_23_lsb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_LSB, (0x0f & 0x17)); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } /* hours 23 - msb */ memcpy(quarter_frame, varlength_buffer[i], varlength[i][2]); memcpy(quarter_frame + varlength[i][2], quarter_frame_hours_23_msb, 2); ags_midi_buffer_util_put_quarter_frame(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_MSB, ((0x10 & 0x17) >> 4)); if(memcmp(buffer, quarter_frame, varlength[i][2] + 2)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_quarter_frame() { unsigned char *buffer; unsigned char *quarter_frame_frame_number_0_lsb = "\xf1\x00"; unsigned char *quarter_frame_frame_number_0_msb = "\xf1\x10"; unsigned char *quarter_frame_frame_number_30_lsb = "\xf1\x0e"; unsigned char *quarter_frame_frame_number_30_msb = "\xf1\x11"; unsigned char *quarter_frame_seconds_0_lsb = "\xf1\x20"; unsigned char *quarter_frame_seconds_0_msb = "\xf1\x30"; unsigned char *quarter_frame_seconds_59_lsb = "\xf1\x2c"; unsigned char *quarter_frame_seconds_59_msb = "\xf1\x33"; unsigned char *quarter_frame_minutes_0_lsb = "\xf1\x40"; unsigned char *quarter_frame_minutes_0_msb = "\xf1\x50"; unsigned char *quarter_frame_minutes_59_lsb = "\xf1\x4c"; unsigned char *quarter_frame_minutes_59_msb = "\xf1\x53"; unsigned char *quarter_frame_hours_0_lsb = "\xf1\x60"; unsigned char *quarter_frame_hours_0_msb = "\xf1\x70"; unsigned char *quarter_frame_hours_23_lsb = "\xf1\x67"; unsigned char *quarter_frame_hours_23_msb = "\xf1\x71"; glong delta_time, message_type, values; guint i; gboolean success; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); success = TRUE; for(i = 0; i < 12; i++){ /* frame number 0 - lsb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_frame_number_0_lsb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_LSB || values != 0){ success = FALSE; break; } /* frame number 0 - msb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_frame_number_0_msb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_MSB || values != 0){ success = FALSE; break; } /* frame number 30 - lsb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_frame_number_30_lsb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_LSB || values != (0x0f & 0x1e)){ success = FALSE; break; } /* frame number 30 - msb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_frame_number_30_msb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_MSB || values != ((0x10 & 0x1e) >> 4)){ success = FALSE; break; } /* seconds 0 - lsb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_seconds_0_lsb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_LSB || values != 0){ success = FALSE; break; } /* seconds 0 - msb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_seconds_0_msb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_MSB || values != 0){ success = FALSE; break; } /* seconds 59 - lsb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_seconds_59_lsb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_LSB || values != (0x0f & 0x3c)){ success = FALSE; break; } /* seconds 59 - msb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_seconds_59_msb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_MSB || values != ((0x30 & 0x3c) >> 4)){ success = FALSE; break; } /* minutes 0 - lsb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_minutes_0_lsb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_LSB || values != 0){ success = FALSE; break; } /* minutes 0 - msb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_minutes_0_msb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_MSB || values != 0){ success = FALSE; break; } /* minutes 59 - lsb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_minutes_59_lsb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_LSB || values != (0x0f & 0x3c)){ success = FALSE; break; } /* minutes 59 - msb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_minutes_59_msb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_MSB || values != ((0x30 & 0x3c) >> 4)){ success = FALSE; break; } /* hours 0 - lsb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_hours_0_lsb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_LSB || values != 0){ success = FALSE; break; } /* hours 0 - msb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_hours_0_msb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_MSB || values != 0){ success = FALSE; break; } /* hours 23 - lsb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_hours_23_lsb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_LSB || values != (0x0f & 0x17)){ success = FALSE; break; } /* hours 23 - msb */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], quarter_frame_hours_23_msb, 2); ags_midi_buffer_util_get_quarter_frame(buffer, &delta_time, &message_type, &values); if(message_type != AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_MSB || values != ((0x10 & 0x17) >> 4)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_song_position() { unsigned char *buffer; unsigned char *song_position_0 = "\xf2\x00\x00"; unsigned char *song_position_16 = "\xf2\x10\x00"; unsigned char *song_position_16383 = "\xf2\x7f\x7f"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* position 0 */ ags_midi_buffer_util_put_song_position(buffer, varlength[i][1], 0); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], song_position_0, 3)){ success = FALSE; break; } /* position 16 */ ags_midi_buffer_util_put_song_position(buffer, varlength[i][1], 16); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], song_position_16, 3)){ success = FALSE; break; } /* position 16383 (maximum) */ ags_midi_buffer_util_put_song_position(buffer, varlength[i][1], 16383); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], song_position_16383, 3)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_song_position() { unsigned char *buffer; unsigned char *song_position_0 = "\xf2\x00\x00"; unsigned char *song_position_16 = "\xf2\x10\x00"; unsigned char *song_position_16383 = "\xf2\x7f\x7f"; guint i; glong delta_time, song_position; gboolean success; buffer = (unsigned char *) malloc(12 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], song_position_0, 3); ags_midi_buffer_util_get_song_position(buffer, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* position 0 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], song_position_0, 3); ags_midi_buffer_util_get_song_position(buffer, &delta_time, &song_position); if(delta_time != varlength[i][1] || song_position != 0){ success = FALSE; break; } /* position 16 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], song_position_16, 3); ags_midi_buffer_util_get_song_position(buffer, &delta_time, &song_position); if(delta_time != varlength[i][1] || song_position != 16){ success = FALSE; break; } /* position 16383 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], song_position_16383, 3); ags_midi_buffer_util_get_song_position(buffer, &delta_time, &song_position); if(delta_time != varlength[i][1] || song_position != 16383){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_song_select() { unsigned char *buffer; unsigned char *song_select_0 = "\xf3\x00"; unsigned char *song_select_127 = "\xf3\x7f"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(6 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* select 0 */ ags_midi_buffer_util_put_song_select(buffer, varlength[i][1], 0); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], song_select_0, 2)){ success = FALSE; break; } /* select 127 */ ags_midi_buffer_util_put_song_select(buffer, varlength[i][1], 127); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], song_select_127, 2)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_song_select() { unsigned char *buffer; unsigned char *song_select_0 = "\xf3\x00"; unsigned char *song_select_127 = "\xf3\x7f"; guint i; glong delta_time, song_select; gboolean success; buffer = (unsigned char *) malloc(6 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], song_select_0, 2); ags_midi_buffer_util_get_song_select(buffer, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* select 0 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], song_select_0, 2); ags_midi_buffer_util_get_song_select(buffer, &delta_time, &song_select); if(delta_time != varlength[i][1] || song_select != 0){ success = FALSE; break; } /* select 127 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], song_select_127, 2); ags_midi_buffer_util_get_song_select(buffer, &delta_time, &song_select); if(delta_time != varlength[i][1] || song_select != 127){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_tune_request() { unsigned char *buffer; unsigned char *tune_request = "\xf6"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(6 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* select 0 */ ags_midi_buffer_util_put_tune_request(buffer, varlength[i][1]); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], tune_request, 1)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_tune_request() { unsigned char *buffer; unsigned char *tune_request = "\xf6"; guint i; glong delta_time; gboolean success; buffer = (unsigned char *) malloc(6 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], tune_request, 1); ags_midi_buffer_util_get_tune_request(buffer, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* select 0 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], tune_request, 1); ags_midi_buffer_util_get_tune_request(buffer, &delta_time); if(delta_time != varlength[i][1]){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_sequence_number() { unsigned char *buffer; unsigned char *sequence_number_0 = "\xff\x00\x02\x00\x00"; unsigned char *sequence_number_255 = "\xff\x00\x02\x00\xff"; unsigned char *sequence_number_256 = "\xff\x00\x02\x01\x00"; unsigned char *sequence_number_65535 = "\xff\x00\x02\xff\xff"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(9 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* select 0 */ ags_midi_buffer_util_put_sequence_number(buffer, varlength[i][1], 0); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], sequence_number_0, 5)){ success = FALSE; break; } /* select 255 */ ags_midi_buffer_util_put_sequence_number(buffer, varlength[i][1], 255); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], sequence_number_255, 5)){ success = FALSE; break; } /* select 256 */ ags_midi_buffer_util_put_sequence_number(buffer, varlength[i][1], 256); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], sequence_number_256, 5)){ success = FALSE; break; } /* select 65535 */ ags_midi_buffer_util_put_sequence_number(buffer, varlength[i][1], 65535); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], sequence_number_65535, 5)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_sequence_number() { unsigned char *buffer; unsigned char *sequence_number_0 = "\xff\x00\x02\x00\x00"; unsigned char *sequence_number_255 = "\xff\x00\x02\x00\xff"; unsigned char *sequence_number_256 = "\xff\x00\x02\x01\x00"; unsigned char *sequence_number_65535 = "\xff\x00\x02\xff\xff"; guint i; glong delta_time, sequence_number; gboolean success; buffer = (unsigned char *) malloc(9 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], sequence_number_0, 5); ags_midi_buffer_util_get_sequence_number(buffer, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* select 0 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], sequence_number_0, 5); ags_midi_buffer_util_get_sequence_number(buffer, &delta_time, &sequence_number); if(delta_time != varlength[i][1] || sequence_number != 0){ success = FALSE; break; } /* select 255 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], sequence_number_255, 5); ags_midi_buffer_util_get_sequence_number(buffer, &delta_time, &sequence_number); if(delta_time != varlength[i][1] || sequence_number != 255){ success = FALSE; break; } /* select 256 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], sequence_number_256, 5); ags_midi_buffer_util_get_sequence_number(buffer, &delta_time, &sequence_number); if(delta_time != varlength[i][1] || sequence_number != 256){ success = FALSE; break; } /* select 65535 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], sequence_number_65535, 5); ags_midi_buffer_util_get_sequence_number(buffer, &delta_time, &sequence_number); if(delta_time != varlength[i][1] || sequence_number != 65535){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_smtpe() { unsigned char *buffer; unsigned char *smtpe_0_0_0_0 = "\xff\x54\x05\x80\x00\x00\x00"; unsigned char *smtpe_0_0_0_30 = "\xff\x54\x05\x80\x00\x00\x1e"; unsigned char *smtpe_0_0_59_30 = "\xff\x54\x05\x80\x00\x3b\x1e"; unsigned char *smtpe_0_59_59_30 = "\xff\x54\x05\x80\x3b\x3b\x1e"; unsigned char *smtpe_23_59_59_30 = "\xff\x54\x05\x97\x3b\x3b\x1e"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(11 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* smtpe 0 */ ags_midi_buffer_util_put_smtpe(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS, 0, 0, 0, 0); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], smtpe_0_0_0_0, 7)){ success = FALSE; break; } /* smtpe 30 fr */ ags_midi_buffer_util_put_smtpe(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS, 0, 0, 0, 30); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], smtpe_0_0_0_30, 7)){ success = FALSE; break; } /* smtpe 59 s 30 fr */ ags_midi_buffer_util_put_smtpe(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS, 0, 0, 59, 30); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], smtpe_0_0_59_30, 7)){ success = FALSE; break; } /* smtpe 59 m 59 s 30 fr */ ags_midi_buffer_util_put_smtpe(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS, 0, 59, 59, 30); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], smtpe_0_59_59_30, 7)){ success = FALSE; break; } /* smtpe 23 h 59 m 59 s 30 fr */ ags_midi_buffer_util_put_smtpe(buffer, varlength[i][1], AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS, 23, 59, 59, 30); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], smtpe_23_59_59_30, 7)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_smtpe() { unsigned char *buffer; unsigned char *smtpe_0_0_0_0 = "\xff\x54\x05\x80\x00\x00\x00"; unsigned char *smtpe_0_0_0_30 = "\xff\x54\x05\x80\x00\x00\x1e"; unsigned char *smtpe_0_0_59_30 = "\xff\x54\x05\x80\x00\x3b\x1e"; unsigned char *smtpe_0_59_59_30 = "\xff\x54\x05\x80\x3b\x3b\x1e"; unsigned char *smtpe_23_59_59_30 = "\xff\x54\x05\x97\x3b\x3b\x1e"; guint i; glong delta_time, rr, hr, mn, se, fr; gboolean success; buffer = (unsigned char *) malloc(11 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], smtpe_0_0_0_0, 7); ags_midi_buffer_util_get_smtpe(buffer, NULL, NULL, NULL, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* smtpe 0 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], smtpe_0_0_0_0, 7); ags_midi_buffer_util_get_smtpe(buffer, &delta_time, &rr, &hr, &mn, &se, &fr); if(delta_time != varlength[i][1] || rr != AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS || hr != 0 || mn != 0 || se != 0 || fr != 0){ success = FALSE; break; } /* smtpe 30 fr */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], smtpe_0_0_0_30, 7); ags_midi_buffer_util_get_smtpe(buffer, &delta_time, &rr, &hr, &mn, &se, &fr); if(delta_time != varlength[i][1] || rr != AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS || hr != 0 || mn != 0 || se != 0 || fr != 30){ success = FALSE; break; } /* smtpe 59 s 30 fr */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], smtpe_0_0_59_30, 7); ags_midi_buffer_util_get_smtpe(buffer, &delta_time, &rr, &hr, &mn, &se, &fr); if(delta_time != varlength[i][1] || rr != AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS || hr != 0 || mn != 0 || se != 59 || fr != 30){ success = FALSE; break; } /* smtpe 59 m 59 s 30 fr */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], smtpe_0_59_59_30, 7); ags_midi_buffer_util_get_smtpe(buffer, &delta_time, &rr, &hr, &mn, &se, &fr); if(delta_time != varlength[i][1] || rr != AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS || hr != 0 || mn != 59 || se != 59 || fr != 30){ success = FALSE; break; } /* smtpe 23 h 59 m 59 s 30 fr */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], smtpe_23_59_59_30, 7); ags_midi_buffer_util_get_smtpe(buffer, &delta_time, &rr, &hr, &mn, &se, &fr); if(delta_time != varlength[i][1] || rr != AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS || hr != 23 || mn != 59 || se != 59 || fr != 30){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_tempo() { unsigned char *buffer; unsigned char *tempo_0 = "\xff\x51\x03\x00\x00\x00"; unsigned char *tempo_1 = "\xff\x51\x03\x00\x00\x01"; unsigned char *tempo_255 = "\xff\x51\x03\x00\x00\xff"; unsigned char *tempo_256 = "\xff\x51\x03\x00\x01\x00"; unsigned char *tempo_65535 = "\xff\x51\x03\x00\xff\xff"; unsigned char *tempo_65536 = "\xff\x51\x03\x01\x00\x00"; unsigned char *tempo_16777215 = "\xff\x51\x03\xff\xff\xff"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(10 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* tempo 0 */ ags_midi_buffer_util_put_tempo(buffer, varlength[i][1], 0); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], tempo_0, 6)){ success = FALSE; break; } /* tempo 1 */ ags_midi_buffer_util_put_tempo(buffer, varlength[i][1], 1); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], tempo_1, 6)){ success = FALSE; break; } /* tempo 255 */ ags_midi_buffer_util_put_tempo(buffer, varlength[i][1], 255); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], tempo_255, 6)){ success = FALSE; break; } /* tempo 256 */ ags_midi_buffer_util_put_tempo(buffer, varlength[i][1], 256); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], tempo_256, 6)){ success = FALSE; break; } /* tempo 65535 */ ags_midi_buffer_util_put_tempo(buffer, varlength[i][1], 65535); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], tempo_65535, 6)){ success = FALSE; break; } /* tempo 65536 */ ags_midi_buffer_util_put_tempo(buffer, varlength[i][1], 65536); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], tempo_65536, 6)){ success = FALSE; break; } /* tempo 16777215 */ ags_midi_buffer_util_put_tempo(buffer, varlength[i][1], 16777215); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], tempo_16777215, 6)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_tempo() { unsigned char *buffer; unsigned char *tempo_0 = "\xff\x51\x03\x00\x00\x00"; unsigned char *tempo_1 = "\xff\x51\x03\x00\x00\x01"; unsigned char *tempo_255 = "\xff\x51\x03\x00\x00\xff"; unsigned char *tempo_256 = "\xff\x51\x03\x00\x01\x00"; unsigned char *tempo_65535 = "\xff\x51\x03\x00\xff\xff"; unsigned char *tempo_65536 = "\xff\x51\x03\x01\x00\x00"; unsigned char *tempo_16777215 = "\xff\x51\x03\xff\xff\xff"; guint i; glong delta_time, tempo; gboolean success; buffer = (unsigned char *) malloc(10 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], tempo_0, 6); ags_midi_buffer_util_get_tempo(buffer, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* tempo 0 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], tempo_0, 6); ags_midi_buffer_util_get_tempo(buffer, &delta_time, &tempo); if(delta_time != varlength[i][1] || tempo != 0){ success = FALSE; break; } /* tempo 1 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], tempo_1, 6); ags_midi_buffer_util_get_tempo(buffer, &delta_time, &tempo); if(delta_time != varlength[i][1] || tempo != 1){ success = FALSE; break; } /* tempo 255 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], tempo_255, 6); ags_midi_buffer_util_get_tempo(buffer, &delta_time, &tempo); if(delta_time != varlength[i][1] || tempo != 255){ success = FALSE; break; } /* tempo 256 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], tempo_256, 6); ags_midi_buffer_util_get_tempo(buffer, &delta_time, &tempo); if(delta_time != varlength[i][1] || tempo != 256){ success = FALSE; break; } /* tempo 65535 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], tempo_65535, 6); ags_midi_buffer_util_get_tempo(buffer, &delta_time, &tempo); if(delta_time != varlength[i][1] || tempo != 65535){ success = FALSE; break; } /* tempo 65536 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], tempo_65536, 6); ags_midi_buffer_util_get_tempo(buffer, &delta_time, &tempo); if(delta_time != varlength[i][1] || tempo != 65536){ success = FALSE; break; } /* tempo 16777215 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], tempo_16777215, 6); ags_midi_buffer_util_get_tempo(buffer, &delta_time, &tempo); if(delta_time != varlength[i][1] || tempo != 16777215){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_time_signature() { unsigned char *buffer; unsigned char *time_signature_0_0_0_0 = "\xff\x58\x04\x00\x00\x00\x00"; unsigned char *time_signature_1_1_96_8 = "\xff\x58\x04\x01\x01\x60\x08"; unsigned char *time_signature_4_4_24_8 = "\xff\x58\x04\x04\x04\x18\x08"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(11 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* time signature 0 0 0 0 */ ags_midi_buffer_util_put_time_signature(buffer, varlength[i][1], 0, 0, 0, 0); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], time_signature_0_0_0_0, 7)){ success = FALSE; break; } /* time signature 1 1 96 8 */ ags_midi_buffer_util_put_time_signature(buffer, varlength[i][1], 1, 1, 96, 8); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], time_signature_1_1_96_8, 7)){ success = FALSE; break; } /* time signature 4 4 24 8 */ ags_midi_buffer_util_put_time_signature(buffer, varlength[i][1], 4, 4, 24, 8); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], time_signature_4_4_24_8, 7)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_time_signature() { unsigned char *buffer; unsigned char *time_signature_0_0_0_0 = "\xff\x58\x04\x00\x00\x00\x00"; unsigned char *time_signature_1_1_96_8 = "\xff\x58\x04\x01\x01\x60\x08"; unsigned char *time_signature_4_4_24_8 = "\xff\x58\x04\x04\x04\x18\x08"; guint i; glong delta_time, nn, dd, cc, bb; gboolean success; buffer = (unsigned char *) malloc(11 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], time_signature_0_0_0_0, 7); ags_midi_buffer_util_get_time_signature(buffer, NULL, NULL, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* time signature 0 0 0 0 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], time_signature_0_0_0_0, 7); ags_midi_buffer_util_get_time_signature(buffer, &delta_time, &nn, &dd, &cc, &bb); if(delta_time != varlength[i][1] || nn != 0 || dd != 0 || cc != 0 || bb != 0){ success = FALSE; break; } /* time signature 1 1 96 8 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], time_signature_1_1_96_8, 7); ags_midi_buffer_util_get_time_signature(buffer, &delta_time, &nn, &dd, &cc, &bb); if(delta_time != varlength[i][1] || nn != 1 || dd != 1 || cc != 96 || bb != 8){ success = FALSE; break; } /* time signature 4 4 24 8 */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], time_signature_4_4_24_8, 7); ags_midi_buffer_util_get_time_signature(buffer, &delta_time, &nn, &dd, &cc, &bb); if(delta_time != varlength[i][1] || nn != 4 || dd != 4 || cc != 24 || bb != 8){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_key_signature() { unsigned char *buffer; unsigned char *key_signature_3_minor = "\xff\x59\x02\x03\x01"; unsigned char *key_signature_3_major = "\xff\x59\x02\x03\x00"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(9 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* key signature 3 minor */ ags_midi_buffer_util_put_key_signature(buffer, varlength[i][1], 3, 1); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], key_signature_3_minor, 5)){ success = FALSE; break; } /* key signature 3 major */ ags_midi_buffer_util_put_key_signature(buffer, varlength[i][1], 3, 0); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], key_signature_3_major, 5)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_key_signature() { unsigned char *buffer; unsigned char *key_signature_3_minor = "\xff\x59\x02\x03\x01"; unsigned char *key_signature_3_major = "\xff\x59\x02\x03\x00"; guint i; glong delta_time, sharp_flats, is_minor; gboolean success; buffer = (unsigned char *) malloc(10 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], key_signature_3_minor, 5); ags_midi_buffer_util_get_key_signature(buffer, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* key signature 3 minor */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], key_signature_3_minor, 5); ags_midi_buffer_util_get_key_signature(buffer, &delta_time, &sharp_flats, &is_minor); if(delta_time != varlength[i][1] || sharp_flats != 3 || is_minor != 1){ success = FALSE; break; } /* key signature 3 major */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], key_signature_3_major, 5); ags_midi_buffer_util_get_key_signature(buffer, &delta_time, &sharp_flats, &is_minor); if(delta_time != varlength[i][1] || sharp_flats != 3 || is_minor != 0){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_sequencer_meta_event() { //TODO:JK: implement me } void ags_midi_buffer_util_test_get_sequencer_meta_event() { //TODO:JK: implement me } void ags_midi_buffer_util_test_put_text_event() { unsigned char *buffer; unsigned char *text_event_MY_TEXT = "\xff\x01\x07MY TEXT\0"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(14 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* text event */ ags_midi_buffer_util_put_text_event(buffer, varlength[i][1], "MY TEXT\0", 7); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], text_event_MY_TEXT, 10)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_text_event() { unsigned char *buffer; unsigned char *text_event_MY_TEXT = "\xff\x01\x07MY TEXT\0"; guint i; unsigned char *text_event; glong delta_time, length; gboolean success; buffer = (unsigned char *) malloc(14 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], text_event_MY_TEXT, 10); ags_midi_buffer_util_get_text_event(buffer, NULL, NULL, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* text event */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], text_event_MY_TEXT, 10); ags_midi_buffer_util_get_text_event(buffer, &delta_time, &text_event, &length); if(delta_time != varlength[i][1] || memcmp(text_event, "MY TEXT\0", 7) || length != 7){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_end_of_track() { unsigned char *buffer; unsigned char *end_of_track = "\xff\x2f\x00\0"; guint i; gboolean success; /* test different delta-time */ success = TRUE; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); for(i = 0; i < 12; i++){ /* text event */ ags_midi_buffer_util_put_end_of_track(buffer, varlength[i][1]); if(memcmp(buffer, varlength_buffer[i], varlength[i][2]) || memcmp(buffer + varlength[i][2], end_of_track, 3)){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_get_end_of_track() { unsigned char *buffer; unsigned char *end_of_track = "\xff\x2f\x00\0"; guint i; glong delta_time; gboolean success; buffer = (unsigned char *) malloc(7 * sizeof(unsigned char)); /* invoke without return location */ memcpy(buffer, varlength_buffer[0], varlength[0][2]); memcpy(buffer + varlength[0][2], end_of_track, 3); ags_midi_buffer_util_get_end_of_track(buffer, NULL); /* test different delta-time */ success = TRUE; for(i = 0; i < 12; i++){ /* text event */ memcpy(buffer, varlength_buffer[i], varlength[i][2]); memcpy(buffer + varlength[i][2], end_of_track, 3); ags_midi_buffer_util_get_end_of_track(buffer, &delta_time); if(delta_time != varlength[i][1]){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_midi_buffer_util_test_put_seek_message() { //TODO:JK: implement me } void ags_midi_buffer_util_test_decode() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsMidiBufferUtilTest\0", ags_midi_buffer_util_test_init_suite, ags_midi_buffer_util_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of ags_midi_buffer_util.c get varlength size\0", ags_midi_buffer_util_test_get_varlength_size) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put varlength\0", ags_midi_buffer_util_test_put_varlength) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get varlength\0", ags_midi_buffer_util_test_get_varlength) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put int16\0", ags_midi_buffer_util_test_put_int16) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get int16\0", ags_midi_buffer_util_test_get_int16) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put int24\0", ags_midi_buffer_util_test_put_int24) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get int24\0", ags_midi_buffer_util_test_get_int24) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put int32\0", ags_midi_buffer_util_test_put_int32) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get int32\0", ags_midi_buffer_util_test_get_int32) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put header\0", ags_midi_buffer_util_test_put_header) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get header\0", ags_midi_buffer_util_test_get_header) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put track\0", ags_midi_buffer_util_test_put_track) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get track\0", ags_midi_buffer_util_test_get_track) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put key on\0", ags_midi_buffer_util_test_put_key_on) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get key on\0", ags_midi_buffer_util_test_get_key_on) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put key off\0", ags_midi_buffer_util_test_put_key_off) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get key off\0", ags_midi_buffer_util_test_get_key_off) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put key pressure\0", ags_midi_buffer_util_test_put_key_pressure) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get key pressure\0", ags_midi_buffer_util_test_get_key_pressure) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put change parameter\0", ags_midi_buffer_util_test_put_change_parameter) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get change parameter\0", ags_midi_buffer_util_test_get_change_parameter) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put change pitch bend\0", ags_midi_buffer_util_test_put_pitch_bend) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get change pitch bend\0", ags_midi_buffer_util_test_get_pitch_bend) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put change program\0", ags_midi_buffer_util_test_put_change_program) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get change program\0", ags_midi_buffer_util_test_get_change_program) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put change pressure\0", ags_midi_buffer_util_test_put_change_pressure) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get change pressure\0", ags_midi_buffer_util_test_get_change_pressure) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put sysex\0", ags_midi_buffer_util_test_put_sysex) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get sysex\0", ags_midi_buffer_util_test_get_sysex) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put quarter frame\0", ags_midi_buffer_util_test_put_quarter_frame) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get quarter frame\0", ags_midi_buffer_util_test_get_quarter_frame) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put song position\0", ags_midi_buffer_util_test_put_song_position) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get song position\0", ags_midi_buffer_util_test_get_song_position) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put song select\0", ags_midi_buffer_util_test_put_song_select) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get song select\0", ags_midi_buffer_util_test_get_song_select) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put tune request\0", ags_midi_buffer_util_test_put_tune_request) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get tune request\0", ags_midi_buffer_util_test_get_tune_request) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put sequence number\0", ags_midi_buffer_util_test_put_sequence_number) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get sequence number\0", ags_midi_buffer_util_test_get_sequence_number) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put smtpe\0", ags_midi_buffer_util_test_put_smtpe) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get smtpe\0", ags_midi_buffer_util_test_get_smtpe) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put tempo\0", ags_midi_buffer_util_test_put_tempo) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get tempo\0", ags_midi_buffer_util_test_get_tempo) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put time signature\0", ags_midi_buffer_util_test_put_time_signature) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get time signature\0", ags_midi_buffer_util_test_get_time_signature) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put key signature\0", ags_midi_buffer_util_test_put_key_signature) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get key signature\0", ags_midi_buffer_util_test_get_key_signature) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put sequencer meta event\0", ags_midi_buffer_util_test_put_sequencer_meta_event) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get sequencer meta event\0", ags_midi_buffer_util_test_get_sequencer_meta_event) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put text event\0", ags_midi_buffer_util_test_put_text_event) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get text event\0", ags_midi_buffer_util_test_get_text_event) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c put end of track\0", ags_midi_buffer_util_test_put_end_of_track) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c get end of track\0", ags_midi_buffer_util_test_get_end_of_track) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c seek message\0", ags_midi_buffer_util_test_put_seek_message) == NULL) || (CU_add_test(pSuite, "test of ags_midi_buffer_util.c decode\0", ags_midi_buffer_util_test_decode) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/midi/ags_midi_builder_test.c0000644000175000017500000007315713246707333021152 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_midi_builder_test_init_suite(); int ags_midi_builder_test_clean_suite(); AgsMidiBuilder* ags_midi_builder_test_create_default(guint n_tracks); void ags_midi_builder_test_append_header(); void ags_midi_builder_test_append_track(); void ags_midi_builder_test_append_key_on(); void ags_midi_builder_test_append_key_off(); void ags_midi_builder_test_append_key_pressure(); void ags_midi_builder_test_append_change_parameter(); void ags_midi_builder_test_append_change_pitch_bend(); void ags_midi_builder_test_append_change_program(); void ags_midi_builder_test_append_change_pressure(); void ags_midi_builder_test_append_sysex(); void ags_midi_builder_test_append_quarter_frame(); void ags_midi_builder_test_append_song_position(); void ags_midi_builder_test_append_song_select(); void ags_midi_builder_test_append_tune_request(); void ags_midi_builder_test_append_sequence_number(); void ags_midi_builder_test_append_smtpe(); void ags_midi_builder_test_append_time_signature(); void ags_midi_builder_test_append_key_signature(); void ags_midi_builder_test_append_sequencer_meta_event(); void ags_midi_builder_test_append_text_event(); #define AGS_MIDI_BUILDER_TEST_DEFAULT_SEQUENCE_PREFIX "ags-sequence-\0" #define AGS_MIDI_BUILDER_TEST_DEFAULT_FORMAT (1) #define AGS_MIDI_BUILDER_TEST_DEFAULT_TRACK_COUNT (0) #define AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION (0xe250) #define AGS_MIDI_BUILDER_TEST_DEFAULT_TIMES (30) #define AGS_MIDI_BUILDER_TEST_DEFAULT_BPM (120) #define AGS_MIDI_BUILDER_TEST_DEFAULT_CLICKS (4) #define AGS_MIDI_BUILDER_TEST_APPEND_HEADER_FORMAT (1) #define AGS_MIDI_BUILDER_TEST_APPEND_HEADER_TRACK_COUNT (0) #define AGS_MIDI_BUILDER_TEST_APPEND_HEADER_DIVISION (0xe250) #define AGS_MIDI_BUILDER_TEST_APPEND_HEADER_TIMES (30) #define AGS_MIDI_BUILDER_TEST_APPEND_HEADER_BPM (120) #define AGS_MIDI_BUILDER_TEST_APPEND_HEADER_CLICKS (4) #define AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_0 "ags-sequence-0\0" #define AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_1 "ags-sequence-1\0" #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_TRACK_COUNT (7) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_NOTE_COUNT (64) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_PULSE_UNIT (16.0 * AGS_MIDI_BUILDER_TEST_DEFAULT_BPM / 60.0 * 1.0 / (AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION >> 8) / (0xff & AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION) * 1000000.0) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_CHANNEL (0) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_VELOCITY (127) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_TRACK_COUNT (7) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_NOTE_COUNT (64) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_PULSE_UNIT (16.0 * AGS_MIDI_BUILDER_TEST_DEFAULT_BPM / 60.0 * 1.0 / (AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION >> 8) / (0xff & AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION) * 1000000.0) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_CHANNEL (0) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_VELOCITY (127) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_TRACK_COUNT (7) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_NOTE_COUNT (64) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_PULSE_UNIT (16.0 * AGS_MIDI_BUILDER_TEST_DEFAULT_BPM / 60.0 * 1.0 / (AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION >> 8) / (0xff & AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION) * 1000000.0) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_CHANNEL (0) #define AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_VELOCITY (127) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_TRACK_COUNT (7) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_CONTROL_COUNT (64) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_PULSE_UNIT (16.0 * AGS_MIDI_BUILDER_TEST_DEFAULT_BPM / 60.0 * 1.0 / (AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION >> 8) / (0xff & AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION) * 1000000.0) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_CHANNEL (0) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_VALUE (127) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_TRACK_COUNT (7) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_PITCH_COUNT (64) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_PULSE_UNIT (16.0 * AGS_MIDI_BUILDER_TEST_DEFAULT_BPM / 60.0 * 1.0 / (AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION >> 8) / (0xff & AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION) * 1000000.0) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_CHANNEL (0) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_TRANSMITTER (127) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_TRACK_COUNT (7) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_PROGRAM_COUNT (64) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_PULSE_UNIT (16.0 * AGS_MIDI_BUILDER_TEST_DEFAULT_BPM / 60.0 * 1.0 / (AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION >> 8) / (0xff & AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION) * 1000000.0) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_CHANNEL (0) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_TRACK_COUNT (7) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_PRESSURE_COUNT (64) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_PULSE_UNIT (16.0 * AGS_MIDI_BUILDER_TEST_DEFAULT_BPM / 60.0 * 1.0 / (AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION >> 8) / (0xff & AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION) * 1000000.0) #define AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_CHANNEL (0) /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_midi_builder_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_midi_builder_test_clean_suite() { return(0); } AgsMidiBuilder* ags_midi_builder_test_create_default(guint n_tracks) { AgsMidiBuilder *midi_builder; gchar *str; guint i; midi_builder = ags_midi_builder_new(NULL); /* default header */ ags_midi_builder_append_header(midi_builder, 6, AGS_MIDI_BUILDER_TEST_DEFAULT_FORMAT, n_tracks, AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION, AGS_MIDI_BUILDER_TEST_DEFAULT_TIMES, AGS_MIDI_BUILDER_TEST_DEFAULT_BPM, AGS_MIDI_BUILDER_TEST_DEFAULT_CLICKS); for(i = 0; i < n_tracks; i++){ str = g_strdup_printf("%s%d\0", AGS_MIDI_BUILDER_TEST_DEFAULT_SEQUENCE_PREFIX, i); ags_midi_builder_append_track(midi_builder, str); free(str); } midi_builder->current_midi_track = midi_builder->midi_track->data; return(midi_builder); } void ags_midi_builder_test_append_header() { AgsMidiBuilder *midi_builder; glong offset, format; glong track_count, division; midi_builder = ags_midi_builder_new(NULL); /* append header */ ags_midi_builder_append_header(midi_builder, 6, AGS_MIDI_BUILDER_TEST_APPEND_HEADER_FORMAT, AGS_MIDI_BUILDER_TEST_APPEND_HEADER_TRACK_COUNT, AGS_MIDI_BUILDER_TEST_APPEND_HEADER_DIVISION, AGS_MIDI_BUILDER_TEST_APPEND_HEADER_TIMES, AGS_MIDI_BUILDER_TEST_APPEND_HEADER_BPM, AGS_MIDI_BUILDER_TEST_APPEND_HEADER_CLICKS); /* assert struct present */ CU_ASSERT(midi_builder->midi_header != NULL); CU_ASSERT(midi_builder->midi_header->offset == 6); CU_ASSERT(midi_builder->midi_header->format == AGS_MIDI_BUILDER_TEST_APPEND_HEADER_FORMAT); CU_ASSERT(midi_builder->midi_header->count == AGS_MIDI_BUILDER_TEST_APPEND_HEADER_TRACK_COUNT); CU_ASSERT(midi_builder->midi_header->division == AGS_MIDI_BUILDER_TEST_APPEND_HEADER_DIVISION); CU_ASSERT(midi_builder->midi_header->times == AGS_MIDI_BUILDER_TEST_APPEND_HEADER_TIMES); CU_ASSERT(midi_builder->midi_header->beat == AGS_MIDI_BUILDER_TEST_APPEND_HEADER_BPM); CU_ASSERT(midi_builder->midi_header->clicks == AGS_MIDI_BUILDER_TEST_APPEND_HEADER_CLICKS); /* build */ ags_midi_builder_build(midi_builder); CU_ASSERT(midi_builder->data != NULL); CU_ASSERT(midi_builder->length == 14); /* assert data */ ags_midi_buffer_util_get_header(midi_builder->data, &offset, &format, &track_count, &division); CU_ASSERT(offset == 6); CU_ASSERT(format == AGS_MIDI_BUILDER_TEST_APPEND_HEADER_FORMAT); CU_ASSERT(track_count == AGS_MIDI_BUILDER_TEST_APPEND_HEADER_TRACK_COUNT); CU_ASSERT(division == AGS_MIDI_BUILDER_TEST_APPEND_HEADER_DIVISION); } void ags_midi_builder_test_append_track() { AgsMidiBuilder *midi_builder; unsigned char *offset; gchar *text; guint length; glong delta_time; glong text_length; midi_builder = ags_midi_builder_new(NULL); /* default header */ ags_midi_builder_append_header(midi_builder, 6, AGS_MIDI_BUILDER_TEST_DEFAULT_FORMAT, AGS_MIDI_BUILDER_TEST_DEFAULT_TRACK_COUNT, AGS_MIDI_BUILDER_TEST_DEFAULT_DIVISION, AGS_MIDI_BUILDER_TEST_DEFAULT_TIMES, AGS_MIDI_BUILDER_TEST_DEFAULT_BPM, AGS_MIDI_BUILDER_TEST_DEFAULT_CLICKS); /* add track 0 */ ags_midi_builder_append_track(midi_builder, AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_0); CU_ASSERT(g_list_length(midi_builder->midi_track) == 1); CU_ASSERT(strcmp(midi_builder->current_midi_track->track_name, AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_0) == 0); /* add track 1 */ ags_midi_builder_append_track(midi_builder, AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_1); CU_ASSERT(g_list_length(midi_builder->midi_track) == 2); CU_ASSERT(strcmp(midi_builder->current_midi_track->track_name, AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_1) == 0); /* build */ ags_midi_builder_build(midi_builder); length = (14 + (2 * (4 + 4 + 1 + 3)) + (2 * (1 + 3)) + strlen(AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_0) + strlen(AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_1)); CU_ASSERT(midi_builder->data != NULL); CU_ASSERT(midi_builder->length == length); /* assert sequence 0 */ offset = midi_builder->data; offset += (14 + 8); ags_midi_buffer_util_get_text_event(offset, &delta_time, &text, &text_length); CU_ASSERT(delta_time == 0); CU_ASSERT(text != NULL && strncmp(text, AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_0, strlen(AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_0)) == 0); CU_ASSERT(text_length == strlen(AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_0)); /* assert sequence 1 */ offset += ((4 + 4 + 1 + 3) + (1 + 3) + strlen(AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_0)); ags_midi_buffer_util_get_text_event(offset, &delta_time, &text, &text_length); CU_ASSERT(delta_time == 0); CU_ASSERT(text != NULL && strncmp(text, AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_1, strlen(AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_0)) == 0); CU_ASSERT(text_length == strlen(AGS_MIDI_BUILDER_TEST_APPEND_TRACK_SEQUENCE_1)); } void ags_midi_builder_test_append_key_on() { AgsMidiBuilder *midi_builder; GList *current_midi_track; unsigned char *offset; guint keys[AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_TRACK_COUNT][AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_NOTE_COUNT]; guint ret_size; glong delta_time; glong channel; glong key; glong velocity; guint i, j; gboolean success; midi_builder = ags_midi_builder_test_create_default(AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_TRACK_COUNT); current_midi_track = midi_builder->midi_track; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_TRACK_COUNT; i++){ midi_builder->current_midi_track = current_midi_track->data; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_NOTE_COUNT; j++){ keys[i][j] = rand() % 128; ags_midi_builder_append_key_on(midi_builder, AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_PULSE_UNIT, AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_CHANNEL, keys[i][j], AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_VELOCITY); } current_midi_track = current_midi_track->next; } /* build */ ags_midi_builder_build(midi_builder); /* assert */ offset = midi_builder->data; offset += 14; success = TRUE; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_TRACK_COUNT; i++){ offset += 8; ret_size = ags_midi_buffer_util_get_text_event(offset, &delta_time, NULL, NULL); if(delta_time != 0){ success = FALSE; break; } offset += ret_size; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_KEY_ON_NOTE_COUNT; j++){ ret_size = ags_midi_buffer_util_get_key_on(offset, &delta_time, &channel, &key, &velocity); if(key != keys[i][j]){ success = FALSE; break; } offset += ret_size; } ret_size = ags_midi_buffer_util_get_end_of_track(offset, NULL); offset += ret_size; } CU_ASSERT(success == TRUE); } void ags_midi_builder_test_append_key_off() { AgsMidiBuilder *midi_builder; GList *current_midi_track; unsigned char *offset; guint keys[AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_TRACK_COUNT][AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_NOTE_COUNT]; guint ret_size; glong delta_time; glong channel; glong key; glong velocity; guint i, j; gboolean success; midi_builder = ags_midi_builder_test_create_default(AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_TRACK_COUNT); current_midi_track = midi_builder->midi_track; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_TRACK_COUNT; i++){ midi_builder->current_midi_track = current_midi_track->data; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_NOTE_COUNT; j++){ keys[i][j] = rand() % 128; ags_midi_builder_append_key_off(midi_builder, AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_PULSE_UNIT, AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_CHANNEL, keys[i][j], AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_VELOCITY); } current_midi_track = current_midi_track->next; } /* build */ ags_midi_builder_build(midi_builder); /* assert */ offset = midi_builder->data; offset += 14; success = TRUE; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_TRACK_COUNT; i++){ offset += 8; ret_size = ags_midi_buffer_util_get_text_event(offset, &delta_time, NULL, NULL); if(delta_time != 0){ success = FALSE; break; } offset += ret_size; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_KEY_OFF_NOTE_COUNT; j++){ ret_size = ags_midi_buffer_util_get_key_off(offset, &delta_time, &channel, &key, &velocity); if(key != keys[i][j]){ success = FALSE; break; } offset += ret_size; } ret_size = ags_midi_buffer_util_get_end_of_track(offset, NULL); offset += ret_size; } CU_ASSERT(success == TRUE); } void ags_midi_builder_test_append_key_pressure() { AgsMidiBuilder *midi_builder; GList *current_midi_track; unsigned char *offset; guint keys[AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_TRACK_COUNT][AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_NOTE_COUNT]; guint ret_size; glong delta_time; glong channel; glong key; glong velocity; guint i, j; gboolean success; midi_builder = ags_midi_builder_test_create_default(AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_TRACK_COUNT); current_midi_track = midi_builder->midi_track; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_TRACK_COUNT; i++){ midi_builder->current_midi_track = current_midi_track->data; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_NOTE_COUNT; j++){ keys[i][j] = rand() % 128; ags_midi_builder_append_key_pressure(midi_builder, AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_PULSE_UNIT, AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_CHANNEL, keys[i][j], AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_VELOCITY); } current_midi_track = current_midi_track->next; } /* build */ ags_midi_builder_build(midi_builder); /* assert */ offset = midi_builder->data; offset += 14; success = TRUE; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_TRACK_COUNT; i++){ offset += 8; ret_size = ags_midi_buffer_util_get_text_event(offset, &delta_time, NULL, NULL); if(delta_time != 0){ success = FALSE; break; } offset += ret_size; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_KEY_PRESSURE_NOTE_COUNT; j++){ ret_size = ags_midi_buffer_util_get_key_pressure(offset, &delta_time, &channel, &key, &velocity); if(key != keys[i][j]){ success = FALSE; break; } offset += ret_size; } ret_size = ags_midi_buffer_util_get_end_of_track(offset, NULL); offset += ret_size; } CU_ASSERT(success == TRUE); } void ags_midi_builder_test_append_change_parameter() { AgsMidiBuilder *midi_builder; GList *current_midi_track; unsigned char *offset; guint controls[AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_TRACK_COUNT][AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_CONTROL_COUNT]; guint ret_size; glong delta_time; glong channel; glong control; glong value; guint i, j; gboolean success; midi_builder = ags_midi_builder_test_create_default(AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_TRACK_COUNT); current_midi_track = midi_builder->midi_track; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_TRACK_COUNT; i++){ midi_builder->current_midi_track = current_midi_track->data; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_CONTROL_COUNT; j++){ controls[i][j] = rand() % 128; ags_midi_builder_append_change_parameter(midi_builder, AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_PULSE_UNIT, AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_CHANNEL, controls[i][j], AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_VALUE); } current_midi_track = current_midi_track->next; } /* build */ ags_midi_builder_build(midi_builder); /* assert */ offset = midi_builder->data; offset += 14; success = TRUE; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_TRACK_COUNT; i++){ offset += 8; ret_size = ags_midi_buffer_util_get_text_event(offset, &delta_time, NULL, NULL); if(delta_time != 0){ success = FALSE; break; } offset += ret_size; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PARAMETER_CONTROL_COUNT; j++){ ret_size = ags_midi_buffer_util_get_change_parameter(offset, &delta_time, &channel, &control, &value); if(control != controls[i][j]){ success = FALSE; break; } offset += ret_size; } ret_size = ags_midi_buffer_util_get_end_of_track(offset, NULL); offset += ret_size; } CU_ASSERT(success == TRUE); } void ags_midi_builder_test_append_change_pitch_bend() { AgsMidiBuilder *midi_builder; GList *current_midi_track; unsigned char *offset; guint pitchs[AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_TRACK_COUNT][AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_PITCH_COUNT]; guint ret_size; glong delta_time; glong channel; glong pitch; glong transmitter; guint i, j; gboolean success; midi_builder = ags_midi_builder_test_create_default(AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_TRACK_COUNT); current_midi_track = midi_builder->midi_track; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_TRACK_COUNT; i++){ midi_builder->current_midi_track = current_midi_track->data; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_PITCH_COUNT; j++){ pitchs[i][j] = rand() % 128; ags_midi_builder_append_change_pitch_bend(midi_builder, AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_PULSE_UNIT, AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_CHANNEL, pitchs[i][j], AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_TRANSMITTER); } current_midi_track = current_midi_track->next; } /* build */ ags_midi_builder_build(midi_builder); /* assert */ offset = midi_builder->data; offset += 14; success = TRUE; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_TRACK_COUNT; i++){ offset += 8; ret_size = ags_midi_buffer_util_get_text_event(offset, &delta_time, NULL, NULL); if(delta_time != 0){ success = FALSE; break; } offset += ret_size; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PITCH_BEND_PITCH_COUNT; j++){ ret_size = ags_midi_buffer_util_get_pitch_bend(offset, &delta_time, &channel, &pitch, &transmitter); if(pitch != pitchs[i][j]){ success = FALSE; break; } offset += ret_size; } ret_size = ags_midi_buffer_util_get_end_of_track(offset, NULL); offset += ret_size; } CU_ASSERT(success == TRUE); } void ags_midi_builder_test_append_change_program() { AgsMidiBuilder *midi_builder; GList *current_midi_track; unsigned char *offset; guint programs[AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_TRACK_COUNT][AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_PROGRAM_COUNT]; guint ret_size; glong delta_time; glong channel; glong program; guint i, j; gboolean success; midi_builder = ags_midi_builder_test_create_default(AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_TRACK_COUNT); current_midi_track = midi_builder->midi_track; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_TRACK_COUNT; i++){ midi_builder->current_midi_track = current_midi_track->data; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_PROGRAM_COUNT; j++){ programs[i][j] = rand() % 128; ags_midi_builder_append_change_program(midi_builder, AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_PULSE_UNIT, AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_CHANNEL, programs[i][j]); } current_midi_track = current_midi_track->next; } /* build */ ags_midi_builder_build(midi_builder); /* assert */ offset = midi_builder->data; offset += 14; success = TRUE; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_TRACK_COUNT; i++){ offset += 8; ret_size = ags_midi_buffer_util_get_text_event(offset, &delta_time, NULL, NULL); if(delta_time != 0){ success = FALSE; break; } offset += ret_size; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PROGRAM_PROGRAM_COUNT; j++){ ret_size = ags_midi_buffer_util_get_change_program(offset, &delta_time, &channel, &program); if(program != programs[i][j]){ success = FALSE; break; } offset += ret_size; } ret_size = ags_midi_buffer_util_get_end_of_track(offset, NULL); offset += ret_size; } CU_ASSERT(success == TRUE); } void ags_midi_builder_test_append_change_pressure() { AgsMidiBuilder *midi_builder; GList *current_midi_track; unsigned char *offset; guint pressures[AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_TRACK_COUNT][AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_PRESSURE_COUNT]; guint ret_size; glong delta_time; glong channel; glong pressure; guint i, j; gboolean success; midi_builder = ags_midi_builder_test_create_default(AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_TRACK_COUNT); current_midi_track = midi_builder->midi_track; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_TRACK_COUNT; i++){ midi_builder->current_midi_track = current_midi_track->data; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_PRESSURE_COUNT; j++){ pressures[i][j] = rand() % 128; ags_midi_builder_append_change_pressure(midi_builder, AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_PULSE_UNIT, AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_CHANNEL, pressures[i][j]); } current_midi_track = current_midi_track->next; } /* build */ ags_midi_builder_build(midi_builder); /* assert */ offset = midi_builder->data; offset += 14; success = TRUE; for(i = 0; i < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_TRACK_COUNT; i++){ offset += 8; ret_size = ags_midi_buffer_util_get_text_event(offset, &delta_time, NULL, NULL); if(delta_time != 0){ success = FALSE; break; } offset += ret_size; for(j = 0; j < AGS_MIDI_BUILDER_TEST_APPEND_CHANGE_PRESSURE_PRESSURE_COUNT; j++){ ret_size = ags_midi_buffer_util_get_change_pressure(offset, &delta_time, &channel, &pressure); if(pressure != pressures[i][j]){ success = FALSE; break; } offset += ret_size; } ret_size = ags_midi_buffer_util_get_end_of_track(offset, NULL); offset += ret_size; } CU_ASSERT(success == TRUE); } void ags_midi_builder_test_append_sysex() { //TODO:JK: implement me } void ags_midi_builder_test_append_quarter_frame() { //TODO:JK: implement me } void ags_midi_builder_test_append_song_position() { //TODO:JK: implement me } void ags_midi_builder_test_append_song_select() { //TODO:JK: implement me } void ags_midi_builder_test_append_tune_request() { //TODO:JK: implement me } void ags_midi_builder_test_append_sequence_number() { //TODO:JK: implement me } void ags_midi_builder_test_append_smtpe() { //TODO:JK: implement me } void ags_midi_builder_test_append_time_signature() { //TODO:JK: implement me } void ags_midi_builder_test_append_key_signature() { //TODO:JK: implement me } void ags_midi_builder_test_append_sequencer_meta_event() { //TODO:JK: implement me } void ags_midi_builder_test_append_text_event() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsMidiBuilderTest\0", ags_midi_builder_test_init_suite, ags_midi_builder_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsMidiBuilder to append header\0", ags_midi_builder_test_append_header) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append track\0", ags_midi_builder_test_append_track) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append key on\0", ags_midi_builder_test_append_key_on) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append key off\0", ags_midi_builder_test_append_key_off) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append key pressure\0", ags_midi_builder_test_append_key_pressure) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append change parameter\0", ags_midi_builder_test_append_change_parameter) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append change pitch bend\0", ags_midi_builder_test_append_change_pitch_bend) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append change program\0", ags_midi_builder_test_append_change_program) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append change pressure\0", ags_midi_builder_test_append_change_pressure) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append sysex\0", ags_midi_builder_test_append_sysex) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append quarter frame\0", ags_midi_builder_test_append_quarter_frame) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append song position\0", ags_midi_builder_test_append_song_position) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append song select\0", ags_midi_builder_test_append_song_select) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append tune request\0", ags_midi_builder_test_append_tune_request) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append sequence number\0", ags_midi_builder_test_append_sequence_number) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append smtpe\0", ags_midi_builder_test_append_smtpe) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append time signature\0", ags_midi_builder_test_append_time_signature) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append key signature\0", ags_midi_builder_test_append_key_signature) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append sequencer meta event\0", ags_midi_builder_test_append_sequencer_meta_event) == NULL) || (CU_add_test(pSuite, "test of AgsMidiBuilder to append text event\0", ags_midi_builder_test_append_text_event) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_recall_test.c0000644000175000017500000006336313246707333017040 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include int ags_recall_test_init_suite(); int ags_recall_test_clean_suite(); void ags_recall_test_resolve_dependencies(); void ags_recall_test_child_added(); void ags_recall_test_run_init_pre(); void ags_recall_test_run_init_inter(); void ags_recall_test_run_init_post(); void ags_recall_test_stop_persistent(); void ags_recall_test_done(); void ags_recall_test_cancel(); void ags_recall_test_remove(); void ags_recall_test_is_done(); void ags_recall_test_duplicate(); void ags_recall_test_set_recall_id(); void ags_recall_test_notify_dependency(); void ags_recall_test_add_dependency(); void ags_recall_test_remove_dependency(); void ags_recall_test_get_dependencies(); void ags_recall_test_remove_child(); void ags_recall_test_add_child(); void ags_recall_test_get_children(); void ags_recall_test_get_by_effect(); void ags_recall_test_find_recall_id_with_effect(); void ags_recall_test_find_type(); void ags_recall_test_find_template(); void ags_recall_test_template_find_type(); void ags_recall_test_template_find_all_type(); void ags_recall_test_find_type_with_recycling_context(); void ags_recall_test_find_recycling_context(); void ags_recall_test_find_provider(); void ags_recall_test_template_find_provider(); void ags_recall_test_find_provider_with_recycling_context(); void ags_recall_test_run_init(); void ags_recall_test_add_handler(); void ags_recall_test_remove_handler(); void ags_recall_test_lock_port(); void ags_recall_test_unlock_port(); void ags_recall_test_callback(AgsRecall *recall, gpointer data); void ags_recall_test_child_added_callback(AgsRecall *recall, AgsRecall *child, gpointer data); AgsRecall* ags_recall_test_duplicate_callback(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter, gpointer data); #define AGS_RECALL_RUN_INIT_PRE_N_CHILDREN (4) #define AGS_RECALL_RUN_INIT_INTER_N_CHILDREN (4) #define AGS_RECALL_RUN_INIT_POST_N_CHILDREN (4) #define AGS_RECALL_RUN_PRE_N_CHILDREN (4) #define AGS_RECALL_RUN_INTER_N_CHILDREN (4) #define AGS_RECALL_RUN_POST_N_CHILDREN (4) #define AGS_RECALL_TEST_IS_DONE_RECYCLING_CONTEXT_COUNT (2) #define AGS_RECALL_TEST_IS_DONE_RECALL_COUNT (16) #define AGS_RECALL_TEST_DUPLICATE_TEMPLATE_COUNT (5) #define AGS_RECALL_TEST_DUPLICATE_RECALL_ID_COUNT (2) #define AGS_RECALL_TEST_SET_RECALL_ID_CHILDREN_COUNT (16) #define AGS_RECALL_TEST_REMOVE_CHILD_CHILDREN_COUNT (16) #define AGS_RECALL_TEST_ADD_CHILD_CHILDREN_COUNT (16) #define AGS_RECALL_TEST_GET_CHILDREN_CHILDREN_COUNT (16) #define AGS_RECALL_TEST_GET_BY_EFFECT_RECALL_COUNT (4) #define AGS_RECALL_TEST_GET_BY_EFFECT_LADSPA_RECALL_COUNT (16) AgsDevout *devout; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_test_init_suite() { devout = g_object_new(AGS_TYPE_DEVOUT, NULL); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_test_clean_suite() { g_object_unref(devout); return(0); } void ags_recall_test_callback(AgsRecall *recall, gpointer data) { *((guint *) data) += 1; } void ags_recall_test_resolve_dependencies() { AgsRecall *recall; guint data; /* create recall */ recall = ags_recall_new(); g_signal_connect(G_OBJECT(recall), "resolve-dependencies\0", G_CALLBACK(ags_recall_test_callback), &data); /* assert callback invoked */ data = 0; ags_recall_resolve_dependencies(recall); CU_ASSERT(data == 1); } void ags_recall_test_child_added_callback(AgsRecall *recall, AgsRecall *child, gpointer data) { *((guint *) data) += 1; } void ags_recall_test_child_added() { AgsRecall *recall; guint data; /* create recall */ recall = ags_recall_new(); g_signal_connect(G_OBJECT(recall), "child-added\0", G_CALLBACK(ags_recall_test_child_added_callback), &data); /* assert callback invoked */ data = 0; ags_recall_child_added(recall, NULL); CU_ASSERT(data == 1); } void ags_recall_test_run_init_pre() { AgsRecall *recall; AgsRecall **child; guint data; guint i; recall = ags_recall_new(); g_signal_connect(G_OBJECT(recall), "run-init-pre\0", G_CALLBACK(ags_recall_test_callback), &data); child = (AgsRecall **) malloc(AGS_RECALL_RUN_INIT_PRE_N_CHILDREN * sizeof(AgsRecall *)); for(i = 0; i < AGS_RECALL_RUN_INIT_PRE_N_CHILDREN; i++){ child[i] = ags_recall_new(); ags_recall_add_child(recall, child[i]); g_signal_connect(G_OBJECT(child[i]), "run-init-pre\0", G_CALLBACK(ags_recall_test_callback), &data); } /* assert callback invoked */ data = 0; ags_recall_run_init_pre(recall); CU_ASSERT(data == (AGS_RECALL_RUN_INIT_PRE_N_CHILDREN + 1)); } void ags_recall_test_run_init_inter() { AgsRecall *recall; AgsRecall **child; guint data; guint i; recall = ags_recall_new(); g_signal_connect(G_OBJECT(recall), "run-init-inter\0", G_CALLBACK(ags_recall_test_callback), &data); child = (AgsRecall **) malloc(AGS_RECALL_RUN_INIT_INTER_N_CHILDREN * sizeof(AgsRecall *)); for(i = 0; i < AGS_RECALL_RUN_INIT_INTER_N_CHILDREN; i++){ child[i] = ags_recall_new(); ags_recall_add_child(recall, child[i]); g_signal_connect(G_OBJECT(child[i]), "run-init-inter\0", G_CALLBACK(ags_recall_test_callback), &data); } /* assert callback invoked */ data = 0; ags_recall_run_init_inter(recall); CU_ASSERT(data == (AGS_RECALL_RUN_INIT_INTER_N_CHILDREN + 1)); } void ags_recall_test_run_init_post() { AgsRecall *recall; AgsRecall **child; guint data; guint i; recall = ags_recall_new(); g_signal_connect(G_OBJECT(recall), "run-init-post\0", G_CALLBACK(ags_recall_test_callback), &data); child = (AgsRecall **) malloc(AGS_RECALL_RUN_INIT_POST_N_CHILDREN * sizeof(AgsRecall *)); for(i = 0; i < AGS_RECALL_RUN_INIT_POST_N_CHILDREN; i++){ child[i] = ags_recall_new(); ags_recall_add_child(recall, child[i]); g_signal_connect(G_OBJECT(child[i]), "run-init-post\0", G_CALLBACK(ags_recall_test_callback), &data); } /* assert callback invoked */ data = 0; ags_recall_run_init_post(recall); CU_ASSERT(data == (AGS_RECALL_RUN_INIT_POST_N_CHILDREN + 1)); } void ags_recall_test_stop_persistent() { AgsRecall *recall; guint data; /* playback */ recall = ags_recall_new(); recall->flags |= (AGS_RECALL_PERSISTENT | AGS_RECALL_PERSISTENT_PLAYBACK); g_signal_connect(G_OBJECT(recall), "done\0", G_CALLBACK(ags_recall_test_callback), &data); /* assert callback invoked */ data = 0; ags_recall_stop_persistent(recall); CU_ASSERT(((AGS_RECALL_PERSISTENT & (recall->flags)) == 0) && ((AGS_RECALL_PERSISTENT_PLAYBACK & (recall->flags)) == 0) && data == 1); /* sequencer */ recall = ags_recall_new(); recall->flags |= (AGS_RECALL_PERSISTENT | AGS_RECALL_PERSISTENT_SEQUENCER); g_signal_connect(G_OBJECT(recall), "done\0", G_CALLBACK(ags_recall_test_callback), &data); /* assert callback invoked */ data = 0; ags_recall_stop_persistent(recall); CU_ASSERT(((AGS_RECALL_PERSISTENT & (recall->flags)) == 0) && ((AGS_RECALL_PERSISTENT_SEQUENCER & (recall->flags)) == 0) && data == 1); /* notation */ recall = ags_recall_new(); recall->flags |= (AGS_RECALL_PERSISTENT | AGS_RECALL_PERSISTENT_NOTATION); g_signal_connect(G_OBJECT(recall), "done\0", G_CALLBACK(ags_recall_test_callback), &data); /* assert callback invoked */ data = 0; ags_recall_stop_persistent(recall); CU_ASSERT(((AGS_RECALL_PERSISTENT & (recall->flags)) == 0) && ((AGS_RECALL_PERSISTENT_NOTATION & (recall->flags)) == 0) && data == 1); } void ags_recall_test_done() { AgsRecall *recall; guint data; /* recall */ recall = ags_recall_new(); g_signal_connect(G_OBJECT(recall), "done\0", G_CALLBACK(ags_recall_test_callback), &data); /* assert callback invoked */ data = 0; ags_recall_done(recall); CU_ASSERT(((AGS_RECALL_DONE & (recall->flags)) != 0) && data == 1); /* persistent recall */ recall = ags_recall_new(); recall->flags |= AGS_RECALL_PERSISTENT; g_signal_connect(G_OBJECT(recall), "done\0", G_CALLBACK(ags_recall_test_callback), &data); /* assert callback not invoked */ data = 0; ags_recall_done(recall); CU_ASSERT(((AGS_RECALL_DONE & (recall->flags)) == 0) && data == 0); } void ags_recall_test_cancel() { AgsRecall *recall; guint cancel_data, done_data; /* recall */ recall = ags_recall_new(); g_signal_connect(G_OBJECT(recall), "done\0", G_CALLBACK(ags_recall_test_callback), &done_data); g_signal_connect(G_OBJECT(recall), "cancel\0", G_CALLBACK(ags_recall_test_callback), &cancel_data); /* assert callback invoked */ done_data = 0; cancel_data = 0; ags_recall_cancel(recall); CU_ASSERT(((AGS_RECALL_DONE & (recall->flags)) != 0) && done_data == 1 && cancel_data == 1); /* persistent recall */ recall = ags_recall_new(); recall->flags |= AGS_RECALL_PERSISTENT; g_signal_connect(G_OBJECT(recall), "done\0", G_CALLBACK(ags_recall_test_callback), &done_data); g_signal_connect(G_OBJECT(recall), "cancel\0", G_CALLBACK(ags_recall_test_callback), &cancel_data); /* assert callback invoked */ done_data = 0; cancel_data = 0; ags_recall_cancel(recall); CU_ASSERT(((AGS_RECALL_DONE & (recall->flags)) != 0) && done_data == 1 && cancel_data == 1); } void ags_recall_test_remove() { AgsRecall *parent, *recall_0, *recall_1; guint remove_data, done_data; /* parent */ parent = ags_recall_new(); g_signal_connect(G_OBJECT(parent), "done\0", G_CALLBACK(ags_recall_test_callback), &done_data); /* 1st recall */ recall_0 = ags_recall_new(); ags_recall_add_child(parent, recall_0); g_signal_connect(G_OBJECT(recall_0), "remove\0", G_CALLBACK(ags_recall_test_callback), &remove_data); /* 2nd recall */ recall_1 = ags_recall_new(); ags_recall_add_child(parent, recall_1); g_signal_connect(G_OBJECT(recall_1), "remove\0", G_CALLBACK(ags_recall_test_callback), &remove_data); /* assert callback invoked */ done_data = 0; remove_data = 0; ags_recall_remove(recall_0); CU_ASSERT(((AGS_RECALL_DONE & (parent->flags)) == 0) && remove_data == 1 && done_data == 0); ags_recall_remove(recall_1); CU_ASSERT(((AGS_RECALL_DONE & (parent->flags)) == 0) && remove_data == 2 && done_data == 0); /* parent propagate done */ parent = ags_recall_new(); parent->flags |= AGS_RECALL_PROPAGATE_DONE; g_signal_connect(G_OBJECT(parent), "done\0", G_CALLBACK(ags_recall_test_callback), &done_data); /* 1st recall */ recall_0 = ags_recall_new(); ags_recall_add_child(parent, recall_0); g_signal_connect(G_OBJECT(recall_0), "remove\0", G_CALLBACK(ags_recall_test_callback), &remove_data); /* 2nd recall */ recall_1 = ags_recall_new(); ags_recall_add_child(parent, recall_1); g_signal_connect(G_OBJECT(recall_1), "remove\0", G_CALLBACK(ags_recall_test_callback), &remove_data); /* assert callback invoked */ done_data = 0; remove_data = 0; ags_recall_remove(recall_0); CU_ASSERT(((AGS_RECALL_DONE & (parent->flags)) == 0) && remove_data == 1 && done_data == 0); ags_recall_remove(recall_1); CU_ASSERT(((AGS_RECALL_DONE & (parent->flags)) != 0) && remove_data == 2 && done_data == 1); } void ags_recall_test_is_done() { AgsRecall *recall; AgsRecallID *recall_id; AgsRecyclingContext *test_recycling_context, *recycling_context; GList *list; guint i, j; gboolean is_done; /* recalls not done */ test_recycling_context = NULL; list = NULL; for(i = 0; i < AGS_RECALL_TEST_IS_DONE_RECYCLING_CONTEXT_COUNT; i++){ recycling_context = ags_recycling_context_new(0); if(i == 0){ test_recycling_context = recycling_context; } for(j = 0; j < AGS_RECALL_TEST_IS_DONE_RECALL_COUNT; j++){ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling-context\0", recycling_context, NULL); recall = g_object_new(AGS_TYPE_RECALL, "recall-id\0", recall_id, NULL); if(i != 0){ recall->flags |= AGS_RECALL_DONE; } list = g_list_prepend(list, recall); } } is_done = ags_recall_is_done(list, test_recycling_context); CU_ASSERT(is_done == FALSE); /* recalls done */ test_recycling_context = NULL; list = NULL; for(i = 0; i < AGS_RECALL_TEST_IS_DONE_RECYCLING_CONTEXT_COUNT; i++){ recycling_context = ags_recycling_context_new(0); if(i == 0){ test_recycling_context = recycling_context; } for(j = 0; j < AGS_RECALL_TEST_IS_DONE_RECALL_COUNT; j++){ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling-context\0", recycling_context, NULL); recall = g_object_new(AGS_TYPE_RECALL, "recall-id\0", recall_id, NULL); if(i == 0){ recall->flags |= AGS_RECALL_DONE; } list = g_list_prepend(list, recall); } } is_done = ags_recall_is_done(list, test_recycling_context); CU_ASSERT(is_done == TRUE); } AgsRecall* ags_recall_test_duplicate_callback(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter, gpointer data) { *((guint *) data) += 1; return(NULL); } void ags_recall_test_duplicate() { AgsRecall *recall; AgsRecallContainer *recall_container; AgsRecyclingContext *recycling_context; AgsRecallID *recall_id; GList *list, *start; guint data; guint i; /* create recall templates */ start = NULL; for(i = 0; i < AGS_RECALL_TEST_DUPLICATE_TEMPLATE_COUNT; i++){ recall = g_object_new(AGS_TYPE_RECALL, NULL); recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); g_object_set(recall, "soundcard\0", devout, "recall-container\0", recall_container, NULL); recall->flags |= AGS_RECALL_TEMPLATE; g_signal_connect(G_OBJECT(recall), "duplicate\0", G_CALLBACK(ags_recall_test_duplicate_callback), &data); start = g_list_prepend(start, recall); g_object_ref(recall); } /* assert duplicate */ data = 0; for(i = 0; i < AGS_RECALL_TEST_DUPLICATE_RECALL_ID_COUNT; i++){ recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, NULL); recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling-context\0", recycling_context, NULL); list = start; while(list != NULL){ ags_recall_duplicate(list->data, recall_id); list = list->next; } } CU_ASSERT(data == (AGS_RECALL_TEST_DUPLICATE_RECALL_ID_COUNT * AGS_RECALL_TEST_DUPLICATE_TEMPLATE_COUNT)); } void ags_recall_test_set_recall_id() { AgsRecall *recall, *child; AgsRecallID *recall_id; GList *list; guint i; gboolean success; recall = g_object_new(AGS_TYPE_RECALL, NULL); for(i = 0; i < AGS_RECALL_TEST_SET_RECALL_ID_CHILDREN_COUNT; i++){ child = g_object_new(AGS_TYPE_RECALL, NULL); ags_recall_add_child(recall, child); } /* assert recall id set */ recall_id = g_object_new(AGS_TYPE_RECALL_ID, NULL); success = TRUE; ags_recall_set_recall_id(recall, recall_id); CU_ASSERT(recall->recall_id == recall_id); list = recall->children; while(list != NULL){ if(AGS_RECALL(list->data)->recall_id != recall_id){ success = FALSE; break; } list = list->next; } CU_ASSERT(success == TRUE); } void ags_recall_test_notify_dependency() { //TODO:JK: implement me } void ags_recall_test_add_dependency() { //TODO:JK: implement me } void ags_recall_test_remove_dependency() { //TODO:JK: implement me } void ags_recall_test_get_dependencies() { //TODO:JK: implement me } void ags_recall_test_remove_child() { AgsRecall *recall, *child; GList *list, *list_next; gboolean success; guint i; /* create recall */ recall = g_object_new(AGS_TYPE_RECALL, NULL); for(i = 0; i < AGS_RECALL_TEST_REMOVE_CHILD_CHILDREN_COUNT; i++){ child = g_object_new(AGS_TYPE_RECALL, NULL); ags_recall_add_child(recall, child); } /* assert removed */ list = recall->children; success = TRUE; while(list != NULL){ list_next = list->next; child = list->data; ags_recall_remove_child(recall, child); if(g_list_find(recall->children, child) != NULL){ success = FALSE; break; } list = list_next; } CU_ASSERT(success == TRUE && recall->children == NULL); } void ags_recall_test_add_child() { AgsRecall *recall, *child; gboolean success; guint i; /* create recall and assert child to be present */ recall = g_object_new(AGS_TYPE_RECALL, NULL); success = TRUE; for(i = 0; i < AGS_RECALL_TEST_ADD_CHILD_CHILDREN_COUNT; i++){ child = g_object_new(AGS_TYPE_RECALL, NULL); ags_recall_add_child(recall, child); if(g_list_find(recall->children, child) == NULL){ success = FALSE; break; } } CU_ASSERT(success == TRUE && recall->children != NULL); } void ags_recall_test_get_children() { AgsRecall *recall, *child; GList *list; guint i; /* create recall */ recall = g_object_new(AGS_TYPE_RECALL, NULL); for(i = 0; i < AGS_RECALL_TEST_GET_CHILDREN_CHILDREN_COUNT; i++){ child = g_object_new(AGS_TYPE_RECALL, NULL); ags_recall_add_child(recall, child); } list = ags_recall_get_children(recall); CU_ASSERT(list != NULL && g_list_length(list) == AGS_RECALL_TEST_GET_CHILDREN_CHILDREN_COUNT); } void ags_recall_test_get_by_effect() { AgsRecall *recall; AgsRecallLadspa *recall_ladspa; GList *list, *current; guint nth; guint i; guint effect_added[4]; static const gchar *filename[] = { "echo.so\0", "echo.so\0", "noise.so\0", NULL, }; static const gchar *effect[] = { "delay\0", "feedback\0", "noise\0", NULL, }; list = NULL; memset(effect_added, 0, 4 * sizeof(guint)); for(i = 0; i < AGS_RECALL_TEST_GET_BY_EFFECT_RECALL_COUNT; i++){ recall = g_object_new(AGS_TYPE_RECALL, NULL); list = g_list_prepend(list, recall); } for(i = 0; i < AGS_RECALL_TEST_GET_BY_EFFECT_LADSPA_RECALL_COUNT; i++){ nth = rand() % 3; effect_added[nth] += 1; recall_ladspa = g_object_new(AGS_TYPE_RECALL_LADSPA, "filename\0", filename[nth], "effect\0", effect[nth], NULL); list = g_list_prepend(list, recall_ladspa); } list = g_list_reverse(list); /* assert 1st filename and effect */ current = ags_recall_get_by_effect(list, filename[0], effect[0]); if(effect_added[0] > 0){ CU_ASSERT(g_list_length(current) == effect_added[0]); }else{ CU_ASSERT(current == NULL); } /* assert 2nd filename and effect */ current = ags_recall_get_by_effect(list, filename[1], effect[1]); if(effect_added[1] > 0){ CU_ASSERT(g_list_length(current) == effect_added[1]); }else{ CU_ASSERT(current == NULL); } /* assert 3rd filename and effect */ current = ags_recall_get_by_effect(list, filename[2], effect[2]); if(effect_added[2] > 0){ CU_ASSERT(g_list_length(current) == effect_added[2]); }else{ CU_ASSERT(current == NULL); } } void ags_recall_test_find_recall_id_with_effect() { //TODO:JK: implement me } void ags_recall_test_find_type() { //TODO:JK: implement me } void ags_recall_test_find_template() { //TODO:JK: implement me } void ags_recall_test_template_find_type() { //TODO:JK: implement me } void ags_recall_test_template_find_all_type() { //TODO:JK: implement me } void ags_recall_test_find_type_with_recycling_context() { //TODO:JK: implement me } void ags_recall_test_find_recycling_context() { //TODO:JK: implement me } void ags_recall_test_find_provider() { //TODO:JK: implement me } void ags_recall_test_template_find_provider() { //TODO:JK: implement me } void ags_recall_test_find_provider_with_recycling_context() { //TODO:JK: implement me } void ags_recall_test_run_init() { //TODO:JK: implement me } void ags_recall_test_add_handler() { //TODO:JK: implement me } void ags_recall_test_remove_handler() { //TODO:JK: implement me } void ags_recall_test_lock_port() { //TODO:JK: implement me } void ags_recall_test_unlock_port() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C\0"); putenv("LANG=C\0"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsRecallTest\0", ags_recall_test_init_suite, ags_recall_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsRecall resolve dependencies\0", ags_recall_test_resolve_dependencies) == NULL) || (CU_add_test(pSuite, "test of AgsRecall child added\0", ags_recall_test_child_added) == NULL) || (CU_add_test(pSuite, "test of AgsRecall run init pre\0", ags_recall_test_run_init_pre) == NULL) || (CU_add_test(pSuite, "test of AgsRecall run init inter\0", ags_recall_test_run_init_inter) == NULL) || (CU_add_test(pSuite, "test of AgsRecall run init post\0", ags_recall_test_run_init_post) == NULL) || (CU_add_test(pSuite, "test of AgsRecall stop persistent\0", ags_recall_test_stop_persistent) == NULL) || (CU_add_test(pSuite, "test of AgsRecall done\0", ags_recall_test_done) == NULL) || (CU_add_test(pSuite, "test of AgsRecall cancel\0", ags_recall_test_cancel) == NULL) || (CU_add_test(pSuite, "test of AgsRecall remove\0", ags_recall_test_remove) == NULL) || (CU_add_test(pSuite, "test of AgsRecall is done\0", ags_recall_test_is_done) == NULL) || (CU_add_test(pSuite, "test of AgsRecall duplicate\0", ags_recall_test_duplicate) == NULL) || (CU_add_test(pSuite, "test of AgsRecall set recall id\0", ags_recall_test_set_recall_id) == NULL) || (CU_add_test(pSuite, "test of AgsRecall notify dependency\0", ags_recall_test_notify_dependency) == NULL) || (CU_add_test(pSuite, "test of AgsRecall add dependency\0", ags_recall_test_add_dependency) == NULL) || (CU_add_test(pSuite, "test of AgsRecall remove dependency\0", ags_recall_test_remove_dependency) == NULL) || (CU_add_test(pSuite, "test of AgsRecall get dependencies\0", ags_recall_test_get_dependencies) == NULL) || (CU_add_test(pSuite, "test of AgsRecall remove child\0", ags_recall_test_remove_child) == NULL) || (CU_add_test(pSuite, "test of AgsRecall add child\0", ags_recall_test_add_child) == NULL) || (CU_add_test(pSuite, "test of AgsRecall get children\0", ags_recall_test_get_children) == NULL) || (CU_add_test(pSuite, "test of AgsRecall get by effect\0", ags_recall_test_get_by_effect) == NULL) || (CU_add_test(pSuite, "test of AgsRecall find type\0", ags_recall_test_find_type) == NULL) || (CU_add_test(pSuite, "test of AgsRecall find template\0", ags_recall_test_find_template) == NULL) || (CU_add_test(pSuite, "test of AgsRecall template find type\0", ags_recall_test_template_find_type) == NULL) || (CU_add_test(pSuite, "test of AgsRecall template find all type\0", ags_recall_test_template_find_all_type) == NULL) || (CU_add_test(pSuite, "test of AgsRecall find type with recycling context\0", ags_recall_test_find_type_with_recycling_context) == NULL) || (CU_add_test(pSuite, "test of AgsRecall find recycling context\0", ags_recall_test_find_recycling_context) == NULL) || (CU_add_test(pSuite, "test of AgsRecall find provider\0", ags_recall_test_find_provider) == NULL) || (CU_add_test(pSuite, "test of AgsRecall template find provider\0", ags_recall_test_template_find_provider) == NULL) || (CU_add_test(pSuite, "test of AgsRecall find provider with recycling context\0", ags_recall_test_find_provider_with_recycling_context) == NULL) || (CU_add_test(pSuite, "test of AgsRecall run init\0", ags_recall_test_run_init) == NULL) || (CU_add_test(pSuite, "test of AgsRecall add handler\0", ags_recall_test_add_handler) == NULL) || (CU_add_test(pSuite, "test of AgsRecall remove handler\0", ags_recall_test_remove_handler) == NULL) || (CU_add_test(pSuite, "test of AgsRecall lock port\0", ags_recall_test_lock_port) == NULL) || (CU_add_test(pSuite, "test of AgsRecall unlock port\0", ags_recall_test_unlock_port) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_audio_connection_test.c0000644000175000017500000001041313246707333021102 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include int ags_audio_connection_test_init_suite(); int ags_audio_connection_test_clean_suite(); void ags_audio_connection_test_find(); #define AGS_AUDIO_CONNECTION_TEST_FIND_PAD_0 (0) #define AGS_AUDIO_CONNECTION_TEST_FIND_AUDIO_CHANNEL_0 (0) #define AGS_AUDIO_CONNECTION_TEST_FIND_PAD_1 (3) #define AGS_AUDIO_CONNECTION_TEST_FIND_AUDIO_CHANNEL_1 (9) #define AGS_AUDIO_CONNECTION_TEST_FIND_PAD_2 (2) #define AGS_AUDIO_CONNECTION_TEST_FIND_AUDIO_CHANNEL_2 (7) /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_audio_connection_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_audio_connection_test_clean_suite() { return(0); } void ags_audio_connection_test_find() { AgsAudioConnection *audio_connection[3]; GList *list, *current; list = NULL; audio_connection[0] = g_object_new(AGS_TYPE_AUDIO_CONNECTION, "channel-type", AGS_TYPE_INPUT, "pad", AGS_AUDIO_CONNECTION_TEST_FIND_PAD_0, "audio-channel", AGS_AUDIO_CONNECTION_TEST_FIND_AUDIO_CHANNEL_0, NULL); list = g_list_prepend(list, audio_connection[0]); audio_connection[1] = g_object_new(AGS_TYPE_AUDIO_CONNECTION, "channel-type", AGS_TYPE_INPUT, "pad", AGS_AUDIO_CONNECTION_TEST_FIND_PAD_1, "audio-channel", AGS_AUDIO_CONNECTION_TEST_FIND_AUDIO_CHANNEL_1, NULL); list = g_list_prepend(list, audio_connection[1]); audio_connection[2] = g_object_new(AGS_TYPE_AUDIO_CONNECTION, "channel-type", AGS_TYPE_INPUT, "pad", AGS_AUDIO_CONNECTION_TEST_FIND_PAD_2, "audio-channel", AGS_AUDIO_CONNECTION_TEST_FIND_AUDIO_CHANNEL_2, NULL); list = g_list_prepend(list, audio_connection[2]); /* find and assert */ CU_ASSERT((current = ags_audio_connection_find(list, AGS_TYPE_INPUT, AGS_AUDIO_CONNECTION_TEST_FIND_PAD_0, AGS_AUDIO_CONNECTION_TEST_FIND_AUDIO_CHANNEL_0)) != NULL && current->data == audio_connection[0]); CU_ASSERT((current = ags_audio_connection_find(list, AGS_TYPE_INPUT, AGS_AUDIO_CONNECTION_TEST_FIND_PAD_1, AGS_AUDIO_CONNECTION_TEST_FIND_AUDIO_CHANNEL_1)) != NULL && current->data == audio_connection[1]); CU_ASSERT((current = ags_audio_connection_find(list, AGS_TYPE_INPUT, AGS_AUDIO_CONNECTION_TEST_FIND_PAD_2, AGS_AUDIO_CONNECTION_TEST_FIND_AUDIO_CHANNEL_2)) != NULL && current->data == audio_connection[2]); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsAudioConnectionTest", ags_audio_connection_test_init_suite, ags_audio_connection_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsAudioConnection find", ags_audio_connection_test_find) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_recall_container_test.c0000644000175000017500000002430013246707333021066 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_recall_container_test_init_suite(); int ags_recall_container_test_clean_suite(); void ags_recall_container_test_get_recall_audio(); void ags_recall_container_test_get_recall_audio_run(); void ags_recall_container_test_get_recall_channel(); void ags_recall_container_test_get_recall_channel_run(); void ags_recall_container_test_find(); /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_container_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_container_test_clean_suite() { return(0); } void ags_recall_container_test_get_recall_audio() { AgsRecall *recall, *current; AgsRecallContainer *recall_container; recall = g_object_new(AGS_TYPE_RECALL_AUDIO, NULL); recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, "recall-audio", recall, NULL); /* get recall audio and assert*/ current = ags_recall_container_get_recall_audio(recall_container); CU_ASSERT(current != NULL && AGS_IS_RECALL_AUDIO(current) == TRUE); } void ags_recall_container_test_get_recall_audio_run() { AgsRecall *recall[3]; AgsRecallContainer *recall_container; GList *list, *current; recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); recall[0] = g_object_new(AGS_TYPE_RECALL_AUDIO_RUN, NULL); g_object_set(recall_container, "recall-audio-run", recall[0], NULL); recall[1] = g_object_new(AGS_TYPE_RECALL_AUDIO_RUN, NULL); g_object_set(recall_container, "recall-audio-run", recall[1], NULL); recall[2] = g_object_new(AGS_TYPE_RECALL_AUDIO_RUN, NULL); g_object_set(recall_container, "recall-audio-run", recall[2], NULL); /* get recall audio and assert*/ list = ags_recall_container_get_recall_audio_run(recall_container); CU_ASSERT(list != NULL); CU_ASSERT(g_list_find(list, recall[0]) != NULL); CU_ASSERT(g_list_find(list, recall[1]) != NULL); CU_ASSERT(g_list_find(list, recall[2]) != NULL); } void ags_recall_container_test_get_recall_channel() { AgsRecall *recall[3]; AgsRecallContainer *recall_container; GList *list, *current; recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); recall[0] = g_object_new(AGS_TYPE_RECALL_CHANNEL, NULL); g_object_set(recall_container, "recall-channel", recall[0], NULL); recall[1] = g_object_new(AGS_TYPE_RECALL_CHANNEL, NULL); g_object_set(recall_container, "recall-channel", recall[1], NULL); recall[2] = g_object_new(AGS_TYPE_RECALL_CHANNEL, NULL); g_object_set(recall_container, "recall-channel", recall[2], NULL); /* get recall channel and assert*/ list = ags_recall_container_get_recall_channel(recall_container); CU_ASSERT(list != NULL); CU_ASSERT(g_list_find(list, recall[0]) != NULL); CU_ASSERT(g_list_find(list, recall[1]) != NULL); CU_ASSERT(g_list_find(list, recall[2]) != NULL); } void ags_recall_container_test_get_recall_channel_run() { AgsRecall *recall[3]; AgsRecallContainer *recall_container; GList *list, *current; recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); recall[0] = g_object_new(AGS_TYPE_RECALL_CHANNEL_RUN, NULL); g_object_set(recall_container, "recall-channel-run", recall[0], NULL); recall[1] = g_object_new(AGS_TYPE_RECALL_CHANNEL_RUN, NULL); g_object_set(recall_container, "recall-channel-run", recall[1], NULL); recall[2] = g_object_new(AGS_TYPE_RECALL_CHANNEL_RUN, NULL); g_object_set(recall_container, "recall-channel-run", recall[2], NULL); /* get recall channel and assert*/ list = ags_recall_container_get_recall_channel_run(recall_container); CU_ASSERT(list != NULL); CU_ASSERT(g_list_find(list, recall[0]) != NULL); CU_ASSERT(g_list_find(list, recall[1]) != NULL); CU_ASSERT(g_list_find(list, recall[2]) != NULL); } void ags_recall_container_test_find() { AgsRecall *recall[6]; AgsRecallContainer *recall_container; GList *list, *current; /* assert #0 - type */ list = NULL; /* ags-count-beats */ recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); list = g_list_prepend(list, recall_container); recall[0] = g_object_new(AGS_TYPE_COUNT_BEATS_AUDIO_RUN, NULL); g_object_set(recall_container, "recall-audio-run", recall[0], NULL); /* ags-play */ recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); list = g_list_prepend(list, recall_container); recall[1] = g_object_new(AGS_TYPE_PLAY_CHANNEL_RUN, NULL); g_object_set(recall_container, "recall-channel-run", recall[1], NULL); /* ags-copy-pattern */ recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); list = g_list_prepend(list, recall_container); recall[2] = g_object_new(AGS_TYPE_COPY_PATTERN_AUDIO_RUN, NULL); g_object_set(recall_container, "recall-audio-run", recall[2], NULL); recall[3] = g_object_new(AGS_TYPE_COPY_PATTERN_CHANNEL_RUN, NULL); g_object_set(recall_container, "recall-channel-run", recall[3], NULL); /* ags-buffer */ recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); list = g_list_prepend(list, recall_container); recall[4] = g_object_new(AGS_TYPE_BUFFER_CHANNEL, NULL); g_object_set(recall_container, "recall-channel", recall[4], NULL); /* ags-delay */ recall_container = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); list = g_list_prepend(list, recall_container); recall[5] = g_object_new(AGS_TYPE_DELAY_AUDIO, NULL); g_object_set(recall_container, "recall-audio", recall[5], NULL); /* find and assert ags-count-beats */ current = ags_recall_container_find(list, AGS_TYPE_COUNT_BEATS_AUDIO_RUN, AGS_RECALL_CONTAINER_FIND_TYPE, NULL); CU_ASSERT(current != NULL && AGS_IS_RECALL_CONTAINER(current->data) == TRUE && g_list_find(AGS_RECALL_CONTAINER(current->data)->recall_audio_run, recall[0]) != NULL); /* find and assert ags-play */ current = ags_recall_container_find(list, AGS_TYPE_PLAY_CHANNEL_RUN, AGS_RECALL_CONTAINER_FIND_TYPE, NULL); CU_ASSERT(current != NULL && AGS_IS_RECALL_CONTAINER(current->data) == TRUE && g_list_find(AGS_RECALL_CONTAINER(current->data)->recall_channel_run, recall[1]) != NULL); /* find and assert ags-copy-pattern */ current = ags_recall_container_find(list, AGS_TYPE_COPY_PATTERN_AUDIO_RUN, AGS_RECALL_CONTAINER_FIND_TYPE, NULL); CU_ASSERT(current != NULL && AGS_IS_RECALL_CONTAINER(current->data) == TRUE && g_list_find(AGS_RECALL_CONTAINER(current->data)->recall_audio_run, recall[2]) != NULL); current = ags_recall_container_find(list, AGS_TYPE_COPY_PATTERN_CHANNEL_RUN, AGS_RECALL_CONTAINER_FIND_TYPE, NULL); CU_ASSERT(current != NULL && AGS_IS_RECALL_CONTAINER(current->data) == TRUE && g_list_find(AGS_RECALL_CONTAINER(current->data)->recall_channel_run, recall[3]) != NULL); /* find and assert ags-buffer */ current = ags_recall_container_find(list, AGS_TYPE_BUFFER_CHANNEL, AGS_RECALL_CONTAINER_FIND_TYPE, NULL); CU_ASSERT(current != NULL && AGS_IS_RECALL_CONTAINER(current->data) == TRUE && g_list_find(AGS_RECALL_CONTAINER(current->data)->recall_channel, recall[4]) != NULL); /* find and assert ags-delay */ current = ags_recall_container_find(list, AGS_TYPE_DELAY_AUDIO, AGS_RECALL_CONTAINER_FIND_TYPE, NULL); CU_ASSERT(current != NULL && AGS_IS_RECALL_CONTAINER(current->data) == TRUE && AGS_RECALL_CONTAINER(current->data)->recall_audio == recall[5]); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsRecallContainerTest", ags_recall_container_test_init_suite, ags_recall_container_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsRecallContainer get recall audio", ags_recall_container_test_get_recall_audio) == NULL) || (CU_add_test(pSuite, "test of AgsRecallContainer get recall audio run", ags_recall_container_test_get_recall_audio_run) == NULL) || (CU_add_test(pSuite, "test of AgsRecallContainer get recall channel", ags_recall_container_test_get_recall_channel) == NULL) || (CU_add_test(pSuite, "test of AgsRecallContainer get recall channel run", ags_recall_container_test_get_recall_channel_run) == NULL) || (CU_add_test(pSuite, "test of AgsRecallContainer find", ags_recall_container_test_find) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_recall_channel_test.c0000644000175000017500000000703513246707333020522 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2017 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 . */ #include #include #include #include #include #include #include int ags_recall_channel_test_init_suite(); int ags_recall_channel_test_clean_suite(); void ags_recall_channel_test_find_channel(); /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_channel_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_recall_channel_test_clean_suite() { return(0); } void ags_recall_channel_test_find_channel() { AgsChannel *source[3]; AgsRecallChannel *recall_channel[3]; GList *list, *current; list = NULL; /* recall channel #0 */ source[0] = g_object_new(AGS_TYPE_CHANNEL, NULL); recall_channel[0] = g_object_new(AGS_TYPE_RECALL_CHANNEL, "source", source[0], NULL); list = g_list_prepend(list, recall_channel[0]); /* recall channel #1 */ source[1] = g_object_new(AGS_TYPE_CHANNEL, NULL); recall_channel[1] = g_object_new(AGS_TYPE_RECALL_CHANNEL, "source", source[1], NULL); list = g_list_prepend(list, recall_channel[1]); /* recall channel #2 */ source[2] = g_object_new(AGS_TYPE_CHANNEL, NULL); recall_channel[2] = g_object_new(AGS_TYPE_RECALL_CHANNEL, "source", source[2], NULL); list = g_list_prepend(list, recall_channel[2]); /* assert */ CU_ASSERT((current = ags_recall_channel_find_channel(list, source[0])) != NULL && current->data == recall_channel[0]); CU_ASSERT((current = ags_recall_channel_find_channel(list, source[1])) != NULL && current->data == recall_channel[1]); CU_ASSERT((current = ags_recall_channel_find_channel(list, source[2])) != NULL && current->data == recall_channel[2]); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsRecallChannelTest", ags_recall_channel_test_init_suite, ags_recall_channel_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsRecallChannel find channel", ags_recall_channel_test_find_channel) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_automation_test.c0000644000175000017500000010741513247044247017752 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #include #include #include #include #include #include #include #include int ags_automation_test_init_suite(); int ags_automation_test_clean_suite(); void ags_automation_test_find_port(); void ags_automation_test_find_near_timestamp(); void ags_automation_test_add_acceleration(); void ags_automation_test_remove_acceleration_at_position(); void ags_automation_test_is_acceleration_selected(); void ags_automation_test_find_point(); void ags_automation_test_find_region(); void ags_automation_test_free_selection(); void ags_automation_test_add_all_to_selection(); void ags_automation_test_add_point_to_selection(); void ags_automation_test_remove_point_from_selection(); void ags_automation_test_add_region_to_selection(); void ags_automation_test_remove_region_from_selection(); void ags_automation_test_copy_selection(); void ags_automation_test_cut_selection(); void ags_automation_test_insert_from_clipboard(); void ags_automation_test_get_current(); void ags_automation_test_get_specifier_unique(); void ags_automation_test_find_specifier(); void ags_automation_test_find_specifier_with_type_and_line(); void ags_automation_test_get_value(); #define AGS_AUTOMATION_TEST_CONTROL_NAME "./ags-test-control" #define AGS_AUTOMATION_TEST_FIND_PORT_N_AUTOMATION (8) #define AGS_AUTOMATION_TEST_FIND_NEAR_TIMESTAMP_N_AUTOMATION (8) #define AGS_AUTOMATION_TEST_ADD_ACCELERATION_WIDTH (4096) #define AGS_AUTOMATION_TEST_ADD_ACCELERATION_HEIGHT (128) #define AGS_AUTOMATION_TEST_ADD_ACCELERATION_STEPS (127) #define AGS_AUTOMATION_TEST_ADD_ACCELERATION_LOWER (0.0) #define AGS_AUTOMATION_TEST_ADD_ACCELERATION_UPPER (127.0) #define AGS_AUTOMATION_TEST_ADD_ACCELERATION_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_ADD_ACCELERATION_COUNT (1024) #define AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_WIDTH (4096) #define AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_HEIGHT (128) #define AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_STEPS (127) #define AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_LOWER (0.0) #define AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_UPPER (127.0) #define AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_COUNT (1024) #define AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_WIDTH (4096) #define AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_HEIGHT (88) #define AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_STEPS (127) #define AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_LOWER (0.0) #define AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_UPPER (127.0) #define AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_COUNT (1024) #define AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_SELECTION_COUNT (128) #define AGS_AUTOMATION_TEST_FIND_POINT_WIDTH (4096) #define AGS_AUTOMATION_TEST_FIND_POINT_HEIGHT (128) #define AGS_AUTOMATION_TEST_FIND_POINT_STEPS (127) #define AGS_AUTOMATION_TEST_FIND_POINT_LOWER (0.0) #define AGS_AUTOMATION_TEST_FIND_POINT_UPPER (127.0) #define AGS_AUTOMATION_TEST_FIND_POINT_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_FIND_POINT_COUNT (1024) #define AGS_AUTOMATION_TEST_FIND_POINT_N_ATTEMPTS (128) #define AGS_AUTOMATION_TEST_FIND_REGION_WIDTH (4096) #define AGS_AUTOMATION_TEST_FIND_REGION_HEIGHT (88) #define AGS_AUTOMATION_TEST_FIND_REGION_STEPS (127) #define AGS_AUTOMATION_TEST_FIND_REGION_LOWER (0.0) #define AGS_AUTOMATION_TEST_FIND_REGION_UPPER (127.0) #define AGS_AUTOMATION_TEST_FIND_REGION_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_FIND_REGION_COUNT (1024) #define AGS_AUTOMATION_TEST_FIND_REGION_N_ATTEMPTS (128) #define AGS_AUTOMATION_TEST_FIND_REGION_SELECTION_WIDTH (128) #define AGS_AUTOMATION_TEST_FIND_REGION_SELECTION_HEIGHT (24) #define AGS_AUTOMATION_TEST_FREE_SELECTION_WIDTH (4096) #define AGS_AUTOMATION_TEST_FREE_SELECTION_HEIGHT (88) #define AGS_AUTOMATION_TEST_FREE_SELECTION_STEPS (127) #define AGS_AUTOMATION_TEST_FREE_SELECTION_LOWER (0.0) #define AGS_AUTOMATION_TEST_FREE_SELECTION_UPPER (127.0) #define AGS_AUTOMATION_TEST_FREE_SELECTION_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_FREE_SELECTION_COUNT (1024) #define AGS_AUTOMATION_TEST_FREE_SELECTION_SELECTION_COUNT (64) #define AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_WIDTH (4096) #define AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_HEIGHT (88) #define AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_STEPS (127) #define AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_LOWER (0.0) #define AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_UPPER (127.0) #define AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_COUNT (1024) #define AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_WIDTH (4096) #define AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_HEIGHT (88) #define AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_STEPS (127) #define AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_LOWER (0.0) #define AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_UPPER (127.0) #define AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_COUNT (1024) #define AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_N_ATTEMPTS (128) #define AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_WIDTH (4096) #define AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_HEIGHT (88) #define AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_STEPS (127) #define AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_LOWER (0.0) #define AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_UPPER (127.0) #define AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_COUNT (1024) #define AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_SELECTION_COUNT (128) #define AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_N_ATTEMPTS (64) #define AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_STEPS (127) #define AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_LOWER (0.0) #define AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_UPPER (127.0) #define AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_COUNT (28) #define AGS_AUTOMATION_TEST_FIND_SPECIFIER_STEPS (127) #define AGS_AUTOMATION_TEST_FIND_SPECIFIER_LOWER (0.0) #define AGS_AUTOMATION_TEST_FIND_SPECIFIER_UPPER (127.0) #define AGS_AUTOMATION_TEST_FIND_SPECIFIER_DEFAULT_VALUE (1.0) #define AGS_AUTOMATION_TEST_FIND_SPECIFIER_COUNT (28) AgsAudio *audio; /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_automation_test_init_suite() { audio = ags_audio_new(NULL); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_automation_test_clean_suite() { g_object_unref(audio); return(0); } void ags_automation_test_find_port() { AgsAutomation **automation; AgsPort **port; GList *list, *current; guint i; automation = (AgsAutomation **) malloc(AGS_AUTOMATION_TEST_FIND_PORT_N_AUTOMATION * sizeof(AgsAutomation *)); port = (AgsAutomation **) malloc(AGS_AUTOMATION_TEST_FIND_PORT_N_AUTOMATION * sizeof(AgsPort *)); list = NULL; for(i = 0; i < AGS_AUTOMATION_TEST_FIND_PORT_N_AUTOMATION; i++){ /* nth automation */ automation[i] = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); port[i] = ags_port_new(); g_object_set(automation[i], "port", port[i], NULL); list = g_list_prepend(list, automation[i]); } /* assert find */ for(i = 0; i < AGS_AUTOMATION_TEST_FIND_PORT_N_AUTOMATION; i++){ current = list; current = ags_automation_find_port(current, port[i]); CU_ASSERT(current != NULL && AGS_AUTOMATION(current->data)->port == port[i]); } } void ags_automation_test_find_near_timestamp() { AgsAutomation **automation; AgsTimestamp *timestamp; GList *list, *current; guint i; automation = (AgsAutomation **) malloc(AGS_AUTOMATION_TEST_FIND_NEAR_TIMESTAMP_N_AUTOMATION * sizeof(AgsAutomation *)); list = NULL; for(i = 0; i < AGS_AUTOMATION_TEST_FIND_NEAR_TIMESTAMP_N_AUTOMATION; i++){ /* nth automation */ automation[i] = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); timestamp = automation[i]->timestamp; timestamp->timer.ags_offset.offset = i * AGS_AUTOMATION_DEFAULT_OFFSET; list = g_list_prepend(list, automation[i]); } list = g_list_reverse(list); /* instantiate timestamp to check against */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; /* assert find */ for(i = 0; i < AGS_AUTOMATION_TEST_FIND_NEAR_TIMESTAMP_N_AUTOMATION; i++){ timestamp->timer.ags_offset.offset = i * AGS_AUTOMATION_DEFAULT_OFFSET; current = ags_automation_find_near_timestamp(list, 0, timestamp); CU_ASSERT(current != NULL && current->data == automation[i]); } } void ags_automation_test_add_acceleration() { AgsAutomation *automation; AgsAcceleration *acceleration; GList *list; gdouble range; guint x, y; guint i; gboolean success; automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); automation->steps = AGS_AUTOMATION_TEST_ADD_ACCELERATION_STEPS; automation->lower = AGS_AUTOMATION_TEST_ADD_ACCELERATION_LOWER; automation->upper = AGS_AUTOMATION_TEST_ADD_ACCELERATION_UPPER; automation->default_value = AGS_AUTOMATION_TEST_ADD_ACCELERATION_DEFAULT_VALUE; range = (AGS_AUTOMATION_TEST_ADD_ACCELERATION_UPPER - AGS_AUTOMATION_TEST_ADD_ACCELERATION_LOWER); for(i = 0; i < AGS_AUTOMATION_TEST_ADD_ACCELERATION_COUNT; i++){ x = rand() % AGS_AUTOMATION_TEST_ADD_ACCELERATION_WIDTH; y = rand() % AGS_AUTOMATION_TEST_ADD_ACCELERATION_HEIGHT; acceleration = ags_acceleration_new(); acceleration->x = x; acceleration->y = AGS_AUTOMATION_TEST_ADD_ACCELERATION_LOWER + ((y / AGS_AUTOMATION_TEST_ADD_ACCELERATION_HEIGHT) * range); ags_automation_add_acceleration(automation, acceleration, FALSE); } /* assert position */ list = automation->acceleration; success = TRUE; for(i = 0; i < AGS_AUTOMATION_TEST_ADD_ACCELERATION_COUNT; i++){ if(list->prev != NULL){ if(AGS_ACCELERATION(list->prev->data)->x > AGS_ACCELERATION(list->data)->x){ success = FALSE; break; } } list = list->next; } CU_ASSERT(success == TRUE); } void ags_automation_test_remove_acceleration_at_position() { AgsAutomation *automation; AgsAcceleration *acceleration; GList *list, *current; gdouble range; guint x, y; guint nth; guint i; gboolean success; automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); automation->steps = AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_STEPS; automation->lower = AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_LOWER; automation->upper = AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_UPPER; automation->default_value = AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_DEFAULT_VALUE; range = (AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_UPPER - AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_LOWER); for(i = 0; i < AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_COUNT; i++){ x = rand() % AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_WIDTH; y = rand() % AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_HEIGHT; acceleration = ags_acceleration_new(); acceleration->x = x; acceleration->y = AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_LOWER + ((y / AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_HEIGHT) * range); ags_automation_add_acceleration(automation, acceleration, FALSE); } for(i = 0; i < AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_COUNT; i++){ nth = rand() % (AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_COUNT - i); current = g_list_nth(automation->acceleration, nth); ags_automation_remove_acceleration_at_position(automation, AGS_ACCELERATION(current->data)->x, AGS_ACCELERATION(current->data)->y); } /* assert position */ list = automation->acceleration; success = TRUE; for(i = 0; i < AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_COUNT - AGS_AUTOMATION_TEST_REMOVE_ACCELERATION_AT_POSITION_COUNT; i++){ if(list->prev != NULL){ if(AGS_ACCELERATION(list->prev->data)->x > AGS_ACCELERATION(list->data)->x){ success = FALSE; break; } } list = list->next; } CU_ASSERT(success == TRUE); } void ags_automation_test_is_acceleration_selected() { AgsAutomation *automation; AgsAcceleration *acceleration; GList *list, *current; gdouble range; guint x, y; guint nth; guint i; gboolean success; /* create automation */ automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); automation->steps = AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_STEPS; automation->lower = AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_LOWER; automation->upper = AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_UPPER; automation->default_value = AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_DEFAULT_VALUE; range = (AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_UPPER - AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_LOWER); for(i = 0; i < AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_COUNT; i++){ x = rand() % AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_WIDTH; y = rand() % AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_HEIGHT; acceleration = ags_acceleration_new(); acceleration->x = x; acceleration->y = AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_LOWER + ((y / AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_HEIGHT) * range); ags_automation_add_acceleration(automation, acceleration, FALSE); } /* select acceleration */ for(i = 0; i < AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_SELECTION_COUNT; i++){ nth = rand() % (AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_COUNT - i); current = g_list_nth(automation->acceleration, nth); ags_automation_add_acceleration(automation, current->data, TRUE); } /* assert position */ list = automation->selection; success = TRUE; for(i = 0; i < AGS_AUTOMATION_TEST_IS_ACCELERATION_SELECTED_SELECTION_COUNT; i++){ if(list->prev != NULL){ if(AGS_ACCELERATION(list->prev->data)->x > AGS_ACCELERATION(list->data)->x){ success = FALSE; break; } } list = list->next; } CU_ASSERT(success == TRUE); } void ags_automation_test_find_point() { AgsAutomation *automation; AgsAcceleration *acceleration; GList *list, *current; gdouble range; guint count; guint nth; guint x, y; guint i; gboolean success; automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); automation->steps = AGS_AUTOMATION_TEST_FIND_POINT_STEPS; automation->lower = AGS_AUTOMATION_TEST_FIND_POINT_LOWER; automation->upper = AGS_AUTOMATION_TEST_FIND_POINT_UPPER; automation->default_value = AGS_AUTOMATION_TEST_FIND_POINT_DEFAULT_VALUE; range = (AGS_AUTOMATION_TEST_FIND_POINT_UPPER - AGS_AUTOMATION_TEST_FIND_POINT_LOWER); count = 0; for(i = 0; i < AGS_AUTOMATION_TEST_FIND_POINT_COUNT; i++){ x = rand() % AGS_AUTOMATION_TEST_FIND_POINT_WIDTH; y = rand() % AGS_AUTOMATION_TEST_FIND_POINT_HEIGHT; if(ags_automation_find_point(automation, x, y, FALSE) == NULL){ acceleration = ags_acceleration_new(); acceleration->x = x; acceleration->y = AGS_AUTOMATION_TEST_FIND_POINT_LOWER + ((y / AGS_AUTOMATION_TEST_FIND_POINT_HEIGHT) * range); ags_automation_add_acceleration(automation, acceleration, FALSE); count++; } } /* assert find point */ success = TRUE; for(i = 0; i < AGS_AUTOMATION_TEST_FIND_POINT_N_ATTEMPTS; i++){ nth = rand() % count; current = g_list_nth(automation->acceleration, nth); acceleration = ags_automation_find_point(automation, AGS_ACCELERATION(current->data)->x, AGS_ACCELERATION(current->data)->y, FALSE); if(acceleration->x != AGS_ACCELERATION(current->data)->x || acceleration->y != AGS_ACCELERATION(current->data)->y){ success = FALSE; break; } } CU_ASSERT(success == TRUE); } void ags_automation_test_find_region() { AgsAutomation *automation; AgsAcceleration *acceleration; GList *list, *current, *region; gdouble range; guint count; guint nth; guint x, y; guint i; gboolean success; automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); automation->steps = AGS_AUTOMATION_TEST_FIND_REGION_STEPS; automation->lower = AGS_AUTOMATION_TEST_FIND_REGION_LOWER; automation->upper = AGS_AUTOMATION_TEST_FIND_REGION_UPPER; automation->default_value = AGS_AUTOMATION_TEST_FIND_REGION_DEFAULT_VALUE; range = (AGS_AUTOMATION_TEST_FIND_REGION_UPPER - AGS_AUTOMATION_TEST_FIND_REGION_LOWER); count = 0; for(i = 0; i < AGS_AUTOMATION_TEST_FIND_REGION_COUNT; i++){ x = rand() % AGS_AUTOMATION_TEST_FIND_REGION_WIDTH; y = rand() % AGS_AUTOMATION_TEST_FIND_REGION_HEIGHT; if(ags_automation_find_point(automation, x, y, FALSE) == NULL){ acceleration = ags_acceleration_new(); acceleration->x = x; acceleration->y = AGS_AUTOMATION_TEST_FIND_REGION_LOWER + ((y / AGS_AUTOMATION_TEST_FIND_REGION_HEIGHT) * range); ags_automation_add_acceleration(automation, acceleration, FALSE); count++; } } /* assert find region */ success = TRUE; for(i = 0; i < AGS_AUTOMATION_TEST_FIND_REGION_N_ATTEMPTS && success; i++){ nth = rand() % count; current = g_list_nth(automation->acceleration, nth); region = ags_automation_find_region(automation, AGS_ACCELERATION(current->data)->x, AGS_ACCELERATION(current->data)->y, AGS_ACCELERATION(current->data)->x + AGS_AUTOMATION_TEST_FIND_REGION_SELECTION_WIDTH, AGS_ACCELERATION(current->data)->y + AGS_AUTOMATION_TEST_FIND_REGION_SELECTION_HEIGHT, FALSE); while(region != NULL){ if(!(AGS_ACCELERATION(region->data)->x >= AGS_ACCELERATION(current->data)->x && AGS_ACCELERATION(current->data)->x < AGS_ACCELERATION(current->data)->x + AGS_AUTOMATION_TEST_FIND_REGION_SELECTION_WIDTH && AGS_ACCELERATION(region->data)->y >= AGS_ACCELERATION(current->data)->y && AGS_ACCELERATION(current->data)->y < AGS_ACCELERATION(current->data)->y + AGS_AUTOMATION_TEST_FIND_REGION_SELECTION_HEIGHT)){ success = FALSE; break; } region = region->next; } } CU_ASSERT(success == TRUE); } void ags_automation_test_free_selection() { AgsAutomation *automation; AgsAcceleration *acceleration; GList *list, *current; gdouble range; guint count; guint x, y; guint nth; guint i; /* create automation */ automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); automation->steps = AGS_AUTOMATION_TEST_FREE_SELECTION_STEPS; automation->lower = AGS_AUTOMATION_TEST_FREE_SELECTION_LOWER; automation->upper = AGS_AUTOMATION_TEST_FREE_SELECTION_UPPER; automation->default_value = AGS_AUTOMATION_TEST_FREE_SELECTION_DEFAULT_VALUE; range = (AGS_AUTOMATION_TEST_FREE_SELECTION_UPPER - AGS_AUTOMATION_TEST_FREE_SELECTION_LOWER); count = 0; for(i = 0; i < AGS_AUTOMATION_TEST_FREE_SELECTION_COUNT; i++){ x = rand() % AGS_AUTOMATION_TEST_FREE_SELECTION_WIDTH; y = rand() % AGS_AUTOMATION_TEST_FREE_SELECTION_HEIGHT; if(ags_automation_find_point(automation, x, y, FALSE) == NULL){ acceleration = ags_acceleration_new(); acceleration->x = x; acceleration->y = AGS_AUTOMATION_TEST_FREE_SELECTION_LOWER + ((y / AGS_AUTOMATION_TEST_FREE_SELECTION_HEIGHT) * range); ags_automation_add_acceleration(automation, acceleration, FALSE); count++; } } /* select acceleration */ for(i = 0; i < AGS_AUTOMATION_TEST_FREE_SELECTION_SELECTION_COUNT && i < count; i++){ nth = rand() % (count - i); current = g_list_nth(automation->acceleration, nth); ags_automation_add_acceleration(automation, current->data, TRUE); } /* assert free slection */ CU_ASSERT(automation->selection != NULL); ags_automation_free_selection(automation); CU_ASSERT(automation->selection == NULL); } void ags_automation_test_add_all_to_selection() { AgsAutomation *automation; AgsAcceleration *acceleration; GList *list, *current, *current_selection; gdouble range; guint count; guint x, y; guint nth; guint i; gboolean success; /* create automation */ automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); automation->steps = AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_STEPS; automation->lower = AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_LOWER; automation->upper = AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_UPPER; automation->default_value = AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_DEFAULT_VALUE; range = (AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_UPPER - AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_LOWER); count = 0; for(i = 0; i < AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_COUNT; i++){ x = rand() % AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_WIDTH; y = rand() % AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_HEIGHT; if(ags_automation_find_point(automation, x, y, FALSE) == NULL){ acceleration = ags_acceleration_new(); acceleration->x = x; acceleration->y = AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_LOWER + ((y / AGS_AUTOMATION_TEST_ADD_ALL_TO_SELECTION_HEIGHT) * range); ags_automation_add_acceleration(automation, acceleration, FALSE); count++; } } /* assert all present */ current = automation->acceleration; current_selection = automation->selection; success = TRUE; while(current != NULL && current_selection != NULL){ if(current->data != current_selection->data){ success = FALSE; break; } current = current->next; current_selection = current_selection->next; } CU_ASSERT(success == TRUE); } void ags_automation_test_add_point_to_selection() { AgsAutomation *automation; AgsAcceleration *acceleration; GList *list, *current; gdouble range; guint count; guint x, y; guint nth; guint i; gboolean success; /* create automation */ automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); automation->steps = AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_STEPS; automation->lower = AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_LOWER; automation->upper = AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_UPPER; automation->default_value = AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_DEFAULT_VALUE; range = (AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_UPPER - AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_LOWER); count = 0; for(i = 0; i < AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_COUNT; i++){ x = rand() % AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_WIDTH; y = rand() % AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_HEIGHT; if(ags_automation_find_point(automation, x, y, FALSE) == NULL){ acceleration = ags_acceleration_new(); acceleration->x = x; acceleration->y = AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_LOWER + ((y / AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_HEIGHT) * range); ags_automation_add_acceleration(automation, acceleration, FALSE); count++; } } /* assert add point to selection */ success = TRUE; for(i = 0; i < AGS_AUTOMATION_TEST_ADD_POINT_TO_SELECTION_N_ATTEMPTS; i++){ nth = rand() % count; current = g_list_nth(automation->acceleration, nth); if(current->prev != NULL && current->next != NULL){ ags_automation_add_point_to_selection(automation, AGS_ACCELERATION(current->data)->x, AGS_ACCELERATION(current->data)->y, FALSE); if(ags_automation_find_point(automation, AGS_ACCELERATION(current->data)->x, AGS_ACCELERATION(current->data)->y, TRUE) == NULL){ success = FALSE; break; } } } CU_ASSERT(success == TRUE); } void ags_automation_test_remove_point_from_selection() { AgsAutomation *automation; AgsAcceleration *acceleration, *match; GList *list, *current, *iter, *next; gdouble range; guint count; guint x, y; guint nth; guint n_matches; guint i; gboolean success; /* create automation */ automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, AGS_AUTOMATION_TEST_CONTROL_NAME); automation->steps = AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_STEPS; automation->lower = AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_LOWER; automation->upper = AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_UPPER; automation->default_value = AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_DEFAULT_VALUE; range = (AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_UPPER - AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_LOWER); count = 0; for(i = 0; i < AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_COUNT; i++){ x = rand() % AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_WIDTH; y = rand() % AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_HEIGHT; if(ags_automation_find_point(automation, x, y, FALSE) == NULL){ acceleration = ags_acceleration_new(); acceleration->x = x; acceleration->y = AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_LOWER + ((y / AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_HEIGHT) * range); ags_automation_add_acceleration(automation, acceleration, FALSE); count++; } } /* add point to selection */ for(i = 0; i < AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_SELECTION_COUNT; i++){ nth = rand() % count; current = g_list_nth(automation->acceleration, nth); ags_automation_add_point_to_selection(automation, AGS_ACCELERATION(current->data)->x, AGS_ACCELERATION(current->data)->y, FALSE); } /* assert remove point from selection */ success = TRUE; for(i = 0; i < AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_N_ATTEMPTS; i++){ nth = rand() % (AGS_AUTOMATION_TEST_REMOVE_POINT_FROM_SELECTION_N_ATTEMPTS); current = g_list_nth(automation->selection, nth); if(current == NULL){ continue; } iter = current->next; n_matches = 0; while(iter != NULL && AGS_ACCELERATION(iter->data)->x == AGS_ACCELERATION(current->data)->x && AGS_ACCELERATION(iter->data)->y == AGS_ACCELERATION(current->data)->y){ n_matches++; iter = iter->next; } acceleration = AGS_ACCELERATION(current->data); ags_automation_remove_point_from_selection(automation, acceleration->x, acceleration->y); if((match = ags_automation_find_point(automation, acceleration->x, acceleration->y, TRUE)) != NULL){ if(n_matches == 0){ success = FALSE; break; }else{ next = g_list_find(automation->selection, match); while(next != NULL && AGS_ACCELERATION(next->data)->x == acceleration->x && AGS_ACCELERATION(next->data)->y == acceleration->y){ n_matches--; next = next->next; } if(n_matches != 0){ success = FALSE; break; } } } } CU_ASSERT(success == TRUE); } void ags_automation_test_add_region_to_selection() { //TODO:JK: implement me } void ags_automation_test_remove_region_from_selection() { //TODO:JK: implement me } void ags_automation_test_copy_selection() { //TODO:JK: implement me } void ags_automation_test_cut_selection() { //TODO:JK: implement me } void ags_automation_test_insert_from_clipboard() { //TODO:JK: implement me } void ags_automation_test_get_current() { //TODO:JK: implement me } void ags_automation_test_get_specifier_unique() { AgsAutomation *automation; GList *start; gchar **specifier_unique; gchar **iter; gboolean *found_index; guint specifier_count; guint nth; guint i; gboolean success; static const gchar *specifier[] = { "delay", "feedback", "resonance", "osc1", "osc2", NULL, }; /* count specifiers */ iter = specifier; for(specifier_count = 0; *iter != NULL; specifier_count++, iter++); /* create automation */ start = NULL; found_index = (gboolean *) malloc(specifier_count * sizeof(gboolean)); memset(found_index, 0, specifier_count * sizeof(gboolean)); for(i = 0; i < AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_COUNT; i++){ nth = rand() % specifier_count; found_index[nth] = TRUE; automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, specifier[nth]); automation->steps = AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_STEPS; automation->lower = AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_LOWER; automation->upper = AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_UPPER; automation->default_value = AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_DEFAULT_VALUE; start = g_list_prepend(start, automation); } /* verify each specifier available */ for(i = 0; i < specifier_count; i++){ if(!found_index[i]){ automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, specifier[i]); automation->steps = AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_STEPS; automation->lower = AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_LOWER; automation->upper = AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_UPPER; automation->default_value = AGS_AUTOMATION_TEST_GET_SPECIFIER_UNIQUE_DEFAULT_VALUE; start = g_list_prepend(start, automation); } } /* assert */ success = TRUE; specifier_unique = ags_automation_get_specifier_unique(start); for(i = 0; i < specifier_count; i++){ if(!g_strv_contains(specifier, specifier_unique[i])){ success = FALSE; break; } } CU_ASSERT(success == TRUE && specifier_unique[specifier_count] == NULL); } void ags_automation_test_find_specifier() { AgsAutomation *automation; GList *start; GList *current; gchar **specifier_unique; gchar **iter; guint *n_index; guint specifier_count; guint nth; guint i; guint n_match; gboolean success; static const gchar *unavailable_specifier = "unavailable"; static const gchar *specifier[] = { "delay", "feedback", "resonance", "osc1", "osc2", NULL, }; /* count specifiers */ iter = specifier; for(specifier_count = 0; *iter != NULL; specifier_count++, iter++); /* create automation */ start = NULL; n_index = (guint *) malloc(specifier_count * sizeof(guint)); memset(n_index, 0, specifier_count * sizeof(guint)); for(i = 0; i < AGS_AUTOMATION_TEST_FIND_SPECIFIER_COUNT; i++){ nth = rand() % specifier_count; n_index[nth] += 1; automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, specifier[nth]); automation->steps = AGS_AUTOMATION_TEST_FIND_SPECIFIER_STEPS; automation->lower = AGS_AUTOMATION_TEST_FIND_SPECIFIER_LOWER; automation->upper = AGS_AUTOMATION_TEST_FIND_SPECIFIER_UPPER; automation->default_value = AGS_AUTOMATION_TEST_FIND_SPECIFIER_DEFAULT_VALUE; start = g_list_prepend(start, automation); } /* verify each specifier available */ for(i = 0; i < specifier_count; i++){ if(n_index[i] == 0){ n_index[i] = 1; automation = ags_automation_new(audio, 0, AGS_TYPE_INPUT, specifier[i]); automation->steps = AGS_AUTOMATION_TEST_FIND_SPECIFIER_STEPS; automation->lower = AGS_AUTOMATION_TEST_FIND_SPECIFIER_LOWER; automation->upper = AGS_AUTOMATION_TEST_FIND_SPECIFIER_UPPER; automation->default_value = AGS_AUTOMATION_TEST_FIND_SPECIFIER_DEFAULT_VALUE; start = g_list_prepend(start, automation); } } /* assert unavailable */ current = ags_automation_find_specifier(start, unavailable_specifier); CU_ASSERT(current == NULL); /* assert specifier find n-times */ for(i = 0; i < specifier_count; i++){ current = start; n_match = 0; while((current = ags_automation_find_specifier(current, specifier[i])) != NULL){ n_match++; current = current->next; } CU_ASSERT(n_match == n_index[i] && current == NULL); } } void ags_automation_test_find_specifier_with_type_and_line() { //TODO:JK: implement me } void ags_automation_test_get_value() { //TODO:JK: implement me } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; putenv("LC_ALL=C"); putenv("LANG=C"); /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsAutomationTest", ags_automation_test_init_suite, ags_automation_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsAutomation find port", ags_automation_test_find_port) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation find near timestamp", ags_automation_test_find_near_timestamp) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation add acceleration", ags_automation_test_add_acceleration) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation remove acceleration at position", ags_automation_test_remove_acceleration_at_position) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation is acceleration selected", ags_automation_test_is_acceleration_selected) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation find point", ags_automation_test_find_point) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation find region", ags_automation_test_find_region) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation free selection", ags_automation_test_free_selection) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation add all to selection", ags_automation_test_add_all_to_selection) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation add point to selection", ags_automation_test_add_point_to_selection) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation remove point from selection", ags_automation_test_remove_point_from_selection) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation get specifier unique", ags_automation_test_get_specifier_unique) == NULL) || (CU_add_test(pSuite, "test of AgsAutomation find specifier", ags_automation_test_find_specifier) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_input_test.c0000644000175000017500000002323013246707333016722 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include int ags_input_test_init_suite(); int ags_input_test_clean_suite(); void ags_input_test_open_file(); void ags_input_test_apply_synth(); void ags_input_test_apply_synth_extended(); void ags_input_test_is_active(); void ags_input_test_next_active(); #define AGS_INPUT_TEST_OPEN_FILE_FILENAME "/usr/share/sounds/alsa/Noise.wav" #define AGS_INPUT_TEST_OPEN_FILE_AUDIO_CHANNEL (0) #define AGS_INPUT_TEST_APPLY_SYNTH_OSCILLATOR (AGS_SYNTH_GENERATOR_OSCILLATOR_SIN) #define AGS_INPUT_TEST_APPLY_SYNTH_FREQUENCY (440.0) #define AGS_INPUT_TEST_APPLY_SYNTH_PHASE (0.0) #define AGS_INPUT_TEST_APPLY_SYNTH_VOLUME (0.5) #define AGS_INPUT_TEST_APPLY_SYNTH_N_FRAMES (3200) #define AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_OSCILLATOR (AGS_SYNTH_GENERATOR_OSCILLATOR_SIN) #define AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_FREQUENCY (440.0) #define AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_PHASE (0.0) #define AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_VOLUME (0.5) #define AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_N_FRAMES (3200) #define AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_ATTACK (0) #define AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_BASE_NOTE (-48.0) #define AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_COMPUTE_FLAGS (AGS_SYNTH_GENERATOR_COMPUTE_FIXED_LENGTH) /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_input_test_init_suite() { return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_input_test_clean_suite() { return(0); } void ags_input_test_open_file() { AgsInput *input; gboolean success; input = g_object_new(AGS_TYPE_INPUT, NULL); AGS_CHANNEL(input)->first_recycling = AGS_CHANNEL(input)->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); success = ags_input_open_file(input, AGS_INPUT_TEST_OPEN_FILE_FILENAME, NULL, NULL, NULL, AGS_INPUT_TEST_OPEN_FILE_AUDIO_CHANNEL); CU_ASSERT(success == TRUE && input->file_link != NULL && AGS_CHANNEL(input)->first_recycling->audio_signal != NULL); } void ags_input_test_apply_synth() { AgsInput *input; gboolean success; input = g_object_new(AGS_TYPE_INPUT, NULL); AGS_CHANNEL(input)->first_recycling = AGS_CHANNEL(input)->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); success = ags_input_apply_synth(input, AGS_INPUT_TEST_APPLY_SYNTH_OSCILLATOR, AGS_INPUT_TEST_APPLY_SYNTH_FREQUENCY, AGS_INPUT_TEST_APPLY_SYNTH_PHASE, AGS_INPUT_TEST_APPLY_SYNTH_VOLUME, AGS_INPUT_TEST_APPLY_SYNTH_N_FRAMES); CU_ASSERT(success == TRUE && input->synth_generator != NULL && AGS_CHANNEL(input)->first_recycling->audio_signal != NULL); } void ags_input_test_apply_synth_extended() { AgsInput *input; gboolean success; input = g_object_new(AGS_TYPE_INPUT, NULL); AGS_CHANNEL(input)->first_recycling = AGS_CHANNEL(input)->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); success = ags_input_apply_synth_extended(input, AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_OSCILLATOR, AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_FREQUENCY, AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_PHASE, AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_VOLUME, AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_N_FRAMES, AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_ATTACK, AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_BASE_NOTE, NULL, NULL, AGS_INPUT_TEST_APPLY_SYNTH_EXTENDED_COMPUTE_FLAGS); CU_ASSERT(success == TRUE && input->synth_generator != NULL && AGS_CHANNEL(input)->first_recycling->audio_signal != NULL); } void ags_input_test_is_active() { AgsInput *input; AgsAudioSignal *audio_signal; AgsRecallID *recall_id; AgsRecyclingContext *recycling_context, *parent_recycling_context; gboolean is_active; input = g_object_new(AGS_TYPE_INPUT, NULL); AGS_CHANNEL(input)->first_recycling = AGS_CHANNEL(input)->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, NULL); parent_recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "parent", recycling_context, NULL); /* assert - not active */ is_active = ags_input_is_active(input, recycling_context); CU_ASSERT(is_active == FALSE); /* assert - active */ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling-context", recycling_context, NULL); audio_signal = g_object_new(AGS_TYPE_AUDIO_SIGNAL, "recall-id", recall_id, NULL); ags_recycling_add_audio_signal(AGS_CHANNEL(input)->first_recycling, audio_signal); is_active = ags_input_is_active(input, recycling_context); CU_ASSERT(is_active == TRUE); } void ags_input_test_next_active() { AgsInput *input[3], *current; AgsAudioSignal *audio_signal; AgsRecallID *recall_id; AgsRecyclingContext *recycling_context, *parent_recycling_context; input[0] = g_object_new(AGS_TYPE_INPUT, NULL); AGS_CHANNEL(input[0])->first_recycling = AGS_CHANNEL(input[0])->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); input[1] = g_object_new(AGS_TYPE_INPUT, NULL); AGS_CHANNEL(input[1])->first_recycling = AGS_CHANNEL(input[1])->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); AGS_CHANNEL(input[1])->prev = input[0]; AGS_CHANNEL(input[1])->prev_pad = input[0]; AGS_CHANNEL(input[0])->next = input[1]; AGS_CHANNEL(input[0])->next_pad = input[1]; input[2] = g_object_new(AGS_TYPE_INPUT, NULL); AGS_CHANNEL(input[2])->first_recycling = AGS_CHANNEL(input[2])->last_recycling = g_object_new(AGS_TYPE_RECYCLING, NULL); AGS_CHANNEL(input[2])->prev = input[1]; AGS_CHANNEL(input[2])->prev_pad = input[1]; AGS_CHANNEL(input[1])->next = input[2]; AGS_CHANNEL(input[1])->next_pad = input[2]; recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, NULL); parent_recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "parent", recycling_context, NULL); /* assert - no active */ current = ags_input_next_active(input[0], recycling_context); CU_ASSERT(current == NULL); /* assert - input[2] */ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling-context", recycling_context, NULL); audio_signal = g_object_new(AGS_TYPE_AUDIO_SIGNAL, "recall-id", recall_id, NULL); ags_recycling_add_audio_signal(AGS_CHANNEL(input[2])->first_recycling, audio_signal); current = ags_input_next_active(input[0], recycling_context); CU_ASSERT(current == input[2]); /* assert - input[1] */ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling-context", recycling_context, NULL); audio_signal = g_object_new(AGS_TYPE_AUDIO_SIGNAL, "recall-id", recall_id, NULL); ags_recycling_add_audio_signal(AGS_CHANNEL(input[1])->first_recycling, audio_signal); current = ags_input_next_active(input[0], recycling_context); CU_ASSERT(current == input[1]); /* assert - input[0] */ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling-context", recycling_context, NULL); audio_signal = g_object_new(AGS_TYPE_AUDIO_SIGNAL, "recall-id", recall_id, NULL); ags_recycling_add_audio_signal(AGS_CHANNEL(input[0])->first_recycling, audio_signal); current = ags_input_next_active(input[0], recycling_context); CU_ASSERT(current == input[0]); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsInputTest", ags_input_test_init_suite, ags_input_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } // g_log_set_fatal_mask("GLib-GObject", // "Gtk" G_LOG_DOMAIN, // G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING); /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsInput open file", ags_input_test_open_file) == NULL) || (CU_add_test(pSuite, "test of AgsInput apply synth", ags_input_test_apply_synth) == NULL) || (CU_add_test(pSuite, "test of AgsInput apply synth extended", ags_input_test_apply_synth_extended) == NULL) || (CU_add_test(pSuite, "test of AgsInput is active", ags_input_test_is_active) == NULL) || (CU_add_test(pSuite, "test of AgsInput next active", ags_input_test_next_active) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/test/audio/ags_playback_domain_test.c0000644000175000017500000001616313246707333020707 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include int ags_playback_domain_test_init_suite(); int ags_playback_domain_test_clean_suite(); void ags_playback_domain_test_set_audio_thread(); void ags_playback_domain_test_get_audio_thread(); void ags_playback_domain_test_add_playback(); void ags_playback_domain_test_remove_playback(); #define AGS_PLAYBACK_DOMAIN_TEST_CONFIG "[generic]\n" \ "autosave-thread=false\n" \ "simple-file=true\n" \ "disable-feature=experimental\n" \ "segmentation=4/4\n" \ "\n" \ "[thread]\n" \ "model=super-threaded\n" \ "super-threaded-scope=recycling\n" \ "lock-global=ags-thread\n" \ "lock-parent=ags-recycling-thread\n" \ "\n" \ "[recall]\n" \ "auto-sense=true\n" \ "\n" /* The suite initialization function. * Opens the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_playback_domain_test_init_suite() { AgsConfig *config; config = ags_config_get_instance(); ags_config_load_from_data(config, AGS_PLAYBACK_DOMAIN_TEST_CONFIG, strlen(AGS_PLAYBACK_DOMAIN_TEST_CONFIG)); return(0); } /* The suite cleanup function. * Closes the temporary file used by the tests. * Returns zero on success, non-zero otherwise. */ int ags_playback_domain_test_clean_suite() { return(0); } void ags_playback_domain_test_set_audio_thread() { AgsPlaybackDomain *playback_domain; playback_domain = g_object_new(AGS_TYPE_PLAYBACK_DOMAIN, NULL); /* set playback to NULL and assert */ ags_playback_domain_set_audio_thread(playback_domain, NULL, AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK); CU_ASSERT(playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK] == NULL); /* set sequencer to NULL and assert */ ags_playback_domain_set_audio_thread(playback_domain, NULL, AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER); CU_ASSERT(playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER] == NULL); /* set notation to NULL and assert */ ags_playback_domain_set_audio_thread(playback_domain, NULL, AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION); CU_ASSERT(playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION] == NULL); } void ags_playback_domain_test_get_audio_thread() { AgsPlaybackDomain *playback_domain; AgsThread *thread; playback_domain = g_object_new(AGS_TYPE_PLAYBACK_DOMAIN, NULL); /* get playback to NULL and assert */ thread = ags_playback_domain_get_audio_thread(playback_domain, AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK); CU_ASSERT(playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK] == thread); /* get sequencer to NULL and assert */ thread = ags_playback_domain_get_audio_thread(playback_domain, AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER); CU_ASSERT(playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER] == thread); /* get notation to NULL and assert */ thread = ags_playback_domain_get_audio_thread(playback_domain, AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION); CU_ASSERT(playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION] == thread); } void ags_playback_domain_test_add_playback() { AgsPlaybackDomain *playback_domain; AgsPlayback *playback[3]; playback_domain = g_object_new(AGS_TYPE_PLAYBACK_DOMAIN, NULL); playback[0] = g_object_new(AGS_TYPE_PLAYBACK, NULL); ags_playback_domain_add_playback(playback_domain, playback[0]); playback[1] = g_object_new(AGS_TYPE_PLAYBACK, NULL); ags_playback_domain_add_playback(playback_domain, playback[1]); playback[2] = g_object_new(AGS_TYPE_PLAYBACK, NULL); ags_playback_domain_add_playback(playback_domain, playback[2]); /* assert */ CU_ASSERT(g_list_find(playback_domain->playback, playback[0]) != NULL); CU_ASSERT(g_list_find(playback_domain->playback, playback[1]) != NULL); CU_ASSERT(g_list_find(playback_domain->playback, playback[2]) != NULL); } void ags_playback_domain_test_remove_playback() { AgsPlaybackDomain *playback_domain; AgsPlayback *playback[3]; playback_domain = g_object_new(AGS_TYPE_PLAYBACK_DOMAIN, NULL); playback[0] = g_object_new(AGS_TYPE_PLAYBACK, NULL); ags_playback_domain_add_playback(playback_domain, playback[0]); playback[1] = g_object_new(AGS_TYPE_PLAYBACK, NULL); ags_playback_domain_add_playback(playback_domain, playback[1]); playback[2] = g_object_new(AGS_TYPE_PLAYBACK, NULL); ags_playback_domain_add_playback(playback_domain, playback[2]); /* assert */ ags_playback_domain_remove_playback(playback_domain, playback[1]); CU_ASSERT(g_list_find(playback_domain->playback, playback[1]) == NULL); ags_playback_domain_remove_playback(playback_domain, playback[2]); CU_ASSERT(g_list_find(playback_domain->playback, playback[2]) == NULL); ags_playback_domain_remove_playback(playback_domain, playback[0]); CU_ASSERT(g_list_find(playback_domain->playback, playback[0]) == NULL); } int main(int argc, char **argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsPlaybackDomainTest", ags_playback_domain_test_init_suite, ags_playback_domain_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsPlaybackDomain set audio thread", ags_playback_domain_test_set_audio_thread) == NULL) || (CU_add_test(pSuite, "test of AgsPlaybackDomain get audio thread", ags_playback_domain_test_get_audio_thread) == NULL) || (CU_add_test(pSuite, "test of AgsPlaybackDomain add playback", ags_playback_domain_test_add_playback) == NULL) || (CU_add_test(pSuite, "test of AgsPlaybackDomain remove playback", ags_playback_domain_test_remove_playback) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error()); } gsequencer-1.4.24/ags/plugin/0000755000175000017500000000000013256233675013030 500000000000000gsequencer-1.4.24/ags/plugin/ags_dssi_manager.c0000644000175000017500000003037713246707333016410 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_dssi_manager_class_init(AgsDssiManagerClass *dssi_manager); void ags_dssi_manager_init (AgsDssiManager *dssi_manager); void ags_dssi_manager_dispose(GObject *gobject); void ags_dssi_manager_finalize(GObject *gobject); /** * SECTION:ags_dssi_manager * @short_description: Singleton pattern to organize DSSI * @title: AgsDssiManager * @section_id: * @include: ags/plugin/ags_dssi_manager.h * * The #AgsDssiManager loads/unloads DSSI plugins. */ enum{ ADD, CREATE, LAST_SIGNAL, }; static gpointer ags_dssi_manager_parent_class = NULL; static guint dssi_manager_signals[LAST_SIGNAL]; AgsDssiManager *ags_dssi_manager = NULL; gchar **ags_dssi_default_path = NULL; GType ags_dssi_manager_get_type (void) { static GType ags_type_dssi_manager = 0; if(!ags_type_dssi_manager){ static const GTypeInfo ags_dssi_manager_info = { sizeof (AgsDssiManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_dssi_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsDssiManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_dssi_manager_init, }; ags_type_dssi_manager = g_type_register_static(G_TYPE_OBJECT, "AgsDssiManager", &ags_dssi_manager_info, 0); } return (ags_type_dssi_manager); } void ags_dssi_manager_class_init(AgsDssiManagerClass *dssi_manager) { GObjectClass *gobject; ags_dssi_manager_parent_class = g_type_class_peek_parent(dssi_manager); /* GObjectClass */ gobject = (GObjectClass *) dssi_manager; gobject->dispose = ags_dssi_manager_dispose; gobject->finalize = ags_dssi_manager_finalize; } void ags_dssi_manager_init(AgsDssiManager *dssi_manager) { dssi_manager->dssi_plugin = NULL; if(ags_dssi_default_path == NULL){ gchar *dssi_env; if((dssi_env = getenv("DSSI_PATH")) != NULL){ gchar *iter, *next; guint i; ags_dssi_default_path = (gchar **) malloc(sizeof(gchar *)); iter = dssi_env; i = 0; while((next = index(iter, ':')) != NULL){ ags_dssi_default_path = (gchar **) realloc(ags_dssi_default_path, (i + 2) * sizeof(gchar *)); ags_dssi_default_path[i] = g_strndup(iter, next - iter); iter = next + 1; i++; } if(*iter != '\0'){ ags_dssi_default_path = (gchar **) realloc(ags_dssi_default_path, (i + 2) * sizeof(gchar *)); ags_dssi_default_path[i] = g_strdup(iter); i++; } ags_dssi_default_path[i] = NULL; }else{ gchar *home_dir; guint i; #ifdef AGS_MAC_BUNDLE if((home_dir = getenv("HOME")) != NULL){ ags_dssi_default_path = (gchar **) malloc(7 * sizeof(gchar *)); }else{ ags_dssi_default_path = (gchar **) malloc(6 * sizeof(gchar *)); } #else if((home_dir = getenv("HOME")) != NULL){ ags_dssi_default_path = (gchar **) malloc(6 * sizeof(gchar *)); }else{ ags_dssi_default_path = (gchar **) malloc(5 * sizeof(gchar *)); } #endif i = 0; #ifdef AGS_MAC_BUNDLE ags_dssi_default_path[i++] = g_strdup_printf("%s/dssi", getenv("GSEQUENCER_PLUGIN_DIR")); #endif ags_dssi_default_path[i++] = g_strdup("/usr/lib64/dssi"); ags_dssi_default_path[i++] = g_strdup("/usr/local/lib64/dssi"); ags_dssi_default_path[i++] = g_strdup("/usr/lib/dssi"); ags_dssi_default_path[i++] = g_strdup("/usr/local/lib/dssi"); if(home_dir != NULL){ ags_dssi_default_path[i++] = g_strdup_printf("%s/.dssi", home_dir); } ags_dssi_default_path[i++] = NULL; } } } void ags_dssi_manager_dispose(GObject *gobject) { AgsDssiManager *dssi_manager; dssi_manager = AGS_DSSI_MANAGER(gobject); if(dssi_manager->dssi_plugin != NULL){ g_list_free_full(dssi_manager->dssi_plugin, (GDestroyNotify) g_object_unref); dssi_manager->dssi_plugin = NULL; } /* call parent */ G_OBJECT_CLASS(ags_dssi_manager_parent_class)->dispose(gobject); } void ags_dssi_manager_finalize(GObject *gobject) { AgsDssiManager *dssi_manager; GList *dssi_plugin; dssi_manager = AGS_DSSI_MANAGER(gobject); dssi_plugin = dssi_manager->dssi_plugin; g_list_free_full(dssi_plugin, (GDestroyNotify) g_object_unref); if(dssi_manager == ags_dssi_manager){ ags_dssi_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_dssi_manager_parent_class)->finalize(gobject); } /** * ags_dssi_manager_get_default_path: * * Get dssi manager default plugin path. * * Returns: the plugin default search path as a string vector * * Since: 1.0.0 */ gchar** ags_dssi_manager_get_default_path() { return(ags_dssi_default_path); } /** * ags_dssi_manager_set_default_path: * @default_path: the string vector array to use as default path * * Set dssi manager default plugin path. * * Since: 1.0.0 */ void ags_dssi_manager_set_default_path(gchar** default_path) { ags_dssi_default_path = default_path; } /** * ags_dssi_manager_get_filenames: * @dssi_manager: the #AgsDssiManager * * Retrieve all filenames * * Returns: a %NULL-terminated array of filenames * * Since: 1.0.0 */ gchar** ags_dssi_manager_get_filenames(AgsDssiManager *dssi_manager) { GList *dssi_plugin; gchar **filenames; guint i; gboolean contains_filename; if(!AGS_DSSI_MANAGER(dssi_manager)){ return(NULL); } dssi_plugin = dssi_manager->dssi_plugin; filenames = NULL; for(i = 0; dssi_plugin != NULL;){ if(filenames == NULL){ filenames = (gchar **) malloc(2 * sizeof(gchar *)); filenames[i] = AGS_BASE_PLUGIN(dssi_plugin->data)->filename; filenames[i + 1] = NULL; i++; }else{ #ifdef HAVE_GLIB_2_44 contains_filename = g_strv_contains(filenames, AGS_BASE_PLUGIN(dssi_plugin->data)->filename); #else contains_filename = ags_strv_contains(filenames, AGS_BASE_PLUGIN(dssi_plugin->data)->filename); #endif if(!contains_filename){ filenames = (gchar **) realloc(filenames, (i + 2) * sizeof(gchar *)); filenames[i] = AGS_BASE_PLUGIN(dssi_plugin->data)->filename; filenames[i + 1] = NULL; i++; } } dssi_plugin = dssi_plugin->next; } return(filenames); } /** * ags_dssi_manager_find_dssi_plugin: * @dssi_manager: the #AgsDssiManager * @filename: the filename of the plugin * @effect: the effect's name * * Lookup filename in loaded plugins. * * Returns: the #AgsDssiPlugin-struct * * Since: 1.0.0 */ AgsDssiPlugin* ags_dssi_manager_find_dssi_plugin(AgsDssiManager *dssi_manager, gchar *filename, gchar *effect) { AgsDssiPlugin *dssi_plugin; GList *list; if(!AGS_DSSI_MANAGER(dssi_manager)){ return(NULL); } list = dssi_manager->dssi_plugin; while(list != NULL){ dssi_plugin = AGS_DSSI_PLUGIN(list->data); if(!g_strcmp0(AGS_BASE_PLUGIN(dssi_plugin)->filename, filename) && !g_strcmp0(AGS_BASE_PLUGIN(dssi_plugin)->effect, effect)){ return(dssi_plugin); } list = list->next; } return(NULL); } /** * ags_dssi_manager_load_blacklist: * @dssi_manager: the #AgsDssiManager * @blacklist_filename: the filename as string * * Load blacklisted plugin filenames. * * Since: 1.0.0 */ void ags_dssi_manager_load_blacklist(AgsDssiManager *dssi_manager, gchar *blacklist_filename) { if(!AGS_DSSI_MANAGER(dssi_manager) || blacklist_filename == NULL){ return; } if(g_file_test(blacklist_filename, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))){ FILE *file; gchar *str; file = fopen(blacklist_filename, "r"); while(getline(&str, NULL, file) != -1){ dssi_manager->dssi_plugin_blacklist = g_list_prepend(dssi_manager->dssi_plugin_blacklist, str); } } } /** * ags_dssi_manager_load_file: * @dssi_manager: the #AgsDssiManager * @dssi_path: the dssi path * @filename: the filename of the plugin * * Load @filename specified plugin. * * Since: 1.0.0 */ void ags_dssi_manager_load_file(AgsDssiManager *dssi_manager, gchar *dssi_path, gchar *filename) { AgsDssiPlugin *dssi_plugin; gchar *path; gchar *effect; void *plugin_so; DSSI_Descriptor_Function dssi_descriptor; DSSI_Descriptor *plugin_descriptor; unsigned long i; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; if(!AGS_IS_DSSI_MANAGER(dssi_manager) || dssi_path == NULL || filename == NULL){ return; } pthread_mutex_lock(&(mutex)); path = g_strdup_printf("%s/%s", dssi_path, filename); g_message("ags_dssi_manager.c loading - %s", path); plugin_so = dlopen(path, RTLD_NOW); if(plugin_so == NULL){ g_warning("ags_dssi_manager.c - failed to load static object file"); dlerror(); pthread_mutex_unlock(&(mutex)); return; } dssi_descriptor = (DSSI_Descriptor_Function) dlsym(plugin_so, "dssi_descriptor"); if(dlerror() == NULL && dssi_descriptor){ for(i = 0; (plugin_descriptor = dssi_descriptor(i)) != NULL; i++){ if(ags_base_plugin_find_effect(dssi_manager->dssi_plugin, path, plugin_descriptor->LADSPA_Plugin->Name) == NULL){ dssi_plugin = ags_dssi_plugin_new(path, plugin_descriptor->LADSPA_Plugin->Name, i); ags_base_plugin_load_plugin((AgsBasePlugin *) dssi_plugin); dssi_manager->dssi_plugin = g_list_prepend(dssi_manager->dssi_plugin, dssi_plugin); } } } pthread_mutex_unlock(&(mutex)); g_free(path); } /** * ags_dssi_manager_load_default_directory: * @dssi_manager: the #AgsDssiManager * * Loads all available plugins. * * Since: 1.0.0 */ void ags_dssi_manager_load_default_directory(AgsDssiManager *dssi_manager) { AgsDssiPlugin *dssi_plugin; GDir *dir; gchar **dssi_path; gchar *filename; GError *error; if(!AGS_DSSI_MANAGER(dssi_manager)){ return; } dssi_path = ags_dssi_default_path; while(*dssi_path != NULL){ if(!g_file_test(*dssi_path, G_FILE_TEST_EXISTS)){ dssi_path++; continue; } error = NULL; dir = g_dir_open(*dssi_path, 0, &error); if(error != NULL){ g_warning("%s", error->message); dssi_path++; continue; } while((filename = g_dir_read_name(dir)) != NULL){ if(g_str_has_suffix(filename, AGS_LIBRARY_SUFFIX) && !g_list_find_custom(dssi_manager->dssi_plugin_blacklist, filename, strcmp)){ ags_dssi_manager_load_file(dssi_manager, *dssi_path, filename); } } dssi_path++; } } /** * ags_dssi_manager_get_instance: * * Get instance. * * Returns: the #AgsDssiManager * * Since: 1.0.0 */ AgsDssiManager* ags_dssi_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&(mutex)); if(ags_dssi_manager == NULL){ ags_dssi_manager = ags_dssi_manager_new(); pthread_mutex_unlock(&(mutex)); }else{ pthread_mutex_unlock(&(mutex)); } return(ags_dssi_manager); } /** * ags_dssi_manager_new: * * Creates an #AgsDssiManager * * Returns: a new #AgsDssiManager * * Since: 1.0.0 */ AgsDssiManager* ags_dssi_manager_new() { AgsDssiManager *dssi_manager; dssi_manager = (AgsDssiManager *) g_object_new(AGS_TYPE_DSSI_MANAGER, NULL); return(dssi_manager); } gsequencer-1.4.24/ags/plugin/ags_ladspa_conversion.h0000644000175000017500000000515713246707333017470 00000000000000/* 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 . */ #ifndef __AGS_LADSPA_CONVERSION_H__ #define __AGS_LADSPA_CONVERSION_H__ #include #include #include #define AGS_TYPE_LADSPA_CONVERSION (ags_ladspa_conversion_get_type()) #define AGS_LADSPA_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONVERSION, AgsLadspaConversion)) #define AGS_LADSPA_CONVERSION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CONVERSION, AgsLadspaConversionClass)) #define AGS_IS_LADSPA_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CONVERSION)) #define AGS_IS_LADSPA_CONVERSION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CONVERSION)) #define AGS_LADSPA_CONVERSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_CONVERSION, AgsLadspaConversionClass)) typedef struct _AgsLadspaConversion AgsLadspaConversion; typedef struct _AgsLadspaConversionClass AgsLadspaConversionClass; /** * AgsLadspaConversionFlags: * @AGS_LADSPA_CONVERSION_SAMPLERATE: samplerate * @AGS_LADSPA_CONVERSION_BOUNDED_BELOW: bounded below * @AGS_LADSPA_CONVERSION_BOUNDED_ABOVE: bounded above * @AGS_LADSPA_CONVERSION_LOGARITHMIC: logarithmic * * Enum values to control the behavior or indicate internal state of #AgsLadspaConversion by * enable/disable as flags. */ typedef enum{ AGS_LADSPA_CONVERSION_SAMPLERATE = 1, AGS_LADSPA_CONVERSION_BOUNDED_BELOW = 1 << 1, AGS_LADSPA_CONVERSION_BOUNDED_ABOVE = 1 << 2, AGS_LADSPA_CONVERSION_LOGARITHMIC = 1 << 3, }AgsLadspaConversionFlags; struct _AgsLadspaConversion { AgsConversion conversion; guint flags; guint samplerate; }; struct _AgsLadspaConversionClass { AgsConversionClass conversion; }; GType ags_ladspa_conversion_get_type(void); AgsLadspaConversion* ags_ladspa_conversion_new(); #endif /*__AGS_LADSPA_CONVERSION_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_conversion.c0000644000175000017500000000704713246707333016722 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2016 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 . */ #include #include #include void ags_lv2_conversion_class_init(AgsLv2ConversionClass *conversion); void ags_lv2_conversion_init (AgsLv2Conversion *conversion); void ags_lv2_conversion_finalize(GObject *gobject); gdouble ags_lv2_conversion_convert(AgsConversion *conversion, gdouble value, gboolean reverse); /** * SECTION:ags_lv2_conversion * @short_description: Conversion of values * @title: AgsLv2Conversion * @section_id: * @include: ags/plugin/ags_lv2_conversion.h * * The #AgsLv2Conversion converts values. */ static gpointer ags_lv2_conversion_parent_class = NULL; GType ags_lv2_conversion_get_type(void) { static GType ags_type_lv2_conversion = 0; if(!ags_type_lv2_conversion){ static const GTypeInfo ags_lv2_conversion_info = { sizeof (AgsLv2ConversionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_conversion_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2Conversion), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_conversion_init, }; ags_type_lv2_conversion = g_type_register_static(AGS_TYPE_CONVERSION, "AgsLv2Conversion", &ags_lv2_conversion_info, 0); } return(ags_type_lv2_conversion); } void ags_lv2_conversion_class_init(AgsLv2ConversionClass *lv2_conversion) { AgsConversionClass *conversion; GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_conversion_parent_class = g_type_class_peek_parent(lv2_conversion); /* GObjectClass */ gobject = (GObjectClass *) lv2_conversion; gobject->finalize = ags_lv2_conversion_finalize; /* AgsConversionClass */ conversion = (AgsConversionClass *) lv2_conversion; conversion->convert = ags_lv2_conversion_convert; } void ags_lv2_conversion_init(AgsLv2Conversion *lv2_conversion) { AgsConfig *config; gchar *str; lv2_conversion->flags = 0; } void ags_lv2_conversion_finalize(GObject *gobject) { /* empty */ } gdouble ags_lv2_conversion_convert(AgsConversion *conversion, gdouble value, gboolean reverse) { AgsLv2Conversion *lv2_conversion; lv2_conversion = AGS_LV2_CONVERSION(conversion); if(reverse){ if((AGS_LV2_CONVERSION_LOGARITHMIC & (lv2_conversion->flags)) != 0){ value = log(value); } }else{ if((AGS_LV2_CONVERSION_LOGARITHMIC & (lv2_conversion->flags)) != 0){ value = exp(value); } } return(value); } /** * ags_lv2_conversion_new: * * Instantiate a new #AgsLv2Conversion. * * Returns: the new instance * * Since: 1.0.0 */ AgsLv2Conversion* ags_lv2_conversion_new() { AgsLv2Conversion *conversion; conversion = g_object_new(AGS_TYPE_LV2_CONVERSION, NULL); return(conversion); } gsequencer-1.4.24/ags/plugin/ags_lv2ui_manager.c0000644000175000017500000005646013247742066016513 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_lv2ui_manager_class_init(AgsLv2uiManagerClass *lv2ui_manager); void ags_lv2ui_manager_init (AgsLv2uiManager *lv2ui_manager); void ags_lv2ui_manager_dispose(GObject *gobject); void ags_lv2ui_manager_finalize(GObject *gobject); /** * SECTION:ags_lv2ui_manager * @short_description: Singleton pattern to organize LV2UI * @title: AgsLv2uiManager * @section_id: * @include: ags/plugin/ags_lv2ui_manager.h * * The #AgsLv2uiManager loads/unloads LV2UI plugins. */ static gpointer ags_lv2ui_manager_parent_class = NULL; AgsLv2uiManager *ags_lv2ui_manager = NULL; gchar **ags_lv2ui_default_path = NULL; GType ags_lv2ui_manager_get_type (void) { static GType ags_type_lv2ui_manager = 0; if(!ags_type_lv2ui_manager){ static const GTypeInfo ags_lv2ui_manager_info = { sizeof (AgsLv2uiManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2ui_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2uiManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2ui_manager_init, }; ags_type_lv2ui_manager = g_type_register_static(G_TYPE_OBJECT, "AgsLv2uiManager", &ags_lv2ui_manager_info, 0); } return (ags_type_lv2ui_manager); } void ags_lv2ui_manager_class_init(AgsLv2uiManagerClass *lv2ui_manager) { GObjectClass *gobject; ags_lv2ui_manager_parent_class = g_type_class_peek_parent(lv2ui_manager); /* GObjectClass */ gobject = (GObjectClass *) lv2ui_manager; gobject->dispose = ags_lv2ui_manager_dispose; gobject->finalize = ags_lv2ui_manager_finalize; } void ags_lv2ui_manager_init(AgsLv2uiManager *lv2ui_manager) { lv2ui_manager->lv2ui_plugin = NULL; if(ags_lv2ui_default_path == NULL){ gchar *lv2ui_env; if((lv2ui_env = getenv("LV2_PATH")) != NULL){ gchar *iter, *next; guint i; ags_lv2ui_default_path = (gchar **) malloc(sizeof(gchar *)); iter = lv2ui_env; i = 0; while((next = index(iter, ':')) != NULL){ ags_lv2ui_default_path = (gchar **) realloc(ags_lv2ui_default_path, (i + 2) * sizeof(gchar *)); ags_lv2ui_default_path[i] = g_strndup(iter, next - iter); iter = next + 1; i++; } if(*iter != '\0'){ ags_lv2ui_default_path = (gchar **) realloc(ags_lv2ui_default_path, (i + 2) * sizeof(gchar *)); ags_lv2ui_default_path[i] = g_strdup(iter); i++; } ags_lv2ui_default_path[i] = NULL; }else{ gchar *home_dir; guint i; #ifdef __APPLE__ #ifdef AGS_MAC_BUNDLE if((home_dir = getenv("HOME")) != NULL){ ags_lv2ui_default_path = (gchar **) malloc(6 * sizeof(gchar *)); }else{ ags_lv2ui_default_path = (gchar **) malloc(5 * sizeof(gchar *)); } #else if((home_dir = getenv("HOME")) != NULL){ ags_lv2ui_default_path = (gchar **) malloc(5 * sizeof(gchar *)); }else{ ags_lv2ui_default_path = (gchar **) malloc(4 * sizeof(gchar *)); } #endif i = 0; #ifdef AGS_MAC_BUNDLE ags_lv2ui_default_path[i++] = g_strdup_printf("%s/lv2", getenv("GSEQUENCER_PLUGIN_DIR")); #endif ags_lv2ui_default_path[i++] = g_strdup("/Library/Audio/Plug-Ins/LV2"); ags_lv2ui_default_path[i++] = g_strdup("/usr/lib/lv2"); ags_lv2ui_default_path[i++] = g_strdup("/usr/local/lib/lv2"); if(home_dir != NULL){ ags_lv2ui_default_path[i++] = g_strdup_printf("%s/Library/Audio/Plug-Ins/LV2", home_dir); } ags_lv2ui_default_path[i++] = NULL; #else if((home_dir = getenv("HOME")) != NULL){ ags_lv2ui_default_path = (gchar **) malloc(6 * sizeof(gchar *)); }else{ ags_lv2ui_default_path = (gchar **) malloc(5 * sizeof(gchar *)); } i = 0; ags_lv2ui_default_path[i++] = g_strdup("/usr/lib64/lv2"); ags_lv2ui_default_path[i++] = g_strdup("/usr/local/lib64/lv2"); ags_lv2ui_default_path[i++] = g_strdup("/usr/lib/lv2"); ags_lv2ui_default_path[i++] = g_strdup("/usr/local/lib/lv2"); if(home_dir != NULL){ ags_lv2ui_default_path[i++] = g_strdup_printf("%s/.lv2", home_dir); } ags_lv2ui_default_path[i++] = NULL; #endif } } } void ags_lv2ui_manager_dispose(GObject *gobject) { AgsLv2uiManager *lv2ui_manager; lv2ui_manager = AGS_LV2UI_MANAGER(gobject); if(lv2ui_manager->lv2ui_plugin != NULL){ g_list_free_full(lv2ui_manager->lv2ui_plugin, g_object_unref); lv2ui_manager->lv2ui_plugin = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2ui_manager_parent_class)->dispose(gobject); } void ags_lv2ui_manager_finalize(GObject *gobject) { AgsLv2uiManager *lv2ui_manager; GList *lv2ui_plugin; lv2ui_manager = AGS_LV2UI_MANAGER(gobject); lv2ui_plugin = lv2ui_manager->lv2ui_plugin; g_list_free_full(lv2ui_plugin, g_object_unref); if(lv2ui_manager == ags_lv2ui_manager){ ags_lv2ui_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2ui_manager_parent_class)->finalize(gobject); } /** * ags_lv2ui_manager_get_default_path: * * Get lv2ui manager default plugin path. * * Returns: the plugin default search path as a string vector * * Since: 1.0.0 */ gchar** ags_lv2ui_manager_get_default_path() { return(ags_lv2ui_default_path); } /** * ags_lv2ui_manager_set_default_path: * @default_path: the string vector array to use as default path * * Set lv2ui manager default plugin path. * * Since: 1.0.0 */ void ags_lv2ui_manager_set_default_path(gchar** default_path) { ags_lv2ui_default_path = default_path; } /** * ags_lv2ui_manager_get_filenames: * @lv2ui_manager: the #AgsLv2uiManager * * Retrieve all filenames * * Returns: a %NULL-terminated array of filenames * * Since: 1.0.0 */ gchar** ags_lv2ui_manager_get_filenames(AgsLv2uiManager *lv2ui_manager) { GList *lv2ui_plugin; gchar **filenames; guint i; gboolean contains_filename; if(!AGS_IS_LV2UI_MANAGER(lv2ui_manager)){ return(NULL); } lv2ui_plugin = lv2ui_manager->lv2ui_plugin; filenames = NULL; for(i = 0; lv2ui_plugin != NULL;){ if(filenames == NULL){ filenames = (gchar **) malloc(2 * sizeof(gchar *)); filenames[i] = AGS_BASE_PLUGIN(lv2ui_plugin->data)->ui_filename; filenames[i + 1] = NULL; i++; }else{ #ifdef HAVE_GLIB_2_44 contains_filename = g_strv_contains(filenames, AGS_BASE_PLUGIN(lv2ui_plugin->data)->ui_filename); #else contains_filename = ags_strv_contains(filenames, AGS_BASE_PLUGIN(lv2ui_plugin->data)->ui_filename); #endif if(!contains_filename){ filenames = (gchar **) realloc(filenames, (i + 2) * sizeof(gchar *)); filenames[i] = AGS_BASE_PLUGIN(lv2ui_plugin->data)->ui_filename; filenames[i + 1] = NULL; i++; } } lv2ui_plugin = lv2ui_plugin->next; } return(filenames); } /** * ags_lv2ui_manager_find_lv2ui_plugin: * @lv2ui_manager: the #AgsLv2uiManager * @ui_filename: the UI filename of the plugin * @ui_effect: the UI effect's name * * Lookup UI filename in loaded plugins. * * Returns: the #AgsLv2uiPlugin-struct * * Since: 1.0.0 */ AgsLv2uiPlugin* ags_lv2ui_manager_find_lv2ui_plugin(AgsLv2uiManager *lv2ui_manager, gchar *ui_filename, gchar *ui_effect) { AgsLv2uiPlugin *lv2ui_plugin; GList *list; if(!AGS_IS_LV2UI_MANAGER(lv2ui_manager) || ui_filename == NULL || ui_effect == NULL){ return(NULL); } list = lv2ui_manager->lv2ui_plugin; while(list != NULL){ lv2ui_plugin = AGS_LV2UI_PLUGIN(list->data); if(!g_ascii_strcasecmp(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, ui_filename) && !g_ascii_strcasecmp(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_effect, ui_effect)){ return(lv2ui_plugin); } list = list->next; } return(NULL); } /** * ags_lv2ui_manager_find_lv2ui_plugin_with_index: * @lv2ui_manager: the #AgsLv2uiManager * @ui_filename: the UI filename of the plugin * @ui_effect_index: the UI index * * Lookup @ui_filename with @ui_effect_index in loaded plugins. * * Returns: the #AgsLv2uiPlugin-struct * * Since: 1.0.0 */ AgsLv2uiPlugin* ags_lv2ui_manager_find_lv2ui_plugin_with_index(AgsLv2uiManager *lv2ui_manager, gchar *ui_filename, guint ui_effect_index) { AgsLv2uiPlugin *lv2ui_plugin; GList *list; if(!AGS_IS_LV2UI_MANAGER(lv2ui_manager) || ui_filename == NULL){ return(NULL); } list = lv2ui_manager->lv2ui_plugin; while(list != NULL){ lv2ui_plugin = AGS_LV2UI_PLUGIN(list->data); if(!g_ascii_strcasecmp(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, ui_filename) && AGS_BASE_PLUGIN(lv2ui_plugin)->ui_effect_index == ui_effect_index){ return(lv2ui_plugin); } list = list->next; } return(NULL); } /** * ags_lv2ui_manager_load_blacklist: * @lv2ui_manager: the #AgsLv2uiManager * @blacklist_filename: the filename as string * * Load blacklisted plugin filenames. * * Since: 1.0.0 */ void ags_lv2ui_manager_load_blacklist(AgsLv2uiManager *lv2ui_manager, gchar *blacklist_filename) { if(!AGS_IS_LV2UI_MANAGER(lv2ui_manager) || blacklist_filename == NULL){ return; } if(g_file_test(blacklist_filename, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))){ FILE *file; gchar *str; file = fopen(blacklist_filename, "r"); while(getline(&str, NULL, file) != -1){ lv2ui_manager->lv2ui_plugin_blacklist = g_list_prepend(lv2ui_manager->lv2ui_plugin_blacklist, str); } } } /** * ags_lv2ui_manager_load_file: * @lv2ui_manager: the #AgsLv2uiManager * @manifest: the manifest * @turtle: the #AgsTurtle * @lv2ui_path: the lv2ui path * @filename: the filename of the plugin * * Load @filename specified plugin. * * Since: 1.0.0 */ void ags_lv2ui_manager_load_file(AgsLv2uiManager *lv2ui_manager, AgsTurtle *manifest, AgsTurtle *turtle, gchar *lv2ui_path, gchar *filename) { AgsLv2uiPlugin *lv2ui_plugin; xmlNode *node; GList *gtk_uri_list; GList *qt4_uri_list; GList *qt5_uri_list; gchar *xpath; GError *error; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; auto void ags_lv2ui_manager_load_file_ui_plugin(GList *list); void ags_lv2ui_manager_load_file_ui_plugin(GList *list){ GList *uri_list; GList *binary_list; gchar *ui_filename; gchar *str; gchar *path; gchar *ui_path; gchar *xpath; gchar *gui_uri; guint ui_effect_index; void *ui_plugin_so; LV2UI_DescriptorFunction lv2ui_descriptor; LV2UI_Descriptor *ui_plugin_descriptor; uint32_t i; if(list == NULL){ return; } while(list != NULL){ /* find URI */ xpath = "/rdf-turtle-doc/rdf-statement/rdf-triple/rdf-subject/rdf-iri"; uri_list = ags_turtle_find_xpath_with_context_node(turtle, xpath, list->data); gui_uri = NULL; if(uri_list != NULL){ xmlNode *child; child = ((xmlNode *) uri_list->data)->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!g_ascii_strncasecmp(child->name, "rdf-iriref", 11)){ gui_uri = xmlNodeGetContent(child); if(strlen(gui_uri) > 2){ gui_uri = g_strndup(gui_uri + 1, strlen(gui_uri) - 2); } break; }else if(!g_ascii_strncasecmp(child->name, "rdf-prefixed-name", 18)){ xmlNode *pname_node; gchar *pname; pname_node = child->children; pname = NULL; while(pname_node != NULL){ if(pname_node->type == XML_ELEMENT_NODE){ if(!g_ascii_strncasecmp(pname_node->name, "rdf-pname-ln", 11)){ pname = xmlNodeGetContent(pname_node); break; } } pname_node = pname_node->next; } gui_uri = pname; if(pname != NULL){ gchar *suffix, *prefix; gchar *offset; offset = index(pname, ':'); if(offset != NULL){ GList *prefix_node; offset++; suffix = g_strndup(offset, strlen(pname) - (offset - pname)); prefix = g_strndup(pname, offset - pname); str = g_strdup_printf("//rdf-pname-ns[text()='%s']/following-sibling::*[self::rdf-iriref][1]", prefix); prefix_node = ags_turtle_find_xpath(turtle, str); free(str); if(prefix_node != NULL){ gchar *iriref; iriref = xmlNodeGetContent(prefix_node->data); if(iriref != NULL){ if(strlen(iriref) > 2){ gchar *tmp; tmp = g_strndup(iriref + 1, strlen(iriref) - 2); gui_uri = g_strdup_printf("%s%s", tmp, suffix); free(tmp); } free(iriref); } } } } break; } } child = child->next; } } /* load plugin */ if(gui_uri == NULL){ list = list->next; continue; } xpath = "/rdf-turtle-doc/rdf-statement/rdf-triple//rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':binary') + 1) = ':binary']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-iriref[substring(text(), string-length(text()) - string-length('.so>') + 1) = '.so>']"; binary_list = ags_turtle_find_xpath_with_context_node(turtle, xpath, list->data); /* load */ while(binary_list != NULL){ gchar *tmp; /* read filename of binary */ str = xmlNodeGetContent((xmlNode *) binary_list->data); if(str == NULL){ binary_list = binary_list->next; continue; } str = g_strndup(&(str[1]), strlen(str) - 2); if((tmp = strstr(filename, "/")) != NULL){ tmp = g_strndup(filename, tmp - filename); }else{ binary_list = binary_list->next; continue; } ui_filename = g_strdup_printf("%s/%s", tmp, str); free(str); break; } path = g_strdup_printf("%s/%s", lv2ui_path, filename); ui_path = g_strdup_printf("%s/%s", lv2ui_path, ui_filename); g_message("lv2ui check - %s", ui_path); /* get gui_uri index and append plugin */ ui_plugin_so = dlopen(ui_path, RTLD_NOW); if(ui_plugin_so == NULL){ g_warning("ags_lv2ui_manager.c - failed to load static object file"); dlerror(); list = list->next; continue; } lv2ui_descriptor = (LV2UI_DescriptorFunction) dlsym(ui_plugin_so, "lv2ui_descriptor"); if(dlerror() == NULL && lv2ui_descriptor){ for(i = 0; (ui_plugin_descriptor = lv2ui_descriptor(i)) != NULL; i++){ if(ui_path != NULL && gui_uri != NULL && !g_ascii_strcasecmp(ui_plugin_descriptor->URI, gui_uri)){ ui_effect_index = i; /* check if already added */ lv2ui_plugin = ags_lv2ui_manager_find_lv2ui_plugin_with_index(lv2ui_manager, ui_path, ui_effect_index); if(lv2ui_plugin != NULL){ break; } if(ags_base_plugin_find_ui_effect_index(lv2ui_manager->lv2ui_plugin, ui_path, ui_effect_index) == NULL){ g_message("ags_lv2ui_manager.c loading - %s %s with ui-effect-index %u", ui_path, turtle->filename, ui_effect_index); lv2ui_plugin = g_object_new(AGS_TYPE_LV2UI_PLUGIN, "gui-uri", gui_uri, "manifest", manifest, "gui-turtle", turtle, "ui-filename", ui_path, "ui-effect-index", ui_effect_index, NULL); ags_base_plugin_load_plugin((AgsBasePlugin *) lv2ui_plugin); lv2ui_manager->lv2ui_plugin = g_list_prepend(lv2ui_manager->lv2ui_plugin, lv2ui_plugin); } break; } } } list = list->next; } } /* entry point */ if(!AGS_IS_LV2UI_MANAGER(lv2ui_manager) || !AGS_IS_TURTLE(manifest) || !AGS_IS_TURTLE(turtle) || lv2ui_path == NULL || filename == NULL){ return; } /* load plugin */ pthread_mutex_lock(&(mutex)); /* check if gtk UI */ xpath = "/rdf-turtle-doc/rdf-statement/rdf-triple/rdf-predicate-object-list/rdf-verb[@verb='a']/following-sibling::*[self::rdf-object-list]//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':gtkui') + 1) = ':gtkui']//ancestor::*[self::rdf-triple]"; gtk_uri_list = ags_turtle_find_xpath(turtle, xpath); ags_lv2ui_manager_load_file_ui_plugin(gtk_uri_list); #if 0 /* check if qt4 UI */ xpath = "/rdf-turtle-doc/rdf-statement/rdf-triple/rdf-predicate-object-list/rdf-verb[@verb='a']/following-sibling::*[self::rdf-object-list]//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':qt4ui') + 1) = ':qt4ui']//ancestor::*[self::rdf-triple]"; qt4_uri_list = ags_turtle_find_xpath(turtle, xpath); ags_lv2ui_manager_load_file_ui_plugin(qt4_uri_list); /* check if qt5 UI */ xpath = "/rdf-turtle-doc/rdf-statement/rdf-triple/rdf-predicate-object-list/rdf-verb[@verb='a']/following-sibling::*[self::rdf-object-list]//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':qt5ui') + 1) = ':qt5ui']//ancestor::*[self::rdf-triple]"; qt5_uri_list = ags_turtle_find_xpath(turtle, xpath); ags_lv2ui_manager_load_file_ui_plugin(qt5_uri_list); #endif /* */ pthread_mutex_unlock(&(mutex)); } /** * ags_lv2ui_manager_load_default_directory: * @lv2ui_manager: the #AgsLv2uiManager * * Loads all available plugins. * * Since: 1.0.0 */ void ags_lv2ui_manager_load_default_directory(AgsLv2uiManager *lv2ui_manager) { GDir *dir; gchar **lv2ui_path; gchar *path, *plugin_path; gchar *str; GError *error; if(!AGS_IS_LV2UI_MANAGER(lv2ui_manager)){ return; } lv2ui_path = ags_lv2ui_default_path; while(*lv2ui_path != NULL){ if(!g_file_test(*lv2ui_path, G_FILE_TEST_EXISTS)){ lv2ui_path++; continue; } error = NULL; dir = g_dir_open(*lv2ui_path, 0, &error); if(error != NULL){ g_warning("%s", error->message); lv2ui_path++; continue; } while((path = g_dir_read_name(dir)) != NULL){ if(!g_ascii_strncasecmp(path, "..", 3) || !g_ascii_strncasecmp(path, ".", 2)){ continue; } plugin_path = g_strdup_printf("%s/%s", *lv2ui_path, path); if(g_file_test(plugin_path, G_FILE_TEST_IS_DIR)){ AgsTurtle *manifest, *turtle; xmlDoc *doc; FILE *out; xmlChar *buffer; int size; GList *ttl_list, *ttl_start, *binary_list; gchar *manifest_filename; gchar *turtle_path, *filename; gboolean turtle_loaded; manifest_filename = g_strdup_printf("%s/manifest.ttl", plugin_path); if(!g_file_test(manifest_filename, G_FILE_TEST_EXISTS)){ continue; } manifest = ags_turtle_new(manifest_filename); ags_turtle_load(manifest, NULL); /* read binary from turtle */ binary_list = ags_turtle_find_xpath(manifest, "/rdf-turtle-doc/rdf-statement/rdf-triple/rdf-predicate-object-list/rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':binary') + 1) = ':binary']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-iriref[substring(text(), string-length(text()) - string-length('.so>') + 1) = '.so>']"); /* persist XML */ //NOTE:JK: no need for it // xmlDocDumpFormatMemoryEnc(manifest->doc, &buffer, &size, "UTF-8", TRUE); // out = fopen(g_strdup_printf("%s/manifest.xml", plugin_path), "w+"); // fwrite(buffer, size, sizeof(xmlChar), out); // fflush(out); /* load */ while(binary_list != NULL){ /* read filename of binary */ str = xmlNodeGetContent((xmlNode *) binary_list->data); if(str == NULL){ binary_list = binary_list->next; continue; } str = g_strndup(&(str[1]), strlen(str) - 2); filename = g_strdup_printf("%s/%s", path, str); free(str); /* read turtle from manifest */ ttl_start = ttl_list = ags_turtle_find_xpath_with_context_node(manifest, "./ancestor::*[self::rdf-triple][1]//rdf-iriref[substring(text(), string-length(text()) - string-length('.ttl>') + 1) = '.ttl>']", (xmlNode *) binary_list->data); while(ttl_list != NULL){ /* read filename */ turtle_path = xmlNodeGetContent((xmlNode *) ttl_list->data); if(turtle_path == NULL){ ttl_list = ttl_list->next; continue; } turtle_path = g_strndup(&(turtle_path[1]), strlen(turtle_path) - 2); if(!g_ascii_strncasecmp(turtle_path, "http://", 7)){ ttl_list = ttl_list->next; continue; } /* load turtle doc */ if((turtle = (AgsTurtle *) ags_turtle_manager_find(ags_turtle_manager_get_instance(), turtle_path)) == NULL){ turtle = ags_turtle_new(g_strdup_printf("%s/%s", plugin_path, turtle_path)); ags_turtle_load(turtle, NULL); ags_turtle_manager_add(ags_turtle_manager_get_instance(), (GObject *) turtle); } /* load specified plugin */ if(!g_list_find_custom(lv2ui_manager->lv2ui_plugin_blacklist, filename, strcmp)){ ags_lv2ui_manager_load_file(lv2ui_manager, manifest, turtle, *lv2ui_path, filename); } /* persist XML */ //NOTE:JK: no need for it // xmlDocDumpFormatMemoryEnc(turtle->doc, &buffer, &size, "UTF-8", TRUE); // out = fopen(g_strdup_printf("%s/%s.xml", plugin_path, turtle_path), "w+"); // fwrite(buffer, size, sizeof(xmlChar), out); // fflush(out); // xmlSaveFormatFileEnc("-", turtle->doc, "UTF-8", 1); ttl_list = ttl_list->next; } binary_list = binary_list->next; } g_object_unref(manifest); } } lv2ui_path++; } } /** * ags_lv2ui_manager_get_instance: * * Get instance. * * Returns: the #AgsLv2uiManager * * Since: 1.0.0 */ AgsLv2uiManager* ags_lv2ui_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_lv2ui_manager == NULL){ ags_lv2ui_manager = ags_lv2ui_manager_new(); } pthread_mutex_unlock(&mutex); return(ags_lv2ui_manager); } /** * ags_lv2ui_manager_new: * * Creates an #AgsLv2uiManager * * Returns: a new #AgsLv2uiManager * * Since: 1.0.0 */ AgsLv2uiManager* ags_lv2ui_manager_new() { AgsLv2uiManager *lv2ui_manager; lv2ui_manager = (AgsLv2uiManager *) g_object_new(AGS_TYPE_LV2UI_MANAGER, NULL); return(lv2ui_manager); } gsequencer-1.4.24/ags/plugin/ags_ladspa_conversion.c0000644000175000017500000001064013246707333017454 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2016 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 . */ #include #include #include void ags_ladspa_conversion_class_init(AgsLadspaConversionClass *conversion); void ags_ladspa_conversion_init (AgsLadspaConversion *conversion); void ags_ladspa_conversion_finalize(GObject *gobject); gdouble ags_ladspa_conversion_convert(AgsConversion *conversion, gdouble value, gboolean reverse); /** * SECTION:ags_ladspa_conversion * @short_description: Conversion of values * @title: AgsLadspaConversion * @section_id: * @include: ags/plugin/ags_ladspa_conversion.h * * The #AgsLadspaConversion converts values. */ static gpointer ags_ladspa_conversion_parent_class = NULL; GType ags_ladspa_conversion_get_type(void) { static GType ags_type_ladspa_conversion = 0; if(!ags_type_ladspa_conversion){ static const GTypeInfo ags_ladspa_conversion_info = { sizeof (AgsLadspaConversionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ladspa_conversion_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLadspaConversion), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ladspa_conversion_init, }; ags_type_ladspa_conversion = g_type_register_static(AGS_TYPE_CONVERSION, "AgsLadspaConversion", &ags_ladspa_conversion_info, 0); } return(ags_type_ladspa_conversion); } void ags_ladspa_conversion_class_init(AgsLadspaConversionClass *ladspa_conversion) { AgsConversionClass *conversion; GObjectClass *gobject; GParamSpec *param_spec; ags_ladspa_conversion_parent_class = g_type_class_peek_parent(ladspa_conversion); /* GObjectClass */ gobject = (GObjectClass *) ladspa_conversion; gobject->finalize = ags_ladspa_conversion_finalize; /* AgsConversionClass */ conversion = (AgsConversionClass *) ladspa_conversion; conversion->convert = ags_ladspa_conversion_convert; } void ags_ladspa_conversion_init(AgsLadspaConversion *ladspa_conversion) { AgsConfig *config; gchar *str; ladspa_conversion->flags = 0; config = ags_config_get_instance(); str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ ladspa_conversion->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); }else{ ladspa_conversion->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } } void ags_ladspa_conversion_finalize(GObject *gobject) { /* empty */ } gdouble ags_ladspa_conversion_convert(AgsConversion *conversion, gdouble value, gboolean reverse) { AgsLadspaConversion *ladspa_conversion; ladspa_conversion = AGS_LADSPA_CONVERSION(conversion); if(reverse){ if((AGS_LADSPA_CONVERSION_SAMPLERATE & (ladspa_conversion->flags)) != 0){ value /= ladspa_conversion->samplerate; } if((AGS_LADSPA_CONVERSION_LOGARITHMIC & (ladspa_conversion->flags)) != 0){ value = log(value); } }else{ if((AGS_LADSPA_CONVERSION_SAMPLERATE & (ladspa_conversion->flags)) != 0){ value *= ladspa_conversion->samplerate; } if((AGS_LADSPA_CONVERSION_LOGARITHMIC & (ladspa_conversion->flags)) != 0){ value = exp(value); } } return(value); } /** * ags_ladspa_conversion_new: * * Instantiate a new #AgsLadspaConversion. * * Returns: the new instance * * Since: 1.0.0 */ AgsLadspaConversion* ags_ladspa_conversion_new() { AgsLadspaConversion *conversion; conversion = g_object_new(AGS_TYPE_LADSPA_CONVERSION, NULL); return(conversion); } gsequencer-1.4.24/ags/plugin/ags_dssi_plugin.h0000644000175000017500000000446013246707333016273 00000000000000/* 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 . */ #ifndef __AGS_DSSI_PLUGIN_H__ #define __AGS_DSSI_PLUGIN_H__ #include #include #include #include #define AGS_TYPE_DSSI_PLUGIN (ags_dssi_plugin_get_type()) #define AGS_DSSI_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DSSI_PLUGIN, AgsDssiPlugin)) #define AGS_DSSI_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_DSSI_PLUGIN, AgsDssiPluginClass)) #define AGS_IS_DSSI_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_DSSI_PLUGIN)) #define AGS_IS_DSSI_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_DSSI_PLUGIN)) #define AGS_DSSI_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_DSSI_PLUGIN, AgsDssiPluginClass)) #define AGS_DSSI_PLUGIN_DESCRIPTOR(ptr) ((DSSI_Descriptor *)(ptr)) typedef struct _AgsDssiPlugin AgsDssiPlugin; typedef struct _AgsDssiPluginClass AgsDssiPluginClass; struct _AgsDssiPlugin { AgsBasePlugin base_plugin; guint unique_id; gchar *program; }; struct _AgsDssiPluginClass { AgsBasePluginClass base_plugin; void (*change_program)(AgsDssiPlugin *dssi_plugin, gpointer ladspa_handle, guint bank_index, guint program_index); }; GType ags_dssi_plugin_get_type(void); void ags_dssi_plugin_change_program(AgsDssiPlugin *dssi_plugin, gpointer ladspa_handle, guint bank_index, guint program_index); AgsDssiPlugin* ags_dssi_plugin_new(gchar *filename, gchar *effect, guint effect_index); #endif /*__AGS_DSSI_PLUGIN_H__*/ gsequencer-1.4.24/ags/plugin/ags_ladspa_manager.c0000644000175000017500000003125213246707333016703 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_ladspa_manager_class_init(AgsLadspaManagerClass *ladspa_manager); void ags_ladspa_manager_init (AgsLadspaManager *ladspa_manager); void ags_ladspa_manager_dispose(GObject *gobject); void ags_ladspa_manager_finalize(GObject *gobject); /** * SECTION:ags_ladspa_manager * @short_description: Singleton pattern to organize LADSPA * @title: AgsLadspaManager * @section_id: * @include: ags/plugin/ags_ladspa_manager.h * * The #AgsLadspaManager loads/unloads LADSPA plugins. */ enum{ ADD, CREATE, LAST_SIGNAL, }; static gpointer ags_ladspa_manager_parent_class = NULL; static guint ladspa_manager_signals[LAST_SIGNAL]; AgsLadspaManager *ags_ladspa_manager = NULL; gchar **ags_ladspa_default_path = NULL; GType ags_ladspa_manager_get_type (void) { static GType ags_type_ladspa_manager = 0; if(!ags_type_ladspa_manager){ static const GTypeInfo ags_ladspa_manager_info = { sizeof (AgsLadspaManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ladspa_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLadspaManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ladspa_manager_init, }; ags_type_ladspa_manager = g_type_register_static(G_TYPE_OBJECT, "AgsLadspaManager", &ags_ladspa_manager_info, 0); } return (ags_type_ladspa_manager); } void ags_ladspa_manager_class_init(AgsLadspaManagerClass *ladspa_manager) { GObjectClass *gobject; ags_ladspa_manager_parent_class = g_type_class_peek_parent(ladspa_manager); /* GObjectClass */ gobject = (GObjectClass *) ladspa_manager; gobject->dispose = ags_ladspa_manager_dispose; gobject->finalize = ags_ladspa_manager_finalize; } void ags_ladspa_manager_init(AgsLadspaManager *ladspa_manager) { ladspa_manager->ladspa_plugin = NULL; if(ags_ladspa_default_path == NULL){ gchar *ladspa_env; if((ladspa_env = getenv("LADSPA_PATH")) != NULL){ gchar *iter, *next; guint i; ags_ladspa_default_path = (gchar **) malloc(sizeof(gchar *)); iter = ladspa_env; i = 0; while((next = index(iter, ':')) != NULL){ ags_ladspa_default_path = (gchar **) realloc(ags_ladspa_default_path, (i + 2) * sizeof(gchar *)); ags_ladspa_default_path[i] = g_strndup(iter, next - iter); iter = next + 1; i++; } if(*iter != '\0'){ ags_ladspa_default_path = (gchar **) realloc(ags_ladspa_default_path, (i + 2) * sizeof(gchar *)); ags_ladspa_default_path[i] = g_strdup(iter); i++; } ags_ladspa_default_path[i] = NULL; }else{ gchar *home_dir; guint i; #ifdef AGS_MAC_BUNDLE if((home_dir = getenv("HOME")) != NULL){ ags_ladspa_default_path = (gchar **) malloc(7 * sizeof(gchar *)); }else{ ags_ladspa_default_path = (gchar **) malloc(6 * sizeof(gchar *)); } #else if((home_dir = getenv("HOME")) != NULL){ ags_ladspa_default_path = (gchar **) malloc(6 * sizeof(gchar *)); }else{ ags_ladspa_default_path = (gchar **) malloc(5 * sizeof(gchar *)); } #endif i = 0; #ifdef AGS_MAC_BUNDLE ags_ladspa_default_path[i++] = g_strdup_printf("%s/ladspa", getenv("GSEQUENCER_PLUGIN_DIR")); #endif ags_ladspa_default_path[i++] = g_strdup("/usr/lib64/ladspa"); ags_ladspa_default_path[i++] = g_strdup("/usr/local/lib64/ladspa"); ags_ladspa_default_path[i++] = g_strdup("/usr/lib/ladspa"); ags_ladspa_default_path[i++] = g_strdup("/usr/local/lib/ladspa"); if(home_dir != NULL){ ags_ladspa_default_path[i++] = g_strdup_printf("%s/.ladspa", home_dir); } ags_ladspa_default_path[i++] = NULL; } } } void ags_ladspa_manager_dispose(GObject *gobject) { AgsLadspaManager *ladspa_manager; ladspa_manager = AGS_LADSPA_MANAGER(gobject); if(ladspa_manager->ladspa_plugin != NULL){ g_list_free_full(ladspa_manager->ladspa_plugin, (GDestroyNotify) g_object_unref); ladspa_manager->ladspa_plugin = NULL; } /* call parent */ G_OBJECT_CLASS(ags_ladspa_manager_parent_class)->dispose(gobject); } void ags_ladspa_manager_finalize(GObject *gobject) { AgsLadspaManager *ladspa_manager; GList *ladspa_plugin; ladspa_manager = AGS_LADSPA_MANAGER(gobject); ladspa_plugin = ladspa_manager->ladspa_plugin; g_list_free_full(ladspa_plugin, (GDestroyNotify) g_object_unref); if(ladspa_manager == ags_ladspa_manager){ ags_ladspa_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_ladspa_manager_parent_class)->finalize(gobject); } /** * ags_ladspa_manager_get_default_path: * * Get ladspa manager default plugin path. * * Returns: the plugin default search path as a string vector * * Since: 1.0.0 */ gchar** ags_ladspa_manager_get_default_path() { return(ags_ladspa_default_path); } /** * ags_ladspa_manager_set_default_path: * @default_path: the string vector array to use as default path * * Set ladspa manager default plugin path. * * Since: 1.0.0 */ void ags_ladspa_manager_set_default_path(gchar** default_path) { ags_ladspa_default_path = default_path; } /** * ags_ladspa_manager_get_filenames: * @ladspa_manager: the #AgsLadspaManager * * Retrieve all filenames * * Returns: a %NULL-terminated array of filenames * * Since: 1.0.0 */ gchar** ags_ladspa_manager_get_filenames(AgsLadspaManager *ladspa_manager) { GList *ladspa_plugin; gchar **filenames; guint i; gboolean contains_filename; if(!AGS_IS_LADSPA_MANAGER(ladspa_manager)){ return(NULL); } ladspa_plugin = ladspa_manager->ladspa_plugin; filenames = NULL; for(i = 0; ladspa_plugin != NULL;){ if(filenames == NULL){ filenames = (gchar **) malloc(2 * sizeof(gchar *)); filenames[i] = AGS_BASE_PLUGIN(ladspa_plugin->data)->filename; filenames[i + 1] = NULL; i++; }else{ #ifdef HAVE_GLIB_2_44 contains_filename = g_strv_contains(filenames, AGS_BASE_PLUGIN(ladspa_plugin->data)->filename); #else contains_filename = ags_strv_contains(filenames, AGS_BASE_PLUGIN(ladspa_plugin->data)->filename); #endif if(!contains_filename){ filenames = (gchar **) realloc(filenames, (i + 2) * sizeof(gchar *)); filenames[i] = AGS_BASE_PLUGIN(ladspa_plugin->data)->filename; filenames[i + 1] = NULL; i++; } } ladspa_plugin = ladspa_plugin->next; } return(filenames); } /** * ags_ladspa_manager_find_ladspa_plugin: * @ladspa_manager: the #AgsLadspaManager * @filename: the filename of the plugin * @effect: the effect's name * * Lookup filename in loaded plugins. * * Returns: the #AgsLadspaPlugin-struct * * Since: 1.0.0 */ AgsLadspaPlugin* ags_ladspa_manager_find_ladspa_plugin(AgsLadspaManager *ladspa_manager, gchar *filename, gchar *effect) { AgsLadspaPlugin *ladspa_plugin; GList *list; if(!AGS_IS_LADSPA_MANAGER(ladspa_manager)){ return(NULL); } list = ladspa_manager->ladspa_plugin; while(list != NULL){ ladspa_plugin = AGS_LADSPA_PLUGIN(list->data); if(!g_strcmp0(AGS_BASE_PLUGIN(ladspa_plugin)->filename, filename) && !g_strcmp0(AGS_BASE_PLUGIN(ladspa_plugin)->effect, effect)){ return(ladspa_plugin); } list = list->next; } return(NULL); } /** * ags_ladspa_manager_load_blacklist: * @ladspa_manager: the #AgsLadspaManager * @blacklist_filename: the filename as string * * Load blacklisted plugin filenames. * * Since: 1.0.0 */ void ags_ladspa_manager_load_blacklist(AgsLadspaManager *ladspa_manager, gchar *blacklist_filename) { if(!AGS_IS_LADSPA_MANAGER(ladspa_manager) || blacklist_filename == NULL){ return; } if(g_file_test(blacklist_filename, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))){ FILE *file; gchar *str; file = fopen(blacklist_filename, "r"); while(getline(&str, NULL, file) != -1){ ladspa_manager->ladspa_plugin_blacklist = g_list_prepend(ladspa_manager->ladspa_plugin_blacklist, str); } } } /** * ags_ladspa_manager_load_file: * @ladspa_manager: the #AgsLadspaManager * @ladspa_path: the LADSPA path * @filename: the filename of the plugin * * Load @filename specified plugin. * * Since: 1.0.0 */ void ags_ladspa_manager_load_file(AgsLadspaManager *ladspa_manager, gchar *ladspa_path, gchar *filename) { AgsLadspaPlugin *ladspa_plugin; gchar *path; gchar *effect; void *plugin_so; LADSPA_Descriptor_Function ladspa_descriptor; LADSPA_Descriptor *plugin_descriptor; unsigned long i; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; if(!AGS_IS_LADSPA_MANAGER(ladspa_manager) || ladspa_path == NULL || filename == NULL){ return; } pthread_mutex_lock(&(mutex)); path = g_strdup_printf("%s/%s", ladspa_path, filename); g_message("ags_ladspa_manager.c loading - %s", path); plugin_so = dlopen(path, RTLD_NOW); if(plugin_so == NULL){ g_warning("ags_ladspa_manager.c - failed to load static object file"); dlerror(); pthread_mutex_unlock(&(mutex)); return; } ladspa_descriptor = (LADSPA_Descriptor_Function) dlsym(plugin_so, "ladspa_descriptor"); if(dlerror() == NULL && ladspa_descriptor){ for(i = 0; (plugin_descriptor = ladspa_descriptor(i)) != NULL; i++){ if(ags_base_plugin_find_effect(ladspa_manager->ladspa_plugin, path, plugin_descriptor->Name) == NULL){ ladspa_plugin = ags_ladspa_plugin_new(path, plugin_descriptor->Name, i); ags_base_plugin_load_plugin((AgsBasePlugin *) ladspa_plugin); ladspa_manager->ladspa_plugin = g_list_prepend(ladspa_manager->ladspa_plugin, ladspa_plugin); } } } pthread_mutex_unlock(&(mutex)); g_free(path); } /** * ags_ladspa_manager_load_default_directory: * @ladspa_manager: the #AgsLadspaManager * * Loads all available plugins. * * Since: 1.0.0 */ void ags_ladspa_manager_load_default_directory(AgsLadspaManager *ladspa_manager) { AgsLadspaPlugin *ladspa_plugin; GDir *dir; gchar **ladspa_path; gchar *filename; GError *error; if(!AGS_IS_LADSPA_MANAGER(ladspa_manager)){ return; } ladspa_path = ags_ladspa_default_path; while(*ladspa_path != NULL){ if(!g_file_test(*ladspa_path, G_FILE_TEST_EXISTS)){ ladspa_path++; continue; } error = NULL; dir = g_dir_open(*ladspa_path, 0, &error); if(error != NULL){ g_warning("%s", error->message); ladspa_path++; continue; } while((filename = g_dir_read_name(dir)) != NULL){ if(g_str_has_suffix(filename, AGS_LIBRARY_SUFFIX) && !g_list_find_custom(ladspa_manager->ladspa_plugin_blacklist, filename, strcmp)){ ags_ladspa_manager_load_file(ladspa_manager, *ladspa_path, filename); } } ladspa_path++; } } /** * ags_ladspa_manager_get_instance: * * Get instance. * * Returns: the #AgsLadspaManager * * Since: 1.0.0 */ AgsLadspaManager* ags_ladspa_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_ladspa_manager == NULL){ ags_ladspa_manager = ags_ladspa_manager_new(); } pthread_mutex_unlock(&mutex); return(ags_ladspa_manager); } /** * ags_ladspa_manager_new: * * Creates an #AgsLadspaManager * * Returns: a new #AgsLadspaManager * * Since: 1.0.0 */ AgsLadspaManager* ags_ladspa_manager_new() { AgsLadspaManager *ladspa_manager; ladspa_manager = (AgsLadspaManager *) g_object_new(AGS_TYPE_LADSPA_MANAGER, NULL); return(ladspa_manager); } gsequencer-1.4.24/ags/plugin/ags_base_plugin.c0000644000175000017500000005544213256163135016241 00000000000000/* 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 . */ #include #include #include #include #include void ags_base_plugin_class_init(AgsBasePluginClass *base_plugin); void ags_base_plugin_init (AgsBasePlugin *base_plugin); void ags_base_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_base_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_base_plugin_dispose(GObject *gobject); void ags_base_plugin_finalize(GObject *gobject); /** * SECTION:ags_base_plugin * @short_description: The base plugin class * @title: AgsBasePlugin * @section_id: * @include: ags/plugin/ags_base_plugin.h * * The #AgsBasePlugin loads/unloads plugins on a abstraction level. */ enum{ INSTANTIATE, CONNECT_PORT, ACTIVATE, DEACTIVATE, RUN, LOAD_PLUGIN, LAST_SIGNAL, }; enum{ PROP_0, PROP_ID, PROP_FILENAME, PROP_EFFECT, PROP_EFFECT_INDEX, PROP_UI_FILENAME, PROP_UI_EFFECT, PROP_UI_EFFECT_INDEX, PROP_UI_PLUGIN, }; static gpointer ags_base_plugin_parent_class = NULL; static guint base_plugin_signals[LAST_SIGNAL]; GType ags_base_plugin_get_type (void) { static GType ags_type_base_plugin = 0; if(!ags_type_base_plugin){ static const GTypeInfo ags_base_plugin_info = { sizeof (AgsBasePluginClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_base_plugin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsBasePlugin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_base_plugin_init, }; ags_type_base_plugin = g_type_register_static(G_TYPE_OBJECT, "AgsBasePlugin", &ags_base_plugin_info, 0); } return (ags_type_base_plugin); } void ags_base_plugin_class_init(AgsBasePluginClass *base_plugin) { GObjectClass *gobject; GParamSpec *param_spec; ags_base_plugin_parent_class = g_type_class_peek_parent(base_plugin); /* GObjectClass */ gobject = (GObjectClass *) base_plugin; gobject->set_property = ags_base_plugin_set_property; gobject->get_property = ags_base_plugin_get_property; gobject->dispose = ags_base_plugin_dispose; gobject->finalize = ags_base_plugin_finalize; /* properties */ /** * AgsBasePlugin:id: * * The assigned id. * * Since: 1.4.21 */ param_spec = g_param_spec_string("id", i18n_pspec("id of the plugin"), i18n_pspec("The id this plugin is located in"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ID, param_spec); /** * AgsBasePlugin:filename: * * The assigned filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("filename of the plugin"), i18n_pspec("The filename this plugin is located in"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsBasePlugin:effect: * * The assigned effect. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("effect of the plugin"), i18n_pspec("The effect this plugin is assigned with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsBasePlugin:effect-index: * * The assigned effect-index. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("effect-index", i18n_pspec("effect-index of the plugin"), i18n_pspec("The effect-index this plugin is assigned with"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT_INDEX, param_spec); /** * AgsBasePlugin:ui-filename: * * The assigned UI filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("ui-filename", i18n_pspec("UI filename of the plugin"), i18n_pspec("The UI filename this plugin is located in"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UI_FILENAME, param_spec); /** * AgsBasePlugin:ui-effect: * * The assigned ui-effect. * * Since: 1.0.0 */ param_spec = g_param_spec_string("ui-effect", i18n_pspec("UI effect of the plugin"), i18n_pspec("The UI effect this plugin is assigned with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UI_EFFECT, param_spec); /** * AgsBasePlugin:ui-effect-index: * * The assigned ui-effect-index. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("ui-effect-index", i18n_pspec("UI effect-index of the plugin"), i18n_pspec("The UI effect-index this plugin is assigned with"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UI_EFFECT_INDEX, param_spec); /** * AgsBasePlugin:ui-plugin: * * The assigned ui-plugin. * * Since: 1.0.0 */ param_spec = g_param_spec_object("ui-plugin", i18n_pspec("ui-plugin of the plugin"), i18n_pspec("The ui-plugin this plugin is assigned with"), AGS_TYPE_BASE_PLUGIN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UI_PLUGIN, param_spec); /* AgsBasePluginClass */ base_plugin->instantiate = NULL; base_plugin->connect_port = NULL; base_plugin->activate = NULL; base_plugin->deactivate = NULL; base_plugin->run = NULL; base_plugin->load_plugin = NULL; /** * AgsBasePlugin::instantiate: * @base_plugin: the plugin to instantiate * @samplerate: the samplerate * * The ::instantiate signal creates a new instance of plugin. * * Returns: the new plugin instance * * Since: 1.0.0 */ base_plugin_signals[INSTANTIATE] = g_signal_new("instantiate", G_TYPE_FROM_CLASS (base_plugin), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsBasePluginClass, instantiate), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsBasePlugin::connect-port: * @base_plugin: the plugin to connect-port * * The ::connect-port signal creates a new instance of plugin. * * Since: 1.0.0 */ base_plugin_signals[CONNECT_PORT] = g_signal_new("connect-port", G_TYPE_FROM_CLASS (base_plugin), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsBasePluginClass, connect_port), NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_UINT_POINTER, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_POINTER); /** * AgsBasePlugin::activate: * @base_plugin: the plugin to activate * * The ::activate signal creates a new instance of plugin. * * Since: 1.0.0 */ base_plugin_signals[ACTIVATE] = g_signal_new("activate", G_TYPE_FROM_CLASS (base_plugin), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsBasePluginClass, activate), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsBasePlugin::deactivate: * @base_plugin: the plugin to deactivate * * The ::deactivate signal creates a new instance of plugin. * * Since: 1.0.0 */ base_plugin_signals[DEACTIVATE] = g_signal_new("deactivate", G_TYPE_FROM_CLASS (base_plugin), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsBasePluginClass, deactivate), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsBasePlugin::run: * @base_plugin: the plugin to run * * The ::run signal creates a new instance of plugin. * * Since: 1.0.0 */ base_plugin_signals[RUN] = g_signal_new("run", G_TYPE_FROM_CLASS (base_plugin), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsBasePluginClass, run), NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_POINTER_UINT, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_UINT); /** * AgsBasePlugin::load_plugin: * @base_plugin: the plugin to load_plugin * * The ::load_plugin signal creates a new instance of plugin. * * Since: 1.0.0 */ base_plugin_signals[LOAD_PLUGIN] = g_signal_new("load_plugin", G_TYPE_FROM_CLASS (base_plugin), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsBasePluginClass, load_plugin), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_base_plugin_init(AgsBasePlugin *base_plugin) { base_plugin->flags = 0; base_plugin->id = NULL; base_plugin->filename = NULL; base_plugin->effect = NULL; base_plugin->port_group_count = 0; base_plugin->port_group = NULL; base_plugin->port = NULL; base_plugin->effect_index = 0; base_plugin->plugin_so = NULL; base_plugin->plugin_descriptor = NULL; base_plugin->plugin_handle = NULL; base_plugin->ui_plugin = NULL; } void ags_base_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsBasePlugin *base_plugin; base_plugin = AGS_BASE_PLUGIN(gobject); switch(prop_id){ case PROP_ID: { gchar *id; id = (gchar *) g_value_get_string(value); if(base_plugin->id == id){ return; } if(base_plugin->id != NULL){ g_free(base_plugin->id); } base_plugin->id = g_strdup(id); } break; case PROP_FILENAME: { gchar *filename; filename = (gchar *) g_value_get_string(value); if(base_plugin->filename == filename){ return; } if(base_plugin->filename != NULL){ g_free(base_plugin->filename); } base_plugin->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = (gchar *) g_value_get_string(value); if(base_plugin->effect == effect){ return; } if(base_plugin->effect != NULL){ g_free(base_plugin->effect); } base_plugin->effect = g_strdup(effect); } break; case PROP_EFFECT_INDEX: { guint effect_index; effect_index = g_value_get_uint(value); base_plugin->effect_index = effect_index; } break; case PROP_UI_FILENAME: { gchar *ui_filename; ui_filename = (gchar *) g_value_get_string(value); if(base_plugin->ui_filename == ui_filename){ return; } if(base_plugin->ui_filename != NULL){ g_free(base_plugin->ui_filename); } base_plugin->ui_filename = g_strdup(ui_filename); } break; case PROP_UI_EFFECT: { gchar *ui_effect; ui_effect = (gchar *) g_value_get_string(value); if(base_plugin->ui_effect == ui_effect){ return; } if(base_plugin->ui_effect != NULL){ g_free(base_plugin->ui_effect); } base_plugin->ui_effect = g_strdup(ui_effect); } break; case PROP_UI_EFFECT_INDEX: { guint ui_effect_index; ui_effect_index = g_value_get_uint(value); base_plugin->ui_effect_index = ui_effect_index; } break; case PROP_UI_PLUGIN: { GObject *ui_plugin; ui_plugin = g_value_get_object(value); if(base_plugin->ui_plugin == ui_plugin){ return; } if(base_plugin->ui_plugin != NULL){ g_object_unref(base_plugin->ui_plugin); } if(ui_plugin != NULL){ g_object_ref(ui_plugin); } base_plugin->ui_plugin = ui_plugin; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_base_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsBasePlugin *base_plugin; base_plugin = AGS_BASE_PLUGIN(gobject); switch(prop_id){ case PROP_ID: { g_value_set_string(value, base_plugin->id); } break; case PROP_FILENAME: { g_value_set_string(value, base_plugin->filename); } break; case PROP_EFFECT: { g_value_set_string(value, base_plugin->effect); } break; case PROP_EFFECT_INDEX: { g_value_set_uint(value, base_plugin->effect_index); } break; case PROP_UI_FILENAME: { g_value_set_string(value, base_plugin->ui_filename); } break; case PROP_UI_EFFECT: { g_value_set_string(value, base_plugin->ui_effect); } break; case PROP_UI_EFFECT_INDEX: { g_value_set_uint(value, base_plugin->ui_effect_index); } break; case PROP_UI_PLUGIN: { g_value_set_object(value, base_plugin->ui_plugin); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_base_plugin_dispose(GObject *gobject) { AgsBasePlugin *base_plugin; base_plugin = AGS_BASE_PLUGIN(gobject); if(base_plugin->ui_plugin != NULL){ g_object_unref(base_plugin->ui_plugin); base_plugin->ui_plugin = NULL; } /* call parent */ G_OBJECT_CLASS(ags_base_plugin_parent_class)->dispose(gobject); } void ags_base_plugin_finalize(GObject *gobject) { AgsBasePlugin *base_plugin; base_plugin = AGS_BASE_PLUGIN(gobject); g_free(base_plugin->filename); g_free(base_plugin->effect); if(base_plugin->ui_plugin != NULL){ g_object_unref(base_plugin->ui_plugin); } /* call parent */ G_OBJECT_CLASS(ags_base_plugin_parent_class)->finalize(gobject); } /** * ags_port_descriptor_alloc: * * Alloc the #AgsPortDescriptor-struct * * Returns: the #AgsPortDescriptor-struct * * Since: 1.0.0 */ AgsPortDescriptor* ags_port_descriptor_alloc() { AgsPortDescriptor *port_descriptor; port_descriptor = (AgsPortDescriptor *) malloc(sizeof(AgsPortDescriptor)); port_descriptor->flags = 0; port_descriptor->port_index = 0; port_descriptor->port_name = NULL; port_descriptor->port_symbol = NULL; port_descriptor->scale_steps = -1; port_descriptor->scale_points = NULL; port_descriptor->scale_value = NULL; port_descriptor->lower_value = g_new0(GValue, 1); port_descriptor->upper_value = g_new0(GValue, 1); port_descriptor->default_value = g_new0(GValue, 1); port_descriptor->user_data = NULL; return(port_descriptor); } /** * ags_port_descriptor_free: * @port_descriptor: the #AgsPortDescriptor-struct * * Free the #AgsPortDescriptor-struct * * Since: 1.0.0 */ void ags_port_descriptor_free(AgsPortDescriptor *port_descriptor) { if(port_descriptor->port_name != NULL){ g_free(port_descriptor->port_name); } if(port_descriptor->port_symbol != NULL){ g_free(port_descriptor->port_symbol); } if(port_descriptor->scale_points != NULL){ g_free(port_descriptor->scale_points); } g_free(port_descriptor->lower_value); g_free(port_descriptor->upper_value); g_free(port_descriptor->default_value); free(port_descriptor); } /** * ags_port_descriptor_find_symbol: * @port_descriptor: the #GList-struct containing #AgsPortDescriptor * @port_symbol: the port symbol * * Find @port_symbol within @port_descriptor. * * Returns: the matching #GList-struct containing #AgsPortDescriptor * * Since: 1.0.0.8 */ GList* ags_port_descriptor_find_symbol(GList *port_descriptor, gchar *port_symbol) { if(port_symbol == NULL){ return(NULL); } while(port_descriptor != NULL){ if(!g_strcmp0(port_symbol, AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_symbol)){ return(port_descriptor); } port_descriptor = port_descriptor->next; } return(NULL); } /** * ags_base_plugin_find_filename: * @base_plugin: the #GList-struct containing #AgsBasePlugin * @filename: the filename as string * * Find filename in @base_plugin #GList-struct of #AgsBasePlugin. * * Returns: the next matching #GList-struct * * Since: 1.0.0 */ GList* ags_base_plugin_find_filename(GList *base_plugin, gchar *filename) { while(base_plugin != NULL){ if(!g_ascii_strcasecmp(AGS_BASE_PLUGIN(base_plugin->data)->filename, filename)){ return(base_plugin); } base_plugin = base_plugin->next; } return(NULL); } /** * ags_base_plugin_find_effect: * @base_plugin: the #GList-struct containing #AgsBasePlugin * @filename: the filename as string * @effect: the effect as string * * Find @filename and @effect in @base_plugin #GList-struct of #AgsBasePlugin. * * Returns: the next matching #GList-struct * * Since: 1.0.0 */ GList* ags_base_plugin_find_effect(GList *base_plugin, gchar *filename, gchar *effect) { while(base_plugin != NULL){ if(!g_ascii_strcasecmp(AGS_BASE_PLUGIN(base_plugin->data)->filename, filename) && !g_ascii_strcasecmp(AGS_BASE_PLUGIN(base_plugin->data)->effect, effect)){ return(base_plugin); } base_plugin = base_plugin->next; } return(NULL); } /** * ags_base_plugin_find_ui_effect_index: * @base_plugin: the #GList-struct containing #AgsBasePlugin * @ui_filename: the UI filename as string * @ui_effect_index: the UI effect index * * Find @ui_filename and @ui_effect_index in @base_plugin #GList-struct of #AgsBasePlugin. * * Returns: the next matching #GList-struct * * Since: 1.0.0 */ GList* ags_base_plugin_find_ui_effect_index(GList *base_plugin, gchar *ui_filename, guint ui_effect_index) { while(base_plugin != NULL){ if(!g_ascii_strcasecmp(AGS_BASE_PLUGIN(base_plugin->data)->ui_filename, ui_filename) && AGS_BASE_PLUGIN(base_plugin->data)->ui_effect_index == ui_effect_index){ return(base_plugin); } base_plugin = base_plugin->next; } return(NULL); } /** * ags_base_plugin_sort: * @base_plugin: the #GList-struct containing #AgsBasePlugin * * Sort @base_plugin alphabetically. * * Returns: the sorted #GList-struct * * Since: 1.0.0 */ GList* ags_base_plugin_sort(GList *base_plugin) { GList *start; auto gint ags_base_plugin_sort_compare_function(gpointer a, gpointer b); gint ags_base_plugin_sort_compare_function(gpointer a, gpointer b){ return(strcmp(AGS_BASE_PLUGIN(a)->effect, AGS_BASE_PLUGIN(b)->effect)); } if(base_plugin == NULL){ return(NULL); } start = NULL; while(base_plugin != NULL){ start = g_list_insert_sorted(start, base_plugin->data, (GCompareFunc) ags_base_plugin_sort_compare_function); base_plugin = base_plugin->next; } return(start); } void ags_base_plugin_apply_port_group_by_prefix(AgsBasePlugin *base_plugin) { //TODO:JK: implement me } /** * ags_base_plugin_instantiate: * @base_plugin: the #AgsBasePlugin * @samplerate: the samplerate * * Instantiate the plugin * * Returns: the new plugin instance handle * * Since: 1.0.0 */ gpointer ags_base_plugin_instantiate(AgsBasePlugin *base_plugin, guint samplerate) { gpointer retval; g_return_val_if_fail(AGS_IS_BASE_PLUGIN(base_plugin), NULL); g_object_ref(G_OBJECT(base_plugin)); g_signal_emit(G_OBJECT(base_plugin), base_plugin_signals[INSTANTIATE], 0, samplerate, &retval); g_object_unref(G_OBJECT(base_plugin)); return(retval); } /** * ags_base_plugin_connect_port: * @base_plugin: the #AgsBasePlugin * @plugin_handle: the plugin instance handle * @port_index: the port's index to connect * @data_location: the data location to connect * * Connect a plugin instance. * * Since: 1.0.0 */ void ags_base_plugin_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location) { g_return_if_fail(AGS_IS_BASE_PLUGIN(base_plugin)); g_object_ref(G_OBJECT(base_plugin)); g_signal_emit(G_OBJECT(base_plugin), base_plugin_signals[CONNECT_PORT], 0, plugin_handle, port_index, data_location); g_object_unref(G_OBJECT(base_plugin)); } /** * ags_base_plugin_activate: * @base_plugin: the #AgsBasePlugin * @plugin_handle: the plugin instance handle * * Activate a plugin instance * * Since: 1.0.0 */ void ags_base_plugin_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { g_return_if_fail(AGS_IS_BASE_PLUGIN(base_plugin)); g_object_ref(G_OBJECT(base_plugin)); g_signal_emit(G_OBJECT(base_plugin), base_plugin_signals[ACTIVATE], 0, plugin_handle); g_object_unref(G_OBJECT(base_plugin)); } /** * ags_base_plugin_deactivate: * @base_plugin: the #AgsBasePlugin * @plugin_handle: the plugin instance handle * * Deactivat a plugin instance * * Since: 1.0.0 */ void ags_base_plugin_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { g_return_if_fail(AGS_IS_BASE_PLUGIN(base_plugin)); g_object_ref(G_OBJECT(base_plugin)); g_signal_emit(G_OBJECT(base_plugin), base_plugin_signals[DEACTIVATE], 0, plugin_handle); g_object_unref(G_OBJECT(base_plugin)); } /** * ags_base_plugin_run: * @base_plugin: the #AgsBasePlugin * @plugin_handle: the plugin instance handle * @seq_event: the alsa sequencer events * @frame_count: the frame counts * * Deactivat a plugin instance * * Since: 1.0.0 */ void ags_base_plugin_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count) { g_return_if_fail(AGS_IS_BASE_PLUGIN(base_plugin)); g_object_ref(G_OBJECT(base_plugin)); g_signal_emit(G_OBJECT(base_plugin), base_plugin_signals[RUN], 0, plugin_handle, seq_event, frame_count); g_object_unref(G_OBJECT(base_plugin)); } /** * ags_base_plugin_load_plugin: * @base_plugin: the #AgsBasePlugin * * Load the plugin * * Since: 1.0.0 */ void ags_base_plugin_load_plugin(AgsBasePlugin *base_plugin) { g_return_if_fail(AGS_IS_BASE_PLUGIN(base_plugin)); g_object_ref(G_OBJECT(base_plugin)); g_signal_emit(G_OBJECT(base_plugin), base_plugin_signals[LOAD_PLUGIN], 0); g_object_unref(G_OBJECT(base_plugin)); } /** * ags_base_plugin_new: * @filename: the plugin .so * @effect: the effect's string representation * @effect_index: the effect's index * * Creates an #AgsBasePlugin * * Returns: a new #AgsBasePlugin * * Since: 1.0.0 */ AgsBasePlugin* ags_base_plugin_new(gchar *filename, gchar *effect, guint effect_index) { AgsBasePlugin *base_plugin; base_plugin = (AgsBasePlugin *) g_object_new(AGS_TYPE_BASE_PLUGIN, "filename", filename, "effect", effect, "effect-index", effect_index, NULL); return(base_plugin); } gsequencer-1.4.24/ags/plugin/ags_lv2_log_manager.c0000644000175000017500000001210613246707333017000 00000000000000/* 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 . */ #include #include void ags_lv2_log_manager_class_init(AgsLv2LogManagerClass *lv2_log_manager); void ags_lv2_log_manager_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_log_manager_init(AgsLv2LogManager *lv2_log_manager); void ags_lv2_log_manager_connect(AgsConnectable *connectable); void ags_lv2_log_manager_disconnect(AgsConnectable *connectable); void ags_lv2_log_manager_finalize(GObject *gobject); /** * SECTION:ags_lv2_log_manager * @short_description: allow lv2 plugins to log * @title: AgsLv2LogManager * @section_id: * @include: ags/plugin/ags_lv2_log_manager.h * * The #AgsLv2LogManager handles console IO. */ static gpointer ags_lv2_log_manager_parent_class = NULL; AgsLv2LogManager *ags_lv2_log_manager = NULL; GType ags_lv2_log_manager_get_type() { static GType ags_type_lv2_log_manager = 0; if(!ags_type_lv2_log_manager){ const GTypeInfo ags_lv2_log_manager_info = { sizeof (AgsLv2LogManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_log_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2LogManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_log_manager_init, }; const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_log_manager_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_log_manager = g_type_register_static(G_TYPE_OBJECT, "AgsLv2LogManager", &ags_lv2_log_manager_info, 0); g_type_add_interface_static(ags_type_lv2_log_manager, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_lv2_log_manager); } void ags_lv2_log_manager_class_init(AgsLv2LogManagerClass *lv2_log_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_log_manager_parent_class = g_type_class_peek_parent(lv2_log_manager); /* GObject */ gobject = (GObjectClass *) lv2_log_manager; gobject->finalize = ags_lv2_log_manager_finalize; } void ags_lv2_log_manager_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_lv2_log_manager_connect; connectable->disconnect = ags_lv2_log_manager_disconnect; } void ags_lv2_log_manager_init(AgsLv2LogManager *lv2_log_manager) { /* empty */ } void ags_lv2_log_manager_connect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_log_manager_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_log_manager_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_lv2_log_manager_parent_class)->finalize(gobject); } /** * ags_lv2_log_manager_printf: * @handle: the log handle * @type: LV2 URID * @fmt: format * @...: %NULL terminated variable arguments * * Print formatted. * * Returns: 0 */ int ags_lv2_log_manager_printf(LV2_Log_Handle handle, LV2_URID type, const char* fmt, ...) { va_list ap; int retval; va_start(ap, fmt); retval = ags_lv2_log_manager_vprintf(handle, type, fmt, ap); va_end(ap); return(retval); } /** * ags_lv2_log_manager_vprintf: * @handle: the log handle * @type: LV2 URID * @fmt: format * @ap: argument pointer * * Variadict print formatted. * * Returns: 0 * * Since: 1.0.0 */ int ags_lv2_log_manager_vprintf(LV2_Log_Handle handle, LV2_URID type, const char* fmt, va_list ap) { g_logv(G_LOG_DOMAIN, 0, fmt, ap); return(0); } /** * ags_lv2_log_manager_get_instance: * * Singleton function to optain the id manager instance. * * Returns: an instance of #AgsLv2LogManager * * Since: 1.0.0 */ AgsLv2LogManager* ags_lv2_log_manager_get_instance() { if(ags_lv2_log_manager == NULL){ ags_lv2_log_manager = ags_lv2_log_manager_new(); // ags_lv2_log_manager_load_default(ags_lv2_log_manager); } return(ags_lv2_log_manager); } /** * ags_lv2_log_manager_new: * * Instantiate a id manager. * * Returns: a new #AgsLv2LogManager * * Since: 1.0.0 */ AgsLv2LogManager* ags_lv2_log_manager_new() { AgsLv2LogManager *lv2_log_manager; lv2_log_manager = (AgsLv2LogManager *) g_object_new(AGS_TYPE_LV2_LOG_MANAGER, NULL); return(lv2_log_manager); } gsequencer-1.4.24/ags/plugin/ags_lv2_uri_map_manager.c0000644000175000017500000002025413247044247017655 00000000000000/* 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 . */ #include #include void ags_lv2_uri_map_manager_class_init(AgsLv2UriMapManagerClass *lv2_uri_map_manager); void ags_lv2_uri_map_manager_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_uri_map_manager_init(AgsLv2UriMapManager *lv2_uri_map_manager); void ags_lv2_uri_map_manager_connect(AgsConnectable *connectable); void ags_lv2_uri_map_manager_disconnect(AgsConnectable *connectable); void ags_lv2_uri_map_manager_finalize(GObject *gobject); void ags_lv2_uri_map_manager_destroy_data(gpointer data); /** * SECTION:ags_lv2_uri_map_manager * @short_description: lv2 uri map manager * @title: AgsLv2UriMapManager * @section_id: * @include: ags/plugin/ags_lv2_uri_map_manager.h * * The #AgsLv2UriMapManager keeps your uri in a hash table where you can lookup your * ids. */ static gpointer ags_lv2_uri_map_manager_parent_class = NULL; AgsLv2UriMapManager *ags_lv2_uri_map_manager = NULL; GType ags_lv2_uri_map_manager_get_type() { static GType ags_type_lv2_uri_map_manager = 0; if(!ags_type_lv2_uri_map_manager){ const GTypeInfo ags_lv2_uri_map_manager_info = { sizeof (AgsLv2UriMapManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_uri_map_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2UriMapManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_uri_map_manager_init, }; const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_uri_map_manager_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_uri_map_manager = g_type_register_static(G_TYPE_OBJECT, "AgsLv2UriMapManager", &ags_lv2_uri_map_manager_info, 0); g_type_add_interface_static(ags_type_lv2_uri_map_manager, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_lv2_uri_map_manager); } void ags_lv2_uri_map_manager_class_init(AgsLv2UriMapManagerClass *lv2_uri_map_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_uri_map_manager_parent_class = g_type_class_peek_parent(lv2_uri_map_manager); /* GObject */ gobject = (GObjectClass *) lv2_uri_map_manager; gobject->finalize = ags_lv2_uri_map_manager_finalize; } void ags_lv2_uri_map_manager_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_lv2_uri_map_manager_connect; connectable->disconnect = ags_lv2_uri_map_manager_disconnect; } void ags_lv2_uri_map_manager_init(AgsLv2UriMapManager *lv2_uri_map_manager) { lv2_uri_map_manager->id_counter = 1; lv2_uri_map_manager->uri_map = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) ags_lv2_uri_map_manager_destroy_data); } void ags_lv2_uri_map_manager_connect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_uri_map_manager_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_uri_map_manager_finalize(GObject *gobject) { AgsLv2UriMapManager *lv2_uri_map_manager; lv2_uri_map_manager = AGS_LV2_URI_MAP_MANAGER(gobject); g_hash_table_destroy(lv2_uri_map_manager->uri_map); if(lv2_uri_map_manager == ags_lv2_uri_map_manager){ ags_lv2_uri_map_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2_uri_map_manager_parent_class)->finalize(gobject); } void ags_lv2_uri_map_manager_destroy_data(gpointer data) { /* empty */ } /** * ags_lv2_uri_map_manager_insert: * @lv2_uri_map_manager: the #AgsLv2UriMapManager * @uri: the object as key * @id: the id to insert * * Inserts a id into hash map associated with @uri. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_uri_map_manager_insert(AgsLv2UriMapManager *lv2_uri_map_manager, gchar *uri, GValue *id) { if(!AGS_LV2_URI_MAP_MANAGER(lv2_uri_map_manager) || uri == NULL || id == NULL){ return(FALSE); } g_hash_table_insert(lv2_uri_map_manager->uri_map, uri, id); return(TRUE); } /** * ags_lv2_uri_map_manager_remove: * @lv2_uri_map_manager: the #AgsLv2UriMapManager * @uri: the object to remove * * Removes a lock associated with @uri.3 * * Returns: %TRUE as successfully removed, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_uri_map_manager_remove(AgsLv2UriMapManager *lv2_uri_map_manager, gchar *uri) { GValue *id; if(!AGS_LV2_URI_MAP_MANAGER(lv2_uri_map_manager)){ return(FALSE); } id = g_hash_table_lookup(lv2_uri_map_manager->uri_map, uri); if(id != NULL){ g_hash_table_remove(lv2_uri_map_manager->uri_map, uri); } return(TRUE); } /** * ags_lv2_uri_map_manager_lookup: * @lv2_uri_map_manager: the #AgsLv2UriMapManager * @uri: the object to lookup * * Lookup a id associated with @uri in @lv2_uri_map_manager * * Returns: the id on success, else G_MAXUINT32 * * Since: 1.0.0 */ GValue* ags_lv2_uri_map_manager_lookup(AgsLv2UriMapManager *lv2_uri_map_manager, gchar *uri) { GValue *value; if(!AGS_LV2_URI_MAP_MANAGER(lv2_uri_map_manager)){ return(NULL); } value = (GValue *) g_hash_table_lookup(lv2_uri_map_manager->uri_map, uri); if(value == NULL){ g_message("new uri %s", uri); value = g_new0(GValue, 1); g_value_init(value, G_TYPE_ULONG); g_value_set_ulong(value, lv2_uri_map_manager->id_counter); ags_lv2_uri_map_manager_insert(lv2_uri_map_manager, uri, value); lv2_uri_map_manager->id_counter++; } return(value); } void ags_lv2_uri_map_manager_load_default(AgsLv2UriMapManager *lv2_uri_map_manager) { GValue *value; gchar **str; static const gchar *default_uri[] = { NULL, }; str = default_uri; while(str[0] != NULL){ value = g_new0(GValue, 1); g_value_init(value, G_TYPE_ULONG); g_value_set_ulong(value, lv2_uri_map_manager->id_counter); ags_lv2_uri_map_manager_insert(lv2_uri_map_manager, *str, value); lv2_uri_map_manager->id_counter++; str++; } } uint32_t ags_lv2_uri_map_manager_uri_to_id(LV2_URI_Map_Callback_Data callback_data, char *map, char *uri) { GValue *value; uint32_t id; if(map != NULL){ uri = g_strdup_printf("%s<%s>", map, uri); } value = ags_lv2_uri_map_manager_lookup(ags_lv2_uri_map_manager_get_instance(), uri); id = g_value_get_ulong(value); return(id); } /** * ags_lv2_uri_map_manager_get_instance: * * Singleton function to optain the id manager instance. * * Returns: an instance of #AgsLv2UriMapManager * * Since: 1.0.0 */ AgsLv2UriMapManager* ags_lv2_uri_map_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_lv2_uri_map_manager == NULL){ ags_lv2_uri_map_manager = ags_lv2_uri_map_manager_new(); // ags_lv2_uri_map_manager_load_default(ags_lv2_uri_map_manager); } pthread_mutex_unlock(&mutex); return(ags_lv2_uri_map_manager); } /** * ags_lv2_uri_map_manager_new: * * Instantiate a id manager. * * Returns: a new #AgsLv2UriMapManager * * Since: 1.0.0 */ AgsLv2UriMapManager* ags_lv2_uri_map_manager_new() { AgsLv2UriMapManager *lv2_uri_map_manager; lv2_uri_map_manager = (AgsLv2UriMapManager *) g_object_new(AGS_TYPE_LV2_URI_MAP_MANAGER, NULL); return(lv2_uri_map_manager); } gsequencer-1.4.24/ags/plugin/ags_lv2_event_manager.h0000644000175000017500000000444013246707333017347 00000000000000/* 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 . */ #ifndef __AGS_LV2_EVENT_MANAGER_H__ #define __AGS_LV2_EVENT_MANAGER_H__ #include #include #include #include #define AGS_TYPE_LV2_EVENT_MANAGER (ags_lv2_event_manager_get_type()) #define AGS_LV2_EVENT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_EVENT_MANAGER, AgsLv2EventManager)) #define AGS_LV2_EVENT_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_EVENT_MANAGER, AgsLv2EventManagerClass)) #define AGS_IS_LV2_EVENT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_EVENT_MANAGER)) #define AGS_IS_LV2_EVENT_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_EVENT_MANAGER)) #define AGS_LV2_EVENT_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_EVENT_MANAGER, AgsLv2EventManagerClass)) typedef struct _AgsLv2EventManager AgsLv2EventManager; typedef struct _AgsLv2EventManagerClass AgsLv2EventManagerClass; struct _AgsLv2EventManager { GObject gobject; }; struct _AgsLv2EventManagerClass { GObjectClass gobject; }; GType ags_lv2_event_manager_get_type(void); uint32_t ags_lv2_event_manager_lv2_event_ref(LV2_Event_Callback_Data callback_data, LV2_Event *event); uint32_t ags_lv2_event_manager_lv2_event_unref(LV2_Event_Callback_Data callback_data, LV2_Event *event); AgsLv2EventManager* ags_lv2_event_manager_get_instance(); AgsLv2EventManager* ags_lv2_event_manager_new(); #endif /*__AGS_LV2_EVENT_MANAGER_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_log_manager.h0000644000175000017500000000434613246707333017014 00000000000000/* 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 . */ #ifndef __AGS_LV2_LOG_MANAGER_H__ #define __AGS_LV2_LOG_MANAGER_H__ #include #include #include #include #define AGS_TYPE_LV2_LOG_MANAGER (ags_lv2_log_manager_get_type()) #define AGS_LV2_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_LOG_MANAGER, AgsLv2LogManager)) #define AGS_LV2_LOG_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_LOG_MANAGER, AgsLv2LogManagerClass)) #define AGS_IS_LV2_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_LOG_MANAGER)) #define AGS_IS_LV2_LOG_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_LOG_MANAGER)) #define AGS_LV2_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_LOG_MANAGER, AgsLv2LogManagerClass)) typedef struct _AgsLv2LogManager AgsLv2LogManager; typedef struct _AgsLv2LogManagerClass AgsLv2LogManagerClass; struct _AgsLv2LogManager { GObject gobject; }; struct _AgsLv2LogManagerClass { GObjectClass gobject; }; GType ags_lv2_log_manager_get_type(void); int ags_lv2_log_manager_printf(LV2_Log_Handle handle, LV2_URID type, const char* fmt, ...); int ags_lv2_log_manager_vprintf(LV2_Log_Handle handle, LV2_URID type, const char* fmt, va_list ap); AgsLv2LogManager* ags_lv2_log_manager_get_instance(); AgsLv2LogManager* ags_lv2_log_manager_new(); #endif /*__AGS_LV2_LOG_MANAGER_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_manager.c0000644000175000017500000007137013256163135016144 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_lv2_manager_class_init(AgsLv2ManagerClass *lv2_manager); void ags_lv2_manager_init (AgsLv2Manager *lv2_manager); void ags_lv2_manager_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_lv2_manager_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_lv2_manager_dispose(GObject *gobject); void ags_lv2_manager_finalize(GObject *gobject); /** * SECTION:ags_lv2_manager * @short_description: Singleton pattern to organize LV2 * @title: AgsLv2Manager * @section_id: * @include: ags/plugin/ags_lv2_manager.h * * The #AgsLv2Manager loads/unloads LV2 plugins. */ enum{ PROP_0, PROP_LOCALE, }; static gpointer ags_lv2_manager_parent_class = NULL; AgsLv2Manager *ags_lv2_manager = NULL; gchar **ags_lv2_default_path = NULL; GType ags_lv2_manager_get_type (void) { static GType ags_type_lv2_manager = 0; if(!ags_type_lv2_manager){ static const GTypeInfo ags_lv2_manager_info = { sizeof (AgsLv2ManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2Manager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_manager_init, }; ags_type_lv2_manager = g_type_register_static(G_TYPE_OBJECT, "AgsLv2Manager", &ags_lv2_manager_info, 0); } return (ags_type_lv2_manager); } void ags_lv2_manager_class_init(AgsLv2ManagerClass *lv2_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_manager_parent_class = g_type_class_peek_parent(lv2_manager); /* GObjectClass */ gobject = (GObjectClass *) lv2_manager; gobject->set_property = ags_lv2_manager_set_property; gobject->get_property = ags_lv2_manager_get_property; gobject->dispose = ags_lv2_manager_dispose; gobject->finalize = ags_lv2_manager_finalize; /* properties */ /** * AgsLv2Manager:locale: * * The assigned locale. * * Since: 1.0.0 */ param_spec = g_param_spec_string("locale", "locale of lv2 manager", "The locale this lv2 manager is assigned to", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LOCALE, param_spec); } void ags_lv2_manager_init(AgsLv2Manager *lv2_manager) { /* initialize lv2 plugin blacklist */ lv2_manager->lv2_plugin_blacklist = NULL; /* initialize lv2 plugin GList */ lv2_manager->lv2_plugin = NULL; /* current plugin node */ lv2_manager->current_plugin_node = NULL; /* initiliaze ags_lv2_default_path string vector */ if(ags_lv2_default_path == NULL){ gchar *lv2_env; if((lv2_env = getenv("LV2_PATH")) != NULL){ gchar *iter, *next; guint i; ags_lv2_default_path = (gchar **) malloc(sizeof(gchar *)); iter = lv2_env; i = 0; while((next = index(iter, ':')) != NULL){ ags_lv2_default_path = (gchar **) realloc(ags_lv2_default_path, (i + 2) * sizeof(gchar *)); ags_lv2_default_path[i] = g_strndup(iter, next - iter); iter = next + 1; i++; } if(*iter != '\0'){ ags_lv2_default_path = (gchar **) realloc(ags_lv2_default_path, (i + 2) * sizeof(gchar *)); ags_lv2_default_path[i] = g_strdup(iter); i++; } ags_lv2_default_path[i] = NULL; }else{ gchar *home_dir; guint i; #ifdef __APPLE__ #ifdef AGS_MAC_BUNDLE if((home_dir = getenv("HOME")) != NULL){ ags_lv2_default_path = (gchar **) malloc(6 * sizeof(gchar *)); }else{ ags_lv2_default_path = (gchar **) malloc(5 * sizeof(gchar *)); } #else if((home_dir = getenv("HOME")) != NULL){ ags_lv2_default_path = (gchar **) malloc(5 * sizeof(gchar *)); }else{ ags_lv2_default_path = (gchar **) malloc(4 * sizeof(gchar *)); } #endif i = 0; #ifdef AGS_MAC_BUNDLE ags_lv2_default_path[i++] = g_strdup_printf("%s/lv2", getenv("GSEQUENCER_PLUGIN_DIR")); #endif ags_lv2_default_path[i++] = g_strdup("/Library/Audio/Plug-Ins/LV2"); ags_lv2_default_path[i++] = g_strdup("/usr/lib/lv2"); ags_lv2_default_path[i++] = g_strdup("/usr/local/lib/lv2"); if(home_dir != NULL){ ags_lv2_default_path[i++] = g_strdup_printf("%s/Library/Audio/Plug-Ins/LV2", home_dir); } ags_lv2_default_path[i++] = NULL; #else if((home_dir = getenv("HOME")) != NULL){ ags_lv2_default_path = (gchar **) malloc(6 * sizeof(gchar *)); }else{ ags_lv2_default_path = (gchar **) malloc(5 * sizeof(gchar *)); } i = 0; ags_lv2_default_path[i++] = g_strdup("/usr/lib64/lv2"); ags_lv2_default_path[i++] = g_strdup("/usr/local/lib64/lv2"); ags_lv2_default_path[i++] = g_strdup("/usr/lib/lv2"); ags_lv2_default_path[i++] = g_strdup("/usr/local/lib/lv2"); if(home_dir != NULL){ ags_lv2_default_path[i++] = g_strdup_printf("%s/.lv2", home_dir); } ags_lv2_default_path[i++] = NULL; #endif } } } void ags_lv2_manager_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLv2Manager *lv2_manager; lv2_manager = AGS_LV2_MANAGER(gobject); switch(prop_id){ case PROP_LOCALE: { gchar *locale; locale = (gchar *) g_value_get_string(value); if(lv2_manager->locale == locale){ return; } if(lv2_manager->locale != NULL){ g_free(lv2_manager->locale); } lv2_manager->locale = g_strdup(locale); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2_manager_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLv2Manager *lv2_manager; lv2_manager = AGS_LV2_MANAGER(gobject); switch(prop_id){ case PROP_LOCALE: { g_value_set_string(value, lv2_manager->locale); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2_manager_dispose(GObject *gobject) { AgsLv2Manager *lv2_manager; lv2_manager = AGS_LV2_MANAGER(gobject); if(lv2_manager->lv2_plugin != NULL){ g_list_free_full(lv2_manager->lv2_plugin, g_object_unref); lv2_manager->lv2_plugin = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2_manager_parent_class)->dispose(gobject); } void ags_lv2_manager_finalize(GObject *gobject) { AgsLv2Manager *lv2_manager; GList *lv2_plugin; lv2_manager = AGS_LV2_MANAGER(gobject); lv2_plugin = lv2_manager->lv2_plugin; g_list_free_full(lv2_plugin, g_object_unref); if(lv2_manager == ags_lv2_manager){ ags_lv2_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2_manager_parent_class)->finalize(gobject); } /** * ags_lv2_manager_get_default_path: * * Get lv2 manager default plugin path. * * Returns: the plugin default search path as a string vector * * Since: 1.0.0 */ gchar** ags_lv2_manager_get_default_path() { return(ags_lv2_default_path); } /** * ags_lv2_manager_set_default_path: * @default_path: the string vector array to use as default path * * Set lv2 manager default plugin path. * * Since: 1.0.0 */ void ags_lv2_manager_set_default_path(gchar** default_path) { ags_lv2_default_path = default_path; } /** * ags_lv2_manager_get_filenames: * @lv2_manager: the #AgsLv2Manager * * Retrieve all filenames * * Returns: a %NULL-terminated array of filenames * * Since: 1.0.0 */ gchar** ags_lv2_manager_get_filenames(AgsLv2Manager *lv2_manager) { GList *lv2_plugin; gchar **filenames; guint i; gboolean contains_filename; if(!AGS_IS_LV2_MANAGER(lv2_manager)){ return(NULL); } lv2_plugin = lv2_manager->lv2_plugin; filenames = NULL; for(i = 0; lv2_plugin != NULL;){ if(filenames == NULL){ filenames = (gchar **) malloc(2 * sizeof(gchar *)); filenames[i] = AGS_BASE_PLUGIN(lv2_plugin->data)->filename; filenames[i + 1] = NULL; i++; }else{ #ifdef HAVE_GLIB_2_44 contains_filename = g_strv_contains(filenames, AGS_BASE_PLUGIN(lv2_plugin->data)->filename); #else contains_filename = ags_strv_contains(filenames, AGS_BASE_PLUGIN(lv2_plugin->data)->filename); #endif if(!contains_filename){ filenames = (gchar **) realloc(filenames, (i + 2) * sizeof(gchar *)); filenames[i] = AGS_BASE_PLUGIN(lv2_plugin->data)->filename; filenames[i + 1] = NULL; i++; } } lv2_plugin = lv2_plugin->next; } return(filenames); } /** * ags_lv2_manager_find_lv2_plugin: * @lv2_manager: the #AgsLv2Manager * @filename: the filename of the plugin * @effect: the effect's name * * Lookup filename in loaded plugins. * * Returns: the #AgsLv2Plugin-struct * * Since: 1.0.0 */ AgsLv2Plugin* ags_lv2_manager_find_lv2_plugin(AgsLv2Manager *lv2_manager, gchar *filename, gchar *effect) { AgsLv2Plugin *lv2_plugin; GList *list; if(!AGS_IS_LV2_MANAGER(lv2_manager) || filename == NULL || effect == NULL){ return(NULL); } list = lv2_manager->lv2_plugin; while(list != NULL){ lv2_plugin = AGS_LV2_PLUGIN(list->data); if(!g_ascii_strcasecmp(AGS_BASE_PLUGIN(lv2_plugin)->filename, filename) && !g_ascii_strcasecmp(AGS_BASE_PLUGIN(lv2_plugin)->effect, effect)){ return(lv2_plugin); } list = list->next; } return(NULL); } /** * ags_lv2_manager_load_blacklist: * @lv2_manager: the #AgsLv2Manager * @blacklist_filename: the filename as string * * Load blacklisted plugin filenames. * * Since: 1.0.0 */ void ags_lv2_manager_load_blacklist(AgsLv2Manager *lv2_manager, gchar *blacklist_filename) { if(!AGS_IS_LV2_MANAGER(lv2_manager) || blacklist_filename == NULL){ return; } if(g_file_test(blacklist_filename, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))){ FILE *file; gchar *str; file = fopen(blacklist_filename, "r"); while(getline(&str, NULL, file) != -1){ lv2_manager->lv2_plugin_blacklist = g_list_prepend(lv2_manager->lv2_plugin_blacklist, str); } } } /** * ags_lv2_manager_load_file: * @lv2_manager: the #AgsLv2Manager * @manifest: the manifest * @turtle: the loaded turtle * @lv2_path: the lv2 path * @filename: the filename of the plugin * * Load @filename specified plugin. * * Since: 1.0.0 */ void ags_lv2_manager_load_file(AgsLv2Manager *lv2_manager, AgsTurtle *manifest, AgsTurtle *turtle, gchar *lv2_path, gchar *filename) { AgsLv2Plugin *lv2_plugin; xmlNode *node; GList *pname_list; GList *effect_list; GList *uri_list; gchar *str; gchar *path; gchar *xpath; gchar *turtle_pname; gchar *effect; gchar *escaped_effect; gchar *uri; guint effect_index; GError *error; void *plugin_so; LV2_Descriptor_Function lv2_descriptor; LV2_Descriptor *plugin_descriptor; uint32_t i; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; if(!AGS_IS_LV2_MANAGER(lv2_manager) || !AGS_IS_TURTLE(manifest) || !AGS_IS_TURTLE(turtle) || lv2_path == NULL || filename == NULL){ return; } /* load plugin */ pthread_mutex_lock(&(mutex)); path = g_strdup_printf("%s/%s", lv2_path, filename); g_message("lv2 check - %s", path); plugin_so = dlopen(path, RTLD_NOW); if(plugin_so == NULL){ g_warning("ags_lv2_manager.c - failed to load static object file"); dlerror(); pthread_mutex_unlock(&(mutex)); return; } if(dlerror() != NULL){ return; } // xmlSaveFormatFileEnc("-", turtle->doc, "UTF-8", 1); /* parse lv2 plugin */ lv2_manager->current_plugin_node = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); xpath = "/rdf-turtle-doc/rdf-statement/rdf-triple/rdf-predicate-object-list/rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length('doap:name') + 1) = 'doap:name']/ancestor::*[self::rdf-verb][1]/following-sibling::rdf-object-list[1]//rdf-string[text()]"; effect_list = ags_turtle_find_xpath(turtle, xpath); while(effect_list != NULL){ xmlNode *current_triple; gchar *current_uuid; /* read effect name */ node = effect_list->data; if(node == NULL){ effect_list = effect_list->next; continue; } str = xmlNodeGetContent(node); if(strlen(str) < 2){ effect_list = effect_list->next; continue; } effect = g_strndup(str + 1, strlen(str) - 2); /* fill current plugin node */ xpath = "./ancestor::*[self::rdf-triple][1]"; current_triple = ags_turtle_find_xpath_with_context_node(turtle, xpath, node)->data; current_uuid = ags_id_generator_create_uuid(); escaped_effect = ags_string_util_escape_single_quote(effect); g_hash_table_insert(lv2_manager->current_plugin_node, current_uuid, current_triple); /* find URI */ xpath = "./rdf-subject/rdf-iri"; uri_list = ags_turtle_find_xpath_with_context_node(turtle, xpath, current_triple); uri = NULL; if(uri_list != NULL){ xmlNode *child; child = ((xmlNode *) uri_list->data)->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!g_ascii_strncasecmp(child->name, "rdf-iriref", 11)){ uri = xmlNodeGetContent(child); if(strlen(uri) > 2){ uri = g_strndup(uri + 1, strlen(uri) - 2); } break; }else if(!g_ascii_strncasecmp(child->name, "rdf-prefixed-name", 18)){ xmlNode *pname_node; gchar *pname; pname_node = child->children; pname = NULL; while(pname_node != NULL){ if(pname_node->type == XML_ELEMENT_NODE){ if(!g_ascii_strncasecmp(pname_node->name, "rdf-pname-ln", 11)){ pname = xmlNodeGetContent(pname_node); break; } } pname_node = pname_node->next; } uri = pname; if(pname != NULL){ gchar *suffix, *prefix; gchar *offset; offset = index(pname, ':'); if(offset != NULL){ GList *prefix_node; offset++; suffix = g_strndup(offset, strlen(pname) - (offset - pname)); prefix = g_strndup(pname, offset - pname); str = g_strdup_printf("//rdf-pname-ns[text()='%s']/following-sibling::*[self::rdf-iriref][1]", prefix); prefix_node = ags_turtle_find_xpath_with_context_node(turtle, str, current_triple); free(str); if(prefix_node != NULL){ gchar *iriref; iriref = xmlNodeGetContent(prefix_node->data); if(iriref != NULL){ if(strlen(iriref) > 2){ gchar *tmp; tmp = g_strndup(iriref + 1, strlen(iriref) - 2); uri = g_strdup_printf("%s%s", tmp, suffix); free(tmp); } free(iriref); } } } } break; } } child = child->next; } } /* turtle pname */ xpath = "./rdf-pname-ln[1]"; pname_list = ags_turtle_find_xpath_with_context_node(turtle, xpath, current_triple); if(pname_list != NULL){ turtle_pname = xmlNodeGetContent(pname_list->data); g_list_free(pname_list); }else{ turtle_pname = NULL; } /* get uri index and append plugin */ lv2_descriptor = (LV2_Descriptor_Function) dlsym(plugin_so, "lv2_descriptor"); if(lv2_descriptor){ for(i = 0; (plugin_descriptor = lv2_descriptor(i)) != NULL; i++){ if(path != NULL && effect != NULL && uri != NULL && !g_ascii_strcasecmp(plugin_descriptor->URI, uri)){ /* check if already added */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(lv2_manager, path, effect); if(lv2_plugin != NULL){ break; } if(ags_base_plugin_find_effect(lv2_manager->lv2_plugin, path, effect) == NULL){ g_message("ags_lv2_manager.c loading - %s %s as %s", path, turtle->filename, effect); lv2_plugin = g_object_new(AGS_TYPE_LV2_PLUGIN, "manifest", manifest, "turtle", turtle, "id", current_uuid, "filename", path, "effect", effect, "pname", turtle_pname, "uri", uri, "effect-index", i, NULL); ags_base_plugin_load_plugin((AgsBasePlugin *) lv2_plugin); lv2_manager->lv2_plugin = g_list_prepend(lv2_manager->lv2_plugin, lv2_plugin); } break; } } } effect_list = effect_list->next; } pthread_mutex_unlock(&(mutex)); g_hash_table_destroy(lv2_manager->current_plugin_node); lv2_manager->current_plugin_node = NULL; } /** * ags_lv2_manager_load_preset: * @lv2_manager: the #AgsLv2Manager * @lv2_plugin: the #AgsLv2Plugin * @preset: the #AgsTurtle * * Load preset. * * Since: 1.0.0.8 */ void ags_lv2_manager_load_preset(AgsLv2Manager *lv2_manager, AgsLv2Plugin *lv2_plugin, AgsTurtle *preset) { AgsLv2Preset *lv2_preset; GList *preset_list; gchar *str; gchar *xpath; gchar *uri; if(!AGS_IS_LV2_MANAGER(lv2_manager) || !AGS_IS_LV2_PLUGIN(lv2_plugin) || lv2_plugin->preset != NULL || !AGS_IS_TURTLE(preset)){ return; } xpath = "/rdf-turtle-doc/rdf-statement/rdf-triple/rdf-predicate-object-list/rdf-verb[@verb='a']/following-sibling::*[self::rdf-object-list]//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':preset') + 1) = ':preset']/ancestor::*[self::rdf-triple][1]/rdf-subject/rdf-iri"; preset_list = ags_turtle_find_xpath(preset, xpath); while(preset_list != NULL){ xmlNode *child; child = ((xmlNode *) preset_list->data)->children; uri = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!g_ascii_strncasecmp(child->name, "rdf-iriref", 11)){ uri = xmlNodeGetContent(child); if(strlen(uri) > 2){ uri = g_strndup(uri + 1, strlen(uri) - 2); } break; }else if(!g_ascii_strncasecmp(child->name, "rdf-prefixed-name", 18)){ xmlNode *pname_node; gchar *pname; pname_node = child->children; pname = NULL; while(pname_node != NULL){ if(pname_node->type == XML_ELEMENT_NODE){ if(!g_ascii_strncasecmp(pname_node->name, "rdf-pname-ln", 11)){ pname = xmlNodeGetContent(pname_node); break; } } pname_node = pname_node->next; } uri = pname; if(pname != NULL){ gchar *suffix, *prefix; gchar *offset; offset = index(pname, ':'); if(offset != NULL){ GList *prefix_node; offset++; suffix = g_strndup(offset, strlen(pname) - (offset - pname)); prefix = g_strndup(pname, offset - pname); str = g_strdup_printf("//rdf-pname-ns[text()='%s']/following-sibling::*[self::rdf-iriref][1]", prefix); prefix_node = ags_turtle_find_xpath(preset, str); free(str); if(prefix_node != NULL){ gchar *iriref; iriref = xmlNodeGetContent(prefix_node->data); if(iriref != NULL){ if(strlen(iriref) > 2){ gchar *tmp; tmp = g_strndup(iriref + 1, strlen(iriref) - 2); uri = g_strdup_printf("%s%s", tmp, suffix); free(tmp); } free(iriref); } } } } break; } } child = child->next; } if(uri == NULL){ g_message("uri not found %s", AGS_BASE_PLUGIN(lv2_plugin)->filename); /* iterate */ preset_list = preset_list->next; continue; } g_message("parse presets for %s", uri); lv2_preset = g_object_new(AGS_TYPE_LV2_PRESET, "lv2-plugin", lv2_plugin, "turtle", preset, "uri", uri, NULL); ags_lv2_preset_parse_turtle(lv2_preset); lv2_plugin->preset = g_list_append(lv2_plugin->preset, lv2_preset); /* iterate */ preset_list = preset_list->next; } } /** * ags_lv2_manager_load_default_directory: * @lv2_manager: the #AgsLv2Manager * * Loads all available plugins. * * Since: 1.0.0 */ void ags_lv2_manager_load_default_directory(AgsLv2Manager *lv2_manager) { GDir *dir; gchar **lv2_path; gchar *path, *plugin_path; gchar *xpath; gchar *str; GError *error; if(!AGS_IS_LV2_MANAGER(lv2_manager)){ return; } lv2_path = ags_lv2_default_path; while(*lv2_path != NULL){ if(!g_file_test(*lv2_path, G_FILE_TEST_EXISTS)){ lv2_path++; continue; } error = NULL; dir = g_dir_open(*lv2_path, 0, &error); if(error != NULL){ g_warning("%s", error->message); lv2_path++; continue; } while((path = g_dir_read_name(dir)) != NULL){ if(!g_ascii_strncasecmp(path, "..", 3) || !g_ascii_strncasecmp(path, ".", 2)){ continue; } plugin_path = g_strdup_printf("%s/%s", *lv2_path, path); if(g_file_test(plugin_path, G_FILE_TEST_IS_DIR)){ AgsLv2Plugin *lv2_plugin; AgsTurtle *manifest, *turtle; AgsTurtle *preset; xmlDoc *doc; // FILE *out; // xmlChar *buffer; // int size; GList *ttl_list, *binary_list; GList *preset_list; GList *pname_list; GList *list; gchar *manifest_filename; gchar *turtle_path, *filename; gchar *turtle_pname; gchar *preset_path; gboolean turtle_loaded; manifest_filename = g_strdup_printf("%s/manifest.ttl", plugin_path); if(!g_file_test(manifest_filename, G_FILE_TEST_EXISTS)){ continue; } manifest = ags_turtle_new(manifest_filename); ags_turtle_load(manifest, NULL); /* read binary from turtle */ str = g_strdup_printf("/rdf-turtle-doc/rdf-statement/rdf-triple/rdf-predicate-object-list/rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':binary') + 1) = ':binary']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-iriref[substring(text(), string-length(text()) - string-length('%s>') + 1) = '%s>']", AGS_LIBRARY_SUFFIX, AGS_LIBRARY_SUFFIX); binary_list = ags_turtle_find_xpath(manifest, str); /* persist XML */ //NOTE:JK: no need for it //xmlDocDumpFormatMemoryEnc(manifest->doc, &buffer, &size, "UTF-8", TRUE); //out = fopen(g_strdup_printf("%s/manifest.xml", plugin_path), "w+"); //fwrite(buffer, size, sizeof(xmlChar), out); //fflush(out); /* load */ while(binary_list != NULL){ /* read filename of binary */ str = xmlNodeGetContent((xmlNode *) binary_list->data); if(str == NULL){ binary_list = binary_list->next; continue; } str = g_strndup(&(str[1]), strlen(str) - 2); filename = g_strdup_printf("%s/%s", path, str); free(str); /* read turtle from manifest */ ttl_list = ags_turtle_find_xpath_with_context_node(manifest, "./ancestor::*[self::rdf-triple][1]//rdf-iriref[substring(text(), string-length(text()) - string-length('.ttl>') + 1) = '.ttl>']", (xmlNode *) binary_list->data); while(ttl_list != NULL){ /* read filename */ turtle_path = xmlNodeGetContent((xmlNode *) ttl_list->data); if(turtle_path == NULL){ ttl_list = ttl_list->next; continue; } turtle_path = g_strndup(&(turtle_path[1]), strlen(turtle_path) - 2); if(!g_ascii_strncasecmp(turtle_path, "http://", 7)){ ttl_list = ttl_list->next; continue; } /* load turtle doc */ if((turtle = (AgsTurtle *) ags_turtle_manager_find(ags_turtle_manager_get_instance(), turtle_path)) == NULL){ turtle = ags_turtle_new(g_strdup_printf("%s/%s", plugin_path, turtle_path)); ags_turtle_load(turtle, NULL); ags_turtle_manager_add(ags_turtle_manager_get_instance(), (GObject *) turtle); } /* load specified plugin */ if(!g_list_find_custom(lv2_manager->lv2_plugin_blacklist, filename, strcmp)){ ags_lv2_manager_load_file(lv2_manager, manifest, turtle, *lv2_path, filename); } /* persist XML */ //NOTE:JK: no need for it //xmlDocDumpFormatMemoryEnc(turtle->doc, &buffer, &size, "UTF-8", TRUE); //out = fopen(g_strdup_printf("%s/%s.xml", plugin_path, turtle_path), "w+"); //fwrite(buffer, size, sizeof(xmlChar), out); //fflush(out); // xmlSaveFormatFileEnc("-", turtle->doc, "UTF-8", 1); ttl_list = ttl_list->next; } binary_list = binary_list->next; } /* read presets from turtle */ xpath = "/rdf-turtle-doc/rdf-statement/rdf-triple/rdf-predicate-object-list/rdf-verb[@verb='a']/following-sibling::*[self::rdf-object-list]//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':preset') + 1) = ':preset']/ancestor::*[self::rdf-triple]"; preset_list = ags_turtle_find_xpath(manifest, xpath); while(preset_list != NULL){ xpath = ".//rdf-iriref[substring(text(), string-length(text()) - string-length('.ttl>') + 1) = '.ttl>']"; list = ags_turtle_find_xpath_with_context_node(manifest, xpath, preset_list->data); /* read filename of turtle */ preset_path = xmlNodeGetContent((xmlNode *) list->data); if(preset_path == NULL){ preset_list = preset_list->next; continue; } /* read filename */ preset_path = g_strndup(&(preset_path[1]), strlen(preset_path) - 2); if(!g_ascii_strncasecmp(preset_path, "http://", 7)){ preset_list = preset_list->next; continue; } /* turtle pname */ xpath = ".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':appliesto') + 1) = ':appliesto']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-pname-ln"; pname_list = ags_turtle_find_xpath_with_context_node(manifest, xpath, preset_list->data); if(pname_list != NULL){ turtle_pname = xmlNodeGetContent(pname_list->data); g_list_free(pname_list); }else{ preset_list = preset_list->next; continue; } /* find lv2 plugin by pname */ list = ags_lv2_plugin_find_pname(lv2_manager->lv2_plugin, turtle_pname); if(list == NULL){ preset_list = preset_list->next; continue; } lv2_plugin = list->data; /* load turtle doc */ if((preset = (AgsTurtle *) ags_turtle_manager_find(ags_turtle_manager_get_instance(), preset_path)) == NULL){ preset = ags_turtle_new(g_strdup_printf("%s/%s", plugin_path, preset_path)); ags_turtle_load(preset, NULL); ags_turtle_manager_add(ags_turtle_manager_get_instance(), (GObject *) preset); } ags_lv2_manager_load_preset(lv2_manager, lv2_plugin, preset); preset_list = preset_list->next; } } } lv2_path++; } } /** * ags_lv2_manager_get_instance: * * Get instance. * * Returns: the #AgsLv2Manager * * Since: 1.0.0 */ AgsLv2Manager* ags_lv2_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&(mutex)); if(ags_lv2_manager == NULL){ ags_lv2_manager = ags_lv2_manager_new(AGS_LV2_MANAGER_DEFAULT_LOCALE); pthread_mutex_unlock(&(mutex)); }else{ pthread_mutex_unlock(&(mutex)); } return(ags_lv2_manager); } /** * ags_lv2_manager_new: * @locale: the default locale * * Creates an #AgsLv2Manager * * Returns: a new #AgsLv2Manager * * Since: 1.0.0 */ AgsLv2Manager* ags_lv2_manager_new(gchar *locale) { AgsLv2Manager *lv2_manager; lv2_manager = (AgsLv2Manager *) g_object_new(AGS_TYPE_LV2_MANAGER, "locale", locale, NULL); return(lv2_manager); } gsequencer-1.4.24/ags/plugin/ags_lv2_worker_manager.c0000644000175000017500000001411513246707333017532 00000000000000/* 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 . */ #include #include #include #include void ags_lv2_worker_manager_class_init(AgsLv2WorkerManagerClass *lv2_worker_manager); void ags_lv2_worker_manager_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_worker_manager_init(AgsLv2WorkerManager *lv2_worker_manager); void ags_lv2_worker_manager_connect(AgsConnectable *connectable); void ags_lv2_worker_manager_disconnect(AgsConnectable *connectable); void ags_lv2_worker_manager_finalize(GObject *gobject); /** * SECTION:ags_lv2_worker_manager * @short_description: manage workers * @title: AgsLv2WorkerManager * @section_id: * @include: ags/plugin/ags_lv2_worker_manager.h * * The #AgsLv2WorkerManager tracks your workers. */ static gpointer ags_lv2_worker_manager_parent_class = NULL; AgsLv2WorkerManager *ags_lv2_worker_manager = NULL; GType ags_lv2_worker_manager_get_type() { static GType ags_type_lv2_worker_manager = 0; if(!ags_type_lv2_worker_manager){ const GTypeInfo ags_lv2_worker_manager_info = { sizeof (AgsLv2WorkerManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_worker_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2WorkerManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_worker_manager_init, }; const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_worker_manager_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_worker_manager = g_type_register_static(G_TYPE_OBJECT, "AgsLv2WorkerManager", &ags_lv2_worker_manager_info, 0); g_type_add_interface_static(ags_type_lv2_worker_manager, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_lv2_worker_manager); } void ags_lv2_worker_manager_class_init(AgsLv2WorkerManagerClass *lv2_worker_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_worker_manager_parent_class = g_type_class_peek_parent(lv2_worker_manager); /* GObject */ gobject = (GObjectClass *) lv2_worker_manager; gobject->finalize = ags_lv2_worker_manager_finalize; } void ags_lv2_worker_manager_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_lv2_worker_manager_connect; connectable->disconnect = ags_lv2_worker_manager_disconnect; } void ags_lv2_worker_manager_init(AgsLv2WorkerManager *worker_manager) { worker_manager->thread_pool = NULL; g_atomic_pointer_set(&(worker_manager->worker), NULL); /* empty */ } void ags_lv2_worker_manager_connect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_worker_manager_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_worker_manager_finalize(GObject *gobject) { AgsLv2WorkerManager *lv2_worker_manager; lv2_worker_manager = AGS_LV2_WORKER_MANAGER(gobject); g_list_free_full(g_atomic_pointer_get(&(lv2_worker_manager->worker)), g_object_unref); if(lv2_worker_manager == ags_lv2_worker_manager){ ags_lv2_worker_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2_worker_manager_parent_class)->finalize(gobject); } GObject* ags_lv2_worker_manager_pull_worker(AgsLv2WorkerManager *worker_manager) { AgsLv2Worker *lv2_worker; AgsThread *thread; if(!AGS_IS_LV2_WORKER_MANAGER(worker_manager)){ return(NULL); } thread = ags_thread_pool_pull(worker_manager->thread_pool); g_atomic_int_or(&(thread->sync_flags), (AGS_THREAD_RESUME_INTERRUPTED)); lv2_worker = ags_lv2_worker_new(thread); pthread_mutex_lock(AGS_RETURNABLE_THREAD(thread)->reset_mutex); g_atomic_pointer_set(&(AGS_RETURNABLE_THREAD(thread)->safe_data), lv2_worker); ags_returnable_thread_connect_safe_run(AGS_RETURNABLE_THREAD(thread), ags_lv2_worker_safe_run); g_signal_connect(thread, "interrupted", G_CALLBACK(ags_lv2_worker_interrupted_callback), lv2_worker); g_atomic_int_or(&(AGS_RETURNABLE_THREAD(thread)->flags), AGS_RETURNABLE_THREAD_IN_USE); g_atomic_int_and(&(AGS_RETURNABLE_THREAD(thread)->flags), (~AGS_RETURNABLE_THREAD_RUN_ONCE)); pthread_mutex_unlock(AGS_RETURNABLE_THREAD(thread)->reset_mutex); return(lv2_worker); } /** * ags_lv2_worker_manager_get_instance: * * Singleton function to optain the id manager instance. * * Returns: an instance of #AgsLv2WorkerManager * * Since: 1.0.0 */ AgsLv2WorkerManager* ags_lv2_worker_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_lv2_worker_manager == NULL){ ags_lv2_worker_manager = ags_lv2_worker_manager_new(); // ags_lv2_worker_manager_load_default(ags_lv2_worker_manager); } pthread_mutex_unlock(&mutex); return(ags_lv2_worker_manager); } /** * ags_lv2_worker_manager_new: * * Instantiate a id manager. * * Returns: a new #AgsLv2WorkerManager * * Since: 1.0.0 */ AgsLv2WorkerManager* ags_lv2_worker_manager_new() { AgsLv2WorkerManager *lv2_worker_manager; lv2_worker_manager = (AgsLv2WorkerManager *) g_object_new(AGS_TYPE_LV2_WORKER_MANAGER, NULL); return(lv2_worker_manager); } gsequencer-1.4.24/ags/plugin/ags_plugin_factory.c0000644000175000017500000001302213256163135016762 00000000000000/* 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 . */ #include #include void ags_plugin_factory_class_init(AgsPluginFactoryClass *plugin_factory); void ags_plugin_factory_init (AgsPluginFactory *plugin_factory); void ags_plugin_factory_finalize(GObject *gobject); void ags_plugin_factory_real_add(AgsPluginFactory *plugin_factory, GType plugin_type, gchar *plugin_name, gchar *version, gchar *build_id, gchar *xml_type, GParameter *control, guint control_count); AgsPlugin* ags_plugin_factory_real_create(AgsPluginFactory *plugin_factory, gchar *plugin_name, gchar *version, gchar *build_id); enum{ ADD, CREATE, LAST_SIGNAL, }; static gpointer ags_plugin_factory_parent_class = NULL; static guint plugin_factory_signals[LAST_SIGNAL]; static AgsPluginFactory *ags_plugin_factory = NULL; GType ags_plugin_factory_get_type (void) { static GType ags_type_plugin_factory = 0; if(!ags_type_plugin_factory){ static const GTypeInfo ags_plugin_factory_info = { sizeof (AgsPluginFactoryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_plugin_factory_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPluginFactory), 0, /* n_preallocs */ (GInstanceInitFunc) ags_plugin_factory_init, }; ags_type_plugin_factory = g_type_register_static(G_TYPE_OBJECT, "AgsPluginFactory\0", &ags_plugin_factory_info, 0); } return (ags_type_plugin_factory); } void ags_plugin_factory_class_init(AgsPluginFactoryClass *plugin_factory) { GObjectClass *gobject; ags_plugin_factory_parent_class = g_type_class_peek_parent(plugin_factory); /* GObjectClass */ gobject = (GObjectClass *) plugin_factory; gobject->finalize = ags_plugin_factory_finalize; /* */ plugin_factory->add = ags_plugin_factory_real_add; plugin_factory->create = ags_plugin_factory_real_create; plugin_factory_signals[ADD] = g_signal_new("add\0", G_TYPE_FROM_CLASS (plugin_factory), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsPluginFactoryClass, add), NULL, NULL, g_cclosure_user_marshal_STRING__ULONG_STRING_STRING_STRING_STRING_UINT_POINTER, G_TYPE_OBJECT, 7, G_TYPE_ULONG, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_POINTER); plugin_factory_signals[CREATE] = g_signal_new("create\0", G_TYPE_FROM_CLASS (plugin_factory), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsPluginFactoryClass, create), NULL, NULL, g_cclosure_user_marshal_OBJECT__STRING_STRING_STRING, G_TYPE_OBJECT, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); } void ags_plugin_factory_init(AgsPluginFactory *plugin_factory) { plugin_factory->plugin = NULL; } void ags_plugin_factory_finalize(GObject *gobject) { //TODO:JK: implement me } void ags_plugin_factory_read_file(AgsPluginFactory *plugin_factory, gchar *path) { //TODO:JK: implement me } GList* ags_plugin_factory_list_by_name(AgsPluginFactory *plugin_factory, gchar *plugin_name) { GList *list; list = NULL; //TODO:JK: implement me return(list); } void ags_plugin_factory_real_add(AgsPluginFactory *plugin_factory, GType plugin_type, gchar *plugin_name, gchar *version, gchar *build_id, gchar *xml_type, GParameter *control, guint control_count) { //TODO:JK: implement me } void ags_plugin_factory_add(AgsPluginFactory *plugin_factory, GType plugin_type, gchar *plugin_name, gchar *version, gchar *build_id, gchar *xml_type, GParameter *control, guint control_count) { //TODO:JK: implement me } AgsPlugin* ags_plugin_factory_real_create(AgsPluginFactory *plugin_factory, gchar *plugin_name, gchar *version, gchar *build_id) { AgsPlugin *plugin; plugin = NULL; //TODO:JK: implement me return(plugin); } AgsPlugin* ags_plugin_factory_create(AgsPluginFactory *plugin_factory, gchar *plugin_name, gchar *version, gchar *build_id) { //TODO:JK: implement me return(NULL); } AgsPluginFactory* ags_plugin_factory_get_instance() { pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&(mutex)); if(ags_plugin_factory == NULL){ ags_plugin_factory = ags_plugin_factory_new(); } pthread_mutex_unlock(&(mutex)); return(ags_plugin_factory); } AgsPluginFactory* ags_plugin_factory_new_from_file(gchar *path) { AgsPluginFactory *plugin_factory; plugin_factory = (AgsPluginFactory *) g_object_new(AGS_TYPE_PLUGIN_FACTORY, NULL); ags_plugin_factory_read_file(plugin_factory, path); return(plugin_factory); } AgsPluginFactory* ags_plugin_factory_new() { AgsPluginFactory *plugin_factory; plugin_factory = (AgsPluginFactory *) g_object_new(AGS_TYPE_PLUGIN_FACTORY, NULL); return(plugin_factory); } gsequencer-1.4.24/ags/plugin/ags_lv2_plugin.c0000644000175000017500000015052413247742055016033 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_lv2_plugin_class_init(AgsLv2PluginClass *lv2_plugin); void ags_lv2_plugin_init (AgsLv2Plugin *lv2_plugin); void ags_lv2_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_lv2_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_lv2_plugin_dispose(GObject *gobject); void ags_lv2_plugin_finalize(GObject *gobject); gpointer ags_lv2_plugin_instantiate(AgsBasePlugin *base_plugin, guint samplerate); void ags_lv2_plugin_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location); void ags_lv2_plugin_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_lv2_plugin_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_lv2_plugin_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count); void ags_lv2_plugin_load_plugin(AgsBasePlugin *base_plugin); void ags_lv2_plugin_real_change_program(AgsLv2Plugin *lv2_plugin, gpointer ladspa_handle, guint bank_index, guint program_index); /** * SECTION:ags_lv2_plugin * @short_description: The lv2 plugin class * @title: AgsLv2Plugin * @section_id: * @include: ags/plugin/ags_lv2_plugin.h * * The #AgsLv2Plugin loads/unloads a Lv2 plugin. */ enum{ PROP_0, PROP_PNAME, PROP_URI, PROP_UI_URI, PROP_MANIFEST, PROP_TURTLE, }; enum{ CHANGE_PROGRAM, LAST_SIGNAL, }; static gpointer ags_lv2_plugin_parent_class = NULL; static guint lv2_plugin_signals[LAST_SIGNAL]; GType ags_lv2_plugin_get_type (void) { static GType ags_type_lv2_plugin = 0; if(!ags_type_lv2_plugin){ static const GTypeInfo ags_lv2_plugin_info = { sizeof (AgsLv2PluginClass), NULL, /* lv2_init */ NULL, /* lv2_finalize */ (GClassInitFunc) ags_lv2_plugin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2Plugin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_plugin_init, }; ags_type_lv2_plugin = g_type_register_static(AGS_TYPE_BASE_PLUGIN, "AgsLv2Plugin", &ags_lv2_plugin_info, 0); } return (ags_type_lv2_plugin); } void ags_lv2_plugin_class_init(AgsLv2PluginClass *lv2_plugin) { AgsBasePluginClass *base_plugin; GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_plugin_parent_class = g_type_class_peek_parent(lv2_plugin); /* GObjectClass */ gobject = (GObjectClass *) lv2_plugin; gobject->set_property = ags_lv2_plugin_set_property; gobject->get_property = ags_lv2_plugin_get_property; gobject->dispose = ags_lv2_plugin_dispose; gobject->finalize = ags_lv2_plugin_finalize; /* properties */ /** * AgsLv2Plugin:pname: * * The assigned pname. * * Since: 1.0.0 */ param_spec = g_param_spec_string("pname", i18n_pspec("pname of the plugin"), i18n_pspec("The pname this plugin is associated with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PNAME, param_spec); /** * AgsLv2Plugin:uri: * * The assigned uri. * * Since: 1.0.0 */ param_spec = g_param_spec_string("uri", i18n_pspec("uri of the plugin"), i18n_pspec("The uri this plugin is located in"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_URI, param_spec); /** * AgsLv2Plugin:ui-uri: * * The assigned ui-uri. * * Since: 1.0.0 */ param_spec = g_param_spec_string("ui-uri", i18n_pspec("ui-uri of the plugin"), i18n_pspec("The ui-uri this plugin has"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UI_URI, param_spec); /** * AgsLv2Plugin:manifest: * * The assigned manifest. * * Since: 1.0.0 */ param_spec = g_param_spec_object("manifest", i18n_pspec("manifest of the plugin"), i18n_pspec("The manifest this plugin is located in"), AGS_TYPE_TURTLE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MANIFEST, param_spec); /** * AgsLv2Plugin:turtle: * * The assigned turtle. * * Since: 1.0.0 */ param_spec = g_param_spec_object("turtle", i18n_pspec("turtle of the plugin"), i18n_pspec("The turtle this plugin is located in"), AGS_TYPE_TURTLE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TURTLE, param_spec); /* AgsBasePluginClass */ base_plugin = (AgsBasePluginClass *) lv2_plugin; base_plugin->instantiate = ags_lv2_plugin_instantiate; base_plugin->connect_port = ags_lv2_plugin_connect_port; base_plugin->activate = ags_lv2_plugin_activate; base_plugin->deactivate = ags_lv2_plugin_deactivate; base_plugin->run = ags_lv2_plugin_run; base_plugin->load_plugin = ags_lv2_plugin_load_plugin; /* AgsLv2PluginClass */ lv2_plugin->change_program = ags_lv2_plugin_real_change_program; /** * AgsLv2Plugin::change-program: * @lv2_plugin: the plugin to change-program * @lv2_handle: the Lv2 handle * @bank: the bank number * @program: the program number * * The ::change-program signal creates a new instance of plugin. * * Since: 1.0.0 */ lv2_plugin_signals[CHANGE_PROGRAM] = g_signal_new("change-program", G_TYPE_FROM_CLASS (lv2_plugin), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsLv2PluginClass, change_program), NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT); } void ags_lv2_plugin_init(AgsLv2Plugin *lv2_plugin) { lv2_plugin->flags = 0; lv2_plugin->pname = NULL; lv2_plugin->uri = NULL; lv2_plugin->ui_uri = NULL; lv2_plugin->manifest = NULL; lv2_plugin->turtle = NULL; lv2_plugin->doap_name = NULL; lv2_plugin->foaf_name = NULL; lv2_plugin->foaf_homepage = NULL; lv2_plugin->foaf_mbox = NULL; lv2_plugin->feature = NULL; lv2_plugin->program = NULL; lv2_plugin->preset = NULL; } void ags_lv2_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLv2Plugin *lv2_plugin; lv2_plugin = AGS_LV2_PLUGIN(gobject); switch(prop_id){ case PROP_PNAME: { gchar *pname; pname = (gchar *) g_value_get_string(value); if(lv2_plugin->pname == pname){ return; } if(lv2_plugin->pname != NULL){ g_free(lv2_plugin->pname); } lv2_plugin->pname = g_strdup(pname); } break; case PROP_URI: { gchar *uri; uri = (gchar *) g_value_get_string(value); if(lv2_plugin->uri == uri){ return; } if(lv2_plugin->uri != NULL){ g_free(lv2_plugin->uri); } lv2_plugin->uri = g_strdup(uri); } break; case PROP_UI_URI: { gchar *ui_uri; ui_uri = (gchar *) g_value_get_string(value); if(lv2_plugin->ui_uri == ui_uri){ return; } if(lv2_plugin->ui_uri != NULL){ g_free(lv2_plugin->ui_uri); } lv2_plugin->ui_uri = g_strdup(ui_uri); } break; case PROP_MANIFEST: { AgsTurtle *manifest; manifest = (AgsTurtle *) g_value_get_object(value); if(lv2_plugin->manifest == manifest){ return; } if(lv2_plugin->manifest != NULL){ g_object_unref(lv2_plugin->manifest); } if(manifest != NULL){ g_object_ref(manifest); } lv2_plugin->manifest = manifest; } break; case PROP_TURTLE: { AgsTurtle *turtle; turtle = (AgsTurtle *) g_value_get_object(value); if(lv2_plugin->turtle == turtle){ return; } if(lv2_plugin->turtle != NULL){ g_object_unref(lv2_plugin->turtle); } if(turtle != NULL){ g_object_ref(turtle); } lv2_plugin->turtle = turtle; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLv2Plugin *lv2_plugin; lv2_plugin = AGS_LV2_PLUGIN(gobject); switch(prop_id){ case PROP_PNAME: { g_value_set_string(value, lv2_plugin->pname); } break; case PROP_URI: { g_value_set_string(value, lv2_plugin->uri); } break; case PROP_UI_URI: { g_value_set_string(value, lv2_plugin->ui_uri); } break; case PROP_MANIFEST: { g_value_set_object(value, lv2_plugin->manifest); } break; case PROP_TURTLE: { g_value_set_object(value, lv2_plugin->turtle); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2_plugin_dispose(GObject *gobject) { AgsLv2Plugin *lv2_plugin; lv2_plugin = AGS_LV2_PLUGIN(gobject); if(lv2_plugin->manifest != NULL){ g_object_unref(lv2_plugin->manifest); lv2_plugin->manifest = NULL; } if(lv2_plugin->turtle != NULL){ g_object_unref(lv2_plugin->turtle); lv2_plugin->turtle = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2_plugin_parent_class)->dispose(gobject); } void ags_lv2_plugin_finalize(GObject *gobject) { AgsLv2Plugin *lv2_plugin; lv2_plugin = AGS_LV2_PLUGIN(gobject); g_free(lv2_plugin->uri); g_free(lv2_plugin->ui_uri); if(lv2_plugin->manifest != NULL){ g_object_unref(lv2_plugin->manifest); } if(lv2_plugin->turtle != NULL){ g_object_unref(lv2_plugin->turtle); } if(lv2_plugin->feature != NULL){ guint i; for(i = 0; lv2_plugin->feature[i] != NULL; i++){ free(lv2_plugin->feature[i]->data); free(lv2_plugin->feature[i]); } free(lv2_plugin->feature); } /* call parent */ G_OBJECT_CLASS(ags_lv2_plugin_parent_class)->finalize(gobject); } gpointer ags_lv2_plugin_instantiate(AgsBasePlugin *base_plugin, guint samplerate) { AgsLv2Plugin *lv2_plugin; AgsConfig *config; void *plugin_so; LV2_Descriptor_Function lv2_descriptor; LV2_Descriptor *plugin_descriptor; LV2_Handle *lv2_handle; LV2_URI_Map_Feature *uri_map_feature; LV2_Worker_Schedule_Handle worker_handle; LV2_Worker_Schedule *worker_schedule; LV2_Log_Log *log_feature; LV2_Event_Feature *event_feature; LV2_URID_Map *urid_map; LV2_URID_Unmap *urid_unmap; LV2_Options_Interface *options_interface; LV2_Options_Option *options; LV2_Feature **feature; char *path; gchar *str; float *ptr_samplerate; float *ptr_buffer_size; guint conf_buffer_size; guint conf_samplerate; double rate; guint total_feature; guint nth; lv2_plugin = base_plugin; // xmlSaveFormatFileEnc("-", lv2_plugin->turtle->doc, "UTF-8", 1); feature = NULL; config = ags_config_get_instance(); worker_handle = NULL; if(lv2_plugin->feature == NULL){ /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ conf_samplerate = g_ascii_strtoull(str, NULL, 10); free(str); }else{ conf_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } /* buffer-size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ conf_buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); }else{ conf_buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; } /**/ total_feature = 8; nth = 0; lv2_plugin->feature = feature = (LV2_Feature **) malloc(total_feature * sizeof(LV2_Feature *)); /* URI map feature */ uri_map_feature = (LV2_URI_Map_Feature *) malloc(sizeof(LV2_URI_Map_Feature)); uri_map_feature->callback_data = NULL; uri_map_feature->uri_to_id = ags_lv2_uri_map_manager_uri_to_id; feature[nth] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[nth]->URI = LV2_URI_MAP_URI; feature[nth]->data = uri_map_feature; nth++; /* worker feature */ if((AGS_LV2_PLUGIN_NEEDS_WORKER & (lv2_plugin->flags)) != 0){ worker_handle = ags_lv2_worker_manager_pull_worker(ags_lv2_worker_manager_get_instance()); worker_schedule = (LV2_Worker_Schedule *) malloc(sizeof(LV2_Worker_Schedule)); worker_schedule->handle = worker_handle; worker_schedule->schedule_work = ags_lv2_worker_schedule_work; feature[nth] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[nth]->URI = LV2_WORKER__schedule; feature[nth]->data = worker_schedule; nth++; } /* log feature */ log_feature = (LV2_Log_Log *) malloc(sizeof(LV2_Log_Log)); log_feature->handle = NULL; log_feature->printf = ags_lv2_log_manager_printf; log_feature->vprintf = ags_lv2_log_manager_vprintf; feature[nth] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[nth]->URI = LV2_LOG__log; feature[nth]->data = log_feature; nth++; /* event feature */ event_feature = (LV2_Event_Feature *) malloc(sizeof(LV2_Event_Feature)); event_feature->callback_data = NULL; event_feature->lv2_event_ref = ags_lv2_event_manager_lv2_event_ref; event_feature->lv2_event_unref = ags_lv2_event_manager_lv2_event_unref; feature[nth] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[nth]->URI = LV2_EVENT_URI; feature[nth]->data = event_feature; nth++; /* URID map feature */ urid_map = (LV2_URID_Map *) malloc(sizeof(LV2_URID_Map)); urid_map->handle = NULL; urid_map->map = ags_lv2_urid_manager_map; feature[nth] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[nth]->URI = LV2_URID_MAP_URI; feature[nth]->data = urid_map; nth++; /* URID unmap feature */ urid_unmap = (LV2_URID_Unmap *) malloc(sizeof(LV2_URID_Unmap)); urid_unmap->handle = NULL; urid_unmap->unmap = ags_lv2_urid_manager_unmap; feature[nth] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[nth]->URI = LV2_URID_UNMAP_URI; feature[nth]->data = urid_unmap; nth++; /* Options interface */ options_interface = (LV2_Options_Interface *) malloc(sizeof(LV2_Options_Interface)); options_interface->set = ags_lv2_option_manager_lv2_options_set; options_interface->get = ags_lv2_option_manager_lv2_options_get; feature[nth] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[nth]->URI = LV2_OPTIONS_URI; feature[nth]->data = options_interface; nth++; /* terminate */ for(; nth < total_feature; nth++){ feature[nth] = NULL; } } plugin_so = AGS_BASE_PLUGIN(lv2_plugin)->plugin_so; if(plugin_so != NULL){ lv2_descriptor = (LV2_Descriptor_Function) dlsym(plugin_so, "lv2_descriptor"); if(dlerror() == NULL && lv2_descriptor){ base_plugin->plugin_descriptor = plugin_descriptor = lv2_descriptor(AGS_BASE_PLUGIN(lv2_plugin)->effect_index); } } /* alloc handle and path */ lv2_handle = (LV2_Handle *) malloc(sizeof(LV2_Handle)); path = g_strndup(base_plugin->filename, rindex(base_plugin->filename, '/') - base_plugin->filename + 1); /* instantiate */ rate = (double) samplerate; lv2_handle[0] = AGS_LV2_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->instantiate(AGS_LV2_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor), rate, path, lv2_plugin->feature); if(feature != NULL){ /* some options */ options = (LV2_Options_Option *) malloc(6 * sizeof(LV2_Options_Option)); /* samplerate */ options[0].context = LV2_OPTIONS_INSTANCE; options[0].subject = 0; options[0].key = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_PARAMETERS__sampleRate); ptr_samplerate = (float *) malloc(sizeof(float)); ptr_samplerate[0] = conf_samplerate; options[0].size = sizeof(float); options[0].type = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_ATOM__Float); options[0].value = ptr_samplerate; /* min-block-length */ options[1].context = LV2_OPTIONS_INSTANCE; options[1].subject = 0; options[1].key = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_BUF_SIZE__minBlockLength); ptr_buffer_size = (float *) malloc(sizeof(float)); ptr_buffer_size[0] = conf_buffer_size; options[1].size = sizeof(float); options[1].type = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_ATOM__Int); options[1].value = ptr_buffer_size; /* max-block-length */ options[2].context = LV2_OPTIONS_INSTANCE; options[2].subject = 0; options[2].key = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_BUF_SIZE__maxBlockLength); ptr_buffer_size = (float *) malloc(sizeof(float)); ptr_buffer_size[0] = conf_buffer_size; options[2].size = sizeof(float); options[2].type = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_ATOM__Int); options[2].value = ptr_buffer_size; /* bounded-block-length */ options[3].context = LV2_OPTIONS_INSTANCE; options[3].subject = 0; options[3].key = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_BUF_SIZE__boundedBlockLength); ptr_buffer_size = (float *) malloc(sizeof(float)); ptr_buffer_size[0] = conf_buffer_size; options[3].size = sizeof(float); options[3].type = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_ATOM__Int); options[3].value = ptr_buffer_size; /* fixed-block-length */ options[4].context = LV2_OPTIONS_INSTANCE; options[4].subject = 0; options[4].key = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_BUF_SIZE__fixedBlockLength); ptr_buffer_size = (float *) malloc(sizeof(float)); ptr_buffer_size[0] = conf_buffer_size; options[4].size = sizeof(float); options[4].type = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), LV2_ATOM__Int); options[4].value = ptr_buffer_size; /* terminate */ options[5].context = LV2_OPTIONS_INSTANCE; options[5].subject = 0; options[5].key = 0; options[5].size = 0; options[5].type = 0; options[5].value = NULL; /* set options */ ags_lv2_option_manager_lv2_options_set(*lv2_handle, options); } /* */ if(worker_handle != NULL){ AGS_LV2_WORKER(worker_handle)->handle = *lv2_handle; } free(path); return(lv2_handle); } void ags_lv2_plugin_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location) { AGS_LV2_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->connect_port((LV2_Handle) plugin_handle, (uint32_t) port_index, (float *) data_location); } void ags_lv2_plugin_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { if(AGS_LV2_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->activate != NULL){ AGS_LV2_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->activate((LV2_Handle) plugin_handle); } } void ags_lv2_plugin_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { if(AGS_LV2_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->deactivate != NULL){ AGS_LV2_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->deactivate((LV2_Handle) plugin_handle); } } void ags_lv2_plugin_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count) { AGS_LV2_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->run((LV2_Handle) plugin_handle, frame_count); } void ags_lv2_plugin_load_plugin(AgsBasePlugin *base_plugin) { AgsLv2Plugin *lv2_plugin; AgsPortDescriptor *port; GList *metadata_list; GList *instrument_list; GList *extension_list; GList *feature_list; GList *ui_list; GList *port_list; GList *port_descriptor_list; gchar *escaped_effect; gchar *xpath; gchar *uri; gdouble lower_value, upper_value; guint i; gboolean found_port; LV2_Descriptor_Function lv2_descriptor; LV2_Descriptor *plugin_descriptor; uint32_t effect_index; lv2_plugin = AGS_LV2_PLUGIN(base_plugin); base_plugin->plugin_so = dlopen(base_plugin->filename, RTLD_NOW); if(base_plugin->plugin_so == NULL){ g_warning("ags_lv2_plugin.c - failed to load static object file"); dlerror(); return; } lv2_descriptor = (LV2_Descriptor_Function) dlsym(base_plugin->plugin_so, "lv2_descriptor"); if(dlerror() == NULL && lv2_descriptor){ xmlNode *triple_node; xmlNode *port_node; xmlNode *current; GList *list, *list_start; escaped_effect = ags_string_util_escape_single_quote(base_plugin->effect); /* retrieve triple node */ triple_node = g_hash_table_lookup(ags_lv2_manager_get_instance()->current_plugin_node, base_plugin->id); if(triple_node == NULL){ g_warning("rdf-triple not found"); return; } /* name metadata */ xpath = ".//rdf-pname-ln[text()='doap:name']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-string"; metadata_list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, triple_node); if(metadata_list != NULL){ lv2_plugin->doap_name = xmlNodeGetContent((xmlNode *) metadata_list->data); g_list_free(metadata_list); } /* author metadata */ xpath = ".//rdf-pname-ln[text()='foaf:name']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-string"; metadata_list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, triple_node); if(metadata_list != NULL){ lv2_plugin->foaf_name = xmlNodeGetContent((xmlNode *) metadata_list->data); g_list_free(metadata_list); } /* homepage metadata */ xpath = ".//rdf-pname-ln[text()='foaf:homepage']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-string"; metadata_list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, triple_node); if(metadata_list != NULL){ lv2_plugin->foaf_homepage = xmlNodeGetContent((xmlNode *) metadata_list->data); g_list_free(metadata_list); } /* mbox metadata */ xpath = ".//rdf-pname-ln[text()='foaf:mbox']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-string"; metadata_list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, triple_node); if(metadata_list != NULL){ lv2_plugin->foaf_mbox = xmlNodeGetContent((xmlNode *) metadata_list->data); g_list_free(metadata_list); } /* check programs interface */ xpath = ".//rdf-pname-ln[text()='lv2:extensiondata']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-iriref[text()='']"; extension_list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, triple_node); if(extension_list != NULL){ lv2_plugin->flags |= AGS_LV2_PLUGIN_HAS_PROGRAM_INTERFACE; g_list_free(extension_list); } /* check needs worker */ xpath = ".//rdf-pname-ln[text()='lv2:requiredFeature']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-pname-ln[text()='lv2worker:schedule']"; feature_list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, triple_node); if(feature_list != NULL){ lv2_plugin->flags |= AGS_LV2_PLUGIN_NEEDS_WORKER; g_list_free(feature_list); } /* check if is synthesizer */ xpath = ".//rdf-verb[@verb='a']/following-sibling::*[self::rdf-object-list]//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':instrumentplugin') + 1) = ':instrumentplugin']"; instrument_list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, triple_node); if(instrument_list != NULL){ lv2_plugin->flags |= AGS_LV2_PLUGIN_IS_SYNTHESIZER; g_list_free(instrument_list); } /* check UI */ xpath = ".//rdf-pname-ln[text()='uiext:ui']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-iriref"; ui_list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, triple_node); if(ui_list != NULL){ gchar *ui_uri; ui_uri = xmlNodeGetContent(ui_list->data); if(strlen(ui_uri) > 2){ ui_uri = g_strndup(ui_uri + 1, strlen(ui_uri) - 2); } g_object_set(lv2_plugin, "ui-uri", ui_uri, NULL); g_message("*** found UI <%s> ***", ui_uri); g_list_free(ui_list); } /* load ports */ xpath = ".//rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':port') + 1) = ':port']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list]/rdf-object[.//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':index') + 1) = ':index']]"; port_list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, triple_node); /* */ port_descriptor_list = NULL; while(port_list != NULL){ port = ags_port_descriptor_alloc(); found_port = FALSE; g_value_init(port->upper_value, G_TYPE_FLOAT); g_value_init(port->lower_value, G_TYPE_FLOAT); g_value_init(port->default_value, G_TYPE_FLOAT); g_value_set_float(port->upper_value, 0.0); port_node = (xmlNode *) port_list->data; // g_message("%s", port_node->name); /* load flags - control */ xpath = g_ascii_strdown(".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':ControlPort') + 1) = ':ControlPort']", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ port->flags |= AGS_PORT_DESCRIPTOR_CONTROL; found_port = TRUE; g_list_free(list); } /* load flags - output */ xpath = g_ascii_strdown(".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':OutputPort') + 1) = ':OutputPort']", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ port->flags |= AGS_PORT_DESCRIPTOR_OUTPUT; found_port = TRUE; g_list_free(list); } /* load flags - input */ xpath = g_ascii_strdown(".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':InputPort') + 1) = ':InputPort']", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ port->flags |= AGS_PORT_DESCRIPTOR_INPUT; found_port = TRUE; g_list_free(list); } /* load flags - audio */ xpath = g_ascii_strdown(".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':AudioPort') + 1) = ':AudioPort']", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ port->flags |= AGS_PORT_DESCRIPTOR_AUDIO; found_port = TRUE; g_list_free(list); } /* load flags - event */ xpath = g_ascii_strdown(".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':EventPort') + 1) = ':EventPort']", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ port->flags |= AGS_PORT_DESCRIPTOR_EVENT; found_port = TRUE; g_list_free(list); } /* load flags - atom */ xpath = g_ascii_strdown(".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':AtomPort') + 1) = ':AtomPort']", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ port->flags |= AGS_PORT_DESCRIPTOR_ATOM; found_port = TRUE; g_list_free(list); } /* load index */ xpath = g_ascii_strdown(".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':index') + 1) = ':index']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-numeric", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ current = (xmlNode *) list->data; port->port_index = g_ascii_strtoull(xmlNodeGetContent(current), NULL, 10); found_port = TRUE; g_list_free(list); }else{ g_warning("ags_lv2_plugin.c - no port index found"); } if(!found_port){ free(port); port_list = port_list->next; continue; }else{ port_descriptor_list = g_list_prepend(port_descriptor_list, port); } /* properties */ xpath = g_ascii_strdown(".//rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':portProperty') + 1) = ':portProperty']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-pname-ln", -1); list_start = list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); while(list != NULL){ current = (xmlNode *) list->data; if(g_str_has_suffix(xmlNodeGetContent(current), ":toggled")){ port->flags |= AGS_PORT_DESCRIPTOR_TOGGLED; }else if(g_str_has_suffix(xmlNodeGetContent(current), ":enumeration")){ port->flags |= AGS_PORT_DESCRIPTOR_ENUMERATION; }else if(g_str_has_suffix(xmlNodeGetContent(current), ":logarithmic")){ port->flags |= AGS_PORT_DESCRIPTOR_LOGARITHMIC; }else if(g_str_has_suffix(xmlNodeGetContent(current), ":integer")){ port->flags |= AGS_PORT_DESCRIPTOR_INTEGER; } list = list->next; } if(list_start != NULL){ g_list_free(list_start); } /* load name */ xpath = g_ascii_strdown(".//rdf-object-list//rdf-string[ancestor::*[self::rdf-object-list][1]/preceding-sibling::*[self::rdf-verb][1]//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':name') + 1) = ':name']]", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ gchar *str; current = (xmlNode *) list->data; str = xmlNodeGetContent(current); if(strlen(str) > 2){ port->port_name = g_strndup(str + 1, strlen(str) - 2); } g_list_free(list); } /* load symbol */ xpath = g_ascii_strdown(".//rdf-object-list//rdf-string[ancestor::*[self::rdf-object-list][1]/preceding-sibling::*[self::rdf-verb][1]//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':symbol') + 1) = ':symbol']]", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ gchar *str; current = (xmlNode *) list->data; str = xmlNodeGetContent(current); if(strlen(str) > 2){ port->port_symbol = g_strndup(str + 1, strlen(str) - 2); } g_list_free(list); } /* load scale points and value */ xpath = g_ascii_strdown(".//rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':scalePoint') + 1) = ':scalePoint']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-string", -1); list_start = list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ port->scale_steps = g_list_length(list) - 1; port->scale_points = malloc((port->scale_steps + 1) * sizeof(gchar *)); port->scale_value = malloc((port->scale_steps + 1) * sizeof(float)); for(i = 0; list != NULL; i++){ gchar *str; current = (xmlNode *) list->data; str = xmlNodeGetContent(current); if(strlen(str) > 2){ port->scale_points[i] = g_strndup(str + 1, strlen(str) - 2); } list = list->next; } if(list_start != NULL){ g_list_free(list_start); } xpath = g_ascii_strdown(".//rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':scalePoint') + 1) = ':scalePoint']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-numeric", -1); list_start = list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); for(i = 0; list != NULL; i++){ gchar *str; current = (xmlNode *) list->data; str = xmlNodeGetContent(current); port->scale_value[i] = g_ascii_strtod(str, NULL); list = list->next; } if(list_start != NULL){ g_list_free(list_start); } }else{ port->scale_steps = 0; port->scale_points = NULL; port->scale_value = NULL; } /* minimum */ xpath = g_ascii_strdown(".//rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':minimum') + 1) = ':minimum']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-numeric", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); lower_value = 0.0; if(list != NULL){ current = (xmlNode *) list->data; lower_value = g_ascii_strtod(xmlNodeGetContent(current), NULL); g_value_set_float(port->lower_value, lower_value); g_list_free(list); } /* maximum */ xpath = g_ascii_strdown(".//rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':maximum') + 1) = ':maximum']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-numeric", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); upper_value = 1.0; if(list != NULL){ current = (xmlNode *) list->data; upper_value = g_ascii_strtod(xmlNodeGetContent(current), NULL); g_value_set_float(port->upper_value, upper_value); g_list_free(list); } /* check scale steps */ if((AGS_PORT_DESCRIPTOR_INTEGER & (port->flags)) != 0 && port->scale_steps == 0){ if(upper_value > 0.0 && lower_value >= 0.0){ port->scale_steps = upper_value - lower_value; }else if(upper_value > 0 && lower_value < 0){ port->scale_steps = upper_value + (-1 * (lower_value)); }else{ port->scale_steps = -1 * (lower_value - upper_value); } } /* default */ xpath = g_ascii_strdown(".//rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':default') + 1) = ':default']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-numeric", -1); list = ags_turtle_find_xpath_with_context_node(lv2_plugin->turtle, xpath, port_node); if(list != NULL){ current = (xmlNode *) list->data; g_value_set_float(port->default_value, g_ascii_strtod(xmlNodeGetContent(current), NULL)); g_list_free(list); } /* iterate */ port_list = port_list->next; } if(port_list != NULL){ g_list_free(port_list); } base_plugin->port = g_list_reverse(port_descriptor_list); } } /** * ags_lv2_plugin_alloc_event_buffer: * @buffer_size: the allocated size * * Allocates a LV2_Event_Buffer * * Returns: the new event buffer * * Since: 1.0.0 */ void* ags_lv2_plugin_alloc_event_buffer(guint buffer_size) { void *event_buffer; uint32_t padded_buffer_size; if(buffer_size > G_MAXUINT16){ return(NULL); } if(buffer_size < 8){ padded_buffer_size = 8; }else{ padded_buffer_size = buffer_size; } event_buffer = (void *) malloc(padded_buffer_size + sizeof(LV2_Event_Buffer)); memset(event_buffer, 0, padded_buffer_size + sizeof(LV2_Event_Buffer)); AGS_LV2_EVENT_BUFFER(event_buffer)->data = event_buffer + sizeof(LV2_Event_Buffer); AGS_LV2_EVENT_BUFFER(event_buffer)->header_size = sizeof(LV2_Event_Buffer); AGS_LV2_EVENT_BUFFER(event_buffer)->stamp_type = 0; AGS_LV2_EVENT_BUFFER(event_buffer)->capacity = padded_buffer_size; AGS_LV2_EVENT_BUFFER(event_buffer)->event_count = 0; AGS_LV2_EVENT_BUFFER(event_buffer)->size = 0; return(event_buffer); } /** * ags_lv2_plugin_concat_event_buffer: * @buffer0: the first buffer * @...: %NULL terminated variadict arguments * * Concats the event buffers. * * Returns: The newly allocated event buffer * * Since: 1.0.0 */ void* ags_lv2_plugin_concat_event_buffer(void *buffer0, ...) { void *buffer; void *current; va_list ap; guint buffer_length, prev_length; buffer_length = AGS_LV2_EVENT_BUFFER(buffer0)->capacity + sizeof(LV2_Event_Buffer); buffer = (void *) malloc(buffer_length); memcpy(buffer, buffer0, buffer_length); va_start(ap, buffer0); while((current = va_arg(ap, void*)) != NULL){ prev_length = buffer_length; buffer_length += (AGS_LV2_EVENT_BUFFER(current)->capacity + sizeof(LV2_Event_Buffer)); buffer = (void *) realloc(buffer, buffer_length); memcpy(buffer + prev_length, current, buffer_length - prev_length); } va_end(ap); return(buffer); } /** * ags_lv2_plugin_event_buffer_alloc: * @buffer_size: the data's buffer size * * Allocate LV2_Event_Buffer struct. * * Returns: a new allocated LV2_Event_Buffer * * Since: 1.0.0 */ LV2_Event_Buffer* ags_lv2_plugin_event_buffer_alloc(guint buffer_size) { LV2_Event_Buffer *event_buffer; void *data; uint32_t padded_buffer_size; if(buffer_size > G_MAXUINT16){ return(NULL); } if(buffer_size < 8){ padded_buffer_size = 8; }else{ padded_buffer_size = buffer_size; } event_buffer = (LV2_Event_Buffer *) malloc(sizeof(LV2_Event_Buffer)); data = (void *) malloc(sizeof(LV2_Event) + padded_buffer_size * sizeof(uint8_t)); memset(data, 0, sizeof(LV2_Event) + padded_buffer_size * sizeof(uint8_t)); event_buffer->data = data; event_buffer->header_size = sizeof(LV2_Event_Buffer); event_buffer->stamp_type = 0; event_buffer->capacity = padded_buffer_size; event_buffer->event_count = 0; event_buffer->size = 0; return(event_buffer); } /** * ags_lv2_plugin_event_buffer_realloc_data: * @event_buffer: the LV2_Event_Buffer struct * @buffer_size: the data's buffer size * * Reallocate LV2_Event_Buffer struct's data field. * * Since: 1.0.0 */ void ags_lv2_plugin_event_buffer_realloc_data(LV2_Event_Buffer *event_buffer, guint buffer_size) { void *data; uint32_t padded_buffer_size; if(buffer_size > G_MAXUINT16){ return(NULL); } if(buffer_size < 8){ padded_buffer_size = 8; }else{ padded_buffer_size = buffer_size; } data = event_buffer->data; data = (void *) realloc(data, sizeof(LV2_Event) + padded_buffer_size * sizeof(uint8_t)); event_buffer->data = data; } /** * ags_lv2_plugin_event_buffer_concat: * @event_buffer: the first buffer * @...: %NULL terminated variadict arguments * * Concats the event buffers. * * Returns: The newly allocated event buffer * * Since: 1.0.0 */ LV2_Event_Buffer* ags_lv2_plugin_event_buffer_concat(LV2_Event_Buffer *event_buffer, ...) { LV2_Event_Buffer *buffer; LV2_Event_Buffer *current; void *offset; va_list ap; guint i; buffer = (LV2_Event_Buffer *) malloc(sizeof(LV2_Event_Buffer)); memcpy(buffer, event_buffer, sizeof(LV2_Event_Buffer)); va_start(ap, event_buffer); i = 1; while(TRUE){ current = va_arg(ap, LV2_Event_Buffer *); if(current == NULL){ break; } buffer = (LV2_Event_Buffer *) realloc(buffer, (i + 1) * sizeof(LV2_Event_Buffer)); offset = buffer; offset += (i * sizeof(LV2_Event_Buffer)); memcpy(offset, current, sizeof(LV2_Event_Buffer)); i++; } va_end(ap); return(buffer); } /** * ags_lv2_plugin_event_buffer_append_midi: * @event_buffer: the event buffer * @buffer_size: the event buffer size * @events: the events to write * @event_count: the number of events to write * * Append MIDI data to event buffer. * * Returns: %TRUE on success otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_plugin_event_buffer_append_midi(void *event_buffer, guint buffer_size, snd_seq_event_t *events, guint event_count) { void *offset; unsigned char midi_buffer[8]; guint padded_buffer_size; guint count; guint i; gboolean success; /* find offset */ offset = AGS_LV2_EVENT_BUFFER(event_buffer)->data; offset += AGS_LV2_EVENT_BUFFER(event_buffer)->size; /* append midi */ success = TRUE; for(i = 0; i < event_count; i++){ if(offset >= (void *) AGS_LV2_EVENT_BUFFER(event_buffer)->data + buffer_size){ return(FALSE); } /* decode midi sequencer event */ count = ags_midi_buffer_util_decode(midi_buffer, &(events[i])); if(count < 8){ padded_buffer_size = 8; }else{ padded_buffer_size = count; } if(AGS_LV2_EVENT_BUFFER(event_buffer)->size + padded_buffer_size >= buffer_size){ return(FALSE); } AGS_LV2_EVENT_BUFFER(event_buffer)->size += (padded_buffer_size + sizeof(LV2_Event)); AGS_LV2_EVENT_BUFFER(event_buffer)->event_count += 1; AGS_LV2_EVENT(offset)->frames = 0; AGS_LV2_EVENT(offset)->subframes = 0; AGS_LV2_EVENT(offset)->type = ags_lv2_uri_map_manager_uri_to_id(NULL, LV2_EVENT_URI, LV2_MIDI__MidiEvent); AGS_LV2_EVENT(offset)->size = count; memcpy(offset + sizeof(LV2_Event), midi_buffer, count * sizeof(unsigned char)); offset += (padded_buffer_size + sizeof(LV2_Event)); } return(success); } /** * ags_lv2_plugin_event_buffer_remove_midi: * @event_buffer: the event buffer * @buffer_size: the event buffer size * @note: the key to remove * * Remove MIDI data from event buffer. * * Returns: %TRUE on success otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_plugin_event_buffer_remove_midi(void *event_buffer, guint buffer_size, guint note) { void *offset; guint padded_buffer_size; guint count; guint i; gboolean success; /* find offset */ offset = AGS_LV2_EVENT_BUFFER(event_buffer)->data; /* append midi */ success = FALSE; while(offset < offset + AGS_LV2_EVENT_BUFFER(event_buffer)->size){ if(((unsigned char *) (offset + sizeof(LV2_Event)))[1] == (0x7f & note)){ success = TRUE; break; } count = AGS_LV2_EVENT(offset)->size; if(count < 8){ padded_buffer_size = 8; }else{ padded_buffer_size = count; } offset += (padded_buffer_size + sizeof(LV2_Event)); } if(success){ count = AGS_LV2_EVENT(offset)->size; if(count < 8){ padded_buffer_size = 8; }else{ padded_buffer_size = count; } memmove(offset, offset + (padded_buffer_size + sizeof(LV2_Event)), ((void *) AGS_LV2_EVENT_BUFFER(event_buffer)->data + buffer_size) - (offset + padded_buffer_size + sizeof(LV2_Event))); memset(AGS_LV2_EVENT_BUFFER(event_buffer)->data + buffer_size - (padded_buffer_size + sizeof(LV2_Event)), 0, (padded_buffer_size + sizeof(LV2_Event))); AGS_LV2_EVENT_BUFFER(event_buffer)->size -= (padded_buffer_size + sizeof(LV2_Event)); AGS_LV2_EVENT_BUFFER(event_buffer)->event_count -= 1; } return(success); } /** * ags_lv2_plugin_clear_event_buffer: * @event_buffer: the event buffer * @buffer_size: size of @event_buffer * * Clear the event buffer. * * Since: 1.0.0 */ void ags_lv2_plugin_clear_event_buffer(void *event_buffer, guint buffer_size) { void *offset; guint padded_buffer_size; offset = AGS_LV2_EVENT_BUFFER(event_buffer)->data; if(buffer_size < 8){ padded_buffer_size = 8; }else{ padded_buffer_size = buffer_size; } memset(offset, 0, padded_buffer_size); } /** * ags_lv2_plugin_alloc_atom_sequence: * @sequence_size: the requested size * * Allocates a LV2_Atom_Sequence * * Returns: the new atom sequence * * Since: 1.0.0 */ void* ags_lv2_plugin_alloc_atom_sequence(guint sequence_size) { LV2_Atom_Sequence *aseq; LV2_Atom_Event *aev; aseq = (LV2_Atom_Sequence *) malloc(sizeof(LV2_Atom_Sequence) + sequence_size); aseq->atom.size = sizeof(LV2_Atom_Sequence_Body); aseq->atom.type = ags_lv2_urid_manager_map(NULL, LV2_ATOM__Sequence); aseq->body.unit = ags_lv2_urid_manager_map(NULL, LV2_MIDI__MidiEvent); aseq->body.pad = 0; aev = (LV2_Atom_Event*) ((char*) LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)); aev->body.size = 0; aev->body.type = 0; return(aseq); } /** * ags_lv2_plugin_atom_sequence_append_midi: * @atom_sequence: the atom sequence * @sequence_size: the atom sequence size * @events: the events to write * @event_count: the number of events to write * * Append MIDI data to atom sequence. * * Returns: %TRUE on success otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_plugin_atom_sequence_append_midi(void *atom_sequence, guint sequence_size, snd_seq_event_t *events, guint event_count) { AgsLv2UriMapManager *uri_map_manager; LV2_Atom_Sequence *aseq; LV2_Atom_Event *aev; unsigned char midi_buffer[8]; guint count, size; guint padded_size; guint i; gboolean success; aseq = (LV2_Atom_Sequence *) atom_sequence; /* find offset */ aev = (LV2_Atom_Event*) ((char*) LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)); while((void *) aev < atom_sequence + sequence_size){ if(aev->body.size == 0){ break; } size = aev->body.size; aev += ((size + 7) & (~7)); } /* append midi */ success = TRUE; for(i = 0; i < event_count; i++){ if((void *) aev >= atom_sequence + sequence_size){ return(FALSE); } /* decode midi sequencer event */ if((count = ags_midi_buffer_util_decode(midi_buffer, &(events[i]))) <= 8){ aev->time.frames = 0; aev->body.size = count; aev->body.type = ags_lv2_urid_manager_map(NULL, LV2_MIDI__MidiEvent); memcpy(LV2_ATOM_BODY(&(aev->body)), midi_buffer, count * sizeof(char)); aseq->atom.size += ((count + 7) & (~7)); aev += ((count + 7) & (~7)); }else{ success = FALSE; break; } } /* set last empty */ aev->body.size = 0; aev->body.type = 0; return(success); } /** * ags_lv2_plugin_atom_sequence_remove_midi: * @atom_sequence: the atom sequence * @sequence_size: the atom sequence size * @note: the key to remove * * Remove MIDI data from atom sequence. * * Returns: %TRUE on success otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_plugin_atom_sequence_remove_midi(void *atom_sequence, guint sequence_size, guint note) { AgsLv2UriMapManager *uri_map_manager; LV2_Atom_Sequence *aseq; LV2_Atom_Event *aev, *current_aev; unsigned char midi_buffer[8]; guint count, size, current_size; guint padded_size; guint i; gboolean success; aseq = (LV2_Atom_Sequence *) atom_sequence; /* find offset */ aev = (LV2_Atom_Event*) ((char*) LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)); success = FALSE; while((void *) aev < atom_sequence + sequence_size){ if(aev->body.size == 0){ break; } if(((unsigned char *) LV2_ATOM_BODY(&(aev->body)))[1] == (0x7f & note)){ current_aev = aev; current_size = aev->body.size; success = TRUE; break; } size = aev->body.size; aev += ((size + 7) & (~7)); } /* remove midi */ if(success){ /* set empty */ current_aev->body.size = 0; current_aev->body.type = 0; memmove(current_aev, current_aev + ((current_size + 7) & (~7)), (atom_sequence + sequence_size) - (((void *) current_aev) + ((current_size + 7) & (~7)))); memset(atom_sequence + sequence_size - ((current_size + 7) & (~7)), 0, ((current_size + 7) & (~7))); aseq->atom.size -= ((current_size + 7) & (~7)); } return(success); } /** * ags_lv2_plugin_clear_atom_sequence: * @atom_sequence: the atom sequence * @sequence_size: size of @atom_sequence * * Clear the atom sequence. * * Since: 1.0.0 */ void ags_lv2_plugin_clear_atom_sequence(void *atom_sequence, guint sequence_size) { memset(atom_sequence, 0, sequence_size); } /** * ags_lv2_plugin_find_pname: * @lv2_plugin: a #GList-struct containig #AgsLv2Plugin * @pname: the pname to find * * Find pname in @lv2_plugin #GList-struct * * Returns: the matching #GList-struct containing #AgsLv2Plugin * * Since: 1.0.0.8 */ GList* ags_lv2_plugin_find_pname(GList *lv2_plugin, gchar *pname) { if(pname == NULL){ return(NULL); } while(lv2_plugin != NULL){ if(!g_ascii_strcasecmp(pname, AGS_LV2_PLUGIN(lv2_plugin->data)->pname)){ return(lv2_plugin); } lv2_plugin = lv2_plugin->next; } return(NULL); } void ags_lv2_plugin_real_change_program(AgsLv2Plugin *lv2_plugin, gpointer lv2_handle, guint bank_index, guint program_index) { LV2_Descriptor *plugin_descriptor; LV2_Programs_Interface *program_interface; plugin_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->plugin_descriptor; if(plugin_descriptor != NULL && plugin_descriptor->extension_data != NULL && (program_interface = plugin_descriptor->extension_data(LV2_PROGRAMS__Interface)) != NULL){ program_interface->select_program(((LV2_Handle *) lv2_handle)[0], (uint32_t) bank_index, (uint32_t) program_index); } } /** * ags_lv2_plugin_change_program: * @lv2_plugin: the #AgsLv2Plugin * @lv2_handle: the lv2 handle * @bank_index: the bank index * @program_index: the program index * * Change program of @lv2_handle. * * Since: 1.0.0 */ void ags_lv2_plugin_change_program(AgsLv2Plugin *lv2_plugin, gpointer lv2_handle, guint bank_index, guint program_index) { g_return_if_fail(AGS_IS_LV2_PLUGIN(lv2_plugin)); g_object_ref(G_OBJECT(lv2_plugin)); g_signal_emit(G_OBJECT(lv2_plugin), lv2_plugin_signals[CHANGE_PROGRAM], 0, lv2_handle, bank_index, program_index); g_object_unref(G_OBJECT(lv2_plugin)); } /** * ags_lv2_plugin_new: * @turtle: the turtle * @filename: the plugin .so * @effect: the effect's string representation * @uri: the effect's uri * @effect_index: the effect's index * * Creates an #AgsLv2Plugin * * Returns: a new #AgsLv2Plugin * * Since: 1.0.0 */ AgsLv2Plugin* ags_lv2_plugin_new(AgsTurtle *turtle, gchar *filename, gchar *effect, gchar *uri, guint effect_index) { AgsLv2Plugin *lv2_plugin; lv2_plugin = (AgsLv2Plugin *) g_object_new(AGS_TYPE_LV2_PLUGIN, "turtle", turtle, "filename", filename, "effect", effect, "uri", uri, "effect-index", effect_index, NULL); return(lv2_plugin); } gsequencer-1.4.24/ags/plugin/ags_lv2_worker.h0000644000175000017500000000647313246707333016055 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LV2_WORKER_H__ #define __AGS_LV2_WORKER_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #include #include #define AGS_TYPE_LV2_WORKER (ags_lv2_worker_get_type()) #define AGS_LV2_WORKER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_WORKER, AgsLv2Worker)) #define AGS_LV2_WORKER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_WORKER, AgsLv2WorkerClass)) #define AGS_IS_LV2_WORKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_WORKER)) #define AGS_IS_LV2_WORKER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_WORKER)) #define AGS_LV2_WORKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_WORKER, AgsLv2WorkerClass)) #define AGS_LV2_WORKER_RESPONSE_DATA(ptr) ((AgsLv2WorkerResponseData *)(ptr)) typedef struct _AgsLv2Worker AgsLv2Worker; typedef struct _AgsLv2WorkerClass AgsLv2WorkerClass; typedef struct _AgsLv2WorkerResponseData AgsLv2WorkerResponseData; /** * AgsLv2WorkerFlags: * @AGS_LV2_WORKER_RUN: the worker is running * * Enum values to control the behavior or indicate internal state of #AgsLv2Worker by * enable/disable as flags. */ typedef enum{ AGS_LV2_WORKER_RUN = 1, }AgsLv2WorkerFlags; struct _AgsLv2Worker { GObject gobject; volatile guint flags; LV2_Handle handle; LV2_Worker_Interface *worker_interface; uint32_t work_size; void *work_data; GList *response_data; AgsThread *returnable_thread; }; struct _AgsLv2WorkerClass { GObjectClass gobject; }; struct _AgsLv2WorkerResponseData { uint32_t size; void *data; }; GType ags_lv2_worker_get_type(void); AgsLv2WorkerResponseData* ags_lv2_worker_alloc_response_data(); void ags_lv2_worker_free_response_data(AgsLv2WorkerResponseData *response_data); LV2_Worker_Status ags_lv2_worker_respond(LV2_Worker_Respond_Handle handle, uint32_t size, const void* data); LV2_Worker_Status ags_lv2_worker_schedule_work(LV2_Worker_Schedule_Handle handle, uint32_t size, const void* data); void ags_lv2_worker_safe_run(AgsReturnableThread *returnable_thread, gpointer data); void ags_lv2_worker_interrupted_callback(AgsThread *thread, int sig, guint time_cycle, guint *time_spent, AgsLv2Worker *lv2_worker); AgsLv2Worker* ags_lv2_worker_new(AgsThread *returnable_thread); #endif /*__AGS_LV2_WORKER_H__*/ gsequencer-1.4.24/ags/plugin/ags_ladspa_plugin.h0000644000175000017500000000407413246707333016576 00000000000000/* 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 . */ #ifndef __AGS_LADSPA_PLUGIN_H__ #define __AGS_LADSPA_PLUGIN_H__ #include #include #include #include #define AGS_TYPE_LADSPA_PLUGIN (ags_ladspa_plugin_get_type()) #define AGS_LADSPA_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LADSPA_PLUGIN, AgsLadspaPlugin)) #define AGS_LADSPA_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LADSPA_PLUGIN, AgsLadspaPluginClass)) #define AGS_IS_LADSPA_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LADSPA_PLUGIN)) #define AGS_IS_LADSPA_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LADSPA_PLUGIN)) #define AGS_LADSPA_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LADSPA_PLUGIN, AgsLadspaPluginClass)) #define AGS_LADSPA_PLUGIN_DESCRIPTOR(ptr) ((LADSPA_Descriptor *)(ptr)) typedef struct _AgsLadspaPlugin AgsLadspaPlugin; typedef struct _AgsLadspaPluginClass AgsLadspaPluginClass; struct _AgsLadspaPlugin { AgsBasePlugin base_plugin; guint unique_id; }; struct _AgsLadspaPluginClass { AgsBasePluginClass base_plugin; }; GType ags_ladspa_plugin_get_type(void); AgsLadspaPlugin* ags_ladspa_plugin_new(gchar *filename, gchar *effect, guint effect_index); #endif /*__AGS_LADSPA_PLUGIN_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_worker.c0000644000175000017500000001601613246707333016042 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_lv2_worker_class_init(AgsLv2WorkerClass *lv2_worker); void ags_lv2_worker_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_worker_init(AgsLv2Worker *lv2_worker); void ags_lv2_worker_connect(AgsConnectable *connectable); void ags_lv2_worker_disconnect(AgsConnectable *connectable); void ags_lv2_worker_finalize(GObject *gobject); /** * SECTION:ags_lv2_worker * @short_description: task thread * @title: AgsLv2Worker * @section_id: * @include: ags/plugin/ags_lv2_worker.h * * The #AgsLv2Worker acts as task queue thread. */ static gpointer ags_lv2_worker_parent_class = NULL; static AgsConnectableInterface *ags_lv2_worker_parent_connectable_interface; GType ags_lv2_worker_get_type() { static GType ags_type_lv2_worker = 0; if(!ags_type_lv2_worker){ static const GTypeInfo ags_lv2_worker_info = { sizeof (AgsLv2WorkerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_worker_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2Worker), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_worker_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_worker_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_worker = g_type_register_static(G_TYPE_OBJECT, "AgsLv2Worker", &ags_lv2_worker_info, 0); g_type_add_interface_static(ags_type_lv2_worker, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_lv2_worker); } void ags_lv2_worker_class_init(AgsLv2WorkerClass *lv2_worker) { GObjectClass *gobject; ags_lv2_worker_parent_class = g_type_class_peek_parent(lv2_worker); /* GObject */ gobject = (GObjectClass *) lv2_worker; gobject->finalize = ags_lv2_worker_finalize; } void ags_lv2_worker_connectable_interface_init(AgsConnectableInterface *connectable) { ags_lv2_worker_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_lv2_worker_connect; connectable->disconnect = ags_lv2_worker_disconnect; } void ags_lv2_worker_init(AgsLv2Worker *lv2_worker) { g_atomic_int_set(&(lv2_worker->flags), 0); lv2_worker->handle = NULL; lv2_worker->worker_interface = NULL; lv2_worker->work_size = 0; lv2_worker->work_data = NULL; lv2_worker->response_data = NULL; lv2_worker->returnable_thread = NULL; } void ags_lv2_worker_connect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_worker_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_worker_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_lv2_worker_parent_class)->finalize(gobject); } void ags_lv2_worker_safe_run(AgsReturnableThread *returnable_thread, gpointer data) { AgsLv2Worker *lv2_worker; GList *response_data; lv2_worker = g_atomic_pointer_get(&(returnable_thread->safe_data)); if((AGS_LV2_WORKER_RUN & (g_atomic_int_get(&(lv2_worker->flags)))) != 0){ /* work */ lv2_worker->worker_interface->work(lv2_worker->handle, ags_lv2_worker_respond, lv2_worker, lv2_worker->work_size, lv2_worker->work_data); lv2_worker->work_size = 0; lv2_worker->work_data = NULL; /* response data */ response_data = lv2_worker->response_data; while(response_data != NULL){ lv2_worker->worker_interface->work_response(lv2_worker->handle, AGS_LV2_WORKER_RESPONSE_DATA(response_data->data)->size, AGS_LV2_WORKER_RESPONSE_DATA(response_data->data)->data); response_data = response_data->next; } g_list_free_full(lv2_worker->response_data, (GDestroyNotify) ags_lv2_worker_free_response_data); lv2_worker->response_data = NULL; lv2_worker->worker_interface->end_run(lv2_worker->handle); /* reset */ g_atomic_int_and(&(lv2_worker->flags), (~AGS_LV2_WORKER_RUN)); } } void ags_lv2_worker_interrupted_callback(AgsThread *thread, int sig, guint time_cycle, guint *time_spent, AgsLv2Worker *lv2_worker) { if((AGS_THREAD_INTERRUPTED & (g_atomic_int_get(&(thread->sync_flags)))) == 0){ g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_INTERRUPTED); if((AGS_LV2_WORKER_RUN & (g_atomic_int_get(&(lv2_worker->flags)))) != 0){ #ifdef AGS_PTHREAD_SUSPEND pthread_suspend(thread->thread); #else pthread_kill(*(thread->thread), AGS_THREAD_SUSPEND_SIG); #endif } } } AgsLv2WorkerResponseData* ags_lv2_worker_alloc_response_data() { AgsLv2WorkerResponseData *response_data; response_data = (AgsLv2WorkerResponseData *) malloc(sizeof(AgsLv2WorkerResponseData)); response_data->size = 0; response_data->data = NULL; return(response_data); } void ags_lv2_worker_free_response_data(AgsLv2WorkerResponseData *response_data) { free(response_data); } LV2_Worker_Status ags_lv2_worker_respond(LV2_Worker_Respond_Handle handle, uint32_t size, const void* data) { AgsLv2Worker *lv2_worker; AgsLv2WorkerResponseData *response_data; lv2_worker = (AgsLv2Worker *) handle; response_data = ags_lv2_worker_alloc_response_data(); response_data->size = size; response_data->data = data; lv2_worker->response_data = g_list_prepend(lv2_worker->response_data, response_data); return(LV2_WORKER_SUCCESS); } LV2_Worker_Status ags_lv2_worker_schedule_work(LV2_Worker_Schedule_Handle handle, uint32_t size, const void* data) { AgsLv2Worker *lv2_worker; lv2_worker = (AgsLv2Worker *) handle; lv2_worker->work_size = size; lv2_worker->work_data = data; g_atomic_int_or(&(lv2_worker->flags), AGS_LV2_WORKER_RUN); return(LV2_WORKER_SUCCESS); } /** * ags_lv2_worker_new: * @returnable_thread: an #AgsReturnableThread * * Create a new #AgsLv2Worker. * * Returns: the new #AgsLv2Worker * * Since: 1.0.0 */ AgsLv2Worker* ags_lv2_worker_new(AgsThread *returnable_thread) { AgsLv2Worker *lv2_worker; lv2_worker = (AgsLv2Worker *) g_object_new(AGS_TYPE_LV2_WORKER, NULL); lv2_worker->returnable_thread = returnable_thread; return(lv2_worker); } gsequencer-1.4.24/ags/plugin/ags_ladspa_plugin.c0000644000175000017500000003164013256163135016565 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_ladspa_plugin_class_init(AgsLadspaPluginClass *ladspa_plugin); void ags_ladspa_plugin_init (AgsLadspaPlugin *ladspa_plugin); void ags_ladspa_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_ladspa_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_ladspa_plugin_finalize(GObject *gobject); gpointer ags_ladspa_plugin_instantiate(AgsBasePlugin *base_plugin, guint samplerate); void ags_ladspa_plugin_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location); void ags_ladspa_plugin_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_ladspa_plugin_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_ladspa_plugin_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count); void ags_ladspa_plugin_load_plugin(AgsBasePlugin *base_plugin); /** * SECTION:ags_ladspa_plugin * @short_description: The ladspa plugin class * @title: AgsLadspaPlugin * @section_id: * @include: ags/plugin/ags_ladspa_plugin.h * * The #AgsLadspaPlugin loads/unloads a Ladspa plugin. */ enum{ PROP_0, PROP_UNIQUE_ID, }; static gpointer ags_ladspa_plugin_parent_class = NULL; GType ags_ladspa_plugin_get_type (void) { static GType ags_type_ladspa_plugin = 0; if(!ags_type_ladspa_plugin){ static const GTypeInfo ags_ladspa_plugin_info = { sizeof (AgsLadspaPluginClass), NULL, /* ladspa_init */ NULL, /* ladspa_finalize */ (GClassInitFunc) ags_ladspa_plugin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLadspaPlugin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ladspa_plugin_init, }; ags_type_ladspa_plugin = g_type_register_static(AGS_TYPE_BASE_PLUGIN, "AgsLadspaPlugin", &ags_ladspa_plugin_info, 0); } return (ags_type_ladspa_plugin); } void ags_ladspa_plugin_class_init(AgsLadspaPluginClass *ladspa_plugin) { AgsBasePluginClass *base_plugin; GObjectClass *gobject; GParamSpec *param_spec; ags_ladspa_plugin_parent_class = g_type_class_peek_parent(ladspa_plugin); /* GObjectClass */ gobject = (GObjectClass *) ladspa_plugin; gobject->set_property = ags_ladspa_plugin_set_property; gobject->get_property = ags_ladspa_plugin_get_property; gobject->finalize = ags_ladspa_plugin_finalize; /* properties */ /** * AgsLadspaPlugin:unique-id: * * The assigned unique-id. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("unique-id", i18n_pspec("unique-id of the plugin"), i18n_pspec("The unique-id this plugin is assigned with"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UNIQUE_ID, param_spec); /* AgsBasePluginClass */ base_plugin = (AgsBasePluginClass *) ladspa_plugin; base_plugin->instantiate = ags_ladspa_plugin_instantiate; base_plugin->connect_port = ags_ladspa_plugin_connect_port; base_plugin->activate = ags_ladspa_plugin_activate; base_plugin->deactivate = ags_ladspa_plugin_deactivate; base_plugin->run = ags_ladspa_plugin_run; base_plugin->load_plugin = ags_ladspa_plugin_load_plugin; } void ags_ladspa_plugin_init(AgsLadspaPlugin *ladspa_plugin) { ladspa_plugin->unique_id = 0; } void ags_ladspa_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLadspaPlugin *ladspa_plugin; ladspa_plugin = AGS_LADSPA_PLUGIN(gobject); switch(prop_id){ case PROP_UNIQUE_ID: { ladspa_plugin->unique_id = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ladspa_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLadspaPlugin *ladspa_plugin; ladspa_plugin = AGS_LADSPA_PLUGIN(gobject); switch(prop_id){ case PROP_UNIQUE_ID: g_value_set_uint(value, ladspa_plugin->unique_id); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ladspa_plugin_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_ladspa_plugin_parent_class)->finalize(gobject); } gpointer ags_ladspa_plugin_instantiate(AgsBasePlugin *base_plugin, guint samplerate) { gpointer ladspa_handle; ladspa_handle = (gpointer) AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->instantiate(AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor), (unsigned long) samplerate); return(ladspa_handle); } void ags_ladspa_plugin_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location) { AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->connect_port((LADSPA_Handle) plugin_handle, (unsigned long) port_index, (LADSPA_Data *) data_location); } void ags_ladspa_plugin_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { if(AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->activate != NULL){ AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->activate((LADSPA_Handle) plugin_handle); } } void ags_ladspa_plugin_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { if(AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->deactivate != NULL){ AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->deactivate((LADSPA_Handle) plugin_handle); } } void ags_ladspa_plugin_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count) { AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->run((LADSPA_Handle) plugin_handle, (unsigned long) frame_count); } void ags_ladspa_plugin_load_plugin(AgsBasePlugin *base_plugin) { AgsPortDescriptor *port; GList *port_list; LADSPA_Descriptor_Function ladspa_descriptor; LADSPA_PortDescriptor *port_descriptor; LADSPA_PortRangeHint *range_hint; LADSPA_PortRangeHintDescriptor hint_descriptor; unsigned long effect_index; unsigned long port_count; unsigned long i; base_plugin->plugin_so = dlopen(base_plugin->filename, RTLD_NOW); if(base_plugin->plugin_so == NULL){ g_warning("ags_ladspa_plugin.c - failed to load static object file"); dlerror(); return; } ladspa_descriptor = (LADSPA_Descriptor_Function) dlsym((void *) base_plugin->plugin_so, "ladspa_descriptor"); if(dlerror() == NULL && ladspa_descriptor){ effect_index = base_plugin->effect_index; base_plugin->plugin_descriptor = ladspa_descriptor((unsigned long) effect_index); if(base_plugin->plugin_descriptor != NULL){ g_object_set(base_plugin, "unique-id", AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->UniqueID, NULL); port_count = AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->PortCount; port_descriptor = AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->PortDescriptors; port_list = NULL; for(i = 0; i < port_count; i++){ /* allocate port descriptor */ port = ags_port_descriptor_alloc(); port_list = g_list_prepend(port_list, port); /* set flags */ if(LADSPA_IS_PORT_INPUT(port_descriptor[i])){ port->flags |= AGS_PORT_DESCRIPTOR_INPUT; }else if(LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ port->flags |= AGS_PORT_DESCRIPTOR_OUTPUT; } if(LADSPA_IS_PORT_CONTROL(port_descriptor[i])){ port->flags |= AGS_PORT_DESCRIPTOR_CONTROL; }else if(LADSPA_IS_PORT_AUDIO(port_descriptor[i])){ port->flags |= AGS_PORT_DESCRIPTOR_AUDIO; } /* set index and name */ port->port_index = i; port->port_name = g_strdup(AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->PortNames[i]); range_hint = &(AGS_LADSPA_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->PortRangeHints[i]); hint_descriptor = range_hint->HintDescriptor; g_value_init(port->default_value, G_TYPE_FLOAT); g_value_init(port->lower_value, G_TYPE_FLOAT); g_value_init(port->upper_value, G_TYPE_FLOAT); g_value_set_float(port->default_value, 0.0); if(LADSPA_IS_HINT_TOGGLED(hint_descriptor)){ /* is toggled */ port->flags |= AGS_PORT_DESCRIPTOR_TOGGLED; /* set default */ if(LADSPA_IS_HINT_DEFAULT_0(hint_descriptor)){ g_value_set_float(port->default_value, 0.0); }else if(LADSPA_IS_HINT_DEFAULT_1(hint_descriptor)){ g_value_set_float(port->default_value, 1.0); } }else{ /* set lower */ g_value_set_float(port->lower_value, range_hint->LowerBound); /* set upper */ g_value_set_float(port->upper_value, range_hint->UpperBound); /* set default */ g_value_set_float(port->default_value, range_hint->LowerBound); /* bounds */ if(LADSPA_IS_HINT_BOUNDED_BELOW(hint_descriptor)){ if(LADSPA_IS_HINT_SAMPLE_RATE(hint_descriptor)){ port->flags |= (AGS_PORT_DESCRIPTOR_SAMPLERATE | AGS_PORT_DESCRIPTOR_BOUNDED_BELOW); g_value_set_float(port->lower_value, range_hint->LowerBound); } } if(LADSPA_IS_HINT_BOUNDED_ABOVE(hint_descriptor)){ if(LADSPA_IS_HINT_SAMPLE_RATE(hint_descriptor)){ port->flags |= (AGS_PORT_DESCRIPTOR_SAMPLERATE | AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE); g_value_set_float(port->upper_value, range_hint->UpperBound); } } /* integer */ if(LADSPA_IS_HINT_INTEGER(hint_descriptor)){ port->flags |= AGS_PORT_DESCRIPTOR_INTEGER; port->scale_steps = range_hint->UpperBound - range_hint->LowerBound; } /* logarithmic */ if(LADSPA_IS_HINT_LOGARITHMIC(hint_descriptor)){ port->flags |= AGS_PORT_DESCRIPTOR_LOGARITHMIC; } /* set default value */ if(LADSPA_IS_HINT_DEFAULT_MINIMUM(hint_descriptor)){ g_value_set_float(port->default_value, range_hint->LowerBound); }else if(LADSPA_IS_HINT_DEFAULT_LOW(hint_descriptor)){ float default_value; default_value = 0.75 * range_hint->LowerBound + 0.25 * range_hint->UpperBound; g_value_set_float(port->default_value, default_value); }else if(LADSPA_IS_HINT_DEFAULT_MIDDLE(hint_descriptor)){ float default_value; default_value = (0.5 * range_hint->LowerBound) + (0.5 * range_hint->UpperBound); g_value_set_float(port->default_value, default_value); }else if(LADSPA_IS_HINT_DEFAULT_HIGH(hint_descriptor)){ float default_value; default_value = 0.25 * range_hint->LowerBound + 0.75 * range_hint->UpperBound; g_value_set_float(port->default_value, default_value); }else if(LADSPA_IS_HINT_DEFAULT_MAXIMUM(hint_descriptor)){ g_value_set_float(port->default_value, range_hint->UpperBound); }else if(LADSPA_IS_HINT_DEFAULT_100(hint_descriptor)){ g_value_set_float(port->default_value, 100.0); }else if(LADSPA_IS_HINT_DEFAULT_440(hint_descriptor)){ g_value_set_float(port->default_value, 440.0); } } } base_plugin->port = g_list_reverse(port_list); } } } /** * ags_ladspa_plugin_new: * @filename: the plugin .so * @effect: the effect's string representation * @effect_index: the effect's index * * Creates an #AgsLadspaPlugin * * Returns: a new #AgsLadspaPlugin * * Since: 1.0.0 */ AgsLadspaPlugin* ags_ladspa_plugin_new(gchar *filename, gchar *effect, guint effect_index) { AgsLadspaPlugin *ladspa_plugin; ladspa_plugin = (AgsLadspaPlugin *) g_object_new(AGS_TYPE_LADSPA_PLUGIN, "filename", filename, "effect", effect, "effect-index", effect_index, NULL); return(ladspa_plugin); } gsequencer-1.4.24/ags/plugin/ags_plugin_stock.h0000644000175000017500000000167613246707333016462 00000000000000/* 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 . */ #ifndef __AGS_PLUGIN_STOCK_H__ #define __AGS_PLUGIN_STOCK_H__ #include #include #define AGS_PLUGIN_NAME_VOLUME "ags-volume\0" #endif /*__AGS_PLUGIN_STOCK_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2ui_plugin.c0000644000175000017500000002526113246707333016367 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_lv2ui_plugin_class_init(AgsLv2uiPluginClass *lv2ui_plugin); void ags_lv2ui_plugin_init (AgsLv2uiPlugin *lv2ui_plugin); void ags_lv2ui_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_lv2ui_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_lv2ui_plugin_dispose(GObject *gobject); void ags_lv2ui_plugin_finalize(GObject *gobject); gpointer ags_lv2ui_plugin_instantiate(AgsBasePlugin *base_plugin, guint samplerate); void ags_lv2ui_plugin_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location); void ags_lv2ui_plugin_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_lv2ui_plugin_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_lv2ui_plugin_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count); void ags_lv2ui_plugin_load_plugin(AgsBasePlugin *base_plugin); /** * SECTION:ags_lv2ui_plugin * @short_description: The lv2ui plugin class * @title: AgsLv2uiPlugin * @section_id: * @include: ags/plugin/ags_lv2ui_plugin.h * * The #AgsLv2uiPlugin loads/unloads a Lv2ui plugin. */ enum{ PROP_0, PROP_GUI_FILENAME, PROP_GUI_URI, PROP_MANIFEST, PROP_GUI_TURTLE, PROP_LV2_PLUGIN, }; static gpointer ags_lv2ui_plugin_parent_class = NULL; GType ags_lv2ui_plugin_get_type (void) { static GType ags_type_lv2ui_plugin = 0; if(!ags_type_lv2ui_plugin){ static const GTypeInfo ags_lv2ui_plugin_info = { sizeof (AgsLv2uiPluginClass), NULL, /* lv2ui_init */ NULL, /* lv2ui_finalize */ (GClassInitFunc) ags_lv2ui_plugin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2uiPlugin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2ui_plugin_init, }; ags_type_lv2ui_plugin = g_type_register_static(AGS_TYPE_BASE_PLUGIN, "AgsLv2uiPlugin", &ags_lv2ui_plugin_info, 0); } return (ags_type_lv2ui_plugin); } void ags_lv2ui_plugin_class_init(AgsLv2uiPluginClass *lv2ui_plugin) { AgsBasePluginClass *base_plugin; GObjectClass *gobject; GParamSpec *param_spec; ags_lv2ui_plugin_parent_class = g_type_class_peek_parent(lv2ui_plugin); /* GObjectClass */ gobject = (GObjectClass *) lv2ui_plugin; gobject->set_property = ags_lv2ui_plugin_set_property; gobject->get_property = ags_lv2ui_plugin_get_property; gobject->dispose = ags_lv2ui_plugin_dispose; gobject->finalize = ags_lv2ui_plugin_finalize; /* properties */ /** * AgsLv2uiPlugin:gui-uri: * * The assigned GUI URI. * * Since: 1.0.0 */ param_spec = g_param_spec_string("gui-uri", "GUI URI of the plugin", "The GUI URI this plugin is located in", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_GUI_URI, param_spec); /** * AgsLv2Plugin:manifest: * * The assigned manifest. * * Since: 1.0.0 */ param_spec = g_param_spec_object("manifest", "manifest of the plugin", "The manifest this plugin is located in", AGS_TYPE_TURTLE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MANIFEST, param_spec); /** * AgsLv2uiPlugin:gui-turtle: * * The assigned GUI turtle. * * Since: 1.0.0 */ param_spec = g_param_spec_object("gui-turtle", "GUI turtle of the plugin", "The GUI turtle this plugin is located in", AGS_TYPE_TURTLE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_GUI_TURTLE, param_spec); /** * AgsLv2uiPlugin:lv2-plugin: * * The assigned LV2 plugin. * * Since: 1.0.0 */ param_spec = g_param_spec_object("lv2-plugin", "LV2 plugin of the plugin", "The LV2 plugin this plugin is located in", AGS_TYPE_LV2_PLUGIN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LV2_PLUGIN, param_spec); /* AgsBasePluginClass */ base_plugin = (AgsBasePluginClass *) lv2ui_plugin; base_plugin->load_plugin = ags_lv2ui_plugin_load_plugin; } void ags_lv2ui_plugin_init(AgsLv2uiPlugin *lv2ui_plugin) { lv2ui_plugin->flags = 0; lv2ui_plugin->gui_uri = NULL; lv2ui_plugin->manifest = NULL; lv2ui_plugin->gui_turtle = NULL; lv2ui_plugin->lv2_plugin = NULL; } void ags_lv2ui_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLv2uiPlugin *lv2ui_plugin; lv2ui_plugin = AGS_LV2UI_PLUGIN(gobject); switch(prop_id){ case PROP_GUI_URI: { gchar *gui_uri; gui_uri = (gchar *) g_value_get_string(value); if(lv2ui_plugin->gui_uri == gui_uri){ return; } if(lv2ui_plugin->gui_uri != NULL){ g_free(lv2ui_plugin->gui_uri); } lv2ui_plugin->gui_uri = g_strdup(gui_uri); } break; case PROP_MANIFEST: { AgsTurtle *manifest; manifest = (AgsTurtle *) g_value_get_object(value); if(lv2ui_plugin->manifest == manifest){ return; } if(lv2ui_plugin->manifest != NULL){ g_object_unref(lv2ui_plugin->manifest); } if(manifest != NULL){ g_object_ref(manifest); } lv2ui_plugin->manifest = manifest; } break; case PROP_GUI_TURTLE: { AgsTurtle *gui_turtle; gui_turtle = (AgsTurtle *) g_value_get_object(value); if(lv2ui_plugin->gui_turtle == gui_turtle){ return; } if(lv2ui_plugin->gui_turtle != NULL){ g_object_unref(lv2ui_plugin->gui_turtle); } if(gui_turtle != NULL){ g_object_ref(gui_turtle); } lv2ui_plugin->gui_turtle = gui_turtle; } break; case PROP_LV2_PLUGIN: { GObject *lv2_plugin; lv2_plugin = (GObject *) g_value_get_object(value); if(lv2ui_plugin->lv2_plugin == lv2_plugin){ return; } if(lv2ui_plugin->lv2_plugin != NULL){ g_object_unref(lv2ui_plugin->lv2_plugin); } if(lv2_plugin != NULL){ g_object_ref(lv2_plugin); } lv2ui_plugin->lv2_plugin = lv2_plugin; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2ui_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLv2uiPlugin *lv2ui_plugin; lv2ui_plugin = AGS_LV2UI_PLUGIN(gobject); switch(prop_id){ case PROP_GUI_URI: { g_value_set_string(value, lv2ui_plugin->gui_uri); } break; case PROP_MANIFEST: { g_value_set_object(value, lv2ui_plugin->manifest); } break; case PROP_GUI_TURTLE: { g_value_set_object(value, lv2ui_plugin->gui_turtle); } break; case PROP_LV2_PLUGIN: { g_value_set_object(value, lv2ui_plugin->lv2_plugin); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2ui_plugin_dispose(GObject *gobject) { AgsLv2uiPlugin *lv2ui_plugin; lv2ui_plugin = AGS_LV2UI_PLUGIN(gobject); if(lv2ui_plugin->manifest != NULL){ g_object_unref(lv2ui_plugin->manifest); lv2ui_plugin->manifest = NULL; } if(lv2ui_plugin->gui_turtle != NULL){ g_object_unref(lv2ui_plugin->gui_turtle); lv2ui_plugin->gui_turtle = NULL; } if(lv2ui_plugin->lv2_plugin != NULL){ g_object_unref(lv2ui_plugin->lv2_plugin); lv2ui_plugin->lv2_plugin = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2ui_plugin_parent_class)->dispose(gobject); } void ags_lv2ui_plugin_finalize(GObject *gobject) { AgsLv2uiPlugin *lv2ui_plugin; lv2ui_plugin = AGS_LV2UI_PLUGIN(gobject); g_free(lv2ui_plugin->gui_uri); if(lv2ui_plugin->manifest != NULL){ g_object_unref(lv2ui_plugin->manifest); } if(lv2ui_plugin->gui_turtle != NULL){ g_object_unref(lv2ui_plugin->gui_turtle); } if(lv2ui_plugin->lv2_plugin != NULL){ g_object_unref(lv2ui_plugin->lv2_plugin); } /* call parent */ G_OBJECT_CLASS(ags_lv2ui_plugin_parent_class)->finalize(gobject); } void ags_lv2ui_plugin_load_plugin(AgsBasePlugin *base_plugin) { //TODO:JK: implement me } /** * ags_lv2ui_plugin_find_gui_uri: * @lv2ui_plugin: the #GList-struct containing #AgsLv2uiPlugin * @gui_uri: the gui-uri as string * * Find next matching gui-uri in @lv2ui_plugin. * * Returns: the next matching #GList-struct * * Since: 1.0.0 */ GList* ags_lv2ui_plugin_find_gui_uri(GList *lv2ui_plugin, gchar *gui_uri) { if(gui_uri == NULL){ return(NULL); } while(lv2ui_plugin != NULL){ if(AGS_LV2UI_PLUGIN(lv2ui_plugin->data)->gui_uri != NULL && !g_ascii_strcasecmp(AGS_LV2UI_PLUGIN(lv2ui_plugin->data)->gui_uri, gui_uri)){ return(lv2ui_plugin); } lv2ui_plugin = lv2ui_plugin->next; } return(NULL); } /** * ags_lv2ui_plugin_new: * @gui_turtle: the #AgsTurtle * @filename: the plugin .so * @effect: the effect's string representation * @gui_uri: the effect's gui_uri * @effect_index: the effect's index * * Creates an #AgsLv2uiPlugin * * Returns: a new #AgsLv2uiPlugin * * Since: 1.0.0 */ AgsLv2uiPlugin* ags_lv2ui_plugin_new(AgsTurtle *gui_turtle, gchar *filename, gchar *effect, gchar *gui_uri, guint effect_index) { AgsLv2uiPlugin *lv2ui_plugin; lv2ui_plugin = (AgsLv2uiPlugin *) g_object_new(AGS_TYPE_LV2UI_PLUGIN, "gui-turtle", gui_turtle, "filename", filename, "effect", effect, "gui-uri", gui_uri, "effect-index", effect_index, NULL); return(lv2ui_plugin); } gsequencer-1.4.24/ags/plugin/ags_lv2_option_manager.c0000644000175000017500000004772413256163135017542 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2015,2017 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 . */ #include #include #include #include #include void ags_lv2_option_manager_class_init(AgsLv2OptionManagerClass *lv2_option_manager); void ags_lv2_option_manager_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_option_manager_init(AgsLv2OptionManager *lv2_option_manager); void ags_lv2_option_manager_connect(AgsConnectable *connectable); void ags_lv2_option_manager_disconnect(AgsConnectable *connectable); void ags_lv2_option_manager_finalize(GObject *gobject); void ags_lv2_option_manager_real_get_option(AgsLv2OptionManager *option_manager, gpointer instance, gpointer options, gpointer retval); void ags_lv2_option_manager_real_set_option(AgsLv2OptionManager *option_manager, gpointer instance, gpointer options, gpointer retval); void ags_lv2_option_manager_destroy_data(gpointer data); gboolean ags_lv2_option_ressource_equal(gpointer a, gpointer b); gboolean ags_lv2_option_ressource_finder(gpointer key, gpointer value, gpointer user_data); /** * SECTION:ags_lv2_option_manager * @short_description: option manager * @title: AgsLv2OptionManager * @section_id: * @include: ags/plugin/ags_lv2_option_manager.h * * The #AgsLv2OptionManager gives you access to plugin instances global * configuration. And stores instance related ressources. */ enum{ GET_OPTION, SET_OPTION, LAST_SIGNAL, }; static gpointer ags_lv2_option_manager_parent_class = NULL; static guint lv2_option_manager_signals[LAST_SIGNAL]; AgsLv2OptionManager *ags_lv2_option_manager = NULL; GType ags_lv2_option_manager_get_type() { static GType ags_type_lv2_option_manager = 0; if(!ags_type_lv2_option_manager){ const GTypeInfo ags_lv2_option_manager_info = { sizeof (AgsLv2OptionManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_option_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2OptionManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_option_manager_init, }; const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_option_manager_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_option_manager = g_type_register_static(G_TYPE_OBJECT, "AgsLv2OptionManager", &ags_lv2_option_manager_info, 0); g_type_add_interface_static(ags_type_lv2_option_manager, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_lv2_option_manager); } void ags_lv2_option_manager_class_init(AgsLv2OptionManagerClass *lv2_option_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_option_manager_parent_class = g_type_class_peek_parent(lv2_option_manager); /* GObject */ gobject = (GObjectClass *) lv2_option_manager; gobject->finalize = ags_lv2_option_manager_finalize; /* AgsLv2OptionManager */ lv2_option_manager->get_option = ags_lv2_option_manager_real_get_option; lv2_option_manager->set_option = ags_lv2_option_manager_real_set_option; /* signals */ /** * AgsLv2OptionManager::get-option: * @option_manager: the plugin to instantiate * @intstance: the LV2 plugin instance * @option: the LV2 option pointer * @retval: the location of the return value * * The ::get-option signal gets options of the manager. * * Since: 1.0.0 */ lv2_option_manager_signals[GET_OPTION] = g_signal_new("get-option", G_TYPE_FROM_CLASS(lv2_option_manager), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLv2OptionManagerClass, get_option), NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_POINTER_POINTER, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_POINTER); /** * AgsLv2OptionManager::set-option: * @option_manager: the plugin to instantiate * @intstance: the LV2 plugin instance * @option: the LV2 option pointer * @retval: the location of the return value * * The ::set-option signal sets options for the manager. * * Since: 1.0.0 */ lv2_option_manager_signals[SET_OPTION] = g_signal_new("set-option", G_TYPE_FROM_CLASS(lv2_option_manager), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLv2OptionManagerClass, set_option), NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_POINTER_POINTER, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_POINTER); } void ags_lv2_option_manager_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_lv2_option_manager_connect; connectable->disconnect = ags_lv2_option_manager_disconnect; } void ags_lv2_option_manager_init(AgsLv2OptionManager *lv2_option_manager) { lv2_option_manager->ressource = g_hash_table_new_full(g_direct_hash, (GEqualFunc) ags_lv2_option_ressource_equal, NULL, (GDestroyNotify) ags_lv2_option_manager_destroy_data); g_hash_table_ref(lv2_option_manager->ressource); } void ags_lv2_option_manager_connect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_option_manager_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_option_manager_finalize(GObject *gobject) { AgsLv2OptionManager *lv2_option_manager; lv2_option_manager = AGS_LV2_OPTION_MANAGER(gobject); g_hash_table_destroy(lv2_option_manager->ressource); if(lv2_option_manager == ags_lv2_option_manager){ ags_lv2_option_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2_option_manager_parent_class)->finalize(gobject); } void ags_lv2_option_manager_destroy_data(gpointer data) { /* empty */ } gboolean ags_lv2_option_ressource_equal(gpointer a, gpointer b) { AgsLv2OptionRessource *lv2_option_ressource, *requested_lv2_option_ressource; if(a == NULL || b == NULL){ return(FALSE); } lv2_option_ressource = AGS_LV2_OPTION_RESSOURCE(a); requested_lv2_option_ressource = AGS_LV2_OPTION_RESSOURCE(b); if(lv2_option_ressource->instance == requested_lv2_option_ressource->instance && lv2_option_ressource->option != NULL && requested_lv2_option_ressource->option != NULL && lv2_option_ressource->option->subject == requested_lv2_option_ressource->option->subject && lv2_option_ressource->option->key == requested_lv2_option_ressource->option->key){ return(TRUE); } return(FALSE); } gboolean ags_lv2_option_ressource_finder(gpointer key, gpointer value, gpointer user_data) { AgsLv2OptionRessource *lv2_option_ressource, *requested_lv2_option_ressource; LV2_Options_Option *option; lv2_option_ressource = AGS_LV2_OPTION_RESSOURCE(key); requested_lv2_option_ressource = AGS_LV2_OPTION_RESSOURCE(user_data); if(lv2_option_ressource->instance == requested_lv2_option_ressource->instance && lv2_option_ressource->option->subject == requested_lv2_option_ressource->option->subject && lv2_option_ressource->option->key == requested_lv2_option_ressource->option->key){ return(TRUE); } return(FALSE); } /** * ags_lv2_option_ressource_alloc: * * Allocate an #AgsLv2OptionRessource. * * Returns: the newly created #AgsLv2OptionRessource-struct * * Since: 1.0.0 */ AgsLv2OptionRessource* ags_lv2_option_ressource_alloc() { AgsLv2OptionRessource *lv2_option_ressource; lv2_option_ressource = (AgsLv2OptionRessource *) malloc(sizeof(AgsLv2OptionRessource)); lv2_option_ressource->instance = NULL; lv2_option_ressource->option = (LV2_Options_Option *) malloc(sizeof(LV2_Options_Option)); lv2_option_ressource->option->context = 0; lv2_option_ressource->option->subject = 0; lv2_option_ressource->option->key = 0; lv2_option_ressource->option->size = 0; lv2_option_ressource->option->type = 0; lv2_option_ressource->option->value = NULL; return(lv2_option_ressource); } /** * ags_lv2_option_manager_ressource_insert: * @lv2_option_manager: the #AgsLv2OptionManager * @lv2_option_ressource: the #AgsLv2OptionRessource-struct as key * @data: the data * * Inserts a data into hash associated with @lv2_option_ressource. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_option_manager_ressource_insert(AgsLv2OptionManager *lv2_option_manager, AgsLv2OptionRessource *lv2_option_ressource, gpointer data) { if(!AGS_IS_LV2_OPTION_MANAGER(lv2_option_manager) || lv2_option_ressource == NULL || data == NULL){ return(FALSE); } g_hash_table_insert(lv2_option_manager->ressource, (gpointer) lv2_option_ressource, data); return(TRUE); } /** * ags_lv2_option_manager_ressource_remove: * @lv2_option_manager: the #AgsLv2OptionManager * @lv2_option_ressource: the struct to remove * * Removes an entry associated with @lv2_option_ressource. * * Returns: %TRUE as successfully removed, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_option_manager_ressource_remove(AgsLv2OptionManager *lv2_option_manager, AgsLv2OptionRessource *lv2_option_ressource) { gpointer data; if(!AGS_IS_LV2_OPTION_MANAGER(lv2_option_manager) || lv2_option_ressource == NULL){ return(FALSE); } g_hash_table_remove(lv2_option_manager->ressource, lv2_option_ressource); return(TRUE); } /** * ags_lv2_option_manager_ressource_lookup: * @lv2_option_manager: the #AgsLv2OptionManager * @lv2_option_ressource: the #AgsLv2OptionRessource to lookup * * Lookup a ressource associated with @lv2_option_ressource in * @lv2_option_manager. * * Returns: the pointer on success, else NULL * * Since: 1.0.0 */ gpointer ags_lv2_option_manager_ressource_lookup(AgsLv2OptionManager *lv2_option_manager, AgsLv2OptionRessource *lv2_option_ressource) { GList *key, *key_start; gpointer data, tmp; if(!AGS_IS_LV2_OPTION_MANAGER(lv2_option_manager) || lv2_option_ressource == NULL){ return(NULL); } key_start = key = g_hash_table_get_keys(lv2_option_manager->ressource); data = NULL; while(key != NULL){ tmp = (gpointer) g_hash_table_lookup(lv2_option_manager->ressource, key->data); if(ags_lv2_option_ressource_equal(lv2_option_ressource, key->data)){ data = tmp; break; } key = key->next; } g_list_free(key_start); return(data); } /** * ags_lv2_option_manager_ressource_lookup_extended: * @lv2_option_manager: the #AgsLv2OptionManager * @lv2_option_ressource: the #AgsLv2OptionRessource to lookup * @orig_key: the original key found * @value: the matched value * * Lookup a ressource associated with @lv2_option_ressource in * @lv2_option_manager. * * Returns: %TRUE if ressource found, else %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_option_manager_ressource_lookup_extended(AgsLv2OptionManager *lv2_option_manager, AgsLv2OptionRessource *lv2_option_ressource, gpointer *orig_key, gpointer *value) { GList *key, *key_start; gpointer data, tmp; if(orig_key != NULL){ *orig_key = NULL; } if(value != NULL){ *value = NULL; } if(!AGS_IS_LV2_OPTION_MANAGER(lv2_option_manager) || lv2_option_ressource == NULL){ return(FALSE); } key_start = key = g_hash_table_get_keys(lv2_option_manager->ressource); data = NULL; while(key != NULL){ tmp = (gpointer) g_hash_table_lookup(lv2_option_manager->ressource, key->data); if(ags_lv2_option_ressource_equal(lv2_option_ressource, key->data)){ data = tmp; break; } key = key->next; } if(orig_key != NULL && key != NULL){ *orig_key = key->data; } if(value != NULL && data != NULL){ *value = data; } g_list_free(key_start); return(((data != NULL) ? TRUE: FALSE)); } void ags_lv2_option_manager_real_get_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval) { AgsLv2OptionRessource *lookup_ressource; gpointer data; gpointer key_ptr, value_ptr; uint32_t *ret; /* initial set to success */ ret = (uint32_t *) retval; if(ret != NULL){ *ret = 0; } /* check option to be non NULL */ if(option == NULL){ if(ret != NULL){ *ret |= (LV2_OPTIONS_ERR_BAD_SUBJECT | LV2_OPTIONS_ERR_BAD_KEY); } return; } /* get option */ if(AGS_LV2_OPTIONS_OPTION(option)->context == LV2_OPTIONS_RESOURCE){ key_ptr = NULL; value_ptr = NULL; lookup_ressource = (AgsLv2OptionRessource *) malloc(sizeof(AgsLv2OptionRessource)); lookup_ressource->instance = (LV2_Handle) instance; lookup_ressource->option = (LV2_Options_Option *) option; if(ags_lv2_option_manager_ressource_lookup_extended(lv2_option_manager, lookup_ressource, &key_ptr, &value_ptr)){ /* set requested fields */ AGS_LV2_OPTIONS_OPTION(option)->type = AGS_LV2_OPTION_RESSOURCE(key_ptr)->option->type; AGS_LV2_OPTIONS_OPTION(option)->size = AGS_LV2_OPTION_RESSOURCE(key_ptr)->option->size; AGS_LV2_OPTIONS_OPTION(option)->value = value_ptr; }else{ /* do error reporting */ if(ret != NULL){ *ret |= (LV2_OPTIONS_ERR_BAD_SUBJECT | LV2_OPTIONS_ERR_BAD_KEY); } } free(lookup_ressource); } } /** * ags_lv2_option_manager_get_option: * @lv2_option_manager: the #AgsLv2OptionManager * @instance: the instance * @option: the option * @retval: return value for #LV2_Options_Status-enum * * Get option. * * Since: 1.0.0 */ void ags_lv2_option_manager_get_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval) { g_return_if_fail(AGS_IS_LV2_OPTION_MANAGER(lv2_option_manager)); g_object_ref(G_OBJECT(lv2_option_manager)); g_signal_emit(G_OBJECT(lv2_option_manager), lv2_option_manager_signals[GET_OPTION], 0, instance, option, retval); g_object_unref(G_OBJECT(lv2_option_manager)); } void ags_lv2_option_manager_real_set_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval) { AgsLv2OptionRessource *lookup_ressource; gpointer data; gpointer key_ptr, value_ptr; uint32_t *ret; /* initial set to success */ ret = (uint32_t *) retval; if(ret != NULL){ *ret = 0; } /* check option to be non NULL */ if(option == NULL){ *ret |= (LV2_OPTIONS_ERR_BAD_SUBJECT | LV2_OPTIONS_ERR_BAD_KEY); return; } /* set option */ if(AGS_LV2_OPTIONS_OPTION(option)->context == LV2_OPTIONS_RESOURCE){ key_ptr = NULL; value_ptr = NULL; lookup_ressource = (AgsLv2OptionRessource *) malloc(sizeof(AgsLv2OptionRessource)); lookup_ressource->instance = (LV2_Handle) instance; lookup_ressource->option = (LV2_Options_Option *) option; if(ags_lv2_option_manager_ressource_lookup_extended(lv2_option_manager, lookup_ressource, &key_ptr, &value_ptr)){ /* set fields */ AGS_LV2_OPTION_RESSOURCE(key_ptr)->option->type = AGS_LV2_OPTIONS_OPTION(option)->type; AGS_LV2_OPTION_RESSOURCE(key_ptr)->option->size = AGS_LV2_OPTIONS_OPTION(option)->size; AGS_LV2_OPTION_RESSOURCE(key_ptr)->option->value = AGS_LV2_OPTIONS_OPTION(option)->value; }else{ AgsLv2OptionRessource *lv2_option_ressource; /* allocate new */ lv2_option_ressource = ags_lv2_option_ressource_alloc(); /* set fields */ lv2_option_ressource->instance = instance; lv2_option_ressource->option->context = AGS_LV2_OPTIONS_OPTION(option)->context; lv2_option_ressource->option->subject = AGS_LV2_OPTIONS_OPTION(option)->subject; lv2_option_ressource->option->key = AGS_LV2_OPTIONS_OPTION(option)->key; lv2_option_ressource->option->type = AGS_LV2_OPTIONS_OPTION(option)->type; lv2_option_ressource->option->size = AGS_LV2_OPTIONS_OPTION(option)->size; lv2_option_ressource->option->value = AGS_LV2_OPTIONS_OPTION(option)->value; ags_lv2_option_manager_ressource_insert(lv2_option_manager, lv2_option_ressource, (gpointer) AGS_LV2_OPTIONS_OPTION(option)->value); } free(lookup_ressource); } } /** * ags_lv2_option_manager_set_option: * @lv2_option_manager: the #AgsLv2OptionManager * @instance: the instance * @option: the option * @retval: return value for #LV2_Options_Status-enum * * Set option. * * Since: 1.0.0 */ void ags_lv2_option_manager_set_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval) { g_return_if_fail(AGS_IS_LV2_OPTION_MANAGER(lv2_option_manager)); g_object_ref(G_OBJECT(lv2_option_manager)); g_signal_emit(G_OBJECT(lv2_option_manager), lv2_option_manager_signals[SET_OPTION], 0, instance, option, retval); g_object_unref(G_OBJECT(lv2_option_manager)); } /** * ags_lv2_option_manager_lv2_options_get: * @instance: the lv2 instance * @options: the LV2_Options * * The LV2 options interface's get method. * * Since: 1.0.0 */ uint32_t ags_lv2_option_manager_lv2_options_get(LV2_Handle instance, LV2_Options_Option *options) { guint retval, tmpval; guint i; if(options == NULL){ return(LV2_OPTIONS_ERR_BAD_SUBJECT | LV2_OPTIONS_ERR_BAD_KEY); } retval = 0; for(i = 0; ; i++){ if(options[i].subject == 0 && options[i].key == 0 && options[i].type == 0 && options[i].size == 0 && options[i].value == NULL){ break; } ags_lv2_option_manager_get_option(ags_lv2_option_manager_get_instance(), instance, &(options[i]), &tmpval); retval |= tmpval; } return(retval); } /** * ags_lv2_option_manager_lv2_options_set: * @instance: the lv2 instance * @options: the LV2_Options * * The LV2 options interface's set method. * * Since: 1.0.0 */ uint32_t ags_lv2_option_manager_lv2_options_set(LV2_Handle instance, LV2_Options_Option* options) { guint retval, tmpval; guint i; if(options == NULL){ return(LV2_OPTIONS_ERR_BAD_SUBJECT | LV2_OPTIONS_ERR_BAD_KEY); } retval = 0; for(i = 0; ; i++){ if(options[i].subject == 0 && options[i].key == 0 && options[i].type == 0 && options[i].size == 0 && options[i].value == NULL){ break; } ags_lv2_option_manager_set_option(ags_lv2_option_manager_get_instance(), instance, &(options[i]), &tmpval); retval |= tmpval; } return(retval); } /** * ags_lv2_option_manager_get_instance: * * Singleton function to optain the id manager instance. * * Returns: an instance of #AgsLv2OptionManager * * Since: 1.0.0 */ AgsLv2OptionManager* ags_lv2_option_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_lv2_option_manager == NULL){ ags_lv2_option_manager = ags_lv2_option_manager_new(); // ags_lv2_option_manager_load_default(ags_lv2_option_manager); } pthread_mutex_unlock(&mutex); return(ags_lv2_option_manager); } /** * ags_lv2_option_manager_new: * * Instantiate a id manager. * * Returns: a new #AgsLv2OptionManager * * Since: 1.0.0 */ AgsLv2OptionManager* ags_lv2_option_manager_new() { AgsLv2OptionManager *lv2_option_manager; lv2_option_manager = (AgsLv2OptionManager *) g_object_new(AGS_TYPE_LV2_OPTION_MANAGER, NULL); return(lv2_option_manager); } gsequencer-1.4.24/ags/plugin/ags_lv2_preset.c0000644000175000017500000003646313246707333016043 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include void ags_lv2_preset_class_init(AgsLv2PresetClass *lv2_preset); void ags_lv2_preset_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_preset_init(AgsLv2Preset *lv2_preset); void ags_lv2_preset_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_lv2_preset_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_lv2_preset_connect(AgsConnectable *connectable); void ags_lv2_preset_disconnect(AgsConnectable *connectable); void ags_lv2_preset_finalize(GObject *gobject); /** * SECTION:ags_lv2_preset * @short_description: task thread * @title: AgsLv2Preset * @section_id: * @include: ags/plugin/ags_lv2_preset.h * * The #AgsLv2Preset handles LV2 presets mapped to a bank. */ enum{ PROP_0, PROP_LV2_PLUGIN, PROP_URI, PROP_BANK, PROP_PRESET_LABEL, PROP_TURTLE, }; static gpointer ags_lv2_preset_parent_class = NULL; static AgsConnectableInterface *ags_lv2_preset_parent_connectable_interface; GType ags_lv2_preset_get_type() { static GType ags_type_lv2_preset = 0; if(!ags_type_lv2_preset){ static const GTypeInfo ags_lv2_preset_info = { sizeof (AgsLv2PresetClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_preset_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2Preset), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_preset_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_preset_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_preset = g_type_register_static(G_TYPE_OBJECT, "AgsLv2Preset", &ags_lv2_preset_info, 0); g_type_add_interface_static(ags_type_lv2_preset, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_lv2_preset); } void ags_lv2_preset_class_init(AgsLv2PresetClass *lv2_preset) { GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_preset_parent_class = g_type_class_peek_parent(lv2_preset); /* GObject */ gobject = (GObjectClass *) lv2_preset; gobject->set_property = ags_lv2_preset_set_property; gobject->get_property = ags_lv2_preset_get_property; gobject->finalize = ags_lv2_preset_finalize; /* properties */ /** * AgsLv2Preset:lv2-plugin: * * The assigned lv2 plugin. * * Since: 1.0.0.8 */ param_spec = g_param_spec_object("lv2-plugin", i18n_pspec("lv2 plugin of the preset"), i18n_pspec("The lv2 plugin this preset is located in"), AGS_TYPE_LV2_PLUGIN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LV2_PLUGIN, param_spec); /** * AgsLv2Preset:uri: * * The assigned uri. * * Since: 1.0.0.8 */ param_spec = g_param_spec_string("uri", i18n_pspec("uri of the preset"), i18n_pspec("The uri this preset is located in"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_URI, param_spec); /** * AgsLv2Preset:bank: * * The assigned bank. * * Since: 1.0.0.8 */ param_spec = g_param_spec_string("bank", i18n_pspec("bank of the preset"), i18n_pspec("The bank this preset is assigned with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BANK, param_spec); /** * AgsLv2Preset:preset-label: * * The preset label. * * Since: 1.0.0.8 */ param_spec = g_param_spec_string("preset-label", i18n_pspec("preset label"), i18n_pspec("The preset label"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PRESET_LABEL, param_spec); /** * AgsLv2Preset:turtle: * * The assigned turtle. * * Since: 1.0.0.8 */ param_spec = g_param_spec_object("turtle", i18n_pspec("turtle of the preset"), i18n_pspec("The turtle this preset is located in"), AGS_TYPE_TURTLE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TURTLE, param_spec); } void ags_lv2_preset_connectable_interface_init(AgsConnectableInterface *connectable) { ags_lv2_preset_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_lv2_preset_connect; connectable->disconnect = ags_lv2_preset_disconnect; } void ags_lv2_preset_init(AgsLv2Preset *lv2_preset) { lv2_preset->flags = 0; lv2_preset->lv2_plugin = NULL; lv2_preset->uri = NULL; lv2_preset->bank = NULL; lv2_preset->preset_label = NULL; lv2_preset->turtle = NULL; } void ags_lv2_preset_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLv2Preset *lv2_preset; lv2_preset = AGS_LV2_PRESET(gobject); switch(prop_id){ case PROP_LV2_PLUGIN: { AgsLv2Plugin *lv2_plugin; lv2_plugin = (AgsLv2Plugin *) g_value_get_object(value); if(lv2_preset->lv2_plugin == lv2_plugin){ return; } if(lv2_preset->lv2_plugin != NULL){ g_object_unref(lv2_preset->lv2_plugin); } if(lv2_plugin != NULL){ g_object_ref(lv2_plugin); } lv2_preset->lv2_plugin = lv2_plugin; } break; case PROP_URI: { gchar *uri; uri = (gchar *) g_value_get_string(value); if(lv2_preset->uri == uri){ return; } if(lv2_preset->uri != NULL){ g_free(lv2_preset->uri); } lv2_preset->uri = g_strdup(uri); } break; case PROP_BANK: { gchar *bank; bank = (gchar *) g_value_get_string(value); if(lv2_preset->bank == bank){ return; } if(lv2_preset->bank != NULL){ g_free(lv2_preset->bank); } lv2_preset->bank = g_strdup(bank); } break; case PROP_PRESET_LABEL: { gchar *preset_label; preset_label = (gchar *) g_value_get_string(value); if(lv2_preset->preset_label == preset_label){ return; } if(lv2_preset->preset_label != NULL){ g_free(lv2_preset->preset_label); } lv2_preset->preset_label = g_strdup(preset_label); } break; case PROP_TURTLE: { AgsTurtle *turtle; turtle = (AgsTurtle *) g_value_get_object(value); if(lv2_preset->turtle == turtle){ return; } if(lv2_preset->turtle != NULL){ g_object_unref(lv2_preset->turtle); } if(turtle != NULL){ g_object_ref(turtle); } lv2_preset->turtle = turtle; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2_preset_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLv2Preset *lv2_preset; lv2_preset = AGS_LV2_PRESET(gobject); switch(prop_id){ case PROP_LV2_PLUGIN: { g_value_set_object(value, lv2_preset->lv2_plugin); } break; case PROP_URI: { g_value_set_string(value, lv2_preset->uri); } break; case PROP_BANK: { g_value_set_string(value, lv2_preset->bank); } break; case PROP_PRESET_LABEL: { g_value_set_string(value, lv2_preset->preset_label); } break; case PROP_TURTLE: { g_value_set_object(value, lv2_preset->turtle); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2_preset_connect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_preset_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_preset_finalize(GObject *gobject) { AgsLv2Preset *lv2_preset; lv2_preset = AGS_LV2_PRESET(gobject); /* lv2 plugin */ if(lv2_preset->lv2_plugin != NULL){ g_object_unref(lv2_preset->lv2_plugin); } /* uri */ if(lv2_preset->uri != NULL){ free(lv2_preset->uri); } /* bank and preset label */ if(lv2_preset->bank != NULL){ free(lv2_preset->bank); } if(lv2_preset->preset_label != NULL){ free(lv2_preset->preset_label); } /* turtle */ if(lv2_preset->turtle != NULL){ g_object_unref(lv2_preset->turtle); } /* port preset */ if(lv2_preset->port_preset != NULL){ g_list_free_full(lv2_preset->port_preset, ags_lv2_port_preset_free); } /* call parent */ G_OBJECT_CLASS(ags_lv2_preset_parent_class)->finalize(gobject); } AgsLv2PortPreset* ags_lv2_port_preset_alloc(gchar *port_symbol, GType port_type) { AgsLv2PortPreset *lv2_port_preset; lv2_port_preset = (AgsLv2PortPreset *) malloc(sizeof(AgsLv2PortPreset)); lv2_port_preset->port_symbol = port_symbol; lv2_port_preset->port_value = g_new0(GValue, 1); if(port_type != G_TYPE_NONE){ g_value_init(lv2_port_preset->port_value, port_type); } return(lv2_port_preset); } void ags_lv2_port_preset_free(AgsLv2PortPreset *lv2_port_preset) { if(lv2_port_preset->port_symbol != NULL){ free(lv2_port_preset->port_symbol); } if(lv2_port_preset->port_value != NULL){ g_value_unset(lv2_port_preset->port_value); free(lv2_port_preset->port_value); } free(lv2_port_preset); } void ags_lv2_preset_parse_turtle(AgsLv2Preset *lv2_preset) { AgsLv2PortPreset *lv2_port_preset; xmlNode *triple_node; xmlNode *port_node; xmlNode *current; GList *label_list; GList *bank_list; GList *port_list, *list; gchar *str; gchar *xpath; if(!AGS_LV2_PRESET(lv2_preset) || lv2_preset->turtle == NULL || lv2_preset->uri == NULL){ return; } /* retrieve triple by uri */ xpath = g_strdup_printf("(//rdf-triple/rdf-subject/rdf-iri/rdf-iriref[text() = '%s'])/ancestor::*[self::rdf-triple][1]", lv2_preset->uri); list = ags_turtle_find_xpath(lv2_preset->turtle, xpath); free(xpath); if(list != NULL){ triple_node = (xmlNode *) list->data; g_list_free(list); }else{ xpath = g_strdup_printf("//rdf-triple//rdf-iriref[text() = '<%s>']/ancestor::*[self::rdf-triple][1]", lv2_preset->uri); list = ags_turtle_find_xpath(lv2_preset->turtle, xpath); free(xpath); if(list != NULL){ triple_node = (xmlNode *) list->data; g_list_free(list); }else{ g_warning("rdf-triple not found"); return; } } /* preset label */ xpath = ".//rdf-pname-ln[text()='rdfs:label']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-string"; label_list = ags_turtle_find_xpath_with_context_node(lv2_preset->turtle, xpath, triple_node); if(label_list != NULL){ lv2_preset->preset_label = xmlNodeGetContent((xmlNode *) label_list->data); g_list_free(label_list); } /* bank */ xpath = ".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':bank') + 1) = ':bank']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-iriref"; bank_list = ags_turtle_find_xpath_with_context_node(lv2_preset->turtle, xpath, triple_node); if(bank_list != NULL){ str = xmlNodeGetContent((xmlNode *) bank_list->data); lv2_preset->bank = g_strndup(&(str[1]), strlen(str) - 2); g_list_free(bank_list); } /* load ports */ xpath = ".//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':port') + 1) = ':port']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list]/rdf-object"; port_list = ags_turtle_find_xpath_with_context_node(lv2_preset->turtle, xpath, triple_node); while(port_list != NULL){ lv2_port_preset = ags_lv2_port_preset_alloc(NULL, G_TYPE_FLOAT); lv2_preset->port_preset = g_list_prepend(lv2_preset->port_preset, lv2_port_preset); port_node = port_list->data; /* load symbol */ xpath = g_ascii_strdown(".//rdf-object-list//rdf-string[ancestor::*[self::rdf-object-list][1]/preceding-sibling::*[self::rdf-verb][1]//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':symbol') + 1) = ':symbol']]", -1); list = ags_turtle_find_xpath_with_context_node(lv2_preset->turtle, xpath, port_node); if(list != NULL){ gchar *str; current = (xmlNode *) list->data; str = xmlNodeGetContent(current); if(strlen(str) > 2){ lv2_port_preset->port_symbol = g_strndup(str + 1, strlen(str) - 2); } g_list_free(list); } /* port value */ xpath = g_ascii_strdown(".//rdf-verb//rdf-pname-ln[substring(text(), string-length(text()) - string-length(':value') + 1) = ':value']/ancestor::*[self::rdf-verb][1]/following-sibling::*[self::rdf-object-list][1]//rdf-numeric", -1); list = ags_turtle_find_xpath_with_context_node(lv2_preset->turtle, xpath, port_node); if(list != NULL){ current = (xmlNode *) list->data; g_value_set_float(lv2_port_preset->port_value, g_ascii_strtod(xmlNodeGetContent(current), NULL)); g_list_free(list); } /* iterate */ port_list = port_list->next; } lv2_preset->port_preset = g_list_reverse(lv2_preset->port_preset); if(port_list != NULL){ g_list_free(port_list); } } /** * ags_lv2_preset_find_preset_label: * @lv2_preset: the #GList-struct containing #AgsLv2Preset * @preset_label: the preset label * * Find @preset_label within @lv2_preset. * * Returns: the matching #GList-struct containing #AgsLv2Preset * * Since: 1.0.0.8 */ GList* ags_lv2_preset_find_preset_label(GList *lv2_preset, gchar *preset_label) { if(preset_label == NULL){ return(NULL); } while(lv2_preset != NULL){ if(!g_strcmp0(preset_label, AGS_LV2_PRESET(lv2_preset->data)->preset_label)){ return(lv2_preset); } lv2_preset = lv2_preset->next; } return(NULL); } /** * ags_lv2_preset_new: * @lv2_plugin: an #AgsLv2Plugin * @turtle: the #AgsTurtle * @uri: the URI as string * * Create a new instance of #AgsLv2Preset. * * Returns: the new #AgsLv2Preset * * Since: 1.0.0.8 */ AgsLv2Preset* ags_lv2_preset_new(GObject *lv2_plugin, AgsTurtle *turtle, gchar *uri) { AgsLv2Preset *lv2_preset; lv2_preset = (AgsLv2Preset *) g_object_new(AGS_TYPE_LV2_PRESET, "lv2-plugin", lv2_plugin, "turtle", turtle, "uri", uri, NULL); return(lv2_preset); } gsequencer-1.4.24/ags/plugin/ags_lv2_preset.h0000644000175000017500000000555113246707333016042 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LV2_PRESET_H__ #define __AGS_LV2_PRESET_H__ #include #include #include #include #include #define AGS_TYPE_LV2_PRESET (ags_lv2_preset_get_type()) #define AGS_LV2_PRESET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_PRESET, AgsLv2Preset)) #define AGS_LV2_PRESET_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_PRESET, AgsLv2PresetClass)) #define AGS_IS_LV2_PRESET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_PRESET)) #define AGS_IS_LV2_PRESET_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_PRESET)) #define AGS_LV2_PRESET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_PRESET, AgsLv2PresetClass)) #define AGS_LV2_PORT_PRESET(ptr) ((AgsLv2PortPreset*)(ptr)) typedef struct _AgsLv2Preset AgsLv2Preset; typedef struct _AgsLv2PresetClass AgsLv2PresetClass; typedef struct _AgsLv2PortPreset AgsLv2PortPreset; /** * AgsLv2PresetFlags: * @AGS_LV2_PRESET_CONNECTED: indicates the port was connected by calling #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsLv2Preset by * enable/disable as flags. */ typedef enum{ AGS_LV2_PRESET_CONNECTED = 1, }AgsLv2PresetFlags; struct _AgsLv2Preset { GObject gobject; guint flags; GObject *lv2_plugin; gchar *uri; gchar *bank; gchar *preset_label; AgsTurtle *turtle; GList *port_preset; }; struct _AgsLv2PresetClass { GObjectClass gobject; }; struct _AgsLv2PortPreset { gchar *port_symbol; GValue *port_value; }; GType ags_lv2_preset_get_type(void); AgsLv2PortPreset* ags_lv2_port_preset_alloc(gchar *port_symobl, GType port_type); void ags_lv2_port_preset_free(AgsLv2PortPreset *lv2_port_preset); void ags_lv2_preset_parse_turtle(AgsLv2Preset *lv2_preset); GList* ags_lv2_preset_find_preset_label(GList *lv2_preset, gchar *preset_label); AgsLv2Preset* ags_lv2_preset_new(GObject *lv2_plugin, AgsTurtle *turtle, gchar *uri); #endif /*__AGS_LV2_PRESET_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_manager.h0000644000175000017500000000554713247742051016154 00000000000000/* 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 . */ #ifndef __AGS_LV2_MANAGER_H__ #define __AGS_LV2_MANAGER_H__ #include #include #include #include #include #include #define AGS_TYPE_LV2_MANAGER (ags_lv2_manager_get_type()) #define AGS_LV2_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_MANAGER, AgsLv2Manager)) #define AGS_LV2_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_MANAGER, AgsLv2ManagerClass)) #define AGS_IS_LV2_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_MANAGER)) #define AGS_IS_LV2_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_MANAGER)) #define AGS_LV2_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_MANAGER, AgsLv2ManagerClass)) #define AGS_LV2_MANAGER_DEFAULT_LOCALE "en-gb\0" typedef struct _AgsLv2Manager AgsLv2Manager; typedef struct _AgsLv2ManagerClass AgsLv2ManagerClass; struct _AgsLv2Manager { GObject object; gchar *locale; GList *lv2_plugin_blacklist; GList *lv2_plugin; GHashTable *current_plugin_node; }; struct _AgsLv2ManagerClass { GObjectClass object; }; GType ags_lv2_manager_get_type(void); gchar** ags_lv2_manager_get_default_path(); void ags_lv2_manager_set_default_path(gchar** default_path); gchar** ags_lv2_manager_get_filenames(AgsLv2Manager *lv2_manager); AgsLv2Plugin* ags_lv2_manager_find_lv2_plugin(AgsLv2Manager *lv2_manager, gchar *filename, gchar *effect); void ags_lv2_manager_load_blacklist(AgsLv2Manager *lv2_manager, gchar *blacklist_filename); void ags_lv2_manager_load_file(AgsLv2Manager *lv2_manager, AgsTurtle *manifest, AgsTurtle *turtle, gchar *lv2_path, gchar *filename); void ags_lv2_manager_load_preset(AgsLv2Manager *lv2_manager, AgsLv2Plugin *lv2_plugin, AgsTurtle *preset); void ags_lv2_manager_load_default_directory(AgsLv2Manager *lv2_manager); /* */ AgsLv2Manager* ags_lv2_manager_get_instance(); AgsLv2Manager* ags_lv2_manager_new(gchar *locale); #endif /*__AGS_LV2_MANAGER_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_event_manager.c0000644000175000017500000001140313246707333017337 00000000000000/* 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 . */ #include #include #include void ags_lv2_event_manager_class_init(AgsLv2EventManagerClass *lv2_event_manager); void ags_lv2_event_manager_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_event_manager_init(AgsLv2EventManager *lv2_event_manager); void ags_lv2_event_manager_connect(AgsConnectable *connectable); void ags_lv2_event_manager_disconnect(AgsConnectable *connectable); void ags_lv2_event_manager_finalize(GObject *gobject); /** * SECTION:ags_lv2_event_manager * @short_description: event manager * @title: AgsLv2EventManager * @section_id: * @include: ags/plugin/ags_lv2_event_manager.h * * The #AgsLv2EventManager allows you to do memory management with LV2_Event's. */ static gpointer ags_lv2_event_manager_parent_class = NULL; AgsLv2EventManager *ags_lv2_event_manager = NULL; GType ags_lv2_event_manager_get_type() { static GType ags_type_lv2_event_manager = 0; if(!ags_type_lv2_event_manager){ const GTypeInfo ags_lv2_event_manager_info = { sizeof (AgsLv2EventManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_event_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2EventManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_event_manager_init, }; const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_event_manager_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_event_manager = g_type_register_static(G_TYPE_OBJECT, "AgsLv2EventManager", &ags_lv2_event_manager_info, 0); g_type_add_interface_static(ags_type_lv2_event_manager, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_lv2_event_manager); } void ags_lv2_event_manager_class_init(AgsLv2EventManagerClass *lv2_event_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_event_manager_parent_class = g_type_class_peek_parent(lv2_event_manager); /* GObject */ gobject = (GObjectClass *) lv2_event_manager; gobject->finalize = ags_lv2_event_manager_finalize; } void ags_lv2_event_manager_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_lv2_event_manager_connect; connectable->disconnect = ags_lv2_event_manager_disconnect; } void ags_lv2_event_manager_init(AgsLv2EventManager *event_manager) { /* empty */ } void ags_lv2_event_manager_connect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_event_manager_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_event_manager_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_lv2_event_manager_parent_class)->finalize(gobject); } uint32_t ags_lv2_event_manager_lv2_event_ref(LV2_Event_Callback_Data callback_data, LV2_Event *event) { //TODO:JK: implement me return(1); } uint32_t ags_lv2_event_manager_lv2_event_unref(LV2_Event_Callback_Data callback_data, LV2_Event *event) { //TODO:JK: implement me return(1); } /** * ags_lv2_event_manager_get_instance: * * Singleton function to optain the id manager instance. * * Returns: an instance of #AgsLv2EventManager * * Since: 1.0.0 */ AgsLv2EventManager* ags_lv2_event_manager_get_instance() { if(ags_lv2_event_manager == NULL){ ags_lv2_event_manager = ags_lv2_event_manager_new(); // ags_lv2_event_manager_load_default(ags_lv2_event_manager); } return(ags_lv2_event_manager); } /** * ags_lv2_event_manager_new: * * Instantiate a id manager. * * Returns: a new #AgsLv2EventManager * * Since: 1.0.0 */ AgsLv2EventManager* ags_lv2_event_manager_new() { AgsLv2EventManager *lv2_event_manager; lv2_event_manager = (AgsLv2EventManager *) g_object_new(AGS_TYPE_LV2_EVENT_MANAGER, NULL); return(lv2_event_manager); } gsequencer-1.4.24/ags/plugin/ags_lv2_conversion.h0000644000175000017500000000431113246707333016716 00000000000000/* 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 . */ #ifndef __AGS_LV2_CONVERSION_H__ #define __AGS_LV2_CONVERSION_H__ #include #include #include #define AGS_TYPE_LV2_CONVERSION (ags_lv2_conversion_get_type()) #define AGS_LV2_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONVERSION, AgsLv2Conversion)) #define AGS_LV2_CONVERSION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CONVERSION, AgsLv2ConversionClass)) #define AGS_IS_LV2_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CONVERSION)) #define AGS_IS_LV2_CONVERSION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CONVERSION)) #define AGS_LV2_CONVERSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_CONVERSION, AgsLv2ConversionClass)) typedef struct _AgsLv2Conversion AgsLv2Conversion; typedef struct _AgsLv2ConversionClass AgsLv2ConversionClass; /** * AgsLv2ConversionFlags: * @AGS_LV2_CONVERSION_LOGARITHMIC: logarithmic * * Enum values to control the behavior or indicate internal state of #AgsLv2Conversion by * enable/disable as flags. */ typedef enum{ AGS_LV2_CONVERSION_LOGARITHMIC = 1, }AgsLv2ConversionFlaags; struct _AgsLv2Conversion { AgsConversion conversion; guint flags; }; struct _AgsLv2ConversionClass { AgsConversionClass conversion; }; GType ags_lv2_conversion_get_type(void); AgsLv2Conversion* ags_lv2_conversion_new(); #endif /*__AGS_LV2_CONVERSION_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2ui_manager.h0000644000175000017500000000572113246707333016507 00000000000000/* 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 . */ #ifndef __AGS_LV2UI_MANAGER_H__ #define __AGS_LV2UI_MANAGER_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_LV2UI_MANAGER (ags_lv2ui_manager_get_type()) #define AGS_LV2UI_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2UI_MANAGER, AgsLv2uiManager)) #define AGS_LV2UI_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2UI_MANAGER, AgsLv2uiManagerClass)) #define AGS_IS_LV2UI_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2UI_MANAGER)) #define AGS_IS_LV2UI_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2UI_MANAGER)) #define AGS_LV2UI_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2UI_MANAGER, AgsLv2uiManagerClass)) typedef struct _AgsLv2uiManager AgsLv2uiManager; typedef struct _AgsLv2uiManagerClass AgsLv2uiManagerClass; struct _AgsLv2uiManager { GObject gobject; GList *lv2ui_plugin_blacklist; GList *lv2ui_plugin; }; struct _AgsLv2uiManagerClass { GObjectClass gobject; }; GType ags_lv2ui_manager_get_type(void); gchar** ags_lv2ui_manager_get_default_path(); void ags_lv2ui_manager_set_default_path(gchar** default_path); gchar** ags_lv2ui_manager_get_filenames(AgsLv2uiManager *lv2ui_manager); AgsLv2uiPlugin* ags_lv2ui_manager_find_lv2ui_plugin(AgsLv2uiManager *lv2ui_manager, gchar *ui_filename, gchar *ui_effect); AgsLv2uiPlugin* ags_lv2ui_manager_find_lv2ui_plugin_with_index(AgsLv2uiManager *lv2ui_manager, gchar *ui_filename, guint ui_effect_index); void ags_lv2ui_manager_load_blacklist(AgsLv2uiManager *lv2ui_manager, gchar *blacklist_filename); void ags_lv2ui_manager_load_file(AgsLv2uiManager *lv2ui_manager, AgsTurtle *manifest, AgsTurtle *turtle, gchar *lv2ui_path, gchar *filename); void ags_lv2ui_manager_load_default_directory(AgsLv2uiManager *lv2ui_manager); /* */ AgsLv2uiManager* ags_lv2ui_manager_get_instance(); AgsLv2uiManager* ags_lv2ui_manager_new(); #endif /*__AGS_LV2UI_MANAGER_H__*/ gsequencer-1.4.24/ags/plugin/ags_plugin_factory.h0000644000175000017500000000622213246707333016776 00000000000000/* 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 . */ #ifndef __AGS_PLUGIN_FACTORY_H__ #define __AGS_PLUGIN_FACTORY_H__ #include #include #include #define AGS_TYPE_PLUGIN_FACTORY (ags_plugin_factory_get_type()) #define AGS_PLUGIN_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLUGIN_FACTORY, AgsPluginFactory)) #define AGS_PLUGIN_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLUGIN_FACTORY, AgsPluginFactoryClass)) #define AGS_IS_PLUGIN_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLUGIN_FACTORY)) #define AGS_IS_PLUGIN_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLUGIN_FACTORY)) #define AGS_PLUGIN_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLUGIN_FACTORY, AgsPluginFactoryClass)) typedef struct _AgsPluginFactory AgsPluginFactory; typedef struct _AgsPluginFactoryClass AgsPluginFactoryClass; typedef struct _AgsPluginMetadata AgsPluginMetadata; struct _AgsPluginFactory { GObject object; GList *plugin; }; struct _AgsPluginFactoryClass { GObjectClass object; void (*add)(AgsPluginFactory *plugin_factory, GType plugin_type, gchar *plugin_name, gchar *version, gchar *build_id, gchar *xml_type, GParameter *control, guint control_count); AgsPlugin* (*create)(AgsPluginFactory *plugin_factory, gchar *plugin_name, gchar *version, gchar *build_id); }; struct _AgsPluginMetadata { GType plugin_type; gchar *plugin_name; gchar *version; gchar *build_id; gchar *xml_type; GParameter *control; guint control_count; }; GType ags_plugin_factory_get_type(void); void ags_plugin_factory_read_file(AgsPluginFactory *plugin_factory, gchar *path); GList* ags_plugin_factory_list_by_name(AgsPluginFactory *plugin_factory, gchar *plugin_name); void ags_plugin_factory_add(AgsPluginFactory *plugin_factory, GType plugin_type, gchar *plugin_name, gchar *version, gchar *build_id, gchar *xml_type, GParameter *control, guint control_count); AgsPlugin* ags_plugin_factory_create(AgsPluginFactory *plugin_factory, gchar *plugin_name, gchar *version, gchar *build_id); /* */ AgsPluginFactory* ags_plugin_factory_get_instance(); AgsPluginFactory* ags_plugin_factory_new_from_file(gchar *path); AgsPluginFactory* ags_plugin_factory_new(); #endif /*__AGS_PLUGIN_FACTORY_H__*/ gsequencer-1.4.24/ags/plugin/ags_base_plugin.h0000644000175000017500000001416213256163135016240 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_BASE_PLUGIN_H__ #define __AGS_BASE_PLUGIN_H__ #include #include #include #define AGS_TYPE_BASE_PLUGIN (ags_base_plugin_get_type()) #define AGS_BASE_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BASE_PLUGIN, AgsBasePlugin)) #define AGS_BASE_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_BASE_PLUGIN, AgsBasePluginClass)) #define AGS_IS_BASE_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_BASE_PLUGIN)) #define AGS_IS_BASE_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_BASE_PLUGIN)) #define AGS_BASE_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_BASE_PLUGIN, AgsBasePluginClass)) #define AGS_PORT_DESCRIPTOR(ptr) ((AgsPortDescriptor *)(ptr)) typedef struct _AgsBasePlugin AgsBasePlugin; typedef struct _AgsBasePluginClass AgsBasePluginClass; typedef struct _AgsPortDescriptor AgsPortDescriptor; /** * AgsBasePluginFlags: * @AGS_BASE_PLUGIN_IS_INSTRUMENT: plugin is instrument * * Enum values to control the behavior or indicate internal state of #AgsBasePlugin by * enable/disable as flags. */ typedef enum{ AGS_BASE_PLUGIN_IS_INSTRUMENT = 1, }AgsBasePluginFlags; /** * AgsPortDescriptorFlags: * @AGS_PORT_DESCRIPTOR_ATOM: atom port * @AGS_PORT_DESCRIPTOR_AUDIO: audio port * @AGS_PORT_DESCRIPTOR_CONTROL: control port * @AGS_PORT_DESCRIPTOR_MIDI: MIDI port * @AGS_PORT_DESCRIPTOR_EVENT: event port * @AGS_PORT_DESCRIPTOR_OUTPUT: is output * @AGS_PORT_DESCRIPTOR_INPUT: is input * @AGS_PORT_DESCRIPTOR_TOGGLED: toggle control * @AGS_PORT_DESCRIPTOR_ENUMERATION: enumerated * @AGS_PORT_DESCRIPTOR_LOGARITHMIC: logarithmic * @AGS_PORT_DESCRIPTOR_INTEGER: integer * @AGS_PORT_DESCRIPTOR_SAMPLERATE: samplerate * @AGS_PORT_DESCRIPTOR_BOUNDED_BELOW: bounded below * @AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE: bounded above * @AGS_PORT_DESCRIPTOR_UI_NOTIFICATION: ui notification * * Common port attributes. */ typedef enum{ AGS_PORT_DESCRIPTOR_ATOM = 1, AGS_PORT_DESCRIPTOR_AUDIO = 1 << 1, AGS_PORT_DESCRIPTOR_CONTROL = 1 << 2, AGS_PORT_DESCRIPTOR_MIDI = 1 << 3, AGS_PORT_DESCRIPTOR_EVENT = 1 << 4, AGS_PORT_DESCRIPTOR_OUTPUT = 1 << 5, AGS_PORT_DESCRIPTOR_INPUT = 1 << 6, AGS_PORT_DESCRIPTOR_TOGGLED = 1 << 7, AGS_PORT_DESCRIPTOR_ENUMERATION = 1 << 8, AGS_PORT_DESCRIPTOR_LOGARITHMIC = 1 << 9, AGS_PORT_DESCRIPTOR_INTEGER = 1 << 10, AGS_PORT_DESCRIPTOR_SAMPLERATE = 1 << 11, AGS_PORT_DESCRIPTOR_BOUNDED_BELOW = 1 << 12, AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE = 1 << 13, AGS_PORT_DESCRIPTOR_UI_NOTIFICATION = 1 << 14, }AgsPortDescriptorFlags; struct _AgsBasePlugin { GObject object; guint flags; gchar *id; gchar *filename; gchar *effect; guint port_group_count; guint *port_group; GList *port; guint effect_index; void *plugin_so; void *plugin_descriptor; void *plugin_handle; gchar *ui_filename; gchar *ui_effect; guint ui_effect_index; void *ui_plugin_so; void *ui_plugin_descriptor; void *ui_plugin_handle; GObject *ui_plugin; }; struct _AgsBasePluginClass { GObjectClass object; gpointer (*instantiate)(AgsBasePlugin *base_plugin, guint samplerate); void (*connect_port)(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location); void (*activate)(AgsBasePlugin *base_plugin, gpointer plugin_handle); void (*deactivate)(AgsBasePlugin *base_plugin, gpointer plugin_handle); void (*run)(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count); void (*load_plugin)(AgsBasePlugin *base_plugin); }; struct _AgsPortDescriptor { guint flags; guint port_index; gchar *port_name; gchar *port_symbol; gint scale_steps; gchar **scale_points; float *scale_value; GValue *lower_value; GValue *upper_value; GValue *default_value; gpointer user_data; }; GType ags_base_plugin_get_type(void); AgsPortDescriptor* ags_port_descriptor_alloc(); void ags_port_descriptor_free(AgsPortDescriptor *port_descriptor); GList* ags_port_descriptor_find_symbol(GList *port_descriptor, gchar *port_symbol); GList* ags_base_plugin_find_filename(GList *base_plugin, gchar *filename); GList* ags_base_plugin_find_effect(GList *base_plugin, gchar *filename, gchar *effect); GList* ags_base_plugin_find_ui_effect_index(GList *base_plugin, gchar *ui_filename, guint ui_effect_index); GList* ags_base_plugin_sort(GList *base_plugin); void ags_base_plugin_apply_port_group_by_prefix(AgsBasePlugin *base_plugin); gpointer ags_base_plugin_instantiate(AgsBasePlugin *base_plugin, guint samplerate); void ags_base_plugin_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location); void ags_base_plugin_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_base_plugin_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_base_plugin_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count); void ags_base_plugin_load_plugin(AgsBasePlugin *base_plugin); AgsBasePlugin* ags_base_plugin_new(gchar *filename, gchar *effect, guint effect_index); #endif /*__AGS_BASE_PLUGIN_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_plugin.h0000644000175000017500000001275113246707333016036 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LV2_PLUGIN_H__ #define __AGS_LV2_PLUGIN_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define AGS_TYPE_LV2_PLUGIN (ags_lv2_plugin_get_type()) #define AGS_LV2_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_PLUGIN, AgsLv2Plugin)) #define AGS_LV2_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_PLUGIN, AgsLv2PluginClass)) #define AGS_IS_LV2_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_PLUGIN)) #define AGS_IS_LV2_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_PLUGIN)) #define AGS_LV2_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_PLUGIN, AgsLv2PluginClass)) #define AGS_LV2_PLUGIN_DESCRIPTOR(ptr) ((LV2_Descriptor *)(ptr)) #define AGS_LV2_EVENT_BUFFER(ptr) ((LV2_Event_Buffer *)(ptr)) #define AGS_LV2_EVENT(ptr) ((LV2_Event *)(ptr)) #define AGS_LV2_EVENT_DATA(ptr) ((void *)(ptr + sizeof(LV2_Event))) #define AGS_LV2_ATOM_SEQUENCE(ptr) ((LV2_Atom_Sequence *)(ptr)) #define AGS_LV2_ATOM_EVENT(ptr) ((LV2_Atom_Event *)(ptr)) typedef struct _AgsLv2Plugin AgsLv2Plugin; typedef struct _AgsLv2PluginClass AgsLv2PluginClass; /** * AgsLv2PluginFlags: * @AGS_LV2_PLUGIN_IS_SYNTHESIZER: plugin is synthesizer * @AGS_LV2_PLUGIN_NEEDS_WORKER: plugin needs worker * @AGS_LV2_PLUGIN_HAS_PROGRAM_INTERFACE: plugin has program interface * * Enum values to control the behavior or indicate internal state of #AgsLv2Plugin by * enable/disable as flags. */ typedef enum{ AGS_LV2_PLUGIN_IS_SYNTHESIZER = 1, AGS_LV2_PLUGIN_NEEDS_WORKER = 1 << 1, AGS_LV2_PLUGIN_HAS_PROGRAM_INTERFACE = 1 << 2, }AgsLv2PluginFlags; struct _AgsLv2Plugin { AgsBasePlugin base_plugin; guint flags; gchar *pname; gchar *uri; gchar *ui_uri; AgsTurtle *manifest; AgsTurtle *turtle; gchar *doap_name; gchar *foaf_name; gchar *foaf_homepage; gchar *foaf_mbox; LV2_Feature **feature; gchar *program; GList *preset; }; struct _AgsLv2PluginClass { AgsBasePluginClass base_plugin; void (*change_program)(AgsLv2Plugin *lv2_plugin, gpointer lv2_handle, guint bank_index, guint program_index); }; GType ags_lv2_plugin_get_type(void); G_DEPRECATED_FOR(ags_lv2_plugin_event_buffer_alloc) void* ags_lv2_plugin_alloc_event_buffer(guint buffer_size); G_DEPRECATED_FOR(ags_lv2_plugin_event_buffer_concat) void* ags_lv2_plugin_concat_event_buffer(void *buffer0, ...); LV2_Event_Buffer* ags_lv2_plugin_event_buffer_alloc(guint buffer_size); void ags_lv2_plugin_event_buffer_realloc_data(LV2_Event_Buffer *event_buffer, guint buffer_size); LV2_Event_Buffer* ags_lv2_plugin_event_buffer_concat(LV2_Event_Buffer *event_buffer, ...); gboolean ags_lv2_plugin_event_buffer_append_midi(void *event_buffer, guint buffer_size, snd_seq_event_t *events, guint event_count); gboolean ags_lv2_plugin_event_buffer_remove_midi(void *event_buffer, guint buffer_size, guint note); void ags_lv2_plugin_clear_event_buffer(void *event_buffer, guint buffer_size); void* ags_lv2_plugin_alloc_atom_sequence(guint sequence_size); void* ags_lv2_plugin_concat_atom_sequence(void *sequence, guint sequence_size, ...); //TODO:JK: shall I implement this? gboolean ags_lv2_plugin_atom_sequence_append_midi(void *atom_sequence, guint sequence_size, snd_seq_event_t *events, guint event_count); gboolean ags_lv2_plugin_atom_sequence_remove_midi(void *atom_sequence, guint sequence_size, guint note); void ags_lv2_plugin_clear_atom_sequence(void *atom_sequence, guint sequence_size); GList* ags_lv2_plugin_find_pname(GList *lv2_plugin, gchar *pname); void ags_lv2_plugin_change_program(AgsLv2Plugin *lv2_plugin, gpointer lv2_handle, guint bank_index, guint program_index); AgsLv2Plugin* ags_lv2_plugin_new(AgsTurtle *turtle, gchar *filename, gchar *effect, gchar *uri, guint effect_index); #endif /*__AGS_LV2_PLUGIN_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_urid_manager.c0000644000175000017500000002076713247044247017175 00000000000000/* 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 . */ #include #include void ags_lv2_urid_manager_class_init(AgsLv2UridManagerClass *lv2_urid_manager); void ags_lv2_urid_manager_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_urid_manager_init(AgsLv2UridManager *lv2_urid_manager); void ags_lv2_urid_manager_connect(AgsConnectable *connectable); void ags_lv2_urid_manager_disconnect(AgsConnectable *connectable); void ags_lv2_urid_manager_finalize(GObject *gobject); void ags_lv2_urid_manager_destroy_data(gpointer data); gboolean ags_lv2_urid_manager_finder(gpointer key, gpointer value, gpointer user_data); /** * SECTION:ags_lv2_urid_manager * @short_description: urid * @title: AgsLv2UridManager * @section_id: * @include: ags/plugin/ags_lv2_urid_manager.h * * The #AgsLv2UridManager keeps your urid in a hash table where you can lookup your * ids. */ static gpointer ags_lv2_urid_manager_parent_class = NULL; AgsLv2UridManager *ags_lv2_urid_manager = NULL; GType ags_lv2_urid_manager_get_type() { static GType ags_type_lv2_urid_manager = 0; if(!ags_type_lv2_urid_manager){ const GTypeInfo ags_lv2_urid_manager_info = { sizeof (AgsLv2UridManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_urid_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2UridManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_urid_manager_init, }; const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_urid_manager_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_urid_manager = g_type_register_static(G_TYPE_OBJECT, "AgsLv2UridManager", &ags_lv2_urid_manager_info, 0); g_type_add_interface_static(ags_type_lv2_urid_manager, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_lv2_urid_manager); } void ags_lv2_urid_manager_class_init(AgsLv2UridManagerClass *lv2_urid_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_urid_manager_parent_class = g_type_class_peek_parent(lv2_urid_manager); /* GObject */ gobject = (GObjectClass *) lv2_urid_manager; gobject->finalize = ags_lv2_urid_manager_finalize; } void ags_lv2_urid_manager_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_lv2_urid_manager_connect; connectable->disconnect = ags_lv2_urid_manager_disconnect; } void ags_lv2_urid_manager_init(AgsLv2UridManager *lv2_urid_manager) { lv2_urid_manager->id_counter = 1; lv2_urid_manager->urid = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) ags_lv2_urid_manager_destroy_data); } void ags_lv2_urid_manager_connect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_urid_manager_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_urid_manager_finalize(GObject *gobject) { AgsLv2UridManager *lv2_urid_manager; lv2_urid_manager = AGS_LV2_URID_MANAGER(gobject); g_hash_table_destroy(lv2_urid_manager->urid); if(lv2_urid_manager == ags_lv2_urid_manager){ ags_lv2_urid_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_lv2_urid_manager_parent_class)->finalize(gobject); } void ags_lv2_urid_manager_destroy_data(gpointer data) { /* empty */ } gboolean ags_lv2_urid_manager_finder(gpointer key, gpointer value, gpointer user_data) { if((uint32_t) g_value_get_uint((GValue *) value) == (uint32_t) g_value_get_uint((GValue *) user_data)){ return(TRUE); } return(FALSE); } /** * ags_lv2_urid_manager_insert: * @lv2_urid_manager: the #AgsLv2UridManager * @uri: the object as key * @id: the id to insert * * Inserts a id into hash associated with @urid. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_urid_manager_insert(AgsLv2UridManager *lv2_urid_manager, gchar *uri, GValue *id) { if(lv2_urid_manager == NULL || uri == NULL || id == NULL){ return(FALSE); } g_hash_table_insert(lv2_urid_manager->urid, uri, id); return(TRUE); } /** * ags_lv2_urid_manager_remove: * @lv2_urid_manager: the #AgsLv2UridManager * @uri: the object to remove * * Removes an entry associated with @urid. * * Returns: %TRUE as successfully removed, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_urid_manager_remove(AgsLv2UridManager *lv2_urid_manager, gchar *uri) { GValue *id; id = g_hash_table_lookup(lv2_urid_manager->urid, uri); if(id != NULL){ g_hash_table_remove(lv2_urid_manager->urid, uri); } return(TRUE); } /** * ags_lv2_urid_manager_lookup: * @lv2_urid_manager: the #AgsLv2UridManager * @uri: the object to lookup * * Lookup a id associated with @urid in @lv2_urid_manager * * Returns: the id on success, else the newly created id * * Since: 1.0.0 */ GValue* ags_lv2_urid_manager_lookup(AgsLv2UridManager *lv2_urid_manager, gchar *uri) { GValue *value; value = (GValue *) g_hash_table_lookup(lv2_urid_manager->urid, uri); if(value == NULL){ g_message("new uri %s", uri); value = g_new0(GValue, 1); g_value_init(value, G_TYPE_ULONG); g_value_set_ulong(value, lv2_urid_manager->id_counter); ags_lv2_urid_manager_insert(lv2_urid_manager, uri, value); lv2_urid_manager->id_counter++; } return(value); } void ags_lv2_urid_manager_load_default(AgsLv2UridManager *lv2_urid_manager) { GValue *value; gchar **str; static const gchar *default_uri[] = { NULL, }; str = default_uri; while(str[0] != NULL){ value = g_new0(GValue, 1); g_value_init(value, G_TYPE_ULONG); g_value_set_ulong(value, lv2_urid_manager->id_counter); ags_lv2_urid_manager_insert(lv2_urid_manager, *str, value); lv2_urid_manager->id_counter++; str++; } } uint32_t ags_lv2_urid_manager_map(LV2_URID_Map_Handle handle, char *uri) { GValue *value; uint32_t id; value = ags_lv2_urid_manager_lookup(ags_lv2_urid_manager_get_instance(), uri); id = g_value_get_ulong(value); return(id); } const char* ags_lv2_urid_manager_unmap(LV2_URID_Map_Handle handle, uint32_t urid) { AgsLv2UridManager *lv2_urid_manager; GList *key, *key_start; gpointer data, tmp; lv2_urid_manager = ags_lv2_urid_manager_get_instance(); key_start = key = g_hash_table_get_keys(lv2_urid_manager->urid); data = NULL; while(key != NULL){ tmp = (gpointer) g_hash_table_lookup(lv2_urid_manager->urid, key->data); if(urid == g_value_get_ulong((GValue *) tmp)){ ags_lv2_urid_manager_remove(lv2_urid_manager, key->data); data = tmp; break; } key = key->next; } g_list_free(key_start); return(data); } /** * ags_lv2_urid_manager_get_instance: * * Singleton function to optain the id manager instance. * * Returns: an instance of #AgsLv2UridManager * * Since: 1.0.0 */ AgsLv2UridManager* ags_lv2_urid_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_lv2_urid_manager == NULL){ ags_lv2_urid_manager = ags_lv2_urid_manager_new(); // ags_lv2_urid_manager_load_default(ags_lv2_urid_manager); } pthread_mutex_unlock(&mutex); return(ags_lv2_urid_manager); } /** * ags_lv2_urid_manager_new: * * Instantiate a id manager. * * Returns: a new #AgsLv2UridManager * * Since: 1.0.0 */ AgsLv2UridManager* ags_lv2_urid_manager_new() { AgsLv2UridManager *lv2_urid_manager; lv2_urid_manager = (AgsLv2UridManager *) g_object_new(AGS_TYPE_LV2_URID_MANAGER, NULL); return(lv2_urid_manager); } gsequencer-1.4.24/ags/plugin/ags_lv2ui_plugin.h0000644000175000017500000000554713246707333016401 00000000000000/* 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 . */ #ifndef __AGS_LV2UI_PLUGIN_H__ #define __AGS_LV2UI_PLUGIN_H__ #include #include #include #include #include #include #define AGS_TYPE_LV2UI_PLUGIN (ags_lv2ui_plugin_get_type()) #define AGS_LV2UI_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2UI_PLUGIN, AgsLv2uiPlugin)) #define AGS_LV2UI_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2UI_PLUGIN, AgsLv2uiPluginClass)) #define AGS_IS_LV2UI_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2UI_PLUGIN)) #define AGS_IS_LV2UI_PLUGIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2UI_PLUGIN)) #define AGS_LV2UI_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2UI_PLUGIN, AgsLv2uiPluginClass)) typedef struct _AgsLv2uiPlugin AgsLv2uiPlugin; typedef struct _AgsLv2uiPluginClass AgsLv2uiPluginClass; /** * AgsLv2uiPluginFlags: * @AGS_LV2UI_PLUGIN_IS_SYNTHESIZER: is synthesizer * @AGS_LV2UI_PLUGIN_GTK2: has Gtk+-2.0 UI * @AGS_LV2UI_PLUGIN_GTK3: has Gtk3 UI * @AGS_LV2UI_PLUGIN_QT4: has Qt4 UI * @AGS_LV2UI_PLUGIN_QT5: has Qt5 UI * * Enum values to control the behavior or indicate internal state of #AgsLv2uiPlugin by * enable/disable as flags. */ typedef enum{ AGS_LV2UI_PLUGIN_IS_SYNTHESIZER = 1, AGS_LV2UI_PLUGIN_GTK2 = 1 << 1, AGS_LV2UI_PLUGIN_GTK3 = 1 << 2, AGS_LV2UI_PLUGIN_QT4 = 1 << 3, AGS_LV2UI_PLUGIN_QT5 = 1 << 4, }AgsLv2uiPluginFlags; struct _AgsLv2uiPlugin { AgsBasePlugin base_plugin; guint flags; gchar *gui_uri; AgsTurtle *manifest; AgsTurtle *gui_turtle; GObject *lv2_plugin; }; struct _AgsLv2uiPluginClass { AgsBasePluginClass base_plugin; }; GType ags_lv2ui_plugin_get_type(void); GList* ags_lv2ui_plugin_find_gui_uri(GList *lv2ui_plugin, gchar *gui_uri); AgsLv2uiPlugin* ags_lv2ui_plugin_new(AgsTurtle *gui_turtle, gchar *filename, gchar *effect, gchar *gui_uri, guint effect_index); #endif /*__AGS_LV2UI_PLUGIN_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_worker_manager.h0000644000175000017500000000442013246707333017535 00000000000000/* 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 . */ #ifndef __AGS_LV2_WORKER_MANAGER_H__ #define __AGS_LV2_WORKER_MANAGER_H__ #include #include #include #include #include #define AGS_TYPE_LV2_WORKER_MANAGER (ags_lv2_worker_manager_get_type()) #define AGS_LV2_WORKER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_WORKER_MANAGER, AgsLv2WorkerManager)) #define AGS_LV2_WORKER_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_WORKER_MANAGER, AgsLv2WorkerManagerClass)) #define AGS_IS_LV2_WORKER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_WORKER_MANAGER)) #define AGS_IS_LV2_WORKER_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_WORKER_MANAGER)) #define AGS_LV2_WORKER_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_WORKER_MANAGER, AgsLv2WorkerManagerClass)) typedef struct _AgsLv2WorkerManager AgsLv2WorkerManager; typedef struct _AgsLv2WorkerManagerClass AgsLv2WorkerManagerClass; struct _AgsLv2WorkerManager { GObject gobject; AgsThreadPool *thread_pool; volatile GList *worker; }; struct _AgsLv2WorkerManagerClass { GObjectClass gobject; }; GType ags_lv2_worker_manager_get_type(void); GObject* ags_lv2_worker_manager_pull_worker(AgsLv2WorkerManager *worker_manager); AgsLv2WorkerManager* ags_lv2_worker_manager_get_instance(); AgsLv2WorkerManager* ags_lv2_worker_manager_new(); #endif /*__AGS_LV2_WORKER_MANAGER_H__*/ gsequencer-1.4.24/ags/plugin/ags_ladspa_manager.h0000644000175000017500000000522613246707333016712 00000000000000/* 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 . */ #ifndef __AGS_LADSPA_MANAGER_H__ #define __AGS_LADSPA_MANAGER_H__ #include #include #include #define AGS_TYPE_LADSPA_MANAGER (ags_ladspa_manager_get_type()) #define AGS_LADSPA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LADSPA_MANAGER, AgsLadspaManager)) #define AGS_LADSPA_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LADSPA_MANAGER, AgsLadspaManagerClass)) #define AGS_IS_LADSPA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LADSPA_MANAGER)) #define AGS_IS_LADSPA_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LADSPA_MANAGER)) #define AGS_LADSPA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LADSPA_MANAGER, AgsLadspaManagerClass)) typedef struct _AgsLadspaManager AgsLadspaManager; typedef struct _AgsLadspaManagerClass AgsLadspaManagerClass; struct _AgsLadspaManager { GObject object; GList *ladspa_plugin_blacklist; GList *ladspa_plugin; }; struct _AgsLadspaManagerClass { GObjectClass object; }; GType ags_ladspa_manager_get_type(void); gchar** ags_ladspa_manager_get_default_path(); void ags_ladspa_manager_set_default_path(gchar** default_path); gchar** ags_ladspa_manager_get_filenames(AgsLadspaManager *ladspa_manager); AgsLadspaPlugin* ags_ladspa_manager_find_ladspa_plugin(AgsLadspaManager *ladspa_manager, gchar *filename, gchar *effect); void ags_ladspa_manager_load_blacklist(AgsLadspaManager *ladspa_manager, gchar *blacklist_filename); void ags_ladspa_manager_load_file(AgsLadspaManager *ladspa_manager, gchar *ladspa_path, gchar *filename); void ags_ladspa_manager_load_default_directory(AgsLadspaManager *ladspa_manager); /* */ AgsLadspaManager* ags_ladspa_manager_get_instance(); AgsLadspaManager* ags_ladspa_manager_new(); #endif /*__AGS_LADSPA_MANAGER_H__*/ gsequencer-1.4.24/ags/plugin/ags_dssi_plugin.c0000644000175000017500000004002413256163135016257 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_dssi_plugin_class_init(AgsDssiPluginClass *dssi_plugin); void ags_dssi_plugin_init (AgsDssiPlugin *dssi_plugin); void ags_dssi_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_dssi_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_dssi_plugin_finalize(GObject *gobject); gpointer ags_dssi_plugin_instantiate(AgsBasePlugin *base_plugin, guint samplerate); void ags_dssi_plugin_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location); void ags_dssi_plugin_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_dssi_plugin_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle); void ags_dssi_plugin_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count); void ags_dssi_plugin_load_plugin(AgsBasePlugin *base_plugin); void ags_dssi_plugin_real_change_program(AgsDssiPlugin *dssi_plugin, gpointer ladspa_handle, guint bank_index, guint program_index); /** * SECTION:ags_dssi_plugin * @short_description: The dssi plugin class * @title: AgsDssiPlugin * @section_id: * @include: ags/plugin/ags_dssi_plugin.h * * The #AgsDssiPlugin loads/unloads a Dssi plugin. */ enum{ PROP_0, PROP_UNIQUE_ID, PROP_PROGRAM, }; enum{ CHANGE_PROGRAM, LAST_SIGNAL, }; static gpointer ags_dssi_plugin_parent_class = NULL; static guint dssi_plugin_signals[LAST_SIGNAL]; GType ags_dssi_plugin_get_type (void) { static GType ags_type_dssi_plugin = 0; if(!ags_type_dssi_plugin){ static const GTypeInfo ags_dssi_plugin_info = { sizeof (AgsDssiPluginClass), NULL, /* dssi_init */ NULL, /* dssi_finalize */ (GClassInitFunc) ags_dssi_plugin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsDssiPlugin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_dssi_plugin_init, }; ags_type_dssi_plugin = g_type_register_static(AGS_TYPE_BASE_PLUGIN, "AgsDssiPlugin", &ags_dssi_plugin_info, 0); } return (ags_type_dssi_plugin); } void ags_dssi_plugin_class_init(AgsDssiPluginClass *dssi_plugin) { AgsBasePluginClass *base_plugin; GObjectClass *gobject; GParamSpec *param_spec; ags_dssi_plugin_parent_class = g_type_class_peek_parent(dssi_plugin); /* GObjectClass */ gobject = (GObjectClass *) dssi_plugin; gobject->set_property = ags_dssi_plugin_set_property; gobject->get_property = ags_dssi_plugin_get_property; gobject->finalize = ags_dssi_plugin_finalize; /* properties */ /** * AgsDssiPlugin:unique-id: * * The assigned unique-id. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("unique-id", i18n_pspec("unique-id of the plugin"), i18n_pspec("The unique-id this plugin is assigned with"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UNIQUE_ID, param_spec); /** * AgsBasePlugin:program: * * The assigned program. * * Since: 1.0.0 */ param_spec = g_param_spec_string("program", i18n_pspec("program of the plugin"), i18n_pspec("The program this plugin is located in"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PROGRAM, param_spec); /* AgsBasePluginClass */ base_plugin = (AgsBasePluginClass *) dssi_plugin; base_plugin->instantiate = ags_dssi_plugin_instantiate; base_plugin->connect_port = ags_dssi_plugin_connect_port; base_plugin->activate = ags_dssi_plugin_activate; base_plugin->deactivate = ags_dssi_plugin_deactivate; base_plugin->run = ags_dssi_plugin_run; base_plugin->load_plugin = ags_dssi_plugin_load_plugin; /* AgsDssiPluginClass */ dssi_plugin->change_program = ags_dssi_plugin_real_change_program; /** * AgsDssiPlugin::change-program: * @dssi_plugin: the plugin to change-program * @ladspa_handle: the LADSPA handle * @bank: the bank number * @program: the program number * * The ::change-program signal creates a new instance of plugin. * * Since: 1.0.0 */ dssi_plugin_signals[CHANGE_PROGRAM] = g_signal_new("change-program", G_TYPE_FROM_CLASS (dssi_plugin), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsDssiPluginClass, change_program), NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT); } void ags_dssi_plugin_init(AgsDssiPlugin *dssi_plugin) { dssi_plugin->unique_id = 0; dssi_plugin->program = NULL; } void ags_dssi_plugin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsDssiPlugin *dssi_plugin; dssi_plugin = AGS_DSSI_PLUGIN(gobject); switch(prop_id){ case PROP_UNIQUE_ID: { dssi_plugin->unique_id = g_value_get_uint(value); } break; case PROP_PROGRAM: { gchar *program; program = (gchar *) g_value_get_string(value); if(dssi_plugin->program == program){ return; } if(dssi_plugin->program != NULL){ g_free(dssi_plugin->program); } dssi_plugin->program = g_strdup(program); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_dssi_plugin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsDssiPlugin *dssi_plugin; dssi_plugin = AGS_DSSI_PLUGIN(gobject); switch(prop_id){ case PROP_UNIQUE_ID: g_value_set_uint(value, dssi_plugin->unique_id); break; case PROP_PROGRAM: g_value_set_string(value, dssi_plugin->program); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_dssi_plugin_finalize(GObject *gobject) { AgsDssiPlugin *dssi_plugin; dssi_plugin = AGS_DSSI_PLUGIN(gobject); g_free(dssi_plugin->program); /* call parent */ G_OBJECT_CLASS(ags_dssi_plugin_parent_class)->finalize(gobject); } gpointer ags_dssi_plugin_instantiate(AgsBasePlugin *base_plugin, guint samplerate) { gpointer ptr; ptr = AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->instantiate(AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin, (unsigned long) samplerate); return(ptr); } void ags_dssi_plugin_connect_port(AgsBasePlugin *base_plugin, gpointer plugin_handle, guint port_index, gpointer data_location) { AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->connect_port((LADSPA_Handle) plugin_handle, (unsigned long) port_index, (LADSPA_Data *) data_location); } void ags_dssi_plugin_activate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { if(AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->activate != NULL){ AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->activate((LADSPA_Handle) plugin_handle); } } void ags_dssi_plugin_deactivate(AgsBasePlugin *base_plugin, gpointer plugin_handle) { if(AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->deactivate != NULL){ AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->deactivate((LADSPA_Handle) plugin_handle); } } void ags_dssi_plugin_run(AgsBasePlugin *base_plugin, gpointer plugin_handle, snd_seq_event_t *seq_event, guint frame_count) { if(AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->run_synth != NULL){ AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->run_synth((LADSPA_Handle) plugin_handle, frame_count, seq_event, (unsigned long) 1); }else{ AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->run((LADSPA_Handle) plugin_handle, (unsigned long) frame_count); } } void ags_dssi_plugin_load_plugin(AgsBasePlugin *base_plugin) { AgsPortDescriptor *port; GList *port_list; gchar *str; DSSI_Descriptor_Function dssi_descriptor; LADSPA_PortDescriptor *port_descriptor; LADSPA_PortRangeHint *range_hint; LADSPA_PortRangeHintDescriptor hint_descriptor; unsigned long effect_index; unsigned long port_count; unsigned long i; base_plugin->plugin_so = dlopen(base_plugin->filename, RTLD_NOW); if(base_plugin->plugin_so == NULL){ g_warning("ags_dssi_plugin.c - failed to load static object file"); dlerror(); return; } dssi_descriptor = (DSSI_Descriptor_Function) dlsym(base_plugin->plugin_so, "dssi_descriptor"); if(dlerror() == NULL && dssi_descriptor){ effect_index = base_plugin->effect_index; base_plugin->plugin_descriptor = dssi_descriptor(effect_index); if(base_plugin->plugin_descriptor != NULL){ g_object_set(base_plugin, "unique-id", AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->UniqueID, NULL); port_count = AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->PortCount; port_descriptor = AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->PortDescriptors; port_list = NULL; for(i = 0; i < port_count; i++){ /* allocate port descriptor */ port = ags_port_descriptor_alloc(); port_list = g_list_prepend(port_list, port); /* set flags */ if(LADSPA_IS_PORT_INPUT(port_descriptor[i])){ port->flags |= AGS_PORT_DESCRIPTOR_INPUT; }else if(LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ port->flags |= AGS_PORT_DESCRIPTOR_OUTPUT; } if(LADSPA_IS_PORT_CONTROL(port_descriptor[i])){ port->flags |= AGS_PORT_DESCRIPTOR_CONTROL; }else if(LADSPA_IS_PORT_AUDIO(port_descriptor[i])){ port->flags |= AGS_PORT_DESCRIPTOR_AUDIO; } /* set index and name */ port->port_index = i; port->port_name = g_strdup(AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->PortNames[i]); range_hint = &(AGS_DSSI_PLUGIN_DESCRIPTOR(base_plugin->plugin_descriptor)->LADSPA_Plugin->PortRangeHints[i]); hint_descriptor = range_hint->HintDescriptor; g_value_init(port->default_value, G_TYPE_FLOAT); g_value_init(port->lower_value, G_TYPE_FLOAT); g_value_init(port->upper_value, G_TYPE_FLOAT); g_value_set_float(port->default_value, 0.0); if(LADSPA_IS_HINT_TOGGLED(hint_descriptor)){ /* is toggled */ port->flags |= AGS_PORT_DESCRIPTOR_TOGGLED; /* set default */ if(LADSPA_IS_HINT_DEFAULT_0(hint_descriptor)){ g_value_set_float(port->default_value, 0.0); }else if(LADSPA_IS_HINT_DEFAULT_1(hint_descriptor)){ g_value_set_float(port->default_value, 1.0); } }else{ /* set lower */ g_value_set_float(port->lower_value, range_hint->LowerBound); /* set upper */ g_value_set_float(port->upper_value, range_hint->UpperBound); /* set default */ g_value_set_float(port->default_value, range_hint->LowerBound); /* bounds */ if(LADSPA_IS_HINT_BOUNDED_BELOW(hint_descriptor)){ if(LADSPA_IS_HINT_SAMPLE_RATE(hint_descriptor)){ port->flags |= (AGS_PORT_DESCRIPTOR_SAMPLERATE | AGS_PORT_DESCRIPTOR_BOUNDED_BELOW); g_value_set_float(port->lower_value, range_hint->LowerBound); } } if(LADSPA_IS_HINT_BOUNDED_ABOVE(hint_descriptor)){ if(LADSPA_IS_HINT_SAMPLE_RATE(hint_descriptor)){ port->flags |= (AGS_PORT_DESCRIPTOR_SAMPLERATE | AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE); g_value_set_float(port->upper_value, range_hint->UpperBound); } } /* integer */ if(LADSPA_IS_HINT_INTEGER(hint_descriptor)){ port->flags |= AGS_PORT_DESCRIPTOR_INTEGER; port->scale_steps = range_hint->UpperBound - range_hint->LowerBound; } /* logarithmic */ if(LADSPA_IS_HINT_LOGARITHMIC(hint_descriptor)){ port->flags |= AGS_PORT_DESCRIPTOR_LOGARITHMIC; } /* set default value */ if(LADSPA_IS_HINT_DEFAULT_0(hint_descriptor)){ g_value_set_float(port->default_value, 0.0); }else if(LADSPA_IS_HINT_DEFAULT_1(hint_descriptor)){ g_value_set_float(port->default_value, 1.0); }else if(LADSPA_IS_HINT_DEFAULT_MINIMUM(hint_descriptor)){ g_value_set_float(port->default_value, range_hint->LowerBound); }else if(LADSPA_IS_HINT_DEFAULT_LOW(hint_descriptor)){ float default_value; default_value = 0.75 * range_hint->LowerBound + 0.25 * range_hint->UpperBound; g_value_set_float(port->default_value, default_value); }else if(LADSPA_IS_HINT_DEFAULT_MIDDLE(hint_descriptor)){ float default_value; default_value = (0.5 * range_hint->LowerBound) + (0.5 * range_hint->UpperBound); g_value_set_float(port->default_value, default_value); }else if(LADSPA_IS_HINT_DEFAULT_HIGH(hint_descriptor)){ float default_value; default_value = 0.25 * range_hint->LowerBound + 0.75 * range_hint->UpperBound; g_value_set_float(port->default_value, default_value); }else if(LADSPA_IS_HINT_DEFAULT_MAXIMUM(hint_descriptor)){ g_value_set_float(port->default_value, range_hint->UpperBound); }else if(LADSPA_IS_HINT_DEFAULT_100(hint_descriptor)){ g_value_set_float(port->default_value, 100.0); }else if(LADSPA_IS_HINT_DEFAULT_440(hint_descriptor)){ g_value_set_float(port->default_value, 440.0); } } } base_plugin->port = g_list_reverse(port_list); } } } void ags_dssi_plugin_real_change_program(AgsDssiPlugin *dssi_plugin, gpointer ladspa_handle, guint bank_index, guint program_index) { if(AGS_DSSI_PLUGIN_DESCRIPTOR(AGS_BASE_PLUGIN(dssi_plugin)->plugin_descriptor)->select_program != NULL){ AGS_DSSI_PLUGIN_DESCRIPTOR(AGS_BASE_PLUGIN(dssi_plugin)->plugin_descriptor)->select_program((void *) ladspa_handle, (unsigned long) bank_index, (unsigned long) program_index); } } void ags_dssi_plugin_change_program(AgsDssiPlugin *dssi_plugin, gpointer ladspa_handle, guint bank_index, guint program_index) { g_return_if_fail(AGS_IS_DSSI_PLUGIN(dssi_plugin)); g_object_ref(G_OBJECT(dssi_plugin)); g_signal_emit(G_OBJECT(dssi_plugin), dssi_plugin_signals[CHANGE_PROGRAM], 0, ladspa_handle, bank_index, program_index); g_object_unref(G_OBJECT(dssi_plugin)); } /** * ags_dssi_plugin_new: * @filename: the plugin .so * @effect: the effect's string representation * @effect_index: the effect's index * * Creates an #AgsDssiPlugin * * Returns: a new #AgsDssiPlugin * * Since: 1.0.0 */ AgsDssiPlugin* ags_dssi_plugin_new(gchar *filename, gchar *effect, guint effect_index) { AgsDssiPlugin *dssi_plugin; dssi_plugin = (AgsDssiPlugin *) g_object_new(AGS_TYPE_DSSI_PLUGIN, "filename", filename, "effect", effect, "effect-index", effect_index, NULL); return(dssi_plugin); } gsequencer-1.4.24/ags/plugin/ags_lv2_option_manager.h0000644000175000017500000000772413246707333017546 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2015,2017 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 . */ #ifndef __AGS_LV2_OPTION_MANAGER_H__ #define __AGS_LV2_OPTION_MANAGER_H__ #include #include #include #include #define AGS_TYPE_LV2_OPTION_MANAGER (ags_lv2_option_manager_get_type()) #define AGS_LV2_OPTION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_OPTION_MANAGER, AgsLv2OptionManager)) #define AGS_LV2_OPTION_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_OPTION_MANAGER, AgsLv2OptionManagerClass)) #define AGS_IS_LV2_OPTION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_OPTION_MANAGER)) #define AGS_IS_LV2_OPTION_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_OPTION_MANAGER)) #define AGS_LV2_OPTION_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_OPTION_MANAGER, AgsLv2OptionManagerClass)) #define AGS_LV2_OPTION_RESSOURCE(ptr) ((AgsLv2OptionRessource *)(ptr)) #define AGS_LV2_OPTIONS_OPTION(ptr) ((LV2_Options_Option *)(ptr)) typedef struct _AgsLv2OptionManager AgsLv2OptionManager; typedef struct _AgsLv2OptionManagerClass AgsLv2OptionManagerClass; typedef struct _AgsLv2OptionRessource AgsLv2OptionRessource; struct _AgsLv2OptionManager { GObject gobject; GHashTable *ressource; }; struct _AgsLv2OptionManagerClass { GObjectClass gobject; void (*get_option)(AgsLv2OptionManager *option_manager, gpointer instance, gpointer option, gpointer retval); void (*set_option)(AgsLv2OptionManager *option_manager, gpointer instance, gpointer option, gpointer retval); }; struct _AgsLv2OptionRessource{ LV2_Handle instance; LV2_Options_Option *option; }; GType ags_lv2_option_manager_get_type(void); /* option ressource */ AgsLv2OptionRessource* ags_lv2_option_ressource_alloc(); gboolean ags_lv2_option_manager_ressource_insert(AgsLv2OptionManager *lv2_option_manager, AgsLv2OptionRessource *lv2_option_ressource, gpointer data); gboolean ags_lv2_option_manager_ressource_remove(AgsLv2OptionManager *lv2_option_manager, AgsLv2OptionRessource *lv2_option_ressource); gpointer ags_lv2_option_manager_ressource_lookup(AgsLv2OptionManager *lv2_option_manager, AgsLv2OptionRessource *lv2_option_ressource); gboolean ags_lv2_option_manager_ressource_lookup_extended(AgsLv2OptionManager *lv2_option_manager, AgsLv2OptionRessource *lv2_option_ressource, gpointer *orig_key, gpointer *value); /* get and set option */ void ags_lv2_option_manager_get_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval); void ags_lv2_option_manager_set_option(AgsLv2OptionManager *lv2_option_manager, gpointer instance, gpointer option, gpointer retval); /* the lv2 interface */ uint32_t ags_lv2_option_manager_lv2_options_get(LV2_Handle instance, LV2_Options_Option *options); uint32_t ags_lv2_option_manager_lv2_options_set(LV2_Handle instance, LV2_Options_Option *options); /* */ AgsLv2OptionManager* ags_lv2_option_manager_get_instance(); AgsLv2OptionManager* ags_lv2_option_manager_new(); #endif /*__AGS_LV2_OPTION_MANAGER_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_urid_manager.h0000644000175000017500000000516413246707333017175 00000000000000/* 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 . */ #ifndef __AGS_LV2_URID_MANAGER_H__ #define __AGS_LV2_URID_MANAGER_H__ #include #include #include #include #define AGS_TYPE_LV2_URID_MANAGER (ags_lv2_urid_manager_get_type()) #define AGS_LV2_URID_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_URID_MANAGER, AgsLv2UridManager)) #define AGS_LV2_URID_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_URID_MANAGER, AgsLv2UridManagerClass)) #define AGS_IS_LV2_URID_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_URID_MANAGER)) #define AGS_IS_LV2_URID_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_URID_MANAGER)) #define AGS_LV2_URID_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_URID_MANAGER, AgsLv2UridManagerClass)) typedef struct _AgsLv2UridManager AgsLv2UridManager; typedef struct _AgsLv2UridManagerClass AgsLv2UridManagerClass; struct _AgsLv2UridManager { GObject gobject; uint32_t id_counter; GHashTable *urid; }; struct _AgsLv2UridManagerClass { GObjectClass gobject; }; GType ags_lv2_urid_manager_get_type(void); gboolean ags_lv2_urid_manager_insert(AgsLv2UridManager *lv2_urid_manager, gchar *uri, GValue *id); gboolean ags_lv2_urid_manager_remove(AgsLv2UridManager *lv2_urid_manager, gchar *uri); GValue* ags_lv2_urid_manager_lookup(AgsLv2UridManager *lv2_urid_manager, gchar *uri); void ags_lv2_urid_manager_load_default(AgsLv2UridManager *lv2_urid_manager); uint32_t ags_lv2_urid_manager_map(LV2_URID_Map_Handle handle, char *uri); const char* ags_lv2_urid_manager_unmap(LV2_URID_Map_Handle handle, uint32_t urid); AgsLv2UridManager* ags_lv2_urid_manager_get_instance(); AgsLv2UridManager* ags_lv2_urid_manager_new(); #endif /*__AGS_LV2_URID_MANAGER_H__*/ gsequencer-1.4.24/ags/plugin/ags_dssi_manager.h0000644000175000017500000000504413246707333016406 00000000000000/* 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 . */ #ifndef __AGS_DSSI_MANAGER_H__ #define __AGS_DSSI_MANAGER_H__ #include #include #include #define AGS_TYPE_DSSI_MANAGER (ags_dssi_manager_get_type()) #define AGS_DSSI_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DSSI_MANAGER, AgsDssiManager)) #define AGS_DSSI_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_DSSI_MANAGER, AgsDssiManagerClass)) #define AGS_IS_DSSI_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_DSSI_MANAGER)) #define AGS_IS_DSSI_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_DSSI_MANAGER)) #define AGS_DSSI_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_DSSI_MANAGER, AgsDssiManagerClass)) typedef struct _AgsDssiManager AgsDssiManager; typedef struct _AgsDssiManagerClass AgsDssiManagerClass; struct _AgsDssiManager { GObject object; GList *dssi_plugin_blacklist; GList *dssi_plugin; }; struct _AgsDssiManagerClass { GObjectClass object; }; GType ags_dssi_manager_get_type(void); gchar** ags_dssi_manager_get_default_path(); void ags_dssi_manager_set_default_path(gchar** default_path); gchar** ags_dssi_manager_get_filenames(AgsDssiManager *dssi_manager); AgsDssiPlugin* ags_dssi_manager_find_dssi_plugin(AgsDssiManager *dssi_manager, gchar *filename, gchar *effect); void ags_dssi_manager_load_blacklist(AgsDssiManager *dssi_manager, gchar *blacklist_filename); void ags_dssi_manager_load_file(AgsDssiManager *dssi_manager, gchar *dssi_path, gchar *filename); void ags_dssi_manager_load_default_directory(AgsDssiManager *dssi_manager); /* */ AgsDssiManager* ags_dssi_manager_get_instance(); AgsDssiManager* ags_dssi_manager_new(); #endif /*__AGS_DSSI_MANAGER_H__*/ gsequencer-1.4.24/ags/plugin/ags_lv2_uri_map_manager.h0000644000175000017500000000526113246707333017664 00000000000000/* 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 . */ #ifndef __AGS_LV2_URI_MAP_MANAGER_H__ #define __AGS_LV2_URI_MAP_MANAGER_H__ #include #include #include #include #define AGS_TYPE_LV2_URI_MAP_MANAGER (ags_lv2_uri_map_manager_get_type()) #define AGS_LV2_URI_MAP_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_URI_MAP_MANAGER, AgsLv2UriMapManager)) #define AGS_LV2_URI_MAP_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_URI_MAP_MANAGER, AgsLv2UriMapManagerClass)) #define AGS_IS_LV2_URI_MAP_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_URI_MAP_MANAGER)) #define AGS_IS_LV2_URI_MAP_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_URI_MAP_MANAGER)) #define AGS_LV2_URI_MAP_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_URI_MAP_MANAGER, AgsLv2UriMapManagerClass)) typedef struct _AgsLv2UriMapManager AgsLv2UriMapManager; typedef struct _AgsLv2UriMapManagerClass AgsLv2UriMapManagerClass; struct _AgsLv2UriMapManager { GObject gobject; uint32_t id_counter; GHashTable *uri_map; }; struct _AgsLv2UriMapManagerClass { GObjectClass gobject; }; GType ags_lv2_uri_map_manager_get_type(void); gboolean ags_lv2_uri_map_manager_insert(AgsLv2UriMapManager *lv2_uri_map_manager, gchar *uri, GValue *id); gboolean ags_lv2_uri_map_manager_remove(AgsLv2UriMapManager *lv2_uri_map_manager, gchar *uri); GValue* ags_lv2_uri_map_manager_lookup(AgsLv2UriMapManager *lv2_uri_map_manager, gchar *uri); void ags_lv2_uri_map_manager_load_default(AgsLv2UriMapManager *lv2_uri_map_manager); uint32_t ags_lv2_uri_map_manager_uri_to_id(LV2_URI_Map_Callback_Data callback_data, char *map, char *uri); AgsLv2UriMapManager* ags_lv2_uri_map_manager_get_instance(); AgsLv2UriMapManager* ags_lv2_uri_map_manager_new(); #endif /*__AGS_LV2_URI_MAP_MANAGER_H__*/ gsequencer-1.4.24/ags/X/0000755000175000017500000000000013256233676011742 500000000000000gsequencer-1.4.24/ags/X/ags_machine_editor_callbacks.c0000644000175000017500000000345313246707333017631 00000000000000/* 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 . */ #include #include #include int ags_machine_editor_switch_page_callback(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, AgsMachineEditor *machine_editor) { /* empty */ return(0); } int ags_machine_editor_apply_callback(GtkWidget *widget, AgsMachineEditor *machine_editor) { ags_applicable_apply(AGS_APPLICABLE(machine_editor)); //TODO:JK: remove me // ags_applicable_reset(AGS_APPLICABLE(machine_editor)); return(0); } int ags_machine_editor_ok_callback(GtkWidget *widget, AgsMachineEditor *machine_editor) { // ags_applicable_set_update(AGS_APPLICABLE(machine_editor), FALSE); ags_connectable_disconnect(AGS_CONNECTABLE(machine_editor)); ags_applicable_apply(AGS_APPLICABLE(machine_editor)); gtk_widget_destroy((GtkWidget *) machine_editor); return(0); } int ags_machine_editor_cancel_callback(GtkWidget *widget, AgsMachineEditor *machine_editor) { gtk_widget_destroy((GtkWidget *) machine_editor); return(0); } gsequencer-1.4.24/ags/X/ags_generic_preferences.h0000644000175000017500000000436213247044247016661 00000000000000/* 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 . */ #ifndef __AGS_GENERIC_PREFERENCES_H__ #define __AGS_GENERIC_PREFERENCES_H__ #include #define AGS_TYPE_GENERIC_PREFERENCES (ags_generic_preferences_get_type()) #define AGS_GENERIC_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_GENERIC_PREFERENCES, AgsGenericPreferences)) #define AGS_GENERIC_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_GENERIC_PREFERENCES, AgsGenericPreferencesClass)) #define AGS_IS_GENERIC_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_GENERIC_PREFERENCES)) #define AGS_IS_GENERIC_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_GENERIC_PREFERENCES)) #define AGS_GENERIC_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_GENERIC_PREFERENCES, AgsGenericPreferencesClass)) typedef struct _AgsGenericPreferences AgsGenericPreferences; typedef struct _AgsGenericPreferencesClass AgsGenericPreferencesClass; typedef enum{ AGS_GENERIC_PREFERENCES_CONNECTED = 1, }AgsGenericPreferencesFlags; struct _AgsGenericPreferences { GtkVBox vbox; guint flags; GtkCheckButton *autosave_thread; GtkComboBox *audio_output_module; GtkComboBoxText *segmentation; GtkComboBoxText *engine_mode; GtkCheckButton *rt_safe; }; struct _AgsGenericPreferencesClass { GtkVBoxClass vbox; }; GType ags_generic_preferences_get_type(void); AgsGenericPreferences* ags_generic_preferences_new(); #endif /*__AGS_GENERIC_PREFERENCES_H__*/ gsequencer-1.4.24/ags/X/thread/0000755000175000017500000000000013256233676013211 500000000000000gsequencer-1.4.24/ags/X/thread/ags_simple_autosave_thread.c0000644000175000017500000002331613246707333020656 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_simple_autosave_thread_class_init(AgsSimpleAutosaveThreadClass *simple_autosave_thread); void ags_simple_autosave_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_simple_autosave_thread_init(AgsSimpleAutosaveThread *autosave_thread); void ags_simple_autosave_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_simple_autosave_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_simple_autosave_thread_connect(AgsConnectable *connectable); void ags_simple_autosave_thread_disconnect(AgsConnectable *connectable); void ags_simple_autosave_thread_finalize(GObject *gobject); void ags_simple_autosave_thread_start(AgsThread *thread); void ags_simple_autosave_thread_run(AgsThread *thread); /** * SECTION:ags_simple_autosave_thread * @short_description: auto safe * @title: AgsSimpleAutosaveThread * @section_id: * @include: ags/thread/ags_simple_autosave_thread.h * * The #AgsSimpleAutosaveThread performs auto-safe. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, }; static gpointer ags_simple_autosave_thread_parent_class = NULL; static AgsConnectableInterface *ags_simple_autosave_thread_parent_connectable_interface; GType ags_simple_autosave_thread_get_type() { static GType ags_type_simple_autosave_thread = 0; if(!ags_type_simple_autosave_thread){ static const GTypeInfo ags_simple_autosave_thread_info = { sizeof (AgsSimpleAutosaveThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_simple_autosave_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSimpleAutosaveThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_simple_autosave_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_simple_autosave_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_simple_autosave_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsSimpleAutosaveThread", &ags_simple_autosave_thread_info, 0); g_type_add_interface_static(ags_type_simple_autosave_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_simple_autosave_thread); } void ags_simple_autosave_thread_class_init(AgsSimpleAutosaveThreadClass *simple_autosave_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_simple_autosave_thread_parent_class = g_type_class_peek_parent(simple_autosave_thread); /* GObject */ gobject = (GObjectClass *) simple_autosave_thread; gobject->get_property = ags_simple_autosave_thread_get_property; gobject->set_property = ags_simple_autosave_thread_set_property; gobject->finalize = ags_simple_autosave_thread_finalize; /* properties */ param_spec = g_param_spec_object("application-context", "application context to check against", "The application context to check against serialization.", AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* AgsThread */ thread = (AgsThreadClass *) simple_autosave_thread; thread->start = ags_simple_autosave_thread_start; thread->run = ags_simple_autosave_thread_run; } void ags_simple_autosave_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_simple_autosave_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_simple_autosave_thread_connect; connectable->disconnect = ags_simple_autosave_thread_disconnect; } void ags_simple_autosave_thread_init(AgsSimpleAutosaveThread *simple_autosave_thread) { AgsThread *thread; gchar *filename, *offset; struct passwd *pw; uid_t uid; thread = AGS_THREAD(simple_autosave_thread); thread->freq = AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_JIFFIE; simple_autosave_thread->application_context = NULL; simple_autosave_thread->delay = AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_DELAY; simple_autosave_thread->counter = 0; uid = getuid(); pw = getpwuid(uid); filename = g_strdup_printf("%s/%s/%s", pw->pw_dir, AGS_DEFAULT_DIRECTORY, AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_FILENAME); if((offset = strstr(filename, "{PID}")) != NULL){ gchar *tmp0, *tmp1; tmp0 = filename; tmp1 = g_strndup(filename, offset - filename); filename = g_strdup_printf("%s%d%s", tmp1, getpid(), &(offset[5])); g_free(tmp0); g_free(tmp1); } simple_autosave_thread->filename = filename; } void ags_simple_autosave_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSimpleAutosaveThread *simple_autosave_thread; simple_autosave_thread = AGS_SIMPLE_AUTOSAVE_THREAD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(simple_autosave_thread->application_context == (GObject *) application_context){ return; } if(simple_autosave_thread->application_context != NULL){ g_object_unref(simple_autosave_thread->application_context); } if(application_context != NULL){ g_object_ref(application_context); } simple_autosave_thread->application_context = (GObject *) application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_simple_autosave_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSimpleAutosaveThread *simple_autosave_thread; simple_autosave_thread = AGS_SIMPLE_AUTOSAVE_THREAD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, simple_autosave_thread->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_simple_autosave_thread_connect(AgsConnectable *connectable) { ags_simple_autosave_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_simple_autosave_thread_disconnect(AgsConnectable *connectable) { ags_simple_autosave_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_simple_autosave_thread_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_simple_autosave_thread_parent_class)->finalize(gobject); /* empty */ } void ags_simple_autosave_thread_start(AgsThread *thread) { AGS_THREAD_CLASS(ags_simple_autosave_thread_parent_class)->start(thread); AGS_SIMPLE_AUTOSAVE_THREAD(thread)->counter = 0; } void ags_simple_autosave_thread_run(AgsThread *thread) { AgsSimpleAutosaveThread *simple_autosave_thread; AgsGuiThread *gui_thread; simple_autosave_thread = AGS_SIMPLE_AUTOSAVE_THREAD(thread); gui_thread = (AgsGuiThread *) ags_thread_find_type(AGS_APPLICATION_CONTEXT(simple_autosave_thread->application_context)->main_loop, AGS_TYPE_GUI_THREAD); if(simple_autosave_thread->counter != simple_autosave_thread->delay){ simple_autosave_thread->counter += 1; }else{ AgsSimpleFile *simple_file; AgsSimpleFileWrite *simple_file_write; simple_autosave_thread->counter = 0; simple_file = (AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, "application-context", simple_autosave_thread->application_context, "filename", simple_autosave_thread->filename, NULL); simple_file_write = ags_simple_file_write_new((AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, "filename", simple_autosave_thread->filename, NULL)); ags_gui_thread_schedule_task(gui_thread, simple_file_write); g_object_unref(simple_file); } } /** * ags_simple_autosave_thread_new: * @application_context: the #AgsApplicationContext * * Create a new #AgsSimpleAutosaveThread. * * Returns: the new #AgsSimpleAutosaveThread * * Since: 1.0.0 */ AgsSimpleAutosaveThread* ags_simple_autosave_thread_new(GObject *application_context) { AgsSimpleAutosaveThread *simple_autosave_thread; simple_autosave_thread = (AgsSimpleAutosaveThread *) g_object_new(AGS_TYPE_SIMPLE_AUTOSAVE_THREAD, "application-context", application_context, NULL); return(simple_autosave_thread); } gsequencer-1.4.24/ags/X/thread/ags_gui_thread.c0000644000175000017500000014412113256163135016235 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #ifdef AGS_WITH_QUARTZ #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_gui_thread_signal_handler(int signr); void ags_gui_thread_class_init(AgsGuiThreadClass *gui_thread); void ags_gui_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_gui_thread_init(AgsGuiThread *gui_thread); void ags_gui_thread_connect(AgsConnectable *connectable); void ags_gui_thread_disconnect(AgsConnectable *connectable); void ags_gui_thread_finalize(GObject *gobject); void ags_gui_thread_start(AgsThread *thread); void ags_gui_thread_suspend(AgsThread *thread); void ags_gui_thread_resume(AgsThread *thread); void ags_gui_thread_stop(AgsThread *thread); void ags_gui_thread_dispatch_callback(AgsPollFd *poll, AgsGuiThread *gui_thread); void ags_gui_thread_polling_thread_run_callback(AgsThread *thread, AgsGuiThread *gui_thread); static void ags_gui_thread_sigact_create(); struct sigaction* ags_gui_thread_get_sigact(); guint ags_gui_thread_interrupted(AgsThread *thread, int sig, guint time_cycle, guint *time_spent); static void ags_gui_thread_dispatch_mutex_create(); gboolean ags_gui_thread_animation_prepare(GSource *source, gint *timeout_); gboolean ags_gui_thread_animation_check(GSource *source); gboolean ags_gui_thread_animation_dispatch(GSource *source, GSourceFunc callback, gpointer user_data); gboolean ags_gui_thread_sync_task_prepare(GSource *source, gint *timeout_); gboolean ags_gui_thread_sync_task_check(GSource *source); gboolean ags_gui_thread_sync_task_dispatch(GSource *source, GSourceFunc callback, gpointer user_data); gboolean ags_gui_thread_task_prepare(GSource *source, gint *timeout_); gboolean ags_gui_thread_task_check(GSource *source); gboolean ags_gui_thread_task_dispatch(GSource *source, GSourceFunc callback, gpointer user_data); gboolean ags_gui_thread_do_animation_callback(GtkWidget *widget, GdkEventExpose *event, AgsGuiThread *gui_thread); /** * SECTION:ags_gui_thread * @short_description: gui thread * @title: AgsGuiThread * @section_id: * @include: ags/X/thread/ags_gui_thread.h * * The #AgsGuiThread acts as graphical user interface thread. */ static gpointer ags_gui_thread_parent_class = NULL; static AgsConnectableInterface *ags_gui_thread_parent_connectable_interface; static pthread_mutex_t* gui_dispatch_mutex = NULL; /* Key for the thread-specific AgsGuiThread */ static pthread_key_t ags_gui_thread_sigact_key; /* Once-only initialisation of the key */ static pthread_once_t ags_gui_thread_sigact_key_once = PTHREAD_ONCE_INIT; //TODO:JK: implement get functions #ifndef AGS_USE_TIMER extern sigset_t ags_wait_mask; extern struct sigaction ags_sigact; #else extern sigset_t ags_timer_mask; extern struct sigaction ags_sigact_timer; extern struct sigevent ags_sev_timer; extern struct itimerspec its; #endif void ags_gui_thread_signal_handler(int signr) { if(signr == SIGINT){ //TODO:JK: do backup exit(-1); }else{ sigemptyset(&(ags_gui_thread_get_sigact()->sa_mask)); } } GType ags_gui_thread_get_type() { static GType ags_type_gui_thread = 0; if(!ags_type_gui_thread){ static const GTypeInfo ags_gui_thread_info = { sizeof (AgsGuiThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_gui_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsGuiThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_gui_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_gui_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_gui_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsGuiThread", &ags_gui_thread_info, 0); g_type_add_interface_static(ags_type_gui_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_gui_thread); } void ags_gui_thread_class_init(AgsGuiThreadClass *gui_thread) { GObjectClass *gobject; AgsThreadClass *thread; ags_gui_thread_parent_class = g_type_class_peek_parent(gui_thread); /* GObject */ gobject = (GObjectClass *) gui_thread; gobject->finalize = ags_gui_thread_finalize; /* AgsThread */ thread = (AgsThreadClass *) gui_thread; thread->start = ags_gui_thread_start; thread->run = ags_gui_thread_run; thread->suspend = ags_gui_thread_suspend; thread->resume = ags_gui_thread_resume; thread->stop = ags_gui_thread_stop; // thread->interrupted = ags_gui_thread_interrupted; } void ags_gui_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_gui_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_gui_thread_connect; connectable->disconnect = ags_gui_thread_disconnect; } void ags_gui_thread_init(AgsGuiThread *gui_thread) { AgsThread *thread; pthread_mutexattr_t *attr; thread = AGS_THREAD(gui_thread); g_atomic_int_or(&(thread->sync_flags), (AGS_THREAD_RESUME_INTERRUPTED | AGS_THREAD_TIMELOCK_RUN)); thread->freq = AGS_GUI_THREAD_DEFAULT_JIFFIE; /* main context */ g_atomic_int_set(&(gui_thread->dispatching), FALSE); g_cond_init(&(gui_thread->cond)); g_mutex_init(&(gui_thread->mutex)); gui_thread->main_context = g_main_context_default(); gui_thread->gtk_thread = NULL; gui_thread->cached_poll_array_size = 0; gui_thread->cached_poll_array = NULL; gui_thread->poll_fd = NULL; gui_thread->max_priority = 0; /* task completion */ attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); gui_thread->task_completion_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(gui_thread->task_completion_mutex, attr); g_atomic_pointer_set(&(gui_thread->task_completion), NULL); /* */ gui_thread->dispatch_mutex = ags_gui_thread_get_dispatch_mutex(); /* task */ gui_thread->task_schedule_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(gui_thread->task_schedule_mutex, NULL); gui_thread->nth_message = 0; gui_thread->animation_source = NULL; gui_thread->queued_sync = 0; gui_thread->sync_source = NULL; gui_thread->collected_task = NULL; gui_thread->task_source = NULL; } void ags_gui_thread_connect(AgsConnectable *connectable) { ags_gui_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_gui_thread_disconnect(AgsConnectable *connectable) { ags_gui_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_gui_thread_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_gui_thread_parent_class)->finalize(gobject); /* empty */ } void ags_gui_thread_complete_task(AgsGuiThread *gui_thread) { GList *list, *list_next, *list_start; pthread_mutex_lock(gui_thread->task_completion_mutex); list_start = list = g_atomic_pointer_get(&(gui_thread->task_completion)); g_atomic_pointer_set(&(gui_thread->task_completion), NULL); pthread_mutex_unlock(gui_thread->task_completion_mutex); while(list != NULL){ list_next = list->next; if((AGS_TASK_COMPLETION_READY & (g_atomic_int_get(&(AGS_TASK_COMPLETION(list->data)->flags)))) != 0){ ags_task_completion_complete(AGS_TASK_COMPLETION(list->data)); } list = list_next; } g_list_free(list_start); } void ags_gui_thread_start(AgsThread *thread) { AgsGuiThread *gui_thread; /* */ gui_thread = AGS_GUI_THREAD(thread); /* */ if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ // AGS_THREAD_CLASS(ags_gui_thread_parent_class)->start(thread); } g_atomic_int_or(&(gui_thread->flags), AGS_GUI_THREAD_RUNNING); pthread_create(thread->thread, thread->thread_attr, ags_gui_thread_do_poll_loop, thread); } void* ags_gui_thread_do_poll_loop(void *ptr) { AgsGuiThread *gui_thread; AgsTaskThread *task_thread; AgsPollingThread *polling_thread; AgsThread *thread; AgsApplicationContext *application_context; GMainContext *main_context; GSourceFuncs task_funcs; GSourceFuncs sync_funcs; GSourceFuncs animation_funcs; struct timespec idle = { 0, 4000000, }; guint i; gui_thread = (AgsGuiThread *) ptr; thread = (AgsThread *) ptr; application_context = ags_application_context_get_instance(); main_context = gui_thread->main_context; /* notify start */ pthread_mutex_lock(thread->start_mutex); g_atomic_int_set(&(thread->start_done), TRUE); if(g_atomic_int_get(&(thread->start_wait)) == TRUE){ pthread_cond_broadcast(thread->start_cond); } pthread_mutex_unlock(thread->start_mutex); /* push default thread */ if(!g_main_context_acquire(main_context)){ gboolean got_ownership = FALSE; g_mutex_lock(&(gui_thread->mutex)); while(!got_ownership){ got_ownership = g_main_context_wait(main_context, &(gui_thread->cond), &(gui_thread->mutex)); } g_mutex_unlock(&(gui_thread->mutex)); } g_main_context_push_thread_default(main_context); g_main_context_release(main_context); /* animation functions */ animation_funcs.prepare = ags_gui_thread_animation_prepare; animation_funcs.check = ags_gui_thread_animation_check; animation_funcs.dispatch = ags_gui_thread_animation_dispatch; gui_thread->animation_source = g_source_new(&animation_funcs, sizeof(GSource)); g_source_attach(gui_thread->animation_source, main_context); /* sync functions */ #if 0 sync_funcs.prepare = ags_gui_thread_sync_task_prepare; sync_funcs.check = ags_gui_thread_sync_task_check; sync_funcs.dispatch = ags_gui_thread_sync_task_dispatch; gui_thread->sync_source = g_source_new(&sync_funcs, sizeof(GSource)); g_source_attach(gui_thread->sync_source, main_context); #endif /* task functions */ task_funcs.prepare = ags_gui_thread_task_prepare; task_funcs.check = ags_gui_thread_task_check; task_funcs.dispatch = ags_gui_thread_task_dispatch; gui_thread->task_source = g_source_new(&task_funcs, sizeof(GSource)); g_source_attach(gui_thread->task_source, main_context); /* wait for audio loop */ while(!ags_ui_provider_get_gui_ready(AGS_UI_PROVIDER(application_context))){ usleep(500000); } task_thread = ags_thread_find_type(AGS_APPLICATION_CONTEXT(application_context)->main_loop, AGS_TYPE_TASK_THREAD); polling_thread = (AgsPollingThread *) ags_thread_find_type(AGS_APPLICATION_CONTEXT(application_context)->main_loop, AGS_TYPE_POLLING_THREAD); /* poll */ g_signal_connect(polling_thread, "run", G_CALLBACK(ags_gui_thread_polling_thread_run_callback), gui_thread); while((AGS_GUI_THREAD_RUNNING & (g_atomic_int_get(&(gui_thread->flags)))) != 0){ nanosleep(&idle, NULL); pthread_mutex_lock(task_thread->launch_mutex); AGS_THREAD_GET_CLASS(gui_thread)->run(gui_thread); pthread_mutex_unlock(task_thread->launch_mutex); } pthread_exit(NULL); } void ags_gui_thread_run(AgsThread *thread) { AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsPollingThread *polling_thread; AgsPollFd *poll_fd; GMainContext *main_context; GPollFD *fds = NULL; GList *list, *list_start; gint nfds, allocated_nfds; gint timeout; gboolean some_ready; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* */ gui_thread = AGS_GUI_THREAD(thread); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* real-time setup */ main_loop = ags_thread_get_toplevel(thread); polling_thread = (AgsPollingThread *) ags_thread_find_type(main_loop, AGS_TYPE_POLLING_THREAD); main_context = gui_thread->main_context; if((AGS_THREAD_RT_SETUP & (g_atomic_int_get(&(thread->flags)))) == 0){ #ifdef AGS_WITH_RT struct sched_param param; sigset_t sigmask; /* Declare ourself as a real time task */ param.sched_priority = AGS_GUI_THREAD_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } #endif g_atomic_int_or(&(thread->flags), AGS_THREAD_RT_SETUP); ags_gui_thread_get_sigact()->sa_handler = ags_gui_thread_signal_handler; sigemptyset(&ags_gui_thread_get_sigact()->sa_mask); ags_gui_thread_get_sigact()->sa_flags = 0; sigaction(SIGIO, ags_gui_thread_get_sigact(), (struct sigaction *) NULL); } if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) != 0){ return; } /* acquire main context */ if(!g_main_context_acquire(main_context)){ gboolean got_ownership = FALSE; g_mutex_lock(&(gui_thread->mutex)); while(!got_ownership){ got_ownership = g_main_context_wait(main_context, &(gui_thread->cond), &(gui_thread->mutex)); } g_mutex_unlock(&(gui_thread->mutex)); } /* */ allocated_nfds = gui_thread->cached_poll_array_size; fds = gui_thread->cached_poll_array; /* query new */ g_main_context_prepare(main_context, &gui_thread->max_priority); timeout = 4; while((nfds = g_main_context_query(main_context, gui_thread->max_priority, &timeout, fds, allocated_nfds)) > allocated_nfds){ g_free (fds); gui_thread->cached_poll_array_size = allocated_nfds = nfds; gui_thread->cached_poll_array = fds = g_new(GPollFD, nfds); } /* dispatch */ some_ready = g_main_context_check(main_context, gui_thread->max_priority, gui_thread->cached_poll_array, gui_thread->cached_poll_array_size); gdk_threads_enter(); g_main_context_dispatch(main_context); gdk_threads_leave(); if(g_atomic_int_get(&(gui_thread->dispatching)) == TRUE){ g_atomic_int_set(&(gui_thread->dispatching), FALSE); } ags_gui_thread_complete_task(gui_thread); g_main_context_release(main_context); gdk_threads_enter(); // pango_fc_font_map_cache_clear(pango_cairo_font_map_get_default()); // pango_cairo_font_map_set_default(NULL); // cairo_debug_reset_static_data(); // FcFini(); gdk_threads_leave(); } void ags_gui_thread_suspend(AgsThread *thread) { gboolean success; gboolean critical_region; success = pthread_mutex_trylock(thread->suspend_mutex); critical_region = g_atomic_int_get(&(thread->critical_region)); if(success || critical_region){ if(success){ pthread_mutex_unlock(thread->suspend_mutex); } } } void ags_gui_thread_resume(AgsThread *thread) { gboolean success; gboolean critical_region; success = pthread_mutex_trylock(thread->suspend_mutex); critical_region = g_atomic_int_get(&(thread->critical_region)); if(success || critical_region){ if(success){ pthread_mutex_unlock(thread->suspend_mutex); } } } void ags_gui_thread_stop(AgsThread *thread) { AgsGuiThread *gui_thread; gui_thread = AGS_GUI_THREAD(thread); g_atomic_int_and(&(gui_thread->flags), (~(AGS_GUI_THREAD_RUNNING))); /* */ gdk_flush(); } static void ags_gui_thread_sigact_create() { pthread_key_create(&ags_gui_thread_sigact_key, NULL); pthread_setspecific(ags_gui_thread_sigact_key, (struct sigaction *) malloc(sizeof(struct sigaction))); } struct sigaction* ags_gui_thread_get_sigact() { return((AgsThread *) pthread_getspecific(ags_gui_thread_sigact_key)); } guint ags_gui_thread_interrupted(AgsThread *thread, int sig, guint time_cycle, guint *time_spent) { AgsGuiThread *gui_thread; gui_thread = (AgsGuiThread *) thread; if((AGS_THREAD_INTERRUPTED & (g_atomic_int_get(&(thread->sync_flags)))) == 0){ g_atomic_int_or(&(thread->sync_flags), AGS_THREAD_INTERRUPTED); if(g_atomic_int_get(&(gui_thread->dispatching))){ pthread_kill(*(thread->thread), SIGIO); #ifdef AGS_PTHREAD_SUSPEND pthread_suspend(thread->thread); #else pthread_kill(*(thread->thread), AGS_THREAD_SUSPEND_SIG); #endif } } return(0); } void ags_gui_thread_dispatch_callback(AgsPollFd *poll_fd, AgsGuiThread *gui_thread) { AgsThread *thread; thread = (AgsThread *) gui_thread; g_atomic_int_set(&(gui_thread->dispatching), TRUE); if((AGS_THREAD_INTERRUPTED & (g_atomic_int_get(&(thread->sync_flags)))) != 0){ g_atomic_int_and(&(thread->sync_flags), (~AGS_THREAD_INTERRUPTED)); #if 0 #ifdef AGS_PTHREAD_RESUME pthread_resume(thread->thread); #else pthread_kill(*(thread->thread), AGS_THREAD_RESUME_SIG); #endif #endif } } void ags_gui_thread_polling_thread_run_callback(AgsThread *thread, AgsGuiThread *gui_thread) { AgsPollingThread *polling_thread; AgsPollFd *poll_fd; GPollFD *fds = NULL; GList *list, *list_next; gint position; guint i; if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(AGS_THREAD(gui_thread)->flags)))) != 0){ return; } polling_thread = (AgsPollingThread *) thread; fds = gui_thread->cached_poll_array; /* add new poll fd */ for(i = 0; i < gui_thread->cached_poll_array_size; i++){ pthread_mutex_lock(polling_thread->fd_mutex); position = ags_polling_thread_fd_position(polling_thread, fds[i].fd); pthread_mutex_unlock(polling_thread->fd_mutex); if(position < 0){ poll_fd = ags_poll_fd_new(); poll_fd->fd = fds[i].fd; poll_fd->poll_fd = &(fds[i]); poll_fd->delay = 5.0; // g_signal_connect(poll_fd, "dispatch", // G_CALLBACK(ags_gui_thread_dispatch_callback), gui_thread); ags_polling_thread_add_poll_fd(polling_thread, (GObject *) poll_fd); /* add poll fd to gui thread */ gui_thread->poll_fd = g_list_prepend(gui_thread->poll_fd, poll_fd); } } /* remove old poll fd */ list = gui_thread->poll_fd; while(list != NULL){ gboolean found; list_next = list->next; found = FALSE; for(i = 0; i < gui_thread->cached_poll_array_size; i++){ if(AGS_POLL_FD(list->data)->fd == fds[i].fd){ found = TRUE; break; } } if(!found){ ags_polling_thread_remove_poll_fd(polling_thread, list->data); gui_thread->poll_fd = g_list_remove(gui_thread->poll_fd, list->data); g_object_unref(list->data); } list = list_next; } } void ags_gui_init(int *argc, char ***argv) { ags_gui_thread_get_dispatch_mutex(); gdk_threads_set_lock_functions(ags_gui_thread_enter, ags_gui_thread_leave); } void ags_gui_thread_enter() { pthread_mutex_lock(ags_gui_thread_get_dispatch_mutex()); } void ags_gui_thread_leave() { pthread_mutex_unlock(ags_gui_thread_get_dispatch_mutex()); } static void ags_gui_thread_dispatch_mutex_create() { pthread_mutex_t *mutex; pthread_mutexattr_t *attr; attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); gui_dispatch_mutex = mutex; } void ags_gui_thread_show_file_error(AgsGuiThread *gui_thread, gchar *filename, GError *error) { GtkDialog *dialog; g_warning("could not parse file %s", filename); dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "Failed to open '%s'", filename); gtk_widget_show_all((GtkWidget *) dialog); g_signal_connect(dialog, "response", G_CALLBACK(gtk_main_quit), NULL); gtk_main(); } void ags_gui_thread_launch(AgsGuiThread *gui_thread, gboolean single_thread) { AgsApplicationContext *application_context; AgsMutexManager *mutex_manager; AgsThread *audio_loop, *task_thread; AgsConfig *config; GList *start_queue; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get threads, thread pool and config */ pthread_mutex_lock(application_mutex); audio_loop = (AgsThread *) application_context->main_loop; config = application_context->config; pthread_mutex_unlock(application_mutex); task_thread = ags_thread_find_type(audio_loop, AGS_TYPE_TASK_THREAD); start_queue = NULL; /* autosave thread */ if(!g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "autosave-thread"), "true")){ pthread_mutex_lock(audio_loop->start_mutex); start_queue = g_atomic_pointer_get(&(audio_loop->start_queue)); start_queue = g_list_prepend(start_queue, task_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); } } void ags_gui_thread_launch_filename(AgsGuiThread *gui_thread, gchar *filename, gboolean single_thread) { AgsApplicationContext *application_context; AgsMutexManager *mutex_manager; AgsThread *audio_loop, *task_thread; AgsConfig *config; GList *start_queue; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get threads, thread pool and config */ pthread_mutex_lock(application_mutex); audio_loop = (AgsThread *) application_context->main_loop; task_thread = (AgsThread *) application_context->task_thread; config = application_context->config; pthread_mutex_unlock(application_mutex); /* open file */ if(g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "simple-file"), "false")){ AgsSimpleFile *simple_file; AgsSimpleFileRead *simple_file_read; AgsGuiThread *gui_thread; GError *error; gui_thread = ags_thread_find_type(audio_loop, AGS_TYPE_GUI_THREAD); simple_file = (AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, "application-context", application_context, "filename", filename, NULL); error = NULL; ags_simple_file_open(simple_file, &error); if(error != NULL){ ags_gui_thread_show_file_error(gui_thread, filename, error); ags_application_context_quit(application_context); } /* autosave thread */ if(!g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "autosave-thread"), "true")){ pthread_mutex_lock(audio_loop->start_mutex); start_queue = g_atomic_pointer_get(&(audio_loop->start_queue)); start_queue = g_list_prepend(start_queue, task_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); } /* now start read task */ simple_file_read = ags_simple_file_read_new(simple_file); ags_gui_thread_schedule_task(gui_thread, simple_file_read); } } void ags_gui_thread_timer_start(AgsGuiThread *gui_thread, void *timer_id) { #ifdef AGS_USE_TIMER struct itimerspec value; /* Start the timer */ its.it_value.tv_sec = 0; its.it_value.tv_nsec = NSEC_PER_SEC / AGS_THREAD(gui_thread)->max_precision; its.it_interval.tv_sec = its.it_value.tv_sec; its.it_interval.tv_nsec = its.it_value.tv_nsec; if(timer_settime(timer_id, 0, &its, NULL) == -1){ perror("timer_settime"); exit(EXIT_FAILURE); } if(sigprocmask(SIG_UNBLOCK, &ags_timer_mask, NULL) == -1){ perror("sigprocmask"); exit(EXIT_FAILURE); } #endif } void ags_gui_thread_timer_launch(AgsGuiThread *gui_thread, void *timer_id, gboolean single_thread) { AgsApplicationContext *application_context; AgsMutexManager *mutex_manager; AgsThread *audio_loop, *task_thread; AgsConfig *config; GList *start_queue; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get threads, thread pool and config */ pthread_mutex_lock(application_mutex); audio_loop = (AgsThread *) application_context->main_loop; config = application_context->config; pthread_mutex_unlock(application_mutex); task_thread = ags_thread_find_type(audio_loop, AGS_TYPE_TASK_THREAD); /* autosave thread */ if(!g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "autosave-thread"), "true")){ pthread_mutex_lock(audio_loop->start_mutex); start_queue = g_atomic_pointer_get(&(audio_loop->start_queue)); start_queue = g_list_prepend(start_queue, task_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); } } void ags_gui_thread_timer_launch_filename(AgsGuiThread *gui_thread, void *timer_id, gchar *filename, gboolean single_thread) { AgsApplicationContext *application_context; AgsMutexManager *mutex_manager; AgsThread *audio_loop, *task_thread; AgsConfig *config; GList *start_queue; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get thread, thread pool and config */ pthread_mutex_lock(application_mutex); audio_loop = (AgsThread *) application_context->main_loop; task_thread = (AgsThread *) application_context->task_thread; config = application_context->config; pthread_mutex_unlock(application_mutex); /* open file */ if(g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "simple-file"), "false")){ AgsSimpleFile *simple_file; AgsSimpleFileRead *simple_file_read; GError *error; simple_file = (AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, "application-context", application_context, "filename", filename, NULL); error = NULL; ags_simple_file_open(simple_file, &error); if(error != NULL){ ags_gui_thread_show_file_error(gui_thread, filename, error); exit(-1); } /* Start the timer */ ags_gui_thread_timer_start(gui_thread, timer_id); /* autosave thread */ if(!g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "autosave-thread"), "true")){ pthread_mutex_lock(audio_loop->start_mutex); start_queue = g_atomic_pointer_get(&(audio_loop->start_queue)); start_queue = g_list_prepend(start_queue, task_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); } /* now start read task */ simple_file_read = ags_simple_file_read_new(simple_file); ags_task_thread_append_task((AgsTaskThread *) task_thread, (AgsTask *) simple_file_read); } } pthread_mutex_t* ags_gui_thread_get_dispatch_mutex() { pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(gui_dispatch_mutex == NULL){ ags_gui_thread_dispatch_mutex_create(); } pthread_mutex_unlock(&mutex); return(gui_dispatch_mutex); } gboolean ags_gui_thread_animation_prepare(GSource *source, gint *timeout_) { AgsApplicationContext *application_context; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsLog *log; guint nth; static gboolean initial_run = TRUE; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); gui_thread = ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); log = ags_log_get_instance(); pthread_mutex_lock(log->mutex); nth = g_list_length(g_atomic_pointer_get(&(log->messages))); pthread_mutex_unlock(log->mutex); if(initial_run || (gui_thread != NULL && nth > gui_thread->nth_message) || !ags_ui_provider_get_show_animation(AGS_UI_PROVIDER(application_context))){ if(timeout_ != NULL){ *timeout_ = 0; } initial_run = FALSE; return(TRUE); }else{ if(timeout_ != NULL){ *timeout_ = 0; } return(FALSE); } } gboolean ags_gui_thread_animation_check(GSource *source) { AgsApplicationContext *application_context; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsLog *log; guint nth; static gboolean initial_run = TRUE; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); gui_thread = ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); log = ags_log_get_instance(); pthread_mutex_lock(log->mutex); nth = g_list_length(g_atomic_pointer_get(&(log->messages))); pthread_mutex_unlock(log->mutex); if(initial_run || (gui_thread != NULL && nth > gui_thread->nth_message) || !ags_ui_provider_get_show_animation(AGS_UI_PROVIDER(application_context))){ initial_run = FALSE; return(TRUE); }else{ return(FALSE); } } gboolean ags_gui_thread_animation_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) { AgsApplicationContext *application_context; static GtkWindow *window = NULL; static GtkWidget *widget; AgsGuiThread *gui_thread; GMainContext *main_context; AgsTaskThread *task_thread; AgsMutexManager *mutex_manager; gboolean retval; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); gui_thread = ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); main_context = g_main_context_default(); if(!g_main_context_acquire(main_context)){ gboolean got_ownership = FALSE; g_mutex_lock(&(gui_thread->mutex)); while(!got_ownership){ got_ownership = g_main_context_wait(main_context, &(gui_thread->cond), &(gui_thread->mutex)); } g_mutex_unlock(&(gui_thread->mutex)); } if(window == NULL){ window = g_object_new(GTK_TYPE_WINDOW, "app-paintable", TRUE, "type", GTK_WINDOW_TOPLEVEL, "decorated", FALSE, "window-position", GTK_WIN_POS_CENTER, NULL); gtk_widget_set_size_request(window, 800, 450); widget = gtk_drawing_area_new(); gtk_container_add(window, widget); gtk_widget_show_all((GtkWidget *) window); g_signal_connect(widget, "expose-event", G_CALLBACK(ags_gui_thread_do_animation_callback), gui_thread); } if(ags_ui_provider_get_show_animation(AGS_UI_PROVIDER(application_context))){ gtk_widget_queue_draw(widget); g_main_context_iteration(main_context, FALSE); retval = G_SOURCE_CONTINUE; }else{ /* */ gtk_widget_hide(window); window = NULL; retval = G_SOURCE_REMOVE; } g_main_context_release(main_context); return(retval); } gboolean ags_gui_thread_sync_task_prepare(GSource *source, gint *timeout_) { AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); task_thread = ags_concurrency_provider_get_task_thread(AGS_CONCURRENCY_PROVIDER(application_context)); gui_thread = ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); if(gui_thread != NULL && gui_thread->queued_sync > 0){ if(timeout_ != NULL){ *timeout_ = 0; } return(TRUE); }else{ if(timeout_ != NULL){ *timeout_ = 0; } return(FALSE); } } gboolean ags_gui_thread_sync_task_check(GSource *source) { AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); task_thread = ags_concurrency_provider_get_task_thread(AGS_CONCURRENCY_PROVIDER(application_context)); gui_thread = ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); if(gui_thread->queued_sync > 0){ return(TRUE); }else{ return(FALSE); } } gboolean ags_gui_thread_sync_task_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) { AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; GMainContext *main_context; gboolean do_sync; struct timespec timeout = { 0, AGS_GUI_THREAD_SYNC_AVAILABLE_TIMEOUT, }; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); task_thread = ags_concurrency_provider_get_task_thread(AGS_CONCURRENCY_PROVIDER(application_context)); gui_thread = ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); if(gui_thread == NULL || task_thread == NULL){ return(G_SOURCE_CONTINUE); } main_context = gui_thread->main_context; if(ags_ui_provider_get_show_animation(AGS_UI_PROVIDER(application_context))){ return(G_SOURCE_CONTINUE); } /* ask for sync */ if(gui_thread->queued_sync > 0){ while((AGS_TASK_THREAD_EXTERN_AVAILABLE & (g_atomic_int_get(&(task_thread->flags)))) == 0){ nanosleep(&timeout, NULL); } } if(g_atomic_pointer_get(&(task_thread->queue)) == NULL){ gui_thread->queued_sync -= 1; if(gui_thread->queued_sync == 0){ g_atomic_int_and(&(task_thread->flags), (~AGS_TASK_THREAD_EXTERN_AVAILABLE)); } } /* signal */ if(!g_main_context_acquire(main_context)){ gboolean got_ownership = FALSE; g_mutex_lock(&(gui_thread->mutex)); while(!got_ownership){ got_ownership = g_main_context_wait(main_context, &(gui_thread->cond), &(gui_thread->mutex)); } g_mutex_unlock(&(gui_thread->mutex)); } ags_gui_thread_enter(); do_sync = FALSE; if(gui_thread->queued_sync > 0){ do_sync = TRUE; pthread_mutex_lock(task_thread->sync_mutex); g_atomic_int_and(&(task_thread->flags), (~AGS_TASK_THREAD_SYNC_WAIT)); if((AGS_TASK_THREAD_SYNC_DONE & (g_atomic_int_get(&(task_thread->flags)))) == 0){ pthread_cond_signal(task_thread->sync_cond); } pthread_mutex_unlock(task_thread->sync_mutex); }else{ pthread_mutex_lock(task_thread->sync_mutex); g_atomic_int_and(&(task_thread->flags), (~(AGS_TASK_THREAD_EXTERN_SYNC | AGS_TASK_THREAD_EXTERN_READY))); g_atomic_int_and(&(task_thread->flags), (~AGS_TASK_THREAD_SYNC_WAIT)); if((AGS_TASK_THREAD_SYNC_DONE & (g_atomic_int_get(&(task_thread->flags)))) == 0){ do_sync = TRUE; pthread_cond_signal(task_thread->sync_cond); } pthread_mutex_unlock(task_thread->sync_mutex); } /* wait */ if(do_sync){ pthread_mutex_lock(task_thread->extern_sync_mutex); g_atomic_int_and(&(task_thread->flags), (~AGS_TASK_THREAD_EXTERN_SYNC_DONE)); if((AGS_TASK_THREAD_EXTERN_SYNC_WAIT & (g_atomic_int_get(&(task_thread->flags)))) != 0 && (AGS_TASK_THREAD_EXTERN_SYNC_DONE & (g_atomic_int_get(&(task_thread->flags)))) == 0){ while((AGS_TASK_THREAD_EXTERN_SYNC_WAIT & (g_atomic_int_get(&(task_thread->flags)))) != 0 && (AGS_TASK_THREAD_EXTERN_SYNC_DONE & (g_atomic_int_get(&(task_thread->flags)))) == 0){ pthread_cond_wait(task_thread->extern_sync_cond, task_thread->extern_sync_mutex); } } g_atomic_int_or(&(task_thread->flags), (AGS_TASK_THREAD_EXTERN_SYNC_WAIT | AGS_TASK_THREAD_EXTERN_SYNC_DONE)); pthread_mutex_unlock(task_thread->extern_sync_mutex); } ags_gui_thread_leave(); g_main_context_release(main_context); return(G_SOURCE_CONTINUE); } gboolean ags_gui_thread_task_prepare(GSource *source, gint *timeout_) { AgsApplicationContext *application_context; AgsGuiThread *gui_thread; AgsThread *main_loop; application_context = ags_application_context_get_instance(); main_loop = application_context->main_loop; gui_thread = ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); if(timeout_ != NULL){ *timeout_ = 0; } if(gui_thread->collected_task != NULL){ return(TRUE); }else{ return(FALSE); } } gboolean ags_gui_thread_task_check(GSource *source) { AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); gui_thread = ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); if(gui_thread != NULL && gui_thread->collected_task != NULL){ return(TRUE); }else{ return(FALSE); } } gboolean ags_gui_thread_task_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) { AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); task_thread = ags_concurrency_provider_get_task_thread(AGS_CONCURRENCY_PROVIDER(application_context)); gui_thread = ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); if(gui_thread != NULL){ ags_task_thread_append_tasks(task_thread, g_list_reverse(gui_thread->collected_task)); gui_thread->collected_task = NULL; ags_gui_thread_complete_task(gui_thread); } return(G_SOURCE_CONTINUE); } gboolean ags_gui_thread_do_animation_callback(GtkWidget *widget, GdkEventExpose *event, AgsGuiThread *gui_thread) { AgsApplicationContext *application_context; AgsLog *log; GdkRectangle rectangle; cairo_t *i_cr, *cr; static cairo_surface_t *surface; static gchar *filename = NULL; /* create a buffer suitable to image size */ GList *list, *start; static unsigned char *image_data, *bg_data; static guint image_size; gdouble x0, y0; guint i; guint nth = 0; application_context = ags_application_context_get_instance(); if(!ags_ui_provider_get_show_animation(AGS_UI_PROVIDER(application_context))){ return(TRUE); } log = ags_log_get_instance(); if(filename == NULL){ /* create gdk cairo graphics context */ #ifdef AGS_ANIMATION_FILENAME filename = g_strdup(AGS_ANIMATION_FILENAME); #else if((filename = getenv("AGS_ANIMATION_FILENAME")) == NULL){ filename = g_strdup_printf("%s%s", DESTDIR, "/gsequencer/images/ags_supermoon-800x450.png"); }else{ filename = g_strdup(filename); } #endif /* create surface and get image data */ surface = cairo_image_surface_create_from_png(filename); cairo_surface_reference(surface); image_data = cairo_image_surface_get_data(surface); image_size = 3 * 800 * 600; bg_data = (unsigned char *) malloc(image_size * sizeof(unsigned char)); } cr = gdk_cairo_create(widget->window); start = list = ags_log_get_messages(log); pthread_mutex_lock(log->mutex); i = g_list_length(start); pthread_mutex_unlock(log->mutex); x0 = 4.0; y0 = 4.0 + (i * 12.0); nth = gui_thread->nth_message; // ags_gui_thread_enter(); if(nth < i){ /* create image cairo graphics context */ i_cr = cairo_create(surface); cairo_select_font_face(i_cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(i_cr, (gdouble) 11.0); /* show ... */ cairo_move_to(i_cr, x0, 4.0 + (i + 1) * 12.0); cairo_show_text(i_cr, "..."); /* show all text */ while(i >= 0 && i > nth && list != NULL){ cairo_set_source_rgb(i_cr, 1.0, 0.0, 1.0); cairo_move_to(i_cr, x0, y0); pthread_mutex_lock(log->mutex); cairo_show_text(i_cr, list->data); cairo_stroke(i_cr); list = list->next; pthread_mutex_unlock(log->mutex); y0 -= 12.0; i--; } nth = g_list_length(start); gui_thread->nth_message = nth; if((image_data = cairo_image_surface_get_data(surface)) != NULL){ memcpy(bg_data, image_data, image_size * sizeof(unsigned char)); } cairo_destroy(i_cr); cairo_set_source_surface(cr, surface, 0, 0); cairo_paint(cr); cairo_destroy(cr); }else{ /* create image cairo graphics context */ i_cr = cairo_create(surface); if((image_data = cairo_image_surface_get_data(surface)) != NULL){ memcpy(image_data, bg_data, image_size * sizeof(unsigned char)); } cairo_destroy(i_cr); cairo_set_source_surface(cr, surface, 0, 0); // cairo_surface_mark_dirty(surface); cairo_paint(cr); cairo_destroy(cr); } // ags_gui_thread_leave(); return(TRUE); } void ags_gui_thread_do_animation(AgsGuiThread *gui_thread) { AgsApplicationContext *application_context; GtkWindow *window; GtkWidget *widget; GMainContext *main_context; application_context = ags_application_context_get_instance(); main_context = g_main_context_default(); window = g_object_new(GTK_TYPE_WINDOW, "app-paintable", TRUE, "type", GTK_WINDOW_TOPLEVEL, "decorated", FALSE, "window-position", GTK_WIN_POS_CENTER, NULL); gtk_widget_set_size_request(window, 800, 450); widget = gtk_drawing_area_new(); gtk_container_add(window, widget); gtk_widget_show_all((GtkWidget *) window); g_signal_connect(widget, "expose-event", G_CALLBACK(ags_gui_thread_do_animation_callback), gui_thread); /* iterate log messages */ while(ags_ui_provider_get_show_animation(AGS_UI_PROVIDER(application_context))){ gtk_widget_queue_draw(widget); gdk_threads_enter(); g_main_context_iteration(main_context, FALSE); gdk_threads_leave(); //gdk_flush(); usleep(12500); } gtk_widget_destroy(window); } void ags_gui_thread_do_run(AgsGuiThread *gui_thread) { AgsApplicationContext *application_context; AgsThread *thread; AgsTaskThread *task_thread; GMainContext *main_context; GSourceFuncs animation_funcs; GSourceFuncs task_funcs; GSourceFuncs sync_funcs; struct timespec idle = { 0, 4000000, }; application_context = ags_application_context_get_instance(); thread = (AgsThread *) gui_thread; g_atomic_int_or(&(gui_thread->flags), AGS_GUI_THREAD_RUNNING); task_thread = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->task_thread; main_context = gui_thread->main_context; pthread_once(&ags_gui_thread_sigact_key_once, ags_gui_thread_sigact_create); ags_gui_thread_get_sigact()->sa_handler = ags_gui_thread_signal_handler; sigemptyset(&(ags_gui_thread_get_sigact()->sa_mask)); ags_gui_thread_get_sigact()->sa_flags = 0; sigaction(SIGIO, ags_gui_thread_get_sigact(), (struct sigaction *) NULL); /* notify start */ pthread_mutex_lock(thread->start_mutex); g_atomic_int_set(&(thread->start_done), TRUE); if(g_atomic_int_get(&(thread->start_wait)) == TRUE){ pthread_cond_broadcast(thread->start_cond); } pthread_mutex_unlock(thread->start_mutex); /* push default thread */ if(!g_main_context_acquire(main_context)){ gboolean got_ownership = FALSE; g_mutex_lock(&(gui_thread->mutex)); while(!got_ownership){ got_ownership = g_main_context_wait(main_context, &(gui_thread->cond), &(gui_thread->mutex)); } g_mutex_unlock(&(gui_thread->mutex)); } g_main_context_push_thread_default(main_context); /* animation functions */ animation_funcs.prepare = ags_gui_thread_animation_prepare; animation_funcs.check = ags_gui_thread_animation_check; animation_funcs.dispatch = ags_gui_thread_animation_dispatch; animation_funcs.finalize = NULL; gui_thread->animation_source = g_source_new(&animation_funcs, sizeof(GSource)); g_source_attach(gui_thread->animation_source, main_context); /* task functions */ task_funcs.prepare = ags_gui_thread_task_prepare; task_funcs.check = ags_gui_thread_task_check; task_funcs.dispatch = ags_gui_thread_task_dispatch; task_funcs.finalize = NULL; gui_thread->task_source = g_source_new(&task_funcs, sizeof(GSource)); g_source_attach(gui_thread->task_source, main_context); /* sync functions */ #if 0 sync_funcs.prepare = ags_gui_thread_sync_task_prepare; sync_funcs.check = ags_gui_thread_sync_task_check; sync_funcs.dispatch = ags_gui_thread_sync_task_dispatch; sync_funcs.finalize = NULL; gui_thread->sync_source = g_source_new(&sync_funcs, sizeof(GSource)); g_source_attach(gui_thread->sync_source, main_context); #endif /* show animation */ ags_ui_provider_set_gui_ready(AGS_UI_PROVIDER(application_context), TRUE); /* gtk+-2.0 main */ gtk_main(); } void ags_gui_thread_schedule_task(AgsGuiThread *gui_thread, GObject *task) { AgsApplicationContext *application_context; AgsThread *main_loop; AgsTaskThread *task_thread; if(!AGS_IS_GUI_THREAD(gui_thread) || !AGS_IS_TASK(task)){ return; } application_context = ags_application_context_get_instance(); main_loop = application_context->main_loop; task_thread = ags_thread_find_type(main_loop, AGS_TYPE_TASK_THREAD); if(task_thread == NULL){ return; } #if 0 g_atomic_int_or(&(task_thread->flags), (AGS_TASK_THREAD_EXTERN_SYNC | AGS_TASK_THREAD_EXTERN_READY)); gui_thread->queued_sync = 4; #endif pthread_mutex_lock(gui_thread->task_schedule_mutex); gui_thread->collected_task = g_list_prepend(gui_thread->collected_task, task); pthread_mutex_unlock(gui_thread->task_schedule_mutex); } void ags_gui_thread_schedule_task_list(AgsGuiThread *gui_thread, GList *task) { AgsApplicationContext *application_context; AgsThread *main_loop; AgsTaskThread *task_thread; if(!AGS_IS_GUI_THREAD(gui_thread) || task == NULL){ return; } application_context = ags_application_context_get_instance(); main_loop = application_context->main_loop; task_thread = ags_thread_find_type(main_loop, AGS_TYPE_TASK_THREAD); if(task_thread == NULL){ return; } #if 0 g_atomic_int_or(&(task_thread->flags), (AGS_TASK_THREAD_EXTERN_SYNC | AGS_TASK_THREAD_EXTERN_READY)); gui_thread->queued_sync = 4; #endif pthread_mutex_lock(gui_thread->task_schedule_mutex); gui_thread->collected_task = g_list_concat(g_list_reverse(task), gui_thread->collected_task); pthread_mutex_unlock(gui_thread->task_schedule_mutex); } /** * ags_gui_thread_new: * * Create a new #AgsGuiThread. * * Returns: the new #AgsGuiThread * * Since: 1.0.0 */ AgsGuiThread* ags_gui_thread_new() { AgsGuiThread *gui_thread; gui_thread = (AgsGuiThread *) g_object_new(AGS_TYPE_GUI_THREAD, NULL); return(gui_thread); } gsequencer-1.4.24/ags/X/thread/ags_simple_autosave_thread.h0000644000175000017500000000476013246707333020665 00000000000000/* 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 . */ #ifndef __AGS_SIMPLE_AUTOSAVE_THREAD_H__ #define __AGS_SIMPLE_AUTOSAVE_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_SIMPLE_AUTOSAVE_THREAD (ags_simple_autosave_thread_get_type()) #define AGS_SIMPLE_AUTOSAVE_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SIMPLE_AUTOSAVE_THREAD, AgsSimpleAutosaveThread)) #define AGS_SIMPLE_AUTOSAVE_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SIMPLE_AUTOSAVE_THREAD, AgsSimpleAutosaveThreadClass)) #define AGS_IS_SIMPLE_AUTOSAVE_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SIMPLE_AUTOSAVE_THREAD)) #define AGS_IS_SIMPLE_AUTOSAVE_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SIMPLE_AUTOSAVE_THREAD)) #define AGS_SIMPLE_AUTOSAVE_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SIMPLE_AUTOSAVE_THREAD, AgsSimpleAutosaveThreadClass)) #define AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_JIFFIE (1.0) #define AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_DELAY (10) #define AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_FILENAME "ags-autosaved-{PID}.xml\0" typedef struct _AgsSimpleAutosaveThread AgsSimpleAutosaveThread; typedef struct _AgsSimpleAutosaveThreadClass AgsSimpleAutosaveThreadClass; struct _AgsSimpleAutosaveThread { AgsThread thread; GObject *application_context; guint delay; guint counter; gchar *filename; }; struct _AgsSimpleAutosaveThreadClass { AgsThreadClass thread; }; GType ags_simple_autosave_thread_get_type(); AgsSimpleAutosaveThread* ags_simple_autosave_thread_new(GObject *application_context); #endif /*__AGS_SIMPLE_AUTOSAVE_THREAD_H__*/ gsequencer-1.4.24/ags/X/thread/ags_gui_thread.h0000644000175000017500000000775313256163135016253 00000000000000/* 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 . */ #ifndef __AGS_GUI_THREAD_H__ #define __AGS_GUI_THREAD_H__ #include #include #include #include #include #include #include #define AGS_TYPE_GUI_THREAD (ags_gui_thread_get_type()) #define AGS_GUI_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_GUI_THREAD, AgsGuiThread)) #define AGS_GUI_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_GUI_THREAD, AgsGuiThreadClass)) #define AGS_IS_GUI_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_GUI_THREAD)) #define AGS_IS_GUI_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_GUI_THREAD)) #define AGS_GUI_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_GUI_THREAD, AgsGuiThreadClass)) #define AGS_GUI_THREAD_RT_PRIORITY (99) #define AGS_GUI_THREAD_DEFAULT_JIFFIE (60.0) #define AGS_GUI_THREAD_SYNC_DELAY (50000) #define AGS_GUI_THREAD_SYNC_AVAILABLE_TIMEOUT (400) typedef struct _AgsGuiThread AgsGuiThread; typedef struct _AgsGuiThreadClass AgsGuiThreadClass; typedef enum{ AGS_GUI_THREAD_RUNNING = 1, }AgsGuiThreadFlags; struct _AgsGuiThread { AgsThread thread; volatile guint flags; volatile gboolean dispatching; GMutex mutex; GCond cond; GMainContext *main_context; GThread *gtk_thread; gint cached_poll_array_size; GPollFD *cached_poll_array; guint max_priority; GList *poll_fd; pthread_mutex_t *task_completion_mutex; volatile GList *task_completion; pthread_mutex_t *dispatch_mutex; pthread_mutex_t *task_schedule_mutex; guint nth_message; GSource *animation_source; guint queued_sync; GSource *sync_source; GList *collected_task; GSource *task_source; }; struct _AgsGuiThreadClass { AgsThreadClass thread; }; GType ags_gui_thread_get_type(); void ags_gui_thread_complete_task(AgsGuiThread *gui_thread); /* legacy sync and run */ void* ags_gui_thread_do_poll_loop(void *ptr); void ags_gui_thread_run(AgsThread *thread); /* gtk_main() related */ void ags_gui_init(int *argc, char ***argv); void ags_gui_thread_enter(); void ags_gui_thread_leave(); pthread_mutex_t* ags_gui_thread_get_dispatch_mutex(); void ags_gui_thread_show_file_error(AgsGuiThread *gui_thread, gchar *filename, GError *error); void ags_gui_thread_launch(AgsGuiThread *gui_thread, gboolean single_thread); void ags_gui_thread_launch_filename(AgsGuiThread *gui_thread, gchar *filename, gboolean single_thread); void ags_gui_thread_timer_start(AgsGuiThread *gui_thread, void *timer_id); void ags_gui_thread_timer_launch(AgsGuiThread *gui_thread, void *timer_id, gboolean single_thread); void ags_gui_thread_timer_launch_filename(AgsGuiThread *gui_thread, void *timer_id, gchar *filename, gboolean single_thread); void ags_gui_thread_do_animation(AgsGuiThread *gui_thread); void ags_gui_thread_do_run(AgsGuiThread *gui_thread); void ags_gui_thread_schedule_task(AgsGuiThread *gui_thread, GObject *task); void ags_gui_thread_schedule_task_list(AgsGuiThread *gui_thread, GList *task); /* AgsGuiThread */ AgsGuiThread* ags_gui_thread_new(); #endif /*__AGS_GUI_THREAD_H__*/ gsequencer-1.4.24/ags/X/ags_soundcard_editor.c0000644000175000017500000014674113247044247016217 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_soundcard_editor_class_init(AgsSoundcardEditorClass *soundcard_editor); void ags_soundcard_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_soundcard_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_soundcard_editor_init(AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_connect(AgsConnectable *connectable); void ags_soundcard_editor_disconnect(AgsConnectable *connectable); void ags_soundcard_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_soundcard_editor_apply(AgsApplicable *applicable); void ags_soundcard_editor_reset(AgsApplicable *applicable); static void ags_soundcard_editor_finalize(GObject *gobject); /** * SECTION:ags_soundcard_editor * @short_description: A composite widget to configure soundcard * @title: AgsSoundcardEditor * @section_id: * @include: ags/X/ags_soundcard_editor.h * * #AgsSoundcardEditor enables you to make preferences of soundcard, audio channels, * samplerate and buffer size. */ static gpointer ags_soundcard_editor_parent_class = NULL; GType ags_soundcard_editor_get_type(void) { static GType ags_type_soundcard_editor = 0; if(!ags_type_soundcard_editor){ static const GTypeInfo ags_soundcard_editor_info = { sizeof (AgsSoundcardEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_soundcard_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSoundcardEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_soundcard_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_soundcard_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_soundcard_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_soundcard_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsSoundcardEditor", &ags_soundcard_editor_info, 0); g_type_add_interface_static(ags_type_soundcard_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_soundcard_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_soundcard_editor); } void ags_soundcard_editor_class_init(AgsSoundcardEditorClass *soundcard_editor) { GObjectClass *gobject; GtkWidgetClass *widget; ags_soundcard_editor_parent_class = g_type_class_peek_parent(soundcard_editor); /* GtkObjectClass */ gobject = (GObjectClass *) soundcard_editor; gobject->finalize = ags_soundcard_editor_finalize; } void ags_soundcard_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_soundcard_editor_connect; connectable->disconnect = ags_soundcard_editor_disconnect; } void ags_soundcard_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_soundcard_editor_set_update; applicable->apply = ags_soundcard_editor_apply; applicable->reset = ags_soundcard_editor_reset; } void ags_soundcard_editor_init(AgsSoundcardEditor *soundcard_editor) { GtkTable *table; GtkLabel *label; soundcard_editor->flags = 0; soundcard_editor->soundcard = NULL; soundcard_editor->soundcard_thread = NULL; table = (GtkTable *) gtk_table_new(3, 8, FALSE); gtk_box_pack_start(GTK_BOX(soundcard_editor), GTK_WIDGET(table), FALSE, FALSE, 2); /* backend */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("backend"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); soundcard_editor->backend = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(soundcard_editor->backend), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); #ifdef AGS_WITH_CORE_AUDIO gtk_combo_box_text_append_text(soundcard_editor->backend, "core-audio"); #endif #ifdef AGS_WITH_PULSE gtk_combo_box_text_append_text(soundcard_editor->backend, "pulse"); #endif #ifdef AGS_WITH_JACK gtk_combo_box_text_append_text(soundcard_editor->backend, "jack"); #endif #ifdef AGS_WITH_ALSA gtk_combo_box_text_append_text(soundcard_editor->backend, "alsa"); #endif #ifdef AGS_WITH_OSS gtk_combo_box_text_append_text(soundcard_editor->backend, "oss"); #endif gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->backend), 0); /* sound card */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("soundcard"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); soundcard_editor->card = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(soundcard_editor->card), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* sink */ soundcard_editor->sink_hbox = NULL; soundcard_editor->add_sink = NULL; soundcard_editor->remove_sink = NULL; soundcard_editor->sink_hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(soundcard_editor->sink_hbox), 2, 3, 1, 2, GTK_FILL, GTK_FILL, 0, 0); soundcard_editor->add_sink = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start((GtkBox *) soundcard_editor->sink_hbox, (GtkWidget *) soundcard_editor->add_sink, FALSE, FALSE, 0); soundcard_editor->remove_sink = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_box_pack_start((GtkBox *) soundcard_editor->sink_hbox, (GtkWidget *) soundcard_editor->remove_sink, FALSE, FALSE, 0); /* audio channels */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("audio channels"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); soundcard_editor->audio_channels = (GtkSpinButton *) gtk_spin_button_new_with_range(1.0, 24.0, 1.0); gtk_spin_button_set_value(soundcard_editor->audio_channels, 2); gtk_table_attach(table, GTK_WIDGET(soundcard_editor->audio_channels), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* samplerate */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("samplerate"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0); soundcard_editor->samplerate = (GtkSpinButton *) gtk_spin_button_new_with_range(1.0, 192000.0, 1.0); gtk_spin_button_set_value(soundcard_editor->samplerate, 44100); gtk_table_attach(table, GTK_WIDGET(soundcard_editor->samplerate), 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); /* buffer size */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("buffer size"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0); soundcard_editor->buffer_size = (GtkSpinButton *) gtk_spin_button_new_with_range(1.0, 65535.0, 1.0); gtk_spin_button_set_value(soundcard_editor->buffer_size, 512); gtk_table_attach(table, GTK_WIDGET(soundcard_editor->buffer_size), 1, 2, 4, 5, GTK_FILL, GTK_FILL, 0, 0); /* format */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("format"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 5, 6, GTK_FILL, GTK_FILL, 0, 0); soundcard_editor->format = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(soundcard_editor->format), 1, 2, 5, 6, GTK_FILL, GTK_FILL, 0, 0); gtk_combo_box_text_append_text(soundcard_editor->format, "8"); gtk_combo_box_text_append_text(soundcard_editor->format, "16"); gtk_combo_box_text_append_text(soundcard_editor->format, "24"); gtk_combo_box_text_append_text(soundcard_editor->format, "32"); gtk_combo_box_text_append_text(soundcard_editor->format, "64"); gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->format), 1); /* */ // soundcard_editor->remove = NULL; soundcard_editor->remove = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_table_attach(table, GTK_WIDGET(soundcard_editor->remove), 2, 3, 7, 8, GTK_FILL, GTK_FILL, 0, 0); } void ags_soundcard_editor_connect(AgsConnectable *connectable) { AgsSoundcardEditor *soundcard_editor; soundcard_editor = AGS_SOUNDCARD_EDITOR(connectable); if((AGS_SOUNDCARD_EDITOR_CONNECTED & (soundcard_editor->flags)) != 0){ return; } soundcard_editor->flags |= AGS_SOUNDCARD_EDITOR_CONNECTED; /* backend and card */ g_signal_connect(G_OBJECT(soundcard_editor->backend), "changed", G_CALLBACK(ags_soundcard_editor_backend_changed_callback), soundcard_editor); g_signal_connect(G_OBJECT(soundcard_editor->card), "changed", G_CALLBACK(ags_soundcard_editor_card_changed_callback), soundcard_editor); /* add / remove sink */ g_signal_connect(G_OBJECT(soundcard_editor->add_sink), "clicked", G_CALLBACK(ags_soundcard_editor_add_sink_callback), soundcard_editor); g_signal_connect(G_OBJECT(soundcard_editor->remove_sink), "clicked", G_CALLBACK(ags_soundcard_editor_remove_sink_callback), soundcard_editor); /* presets */ g_signal_connect(G_OBJECT(soundcard_editor->audio_channels), "changed", G_CALLBACK(ags_soundcard_editor_audio_channels_changed_callback), soundcard_editor); g_signal_connect(G_OBJECT(soundcard_editor->samplerate), "changed", G_CALLBACK(ags_soundcard_editor_samplerate_changed_callback), soundcard_editor); g_signal_connect(G_OBJECT(soundcard_editor->buffer_size), "changed", G_CALLBACK(ags_soundcard_editor_buffer_size_changed_callback), soundcard_editor); g_signal_connect(G_OBJECT(soundcard_editor->format), "changed", G_CALLBACK(ags_soundcard_editor_format_changed_callback), soundcard_editor); } void ags_soundcard_editor_disconnect(AgsConnectable *connectable) { AgsSoundcardEditor *soundcard_editor; soundcard_editor = AGS_SOUNDCARD_EDITOR(connectable); if((AGS_SOUNDCARD_EDITOR_CONNECTED & (soundcard_editor->flags)) == 0){ return; } soundcard_editor->flags &= (~AGS_SOUNDCARD_EDITOR_CONNECTED); /* backend and card */ g_object_disconnect(G_OBJECT(soundcard_editor->backend), "any_signal::changed", G_CALLBACK(ags_soundcard_editor_backend_changed_callback), soundcard_editor, NULL); g_object_disconnect(G_OBJECT(soundcard_editor->card), "any_signal::changed", G_CALLBACK(ags_soundcard_editor_card_changed_callback), soundcard_editor, NULL); /* add / remove sink */ g_object_disconnect(G_OBJECT(soundcard_editor->add_sink), "any_signal::clicked", G_CALLBACK(ags_soundcard_editor_add_sink_callback), soundcard_editor, NULL); g_object_disconnect(G_OBJECT(soundcard_editor->remove_sink), "any_signal::clicked", G_CALLBACK(ags_soundcard_editor_remove_sink_callback), soundcard_editor, NULL); /* presets */ g_object_disconnect(G_OBJECT(soundcard_editor->audio_channels), "any_signal::changed", G_CALLBACK(ags_soundcard_editor_audio_channels_changed_callback), soundcard_editor, NULL); g_object_disconnect(G_OBJECT(soundcard_editor->samplerate), "any_signal::changed", G_CALLBACK(ags_soundcard_editor_samplerate_changed_callback), soundcard_editor, NULL); g_object_disconnect(G_OBJECT(soundcard_editor->buffer_size), "any_signal::changed", G_CALLBACK(ags_soundcard_editor_buffer_size_changed_callback), soundcard_editor, NULL); g_object_disconnect(G_OBJECT(soundcard_editor->format), "any_signal::changed", G_CALLBACK(ags_soundcard_editor_format_changed_callback), soundcard_editor, NULL); } static void ags_soundcard_editor_finalize(GObject *gobject) { //TODO:JK: implement me G_OBJECT_CLASS(ags_soundcard_editor_parent_class)->finalize(gobject); } void ags_soundcard_editor_set_update(AgsApplicable *applicable, gboolean update) { //TODO:JK: implement me } void ags_soundcard_editor_apply(AgsApplicable *applicable) { AgsAudioPreferences *audio_preferences; AgsSoundcardEditor *soundcard_editor; GtkListStore *model; GtkTreeIter current; AgsConfig *config; GList *tasks; GList *list; gchar *soundcard_group; gchar *backend; char *device, *str; gint nth; guint channels; guint samplerate; guint buffer_size; guint format; gboolean use_core_audio, use_pulse, use_jack, use_alsa, use_oss; GValue value = {0,}; pthread_mutex_t *application_mutex; soundcard_editor = AGS_SOUNDCARD_EDITOR(applicable); audio_preferences = (AgsAudioPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_AUDIO_PREFERENCES); config = ags_config_get_instance(); list = gtk_container_get_children((GtkContainer *) audio_preferences->soundcard_editor); nth = g_list_index(list, soundcard_editor); if(nth < 0){ return; } soundcard_group = g_strdup_printf("%s-%d", AGS_CONFIG_SOUNDCARD, nth); g_list_free(list); /* backend */ #ifdef AGS_WITH_CORE_AUDIO use_core_audio = TRUE; #else use_pulse = TRUE; #endif use_jack = FALSE; use_alsa = FALSE; use_oss = FALSE; backend = gtk_combo_box_text_get_active_text(soundcard_editor->backend); ags_config_set_value(config, soundcard_group, "backend", backend); if(backend != NULL){ if(!g_ascii_strncasecmp(backend, "core-audio", 11)){ use_pulse = TRUE; }else if(!g_ascii_strncasecmp(backend, "pulse", 6)){ use_pulse = TRUE; }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ use_jack = TRUE; }else if(!g_ascii_strncasecmp(backend, "alsa", 5)){ use_alsa = TRUE; }else if(!g_ascii_strncasecmp(backend, "oss", 4)){ use_oss = TRUE; } } /* buffer size */ buffer_size = gtk_spin_button_get_value(soundcard_editor->buffer_size); str = g_strdup_printf("%u", buffer_size); ags_config_set_value(config, soundcard_group, "buffer-size", str); g_free(str); /* pcm channels */ channels = gtk_spin_button_get_value(soundcard_editor->audio_channels); str = g_strdup_printf("%u", channels); ags_config_set_value(config, soundcard_group, "pcm-channels", str); g_free(str); /* format */ format = 0; switch(gtk_combo_box_get_active(GTK_COMBO_BOX(soundcard_editor->format))){ case 0: format = AGS_SOUNDCARD_SIGNED_8_BIT; break; case 1: format = AGS_SOUNDCARD_SIGNED_16_BIT; break; case 2: format = AGS_SOUNDCARD_SIGNED_24_BIT; break; case 3: format = AGS_SOUNDCARD_SIGNED_32_BIT; break; case 4: format = AGS_SOUNDCARD_SIGNED_64_BIT; break; } str = g_strdup_printf("%u", format); ags_config_set_value(config, soundcard_group, "format", str); g_free(str); /* samplerate */ samplerate = gtk_spin_button_get_value(soundcard_editor->samplerate); str = g_strdup_printf("%u", samplerate); ags_config_set_value(config, soundcard_group, "samplerate", str); g_free(str); /* device */ model = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(soundcard_editor->card))); if(gtk_combo_box_get_active_iter(GTK_COMBO_BOX(soundcard_editor->card), ¤t)){ gtk_tree_model_get_value(model, ¤t, 0, &value); device = g_value_get_string(&value); }else{ device = NULL; } /* handle */ g_message("%s", device); if(use_core_audio){ ags_config_set_value(config, soundcard_group, "device", device); }else if(use_pulse){ ags_config_set_value(config, soundcard_group, "device", device); }else if(use_jack){ ags_config_set_value(config, soundcard_group, "device", device); }else if(use_alsa){ ags_config_set_value(config, soundcard_group, "device", device); }else if(use_oss){ ags_config_set_value(config, soundcard_group, "device", device); } } void ags_soundcard_editor_reset(AgsApplicable *applicable) { AgsWindow *window; AgsPreferences *preferences; AgsSoundcardEditor *soundcard_editor; GObject *soundcard; GList *card_id, *card_id_start, *card_name, *card_name_start; gchar *backend, *device, *str, *tmp; guint nth; guint channels, channels_min, channels_max; guint samplerate, samplerate_min, samplerate_max; guint buffer_size, buffer_size_min, buffer_size_max; guint format; gboolean use_alsa; gboolean found_card; GError *error; soundcard_editor = AGS_SOUNDCARD_EDITOR(applicable); if((AGS_SOUNDCARD_EDITOR_BLOCK_RESET & (soundcard_editor->flags)) != 0){ return; } soundcard_editor->flags |= AGS_SOUNDCARD_EDITOR_BLOCK_RESET; soundcard = soundcard_editor->soundcard; /* refresh */ use_alsa = FALSE; backend = NULL; if(AGS_IS_CORE_AUDIO_DEVOUT(soundcard)){ backend = "core-audio"; }else if(AGS_IS_PULSE_DEVOUT(soundcard)){ backend = "pulse"; }else if(AGS_IS_JACK_DEVOUT(soundcard)){ backend = "jack"; }else if(AGS_IS_DEVOUT(soundcard)){ if((AGS_DEVOUT_ALSA & (AGS_DEVOUT(soundcard)->flags)) != 0){ backend = "alsa"; }else if((AGS_DEVOUT_OSS & (AGS_DEVOUT(soundcard)->flags)) != 0){ backend = "oss"; } } if(backend != NULL){ if(!g_ascii_strncasecmp(backend, "core-audio", 11)){ gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->backend), 0); // ags_soundcard_editor_load_core_audio_card(soundcard_editor); }else if(!g_ascii_strncasecmp(backend, "pulse", 6)){ gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->backend), 0); // ags_soundcard_editor_load_pulse_card(soundcard_editor); }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->backend), 1); // ags_soundcard_editor_load_jack_card(soundcard_editor); }else if(!g_ascii_strncasecmp(backend, "alsa", 5)){ use_alsa = TRUE; #ifdef AGS_WITH_ALSA gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->backend), 2); #endif // ags_soundcard_editor_load_alsa_card(soundcard_editor); }else if(!g_ascii_strncasecmp(backend, "oss", 4)){ #ifdef AGS_WITH_OSS #ifdef AGS_WITH_ALSA gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->backend), 3); #else gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->backend), 2); #endif #else gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->backend), -1); #endif // ags_soundcard_editor_load_oss_card(soundcard_editor); } } /* */ device = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard)); card_id = NULL; card_name = NULL; ags_soundcard_list_cards(AGS_SOUNDCARD(soundcard), &card_id_start, &card_name_start); card_id = card_id_start; card_name = card_name_start; nth = 0; found_card = FALSE; gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(soundcard_editor->card)))); while(card_id != NULL){ //FIXME:JK: work-around for alsa-handle tmp = card_id->data; if(tmp != NULL && device != NULL && !g_ascii_strcasecmp(tmp, device)){ found_card = TRUE; } if(tmp != NULL){ gtk_combo_box_text_append_text(soundcard_editor->card, tmp); } if(!found_card){ nth++; } card_id = card_id->next; card_name = card_name->next; } if(!found_card){ nth = 0; } gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->card), nth); if(card_id_start != NULL){ g_list_free_full(card_id_start, g_free); g_list_free_full(card_name_start, g_free); } /* */ ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), &channels, &samplerate, &buffer_size, &format); /* */ gtk_spin_button_set_value(soundcard_editor->audio_channels, (gdouble) channels); gtk_spin_button_set_value(soundcard_editor->samplerate, (gdouble) samplerate); gtk_spin_button_set_value(soundcard_editor->buffer_size, (gdouble) buffer_size); switch(format){ case AGS_SOUNDCARD_SIGNED_8_BIT: gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->format), 0); break; case AGS_SOUNDCARD_SIGNED_16_BIT: gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->format), 1); break; case AGS_SOUNDCARD_SIGNED_24_BIT: gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->format), 2); break; case AGS_SOUNDCARD_SIGNED_32_BIT: gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->format), 3); break; case AGS_SOUNDCARD_SIGNED_64_BIT: gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->format), 4); break; } /* */ if(device != NULL && soundcard != NULL){ error = NULL; ags_soundcard_pcm_info(AGS_SOUNDCARD(soundcard), device, &channels_min, &channels_max, &samplerate_min, &samplerate_max, &buffer_size_min, &buffer_size_max, &error); if(error != NULL){ channels_min = 0.0; channels_max = 24.0; samplerate_min = 8000.0; samplerate_max = 192000.0; buffer_size_min = 2.0; buffer_size_max = 65535.0; } }else{ channels_min = 0.0; channels_max = 24.0; samplerate_min = 8000.0; samplerate_max = 192000.0; buffer_size_min = 2.0; buffer_size_max = 65535.0; } gtk_spin_button_set_range(soundcard_editor->audio_channels, channels_min, channels_max); gtk_spin_button_set_range(soundcard_editor->samplerate, samplerate_min, samplerate_max); gtk_spin_button_set_range(soundcard_editor->buffer_size, buffer_size_min, buffer_size_max); soundcard_editor->flags &= (~AGS_SOUNDCARD_EDITOR_BLOCK_RESET); } void ags_soundcard_editor_add_sink(AgsSoundcardEditor *soundcard_editor, gchar *device) { AgsWindow *window; AgsPreferences *preferences; AgsPulseServer *pulse_server; AgsPulseDevout *pulse_devout; AgsJackServer *jack_server; AgsJackDevout *jack_devout; AgsCoreAudioServer *core_audio_server; AgsCoreAudioDevout *core_audio_devout; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsThread *soundcard_thread; AgsThread *export_thread; AgsApplicationContext *application_context; GObject *soundcard; GType server_type; GList *distributed_manager; GList *card_name, *card_uri; gchar *backend; gboolean use_core_audio, use_pulse, use_jack; gboolean initial_soundcard; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; mutex_manager = ags_mutex_manager_get_instance(); core_audio_server = NULL; core_audio_devout = NULL; pulse_server = NULL; pulse_devout = NULL; jack_server = NULL; jack_devout = NULL; soundcard = NULL; server_type = G_TYPE_NONE; backend = NULL; use_core_audio = FALSE; use_pulse = FALSE; use_jack = FALSE; initial_soundcard = FALSE; /* determine backend */ backend = gtk_combo_box_text_get_active_text(soundcard_editor->backend); if(backend != NULL){ if(!g_ascii_strncasecmp(backend, "core-audio", 11)){ server_type = AGS_TYPE_CORE_AUDIO_SERVER; use_core_audio = TRUE; }else if(!g_ascii_strncasecmp(backend, "pulse", 6)){ server_type = AGS_TYPE_PULSE_SERVER; use_pulse = TRUE; }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ server_type = AGS_TYPE_JACK_SERVER; use_jack = TRUE; } } /* create soundcard */ pthread_mutex_lock(application_mutex); distributed_manager = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if((distributed_manager = ags_list_util_find_type(distributed_manager, server_type)) != NULL){ if(use_core_audio){ core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager->data); soundcard = core_audio_devout = (AgsCoreAudioDevout *) ags_distributed_manager_register_soundcard(AGS_DISTRIBUTED_MANAGER(core_audio_server), TRUE); }else if(use_pulse){ pulse_server = AGS_PULSE_SERVER(distributed_manager->data); soundcard = pulse_devout = (AgsPulseDevout *) ags_distributed_manager_register_soundcard(AGS_DISTRIBUTED_MANAGER(pulse_server), TRUE); }else if(use_jack){ jack_server = AGS_JACK_SERVER(distributed_manager->data); soundcard = jack_devout = (AgsJackDevout *) ags_distributed_manager_register_soundcard(AGS_DISTRIBUTED_MANAGER(jack_server), TRUE); } }else{ g_warning("distributed manager not found"); pthread_mutex_unlock(application_mutex); return; } pthread_mutex_unlock(application_mutex); if(soundcard == NULL){ return; } pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); /* add new */ main_loop = (AgsThread *) application_context->main_loop; if(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)) == NULL){ initial_soundcard = TRUE; } soundcard_editor->soundcard = soundcard; ags_sound_provider_set_soundcard(AGS_SOUND_PROVIDER(application_context), g_list_append(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)), soundcard)); /* add AgsAudio to AgsSoundcard */ if(initial_soundcard){ GList *machine, *machine_start; GList *list; machine = machine_start = gtk_container_get_children(window->machines); while(machine != NULL){ g_object_ref(G_OBJECT(AGS_MACHINE(machine->data)->audio)); list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); list = g_list_prepend(list, AGS_MACHINE(machine->data)->audio); ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), list); machine = machine->next; } g_list_free(machine_start); } pthread_mutex_unlock(application_mutex); g_object_ref(soundcard); soundcard_thread = (AgsThread *) ags_soundcard_thread_new(soundcard); soundcard_editor->soundcard_thread = (GObject *) soundcard_thread; ags_thread_add_child_extended(main_loop, soundcard_thread, TRUE, TRUE); /* notify soundcard */ notify_soundcard = ags_notify_soundcard_new(soundcard_thread); AGS_TASK(notify_soundcard)->task_thread = application_context->task_thread; if(use_core_audio){ core_audio_devout->notify_soundcard = notify_soundcard; }else if(use_pulse){ pulse_devout->notify_soundcard = notify_soundcard; }else if(use_jack){ jack_devout->notify_soundcard = notify_soundcard; } ags_task_thread_append_cyclic_task(application_context->task_thread, notify_soundcard); if(ags_sound_provider_get_default_soundcard_thread(AGS_SOUND_PROVIDER(application_context)) == NULL){ ags_sound_provider_set_default_soundcard_thread(AGS_SOUND_PROVIDER(application_context), (GObject *) soundcard_thread); } /* export thread */ export_thread = (AgsThread *) ags_export_thread_new(soundcard, NULL); ags_thread_add_child_extended(main_loop, (AgsThread *) export_thread, TRUE, TRUE); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(mutex); card_name = NULL; card_uri = NULL; ags_soundcard_list_cards(AGS_SOUNDCARD(soundcard), &card_uri, &card_name); pthread_mutex_unlock(mutex); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(soundcard_editor->card)))); while(card_uri != NULL){ if(card_uri->data != NULL){ gtk_combo_box_text_append_text(soundcard_editor->card, card_uri->data); } card_uri = card_uri->next; } } void ags_soundcard_editor_remove_sink(AgsSoundcardEditor *soundcard_editor, gchar *device) { AgsWindow *window; AgsPreferences *preferences; GtkDialog *dialog; AgsCoreAudioServer *core_audio_server; AgsCoreAudioDevout *core_audio_devout; AgsPulseServer *pulse_server; AgsPulseDevout *pulse_devout; AgsJackServer *jack_server; AgsJackDevout *jack_devout; AgsApplicationContext *application_context; AgsThread *main_loop; GObject *server; GObject *soundcard; GType server_type; GList *machine, *machine_start; GList *distributed_manager; GList *list; GList *card_id; gchar *backend; gboolean use_core_audio, use_pulse, use_jack; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; core_audio_server = NULL; core_audio_devout = NULL; pulse_server = NULL; pulse_devout = NULL; jack_server = NULL; jack_devout = NULL; server = NULL; soundcard = NULL; server_type = G_TYPE_NONE; backend = NULL; use_core_audio = FALSE; use_pulse = FALSE; use_jack = FALSE; /* determine backend */ backend = gtk_combo_box_text_get_active_text(soundcard_editor->backend); if(backend != NULL){ if(!g_ascii_strncasecmp(backend, "core-audio", 6)){ server_type = AGS_TYPE_CORE_AUDIO_SERVER; use_core_audio = TRUE; }else if(!g_ascii_strncasecmp(backend, "pulse", 6)){ server_type = AGS_TYPE_PULSE_SERVER; use_pulse = TRUE; }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ server_type = AGS_TYPE_JACK_SERVER; use_jack = TRUE; } } /* destroy soundcard */ pthread_mutex_lock(application_mutex); main_loop = application_context->main_loop; distributed_manager = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if((distributed_manager = ags_list_util_find_type(distributed_manager, server_type)) != NULL){ if(use_core_audio){ server = core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager->data); }else if(use_pulse){ server = pulse_server = AGS_PULSE_SERVER(distributed_manager->data); }else if(use_jack){ server = jack_server = AGS_JACK_SERVER(distributed_manager->data); } }else{ g_warning("distributed manager not found"); pthread_mutex_unlock(application_mutex); return; } list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(use_core_audio){ if(AGS_IS_CORE_AUDIO_DEVOUT(list->data) && !g_ascii_strcasecmp(ags_soundcard_get_device(AGS_SOUNDCARD(list->data)), device)){ soundcard = core_audio_devout = list->data; break; } }else if(use_pulse){ if(AGS_IS_PULSE_DEVOUT(list->data) && !g_ascii_strcasecmp(ags_soundcard_get_device(AGS_SOUNDCARD(list->data)), device)){ soundcard = pulse_devout = list->data; break; } }else if(use_jack){ if(AGS_IS_JACK_DEVOUT(list->data) && !g_ascii_strcasecmp(ags_soundcard_get_device(AGS_SOUNDCARD(list->data)), device)){ soundcard = jack_devout = list->data; break; } } list = list->next; } pthread_mutex_unlock(application_mutex); if(soundcard == NULL){ return; } /* remove AgsSoundcard from AgsAudio */ #if 0 machine = machine_start = gtk_container_get_children(window->machines); while(machine != NULL){ if(AGS_MACHINE(machine->data)->audio->soundcard == soundcard){ g_object_set(AGS_MACHINE(machine->data)->audio, "soundcard", NULL, NULL); g_object_unref(G_OBJECT(AGS_MACHINE(machine->data)->audio)); } machine = machine->next; } ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), NULL); g_list_free(machine_start); #endif /* */ gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(soundcard_editor->card)))); gtk_combo_box_set_active(GTK_COMBO_BOX(soundcard_editor->backend), -1); #if 0 if(server != NULL){ ags_distributed_manager_unregister_soundcard(AGS_DISTRIBUTED_MANAGER(server), soundcard); } #endif /* remove */ if(soundcard == soundcard_editor->soundcard){ soundcard_editor->soundcard = NULL; } #if 0 if(soundcard != NULL){ ags_sound_provider_set_soundcard(AGS_SOUND_PROVIDER(application_context), g_list_remove(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)), soundcard)); g_object_unref(soundcard); } if(soundcard_editor->soundcard_thread != NULL){ ags_thread_stop((AgsThread *) soundcard_editor->soundcard_thread); ags_thread_remove_child(main_loop, (AgsThread *) soundcard_editor->soundcard_thread); // g_object_unref(soundcard_editor->soundcard_thread); soundcard_editor->soundcard_thread = NULL; } #endif /* notify user about restarting GSequencer */ dialog = gtk_message_dialog_new(preferences, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "After finished your modifications you should safe your file and restart GSequencer"); g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show_all(dialog); } void ags_soundcard_editor_add_soundcard(AgsSoundcardEditor *soundcard_editor, GObject *soundcard) { AgsWindow *window; AgsPreferences *preferences; AgsNotifySoundcard *notify_soundcard; AgsThread *main_loop; AgsThread *soundcard_thread; AgsThread *export_thread; AgsApplicationContext *application_context; gboolean initial_soundcard; pthread_mutex_t *application_mutex; if(soundcard == NULL || AGS_IS_CORE_AUDIO_DEVOUT(soundcard) || AGS_IS_PULSE_DEVOUT(soundcard) || AGS_IS_JACK_DEVOUT(soundcard)){ return; } if((AGS_SOUNDCARD_EDITOR_BLOCK_ADD & (soundcard_editor->flags)) != 0){ return; } soundcard_editor->flags |= AGS_SOUNDCARD_EDITOR_BLOCK_ADD; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; initial_soundcard = FALSE; if(AGS_IS_DEVOUT(soundcard)){ if((AGS_DEVOUT_ALSA & (AGS_DEVOUT(soundcard)->flags)) != 0){ ags_soundcard_set_device(AGS_SOUNDCARD(soundcard), "hw:0,0"); }else if((AGS_DEVOUT_OSS & (AGS_DEVOUT(soundcard)->flags)) != 0){ ags_soundcard_set_device(AGS_SOUNDCARD(soundcard), "/dev/dsp0"); }else{ g_warning("unknown soundcard implementation"); } }else{ g_warning("unknown soundcard implementation"); } /* */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; if(g_list_find(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)), soundcard) != NULL){ pthread_mutex_unlock(application_mutex); soundcard_editor->flags &= (~AGS_SOUNDCARD_EDITOR_BLOCK_ADD); return; } if(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)) == NULL){ initial_soundcard = TRUE; } soundcard_editor->soundcard = soundcard; ags_sound_provider_set_soundcard(AGS_SOUND_PROVIDER(application_context), g_list_append(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)), soundcard)); /* add AgsAudio to AgsSoundcard */ if(initial_soundcard){ GList *machine, *machine_start; GList *list; machine = machine_start = gtk_container_get_children(window->machines); while(machine != NULL){ g_object_ref(G_OBJECT(AGS_MACHINE(machine->data)->audio)); list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); list = g_list_prepend(list, AGS_MACHINE(machine->data)->audio); ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), list); g_object_set(AGS_MACHINE(machine->data)->audio, "soundcard", soundcard, NULL); machine = machine->next; } g_list_free(machine_start); } pthread_mutex_unlock(application_mutex); g_object_ref(soundcard); soundcard_thread = (AgsThread *) ags_soundcard_thread_new(soundcard); soundcard_editor->soundcard_thread = (GObject *) soundcard_thread; ags_thread_add_child_extended(main_loop, soundcard_thread, TRUE, TRUE); /* notify soundcard */ notify_soundcard = ags_notify_soundcard_new(soundcard_thread); AGS_TASK(notify_soundcard)->task_thread = application_context->task_thread; if(AGS_IS_DEVOUT(soundcard)){ AGS_DEVOUT(soundcard)->notify_soundcard = notify_soundcard; } ags_task_thread_append_cyclic_task(application_context->task_thread, notify_soundcard); if(ags_sound_provider_get_default_soundcard_thread(AGS_SOUND_PROVIDER(application_context)) == NULL){ ags_sound_provider_set_default_soundcard_thread(AGS_SOUND_PROVIDER(application_context), (GObject *) soundcard_thread); } /* export thread */ export_thread = (AgsThread *) ags_export_thread_new(soundcard, NULL); ags_thread_add_child_extended(main_loop, (AgsThread *) export_thread, TRUE, TRUE); soundcard_editor->flags &= (~AGS_SOUNDCARD_EDITOR_BLOCK_ADD); } void ags_soundcard_editor_remove_soundcard(AgsSoundcardEditor *soundcard_editor, GObject *soundcard) { AgsWindow *window; AgsPreferences *preferences; GtkDialog *dialog; AgsThread *main_loop; AgsThread *soundcard_thread; AgsApplicationContext *application_context; GList *machine, *machine_start; pthread_mutex_t *application_mutex; if(soundcard == NULL || AGS_IS_CORE_AUDIO_DEVOUT(soundcard) || AGS_IS_PULSE_DEVOUT(soundcard) || AGS_IS_JACK_DEVOUT(soundcard)){ return; } preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; /* remove AgsSoundcard from AgsAudio */ #if 0 machine = machine_start = gtk_container_get_children(window->machines); while(machine != NULL){ if(AGS_MACHINE(machine->data)->audio->soundcard == soundcard){ g_object_set(AGS_MACHINE(machine->data)->audio, "soundcard", NULL, NULL); g_object_unref(G_OBJECT(AGS_MACHINE(machine->data)->audio)); } machine = machine->next; } ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), NULL); g_list_free(machine_start); #endif /* */ if(soundcard == soundcard_editor->soundcard){ soundcard_editor->soundcard = NULL; } #if 0 if(soundcard != NULL){ ags_sound_provider_set_soundcard(AGS_SOUND_PROVIDER(application_context), g_list_remove(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)), soundcard)); g_object_unref(soundcard); } #endif #if 0 if(soundcard_editor->soundcard_thread != NULL){ ags_thread_stop((AgsThread *) soundcard_editor->soundcard_thread); ags_thread_remove_child(main_loop, (AgsThread *) soundcard_editor->soundcard_thread); // g_object_unref(soundcard_editor->soundcard_thread); soundcard_editor->soundcard_thread = NULL; } #endif pthread_mutex_unlock(application_mutex); /* notify user about restarting GSequencer */ dialog = gtk_message_dialog_new(preferences, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "After finished your modifications you should safe your file and restart GSequencer"); g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show_all(dialog); } void ags_soundcard_editor_load_core_audio_card(AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; AgsPreferences *preferences; AgsCoreAudioDevout *core_audio_devout; AgsApplicationContext *application_context; GList *distributed_manager; GList *soundcard; GList *card_id; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* create soundcard */ pthread_mutex_lock(application_mutex); distributed_manager = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if(distributed_manager == NULL){ g_warning("distributed manager not found"); pthread_mutex_unlock(application_mutex); return; } soundcard = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); core_audio_devout = NULL; while(soundcard != NULL){ if(AGS_IS_CORE_AUDIO_DEVOUT(soundcard->data)){ core_audio_devout = soundcard->data; break; } soundcard = soundcard->next; } card_id = NULL; ags_soundcard_list_cards(AGS_SOUNDCARD(core_audio_devout), &card_id, NULL); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(soundcard_editor->card)))); while(card_id != NULL){ if(card_id->data != NULL){ gtk_combo_box_text_append_text(soundcard_editor->card, card_id->data); } card_id = card_id->next; } /* */ gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->buffer_size, FALSE); gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->samplerate, FALSE); pthread_mutex_unlock(application_mutex); } void ags_soundcard_editor_load_pulse_card(AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; AgsPreferences *preferences; AgsPulseDevout *pulse_devout; AgsApplicationContext *application_context; GList *distributed_manager; GList *soundcard; GList *card_id; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* create soundcard */ pthread_mutex_lock(application_mutex); distributed_manager = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if(distributed_manager == NULL){ g_warning("distributed manager not found"); pthread_mutex_unlock(application_mutex); return; } soundcard = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); pulse_devout = NULL; while(soundcard != NULL){ if(AGS_IS_PULSE_DEVOUT(soundcard->data)){ pulse_devout = soundcard->data; break; } soundcard = soundcard->next; } card_id = NULL; ags_soundcard_list_cards(AGS_SOUNDCARD(pulse_devout), &card_id, NULL); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(soundcard_editor->card)))); while(card_id != NULL){ if(card_id->data != NULL){ gtk_combo_box_text_append_text(soundcard_editor->card, card_id->data); } card_id = card_id->next; } /* */ gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->buffer_size, FALSE); gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->samplerate, FALSE); pthread_mutex_unlock(application_mutex); } void ags_soundcard_editor_load_jack_card(AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; AgsPreferences *preferences; AgsJackDevout *jack_devout; AgsApplicationContext *application_context; GList *distributed_manager; GList *soundcard; GList *card_id; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* create soundcard */ pthread_mutex_lock(application_mutex); distributed_manager = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if(distributed_manager == NULL){ g_warning("distributed manager not found"); pthread_mutex_unlock(application_mutex); return; } soundcard = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); jack_devout = NULL; while(soundcard != NULL){ if(AGS_IS_JACK_DEVOUT(soundcard->data)){ jack_devout = soundcard->data; break; } soundcard = soundcard->next; } card_id = NULL; ags_soundcard_list_cards(AGS_SOUNDCARD(jack_devout), &card_id, NULL); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(soundcard_editor->card)))); while(card_id != NULL){ if(card_id->data != NULL){ gtk_combo_box_text_append_text(soundcard_editor->card, card_id->data); } card_id = card_id->next; } /* */ gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->buffer_size, FALSE); gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->samplerate, FALSE); pthread_mutex_unlock(application_mutex); } void ags_soundcard_editor_load_alsa_card(AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; AgsPreferences *preferences; AgsDevout *devout; AgsApplicationContext *application_context; GList *list; GList *card_id; pthread_mutex_t *application_mutex; if((AGS_SOUNDCARD_EDITOR_BLOCK_LOAD & (soundcard_editor->flags)) != 0){ return; } soundcard_editor->flags |= AGS_SOUNDCARD_EDITOR_BLOCK_LOAD; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* */ pthread_mutex_lock(application_mutex); devout = g_object_new(AGS_TYPE_DEVOUT, NULL); devout->flags &= (~AGS_DEVOUT_OSS); devout->flags |= AGS_DEVOUT_ALSA; g_object_set(devout, "application-context", application_context, NULL); card_id = NULL; ags_soundcard_list_cards(AGS_SOUNDCARD(devout), &card_id, NULL); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(soundcard_editor->card)))); while(card_id != NULL){ if(card_id != NULL){ gtk_combo_box_text_append_text(soundcard_editor->card, card_id->data); } card_id = card_id->next; } /* remove previous */ if(soundcard_editor->soundcard != NULL){ ags_soundcard_editor_remove_soundcard(soundcard_editor, (GObject *) soundcard_editor->soundcard); } /* add new */ ags_soundcard_editor_add_soundcard(soundcard_editor, (GObject *) devout); /* */ list = gtk_container_get_children((GtkContainer *) GTK_WIDGET(soundcard_editor)->parent); if(list->data == soundcard_editor){ gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->buffer_size, TRUE); } g_list_free(list); gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->samplerate, TRUE); pthread_mutex_unlock(application_mutex); soundcard_editor->flags &= (~AGS_SOUNDCARD_EDITOR_BLOCK_LOAD); } void ags_soundcard_editor_load_oss_card(AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; AgsPreferences *preferences; AgsDevout *devout; AgsApplicationContext *application_context; GList *list; GList *card_id; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* */ pthread_mutex_lock(application_mutex); devout = g_object_new(AGS_TYPE_DEVOUT, NULL); devout->flags &= (~AGS_DEVOUT_ALSA); devout->flags |= AGS_DEVOUT_OSS; g_object_set(devout, "application-context", application_context, NULL); card_id = NULL; ags_soundcard_list_cards(AGS_SOUNDCARD(devout), &card_id, NULL); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(soundcard_editor->card)))); while(card_id != NULL){ if(card_id != NULL){ gtk_combo_box_text_append_text(soundcard_editor->card, card_id->data); } card_id = card_id->next; } /* remove previous */ if(soundcard_editor->soundcard != NULL){ ags_soundcard_editor_remove_soundcard(soundcard_editor, (GObject *) soundcard_editor->soundcard); } /* add new */ ags_soundcard_editor_add_soundcard(soundcard_editor, (GObject *) devout); /* */ list = gtk_container_get_children((GtkContainer *) GTK_WIDGET(soundcard_editor)->parent); if(list->data == soundcard_editor){ gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->buffer_size, TRUE); } g_list_free(list); gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->samplerate, TRUE); pthread_mutex_unlock(application_mutex); } /** * ags_soundcard_editor_new: * * Creates an #AgsSoundcardEditor * * Returns: a new #AgsSoundcardEditor * * Since: 1.0.0 */ AgsSoundcardEditor* ags_soundcard_editor_new() { AgsSoundcardEditor *soundcard_editor; soundcard_editor = (AgsSoundcardEditor *) g_object_new(AGS_TYPE_SOUNDCARD_EDITOR, NULL); return(soundcard_editor); } gsequencer-1.4.24/ags/X/file/0000755000175000017500000000000013256233676012661 500000000000000gsequencer-1.4.24/ags/X/file/ags_simple_file.c0000644000175000017500000054070613256163135016073 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include #include #include #include #include void ags_simple_file_class_init(AgsSimpleFileClass *simple_file); void ags_simple_file_init(AgsSimpleFile *simple_file); void ags_simple_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_simple_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_simple_file_finalize(GObject *gobject); void ags_simple_file_real_open(AgsSimpleFile *simple_file, GError **error); void ags_simple_file_real_open_from_data(AgsSimpleFile *simple_file, gchar *data, guint length, GError **error); void ags_simple_file_real_rw_open(AgsSimpleFile *simple_file, gboolean create, GError **error); void ags_simple_file_real_write(AgsSimpleFile *simple_file); void ags_simple_file_real_write_resolve(AgsSimpleFile *simple_file); void ags_simple_file_real_read(AgsSimpleFile *simple_file); void ags_simple_file_real_read_resolve(AgsSimpleFile *simple_file); void ags_simple_file_real_read_start(AgsSimpleFile *simple_file); void ags_simple_file_read_config(AgsSimpleFile *simple_file, xmlNode *node, AgsConfig **config); void ags_simple_file_read_property_list(AgsSimpleFile *simple_file, xmlNode *node, GList **property); void ags_simple_file_read_property(AgsSimpleFile *simple_file, xmlNode *node, GParameter **property); void ags_simple_file_read_window(AgsSimpleFile *simple_file, xmlNode *node, AgsWindow **window); void ags_simple_file_read_window_launch(AgsFileLaunch *file_launch, AgsWindow *window); void ags_simple_file_read_machine_list(AgsSimpleFile *simple_file, xmlNode *node, GList **machine); void ags_simple_file_read_machine(AgsSimpleFile *simple_file, xmlNode *node, AgsMachine **machine); void ags_simple_file_read_machine_resize_pads(AgsMachine *machine, GType channel_type, guint new_size, guint old_size, gpointer data); void ags_simple_file_read_machine_launch(AgsFileLaunch *file_launch, AgsMachine *machine); void ags_simple_file_read_pad_list(AgsSimpleFile *simple_file, xmlNode *node, GList **pad); void ags_simple_file_read_pad(AgsSimpleFile *simple_file, xmlNode *node, AgsPad **pad); void ags_simple_file_read_pad_launch(AgsFileLaunch *file_launch, AgsPad *pad); void ags_simple_file_read_line_list(AgsSimpleFile *simple_file, xmlNode *node, GList **line); void ags_simple_file_read_line(AgsSimpleFile *simple_file, xmlNode *node, AgsLine **line); void ags_simple_file_read_line_launch(AgsFileLaunch *file_launch, AgsLine *line); void ags_simple_file_read_channel_line_launch(AgsFileLaunch *file_launch, AgsChannel *channel); void ags_simple_file_read_effect_pad_list(AgsSimpleFile *simple_file, xmlNode *node, GList **effect_pad); void ags_simple_file_read_effect_pad(AgsSimpleFile *simple_file, xmlNode *node, AgsEffectPad **effect_pad); void ags_simple_file_read_effect_pad_launch(AgsFileLaunch *file_launch, AgsEffectPad *effect_pad); void ags_simple_file_read_effect_line_list(AgsSimpleFile *simple_file, xmlNode *node, GList **effect_line); void ags_simple_file_read_effect_line(AgsSimpleFile *simple_file, xmlNode *node, AgsEffectLine **effect_line); void ags_simple_file_read_effect_line_launch(AgsFileLaunch *file_launch, AgsEffectLine *effect_line); void ags_simple_file_read_oscillator_list(AgsSimpleFile *simple_file, xmlNode *node, GList **oscillator); void ags_simple_file_read_oscillator(AgsSimpleFile *simple_file, xmlNode *node, AgsOscillator **oscillator); void ags_simple_file_read_notation_editor(AgsSimpleFile *simple_file, xmlNode *node, AgsNotationEditor **notation_editor); void ags_simple_file_read_notation_editor_launch(AgsFileLaunch *file_launch, AgsNotationEditor *notation_editor); void ags_simple_file_read_automation_editor(AgsSimpleFile *simple_file, xmlNode *node, AgsAutomationEditor **automation_editor); void ags_simple_file_read_automation_editor_launch(AgsFileLaunch *file_launch, AgsAutomationEditor *automation_editor); void ags_simple_file_read_notation_list(AgsSimpleFile *simple_file, xmlNode *node, GList **notation); void ags_simple_file_read_notation(AgsSimpleFile *simple_file, xmlNode *node, AgsNotation **notation); void ags_simple_file_read_notation_list_fixup_1_0_to_1_2(AgsSimpleFile *simple_file, xmlNode *node, GList **notation); void ags_simple_file_read_automation_list(AgsSimpleFile *simple_file, xmlNode *node, GList **automation); void ags_simple_file_read_automation(AgsSimpleFile *simple_file, xmlNode *node, AgsAutomation **automation); void ags_simple_file_read_automation_list_fixup_1_0_to_1_3(AgsSimpleFile *simple_file, xmlNode *node, GList **automation); void ags_simple_file_read_preset_list(AgsSimpleFile *simple_file, xmlNode *node, GList **preset); void ags_simple_file_read_preset(AgsSimpleFile *simple_file, xmlNode *node, AgsPreset **preset); xmlNode* ags_simple_file_write_config(AgsSimpleFile *simple_file, xmlNode *parent, AgsConfig *config); xmlNode* ags_simple_file_write_window(AgsSimpleFile *simple_file, xmlNode *parent, AgsWindow *window); xmlNode* ags_simple_file_write_property_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *property); xmlNode* ags_simple_file_write_property(AgsSimpleFile *simple_file, xmlNode *parent, GParameter *property); xmlNode* ags_simple_file_write_window(AgsSimpleFile *simple_file, xmlNode *parent, AgsWindow *window); xmlNode* ags_simple_file_write_machine_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *machine); xmlNode* ags_simple_file_write_machine(AgsSimpleFile *simple_file, xmlNode *parent, AgsMachine *machine); xmlNode* ags_simple_file_write_pad_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *pad); xmlNode* ags_simple_file_write_pad(AgsSimpleFile *simple_file, xmlNode *parent, AgsPad *pad); xmlNode* ags_simple_file_write_line_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *line); xmlNode* ags_simple_file_write_line(AgsSimpleFile *simple_file, xmlNode *parent, AgsLine *line); void ags_simple_file_write_line_resolve_link(AgsFileLookup *file_lookup, AgsChannel *channel); xmlNode* ags_simple_file_write_effect_pad_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *effect_pad); xmlNode* ags_simple_file_write_effect_pad(AgsSimpleFile *simple_file, xmlNode *parent, AgsEffectPad *effect_pad); xmlNode* ags_simple_file_write_effect_line_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *effect_line); xmlNode* ags_simple_file_write_effect_line(AgsSimpleFile *simple_file, xmlNode *parent, AgsEffectLine *effect_line); xmlNode* ags_simple_file_write_oscillator_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *oscillator); xmlNode* ags_simple_file_write_oscillator(AgsSimpleFile *simple_file, xmlNode *parent, AgsOscillator *oscillator); xmlNode* ags_simple_file_write_notation_editor(AgsSimpleFile *simple_file, xmlNode *parent, AgsNotationEditor *notation_editor); void ags_simple_file_write_notation_editor_resolve_machine(AgsFileLookup *file_lookup, AgsNotationEditor *notation_editor); xmlNode* ags_simple_file_write_automation_editor(AgsSimpleFile *simple_file, xmlNode *parent, AgsAutomationEditor *automation_editor); void ags_simple_file_write_automation_editor_resolve_machine(AgsFileLookup *file_lookup, AgsAutomationEditor *automation_editor); xmlNode* ags_simple_file_write_notation_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *notation); xmlNode* ags_simple_file_write_notation(AgsSimpleFile *simple_file, xmlNode *parent, AgsNotation *notation); xmlNode* ags_simple_file_write_automation_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *automation); xmlNode* ags_simple_file_write_automation(AgsSimpleFile *simple_file, xmlNode *parent, AgsAutomation *automation); xmlNode* ags_simple_file_write_preset_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *preset); xmlNode* ags_simple_file_write_preset(AgsSimpleFile *simple_file, xmlNode *parent, AgsPreset *preset); /** * SECTION:ags_file * @short_description: read/write XML file * @title: AgsSimpleFile * @section_id: * @include: ags/file/ags_file.h * * The #AgsSimpleFile is an object to read or write files using XML. It * is the persisting layer of Advanced Gtk+ Sequencer. */ enum{ PROP_0, PROP_FILENAME, PROP_ENCODING, PROP_AUDIO_FORMAT, PROP_AUDIO_ENCODING, PROP_XML_DOC, PROP_APPLICATION_CONTEXT, }; enum{ OPEN, OPEN_FROM_DATA, RW_OPEN, WRITE, WRITE_RESOLVE, READ, READ_RESOLVE, READ_START, LAST_SIGNAL, }; static gpointer ags_simple_file_parent_class = NULL; static guint simple_file_signals[LAST_SIGNAL] = { 0 }; GType ags_simple_file_get_type(void) { static GType ags_type_simple_file = 0; if(!ags_type_simple_file){ static const GTypeInfo ags_simple_file_info = { sizeof (AgsSimpleFileClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_simple_file_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSimpleFile), 0, /* n_preallocs */ (GInstanceInitFunc) ags_simple_file_init, }; ags_type_simple_file = g_type_register_static(G_TYPE_OBJECT, "AgsSimpleFile", &ags_simple_file_info, 0); } return(ags_type_simple_file); } void ags_simple_file_class_init(AgsSimpleFileClass *simple_file) { GObjectClass *gobject; GParamSpec *param_spec; ags_simple_file_parent_class = g_type_class_peek_parent(simple_file); /* GObjectClass */ gobject = (GObjectClass *) simple_file; gobject->get_property = ags_simple_file_get_property; gobject->set_property = ags_simple_file_set_property; gobject->finalize = ags_simple_file_finalize; /* properties */ /** * AgsSimpleFile:filename: * * The assigned filename to open and read from. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", "filename to read or write", "The filename to read or write to.", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsSimpleFile:encoding: * * The charset encoding to use. * * Since: 1.0.0 */ param_spec = g_param_spec_string("encoding", "encoding to use", "The encoding of the XML document.", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ENCODING, param_spec); /** * AgsSimpleFile:audio-format: * * The format of embedded audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_string("audio-format", "audio format to use", "The audio format used to embedded audio.", AGS_SIMPLE_FILE_DEFAULT_AUDIO_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_FORMAT, param_spec); /** * AgsSimpleFile:audio-encoding: * * The encoding to use for embedding audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_string("audio-encoding", "audio encoding to use", "The audio encoding used to embedded audio.", AGS_SIMPLE_FILE_DEFAULT_AUDIO_ENCODING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_ENCODING, param_spec); /** * AgsSimpleFile:xml-doc: * * The assigned xml-doc. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("xml-doc", "xml document of file", "The xml document assigned with file", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_XML_DOC, param_spec); /** * AgsSimpleFile:application-context: * * The application context assigned with. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", "application context of file", "The application context to write to file.", AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* AgsSimpleFileClass */ simple_file->open = ags_simple_file_real_open; simple_file->rw_open = ags_simple_file_real_rw_open; simple_file->open_from_data = ags_simple_file_real_open_from_data; simple_file->write = ags_simple_file_real_write; simple_file->write_resolve = ags_simple_file_real_write_resolve; simple_file->read = ags_simple_file_real_read; simple_file->read_resolve = ags_simple_file_real_read_resolve; simple_file->read_start = ags_simple_file_real_read_start; /* signals */ /** * AgsSimpleFile::open: * @simple_file: the #AgsSimpleFile * @error: a #GError-struct pointer to return error * * Open @simple_file with appropriate filename. * * Since: 1.0.0 */ simple_file_signals[OPEN] = g_signal_new("open", G_TYPE_FROM_CLASS(simple_file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSimpleFileClass, open), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsSimpleFile::open-from-data: * @simple_file: the #AgsSimpleFile * @buffer: the buffer containing the file * @length: the buffer length * @error: a #GError-struct pointer to return error * * Open @simple_file from a buffer containing the file. * * Since: 1.0.0 */ simple_file_signals[OPEN_FROM_DATA] = g_signal_new("open-from-data", G_TYPE_FROM_CLASS(simple_file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSimpleFileClass, open_from_data), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_UINT_POINTER, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_POINTER); /** * AgsSimpleFile::open-from-data: * @simple_file: the #AgsSimpleFile * @create: if %TRUE the file will be created if not exists * @error: a #GError-struct pointer to return error * * Open @simple_file in read-write mode. * * Since: 1.0.0 */ simple_file_signals[RW_OPEN] = g_signal_new("rw-open", G_TYPE_FROM_CLASS(simple_file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSimpleFileClass, rw_open), NULL, NULL, g_cclosure_user_marshal_VOID__BOOLEAN_POINTER, G_TYPE_NONE, 2, G_TYPE_BOOLEAN, G_TYPE_POINTER); /** * AgsSimpleFile::write: * @simple_file: the #AgsSimpleFile * * Write XML Document to disk. * * Since: 1.0.0 */ simple_file_signals[WRITE] = g_signal_new("write", G_TYPE_FROM_CLASS(simple_file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSimpleFileClass, write), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsSimpleFile::write-resolve: * @simple_file: the #AgsSimpleFile * * Resolve references and generate thus XPath expressions just * before writing to disk. * * Since: 1.0.0 */ simple_file_signals[WRITE_RESOLVE] = g_signal_new("write_resolve", G_TYPE_FROM_CLASS(simple_file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSimpleFileClass, write_resolve), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsSimpleFile::read: * @simple_file: the #AgsSimpleFile * * Read a XML document from disk with specified simple_filename. * * Since: 1.0.0 */ simple_file_signals[READ] = g_signal_new("read", G_TYPE_FROM_CLASS(simple_file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSimpleFileClass, read), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsSimpleFile::read-resolve: * @simple_file: the #AgsSimpleFile * * Resolve XPath expressions to their counterpart the newly created * instances refering to. * * Since: 1.0.0 */ simple_file_signals[READ_RESOLVE] = g_signal_new("read_resolve", G_TYPE_FROM_CLASS(simple_file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSimpleFileClass, read_resolve), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsSimpleFile::read-start: * @simple_file: the #AgsSimpleFile * * Hook after reading XML document to update or start the application. * * Since: 1.0.0 */ simple_file_signals[READ_START] = g_signal_new("read_start", G_TYPE_FROM_CLASS(simple_file), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSimpleFileClass, read_start), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } GQuark ags_simple_file_error_quark() { return(g_quark_from_static_string("ags-simple-file-error-quark")); } void ags_simple_file_init(AgsSimpleFile *simple_file) { simple_file->flags = 0; simple_file->out = NULL; simple_file->buffer = NULL; simple_file->filename = NULL; simple_file->encoding = AGS_SIMPLE_FILE_DEFAULT_ENCODING; simple_file->dtd = AGS_SIMPLE_FILE_DEFAULT_DTD; simple_file->audio_format = AGS_SIMPLE_FILE_DEFAULT_AUDIO_FORMAT; simple_file->audio_encoding = AGS_SIMPLE_FILE_DEFAULT_AUDIO_ENCODING; simple_file->doc = NULL; simple_file->id_ref = NULL; simple_file->lookup = NULL; simple_file->launch = NULL; simple_file->application_context = NULL; } void ags_simple_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSimpleFile *simple_file; simple_file = AGS_SIMPLE_FILE(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(simple_file->filename == filename){ return; } if(simple_file->filename != NULL){ g_free(simple_file->filename); } simple_file->filename = g_strdup(filename); } break; case PROP_ENCODING: { gchar *encoding; encoding = g_value_get_string(value); simple_file->encoding = encoding; } break; case PROP_AUDIO_FORMAT: { gchar *audio_format; audio_format = g_value_get_string(value); simple_file->audio_format = audio_format; } break; case PROP_AUDIO_ENCODING: { gchar *audio_encoding; audio_encoding = g_value_get_string(value); simple_file->audio_encoding = audio_encoding; } break; case PROP_XML_DOC: { xmlDoc *doc; doc = (xmlDoc *) g_value_get_pointer(value); simple_file->doc = doc; } break; case PROP_APPLICATION_CONTEXT: { GObject *application_context; application_context = g_value_get_object(value); if(simple_file->application_context == application_context){ return; } if(simple_file->application_context != NULL){ g_object_unref(simple_file->application_context); } if(application_context != NULL){ g_object_ref(application_context); } simple_file->application_context = application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_simple_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSimpleFile *simple_file; simple_file = AGS_SIMPLE_FILE(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, simple_file->filename); } break; case PROP_ENCODING: { g_value_set_string(value, simple_file->encoding); } break; case PROP_AUDIO_FORMAT: { g_value_set_string(value, simple_file->audio_format); } break; case PROP_AUDIO_ENCODING: { g_value_set_string(value, simple_file->audio_encoding); } break; case PROP_XML_DOC: { g_value_set_pointer(value, simple_file->doc); } break; case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, simple_file->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_simple_file_finalize(GObject *gobject) { //TODO:JK: implement me } gchar* ags_simple_file_str2md5(gchar *content, guint content_length) { GChecksum *checksum; gchar *str; str = g_compute_checksum_for_string(G_CHECKSUM_MD5, content, content_length); return(str); } void ags_simple_file_add_id_ref(AgsSimpleFile *simple_file, GObject *id_ref) { if(simple_file == NULL || id_ref == NULL){ return; } g_object_ref(id_ref); simple_file->id_ref = g_list_prepend(simple_file->id_ref, id_ref); } GObject* ags_simple_file_find_id_ref_by_node(AgsSimpleFile *simple_file, xmlNode *node) { AgsFileIdRef *file_id_ref; GList *list; if(simple_file == NULL || node == NULL){ return(NULL); } list = simple_file->id_ref; while(list != NULL){ file_id_ref = AGS_FILE_ID_REF(list->data); if(file_id_ref->node == node){ return((GObject *) file_id_ref); } list = list->next; } return(NULL); } GList* ags_simple_file_find_id_ref_by_xpath(AgsSimpleFile *simple_file, gchar *xpath) { AgsFileIdRef *file_id_ref; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; GList *list; guint i; if(simple_file == NULL || xpath == NULL || !g_str_has_prefix(xpath, "xpath=")){ g_message("invalid xpath: %s", xpath); return(NULL); } xpath = &(xpath[6]); /* Create xpath evaluation context */ xpath_context = xmlXPathNewContext(simple_file->doc); if(xpath_context == NULL) { g_warning("Error: unable to create new XPath context"); return(NULL); } /* Evaluate xpath expression */ xpath_object = xmlXPathEval(xpath, xpath_context); if(xpath_object == NULL) { g_warning("Error: unable to evaluate xpath expression \"%s\"", xpath); xmlXPathFreeContext(xpath_context); return(NULL); } node = xpath_object->nodesetval->nodeTab; list = NULL; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ GObject *gobject; gobject = ags_simple_file_find_id_ref_by_node(simple_file, node[i]); if(gobject != NULL){ list = g_list_prepend(list, gobject); } } } if(list == NULL){ g_message("no xpath match: %s", xpath); } return(list); } GList* ags_simple_file_find_id_ref_by_reference(AgsSimpleFile *simple_file, gpointer ref) { AgsFileIdRef *file_id_ref; GList *list; GList *ref_list; if(simple_file == NULL || ref == NULL){ return(NULL); } list = simple_file->id_ref; ref_list = NULL; while(list != NULL){ file_id_ref = AGS_FILE_ID_REF(list->data); if(file_id_ref->ref == ref){ ref_list = g_list_prepend(ref_list, file_id_ref); } list = list->next; } return(ref_list); } void ags_simple_file_add_lookup(AgsSimpleFile *simple_file, GObject *file_lookup) { if(simple_file == NULL || file_lookup == NULL){ return; } g_object_ref(G_OBJECT(file_lookup)); simple_file->lookup = g_list_prepend(simple_file->lookup, file_lookup); } void ags_simple_file_add_launch(AgsSimpleFile *simple_file, GObject *file_launch) { if(simple_file == NULL || file_launch == NULL){ return; } g_object_ref(G_OBJECT(file_launch)); simple_file->launch = g_list_prepend(simple_file->launch, file_launch); } void ags_simple_file_real_open(AgsSimpleFile *simple_file, GError **error) { /* parse the file and get the DOM */ simple_file->doc = xmlReadFile(simple_file->filename, NULL, 0); if(simple_file->doc == NULL){ g_warning("ags_simple_file.c - failed to read XML document %s", simple_file->filename); if(error != NULL){ g_set_error(error, AGS_SIMPLE_FILE_ERROR, AGS_SIMPLE_FILE_ERROR_PARSER_FAILURE, "unable to parse document: %s\n", simple_file->filename); } }else{ /* Get the root element node */ simple_file->root_node = xmlDocGetRootElement(simple_file->doc); } } void ags_simple_file_open(AgsSimpleFile *simple_file, GError **error) { g_return_if_fail(AGS_IS_SIMPLE_FILE(simple_file)); g_object_ref(G_OBJECT(simple_file)); g_signal_emit(G_OBJECT(simple_file), simple_file_signals[OPEN], 0, error); g_object_unref(G_OBJECT(simple_file)); } void ags_simple_file_real_open_from_data(AgsSimpleFile *simple_file, gchar *data, guint length, GError **error) { simple_file->doc = xmlReadMemory(data, length, simple_file->filename, NULL, 0); if(simple_file->doc == NULL){ g_warning("ags_simple_file.c - failed to read XML document %s", simple_file->filename); if(error != NULL){ g_set_error(error, AGS_SIMPLE_FILE_ERROR, AGS_SIMPLE_FILE_ERROR_PARSER_FAILURE, "unable to parse document from data: %s\n", simple_file->filename); } }else{ /* Get the root element node */ simple_file->root_node = xmlDocGetRootElement(simple_file->doc); } } void ags_simple_file_open_from_data(AgsSimpleFile *simple_file, gchar *data, guint length, GError **error) { g_return_if_fail(AGS_IS_SIMPLE_FILE(simple_file)); g_object_ref(G_OBJECT(simple_file)); g_signal_emit(G_OBJECT(simple_file), simple_file_signals[OPEN_FROM_DATA], 0, data, length, error); g_object_unref(G_OBJECT(simple_file)); } void ags_simple_file_real_rw_open(AgsSimpleFile *simple_file, gboolean create, GError **error) { simple_file->out = fopen(simple_file->filename, "w+"); simple_file->doc = xmlNewDoc("1.0"); simple_file->root_node = xmlNewNode(NULL, "ags-simple-file"); xmlDocSetRootElement(simple_file->doc, simple_file->root_node); } void ags_simple_file_rw_open(AgsSimpleFile *simple_file, gboolean create, GError **error) { g_return_if_fail(AGS_IS_SIMPLE_FILE(simple_file)); g_object_ref(G_OBJECT(simple_file)); g_signal_emit(G_OBJECT(simple_file), simple_file_signals[RW_OPEN], 0, create, error); g_object_unref(G_OBJECT(simple_file)); } void ags_simple_file_open_filename(AgsSimpleFile *simple_file, gchar *filename) { GError *error; if(simple_file == NULL){ return; } if(simple_file->filename != NULL){ ags_simple_file_close(simple_file); } error = NULL; g_object_set(simple_file, "filename", filename, NULL); ags_simple_file_open(simple_file, &error); if(error != NULL){ g_warning("%s", error->message); } } void ags_simple_file_close(AgsSimpleFile *simple_file) { if(simple_file == NULL){ return; } if(simple_file->out != NULL){ fclose(simple_file->out); } /* free the document */ xmlFreeDoc(simple_file->doc); /* * Free the global variables that may * have been allocated by the parser. */ xmlCleanupParser(); /* * this is to debug memory for regression tests */ xmlMemoryDump(); simple_file->filename = NULL; } void ags_simple_file_real_write(AgsSimpleFile *simple_file) { AgsApplicationContext *application_context; AgsConfig *config; xmlNode *node, *child; gchar *id; guint size; if(simple_file == NULL || simple_file->root_node == NULL){ return; } application_context = (AgsApplicationContext *) simple_file->application_context; config = ags_config_get_instance(); id = ags_id_generator_create_uuid(); node = simple_file->root_node; xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, AGS_FILE_VERSION_PROP, AGS_APPLICATION_CONTEXT(application_context)->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, AGS_APPLICATION_CONTEXT(application_context)->build_id); /* add to parent */ ags_simple_file_write_config(simple_file, node, config); ags_simple_file_write_window(simple_file, node, AGS_XORG_APPLICATION_CONTEXT(application_context)->window); /* resolve */ ags_simple_file_write_resolve(simple_file); /* * Dumping document to file */ // xmlSaveFormatFileEnc(simple_file->filename, simple_file->doc, "UTF-8", 1); xmlDocDumpFormatMemoryEnc(simple_file->doc, &(simple_file->buffer), &size, simple_file->encoding, TRUE); fwrite(simple_file->buffer, size, sizeof(xmlChar), simple_file->out); fflush(simple_file->out); } void ags_simple_file_write(AgsSimpleFile *simple_file) { g_return_if_fail(AGS_IS_SIMPLE_FILE(simple_file)); g_object_ref(G_OBJECT(simple_file)); g_signal_emit(G_OBJECT(simple_file), simple_file_signals[WRITE], 0); g_object_unref(G_OBJECT(simple_file)); } void ags_simple_file_real_write_resolve(AgsSimpleFile *simple_file) { GList *list; list = simple_file->lookup; while(list != NULL){ ags_file_lookup_resolve(AGS_FILE_LOOKUP(list->data)); list = list->next; } } void ags_simple_file_write_resolve(AgsSimpleFile *simple_file) { g_return_if_fail(AGS_IS_SIMPLE_FILE(simple_file)); g_object_ref(G_OBJECT(simple_file)); g_signal_emit(G_OBJECT(simple_file), simple_file_signals[WRITE_RESOLVE], 0); g_object_unref(G_OBJECT(simple_file)); } void ags_simple_file_real_read(AgsSimpleFile *simple_file) { AgsApplicationContext *application_context; AgsGuiThread *gui_thread; xmlNode *root_node, *child; application_context = (AgsApplicationContext *) simple_file->application_context; gui_thread = ags_thread_find_type(application_context->main_loop, AGS_TYPE_GUI_THREAD); root_node = simple_file->root_node; /* child elements */ child = root_node->children; /* */ ags_application_context_register_types(application_context); while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-sf-config", child->name, 13)){ //NOTE:JK: no redundant code here }else if(!xmlStrncmp("ags-sf-window", child->name, 14)){ ags_simple_file_read_window(simple_file, child, (AgsWindow **) &(AGS_XORG_APPLICATION_CONTEXT(application_context)->window)); } } child = child->next; } /* resolve */ ags_simple_file_read_resolve(simple_file); g_message("XML simple file resolved"); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(application_context)); gtk_widget_show_all((GtkWidget *) AGS_XORG_APPLICATION_CONTEXT(application_context)->window); g_message("XML simple file connected"); /* start */ ags_simple_file_read_start(simple_file); /* set file ready */ g_atomic_int_set(&(AGS_XORG_APPLICATION_CONTEXT(application_context)->file_ready), TRUE); } void ags_simple_file_read(AgsSimpleFile *simple_file) { g_return_if_fail(AGS_IS_SIMPLE_FILE(simple_file)); g_object_ref(G_OBJECT(simple_file)); g_signal_emit(G_OBJECT(simple_file), simple_file_signals[READ], 0); g_object_unref(G_OBJECT(simple_file)); } void ags_simple_file_real_read_resolve(AgsSimpleFile *simple_file) { GList *list; list = g_list_reverse(simple_file->lookup); while(list != NULL){ ags_file_lookup_resolve(AGS_FILE_LOOKUP(list->data)); list = list->next; } } void ags_simple_file_read_resolve(AgsSimpleFile *simple_file) { g_return_if_fail(AGS_IS_SIMPLE_FILE(simple_file)); g_object_ref(G_OBJECT(simple_file)); g_signal_emit(G_OBJECT(simple_file), simple_file_signals[READ_RESOLVE], 0); g_object_unref(G_OBJECT(simple_file)); } void ags_simple_file_real_read_start(AgsSimpleFile *simple_file) { GList *list; list = g_list_reverse(simple_file->launch); while(list != NULL){ ags_file_launch_start(AGS_FILE_LAUNCH(list->data)); list = list->next; } } void ags_simple_file_read_start(AgsSimpleFile *simple_file) { g_return_if_fail(AGS_IS_SIMPLE_FILE(simple_file)); g_object_ref(G_OBJECT(simple_file)); g_signal_emit(G_OBJECT(simple_file), simple_file_signals[READ_START], 0); g_object_unref(G_OBJECT(simple_file)); } void ags_simple_file_read_config(AgsSimpleFile *simple_file, xmlNode *node, AgsConfig **ags_config) { AgsConfig *gobject; gchar *id; char *buffer; gsize buffer_length; gobject = *ags_config; gobject->version = xmlGetProp(node, AGS_FILE_VERSION_PROP); gobject->build_id = xmlGetProp(node, AGS_FILE_BUILD_ID_PROP); buffer = xmlNodeGetContent(node); buffer_length = xmlStrlen(buffer); g_message("%s", buffer); ags_config_load_from_data(gobject, buffer, buffer_length); } void ags_simple_file_read_property_list(AgsSimpleFile *simple_file, xmlNode *node, GList **property) { GParameter *current; GList *list; xmlNode *child; guint i; child = node->children; list = NULL; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-property", 11)){ current = NULL; if(*property != NULL){ GList *iter; iter = g_list_nth(*property, i); if(iter != NULL){ current = iter->data; } } ags_simple_file_read_property(simple_file, child, ¤t); list = g_list_prepend(list, current); i++; } } child = child->next; } list = g_list_reverse(list); *property = list; } void ags_simple_file_read_property(AgsSimpleFile *simple_file, xmlNode *node, GParameter **property) { GParameter *pointer; xmlChar *str; xmlChar *type; if(*property != NULL){ pointer = *property; }else{ pointer = (GParameter *) g_new0(GParameter, 1); pointer->name = NULL; *property = pointer; } str = xmlGetProp(node, "name"); if(str != NULL){ pointer->name = g_strdup(str); } str = xmlGetProp(node, "value"); type = xmlGetProp(node, "type"); if(str != NULL){ if(!g_strcmp0(type, "gboolean")){ g_value_init(&(pointer->value), G_TYPE_BOOLEAN); if(!g_strcmp0(str, "false")){ g_value_set_boolean(&(pointer->value), FALSE); }else{ g_value_set_boolean(&(pointer->value), TRUE); } }else if(!g_strcmp0(type, "guint")){ guint val; g_value_init(&(pointer->value), G_TYPE_UINT); val = g_ascii_strtoull(str, NULL, 10); g_value_set_uint(&(pointer->value), val); }else if(!g_strcmp0(type, "gint")){ gint val; g_value_init(&(pointer->value), G_TYPE_UINT); val = g_ascii_strtoll(str, NULL, 10); g_value_set_int(&(pointer->value), val); }else if(!g_strcmp0(type, "gdouble")){ gdouble val; g_value_init(&(pointer->value), G_TYPE_DOUBLE); val = g_ascii_strtod(str, NULL); g_value_set_double(&(pointer->value), val); }else if(!g_strcmp0(type, "AgsComplex")){ AgsComplex z; g_value_init(&(pointer->value), AGS_TYPE_COMPLEX); sscanf(str, "%f %f", &(z[0]), &(z[1])); g_value_set_boxed(&(pointer->value), &z); }else{ g_value_init(&(pointer->value), G_TYPE_STRING); g_value_set_string(&(pointer->value), str); } } } void ags_simple_file_read_window(AgsSimpleFile *simple_file, xmlNode *node, AgsWindow **window) { AgsWindow *gobject; AgsFileLaunch *file_launch; AgsApplicationContext *application_context; AgsConfig *config; xmlNode *child; GList *list; xmlChar *str; guint pcm_channels; guint samplerate; guint buffer_size; guint format; if(*window != NULL){ gobject = *window; }else{ gobject = ags_window_new(simple_file->application_context); AGS_XORG_APPLICATION_CONTEXT(simple_file->application_context)->window = gobject; *window = gobject; } str = xmlGetProp(node, "filename"); if(str != NULL){ gobject->name = g_strdup(str); gtk_window_set_title((GtkWindow *) gobject, g_strconcat("GSequencer - ", gobject->name, NULL)); } /* children */ child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-machine-list", 20)){ GList *machine_start; machine_start = NULL; ags_simple_file_read_machine_list(simple_file, child, &machine_start); g_list_free(machine_start); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-notation-editor", 23)){ ags_simple_file_read_notation_editor(simple_file, child, &(gobject->notation_editor)); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-automation-editor", 25)){ ags_simple_file_read_automation_editor(simple_file, child, &(AGS_AUTOMATION_WINDOW(gobject->automation_window)->automation_editor)); } } child = child->next; } config = ags_config_get_instance(); /* presets */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str != NULL){ pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str != NULL){ buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str != NULL){ format = g_ascii_strtoull(str, NULL, 10); free(str); } /* launch settings */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_simple_file_read_window_launch), gobject); ags_simple_file_add_launch(simple_file, (GObject *) file_launch); } void ags_simple_file_read_window_launch(AgsFileLaunch *file_launch, AgsWindow *window) { xmlChar *str; gdouble bpm; gdouble loop_start, loop_end; gboolean loop; /* bpm */ str = xmlGetProp(file_launch->node, "bpm"); if(str != NULL){ bpm = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(window->navigation->bpm->adjustment, bpm); } /* loop */ str = xmlGetProp(file_launch->node, "loop"); if(str != NULL){ if(!g_strcmp0(str, "false")){ gtk_toggle_button_set_active((GtkToggleButton *) window->navigation->loop, FALSE); }else{ gtk_toggle_button_set_active((GtkToggleButton *) window->navigation->loop, TRUE); } } /* loop start */ str = xmlGetProp(file_launch->node, "loop-start"); if(str != NULL){ loop_start = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(window->navigation->loop_left_tact->adjustment, loop_start); } /* loop end */ str = xmlGetProp(file_launch->node, "loop-end"); if(str != NULL){ loop_end = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(window->navigation->loop_right_tact->adjustment, loop_end); } } void ags_simple_file_read_machine_list(AgsSimpleFile *simple_file, xmlNode *node, GList **machine) { AgsMachine *current; xmlNode *child; GList *list; guint i; child = node->children; list = NULL; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-machine", 11)){ current = NULL; if(*machine != NULL){ GList *iter; iter = g_list_nth(*machine, i); if(iter != NULL){ current = iter->data; } } ags_simple_file_read_machine(simple_file, child, ¤t); list = g_list_prepend(list, current); i++; } } child = child->next; } list = g_list_reverse(list); *machine = list; } void ags_simple_file_read_machine_resize_pads(AgsMachine *machine, GType channel_type, guint new_size, guint old_size, gpointer data) { gboolean *resized; resized = data; if(channel_type == AGS_TYPE_OUTPUT){ resized[0] = TRUE; }else{ resized[1] = TRUE; } } void ags_simple_file_read_machine(AgsSimpleFile *simple_file, xmlNode *node, AgsMachine **machine) { AgsWindow *window; AgsMachine *gobject; AgsConfig *config; GObject *soundcard; AgsFileLaunch *file_launch; xmlNode *child; GList *list; GList *output_pad; GList *input_pad; xmlChar *device; xmlChar *type_name; xmlChar *str; guint audio_channels; guint output_pads, input_pads; gboolean wait_data[2]; gboolean wait_output, wait_input; guint i; type_name = xmlGetProp(node, AGS_FILE_TYPE_PROP); if(*machine != NULL){ gobject = *machine; }else{ gobject = g_object_new(g_type_from_name(type_name), NULL); *machine = gobject; } if(gobject == NULL || !AGS_IS_MACHINE(gobject)){ return; } ags_simple_file_add_id_ref(simple_file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", simple_file->application_context, "file", simple_file, "node", node, "reference", gobject, NULL)); /* retrieve window */ window = AGS_XORG_APPLICATION_CONTEXT(simple_file->application_context)->window; config = ags_config_get_instance(); /* find soundcard */ soundcard = NULL; device = xmlGetProp(node, "soundcard-device"); if(device != NULL){ list = AGS_XORG_APPLICATION_CONTEXT(simple_file->application_context)->soundcard; for(i = 0; list != NULL; i++){ str = ags_soundcard_get_device(AGS_SOUNDCARD(list->data)); if(str != NULL){ if(!g_ascii_strcasecmp(str, device)){ soundcard = list->data; break; } } /* iterate soundcard */ list = list->next; } } if(soundcard == NULL && AGS_XORG_APPLICATION_CONTEXT(simple_file->application_context)->soundcard != NULL){ soundcard = AGS_XORG_APPLICATION_CONTEXT(simple_file->application_context)->soundcard->data; } g_object_set(gobject->audio, "soundcard", soundcard, NULL); /* machine specific */ if(AGS_IS_LADSPA_BRIDGE(gobject)){ xmlChar *filename, *effect; filename = xmlGetProp(node, "plugin-file"); effect = xmlGetProp(node, "effect"); g_object_set(gobject, "filename", filename, "effect", effect, NULL); }else if(AGS_IS_DSSI_BRIDGE(gobject)){ xmlChar *filename, *effect; filename = xmlGetProp(node, "plugin-file"); effect = xmlGetProp(node, "effect"); g_object_set(gobject, "filename", filename, "effect", effect, NULL); }else if(AGS_IS_LIVE_DSSI_BRIDGE(gobject)){ xmlChar *filename, *effect; filename = xmlGetProp(node, "plugin-file"); effect = xmlGetProp(node, "effect"); g_object_set(gobject, "filename", filename, "effect", effect, NULL); }else if(AGS_IS_LV2_BRIDGE(gobject)){ AgsLv2Plugin *lv2_plugin; xmlChar *filename, *effect; filename = xmlGetProp(node, "plugin-file"); effect = xmlGetProp(node, "effect"); lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); if(lv2_plugin != NULL && (AGS_LV2_PLUGIN_IS_SYNTHESIZER & (lv2_plugin->flags)) != 0){ gobject->audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_NOTATION_DEFAULT); gobject->flags |= (AGS_MACHINE_IS_SYNTHESIZER | AGS_MACHINE_REVERSE_NOTATION); ags_machine_popup_add_connection_options((AgsMachine *) gobject, (AGS_MACHINE_POPUP_MIDI_DIALOG)); ags_machine_popup_add_edit_options((AgsMachine *) gobject, (AGS_MACHINE_POPUP_ENVELOPE)); } g_object_set(gobject, "filename", filename, "effect", effect, NULL); }else if(AGS_IS_LIVE_LV2_BRIDGE(gobject)){ AgsLv2Plugin *lv2_plugin; xmlChar *filename, *effect; filename = xmlGetProp(node, "plugin-file"); effect = xmlGetProp(node, "effect"); lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); if(lv2_plugin != NULL && (AGS_LV2_PLUGIN_IS_SYNTHESIZER & (lv2_plugin->flags)) != 0){ gobject->audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_NOTATION_DEFAULT); gobject->flags |= (AGS_MACHINE_IS_SYNTHESIZER | AGS_MACHINE_REVERSE_NOTATION); ags_machine_popup_add_connection_options((AgsMachine *) gobject, (AGS_MACHINE_POPUP_MIDI_DIALOG)); ags_machine_popup_add_edit_options((AgsMachine *) gobject, (AGS_MACHINE_POPUP_ENVELOPE)); } g_object_set(gobject, "filename", filename, "effect", effect, NULL); } gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(gobject), FALSE, FALSE, 0); /* set name if available */ str = xmlGetProp(node, "name"); if(str != NULL){ g_object_set(gobject, "machine-name", str, NULL); } /* reverse mapping */ str = xmlGetProp(node, "reverse-mapping"); if(!g_strcmp0(str, "true")){ gobject->audio->flags |= AGS_AUDIO_REVERSE_MAPPING; } /* connect AgsMachine */ ags_connectable_connect(AGS_CONNECTABLE(gobject)); /* retrieve channel allocation */ output_pads = gobject->audio->output_pads; input_pads = gobject->audio->input_pads; audio_channels = gobject->audio->audio_channels; wait_output = FALSE; wait_input = FALSE; wait_data[0] = FALSE; wait_data[1] = FALSE; g_signal_connect_after(gobject, "resize-pads", G_CALLBACK(ags_simple_file_read_machine_resize_pads), wait_data); str = xmlGetProp(node, "channels"); if(str != NULL){ audio_channels = g_ascii_strtoull(str, NULL, 10); gobject->audio->audio_channels = audio_channels; } str = xmlGetProp(node, "input-pads"); if(str != NULL){ input_pads = g_ascii_strtoull(str, NULL, 10); ags_audio_set_pads(gobject->audio, AGS_TYPE_INPUT, input_pads); wait_input = TRUE; } str = xmlGetProp(node, "output-pads"); if(str != NULL){ output_pads = g_ascii_strtoull(str, NULL, 10); ags_audio_set_pads(gobject->audio, AGS_TYPE_OUTPUT, output_pads); wait_output = TRUE; } /* dispatch */ while((wait_output && !wait_data[0]) || (wait_input && !wait_data[1])){ usleep(1000000 / 30); g_main_context_iteration(NULL, FALSE); } g_object_disconnect(gobject, "any_signal::resize-pads", G_CALLBACK(ags_simple_file_read_machine_resize_pads), wait_data, NULL); /* children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-pad-list", 16)){ GList *pad; pad = NULL; ags_simple_file_read_pad_list(simple_file, child, &pad); g_list_free(pad); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-effect-pad-list", 23)){ GList *effect_pad; effect_pad = NULL; ags_simple_file_read_effect_pad_list(simple_file, child, &effect_pad); g_list_free(effect_pad); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-effect-list", 19)){ AgsEffectBulk *effect_bulk; xmlNode *effect_list_child; xmlChar *filename, *effect; gboolean is_output; if(AGS_IS_LADSPA_BRIDGE(gobject) || AGS_IS_DSSI_BRIDGE(gobject) || AGS_IS_LIVE_DSSI_BRIDGE(gobject) || AGS_IS_LV2_BRIDGE(gobject) || AGS_IS_LIVE_LV2_BRIDGE(gobject)){ child = child->next; continue; } is_output = TRUE; str = xmlGetProp(child, "is-output"); if(str != NULL){ if(!g_strcmp0(str, "false")){ is_output = FALSE; } } if(is_output){ effect_bulk = (AgsEffectBulk *) AGS_EFFECT_BRIDGE(gobject->bridge)->bulk_output; }else{ effect_bulk = (AgsEffectBulk *) AGS_EFFECT_BRIDGE(gobject->bridge)->bulk_input; } filename = xmlGetProp(child, "filename"); effect = xmlGetProp(child, "effect"); ags_effect_bulk_add_effect(effect_bulk, NULL, filename, effect); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-oscillator-list", 19)){ if(AGS_IS_SYNCSYNTH(gobject)){ GList *oscillator, *list; guint count; guint i; list = gtk_container_get_children(AGS_SYNCSYNTH(gobject)->oscillator); count = g_list_length(list); for(i = 0; i < count; i++){ ags_syncsynth_remove_oscillator(gobject, 0); } g_list_free(list); oscillator = NULL; ags_simple_file_read_oscillator_list(simple_file, child, &oscillator); list = g_list_reverse(oscillator); while(list != NULL){ ags_syncsynth_add_oscillator(gobject, list->data); list = list->next; } g_list_free(oscillator); } }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-pattern-list", 20)){ xmlNode *pattern_list_child; /* pattern list children */ pattern_list_child = child->children; while(pattern_list_child != NULL){ if(pattern_list_child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(pattern_list_child->name, (xmlChar *) "ags-sf-pattern", 15)){ AgsChannel *channel; AgsPattern *pattern; GList *list; xmlChar *content; guint line; guint bank_0, bank_1; guint i; /* retrieve channel */ line = 0; str = xmlGetProp(pattern_list_child, "nth-line"); if(str != NULL){ line = g_ascii_strtoull(str, NULL, 10); } channel = ags_channel_nth(gobject->audio->input, line); /* retrieve bank */ bank_0 = bank_1 = 0; str = xmlGetProp(pattern_list_child, "bank-0"); if(str != NULL){ bank_0 = g_ascii_strtoull(str, NULL, 10); } str = xmlGetProp(pattern_list_child, "bank-1"); if(str != NULL){ bank_1 = g_ascii_strtoull(str, NULL, 10); } /* toggle pattern */ pattern = channel->pattern->data; content = xmlNodeGetContent(pattern_list_child); i = 0; if(content != NULL){ for(i = 0; i < pattern->dim[2]; i++){ if(content[i] == '\0'){ break; } if(content[i] == '1'){ ags_pattern_toggle_bit(pattern, bank_0, bank_1, i); } } } } } pattern_list_child = pattern_list_child->next; } }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-notation-list", 21)){ gchar *version; guint major, minor; version = xmlGetProp(simple_file->root_node, "version"); major = 0; minor = 0; if(version != NULL){ sscanf(version, "%d.%d", &major, &minor); } if(major == 0 || (major == 1 && minor < 2)){ ags_simple_file_read_notation_list_fixup_1_0_to_1_2(simple_file, child, &(gobject->audio->notation)); }else{ ags_simple_file_read_notation_list(simple_file, child, &(gobject->audio->notation)); } }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-preset-list", 21)){ GList *preset; preset = NULL; ags_simple_file_read_preset_list(simple_file, child, &preset); g_list_free_full(gobject->audio->preset, g_object_unref); gobject->audio->preset = preset; } } child = child->next; } if(AGS_IS_LADSPA_BRIDGE(gobject)){ ags_ladspa_bridge_load((AgsLadspaBridge *) gobject); }else if(AGS_IS_DSSI_BRIDGE(gobject)){ ags_dssi_bridge_load((AgsDssiBridge *) gobject); }else if(AGS_IS_LIVE_DSSI_BRIDGE(gobject)){ ags_live_dssi_bridge_load((AgsLiveDssiBridge *) gobject); }else if(AGS_IS_LV2_BRIDGE(gobject)){ ags_lv2_bridge_load((AgsLv2Bridge *) gobject); }else if(AGS_IS_LIVE_LV2_BRIDGE(gobject)){ ags_live_lv2_bridge_load((AgsLiveLv2Bridge *) gobject); } /* retrieve midi mapping */ str = xmlGetProp(node, "audio-start-mapping"); if(str != NULL){ g_object_set(gobject->audio, "audio-start-mapping", g_ascii_strtoull(str, NULL, 10), NULL); } str = xmlGetProp(node, "audio-end-mapping"); if(str != NULL){ g_object_set(gobject->audio, "audio-end-mapping", g_ascii_strtoull(str, NULL, 10), NULL); } str = xmlGetProp(node, "midi-start-mapping"); if(str != NULL){ g_object_set(gobject->audio, "midi-start-mapping", g_ascii_strtoull(str, NULL, 10), NULL); } str = xmlGetProp(node, "midi-end-mapping"); if(str != NULL){ g_object_set(gobject->audio, "midi-end-mapping", g_ascii_strtoull(str, NULL, 10), NULL); } gtk_widget_show_all((GtkWidget *) gobject); /* add audio to soundcard */ list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); g_object_ref(G_OBJECT(gobject->audio)); list = g_list_prepend(list, gobject->audio); ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), list); /* children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-automation-list", 23)){ GList *automation; gchar *version; guint major, minor; version = xmlGetProp(simple_file->root_node, "version"); major = 0; minor = 0; if(version != NULL){ sscanf(version, "%d.%d", &major, &minor); } if(major == 0 || (major == 1 && minor < 3)){ ags_simple_file_read_automation_list_fixup_1_0_to_1_3(simple_file, child, &(gobject->audio->automation)); }else{ ags_simple_file_read_automation_list(simple_file, child, &(gobject->audio->automation)); } } } child = child->next; } /* launch AgsMachine */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "file", simple_file, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_simple_file_read_machine_launch), gobject); ags_simple_file_add_launch(simple_file, (GObject *) file_launch); } void ags_simple_file_read_machine_launch(AgsFileLaunch *file_launch, AgsMachine *machine) { xmlNode *child; xmlChar *str; auto void ags_simple_file_read_drum_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsDrum *drum); auto void ags_simple_file_read_matrix_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsMatrix *matrix); auto void ags_simple_file_read_syncsynth_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsSyncsynth *syncsynth); auto void ags_simple_file_read_ffplayer_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsFFPlayer *ffplayer); auto void ags_simple_file_read_dssi_bridge_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsDssiBridge *dssi_bridge); auto void ags_simple_file_read_live_dssi_bridge_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsLiveDssiBridge *live_dssi_bridge); auto void ags_simple_file_read_lv2_bridge_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsLv2Bridge *lv2_bridge); auto void ags_simple_file_read_live_lv2_bridge_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsLiveLv2Bridge *live_lv2_bridge); auto void ags_simple_file_read_effect_bridge_launch(AgsSimpleFile *simple_file, xmlNode *node, AgsEffectBridge *effect_bridge); auto void ags_simple_file_read_effect_bulk_launch(AgsSimpleFile *simple_file, xmlNode *node, AgsEffectBulk *effect_bulk); auto void ags_simple_file_read_bulk_member_launch(AgsSimpleFile *simple_file, xmlNode *node, AgsBulkMember *bulk_member); void ags_simple_file_read_drum_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsDrum *drum){ xmlChar *str; guint bank_0, bank_1; /* bank 0 */ bank_0 = 0; str = xmlGetProp(node, "bank-0"); if(str != NULL){ bank_0 = g_ascii_strtod(str, NULL); if(bank_0 < 4){ gtk_toggle_button_set_active(drum->index0[bank_0], TRUE); } } /* bank 1 */ bank_1 = 0; str = xmlGetProp(node, "bank-1"); if(str != NULL){ bank_1 = g_ascii_strtod(str, NULL); if(bank_1 < 12){ gtk_toggle_button_set_active(drum->index1[bank_1], TRUE); } } /* loop */ str = xmlGetProp(node, "loop"); if(str != NULL && !g_strcmp0(str, "true")){ gtk_toggle_button_set_active((GtkToggleButton *) drum->loop_button, TRUE); } /* length */ str = xmlGetProp(node, "length"); if(str != NULL){ guint length; length = g_ascii_strtoull(str, NULL, 10); gtk_adjustment_set_value(drum->length_spin->adjustment, (gdouble) length); } } void ags_simple_file_read_matrix_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsMatrix *matrix){ xmlChar *str; guint bank_0, bank_1; /* bank 1 */ bank_1 = 0; str = xmlGetProp(node, "bank-1"); if(str != NULL){ bank_1 = g_ascii_strtod(str, NULL); if(bank_1 < 9){ gtk_toggle_button_set_active(matrix->index[bank_1], TRUE); } } /* loop */ str = xmlGetProp(node, "loop"); if(str != NULL && !g_strcmp0(str, "true")){ gtk_toggle_button_set_active((GtkToggleButton *) matrix->loop_button, TRUE); } /* length */ str = xmlGetProp(node, "length"); if(str != NULL){ guint length; length = g_ascii_strtoull(str, NULL, 10); gtk_adjustment_set_value(matrix->length_spin->adjustment, (gdouble) length); } } void ags_simple_file_read_synth_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsSynth *synth){ xmlChar *str; /* base note */ str = xmlGetProp(node, "base-note"); if(str != NULL){ gdouble base_note; base_note = g_ascii_strtod(str, NULL); if(base_note > AGS_SYNTH_BASE_NOTE_MIN && base_note < AGS_SYNTH_BASE_NOTE_MAX){ gtk_adjustment_set_value(synth->lower->adjustment, (gdouble) base_note); } } } void ags_simple_file_read_syncsynth_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsSyncsynth *syncsynth){ GList *list, *list_start; GList *child_start; xmlChar *str; gdouble tmp0, tmp1; gdouble loop_upper; /* base note */ str = xmlGetProp(node, "base-note"); if(str != NULL){ gdouble base_note; base_note = g_ascii_strtod(str, NULL); if(base_note > AGS_SYNCSYNTH_BASE_NOTE_MIN && base_note < AGS_SYNCSYNTH_BASE_NOTE_MAX){ gtk_adjustment_set_value(syncsynth->lower->adjustment, (gdouble) base_note); } } /* set range of loop start and loop end */ ags_syncsynth_reset_loop(syncsynth); /* audio loop start */ str = xmlGetProp(node, "audio-loop-start"); if(str != NULL){ guint audio_loop_start; audio_loop_start = g_ascii_strtoull(str, NULL, 10); gtk_adjustment_set_value(syncsynth->loop_start->adjustment, (gdouble) audio_loop_start); } /* audio loop end */ str = xmlGetProp(node, "audio-loop-end"); if(str != NULL){ guint audio_loop_end; audio_loop_end = g_ascii_strtoull(str, NULL, 10); gtk_adjustment_set_value(syncsynth->loop_end->adjustment, (gdouble) audio_loop_end); } } void ags_simple_file_read_ffplayer_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsFFPlayer *ffplayer){ GtkTreeModel *model; GtkTreeIter iter; xmlChar *str; gchar *value; str = xmlGetProp(node, "filename"); ags_ffplayer_open_filename(ffplayer, str); if(ffplayer->ipatch == NULL || ffplayer->ipatch->base == NULL){ return; } #ifdef AGS_WITH_LIBINSTPATCH while(g_static_rec_mutex_unlock_full(((IpatchItem *) (ffplayer->ipatch->base))->mutex) != 0); #endif /* preset */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(ffplayer->preset)); str = xmlGetProp(node, "preset"); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) ffplayer->preset, &iter); break; } }while(gtk_tree_model_iter_next(model, &iter)); } #ifdef AGS_WITH_LIBINSTPATCH while(g_static_rec_mutex_unlock_full(((IpatchItem *) (ffplayer->ipatch->base))->mutex) != 0); #endif /* instrument */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(ffplayer->instrument)); str = xmlGetProp(node, "instrument"); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) ffplayer->instrument, &iter); break; } }while(gtk_tree_model_iter_next(model, &iter)); } #ifdef AGS_WITH_LIBINSTPATCH while(g_static_rec_mutex_unlock_full(((IpatchItem *) (ffplayer->ipatch->base))->mutex) != 0); #endif } void ags_simple_file_read_dssi_bridge_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsDssiBridge *dssi_bridge){ GtkTreeModel *model; GtkTreeIter iter; xmlChar *str; gchar *value; /* program */ //NOTE:JK: work-around gtk_combo_box_set_active((GtkComboBox *) dssi_bridge->program, 0); model = gtk_combo_box_get_model((GtkComboBox *) dssi_bridge->program); str = xmlGetProp(node, "program"); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) dssi_bridge->program, &iter); break; } }while(gtk_tree_model_iter_next(model, &iter)); } } void ags_simple_file_read_live_dssi_bridge_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsLiveDssiBridge *live_dssi_bridge){ GtkTreeModel *model; GtkTreeIter iter; xmlChar *str; gchar *value; /* program */ //NOTE:JK: work-around gtk_combo_box_set_active((GtkComboBox *) live_dssi_bridge->program, 0); model = gtk_combo_box_get_model((GtkComboBox *) live_dssi_bridge->program); str = xmlGetProp(node, "program"); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) live_dssi_bridge->program, &iter); break; } }while(gtk_tree_model_iter_next(model, &iter)); } } void ags_simple_file_read_lv2_bridge_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsLv2Bridge *lv2_bridge){ GtkTreeModel *model; GtkTreeIter iter; xmlChar *str; gchar *value; if(lv2_bridge->preset == NULL){ return; } /* program */ //NOTE:JK: work-around gtk_combo_box_set_active((GtkComboBox *) lv2_bridge->preset, 0); model = gtk_combo_box_get_model((GtkComboBox *) lv2_bridge->preset); str = xmlGetProp(node, "preset"); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) lv2_bridge->preset, &iter); break; } }while(gtk_tree_model_iter_next(model, &iter)); } } void ags_simple_file_read_live_lv2_bridge_launch(AgsSimpleFile *simpleFile, xmlNode *node, AgsLiveLv2Bridge *live_lv2_bridge){ GtkTreeModel *model; GtkTreeIter iter; xmlChar *str; gchar *value; if(live_lv2_bridge->preset == NULL){ return; } /* program */ //NOTE:JK: work-around gtk_combo_box_set_active((GtkComboBox *) live_lv2_bridge->preset, 0); model = gtk_combo_box_get_model((GtkComboBox *) live_lv2_bridge->preset); str = xmlGetProp(node, "preset"); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) live_lv2_bridge->preset, &iter); break; } }while(gtk_tree_model_iter_next(model, &iter)); } } void ags_simple_file_read_effect_bridge_launch(AgsSimpleFile *simple_file, xmlNode *node, AgsEffectBridge *effect_bridge){ AgsEffectBulk *effect_bulk; xmlNode *child; xmlChar *str; gboolean is_output; is_output = TRUE; str = xmlGetProp(node, "is-output"); if(str != NULL && !g_strcmp0(str, "false")){ is_output = FALSE; } if(is_output){ effect_bulk = (AgsEffectBulk *) AGS_EFFECT_BRIDGE(machine->bridge)->bulk_output; }else{ effect_bulk = (AgsEffectBulk *) AGS_EFFECT_BRIDGE(machine->bridge)->bulk_input; } /* effect list children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-effect", 14)){ ags_simple_file_read_effect_bulk_launch(simple_file, child, effect_bulk); } } child = child->next; } } void ags_simple_file_read_effect_bulk_launch(AgsSimpleFile *simple_file, xmlNode *node, AgsEffectBulk *effect_bulk){ xmlNode *child; xmlChar *filename, *effect; filename = xmlGetProp(node, "filename"); effect = xmlGetProp(node, "effect"); /* effect list children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-control", 15)){ GList *list_start, *list; xmlChar *specifier; specifier = xmlGetProp(child, "specifier"); list_start = gtk_container_get_children(GTK_CONTAINER(effect_bulk->table)); list = list_start; while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ AgsBulkMember *bulk_member; bulk_member = AGS_BULK_MEMBER(list->data); if(!g_strcmp0(bulk_member->filename, filename) && !g_strcmp0(bulk_member->effect, effect) && !g_strcmp0(bulk_member->specifier, specifier)){ ags_simple_file_read_bulk_member_launch(simple_file, child, bulk_member); break; } } list = list->next; } g_list_free(list_start); } } child = child->next; } } void ags_simple_file_read_bulk_member_launch(AgsSimpleFile *simple_file, xmlNode *node, AgsBulkMember *bulk_member) { GtkWidget *child_widget; xmlChar *str; gdouble val; str = xmlGetProp(node, "value"); child_widget = gtk_bin_get_child((GtkBin *) bulk_member); if(GTK_IS_RANGE(child_widget)){ if(str != NULL){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(GTK_RANGE(child_widget)->adjustment, val); } }else if(GTK_IS_SPIN_BUTTON(child_widget)){ if(str != NULL){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(GTK_SPIN_BUTTON(child_widget)->adjustment, val); } }else if(AGS_IS_DIAL(child_widget)){ if(str != NULL){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, val); ags_dial_draw((AgsDial *) child_widget); } }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ if(str != NULL){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, ((!g_ascii_strncasecmp(str, "true", 5)) ? TRUE: FALSE)); } }else{ g_warning("ags_simple_file_read_bulk_member_launch() - unknown bulk member type"); } } if(AGS_IS_DRUM(machine)){ ags_simple_file_read_drum_launch((AgsSimpleFile *) file_launch->file, file_launch->node, (AgsDrum *) machine); }else if(AGS_IS_MATRIX(machine)){ ags_simple_file_read_matrix_launch((AgsSimpleFile *) file_launch->file, file_launch->node, (AgsMatrix *) machine); }else if(AGS_IS_SYNTH(machine)){ ags_simple_file_read_synth_launch((AgsSimpleFile *) file_launch->file, file_launch->node, (AgsSynth *) machine); }else if(AGS_IS_SYNCSYNTH(machine)){ ags_simple_file_read_syncsynth_launch((AgsSimpleFile *) file_launch->file, file_launch->node, (AgsSyncsynth *) machine); }else if(AGS_IS_FFPLAYER(machine)){ ags_simple_file_read_ffplayer_launch((AgsSimpleFile *) file_launch->file, file_launch->node, (AgsFFPlayer *) machine); }else if(AGS_IS_DSSI_BRIDGE(machine)){ ags_simple_file_read_dssi_bridge_launch((AgsSimpleFile *) file_launch->file, file_launch->node, (AgsDssiBridge *) machine); }else if(AGS_IS_DSSI_BRIDGE(machine)){ ags_simple_file_read_live_dssi_bridge_launch((AgsSimpleFile *) file_launch->file, file_launch->node, (AgsDssiBridge *) machine); }else if(AGS_IS_LV2_BRIDGE(machine)){ ags_simple_file_read_lv2_bridge_launch((AgsSimpleFile *) file_launch->file, file_launch->node, (AgsLv2Bridge *) machine); }else if(AGS_IS_LV2_BRIDGE(machine)){ ags_simple_file_read_live_lv2_bridge_launch((AgsSimpleFile *) file_launch->file, file_launch->node, (AgsLv2Bridge *) machine); } /* children */ child = file_launch->node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-property-list", 21)){ GList *property_start, *property; property_start = NULL; ags_simple_file_read_property_list((AgsSimpleFile *) file_launch->file, child, &property_start); property = property_start; while(property != NULL){ g_object_set_property((GObject *) machine, ((GParameter *) property->data)->name, &(((GParameter *) property->data)->value)); property = property->next; } g_list_free_full(property_start, g_free); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-effect-list", 19)){ ags_simple_file_read_effect_bridge_launch((AgsSimpleFile *) file_launch->file, child, (AgsEffectBridge *) machine->bridge); } } child = child->next; } } void ags_simple_file_read_pad_list(AgsSimpleFile *simple_file, xmlNode *node, GList **pad) { AgsPad *current; xmlNode *child; GList *list; guint i; child = node->children; list = NULL; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-pad", 11)){ current = NULL; if(*pad != NULL){ GList *iter; iter = g_list_nth(*pad, i); if(iter != NULL){ current = iter->data; } } ags_simple_file_read_pad(simple_file, child, ¤t); list = g_list_prepend(list, current); i++; } } child = child->next; } list = g_list_reverse(list); *pad = list; } void ags_simple_file_read_pad(AgsSimpleFile *simple_file, xmlNode *node, AgsPad **pad) { AgsMachine *machine; AgsPad *gobject; AgsFileLaunch *file_launch; AgsFileIdRef *file_id_ref; xmlNode *child; GList *list, *list_start; xmlChar *str; guint nth_pad; if(pad != NULL && pad[0] != NULL){ gobject = pad[0]; nth_pad = gobject->channel->pad; }else{ file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_node(simple_file, node->parent->parent); machine = file_id_ref->ref; if(!AGS_IS_MACHINE(machine)){ return; } /* get nth pad */ nth_pad = 0; str = xmlGetProp(node, "nth-pad"); if(str != NULL){ nth_pad = g_ascii_strtoull(str, NULL, 10); } /* retrieve pad */ gobject = NULL; str = xmlGetProp(node->parent, "is-output"); list_start = NULL; if(!g_strcmp0(str, "false")){ if(machine->input != NULL){ list_start = gtk_container_get_children((GtkContainer *) machine->input); } }else{ if(machine->output != NULL){ list_start = gtk_container_get_children((GtkContainer *) machine->output); } } list = g_list_nth(list_start, nth_pad); if(list != NULL){ gobject = AGS_PAD(list->data); } g_list_free(list_start); } ags_simple_file_add_id_ref(simple_file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", simple_file->application_context, "file", simple_file, "node", node, "reference", gobject, NULL)); /* children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-line-list", 17)){ GList *line; line = NULL; ags_simple_file_read_line_list(simple_file, child, &line); g_list_free(line); } } child = child->next; } ags_connectable_connect(AGS_CONNECTABLE(gobject)); /* launch AgsPad */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_simple_file_read_pad_launch), gobject); ags_simple_file_add_launch(simple_file, (GObject *) file_launch); } void ags_simple_file_read_pad_launch(AgsFileLaunch *file_launch, AgsPad *pad) { xmlNode *child; xmlChar *str; if(AGS_IS_PAD(pad)){ str = xmlGetProp(file_launch->node, "group"); gtk_toggle_button_set_active(pad->group, g_strcmp0(str, "false")); str = xmlGetProp(file_launch->node, "mute"); gtk_toggle_button_set_active(pad->mute, g_strcmp0(str, "false")); str = xmlGetProp(file_launch->node, "solo"); gtk_toggle_button_set_active(pad->solo, g_strcmp0(str, "false")); } /* children */ child = file_launch->node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-property-list", 21)){ GList *property_start, *property; property_start = NULL; ags_simple_file_read_property_list((AgsSimpleFile *) file_launch->file, child, &property_start); property = property_start; while(property != NULL){ g_object_set_property((GObject *) pad, ((GParameter *) property->data)->name, &(((GParameter *) property->data)->value)); property = property->next; } g_list_free_full(property_start, g_free); } } child = child->next; } } void ags_simple_file_read_line_list(AgsSimpleFile *simple_file, xmlNode *node, GList **line) { AgsLine *current; GList *list; xmlNode *child; guint i; child = node->children; list = NULL; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-line", 12)){ current = NULL; if(line[0] != NULL){ GList *iter; iter = g_list_nth(line[0], i); if(iter != NULL){ current = iter->data; } } ags_simple_file_read_line(simple_file, child, ¤t); list = g_list_prepend(list, current); i++; } } child = child->next; } list = g_list_reverse(list); *line = list; } void ags_simple_file_read_line(AgsSimpleFile *simple_file, xmlNode *node, AgsLine **line) { AgsPad *pad; GObject *gobject; AgsConfig *config; GObject *soundcard; AgsFileLaunch *file_launch; AgsFileIdRef *file_id_ref; xmlNode *child; GList *list; xmlChar *device; xmlChar *str; guint nth_line; guint i; auto void ags_simple_file_read_line_member(AgsSimpleFile *simple_file, xmlNode *node, AgsLineMember *line_member); void ags_simple_file_read_line_member(AgsSimpleFile *simple_file, xmlNode *node, AgsLineMember *line_member){ GtkWidget *child_widget; xmlChar *str; gdouble val; line_member->flags |= AGS_LINE_MEMBER_APPLY_INITIAL; str = xmlGetProp(node, "control-type"); if(str != NULL){ g_object_set(line_member, "widget-type", g_type_from_name(str), NULL); } child_widget = gtk_bin_get_child((GtkBin *) line_member); /* apply value */ str = xmlGetProp(node, "value"); if(str != NULL){ if(AGS_IS_DIAL(child_widget)){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, val); }else if(GTK_IS_RANGE(child_widget)){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(GTK_RANGE(child_widget)->adjustment, val); }else if(GTK_IS_SPIN_BUTTON(child_widget)){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(GTK_SPIN_BUTTON(child_widget)->adjustment, val); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, ((!g_ascii_strncasecmp(str, "true", 5)) ? TRUE: FALSE)); }else{ g_warning("ags_simple_file_read_line() - unknown line member type"); } } } if(line != NULL && line[0] != NULL){ gobject = AGS_LINE(line[0]); nth_line = AGS_LINE(gobject)->channel->line; }else{ GList *list_start, *list; file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_node(simple_file, node->parent->parent); if(!AGS_IS_PAD(file_id_ref->ref)){ pad = NULL; }else{ pad = file_id_ref->ref; } /* get nth-line */ nth_line = 0; str = xmlGetProp(node, "nth-line"); if(str != NULL){ nth_line = g_ascii_strtoull(str, NULL, 10); } /* retrieve line or channel */ gobject = NULL; if(pad != NULL){ list_start = gtk_container_get_children((GtkContainer *) pad->expander_set); list = list_start; while(list != NULL){ if(AGS_IS_LINE(list->data) && AGS_LINE(list->data)->channel->line == nth_line){ gobject = list->data; break; } list = list->next; } if(list_start != NULL){ g_list_free(list_start); } }else{ AgsMachine *machine; gboolean is_output; // "./ancestor::*[self::ags-sf-machine][1]" file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_node(simple_file, node->parent->parent->parent->parent); machine = file_id_ref->ref; if(!AGS_IS_MACHINE(machine)){ return; } is_output = TRUE; str = xmlGetProp(node->parent->parent->parent, "is-output"); if(str != NULL && !g_strcmp0(str, "false")){ is_output = FALSE; } if(is_output){ gobject = (GObject *) ags_channel_nth(machine->audio->output, nth_line); }else{ gobject = (GObject *) ags_channel_nth(machine->audio->input, nth_line); } } } ags_simple_file_add_id_ref(simple_file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", simple_file->application_context, "file", simple_file, "node", node, "reference", gobject, NULL)); /* device */ config = ags_config_get_instance(); /* find soundcard */ soundcard = NULL; device = xmlGetProp(node, "soundcard-device"); if(device != NULL){ list = AGS_XORG_APPLICATION_CONTEXT(simple_file->application_context)->soundcard; for(i = 0; list != NULL; i++){ str = ags_soundcard_get_device(AGS_SOUNDCARD(list->data)); if(str != NULL && !g_ascii_strcasecmp(str, device)){ soundcard = list->data; break; } /* iterate soundcard */ list = list->next; } } if(soundcard == NULL && AGS_XORG_APPLICATION_CONTEXT(simple_file->application_context)->soundcard != NULL){ soundcard = AGS_XORG_APPLICATION_CONTEXT(simple_file->application_context)->soundcard->data; } if(AGS_IS_LINE(gobject)){ g_object_set(AGS_LINE(gobject)->channel, "soundcard", soundcard, NULL); }else if(AGS_IS_CHANNEL(gobject)){ g_object_set(AGS_CHANNEL(gobject), "soundcard", soundcard, NULL); } /* children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-effect-list", 19) && AGS_IS_LINE(gobject)){ xmlNode *effect_list_child; GList *mapped_filename, *mapped_effect; /* effect list children */ effect_list_child = child->children; mapped_filename = NULL; mapped_effect = NULL; while(effect_list_child != NULL){ if(effect_list_child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(effect_list_child->name, (xmlChar *) "ags-sf-effect", 14)){ xmlNode *effect_child; xmlChar *filename, *effect; filename = xmlGetProp(effect_list_child, "filename"); effect = xmlGetProp(effect_list_child, "effect"); if(filename != NULL && effect != NULL){ if(g_list_find_custom(mapped_filename, filename, (GCompareFunc) g_strcmp0) == NULL || g_list_find_custom(mapped_effect, effect, (GCompareFunc) g_strcmp0) == NULL){ mapped_filename = g_list_prepend(mapped_filename, filename); mapped_effect = g_list_prepend(mapped_effect, effect); if(AGS_IS_LINE(gobject)){ ags_channel_add_effect(AGS_LINE(gobject)->channel, filename, effect); }else if(AGS_IS_CHANNEL(gobject)){ ags_channel_add_effect((AgsChannel *) gobject, filename, effect); } } } /* effect list children */ effect_child = effect_list_child->children; while(effect_child != NULL){ if(effect_child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(effect_child->name, (xmlChar *) "ags-sf-control", 15)){ AgsLineMember *line_member; GList *list_start, *list; xmlChar *specifier; specifier = xmlGetProp(effect_child, "specifier"); list = list_start = gtk_container_get_children((GtkContainer *) AGS_LINE(gobject)->expander->table); while(list != NULL){ if(AGS_IS_LINE_MEMBER(list->data)){ line_member = AGS_LINE_MEMBER(list->data); if(((filename == NULL && effect == NULL) || (strlen(filename) == 0 && strlen(effect) == 0) || (!g_strcmp0(line_member->filename, filename) && !g_strcmp0(line_member->effect, effect))) && !g_strcmp0(line_member->specifier, specifier)){ ags_simple_file_read_line_member(simple_file, effect_child, line_member); break; } } list = list->next; } if(list_start != NULL){ g_list_free(list_start); } } } effect_child = effect_child->next; } } } effect_list_child = effect_list_child->next; } }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-oscillator", 15)){ if(AGS_IS_SYNTH_INPUT_LINE(gobject)){ ags_simple_file_read_oscillator(simple_file, child, &(AGS_SYNTH_INPUT_LINE(gobject)->oscillator)); } }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-property-list", 14)){ GList *property_start, *property; property_start = NULL; ags_simple_file_read_property_list((AgsSimpleFile *) file_launch->file, child, &property_start); property = property_start; while(property != NULL){ g_object_set_property((GObject *) pad, ((GParameter *) property->data)->name, &(((GParameter *) property->data)->value)); property = property->next; } g_list_free_full(property_start, g_free); } } child = child->next; } // ags_connectable_connect(AGS_CONNECTABLE(gobject)); /* launch AgsLine */ if(AGS_IS_LINE(gobject)){ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "file", simple_file, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_simple_file_read_line_launch), gobject); ags_simple_file_add_launch(simple_file, (GObject *) file_launch); }else if(AGS_IS_CHANNEL(gobject)){ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "file", simple_file, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_simple_file_read_channel_line_launch), gobject); ags_simple_file_add_launch(simple_file, (GObject *) file_launch); }else{ g_warning("ags_simple_file_read_line() - failed"); } } void ags_simple_file_read_line_launch(AgsFileLaunch *file_launch, AgsLine *line) { AgsMachine *machine; AgsChannel *channel, *link; xmlNode *child; GList *xpath_result; xmlChar *str; guint nth_line; gboolean is_output; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) line, AGS_TYPE_MACHINE); /* link or file */ is_output = TRUE; str = xmlGetProp(file_launch->node->parent->parent->parent, "is-output"); if(str != NULL && !g_strcmp0(str, "false")){ is_output = FALSE; } nth_line = 0; str = xmlGetProp(file_launch->node, "nth-line"); if(str != NULL){ nth_line = g_ascii_strtoull(str, NULL, 10); } if(is_output){ channel = ags_channel_nth(machine->audio->output, nth_line); }else{ channel = ags_channel_nth(machine->audio->input, nth_line); } str = xmlGetProp(file_launch->node, "filename"); if(str != NULL && !g_ascii_strncasecmp(str, "file://", 7)){ AgsAudioFile *audio_file; AgsAudioFileLink *file_link; GList *audio_signal_list; gchar *filename; guint file_channel; /* filename */ filename = g_strdup(&(str[7])); /* audio channel to read */ file_channel = 0; str = xmlGetProp(file_launch->node, "file-channel"); if(str != NULL){ file_channel = g_ascii_strtoull(str, NULL, 10); } /* read audio signal */ audio_file = ags_audio_file_new(filename, machine->audio->soundcard, file_channel, 1); ags_audio_file_open(audio_file); ags_audio_file_read_audio_signal(audio_file); /* add audio signal */ audio_signal_list = audio_file->audio_signal; file_link = g_object_new(AGS_TYPE_AUDIO_FILE_LINK, "filename", filename, "audio-channel", file_channel, NULL); g_object_set(G_OBJECT(channel), "file-link", file_link, NULL); if(audio_signal_list != NULL){ AGS_AUDIO_SIGNAL(audio_signal_list->data)->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(channel->first_recycling, audio_signal_list->data); } }else{ str = xmlGetProp(file_launch->node, "link"); xpath_result = NULL; if(str != NULL){ xpath_result = ags_simple_file_find_id_ref_by_xpath((AgsSimpleFile *) file_launch->file, str); } while(xpath_result != NULL){ AgsFileIdRef *file_id_ref; file_id_ref = xpath_result->data; if(AGS_IS_CHANNEL(file_id_ref->ref)){ GError *error; link = file_id_ref->ref; error = NULL; ags_channel_set_link(channel, link, &error); if(error != NULL){ g_warning("ags_simple_file_read_line_launch() - %s", error->message); } break; }else if(AGS_IS_LINE(file_id_ref->ref)){ GError *error; link = AGS_LINE(file_id_ref->ref)->channel; error = NULL; ags_channel_set_link(channel, link, &error); if(error != NULL){ g_warning("ags_simple_file_read_line_launch() - %s", error->message); } break; } xpath_result = xpath_result->next; } } /* is-grouped */ if(AGS_IS_LINE(line)){ gtk_toggle_button_set_active(line->group, g_strcmp0(xmlGetProp(file_launch->node, "group"), "false")); } /* children */ child = file_launch->node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-property-list", 21)){ GList *property_start, *property; property_start = NULL; ags_simple_file_read_property_list((AgsSimpleFile *) file_launch->file, child, &property_start); property = property_start; while(property != NULL){ g_object_set_property((GObject *) line, ((GParameter *) property->data)->name, &(((GParameter *) property->data)->value)); property = property->next; } g_list_free_full(property_start, g_free); } } child = child->next; } } void ags_simple_file_read_channel_line_launch(AgsFileLaunch *file_launch, AgsChannel *channel) { AgsChannel *link; xmlNode *child; GList *xpath_result; xmlChar *str; str = xmlGetProp(file_launch->node, "filename"); if(str != NULL && !g_ascii_strncasecmp(str, "file://", 7)){ AgsAudioFile *audio_file; AgsAudioFileLink *file_link; GList *audio_signal_list; gchar *filename; guint file_channel; /* filename */ filename = g_strdup(&(str[7])); /* audio channel to read */ file_channel = 0; str = xmlGetProp(file_launch->node, "file-channel"); if(str != NULL){ file_channel = g_ascii_strtoull(str, NULL, 10); } /* read audio signal */ audio_file = ags_audio_file_new(filename, channel->soundcard, file_channel, 1); ags_audio_file_open(audio_file); ags_audio_file_read_audio_signal(audio_file); /* add audio signal */ audio_signal_list = audio_file->audio_signal; file_link = g_object_new(AGS_TYPE_AUDIO_FILE_LINK, "filename", filename, "audio-channel", file_channel, NULL); g_object_set(G_OBJECT(channel), "file-link", file_link, NULL); if(audio_signal_list != NULL){ AGS_AUDIO_SIGNAL(audio_signal_list->data)->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(channel->first_recycling, audio_signal_list->data); } }else{ str = xmlGetProp(file_launch->node, "link"); xpath_result = NULL; if(str != NULL){ xpath_result = ags_simple_file_find_id_ref_by_xpath((AgsSimpleFile *) file_launch->file, str); } while(xpath_result != NULL){ AgsFileIdRef *file_id_ref; file_id_ref = xpath_result->data; if(AGS_IS_CHANNEL(file_id_ref->ref)){ GError *error; link = file_id_ref->ref; error = NULL; ags_channel_set_link(channel, link, &error); if(error != NULL){ g_warning("ags_simple_file_read_line_launch() - %s", error->message); } break; }else if(AGS_IS_LINE(file_id_ref->ref)){ GError *error; link = AGS_LINE(file_id_ref->ref)->channel; error = NULL; ags_channel_set_link(channel, link, &error); if(error != NULL){ g_warning("ags_simple_file_read_line_launch() - %s", error->message); } break; } xpath_result = xpath_result->next; } } } void ags_simple_file_read_effect_pad_list(AgsSimpleFile *simple_file, xmlNode *node, GList **effect_pad) { AgsEffectPad *current; GList *list; xmlNode *child; child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-effect-pad", 11)){ current = NULL; ags_simple_file_read_effect_pad(simple_file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *effect_pad = list; } void ags_simple_file_read_effect_pad(AgsSimpleFile *simple_file, xmlNode *node, AgsEffectPad **effect_pad) { AgsEffectPad *gobject; AgsFileLaunch *file_launch; xmlNode *child; if(*effect_pad != NULL){ gobject = *effect_pad; }else{ return; } /* children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-effect-line-list", 24)){ GList *list; list = NULL; ags_simple_file_read_effect_line_list(simple_file, child, &list); g_list_free(list); } } child = child->next; } /* launch AgsEffectPad */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_simple_file_read_effect_pad_launch), gobject); ags_simple_file_add_launch(simple_file, (GObject *) file_launch); } void ags_simple_file_read_effect_pad_launch(AgsFileLaunch *file_launch, AgsEffectPad *effect_pad) { /* empty */ } void ags_simple_file_read_effect_line_list(AgsSimpleFile *simple_file, xmlNode *node, GList **effect_line) { AgsEffectLine *current; xmlNode *child; GList *list; guint i; child = node->children; list = NULL; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-effect-line", 11)){ current = NULL; if(*effect_line != NULL){ GList *iter; iter = g_list_nth(*effect_line, i); if(iter != NULL){ current = iter->data; } } ags_simple_file_read_effect_line(simple_file, child, ¤t); list = g_list_prepend(list, current); i++; } } child = child->next; } list = g_list_reverse(list); *effect_line = list; } void ags_simple_file_read_effect_line(AgsSimpleFile *simple_file, xmlNode *node, AgsEffectLine **effect_line) { AgsEffectLine *gobject; AgsFileLaunch *file_launch; xmlNode *child; xmlChar *str; if(*effect_line != NULL){ gobject = *effect_line; }else{ return; } /* children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-effect-list", 19)){ xmlNode *effect_list_child; /* effect list children */ effect_list_child = child->children; while(effect_list_child != NULL){ if(effect_list_child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(effect_list_child->name, (xmlChar *) "ags-sf-effect", 14)){ xmlNode *effect_child; xmlChar *filename, *effect; filename = xmlGetProp(effect_list_child, "filename"); effect = xmlGetProp(effect_list_child, "effect"); /* effect list children */ effect_child = child->children; while(effect_child != NULL){ if(effect_child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(effect_child->name, (xmlChar *) "ags-sf-control", 15)){ AgsLineMember *line_member; GtkWidget *child_widget; GList *list_start, *list; xmlChar *specifier; gdouble val; specifier = xmlGetProp(effect_child, "specifier"); str = xmlGetProp(effect_child, "value"); if(str != NULL){ val = g_ascii_strtod(str, NULL); list = list_start = gtk_container_get_children((GtkContainer *) gobject->table); while(list != NULL){ if(AGS_IS_LINE_MEMBER(list->data)){ line_member = AGS_LINE_MEMBER(list->data); if(!g_strcmp0(line_member->filename, filename) && !g_strcmp0(line_member->effect, effect) && !g_strcmp0(line_member->specifier, specifier)){ child_widget = gtk_bin_get_child((GtkBin *) line_member); if(GTK_IS_RANGE(child_widget)){ gtk_adjustment_set_value(GTK_RANGE(child_widget)->adjustment, val); }else if(GTK_IS_SPIN_BUTTON(child_widget)){ gtk_adjustment_set_value(GTK_SPIN_BUTTON(child_widget)->adjustment, val); }else if(AGS_IS_DIAL(child_widget)){ gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, val); ags_dial_draw((AgsDial *) child_widget); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, ((val != 0.0) ? TRUE: FALSE)); }else{ g_warning("ags_simple_file_read_effect_line() - unknown line member type"); } break; } } list = list->next; } g_list_free(list_start); } } } effect_child = effect_child->next; } } } effect_list_child = effect_list_child->next; } } } child = child->next; } /* launch AgsEffectLine */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_simple_file_read_effect_line_launch), gobject); ags_simple_file_add_launch(simple_file, (GObject *) file_launch); } void ags_simple_file_read_effect_line_launch(AgsFileLaunch *file_launch, AgsEffectLine *effect_line) { /* empty */ } void ags_simple_file_read_oscillator_list(AgsSimpleFile *simple_file, xmlNode *node, GList **oscillator) { AgsOscillator *current; xmlNode *child; GList *list; guint i; child = node->children; list = NULL; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-oscillator", 14)){ current = NULL; if(*oscillator != NULL){ GList *iter; iter = g_list_nth(*oscillator, i); if(iter != NULL){ current = iter->data; } } ags_simple_file_read_oscillator(simple_file, child, ¤t); list = g_list_prepend(list, current); i++; } } child = child->next; } list = g_list_reverse(list); *oscillator = list; } void ags_simple_file_read_oscillator(AgsSimpleFile *simple_file, xmlNode *node, AgsOscillator **oscillator) { AgsOscillator *gobject; xmlChar *str; gdouble val; guint nth; if(*oscillator != NULL){ gobject = AGS_OSCILLATOR(oscillator[0]); }else{ gobject = ags_oscillator_new(); *oscillator = gobject; } str = xmlGetProp(node, "wave"); if(str != NULL){ nth = g_ascii_strtoull(str, NULL, 10); gtk_combo_box_set_active(gobject->wave, nth); } str = xmlGetProp(node, "attack"); if(str != NULL){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(gobject->attack->adjustment, val); } str = xmlGetProp(node, "frequency"); if(str != NULL){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(gobject->frequency->adjustment, val); } str = xmlGetProp(node, "length"); if(str != NULL){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(gobject->frame_count->adjustment, val); } str = xmlGetProp(node, "phase"); if(str != NULL){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(gobject->phase->adjustment, val); } str = xmlGetProp(node, "volume"); if(str != NULL){ val = g_ascii_strtod(str, NULL); gtk_adjustment_set_value(gobject->volume->adjustment, val); } str = xmlGetProp(node, "sync"); if(str != NULL && !xmlStrncmp(str, "true", 5)){ gtk_toggle_button_set_active(gobject->do_sync, TRUE); } str = xmlGetProp(node, "sync-point"); if(str != NULL){ gchar *endptr; gdouble current; guint i; endptr = str; for(i = 0; *endptr != '\0' && i < 2 * gobject->sync_point_count; i++){ current = g_strtod(endptr, &endptr); gtk_spin_button_set_value(gobject->sync_point[i], current); } } } void ags_simple_file_read_notation_editor(AgsSimpleFile *simple_file, xmlNode *node, AgsNotationEditor **notation_editor) { AgsNotationEditor *gobject; AgsFileLaunch *file_launch; if(*notation_editor != NULL){ gobject = *notation_editor; }else{ return; } /* launch AgsLine */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "file", simple_file, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_simple_file_read_notation_editor_launch), gobject); ags_simple_file_add_launch(simple_file, (GObject *) file_launch); } void ags_simple_file_read_notation_editor_launch(AgsFileLaunch *file_launch, AgsNotationEditor *notation_editor) { xmlNode *child; xmlChar *str; str = xmlGetProp(file_launch->node, "zoom"); if(str != NULL){ GtkTreeModel *model; GtkTreeIter iter; gchar *value; model = gtk_combo_box_get_model(GTK_COMBO_BOX(notation_editor->notation_toolbar->zoom)); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) notation_editor->notation_toolbar->zoom, &iter); break; } }while(gtk_tree_model_iter_next(model, &iter)); } } /* children */ child = file_launch->node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-property-list", 21)){ GList *list_start, *list; GList *property_start, *property; property_start = NULL; ags_simple_file_read_property_list((AgsSimpleFile *) file_launch->file, child, &property_start); property = property_start; while(property != NULL){ if(!g_strcmp0(((GParameter *) property->data)->name, "machine")){ AgsMachine *machine; GList *file_id_ref; GList *list_start, *list; str = g_value_get_string(&(((GParameter *) property->data)->value)); if(str != NULL){ file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_xpath((AgsSimpleFile *) file_launch->file, str); machine = AGS_FILE_ID_REF(file_id_ref->data)->ref; ags_machine_selector_add_index(notation_editor->machine_selector); list_start = gtk_container_get_children((GtkContainer *) notation_editor->machine_selector); list = g_list_last(list_start); gtk_button_clicked(list->data); ags_machine_selector_link_index(notation_editor->machine_selector, machine); g_list_free(list_start); } }else{ g_object_set_property((GObject *) notation_editor, ((GParameter *) property->data)->name, &(((GParameter *) property->data)->value)); } property = property->next; } list_start = gtk_container_get_children((GtkContainer *) notation_editor->machine_selector); list = list_start->next; if(list != NULL){ gtk_button_clicked(list->data); } g_list_free(list_start); g_list_free_full(property_start, g_free); } } child = child->next; } } void ags_simple_file_read_automation_editor(AgsSimpleFile *simple_file, xmlNode *node, AgsAutomationEditor **automation_editor) { AgsAutomationEditor *gobject; AgsFileLaunch *file_launch; if(*automation_editor != NULL){ gobject = *automation_editor; }else{ return; } /* launch AgsLine */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "file", simple_file, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_simple_file_read_automation_editor_launch), gobject); ags_simple_file_add_launch(simple_file, (GObject *) file_launch); } void ags_simple_file_read_automation_editor_launch(AgsFileLaunch *file_launch, AgsAutomationEditor *automation_editor) { xmlNode *child; xmlChar *str; str = xmlGetProp(file_launch->node, "zoom"); if(str != NULL){ GtkTreeModel *model; GtkTreeIter iter; gchar *value; model = gtk_combo_box_get_model(GTK_COMBO_BOX(automation_editor->automation_toolbar->zoom)); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ gtk_combo_box_set_active_iter((GtkComboBox *) automation_editor->automation_toolbar->zoom, &iter); break; } }while(gtk_tree_model_iter_next(model, &iter)); } } /* children */ child = file_launch->node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-property-list", 21)){ GList *list_start, *list; GList *property_start, *property; property_start = NULL; ags_simple_file_read_property_list((AgsSimpleFile *) file_launch->file, child, &property_start); property = property_start; while(property != NULL){ if(!g_strcmp0(((GParameter *) property->data)->name, "machine")){ AgsMachine *machine; xmlNode *machine_child; GList *file_id_ref; GList *list_start, *list; gchar *str; str = g_value_get_string(&(((GParameter *) property->data)->value)); if(str != NULL){ file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_xpath((AgsSimpleFile *) file_launch->file, str); machine = AGS_FILE_ID_REF(file_id_ref->data)->ref; ags_machine_selector_add_index(automation_editor->machine_selector); list_start = gtk_container_get_children((GtkContainer *) automation_editor->machine_selector); list = g_list_last(list_start); gtk_button_clicked(list->data); ags_machine_selector_link_index(automation_editor->machine_selector, machine); /* apply automation ports */ machine_child = AGS_FILE_ID_REF(file_id_ref->data)->node->children; while(machine_child != NULL){ if(machine_child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(machine_child->name, "ags-sf-automation-port-list", 27)){ xmlNode *automation_port; automation_port = machine_child->children; while(automation_port != NULL){ if(automation_port->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(automation_port->name, "ags-sf-automation-port", 22)){ gchar *scope; gchar *specifier; specifier = xmlGetProp(automation_port, "specifier"); specifier = xmlGetProp(automation_port, "scope"); if(specifier != NULL){ GtkTreeModel *model; GtkTreeIter iter; gchar *value0, *value1; model = gtk_combo_box_get_model(GTK_COMBO_BOX(automation_editor->automation_toolbar->port)); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 1, &value0, 2, &value1, -1); if((scope == NULL || !g_ascii_strcasecmp(scope, value0)) && !g_ascii_strcasecmp(specifier, value1)){ gtk_combo_box_set_active_iter(automation_editor->automation_toolbar->port, &iter); } }while(gtk_tree_model_iter_next(model, &iter)); } } } } automation_port = automation_port->next; } } } machine_child = machine_child->next; } g_list_free(list_start); } }else{ g_object_set_property((GObject *) automation_editor, ((GParameter *) property->data)->name, &(((GParameter *) property->data)->value)); } property = property->next; } list_start = gtk_container_get_children((GtkContainer *) automation_editor->machine_selector); list = list_start->next; if(list != NULL){ gtk_button_clicked(list->data); } g_list_free(list_start); g_list_free_full(property_start, g_free); } } child = child->next; } } void ags_simple_file_read_notation_list(AgsSimpleFile *simple_file, xmlNode *node, GList **notation) { AgsNotation *current; xmlNode *child; GList *list; guint i; child = node->children; list = NULL; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-notation", 11)){ current = NULL; if(*notation != NULL){ GList *iter; iter = g_list_nth(*notation, i); if(iter != NULL){ current = iter->data; } } ags_simple_file_read_notation(simple_file, child, ¤t); list = g_list_prepend(list, current); i++; } } child = child->next; } list = g_list_reverse(list); *notation = list; } void ags_simple_file_read_notation_list_fixup_1_0_to_1_2(AgsSimpleFile *simple_file, xmlNode *node, GList **notation) { AgsNotation *current; xmlNode *child; GList *list; guint i; auto void ags_simple_file_read_notation_fixup_1_0_to_1_2(AgsSimpleFile *simple_file, xmlNode *node, GList **notation); void ags_simple_file_read_notation_fixup_1_0_to_1_2(AgsSimpleFile *simple_file, xmlNode *node, GList **notation){ AgsMachine *machine; AgsNotation *gobject; AgsNote *note; AgsTimestamp *timestamp; AgsFileIdRef *file_id_ref; xmlNode *child; GList *notation_list; xmlChar *str; guint audio_channel; gboolean found_timestamp; file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_node(simple_file, node->parent->parent); machine = file_id_ref->ref; audio_channel = 0; str = xmlGetProp(node, "channel"); if(str != NULL){ audio_channel = g_ascii_strtoull(str, NULL, 10); } /* children */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = 0; child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-sf-note", 12)){ note = ags_note_new(); /* position and offset */ str = xmlGetProp(child, "x0"); if(str != NULL){ note->x[0] = g_ascii_strtoull(str, NULL, 10); } str = xmlGetProp(child, "x1"); if(str != NULL){ note->x[1] = g_ascii_strtoull(str, NULL, 10); } str = xmlGetProp(child, "y"); if(str != NULL){ note->y = g_ascii_strtoull(str, NULL, 10); } /* envelope */ str = xmlGetProp(child, "envelope"); if(str != NULL && !g_ascii_strncasecmp(str, "true", 5)){ note->flags |= AGS_NOTE_ENVELOPE; } str = xmlGetProp(child, "attack"); if(str != NULL){ sscanf(str, "%f %f", &(note->attack[0]), &(note->attack[1])); } str = xmlGetProp(child, "decay"); if(str != NULL){ sscanf(str, "%f %f", &(note->decay[0]), &(note->decay[1])); } str = xmlGetProp(child, "sustain"); if(str != NULL){ sscanf(str, "%f %f", &(note->sustain[0]), &(note->sustain[1])); } str = xmlGetProp(child, "release"); if(str != NULL){ sscanf(str, "%f %f", &(note->release[0]), &(note->release[1])); } str = xmlGetProp(child, "ratio"); if(str != NULL){ sscanf(str, "%f %f", &(note->ratio[0]), &(note->ratio[1])); } timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(note->x[0] / AGS_NOTATION_DEFAULT_OFFSET); notation_list = ags_notation_find_near_timestamp(notation[0], audio_channel, timestamp); if(notation_list != NULL){ gobject = notation_list->data; }else{ gobject = g_object_new(AGS_TYPE_NOTATION, "audio", machine->audio, "audio-channel", audio_channel, NULL); gobject->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; notation[0] = ags_notation_add(notation[0], gobject); } /* add */ ags_notation_add_note(gobject, note, FALSE); } } child = child->next; } g_object_unref(timestamp); } if(notation == NULL){ return; } child = node->children; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-notation", 11)){ ags_simple_file_read_notation_fixup_1_0_to_1_2(simple_file, child, notation); i++; } } child = child->next; } } void ags_simple_file_read_notation(AgsSimpleFile *simple_file, xmlNode *node, AgsNotation **notation) { AgsNotation *gobject; AgsNote *note; xmlNode *child; xmlChar *str; guint audio_channel; gboolean found_timestamp; if(*notation != NULL){ gobject = *notation; audio_channel = gobject->audio_channel; }else{ AgsMachine *machine; AgsFileIdRef *file_id_ref; file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_node(simple_file, node->parent->parent); machine = file_id_ref->ref; if(!AGS_IS_MACHINE(machine)){ return; } audio_channel = 0; str = xmlGetProp(node, "channel"); if(str != NULL){ audio_channel = g_ascii_strtoull(str, NULL, 10); } gobject = g_object_new(AGS_TYPE_NOTATION, "audio", machine->audio, "audio-channel", audio_channel, NULL); *notation = gobject; } /* children */ child = node->children; found_timestamp = FALSE; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-sf-timestamp", 17)){ found_timestamp = TRUE; /* offset */ str = xmlGetProp(child, "offset"); if(str != NULL){ gobject->timestamp->timer.ags_offset.offset = g_ascii_strtoull(str, NULL, 10); } } } child = child->next; } child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-sf-note", 12)){ note = ags_note_new(); /* position and offset */ str = xmlGetProp(child, "x0"); if(str != NULL){ note->x[0] = g_ascii_strtoull(str, NULL, 10); } str = xmlGetProp(child, "x1"); if(str != NULL){ note->x[1] = g_ascii_strtoull(str, NULL, 10); } str = xmlGetProp(child, "y"); if(str != NULL){ note->y = g_ascii_strtoull(str, NULL, 10); } /* envelope */ str = xmlGetProp(child, "envelope"); if(str != NULL && !g_ascii_strncasecmp(str, "true", 5)){ note->flags |= AGS_NOTE_ENVELOPE; } str = xmlGetProp(child, "attack"); if(str != NULL){ sscanf(str, "%f %f", &(note->attack[0]), &(note->attack[1])); } str = xmlGetProp(child, "decay"); if(str != NULL){ sscanf(str, "%f %f", &(note->decay[0]), &(note->decay[1])); } str = xmlGetProp(child, "sustain"); if(str != NULL){ sscanf(str, "%f %f", &(note->sustain[0]), &(note->sustain[1])); } str = xmlGetProp(child, "release"); if(str != NULL){ sscanf(str, "%f %f", &(note->release[0]), &(note->release[1])); } str = xmlGetProp(child, "ratio"); if(str != NULL){ sscanf(str, "%f %f", &(note->ratio[0]), &(note->ratio[1])); } /* add */ ags_notation_add_note(gobject, note, FALSE); } } child = child->next; } } void ags_simple_file_read_automation_list(AgsSimpleFile *simple_file, xmlNode *node, GList **automation) { AgsAutomation *current; xmlNode *child; GList *list; guint i; child = node->children; list = NULL; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-automation", 11)){ current = NULL; if(*automation != NULL){ GList *iter; iter = g_list_nth(*automation, i); if(iter != NULL){ current = iter->data; } } ags_simple_file_read_automation(simple_file, child, ¤t); list = g_list_prepend(list, current); i++; } } child = child->next; } list = g_list_reverse(list); *automation = list; } void ags_simple_file_read_automation_list_fixup_1_0_to_1_3(AgsSimpleFile *simple_file, xmlNode *node, GList **automation) { AgsAutomation *current; xmlNode *child; GList *list; guint i; auto void ags_simple_file_read_automation_fixup_1_0_to_1_3(AgsSimpleFile *simple_file, xmlNode *node, GList **automation); void ags_simple_file_read_automation_fixup_1_0_to_1_3(AgsSimpleFile *simple_file, xmlNode *node, GList **automation){ AgsMachine *machine; AgsAutomation *gobject; AgsAcceleration *acceleration; AgsTimestamp *timestamp; AgsFileIdRef *file_id_ref; xmlNode *child; GList *automation_list; xmlChar *str; gchar *control_name; GType channel_type; guint line; gboolean found_timestamp; file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_node(simple_file, node->parent->parent); machine = file_id_ref->ref; line = 0; str = xmlGetProp(node, "line"); str = xmlGetProp(node, "channel-type"); channel_type = g_type_from_name(str); control_name = xmlGetProp(node, "control-name"); if(str != NULL){ line = g_ascii_strtoull(str, NULL, 10); } /* children */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = 0; child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-sf-acceleration", 12)){ acceleration = ags_acceleration_new(); /* position and offset */ str = xmlGetProp(child, "x"); if(str != NULL){ acceleration->x = g_ascii_strtoull(str, NULL, 10); } str = xmlGetProp(child, "y"); if(str != NULL){ acceleration->y = g_ascii_strtoull(str, NULL, 10); } timestamp->timer.ags_offset.offset = AGS_AUTOMATION_DEFAULT_OFFSET * floor(acceleration->x / AGS_AUTOMATION_DEFAULT_OFFSET); automation_list = ags_automation_find_near_timestamp_extended(automation[0], line, channel_type, control_name, timestamp); if(automation_list != NULL){ gobject = automation_list->data; channel_type = gobject->channel_type; control_name = gobject->control_name; }else{ gobject = g_object_new(AGS_TYPE_AUTOMATION, "audio", machine->audio, "line", line, "channel-type", channel_type, "control-name", control_name, NULL); gobject->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; automation[0] = ags_automation_add(automation[0], gobject); } /* add */ ags_automation_add_acceleration(gobject, acceleration, FALSE); } } child = child->next; } g_object_unref(timestamp); } if(automation == NULL){ return; } child = node->children; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-automation", 11)){ ags_simple_file_read_automation_fixup_1_0_to_1_3(simple_file, child, automation); i++; } } child = child->next; } } void ags_simple_file_read_automation(AgsSimpleFile *simple_file, xmlNode *node, AgsAutomation **automation) { AgsAutomation *gobject; AgsAcceleration *acceleration; xmlNode *child; xmlChar *str; gchar *control_name; GType channel_type; guint line; gboolean found_timestamp; if(*automation != NULL){ gobject = *automation; line = gobject->line; channel_type = gobject->channel_type; control_name = gobject->control_name; }else{ AgsMachine *machine; AgsFileIdRef *file_id_ref; file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_node(simple_file, node->parent->parent); machine = file_id_ref->ref; if(!AGS_IS_MACHINE(machine)){ return; } line = 0; str = xmlGetProp(node, "line"); if(str != NULL){ line = g_ascii_strtoull(str, NULL, 10); } str = xmlGetProp(node, "channel-type"); channel_type = g_type_from_name(str); control_name = xmlGetProp(node, "control-name"); gobject = g_object_new(AGS_TYPE_AUTOMATION, "audio", machine->audio, "line", line, "channel-type", channel_type, "control-name", control_name, NULL); *automation = gobject; } /* children */ child = node->children; found_timestamp = FALSE; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-sf-timestamp", 17)){ found_timestamp = TRUE; /* offset */ str = xmlGetProp(child, "offset"); if(str != NULL){ gobject->timestamp->timer.ags_offset.offset = g_ascii_strtoull(str, NULL, 10); } } } child = child->next; } child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-sf-acceleration", 12)){ acceleration = ags_acceleration_new(); /* position and offset */ str = xmlGetProp(child, "x"); if(str != NULL){ acceleration->x = g_ascii_strtoull(str, NULL, 10); } str = xmlGetProp(child, "y"); if(str != NULL){ acceleration->y = g_ascii_strtoull(str, NULL, 10); } /* add */ ags_automation_add_acceleration(gobject, acceleration, FALSE); } } child = child->next; } } void ags_simple_file_read_preset_list(AgsSimpleFile *simple_file, xmlNode *node, GList **preset) { AgsPreset *current; xmlNode *child; GList *list; guint i; child = node->children; list = NULL; i = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-sf-preset", 11)){ current = NULL; if(*preset != NULL){ GList *iter; iter = g_list_nth(*preset, i); if(iter != NULL){ current = iter->data; } } ags_simple_file_read_preset(simple_file, child, ¤t); list = g_list_prepend(list, current); i++; } } child = child->next; } list = g_list_reverse(list); *preset = list; } void ags_simple_file_read_preset(AgsSimpleFile *simple_file, xmlNode *node, AgsPreset **preset) { AgsMachine *machine; AgsPreset *gobject; AgsFileIdRef *file_id_ref; xmlNode *child; xmlChar *str; file_id_ref = (AgsFileIdRef *) ags_simple_file_find_id_ref_by_node(simple_file, node->parent->parent); machine = file_id_ref->ref; if(*preset != NULL){ gobject = *preset; }else{ gobject = ags_preset_new(); *preset = gobject; } /* scope */ str = xmlGetProp(node, "scope"); if(str != NULL){ g_object_set(gobject, "scope", str, NULL); } /* preset name */ str = xmlGetProp(node, "preset-name"); if(str != NULL){ g_object_set(gobject, "preset-name", str, NULL); } /* audio channel start */ str = xmlGetProp(node, "audio-channel-start"); if(str != NULL){ g_object_set(gobject, "audio-channel-start", g_ascii_strtoull(str, NULL, 10), NULL); } /* audio channel end */ str = xmlGetProp(node, "audio-channel-end"); if(str != NULL){ g_object_set(gobject, "audio-channel-end", g_ascii_strtoull(str, NULL, 10), NULL); } /* pad start */ str = xmlGetProp(node, "pad-start"); if(str != NULL){ g_object_set(gobject, "pad-start", g_ascii_strtoull(str, NULL, 10), NULL); } /* pad end */ str = xmlGetProp(node, "pad-end"); if(str != NULL){ g_object_set(gobject, "pad-end", g_ascii_strtoull(str, NULL, 10), NULL); } /* x start */ str = xmlGetProp(node, "x-start"); if(str != NULL){ g_object_set(gobject, "x-start", g_ascii_strtoull(str, NULL, 10), NULL); } /* x end */ str = xmlGetProp(node, "x-end"); if(str != NULL){ g_object_set(gobject, "x-end", g_ascii_strtoull(str, NULL, 10), NULL); } /* children */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-sf-property", 15)){ GParameter *parameter; parameter = NULL; ags_simple_file_read_preset(simple_file, child, ¶meter); ags_preset_add_parameter(gobject, parameter->name, &(parameter->value)); } } child = child->next; } } xmlNode* ags_simple_file_write_config(AgsSimpleFile *simple_file, xmlNode *parent, AgsConfig *ags_config) { xmlNode *node; xmlNode *cdata; gchar *id; char *buffer; gsize buffer_length; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-sf-config"); ags_simple_file_add_id_ref(simple_file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", simple_file->application_context, "file", simple_file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", ags_config, NULL)); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, AGS_FILE_VERSION_PROP, AGS_CONFIG(ags_config)->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, AGS_CONFIG(ags_config)->build_id); xmlAddChild(parent, node); /* cdata */ ags_config_to_data(ags_config, &buffer, &buffer_length); cdata = xmlNewCDataBlock(simple_file->doc, buffer, buffer_length); /* add to parent */ xmlAddChild(node, cdata); return(node); } xmlNode* ags_simple_file_write_property_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *property) { xmlNode *node; xmlNode *child; node = xmlNewNode(NULL, "ags-sf-property-list"); while(property != NULL){ ags_simple_file_write_property(simple_file, node, property->data); property = property->next; } /* add to parent */ xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_property(AgsSimpleFile *simple_file, xmlNode *parent, GParameter *property) { xmlNode *node; xmlChar *type_name; xmlChar *val; if(G_VALUE_HOLDS_BOOLEAN(&(property->value))){ type_name = g_type_name(G_TYPE_BOOLEAN); if(g_value_get_boolean(&(property->value))){ val = g_strdup("true"); }else{ val = g_strdup("false"); } }else if(G_VALUE_HOLDS_UINT(&(property->value))){ type_name = g_type_name(G_TYPE_UINT); val = g_strdup_printf("%u", g_value_get_uint(&(property->value))); }else if(G_VALUE_HOLDS_INT(&(property->value))){ type_name = g_type_name(G_TYPE_INT); val = g_strdup_printf("%d", g_value_get_int(&(property->value))); }else if(G_VALUE_HOLDS_DOUBLE(&(property->value))){ type_name = g_type_name(G_TYPE_DOUBLE); val = g_strdup_printf("%f", g_value_get_double(&(property->value))); }else if(G_VALUE_HOLDS(&(property->value), AGS_TYPE_COMPLEX)){ AgsComplex *z; type_name = g_type_name(AGS_TYPE_COMPLEX); z = g_value_get_boxed(&(property->value)); val = g_strdup_printf("%f %f", z[0][0], z[0][1]); }else{ g_warning("ags_simple_file_write_property() - unsupported type"); return(NULL); } node = xmlNewNode(NULL, "ags-sf-property"); xmlNewProp(node, "type", type_name); xmlNewProp(node, "name", property->name); xmlNewProp(node, "value", val); /* add to parent */ xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_window(AgsSimpleFile *simple_file, xmlNode *parent, AgsWindow *window) { xmlNode *node; GList *list; node = xmlNewNode(NULL, "ags-sf-window"); xmlNewProp(node, "filename", simple_file->filename); xmlNewProp(node, "bpm", g_strdup_printf("%f", window->navigation->bpm->adjustment->value)); xmlNewProp(node, "loop", ((gtk_toggle_button_get_active((GtkToggleButton *) window->navigation->loop)) ? g_strdup("true"): g_strdup("false"))); xmlNewProp(node, "loop-start", g_strdup_printf("%f", window->navigation->loop_left_tact->adjustment->value)); xmlNewProp(node, "loop-end", g_strdup_printf("%f", window->navigation->loop_right_tact->adjustment->value)); /* children */ list = gtk_container_get_children((GtkContainer *) window->machines); ags_simple_file_write_machine_list(simple_file, node, list); g_list_free(list); ags_simple_file_write_notation_editor(simple_file, node, window->notation_editor); ags_simple_file_write_automation_editor(simple_file, node, window->automation_window->automation_editor); /* add to parent */ xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_machine_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *machine) { xmlNode *node; node = xmlNewNode(NULL, "ags-sf-machine-list"); while(machine != NULL){ ags_simple_file_write_machine(simple_file, node, machine->data); machine = machine->next; } /* add to parent */ xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_machine(AgsSimpleFile *simple_file, xmlNode *parent, AgsMachine *machine) { xmlNode *node; xmlNode *pad_list; GList *list; gchar *id; xmlChar *str; auto gboolean ags_simple_file_write_machine_inline_pad(AgsSimpleFile *simple_file, xmlNode *parent, AgsChannel *channel); auto xmlNode* ags_simple_file_write_control(AgsSimpleFile *simple_file, xmlNode *parent, AgsBulkMember *bulk_member); auto xmlNode* ags_simple_file_write_effect_list(AgsSimpleFile *simple_file, xmlNode *parent, AgsEffectBulk *effect_bulk); auto xmlNode* ags_simple_file_write_automation_port(AgsSimpleFile *simple_file, xmlNode *parent, GList *automation_port); gboolean ags_simple_file_write_machine_inline_pad(AgsSimpleFile *simple_file, xmlNode *parent, AgsChannel *channel){ AgsChannel *next_pad; xmlNode *pad; xmlNode *line_list; xmlNode *line; gboolean found_pad_content, found_line_content; if(channel == NULL){ return(FALSE); } found_pad_content = FALSE; while(channel != NULL){ next_pad = channel->next_pad; pad = xmlNewNode(NULL, "ags-sf-pad"); xmlNewProp(pad, "nth-pad", g_strdup_printf("%d", channel->pad)); line_list = xmlNewNode(NULL, "ags-sf-line-list"); found_line_content = FALSE; while(channel != next_pad){ gchar *id; id = ags_id_generator_create_uuid(); line = xmlNewNode(NULL, "ags-sf-line"); xmlNewProp(line, "id", id); if(channel->link != NULL){ ags_simple_file_add_id_ref(simple_file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", simple_file->application_context, "file", simple_file, "node", line, "reference", channel, NULL)); found_line_content = TRUE; } xmlNewProp(line, "nth-line", g_strdup_printf("%d", channel->line)); /* device */ if(channel != NULL && channel->soundcard != NULL){ gchar *device; device = ags_soundcard_get_device(AGS_SOUNDCARD(channel->soundcard)); if(device != NULL){ xmlNewProp(line, (xmlChar *) "soundcard-device", (xmlChar *) g_strdup(device)); } } /* link */ if(channel->link != NULL){ AgsFileLookup *file_lookup; file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", simple_file, "node", line, "reference", channel, NULL); ags_simple_file_add_lookup(simple_file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_simple_file_write_line_resolve_link), channel); } /* add to parent */ xmlAddChild(line_list, line); /* iterate */ channel = channel->next; } if(found_line_content){ found_pad_content = TRUE; /* add to parent */ xmlAddChild(pad, line_list); /* add to parent */ xmlAddChild(parent, pad); }else{ xmlFreeNode(line_list); xmlFreeNode(pad); } } if(found_pad_content){ return(TRUE); }else{ return(FALSE); } } xmlNode* ags_simple_file_write_control(AgsSimpleFile *simple_file, xmlNode *parent, AgsBulkMember *bulk_member){ GtkWidget *child_widget; xmlNode *control_node; /* control node */ child_widget = gtk_bin_get_child((GtkBin *) bulk_member); if(GTK_IS_TOGGLE_BUTTON(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "control-type", G_OBJECT_TYPE_NAME(child_widget)); xmlNewProp(control_node, "value", ((gtk_toggle_button_get_active((GtkToggleButton *) child_widget)) ? g_strdup("true"): g_strdup("false"))); }else if(AGS_IS_DIAL(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "control-type", G_OBJECT_TYPE_NAME(child_widget)); xmlNewProp(control_node, "value", g_strdup_printf("%f", AGS_DIAL(child_widget)->adjustment->value)); }else{ g_warning("ags_file_write_effect_list() - unknown child of AgsBulkMember type"); return(NULL); } xmlNewProp(control_node, "specifier", bulk_member->specifier); xmlAddChild(parent, control_node); return(control_node); } xmlNode* ags_simple_file_write_effect_list(AgsSimpleFile *simple_file, xmlNode *parent, AgsEffectBulk *effect_bulk){ xmlNode *effect_list_node; xmlNode *effect_node; GList *filename; GList *effect; GList *list_start, *list; effect_list_node = NULL; effect_node = NULL; filename = NULL; effect = NULL; list = list_start = gtk_container_get_children((GtkContainer *) effect_bulk->table); while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ if(g_list_find_custom(filename, AGS_BULK_MEMBER(list->data)->filename, (GCompareFunc) g_strcmp0) == NULL || g_list_find_custom(effect, AGS_BULK_MEMBER(list->data)->effect, (GCompareFunc) g_strcmp0) == NULL){ GtkWidget *child_widget; if(effect_list_node == NULL){ effect_list_node = xmlNewNode(NULL, "ags-sf-effect-list"); } effect_node = xmlNewNode(NULL, "ags-sf-effect"); xmlNewProp(effect_node, "filename", AGS_BULK_MEMBER(list->data)->filename); filename = g_list_prepend(filename, AGS_BULK_MEMBER(list->data)->filename); xmlNewProp(effect_node, "effect", AGS_BULK_MEMBER(list->data)->effect); effect = g_list_prepend(effect, AGS_BULK_MEMBER(list->data)->effect); ags_simple_file_write_control(simple_file, effect_node, list->data); /* add to parent */ xmlAddChild(effect_list_node, effect_node); }else{ ags_simple_file_write_control(simple_file, effect_node, list->data); } } list = list->next; } g_list_free(list_start); /* add to parent */ if(effect_list_node != NULL){ xmlAddChild(parent, effect_list_node); } return(effect_list_node); } xmlNode* ags_simple_file_write_automation_port(AgsSimpleFile *simple_file, xmlNode *parent, GList *automation_port){ xmlNode *node, *child; node = NULL; if(automation_port != NULL){ node = xmlNewNode(NULL, "ags-sf-automation-port-list"); while(automation_port != NULL){ gchar *scope; child = xmlNewNode(NULL, "ags-sf-automation-port"); scope = NULL; if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == G_TYPE_NONE){ scope = "audio"; }else if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == AGS_TYPE_OUTPUT){ scope = "output"; }else if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == AGS_TYPE_INPUT){ scope = "input"; } xmlNewProp(child, "scope", scope); xmlNewProp(child, "specifier", AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->control_name); xmlAddChild(node, child); automation_port = automation_port->next; } } /* add to parent */ if(node != NULL){ xmlAddChild(parent, node); } return(node); } /* node and uuid */ id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-sf-machine"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); xmlNewProp(node, (xmlChar *) AGS_FILE_TYPE_PROP, (xmlChar *) G_OBJECT_TYPE_NAME(machine)); xmlNewProp(node, (xmlChar *) AGS_FILE_NAME_PROP, (xmlChar *) machine->machine_name); ags_simple_file_add_id_ref(simple_file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", simple_file->application_context, "file", simple_file, "node", node, "reference", machine, NULL)); /* device */ if(machine->audio != NULL && machine->audio->soundcard != NULL){ gchar *device; device = ags_soundcard_get_device(AGS_SOUNDCARD(machine->audio->soundcard)); if(device != NULL){ xmlNewProp(node, (xmlChar *) "soundcard-device", (xmlChar *) g_strdup(device)); } } /* bank and mapping */ xmlNewProp(node, (xmlChar *) "bank_0", (xmlChar *) g_strdup_printf("%d", machine->bank_0)); xmlNewProp(node, (xmlChar *) "bank_1", (xmlChar *) g_strdup_printf("%d", machine->bank_1)); if((AGS_AUDIO_REVERSE_MAPPING & (machine->audio->flags)) != 0){ xmlNewProp(node, "reverse-mapping", "true"); } /* channels and pads */ xmlNewProp(node, (xmlChar *) "channels", (xmlChar *) g_strdup_printf("%d", machine->audio->audio_channels)); xmlNewProp(node, (xmlChar *) "output-pads", (xmlChar *) g_strdup_printf("%d", machine->audio->output_pads)); xmlNewProp(node, (xmlChar *) "input-pads", (xmlChar *) g_strdup_printf("%d", machine->audio->input_pads)); /* midi mapping */ if((AGS_MACHINE_IS_SYNTHESIZER & (machine->flags)) != 0){ xmlNewProp(node, "audio-start-mapping", g_strdup_printf("%d", machine->audio->audio_start_mapping)); xmlNewProp(node, "audio-end-mapping", g_strdup_printf("%d", machine->audio->audio_end_mapping)); xmlNewProp(node, "midi-start-mapping", g_strdup_printf("%d", machine->audio->midi_start_mapping)); xmlNewProp(node, "midi-end-mapping", g_strdup_printf("%d", machine->audio->midi_end_mapping)); } /* machine specific */ if(AGS_IS_DRUM(machine)){ AgsDrum *drum; drum = (AgsDrum *) machine; if(gtk_toggle_button_get_active((GtkToggleButton *) drum->loop_button)){ xmlNewProp(node, "loop", "true"); } xmlNewProp(node, "length", g_strdup_printf("%u", (guint) drum->length_spin->adjustment->value)); }else if(AGS_IS_MATRIX(machine)){ AgsMatrix *matrix; matrix = (AgsMatrix *) machine; if(gtk_toggle_button_get_active((GtkToggleButton *) matrix->loop_button)){ xmlNewProp(node, "loop", "true"); } xmlNewProp(node, "length", g_strdup_printf("%u", (guint) matrix->length_spin->adjustment->value)); }else if(AGS_IS_SYNTH(machine)){ AgsSynth *synth; synth = (AgsSynth *) machine; xmlNewProp(node, "base-note", g_strdup_printf("%f", synth->lower->adjustment->value)); }else if(AGS_IS_SYNCSYNTH(machine)){ AgsSyncsynth *syncsynth; syncsynth = (AgsSyncsynth *) machine; xmlNewProp(node, "base-note", g_strdup_printf("%f", syncsynth->lower->adjustment->value)); xmlNewProp(node, "audio-loop-start", g_strdup_printf("%u", (guint) syncsynth->loop_start->adjustment->value)); xmlNewProp(node, "audio-loop-end", g_strdup_printf("%u", (guint) syncsynth->loop_end->adjustment->value)); }else if(AGS_IS_FFPLAYER(machine)){ AgsFFPlayer *ffplayer; ffplayer = (AgsFFPlayer *) machine; if(ffplayer->ipatch != NULL && ffplayer->ipatch->filename != NULL){ xmlNewProp(node, "filename", ffplayer->ipatch->filename); xmlNewProp(node, "preset", gtk_combo_box_text_get_active_text(ffplayer->preset)); xmlNewProp(node, "instrument", gtk_combo_box_text_get_active_text(ffplayer->instrument)); } }else if(AGS_IS_LADSPA_BRIDGE(machine)){ AgsLadspaBridge *ladspa_bridge; ladspa_bridge = (AgsLadspaBridge *) machine; xmlNewProp(node, "plugin-file", ladspa_bridge->filename); xmlNewProp(node, "effect", ladspa_bridge->effect); }else if(AGS_IS_DSSI_BRIDGE(machine)){ AgsDssiBridge *dssi_bridge; dssi_bridge = (AgsDssiBridge *) machine; xmlNewProp(node, "plugin-file", dssi_bridge->filename); xmlNewProp(node, "effect", dssi_bridge->effect); xmlNewProp(node, "program", gtk_combo_box_text_get_active_text(dssi_bridge->program)); }else if(AGS_IS_LIVE_DSSI_BRIDGE(machine)){ AgsLiveDssiBridge *live_dssi_bridge; live_dssi_bridge = (AgsLiveDssiBridge *) machine; xmlNewProp(node, "plugin-file", live_dssi_bridge->filename); xmlNewProp(node, "effect", live_dssi_bridge->effect); xmlNewProp(node, "program", gtk_combo_box_text_get_active_text(live_dssi_bridge->program)); }else if(AGS_IS_LV2_BRIDGE(machine)){ AgsLv2Bridge *lv2_bridge; lv2_bridge = (AgsLv2Bridge *) machine; xmlNewProp(node, "plugin-file", lv2_bridge->filename); xmlNewProp(node, "effect", lv2_bridge->effect); if(lv2_bridge->preset != NULL){ xmlNewProp(node, "preset", gtk_combo_box_text_get_active_text(lv2_bridge->preset)); } }else if(AGS_IS_LIVE_LV2_BRIDGE(machine)){ AgsLiveLv2Bridge *live_lv2_bridge; live_lv2_bridge = (AgsLiveLv2Bridge *) machine; xmlNewProp(node, "plugin-file", live_lv2_bridge->filename); xmlNewProp(node, "effect", live_lv2_bridge->effect); if(live_lv2_bridge->preset != NULL){ xmlNewProp(node, "preset", gtk_combo_box_text_get_active_text(live_lv2_bridge->preset)); } } /* input */ if(machine->input != NULL){ list = gtk_container_get_children((GtkContainer *) machine->input); pad_list = ags_simple_file_write_pad_list(simple_file, node, list); xmlNewProp(pad_list, "is-output", g_strdup("false")); g_list_free(list); }else{ AgsChannel *channel; channel = machine->audio->input; if(channel != NULL){ pad_list = xmlNewNode(NULL, "ags-sf-pad-list"); xmlNewProp(pad_list, "is-output", g_strdup("false")); if(ags_simple_file_write_machine_inline_pad(simple_file, pad_list, channel)){ /* add to parent */ xmlAddChild(node, pad_list); }else{ xmlFreeNode(pad_list); } } } /* output */ if(machine->output != NULL){ list = gtk_container_get_children((GtkContainer *) machine->output); pad_list = ags_simple_file_write_pad_list(simple_file, node, list); xmlNewProp(pad_list, "is-output", g_strdup("true")); g_list_free(list); }else{ AgsChannel *channel; channel = machine->audio->output; if(channel != NULL){ pad_list = xmlNewNode(NULL, "ags-sf-pad-list"); xmlNewProp(pad_list, "is-output", g_strdup("true")); if(ags_simple_file_write_machine_inline_pad(simple_file, pad_list, channel)){ /* add to parent */ xmlAddChild(node, pad_list); }else{ xmlFreeNode(pad_list); } } } /* effect list */ if(machine->bridge != NULL){ if(AGS_EFFECT_BRIDGE(machine->bridge)->bulk_input != NULL){ xmlNode *child; child = ags_simple_file_write_effect_list(simple_file, node, (AgsEffectBulk *) AGS_EFFECT_BRIDGE(machine->bridge)->bulk_input); if(child != NULL){ xmlNewProp(child, "is-output", "false"); } } if(AGS_EFFECT_BRIDGE(machine->bridge)->bulk_output != NULL){ xmlNode *child; child = ags_simple_file_write_effect_list(simple_file, node, (AgsEffectBulk *) AGS_EFFECT_BRIDGE(machine->bridge)->bulk_output); if(child != NULL){ xmlNewProp(child, "is-output", "true"); } } if(AGS_EFFECT_BRIDGE(machine->bridge)->input != NULL){ xmlNode *child; GList *list; list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BRIDGE(machine->bridge)->input); child = ags_simple_file_write_effect_pad_list(simple_file, node, list); xmlNewProp(child, "is-output", "false"); g_list_free(list); } if(AGS_EFFECT_BRIDGE(machine->bridge)->output != NULL){ xmlNode *child; GList *list; list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BRIDGE(machine->bridge)->output); child = ags_simple_file_write_effect_pad_list(simple_file, node, list); xmlNewProp(child, "is-output", "true"); g_list_free(list); } } /* oscillator list */ if(AGS_IS_SYNCSYNTH(machine)){ xmlNode *child; GList *list, *list_start, *next, *oscillator; list_start = list = gtk_container_get_children((GtkContainer *) AGS_SYNCSYNTH(machine)->oscillator); oscillator = NULL; while(list != NULL){ next = gtk_container_get_children(list->data); oscillator = g_list_prepend(oscillator, next->next->data); g_list_free(next); list = list->next; } child = ags_simple_file_write_oscillator_list(simple_file, node, oscillator); g_list_free(list_start); g_list_free(oscillator); } /* pattern list */ if(machine->audio->input != NULL){ AgsChannel *channel; xmlNode *pattern_list_node; channel = machine->audio->input; pattern_list_node = NULL; while(channel != NULL){ if(channel->pattern != NULL){ AgsPattern *pattern; guint i, j, k; pattern = channel->pattern->data; for(i = 0; i < pattern->dim[0]; i++){ for(j = 0; j < pattern->dim[1]; j++){ if(!ags_pattern_is_empty(pattern, i, j)){ xmlNode *pattern_node; xmlChar *content; if(pattern_list_node == NULL){ pattern_list_node = xmlNewNode(NULL, "ags-sf-pattern-list"); } pattern_node = xmlNewNode(NULL, "ags-sf-pattern"); /* content */ content = malloc((pattern->dim[2] + 1) * sizeof(xmlChar)); content[pattern->dim[2]] = '\0'; for(k = 0; k < pattern->dim[2]; k++){ if(ags_pattern_get_bit(pattern, i, j, k)){ content[k] = '1'; }else{ content[k] = '0'; } } xmlNodeAddContent(pattern_node, content); /* attributes */ xmlNewProp(pattern_node, "nth-line", g_strdup_printf("%d", channel->line)); xmlNewProp(pattern_node, "bank-0", g_strdup_printf("%d", i)); xmlNewProp(pattern_node, "bank-1", g_strdup_printf("%d", j)); /* add child */ xmlAddChild(pattern_list_node, pattern_node); } } } } channel = channel->next; } if(pattern_list_node != NULL){ xmlAddChild(node, pattern_list_node); } } /* notation and automation list */ if(machine->enabled_automation_port != NULL){ ags_simple_file_write_automation_port(simple_file, node, machine->enabled_automation_port); } if(machine->audio->notation != NULL){ ags_simple_file_write_notation_list(simple_file, node, machine->audio->notation); } if(machine->audio->automation != NULL){ ags_simple_file_write_automation_list(simple_file, node, machine->audio->automation); } if(machine->audio->preset != NULL){ ags_simple_file_write_preset_list(simple_file, node, machine->audio->preset); } /* add to parent */ xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_pad_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *pad) { xmlNode *node; gboolean found_content; found_content = FALSE; node = xmlNewNode(NULL, "ags-sf-pad-list"); while(pad != NULL){ if(ags_simple_file_write_pad(simple_file, node, pad->data) != NULL){ found_content = TRUE; } pad = pad->next; } if(found_content){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } xmlNode* ags_simple_file_write_pad(AgsSimpleFile *simple_file, xmlNode *parent, AgsPad *pad) { xmlNode *node; GList *list; gchar *id; gboolean found_content; found_content = FALSE; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-sf-pad"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); xmlNewProp(node, "nth-pad", g_strdup_printf("%d", pad->channel->pad)); /* group */ if(!gtk_toggle_button_get_active(pad->group)){ xmlNewProp(node, "group", g_strdup("false")); found_content = TRUE; }else{ xmlNewProp(node, "group", g_strdup("true")); } /* mute */ if(!gtk_toggle_button_get_active(pad->mute)){ xmlNewProp(node, "mute", g_strdup("false")); }else{ xmlNewProp(node, "mute", g_strdup("true")); found_content = TRUE; } /* solo */ if(!gtk_toggle_button_get_active(pad->solo)){ xmlNewProp(node, "solo", g_strdup("false")); }else{ xmlNewProp(node, "solo", g_strdup("true")); found_content = TRUE; } /* children */ if(pad->expander_set != NULL){ list = gtk_container_get_children((GtkContainer *) pad->expander_set); if(ags_simple_file_write_line_list(simple_file, node, g_list_reverse(list)) != NULL){ found_content = TRUE; } g_list_free(list); } if(found_content){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } xmlNode* ags_simple_file_write_line_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *line) { xmlNode *node; gboolean found_content; node = xmlNewNode(NULL, "ags-sf-line-list"); found_content = FALSE; while(line != NULL){ if(ags_simple_file_write_line(simple_file, node, line->data) != NULL){ found_content = TRUE; } line = line->next; } if(found_content){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } xmlNode* ags_simple_file_write_line(AgsSimpleFile *simple_file, xmlNode *parent, AgsLine *line) { xmlNode *node; xmlNode *effect_list_node; xmlNode *effect_node; GList *filename; GList *effect; GList *list_start, *list; gchar *id; gboolean found_content; auto void ags_simple_file_write_control(AgsSimpleFile *simple_file, xmlNode *parent, AgsLineMember *line_member); void ags_simple_file_write_control(AgsSimpleFile *simple_file, xmlNode *parent, AgsLineMember *line_member){ GtkWidget *child_widget; xmlNode *control_node; /* control node */ child_widget = gtk_bin_get_child((GtkBin *) line_member); if(GTK_IS_TOGGLE_BUTTON(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "control-type", G_OBJECT_TYPE_NAME(child_widget)); xmlNewProp(control_node, "value", ((gtk_toggle_button_get_active((GtkToggleButton *) child_widget)) ? g_strdup("true"): g_strdup("false"))); }else if(AGS_IS_DIAL(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "control-type", G_OBJECT_TYPE_NAME(child_widget)); xmlNewProp(control_node, "value", g_strdup_printf("%f", AGS_DIAL(child_widget)->adjustment->value)); }else if(GTK_IS_RANGE(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "control-type", G_OBJECT_TYPE_NAME(child_widget)); xmlNewProp(control_node, "value", g_strdup_printf("%f", GTK_RANGE(child_widget)->adjustment->value)); }else if(GTK_IS_SPIN_BUTTON(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "control-type", G_OBJECT_TYPE_NAME(child_widget)); xmlNewProp(control_node, "value", g_strdup_printf("%f", GTK_SPIN_BUTTON(child_widget)->adjustment->value)); }else{ g_warning("ags_file_write_effect_list() - unknown child of AgsLineMember type"); return; } xmlNewProp(control_node, "specifier", line_member->specifier); xmlAddChild(parent, control_node); } id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-sf-line"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); found_content = FALSE; if(line->channel->link != NULL){ ags_simple_file_add_id_ref(simple_file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", simple_file->application_context, "file", simple_file, "node", node, "reference", line->channel, NULL)); found_content = TRUE; } xmlNewProp(node, "nth-line", g_strdup_printf("%d", line->channel->line)); /* device */ if(line->channel != NULL && line->channel->soundcard != NULL){ gchar *device; device = ags_soundcard_get_device(AGS_SOUNDCARD(line->channel->soundcard)); if(device != NULL){ xmlNewProp(node, (xmlChar *) "soundcard-device", (xmlChar *) g_strdup(device)); } } /* group */ if(!gtk_toggle_button_get_active(line->group)){ xmlNewProp(node, "is-grouped", g_strdup("false")); found_content = TRUE; }else{ xmlNewProp(node, "is-grouped", g_strdup("true")); } /* link or file */ if(line->channel->link != NULL){ AgsFileLookup *file_lookup; file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", simple_file, "node", node, "reference", line, NULL); ags_simple_file_add_lookup(simple_file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_simple_file_write_line_resolve_link), line->channel); }else if(AGS_IS_INPUT(line->channel) && AGS_INPUT(line->channel)->file_link != NULL && ags_audio_file_check_suffix(AGS_FILE_LINK(AGS_INPUT(line->channel)->file_link)->filename)){ xmlNewProp(node, "filename", g_strdup_printf("file://%s", AGS_FILE_LINK(AGS_INPUT(line->channel)->file_link)->filename)); xmlNewProp(node, "file-channel", g_strdup_printf("%d", AGS_AUDIO_FILE_LINK(AGS_INPUT(line->channel)->file_link)->audio_channel)); found_content = TRUE; } /* machine specific */ if(AGS_IS_SYNTH_INPUT_LINE(line)){ ags_simple_file_write_oscillator(simple_file, node, AGS_SYNTH_INPUT_LINE(line)->oscillator); found_content = TRUE; } /* effect list */ effect_list_node = NULL; effect_node = NULL; filename = NULL; effect = NULL; list_start = list = g_list_reverse(gtk_container_get_children((GtkContainer *) line->expander->table)); while(list != NULL){ if(AGS_IS_LINE_MEMBER(list->data)){ AgsLineMember *line_member; line_member = list->data; if(g_list_find(filename, AGS_LINE_MEMBER(list->data)->filename) == NULL || g_list_find(effect, AGS_LINE_MEMBER(list->data)->effect) == NULL){ GtkWidget *child_widget; if(effect_list_node == NULL){ effect_list_node = xmlNewNode(NULL, "ags-sf-effect-list"); } effect_node = xmlNewNode(NULL, "ags-sf-effect"); filename = g_list_prepend(filename, AGS_LINE_MEMBER(list->data)->filename); effect = g_list_prepend(effect, AGS_LINE_MEMBER(list->data)->effect); xmlNewProp(effect_node, "filename", AGS_LINE_MEMBER(list->data)->filename); xmlNewProp(effect_node, "effect", AGS_LINE_MEMBER(list->data)->effect); ags_simple_file_write_control(simple_file, effect_node, list->data); /* add to parent */ xmlAddChild(effect_list_node, effect_node); }else{ ags_simple_file_write_control(simple_file, effect_node, list->data); } found_content = TRUE; } list = list->next; } if(list_start != NULL){ g_list_free(list_start); } /* add to parent */ if(effect_list_node != NULL){ xmlAddChild(node, effect_list_node); } if(found_content){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } void ags_simple_file_write_line_resolve_link(AgsFileLookup *file_lookup, AgsChannel *channel) { GList *list; xmlChar *xpath; list = ags_simple_file_find_id_ref_by_reference((AgsSimpleFile *) file_lookup->file, channel->link); if(list != NULL){ xpath = g_strdup_printf("xpath=//ags-sf-line[@id='%s']", xmlGetProp(AGS_FILE_ID_REF(list->data)->node, "id")); xmlNewProp(file_lookup->node, "link", xpath); } } xmlNode* ags_simple_file_write_effect_pad_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *effect_pad) { xmlNode *node; gboolean found_content; found_content = FALSE; node = xmlNewNode(NULL, "ags-sf-effect-pad-list"); while(effect_pad != NULL){ if(ags_simple_file_write_effect_pad(simple_file, node, effect_pad->data) != NULL){ found_content = TRUE; } effect_pad = effect_pad->next; } if(found_content){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } xmlNode* ags_simple_file_write_effect_pad(AgsSimpleFile *simple_file, xmlNode *parent, AgsEffectPad *effect_pad) { xmlNode *node; GList *list; gchar *id; gboolean found_content; found_content = FALSE; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-sf-effect-pad"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); /* children */ if(effect_pad->table != NULL){ list = gtk_container_get_children((GtkContainer *) effect_pad->table); if(ags_simple_file_write_effect_line_list(simple_file, node, list) != NULL){ found_content = TRUE; } g_list_free(list); } if(found_content){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } xmlNode* ags_simple_file_write_effect_line_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *effect_line) { xmlNode *node; gboolean found_content; found_content = FALSE; node = xmlNewNode(NULL, "ags-sf-effect-line-list"); while(effect_line != NULL){ if(ags_simple_file_write_effect_line(simple_file, node, effect_line->data) != NULL){ found_content = TRUE; } effect_line = effect_line->next; } if(found_content){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } xmlNode* ags_simple_file_write_effect_line(AgsSimpleFile *simple_file, xmlNode *parent, AgsEffectLine *effect_line) { xmlNode *node; xmlNode *effect_list_node; xmlNode *effect_node; GList *filename; GList *effect; GList *list_start, *list; gchar *id; gboolean found_content; auto void ags_simple_file_write_control(AgsSimpleFile *simple_file, xmlNode *parent, AgsLineMember *line_member); void ags_simple_file_write_control(AgsSimpleFile *simple_file, xmlNode *parent, AgsLineMember *line_member){ GtkWidget *child_widget; xmlNode *control_node; /* control node */ child_widget = gtk_bin_get_child((GtkBin *) line_member); if(GTK_IS_TOGGLE_BUTTON(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "value", ((gtk_toggle_button_get_active((GtkToggleButton *) child_widget)) ? g_strdup("true"): g_strdup("false"))); }else if(AGS_IS_DIAL(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "value", g_strdup_printf("%f", AGS_DIAL(child_widget)->adjustment->value)); }else if(GTK_IS_RANGE(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "value", g_strdup_printf("%f", GTK_RANGE(child_widget)->adjustment->value)); }else if(GTK_IS_SPIN_BUTTON(child_widget)){ control_node = xmlNewNode(NULL, "ags-sf-control"); xmlNewProp(control_node, "value", g_strdup_printf("%f", GTK_SPIN_BUTTON(child_widget)->adjustment->value)); }else{ g_warning("ags_file_write_effect_list() - unknown child of AgsLineMember type"); return; } xmlNewProp(control_node, "specifier", line_member->specifier); xmlAddChild(parent, control_node); } found_content = FALSE; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-sf-effect-line"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); /* effect list */ effect_list_node = NULL; effect_node = NULL; filename = NULL; effect = NULL; list_start = list = gtk_container_get_children((GtkContainer *) effect_line->table); while(list != NULL){ if(AGS_IS_LINE_MEMBER(list->data)){ AgsLineMember *line_member; line_member = list->data; if(g_list_find(filename, AGS_LINE_MEMBER(list->data)->filename) == NULL || g_list_find(effect, AGS_LINE_MEMBER(list->data)->effect) == NULL){ GtkWidget *child_widget; if(effect_list_node == NULL){ effect_list_node = xmlNewNode(NULL, "ags-sf-effect-list"); } effect_node = xmlNewNode(NULL, "ags-sf-effect"); filename = g_list_prepend(filename, AGS_LINE_MEMBER(list->data)->filename); effect = g_list_prepend(effect, AGS_LINE_MEMBER(list->data)->effect); ags_simple_file_write_control(simple_file, effect_node, list->data); /* add to parent */ xmlAddChild(effect_list_node, effect_node); }else{ ags_simple_file_write_control(simple_file, effect_node, list->data); } found_content = TRUE; } list = list->next; } g_list_free(list_start); /* add to parent */ if(effect_list_node != NULL){ xmlAddChild(node, effect_list_node); } g_list_free(list_start); if(found_content){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } xmlNode* ags_simple_file_write_oscillator_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *oscillator) { xmlNode *node; node = xmlNewNode(NULL, "ags-oscillator-list"); while(oscillator != NULL){ ags_simple_file_write_oscillator(simple_file, node, oscillator->data); oscillator = oscillator->next; } xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_oscillator(AgsSimpleFile *simple_file, xmlNode *parent, AgsOscillator *oscillator) { xmlNode *node; xmlChar *str, *tmp; guint i; node = xmlNewNode(NULL, "ags-oscillator"); xmlNewProp(node, "wave", g_strdup_printf("%d", gtk_combo_box_get_active(oscillator->wave))); xmlNewProp(node, "attack", g_strdup_printf("%f", oscillator->attack->adjustment->value)); xmlNewProp(node, "length", g_strdup_printf("%f", oscillator->frame_count->adjustment->value)); xmlNewProp(node, "frequency", g_strdup_printf("%f", oscillator->frequency->adjustment->value)); xmlNewProp(node, "phase", g_strdup_printf("%f", oscillator->phase->adjustment->value)); xmlNewProp(node, "volume", g_strdup_printf("%f", oscillator->volume->adjustment->value)); xmlNewProp(node, "sync", g_strdup_printf("%s", (gtk_toggle_button_get_active(oscillator->do_sync) ? "true": "false"))); str = NULL; for(i = 0; i < oscillator->sync_point_count; i++){ tmp = str; if(str != NULL){ str = g_strdup_printf("%s %f", str, gtk_spin_button_get_value(oscillator->sync_point[i])); }else{ str = g_strdup_printf("%f", gtk_spin_button_get_value(oscillator->sync_point[i])); } g_free(tmp); } xmlNewProp(node, "sync-point", str); xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_notation_editor(AgsSimpleFile *simple_file, xmlNode *parent, AgsNotationEditor *notation_editor) { AgsFileLookup *file_lookup; xmlNode *node; node = xmlNewNode(NULL, "ags-sf-notation-editor"); xmlNewProp(node, "zoom", gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(notation_editor->notation_toolbar->zoom))); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", simple_file, "node", node, "reference", notation_editor, NULL); ags_simple_file_add_lookup(simple_file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_simple_file_write_notation_editor_resolve_machine), notation_editor); /* add to parent */ xmlAddChild(parent, node); return(node); } void ags_simple_file_write_notation_editor_resolve_machine(AgsFileLookup *file_lookup, AgsNotationEditor *notation_editor) { xmlNode *node; xmlNode *property_list; xmlNode *property; GList *list_start, *list; GList *file_id_ref; xmlChar *xpath; node = file_lookup->node; property_list = NULL; list_start = gtk_container_get_children((GtkContainer *) notation_editor->machine_selector); list = list_start->next; if(list != NULL){ property_list = xmlNewNode(NULL, "ags-sf-property-list"); } while(list != NULL){ if(AGS_MACHINE_RADIO_BUTTON(list->data)->machine != NULL){ property = xmlNewNode(NULL, "ags-sf-property"); xmlNewProp(property, "name", "machine"); file_id_ref = ags_simple_file_find_id_ref_by_reference((AgsSimpleFile *) file_lookup->file, AGS_MACHINE_RADIO_BUTTON(list->data)->machine); if(file_id_ref != NULL){ xpath = g_strdup_printf("xpath=//ags-sf-machine[@id='%s']", xmlGetProp(AGS_FILE_ID_REF(file_id_ref->data)->node, "id")); }else{ xpath = g_strdup("(null)"); } xmlNewProp(property, "value", xpath); /* add to parent */ xmlAddChild(property_list, property); }else{ property = xmlNewNode(NULL, "ags-sf-property"); xmlNewProp(property, "name", "machine"); xmlNewProp(property, "value", "(null)"); /* add to parent */ xmlAddChild(property_list, property); } list = list->next; } /* add to parent */ xmlAddChild(node, property_list); g_list_free(list_start); } xmlNode* ags_simple_file_write_automation_editor(AgsSimpleFile *simple_file, xmlNode *parent, AgsAutomationEditor *automation_editor) { AgsFileLookup *file_lookup; xmlNode *node; node = xmlNewNode(NULL, "ags-sf-automation-editor"); xmlNewProp(node, "zoom", gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(automation_editor->automation_toolbar->zoom))); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", simple_file, "node", node, "reference", automation_editor, NULL); ags_simple_file_add_lookup(simple_file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_simple_file_write_automation_editor_resolve_machine), automation_editor); /* add to parent */ xmlAddChild(parent, node); return(node); } void ags_simple_file_write_automation_editor_resolve_machine(AgsFileLookup *file_lookup, AgsAutomationEditor *automation_editor) { xmlNode *node; xmlNode *property_list; xmlNode *property; GList *list_start, *list; GList *file_id_ref; xmlChar *xpath; node = file_lookup->node; property_list = NULL; list_start = gtk_container_get_children((GtkContainer *) automation_editor->machine_selector); list = list_start->next; if(list != NULL){ property_list = xmlNewNode(NULL, "ags-sf-property-list"); } while(list != NULL){ if(AGS_MACHINE_RADIO_BUTTON(list->data)->machine != NULL){ property = xmlNewNode(NULL, "ags-sf-property"); xmlNewProp(property, "name", "machine"); file_id_ref = ags_simple_file_find_id_ref_by_reference((AgsSimpleFile *) file_lookup->file, AGS_MACHINE_RADIO_BUTTON(list->data)->machine); if(file_id_ref != NULL){ xpath = g_strdup_printf("xpath=//ags-sf-machine[@id='%s']", xmlGetProp(AGS_FILE_ID_REF(file_id_ref->data)->node, "id")); }else{ xpath = g_strdup("(null)"); } xmlNewProp(property, "value", xpath); /* add to parent */ xmlAddChild(property_list, property); }else{ property = xmlNewNode(NULL, "ags-sf-property"); xmlNewProp(property, "name", "machine"); xmlNewProp(property, "value", "(null)"); /* add to parent */ xmlAddChild(property_list, property); } list = list->next; } /* add to parent */ xmlAddChild(node, property_list); g_list_free(list_start); } xmlNode* ags_simple_file_write_notation_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *notation) { xmlNode *node; node = xmlNewNode(NULL, "ags-sf-notation-list"); while(notation != NULL){ ags_simple_file_write_notation(simple_file, node, notation->data); notation = notation->next; } /* add to parent */ xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_notation(AgsSimpleFile *simple_file, xmlNode *parent, AgsNotation *notation) { xmlNode *node; xmlNode *child; GList *list; node = xmlNewNode(NULL, "ags-sf-notation"); xmlNewProp(node, "channel", g_strdup_printf("%d", notation->audio_channel)); /* timestamp */ child = xmlNewNode(NULL, "ags-sf-timestamp"); xmlNewProp(child, "offset", g_strdup_printf("%lu", notation->timestamp->timer.ags_offset.offset)); /* add to parent */ xmlAddChild(node, child); /* note */ list = notation->notes; while(list != NULL){ child = xmlNewNode(NULL, "ags-sf-note"); xmlNewProp(child, "x0", g_strdup_printf("%d", AGS_NOTE(list->data)->x[0])); xmlNewProp(child, "x1", g_strdup_printf("%d", AGS_NOTE(list->data)->x[1])); xmlNewProp(child, "y", g_strdup_printf("%d", AGS_NOTE(list->data)->y)); if((AGS_NOTE_ENVELOPE & (AGS_NOTE(list->data)->flags)) != 0){ xmlNewProp(child, "envelope", "true"); } xmlNewProp(child, "attack", g_strdup_printf("%f %f", AGS_NOTE(list->data)->attack[0], AGS_NOTE(list->data)->attack[1])); xmlNewProp(child, "decay", g_strdup_printf("%f %f", AGS_NOTE(list->data)->decay[0], AGS_NOTE(list->data)->decay[1])); xmlNewProp(child, "sustain", g_strdup_printf("%f %f", AGS_NOTE(list->data)->sustain[0], AGS_NOTE(list->data)->sustain[1])); xmlNewProp(child, "release", g_strdup_printf("%f %f", AGS_NOTE(list->data)->release[0], AGS_NOTE(list->data)->release[1])); xmlNewProp(child, "ratio", g_strdup_printf("%f %f", AGS_NOTE(list->data)->ratio[0], AGS_NOTE(list->data)->ratio[1])); /* add to parent */ xmlAddChild(node, child); list = list->next; } /* add to parent */ xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_automation_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *automation) { xmlNode *node; node = xmlNewNode(NULL, "ags-sf-automation-list"); while(automation != NULL){ ags_simple_file_write_automation(simple_file, node, automation->data); automation = automation->next; } /* add to parent */ xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_automation(AgsSimpleFile *simple_file, xmlNode *parent, AgsAutomation *automation) { xmlNode *node; xmlNode *child; GList *list; node = xmlNewNode(NULL, "ags-sf-automation"); xmlNewProp(node, "line", g_strdup_printf("%d", automation->line)); /* timestamp */ child = xmlNewNode(NULL, "ags-sf-timestamp"); xmlNewProp(child, "offset", g_strdup_printf("%lu", automation->timestamp->timer.ags_offset.offset)); /* add to parent */ xmlAddChild(node, child); /* acceleration */ list = automation->acceleration; while(list != NULL){ child = xmlNewNode(NULL, "ags-sf-acceleration"); xmlNewProp(child, "x", g_strdup_printf("%d", AGS_ACCELERATION(list->data)->x)); xmlNewProp(child, "y", g_strdup_printf("%d", AGS_ACCELERATION(list->data)->y)); /* add to parent */ xmlAddChild(node, child); list = list->next; } /* add to parent */ xmlAddChild(parent, node); return(node); } xmlNode* ags_simple_file_write_preset_list(AgsSimpleFile *simple_file, xmlNode *parent, GList *preset) { xmlNode *node; gboolean found_node; node = xmlNewNode(NULL, "ags-sf-preset-list"); found_node = FALSE; while(preset != NULL){ if(ags_simple_file_write_preset(simple_file, node, preset->data) != NULL){ found_node = TRUE; } preset = preset->next; } if(found_node){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } xmlNode* ags_simple_file_write_preset(AgsSimpleFile *simple_file, xmlNode *parent, AgsPreset *preset) { xmlNode *node; xmlNode *child; guint i; gboolean found_preset; node = xmlNewNode(NULL, "ags-sf-preset"); /* scope and preset name */ xmlNewProp(node, "scope", g_strdup(preset->scope)); xmlNewProp(node, "preset-name", g_strdup(preset->preset_name)); /* mapping */ xmlNewProp(node, "audio-channel-start", g_strdup_printf("%d", preset->audio_channel_start)); xmlNewProp(node, "audio-channel-end", g_strdup_printf("%d", preset->audio_channel_end)); xmlNewProp(node, "pad-start", g_strdup_printf("%d", preset->pad_start)); xmlNewProp(node, "pad-end", g_strdup_printf("%d", preset->pad_end)); xmlNewProp(node, "x-start", g_strdup_printf("%d", preset->x_start)); xmlNewProp(node, "x-end", g_strdup_printf("%d", preset->x_end)); /* parameter */ found_preset = FALSE; for(i = 0; i < preset->n_params; i++){ found_preset = TRUE; ags_simple_file_write_property(simple_file, node, &(preset->parameter[i])); } if(found_preset){ /* add to parent */ xmlAddChild(parent, node); return(node); }else{ xmlFreeNode(node); return(NULL); } } AgsSimpleFile* ags_simple_file_new() { AgsSimpleFile *simple_file; simple_file = (AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, NULL); return(simple_file); } gsequencer-1.4.24/ags/X/file/ags_gui_file_xml.c0000644000175000017500000043155213247044247016246 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define AGS_FILE_READ_NOTATION_EDITOR_PARAMETER_NAME "ags-file-read-notation-editor-parameter-name" void ags_file_read_window_resolve_soundcard(AgsFileLookup *file_lookup, AgsWindow *window); void ags_file_write_window_resolve_soundcard(AgsFileLookup *file_lookup, AgsWindow *window); void ags_file_read_machine_resolve_machine_editor(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_file_write_machine_resolve_machine_editor(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_file_write_machine_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_file_read_machine_resolve_rename_dialog(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_file_write_machine_resolve_rename_dialog(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_file_read_pad_resolve_channel(AgsFileLookup *file_lookup, AgsPad *pad); void ags_file_read_line_resolve_channel(AgsFileLookup *file_lookup, AgsLine *line); void ags_file_read_line_member_resolve_port(AgsFileLookup *file_lookup, AgsLineMember *line_member); void ags_file_write_line_member_resolve_port(AgsFileLookup *file_lookup, AgsLineMember *line_member); void ags_file_write_effect_bridge_resolve_audio(AgsFileLookup *file_lookup, AgsEffectBridge *effect_bridge); void ags_file_write_effect_bulk_resolve_audio(AgsFileLookup *file_lookup, AgsEffectBulk *effect_bulk); void ags_file_read_bulk_member_resolve_port(AgsFileLookup *file_lookup, AgsBulkMember *bulk_member); void ags_file_read_effect_pad_resolve_channel(AgsFileLookup *file_lookup, AgsPad *pad); void ags_file_read_effect_line_resolve_channel(AgsFileLookup *file_lookup, AgsLine *line); void ags_file_read_notation_editor_resolve_parameter(AgsFileLookup *file_lookup, AgsNotationEditor *notation_editor); void ags_file_read_notation_editor_launch(AgsFileLaunch *file_launch, AgsNotationEditor *notation_editor); void ags_file_read_machine_selector_resolve_parameter(AgsFileLookup *file_lookup, AgsMachineSelector *machine_selector); void ags_file_read_navigation_resolve_soundcard(AgsFileLookup *file_lookup, AgsNavigation *navigation); void ags_file_read_widget(AgsFile *file, xmlNode *node, GtkWidget *widget) { //TODO:JK: implement me } xmlNode* ags_file_write_widget(AgsFile *file, xmlNode *parent, GtkWidget *widget) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_window(AgsFile *file, xmlNode *node, AgsWindow **window) { AgsWindow *gobject; AgsFileLookup *file_lookup; xmlNode *child; xmlChar *prop, *content; xmlChar *str; if(*window == NULL){ gobject = g_object_new(AGS_TYPE_WINDOW, NULL); *window = gobject; }else{ gobject = *window; } g_object_set(G_OBJECT(gobject), "application-context", file->application_context, NULL); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); str = xmlGetProp(node, "name"); if(str != NULL){ gobject->name = (gchar *) g_strdup(str); }else{ gobject->name = (gchar *) g_strdup(file->filename); } /* soundcard */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_window_resolve_soundcard), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-menu-bar", 11)){ ags_file_read_menu_bar(file, child, &(gobject->menu_bar)); }else if(!xmlStrncmp(child->name, "ags-machine-counter-list", 24)){ ags_file_read_machine_counter_list(file, child, &(gobject->machine_counter)); }else if(!xmlStrncmp(child->name, "ags-machine-list", 16)){ GList *list; list = NULL; ags_file_read_machine_list(file, child, &list); while(list != NULL){ gtk_box_pack_start((GtkBox *) gobject->machines, GTK_WIDGET(list->data), FALSE, FALSE, 0); list = list->next; } }else if(!xmlStrncmp(child->name, "ags-notation-editor", 10)){ ags_file_read_notation_editor(file, child, &(gobject->notation_editor)); }else if(!xmlStrncmp(child->name, "ags-navigation", 14)){ ags_file_read_navigation(file, child, &(gobject->navigation)); } } child = child->next; } } void ags_file_read_window_resolve_soundcard(AgsFileLookup *file_lookup, AgsWindow *window) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "soundcard"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref != NULL){ g_object_set(G_OBJECT(window), "soundcard", (AgsWindow *) id_ref->ref, NULL); } } xmlNode* ags_file_write_window(AgsFile *file, xmlNode *parent, AgsWindow *window) { AgsFileLookup *file_lookup; xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-window"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", window, NULL)); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", window->flags)); xmlNewProp(node, "name", g_strdup(window->name)); /* soundcard */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", window, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_window_resolve_soundcard), window); xmlAddChild(parent, node); /* child elements */ ags_file_write_menu_bar(file, node, window->menu_bar); ags_file_write_machine_list(file, node, gtk_container_get_children(GTK_CONTAINER(window->machines))); ags_file_write_notation_editor(file, node, window->notation_editor); ags_file_write_navigation(file, node, window->navigation); return(node); } void ags_file_write_window_resolve_soundcard(AgsFileLookup *file_lookup, AgsWindow *window) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, window->soundcard); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "soundcard", g_strdup_printf("xpath=//ags-soundcard[@id='%s']", id)); } void ags_file_read_menu_bar(AgsFile *file, xmlNode *node, AgsMenuBar **menu_bar) { AgsMenuBar *gobject; xmlNode *child; xmlChar *prop, *content; if(*menu_bar == NULL){ gobject = g_object_new(AGS_TYPE_MENU_BAR, NULL); *menu_bar = gobject; }else{ gobject = *menu_bar; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); } xmlNode* ags_file_write_menu_bar(AgsFile *file, xmlNode *parent, AgsMenuBar *menu_bar) { xmlNode *node, *child; gchar *id; guint i; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-menu-bar"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", menu_bar, NULL)); xmlAddChild(parent, node); return(node); } void ags_file_read_machine_counter(AgsFile *file, xmlNode *node, AgsMachineCounter **machine_counter) { AgsMachineCounter *ptr; xmlNode *child; xmlChar *prop, *content; if(*machine_counter == NULL){ ptr = ags_machine_counter_alloc(NULL, NULL, G_TYPE_NONE, 0); *machine_counter = ptr; }else{ ptr = *machine_counter; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", ptr, NULL)); ptr->version = xmlGetProp(node, AGS_FILE_VERSION_PROP); ptr->build_id = xmlGetProp(node, AGS_FILE_BUILD_ID_PROP); ptr->machine_type = g_type_from_name(xmlGetProp(node, AGS_FILE_TYPE_PROP)); ptr->counter = g_ascii_strtoull(xmlGetProp(node, "counter"), NULL, 10); } xmlNode* ags_file_write_machine_counter(AgsFile *file, xmlNode *parent, AgsMachineCounter *machine_counter) { xmlNode *node, *child; gchar *id; guint i; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-machine-counter"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", machine_counter, NULL)); xmlNewProp(node, AGS_FILE_VERSION_PROP, machine_counter->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, machine_counter->build_id); xmlNewProp(node, AGS_FILE_TYPE_PROP, g_type_name(machine_counter->machine_type)); xmlNewProp(node, "counter", g_strdup_printf("%d", machine_counter->counter)); xmlAddChild(parent, node); return(node); } void ags_file_read_machine_counter_list(AgsFile *file, xmlNode *node, GList **machine_counter) { AgsMachineCounter *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ current = NULL; ags_file_read_machine_counter(file, child, ¤t); list = g_list_prepend(list, current); child = child->next; } list = g_list_reverse(list); *machine_counter = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_machine_counter_list(AgsFile *file, xmlNode *parent, GList *machine_counter) { AgsMachineCounter *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-machine-counter-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = machine_counter; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_machine_counter(file, node, AGS_MACHINE_COUNTER(list->data)); list = list->next; } return(node); } void ags_file_read_machine(AgsFile *file, xmlNode *node, AgsMachine **machine) { AgsMachine *gobject; AgsFileLookup *file_lookup; GType machine_type; xmlNode *child; if(*machine == NULL){ machine_type = g_type_from_name(xmlGetProp(node, AGS_FILE_TYPE_PROP)); gobject = (AgsMachine *) g_object_new(machine_type, NULL); *machine = gobject; }else{ gobject = *machine; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->version = g_strdup(xmlGetProp(node, AGS_FILE_VERSION_PROP)); gobject->build_id = g_strdup(xmlGetProp(node, AGS_FILE_BUILD_ID_PROP)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); gobject->flags |= AGS_MACHINE_PREMAPPED_RECALL; gobject->flags &= (~AGS_MACHINE_CONNECTED); gobject->file_input_flags = (guint) g_ascii_strtoull(xmlGetProp(node, "file-input-flags"), NULL, 16); /* audio */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_machine_resolve_audio), gobject); /* machine-editor */ //TODO:JK: uncomment me // file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, // "file", file, // "node", node, // "reference", gobject, // NULL); // ags_file_add_lookup(file, (GObject *) file_lookup); // g_signal_connect(G_OBJECT(file_lookup), "resolve", // G_CALLBACK(ags_file_read_machine_resolve_machine_editor), gobject); /* rename-dialog */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_machine_resolve_rename_dialog), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp(child->name, ags_plugin_get_xml_type(AGS_PLUGIN(gobject)))){ ags_plugin_read(file, child, AGS_PLUGIN(gobject)); }else if(!xmlStrncmp(child->name, "ags-pad-list", 12)){ GList *pad, *list; pad = NULL; ags_file_read_pad_list(file, child, &pad); if(!xmlStrncmp(xmlGetProp(child, AGS_FILE_SCOPE_PROP), "output", 6)){ if(!GTK_IS_BOX(gobject->output)){ ags_container_add_all(gobject->output, pad); }else{ list = pad; while(list != NULL){ gtk_box_pack_start(GTK_BOX(gobject->output), GTK_WIDGET(list->data), FALSE, FALSE, 0); list = list->next; } } }else{ if(!GTK_IS_BOX(gobject->input)){ ags_container_add_all(gobject->input, pad); }else{ list = pad; while(list != NULL){ gtk_box_pack_start(GTK_BOX(gobject->input), GTK_WIDGET(list->data), FALSE, FALSE, 0); list = list->next; } } } g_list_free(pad); }else if(!xmlStrncmp(child->name, "ags-effect-bridge", 18)){ ags_file_read_effect_bridge(file, child, (AgsEffectBridge **) &(gobject->bridge)); } } child = child->next; } } void ags_file_read_machine_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsFileIdRef *id_ref; gchar *xpath; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; gchar *str; xpath = (gchar *) xmlGetProp(file_lookup->node, "audio"); g_message("xpath = %s", xpath); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); g_object_set(G_OBJECT(machine), "audio", (AgsAudio *) id_ref->ref, NULL); AGS_AUDIO(id_ref->ref)->machine = (GObject *) machine; str = xmlGetProp(file_lookup->node, AGS_FILE_NAME_PROP); if(str != NULL){ g_object_set(machine, "machine-name", str, NULL); } } void ags_file_read_machine_resolve_machine_editor(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "machine-editor"); if(xpath == NULL){ return; } id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); //TODO:JK: use g_object_set machine->properties = (GtkDialog *) id_ref->ref; } void ags_file_read_machine_resolve_rename_dialog(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "rename-dialog"); if(xpath == NULL){ return; } id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); //TODO:JK: use g_object_set machine->rename = (GtkDialog *) id_ref->ref; } xmlNode* ags_file_write_machine(AgsFile *file, xmlNode *parent, AgsMachine *machine) { AgsFileLookup *file_lookup; xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-machine"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", machine, NULL)); xmlNewProp(node, AGS_FILE_TYPE_PROP, G_OBJECT_TYPE_NAME(machine)); xmlNewProp(node, AGS_FILE_VERSION_PROP, machine->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, machine->build_id); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", ((~(AGS_MACHINE_BLOCK_PLAY | AGS_MACHINE_BLOCK_STOP)) & (machine->flags)))); xmlNewProp(node, "file-input-flags", g_strdup_printf("%x", machine->file_input_flags)); xmlNewProp(node, AGS_FILE_NAME_PROP, machine->machine_name); xmlAddChild(parent, node); /* audio */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", machine, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_machine_resolve_audio), machine); /* machine-editor */ //TODO:JK: uncomment me // file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, // "file", file, // "node", node, // "reference", machine, // NULL); // ags_file_add_lookup(file, (GObject *) file_lookup); // g_signal_connect(G_OBJECT(file_lookup), "resolve", // G_CALLBACK(ags_file_write_machine_resolve_machine_editor), machine); /* rename-dialog */ //TODO:JK: uncomment me // file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, // "file", file, // "node", node, // "reference", machine, // NULL); // ags_file_add_lookup(file, (GObject *) file_lookup); // g_signal_connect(G_OBJECT(file_lookup), "resolve", // G_CALLBACK(ags_file_write_machine_resolve_rename_dialog), machine); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(machine)); if(machine->output != NULL){ GList *list; list = gtk_container_get_children(machine->output); child = ags_file_write_pad_list(file, node, list); g_list_free(list); xmlNewProp(child, AGS_FILE_SCOPE_PROP, "output"); } if(machine->input != NULL){ GList *list; list = gtk_container_get_children(machine->input); child = ags_file_write_pad_list(file, node, list); g_list_free(list); xmlNewProp(child, AGS_FILE_SCOPE_PROP, "input"); } if(machine->bridge != NULL){ child = ags_file_write_effect_bridge(file, node, (AgsEffectBridge *) machine->bridge); } return(node); } void ags_file_write_machine_resolve_machine_editor(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, machine->properties); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "machine-editor", g_strdup_printf("xpath=//ags-machine-editor[@id='%s']", id)); } void ags_file_write_machine_resolve_rename_dialog(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, machine->rename); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "rename-dialog", g_strdup_printf("xpath=//ags-dialog[@id='%s']", id)); } void ags_file_write_machine_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_AUDIO(machine->audio)); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "audio", g_strdup_printf("xpath=//ags-audio[@id='%s']", id)); } void ags_file_read_machine_list(AgsFile *file, xmlNode *node, GList **machine) { AgsMachine *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-machine", 12)){ current = NULL; ags_file_read_machine(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *machine = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_machine_list(AgsFile *file, xmlNode *parent, GList *machine) { AgsMachine *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-machine-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = machine; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_machine(file, node, AGS_MACHINE(list->data)); list = list->next; } return(node); } void ags_file_read_pad(AgsFile *file, xmlNode *node, AgsPad **pad) { AgsPad *gobject; AgsFileLookup *file_lookup; xmlNode *child; GType pad_type; if(*pad == NULL){ pad_type = g_type_from_name(xmlGetProp(node, AGS_FILE_TYPE_PROP)); gobject = (AgsPad *) g_object_new(pad_type, NULL); *pad = gobject; }else{ gobject = *pad; } if(gobject == NULL) return; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->version = g_strdup(xmlGetProp(node, AGS_FILE_VERSION_PROP)); gobject->build_id = g_strdup(xmlGetProp(node, AGS_FILE_BUILD_ID_PROP)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); gobject->flags &= (~AGS_PAD_CONNECTED); /* channel */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_pad_resolve_channel), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp(child->name, ags_plugin_get_xml_type(AGS_PLUGIN(gobject)))){ ags_plugin_read(file, child, AGS_PLUGIN(gobject)); }else if(!xmlStrncmp(child->name, "ags-line-list", 13)){ xmlNode *line_node; GList *start, *list; list = NULL; ags_file_read_line_list(file, child, &list); start = list; /* add line to pad */ line_node = child->children; while(line_node != NULL){ if(line_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(line_node->name, "ags-line", 8)){ guint x, y; guint width, height; g_object_set(G_OBJECT(list->data), "pad", gobject, NULL); x = g_ascii_strtoull(xmlGetProp(line_node, "left-attach"), NULL, 10); y = g_ascii_strtoull(xmlGetProp(line_node, "top-attach"), NULL, 10); width = g_ascii_strtoull(xmlGetProp(line_node, "right-attach"), NULL, 10) - x; height = g_ascii_strtoull(xmlGetProp(line_node, "bottom-attach"), NULL, 10) - y; ags_expander_set_add(gobject->expander_set, GTK_WIDGET(list->data), x, y, width, height); list = list->next; } } line_node = line_node->next; } g_list_free(start); } } child = child->next; } } void ags_file_read_pad_resolve_channel(AgsFileLookup *file_lookup, AgsPad *pad) { AgsFile *file; AgsMachine *machine; AgsFileIdRef *id_ref; xmlNode *node, *audio_node, *channel_node; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; GList *list; xmlChar *xpath; guint position; guint nth, audio_channel; guint i, j; gboolean is_output; file = file_lookup->file; machine = (AgsMachine *) gtk_widget_get_ancestor(GTK_WIDGET(pad), AGS_TYPE_MACHINE); if(machine->output != NULL){ list = gtk_container_get_children(machine->output); if(list != NULL && g_list_find(list, pad) != NULL){ is_output = TRUE; }else{ is_output = FALSE; } }else{ is_output = FALSE; } node = file_lookup->node; /* retrieve position */ xpath_context = xmlXPathNewContext(file->doc); // xmlXPathSetContextNode(node->parent, // xpath_context); xpath_context->node = node->parent; xpath_object = xmlXPathEval("./ags-pad", xpath_context); for(i = 0, j = 0; xpath_object->nodesetval->nodeTab[i] != node && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } nth = j; /* */ position = nth * machine->audio->audio_channels; /* */ id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, machine->audio); audio_node = NULL; if(id_ref != NULL){ audio_node = id_ref->node; } /* */ xpath = g_strdup_printf("(./ags-channel-list/ags-channel)/%s", (is_output ? "ags-output": "ags-input")); xpath_context = xmlXPathNewContext(file->doc); xpath_context->node = audio_node; xpath_object = xmlXPathEval(xpath, xpath_context); /* */ if(xpath_object != NULL && xpath_object->nodesetval != NULL){ AgsFileIdRef *file_id_ref; xmlNode *channel_node; for(i = 0, j = 0; j < position && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i] != NULL && xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } channel_node = xpath_object->nodesetval->nodeTab[i]; file_id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_node(file, channel_node); g_object_set(G_OBJECT(pad), "channel", AGS_CHANNEL(file_id_ref->ref), NULL); }else{ g_message("no xpath match: %s", xpath); } } xmlNode* ags_file_write_pad(AgsFile *file, xmlNode *parent, AgsPad *pad) { AgsExpanderSetChild *expander_set_child; AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *line_node; GList *line, *line_start; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-pad"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", pad, NULL)); xmlNewProp(node, AGS_FILE_TYPE_PROP, G_OBJECT_TYPE_NAME(pad)); xmlNewProp(node, AGS_FILE_VERSION_PROP, pad->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, pad->build_id); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", ((~AGS_PAD_CONNECTED) & (pad->flags)))); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(pad)); line_start = line = gtk_container_get_children(GTK_CONTAINER(pad->expander_set)); child = ags_file_write_line_list(file, node, line); line_node = child->children; while(line != NULL){ expander_set_child = ags_expander_set_child_find(pad->expander_set, line->data); xmlNewProp(line_node, "left-attach", g_strdup_printf("%d", expander_set_child->x)); xmlNewProp(line_node, "top-attach", g_strdup_printf("%d", expander_set_child->y)); xmlNewProp(line_node, "right-attach", g_strdup_printf("%d", expander_set_child->x + expander_set_child->width)); xmlNewProp(line_node, "bottom-attach", g_strdup_printf("%d", expander_set_child->y + expander_set_child->height)); line = line->next; line_node = line_node->next; } g_list_free(line_start); return(node); } void ags_file_read_pad_list(AgsFile *file, xmlNode *node, GList **pad) { AgsPad *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-pad", 8)){ current = NULL; ags_file_read_pad(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *pad = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_pad_list(AgsFile *file, xmlNode *parent, GList *pad) { AgsPad *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-pad-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = pad; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_pad(file, node, AGS_PAD(list->data)); list = list->next; } return(node); } void ags_file_read_line(AgsFile *file, xmlNode *node, AgsLine **line) { AgsLine *gobject; AgsFileLookup *file_lookup; xmlNode *child; GType line_type; if(*line == NULL){ line_type = g_type_from_name(xmlGetProp(node, AGS_FILE_TYPE_PROP)); gobject = (AgsLine *) g_object_new(line_type, NULL); *line = gobject; }else{ gobject = *line; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->version = g_strdup(xmlGetProp(node, AGS_FILE_VERSION_PROP)); gobject->build_id = g_strdup(xmlGetProp(node, AGS_FILE_BUILD_ID_PROP)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); gobject->flags |= AGS_LINE_PREMAPPED_RECALL; gobject->flags &= (~AGS_LINE_CONNECTED); /* channel */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_line_resolve_channel), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp(child->name, ags_plugin_get_xml_type(AGS_PLUGIN(gobject)))){ ags_plugin_read(file, child, AGS_PLUGIN(gobject)); }else if(!xmlStrncmp(child->name, "ags-line-member-list", 20)){ xmlNode *line_member_node; GList *start, *list; list = NULL; ags_file_read_line_member_list(file, child, &list); start = list; /* remove default line members */ gtk_widget_destroy(GTK_WIDGET(gobject->expander)); gobject->expander = ags_expander_new(1, 1); gtk_table_set_row_spacings(gobject->expander->table, 2); gtk_table_set_col_spacings(gobject->expander->table, 2); gtk_box_pack_start(GTK_BOX(gobject), GTK_WIDGET(gobject->expander), TRUE, TRUE, 0); /* add line member to line */ line_member_node = child->children; while(line_member_node != NULL){ if(line_member_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-line-member", 15)){ guint x, y; guint width, height; /* pack */ x = g_ascii_strtoull(xmlGetProp(line_member_node, "left-attach"), NULL, 10); y = g_ascii_strtoull(xmlGetProp(line_member_node, "top-attach"), NULL, 10); width = g_ascii_strtoull(xmlGetProp(line_member_node, "right-attach"), NULL, 10) - x; height = g_ascii_strtoull(xmlGetProp(line_member_node, "bottom-attach"), NULL, 10) - y; ags_expander_add(gobject->expander, GTK_WIDGET(list->data), x, y, width, height); /* iterate */ list = list->next; } } line_member_node = line_member_node->next; } g_list_free(start); } } child = child->next; } } void ags_file_read_line_resolve_channel(AgsFileLookup *file_lookup, AgsLine *line) { AgsFile *file; AgsMachine *machine; AgsFileIdRef *id_ref; xmlNode *pad_node, *node, *audio_node, *channel_node; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; GList *list; xmlChar *xpath; guint position; guint pad, audio_channel; guint i, j; gboolean is_output; file = file_lookup->file; machine = (AgsMachine *) gtk_widget_get_ancestor(GTK_WIDGET(line), AGS_TYPE_MACHINE); if(machine->output != NULL){ AgsPad *pad; pad = (AgsPad *) gtk_widget_get_ancestor((GtkWidget *) line, AGS_TYPE_PAD); list = gtk_container_get_children(machine->output); if(list != NULL && g_list_find(list, pad) != NULL){ is_output = TRUE; }else{ is_output = FALSE; } }else{ is_output = FALSE; } node = file_lookup->node; pad_node = node->parent->parent; /* retrieve position - pad */ xpath_context = xmlXPathNewContext(file->doc); // xmlXPathSetContextNode(node->parent->parent->parent, // xpath_context); xpath_context->node = pad_node->parent; xpath_object = xmlXPathEval("./ags-pad", xpath_context); for(i = 0, j = 0; xpath_object->nodesetval->nodeTab[i] != pad_node && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } pad = j; /* retrieve position - line */ xpath_context = xmlXPathNewContext(file->doc); // xmlXPathSetContextNode(node->parent, // xpath_context); xpath_context->node = node->parent; xpath_object = xmlXPathEval("./ags-line", xpath_context); for(i = 0, j = 0; xpath_object->nodesetval->nodeTab[i] != node && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } audio_channel = j; /* */ position = pad * machine->audio->audio_channels + (machine->audio->audio_channels - audio_channel - 1); /* */ id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, machine->audio); audio_node = NULL; if(id_ref != NULL){ audio_node = id_ref->node; } /* */ xpath = g_strdup_printf("(./ags-channel-list/ags-channel)/%s", ((is_output) ? "ags-output": "ags-input")); xpath_context = xmlXPathNewContext(file->doc); xpath_context->node = audio_node; xpath_object = xmlXPathEval(xpath, xpath_context); /* */ if(xpath_object != NULL && xpath_object->nodesetval != NULL){ AgsFileIdRef *file_id_ref; xmlNode *channel_node; for(i = 0, j = 0; j < position && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i] != NULL && xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } channel_node = xpath_object->nodesetval->nodeTab[i]; file_id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_node(file, channel_node); g_object_set(G_OBJECT(line), "channel", AGS_CHANNEL(file_id_ref->ref), NULL); }else{ g_message("no xpath match: %s", xpath); } } xmlNode* ags_file_write_line(AgsFile *file, xmlNode *parent, AgsLine *line) { AgsExpanderChild *expander_child; AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *line_member_node; GList *line_member, *line_member_start; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-line"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", line, NULL)); xmlNewProp(node, AGS_FILE_TYPE_PROP, G_OBJECT_TYPE_NAME(line)); xmlNewProp(node, AGS_FILE_VERSION_PROP, line->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, line->build_id); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", ((~AGS_LINE_CONNECTED)&(line->flags)))); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(line)); line_member_start = line_member = gtk_container_get_children(GTK_CONTAINER(line->expander->table)); child = ags_file_write_line_member_list(file, node, line_member); line_member_node = child->children; while(line_member != NULL){ if(AGS_IS_LINE_MEMBER(line_member->data)){ expander_child = ags_expander_child_find(line->expander, line_member->data); xmlNewProp(line_member_node, "left-attach", g_strdup_printf("%d", expander_child->x)); xmlNewProp(line_member_node, "top-attach", g_strdup_printf("%d", expander_child->y)); xmlNewProp(line_member_node, "right-attach", g_strdup_printf("%d", expander_child->x + expander_child->width)); xmlNewProp(line_member_node, "bottom-attach", g_strdup_printf("%d", expander_child->y + expander_child->height)); line_member_node = line_member_node->next; } line_member = line_member->next; } g_list_free(line_member_start); return(node); } void ags_file_read_line_list(AgsFile *file, xmlNode *node, GList **line) { AgsLine *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-line", 9)){ current = NULL; ags_file_read_line(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *line = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_line_list(AgsFile *file, xmlNode *parent, GList *line) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-line-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = line; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_line(file, node, AGS_LINE(list->data)); list = list->next; } return(node); } void ags_file_read_line_member(AgsFile *file, xmlNode *node, AgsLineMember **line_member) { AgsLineMember *gobject; GtkAdjustment *adjustment; GtkWidget *child_widget; AgsFileLookup *file_lookup; xmlNode *child; xmlChar *prop, *content; gchar *widget_type; gchar *label; gchar *task_type; guint width, height; if(*line_member == NULL){ gobject = g_object_new(AGS_TYPE_LINE_MEMBER, NULL); *line_member = gobject; }else{ gobject = *line_member; if(!AGS_IS_LINE_MEMBER(gobject)){ return; } } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); widget_type = (gchar *) xmlGetProp(node, "widget-type"); g_object_set(gobject, "widget-type", g_type_from_name(widget_type), NULL); child_widget = (GtkWidget *) gtk_bin_get_child(GTK_BIN(gobject)); /* label */ label = (gchar *) xmlGetProp(node, "label"); if(label != NULL){ g_object_set(G_OBJECT(gobject), "widget-label", label, NULL); } /* size */ width = (guint) g_ascii_strtoull(xmlGetProp(node, "width"), NULL, 10); height = (guint) g_ascii_strtoull(xmlGetProp(node, "height"), NULL, 10); gtk_widget_set_size_request(child_widget, width, height); /* check misc */ if(GTK_IS_MISC(child_widget)){ gfloat xalign, yalign; guint xpad, ypad; xalign = (gfloat) g_ascii_strtod(xmlGetProp(node, "xalign"), NULL); yalign = (gfloat) g_ascii_strtod(xmlGetProp(node, "yalign"), NULL); xpad = (guint) g_ascii_strtoull(xmlGetProp(node, "xpad"), NULL, 10); ypad = (guint) g_ascii_strtoull(xmlGetProp(node, "ypad"), NULL, 10); } /* check adjustment and toggle types */ adjustment = NULL; if(GTK_IS_TOGGLE_BUTTON(child_widget)){ if(!xmlStrncmp(AGS_FILE_TRUE, xmlGetProp(node, "value"), 5)){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(child_widget), TRUE); } }else if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; dial = (AgsDial *) child_widget; adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(child_widget, "adjustment", adjustment, NULL); gtk_widget_set_size_request((GtkWidget *) dial, 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, xmlGetProp(node, "inverted"), 9)){ gtk_range_set_inverted(GTK_RANGE(child_widget), TRUE); } }else if(AGS_IS_VINDICATOR(child_widget)){ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 10.0, 1.0, 1.0, 10.0); g_object_set(child_widget, "adjustment", adjustment, NULL); gtk_widget_queue_draw(child_widget); } //TODO:JK: implement more types if(adjustment != NULL){ gdouble upper, lower; gdouble step, page; gdouble value; step = (gdouble) g_ascii_strtod(xmlGetProp(node, "step"), NULL); gtk_adjustment_set_step_increment(adjustment, step); lower = (gdouble) g_ascii_strtod(xmlGetProp(node, "lower"), NULL); gtk_adjustment_set_lower(adjustment, lower); upper = (gdouble) g_ascii_strtod(xmlGetProp(node, "upper"), NULL); gtk_adjustment_set_upper(adjustment, upper); // page = (gdouble) g_ascii_strtod(xmlGetProp(node, "page"), // NULL); // gtk_adjustment_set_page_size(adjustment, // page); value = (gdouble) g_ascii_strtod(xmlGetProp(node, "value"), NULL); gtk_adjustment_set_value(adjustment, value); } /* flags */ gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); if((task_type = xmlGetProp(node, "task-type")) != NULL){ gobject->task_type = g_type_from_name(task_type); } /* port */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_line_member_resolve_port), gobject); } void ags_file_read_line_member_resolve_port(AgsFileLookup *file_lookup, AgsLineMember *line_member) { GtkWidget *child_widget; AgsFileIdRef *id_ref; gchar *xpath; /* play port */ xpath = (gchar *) xmlGetProp(file_lookup->node, "port"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref == NULL){ g_warning("couldn't find port"); }else{ g_object_set(G_OBJECT(line_member), "port", (AgsPort *) id_ref->ref, NULL); } /* recall port */ xpath = (gchar *) xmlGetProp(file_lookup->node, "recall-port"); if(xpath != NULL){ id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref == NULL){ g_warning("couldn't find port"); }else{ g_object_set(G_OBJECT(line_member), "recall-port", (AgsPort *) id_ref->ref, NULL); } } } xmlNode* ags_file_write_line_member(AgsFile *file, xmlNode *parent, AgsLineMember *line_member) { AgsFileLookup *file_lookup; GtkWidget *child_widget; GtkAdjustment *adjustment; xmlNode *node; gchar *id; gchar *label; guint control_width, control_height; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-line-member"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", line_member, NULL)); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", line_member->flags)); xmlNewProp(node, "widget-type", g_strdup_printf("%s", g_type_name(line_member->widget_type))); child_widget = gtk_bin_get_child(GTK_BIN(line_member)); label = NULL; g_object_get(G_OBJECT(line_member), "widget-label", &label, NULL); if(label != NULL){ xmlNewProp(node, "label", g_strdup_printf("%s", label)); } gtk_widget_get_size_request(child_widget, &control_width, &control_height); xmlNewProp(node, "width", g_strdup_printf("%d", control_width)); xmlNewProp(node, "height", g_strdup_printf("%d", control_height)); if(line_member->task_type != G_TYPE_NONE){ xmlNewProp(node, AGS_FILE_TYPE_PROP, g_strdup_printf("%s", g_type_name(line_member->task_type))); } /* */ if(GTK_IS_MISC(child_widget)){ gfloat xalign, yalign; gint xpad, ypad; gtk_misc_get_alignment(GTK_MISC(child_widget), &xalign, &yalign); xmlNewProp(node, "xalign", g_strdup_printf("%f", xalign)); xmlNewProp(node, "yalign", g_strdup_printf("%f", yalign)); gtk_misc_get_padding(GTK_MISC(child_widget), &xpad, &ypad); xmlNewProp(node, "xpad", g_strdup_printf("%d", xpad)); xmlNewProp(node, "ypad", g_strdup_printf("%d", ypad)); } /* */ adjustment = NULL; /* */ if(GTK_IS_TOGGLE_BUTTON(child_widget)){ xmlNewProp(node, "value", g_strdup_printf("%s", ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(child_widget))) ? AGS_FILE_TRUE: AGS_FILE_FALSE))); }else if(AGS_IS_DIAL(child_widget)){ adjustment = AGS_DIAL(child_widget)->adjustment; //TODO:JK: improve dial widget work-around }else if(GTK_IS_SPIN_BUTTON(child_widget)){ adjustment = GTK_SPIN_BUTTON(child_widget)->adjustment; }else if(GTK_IS_RANGE(child_widget)){ adjustment = GTK_RANGE(child_widget)->adjustment; xmlNewProp(node, "inverted", g_strdup_printf("%s", (gtk_range_get_inverted(GTK_RANGE(child_widget)) ? AGS_FILE_TRUE : AGS_FILE_FALSE))); }else if(AGS_IS_INDICATOR(child_widget)){ adjustment = AGS_INDICATOR(child_widget)->adjustment; } if(adjustment != NULL){ gdouble upper, lower; gdouble page, step; gdouble value; xmlNewProp(node, "upper", g_strdup_printf("%.8f", adjustment->upper)); xmlNewProp(node, "lower", g_strdup_printf("%.8f", adjustment->lower)); xmlNewProp(node, "page", g_strdup_printf("%.8f", adjustment->page_size)); xmlNewProp(node, "step", g_strdup_printf("%.8f", adjustment->step_increment)); xmlNewProp(node, "value", g_strdup_printf("%.8f", adjustment->value)); } /* port */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", line_member, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_line_member_resolve_port), line_member); xmlAddChild(parent, node); return(node); } void ags_file_write_line_member_resolve_port(AgsFileLookup *file_lookup, AgsLineMember *line_member) { AgsFileIdRef *id_ref; gchar *id; /* play port */ if(line_member->port != NULL){ id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, line_member->port); if(id_ref != NULL){ id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "port", g_strdup_printf("xpath=//*[@id='%s']", id)); } } /* recall port */ if(line_member->recall_port != NULL){ id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, line_member->recall_port); if(id_ref != NULL){ id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "recall-port", g_strdup_printf("xpath=//*[@id='%s']", id)); } } } void ags_file_read_line_member_list(AgsFile *file, xmlNode *node, GList **line_member) { AgsLineMember *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-line-member", 16)){ current = NULL; ags_file_read_line_member(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *line_member = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_line_member_list(AgsFile *file, xmlNode *parent, GList *line_member) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-line-member-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = line_member; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ if(AGS_IS_LINE_MEMBER(list->data)){ ags_file_write_line_member(file, node, AGS_LINE_MEMBER(list->data)); } list = list->next; } return(node); } void ags_file_read_effect_bridge(AgsFile *file, xmlNode *node, AgsEffectBridge **effect_bridge) { AgsEffectBridge *gobject; AgsFileLookup *file_lookup; GType effect_bridge_type; xmlNode *child; if(*effect_bridge == NULL){ effect_bridge_type = g_type_from_name(xmlGetProp(node, AGS_FILE_TYPE_PROP)); gobject = (AgsEffectBridge *) g_object_new(effect_bridge_type, NULL); *effect_bridge = gobject; }else{ gobject = *effect_bridge; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); gobject->flags |= AGS_EFFECT_BRIDGE_PREMAPPED_RECALL; gobject->flags &= (~AGS_EFFECT_BRIDGE_CONNECTED); gobject->name = g_strdup(xmlGetProp(node, AGS_FILE_NAME_PROP)); gobject->version = g_strdup(xmlGetProp(node, AGS_FILE_VERSION_PROP)); gobject->build_id = g_strdup(xmlGetProp(node, AGS_FILE_BUILD_ID_PROP)); /* audio */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_effect_bridge_resolve_audio), gobject); /* bulk */ gobject->bulk_output_type = g_type_from_name(xmlGetProp(node, "bulk-output-type")); gobject->bulk_input_type = g_type_from_name(xmlGetProp(node, "bulk-input-type")); /* pad and line */ gobject->output_pad_type = g_type_from_name(xmlGetProp(node, "output-pad-type")); gobject->output_line_type = g_type_from_name(xmlGetProp(node, "output-line-type")); gobject->input_pad_type = g_type_from_name(xmlGetProp(node, "input-pad-type")); gobject->input_line_type = g_type_from_name(xmlGetProp(node, "input-line-type")); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp(child->name, ags_plugin_get_xml_type(AGS_PLUGIN(gobject)))){ ags_plugin_read(file, child, AGS_PLUGIN(gobject)); }else if(!xmlStrncmp(child->name, "ags-effect-bulk", 16)){ if(!xmlStrncmp(xmlGetProp(child, AGS_FILE_SCOPE_PROP), "output", 6)){ ags_file_read_effect_bulk(file, child, (AgsEffectBulk **) &(gobject->bulk_output)); }else{ ags_file_read_effect_bulk(file, child, (AgsEffectBulk **) &(gobject->bulk_input)); } }else if(!xmlStrncmp(child->name, "ags-effect-pad-list", 20)){ GList *effect_pad, *list; effect_pad = NULL; ags_file_read_effect_pad_list(file, child, &effect_pad); if(!xmlStrncmp(xmlGetProp(child, AGS_FILE_SCOPE_PROP), "output", 7)){ if(!GTK_IS_BOX(gobject->output)){ ags_container_add_all((GtkContainer *) gobject->output, effect_pad); }else{ list = effect_pad; while(list != NULL){ gtk_box_pack_start(GTK_BOX(gobject->output), GTK_WIDGET(list->data), FALSE, FALSE, 0); list = list->next; } } }else{ if(!GTK_IS_BOX(gobject->input)){ ags_container_add_all((GtkContainer *) gobject->input, effect_pad); }else{ list = effect_pad; while(list != NULL){ gtk_box_pack_start(GTK_BOX(gobject->input), GTK_WIDGET(list->data), FALSE, FALSE, 0); list = list->next; } } } g_list_free(effect_pad); } } child = child->next; } } xmlNode* ags_file_write_effect_bridge(AgsFile *file, xmlNode *parent, AgsEffectBridge *effect_bridge) { AgsFileLookup *file_lookup; xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-effect-bridge"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", effect_bridge, NULL)); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", (effect_bridge->flags))); xmlNewProp(node, AGS_FILE_NAME_PROP, effect_bridge->name); xmlNewProp(node, AGS_FILE_TYPE_PROP, G_OBJECT_TYPE_NAME(effect_bridge)); xmlNewProp(node, AGS_FILE_VERSION_PROP, effect_bridge->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, effect_bridge->build_id); /* audio */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", effect_bridge, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_effect_bridge_resolve_audio), effect_bridge); /* bulk */ xmlNewProp(node, "bulk-output-type", g_strdup_printf("%s", g_type_name(effect_bridge->bulk_output_type))); xmlNewProp(node, "bulk-input-type", g_strdup_printf("%s", g_type_name(effect_bridge->bulk_input_type))); /* pad and list */ xmlNewProp(node, "output-pad-type", g_strdup_printf("%s", g_type_name(effect_bridge->output_pad_type))); xmlNewProp(node, "output-line-type", g_strdup_printf("%s", g_type_name(effect_bridge->output_line_type))); xmlNewProp(node, "input-pad-type", g_strdup_printf("%s", g_type_name(effect_bridge->input_pad_type))); xmlNewProp(node, "input-line-type", g_strdup_printf("%s", g_type_name(effect_bridge->input_line_type))); /* add to parent */ xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(effect_bridge)); if(effect_bridge->bulk_output != NULL){ child = ags_file_write_effect_bulk(file, node, (AgsEffectBulk *) effect_bridge->bulk_output); xmlNewProp(child, AGS_FILE_SCOPE_PROP, "output"); } if(effect_bridge->output != NULL){ GList *list; list = gtk_container_get_children((GtkContainer *) effect_bridge->output); child = ags_file_write_effect_pad_list(file, node, list); g_list_free(list); } if(effect_bridge->bulk_input != NULL){ child = ags_file_write_effect_bulk(file, node, (AgsEffectBulk *) effect_bridge->bulk_input); } if(effect_bridge->input != NULL){ GList *list; list = gtk_container_get_children((GtkContainer *) effect_bridge->input); child = ags_file_write_effect_pad_list(file, node, list); g_list_free(list); xmlNewProp(child, AGS_FILE_SCOPE_PROP, "input"); } return(node); } void ags_file_write_effect_bridge_resolve_audio(AgsFileLookup *file_lookup, AgsEffectBridge *effect_bridge) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_AUDIO(effect_bridge->audio)); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "audio", g_strdup_printf("xpath=//ags-audio[@id='%s']", id)); } void ags_file_read_effect_bridge_resolve_audio(AgsFileLookup *file_lookup, AgsEffectBridge *effect_bridge) { AgsFileIdRef *id_ref; gchar *xpath; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; gchar *str; xpath = (gchar *) xmlGetProp(file_lookup->node, "audio"); g_message("xpath = %s", xpath); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); g_object_set(G_OBJECT(effect_bridge), "audio", (AgsAudio *) id_ref->ref, NULL); str = xmlGetProp(file_lookup->node, AGS_FILE_NAME_PROP); if(str != NULL){ effect_bridge->name = g_strdup(str); } } void ags_file_read_effect_bridge_list(AgsFile *file, xmlNode *node, GList **effect_bridge) { AgsEffectBridge *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-effect-bridge", 12)){ current = NULL; ags_file_read_effect_bridge(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *effect_bridge = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_effect_bridge_list(AgsFile *file, xmlNode *parent, GList *effect_bridge) { AgsEffectBridge *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-effect-bridge-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = effect_bridge; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_effect_bridge(file, node, AGS_EFFECT_BRIDGE(list->data)); list = list->next; } return(node); } void ags_file_read_effect_bulk(AgsFile *file, xmlNode *node, AgsEffectBulk **effect_bulk) { AgsEffectBulk *gobject; AgsFileLookup *file_lookup; GType effect_bulk_type; xmlNode *child; if(*effect_bulk == NULL){ effect_bulk_type = g_type_from_name(xmlGetProp(node, AGS_FILE_TYPE_PROP)); gobject = (AgsEffectBulk *) g_object_new(effect_bulk_type, NULL); *effect_bulk = gobject; }else{ gobject = *effect_bulk; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); gobject->flags |= AGS_EFFECT_BULK_PREMAPPED_RECALL; gobject->flags &= (~AGS_EFFECT_BULK_CONNECTED); gobject->version = g_strdup(xmlGetProp(node, AGS_FILE_VERSION_PROP)); gobject->build_id = g_strdup(xmlGetProp(node, AGS_FILE_BUILD_ID_PROP)); /* scope */ gobject->channel_type = g_type_from_name(xmlGetProp(node, "channel-type")); /* audio */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_effect_bulk_resolve_audio), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp(child->name, ags_plugin_get_xml_type(AGS_PLUGIN(gobject)))){ ags_plugin_read(file, child, AGS_PLUGIN(gobject)); }else if(!xmlStrncmp(child->name, "ags-bulk-member-list", 21)){ xmlNode *bulk_member_node; GList *bulk_member, *bulk_member_start; bulk_member = NULL; ags_file_read_bulk_member_list(file, child, &bulk_member); bulk_member_start = bulk_member; /* add bulk member to effect bulk */ bulk_member_node = child->children; while(bulk_member_node != NULL){ if(bulk_member_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-bulk-member", 15)){ guint x0, y0; guint x1, y1; /* pack */ x0 = g_ascii_strtoull(xmlGetProp(bulk_member_node, "left-attach"), NULL, 10); y0 = g_ascii_strtoull(xmlGetProp(bulk_member_node, "top-attach"), NULL, 10); x1 = g_ascii_strtoull(xmlGetProp(bulk_member_node, "right-attach"), NULL, 10); y1 = g_ascii_strtoull(xmlGetProp(bulk_member_node, "bottom-attach"), NULL, 10); gtk_table_attach(gobject->table, GTK_WIDGET(bulk_member->data), x0, x1, y0, y1, GTK_FILL, GTK_FILL, 0, 0); /* iterate */ bulk_member = bulk_member->next; } } bulk_member_node = bulk_member_node->next; } g_list_free(bulk_member_start); } } child = child->next; } } xmlNode* ags_file_write_effect_bulk(AgsFile *file, xmlNode *parent, AgsEffectBulk *effect_bulk) { AgsFileLookup *file_lookup; xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-effect-bulk"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", effect_bulk, NULL)); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", (effect_bulk->flags))); xmlNewProp(node, AGS_FILE_NAME_PROP, effect_bulk->name); xmlNewProp(node, AGS_FILE_VERSION_PROP, effect_bulk->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, effect_bulk->build_id); /* scope */ if(g_type_is_a(effect_bulk->channel_type, AGS_TYPE_OUTPUT)){ xmlNewProp(node, AGS_FILE_SCOPE_PROP, "output"); }else{ xmlNewProp(node, AGS_FILE_SCOPE_PROP, "input"); } xmlNewProp(node, "channel-type", g_type_name(effect_bulk->channel_type)); xmlAddChild(parent, node); /* audio */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", effect_bulk, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_effect_bulk_resolve_audio), effect_bulk); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(effect_bulk)); if(effect_bulk->table != NULL){ GList *list; list = gtk_container_get_children((GtkContainer *) effect_bulk->table); child = ags_file_write_bulk_member_list(file, node, list); g_list_free(list); } return(node); } void ags_file_read_effect_bulk_list(AgsFile *file, xmlNode *node, GList **effect_bulk) { AgsEffectBulk *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-effect-bulk", 12)){ current = NULL; ags_file_read_effect_bulk(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *effect_bulk = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_effect_bulk_list(AgsFile *file, xmlNode *parent, GList *effect_bulk) { AgsEffectBulk *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-effect-bulk-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = effect_bulk; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_effect_bulk(file, node, AGS_EFFECT_BULK(list->data)); list = list->next; } return(node); } void ags_file_read_effect_bulk_resolve_audio(AgsFileLookup *file_lookup, AgsEffectBulk *effect_bulk) { AgsFileIdRef *id_ref; gchar *xpath; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; gchar *str; xpath = (gchar *) xmlGetProp(file_lookup->node, "audio"); g_message("xpath = %s", xpath); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); g_object_set(G_OBJECT(effect_bulk), "audio", (AgsAudio *) id_ref->ref, NULL); str = xmlGetProp(file_lookup->node, AGS_FILE_NAME_PROP); if(str != NULL){ effect_bulk->name = g_strdup(str); } } void ags_file_write_effect_bulk_resolve_audio(AgsFileLookup *file_lookup, AgsEffectBulk *effect_bulk) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_AUDIO(effect_bulk->audio)); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "audio", g_strdup_printf("xpath=//ags-audio[@id='%s']", id)); } void ags_file_read_bulk_member(AgsFile *file, xmlNode *node, AgsBulkMember **bulk_member) { AgsBulkMember *gobject; GtkAdjustment *adjustment; GtkWidget *child_widget; xmlNode *child; xmlChar *prop, *content; gchar *widget_type; gchar *label; gchar *task_type; guint width, height; if(*bulk_member == NULL){ gobject = g_object_new(AGS_TYPE_BULK_MEMBER, NULL); *bulk_member = gobject; }else{ gobject = *bulk_member; if(!AGS_IS_BULK_MEMBER(gobject)){ return; } } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); widget_type = (gchar *) xmlGetProp(node, "widget-type"); g_object_set(gobject, "widget-type", g_type_from_name(widget_type), NULL); child_widget = (GtkWidget *) gtk_bin_get_child(GTK_BIN(gobject)); /* label */ label = (gchar *) xmlGetProp(node, "label"); if(label != NULL){ g_object_set(G_OBJECT(gobject), "widget-label", label, NULL); } /* filename */ g_object_set(G_OBJECT(gobject), "filename", (gchar *) xmlGetProp(node, "filename"), NULL); /* effect */ g_object_set(G_OBJECT(gobject), "effect", (gchar *) xmlGetProp(node, "effect"), NULL); /* plugin-name */ g_object_set(G_OBJECT(gobject), "plugin-name", (gchar *) xmlGetProp(node, "plugin-name"), NULL); /* specifier */ g_object_set(G_OBJECT(gobject), "specifier", (gchar *) xmlGetProp(node, "specifier"), NULL); /* size */ width = (guint) g_ascii_strtoull(xmlGetProp(node, "width"), NULL, 10); height = (guint) g_ascii_strtoull(xmlGetProp(node, "height"), NULL, 10); gtk_widget_set_size_request(child_widget, width, height); /* check misc */ if(GTK_IS_MISC(child_widget)){ gfloat xalign, yalign; guint xpad, ypad; xalign = (gfloat) g_ascii_strtod(xmlGetProp(node, "xalign"), NULL); yalign = (gfloat) g_ascii_strtod(xmlGetProp(node, "yalign"), NULL); xpad = (guint) g_ascii_strtoull(xmlGetProp(node, "xpad"), NULL, 10); ypad = (guint) g_ascii_strtoull(xmlGetProp(node, "ypad"), NULL, 10); } /* check adjustment and toggle types */ adjustment = NULL; if(GTK_IS_TOGGLE_BUTTON(child_widget)){ if(!xmlStrncmp(AGS_FILE_TRUE, xmlGetProp(node, "value"), 5)){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(child_widget), TRUE); } }else if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; dial = (AgsDial *) child_widget; adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(child_widget, "adjustment", adjustment, NULL); gtk_widget_set_size_request((GtkWidget *) dial, 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, xmlGetProp(node, "inverted"), 9)){ gtk_range_set_inverted(GTK_RANGE(child_widget), TRUE); } }else if(AGS_IS_VINDICATOR(child_widget)){ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 10.0, 1.0, 1.0, 10.0); g_object_set(child_widget, "adjustment", adjustment, NULL); gtk_widget_queue_draw(child_widget); } //TODO:JK: implement more types if(adjustment != NULL){ gdouble upper, lower; gdouble step, page; gdouble value; step = (gdouble) g_ascii_strtod(xmlGetProp(node, "step"), NULL); gtk_adjustment_set_step_increment(adjustment, step); lower = (gdouble) g_ascii_strtod(xmlGetProp(node, "lower"), NULL); gtk_adjustment_set_lower(adjustment, lower); upper = (gdouble) g_ascii_strtod(xmlGetProp(node, "upper"), NULL); gtk_adjustment_set_upper(adjustment, upper); // page = (gdouble) g_ascii_strtod(xmlGetProp(node, "page"), // NULL); // gtk_adjustment_set_page_size(adjustment, // page); value = (gdouble) g_ascii_strtod(xmlGetProp(node, "value"), NULL); gtk_adjustment_set_value(adjustment, value); } /* flags */ gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); if((task_type = xmlGetProp(node, "task-type")) != NULL){ gobject->task_type = g_type_from_name(task_type); } child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp(child->name, "ags-parameter")){ AgsFileLookup *file_lookup; GParameter *parameter; gint n_params; guint i; parameter = NULL; n_params = 0; ags_file_util_read_parameter(file, child, NULL, ¶meter, &n_params, NULL); for(i = 0; i < n_params; i++){ file_lookup = (AgsFileLookup *) ags_file_lookup_find_by_reference(file->lookup, &(parameter[i].value)); g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_bulk_member_resolve_port), gobject); } } } child = child->next; } } xmlNode* ags_file_write_bulk_member(AgsFile *file, xmlNode *parent, AgsBulkMember *bulk_member) { GtkWidget *child_widget; GtkAdjustment *adjustment; xmlNode *node; GParameter *parameter; GList *list; gchar *id; gchar *label; guint width, height; guint left_attach, right_attach; guint top_attach, bottom_attach; guint i, i_stop; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-bulk-member"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", bulk_member, NULL)); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", bulk_member->flags)); xmlNewProp(node, "widget-type", g_strdup_printf("%s", g_type_name(bulk_member->widget_type))); child_widget = gtk_bin_get_child(GTK_BIN(bulk_member)); label = NULL; g_object_get(G_OBJECT(child_widget), "label", &label, NULL); if(label != NULL){ xmlNewProp(node, "label", g_strdup_printf("%s", label)); } xmlNewProp(node, "filename", g_strdup_printf("%s", bulk_member->filename)); xmlNewProp(node, "effect", g_strdup_printf("%s", bulk_member->effect)); xmlNewProp(node, "plugin-name", g_strdup_printf("%s", bulk_member->plugin_name)); xmlNewProp(node, "specifier", g_strdup_printf("%s", bulk_member->specifier)); gtk_widget_get_size_request(child_widget, &width, &height); xmlNewProp(node, "width", g_strdup_printf("%d", width)); xmlNewProp(node, "height", g_strdup_printf("%d", height)); gtk_container_child_get((GtkContainer *) GTK_WIDGET(bulk_member)->parent, (GtkWidget *) bulk_member, "left-attach", &left_attach, "right-attach", &right_attach, "top-attach", &top_attach, "bottom-attach", &bottom_attach, NULL); xmlNewProp(node, "left-attach", g_strdup_printf("%d", left_attach)); xmlNewProp(node, "right-attach", g_strdup_printf("%d", right_attach)); xmlNewProp(node, "top-attach", g_strdup_printf("%d", top_attach)); xmlNewProp(node, "bottom-attach", g_strdup_printf("%d", bottom_attach)); if(bulk_member->task_type != G_TYPE_NONE){ xmlNewProp(node, AGS_FILE_TYPE_PROP, g_strdup_printf("%s", g_type_name(bulk_member->task_type))); } /* */ if(GTK_IS_MISC(child_widget)){ gfloat xalign, yalign; gint xpad, ypad; gtk_misc_get_alignment(GTK_MISC(child_widget), &xalign, &yalign); xmlNewProp(node, "xalign", g_strdup_printf("%f", xalign)); xmlNewProp(node, "yalign", g_strdup_printf("%f", yalign)); gtk_misc_get_padding(GTK_MISC(child_widget), &xpad, &ypad); xmlNewProp(node, "xpad", g_strdup_printf("%d", xpad)); xmlNewProp(node, "ypad", g_strdup_printf("%d", ypad)); } /* */ adjustment = NULL; /* */ if(GTK_IS_TOGGLE_BUTTON(child_widget)){ xmlNewProp(node, "value", g_strdup_printf("%s", ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(child_widget))) ? AGS_FILE_TRUE: AGS_FILE_FALSE))); }else if(AGS_IS_DIAL(child_widget)){ adjustment = AGS_DIAL(child_widget)->adjustment; //TODO:JK: improve dial widget work-around }else if(GTK_IS_SPIN_BUTTON(child_widget)){ adjustment = GTK_SPIN_BUTTON(child_widget)->adjustment; }else if(GTK_IS_RANGE(child_widget)){ adjustment = GTK_RANGE(child_widget)->adjustment; xmlNewProp(node, "inverted", g_strdup_printf("%s", (gtk_range_get_inverted(GTK_RANGE(child_widget)) ? AGS_FILE_TRUE : AGS_FILE_FALSE))); }else if(AGS_IS_INDICATOR(child_widget)){ adjustment = AGS_INDICATOR(child_widget)->adjustment; } if(adjustment != NULL){ gdouble upper, lower; gdouble page, step; gdouble value; xmlNewProp(node, "upper", g_strdup_printf("%.8f", adjustment->upper)); xmlNewProp(node, "lower", g_strdup_printf("%.8f", adjustment->lower)); xmlNewProp(node, "page", g_strdup_printf("%.8f", adjustment->page_size)); xmlNewProp(node, "step", g_strdup_printf("%.8f", adjustment->step_increment)); xmlNewProp(node, "value", g_strdup_printf("%.8f", adjustment->value)); } /* bulk port */ list = bulk_member->bulk_port; i_stop = g_list_length(list); parameter = (GParameter *) g_new(GParameter, i_stop); for(i = 0; i < i_stop; i++){ parameter[i].name = "bulk-port"; memset(&(parameter[i].value), 0, sizeof(GValue)); g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), list->data); list = list->next; } ags_file_util_write_parameter(file, node, ags_id_generator_create_uuid(), parameter, i_stop); /* bulk port */ list = bulk_member->recall_bulk_port; i_stop = g_list_length(list); parameter = (GParameter *) g_new(GParameter, i_stop); for(i = 0; i < i_stop; i++){ parameter[i].name = "recall-bulk-port"; memset(&(parameter[i].value), 0, sizeof(GValue)); g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), list->data); list = list->next; } ags_file_util_write_parameter(file, node, ags_id_generator_create_uuid(), parameter, i_stop); xmlAddChild(parent, node); return(node); } void ags_file_read_bulk_member_resolve_port(AgsFileLookup *file_lookup, AgsBulkMember *bulk_member) { AgsFileIdRef *id_ref; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; gchar *xpath; gchar *str; xpath = (gchar *) xmlGetProp(file_lookup->node, "link"); g_message("ags_file_read_bulk_member_resolve_port - xpath = %s", xpath); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(!g_ascii_strncasecmp(xmlGetProp(file_lookup->node->parent, AGS_FILE_NAME_PROP), "bulk-port", 10)){ g_object_set(G_OBJECT(bulk_member), "bulk-port", (AgsAudio *) id_ref->ref, NULL); }else{ g_object_set(G_OBJECT(bulk_member), "recall-bulk-port", (AgsAudio *) id_ref->ref, NULL); } } void ags_file_read_bulk_member_list(AgsFile *file, xmlNode *node, GList **bulk_member) { AgsBulkMember *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-bulk-member", 12)){ current = NULL; ags_file_read_bulk_member(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *bulk_member = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_bulk_member_list(AgsFile *file, xmlNode *parent, GList *bulk_member) { AgsBulkMember *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-bulk-member-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = bulk_member; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_bulk_member(file, node, AGS_BULK_MEMBER(list->data)); list = list->next; } return(node); } void ags_file_read_effect_pad(AgsFile *file, xmlNode *node, AgsEffectPad **effect_pad) { AgsEffectPad *gobject; AgsFileLookup *file_lookup; xmlNode *child; GType effect_pad_type; if(*effect_pad == NULL){ effect_pad_type = g_type_from_name(xmlGetProp(node, AGS_FILE_TYPE_PROP)); gobject = (AgsEffectPad *) g_object_new(effect_pad_type, NULL); *effect_pad = gobject; }else{ gobject = *effect_pad; } if(gobject == NULL){ return; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); gobject->flags &= (~AGS_EFFECT_PAD_CONNECTED); gobject->version = g_strdup(xmlGetProp(node, AGS_FILE_VERSION_PROP)); gobject->build_id = g_strdup(xmlGetProp(node, AGS_FILE_BUILD_ID_PROP)); /* channel */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_effect_pad_resolve_channel), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(ags_plugin_get_xml_type(AGS_PLUGIN(gobject)) != NULL && !xmlStrcmp(child->name, ags_plugin_get_xml_type(AGS_PLUGIN(gobject)))){ ags_plugin_read(file, child, AGS_PLUGIN(gobject)); }else if(!xmlStrncmp(child->name, "ags-effect-line-list", 20)){ xmlNode *line_node; GList *start, *list; list = NULL; ags_file_read_effect_line_list(file, child, &list); start = list; /* add line to effect_pad */ line_node = child->children; while(line_node != NULL && list != NULL){ if(line_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(line_node->name, "ags-effect-line", 15)){ guint x0, x1; guint y0, y1; g_object_set(G_OBJECT(list->data), "effect-pad", gobject, NULL); x0 = g_ascii_strtoull(xmlGetProp(line_node, "left-attach"), NULL, 10); y0 = g_ascii_strtoull(xmlGetProp(line_node, "top-attach"), NULL, 10); x1 = g_ascii_strtoull(xmlGetProp(line_node, "right-attach"), NULL, 10); y1 = g_ascii_strtoull(xmlGetProp(line_node, "bottom-attach"), NULL, 10); gtk_table_attach(gobject->table, GTK_WIDGET(list->data), x0, x1, y0, y1, GTK_FILL, GTK_FILL, 0, 0); list = list->next; } } line_node = line_node->next; } g_list_free(start); } } child = child->next; } } xmlNode* ags_file_write_effect_pad(AgsFile *file, xmlNode *parent, AgsEffectPad *effect_pad) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *effect_line_node; GList *effect_line, *effect_line_start; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-effect-pad"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", effect_pad, NULL)); xmlNewProp(node, AGS_FILE_TYPE_PROP, G_OBJECT_TYPE_NAME(effect_pad)); xmlNewProp(node, AGS_FILE_VERSION_PROP, effect_pad->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, effect_pad->build_id); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", ((~AGS_EFFECT_PAD_CONNECTED) & (effect_pad->flags)))); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(effect_pad)); effect_line_start = effect_line = gtk_container_get_children(GTK_CONTAINER(effect_pad->table)); child = ags_file_write_effect_line_list(file, node, effect_line); effect_line_node = child->children; while(effect_line != NULL){ guint x0, x1; guint y0, y1; gtk_container_child_get((GtkContainer *) effect_pad->table, (GtkWidget *) effect_line->data, "left-attach", &x0, "right-attach", &x1, "top-attach", &y0, "bottom-attach", &y1, NULL); xmlNewProp(effect_line_node, "left-attach", g_strdup_printf("%d", x0)); xmlNewProp(effect_line_node, "top-attach", g_strdup_printf("%d", y0)); xmlNewProp(effect_line_node, "right-attach", g_strdup_printf("%d", x1)); xmlNewProp(effect_line_node, "bottom-attach", g_strdup_printf("%d", y1)); effect_line = effect_line->next; effect_line_node = effect_line_node->next; } g_list_free(effect_line_start); return(node); } void ags_file_read_effect_pad_resolve_channel(AgsFileLookup *file_lookup, AgsPad *pad) { AgsFile *file; AgsEffectBridge *effect_bridge; AgsFileIdRef *id_ref; xmlNode *node, *audio_node, *channel_node; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; GList *list; xmlChar *xpath; guint position; guint nth, audio_channel; guint i, j; gboolean is_output; file = file_lookup->file; effect_bridge = (AgsEffectBridge *) gtk_widget_get_ancestor(GTK_WIDGET(pad), AGS_TYPE_EFFECT_BRIDGE); if(effect_bridge->output != NULL){ list = gtk_container_get_children((GtkContainer *) effect_bridge->output); if(list != NULL && g_list_find(list, pad) != NULL){ is_output = TRUE; }else{ is_output = FALSE; } }else{ is_output = FALSE; } node = file_lookup->node; /* retrieve position */ xpath_context = xmlXPathNewContext(file->doc); // xmlXPathSetContextNode(node->parent, // xpath_context); xpath_context->node = node->parent; xpath_object = xmlXPathEval("./ags-effect-pad", xpath_context); for(i = 0, j = 0; xpath_object->nodesetval->nodeTab[i] != node && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } nth = j; /* */ position = nth * effect_bridge->audio->audio_channels; /* */ id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, effect_bridge->audio); audio_node = NULL; if(id_ref != NULL){ audio_node = id_ref->node; } /* */ xpath = g_strdup_printf("(./ags-channel-list/ags-channel)/%s", (is_output ? "ags-output": "ags-input")); xpath_context = xmlXPathNewContext(file->doc); xpath_context->node = audio_node; xpath_object = xmlXPathEval(xpath, xpath_context); /* */ if(xpath_object != NULL && xpath_object->nodesetval != NULL){ AgsFileIdRef *file_id_ref; xmlNode *channel_node; for(i = 0, j = 0; j < position && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i] != NULL && xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } channel_node = xpath_object->nodesetval->nodeTab[i]; file_id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_node(file, channel_node); g_object_set(G_OBJECT(pad), "channel", AGS_CHANNEL(file_id_ref->ref), NULL); }else{ g_message("no xpath match: %s", xpath); } } void ags_file_read_effect_pad_list(AgsFile *file, xmlNode *node, GList **effect_pad) { AgsEffectPad *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-effect-pad", 12)){ current = NULL; ags_file_read_effect_pad(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *effect_pad = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_effect_pad_list(AgsFile *file, xmlNode *parent, GList *effect_pad) { AgsEffectPad *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-effect-pad-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = effect_pad; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_effect_pad(file, node, AGS_EFFECT_PAD(list->data)); list = list->next; } return(node); } void ags_file_read_effect_line(AgsFile *file, xmlNode *node, AgsEffectLine **effect_line) { AgsEffectLine *gobject; AgsFileLookup *file_lookup; xmlNode *child; GType effect_line_type; if(*effect_line == NULL){ effect_line_type = g_type_from_name(xmlGetProp(node, AGS_FILE_TYPE_PROP)); gobject = (AgsEffectLine *) g_object_new(effect_line_type, NULL); *effect_line = gobject; }else{ gobject = *effect_line; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->version = g_strdup(xmlGetProp(node, AGS_FILE_VERSION_PROP)); gobject->build_id = g_strdup(xmlGetProp(node, AGS_FILE_BUILD_ID_PROP)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); gobject->flags |= AGS_EFFECT_LINE_PREMAPPED_RECALL; gobject->flags &= (~AGS_EFFECT_LINE_CONNECTED); /* channel */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_effect_line_resolve_channel), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp(child->name, ags_plugin_get_xml_type(AGS_PLUGIN(gobject)))){ ags_plugin_read(file, child, AGS_PLUGIN(gobject)); }else if(!xmlStrncmp(child->name, "ags-line-member-list", 20)){ xmlNode *line_member_node; GList *start, *list; list = NULL; ags_file_read_line_member_list(file, child, &list); start = list; /* remove default line members */ gtk_widget_destroy(GTK_WIDGET(gobject->table)); gobject->table = (GtkTable *) gtk_table_new(1, 1, FALSE); gtk_table_set_row_spacings(gobject->table, 2); gtk_table_set_col_spacings(gobject->table, 2); gtk_box_pack_start(GTK_BOX(gobject), GTK_WIDGET(gobject->table), TRUE, TRUE, 0); /* add line member to line */ line_member_node = child->children; while(line_member_node != NULL){ if(line_member_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-line-member", 15)){ guint x0, x1; guint y0, y1; /* pack */ x0 = g_ascii_strtoull(xmlGetProp(line_member_node, "left-attach"), NULL, 10); y0 = g_ascii_strtoull(xmlGetProp(line_member_node, "top-attach"), NULL, 10); x1 = g_ascii_strtoull(xmlGetProp(line_member_node, "right-attach"), NULL, 10); y1 = g_ascii_strtoull(xmlGetProp(line_member_node, "bottom-attach"), NULL, 10); gtk_table_attach(gobject->table, GTK_WIDGET(list->data), x0, x1, y0, y1, GTK_FILL, GTK_FILL, 0, 0); /* iterate */ list = list->next; } } line_member_node = line_member_node->next; } g_list_free(start); } } child = child->next; } } xmlNode* ags_file_write_effect_line(AgsFile *file, xmlNode *parent, AgsEffectLine *effect_line) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *line_member_node; GList *line_child; GList *line_member, *line_member_start; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-effect-line"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", effect_line, NULL)); xmlNewProp(node, AGS_FILE_TYPE_PROP, G_OBJECT_TYPE_NAME(effect_line)); xmlNewProp(node, AGS_FILE_VERSION_PROP, effect_line->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, effect_line->build_id); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", ((~AGS_EFFECT_LINE_CONNECTED)&(effect_line->flags)))); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(effect_line)); line_member_start = line_member = gtk_container_get_children(GTK_CONTAINER(effect_line->table)); child = ags_file_write_line_member_list(file, node, line_member); line_member_node = child->children; while(line_member != NULL){ if(AGS_IS_LINE_MEMBER(line_member->data)){ GList *list; guint x0, x1; guint y0, y1; list = gtk_container_get_children((GtkContainer *) effect_line->table); line_child = g_list_find(list, line_member->data)->data; g_list_free(list); gtk_container_child_get((GtkContainer *) effect_line->table, (GtkWidget *) line_child->data, "left-attach", &x0, "right-attach", &x1, "top-attach", &y0, "bottom-attach", &y1, NULL); xmlNewProp(line_member_node, "left-attach", g_strdup_printf("%d", x0)); xmlNewProp(line_member_node, "top-attach", g_strdup_printf("%d", y0)); xmlNewProp(line_member_node, "right-attach", g_strdup_printf("%d", x1)); xmlNewProp(line_member_node, "bottom-attach", g_strdup_printf("%d", y1)); line_member_node = line_member_node->next; } line_member = line_member->next; } g_list_free(line_member_start); return(node); } void ags_file_read_effect_line_resolve_channel(AgsFileLookup *file_lookup, AgsLine *line) { AgsFile *file; AgsEffectBridge *effect_bridge; AgsFileIdRef *id_ref; xmlNode *pad_node, *node, *audio_node, *channel_node; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; GList *list; xmlChar *xpath; guint position; guint pad, audio_channel; guint i, j; gboolean is_output; file = file_lookup->file; effect_bridge = (AgsEffectBridge *) gtk_widget_get_ancestor(GTK_WIDGET(line), AGS_TYPE_EFFECT_BRIDGE); if(effect_bridge->output != NULL){ AgsPad *pad; pad = (AgsPad *) gtk_widget_get_ancestor((GtkWidget *) line, AGS_TYPE_PAD); list = gtk_container_get_children((GtkContainer *) effect_bridge->output); if(list != NULL && g_list_find(list, pad) != NULL){ is_output = TRUE; }else{ is_output = FALSE; } }else{ is_output = FALSE; } node = file_lookup->node; pad_node = node->parent->parent; /* retrieve position - pad */ xpath_context = xmlXPathNewContext(file->doc); // xmlXPathSetContextNode(node->parent->parent->parent, // xpath_context); xpath_context->node = pad_node->parent; xpath_object = xmlXPathEval("./ags-effect-pad", xpath_context); for(i = 0, j = 0; xpath_object->nodesetval->nodeTab[i] != pad_node && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } pad = j; /* retrieve position - line */ xpath_context = xmlXPathNewContext(file->doc); // xmlXPathSetContextNode(node->parent, // xpath_context); xpath_context->node = node->parent; xpath_object = xmlXPathEval("./ags-effect-line", xpath_context); for(i = 0, j = 0; xpath_object->nodesetval->nodeTab[i] != node && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } audio_channel = j; /* */ position = pad * effect_bridge->audio->audio_channels + (effect_bridge->audio->audio_channels - audio_channel - 1); /* */ id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, effect_bridge->audio); audio_node = NULL; if(id_ref != NULL){ audio_node = id_ref->node; } /* */ xpath = g_strdup_printf("(./ags-channel-list/ags-channel)/%s", ((is_output) ? "ags-output": "ags-input")); xpath_context = xmlXPathNewContext(file->doc); xpath_context->node = audio_node; xpath_object = xmlXPathEval(xpath, xpath_context); /* */ if(xpath_object != NULL && xpath_object->nodesetval != NULL){ AgsFileIdRef *file_id_ref; xmlNode *channel_node; for(i = 0, j = 0; j < position && i < xpath_object->nodesetval->nodeMax; i++){ if(xpath_object->nodesetval->nodeTab[i] != NULL && xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ j++; } } channel_node = xpath_object->nodesetval->nodeTab[i]; file_id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_node(file, channel_node); g_object_set(G_OBJECT(line), "channel", AGS_CHANNEL(file_id_ref->ref), NULL); }else{ g_message("no xpath match: %s", xpath); } } void ags_file_read_effect_line_list(AgsFile *file, xmlNode *node, GList **effect_line) { AgsEffectLine *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-effect-line", 12)){ current = NULL; ags_file_read_effect_line(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *effect_line = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_effect_line_list(AgsFile *file, xmlNode *parent, GList *effect_line) { AgsEffectLine *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-effect-line-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = effect_line; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_effect_line(file, node, AGS_EFFECT_LINE(list->data)); list = list->next; } return(node); } void ags_file_read_dialog(AgsFile *file, xmlNode *node, GtkDialog **dialog) { //TODO:JK: implement me } xmlNode* ags_file_write_dialog(AgsFile *file, xmlNode *parent, GtkDialog *dialog) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_dialog_list(AgsFile *file, xmlNode *node, GList **dialog) { //TODO:JK: implement me } xmlNode* ags_file_write_dialog_list(AgsFile *file, xmlNode *parent, GList *dialog) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_machine_editor(AgsFile *file, xmlNode *node, AgsMachineEditor **machine_editor) { //TODO:JK: implement me } xmlNode* ags_file_write_machine_editor(AgsFile *file, xmlNode *parent, AgsMachineEditor *machine_editor) { xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-machine-editor"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", machine_editor, NULL)); //TODO:JK: implement me xmlAddChild(parent, node); return(node); } void ags_file_read_machine_editor_list(AgsFile *file, xmlNode *node, GList **machine_editor) { //TODO:JK: implement me } xmlNode* ags_file_write_machine_editor_list(AgsFile *file, xmlNode *parent, GList *machine_editor) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_pad_editor(AgsFile *file, xmlNode *node, AgsPadEditor **pad_editor) { //TODO:JK: implement me } xmlNode* ags_file_write_pad_editor(AgsFile *file, xmlNode *parent, AgsPadEditor *pad_editor) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_line_editor(AgsFile *file, xmlNode *node, AgsLineEditor **line_editor) { //TODO:JK: implement me } xmlNode* ags_file_write_line_editor(AgsFile *file, xmlNode *parent, AgsLineEditor *line_editor) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_link_editor(AgsFile *file, xmlNode *node, AgsLinkEditor **link_editor) { //TODO:JK: implement me } xmlNode* ags_file_write_link_editor(AgsFile *file, xmlNode *parent, AgsLinkEditor *link_editor) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_line_member_editor(AgsFile *file, xmlNode *node, AgsLineMemberEditor **line_member_editor) { //TODO:JK: implement me } xmlNode* ags_file_write_line_member_editor(AgsFile *file, xmlNode *parent, AgsLineMemberEditor *line_member_editor) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_link_collection_editor(AgsFile *file, xmlNode *node, AgsLinkCollectionEditor **link_collection_editor) { //TODO:JK: implement me } xmlNode* ags_file_write_link_collection_editor(AgsFile *file, xmlNode *parent, AgsLinkCollectionEditor *link_collection_editor) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_resize_editor(AgsFile *file, xmlNode *node, AgsResizeEditor **resize_editor) { //TODO:JK: implement me } xmlNode* ags_file_write_resize_editor(AgsFile *file, xmlNode *parent, AgsResizeEditor *resize_editor) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } void ags_file_read_notation_editor(AgsFile *file, xmlNode *node, AgsNotationEditor **notation_editor) { AgsNotationEditor *gobject; AgsFileLaunch *file_launch; xmlNode *child; if(*notation_editor == NULL){ gobject = (AgsNotationEditor *) g_object_new(AGS_TYPE_NOTATION_EDITOR, NULL); *notation_editor = gobject; }else{ gobject = *notation_editor; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->version = g_strdup(xmlGetProp(node, AGS_FILE_VERSION_PROP)); gobject->build_id = g_strdup(xmlGetProp(node, AGS_FILE_BUILD_ID_PROP)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-notation-toolbar", 21)){ ags_file_read_notation_toolbar(file, child, &(gobject->notation_toolbar)); }else if(!xmlStrncmp(child->name, "ags-machine-selector", 11)){ ags_file_read_machine_selector(file, child, &(gobject->machine_selector)); } } child = child->next; } file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_file_read_notation_editor_launch), gobject); ags_file_add_launch(file, (GObject *) file_launch); } void ags_file_read_notation_editor_resolve_parameter(AgsFileLookup *file_lookup, AgsNotationEditor *notation_editor) { gchar *name; GValue *value; name = g_object_get_data(G_OBJECT(file_lookup), AGS_FILE_READ_NOTATION_EDITOR_PARAMETER_NAME); value = file_lookup->ref; g_object_set_property(G_OBJECT(notation_editor), name, value); } void ags_file_read_notation_editor_launch(AgsFileLaunch *file_launch, AgsNotationEditor *notation_editor) { AgsMachine *machine; machine = notation_editor->selected_machine; if(machine == NULL){ return; } //TODO:JK: implement me } xmlNode* ags_file_write_notation_editor(AgsFile *file, xmlNode *parent, AgsNotationEditor *notation_editor) { AgsFileIdRef *id_ref; xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-notation-editor"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", notation_editor, NULL)); xmlNewProp(node, AGS_FILE_VERSION_PROP, notation_editor->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, notation_editor->build_id); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", notation_editor->flags)); xmlAddChild(parent, node); /* child elements */ ags_file_write_machine_selector(file, node, notation_editor->machine_selector); ags_file_write_notation_toolbar(file, node, notation_editor->notation_toolbar); return(node); } void ags_file_read_notation_toolbar(AgsFile *file, xmlNode *node, AgsNotationToolbar **notation_toolbar) { AgsNotationToolbar *gobject; GtkTreeIter iter; GtkTreeModel *model; xmlNode *child; gchar *value; gchar *str; if(*notation_toolbar == NULL){ gobject = (AgsNotationToolbar *) g_object_new(AGS_TYPE_NOTATION_TOOLBAR, NULL); *notation_toolbar = gobject; }else{ gobject = *notation_toolbar; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); str = xmlGetProp(node, "edit-mode"); if(!g_strcmp0("position", str)){ gtk_button_clicked((GtkButton *) gobject->position); }else if(!g_strcmp0("edit", str)){ gtk_button_clicked((GtkButton *) gobject->edit); }else if(!g_strcmp0("clear", str)){ gtk_button_clicked((GtkButton *) gobject->clear); }else if(!g_strcmp0("select", str)){ gtk_button_clicked((GtkButton *) gobject->select); } /* zoom */ str = xmlGetProp(node, "zoom"); model = gtk_combo_box_get_model((GtkComboBox *) gobject->zoom); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ break; } }while(gtk_tree_model_iter_next(model, &iter)); gtk_combo_box_set_active_iter((GtkComboBox *) gobject->zoom, &iter); gobject->zoom_history = gtk_combo_box_get_active((GtkComboBox *) gobject->zoom); } } xmlNode* ags_file_write_notation_toolbar(AgsFile *file, xmlNode *parent, AgsNotationToolbar *notation_toolbar) { AgsFileIdRef *id_ref; xmlNode *node; GList *list; guint n_properties, n_params; gchar *id; gint i; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-notation-toolbar"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", notation_toolbar, NULL)); if(notation_toolbar->selected_edit_mode == notation_toolbar->position){ xmlNewProp(node, "edit-mode", g_strdup("position")); }else if(notation_toolbar->selected_edit_mode == notation_toolbar->edit){ xmlNewProp(node, "edit-mode", g_strdup("edit")); }else if(notation_toolbar->selected_edit_mode == notation_toolbar->clear){ xmlNewProp(node, "edit-mode", g_strdup("clear")); }else if(notation_toolbar->selected_edit_mode == notation_toolbar->select){ xmlNewProp(node, "edit-mode", g_strdup("select")); } xmlNewProp(node, "zoom", g_strdup_printf("%s", gtk_combo_box_text_get_active_text(notation_toolbar->zoom))); xmlAddChild(parent, node); return(node); } void ags_file_read_machine_selector(AgsFile *file, xmlNode *node, AgsMachineSelector **machine_selector) { AgsMachineSelector *gobject; GParameter *parameter; xmlNode *child; guint n_params; if(*machine_selector == NULL){ gobject = g_object_new(AGS_TYPE_MACHINE_SELECTOR, NULL); *machine_selector = gobject; }else{ gobject = *machine_selector; } /* child elements */ child = node->children; parameter = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-parameter", 14)){ AgsFileLookup *file_lookup; xmlNode *value_node; GList *list; ags_file_util_read_parameter(file, child, NULL, ¶meter, &n_params, NULL); value_node = child->children; while(value_node != NULL){ if(value_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(value_node->name, "ags-value", 10)){ list = ags_file_lookup_find_by_node(file->lookup, value_node); if(list != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_machine_selector_resolve_parameter), gobject); } } } value_node = value_node->next; } } } child = child->next; } } void ags_file_read_machine_selector_resolve_parameter(AgsFileLookup *file_lookup, AgsMachineSelector *machine_selector) { AgsNotationEditor *notation_editor; GObject *gobject; GValue *value; value = file_lookup->ref; if(G_VALUE_HOLDS(value, G_TYPE_OBJECT)){ AgsMachineRadioButton *machine_radio_button; GList *list; gobject = g_value_get_object(value); if(gobject == NULL){ return; } notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor((GtkWidget *) machine_selector, AGS_TYPE_NOTATION_EDITOR); list = gtk_container_get_children((GtkContainer *) machine_selector); machine_radio_button = g_object_new(AGS_TYPE_MACHINE_RADIO_BUTTON, NULL); gtk_box_pack_start(GTK_BOX(machine_selector), (GtkWidget *) machine_radio_button, FALSE, FALSE, 0); if(list->next != NULL){ g_object_set(machine_radio_button, "group", list->next->data, "machine", gobject, NULL); }else{ g_object_set(machine_radio_button, "machine", gobject, NULL); } g_list_free(list); } } xmlNode* ags_file_write_machine_selector(AgsFile *file, xmlNode *parent, AgsMachineSelector *machine_selector) { xmlNode *node; GParameter *parameter; GList *list; gchar *id; gint n_params; auto GParameter* ags_file_write_machine_selector_parameter(GList *list, GParameter *parameter, gchar *prop, gint *n_params); GParameter* ags_file_write_machine_selector_parameter(GList *list, GParameter *parameter, gchar *prop, gint *n_params){ gint i; if(n_params == NULL){ i = 0; }else{ i = *n_params; } while(list != NULL){ if(!AGS_IS_MACHINE_RADIO_BUTTON(list->data)){ list = list->next; continue; } if(parameter == NULL){ parameter = (GParameter *) malloc(sizeof(GParameter)); }else{ parameter = (GParameter *) realloc(parameter, (i + 1) * sizeof(GParameter)); } parameter[i].name = prop; memset(&(parameter[i].value), 0, sizeof(GValue)); g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), G_OBJECT(AGS_MACHINE_RADIO_BUTTON(list->data)->machine)); list = list->next; i++; } if(n_params != NULL){ *n_params = i; } return(parameter); } id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-machine-selector"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", machine_selector, NULL)); xmlAddChild(parent, node); /* child elements */ parameter = NULL; n_params = 0; list = gtk_container_get_children(GTK_CONTAINER(machine_selector)); list = list->next; parameter = ags_file_write_machine_selector_parameter(list, parameter, "machine", &n_params); ags_file_util_write_parameter(file, node, ags_id_generator_create_uuid(), parameter, n_params); return(node); } void ags_file_read_navigation(AgsFile *file, xmlNode *node, AgsNavigation **navigation) { AgsNavigation *gobject; AgsFileLookup *file_lookup; xmlNode *child; xmlChar *str; if(*navigation == NULL){ gobject = g_object_new(AGS_TYPE_NAVIGATION, NULL); *navigation = gobject; }else{ gobject = *navigation; } str = xmlGetProp(node, "expanded"); if(!xmlStrncmp(str, AGS_FILE_TRUE, 5)){ gtk_toggle_button_set_active((GtkToggleButton *) gobject->expander, TRUE); } str = xmlGetProp(node, "bpm"); gtk_spin_button_set_value(gobject->bpm, g_strtod(str, NULL)); str = xmlGetProp(node, "loop"); if(!xmlStrncmp(str, AGS_FILE_TRUE, 5)){ gtk_toggle_button_set_active((GtkToggleButton *) gobject->loop, TRUE); } str = xmlGetProp(node, "position"); gtk_spin_button_set_value(gobject->position_tact, g_strtod(str, NULL)); str = xmlGetProp(node, "loop-left"); gtk_spin_button_set_value(gobject->loop_left_tact, g_strtod(str, NULL)); str = xmlGetProp(node, "loop-right"); gtk_spin_button_set_value(gobject->loop_right_tact, g_strtod(str, NULL)); /* soundcard */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_navigation_resolve_soundcard), gobject); } void ags_file_read_navigation_resolve_soundcard(AgsFileLookup *file_lookup, AgsNavigation *navigation) { AgsFileIdRef *id_ref; gchar *xpath; xpath = "xpath=//ags-soundcard"; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref != NULL){ g_object_set(G_OBJECT(navigation), "soundcard", id_ref->ref, NULL); gtk_spin_button_set_value(navigation->bpm, ags_soundcard_get_bpm(AGS_SOUNDCARD(id_ref->ref))); } } xmlNode* ags_file_write_navigation(AgsFile *file, xmlNode *parent, AgsNavigation *navigation) { xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-navigation"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", navigation, NULL)); xmlNewProp(node, "expanded", g_strdup_printf("%s", ((gtk_toggle_button_get_active((GtkToggleButton *) navigation->expander)) ? AGS_FILE_TRUE: AGS_FILE_FALSE))); xmlNewProp(node, "bpm", g_strdup_printf("%.f", gtk_spin_button_get_value(navigation->bpm))); xmlNewProp(node, "loop", g_strdup_printf("%s", ((gtk_toggle_button_get_active((GtkToggleButton *) navigation->loop)) ? AGS_FILE_TRUE: AGS_FILE_FALSE))); xmlNewProp(node, "position", g_strdup_printf("%.3f", gtk_spin_button_get_value(navigation->position_tact))); xmlNewProp(node, "loop-left", g_strdup_printf("%.3f", gtk_spin_button_get_value(navigation->loop_left_tact))); xmlNewProp(node, "loop-right", g_strdup_printf("%.3f", gtk_spin_button_get_value(navigation->loop_right_tact))); xmlAddChild(parent, node); return(node); } void ags_file_read_automation_window(AgsFile *file, xmlNode *node, AgsAutomationWindow **automation_window) { AgsAutomationWindow *gobject; AgsFileLookup *file_lookup; xmlNode *child; if(*automation_window == NULL){ gobject = g_object_new(AGS_TYPE_AUTOMATION_WINDOW, NULL); *automation_window = gobject; }else{ gobject = *automation_window; } g_object_set(G_OBJECT(gobject), "application-context", file->application_context, NULL); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-automation-edit", 20)){ ags_file_read_automation_editor(file, child, &(gobject->automation_editor)); } } child = child->next; } } xmlNode* ags_file_write_automation_window(AgsFile *file, xmlNode *parent, AgsAutomationWindow *automation_window) { AgsFileLookup *file_lookup; xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-automation-window"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", automation_window, NULL)); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", automation_window->flags)); /* child elements */ ags_file_write_automation_editor(file, node, automation_window->automation_editor); return(node); } void ags_file_read_automation_window_list(AgsFile *file, xmlNode *node, GList **automation_window_list) { AgsAutomationWindow *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-automation-window", 12)){ current = NULL; ags_file_read_automation_window(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *automation_window_list = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_automation_window_list(AgsFile *file, xmlNode *parent, GList *automation_window_list) { AgsAutomationWindow *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-automation-window-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = automation_window_list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_automation_window(file, node, AGS_AUTOMATION_WINDOW(list->data)); list = list->next; } return(node); } void ags_file_read_automation_editor(AgsFile *file, xmlNode *node, AgsAutomationEditor **automation_editor) { AgsAutomationEditor *gobject; AgsFileLookup *file_lookup; xmlNode *child; if(*automation_editor == NULL){ gobject = g_object_new(AGS_TYPE_AUTOMATION_EDITOR, NULL); *automation_editor = gobject; }else{ gobject = *automation_editor; } g_object_set(G_OBJECT(gobject), "application-context", file->application_context, NULL); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-machine-selector", 21)){ ags_file_read_machine_selector(file, child, &(gobject->machine_selector)); }else if(!xmlStrncmp(child->name, "ags-automation-toolbar", 23)){ ags_file_read_automation_toolbar(file, child, &(gobject->automation_toolbar)); }else if(!xmlStrncmp(child->name, "ags-automation-edit", 20)){ //TODO:JK: implement me } } child = child->next; } } xmlNode* ags_file_write_automation_editor(AgsFile *file, xmlNode *parent, AgsAutomationEditor *automation_editor) { AgsFileLookup *file_lookup; xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-automation-editor"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", automation_editor, NULL)); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", automation_editor->flags)); /* child elements */ ags_file_write_machine_selector(file, node, automation_editor->machine_selector); ags_file_write_automation_toolbar(file, node, automation_editor->automation_toolbar); //TODO:JK: implement me return(node); } void ags_file_read_automation_editor_list(AgsFile *file, xmlNode *node, GList **automation_editor_list) { AgsAutomationEditor *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-automation-editor", 12)){ current = NULL; ags_file_read_automation_editor(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *automation_editor_list = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_automation_editor_list(AgsFile *file, xmlNode *parent, GList *automation_editor_list) { AgsAutomationEditor *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-automation-editor-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = automation_editor_list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_automation_editor(file, node, AGS_AUTOMATION_EDITOR(list->data)); list = list->next; } return(node); } void ags_file_read_automation_edit(AgsFile *file, xmlNode *node, AgsAutomationEdit **automation_edit) { AgsAutomationEdit *gobject; AgsFileLookup *file_lookup; xmlNode *child; if(*automation_edit == NULL){ gobject = g_object_new(AGS_TYPE_AUTOMATION_EDIT, NULL); *automation_edit = gobject; }else{ gobject = *automation_edit; } g_object_set(G_OBJECT(gobject), "application-context", file->application_context, NULL); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); //TODO:JK: implement me } xmlNode* ags_file_write_automation_edit(AgsFile *file, xmlNode *parent, AgsAutomationEdit *automation_edit) { AgsFileLookup *file_lookup; xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-automation-edit"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", automation_edit, NULL)); //TODO:JK: implement me return(node); } void ags_file_read_automation_edit_list(AgsFile *file, xmlNode *node, GList **automation_edit_list) { AgsAutomationEdit *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-automation-edit", 12)){ current = NULL; ags_file_read_automation_edit(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *automation_edit_list = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_automation_edit_list(AgsFile *file, xmlNode *parent, GList *automation_edit_list) { AgsAutomationEdit *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-automation-edit-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = automation_edit_list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_automation_edit(file, node, AGS_AUTOMATION_EDIT(list->data)); list = list->next; } return(node); } void ags_file_read_automation_toolbar(AgsFile *file, xmlNode *node, AgsAutomationToolbar **automation_toolbar) { AgsAutomationToolbar *gobject; GtkTreeIter iter; GtkTreeModel *model; xmlNode *child; gchar *value; gchar *str; if(*automation_toolbar == NULL){ gobject = (AgsAutomationToolbar *) g_object_new(AGS_TYPE_AUTOMATION_TOOLBAR, NULL); *automation_toolbar = gobject; }else{ gobject = *automation_toolbar; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); str = xmlGetProp(node, "edit-mode"); if(!g_strcmp0("position", str)){ gtk_button_clicked((GtkButton *) gobject->position); }else if(!g_strcmp0("edit", str)){ gtk_button_clicked((GtkButton *) gobject->edit); }else if(!g_strcmp0("clear", str)){ gtk_button_clicked((GtkButton *) gobject->clear); }else if(!g_strcmp0("select", str)){ gtk_button_clicked((GtkButton *) gobject->select); } /* zoom */ str = xmlGetProp(node, "zoom"); model = gtk_combo_box_get_model((GtkComboBox *) gobject->zoom); if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ break; } }while(gtk_tree_model_iter_next(model, &iter)); gtk_combo_box_set_active_iter((GtkComboBox *) gobject->zoom, &iter); gobject->zoom_history = gtk_combo_box_get_active(GTK_COMBO_BOX(gobject->zoom)); } } xmlNode* ags_file_write_automation_toolbar(AgsFile *file, xmlNode *parent, AgsAutomationToolbar *automation_toolbar) { AgsFileIdRef *id_ref; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-automation-toolbar"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", automation_toolbar, NULL)); if(automation_toolbar->selected_edit_mode == automation_toolbar->position){ xmlNewProp(node, "edit-mode", g_strdup("position")); }else if(automation_toolbar->selected_edit_mode == automation_toolbar->edit){ xmlNewProp(node, "edit-mode", g_strdup("edit")); }else if(automation_toolbar->selected_edit_mode == automation_toolbar->clear){ xmlNewProp(node, "edit-mode", g_strdup("clear")); }else if(automation_toolbar->selected_edit_mode == automation_toolbar->select){ xmlNewProp(node, "edit-mode", g_strdup("select")); } xmlNewProp(node, "zoom", g_strdup_printf("%s", gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(automation_toolbar->zoom)))); xmlAddChild(parent, node); return(node); } void ags_file_read_automation_toolbar_list(AgsFile *file, xmlNode *node, GList **automation_toolbar_list) { AgsAutomationToolbar *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-automation-toolbar", 12)){ current = NULL; ags_file_read_automation_toolbar(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *automation_toolbar_list = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_automation_toolbar_list(AgsFile *file, xmlNode *parent, GList *automation_toolbar_list) { AgsAutomationToolbar *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-automation-toolbar-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = automation_toolbar_list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_automation_toolbar(file, node, AGS_AUTOMATION_TOOLBAR(list->data)); list = list->next; } return(node); } gsequencer-1.4.24/ags/X/file/ags_simple_file.dtd0000644000175000017500000001576413247044247016427 00000000000000 gsequencer-1.4.24/ags/X/file/ags_simple_file.h0000644000175000017500000001125413247044247016071 00000000000000/* 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 . */ #ifndef __AGS_SIMPLE_FILE_H__ #define __AGS_SIMPLE_FILE_H__ #include #include #include #define AGS_TYPE_SIMPLE_FILE (ags_simple_file_get_type()) #define AGS_SIMPLE_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SIMPLE_FILE, AgsSimpleFile)) #define AGS_SIMPLE_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SIMPLE_FILE, AgsSimpleFileClass)) #define AGS_IS_SIMPLE_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SIMPLE_FILE)) #define AGS_IS_SIMPLE_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SIMPLE_FILE)) #define AGS_SIMPLE_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_SIMPLE_FILE, AgsSimpleFileClass)) #define AGS_SIMPLE_FILE_DEFAULT_ENCODING "UTF-8" #define AGS_SIMPLE_FILE_DEFAULT_DTD "ags_simple_file.dtd" #define AGS_SIMPLE_FILE_CHECKSUM_LENGTH (g_checksum_type_get_length(G_CHECKSUM_MD5)) #define AGS_SIMPLE_FILE_DEFAULT_AUDIO_FORMAT "raw" #define AGS_SIMPLE_FILE_DEFAULT_AUDIO_ENCODING "base64" typedef struct _AgsSimpleFile AgsSimpleFile; typedef struct _AgsSimpleFileClass AgsSimpleFileClass; typedef enum{ AGS_SIMPLE_FILE_READ = 1, AGS_SIMPLE_FILE_READ_AUDIO_SIGNAL = 1 << 1, AGS_SIMPLE_FILE_READ_EMBEDDED_AUDIO = 1 << 2, AGS_SIMPLE_FILE_WRITE = 1 << 3, AGS_SIMPLE_FILE_WRITE_AUDIO_SIGNAL = 1 << 4, AGS_SIMPLE_FILE_WRITE_EMBEDDED_AUDIO = 1 << 5, }AgsSimpleFileFlags; #define AGS_SIMPLE_FILE_ERROR (ags_simple_file_error_quark()) typedef enum{ AGS_SIMPLE_FILE_ERROR_PARSER_FAILURE, }AgsSimpleFileError; struct _AgsSimpleFile { GObject object; guint flags; FILE *out; xmlChar *buffer; gchar *filename; gchar *encoding; gchar *dtd; gchar *audio_format; gchar *audio_encoding; xmlDoc *doc; xmlNode *root_node; GList *id_ref; GList *lookup; GList *launch; GObject *application_context; }; struct _AgsSimpleFileClass { GObjectClass object; void (*open)(AgsSimpleFile *simple_file, GError **error); void (*open_from_data)(AgsSimpleFile *simple_file, gchar *data, guint length, GError **error); void (*rw_open)(AgsSimpleFile *simple_file, gboolean create, GError **error); void (*write)(AgsSimpleFile *simple_file); void (*write_resolve)(AgsSimpleFile *simple_file); void (*read)(AgsSimpleFile *simple_file); void (*read_resolve)(AgsSimpleFile *simple_file); void (*read_start)(AgsSimpleFile *simple_file); }; GType ags_simple_file_get_type(void); gchar* ags_simple_file_str2md5(gchar *content, guint content_length); void ags_simple_file_add_id_ref(AgsSimpleFile *simple_file, GObject *id_ref); GObject* ags_simple_file_find_id_ref_by_node(AgsSimpleFile *simple_file, xmlNode *node); GList* ags_simple_file_find_id_ref_by_xpath(AgsSimpleFile *simple_file, gchar *xpath); GList* ags_simple_file_find_id_ref_by_reference(AgsSimpleFile *simple_file, gpointer ref); void ags_simple_file_add_lookup(AgsSimpleFile *simple_file, GObject *file_lookup); void ags_simple_file_add_launch(AgsSimpleFile *simple_file, GObject *file_launch); /* */ void ags_simple_file_open(AgsSimpleFile *simple_file, GError **error); void ags_simple_file_open_from_data(AgsSimpleFile *simple_file, gchar *data, guint length, GError **error); void ags_simple_file_rw_open(AgsSimpleFile *simple_file, gboolean create, GError **error); void ags_simple_file_open_filename(AgsSimpleFile *simple_file, gchar *filename); void ags_simple_file_close(AgsSimpleFile *simple_file); /* */ void ags_simple_file_write(AgsSimpleFile *simple_file); void ags_simple_file_write_resolve(AgsSimpleFile *simple_file); void ags_simple_file_read(AgsSimpleFile *simple_file); void ags_simple_file_read_resolve(AgsSimpleFile *simple_file); void ags_simple_file_read_start(AgsSimpleFile *simple_file); /* */ AgsSimpleFile* ags_simple_file_new(); #endif /*__AGS_SIMPLE_FILE_H__*/ gsequencer-1.4.24/ags/X/file/ags_gui_file_xml.h0000644000175000017500000002745413247044247016255 00000000000000/* 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 . */ #ifndef __AGS_FILE_GUI_H__ #define __AGS_FILE_GUI_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* GtkWidget */ void ags_file_read_widget(AgsFile *file, xmlNode *node, GtkWidget *widget); xmlNode* ags_file_write_widget(AgsFile *file, xmlNode *parent, GtkWidget *widget); /* AgsWindow */ void ags_file_read_window(AgsFile *file, xmlNode *node, AgsWindow **window); xmlNode* ags_file_write_window(AgsFile *file, xmlNode *parent, AgsWindow *window); /* AgsMenuBar */ void ags_file_read_menu_bar(AgsFile *file, xmlNode *node, AgsMenuBar **menu_bar); xmlNode* ags_file_write_menu_bar(AgsFile *file, xmlNode *parent, AgsMenuBar *menu_bar); /* AgsMachineCounter */ void ags_file_read_machine_counter(AgsFile *file, xmlNode *node, AgsMachineCounter **machine_counter); xmlNode* ags_file_write_machine_counter(AgsFile *file, xmlNode *parent, AgsMachineCounter *machine_counter); void ags_file_read_machine_counter_list(AgsFile *file, xmlNode *node, GList **machine_counter); xmlNode* ags_file_write_machine_counter_list(AgsFile *file, xmlNode *parent, GList *machine_counter); /* AgsMachine */ void ags_file_read_machine(AgsFile *file, xmlNode *node, AgsMachine **machine); xmlNode* ags_file_write_machine(AgsFile *file, xmlNode *parent, AgsMachine *machine); void ags_file_read_machine_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_file_read_machine_list(AgsFile *file, xmlNode *node, GList **machine); xmlNode* ags_file_write_machine_list(AgsFile *file, xmlNode *parent, GList *machine); /* AgsPad */ void ags_file_read_pad(AgsFile *file, xmlNode *node, AgsPad **pad); xmlNode* ags_file_write_pad(AgsFile *file, xmlNode *parent, AgsPad *pad); void ags_file_read_pad_list(AgsFile *file, xmlNode *node, GList **pad); xmlNode* ags_file_write_pad_list(AgsFile *file, xmlNode *parent, GList *pad); void ags_file_read_mixer_input_pad(AgsFile *file, xmlNode *node, AgsPad *mixer_input_pad); xmlNode* ags_file_write_mixer_input_pad(AgsFile *file, xmlNode *parent, AgsPad *mixer_input_pad); void ags_file_read_mixer_output_pad(AgsFile *file, xmlNode *node, AgsPad *mixer_output_pad); xmlNode* ags_file_write_mixer_output_pad(AgsFile *file, xmlNode *parent, AgsPad *mixer_output_pad); /* AgsLine */ void ags_file_read_line(AgsFile *file, xmlNode *node, AgsLine **line); xmlNode* ags_file_write_line(AgsFile *file, xmlNode *parent, AgsLine *line); void ags_file_read_line_list(AgsFile *file, xmlNode *node, GList **line); xmlNode* ags_file_write_line_list(AgsFile *file, xmlNode *parent, GList *line); /* AgsLineMember */ void ags_file_read_line_member(AgsFile *file, xmlNode *node, AgsLineMember **line_member); xmlNode* ags_file_write_line_member(AgsFile *file, xmlNode *parent, AgsLineMember *line_member); void ags_file_read_line_member_list(AgsFile *file, xmlNode *node, GList **line_member); xmlNode* ags_file_write_line_member_list(AgsFile *file, xmlNode *parent, GList *line_member); /* AgsEffectBridge */ void ags_file_read_effect_bridge(AgsFile *file, xmlNode *node, AgsEffectBridge **effect_bridge); xmlNode* ags_file_write_effect_bridge(AgsFile *file, xmlNode *parent, AgsEffectBridge *effect_bridge); void ags_file_read_effect_bridge_resolve_audio(AgsFileLookup *file_lookup, AgsEffectBridge *effect_bridge); void ags_file_read_effect_bridge_list(AgsFile *file, xmlNode *node, GList **effect_bridge); xmlNode* ags_file_write_effect_bridge_list(AgsFile *file, xmlNode *parent, GList *effect_bridge); /* AgsEffectBulk */ void ags_file_read_effect_bulk(AgsFile *file, xmlNode *node, AgsEffectBulk **effect_bulk); xmlNode* ags_file_write_effect_bulk(AgsFile *file, xmlNode *parent, AgsEffectBulk *effect_bulk); void ags_file_read_effect_bulk_list(AgsFile *file, xmlNode *node, GList **effect_bulk); xmlNode* ags_file_write_effect_bulk_list(AgsFile *file, xmlNode *parent, GList *effect_bulk); void ags_file_read_effect_bulk_resolve_audio(AgsFileLookup *file_lookup, AgsEffectBulk *effect_bulk); /* AgsBulkMember */ void ags_file_read_bulk_member(AgsFile *file, xmlNode *node, AgsBulkMember **bulk_member); xmlNode* ags_file_write_bulk_member(AgsFile *file, xmlNode *parent, AgsBulkMember *bulk_member); void ags_file_read_bulk_member_list(AgsFile *file, xmlNode *node, GList **bulk_member); xmlNode* ags_file_write_bulk_member_list(AgsFile *file, xmlNode *parent, GList *bulk_member); /* AgsEffectPad */ void ags_file_read_effect_pad(AgsFile *file, xmlNode *node, AgsEffectPad **effect_pad); xmlNode* ags_file_write_effect_pad(AgsFile *file, xmlNode *parent, AgsEffectPad *effect_pad); void ags_file_read_effect_pad_list(AgsFile *file, xmlNode *node, GList **effect_pad); xmlNode* ags_file_write_effect_pad_list(AgsFile *file, xmlNode *parent, GList *effect_pad); /* AgsEffectLine */ void ags_file_read_effect_line(AgsFile *file, xmlNode *node, AgsEffectLine **effect_line); xmlNode* ags_file_write_effect_line(AgsFile *file, xmlNode *parent, AgsEffectLine *effect_line); void ags_file_read_effect_line_list(AgsFile *file, xmlNode *node, GList **effect_line); xmlNode* ags_file_write_effect_line_list(AgsFile *file, xmlNode *parent, GList *effect_line); /* GtkDialog */ void ags_file_read_dialog(AgsFile *file, xmlNode *node, GtkDialog **dialog); xmlNode* ags_file_write_dialog(AgsFile *file, xmlNode *parent, GtkDialog *dialog); void ags_file_read_dialog_list(AgsFile *file, xmlNode *node, GList **dialog); xmlNode* ags_file_write_dialog_list(AgsFile *file, xmlNode *parent, GList *dialog); /* AgsMachineEditor */ void ags_file_read_machine_editor(AgsFile *file, xmlNode *node, AgsMachineEditor **machine_editor); xmlNode* ags_file_write_machine_editor(AgsFile *file, xmlNode *parent, AgsMachineEditor *machine_editor); void ags_file_read_machine_editor_list(AgsFile *file, xmlNode *node, GList **machine_editor); xmlNode* ags_file_write_machine_editor_list(AgsFile *file, xmlNode *parent, GList *machine_editor); void ags_file_read_pad_editor(AgsFile *file, xmlNode *node, AgsPadEditor **pad_editor); xmlNode* ags_file_write_pad_editor(AgsFile *file, xmlNode *parent, AgsPadEditor *pad_editor); void ags_file_read_line_editor(AgsFile *file, xmlNode *node, AgsLineEditor **line_editor); xmlNode* ags_file_write_line_editor(AgsFile *file, xmlNode *parent, AgsLineEditor *line_editor); void ags_file_read_link_editor(AgsFile *file, xmlNode *node, AgsLinkEditor **link_editor); xmlNode* ags_file_write_link_editor(AgsFile *file, xmlNode *parent, AgsLinkEditor *link_editor); void ags_file_read_line_member_editor(AgsFile *file, xmlNode *node, AgsLineMemberEditor **line_member_editor); xmlNode* ags_file_write_line_member_editor(AgsFile *file, xmlNode *parent, AgsLineMemberEditor *line_member_editor); void ags_file_read_link_collection_editor(AgsFile *file, xmlNode *node, AgsLinkCollectionEditor **link_collection_editor); xmlNode* ags_file_write_link_collection_editor(AgsFile *file, xmlNode *parent, AgsLinkCollectionEditor *link_collection_editor); void ags_file_read_resize_editor(AgsFile *file, xmlNode *node, AgsResizeEditor **resize_editor); xmlNode* ags_file_write_resize_editor(AgsFile *file, xmlNode *parent, AgsResizeEditor *resize_editor); /* AgsNotationEditor */ void ags_file_read_notation_editor(AgsFile *file, xmlNode *node, AgsNotationEditor **notation_editor); xmlNode* ags_file_write_notation_editor(AgsFile *file, xmlNode *parent, AgsNotationEditor *notation_editor); /* AgsNotationToolbar */ void ags_file_read_notation_toolbar(AgsFile *file, xmlNode *node, AgsNotationToolbar **notation_toolbar); xmlNode* ags_file_write_notation_toolbar(AgsFile *file, xmlNode *parent, AgsNotationToolbar *notation_toolbar); /* AgsMachineSelector */ void ags_file_read_machine_selector(AgsFile *file, xmlNode *parent, AgsMachineSelector **machine_selector); xmlNode* ags_file_write_machine_selector(AgsFile *file, xmlNode *node, AgsMachineSelector *machine_selector); /* AgsNavigation */ void ags_file_read_navigation(AgsFile *file, xmlNode *node, AgsNavigation **navigation); xmlNode* ags_file_write_navigation(AgsFile *file, xmlNode *parent, AgsNavigation *navigation); /* AgsAutomationWindow */ void ags_file_read_automation_window(AgsFile *file, xmlNode *node, AgsAutomationWindow **automation_window); xmlNode* ags_file_write_automation_window(AgsFile *file, xmlNode *parent, AgsAutomationWindow *automation_window); void ags_file_read_automation_window_list(AgsFile *file, xmlNode *node, GList **automation_window_list); xmlNode* ags_file_write_automation_window_list(AgsFile *file, xmlNode *parent, GList *automation_window_list); /* AgsAutomationEditor */ void ags_file_read_automation_editor(AgsFile *file, xmlNode *node, AgsAutomationEditor **automation_editor); xmlNode* ags_file_write_automation_editor(AgsFile *file, xmlNode *parent, AgsAutomationEditor *automation_editor); void ags_file_read_automation_editor_list(AgsFile *file, xmlNode *node, GList **automation_editor_list); xmlNode* ags_file_write_automation_editor_list(AgsFile *file, xmlNode *parent, GList *automation_editor_list); /* AgsAutomationToolbar */ void ags_file_read_automation_toolbar(AgsFile *file, xmlNode *node, AgsAutomationToolbar **automation_toolbar); xmlNode* ags_file_write_automation_toolbar(AgsFile *file, xmlNode *parent, AgsAutomationToolbar *automation_toolbar); void ags_file_read_automation_toolbar_list(AgsFile *file, xmlNode *node, GList **automation_toolbar_list); xmlNode* ags_file_write_automation_toolbar_list(AgsFile *file, xmlNode *parent, GList *automation_toolbar_list); /* AgsAutomationEdit */ void ags_file_read_automation_edit(AgsFile *file, xmlNode *node, AgsAutomationEdit **automation_edit); xmlNode* ags_file_write_automation_edit(AgsFile *file, xmlNode *parent, AgsAutomationEdit *automation_edit); void ags_file_read_automation_edit_list(AgsFile *file, xmlNode *node, GList **automation_edit_list); xmlNode* ags_file_write_automation_edit_list(AgsFile *file, xmlNode *parent, GList *automation_edit_list); #endif /*__AGS_FILE_GUI_H__*/ gsequencer-1.4.24/ags/X/ags_dssi_browser_callbacks.h0000644000175000017500000000232013246707333017361 00000000000000/* 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 . */ #ifndef __AGS_DSSI_BROWSER_CALLBACKS_H__ #define __AGS_DSSI_BROWSER_CALLBACKS_H__ #include #include #include #include void ags_dssi_browser_plugin_filename_callback(GtkComboBoxText *combo_box, AgsDssiBrowser *dssi_browser); void ags_dssi_browser_plugin_effect_callback(GtkComboBoxText *combo_box, AgsDssiBrowser *dssi_browser); #endif /*__AGS_DSSI_BROWSER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_midi_preferences_callbacks.c0000644000175000017500000001066213246707333020162 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include int ags_midi_preferences_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsMidiPreferences *midi_preferences) { AgsPreferences *preferences; if(old_parent != NULL){ return(0); } preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(midi_preferences), AGS_TYPE_PREFERENCES); midi_preferences->add = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_end((GtkBox *) GTK_DIALOG(preferences)->action_area, (GtkWidget *) midi_preferences->add, TRUE, FALSE, 0); return(0); } void ags_midi_preferences_add_callback(GtkWidget *widget, AgsMidiPreferences *midi_preferences) { AgsWindow *window; AgsPreferences *preferences; AgsSequencerEditor *sequencer_editor; AgsSequencerThread *sequencer_thread; AgsApplicationContext *application_context; GList *list; GObject *sequencer; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(midi_preferences), AGS_TYPE_PREFERENCES); window = (AgsWindow *) preferences->window; application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* retrieve first sequencer */ sequencer = NULL; pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)); if(list != NULL){ sequencer = list->data; } pthread_mutex_unlock(application_mutex); /* sequencer editor */ sequencer_editor = ags_sequencer_editor_new(); if(sequencer != NULL){ sequencer_editor->sequencer = sequencer; sequencer_editor->sequencer_thread = (GObject *) ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_SEQUENCER_THREAD); } gtk_box_pack_start((GtkBox *) midi_preferences->sequencer_editor, (GtkWidget *) sequencer_editor, FALSE, FALSE, 0); ags_applicable_reset(AGS_APPLICABLE(sequencer_editor)); ags_connectable_connect(AGS_CONNECTABLE(sequencer_editor)); g_signal_connect(sequencer_editor->remove, "clicked", G_CALLBACK(ags_midi_preferences_remove_sequencer_editor_callback), midi_preferences); gtk_widget_show_all((GtkWidget *) sequencer_editor); } void ags_midi_preferences_remove_sequencer_editor_callback(GtkWidget *button, AgsMidiPreferences *midi_preferences) { AgsWindow *window; AgsPreferences *preferences; AgsSequencerEditor *sequencer_editor; AgsApplicationContext *application_context; GList *list; GObject *sequencer; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(midi_preferences), AGS_TYPE_PREFERENCES); window = (AgsWindow *) preferences->window; application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; sequencer_editor = (AgsSequencerEditor *) gtk_widget_get_ancestor(button, AGS_TYPE_SEQUENCER_EDITOR); if(!AGS_IS_JACK_DEVOUT(sequencer_editor->sequencer)){ ags_sequencer_editor_remove_sequencer(sequencer_editor, sequencer_editor->sequencer); } gtk_widget_destroy((GtkWidget *) sequencer_editor); } gsequencer-1.4.24/ags/X/ags_export_window.h0000644000175000017500000000454213246707333015575 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_EXPORT_WINDOW_H__ #define __AGS_EXPORT_WINDOW_H__ #include #include #include #define AGS_TYPE_EXPORT_WINDOW (ags_export_window_get_type()) #define AGS_EXPORT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EXPORT_WINDOW, AgsExportWindow)) #define AGS_EXPORT_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EXPORT_WINDOW, AgsExportWindowClass)) #define AGS_IS_EXPORT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_EXPORT_WINDOW)) #define AGS_IS_EXPORT_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_EXPORT_WINDOW)) #define AGS_EXPORT_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_EXPORT_WINDOW, AgsExportWindowClass)) typedef struct _AgsExportWindow AgsExportWindow; typedef struct _AgsExportWindowClass AgsExportWindowClass; typedef enum{ AGS_EXPORT_WINDOW_CONNECTED = 1, AGS_EXPORT_WINDOW_LIVE_EXPORT = 1 << 1, }AgsExportWindowFlags; struct _AgsExportWindow { GtkWindow window; guint flags; GObject *application_context; GtkWidget *main_window; GtkCheckButton *live_export; GtkCheckButton *exclude_sequencer; GtkComboBoxText *mode; GtkSpinButton *tact; GtkLabel *duration; GtkVBox *export_soundcard; GtkButton *add; GtkToggleButton *export; }; struct _AgsExportWindowClass { GtkWindowClass window; }; GType ags_export_window_get_type(void); void ags_export_window_reload_soundcard_editor(AgsExportWindow *export_window); AgsExportWindow* ags_export_window_new(); #endif /*__AGS_EXPORT_WINDOW_H__*/ gsequencer-1.4.24/ags/X/ags_sequencer_editor.c0000644000175000017500000010466413256163135016223 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_sequencer_editor_class_init(AgsSequencerEditorClass *sequencer_editor); void ags_sequencer_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_sequencer_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_sequencer_editor_init(AgsSequencerEditor *sequencer_editor); void ags_sequencer_editor_connect(AgsConnectable *connectable); void ags_sequencer_editor_disconnect(AgsConnectable *connectable); void ags_sequencer_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_sequencer_editor_apply(AgsApplicable *applicable); void ags_sequencer_editor_reset(AgsApplicable *applicable); static void ags_sequencer_editor_finalize(GObject *gobject); /** * SECTION:ags_sequencer_editor * @short_description: A composite widget to configure sequencer * @title: AgsSequencerEditor * @section_id: * @include: ags/X/ags_sequencer_editor.h * * #AgsSequencerEditor enables you to make preferences of sequencer. */ static gpointer ags_sequencer_editor_parent_class = NULL; GType ags_sequencer_editor_get_type(void) { static GType ags_type_sequencer_editor = 0; if(!ags_type_sequencer_editor){ static const GTypeInfo ags_sequencer_editor_info = { sizeof (AgsSequencerEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_sequencer_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSequencerEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_sequencer_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_sequencer_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_sequencer_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_sequencer_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsSequencerEditor", &ags_sequencer_editor_info, 0); g_type_add_interface_static(ags_type_sequencer_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_sequencer_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_sequencer_editor); } void ags_sequencer_editor_class_init(AgsSequencerEditorClass *sequencer_editor) { GObjectClass *gobject; GtkWidgetClass *widget; ags_sequencer_editor_parent_class = g_type_class_peek_parent(sequencer_editor); /* GtkObjectClass */ gobject = (GObjectClass *) sequencer_editor; gobject->finalize = ags_sequencer_editor_finalize; } void ags_sequencer_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_sequencer_editor_connect; connectable->disconnect = ags_sequencer_editor_disconnect; } void ags_sequencer_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_sequencer_editor_set_update; applicable->apply = ags_sequencer_editor_apply; applicable->reset = ags_sequencer_editor_reset; } void ags_sequencer_editor_init(AgsSequencerEditor *sequencer_editor) { GtkTable *table; GtkLabel *label; sequencer_editor->flags = 0; sequencer_editor->sequencer = NULL; sequencer_editor->sequencer_thread = NULL; table = (GtkTable *) gtk_table_new(3, 8, FALSE); gtk_box_pack_start(GTK_BOX(sequencer_editor), GTK_WIDGET(table), FALSE, FALSE, 2); /* backend */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("backend"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); sequencer_editor->backend = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(sequencer_editor->backend), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); #ifdef AGS_WITH_CORE_AUDIO gtk_combo_box_text_append_text(sequencer_editor->backend, "core-audio"); #endif #ifdef AGS_WITH_JACK gtk_combo_box_text_append_text(sequencer_editor->backend, "jack"); #endif #ifdef AGS_WITH_ALSA gtk_combo_box_text_append_text(sequencer_editor->backend, "alsa"); #endif #ifdef AGS_WITH_OSS gtk_combo_box_text_append_text(sequencer_editor->backend, "oss"); #endif gtk_combo_box_set_active(GTK_COMBO_BOX(sequencer_editor->backend), 0); /* sound card */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("MIDI card"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); sequencer_editor->card = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(sequencer_editor->card), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* jack */ sequencer_editor->source_hbox = NULL; sequencer_editor->add_source = NULL; sequencer_editor->remove_source = NULL; sequencer_editor->source_hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(sequencer_editor->source_hbox), 2, 3, 1, 2, GTK_FILL, GTK_FILL, 0, 0); sequencer_editor->add_source = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start((GtkBox *) sequencer_editor->source_hbox, (GtkWidget *) sequencer_editor->add_source, FALSE, FALSE, 0); sequencer_editor->remove_source = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_box_pack_start((GtkBox *) sequencer_editor->source_hbox, (GtkWidget *) sequencer_editor->remove_source, FALSE, FALSE, 0); /* */ sequencer_editor->remove = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_table_attach(table, GTK_WIDGET(sequencer_editor->remove), 2, 3, 7, 8, GTK_FILL, GTK_FILL, 0, 0); } void ags_sequencer_editor_connect(AgsConnectable *connectable) { AgsSequencerEditor *sequencer_editor; sequencer_editor = AGS_SEQUENCER_EDITOR(connectable); if((AGS_SEQUENCER_EDITOR_CONNECTED & (sequencer_editor->flags)) != 0){ return; } sequencer_editor->flags |= AGS_SEQUENCER_EDITOR_CONNECTED; /* backend and card */ g_signal_connect(G_OBJECT(sequencer_editor->backend), "changed", G_CALLBACK(ags_sequencer_editor_backend_changed_callback), sequencer_editor); g_signal_connect(G_OBJECT(sequencer_editor->card), "changed", G_CALLBACK(ags_sequencer_editor_card_changed_callback), sequencer_editor); /* add / remove jack */ g_signal_connect(G_OBJECT(sequencer_editor->add_source), "clicked", G_CALLBACK(ags_sequencer_editor_add_source_callback), sequencer_editor); g_signal_connect(G_OBJECT(sequencer_editor->remove_source), "clicked", G_CALLBACK(ags_sequencer_editor_remove_source_callback), sequencer_editor); } void ags_sequencer_editor_disconnect(AgsConnectable *connectable) { AgsSequencerEditor *sequencer_editor; sequencer_editor = AGS_SEQUENCER_EDITOR(connectable); if((AGS_SEQUENCER_EDITOR_CONNECTED & (sequencer_editor->flags)) == 0){ return; } sequencer_editor->flags &= (~AGS_SEQUENCER_EDITOR_CONNECTED); /* backend and card */ g_object_disconnect(G_OBJECT(sequencer_editor->backend), "any_signal::changed", G_CALLBACK(ags_sequencer_editor_backend_changed_callback), sequencer_editor, NULL); g_object_disconnect(G_OBJECT(sequencer_editor->card), "any_signal::changed", G_CALLBACK(ags_sequencer_editor_card_changed_callback), sequencer_editor, NULL); /* add / remove jack */ g_object_disconnect(G_OBJECT(sequencer_editor->add_source), "any_signal::clicked", G_CALLBACK(ags_sequencer_editor_add_source_callback), sequencer_editor, NULL); g_object_disconnect(G_OBJECT(sequencer_editor->remove_source), "any_signal::clicked", G_CALLBACK(ags_sequencer_editor_remove_source_callback), sequencer_editor, NULL); } static void ags_sequencer_editor_finalize(GObject *gobject) { //TODO:JK: implement me G_OBJECT_CLASS(ags_sequencer_editor_parent_class)->finalize(gobject); } void ags_sequencer_editor_set_update(AgsApplicable *applicable, gboolean update) { //TODO:JK: implement me } void ags_sequencer_editor_apply(AgsApplicable *applicable) { AgsMidiPreferences *midi_preferences; AgsSequencerEditor *sequencer_editor; GtkListStore *model; GtkTreeIter current; AgsConfig *config; GList *tasks; GList *list; gchar *sequencer_group; gchar *backend; char *device, *str; gint nth; gboolean use_core_audio, use_jack, use_alsa, use_oss; GValue value = {0,}; pthread_mutex_t *application_mutex; sequencer_editor = AGS_SEQUENCER_EDITOR(applicable); midi_preferences = (AgsMidiPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_MIDI_PREFERENCES); config = ags_config_get_instance(); list = gtk_container_get_children((GtkContainer *) midi_preferences->sequencer_editor); nth = g_list_index(list, sequencer_editor); if(nth < 0){ return; } sequencer_group = g_strdup_printf("%s-%d", AGS_CONFIG_SEQUENCER, nth); g_list_free(list); /* backend */ #ifdef AGS_WITH_CORE_AUDIO use_core_audio = TRUE; #else use_jack = TRUE; #endif use_alsa = FALSE; use_oss = FALSE; backend = gtk_combo_box_text_get_active_text(sequencer_editor->backend); ags_config_set_value(config, sequencer_group, "backend", backend); if(backend != NULL){ if(!g_ascii_strncasecmp(backend, "core-audio", 11)){ use_core_audio = TRUE; }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ use_jack = TRUE; }else if(!g_ascii_strncasecmp(backend, "alsa", 5)){ use_alsa = TRUE; }else if(!g_ascii_strncasecmp(backend, "oss", 4)){ use_oss = TRUE; } } /* device */ model = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(sequencer_editor->card))); if(gtk_combo_box_get_active_iter(GTK_COMBO_BOX(sequencer_editor->card), ¤t)){ gtk_tree_model_get_value(model, ¤t, 0, &value); device = g_value_get_string(&value); }else{ device = NULL; } /* handle */ g_message("%s", device); if(use_core_audio){ ags_config_set_value(config, sequencer_group, "device", device); }else if(use_jack){ ags_config_set_value(config, sequencer_group, "device", device); }else if(use_alsa){ ags_config_set_value(config, sequencer_group, "device", device); }else if(use_oss){ ags_config_set_value(config, sequencer_group, "device", device); } } void ags_sequencer_editor_reset(AgsApplicable *applicable) { AgsWindow *window; AgsPreferences *preferences; AgsSequencerEditor *sequencer_editor; GObject *sequencer; GList *card_id, *card_id_start, *card_name, *card_name_start; gchar *backend, *device, *str, *tmp; guint nth; gboolean use_alsa; gboolean found_card; GError *error; sequencer_editor = AGS_SEQUENCER_EDITOR(applicable); sequencer = sequencer_editor->sequencer; /* refresh */ use_alsa = FALSE; backend = NULL; if(AGS_IS_CORE_AUDIO_MIDIIN(sequencer)){ backend = "core-audio"; }else if(AGS_IS_JACK_MIDIIN(sequencer)){ backend = "jack"; }else if(AGS_IS_MIDIIN(sequencer)){ if((AGS_MIDIIN_ALSA & (AGS_MIDIIN(sequencer)->flags)) != 0){ backend = "alsa"; }else if((AGS_MIDIIN_OSS & (AGS_MIDIIN(sequencer)->flags)) != 0){ backend = "oss"; } } if(backend != NULL){ if(!g_ascii_strncasecmp(backend, "core-audio", 5)){ gtk_combo_box_set_active(GTK_COMBO_BOX(sequencer_editor->backend), 0); ags_sequencer_editor_load_core_audio_card(sequencer_editor); }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ gtk_combo_box_set_active(GTK_COMBO_BOX(sequencer_editor->backend), 0); ags_sequencer_editor_load_jack_card(sequencer_editor); }else if(!g_ascii_strncasecmp(backend, "alsa", 5)){ use_alsa = TRUE; #ifdef AGS_WITH_ALSA gtk_combo_box_set_active(GTK_COMBO_BOX(sequencer_editor->backend), 1); #endif ags_sequencer_editor_load_alsa_card(sequencer_editor); }else if(!g_ascii_strncasecmp(backend, "oss", 4)){ #ifdef AGS_WITH_ALSA gtk_combo_box_set_active(GTK_COMBO_BOX(sequencer_editor->backend), 2); #else gtk_combo_box_set_active(GTK_COMBO_BOX(sequencer_editor->backend), -1); #endif ags_sequencer_editor_load_oss_card(sequencer_editor); } } /* */ device = ags_sequencer_get_device(AGS_SEQUENCER(sequencer)); card_id_start = NULL; card_name_start = NULL; ags_sequencer_list_cards(AGS_SEQUENCER(sequencer), &card_id_start, &card_name_start); card_id = card_id_start; card_name = card_name_start; nth = 0; found_card = FALSE; gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(sequencer_editor->card)))); while(card_id != NULL){ //FIXME:JK: work-around for alsa-handle tmp = card_id->data; if(card_id->data != NULL && use_alsa){ tmp = g_strdup_printf("%s,0", card_id->data); } if(tmp != NULL && device != NULL && !g_ascii_strcasecmp(tmp, device)){ found_card = TRUE; } if(tmp != NULL){ gtk_combo_box_text_append_text(sequencer_editor->card, tmp); } if(use_alsa){ g_free(tmp); } if(!found_card){ nth++; } card_id = card_id->next; card_name = card_name->next; } if(!found_card){ nth = 0; } gtk_combo_box_set_active(GTK_COMBO_BOX(sequencer_editor->card), nth); if(card_id_start != NULL){ g_list_free_full(card_id_start, g_free); g_list_free_full(card_name_start, g_free); } } void ags_sequencer_editor_add_source(AgsSequencerEditor *sequencer_editor, gchar *device) { AgsWindow *window; AgsPreferences *preferences; AgsCoreAudioServer *core_audio_server; AgsCoreAudioMidiin *core_audio_midiin; AgsJackServer *jack_server; AgsJackMidiin *jack_midiin; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsThread *sequencer_thread; AgsApplicationContext *application_context; GObject *sequencer; GType server_type; GList *distributed_manager; GList *card_name, *card_uri; gchar *backend; gboolean use_core_audio, use_jack; gboolean initial_sequencer; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; mutex_manager = ags_mutex_manager_get_instance(); core_audio_server = NULL; core_audio_midiin = NULL; jack_server = NULL; jack_midiin = NULL; sequencer = NULL; server_type = G_TYPE_NONE; backend = NULL; use_core_audio = FALSE; use_jack = FALSE; initial_sequencer = FALSE; /* determine backend */ backend = gtk_combo_box_text_get_active_text(sequencer_editor->backend); if(backend != NULL){ if(!g_ascii_strncasecmp(backend, "core-audio", 11)){ server_type = AGS_TYPE_CORE_AUDIO_SERVER; use_core_audio = TRUE; }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ server_type = AGS_TYPE_JACK_SERVER; use_jack = TRUE; } } /* create sequencer */ pthread_mutex_lock(application_mutex); distributed_manager = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if((distributed_manager = ags_list_util_find_type(distributed_manager, server_type)) != NULL){ if(use_core_audio){ core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager->data); sequencer = core_audio_midiin = (AgsCoreAudioMidiin *) ags_distributed_manager_register_sequencer(AGS_DISTRIBUTED_MANAGER(core_audio_server), FALSE); }else if(use_jack){ jack_server = AGS_JACK_SERVER(distributed_manager->data); sequencer = jack_midiin = (AgsJackMidiin *) ags_distributed_manager_register_sequencer(AGS_DISTRIBUTED_MANAGER(jack_server), FALSE); } }else{ g_warning("distributed manager not found"); pthread_mutex_unlock(application_mutex); return; } pthread_mutex_unlock(application_mutex); if(sequencer == NULL){ return; } pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) sequencer); /* add new */ main_loop = (AgsThread *) application_context->main_loop; if(ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)) == NULL){ initial_sequencer = TRUE; } sequencer_editor->sequencer = sequencer; ags_sound_provider_set_sequencer(AGS_SOUND_PROVIDER(application_context), g_list_append(ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)), sequencer)); pthread_mutex_unlock(application_mutex); g_object_ref(sequencer); sequencer_thread = (AgsThread *) ags_sequencer_thread_new(sequencer); sequencer_editor->sequencer_thread = (GObject *) sequencer_thread; ags_thread_add_child_extended(main_loop, sequencer_thread, TRUE, TRUE); /* */ pthread_mutex_lock(mutex); card_name = NULL; card_uri = NULL; ags_sequencer_list_cards(AGS_SEQUENCER(sequencer), &card_uri, &card_name); pthread_mutex_unlock(mutex); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(sequencer_editor->card)))); while(card_uri != NULL){ if(card_uri->data != NULL){ gtk_combo_box_text_append_text(sequencer_editor->card, card_uri->data); } card_uri = card_uri->next; } } void ags_sequencer_editor_remove_source(AgsSequencerEditor *sequencer_editor, gchar *device) { AgsWindow *window; AgsPreferences *preferences; GtkDialog *dialog; AgsCoreAudioServer *core_audio_server; AgsCoreAudioMidiin *core_audio_midiin; AgsJackServer *jack_server; AgsJackMidiin *jack_midiin; AgsApplicationContext *application_context; AgsThread *main_loop; GObject *server; GObject *sequencer; GType server_type; GList *machine, *machine_start; GList *distributed_manager; GList *list; GList *card_id; gchar *backend; gboolean use_core_audio, use_pulse, use_jack; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; core_audio_server = NULL; core_audio_midiin = NULL; jack_server = NULL; jack_midiin = NULL; server = NULL; sequencer = NULL; server_type = G_TYPE_NONE; backend = NULL; use_core_audio = FALSE; use_pulse = FALSE; use_jack = FALSE; /* determine backend */ backend = gtk_combo_box_text_get_active_text(sequencer_editor->backend); if(backend != NULL){ if(!g_ascii_strncasecmp(backend, "core-audio", 6)){ server_type = AGS_TYPE_CORE_AUDIO_SERVER; use_core_audio = TRUE; }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ server_type = AGS_TYPE_JACK_SERVER; use_jack = TRUE; } } /* destroy sequencer */ pthread_mutex_lock(application_mutex); main_loop = application_context->main_loop; distributed_manager = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if((distributed_manager = ags_list_util_find_type(distributed_manager, server_type)) != NULL){ if(use_core_audio){ server = core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager->data); }else if(use_jack){ server = jack_server = AGS_JACK_SERVER(distributed_manager->data); } }else{ g_warning("distributed manager not found"); pthread_mutex_unlock(application_mutex); return; } list = ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(use_core_audio){ if(AGS_IS_CORE_AUDIO_MIDIIN(list->data) && !g_ascii_strcasecmp(ags_sequencer_get_device(AGS_SEQUENCER(list->data)), device)){ sequencer = core_audio_midiin = list->data; break; } }else if(use_jack){ if(AGS_IS_JACK_MIDIIN(list->data) && !g_ascii_strcasecmp(ags_sequencer_get_device(AGS_SEQUENCER(list->data)), device)){ sequencer = jack_midiin = list->data; break; } } list = list->next; } pthread_mutex_unlock(application_mutex); if(sequencer == NULL){ return; } /* */ gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(sequencer_editor->card)))); gtk_combo_box_set_active(GTK_COMBO_BOX(sequencer_editor->backend), -1); #if 0 if(server != NULL){ ags_distributed_manager_unregister_sequencer(AGS_DISTRIBUTED_MANAGER(server), sequencer); } #endif /* remove */ if(sequencer == sequencer_editor->sequencer){ sequencer_editor->sequencer = NULL; } #if 0 if(sequencer != NULL){ ags_sound_provider_set_sequencer(AGS_SOUND_PROVIDER(application_context), g_list_remove(ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)), sequencer)); g_object_unref(sequencer); } if(sequencer_editor->sequencer_thread != NULL){ ags_thread_stop((AgsThread *) sequencer_editor->sequencer_thread); ags_thread_remove_child(main_loop, (AgsThread *) sequencer_editor->sequencer_thread); // g_object_unref(sequencer_editor->sequencer_thread); sequencer_editor->sequencer_thread = NULL; } #endif /* notify user about restarting GSequencer */ dialog = gtk_message_dialog_new(preferences, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "After finished your modifications you should safe your file and restart GSequencer"); g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show_all(dialog); } void ags_sequencer_editor_add_sequencer(AgsSequencerEditor *sequencer_editor, GObject *sequencer) { AgsWindow *window; AgsPreferences *preferences; AgsThread *main_loop; AgsThread *sequencer_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; if(sequencer == NULL || AGS_IS_JACK_MIDIIN(sequencer)){ return; } preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; if(AGS_IS_MIDIIN(sequencer)){ if((AGS_MIDIIN_ALSA & (AGS_MIDIIN(sequencer)->flags)) != 0){ ags_sequencer_set_device(AGS_SEQUENCER(sequencer), "hw:0,0"); }else if((AGS_MIDIIN_OSS & (AGS_MIDIIN(sequencer)->flags)) != 0){ ags_sequencer_set_device(AGS_SEQUENCER(sequencer), "/dev/dsp0"); }else{ g_warning("unknown sequencer implementation"); } }else{ g_warning("unknown sequencer implementation"); } /* */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; if(g_list_find(ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)), sequencer) != NULL){ pthread_mutex_unlock(application_mutex); return; } sequencer_editor->sequencer = sequencer; ags_sound_provider_set_sequencer(AGS_SOUND_PROVIDER(application_context), g_list_append(ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)), sequencer)); pthread_mutex_unlock(application_mutex); g_object_ref(sequencer); sequencer_thread = (AgsThread *) ags_sequencer_thread_new(sequencer); sequencer_editor->sequencer_thread = (GObject *) sequencer_thread; ags_thread_add_child_extended(main_loop, sequencer_thread, TRUE, TRUE); } void ags_sequencer_editor_remove_sequencer(AgsSequencerEditor *sequencer_editor, GObject *sequencer) { AgsWindow *window; AgsPreferences *preferences; GtkDialog *dialog; AgsThread *main_loop; AgsThread *sequencer_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; if(AGS_IS_JACK_MIDIIN(sequencer)){ return; } preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; if(sequencer == sequencer_editor->sequencer){ sequencer_editor->sequencer = NULL; } #if 0 if(sequencer != NULL){ ags_sound_provider_set_sequencer(AGS_SOUND_PROVIDER(application_context), g_list_remove(ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)), sequencer)); g_object_unref(sequencer); } #endif #if 0 if(sequencer_editor->sequencer_thread != NULL){ ags_thread_stop((AgsThread *) sequencer_editor->sequencer_thread); ags_thread_remove_child(main_loop, (AgsThread *) sequencer_editor->sequencer_thread); // g_object_unref(sequencer_editor->sequencer_thread); sequencer_editor->sequencer_thread = NULL; } #endif pthread_mutex_unlock(application_mutex); /* notify user about restarting GSequencer */ dialog = gtk_message_dialog_new(preferences, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "After finished your modifications you should safe your file and restart GSequencer"); g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show_all(dialog); } void ags_sequencer_editor_load_core_audio_card(AgsSequencerEditor *sequencer_editor) { AgsWindow *window; AgsPreferences *preferences; AgsCoreAudioMidiin *core_audio_midiin; AgsApplicationContext *application_context; GList *distributed_manager; GList *sequencer; GList *card_id; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* create sequencer */ pthread_mutex_lock(application_mutex); distributed_manager = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if((distributed_manager = ags_list_util_find_type(distributed_manager, AGS_TYPE_CORE_AUDIO_SERVER)) == NULL){ g_warning("distributed manager not found"); pthread_mutex_unlock(application_mutex); return; } sequencer = ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)); core_audio_midiin = NULL; while(sequencer != NULL){ if(AGS_IS_CORE_AUDIO_MIDIIN(sequencer->data)){ core_audio_midiin = sequencer->data; break; } sequencer = sequencer->next; } card_id = NULL; ags_sequencer_list_cards(AGS_SEQUENCER(core_audio_midiin), &card_id, NULL); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(sequencer_editor->card)))); while(card_id != NULL){ if(card_id->data != NULL){ gtk_combo_box_text_append_text(sequencer_editor->card, card_id->data); } card_id = card_id->next; } /* */ pthread_mutex_unlock(application_mutex); } void ags_sequencer_editor_load_jack_card(AgsSequencerEditor *sequencer_editor) { AgsWindow *window; AgsPreferences *preferences; AgsJackMidiin *jack_midiin; AgsApplicationContext *application_context; GList *distributed_manager; GList *sequencer; GList *card_id; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* create sequencer */ pthread_mutex_lock(application_mutex); distributed_manager = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if((distributed_manager = ags_list_util_find_type(distributed_manager, AGS_TYPE_JACK_SERVER)) == NULL){ g_warning("distributed manager not found"); pthread_mutex_unlock(application_mutex); return; } sequencer = ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)); jack_midiin = NULL; while(sequencer != NULL){ if(AGS_IS_JACK_MIDIIN(sequencer->data)){ jack_midiin = sequencer->data; break; } sequencer = sequencer->next; } card_id = NULL; ags_sequencer_list_cards(AGS_SEQUENCER(jack_midiin), &card_id, NULL); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(sequencer_editor->card)))); while(card_id != NULL){ if(card_id->data != NULL){ gtk_combo_box_text_append_text(sequencer_editor->card, card_id->data); } card_id = card_id->next; } /* */ pthread_mutex_unlock(application_mutex); } void ags_sequencer_editor_load_alsa_card(AgsSequencerEditor *sequencer_editor) { AgsWindow *window; AgsPreferences *preferences; AgsMidiin *midiin; AgsApplicationContext *application_context; GList *list; GList *card_id; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* */ pthread_mutex_lock(application_mutex); midiin = g_object_new(AGS_TYPE_MIDIIN, NULL); midiin->flags &= (~AGS_MIDIIN_OSS); midiin->flags |= AGS_MIDIIN_ALSA; g_object_set(midiin, "application-context", application_context, NULL); card_id = NULL; ags_sequencer_list_cards(AGS_SEQUENCER(midiin), &card_id, NULL); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(sequencer_editor->card)))); while(card_id != NULL){ if(card_id->data != NULL){ gtk_combo_box_text_append_text(sequencer_editor->card, card_id->data); } card_id = card_id->next; } /* remove previous */ if(sequencer_editor->sequencer != NULL){ ags_sequencer_editor_remove_sequencer(sequencer_editor, (GObject *) sequencer_editor->sequencer); } /* add new */ ags_sequencer_editor_add_sequencer(sequencer_editor, (GObject *) midiin); pthread_mutex_unlock(application_mutex); } void ags_sequencer_editor_load_oss_card(AgsSequencerEditor *sequencer_editor) { AgsWindow *window; AgsPreferences *preferences; AgsMidiin *midiin; AgsApplicationContext *application_context; GList *list; GList *card_id; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_PREFERENCES); window = AGS_WINDOW(preferences->window); application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* */ pthread_mutex_lock(application_mutex); midiin = g_object_new(AGS_TYPE_MIDIIN, NULL); midiin->flags &= (~AGS_MIDIIN_ALSA); midiin->flags |= AGS_MIDIIN_OSS; g_object_set(midiin, "application-context", application_context, NULL); card_id = NULL; ags_sequencer_list_cards(AGS_SEQUENCER(midiin), &card_id, NULL); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(sequencer_editor->card)))); while(card_id != NULL){ if(card_id->data != NULL){ gtk_combo_box_text_append_text(sequencer_editor->card, card_id->data); } card_id = card_id->next; } /* remove previous */ if(sequencer_editor->sequencer != NULL){ ags_sequencer_editor_remove_sequencer(sequencer_editor, (GObject *) sequencer_editor->sequencer); } /* add new */ ags_sequencer_editor_add_sequencer(sequencer_editor, (GObject *) midiin); pthread_mutex_unlock(application_mutex); } /** * ags_sequencer_editor_new: * * Creates an #AgsSequencerEditor * * Returns: a new #AgsSequencerEditor * * Since: 1.0.0 */ AgsSequencerEditor* ags_sequencer_editor_new() { AgsSequencerEditor *sequencer_editor; sequencer_editor = (AgsSequencerEditor *) g_object_new(AGS_TYPE_SEQUENCER_EDITOR, NULL); return(sequencer_editor); } gsequencer-1.4.24/ags/X/ags_effect_bulk_callbacks.c0000644000175000017500000001047113247044247017125 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_effect_bulk_add_callback(GtkWidget *button, AgsEffectBulk *effect_bulk) { gtk_widget_show_all((GtkWidget *) effect_bulk->plugin_browser); } void ags_effect_bulk_remove_callback(GtkWidget *button, AgsEffectBulk *effect_bulk) { GList *bulk_member; GList *children; guint nth; auto void ags_effect_bulk_editor_plugin_browser_response_destroy_entry(); void ags_effect_bulk_editor_plugin_browser_response_destroy_entry(){ /* destroy bulk member entry */ gtk_widget_destroy(GTK_WIDGET(bulk_member->data)); } if(button == NULL || effect_bulk == NULL){ return; } bulk_member = gtk_container_get_children((GtkContainer *) effect_bulk->bulk_member); /* iterate bulk member */ for(nth = 0; bulk_member != NULL; nth++){ children = gtk_container_get_children(GTK_CONTAINER(bulk_member->data)); if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(children->data))){ ags_effect_bulk_editor_plugin_browser_response_destroy_entry(); /* remove effect */ ags_effect_bulk_remove_effect(effect_bulk, nth); } bulk_member = bulk_member->next; } } void ags_effect_bulk_plugin_browser_response_callback(GtkDialog *dialog, gint response, AgsEffectBulk *effect_bulk) { gchar *filename, *effect; auto void ags_effect_bulk_plugin_browser_response_create_entry(); void ags_effect_bulk_plugin_browser_response_create_entry(){ GtkHBox *hbox; GtkCheckButton *check_button; GtkLabel *label; gchar *str; /* create entry */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(effect_bulk->bulk_member), GTK_WIDGET(hbox), FALSE, FALSE, 0); check_button = (GtkCheckButton *) gtk_check_button_new(); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(check_button), FALSE, FALSE, 0); //TODO:JK: ugly str = g_strdup_printf("%s - %s", filename, effect); label = (GtkLabel *) gtk_label_new(str); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); g_free(str); gtk_widget_show_all((GtkWidget *) hbox); } switch(response){ case GTK_RESPONSE_ACCEPT: { /* retrieve plugin */ filename = ags_plugin_browser_get_plugin_filename((AgsPluginBrowser *) effect_bulk->plugin_browser); effect = ags_plugin_browser_get_plugin_effect((AgsPluginBrowser *) effect_bulk->plugin_browser); ags_effect_bulk_plugin_browser_response_create_entry(); /* add effect */ ags_effect_bulk_add_effect(effect_bulk, NULL, filename, effect); } break; } } void ags_effect_bulk_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsEffectBulk *effect_bulk) { ags_effect_bulk_resize_audio_channels(effect_bulk, audio_channels, audio_channels_old); } void ags_effect_bulk_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsEffectBulk *effect_bulk) { if(channel_type == effect_bulk->channel_type){ ags_effect_bulk_resize_pads(effect_bulk, pads, pads_old); } } gsequencer-1.4.24/ags/X/ags_sequencer_editor_callbacks.h0000644000175000017500000000270513256163135020220 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SOUNCARD_EDITOR_CALLBACKS_H__ #define __AGS_SOUNCARD_EDITOR_CALLBACKS_H__ #include #include #include #include void ags_sequencer_editor_backend_changed_callback(GtkComboBox *combo, AgsSequencerEditor *sequencer_editor); void ags_sequencer_editor_card_changed_callback(GtkComboBox *combo, AgsSequencerEditor *sequencer_editor); void ags_sequencer_editor_add_source_callback(GtkWidget *button, AgsSequencerEditor *sequencer_editor); void ags_sequencer_editor_remove_source_callback(GtkWidget *button, AgsSequencerEditor *sequencer_editor); #endif /*__AGS_SEQUENCER_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_export_window_callbacks.c0000644000175000017500000002662313246707333017573 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_export_window_stop_callback(AgsThread *thread, AgsExportWindow *export_window); void ags_export_window_add_export_soundcard_callback(GtkWidget *button, AgsExportWindow *export_window) { AgsExportSoundcard *export_soundcard; GtkHBox *hbox; GtkAlignment *alignment; GtkButton *remove_button; /* create GtkHBox */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) export_window->export_soundcard, (GtkWidget *) hbox, FALSE, FALSE, 0); /* instantiate export soundcard */ export_soundcard = (AgsExportSoundcard *) g_object_new(AGS_TYPE_EXPORT_SOUNDCARD, NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) export_soundcard, FALSE, FALSE, 0); ags_connectable_connect(AGS_CONNECTABLE(export_soundcard)); /* remove button */ alignment = (GtkAlignment *) gtk_alignment_new(0.5, 1.0, 0.0, 0.0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) alignment, FALSE, FALSE, 0); remove_button = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_container_add((GtkContainer *) alignment, (GtkWidget *) remove_button); g_signal_connect(G_OBJECT(remove_button), "clicked", G_CALLBACK(ags_export_window_remove_export_soundcard_callback), export_window); /* show all */ gtk_widget_show_all(hbox); } void ags_export_window_remove_export_soundcard_callback(GtkWidget *button, AgsExportWindow *export_window) { GtkHBox *hbox; hbox = gtk_widget_get_ancestor(button, GTK_TYPE_HBOX); gtk_widget_destroy(hbox); } void ags_export_window_tact_callback(GtkWidget *spin_button, AgsExportWindow *export_window) { AgsWindow *window; AgsMutexManager *mutex_manager; gchar *str; gdouble delay_factor; gdouble delay; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* retrieve window */ window = export_window->main_window; /* retrieve soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) window->soundcard); pthread_mutex_unlock(application_mutex); /* get some properties */ pthread_mutex_lock(soundcard_mutex); delay_factor = ags_soundcard_get_delay_factor(AGS_SOUNDCARD(window->soundcard)); delay = ags_soundcard_get_absolute_delay(AGS_SOUNDCARD(window->soundcard)); pthread_mutex_unlock(soundcard_mutex); /* update duration */ str = ags_time_get_uptime_from_offset(gtk_spin_button_get_value(export_window->tact) * 16.0, window->navigation->bpm->adjustment->value, delay, delay_factor); gtk_label_set_text(export_window->duration, str); g_free(str); } void ags_export_window_export_callback(GtkWidget *toggle_button, AgsExportWindow *export_window) { AgsWindow *window; AgsMachine *machine; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GList *machines_start; gboolean success; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; window = AGS_XORG_APPLICATION_CONTEXT(export_window->application_context)->window; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); machines_start = NULL; if(gtk_toggle_button_get_active((GtkToggleButton *) toggle_button)){ AgsExportOutput *export_output; AgsExportThread *export_thread, *current_export_thread; GList *export_soundcard, *export_soundcard_start; GList *child_start; GList *machines; GList *all_filename; GList *remove_filename; GList *task; GList *list; gchar *filename; gboolean file_exists; gboolean live_performance; export_thread = (AgsExportThread *) ags_thread_find_type(main_loop, AGS_TYPE_EXPORT_THREAD); export_soundcard_start = export_soundcard = gtk_container_get_children(GTK_CONTAINER(export_window->export_soundcard)); all_filename = NULL; remove_filename = NULL; file_exists = FALSE; while(export_soundcard != NULL){ child_start = gtk_container_get_children(GTK_CONTAINER(export_soundcard->data)); filename = gtk_entry_get_text(AGS_EXPORT_SOUNDCARD(child_start->data)->filename); all_filename = g_list_prepend(all_filename, filename); /* test filename */ if(filename == NULL || strlen(filename) == 0){ return; } if(g_file_test(filename, G_FILE_TEST_EXISTS)){ if(g_file_test(filename, (G_FILE_TEST_IS_DIR | G_FILE_TEST_IS_SYMLINK))){ //TODO:JK: improve me return; } remove_filename = g_list_prepend(remove_filename, filename); file_exists = TRUE; } g_list_free(child_start); export_soundcard = export_soundcard->next; } if(file_exists){ GtkDialog *dialog; gint response; dialog = (GtkDialog *) gtk_message_dialog_new((GtkWindow *) export_window, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "Replace existing file(s)?"); response = gtk_dialog_run(dialog); gtk_widget_destroy((GtkWidget *) dialog); if(response == GTK_RESPONSE_REJECT || response == GTK_RESPONSE_CANCEL){ return; } /* remove files */ list = remove_filename; while(list != NULL){ g_remove(list->data); list = list->next; } g_list_free(remove_filename); } /* get some preferences */ if(export_window->live_export != NULL){ live_performance = gtk_toggle_button_get_active((GtkToggleButton *) export_window->live_export); }else{ live_performance = TRUE; } machines_start = machines = gtk_container_get_children(GTK_CONTAINER(window->machines)); /* start machines */ success = FALSE; while(machines != NULL){ machine = AGS_MACHINE(machines->data); if((AGS_MACHINE_IS_SEQUENCER & (machine->flags)) != 0 || (AGS_MACHINE_IS_SYNTHESIZER & (machine->flags)) != 0){ g_message("found machine to play!"); ags_machine_set_run_extended(machine, TRUE, !gtk_toggle_button_get_active((GtkToggleButton *) export_window->exclude_sequencer), TRUE); success = TRUE; } machines = machines->next; } /* start export thread */ if(success){ gchar *str; guint tic; guint format; gdouble delay; gdouble delay_factor; pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) window->soundcard); pthread_mutex_unlock(application_mutex); /* create task */ pthread_mutex_lock(soundcard_mutex); delay = ags_soundcard_get_absolute_delay(AGS_SOUNDCARD(window->soundcard)); delay_factor = ags_soundcard_get_delay_factor(AGS_SOUNDCARD(window->soundcard)); pthread_mutex_unlock(soundcard_mutex); /* */ tic = (gtk_spin_button_get_value(export_window->tact) + 1) * (16.0 * delay); export_soundcard = export_soundcard_start; task = NULL; while(export_soundcard != NULL){ child_start = gtk_container_get_children(GTK_CONTAINER(export_soundcard->data)); filename = gtk_entry_get_text(AGS_EXPORT_SOUNDCARD(child_start->data)->filename); export_output = ags_export_output_new(ags_export_thread_find_soundcard(export_thread, AGS_EXPORT_SOUNDCARD(child_start->data)->soundcard), AGS_EXPORT_SOUNDCARD(child_start->data)->soundcard, filename, tic, live_performance); str = gtk_combo_box_text_get_active_text(AGS_EXPORT_SOUNDCARD(child_start->data)->output_format); format = 0; if(!g_ascii_strncasecmp(str, "wav", 4)){ format = AGS_EXPORT_OUTPUT_FORMAT_WAV; }else if(!g_ascii_strncasecmp(str, "flac", 5)){ format = AGS_EXPORT_OUTPUT_FORMAT_FLAC; }else if(!g_ascii_strncasecmp(str, "ogg", 4)){ format = AGS_EXPORT_OUTPUT_FORMAT_OGG; } g_object_set(G_OBJECT(export_output), "format", format, NULL); task = g_list_prepend(task, export_output); if(AGS_EXPORT_SOUNDCARD(child_start->data)->soundcard == window->soundcard){ g_signal_connect(export_thread, "stop", G_CALLBACK(ags_export_window_stop_callback), export_window); } g_list_free(child_start); export_soundcard = export_soundcard->next; } /* append AgsStartSoundcard */ task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); ags_navigation_set_seeking_sensitive(window->navigation, FALSE); } g_list_free(export_soundcard_start); }else{ GList *machines; machines_start = machines = gtk_container_get_children(GTK_CONTAINER(window->machines)); /* stop machines */ while(machines != NULL){ machine = AGS_MACHINE(machines->data); if((AGS_MACHINE_IS_SEQUENCER & (machine->flags)) !=0 || (AGS_MACHINE_IS_SYNTHESIZER & (machine->flags)) != 0){ printf("found machine to stop!\n"); ags_machine_set_run(machine, FALSE); success = TRUE; } machines = machines->next; } /* disable auto-seeking */ if(success){ ags_navigation_set_seeking_sensitive(window->navigation, TRUE); } } /* free machine list */ g_list_free(machines_start); } void ags_export_window_stop_callback(AgsThread *thread, AgsExportWindow *export_window) { gtk_toggle_button_set_active(export_window->export, FALSE); } gsequencer-1.4.24/ags/X/ags_ladspa_browser_callbacks.c0000644000175000017500000001626613246707333017674 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_ladspa_browser_plugin_filename_callback(GtkComboBoxText *combo_box, AgsLadspaBrowser *ladspa_browser) { GtkComboBoxText *filename, *effect; AgsLadspaManager *ladspa_manager; GList *list; list = gtk_container_get_children(GTK_CONTAINER(ladspa_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model((GtkComboBox *) effect))); ladspa_manager = ags_ladspa_manager_get_instance(); list = ladspa_manager->ladspa_plugin; while((list = ags_base_plugin_find_filename(list, gtk_combo_box_text_get_active_text(filename))) != NULL){ if(AGS_BASE_PLUGIN(list->data)->effect != NULL) { gtk_combo_box_text_append_text(effect, AGS_BASE_PLUGIN(list->data)->effect); } list = list->next; } gtk_combo_box_set_active((GtkComboBox *) effect, 0); } void ags_ladspa_browser_plugin_effect_callback(GtkComboBoxText *combo_box, AgsLadspaBrowser *ladspa_browser) { GtkTable *table; GtkComboBoxText *filename, *effect; GtkLabel *label; AgsLadspaPlugin *ladspa_plugin; GList *list, *list_start, *child, *child_start; gchar *str, *tmp; guint port_count; guint y; unsigned long i; void *plugin_so; LADSPA_Descriptor_Function ladspa_descriptor; LADSPA_Descriptor *plugin_descriptor; LADSPA_PortDescriptor *port_descriptor; unsigned long plugin_index; /* retrieve filename and effect */ list_start = list = gtk_container_get_children(GTK_CONTAINER(ladspa_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data); g_list_free(list_start); /* update description */ list_start = list = gtk_container_get_children(GTK_CONTAINER(ladspa_browser->description)); ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), gtk_combo_box_text_get_active_text(filename), gtk_combo_box_text_get_active_text(effect)); if(ladspa_plugin != NULL){ plugin_so = AGS_BASE_PLUGIN(ladspa_plugin)->plugin_so; plugin_index = (unsigned long) AGS_BASE_PLUGIN(ladspa_plugin)->effect_index; } if(ladspa_plugin != NULL && plugin_index != -1 && plugin_so){ ladspa_descriptor = (LADSPA_Descriptor_Function) dlsym(plugin_so, "ladspa_descriptor"); if(dlerror() == NULL && ladspa_descriptor){ plugin_descriptor = ladspa_descriptor(plugin_index); port_descriptor = plugin_descriptor->PortDescriptors; /* update ui - reading plugin file */ label = GTK_LABEL(list->data); str = g_strconcat(i18n("Label"), ": ", plugin_descriptor->Label, NULL); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strconcat(i18n("Maker"), ": ", plugin_descriptor->Label, NULL); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strconcat(i18n("Copyright"), ": ", plugin_descriptor->Label, NULL); gtk_label_set_text(label, str); g_free(str); port_count = plugin_descriptor->PortCount; list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Ports")); gtk_label_set_text(label, str); g_free(str); list = list->next; table = GTK_TABLE(list->data); /* update ui - port information */ child_start = child = gtk_container_get_children(GTK_CONTAINER(table)); while(child != NULL){ gtk_widget_destroy(GTK_WIDGET(child->data)); child = child->next; } g_list_free(child_start); for(i = 0, y = 0; i < port_count; i++){ if(!(LADSPA_IS_PORT_CONTROL(port_descriptor[i]) && (LADSPA_IS_PORT_INPUT(port_descriptor[i]) || LADSPA_IS_PORT_OUTPUT(port_descriptor[i])))){ continue; } str = g_strdup(plugin_descriptor->PortNames[i]); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", str, NULL); gtk_table_attach_defaults(table, GTK_WIDGET(label), 0, 1, y, y + 1); if(LADSPA_IS_HINT_TOGGLED(plugin_descriptor->PortRangeHints[i].HintDescriptor)){ if(LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ gtk_table_attach_defaults(table, GTK_WIDGET(ags_ladspa_browser_combo_box_output_boolean_controls_new()), 1, 2, y, y + 1); }else{ gtk_table_attach_defaults(table, GTK_WIDGET(ags_ladspa_browser_combo_box_boolean_controls_new()), 1, 2, y, y + 1); } }else{ if(LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ gtk_table_attach_defaults(table, GTK_WIDGET(ags_ladspa_browser_combo_box_output_controls_new()), 1, 2, y, y + 1); }else{ gtk_table_attach_defaults(table, GTK_WIDGET(ags_ladspa_browser_combo_box_controls_new()), 1, 2, y, y + 1); } } y++; } gtk_widget_show_all((GtkWidget *) table); } }else{ /* update ui - empty */ label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Label")); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Maker")); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Copyright")); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Ports")); gtk_label_set_text(label, str); g_free(str); list = list->next; table = GTK_TABLE(list->data); /* update ui - no ports */ child_start = child = gtk_container_get_children(GTK_CONTAINER(table)); while(child != NULL){ gtk_widget_destroy(GTK_WIDGET(child->data)); child = child->next; } g_list_free(child_start); } g_list_free(list_start); } gsequencer-1.4.24/ags/X/ags_effect_pad_callbacks.c0000644000175000017500000000145613246707333016740 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/ags_ladspa_browser.c0000644000175000017500000003053313246707333015666 00000000000000/* 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 . */ #include #include #include #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #include #include #include #include #include #include #include #include void ags_ladspa_browser_class_init(AgsLadspaBrowserClass *ladspa_browser); void ags_ladspa_browser_init(AgsLadspaBrowser *ladspa_browser); void ags_ladspa_browser_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ladspa_browser_applicable_interface_init(AgsApplicableInterface *applicable); void ags_ladspa_browser_connect(AgsConnectable *connectable); void ags_ladspa_browser_disconnect(AgsConnectable *connectable); void ags_ladspa_browser_set_update(AgsApplicable *applicable, gboolean update); void ags_ladspa_browser_apply(AgsApplicable *applicable); void ags_ladspa_browser_reset(AgsApplicable *applicable); /** * SECTION:ags_ladspa_browser * @short_description: A composite to select ladspa effect. * @title: AgsLadspaBrowser * @section_id: * @include: ags/X/ags_ladspa_browser.h * * #AgsLadspaBrowser is a composite widget to select ladspa plugin and the desired * effect. */ GType ags_ladspa_browser_get_type(void) { static GType ags_type_ladspa_browser = 0; if(!ags_type_ladspa_browser){ static const GTypeInfo ags_ladspa_browser_info = { sizeof (AgsLadspaBrowserClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ladspa_browser_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLadspaBrowser), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ladspa_browser_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ladspa_browser_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_ladspa_browser_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ladspa_browser = g_type_register_static(GTK_TYPE_VBOX, "AgsLadspaBrowser", &ags_ladspa_browser_info, 0); g_type_add_interface_static(ags_type_ladspa_browser, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_ladspa_browser, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_ladspa_browser); } void ags_ladspa_browser_class_init(AgsLadspaBrowserClass *ladspa_browser) { /* empty */ } void ags_ladspa_browser_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_ladspa_browser_connect; connectable->disconnect = ags_ladspa_browser_disconnect; } void ags_ladspa_browser_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_ladspa_browser_set_update; applicable->apply = ags_ladspa_browser_apply; applicable->reset = ags_ladspa_browser_reset; } void ags_ladspa_browser_init(AgsLadspaBrowser *ladspa_browser) { GtkTable *table; GtkComboBoxText *combo_box; GtkLabel *label; GList *list; gchar **filenames, **filenames_start; /* plugin */ ladspa_browser->plugin = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(ladspa_browser), GTK_WIDGET(ladspa_browser->plugin), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("filename: ")); gtk_box_pack_start(GTK_BOX(ladspa_browser->plugin), GTK_WIDGET(label), FALSE, FALSE, 0); ladspa_browser->filename = combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(ladspa_browser->plugin), GTK_WIDGET(combo_box), FALSE, FALSE, 0); ladspa_browser->path = NULL; filenames = filenames_start = ags_ladspa_manager_get_filenames(ags_ladspa_manager_get_instance()); if(filenames_start != NULL){ while(*filenames != NULL){ gtk_combo_box_text_append_text(combo_box, *filenames); filenames++; } free(filenames_start); } label = (GtkLabel *) gtk_label_new(i18n("effect: ")); gtk_box_pack_start(GTK_BOX(ladspa_browser->plugin), GTK_WIDGET(label), FALSE, FALSE, 0); ladspa_browser->effect = combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(ladspa_browser->plugin), GTK_WIDGET(combo_box), FALSE, FALSE, 0); /* description */ ladspa_browser->description = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(ladspa_browser), GTK_WIDGET(ladspa_browser->description), FALSE, FALSE, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", i18n("Label: "), NULL); gtk_box_pack_start(GTK_BOX(ladspa_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", i18n("Maker: "), NULL); gtk_box_pack_start(GTK_BOX(ladspa_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", i18n("Copyright: "), NULL); gtk_box_pack_start(GTK_BOX(ladspa_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", i18n("Ports: "), NULL); gtk_box_pack_start(GTK_BOX(ladspa_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(256, 2, FALSE); gtk_box_pack_start(GTK_BOX(ladspa_browser->description), GTK_WIDGET(table), FALSE, FALSE, 0); } void ags_ladspa_browser_connect(AgsConnectable *connectable) { AgsLadspaBrowser *ladspa_browser; GList *list, *list_start; ladspa_browser = AGS_LADSPA_BROWSER(connectable); list_start = list = gtk_container_get_children(GTK_CONTAINER(ladspa_browser->plugin)); list = list->next; g_signal_connect_after(G_OBJECT(list->data), "changed", G_CALLBACK(ags_ladspa_browser_plugin_filename_callback), ladspa_browser); list = list->next->next; g_signal_connect_after(G_OBJECT(list->data), "changed", G_CALLBACK(ags_ladspa_browser_plugin_effect_callback), ladspa_browser); g_list_free(list_start); } void ags_ladspa_browser_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_ladspa_browser_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_ladspa_browser_apply(AgsApplicable *applicable) { /* empty */ } void ags_ladspa_browser_reset(AgsApplicable *applicable) { AgsLadspaBrowser *ladspa_browser; GtkComboBoxText *filename; GList *list; ladspa_browser = AGS_LADSPA_BROWSER(applicable); list = gtk_container_get_children(GTK_CONTAINER(ladspa_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); g_list_free(list); gtk_combo_box_set_active((GtkComboBox *) filename, 0); } /** * ags_ladspa_browser_get_plugin_filename: * @ladspa_browser: the #AgsLadspaBrowser * * Retrieve selected ladspa plugin filename. * * Returns: the active ladspa filename * * Since: 1.0.0 */ gchar* ags_ladspa_browser_get_plugin_filename(AgsLadspaBrowser *ladspa_browser) { GtkComboBoxText *filename; GList *list; list = gtk_container_get_children(GTK_CONTAINER(ladspa_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); g_list_free(list); return(gtk_combo_box_text_get_active_text(filename)); } /** * ags_ladspa_browser_get_plugin_effect: * @ladspa_browser: the #AgsLadspaBrowser * * Retrieve selected ladspa effect. * * Returns: the active ladspa effect * * Since: 1.0.0 */ gchar* ags_ladspa_browser_get_plugin_effect(AgsLadspaBrowser *ladspa_browser) { GtkComboBoxText *effect; AgsLadspaPlugin *ladspa_plugin; GList *list, *list_start; gchar *effect_name; void *plugin_so; LADSPA_Descriptor_Function ladspa_descriptor; LADSPA_Descriptor *plugin_descriptor; unsigned long index; /* retrieve filename and effect */ list_start = list = gtk_container_get_children(GTK_CONTAINER(ladspa_browser->plugin)); effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data); g_list_free(list_start); return(gtk_combo_box_text_get_active_text(effect)); } /** * ags_ladspa_browser_combo_box_output_boolean_controls_new: * * Creates a #GtkComboBox containing suitable widgets as controls. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkWidget* ags_ladspa_browser_combo_box_output_boolean_controls_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "led"); gtk_combo_box_set_active((GtkComboBox *) combo_box, 1); return((GtkWidget *) combo_box); } /** * ags_ladspa_browser_combo_box_controls_new: * * Creates a #GtkComboBox containing suitable widgets as controls. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkWidget* ags_ladspa_browser_combo_box_output_controls_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "vertical indicator"); gtk_combo_box_text_append_text(combo_box, "horizontal indicator"); gtk_combo_box_set_active((GtkComboBox *) combo_box, 1); return((GtkWidget *) combo_box); } /** * ags_ladspa_browser_combo_box_boolean_controls_new: * * Creates a #GtkComboBox containing suitable widgets as controls. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkWidget* ags_ladspa_browser_combo_box_boolean_controls_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "check-button"); gtk_combo_box_text_append_text(combo_box, "toggle button"); gtk_combo_box_set_active((GtkComboBox *) combo_box, 1); return((GtkWidget *) combo_box); } /** * ags_ladspa_browser_combo_box_controls_new: * * Creates a #GtkComboBox containing suitable widgets as controls. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkWidget* ags_ladspa_browser_combo_box_controls_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "spin button"); gtk_combo_box_text_append_text(combo_box, "dial"); gtk_combo_box_text_append_text(combo_box, "vertical scale"); gtk_combo_box_text_append_text(combo_box, "horizontal scale"); gtk_combo_box_set_active((GtkComboBox *) combo_box, 1); return((GtkWidget *) combo_box); } GtkWidget* ags_ladspa_browser_preview_new() { GtkWidget *preview; preview = NULL; //TODO:JK: implement me return(preview); } /** * ags_ladspa_browser_new: * * Creates an #AgsLadspaBrowser * * Returns: a new #AgsLadspaBrowser * * Since: 1.0.0 */ AgsLadspaBrowser* ags_ladspa_browser_new() { AgsLadspaBrowser *ladspa_browser; ladspa_browser = (AgsLadspaBrowser *) g_object_new(AGS_TYPE_LADSPA_BROWSER, "homogeneous", FALSE, "spacing", 0, NULL); return(ladspa_browser); } gsequencer-1.4.24/ags/X/ags_effect_bulk_callbacks.h0000644000175000017500000000324513247044247017133 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_EFFECT_BULK_CALLBACKS_H__ #define __AGS_EFFECT_BULK_CALLBACKS_H__ #include #include #include #include #include void ags_effect_bulk_add_callback(GtkWidget *button, AgsEffectBulk *effect_bulk); void ags_effect_bulk_remove_callback(GtkWidget *button, AgsEffectBulk *effect_bulk); void ags_effect_bulk_plugin_browser_response_callback(GtkDialog *dialog, gint response, AgsEffectBulk *effect_bulk); void ags_effect_bulk_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsEffectBulk *effect_bulk); void ags_effect_bulk_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsEffectBulk *effect_bulk); #endif /*__AGS_EFFECT_BULK_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_automation_editor_callbacks.h0000644000175000017500000000676113247044247020416 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUTOMATION_EDITOR_CALLBACKS_H__ #define __AGS_AUTOMATION_EDITOR_CALLBACKS_H__ #include #include #include #include #include #include gboolean ags_automation_editor_audio_edit_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsAutomationEditor *automation_editor); gboolean ags_automation_editor_audio_edit_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsAutomationEditor *automation_editor); gboolean ags_automation_editor_output_edit_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsAutomationEditor *automation_editor); gboolean ags_automation_editor_output_edit_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsAutomationEditor *automation_editor); gboolean ags_automation_editor_input_edit_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsAutomationEditor *automation_editor); gboolean ags_automation_editor_input_edit_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsAutomationEditor *automation_editor); void ags_automation_editor_audio_vscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor); void ags_automation_editor_audio_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor); void ags_automation_editor_output_vscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor); void ags_automation_editor_output_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor); void ags_automation_editor_input_vscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor); void ags_automation_editor_input_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor); void ags_automation_editor_audio_automation_edit_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor); void ags_automation_editor_output_automation_edit_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor); void ags_automation_editor_input_automation_edit_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor); void ags_automation_editor_machine_changed_callback(AgsMachineSelector *machine_selector, AgsMachine *machine, AgsAutomationEditor *automation_editor); void ags_automation_editor_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsAutomationEditor *automation_editor); void ags_automation_editor_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsAutomationEditor *automation_editor); #endif /*__AGS_AUTOMATION_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_menu_action_callbacks.h0000644000175000017500000000572413247044247017167 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MENU_ACTION_CALLBACKS_H__ #define __AGS_MENU_ACTION_CALLBACKS_H__ #include #include #include void ags_menu_action_open_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_save_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_save_as_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_export_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_quit_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_panel_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_mixer_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_drum_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_matrix_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_synth_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_syncsynth_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_ffplayer_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_audiorec_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_ladspa_bridge_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_dssi_bridge_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_lv2_bridge_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_live_dssi_bridge_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_add_live_lv2_bridge_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_automation_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_wave_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_preferences_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_midi_import_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_midi_export_track_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_midi_playback_callback(GtkWidget *menu_item, gpointer data); void ags_menu_action_about_callback(GtkWidget *menu_item, gpointer data); #endif /*__AGS_MENU_ACTION_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_line_callbacks.h0000644000175000017500000000256313247044247015613 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LINE_CALLBACKS_H__ #define __AGS_LINE_CALLBACKS_H__ #include #include #include #include int ags_line_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLine *line); void ags_line_remove_recall_callback(AgsRecall *recall, AgsLine *line); void ags_line_group_clicked_callback(GtkWidget *widget, AgsLine *line); /* AgsLine */ void ags_line_volume_callback(GtkRange *range, AgsLine *line); /* done */ void ags_line_done_callback(AgsLine *line, AgsRecallID *recall_id, gpointer data); #endif /*__AGS_LINE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_midi_preferences_callbacks.h0000644000175000017500000000260413246707333020164 00000000000000/* 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 . */ #ifndef __AGS_MIDI_PREFERENCES_CALLBACKS_H__ #define __AGS_MIDI_PREFERENCES_CALLBACKS_H__ #include #include #include #include #include int ags_midi_preferences_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsMidiPreferences *midi_preferences); void ags_midi_preferences_add_callback(GtkWidget *widget, AgsMidiPreferences *midi_preferences); void ags_midi_preferences_remove_sequencer_editor_callback(GtkWidget *sequencer_editor, AgsMidiPreferences *midi_preferences); #endif /*__AGS_MIDI_PREFERENCES_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_wave_window_callbacks.h0000644000175000017500000000172213247044247017211 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WAVE_WINDOW_CALLBACKS_H__ #define __AGS_WAVE_WINDOW_CALLBACKS_H__ #include #include #include #endif /*__AGS_WAVE_WINDOW_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_output_editor.h0000644000175000017500000000435613246707333015576 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OUTPUT_EDITOR_H__ #define __AGS_OUTPUT_EDITOR_H__ #include #include #include #define AGS_TYPE_OUTPUT_EDITOR (ags_output_editor_get_type()) #define AGS_OUTPUT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_OUTPUT_EDITOR, AgsOutputEditor)) #define AGS_OUTPUT_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_OUTPUT_EDITOR, AgsOutputEditorClass)) #define AGS_IS_OUTPUT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_OUTPUT_EDITOR)) #define AGS_IS_OUTPUT_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_OUTPUT_EDITOR)) #define AGS_OUTPUT_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_OUTPUT_EDITOR, AgsOutputEditorClass)) #define AGS_OUTPUT_EDITOR_DEFAULT_VERSION "0.7.131\0" #define AGS_OUTPUT_EDITOR_DEFAULT_BUILD_ID "CEST 2017 18-02-2014 04:53\0" typedef struct _AgsOutputEditor AgsOutputEditor; typedef struct _AgsOutputEditorClass AgsOutputEditorClass; typedef enum{ AGS_OUTPUT_EDITOR_CONNECTED = 1, }AgsOutputEditorFlags; struct _AgsOutputEditor { GtkHBox hbox; guint flags; gchar *version; gchar *build_id; GtkComboBoxText *soundcard; GtkSpinButton *audio_channel; }; struct _AgsOutputEditorClass { GtkHBoxClass hbox; }; GType ags_output_editor_get_type(void); void ags_output_editor_check(AgsOutputEditor *output_editor); AgsOutputEditor* ags_output_editor_new(); #endif /*__AGS_OUTPUT_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_menu_bar.h0000644000175000017500000000475413256163135014457 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MENU_BAR_H__ #define __AGS_MENU_BAR_H__ #include #include #include #define AGS_TYPE_MENU_BAR (ags_menu_bar_get_type ()) #define AGS_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MENU_BAR, AgsMenuBar)) #define AGS_MENU_BAR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MENU_BAR, AgsMenuBarClass)) #define AGS_IS_MENU_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MENU_BAR)) #define AGS_IS_MENU_BAR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MENU_BAR)) #define AGS_MENU_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_MENU_BAR, AgsMenuBarClass)) #define AGS_MENU_ITEM_FILENAME_KEY "ags-menu-bar-filename-key" #define AGS_MENU_ITEM_EFFECT_KEY "ags-menu-bar-effect-key" typedef struct _AgsMenuBar AgsMenuBar; typedef struct _AgsMenuBarClass AgsMenuBarClass; typedef enum{ AGS_MENU_BAR_CONNECTED = 1, }; struct _AgsMenuBar { GtkMenuBar menu_bar; guint flags; GtkMenu *file; GtkMenu *edit; GtkMenu *add; GtkMenuItem *ladspa; GtkMenuItem *dssi; GtkMenuItem *lv2; GtkMenuItem *live_dssi; GtkMenuItem *live_lv2; GtkMenu *live; GtkMenu *midi; GtkMenu *help; }; struct _AgsMenuBarClass { GtkMenuBarClass menu_bar; }; GType ags_menu_bar_get_type(void); GtkMenu* ags_zoom_menu_new(); GtkMenu* ags_tact_menu_new(); GtkComboBox* ags_zoom_combo_box_new(); GtkComboBox* ags_tact_combo_box_new(); GtkMenu* ags_ladspa_bridge_menu_new(); GtkMenu* ags_dssi_bridge_menu_new(); GtkMenu* ags_lv2_bridge_menu_new(); GtkMenu* ags_live_dssi_bridge_menu_new(); GtkMenu* ags_live_lv2_bridge_menu_new(); AgsMenuBar* ags_menu_bar_new(); #endif /*__AGS_MENU_BAR_H__*/ gsequencer-1.4.24/ags/X/ags_property_editor_callbacks.c0000644000175000017500000000212713246707333020106 00000000000000/* 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 . */ #include void ags_property_editor_enable_callback(GtkToggleButton *toggle, AgsPropertyEditor *property_editor) { if(gtk_toggle_button_get_active(toggle)){ property_editor->flags |= AGS_PROPERTY_EDITOR_ENABLED; }else{ property_editor->flags &= (~AGS_PROPERTY_EDITOR_ENABLED); } } gsequencer-1.4.24/ags/X/ags_property_collection_editor.h0000644000175000017500000000502413246707333020326 00000000000000/* 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 . */ #ifndef __AGS_PROPERTY_COLLECTION_EDITOR_H__ #define __AGS_PROPERTY_COLLECTION_EDITOR_H__ #include #include #include #include #include #define AGS_TYPE_PROPERTY_COLLECTION_EDITOR (ags_property_collection_editor_get_type()) #define AGS_PROPERTY_COLLECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PROPERTY_COLLECTION_EDITOR, AgsPropertyCollectionEditor)) #define AGS_PROPERTY_COLLECTION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PROPERTY_COLLECTION_EDITOR, AgsPropertyCollectionEditorClass)) #define AGS_IS_PROPERTY_COLLECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PROPERTY_COLLECTION_EDITOR)) #define AGS_IS_PROPERTY_COLLECTION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PROPERTY_COLLECTION_EDITOR)) #define AGS_PROPERTY_COLLECTION_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PROPERTY_COLLECTION_EDITOR, AgsPropertyCollectionEditorClass)) typedef struct _AgsPropertyCollectionEditor AgsPropertyCollectionEditor; typedef struct _AgsPropertyCollectionEditorClass AgsPropertyCollectionEditorClass; struct _AgsPropertyCollectionEditor { AgsPropertyEditor property_editor; guint flags; GType child_type; guint child_parameter_count; GParameter *child_parameter; GtkVBox *child; GtkButton *add_collection; }; struct _AgsPropertyCollectionEditorClass { AgsPropertyEditorClass property_editor; }; GType ags_property_collection_editor_get_type(); AgsPropertyCollectionEditor* ags_property_collection_editor_new(GType child_type, guint child_parameter_count, GParameter *child_parameter); #endif /*__AGS_PROPERTY_COLLECTION_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_preferences_callbacks.c0000644000175000017500000000430413246707333017154 00000000000000/* 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 . */ #include #include #include void ags_preferences_response_callback(GtkDialog *dialog, gint response_id, gpointer user_data) { gboolean apply; apply = FALSE; switch(response_id){ case GTK_RESPONSE_APPLY: { apply = TRUE; } case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(dialog)); if(apply){ ags_applicable_reset(AGS_APPLICABLE(dialog)); break; } } case GTK_RESPONSE_CANCEL: { AGS_PREFERENCES(dialog)->flags |= AGS_PREFERENCES_SHUTDOWN; AGS_WINDOW(AGS_PREFERENCES(dialog)->window)->preferences = NULL; gtk_widget_destroy(GTK_WIDGET(dialog)); } } } void ags_preferences_notebook_switch_page_callback(GtkNotebook *notebook, gpointer page, guint page_n, AgsPreferences *preferences) { GList *list, *list_start; list_start = list = gtk_container_get_children((GtkContainer *) GTK_DIALOG(preferences)->action_area); list = g_list_nth(list, 3); while(list != NULL){ gtk_widget_hide(list->data); list = list->next; } g_list_free(list_start); if(page_n == 1){ gtk_widget_show((GtkWidget *) preferences->audio_preferences->connect_sink); gtk_widget_show((GtkWidget *) preferences->audio_preferences->add); }else if(page_n == 2){ gtk_widget_show((GtkWidget *) preferences->midi_preferences->add); } } gsequencer-1.4.24/ags/X/ags_navigation_callbacks.c0000644000175000017500000003376713247044247017030 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_navigation_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, gpointer data) { AgsWindow *window; AgsNavigation *navigation; if(old_parent != NULL) return; window = AGS_WINDOW(gtk_widget_get_ancestor(widget, AGS_TYPE_WINDOW)); navigation = AGS_NAVIGATION(widget); navigation->soundcard = window->soundcard; } void ags_navigation_expander_callback(GtkWidget *widget, AgsNavigation *navigation) { GtkArrow *arrow; GList *list; list = gtk_container_get_children((GtkContainer *) widget); arrow = (GtkArrow *) list->data; g_list_free(list); list = gtk_container_get_children((GtkContainer *) navigation); widget = (GtkWidget *) list->next->data; g_list_free(list); if(arrow->arrow_type == GTK_ARROW_DOWN){ gtk_widget_hide_all(widget); arrow->arrow_type = GTK_ARROW_RIGHT; }else{ gtk_widget_show_all(widget); arrow->arrow_type = GTK_ARROW_DOWN; } } void ags_navigation_bpm_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; AgsApplyBpm *apply_bpm; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; window = AGS_WINDOW(gtk_widget_get_ancestor(widget, AGS_TYPE_WINDOW)); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); gui_thread = (AgsThread *) ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); /* get task thread */ apply_bpm = ags_apply_bpm_new(window->soundcard, navigation->bpm->adjustment->value); ags_gui_thread_schedule_task(gui_thread, apply_bpm); } void ags_navigation_rewind_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; gdouble tact; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); tact = ags_soundcard_get_note_offset(AGS_SOUNDCARD(window->soundcard)) / 16.0; gtk_spin_button_set_value(navigation->position_tact, tact + (-1.0 * AGS_NAVIGATION_DEFAULT_TACT_STEP)); } void ags_navigation_prev_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; gdouble tact; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); tact = ags_soundcard_get_note_offset(AGS_SOUNDCARD(window->soundcard)) / 16.0; gtk_spin_button_set_value(navigation->position_tact, tact + (-1.0 * AGS_NAVIGATION_REWIND_STEPS)); } void ags_navigation_play_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; AgsMachine *machine; GList *machines, *machines_start; gboolean initialized_time; if((AGS_NAVIGATION_BLOCK_PLAY & (navigation->flags)) != 0){ return; } window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); machines_start = machines = gtk_container_get_children(GTK_CONTAINER(window->machines)); initialized_time = FALSE; while(machines != NULL){ machine = AGS_MACHINE(machines->data); if(((AGS_MACHINE_IS_SEQUENCER & (machine->flags)) != 0) || (AGS_MACHINE_IS_SYNTHESIZER & (machine->flags)) != 0){ #ifdef AGS_DEBUG g_message("found machine to play!\n"); #endif if(!initialized_time){ initialized_time = TRUE; navigation->start_tact = ags_soundcard_get_note_offset(AGS_SOUNDCARD(window->soundcard)); } ags_machine_set_run_extended(machine, TRUE, !gtk_toggle_button_get_active((GtkToggleButton *) navigation->exclude_sequencer), TRUE); } machines = machines->next; } g_list_free(machines_start); } void ags_navigation_stop_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; AgsMachine *machine; GList *machines,*machines_start; gchar *timestr; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); machines_start = machines = gtk_container_get_children(GTK_CONTAINER(window->machines)); while(machines != NULL){ machine = AGS_MACHINE(machines->data); if((AGS_MACHINE_IS_SEQUENCER & (machine->flags)) != 0 || (AGS_MACHINE_IS_SYNTHESIZER & (machine->flags)) != 0){ #ifdef AGS_DEBUG g_message("found machine to stop!"); #endif ags_machine_set_run_extended(machine, FALSE, !gtk_toggle_button_get_active((GtkToggleButton *) navigation->exclude_sequencer), TRUE); } machines = machines->next; } g_list_free(machines_start); /* toggle play button */ navigation->flags |= AGS_NAVIGATION_BLOCK_PLAY; gtk_toggle_button_set_active(navigation->play, FALSE); navigation->flags &= (~AGS_NAVIGATION_BLOCK_PLAY); navigation->start_tact = 0.0; timestr = ags_time_get_uptime_from_offset(0.0, navigation->bpm->adjustment->value, ags_soundcard_get_delay(AGS_SOUNDCARD(window->soundcard)), ags_soundcard_get_delay_factor(AGS_SOUNDCARD(window->soundcard))); gtk_label_set_text(navigation->duration_time, timestr); g_free(timestr); ags_soundcard_set_note_offset(AGS_SOUNDCARD(window->soundcard), 0); } void ags_navigation_next_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; gdouble tact; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); tact = ags_soundcard_get_note_offset(AGS_SOUNDCARD(window->soundcard)) / 16.0; gtk_spin_button_set_value(navigation->position_tact, tact + AGS_NAVIGATION_REWIND_STEPS); } void ags_navigation_forward_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; gdouble tact; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); tact = ags_soundcard_get_note_offset(AGS_SOUNDCARD(window->soundcard)) / 16.0; gtk_spin_button_set_value(navigation->position_tact, tact + AGS_NAVIGATION_DEFAULT_TACT_STEP); } void ags_navigation_loop_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsRecall *recall; AgsMutexManager *mutex_manager; GList *machines, *machines_start; GList *list, *list_start; guint loop_left, loop_right; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; GValue do_loop_value = {0,}; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); machines_start = machines = gtk_container_get_children(GTK_CONTAINER(window->machines)); loop_left = 16 * navigation->loop_left_tact->adjustment->value; loop_right = 16 * navigation->loop_right_tact->adjustment->value; ags_soundcard_set_loop(AGS_SOUNDCARD(window->soundcard), loop_left, loop_right, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); g_value_init(&do_loop_value, G_TYPE_BOOLEAN); g_value_set_boolean(&do_loop_value, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); while(machines != NULL){ machine = AGS_MACHINE(machines->data); if((AGS_MACHINE_IS_SEQUENCER & (machine->flags)) !=0 || (AGS_MACHINE_IS_SYNTHESIZER & (machine->flags)) != 0){ #ifdef AGS_DEBUG g_message("found machine to loop!\n"); #endif audio = machine->audio; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* do it so */ pthread_mutex_lock(audio_mutex); list = audio->play; while((list = ags_recall_find_type(list, AGS_TYPE_COUNT_BEATS_AUDIO)) != NULL){ recall = AGS_RECALL(list->data); ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(recall)->notation_loop, &do_loop_value); list = list->next; } pthread_mutex_unlock(audio_mutex); } machines = machines->next; } g_list_free(machines_start); /* enable fader */ //TODO:JK: implement me } void ags_navigation_position_tact_callback(GtkWidget *widget, AgsNavigation *navigation) { ags_navigation_change_position(navigation, gtk_spin_button_get_value((GtkSpinButton *) widget)); } void ags_navigation_duration_tact_callback(GtkWidget *widget, AgsNavigation *navigation) { /* empty */ } void ags_navigation_loop_left_tact_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsRecall *recall; AgsMutexManager *mutex_manager; GList *machines, *machines_start; GList *list; // find AgsPlayNotationAudio and AgsCopyPatternAudio guint loop_left, loop_right; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; GValue value = {0,}; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); machines_start = machines = gtk_container_get_children(GTK_CONTAINER(window->machines)); loop_left = 16 * navigation->loop_left_tact->adjustment->value; loop_right = 16 * navigation->loop_right_tact->adjustment->value; ags_soundcard_set_loop(AGS_SOUNDCARD(window->soundcard), loop_left, loop_right, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(navigation->loop))); g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, loop_left); while(machines != NULL){ machine = AGS_MACHINE(machines->data); if((AGS_MACHINE_IS_SEQUENCER & (machine->flags)) != 0 || (AGS_MACHINE_IS_SYNTHESIZER & (machine->flags)) != 0){ #ifdef AGS_DEBUG g_message("found machine to loop!\n"); #endif audio = machine->audio; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* do it so */ pthread_mutex_lock(audio_mutex); list = audio->play; while((list = ags_recall_find_type(list, AGS_TYPE_COUNT_BEATS_AUDIO)) != NULL){ recall = AGS_RECALL(list->data); ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(recall)->notation_loop_start, &value); list = list->next; } pthread_mutex_unlock(audio_mutex); } machines = machines->next; } g_list_free(machines_start); } void ags_navigation_loop_right_tact_callback(GtkWidget *widget, AgsNavigation *navigation) { AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsRecall *recall; AgsMutexManager *mutex_manager; GList *machines, *machines_start; GList *list; // find AgsPlayNotationAudio and AgsCopyPatternAudio guint loop_left, loop_right; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; GValue value = {0,}; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); machines_start = machines = gtk_container_get_children(GTK_CONTAINER(window->machines)); loop_left = 16 * navigation->loop_left_tact->adjustment->value; loop_right = 16 * navigation->loop_right_tact->adjustment->value; ags_soundcard_set_loop(AGS_SOUNDCARD(window->soundcard), loop_left, loop_right, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(navigation->loop))); g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, loop_right); while(machines != NULL){ machine = AGS_MACHINE(machines->data); if((AGS_MACHINE_IS_SEQUENCER & (machine->flags)) != 0 || (AGS_MACHINE_IS_SYNTHESIZER & (machine->flags)) != 0){ #ifdef AGS_DEBUG g_message("found machine to loop!\n"); #endif audio = machine->audio; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* do it so */ pthread_mutex_lock(audio_mutex); list = audio->play; while((list = ags_recall_find_type(list, AGS_TYPE_COUNT_BEATS_AUDIO)) != NULL){ recall = AGS_RECALL(list->data); ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(recall)->notation_loop_end, &value); list = list->next; } pthread_mutex_unlock(audio_mutex); } machines = machines->next; } g_list_free(machines_start); } void ags_navigation_soundcard_stop_callback(GObject *soundcard, AgsNavigation *navigation) { navigation->flags |= AGS_NAVIGATION_BLOCK_TIC; } gsequencer-1.4.24/ags/X/ags_line_member_editor.h0000644000175000017500000000435713246707333016515 00000000000000/* 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 . */ #ifndef __AGS_LINE_MEMBER_EDITOR_H__ #define __AGS_LINE_MEMBER_EDITOR_H__ #include #include #include #include #define AGS_TYPE_LINE_MEMBER_EDITOR (ags_line_member_editor_get_type()) #define AGS_LINE_MEMBER_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LINE_MEMBER_EDITOR, AgsLineMemberEditor)) #define AGS_LINE_MEMBER_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LINE_MEMBER_EDITOR, AgsLineMemberEditorClass)) #define AGS_IS_LINE_MEMBER_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LINE_MEMBER_EDITOR)) #define AGS_IS_LINE_MEMBER_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LINE_MEMBER_EDITOR)) #define AGS_LINE_MEMBER_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LINE_MEMBER_EDITOR, AgsLineMemberEditorClass)) typedef struct _AgsLineMemberEditor AgsLineMemberEditor; typedef struct _AgsLineMemberEditorClass AgsLineMemberEditorClass; typedef enum{ AGS_LINE_MEMBER_EDITOR_CONNECTED = 1, }AgsLineMemberEditorFlags; struct _AgsLineMemberEditor { GtkVBox vbox; guint flags; GtkVBox *line_member; GtkButton *add; GtkMenu *popup; GtkButton *remove; AgsPluginBrowser *plugin_browser; }; struct _AgsLineMemberEditorClass { GtkVBoxClass vbox; }; GType ags_line_member_editor_get_type(void); AgsLineMemberEditor* ags_line_member_editor_new(); #endif /*__AGS_LINE_MEMBER_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_output_editor_callbacks.h0000644000175000017500000000231113246707333017562 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OUTPUT_EDITOR_CALLBACKS_H__ #define __AGS_OUTPUT_EDITOR_CALLBACKS_H__ #include #include #include #include int ags_output_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsOutputEditor *output_editor); void ags_output_editor_soundcard_callback(GtkComboBoxText *combo_box, AgsOutputEditor *output_editor); #endif /*__AGS_OUTPUT_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_server_preferences.c0000644000175000017500000002114113246707333016541 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_server_preferences_class_init(AgsServerPreferencesClass *server_preferences); void ags_server_preferences_connectable_interface_init(AgsConnectableInterface *connectable); void ags_server_preferences_applicable_interface_init(AgsApplicableInterface *applicable); void ags_server_preferences_init(AgsServerPreferences *server_preferences); void ags_server_preferences_connect(AgsConnectable *connectable); void ags_server_preferences_disconnect(AgsConnectable *connectable); void ags_server_preferences_set_update(AgsApplicable *applicable, gboolean update); void ags_server_preferences_apply(AgsApplicable *applicable); void ags_server_preferences_reset(AgsApplicable *applicable); static void ags_server_preferences_finalize(GObject *gobject); void ags_server_preferences_show(GtkWidget *widget); /** * SECTION:ags_server_preferences * @short_description: A composite widget to do server related preferences * @title: AgsServerPreferences * @section_id: * @include: ags/X/ags_server_preferences.h * * #AgsServerPreferences enables you to make server related preferences. */ static gpointer ags_server_preferences_parent_class = NULL; GType ags_server_preferences_get_type(void) { static GType ags_type_server_preferences = 0; if(!ags_type_server_preferences){ static const GTypeInfo ags_server_preferences_info = { sizeof (AgsServerPreferencesClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_server_preferences_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsServerPreferences), 0, /* n_preallocs */ (GInstanceInitFunc) ags_server_preferences_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_server_preferences_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_server_preferences_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_server_preferences = g_type_register_static(GTK_TYPE_VBOX, "AgsServerPreferences", &ags_server_preferences_info, 0); g_type_add_interface_static(ags_type_server_preferences, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_server_preferences, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_server_preferences); } void ags_server_preferences_class_init(AgsServerPreferencesClass *server_preferences) { GObjectClass *gobject; GtkWidgetClass *widget; ags_server_preferences_parent_class = g_type_class_peek_parent(server_preferences); /* GtkObjectClass */ gobject = (GObjectClass *) server_preferences; gobject->finalize = ags_server_preferences_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) server_preferences; widget->show = ags_server_preferences_show; } void ags_server_preferences_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_server_preferences_connect; connectable->disconnect = ags_server_preferences_disconnect; } void ags_server_preferences_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_server_preferences_set_update; applicable->apply = ags_server_preferences_apply; applicable->reset = ags_server_preferences_reset; } void ags_server_preferences_init(AgsServerPreferences *server_preferences) { GtkTable *table; GtkLabel *label; table = (GtkTable *) gtk_table_new(2, 5, FALSE); gtk_box_pack_start(GTK_BOX(server_preferences), GTK_WIDGET(table), FALSE, FALSE, 2); server_preferences->start = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("start server")); gtk_table_attach(table, GTK_WIDGET(server_preferences->start), 0, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_set_sensitive((GtkWidget *) server_preferences->start, FALSE); /* address */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("address"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); server_preferences->address = (GtkEntry *) gtk_entry_new(); gtk_table_attach(table, GTK_WIDGET(server_preferences->address), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_set_sensitive((GtkWidget *) server_preferences->address, FALSE); /* port */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("port"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); server_preferences->port = (GtkEntry *) gtk_entry_new(); gtk_table_attach(table, GTK_WIDGET(server_preferences->port), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_set_sensitive((GtkWidget *) server_preferences->port, FALSE); /* username */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("username"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0); server_preferences->username = (GtkEntry *) gtk_entry_new(); gtk_table_attach(table, GTK_WIDGET(server_preferences->username), 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_set_sensitive((GtkWidget *) server_preferences->username, FALSE); /* password */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("password"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0); server_preferences->password = (GtkEntry *) gtk_entry_new(); gtk_entry_set_visibility(server_preferences->password, FALSE); gtk_table_attach(table, GTK_WIDGET(server_preferences->password), 1, 2, 4, 5, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_set_sensitive((GtkWidget *) server_preferences->password, FALSE); } void ags_server_preferences_connect(AgsConnectable *connectable) { AgsServerPreferences *server_preferences; server_preferences = AGS_SERVER_PREFERENCES(connectable); } void ags_server_preferences_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_server_preferences_set_update(AgsApplicable *applicable, gboolean update) { //TODO:JK: implement me } void ags_server_preferences_apply(AgsApplicable *applicable) { //TODO:JK: implement me } void ags_server_preferences_reset(AgsApplicable *applicable) { //TODO:JK: implement me } static void ags_server_preferences_finalize(GObject *gobject) { } void ags_server_preferences_show(GtkWidget *widget) { AgsServerPreferences *server_preferences; pthread_t thread; server_preferences = AGS_SERVER_PREFERENCES(widget); GTK_WIDGET_CLASS(ags_server_preferences_parent_class)->show(widget); } /** * ags_server_preferences_new: * * Creates an #AgsServerPreferences * * Returns: a new #AgsServerPreferences * * Since: 1.0.0 */ AgsServerPreferences* ags_server_preferences_new() { AgsServerPreferences *server_preferences; server_preferences = (AgsServerPreferences *) g_object_new(AGS_TYPE_SERVER_PREFERENCES, NULL); return(server_preferences); } gsequencer-1.4.24/ags/X/ags_property_editor.h0000644000175000017500000000416713246707333016122 00000000000000/* 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 . */ #ifndef __AGS_PROPERTY_EDITOR_H__ #define __AGS_PROPERTY_EDITOR_H__ #include #include #include #define AGS_TYPE_PROPERTY_EDITOR (ags_property_editor_get_type()) #define AGS_PROPERTY_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PROPERTY_EDITOR, AgsPropertyEditor)) #define AGS_PROPERTY_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PROPERTY_EDITOR, AgsPropertyEditorClass)) #define AGS_IS_PROPERTY_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PROPERTY_EDITOR)) #define AGS_IS_PROPERTY_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PROPERTY_EDITOR)) #define AGS_PROPERTY_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PROPERTY_EDITOR, AgsPropertyEditorClass)) typedef struct _AgsPropertyEditor AgsPropertyEditor; typedef struct _AgsPropertyEditorClass AgsPropertyEditorClass; typedef enum{ AGS_PROPERTY_EDITOR_CONNECTED = 1, AGS_PROPERTY_EDITOR_ENABLED = 1 << 1, }AgsPropertyEditorFlags; struct _AgsPropertyEditor { GtkVBox vbox; guint flags; GtkCheckButton *enabled; }; struct _AgsPropertyEditorClass { GtkVBoxClass vbox; void (*apply)(AgsPropertyEditor *property_editor); }; GType ags_property_editor_get_type(); AgsPropertyEditor* ags_property_editor_new(); #endif /*__AGS_PROPERTY_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_output_editor.c0000644000175000017500000003021013247044247015554 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_output_editor_class_init(AgsOutputEditorClass *output_editor); void ags_output_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_output_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_output_editor_init(AgsOutputEditor *output_editor); void ags_output_editor_connect(AgsConnectable *connectable); void ags_output_editor_disconnect(AgsConnectable *connectable); void ags_output_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_output_editor_apply(AgsApplicable *applicable); void ags_output_editor_reset(AgsApplicable *applicable); /** * SECTION:ags_output_editor * @short_description: A composite widget to edit #AgsChannel * @title: AgsOutputEditor * @section_id: * @include: ags/X/ags_output_editor.h * * #AgsOutputEditor is a composite widget to edit #AgsChannel. */ static gpointer ags_output_editor_parent_class = NULL; GType ags_output_editor_get_type(void) { static GType ags_type_output_editor = 0; if(!ags_type_output_editor){ static const GTypeInfo ags_output_editor_info = { sizeof (AgsOutputEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_output_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsOutputEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_output_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_output_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_output_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_output_editor = g_type_register_static(GTK_TYPE_HBOX, "AgsOutputEditor", &ags_output_editor_info, 0); g_type_add_interface_static(ags_type_output_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_output_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_output_editor); } void ags_output_editor_class_init(AgsOutputEditorClass *output_editor) { ags_output_editor_parent_class = g_type_class_peek_parent(output_editor); } void ags_output_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_output_editor_connect; connectable->disconnect = ags_output_editor_disconnect; } void ags_output_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_output_editor_set_update; applicable->apply = ags_output_editor_apply; applicable->reset = ags_output_editor_reset; } void ags_output_editor_init(AgsOutputEditor *output_editor) { g_signal_connect_after((GObject *) output_editor, "parent_set", G_CALLBACK(ags_output_editor_parent_set_callback), (gpointer) output_editor); output_editor->flags = 0; output_editor->version = AGS_OUTPUT_EDITOR_DEFAULT_VERSION; output_editor->build_id = AGS_OUTPUT_EDITOR_DEFAULT_BUILD_ID; /* connecting soundcard */ output_editor->soundcard = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(output_editor), GTK_WIDGET(output_editor->soundcard), FALSE, FALSE, 0); /* connect with line */ output_editor->audio_channel = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 0.0, 1.0); gtk_box_pack_start(GTK_BOX(output_editor), GTK_WIDGET(output_editor->audio_channel), FALSE, FALSE, 0); } void ags_output_editor_connect(AgsConnectable *connectable) { AgsOutputEditor *output_editor; output_editor = AGS_OUTPUT_EDITOR(connectable); if((AGS_OUTPUT_EDITOR_CONNECTED & (output_editor->flags)) != 0){ return; } output_editor->flags |= AGS_OUTPUT_EDITOR_CONNECTED; g_signal_connect(G_OBJECT(output_editor->soundcard), "changed", G_CALLBACK(ags_output_editor_soundcard_callback), output_editor); } void ags_output_editor_disconnect(AgsConnectable *connectable) { AgsOutputEditor *output_editor; output_editor = AGS_OUTPUT_EDITOR(connectable); if((AGS_OUTPUT_EDITOR_CONNECTED & (output_editor->flags)) == 0){ return; } output_editor->flags &= (~AGS_OUTPUT_EDITOR_CONNECTED); g_object_disconnect(G_OBJECT(output_editor->soundcard), "any_signal::changed", G_CALLBACK(ags_output_editor_soundcard_callback), output_editor, NULL); } void ags_output_editor_set_update(AgsApplicable *applicable, gboolean update) { //TODO:JK: implement me } void ags_output_editor_apply(AgsApplicable *applicable) { AgsOutputEditor *output_editor; AgsLineEditor *line_editor; GtkTreeIter iter; output_editor = AGS_OUTPUT_EDITOR(applicable); if(gtk_combo_box_get_active_iter(GTK_COMBO_BOX(output_editor->soundcard), &iter)){ AgsWindow *window; AgsMachine *machine; AgsConnectionEditor *connection_editor; AgsAudio *audio; AgsChannel *channel; AgsResetAudioConnection *reset_audio_connection; AgsMutexManager *mutex_manager; AgsAudioLoop *audio_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GObject *soundcard; GtkTreeModel *model; guint soundcard_channel; guint pad, audio_channel; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; connection_editor = AGS_CONNECTION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(output_editor), AGS_TYPE_CONNECTION_EDITOR)); line_editor = AGS_LINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(output_editor), AGS_TYPE_LINE_EDITOR)); machine = connection_editor->machine; audio = machine->audio; channel = line_editor->channel; /* get window and application_context */ window = (AgsWindow *) gtk_widget_get_toplevel(GTK_WIDGET(machine)); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); audio_loop = (AgsAudioLoop *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, channel); pthread_mutex_unlock(application_mutex); /* get audio fields */ pthread_mutex_lock(channel_mutex); pad = channel->pad; audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) audio_loop, AGS_TYPE_GUI_THREAD); /* get mapping and soundcard */ soundcard_channel = (guint) gtk_spin_button_get_value_as_int(output_editor->audio_channel); model = gtk_combo_box_get_model(GTK_COMBO_BOX(output_editor->soundcard)); gtk_tree_model_get(model, &iter, 1, &soundcard, -1); /* create task */ reset_audio_connection = ags_reset_audio_connection_new(soundcard, audio, G_OBJECT_TYPE(channel), pad, audio_channel, soundcard_channel); ags_gui_thread_schedule_task(gui_thread, reset_audio_connection); } } void ags_output_editor_reset(AgsApplicable *applicable) { AgsOutputEditor *output_editor; GtkTreeModel *model; GtkTreeIter iter; output_editor = AGS_OUTPUT_EDITOR(applicable); model = gtk_combo_box_get_model(output_editor->soundcard); if(gtk_tree_model_get_iter_first(model, &iter)){ AgsLineEditor *line_editor; AgsAudio *audio; AgsAudioConnection *audio_connection; AgsChannel *channel; GObject *soundcard, *current; GList *list; gint i; gboolean found; line_editor = AGS_LINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(output_editor), AGS_TYPE_LINE_EDITOR)); soundcard = NULL; audio = NULL; channel = line_editor->channel; if(channel != NULL){ soundcard = channel->soundcard; audio = AGS_AUDIO(channel->audio); } i = 0; found = FALSE; if(soundcard != NULL){ do{ gtk_tree_model_get(model, &iter, 1, ¤t, -1); if(soundcard == current){ found = TRUE; break; } i++; }while(gtk_tree_model_iter_next(model, &iter)); } if(found && audio != NULL){ /* set channel link */ gtk_combo_box_set_active(output_editor->soundcard, i); /* */ audio_connection = NULL; list = audio->audio_connection; while((list = ags_audio_connection_find(list, AGS_TYPE_INPUT, channel->pad, channel->audio_channel)) != NULL){ GObject *data_object; g_object_get(G_OBJECT(list->data), "data-object", &data_object, NULL); if(AGS_IS_SOUNDCARD(data_object)){ audio_connection = list->data; break; } list = list->next; } if(audio_connection != NULL){ gtk_spin_button_set_value(output_editor->audio_channel, audio_connection->mapped_line); }else{ gtk_spin_button_set_value(output_editor->audio_channel, 0); } }else{ gtk_combo_box_set_active(output_editor->soundcard, 0); } } } /** * ags_output_editor_check: * @output_editor: the #AgsOutputEditor * * Checks for possible channels to output. And modifies its ranges. * * Since: 1.0.0 */ void ags_output_editor_check(AgsOutputEditor *output_editor) { AgsConnectionEditor *connection_editor; AgsLineEditor *line_editor; GtkTreeIter iter; connection_editor = AGS_CONNECTION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(output_editor), AGS_TYPE_CONNECTION_EDITOR)); line_editor = AGS_LINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(output_editor), AGS_TYPE_LINE_EDITOR)); if(gtk_combo_box_get_active_iter(GTK_COMBO_BOX(output_editor->soundcard), &iter)){ GObject *soundcard; GtkTreeModel *model; guint audio_channels; /* soundcard connection */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(output_editor->soundcard)); gtk_tree_model_get(model, &iter, 1, &soundcard, -1); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), &audio_channels, NULL, NULL, NULL); gtk_spin_button_set_range(output_editor->audio_channel, 0.0, audio_channels - 1.0); }else{ gtk_spin_button_set_range(output_editor->audio_channel, -1.0, -1.0); } } /** * ags_output_editor_new: * * Creates an #AgsOutputEditor * * Returns: a new #AgsOutputEditor * * Since: 1.0.0 */ AgsOutputEditor* ags_output_editor_new() { AgsOutputEditor *output_editor; output_editor = (AgsOutputEditor *) g_object_new(AGS_TYPE_OUTPUT_EDITOR, NULL); return(output_editor); } gsequencer-1.4.24/ags/X/ags_automation_window_callbacks.h0000644000175000017500000000175113247044247020431 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUTOMATION_WINDOW_CALLBACKS_H__ #define __AGS_AUTOMATION_WINDOW_CALLBACKS_H__ #include #include #include #endif /*__AGS_AUTOMATION_WINDOW_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_output_collection_editor.h0000644000175000017500000000461113246707333020003 00000000000000/* 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 . */ #ifndef __AGS_OUTPUT_COLLECTION_EDITOR_H__ #define __AGS_OUTPUT_COLLECTION_EDITOR_H__ #include #include #include #define AGS_TYPE_OUTPUT_COLLECTION_EDITOR (ags_output_collection_editor_get_type()) #define AGS_OUTPUT_COLLECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_OUTPUT_COLLECTION_EDITOR, AgsOutputCollectionEditor)) #define AGS_OUTPUT_COLLECTION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_OUTPUT_COLLECTION_EDITOR, AgsOutputCollectionEditorClass)) #define AGS_IS_OUTPUT_COLLECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_OUTPUT_COLLECTION_EDITOR)) #define AGS_IS_OUTPUT_COLLECTION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_OUTPUT_COLLECTION_EDITOR)) #define AGS_OUTPUT_COLLECTION_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_OUTPUT_COLLECTION_EDITOR, AgsOutputCollectionEditorClass)) typedef struct _AgsOutputCollectionEditor AgsOutputCollectionEditor; typedef struct _AgsOutputCollectionEditorClass AgsOutputCollectionEditorClass; struct _AgsOutputCollectionEditor { GtkTable table; GType channel_type; GtkSpinButton *first_line; GtkSpinButton *count; GtkComboBoxText *soundcard; GtkSpinButton *audio_channel; }; struct _AgsOutputCollectionEditorClass { GtkTableClass table; }; GType ags_output_collection_editor_get_type(); void ags_output_collection_editor_check(AgsOutputCollectionEditor *output_collection_editor); AgsOutputCollectionEditor* ags_output_collection_editor_new(GType channel_type); #endif /*__AGS_OUTPUT_COLLECTION_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_generic_preferences.c0000644000175000017500000002633613247044247016661 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_generic_preferences_class_init(AgsGenericPreferencesClass *generic_preferences); void ags_generic_preferences_connectable_interface_init(AgsConnectableInterface *connectable); void ags_generic_preferences_applicable_interface_init(AgsApplicableInterface *applicable); void ags_generic_preferences_init(AgsGenericPreferences *generic_preferences); void ags_generic_preferences_connect(AgsConnectable *connectable); void ags_generic_preferences_disconnect(AgsConnectable *connectable); void ags_generic_preferences_set_update(AgsApplicable *applicable, gboolean update); void ags_generic_preferences_apply(AgsApplicable *applicable); void ags_generic_preferences_reset(AgsApplicable *applicable); static void ags_generic_preferences_finalize(GObject *gobject); GtkListStore* ags_generic_preferences_create_segmentation(); /** * SECTION:ags_generic_preferences * @short_description: A composite widget to do generic related preferences * @title: AgsGenericPreferences * @section_id: * @include: ags/X/ags_generic_preferences.h * * #AgsGenericPreferences enables you to make generic related preferences. */ static gpointer ags_generic_preferences_parent_class = NULL; GType ags_generic_preferences_get_type(void) { static GType ags_type_generic_preferences = 0; if(!ags_type_generic_preferences){ static const GTypeInfo ags_generic_preferences_info = { sizeof (AgsGenericPreferencesClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_generic_preferences_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsGenericPreferences), 0, /* n_preallocs */ (GInstanceInitFunc) ags_generic_preferences_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_generic_preferences_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_generic_preferences_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_generic_preferences = g_type_register_static(GTK_TYPE_VBOX, "AgsGenericPreferences", &ags_generic_preferences_info, 0); g_type_add_interface_static(ags_type_generic_preferences, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_generic_preferences, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_generic_preferences); } void ags_generic_preferences_class_init(AgsGenericPreferencesClass *generic_preferences) { GObjectClass *gobject; ags_generic_preferences_parent_class = g_type_class_peek_parent(generic_preferences); /* GtkObjectClass */ gobject = (GObjectClass *) generic_preferences; gobject->finalize = ags_generic_preferences_finalize; } void ags_generic_preferences_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_generic_preferences_connect; connectable->disconnect = ags_generic_preferences_disconnect; } void ags_generic_preferences_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_generic_preferences_set_update; applicable->apply = ags_generic_preferences_apply; applicable->reset = ags_generic_preferences_reset; } void ags_generic_preferences_init(AgsGenericPreferences *generic_preferences) { GtkHBox *hbox; GtkLabel *label; generic_preferences->autosave_thread = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("autosave thread")); gtk_box_pack_start(GTK_BOX(generic_preferences), GTK_WIDGET(generic_preferences->autosave_thread), FALSE, FALSE, 0); /* segmentation */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(generic_preferences), GTK_WIDGET(hbox), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("segmentation")); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); generic_preferences->segmentation = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_set_model((GtkComboBox *) generic_preferences->segmentation, (GtkTreeModel *) ags_generic_preferences_create_segmentation()); gtk_combo_box_set_active(GTK_COMBO_BOX(generic_preferences->segmentation), 2); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(generic_preferences->segmentation), FALSE, FALSE, 0); /* engine mode */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(generic_preferences), GTK_WIDGET(hbox), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("engine mode")); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); generic_preferences->engine_mode = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(generic_preferences->engine_mode, "deterministic"); gtk_combo_box_text_append_text(generic_preferences->engine_mode, "performance"); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(generic_preferences->engine_mode), FALSE, FALSE, 0); /* rt-safe */ generic_preferences->rt_safe = (GtkComboBoxText *) gtk_check_button_new_with_label(i18n("rt-safe")); gtk_box_pack_start(GTK_BOX(generic_preferences), GTK_WIDGET(generic_preferences->rt_safe), FALSE, FALSE, 0); } static void ags_generic_preferences_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_generic_preferences_parent_class)->finalize(gobject); } void ags_generic_preferences_connect(AgsConnectable *connectable) { AgsGenericPreferences *generic_preferences; generic_preferences = AGS_GENERIC_PREFERENCES(connectable); if((AGS_GENERIC_PREFERENCES_CONNECTED & (generic_preferences->flags)) != 0){ return; } generic_preferences->flags |= AGS_GENERIC_PREFERENCES_CONNECTED; g_signal_connect_after(G_OBJECT(generic_preferences->rt_safe), "clicked", G_CALLBACK(ags_generic_preferences_rt_safe_callback), generic_preferences); } void ags_generic_preferences_disconnect(AgsConnectable *connectable) { AgsGenericPreferences *generic_preferences; generic_preferences = AGS_GENERIC_PREFERENCES(connectable); if((AGS_GENERIC_PREFERENCES_CONNECTED & (generic_preferences->flags)) == 0){ return; } generic_preferences->flags &= (~AGS_GENERIC_PREFERENCES_CONNECTED); g_object_disconnect(G_OBJECT(generic_preferences->rt_safe), "any_signal::clicked", G_CALLBACK(ags_generic_preferences_rt_safe_callback), generic_preferences, NULL); } void ags_generic_preferences_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_generic_preferences_apply(AgsApplicable *applicable) { AgsGenericPreferences *generic_preferences; AgsConfig *config; generic_preferences = AGS_GENERIC_PREFERENCES(applicable); config = ags_config_get_instance(); ags_config_set_value(config, AGS_CONFIG_GENERIC, "disable-feature", "experimental"); if(gtk_toggle_button_get_active((GtkToggleButton *) generic_preferences->autosave_thread)){ ags_config_set_value(config, AGS_CONFIG_GENERIC, "autosave-thread", "true"); }else{ ags_config_set_value(config, AGS_CONFIG_GENERIC, "autosave-thread", "false"); } ags_config_set_value(config, AGS_CONFIG_GENERIC, "segmentation", gtk_combo_box_text_get_active_text(generic_preferences->segmentation)); ags_config_set_value(config, AGS_CONFIG_GENERIC, "engine-mode", gtk_combo_box_text_get_active_text(generic_preferences->engine_mode)); ags_config_set_value(config, AGS_CONFIG_GENERIC, "rt-safe", (gtk_toggle_button_get_active(generic_preferences->rt_safe) ? "true": "false")); } void ags_generic_preferences_reset(AgsApplicable *applicable) { AgsGenericPreferences *generic_preferences; AgsConfig *config; gchar *str; generic_preferences = AGS_GENERIC_PREFERENCES(applicable); config = ags_config_get_instance(); /* auto-save thread */ str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "autosave-thread"); if(str != NULL){ gtk_toggle_button_set_active((GtkToggleButton *) generic_preferences->autosave_thread, ((!g_ascii_strncasecmp(str, "true", 5)) ? TRUE: FALSE)); }else{ gtk_toggle_button_set_active((GtkToggleButton *) generic_preferences->autosave_thread, FALSE); } g_free(str); /* engine mode */ str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL){ if(g_ascii_strncasecmp(str, "performance", 12)){ gtk_combo_box_set_active(generic_preferences->engine_mode, 1); } } g_free(str); /* rt-safe */ str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "true", 5)){ gtk_toggle_button_set_active(generic_preferences->rt_safe, TRUE); } g_free(str); } GtkListStore* ags_generic_preferences_create_segmentation() { GtkListStore *model; GtkTreeIter iter; model = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "1/1", 1, 1, 2, 1, -1); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "3/4", 1, 4, 2, 4, -1); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "4/4", 1, 4, 2, 4, -1); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "8/8", 1, 4, 2, 4, -1); return(model); } /** * ags_generic_preferences_new: * * Creates an #AgsGenericPreferences * * Returns: a new #AgsGenericPreferences * * Since: 1.0.0 */ AgsGenericPreferences* ags_generic_preferences_new() { AgsGenericPreferences *generic_preferences; generic_preferences = (AgsGenericPreferences *) g_object_new(AGS_TYPE_GENERIC_PREFERENCES, NULL); return(generic_preferences); } gsequencer-1.4.24/ags/X/ags_line_editor.h0000644000175000017500000000473513246707333015166 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LINE_EDITOR_H__ #define __AGS_LINE_EDITOR_H__ #include #include #include #include #include #include #include #define AGS_TYPE_LINE_EDITOR (ags_line_editor_get_type()) #define AGS_LINE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LINE_EDITOR, AgsLineEditor)) #define AGS_LINE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LINE_EDITOR, AgsLineEditorClass)) #define AGS_IS_LINE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LINE_EDITOR)) #define AGS_IS_LINE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LINE_EDITOR)) #define AGS_LINE_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LINE_EDITOR, AgsLineEditorClass)) #define AGS_LINE_EDITOR_DEFAULT_VERSION "0.4.2\0" #define AGS_LINE_EDITOR_DEFAULT_BUILD_ID "CEST 02-10-2014 19:36\0" typedef struct _AgsLineEditor AgsLineEditor; typedef struct _AgsLineEditorClass AgsLineEditorClass; typedef enum{ AGS_LINE_EDITOR_CONNECTED = 1, }AgsLineEditorFlags; struct _AgsLineEditor { GtkVBox vbox; guint flags; gchar *version; gchar *build_id; AgsChannel *channel; guint editor_type_count; GType *editor_type; AgsLinkEditor *link_editor; AgsOutputEditor *output_editor; AgsLineMemberEditor *member_editor; }; struct _AgsLineEditorClass { GtkVBoxClass vbox; }; GType ags_line_editor_get_type(void); void ags_line_editor_set_channel(AgsLineEditor *line_editor, AgsChannel *channel); AgsLineEditor* ags_line_editor_new(AgsChannel *channel); #endif /*__AGS_LINE_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_history_browser.h0000644000175000017500000000404613246707333016130 00000000000000/* 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 . */ #ifndef __AGS_HISTORY_BROWSER_H__ #define __AGS_HISTORY_BROWSER_H__ #include #include #include #define AGS_TYPE_HISTORY_BROWSER (ags_history_browser_get_type()) #define AGS_HISTORY_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_HISTORY_BROWSER, AgsHistoryBrowser)) #define AGS_HISTORY_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_HISTORY_BROWSER, AgsHistoryBrowserClass)) #define AGS_IS_HISTORY_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_HISTORY_BROWSER)) #define AGS_IS_HISTORY_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_HISTORY_BROWSER)) #define AGS_HISTORY_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_HISTORY_BROWSER, AgsHistoryBrowserClass)) typedef struct _AgsHistoryBrowser AgsHistoryBrowser; typedef struct _AgsHistoryBrowserClass AgsHistoryBrowserClass; typedef enum{ AGS_HISTORY_BROWSER_CONNECTED = 1, }AgsHistoryBrowserFlags; struct _AgsHistoryBrowser { GtkWindow window; guint flags; GObject *application_context; }; struct _AgsHistoryBrowserClass { GtkWindowClass window; }; GType ags_history_browser_get_type(void); AgsHistoryBrowser* ags_history_browser_new(); #endif /*__AGS_HISTORY_BROWSER_H__*/ gsequencer-1.4.24/ags/X/ags_link_editor_callbacks.c0000644000175000017500000003001513246707333017154 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include int ags_link_editor_file_chooser_response_callback(GtkWidget *widget, guint response, AgsLinkEditor *link_editor); int ags_link_editor_file_chooser_play_callback(GtkToggleButton *toggle_button, AgsLinkEditor *link_editor); void ags_link_editor_file_chooser_play_done(AgsRecall *recall, AgsLinkEditor *link_editor); void ags_link_editor_file_chooser_play_cancel(AgsRecall *recall, AgsLinkEditor *link_editor); #define AGS_LINK_EDITOR_OPEN_SPIN_BUTTON "AgsLinkEditorOpenSpinButton" int ags_link_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLinkEditor *link_editor) { AgsMachine *machine; AgsLineEditor *line_editor; AgsAudio *audio; AgsChannel *channel; GtkTreeModel *model; if(old_parent != NULL){ return(0); } //TODO:JK: missing mutex line_editor = (AgsLineEditor *) gtk_widget_get_ancestor(widget, AGS_TYPE_LINE_EDITOR); if(line_editor != NULL){ channel = line_editor->channel; if(channel != NULL){ GtkTreeIter iter; audio = AGS_AUDIO(channel->audio); if(audio != NULL){ machine = AGS_MACHINE(audio->machine); model = GTK_TREE_MODEL(ags_machine_get_possible_links(machine)); if(AGS_IS_INPUT(line_editor->channel) && (AGS_MACHINE_TAKES_FILE_INPUT & (machine->flags)) != 0 && ((AGS_MACHINE_ACCEPT_WAV & (machine->file_input_flags)) != 0 || ((AGS_MACHINE_ACCEPT_OGG & (machine->file_input_flags)) != 0))){ gtk_list_store_append(GTK_LIST_STORE(model), &iter); if(AGS_INPUT(channel)->file_link != NULL){ gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, g_strdup_printf("file://%s", AGS_FILE_LINK(AGS_INPUT(channel)->file_link)->filename), 1, NULL, -1); gtk_combo_box_set_active_iter(link_editor->combo, &iter); }else{ gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, "file://", 1, NULL, -1); } } gtk_combo_box_set_model(link_editor->combo, model); } } } return(0); } void ags_link_editor_combo_callback(GtkComboBox *combo, AgsLinkEditor *link_editor) { GtkTreeIter iter; if(gtk_combo_box_get_active_iter(link_editor->combo, &iter)){ AgsMachine *machine, *link_machine; AgsLineEditor *line_editor; AgsChannel *channel; GtkTreeModel *model; line_editor = AGS_LINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(link_editor), AGS_TYPE_LINE_EDITOR)); channel = line_editor->channel; machine = AGS_MACHINE(AGS_AUDIO(channel->audio)->machine); model = gtk_combo_box_get_model(link_editor->combo); if(!((AGS_MACHINE_TAKES_FILE_INPUT & (machine->flags)) != 0 && ((AGS_MACHINE_ACCEPT_WAV & (machine->file_input_flags)) != 0 || ((AGS_MACHINE_ACCEPT_OGG & (machine->file_input_flags)) != 0)) && AGS_IS_INPUT(channel) && gtk_combo_box_get_active(link_editor->combo) + 1 == gtk_tree_model_iter_n_children(model, NULL))){ gtk_widget_set_sensitive((GtkWidget *) link_editor->spin_button, TRUE); /* set machine link */ gtk_tree_model_get(model, &iter, 1, &link_machine, -1); if(link_machine == NULL){ gtk_spin_button_set_value(link_editor->spin_button, 0.0); }else{ if(AGS_IS_INPUT(channel)){ gtk_spin_button_set_range(link_editor->spin_button, 0.0, (gdouble) (link_machine->audio->output_lines - 1)); }else{ gtk_spin_button_set_range(link_editor->spin_button, 0.0, (gdouble) (link_machine->audio->input_lines - 1)); } } }else{ GtkHBox *hbox; GtkLabel *label; GtkSpinButton *spin_button; gchar *str, *tmp; /* set file link */ if(link_editor->file_chooser != NULL || (AGS_LINK_EDITOR_BLOCK_FILE_CHOOSER & (link_editor->flags)) != 0){ return; } gtk_widget_set_sensitive((GtkWidget *) link_editor->spin_button, FALSE); link_editor->file_chooser = (GtkFileChooserDialog *) gtk_file_chooser_dialog_new(i18n("select audio file"), (GtkWindow *) gtk_widget_get_toplevel((GtkWidget *) link_editor), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(link_editor->file_chooser), FALSE); /* extra widget */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_file_chooser_set_extra_widget((GtkFileChooser *) link_editor->file_chooser, (GtkWidget *) hbox); label = (GtkLabel *) gtk_label_new(i18n("audio channel: ")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 0); spin_button = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 256.0, 1.0); g_object_set_data((GObject *) link_editor->file_chooser, AGS_LINK_EDITOR_OPEN_SPIN_BUTTON, spin_button); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) spin_button, FALSE, FALSE, 0); /* */ gtk_tree_model_get(model, &iter, 0, &str, -1); tmp = g_strdup(str + 7); if(g_strcmp0(tmp, "")){ char *tmp0, *name, *dir; tmp0 = g_strrstr(tmp, "/"); name = g_strdup(tmp0 + 1); dir = g_strndup(tmp, tmp0 - tmp); gtk_file_chooser_set_current_folder((GtkFileChooser *) link_editor->file_chooser, dir); gtk_file_chooser_set_current_name((GtkFileChooser *) link_editor->file_chooser, name); } g_signal_connect((GObject *) link_editor->file_chooser, "response", G_CALLBACK(ags_link_editor_file_chooser_response_callback), (gpointer) link_editor); gtk_widget_show_all((GtkWidget *) link_editor->file_chooser); } } } int ags_link_editor_option_changed_callback(GtkWidget *widget, AgsLinkEditor *link_editor) { /* AgsLineEditor *line_editor; AgsMachine *machine; machine = (AgsMachine *) g_object_get_data((GObject *) link_editor->option->menu_item, g_type_name(AGS_TYPE_MACHINE)); if(machine == NULL) return; line_editor = (AgsLineEditor *) gtk_widget_get_ancestor((GtkWidget *) link_editor, AGS_TYPE_LINE_EDITOR); link_editor->spin_button->adjustment->upper = (gdouble) (AGS_IS_OUTPUT(line_editor->channel) ? machine->audio->input_lines - 1: machine->audio->output_lines - 1); */ return(0); } int ags_link_editor_file_chooser_response_callback(GtkWidget *widget, guint response, AgsLinkEditor *link_editor) { GtkFileChooserDialog *file_chooser; char *name; file_chooser = link_editor->file_chooser; if(response == GTK_RESPONSE_ACCEPT){ GtkSpinButton *spin_button; GtkTreeModel *model; GtkTreeIter iter; /* set filename in combo box */ model = gtk_combo_box_get_model(link_editor->combo); name = gtk_file_chooser_get_filename((GtkFileChooser *) file_chooser); gtk_tree_model_iter_nth_child(model, &iter, NULL, gtk_tree_model_iter_n_children(model, NULL) - 1); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, g_strdup_printf("file://%s", name), -1); /* set audio channel */ spin_button = (GtkSpinButton *) g_object_get_data((GObject *) file_chooser, AGS_LINK_EDITOR_OPEN_SPIN_BUTTON); gtk_spin_button_set_value(link_editor->spin_button, gtk_spin_button_get_value(spin_button)); } link_editor->file_chooser = NULL; gtk_widget_destroy((GtkWidget *) file_chooser); return(0); } int ags_link_editor_file_chooser_play_callback(GtkToggleButton *toggle_button, AgsLinkEditor *link_editor) { /* GtkFileChooserDialog *file_chooser; AgsDevout *soundcard; AgsPlayAudioFile *play_audio_file; AgsAudioFile *audio_file; char *name; static GStaticMutex mutex = G_STATIC_MUTEX_INIT; file_chooser = link_editor->file_chooser; audio_file = link_editor->audio_file; soundcard = AGS_DEVOUT(AGS_AUDIO(AGS_LINE_EDITOR(gtk_widget_get_ancestor((GtkWidget *) link_editor, AGS_TYPE_LINE_EDITOR))->channel->audio)->soundcard); if(toggle_button->active){ /* AgsPlayAudioFile * / play_audio_file = ags_play_audio_file_new(); play_audio_file->soundcard = soundcard; ags_play_audio_file_connect(play_audio_file); g_object_set_data((GObject *) file_chooser, (char *) g_type_name(AGS_TYPE_PLAY_AUDIO_FILE), play_audio_file); g_signal_connect((GObject *) play_audio_file, "done", G_CALLBACK(ags_link_editor_file_chooser_play_done), link_editor); g_signal_connect((GObject *) play_audio_file, "cancel", G_CALLBACK(ags_link_editor_file_chooser_play_cancel), link_editor); /* AgsAudioFile * / name = gtk_file_chooser_get_filename((GtkFileChooser *) file_chooser); if(audio_file != NULL){ if(g_strcmp0(audio_file->name, name)){ g_object_unref(G_OBJECT(audio_file)); goto ags_link_editor_file_chooser_play_callback0; } }else{ ags_link_editor_file_chooser_play_callback0: audio_file = ags_audio_file_new(); g_object_set_data((GObject *) link_editor->option->menu_item, (char *) g_type_name(AGS_TYPE_AUDIO_FILE), audio_file); audio_file->flags |= AGS_AUDIO_FILE_ALL_CHANNELS; audio_file->name = (gchar *) name; ags_audio_file_set_soundcard(audio_file, soundcard); ags_audio_file_open(audio_file); AGS_AUDIO_FILE_GET_CLASS(audio_file)->read_buffer(audio_file); } play_audio_file->audio_file = audio_file; /* AgsDevout * / g_static_mutex_lock(&mutex); soundcard->play_recall = g_list_append(soundcard->play_recall, play_audio_file); soundcard->flags |= AGS_DEVOUT_PLAY_RECALL; soundcard->play_recall_ref++; AGS_DEVOUT_GET_CLASS(soundcard)->run((void *) soundcard); g_static_mutex_unlock(&mutex); }else{ if((AGS_LINK_EDITOR_FILE_CHOOSER_PLAY_DONE & (link_editor->flags)) == 0){ play_audio_file = (AgsPlayAudioFile *) g_object_get_data((GObject *) file_chooser, (char *) g_type_name(AGS_TYPE_PLAY_AUDIO_FILE)); play_audio_file->recall.flags |= AGS_RECALL_CANCEL; }else link_editor->flags &= (~AGS_LINK_EDITOR_FILE_CHOOSER_PLAY_DONE); } */ return(0); } void ags_link_editor_file_chooser_play_done(AgsRecall *recall, AgsLinkEditor *link_editor) { GtkToggleButton *toggle_button; GList *list; recall->flags |= AGS_RECALL_REMOVE; list = gtk_container_get_children((GtkContainer *) GTK_DIALOG(link_editor->file_chooser)->action_area); toggle_button = (GtkToggleButton *) list->data; link_editor->flags |= AGS_LINK_EDITOR_FILE_CHOOSER_PLAY_DONE; gtk_toggle_button_set_active(toggle_button, FALSE); g_list_free(list); } void ags_link_editor_file_chooser_play_remove(AgsRecall *recall, AgsLinkEditor *link_editor) { AgsPlayAudioFile *play_audio_file; play_audio_file = AGS_PLAY_AUDIO_FILE(recall); g_object_unref((GObject *) play_audio_file); } void ags_link_editor_file_chooser_play_cancel(AgsRecall *recall, AgsLinkEditor *link_editor) { AgsPlayAudioFile *play_audio_file; play_audio_file = AGS_PLAY_AUDIO_FILE(recall); g_object_unref((GObject *) play_audio_file); } gsequencer-1.4.24/ags/X/ags_audio_preferences_callbacks.h0000644000175000017500000000355213246707333020346 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUDIO_PREFERENCES_CALLBACKS_H__ #define __AGS_AUDIO_PREFERENCES_CALLBACKS_H__ #include #include #include #include #include int ags_audio_preferences_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsAudioPreferences *audio_preferences); void ags_audio_preferences_connect_sink_callback(GtkWidget *widget, AgsAudioPreferences *audio_preferences); void ags_audio_preferences_add_callback(GtkWidget *widget, AgsAudioPreferences *audio_preferences); void ags_audio_preferences_remove_soundcard_editor_callback(GtkWidget *soundcard_editor, AgsAudioPreferences *audio_preferences); void ags_audio_preferences_enable_jack_callback(GtkCheckButton *check_button, AgsAudioPreferences *audio_preferences); void ags_audio_preferences_start_jack_callback(GtkButton *button, AgsAudioPreferences *audio_preferences); void ags_audio_preferences_stop_jack_callback(GtkButton *button, AgsAudioPreferences *audio_preferences); #endif /*__AGS_AUDIO_PREFERENCES_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_effect_bridge.c0000644000175000017500000006501213256163135015424 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_effect_bridge_class_init(AgsEffectBridgeClass *effect_bridge); void ags_effect_bridge_connectable_interface_init(AgsConnectableInterface *connectable); void ags_effect_bridge_plugin_interface_init(AgsPluginInterface *plugin); void ags_effect_bridge_init(AgsEffectBridge *effect_bridge); void ags_effect_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_effect_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_effect_bridge_connect(AgsConnectable *connectable); void ags_effect_bridge_disconnect(AgsConnectable *connectable); gchar* ags_effect_bridge_get_name(AgsPlugin *plugin); void ags_effect_bridge_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_effect_bridge_get_version(AgsPlugin *plugin); void ags_effect_bridge_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_effect_bridge_get_build_id(AgsPlugin *plugin); void ags_effect_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id); void ags_effect_bridge_real_resize_audio_channels(AgsEffectBridge *effect_bridge, guint new_size, guint old_size); void ags_effect_bridge_real_resize_pads(AgsEffectBridge *effect_bridge, GType channel_type, guint new_size, guint old_size); void ags_effect_bridge_real_map_recall(AgsEffectBridge *effect_bridge); GList* ags_effect_bridge_real_find_port(AgsEffectBridge *effect_bridge); /** * SECTION:ags_effect_bridge * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsEffectBridge * @section_id: * @include: ags/X/ags_effect_bridge.h * * #AgsEffectBridge is a composite widget containing #AgsEffectBulk or #AgsEffectPad. It should be * packed by an #AgsMachine. */ enum{ RESIZE_AUDIO_CHANNELS, RESIZE_PADS, MAP_RECALL, FIND_PORT, LAST_SIGNAL, }; enum{ PROP_0, PROP_AUDIO, }; static gpointer ags_effect_bridge_parent_class = NULL; static guint effect_bridge_signals[LAST_SIGNAL]; GType ags_effect_bridge_get_type(void) { static GType ags_type_effect_bridge = 0; if(!ags_type_effect_bridge){ static const GTypeInfo ags_effect_bridge_info = { sizeof(AgsEffectBridgeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_effect_bridge_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsEffectBridge), 0, /* n_preallocs */ (GInstanceInitFunc) ags_effect_bridge_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_effect_bridge_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_effect_bridge_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_effect_bridge = g_type_register_static(GTK_TYPE_VBOX, "AgsEffectBridge", &ags_effect_bridge_info, 0); g_type_add_interface_static(ags_type_effect_bridge, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_effect_bridge, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_effect_bridge); } void ags_effect_bridge_class_init(AgsEffectBridgeClass *effect_bridge) { GObjectClass *gobject; GParamSpec *param_spec; ags_effect_bridge_parent_class = g_type_class_peek_parent(effect_bridge); /* GObjectClass */ gobject = (GObjectClass *) effect_bridge; gobject->set_property = ags_effect_bridge_set_property; gobject->get_property = ags_effect_bridge_get_property; /* properties */ /** * AgsEffectBridge:audio: * * The start of a bunch of #AgsAudio to visualize. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("assigned audio"), i18n_pspec("The audio it is assigned with"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /* AgsEffectBridgeClass */ effect_bridge->resize_pads = ags_effect_bridge_real_resize_pads; effect_bridge->resize_audio_channels = ags_effect_bridge_real_resize_audio_channels; effect_bridge->map_recall = ags_effect_bridge_real_map_recall; effect_bridge->find_port = ags_effect_bridge_real_find_port; /* signals */ /** * AgsEffectBridge::resize-audio-channels: * @effect_bridge: the #AgsEffectBridge to modify * @channel: the #AgsChannel to set * @new_size: the new size * @old_size: the old size * * The ::resize-audio-channels signal notifies about changed channel allocation within * audio. */ effect_bridge_signals[RESIZE_AUDIO_CHANNELS] = g_signal_new("resize-audio-channels", G_TYPE_FROM_CLASS(effect_bridge), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectBridgeClass, resize_audio_channels), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); /** * AgsEffectBridge::resize-pads: * @effect_bridge: the #AgsEffectBridge to modify * @channel: the #AgsChannel to set * @channel_type: either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT * @new_size: the new size * @old_size: the old size * * The ::resize-pads signal notifies about changed channel allocation within * audio. */ effect_bridge_signals[RESIZE_PADS] = g_signal_new("resize-pads", G_TYPE_FROM_CLASS(effect_bridge), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectBridgeClass, resize_pads), NULL, NULL, g_cclosure_user_marshal_VOID__ULONG_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_ULONG, G_TYPE_UINT, G_TYPE_UINT); /** * AgsEffectBridge::map-recall: * @effect_bridge: the #AgsEffectBridge * * The ::map-recall should be used to add the effect_bridge's default recall. */ effect_bridge_signals[MAP_RECALL] = g_signal_new("map-recall", G_TYPE_FROM_CLASS (effect_bridge), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsEffectBridgeClass, map_recall), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 0); /** * AgsEffectBridge::find-port: * @effect_bridge: the #AgsEffectBridge to resize * Returns: a #GList with associated ports * * The ::find-port as recall should be mapped */ effect_bridge_signals[FIND_PORT] = g_signal_new("find-port", G_TYPE_FROM_CLASS(effect_bridge), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectBridgeClass, find_port), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); } void ags_effect_bridge_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_effect_bridge_connect; connectable->disconnect = ags_effect_bridge_disconnect; } void ags_effect_bridge_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_effect_bridge_get_name; plugin->set_name = ags_effect_bridge_set_name; plugin->get_version = ags_effect_bridge_get_version; plugin->set_version = ags_effect_bridge_set_version; plugin->get_build_id = ags_effect_bridge_get_build_id; plugin->set_build_id = ags_effect_bridge_set_build_id; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_effect_bridge_init(AgsEffectBridge *effect_bridge) { effect_bridge->flags = 0; effect_bridge->name = NULL; effect_bridge->version = AGS_EFFECT_BRIDGE_DEFAULT_VERSION; effect_bridge->build_id = AGS_EFFECT_BRIDGE_DEFAULT_BUILD_ID; effect_bridge->audio = NULL; /* output */ effect_bridge->output_pad_type = G_TYPE_NONE; effect_bridge->output_line_type = G_TYPE_NONE; effect_bridge->bulk_output_type = G_TYPE_NONE; effect_bridge->bulk_output = NULL; effect_bridge->output = NULL; /* input */ effect_bridge->input_pad_type = G_TYPE_NONE; effect_bridge->input_line_type = G_TYPE_NONE; effect_bridge->bulk_input_type = G_TYPE_NONE; effect_bridge->bulk_input = NULL; effect_bridge->input = NULL; } void ags_effect_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsEffectBridge *effect_bridge; effect_bridge = AGS_EFFECT_BRIDGE(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(effect_bridge->audio == audio){ return; } if(effect_bridge->audio != NULL){ GList *effect_pad; g_object_unref(effect_bridge->audio); if(audio == NULL){ /* destroy pad */ effect_pad = gtk_container_get_children((GtkContainer *) effect_bridge->output); while(effect_pad != NULL){ gtk_widget_destroy(effect_pad->data); effect_pad = effect_pad->next; } effect_pad = gtk_container_get_children((GtkContainer *) effect_bridge->input); while(effect_pad != NULL){ gtk_widget_destroy(GTK_WIDGET(effect_pad->data)); effect_pad = effect_pad->next; } } } if(audio != NULL){ AgsChannel *input, *output; GList *effect_pad, *effect_line; guint i; g_object_ref(audio); /* set channel and resize for AgsOutput */ if(effect_bridge->output_pad_type != G_TYPE_NONE){ output = audio->output; effect_pad = gtk_container_get_children((GtkContainer *) effect_bridge->output); /* reset */ i = 0; while(effect_pad != NULL && output != NULL){ effect_line = gtk_container_get_children((GtkContainer *) AGS_EFFECT_PAD(effect_pad->data)->table); ags_effect_pad_resize_lines(AGS_EFFECT_PAD(effect_pad->data), effect_bridge->output_line_type, audio->audio_channels, g_list_length(effect_line)); g_object_set(G_OBJECT(effect_pad->data), "channel", output, NULL); output = output->next_pad; effect_pad = effect_pad->next; i++; } if(output != NULL){ AgsEffectPad *effect_pad; /* add effect pad */ for(; i < audio->output_pads; i++){ effect_pad = g_object_new(effect_bridge->output_pad_type, "channel", output, NULL); gtk_container_add((GtkContainer *) effect_bridge->output, GTK_WIDGET(effect_pad)); ags_effect_pad_resize_lines(effect_pad, effect_bridge->output_line_type, audio->audio_channels, 0); output = output->next_pad; } }else{ /* destroy effect pad */ effect_pad = gtk_container_get_children((GtkContainer *) effect_bridge->output); effect_pad = g_list_nth(effect_pad, audio->output_pads); while(effect_pad != NULL){ gtk_widget_destroy(effect_pad->data); effect_pad = effect_pad->next; } } } /* set channel and resize for AgsInput */ if(effect_bridge->input_pad_type != G_TYPE_NONE){ input = audio->input; effect_pad = gtk_container_get_children((GtkContainer *) effect_bridge->input); i = 0; while(effect_pad != NULL && input != NULL){ effect_line = gtk_container_get_children((GtkContainer *) AGS_EFFECT_PAD(effect_pad->data)->table); ags_effect_pad_resize_lines(AGS_EFFECT_PAD(effect_pad->data), effect_bridge->input_line_type, audio->audio_channels, g_list_length(effect_line)); g_object_set(G_OBJECT(effect_pad->data), "channel", input, NULL); input = input->next_pad; effect_pad = effect_pad->next; i++; } if(input != NULL){ AgsEffectPad *effect_pad; /* add effect pad */ for(; i < audio->input_pads; i++){ effect_pad = g_object_new(effect_bridge->input_pad_type, "channel", input, NULL); gtk_container_add((GtkContainer *) effect_bridge->input, GTK_WIDGET(effect_pad)); ags_effect_pad_resize_lines(effect_pad, effect_bridge->input_line_type, audio->audio_channels, 0); input = input->next_pad; } }else{ /* destroy effect pad */ effect_pad = gtk_container_get_children((GtkContainer *) effect_bridge->input); effect_pad = g_list_nth(effect_pad, audio->input_pads); while(effect_pad != NULL){ gtk_widget_destroy(effect_pad->data); effect_pad = effect_pad->next; } } } } effect_bridge->audio = audio; if(effect_bridge->bulk_output != NULL){ g_object_set(effect_bridge->bulk_output, "audio", audio, NULL); } if(effect_bridge->bulk_input != NULL){ g_object_set(effect_bridge->bulk_input, "audio", audio, NULL); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_effect_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsEffectBridge *effect_bridge; effect_bridge = AGS_EFFECT_BRIDGE(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, effect_bridge->audio); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_effect_bridge_connect(AgsConnectable *connectable) { AgsMachine *machine; AgsEffectBridge *effect_bridge; GList *effect_pad_list, *effect_pad_list_start; effect_bridge = AGS_EFFECT_BRIDGE(connectable); if((AGS_EFFECT_BRIDGE_CONNECTED & (effect_bridge->flags)) != 0){ return; } effect_bridge->flags |= AGS_EFFECT_BRIDGE_CONNECTED; machine = gtk_widget_get_ancestor(effect_bridge, AGS_TYPE_MACHINE); g_signal_connect_after(machine, "resize-audio-channels", G_CALLBACK(ags_effect_bridge_resize_audio_channels_callback), effect_bridge); g_signal_connect_after(machine, "resize-pads", G_CALLBACK(ags_effect_bridge_resize_pads_callback), effect_bridge); /* AgsEffectBulk - input */ if(effect_bridge->bulk_input != NULL){ ags_connectable_connect(AGS_CONNECTABLE(effect_bridge->bulk_input)); } /* AgsEffectBulk - output */ if(effect_bridge->bulk_output != NULL){ ags_connectable_connect(AGS_CONNECTABLE(effect_bridge->bulk_output)); } /* AgsEffectPad - input */ if(effect_bridge->input != NULL){ effect_pad_list_start = effect_pad_list = gtk_container_get_children((GtkContainer *) effect_bridge->input); while(effect_pad_list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(effect_pad_list->data)); effect_pad_list = effect_pad_list->next; } g_list_free(effect_pad_list_start); } /* AgsEffectPad - output */ if(effect_bridge->output != NULL){ effect_pad_list_start = effect_pad_list = gtk_container_get_children((GtkContainer *) effect_bridge->output); while(effect_pad_list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(effect_pad_list->data)); effect_pad_list = effect_pad_list->next; } g_list_free(effect_pad_list_start); } } void ags_effect_bridge_disconnect(AgsConnectable *connectable) { AgsMachine *machine; AgsEffectBridge *effect_bridge; GList *effect_pad_list, *effect_pad_list_start; effect_bridge = AGS_EFFECT_BRIDGE(connectable); if((AGS_EFFECT_BRIDGE_CONNECTED & (effect_bridge->flags)) == 0){ return; } effect_bridge->flags &= (~AGS_EFFECT_BRIDGE_CONNECTED); machine = gtk_widget_get_ancestor(effect_bridge, AGS_TYPE_MACHINE); g_object_disconnect(G_OBJECT(machine), "any_signal::resize-audio-channels", G_CALLBACK(ags_effect_bridge_resize_audio_channels_callback), effect_bridge, "any_signal::resize-pads", G_CALLBACK(ags_effect_bridge_resize_pads_callback), effect_bridge, NULL); /* AgsEffectBulk - input */ if(effect_bridge->bulk_input != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(effect_bridge->bulk_input)); } /* AgsEffectBulk - output */ if(effect_bridge->bulk_output != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(effect_bridge->bulk_output)); } /* AgsEffectPad - input */ if(effect_bridge->input != NULL){ effect_pad_list_start = effect_pad_list = gtk_container_get_children((GtkContainer *) effect_bridge->input); while(effect_pad_list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(effect_pad_list->data)); effect_pad_list = effect_pad_list->next; } g_list_free(effect_pad_list_start); } /* AgsEffectPad - output */ if(effect_bridge->output != NULL){ effect_pad_list_start = effect_pad_list = gtk_container_get_children((GtkContainer *) effect_bridge->output); while(effect_pad_list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(effect_pad_list->data)); effect_pad_list = effect_pad_list->next; } g_list_free(effect_pad_list_start); } } gchar* ags_effect_bridge_get_name(AgsPlugin *plugin) { return(AGS_EFFECT_BRIDGE(plugin)->name); } void ags_effect_bridge_set_name(AgsPlugin *plugin, gchar *name) { AgsEffectBridge *effect_bridge; effect_bridge = AGS_EFFECT_BRIDGE(plugin); effect_bridge->name = name; } gchar* ags_effect_bridge_get_version(AgsPlugin *plugin) { return(AGS_EFFECT_BRIDGE(plugin)->version); } void ags_effect_bridge_set_version(AgsPlugin *plugin, gchar *version) { AgsEffectBridge *effect_bridge; effect_bridge = AGS_EFFECT_BRIDGE(plugin); effect_bridge->version = version; } gchar* ags_effect_bridge_get_build_id(AgsPlugin *plugin) { return(AGS_EFFECT_BRIDGE(plugin)->build_id); } void ags_effect_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsEffectBridge *effect_bridge; effect_bridge = AGS_EFFECT_BRIDGE(plugin); effect_bridge->build_id = build_id; } void ags_effect_bridge_real_resize_audio_channels(AgsEffectBridge *effect_bridge, guint new_size, guint old_size) { GtkTable *table; AgsAudio *audio; AgsChannel *start, *current; GList *list; audio = effect_bridge->audio; if(audio == NULL){ return; } /* output */ list = gtk_container_get_children((GtkContainer *) effect_bridge->output); while(list != NULL){ ags_effect_pad_resize_lines(AGS_EFFECT_PAD(list->data), effect_bridge->output_line_type, new_size, old_size); list = list->next; } /* input */ list = gtk_container_get_children((GtkContainer *) effect_bridge->input); while(list != NULL){ ags_effect_pad_resize_lines(AGS_EFFECT_PAD(list->data), effect_bridge->input_line_type, new_size, old_size); list = list->next; } } /** * ags_effect_bridge_resize_audio_channels: * @effect_bridge: the #AgsEffectBridge * @new_size: new allocation * @old_size: old allocation * * Resize audio channel allocation. * * Since: 1.0.0 */ void ags_effect_bridge_resize_audio_channels(AgsEffectBridge *effect_bridge, guint new_size, guint old_size) { g_return_if_fail(AGS_IS_EFFECT_BRIDGE(effect_bridge)); g_object_ref((GObject *) effect_bridge); g_signal_emit(G_OBJECT(effect_bridge), effect_bridge_signals[RESIZE_AUDIO_CHANNELS], 0, new_size, old_size); g_object_unref((GObject *) effect_bridge); } void ags_effect_bridge_real_resize_pads(AgsEffectBridge *effect_bridge, GType channel_type, guint new_size, guint old_size) { AgsEffectPad *effect_pad; GtkTable *table; AgsAudio *audio; AgsChannel *current; guint i; audio = effect_bridge->audio; if(audio == NULL){ return; } if(new_size > old_size){ if(channel_type == AGS_TYPE_OUTPUT){ current = ags_channel_nth(audio->output, old_size * audio->audio_channels); }else{ current = ags_channel_nth(audio->input, old_size * audio->audio_channels); } for(i = 0; i < new_size - old_size && current != NULL; i++){ if(channel_type == AGS_TYPE_OUTPUT){ if(effect_bridge->output_pad_type != G_TYPE_NONE){ effect_pad = g_object_new(effect_bridge->output_pad_type, "channel", current, NULL); ags_effect_pad_resize_lines(effect_pad, effect_bridge->output_line_type, audio->audio_channels, 0); gtk_container_add((GtkContainer *) effect_bridge->output, GTK_WIDGET(effect_pad)); } }else{ if(effect_bridge->input_pad_type != G_TYPE_NONE){ effect_pad = g_object_new(effect_bridge->input_pad_type, "channel", current, NULL); ags_effect_pad_resize_lines(effect_pad, effect_bridge->input_line_type, audio->audio_channels, 0); gtk_container_add((GtkContainer *) effect_bridge->input, GTK_WIDGET(effect_pad)); } } current = current->next_pad; } /* connect and show */ if((AGS_EFFECT_BRIDGE_CONNECTED & (effect_bridge->flags)) != 0){ GtkContainer *container; GList *list; container = (GtkContainer *) ((channel_type == AGS_TYPE_OUTPUT) ? effect_bridge->output: effect_bridge->input); if(container != NULL){ list = gtk_container_get_children(container); list = g_list_nth(list, old_size); while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); gtk_widget_show_all(list->data); list = list->next; } } } }else{ GList *list, *list_next; list = NULL; if(channel_type == AGS_TYPE_OUTPUT){ if(effect_bridge->output != NULL){ list = gtk_container_get_children((GtkContainer *) effect_bridge->output); list = g_list_nth(list, new_size); } }else{ if(effect_bridge->input != NULL){ list = gtk_container_get_children((GtkContainer *) effect_bridge->input); list = g_list_nth(list, new_size); } } for(i = 0; list != NULL && i < new_size - old_size; i++){ list_next = list->next; gtk_widget_destroy(list->data); list = list_next; } } } /** * ags_effect_bridge_resize_pads: * @effect_bridge: the #AgsEffectBridge * @channel_type: the channel #GType * @new_size: new allocation * @old_size: old allocation * * Resize pad allocation. * * Since: 1.0.0 */ void ags_effect_bridge_resize_pads(AgsEffectBridge *effect_bridge, GType channel_type, guint new_size, guint old_size) { g_return_if_fail(AGS_IS_EFFECT_BRIDGE(effect_bridge)); g_object_ref((GObject *) effect_bridge); g_signal_emit(G_OBJECT(effect_bridge), effect_bridge_signals[RESIZE_PADS], 0, channel_type, new_size, old_size); g_object_unref((GObject *) effect_bridge); } void ags_effect_bridge_real_map_recall(AgsEffectBridge *effect_bridge) { if((AGS_EFFECT_BRIDGE_MAPPED_RECALL & (effect_bridge->flags)) != 0){ return; } effect_bridge->flags |= AGS_EFFECT_BRIDGE_MAPPED_RECALL; ags_effect_bridge_find_port(effect_bridge); } /** * ags_effect_bridge_map_recall: * @effect_bridge: the #AgsEffectBridge to add its default recall. * * You may want the @effect_bridge to add its default recall. */ void ags_effect_bridge_map_recall(AgsEffectBridge *effect_bridge) { g_return_if_fail(AGS_IS_EFFECT_BRIDGE(effect_bridge)); g_object_ref((GObject *) effect_bridge); g_signal_emit((GObject *) effect_bridge, effect_bridge_signals[MAP_RECALL], 0); g_object_unref((GObject *) effect_bridge); } GList* ags_effect_bridge_real_find_port(AgsEffectBridge *effect_bridge) { GList *bulk; GList *effect_pad, *effect_pad_start; GList *port, *tmp_port; port = NULL; /* find output ports */ if(effect_bridge->output != NULL){ effect_pad_start = effect_pad = gtk_container_get_children((GtkContainer *) effect_bridge->output); while(effect_pad != NULL){ tmp_port = ags_effect_pad_find_port(AGS_EFFECT_PAD(effect_pad->data)); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } effect_pad = effect_pad->next; } g_list_free(effect_pad_start); } /* find input ports */ if(effect_bridge->input != NULL){ effect_pad_start = effect_pad = gtk_container_get_children((GtkContainer *) effect_bridge->input); while(effect_pad != NULL){ tmp_port = ags_effect_pad_find_port(AGS_EFFECT_PAD(effect_pad->data)); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } effect_pad = effect_pad->next; } g_list_free(effect_pad_start); } /* find output bulk ports */ if(effect_bridge->bulk_output != NULL){ tmp_port = ags_effect_bulk_find_port((AgsEffectBulk *) effect_bridge->bulk_output); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } } /* find input bulk ports */ if(effect_bridge->bulk_output != NULL){ tmp_port = ags_effect_bulk_find_port((AgsEffectBulk *) effect_bridge->bulk_output); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } } return(port); } /** * ags_effect_bridge_find_port: * @effect_bridge: the #AgsEffectBridge * Returns: an #GList containing all related #AgsPort * * Lookup ports of associated recalls. * * Since: 1.0.0 */ GList* ags_effect_bridge_find_port(AgsEffectBridge *effect_bridge) { GList *list; list = NULL; g_return_val_if_fail(AGS_IS_EFFECT_BRIDGE(effect_bridge), NULL); g_object_ref((GObject *) effect_bridge); g_signal_emit((GObject *) effect_bridge, effect_bridge_signals[FIND_PORT], 0, &list); g_object_unref((GObject *) effect_bridge); return(list); } /** * ags_effect_bridge_new: * @audio: the #AgsAudio to visualize * * Creates an #AgsEffectBridge * * Returns: a new #AgsEffectBridge * * Since: 1.0.0 */ AgsEffectBridge* ags_effect_bridge_new(AgsAudio *audio) { AgsEffectBridge *effect_bridge; effect_bridge = (AgsEffectBridge *) g_object_new(AGS_TYPE_EFFECT_BRIDGE, "audio", audio, NULL); return(effect_bridge); } gsequencer-1.4.24/ags/X/ags_window_callbacks.h0000644000175000017500000000215513246707333016171 00000000000000/* 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 . */ #ifndef __AGS_WINDOW_CALLBACKS_H__ #define __AGS_WINDOW_CALLBACKS_H__ #include #include #include gboolean ags_window_delete_event_callback(GtkWidget *widget, gpointer data); void ags_window_button_press_event(GtkWidget *widget, GdkEventButton *event, AgsWindow *window); #endif /*__AGS_WINDOW_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_dssi_browser.h0000644000175000017500000000422713246707333015372 00000000000000/* 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 . */ #ifndef __AGS_DSSI_BROWSER_H__ #define __AGS_DSSI_BROWSER_H__ #include #include #include #define AGS_TYPE_DSSI_BROWSER (ags_dssi_browser_get_type()) #define AGS_DSSI_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_DSSI_BROWSER, AgsDssiBrowser)) #define AGS_DSSI_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_DSSI_BROWSER, AgsDssiBrowserClass)) #define AGS_IS_DSSI_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_DSSI_BROWSER)) #define AGS_IS_DSSI_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_DSSI_BROWSER)) #define AGS_DSSI_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_DSSI_BROWSER, AgsDssiBrowserClass)) typedef struct _AgsDssiBrowser AgsDssiBrowser; typedef struct _AgsDssiBrowserClass AgsDssiBrowserClass; struct _AgsDssiBrowser { GtkVBox vbox; gchar *path; GtkHBox *plugin; GtkVBox *description; GtkWidget *preview; }; struct _AgsDssiBrowserClass { GtkVBoxClass vbox; }; GType ags_dssi_browser_get_type(void); gchar* ags_dssi_browser_get_plugin_filename(AgsDssiBrowser *dssi_browser); gchar* ags_dssi_browser_get_plugin_effect(AgsDssiBrowser *dssi_browser); GtkWidget* ags_dssi_browser_combo_box_controls_new(); GtkWidget* ags_dssi_browser_preview_new(); AgsDssiBrowser* ags_dssi_browser_new(); #endif /*__AGS_DSSI_BROWSER_H__*/ gsequencer-1.4.24/ags/X/ags_pad_editor.h0000644000175000017500000000450513247044247014775 00000000000000/* 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 . */ #ifndef __AGS_PAD_EDITOR_H__ #define __AGS_PAD_EDITOR_H__ #include #include #include #include #include #include #define AGS_TYPE_PAD_EDITOR (ags_pad_editor_get_type()) #define AGS_PAD_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PAD_EDITOR, AgsPadEditor)) #define AGS_PAD_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PAD_EDITOR, AgsPadEditorClass)) #define AGS_IS_PAD_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PAD_EDITOR)) #define AGS_IS_PAD_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PAD_EDITOR)) #define AGS_PAD_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_PAD_EDITOR, AgsPadEditorClass)) #define AGS_PAD_EDITOR_DEFAULT_VERSION "0.4.2" #define AGS_PAD_EDITOR_DEFAULT_BUILD_ID "CEST 02-10-2014 19:36" typedef struct _AgsPadEditor AgsPadEditor; typedef struct _AgsPadEditorClass AgsPadEditorClass; typedef enum{ AGS_PAD_EDITOR_CONNECTED = 1, }AgsPadEditorFlags; struct _AgsPadEditor { GtkVBox vbox; guint flags; gchar *version; gchar *build_id; AgsChannel *pad; guint editor_type_count; GType *editor_type; GtkExpander *line_editor_expander; GtkVBox *line_editor; }; struct _AgsPadEditorClass { GtkVBoxClass vbox; }; GType ags_pad_editor_get_type(void); void ags_pad_editor_set_channel(AgsPadEditor *pad_editor, AgsChannel *channel); AgsPadEditor* ags_pad_editor_new(AgsChannel *channel); #endif /*__AGS_PAD_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_server_preferences.h0000644000175000017500000000406313246707333016552 00000000000000/* 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 . */ #ifndef __AGS_SERVER_PREFERENCES_H__ #define __AGS_SERVER_PREFERENCES_H__ #include #define AGS_TYPE_SERVER_PREFERENCES (ags_server_preferences_get_type()) #define AGS_SERVER_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SERVER_PREFERENCES, AgsServerPreferences)) #define AGS_SERVER_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SERVER_PREFERENCES, AgsServerPreferencesClass)) #define AGS_IS_SERVER_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SERVER_PREFERENCES)) #define AGS_IS_SERVER_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SERVER_PREFERENCES)) #define AGS_SERVER_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SERVER_PREFERENCES, AgsServerPreferencesClass)) typedef struct _AgsServerPreferences AgsServerPreferences; typedef struct _AgsServerPreferencesClass AgsServerPreferencesClass; struct _AgsServerPreferences { GtkVBox vbox; GtkCheckButton *start; GtkEntry *address; GtkEntry *port; GtkEntry *username; GtkEntry *password; }; struct _AgsServerPreferencesClass { GtkVBoxClass vbox; }; GType ags_server_preferences_get_type(void); AgsServerPreferences* ags_server_preferences_new(); #endif /*__AGS_SERVER_PREFERENCES_H__*/ gsequencer-1.4.24/ags/X/ags_resize_editor.h0000644000175000017500000000376113246707333015536 00000000000000/* 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 . */ #ifndef __AGS_RESIZE_EDITOR_H__ #define __AGS_RESIZE_EDITOR_H__ #include #include #include #include #define AGS_TYPE_RESIZE_EDITOR (ags_resize_editor_get_type()) #define AGS_RESIZE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RESIZE_EDITOR, AgsResizeEditor)) #define AGS_RESIZE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RESIZE_EDITOR, AgsResizeEditorClass)) #define AGS_IS_RESIZE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RESIZE_EDITOR)) #define AGS_IS_RESIZE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RESIZE_EDITOR)) #define AGS_RESIZE_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RESIZE_EDITOR, AgsResizeEditorClass)) typedef struct _AgsResizeEditor AgsResizeEditor; typedef struct _AgsResizeEditorClass AgsResizeEditorClass; struct _AgsResizeEditor { AgsPropertyEditor property_editor; GtkSpinButton *audio_channels; GtkSpinButton *input_pads; GtkSpinButton *output_pads; }; struct _AgsResizeEditorClass { AgsPropertyEditorClass property_editor; }; AgsResizeEditor* ags_resize_editor_new(); #endif /*__AGS_RESIZE_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_preferences_callbacks.h0000644000175000017500000000232413246707333017161 00000000000000/* 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 . */ #ifndef __AGS_PREFERENCES_CALLBACKS_H__ #define __AGS_PREFERENCES_CALLBACKS_H__ #include #include #include void ags_preferences_response_callback(GtkDialog *dialog, gint response_id, gpointer user_data); void ags_preferences_notebook_switch_page_callback(GtkNotebook *notebook, gpointer page, guint page_n, AgsPreferences *preferences); #endif /*__AGS_PREFERENCES_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_automation_window_callbacks.c0000644000175000017500000000146513247044247020426 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include gsequencer-1.4.24/ags/X/ags_export_soundcard_callbacks.h0000644000175000017500000000251513246707333020245 00000000000000/* 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 . */ #ifndef __AGS_EXPORT_SOUNDCARD_CALLBACKS_H__ #define __AGS_EXPORT_SOUNDCARD_CALLBACKS_H__ #include #include #include void ags_export_soundcard_backend_callback(GtkWidget *combo_box, AgsExportSoundcard *export_soundcard); void ags_export_soundcard_card_callback(GtkWidget *combo_box, AgsExportSoundcard *export_soundcard); void ags_export_soundcard_file_chooser_button_callback(GtkWidget *file_chooser_button, AgsExportSoundcard *export_soundcard); #endif /*__AGS_EXPORT_SOUNDCARD_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_line_member_editor.c0000644000175000017500000002323413247044247016502 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_line_member_editor_class_init(AgsLineMemberEditorClass *line_member_editor); void ags_line_member_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_line_member_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_line_member_editor_init(AgsLineMemberEditor *line_member_editor); void ags_line_member_editor_connect(AgsConnectable *connectable); void ags_line_member_editor_disconnect(AgsConnectable *connectable); void ags_line_member_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_line_member_editor_apply(AgsApplicable *applicable); void ags_line_member_editor_reset(AgsApplicable *applicable); void ags_line_member_editor_finalize(GObject *gobject); /** * SECTION:ags_line_member_editor * @short_description: Edit line member's aspects. * @title: AgsLineMemberEditor * @section_id: * @include: ags/X/ags_line_member_editor.h * * #AgsLineMemberEditor is a composite widget to modify line member. A line member * editor should be packed by a #AgsLineEditor. You may add/remove plugins with this * editor. */ GType ags_line_member_editor_get_type(void) { static GType ags_type_line_member_editor = 0; if(!ags_type_line_member_editor){ static const GTypeInfo ags_line_member_editor_info = { sizeof (AgsLineMemberEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_line_member_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLineMemberEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_line_member_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_line_member_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_line_member_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_line_member_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsLineMemberEditor", &ags_line_member_editor_info, 0); g_type_add_interface_static(ags_type_line_member_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_line_member_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_line_member_editor); } void ags_line_member_editor_class_init(AgsLineMemberEditorClass *line_member_editor) { /* empty */ } void ags_line_member_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_line_member_editor_connect; connectable->disconnect = ags_line_member_editor_disconnect; } void ags_line_member_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_line_member_editor_set_update; applicable->apply = ags_line_member_editor_apply; applicable->reset = ags_line_member_editor_reset; } void ags_line_member_editor_init(AgsLineMemberEditor *line_member_editor) { GtkHBox *hbox; line_member_editor->flags = 0; line_member_editor->line_member = (GtkVBox *) gtk_vbox_new(FALSE, 2); gtk_box_pack_start((GtkBox *) line_member_editor, (GtkWidget *) line_member_editor->line_member, FALSE, FALSE, 0); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 2); gtk_box_pack_start((GtkBox *) line_member_editor, (GtkWidget *) hbox, FALSE, FALSE, 0); line_member_editor->add = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) line_member_editor->add, FALSE, FALSE, 0); line_member_editor->remove = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) line_member_editor->remove, FALSE, FALSE, 0); line_member_editor->plugin_browser = ags_plugin_browser_new((GtkWidget *) line_member_editor); } void ags_line_member_editor_connect(AgsConnectable *connectable) { AgsLineMemberEditor *line_member_editor; line_member_editor = AGS_LINE_MEMBER_EDITOR(connectable); if((AGS_LINE_MEMBER_EDITOR_CONNECTED & (line_member_editor->flags)) != 0){ return; } line_member_editor->flags |= AGS_LINE_MEMBER_EDITOR_CONNECTED; g_signal_connect(G_OBJECT(line_member_editor->add), "clicked", G_CALLBACK(ags_line_member_editor_add_callback), line_member_editor); g_signal_connect(G_OBJECT(line_member_editor->remove), "clicked", G_CALLBACK(ags_line_member_editor_remove_callback), line_member_editor); ags_connectable_connect(AGS_CONNECTABLE(line_member_editor->plugin_browser)); g_signal_connect(G_OBJECT(line_member_editor->plugin_browser), "response", G_CALLBACK(ags_line_member_editor_plugin_browser_response_callback), line_member_editor); } void ags_line_member_editor_disconnect(AgsConnectable *connectable) { AgsLineMemberEditor *line_member_editor; line_member_editor = AGS_LINE_MEMBER_EDITOR(connectable); if((AGS_LINE_MEMBER_EDITOR_CONNECTED & (line_member_editor->flags)) == 0){ return; } line_member_editor->flags &= (~AGS_LINE_MEMBER_EDITOR_CONNECTED); g_object_disconnect(G_OBJECT(line_member_editor->add), "any_signal::clicked", G_CALLBACK(ags_line_member_editor_add_callback), line_member_editor, NULL); g_object_disconnect(G_OBJECT(line_member_editor->remove), "any_signal::clicked", G_CALLBACK(ags_line_member_editor_remove_callback), line_member_editor, NULL); ags_connectable_disconnect(AGS_CONNECTABLE(line_member_editor->plugin_browser)); g_object_disconnect(G_OBJECT(line_member_editor->plugin_browser), "any_signal::response", G_CALLBACK(ags_line_member_editor_plugin_browser_response_callback), line_member_editor, NULL); } void ags_line_member_editor_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_line_member_editor_apply(AgsApplicable *applicable) { /* empty */ } void ags_line_member_editor_reset(AgsApplicable *applicable) { AgsLineEditor *line_editor; AgsLineMemberEditor *line_member_editor; GtkHBox *hbox; GtkCheckButton *check_button; GtkLabel *label; GList *recall; gchar *str; gchar *filename, *effect; line_member_editor = AGS_LINE_MEMBER_EDITOR(applicable); line_editor = (AgsLineEditor *) gtk_widget_get_ancestor((GtkWidget *) line_member_editor, AGS_TYPE_LINE_EDITOR); recall = line_editor->channel->recall; while((recall = ags_recall_template_find_all_type(recall, AGS_TYPE_RECALL_LADSPA, AGS_TYPE_RECALL_LV2, G_TYPE_NONE)) != NULL){ if((AGS_RECALL_BULK_MODE & (AGS_RECALL(recall->data)->flags)) != 0){ recall = recall->next; continue; } g_object_get(G_OBJECT(recall->data), "filename", &filename, NULL); if(AGS_IS_RECALL_LADSPA(recall->data)){ g_object_get(G_OBJECT(recall->data), "effect", &effect, NULL); }else if(AGS_IS_RECALL_LV2(recall->data)){ g_object_get(G_OBJECT(recall->data), "uri", &effect, NULL); } hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(line_member_editor->line_member), GTK_WIDGET(hbox), FALSE, FALSE, 0); check_button = (GtkCheckButton *) gtk_check_button_new(); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(check_button), FALSE, FALSE, 0); filename = NULL; effect = NULL; if(AGS_IS_RECALL_LADSPA(recall->data)){ filename = AGS_RECALL_LADSPA(recall->data)->filename; effect = AGS_RECALL_LADSPA(recall->data)->effect; }else if(AGS_IS_RECALL_LV2(recall->data)){ filename = AGS_RECALL_LV2(recall->data)->filename; effect = AGS_RECALL_LV2(recall->data)->effect; }else{ g_critical("unsupported recall"); } str = g_strdup_printf("%s - %s", filename, effect); label = (GtkLabel *) gtk_label_new(str); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); gtk_widget_show_all((GtkWidget *) hbox); g_free(str); recall = recall->next; } } /** * ags_line_member_editor_new: * * Creates an #AgsLineMemberEditor * * Returns: a new #AgsLineMemberEditor * * Since: 1.0.0 */ AgsLineMemberEditor* ags_line_member_editor_new() { AgsLineMemberEditor *line_member_editor; line_member_editor = (AgsLineMemberEditor *) g_object_new(AGS_TYPE_LINE_MEMBER_EDITOR, NULL); return(line_member_editor); } gsequencer-1.4.24/ags/X/ags_machine.h0000644000175000017500000001477213247044247014276 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MACHINE_H__ #define __AGS_MACHINE_H__ #include #include #include #include #include #include #define AGS_TYPE_MACHINE (ags_machine_get_type()) #define AGS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MACHINE, AgsMachine)) #define AGS_MACHINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MACHINE, AgsMachineClass)) #define AGS_IS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MACHINE)) #define AGS_IS_MACHINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MACHINE)) #define AGS_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MACHINE, AgsMachineClass)) #define AGS_MACHINE_AUTOMATION_PORT(ptr) ((AgsMachineAutomationPort *)(ptr)) #define AGS_MACHINE_DEFAULT_VERSION "1.3.0" #define AGS_MACHINE_DEFAULT_BUILD_ID "Sat Dec 30 11:41:50 UTC 2017" typedef struct _AgsMachine AgsMachine; typedef struct _AgsMachineClass AgsMachineClass; typedef struct _AgsMachineAutomationPort AgsMachineAutomationPort; typedef enum{ AGS_MACHINE_SOLO = 1, AGS_MACHINE_IS_EFFECT = 1 << 1, AGS_MACHINE_IS_SEQUENCER = 1 << 2, AGS_MACHINE_IS_SYNTHESIZER = 1 << 3, AGS_MACHINE_TAKES_FILE_INPUT = 1 << 4, AGS_MACHINE_MAPPED_RECALL = 1 << 5, AGS_MACHINE_PREMAPPED_RECALL = 1 << 6, AGS_MACHINE_BLOCK_PLAY = 1 << 7, AGS_MACHINE_BLOCK_STOP = 1 << 8, AGS_MACHINE_CONNECTED = 1 << 9, AGS_MACHINE_REVERSE_NOTATION = 1 << 10, AGS_MACHINE_STICKY_CONTROLS = 1 << 11, }AgsMachineFlags; typedef enum{ AGS_MACHINE_ACCEPT_WAV = 1, AGS_MACHINE_ACCEPT_OGG = 1 << 1, AGS_MACHINE_ACCEPT_SOUNDFONT2 = 1 << 2, }AgsMachineFileInputFlags; typedef enum{ AGS_MACHINE_MONO = 1, AGS_MACHINE_DISABLE_LINE_MEMBER = 1 << 1, AGS_MACHINE_DISABLE_BULK_MEMBER = 1 << 2, }AgsMachineMappingFlags; typedef enum{ AGS_MACHINE_POPUP_COPY_PATTERN = 1, AGS_MACHINE_POPUP_PASTE_PATTERN = 1 << 1, AGS_MACHINE_POPUP_ENVELOPE = 1 << 2, }AgsMachineEditOptions; typedef enum{ AGS_MACHINE_POPUP_CONNECTION_EDITOR = 1, AGS_MACHINE_SHOW_AUDIO_OUTPUT_CONNECTION = 1 << 1, AGS_MACHINE_SHOW_AUDIO_INPUT_CONNECTION = 1 << 2, AGS_MACHINE_POPUP_MIDI_DIALOG = 1 << 3, AGS_MACHINE_SHOW_MIDI_INPUT = 1 << 4, AGS_MACHINE_SHOW_MIDI_OUTPUT = 1 << 5, }AgsMachineConnectionOptions; struct _AgsMachine { GtkHandleBox handle_box; guint flags; guint file_input_flags; guint mapping_flags; guint connection_flags; char *machine_name; gchar *version; gchar *build_id; guint bank_0; guint bank_1; AgsAudio *audio; GtkToggleButton *play; GType output_pad_type; GType output_line_type; GtkContainer *output; GtkWidget *selected_output_pad; GType input_pad_type; GType input_line_type; GtkContainer *input; GtkWidget *selected_input_pad; GtkContainer *bridge; GList *port; GList *enabled_automation_port; GtkMenuToolButton *menu_tool_button; GtkMenu *popup; GtkDialog *properties; GtkDialog *rename; GtkDialog *connection_editor; GtkDialog *midi_dialog; GtkDialog *envelope_dialog; GtkDialog *envelope_info; GObject *application_context; }; struct _AgsMachineClass { GtkHandleBoxClass handle_box; void (*resize_audio_channels)(AgsMachine *machine, guint new_size, guint old_size); void (*resize_pads)(AgsMachine *machine, GType channel_type, guint new_size, guint old_size); void (*map_recall)(AgsMachine *machine); GList* (*find_port)(AgsMachine *machine); void (*done)(AgsMachine *machine, GObject *recall_id); }; struct _AgsMachineAutomationPort { GType channel_type; gchar *control_name; }; GType ags_machine_get_type(void); AgsMachineAutomationPort* ags_machine_automation_port_alloc(GType channel_type, gchar *control_name); void ags_machine_automation_port_free(AgsMachineAutomationPort *automation_port); GList* ags_machine_automation_port_find_channel_type_with_control_name(GList *list, GType channel_type, gchar *control_name); void ags_machine_resize_audio_channels(AgsMachine *machine, guint new_size, guint old_size); void ags_machine_resize_pads(AgsMachine *machine, GType channel_type, guint new_size, guint old_size); void ags_machine_map_recall(AgsMachine *machine); GList* ags_machine_find_port(AgsMachine *machine); void ags_machine_done(AgsMachine *machine, GObject *recall_id); void ags_machine_add_default_recalls(AgsMachine *machine) G_DEPRECATED_FOR(ags_machine_map_recall); AgsMachine* ags_machine_find_by_name(GList *list, char *name); void ags_machine_set_run(AgsMachine *machine, gboolean run); void ags_machine_set_run_extended(AgsMachine *machine, gboolean run, gboolean sequencer, gboolean notation); GtkListStore* ags_machine_get_possible_links(AgsMachine *machine); GtkListStore* ags_machine_get_possible_audio_output_connections(AgsMachine *machine); GtkFileChooserDialog* ags_machine_file_chooser_dialog_new(AgsMachine *machine); void ags_machine_open_files(AgsMachine *machine, GSList *filenames, gboolean overwrite_channels, gboolean create_channels); void ags_machine_copy_pattern(AgsMachine *machine); void ags_machine_popup_add_edit_options(AgsMachine *machine, guint edit_options); void ags_machine_popup_add_connection_options(AgsMachine *machine, guint connection_options); gboolean ags_machine_message_monitor_timeout(AgsMachine *machine); AgsMachine* ags_machine_new(GObject *soundcard); #endif /*__AGS_MACHINE_H__*/ gsequencer-1.4.24/ags/X/ags_export_window.c0000644000175000017500000004436513247044247015576 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_export_window_class_init(AgsExportWindowClass *export_window); void ags_export_window_connectable_interface_init(AgsConnectableInterface *connectable); void ags_export_window_init(AgsExportWindow *export_window); void ags_export_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_export_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_export_window_finalize(GObject *gobject); void ags_export_window_connect(AgsConnectable *connectable); void ags_export_window_disconnect(AgsConnectable *connectable); void ags_export_window_show(GtkWidget *widget); gboolean ags_export_window_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_export_window * @short_description: The export dialog * @title: AgsExportWindow * @section_id: * @include: ags/X/ags_export_window.h * * #AgsExportWindow lets you export to audio files. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; static gpointer ags_export_window_parent_class = NULL; GType ags_export_window_get_type() { static GType ags_type_export_window = 0; if(!ags_type_export_window){ static const GTypeInfo ags_export_window_info = { sizeof (AgsExportWindowClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_export_window_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsExportWindow), 0, /* n_preallocs */ (GInstanceInitFunc) ags_export_window_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_export_window_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_export_window = g_type_register_static(GTK_TYPE_WINDOW, "AgsExportWindow", &ags_export_window_info, 0); g_type_add_interface_static(ags_type_export_window, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_export_window); } void ags_export_window_class_init(AgsExportWindowClass *export_window) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_export_window_parent_class = g_type_class_peek_parent(export_window); /* GObjectClass */ gobject = (GObjectClass *) export_window; gobject->set_property = ags_export_window_set_property; gobject->get_property = ags_export_window_get_property; gobject->finalize = ags_export_window_finalize; /* properties */ /** * AgsExportWindow:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsExportWindow:main-window: * * The assigned #AgsWindow. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) export_window; widget->show = ags_export_window_show; widget->delete_event = ags_export_window_delete_event; } void ags_export_window_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_export_window_connect; connectable->disconnect = ags_export_window_disconnect; } void ags_export_window_init(AgsExportWindow *export_window) { GtkVBox *vbox; GtkHBox *hbox; GtkTable *table; GtkLabel *label; GtkAlignment *alignment; gchar *str; export_window->flags = 0; g_object_set(export_window, "title", i18n("export to audio data"), NULL); export_window->application_context = NULL; export_window->main_window = NULL; /* pack */ vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(export_window), GTK_WIDGET(vbox)); /* live export */ str = ags_config_get_value(ags_config_get_instance(), AGS_CONFIG_GENERIC, "disable-feature"); if(str == NULL || !g_ascii_strncasecmp(str, "experimental", 13)){ export_window->live_export = NULL; }else{ export_window->live_export = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("live export")); gtk_toggle_button_set_active((GtkToggleButton *) export_window->live_export, TRUE); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(export_window->live_export), FALSE, FALSE, 0); } g_free(str); /* exclude sequencer */ export_window->exclude_sequencer = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("exclude sequencers")); gtk_toggle_button_set_active((GtkToggleButton *) export_window->exclude_sequencer, TRUE); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(export_window->exclude_sequencer), FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(5, 2, FALSE); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(table), FALSE, FALSE, 0); /* mode */ label = (GtkLabel *) gtk_label_new(i18n("mode")); g_object_set(G_OBJECT(label), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); export_window->mode = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(export_window->mode, "tact"); //TODO:JK: uncomment me // gtk_combo_box_text_append_text(export_window->mode, // "time"); gtk_combo_box_set_active((GtkComboBox *) export_window->mode, 0); gtk_table_attach(table, GTK_WIDGET(export_window->mode), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* tact */ label = (GtkLabel *) gtk_label_new(i18n("tact")); g_object_set(G_OBJECT(label), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); export_window->tact = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_NOTATION_DEFAULT_LENGTH, 0.25); gtk_spin_button_set_digits(export_window->tact, 2); gtk_table_attach(table, GTK_WIDGET(export_window->tact), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* time */ label = (GtkLabel *) gtk_label_new(i18n("time")); g_object_set(G_OBJECT(label), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 3, 4, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); /* duration */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(hbox), 1, 2, 3, 4, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); export_window->duration = (GtkLabel *) gtk_label_new(ags_navigation_tact_to_time_string(0.0, AGS_SOUNDCARD_DEFAULT_BPM, 1.0)); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(export_window->duration), FALSE, FALSE, 0); /* export soundcard */ export_window->export_soundcard = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(export_window->export_soundcard), FALSE, FALSE, 0); /* add */ alignment = (GtkAlignment *) gtk_alignment_new(1.0, 0.5, 0.0, 0.0); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(alignment), FALSE, FALSE, 0); export_window->add = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(export_window->add)); /* export */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(hbox), FALSE, FALSE, 0); export_window->export = (GtkToggleButton *) gtk_toggle_button_new_with_label(i18n("export")); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(export_window->export), FALSE, FALSE, 0); } void ags_export_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsExportWindow *export_window; export_window = AGS_EXPORT_WINDOW(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) export_window->application_context == application_context){ return; } if(export_window->application_context != NULL){ g_object_unref(export_window->application_context); } if(application_context != NULL){ g_object_ref(application_context); } export_window->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) export_window->main_window == main_window){ return; } if(export_window->main_window != NULL){ g_object_unref(export_window->main_window); } if(main_window != NULL){ g_object_ref(main_window); } export_window->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_export_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsExportWindow *export_window; export_window = AGS_EXPORT_WINDOW(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, export_window->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, export_window->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_export_window_connect(AgsConnectable *connectable) { AgsExportWindow *export_window; GList *list, *list_start; export_window = AGS_EXPORT_WINDOW(connectable); if((AGS_EXPORT_WINDOW_CONNECTED & (export_window->flags)) != 0){ return; } export_window->flags |= AGS_EXPORT_WINDOW_CONNECTED; g_signal_connect(G_OBJECT(export_window->add), "clicked", G_CALLBACK(ags_export_window_add_export_soundcard_callback), export_window); g_signal_connect_after(G_OBJECT(export_window->tact), "value-changed", G_CALLBACK(ags_export_window_tact_callback), export_window); g_signal_connect_after(G_OBJECT(export_window->export), "clicked", G_CALLBACK(ags_export_window_export_callback), export_window); /* export soundcard */ list_start = list = gtk_container_get_children(GTK_CONTAINER(export_window->export_soundcard)); while(list != NULL){ GList *child; child = gtk_container_get_children(GTK_CONTAINER(list->data)); ags_connectable_connect(AGS_CONNECTABLE(child->data)); g_list_free(child); /* iterate */ list = list->next; } g_list_free(list_start); } void ags_export_window_disconnect(AgsConnectable *connectable) { AgsExportWindow *export_window; GList *list, *list_start; export_window = AGS_EXPORT_WINDOW(connectable); if((AGS_EXPORT_WINDOW_CONNECTED & (export_window->flags)) == 0){ return; } export_window->flags &= (~AGS_EXPORT_WINDOW_CONNECTED); g_object_disconnect(G_OBJECT(export_window->add), "any_signal::add", G_CALLBACK(ags_export_window_add_export_soundcard_callback), export_window, NULL); g_object_disconnect(G_OBJECT(export_window->tact), "any_signal::value-changed", G_CALLBACK(ags_export_window_tact_callback), export_window, NULL); g_object_disconnect(G_OBJECT(export_window->export), "any_signal::clicked", G_CALLBACK(ags_export_window_export_callback), export_window, NULL); /* export soundcard */ list_start = list = gtk_container_get_children(GTK_CONTAINER(export_window->export_soundcard)); while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_export_window_finalize(GObject *gobject) { AgsExportWindow *export_window; export_window = (AgsExportWindow *) gobject; if(export_window->application_context != NULL){ g_object_unref(export_window->application_context); } G_OBJECT_CLASS(ags_export_window_parent_class)->finalize(gobject); } void ags_export_window_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_export_window_parent_class)->show(widget); } gboolean ags_export_window_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_export_window_parent_class)->delete_event(widget, event); return(TRUE); } /** * ags_export_window_reload_soundcard_editor: * @export_window: the #AgsExportWindow * * Reload soundcard editor. * * Since: 1.0.0 */ void ags_export_window_reload_soundcard_editor(AgsExportWindow *export_window) { AgsWindow *main_window; AgsExportSoundcard *export_soundcard; GtkHBox *hbox; GtkAlignment *alignment; GtkButton *remove_button; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *list; gchar *backend; gchar *str; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* retrieve main window and application context */ main_window = export_window->main_window; application_context = export_window->application_context; if(application_context == NULL){ return; } /* retrieve soundcard */ pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); pthread_mutex_unlock(application_mutex); /* create export soundcard */ for(i = 0; list != NULL; i++){ /* get soundcar mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) list->data); pthread_mutex_unlock(application_mutex); /* create GtkHBox */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) export_window->export_soundcard, (GtkWidget *) hbox, FALSE, FALSE, 0); /* instantiate export soundcard */ export_soundcard = (AgsExportSoundcard *) g_object_new(AGS_TYPE_EXPORT_SOUNDCARD, "soundcard", list->data, NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) export_soundcard, FALSE, FALSE, 0); ags_connectable_connect(AGS_CONNECTABLE(export_soundcard)); /* remove button */ alignment = (GtkAlignment *) gtk_alignment_new(0.5, 1.0, 0.0, 0.0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) alignment, FALSE, FALSE, 0); remove_button = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_container_add((GtkContainer *) alignment, (GtkWidget *) remove_button); g_signal_connect(G_OBJECT(remove_button), "clicked", G_CALLBACK(ags_export_window_remove_export_soundcard_callback), export_window); /* set backend */ backend = NULL; if(AGS_IS_DEVOUT(list->data)){ if((AGS_DEVOUT_ALSA & (AGS_DEVOUT(list->data)->flags)) != 0){ backend = "alsa"; }else if((AGS_DEVOUT_OSS & (AGS_DEVOUT(list->data)->flags)) != 0){ backend = "oss"; } }else if(AGS_IS_JACK_DEVOUT(list->data)){ backend = "jack"; }else if(AGS_IS_PULSE_DEVOUT(list->data)){ backend = "pulse"; }else if(AGS_IS_CORE_AUDIO_DEVOUT(list->data)){ backend = "core-audio"; } ags_export_soundcard_set_backend(export_soundcard, backend); ags_export_soundcard_refresh_card(export_soundcard); /* set card */ pthread_mutex_lock(soundcard_mutex); str = ags_soundcard_get_device(AGS_SOUNDCARD(list->data)); pthread_mutex_unlock(soundcard_mutex); ags_export_soundcard_set_card(export_soundcard, str); /* filename */ str = g_strdup_printf("out-%d.wav", i); ags_export_soundcard_set_filename(export_soundcard, str); g_free(str); /* set format */ ags_export_soundcard_set_format(export_soundcard, AGS_EXPORT_SOUNDCARD_FORMAT_WAV); /* show all */ gtk_widget_show_all((GtkWidget *) hbox); /* iterate */ list = list->next; } } /** * ags_export_window_new: * * Instantiate an #AgsExportWindow * * Returns: an #AgsExportWindow * * Since: 1.0.0 */ AgsExportWindow* ags_export_window_new() { AgsExportWindow *export_window; export_window = (AgsExportWindow *) g_object_new(AGS_TYPE_EXPORT_WINDOW, NULL); return(export_window); } gsequencer-1.4.24/ags/X/ags_wave_window_callbacks.c0000644000175000017500000000145713247044247017211 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include gsequencer-1.4.24/ags/X/ags_machine_editor_callbacks.h0000644000175000017500000000262013246707333017631 00000000000000/* 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 . */ #ifndef __AGS_MACHINE_EDITOR_CALLBACKS_H__ #define __AGS_MACHINE_EDITOR_CALLBACKS_H__ #include #include #include #include int ags_machine_editor_switch_page_callback(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, AgsMachineEditor *machine_editor); int ags_machine_editor_apply_callback(GtkWidget *widget, AgsMachineEditor *machine_editor); int ags_machine_editor_ok_callback(GtkWidget *widget, AgsMachineEditor *machine_editor); int ags_machine_editor_cancel_callback(GtkWidget *widget, AgsMachineEditor *machine_editor); #endif /*__AGS_MACHINE_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_dssi_browser_callbacks.c0000644000175000017500000001534713246707333017371 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_dssi_browser_plugin_filename_callback(GtkComboBoxText *combo_box, AgsDssiBrowser *dssi_browser) { GtkComboBoxText *filename, *effect; AgsDssiManager *dssi_manager; AgsDssiPlugin *dssi_plugin; GList *list; GList *base_plugin; gchar *str; void *plugin_so; DSSI_Descriptor_Function dssi_descriptor; DSSI_Descriptor *plugin_descriptor; list = gtk_container_get_children(GTK_CONTAINER(dssi_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data); gtk_list_store_clear(GTK_LIST_STORE(effect)); dssi_manager = ags_dssi_manager_get_instance(); base_plugin = dssi_manager->dssi_plugin; str = gtk_combo_box_text_get_active_text(filename); while((base_plugin = ags_base_plugin_find_filename(base_plugin, str)) != NULL){ if(AGS_BASE_PLUGIN(base_plugin->data)->effect != NULL){ gtk_combo_box_text_append_text(effect, AGS_BASE_PLUGIN(base_plugin->data)->effect); } base_plugin = base_plugin->next; } gtk_combo_box_set_active((GtkComboBox *) effect, 0); } void ags_dssi_browser_plugin_effect_callback(GtkComboBoxText *combo_box, AgsDssiBrowser *dssi_browser) { GtkTable *table; GtkComboBoxText *filename, *effect; GtkLabel *label; AgsDssiPlugin *dssi_plugin; GList *list, *list_start, *child, *child_start; gchar *str, *tmp; guint port_count; guint y; unsigned long i; void *plugin_so; DSSI_Descriptor_Function dssi_descriptor; DSSI_Descriptor *plugin_descriptor; LADSPA_PortDescriptor *port_descriptor; unsigned long plugin_index; /* retrieve filename and effect */ list_start = list = gtk_container_get_children(GTK_CONTAINER(dssi_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data); g_list_free(list_start); /* update description */ list_start = list = gtk_container_get_children(GTK_CONTAINER(dssi_browser->description)); // ags_dssi_manager_load_file(gtk_combo_box_text_get_active_text(filename)); dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), gtk_combo_box_text_get_active_text(filename), gtk_combo_box_text_get_active_text(effect)); plugin_so = AGS_BASE_PLUGIN(dssi_plugin)->plugin_so; plugin_index = (unsigned long) gtk_combo_box_get_active((GtkComboBox *) effect); if(plugin_index != -1 && plugin_so){ dssi_descriptor = (DSSI_Descriptor_Function) dlsym(plugin_so, "dssi_descriptor"); if(dlerror() == NULL && dssi_descriptor){ plugin_descriptor = dssi_descriptor(plugin_index); port_descriptor = plugin_descriptor->LADSPA_Plugin->PortDescriptors; /* update ui - reading plugin file */ label = GTK_LABEL(list->data); str = g_strconcat(i18n("Label"), ": ", plugin_descriptor->LADSPA_Plugin->Label, NULL); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strconcat(i18n("Maker"), ": ", plugin_descriptor->LADSPA_Plugin->Label, NULL); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strconcat(i18n("Copyright"), ": ", plugin_descriptor->LADSPA_Plugin->Label, NULL); gtk_label_set_text(label, str); g_free(str); port_count = plugin_descriptor->LADSPA_Plugin->PortCount; list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Ports")); gtk_label_set_text(label, str); g_free(str); list = list->next; table = GTK_TABLE(list->data); /* update ui - port information */ child_start = child = gtk_container_get_children(GTK_CONTAINER(table)); while(child != NULL){ gtk_widget_destroy(GTK_WIDGET(child->data)); child = child->next; } g_list_free(child_start); for(i = 0, y = 0; i < port_count; i++){ if(!(LADSPA_IS_PORT_CONTROL(port_descriptor[i]) && (LADSPA_IS_PORT_INPUT(port_descriptor[i]) || LADSPA_IS_PORT_OUTPUT(port_descriptor[i])))){ continue; } str = g_strdup(plugin_descriptor->LADSPA_Plugin->PortNames[i]); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", str, NULL); gtk_table_attach_defaults(table, GTK_WIDGET(label), 0, 1, y, y + 1); gtk_table_attach_defaults(table, GTK_WIDGET(ags_dssi_browser_combo_box_controls_new()), 1, 2, y, y + 1); y++; } gtk_widget_show_all((GtkWidget *) table); } }else{ /* update ui - empty */ label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Label")); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Maker")); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Copyright")); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Ports")); gtk_label_set_text(label, str); g_free(str); list = list->next; table = GTK_TABLE(list->data); /* update ui - no ports */ child_start = child = gtk_container_get_children(GTK_CONTAINER(table)); while(child != NULL){ gtk_widget_destroy(GTK_WIDGET(child->data)); child = child->next; } g_list_free(child_start); } g_list_free(list_start); } gsequencer-1.4.24/ags/X/ags_wave_editor.h0000644000175000017500000000764413247044247015202 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WAVE_EDITOR_H__ #define __AGS_WAVE_EDITOR_H__ #include #include #include #include #include #include #include #include #include #include #include #define AGS_TYPE_WAVE_EDITOR (ags_wave_editor_get_type()) #define AGS_WAVE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WAVE_EDITOR, AgsWaveEditor)) #define AGS_WAVE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_WAVE_EDITOR, AgsWaveEditorClass)) #define AGS_IS_WAVE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_WAVE_EDITOR)) #define AGS_IS_WAVE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_WAVE_EDITOR)) #define AGS_WAVE_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_WAVE_EDITOR, AgsWaveEditorClass)) #define AGS_WAVE_EDITOR_MAX_VALUE_COUNT (64 * 16 * 16 * 1200) #define AGS_WAVE_EDITOR_MAX_CONTROLS (64 * 16 * 16 * 1200) #define AGS_WAVE_EDITOR_DEFAULT_VERSION "1.4.0" #define AGS_WAVE_EDITOR_DEFAULT_BUILD_ID "Thu Jan 4 19:47:23 UTC 2018" typedef struct _AgsWaveEditor AgsWaveEditor; typedef struct _AgsWaveEditorClass AgsWaveEditorClass; typedef enum{ AGS_WAVE_EDITOR_CONNECTED = 1, AGS_WAVE_EDITOR_RESET_AUDIO_HSCROLLBAR = 1 << 1, AGS_WAVE_EDITOR_RESET_OUTPUT_HSCROLLBAR = 1 << 2, AGS_WAVE_EDITOR_RESET_INPUT_HSCROLLBAR = 1 << 3, AGS_WAVE_EDITOR_PASTE_MATCH_LINE = 1 << 4, AGS_WAVE_EDITOR_PASTE_NO_DUPLICATES = 1 << 5, }AgsWaveEditorFlags; struct _AgsWaveEditor { GtkVBox vbox; guint flags; gchar *version; gchar *build_id; guint tact_counter; gdouble current_tact; GObject *soundcard; GtkHPaned *paned; AgsMachineSelector *machine_selector; AgsMachine *selected_machine; AgsWaveToolbar *wave_toolbar; AgsNotebook *notebook; AgsRuler *ruler; AgsScrolledLevelBox *scrolled_level_box; AgsScrolledWaveEditBox *scrolled_wave_edit_box; GtkVScrollbar *vscrollbar; GtkHScrollbar *hscrollbar; }; struct _AgsWaveEditorClass { GtkVBoxClass vbox; void (*machine_changed)(AgsWaveEditor *wave_editor, AgsMachine *machine); }; GType ags_wave_editor_get_type(void); void ags_wave_editor_reset_audio_scrollbar(AgsWaveEditor *wave_editor); void ags_wave_editor_reset_output_scrollbar(AgsWaveEditor *wave_editor); void ags_wave_editor_reset_input_scrollbar(AgsWaveEditor *wave_editor); void ags_wave_editor_machine_changed(AgsWaveEditor *wave_editor, AgsMachine *machine); void ags_wave_editor_select_region(AgsWaveEditor *wave_editor, guint x0, gdouble y0, guint x1, gdouble y1); void ags_wave_editor_select_all(AgsWaveEditor *wave_editor); void ags_wave_editor_paste(AgsWaveEditor *wave_editor); void ags_wave_editor_copy(AgsWaveEditor *wave_editor); void ags_wave_editor_cut(AgsWaveEditor *wave_editor); void ags_wave_editor_invert(AgsWaveEditor *wave_editor); AgsWaveEditor* ags_wave_editor_new(); #endif /*__AGS_WAVE_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_pad_callbacks.h0000644000175000017500000000246513247044247015431 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PAD_CALLBACKS_H__ #define __AGS_PAD_CALLBACKS_H__ #include #include #include #include #include #include void ags_pad_group_clicked_callback(GtkWidget *widget, AgsPad *pad); void ags_pad_mute_clicked_callback(GtkWidget *widget, AgsPad *pad); void ags_pad_solo_clicked_callback(GtkWidget *widget, AgsPad *pad); void ags_pad_init_channel_launch_callback(AgsTask *task, AgsPad *input_pad); #endif /*__AGS_PAD_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_link_collection_editor_callbacks.c0000644000175000017500000000406313246707333021373 00000000000000/* 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 . */ #include #include int ags_link_collection_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLinkCollectionEditor *link_collection_editor) { AgsMachineEditor *machine_editor; if(old_parent != NULL) return(0); machine_editor = (AgsMachineEditor *) gtk_widget_get_ancestor(widget, AGS_TYPE_MACHINE_EDITOR); if(machine_editor != NULL && machine_editor->machine != NULL){ gtk_combo_box_set_model(link_collection_editor->link, GTK_TREE_MODEL(ags_machine_get_possible_links(machine_editor->machine))); ags_link_collection_editor_check(link_collection_editor); } return(0); } void ags_link_collection_editor_link_callback(GtkComboBox *combo, AgsLinkCollectionEditor *link_collection_editor) { ags_link_collection_editor_check(link_collection_editor); } void ags_link_collection_editor_first_line_callback(GtkSpinButton *spin_button, AgsLinkCollectionEditor *link_collection_editor) { ags_link_collection_editor_check(link_collection_editor); } void ags_link_collection_editor_first_link_callback(GtkSpinButton *spin_button, AgsLinkCollectionEditor *link_collection_editor) { ags_link_collection_editor_check(link_collection_editor); } gsequencer-1.4.24/ags/X/ags_automation_window.c0000644000175000017500000002023513247044247016423 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_automation_window_class_init(AgsAutomationWindowClass *automation_window); void ags_automation_window_connectable_interface_init(AgsConnectableInterface *connectable); void ags_automation_window_init(AgsAutomationWindow *automation_window); void ags_automation_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_automation_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_automation_window_finalize(GObject *gobject); void ags_automation_window_connect(AgsConnectable *connectable); void ags_automation_window_disconnect(AgsConnectable *connectable); gboolean ags_automation_window_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_automation_window * @short_description: The automation window * @title: AgsAutomationWindow * @section_id: * @include: ags/X/ags_automation_window.h * * #AgsAutomationWindow lets you automation to audio files. Currently only * WAV supported. */ enum{ PROP_0, PROP_SOUNDCARD, }; static gpointer ags_automation_window_parent_class = NULL; GType ags_automation_window_get_type() { static GType ags_type_automation_window = 0; if(!ags_type_automation_window){ static const GTypeInfo ags_automation_window_info = { sizeof (AgsAutomationWindowClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_automation_window_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAutomationWindow), 0, /* n_preallocs */ (GInstanceInitFunc) ags_automation_window_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_automation_window_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_automation_window = g_type_register_static(GTK_TYPE_WINDOW, "AgsAutomationWindow", &ags_automation_window_info, 0); g_type_add_interface_static(ags_type_automation_window, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_automation_window); } void ags_automation_window_class_init(AgsAutomationWindowClass *automation_window) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_automation_window_parent_class = g_type_class_peek_parent(automation_window); /* GObjectClass */ gobject = (GObjectClass *) automation_window; gobject->set_property = ags_automation_window_set_property; gobject->get_property = ags_automation_window_get_property; gobject->finalize = ags_automation_window_finalize; /** * AgsAutomationWindow:soundcard: * * The assigned #AgsSoundcard acting as default sink. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) automation_window; widget->delete_event = ags_automation_window_delete_event; } void ags_automation_window_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_automation_window_connect; connectable->disconnect = ags_automation_window_disconnect; } void ags_automation_window_init(AgsAutomationWindow *automation_window) { g_object_set(G_OBJECT(automation_window), "title", "edit automation", NULL); automation_window->flags = 0; automation_window->soundcard = NULL; automation_window->automation_editor = ags_automation_editor_new(); gtk_container_add((GtkContainer *) automation_window, (GtkWidget *) automation_window->automation_editor); } void ags_automation_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAutomationWindow *automation_window; automation_window = AGS_AUTOMATION_WINDOW(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(automation_window->soundcard == soundcard){ return; } if(automation_window->soundcard != NULL){ g_object_unref(automation_window->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } automation_window->soundcard = soundcard; g_object_set(G_OBJECT(automation_window->automation_editor), "soundcard", soundcard, NULL); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAutomationWindow *automation_window; automation_window = AGS_AUTOMATION_WINDOW(gobject); switch(prop_id){ case PROP_SOUNDCARD: g_value_set_object(value, automation_window->soundcard); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_window_connect(AgsConnectable *connectable) { AgsAutomationWindow *automation_window; automation_window = AGS_AUTOMATION_WINDOW(connectable); if((AGS_AUTOMATION_WINDOW_CONNECTED & (automation_window->flags)) != 0){ return; } automation_window->flags |= AGS_AUTOMATION_WINDOW_CONNECTED; if(automation_window->automation_editor != NULL){ ags_connectable_connect(AGS_CONNECTABLE(automation_window->automation_editor)); } } void ags_automation_window_disconnect(AgsConnectable *connectable) { AgsAutomationWindow *automation_window; automation_window = AGS_AUTOMATION_WINDOW(connectable); if((AGS_AUTOMATION_WINDOW_CONNECTED & (automation_window->flags)) == 0){ return; } automation_window->flags &= (~AGS_AUTOMATION_WINDOW_CONNECTED); if(automation_window->automation_editor != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(automation_window->automation_editor)); } } void ags_automation_window_finalize(GObject *gobject) { AgsAutomationWindow *automation_window; automation_window = (AgsAutomationWindow *) gobject; if(automation_window->soundcard != NULL){ g_object_unref(G_OBJECT(automation_window->soundcard)); } G_OBJECT_CLASS(ags_automation_window_parent_class)->finalize(gobject); } gboolean ags_automation_window_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); return(TRUE); } /** * ags_automation_window_new: * @parent_window: the parent #AgsWindow * * Instantiate #AgsAutomationWindow * * Returns: the new #AgsAutomationWindow instance * * Since: 1.0.0 */ AgsAutomationWindow* ags_automation_window_new(GtkWidget *parent_window) { AgsAutomationWindow *automation_window; automation_window = (AgsAutomationWindow *) g_object_new(AGS_TYPE_AUTOMATION_WINDOW, NULL); automation_window->parent_window = parent_window; return(automation_window); } gsequencer-1.4.24/ags/X/ags_navigation_callbacks.h0000644000175000017500000000467613246707333017033 00000000000000/* 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 . */ #ifndef __AGS_NAVIGATION_CALLBACKS_H__ #define __AGS_NAVIGATION_CALLBACKS_H__ #include #include #include #include void ags_navigation_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, gpointer data); void ags_navigation_expander_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_bpm_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_rewind_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_prev_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_play_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_stop_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_next_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_forward_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_loop_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_position_tact_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_duration_tact_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_loop_left_tact_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_loop_right_tact_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_raster_callback(GtkWidget *widget, AgsNavigation *navigation); void ags_navigation_soundcard_stop_callback(GObject *soundcard, AgsNavigation *navigation); #endif /*__AGS_NAVIGATION_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_wave_editor.c0000644000175000017500000003422213247044247015165 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_wave_editor_class_init(AgsWaveEditorClass *wave_editor); void ags_wave_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_wave_editor_init(AgsWaveEditor *wave_editor); void ags_wave_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_wave_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_wave_editor_connect(AgsConnectable *connectable); void ags_wave_editor_disconnect(AgsConnectable *connectable); void ags_wave_editor_finalize(GObject *gobject); void ags_wave_editor_real_machine_changed(AgsWaveEditor *wave_editor, AgsMachine *machine); enum{ MACHINE_CHANGED, LAST_SIGNAL, }; enum{ PROP_0, PROP_SOUNDCARD, }; static gpointer ags_wave_editor_parent_class = NULL; static guint wave_editor_signals[LAST_SIGNAL]; /** * SECTION:ags_wave_editor * @short_description: A composite widget to edit wave * @title: AgsWaveEditor * @section_id: * @include: ags/X/ags_wave_editor.h * * #AgsWaveEditor is a composite widget to edit wave. You may select machines * or change editor tool to do wave. */ GType ags_wave_editor_get_type(void) { static GType ags_type_wave_editor = 0; if(!ags_type_wave_editor){ static const GTypeInfo ags_wave_editor_info = { sizeof (AgsWaveEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_wave_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsWaveEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_wave_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_wave_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_wave_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsWaveEditor", &ags_wave_editor_info, 0); g_type_add_interface_static(ags_type_wave_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_wave_editor); } void ags_wave_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_wave_editor_connect; connectable->disconnect = ags_wave_editor_disconnect; } void ags_wave_editor_class_init(AgsWaveEditorClass *wave_editor) { GObjectClass *gobject; GParamSpec *param_spec; ags_wave_editor_parent_class = g_type_class_peek_parent(wave_editor); /* GObjectClass */ gobject = (GObjectClass *) wave_editor; gobject->set_property = ags_wave_editor_set_property; gobject->get_property = ags_wave_editor_get_property; gobject->finalize = ags_wave_editor_finalize; /* properties */ /** * AgsWaveEditor:soundcard: * * The assigned #AgsSoundcard acting as default sink. * * Since: 1.2.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* AgsEditorClass */ wave_editor->machine_changed = ags_wave_editor_real_machine_changed; /* signals */ /** * AgsEditor::machine-changed: * @editor: the object to change machine. * @machine: the #AgsMachine to set * * The ::machine-changed signal notifies about changed machine. * * Since: 1.2.0 */ wave_editor_signals[MACHINE_CHANGED] = g_signal_new("machine-changed", G_TYPE_FROM_CLASS(wave_editor), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsWaveEditorClass, machine_changed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_wave_editor_init(AgsWaveEditor *wave_editor) { GtkViewport *viewport; GtkScrolledWindow *scrolled_window; GtkTable *table; GtkAdjustment *adjustment; g_signal_connect_after((GObject *) wave_editor, "parent-set", G_CALLBACK(ags_wave_editor_parent_set_callback), wave_editor); wave_editor->flags = 0; wave_editor->version = AGS_WAVE_EDITOR_DEFAULT_VERSION; wave_editor->build_id = AGS_WAVE_EDITOR_DEFAULT_BUILD_ID; /* offset */ wave_editor->tact_counter = 0; wave_editor->current_tact = 0.0; /* soundcard */ wave_editor->soundcard = NULL; wave_editor->wave_toolbar = ags_wave_toolbar_new(); gtk_box_pack_start((GtkBox *) wave_editor, (GtkWidget *) wave_editor->wave_toolbar, FALSE, FALSE, 0); wave_editor->paned = (GtkHPaned *) gtk_hpaned_new(); gtk_box_pack_start((GtkBox *) wave_editor, (GtkWidget *) wave_editor->paned, TRUE, TRUE, 0); /* machine selector */ viewport = gtk_viewport_new(NULL, NULL); g_object_set(viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_paned_pack1((GtkPaned *) wave_editor->paned, (GtkWidget *) viewport, FALSE, TRUE); scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_container_add(viewport, scrolled_window); wave_editor->machine_selector = g_object_new(AGS_TYPE_MACHINE_SELECTOR, "homogeneous", FALSE, "spacing", 0, NULL); gtk_label_set_label(wave_editor->machine_selector->label, i18n("wave")); wave_editor->machine_selector->popup = ags_machine_selector_popup_new(wave_editor->machine_selector); g_object_set(wave_editor->machine_selector->menu_button, "menu", wave_editor->machine_selector->popup, NULL); gtk_scrolled_window_add_with_viewport(scrolled_window, (GtkWidget *) wave_editor->machine_selector); /* selected machine */ wave_editor->selected_machine = NULL; /* table */ viewport = gtk_viewport_new(NULL, NULL); g_object_set(viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_paned_pack2((GtkPaned *) wave_editor->paned, (GtkWidget *) viewport, TRUE, TRUE); table = (GtkTable *) gtk_table_new(4, 3, FALSE); gtk_container_add(viewport, table); /* scrollbars */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, AGS_WAVE_EDIT_DEFAULT_CONTROL_HEIGHT, 1.0); wave_editor->vscrollbar = gtk_vscrollbar_new(adjustment); gtk_table_attach(table, (GtkWidget *) wave_editor->vscrollbar, 2, 3, 2, 3, GTK_FILL, GTK_FILL, 0, 0); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, AGS_WAVE_EDIT_DEFAULT_CONTROL_WIDTH, 1.0); wave_editor->hscrollbar = gtk_hscrollbar_new(adjustment); gtk_table_attach(table, (GtkWidget *) wave_editor->hscrollbar, 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); /* notebook */ wave_editor->notebook = g_object_new(AGS_TYPE_NOTEBOOK, "homogeneous", FALSE, "spacing", 0, "prefix", i18n("line"), NULL); gtk_table_attach(table, (GtkWidget *) wave_editor->notebook, 0, 3, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); /* ruler */ wave_editor->ruler = ags_ruler_new(); gtk_table_attach(table, (GtkWidget *) wave_editor->ruler, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); /* level */ wave_editor->scrolled_level_box = ags_scrolled_level_box_new(); wave_editor->scrolled_level_box->level_box = ags_vlevel_box_new(); gtk_container_add(wave_editor->scrolled_level_box->viewport, wave_editor->scrolled_level_box->level_box); gtk_table_attach(table, (GtkWidget *) wave_editor->scrolled_level_box, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* wave edit */ wave_editor->scrolled_wave_edit_box = ags_scrolled_wave_edit_box_new(); wave_editor->scrolled_wave_edit_box->wave_edit_box = ags_vwave_edit_box_new(); gtk_container_add(wave_editor->scrolled_wave_edit_box->viewport, wave_editor->scrolled_wave_edit_box->wave_edit_box); gtk_table_attach(table, (GtkWidget *) wave_editor->scrolled_wave_edit_box, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); gtk_widget_set_events(GTK_WIDGET(wave_editor->scrolled_wave_edit_box->viewport), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_CONTROL_MASK); } void ags_wave_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsWaveEditor *wave_editor; wave_editor = AGS_WAVE_EDITOR(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(wave_editor->soundcard == soundcard){ return; } if(wave_editor->soundcard != NULL){ g_object_unref(wave_editor->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } wave_editor->soundcard = soundcard; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_wave_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsWaveEditor *wave_editor; wave_editor = AGS_WAVE_EDITOR(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, wave_editor->soundcard); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_wave_editor_connect(AgsConnectable *connectable) { AgsWaveEditor *wave_editor; wave_editor = AGS_WAVE_EDITOR(connectable); if((AGS_WAVE_EDITOR_CONNECTED & (wave_editor->flags)) != 0){ return; } wave_editor->flags |= AGS_WAVE_EDITOR_CONNECTED; /* */ g_signal_connect((GObject *) wave_editor->machine_selector, "changed", G_CALLBACK(ags_wave_editor_machine_changed_callback), (gpointer) wave_editor); /* */ ags_connectable_connect(AGS_CONNECTABLE(wave_editor->wave_toolbar)); ags_connectable_connect(AGS_CONNECTABLE(wave_editor->machine_selector)); } void ags_wave_editor_disconnect(AgsConnectable *connectable) { AgsWaveEditor *wave_editor; wave_editor = AGS_WAVE_EDITOR(connectable); ags_connectable_disconnect(AGS_CONNECTABLE(wave_editor->wave_toolbar)); ags_connectable_disconnect(AGS_CONNECTABLE(wave_editor->machine_selector)); } void ags_wave_editor_finalize(GObject *gobject) { AgsWaveEditor *wave_editor; wave_editor = AGS_WAVE_EDITOR(gobject); G_OBJECT_CLASS(ags_wave_editor_parent_class)->finalize(gobject); } void ags_wave_editor_real_machine_changed(AgsWaveEditor *wave_editor, AgsMachine *machine) { AgsMachine *machine_old; AgsMutexManager *mutex_manager; GList *list, *list_start; GList *child; guint output_lines, input_lines; guint pads; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(wave_editor->selected_machine == machine){ return; } machine_old = wave_editor->selected_machine; wave_editor->selected_machine = machine; if(machine == NULL){ return; } /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* get audio properties */ pthread_mutex_lock(audio_mutex); output_lines = machine->audio->output_lines; input_lines = machine->audio->input_lines; pthread_mutex_unlock(audio_mutex); //TODO:JK: implement me } /** * ags_wave_editor_machine_changed: * @wave_editor: an #AgsWaveEditor * @machine: the new #AgsMachine * * Is emitted as machine changed of wave editor. * * Since: 1.2.0 */ void ags_wave_editor_machine_changed(AgsWaveEditor *wave_editor, AgsMachine *machine) { g_return_if_fail(AGS_IS_WAVE_EDITOR(wave_editor)); g_object_ref((GObject *) wave_editor); g_signal_emit((GObject *) wave_editor, wave_editor_signals[MACHINE_CHANGED], 0, machine); g_object_unref((GObject *) wave_editor); } void ags_wave_editor_select_all(AgsWaveEditor *wave_editor) { //TODO:JK: implement me } void ags_wave_editor_paste(AgsWaveEditor *wave_editor) { //TODO:JK: implement me } void ags_wave_editor_copy(AgsWaveEditor *wave_editor) { //TODO:JK: implement me } void ags_wave_editor_cut(AgsWaveEditor *wave_editor) { //TODO:JK: implement me } void ags_wave_editor_invert(AgsWaveEditor *wave_editor) { g_message("ags_wave_editor_invert() - not implemented"); } /** * ags_wave_editor_new: * * Create a new #AgsWaveEditor. * * Returns: a new #AgsWaveEditor * * Since: 1.2.0 */ AgsWaveEditor* ags_wave_editor_new() { AgsWaveEditor *wave_editor; wave_editor = (AgsWaveEditor *) g_object_new(AGS_TYPE_WAVE_EDITOR, NULL); return(wave_editor); } gsequencer-1.4.24/ags/X/ags_property_collection_editor_callbacks.c0000644000175000017500000000465113246707333022325 00000000000000/* 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 . */ #include #include void ags_property_collection_editor_add_collection_callback(GtkButton *button, AgsPropertyCollectionEditor *property_collection_editor) { GtkTable *table; GtkWidget *collection; GtkButton *remove_collection; GtkAlignment *alignment; table = (GtkTable *) gtk_table_new(2, 2, FALSE); gtk_box_pack_start(GTK_BOX(property_collection_editor->child), GTK_WIDGET(table), FALSE, FALSE, 0); collection = (GtkWidget *) g_object_newv(property_collection_editor->child_type, property_collection_editor->child_parameter_count, property_collection_editor->child_parameter); g_object_set_data(G_OBJECT(table), "AgsChild", collection); gtk_table_attach(table, GTK_WIDGET(collection), 0, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); alignment = (GtkAlignment *) gtk_alignment_new(1.0, 0.0, 0.0, 0.0); gtk_table_attach(table, GTK_WIDGET(alignment), 1, 2, 1, 2, GTK_FILL, 0, 0, 0); remove_collection = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(remove_collection)); g_signal_connect_after(G_OBJECT(remove_collection), "clicked", G_CALLBACK(ags_property_collection_editor_remove_collection_callback), table); gtk_table_set_row_spacing(table, 0, 8); ags_connectable_connect(AGS_CONNECTABLE(collection)); gtk_widget_show_all(GTK_WIDGET(table)); } void ags_property_collection_editor_remove_collection_callback(GtkButton *button, GtkTable *table) { gtk_widget_destroy(GTK_WIDGET(table)); } gsequencer-1.4.24/ags/X/ags_property_collection_editor.c0000644000175000017500000002046613247044247020327 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_property_collection_editor_class_init(AgsPropertyCollectionEditorClass *property_collection_editor); void ags_property_collection_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_property_collection_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_property_collection_editor_init(AgsPropertyCollectionEditor *property_collection_editor); void ags_property_collection_editor_connect(AgsConnectable *connectable); void ags_property_collection_editor_disconnect(AgsConnectable *connectable); void ags_property_collection_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_property_collection_editor_apply(AgsApplicable *applicable); void ags_property_collection_editor_reset(AgsApplicable *applicable); /** * SECTION:ags_property_collection_editor * @short_description: Edit propertys in bulk mode. * @title: AgsPropertyCollectionEditor * @section_id: * @include: ags/X/ags_property_collection_editor.h * * #AgsPropertyCollectionEditor is a composite widget to modify propertys in bulk mode. A property collection * editor should be packed by a #AgsMachineEditor. */ AgsConnectableInterface *ags_property_collection_editor_parent_connectable_interface; GType ags_property_collection_editor_get_type(void) { static GType ags_type_property_collection_editor = 0; if(!ags_type_property_collection_editor){ static const GTypeInfo ags_property_collection_editor_info = { sizeof (AgsPropertyCollectionEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_property_collection_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPropertyCollectionEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_property_collection_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_property_collection_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_property_collection_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_property_collection_editor = g_type_register_static(AGS_TYPE_PROPERTY_EDITOR, "AgsPropertyCollectionEditor", &ags_property_collection_editor_info, 0); g_type_add_interface_static(ags_type_property_collection_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_property_collection_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_property_collection_editor); } void ags_property_collection_editor_class_init(AgsPropertyCollectionEditorClass *property_collection_editor) { } void ags_property_collection_editor_connectable_interface_init(AgsConnectableInterface *connectable) { ags_property_collection_editor_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_property_collection_editor_connect; connectable->disconnect = ags_property_collection_editor_disconnect; } void ags_property_collection_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_property_collection_editor_set_update; applicable->apply = ags_property_collection_editor_apply; applicable->reset = ags_property_collection_editor_reset; } void ags_property_collection_editor_init(AgsPropertyCollectionEditor *property_collection_editor) { GtkAlignment *alignment; property_collection_editor->flags = 0; property_collection_editor->child = (GtkVBox *) gtk_vbox_new(FALSE, 16); gtk_box_pack_start(GTK_BOX(property_collection_editor), GTK_WIDGET(property_collection_editor->child), TRUE, TRUE, 0); alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.0, 0.0, 0.0); gtk_box_pack_start(GTK_BOX(property_collection_editor), GTK_WIDGET(alignment), FALSE, FALSE, 0); property_collection_editor->add_collection = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(property_collection_editor->add_collection)); } void ags_property_collection_editor_connect(AgsConnectable *connectable) { AgsPropertyCollectionEditor *property_collection_editor; if((AGS_PROPERTY_EDITOR_CONNECTED & (AGS_PROPERTY_EDITOR(connectable)->flags)) != 0){ return; } /* call parent */ ags_property_collection_editor_parent_connectable_interface->connect(connectable); /* AgsPropertyCollectionEditor */ property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(connectable); g_signal_connect(G_OBJECT(property_collection_editor->add_collection), "clicked", G_CALLBACK(ags_property_collection_editor_add_collection_callback), property_collection_editor); } void ags_property_collection_editor_disconnect(AgsConnectable *connectable) { AgsPropertyCollectionEditor *property_collection_editor; if((AGS_PROPERTY_EDITOR_CONNECTED & (AGS_PROPERTY_EDITOR(connectable)->flags)) == 0){ return; } /* AgsPropertyCollectionEditor */ property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(connectable); g_object_disconnect(G_OBJECT(property_collection_editor->add_collection), "any_signal::clicked", G_CALLBACK(ags_property_collection_editor_add_collection_callback), property_collection_editor, NULL); /* call parent */ ags_property_collection_editor_parent_connectable_interface->disconnect(connectable); } void ags_property_collection_editor_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_property_collection_editor_apply(AgsApplicable *applicable) { AgsPropertyCollectionEditor *property_collection_editor; GtkWidget *child; GList *list, *list_start; property_collection_editor = AGS_PROPERTY_COLLECTION_EDITOR(applicable); if((AGS_PROPERTY_EDITOR_ENABLED & (AGS_PROPERTY_EDITOR(property_collection_editor)->flags)) == 0) return; list_start = list = gtk_container_get_children(GTK_CONTAINER(property_collection_editor->child)); while(list != NULL){ child = GTK_WIDGET(g_object_get_data(G_OBJECT(list->data), "AgsChild")); ags_applicable_apply(AGS_APPLICABLE(child)); list = list->next; } g_list_free(list_start); } void ags_property_collection_editor_reset(AgsApplicable *applicable) { /* empty */ } /** * ags_property_collection_editor_new: * @child_type: either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT * @child_parameter_count: child parameter count * @child_parameter: child parameter * * Creates an #AgsPropertyCollectionEditor * * Returns: a new #AgsPropertyCollectionEditor * * Since: 1.0.0 */ AgsPropertyCollectionEditor* ags_property_collection_editor_new(GType child_type, guint child_parameter_count, GParameter *child_parameter) { AgsPropertyCollectionEditor *property_collection_editor; property_collection_editor = (AgsPropertyCollectionEditor *) g_object_new(AGS_TYPE_PROPERTY_COLLECTION_EDITOR, NULL); property_collection_editor->child_type = child_type; property_collection_editor->child_parameter_count = child_parameter_count; property_collection_editor->child_parameter = child_parameter; return(property_collection_editor); } gsequencer-1.4.24/ags/X/ags_performance_preferences.h0000644000175000017500000000467313247044247017553 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PERFORMANCE_PREFERENCES_H__ #define __AGS_PERFORMANCE_PREFERENCES_H__ #include #include #include #define AGS_TYPE_PERFORMANCE_PREFERENCES (ags_performance_preferences_get_type()) #define AGS_PERFORMANCE_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PERFORMANCE_PREFERENCES, AgsPerformancePreferences)) #define AGS_PERFORMANCE_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PERFORMANCE_PREFERENCES, AgsPerformancePreferencesClass)) #define AGS_IS_PERFORMANCE_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PERFORMANCE_PREFERENCES)) #define AGS_IS_PERFORMANCE_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PERFORMANCE_PREFERENCES)) #define AGS_PERFORMANCE_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PERFORMANCE_PREFERENCES, AgsPerformancePreferencesClass)) typedef struct _AgsPerformancePreferences AgsPerformancePreferences; typedef struct _AgsPerformancePreferencesClass AgsPerformancePreferencesClass; typedef enum{ AGS_PERFORMANCE_PREFERENCES_CONNECTED = 1, }AgsPerformancePreferencesFlags; struct _AgsPerformancePreferences { GtkVBox vbox; guint flags; GtkCheckButton *stream_auto_sense; GtkCheckButton *super_threaded_audio; GtkCheckButton *super_threaded_channel; GtkSpinButton *thread_pool_max_unused_threads; GtkComboBoxText *max_precision; }; struct _AgsPerformancePreferencesClass { GtkVBoxClass vbox; }; GType ags_performance_preferences_get_type(void); AgsPerformancePreferences* ags_performance_preferences_new(); #endif /*__AGS_PERFORMANCE_PREFERENCES_H__*/ gsequencer-1.4.24/ags/X/ags_export_soundcard.h0000644000175000017500000000557513246707333016257 00000000000000/* 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 . */ #ifndef __AGS_EXPORT_SOUNDCARD_H__ #define __AGS_EXPORT_SOUNDCARD_H__ #include #include #include #define AGS_TYPE_EXPORT_SOUNDCARD (ags_export_soundcard_get_type()) #define AGS_EXPORT_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EXPORT_SOUNDCARD, AgsExportSoundcard)) #define AGS_EXPORT_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EXPORT_SOUNDCARD, AgsExportSoundcardClass)) #define AGS_IS_EXPORT_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_EXPORT_SOUNDCARD)) #define AGS_IS_EXPORT_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_EXPORT_SOUNDCARD)) #define AGS_EXPORT_SOUNDCARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_EXPORT_SOUNDCARD, AgsExportSoundcardClass)) #define AGS_EXPORT_SOUNDCARD_FORMAT_WAV "wav\0" #define AGS_EXPORT_SOUNDCARD_FORMAT_FLAC "flac\0" #define AGS_EXPORT_SOUNDCARD_FORMAT_OGG "ogg\0" typedef struct _AgsExportSoundcard AgsExportSoundcard; typedef struct _AgsExportSoundcardClass AgsExportSoundcardClass; typedef enum{ AGS_EXPORT_SOUNDCARD_CONNECTED = 1, }AgsExportSoundcardFlags; struct _AgsExportSoundcard { GtkVBox vbox; guint flags; GObject *soundcard; GtkComboBoxText *backend; GtkComboBoxText *card; GtkEntry *filename; GtkButton *file_chooser_button; GtkComboBoxText *output_format; }; struct _AgsExportSoundcardClass { GtkVBoxClass vbox; }; GType ags_export_soundcard_get_type(void); /* soundcard */ gboolean ags_export_soundcard_set_backend(AgsExportSoundcard *export_soundcard, gchar *backend); void ags_export_soundcard_refresh_card(AgsExportSoundcard *export_soundcard); gboolean ags_export_soundcard_set_card(AgsExportSoundcard *export_soundcard, gchar *card); /* filename */ void ags_export_soundcard_set_filename(AgsExportSoundcard *export_soundcard, gchar *filename); /* format */ void ags_export_soundcard_set_format(AgsExportSoundcard *export_soundcard, gchar *format); /* */ AgsExportSoundcard* ags_export_soundcard_new(); #endif /*__AGS_EXPORT_SOUNDCARD_H__*/ gsequencer-1.4.24/ags/X/ags_plugin_preferences.c0000644000175000017500000001315013246707333016532 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_plugin_preferences_class_init(AgsPluginPreferencesClass *plugin_preferences); void ags_plugin_preferences_connectable_interface_init(AgsConnectableInterface *connectable); void ags_plugin_preferences_init(AgsPluginPreferences *plugin_preferences); void ags_plugin_preferences_connect(AgsConnectable *connectable); void ags_plugin_preferences_disconnect(AgsConnectable *connectable); static void ags_plugin_preferences_finalize(GObject *gobject); void ags_plugin_preferences_reset(AgsPluginPreferences *plugin_preferences); void* ags_plugin_preferences_refresh(void *ptr); /** * SECTION:ags_plugin_preferences * @short_description: A composite widget to do plugin related preferences * @title: AgsPluginPreferences * @section_id: * @include: ags/X/ags_plugin_preferences.h * * #AgsPluginPreferences enables you to make plugin related preferences. */ static gpointer ags_plugin_preferences_parent_class = NULL; GType ags_plugin_preferences_get_type(void) { static GType ags_type_plugin_preferences = 0; if(!ags_type_plugin_preferences){ static const GTypeInfo ags_plugin_preferences_info = { sizeof (AgsPluginPreferencesClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_plugin_preferences_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPluginPreferences), 0, /* n_preallocs */ (GInstanceInitFunc) ags_plugin_preferences_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_plugin_preferences_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_plugin_preferences = g_type_register_static(GTK_TYPE_VBOX, "AgsPluginPreferences", &ags_plugin_preferences_info, 0); g_type_add_interface_static(ags_type_plugin_preferences, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_plugin_preferences); } void ags_plugin_preferences_class_init(AgsPluginPreferencesClass *plugin_preferences) { GObjectClass *gobject; ags_plugin_preferences_parent_class = g_type_class_peek_parent(plugin_preferences); /* GtkObjectClass */ gobject = (GObjectClass *) plugin_preferences; gobject->finalize = ags_plugin_preferences_finalize; } void ags_plugin_preferences_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_plugin_preferences_connect; connectable->disconnect = ags_plugin_preferences_disconnect; } void ags_plugin_preferences_init(AgsPluginPreferences *plugin_preferences) { //TODO:JK: implement me } void ags_plugin_preferences_connect(AgsConnectable *connectable) { /* empty */ } void ags_plugin_preferences_disconnect(AgsConnectable *connectable) { /* empty */ } static void ags_plugin_preferences_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_plugin_preferences_parent_class)->finalize(gobject); } AgsLadspaPluginPreferences* ags_ladspa_plugin_preferences_alloc(gchar *ladspa_path) { AgsLadspaPluginPreferences *ladspa_plugin_preferences; GtkListStore *list_store; GtkTreePath *path; GtkTreeIter iter; gchar **filenames, **filenames_start; static const gchar *default_ladspa_path = "/usr/lib/ladspa"; ladspa_plugin_preferences = (AgsLadspaPluginPreferences *) malloc(sizeof(AgsLadspaPluginPreferences)); if(ladspa_path == NULL){ gtk_entry_set_text(ladspa_plugin_preferences->ladspa_path, default_ladspa_path); }else{ gtk_entry_set_text(ladspa_plugin_preferences->ladspa_path, ladspa_path); } ladspa_plugin_preferences->plugin_file = (GtkCellView *) gtk_cell_view_new(); list_store = gtk_list_store_new(1, G_TYPE_STRING); filenames = filenames_start = ags_ladspa_manager_get_filenames(ags_ladspa_manager_get_instance()); while(*filenames != NULL){ // Add a new row to the model gtk_list_store_append (list_store, &iter); gtk_list_store_set(list_store, &iter, 0, *filenames, -1); filenames++; } free(filenames_start); gtk_cell_view_set_model(ladspa_plugin_preferences->plugin_file, GTK_TREE_MODEL(list_store)); return(ladspa_plugin_preferences); } /** * ags_plugin_preferences_new: * * Creates an #AgsPluginPreferences * * Returns: a new #AgsPluginPreferences * * Since: 1.0.0 */ AgsPluginPreferences* ags_plugin_preferences_new() { AgsPluginPreferences *plugin_preferences; plugin_preferences = (AgsPluginPreferences *) g_object_new(AGS_TYPE_PLUGIN_PREFERENCES, NULL); return(plugin_preferences); } gsequencer-1.4.24/ags/X/ags_lv2_browser_callbacks.c0000644000175000017500000001511113246707333017117 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_lv2_browser_plugin_filename_callback(GtkComboBoxText *combo_box, AgsLv2Browser *lv2_browser) { GtkComboBoxText *filename, *effect; AgsLv2Manager *lv2_manager; GList *list; list = gtk_container_get_children(GTK_CONTAINER(lv2_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model((GtkComboBox *) effect))); lv2_manager = ags_lv2_manager_get_instance(); list = lv2_manager->lv2_plugin; while((list = ags_base_plugin_find_filename(list, gtk_combo_box_text_get_active_text(filename))) != NULL){ if(AGS_BASE_PLUGIN(list->data)->effect != NULL){ gtk_combo_box_text_append_text(effect, AGS_BASE_PLUGIN(list->data)->effect); } list = list->next; } gtk_combo_box_set_active((GtkComboBox *) effect, 0); } void ags_lv2_browser_plugin_uri_callback(GtkComboBoxText *combo_box, AgsLv2Browser *lv2_browser) { GtkTable *table; GtkComboBoxText *filename, *effect; GtkLabel *label; AgsLv2Plugin *lv2_plugin; GList *list, *list_start; GList *child, *child_start; gchar *str; guint y; /* retrieve filename and uri */ list_start = list = gtk_container_get_children(GTK_CONTAINER(lv2_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data); g_list_free(list_start); /* update description */ list_start = list = gtk_container_get_children(GTK_CONTAINER(lv2_browser->description)); lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), gtk_combo_box_text_get_active_text(filename), gtk_combo_box_text_get_active_text(effect)); if(lv2_plugin != NULL){ GList *port_descriptor; /* update ui - empty */ label = GTK_LABEL(list->data); str = g_strdup_printf("%s: %s", i18n("Name"), lv2_plugin->foaf_name); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: %s", i18n("Homepage"), lv2_plugin->foaf_homepage); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: %s", i18n("M-Box"), lv2_plugin->foaf_mbox); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Ports")); gtk_label_set_text(label, str); g_free(str); list = list->next; table = GTK_TABLE(list->data); /* update ui - port information */ child_start = child = gtk_container_get_children(GTK_CONTAINER(table)); while(child != NULL){ gtk_widget_destroy(GTK_WIDGET(child->data)); child = child->next; } g_list_free(child_start); port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; y = 0; while(port_descriptor != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0){ port_descriptor = port_descriptor->next; continue; } str = g_strdup(AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", str, NULL); gtk_table_attach_defaults(table, GTK_WIDGET(label), 0, 1, y, y + 1); if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ gtk_table_attach_defaults(table, GTK_WIDGET(ags_lv2_browser_combo_box_output_boolean_controls_new()), 1, 2, y, y + 1); }else{ gtk_table_attach_defaults(table, GTK_WIDGET(ags_lv2_browser_combo_box_boolean_controls_new()), 1, 2, y, y + 1); } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ gtk_table_attach_defaults(table, GTK_WIDGET(ags_lv2_browser_combo_box_output_controls_new()), 1, 2, y, y + 1); }else{ gtk_table_attach_defaults(table, GTK_WIDGET(ags_lv2_browser_combo_box_controls_new()), 1, 2, y, y + 1); } } y++; port_descriptor = port_descriptor->next; } gtk_widget_show_all((GtkWidget *) table); }else{ /* update ui - empty */ label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Name")); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Homepage")); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("M-Box")); gtk_label_set_text(label, str); g_free(str); list = list->next; label = GTK_LABEL(list->data); str = g_strdup_printf("%s: ", i18n("Ports")); gtk_label_set_text(label, str); g_free(str); list = list->next; table = GTK_TABLE(list->data); /* update ui - no ports */ child_start = child = gtk_container_get_children(GTK_CONTAINER(table)); while(child != NULL){ gtk_widget_destroy(GTK_WIDGET(child->data)); child = child->next; } g_list_free(child_start); } g_list_free(list_start); } gsequencer-1.4.24/ags/X/ags_effect_line_callbacks.c0000644000175000017500000003141513246707333017121 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_effect_line_remove_recall_callback(AgsRecall *recall, AgsEffectLine *effect_line) { if(recall->recall_id != NULL && recall->recall_id->recycling_context->parent != NULL){ if(AGS_IS_RECALL_AUDIO(recall) || AGS_RECALL_AUDIO_RUN(recall)){ ags_audio_remove_recall(AGS_AUDIO(effect_line->channel->audio), (GObject *) recall, FALSE); }else{ ags_channel_remove_recall(AGS_CHANNEL(effect_line->channel), (GObject *) recall, FALSE); } }else{ if(AGS_IS_RECALL_AUDIO(recall) || AGS_RECALL_AUDIO_RUN(recall)){ ags_audio_remove_recall(AGS_AUDIO(effect_line->channel->audio), (GObject *) recall, TRUE); }else{ ags_channel_remove_recall(AGS_CHANNEL(effect_line->channel), (GObject *) recall, TRUE); } } } void ags_effect_line_add_effect_callback(AgsChannel *channel, gchar *filename, gchar *effect, AgsEffectLine *effect_line) { AgsWindow *window; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsLineMemberEditor *line_member_editor; AgsPluginBrowser *plugin_browser; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsApplicationContext *application_context; GList *pad_editor, *pad_editor_start; GList *line_editor, *line_editor_start; GList *control_type_name; pthread_mutex_t *application_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) effect_line); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsAudioLoop *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) main_loop, AGS_TYPE_GUI_THREAD); /* get machine and machine editor */ machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) effect_line, AGS_TYPE_MACHINE); machine_editor = (AgsMachineEditor *) machine->properties; /* get control type */ control_type_name = NULL; pad_editor_start = NULL; line_editor_start = NULL; if(machine_editor != NULL){ pad_editor_start = pad_editor = gtk_container_get_children((GtkContainer *) machine_editor->input_editor->child); pad_editor = g_list_nth(pad_editor, channel->pad); if(pad_editor != NULL){ line_editor_start = line_editor = gtk_container_get_children((GtkContainer *) AGS_PAD_EDITOR(pad_editor->data)->line_editor); line_editor = g_list_nth(line_editor, channel->audio_channel); }else{ line_editor = NULL; } if(line_editor != NULL){ line_member_editor = AGS_LINE_EDITOR(line_editor->data)->member_editor; plugin_browser = line_member_editor->plugin_browser; if(plugin_browser != NULL && plugin_browser->active_browser != NULL){ GList *description, *description_start; GList *port_control, *port_control_start; gchar *controls; /* get plugin browser */ description_start = NULL; port_control_start = NULL; if(AGS_IS_LADSPA_BROWSER(plugin_browser->active_browser)){ description_start = description = gtk_container_get_children((GtkContainer *) AGS_LADSPA_BROWSER(plugin_browser->active_browser)->description); }else if(AGS_IS_DSSI_BROWSER(plugin_browser->active_browser)){ description_start = description = gtk_container_get_children((GtkContainer *) AGS_DSSI_BROWSER(plugin_browser->active_browser)->description); }else if(AGS_IS_LV2_BROWSER(plugin_browser->active_browser)){ description_start = description = gtk_container_get_children((GtkContainer *) AGS_LV2_BROWSER(plugin_browser->active_browser)->description); }else{ g_message("ags_effect_line_callbacks.c unsupported plugin browser"); } /* get port description */ if(description != NULL){ description = g_list_last(description); port_control_start = port_control = gtk_container_get_children(GTK_CONTAINER(description->data)); if(port_control != NULL){ while(port_control != NULL){ controls = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(port_control->data)); if(!g_ascii_strncasecmp(controls, "led", 4)){ control_type_name = g_list_prepend(control_type_name, "AgsLed"); }else if(!g_ascii_strncasecmp(controls, "vertical indicator", 19)){ control_type_name = g_list_prepend(control_type_name, "AgsVIndicator"); }else if(!g_ascii_strncasecmp(controls, "horizontal indicator", 19)){ control_type_name = g_list_prepend(control_type_name, "AgsHIndicator"); }else if(!g_ascii_strncasecmp(controls, "spin button", 12)){ control_type_name = g_list_prepend(control_type_name, "GtkSpinButton"); }else if(!g_ascii_strncasecmp(controls, "dial", 5)){ control_type_name = g_list_prepend(control_type_name, "AgsDial"); }else if(!g_ascii_strncasecmp(controls, "vertical scale", 15)){ control_type_name = g_list_prepend(control_type_name, "GtkVScale"); }else if(!g_ascii_strncasecmp(controls, "horizontal scale", 17)){ control_type_name = g_list_prepend(control_type_name, "GtkHScale"); }else if(!g_ascii_strncasecmp(controls, "check-button", 13)){ control_type_name = g_list_prepend(control_type_name, "GtkCheckButton"); }else if(!g_ascii_strncasecmp(controls, "toggle button", 14)){ control_type_name = g_list_prepend(control_type_name, "GtkToggleButton"); } port_control = port_control->next; port_control = port_control->next; } } /* free lists */ g_list_free(description_start); g_list_free(port_control_start); } } // line_member_editor->plugin_browser; } }else{ control_type_name = NULL; } /* add effect */ ags_effect_line_add_effect(effect_line, control_type_name, filename, effect); /* free container children list */ g_list_free(pad_editor_start); g_list_free(line_editor_start); } void ags_effect_line_remove_effect_callback(AgsChannel *channel, guint nth, AgsEffectLine *effect_line) { AgsWindow *window; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) effect_line); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsAudioLoop *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) main_loop, AGS_TYPE_GUI_THREAD); /* remove effect */ ags_effect_line_remove_effect(effect_line, nth); } void ags_effect_line_output_port_run_post_callback(AgsRecall *recall, AgsEffectLine *effect_line) { GtkWidget *child; GList *list, *list_start; list_start = list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_LINE(effect_line)->table); /* check members */ while(list != NULL){ if(AGS_IS_LINE_MEMBER(list->data) && (AGS_LINE_MEMBER(list->data)->widget_type == AGS_TYPE_VINDICATOR || AGS_LINE_MEMBER(list->data)->widget_type == AGS_TYPE_HINDICATOR || AGS_LINE_MEMBER(list->data)->widget_type == AGS_TYPE_LED)){ AgsLineMember *line_member; GtkAdjustment *adjustment; AgsPort *current; gdouble average_peak; gdouble lower, upper; gdouble range; gdouble peak; GValue value = {0,}; line_member = AGS_LINE_MEMBER(list->data); child = GTK_BIN(line_member)->child; average_peak = 0.0; /* play port */ current = line_member->port; if(current == NULL){ list = list->next; continue; } /* check if output port and specifier matches */ pthread_mutex_lock(current->mutex); if((AGS_PORT_IS_OUTPUT & (current->flags)) == 0 || current->port_descriptor == NULL || g_ascii_strcasecmp(current->specifier, line_member->specifier)){ pthread_mutex_unlock(current->mutex); list = list->next; continue; } /* lower and upper */ lower = g_value_get_float(AGS_PORT_DESCRIPTOR(current->port_descriptor)->lower_value); upper = g_value_get_float(AGS_PORT_DESCRIPTOR(current->port_descriptor)->upper_value); pthread_mutex_unlock(current->mutex); /* get range */ if(line_member->conversion != NULL){ lower = ags_conversion_convert(line_member->conversion, lower, TRUE); upper = ags_conversion_convert(line_member->conversion, upper, TRUE); } range = upper - lower; /* play port - read value */ g_value_init(&value, G_TYPE_FLOAT); ags_port_safe_read(current, &value); peak = g_value_get_float(&value); g_value_unset(&value); if(line_member->conversion != NULL){ peak = ags_conversion_convert(line_member->conversion, peak, TRUE); } /* calculate peak */ if(range == 0.0 || current->port_value_type == G_TYPE_BOOLEAN){ if(peak != 0.0){ average_peak = 10.0; } }else{ average_peak += ((1.0 / (range / peak)) * 10.0); } /* recall port */ current = line_member->recall_port; /* recall port - read value */ g_value_init(&value, G_TYPE_FLOAT); ags_port_safe_read(current, &value); peak = g_value_get_float(&value); g_value_unset(&value); if(line_member->conversion != NULL){ peak = ags_conversion_convert(line_member->conversion, peak, TRUE); } /* calculate peak */ if(range == 0.0 || current->port_value_type == G_TYPE_BOOLEAN){ if(peak != 0.0){ average_peak = 10.0; } }else{ average_peak += ((1.0 / (range / peak)) * 10.0); } /* apply */ if(AGS_IS_LED(child)){ if(average_peak != 0.0){ ags_led_set_active(child); } }else{ g_object_get(child, "adjustment", &adjustment, NULL); gtk_adjustment_set_value(adjustment, average_peak); } } list = list->next; } g_list_free(list_start); } gsequencer-1.4.24/ags/X/ags_playback_window_callbacks.h0000644000175000017500000000171413246707333020037 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PLAYBACK_WINDOW_CALLBACKS_H__ #define __AGS_PLAYBACK_WINDOW_CALLBACKS_H__ #include #include #include #endif /*__AGS_PLAYBACK_WINDOW_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_plugin_browser.c0000644000175000017500000002424613247044247015723 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_plugin_browser_class_init(AgsPluginBrowserClass *plugin_browser); void ags_plugin_browser_init(AgsPluginBrowser *plugin_browser); void ags_plugin_browser_connectable_interface_init(AgsConnectableInterface *connectable); void ags_plugin_browser_applicable_interface_init(AgsApplicableInterface *applicable); void ags_plugin_browser_show(GtkWidget *widget); void ags_plugin_browser_connect(AgsConnectable *connectable); void ags_plugin_browser_disconnect(AgsConnectable *connectable); void ags_plugin_browser_set_update(AgsApplicable *applicable, gboolean update); void ags_plugin_browser_apply(AgsApplicable *applicable); void ags_plugin_browser_reset(AgsApplicable *applicable); /** * SECTION:ags_plugin_browser * @short_description: A composite to select plugin effect. * @title: AgsPluginBrowser * @section_id: * @include: ags/X/ags_plugin_browser.h * * #AgsPluginBrowser is a composite widget to select plugin plugin and the desired * effect. */ static gpointer ags_plugin_browser_parent_class = NULL; GType ags_plugin_browser_get_type(void) { static GType ags_type_plugin_browser = 0; if(!ags_type_plugin_browser){ static const GTypeInfo ags_plugin_browser_info = { sizeof (AgsPluginBrowserClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_plugin_browser_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPluginBrowser), 0, /* n_preallocs */ (GInstanceInitFunc) ags_plugin_browser_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_plugin_browser_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_plugin_browser_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_plugin_browser = g_type_register_static(GTK_TYPE_DIALOG, "AgsPluginBrowser", &ags_plugin_browser_info, 0); g_type_add_interface_static(ags_type_plugin_browser, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_plugin_browser, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_plugin_browser); } void ags_plugin_browser_class_init(AgsPluginBrowserClass *plugin_browser) { GtkWidgetClass *widget; ags_plugin_browser_parent_class = g_type_class_peek_parent(plugin_browser); /* GtkWidgetClass */ widget = (GtkWidgetClass *) plugin_browser; widget->show = ags_plugin_browser_show; } void ags_plugin_browser_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_plugin_browser_connect; connectable->disconnect = ags_plugin_browser_disconnect; } void ags_plugin_browser_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_plugin_browser_set_update; applicable->apply = ags_plugin_browser_apply; applicable->reset = ags_plugin_browser_reset; } void ags_plugin_browser_init(AgsPluginBrowser *plugin_browser) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; GList *list; plugin_browser->flags = 0; vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) plugin_browser->dialog.vbox, GTK_WIDGET(vbox), FALSE, FALSE, 0); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("Plugin type:")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 0); plugin_browser->plugin_type = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) plugin_browser->plugin_type, FALSE, FALSE, 0); gtk_combo_box_text_append_text(plugin_browser->plugin_type, "Lv2"); gtk_combo_box_text_append_text(plugin_browser->plugin_type, "LADSPA"); plugin_browser->active_browser = NULL; plugin_browser->lv2_browser = (GtkWidget *) ags_lv2_browser_new(); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) plugin_browser->lv2_browser, FALSE, FALSE, 0); plugin_browser->dssi_browser = NULL; plugin_browser->ladspa_browser = (GtkWidget *) ags_ladspa_browser_new(); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) plugin_browser->ladspa_browser, FALSE, FALSE, 0); plugin_browser->vst_browser = NULL; /* action area */ gtk_dialog_add_buttons((GtkDialog *) plugin_browser, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); list = gtk_container_get_children((GtkContainer *) gtk_dialog_get_action_area((GtkDialog *) plugin_browser)); plugin_browser->ok = GTK_BUTTON(list->data); plugin_browser->cancel = GTK_BUTTON(list->next->data); g_list_free(list); } void ags_plugin_browser_show(GtkWidget *widget) { AgsPluginBrowser *plugin_browser; plugin_browser = AGS_PLUGIN_BROWSER(widget); GTK_WIDGET_CLASS(ags_plugin_browser_parent_class)->show(widget); gtk_widget_hide(plugin_browser->lv2_browser); gtk_widget_hide(plugin_browser->ladspa_browser); } void ags_plugin_browser_connect(AgsConnectable *connectable) { AgsPluginBrowser *plugin_browser; plugin_browser = AGS_PLUGIN_BROWSER(connectable); if((AGS_PLUGIN_BROWSER_CONNECTED & (plugin_browser->flags)) != 0){ return; } plugin_browser->flags |= AGS_PLUGIN_BROWSER_CONNECTED; g_signal_connect(plugin_browser->plugin_type, "changed", G_CALLBACK(ags_plugin_browser_plugin_type_changed_callback), plugin_browser); ags_connectable_connect(AGS_CONNECTABLE(plugin_browser->lv2_browser)); ags_connectable_connect(AGS_CONNECTABLE(plugin_browser->ladspa_browser)); /* AgsPluginBrowser buttons */ g_signal_connect((GObject *) plugin_browser->ok, "clicked", G_CALLBACK(ags_plugin_browser_ok_callback), (gpointer) plugin_browser); g_signal_connect((GObject *) plugin_browser->cancel, "clicked", G_CALLBACK(ags_plugin_browser_cancel_callback), (gpointer) plugin_browser); } void ags_plugin_browser_disconnect(AgsConnectable *connectable) { AgsPluginBrowser *plugin_browser; plugin_browser = AGS_PLUGIN_BROWSER(connectable); if((AGS_PLUGIN_BROWSER_CONNECTED & (plugin_browser->flags)) == 0){ return; } plugin_browser->flags &= (~AGS_PLUGIN_BROWSER_CONNECTED); g_object_disconnect(plugin_browser->plugin_type, "any_signal::changed", G_CALLBACK(ags_plugin_browser_plugin_type_changed_callback), plugin_browser, NULL); ags_connectable_disconnect(AGS_CONNECTABLE(plugin_browser->lv2_browser)); ags_connectable_disconnect(AGS_CONNECTABLE(plugin_browser->ladspa_browser)); /* AgsPluginBrowser buttons */ g_object_disconnect((GObject *) plugin_browser->ok, "any_signal::clicked", G_CALLBACK(ags_plugin_browser_ok_callback), (gpointer) plugin_browser, NULL); g_object_disconnect((GObject *) plugin_browser->cancel, "any_signal::clicked", G_CALLBACK(ags_plugin_browser_cancel_callback), (gpointer) plugin_browser, NULL); } void ags_plugin_browser_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_plugin_browser_apply(AgsApplicable *applicable) { //TODO:JK: implement me } void ags_plugin_browser_reset(AgsApplicable *applicable) { //TODO:JK: implement me } /** * ags_plugin_browser_get_plugin_filename: * @plugin_browser: the #AgsPluginBrowser * * Retrieve selected plugin plugin filename. * * Returns: the active plugin filename * * Since: 1.0.0 */ gchar* ags_plugin_browser_get_plugin_filename(AgsPluginBrowser *plugin_browser) { if(AGS_IS_LV2_BROWSER(plugin_browser->active_browser)){ return(ags_lv2_browser_get_plugin_filename((AgsLv2Browser *) plugin_browser->lv2_browser)); }else if(AGS_IS_LADSPA_BROWSER(plugin_browser->active_browser)){ return(ags_ladspa_browser_get_plugin_filename((AgsLadspaBrowser *) plugin_browser->ladspa_browser)); }else{ return(NULL); } } /** * ags_plugin_browser_get_plugin_effect: * @plugin_browser: the #AgsPluginBrowser * * Retrieve selected plugin effect. * * Returns: the active plugin effect * * Since: 1.0.0 */ gchar* ags_plugin_browser_get_plugin_effect(AgsPluginBrowser *plugin_browser) { if(AGS_IS_LV2_BROWSER(plugin_browser->active_browser)){ return(ags_lv2_browser_get_plugin_effect((AgsLv2Browser *) plugin_browser->lv2_browser)); }else if(AGS_IS_LADSPA_BROWSER(plugin_browser->active_browser)){ return(ags_ladspa_browser_get_plugin_effect((AgsLadspaBrowser *) plugin_browser->ladspa_browser)); }else{ return(NULL); } } /** * ags_plugin_browser_new: * @parent: the #AgsWindow * * Creates an #AgsPluginBrowser * * Returns: a new #AgsPluginBrowser * * Since: 1.0.0 */ AgsPluginBrowser* ags_plugin_browser_new(GtkWidget *parent) { AgsPluginBrowser *plugin_browser; plugin_browser = (AgsPluginBrowser *) g_object_new(AGS_TYPE_PLUGIN_BROWSER, NULL); plugin_browser->parent = parent; return(plugin_browser); } gsequencer-1.4.24/ags/X/ags_machine_callbacks.h0000644000175000017500000000557713247044247016300 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MACHINE_CALLBACKS_H__ #define __AGS_MACHINE_CALLBACKS_H__ #include #include #include #include #include #include /* controls */ int ags_machine_button_press_callback(GtkWidget *handle_box, GdkEventButton *event, AgsMachine *machine); void ags_machine_popup_move_up_activate_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_move_down_activate_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_hide_activate_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_show_activate_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_destroy_activate_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_rename_activate_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_properties_activate_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_sticky_controls_toggled_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_copy_pattern_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_paste_pattern_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_envelope_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_connection_editor_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_popup_midi_dialog_callback(GtkWidget *widget, AgsMachine *machine); void ags_machine_open_response_callback(GtkDialog *dialog, gint response, AgsMachine *machine); void ags_machine_play_callback(GtkWidget *toggle_button, AgsMachine *machine); /* forwarded callbacks */ void ags_machine_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_machine_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, gpointer data); void ags_machine_done_callback(AgsMachine *machine, AgsRecallID *recall_id, gpointer data); #endif /*__AGS_MACHINE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_menu_bar.c0000644000175000017500000006711213256163135014447 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_menu_bar_class_init(AgsMenuBarClass *menu_bar); void ags_menu_bar_connectable_interface_init(AgsConnectableInterface *connectable); void ags_menu_bar_init(AgsMenuBar *menu_bar); void ags_menu_bar_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_menu_bar_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_menu_bar_connect(AgsConnectable *connectable); void ags_menu_bar_disconnect(AgsConnectable *connectable); /** * SECTION:ags_menu_bar * @short_description: the menu bar. * @title: AgsMenuBar * @section_id: * @include: ags/X/ags_menu_bar.h * * #AgsMenuBar is a composite widget to be used as application's menu bar. */ GType ags_menu_bar_get_type(void) { static GType ags_type_menu_bar = 0; if(!ags_type_menu_bar){ static const GTypeInfo ags_menu_bar_info = { sizeof (AgsMenuBarClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_menu_bar_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMenuBar), 0, /* n_preallocs */ (GInstanceInitFunc) ags_menu_bar_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_menu_bar_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_menu_bar = g_type_register_static(GTK_TYPE_MENU_BAR, "AgsMenuBar", &ags_menu_bar_info, 0); g_type_add_interface_static(ags_type_menu_bar, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_menu_bar); } void ags_menu_bar_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_menu_bar_connect; connectable->disconnect = ags_menu_bar_disconnect; } void ags_menu_bar_class_init(AgsMenuBarClass *menu_bar) { } void ags_menu_bar_init(AgsMenuBar *menu_bar) { GtkImageMenuItem *item; GtkAccelGroup *accel_group; accel_group = gtk_accel_group_new(); menu_bar->flags = 0; /* File */ item = (GtkImageMenuItem *) gtk_menu_item_new_with_mnemonic("_File"); gtk_menu_shell_append((GtkMenuShell*) menu_bar, (GtkWidget*) item); menu_bar->file = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) menu_bar->file); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_OPEN, accel_group); gtk_menu_shell_append((GtkMenuShell*) menu_bar->file, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_SAVE, accel_group); gtk_menu_shell_append((GtkMenuShell*) menu_bar->file, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_SAVE_AS, accel_group); gtk_menu_shell_append((GtkMenuShell*) menu_bar->file, (GtkWidget*) item); gtk_menu_shell_append((GtkMenuShell*) menu_bar->file, (GtkWidget*) gtk_separator_menu_item_new()); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("export")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->file, (GtkWidget*) item); gtk_menu_shell_append((GtkMenuShell*) menu_bar->file, (GtkWidget*) gtk_separator_menu_item_new()); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT, accel_group); gtk_menu_shell_append((GtkMenuShell*) menu_bar->file, (GtkWidget*) item); /* Edit */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_EDIT, accel_group); gtk_menu_shell_append((GtkMenuShell*) menu_bar, (GtkWidget*) item); menu_bar->edit = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) menu_bar->edit); // item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_UNDO, accel_group); // gtk_menu_shell_append((GtkMenuShell*) menu, (GtkWidget*) item); // item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_REDO, accel_group); // gtk_menu_shell_append((GtkMenuShell*) menu, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD, accel_group); gtk_menu_shell_append((GtkMenuShell*) menu_bar->edit, (GtkWidget*) item); menu_bar->add = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) menu_bar->add); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Panel")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Mixer")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Drum")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Matrix")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Synth")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Syncsynth")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); #ifdef AGS_WITH_LIBINSTPATCH item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("FPlayer")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); #endif #if 0 item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Audiorec")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); #endif /* bridge */ menu_bar->ladspa = item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("LADSPA")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); menu_bar->dssi = item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("DSSI")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); menu_bar->lv2 = item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Lv2")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); /* live */ menu_bar->live = (GtkMenu *) gtk_menu_new(); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("live!"); gtk_menu_item_set_submenu((GtkMenuItem*) item, menu_bar->live); gtk_menu_shell_append((GtkMenuShell*) menu_bar->add, (GtkWidget*) item); menu_bar->live_dssi = item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("DSSI")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->live, (GtkWidget*) item); menu_bar->live_lv2 = item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Lv2")); gtk_menu_shell_append((GtkMenuShell*) menu_bar->live, (GtkWidget*) item); /* automation */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Automation")); // gtk_widget_set_sensitive(item, // FALSE); gtk_menu_shell_append((GtkMenuShell*) menu_bar->edit, (GtkWidget*) item); /* wave */ #if 0 item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Wave")); // gtk_widget_set_sensitive(item, // FALSE); gtk_menu_shell_append((GtkMenuShell*) menu_bar->edit, (GtkWidget*) item); #endif /* preferences */ gtk_menu_shell_append((GtkMenuShell*) menu_bar->edit, (GtkWidget*) gtk_separator_menu_item_new()); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_PREFERENCES, accel_group); gtk_menu_shell_append((GtkMenuShell*) menu_bar->edit, (GtkWidget*) item); /* MIDI */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("MIDI"); gtk_menu_shell_append((GtkMenuShell*) menu_bar, (GtkWidget*) item); menu_bar->midi = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) menu_bar->midi); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("import"); gtk_menu_shell_append((GtkMenuShell*) menu_bar->midi, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("export track"); gtk_menu_shell_append((GtkMenuShell*) menu_bar->midi, (GtkWidget*) item); gtk_menu_shell_append((GtkMenuShell*) menu_bar->midi, (GtkWidget*) gtk_separator_menu_item_new()); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("playback"); gtk_widget_set_sensitive(item, FALSE); gtk_menu_shell_append((GtkMenuShell*) menu_bar->midi, (GtkWidget*) item); /* Help */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP, accel_group); gtk_menu_shell_append((GtkMenuShell*) menu_bar, (GtkWidget*) item); menu_bar->help = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) menu_bar->help); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, accel_group); gtk_menu_shell_append((GtkMenuShell*) menu_bar->help, (GtkWidget*) item); } void ags_menu_bar_connect(AgsConnectable *connectable) { AgsMenuBar *menu_bar; GList *list0, *list1, *list2, *list3, *list4; GList *list1_start, *list2_start, *list3_start, *list4_start; menu_bar = AGS_MENU_BAR(connectable); if((AGS_MENU_BAR_CONNECTED & (menu_bar->flags)) != 0){ return; } menu_bar->flags |= AGS_MENU_BAR_CONNECTED; /* File */ list0 = GTK_MENU_SHELL(menu_bar)->children; list1_start = list1 = gtk_container_get_children ((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list0->data)); g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_open_callback), (gpointer) menu_bar); list1 = list1->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_save_callback), (gpointer) menu_bar); list1 = list1->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_save_as_callback), menu_bar); list1 = list1->next->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_export_callback), menu_bar); list1 = list1->next->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_quit_callback), (gpointer) menu_bar); g_list_free(list1_start); /* Edit */ list0 = list0->next; list1_start = list1 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list0->data)); g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_add_callback), (gpointer) menu_bar); list2_start = list2 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list1->data)); list1 = list1->next; /* machines */ g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_panel_callback), (gpointer) menu_bar); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_mixer_callback), (gpointer) menu_bar); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_drum_callback), (gpointer) menu_bar); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_matrix_callback), (gpointer) menu_bar); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_synth_callback), (gpointer) menu_bar); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_syncsynth_callback), (gpointer) menu_bar); list2 = list2->next; #ifdef AGS_WITH_LIBINSTPATCH g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_ffplayer_callback), (gpointer) menu_bar); list2 = list2->next; #endif #if 0 g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_audiorec_callback), (gpointer) menu_bar); list2 = list2->next; #endif /* ladspa */ list3_start = list3 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list2->data)); list2 = list2->next; while(list3 != NULL){ g_signal_connect(G_OBJECT(list3->data), "activate", G_CALLBACK(ags_menu_action_add_ladspa_bridge_callback), (gpointer) menu_bar); list3 = list3->next; } g_list_free(list3_start); /* dssi */ list3_start = list3 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list2->data)); list2 = list2->next; while(list3 != NULL){ g_signal_connect(G_OBJECT(list3->data), "activate", G_CALLBACK(ags_menu_action_add_dssi_bridge_callback), (gpointer) menu_bar); list3 = list3->next; } g_list_free(list3_start); /* lv2 */ list3_start = list3 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list2->data)); list2 = list2->next; while(list3 != NULL){ g_signal_connect(G_OBJECT(list3->data), "activate", G_CALLBACK(ags_menu_action_add_lv2_bridge_callback), (gpointer) menu_bar); list3 = list3->next; } g_list_free(list3_start); /* live! */ list3 = list3_start = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list2->data)); /* dssi */ list4_start = list4 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list3->data)); list3 = list3->next; while(list4 != NULL){ g_signal_connect(G_OBJECT(list4->data), "activate", G_CALLBACK(ags_menu_action_add_live_dssi_bridge_callback), (gpointer) menu_bar); list4 = list4->next; } g_list_free(list4_start); /* lv2 */ list4_start = list4 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list3->data)); // list3 = list3->next; while(list4 != NULL){ g_signal_connect(G_OBJECT(list4->data), "activate", G_CALLBACK(ags_menu_action_add_live_lv2_bridge_callback), (gpointer) menu_bar); list4 = list4->next; } g_list_free(list4_start); g_list_free(list3_start); g_list_free(list2_start); /* automation, wave and preferences */ g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_automation_callback), (gpointer) menu_bar); list1 = list1->next; #if 0 g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_wave_callback), (gpointer) menu_bar); list1 = list1->next; #endif list1 = list1->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_preferences_callback), (gpointer) menu_bar); g_list_free(list1_start); /* MIDI */ list0 = list0->next; list1_start = list1 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list0->data)); g_signal_connect(G_OBJECT(list1->data), "activate", G_CALLBACK(ags_menu_action_midi_import_callback), (gpointer) menu_bar); list1 = list1->next; g_signal_connect(G_OBJECT(list1->data), "activate", G_CALLBACK(ags_menu_action_midi_export_track_callback), (gpointer) menu_bar); list1 = list1->next; list1 = list1->next; g_signal_connect(G_OBJECT(list1->data), "activate", G_CALLBACK(ags_menu_action_midi_playback_callback), (gpointer) menu_bar); g_list_free(list1_start); /* Help */ list0 = list0->next; list1_start = list1 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list0->data)); g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_about_callback), (gpointer) menu_bar); g_list_free(list1_start); } void ags_menu_bar_disconnect(AgsConnectable *connectable) { AgsMenuBar *menu_bar; menu_bar = AGS_MENU_BAR(connectable); if((AGS_MENU_BAR_CONNECTED & (menu_bar->flags)) == 0){ return; } menu_bar->flags &= (~AGS_MENU_BAR_CONNECTED); /* empty */ } GtkMenu* ags_zoom_menu_new() { GtkMenu *menu; GtkMenuItem *item; GtkLabel *label; menu = (GtkMenu *) gtk_menu_new(); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("16:1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("8:1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("4:1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("2:1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1:1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1:2"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1:4"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1:8"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1:16"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); return(menu); } GtkMenu* ags_tact_menu_new() { GtkMenu *menu; GtkMenuItem *item; GtkLabel *label; menu = (GtkMenu *) gtk_menu_new(); //TODO:JK: uncomment me if tact implemented /* item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("16/1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("8/1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("4/1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("2/1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1:1"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1/2"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1/4"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1/8"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new(); label = (GtkLabel *) gtk_label_new("1/16"); gtk_container_add((GtkContainer *) item, (GtkWidget *) label); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); */ return(menu); } /** * ags_zoom_combo_box_new: * * Creates an #GtkComboBox to select zoom. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkComboBox* ags_zoom_combo_box_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); // gtk_combo_box_text_append_text(combo_box, // "16:1"); // gtk_combo_box_text_append_text(combo_box, // "8:1"); gtk_combo_box_text_append_text(combo_box, "4:1"); gtk_combo_box_text_append_text(combo_box, "2:1"); gtk_combo_box_text_append_text(combo_box, "1:1"); gtk_combo_box_text_append_text(combo_box, "1:2"); gtk_combo_box_text_append_text(combo_box, "1:4"); gtk_combo_box_text_append_text(combo_box, "1:8"); gtk_combo_box_text_append_text(combo_box, "1:16"); return((GtkComboBox *) combo_box); } /** * ags_zoom_combo_box_new: * * Creates an #GtkComboBox to select tact * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkComboBox* ags_tact_combo_box_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "16/1"); gtk_combo_box_text_append_text(combo_box, "8/1"); gtk_combo_box_text_append_text(combo_box, "4/1"); gtk_combo_box_text_append_text(combo_box, "2/1"); gtk_combo_box_text_append_text(combo_box, "1/1"); gtk_combo_box_text_append_text(combo_box, "1/2"); gtk_combo_box_text_append_text(combo_box, "1/4"); gtk_combo_box_text_append_text(combo_box, "1/8"); gtk_combo_box_text_append_text(combo_box, "1/16"); return((GtkComboBox *) combo_box); } GtkMenu* ags_ladspa_bridge_menu_new() { GtkMenu *menu; GtkImageMenuItem *item; AgsLadspaManager *ladspa_manager; GList *list, *start; menu = (GtkMenu *) gtk_menu_new(); ladspa_manager = ags_ladspa_manager_get_instance(); start = list = ags_base_plugin_sort(ladspa_manager->ladspa_plugin); while(list != NULL){ item = (GtkImageMenuItem *) gtk_menu_item_new_with_label(AGS_BASE_PLUGIN(list->data)->effect); g_object_set_data((GObject *) item, AGS_MENU_ITEM_FILENAME_KEY, AGS_BASE_PLUGIN(list->data)->filename); g_object_set_data((GObject *) item, AGS_MENU_ITEM_EFFECT_KEY, AGS_BASE_PLUGIN(list->data)->effect); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); list = list->next; } g_list_free(start); return(menu); } GtkMenu* ags_dssi_bridge_menu_new() { GtkMenu *menu; GtkImageMenuItem *item; AgsDssiManager *dssi_manager; GList *list, *start; menu = (GtkMenu *) gtk_menu_new(); dssi_manager = ags_dssi_manager_get_instance(); start = list = ags_base_plugin_sort(dssi_manager->dssi_plugin); while(list != NULL){ item = (GtkImageMenuItem *) gtk_menu_item_new_with_label(AGS_BASE_PLUGIN(list->data)->effect); g_object_set_data((GObject *) item, AGS_MENU_ITEM_FILENAME_KEY, AGS_BASE_PLUGIN(list->data)->filename); g_object_set_data((GObject *) item, AGS_MENU_ITEM_EFFECT_KEY, AGS_BASE_PLUGIN(list->data)->effect); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); list = list->next; } g_list_free(start); return(menu); } GtkMenu* ags_lv2_bridge_menu_new() { GtkMenu *menu; GtkImageMenuItem *item; AgsLv2Manager *lv2_manager; GList *list, *start; menu = (GtkMenu *) gtk_menu_new(); lv2_manager = ags_lv2_manager_get_instance(); start = list = ags_base_plugin_sort(lv2_manager->lv2_plugin); while(list != NULL){ item = (GtkImageMenuItem *) gtk_menu_item_new_with_label(AGS_BASE_PLUGIN(list->data)->effect); g_object_set_data((GObject *) item, AGS_MENU_ITEM_FILENAME_KEY, AGS_BASE_PLUGIN(list->data)->filename); g_object_set_data((GObject *) item, AGS_MENU_ITEM_EFFECT_KEY, AGS_BASE_PLUGIN(list->data)->effect); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); list = list->next; } g_list_free(start); return(menu); } GtkMenu* ags_live_dssi_bridge_menu_new() { GtkMenu *menu; GtkImageMenuItem *item; AgsDssiManager *dssi_manager; GList *list, *start; menu = (GtkMenu *) gtk_menu_new(); dssi_manager = ags_dssi_manager_get_instance(); start = list = ags_base_plugin_sort(dssi_manager->dssi_plugin); while(list != NULL){ item = (GtkImageMenuItem *) gtk_menu_item_new_with_label(AGS_BASE_PLUGIN(list->data)->effect); g_object_set_data((GObject *) item, AGS_MENU_ITEM_FILENAME_KEY, AGS_BASE_PLUGIN(list->data)->filename); g_object_set_data((GObject *) item, AGS_MENU_ITEM_EFFECT_KEY, AGS_BASE_PLUGIN(list->data)->effect); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); list = list->next; } g_list_free(start); return(menu); } GtkMenu* ags_live_lv2_bridge_menu_new() { GtkMenu *menu; GtkImageMenuItem *item; AgsLv2Manager *lv2_manager; GList *list, *start; menu = (GtkMenu *) gtk_menu_new(); lv2_manager = ags_lv2_manager_get_instance(); start = list = ags_base_plugin_sort(lv2_manager->lv2_plugin); while(list != NULL){ if((AGS_LV2_PLUGIN_IS_SYNTHESIZER & (AGS_LV2_PLUGIN(list->data)->flags)) != 0){ item = (GtkImageMenuItem *) gtk_menu_item_new_with_label(AGS_BASE_PLUGIN(list->data)->effect); g_object_set_data((GObject *) item, AGS_MENU_ITEM_FILENAME_KEY, AGS_BASE_PLUGIN(list->data)->filename); g_object_set_data((GObject *) item, AGS_MENU_ITEM_EFFECT_KEY, AGS_BASE_PLUGIN(list->data)->effect); g_message("%s %s", AGS_BASE_PLUGIN(list->data)->filename, AGS_BASE_PLUGIN(list->data)->effect); gtk_menu_shell_append((GtkMenuShell *) menu, (GtkWidget *) item); } list = list->next; } return(menu); } /** * ags_menu_bar_new: * * Creates an #AgsMenuBar * * Returns: a new #AgsMenuBar * * Since: 1.0.0 */ AgsMenuBar* ags_menu_bar_new() { AgsMenuBar *menu_bar; menu_bar = (AgsMenuBar *) g_object_new(AGS_TYPE_MENU_BAR, NULL); return(menu_bar); } gsequencer-1.4.24/ags/X/ags_listing_editor.h0000644000175000017500000000434713247044247015706 00000000000000/* 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 . */ #ifndef __AGS_LISTING_EDITOR_H__ #define __AGS_LISTING_EDITOR_H__ #include #include #include #include #include #define AGS_TYPE_LISTING_EDITOR (ags_listing_editor_get_type()) #define AGS_LISTING_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LISTING_EDITOR, AgsListingEditor)) #define AGS_LISTING_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LISTING_EDITOR, AgsListingEditorClass)) #define AGS_IS_LISTING_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LISTING_EDITOR)) #define AGS_IS_LISTING_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LISTING_EDITOR)) #define AGS_LISTING_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_LISTING_EDITOR, AgsListingEditorClass)) typedef struct _AgsListingEditor AgsListingEditor; typedef struct _AgsListingEditorClass AgsListingEditorClass; struct _AgsListingEditor { AgsPropertyListingEditor property_listing_editor; GType channel_type; GtkVBox *child; }; struct _AgsListingEditorClass { AgsPropertyListingEditorClass property_listing_editor; }; GType ags_listing_editor_get_type(); void ags_listing_editor_add_children(AgsListingEditor *listing_editor, AgsAudio *audio, guint nth_channel, gboolean connect); AgsListingEditor* ags_listing_editor_new(GType channel_type); #endif /*__AGS_LISTING_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_effect_pad_callbacks.h0000644000175000017500000000173713246707333016747 00000000000000/* 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 . */ #ifndef __AGS_EFFECT_PAD_CALLBACKS_H__ #define __AGS_EFFECT_PAD_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_EFFECT_PAD_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_plugin_browser_callbacks.h0000644000175000017500000000245613246707333017727 00000000000000/* 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 . */ #ifndef __AGS_PLUGIN_BROWSER_CALLBACKS_H__ #define __AGS_PLUGIN_BROWSER_CALLBACKS_H__ #include #include #include #include void ags_plugin_browser_plugin_type_changed_callback(GtkWidget *combo_box, AgsPluginBrowser *plugin_browser); void ags_plugin_browser_ok_callback(GtkWidget *button, AgsPluginBrowser *plugin_browser); void ags_plugin_browser_cancel_callback(GtkWidget *button, AgsPluginBrowser *plugin_browser); #endif /*__AGS_PLUGIN_BROWSER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_line_member_editor_callbacks.c0000644000175000017500000002616113246707333020504 00000000000000/* 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 . */ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_line_member_editor_add_callback(GtkWidget *button, AgsLineMemberEditor *line_member_editor) { gtk_widget_show_all((GtkWidget *) line_member_editor->plugin_browser); } void ags_line_member_editor_plugin_browser_response_callback(GtkDialog *dialog, gint response, AgsLineMemberEditor *line_member_editor) { AgsWindow *window; AgsMachine *machine; AgsMachineEditor *machine_editor; AgsLineEditor *line_editor; AgsThread *main_loop; AgsThread *gui_thread; AgsApplicationContext *application_context; GList *pad, *pad_start; GList *list, *list_start; gchar *filename, *effect; gboolean has_bridge; gboolean is_output; auto void ags_line_member_editor_plugin_browser_response_create_entry(); void ags_line_member_editor_plugin_browser_response_create_entry(){ GtkHBox *hbox; GtkCheckButton *check_button; GtkLabel *label; /* create entry */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(line_member_editor->line_member), GTK_WIDGET(hbox), FALSE, FALSE, 0); check_button = (GtkCheckButton *) gtk_check_button_new(); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(check_button), FALSE, FALSE, 0); //TODO:JK: ugly label = (GtkLabel *) gtk_label_new(g_strdup_printf("%s - %s", filename, effect)); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); gtk_widget_show_all((GtkWidget *) hbox); } switch(response){ case GTK_RESPONSE_ACCEPT: { machine_editor = (AgsMachineEditor *) gtk_widget_get_ancestor((GtkWidget *) line_member_editor, AGS_TYPE_MACHINE_EDITOR); line_editor = (AgsLineEditor *) gtk_widget_get_ancestor((GtkWidget *) line_member_editor, AGS_TYPE_LINE_EDITOR); machine = machine_editor->machine; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); g_object_get(window, "application-context" , &application_context, NULL); main_loop = (AgsThread *) application_context->main_loop; gui_thread = ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); if(AGS_IS_OUTPUT(line_editor->channel)){ is_output = TRUE; }else{ is_output = FALSE; } if(machine->bridge != NULL){ has_bridge = TRUE; }else{ has_bridge = FALSE; } if(!has_bridge){ AgsLine *line; /* find pad and line */ line = NULL; if(is_output){ pad_start = pad = gtk_container_get_children((GtkContainer *) machine_editor->machine->output); }else{ pad_start = pad = gtk_container_get_children((GtkContainer *) machine_editor->machine->input); } pad = g_list_nth(pad, line_editor->channel->pad); if(pad != NULL){ list_start = list = gtk_container_get_children((GtkContainer *) AGS_PAD(pad->data)->expander_set); while(list != NULL){ if(AGS_LINE(list->data)->channel == line_editor->channel){ break; } list = list->next; } if(list != NULL){ line = AGS_LINE(list->data); g_list_free(list_start); } } g_list_free(pad_start); /* retrieve plugin */ filename = ags_plugin_browser_get_plugin_filename(line_member_editor->plugin_browser); effect = ags_plugin_browser_get_plugin_effect(line_member_editor->plugin_browser); if(line != NULL){ AgsAddEffect *add_effect; if(ags_recall_find_recall_id_with_effect(line->channel->play, NULL, filename, effect) == NULL && ags_recall_find_recall_id_with_effect(line->channel->recall, NULL, filename, effect) == NULL){ ags_line_member_editor_plugin_browser_response_create_entry(); /* add effect */ add_effect = ags_add_effect_new(line->channel, filename, effect); ags_gui_thread_schedule_task((AgsGuiThread *) gui_thread, add_effect); } } }else{ AgsEffectBridge *effect_bridge; AgsEffectLine *effect_line; effect_bridge = (AgsEffectBridge *) machine->bridge; effect_line = NULL; /* find effect pad and effect line */ if(is_output){ pad_start = pad = gtk_container_get_children((GtkContainer *) effect_bridge->output); }else{ pad_start = pad = gtk_container_get_children((GtkContainer *) effect_bridge->input); } pad = g_list_nth(pad, line_editor->channel->pad); if(pad != NULL){ list_start = list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_PAD(pad->data)->table); while(list != NULL){ if(AGS_EFFECT_LINE(list->data)->channel == line_editor->channel){ break; } list = list->next; } if(list != NULL){ effect_line = AGS_EFFECT_LINE(list->data); g_list_free(list_start); } } g_list_free(pad_start); /* retrieve plugin */ filename = ags_plugin_browser_get_plugin_filename(line_member_editor->plugin_browser); effect = ags_plugin_browser_get_plugin_effect(line_member_editor->plugin_browser); if(effect_line != NULL){ AgsAddEffect *add_effect; if(ags_recall_find_recall_id_with_effect(effect_line->channel->play, NULL, filename, effect) == NULL && ags_recall_find_recall_id_with_effect(effect_line->channel->recall, NULL, filename, effect) == NULL){ ags_line_member_editor_plugin_browser_response_create_entry(); /* add effect */ add_effect = ags_add_effect_new(effect_line->channel, filename, effect); ags_gui_thread_schedule_task((AgsGuiThread *) gui_thread, add_effect); } } } } break; } } void ags_line_member_editor_remove_callback(GtkWidget *button, AgsLineMemberEditor *line_member_editor) { AgsMachine *machine; AgsMachineEditor *machine_editor; AgsLineEditor *line_editor; GList *line_member, *line_member_next; GList *list, *list_start, *pad, *pad_start; GList *children; guint nth; gboolean has_bridge; gboolean is_output; auto void ags_line_member_editor_plugin_browser_response_destroy_entry(); void ags_line_member_editor_plugin_browser_response_destroy_entry(){ /* destroy line member editor entry */ gtk_widget_destroy(GTK_WIDGET(line_member->data)); } if(button == NULL || line_member_editor == NULL){ return; } machine_editor = (AgsMachineEditor *) gtk_widget_get_ancestor((GtkWidget *) line_member_editor, AGS_TYPE_MACHINE_EDITOR); line_editor = (AgsLineEditor *) gtk_widget_get_ancestor((GtkWidget *) line_member_editor, AGS_TYPE_LINE_EDITOR); line_member = gtk_container_get_children(GTK_CONTAINER(line_member_editor->line_member)); machine = machine_editor->machine; if(AGS_IS_OUTPUT(line_editor->channel)){ is_output = TRUE; }else{ is_output = FALSE; } if(machine->bridge != NULL){ has_bridge = TRUE; }else{ has_bridge = FALSE; } if(!has_bridge){ AgsLine *line; /* retrieve line and pad */ line = NULL; if(AGS_IS_OUTPUT(line_editor->channel)){ pad_start = pad = gtk_container_get_children((GtkContainer *) machine->output); }else{ pad_start = pad = gtk_container_get_children((GtkContainer *) machine->input); } pad = g_list_nth(pad, line_editor->channel->pad); if(pad != NULL){ list_start = list = gtk_container_get_children((GtkContainer *) AGS_PAD(pad->data)->expander_set); while(list != NULL){ if(AGS_LINE(list->data)->channel == line_editor->channel){ break; } list = list->next; } if(list != NULL){ line = AGS_LINE(list->data); g_list_free(list_start); } } g_list_free(pad_start); /* iterate line member */ if(line != NULL){ for(nth = 0; line_member != NULL; nth++){ line_member_next = line_member->next; children = gtk_container_get_children((GtkContainer *) GTK_CONTAINER(line_member->data)); if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(children->data))){ ags_line_member_editor_plugin_browser_response_destroy_entry(); /* remove effect */ ags_line_remove_effect(line, nth); } line_member = line_member_next; } } }else{ AgsEffectBridge *effect_bridge; AgsEffectLine *effect_line; effect_bridge = machine->bridge; /* retrieve effect line and effect pad */ if(is_output){ pad_start = pad = gtk_container_get_children((GtkContainer *) effect_bridge->output); }else{ pad_start = pad = gtk_container_get_children((GtkContainer *) effect_bridge->input); } pad = g_list_nth(pad, line_editor->channel->pad); if(pad != NULL){ list_start = list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_PAD(pad->data)->table); while(list != NULL){ if(AGS_EFFECT_LINE(list->data)->channel == line_editor->channel){ break; } list = list->next; } if(list != NULL){ effect_line = AGS_EFFECT_LINE(list->data); g_list_free(list_start); } } g_list_free(pad_start); /* iterate line member */ if(effect_line != NULL){ for(nth = 0; line_member != NULL; nth++){ children = gtk_container_get_children(GTK_CONTAINER(line_member->data)); if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(children->data))){ ags_line_member_editor_plugin_browser_response_destroy_entry(); /* remove effect */ ags_effect_line_remove_effect(effect_line, nth); } line_member = line_member->next; } } } } gsequencer-1.4.24/ags/X/ags_effect_line_callbacks.h0000644000175000017500000000273313246707333017127 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_EFFECT_LINE_CALLBACKS_H__ #define __AGS_EFFECT_LINE_CALLBACKS_H__ #include #include #include #include #include void ags_effect_line_remove_recall_callback(AgsRecall *recall, AgsEffectLine *effect_line); void ags_effect_line_add_effect_callback(AgsChannel *channel, gchar *filename, gchar *effect, AgsEffectLine *effect_line); void ags_effect_line_remove_effect_callback(AgsChannel *channel, guint nth, AgsEffectLine *effect_line); void ags_effect_line_output_port_run_post_callback(AgsRecall *recall, AgsEffectLine *effect_line); #endif /*__AGS_EFFECT_LINE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_navigation.h0000644000175000017500000000671313246707333015026 00000000000000/* 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 . */ #ifndef __AGS_NAVIGATION_H__ #define __AGS_NAVIGATION_H__ #include #include #include #define AGS_TYPE_NAVIGATION (ags_navigation_get_type()) #define AGS_NAVIGATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_NAVIGATION, AgsNavigation)) #define AGS_NAVIGATION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NAVIGATION, AgsNavigationClass)) #define AGS_IS_NAVIGATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_NAVIGATION)) #define AGS_IS_NAVIGATION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_NAVIGATION)) #define AGS_NAVIGATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_NAVIGATION, AgsNavigationClass)) #define AGS_NAVIGATION_DEFAULT_TACT_STEP (1.0) #define AGS_NAVIGATION_SEEK_STEPS (1.0) #define AGS_NAVIGATION_REWIND_STEPS (4.0) typedef struct _AgsNavigation AgsNavigation; typedef struct _AgsNavigationClass AgsNavigationClass; typedef enum{ AGS_NAVIGATION_BLOCK_TACT = 1, AGS_NAVIGATION_BLOCK_PLAY = 1 << 1, AGS_NAVIGATION_BLOCK_TIC = 1 << 2, }AgsNavigationFlags; struct _AgsNavigation { GtkVBox vbox; guint flags; GObject *soundcard; gdouble start_tact; gdouble note_offset; GtkToggleButton *expander; GtkSpinButton *bpm; gdouble current_bpm; GtkToggleButton *rewind; GtkButton *previous; GtkToggleButton *play; GtkButton *stop; GtkButton *next; GtkToggleButton *forward; GtkCheckButton *loop; GtkLabel *position_time; GtkSpinButton *position_tact; GtkLabel *duration_time; GtkSpinButton *duration_tact; GtkSpinButton *loop_left_tact; GtkSpinButton *loop_right_tact; GtkCheckButton *scroll; GtkCheckButton *exclude_sequencer; }; struct _AgsNavigationClass { GtkVBoxClass vbox; void (*change_position)(AgsNavigation *navigation, gdouble tact); }; GType ags_navigation_get_type(void); gchar* ags_navigation_tact_to_time_string(gdouble tact, gdouble bpm, gdouble delay_factor); gchar* ags_navigation_relative_tact_to_time_string(gchar *timestr, gdouble delay, gdouble bpm, gdouble delay_factor); gchar* ags_navigation_absolute_tact_to_time_string(gdouble tact, gdouble bpm, gdouble delay_factor); void ags_navigation_update_time_string(double tact, gdouble bpm, gdouble delay_factor, gchar *time_string); void ags_navigation_set_seeking_sensitive(AgsNavigation *navigation, gboolean enabled); void ags_navigation_change_position(AgsNavigation *navigation, gdouble tact); gboolean ags_navigation_duration_time_queue_draw(GtkWidget *widget); AgsNavigation* ags_navigation_new(); #endif /*__AGS_NAVIGATION_H__*/ gsequencer-1.4.24/ags/X/ags_output_editor_callbacks.c0000644000175000017500000000366613246707333017573 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include int ags_output_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsOutputEditor *output_editor) { AgsMachine *machine; AgsLineEditor *line_editor; AgsAudio *audio; AgsChannel *channel; if(old_parent != NULL){ return(0); } //TODO:JK: missing mutex line_editor = (AgsLineEditor *) gtk_widget_get_ancestor(widget, AGS_TYPE_LINE_EDITOR); if(line_editor != NULL){ channel = line_editor->channel; if(channel != NULL){ GtkTreeIter iter; audio = AGS_AUDIO(channel->audio); if(audio != NULL){ machine = AGS_MACHINE(audio->machine); gtk_combo_box_set_model(GTK_COMBO_BOX(output_editor->soundcard), GTK_TREE_MODEL(ags_machine_get_possible_audio_output_connections(machine))); ags_output_editor_check(output_editor); } } } return(0); } void ags_output_editor_soundcard_callback(GtkComboBoxText *combo_text, AgsOutputEditor *output_editor) { ags_output_editor_check(output_editor); } gsequencer-1.4.24/ags/X/ags_line.h0000644000175000017500000000674513247044247013622 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LINE_H__ #define __AGS_LINE_H__ #include #include #include #include #include #define AGS_TYPE_LINE (ags_line_get_type()) #define AGS_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LINE, AgsLine)) #define AGS_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LINE, AgsLineClass)) #define AGS_IS_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LINE)) #define AGS_IS_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LINE)) #define AGS_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LINE, AgsLineClass)) #define AGS_LINE_DEFAULT_VERSION "0.7.0\0" #define AGS_LINE_DEFAULT_BUILD_ID "CEST 31-10-2015 19:49\0" #define AGS_LINE_COLUMNS_COUNT (2) #define AGS_LINE_SEPARATOR_FILENAME "ags-line-separator-filename\0" #define AGS_LINE_SEPARATOR_EFFECT "ags-line-separator-effect\0" typedef struct _AgsLine AgsLine; typedef struct _AgsLineClass AgsLineClass; typedef enum{ AGS_LINE_CONNECTED = 1, AGS_LINE_GROUPED = 1 << 1, AGS_LINE_MAPPED_RECALL = 1 << 2, AGS_LINE_PREMAPPED_RECALL = 1 << 3, }AgsLineFlags; struct _AgsLine { GtkVBox vbox; guint flags; gchar *version; gchar *build_id; gchar *name; AgsChannel *channel; GtkWidget *pad; GtkLabel *label; GtkToggleButton *group; AgsExpander *expander; GtkWidget *indicator; GList *queued_drawing; }; struct _AgsLineClass { GtkVBoxClass vbox; void (*set_channel)(AgsLine *line, AgsChannel *channel); void (*group_changed)(AgsLine *line); GList* (*add_effect)(AgsLine *line, GList *control_type_name, gchar *filename, gchar *effect); void (*remove_effect)(AgsLine *line, guint nth); void (*map_recall)(AgsLine *line, guint output_pad_start); GList* (*find_port)(AgsLine *line); void (*done)(AgsLine *line, GObject *recall_id); }; GType ags_line_get_type(void); void ags_line_set_channel(AgsLine *line, AgsChannel *channel); void ags_line_group_changed(AgsLine *line); GList* ags_line_add_effect(AgsLine *line, GList *control_type_name, gchar *filename, gchar *effect); void ags_line_remove_effect(AgsLine *line, guint nth); void ags_line_map_recall(AgsLine *line, guint output_pad_start); GList* ags_line_find_port(AgsLine *line); void ags_line_done(AgsLine *line, GObject *recall_id); GList* ags_line_find_next_grouped(GList *line); gboolean ags_line_message_monitor_timeout(AgsLine *line); gboolean ags_line_indicator_queue_draw_timeout(GtkWidget *widget); AgsLine* ags_line_new(GtkWidget *pad, AgsChannel *channel); #endif /*__AGS_LINE_H__*/ gsequencer-1.4.24/ags/X/ags_link_collection_editor_callbacks.h0000644000175000017500000000334213246707333021377 00000000000000/* 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 . */ #ifndef __AGS_LINK_COLLECTION_EDITOR_CALLBACKS_H__ #define __AGS_LINK_COLLECTION_EDITOR_CALLBACKS_H__ #include #include #include #include int ags_link_collection_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLinkCollectionEditor *link_collection_editor); /* control widgets */ void ags_link_collection_editor_link_callback(GtkComboBox *combo, AgsLinkCollectionEditor *link_collection_editor); void ags_link_collection_editor_first_line_callback(GtkSpinButton *spin_button, AgsLinkCollectionEditor *link_collection_editor); void ags_link_collection_editor_first_link_callback(GtkSpinButton *spin_button, AgsLinkCollectionEditor *link_collection_editor); void ags_link_collection_editor_count_callback(GtkSpinButton *spin_button, AgsLinkCollectionEditor *link_collection_editor); #endif /*__AGS_LINK_COLLECTION_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_pad_callbacks.c0000644000175000017500000002572213247044247015425 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_pad_group_clicked_callback(GtkWidget *widget, AgsPad *pad) { AgsLine *line; GtkContainer *container; GList *list, *list_start; if(gtk_toggle_button_get_active(pad->group)){ container = (GtkContainer *) pad->expander_set; list_start = list = gtk_container_get_children(container); while(list != NULL){ line = AGS_LINE(list->data); if(!gtk_toggle_button_get_active(line->group)){ gtk_toggle_button_set_active(line->group, TRUE); } list = list->next; } g_list_free(list_start); }else{ container = (GtkContainer *) pad->expander_set; list_start = list = gtk_container_get_children(container); while(list != NULL){ line = AGS_LINE(list->data); if(!gtk_toggle_button_get_active(line->group)){ g_list_free(list_start); return; } list = list->next; } g_list_free(list_start); gtk_toggle_button_set_active(pad->group, TRUE); } } void ags_pad_mute_clicked_callback(GtkWidget *widget, AgsPad *pad) { AgsWindow *window; AgsMachine *machine; GtkContainer *container; AgsChannel *current, *next_pad; AgsSetMuted *set_muted; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GList *list, *list_start, *tasks; gboolean is_output; pthread_mutex_t *application_mutex; pthread_mutex_t *current_mutex; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) pad, AGS_TYPE_MACHINE); window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* */ current = pad->channel; tasks = NULL; /* lookup current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); if(gtk_toggle_button_get_active(pad->mute)){ if(gtk_toggle_button_get_active(pad->solo)){ gtk_toggle_button_set_active(pad->solo, FALSE); } /* mute */ pthread_mutex_lock(current_mutex); next_pad = pad->channel->next_pad; pthread_mutex_unlock(current_mutex); while(current != next_pad){ /* lookup current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* instantiate set muted task */ set_muted = ags_set_muted_new((GObject *) current, TRUE); tasks = g_list_prepend(tasks, set_muted); /* iterate */ pthread_mutex_lock(current_mutex); current = current->next; pthread_mutex_unlock(current_mutex); } }else{ if((AGS_MACHINE_SOLO & (machine->flags)) != 0){ pthread_mutex_lock(current_mutex); is_output = (AGS_IS_OUTPUT(pad->channel))? TRUE: FALSE; pthread_mutex_unlock(current_mutex); container = (GtkContainer *) (is_output ? machine->output: machine->input); list_start = list = gtk_container_get_children(container); while(!gtk_toggle_button_get_active(AGS_PAD(list->data)->solo)){ list = list->next; } g_list_free(list_start); gtk_toggle_button_set_active(AGS_PAD(list->data)->solo, FALSE); machine->flags &= ~(AGS_MACHINE_SOLO); } /* unmute */ pthread_mutex_lock(current_mutex); next_pad = pad->channel->next_pad; pthread_mutex_unlock(current_mutex); while(current != next_pad){ /* lookup current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* instantiate set muted task */ set_muted = ags_set_muted_new((GObject *) current, FALSE); tasks = g_list_prepend(tasks, set_muted); /* iterate */ pthread_mutex_lock(current_mutex); current = current->next; pthread_mutex_unlock(current_mutex); } } ags_gui_thread_schedule_task_list(gui_thread, tasks); } void ags_pad_solo_clicked_callback(GtkWidget *widget, AgsPad *pad) { AgsMachine *machine; GtkContainer *container; GList *list, *list_start; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) pad, AGS_TYPE_MACHINE); if(gtk_toggle_button_get_active(pad->solo)){ container = (GtkContainer *) (AGS_IS_OUTPUT(pad->channel) ? machine->output: machine->input); if(gtk_toggle_button_get_active(pad->mute)) gtk_toggle_button_set_active(pad->mute, FALSE); list_start = list = gtk_container_get_children(container); while(list != NULL){ if(list->data == pad){ list = list->next; continue; } gtk_toggle_button_set_active(AGS_PAD(list->data)->mute, TRUE); list = list->next; } g_list_free(list_start); machine->flags |= (AGS_MACHINE_SOLO); }else{ machine->flags &= ~(AGS_MACHINE_SOLO); } } void ags_pad_init_channel_launch_callback(AgsTask *task, AgsPad *input_pad) { AgsSoundcard *soundcard; AgsAudio *audio; AgsChannel *channel, *next_pad; AgsRecycling *last_recycling; AgsRecycling *recycling, *end_recycling; AgsAddAudioSignal *add_audio_signal; AgsMutexManager *mutex_manager; GList *recall; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel and its mutex */ channel = input_pad->channel; pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio and its audio mutex */ pthread_mutex_lock(channel_mutex); audio = AGS_AUDIO(channel->audio); pthread_mutex_unlock(channel_mutex); pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input_pad->channel->audio); pthread_mutex_unlock(application_mutex); /* get soundcard */ pthread_mutex_lock(audio_mutex); soundcard = AGS_SOUNDCARD(audio->soundcard); pthread_mutex_unlock(audio_mutex); /* get next pad */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); #ifdef AGS_DEBUG g_message("launch"); #endif while(channel != next_pad){ pthread_mutex_lock(channel_mutex); if(AGS_PLAYBACK(channel->playback) == NULL || AGS_PLAYBACK(channel->playback)->recall_id[0] == NULL){ channel = channel->next; pthread_mutex_unlock(channel_mutex); continue; } /* connect done */ recall = ags_recall_find_provider_with_recycling_context(channel->play, G_OBJECT(channel), G_OBJECT(AGS_PLAYBACK(channel->playback)->recall_id[0]->recycling_context)); recall = ags_recall_find_type(recall, AGS_TYPE_PLAY_CHANNEL_RUN); pthread_mutex_unlock(channel_mutex); if(recall != NULL){ AgsAudioSignal *audio_signal; AgsRecallID *current_recall_id; AgsNote *note; /* add audio signal */ pthread_mutex_lock(channel_mutex); recycling = channel->first_recycling; last_recycling = channel->last_recycling; note = AGS_PLAYBACK(channel->playback)->play_note; current_recall_id = AGS_RECALL(recall->data)->recall_id; pthread_mutex_unlock(channel_mutex); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(recycling_mutex); end_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); while(recycling != end_recycling){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); if(!AGS_RECALL(recall->data)->rt_safe){ /* instantiate audio signal */ audio_signal = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) current_recall_id); g_object_set(audio_signal, "note", note, NULL); /* 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_connectable_connect(AGS_CONNECTABLE(audio_signal)); /* * emit add_audio_signal on AgsRecycling */ ags_recycling_add_audio_signal(recycling, audio_signal); }else{ GList *list; pthread_mutex_lock(recycling_mutex); audio_signal = NULL; list = ags_audio_signal_get_by_recall_id(recycling->audio_signal, current_recall_id); if(list != NULL){ audio_signal = list->data; g_object_set(audio_signal, "note", note, NULL); } note->rt_attack = 0; note->rt_offset = 0; pthread_mutex_unlock(recycling_mutex); } /* iterate recycling */ pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } gsequencer-1.4.24/ags/X/ags_link_collection_editor.h0000644000175000017500000000531713246707333017404 00000000000000/* 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 . */ #ifndef __AGS_LINK_COLLECTION_EDITOR_H__ #define __AGS_LINK_COLLECTION_EDITOR_H__ #include #include #include #define AGS_TYPE_LINK_COLLECTION_EDITOR (ags_link_collection_editor_get_type()) #define AGS_LINK_COLLECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LINK_COLLECTION_EDITOR, AgsLinkCollectionEditor)) #define AGS_LINK_COLLECTION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LINK_COLLECTION_EDITOR, AgsLinkCollectionEditorClass)) #define AGS_IS_LINK_COLLECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LINK_COLLECTION_EDITOR)) #define AGS_IS_LINK_COLLECTION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LINK_COLLECTION_EDITOR)) #define AGS_LINK_COLLECTION_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_LINK_COLLECTION_EDITOR, AgsLinkCollectionEditorClass)) typedef struct _AgsLinkCollectionEditor AgsLinkCollectionEditor; typedef struct _AgsLinkCollectionEditorClass AgsLinkCollectionEditorClass; typedef enum{ AGS_LINK_COLLECTION_EDITOR_CONNECTED = 1, }AgsLinkCollectionEditorFlags; struct _AgsLinkCollectionEditor { GtkTable table; guint flags; GType channel_type; GtkComboBox *link; GtkSpinButton *first_line; GtkSpinButton *first_link; GtkSpinButton *count; }; struct _AgsLinkCollectionEditorClass { GtkTableClass table; }; GType ags_link_collection_editor_get_type(); void ags_link_collection_editor_check(AgsLinkCollectionEditor *link_collection_editor); void ags_link_collection_editor_check_first_line(AgsLinkCollectionEditor *link_collection_editor); void ags_link_collection_editor_check_first_link(AgsLinkCollectionEditor *link_collection_editor); void ags_link_collection_editor_check_count(AgsLinkCollectionEditor *link_collection_editor); AgsLinkCollectionEditor* ags_link_collection_editor_new(GType channel_type); #endif /*__AGS_LINK_COLLECTION_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_property_editor.c0000644000175000017500000001147713247044247016116 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_property_editor_class_init(AgsPropertyEditorClass *property_editor); void ags_property_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_property_editor_init(AgsPropertyEditor *property_editor); void ags_property_editor_connect(AgsConnectable *connectable); void ags_property_editor_disconnect(AgsConnectable *connectable); void ags_property_editor_show(GtkWidget *widget); /** * SECTION:ags_property_editor * @short_description: Property of audio, channels or pads in bulk mode. * @title: AgsPropertyEditor * @section_id: * @include: ags/X/ags_property_editor.h * * #AgsPropertyEditor is a composite widget to property. A property editor * should be packed by a #AgsPropertyCollectionEditor. */ GType ags_property_editor_get_type(void) { static GType ags_type_property_editor = 0; if(!ags_type_property_editor){ static const GTypeInfo ags_property_editor_info = { sizeof (AgsPropertyEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_property_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPropertyEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_property_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_property_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_property_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsPropertyEditor", &ags_property_editor_info, 0); g_type_add_interface_static(ags_type_property_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_property_editor); } void ags_property_editor_class_init(AgsPropertyEditorClass *property_editor) { } void ags_property_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_property_editor_connect; connectable->disconnect = ags_property_editor_disconnect; } void ags_property_editor_init(AgsPropertyEditor *property_editor) { property_editor->flags = 0; property_editor->enabled = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("enabled")); gtk_box_pack_start(GTK_BOX(property_editor), GTK_WIDGET(property_editor->enabled), FALSE, FALSE, 0); } void ags_property_editor_connect(AgsConnectable *connectable) { AgsPropertyEditor *property_editor; /* AgsPropertyEditor */ property_editor = AGS_PROPERTY_EDITOR(connectable); if((AGS_PROPERTY_EDITOR_CONNECTED & (property_editor->flags)) != 0){ return; } property_editor->flags |= AGS_PROPERTY_EDITOR_CONNECTED; g_signal_connect_after(G_OBJECT(property_editor->enabled), "toggled", G_CALLBACK(ags_property_editor_enable_callback), property_editor); } void ags_property_editor_disconnect(AgsConnectable *connectable) { AgsPropertyEditor *property_editor; /* AgsPropertyEditor */ property_editor = AGS_PROPERTY_EDITOR(connectable); if((AGS_PROPERTY_EDITOR_CONNECTED & (property_editor->flags)) == 0){ return; } property_editor->flags &= (~AGS_PROPERTY_EDITOR_CONNECTED); g_object_disconnect(property_editor->enabled, "any_signal::toggled", G_CALLBACK(ags_property_editor_enable_callback), property_editor, NULL); } void ags_property_editor_show(GtkWidget *widget) { AgsPropertyEditor *property_editor = (AgsPropertyEditor *) widget; } /** * ags_property_editor_new: * * Creates an #AgsPropertyEditor * * Returns: a new #AgsPropertyEditor * * Since: 1.0.0 */ AgsPropertyEditor* ags_property_editor_new() { AgsPropertyEditor *property_editor; property_editor = (AgsPropertyEditor *) g_object_new(AGS_TYPE_PROPERTY_EDITOR, NULL); return(property_editor); } gsequencer-1.4.24/ags/X/ags_connection_editor_callbacks.c0000644000175000017500000000441313246707333020361 00000000000000/* 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 . */ #include #include #include int ags_connection_editor_switch_page_callback(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, AgsConnectionEditor *connection_editor) { /* empty */ return(NULL); } int ags_connection_editor_apply_callback(GtkWidget *widget, AgsConnectionEditor *connection_editor) { ags_applicable_apply(AGS_APPLICABLE(connection_editor)); //TODO:JK: remove me // ags_applicable_reset(AGS_APPLICABLE(connection_editor)); return(0); } int ags_connection_editor_ok_callback(GtkWidget *widget, AgsConnectionEditor *connection_editor) { // ags_applicable_set_update(AGS_APPLICABLE(connection_editor), FALSE); ags_connectable_disconnect(AGS_CONNECTABLE(connection_editor)); ags_applicable_apply(AGS_APPLICABLE(connection_editor)); if(connection_editor->machine != NULL){ connection_editor->machine->connection_editor = NULL; } gtk_widget_destroy((GtkWidget *) connection_editor); return(0); } int ags_connection_editor_cancel_callback(GtkWidget *widget, AgsConnectionEditor *connection_editor) { if(connection_editor->machine != NULL){ connection_editor->machine->connection_editor = NULL; } gtk_widget_destroy((GtkWidget *) connection_editor); return(0); } gboolean ags_connection_editor_delete_event(GtkWidget *dialog, gint response, AgsConnectionEditor *connection_editor) { connection_editor->machine->connection_editor = NULL; return(TRUE); } gsequencer-1.4.24/ags/X/ags_export_soundcard_callbacks.c0000644000175000017500000001751413246707333020245 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_export_soundcard_backend_callback(GtkWidget *combo_box, AgsExportSoundcard *export_soundcard) { AgsExportWindow *export_window; AgsApplicationContext *application_context; GList *soundcard; gchar *backend; gchar *device; gboolean found_card; export_window = (AgsExportWindow *) gtk_widget_get_ancestor(export_soundcard, AGS_TYPE_EXPORT_WINDOW); application_context = NULL; if(export_window != NULL){ application_context = export_window->application_context; } /* refresh card */ ags_export_soundcard_refresh_card(export_soundcard); /* get soundcard */ soundcard = NULL; if(application_context != NULL){ soundcard = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); } backend = gtk_combo_box_text_get_active_text(export_soundcard->backend); device = gtk_combo_box_text_get_active_text(export_soundcard->card); if(backend == NULL || device == NULL){ return; } found_card = FALSE; while(soundcard != NULL){ if(!g_ascii_strncasecmp(backend, "alsa", 5)){ if(AGS_IS_DEVOUT(soundcard->data) && (AGS_DEVOUT_ALSA & (AGS_DEVOUT(soundcard->data)->flags)) != 0 && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } }else if(!g_ascii_strncasecmp(backend, "oss", 4)){ if(AGS_IS_DEVOUT(soundcard->data) && (AGS_DEVOUT_OSS & (AGS_DEVOUT(soundcard->data)->flags)) != 0 && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ if(AGS_IS_JACK_DEVOUT(soundcard->data) && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } }else if(!g_ascii_strncasecmp(backend, "pulse", 6)){ if(AGS_IS_PULSE_DEVOUT(soundcard->data) && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } }else if(!g_ascii_strncasecmp(backend, "core-audio", 6)){ if(AGS_IS_CORE_AUDIO_DEVOUT(soundcard->data) && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } } soundcard = soundcard->next; } if(!found_card){ g_object_set(export_soundcard, "soundcard", NULL, NULL); } } void ags_export_soundcard_card_callback(GtkWidget *combo_box, AgsExportSoundcard *export_soundcard) { AgsExportWindow *export_window; AgsApplicationContext *application_context; GList *soundcard; gchar *backend; gchar *device; gboolean found_card; export_window = (AgsExportWindow *) gtk_widget_get_ancestor(export_soundcard, AGS_TYPE_EXPORT_WINDOW); application_context = NULL; if(export_window != NULL){ application_context = export_window->application_context; } /* get soundcard */ soundcard = NULL; if(application_context != NULL){ soundcard = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); } backend = gtk_combo_box_text_get_active_text(export_soundcard->backend); device = gtk_combo_box_text_get_active_text(export_soundcard->card); if(backend == NULL || device == NULL){ return; } found_card = FALSE; while(soundcard != NULL){ if(!g_ascii_strncasecmp(backend, "alsa", 5)){ if(AGS_IS_DEVOUT(soundcard->data) && (AGS_DEVOUT_ALSA & (AGS_DEVOUT(soundcard->data)->flags)) != 0 && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } }else if(!g_ascii_strncasecmp(backend, "oss", 4)){ if(AGS_IS_DEVOUT(soundcard->data) && (AGS_DEVOUT_OSS & (AGS_DEVOUT(soundcard->data)->flags)) != 0 && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ if(AGS_IS_JACK_DEVOUT(soundcard->data) && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } }else if(!g_ascii_strncasecmp(backend, "pulse", 5)){ if(AGS_IS_PULSE_DEVOUT(soundcard->data) && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } }else if(!g_ascii_strncasecmp(backend, "core-audio", 5)){ if(AGS_IS_CORE_AUDIO_DEVOUT(soundcard->data) && !g_ascii_strcasecmp(device, ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)))){ g_object_set(export_soundcard, "soundcard", soundcard->data, NULL); found_card = TRUE; break; } } soundcard = soundcard->next; } if(!found_card){ g_object_set(export_soundcard, "soundcard", NULL, NULL); } } void ags_export_soundcard_file_chooser_button_callback(GtkWidget *file_chooser_button, AgsExportSoundcard *export_soundcard) { AgsExportWindow *export_window; GtkFileChooserDialog *file_chooser; export_window = (AgsExportWindow *) gtk_widget_get_ancestor(export_soundcard, AGS_TYPE_EXPORT_WINDOW); file_chooser = (GtkFileChooserDialog *) gtk_file_chooser_dialog_new("Export to file ...", GTK_WINDOW(export_window), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if(gtk_dialog_run(GTK_DIALOG(file_chooser)) == GTK_RESPONSE_ACCEPT){ char *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); gtk_entry_set_text(export_soundcard->filename, filename); } gtk_widget_destroy((GtkWidget *) file_chooser); } gsequencer-1.4.24/ags/X/ags_history_browser.c0000644000175000017500000001611613246707333016124 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_history_browser_class_init(AgsHistoryBrowserClass *history_browser); void ags_history_browser_connectable_interface_init(AgsConnectableInterface *connectable); void ags_history_browser_init(AgsHistoryBrowser *history_browser); void ags_history_browser_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_history_browser_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_history_browser_finalize(GObject *gobject); void ags_history_browser_connect(AgsConnectable *connectable); void ags_history_browser_disconnect(AgsConnectable *connectable); void ags_history_browser_show(GtkWidget *widget); gboolean ags_history_browser_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_history_browser * @short_description: The history dialog * @title: AgsHistoryBrowser * @section_id: * @include: ags/X/ags_history_browser.h * * #AgsHistoryBrowser lets edit history. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, }; static gpointer ags_history_browser_parent_class = NULL; GType ags_history_browser_get_type() { static GType ags_type_history_browser = 0; if(!ags_type_history_browser){ static const GTypeInfo ags_history_browser_info = { sizeof (AgsHistoryBrowserClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_history_browser_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsHistoryBrowser), 0, /* n_preallocs */ (GInstanceInitFunc) ags_history_browser_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_history_browser_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_history_browser = g_type_register_static(GTK_TYPE_WINDOW, "AgsHistoryBrowser", &ags_history_browser_info, 0); g_type_add_interface_static(ags_type_history_browser, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_history_browser); } void ags_history_browser_class_init(AgsHistoryBrowserClass *history_browser) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_history_browser_parent_class = g_type_class_peek_parent(history_browser); /* GObjectClass */ gobject = (GObjectClass *) history_browser; gobject->set_property = ags_history_browser_set_property; gobject->get_property = ags_history_browser_get_property; gobject->finalize = ags_history_browser_finalize; /* properties */ /** * AgsHistoryBrowser:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) history_browser; widget->show = ags_history_browser_show; widget->delete_event = ags_history_browser_delete_event; } void ags_history_browser_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_history_browser_connect; connectable->disconnect = ags_history_browser_disconnect; } void ags_history_browser_init(AgsHistoryBrowser *history_browser) { history_browser->flags = 0; } void ags_history_browser_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsHistoryBrowser *history_browser; history_browser = AGS_HISTORY_BROWSER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) history_browser->application_context == application_context) return; if(history_browser->application_context != NULL){ g_object_unref(history_browser->application_context); } if(application_context != NULL){ g_object_ref(application_context); } history_browser->application_context = (GObject *) application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_history_browser_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsHistoryBrowser *history_browser; history_browser = AGS_HISTORY_BROWSER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: g_value_set_object(value, history_browser->application_context); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_history_browser_connect(AgsConnectable *connectable) { AgsHistoryBrowser *history_browser; history_browser = AGS_HISTORY_BROWSER(connectable); } void ags_history_browser_disconnect(AgsConnectable *connectable) { //TODO:JK: /* implement me */ } void ags_history_browser_finalize(GObject *gobject) { AgsHistoryBrowser *history_browser; history_browser = (AgsHistoryBrowser *) gobject; G_OBJECT_CLASS(ags_history_browser_parent_class)->finalize(gobject); } void ags_history_browser_show(GtkWidget *widget) { AgsHistoryBrowser *history_browser; GTK_WIDGET_CLASS(ags_history_browser_parent_class)->show(widget); history_browser = (AgsHistoryBrowser *) widget; } gboolean ags_history_browser_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_history_browser_parent_class)->delete_event(widget, event); return(TRUE); } AgsHistoryBrowser* ags_history_browser_new() { AgsHistoryBrowser *history_browser; history_browser = (AgsHistoryBrowser *) g_object_new(AGS_TYPE_HISTORY_BROWSER, NULL); return(history_browser); } gsequencer-1.4.24/ags/X/ags_effect_bridge_callbacks.c0000644000175000017500000000276013247044247017426 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_effect_bridge_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsEffectBridge *effect_bridge) { ags_effect_bridge_resize_audio_channels(effect_bridge, audio_channels, audio_channels_old); } void ags_effect_bridge_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsEffectBridge *effect_bridge) { ags_effect_bridge_resize_pads(effect_bridge, channel_type, pads, pads_old); } gsequencer-1.4.24/ags/X/ags_output_collection_editor_callbacks.c0000644000175000017500000000337513246707333022003 00000000000000/* 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 . */ #include #include int ags_output_collection_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsOutputCollectionEditor *output_collection_editor) { AgsConnectionEditor *connection_editor; if(old_parent != NULL){ return(0); } connection_editor = (AgsConnectionEditor *) gtk_widget_get_ancestor(widget, AGS_TYPE_CONNECTION_EDITOR); if(connection_editor != NULL && connection_editor->machine != NULL){ gtk_combo_box_set_model(GTK_COMBO_BOX(output_collection_editor->soundcard), GTK_TREE_MODEL(ags_machine_get_possible_audio_output_connections(connection_editor->machine))); ags_output_collection_editor_check(output_collection_editor); } return(0); } void ags_output_collection_editor_soundcard_callback(GtkWidget *combo_box, AgsOutputCollectionEditor *output_collection_editor) { ags_output_collection_editor_check(output_collection_editor); } gsequencer-1.4.24/ags/X/ags_playback_window.c0000644000175000017500000002144413246707333016035 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_playback_window_class_init(AgsPlaybackWindowClass *playback_window); void ags_playback_window_connectable_interface_init(AgsConnectableInterface *connectable); void ags_playback_window_init(AgsPlaybackWindow *playback_window); void ags_playback_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_playback_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_playback_window_finalize(GObject *gobject); void ags_playback_window_connect(AgsConnectable *connectable); void ags_playback_window_disconnect(AgsConnectable *connectable); void ags_playback_window_show(GtkWidget *widget); gboolean ags_playback_window_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_playback_window * @short_description: The playback dialog * @title: AgsPlaybackWindow * @section_id: * @include: ags/X/ags_playback_window.h * * #AgsPlaybackWindow lets you playback to audio files. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; static gpointer ags_playback_window_parent_class = NULL; GType ags_playback_window_get_type() { static GType ags_type_playback_window = 0; if(!ags_type_playback_window){ static const GTypeInfo ags_playback_window_info = { sizeof (AgsPlaybackWindowClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_playback_window_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlaybackWindow), 0, /* n_preallocs */ (GInstanceInitFunc) ags_playback_window_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_playback_window_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_playback_window = g_type_register_static(GTK_TYPE_WINDOW, "AgsPlaybackWindow", &ags_playback_window_info, 0); g_type_add_interface_static(ags_type_playback_window, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_playback_window); } void ags_playback_window_class_init(AgsPlaybackWindowClass *playback_window) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_playback_window_parent_class = g_type_class_peek_parent(playback_window); /* GObjectClass */ gobject = (GObjectClass *) playback_window; gobject->set_property = ags_playback_window_set_property; gobject->get_property = ags_playback_window_get_property; gobject->finalize = ags_playback_window_finalize; /* properties */ /** * AgsPlaybackWindow:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsPlaybackWindow:main-window: * * The assigned #AgsWindow. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) playback_window; widget->show = ags_playback_window_show; widget->delete_event = ags_playback_window_delete_event; } void ags_playback_window_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_playback_window_connect; connectable->disconnect = ags_playback_window_disconnect; } void ags_playback_window_init(AgsPlaybackWindow *playback_window) { playback_window->flags = 0; g_object_set(playback_window, "title", "MIDI playback", NULL); playback_window->application_context = NULL; playback_window->main_window = NULL; } void ags_playback_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlaybackWindow *playback_window; playback_window = AGS_PLAYBACK_WINDOW(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) playback_window->application_context == application_context){ return; } if(playback_window->application_context != NULL){ g_object_unref(playback_window->application_context); } if(application_context != NULL){ g_object_ref(application_context); } playback_window->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) playback_window->main_window == main_window){ return; } if(playback_window->main_window != NULL){ g_object_unref(playback_window->main_window); } if(main_window != NULL){ g_object_ref(main_window); } playback_window->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_playback_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlaybackWindow *playback_window; playback_window = AGS_PLAYBACK_WINDOW(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, playback_window->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, playback_window->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_playback_window_connect(AgsConnectable *connectable) { AgsPlaybackWindow *playback_window; playback_window = AGS_PLAYBACK_WINDOW(connectable); if((AGS_PLAYBACK_WINDOW_CONNECTED & (playback_window->flags)) != 0){ return; } playback_window->flags |= AGS_PLAYBACK_WINDOW_CONNECTED; } void ags_playback_window_disconnect(AgsConnectable *connectable) { AgsPlaybackWindow *playback_window; playback_window = AGS_PLAYBACK_WINDOW(connectable); if((AGS_PLAYBACK_WINDOW_CONNECTED & (playback_window->flags)) == 0){ return; } playback_window->flags &= (~AGS_PLAYBACK_WINDOW_CONNECTED); } void ags_playback_window_finalize(GObject *gobject) { AgsPlaybackWindow *playback_window; playback_window = (AgsPlaybackWindow *) gobject; if(playback_window->application_context != NULL){ g_object_unref(playback_window->application_context); } G_OBJECT_CLASS(ags_playback_window_parent_class)->finalize(gobject); } void ags_playback_window_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_playback_window_parent_class)->show(widget); } gboolean ags_playback_window_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_playback_window_parent_class)->delete_event(widget, event); return(TRUE); } /** * ags_playback_window_new: * * Instantiate an #AgsPlaybackWindow * * Returns: an #AgsPlaybackWindow * * Since: 1.0.0 */ AgsPlaybackWindow* ags_playback_window_new() { AgsPlaybackWindow *playback_window; playback_window = (AgsPlaybackWindow *) g_object_new(AGS_TYPE_PLAYBACK_WINDOW, NULL); return(playback_window); } gsequencer-1.4.24/ags/X/ags_line_callbacks.c0000644000175000017500000001262613247044247015607 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include int ags_line_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLine *line) { if(old_parent == NULL){ // gtk_widget_show_all(GTK_WIDGET(line)); } return(0); } void ags_line_remove_recall_callback(AgsRecall *recall, AgsLine *line) { if(recall->recall_id != NULL && recall->recall_id->recycling_context->parent != NULL){ if(AGS_IS_RECALL_AUDIO(recall) || AGS_RECALL_AUDIO_RUN(recall)){ ags_audio_remove_recall(AGS_AUDIO(line->channel->audio), (GObject *) recall, FALSE); }else{ ags_channel_remove_recall(AGS_CHANNEL(line->channel), (GObject *) recall, FALSE); } }else{ if(AGS_IS_RECALL_AUDIO(recall) || AGS_RECALL_AUDIO_RUN(recall)){ ags_audio_remove_recall(AGS_AUDIO(line->channel->audio), (GObject *) recall, TRUE); }else{ ags_channel_remove_recall(AGS_CHANNEL(line->channel), (GObject *) recall, TRUE); } } } void ags_line_group_clicked_callback(GtkWidget *widget, AgsLine *line) { AgsPad *pad; AgsLine *current; GtkContainer *container; GList *list, *list_start; pad = (AgsPad *) gtk_widget_get_ancestor(GTK_WIDGET(line), AGS_TYPE_PAD); container = (GtkContainer *) pad->expander_set; list_start = list = gtk_container_get_children(container); if(gtk_toggle_button_get_active(line->group)){ ags_line_group_changed(line); while(list != NULL){ current = AGS_LINE(list->data); if(!gtk_toggle_button_get_active(current->group)){ g_list_free(list_start); return; } list = list->next; } gtk_toggle_button_set_active(pad->group, TRUE); }else{ if(g_list_length(list) > 1){ if(gtk_toggle_button_get_active(pad->group)){ gtk_toggle_button_set_active(pad->group, FALSE); } while(list != NULL){ current = AGS_LINE(list->data); if(gtk_toggle_button_get_active(current->group)){ ags_line_group_changed(line); g_list_free(list_start); return; } list = list->next; } } gtk_toggle_button_set_active(line->group, TRUE); } g_list_free(list_start); return; } void ags_line_volume_callback(GtkRange *range, AgsLine *line) { AgsVolumeChannel *volume_channel; GList *list; GValue value = {0,}; g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, gtk_range_get_value(range)); list = line->channel->play; while((list = ags_recall_find_type(list, AGS_TYPE_VOLUME_CHANNEL)) != NULL){ volume_channel = AGS_VOLUME_CHANNEL(list->data); ags_port_safe_write(volume_channel->volume, &value); list = list->next; } list = line->channel->recall; while((list = ags_recall_find_type(list, AGS_TYPE_VOLUME_CHANNEL)) != NULL){ volume_channel = AGS_VOLUME_CHANNEL(list->data); ags_port_safe_write(volume_channel->volume, &value); list = list->next; } } void ags_line_done_callback(AgsLine *line, AgsRecallID *recall_id, gpointer data) { AgsChannel *source; AgsChannel *channel; AgsPlayback *playback; AgsChannel *next_pad; AgsRecallID *match_recall_id; AgsMutexManager *mutex_manager; gboolean all_done; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); source = line->channel; /* retrieve channel */ channel = AGS_PAD(AGS_LINE(line)->pad)->channel; /* retrieve channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get next pad */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); all_done = TRUE; while(channel != next_pad){ pthread_mutex_lock(channel_mutex); playback = AGS_PLAYBACK(channel->playback); match_recall_id = playback->recall_id[0]; pthread_mutex_unlock(channel_mutex); /* check if pending */ if(match_recall_id != NULL){ all_done = FALSE; break; } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* toggle play button if all playback done */ if(all_done){ AgsPad *pad; pad = AGS_PAD(AGS_LINE(line)->pad); if(pad->play != NULL){ gtk_toggle_button_set_active(pad->play, FALSE); } } } gsequencer-1.4.24/ags/X/ags_notation_editor_callbacks.h0000644000175000017500000000314413247044247020061 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTATION_EDITOR_CALLBACKS_H__ #define __AGS_NOTATION_EDITOR_CALLBACKS_H__ #include #include #include #include #include void ags_notation_editor_machine_changed_callback(AgsMachineSelector *machine_selector, AgsMachine *machine, AgsNotationEditor *notation_editor); void ags_notation_editor_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsNotationEditor *notation_editor); void ags_notation_editor_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsNotationEditor *notation_editor); void ags_notation_editor_init_channel_launch_callback(AgsTask *task, AgsNote *note); #endif /*__AGS_NOTATION_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_resize_editor.c0000644000175000017500000002462313247044247015530 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_resize_editor_class_init(AgsResizeEditorClass *resize_editor); void ags_resize_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_resize_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_resize_editor_init(AgsResizeEditor *resize_editor); void ags_resize_editor_connect(AgsConnectable *connectable); void ags_resize_editor_disconnect(AgsConnectable *connectable); void ags_resize_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_resize_editor_apply(AgsApplicable *applicable); void ags_resize_editor_reset(AgsApplicable *applicable); /** * SECTION:ags_resize_editor * @short_description: Resize audio channels or pads. * @title: AgsResizeEditor * @section_id: * @include: ags/X/ags_resize_editor.h * * #AgsResizeEditor is a composite widget to resize. A resize editor * should be packed by a #AgsMachineEditor. */ static gpointer ags_resize_editor_parent_class = NULL; AgsConnectableInterface *ags_resize_editor_parent_connectable_interface; GType ags_resize_editor_get_type(void) { static GType ags_type_resize_editor = 0; if(!ags_type_resize_editor){ static const GTypeInfo ags_resize_editor_info = { sizeof (AgsResizeEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_resize_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsResizeEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_resize_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_resize_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_resize_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_resize_editor = g_type_register_static(AGS_TYPE_PROPERTY_EDITOR, "AgsResizeEditor", &ags_resize_editor_info, 0); g_type_add_interface_static(ags_type_resize_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_resize_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_resize_editor); } void ags_resize_editor_class_init(AgsResizeEditorClass *resize_editor) { ags_resize_editor_parent_class = g_type_class_peek_parent(resize_editor); } void ags_resize_editor_connectable_interface_init(AgsConnectableInterface *connectable) { ags_resize_editor_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_resize_editor_connect; connectable->disconnect = ags_resize_editor_disconnect; } void ags_resize_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_resize_editor_set_update; applicable->apply = ags_resize_editor_apply; applicable->reset = ags_resize_editor_reset; } void ags_resize_editor_init(AgsResizeEditor *resize_editor) { GtkTable *table; GtkAlignment *alignment; GtkLabel *label; table = (GtkTable *) gtk_table_new(3, 2, FALSE); gtk_box_pack_start(GTK_BOX(resize_editor), GTK_WIDGET(table), FALSE, FALSE, 0); /* audio channels */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(table, GTK_WIDGET(alignment), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("audio channels")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(table, GTK_WIDGET(alignment), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); resize_editor->audio_channels = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 1024.0, 1.0); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(resize_editor->audio_channels)); /* output pads */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(table, GTK_WIDGET(alignment), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("outputs")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(table, GTK_WIDGET(alignment), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); resize_editor->output_pads = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 1024.0, 1.0); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(resize_editor->output_pads)); /* input pads */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(table, GTK_WIDGET(alignment), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("inputs")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(table, GTK_WIDGET(alignment), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); resize_editor->input_pads = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 1024.0, 1.0); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(resize_editor->input_pads)); } void ags_resize_editor_connect(AgsConnectable *connectable) { ags_resize_editor_parent_connectable_interface->connect(connectable); } void ags_resize_editor_disconnect(AgsConnectable *connectable) { ags_resize_editor_parent_connectable_interface->disconnect(connectable); } void ags_resize_editor_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_resize_editor_apply(AgsApplicable *applicable) { AgsWindow *window; AgsMachineEditor *machine_editor; AgsResizeEditor *resize_editor; AgsAudio *audio; AgsResizeAudio *resize_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; resize_editor = AGS_RESIZE_EDITOR(applicable); if((AGS_PROPERTY_EDITOR_ENABLED & (AGS_PROPERTY_EDITOR(resize_editor)->flags)) == 0){ return; } machine_editor = AGS_MACHINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(resize_editor), AGS_TYPE_MACHINE_EDITOR)); audio = machine_editor->machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get window and application_context */ window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine_editor->machine); application_context = (AgsApplicationContext *) window->application_context; /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* create task */ resize_audio = ags_resize_audio_new(audio, (guint) gtk_spin_button_get_value_as_int(resize_editor->output_pads), (guint) gtk_spin_button_get_value_as_int(resize_editor->input_pads), (guint) gtk_spin_button_get_value_as_int(resize_editor->audio_channels)); /* append AgsResizeAudio */ ags_gui_thread_schedule_task(gui_thread, resize_audio); } void ags_resize_editor_reset(AgsApplicable *applicable) { AgsMachineEditor *machine_editor; AgsResizeEditor *resize_editor; AgsAudio *audio; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; resize_editor = AGS_RESIZE_EDITOR(applicable); machine_editor = AGS_MACHINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(resize_editor), AGS_TYPE_MACHINE_EDITOR)); audio = machine_editor->machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* reset */ pthread_mutex_lock(audio_mutex); if((AGS_MACHINE_MONO & (machine_editor->machine->mapping_flags)) != 0){ gtk_spin_button_set_range(resize_editor->audio_channels, 0.0, 1.0); } gtk_spin_button_set_value(resize_editor->audio_channels, audio->audio_channels); gtk_spin_button_set_value(resize_editor->input_pads, audio->input_pads); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (machine_editor->machine->audio->flags)) == 0){ gtk_spin_button_set_range(resize_editor->output_pads, 0.0, 1.0); } gtk_spin_button_set_value(resize_editor->output_pads, audio->output_pads); pthread_mutex_unlock(audio_mutex); } /** * ags_resize_editor_new: * * Creates an #AgsResizeEditor * * Returns: a new #AgsResizeEditor * * Since: 1.0.0 */ AgsResizeEditor* ags_resize_editor_new() { AgsResizeEditor *resize_editor; resize_editor = (AgsResizeEditor *) g_object_new(AGS_TYPE_RESIZE_EDITOR, NULL); return(resize_editor); } gsequencer-1.4.24/ags/X/ags_soundcard_editor.h0000644000175000017500000000661713247044247016221 00000000000000/* 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 . */ #ifndef __AGS_SOUNDCARD_EDITOR_H__ #define __AGS_SOUNDCARD_EDITOR_H__ #include #include #include #define AGS_TYPE_SOUNDCARD_EDITOR (ags_soundcard_editor_get_type()) #define AGS_SOUNDCARD_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SOUNDCARD_EDITOR, AgsSoundcardEditor)) #define AGS_SOUNDCARD_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SOUNDCARD_EDITOR, AgsSoundcardEditorClass)) #define AGS_IS_SOUNDCARD_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SOUNDCARD_EDITOR)) #define AGS_IS_SOUNDCARD_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SOUNDCARD_EDITOR)) #define AGS_SOUNDCARD_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_SOUNDCARD_EDITOR, AgsSoundcardEditorClass)) typedef struct _AgsSoundcardEditor AgsSoundcardEditor; typedef struct _AgsSoundcardEditorClass AgsSoundcardEditorClass; typedef enum{ AGS_SOUNDCARD_EDITOR_CONNECTED = 1, AGS_SOUNDCARD_EDITOR_BLOCK_RESET = 1 << 1, AGS_SOUNDCARD_EDITOR_BLOCK_BACKEND = 1 << 2, AGS_SOUNDCARD_EDITOR_BLOCK_CARD = 1 << 3, AGS_SOUNDCARD_EDITOR_BLOCK_ADD = 1 << 4, AGS_SOUNDCARD_EDITOR_BLOCK_LOAD = 1 << 5, }AgsSoundcardEditorFlags; struct _AgsSoundcardEditor { GtkVBox vbox; guint flags; GObject *soundcard; GObject *soundcard_thread; GtkComboBoxText *backend; GtkComboBoxText *card; GtkHBox *sink_hbox; GtkButton *add_sink; GtkButton *remove_sink; GtkSpinButton *audio_channels; GtkSpinButton *samplerate; GtkSpinButton *buffer_size; GtkComboBoxText *format; GtkButton *remove; }; struct _AgsSoundcardEditorClass { GtkVBoxClass vbox; }; GType ags_soundcard_editor_get_type(void); void ags_soundcard_editor_add_sink(AgsSoundcardEditor *soundcard_editor, gchar *device); void ags_soundcard_editor_remove_sink(AgsSoundcardEditor *soundcard_editor, gchar *device); void ags_soundcard_editor_add_soundcard(AgsSoundcardEditor *soundcard_editor, GObject *soundcard); void ags_soundcard_editor_remove_soundcard(AgsSoundcardEditor *soundcard_editor, GObject *soundcard); void ags_soundcard_editor_load_core_audio_card(AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_load_pulse_card(AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_load_jack_card(AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_load_alsa_card(AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_load_oss_card(AgsSoundcardEditor *soundcard_editor); AgsSoundcardEditor* ags_soundcard_editor_new(); #endif /*__AGS_SOUNDCARD_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_output_listing_editor_callbacks.c0000644000175000017500000000602213247044247021310 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include int ags_output_listing_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsOutputListingEditor *output_listing_editor) { AgsConnectionEditor *connection_editor; if(old_parent != NULL){ return(0); } connection_editor = (AgsConnectionEditor *) gtk_widget_get_ancestor(widget, AGS_TYPE_CONNECTION_EDITOR); if(connection_editor != NULL && connection_editor->machine != NULL){ ags_output_listing_editor_add_children(output_listing_editor, connection_editor->machine->audio, 0, FALSE); } return(0); } void ags_output_listing_editor_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsOutputListingEditor *output_listing_editor) { AgsAudio *audio; audio = machine->audio; if(channel_type != output_listing_editor->channel_type){ return; } if(pads_old < pads){ AgsMutexManager *mutex_manager; guint audio_channels; guint nth_channel; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, audio); pthread_mutex_unlock(application_mutex); /* get some audio fields */ pthread_mutex_lock(audio_mutex); audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* add children */ nth_channel = pads_old * audio_channels; ags_output_listing_editor_add_children(output_listing_editor, audio, nth_channel, TRUE); }else{ GList *list, *list_next, *list_start; list_start = list = gtk_container_get_children(GTK_CONTAINER(output_listing_editor->child)); list = g_list_nth(list, pads); while(list != NULL){ list_next = list->next; gtk_widget_destroy(GTK_WIDGET(list->data)); list = list_next; } g_list_free(list_start); } } gsequencer-1.4.24/ags/X/ags_midi_preferences.c0000644000175000017500000002204613247044247016161 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_midi_preferences_class_init(AgsMidiPreferencesClass *midi_preferences); void ags_midi_preferences_connectable_interface_init(AgsConnectableInterface *connectable); void ags_midi_preferences_applicable_interface_init(AgsApplicableInterface *applicable); void ags_midi_preferences_init(AgsMidiPreferences *midi_preferences); void ags_midi_preferences_connect(AgsConnectable *connectable); void ags_midi_preferences_disconnect(AgsConnectable *connectable); void ags_midi_preferences_set_update(AgsApplicable *applicable, gboolean update); void ags_midi_preferences_apply(AgsApplicable *applicable); void ags_midi_preferences_reset(AgsApplicable *applicable); static void ags_midi_preferences_finalize(GObject *gobject); /** * SECTION:ags_midi_preferences * @short_description: A composite widget to do midi related preferences * @title: AgsMidiPreferences * @section_id: * @include: ags/X/ags_midi_preferences.h * * #AgsMidiPreferences enables you to make preferences of sequencer, midi channels, * samplerate and buffer size. */ static gpointer ags_midi_preferences_parent_class = NULL; GType ags_midi_preferences_get_type(void) { static GType ags_type_midi_preferences = 0; if(!ags_type_midi_preferences){ static const GTypeInfo ags_midi_preferences_info = { sizeof (AgsMidiPreferencesClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_midi_preferences_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMidiPreferences), 0, /* n_preallocs */ (GInstanceInitFunc) ags_midi_preferences_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_midi_preferences_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_midi_preferences_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_midi_preferences = g_type_register_static(GTK_TYPE_VBOX, "AgsMidiPreferences", &ags_midi_preferences_info, 0); g_type_add_interface_static(ags_type_midi_preferences, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_midi_preferences, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_midi_preferences); } void ags_midi_preferences_class_init(AgsMidiPreferencesClass *midi_preferences) { GObjectClass *gobject; GtkWidgetClass *widget; ags_midi_preferences_parent_class = g_type_class_peek_parent(midi_preferences); /* GtkObjectClass */ gobject = (GObjectClass *) midi_preferences; gobject->finalize = ags_midi_preferences_finalize; } void ags_midi_preferences_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_midi_preferences_connect; connectable->disconnect = ags_midi_preferences_disconnect; } void ags_midi_preferences_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_midi_preferences_set_update; applicable->apply = ags_midi_preferences_apply; applicable->reset = ags_midi_preferences_reset; } void ags_midi_preferences_init(AgsMidiPreferences *midi_preferences) { GtkScrolledWindow *scrolled_window; GtkTable *table; GtkHBox *hbox; g_signal_connect_after((GObject *) midi_preferences, "parent-set", G_CALLBACK(ags_midi_preferences_parent_set_callback), (gpointer) midi_preferences); midi_preferences->flags = 0; /* scrolled window */ scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start((GtkBox *) midi_preferences, (GtkWidget *) scrolled_window, TRUE, TRUE, 0); midi_preferences->sequencer_editor = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_scrolled_window_add_with_viewport(scrolled_window, (GtkWidget *) midi_preferences->sequencer_editor); /* */ midi_preferences->add = NULL; } void ags_midi_preferences_connect(AgsConnectable *connectable) { AgsMidiPreferences *midi_preferences; midi_preferences = AGS_MIDI_PREFERENCES(connectable); if((AGS_MIDI_PREFERENCES_CONNECTED & (midi_preferences->flags)) != 0){ return; } midi_preferences->flags |= AGS_MIDI_PREFERENCES_CONNECTED; if(midi_preferences->add != NULL){ g_signal_connect(G_OBJECT(midi_preferences->add), "clicked", G_CALLBACK(ags_midi_preferences_add_callback), midi_preferences); } } void ags_midi_preferences_disconnect(AgsConnectable *connectable) { AgsMidiPreferences *midi_preferences; midi_preferences = AGS_MIDI_PREFERENCES(connectable); if((AGS_MIDI_PREFERENCES_CONNECTED & (midi_preferences->flags)) == 0){ return; } midi_preferences->flags &= (~AGS_MIDI_PREFERENCES_CONNECTED); if(midi_preferences->add != NULL){ g_object_disconnect(G_OBJECT(midi_preferences->add), "any_signal::clicked", G_CALLBACK(ags_midi_preferences_add_callback), midi_preferences, NULL); } } static void ags_midi_preferences_finalize(GObject *gobject) { //TODO:JK: implement me } void ags_midi_preferences_set_update(AgsApplicable *applicable, gboolean update) { //TODO:JK: implement me } void ags_midi_preferences_apply(AgsApplicable *applicable) { AgsMidiPreferences *midi_preferences; GList *list_start, *list; midi_preferences = AGS_MIDI_PREFERENCES(applicable); list = list_start = gtk_container_get_children((GtkContainer *) midi_preferences->sequencer_editor); while(list != NULL){ ags_applicable_apply(AGS_APPLICABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_midi_preferences_reset(AgsApplicable *applicable) { AgsWindow *window; AgsPreferences *preferences; AgsMidiPreferences *midi_preferences; AgsSequencerEditor *sequencer_editor; AgsThread *sequencer_thread; AgsApplicationContext *application_context; GObject *sequencer; GList *list_start, *list; midi_preferences = AGS_MIDI_PREFERENCES(applicable); preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(midi_preferences), AGS_TYPE_PREFERENCES); window = (AgsWindow *) preferences->window; application_context = (AgsApplicationContext *) window->application_context; sequencer_thread = ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_SEQUENCER_THREAD); /* clear */ list = list_start = gtk_container_get_children((GtkContainer *) midi_preferences->sequencer_editor); while(list != NULL){ gtk_widget_destroy(GTK_WIDGET(list->data)); list = list->next; } g_list_free(list_start); /* reset */ list = ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ sequencer_editor = ags_sequencer_editor_new(); sequencer_editor->sequencer = list->data; sequencer_editor->sequencer_thread = (GObject *) ags_sequencer_thread_find_sequencer((AgsSequencerThread *) sequencer_thread, list->data); gtk_box_pack_start((GtkBox *) midi_preferences->sequencer_editor, (GtkWidget *) sequencer_editor, FALSE, FALSE, 0); ags_applicable_reset(AGS_APPLICABLE(sequencer_editor)); ags_connectable_connect(AGS_CONNECTABLE(sequencer_editor)); g_signal_connect(sequencer_editor->remove, "clicked", G_CALLBACK(ags_midi_preferences_remove_sequencer_editor_callback), midi_preferences); list = list->next; } gtk_widget_show_all((GtkWidget *) midi_preferences->sequencer_editor); } /** * ags_midi_preferences_new: * * Creates an #AgsMidiPreferences * * Returns: a new #AgsMidiPreferences * * Since: 1.0.0 */ AgsMidiPreferences* ags_midi_preferences_new() { AgsMidiPreferences *midi_preferences; midi_preferences = (AgsMidiPreferences *) g_object_new(AGS_TYPE_MIDI_PREFERENCES, NULL); return(midi_preferences); } gsequencer-1.4.24/ags/X/ags_window.c0000644000175000017500000006221613256163135014166 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef AGS_WITH_QUARTZ #include #endif #include #include void ags_window_class_init(AgsWindowClass *window); void ags_window_connectable_interface_init(AgsConnectableInterface *connectable); void ags_window_init(AgsWindow *window); void ags_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_window_finalize(GObject *gobject); void ags_window_connect(AgsConnectable *connectable); void ags_window_disconnect(AgsConnectable *connectable); void ags_window_show(GtkWidget *widget); gboolean ags_window_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_window * @short_description: The window object. * @title: AgsWindow * @section_id: * @include: ags/X/ags_window.h * * #AgsWindow is a composite toplevel widget. It contains the * menubar, the machine rack and the notation editor. */ enum{ PROP_0, PROP_SOUNDCARD, PROP_APPLICATION_CONTEXT, }; static gpointer ags_window_parent_class = NULL; GHashTable *ags_window_load_file = NULL; GHashTable *ags_window_load_libags_audio = NULL; GType ags_window_get_type() { static volatile gsize g_define_type_id__volatile = 0; if(g_once_init_enter (&g_define_type_id__volatile)){ GType ags_type_window; static const GTypeInfo ags_window_info = { sizeof (AgsWindowClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_window_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsWindow), 0, /* n_preallocs */ (GInstanceInitFunc) ags_window_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_window_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_window = g_type_register_static(GTK_TYPE_WINDOW, "AgsWindow", &ags_window_info, 0); g_type_add_interface_static(ags_type_window, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_once_init_leave (&g_define_type_id__volatile, ags_type_window); } return g_define_type_id__volatile; } void ags_window_class_init(AgsWindowClass *window) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_window_parent_class = g_type_class_peek_parent(window); /* GObjectClass */ gobject = (GObjectClass *) window; gobject->set_property = ags_window_set_property; gobject->get_property = ags_window_get_property; gobject->finalize = ags_window_finalize; /* properties */ /** * AgsWindow:soundcard: * * The assigned main AgsSoundcard. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsWindow:application-context: * * The assigned application context. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) window; widget->show = ags_window_show; widget->delete_event = ags_window_delete_event; } void ags_window_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_window_connect; connectable->disconnect = ags_window_disconnect; } void ags_window_init(AgsWindow *window) { GtkVBox *vbox; GtkViewport *viewport; GtkWidget *scrolled_window; gchar *str; GError *error; window->flags = 0; error = NULL; str = g_strdup_printf("%s%s", DESTDIR, "/gsequencer/icons/jumper.png"); g_object_set(G_OBJECT(window), "icon", gdk_pixbuf_new_from_file(str, &error), NULL); g_free(str); window->application_context = NULL; window->application_mutex = NULL; window->soundcard = NULL; /* window name and title */ window->filename = NULL; window->name = g_strdup("unnamed"); str = g_strconcat("GSequencer - ", window->name, NULL); gtk_window_set_title((GtkWindow *) window, str); g_free(str); /* vbox */ vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer *) window, (GtkWidget*) vbox); /* menubar */ window->menu_bar = ags_menu_bar_new(); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) window->menu_bar, FALSE, FALSE, 0); /* vpaned and scrolled window */ window->paned = (GtkVPaned *) gtk_vpaned_new(); gtk_box_pack_start((GtkBox*) vbox, (GtkWidget*) window->paned, TRUE, TRUE, 0); viewport = gtk_viewport_new(NULL, NULL); g_object_set(viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_paned_pack1((GtkPaned *) window->paned, viewport, TRUE, TRUE); scrolled_window = (GtkWidget *) gtk_scrolled_window_new(NULL, NULL); gtk_container_add(viewport, scrolled_window); /* machines rack */ window->machines = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_scrolled_window_add_with_viewport((GtkScrolledWindow *) scrolled_window, (GtkWidget *) window->machines); window->machine_counter = ags_window_standard_machine_counter_alloc(); window->selected = NULL; /* editor */ viewport = gtk_viewport_new(NULL, NULL); g_object_set(viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_paned_pack2((GtkPaned *) window->paned, (GtkWidget *) viewport, TRUE, TRUE); window->notation_editor = g_object_new(AGS_TYPE_NOTATION_EDITOR, "homogeneous", FALSE, "spacing", 0, NULL); gtk_container_add(viewport, window->notation_editor); /* navigation */ window->navigation = g_object_new(AGS_TYPE_NAVIGATION, "homogeneous", FALSE, "spacing", 0, NULL); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) window->navigation, FALSE, FALSE, 0); /* windows and dialogs */ window->dialog = NULL; window->automation_window = ags_automation_window_new((GtkWidget *) window); window->wave_window = ags_wave_window_new((GtkWidget *) window); window->export_window = (AgsExportWindow *) g_object_new(AGS_TYPE_EXPORT_WINDOW, "main-window", window, NULL); window->midi_import_wizard = NULL; window->midi_export_wizard = NULL; window->midi_file_chooser = NULL; window->preferences = NULL; window->history_browser = NULL; /* libags_audio */ if(ags_window_load_libags_audio == NULL){ ags_window_load_libags_audio = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_window_load_libags_audio, window, ags_window_load_libags_audio_timeout); g_timeout_add(1000, (GSourceFunc) ags_window_load_libags_audio_timeout, (gpointer) window); /* load file */ if(ags_window_load_file == NULL){ ags_window_load_file = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_window_load_file, window, ags_window_load_file_timeout); g_timeout_add(1000, (GSourceFunc) ags_window_load_file_timeout, (gpointer) window); } void ags_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsWindow *window; window = AGS_WINDOW(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(window->soundcard == soundcard){ return; } if(soundcard != NULL){ g_object_ref(soundcard); } window->soundcard = soundcard; g_object_set(G_OBJECT(window->automation_window), "soundcard", soundcard, NULL); g_object_set(G_OBJECT(window->notation_editor), "soundcard", soundcard, NULL); g_object_set(G_OBJECT(window->navigation), "soundcard", soundcard, NULL); } break; case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) window->application_context == application_context){ return; } if(window->application_context != NULL){ window->application_mutex = NULL; g_object_unref(window->application_context); } if(application_context != NULL){ window->application_mutex = application_context->mutex; g_object_ref(application_context); } window->application_context = (GObject *) application_context; g_object_set(G_OBJECT(window->export_window), "application-context", application_context, NULL); ags_export_window_reload_soundcard_editor(window->export_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsWindow *window; window = AGS_WINDOW(gobject); switch(prop_id){ case PROP_SOUNDCARD: g_value_set_object(value, window->soundcard); break; case PROP_APPLICATION_CONTEXT: g_value_set_object(value, window->application_context); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_window_connect(AgsConnectable *connectable) { AgsWindow *window; GList *list, *list_start; window = AGS_WINDOW(connectable); if((AGS_WINDOW_CONNECTED & (window->flags)) != 0){ return; } window->flags |= AGS_WINDOW_CONNECTED; g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(ags_window_delete_event_callback), NULL); ags_connectable_connect(AGS_CONNECTABLE(window->context_menu)); ags_connectable_connect(AGS_CONNECTABLE(window->menu_bar)); list_start = list = gtk_container_get_children((GtkContainer *) window->machines); while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); ags_connectable_connect(AGS_CONNECTABLE(window->notation_editor)); ags_connectable_connect(AGS_CONNECTABLE(window->navigation)); ags_connectable_connect(AGS_CONNECTABLE(window->automation_window)); ags_connectable_connect(AGS_CONNECTABLE(window->export_window)); } void ags_window_disconnect(AgsConnectable *connectable) { AgsWindow *window; GList *list, *list_start; window = AGS_WINDOW(connectable); if((AGS_WINDOW_CONNECTED & (window->flags)) == 0){ return; } window->flags &= (~AGS_WINDOW_CONNECTED); g_object_disconnect(window, "any_signal::delete_event", G_CALLBACK(ags_window_delete_event_callback), NULL, NULL); ags_connectable_disconnect(AGS_CONNECTABLE(window->context_menu)); ags_connectable_disconnect(AGS_CONNECTABLE(window->menu_bar)); list_start = list = gtk_container_get_children((GtkContainer *) window->machines); while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); ags_connectable_disconnect(AGS_CONNECTABLE(window->notation_editor)); ags_connectable_disconnect(AGS_CONNECTABLE(window->navigation)); ags_connectable_disconnect(AGS_CONNECTABLE(window->automation_window)); ags_connectable_disconnect(AGS_CONNECTABLE(window->export_window)); } void ags_window_finalize(GObject *gobject) { AgsWindow *window; window = (AgsWindow *) gobject; g_hash_table_remove(ags_window_load_libags_audio, window); /* remove message monitor */ g_hash_table_remove(ags_window_load_file, window); g_object_unref(G_OBJECT(window->soundcard)); g_object_unref(G_OBJECT(window->export_window)); if(window->name != NULL){ free(window->name); } /* call parent */ G_OBJECT_CLASS(ags_window_parent_class)->finalize(gobject); } void ags_window_show(GtkWidget *widget) { AgsWindow *window; #ifdef AGS_WITH_QUARTZ GtkosxApplication *app; GList *list; #endif window = (AgsWindow *) widget; GTK_WIDGET_CLASS(ags_window_parent_class)->show(widget); #ifndef AGS_WITH_QUARTZ gtk_widget_show((GtkWidget *) window->menu_bar); #else app = gtkosx_application_get(); gtk_widget_hide((GtkWidget *) window->menu_bar); gtkosx_application_set_menu_bar(app, window->menu_bar); list = gtk_container_get_children(window->menu_bar); while(list != NULL){ gtk_widget_show(list->data); list = list->next; } gtkosx_application_sync_menubar(app); gtkosx_application_ready(app); #endif } gboolean ags_window_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_destroy(widget); GTK_WIDGET_CLASS(ags_window_parent_class)->delete_event(widget, event); return(FALSE); } /** * ags_window_standard_machine_counter_alloc: * * Keep track of count of machines. Allocates a #GList of well * known machines. * * Returns: a new #GList containing #AgsMachineCounter for know machines * * Since: 1.0.0 */ GList* ags_window_standard_machine_counter_alloc() { GList *machine_counter = NULL; machine_counter = NULL; machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_PANEL, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_MIXER, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_DRUM, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_MATRIX, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_SYNTH, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_SYNCSYNTH, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_FFPLAYER, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_LADSPA_BRIDGE, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_DSSI_BRIDGE, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_LV2_BRIDGE, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_LIVE_DSSI_BRIDGE, 0)); machine_counter = g_list_prepend(machine_counter, ags_machine_counter_alloc(AGS_RECALL_DEFAULT_VERSION, AGS_RECALL_DEFAULT_BUILD_ID, AGS_TYPE_LIVE_LV2_BRIDGE, 0)); return(machine_counter); } /** * ags_window_find_machine_counter: * @window: the #AgsWindow * @machine_type: the machine type * * Keep track of count of machines. Lookup window's counter. * * Returns: an #AgsMachineCounter * * Since: 1.0.0 */ AgsMachineCounter* ags_window_find_machine_counter(AgsWindow *window, GType machine_type) { GList *list; list = window->machine_counter; while(list != NULL){ if(AGS_MACHINE_COUNTER(list->data)->machine_type == machine_type){ return(AGS_MACHINE_COUNTER(list->data)); } list = list->next; } return(NULL); } /** * ags_window_increment_machine_counter: * @window: the #AgsWindow * @machine_type: the machine type * * Keep track of count of machines. Increment window's counter. * * Since: 1.0.0 */ void ags_window_increment_machine_counter(AgsWindow *window, GType machine_type) { AgsMachineCounter *machine_counter; machine_counter = ags_window_find_machine_counter(window, machine_type); if(machine_counter != NULL){ machine_counter->counter++; } } /** * ags_window_decrement_machine_counter: * @window: the #AgsWindow * @machine_type: the machine type * * Keep track of count of machines. Decrement window's counter. * * Since: 1.0.0 */ void ags_window_decrement_machine_counter(AgsWindow *window, GType machine_type) { AgsMachineCounter *machine_counter; machine_counter = ags_window_find_machine_counter(window, machine_type); if(machine_counter != NULL){ machine_counter->counter--; } } /** * ags_machine_counter_alloc: * @version: the machine's version * @build_id: the machine's build id * @machine_type: the machine type * @initial_value: initialize counter * * Keep track of count of machines. * * Returns: an #AgsMachineCounter * * Since: 1.0.0 */ AgsMachineCounter* ags_machine_counter_alloc(gchar *version, gchar *build_id, GType machine_type, guint initial_value) { AgsMachineCounter *machine_counter; machine_counter = (AgsMachineCounter *) malloc(sizeof(AgsMachineCounter)); machine_counter->version = version; machine_counter->build_id = build_id; machine_counter->machine_type = machine_type; machine_counter->filename = NULL; machine_counter->effect = NULL; machine_counter->counter = initial_value; return(machine_counter); } void ags_window_show_error(AgsWindow *window, gchar *message) { GtkDialog *dialog; dialog = (GtkDialog *) gtk_message_dialog_new((GtkWindow *) window, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", message); gtk_widget_show_all((GtkWidget *) dialog); } gboolean ags_window_load_libags_audio_timeout(AgsWindow *window) { if(g_hash_table_lookup(ags_window_load_libags_audio, window) != NULL){ AgsMessageDelivery *message_delivery; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *message_start, *message; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* retrieve message */ message_delivery = ags_message_delivery_get_instance(); message_start = message = ags_message_delivery_find_sender(message_delivery, "libags-audio", application_context); while(message != NULL){ xmlNode *root_node; root_node = xmlDocGetRootElement(AGS_MESSAGE_ENVELOPE(message->data)->doc); if(!xmlStrncmp(root_node->name, "ags-command", 12)){ if(!xmlStrncmp(xmlGetProp(root_node, "method"), "AgsSoundProvider::config-read", 29)){ GObject *soundcard; GList *list; gchar **argv; gchar *filename; guint argc; guint i; pthread_mutex_lock(application_mutex); if((list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context))) != NULL){ soundcard = list->data; }else{ soundcard = NULL; } pthread_mutex_unlock(application_mutex); /* AgsWindow */ g_object_set(window, "soundcard", soundcard, NULL); g_object_set(application_context, "window", window, NULL); /* context menu */ window->context_menu = ags_context_menu_new(); gtk_widget_set_events(GTK_WIDGET(window), (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK)); gtk_widget_show_all(window->context_menu); g_signal_connect((GObject *) window, "button-press-event", G_CALLBACK(ags_window_button_press_event), (gpointer) window); /* plugin menubar */ gtk_menu_item_set_submenu((GtkMenuItem*) window->menu_bar->ladspa, (GtkWidget*) ags_ladspa_bridge_menu_new()); gtk_menu_item_set_submenu((GtkMenuItem*) window->menu_bar->dssi, (GtkWidget*) ags_dssi_bridge_menu_new()); gtk_menu_item_set_submenu((GtkMenuItem*) window->menu_bar->lv2, (GtkWidget*) ags_lv2_bridge_menu_new()); gtk_menu_item_set_submenu((GtkMenuItem*) window->menu_bar->live_dssi, (GtkWidget*) ags_live_dssi_bridge_menu_new()); gtk_menu_item_set_submenu((GtkMenuItem*) window->menu_bar->live_lv2, (GtkWidget*) ags_live_lv2_bridge_menu_new()); gtk_window_set_default_size((GtkWindow *) window, 500, 500); gtk_paned_set_position((GtkPaned *) window->paned, 300); ags_connectable_connect(AGS_CONNECTABLE(window)); /* filename */ filename = NULL; pthread_mutex_lock(application_mutex); argv = AGS_APPLICATION_CONTEXT(application_context)->argv; argc = AGS_APPLICATION_CONTEXT(application_context)->argc; for(i = 0; i < argc; i++){ if(!strncmp(argv[i], "--filename", 11)){ filename = argv[i + 1]; i++; } } pthread_mutex_unlock(application_mutex); if(filename != NULL){ window->filename = filename; } gtk_widget_show_all(window); g_hash_table_remove(ags_window_load_libags_audio, window); } } ags_message_delivery_remove_message(message_delivery, "libags-audio", message->data); message = message->next; } g_list_free_full(message_start, ags_message_envelope_free); return(TRUE); }else{ return(FALSE); } } /** * ags_window_load_file_timeout: * @window: the #AgsWindow * * Load file. * * Returns: %TRUE if proceed with redraw, otherwise %FALSE * * Since: 1.2.0 */ gboolean ags_window_load_file_timeout(AgsWindow *window) { AgsGuiThread *gui_thread; gui_thread = NULL; if(window->application_context != NULL){ gui_thread = ags_ui_provider_get_gui_thread(AGS_UI_PROVIDER(window->application_context)); } if(gui_thread != NULL && gui_thread->gtk_thread == NULL){ gui_thread->gtk_thread = g_thread_self(); } if((AGS_WINDOW_TERMINATING & (window->flags)) != 0){ ags_application_context_quit(window->application_context); return(FALSE); } if(g_hash_table_lookup(ags_window_load_file, window) != NULL){ if(window->filename != NULL){ AgsSimpleFile *simple_file; gchar *str; GError *error; simple_file = (AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, "application-context", window->application_context, "filename", window->filename, NULL); error = NULL; ags_simple_file_open(simple_file, &error); ags_simple_file_read(simple_file); ags_simple_file_close(simple_file); /* set name */ window->name = g_strdup(window->filename); str = g_strconcat("GSequencer - ", window->name, NULL); gtk_window_set_title((GtkWindow *) window, str); window->filename = NULL; } return(TRUE); }else{ return(FALSE); } } /** * ags_window_new: * @application_context: the application object. * * Creates an #AgsWindow * * Returns: a new #AgsWindow * * Since: 1.0.0 */ AgsWindow* ags_window_new(GObject *application_context) { AgsWindow *window; window = (AgsWindow *) g_object_new(AGS_TYPE_WINDOW, "application-context", application_context, NULL); return(window); } gsequencer-1.4.24/ags/X/ags_pad.c0000644000175000017500000006042113256163135013417 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_pad_class_init(AgsPadClass *pad); void ags_pad_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pad_plugin_interface_init(AgsPluginInterface *plugin); void ags_pad_init(AgsPad *pad); void ags_pad_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_pad_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_pad_connect(AgsConnectable *connectable); void ags_pad_disconnect(AgsConnectable *connectable); gchar* ags_pad_get_version(AgsPlugin *plugin); void ags_pad_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_pad_get_build_id(AgsPlugin *plugin); void ags_pad_set_build_id(AgsPlugin *plugin, gchar *build_id); void ags_pad_real_set_channel(AgsPad *pad, AgsChannel *channel); void ags_pad_real_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old); void ags_pad_real_map_recall(AgsPad *pad, guint output_pad_start); GList* ags_pad_real_find_port(AgsPad *pad); /** * SECTION:ags_pad * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsPad * @section_id: * @include: ags/X/ags_pad.h * * #AgsPad is a composite widget to visualize a bunch of #AgsChannel. It should be * packed by an #AgsMachine. */ enum{ SET_CHANNEL, RESIZE_LINES, MAP_RECALL, FIND_PORT, LAST_SIGNAL, }; enum{ PROP_0, PROP_CHANNEL, }; static gpointer ags_pad_parent_class = NULL; static guint pad_signals[LAST_SIGNAL]; GType ags_pad_get_type(void) { static GType ags_type_pad = 0; if(!ags_type_pad){ static const GTypeInfo ags_pad_info = { sizeof(AgsPadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pad_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsPad), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pad_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pad_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_pad_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pad = g_type_register_static(GTK_TYPE_VBOX, "AgsPad", &ags_pad_info, 0); g_type_add_interface_static(ags_type_pad, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_pad, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_pad); } void ags_pad_class_init(AgsPadClass *pad) { GObjectClass *gobject; GParamSpec *param_spec; ags_pad_parent_class = g_type_class_peek_parent(pad); /* GObjectClass */ gobject = G_OBJECT_CLASS(pad); gobject->set_property = ags_pad_set_property; gobject->get_property = ags_pad_get_property; /* properties */ //TODO:JK: add finalize /** * AgsPad:channel: * * The start of a bunch of #AgsChannel to visualize. * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("assigned channel"), i18n_pspec("The channel it is assigned with"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /* AgsPadClass */ pad->set_channel = ags_pad_real_set_channel; pad->resize_lines = ags_pad_real_resize_lines; pad->map_recall = ags_pad_real_map_recall; pad->find_port = ags_pad_real_find_port; /* signals */ /** * AgsPad::set-channel: * @pad: the #AgsPad to modify * @channel: the #AgsChannel to set * * The ::set-channel signal notifies about changed channel. */ pad_signals[SET_CHANNEL] = g_signal_new("set-channel", G_TYPE_FROM_CLASS(pad), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsPadClass, set_channel), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); /** * AgsPad::resize-lines: * @pad: the #AgsPad to resize * @line_type: the channel type * @audio_channels: count of lines * @audio_channels_old: old count of lines * * The ::resize-lines is emitted as count of lines pack is modified. */ pad_signals[RESIZE_LINES] = g_signal_new("resize-lines", G_TYPE_FROM_CLASS(pad), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsPadClass, resize_lines), NULL, NULL, g_cclosure_user_marshal_VOID__ULONG_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_ULONG, G_TYPE_UINT, G_TYPE_UINT); /** * AgsPad::map-recall: * @pad: the #AgsPad to resize * @output_pad_start: start of output pad * * The ::map-recall as recall should be mapped */ pad_signals[MAP_RECALL] = g_signal_new("map-recall", G_TYPE_FROM_CLASS(pad), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsPadClass, map_recall), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsPad::find-port: * @pad: the #AgsPad to resize * Returns: a #GList with associated ports * * The ::find-port retrieves all associated ports */ pad_signals[FIND_PORT] = g_signal_new("find-port", G_TYPE_FROM_CLASS(pad), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsPadClass, find_port), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); } void ags_pad_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_pad_connect; connectable->disconnect = ags_pad_disconnect; } void ags_pad_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_pad_get_version; plugin->set_version = ags_pad_set_version; plugin->get_build_id = ags_pad_get_build_id; plugin->set_build_id = ags_pad_set_build_id; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_pad_init(AgsPad *pad) { GtkMenu *menu; GtkHBox *hbox; pad->flags = 0; pad->name = NULL; pad->version = AGS_VERSION; pad->build_id = AGS_BUILD_ID; pad->cols = 2; pad->expander_set = ags_expander_set_new(1, 1); gtk_box_pack_start((GtkBox *) pad, (GtkWidget *) pad->expander_set, TRUE, TRUE, 0); hbox = (GtkHBox *) gtk_hbox_new(TRUE, 0); gtk_box_pack_start((GtkBox *) pad, (GtkWidget *) hbox, FALSE, FALSE, 0); pad->group = (GtkToggleButton *) gtk_toggle_button_new_with_label("G"); gtk_toggle_button_set_active(pad->group, TRUE); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) pad->group, FALSE, FALSE, 0); pad->mute = (GtkToggleButton *) gtk_toggle_button_new_with_label("M"); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) pad->mute, FALSE, FALSE, 0); pad->solo = (GtkToggleButton *) gtk_toggle_button_new_with_label("S"); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) pad->solo, FALSE, FALSE, 0); pad->play = NULL; } void ags_pad_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPad *pad; pad = AGS_PAD(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); ags_pad_set_channel(pad, channel); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pad_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPad *pad; pad = AGS_PAD(gobject); switch(prop_id){ case PROP_CHANNEL: g_value_set_object(value, pad->channel); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pad_connect(AgsConnectable *connectable) { AgsPad *pad; GList *line_list, *line_list_start; /* AgsPad */ pad = AGS_PAD(connectable); if((AGS_PAD_CONNECTED & (pad->flags)) != 0){ return; } pad->flags |= AGS_PAD_CONNECTED; if((AGS_PAD_PREMAPPED_RECALL & (pad->flags)) == 0){ if((AGS_PAD_MAPPED_RECALL & (pad->flags)) == 0){ ags_pad_map_recall(pad, 0); } }else{ pad->flags &= (~AGS_PAD_PREMAPPED_RECALL); ags_pad_find_port(pad); } /* GtkButton */ g_signal_connect_after((GObject *) pad->group, "clicked", G_CALLBACK(ags_pad_group_clicked_callback), (gpointer) pad); g_signal_connect_after((GObject *) pad->mute, "clicked", G_CALLBACK(ags_pad_mute_clicked_callback), (gpointer) pad); g_signal_connect_after((GObject *) pad->solo, "clicked", G_CALLBACK(ags_pad_solo_clicked_callback), (gpointer) pad); /* AgsLine */ line_list_start = line_list = gtk_container_get_children(GTK_CONTAINER(pad->expander_set)); while(line_list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(line_list->data)); line_list = line_list->next; } g_list_free(line_list_start); } void ags_pad_disconnect(AgsConnectable *connectable) { AgsPad *pad; GList *line_list, *line_list_start; /* AgsPad */ pad = AGS_PAD(connectable); if((AGS_PAD_CONNECTED & (pad->flags)) == 0){ return; } pad->flags &= (~AGS_PAD_CONNECTED); /* AgsLine */ line_list_start = line_list = gtk_container_get_children(GTK_CONTAINER(pad->expander_set)); while(line_list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(line_list->data)); line_list = line_list->next; } g_list_free(line_list_start); g_signal_handlers_disconnect_by_data(pad->channel, pad); } gchar* ags_pad_get_version(AgsPlugin *plugin) { return(AGS_PAD(plugin)->version); } void ags_pad_set_version(AgsPlugin *plugin, gchar *version) { AgsPad *pad; pad = AGS_PAD(plugin); pad->version = version; } gchar* ags_pad_get_build_id(AgsPlugin *plugin) { return(AGS_PAD(plugin)->build_id); } void ags_pad_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsPad *pad; pad = AGS_PAD(plugin); pad->build_id = build_id; } void ags_pad_real_set_channel(AgsPad *pad, AgsChannel *channel) { AgsChannel *current; AgsMutexManager *mutex_manager; GList *line, *line_start; pthread_mutex_t *application_mutex; pthread_mutex_t *current_mutex; if(pad->channel == channel){ return; } if(pad->channel != NULL){ g_object_unref(G_OBJECT(pad->channel)); } if(channel != NULL){ g_object_ref(G_OBJECT(channel)); } pad->channel = channel; line_start = line = gtk_container_get_children(GTK_CONTAINER(AGS_PAD(pad)->expander_set)); current = channel; /* get mutex manager */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* set channel */ while(line != NULL){ if(current != NULL){ /* lookup current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); } g_object_set(G_OBJECT(line->data), "channel", current, NULL); /* iterate */ if(current != NULL){ pthread_mutex_lock(current_mutex); current = current->next; pthread_mutex_unlock(current_mutex); } line = line->next; } g_list_free(line_start); } /** * ags_pad_set_channel: * @pad: an #AgsPad * @channel: the #AgsChannel to set * * Is emitted as channel gets modified. * * Since: 1.0.0 */ void ags_pad_set_channel(AgsPad *pad, AgsChannel *channel) { g_return_if_fail(AGS_IS_PAD(pad)); g_object_ref((GObject *) pad); g_signal_emit(G_OBJECT(pad), pad_signals[SET_CHANNEL], 0, channel); g_object_unref((GObject *) pad); } void ags_pad_real_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old) { AgsLine *line; AgsChannel *channel; AgsMutexManager *mutex_manager; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; #ifdef AGS_DEBUG g_message("ags_pad_real_resize_lines: audio_channels = %u ; audio_channels_old = %u\n", audio_channels, audio_channels_old); #endif /* get mutex manager */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* resize */ if(audio_channels > audio_channels_old){ channel = ags_channel_nth(pad->channel, audio_channels_old); /* create AgsLine */ for(i = audio_channels_old; i < audio_channels;){ for(j = audio_channels_old % pad->cols; j < pad->cols && i < audio_channels; j++, i++){ /* lookup channel mutex */ if(channel != NULL){ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); } /* instantiate line */ line = (AgsLine *) g_object_new(line_type, "pad", pad, "channel", channel, NULL); if(channel != NULL){ channel->line_widget = (GObject *) line; } ags_expander_set_add(pad->expander_set, (GtkWidget *) line, j, floor(i / pad->cols), 1, 1); /* iterate */ if(channel != NULL){ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } } }else if(audio_channels < audio_channels_old){ GList *list, *list_start; list_start = list = g_list_nth(g_list_reverse(gtk_container_get_children(GTK_CONTAINER(pad->expander_set))), audio_channels); while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } list = list_start; while(list != NULL){ gtk_widget_destroy(GTK_WIDGET(list->data)); list = list->next; } g_list_free(list_start); } } /** * ags_pad_resize_lines: * @pad: the #AgsPad to resize * @line_type: channel type, either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT * @audio_channels: count of lines * @audio_channels_old: old count of lines * * Resize the count of #AgsLine packe by #AgsPad. * * Since: 1.0.0 */ void ags_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old) { g_return_if_fail(AGS_IS_PAD(pad)); // fprintf(stdout, "ags_pad_resize_lines: audio_channels = %u ; audio_channels_old = %u\n", audio_channels, audio_channels_old); g_object_ref((GObject *) pad); g_signal_emit(G_OBJECT(pad), pad_signals[RESIZE_LINES], 0, line_type, audio_channels, audio_channels_old); g_object_unref((GObject *) pad); } void ags_pad_real_map_recall(AgsPad *pad, guint output_pad_start) { if((AGS_PAD_MAPPED_RECALL & (pad->flags)) != 0){ return; } pad->flags |= AGS_PAD_MAPPED_RECALL; ags_pad_find_port(pad); } /** * ags_pad_map_recall: * @pad: the #AgsPad to resize * @output_pad_start: start of output pad * * Start of output pad * * Since: 1.0.0 */ void ags_pad_map_recall(AgsPad *pad, guint output_pad_start) { g_return_if_fail(AGS_IS_PAD(pad)); g_object_ref((GObject *) pad); g_signal_emit(G_OBJECT(pad), pad_signals[MAP_RECALL], 0, output_pad_start); g_object_unref((GObject *) pad); } GList* ags_pad_real_find_port(AgsPad *pad) { GList *line; GList *port, *tmp_port; port = NULL; /* find output ports */ if(pad->expander_set != NULL){ line = gtk_container_get_children((GtkContainer *) pad->expander_set); while(line != NULL){ tmp_port = ags_line_find_port(AGS_LINE(line->data)); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } line = line->next; } } return(port); } /** * ags_pad_find_port: * @pad: an #AgsPad * * Lookup ports of assigned recalls. * * Returns: an #GList containing all related #AgsPort * * Since: 1.0.0 */ GList* ags_pad_find_port(AgsPad *pad) { GList *list; list = NULL; g_return_val_if_fail(AGS_IS_PAD(pad), NULL); g_object_ref((GObject *) pad); g_signal_emit((GObject *) pad, pad_signals[FIND_PORT], 0, &list); g_object_unref((GObject *) pad); return(list); } void ags_pad_play(AgsPad *pad) { AgsWindow *window; AgsMachine *machine; AgsChannel *channel; AgsStartSoundcard *start_soundcard; AgsInitChannel *init_channel; AgsAppendChannel *append_channel; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GList *tasks; gboolean no_soundcard; gboolean play_all; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) pad, AGS_TYPE_MACHINE); window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); no_soundcard = FALSE; pthread_mutex_lock(application_mutex); if(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)) == NULL){ no_soundcard = TRUE; } pthread_mutex_unlock(application_mutex); if(no_soundcard){ g_message("No soundcard available"); return; } /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* */ tasks = NULL; play_all = pad->group->active; channel = pad->channel; /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); if(pad->play->active){ /* init channel for playback */ init_channel = ags_init_channel_new(channel, play_all, TRUE, FALSE, FALSE); g_signal_connect_after(G_OBJECT(init_channel), "launch", G_CALLBACK(ags_pad_init_channel_launch_callback), pad); tasks = g_list_prepend(tasks, init_channel); if(play_all){ AgsChannel *next_pad; pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); while(channel != next_pad){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* append channel for playback */ append_channel = ags_append_channel_new((GObject *) main_loop, (GObject *) channel); tasks = g_list_prepend(tasks, append_channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } }else{ AgsLine *line; GList *list; list = gtk_container_get_children(GTK_CONTAINER(pad->expander_set)); line = AGS_LINE(ags_line_find_next_grouped(list)->data); /* append channel for playback */ append_channel = ags_append_channel_new((GObject *) main_loop, (GObject *) line->channel); tasks = g_list_prepend(tasks, append_channel); g_list_free(list); } /* create start task */ if(tasks != NULL){ AgsGuiThread *gui_thread; gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); start_soundcard = ags_start_soundcard_new(application_context); tasks = g_list_prepend(tasks, start_soundcard); /* append AgsStartSoundcard */ tasks = g_list_reverse(tasks); ags_gui_thread_schedule_task_list((AgsGuiThread *) gui_thread, tasks); } }else{ AgsPlayback *playback; AgsRecallID *recall_id; AgsCancelChannel *cancel_channel; guint flags; channel = pad->channel; /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* return if not playing */ pthread_mutex_lock(channel_mutex); playback = (AgsPlayback *) channel->playback; flags = g_atomic_int_get(&(playback->flags)); recall_id = playback->recall_id[0]; pthread_mutex_unlock(channel_mutex); if(recall_id == NULL || (AGS_PLAYBACK_DONE & (flags)) != 0){ return; } if((AGS_PLAYBACK_PAD & (flags)) != 0){ AgsChannel *next_pad; pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); if((AGS_PLAYBACK_DONE & (flags)) == 0){ /* cancel request */ while(channel != next_pad){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* create cancel task */ pthread_mutex_lock(channel_mutex); playback = (AgsPlayback *) channel->playback; recall_id = playback->recall_id[0]; pthread_mutex_unlock(channel_mutex); cancel_channel = ags_cancel_channel_new(channel, recall_id, (GObject *) playback); ags_gui_thread_schedule_task(gui_thread, cancel_channel); channel = channel->next; } }else{ /* done */ while(channel != next_pad){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* set flags */ pthread_mutex_lock(channel_mutex); g_atomic_int_or(&(playback->flags), AGS_PLAYBACK_REMOVE); g_atomic_int_and(&(AGS_PLAYBACK(channel->playback)->flags), (~AGS_PLAYBACK_DONE)); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } }else{ AgsLine *line; GList *list; list = gtk_container_get_children(GTK_CONTAINER(pad->expander_set)); line = AGS_LINE(ags_line_find_next_grouped(list)->data); g_list_free(list); /* */ channel = line->channel; /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* create cancel task or set flags */ pthread_mutex_lock(channel_mutex); playback = (AgsPlayback *) channel->playback; flags = g_atomic_int_get(&(playback->flags)); recall_id = playback->recall_id[0]; pthread_mutex_unlock(channel_mutex); if((AGS_PLAYBACK_DONE & (flags)) == 0){ /* cancel request */ cancel_channel = ags_cancel_channel_new(channel, recall_id, (GObject *) playback); ags_gui_thread_schedule_task(gui_thread, cancel_channel); }else{ /* done */ pthread_mutex_lock(channel_mutex); AGS_PLAYBACK(channel->playback)->flags |= AGS_PLAYBACK_REMOVE; AGS_PLAYBACK(channel->playback)->flags &= (~AGS_PLAYBACK_DONE); pthread_mutex_unlock(channel_mutex); } } } } /** * ags_pad_new: * @channel: the bunch of channel to visualize * * Creates an #AgsPad * * Returns: a new #AgsPad * * Since: 1.0.0 */ AgsPad* ags_pad_new(AgsChannel *channel) { AgsPad *pad; pad = (AgsPad *) g_object_new(AGS_TYPE_PAD, NULL); return(pad); } gsequencer-1.4.24/ags/X/ags_connection_editor_callbacks.h0000644000175000017500000000310113246707333020357 00000000000000/* 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 . */ #ifndef __AGS_CONNECTION_EDITOR_CALLBACKS_H__ #define __AGS_CONNECTION_EDITOR_CALLBACKS_H__ #include #include #include #include int ags_connection_editor_switch_page_callback(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, AgsConnectionEditor *connection_editor); int ags_connection_editor_apply_callback(GtkWidget *widget, AgsConnectionEditor *connection_editor); int ags_connection_editor_ok_callback(GtkWidget *widget, AgsConnectionEditor *connection_editor); int ags_connection_editor_cancel_callback(GtkWidget *widget, AgsConnectionEditor *connection_editor); gboolean ags_connection_editor_delete_event(GtkWidget *dialog, gint response, AgsConnectionEditor *connection_editor); #endif /*__AGS_CONNECTION_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_plugin_browser_callbacks.c0000644000175000017500000000351113246707333017713 00000000000000/* 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 . */ #include void ags_plugin_browser_plugin_type_changed_callback(GtkWidget *combo_box, AgsPluginBrowser *plugin_browser) { if(gtk_combo_box_get_active((GtkComboBox *) combo_box) == 0){ plugin_browser->active_browser = plugin_browser->lv2_browser; gtk_widget_show(plugin_browser->lv2_browser); gtk_widget_hide(plugin_browser->ladspa_browser); }else if(gtk_combo_box_get_active((GtkComboBox *) combo_box) == 1){ plugin_browser->active_browser = plugin_browser->ladspa_browser; gtk_widget_show(plugin_browser->ladspa_browser); gtk_widget_hide(plugin_browser->lv2_browser); } } void ags_plugin_browser_ok_callback(GtkWidget *button, AgsPluginBrowser *plugin_browser) { gtk_combo_box_set_active(plugin_browser->plugin_type, -1); gtk_widget_hide((GtkWidget *) plugin_browser); } void ags_plugin_browser_cancel_callback(GtkWidget *button, AgsPluginBrowser *plugin_browser) { gtk_combo_box_set_active(plugin_browser->plugin_type, -1); gtk_widget_hide((GtkWidget *) plugin_browser); } gsequencer-1.4.24/ags/X/machine/0000755000175000017500000000000013256233676013346 500000000000000gsequencer-1.4.24/ags/X/machine/ags_matrix_bulk_input_callbacks.h0000644000175000017500000000200413247044247022016 00000000000000/* 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 . */ #ifndef __AGS_MATRIX_BULK_INPUT_CALLBACKS_H__ #define __AGS_MATRIX_BULK_INPUT_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_MATRIX_BULK_INPUT_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_synth_input_pad.c0000644000175000017500000001773413247044247017502 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_synth_input_pad_class_init(AgsSynthInputPadClass *synth_input_pad); void ags_synth_input_pad_connectable_interface_init(AgsConnectableInterface *connectable); void ags_synth_input_pad_plugin_interface_init(AgsPluginInterface *plugin); void ags_synth_input_pad_init(AgsSynthInputPad *synth_input_pad); void ags_synth_input_pad_destroy(GtkObject *object); void ags_synth_input_pad_connect(AgsConnectable *connectable); void ags_synth_input_pad_disconnect(AgsConnectable *connectable); gchar* ags_synth_input_pad_get_name(AgsPlugin *plugin); void ags_synth_input_pad_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_synth_input_pad_get_xml_type(AgsPlugin *plugin); void ags_synth_input_pad_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_synth_input_pad_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_synth_input_pad_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_synth_input_pad_set_channel(AgsPad *pad, AgsChannel *channel); void ags_synth_input_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old); /** * SECTION:ags_synth_input_pad * @short_description: synth input pad * @title: AgsSynthInputPad * @section_id: * @include: ags/X/machine/ags_synth_input_pad.h * * The #AgsSynthInputPad is a composite widget to act as synth input pad. */ static gpointer ags_synth_input_pad_parent_class = NULL; static AgsConnectableInterface *ags_synth_input_pad_parent_connectable_interface; GType ags_synth_input_pad_get_type() { static GType ags_type_synth_input_pad = 0; if(!ags_type_synth_input_pad){ static const GTypeInfo ags_synth_input_pad_info = { sizeof(AgsSynthInputPadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_synth_input_pad_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsSynthInputPad), 0, /* n_preallocs */ (GInstanceInitFunc) ags_synth_input_pad_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_synth_input_pad_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_synth_input_pad_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_synth_input_pad = g_type_register_static(AGS_TYPE_PAD, "AgsSynthInputPad", &ags_synth_input_pad_info, 0); g_type_add_interface_static(ags_type_synth_input_pad, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_synth_input_pad, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_synth_input_pad); } void ags_synth_input_pad_class_init(AgsSynthInputPadClass *synth_input_pad) { AgsPadClass *pad; ags_synth_input_pad_parent_class = g_type_class_peek_parent(synth_input_pad); pad = (AgsPadClass *) synth_input_pad; pad->set_channel = ags_synth_input_pad_set_channel; pad->resize_lines = ags_synth_input_pad_resize_lines; } void ags_synth_input_pad_connectable_interface_init(AgsConnectableInterface *connectable) { ags_synth_input_pad_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_synth_input_pad_connect; connectable->disconnect = ags_synth_input_pad_disconnect; } void ags_synth_input_pad_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_synth_input_pad_get_name; plugin->set_name = ags_synth_input_pad_set_name; plugin->get_xml_type = ags_synth_input_pad_get_xml_type; plugin->set_xml_type = ags_synth_input_pad_set_xml_type; plugin->read = ags_synth_input_pad_read; plugin->write = ags_synth_input_pad_write; } void ags_synth_input_pad_init(AgsSynthInputPad *synth_input_pad) { synth_input_pad->name = NULL; synth_input_pad->xml_type = "ags-synth-input-pad"; } void ags_synth_input_pad_connect(AgsConnectable *connectable) { AgsSynthInputPad *synth_input_pad; /* AgsSynthInputPad */ synth_input_pad = AGS_SYNTH_INPUT_PAD(connectable); if((AGS_PAD_CONNECTED & (AGS_PAD(synth_input_pad)->flags)) != 0){ return; } ags_synth_input_pad_parent_connectable_interface->connect(connectable); } void ags_synth_input_pad_disconnect(AgsConnectable *connectable) { ags_synth_input_pad_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_synth_input_pad_destroy(GtkObject *object) { /* empty */ } gchar* ags_synth_input_pad_get_name(AgsPlugin *plugin) { return(AGS_SYNTH_INPUT_PAD(plugin)->name); } void ags_synth_input_pad_set_name(AgsPlugin *plugin, gchar *name) { AGS_SYNTH_INPUT_PAD(plugin)->name = name; } gchar* ags_synth_input_pad_get_xml_type(AgsPlugin *plugin) { return(AGS_SYNTH_INPUT_PAD(plugin)->xml_type); } void ags_synth_input_pad_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_SYNTH_INPUT_PAD(plugin)->xml_type = xml_type; } void ags_synth_input_pad_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsSynthInputPad *gobject; AgsFileLookup *file_lookup; gobject = AGS_SYNTH_INPUT_PAD(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); } xmlNode* ags_synth_input_pad_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsSynthInputPad *synth_input_pad; xmlNode *node; gchar *id; synth_input_pad = AGS_SYNTH_INPUT_PAD(plugin); node = NULL; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-synth-input-pad"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", synth_input_pad, NULL)); xmlAddChild(parent, node); return(node); } void ags_synth_input_pad_set_channel(AgsPad *pad, AgsChannel *channel) { AGS_PAD_CLASS(ags_synth_input_pad_parent_class)->set_channel(pad, channel); /* empty */ } void ags_synth_input_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old) { AGS_PAD_CLASS(ags_synth_input_pad_parent_class)->resize_lines(pad, line_type, audio_channels, audio_channels_old); /* empty */ } /** * ags_synth_input_pad_new: * @channel: the assigned channel * * Creates an #AgsSynthInputPad * * Returns: a new #AgsSynthInputPad * * Since: 1.0.0 */ AgsSynthInputPad* ags_synth_input_pad_new(AgsChannel *channel) { AgsSynthInputPad *synth_input_pad; synth_input_pad = (AgsSynthInputPad *) g_object_new(AGS_TYPE_SYNTH_INPUT_PAD, "channel", channel, NULL); return(synth_input_pad); } gsequencer-1.4.24/ags/X/machine/ags_cell_pattern_callbacks.c0000644000175000017500000004243013247044247020734 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_cell_pattern_init_channel_launch_callback(AgsTask *task, gpointer data); gboolean ags_cell_pattern_focus_in_callback(GtkWidget *widget, GdkEvent *event, AgsCellPattern *cell_pattern) { pthread_t thread; pthread_create(&thread, NULL, ags_cell_pattern_blink_worker, cell_pattern); return(TRUE); } gboolean ags_cell_pattern_drawing_area_configure_callback(GtkWidget *widget, GdkEventConfigure *event, AgsCellPattern *cell_pattern) { ags_cell_pattern_paint(cell_pattern); return(FALSE); } gboolean ags_cell_pattern_drawing_area_expose_callback(GtkWidget *widget, GdkEventExpose *event, AgsCellPattern *cell_pattern) { ags_cell_pattern_paint(cell_pattern); return(FALSE); } gboolean ags_cell_pattern_drawing_area_button_press_callback(GtkWidget *widget, GdkEventButton *event, AgsCellPattern *cell_pattern) { if(event->button == 1){ AgsMachine *machine; AgsAudio *audio; AgsChannel *input; AgsChannel *channel; AgsMutexManager *mutex_manager; guint input_lines; guint i, j; guint index1; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) cell_pattern, AGS_TYPE_MACHINE); audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input = audio->input; input_lines = audio->input_lines; pthread_mutex_unlock(audio_mutex); /* get pattern position */ i = (guint) floor((double) event->y / (double) cell_pattern->cell_height); j = (guint) floor((double) event->x / (double) cell_pattern->cell_width); index1 = machine->bank_1; channel = ags_channel_nth(input, input_lines - ((guint) GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value + i) - 1); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* toggle pattern */ pthread_mutex_lock(channel_mutex); ags_pattern_toggle_bit(channel->pattern->data, 0, index1, j); pthread_mutex_unlock(channel_mutex); /* queue draw */ gtk_widget_queue_draw(cell_pattern->drawing_area); } return(FALSE); } gboolean ags_cell_pattern_drawing_area_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsCellPattern *cell_pattern) { if(event->keyval == GDK_KEY_Tab){ return(FALSE); } switch(event->keyval){ case GDK_KEY_Control_L: { cell_pattern->key_mask |= AGS_CELL_PATTERN_KEY_L_CONTROL; } break; case GDK_KEY_Control_R: { cell_pattern->key_mask |= AGS_CELL_PATTERN_KEY_R_CONTROL; } break; case GDK_KEY_c: { /* copy notes */ if((AGS_CELL_PATTERN_KEY_L_CONTROL & (cell_pattern->key_mask)) != 0 || (AGS_CELL_PATTERN_KEY_R_CONTROL & (cell_pattern->key_mask)) != 0){ AgsMachine *machine; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) cell_pattern, AGS_TYPE_MACHINE); ags_machine_copy_pattern(machine); } } break; } return(TRUE); } gboolean ags_cell_pattern_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsCellPattern *cell_pattern) { AgsWindow *window; AgsMachine *machine; AgsGuiThread *gui_thread; AgsAudio *audio; AgsChannel *input; AgsChannel *channel; AgsMutexManager *mutex_manager; AgsThread *main_loop; guint input_lines; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; auto void ags_cell_pattern_drawing_area_key_release_event_play_channel(AgsChannel *channel); void ags_cell_pattern_drawing_area_key_release_event_play_channel(AgsChannel *channel){ GObject *soundcard; AgsAudio *audio; AgsStartSoundcard *start_soundcard; AgsInitChannel *init_channel; AgsAppendChannel *append_channel; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsSoundcardThread *soundcard_thread; AgsApplicationContext *application_context; GList *tasks; gboolean no_soundcard; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); no_soundcard = FALSE; pthread_mutex_lock(application_mutex); if(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)) == NULL){ no_soundcard = TRUE; } pthread_mutex_unlock(application_mutex); if(no_soundcard){ g_message("No soundcard available"); return; } /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; audio = (AgsAudio *) channel->audio; pthread_mutex_unlock(channel_mutex); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(audio_mutex); main_loop = (AgsThread *) application_context->main_loop; gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); soundcard_thread = (AgsSoundcardThread *) ags_thread_find_type(main_loop, AGS_TYPE_SOUNDCARD_THREAD); tasks = NULL; /* init channel for playback */ init_channel = ags_init_channel_new(channel, FALSE, TRUE, FALSE, FALSE); g_signal_connect_after(G_OBJECT(init_channel), "launch", G_CALLBACK(ags_cell_pattern_init_channel_launch_callback), NULL); tasks = g_list_prepend(tasks, init_channel); /* append channel for playback */ append_channel = ags_append_channel_new(G_OBJECT(main_loop), G_OBJECT(channel)); tasks = g_list_prepend(tasks, append_channel); /* create start task */ start_soundcard = ags_start_soundcard_new(application_context); tasks = g_list_prepend(tasks, start_soundcard); /* perform playback */ tasks = g_list_reverse(tasks); ags_gui_thread_schedule_task_list(gui_thread, tasks); pthread_mutex_unlock(audio_mutex); } if(event->keyval == GDK_KEY_Tab){ return(FALSE); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) cell_pattern, AGS_TYPE_MACHINE); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) cell_pattern, AGS_TYPE_WINDOW); audio = machine->audio; /* get some fields */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(window->application_context)->main_loop; pthread_mutex_unlock(application_mutex); gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input = audio->input; input_lines = audio->input_lines; pthread_mutex_unlock(audio_mutex); switch(event->keyval){ case GDK_KEY_Control_L: { cell_pattern->key_mask &= (~AGS_CELL_PATTERN_KEY_L_CONTROL); } break; case GDK_KEY_Control_R: { cell_pattern->key_mask &= (~AGS_CELL_PATTERN_KEY_R_CONTROL); } break; case GDK_KEY_Left: case GDK_KEY_leftarrow: { if(cell_pattern->cursor_x > 0){ gboolean bit_is_on; cell_pattern->cursor_x -= 1; /* audible feedback */ channel = ags_channel_nth(input, input_lines - cell_pattern->cursor_y - 1); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check bit */ pthread_mutex_lock(channel_mutex); bit_is_on = (ags_pattern_get_bit(channel->pattern->data, 0, machine->bank_1, cell_pattern->cursor_x)) ? TRUE: FALSE; pthread_mutex_unlock(channel_mutex); if(bit_is_on){ ags_cell_pattern_drawing_area_key_release_event_play_channel(channel); } } } break; case GDK_KEY_Right: case GDK_KEY_rightarrow: { if(cell_pattern->cursor_x < cell_pattern->n_cols){ gboolean bit_is_on; cell_pattern->cursor_x += 1; /* audible feedback */ channel = ags_channel_nth(input, input_lines - cell_pattern->cursor_y - 1); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check bit */ if(ags_pattern_get_bit(channel->pattern->data, 0, machine->bank_1, cell_pattern->cursor_x)){ ags_cell_pattern_drawing_area_key_release_event_play_channel(channel); } } } break; case GDK_KEY_Up: case GDK_KEY_uparrow: { if(cell_pattern->cursor_y > 0){ gboolean bit_is_on; cell_pattern->cursor_y -= 1; /* audible feedback */ channel = ags_channel_nth(input, input_lines - cell_pattern->cursor_y - 1); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check bit */ pthread_mutex_lock(channel_mutex); bit_is_on = (ags_pattern_get_bit(channel->pattern->data, 0, machine->bank_1, cell_pattern->cursor_x)) ? TRUE: FALSE; pthread_mutex_unlock(channel_mutex); if(bit_is_on){ ags_cell_pattern_drawing_area_key_release_event_play_channel(channel); } } if(cell_pattern->cursor_y < GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value){ gtk_range_set_value(GTK_RANGE(cell_pattern->vscrollbar), GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value - 1.0); } } break; case GDK_KEY_Down: case GDK_KEY_downarrow: { if(cell_pattern->cursor_y < cell_pattern->n_rows){ gboolean bit_is_on; cell_pattern->cursor_y += 1; /* audible feedback */ channel = ags_channel_nth(input, input_lines - cell_pattern->cursor_y - 1); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check bit */ pthread_mutex_lock(channel_mutex); bit_is_on = (ags_pattern_get_bit(channel->pattern->data, 0, machine->bank_1, cell_pattern->cursor_x)) ? TRUE: FALSE; pthread_mutex_unlock(channel_mutex); if(bit_is_on){ ags_cell_pattern_drawing_area_key_release_event_play_channel(channel); } } if(cell_pattern->cursor_y >= GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value + AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY){ gtk_range_set_value(GTK_RANGE(cell_pattern->vscrollbar), GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value + 1.0); } } break; case GDK_KEY_space: { guint i, j; guint index1; i = cell_pattern->cursor_y; j = cell_pattern->cursor_x; index1 = machine->bank_1; channel = ags_channel_nth(input, input_lines - i - 1); /* toggle pattern */ pthread_mutex_lock(channel_mutex); ags_pattern_toggle_bit(channel->pattern->data, 0, index1, j); pthread_mutex_unlock(channel_mutex); /* play pattern */ if(!ags_pattern_get_bit(channel->pattern->data, 0, index1, j)){ ags_cell_pattern_drawing_area_key_release_event_play_channel(channel); } /* queue draw */ gtk_widget_queue_draw(cell_pattern->drawing_area); } break; } return(TRUE); } void ags_cell_pattern_adjustment_value_changed_callback(GtkWidget *widget, AgsCellPattern *cell_pattern) { ags_cell_pattern_paint(cell_pattern); } void ags_cell_pattern_init_channel_launch_callback(AgsTask *task, gpointer data) { AgsChannel *channel; AgsRecycling *first_recycling, *last_recycling; AgsRecycling *end_recycling; AgsRecycling *recycling; AgsNote *note; AgsAddAudioSignal *add_audio_signal; AgsMutexManager *mutex_manager; GObject *soundcard; GList *recall, *tmp; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; channel = AGS_INIT_CHANNEL(task)->channel; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); #ifdef AGS_DEBUG g_message("launch"); #endif /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; if(AGS_PLAYBACK(channel->playback) == NULL || AGS_PLAYBACK(channel->playback)->recall_id[0] == NULL){ pthread_mutex_unlock(channel_mutex); return; } /* connect done */ recall = ags_recall_find_provider_with_recycling_context(channel->play, G_OBJECT(channel), G_OBJECT(AGS_PLAYBACK(channel->playback)->recall_id[0]->recycling_context)); tmp = recall; recall = ags_recall_find_type(recall, AGS_TYPE_PLAY_CHANNEL_RUN); //TODO:JK: fix me // g_list_free(tmp); first_recycling = channel->first_recycling; last_recycling = channel->last_recycling; pthread_mutex_unlock(channel_mutex); if(recall != NULL){ AgsAudioSignal *audio_signal; AgsNote *note; pthread_mutex_lock(channel_mutex); note = AGS_PLAYBACK(channel->playback)->play_note; pthread_mutex_unlock(channel_mutex); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(recycling_mutex); end_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); /* add audio signal */ recycling = first_recycling; while(recycling != end_recycling){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); if(!AGS_RECALL(recall->data)->rt_safe){ /* audio signal */ audio_signal = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) AGS_RECALL(recall->data)->recall_id); g_object_set(audio_signal, "note", note, NULL); /* 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_connectable_connect(AGS_CONNECTABLE(audio_signal)); /* * emit add_audio_signal on AgsRecycling */ ags_recycling_add_audio_signal(recycling, audio_signal); }else{ GList *list; pthread_mutex_lock(recycling_mutex); audio_signal = NULL; list = ags_audio_signal_get_by_recall_id(recycling->audio_signal, AGS_RECALL(recall->data)->recall_id); if(list != NULL){ audio_signal = list->data; g_object_set(audio_signal, "note", note, NULL); } note->rt_offset = 0; pthread_mutex_unlock(recycling_mutex); } /* iterate */ pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } } } gsequencer-1.4.24/ags/X/machine/ags_ffplayer_callbacks.c0000644000175000017500000002206213247044247020067 00000000000000/* 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 . */ #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include void ags_ffplayer_open_dialog_response_callback(GtkWidget *widget, gint response, AgsMachine *machine); void ags_ffplayer_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsFFPlayer *ffplayer) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = (AgsWindow *) gtk_widget_get_toplevel(widget); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_FFPLAYER)->counter); g_object_set(AGS_MACHINE(ffplayer), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_FFPLAYER); g_free(str); } void ags_ffplayer_destroy_callback(GtkWidget *widget, AgsFFPlayer *ffplayer) { if(ffplayer->open_dialog != NULL){ gtk_widget_destroy(ffplayer->open_dialog); } } void ags_ffplayer_open_clicked_callback(GtkWidget *widget, AgsFFPlayer *ffplayer) { GtkFileChooserDialog *file_chooser; file_chooser = ags_machine_file_chooser_dialog_new(AGS_MACHINE(ffplayer)); ffplayer->open_dialog = (GtkWidget *) file_chooser; gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(file_chooser), FALSE); g_signal_connect((GObject *) file_chooser, "response", G_CALLBACK(ags_ffplayer_open_dialog_response_callback), AGS_MACHINE(ffplayer)); gtk_widget_show_all((GtkWidget *) file_chooser); } void ags_ffplayer_open_dialog_response_callback(GtkWidget *widget, gint response, AgsMachine *machine) { AgsFFPlayer *ffplayer; ffplayer = AGS_FFPLAYER(machine); if(response == GTK_RESPONSE_ACCEPT){ gchar *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget)); ags_ffplayer_open_filename(ffplayer, filename); } ffplayer->open_dialog = NULL; gtk_widget_destroy(widget); } void ags_ffplayer_preset_changed_callback(GtkComboBox *preset, AgsFFPlayer *ffplayer) { AgsPlayable *playable; AgsIpatch *ipatch; gchar *preset_name; GError *error; playable = AGS_PLAYABLE(ffplayer->ipatch); ipatch = ffplayer->ipatch; if(ipatch == NULL || (AGS_FFPLAYER_NO_LOAD & (ffplayer->flags)) != 0){ return; } preset_name = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(preset)); /* load presets */ error = NULL; ags_playable_level_select(playable, 1, preset_name, &error); /* select first instrument */ gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(ffplayer->instrument)))); ags_ffplayer_load_instrument(ffplayer); gtk_combo_box_set_active(GTK_COMBO_BOX(ffplayer->instrument), 0); } void ags_ffplayer_instrument_changed_callback(GtkComboBox *instrument, AgsFFPlayer *ffplayer) { AgsWindow *window; AgsAudio *audio; AgsChannel *start_channel, *channel; AgsRecycling *recycling; AgsIpatchSF2Reader *reader; // AgsLinkChannel *link_channel; AgsResizeAudio *resize_audio; AgsOpenSf2Sample *open_sf2_sample; AgsAddAudioSignal *add_audio_signal; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; AgsPlayable *playable; gchar *filename; gchar *preset_name; gchar *instrument_name; gchar **preset; gchar **sample, **sample_iter; GList *task; GList *list; guint count; guint n_pads, n_audio_channels; int i; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if((AGS_FFPLAYER_NO_LOAD & (ffplayer->flags)) != 0){ return; } window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) ffplayer); application_context = (AgsApplicationContext *) window->application_context; audio = AGS_MACHINE(ffplayer)->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* */ playable = AGS_PLAYABLE(ffplayer->ipatch); filename = ffplayer->ipatch->filename; preset_name = AGS_IPATCH_SF2_READER(ffplayer->ipatch->reader)->selected[1]; instrument_name = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(instrument)); if(filename == NULL || preset_name == NULL || instrument_name == NULL){ return; } /* select instrument */ error = NULL; ags_playable_level_select(playable, 2, instrument_name, &error); if(error != NULL){ g_error("%s", error->message); } /* select first sample */ sample = NULL; AGS_IPATCH(ffplayer->ipatch)->nth_level = 3; sample = ags_playable_sublevel_names(playable); #ifdef HAVE_GLIB_2_6 count = g_strv_length(sample); #else count = ags_strv_length(sample); #endif /* read all samples */ reader = AGS_IPATCH(ffplayer->ipatch)->reader; task = NULL; n_pads = 0; n_audio_channels = 2; #ifdef AGS_WITH_LIBINSTPATCH for(sample_iter = sample; *sample_iter != NULL; sample_iter++){ IpatchSF2Sample *sf2_sample; guint sample_channel; sf2_sample = (IpatchSF2Sample *) ipatch_sf2_find_sample(reader->sf2, *sample_iter, NULL); g_object_get(sf2_sample, "channel", &sample_channel, NULL); if(sample_channel == IPATCH_SF2_SAMPLE_CHANNEL_MONO || sample_channel == IPATCH_SF2_SAMPLE_CHANNEL_LEFT){ n_pads++; } } #endif resize_audio = ags_resize_audio_new(audio, audio->output_pads, n_pads, n_audio_channels); task = g_list_prepend(task, resize_audio); /* open sf2 sample task */ pthread_mutex_lock(audio_mutex); start_channel = audio->input; pthread_mutex_unlock(audio_mutex); sample_iter = sample; i = 0; #ifdef AGS_WITH_LIBINSTPATCH while(*sample_iter != NULL){ IpatchSF2Sample *sf2_sample; guint sample_channel; sf2_sample = (IpatchSF2Sample *) ipatch_sf2_find_sample(reader->sf2, *sample_iter, NULL); g_object_get(sf2_sample, "channel", &sample_channel, NULL); if(sample_channel == IPATCH_SF2_SAMPLE_CHANNEL_MONO || sample_channel == IPATCH_SF2_SAMPLE_CHANNEL_LEFT){ channel = ags_channel_nth(start_channel, i * audio->audio_channels); }else{ channel = ags_channel_nth(start_channel, i * audio->audio_channels + 1); } if(sample_channel == IPATCH_SF2_SAMPLE_CHANNEL_MONO || sample_channel == IPATCH_SF2_SAMPLE_CHANNEL_RIGHT){ i++; } if(channel == NULL){ g_critical("channel == NULL - Soundfont 2 sample channel %d", sample_channel); /* iterate */ sample_iter++; continue; } /* create tasks */ open_sf2_sample = ags_open_sf2_sample_new(channel, g_strdup(filename), g_strdup(preset_name), g_strdup(instrument_name), g_strdup(*sample_iter)); task = g_list_prepend(task, open_sf2_sample); /* iterate */ sample_iter++; } /* append tasks */ task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); #endif } gboolean ags_ffplayer_drawing_area_expose_callback(GtkWidget *widget, GdkEventExpose *event, AgsFFPlayer *ffplayer) { ags_ffplayer_paint(ffplayer); return(FALSE); } gboolean ags_ffplayer_drawing_area_configure_callback(GtkWidget *widget, GdkEventConfigure *event, AgsFFPlayer *ffplayer) { ags_ffplayer_paint(ffplayer); return(FALSE); } gboolean ags_ffplayer_drawing_area_button_press_callback(GtkWidget *widget, AgsFFPlayer *ffplayer) { return(FALSE); } void ags_ffplayer_hscrollbar_value_changed(GtkAdjustment *adjustment, AgsFFPlayer *ffplayer) { ags_ffplayer_paint(ffplayer); } gsequencer-1.4.24/ags/X/machine/ags_cell_pattern_callbacks.h0000644000175000017500000000354313246707333020744 00000000000000/* 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 . */ #ifndef __AGS_CELL_PATTERN_CALLBACKS_H__ #define __AGS_CELL_PATTERN_CALLBACKS_H__ #include #include #include #include /* controls */ gboolean ags_cell_pattern_focus_in_callback(GtkWidget *widget, GdkEvent *event, AgsCellPattern *cell_pattern); gboolean ags_cell_pattern_drawing_area_configure_callback(GtkWidget *widget, GdkEventConfigure *event, AgsCellPattern *cell_pattern); gboolean ags_cell_pattern_drawing_area_expose_callback(GtkWidget *widget, GdkEventExpose *event, AgsCellPattern *cell_pattern); gboolean ags_cell_pattern_drawing_area_button_press_callback(GtkWidget *widget, GdkEventButton *event, AgsCellPattern *cell_pattern); gboolean ags_cell_pattern_drawing_area_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsCellPattern *cell_pattern); gboolean ags_cell_pattern_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsCellPattern *cell_pattern); void ags_cell_pattern_adjustment_value_changed_callback(GtkWidget *widget, AgsCellPattern *cell_pattern); #endif /*__AGS_CELL_PATTERN_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_mixer.c0000644000175000017500000001726313247044247015413 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_mixer_class_init(AgsMixerClass *mixer); void ags_mixer_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mixer_plugin_interface_init(AgsPluginInterface *plugin); void ags_mixer_init(AgsMixer *mixer); void ags_mixer_finalize(GObject *gobject); void ags_mixer_connect(AgsConnectable *connectable); void ags_mixer_disconnect(AgsConnectable *connectable); void ags_mixer_map_recall(AgsMachine *machine); gchar* ags_mixer_get_name(AgsPlugin *plugin); void ags_mixer_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_mixer_get_xml_type(AgsPlugin *plugin); void ags_mixer_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_mixer_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_mixer_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); /** * SECTION:ags_mixer * @short_description: mixer * @title: AgsMixer * @section_id: * @include: ags/X/machine/ags_mixer.h * * The #AgsMixer is a composite widget to act as mixer. */ static gpointer ags_mixer_parent_class = NULL; static AgsConnectableInterface *ags_mixer_parent_connectable_interface; GType ags_mixer_get_type(void) { static GType ags_type_mixer = 0; if(!ags_type_mixer){ static const GTypeInfo ags_mixer_info = { sizeof(AgsMixerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mixer_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsMixer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mixer_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mixer_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_mixer_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mixer = g_type_register_static(AGS_TYPE_MACHINE, "AgsMixer", &ags_mixer_info, 0); g_type_add_interface_static(ags_type_mixer, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_mixer, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_mixer); } void ags_mixer_class_init(AgsMixerClass *mixer) { GObjectClass *gobject; AgsMachineClass *machine; ags_mixer_parent_class = g_type_class_peek_parent(mixer); /* GObjectClass */ gobject = (GObjectClass *) mixer; gobject->finalize = ags_mixer_finalize; /* AgsMachine */ machine = (AgsMachineClass *) mixer; machine->map_recall = ags_mixer_map_recall; } void ags_mixer_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_mixer_connectable_parent_interface; ags_mixer_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_mixer_connect; connectable->disconnect = ags_mixer_disconnect; } void ags_mixer_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_mixer_get_name; plugin->set_name = ags_mixer_set_name; plugin->get_xml_type = ags_mixer_get_xml_type; plugin->set_xml_type = ags_mixer_set_xml_type; plugin->read = ags_mixer_read; plugin->write = ags_mixer_write; } void ags_mixer_init(AgsMixer *mixer) { g_signal_connect_after((GObject *) mixer, "parent_set", G_CALLBACK(ags_mixer_parent_set_callback), (gpointer) mixer); AGS_MACHINE(mixer)->audio->flags |= (AGS_AUDIO_ASYNC); AGS_MACHINE(mixer)->input_pad_type = AGS_TYPE_MIXER_INPUT_PAD; AGS_MACHINE(mixer)->input_line_type = AGS_TYPE_MIXER_INPUT_LINE; AGS_MACHINE(mixer)->output_pad_type = G_TYPE_NONE; AGS_MACHINE(mixer)->output_line_type = G_TYPE_NONE; /* */ mixer->name = NULL; mixer->xml_type = "ags-mixer"; mixer->input_pad = (GtkHBox *) gtk_hbox_new(FALSE, 0); AGS_MACHINE(mixer)->input = (GtkContainer *) mixer->input_pad; gtk_container_add((GtkContainer*) (gtk_container_get_children((GtkContainer *) mixer))->data, (GtkWidget *) mixer->input_pad); } void ags_mixer_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_mixer_parent_class)->finalize(gobject); } void ags_mixer_connect(AgsConnectable *connectable) { if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_mixer_parent_connectable_interface->connect(connectable); } void ags_mixer_disconnect(AgsConnectable *connectable) { if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } ags_mixer_parent_connectable_interface->disconnect(connectable); } void ags_mixer_map_recall(AgsMachine *machine) { AGS_MACHINE_CLASS(ags_mixer_parent_class)->map_recall(machine); /* empty */ } gchar* ags_mixer_get_name(AgsPlugin *plugin) { return(AGS_MIXER(plugin)->name); } void ags_mixer_set_name(AgsPlugin *plugin, gchar *name) { AGS_MIXER(plugin)->name = name; } gchar* ags_mixer_get_xml_type(AgsPlugin *plugin) { return(AGS_MIXER(plugin)->xml_type); } void ags_mixer_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_MIXER(plugin)->xml_type = xml_type; } void ags_mixer_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsMixer *gobject; AgsFileLookup *file_lookup; GList *list; guint64 index; gobject = AGS_MIXER(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); } xmlNode* ags_mixer_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsMixer *mixer; xmlNode *node; gchar *id; guint i; mixer = AGS_MIXER(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-mixer"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", mixer, NULL)); xmlAddChild(parent, node); return(node); } /** * ags_mixer_new: * @soundcard: the assigned soundcard. * * Creates an #AgsMixer * * Returns: a new #AgsMixer * * Since: 1.0.0 */ AgsMixer* ags_mixer_new(GObject *soundcard) { AgsMixer *mixer; mixer = (AgsMixer *) g_object_new(AGS_TYPE_MIXER, NULL); g_object_set(G_OBJECT(AGS_MACHINE(mixer)->audio), "soundcard", soundcard, NULL); return(mixer); } gsequencer-1.4.24/ags/X/machine/ags_panel.h0000644000175000017500000000344513247044247015370 00000000000000/* 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 . */ #ifndef __AGS_PANEL_H__ #define __AGS_PANEL_H__ #include #include #include #include #define AGS_TYPE_PANEL (ags_panel_get_type()) #define AGS_PANEL(obj) ((AgsPanel*) G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_PANEL, AgsPanel)) #define AGS_PANEL_CLASS(class) ((AgsPanelClass*) G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PANEL, AgsPanelClass)) #define AGS_IS_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, AGS_TYPE_PANEL)) #define AGS_IS_PANEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PANEL)) #define AGS_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PANEL, AgsPanelClass)) typedef struct _AgsPanel AgsPanel; typedef struct _AgsPanelClass AgsPanelClass; struct _AgsPanel { AgsMachine machine; gchar *name; gchar *xml_type; GtkVBox *vbox; }; struct _AgsPanelClass { AgsMachineClass machine; }; GType ags_panel_get_type(void); AgsPanel* ags_panel_new(GObject *soundcard); #endif /*__AGS_PANEL_H__*/ gsequencer-1.4.24/ags/X/machine/ags_ladspa_bridge_callbacks.c0000644000175000017500000000261313246707333021040 00000000000000/* 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 . */ #include #include void ags_ladspa_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLadspaBridge *ladspa_bridge) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = AGS_WINDOW(gtk_widget_get_toplevel(widget)); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_LADSPA_BRIDGE)->counter); g_object_set(AGS_MACHINE(ladspa_bridge), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_LADSPA_BRIDGE); g_free(str); } gsequencer-1.4.24/ags/X/machine/ags_cell_pattern.c0000644000175000017500000007430213247044247016740 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include static GType ags_accessible_cell_pattern_get_type(void); void ags_cell_pattern_class_init(AgsCellPatternClass *cell_pattern); void ags_accessible_cell_pattern_class_init(AtkObject *object); void ags_accessible_cell_pattern_action_interface_init(AtkActionIface *action); void ags_cell_pattern_connectable_interface_init(AgsConnectableInterface *connectable); void ags_cell_pattern_init(AgsCellPattern *cell_pattern); void ags_cell_pattern_finalize(GObject *gobject); void ags_cell_pattern_connect(AgsConnectable *connectable); void ags_cell_pattern_disconnect(AgsConnectable *connectable); AtkObject* ags_cell_pattern_get_accessible(GtkWidget *widget); void ags_cell_pattern_realize(GtkWidget *widget); void ags_cell_pattern_show(GtkWidget *widget); void ags_cell_pattern_show_all(GtkWidget *widget); gboolean ags_accessible_cell_pattern_do_action(AtkAction *action, gint i); gint ags_accessible_cell_pattern_get_n_actions(AtkAction *action); const gchar* ags_accessible_cell_pattern_get_description(AtkAction *action, gint i); const gchar* ags_accessible_cell_pattern_get_name(AtkAction *action, gint i); const gchar* ags_accessible_cell_pattern_get_keybinding(AtkAction *action, gint i); gboolean ags_accessible_cell_pattern_set_description(AtkAction *action, gint i); gchar* ags_accessible_cell_pattern_get_localized_name(AtkAction *action, gint i); /** * SECTION:ags_cell_pattern * @short_description: cell_pattern sequencer * @title: AgsCellPattern * @section_id: * @include: ags/X/machine/ags_cell_pattern.h * * The #AgsCellPattern is a composite widget to act as cell_pattern sequencer. */ static gpointer ags_cell_pattern_parent_class = NULL; static GQuark quark_accessible_object = 0; GtkStyle *cell_pattern_style = NULL; GHashTable *ags_cell_pattern_led_queue_draw = NULL; GType ags_cell_pattern_get_type(void) { static GType ags_type_cell_pattern = 0; if(!ags_type_cell_pattern){ static const GTypeInfo ags_cell_pattern_info = { sizeof(AgsCellPatternClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_cell_pattern_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsCellPattern), 0, /* n_preallocs */ (GInstanceInitFunc) ags_cell_pattern_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_cell_pattern_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_cell_pattern = g_type_register_static(GTK_TYPE_TABLE, "AgsCellPattern", &ags_cell_pattern_info, 0); g_type_add_interface_static(ags_type_cell_pattern, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_cell_pattern); } static GType ags_accessible_cell_pattern_get_type(void) { static GType ags_type_accessible_cell_pattern = 0; if(!ags_type_accessible_cell_pattern){ const GTypeInfo ags_accesssible_cell_pattern_info = { sizeof(GtkAccessibleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_accessible_cell_pattern_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GtkAccessible), 0, /* n_preallocs */ NULL, NULL }; static const GInterfaceInfo atk_action_interface_info = { (GInterfaceInitFunc) ags_accessible_cell_pattern_action_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_accessible_cell_pattern = g_type_register_static(GTK_TYPE_ACCESSIBLE, "AgsAccessibleCellPattern", &ags_accesssible_cell_pattern_info, 0); g_type_add_interface_static(ags_type_accessible_cell_pattern, ATK_TYPE_ACTION, &atk_action_interface_info); } return(ags_type_accessible_cell_pattern); } void ags_cell_pattern_class_init(AgsCellPatternClass *cell_pattern) { GObjectClass *gobject; GtkWidgetClass *widget; ags_cell_pattern_parent_class = g_type_class_peek_parent(cell_pattern); quark_accessible_object = g_quark_from_static_string("ags-accessible-object"); /* GObjectClass */ gobject = (GObjectClass *) cell_pattern; gobject->finalize = ags_cell_pattern_finalize; /* GtkWidget */ widget = (GtkWidgetClass *) cell_pattern; widget->realize = ags_cell_pattern_realize; widget->show = ags_cell_pattern_show; widget->show_all = ags_cell_pattern_show_all; } void ags_accessible_cell_pattern_class_init(AtkObject *object) { /* empty */ } void ags_accessible_cell_pattern_action_interface_init(AtkActionIface *action) { action->do_action = ags_accessible_cell_pattern_do_action; action->get_n_actions = ags_accessible_cell_pattern_get_n_actions; action->get_description = ags_accessible_cell_pattern_get_description; action->get_name = ags_accessible_cell_pattern_get_name; action->get_keybinding = ags_accessible_cell_pattern_get_keybinding; action->set_description = ags_accessible_cell_pattern_set_description; action->get_localized_name = ags_accessible_cell_pattern_get_localized_name; } void ags_cell_pattern_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_cell_pattern_connectable_parent_interface; connectable->connect = ags_cell_pattern_connect; connectable->disconnect = ags_cell_pattern_disconnect; } void ags_cell_pattern_init(AgsCellPattern *cell_pattern) { GtkAdjustment *adjustment; AgsLed *led; guint i; g_object_set(cell_pattern, "can-focus", TRUE, "n-columns", 2, "n-rows", 2, "homogeneous", FALSE, NULL); cell_pattern->flags = 0; cell_pattern->key_mask = 0; cell_pattern->cell_width = AGS_CELL_PATTERN_DEFAULT_CELL_WIDTH; cell_pattern->cell_height = AGS_CELL_PATTERN_DEFAULT_CELL_HEIGHT; cell_pattern->n_cols = AGS_CELL_PATTERN_DEFAULT_CONTROLS_HORIZONTALLY; cell_pattern->n_rows = AGS_CELL_PATTERN_DEFAULT_CONTROLS_VERTICALLY; cell_pattern->cursor_x = 0; cell_pattern->cursor_y = 0; cell_pattern->drawing_area = (GtkDrawingArea *) gtk_drawing_area_new(); gtk_widget_set_size_request((GtkWidget *) cell_pattern->drawing_area, AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_HORIZONTALLY * cell_pattern->cell_width + 1, AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY * cell_pattern->cell_height + 1); gtk_table_attach((GtkTable *) cell_pattern, (GtkWidget *) cell_pattern->drawing_area, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_set_events((GtkWidget *) cell_pattern->drawing_area, GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_CONTROL_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, (double) AGS_CELL_PATTERN_DEFAULT_CONTROLS_VERTICALLY - 1.0, 1.0, 1.0, (gdouble) AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY); cell_pattern->vscrollbar = (GtkVScrollbar *) gtk_vscrollbar_new(adjustment); gtk_table_attach((GtkTable *) cell_pattern, (GtkWidget *) cell_pattern->vscrollbar, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); cell_pattern->hscrollbar = NULL; /* led */ cell_pattern->active_led = 0; cell_pattern->hled_array = (GtkHBox *) ags_hled_array_new(); g_object_set(cell_pattern->hled_array, "led-width", cell_pattern->cell_width, "led-height", AGS_CELL_PATTERN_DEFAULT_CELL_HEIGHT, "led-count", cell_pattern->n_cols, NULL); gtk_table_attach((GtkTable *) cell_pattern, (GtkWidget *) cell_pattern->hled_array, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show_all(cell_pattern->hled_array); if(ags_cell_pattern_led_queue_draw == NULL){ ags_cell_pattern_led_queue_draw = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_cell_pattern_led_queue_draw, cell_pattern, ags_cell_pattern_led_queue_draw_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_cell_pattern_led_queue_draw_timeout, (gpointer) cell_pattern); } void ags_cell_pattern_finalize(GObject *gobject) { g_hash_table_remove(ags_cell_pattern_led_queue_draw, gobject); G_OBJECT_CLASS(ags_cell_pattern_parent_class)->finalize(gobject); } void ags_cell_pattern_connect(AgsConnectable *connectable) { AgsCellPattern *cell_pattern; if((AGS_CELL_PATTERN_CONNECTED & (AGS_CELL_PATTERN(connectable)->flags)) != 0){ return; } /* AgsCellPattern */ cell_pattern = AGS_CELL_PATTERN(connectable); cell_pattern->flags |= AGS_CELL_PATTERN_CONNECTED; g_signal_connect_after(G_OBJECT(cell_pattern), "focus_in_event", G_CALLBACK(ags_cell_pattern_focus_in_callback), (gpointer) cell_pattern); g_signal_connect(G_OBJECT(cell_pattern->drawing_area), "key_press_event", G_CALLBACK(ags_cell_pattern_drawing_area_key_press_event), (gpointer) cell_pattern); g_signal_connect(G_OBJECT(cell_pattern->drawing_area), "key_release_event", G_CALLBACK(ags_cell_pattern_drawing_area_key_release_event), (gpointer) cell_pattern); g_signal_connect_after(G_OBJECT(cell_pattern->drawing_area), "configure_event", G_CALLBACK(ags_cell_pattern_drawing_area_configure_callback), (gpointer) cell_pattern); g_signal_connect_after(G_OBJECT(cell_pattern->drawing_area), "expose_event", G_CALLBACK(ags_cell_pattern_drawing_area_expose_callback), (gpointer) cell_pattern); g_signal_connect(G_OBJECT(cell_pattern->drawing_area), "button_press_event", G_CALLBACK(ags_cell_pattern_drawing_area_button_press_callback), (gpointer) cell_pattern); g_signal_connect(G_OBJECT(GTK_RANGE(cell_pattern->vscrollbar)->adjustment), "value_changed", G_CALLBACK(ags_cell_pattern_adjustment_value_changed_callback), (gpointer) cell_pattern); } void ags_cell_pattern_disconnect(AgsConnectable *connectable) { AgsCellPattern *cell_pattern; if((AGS_CELL_PATTERN_CONNECTED & (AGS_CELL_PATTERN(connectable)->flags)) == 0){ return; } /* AgsCellPattern */ cell_pattern = AGS_CELL_PATTERN(connectable); cell_pattern->flags &= (~AGS_CELL_PATTERN_CONNECTED); g_object_disconnect(G_OBJECT(cell_pattern), "any_signal::focus_in_event", G_CALLBACK(ags_cell_pattern_focus_in_callback), (gpointer) cell_pattern, NULL); g_object_disconnect(G_OBJECT(cell_pattern->drawing_area), "any_signal::key_press_event", G_CALLBACK(ags_cell_pattern_drawing_area_key_press_event), (gpointer) cell_pattern, "any_signal::key_release_event", G_CALLBACK(ags_cell_pattern_drawing_area_key_release_event), (gpointer) cell_pattern, "any_signal::configure_event", G_CALLBACK(ags_cell_pattern_drawing_area_configure_callback), (gpointer) cell_pattern, "any_signal::expose_event", G_CALLBACK(ags_cell_pattern_drawing_area_expose_callback), (gpointer) cell_pattern, "any_signal::button_press_event", G_CALLBACK(ags_cell_pattern_drawing_area_button_press_callback), (gpointer) cell_pattern, NULL); g_object_disconnect(G_OBJECT(GTK_RANGE(cell_pattern->vscrollbar)->adjustment), "any_signal::value_changed", G_CALLBACK(ags_cell_pattern_adjustment_value_changed_callback), (gpointer) cell_pattern, NULL); } AtkObject* ags_cell_pattern_get_accessible(GtkWidget *widget) { AtkObject* accessible; accessible = g_object_get_qdata(G_OBJECT(widget), quark_accessible_object); if(!accessible){ accessible = g_object_new(ags_accessible_cell_pattern_get_type(), NULL); g_object_set_qdata(G_OBJECT(widget), quark_accessible_object, accessible); gtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), widget); } return(accessible); } void ags_cell_pattern_realize(GtkWidget *widget) { AgsCellPattern *cell_pattern; cell_pattern = widget; /* call parent */ GTK_WIDGET_CLASS(ags_cell_pattern_parent_class)->realize(widget); if(cell_pattern_style == NULL){ cell_pattern_style = gtk_style_copy(gtk_widget_get_style(cell_pattern)); } gtk_widget_set_style((GtkWidget *) cell_pattern->drawing_area, cell_pattern_style); gtk_widget_set_style((GtkWidget *) cell_pattern->vscrollbar, cell_pattern_style); } void ags_cell_pattern_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_cell_pattern_parent_class)->show(widget); // ags_cell_pattern_draw_matrix(AGS_CELL_PATTERN(widget)); } void ags_cell_pattern_show_all(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_cell_pattern_parent_class)->show_all(widget); // ags_cell_pattern_draw_matrix(AGS_CELL_PATTERN(widget)); } gboolean ags_accessible_cell_pattern_do_action(AtkAction *action, gint i) { AgsCellPattern *cell_pattern; GdkEventKey *key_press, *key_release; GdkEventKey *modifier_press, *modifier_release; if(!(i >= 0 && i < 6)){ return(FALSE); } cell_pattern = gtk_accessible_get_widget(GTK_ACCESSIBLE(action)); key_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); key_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); switch(i){ case AGS_CELL_PATTERN_MOVE_LEFT: { key_press->keyval = key_release->keyval = GDK_KEY_Left; /* send event */ gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_release); } break; case AGS_CELL_PATTERN_MOVE_RIGHT: { key_press->keyval = key_release->keyval = GDK_KEY_Right; /* send event */ gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_release); } break; case AGS_CELL_PATTERN_MOVE_UP: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_release); } break; case AGS_CELL_PATTERN_MOVE_DOWN: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_release); } break; case AGS_CELL_PATTERN_TOGGLE_PAD: { key_press->keyval = key_release->keyval = GDK_KEY_space; /* send event */ gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_release); } break; case AGS_CELL_PATTERN_COPY_PATTERN: { key_press->keyval = key_release->keyval = GDK_KEY_c; /* create modifier */ modifier_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); modifier_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); modifier_press->keyval = modifier_release->keyval = GDK_KEY_Control_R; /* send event */ gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) cell_pattern, (GdkEvent *) modifier_release); } break; } return(TRUE); } gint ags_accessible_cell_pattern_get_n_actions(AtkAction *action) { return(6); } const gchar* ags_accessible_cell_pattern_get_description(AtkAction *action, gint i) { static const gchar *actions[] = { "move cursor left", "move cursor right", "move cursor up", "move cursor down", "toggle audio pattern" "copy pattern to clipboard", }; if(i >= 0 && i < 6){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_cell_pattern_get_name(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "up", "down", "toggle", "copy", }; if(i >= 0 && i < 6){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_cell_pattern_get_keybinding(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "up", "down", "space", "Ctrl+c", }; if(i >= 0 && i < 6){ return(actions[i]); }else{ return(NULL); } } gboolean ags_accessible_cell_pattern_set_description(AtkAction *action, gint i) { //TODO:JK: implement me return(FALSE); } gchar* ags_accessible_cell_pattern_get_localized_name(AtkAction *action, gint i) { //TODO:JK: implement me return(NULL); } void ags_cell_pattern_paint(AgsCellPattern *cell_pattern) { ags_cell_pattern_draw_gutter(cell_pattern); ags_cell_pattern_draw_matrix(cell_pattern); ags_cell_pattern_draw_cursor(cell_pattern); } void ags_cell_pattern_draw_gutter(AgsCellPattern *cell_pattern) { AgsMachine *machine; AgsChannel *start_channel, *channel; AgsMutexManager *mutex_manager; guint input_pads; guint gutter; guint current_gutter; int i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) cell_pattern, AGS_TYPE_MACHINE); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* retrieve some audio fields */ pthread_mutex_lock(audio_mutex); start_channel = machine->audio->input; input_pads = machine->audio->input_pads; pthread_mutex_unlock(audio_mutex); if(input_pads == 0){ return; } if(input_pads > AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY){ gutter = AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY; }else{ gutter = input_pads; } current_gutter = (guint) GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value; /* clear bg */ gdk_draw_rectangle(GTK_WIDGET(cell_pattern->drawing_area)->window, GTK_WIDGET(cell_pattern->drawing_area)->style->bg_gc[0], TRUE, 0, 0, AGS_CELL_PATTERN_DEFAULT_CELL_WIDTH * AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_HORIZONTALLY, gutter * AGS_CELL_PATTERN_DEFAULT_CELL_HEIGHT); if(input_pads - ((guint) current_gutter + AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY) > AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY){ channel = ags_channel_nth(start_channel, input_pads - (current_gutter + AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY)); }else if(input_pads > AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY){ channel = ags_channel_nth(start_channel, AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY); }else{ channel = ags_channel_nth(start_channel, input_pads - 1); } if(channel == NULL){ return; } for (i = 0; channel != NULL && i < gutter; i++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); for (j = 0; j < 32; j++){ gdk_draw_rectangle(GTK_WIDGET(cell_pattern->drawing_area)->window, GTK_WIDGET(cell_pattern->drawing_area)->style->fg_gc[0], FALSE, j * AGS_CELL_PATTERN_DEFAULT_CELL_WIDTH, i * AGS_CELL_PATTERN_DEFAULT_CELL_HEIGHT, AGS_CELL_PATTERN_DEFAULT_CELL_WIDTH, AGS_CELL_PATTERN_DEFAULT_CELL_HEIGHT); ags_cell_pattern_redraw_gutter_point(cell_pattern, channel, j, i); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->prev_pad; pthread_mutex_unlock(channel_mutex); } } void ags_cell_pattern_draw_matrix(AgsCellPattern *cell_pattern) { AgsMachine *machine; AgsChannel *start_channel, *channel; AgsMutexManager *mutex_manager; guint input_pads; guint gutter; guint current_gutter; int i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) cell_pattern, AGS_TYPE_MACHINE); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* get some audio fields */ pthread_mutex_lock(audio_mutex); start_channel = machine->audio->input; input_pads = machine->audio->input_pads; pthread_mutex_unlock(audio_mutex); if(input_pads > AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY){ gutter = AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY; }else{ gutter = input_pads; } current_gutter = (guint) GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value; channel = ags_channel_nth(start_channel, input_pads - current_gutter - 1); if(channel == NULL){ return; } for (i = 0; channel != NULL && i < gutter; i++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); for(j = 0; j < AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_HORIZONTALLY; j++){ ags_cell_pattern_redraw_gutter_point(cell_pattern, channel, j, i); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->prev_pad; pthread_mutex_unlock(channel_mutex); } } void ags_cell_pattern_draw_cursor(AgsCellPattern *cell_pattern) { guint i, j; if(cell_pattern->cursor_y >= GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value && cell_pattern->cursor_y < GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value + cell_pattern->n_rows){ i = cell_pattern->cursor_y - GTK_RANGE(cell_pattern->vscrollbar)->adjustment->value; j = cell_pattern->cursor_x; if((AGS_CELL_PATTERN_CURSOR_ON & (cell_pattern->flags)) != 0){ ags_cell_pattern_highlight_gutter_point(cell_pattern, j, i); }else{ ags_cell_pattern_unpaint_gutter_point(cell_pattern, j, i); } } } void ags_cell_pattern_redraw_gutter_point(AgsCellPattern *cell_pattern, AgsChannel *channel, guint j, guint i) { AgsMachine *machine; AgsMutexManager *mutex_manager; gboolean do_highlight; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; if(channel == NULL || channel->pattern == NULL){ return; } machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) cell_pattern, AGS_TYPE_MACHINE); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* redraw */ pthread_mutex_lock(channel_mutex); do_highlight = ags_pattern_get_bit((AgsPattern *) channel->pattern->data, machine->bank_0, machine->bank_1, j); pthread_mutex_unlock(channel_mutex); if(do_highlight){ ags_cell_pattern_highlight_gutter_point(cell_pattern, j, i); }else{ ags_cell_pattern_unpaint_gutter_point(cell_pattern, j, i); } } void ags_cell_pattern_highlight_gutter_point(AgsCellPattern *cell_pattern, guint j, guint i) { gdk_draw_rectangle(GTK_WIDGET(cell_pattern->drawing_area)->window, GTK_WIDGET(cell_pattern->drawing_area)->style->fg_gc[0], TRUE, j * cell_pattern->cell_width + 1, i * cell_pattern->cell_height + 1, AGS_CELL_PATTERN_DEFAULT_CELL_WIDTH - 1, AGS_CELL_PATTERN_DEFAULT_CELL_HEIGHT - 1); } void ags_cell_pattern_unpaint_gutter_point(AgsCellPattern *cell_pattern, guint j, guint i) { gdk_draw_rectangle(GTK_WIDGET(cell_pattern->drawing_area)->window, GTK_WIDGET(cell_pattern->drawing_area)->style->bg_gc[0], TRUE, j * cell_pattern->cell_width + 1, i * cell_pattern->cell_height +1, AGS_CELL_PATTERN_DEFAULT_CELL_WIDTH - 1, AGS_CELL_PATTERN_DEFAULT_CELL_HEIGHT - 1); } void* ags_cell_pattern_blink_worker(void *data) { AgsWindow *window; AgsCellPattern *cell_pattern; AgsBlinkCellPatternCursor *blink_cell_pattern_cursor; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; static const guint blink_delay = 1000000; // blink every second cell_pattern = AGS_CELL_PATTERN(data); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) cell_pattern, AGS_TYPE_WINDOW); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* find task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); while(gtk_widget_has_focus((GtkWidget *) cell_pattern)){ /* blink cursor */ blink_cell_pattern_cursor = ags_blink_cell_pattern_cursor_new(cell_pattern, !(AGS_CELL_PATTERN_CURSOR_ON & (cell_pattern->flags))); ags_gui_thread_schedule_task(gui_thread, blink_cell_pattern_cursor); /* delay */ usleep(blink_delay); } /* unset cursor */ blink_cell_pattern_cursor = ags_blink_cell_pattern_cursor_new(cell_pattern, FALSE); ags_gui_thread_schedule_task(gui_thread, blink_cell_pattern_cursor); return(NULL); } /** * ags_cell_pattern_led_queue_draw_timeout: * @cell_pattern: the #AgsCellPattern * * Queue draw led. * * Returns: %TRUE if continue timeout, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_cell_pattern_led_queue_draw_timeout(AgsCellPattern *cell_pattern) { if(g_hash_table_lookup(ags_cell_pattern_led_queue_draw, cell_pattern) != NULL){ AgsMachine *machine; AgsAudio *audio; AgsRecallID *recall_id; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsMutexManager *mutex_manager; GList *list_start, *list; guint offset; guint active_led_new; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) cell_pattern, AGS_TYPE_MACHINE); if(machine == NULL){ return(TRUE); } audio = machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* get some recalls */ pthread_mutex_lock(audio_mutex); recall_id = NULL; list = audio->recall_id; while(list != NULL){ recall_id = ags_recall_id_find_parent_recycling_context(list, NULL); if(recall_id != NULL && (AGS_RECALL_ID_SEQUENCER & (recall_id->flags)) == 0){ list = g_list_find(list, recall_id); list = list->next; }else{ break; } } pthread_mutex_unlock(audio_mutex); if(recall_id == NULL){ return(TRUE); } g_object_get(audio, "play", &list_start, NULL); play_count_beats_audio = NULL; play_count_beats_audio_run = NULL; pthread_mutex_lock(audio->play_mutex); list = ags_recall_find_type(list_start, AGS_TYPE_COUNT_BEATS_AUDIO); if(list != NULL){ play_count_beats_audio = AGS_COUNT_BEATS_AUDIO(list->data); } list = ags_recall_find_type_with_recycling_context(list_start, AGS_TYPE_COUNT_BEATS_AUDIO_RUN, (GObject *) recall_id->recycling_context); if(list != NULL){ play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); } pthread_mutex_unlock(audio->play_mutex); g_list_free(list_start); if(play_count_beats_audio == NULL || play_count_beats_audio_run == NULL){ return(TRUE); } /* active led */ active_led_new = (guint) play_count_beats_audio_run->sequencer_counter; cell_pattern->active_led = (guint) active_led_new; ags_led_array_unset_all(cell_pattern->hled_array); ags_led_array_set_nth(cell_pattern->hled_array, active_led_new); return(TRUE); }else{ return(FALSE); } } /** * ags_cell_pattern_new: * * Creates an #AgsCellPattern * * Returns: a new #AgsCellPattern * * Since: 0.5 */ AgsCellPattern* ags_cell_pattern_new() { AgsCellPattern *cell_pattern; cell_pattern = (AgsCellPattern *) g_object_new(AGS_TYPE_CELL_PATTERN, NULL); return(cell_pattern); } gsequencer-1.4.24/ags/X/machine/ags_pattern_box_callbacks.h0000644000175000017500000000314113247044247020606 00000000000000/* 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 . */ #ifndef __AGS_PATTERN_BOX_CALLBACKS_H__ #define __AGS_PATTERN_BOX_CALLBACKS_H__ #include #include #include #include /* controls */ gboolean ags_pattern_box_focus_in_callback(GtkWidget *widget, GdkEvent *event, AgsPatternBox *pattern_box); gboolean ags_pattern_box_focus_out_callback(GtkWidget *widget, GdkEvent *event, AgsPatternBox *pattern_box); gboolean ags_pattern_box_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsPatternBox *pattern_box); gboolean ags_pattern_box_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsPatternBox *pattern_box); void ags_pattern_box_pad_callback(GtkWidget *toggle_button, AgsPatternBox *pattern_box); void ags_pattern_box_offset_callback(GtkWidget *widget, AgsPatternBox *pattern_box); #endif /*__AGS_PATTERN_BOX_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_lv2_bridge.h0000644000175000017500000000713213247044247016305 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LV2_BRIDGE_H__ #define __AGS_LV2_BRIDGE_H__ #include #include #include #include #include #include #include #include #include #define AGS_TYPE_LV2_BRIDGE (ags_lv2_bridge_get_type()) #define AGS_LV2_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LV2_BRIDGE, AgsLv2Bridge)) #define AGS_LV2_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LV2_BRIDGE, AgsLv2BridgeClass)) #define AGS_IS_LV2_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_LV2_BRIDGE)) #define AGS_IS_LV2_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_LV2_BRIDGE)) #define AGS_LV2_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_LV2_BRIDGE, AgsLv2BridgeClass)) #define AGS_LV2_BRIDGE_DEFAULT_VERSION "0.4.3" #define AGS_LV2_BRIDGE_DEFAULT_BUILD_ID "CEST 13-05-2015 13:40" typedef struct _AgsLv2Bridge AgsLv2Bridge; typedef struct _AgsLv2BridgeClass AgsLv2BridgeClass; typedef enum{ AGS_LV2_BRIDGE_DISPLAY_INPUT = 1, AGS_LV2_BRIDGE_BULK_OUTPUT = 1 << 1, AGS_LV2_BRIDGE_DISPLAY_OUTPUT = 1 << 2, AGS_LV2_BRIDGE_BULK_INPUT = 1 << 3, AGS_LV2_BRIDGE_NO_UPDATE = 1 << 4, }AgsLv2BridgeFlags; struct _AgsLv2Bridge { AgsMachine machine; guint flags; gchar *name; gchar *version; gchar *build_id; gchar *xml_type; guint mapped_output_pad; guint mapped_input_pad; gchar *filename; gchar *effect; gchar *uri; guint uri_index; gboolean has_midi; gboolean has_gui; gchar *gui_filename; gchar *gui_uri; GtkVBox *vbox; LV2_Descriptor *lv2_descriptor; LV2_Handle *lv2_handle; float *port_value; GtkComboBoxText *program; GtkComboBoxText *preset; LV2UI_Descriptor *ui_descriptor; LV2_Feature **ui_feature; LV2UI_Handle ui_handle; GtkWidget *lv2_gui; GtkWidget *ui_widget; GtkMenu *lv2_menu; }; struct _AgsLv2BridgeClass { AgsMachineClass machine; }; GType ags_lv2_bridge_get_type(void); void ags_lv2_bridge_input_map_recall(AgsLv2Bridge *lv2_bridge, guint audio_channel_start, guint input_pad_start); void ags_lv2_bridge_output_map_recall(AgsLv2Bridge *lv2_bridge, guint audio_channel_start, guint output_pad_start); void ags_lv2_bridge_load_program(AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_load_preset(AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_load_midi(AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_load_gui(AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_load(AgsLv2Bridge *lv2_bridge); gboolean ags_lv2_bridge_lv2ui_idle_timeout(GtkWidget *widget); AgsLv2Bridge* ags_lv2_bridge_new(GObject *soundcard, gchar *filename, gchar *effect); #endif /*__AGS_LV2_BRIDGE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_mixer_callbacks.c0000644000175000017500000000253013246707333017402 00000000000000/* 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 . */ #include #include void ags_mixer_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsMixer *mixer) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = (AgsWindow *) gtk_widget_get_toplevel(widget); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_MIXER)->counter); g_object_set(AGS_MACHINE(mixer), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_MIXER); g_free(str); } gsequencer-1.4.24/ags/X/machine/ags_audiorec_callbacks.c0000644000175000017500000000457513247044247020063 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_audiorec_open_response_callback(GtkWidget *widget, gint response, AgsAudiorec *audiorec); void ags_audiorec_open_callback(GtkWidget *button, AgsAudiorec *audiorec) { GtkFileChooserDialog *dialog; if(audiorec->open_dialog != NULL){ return; } audiorec->open_dialog = dialog = gtk_file_chooser_dialog_new(i18n("Open audio files"), (GtkWindow *) gtk_widget_get_toplevel((GtkWidget *) audiorec), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), FALSE); gtk_widget_show_all((GtkWidget *) dialog); g_signal_connect((GObject *) dialog, "response", G_CALLBACK(ags_audiorec_open_response_callback), audiorec); } void ags_audiorec_open_response_callback(GtkWidget *widget, gint response, AgsAudiorec *audiorec) { if(response == GTK_RESPONSE_ACCEPT){ gchar *filename; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget)); gtk_entry_set_text(audiorec->filename, filename); ags_audiorec_open_filename(audiorec, filename); } audiorec->open_dialog = NULL; gtk_widget_destroy(widget); } void ags_audiorec_keep_data_callback(GtkWidget *button, AgsAudiorec *audiorec) { //TODO:JK: implement me } void ags_audiorec_replace_data_callback(GtkWidget *button, AgsAudiorec *audiorec) { //TODO:JK: implement me } void ags_audiorec_mix_data_callback(GtkWidget *button, AgsAudiorec *audiorec) { //TODO:JK: implement me } gsequencer-1.4.24/ags/X/machine/ags_synth.c0000644000175000017500000005121313247044247015425 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_synth_class_init(AgsSynthClass *synth); void ags_synth_connectable_interface_init(AgsConnectableInterface *connectable); void ags_synth_plugin_interface_init(AgsPluginInterface *plugin); void ags_synth_init(AgsSynth *synth); void ags_synth_finalize(GObject *gobject); void ags_synth_connect(AgsConnectable *connectable); void ags_synth_disconnect(AgsConnectable *connectable); void ags_synth_show(GtkWidget *widget); void ags_synth_map_recall(AgsMachine *machine); gchar* ags_synth_get_name(AgsPlugin *plugin); void ags_synth_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_synth_get_xml_type(AgsPlugin *plugin); void ags_synth_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_synth_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_synth_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine); xmlNode* ags_synth_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); /** * SECTION:ags_synth * @short_description: synth * @title: AgsSynth * @section_id: * @include: ags/X/machine/ags_synth.h * * The #AgsSynth is a composite widget to act as synth. */ static gpointer ags_synth_parent_class = NULL; static AgsConnectableInterface *ags_synth_parent_connectable_interface; GType ags_synth_get_type(void) { static GType ags_type_synth = 0; if(!ags_type_synth){ static const GTypeInfo ags_synth_info = { sizeof(AgsSynthClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_synth_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsSynth), 0, /* n_preallocs */ (GInstanceInitFunc) ags_synth_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_synth_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_synth_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_synth = g_type_register_static(AGS_TYPE_MACHINE, "AgsSynth", &ags_synth_info, 0); g_type_add_interface_static(ags_type_synth, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_synth, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_synth); } void ags_synth_class_init(AgsSynthClass *synth) { GObjectClass *gobject; AgsMachineClass *machine; ags_synth_parent_class = g_type_class_peek_parent(synth); /* GObjectClass */ gobject = (GObjectClass *) synth; gobject->finalize = ags_synth_finalize; /* AgsMachineClass */ machine = (AgsMachineClass *) synth; machine->map_recall = ags_synth_map_recall; } void ags_synth_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_synth_connectable_parent_interface; ags_synth_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_synth_connect; connectable->disconnect = ags_synth_disconnect; } void ags_synth_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_synth_get_name; plugin->set_name = ags_synth_set_name; plugin->get_xml_type = ags_synth_get_xml_type; plugin->set_xml_type = ags_synth_set_xml_type; plugin->read = ags_synth_read; plugin->write = ags_synth_write; } void ags_synth_init(AgsSynth *synth) { AgsAudio *audio; GtkHBox *hbox; GtkVBox *vbox; GtkTable *table; GtkLabel *label; g_signal_connect_after((GObject *) synth, "parent_set", G_CALLBACK(ags_synth_parent_set_callback), (gpointer) synth); audio = AGS_MACHINE(synth)->audio; audio->flags |= (AGS_AUDIO_ASYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_TAKES_SYNTH); AGS_MACHINE(synth)->input_pad_type = AGS_TYPE_SYNTH_INPUT_PAD; AGS_MACHINE(synth)->input_line_type = AGS_TYPE_SYNTH_INPUT_LINE; AGS_MACHINE(synth)->output_pad_type = G_TYPE_NONE; AGS_MACHINE(synth)->output_line_type = G_TYPE_NONE; // AGS_MACHINE(synth)->flags |= AGS_MACHINE_IS_SYNTHESIZER; AGS_MACHINE(synth)->mapping_flags |= AGS_MACHINE_MONO; /* create widgets */ synth->flags = 0; synth->name = NULL; synth->xml_type = "ags-synth"; synth->mapped_input_pad = 0; synth->mapped_output_pad = 0; hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_container_add((GtkContainer*) (gtk_bin_get_child((GtkBin *) synth)), (GtkWidget *) hbox); synth->input_pad = (GtkVBox *) gtk_vbox_new(FALSE, 0); AGS_MACHINE(synth)->input = (GtkContainer *) synth->input_pad; gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) AGS_MACHINE(synth)->input, FALSE, FALSE, 0); vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) vbox, FALSE, FALSE, 0); synth->auto_update = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("auto update")); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) synth->auto_update, FALSE, FALSE, 0); synth->update = (GtkButton *) gtk_button_new_with_label(i18n("update")); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) synth->update, FALSE, FALSE, 0); /* table */ table = (GtkTable *) gtk_table_new(3, 2, FALSE); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) table, FALSE, FALSE, 0); /* frequency */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("lower"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); synth->lower = (GtkSpinButton *) gtk_spin_button_new_with_range(AGS_SYNTH_BASE_NOTE_MIN, AGS_SYNTH_BASE_NOTE_MAX, 1.0); synth->lower->adjustment->value = -48.0; gtk_table_attach(table, GTK_WIDGET(synth->lower), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); /* loop start */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("loop start"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); synth->loop_start = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 0.0, 1.0); gtk_table_attach(table, GTK_WIDGET(synth->loop_start), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* loop end */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("loop end"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); synth->loop_end = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 0.0, 1.0); gtk_table_attach(table, GTK_WIDGET(synth->loop_end), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); } void ags_synth_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_synth_parent_class)->finalize(gobject); } void ags_synth_connect(AgsConnectable *connectable) { AgsSynth *synth; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_synth_parent_connectable_interface->connect(connectable); /* AgsSynth */ synth = AGS_SYNTH(connectable); g_signal_connect((GObject *) synth->lower, "value-changed", G_CALLBACK(ags_synth_lower_callback), synth); g_signal_connect((GObject *) synth->auto_update, "toggled", G_CALLBACK(ags_synth_auto_update_callback), synth); g_signal_connect((GObject *) synth->update, "clicked", G_CALLBACK(ags_synth_update_callback), (gpointer) synth); } void ags_synth_disconnect(AgsConnectable *connectable) { AgsSynth *synth; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } ags_synth_parent_connectable_interface->disconnect(connectable); /* AgsSynth */ synth = AGS_SYNTH(connectable); g_object_disconnect((GObject *) synth->lower, "any_signal::value-changed", G_CALLBACK(ags_synth_lower_callback), synth, NULL); g_object_disconnect((GObject *) synth->auto_update, "any_signal::toggled", G_CALLBACK(ags_synth_auto_update_callback), synth, NULL); g_object_disconnect((GObject *) synth->update, "any_signal::clicked", G_CALLBACK(ags_synth_update_callback), (gpointer) synth, NULL); } void ags_synth_map_recall(AgsMachine *machine) { AgsSynth *synth; AgsAudio *audio; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } AGS_MACHINE_CLASS(ags_synth_parent_class)->map_recall(machine); } gchar* ags_synth_get_name(AgsPlugin *plugin) { return(AGS_SYNTH(plugin)->name); } void ags_synth_set_name(AgsPlugin *plugin, gchar *name) { AGS_SYNTH(plugin)->name = name; } gchar* ags_synth_get_xml_type(AgsPlugin *plugin) { return(AGS_SYNTH(plugin)->xml_type); } void ags_synth_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_SYNTH(plugin)->xml_type = xml_type; } void ags_synth_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsSynth *gobject; AgsFileLookup *file_lookup; GList *list; gobject = AGS_SYNTH(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* fix wrong flag */ AGS_MACHINE(gobject)->flags &= (~AGS_MACHINE_IS_SYNTHESIZER); list = file->lookup; while((list = ags_file_lookup_find_by_node(list, node->parent)) != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); if(g_signal_handler_find(list->data, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, ags_file_read_machine_resolve_audio, NULL) != 0){ g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_synth_read_resolve_audio), gobject); break; } list = list->next; } /* */ gtk_spin_button_set_value(gobject->lower, g_ascii_strtod(xmlGetProp(node, "lower"), NULL)); gtk_spin_button_set_value(gobject->loop_start, g_ascii_strtod(xmlGetProp(node, "loop-begin"), NULL)); gtk_spin_button_set_value(gobject->loop_end, g_ascii_strtod(xmlGetProp(node, "loop-end"), NULL)); } void ags_synth_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsSynth *synth; synth = AGS_SYNTH(machine); if((AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) == 0){ synth->mapped_output_pad = machine->audio->output_pads; synth->mapped_input_pad = machine->audio->input_pads; }else{ synth->mapped_output_pad = machine->audio->output_pads; synth->mapped_input_pad = machine->audio->input_pads; } } xmlNode* ags_synth_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsSynth *synth; xmlNode *node; gchar *id; synth = AGS_SYNTH(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-synth"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", synth, NULL)); xmlNewProp(node, "lower", g_strdup_printf("%f", gtk_spin_button_get_value(synth->lower))); xmlNewProp(node, "loop-begin", g_strdup_printf("%f", gtk_spin_button_get_value(synth->loop_start))); xmlNewProp(node, "loop-end", g_strdup_printf("%f", gtk_spin_button_get_value(synth->loop_end))); xmlAddChild(parent, node); return(node); } void ags_synth_update(AgsSynth *synth) { AgsWindow *window; AgsOscillator *oscillator; AgsAudio *audio; AgsChannel *channel; AgsRecycling *first_recycling; AgsClearAudioSignal *clear_audio_signal; AgsApplySynth *apply_synth; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GList *input_pad, *input_pad_start; GList *input_line, *input_line_start; GList *rt_template; GList *task; guint output_lines; guint wave; guint attack, frame_count; gdouble frequency, phase, start_frequency; guint loop_start, loop_end; gdouble volume; AgsComplex **sync_point; guint sync_point_count; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) synth); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); audio = AGS_MACHINE(synth)->audio; /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* */ start_frequency = (gdouble) gtk_spin_button_get_value_as_float(synth->lower); loop_start = (guint) gtk_spin_button_get_value_as_int(synth->loop_start); loop_end = (guint) gtk_spin_button_get_value_as_int(synth->loop_end); /* write input */ input_pad_start = input_pad = gtk_container_get_children((GtkContainer *) synth->input_pad); /* get soundcard */ pthread_mutex_lock(audio_mutex); channel = audio->input; pthread_mutex_unlock(audio_mutex); task = NULL; while(input_pad != NULL){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* do it so */ input_line = gtk_container_get_children((GtkContainer *) AGS_PAD(input_pad->data)->expander_set); oscillator = AGS_OSCILLATOR(gtk_container_get_children((GtkContainer *) AGS_LINE(input_line->data)->expander->table)->data); wave = (guint) gtk_combo_box_get_active(oscillator->wave) + 1; attack = (guint) gtk_spin_button_get_value_as_int(oscillator->attack); frame_count = (guint) gtk_spin_button_get_value_as_int(oscillator->frame_count); phase = (gdouble) gtk_spin_button_get_value_as_float(oscillator->phase); frequency = (gdouble) gtk_spin_button_get_value_as_float(oscillator->frequency); volume = (gdouble) gtk_spin_button_get_value_as_float(oscillator->volume); apply_synth = ags_apply_synth_new(channel, 1, wave, attack % channel->buffer_size, frame_count, frequency, phase, start_frequency, volume, loop_start, loop_end); g_object_set(apply_synth, "delay", (gdouble) attack / channel->buffer_size, NULL); task = g_list_prepend(task, apply_synth); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); input_pad = input_pad->next; } g_list_free(input_pad_start); /* clear output */ input_pad_start = input_pad = gtk_container_get_children((GtkContainer *) synth->input_pad); pthread_mutex_lock(audio_mutex); channel = audio->output; output_lines = audio->output_lines; pthread_mutex_unlock(audio_mutex); while(channel != NULL){ AgsAudioSignal *template; /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* clear task */ pthread_mutex_lock(channel_mutex); first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* lookup recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_recycling); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(recycling_mutex); template = ags_audio_signal_get_template(first_recycling->audio_signal); pthread_mutex_unlock(recycling_mutex); clear_audio_signal = ags_clear_audio_signal_new(template); task = g_list_prepend(task, clear_audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* write output */ pthread_mutex_lock(audio_mutex); channel = audio->output; pthread_mutex_unlock(audio_mutex); while(input_pad != NULL){ guint i; gboolean do_sync; /* do it so */ input_line = gtk_container_get_children((GtkContainer *) AGS_PAD(input_pad->data)->expander_set); oscillator = AGS_OSCILLATOR(gtk_container_get_children((GtkContainer *) AGS_LINE(input_line->data)->expander->table)->data); wave = (guint) gtk_combo_box_get_active(oscillator->wave) + 1; attack = (guint) gtk_spin_button_get_value_as_int(oscillator->attack); frame_count = (guint) gtk_spin_button_get_value_as_int(oscillator->frame_count); phase = (gdouble) gtk_spin_button_get_value_as_float(oscillator->phase); frequency = (gdouble) gtk_spin_button_get_value_as_float(oscillator->frequency); volume = (gdouble) gtk_spin_button_get_value_as_float(oscillator->volume); do_sync = gtk_toggle_button_get_active(oscillator->do_sync); if(do_sync){ sync_point_count = oscillator->sync_point_count; if(sync_point_count > 0){ sync_point = (AgsComplex **) malloc(sync_point_count * sizeof(AgsComplex *)); }else{ sync_point = NULL; } for(i = 0; i < sync_point_count; i++){ sync_point[i] = ags_complex_alloc(); sync_point[i][0][0] = gtk_spin_button_get_value(oscillator->sync_point[2 * i]); sync_point[i][0][1] = gtk_spin_button_get_value(oscillator->sync_point[2 * i + 1]); } }else{ sync_point = NULL; sync_point_count = NULL; } g_object_set(apply_synth, "base-note", synth->lower->adjustment->value, "do-sync", do_sync, "sync-point", sync_point, "sync-point-count", sync_point_count, NULL); apply_synth = ags_apply_synth_new(channel, output_lines, wave, attack % channel->buffer_size, frame_count, frequency, phase, start_frequency, volume, loop_start, loop_end); g_object_set(apply_synth, "delay", (gdouble) attack / channel->buffer_size, NULL); task = g_list_prepend(task, apply_synth); input_pad = input_pad->next; } g_list_free(input_pad_start); ags_gui_thread_schedule_task_list(gui_thread, g_list_reverse(task)); } /** * ags_synth_new: * @soundcard: the assigned soundcard. * * Creates an #AgsSynth * * Returns: a new #AgsSynth * * Since: 1.0.0 */ AgsSynth* ags_synth_new(GObject *soundcard) { AgsSynth *synth; synth = (AgsSynth *) g_object_new(AGS_TYPE_SYNTH, NULL); g_object_set(G_OBJECT(AGS_MACHINE(synth)->audio), "soundcard", soundcard, NULL); return(synth); } gsequencer-1.4.24/ags/X/machine/ags_synth_input_line_callbacks.c0000644000175000017500000000230313246707333021647 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_synth_input_line_oscillator_control_changed_callback(AgsOscillator *oscillator, AgsSynthInputLine *synth_input_line) { AgsSynth *synth; synth = (AgsSynth *) gtk_widget_get_ancestor((GtkWidget *) synth_input_line, AGS_TYPE_SYNTH); if((AGS_SYNTH_AUTO_UPDATE & (synth->flags)) != 0){ ags_synth_update(synth); } } gsequencer-1.4.24/ags/X/machine/ags_drum.c0000644000175000017500000006064613247044247015241 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_drum_class_init(AgsDrumClass *drum); void ags_drum_connectable_interface_init(AgsConnectableInterface *connectable); void ags_drum_plugin_interface_init(AgsPluginInterface *plugin); void ags_drum_init(AgsDrum *drum); void ags_drum_finalize(GObject *gobject); void ags_drum_connect(AgsConnectable *connectable); void ags_drum_disconnect(AgsConnectable *connectable); void ags_drum_show(GtkWidget *widget); void ags_drum_show_all(GtkWidget *widget); void ags_drum_map_recall(AgsMachine *machine); gchar* ags_drum_get_name(AgsPlugin *plugin); void ags_drum_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_drum_get_xml_type(AgsPlugin *plugin); void ags_drum_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_drum_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_drum_launch_task(AgsFileLaunch *file_launch, AgsDrum *drum); xmlNode* ags_drum_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_drum_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_drum_resize_pads(AgsDrum *drum, GType gtype, guint pads, guint pads_old, gpointer data); /** * SECTION:ags_drum * @short_description: drum sequencer * @title: AgsDrum * @section_id: * @include: ags/X/machine/ags_drum.h * * The #AgsDrum is a composite widget to act as drum sequencer. */ static gpointer ags_drum_parent_class = NULL; static AgsConnectableInterface *ags_drum_parent_connectable_interface; GType ags_drum_get_type(void) { static GType ags_type_drum = 0; if(!ags_type_drum){ static const GTypeInfo ags_drum_info = { sizeof(AgsDrumClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_drum_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsDrum), 0, /* n_preallocs */ (GInstanceInitFunc) ags_drum_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_drum_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_drum_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_drum = g_type_register_static(AGS_TYPE_MACHINE, "AgsDrum", &ags_drum_info, 0); g_type_add_interface_static(ags_type_drum, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_drum, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_drum); } void ags_drum_class_init(AgsDrumClass *drum) { GObjectClass *gobject; GtkWidgetClass *widget; AgsMachineClass *machine; ags_drum_parent_class = g_type_class_peek_parent(drum); /* GObjectClass */ gobject = (GObjectClass *) drum; gobject->finalize = ags_drum_finalize; /* GtkWidget */ widget = (GtkWidgetClass *) drum; widget->show = ags_drum_show; widget->show_all = ags_drum_show_all; /* */ machine = (AgsMachineClass *) drum; machine->map_recall = ags_drum_map_recall; } void ags_drum_connectable_interface_init(AgsConnectableInterface *connectable) { ags_drum_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_drum_connect; connectable->disconnect = ags_drum_disconnect; } void ags_drum_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_drum_get_name; plugin->set_name = ags_drum_set_name; plugin->get_xml_type = ags_drum_get_xml_type; plugin->set_xml_type = ags_drum_set_xml_type; plugin->read = ags_drum_read; plugin->write = ags_drum_write; } void ags_drum_init(AgsDrum *drum) { GtkVBox *vbox; GtkHBox *hbox; GtkToggleButton *toggle_button; GtkFrame *frame; GtkTable *table0, *table1; GtkRadioButton *radio_button; AgsAudio *audio; GList *list; gchar *str; guint stream_length; int i, j; g_signal_connect_after((GObject *) drum, "parent_set", G_CALLBACK(ags_drum_parent_set_callback), (gpointer) drum); audio = AGS_MACHINE(drum)->audio; audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_TAKES_FILE | AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_HAS_PATTERN | AGS_AUDIO_NOTATION_DEFAULT | AGS_AUDIO_PATTERN_MODE | AGS_AUDIO_REVERSE_MAPPING); g_object_set(audio, "audio-start-mapping", 0, "audio-end-mapping", 128, "midi-start-mapping", 0, "midi-end-mapping", 128, NULL); audio->bank_dim[0] = 4; audio->bank_dim[1] = 12; audio->bank_dim[2] = 64; AGS_MACHINE(drum)->flags |= (AGS_MACHINE_IS_SEQUENCER | AGS_MACHINE_TAKES_FILE_INPUT); AGS_MACHINE(drum)->file_input_flags |= (AGS_MACHINE_ACCEPT_WAV); AGS_MACHINE(drum)->input_pad_type = AGS_TYPE_DRUM_INPUT_PAD; AGS_MACHINE(drum)->input_line_type = AGS_TYPE_DRUM_INPUT_LINE; AGS_MACHINE(drum)->output_pad_type = AGS_TYPE_DRUM_OUTPUT_PAD; AGS_MACHINE(drum)->output_line_type = AGS_TYPE_DRUM_OUTPUT_LINE; /* context menu */ ags_machine_popup_add_edit_options((AgsMachine *) drum, (AGS_MACHINE_POPUP_COPY_PATTERN | AGS_MACHINE_POPUP_ENVELOPE)); ags_machine_popup_add_connection_options(drum, (AGS_MACHINE_POPUP_MIDI_DIALOG)); /* audio resize */ g_signal_connect_after(G_OBJECT(drum), "resize-pads", G_CALLBACK(ags_drum_resize_pads), NULL); /* flags, name and xml type */ drum->flags = 0; drum->name = NULL; drum->xml_type = "ags-drum"; /* create widgets */ drum->vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer*) gtk_bin_get_child((GtkBin *) drum), (GtkWidget *) drum->vbox); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) drum->vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); /* input pad */ drum->input_pad = (GtkHBox *) gtk_hbox_new(FALSE, 0); AGS_MACHINE(drum)->input = (GtkContainer *) drum->input_pad; gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) drum->input_pad, FALSE, FALSE, 0); /* output pad */ drum->output_pad = (GtkVBox *) gtk_vbox_new(FALSE, 0); AGS_MACHINE(drum)->output = (GtkContainer *) drum->output_pad; gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) drum->output_pad, FALSE, FALSE, 0); /* */ drum->selected_pad = NULL; drum->selected_edit_button = NULL; /* */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) drum->vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); frame = (GtkFrame *) gtk_frame_new(i18n("kit")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) frame, FALSE, FALSE, 0); vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer*) frame, (GtkWidget *) vbox); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) gtk_label_new(i18n("default")), FALSE, FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) (drum->open = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_OPEN)), FALSE, FALSE, 0); drum->open_dialog = NULL; /* sequencer */ frame = (GtkFrame *) gtk_frame_new(i18n("pattern")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) frame, FALSE, FALSE, 0); table0 = (GtkTable *) gtk_table_new(8, 4, FALSE); gtk_container_add((GtkContainer*) frame, (GtkWidget *) table0); drum->loop_button = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("loop")); gtk_table_attach_defaults(table0, (GtkWidget *) drum->loop_button, 0, 1, 2, 3); AGS_MACHINE(drum)->play = drum->run = (GtkToggleButton *) gtk_toggle_button_new_with_label(i18n("run")); gtk_table_attach_defaults(table0, (GtkWidget *) drum->run, 1, 2, 0, 3); /* bank 1 */ table1 = (GtkTable *) gtk_table_new(3, 5, TRUE); gtk_table_attach_defaults(table0, (GtkWidget *) table1, 2, 3, 0, 3); drum->selected1 = NULL; for(i = 0; i < 3; i++){ for(j = 0; j < 4; j++){ str = g_strdup_printf("%d", (4 * i) + (j + 1)); drum->index1[4 * i + j] = (GtkToggleButton *) gtk_toggle_button_new_with_label(str); gtk_table_attach_defaults(table1, (GtkWidget *) (drum->index1[4 * i + j]), j, j + 1, i, i + 1); g_free(str); } } /* bank 0 */ drum->selected1 = drum->index1[0]; gtk_toggle_button_set_active(drum->index1[0], TRUE); drum->selected0 = NULL; for(j = 0; j < 4; j++){ str = g_strdup_printf("%c", 'a' + j); drum->index0[j] = (GtkToggleButton *) gtk_toggle_button_new_with_label(str); gtk_table_attach_defaults(table1, (GtkWidget *) (drum->index0[j]), j, j + 1, 4, 5); g_free(str); } drum->selected0 = drum->index0[0]; gtk_toggle_button_set_active(drum->index0[0], TRUE); /* duration */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_table_attach(table0, (GtkWidget *) hbox, 6, 7, 0, 1, GTK_EXPAND, GTK_EXPAND, 0, 0); gtk_box_pack_start((GtkBox*) hbox, gtk_label_new(i18n("length")), FALSE, FALSE, 0); drum->length_spin = (GtkSpinButton *) gtk_spin_button_new_with_range(1.0, 64.0, 1.0); drum->length_spin->adjustment->value = 16.0; gtk_box_pack_start((GtkBox*) hbox, (GtkWidget *) drum->length_spin, FALSE, FALSE, 0); /* pattern box */ drum->pattern_box = ags_pattern_box_new(); gtk_table_attach(table0, (GtkWidget *) drum->pattern_box, 7, 8, 0, 3, GTK_EXPAND, GTK_EXPAND, 0, 0); } void ags_drum_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_drum_parent_class)->finalize(gobject); } void ags_drum_connect(AgsConnectable *connectable) { AgsDrum *drum; int i; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } drum = AGS_DRUM(connectable); /* call parent */ ags_drum_parent_connectable_interface->connect(connectable); /* GtkObject */ g_signal_connect((GObject *) drum, "destroy", G_CALLBACK(ags_drum_destroy_callback), (gpointer) drum); /* AgsDrum */ g_signal_connect((GObject *) drum->open, "clicked", G_CALLBACK(ags_drum_open_callback), (gpointer) drum); g_signal_connect((GObject *) drum->loop_button, "clicked", G_CALLBACK(ags_drum_loop_button_callback), (gpointer) drum); g_signal_connect_after((GObject *) drum->length_spin, "value-changed", G_CALLBACK(ags_drum_length_spin_callback), (gpointer) drum); for(i = 0; i < 12; i++){ g_signal_connect(G_OBJECT(drum->index1[i]), "clicked", G_CALLBACK(ags_drum_index1_callback), (gpointer) drum); } for(i = 0; i < 4; i++){ g_signal_connect(G_OBJECT(drum->index0[i]), "clicked", G_CALLBACK(ags_drum_index0_callback), (gpointer) drum); } ags_connectable_connect(AGS_CONNECTABLE(drum->pattern_box)); /* AgsMachine */ g_signal_connect_after(G_OBJECT(drum), "done", G_CALLBACK(ags_drum_done_callback), NULL); } void ags_drum_disconnect(AgsConnectable *connectable) { AgsDrum *drum; int i; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } drum = AGS_DRUM(connectable); /* GtkObject */ g_object_disconnect((GObject *) drum, "any_signal::destroy", G_CALLBACK(ags_drum_destroy_callback), (gpointer) drum, NULL); /* AgsDrum */ g_object_disconnect((GObject *) drum->open, "any_signal::clicked", G_CALLBACK(ags_drum_open_callback), (gpointer) drum, NULL); g_object_disconnect((GObject *) drum->loop_button, "any_signal::clicked", G_CALLBACK(ags_drum_loop_button_callback), (gpointer) drum, NULL); g_object_disconnect((GObject *) drum->length_spin, "any_signal::value-changed", G_CALLBACK(ags_drum_length_spin_callback), (gpointer) drum, NULL); for(i = 0; i < 12; i++){ g_object_disconnect(G_OBJECT(drum->index1[i]), "any_signal::clicked", G_CALLBACK(ags_drum_index1_callback), (gpointer) drum, NULL); } for(i = 0; i < 4; i++){ g_object_disconnect(G_OBJECT(drum->index0[i]), "any_signal::clicked", G_CALLBACK(ags_drum_index0_callback), (gpointer) drum, NULL); } ags_connectable_disconnect(AGS_CONNECTABLE(drum->pattern_box)); /* AgsAudio */ g_object_disconnect(G_OBJECT(drum), "any_signal::done", G_CALLBACK(ags_drum_done_callback), NULL, NULL); /* call parent */ ags_drum_parent_connectable_interface->disconnect(connectable); } void ags_drum_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_drum_parent_class)->show(widget); ags_pattern_box_set_pattern(AGS_DRUM(widget)->pattern_box); } void ags_drum_show_all(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_drum_parent_class)->show_all(widget); ags_pattern_box_set_pattern(AGS_DRUM(widget)->pattern_box); } void ags_drum_map_recall(AgsMachine *machine) { AgsWindow *window; AgsAudio *audio; AgsDelayAudio *play_delay_audio; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsCopyPatternAudio *recall_copy_pattern_audio; AgsCopyPatternAudioRun *recall_copy_pattern_audio_run; AgsRecordMidiAudio *recall_record_midi_audio; AgsRecordMidiAudioRun *recall_record_midi_audio_run; AgsPlayNotationAudio *recall_notation_audio; AgsPlayNotationAudioRun *recall_notation_audio_run; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* ags-delay */ ags_recall_factory_create(audio, NULL, NULL, "ags-delay", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(list != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(list->data); // AGS_RECALL(play_delay_audio_run)->flags |= AGS_RECALL_PERSISTENT; }else{ play_delay_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run", play_delay_audio_run, NULL); ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run), window->navigation->position_tact->adjustment->value, TRUE); }else{ play_count_beats_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-copy-pattern */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy-pattern", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_REMAP | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_COPY_PATTERN_AUDIO_RUN); if(list != NULL){ recall_copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_copy_pattern_audio_run), "delay-audio-run", play_delay_audio_run, "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* ags-record-midi */ ags_recall_factory_create(audio, NULL, NULL, "ags-record-midi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_RECORD_MIDI_AUDIO_RUN); if(list != NULL){ recall_record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* ags-play-notation */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-notation", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_PLAY_NOTATION_AUDIO_RUN); if(list != NULL){ recall_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* call parent */ AGS_MACHINE_CLASS(ags_drum_parent_class)->map_recall(machine); } gchar* ags_drum_get_name(AgsPlugin *plugin) { return(AGS_DRUM(plugin)->name); } void ags_drum_set_name(AgsPlugin *plugin, gchar *name) { AGS_DRUM(plugin)->name = name; } gchar* ags_drum_get_xml_type(AgsPlugin *plugin) { return(AGS_DRUM(plugin)->xml_type); } void ags_drum_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_DRUM(plugin)->xml_type = xml_type; } void ags_drum_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsDrum *gobject; AgsFileLookup *file_lookup; AgsFileLaunch *file_launch; GList *list; gobject = AGS_DRUM(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); list = file->lookup; while((list = ags_file_lookup_find_by_node(list, node->parent)) != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); if(g_signal_handler_find(list->data, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, ags_file_read_machine_resolve_audio, NULL) != 0){ g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_drum_read_resolve_audio), gobject); break; } list = list->next; } /* */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, "file", file, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_drum_launch_task), gobject); ags_file_add_launch(file, (GObject *) file_launch); } void ags_drum_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine) { g_signal_connect_after(G_OBJECT(machine), "resize-pads", G_CALLBACK(ags_drum_resize_pads), NULL); } void ags_drum_launch_task(AgsFileLaunch *file_launch, AgsDrum *drum) { xmlNode *node; guint64 length, index; node = file_launch->node; /* length */ length = (gdouble) g_ascii_strtod(xmlGetProp(node, "length"), NULL); gtk_spin_button_set_value(drum->length_spin, length); /* loop */ if(!g_strcmp0(xmlGetProp(node, "loop"), AGS_FILE_TRUE)){ gtk_button_clicked((GtkButton *) drum->loop_button); } /* index */ index = g_ascii_strtoull(xmlGetProp(node, "bank-index-0"), NULL, 10); if(index != 0){ gtk_button_clicked((GtkButton *) drum->index0[index]); } index = g_ascii_strtoull(xmlGetProp(node, "bank-index-1"), NULL, 10); if(index != 0){ gtk_button_clicked((GtkButton *) drum->index1[index]); } } xmlNode* ags_drum_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsDrum *drum; xmlNode *node; GList *list; gchar *id; guint i; drum = AGS_DRUM(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-drum"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", drum, NULL)); xmlNewProp(node, "length", g_strdup_printf("%d", (gint) gtk_spin_button_get_value(drum->length_spin))); for(i = 0; drum->selected0 != drum->index0[i]; i++); xmlNewProp(node, "bank-index-0", g_strdup_printf("%d", i)); for(i = 0; drum->selected1 != drum->index1[i]; i++); xmlNewProp(node, "bank-index-1", g_strdup_printf("%d", i)); xmlNewProp(node, "loop", g_strdup_printf("%s", ((gtk_toggle_button_get_active((GtkToggleButton *) drum->loop_button)) ? AGS_FILE_TRUE: AGS_FILE_FALSE))); xmlAddChild(parent, node); return(node); } void ags_drum_resize_pads(AgsDrum *drum, GType gtype, guint pads, guint pads_old, gpointer data) { if(gtype == AGS_TYPE_INPUT){ AgsDrumInputPad *drum_input_pad; if(pads_old < pads){ /* reset edit button */ if(pads_old == 0){ GtkToggleButton *selected_edit_button; drum->selected_pad = AGS_DRUM_INPUT_PAD(gtk_container_get_children((GtkContainer *) drum->input_pad)->data); AGS_MACHINE(drum)->selected_input_pad = (GtkWidget *) drum->selected_pad; drum->selected_edit_button = drum->selected_pad->edit; gtk_toggle_button_set_active((GtkToggleButton *) drum->selected_edit_button, TRUE); } }else{ /* destroy AgsPad's */ if(pads == 0){ drum->selected_pad = NULL; drum->selected_edit_button = NULL; }else{ drum_input_pad = AGS_DRUM_INPUT_PAD(gtk_widget_get_ancestor(GTK_WIDGET(drum->selected_edit_button), AGS_TYPE_PAD)); if(drum_input_pad->pad.channel->pad > pads){ drum->selected_pad = AGS_DRUM_INPUT_PAD(gtk_container_get_children((GtkContainer *) drum->input_pad)->data); AGS_MACHINE(drum)->selected_input_pad = (GtkWidget *) drum->selected_pad; drum->selected_edit_button = drum->selected_pad->edit; gtk_toggle_button_set_active((GtkToggleButton *) drum->selected_edit_button, TRUE); } } } } } /** * ags_drum_new: * @soundcard: the assigned soundcard. * * Creates an #AgsDrum * * Returns: a new #AgsDrum * * Since: 1.0.0 */ AgsDrum* ags_drum_new(GObject *soundcard) { AgsDrum *drum; drum = (AgsDrum *) g_object_new(AGS_TYPE_DRUM, NULL); g_object_set(G_OBJECT(AGS_MACHINE(drum)->audio), "soundcard", soundcard, NULL); return(drum); } gsequencer-1.4.24/ags/X/machine/ags_lv2_bridge.c0000644000175000017500000015240413247044247016303 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_lv2_bridge_class_init(AgsLv2BridgeClass *lv2_bridge); void ags_lv2_bridge_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_bridge_plugin_interface_init(AgsPluginInterface *plugin); void ags_lv2_bridge_init(AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_lv2_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_lv2_bridge_finalize(GObject *gobject); void ags_lv2_bridge_connect(AgsConnectable *connectable); void ags_lv2_bridge_disconnect(AgsConnectable *connectable); gchar* ags_lv2_bridge_get_version(AgsPlugin *plugin); void ags_lv2_bridge_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_lv2_bridge_get_build_id(AgsPlugin *plugin); void ags_lv2_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id); gchar* ags_lv2_bridge_get_xml_type(AgsPlugin *plugin); void ags_lv2_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_lv2_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_lv2_bridge_launch_task(AgsFileLaunch *file_launch, AgsLv2Bridge *lv2_bridge); xmlNode* ags_lv2_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_lv2_bridge_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_lv2_bridge_resize_pads(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, gpointer data); void ags_lv2_bridge_map_recall(AgsMachine *machine); /** * SECTION:ags_lv2_bridge * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsLv2Bridge * @section_id: * @include: ags/X/ags_lv2_bridge.h * * #AgsLv2Bridge is a composite widget to visualize all #AgsChannel. It should be * packed by an #AgsMachine. */ enum{ PROP_0, PROP_FILENAME, PROP_EFFECT, PROP_URI, PROP_INDEX, PROP_HAS_MIDI, PROP_HAS_GUI, PROP_GUI_FILENAME, PROP_GUI_URI, }; static gpointer ags_lv2_bridge_parent_class = NULL; static AgsConnectableInterface* ags_lv2_bridge_parent_connectable_interface; static AgsPluginInterface* ags_lv2_bridge_parent_plugin_interface; GHashTable *ags_lv2_bridge_lv2ui_handle = NULL; GHashTable *ags_lv2_bridge_lv2ui_idle = NULL; GType ags_lv2_bridge_get_type(void) { static GType ags_type_lv2_bridge = 0; if(!ags_type_lv2_bridge){ static const GTypeInfo ags_lv2_bridge_info = { sizeof(AgsLv2BridgeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_bridge_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsLv2Bridge), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_bridge_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_bridge_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_lv2_bridge_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_bridge = g_type_register_static(AGS_TYPE_MACHINE, "AgsLv2Bridge", &ags_lv2_bridge_info, 0); g_type_add_interface_static(ags_type_lv2_bridge, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_lv2_bridge, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_lv2_bridge); } void ags_lv2_bridge_class_init(AgsLv2BridgeClass *lv2_bridge) { AgsMachineClass *machine; GObjectClass *gobject; GParamSpec *param_spec; ags_lv2_bridge_parent_class = g_type_class_peek_parent(lv2_bridge); /* GObjectClass */ gobject = G_OBJECT_CLASS(lv2_bridge); gobject->set_property = ags_lv2_bridge_set_property; gobject->get_property = ags_lv2_bridge_get_property; gobject->finalize = ags_lv2_bridge_finalize; /* properties */ /** * AgsRecallLv2:filename: * * The plugin's filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the object file"), i18n_pspec("The filename as string of object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsRecallLv2:effect: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsRecallLv2:uri: * * The uri's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("uri", i18n_pspec("the uri"), i18n_pspec("The uri's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_URI, param_spec); /** * AgsRecallLv2:index: * * The uri's index. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("index", i18n_pspec("index of uri"), i18n_pspec("The numerical index of uri"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); /** * AgsRecallLv2:has-midi: * * If has-midi is set to %TRUE appropriate flag is set * to audio in order to become a sequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("has-midi", i18n_pspec("has-midi"), i18n_pspec("If effect has-midi"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_HAS_MIDI, param_spec); /** * AgsRecallLv2:has-gui: * * If has-gui is set to %TRUE 128 inputs are allocated and appropriate flag is set * to audio in order to become a sequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("has-gui", i18n_pspec("has-gui"), i18n_pspec("If effect has-gui"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_HAS_GUI, param_spec); /** * AgsRecallLv2:gui-filename: * * The plugin's GUI filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("gui-filename", i18n_pspec("the GUI object file"), i18n_pspec("The filename as string of GUI object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_GUI_FILENAME, param_spec); /** * AgsRecallLv2:gui-uri: * * The GUI's uri name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("gui-uri", i18n_pspec("the gui-uri"), i18n_pspec("The gui-uri's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_GUI_URI, param_spec); /* AgsMachine */ machine = (AgsMachineClass *) lv2_bridge; machine->map_recall = ags_lv2_bridge_map_recall; } void ags_lv2_bridge_connectable_interface_init(AgsConnectableInterface *connectable) { ags_lv2_bridge_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_lv2_bridge_connect; connectable->disconnect = ags_lv2_bridge_disconnect; } void ags_lv2_bridge_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_lv2_bridge_get_version; plugin->set_version = ags_lv2_bridge_set_version; plugin->get_build_id = ags_lv2_bridge_get_build_id; plugin->set_build_id = ags_lv2_bridge_set_build_id; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_lv2_bridge_init(AgsLv2Bridge *lv2_bridge) { GtkTable *table; GtkImageMenuItem *item; AgsAudio *audio; g_signal_connect_after((GObject *) lv2_bridge, "parent-set", G_CALLBACK(ags_lv2_bridge_parent_set_callback), (gpointer) lv2_bridge); if(ags_lv2_bridge_lv2ui_handle == NULL){ ags_lv2_bridge_lv2ui_handle = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } if(ags_lv2_bridge_lv2ui_idle == NULL){ ags_lv2_bridge_lv2ui_idle = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } audio = AGS_MACHINE(lv2_bridge)->audio; audio->flags |= (AGS_AUDIO_SYNC); g_signal_connect_after(G_OBJECT(lv2_bridge), "resize-audio-channels", G_CALLBACK(ags_lv2_bridge_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(lv2_bridge), "resize-pads", G_CALLBACK(ags_lv2_bridge_resize_pads), NULL); lv2_bridge->flags = 0; lv2_bridge->name = NULL; lv2_bridge->version = AGS_LV2_BRIDGE_DEFAULT_VERSION; lv2_bridge->build_id = AGS_LV2_BRIDGE_DEFAULT_BUILD_ID; lv2_bridge->xml_type = "ags-lv2-bridge"; lv2_bridge->mapped_output_pad = 0; lv2_bridge->mapped_input_pad = 0; lv2_bridge->filename = NULL; lv2_bridge->effect = NULL; lv2_bridge->uri = NULL; lv2_bridge->uri_index = 0; lv2_bridge->has_midi = FALSE; lv2_bridge->vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer *) gtk_bin_get_child((GtkBin *) lv2_bridge), (GtkWidget *) lv2_bridge->vbox); lv2_bridge->lv2_descriptor = NULL; lv2_bridge->lv2_handle = NULL; lv2_bridge->port_value = NULL; lv2_bridge->program = NULL; lv2_bridge->preset = NULL; /* effect bridge */ AGS_MACHINE(lv2_bridge)->bridge = (GtkContainer *) ags_effect_bridge_new(audio); gtk_box_pack_start((GtkBox *) lv2_bridge->vbox, (GtkWidget *) AGS_MACHINE(lv2_bridge)->bridge, FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(1, 2, FALSE); gtk_box_pack_start((GtkBox *) AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge), (GtkWidget *) table, FALSE, FALSE, 0); AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge)->bulk_input = (GtkWidget *) ags_effect_bulk_new(audio, AGS_TYPE_INPUT); AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge)->bulk_input)->flags |= (AGS_EFFECT_BULK_HIDE_BUTTONS | AGS_EFFECT_BULK_HIDE_ENTRIES | AGS_EFFECT_BULK_SHOW_LABELS); gtk_table_attach(table, (GtkWidget *) AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge)->bulk_input, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); lv2_bridge->has_gui = FALSE; lv2_bridge->gui_filename = NULL; lv2_bridge->gui_uri = NULL; lv2_bridge->ui_handle = NULL; lv2_bridge->lv2_gui = NULL; /* lv2 menu */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("Lv2"); gtk_menu_shell_append((GtkMenuShell *) AGS_MACHINE(lv2_bridge)->popup, (GtkWidget *) item); gtk_widget_show((GtkWidget *) item); lv2_bridge->lv2_menu = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem *) item, (GtkWidget *) lv2_bridge->lv2_menu); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("show GUI")); gtk_menu_shell_append((GtkMenuShell *) lv2_bridge->lv2_menu, (GtkWidget *) item); gtk_widget_show_all((GtkWidget *) lv2_bridge->lv2_menu); } void ags_lv2_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLv2Bridge *lv2_bridge; lv2_bridge = AGS_LV2_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(filename == lv2_bridge->filename){ return; } if(lv2_bridge->filename != NULL){ g_free(lv2_bridge->filename); } if(filename != NULL){ if(!g_file_test(filename, G_FILE_TEST_EXISTS)){ AgsWindow *window; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) lv2_bridge); ags_window_show_error(window, g_strdup_printf("Plugin file not present %s", filename)); } } lv2_bridge->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == lv2_bridge->effect){ return; } if(lv2_bridge->effect != NULL){ g_free(lv2_bridge->effect); } lv2_bridge->effect = g_strdup(effect); } break; case PROP_URI: { gchar *uri; uri = g_value_get_string(value); if(uri == lv2_bridge->uri){ return; } if(lv2_bridge->uri != NULL){ g_free(lv2_bridge->uri); } lv2_bridge->uri = g_strdup(uri); } break; case PROP_INDEX: { unsigned long uri_index; uri_index = g_value_get_ulong(value); if(uri_index == lv2_bridge->uri_index){ return; } lv2_bridge->uri_index = uri_index; } break; case PROP_HAS_MIDI: { gboolean has_midi; has_midi = g_value_get_boolean(value); if(lv2_bridge->has_midi == has_midi){ return; } lv2_bridge->has_midi = has_midi; } break; case PROP_HAS_GUI: { GtkWindow *window; gboolean has_gui; has_gui = g_value_get_boolean(value); if(lv2_bridge->has_gui == has_gui){ return; } lv2_bridge->has_gui = has_gui; } break; case PROP_GUI_FILENAME: { GtkWindow *window; gchar *gui_filename; gui_filename = g_value_get_string(value); if(lv2_bridge->gui_filename == gui_filename){ return; } lv2_bridge->gui_filename = g_strdup(gui_filename); } break; case PROP_GUI_URI: { gchar *gui_uri; gui_uri = g_value_get_string(value); if(gui_uri == lv2_bridge->gui_uri){ return; } if(lv2_bridge->gui_uri != NULL){ g_free(lv2_bridge->gui_uri); } lv2_bridge->gui_uri = g_strdup(gui_uri); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLv2Bridge *lv2_bridge; lv2_bridge = AGS_LV2_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, lv2_bridge->filename); } break; case PROP_EFFECT: { g_value_set_string(value, lv2_bridge->effect); } break; case PROP_URI: { g_value_set_string(value, lv2_bridge->uri); } break; case PROP_INDEX: { g_value_set_ulong(value, lv2_bridge->uri_index); } break; case PROP_HAS_MIDI: { g_value_set_boolean(value, lv2_bridge->has_midi); } break; case PROP_HAS_GUI: { g_value_set_boolean(value, lv2_bridge->has_gui); } break; case PROP_GUI_FILENAME: { g_value_set_string(value, lv2_bridge->gui_filename); } break; case PROP_GUI_URI: { g_value_set_string(value, lv2_bridge->gui_uri); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_lv2_bridge_finalize(GObject *gobject) { AgsLv2Bridge *lv2_bridge; lv2_bridge = AGS_LV2_BRIDGE(gobject); if(lv2_bridge->ui_handle != NULL){ lv2_bridge->ui_descriptor->cleanup(lv2_bridge->ui_handle); g_hash_table_remove(ags_lv2_bridge_lv2ui_handle, lv2_bridge->ui_handle); g_hash_table_remove(ags_lv2_bridge_lv2ui_idle, lv2_bridge->ui_handle); } G_OBJECT_CLASS(ags_lv2_bridge_parent_class)->finalize(gobject); } void ags_lv2_bridge_connect(AgsConnectable *connectable) { AgsLv2Bridge *lv2_bridge; AgsEffectBridge *effect_bridge; AgsBulkMember *bulk_member; GtkWidget *control; GList *list, *list_start; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_lv2_bridge_parent_connectable_interface->connect(connectable); lv2_bridge = AGS_LV2_BRIDGE(connectable); /* menu */ list = list_start = gtk_container_get_children((GtkContainer *) lv2_bridge->lv2_menu); g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_lv2_bridge_show_gui_callback), lv2_bridge); g_list_free(list_start); /* program */ if(lv2_bridge->program != NULL){ g_signal_connect_after(G_OBJECT(lv2_bridge->program), "changed", G_CALLBACK(ags_lv2_bridge_program_changed_callback), lv2_bridge); } /* bulk member */ effect_bridge = AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge); list = list_start = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(effect_bridge->bulk_input)->table); while(list != NULL){ bulk_member = list->data; control = gtk_bin_get_child(GTK_BIN(bulk_member)); if(bulk_member->widget_type == AGS_TYPE_DIAL){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_lv2_bridge_dial_changed_callback), lv2_bridge); }else if(bulk_member->widget_type == GTK_TYPE_VSCALE){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_lv2_bridge_vscale_changed_callback), lv2_bridge); }else if(bulk_member->widget_type == GTK_TYPE_HSCALE){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_lv2_bridge_hscale_changed_callback), lv2_bridge); }else if(bulk_member->widget_type == GTK_TYPE_SPIN_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_lv2_bridge_spin_button_changed_callback), lv2_bridge); }else if(bulk_member->widget_type == GTK_TYPE_CHECK_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "clicked", G_CALLBACK(ags_lv2_bridge_check_button_clicked_callback), lv2_bridge); }else if(bulk_member->widget_type == GTK_TYPE_TOGGLE_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "clicked", G_CALLBACK(ags_lv2_bridge_toggle_button_clicked_callback), lv2_bridge); }else if(bulk_member->widget_type == GTK_TYPE_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "clicked", G_CALLBACK(ags_lv2_bridge_button_clicked_callback), lv2_bridge); } list = list->next; } g_list_free(list_start); } void ags_lv2_bridge_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } gchar* ags_lv2_bridge_get_version(AgsPlugin *plugin) { return(AGS_LV2_BRIDGE(plugin)->version); } void ags_lv2_bridge_set_version(AgsPlugin *plugin, gchar *version) { AgsLv2Bridge *lv2_bridge; lv2_bridge = AGS_LV2_BRIDGE(plugin); lv2_bridge->version = version; } gchar* ags_lv2_bridge_get_build_id(AgsPlugin *plugin) { return(AGS_LV2_BRIDGE(plugin)->build_id); } void ags_lv2_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsLv2Bridge *lv2_bridge; lv2_bridge = AGS_LV2_BRIDGE(plugin); lv2_bridge->build_id = build_id; } gchar* ags_lv2_bridge_get_xml_type(AgsPlugin *plugin) { return(AGS_LV2_BRIDGE(plugin)->xml_type); } void ags_lv2_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_LV2_BRIDGE(plugin)->xml_type = xml_type; } void ags_lv2_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsLv2Bridge *gobject; AgsFileLaunch *file_launch; gobject = AGS_LV2_BRIDGE(plugin); g_object_set(gobject, "filename", xmlGetProp(node, "filename"), "effect", xmlGetProp(node, "effect"), NULL); /* launch */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_lv2_bridge_launch_task), gobject); ags_file_add_launch(file, G_OBJECT(file_launch)); } void ags_lv2_bridge_launch_task(AgsFileLaunch *file_launch, AgsLv2Bridge *lv2_bridge) { GtkTreeModel *model; GtkTreeIter iter; GList *list, *list_start; GList *recall; ags_lv2_bridge_load(lv2_bridge); /* block update bulk port */ list_start = list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge)->bulk_input)->table); while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ AGS_BULK_MEMBER(list->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; } list = list->next; } /* update value and unblock update bulk port */ recall = NULL; if(AGS_MACHINE(lv2_bridge)->audio->input != NULL){ recall = AGS_MACHINE(lv2_bridge)->audio->input->recall; while((recall = ags_recall_template_find_type(recall, AGS_TYPE_RECALL_LV2)) != NULL){ if(!g_strcmp0(AGS_RECALL_LV2(recall->data)->filename, lv2_bridge->filename) && !g_strcmp0(AGS_RECALL_LV2(recall->data)->effect, lv2_bridge->effect)){ break; } recall = recall->next; } } while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ GtkWidget *child_widget; GList *port; child_widget = gtk_bin_get_child(list->data); if(recall != NULL){ port = AGS_RECALL(recall->data)->port; while(port != port->next){ if(!g_strcmp0(AGS_BULK_MEMBER(list->data)->specifier, AGS_PORT(port->data)->specifier)){ if(AGS_IS_DIAL(child_widget)){ gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, AGS_PORT(port->data)->port_value.ags_port_ladspa); ags_dial_draw((AgsDial *) child_widget); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, ((AGS_PORT(port->data)->port_value.ags_port_ladspa != 0.0) ? TRUE: FALSE)); } break; } port = port->next; } } AGS_BULK_MEMBER(list->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); } list = list->next; } g_list_free(list_start); } xmlNode* ags_lv2_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsLv2Bridge *lv2_bridge; xmlNode *node; gchar *id; lv2_bridge = AGS_LV2_BRIDGE(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-lv2-bridge"); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, "filename", lv2_bridge->filename); xmlNewProp(node, "effect", lv2_bridge->effect); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", lv2_bridge, NULL)); xmlAddChild(parent, node); return(node); } void ags_lv2_bridge_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { AgsLv2Bridge *lv2_bridge; AgsAudio *audio; AgsChannel *output, *input; AgsChannel *channel, *next_pad; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GObject *soundcard; guint output_pads, input_pads; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); lv2_bridge = (AgsLv2Bridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; output_pads = audio->output_pads; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); /* check available */ if(input_pads == 0 && output_pads == 0){ return; } if(audio_channels > audio_channels_old){ /* AgsInput */ channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); channel = ags_channel_nth(channel, audio_channels_old); while(channel != next_pad){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 1); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* AgsOutput */ channel = audio->output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); channel = ags_channel_pad_nth(channel, audio_channels_old); while(channel != next_pad){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 3); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_lv2_bridge_input_map_recall(lv2_bridge, audio_channels_old, 0); ags_lv2_bridge_output_map_recall(lv2_bridge, audio_channels_old, 0); } } } void ags_lv2_bridge_resize_pads(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, gpointer data) { AgsLv2Bridge *lv2_bridge; AgsAudio *audio; AgsChannel *output, *input; AgsChannel *channel; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GObject *soundcard; guint audio_channels; gboolean grow; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); lv2_bridge = (AgsLv2Bridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* check available */ if(pads == pads_old || audio->audio_channels == 0){ return; } if(pads_old < pads){ grow = TRUE; }else{ grow = FALSE; } if(g_type_is_a(channel_type, AGS_TYPE_INPUT)){ if(grow){ /* AgsInput */ channel = ags_channel_pad_nth(input, pads_old); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 1); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_lv2_bridge_input_map_recall(lv2_bridge, 0, pads_old); } }else{ lv2_bridge->mapped_input_pad = pads; } }else{ if(grow){ /* AgsOutput */ channel = ags_channel_pad_nth(output, pads_old); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 3); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_lv2_bridge_output_map_recall(lv2_bridge, 0, pads_old); } }else{ lv2_bridge->mapped_output_pad = pads; } } } void ags_lv2_bridge_map_recall(AgsMachine *machine) { AgsWindow *window; AgsLv2Bridge *lv2_bridge; AgsAudio *audio; AgsDelayAudio *play_delay_audio; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsRecordMidiAudio *recall_record_midi_audio; AgsRecordMidiAudioRun *recall_record_midi_audio_run; AgsPlayNotationAudio *recall_notation_audio; AgsPlayNotationAudioRun *recall_notation_audio_run; AgsRouteLv2Audio *recall_route_lv2_audio; AgsRouteLv2AudioRun *recall_route_lv2_audio_run; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); lv2_bridge = (AgsLv2Bridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* ags-delay */ if((AGS_MACHINE_IS_SYNTHESIZER & (machine->flags)) != 0){ ags_recall_factory_create(audio, NULL, NULL, "ags-delay", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(list != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(list->data); // AGS_RECALL(play_delay_audio_run)->flags |= AGS_RECALL_PERSISTENT; }else{ play_delay_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run", play_delay_audio_run, NULL); ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run), window->navigation->position_tact->adjustment->value, TRUE); }else{ play_count_beats_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-record-midi */ ags_recall_factory_create(audio, NULL, NULL, "ags-record-midi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_RECORD_MIDI_AUDIO_RUN); if(list != NULL){ recall_record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* ags-route-lv2 */ ags_recall_factory_create(audio, NULL, NULL, "ags-route-lv2", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_ROUTE_LV2_AUDIO_RUN); if(list != NULL){ recall_route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_route_lv2_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_route_lv2_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); }else{ recall_route_lv2_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-play-notation */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-notation", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_PLAY_NOTATION_AUDIO_RUN); if(list != NULL){ recall_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); } /* depending on destination */ ags_lv2_bridge_input_map_recall(lv2_bridge, 0, 0); /* add new controls */ ags_effect_bulk_add_effect((AgsEffectBulk *) AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge)->bulk_input, NULL, lv2_bridge->filename, lv2_bridge->effect); /* depending on destination */ ags_lv2_bridge_output_map_recall(lv2_bridge, 0, 0); /* call parent */ AGS_MACHINE_CLASS(ags_lv2_bridge_parent_class)->map_recall(machine); } void ags_lv2_bridge_input_map_recall(AgsLv2Bridge *lv2_bridge, guint audio_channel_start, guint input_pad_start) { AgsAudio *audio; AgsChannel *input; AgsChannel *source, *current; AgsMutexManager *mutex_manager; AgsConfig *config; GList *list; gchar *str; guint input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *current_mutex; if(lv2_bridge->mapped_input_pad > input_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(lv2_bridge)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input = audio->input; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* source */ source = ags_channel_nth(input, audio_channel_start + input_pad_start * audio_channels); if((AGS_MACHINE_IS_SYNTHESIZER & (AGS_MACHINE(lv2_bridge)->flags)) != 0){ /* ags-envelope */ ags_recall_factory_create(audio, NULL, NULL, "ags-envelope", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); current = source; while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(current_mutex); /* play - use note length */ list = ags_recall_template_find_type(current->play, AGS_TYPE_ENVELOPE_CHANNEL); if(list != NULL){ GValue use_note_length_value = {0,}; g_value_init(&use_note_length_value, G_TYPE_BOOLEAN); g_value_set_boolean(&use_note_length_value, TRUE); ags_port_safe_write(AGS_ENVELOPE_CHANNEL(list->data)->use_note_length, &use_note_length_value); } /* recall - use note length */ list = ags_recall_template_find_type(current->recall, AGS_TYPE_ENVELOPE_CHANNEL); if(list != NULL){ GValue use_note_length_value = {0,}; g_value_init(&use_note_length_value, G_TYPE_BOOLEAN); g_value_set_boolean(&use_note_length_value, TRUE); ags_port_safe_write(AGS_ENVELOPE_CHANNEL(list->data)->use_note_length, &use_note_length_value); } current = current->next_pad; pthread_mutex_unlock(current_mutex); } /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); current = current->next_pad; /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* ags-stream */ if(!rt_safe){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); }else{ ags_recall_factory_create(audio, NULL, NULL, "ags-rt-stream", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } } lv2_bridge->mapped_input_pad = input_pads; } void ags_lv2_bridge_output_map_recall(AgsLv2Bridge *lv2_bridge, guint audio_channel_start, guint output_pad_start) { AgsAudio *audio; AgsChannel *input, *current; AgsDelayAudio *recall_delay_audio; AgsCountBeatsAudioRun *recall_count_beats_audio_run; AgsMutexManager *mutex_manager; AgsConfig *config; GList *list; gchar *str; guint output_pads, input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(lv2_bridge->mapped_output_pad > output_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(lv2_bridge)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output_pads = audio->output_pads; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); if((AGS_MACHINE_IS_SYNTHESIZER & (AGS_MACHINE(lv2_bridge)->flags)) != 0){ /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } /* remap for input */ if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", audio_channel_start, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_REMAP), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", audio_channel_start, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_REMAP), 0); } /* */ if(!performance_mode){ /* ags-stream */ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channel_start, audio_channels, output_pad_start, output_pads, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } } lv2_bridge->mapped_output_pad = output_pads; } void ags_lv2_bridge_load_program(AgsLv2Bridge *lv2_bridge) { AgsLv2Plugin *lv2_plugin; LV2_Descriptor *plugin_descriptor; LV2_Programs_Interface *program_interface; lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), lv2_bridge->filename, lv2_bridge->effect); lv2_bridge->lv2_descriptor = plugin_descriptor = AGS_LV2_PLUGIN_DESCRIPTOR(AGS_BASE_PLUGIN(lv2_plugin)->plugin_descriptor); if(plugin_descriptor != NULL && plugin_descriptor->extension_data != NULL && (program_interface = plugin_descriptor->extension_data(LV2_PROGRAMS__Interface)) != NULL){ GtkListStore *model; GtkTreeIter iter; LV2_Program_Descriptor *program_descriptor; uint32_t i; if(lv2_bridge->lv2_handle == NULL){ lv2_bridge->lv2_handle = ags_base_plugin_instantiate(lv2_plugin, AGS_MACHINE(lv2_bridge)->audio->samplerate); } if(lv2_bridge->port_value == NULL){ GList *port_descriptor; guint port_count; port_count = g_list_length(AGS_BASE_PLUGIN(lv2_plugin)->port); if(port_count > 0){ lv2_bridge->port_value = (float *) malloc(port_count * sizeof(float)); } port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; for(i = 0; port_descriptor != NULL;){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ plugin_descriptor->connect_port(lv2_bridge->lv2_handle[0], AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index, &(lv2_bridge->port_value[i])); i++; } } port_descriptor = port_descriptor->next; } } if(lv2_bridge->program == NULL){ GtkHBox *hbox; GtkLabel *label; /* program */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) lv2_bridge->vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(lv2_bridge->vbox), GTK_WIDGET(hbox), 0); label = (GtkLabel *) gtk_label_new(i18n("program")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 0); lv2_bridge->program = gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) lv2_bridge->program, FALSE, FALSE, 0); if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(lv2_bridge)->flags)) != 0){ g_signal_connect_after(G_OBJECT(lv2_bridge->program), "changed", G_CALLBACK(ags_lv2_bridge_program_changed_callback), lv2_bridge); } model = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_ULONG, G_TYPE_ULONG); gtk_combo_box_set_model(GTK_COMBO_BOX(lv2_bridge->program), GTK_TREE_MODEL(model)); }else{ model = gtk_combo_box_get_model(GTK_COMBO_BOX(lv2_bridge->program)); gtk_list_store_clear(GTK_LIST_STORE(model)); } for(i = 0; (program_descriptor = program_interface->get_program(lv2_bridge->lv2_handle[0], i)) != NULL; i++){ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, program_descriptor->name, 1, program_descriptor->bank, 2, program_descriptor->program, -1); } } } void ags_lv2_bridge_load_preset(AgsLv2Bridge *lv2_bridge) { GtkHBox *hbox; GtkLabel *label; AgsLv2Plugin *lv2_plugin; GList *list; /* preset */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) lv2_bridge->vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(lv2_bridge->vbox), GTK_WIDGET(hbox), 0); label = (GtkLabel *) gtk_label_new(i18n("preset")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 0); lv2_bridge->preset = gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) lv2_bridge->preset, FALSE, FALSE, 0); /* retrieve lv2 plugin */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), lv2_bridge->filename, lv2_bridge->effect); /* preset */ list = lv2_plugin->preset; while(list != NULL){ if(AGS_LV2_PRESET(list->data)->preset_label != NULL){ gtk_combo_box_text_append_text(lv2_bridge->preset, AGS_LV2_PRESET(list->data)->preset_label); } list = list->next; } gtk_widget_show_all(hbox); /* connect preset */ g_signal_connect_after(G_OBJECT(lv2_bridge->preset), "changed", G_CALLBACK(ags_lv2_bridge_preset_changed_callback), lv2_bridge); } void ags_lv2_bridge_load_midi(AgsLv2Bridge *lv2_bridge) { //TODO:JK: implement me } void ags_lv2_bridge_load_gui(AgsLv2Bridge *lv2_bridge) { AgsLv2Plugin *lv2_plugin; AgsLv2uiPlugin *lv2ui_plugin; GList *list; /* retrieve lv2 plugin */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), lv2_bridge->filename, lv2_bridge->effect); if(lv2_plugin == NULL || lv2_plugin->ui_uri == NULL){ return; } /* retrieve lv2ui plugin */ list = ags_lv2ui_plugin_find_gui_uri(ags_lv2ui_manager_get_instance()->lv2ui_plugin, lv2_plugin->ui_uri); if(list == NULL){ return; } lv2ui_plugin = list->data; #ifdef AGS_DEBUG g_message("ui filename - %s", AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename); #endif /* apply ui */ g_object_set(lv2_bridge, "has-gui", TRUE, "gui-uri", lv2_plugin->ui_uri, "gui-filename", AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, NULL); } void ags_lv2_bridge_load(AgsLv2Bridge *lv2_bridge) { AgsLv2Plugin *lv2_plugin; lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), lv2_bridge->filename, lv2_bridge->effect); if(lv2_plugin == NULL){ return; } /* URI */ g_object_set(lv2_bridge, "uri", lv2_plugin->uri, NULL); /* program */ lv2_bridge->lv2_handle = ags_base_plugin_instantiate(lv2_plugin, AGS_MACHINE(lv2_bridge)->audio->samplerate); if((AGS_LV2_PLUGIN_HAS_PROGRAM_INTERFACE & (lv2_plugin->flags)) != 0){ ags_lv2_bridge_load_program(lv2_bridge); } /* preset */ if(lv2_plugin->preset != NULL){ ags_lv2_bridge_load_preset(lv2_bridge); } /* load gui */ ags_lv2_bridge_load_gui(lv2_bridge); } /** * ags_lv2_bridge_lv2ui_idle_timeout: * @widget: LV2UI_Handle * * Idle lv2 ui. * * Returns: %TRUE if proceed with redraw, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_lv2_bridge_lv2ui_idle_timeout(GtkWidget *widget) { AgsLv2Bridge *lv2_bridge; int retval; if((lv2_bridge = g_hash_table_lookup(ags_lv2_bridge_lv2ui_idle, widget)) != NULL){ if(lv2_bridge->ui_feature != NULL && lv2_bridge->ui_feature[0]->data != NULL){ retval = ((struct _LV2UI_Idle_Interface *) lv2_bridge->ui_feature[0]->data)->idle(lv2_bridge->ui_handle); if(retval != 0){ g_hash_table_remove(ags_lv2_bridge_lv2ui_handle, lv2_bridge->ui_handle); lv2_bridge->ui_handle = NULL; return(FALSE); } } return(TRUE); }else{ return(FALSE); } } /** * ags_lv2_bridge_new: * @soundcard: the assigned soundcard. * @filename: the plugin.so * @effect: the effect * * Creates an #AgsLv2Bridge * * Returns: a new #AgsLv2Bridge * * Since: 1.0.0 */ AgsLv2Bridge* ags_lv2_bridge_new(GObject *soundcard, gchar *filename, gchar *effect) { AgsLv2Bridge *lv2_bridge; GValue value = {0,}; lv2_bridge = (AgsLv2Bridge *) g_object_new(AGS_TYPE_LV2_BRIDGE, NULL); if(soundcard != NULL){ g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, soundcard); g_object_set_property(G_OBJECT(AGS_MACHINE(lv2_bridge)->audio), "soundcard", &value); g_value_unset(&value); } g_object_set(lv2_bridge, "filename", filename, "effect", effect, NULL); return(lv2_bridge); } gsequencer-1.4.24/ags/X/machine/ags_drum_output_pad_callbacks.h0000644000175000017500000000177313246707333021506 00000000000000/* 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 . */ #ifndef __AGS_DRUM_OUTPUT_PAD_CALLBACKS_H__ #define __AGS_DRUM_OUTPUT_PAD_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_DRUM_OUTPUT_PAD_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_dssi_bridge_callbacks.c0000644000175000017500000001302413247044247020533 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_dssi_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsDssiBridge *dssi_bridge) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = AGS_WINDOW(gtk_widget_get_toplevel(widget)); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_DSSI_BRIDGE)->counter); g_object_set(AGS_MACHINE(dssi_bridge), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_DSSI_BRIDGE); g_free(str); } void ags_dssi_bridge_program_changed_callback(GtkComboBox *combo_box, AgsDssiBridge *dssi_bridge) { GtkTreeIter iter; if(gtk_combo_box_get_active_iter(combo_box, &iter)){ AgsLadspaConversion *ladspa_conversion; AgsChannel *channel; GList *bulk_member, *bulk_member_start; GList *recall; GList *port; gchar *name; gchar *specifier; LADSPA_PortDescriptor *port_descriptor; guint bank, program; unsigned long i; /* get program */ gtk_tree_model_get(gtk_combo_box_get_model(combo_box), &iter, 0, &name, 1, &bank, 2, &program, -1); dssi_bridge->dssi_descriptor->select_program(dssi_bridge->ladspa_handle, (unsigned long) bank, (unsigned long) program); #ifdef AGS_DEBUG g_message("%d %d", bank, program); #endif /* update ports */ channel = AGS_MACHINE(dssi_bridge)->audio->input; port_descriptor = dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortDescriptors; while(channel != NULL){ recall = channel->recall; while((recall = ags_recall_find_type(recall, AGS_TYPE_RECALL_DSSI)) != NULL){ AGS_RECALL_DSSI(recall->data)->bank = (unsigned long) bank; AGS_RECALL_DSSI(recall->data)->program = (unsigned long) program; for(i = 0; i < dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortCount; i++){ if(LADSPA_IS_PORT_CONTROL(port_descriptor[i])){ if(LADSPA_IS_PORT_INPUT(port_descriptor[i]) || LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ specifier = dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortNames[i]; port = AGS_RECALL(recall->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, specifier)){ GValue value = {0,}; #ifdef AGS_DEBUG g_message("%s %f", specifier, dssi_bridge->port_values[i]); #endif g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, dssi_bridge->port_values[i]); ags_port_safe_write_raw(port->data, &value); break; } port = port->next; } } } } recall = recall->next; } channel = channel->next; } /* update UI */ bulk_member_start = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(dssi_bridge)->bridge)->bulk_input)->table); for(i = 0; i < dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortCount; i++){ /* find bulk member */ bulk_member = bulk_member_start; specifier = dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortNames[i]; #ifdef AGS_DEBUG g_message("%s", specifier); #endif while(bulk_member != NULL){ if(AGS_IS_BULK_MEMBER(bulk_member->data) && !g_strcmp0(AGS_BULK_MEMBER(bulk_member->data)->specifier, specifier)){ GtkWidget *child_widget; AGS_BULK_MEMBER(bulk_member->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; child_widget = gtk_bin_get_child((GtkBin *) AGS_BULK_MEMBER(bulk_member->data)); ladspa_conversion = (AgsLadspaConversion *) AGS_BULK_MEMBER(bulk_member->data)->conversion; if(GTK_IS_TOGGLE_BUTTON(child_widget)){ if(dssi_bridge->port_values[i] == 0.0){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, FALSE); }else{ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, TRUE); } }else if(AGS_IS_DIAL(child_widget)){ gdouble val; val = dssi_bridge->port_values[i]; if(ladspa_conversion != NULL){ // val = ags_ladspa_conversion_convert(ladspa_conversion, // dssi_bridge->port_values[i], // TRUE); } AGS_DIAL(child_widget)->adjustment->value = val; ags_dial_draw((AgsDial *) child_widget); #ifdef AGS_DEBUG g_message(" --- %f", dssi_bridge->port_values[i]); #endif } AGS_BULK_MEMBER(bulk_member->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); break; } bulk_member = bulk_member->next; } } g_list_free(bulk_member_start); } } gsequencer-1.4.24/ags/X/machine/ags_drum.h0000644000175000017500000000450013246707333015232 00000000000000/* 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 . */ #ifndef __AGS_DRUM_H__ #define __AGS_DRUM_H__ #include #include #include #include #include #include #include #define AGS_TYPE_DRUM (ags_drum_get_type()) #define AGS_DRUM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DRUM, AgsDrum)) #define AGS_DRUM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_DRUM, AgsDrumClass)) #define AGS_IS_DRUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DRUM)) #define AGS_IS_DRUM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_DRUM)) #define AGS_DRUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_DRUM, AgsDrumClass)) typedef struct _AgsDrum AgsDrum; typedef struct _AgsDrumClass AgsDrumClass; struct _AgsDrum { AgsMachine machine; guint flags; gchar *name; gchar *xml_type; GtkButton *open; GtkWidget *open_dialog; GtkCheckButton *loop_button; GtkSpinButton *length_spin; GtkToggleButton *run; GtkVBox *vbox; GtkHBox *input_pad; GtkVBox *output_pad; GtkToggleButton *selected_edit_button; AgsDrumInputPad *selected_pad; AgsLine *selected_line; GtkToggleButton *index0[4]; GtkToggleButton *selected0; GtkToggleButton *index1[12]; GtkToggleButton *selected1; AgsPatternBox *pattern_box; }; struct _AgsDrumClass { AgsMachineClass machine; }; GType ags_drum_get_type(void); AgsDrum* ags_drum_new(GObject *soundcard); #endif /*__AGS_DRUM_H__*/ gsequencer-1.4.24/ags/X/machine/ags_synth_input_line.h0000644000175000017500000000422713247044247017663 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SYNTH_INPUT_LINE_H__ #define __AGS_SYNTH_INPUT_LINE_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_SYNTH_INPUT_LINE (ags_synth_input_line_get_type()) #define AGS_SYNTH_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SYNTH_INPUT_LINE, AgsSynthInputLine)) #define AGS_SYNTH_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SYNTH_INPUT_LINE, AgsSynthInputLineClass)) #define AGS_IS_SYNTH_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SYNTH_INPUT_LINE)) #define AGS_IS_SYNTH_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SYNTH_INPUT_LINE)) #define AGS_SYNTH_INPUT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SYNTH_INPUT_LINE, AgsSynthInputLineClass)) typedef struct _AgsSynthInputLine AgsSynthInputLine; typedef struct _AgsSynthInputLineClass AgsSynthInputLineClass; struct _AgsSynthInputLine { AgsLine line; gchar *name; gchar *xml_type; AgsOscillator *oscillator; }; struct _AgsSynthInputLineClass { AgsLineClass line; }; GType ags_synth_input_line_get_type(); AgsSynthInputLine* ags_synth_input_line_new(AgsChannel *channel); #endif /*__AGS_SYNTH_INPUT_LINE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_output_line.c0000644000175000017500000003063513247044247017663 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_drum_output_line_class_init(AgsDrumOutputLineClass *drum_output_line); void ags_drum_output_line_connectable_interface_init(AgsConnectableInterface *connectable); void ags_drum_output_line_plugin_interface_init(AgsPluginInterface *plugin); void ags_drum_output_line_init(AgsDrumOutputLine *drum_output_line); void ags_drum_output_line_connect(AgsConnectable *connectable); void ags_drum_output_line_disconnect(AgsConnectable *connectable); gchar* ags_drum_output_line_get_name(AgsPlugin *plugin); void ags_drum_output_line_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_drum_output_line_get_xml_type(AgsPlugin *plugin); void ags_drum_output_line_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_drum_output_line_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_drum_output_line_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_drum_output_line_set_channel(AgsLine *line, AgsChannel *channel); void ags_drum_output_line_map_recall(AgsLine *line, guint output_pad_start); /** * SECTION:ags_drum_output_line * @short_description: drum sequencer output line * @title: AgsDrumOutputLine * @section_id: * @include: ags/X/machine/ags_drum_output_line.h * * The #AgsDrumOutputLine is a composite widget to act as drum sequencer output line. */ static gpointer ags_drum_output_line_parent_class = NULL; static AgsConnectableInterface *ags_drum_output_line_parent_connectable_interface; GType ags_drum_output_line_get_type() { static GType ags_type_drum_output_line = 0; if(!ags_type_drum_output_line){ static const GTypeInfo ags_drum_output_line_info = { sizeof(AgsDrumOutputLineClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_drum_output_line_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsDrumOutputLine), 0, /* n_preallocs */ (GInstanceInitFunc) ags_drum_output_line_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_drum_output_line_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_drum_output_line_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_drum_output_line = g_type_register_static(AGS_TYPE_LINE, "AgsDrumOutputLine", &ags_drum_output_line_info, 0); g_type_add_interface_static(ags_type_drum_output_line, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_drum_output_line, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_drum_output_line); } void ags_drum_output_line_class_init(AgsDrumOutputLineClass *drum_output_line) { AgsLineClass *line; ags_drum_output_line_parent_class = g_type_class_peek_parent(drum_output_line); /* AgsLineClass */ line = AGS_LINE_CLASS(drum_output_line); line->set_channel = ags_drum_output_line_set_channel; line->map_recall = ags_drum_output_line_map_recall; } void ags_drum_output_line_connectable_interface_init(AgsConnectableInterface *connectable) { ags_drum_output_line_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_drum_output_line_connect; connectable->disconnect = ags_drum_output_line_disconnect; } void ags_drum_output_line_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_drum_output_line_get_name; plugin->set_name = ags_drum_output_line_set_name; plugin->get_xml_type = ags_drum_output_line_get_xml_type; plugin->set_xml_type = ags_drum_output_line_set_xml_type; plugin->read = ags_drum_output_line_read; plugin->write = ags_drum_output_line_write; } void ags_drum_output_line_init(AgsDrumOutputLine *drum_output_line) { drum_output_line->xml_type = "ags-drum-output-line"; } void ags_drum_output_line_connect(AgsConnectable *connectable) { AgsDrum *drum; AgsDrumOutputLine *drum_output_line; drum_output_line = AGS_DRUM_OUTPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(drum_output_line)->flags)) != 0){ return; } ags_drum_output_line_parent_connectable_interface->connect(connectable); drum = gtk_widget_get_ancestor(drum_output_line, AGS_TYPE_DRUM); g_signal_connect_after((GObject *) drum, "resize-pads", G_CALLBACK(ags_drum_output_line_resize_pads_callback), drum_output_line); } void ags_drum_output_line_disconnect(AgsConnectable *connectable) { AgsDrum *drum; AgsDrumOutputLine *drum_output_line; drum_output_line = AGS_DRUM_OUTPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(drum_output_line)->flags)) == 0){ return; } ags_drum_output_line_parent_connectable_interface->disconnect(connectable); drum = gtk_widget_get_ancestor(drum_output_line, AGS_TYPE_DRUM); g_signal_handlers_disconnect_by_data(drum, drum_output_line); } gchar* ags_drum_output_line_get_name(AgsPlugin *plugin) { return(AGS_DRUM_OUTPUT_LINE(plugin)->name); } void ags_drum_output_line_set_name(AgsPlugin *plugin, gchar *name) { AGS_DRUM_OUTPUT_LINE(plugin)->name = name; } gchar* ags_drum_output_line_get_xml_type(AgsPlugin *plugin) { return(AGS_DRUM_OUTPUT_LINE(plugin)->xml_type); } void ags_drum_output_line_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_DRUM_OUTPUT_LINE(plugin)->xml_type = xml_type; } void ags_drum_output_line_set_channel(AgsLine *line, AgsChannel *channel) { AgsMutexManager *mutex_manager; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; GObject *soundcard; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; /* call parent */ AGS_LINE_CLASS(ags_drum_output_line_parent_class)->set_channel(line, channel); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); if(channel != NULL){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get recycling */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* instantiate template audio signal */ audio_signal = ags_audio_signal_new((GObject *) soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, audio_signal); } } void ags_drum_output_line_map_recall(AgsLine *line, guint output_pad_start) { AgsAudio *audio; AgsChannel *output; AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; guint input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *output_mutex; if((AGS_LINE_MAPPED_RECALL & (line->flags)) != 0 || (AGS_LINE_PREMAPPED_RECALL & (line->flags)) != 0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); output = line->channel; /* get output mutex */ pthread_mutex_lock(application_mutex); output_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(output_mutex); audio = (AgsAudio *) output->audio; pthread_mutex_unlock(output_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* remap for input */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", 0, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", 0, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } if(!performance_mode){ guint pad, audio_channel; /* get some fields */ pthread_mutex_lock(output_mutex); pad = output->pad; audio_channel = output->audio_channel; pthread_mutex_unlock(output_mutex); /* ags-stream */ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* call parent */ AGS_LINE_CLASS(ags_drum_output_line_parent_class)->map_recall(line, output_pad_start); } void ags_drum_output_line_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsDrumOutputLine *gobject; gobject = AGS_DRUM_OUTPUT_LINE(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); } xmlNode* ags_drum_output_line_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsDrumOutputLine *drum_output_line; xmlNode *node; gchar *id; drum_output_line = AGS_DRUM_OUTPUT_LINE(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-drum-output-line"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", drum_output_line, NULL)); return(node); } /** * ags_drum_output_line_new: * @channel: the assigned channel * * Creates an #AgsDrumOutputLine * * Returns: a new #AgsDrumOutputLine * * Since: 1.0.0 */ AgsDrumOutputLine* ags_drum_output_line_new(AgsChannel *channel) { AgsDrumOutputLine *drum_output_line; drum_output_line = (AgsDrumOutputLine *) g_object_new(AGS_TYPE_DRUM_OUTPUT_LINE, "channel", channel, NULL); return(drum_output_line); } gsequencer-1.4.24/ags/X/machine/ags_ffplayer_bulk_input.h0000644000175000017500000000451213246707333020332 00000000000000/* 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 . */ #ifndef __AGS_FFPLAYER_BULK_INPUT_H__ #define __AGS_FFPLAYER_BULK_INPUT_H__ #include #include #include #include #define AGS_TYPE_FFPLAYER_BULK_INPUT (ags_ffplayer_bulk_input_get_type()) #define AGS_FFPLAYER_BULK_INPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FFPLAYER_BULK_INPUT, AgsFFPlayerBulkInput)) #define AGS_FFPLAYER_BULK_INPUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FFPLAYER_BULK_INPUT, AgsFFPlayerBulkInputClass)) #define AGS_IS_FFPLAYER_BULK_INPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_FFPLAYER_BULK_INPUT)) #define AGS_IS_FFPLAYER_BULK_INPUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_FFPLAYER_BULK_INPUT)) #define AGS_FFPLAYER_BULK_INPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_FFPLAYER_BULK_INPUT, AgsFFPlayerBulkInputClass)) #define AGS_FFPLAYER_BULK_INPUT_DEFAULT_VERSION "0.4.3\0" #define AGS_FFPLAYER_BULK_INPUT_DEFAULT_BUILD_ID "CEST 20-03-2015 08:24\0" typedef struct _AgsFFPlayerBulkInput AgsFFPlayerBulkInput; typedef struct _AgsFFPlayerBulkInputClass AgsFFPlayerBulkInputClass; typedef enum{ AGS_FFPLAYER_BULK_INPUT_CONNECTED = 1, }AgsFFPlayerBulkInputFlags; struct _AgsFFPlayerBulkInput { AgsEffectBulk effect_bulk; }; struct _AgsFFPlayerBulkInputClass { AgsEffectBulkClass effect_bulk; }; GType ags_ffplayer_bulk_input_get_type(void); AgsFFPlayerBulkInput* ags_ffplayer_bulk_input_new(AgsAudio *audio, GType channel_type); #endif /*__AGS_FFPLAYER_BULK_INPUT_H__*/ gsequencer-1.4.24/ags/X/machine/ags_mixer.h0000644000175000017500000000341513247044247015412 00000000000000/* 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 . */ #ifndef __AGS_MIXER_H__ #define __AGS_MIXER_H__ #include #include #include #include #define AGS_TYPE_MIXER (ags_mixer_get_type()) #define AGS_MIXER(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_MIXER, AgsMixer)) #define AGS_MIXER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_MIXER, AgsMixerClass)) #define AGS_IS_MIXER(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, AGS_TYPE_MIXER)) #define AGS_IS_MIXER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MIXER)) #define AGS_MIXER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MIXER, AgsMixerClass)) typedef struct _AgsMixer AgsMixer; typedef struct _AgsMixerClass AgsMixerClass; struct _AgsMixer { AgsMachine machine; gchar *name; gchar *xml_type; GtkHBox *input_pad; }; struct _AgsMixerClass { AgsMachineClass machine; }; GType ags_mixer_get_type(void); AgsMixer* ags_mixer_new(GObject *soundcard); #endif /*__AGS_MIXER_H__*/ gsequencer-1.4.24/ags/X/machine/ags_ffplayer_input_line.h0000644000175000017500000000421113246707333020320 00000000000000/* 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 . */ #ifndef __AGS_FFPLAYER_INPUT_LINE_H__ #define __AGS_FFPLAYER_INPUT_LINE_H__ #include #include #include #include #include #define AGS_TYPE_FFPLAYER_INPUT_LINE (ags_ffplayer_input_line_get_type()) #define AGS_FFPLAYER_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FFPLAYER_INPUT_LINE, AgsFFPlayerInputLine)) #define AGS_FFPLAYER_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FFPLAYER_INPUT_LINE, AgsFFPlayerInputLineClass)) #define AGS_IS_FFPLAYER_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_FFPLAYER_INPUT_LINE)) #define AGS_IS_FFPLAYER_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_FFPLAYER_INPUT_LINE)) #define AGS_FFPLAYER_INPUT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_FFPLAYER_INPUT_LINE, AgsFFPlayerInputLineClass)) typedef struct _AgsFFPlayerInputLine AgsFFPlayerInputLine; typedef struct _AgsFFPlayerInputLineClass AgsFFPlayerInputLineClass; struct _AgsFFPlayerInputLine { AgsEffectLine effect_line; GtkLabel *label; }; struct _AgsFFPlayerInputLineClass { AgsEffectLineClass effect_line; }; GType ags_ffplayer_input_line_get_type(void); AgsFFPlayerInputLine* ags_ffplayer_input_line_new(AgsChannel *channel); #endif /*__AGS_FFPLAYER_INPUT_LINE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_matrix_bridge.h0000644000175000017500000000402313247044247017102 00000000000000/* 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 . */ #ifndef __AGS_MATRIX_BRIDGE_H__ #define __AGS_MATRIX_BRIDGE_H__ #include #include #include #include #include #include #include #define AGS_TYPE_MATRIX_BRIDGE (ags_matrix_bridge_get_type()) #define AGS_MATRIX_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MATRIX_BRIDGE, AgsMatrixBridge)) #define AGS_MATRIX_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MATRIX_BRIDGE, AgsMatrixBridgeClass)) #define AGS_IS_MATRIX_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MATRIX_BRIDGE)) #define AGS_IS_MATRIX_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MATRIX_BRIDGE)) #define AGS_MATRIX_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_MATRIX_BRIDGE, AgsMatrixBridgeClass)) typedef struct _AgsMatrixBridge AgsMatrixBridge; typedef struct _AgsMatrixBridgeClass AgsMatrixBridgeClass; struct _AgsMatrixBridge { AgsEffectBridge effect_bridge; }; struct _AgsMatrixBridgeClass { AgsEffectBridgeClass effect_bridge; }; GType ags_matrix_bridge_get_type(void); AgsMatrixBridge* ags_matrix_bridge_new(AgsAudio *audio); #endif /*__AGS_MATRIX_BRIDGE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_dssi_bridge.h0000644000175000017500000000570713247044247016552 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_DSSI_BRIDGE_H__ #define __AGS_DSSI_BRIDGE_H__ #include #include #include #include #include #include #define AGS_TYPE_DSSI_BRIDGE (ags_dssi_bridge_get_type()) #define AGS_DSSI_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DSSI_BRIDGE, AgsDssiBridge)) #define AGS_DSSI_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_DSSI_BRIDGE, AgsDssiBridgeClass)) #define AGS_IS_DSSI_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DSSI_BRIDGE)) #define AGS_IS_DSSI_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_DSSI_BRIDGE)) #define AGS_DSSI_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_DSSI_BRIDGE, AgsDssiBridgeClass)) #define AGS_DSSI_BRIDGE_DEFAULT_VERSION "0.7.4\0" #define AGS_DSSI_BRIDGE_DEFAULT_BUILD_ID "CEST 16-02-2016 23:36\0" typedef struct _AgsDssiBridge AgsDssiBridge; typedef struct _AgsDssiBridgeClass AgsDssiBridgeClass; typedef enum{ AGS_DSSI_BRIDGE_DISPLAY_INPUT = 1, AGS_DSSI_BRIDGE_BULK_OUTPUT = 1 << 1, AGS_DSSI_BRIDGE_DISPLAY_OUTPUT = 1 << 2, AGS_DSSI_BRIDGE_BULK_INPUT = 1 << 3, }AgsDssiBridgeFlags; struct _AgsDssiBridge { AgsMachine machine; guint flags; gchar *name; gchar *version; gchar *build_id; gchar *xml_type; guint mapped_output_pad; guint mapped_input_pad; gchar *filename; gchar *effect; unsigned long effect_index; DSSI_Descriptor *dssi_descriptor; LADSPA_Handle ladspa_handle; LADSPA_Data *port_values; GtkComboBoxText *program; }; struct _AgsDssiBridgeClass { AgsMachineClass machine; }; GType ags_dssi_bridge_get_type(void); void ags_dssi_bridge_input_map_recall(AgsDssiBridge *dssi_bridge, guint audio_channel_start, guint input_pad_start); void ags_dssi_bridge_output_map_recall(AgsDssiBridge *dssi_bridge, guint audio_channel_start, guint output_pad_start); void ags_dssi_bridge_load(AgsDssiBridge *dssi_bridge); AgsDssiBridge* ags_dssi_bridge_new(GObject *soundcard, gchar *filename, gchar *effect); #endif /*__AGS_DSSI_BRIDGE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_dssi_bridge.c0000644000175000017500000013141313247044247016537 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_dssi_bridge_class_init(AgsDssiBridgeClass *dssi_bridge); void ags_dssi_bridge_connectable_interface_init(AgsConnectableInterface *connectable); void ags_dssi_bridge_plugin_interface_init(AgsPluginInterface *plugin); void ags_dssi_bridge_init(AgsDssiBridge *dssi_bridge); void ags_dssi_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_dssi_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_dssi_bridge_connect(AgsConnectable *connectable); void ags_dssi_bridge_disconnect(AgsConnectable *connectable); gchar* ags_dssi_bridge_get_version(AgsPlugin *plugin); void ags_dssi_bridge_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_dssi_bridge_get_build_id(AgsPlugin *plugin); void ags_dssi_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id); gchar* ags_dssi_bridge_get_xml_type(AgsPlugin *plugin); void ags_dssi_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_dssi_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_dssi_bridge_launch_task(AgsFileLaunch *file_launch, AgsDssiBridge *dssi_bridge); xmlNode* ags_dssi_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_dssi_bridge_finalize(GObject *gobject); void ags_dssi_bridge_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_dssi_bridge_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data); void ags_dssi_bridge_map_recall(AgsMachine *machine); /** * SECTION:ags_dssi_bridge * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsDssiBridge * @section_id: * @include: ags/X/ags_dssi_bridge.h * * #AgsDssiBridge is a composite widget to visualize all #AgsChannel. It should be * packed by an #AgsMachine. */ enum{ PROP_0, PROP_FILENAME, PROP_EFFECT, PROP_INDEX, }; static gpointer ags_dssi_bridge_parent_class = NULL; static AgsConnectableInterface* ags_dssi_bridge_parent_connectable_interface; static AgsPluginInterface* ags_dssi_bridge_parent_plugin_interface; GType ags_dssi_bridge_get_type(void) { static GType ags_type_dssi_bridge = 0; if(!ags_type_dssi_bridge){ static const GTypeInfo ags_dssi_bridge_info = { sizeof(AgsDssiBridgeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_dssi_bridge_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsDssiBridge), 0, /* n_preallocs */ (GInstanceInitFunc) ags_dssi_bridge_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_dssi_bridge_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_dssi_bridge_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_dssi_bridge = g_type_register_static(AGS_TYPE_MACHINE, "AgsDssiBridge", &ags_dssi_bridge_info, 0); g_type_add_interface_static(ags_type_dssi_bridge, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_dssi_bridge, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_dssi_bridge); } void ags_dssi_bridge_class_init(AgsDssiBridgeClass *dssi_bridge) { AgsMachineClass *machine; GObjectClass *gobject; GParamSpec *param_spec; ags_dssi_bridge_parent_class = g_type_class_peek_parent(dssi_bridge); /* GObjectClass */ gobject = G_OBJECT_CLASS(dssi_bridge); gobject->set_property = ags_dssi_bridge_set_property; gobject->get_property = ags_dssi_bridge_get_property; gobject->finalize = ags_dssi_bridge_finalize; /* properties */ /** * AgsRecallDssi:filename: * * The plugins filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the object file"), i18n_pspec("The filename as string of object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsRecallDssi:effect: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsRecallDssi:index: * * The effect's index. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("index", i18n_pspec("index of effect"), i18n_pspec("The numerical index of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); /* AgsMachine */ machine = (AgsMachineClass *) dssi_bridge; machine->map_recall = ags_dssi_bridge_map_recall; } void ags_dssi_bridge_connectable_interface_init(AgsConnectableInterface *connectable) { ags_dssi_bridge_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_dssi_bridge_connect; connectable->disconnect = ags_dssi_bridge_disconnect; } void ags_dssi_bridge_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_dssi_bridge_get_version; plugin->set_version = ags_dssi_bridge_set_version; plugin->get_build_id = ags_dssi_bridge_get_build_id; plugin->set_build_id = ags_dssi_bridge_set_build_id; plugin->get_xml_type = ags_dssi_bridge_get_xml_type; plugin->set_xml_type = ags_dssi_bridge_set_xml_type; plugin->read = ags_dssi_bridge_read; plugin->write = ags_dssi_bridge_write; plugin->get_ports = NULL; plugin->set_ports = NULL; } void ags_dssi_bridge_init(AgsDssiBridge *dssi_bridge) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; GtkTable *table; AgsAudio *audio; g_signal_connect_after((GObject *) dssi_bridge, "parent-set", G_CALLBACK(ags_dssi_bridge_parent_set_callback), (gpointer) dssi_bridge); audio = AGS_MACHINE(dssi_bridge)->audio; audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_NOTATION_DEFAULT | AGS_AUDIO_REVERSE_MAPPING); g_object_set(audio, "audio-start-mapping", 0, "audio-end-mapping", 128, "midi-start-mapping", 0, "midi-end-mapping", 128, NULL); AGS_MACHINE(dssi_bridge)->flags |= (AGS_MACHINE_IS_SYNTHESIZER | AGS_MACHINE_REVERSE_NOTATION); ags_machine_popup_add_connection_options((AgsMachine *) dssi_bridge, (AGS_MACHINE_POPUP_MIDI_DIALOG)); g_signal_connect_after(G_OBJECT(dssi_bridge), "resize-audio-channels", G_CALLBACK(ags_dssi_bridge_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(dssi_bridge), "resize-pads", G_CALLBACK(ags_dssi_bridge_resize_pads), NULL); dssi_bridge->flags = 0; dssi_bridge->name = NULL; dssi_bridge->version = AGS_DSSI_BRIDGE_DEFAULT_VERSION; dssi_bridge->build_id = AGS_DSSI_BRIDGE_DEFAULT_BUILD_ID; dssi_bridge->xml_type = "ags-dssi-bridge"; dssi_bridge->mapped_output_pad = 0; dssi_bridge->mapped_input_pad = 0; ags_machine_popup_add_edit_options((AgsMachine *) dssi_bridge, (AGS_MACHINE_POPUP_ENVELOPE)); dssi_bridge->filename = NULL; dssi_bridge->effect = NULL; dssi_bridge->effect_index = 0; dssi_bridge->port_values = NULL; dssi_bridge->dssi_descriptor = NULL; vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer *) gtk_bin_get_child((GtkBin *) dssi_bridge), (GtkWidget *) vbox); /* program */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("program")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 0); dssi_bridge->program = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) dssi_bridge->program, FALSE, FALSE, 0); /* effect bridge */ AGS_MACHINE(dssi_bridge)->bridge = (GtkContainer *) ags_effect_bridge_new(audio); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) AGS_MACHINE(dssi_bridge)->bridge, FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(1, 2, FALSE); gtk_box_pack_start((GtkBox *) AGS_EFFECT_BRIDGE(AGS_MACHINE(dssi_bridge)->bridge), (GtkWidget *) table, FALSE, FALSE, 0); AGS_EFFECT_BRIDGE(AGS_MACHINE(dssi_bridge)->bridge)->bulk_input = (GtkWidget *) ags_effect_bulk_new(audio, AGS_TYPE_INPUT); AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(dssi_bridge)->bridge)->bulk_input)->flags |= (AGS_EFFECT_BULK_HIDE_BUTTONS | AGS_EFFECT_BULK_HIDE_ENTRIES | AGS_EFFECT_BULK_SHOW_LABELS); gtk_table_attach(table, AGS_EFFECT_BRIDGE(AGS_MACHINE(dssi_bridge)->bridge)->bulk_input, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); } void ags_dssi_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsDssiBridge *dssi_bridge; dssi_bridge = AGS_DSSI_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *str; gchar *filename; filename = g_value_get_string(value); if(filename == dssi_bridge->filename){ return; } if(dssi_bridge->filename != NULL){ g_free(dssi_bridge->filename); } if(filename != NULL){ if(!g_file_test(filename, G_FILE_TEST_EXISTS)){ AgsWindow *window; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) dssi_bridge); str = g_strdup_printf("%s %s", i18n("Plugin file not present"), filename); ags_window_show_error(window, str); g_free(str); } } dssi_bridge->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == dssi_bridge->effect){ return; } if(dssi_bridge->effect != NULL){ g_free(dssi_bridge->effect); } dssi_bridge->effect = g_strdup(effect); } break; case PROP_INDEX: { unsigned long effect_index; effect_index = (unsigned long) g_value_get_uint(value); if(effect_index == dssi_bridge->effect_index){ return; } dssi_bridge->effect_index = effect_index; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_dssi_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsDssiBridge *dssi_bridge; dssi_bridge = AGS_DSSI_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, dssi_bridge->filename); } break; case PROP_EFFECT: { g_value_set_string(value, dssi_bridge->effect); } break; case PROP_INDEX: { g_value_set_uint(value, (guint) dssi_bridge->effect_index); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_dssi_bridge_connect(AgsConnectable *connectable) { AgsDssiBridge *dssi_bridge; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_dssi_bridge_parent_connectable_interface->connect(connectable); dssi_bridge = AGS_DSSI_BRIDGE(connectable); g_signal_connect_after(G_OBJECT(dssi_bridge->program), "changed", G_CALLBACK(ags_dssi_bridge_program_changed_callback), dssi_bridge); } void ags_dssi_bridge_disconnect(AgsConnectable *connectable) { AgsDssiBridge *dssi_bridge; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } ags_dssi_bridge_parent_connectable_interface->connect(connectable); dssi_bridge = AGS_DSSI_BRIDGE(connectable); g_object_disconnect(G_OBJECT(dssi_bridge->program), "any_signal::changed", G_CALLBACK(ags_dssi_bridge_program_changed_callback), dssi_bridge, NULL); } gchar* ags_dssi_bridge_get_version(AgsPlugin *plugin) { return(AGS_DSSI_BRIDGE(plugin)->version); } void ags_dssi_bridge_set_version(AgsPlugin *plugin, gchar *version) { AgsDssiBridge *dssi_bridge; dssi_bridge = AGS_DSSI_BRIDGE(plugin); dssi_bridge->version = version; } gchar* ags_dssi_bridge_get_build_id(AgsPlugin *plugin) { return(AGS_DSSI_BRIDGE(plugin)->build_id); } void ags_dssi_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsDssiBridge *dssi_bridge; dssi_bridge = AGS_DSSI_BRIDGE(plugin); dssi_bridge->build_id = build_id; } gchar* ags_dssi_bridge_get_xml_type(AgsPlugin *plugin) { return(AGS_DSSI_BRIDGE(plugin)->xml_type); } void ags_dssi_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_DSSI_BRIDGE(plugin)->xml_type = xml_type; } void ags_dssi_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsDssiBridge *gobject; AgsFileLaunch *file_launch; gobject = AGS_DSSI_BRIDGE(plugin); g_object_set(gobject, "filename", xmlGetProp(node, "filename"), "effect", xmlGetProp(node, "effect"), NULL); /* launch */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_dssi_bridge_launch_task), gobject); ags_file_add_launch(file, G_OBJECT(file_launch)); } void ags_dssi_bridge_launch_task(AgsFileLaunch *file_launch, AgsDssiBridge *dssi_bridge) { GtkTreeModel *model; GtkTreeIter iter; GList *list, *list_start; GList *recall; gchar *str; ags_dssi_bridge_load(dssi_bridge); /* block update bulk port */ list_start = list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(dssi_bridge)->bridge)->bulk_input)->table); while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ AGS_BULK_MEMBER(list->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; } list = list->next; } /* update program */ str = xmlGetProp(file_launch->node, "program"); model = gtk_combo_box_get_model((GtkComboBox *) dssi_bridge->program); if(gtk_tree_model_get_iter_first(model, &iter)){ gchar *value; do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ break; } }while(gtk_tree_model_iter_next(model, &iter)); gtk_combo_box_set_active_iter((GtkComboBox *) dssi_bridge->program, &iter); } /* update value and unblock update bulk port */ recall = NULL; if(AGS_MACHINE(dssi_bridge)->audio->input != NULL){ recall = AGS_MACHINE(dssi_bridge)->audio->input->recall; while((recall = ags_recall_template_find_type(recall, AGS_TYPE_RECALL_DSSI)) != NULL){ if(!g_strcmp0(AGS_RECALL_DSSI(recall->data)->filename, dssi_bridge->filename) && !g_strcmp0(AGS_RECALL_DSSI(recall->data)->effect, dssi_bridge->effect)){ break; } recall = recall->next; } } while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ GtkWidget *child_widget; GList *port; child_widget = gtk_bin_get_child((GtkBin *) list->data); if(recall != NULL){ port = AGS_RECALL(recall->data)->port; while(port != port->next){ if(!g_strcmp0(AGS_BULK_MEMBER(list->data)->specifier, AGS_PORT(port->data)->specifier)){ if(AGS_IS_DIAL(child_widget)){ gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, AGS_PORT(port->data)->port_value.ags_port_ladspa); ags_dial_draw((AgsDial *) child_widget); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, ((AGS_PORT(port->data)->port_value.ags_port_ladspa != 0.0) ? TRUE: FALSE)); } break; } port = port->next; } } AGS_BULK_MEMBER(list->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); } list = list->next; } g_list_free(list_start); } xmlNode* ags_dssi_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsDssiBridge *dssi_bridge; GtkTreeIter iter; xmlNode *node; gchar *id; gchar *program; dssi_bridge = AGS_DSSI_BRIDGE(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-dssi-bridge"); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, "filename", g_strdup(dssi_bridge->filename)); xmlNewProp(node, "effect", g_strdup(dssi_bridge->effect)); if((program = gtk_combo_box_text_get_active_text(dssi_bridge->program)) != NULL){ xmlNewProp(node, "program", g_strdup(program)); } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", dssi_bridge, NULL)); xmlAddChild(parent, node); return(node); } void ags_dssi_bridge_finalize(GObject *gobject) { AgsDssiBridge *dssi_bridge; dssi_bridge = (AgsDssiBridge *) gobject; g_object_disconnect(G_OBJECT(dssi_bridge), "any_signal::resize-audio-channels", G_CALLBACK(ags_dssi_bridge_resize_audio_channels), NULL, "any_signal::resize-pads", G_CALLBACK(ags_dssi_bridge_resize_pads), NULL, NULL); g_free(dssi_bridge->filename); g_free(dssi_bridge->effect); /* call parent */ G_OBJECT_CLASS(ags_dssi_bridge_parent_class)->finalize(gobject); } void ags_dssi_bridge_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { AgsDssiBridge *dssi_bridge; AgsAudio *audio; AgsChannel *output, *input; AgsChannel *channel, *next_pad; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GObject *soundcard; guint output_pads, input_pads; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); dssi_bridge = (AgsDssiBridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; output_pads = audio->output_pads; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); /* check available */ if(input_pads == 0 && output_pads == 0){ return; } if(audio_channels > audio_channels_old){ /* AgsInput */ channel = input; /* resize audio signal */ while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); channel = ags_channel_nth(channel, audio_channels_old); while(channel != next_pad){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 1); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* AgsOutput */ channel = output; /* resize audio signal */ while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); channel = ags_channel_pad_nth(channel, audio_channels_old); while(channel != next_pad){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 3); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_dssi_bridge_input_map_recall(dssi_bridge, audio_channels_old, 0); ags_dssi_bridge_output_map_recall(dssi_bridge, audio_channels_old, 0); } } } void ags_dssi_bridge_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data) { AgsDssiBridge *dssi_bridge; AgsAudio *audio; AgsChannel *output, *input; AgsChannel *channel; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GObject *soundcard; guint audio_channels; gboolean grow; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); dssi_bridge = (AgsDssiBridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* check available */ if(pads == pads_old || audio_channels == 0){ return; } if(pads_old < pads){ grow = TRUE; }else{ grow = FALSE; } if(g_type_is_a(type, AGS_TYPE_INPUT)){ if(grow){ /* AgsInput */ channel = ags_channel_pad_nth(input, pads_old); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 1); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_dssi_bridge_input_map_recall(dssi_bridge, 0, pads_old); } }else{ dssi_bridge->mapped_input_pad = pads; } }else{ if(grow){ /* AgsOutput */ channel = ags_channel_pad_nth(output, pads_old); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 3); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_dssi_bridge_output_map_recall(dssi_bridge, 0, pads_old); } }else{ dssi_bridge->mapped_output_pad = pads; } } } void ags_dssi_bridge_map_recall(AgsMachine *machine) { AgsWindow *window; AgsDssiBridge *dssi_bridge; AgsAudio *audio; AgsDelayAudio *play_delay_audio; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsRecordMidiAudio *recall_record_midi_audio; AgsRecordMidiAudioRun *recall_record_midi_audio_run; AgsPlayNotationAudio *recall_notation_audio; AgsPlayNotationAudioRun *recall_notation_audio_run; AgsRouteDssiAudio *recall_route_dssi_audio; AgsRouteDssiAudioRun *recall_route_dssi_audio_run; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); dssi_bridge = (AgsDssiBridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* ags-delay */ ags_recall_factory_create(audio, NULL, NULL, "ags-delay", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(list != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(list->data); // AGS_RECALL(play_delay_audio_run)->flags |= AGS_RECALL_PERSISTENT; }else{ play_delay_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run", play_delay_audio_run, NULL); ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run), window->navigation->position_tact->adjustment->value, TRUE); }else{ play_count_beats_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-route-dssi */ ags_recall_factory_create(audio, NULL, NULL, "ags-route-dssi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_ROUTE_DSSI_AUDIO_RUN); if(list != NULL){ recall_route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_route_dssi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_route_dssi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); }else{ recall_route_dssi_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-record-midi */ ags_recall_factory_create(audio, NULL, NULL, "ags-record-midi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_RECORD_MIDI_AUDIO_RUN); if(list != NULL){ recall_record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* ags-play-notation */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-notation", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_PLAY_NOTATION_AUDIO_RUN); if(list != NULL){ recall_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* depending on destination */ ags_dssi_bridge_input_map_recall(dssi_bridge, 0, 0); /* add to effect bridge */ ags_effect_bulk_add_effect((AgsEffectBulk *) AGS_EFFECT_BRIDGE(AGS_MACHINE(dssi_bridge)->bridge)->bulk_input, NULL, dssi_bridge->filename, dssi_bridge->effect); /* depending on destination */ ags_dssi_bridge_output_map_recall(dssi_bridge, 0, 0); /* call parent */ AGS_MACHINE_CLASS(ags_dssi_bridge_parent_class)->map_recall(machine); } void ags_dssi_bridge_input_map_recall(AgsDssiBridge *dssi_bridge, guint audio_channel_start, guint input_pad_start) { AgsAudio *audio; AgsChannel *input; AgsChannel *source, *current; AgsMutexManager *mutex_manager; AgsConfig *config; GList *list; gchar *str; guint input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *current_mutex; if(dssi_bridge->mapped_input_pad > input_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(dssi_bridge)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input = audio->input; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* source */ source = ags_channel_nth(input, audio_channel_start + input_pad_start * audio_channels); /* ags-envelope */ ags_recall_factory_create(audio, NULL, NULL, "ags-envelope", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); current = source; while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(current_mutex); /* play - use note length */ list = ags_recall_template_find_type(current->play, AGS_TYPE_ENVELOPE_CHANNEL); if(list != NULL){ GValue use_note_length_value = {0,}; g_value_init(&use_note_length_value, G_TYPE_BOOLEAN); g_value_set_boolean(&use_note_length_value, TRUE); ags_port_safe_write(AGS_ENVELOPE_CHANNEL(list->data)->use_note_length, &use_note_length_value); } /* recall - use note length */ list = ags_recall_template_find_type(current->recall, AGS_TYPE_ENVELOPE_CHANNEL); if(list != NULL){ GValue use_note_length_value = {0,}; g_value_init(&use_note_length_value, G_TYPE_BOOLEAN); g_value_set_boolean(&use_note_length_value, TRUE); ags_port_safe_write(AGS_ENVELOPE_CHANNEL(list->data)->use_note_length, &use_note_length_value); } current = current->next_pad; pthread_mutex_unlock(current_mutex); } /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* ags-stream */ if(!rt_safe){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); }else{ ags_recall_factory_create(audio, NULL, NULL, "ags-rt-stream", audio_channel_start, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } dssi_bridge->mapped_input_pad = input_pads; } void ags_dssi_bridge_output_map_recall(AgsDssiBridge *dssi_bridge, guint audio_channel_start, guint output_pad_start) { AgsAudio *audio; AgsDelayAudio *recall_delay_audio; AgsCountBeatsAudioRun *recall_count_beats_audio_run; AgsMutexManager *mutex_manager; AgsConfig *config; GList *list; gchar *str; guint output_pads, input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(dssi_bridge->mapped_output_pad > output_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(dssi_bridge)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output_pads = audio->output_pads; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } /* remap for input */ if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", audio_channel_start, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_REMAP), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", audio_channel_start, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_REMAP), 0); } if(!performance_mode){ /* ags-stream */ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channel_start, audio_channels, output_pad_start, output_pads, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } dssi_bridge->mapped_output_pad = output_pads; } void ags_dssi_bridge_load(AgsDssiBridge *dssi_bridge) { GtkListStore *model; GtkTreeIter iter; AgsDssiPlugin *dssi_plugin; AgsConfig *config; gchar *str; void *plugin_so; DSSI_Descriptor_Function dssi_descriptor; DSSI_Descriptor *plugin_descriptor; DSSI_Program_Descriptor *program_descriptor; LADSPA_PortDescriptor *port_descriptor; LADSPA_PortRangeHintDescriptor hint_descriptor; unsigned long samplerate; unsigned long effect_index; unsigned long port_count; unsigned long i; config = ags_config_get_instance(); /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); free(str); }else{ samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } g_message("ags_dssi_bridge.c - load %s %s",dssi_bridge->filename, dssi_bridge->effect); /* load plugin */ dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), dssi_bridge->filename, dssi_bridge->effect); plugin_so = AGS_BASE_PLUGIN(dssi_plugin)->plugin_so; /* */ gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(dssi_bridge->program)))); /* */ effect_index = AGS_BASE_PLUGIN(dssi_plugin)->effect_index; /* load ports */ model = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_ULONG, G_TYPE_ULONG); if(effect_index != -1 && plugin_so){ dssi_descriptor = (DSSI_Descriptor_Function) dlsym(plugin_so, "dssi_descriptor"); if(dlerror() == NULL && dssi_descriptor){ dssi_bridge->dssi_descriptor = plugin_descriptor = dssi_descriptor(effect_index); dssi_bridge->ladspa_handle = plugin_descriptor->LADSPA_Plugin->instantiate(plugin_descriptor->LADSPA_Plugin, samplerate); port_count = plugin_descriptor->LADSPA_Plugin->PortCount; port_descriptor = plugin_descriptor->LADSPA_Plugin->PortDescriptors; dssi_bridge->port_values = (LADSPA_Data *) malloc(plugin_descriptor->LADSPA_Plugin->PortCount * sizeof(LADSPA_Data)); for(i = 0; i < port_count; i++){ if(LADSPA_IS_PORT_CONTROL(port_descriptor[i])){ if(LADSPA_IS_PORT_INPUT(port_descriptor[i]) || LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ AgsDssiPlugin *dssi_plugin; GList *list; gchar *specifier; dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), dssi_bridge->filename, dssi_bridge->effect); list = AGS_BASE_PLUGIN(dssi_plugin)->port; specifier = plugin_descriptor->LADSPA_Plugin->PortNames[i]; while(list != NULL){ if(!g_strcmp0(specifier, AGS_PORT_DESCRIPTOR(list->data)->port_name)){ dssi_bridge->port_values[i] = g_value_get_float(AGS_PORT_DESCRIPTOR(list->data)->default_value); break; } list = list->next; } plugin_descriptor->LADSPA_Plugin->connect_port(dssi_bridge->ladspa_handle, i, &(dssi_bridge->port_values[i])); } } } if(plugin_descriptor->get_program != NULL){ for(i = 0; (program_descriptor = plugin_descriptor->get_program(dssi_bridge->ladspa_handle, i)) != NULL; i++){ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, program_descriptor->Name, 1, program_descriptor->Bank, 2, program_descriptor->Program, -1); } } } } gtk_combo_box_set_model(GTK_COMBO_BOX(dssi_bridge->program), GTK_TREE_MODEL(model)); } /** * ags_dssi_bridge_new: * @soundcard: the assigned soundcard. * @filename: the plugin.so * @effect: the effect * * Creates an #AgsDssiBridge * * Returns: a new #AgsDssiBridge * * Since: 1.0.0 */ AgsDssiBridge* ags_dssi_bridge_new(GObject *soundcard, gchar *filename, gchar *effect) { AgsDssiBridge *dssi_bridge; dssi_bridge = (AgsDssiBridge *) g_object_new(AGS_TYPE_DSSI_BRIDGE, NULL); if(soundcard != NULL){ g_object_set(G_OBJECT(AGS_MACHINE(dssi_bridge)->audio), "soundcard", soundcard, NULL); } g_object_set(dssi_bridge, "filename", filename, "effect", effect, NULL); return(dssi_bridge); } gsequencer-1.4.24/ags/X/machine/ags_drum_output_pad.h0000644000175000017500000000407213247044247017501 00000000000000/* 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 . */ #ifndef __AGS_DRUM_OUTPUT_PAD_H__ #define __AGS_DRUM_OUTPUT_PAD_H__ #include #include #include #include #define AGS_TYPE_DRUM_OUTPUT_PAD (ags_drum_output_pad_get_type()) #define AGS_DRUM_OUTPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DRUM_OUTPUT_PAD, AgsDrumOutputPad)) #define AGS_DRUM_OUTPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_DRUM_OUTPUT_PAD, AgsDrumOutputPadClass)) #define AGS_IS_DRUM_OUTPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DRUM_OUTPUT_PAD)) #define AGS_IS_DRUM_OUTPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_DRUM_OUTPUT_PAD)) #define AGS_DRUM_OUTPUT_PAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_DRUM_OUTPUT_PAD, AgsDrumOutputPadClass)) typedef struct _AgsDrumOutputPad AgsDrumOutputPad; typedef struct _AgsDrumOutputPadClass AgsDrumOutputPadClass; typedef enum{ AGS_DRUM_OUTPUT_PAD_PLAY_DONE = 1, }AgsDrumOutputPadFlags; struct _AgsDrumOutputPad { AgsPad pad; guint flags; gchar *name; gchar *xml_type; }; struct _AgsDrumOutputPadClass { AgsPadClass pad; }; GType ags_drum_output_pad_get_type(); AgsDrumOutputPad* ags_drum_output_pad_new(AgsChannel *channel); #endif /*__AGS_DRUM_OUTPUT_PAD_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_output_line.h0000644000175000017500000000377313247044247017673 00000000000000/* 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 . */ #ifndef __AGS_DRUM_OUTPUT_LINE_H__ #define __AGS_DRUM_OUTPUT_LINE_H__ #include #include #include #include #define AGS_TYPE_DRUM_OUTPUT_LINE (ags_drum_output_line_get_type()) #define AGS_DRUM_OUTPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DRUM_OUTPUT_LINE, AgsDrumOutputLine)) #define AGS_DRUM_OUTPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_DRUM_OUTPUT_LINE, AgsDrumOutputLineClass)) #define AGS_IS_DRUM_OUTPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DRUM_OUTPUT_LINE)) #define AGS_IS_DRUM_OUTPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_DRUM_OUTPUT_LINE)) #define AGS_DRUM_OUTPUT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_DRUM_OUTPUT_LINE, AgsDrumOutputLineClass)) typedef struct _AgsDrumOutputLine AgsDrumOutputLine; typedef struct _AgsDrumOutputLineClass AgsDrumOutputLineClass; struct _AgsDrumOutputLine { AgsLine line; gchar *name; gchar *xml_type; }; struct _AgsDrumOutputLineClass { AgsLineClass line; }; GType ags_drum_output_line_get_type(); AgsDrumOutputLine* ags_drum_output_line_new(AgsChannel *channel); #endif /*__AGS_DRUM_OUTPUT_LINE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_output_line_callbacks.c0000644000175000017500000000502413247044247021654 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include void ags_drum_output_line_resize_pads_callback(AgsDrum *drum, GType channel_type, guint pads_new, guint pads_old, AgsDrumOutputLine *output_line) { AgsAudio *audio; AgsConfig *config; gchar *str; gboolean rt_safe; gboolean performance_mode; audio = AGS_MACHINE(drum)->audio; config = ags_config_get_instance(); str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } if(channel_type == AGS_TYPE_INPUT){ if(pads_new > pads_old){ if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", 0, audio->audio_channels, pads_old, pads_new, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", 0, audio->audio_channels, pads_old, pads_new, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } } } } gsequencer-1.4.24/ags/X/machine/ags_oscillator.c0000644000175000017500000003551313247044247016440 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_oscillator_class_init(AgsOscillatorClass *oscillator); void ags_oscillator_connectable_interface_init(AgsConnectableInterface *connectable); void ags_oscillator_init(AgsOscillator *oscillator); void ags_oscillator_connect(AgsConnectable *connectable); void ags_oscillator_disconnect(AgsConnectable *connectable); /** * SECTION:ags_oscillator * @short_description: oscillator * @title: AgsOscillator * @section_id: * @include: ags/X/machine/ags_oscillator.h * * The #AgsOscillator is a composite widget to act as oscillator. */ enum{ CONTROL_CHANGED, LAST_SIGNAL, }; static gpointer ags_oscillator_parent_class = NULL; static guint oscillator_signals[LAST_SIGNAL]; static AgsConnectableInterface *ags_oscillator_parent_connectable_interface; GType ags_oscillator_get_type(void) { static GType ags_type_oscillator = 0; if(!ags_type_oscillator){ static const GTypeInfo ags_oscillator_info = { sizeof(AgsOscillatorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_oscillator_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsOscillator), 0, /* n_preallocs */ (GInstanceInitFunc) ags_oscillator_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_oscillator_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_oscillator = g_type_register_static(GTK_TYPE_FRAME, "AgsOscillator", &ags_oscillator_info, 0); g_type_add_interface_static(ags_type_oscillator, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_oscillator); } void ags_oscillator_class_init(AgsOscillatorClass *oscillator) { GObjectClass *gobject; GParamSpec *param_spec; ags_oscillator_parent_class = g_type_class_peek_parent(oscillator); /* GObjectClass */ gobject = G_OBJECT_CLASS(oscillator); /* signals */ /** * AgsOscillator::control-change: * @oscillator: the #AgsOscillator * * The ::control-change signal notifies about controls modified. * * Since: 1.0.0 */ oscillator_signals[CONTROL_CHANGED] = g_signal_new("control-changed", G_TYPE_FROM_CLASS(oscillator), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsOscillatorClass, control_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_oscillator_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_oscillator_connectable_parent_interface; ags_oscillator_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_oscillator_connect; connectable->disconnect = ags_oscillator_disconnect; } void ags_oscillator_init(AgsOscillator *oscillator) { GtkTable *table; GtkHBox *hbox; GtkHBox *sync_box; GtkCellRenderer *cell_renderer; GtkListStore *model; GtkTreeIter iter; guint i; oscillator->flags = 0; table = (GtkTable *) gtk_table_new(8, 2, FALSE); gtk_container_add((GtkContainer *) oscillator, (GtkWidget *) table); gtk_table_attach_defaults(table, (GtkWidget *) gtk_label_new(i18n("wave")), 0, 1, 0, 1); /* wave */ oscillator->wave = (GtkComboBox *) gtk_combo_box_text_new(); gtk_table_attach_defaults(table, (GtkWidget *) oscillator->wave, 1, 2, 0, 1); cell_renderer = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(oscillator->wave), cell_renderer, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(oscillator->wave), cell_renderer, "text", 0, NULL); model = gtk_list_store_new(1, G_TYPE_STRING); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "sin", -1); /* gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "cos", -1); */ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, i18n("sawtooth"), -1); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, i18n("square"), -1); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, i18n("triangle"), -1); gtk_combo_box_set_model(oscillator->wave, GTK_TREE_MODEL(model)); gtk_combo_box_set_active(oscillator->wave, 0); /* other controls */ gtk_table_attach_defaults(table, (GtkWidget *) gtk_label_new(i18n("attack")), 2, 3, 0, 1); oscillator->attack = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 100000.0, 1.0); oscillator->attack->adjustment->value = 0.0; gtk_table_attach_defaults(table, (GtkWidget *) oscillator->attack, 3, 4, 0, 1); gtk_table_attach_defaults(table, (GtkWidget *) gtk_label_new(i18n("length")), 4, 5, 0, 1); oscillator->frame_count = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 100000.0, 1.0); oscillator->frame_count->adjustment->value = AGS_OSCILLATOR_DEFAULT_FRAME_COUNT; gtk_table_attach_defaults(table, (GtkWidget *) oscillator->frame_count, 5, 6, 0, 1); gtk_table_attach_defaults(table, (GtkWidget *) gtk_label_new(i18n("phase")), 0, 1, 1, 2); oscillator->phase = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 100000.0, 1.0); oscillator->phase->adjustment->value = 0.0; gtk_table_attach_defaults(table, (GtkWidget *) oscillator->phase, 1, 2, 1, 2); gtk_table_attach_defaults(table, (GtkWidget *) gtk_label_new(i18n("frequency")), 2, 3, 1, 2); oscillator->frequency = (GtkSpinButton *) gtk_spin_button_new_with_range(8.0, 100000.0, 1.0); 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 *) gtk_label_new(i18n("volume")), 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); /* do sync */ oscillator->do_sync = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("sync")); gtk_table_attach_defaults(table, (GtkWidget *) oscillator->do_sync, 6, 7, 0, 1); hbox = (GtkBox *) gtk_hbox_new(TRUE, 0); gtk_table_attach_defaults(table, (GtkWidget *) hbox, 6, 7, 1, 2); oscillator->sync_point_count = AGS_OSCILLATOR_DEFAULT_SYNC_POINT_COUNT; oscillator->sync_point = (GtkSpinButton **) malloc(2 * oscillator->sync_point_count * sizeof(GtkSpinButton *)); for(i = 0; i < oscillator->sync_point_count; i++){ sync_box = (GtkBox *) gtk_hbox_new(TRUE, 0); gtk_box_pack_start(hbox, sync_box, FALSE, FALSE, 0); oscillator->sync_point[2 * i] = gtk_spin_button_new_with_range(0.0, 100000.0, 1.0); gtk_box_pack_start(sync_box, oscillator->sync_point[2 * i], FALSE, FALSE, 0); oscillator->sync_point[2 * i + 1] = gtk_spin_button_new_with_range(0.0, 100000.0, 1.0); gtk_box_pack_start(sync_box, oscillator->sync_point[2 * i + 1], FALSE, FALSE, 0); } } void ags_oscillator_connect(AgsConnectable *connectable) { AgsOscillator *oscillator; guint i; oscillator = AGS_OSCILLATOR(connectable); if((AGS_OSCILLATOR_CONNECTED & (oscillator->flags)) != 0){ return; } oscillator->flags |= AGS_OSCILLATOR_CONNECTED; g_signal_connect(G_OBJECT(oscillator->wave), "changed", G_CALLBACK(ags_oscillator_wave_callback), oscillator); g_signal_connect(G_OBJECT(oscillator->attack), "value-changed", G_CALLBACK(ags_oscillator_attack_callback), oscillator); g_signal_connect(G_OBJECT(oscillator->frame_count), "value-changed", G_CALLBACK(ags_oscillator_frame_count_callback), oscillator); g_signal_connect(G_OBJECT(oscillator->frequency), "value-changed", G_CALLBACK(ags_oscillator_frequency_callback), oscillator); g_signal_connect(G_OBJECT(oscillator->phase), "value-changed", G_CALLBACK(ags_oscillator_phase_callback), oscillator); g_signal_connect(G_OBJECT(oscillator->volume), "value-changed", G_CALLBACK(ags_oscillator_volume_callback), oscillator); for(i = 0; i < 2 * oscillator->sync_point_count; i++){ g_signal_connect(G_OBJECT(oscillator->sync_point[i]), "value-changed", G_CALLBACK(ags_oscillator_sync_point_callback), oscillator); } } void ags_oscillator_disconnect(AgsConnectable *connectable) { AgsOscillator *oscillator; guint i; oscillator = AGS_OSCILLATOR(connectable); if((AGS_OSCILLATOR_CONNECTED & (oscillator->flags)) == 0){ return; } oscillator->flags &= (~AGS_OSCILLATOR_CONNECTED); g_object_disconnect((GObject *) oscillator->wave, "any_signal::changed", G_CALLBACK(ags_oscillator_wave_callback), (gpointer) oscillator, NULL); g_object_disconnect((GObject *) oscillator->frame_count, "any_signal::value-changed", G_CALLBACK(ags_oscillator_frame_count_callback), (gpointer) oscillator, NULL); g_object_disconnect((GObject *) oscillator->attack, "any_signal::value-changed", G_CALLBACK(ags_oscillator_attack_callback), (gpointer) oscillator, NULL); g_object_disconnect((GObject *) oscillator->frequency, "any_signal::value-changed", G_CALLBACK(ags_oscillator_frequency_callback), (gpointer) oscillator, NULL); g_object_disconnect((GObject *) oscillator->phase, "any_signal::value-changed", G_CALLBACK(ags_oscillator_phase_callback), (gpointer) oscillator, NULL); g_object_disconnect((GObject *) oscillator->volume, "any_signal::value-changed", G_CALLBACK(ags_oscillator_volume_callback), (gpointer) oscillator, NULL); for(i = 0; i < 2 * oscillator->sync_point_count; i++){ g_object_disconnect((GObject *) oscillator->sync_point[i], "any_signal::value-changed", G_CALLBACK(ags_oscillator_sync_point_callback), (gpointer) oscillator, NULL); } } void ags_file_read_oscillator(AgsFile *file, xmlNode *node, AgsOscillator **oscillator) { AgsOscillator *gobject; xmlChar *wave; if(*oscillator == NULL){ gobject = (AgsOscillator *) g_object_new(AGS_TYPE_OSCILLATOR, NULL); *oscillator = gobject; }else{ gobject = *oscillator; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); wave = (xmlChar *) xmlGetProp(node, "wave"); if(!xmlStrncmp(wave, "sin", 4)){ gtk_combo_box_set_active(gobject->wave, 0); }else if(!xmlStrncmp(wave, "sawtooth", 9)){ gtk_combo_box_set_active(gobject->wave, 1); }else if(!xmlStrncmp(wave, "square", 7)){ gtk_combo_box_set_active(gobject->wave, 2); }else if(!xmlStrncmp(wave, "triangle", 9)){ gtk_combo_box_set_active(gobject->wave, 3); } gtk_spin_button_set_value(gobject->attack, g_ascii_strtod(xmlGetProp(node, "attack"), NULL)); gtk_spin_button_set_value(gobject->frame_count, g_ascii_strtod(xmlGetProp(node, "frame-count"), NULL)); gtk_spin_button_set_value(gobject->frequency, g_ascii_strtod(xmlGetProp(node, "frequency"), NULL)); gtk_spin_button_set_value(gobject->phase, g_ascii_strtod(xmlGetProp(node, "phase"), NULL)); gtk_spin_button_set_value(gobject->volume, g_ascii_strtod(xmlGetProp(node, "volume"), NULL)); } xmlNode* ags_file_write_oscillator(AgsFile *file, xmlNode *parent, AgsOscillator *oscillator) { xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-oscillator"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", oscillator, NULL)); xmlNewProp(node, "wave", gtk_combo_box_text_get_active_text((GtkComboBoxText *) oscillator->wave)); xmlNewProp(node, "attack", g_strdup_printf("%f", oscillator->attack->adjustment->value)); xmlNewProp(node, "frame-count", g_strdup_printf("%f", oscillator->frame_count->adjustment->value)); xmlNewProp(node, "frequency", g_strdup_printf("%f", oscillator->frequency->adjustment->value)); xmlNewProp(node, "phase", g_strdup_printf("%f", oscillator->phase->adjustment->value)); xmlNewProp(node, "volume", g_strdup_printf("%f", oscillator->volume->adjustment->value)); xmlAddChild(parent, node); return(node); } /** * ags_oscillator_control_changed: * @oscillator: the #AgsOscillator * * The control changed event notifies about changed controls. * * Since: 1.0.0 */ void ags_oscillator_control_changed(AgsOscillator *oscillator) { g_return_if_fail(AGS_IS_OSCILLATOR(oscillator)); g_object_ref((GObject *) oscillator); g_signal_emit(G_OBJECT(oscillator), oscillator_signals[CONTROL_CHANGED], 0); g_object_unref((GObject *) oscillator); } /** * ags_oscillator_new: * * Creates an #AgsOscillator * * Returns: a new #AgsOscillator * * Since: 1.0.0 */ AgsOscillator* ags_oscillator_new() { AgsOscillator *oscillator; oscillator = (AgsOscillator *) g_object_new(AGS_TYPE_OSCILLATOR, NULL); return(oscillator); } gsequencer-1.4.24/ags/X/machine/ags_pattern_box.h0000644000175000017500000000572713247044247016623 00000000000000/* 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 . */ #ifndef __AGS_PATTERN_BOX_H__ #define __AGS_PATTERN_BOX_H__ #include #include #include #include #include #include #define AGS_TYPE_PATTERN_BOX (ags_pattern_box_get_type()) #define AGS_PATTERN_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PATTERN_BOX, AgsPatternBox)) #define AGS_PATTERN_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PATTERN_BOX, AgsPatternBoxClass)) #define AGS_IS_PATTERN_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PATTERN_BOX)) #define AGS_IS_PATTERN_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PATTERN_BOX)) #define AGS_PATTERN_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PATTERN_BOX, AgsPatternBoxClass)) #define AGS_PATTERN_BOX_DEFAULT_PAD_WIDTH (24) #define AGS_PATTERN_BOX_DEFAULT_PAD_HEIGHT (24) #define AGS_PATTERN_BOX_LED_DEFAULT_WIDTH (10) #define AGS_PATTERN_BOX_LED_DEFAULT_HEIGHT (10) #define AGS_PATTERN_BOX_N_CONTROLS (16) #define AGS_PATTERN_BOX_N_INDICES (4) typedef struct _AgsPatternBox AgsPatternBox; typedef struct _AgsPatternBoxClass AgsPatternBoxClass; typedef enum{ AGS_PATTERN_BOX_BLOCK_PATTERN = 1, AGS_PATTERN_BOX_CONNECTED = 1 << 1, }AgsPatternBoxFlags; typedef enum{ AGS_PATTERN_BOX_KEY_L_CONTROL = 1, AGS_PATTERN_BOX_KEY_R_CONTROL = 1 << 1, }AgsPatternBoxKeyMask; typedef enum{ AGS_PATTERN_BOX_MOVE_LEFT, AGS_PATTERN_BOX_MOVE_RIGHT, AGS_PATTERN_BOX_INDEX_DECREMENT, AGS_PATTERN_BOX_INDEX_INCREMENT, AGS_PATTERN_BOX_TOGGLE_PAD, AGS_PATTERN_BOX_COPY_PATTERN, }AgsPatternBoxAction; struct _AgsPatternBox { GtkTable table; guint flags; guint key_mask; guint n_controls; guint n_indices; guint cursor_x; guint cursor_y; guint active_led; AgsHLedArray *hled_array; GtkHBox *pattern; GtkVBox *offset; }; struct _AgsPatternBoxClass { GtkTableClass table; }; GType ags_pattern_box_get_type(void); gboolean ags_pattern_box_led_queue_draw_timeout(AgsPatternBox *pattern_box); void ags_pattern_box_set_pattern(AgsPatternBox *pattern_box); AgsPatternBox* ags_pattern_box_new(); #endif /*__AGS_PATTERN_BOX_H__*/ gsequencer-1.4.24/ags/X/machine/ags_audiorec.h0000644000175000017500000000423013247044247016055 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUDIOREC_H__ #define __AGS_AUDIOREC_H__ #include #include #include #include #define AGS_TYPE_AUDIOREC (ags_audiorec_get_type()) #define AGS_AUDIOREC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIOREC, AgsAudiorec)) #define AGS_AUDIOREC_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUDIOREC, AgsAudiorecClass)) #define AGS_IS_AUDIOREC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_AUDIOREC)) #define AGS_IS_AUDIOREC_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUDIOREC)) #define AGS_AUDIOREC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_AUDIOREC, AgsAudiorecClass)) typedef struct _AgsAudiorec AgsAudiorec; typedef struct _AgsAudiorecClass AgsAudiorecClass; struct _AgsAudiorec { AgsMachine machine; guint mapped_output_pad; guint mapped_input_pad; gchar *name; gchar *xml_type; GtkEntry *filename; GtkButton *open; GtkRadioButton *keep_data; GtkRadioButton *mix_data; GtkRadioButton *replace_data; GtkVBox *hindicator_vbox; GtkFileChooserDialog *open_dialog; }; struct _AgsAudiorecClass { AgsMachineClass machine; }; GType ags_audiorec_get_type(void); void ags_audiorec_open_filename(AgsAudiorec *audiorec, gchar *filename); AgsAudiorec* ags_audiorec_new(GObject *soundcard); #endif /*__AGS_AUDIOREC_H__*/ gsequencer-1.4.24/ags/X/machine/ags_ffplayer_bridge_callbacks.h0000644000175000017500000000177413247044247021417 00000000000000/* 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 . */ #ifndef __AGS_FFPLAYER_BRIDGE_CALLBACKS_H__ #define __AGS_FFPLAYER_BRIDGE_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_FFPLAYER_BRIDGE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_matrix_bridge_callbacks.h0000644000175000017500000000176413247044247021112 00000000000000/* 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 . */ #ifndef __AGS_MATRIX_BRIDGE_CALLBACKS_H__ #define __AGS_MATRIX_BRIDGE_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_MATRIX_BRIDGE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_live_lv2_bridge_callbacks.c0000644000175000017500000003522613247044247021323 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include extern GHashTable *ags_live_lv2_bridge_lv2ui_handle; extern GHashTable *ags_live_lv2_bridge_lv2ui_idle; void ags_live_lv2_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLiveLv2Bridge *live_lv2_bridge) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = AGS_WINDOW(gtk_widget_get_toplevel(widget)); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_LIVE_LV2_BRIDGE)->counter); g_object_set(AGS_MACHINE(live_lv2_bridge), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_LIVE_LV2_BRIDGE); g_free(str); } void ags_live_lv2_bridge_show_gui_callback(GtkMenuItem *item, AgsLiveLv2Bridge *live_lv2_bridge) { AgsWindow *window; GtkWidget *plugin_widget; AgsLv2uiPlugin *lv2ui_plugin; GList *list; gchar *uri; LV2UI_DescriptorFunction lv2ui_descriptor; LV2UI_Descriptor *ui_descriptor; uint32_t ui_index; static const LV2_Feature **feature = { NULL, }; window = gtk_widget_get_ancestor(live_lv2_bridge, AGS_TYPE_WINDOW); if(live_lv2_bridge->gui_uri == NULL){ return; } list = ags_lv2ui_plugin_find_gui_uri(ags_lv2ui_manager_get_instance()->lv2ui_plugin, live_lv2_bridge->gui_uri); if(list == NULL){ return; } lv2ui_plugin = list->data; if(live_lv2_bridge->ui_handle == NULL){ gchar *ui_filename; gchar *bundle_path; LV2_Feature **feature; /* feature array */ live_lv2_bridge->ui_feature = feature = (LV2_Feature **) malloc(3 * sizeof(LV2_Feature *)); /* idle interface */ feature[0] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[0]->URI = LV2_UI__idleInterface; feature[0]->data = NULL; /* show interface */ feature[1] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[1]->URI = LV2_UI__showInterface; feature[1]->data = NULL; feature[2] = NULL; if(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_plugin_so == NULL){ AGS_BASE_PLUGIN(lv2ui_plugin)->ui_plugin_so = dlopen(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, RTLD_NOW); } if(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_plugin_so){ lv2ui_descriptor = (LV2UI_Descriptor *) dlsym(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_plugin_so, "lv2ui_descriptor"); if(dlerror() == NULL && lv2ui_descriptor){ ui_descriptor = lv2ui_descriptor(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_effect_index); ui_filename = AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename; /* instantiate */ plugin_widget = NULL; bundle_path = g_strndup(ui_filename, rindex(ui_filename, '/') - ui_filename); live_lv2_bridge->ui_handle = ui_descriptor->instantiate(ui_descriptor, live_lv2_bridge->uri, bundle_path, ags_live_lv2_bridge_lv2ui_write_function, live_lv2_bridge, &plugin_widget, feature); g_hash_table_insert(ags_live_lv2_bridge_lv2ui_handle, live_lv2_bridge->ui_handle, live_lv2_bridge); ui_descriptor->cleanup = ags_live_lv2_bridge_lv2ui_cleanup_function; if(ui_descriptor->extension_data != NULL){ live_lv2_bridge->ui_feature[0]->data = ui_descriptor->extension_data(LV2_UI__idleInterface); live_lv2_bridge->ui_feature[1]->data = ui_descriptor->extension_data(LV2_UI__showInterface); g_hash_table_insert(ags_live_lv2_bridge_lv2ui_idle, live_lv2_bridge->ui_handle, live_lv2_bridge); g_timeout_add(1000 / 30, (GSourceFunc) ags_live_lv2_bridge_lv2ui_idle_timeout, (gpointer) live_lv2_bridge->ui_handle); } } } } if(live_lv2_bridge->ui_feature != NULL && live_lv2_bridge->ui_feature[1]->data != NULL){ ((struct _LV2UI_Show_Interface *) live_lv2_bridge->ui_feature[1]->data)->show(live_lv2_bridge->ui_handle); } } gboolean ags_live_lv2_bridge_delete_event_callback(GtkWidget *widget, GdkEvent *event, AgsLiveLv2Bridge *live_lv2_bridge) { return(TRUE); } void ags_live_lv2_bridge_lv2ui_cleanup_function(LV2UI_Handle handle) { AgsLiveLv2Bridge *live_lv2_bridge; AgsLv2uiPlugin *lv2ui_plugin; GList *list; live_lv2_bridge = g_hash_table_lookup(ags_live_lv2_bridge_lv2ui_handle, handle); if(live_lv2_bridge != NULL){ list = ags_lv2ui_plugin_find_gui_uri(ags_lv2ui_manager_get_instance()->lv2ui_plugin, live_lv2_bridge->gui_uri); g_message("%s", live_lv2_bridge->gui_uri); if(list != NULL){ lv2ui_plugin = list->data; AGS_BASE_PLUGIN(lv2ui_plugin)->ui_plugin_so = NULL; } g_hash_table_remove(ags_live_lv2_bridge_lv2ui_handle, live_lv2_bridge->ui_handle); live_lv2_bridge->ui_handle = NULL; } } void ags_live_lv2_bridge_lv2ui_write_function(LV2UI_Controller controller, uint32_t port_index, uint32_t buffer_size, uint32_t port_protocol, const void *buffer) { AgsLiveLv2Bridge *live_lv2_bridge; GtkWidget *widget; AgsAudio *audio; AgsPlayLv2Audio *play_lv2_audio; GList *effect_plugin; GList *recall; GList *port; gchar *control_port; GValue value = {0,}; live_lv2_bridge = (AgsLiveLv2Bridge *) controller; if(live_lv2_bridge == NULL){ g_warning("ags_live_lv2_bridge_lv2ui_write_function() - live_lv2_bridge == NULL"); return; } audio = AGS_MACHINE(live_lv2_bridge)->audio; switch(port_protocol){ case 0: { if(buffer_size == sizeof(float)){ g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, * ((float *) buffer)); }else{ g_value_init(&value, G_TYPE_POINTER); g_value_set_pointer(&value, buffer); } } break; default: g_warning("unknown lv2 port protocol"); } /* play */ recall = ags_recall_get_by_effect(audio->play, live_lv2_bridge->filename, live_lv2_bridge->effect); if(recall != NULL){ play_lv2_audio = recall->data; port = AGS_RECALL(play_lv2_audio)->port; control_port = g_strdup_printf("%d/%d", port_index + 1, g_list_length(port)); while(port != NULL){ if(!g_ascii_strncasecmp(AGS_PORT(port->data)->control_port, control_port, strlen(control_port))){ ags_port_safe_write(port->data, &value); break; } port = port->next; } free(control_port); } g_list_free(recall); /* recall */ recall = ags_recall_get_by_effect(audio->recall, live_lv2_bridge->filename, live_lv2_bridge->effect); if(recall != NULL){ play_lv2_audio = recall->data; port = AGS_RECALL(play_lv2_audio)->port; control_port = g_strdup_printf("%d/%d", port_index + 1, g_list_length(port)); while(port != NULL){ if(!g_ascii_strncasecmp(AGS_PORT(port->data)->control_port, control_port, strlen(control_port))){ ags_port_safe_write(port->data, &value); break; } port = port->next; } free(control_port); } g_list_free(recall); } void ags_live_lv2_bridge_program_changed_callback(GtkComboBox *combo_box, AgsLiveLv2Bridge *live_lv2_bridge) { GtkTreeIter iter; if(gtk_combo_box_get_active_iter(combo_box, &iter)){ AgsAudio *audio; AgsLv2Plugin *lv2_plugin; LV2_Programs_Interface *program_interface; GList *port_descriptor_start, *port_descriptor; GList *bulk_member, *bulk_member_start; GList *recall; GList *port; gchar *name; gchar *specifier; guint bank, program; guint i; lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), live_lv2_bridge->filename, live_lv2_bridge->effect); /* get program */ gtk_tree_model_get(gtk_combo_box_get_model(combo_box), &iter, 0, &name, 1, &bank, 2, &program, -1); #ifdef AGS_DEBUG g_message("%d %d", bank, program); #endif program_interface = live_lv2_bridge->lv2_descriptor->extension_data(LV2_PROGRAMS__Interface); program_interface->select_program(live_lv2_bridge->lv2_handle[0], bank, program); /* update ports */ audio = AGS_MACHINE(live_lv2_bridge)->audio; port_descriptor_start = AGS_BASE_PLUGIN(lv2_plugin)->port; recall = audio->play; while((recall = ags_recall_find_type(recall, AGS_TYPE_PLAY_LV2_AUDIO)) != NULL){ AGS_PLAY_LV2_AUDIO(recall->data)->bank = (uint32_t) bank; AGS_PLAY_LV2_AUDIO(recall->data)->program = (uint32_t) program; port_descriptor = port_descriptor_start; for(i = 0; port_descriptor != NULL;){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; port = AGS_RECALL(recall->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, specifier)){ GValue value = {0,}; #ifdef AGS_DEBUG g_message("%s %f", specifier, live_lv2_bridge->port_value[i]); #endif g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, live_lv2_bridge->port_value[i]); ags_port_safe_write_raw(port->data, &value); break; } port = port->next; } i++; } } port_descriptor = port_descriptor->next; } recall = recall->next; } /* update UI */ bulk_member_start = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(live_lv2_bridge)->bridge)->bulk_output)->table); port_descriptor = port_descriptor_start; for(i = 0; port_descriptor != NULL;){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ /* find bulk member */ bulk_member = bulk_member_start; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; #ifdef AGS_DEBUG g_message("%s", specifier); #endif while(bulk_member != NULL){ if(AGS_IS_BULK_MEMBER(bulk_member->data) && !g_strcmp0(AGS_BULK_MEMBER(bulk_member->data)->specifier, specifier)){ GtkWidget *child_widget; AGS_BULK_MEMBER(bulk_member->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; child_widget = gtk_bin_get_child((GtkBin *) AGS_BULK_MEMBER(bulk_member->data)); if(GTK_IS_TOGGLE_BUTTON(child_widget)){ if(live_lv2_bridge->port_value[i] == 0.0){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, FALSE); }else{ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, TRUE); } }else if(AGS_IS_DIAL(child_widget)){ gdouble val; val = live_lv2_bridge->port_value[i]; AGS_DIAL(child_widget)->adjustment->value = val; ags_dial_draw((AgsDial *) child_widget); #ifdef AGS_DEBUG g_message(" --- %f", live_lv2_bridge->port_value[i]); #endif } AGS_BULK_MEMBER(bulk_member->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); break; } bulk_member = bulk_member->next; } i++; } } port_descriptor = port_descriptor->next; } g_list_free(bulk_member_start); } } void ags_live_lv2_bridge_preset_changed_callback(GtkComboBox *combo_box, AgsLiveLv2Bridge *live_lv2_bridge) { GtkContainer *container; AgsLv2Conversion *lv2_conversion; AgsLv2Plugin *lv2_plugin; AgsLv2Preset *lv2_preset; GList *list, *list_start; GList *port_preset; GList *port_descriptor; gchar *preset_label; gdouble value; preset_label = gtk_combo_box_text_get_active_text(combo_box); /* retrieve lv2 plugin */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), live_lv2_bridge->filename, live_lv2_bridge->effect); /* preset */ lv2_preset = NULL; list = ags_lv2_preset_find_preset_label(lv2_plugin->preset, preset_label); if(list != NULL){ lv2_preset = list->data; } /* port preset */ if(lv2_preset == NULL){ return; } container = AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(live_lv2_bridge)->bridge)->bulk_output)->table; port_preset = lv2_preset->port_preset; while(port_preset != NULL){ port_descriptor = ags_port_descriptor_find_symbol(AGS_BASE_PLUGIN(lv2_plugin)->port, AGS_LV2_PORT_PRESET(port_preset->data)->port_symbol); value = (gdouble) g_value_get_float(AGS_LV2_PORT_PRESET(port_preset->data)->port_value); list_start = list = gtk_container_get_children(container); while(list != NULL){ if(!g_strcmp0(AGS_BULK_MEMBER(list->data)->specifier, AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name)){ GtkWidget *child_widget; // AGS_BULK_MEMBER(list->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; child_widget = gtk_bin_get_child((GtkBin *) AGS_BULK_MEMBER(list->data)); lv2_conversion = (AgsLv2Conversion *) AGS_BULK_MEMBER(list->data)->conversion; if(GTK_IS_TOGGLE_BUTTON(child_widget)){ if(value == 0.0){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, FALSE); }else{ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, TRUE); } }else if(AGS_IS_DIAL(child_widget)){ if(lv2_conversion != NULL){ // val = ags_lv2_conversion_convert(lv2_conversion, // value, // TRUE); } gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, value); ags_dial_draw((AgsDial *) child_widget); } // AGS_BULK_MEMBER(list->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); break; } list = list->next; } g_list_free(list_start); port_preset = port_preset->next; } } gsequencer-1.4.24/ags/X/machine/ags_ffplayer_input_pad_callbacks.c0000644000175000017500000000147613246707333022141 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/machine/ags_ffplayer_input_line.c0000644000175000017500000001352513247044247020322 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_ffplayer_input_line_class_init(AgsFFPlayerInputLineClass *ffplayer_input_line); void ags_ffplayer_input_line_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ffplayer_input_line_plugin_interface_init(AgsPluginInterface *plugin); void ags_ffplayer_input_line_init(AgsFFPlayerInputLine *ffplayer_input_line); void ags_ffplayer_input_line_connect(AgsConnectable *connectable); void ags_ffplayer_input_line_disconnect(AgsConnectable *connectable); void ags_ffplayer_input_line_finalize(GObject *gobject); /** * SECTION:ags_ffplayer_input_line * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsFFPlayerInputLine * @section_id: * @include: ags/X/machine/ags_ffplayer_input_line.h * * #AgsFFPlayerInputLine is a composite widget to visualize one #AgsChannel. It should be * packed by an #AgsFFPlayerInputLine. */ enum{ RESIZE_LINES, LAST_SIGNAL, }; static gpointer ags_ffplayer_input_line_parent_class = NULL; static AgsConnectableInterface *ags_ffplayer_input_line_parent_connectable_interface; static guint ffplayer_input_line_signals[LAST_SIGNAL]; GType ags_ffplayer_input_line_get_type(void) { static GType ags_type_ffplayer_input_line = 0; if(!ags_type_ffplayer_input_line){ static const GTypeInfo ags_ffplayer_input_line_info = { sizeof(AgsFFPlayerInputLineClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ffplayer_input_line_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsFFPlayerInputLine), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ffplayer_input_line_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ffplayer_input_line_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_ffplayer_input_line_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ffplayer_input_line = g_type_register_static(AGS_TYPE_EFFECT_LINE, "AgsFFPlayerInputLine", &ags_ffplayer_input_line_info, 0); g_type_add_interface_static(ags_type_ffplayer_input_line, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_ffplayer_input_line, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_ffplayer_input_line); } void ags_ffplayer_input_line_class_init(AgsFFPlayerInputLineClass *ffplayer_input_line) { GObjectClass *gobject; ags_ffplayer_input_line_parent_class = g_type_class_peek_parent(ffplayer_input_line); /* GObjectClass */ gobject = G_OBJECT_CLASS(ffplayer_input_line); gobject->finalize = ags_ffplayer_input_line_finalize; } void ags_ffplayer_input_line_connectable_interface_init(AgsConnectableInterface *connectable) { ags_ffplayer_input_line_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_ffplayer_input_line_connect; connectable->disconnect = ags_ffplayer_input_line_disconnect; } void ags_ffplayer_input_line_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_ffplayer_input_line_init(AgsFFPlayerInputLine *ffplayer_input_line) { g_signal_connect_after(ffplayer_input_line, "notify::channel", G_CALLBACK(ags_ffplayer_input_line_notify_channel_callback), NULL); } void ags_ffplayer_input_line_connect(AgsConnectable *connectable) { if((AGS_EFFECT_LINE_CONNECTED & (AGS_EFFECT_LINE(connectable)->flags)) != 0){ return; } ags_ffplayer_input_line_parent_connectable_interface->connect(connectable); } void ags_ffplayer_input_line_disconnect(AgsConnectable *connectable) { if((AGS_EFFECT_LINE_CONNECTED & (AGS_EFFECT_LINE(connectable)->flags)) == 0){ return; } ags_ffplayer_input_line_parent_connectable_interface->disconnect(connectable); } void ags_ffplayer_input_line_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_ffplayer_input_line_parent_class)->finalize(gobject); } /** * ags_ffplayer_input_line_new: * @channel: the #AgsChannel to visualize * * Creates an #AgsFFPlayerInputLine * * Returns: a new #AgsFFPlayerInputLine * * Since: 1.0.0 */ AgsFFPlayerInputLine* ags_ffplayer_input_line_new(AgsChannel *channel) { AgsFFPlayerInputLine *ffplayer_input_line; ffplayer_input_line = (AgsFFPlayerInputLine *) g_object_new(AGS_TYPE_FFPLAYER_INPUT_LINE, "channel", channel, NULL); return(ffplayer_input_line); } gsequencer-1.4.24/ags/X/machine/ags_drum_input_line_callbacks.c0000644000175000017500000000153713247044247021460 00000000000000/* 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 . */ #include #include gsequencer-1.4.24/ags/X/machine/ags_ffplayer_input_pad.h0000644000175000017500000000412513246707333020141 00000000000000/* 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 . */ #ifndef __AGS_FFPLAYER_INPUT_PAD_H__ #define __AGS_FFPLAYER_INPUT_PAD_H__ #include #include #include #include #include #define AGS_TYPE_FFPLAYER_INPUT_PAD (ags_ffplayer_input_pad_get_type()) #define AGS_FFPLAYER_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FFPLAYER_INPUT_PAD, AgsFFPlayerInputPad)) #define AGS_FFPLAYER_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FFPLAYER_INPUT_PAD, AgsFFPlayerInputPadClass)) #define AGS_IS_FFPLAYER_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_FFPLAYER_INPUT_PAD)) #define AGS_IS_FFPLAYER_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_FFPLAYER_INPUT_PAD)) #define AGS_FFPLAYER_INPUT_PAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_FFPLAYER_INPUT_PAD, AgsFFPlayerInputPadClass)) typedef struct _AgsFFPlayerInputPad AgsFFPlayerInputPad; typedef struct _AgsFFPlayerInputPadClass AgsFFPlayerInputPadClass; struct _AgsFFPlayerInputPad { AgsEffectPad effect_pad; }; struct _AgsFFPlayerInputPadClass { AgsEffectPadClass effect_pad; }; GType ags_ffplayer_input_pad_get_type(void); AgsFFPlayerInputPad* ags_ffplayer_input_pad_new(AgsChannel *channel); #endif /*__AGS_FFPLAYER_INPUT_PAD_H__*/ gsequencer-1.4.24/ags/X/machine/ags_ffplayer_bridge.c0000644000175000017500000001452313247044247017407 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_ffplayer_bridge_class_init(AgsFFPlayerBridgeClass *ffplayer_bridge); void ags_ffplayer_bridge_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ffplayer_bridge_plugin_interface_init(AgsPluginInterface *plugin); void ags_ffplayer_bridge_init(AgsFFPlayerBridge *ffplayer_bridge); void ags_ffplayer_bridge_connect(AgsConnectable *connectable); void ags_ffplayer_bridge_disconnect(AgsConnectable *connectable); /** * SECTION:ags_ffplayer_bridge * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsFFPlayerBridge * @section_id: * @include: ags/X/machine/ags_ffplayer_bridge.h * * #AgsFFPlayerBridge is a composite widget to visualize all #AgsChannel. It should be * packed by an #AgsMachine. */ static gpointer ags_ffplayer_bridge_parent_class = NULL; static AgsConnectableInterface *ags_ffplayer_bridge_parent_connectable_interface; GType ags_ffplayer_bridge_get_type(void) { static GType ags_type_ffplayer_bridge = 0; if(!ags_type_ffplayer_bridge){ static const GTypeInfo ags_ffplayer_bridge_info = { sizeof(AgsFFPlayerBridgeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ffplayer_bridge_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsFFPlayerBridge), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ffplayer_bridge_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ffplayer_bridge_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_ffplayer_bridge_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ffplayer_bridge = g_type_register_static(AGS_TYPE_EFFECT_BRIDGE, "AgsFFPlayerBridge", &ags_ffplayer_bridge_info, 0); g_type_add_interface_static(ags_type_ffplayer_bridge, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_ffplayer_bridge, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_ffplayer_bridge); } void ags_ffplayer_bridge_class_init(AgsFFPlayerBridgeClass *ffplayer_bridge) { ags_ffplayer_bridge_parent_class = g_type_class_peek_parent(ffplayer_bridge); } void ags_ffplayer_bridge_connectable_interface_init(AgsConnectableInterface *connectable) { ags_ffplayer_bridge_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_ffplayer_bridge_connect; connectable->disconnect = ags_ffplayer_bridge_disconnect; } void ags_ffplayer_bridge_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_ffplayer_bridge_init(AgsFFPlayerBridge *ffplayer_bridge) { GtkFrame *frame; GtkExpander *expander; GtkTable *table; AGS_EFFECT_BRIDGE(ffplayer_bridge)->input_pad_type = AGS_TYPE_FFPLAYER_INPUT_PAD; AGS_EFFECT_BRIDGE(ffplayer_bridge)->input_line_type = AGS_TYPE_FFPLAYER_INPUT_LINE; frame = (GtkFrame *) gtk_frame_new("input bridge"); gtk_box_pack_start((GtkBox *) AGS_EFFECT_BRIDGE(ffplayer_bridge), (GtkWidget *) frame, FALSE, FALSE, 0); expander = (GtkExpander *) gtk_expander_new("show/hide"); gtk_container_add((GtkContainer *) frame, (GtkWidget *) expander); table = (GtkTable *) gtk_table_new(1, 2, FALSE); gtk_container_add((GtkContainer *) expander, (GtkWidget *) table); AGS_EFFECT_BRIDGE(ffplayer_bridge)->bulk_input = (GtkWidget *) g_object_new(AGS_TYPE_FFPLAYER_BULK_INPUT, NULL); gtk_table_attach(table, (GtkWidget *) AGS_EFFECT_BRIDGE(ffplayer_bridge)->bulk_input, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); AGS_EFFECT_BRIDGE(ffplayer_bridge)->input = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_table_attach(table, (GtkWidget *) AGS_EFFECT_BRIDGE(ffplayer_bridge)->input, 1, 2, 0, 1, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); } void ags_ffplayer_bridge_connect(AgsConnectable *connectable) { if((AGS_EFFECT_BRIDGE_CONNECTED & (AGS_EFFECT_BRIDGE(connectable)->flags)) != 0){ return; } ags_ffplayer_bridge_parent_connectable_interface->connect(connectable); //TODO:JK: implement me } void ags_ffplayer_bridge_disconnect(AgsConnectable *connectable) { if((AGS_EFFECT_BRIDGE_CONNECTED & (AGS_EFFECT_BRIDGE(connectable)->flags)) == 0){ return; } ags_ffplayer_bridge_parent_connectable_interface->disconnect(connectable); //TODO:JK: implement me } /** * ags_ffplayer_bridge_new: * @audio: the #AgsAudio to visualize * * Creates an #AgsFFPlayerBridge * * Returns: a new #AgsFFPlayerBridge * * Since: 1.0.0 */ AgsFFPlayerBridge* ags_ffplayer_bridge_new(AgsAudio *audio) { AgsFFPlayerBridge *ffplayer_bridge; ffplayer_bridge = (AgsFFPlayerBridge *) g_object_new(AGS_TYPE_FFPLAYER_BRIDGE, "audio", audio, NULL); return(ffplayer_bridge); } gsequencer-1.4.24/ags/X/machine/ags_live_dssi_bridge.h0000644000175000017500000000627213247044247017567 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LIVE_DSSI_BRIDGE_H__ #define __AGS_LIVE_DSSI_BRIDGE_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_LIVE_DSSI_BRIDGE (ags_live_dssi_bridge_get_type()) #define AGS_LIVE_DSSI_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LIVE_DSSI_BRIDGE, AgsLiveDssiBridge)) #define AGS_LIVE_DSSI_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LIVE_DSSI_BRIDGE, AgsLiveDssiBridgeClass)) #define AGS_IS_LIVE_DSSI_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_LIVE_DSSI_BRIDGE)) #define AGS_IS_LIVE_DSSI_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_LIVE_DSSI_BRIDGE)) #define AGS_LIVE_DSSI_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_LIVE_DSSI_BRIDGE, AgsLiveDssiBridgeClass)) #define AGS_LIVE_DSSI_BRIDGE_DEFAULT_VERSION "0.7.134" #define AGS_LIVE_DSSI_BRIDGE_DEFAULT_BUILD_ID "CEST 14-04-2017 21:10" typedef struct _AgsLiveDssiBridge AgsLiveDssiBridge; typedef struct _AgsLiveDssiBridgeClass AgsLiveDssiBridgeClass; typedef enum{ AGS_LIVE_DSSI_BRIDGE_DISPLAY_INPUT = 1, AGS_LIVE_DSSI_BRIDGE_BULK_OUTPUT = 1 << 1, AGS_LIVE_DSSI_BRIDGE_DISPLAY_OUTPUT = 1 << 2, AGS_LIVE_DSSI_BRIDGE_BULK_INPUT = 1 << 3, }AgsLiveDssiBridgeFlags; struct _AgsLiveDssiBridge { AgsMachine machine; guint flags; gchar *name; gchar *version; gchar *build_id; gchar *xml_type; guint mapped_output_pad; guint mapped_input_pad; gchar *filename; gchar *effect; unsigned long effect_index; DSSI_Descriptor *dssi_descriptor; LADSPA_Handle ladspa_handle; LADSPA_Data *port_values; GtkComboBoxText *program; }; struct _AgsLiveDssiBridgeClass { AgsMachineClass machine; }; GType ags_live_dssi_bridge_get_type(void); void ags_live_dssi_bridge_input_map_recall(AgsLiveDssiBridge *live_dssi_bridge, guint audio_channel_start, guint input_pad_start); void ags_live_dssi_bridge_output_map_recall(AgsLiveDssiBridge *live_dssi_bridge, guint audio_channel_start, guint output_pad_start); void ags_live_dssi_bridge_load(AgsLiveDssiBridge *live_dssi_bridge); AgsLiveDssiBridge* ags_live_dssi_bridge_new(GObject *soundcard, gchar *filename, gchar *effect); #endif /*__AGS_LIVE_DSSI_BRIDGE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_syncsynth.c0000644000175000017500000012316713247044247016332 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_syncsynth_class_init(AgsSyncsynthClass *syncsynth); void ags_syncsynth_connectable_interface_init(AgsConnectableInterface *connectable); void ags_syncsynth_plugin_interface_init(AgsPluginInterface *plugin); void ags_syncsynth_init(AgsSyncsynth *syncsynth); void ags_syncsynth_finalize(GObject *gobject); void ags_syncsynth_connect(AgsConnectable *connectable); void ags_syncsynth_disconnect(AgsConnectable *connectable); void ags_syncsynth_show(GtkWidget *widget); void ags_syncsynth_map_recall(AgsMachine *machine); gchar* ags_syncsynth_get_name(AgsPlugin *plugin); void ags_syncsynth_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_syncsynth_get_xml_type(AgsPlugin *plugin); void ags_syncsynth_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_syncsynth_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_syncsynth_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine); xmlNode* ags_syncsynth_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_syncsynth_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_syncsynth_resize_pads(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, gpointer data); void ags_syncsynth_input_map_recall(AgsSyncsynth *syncsynth, guint input_pad_start); void ags_syncsynth_output_map_recall(AgsSyncsynth *syncsynth, guint output_pad_start); /** * SECTION:ags_syncsynth * @short_description: syncsynth * @title: AgsSyncsynth * @section_id: * @include: ags/X/machine/ags_syncsynth.h * * The #AgsSyncsynth is a composite widget to act as syncsynth. */ static gpointer ags_syncsynth_parent_class = NULL; static AgsConnectableInterface *ags_syncsynth_parent_connectable_interface; GType ags_syncsynth_get_type(void) { static GType ags_type_syncsynth = 0; if(!ags_type_syncsynth){ static const GTypeInfo ags_syncsynth_info = { sizeof(AgsSyncsynthClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_syncsynth_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsSyncsynth), 0, /* n_preallocs */ (GInstanceInitFunc) ags_syncsynth_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_syncsynth_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_syncsynth_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_syncsynth = g_type_register_static(AGS_TYPE_MACHINE, "AgsSyncsynth", &ags_syncsynth_info, 0); g_type_add_interface_static(ags_type_syncsynth, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_syncsynth, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_syncsynth); } void ags_syncsynth_class_init(AgsSyncsynthClass *syncsynth) { GObjectClass *gobject; AgsMachineClass *machine; ags_syncsynth_parent_class = g_type_class_peek_parent(syncsynth); /* GObjectClass */ gobject = (GObjectClass *) syncsynth; gobject->finalize = ags_syncsynth_finalize; /* AgsMachineClass */ machine = (AgsMachineClass *) syncsynth; machine->map_recall = ags_syncsynth_map_recall; } void ags_syncsynth_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_syncsynth_connectable_parent_interface; ags_syncsynth_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_syncsynth_connect; connectable->disconnect = ags_syncsynth_disconnect; } void ags_syncsynth_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_syncsynth_get_name; plugin->set_name = ags_syncsynth_set_name; plugin->get_xml_type = ags_syncsynth_get_xml_type; plugin->set_xml_type = ags_syncsynth_set_xml_type; plugin->read = ags_syncsynth_read; plugin->write = ags_syncsynth_write; } void ags_syncsynth_init(AgsSyncsynth *syncsynth) { GtkHBox *hbox; GtkVBox *vbox; GtkTable *table; GtkLabel *label; AgsAudio *audio; g_signal_connect_after((GObject *) syncsynth, "parent_set", G_CALLBACK(ags_syncsynth_parent_set_callback), (gpointer) syncsynth); audio = AGS_MACHINE(syncsynth)->audio; audio->flags |= (AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_TAKES_SYNTH | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_NOTATION_DEFAULT | AGS_AUDIO_REVERSE_MAPPING); g_object_set(audio, "audio-start-mapping", 0, "audio-end-mapping", 128, "midi-start-mapping", 0, "midi-end-mapping", 128, NULL); AGS_MACHINE(syncsynth)->flags |= (AGS_MACHINE_IS_SYNTHESIZER | AGS_MACHINE_REVERSE_NOTATION); AGS_MACHINE(syncsynth)->mapping_flags |= AGS_MACHINE_MONO; AGS_MACHINE(syncsynth)->input_pad_type = G_TYPE_NONE; AGS_MACHINE(syncsynth)->input_line_type = G_TYPE_NONE; AGS_MACHINE(syncsynth)->output_pad_type = G_TYPE_NONE; AGS_MACHINE(syncsynth)->output_line_type = G_TYPE_NONE; /* context menu */ ags_machine_popup_add_connection_options(syncsynth, (AGS_MACHINE_POPUP_MIDI_DIALOG)); /* audio resize */ g_signal_connect_after(G_OBJECT(syncsynth), "resize-audio-channels", G_CALLBACK(ags_syncsynth_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(syncsynth), "resize-pads", G_CALLBACK(ags_syncsynth_resize_pads), NULL); /* create widgets */ syncsynth->flags = 0; /* mapped IO */ syncsynth->mapped_input_pad = 0; syncsynth->mapped_output_pad = 0; /* context menu */ ags_machine_popup_add_edit_options((AgsMachine *) syncsynth, (AGS_MACHINE_POPUP_ENVELOPE)); /* name and xml type */ syncsynth->name = NULL; syncsynth->xml_type = "ags-syncsynth"; /* create widgets */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_container_add((GtkContainer*) (gtk_bin_get_child((GtkBin *) syncsynth)), (GtkWidget *) hbox); syncsynth->oscillator = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) syncsynth->oscillator, FALSE, FALSE, 0); /* add 2 oscillators */ ags_syncsynth_add_oscillator(syncsynth, ags_oscillator_new()); ags_syncsynth_add_oscillator(syncsynth, ags_oscillator_new()); /* add and remove buttons */ vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) vbox, FALSE, FALSE, 0); syncsynth->add = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) syncsynth->add, FALSE, FALSE, 0); syncsynth->remove = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) syncsynth->remove, FALSE, FALSE, 0); /* update */ vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) vbox, FALSE, FALSE, 0); syncsynth->auto_update = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("auto update")); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) syncsynth->auto_update, FALSE, FALSE, 0); syncsynth->update = (GtkButton *) gtk_button_new_with_label(i18n("update")); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) syncsynth->update, FALSE, FALSE, 0); /* table */ table = (GtkTable *) gtk_table_new(3, 2, FALSE); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) table, FALSE, FALSE, 0); /* lower - frequency */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("lower"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); syncsynth->lower = (GtkSpinButton *) gtk_spin_button_new_with_range(AGS_SYNCSYNTH_BASE_NOTE_MIN, AGS_SYNCSYNTH_BASE_NOTE_MAX, 1.0); syncsynth->lower->adjustment->value = -48.0; gtk_table_attach(table, GTK_WIDGET(syncsynth->lower), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); /* loop start */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("loop start"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); syncsynth->loop_start = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_OSCILLATOR_DEFAULT_FRAME_COUNT, 1.0); gtk_table_attach(table, GTK_WIDGET(syncsynth->loop_start), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* loop end */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("loop end"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); syncsynth->loop_end = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_OSCILLATOR_DEFAULT_FRAME_COUNT, 1.0); gtk_table_attach(table, GTK_WIDGET(syncsynth->loop_end), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); } void ags_syncsynth_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_syncsynth_parent_class)->finalize(gobject); } void ags_syncsynth_connect(AgsConnectable *connectable) { AgsSyncsynth *syncsynth; GList *list_start, *list; GList *child_start; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_syncsynth_parent_connectable_interface->connect(connectable); /* AgsSyncsynth */ syncsynth = AGS_SYNCSYNTH(connectable); list = list_start = gtk_container_get_children(syncsynth->oscillator); while(list != NULL){ child_start = gtk_container_get_children(list->data); ags_connectable_connect(AGS_CONNECTABLE(child_start->next->data)); g_signal_connect((GObject *) child_start->next->data, "control-changed", G_CALLBACK(ags_syncsynth_oscillator_control_changed_callback), (gpointer) syncsynth); g_list_free(child_start); list = list->next; } g_list_free(list_start); g_signal_connect((GObject *) syncsynth->add, "clicked", G_CALLBACK(ags_syncsynth_add_callback), (gpointer) syncsynth); g_signal_connect((GObject *) syncsynth->remove, "clicked", G_CALLBACK(ags_syncsynth_remove_callback), (gpointer) syncsynth); g_signal_connect((GObject *) syncsynth->auto_update, "toggled", G_CALLBACK(ags_syncsynth_auto_update_callback), syncsynth); g_signal_connect((GObject *) syncsynth->update, "clicked", G_CALLBACK(ags_syncsynth_update_callback), (gpointer) syncsynth); } void ags_syncsynth_disconnect(AgsConnectable *connectable) { AgsSyncsynth *syncsynth; GList *list_start, *list; GList *child_start; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } ags_syncsynth_parent_connectable_interface->disconnect(connectable); /* AgsSyncsynth */ syncsynth = AGS_SYNCSYNTH(connectable); list = list_start = gtk_container_get_children(syncsynth->oscillator); while(list != NULL){ child_start = gtk_container_get_children(list->data); ags_connectable_disconnect(AGS_CONNECTABLE(child_start->next->data)); g_object_disconnect((GObject *) child_start->next->data, "any_signal::control-changed", G_CALLBACK(ags_syncsynth_oscillator_control_changed_callback), (gpointer) syncsynth, NULL); g_list_free(child_start); list = list->next; } g_list_free(list_start); g_object_disconnect((GObject *) syncsynth->add, "any_signal::clicked", G_CALLBACK(ags_syncsynth_add_callback), (gpointer) syncsynth, NULL); g_object_disconnect((GObject *) syncsynth->remove, "any_signal::clicked", G_CALLBACK(ags_syncsynth_remove_callback), (gpointer) syncsynth, NULL); g_object_disconnect((GObject *) syncsynth->auto_update, "any_signal::toggled", G_CALLBACK(ags_syncsynth_auto_update_callback), syncsynth, NULL); g_object_disconnect((GObject *) syncsynth->update, "any_signal::clicked", G_CALLBACK(ags_syncsynth_update_callback), (gpointer) syncsynth, NULL); } void ags_syncsynth_map_recall(AgsMachine *machine) { AgsWindow *window; AgsSyncsynth *syncsynth; AgsAudio *audio; AgsDelayAudio *play_delay_audio; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsRecordMidiAudio *recall_record_midi_audio; AgsRecordMidiAudioRun *recall_record_midi_audio_run; AgsPlayNotationAudio *recall_notation_audio; AgsPlayNotationAudioRun *recall_notation_audio_run; GList *list; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } syncsynth = AGS_SYNCSYNTH(machine); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); audio = machine->audio; /* ags-delay */ ags_recall_factory_create(audio, NULL, NULL, "ags-delay", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); list = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(list != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(list->data); // AGS_RECALL(play_delay_audio_run)->flags |= AGS_RECALL_PERSISTENT; }else{ play_delay_audio_run = NULL; } /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); list = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ GValue value = {0,}; play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run", play_delay_audio_run, NULL); ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run), window->navigation->position_tact->adjustment->value, TRUE); g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, gtk_toggle_button_get_active((GtkToggleButton *) window->navigation->loop)); ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(play_count_beats_audio_run)->recall_audio)->notation_loop, &value); }else{ play_count_beats_audio_run = NULL; } /* ags-record-midi */ ags_recall_factory_create(audio, NULL, NULL, "ags-record-midi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); list = ags_recall_find_type(audio->recall, AGS_TYPE_RECORD_MIDI_AUDIO_RUN); if(list != NULL){ recall_record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } /* ags-play-notation */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-notation", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); list = ags_recall_find_type(audio->recall, AGS_TYPE_PLAY_NOTATION_AUDIO_RUN); if(list != NULL){ recall_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } /* depending on destination */ ags_syncsynth_input_map_recall(syncsynth, 0); /* depending on destination */ ags_syncsynth_output_map_recall(syncsynth, 0); /* call parent */ AGS_MACHINE_CLASS(ags_syncsynth_parent_class)->map_recall(machine); } gchar* ags_syncsynth_get_name(AgsPlugin *plugin) { return(AGS_SYNCSYNTH(plugin)->name); } void ags_syncsynth_set_name(AgsPlugin *plugin, gchar *name) { AGS_SYNCSYNTH(plugin)->name = name; } gchar* ags_syncsynth_get_xml_type(AgsPlugin *plugin) { return(AGS_SYNCSYNTH(plugin)->xml_type); } void ags_syncsynth_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_SYNCSYNTH(plugin)->xml_type = xml_type; } void ags_syncsynth_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsSyncsynth *gobject; AgsFileLookup *file_lookup; GList *list; gobject = AGS_SYNCSYNTH(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* lookup */ list = file->lookup; while((list = ags_file_lookup_find_by_node(list, node->parent)) != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); if(g_signal_handler_find(list->data, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, ags_file_read_machine_resolve_audio, NULL) != 0){ g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_syncsynth_read_resolve_audio), gobject); break; } list = list->next; } } void ags_syncsynth_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsSyncsynth *syncsynth; syncsynth = AGS_SYNCSYNTH(machine); g_signal_connect_after(G_OBJECT(machine), "resize-audio-channels", G_CALLBACK(ags_syncsynth_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(machine), "resize-pads", G_CALLBACK(ags_syncsynth_resize_pads), NULL); if((AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) == 0){ /* ags-play-notation */ ags_recall_factory_create(machine->audio, NULL, NULL, "ags-play-notation", 0, machine->audio->audio_channels, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_REMAP | AGS_RECALL_FACTORY_RECALL), 0); ags_syncsynth_output_map_recall(syncsynth, 0); ags_syncsynth_input_map_recall(syncsynth, 0); }else{ syncsynth->mapped_output_pad = machine->audio->output_pads; syncsynth->mapped_input_pad = machine->audio->input_pads; } } xmlNode* ags_syncsynth_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsSyncsynth *syncsynth; xmlNode *node; gchar *id; syncsynth = AGS_SYNCSYNTH(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-syncsynth"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", syncsynth, NULL)); xmlAddChild(parent, node); return(node); } void ags_syncsynth_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { AgsSyncsynth *syncsynth; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; guint output_pads, input_pads; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); syncsynth = (AgsSyncsynth *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output_pads = audio->output_pads; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); if(audio_channels > audio_channels_old){ /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* ags-envelope */ ags_recall_factory_create(audio, NULL, NULL, "ags-envelope", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-stream */ if(!rt_safe){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); }else{ ags_recall_factory_create(audio, NULL, NULL, "ags-rt-stream", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* AgsOutput */ /* ags-stream */ if(!performance_mode){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channels_old, audio_channels, 0, output_pads, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); } } } void ags_syncsynth_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data) { AgsWindow *window; AgsSyncsynth *syncsynth; AgsAudio *audio; AgsChannel *channel, *source; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint i, j; gboolean grow; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *source_mutex; if(pads == pads_old){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); syncsynth = (AgsSyncsynth *) machine; audio = machine->audio; application_context = window->application_context; /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); if(pads_old < pads){ grow = TRUE; }else{ grow = FALSE; } if(type == AGS_TYPE_INPUT){ if(grow){ pthread_mutex_lock(audio_mutex); source = audio->input; pthread_mutex_unlock(audio_mutex); /* create pattern */ source = ags_channel_nth(source, pads_old); while(source != NULL){ /* lookup source mutex */ pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* iterate pattern */ pthread_mutex_lock(source_mutex); source = source->next; pthread_mutex_unlock(source_mutex); } if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ /* depending on destination */ ags_syncsynth_input_map_recall(syncsynth, pads_old); } }else{ syncsynth->mapped_input_pad = pads; } }else{ if(grow){ AgsChannel *current, *output; pthread_mutex_lock(audio_mutex); source = audio->output; pthread_mutex_unlock(audio_mutex); source = ags_channel_nth(source, pads_old); if(source != NULL){ AgsRecycling *recycling; AgsAudioSignal *audio_signal; GObject *soundcard; pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* lookup source mutex */ pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* get recycling */ pthread_mutex_lock(source_mutex); recycling = source->first_recycling; pthread_mutex_unlock(source_mutex); /* instantiate template audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(recycling, audio_signal); } if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_syncsynth_output_map_recall(syncsynth, pads_old); } }else{ syncsynth->mapped_output_pad = pads; } } } void ags_syncsynth_input_map_recall(AgsSyncsynth *syncsynth, guint input_pad_start) { AgsAudio *audio; AgsMutexManager *mutex_manager; AgsConfig *config; GList *list; gchar *str; guint input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(syncsynth->mapped_input_pad > input_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(syncsynth)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } /* remap for input */ if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* ags-feed */ ags_recall_factory_create(audio, NULL, NULL, "ags-feed", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-envelope */ ags_recall_factory_create(audio, NULL, NULL, "ags-envelope", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-stream */ if(!rt_safe){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); }else{ ags_recall_factory_create(audio, NULL, NULL, "ags-rt-stream", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } syncsynth->mapped_input_pad = input_pads; } void ags_syncsynth_output_map_recall(AgsSyncsynth *syncsynth, guint output_pad_start) { AgsAudio *audio; AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; guint input_pad_start; guint output_pads, input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(syncsynth->mapped_output_pad > output_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(syncsynth)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ input_pad_start = 0; pthread_mutex_lock(audio_mutex); output_pads = audio->output_pads; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } /* remap for input */ if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } if(!performance_mode){ /* ags-stream */ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", 0, audio_channels, output_pad_start, output_pads, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); } syncsynth->mapped_output_pad = audio->output_pads; } /** * ags_syncsynth_add_oscillator: * @syncsynth: the #AgsSynthsync * @oscillator: the #AgsOscillator * * Add @oscillator to @synthsync. * * Since: 1.0.0 */ void ags_syncsynth_add_oscillator(AgsSyncsynth *syncsynth, AgsOscillator *oscillator) { GtkHBox *hbox; GtkCheckButton *check_button; hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); check_button = gtk_check_button_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) check_button, FALSE, FALSE, 0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) oscillator, FALSE, FALSE, 0); gtk_box_pack_start((GtkBox *) syncsynth->oscillator, (GtkWidget *) hbox, FALSE, FALSE, 0); gtk_widget_show_all(hbox); } /** * ags_syncsynth_remove_oscillator: * @syncsynth: the #AgsSynthsync * @nth: the nth #AgsOscillator * * Remove nth oscillator. * * Since: 1.0.0 */ void ags_syncsynth_remove_oscillator(AgsSyncsynth *syncsynth, guint nth) { GList *list, *list_start; list = list_start = gtk_container_get_children(syncsynth->oscillator); list = g_list_nth(list_start, nth); if(list != NULL){ gtk_widget_destroy(list->data); } g_list_free(list_start); } /** * ags_syncsynth_reset_loop: * @syncsynth: the #AgsSyncsynth * * Reset loop spin buttons. * * Since: 1.0.0 */ void ags_syncsynth_reset_loop(AgsSyncsynth *syncsynth) { GList *list, *list_start; GList *child_start; gdouble loop_upper, tmp0, tmp1; loop_upper = 0.0; list = list_start = gtk_container_get_children(syncsynth->oscillator); while(list != NULL){ child_start = gtk_container_get_children(list->data); tmp0 = gtk_spin_button_get_value(AGS_OSCILLATOR(child_start->next->data)->frame_count); tmp1 = gtk_spin_button_get_value(AGS_OSCILLATOR(child_start->next->data)->attack); if(tmp0 + tmp1 > loop_upper){ loop_upper = tmp0 + tmp1; } g_list_free(child_start); list = list->next; } g_list_free(list_start); gtk_spin_button_set_range(syncsynth->loop_start, 0.0, loop_upper); gtk_spin_button_set_range(syncsynth->loop_end, 0.0, loop_upper); } /** * ags_syncsynth_update: * @syncsynth: the #AgsSyncsynth * * Update audio data. * * Since: 1.0.0 */ void ags_syncsynth_update(AgsSyncsynth *syncsynth) { AgsWindow *window; AgsOscillator *oscillator; AgsAudio *audio; AgsChannel *channel; AgsClearAudioSignal *clear_audio_signal; AgsApplySynth *apply_synth; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GList *list, *list_start; GList *child_start; GList *task; guint input_lines; guint wave; guint attack, frame_count; gdouble frequency, phase, start_frequency; guint loop_start, loop_end; gdouble volume; AgsComplex **sync_point; guint sync_point_count; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *application_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) syncsynth); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); audio = AGS_MACHINE(syncsynth)->audio; /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* */ start_frequency = (gdouble) gtk_spin_button_get_value_as_float(syncsynth->lower); loop_start = (guint) gtk_spin_button_get_value_as_int(syncsynth->loop_start); loop_end = (guint) gtk_spin_button_get_value_as_int(syncsynth->loop_end); /* clear input */ pthread_mutex_lock(audio_mutex); channel = audio->input; pthread_mutex_unlock(audio_mutex); task = NULL; while(channel != NULL){ AgsAudioSignal *template; /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* clear task */ pthread_mutex_lock(channel_mutex); template = ags_audio_signal_get_template(channel->first_recycling->audio_signal); pthread_mutex_unlock(channel_mutex); clear_audio_signal = ags_clear_audio_signal_new(template); task = g_list_prepend(task, clear_audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* write input */ list = list_start = gtk_container_get_children(syncsynth->oscillator); /* get soundcard */ pthread_mutex_lock(audio_mutex); channel = audio->input; input_lines = audio->input_lines; pthread_mutex_unlock(audio_mutex); while(list != NULL){ guint i; gboolean do_sync; /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* do it so */ child_start = gtk_container_get_children(list->data); oscillator = AGS_OSCILLATOR(child_start->next->data); g_list_free(child_start); wave = (guint) gtk_combo_box_get_active(oscillator->wave) + 1; attack = (guint) gtk_spin_button_get_value_as_int(oscillator->attack); frame_count = (guint) gtk_spin_button_get_value_as_int(oscillator->frame_count); phase = (gdouble) gtk_spin_button_get_value_as_float(oscillator->phase); frequency = (gdouble) gtk_spin_button_get_value_as_float(oscillator->frequency); volume = (gdouble) gtk_spin_button_get_value_as_float(oscillator->volume); apply_synth = ags_apply_synth_new(channel, input_lines, wave, attack % channel->buffer_size, frame_count, frequency, phase, start_frequency, volume, loop_start, loop_end); g_object_set(apply_synth, "delay", (gdouble) attack / channel->buffer_size, NULL); do_sync = gtk_toggle_button_get_active(oscillator->do_sync); if(do_sync){ sync_point_count = oscillator->sync_point_count; if(sync_point_count > 0){ sync_point = (AgsComplex **) malloc(sync_point_count * sizeof(AgsComplex *)); }else{ sync_point = NULL; } for(i = 0; i < sync_point_count; i++){ sync_point[i] = ags_complex_alloc(); sync_point[i][0][0] = gtk_spin_button_get_value(oscillator->sync_point[2 * i]); sync_point[i][0][1] = gtk_spin_button_get_value(oscillator->sync_point[2 * i + 1]); } }else{ sync_point = NULL; sync_point_count = NULL; } g_object_set(apply_synth, "base-note", syncsynth->lower->adjustment->value, "do-sync", do_sync, "sync-point", sync_point, "sync-point-count", sync_point_count, NULL); task = g_list_prepend(task, apply_synth); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); list = list->next; } g_list_free(list_start); ags_gui_thread_schedule_task_list(gui_thread, g_list_reverse(task)); } /** * ags_syncsynth_new: * @soundcard: the assigned soundcard. * * Creates an #AgsSyncsynth * * Returns: a new #AgsSyncsynth * * Since: 1.0.0 */ AgsSyncsynth* ags_syncsynth_new(GObject *soundcard) { AgsSyncsynth *syncsynth; syncsynth = (AgsSyncsynth *) g_object_new(AGS_TYPE_SYNCSYNTH, NULL); g_object_set(G_OBJECT(AGS_MACHINE(syncsynth)->audio), "soundcard", soundcard, NULL); return(syncsynth); } gsequencer-1.4.24/ags/X/machine/ags_drum_callbacks.c0000644000175000017500000003204213247044247017225 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define AGS_AUDIO_FILE_DEVOUT "AgsAudioFileDevout" #define AGS_DRUM_PLAY_RECALL "AgsDrumPlayRecall" void ags_drum_open_response_callback(GtkDialog *dialog, gint response, AgsDrum *drum); void ags_drum_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsDrum *drum) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = AGS_WINDOW(gtk_widget_get_ancestor((GtkWidget *) drum, AGS_TYPE_WINDOW)); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_DRUM)->counter); g_object_set(AGS_MACHINE(drum), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_DRUM); g_free(str); } void ags_drum_destroy_callback(GtkWidget *widget, AgsDrum *drum) { GList *list, *list_start; if(drum->open_dialog != NULL){ gtk_widget_destroy(drum->open_dialog); } list = list_start = gtk_container_get_children(AGS_MACHINE(drum)->input); while(list != NULL){ if(AGS_DRUM_INPUT_PAD(list->data)->file_chooser != NULL){ gtk_widget_destroy(GTK_WIDGET(AGS_DRUM_INPUT_PAD(list->data)->file_chooser)); } list = list->next; } } void ags_drum_open_callback(GtkWidget *toggle_button, AgsDrum *drum) { GtkFileChooserDialog *file_chooser; GtkCheckButton *check_button; if(drum->open_dialog != NULL){ return; } file_chooser = (GtkFileChooserDialog *) gtk_file_chooser_dialog_new(g_strdup("open audio files"), (GtkWindow *) gtk_widget_get_toplevel((GtkWidget *) drum), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); drum->open_dialog = (GtkWidget *) file_chooser; gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(file_chooser), TRUE); check_button = (GtkCheckButton *) gtk_check_button_new_with_label(g_strdup("open in new channel")); gtk_toggle_button_set_active((GtkToggleButton *) check_button, TRUE); gtk_box_pack_start((GtkBox *) GTK_DIALOG(file_chooser)->vbox, (GtkWidget *) check_button, FALSE, FALSE, 0); g_object_set_data(G_OBJECT(file_chooser), "create", (gpointer) check_button); check_button = (GtkCheckButton *) gtk_check_button_new_with_label(g_strdup("overwrite existing links")); gtk_toggle_button_set_active((GtkToggleButton *) check_button, TRUE); gtk_box_pack_start((GtkBox *) GTK_DIALOG(file_chooser)->vbox, (GtkWidget *) check_button, FALSE, FALSE, 0); g_object_set_data(G_OBJECT(file_chooser), "overwrite", (gpointer) check_button); gtk_widget_show_all(GTK_WIDGET(file_chooser)); g_signal_connect(G_OBJECT(file_chooser), "response", G_CALLBACK(ags_drum_open_response_callback), drum); g_signal_connect(G_OBJECT(file_chooser), "response", G_CALLBACK(ags_machine_open_response_callback), drum); } void ags_drum_open_response_callback(GtkDialog *dialog, gint response, AgsDrum *drum) { drum->open_dialog = NULL; } void ags_drum_loop_button_callback(GtkWidget *button, AgsDrum *drum) { AgsCountBeatsAudio *count_beats_audio; AgsMutexManager *mutex_manager; GList *list; gboolean loop; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) AGS_MACHINE(drum)->audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(audio_mutex); loop = (GTK_TOGGLE_BUTTON(button)->active) ? TRUE: FALSE; /* AgsCopyPatternAudio */ list = AGS_MACHINE(drum)->audio->play; while((list = ags_recall_find_type(list, AGS_TYPE_COUNT_BEATS_AUDIO)) != NULL){ count_beats_audio = AGS_COUNT_BEATS_AUDIO(list->data); count_beats_audio->sequencer_loop->port_value.ags_port_boolean = loop; list = list->next; } list = AGS_MACHINE(drum)->audio->recall; while((list = ags_recall_find_type(list, AGS_TYPE_COUNT_BEATS_AUDIO)) != NULL){ count_beats_audio = AGS_COUNT_BEATS_AUDIO(list->data); count_beats_audio->sequencer_loop->port_value.ags_port_boolean = loop; list = list->next; } pthread_mutex_unlock(audio_mutex); } void ags_drum_length_spin_callback(GtkWidget *spin_button, AgsDrum *drum) { AgsWindow *window; AgsApplySequencerLength *apply_sequencer_length; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; gdouble length; pthread_mutex_t *application_mutex; /* get window and application_context */ window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) drum); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* */ length = GTK_SPIN_BUTTON(spin_button)->adjustment->value; apply_sequencer_length = ags_apply_sequencer_length_new((GObject *) AGS_MACHINE(drum)->audio, length); ags_gui_thread_schedule_task(gui_thread, apply_sequencer_length); } void ags_drum_index0_callback(GtkWidget *widget, AgsDrum *drum) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) AGS_MACHINE(drum)->audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(audio_mutex); if(drum->selected0 != NULL){ GtkToggleButton *toggle_button; if(GTK_TOGGLE_BUTTON(widget) != drum->selected0){ AgsCopyPatternAudio *copy_pattern_audio; GList *list; guint64 index0; toggle_button = drum->selected0; drum->selected0 = NULL; gtk_toggle_button_set_active(toggle_button, FALSE); drum->selected0 = (GtkToggleButton*) widget; list = ags_recall_find_type(AGS_MACHINE(drum)->audio->play, AGS_TYPE_COPY_PATTERN_AUDIO); /* calculate index 0 */ AGS_MACHINE(drum)->bank_0 = index0 = ((guint) drum->selected0->button.label_text[0] - 'a'); if(list != NULL){ GValue value = {0,}; g_value_init(&value, G_TYPE_UINT64); g_value_set_uint64(&value, index0); copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(list->data); ags_port_safe_write(copy_pattern_audio->bank_index_0, &value); g_value_unset(&value); } list = ags_recall_find_type(AGS_MACHINE(drum)->audio->recall, AGS_TYPE_COPY_PATTERN_AUDIO); if(list != NULL){ GValue value = {0,}; g_value_init(&value, G_TYPE_UINT64); g_value_set_uint64(&value, index0); copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(list->data); ags_port_safe_write(copy_pattern_audio->bank_index_0, &value); g_value_unset(&value); } }else if(! gtk_toggle_button_get_active(drum->selected0)){ drum->selected0 = NULL; gtk_toggle_button_set_active((GtkToggleButton *) widget, TRUE); drum->selected0 = (GtkToggleButton*) widget; } ags_pattern_box_set_pattern(drum->pattern_box); } pthread_mutex_unlock(audio_mutex); } void ags_drum_index1_callback(GtkWidget *widget, AgsDrum *drum) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) AGS_MACHINE(drum)->audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(audio_mutex); if(drum->selected1 != NULL){ GtkToggleButton *toggle_button; if(GTK_TOGGLE_BUTTON(widget) != drum->selected1){ AgsCopyPatternAudio *copy_pattern_audio; GList *list; guint64 index1; toggle_button = drum->selected1; drum->selected1 = NULL; gtk_toggle_button_set_active(toggle_button, FALSE); drum->selected1 = (GtkToggleButton*) widget; list = ags_recall_find_type(AGS_MACHINE(drum)->audio->play, AGS_TYPE_COPY_PATTERN_AUDIO); /* calculate index 1 */ AGS_MACHINE(drum)->bank_1 = index1 = ((guint) g_ascii_strtoull(drum->selected1->button.label_text, NULL, 10)) - 1; if(list != NULL){ GValue value = {0,}; g_value_init(&value, G_TYPE_UINT64); g_value_set_uint64(&value, index1); copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(list->data); ags_port_safe_write(copy_pattern_audio->bank_index_1, &value); g_value_unset(&value); } list = ags_recall_find_type(AGS_MACHINE(drum)->audio->recall, AGS_TYPE_COPY_PATTERN_AUDIO); if(list != NULL){ GValue value = {0,}; g_value_init(&value, G_TYPE_UINT64); g_value_set_uint64(&value, index1); copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(list->data); ags_port_safe_write(copy_pattern_audio->bank_index_1, &value); g_value_unset(&value); } }else if(!gtk_toggle_button_get_active(drum->selected1)){ drum->selected1 = NULL; gtk_toggle_button_set_active((GtkToggleButton *) widget, TRUE); drum->selected1 = (GtkToggleButton*) widget; } ags_pattern_box_set_pattern(drum->pattern_box); } pthread_mutex_unlock(audio_mutex); } void ags_drum_done_callback(AgsDrum *drum, AgsRecallID *recall_id, gpointer data) { AgsAudio *audio; AgsMutexManager *mutex_manager; GList *playback; gboolean all_done; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); audio = AGS_MACHINE(drum)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* check unset */ pthread_mutex_lock(audio_mutex); playback = AGS_PLAYBACK_DOMAIN(audio->playback_domain)->playback; all_done = TRUE; while(playback != NULL){ if(AGS_PLAYBACK(playback->data)->recall_id[1] != NULL){ all_done = FALSE; break; } playback = playback->next; } pthread_mutex_unlock(audio_mutex); /* all done */ if(all_done){ ags_led_array_unset_all(drum->pattern_box->hled_array); } } gsequencer-1.4.24/ags/X/machine/ags_panel_input_line.c0000644000175000017500000004603613247044247017614 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_panel_input_line_class_init(AgsPanelInputLineClass *panel_input_line); void ags_panel_input_line_connectable_interface_init(AgsConnectableInterface *connectable); void ags_panel_input_line_plugin_interface_init(AgsPluginInterface *plugin); void ags_panel_input_line_init(AgsPanelInputLine *panel_input_line); void ags_panel_input_line_connect(AgsConnectable *connectable); void ags_panel_input_line_disconnect(AgsConnectable *connectable); void ags_panel_input_line_finalize(GObject *gobject); gchar* ags_panel_input_line_get_name(AgsPlugin *plugin); void ags_panel_input_line_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_panel_input_line_get_xml_type(AgsPlugin *plugin); void ags_panel_input_line_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_panel_input_line_show(GtkWidget *line); void ags_panel_input_line_show_all(GtkWidget *line); void ags_panel_input_line_set_channel(AgsLine *line, AgsChannel *channel); void ags_panel_input_line_group_changed(AgsLine *line); void ags_panel_input_line_map_recall(AgsLine *line, guint output_pad_start); /** * SECTION:ags_panel_input_line * @short_description: panel input line * @title: AgsPanelInputLine * @section_id: * @include: ags/X/machine/ags_panel_input_line.h * * The #AgsPanelInputLine is a composite widget to act as panel input line. */ GHashTable *ags_panel_input_line_message_monitor = NULL; static gpointer ags_panel_input_line_parent_class = NULL; static AgsConnectableInterface *ags_panel_input_line_parent_connectable_interface; GType ags_panel_input_line_get_type() { static GType ags_type_panel_input_line = 0; if(!ags_type_panel_input_line){ static const GTypeInfo ags_panel_input_line_info = { sizeof(AgsPanelInputLineClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_panel_input_line_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsPanelInputLine), 0, /* n_preallocs */ (GInstanceInitFunc) ags_panel_input_line_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_panel_input_line_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_panel_input_line_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_panel_input_line = g_type_register_static(AGS_TYPE_LINE, "AgsPanelInputLine", &ags_panel_input_line_info, 0); g_type_add_interface_static(ags_type_panel_input_line, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_panel_input_line, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_panel_input_line); } void ags_panel_input_line_class_init(AgsPanelInputLineClass *panel_input_line) { GObjectClass *gobject; GtkWidgetClass *widget; AgsLineClass *line; ags_panel_input_line_parent_class = g_type_class_peek_parent(panel_input_line); /* GObjectClass */ gobject = (GObjectClass *) panel_input_line; gobject->finalize = ags_panel_input_line_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) panel_input_line; widget->show = ags_panel_input_line_show; widget->show_all = ags_panel_input_line_show_all; /* AgsLineClass */ line = AGS_LINE_CLASS(panel_input_line); line->set_channel = ags_panel_input_line_set_channel; line->map_recall = ags_panel_input_line_map_recall; } void ags_panel_input_line_connectable_interface_init(AgsConnectableInterface *connectable) { ags_panel_input_line_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_panel_input_line_connect; connectable->disconnect = ags_panel_input_line_disconnect; } void ags_panel_input_line_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_panel_input_line_get_name; plugin->set_name = ags_panel_input_line_set_name; plugin->get_xml_type = ags_panel_input_line_get_xml_type; plugin->set_xml_type = ags_panel_input_line_set_xml_type; } void ags_panel_input_line_init(AgsPanelInputLine *panel_input_line) { AgsLineMember *line_member; if(ags_panel_input_line_message_monitor == NULL){ ags_panel_input_line_message_monitor = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_panel_input_line_message_monitor, panel_input_line, ags_panel_input_line_message_monitor_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_line_message_monitor_timeout, (gpointer) panel_input_line); /* mute line member */ panel_input_line->soundcard_connection = (GtkLabel *) gtk_label_new("(null)"); ags_expander_add(AGS_LINE(panel_input_line)->expander, GTK_WIDGET(panel_input_line->soundcard_connection), 0, 0, 1, 1); line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, "widget-type", GTK_TYPE_CHECK_BUTTON, "widget-label", "mute", "plugin-name", "ags-play", "specifier", "./muted[0]", "control-port", "2/2", NULL); ags_expander_add(AGS_LINE(panel_input_line)->expander, GTK_WIDGET(line_member), 1, 0, 1, 1); } void ags_panel_input_line_connect(AgsConnectable *connectable) { AgsPanelInputLine *panel_input_line; panel_input_line = AGS_PANEL_INPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(panel_input_line)->flags)) != 0){ return; } ags_panel_input_line_parent_connectable_interface->connect(connectable); /* empty */ } void ags_panel_input_line_disconnect(AgsConnectable *connectable) { AgsPanelInputLine *panel_input_line; panel_input_line = AGS_PANEL_INPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(panel_input_line)->flags)) == 0){ return; } ags_panel_input_line_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_panel_input_line_finalize(GObject *gobject) { /* empty */ G_OBJECT_CLASS(ags_panel_input_line_parent_class)->finalize(gobject); } gchar* ags_panel_input_line_get_name(AgsPlugin *plugin) { return(AGS_PANEL_INPUT_LINE(plugin)->name); } void ags_panel_input_line_set_name(AgsPlugin *plugin, gchar *name) { AGS_PANEL_INPUT_LINE(plugin)->name = name; } gchar* ags_panel_input_line_get_xml_type(AgsPlugin *plugin) { return(AGS_PANEL_INPUT_LINE(plugin)->xml_type); } void ags_panel_input_line_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_PANEL_INPUT_LINE(plugin)->xml_type = xml_type; } void ags_panel_input_line_show(GtkWidget *line) { GTK_WIDGET_CLASS(ags_panel_input_line_parent_class)->show(line); // gtk_widget_hide(GTK_WIDGET(AGS_LINE(line)->group)); } void ags_panel_input_line_show_all(GtkWidget *line) { GTK_WIDGET_CLASS(ags_panel_input_line_parent_class)->show_all(line); // gtk_widget_hide(GTK_WIDGET(AGS_LINE(line)->group)); } void ags_panel_input_line_set_channel(AgsLine *line, AgsChannel *channel) { AgsPanelInputLine *panel_input_line; AgsAudio *audio; AgsAudioConnection *audio_connection; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; gchar *device; gchar *str; guint pad, audio_channel; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); panel_input_line = AGS_PANEL_INPUT_LINE(line); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* call parent */ AGS_LINE_CLASS(ags_panel_input_line_parent_class)->set_channel(line, channel); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; audio = channel->audio; pad = channel->pad; audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* find audio connection - soundcard */ pthread_mutex_lock(audio_mutex); audio_connection = NULL; list = audio->audio_connection; while((list = ags_audio_connection_find(list, AGS_TYPE_INPUT, pad, audio_channel)) != NULL){ GObject *data_object; g_object_get(G_OBJECT(list->data), "data-object", &data_object, NULL); if(AGS_IS_SOUNDCARD(data_object)){ audio_connection = list->data; break; } list = list->next; } pthread_mutex_unlock(audio_mutex); /* update label */ if(audio_connection != NULL){ /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(soundcard_mutex); device = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard)); pthread_mutex_unlock(soundcard_mutex); /* label */ str = g_strdup_printf("%s:%s[%d]", G_OBJECT_TYPE_NAME(soundcard), device, audio_connection->mapped_line); gtk_label_set_label(panel_input_line->soundcard_connection, str); g_free(str); } #ifdef AGS_DEBUG g_message("ags_panel_input_line_set_channel - channel: %u", channel->line); #endif } void ags_panel_input_line_map_recall(AgsLine *line, guint output_pad_start) { AgsAudio *audio; AgsChannel *source; AgsPlayChannel *play_channel; AgsPlayChannelRunMaster *play_channel_run; AgsMutexManager *mutex_manager; GList *list; guint pad, audio_channel; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *source_mutex; if((AGS_LINE_MAPPED_RECALL & (line->flags)) != 0 || (AGS_LINE_PREMAPPED_RECALL & (line->flags)) != 0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); source = line->channel; /* get source mutex */ pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(source_mutex); audio = (AgsAudio *) source->audio; pad = source->pad; audio_channel = source->audio_channel; pthread_mutex_unlock(source_mutex); /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-master", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT, AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* set audio channel */ pthread_mutex_lock(source_mutex); list = source->play; while((list = ags_recall_template_find_type(list, AGS_TYPE_PLAY_CHANNEL)) != NULL){ GValue audio_channel_value = {0,}; play_channel = AGS_PLAY_CHANNEL(list->data); g_value_init(&audio_channel_value, G_TYPE_UINT64); g_value_set_uint64(&audio_channel_value, audio_channel); ags_port_safe_write(play_channel->audio_channel, &audio_channel_value); g_value_unset(&audio_channel_value); list = list->next; } pthread_mutex_unlock(source_mutex); /* call parent */ AGS_LINE_CLASS(ags_panel_input_line_parent_class)->map_recall(line, output_pad_start); } /** * ags_panel_input_line_message_monitor_timeout: * @panel_input_line: the #AgsPanelInputLine * * Monitor messages. * * Returns: %TRUE if proceed with redraw, otherwise %FALSE * * Since: 1.2.2 */ gboolean ags_panel_input_line_message_monitor_timeout(AgsPanelInputLine *panel_input_line) { if(g_hash_table_lookup(ags_panel_input_line_message_monitor, panel_input_line) != NULL){ AgsAudio *audio; AgsChannel *channel; AgsConnection *connection; AgsMutexManager *mutex_manager; AgsMessageDelivery *message_delivery; GList *message_start, *message; GList *list; guint pad, audio_channel; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* message delivery */ message_delivery = ags_message_delivery_get_instance(); channel = AGS_LINE(panel_input_line)->channel; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; pad = channel->pad; audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* libags - retrieve message */ pthread_mutex_lock(audio_mutex); list = audio->audio_connection; connection = NULL; while((list = ags_audio_connection_find(list, AGS_TYPE_INPUT, pad, audio_channel)) != NULL){ GObject *data_object; g_object_get(G_OBJECT(list->data), "data-object", &data_object, NULL); if(AGS_IS_SOUNDCARD(data_object)){ connection = list->data; break; } list = list->next; } pthread_mutex_unlock(audio_mutex); /* check messages */ message_start = message = ags_message_delivery_find_sender(message_delivery, "libags", connection); while(message != NULL){ xmlNode *root_node; root_node = xmlDocGetRootElement(AGS_MESSAGE_ENVELOPE(message->data)->doc); if(!xmlStrncmp(root_node->name, "ags-command", 12)){ if(!xmlStrncmp(xmlGetProp(root_node, "method"), "GObject::notify::data-object", 28)){ GObject *soundcard; gchar *device; gchar *str; guint mapped_line; GValue *value; /* get some fields */ pthread_mutex_lock(audio_mutex); mapped_line = AGS_AUDIO_CONNECTION(connection)->mapped_line; pthread_mutex_unlock(audio_mutex); /* get data object */ value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "data-object"); soundcard = g_value_get_object(value); /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(soundcard_mutex); device = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard)); pthread_mutex_unlock(soundcard_mutex); /* update label */ str = g_strdup_printf("%s:%s[%d]", G_OBJECT_TYPE_NAME(soundcard), device, mapped_line + 1); gtk_label_set_label(panel_input_line->soundcard_connection, str); g_free(str); } } ags_message_delivery_remove_message(message_delivery, "libags", message->data); message = message->next; } g_list_free_full(message_start, ags_message_envelope_free); /* libags-audio - retrieve message */ //NOTE:JK: very same connection object /* check messages */ message_start = message = ags_message_delivery_find_sender(message_delivery, "libags-audio", connection); while(message != NULL){ xmlNode *root_node; root_node = xmlDocGetRootElement(AGS_MESSAGE_ENVELOPE(message->data)->doc); if(!xmlStrncmp(root_node->name, "ags-command", 12)){ if(!xmlStrncmp(xmlGetProp(root_node, "method"), "GObject::notify::mapped-line", 28)){ GObject *soundcard; gchar *device; gchar *str; guint mapped_line; GValue *value; /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = connection->data_object; pthread_mutex_unlock(audio_mutex); /* get mapped line */ value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "mapped-line"); mapped_line = g_value_get_uint(value); /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(soundcard_mutex); device = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard)); pthread_mutex_unlock(soundcard_mutex); /* update label */ str = g_strdup_printf("%s:%s[%d]", G_OBJECT_TYPE_NAME(soundcard), device, mapped_line + 1); gtk_label_set_label(panel_input_line->soundcard_connection, str); g_free(str); } } ags_message_delivery_remove_message(message_delivery, "libags-audio", message->data); message = message->next; } g_list_free_full(message_start, ags_message_envelope_free); return(TRUE); }else{ return(FALSE); } } /** * ags_panel_input_line_new: * @channel: the assigned channel * * Creates an #AgsPanelInputLine * * Returns: a new #AgsPanelInputLine * * Since: 1.0.0 */ AgsPanelInputLine* ags_panel_input_line_new(AgsChannel *channel) { AgsPanelInputLine *panel_input_line; panel_input_line = (AgsPanelInputLine *) g_object_new(AGS_TYPE_PANEL_INPUT_LINE, "channel", channel, NULL); return(panel_input_line); } gsequencer-1.4.24/ags/X/machine/ags_ffplayer_input_pad.c0000644000175000017500000001315313247044247020134 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_ffplayer_input_pad_class_init(AgsFFPlayerInputPadClass *ffplayer_input_pad); void ags_ffplayer_input_pad_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ffplayer_input_pad_plugin_interface_init(AgsPluginInterface *plugin); void ags_ffplayer_input_pad_init(AgsFFPlayerInputPad *ffplayer_input_pad); void ags_ffplayer_input_pad_connect(AgsConnectable *connectable); void ags_ffplayer_input_pad_disconnect(AgsConnectable *connectable); void ags_ffplayer_input_pad_finalize(GObject *gobject); /** * SECTION:ags_ffplayer_input_pad * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsFFPlayerInputPad * @section_id: * @include: ags/X/machine/ags_ffplayer_input_pad.h * * #AgsFFPlayerInputPad is a composite widget to visualize one #AgsChannel. It should be * packed by an #AgsFFPlayerInputPad. */ static gpointer ags_ffplayer_input_pad_parent_class = NULL; static AgsConnectableInterface *ags_ffplayer_input_pad_parent_connectable_interface; GType ags_ffplayer_input_pad_get_type(void) { static GType ags_type_ffplayer_input_pad = 0; if(!ags_type_ffplayer_input_pad){ static const GTypeInfo ags_ffplayer_input_pad_info = { sizeof(AgsFFPlayerInputPadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ffplayer_input_pad_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsFFPlayerInputPad), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ffplayer_input_pad_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ffplayer_input_pad_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_ffplayer_input_pad_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ffplayer_input_pad = g_type_register_static(AGS_TYPE_EFFECT_PAD, "AgsFFPlayerInputPad", &ags_ffplayer_input_pad_info, 0); g_type_add_interface_static(ags_type_ffplayer_input_pad, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_ffplayer_input_pad, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_ffplayer_input_pad); } void ags_ffplayer_input_pad_class_init(AgsFFPlayerInputPadClass *ffplayer_input_pad) { GObjectClass *gobject; ags_ffplayer_input_pad_parent_class = g_type_class_peek_parent(ffplayer_input_pad); /* GObjectClass */ gobject = (GObjectClass *) ffplayer_input_pad; gobject->finalize = ags_ffplayer_input_pad_finalize; } void ags_ffplayer_input_pad_connectable_interface_init(AgsConnectableInterface *connectable) { ags_ffplayer_input_pad_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_ffplayer_input_pad_connect; connectable->disconnect = ags_ffplayer_input_pad_disconnect; } void ags_ffplayer_input_pad_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_ffplayer_input_pad_init(AgsFFPlayerInputPad *ffplayer_input_pad) { //TODO:JK: implement me } void ags_ffplayer_input_pad_connect(AgsConnectable *connectable) { if((AGS_EFFECT_PAD_CONNECTED & (AGS_EFFECT_PAD(connectable)->flags)) != 0){ return; } ags_ffplayer_input_pad_parent_connectable_interface->connect(connectable); //TODO:JK: implement me } void ags_ffplayer_input_pad_disconnect(AgsConnectable *connectable) { if((AGS_EFFECT_PAD_CONNECTED & (AGS_EFFECT_PAD(connectable)->flags)) == 0){ return; } ags_ffplayer_input_pad_parent_connectable_interface->disconnect(connectable); //TODO:JK: implement me } void ags_ffplayer_input_pad_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_ffplayer_input_pad_parent_class)->finalize(gobject); } /** * ags_ffplayer_input_pad_new: * @channel: the #AgsChannel to visualize * * Creates an #AgsFFPlayerInputPad * * Returns: a new #AgsFFPlayerInputPad * * Since: 1.0.0 */ AgsFFPlayerInputPad* ags_ffplayer_input_pad_new(AgsChannel *channel) { AgsFFPlayerInputPad *ffplayer_input_pad; ffplayer_input_pad = (AgsFFPlayerInputPad *) g_object_new(AGS_TYPE_FFPLAYER_INPUT_PAD, "channel", channel, NULL); return(ffplayer_input_pad); } gsequencer-1.4.24/ags/X/machine/ags_syncsynth_callbacks.h0000644000175000017500000000302713246707333020327 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SYNCSYNTH_CALLBACKS_H__ #define __AGS_SYNCSYNTH_CALLBACKS_H__ #include #include #include #include void ags_syncsynth_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsSyncsynth *syncsynth); void ags_syncsynth_auto_update_callback(GtkToggleButton *toggle, AgsSyncsynth *syncsynth); void ags_syncsynth_update_callback(GtkButton *button, AgsSyncsynth *syncsynth); void ags_syncsynth_add_callback(GtkButton *button, AgsSyncsynth *syncsynth); void ags_syncsynth_remove_callback(GtkButton *button, AgsSyncsynth *syncsynth); void ags_syncsynth_oscillator_control_changed_callback(AgsOscillator *oscillator, AgsSyncsynth *syncsynth); #endif /*__AGS_SYNCSYNTH_CALLBACKS_H__ */ gsequencer-1.4.24/ags/X/machine/ags_live_dssi_bridge_callbacks.h0000644000175000017500000000236113247044247021561 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LIVE_DSSI_BRIDGE_CALLBACKS_H__ #define __AGS_LIVE_DSSI_BRIDGE_CALLBACKS_H__ #include #include #include #include void ags_live_dssi_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLiveDssiBridge *live_dssi_bridge); void ags_live_dssi_bridge_program_changed_callback(GtkComboBox *combo_box, AgsLiveDssiBridge *live_dssi_bridge); #endif /*__AGS_LIVE_DSSI_BRIDGE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_cell_pattern.h0000644000175000017500000000725413247044247016747 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CELL_PATTERN_H__ #define __AGS_CELL_PATTERN_H__ #include #include #include #include #include #include #define AGS_TYPE_CELL_PATTERN (ags_cell_pattern_get_type()) #define AGS_CELL_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CELL_PATTERN, AgsCellPattern)) #define AGS_CELL_PATTERN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CELL_PATTERN, AgsCellPatternClass)) #define AGS_IS_CELL_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CELL_PATTERN)) #define AGS_IS_CELL_PATTERN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CELL_PATTERN)) #define AGS_CELL_PATTERN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CELL_PATTERN, AgsCellPatternClass)) #define AGS_CELL_PATTERN_DEFAULT_CELL_WIDTH (12) #define AGS_CELL_PATTERN_DEFAULT_CELL_HEIGHT (10) #define AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_HORIZONTALLY (32) #define AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY (10) #define AGS_CELL_PATTERN_DEFAULT_CONTROLS_HORIZONTALLY (32) #define AGS_CELL_PATTERN_DEFAULT_CONTROLS_VERTICALLY (78) typedef struct _AgsCellPattern AgsCellPattern; typedef struct _AgsCellPatternClass AgsCellPatternClass; typedef enum{ AGS_CELL_PATTERN_CONNECTED = 1, AGS_CELL_PATTERN_CURSOR_ON = 1 << 1, }AgsCellPatternFlags; typedef enum{ AGS_CELL_PATTERN_KEY_L_CONTROL = 1, AGS_CELL_PATTERN_KEY_R_CONTROL = 1 << 1, }AgsCellPatternKeyMask; typedef enum{ AGS_CELL_PATTERN_MOVE_LEFT, AGS_CELL_PATTERN_MOVE_RIGHT, AGS_CELL_PATTERN_MOVE_UP, AGS_CELL_PATTERN_MOVE_DOWN, AGS_CELL_PATTERN_TOGGLE_PAD, AGS_CELL_PATTERN_COPY_PATTERN, }AgsCellPatternAction; struct _AgsCellPattern { GtkTable table; guint flags; guint key_mask; guint cell_width; guint cell_height; guint n_cols; guint n_rows; guint cursor_x; guint cursor_y; GtkDrawingArea *drawing_area; GtkVScrollbar *vscrollbar; GtkHScrollbar *hscrollbar; guint active_led; AgsHLedArray *hled_array; }; struct _AgsCellPatternClass { GtkTableClass table; }; GType ags_cell_pattern_get_type(void); void ags_cell_pattern_paint(AgsCellPattern *cell_pattern); void ags_cell_pattern_draw_gutter(AgsCellPattern *cell_pattern); void ags_cell_pattern_draw_matrix(AgsCellPattern *cell_pattern); void ags_cell_pattern_draw_cursor(AgsCellPattern *cell_pattern); void ags_cell_pattern_redraw_gutter_point(AgsCellPattern *cell_pattern, AgsChannel *channel, guint j, guint i); void ags_cell_pattern_highlight_gutter_point(AgsCellPattern *cell_pattern, guint j, guint i); void ags_cell_pattern_unpaint_gutter_point(AgsCellPattern *cell_pattern, guint j, guint i); void* ags_cell_pattern_blink_worker(void *data); gboolean ags_cell_pattern_led_queue_draw_timeout(AgsCellPattern *cell_pattern); AgsCellPattern* ags_cell_pattern_new(); #endif /*__AGS_CELL_PATTERN_H__*/ gsequencer-1.4.24/ags/X/machine/ags_panel_input_pad.h0000644000175000017500000000405613247044247017432 00000000000000/* 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 . */ #ifndef __AGS_PANEL_INPUT_PAD_H__ #define __AGS_PANEL_INPUT_PAD_H__ #include #include #include #include #include #include #include #define AGS_TYPE_PANEL_INPUT_PAD (ags_panel_input_pad_get_type()) #define AGS_PANEL_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PANEL_INPUT_PAD, AgsPanelInputPad)) #define AGS_PANEL_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PANEL_INPUT_PAD, AgsPanelInputPadClass)) #define AGS_IS_PANEL_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PANEL_INPUT_PAD)) #define AGS_IS_PANEL_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PANEL_INPUT_PAD)) #define AGS_PANEL_INPUT_PAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_PANEL_INPUT_PAD, AgsPanelInputPadClass)) typedef struct _AgsPanelInputPad AgsPanelInputPad; typedef struct _AgsPanelInputPadClass AgsPanelInputPadClass; struct _AgsPanelInputPad { AgsPad pad; gchar *name; gchar *xml_type; }; struct _AgsPanelInputPadClass { AgsPadClass pad; }; GType ags_panel_input_pad_get_type(); AgsPanelInputPad* ags_panel_input_pad_new(AgsChannel *channel); #endif /*__AGS_PANEL_INPUT_PAD_H__*/ gsequencer-1.4.24/ags/X/machine/ags_synth.h0000644000175000017500000000430713246707333015435 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SYNTH_H__ #define __AGS_SYNTH_H__ #include #include #include #include #define AGS_TYPE_SYNTH (ags_synth_get_type()) #define AGS_SYNTH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SYNTH, AgsSynth)) #define AGS_SYNTH_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SYNTH, AgsSynthClass)) #define AGS_IS_SYNTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SYNTH)) #define AGS_IS_SYNTH_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SYNTH)) #define AGS_SYNTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SYNTH, AgsSynthClass)) #define AGS_SYNTH_BASE_NOTE_MAX (72.0) #define AGS_SYNTH_BASE_NOTE_MIN (-72.0) typedef struct _AgsSynth AgsSynth; typedef struct _AgsSynthClass AgsSynthClass; typedef enum{ AGS_SYNTH_AUTO_UPDATE = 1, }AgsSynthFlags; struct _AgsSynth { AgsMachine machine; guint flags; gchar *name; gchar *xml_type; guint mapped_input_pad; guint mapped_output_pad; GtkVBox *input_pad; GtkSpinButton *lower; // how many channels until to lowest freq GtkSpinButton *loop_start; GtkSpinButton *loop_end; GtkCheckButton *auto_update; GtkButton *update; }; struct _AgsSynthClass { AgsMachineClass machine; }; GType ags_synth_get_type(void); void ags_synth_update(AgsSynth *synth); AgsSynth* ags_synth_new(GObject *soundcard); #endif /*__AGS_SYNTH_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_input_pad.h0000644000175000017500000000433413247044247017301 00000000000000/* 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 . */ #ifndef __AGS_DRUM_INPUT_PAD_H__ #define __AGS_DRUM_INPUT_PAD_H__ #include #include #include #include #define AGS_TYPE_DRUM_INPUT_PAD (ags_drum_input_pad_get_type()) #define AGS_DRUM_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DRUM_INPUT_PAD, AgsDrumInputPad)) #define AGS_DRUM_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_DRUM_INPUT_PAD, AgsDrumInputPadClass)) #define AGS_IS_DRUM_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DRUM_INPUT_PAD)) #define AGS_IS_DRUM_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_DRUM_INPUT_PAD)) #define AGS_DRUM_INPUT_PAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_DRUM_INPUT_PAD, AgsDrumInputPadClass)) typedef struct _AgsDrumInputPad AgsDrumInputPad; typedef struct _AgsDrumInputPadClass AgsDrumInputPadClass; typedef enum{ AGS_DRUM_INPUT_PAD_OPEN_PLAY_DONE = 1, }AgsDrumInputPadFlags; struct _AgsDrumInputPad { AgsPad pad; guint flags; gchar *name; gchar *xml_type; GtkButton *open; GtkToggleButton *play; GtkToggleButton *edit; GList *pad_open_recalls; guint pad_open_play_ref; GtkFileChooserDialog *file_chooser; guint pad_play_ref; }; struct _AgsDrumInputPadClass { AgsPadClass pad; }; GType ags_drum_input_pad_get_type(); AgsDrumInputPad* ags_drum_input_pad_new(AgsChannel *channel); #endif /*__AGS_DRUM_INPUT_PAD_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_callbacks.h0000644000175000017500000000321113247044247017226 00000000000000/* 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 . */ #ifndef __AGS_DRUM_CALLBACKS_H__ #define __AGS_DRUM_CALLBACKS_H__ #include #include #include #include #include void ags_drum_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsDrum *drum); void ags_drum_destroy_callback(GtkWidget *widget, AgsDrum *drum); /* controls */ void ags_drum_open_callback(GtkWidget *toggle_button, AgsDrum *drum); void ags_drum_loop_button_callback(GtkWidget *button, AgsDrum *drum); void ags_drum_length_spin_callback(GtkWidget *spin_button, AgsDrum *drum); void ags_drum_index0_callback(GtkWidget *toggle_button, AgsDrum *drum); void ags_drum_index1_callback(GtkWidget *toggle_button, AgsDrum *drum); /* audio */ void ags_drum_done_callback(AgsDrum *drum, AgsRecallID *recall_id, gpointer data); #endif /*__AGS_DRUM_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_oscillator_callbacks.c0000644000175000017500000000343113247044247020431 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_oscillator_wave_callback(GtkComboBox *combo, AgsOscillator *oscillator) { ags_oscillator_control_changed(oscillator); } void ags_oscillator_attack_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator) { ags_oscillator_control_changed(oscillator); } void ags_oscillator_frame_count_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator) { ags_oscillator_control_changed(oscillator); } void ags_oscillator_frequency_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator) { ags_oscillator_control_changed(oscillator); } void ags_oscillator_phase_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator) { ags_oscillator_control_changed(oscillator); } void ags_oscillator_volume_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator) { ags_oscillator_control_changed(oscillator); } void ags_oscillator_sync_point_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator) { ags_oscillator_control_changed(oscillator); } gsequencer-1.4.24/ags/X/machine/ags_synth_input_line_callbacks.h0000644000175000017500000000222013247044247021651 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SYNTH_INPUT_LINE_CALLBACKS_H__ #define __AGS_SYNTH_INPUT_LINE_CALLBACKS_H__ #include #include #include #include void ags_synth_input_line_oscillator_control_changed_callback(AgsOscillator *oscillator, AgsSynthInputLine *synth_input_line); #endif /*__AGS_SYNTH_INPUT_LINE_CALLBACKS_H__ */ gsequencer-1.4.24/ags/X/machine/ags_synth_input_line.c0000644000175000017500000002544313247044247017661 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_synth_input_line_class_init(AgsSynthInputLineClass *synth_input_line); void ags_synth_input_line_plugin_interface_init(AgsPluginInterface *plugin); void ags_synth_input_line_connectable_interface_init(AgsConnectableInterface *connectable); void ags_synth_input_line_init(AgsSynthInputLine *synth_input_line); void ags_synth_input_line_connect(AgsConnectable *connectable); void ags_synth_input_line_disconnect(AgsConnectable *connectable); gchar* ags_synth_input_line_get_name(AgsPlugin *plugin); void ags_synth_input_line_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_synth_input_line_get_xml_type(AgsPlugin *plugin); void ags_synth_input_line_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_synth_input_line_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_synth_input_line_resolve_line(AgsFileLookup *file_lookup, AgsSynthInputLine *synth_input_line); xmlNode* ags_synth_input_line_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_synth_input_line_show(GtkWidget *line); void ags_synth_input_line_show_all(GtkWidget *line); void ags_synth_input_line_set_channel(AgsLine *line, AgsChannel *channel); void ags_synth_input_line_map_recall(AgsLine *line, guint output_pad_start); /** * SECTION:ags_synth_input_line * @short_description: synth input line * @title: AgsSynthInputLine * @section_id: * @include: ags/X/machine/ags_synth_input_line.h * * The #AgsSynthInputLine is a composite widget to act as synth input line. */ static gpointer ags_synth_input_line_parent_class = NULL; static AgsConnectableInterface *ags_synth_input_line_parent_connectable_interface; GType ags_synth_input_line_get_type() { static GType ags_type_synth_input_line = 0; if(!ags_type_synth_input_line){ static const GTypeInfo ags_synth_input_line_info = { sizeof(AgsSynthInputLineClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_synth_input_line_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsSynthInputLine), 0, /* n_preallocs */ (GInstanceInitFunc) ags_synth_input_line_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_synth_input_line_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_synth_input_line_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_synth_input_line = g_type_register_static(AGS_TYPE_LINE, "AgsSynthInputLine", &ags_synth_input_line_info, 0); g_type_add_interface_static(ags_type_synth_input_line, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_synth_input_line, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_synth_input_line); } void ags_synth_input_line_class_init(AgsSynthInputLineClass *synth_input_line) { AgsLineClass *line; GtkWidgetClass *widget; ags_synth_input_line_parent_class = g_type_class_peek_parent(synth_input_line); /* GtkWidgetClass */ widget = (GtkWidgetClass *) synth_input_line; widget->show = ags_synth_input_line_show; widget->show_all = ags_synth_input_line_show_all; /* AgsLineClass */ line = AGS_LINE_CLASS(synth_input_line); line->set_channel = ags_synth_input_line_set_channel; line->map_recall = ags_synth_input_line_map_recall; } void ags_synth_input_line_connectable_interface_init(AgsConnectableInterface *connectable) { ags_synth_input_line_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_synth_input_line_connect; connectable->disconnect = ags_synth_input_line_disconnect; } void ags_synth_input_line_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_synth_input_line_get_name; plugin->set_name = ags_synth_input_line_set_name; plugin->get_xml_type = ags_synth_input_line_get_xml_type; plugin->set_xml_type = ags_synth_input_line_set_xml_type; plugin->read = ags_synth_input_line_read; plugin->write = ags_synth_input_line_write; } void ags_synth_input_line_init(AgsSynthInputLine *synth_input_line) { AgsOscillator *oscillator; synth_input_line->name = NULL; synth_input_line->xml_type = "ags-synth-input-line"; /* oscillator */ oscillator = ags_oscillator_new(); synth_input_line->oscillator = oscillator; ags_expander_add(AGS_LINE(synth_input_line)->expander, GTK_WIDGET(oscillator), 0, 0, 1, 1); } void ags_synth_input_line_connect(AgsConnectable *connectable) { AgsSynthInputLine *synth_input_line; synth_input_line = AGS_SYNTH_INPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(synth_input_line)->flags)) != 0){ return; } ags_synth_input_line_parent_connectable_interface->connect(connectable); ags_connectable_connect(AGS_CONNECTABLE(synth_input_line->oscillator)); g_signal_connect_after((GObject *) synth_input_line->oscillator, "control-changed", G_CALLBACK(ags_synth_input_line_oscillator_control_changed_callback), (gpointer) synth_input_line); } void ags_synth_input_line_disconnect(AgsConnectable *connectable) { AgsSynthInputLine *synth_input_line; synth_input_line = AGS_SYNTH_INPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(synth_input_line)->flags)) == 0){ return; } ags_synth_input_line_parent_connectable_interface->disconnect(connectable); ags_connectable_disconnect(AGS_CONNECTABLE(synth_input_line->oscillator)); g_object_disconnect((GObject *) synth_input_line->oscillator, "any_signal::control-changed", G_CALLBACK(ags_synth_input_line_oscillator_control_changed_callback), (gpointer) synth_input_line, NULL); } void ags_synth_input_line_set_channel(AgsLine *line, AgsChannel *channel) { AGS_LINE_CLASS(ags_synth_input_line_parent_class)->set_channel(line, channel); /* empty */ } void ags_synth_input_line_map_recall(AgsLine *line, guint output_pad_start) { if((AGS_LINE_MAPPED_RECALL & (line->flags)) != 0 || (AGS_LINE_PREMAPPED_RECALL & (line->flags)) != 0){ return; } /* empty */ /* call parent */ AGS_LINE_CLASS(ags_synth_input_line_parent_class)->map_recall(line, output_pad_start); } gchar* ags_synth_input_line_get_name(AgsPlugin *plugin) { return(AGS_SYNTH_INPUT_LINE(plugin)->name); } void ags_synth_input_line_set_name(AgsPlugin *plugin, gchar *name) { AGS_SYNTH_INPUT_LINE(plugin)->name = name; } gchar* ags_synth_input_line_get_xml_type(AgsPlugin *plugin) { return(AGS_SYNTH_INPUT_LINE(plugin)->xml_type); } void ags_synth_input_line_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_SYNTH_INPUT_LINE(plugin)->xml_type = xml_type; } void ags_synth_input_line_show(GtkWidget *line) { GTK_WIDGET_CLASS(ags_synth_input_line_parent_class)->show(line); gtk_widget_hide(GTK_WIDGET(AGS_LINE(line)->group)); } void ags_synth_input_line_show_all(GtkWidget *line) { GTK_WIDGET_CLASS(ags_synth_input_line_parent_class)->show_all(line); gtk_widget_hide(GTK_WIDGET(AGS_LINE(line)->group)); } void ags_synth_input_line_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsSynthInputLine *gobject; AgsFileLookup *file_lookup; xmlNode *child; gobject = AGS_SYNTH_INPUT_LINE(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->oscillator = ags_oscillator_new(); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_synth_input_line_resolve_line), gobject); /* child elements */ child = node->children; while(child != NULL){ if(XML_ELEMENT_NODE == child->type){ if(!xmlStrncmp(child->name, "ags-oscillator", 15)){ ags_file_read_oscillator(file, child, &(gobject->oscillator)); } } child = child->next; } } void ags_synth_input_line_resolve_line(AgsFileLookup *file_lookup, AgsSynthInputLine *synth_input_line) { ags_expander_add(AGS_LINE(synth_input_line)->expander, GTK_WIDGET(synth_input_line->oscillator), 0, 0, 1, 1); } xmlNode* ags_synth_input_line_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsSynthInputLine *synth_input_line; xmlNode *node; gchar *id; synth_input_line = AGS_SYNTH_INPUT_LINE(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-synth-input-line"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", synth_input_line, NULL)); ags_file_write_oscillator(file, node, synth_input_line->oscillator); xmlAddChild(parent, node); return(node); } /** * ags_synth_input_line_new: * @channel: the assigned channel * * Creates an #AgsSynthInputLine * * Returns: a new #AgsSynthInputLine * * Since: 1.0.0 */ AgsSynthInputLine* ags_synth_input_line_new(AgsChannel *channel) { AgsSynthInputLine *synth_input_line; synth_input_line = (AgsSynthInputLine *) g_object_new(AGS_TYPE_SYNTH_INPUT_LINE, "channel", channel, NULL); return(synth_input_line); } gsequencer-1.4.24/ags/X/machine/ags_drum_input_line.h0000644000175000017500000000374013246707333017465 00000000000000/* 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 . */ #ifndef __AGS_DRUM_INPUT_LINE_H__ #define __AGS_DRUM_INPUT_LINE_H__ #include #include #include #include #define AGS_TYPE_DRUM_INPUT_LINE (ags_drum_input_line_get_type()) #define AGS_DRUM_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DRUM_INPUT_LINE, AgsDrumInputLine)) #define AGS_DRUM_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_DRUM_INPUT_LINE, AgsDrumInputLineClass)) #define AGS_IS_DRUM_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DRUM_INPUT_LINE)) #define AGS_IS_DRUM_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_DRUM_INPUT_LINE)) #define AGS_DRUM_INPUT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_DRUM_INPUT_LINE, AgsDrumInputLineClass)) typedef struct _AgsDrumInputLine AgsDrumInputLine; typedef struct _AgsDrumInputLineClass AgsDrumInputLineClass; struct _AgsDrumInputLine { AgsLine line; gchar *name; gchar *xml_type; }; struct _AgsDrumInputLineClass { AgsLineClass line; }; GType ags_drum_input_line_get_type(); AgsDrumInputLine* ags_drum_input_line_new(AgsChannel *channel); #endif /*__AGS_DRUM_INPUT_LINE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_mixer_input_line.c0000644000175000017500000002171013247044247017631 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_mixer_input_line_class_init(AgsMixerInputLineClass *mixer_input_line); void ags_mixer_input_line_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mixer_input_line_init(AgsMixerInputLine *mixer_input_line); void ags_mixer_input_line_connect(AgsConnectable *connectable); void ags_mixer_input_line_disconnect(AgsConnectable *connectable); void ags_mixer_input_line_set_channel(AgsLine *line, AgsChannel *channel); void ags_mixer_input_line_map_recall(AgsLine *line, guint output_pad_start); /** * SECTION:ags_mixer_input_line * @short_description: mixer input line * @title: AgsMixerInputLine * @section_id: * @include: ags/X/machine/ags_mixer_input_line.h * * The #AgsMixerInputLine is a composite widget to act as mixer input line. */ static gpointer ags_mixer_input_line_parent_class = NULL; static AgsConnectableInterface *ags_mixer_input_line_parent_connectable_interface; extern GHashTable *ags_line_indicator_queue_draw; GType ags_mixer_input_line_get_type() { static GType ags_type_mixer_input_line = 0; if(!ags_type_mixer_input_line){ static const GTypeInfo ags_mixer_input_line_info = { sizeof(AgsMixerInputLineClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mixer_input_line_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsMixerInputLine), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mixer_input_line_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mixer_input_line_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mixer_input_line = g_type_register_static(AGS_TYPE_LINE, "AgsMixerInputLine", &ags_mixer_input_line_info, 0); g_type_add_interface_static(ags_type_mixer_input_line, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_mixer_input_line); } void ags_mixer_input_line_class_init(AgsMixerInputLineClass *mixer_input_line) { AgsLineClass *line; ags_mixer_input_line_parent_class = g_type_class_peek_parent(mixer_input_line); /* AgsLineClass */ line = AGS_LINE_CLASS(mixer_input_line); line->set_channel = ags_mixer_input_line_set_channel; line->map_recall = ags_mixer_input_line_map_recall; } void ags_mixer_input_line_connectable_interface_init(AgsConnectableInterface *connectable) { ags_mixer_input_line_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_mixer_input_line_connect; connectable->disconnect = ags_mixer_input_line_disconnect; } void ags_mixer_input_line_init(AgsMixerInputLine *mixer_input_line) { AgsLineMember *line_member; GtkWidget *widget; GtkAdjustment *adjustment; /* volume indicator */ line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, "widget-type", AGS_TYPE_VINDICATOR, "plugin-name", "ags-peak", "specifier", "./peak[0]", "control-port", "1/1", NULL); line_member->flags |= (AGS_LINE_MEMBER_PLAY_CALLBACK_WRITE | AGS_LINE_MEMBER_RECALL_CALLBACK_WRITE); ags_expander_add(AGS_LINE(mixer_input_line)->expander, GTK_WIDGET(line_member), 0, 0, 1, 1); widget = gtk_bin_get_child(GTK_BIN(line_member)); AGS_LINE(mixer_input_line)->indicator = widget; g_hash_table_insert(ags_line_indicator_queue_draw, widget, ags_line_indicator_queue_draw_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_line_indicator_queue_draw_timeout, (gpointer) widget); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 10.0, 1.0, 1.0, 10.0); g_object_set(widget, "adjustment", adjustment, NULL); gtk_widget_set_size_request(widget, 16, 100); gtk_widget_queue_draw(widget); /* volume */ line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, "widget-type", GTK_TYPE_VSCALE, "plugin-name", "ags-volume", "specifier", "./volume[0]", "control-port", "1/1", NULL); ags_expander_add(AGS_LINE(mixer_input_line)->expander, GTK_WIDGET(line_member), 1, 0, 1, 1); widget = gtk_bin_get_child(GTK_BIN(line_member)); gtk_scale_set_digits(GTK_SCALE(widget), 3); gtk_range_set_range(GTK_RANGE(widget), 0.0, 2.00); gtk_range_set_increments(GTK_RANGE(widget), 0.025, 0.1); gtk_range_set_value(GTK_RANGE(widget), 1.0); gtk_range_set_inverted(GTK_RANGE(widget), TRUE); gtk_widget_set_size_request(widget, -1, 100); } void ags_mixer_input_line_connect(AgsConnectable *connectable) { AgsMixerInputLine *mixer_input_line; mixer_input_line = AGS_MIXER_INPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(mixer_input_line)->flags)) != 0){ return; } ags_mixer_input_line_parent_connectable_interface->connect(connectable); } void ags_mixer_input_line_disconnect(AgsConnectable *connectable) { AgsMixerInputLine *mixer_input_line; mixer_input_line = AGS_MIXER_INPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(mixer_input_line)->flags)) == 0){ return; } ags_mixer_input_line_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_mixer_input_line_set_channel(AgsLine *line, AgsChannel *channel) { AGS_LINE_CLASS(ags_mixer_input_line_parent_class)->set_channel(line, channel); /* empty */ } void ags_mixer_input_line_map_recall(AgsLine *line, guint output_pad_start) { AgsAudio *audio; AgsChannel *source; AgsRecallHandler *recall_handler; AgsPeakChannelRun *recall_peak_channel_run, *play_peak_channel_run; AgsMutexManager *mutex_manager; GList *list; guint pad, audio_channel; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *source_mutex; if((AGS_LINE_MAPPED_RECALL & (line->flags)) != 0 || (AGS_LINE_PREMAPPED_RECALL & (line->flags)) != 0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); source = line->channel; /* get source mutex */ pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(source_mutex); audio = (AgsAudio *) source->audio; pad = source->pad; audio_channel = source->audio_channel; pthread_mutex_unlock(source_mutex); /* ags-peak */ ags_recall_factory_create(audio, NULL, NULL, "ags-peak", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-mute */ ags_recall_factory_create(audio, NULL, NULL, "ags-mute", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-volume */ ags_recall_factory_create(audio, NULL, NULL, "ags-volume", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* call parent */ AGS_LINE_CLASS(ags_mixer_input_line_parent_class)->map_recall(line, output_pad_start); } /** * ags_mixer_input_line_new: * @channel: the assigned channel * * Creates an #AgsMixerInputLine * * Returns: a new #AgsMixerInputLine * * Since: 1.0.0 */ AgsMixerInputLine* ags_mixer_input_line_new(AgsChannel *channel) { AgsMixerInputLine *mixer_input_line; mixer_input_line = (AgsMixerInputLine *) g_object_new(AGS_TYPE_MIXER_INPUT_LINE, "channel", channel, NULL); return(mixer_input_line); } gsequencer-1.4.24/ags/X/machine/ags_panel_callbacks.h0000644000175000017500000000206413247044247017363 00000000000000/* 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 . */ #ifndef __AGS_PANEL_CALLBACKS_H__ #define __AGS_PANEL_CALLBACKS_H__ #include #include #include #include void ags_panel_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsPanel *panel); #endif /*__AGS_PANEL_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_ffplayer_bulk_input_callbacks.c0000644000175000017500000000147713246707333022333 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/machine/ags_audiorec.c0000644000175000017500000003660313247044247016061 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_audiorec_class_init(AgsAudiorecClass *audiorec); void ags_audiorec_connectable_interface_init(AgsConnectableInterface *connectable); void ags_audiorec_plugin_interface_init(AgsPluginInterface *plugin); void ags_audiorec_init(AgsAudiorec *audiorec); void ags_audiorec_connect(AgsConnectable *connectable); void ags_audiorec_disconnect(AgsConnectable *connectable); void ags_audiorec_finalize(GObject *gobject); void ags_audiorec_show(GtkWidget *widget); void ags_audiorec_map_recall(AgsMachine *machine); gchar* ags_audiorec_get_name(AgsPlugin *plugin); void ags_audiorec_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_audiorec_get_xml_type(AgsPlugin *plugin); void ags_audiorec_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_audiorec_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_audiorec_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_audiorec_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_audiorec_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data); void ags_audiorec_output_map_recall(AgsAudiorec *audiorec, guint output_pad_start); void ags_audiorec_input_map_recall(AgsAudiorec *audiorec, guint input_pad_start); /** * SECTION:ags_audiorec * @short_description: record audio data * @title: AgsAudiorec * @section_id: * @include: ags/X/machine/ags_audiorec.h * * The #AgsAudiorec is a composite widget to act as capture source. */ static gpointer ags_audiorec_parent_class = NULL; static AgsConnectableInterface *ags_audiorec_parent_connectable_interface; GType ags_audiorec_get_type(void) { static GType ags_type_audiorec = 0; if(!ags_type_audiorec){ static const GTypeInfo ags_audiorec_info = { sizeof(AgsAudiorecClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audiorec_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsAudiorec), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audiorec_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_audiorec_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_audiorec_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audiorec = g_type_register_static(AGS_TYPE_MACHINE, "AgsAudiorec", &ags_audiorec_info, 0); g_type_add_interface_static(ags_type_audiorec, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_audiorec, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_audiorec); } void ags_audiorec_class_init(AgsAudiorecClass *audiorec) { GObjectClass *gobject; GtkWidgetClass *widget; AgsMachineClass *machine; ags_audiorec_parent_class = g_type_class_peek_parent(audiorec); /* GObjectClass */ gobject = (GObjectClass *) audiorec; gobject->finalize = ags_audiorec_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) audiorec; widget->show = ags_audiorec_show; /* AgsMachineClass */ machine = (AgsMachineClass *) audiorec; machine->map_recall = ags_audiorec_map_recall; } void ags_audiorec_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_audiorec_connectable_parent_interface; ags_audiorec_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_audiorec_connect; } void ags_audiorec_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_audiorec_get_name; plugin->set_name = ags_audiorec_set_name; plugin->get_xml_type = ags_audiorec_get_xml_type; plugin->set_xml_type = ags_audiorec_set_xml_type; plugin->read = ags_audiorec_read; plugin->write = ags_audiorec_write; } void ags_audiorec_init(AgsAudiorec *audiorec) { GtkHBox *hbox; GtkHBox *vbox; GtkHBox *filename_hbox; GtkHBox *radio_hbox; GtkFrame *frame; GtkLabel *label; AgsAudio *audio; audio = AGS_MACHINE(audiorec)->audio; audio->flags |= (AGS_AUDIO_SYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING); /* audio resize */ g_signal_connect_after(G_OBJECT(audiorec), "resize-audio-channels", G_CALLBACK(ags_audiorec_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(audiorec), "resize-pads", G_CALLBACK(ags_audiorec_resize_pads), NULL); /* mapped IO */ audiorec->mapped_input_pad = 0; audiorec->mapped_output_pad = 0; /* name and xml type */ audiorec->name = NULL; audiorec->xml_type = "ags-audiorec"; /* context menu */ ags_machine_popup_add_connection_options((AgsMachine *) audiorec, (AGS_MACHINE_POPUP_CONNECTION_EDITOR)); AGS_MACHINE(audiorec)->connection_flags |= AGS_MACHINE_SHOW_AUDIO_INPUT_CONNECTION; /* hbox */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_container_add((GtkContainer *) (gtk_bin_get_child((GtkBin *) audiorec)), (GtkWidget *) hbox); /* frame - filename and open */ frame = (GtkFrame *) gtk_frame_new("file"); gtk_box_pack_start(hbox, frame, FALSE, FALSE, 0); vbox = (GtkHBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer *) frame, (GtkWidget *) vbox); /* filename */ filename_hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(vbox, filename_hbox, FALSE, FALSE, 0); label = gtk_label_new("filename: "); gtk_box_pack_start(filename_hbox, label, FALSE, FALSE, 0); audiorec->filename = (GtkEntry *) gtk_entry_new(); gtk_box_pack_start(filename_hbox, audiorec->filename, FALSE, FALSE, 0); audiorec->open = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_OPEN); gtk_box_pack_start(filename_hbox, audiorec->open, FALSE, FALSE, 0); /* radio */ radio_hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(vbox, radio_hbox, FALSE, FALSE, 0); audiorec->keep_data = gtk_radio_button_new_with_label_from_widget(NULL, "keep"); gtk_box_pack_start(radio_hbox, audiorec->keep_data, FALSE, FALSE, 0); audiorec->replace_data = gtk_radio_button_new_with_label_from_widget(audiorec->keep_data, "replace"); gtk_box_pack_start(radio_hbox, audiorec->replace_data, FALSE, FALSE, 0); audiorec->mix_data = gtk_radio_button_new_with_label_from_widget(audiorec->keep_data, "mix"); gtk_box_pack_start(radio_hbox, audiorec->mix_data, FALSE, FALSE, 0); /* frame - hindicator */ frame = (GtkFrame *) gtk_frame_new("input"); gtk_box_pack_start(hbox, frame, FALSE, FALSE, 0); audiorec->hindicator_vbox = (GtkHBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer *) frame, (GtkWidget *) audiorec->hindicator_vbox); /* dialog */ audiorec->open_dialog = NULL; } void ags_audiorec_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_audiorec_parent_class)->finalize(gobject); } void ags_audiorec_connect(AgsConnectable *connectable) { AgsWindow *window; AgsAudiorec *audiorec; GList *list; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_audiorec_parent_connectable_interface->connect(connectable); audiorec = AGS_AUDIOREC(connectable); /* filename */ g_signal_connect(audiorec->open, "clicked", G_CALLBACK(ags_audiorec_open_callback), audiorec); /* mode */ g_signal_connect(audiorec->keep_data, "clicked", G_CALLBACK(ags_audiorec_keep_data_callback), audiorec); g_signal_connect(audiorec->mix_data, "clicked", G_CALLBACK(ags_audiorec_mix_data_callback), audiorec); g_signal_connect(audiorec->replace_data, "clicked", G_CALLBACK(ags_audiorec_replace_data_callback), audiorec); } void ags_audiorec_disconnect(AgsConnectable *connectable) { AgsAudiorec *audiorec; GList *list; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } ags_audiorec_parent_connectable_interface->disconnect(connectable); audiorec = AGS_AUDIOREC(connectable); /* filename */ g_object_disconnect(audiorec->open, "any_signal::clicked", G_CALLBACK(ags_audiorec_open_callback), audiorec, NULL); /* mode */ g_object_disconnect(audiorec->keep_data, "any_signal::clicked", G_CALLBACK(ags_audiorec_keep_data_callback), audiorec, NULL); g_object_disconnect(audiorec->replace_data, "any_signal::clicked", G_CALLBACK(ags_audiorec_replace_data_callback), audiorec, NULL); g_object_disconnect(audiorec->mix_data, "any_signal::clicked", G_CALLBACK(ags_audiorec_mix_data_callback), audiorec, NULL); } void ags_audiorec_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_audiorec_parent_class)->show(widget); } void ags_audiorec_map_recall(AgsMachine *machine) { AgsAudiorec *audiorec; AgsAudio *audio; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } audiorec = AGS_AUDIOREC(machine); audio = machine->audio; /* ags-play-wave */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-wave", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); /* depending on destination */ ags_audiorec_input_map_recall(audiorec, 0); /* depending on destination */ ags_audiorec_output_map_recall(audiorec, 0); /* call parent */ AGS_MACHINE_CLASS(ags_audiorec_parent_class)->map_recall(machine); } void ags_audiorec_output_map_recall(AgsAudiorec *audiorec, guint output_pad_start) { //TODO:JK: implement me } void ags_audiorec_input_map_recall(AgsAudiorec *audiorec, guint input_pad_start) { //TODO:JK: implement me } gchar* ags_audiorec_get_name(AgsPlugin *plugin) { return(AGS_AUDIOREC(plugin)->name); } void ags_audiorec_set_name(AgsPlugin *plugin, gchar *name) { AGS_AUDIOREC(plugin)->name = name; } gchar* ags_audiorec_get_xml_type(AgsPlugin *plugin) { return(AGS_AUDIOREC(plugin)->xml_type); } void ags_audiorec_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_AUDIOREC(plugin)->xml_type = xml_type; } void ags_audiorec_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { AgsAudiorec *audiorec; guint pads; audiorec = AGS_AUDIOREC(machine); pads = machine->audio->input_pads; if(audio_channels > audio_channels_old && pads > 0){ AgsHIndicator *hindicator; guint i; for(i = audio_channels_old; i < audio_channels; i++){ hindicator = ags_hindicator_new(); gtk_box_pack_start(audiorec->hindicator_vbox, hindicator, FALSE, FALSE, 8); } gtk_widget_show_all(audiorec->hindicator_vbox); }else{ GList *list, *list_start; list_start = list = gtk_container_get_children(audiorec->hindicator_vbox); list = g_list_nth(list_start, audio_channels); while(list != NULL){ gtk_widget_destroy(list->data); list = list->next; } g_list_free(list_start); } } void ags_audiorec_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data) { AgsAudiorec *audiorec; audiorec = AGS_AUDIOREC(machine); if(type == AGS_TYPE_INPUT){ if(pads == 1 && pads_old == 0){ AgsHIndicator *hindicator; guint audio_channels; guint i; audio_channels = machine->audio->audio_channels; for(i = 0; i < audio_channels; i++){ hindicator = ags_hindicator_new(); gtk_box_pack_start(audiorec->hindicator_vbox, hindicator, FALSE, FALSE, 8); } gtk_widget_show_all(audiorec->hindicator_vbox); }else if(pads == 0){ GList *list, *list_start; list_start = list = gtk_container_get_children(audiorec->hindicator_vbox); while(list != NULL){ gtk_widget_destroy(list->data); list = list->next; } g_list_free(list_start); /* depending on destination */ ags_audiorec_input_map_recall(audiorec, pads_old); }else{ audiorec->mapped_input_pad = pads; } }else{ if(pads > pads_old){ /* depending on destination */ ags_audiorec_output_map_recall(audiorec, pads_old); }else{ audiorec->mapped_output_pad = pads; } } } void ags_audiorec_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsAudiorec *gobject; gobject = AGS_AUDIOREC(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); //TODO:JK: implement me } xmlNode* ags_audiorec_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsAudiorec *audiorec; xmlNode *node; gchar *id; audiorec = AGS_AUDIOREC(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-audiorec"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", audiorec, NULL)); //TODO:JK: implement me xmlAddChild(parent, node); return(node); } void ags_audiorec_open_filename(AgsAudiorec *audiorec, gchar *filename) { //TODO:JK: implement me } /** * ags_audiorec_new: * @soundcard: the assigned soundcard. * * Creates an #AgsAudiorec * * Returns: a new #AgsAudiorec * * Since: 1.2.0 */ AgsAudiorec* ags_audiorec_new(GObject *soundcard) { AgsAudiorec *audiorec; GValue value = {0,}; audiorec = (AgsAudiorec *) g_object_new(AGS_TYPE_AUDIOREC, NULL); if(soundcard != NULL){ g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, soundcard); g_object_set_property(G_OBJECT(audiorec->machine.audio), "soundcard", &value); g_value_unset(&value); } return(audiorec); } gsequencer-1.4.24/ags/X/machine/ags_panel_input_line_callbacks.h0000644000175000017500000000200013247044247021577 00000000000000/* 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 . */ #ifndef __AGS_PANEL_INPUT_LINE_CALLBACKS_H__ #define __AGS_PANEL_INPUT_LINE_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_PANEL_INPUT_LINE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_input_pad.c0000644000175000017500000002611513247044247017275 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_drum_input_pad_class_init(AgsDrumInputPadClass *drum_input_pad); void ags_drum_input_pad_connectable_interface_init(AgsConnectableInterface *connectable); void ags_drum_input_pad_plugin_interface_init(AgsPluginInterface *plugin); void ags_drum_input_pad_init(AgsDrumInputPad *drum_input_pad); static void ags_drum_input_pad_finalize(GObject *gobject); void ags_drum_input_pad_connect(AgsConnectable *connectable); void ags_drum_input_pad_disconnect(AgsConnectable *connectable); gchar* ags_drum_input_pad_get_name(AgsPlugin *plugin); void ags_drum_input_pad_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_drum_input_pad_get_xml_type(AgsPlugin *plugin); void ags_drum_input_pad_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_drum_input_pad_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_drum_input_pad_launch_task(AgsFileLaunch *file_launch, AgsDrumInputPad *drum_input_pad); xmlNode* ags_drum_input_pad_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_drum_input_pad_set_channel(AgsPad *pad, AgsChannel *channel); void ags_drum_input_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old); /** * SECTION:ags_drum_input_pad * @short_description: drum sequencer input pad * @title: AgsDrumInputPad * @section_id: * @include: ags/X/machine/ags_drum_input_pad.h * * The #AgsDrumInputPad is a composite widget to act as drum sequencer input pad. */ static gpointer ags_drum_input_pad_parent_class = NULL; static AgsConnectableInterface *ags_drum_input_pad_parent_connectable_interface; GType ags_drum_input_pad_get_type() { static GType ags_type_drum_input_pad = 0; if(!ags_type_drum_input_pad){ static const GTypeInfo ags_drum_input_pad_info = { sizeof(AgsDrumInputPadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_drum_input_pad_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsDrumInputPad), 0, /* n_preallocs */ (GInstanceInitFunc) ags_drum_input_pad_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_drum_input_pad_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_drum_input_pad_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_drum_input_pad = g_type_register_static(AGS_TYPE_PAD, "AgsDrumInputPad", &ags_drum_input_pad_info, 0); g_type_add_interface_static(ags_type_drum_input_pad, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_drum_input_pad, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_drum_input_pad); } void ags_drum_input_pad_class_init(AgsDrumInputPadClass *drum_input_pad) { AgsPadClass *pad; GObjectClass *gobject; ags_drum_input_pad_parent_class = g_type_class_peek_parent(drum_input_pad); /* */ gobject = (GObjectClass *) drum_input_pad; gobject->finalize = ags_drum_input_pad_finalize; /* */ pad = (AgsPadClass *) drum_input_pad; pad->set_channel = ags_drum_input_pad_set_channel; pad->resize_lines = ags_drum_input_pad_resize_lines; } void ags_drum_input_pad_connectable_interface_init(AgsConnectableInterface *connectable) { ags_drum_input_pad_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_drum_input_pad_connect; connectable->disconnect = ags_drum_input_pad_disconnect; } void ags_drum_input_pad_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_drum_input_pad_get_name; plugin->set_name = ags_drum_input_pad_set_name; plugin->get_xml_type = ags_drum_input_pad_get_xml_type; plugin->set_xml_type = ags_drum_input_pad_set_xml_type; plugin->read = ags_drum_input_pad_read; plugin->write = ags_drum_input_pad_write; } void ags_drum_input_pad_init(AgsDrumInputPad *drum_input_pad) { AgsPad *pad; GtkHBox *hbox; drum_input_pad->flags = 0; drum_input_pad->name = NULL; drum_input_pad->xml_type = "ags-drum-input-pad"; pad = (AgsPad *) drum_input_pad; /* toplevel functions */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) pad, (GtkWidget *) hbox, FALSE, TRUE, 0); gtk_box_reorder_child((GtkBox *) pad, (GtkWidget *) hbox, 0); /* open */ drum_input_pad->open = (GtkButton *) gtk_button_new(); gtk_container_add((GtkContainer *) drum_input_pad->open, (GtkWidget *) gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON)); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) drum_input_pad->open, TRUE, TRUE, 0); /* play */ AGS_PAD(drum_input_pad)->play = drum_input_pad->play = (GtkToggleButton *) gtk_toggle_button_new(); gtk_container_add((GtkContainer *) drum_input_pad->play, (GtkWidget *) gtk_image_new_from_stock(GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_BUTTON)); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) drum_input_pad->play, TRUE, TRUE, 0); /* bottom functions - edit */ drum_input_pad->edit = (GtkToggleButton *) gtk_toggle_button_new_with_label(i18n("edit")); gtk_box_pack_start((GtkBox *) pad, (GtkWidget *) drum_input_pad->edit, FALSE, FALSE, 0); /* recall specific */ drum_input_pad->pad_open_play_ref = 0; drum_input_pad->pad_open_recalls = NULL; drum_input_pad->file_chooser = NULL; drum_input_pad->pad_play_ref = 0; } static void ags_drum_input_pad_finalize(GObject *gobject) { AgsDrumInputPad *drum_input_pad; drum_input_pad = AGS_DRUM_INPUT_PAD(gobject); //FIXME:JK: won't be called //NOTE:JK: work-around in ags_drum.c if(drum_input_pad->file_chooser != NULL){ // gtk_widget_destroy(drum_input_pad->file_chooser); } G_OBJECT_CLASS(ags_drum_input_pad_parent_class)->finalize(gobject); } void ags_drum_input_pad_connect(AgsConnectable *connectable) { AgsDrumInputPad *drum_input_pad; drum_input_pad = AGS_DRUM_INPUT_PAD(connectable); if((AGS_PAD_CONNECTED & (AGS_PAD(drum_input_pad)->flags)) != 0){ return; } ags_drum_input_pad_parent_connectable_interface->connect(connectable); /* AgsDrumInputPad */ g_signal_connect(G_OBJECT(drum_input_pad->open), "clicked", G_CALLBACK(ags_drum_input_pad_open_callback), (gpointer) drum_input_pad); g_signal_connect_after(G_OBJECT(drum_input_pad->play), "toggled", G_CALLBACK(ags_drum_input_pad_play_callback), (gpointer) drum_input_pad); g_signal_connect(G_OBJECT(drum_input_pad->edit), "clicked", G_CALLBACK(ags_drum_input_pad_edit_callback), (gpointer) drum_input_pad); } void ags_drum_input_pad_disconnect(AgsConnectable *connectable) { ags_drum_input_pad_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_drum_input_pad_set_channel(AgsPad *pad, AgsChannel *channel) { AGS_PAD_CLASS(ags_drum_input_pad_parent_class)->set_channel(pad, channel); /* empty */ } void ags_drum_input_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old) { AGS_PAD_CLASS(ags_drum_input_pad_parent_class)->resize_lines(pad, line_type, audio_channels, audio_channels_old); /* empty */ } gchar* ags_drum_input_pad_get_name(AgsPlugin *plugin) { return(AGS_DRUM_INPUT_PAD(plugin)->name); } void ags_drum_input_pad_set_name(AgsPlugin *plugin, gchar *name) { AGS_DRUM_INPUT_PAD(plugin)->name = name; } gchar* ags_drum_input_pad_get_xml_type(AgsPlugin *plugin) { return(AGS_DRUM_INPUT_PAD(plugin)->xml_type); } void ags_drum_input_pad_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_DRUM_INPUT_PAD(plugin)->xml_type = xml_type; } void ags_drum_input_pad_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsDrumInputPad *gobject; AgsFileLaunch *file_launch; gobject = AGS_DRUM_INPUT_PAD(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, "file", file, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_drum_input_pad_launch_task), gobject); ags_file_add_launch(file, (GObject *) file_launch); } void ags_drum_input_pad_launch_task(AgsFileLaunch *file_launch, AgsDrumInputPad *drum_input_pad) { xmlNode *node; node = file_launch->node; if(!xmlStrncmp(xmlGetProp(node, "edit"), AGS_FILE_TRUE, 5)){ gtk_button_clicked((GtkButton *) drum_input_pad->edit); } } xmlNode* ags_drum_input_pad_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsDrumInputPad *drum_input_pad; xmlNode *node; gchar *id; drum_input_pad = AGS_DRUM_INPUT_PAD(plugin); node = NULL; if(gtk_toggle_button_get_active(drum_input_pad->edit)){ id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-drum-input-pad"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", drum_input_pad, NULL)); xmlNewProp(node, "edit", g_strdup_printf("%s", AGS_FILE_TRUE)); xmlAddChild(parent, node); } return(node); } /** * ags_drum_input_pad_new: * @channel: the assigned channel * * Creates an #AgsDrumInputPad * * Returns: a new #AgsDrumInputPad * * Since: 1.0.0 */ AgsDrumInputPad* ags_drum_input_pad_new(AgsChannel *channel) { AgsDrumInputPad *drum_input_pad; drum_input_pad = (AgsDrumInputPad *) g_object_new(AGS_TYPE_DRUM_INPUT_PAD, "channel", channel, NULL); return(drum_input_pad); } gsequencer-1.4.24/ags/X/machine/ags_live_dssi_bridge.c0000644000175000017500000013116513247044247017562 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_live_dssi_bridge_class_init(AgsLiveDssiBridgeClass *live_dssi_bridge); void ags_live_dssi_bridge_connectable_interface_init(AgsConnectableInterface *connectable); void ags_live_dssi_bridge_plugin_interface_init(AgsPluginInterface *plugin); void ags_live_dssi_bridge_init(AgsLiveDssiBridge *live_dssi_bridge); void ags_live_dssi_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_live_dssi_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_live_dssi_bridge_connect(AgsConnectable *connectable); void ags_live_dssi_bridge_disconnect(AgsConnectable *connectable); gchar* ags_live_dssi_bridge_get_version(AgsPlugin *plugin); void ags_live_dssi_bridge_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_live_dssi_bridge_get_build_id(AgsPlugin *plugin); void ags_live_dssi_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id); gchar* ags_live_dssi_bridge_get_xml_type(AgsPlugin *plugin); void ags_live_dssi_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_live_dssi_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_live_dssi_bridge_launch_task(AgsFileLaunch *file_launch, AgsLiveDssiBridge *live_dssi_bridge); xmlNode* ags_live_dssi_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_live_dssi_bridge_finalize(GObject *gobject); void ags_live_dssi_bridge_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_live_dssi_bridge_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data); void ags_live_dssi_bridge_map_recall(AgsMachine *machine); /** * SECTION:ags_live_dssi_bridge * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsLiveDssiBridge * @section_id: * @include: ags/X/machine/ags_live_dssi_bridge.h * * #AgsLiveDssiBridge is a composite widget to visualize all #AgsChannel. It should be * packed by an #AgsMachine. */ enum{ PROP_0, PROP_FILENAME, PROP_EFFECT, PROP_INDEX, }; static gpointer ags_live_dssi_bridge_parent_class = NULL; static AgsConnectableInterface* ags_live_dssi_bridge_parent_connectable_interface; static AgsPluginInterface* ags_live_dssi_bridge_parent_plugin_interface; extern GHashTable *ags_effect_bulk_indicator_queue_draw; GType ags_live_dssi_bridge_get_type(void) { static GType ags_type_live_dssi_bridge = 0; if(!ags_type_live_dssi_bridge){ static const GTypeInfo ags_live_dssi_bridge_info = { sizeof(AgsLiveDssiBridgeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_live_dssi_bridge_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsLiveDssiBridge), 0, /* n_preallocs */ (GInstanceInitFunc) ags_live_dssi_bridge_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_live_dssi_bridge_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_live_dssi_bridge_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_live_dssi_bridge = g_type_register_static(AGS_TYPE_MACHINE, "AgsLiveDssiBridge", &ags_live_dssi_bridge_info, 0); g_type_add_interface_static(ags_type_live_dssi_bridge, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_live_dssi_bridge, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_live_dssi_bridge); } void ags_live_dssi_bridge_class_init(AgsLiveDssiBridgeClass *live_dssi_bridge) { AgsMachineClass *machine; GObjectClass *gobject; GParamSpec *param_spec; ags_live_dssi_bridge_parent_class = g_type_class_peek_parent(live_dssi_bridge); /* GObjectClass */ gobject = G_OBJECT_CLASS(live_dssi_bridge); gobject->set_property = ags_live_dssi_bridge_set_property; gobject->get_property = ags_live_dssi_bridge_get_property; gobject->finalize = ags_live_dssi_bridge_finalize; /* properties */ /** * AgsRecallLiveDssi:filename: * * The plugins filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the object file"), i18n_pspec("The filename as string of object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsRecallLiveDssi:effect: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsRecallLiveDssi:index: * * The effect's index. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("index", i18n_pspec("index of effect"), i18n_pspec("The numerical index of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); /* AgsMachine */ machine = (AgsMachineClass *) live_dssi_bridge; machine->map_recall = ags_live_dssi_bridge_map_recall; } void ags_live_dssi_bridge_connectable_interface_init(AgsConnectableInterface *connectable) { ags_live_dssi_bridge_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_live_dssi_bridge_connect; connectable->disconnect = ags_live_dssi_bridge_disconnect; } void ags_live_dssi_bridge_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_live_dssi_bridge_get_version; plugin->set_version = ags_live_dssi_bridge_set_version; plugin->get_build_id = ags_live_dssi_bridge_get_build_id; plugin->set_build_id = ags_live_dssi_bridge_set_build_id; plugin->get_xml_type = ags_live_dssi_bridge_get_xml_type; plugin->set_xml_type = ags_live_dssi_bridge_set_xml_type; plugin->read = ags_live_dssi_bridge_read; plugin->write = ags_live_dssi_bridge_write; plugin->get_ports = NULL; plugin->set_ports = NULL; } void ags_live_dssi_bridge_init(AgsLiveDssiBridge *live_dssi_bridge) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; GtkTable *table; AgsAudio *audio; g_signal_connect_after((GObject *) live_dssi_bridge, "parent-set", G_CALLBACK(ags_live_dssi_bridge_parent_set_callback), (gpointer) live_dssi_bridge); audio = AGS_MACHINE(live_dssi_bridge)->audio; audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_SKIP_INPUT | AGS_AUDIO_REVERSE_MAPPING); audio->flags &= (~AGS_AUDIO_NOTATION_DEFAULT); g_object_set(audio, "audio-start-mapping", 0, "audio-end-mapping", 128, "midi-start-mapping", 0, "midi-end-mapping", 128, NULL); AGS_MACHINE(live_dssi_bridge)->flags |= (AGS_MACHINE_IS_SYNTHESIZER | AGS_MACHINE_REVERSE_NOTATION); ags_machine_popup_add_connection_options((AgsMachine *) live_dssi_bridge, (AGS_MACHINE_POPUP_MIDI_DIALOG)); g_signal_connect_after(G_OBJECT(live_dssi_bridge), "resize-audio-channels", G_CALLBACK(ags_live_dssi_bridge_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(live_dssi_bridge), "resize-pads", G_CALLBACK(ags_live_dssi_bridge_resize_pads), NULL); live_dssi_bridge->flags = 0; live_dssi_bridge->name = NULL; live_dssi_bridge->version = AGS_LIVE_DSSI_BRIDGE_DEFAULT_VERSION; live_dssi_bridge->build_id = AGS_LIVE_DSSI_BRIDGE_DEFAULT_BUILD_ID; live_dssi_bridge->xml_type = "ags-live-dssi-bridge"; live_dssi_bridge->mapped_output_pad = 0; live_dssi_bridge->mapped_input_pad = 0; live_dssi_bridge->filename = NULL; live_dssi_bridge->effect = NULL; live_dssi_bridge->effect_index = 0; live_dssi_bridge->port_values = NULL; live_dssi_bridge->dssi_descriptor = NULL; vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer *) gtk_bin_get_child((GtkBin *) live_dssi_bridge), (GtkWidget *) vbox); /* program */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("program")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 0); live_dssi_bridge->program = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) live_dssi_bridge->program, FALSE, FALSE, 0); /* effect bridge */ AGS_MACHINE(live_dssi_bridge)->bridge = (GtkContainer *) ags_effect_bridge_new(audio); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) AGS_MACHINE(live_dssi_bridge)->bridge, FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(1, 2, FALSE); gtk_box_pack_start((GtkBox *) AGS_EFFECT_BRIDGE(AGS_MACHINE(live_dssi_bridge)->bridge), (GtkWidget *) table, FALSE, FALSE, 0); AGS_EFFECT_BRIDGE(AGS_MACHINE(live_dssi_bridge)->bridge)->bulk_output = (GtkWidget *) ags_effect_bulk_new(audio, AGS_TYPE_OUTPUT); AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(live_dssi_bridge)->bridge)->bulk_output)->flags |= (AGS_EFFECT_BULK_HIDE_BUTTONS | AGS_EFFECT_BULK_HIDE_ENTRIES | AGS_EFFECT_BULK_SHOW_LABELS); gtk_table_attach(table, AGS_EFFECT_BRIDGE(AGS_MACHINE(live_dssi_bridge)->bridge)->bulk_output, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); } void ags_live_dssi_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLiveDssiBridge *live_dssi_bridge; live_dssi_bridge = AGS_LIVE_DSSI_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *str; gchar *filename; filename = g_value_get_string(value); if(filename == live_dssi_bridge->filename){ return; } if(live_dssi_bridge->filename != NULL){ g_free(live_dssi_bridge->filename); } if(filename != NULL){ if(!g_file_test(filename, G_FILE_TEST_EXISTS)){ AgsWindow *window; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) live_dssi_bridge); str = g_strdup_printf("%s %s", i18n("Plugin file not present"), filename); ags_window_show_error(window, str); g_free(str); } } live_dssi_bridge->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == live_dssi_bridge->effect){ return; } if(live_dssi_bridge->effect != NULL){ g_free(live_dssi_bridge->effect); } live_dssi_bridge->effect = g_strdup(effect); } break; case PROP_INDEX: { unsigned long effect_index; effect_index = (unsigned long) g_value_get_uint(value); if(effect_index == live_dssi_bridge->effect_index){ return; } live_dssi_bridge->effect_index = effect_index; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_live_dssi_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLiveDssiBridge *live_dssi_bridge; live_dssi_bridge = AGS_LIVE_DSSI_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, live_dssi_bridge->filename); } break; case PROP_EFFECT: { g_value_set_string(value, live_dssi_bridge->effect); } break; case PROP_INDEX: { g_value_set_uint(value, (guint) live_dssi_bridge->effect_index); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_live_dssi_bridge_connect(AgsConnectable *connectable) { AgsLiveDssiBridge *live_dssi_bridge; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_live_dssi_bridge_parent_connectable_interface->connect(connectable); live_dssi_bridge = AGS_LIVE_DSSI_BRIDGE(connectable); g_signal_connect_after(G_OBJECT(live_dssi_bridge->program), "changed", G_CALLBACK(ags_live_dssi_bridge_program_changed_callback), live_dssi_bridge); } void ags_live_dssi_bridge_disconnect(AgsConnectable *connectable) { AgsLiveDssiBridge *live_dssi_bridge; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } ags_live_dssi_bridge_parent_connectable_interface->connect(connectable); live_dssi_bridge = AGS_LIVE_DSSI_BRIDGE(connectable); g_object_disconnect(G_OBJECT(live_dssi_bridge->program), "any_signal::changed", G_CALLBACK(ags_live_dssi_bridge_program_changed_callback), live_dssi_bridge, NULL); } gchar* ags_live_dssi_bridge_get_version(AgsPlugin *plugin) { return(AGS_LIVE_DSSI_BRIDGE(plugin)->version); } void ags_live_dssi_bridge_set_version(AgsPlugin *plugin, gchar *version) { AgsLiveDssiBridge *live_dssi_bridge; live_dssi_bridge = AGS_LIVE_DSSI_BRIDGE(plugin); live_dssi_bridge->version = version; } gchar* ags_live_dssi_bridge_get_build_id(AgsPlugin *plugin) { return(AGS_LIVE_DSSI_BRIDGE(plugin)->build_id); } void ags_live_dssi_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsLiveDssiBridge *live_dssi_bridge; live_dssi_bridge = AGS_LIVE_DSSI_BRIDGE(plugin); live_dssi_bridge->build_id = build_id; } gchar* ags_live_dssi_bridge_get_xml_type(AgsPlugin *plugin) { return(AGS_LIVE_DSSI_BRIDGE(plugin)->xml_type); } void ags_live_dssi_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_LIVE_DSSI_BRIDGE(plugin)->xml_type = xml_type; } void ags_live_dssi_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsLiveDssiBridge *gobject; AgsFileLaunch *file_launch; gobject = AGS_LIVE_DSSI_BRIDGE(plugin); g_object_set(gobject, "filename", xmlGetProp(node, "filename"), "effect", xmlGetProp(node, "effect"), NULL); /* launch */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_live_dssi_bridge_launch_task), gobject); ags_file_add_launch(file, G_OBJECT(file_launch)); } void ags_live_dssi_bridge_launch_task(AgsFileLaunch *file_launch, AgsLiveDssiBridge *live_dssi_bridge) { GtkTreeModel *model; GtkTreeIter iter; GList *list, *list_start; GList *recall; gchar *str; ags_live_dssi_bridge_load(live_dssi_bridge); /* block update bulk port */ list_start = list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(live_dssi_bridge)->bridge)->bulk_output)->table); while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ AGS_BULK_MEMBER(list->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; } list = list->next; } /* update program */ str = xmlGetProp(file_launch->node, "program"); model = gtk_combo_box_get_model((GtkComboBox *) live_dssi_bridge->program); if(gtk_tree_model_get_iter_first(model, &iter)){ gchar *value; do{ gtk_tree_model_get(model, &iter, 0, &value, -1); if(!g_strcmp0(str, value)){ break; } }while(gtk_tree_model_iter_next(model, &iter)); gtk_combo_box_set_active_iter((GtkComboBox *) live_dssi_bridge->program, &iter); } /* update value and unblock update bulk port */ recall = NULL; if(AGS_MACHINE(live_dssi_bridge)->audio->play != NULL){ recall = AGS_MACHINE(live_dssi_bridge)->audio->play; while((recall = ags_recall_template_find_type(recall, AGS_TYPE_PLAY_DSSI_AUDIO)) != NULL){ if(!g_strcmp0(AGS_PLAY_DSSI_AUDIO(recall->data)->filename, live_dssi_bridge->filename) && !g_strcmp0(AGS_PLAY_DSSI_AUDIO(recall->data)->effect, live_dssi_bridge->effect)){ break; } recall = recall->next; } } while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ GtkWidget *child_widget; GList *port; child_widget = gtk_bin_get_child((GtkBin *) list->data); if(recall != NULL){ port = AGS_RECALL(recall->data)->port; while(port != port->next){ if(!g_strcmp0(AGS_BULK_MEMBER(list->data)->specifier, AGS_PORT(port->data)->specifier)){ if(AGS_IS_DIAL(child_widget)){ gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, AGS_PORT(port->data)->port_value.ags_port_ladspa); ags_dial_draw((AgsDial *) child_widget); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, ((AGS_PORT(port->data)->port_value.ags_port_ladspa != 0.0) ? TRUE: FALSE)); } break; } port = port->next; } } AGS_BULK_MEMBER(list->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); } list = list->next; } g_list_free(list_start); } xmlNode* ags_live_dssi_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsLiveDssiBridge *live_dssi_bridge; GtkTreeIter iter; xmlNode *node; gchar *id; gchar *program; live_dssi_bridge = AGS_LIVE_DSSI_BRIDGE(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-live_dssi-bridge"); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, "filename", g_strdup(live_dssi_bridge->filename)); xmlNewProp(node, "effect", g_strdup(live_dssi_bridge->effect)); if((program = gtk_combo_box_text_get_active_text(live_dssi_bridge->program)) != NULL){ xmlNewProp(node, "program", g_strdup(program)); } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", live_dssi_bridge, NULL)); xmlAddChild(parent, node); return(node); } void ags_live_dssi_bridge_finalize(GObject *gobject) { AgsLiveDssiBridge *live_dssi_bridge; live_dssi_bridge = (AgsLiveDssiBridge *) gobject; g_object_disconnect(G_OBJECT(live_dssi_bridge), "any_signal::resize-audio-channels", G_CALLBACK(ags_live_dssi_bridge_resize_audio_channels), NULL, "any_signal::resize-pads", G_CALLBACK(ags_live_dssi_bridge_resize_pads), NULL, NULL); g_free(live_dssi_bridge->filename); g_free(live_dssi_bridge->effect); /* call parent */ G_OBJECT_CLASS(ags_live_dssi_bridge_parent_class)->finalize(gobject); } void ags_live_dssi_bridge_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { AgsLiveDssiBridge *live_dssi_bridge; AgsAudio *audio; AgsChannel *output, *input; AgsChannel *channel, *next_pad; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GObject *soundcard; guint output_pads, input_pads; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); live_dssi_bridge = (AgsLiveDssiBridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; output_pads = audio->output_pads; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); if(input_pads == 0 && output_pads == 0){ return; } if(audio_channels > audio_channels_old){ /* AgsInput */ channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); channel = ags_channel_nth(channel, audio_channels_old); while(channel != next_pad){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 1); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* AgsOutput */ channel = output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); channel = ags_channel_pad_nth(channel, audio_channels_old); while(channel != next_pad){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 3); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_live_dssi_bridge_input_map_recall(live_dssi_bridge, audio_channels_old, 0); ags_live_dssi_bridge_output_map_recall(live_dssi_bridge, audio_channels_old, 0); } } } void ags_live_dssi_bridge_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data) { AgsLiveDssiBridge *live_dssi_bridge; AgsAudio *audio; AgsChannel *output, *input; AgsChannel *channel; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GObject *soundcard; guint audio_channels; gboolean grow; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); live_dssi_bridge = (AgsLiveDssiBridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); if(pads == pads_old || audio_channels == 0){ return; } if(pads_old < pads){ grow = TRUE; }else{ grow = FALSE; } if(g_type_is_a(type, AGS_TYPE_INPUT)){ if(grow){ /* AgsInput */ channel = ags_channel_pad_nth(input, pads_old); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 1); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_live_dssi_bridge_input_map_recall(live_dssi_bridge, 0, pads_old); } }else{ live_dssi_bridge->mapped_input_pad = pads; } }else{ if(grow){ /* AgsOutput */ channel = ags_channel_pad_nth(output, pads_old); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 3); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_live_dssi_bridge_output_map_recall(live_dssi_bridge, 0, pads_old); } }else{ live_dssi_bridge->mapped_output_pad = pads; } } } void ags_live_dssi_bridge_map_recall(AgsMachine *machine) { AgsWindow *window; AgsLiveDssiBridge *live_dssi_bridge; AgsAudio *audio; AgsDelayAudio *play_delay_audio; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsRecordMidiAudio *recall_record_midi_audio; AgsRecordMidiAudioRun *recall_record_midi_audio_run; AgsPlayDssiAudio *play_dssi_audio; AgsPlayDssiAudioRun *play_dssi_audio_run; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); live_dssi_bridge = (AgsLiveDssiBridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* ags-delay */ ags_recall_factory_create(audio, NULL, NULL, "ags-delay", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(list != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(list->data); // AGS_RECALL(play_delay_audio_run)->flags |= AGS_RECALL_PERSISTENT; }else{ play_delay_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run", play_delay_audio_run, NULL); ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run), window->navigation->position_tact->adjustment->value, TRUE); }else{ play_count_beats_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-record-midi */ ags_recall_factory_create(audio, NULL, NULL, "ags-record-midi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_RECORD_MIDI_AUDIO_RUN); if(list != NULL){ recall_record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* ags-play-dssi */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-dssi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_BULK), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_PLAY_DSSI_AUDIO); if(list != NULL){ play_dssi_audio = AGS_PLAY_DSSI_AUDIO(list->data); g_object_set(play_dssi_audio, "filename", live_dssi_bridge->filename, "effect", live_dssi_bridge->effect, NULL); ags_play_dssi_audio_load(play_dssi_audio); ags_play_dssi_audio_load_ports(play_dssi_audio); } list = ags_recall_find_type(audio->play, AGS_TYPE_PLAY_DSSI_AUDIO_RUN); if(list != NULL){ play_dssi_audio_run = AGS_PLAY_DSSI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_dssi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(play_dssi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* depending on destination */ ags_live_dssi_bridge_input_map_recall(live_dssi_bridge, 0, 0); /* depending on destination */ ags_live_dssi_bridge_output_map_recall(live_dssi_bridge, 0, 0); /* call parent */ AGS_MACHINE_CLASS(ags_live_dssi_bridge_parent_class)->map_recall(machine); } void ags_live_dssi_bridge_input_map_recall(AgsLiveDssiBridge *live_dssi_bridge, guint audio_channel_start, guint input_pad_start) { AgsAudio *audio; audio = AGS_MACHINE(live_dssi_bridge)->audio; if(live_dssi_bridge->mapped_input_pad > input_pad_start){ return; } live_dssi_bridge->mapped_input_pad = audio->input_pads; } void ags_live_dssi_bridge_output_map_recall(AgsLiveDssiBridge *live_dssi_bridge, guint audio_channel_start, guint output_pad_start) { AgsAudio *audio; audio = AGS_MACHINE(live_dssi_bridge)->audio; if(live_dssi_bridge->mapped_output_pad > output_pad_start){ return; } live_dssi_bridge->mapped_output_pad = audio->output_pads; } void ags_live_dssi_bridge_load(AgsLiveDssiBridge *live_dssi_bridge) { AgsEffectBulk *effect_bulk; AgsBulkMember *bulk_member; GtkListStore *model; GtkTreeIter iter; AgsDssiPlugin *dssi_plugin; AgsConfig *config; void *plugin_so; DSSI_Descriptor_Function dssi_descriptor; DSSI_Descriptor *plugin_descriptor; DSSI_Program_Descriptor *program_descriptor; LADSPA_PortDescriptor *port_descriptor; LADSPA_PortRangeHintDescriptor hint_descriptor; GList *port; GList *list; gchar *str; unsigned long samplerate; unsigned long effect_index; gdouble step; unsigned long port_count; gboolean has_output_port; guint x, y; unsigned long i, j; guint k; config = ags_config_get_instance(); /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); free(str); }else{ samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } g_message("ags_live_dssi_bridge.c - load %s %s", live_dssi_bridge->filename, live_dssi_bridge->effect); /* load plugin */ dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), live_dssi_bridge->filename, live_dssi_bridge->effect); plugin_so = AGS_BASE_PLUGIN(dssi_plugin)->plugin_so; /* */ gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(live_dssi_bridge->program)))); /* */ effect_index = AGS_BASE_PLUGIN(dssi_plugin)->effect_index; /* load ports */ model = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_ULONG, G_TYPE_ULONG); if(effect_index != -1 && plugin_so){ dssi_descriptor = (DSSI_Descriptor_Function) dlsym(plugin_so, "dssi_descriptor"); if(dlerror() == NULL && dssi_descriptor){ live_dssi_bridge->dssi_descriptor = plugin_descriptor = dssi_descriptor(effect_index); live_dssi_bridge->ladspa_handle = plugin_descriptor->LADSPA_Plugin->instantiate(plugin_descriptor->LADSPA_Plugin, samplerate); port_count = plugin_descriptor->LADSPA_Plugin->PortCount; port_descriptor = plugin_descriptor->LADSPA_Plugin->PortDescriptors; live_dssi_bridge->port_values = (LADSPA_Data *) malloc(plugin_descriptor->LADSPA_Plugin->PortCount * sizeof(LADSPA_Data)); for(i = 0; i < port_count; i++){ if(LADSPA_IS_PORT_CONTROL(port_descriptor[i])){ if(LADSPA_IS_PORT_INPUT(port_descriptor[i]) || LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ AgsDssiPlugin *dssi_plugin; GList *list; gchar *specifier; dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), live_dssi_bridge->filename, live_dssi_bridge->effect); list = AGS_BASE_PLUGIN(dssi_plugin)->port; specifier = plugin_descriptor->LADSPA_Plugin->PortNames[i]; while(list != NULL){ if(!g_strcmp0(specifier, AGS_PORT_DESCRIPTOR(list->data)->port_name)){ live_dssi_bridge->port_values[i] = g_value_get_float(AGS_PORT_DESCRIPTOR(list->data)->default_value); break; } list = list->next; } plugin_descriptor->LADSPA_Plugin->connect_port(live_dssi_bridge->ladspa_handle, i, &(live_dssi_bridge->port_values[i])); } } } if(plugin_descriptor->get_program != NULL){ for(i = 0; (program_descriptor = plugin_descriptor->get_program(live_dssi_bridge->ladspa_handle, i)) != NULL; i++){ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, program_descriptor->Name, 1, program_descriptor->Bank, 2, program_descriptor->Program, -1); } } } } gtk_combo_box_set_model(GTK_COMBO_BOX(live_dssi_bridge->program), GTK_TREE_MODEL(model)); effect_bulk = AGS_EFFECT_BRIDGE(AGS_MACHINE(live_dssi_bridge)->bridge)->bulk_output; /* retrieve position within table */ x = 0; y = 0; list = effect_bulk->table->children; while(list != NULL){ if(y <= ((GtkTableChild *) list->data)->top_attach){ y = ((GtkTableChild *) list->data)->top_attach + 1; } list = list->next; } /* load ports */ port = AGS_BASE_PLUGIN(dssi_plugin)->port; port_count = g_list_length(port); k = 0; while(port != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ GtkWidget *child_widget; AgsLadspaConversion *ladspa_conversion; GType widget_type; gchar *plugin_name; gchar *control_port; guint step_count; gboolean disable_seemless; disable_seemless = FALSE; if(x == AGS_EFFECT_BULK_COLUMNS_COUNT){ x = 0; y++; gtk_table_resize(effect_bulk->table, y + 1, AGS_EFFECT_BULK_COLUMNS_COUNT); } if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ widget_type = AGS_TYPE_LED; }else{ widget_type = GTK_TYPE_TOGGLE_BUTTON; } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ widget_type = AGS_TYPE_HINDICATOR; }else{ widget_type = AGS_TYPE_DIAL; } } step_count = AGS_DIAL_DEFAULT_PRECISION; if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ step_count = AGS_PORT_DESCRIPTOR(port->data)->scale_steps; disable_seemless = TRUE; } /* add bulk member */ plugin_name = g_strdup_printf("dssi-%u", dssi_plugin->unique_id); control_port = g_strdup_printf("%u/%u", k, port_count); bulk_member = (AgsBulkMember *) g_object_new(AGS_TYPE_BULK_MEMBER, "widget-type", widget_type, "widget-label", AGS_PORT_DESCRIPTOR(port->data)->port_name, "plugin-name", plugin_name, "filename", live_dssi_bridge->filename, "effect", live_dssi_bridge->effect, "specifier", AGS_PORT_DESCRIPTOR(port->data)->port_name, "control-port", control_port, "steps", step_count, NULL); child_widget = ags_bulk_member_get_widget(bulk_member); g_free(plugin_name); g_free(control_port); /* ladspa conversion */ ladspa_conversion = NULL; if((AGS_PORT_DESCRIPTOR_BOUNDED_BELOW & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_BELOW; } if((AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_ABOVE; } if((AGS_PORT_DESCRIPTOR_SAMPLERATE & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_SAMPLERATE; } if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_LOGARITHMIC; } bulk_member->conversion = (AgsConversion *) ladspa_conversion; /* child widget */ if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_BOOLEAN; } if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_INTEGER; } if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; GtkAdjustment *adjustment; LADSPA_Data lower_bound, upper_bound; LADSPA_Data default_value; dial = (AgsDial *) child_widget; if(disable_seemless){ dial->flags &= (~AGS_DIAL_SEEMLESS_MODE); } /* add controls of ports and apply range */ lower_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port->data)->lower_value); upper_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port->data)->upper_value); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(dial, "adjustment", adjustment, NULL); if(upper_bound >= 0.0 && lower_bound >= 0.0){ step = (upper_bound - lower_bound) / step_count; }else if(upper_bound < 0.0 && lower_bound < 0.0){ step = -1.0 * (lower_bound - upper_bound) / step_count; }else{ step = (upper_bound - lower_bound) / step_count; } gtk_adjustment_set_step_increment(adjustment, step); gtk_adjustment_set_lower(adjustment, lower_bound); gtk_adjustment_set_upper(adjustment, upper_bound); default_value = (LADSPA_Data) g_value_get_float(AGS_PORT_DESCRIPTOR(port->data)->default_value); if(ladspa_conversion != NULL){ // default_value = ags_ladspa_conversion_convert(ladspa_conversion, // default_value, // TRUE); } gtk_adjustment_set_value(adjustment, default_value); #ifdef AGS_DEBUG g_message("dssi bounds: %f %f", lower_bound, upper_bound); #endif }else if(AGS_IS_INDICATOR(child_widget) || AGS_IS_LED(child_widget)){ g_hash_table_insert(ags_effect_bulk_indicator_queue_draw, child_widget, ags_effect_bulk_indicator_queue_draw_timeout); effect_bulk->queued_drawing = g_list_prepend(effect_bulk->queued_drawing, child_widget); g_timeout_add(1000 / 30, (GSourceFunc) ags_effect_bulk_indicator_queue_draw_timeout, (gpointer) child_widget); } gtk_table_attach(effect_bulk->table, (GtkWidget *) bulk_member, x, x + 1, y, y + 1, GTK_FILL, GTK_FILL, 0, 0); ags_connectable_connect(AGS_CONNECTABLE(bulk_member)); gtk_widget_show_all((GtkWidget *) effect_bulk->table); x++; } port = port->next; k++; } } /** * ags_live_dssi_bridge_new: * @soundcard: the assigned soundcard. * @filename: the plugin.so * @effect: the effect * * Creates an #AgsLiveDssiBridge * * Returns: a new #AgsLiveDssiBridge * * Since: 1.0.0 */ AgsLiveDssiBridge* ags_live_dssi_bridge_new(GObject *soundcard, gchar *filename, gchar *effect) { AgsLiveDssiBridge *live_dssi_bridge; live_dssi_bridge = (AgsLiveDssiBridge *) g_object_new(AGS_TYPE_LIVE_DSSI_BRIDGE, NULL); if(soundcard != NULL){ g_object_set(G_OBJECT(AGS_MACHINE(live_dssi_bridge)->audio), "soundcard", soundcard, NULL); } g_object_set(live_dssi_bridge, "filename", filename, "effect", effect, NULL); return(live_dssi_bridge); } gsequencer-1.4.24/ags/X/machine/ags_syncsynth_callbacks.c0000644000175000017500000000615513247044247020326 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_syncsynth_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsSyncsynth *syncsynth) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = (AgsWindow *) gtk_widget_get_toplevel(widget); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_SYNCSYNTH)->counter); g_object_set(AGS_MACHINE(syncsynth), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_SYNCSYNTH); g_free(str); } void ags_syncsynth_auto_update_callback(GtkToggleButton *toggle, AgsSyncsynth *syncsynth) { if(gtk_toggle_button_get_active(toggle)){ syncsynth->flags |= AGS_SYNCSYNTH_AUTO_UPDATE; }else{ syncsynth->flags &= (~AGS_SYNCSYNTH_AUTO_UPDATE); } } void ags_syncsynth_add_callback(GtkButton *button, AgsSyncsynth *syncsynth) { AgsOscillator *oscillator; oscillator = ags_oscillator_new(); ags_syncsynth_add_oscillator(syncsynth, oscillator); ags_connectable_connect(AGS_CONNECTABLE(oscillator)); g_signal_connect((GObject *) oscillator, "control-changed", G_CALLBACK(ags_syncsynth_oscillator_control_changed_callback), (gpointer) syncsynth); } void ags_syncsynth_remove_callback(GtkButton *button, AgsSyncsynth *syncsynth) { GList *list, *list_start; GList *child_start; guint nth; list = list_start = gtk_container_get_children(syncsynth->oscillator); nth = 0; while(list != NULL){ child_start = gtk_container_get_children(list->data); if(gtk_toggle_button_get_active(child_start->data)){ ags_syncsynth_remove_oscillator(syncsynth, nth); }else{ nth++; } g_list_free(child_start); list = list->next; } g_list_free(list_start); } void ags_syncsynth_update_callback(GtkButton *button, AgsSyncsynth *syncsynth) { ags_syncsynth_update(syncsynth); } void ags_syncsynth_oscillator_control_changed_callback(AgsOscillator *oscillator, AgsSyncsynth *syncsynth) { ags_syncsynth_reset_loop(syncsynth); if((AGS_SYNCSYNTH_AUTO_UPDATE & (syncsynth->flags)) != 0){ ags_syncsynth_update(syncsynth); } } gsequencer-1.4.24/ags/X/machine/ags_drum_output_line_callbacks.h0000644000175000017500000000221613247044247021661 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_DRUM_OUTPUT_LINE_CALLBACKS_H__ #define __AGS_DRUM_OUTPUT_LINE_CALLBACKS_H__ #include #include void ags_drum_output_line_resize_pads_callback(AgsDrum *drum, GType channel_type, guint pads_new, guint pads_old, AgsDrumOutputLine *output_line); #endif /*__AGS_DRUM_OUTPUT_LINE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_panel_callbacks.c0000644000175000017500000000252413246707333017360 00000000000000/* 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 . */ #include #include void ags_panel_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsPanel *panel) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = AGS_WINDOW(gtk_widget_get_toplevel(widget)); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_PANEL)->counter); g_object_set(AGS_MACHINE(panel), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_PANEL); g_free(str); } gsequencer-1.4.24/ags/X/machine/ags_panel_input_line_callbacks.c0000644000175000017500000000161713247044247021607 00000000000000/* 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 . */ #include #include #include #include gsequencer-1.4.24/ags/X/machine/ags_syncsynth.h0000644000175000017500000000521513246707333016331 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SYNCSYNTH_H__ #define __AGS_SYNCSYNTH_H__ #include #include #include #include #include #define AGS_TYPE_SYNCSYNTH (ags_syncsynth_get_type()) #define AGS_SYNCSYNTH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SYNCSYNTH, AgsSyncsynth)) #define AGS_SYNCSYNTH_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SYNCSYNTH, AgsSyncsynthClass)) #define AGS_IS_SYNCSYNTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SYNCSYNTH)) #define AGS_IS_SYNCSYNTH_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SYNCSYNTH)) #define AGS_SYNCSYNTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SYNCSYNTH, AgsSyncsynthClass)) #define AGS_SYNCSYNTH_BASE_NOTE_MAX (72.0) #define AGS_SYNCSYNTH_BASE_NOTE_MIN (-72.0) typedef struct _AgsSyncsynth AgsSyncsynth; typedef struct _AgsSyncsynthClass AgsSyncsynthClass; typedef enum{ AGS_SYNCSYNTH_AUTO_UPDATE = 1, }AgsSyncsynthFlags; struct _AgsSyncsynth { AgsMachine machine; guint flags; gchar *name; gchar *xml_type; guint mapped_input_pad; guint mapped_output_pad; GtkVBox *oscillator; GtkButton *add; GtkButton *remove; GtkCheckButton *auto_update; GtkButton *update; GtkSpinButton *lower; // how many channels until to lowest freq GtkSpinButton *loop_start; GtkSpinButton *loop_end; }; struct _AgsSyncsynthClass { AgsMachineClass machine; }; GType ags_syncsynth_get_type(void); void ags_syncsynth_add_oscillator(AgsSyncsynth *syncsynth, AgsOscillator *oscillator); void ags_syncsynth_remove_oscillator(AgsSyncsynth *syncsynth, guint nth); void ags_syncsynth_reset_loop(AgsSyncsynth *syncsynth); void ags_syncsynth_update(AgsSyncsynth *syncsynth); AgsSyncsynth* ags_syncsynth_new(GObject *soundcard); #endif /*__AGS_SYNCSYNTH_H__*/ gsequencer-1.4.24/ags/X/machine/ags_ffplayer.h0000644000175000017500000000510013247044247016067 00000000000000/* 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 . */ #ifndef __AGS_FFPLAYER_H__ #define __AGS_FFPLAYER_H__ #include #include #include #include #include #include #define AGS_TYPE_FFPLAYER (ags_ffplayer_get_type()) #define AGS_FFPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FFPLAYER, AgsFFPlayer)) #define AGS_FFPLAYER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FFPLAYER, AgsFFPlayerClass)) #define AGS_IS_FFPLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_FFPLAYER)) #define AGS_IS_FFPLAYER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FFPLAYER)) #define AGS_FFPLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_FFPLAYER, AgsFFPlayerClass)) typedef struct _AgsFFPlayer AgsFFPlayer; typedef struct _AgsFFPlayerClass AgsFFPlayerClass; typedef enum{ AGS_FFPLAYER_NO_LOAD = 1, }AgsFFPlayerFlags; struct _AgsFFPlayer { AgsMachine machine; guint flags; guint mapped_output_pad; guint mapped_input_pad; gchar *name; gchar *xml_type; GtkButton *open; GtkWidget *open_dialog; guint control_width; guint control_height; GtkDrawingArea *drawing_area; GtkHScrollbar *hscrollbar; GtkAdjustment *hadjustment; AgsIpatch *ipatch; GtkComboBoxText *preset; GtkComboBoxText *instrument; }; struct _AgsFFPlayerClass { AgsMachineClass machine; }; GType ags_ffplayer_get_type(void); void ags_ffplayer_paint(AgsFFPlayer *ffplayer); // char* ags_ffplayer_sound_string(); void ags_ffplayer_open_filename(AgsFFPlayer *ffplayer, gchar *filename); void ags_ffplayer_load_preset(AgsFFPlayer *ffplayer); void ags_ffplayer_load_instrument(AgsFFPlayer *ffplayer); AgsFFPlayer* ags_ffplayer_new(GObject *soundcard); #endif /*__AGS_FFPLAYER_H__*/ gsequencer-1.4.24/ags/X/machine/ags_matrix_bulk_input.h0000644000175000017500000000421213247044247020022 00000000000000/* 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 . */ #ifndef __AGS_MATRIX_BULK_INPUT_H__ #define __AGS_MATRIX_BULK_INPUT_H__ #include #include #include #include #include #include #include #define AGS_TYPE_MATRIX_BULK_INPUT (ags_matrix_bulk_input_get_type()) #define AGS_MATRIX_BULK_INPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MATRIX_BULK_INPUT, AgsMatrixBulkInput)) #define AGS_MATRIX_BULK_INPUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MATRIX_BULK_INPUT, AgsMatrixBulkInputClass)) #define AGS_IS_MATRIX_BULK_INPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MATRIX_BULK_INPUT)) #define AGS_IS_MATRIX_BULK_INPUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MATRIX_BULK_INPUT)) #define AGS_MATRIX_BULK_INPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MATRIX_BULK_INPUT, AgsMatrixBulkInputClass)) typedef struct _AgsMatrixBulkInput AgsMatrixBulkInput; typedef struct _AgsMatrixBulkInputClass AgsMatrixBulkInputClass; struct _AgsMatrixBulkInput { AgsEffectBulk effect_bulk; }; struct _AgsMatrixBulkInputClass { AgsEffectBulkClass effect_bulk; }; GType ags_matrix_bulk_input_get_type(void); AgsMatrixBulkInput* ags_matrix_bulk_input_new(AgsAudio *audio, GType channel_type); #endif /*__AGS_MATRIX_BULK_INPUT_H__*/ gsequencer-1.4.24/ags/X/machine/ags_ffplayer_bridge_callbacks.c0000644000175000017500000000147313246707333021407 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/machine/ags_pattern_box.c0000644000175000017500000005743013247044247016614 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include static GType ags_accessible_pattern_box_get_type(void); void ags_pattern_box_class_init(AgsPatternBoxClass *pattern_box); void ags_accessible_pattern_box_class_init(AtkObject *object); void ags_accessible_pattern_box_action_interface_init(AtkActionIface *action); void ags_pattern_box_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pattern_box_init(AgsPatternBox *pattern_box); void ags_pattern_box_finalize(GObject *gobject); void ags_pattern_box_connect(AgsConnectable *connectable); void ags_pattern_box_disconnect(AgsConnectable *connectable); AtkObject* ags_pattern_box_get_accessible(GtkWidget *widget); void ags_pattern_box_realize(GtkWidget *widget); void ags_pattern_box_show(GtkWidget *widget); void ags_pattern_box_show_all(GtkWidget *widget); gboolean ags_accessible_pattern_box_do_action(AtkAction *action, gint i); gint ags_accessible_pattern_box_get_n_actions(AtkAction *action); const gchar* ags_accessible_pattern_box_get_description(AtkAction *action, gint i); const gchar* ags_accessible_pattern_box_get_name(AtkAction *action, gint i); const gchar* ags_accessible_pattern_box_get_keybinding(AtkAction *action, gint i); gboolean ags_accessible_pattern_box_set_description(AtkAction *action, gint i); gchar* ags_accessible_pattern_box_get_localized_name(AtkAction *action, gint i); /** * SECTION:ags_pattern_box * @short_description: pattern box sequencer * @title: AgsPatternBox * @section_id: * @include: ags/X/machine/ags_pattern_box.h * * The #AgsPatternBox is a composite widget to act as pattern box sequencer. */ static gpointer ags_pattern_box_parent_class = NULL; static GQuark quark_accessible_object = 0; GtkStyle *pattern_box_style = NULL; GHashTable *ags_pattern_box_led_queue_draw = NULL; GType ags_pattern_box_get_type(void) { static GType ags_type_pattern_box = 0; if(!ags_type_pattern_box){ static const GTypeInfo ags_pattern_box_info = { sizeof(AgsPatternBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pattern_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsPatternBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pattern_box_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pattern_box_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pattern_box = g_type_register_static(GTK_TYPE_TABLE, "AgsPatternBox", &ags_pattern_box_info, 0); g_type_add_interface_static(ags_type_pattern_box, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_pattern_box); } static GType ags_accessible_pattern_box_get_type(void) { static GType ags_type_accessible_pattern_box = 0; if(!ags_type_accessible_pattern_box){ const GTypeInfo ags_accesssible_pattern_box_info = { sizeof(GtkAccessibleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_accessible_pattern_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GtkAccessible), 0, /* n_preallocs */ NULL, NULL }; static const GInterfaceInfo atk_action_interface_info = { (GInterfaceInitFunc) ags_accessible_pattern_box_action_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_accessible_pattern_box = g_type_register_static(GTK_TYPE_ACCESSIBLE, "AgsAccessiblePatternBox", &ags_accesssible_pattern_box_info, 0); g_type_add_interface_static(ags_type_accessible_pattern_box, ATK_TYPE_ACTION, &atk_action_interface_info); } return(ags_type_accessible_pattern_box); } void ags_pattern_box_class_init(AgsPatternBoxClass *pattern_box) { GObjectClass *gobject; GtkWidgetClass *widget; ags_pattern_box_parent_class = g_type_class_peek_parent(pattern_box); quark_accessible_object = g_quark_from_static_string("ags-accessible-object"); /* GObjectClass */ gobject = (GObjectClass *) pattern_box; gobject->finalize = ags_pattern_box_finalize; /* GtkWidget */ widget = (GtkWidgetClass *) pattern_box; widget->realize = ags_pattern_box_realize; widget->show = ags_pattern_box_show; widget->show_all = ags_pattern_box_show_all; } void ags_accessible_pattern_box_class_init(AtkObject *object) { /* empty */ } void ags_accessible_pattern_box_action_interface_init(AtkActionIface *action) { action->do_action = ags_accessible_pattern_box_do_action; action->get_n_actions = ags_accessible_pattern_box_get_n_actions; action->get_description = ags_accessible_pattern_box_get_description; action->get_name = ags_accessible_pattern_box_get_name; action->get_keybinding = ags_accessible_pattern_box_get_keybinding; action->set_description = ags_accessible_pattern_box_set_description; action->get_localized_name = ags_accessible_pattern_box_get_localized_name; } void ags_pattern_box_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_pattern_box_connectable_parent_interface; connectable->connect = ags_pattern_box_connect; connectable->disconnect = ags_pattern_box_disconnect; } void ags_pattern_box_init(AgsPatternBox *pattern_box) { AgsLed *led; GtkToggleButton *toggle_button; GtkRadioButton *radio_button; gchar *str; guint i; g_object_set(pattern_box, "can-focus", TRUE, "n-columns", 2, "n-rows", 2, "homogeneous", FALSE, NULL); gtk_widget_set_events((GtkWidget *) pattern_box, GDK_CONTROL_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); pattern_box->flags = 0; pattern_box->key_mask = 0; pattern_box->n_controls = AGS_PATTERN_BOX_N_CONTROLS; pattern_box->n_indices = AGS_PATTERN_BOX_N_INDICES; /* led */ pattern_box->active_led = 0; pattern_box->hled_array = (GtkHBox *) ags_hled_array_new(); g_object_set(pattern_box->hled_array, "led-width", AGS_PATTERN_BOX_LED_DEFAULT_WIDTH, "led-height", AGS_PATTERN_BOX_LED_DEFAULT_HEIGHT, "led-count", pattern_box->n_controls, NULL); gtk_widget_set_size_request((GtkWidget *) pattern_box->hled_array, pattern_box->n_controls * AGS_PATTERN_BOX_DEFAULT_PAD_WIDTH, 10); gtk_table_attach((GtkTable *) pattern_box, (GtkWidget *) pattern_box->hled_array, 0, 1, 0, 1, 0, 0, 0, 0); gtk_widget_show_all(pattern_box->hled_array); if(ags_pattern_box_led_queue_draw == NULL){ ags_pattern_box_led_queue_draw = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_pattern_box_led_queue_draw, pattern_box, ags_pattern_box_led_queue_draw_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_pattern_box_led_queue_draw_timeout, (gpointer) pattern_box); /* pattern */ pattern_box->pattern = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_table_attach((GtkTable *) pattern_box, (GtkWidget *) pattern_box->pattern, 0, 1, 1, 2, 0, 0, 0, 0); for(i = 0; i < pattern_box->n_controls; i++){ toggle_button = (GtkToggleButton *) gtk_toggle_button_new(); gtk_widget_set_size_request((GtkWidget *) toggle_button, AGS_PATTERN_BOX_DEFAULT_PAD_WIDTH, AGS_PATTERN_BOX_DEFAULT_PAD_HEIGHT); gtk_box_pack_start((GtkBox *) pattern_box->pattern, (GtkWidget *) toggle_button, FALSE, FALSE, 0); } /* page / offset */ pattern_box->offset = (GtkVBox*) gtk_vbox_new(FALSE, 0); gtk_table_attach_defaults((GtkTable *) pattern_box, (GtkWidget *) pattern_box->offset, 1, 2, 0, 2); radio_button = NULL; for(i = 0; i < pattern_box->n_indices; i++){ if(radio_button == NULL){ str = g_strdup_printf("%d-%d", i * pattern_box->n_controls + 1, (i + 1) * pattern_box->n_controls); radio_button = (GtkRadioButton *) gtk_radio_button_new_with_label(NULL, str); gtk_box_pack_start((GtkBox*) pattern_box->offset, (GtkWidget *) radio_button, FALSE, FALSE, 0); g_free(str); }else{ str = g_strdup_printf("%d-%d", i * pattern_box->n_controls + 1, (i + 1) * pattern_box->n_controls); gtk_box_pack_start((GtkBox*) pattern_box->offset, (GtkWidget *) gtk_radio_button_new_with_label(radio_button->group, str), FALSE, FALSE, 0); g_free(str); } } } void ags_pattern_box_finalize(GObject *gobject) { g_hash_table_remove(ags_pattern_box_led_queue_draw, gobject); G_OBJECT_CLASS(ags_pattern_box_parent_class)->finalize(gobject); } void ags_pattern_box_connect(AgsConnectable *connectable) { AgsPatternBox *pattern_box; GList *list, *list_start; if((AGS_PATTERN_BOX_CONNECTED & (AGS_PATTERN_BOX(connectable)->flags)) != 0){ return; } /* AgsPatternBox */ pattern_box = AGS_PATTERN_BOX(connectable); pattern_box->flags |= AGS_PATTERN_BOX_CONNECTED; g_signal_connect_after(G_OBJECT(pattern_box), "focus_in_event", G_CALLBACK(ags_pattern_box_focus_in_callback), (gpointer) pattern_box); g_signal_connect_after(G_OBJECT(pattern_box), "focus_out_event", G_CALLBACK(ags_pattern_box_focus_out_callback), (gpointer) pattern_box); g_signal_connect(G_OBJECT(pattern_box), "key_press_event", G_CALLBACK(ags_pattern_box_key_press_event), (gpointer) pattern_box); g_signal_connect(G_OBJECT(pattern_box), "key_release_event", G_CALLBACK(ags_pattern_box_key_release_event), (gpointer) pattern_box); /* connect pattern */ list_start = list = gtk_container_get_children((GtkContainer *) pattern_box->pattern); while(list != NULL){ g_signal_connect(G_OBJECT(list->data), "clicked", G_CALLBACK(ags_pattern_box_pad_callback), (gpointer) pattern_box); list = list->next; } g_list_free(list_start); /* connect pattern offset range */ list_start = list = gtk_container_get_children((GtkContainer *) pattern_box->offset); while(list != NULL){ g_signal_connect_after(G_OBJECT(list->data), "clicked", G_CALLBACK(ags_pattern_box_offset_callback), (gpointer) pattern_box); list = list->next; } g_list_free(list_start); } void ags_pattern_box_disconnect(AgsConnectable *connectable) { AgsPatternBox *pattern_box; GList *list, *list_start; if((AGS_PATTERN_BOX_CONNECTED & (AGS_PATTERN_BOX(connectable)->flags)) == 0){ return; } /* AgsPatternBox */ pattern_box = AGS_PATTERN_BOX(connectable); pattern_box->flags &= (~AGS_PATTERN_BOX_CONNECTED); g_object_disconnect(G_OBJECT(pattern_box), "any_signal::focus_in_event", G_CALLBACK(ags_pattern_box_focus_in_callback), (gpointer) pattern_box, "any_signal::focus_out_event", G_CALLBACK(ags_pattern_box_focus_out_callback), (gpointer) pattern_box, "any_signal::key_press_event", G_CALLBACK(ags_pattern_box_key_press_event), (gpointer) pattern_box, "any_signal::key_release_event", G_CALLBACK(ags_pattern_box_key_release_event), (gpointer) pattern_box, NULL); /* connect pattern */ list_start = list = gtk_container_get_children((GtkContainer *) pattern_box->pattern); while(list != NULL){ g_object_disconnect(G_OBJECT(list->data), "any_signal::clicked", G_CALLBACK(ags_pattern_box_pad_callback), (gpointer) pattern_box, NULL); list = list->next; } g_list_free(list_start); /* connect pattern offset range */ list_start = list = gtk_container_get_children((GtkContainer *) pattern_box->offset); while(list != NULL){ g_object_disconnect(G_OBJECT(list->data), "any_signal::clicked", G_CALLBACK(ags_pattern_box_offset_callback), (gpointer) pattern_box, NULL); list = list->next; } g_list_free(list_start); } AtkObject* ags_pattern_box_get_accessible(GtkWidget *widget) { AtkObject* accessible; accessible = g_object_get_qdata(G_OBJECT(widget), quark_accessible_object); if(!accessible){ accessible = g_object_new(ags_accessible_pattern_box_get_type(), NULL); g_object_set_qdata(G_OBJECT(widget), quark_accessible_object, accessible); gtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), widget); } return(accessible); } void ags_pattern_box_realize(GtkWidget *widget) { AgsPatternBox *pattern_box; pattern_box = widget; /* call parent */ GTK_WIDGET_CLASS(ags_pattern_box_parent_class)->realize(widget); if(pattern_box_style == NULL){ pattern_box_style = gtk_style_copy(gtk_widget_get_style(pattern_box)); } gtk_widget_set_style((GtkWidget *) pattern_box, pattern_box_style); } void ags_pattern_box_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_pattern_box_parent_class)->show(widget); // ags_pattern_box_draw_matrix(AGS_PATTERN_BOX(widget)); } void ags_pattern_box_show_all(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_pattern_box_parent_class)->show_all(widget); // ags_pattern_box_draw_matrix(AGS_PATTERN_BOX(widget)); } gboolean ags_accessible_pattern_box_do_action(AtkAction *action, gint i) { AgsPatternBox *pattern_box; GdkEventKey *key_press, *key_release; GdkEventKey *modifier_press, *modifier_release; if(!(i >= 0 && i < 6)){ return(FALSE); } pattern_box = gtk_accessible_get_widget(GTK_ACCESSIBLE(action)); key_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); key_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); switch(i){ case AGS_PATTERN_BOX_MOVE_LEFT: { key_press->keyval = key_release->keyval = GDK_KEY_Left; /* send event */ gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_release); } break; case AGS_PATTERN_BOX_MOVE_RIGHT: { key_press->keyval = key_release->keyval = GDK_KEY_Right; /* send event */ gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_release); } break; case AGS_PATTERN_BOX_INDEX_DECREMENT: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_release); } break; case AGS_PATTERN_BOX_INDEX_INCREMENT: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_release); } break; case AGS_PATTERN_BOX_TOGGLE_PAD: { key_press->keyval = key_release->keyval = GDK_KEY_space; /* send event */ gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_release); } break; case AGS_PATTERN_BOX_COPY_PATTERN: { key_press->keyval = key_release->keyval = GDK_KEY_c; /* create modifier */ modifier_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); modifier_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); modifier_press->keyval = modifier_release->keyval = GDK_KEY_Control_R; /* send event */ gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) pattern_box, (GdkEvent *) modifier_release); } break; } return(TRUE); } gint ags_accessible_pattern_box_get_n_actions(AtkAction *action) { return(6); } const gchar* ags_accessible_pattern_box_get_description(AtkAction *action, gint i) { static const gchar *actions[] = { "move cursor left", "move cursor right", "decrement pattern index", "increment pattern index", "toggle audio pattern" "copy pattern to clipboard", }; if(i >= 0 && i < 6){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_pattern_box_get_name(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "up", "down", "toggle", "copy", }; if(i >= 0 && i < 6){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_pattern_box_get_keybinding(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "up", "down", "space", "Ctrl+c", }; if(i >= 0 && i < 6){ return(actions[i]); }else{ return(NULL); } } gboolean ags_accessible_pattern_box_set_description(AtkAction *action, gint i) { //TODO:JK: implement me return(FALSE); } gchar* ags_accessible_pattern_box_get_localized_name(AtkAction *action, gint i) { //TODO:JK: implement me return(NULL); } /** * ags_pattern_box_set_pattern: * @pattern_box: the #AgsPatternBox * * Resets the pattern on @pattern_box. * * since: 0.5.0 */ void ags_pattern_box_set_pattern(AgsPatternBox *pattern_box) { AgsMachine *machine; AgsLine *selected_line; AgsMutexManager *mutex_manager; GList *list, *list_start; GList *line, *line_start; guint index0, index1, offset; gboolean is_active; gboolean set_active; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) pattern_box, AGS_TYPE_MACHINE); if(machine->selected_input_pad == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); index0 = machine->bank_0; index1 = machine->bank_1; /* read boundaries */ list = gtk_container_get_children((GtkContainer *) pattern_box->offset); for(i = 0; i < pattern_box->n_indices && !GTK_TOGGLE_BUTTON(list->data)->active; i++){ list = list->next; } offset = i * pattern_box->n_controls; /* get pads */ list_start = list = gtk_container_get_children((GtkContainer *) pattern_box->pattern); /* reset */ pattern_box->flags |= AGS_PATTERN_BOX_BLOCK_PATTERN; for(i = 0; i < pattern_box->n_controls; i++){ set_active = TRUE; line_start = line = gtk_container_get_children(GTK_CONTAINER(AGS_PAD(machine->selected_input_pad)->expander_set)); while((line = ags_line_find_next_grouped(line)) != NULL){ selected_line = AGS_LINE(line->data); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) selected_line->channel); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(channel_mutex); is_active = ags_pattern_get_bit((AgsPattern *) selected_line->channel->pattern->data, index0, index1, offset + i); pthread_mutex_unlock(channel_mutex); if(!is_active){ set_active = FALSE; break; } line = line->next; } g_list_free(line_start); gtk_toggle_button_set_active((GtkToggleButton *) list->data, set_active); list = list->next; } pattern_box->flags &= (~AGS_PATTERN_BOX_BLOCK_PATTERN); g_list_free(list_start); } /** * ags_pattern_box_led_queue_draw_timeout: * @pattern_box: the #AgsPatternBox * * Queue draw led. * * Returns: %TRUE if continue timeout, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_pattern_box_led_queue_draw_timeout(AgsPatternBox *pattern_box) { if(g_hash_table_lookup(ags_pattern_box_led_queue_draw, pattern_box) != NULL){ AgsMachine *machine; AgsAudio *audio; AgsRecallID *recall_id; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsMutexManager *mutex_manager; GList *list_start, *list; guint active_led_new; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) pattern_box, AGS_TYPE_MACHINE); if(machine == NULL){ return(TRUE); } audio = machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* get some recalls */ pthread_mutex_lock(audio_mutex); recall_id = NULL; list = audio->recall_id; while(list != NULL){ recall_id = ags_recall_id_find_parent_recycling_context(list, NULL); if(recall_id != NULL && (AGS_RECALL_ID_SEQUENCER & (recall_id->flags)) == 0){ list = g_list_find(list, recall_id); list = list->next; }else{ break; } } pthread_mutex_unlock(audio_mutex); if(recall_id == NULL){ return(TRUE); } g_object_get(audio, "play", &list_start, NULL); play_count_beats_audio = NULL; play_count_beats_audio_run = NULL; pthread_mutex_lock(audio->play_mutex); list = ags_recall_find_type(list_start, AGS_TYPE_COUNT_BEATS_AUDIO); if(list != NULL){ play_count_beats_audio = AGS_COUNT_BEATS_AUDIO(list->data); } list = ags_recall_find_type_with_recycling_context(list_start, AGS_TYPE_COUNT_BEATS_AUDIO_RUN, (GObject *) recall_id->recycling_context); if(list != NULL){ play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); } pthread_mutex_unlock(audio->play_mutex); g_list_free(list_start); if(play_count_beats_audio == NULL || play_count_beats_audio_run == NULL){ return(TRUE); } /* active led */ active_led_new = (guint) play_count_beats_audio_run->sequencer_counter; pattern_box->active_led = (guint) active_led_new; pattern_box->active_led = (guint) active_led_new; ags_led_array_unset_all(pattern_box->hled_array); ags_led_array_set_nth(pattern_box->hled_array, active_led_new); return(TRUE); }else{ return(FALSE); } } /** * ags_pattern_box_new: * * Creates an #AgsPatternBox * * Returns: a new #AgsPatternBox * * Since: 0.5 */ AgsPatternBox* ags_pattern_box_new() { AgsPatternBox *pattern_box; pattern_box = (AgsPatternBox *) g_object_new(AGS_TYPE_PATTERN_BOX, NULL); return(pattern_box); } gsequencer-1.4.24/ags/X/machine/ags_ffplayer_bulk_input_callbacks.h0000644000175000017500000000201313246707333022323 00000000000000/* 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 . */ #ifndef __AGS_FFPLAYER_BULK_INPUT_CALLBACKS_H__ #define __AGS_FFPLAYER_BULK_INPUT_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_FFPLAYER_BULK_INPUT_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_live_lv2_bridge.c0000644000175000017500000014616213247044247017326 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_live_lv2_bridge_class_init(AgsLiveLv2BridgeClass *live_lv2_bridge); void ags_live_lv2_bridge_connectable_interface_init(AgsConnectableInterface *connectable); void ags_live_lv2_bridge_plugin_interface_init(AgsPluginInterface *plugin); void ags_live_lv2_bridge_init(AgsLiveLv2Bridge *live_lv2_bridge); void ags_live_lv2_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_live_lv2_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_live_lv2_bridge_finalize(GObject *gobject); void ags_live_lv2_bridge_connect(AgsConnectable *connectable); void ags_live_lv2_bridge_disconnect(AgsConnectable *connectable); gchar* ags_live_lv2_bridge_get_version(AgsPlugin *plugin); void ags_live_lv2_bridge_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_live_lv2_bridge_get_build_id(AgsPlugin *plugin); void ags_live_lv2_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id); gchar* ags_live_lv2_bridge_get_xml_type(AgsPlugin *plugin); void ags_live_lv2_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_live_lv2_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_live_lv2_bridge_launch_task(AgsFileLaunch *file_launch, AgsLiveLv2Bridge *live_lv2_bridge); xmlNode* ags_live_lv2_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_live_lv2_bridge_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_live_lv2_bridge_resize_pads(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, gpointer data); void ags_live_lv2_bridge_map_recall(AgsMachine *machine); /** * SECTION:ags_live_lv2_bridge * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsLiveLv2Bridge * @section_id: * @include: ags/X/ags_live_lv2_bridge.h * * #AgsLiveLv2Bridge is a composite widget to visualize all #AgsChannel. It should be * packed by an #AgsMachine. */ enum{ PROP_0, PROP_FILENAME, PROP_EFFECT, PROP_URI, PROP_INDEX, PROP_HAS_MIDI, PROP_HAS_GUI, PROP_GUI_FILENAME, PROP_GUI_URI, }; static gpointer ags_live_lv2_bridge_parent_class = NULL; static AgsConnectableInterface* ags_live_lv2_bridge_parent_connectable_interface; static AgsPluginInterface* ags_live_lv2_bridge_parent_plugin_interface; extern GHashTable *ags_effect_bulk_indicator_queue_draw; GHashTable *ags_live_lv2_bridge_lv2ui_handle = NULL; GHashTable *ags_live_lv2_bridge_lv2ui_idle = NULL; GType ags_live_lv2_bridge_get_type(void) { static GType ags_type_live_lv2_bridge = 0; if(!ags_type_live_lv2_bridge){ static const GTypeInfo ags_live_lv2_bridge_info = { sizeof(AgsLiveLv2BridgeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_live_lv2_bridge_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsLiveLv2Bridge), 0, /* n_preallocs */ (GInstanceInitFunc) ags_live_lv2_bridge_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_live_lv2_bridge_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_live_lv2_bridge_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_live_lv2_bridge = g_type_register_static(AGS_TYPE_MACHINE, "AgsLiveLv2Bridge", &ags_live_lv2_bridge_info, 0); g_type_add_interface_static(ags_type_live_lv2_bridge, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_live_lv2_bridge, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_live_lv2_bridge); } void ags_live_lv2_bridge_class_init(AgsLiveLv2BridgeClass *live_lv2_bridge) { AgsMachineClass *machine; GObjectClass *gobject; GParamSpec *param_spec; ags_live_lv2_bridge_parent_class = g_type_class_peek_parent(live_lv2_bridge); /* GObjectClass */ gobject = G_OBJECT_CLASS(live_lv2_bridge); gobject->set_property = ags_live_lv2_bridge_set_property; gobject->get_property = ags_live_lv2_bridge_get_property; gobject->finalize = ags_live_lv2_bridge_finalize; /* properties */ /** * AgsRecallLiveLv2:filename: * * The plugin's filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", "the object file", "The filename as string of object file", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsRecallLiveLv2:effect: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", "the effect", "The effect's string representation", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsRecallLiveLv2:uri: * * The uri's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("uri", "the uri", "The uri's string representation", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_URI, param_spec); /** * AgsRecallLiveLv2:index: * * The uri's index. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("index", "index of uri", "The numerical index of uri", 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); /** * AgsRecallLiveLv2:has-midi: * * If has-midi is set to %TRUE appropriate flag is set * to audio in order to become a sequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("has-midi", "has-midi", "If effect has-midi", FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_HAS_MIDI, param_spec); /** * AgsRecallLiveLv2:has-gui: * * If has-gui is set to %TRUE 128 inputs are allocated and appropriate flag is set * to audio in order to become a sequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("has-gui", "has-gui", "If effect has-gui", FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_HAS_GUI, param_spec); /** * AgsRecallLiveLv2:gui-filename: * * The plugin's GUI filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("gui-filename", "the GUI object file", "The filename as string of GUI object file", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_GUI_FILENAME, param_spec); /** * AgsRecallLiveLv2:gui-uri: * * The GUI's uri name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("gui-uri", "the gui-uri", "The gui-uri's string representation", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_GUI_URI, param_spec); /* AgsMachine */ machine = (AgsMachineClass *) live_lv2_bridge; machine->map_recall = ags_live_lv2_bridge_map_recall; } void ags_live_lv2_bridge_connectable_interface_init(AgsConnectableInterface *connectable) { ags_live_lv2_bridge_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_live_lv2_bridge_connect; connectable->disconnect = ags_live_lv2_bridge_disconnect; } void ags_live_lv2_bridge_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_live_lv2_bridge_get_version; plugin->set_version = ags_live_lv2_bridge_set_version; plugin->get_build_id = ags_live_lv2_bridge_get_build_id; plugin->set_build_id = ags_live_lv2_bridge_set_build_id; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_live_lv2_bridge_init(AgsLiveLv2Bridge *live_lv2_bridge) { GtkTable *table; GtkImageMenuItem *item; AgsAudio *audio; g_signal_connect_after((GObject *) live_lv2_bridge, "parent-set", G_CALLBACK(ags_live_lv2_bridge_parent_set_callback), (gpointer) live_lv2_bridge); if(ags_live_lv2_bridge_lv2ui_handle == NULL){ ags_live_lv2_bridge_lv2ui_handle = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } if(ags_live_lv2_bridge_lv2ui_idle == NULL){ ags_live_lv2_bridge_lv2ui_idle = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } audio = AGS_MACHINE(live_lv2_bridge)->audio; audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_SKIP_INPUT | AGS_AUDIO_REVERSE_MAPPING); audio->flags &= (~AGS_AUDIO_NOTATION_DEFAULT); g_object_set(audio, "audio-start-mapping", 0, "audio-end-mapping", 128, "midi-start-mapping", 0, "midi-end-mapping", 128, NULL); ags_machine_popup_add_connection_options((AgsMachine *) live_lv2_bridge, (AGS_MACHINE_POPUP_MIDI_DIALOG)); AGS_MACHINE(live_lv2_bridge)->flags |= (AGS_MACHINE_IS_SYNTHESIZER | AGS_MACHINE_REVERSE_NOTATION); g_signal_connect_after(G_OBJECT(live_lv2_bridge), "resize-audio-channels", G_CALLBACK(ags_live_lv2_bridge_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(live_lv2_bridge), "resize-pads", G_CALLBACK(ags_live_lv2_bridge_resize_pads), NULL); live_lv2_bridge->flags = 0; live_lv2_bridge->name = NULL; live_lv2_bridge->version = AGS_LIVE_LV2_BRIDGE_DEFAULT_VERSION; live_lv2_bridge->build_id = AGS_LIVE_LV2_BRIDGE_DEFAULT_BUILD_ID; live_lv2_bridge->xml_type = "ags-live-lv2-bridge"; live_lv2_bridge->mapped_output_pad = 0; live_lv2_bridge->mapped_input_pad = 0; live_lv2_bridge->filename = NULL; live_lv2_bridge->effect = NULL; live_lv2_bridge->uri = NULL; live_lv2_bridge->uri_index = 0; live_lv2_bridge->has_midi = FALSE; live_lv2_bridge->vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer *) gtk_bin_get_child((GtkBin *) live_lv2_bridge), (GtkWidget *) live_lv2_bridge->vbox); live_lv2_bridge->lv2_descriptor = NULL; live_lv2_bridge->lv2_handle = NULL; live_lv2_bridge->port_value = NULL; live_lv2_bridge->program = NULL; live_lv2_bridge->preset = NULL; /* effect bridge */ AGS_MACHINE(live_lv2_bridge)->bridge = (GtkContainer *) ags_effect_bridge_new(audio); gtk_box_pack_start((GtkBox *) live_lv2_bridge->vbox, (GtkWidget *) AGS_MACHINE(live_lv2_bridge)->bridge, FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(1, 2, FALSE); gtk_box_pack_start((GtkBox *) AGS_EFFECT_BRIDGE(AGS_MACHINE(live_lv2_bridge)->bridge), (GtkWidget *) table, FALSE, FALSE, 0); AGS_EFFECT_BRIDGE(AGS_MACHINE(live_lv2_bridge)->bridge)->bulk_output = (GtkWidget *) ags_effect_bulk_new(audio, AGS_TYPE_OUTPUT); AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(live_lv2_bridge)->bridge)->bulk_output)->flags |= (AGS_EFFECT_BULK_HIDE_BUTTONS | AGS_EFFECT_BULK_HIDE_ENTRIES | AGS_EFFECT_BULK_SHOW_LABELS); gtk_table_attach(table, (GtkWidget *) AGS_EFFECT_BRIDGE(AGS_MACHINE(live_lv2_bridge)->bridge)->bulk_output, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); live_lv2_bridge->has_gui = FALSE; live_lv2_bridge->gui_filename = NULL; live_lv2_bridge->gui_uri = NULL; live_lv2_bridge->ui_handle = NULL; live_lv2_bridge->lv2_gui = NULL; /* lv2 menu */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("Lv2"); gtk_menu_shell_append((GtkMenuShell *) AGS_MACHINE(live_lv2_bridge)->popup, (GtkWidget *) item); gtk_widget_show((GtkWidget *) item); live_lv2_bridge->lv2_menu = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem *) item, (GtkWidget *) live_lv2_bridge->lv2_menu); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("show GUI")); gtk_menu_shell_append((GtkMenuShell *) live_lv2_bridge->lv2_menu, (GtkWidget *) item); gtk_widget_show_all((GtkWidget *) live_lv2_bridge->lv2_menu); } void ags_live_lv2_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLiveLv2Bridge *live_lv2_bridge; live_lv2_bridge = AGS_LIVE_LV2_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(filename == live_lv2_bridge->filename){ return; } if(live_lv2_bridge->filename != NULL){ g_free(live_lv2_bridge->filename); } if(filename != NULL){ if(!g_file_test(filename, G_FILE_TEST_EXISTS)){ AgsWindow *window; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) live_lv2_bridge); ags_window_show_error(window, g_strdup_printf("Plugin file not present %s", filename)); } } live_lv2_bridge->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == live_lv2_bridge->effect){ return; } if(live_lv2_bridge->effect != NULL){ g_free(live_lv2_bridge->effect); } live_lv2_bridge->effect = g_strdup(effect); } break; case PROP_URI: { gchar *uri; uri = g_value_get_string(value); if(uri == live_lv2_bridge->uri){ return; } if(live_lv2_bridge->uri != NULL){ g_free(live_lv2_bridge->uri); } live_lv2_bridge->uri = g_strdup(uri); } break; case PROP_INDEX: { unsigned long uri_index; uri_index = g_value_get_ulong(value); if(uri_index == live_lv2_bridge->uri_index){ return; } live_lv2_bridge->uri_index = uri_index; } break; case PROP_HAS_MIDI: { gboolean has_midi; has_midi = g_value_get_boolean(value); if(live_lv2_bridge->has_midi == has_midi){ return; } live_lv2_bridge->has_midi = has_midi; } break; case PROP_HAS_GUI: { GtkWindow *window; gboolean has_gui; has_gui = g_value_get_boolean(value); if(live_lv2_bridge->has_gui == has_gui){ return; } live_lv2_bridge->has_gui = has_gui; } break; case PROP_GUI_FILENAME: { GtkWindow *window; gchar *gui_filename; gui_filename = g_value_get_string(value); if(live_lv2_bridge->gui_filename == gui_filename){ return; } live_lv2_bridge->gui_filename = g_strdup(gui_filename); } break; case PROP_GUI_URI: { gchar *gui_uri; gui_uri = g_value_get_string(value); if(gui_uri == live_lv2_bridge->gui_uri){ return; } if(live_lv2_bridge->gui_uri != NULL){ g_free(live_lv2_bridge->gui_uri); } live_lv2_bridge->gui_uri = g_strdup(gui_uri); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_live_lv2_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLiveLv2Bridge *live_lv2_bridge; live_lv2_bridge = AGS_LIVE_LV2_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, live_lv2_bridge->filename); } break; case PROP_EFFECT: { g_value_set_string(value, live_lv2_bridge->effect); } break; case PROP_URI: { g_value_set_string(value, live_lv2_bridge->uri); } break; case PROP_INDEX: { g_value_set_ulong(value, live_lv2_bridge->uri_index); } break; case PROP_HAS_MIDI: { g_value_set_boolean(value, live_lv2_bridge->has_midi); } break; case PROP_HAS_GUI: { g_value_set_boolean(value, live_lv2_bridge->has_gui); } break; case PROP_GUI_FILENAME: { g_value_set_string(value, live_lv2_bridge->gui_filename); } break; case PROP_GUI_URI: { g_value_set_string(value, live_lv2_bridge->gui_uri); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_live_lv2_bridge_finalize(GObject *gobject) { AgsLiveLv2Bridge *live_lv2_bridge; live_lv2_bridge = AGS_LIVE_LV2_BRIDGE(gobject); if(live_lv2_bridge->ui_handle != NULL){ g_hash_table_remove(ags_live_lv2_bridge_lv2ui_handle, live_lv2_bridge->ui_handle); g_hash_table_remove(ags_live_lv2_bridge_lv2ui_idle, live_lv2_bridge->ui_handle); } G_OBJECT_CLASS(ags_live_lv2_bridge_parent_class)->finalize(gobject); } void ags_live_lv2_bridge_connect(AgsConnectable *connectable) { AgsLiveLv2Bridge *live_lv2_bridge; GList *list; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_live_lv2_bridge_parent_connectable_interface->connect(connectable); live_lv2_bridge = AGS_LIVE_LV2_BRIDGE(connectable); /* menu */ list = gtk_container_get_children((GtkContainer *) live_lv2_bridge->lv2_menu); g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_live_lv2_bridge_show_gui_callback), live_lv2_bridge); /* program */ if(live_lv2_bridge->program != NULL){ g_signal_connect_after(G_OBJECT(live_lv2_bridge->program), "changed", G_CALLBACK(ags_live_lv2_bridge_program_changed_callback), live_lv2_bridge); } } void ags_live_lv2_bridge_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } gchar* ags_live_lv2_bridge_get_version(AgsPlugin *plugin) { return(AGS_LIVE_LV2_BRIDGE(plugin)->version); } void ags_live_lv2_bridge_set_version(AgsPlugin *plugin, gchar *version) { AgsLiveLv2Bridge *live_lv2_bridge; live_lv2_bridge = AGS_LIVE_LV2_BRIDGE(plugin); live_lv2_bridge->version = version; } gchar* ags_live_lv2_bridge_get_build_id(AgsPlugin *plugin) { return(AGS_LIVE_LV2_BRIDGE(plugin)->build_id); } void ags_live_lv2_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsLiveLv2Bridge *live_lv2_bridge; live_lv2_bridge = AGS_LIVE_LV2_BRIDGE(plugin); live_lv2_bridge->build_id = build_id; } gchar* ags_live_lv2_bridge_get_xml_type(AgsPlugin *plugin) { return(AGS_LIVE_LV2_BRIDGE(plugin)->xml_type); } void ags_live_lv2_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_LIVE_LV2_BRIDGE(plugin)->xml_type = xml_type; } void ags_live_lv2_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsLiveLv2Bridge *gobject; AgsFileLaunch *file_launch; gobject = AGS_LIVE_LV2_BRIDGE(plugin); g_object_set(gobject, "filename", xmlGetProp(node, "filename"), "effect", xmlGetProp(node, "effect"), NULL); /* launch */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_live_lv2_bridge_launch_task), gobject); ags_file_add_launch(file, G_OBJECT(file_launch)); } void ags_live_lv2_bridge_launch_task(AgsFileLaunch *file_launch, AgsLiveLv2Bridge *live_lv2_bridge) { GtkTreeModel *model; GtkTreeIter iter; GList *list, *list_start; GList *recall; ags_live_lv2_bridge_load(live_lv2_bridge); /* block update bulk port */ list_start = list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(live_lv2_bridge)->bridge)->bulk_input)->table); while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ AGS_BULK_MEMBER(list->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; } list = list->next; } /* update value and unblock update bulk port */ recall = NULL; if(AGS_MACHINE(live_lv2_bridge)->audio->input != NULL){ recall = AGS_MACHINE(live_lv2_bridge)->audio->input->recall; while((recall = ags_recall_template_find_type(recall, AGS_TYPE_PLAY_LV2_AUDIO)) != NULL){ if(!g_strcmp0(AGS_PLAY_LV2_AUDIO(recall->data)->filename, live_lv2_bridge->filename) && !g_strcmp0(AGS_PLAY_LV2_AUDIO(recall->data)->effect, live_lv2_bridge->effect)){ break; } recall = recall->next; } } while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ GtkWidget *child_widget; GList *port; child_widget = gtk_bin_get_child(list->data); if(recall != NULL){ port = AGS_RECALL(recall->data)->port; while(port != port->next){ if(!g_strcmp0(AGS_BULK_MEMBER(list->data)->specifier, AGS_PORT(port->data)->specifier)){ if(AGS_IS_DIAL(child_widget)){ gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, AGS_PORT(port->data)->port_value.ags_port_ladspa); ags_dial_draw((AgsDial *) child_widget); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, ((AGS_PORT(port->data)->port_value.ags_port_ladspa != 0.0) ? TRUE: FALSE)); } break; } port = port->next; } } AGS_BULK_MEMBER(list->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); } list = list->next; } g_list_free(list_start); } xmlNode* ags_live_lv2_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsLiveLv2Bridge *live_lv2_bridge; xmlNode *node; gchar *id; live_lv2_bridge = AGS_LIVE_LV2_BRIDGE(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-live-lv2-bridge"); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, "filename", live_lv2_bridge->filename); xmlNewProp(node, "effect", live_lv2_bridge->effect); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", live_lv2_bridge, NULL)); xmlAddChild(parent, node); return(node); } void ags_live_lv2_bridge_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { AgsLiveLv2Bridge *live_lv2_bridge; AgsAudio *audio; AgsChannel *output, *input; AgsChannel *channel, *next_pad; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GObject *soundcard; guint output_pads, input_pads; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); live_lv2_bridge = (AgsLiveLv2Bridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; output_pads = audio->output_pads; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); if(input_pads == 0 && output_pads == 0){ return; } if(audio_channels > audio_channels_old){ /* AgsInput */ channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); channel = ags_channel_nth(channel, audio_channels_old); while(channel != next_pad){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 1); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* AgsOutput */ channel = output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); channel = ags_channel_pad_nth(channel, audio_channels_old); while(channel != next_pad){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 3); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_live_lv2_bridge_input_map_recall(live_lv2_bridge, audio_channels_old, 0); ags_live_lv2_bridge_output_map_recall(live_lv2_bridge, audio_channels_old, 0); } } } void ags_live_lv2_bridge_resize_pads(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, gpointer data) { AgsLiveLv2Bridge *live_lv2_bridge; AgsAudio *audio; AgsChannel *output, *input; AgsChannel *channel; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GObject *soundcard; guint audio_channels; gboolean grow; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); live_lv2_bridge = (AgsLiveLv2Bridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); if(pads == pads_old || audio_channels == 0){ return; } if(pads_old < pads){ grow = TRUE; }else{ grow = FALSE; } if(g_type_is_a(channel_type, AGS_TYPE_INPUT)){ if(grow){ /* AgsInput */ channel = ags_channel_pad_nth(input, pads_old); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 1); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_live_lv2_bridge_input_map_recall(live_lv2_bridge, 0, pads_old); } }else{ live_lv2_bridge->mapped_input_pad = pads; } }else{ if(grow){ /* AgsOutput */ channel = ags_channel_pad_nth(output, pads_old); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, 3); ags_recycling_add_audio_signal(first_recycling, audio_signal); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* recall */ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_live_lv2_bridge_output_map_recall(live_lv2_bridge, 0, pads_old); } }else{ live_lv2_bridge->mapped_output_pad = pads; } } } void ags_live_lv2_bridge_map_recall(AgsMachine *machine) { AgsWindow *window; AgsLiveLv2Bridge *live_lv2_bridge; AgsAudio *audio; AgsDelayAudio *play_delay_audio; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsRecordMidiAudio *recall_record_midi_audio; AgsRecordMidiAudioRun *recall_record_midi_audio_run; AgsPlayLv2Audio *play_lv2_audio; AgsPlayLv2AudioRun *play_lv2_audio_run; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); live_lv2_bridge = (AgsLiveLv2Bridge *) machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* ags-delay */ ags_recall_factory_create(audio, NULL, NULL, "ags-delay", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(list != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(list->data); // AGS_RECALL(play_delay_audio_run)->flags |= AGS_RECALL_PERSISTENT; }else{ play_delay_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run", play_delay_audio_run, NULL); ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run), window->navigation->position_tact->adjustment->value, TRUE); }else{ play_count_beats_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-record-midi */ ags_recall_factory_create(audio, NULL, NULL, "ags-record-midi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_RECORD_MIDI_AUDIO_RUN); if(list != NULL){ recall_record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* ags-play-lv2 */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-lv2", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_BULK), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_PLAY_LV2_AUDIO); if(list != NULL){ play_lv2_audio = AGS_PLAY_LV2_AUDIO(list->data); g_object_set(play_lv2_audio, "filename", live_lv2_bridge->filename, "effect", live_lv2_bridge->effect, NULL); ags_play_lv2_audio_load(play_lv2_audio); ags_play_lv2_audio_load_ports(play_lv2_audio); } list = ags_recall_find_type(audio->play, AGS_TYPE_PLAY_LV2_AUDIO_RUN); if(list != NULL){ play_lv2_audio_run = AGS_PLAY_LV2_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_lv2_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(play_lv2_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* depending on destination */ ags_live_lv2_bridge_input_map_recall(live_lv2_bridge, 0, 0); /* depending on destination */ ags_live_lv2_bridge_output_map_recall(live_lv2_bridge, 0, 0); /* call parent */ AGS_MACHINE_CLASS(ags_live_lv2_bridge_parent_class)->map_recall(machine); } void ags_live_lv2_bridge_input_map_recall(AgsLiveLv2Bridge *live_lv2_bridge, guint audio_channel_start, guint input_pad_start) { AgsAudio *audio; audio = AGS_MACHINE(live_lv2_bridge)->audio; if(live_lv2_bridge->mapped_input_pad > input_pad_start){ return; } live_lv2_bridge->mapped_input_pad = audio->input_pads; } void ags_live_lv2_bridge_output_map_recall(AgsLiveLv2Bridge *live_lv2_bridge, guint audio_channel_start, guint output_pad_start) { AgsAudio *audio; audio = AGS_MACHINE(live_lv2_bridge)->audio; if(live_lv2_bridge->mapped_output_pad > output_pad_start){ return; } live_lv2_bridge->mapped_output_pad = audio->output_pads; } void ags_live_lv2_bridge_load_program(AgsLiveLv2Bridge *live_lv2_bridge) { AgsLv2Plugin *lv2_plugin; LV2_Descriptor *plugin_descriptor; LV2_Programs_Interface *program_interface; lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), live_lv2_bridge->filename, live_lv2_bridge->effect); live_lv2_bridge->lv2_descriptor = plugin_descriptor = AGS_LV2_PLUGIN_DESCRIPTOR(AGS_BASE_PLUGIN(lv2_plugin)->plugin_descriptor); if(plugin_descriptor != NULL && plugin_descriptor->extension_data != NULL && (program_interface = plugin_descriptor->extension_data(LV2_PROGRAMS__Interface)) != NULL){ GtkListStore *model; GtkTreeIter iter; LV2_Program_Descriptor *program_descriptor; uint32_t i; if(live_lv2_bridge->lv2_handle == NULL){ live_lv2_bridge->lv2_handle = (LV2_Handle *) ags_base_plugin_instantiate(lv2_plugin, AGS_MACHINE(live_lv2_bridge)->audio->samplerate); } if(live_lv2_bridge->port_value == NULL){ GList *port_descriptor; guint port_count; port_count = g_list_length(AGS_BASE_PLUGIN(lv2_plugin)->port); if(port_count > 0){ live_lv2_bridge->port_value = (float *) malloc(port_count * sizeof(float)); } port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; for(i = 0; port_descriptor != NULL;){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ plugin_descriptor->connect_port(live_lv2_bridge->lv2_handle[0], AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index, &(live_lv2_bridge->port_value[i])); i++; } } port_descriptor = port_descriptor->next; } } if(live_lv2_bridge->program == NULL){ GtkHBox *hbox; GtkLabel *label; /* program */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) live_lv2_bridge->vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(live_lv2_bridge->vbox), GTK_WIDGET(hbox), 0); label = (GtkLabel *) gtk_label_new(i18n("program")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 0); live_lv2_bridge->program = gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) live_lv2_bridge->program, FALSE, FALSE, 0); if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(live_lv2_bridge)->flags)) != 0){ g_signal_connect_after(G_OBJECT(live_lv2_bridge->program), "changed", G_CALLBACK(ags_live_lv2_bridge_program_changed_callback), live_lv2_bridge); } model = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_ULONG, G_TYPE_ULONG); gtk_combo_box_set_model(GTK_COMBO_BOX(live_lv2_bridge->program), GTK_TREE_MODEL(model)); }else{ model = gtk_combo_box_get_model(GTK_COMBO_BOX(live_lv2_bridge->program)); gtk_list_store_clear(GTK_LIST_STORE(model)); } for(i = 0; (program_descriptor = program_interface->get_program(live_lv2_bridge->lv2_handle[0], i)) != NULL; i++){ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, program_descriptor->name, 1, program_descriptor->bank, 2, program_descriptor->program, -1); } } } void ags_live_lv2_bridge_load_preset(AgsLiveLv2Bridge *live_lv2_bridge) { GtkHBox *hbox; GtkLabel *label; AgsLv2Plugin *lv2_plugin; GList *list; /* preset */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) live_lv2_bridge->vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(live_lv2_bridge->vbox), GTK_WIDGET(hbox), 0); label = (GtkLabel *) gtk_label_new(i18n("preset")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 0); live_lv2_bridge->preset = gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) live_lv2_bridge->preset, FALSE, FALSE, 0); /* retrieve lv2 plugin */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), live_lv2_bridge->filename, live_lv2_bridge->effect); /* preset */ list = lv2_plugin->preset; while(list != NULL){ if(AGS_LV2_PRESET(list->data)->preset_label != NULL){ gtk_combo_box_text_append_text(live_lv2_bridge->preset, AGS_LV2_PRESET(list->data)->preset_label); } list = list->next; } gtk_widget_show_all(hbox); /* connect preset */ g_signal_connect_after(G_OBJECT(live_lv2_bridge->preset), "changed", G_CALLBACK(ags_live_lv2_bridge_preset_changed_callback), live_lv2_bridge); } void ags_live_lv2_bridge_load_midi(AgsLiveLv2Bridge *live_lv2_bridge) { //TODO:JK: implement me } void ags_live_lv2_bridge_load_gui(AgsLiveLv2Bridge *live_lv2_bridge) { AgsLv2Plugin *lv2_plugin; AgsLv2uiPlugin *lv2ui_plugin; GList *list; /* retrieve lv2 plugin */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), live_lv2_bridge->filename, live_lv2_bridge->effect); if(lv2_plugin == NULL || lv2_plugin->ui_uri == NULL){ return; } /* retrieve lv2ui plugin */ list = ags_lv2ui_plugin_find_gui_uri(ags_lv2ui_manager_get_instance()->lv2ui_plugin, lv2_plugin->ui_uri); if(list == NULL){ return; } lv2ui_plugin = list->data; #ifdef AGS_DEBUG g_message("ui filename - %s", AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename); #endif /* apply ui */ g_object_set(live_lv2_bridge, "has-gui", TRUE, "gui-uri", lv2_plugin->ui_uri, "gui-filename", AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, NULL); } void ags_live_lv2_bridge_load(AgsLiveLv2Bridge *live_lv2_bridge) { AgsEffectBulk *effect_bulk; AgsBulkMember *bulk_member; GtkListStore *model; GtkTreeIter iter; AgsLv2Plugin *lv2_plugin; AgsConfig *config; void *plugin_so; GList *port; GList *list; gchar *str; unsigned long samplerate; unsigned long effect_index; gdouble step; unsigned long port_count; gboolean has_output_port; guint x, y; unsigned long i, j; guint k; lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), live_lv2_bridge->filename, live_lv2_bridge->effect); if(lv2_plugin == NULL){ return; } /* URI */ g_object_set(live_lv2_bridge, "uri", lv2_plugin->uri, NULL); config = ags_config_get_instance(); /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); free(str); }else{ samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } g_message("ags_live_lv2_bridge.c - load %s %s", live_lv2_bridge->filename, live_lv2_bridge->effect); /* load plugin */ plugin_so = AGS_BASE_PLUGIN(lv2_plugin)->plugin_so; /* */ effect_index = AGS_BASE_PLUGIN(lv2_plugin)->effect_index; effect_bulk = AGS_EFFECT_BRIDGE(AGS_MACHINE(live_lv2_bridge)->bridge)->bulk_output; /* retrieve position within table */ x = 0; y = 0; list = effect_bulk->table->children; while(list != NULL){ if(y <= ((GtkTableChild *) list->data)->top_attach){ y = ((GtkTableChild *) list->data)->top_attach + 1; } list = list->next; } /* load ports */ port = AGS_BASE_PLUGIN(lv2_plugin)->port; port_count = g_list_length(port); k = 0; while(port != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ GtkWidget *child_widget; AgsLv2Conversion *lv2_conversion; GType widget_type; gchar *plugin_name; gchar *control_port; guint step_count; gboolean disable_seemless; disable_seemless = FALSE; if(x == AGS_EFFECT_BULK_COLUMNS_COUNT){ x = 0; y++; gtk_table_resize(effect_bulk->table, y + 1, AGS_EFFECT_BULK_COLUMNS_COUNT); } if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ widget_type = AGS_TYPE_LED; }else{ widget_type = GTK_TYPE_TOGGLE_BUTTON; } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ widget_type = AGS_TYPE_HINDICATOR; }else{ widget_type = AGS_TYPE_DIAL; } } step_count = AGS_DIAL_DEFAULT_PRECISION; if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ step_count = AGS_PORT_DESCRIPTOR(port->data)->scale_steps; disable_seemless = TRUE; } /* add bulk member */ plugin_name = g_strdup_printf("lv2-<%s>", lv2_plugin->uri); control_port = g_strdup_printf("%u/%u", k, port_count); bulk_member = (AgsBulkMember *) g_object_new(AGS_TYPE_BULK_MEMBER, "widget-type", widget_type, "widget-label", AGS_PORT_DESCRIPTOR(port->data)->port_name, "plugin-name", plugin_name, "filename", live_lv2_bridge->filename, "effect", live_lv2_bridge->effect, "specifier", AGS_PORT_DESCRIPTOR(port->data)->port_name, "control-port", control_port, "steps", step_count, NULL); child_widget = ags_bulk_member_get_widget(bulk_member); g_free(plugin_name); g_free(control_port); /* lv2 conversion */ lv2_conversion = NULL; if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ if(lv2_conversion == NULL || !AGS_IS_LV2_CONVERSION(lv2_conversion)){ lv2_conversion = ags_lv2_conversion_new(); } lv2_conversion->flags |= AGS_LV2_CONVERSION_LOGARITHMIC; } bulk_member->conversion = (AgsConversion *) lv2_conversion; /* child widget */ if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_BOOLEAN; } if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_INTEGER; } if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; GtkAdjustment *adjustment; float lower_bound, upper_bound; dial = (AgsDial *) child_widget; if(disable_seemless){ dial->flags &= (~AGS_DIAL_SEEMLESS_MODE); } /* add controls of ports and apply range */ lower_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port->data)->lower_value); upper_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port->data)->upper_value); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(dial, "adjustment", adjustment, NULL); if(upper_bound >= 0.0 && lower_bound >= 0.0){ step = (upper_bound - lower_bound) / step_count; }else if(upper_bound < 0.0 && lower_bound < 0.0){ step = -1.0 * (lower_bound - upper_bound) / step_count; }else{ step = (upper_bound - lower_bound) / step_count; } gtk_adjustment_set_step_increment(adjustment, step); gtk_adjustment_set_lower(adjustment, lower_bound); gtk_adjustment_set_upper(adjustment, upper_bound); gtk_adjustment_set_value(adjustment, g_value_get_float(AGS_PORT_DESCRIPTOR(port->data)->default_value)); }else if(AGS_IS_INDICATOR(child_widget) || AGS_IS_LED(child_widget)){ g_hash_table_insert(ags_effect_bulk_indicator_queue_draw, child_widget, ags_effect_bulk_indicator_queue_draw_timeout); effect_bulk->queued_drawing = g_list_prepend(effect_bulk->queued_drawing, child_widget); g_timeout_add(1000 / 30, (GSourceFunc) ags_effect_bulk_indicator_queue_draw_timeout, (gpointer) child_widget); } #ifdef AGS_DEBUG g_message("lv2 bounds: %f %f", lower_bound, upper_bound); #endif gtk_table_attach(effect_bulk->table, (GtkWidget *) bulk_member, x, x + 1, y, y + 1, GTK_FILL, GTK_FILL, 0, 0); ags_connectable_connect(AGS_CONNECTABLE(bulk_member)); gtk_widget_show_all((GtkWidget *) effect_bulk->table); x++; } port = port->next; k++; } /* program */ live_lv2_bridge->lv2_handle = ags_base_plugin_instantiate(lv2_plugin, AGS_MACHINE(live_lv2_bridge)->audio->samplerate); if((AGS_LV2_PLUGIN_HAS_PROGRAM_INTERFACE & (lv2_plugin->flags)) != 0){ ags_live_lv2_bridge_load_program(live_lv2_bridge); } /* preset */ if(lv2_plugin->preset != NULL){ ags_live_lv2_bridge_load_preset(live_lv2_bridge); } /* load gui */ ags_live_lv2_bridge_load_gui(live_lv2_bridge); } /** * ags_live_lv2_bridge_lv2ui_idle_timeout: * @widget: the LV2UI_Handle * * Idle lv2 ui. * * Returns: %TRUE if proceed with redraw, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_live_lv2_bridge_lv2ui_idle_timeout(GtkWidget *widget) { AgsLiveLv2Bridge *live_lv2_bridge; if((live_lv2_bridge = g_hash_table_lookup(ags_live_lv2_bridge_lv2ui_idle, widget)) != NULL){ if(live_lv2_bridge->ui_feature != NULL && live_lv2_bridge->ui_feature[0]->data != NULL){ ((struct _LV2UI_Idle_Interface *) live_lv2_bridge->ui_feature[0]->data)->idle(live_lv2_bridge->ui_handle); } return(TRUE); }else{ return(FALSE); } } /** * ags_live_lv2_bridge_new: * @soundcard: the assigned soundcard. * @filename: the plugin.so * @effect: the effect * * Creates an #AgsLiveLv2Bridge * * Returns: a new #AgsLiveLv2Bridge * * Since: 1.0.0 */ AgsLiveLv2Bridge* ags_live_lv2_bridge_new(GObject *soundcard, gchar *filename, gchar *effect) { AgsLiveLv2Bridge *live_lv2_bridge; GValue value = {0,}; live_lv2_bridge = (AgsLiveLv2Bridge *) g_object_new(AGS_TYPE_LIVE_LV2_BRIDGE, NULL); if(soundcard != NULL){ g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, soundcard); g_object_set_property(G_OBJECT(AGS_MACHINE(live_lv2_bridge)->audio), "soundcard", &value); g_value_unset(&value); } g_object_set(live_lv2_bridge, "filename", filename, "effect", effect, NULL); return(live_lv2_bridge); } gsequencer-1.4.24/ags/X/machine/ags_ffplayer_input_pad_callbacks.h0000644000175000017500000000200713246707333022135 00000000000000/* 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 . */ #ifndef __AGS_FFPLAYER_INPUT_PAD_CALLBACKS_H__ #define __AGS_FFPLAYER_INPUT_PAD_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_FFPLAYER_INPUT_PAD_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_input_pad_callbacks.h0000644000175000017500000000242513246707333021300 00000000000000/* 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 . */ #ifndef __AGS_DRUM_INPUT_PAD_CALLBACKS_H__ #define __AGS_DRUM_INPUT_PAD_CALLBACKS_H__ #include #include #include #include void ags_drum_input_pad_open_callback(GtkWidget *button, AgsDrumInputPad *drum_input_pad); void ags_drum_input_pad_play_callback(GtkToggleButton *button, AgsDrumInputPad *drum_input_pad); void ags_drum_input_pad_edit_callback(GtkWidget *toggle_button, AgsDrumInputPad *drum_input_pad); #endif /*__AGS_DRUM_INPUT_PAD_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_live_lv2_bridge.h0000644000175000017500000000741613247044247017331 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LIVE_LV2_BRIDGE_H__ #define __AGS_LIVE_LV2_BRIDGE_H__ #include #include #include #include #include #include #include #include #include #define AGS_TYPE_LIVE_LV2_BRIDGE (ags_live_lv2_bridge_get_type()) #define AGS_LIVE_LV2_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LIVE_LV2_BRIDGE, AgsLiveLv2Bridge)) #define AGS_LIVE_LV2_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LIVE_LV2_BRIDGE, AgsLiveLv2BridgeClass)) #define AGS_IS_LIVE_LV2_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_LIVE_LV2_BRIDGE)) #define AGS_IS_LIVE_LV2_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_LIVE_LV2_BRIDGE)) #define AGS_LIVE_LV2_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_LIVE_LV2_BRIDGE, AgsLiveLv2BridgeClass)) #define AGS_LIVE_LV2_BRIDGE_DEFAULT_VERSION "0.4.3" #define AGS_LIVE_LV2_BRIDGE_DEFAULT_BUILD_ID "CEST 13-05-2015 13:40" typedef struct _AgsLiveLv2Bridge AgsLiveLv2Bridge; typedef struct _AgsLiveLv2BridgeClass AgsLiveLv2BridgeClass; typedef enum{ AGS_LIVE_LV2_BRIDGE_DISPLAY_INPUT = 1, AGS_LIVE_LV2_BRIDGE_BULK_OUTPUT = 1 << 1, AGS_LIVE_LV2_BRIDGE_DISPLAY_OUTPUT = 1 << 2, AGS_LIVE_LV2_BRIDGE_BULK_INPUT = 1 << 3, }AgsLiveLv2BridgeFlags; struct _AgsLiveLv2Bridge { AgsMachine machine; guint flags; gchar *name; gchar *version; gchar *build_id; gchar *xml_type; guint mapped_output_pad; guint mapped_input_pad; gchar *filename; gchar *effect; gchar *uri; guint uri_index; gboolean has_midi; gboolean has_gui; gchar *gui_filename; gchar *gui_uri; GtkVBox *vbox; LV2_Descriptor *lv2_descriptor; LV2_Handle *lv2_handle; float *port_value; GtkComboBoxText *program; GtkComboBoxText *preset; LV2_Feature **ui_feature; LV2UI_Handle ui_handle; GtkWidget *lv2_gui; GtkWidget *ui_widget; GtkMenu *lv2_menu; }; struct _AgsLiveLv2BridgeClass { AgsMachineClass machine; }; GType ags_live_lv2_bridge_get_type(void); void ags_live_lv2_bridge_input_map_recall(AgsLiveLv2Bridge *live_lv2_bridge, guint audio_channel_start, guint input_pad_start); void ags_live_lv2_bridge_output_map_recall(AgsLiveLv2Bridge *live_lv2_bridge, guint audio_channel_start, guint output_pad_start); void ags_live_lv2_bridge_load_program(AgsLiveLv2Bridge *live_lv2_bridge); void ags_live_lv2_bridge_load_preset(AgsLiveLv2Bridge *live_lv2_bridge); void ags_live_lv2_bridge_load_midi(AgsLiveLv2Bridge *live_lv2_bridge); void ags_live_lv2_bridge_load_gui(AgsLiveLv2Bridge *live_lv2_bridge); void ags_live_lv2_bridge_load(AgsLiveLv2Bridge *live_lv2_bridge); gboolean ags_live_lv2_bridge_lv2ui_idle_timeout(GtkWidget *widget); AgsLiveLv2Bridge* ags_live_lv2_bridge_new(GObject *soundcard, gchar *filename, gchar *effect); #endif /*__AGS_LIVE_LV2_BRIDGE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_ladspa_bridge_callbacks.h0000644000175000017500000000215213246707333021043 00000000000000/* 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 . */ #ifndef __AGS_LADSPA_BRIDGE_CALLBACKS_H__ #define __AGS_LADSPA_BRIDGE_CALLBACKS_H__ #include #include #include #include void ags_ladspa_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLadspaBridge *ladspa_bridge); #endif /*__AGS_LADSPA_BRIDGE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_live_lv2_bridge_callbacks.h0000644000175000017500000000353613247044247021327 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LIVE_LV2_BRIDGE_CALLBACKS_H__ #define __AGS_LIVE_LV2_BRIDGE_CALLBACKS_H__ #include #include #include #include #include #include void ags_live_lv2_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLiveLv2Bridge *live_lv2_bridge); void ags_live_lv2_bridge_show_gui_callback(GtkMenuItem *item, AgsLiveLv2Bridge *live_lv2_bridge); gboolean ags_live_lv2_bridge_delete_event_callback(GtkWidget *widget, GdkEvent *event, AgsLiveLv2Bridge *live_lv2_bridge); void ags_live_lv2_bridge_lv2ui_cleanup_function(LV2UI_Handle handle); void ags_live_lv2_bridge_lv2ui_write_function(LV2UI_Controller controller, uint32_t port_index, uint32_t buffer_size, uint32_t port_protocol, const void *buffer); void ags_live_lv2_bridge_program_changed_callback(GtkComboBox *combo_box, AgsLiveLv2Bridge *live_lv2_bridge); void ags_live_lv2_bridge_preset_changed_callback(GtkComboBox *combo_box, AgsLiveLv2Bridge *live_lv2_bridge); #endif /*__AGS_LIVE_LV2_BRIDGE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_panel.c0000644000175000017500000004054113247044247015361 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_panel_class_init(AgsPanelClass *panel); void ags_panel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_panel_plugin_interface_init(AgsPluginInterface *plugin); void ags_panel_init(AgsPanel *panel); static void ags_panel_finalize(GObject *gobject); void ags_panel_connect(AgsConnectable *connectable); void ags_panel_disconnect(AgsConnectable *connectable); void ags_panel_show(GtkWidget *widget); void ags_panel_map_recall(AgsMachine *machine); gchar* ags_panel_get_name(AgsPlugin *plugin); void ags_panel_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_panel_get_xml_type(AgsPlugin *plugin); void ags_panel_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_panel_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_panel_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_panel_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_file_read_panel(AgsFile *file, xmlNode *node, AgsMachine *panel); xmlNode* ags_file_write_panel(AgsFile *file, xmlNode *parent, AgsMachine *panel); void ags_panel_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_panel_resize_pads(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, gpointer data); /** * SECTION:ags_panel * @short_description: panel * @title: AgsPanel * @section_id: * @include: ags/X/machine/ags_panel.h * * The #AgsPanel is a composite widget to act as panel. */ static gpointer ags_panel_parent_class = NULL; static AgsConnectableInterface *ags_panel_parent_connectable_interface; GType ags_panel_get_type(void) { static GType ags_type_panel = 0; if(!ags_type_panel){ static const GTypeInfo ags_panel_info = { sizeof(AgsPanelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_panel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsPanel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_panel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_panel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_panel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_panel = g_type_register_static(AGS_TYPE_MACHINE, "AgsPanel", &ags_panel_info, 0); g_type_add_interface_static(ags_type_panel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_panel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_panel); } void ags_panel_class_init(AgsPanelClass *panel) { GObjectClass *gobject; GtkWidgetClass *widget; AgsMachineClass *machine; ags_panel_parent_class = g_type_class_peek_parent(panel); /* GtkObjectClass */ gobject = (GObjectClass *) panel; gobject->finalize = ags_panel_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) panel; widget->show = ags_panel_show; /* AgsMachine */ machine = (AgsMachineClass *) panel; machine->map_recall = ags_panel_map_recall; } void ags_panel_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_panel_connectable_parent_interface; ags_panel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_panel_connect; connectable->disconnect = ags_panel_disconnect; } void ags_panel_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_panel_get_name; plugin->set_name = ags_panel_set_name; plugin->get_xml_type = ags_panel_get_xml_type; plugin->set_xml_type = ags_panel_set_xml_type; plugin->read = ags_panel_read; plugin->write = ags_panel_write; } void ags_panel_init(AgsPanel *panel) { g_signal_connect_after((GObject *) panel, "parent-set", G_CALLBACK(ags_panel_parent_set_callback), (gpointer) panel); ags_machine_popup_add_connection_options((AgsMachine *) panel, (AGS_MACHINE_POPUP_CONNECTION_EDITOR)); AGS_MACHINE(panel)->connection_flags |= AGS_MACHINE_SHOW_AUDIO_OUTPUT_CONNECTION; AGS_MACHINE(panel)->audio->flags |= (AGS_AUDIO_SYNC); AGS_MACHINE(panel)->input_pad_type = AGS_TYPE_PANEL_INPUT_PAD; AGS_MACHINE(panel)->input_pad_type = AGS_TYPE_PANEL_INPUT_PAD; AGS_MACHINE(panel)->input_line_type = AGS_TYPE_PANEL_INPUT_LINE; AGS_MACHINE(panel)->output_pad_type = G_TYPE_NONE; AGS_MACHINE(panel)->output_line_type = G_TYPE_NONE; g_signal_connect(G_OBJECT(panel), "resize-audio-channels", G_CALLBACK(ags_panel_resize_audio_channels), NULL); g_signal_connect(G_OBJECT(panel), "resize-pads", G_CALLBACK(ags_panel_resize_pads), NULL); /* */ panel->name = NULL; panel->xml_type = "ags-panel"; panel->vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer*) (gtk_bin_get_child((GtkBin *) panel)), (GtkWidget *) panel->vbox); // AGS_MACHINE(panel)->output = (GtkContainer *) gtk_hbox_new(FALSE, 0); // gtk_box_pack_start((GtkBox *) panel->vbox, (GtkWidget *) AGS_MACHINE(panel)->output, FALSE, FALSE, 0); AGS_MACHINE(panel)->input = (GtkContainer *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) panel->vbox, (GtkWidget *) AGS_MACHINE(panel)->input, FALSE, FALSE, 0); } static void ags_panel_finalize(GObject *gobject) { AgsPanel *panel; panel = (AgsPanel *) gobject; /* call parent */ G_OBJECT_CLASS(ags_panel_parent_class)->finalize(gobject); } void ags_panel_connect(AgsConnectable *connectable) { if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_panel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_panel_disconnect(AgsConnectable *connectable) { if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } ags_panel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_panel_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_panel_parent_class)->show(widget); } void ags_panel_map_recall(AgsMachine *machine) { AGS_MACHINE_CLASS(ags_panel_parent_class)->map_recall(machine); /* empty */ } gchar* ags_panel_get_name(AgsPlugin *plugin) { return(AGS_PANEL(plugin)->name); } void ags_panel_set_name(AgsPlugin *plugin, gchar *name) { AGS_PANEL(plugin)->name = name; } gchar* ags_panel_get_xml_type(AgsPlugin *plugin) { return(AGS_PANEL(plugin)->xml_type); } void ags_panel_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_PANEL(plugin)->xml_type = xml_type; } void ags_panel_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsPanel *gobject; AgsFileLookup *file_lookup; GList *list; guint64 length, index; gobject = AGS_PANEL(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); list = file->lookup; while((list = ags_file_lookup_find_by_node(list, node->parent)) != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); if(g_signal_handler_find(list->data, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, ags_file_read_machine_resolve_audio, NULL) != 0){ g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_panel_read_resolve_audio), gobject); break; } list = list->next; } } void ags_panel_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsPanel *panel; GList *pad, *pad_start, *line, *line_start; panel = AGS_PANEL(machine); g_signal_connect_after(G_OBJECT(machine), "resize-audio-channels", G_CALLBACK(ags_panel_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(machine), "resize-pads", G_CALLBACK(ags_panel_resize_pads), NULL); } xmlNode* ags_panel_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsPanel *panel; AgsFileLookup *file_lookup; xmlNode *node; GList *list; gchar *id; guint i; panel = AGS_PANEL(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-panel"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", panel, NULL)); xmlAddChild(parent, node); return(node); } void ags_panel_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { AgsAudio *audio; AgsAudioConnection *audio_connection; AgsMutexManager *mutex_manager; AgsConnectionManager *connection_manager; GObject *soundcard; GList *list; guint input_pads; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); connection_manager = ags_connection_manager_get_instance(); audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); if(audio_channels > audio_channels_old){ for(i = 0; i < audio->input_pads; i++){ if(i != 0){ for(j = 0; j < audio_channels_old; j++){ pthread_mutex_lock(audio_mutex); list = audio->audio_connection; while((list = ags_audio_connection_find(list, AGS_TYPE_INPUT, i, j)) != NULL){ GObject *data_object; g_object_get(G_OBJECT(list->data), "data-object", &data_object, NULL); if(AGS_IS_SOUNDCARD(data_object)){ break; } list = list->next; } if(list != NULL){ audio_connection = list->data; audio_connection->line = i * audio_channels + j; audio_connection->mapped_line = audio_connection->line; } pthread_mutex_unlock(audio_mutex); } } for(j = audio_channels_old; j < audio_channels; j++){ audio_connection = g_object_new(AGS_TYPE_AUDIO_CONNECTION, "data-object", soundcard, NULL); audio_connection->flags |= (AGS_AUDIO_CONNECTION_IS_OUTPUT | AGS_AUDIO_CONNECTION_IS_SOUNDCARD_DATA | AGS_AUDIO_CONNECTION_SCOPE_LINE); audio_connection->audio = (GObject *) audio; audio_connection->channel_type = AGS_TYPE_INPUT; audio_connection->pad = i; audio_connection->audio_channel = j; audio_connection->line = i * audio_channels + j; audio_connection->mapped_line = audio_connection->line; ags_audio_add_audio_connection(audio, (GObject *) audio_connection); ags_connection_manager_add_connection(connection_manager, (AgsConnection *) audio_connection); } } }else{ for(i = 0; i < input_pads; i++){ for(j = audio_channels; j < audio_channels_old; j++){ pthread_mutex_lock(audio_mutex); list = audio->audio_connection; while((list = ags_audio_connection_find(list, AGS_TYPE_INPUT, i, j)) != NULL){ GObject *data_object; audio_connection = (AgsAudioConnection *) list->data; g_object_get(audio_connection, "data-object", &data_object, NULL); if(AGS_IS_SOUNDCARD(data_object)){ ags_audio_remove_audio_connection(audio, (GObject *) audio_connection); ags_connection_manager_remove_connection(connection_manager, (AgsConnection *) audio_connection); break; } list = list->next; } pthread_mutex_unlock(audio_mutex); } } } } void ags_panel_resize_pads(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, gpointer data) { AgsAudio *audio; AgsAudioConnection *audio_connection; AgsMutexManager *mutex_manager; AgsConnectionManager *connection_manager; GObject *soundcard; GList *list; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); connection_manager = ags_connection_manager_get_instance(); audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); if(channel_type == AGS_TYPE_INPUT){ if(pads > pads_old){ for(i = pads_old; i < pads; i++){ for(j = 0; j < audio_channels; j++){ audio_connection = g_object_new(AGS_TYPE_AUDIO_CONNECTION, "data-object", soundcard, NULL); audio_connection->flags |= (AGS_AUDIO_CONNECTION_IS_OUTPUT | AGS_AUDIO_CONNECTION_IS_SOUNDCARD_DATA | AGS_AUDIO_CONNECTION_SCOPE_LINE); audio_connection->audio = (GObject *) audio; audio_connection->channel_type = AGS_TYPE_INPUT; audio_connection->pad = i; audio_connection->audio_channel = j; audio_connection->line = i * audio_channels + j; audio_connection->mapped_line = audio_connection->line; ags_audio_add_audio_connection(audio, (GObject *) audio_connection); ags_connection_manager_add_connection(connection_manager, (AgsConnection *) audio_connection); } } }else{ for(i = pads; i < pads_old; i++){ for(j = 0; j < audio_channels; j++){ pthread_mutex_lock(audio_mutex); list = audio->audio_connection; while((list = ags_audio_connection_find(list, AGS_TYPE_INPUT, i, j)) != NULL){ GObject *data_object; audio_connection = (AgsAudioConnection *) list->data; g_object_get(G_OBJECT(audio_connection), "data-object", &data_object, NULL); if(AGS_IS_SOUNDCARD(data_object)){ ags_audio_remove_audio_connection(audio, (GObject *) audio_connection); ags_connection_manager_remove_connection(connection_manager, (AgsConnection *) audio_connection); break; } list = list->next; } pthread_mutex_unlock(audio_mutex); } } } } } /** * ags_panel_new: * @soundcard: the assigned soundcard. * * Creates an #AgsPanel * * Returns: a new #AgsPanel * * Since: 1.0.0 */ AgsPanel* ags_panel_new(GObject *soundcard) { AgsPanel *panel; GValue value = {0,}; panel = (AgsPanel *) g_object_new(AGS_TYPE_PANEL, NULL); if(soundcard != NULL){ g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, soundcard); g_object_set_property(G_OBJECT(AGS_MACHINE(panel)->audio), "soundcard", &value); g_value_unset(&value); } return(panel); } gsequencer-1.4.24/ags/X/machine/ags_audiorec_callbacks.h0000644000175000017500000000243713247044247020063 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUDIOREC_CALLBACKS_H__ #define __AGS_AUDIOREC_CALLBACKS_H__ #include #include #include #include void ags_audiorec_open_callback(GtkWidget *button, AgsAudiorec *audiorec); void ags_audiorec_keep_data_callback(GtkWidget *button, AgsAudiorec *audiorec); void ags_audiorec_replace_data_callback(GtkWidget *button, AgsAudiorec *audiorec); void ags_audiorec_mix_data_callback(GtkWidget *button, AgsAudiorec *audiorec); #endif /*__AGS_AUDIOREC_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_input_line.c0000644000175000017500000004415713247044247017466 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_drum_input_line_class_init(AgsDrumInputLineClass *drum_input_line); void ags_drum_input_line_connectable_interface_init(AgsConnectableInterface *connectable); void ags_drum_input_line_plugin_interface_init(AgsPluginInterface *plugin); void ags_drum_input_line_init(AgsDrumInputLine *drum_input_line); void ags_drum_input_line_destroy(GtkObject *object); void ags_drum_input_line_connect(AgsConnectable *connectable); void ags_drum_input_line_disconnect(AgsConnectable *connectable); gchar* ags_drum_input_line_get_name(AgsPlugin *plugin); void ags_drum_input_line_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_drum_input_line_get_xml_type(AgsPlugin *plugin); void ags_drum_input_line_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_drum_input_line_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_drum_input_line_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_drum_input_line_set_channel(AgsLine *line, AgsChannel *channel); void ags_drum_input_line_group_changed(AgsLine *line); void ags_drum_input_line_map_recall(AgsLine *line, guint output_pad_start); /** * SECTION:ags_drum_input_line * @short_description: drum sequencer input line * @title: AgsDrumInputLine * @section_id: * @include: ags/X/machine/ags_drum_input_line.h * * The #AgsDrumInputLine is a composite widget to act as drum sequencer input line. */ static gpointer ags_drum_input_line_parent_class = NULL; static AgsConnectableInterface *ags_drum_input_line_parent_connectable_interface; extern GHashTable *ags_line_indicator_queue_draw; GType ags_drum_input_line_get_type() { static GType ags_type_drum_input_line = 0; if(!ags_type_drum_input_line){ static const GTypeInfo ags_drum_input_line_info = { sizeof(AgsDrumInputLineClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_drum_input_line_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsDrumInputLine), 0, /* n_preallocs */ (GInstanceInitFunc) ags_drum_input_line_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_drum_input_line_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_drum_input_line_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_drum_input_line = g_type_register_static(AGS_TYPE_LINE, "AgsDrumInputLine", &ags_drum_input_line_info, 0); g_type_add_interface_static(ags_type_drum_input_line, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_drum_input_line, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_drum_input_line); } void ags_drum_input_line_class_init(AgsDrumInputLineClass *drum_input_line) { AgsLineClass *line; ags_drum_input_line_parent_class = g_type_class_peek_parent(drum_input_line); /* AgsLineClass */ line = AGS_LINE_CLASS(drum_input_line); line->set_channel = ags_drum_input_line_set_channel; line->group_changed = ags_drum_input_line_group_changed; line->map_recall = ags_drum_input_line_map_recall; } void ags_drum_input_line_connectable_interface_init(AgsConnectableInterface *connectable) { ags_drum_input_line_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_drum_input_line_connect; connectable->disconnect = ags_drum_input_line_disconnect; } void ags_drum_input_line_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_drum_input_line_get_name; plugin->set_name = ags_drum_input_line_set_name; plugin->get_xml_type = ags_drum_input_line_get_xml_type; plugin->set_xml_type = ags_drum_input_line_set_xml_type; plugin->read = ags_drum_input_line_read; plugin->write = ags_drum_input_line_write; } void ags_drum_input_line_init(AgsDrumInputLine *drum_input_line) { AgsLineMember *line_member; GtkWidget *widget; GtkAdjustment *adjustment; /* volume indicator */ line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, "widget-type", AGS_TYPE_VINDICATOR, "plugin-name", "ags-peak", "specifier", "./peak[0]", "control-port", "1/1", NULL); line_member->flags |= (AGS_LINE_MEMBER_PLAY_CALLBACK_WRITE | AGS_LINE_MEMBER_RECALL_CALLBACK_WRITE); ags_expander_add(AGS_LINE(drum_input_line)->expander, GTK_WIDGET(line_member), 0, 0, 1, 1); widget = gtk_bin_get_child(GTK_BIN(line_member)); AGS_LINE(drum_input_line)->indicator = widget; g_hash_table_insert(ags_line_indicator_queue_draw, widget, ags_line_indicator_queue_draw_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_line_indicator_queue_draw_timeout, (gpointer) widget); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 10.0, 1.0, 1.0, 10.0); g_object_set(widget, "adjustment", adjustment, NULL); gtk_widget_set_size_request(widget, 16, 100); gtk_widget_queue_draw(widget); //TODO:JK: fix me // g_object_set(G_OBJECT(line_member), // "port-data", (gpointer) &(adjustment->value), // NULL); /* volume control */ line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, "widget-type", GTK_TYPE_VSCALE, "plugin-name", "ags-volume", "specifier", "./volume[0]", "control-port", "1/1", NULL); ags_expander_add(AGS_LINE(drum_input_line)->expander, GTK_WIDGET(line_member), 1, 0, 1, 1); widget = gtk_bin_get_child(GTK_BIN(line_member)); gtk_scale_set_digits(GTK_SCALE(widget), 3); gtk_range_set_range(GTK_RANGE(widget), 0.0, 2.00); gtk_range_set_increments(GTK_RANGE(widget), 0.025, 0.1); gtk_range_set_value(GTK_RANGE(widget), 1.0); gtk_range_set_inverted(GTK_RANGE(widget), TRUE); gtk_widget_set_size_request(widget, -1, 100); // g_object_set(G_OBJECT(line_member), // "port-data", (gpointer) &(GTK_RANGE(widget)->adjustment->value), // NULL); } void ags_drum_input_line_destroy(GtkObject *object) { } void ags_drum_input_line_connect(AgsConnectable *connectable) { AgsDrumInputLine *drum_input_line; drum_input_line = AGS_DRUM_INPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(drum_input_line)->flags)) != 0){ return; } ags_drum_input_line_parent_connectable_interface->connect(connectable); /* empty */ } void ags_drum_input_line_disconnect(AgsConnectable *connectable) { AgsDrumInputLine *drum_input_line; drum_input_line = AGS_DRUM_INPUT_LINE(connectable); if((AGS_LINE_CONNECTED & (AGS_LINE(drum_input_line)->flags)) != 0){ return; } ags_drum_input_line_parent_connectable_interface->disconnect(connectable); /* empty */ } gchar* ags_drum_input_line_get_name(AgsPlugin *plugin) { return(AGS_DRUM_INPUT_LINE(plugin)->name); } void ags_drum_input_line_set_name(AgsPlugin *plugin, gchar *name) { AGS_DRUM_INPUT_LINE(plugin)->name = name; } gchar* ags_drum_input_line_get_xml_type(AgsPlugin *plugin) { return(AGS_DRUM_INPUT_LINE(plugin)->xml_type); } void ags_drum_input_line_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_DRUM_INPUT_LINE(plugin)->xml_type = xml_type; } void ags_drum_input_line_set_channel(AgsLine *line, AgsChannel *channel) { AgsChannel *old_channel; AgsRecycling *first_recycling; AgsAudioSignal *template; AgsMutexManager *mutex_manager; GObject *soundcard; guint nth_line; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); if(line->channel != NULL){ old_channel = line->channel; }else{ old_channel = NULL; } /* call parent */ AGS_LINE_CLASS(ags_drum_input_line_parent_class)->set_channel(line, channel); if(channel != NULL){ /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; first_recycling = channel->first_recycling; nth_line = channel->line; #ifdef AGS_DEBUG g_message("ags_drum_input_line_set_channel - channel: %u", nth_line); #endif pthread_mutex_unlock(channel_mutex); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_recycling); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(recycling_mutex); template = ags_audio_signal_get_template(first_recycling->audio_signal); pthread_mutex_unlock(recycling_mutex); /* create audio signal */ if(soundcard != NULL && template == NULL){ AgsAudioSignal *audio_signal; audio_signal = ags_audio_signal_new(soundcard, (GObject *) first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, audio_signal); } /* reset edit button */ if(old_channel == NULL && nth_line == 0){ AgsDrum *drum; GtkToggleButton *selected_edit_button; GList *list; drum = (AgsDrum *) gtk_widget_get_ancestor(GTK_WIDGET(line), AGS_TYPE_DRUM); if(drum != NULL){ list = gtk_container_get_children((GtkContainer *) drum->input_pad); drum->selected_pad = AGS_DRUM_INPUT_PAD(list->data); drum->selected_edit_button = drum->selected_pad->edit; gtk_toggle_button_set_active((GtkToggleButton *) drum->selected_edit_button, TRUE); g_list_free(list); } } } } void ags_drum_input_line_group_changed(AgsLine *line) { AgsDrum *drum; drum = (AgsDrum *) gtk_widget_get_ancestor(GTK_WIDGET(line), AGS_TYPE_DRUM); ags_pattern_box_set_pattern(drum->pattern_box); } void ags_drum_input_line_map_recall(AgsLine *line, guint output_pad_start) { AgsLineMember *line_member; AgsAudio *audio; AgsChannel *source; AgsChannel *current; AgsPattern *pattern; AgsRecallHandler *recall_handler; AgsCopyPatternChannel *copy_pattern_channel; AgsPlayChannel *play_channel; AgsPlayChannelRun *play_channel_run; AgsPeakChannelRun *recall_peak_channel_run, *play_peak_channel_run; AgsStreamChannelRun *stream_channel_run; AgsMutexManager *mutex_manager; AgsConfig *config; GList *list; gchar *str; guint pad, audio_channel; guint i; gboolean rt_safe; pthread_mutex_t *application_mutex; pthread_mutex_t *source_mutex; if((AGS_LINE_MAPPED_RECALL & (line->flags)) != 0 || (AGS_LINE_PREMAPPED_RECALL & (line->flags)) != 0){ return; } config = ags_config_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); source = line->channel; rt_safe = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } /* lookup source mutex */ pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(source_mutex); audio = (AgsAudio *) source->audio; pad = source->pad; audio_channel = source->audio_channel; pthread_mutex_unlock(source_mutex); /* ags-peak */ ags_recall_factory_create(audio, NULL, NULL, "ags-peak", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-copy-pattern */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy-pattern", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_REMAP | AGS_RECALL_FACTORY_RECALL), 0); /* set pattern object on port */ pthread_mutex_lock(source_mutex); list = ags_recall_template_find_type(source->recall, AGS_TYPE_COPY_PATTERN_CHANNEL); if(list != NULL){ copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(list->data); list = source->pattern; pattern = AGS_PATTERN(list->data); copy_pattern_channel->pattern->port_value.ags_port_object = (GObject *) pattern; ags_portlet_set_port(AGS_PORTLET(pattern), (GObject *) copy_pattern_channel->pattern); } pthread_mutex_unlock(source_mutex); if(rt_safe){ ags_recall_factory_create(audio, NULL, NULL, "ags-rt-stream", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); pthread_mutex_lock(source_mutex); list = source->play; while((list = ags_recall_find_type(list, AGS_TYPE_PLAY_CHANNEL)) != NULL){ GValue audio_channel_value = {0,}; play_channel = AGS_PLAY_CHANNEL(list->data); g_value_init(&audio_channel_value, G_TYPE_UINT64); g_value_set_uint64(&audio_channel_value, audio_channel); ags_port_safe_write(play_channel->audio_channel, &audio_channel_value); list = list->next; } pthread_mutex_unlock(source_mutex); /* ags-volume */ ags_recall_factory_create(audio, NULL, NULL, "ags-volume", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-envelope */ ags_recall_factory_create(audio, NULL, NULL, "ags-envelope", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-stream */ if(!rt_safe){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channel, audio_channel + 1, pad, pad + 1, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set up dependencies */ pthread_mutex_lock(source_mutex); list = ags_recall_find_type(source->play, AGS_TYPE_PLAY_CHANNEL_RUN); play_channel_run = AGS_PLAY_CHANNEL_RUN(list->data); list = ags_recall_find_type(source->play, AGS_TYPE_STREAM_CHANNEL_RUN); stream_channel_run = AGS_STREAM_CHANNEL_RUN(list->data); g_object_set(G_OBJECT(play_channel_run), "stream-channel-run", stream_channel_run, NULL); pthread_mutex_unlock(source_mutex); } /* call parent */ AGS_LINE_CLASS(ags_drum_input_line_parent_class)->map_recall(line, output_pad_start); } void ags_drum_input_line_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsDrumInputLine *gobject; gobject = AGS_DRUM_INPUT_LINE(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); } xmlNode* ags_drum_input_line_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsDrumInputLine *drum_input_line; xmlNode *node; gchar *id; drum_input_line = AGS_DRUM_INPUT_LINE(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-drum-input-line"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", drum_input_line, NULL)); return(node); } /** * ags_drum_input_line_new: * @channel: the assigned channel * * Creates an #AgsDrumInputLine * * Returns: a new #AgsDrumInputLine * * Since: 1.0.0 */ AgsDrumInputLine* ags_drum_input_line_new(AgsChannel *channel) { AgsDrumInputLine *drum_input_line; drum_input_line = (AgsDrumInputLine *) g_object_new(AGS_TYPE_DRUM_INPUT_LINE, "channel", channel, NULL); return(drum_input_line); } gsequencer-1.4.24/ags/X/machine/ags_dssi_bridge_callbacks.h0000644000175000017500000000230013246707333020534 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_DSSI_BRIDGE_CALLBACKS_H__ #define __AGS_DSSI_BRIDGE_CALLBACKS_H__ #include #include #include #include void ags_dssi_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsDssiBridge *dssi_bridge); void ags_dssi_bridge_program_changed_callback(GtkComboBox *combo_box, AgsDssiBridge *dssi_bridge); #endif /*__AGS_DSSI_BRIDGE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_matrix_bridge_callbacks.c0000644000175000017500000000147113246707333021101 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/machine/ags_synth_callbacks.h0000644000175000017500000000243013247044247017426 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SYNTH_CALLBACKS_H__ #define __AGS_SYNTH_CALLBACKS_H__ #include #include #include #include void ags_synth_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsSynth *synth); void ags_synth_lower_callback(GtkSpinButton *spin_button, AgsSynth *synth); void ags_synth_auto_update_callback(GtkToggleButton *toggle, AgsSynth *synth); void ags_synth_update_callback(GtkButton *button, AgsSynth *synth); #endif /*__AGS_SYNTH_CALLBACKS_H__ */ gsequencer-1.4.24/ags/X/machine/ags_ladspa_bridge.c0000644000175000017500000004160013247044247017037 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_ladspa_bridge_class_init(AgsLadspaBridgeClass *ladspa_bridge); void ags_ladspa_bridge_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ladspa_bridge_plugin_interface_init(AgsPluginInterface *plugin); void ags_ladspa_bridge_init(AgsLadspaBridge *ladspa_bridge); void ags_ladspa_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_ladspa_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_ladspa_bridge_connect(AgsConnectable *connectable); void ags_ladspa_bridge_disconnect(AgsConnectable *connectable); void ags_ladspa_bridge_finalize(GObject *gobject); gchar* ags_ladspa_bridge_get_version(AgsPlugin *plugin); void ags_ladspa_bridge_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_ladspa_bridge_get_build_id(AgsPlugin *plugin); void ags_ladspa_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id); gchar* ags_ladspa_bridge_get_xml_type(AgsPlugin *plugin); void ags_ladspa_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_ladspa_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_ladspa_bridge_launch_task(AgsFileLaunch *file_launch, AgsLadspaBridge *ladspa_bridge); xmlNode* ags_ladspa_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); /** * SECTION:ags_ladspa_bridge * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsLadspaBridge * @section_id: * @include: ags/X/machine/ags_ladspa_bridge.h * * #AgsLadspaBridge is a composite widget to visualize all #AgsChannel. It should be * packed by an #AgsMachine. */ enum{ PROP_0, PROP_FILENAME, PROP_EFFECT, PROP_INDEX, }; static gpointer ags_ladspa_bridge_parent_class = NULL; static AgsConnectableInterface* ags_ladspa_bridge_parent_connectable_interface; static AgsPluginInterface* ags_ladspa_bridge_parent_plugin_interface; GType ags_ladspa_bridge_get_type(void) { static GType ags_type_ladspa_bridge = 0; if(!ags_type_ladspa_bridge){ static const GTypeInfo ags_ladspa_bridge_info = { sizeof(AgsLadspaBridgeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ladspa_bridge_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsLadspaBridge), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ladspa_bridge_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ladspa_bridge_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_ladspa_bridge_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ladspa_bridge = g_type_register_static(AGS_TYPE_MACHINE, "AgsLadspaBridge", &ags_ladspa_bridge_info, 0); g_type_add_interface_static(ags_type_ladspa_bridge, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_ladspa_bridge, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_ladspa_bridge); } void ags_ladspa_bridge_class_init(AgsLadspaBridgeClass *ladspa_bridge) { GObjectClass *gobject; GParamSpec *param_spec; ags_ladspa_bridge_parent_class = g_type_class_peek_parent(ladspa_bridge); /* GObjectClass */ gobject = G_OBJECT_CLASS(ladspa_bridge); gobject->set_property = ags_ladspa_bridge_set_property; gobject->get_property = ags_ladspa_bridge_get_property; gobject->finalize = ags_ladspa_bridge_finalize; /* properties */ /** * AgsRecallLadspa:filename: * * The plugins filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the object file"), i18n_pspec("The filename as string of object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsRecallLadspa:effect: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsRecallLadspa:index: * * The effect's index. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("index", i18n_pspec("index of effect"), i18n_pspec("The numerical index of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); } void ags_ladspa_bridge_connectable_interface_init(AgsConnectableInterface *connectable) { ags_ladspa_bridge_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_ladspa_bridge_connect; connectable->disconnect = ags_ladspa_bridge_disconnect; } void ags_ladspa_bridge_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_ladspa_bridge_get_version; plugin->set_version = ags_ladspa_bridge_set_version; plugin->get_build_id = ags_ladspa_bridge_get_build_id; plugin->set_build_id = ags_ladspa_bridge_set_build_id; plugin->get_xml_type = ags_ladspa_bridge_get_xml_type; plugin->set_xml_type = ags_ladspa_bridge_set_xml_type; plugin->read = ags_ladspa_bridge_read; plugin->write = ags_ladspa_bridge_write; plugin->get_ports = NULL; plugin->set_ports = NULL; } void ags_ladspa_bridge_init(AgsLadspaBridge *ladspa_bridge) { GtkTable *table; AgsAudio *audio; g_signal_connect_after((GObject *) ladspa_bridge, "parent-set", G_CALLBACK(ags_ladspa_bridge_parent_set_callback), (gpointer) ladspa_bridge); audio = AGS_MACHINE(ladspa_bridge)->audio; audio->flags |= (AGS_AUDIO_SYNC); ladspa_bridge->flags = 0; ladspa_bridge->name = NULL; ladspa_bridge->version = AGS_LADSPA_BRIDGE_DEFAULT_VERSION; ladspa_bridge->build_id = AGS_LADSPA_BRIDGE_DEFAULT_BUILD_ID; ladspa_bridge->xml_type = "ags-ladspa-bridge"; ladspa_bridge->mapped_output = 0; ladspa_bridge->mapped_input = 0; ladspa_bridge->filename = NULL; ladspa_bridge->effect = NULL; ladspa_bridge->effect_index = 0; AGS_MACHINE(ladspa_bridge)->bridge = (GtkContainer *) ags_effect_bridge_new(audio); gtk_container_add((GtkContainer *) gtk_bin_get_child((GtkBin *) ladspa_bridge), (GtkWidget *) AGS_MACHINE(ladspa_bridge)->bridge); table = (GtkTable *) gtk_table_new(1, 2, FALSE); gtk_box_pack_start((GtkBox *) AGS_EFFECT_BRIDGE(AGS_MACHINE(ladspa_bridge)->bridge), (GtkWidget *) table, FALSE, FALSE, 0); AGS_EFFECT_BRIDGE(AGS_MACHINE(ladspa_bridge)->bridge)->bulk_input = (GtkWidget *) ags_effect_bulk_new(audio, AGS_TYPE_INPUT); AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(ladspa_bridge)->bridge)->bulk_input)->flags |= (AGS_EFFECT_BULK_HIDE_BUTTONS | AGS_EFFECT_BULK_HIDE_ENTRIES | AGS_EFFECT_BULK_SHOW_LABELS); gtk_table_attach(table, (GtkWidget *) AGS_EFFECT_BRIDGE(AGS_MACHINE(ladspa_bridge)->bridge)->bulk_input, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); } void ags_ladspa_bridge_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLadspaBridge *ladspa_bridge; ladspa_bridge = AGS_LADSPA_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(filename == ladspa_bridge->filename){ return; } if(ladspa_bridge->filename != NULL){ g_free(ladspa_bridge->filename); } if(filename != NULL){ if(!g_file_test(filename, G_FILE_TEST_EXISTS)){ AgsWindow *window; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) ladspa_bridge); ags_window_show_error(window, g_strdup_printf("Plugin file not present %s", filename)); } } ladspa_bridge->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == ladspa_bridge->effect){ return; } if(ladspa_bridge->effect != NULL){ g_free(ladspa_bridge->effect); } ladspa_bridge->effect = g_strdup(effect); } break; case PROP_INDEX: { unsigned long effect_index; effect_index = g_value_get_ulong(value); if(effect_index == ladspa_bridge->effect_index){ return; } ladspa_bridge->effect_index = effect_index; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ladspa_bridge_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLadspaBridge *ladspa_bridge; ladspa_bridge = AGS_LADSPA_BRIDGE(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, ladspa_bridge->filename); } break; case PROP_EFFECT: { g_value_set_string(value, ladspa_bridge->effect); } break; case PROP_INDEX: { g_value_set_ulong(value, ladspa_bridge->effect_index); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ladspa_bridge_connect(AgsConnectable *connectable) { if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_ladspa_bridge_parent_connectable_interface->connect(connectable); } void ags_ladspa_bridge_disconnect(AgsConnectable *connectable) { if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } ags_ladspa_bridge_parent_connectable_interface->disconnect(connectable); } void ags_ladspa_bridge_finalize(GObject *gobject) { AgsLadspaBridge *ladspa_bridge; ladspa_bridge = (AgsLadspaBridge *) gobject; g_free(ladspa_bridge->filename); g_free(ladspa_bridge->effect); /* call parent */ G_OBJECT_CLASS(ags_ladspa_bridge_parent_class)->finalize(gobject); } gchar* ags_ladspa_bridge_get_version(AgsPlugin *plugin) { return(AGS_LADSPA_BRIDGE(plugin)->version); } void ags_ladspa_bridge_set_version(AgsPlugin *plugin, gchar *version) { AgsLadspaBridge *ladspa_bridge; ladspa_bridge = AGS_LADSPA_BRIDGE(plugin); ladspa_bridge->version = version; } gchar* ags_ladspa_bridge_get_build_id(AgsPlugin *plugin) { return(AGS_LADSPA_BRIDGE(plugin)->build_id); } void ags_ladspa_bridge_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsLadspaBridge *ladspa_bridge; ladspa_bridge = AGS_LADSPA_BRIDGE(plugin); ladspa_bridge->build_id = build_id; } gchar* ags_ladspa_bridge_get_xml_type(AgsPlugin *plugin) { return(AGS_LADSPA_BRIDGE(plugin)->xml_type); } void ags_ladspa_bridge_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_LADSPA_BRIDGE(plugin)->xml_type = xml_type; } void ags_ladspa_bridge_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsLadspaBridge *gobject; AgsFileLaunch *file_launch; gobject = AGS_LADSPA_BRIDGE(plugin); g_object_set(gobject, "filename", xmlGetProp(node, "filename"), "effect", xmlGetProp(node, "effect"), NULL); /* launch */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_ladspa_bridge_launch_task), gobject); ags_file_add_launch(file, G_OBJECT(file_launch)); } void ags_ladspa_bridge_launch_task(AgsFileLaunch *file_launch, AgsLadspaBridge *ladspa_bridge) { GtkTreeModel *model; GtkTreeIter iter; GList *list, *list_start; GList *recall; ags_ladspa_bridge_load(ladspa_bridge); /* block update bulk port */ list_start = list = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(ladspa_bridge)->bridge)->bulk_input)->table); while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ AGS_BULK_MEMBER(list->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; } list = list->next; } /* update value and unblock update bulk port */ recall = NULL; if(AGS_MACHINE(ladspa_bridge)->audio->input != NULL){ recall = AGS_MACHINE(ladspa_bridge)->audio->input->recall; while((recall = ags_recall_template_find_type(recall, AGS_TYPE_RECALL_LADSPA)) != NULL){ if(!g_strcmp0(AGS_RECALL_LADSPA(recall->data)->filename, ladspa_bridge->filename) && !g_strcmp0(AGS_RECALL_LADSPA(recall->data)->effect, ladspa_bridge->effect)){ break; } recall = recall->next; } } while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ GtkWidget *child_widget; GList *port; child_widget = gtk_bin_get_child(list->data); if(recall != NULL){ port = AGS_RECALL(recall->data)->port; while(port != port->next){ if(!g_strcmp0(AGS_BULK_MEMBER(list->data)->specifier, AGS_PORT(port->data)->specifier)){ if(AGS_IS_DIAL(child_widget)){ gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, AGS_PORT(port->data)->port_value.ags_port_ladspa); ags_dial_draw((AgsDial *) child_widget); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, ((AGS_PORT(port->data)->port_value.ags_port_ladspa != 0.0) ? TRUE: FALSE)); } break; } port = port->next; } } AGS_BULK_MEMBER(list->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); } list = list->next; } g_list_free(list_start); } xmlNode* ags_ladspa_bridge_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsLadspaBridge *ladspa_bridge; xmlNode *node; gchar *id; ladspa_bridge = AGS_LADSPA_BRIDGE(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-ladspa-bridge"); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, "filename", ladspa_bridge->filename); xmlNewProp(node, "effect", ladspa_bridge->effect); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", ladspa_bridge, NULL)); xmlAddChild(parent, node); return(node); } void ags_ladspa_bridge_load(AgsLadspaBridge *ladspa_bridge) { /* empty */ #ifdef AGS_DEBUG g_message("%s %s",ladspa_bridge->filename, ladspa_bridge->effect); #endif ags_effect_bulk_add_effect((AgsEffectBulk *) AGS_EFFECT_BRIDGE(AGS_MACHINE(ladspa_bridge)->bridge)->bulk_input, NULL, ladspa_bridge->filename, ladspa_bridge->effect); } /** * ags_ladspa_bridge_new: * @soundcard: the assigned soundcard. * @filename: the plugin.so * @effect: the effect * * Creates an #AgsLadspaBridge * * Returns: a new #AgsLadspaBridge * * Since: 1.0.0 */ AgsLadspaBridge* ags_ladspa_bridge_new(GObject *soundcard, gchar *filename, gchar *effect) { AgsLadspaBridge *ladspa_bridge; GValue value = {0,}; ladspa_bridge = (AgsLadspaBridge *) g_object_new(AGS_TYPE_LADSPA_BRIDGE, NULL); if(soundcard != NULL){ g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, soundcard); g_object_set_property(G_OBJECT(AGS_MACHINE(ladspa_bridge)->audio), "soundcard", &value); g_value_unset(&value); } g_object_set(ladspa_bridge, "filename", filename, "effect", effect, NULL); return(ladspa_bridge); } gsequencer-1.4.24/ags/X/machine/ags_matrix.h0000644000175000017500000000436613247044247015600 00000000000000/* 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 . */ #ifndef __AGS_MATRIX_H__ #define __AGS_MATRIX_H__ #include #include #include #include #include #define AGS_TYPE_MATRIX (ags_matrix_get_type()) #define AGS_MATRIX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MATRIX, AgsMatrix)) #define AGS_MATRIX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MATRIX, AgsMatrixClass)) #define AGS_IS_MATRIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MATRIX)) #define AGS_IS_MATRIX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MATRIX)) #define AGS_MATRIX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MATRIX, AgsMatrixClass)) typedef struct _AgsMatrix AgsMatrix; typedef struct _AgsMatrixClass AgsMatrixClass; struct _AgsMatrix { AgsMachine machine; guint flags; gchar *name; gchar *xml_type; guint mapped_output_pad; guint mapped_input_pad; GtkTable *table; GtkToggleButton *run; GtkToggleButton *selected; GtkToggleButton *index[9]; AgsCellPattern *cell_pattern; GtkSpinButton *length_spin; GtkCheckButton *loop_button; }; struct _AgsMatrixClass { AgsMachineClass machine; }; GType ags_matrix_get_type(void); void ags_matrix_input_map_recall(AgsMatrix *matrix, guint input_pad_start); void ags_matrix_output_map_recall(AgsMatrix *matrix, guint output_pad_start); AgsMatrix* ags_matrix_new(GObject *soundcard); #endif /*__AGS_MATRIX_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_input_line_callbacks.h0000644000175000017500000000177413247044247021470 00000000000000/* 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 . */ #ifndef __AGS_DRUM_INPUT_LINE_CALLBACKS_H__ #define __AGS_DRUM_INPUT_LINE_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_DRUM_INPUT_LINE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_live_dssi_bridge_callbacks.c0000644000175000017500000001330513247044247021554 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_live_dssi_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLiveDssiBridge *live_dssi_bridge) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = AGS_WINDOW(gtk_widget_get_toplevel(widget)); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_LIVE_DSSI_BRIDGE)->counter); g_object_set(AGS_MACHINE(live_dssi_bridge), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_LIVE_DSSI_BRIDGE); g_free(str); } void ags_live_dssi_bridge_program_changed_callback(GtkComboBox *combo_box, AgsLiveDssiBridge *live_dssi_bridge) { GtkTreeIter iter; if(gtk_combo_box_get_active_iter(combo_box, &iter)){ AgsLadspaConversion *ladspa_conversion; AgsChannel *channel; GList *bulk_member, *bulk_member_start; GList *recall; GList *port; gchar *name; gchar *specifier; LADSPA_PortDescriptor *port_descriptor; guint bank, program; unsigned long i; /* get program */ gtk_tree_model_get(gtk_combo_box_get_model(combo_box), &iter, 0, &name, 1, &bank, 2, &program, -1); live_dssi_bridge->dssi_descriptor->select_program(live_dssi_bridge->ladspa_handle, (unsigned long) bank, (unsigned long) program); #ifdef AGS_DEBUG g_message("%d %d", bank, program); #endif /* update ports */ channel = AGS_MACHINE(live_dssi_bridge)->audio->input; port_descriptor = live_dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortDescriptors; while(channel != NULL){ recall = channel->recall; while((recall = ags_recall_find_type(recall, AGS_TYPE_PLAY_DSSI_AUDIO)) != NULL){ AGS_PLAY_DSSI_AUDIO(recall->data)->bank = (unsigned long) bank; AGS_PLAY_DSSI_AUDIO(recall->data)->program = (unsigned long) program; for(i = 0; i < live_dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortCount; i++){ if(LADSPA_IS_PORT_CONTROL(port_descriptor[i])){ if(LADSPA_IS_PORT_INPUT(port_descriptor[i]) || LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ specifier = live_dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortNames[i]; port = AGS_RECALL(recall->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, specifier)){ GValue value = {0,}; #ifdef AGS_DEBUG g_message("%s %f", specifier, live_dssi_bridge->port_values[i]); #endif g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, live_dssi_bridge->port_values[i]); ags_port_safe_write_raw(port->data, &value); break; } port = port->next; } } } } recall = recall->next; } channel = channel->next; } /* update UI */ bulk_member_start = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(live_dssi_bridge)->bridge)->bulk_output)->table); for(i = 0; i < live_dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortCount; i++){ /* find bulk member */ bulk_member = bulk_member_start; specifier = live_dssi_bridge->dssi_descriptor->LADSPA_Plugin->PortNames[i]; #ifdef AGS_DEBUG g_message("%s", specifier); #endif while(bulk_member != NULL){ if(AGS_IS_BULK_MEMBER(bulk_member->data) && !g_strcmp0(AGS_BULK_MEMBER(bulk_member->data)->specifier, specifier)){ GtkWidget *child_widget; AGS_BULK_MEMBER(bulk_member->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; child_widget = gtk_bin_get_child((GtkBin *) AGS_BULK_MEMBER(bulk_member->data)); ladspa_conversion = (AgsLadspaConversion *) AGS_BULK_MEMBER(bulk_member->data)->conversion; if(GTK_IS_TOGGLE_BUTTON(child_widget)){ if(live_dssi_bridge->port_values[i] == 0.0){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, FALSE); }else{ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, TRUE); } }else if(AGS_IS_DIAL(child_widget)){ gdouble val; val = live_dssi_bridge->port_values[i]; if(ladspa_conversion != NULL){ // val = ags_ladspa_conversion_convert(ladspa_conversion, // live_dssi_bridge->port_values[i], // TRUE); } AGS_DIAL(child_widget)->adjustment->value = val; ags_dial_draw((AgsDial *) child_widget); #ifdef AGS_DEBUG g_message(" --- %f", live_dssi_bridge->port_values[i]); #endif } AGS_BULK_MEMBER(bulk_member->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); break; } bulk_member = bulk_member->next; } } g_list_free(bulk_member_start); } } gsequencer-1.4.24/ags/X/machine/ags_matrix_bridge.c0000644000175000017500000001372113247044247017102 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_matrix_bridge_class_init(AgsMatrixBridgeClass *matrix_bridge); void ags_matrix_bridge_connectable_interface_init(AgsConnectableInterface *connectable); void ags_matrix_bridge_plugin_interface_init(AgsPluginInterface *plugin); void ags_matrix_bridge_init(AgsMatrixBridge *matrix_bridge); void ags_matrix_bridge_connect(AgsConnectable *connectable); void ags_matrix_bridge_disconnect(AgsConnectable *connectable); void ags_matrix_bridge_finalize(GObject *gobject); /** * SECTION:ags_matrix_bridge * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsMatrixBridge * @section_id: * @include: ags/X/machine/ags_matrix_bridge.h * * #AgsMatrixBridge is a composite widget to visualize all #AgsChannel. It should be * packed by an #AgsMachine. */ static gpointer ags_matrix_bridge_parent_class = NULL; static AgsConnectableInterface *ags_matrix_bridge_parent_connectable_interface; GType ags_matrix_bridge_get_type(void) { static GType ags_type_matrix_bridge = 0; if(!ags_type_matrix_bridge){ static const GTypeInfo ags_matrix_bridge_info = { sizeof(AgsMatrixBridgeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_matrix_bridge_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsMatrixBridge), 0, /* n_preallocs */ (GInstanceInitFunc) ags_matrix_bridge_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_matrix_bridge_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_matrix_bridge_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_matrix_bridge = g_type_register_static(AGS_TYPE_EFFECT_BRIDGE, "AgsMatrixBridge", &ags_matrix_bridge_info, 0); g_type_add_interface_static(ags_type_matrix_bridge, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_matrix_bridge, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_matrix_bridge); } void ags_matrix_bridge_class_init(AgsMatrixBridgeClass *matrix_bridge) { GObjectClass *gobject; ags_matrix_bridge_parent_class = g_type_class_peek_parent(matrix_bridge); /* GObjectClass */ gobject = G_OBJECT_CLASS(matrix_bridge); gobject->finalize = ags_matrix_bridge_finalize; } void ags_matrix_bridge_connectable_interface_init(AgsConnectableInterface *connectable) { ags_matrix_bridge_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_matrix_bridge_connect; connectable->disconnect = ags_matrix_bridge_disconnect; } void ags_matrix_bridge_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_matrix_bridge_init(AgsMatrixBridge *matrix_bridge) { GtkFrame *frame; GtkExpander *expander; GtkTable *table; frame = (GtkFrame *) gtk_frame_new("input bridge"); gtk_box_pack_start((GtkBox *) AGS_EFFECT_BRIDGE(matrix_bridge), (GtkWidget *) frame, FALSE, FALSE, 0); expander = (GtkExpander *) gtk_expander_new("show/hide"); gtk_container_add((GtkContainer *) frame, (GtkWidget *) expander); table = (GtkTable *) gtk_table_new(1, 2, FALSE); gtk_container_add((GtkContainer *) expander, (GtkWidget *) table); AGS_EFFECT_BRIDGE(matrix_bridge)->bulk_input = (GtkWidget *) ags_matrix_bulk_input_new(NULL, AGS_TYPE_INPUT); gtk_table_attach(table, (GtkWidget *) AGS_EFFECT_BRIDGE(matrix_bridge)->bulk_input, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); } void ags_matrix_bridge_connect(AgsConnectable *connectable) { if((AGS_EFFECT_BRIDGE_CONNECTED & (AGS_EFFECT_BRIDGE(connectable)->flags)) != 0){ return; } ags_matrix_bridge_parent_connectable_interface->connect(connectable); //TODO:JK: implement me } void ags_matrix_bridge_disconnect(AgsConnectable *connectable) { if((AGS_EFFECT_BRIDGE_CONNECTED & (AGS_EFFECT_BRIDGE(connectable)->flags)) == 0){ return; } ags_matrix_bridge_parent_connectable_interface->connect(connectable); //TODO:JK: implement me } void ags_matrix_bridge_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_matrix_bridge_parent_class)->finalize(gobject); } /** * ags_matrix_bridge_new: * @audio: the #AgsAudio to visualize * * Creates an #AgsMatrixBridge * * Returns: a new #AgsMatrixBridge * * Since: 1.0.0 */ AgsMatrixBridge* ags_matrix_bridge_new(AgsAudio *audio) { AgsMatrixBridge *matrix_bridge; matrix_bridge = (AgsMatrixBridge *) g_object_new(AGS_TYPE_MATRIX_BRIDGE, "audio", audio, NULL); return(matrix_bridge); } gsequencer-1.4.24/ags/X/machine/ags_lv2_bridge_callbacks.c0000644000175000017500000005233613247044247020305 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include extern GHashTable *ags_lv2_bridge_lv2ui_handle; extern GHashTable *ags_lv2_bridge_lv2ui_idle; void ags_lv2_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLv2Bridge *lv2_bridge) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = AGS_WINDOW(gtk_widget_get_toplevel(widget)); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_LV2_BRIDGE)->counter); g_object_set(AGS_MACHINE(lv2_bridge), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_LV2_BRIDGE); g_free(str); } void ags_lv2_bridge_show_gui_callback(GtkMenuItem *item, AgsLv2Bridge *lv2_bridge) { AgsWindow *window; GtkWidget *plugin_widget; AgsLv2uiPlugin *lv2ui_plugin; GList *list; gchar *uri; LV2UI_DescriptorFunction lv2ui_descriptor; LV2UI_Descriptor *ui_descriptor; uint32_t ui_index; static const LV2_Feature **feature = { NULL, }; window = gtk_widget_get_ancestor(lv2_bridge, AGS_TYPE_WINDOW); if(lv2_bridge->gui_uri == NULL){ return; } list = ags_lv2ui_plugin_find_gui_uri(ags_lv2ui_manager_get_instance()->lv2ui_plugin, lv2_bridge->gui_uri); if(list == NULL){ return; } lv2ui_plugin = list->data; if(lv2_bridge->ui_handle == NULL){ gchar *ui_filename; gchar *bundle_path; LV2_Feature **feature; /* feature array */ lv2_bridge->ui_feature = feature = (LV2_Feature **) malloc(3 * sizeof(LV2_Feature *)); /* idle interface */ feature[0] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[0]->URI = LV2_UI__idleInterface; feature[0]->data = NULL; /* show interface */ feature[1] = (LV2_Feature *) malloc(sizeof(LV2_Feature)); feature[1]->URI = LV2_UI__showInterface; feature[1]->data = NULL; feature[2] = NULL; if(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_plugin_so == NULL){ AGS_BASE_PLUGIN(lv2ui_plugin)->ui_plugin_so = dlopen(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename, RTLD_NOW); } if(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_plugin_so){ lv2ui_descriptor = (LV2UI_Descriptor *) dlsym(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_plugin_so, "lv2ui_descriptor"); if(dlerror() == NULL && lv2ui_descriptor){ AgsEffectBridge *effect_bridge; GtkWidget *child_widget; GList *list_bulk_member, *list_bulk_member_start; gchar *str; lv2_bridge->ui_descriptor = ui_descriptor = lv2ui_descriptor(AGS_BASE_PLUGIN(lv2ui_plugin)->ui_effect_index); ui_filename = AGS_BASE_PLUGIN(lv2ui_plugin)->ui_filename; /* instantiate */ plugin_widget = NULL; bundle_path = g_strndup(ui_filename, rindex(ui_filename, '/') - ui_filename); lv2_bridge->ui_handle = ui_descriptor->instantiate(ui_descriptor, lv2_bridge->uri, bundle_path, ags_lv2_bridge_lv2ui_write_function, lv2_bridge, &plugin_widget, feature); g_hash_table_insert(ags_lv2_bridge_lv2ui_handle, lv2_bridge->ui_handle, lv2_bridge); // ui_descriptor->cleanup = ags_lv2_bridge_lv2ui_cleanup_function; if(ui_descriptor->extension_data != NULL){ lv2_bridge->ui_feature[0]->data = ui_descriptor->extension_data(LV2_UI__idleInterface); lv2_bridge->ui_feature[1]->data = ui_descriptor->extension_data(LV2_UI__showInterface); g_hash_table_insert(ags_lv2_bridge_lv2ui_idle, lv2_bridge->ui_handle, lv2_bridge); g_timeout_add(1000 / 30, (GSourceFunc) ags_lv2_bridge_lv2ui_idle_timeout, (gpointer) lv2_bridge->ui_handle); } /* set inital values */ effect_bridge = AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge); list_bulk_member = list_bulk_member_start = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(effect_bridge->bulk_input)->table); lv2_bridge->flags |= AGS_LV2_BRIDGE_NO_UPDATE; while(list_bulk_member != NULL){ uint32_t port_index; float val; child_widget = gtk_bin_get_child(AGS_BULK_MEMBER(list_bulk_member->data)); sscanf(AGS_BULK_MEMBER(list_bulk_member->data)->control_port, "%d/", &port_index); if(AGS_IS_DIAL(child_widget)){ val = AGS_DIAL(child_widget)->adjustment->value; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); }else if(GTK_IS_SPIN_BUTTON(child_widget)){ val = GTK_SPIN_BUTTON(child_widget)->adjustment->value; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); }else if(GTK_IS_SCALE(child_widget)){ val = GTK_RANGE(child_widget)->adjustment->value; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ val = ((gtk_toggle_button_get_active(child_widget)) ? 1.0: 0.0); lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); }else if(GTK_IS_BUTTON(child_widget)){ val = 0.0; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); } list_bulk_member = list_bulk_member->next; } lv2_bridge->flags &= (~AGS_LV2_BRIDGE_NO_UPDATE); g_list_free(list_bulk_member_start); } } } if(lv2_bridge->ui_feature != NULL && lv2_bridge->ui_feature[1]->data != NULL){ ((struct _LV2UI_Show_Interface *) lv2_bridge->ui_feature[1]->data)->show(lv2_bridge->ui_handle); } } gboolean ags_lv2_bridge_delete_event_callback(GtkWidget *widget, GdkEvent *event, AgsLv2Bridge *lv2_bridge) { return(TRUE); } void ags_lv2_bridge_lv2ui_cleanup_function(LV2UI_Handle handle) { AgsLv2Bridge *lv2_bridge; AgsLv2uiPlugin *lv2ui_plugin; GList *list; lv2_bridge = g_hash_table_lookup(ags_lv2_bridge_lv2ui_handle, handle); if(lv2_bridge != NULL){ g_hash_table_remove(ags_lv2_bridge_lv2ui_handle, lv2_bridge->ui_handle); lv2_bridge->ui_handle = NULL; } } void ags_lv2_bridge_lv2ui_write_function(LV2UI_Controller controller, uint32_t port_index, uint32_t buffer_size, uint32_t port_protocol, const void *buffer) { AgsLv2Bridge *lv2_bridge; AgsEffectBridge *effect_bridge; GtkWidget *child_widget; GList *list_bulk_member, *list_bulk_member_start; gchar *str; lv2_bridge = (AgsLv2Bridge *) controller; if(lv2_bridge == NULL){ g_warning("ags_lv2_bridge_lv2ui_write_function() - lv2_bridge == NULL"); return; } if((AGS_LV2_BRIDGE_NO_UPDATE & (lv2_bridge->flags)) != 0){ return; } if(port_protocol != 0){ g_warning("ags_lv2_bridge_lv2ui_write_function() - unknown lv2 port protocol"); return; } effect_bridge = AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge); list_bulk_member = list_bulk_member_start = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(effect_bridge->bulk_input)->table); str = g_strdup_printf("%d/", port_index); while(list_bulk_member != NULL){ if(!g_ascii_strncasecmp(str, AGS_BULK_MEMBER(list_bulk_member->data)->control_port, strlen(str))){ lv2_bridge->flags |= AGS_LV2_BRIDGE_NO_UPDATE; child_widget = gtk_bin_get_child(AGS_BULK_MEMBER(list_bulk_member->data)); if(AGS_IS_DIAL(child_widget)){ ags_dial_set_value(child_widget, ((float *) buffer)[0]); }else if(GTK_IS_SPIN_BUTTON(child_widget)){ gtk_spin_button_set_value(child_widget, ((float *) buffer)[0]); }else if(GTK_IS_SCALE(child_widget)){ gtk_range_set_value(child_widget, ((float *) buffer)[0]); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active(gtk_bin_get_child(list_bulk_member->data), ((((float *) buffer)[0] != 0.0) ? TRUE: FALSE)); }else if(GTK_IS_BUTTON(child_widget)){ gtk_button_clicked(child_widget); } lv2_bridge->flags &= (~AGS_LV2_BRIDGE_NO_UPDATE); break; } list_bulk_member = list_bulk_member->next; } g_list_free(list_bulk_member_start); } void ags_lv2_bridge_program_changed_callback(GtkComboBox *combo_box, AgsLv2Bridge *lv2_bridge) { GtkTreeIter iter; if(gtk_combo_box_get_active_iter(combo_box, &iter)){ AgsChannel *channel; AgsLv2Plugin *lv2_plugin; LV2_Programs_Interface *program_interface; GList *port_descriptor_start, *port_descriptor; GList *bulk_member, *bulk_member_start; GList *recall; GList *port; gchar *name; gchar *specifier; guint bank, program; guint i; lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), lv2_bridge->filename, lv2_bridge->effect); /* get program */ gtk_tree_model_get(gtk_combo_box_get_model(combo_box), &iter, 0, &name, 1, &bank, 2, &program, -1); #ifdef AGS_DEBUG g_message("%d %d", bank, program); #endif program_interface = lv2_bridge->lv2_descriptor->extension_data(LV2_PROGRAMS__Interface); program_interface->select_program(lv2_bridge->lv2_handle[0], bank, program); /* update ports */ channel = AGS_MACHINE(lv2_bridge)->audio->input; port_descriptor_start = AGS_BASE_PLUGIN(lv2_plugin)->port; while(channel != NULL){ recall = channel->recall; while((recall = ags_recall_find_type(recall, AGS_TYPE_RECALL_LV2)) != NULL){ AGS_RECALL_LV2(recall->data)->bank = (uint32_t) bank; AGS_RECALL_LV2(recall->data)->program = (uint32_t) program; port_descriptor = port_descriptor_start; for(i = 0; port_descriptor != NULL;){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; port = AGS_RECALL(recall->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, specifier)){ GValue value = {0,}; #ifdef AGS_DEBUG g_message("%s %f", specifier, lv2_bridge->port_value[i]); #endif g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, lv2_bridge->port_value[i]); ags_port_safe_write_raw(port->data, &value); break; } port = port->next; } i++; } } port_descriptor = port_descriptor->next; } recall = recall->next; } channel = channel->next; } /* update UI */ bulk_member_start = gtk_container_get_children((GtkContainer *) AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge)->bulk_input)->table); port_descriptor = port_descriptor_start; for(i = 0; port_descriptor != NULL;){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ /* find bulk member */ bulk_member = bulk_member_start; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; #ifdef AGS_DEBUG g_message("%s", specifier); #endif while(bulk_member != NULL){ if(AGS_IS_BULK_MEMBER(bulk_member->data) && !g_strcmp0(AGS_BULK_MEMBER(bulk_member->data)->specifier, specifier)){ GtkWidget *child_widget; AGS_BULK_MEMBER(bulk_member->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; child_widget = gtk_bin_get_child((GtkBin *) AGS_BULK_MEMBER(bulk_member->data)); if(GTK_IS_TOGGLE_BUTTON(child_widget)){ if(lv2_bridge->port_value[i] == 0.0){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, FALSE); }else{ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, TRUE); } }else if(AGS_IS_DIAL(child_widget)){ gdouble val; val = lv2_bridge->port_value[i]; AGS_DIAL(child_widget)->adjustment->value = val; ags_dial_draw((AgsDial *) child_widget); #ifdef AGS_DEBUG g_message(" --- %f", lv2_bridge->port_value[i]); #endif } AGS_BULK_MEMBER(bulk_member->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); i++; break; } bulk_member = bulk_member->next; } } } port_descriptor = port_descriptor->next; } g_list_free(bulk_member_start); } } void ags_lv2_bridge_preset_changed_callback(GtkComboBox *combo_box, AgsLv2Bridge *lv2_bridge) { GtkContainer *container; AgsLv2Conversion *lv2_conversion; AgsLv2Plugin *lv2_plugin; AgsLv2Preset *lv2_preset; GList *list, *list_start; GList *port_preset; GList *port_descriptor; gchar *preset_label; gdouble value; preset_label = gtk_combo_box_text_get_active_text(combo_box); /* retrieve lv2 plugin */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), lv2_bridge->filename, lv2_bridge->effect); /* preset */ lv2_preset = NULL; list = ags_lv2_preset_find_preset_label(lv2_plugin->preset, preset_label); if(list != NULL){ lv2_preset = list->data; } /* port preset */ if(lv2_preset == NULL){ return; } container = AGS_EFFECT_BULK(AGS_EFFECT_BRIDGE(AGS_MACHINE(lv2_bridge)->bridge)->bulk_input)->table; port_preset = lv2_preset->port_preset; while(port_preset != NULL){ port_descriptor = ags_port_descriptor_find_symbol(AGS_BASE_PLUGIN(lv2_plugin)->port, AGS_LV2_PORT_PRESET(port_preset->data)->port_symbol); value = (gdouble) g_value_get_float(AGS_LV2_PORT_PRESET(port_preset->data)->port_value); list_start = list = gtk_container_get_children(container); while(list != NULL){ if(!g_strcmp0(AGS_BULK_MEMBER(list->data)->specifier, AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name)){ GtkWidget *child_widget; // AGS_BULK_MEMBER(list->data)->flags |= AGS_BULK_MEMBER_NO_UPDATE; child_widget = gtk_bin_get_child((GtkBin *) AGS_BULK_MEMBER(list->data)); lv2_conversion = (AgsLv2Conversion *) AGS_BULK_MEMBER(list->data)->conversion; if(GTK_IS_TOGGLE_BUTTON(child_widget)){ if(value == 0.0){ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, FALSE); }else{ gtk_toggle_button_set_active((GtkToggleButton *) child_widget, TRUE); } }else if(AGS_IS_DIAL(child_widget)){ if(lv2_conversion != NULL){ // val = ags_lv2_conversion_convert(lv2_conversion, // value, // TRUE); } gtk_adjustment_set_value(AGS_DIAL(child_widget)->adjustment, value); ags_dial_draw((AgsDial *) child_widget); } // AGS_BULK_MEMBER(list->data)->flags &= (~AGS_BULK_MEMBER_NO_UPDATE); break; } list = list->next; } g_list_free(list_start); port_preset = port_preset->next; } } void ags_lv2_bridge_dial_changed_callback(GtkWidget *dial, AgsLv2Bridge *lv2_bridge) { AgsBulkMember *bulk_member; GtkAdjustment *adjustment; uint32_t port_index; float val; if((AGS_LV2_BRIDGE_NO_UPDATE & (lv2_bridge->flags)) != 0 || lv2_bridge->ui_handle == NULL){ return; } bulk_member = gtk_widget_get_ancestor(dial, AGS_TYPE_BULK_MEMBER); g_object_get(dial, "adjustment", &adjustment, NULL); sscanf(bulk_member->control_port, "%d/", &port_index); val = adjustment->value; lv2_bridge->flags |= AGS_LV2_BRIDGE_NO_UPDATE; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); lv2_bridge->flags &= (~AGS_LV2_BRIDGE_NO_UPDATE); } void ags_lv2_bridge_vscale_changed_callback(GtkWidget *vscale, AgsLv2Bridge *lv2_bridge) { AgsBulkMember *bulk_member; GtkAdjustment *adjustment; uint32_t port_index; float val; if((AGS_LV2_BRIDGE_NO_UPDATE & (lv2_bridge->flags)) != 0 || lv2_bridge->ui_handle == NULL){ return; } bulk_member = gtk_widget_get_ancestor(vscale, AGS_TYPE_BULK_MEMBER); g_object_get(vscale, "adjustment", &adjustment, NULL); sscanf(bulk_member->control_port, "%d/", &port_index); val = adjustment->value; lv2_bridge->flags |= AGS_LV2_BRIDGE_NO_UPDATE; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); lv2_bridge->flags &= (~AGS_LV2_BRIDGE_NO_UPDATE); } void ags_lv2_bridge_hscale_changed_callback(GtkWidget *hscale, AgsLv2Bridge *lv2_bridge) { AgsBulkMember *bulk_member; GtkAdjustment *adjustment; uint32_t port_index; float val; if((AGS_LV2_BRIDGE_NO_UPDATE & (lv2_bridge->flags)) != 0 || lv2_bridge->ui_handle == NULL){ return; } bulk_member = gtk_widget_get_ancestor(hscale, AGS_TYPE_BULK_MEMBER); g_object_get(hscale, "adjustment", &adjustment, NULL); sscanf(bulk_member->control_port, "%d/", &port_index); val = adjustment->value; lv2_bridge->flags |= AGS_LV2_BRIDGE_NO_UPDATE; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); lv2_bridge->flags &= (~AGS_LV2_BRIDGE_NO_UPDATE); } void ags_lv2_bridge_spin_button_changed_callback(GtkWidget *spin_button, AgsLv2Bridge *lv2_bridge) { AgsBulkMember *bulk_member; GtkAdjustment *adjustment; uint32_t port_index; float val; if((AGS_LV2_BRIDGE_NO_UPDATE & (lv2_bridge->flags)) != 0 || lv2_bridge->ui_handle == NULL){ return; } bulk_member = gtk_widget_get_ancestor(spin_button, AGS_TYPE_BULK_MEMBER); g_object_get(spin_button, "adjustment", &adjustment, NULL); sscanf(bulk_member->control_port, "%d/", &port_index); val = adjustment->value; lv2_bridge->flags |= AGS_LV2_BRIDGE_NO_UPDATE; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); lv2_bridge->flags &= (~AGS_LV2_BRIDGE_NO_UPDATE); } void ags_lv2_bridge_check_button_clicked_callback(GtkWidget *check_button, AgsLv2Bridge *lv2_bridge) { AgsBulkMember *bulk_member; GtkAdjustment *adjustment; gboolean is_active; uint32_t port_index; float val; if((AGS_LV2_BRIDGE_NO_UPDATE & (lv2_bridge->flags)) != 0 || lv2_bridge->ui_handle == NULL){ return; } bulk_member = gtk_widget_get_ancestor(check_button, AGS_TYPE_BULK_MEMBER); is_active = gtk_toggle_button_get_active(check_button); sscanf(bulk_member->control_port, "%d/", &port_index); val = is_active ? 1.0: 0.0; lv2_bridge->flags |= AGS_LV2_BRIDGE_NO_UPDATE; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); lv2_bridge->flags &= (~AGS_LV2_BRIDGE_NO_UPDATE); } void ags_lv2_bridge_toggle_button_clicked_callback(GtkWidget *toggle_button, AgsLv2Bridge *lv2_bridge) { AgsBulkMember *bulk_member; GtkAdjustment *adjustment; gboolean is_active; uint32_t port_index; float val; if((AGS_LV2_BRIDGE_NO_UPDATE & (lv2_bridge->flags)) != 0 || lv2_bridge->ui_handle == NULL){ return; } bulk_member = gtk_widget_get_ancestor(toggle_button, AGS_TYPE_BULK_MEMBER); is_active = gtk_toggle_button_get_active(toggle_button); sscanf(bulk_member->control_port, "%d/", &port_index); val = is_active ? 1.0: 0.0; lv2_bridge->flags |= AGS_LV2_BRIDGE_NO_UPDATE; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); lv2_bridge->flags &= (~AGS_LV2_BRIDGE_NO_UPDATE); } void ags_lv2_bridge_button_clicked_callback(GtkWidget *button, AgsLv2Bridge *lv2_bridge) { AgsBulkMember *bulk_member; GtkAdjustment *adjustment; gboolean is_active; uint32_t port_index; float val; if((AGS_LV2_BRIDGE_NO_UPDATE & (lv2_bridge->flags)) != 0 || lv2_bridge->ui_handle == NULL){ return; } bulk_member = gtk_widget_get_ancestor(button, AGS_TYPE_BULK_MEMBER); sscanf(bulk_member->control_port, "%d/", &port_index); val = 0.0; lv2_bridge->flags |= AGS_LV2_BRIDGE_NO_UPDATE; lv2_bridge->ui_descriptor->port_event(lv2_bridge->ui_handle, port_index, sizeof(float), 0, &val); lv2_bridge->flags &= (~AGS_LV2_BRIDGE_NO_UPDATE); } gsequencer-1.4.24/ags/X/machine/ags_ffplayer_bulk_input.c0000644000175000017500000001261313247044247020325 00000000000000/* 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 . */ #include #include #include #include #include void ags_ffplayer_bulk_input_class_init(AgsFFPlayerBulkInputClass *ffplayer_bulk_input); void ags_ffplayer_bulk_input_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ffplayer_bulk_input_plugin_interface_init(AgsPluginInterface *plugin); void ags_ffplayer_bulk_input_init(AgsFFPlayerBulkInput *ffplayer_bulk_input); void ags_ffplayer_bulk_input_connect(AgsConnectable *connectable); void ags_ffplayer_bulk_input_disconnect(AgsConnectable *connectable); /** * SECTION:ags_ffplayer_bulk_input * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsFFPlayerBulkInput * @section_id: * @include: ags/X/machine/gs_ffplayer_bulk_input.h * * #AgsFFPlayerBulkInput is a composite widget to visualize one #AgsChannel. It should be * packed by an #AgsFFPlayerBulkInput. */ static gpointer ags_ffplayer_bulk_input_parent_class = NULL; static AgsConnectableInterface *ags_ffplayer_bulk_input_parent_connectable_interface; GType ags_ffplayer_bulk_input_get_type(void) { static GType ags_type_ffplayer_bulk_input = 0; if(!ags_type_ffplayer_bulk_input){ static const GTypeInfo ags_ffplayer_bulk_input_info = { sizeof(AgsFFPlayerBulkInputClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ffplayer_bulk_input_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsFFPlayerBulkInput), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ffplayer_bulk_input_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ffplayer_bulk_input_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_ffplayer_bulk_input_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ffplayer_bulk_input = g_type_register_static(AGS_TYPE_EFFECT_BULK, "AgsFFPlayerBulkInput", &ags_ffplayer_bulk_input_info, 0); g_type_add_interface_static(ags_type_ffplayer_bulk_input, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_ffplayer_bulk_input, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_ffplayer_bulk_input); } void ags_ffplayer_bulk_input_class_init(AgsFFPlayerBulkInputClass *ffplayer_bulk_input) { ags_ffplayer_bulk_input_parent_class = g_type_class_peek_parent(ffplayer_bulk_input); } void ags_ffplayer_bulk_input_connectable_interface_init(AgsConnectableInterface *connectable) { ags_ffplayer_bulk_input_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_ffplayer_bulk_input_connect; connectable->disconnect = ags_ffplayer_bulk_input_disconnect; } void ags_ffplayer_bulk_input_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_ffplayer_bulk_input_init(AgsFFPlayerBulkInput *ffplayer_bulk_input) { //TODO:JK: implement me } void ags_ffplayer_bulk_input_connect(AgsConnectable *connectable) { if((AGS_EFFECT_BULK_CONNECTED & (AGS_EFFECT_BULK(connectable)->flags)) != 0){ return; } ags_ffplayer_bulk_input_parent_connectable_interface->connect(connectable); //TODO:JK: implement me } void ags_ffplayer_bulk_input_disconnect(AgsConnectable *connectable) { if((AGS_EFFECT_BULK_CONNECTED & (AGS_EFFECT_BULK(connectable)->flags)) == 0){ return; } ags_ffplayer_bulk_input_parent_connectable_interface->disconnect(connectable); //TODO:JK: implement me } /** * ags_ffplayer_bulk_input_new: * @audio: the #AgsAudio to visualize * @channel_type: either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT * * Creates an #AgsFFPlayerBulkInput * * Returns: a new #AgsFFPlayerBulkInput * * Since: 1.0.0 */ AgsFFPlayerBulkInput* ags_ffplayer_bulk_input_new(AgsAudio *audio, GType channel_type) { AgsFFPlayerBulkInput *ffplayer_bulk_input; ffplayer_bulk_input = (AgsFFPlayerBulkInput *) g_object_new(AGS_TYPE_FFPLAYER_BULK_INPUT, "audio", audio, "channel-type", channel_type, NULL); return(ffplayer_bulk_input); } gsequencer-1.4.24/ags/X/machine/ags_matrix.c0000644000175000017500000010472513247044247015573 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_matrix_class_init(AgsMatrixClass *matrix); void ags_matrix_connectable_interface_init(AgsConnectableInterface *connectable); void ags_matrix_plugin_interface_init(AgsPluginInterface *plugin); void ags_matrix_init(AgsMatrix *matrix); void ags_matrix_finalize(GObject *gobject); void ags_matrix_connect(AgsConnectable *connectable); void ags_matrix_disconnect(AgsConnectable *connectable); void ags_matrix_map_recall(AgsMachine *machine); gchar* ags_matrix_get_name(AgsPlugin *plugin); void ags_matrix_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_matrix_get_xml_type(AgsPlugin *plugin); void ags_matrix_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_matrix_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_matrix_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_matrix_launch_task(AgsFileLaunch *file_launch, AgsMatrix *matrix); xmlNode* ags_matrix_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_matrix_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_matrix_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data); #define AGS_MATRIX_INPUT_LINE_MAPPED_KEY "AGS_MATRIX_INPUT_LINE_MAPPED_KEY" #define AGS_MATRIX_INPUT_LINE_MAPPED_DATA "AGS_MATRIX_INPUT_LINE_MAPPED_DATA" /** * SECTION:ags_matrix * @short_description: matrix sequencer * @title: AgsMatrix * @section_id: * @include: ags/X/machine/ags_matrix.h * * The #AgsMatrix is a composite widget to act as matrix sequencer. */ static gpointer ags_matrix_parent_class = NULL; static AgsConnectableInterface *ags_matrix_parent_connectable_interface; const char *AGS_MATRIX_INDEX = "AgsMatrixIndex"; GType ags_matrix_get_type(void) { static GType ags_type_matrix = 0; if(!ags_type_matrix){ static const GTypeInfo ags_matrix_info = { sizeof(AgsMatrixClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_matrix_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsMatrix), 0, /* n_preallocs */ (GInstanceInitFunc) ags_matrix_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_matrix_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_matrix_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_matrix = g_type_register_static(AGS_TYPE_MACHINE, "AgsMatrix", &ags_matrix_info, 0); g_type_add_interface_static(ags_type_matrix, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_matrix, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_matrix); } void ags_matrix_class_init(AgsMatrixClass *matrix) { GObjectClass *gobject; GtkWidgetClass *widget; AgsMachineClass *machine; ags_matrix_parent_class = g_type_class_peek_parent(matrix); /* GObjectClass */ gobject = (GObjectClass *) matrix; gobject->finalize = ags_matrix_finalize; /* AgsMachine */ machine = (AgsMachineClass *) matrix; machine->map_recall = ags_matrix_map_recall; } void ags_matrix_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_matrix_connectable_parent_interface; ags_matrix_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_matrix_connect; connectable->disconnect = ags_matrix_disconnect; } void ags_matrix_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_matrix_get_name; plugin->set_name = ags_matrix_set_name; plugin->get_xml_type = ags_matrix_get_xml_type; plugin->set_xml_type = ags_matrix_set_xml_type; plugin->read = ags_matrix_read; plugin->write = ags_matrix_write; } void ags_matrix_init(AgsMatrix *matrix) { GtkFrame *frame; GtkTable *table; GtkToggleButton *button; GtkVBox *vbox; GtkHBox *hbox; AgsAudio *audio; GList *list; int i, j; g_signal_connect_after((GObject *) matrix, "parent_set", G_CALLBACK(ags_matrix_parent_set_callback), (gpointer) matrix); audio = AGS_MACHINE(matrix)->audio; audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_NOTATION_DEFAULT | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_HAS_PATTERN | AGS_AUDIO_PATTERN_MODE); g_object_set(audio, "audio-start-mapping", 0, "audio-end-mapping", 128, "midi-start-mapping", 0, "midi-end-mapping", 128, NULL); audio->bank_dim[0] = 1; audio->bank_dim[1] = 9; audio->bank_dim[2] = 32; AGS_MACHINE(matrix)->flags |= (AGS_MACHINE_REVERSE_NOTATION); ags_machine_popup_add_connection_options((AgsMachine *) matrix, (AGS_MACHINE_POPUP_MIDI_DIALOG)); AGS_MACHINE(matrix)->input_pad_type = G_TYPE_NONE; AGS_MACHINE(matrix)->input_line_type = G_TYPE_NONE; AGS_MACHINE(matrix)->output_pad_type = G_TYPE_NONE; AGS_MACHINE(matrix)->output_line_type = G_TYPE_NONE; g_signal_connect_after(G_OBJECT(matrix), "resize-audio-channels", G_CALLBACK(ags_matrix_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(matrix), "resize-pads", G_CALLBACK(ags_matrix_resize_pads), NULL); /* */ AGS_MACHINE(matrix)->flags |= (AGS_MACHINE_IS_SEQUENCER | AGS_MACHINE_REVERSE_NOTATION); AGS_MACHINE(matrix)->mapping_flags |= AGS_MACHINE_MONO; matrix->flags = 0; matrix->name = NULL; matrix->xml_type = "ags-matrix"; matrix->mapped_input_pad = 0; matrix->mapped_output_pad = 0; ags_machine_popup_add_edit_options((AgsMachine *) matrix, (AGS_MACHINE_POPUP_COPY_PATTERN | AGS_MACHINE_POPUP_ENVELOPE)); /* create widgets */ frame = (GtkFrame *) (gtk_bin_get_child((GtkBin *) matrix)); matrix->table = (GtkTable *) gtk_table_new(4, 4, FALSE); gtk_container_add((GtkContainer *) frame, (GtkWidget *) matrix->table); AGS_MACHINE(matrix)->play = matrix->run = (GtkToggleButton *) gtk_toggle_button_new_with_label("run"); gtk_table_attach(matrix->table, (GtkWidget *) matrix->run, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); table = (GtkTable *) gtk_table_new(3, 3, FALSE); gtk_table_attach(matrix->table, (GtkWidget *) table, 1, 2, 0, 2, GTK_FILL, GTK_FILL, 0, 0); matrix->selected = NULL; for(i = 0; i < 3; i++){ for(j = 0; j < 3; j++){ //TODO:JK: verify leak of string matrix->index[i * 3 + j] = button = (GtkToggleButton *) gtk_toggle_button_new_with_label(g_strdup_printf("%d", i * 3 + j +1)); g_object_set_data((GObject *) button, AGS_MATRIX_INDEX, GUINT_TO_POINTER(i * 3 + j)); gtk_table_attach(table, (GtkWidget *) button, j, j +1, i, i +1, GTK_FILL, GTK_FILL, 0, 0); } } matrix->selected = matrix->index[0]; gtk_toggle_button_set_active(matrix->selected, TRUE); /* sequencer */ matrix->cell_pattern = ags_cell_pattern_new(); gtk_table_attach(matrix->table, (GtkWidget *) matrix->cell_pattern, 2, 3, 0, 1, GTK_FILL, GTK_FILL, 0, 0); /* length and loop */ vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach(matrix->table, (GtkWidget *) vbox, 3, 4, 0, 1, GTK_FILL, GTK_FILL, 0, 0); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) hbox, FALSE, FALSE, 0); gtk_box_pack_start((GtkBox *) hbox, gtk_label_new("length"), FALSE, FALSE, 0); matrix->length_spin = (GtkSpinButton *) gtk_spin_button_new_with_range(1.0, 32.0, 1.0); matrix->length_spin->adjustment->value = 16.0; gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) matrix->length_spin, FALSE, FALSE, 0); matrix->loop_button = (GtkCheckButton *) gtk_check_button_new_with_label("loop"); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) matrix->loop_button, FALSE, FALSE, 0); } void ags_matrix_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_matrix_parent_class)->finalize(gobject); } void ags_matrix_connect(AgsConnectable *connectable) { AgsMatrix *matrix; int i; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } /* call parent */ ags_matrix_parent_connectable_interface->connect(connectable); /* AgsMatrix */ matrix = AGS_MATRIX(connectable); for(i = 0; i < 9; i++){ g_signal_connect(G_OBJECT (matrix->index[i]), "clicked", G_CALLBACK (ags_matrix_index_callback), (gpointer) matrix); } ags_connectable_connect(AGS_CONNECTABLE(matrix->cell_pattern)); g_signal_connect_after((GObject *) matrix->length_spin, "value-changed", G_CALLBACK(ags_matrix_length_spin_callback), (gpointer) matrix); g_signal_connect((GObject *) matrix->loop_button, "clicked", G_CALLBACK(ags_matrix_loop_button_callback), (gpointer) matrix); g_signal_connect_after(G_OBJECT(matrix), "done", G_CALLBACK(ags_matrix_done_callback), NULL); } void ags_matrix_disconnect(AgsConnectable *connectable) { AgsMatrix *matrix; int i; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } /* AgsMatrix */ matrix = AGS_MATRIX(connectable); for(i = 0; i < 9; i++){ g_object_disconnect(G_OBJECT (matrix->index[i]), "any_signal::clicked", G_CALLBACK (ags_matrix_index_callback), (gpointer) matrix, NULL); } ags_connectable_disconnect(AGS_CONNECTABLE(matrix->cell_pattern)); g_object_disconnect((GObject *) matrix->length_spin, "any_signal::value-changed", G_CALLBACK(ags_matrix_length_spin_callback), (gpointer) matrix, NULL); g_object_disconnect((GObject *) matrix->loop_button, "any_signal::clicked", G_CALLBACK(ags_matrix_loop_button_callback), (gpointer) matrix, NULL); g_object_disconnect(G_OBJECT(matrix), "any_signal::done", G_CALLBACK(ags_matrix_done_callback), NULL, NULL); /* call parent */ ags_matrix_parent_connectable_interface->disconnect(connectable); } void ags_matrix_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { g_message("AgsMatrix only pads can be adjusted"); } void ags_matrix_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data) { AgsWindow *window; AgsMatrix *matrix; AgsAudio *audio; AgsChannel *channel, *source; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint i, j; gboolean grow; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *source_mutex; matrix = (AgsMatrix *) machine; audio = machine->audio; if(pads == pads_old){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get machine */ window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); application_context = window->application_context; /* set size request if needed */ if(g_type_is_a(type, AGS_TYPE_INPUT)){ gtk_adjustment_set_upper(GTK_RANGE(matrix->cell_pattern->vscrollbar)->adjustment, (double) pads); if(pads < AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY){ // gtk_widget_set_size_request((GtkWidget *) matrix->cell_pattern, // -1, // pads * matrix->cell_pattern->cell_height + AGS_LED_DEFAULT_HEIGHT + 2); }else if(pads_old < AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY){ // gtk_widget_set_size_request((GtkWidget *) matrix->cell_pattern, // -1, // AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY * matrix->cell_pattern->cell_height + AGS_LED_DEFAULT_HEIGHT + 2); } } if(pads_old < pads){ grow = TRUE; }else{ grow = FALSE; } if(g_type_is_a(type, AGS_TYPE_INPUT)){ pthread_mutex_lock(audio_mutex); source = audio->input; pthread_mutex_unlock(audio_mutex); if(grow){ /* create pattern */ source = ags_channel_nth(source, pads_old); while(source != NULL){ /* lookup source mutex */ pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* instantiate pattern */ pthread_mutex_lock(source_mutex); source = source->next; pthread_mutex_unlock(source_mutex); } if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_matrix_input_map_recall(matrix, pads_old); } }else{ matrix->mapped_input_pad = pads; } }else{ if(grow){ pthread_mutex_lock(audio_mutex); source = audio->output; pthread_mutex_unlock(audio_mutex); source = ags_channel_nth(source, pads_old); if(source != NULL){ AgsRecycling *recycling; AgsAudioSignal *audio_signal; GObject *soundcard; pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* lookup source mutex */ pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* get recycling */ pthread_mutex_lock(source_mutex); recycling = source->first_recycling; pthread_mutex_unlock(source_mutex); /* instantiate template audio signal */ audio_signal = ags_audio_signal_new(soundcard, (GObject *) recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(recycling, audio_signal); } if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ ags_matrix_output_map_recall(matrix, pads_old); } }else{ matrix->mapped_output_pad = pads; } } } void ags_matrix_map_recall(AgsMachine *machine) { AgsWindow *window; AgsMatrix *matrix; AgsAudio *audio; AgsChannel *input; AgsChannel *channel; AgsPattern *pattern; AgsDelayAudio *play_delay_audio; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsCopyPatternAudio *recall_copy_pattern_audio; AgsCopyPatternAudioRun *recall_copy_pattern_audio_run; AgsPlayNotationAudio *play_notation; AgsCopyPatternChannel *copy_pattern_channel; AgsRecordMidiAudio *recall_record_midi_audio; AgsRecordMidiAudioRun *recall_record_midi_audio_run; AgsPlayNotationAudio *recall_notation_audio; AgsPlayNotationAudioRun *recall_notation_audio_run; AgsMutexManager *mutex_manager; GList *notation; GList *list; guint input_pads; guint audio_channels; guint i, j; GValue value = {0,}; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); matrix = AGS_MATRIX(machine); audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input = audio->input; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* ags-delay */ ags_recall_factory_create(audio, NULL, NULL, "ags-delay", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(list != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(list->data); // AGS_RECALL(play_delay_audio_run)->flags |= AGS_RECALL_PERSISTENT; }else{ play_delay_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run", play_delay_audio_run, NULL); ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run), window->navigation->position_tact->adjustment->value, TRUE); g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, gtk_toggle_button_get_active((GtkToggleButton *) window->navigation->loop)); ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(play_count_beats_audio_run)->recall_audio)->notation_loop, &value); }else{ play_count_beats_audio_run = NULL; } pthread_mutex_unlock(audio_mutex); /* ags-copy-pattern */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy-pattern", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_COPY_PATTERN_AUDIO_RUN); if(list != NULL){ recall_copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_copy_pattern_audio_run), "delay-audio-run", play_delay_audio_run, "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* set pattern object on port */ channel = ags_channel_pad_nth(input, 0); for(i = 0; i < input_pads; i++){ for(j = 0; j < audio_channels; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* ags-copy-pattern-channel */ pthread_mutex_lock(channel_mutex); list = ags_recall_template_find_type(channel->recall, AGS_TYPE_COPY_PATTERN_CHANNEL); if(list != NULL){ copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(list->data); list = channel->pattern; pattern = AGS_PATTERN(list->data); copy_pattern_channel->pattern->port_value.ags_port_object = (GObject *) pattern; ags_portlet_set_port(AGS_PORTLET(pattern), (GObject *) copy_pattern_channel->pattern); } channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* ags-record-midi */ ags_recall_factory_create(audio, NULL, NULL, "ags-record-midi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_RECORD_MIDI_AUDIO_RUN); if(list != NULL){ recall_record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* ags-play-notation */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-notation", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); pthread_mutex_lock(audio_mutex); list = ags_recall_find_type(audio->recall, AGS_TYPE_PLAY_NOTATION_AUDIO_RUN); if(list != NULL){ recall_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } pthread_mutex_unlock(audio_mutex); /* depending on destination */ ags_matrix_input_map_recall(matrix, 0); /* depending on destination */ ags_matrix_output_map_recall(matrix, 0); AGS_MACHINE_CLASS(ags_matrix_parent_class)->map_recall(machine); } void ags_matrix_input_map_recall(AgsMatrix *matrix, guint input_pad_start) { AgsAudio *audio; AgsChannel *input; AgsChannel *channel; AgsPattern *pattern; AgsCopyPatternChannel *copy_pattern_channel; AgsMutexManager *mutex_manager; AgsConfig *config; GList *list; gchar *str; guint input_pads; guint audio_channels; guint i, j; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(matrix->mapped_input_pad > input_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(matrix)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input = audio->input; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); if(audio_channels == 0){ return; } /* ags-copy-pattern */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy-pattern", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_REMAP | AGS_RECALL_FACTORY_RECALL), 0); /* set pattern object on port */ channel = ags_channel_pad_nth(input, input_pad_start); for(i = 0; i < input_pads; i++){ for(j = 0; j < audio_channels; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* ags-copy-pattern-channel */ pthread_mutex_lock(channel_mutex); list = ags_recall_template_find_type(channel->recall, AGS_TYPE_COPY_PATTERN_CHANNEL); if(list != NULL){ copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(list->data); list = channel->pattern; pattern = AGS_PATTERN(list->data); copy_pattern_channel->pattern->port_value.ags_port_object = (GObject *) pattern; ags_portlet_set_port(AGS_PORTLET(pattern), (GObject *) copy_pattern_channel->pattern); } channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } /* remap for input */ if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* ags-envelope */ ags_recall_factory_create(audio, NULL, NULL, "ags-envelope", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-stream */ if(!rt_safe){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); }else{ ags_recall_factory_create(audio, NULL, NULL, "ags-rt-stream", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } matrix->mapped_input_pad = input_pads; } void ags_matrix_output_map_recall(AgsMatrix *matrix, guint output_pad_start) { AgsAudio *audio; AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; guint input_pad_start; guint output_pads, input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(matrix->mapped_output_pad > output_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(matrix)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ input_pad_start = 0; pthread_mutex_lock(audio_mutex); output_pads = audio->output_pads; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); if(audio_channels == 0){ return; } /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } /* remap for input */ if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } if(!performance_mode){ /* ags-stream */ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", 0, audio_channels, output_pad_start, output_pads, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); } matrix->mapped_output_pad = output_pads; } gchar* ags_matrix_get_name(AgsPlugin *plugin) { return(AGS_MATRIX(plugin)->name); } void ags_matrix_set_name(AgsPlugin *plugin, gchar *name) { AGS_MATRIX(plugin)->name = name; } gchar* ags_matrix_get_xml_type(AgsPlugin *plugin) { return(AGS_MATRIX(plugin)->xml_type); } void ags_matrix_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_MATRIX(plugin)->xml_type = xml_type; } void ags_matrix_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsMatrix *gobject; AgsFileLookup *file_lookup; AgsFileLaunch *file_launch; GList *list; gobject = AGS_MATRIX(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* lookup */ list = file->lookup; while((list = ags_file_lookup_find_by_node(list, node->parent)) != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); if(g_signal_handler_find(list->data, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, ags_file_read_machine_resolve_audio, NULL) != 0){ g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_matrix_read_resolve_audio), gobject); break; } list = list->next; } /* launch */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, "file", file, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_matrix_launch_task), gobject); ags_file_add_launch(file, (GObject *) file_launch); } void ags_matrix_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsMatrix *matrix; matrix = AGS_MATRIX(machine); g_signal_connect_after(G_OBJECT(machine), "resize-audio-channels", G_CALLBACK(ags_matrix_resize_audio_channels), matrix); g_signal_connect_after(G_OBJECT(machine), "resize-pads", G_CALLBACK(ags_matrix_resize_pads), matrix); if((AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) == 0){ ags_matrix_output_map_recall(matrix, 0); ags_matrix_input_map_recall(matrix, 0); }else{ matrix->mapped_output_pad = machine->audio->output_pads; matrix->mapped_input_pad = machine->audio->input_pads; } } void ags_matrix_launch_task(AgsFileLaunch *file_launch, AgsMatrix *matrix) { xmlNode *node; guint64 length, index; node = file_launch->node; /* length */ length = (gdouble) g_ascii_strtod(xmlGetProp(node, "length"), NULL); gtk_spin_button_set_value(matrix->length_spin, length); /* loop */ if(!g_strcmp0(xmlGetProp(node, "loop"), AGS_FILE_TRUE)){ gtk_toggle_button_set_active((GtkToggleButton *) matrix->loop_button, TRUE); } /* index */ index = g_ascii_strtoull(xmlGetProp(node, "bank-index-0"), NULL, 10); if(index != 0){ gtk_toggle_button_set_active(matrix->index[0], FALSE); gtk_toggle_button_set_active(matrix->index[index], TRUE); matrix->selected = matrix->index[index]; } } xmlNode* ags_matrix_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsMatrix *matrix; xmlNode *node; GList *list; gchar *id; guint i; gint history; matrix = AGS_MATRIX(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-matrix"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", matrix, NULL)); xmlNewProp(node, "length", g_strdup_printf("%d", (gint) gtk_spin_button_get_value(matrix->length_spin))); for(i = 0; matrix->selected != matrix->index[i]; i++); xmlNewProp(node, "bank-index-0", g_strdup_printf("%d", i)); xmlNewProp(node, "loop", g_strdup_printf("%s", ((gtk_toggle_button_get_active((GtkToggleButton *) matrix->loop_button)) ? AGS_FILE_TRUE: AGS_FILE_FALSE))); xmlAddChild(parent, node); return(node); } /** * ags_matrix_new: * @soundcard: the assigned soundcard. * * Creates an #AgsMatrix * * Returns: a new #AgsMatrix * * Since: 1.0.0 */ AgsMatrix* ags_matrix_new(GObject *soundcard) { AgsMatrix *matrix; matrix = (AgsMatrix *) g_object_new(AGS_TYPE_MATRIX, NULL); g_object_set(AGS_MACHINE(matrix)->audio, "soundcard", soundcard, NULL); return(matrix); } gsequencer-1.4.24/ags/X/machine/ags_panel_input_line.h0000644000175000017500000000431613247044247017614 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PANEL_INPUT_LINE_H__ #define __AGS_PANEL_INPUT_LINE_H__ #include #include #include #include #include #include #include #define AGS_TYPE_PANEL_INPUT_LINE (ags_panel_input_line_get_type()) #define AGS_PANEL_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PANEL_INPUT_LINE, AgsPanelInputLine)) #define AGS_PANEL_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PANEL_INPUT_LINE, AgsPanelInputLineClass)) #define AGS_IS_PANEL_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PANEL_INPUT_LINE)) #define AGS_IS_PANEL_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PANEL_INPUT_LINE)) #define AGS_PANEL_INPUT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_PANEL_INPUT_LINE, AgsPanelInputLineClass)) typedef struct _AgsPanelInputLine AgsPanelInputLine; typedef struct _AgsPanelInputLineClass AgsPanelInputLineClass; struct _AgsPanelInputLine { AgsLine line; gchar *name; gchar *xml_type; GtkLabel *soundcard_connection; }; struct _AgsPanelInputLineClass { AgsLineClass line; }; GType ags_panel_input_line_get_type(); gboolean ags_panel_input_line_message_monitor_timeout(AgsPanelInputLine *panel_input_line); AgsPanelInputLine* ags_panel_input_line_new(AgsChannel *channel); #endif /*__AGS_PANEL_INPUT_LINE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_panel_input_pad.c0000644000175000017500000001662313247044247017430 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_panel_input_pad_class_init(AgsPanelInputPadClass *panel_input_pad); void ags_panel_input_pad_connectable_interface_init(AgsConnectableInterface *connectable); void ags_panel_input_pad_plugin_interface_init(AgsPluginInterface *plugin); void ags_panel_input_pad_init(AgsPanelInputPad *panel_input_pad); void ags_panel_input_pad_connect(AgsConnectable *connectable); void ags_panel_input_pad_disconnect(AgsConnectable *connectable); void ags_panel_input_pad_finalize(GObject *gobject); gchar* ags_panel_input_pad_get_name(AgsPlugin *plugin); void ags_panel_input_pad_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_panel_input_pad_get_xml_type(AgsPlugin *plugin); void ags_panel_input_pad_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_panel_input_pad_show(GtkWidget *pad); void ags_panel_input_pad_set_channel(AgsPad *pad, AgsChannel *channel); void ags_panel_input_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old); /** * SECTION:ags_panel_input_pad * @short_description: panel input pad * @title: AgsPanelInputPad * @section_id: * @include: ags/X/machine/ags_panel_input_pad.h * * The #AgsPanelInputPad is a composite widget to act as panel input pad. */ static gpointer ags_panel_input_pad_parent_class = NULL; static AgsConnectableInterface *ags_panel_input_pad_parent_connectable_interface; GType ags_panel_input_pad_get_type() { static GType ags_type_panel_input_pad = 0; if(!ags_type_panel_input_pad){ static const GTypeInfo ags_panel_input_pad_info = { sizeof(AgsPanelInputPadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_panel_input_pad_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsPanelInputPad), 0, /* n_preallocs */ (GInstanceInitFunc) ags_panel_input_pad_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_panel_input_pad_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_panel_input_pad_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_panel_input_pad = g_type_register_static(AGS_TYPE_PAD, "AgsPanelInputPad", &ags_panel_input_pad_info, 0); g_type_add_interface_static(ags_type_panel_input_pad, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_panel_input_pad, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_panel_input_pad); } void ags_panel_input_pad_class_init(AgsPanelInputPadClass *panel_input_pad) { GObjectClass *gobject; GtkWidgetClass *widget; AgsPadClass *pad; ags_panel_input_pad_parent_class = g_type_class_peek_parent(panel_input_pad); /* GObjectClass */ gobject = (GObjectClass *) panel_input_pad; gobject->finalize = ags_panel_input_pad_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) panel_input_pad; widget->show = ags_panel_input_pad_show; /* AgsPadClass */ pad = (AgsPadClass *) panel_input_pad; pad->set_channel = ags_panel_input_pad_set_channel; pad->resize_lines = ags_panel_input_pad_resize_lines; } void ags_panel_input_pad_connectable_interface_init(AgsConnectableInterface *connectable) { ags_panel_input_pad_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_panel_input_pad_connect; connectable->disconnect = ags_panel_input_pad_disconnect; } void ags_panel_input_pad_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_panel_input_pad_get_name; plugin->set_name = ags_panel_input_pad_set_name; plugin->get_xml_type = ags_panel_input_pad_get_xml_type; plugin->set_xml_type = ags_panel_input_pad_set_xml_type; } void ags_panel_input_pad_init(AgsPanelInputPad *panel_input_pad) { AgsPad *pad; GtkVBox *vbox; pad = (AgsPad *) panel_input_pad; pad->cols = 1; vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) pad, (GtkWidget *) vbox, FALSE, TRUE, 0); gtk_box_reorder_child((GtkBox *) pad, (GtkWidget *) vbox, 0); } void ags_panel_input_pad_connect(AgsConnectable *connectable) { AgsPanelInputPad *panel_input_pad; panel_input_pad = AGS_PANEL_INPUT_PAD(connectable); if((AGS_PAD_CONNECTED & (AGS_PAD(panel_input_pad)->flags)) != 0){ return; } ags_panel_input_pad_parent_connectable_interface->connect(connectable); /* empty */ } void ags_panel_input_pad_disconnect(AgsConnectable *connectable) { ags_panel_input_pad_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_panel_input_pad_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_panel_input_pad_parent_class)->finalize(gobject); /* empty */ } gchar* ags_panel_input_pad_get_name(AgsPlugin *plugin) { return(AGS_PANEL_INPUT_PAD(plugin)->name); } void ags_panel_input_pad_set_name(AgsPlugin *plugin, gchar *name) { AGS_PANEL_INPUT_PAD(plugin)->name = name; } gchar* ags_panel_input_pad_get_xml_type(AgsPlugin *plugin) { return(AGS_PANEL_INPUT_PAD(plugin)->xml_type); } void ags_panel_input_pad_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_PANEL_INPUT_PAD(plugin)->xml_type = xml_type; } void ags_panel_input_pad_show(GtkWidget *pad) { GTK_WIDGET_CLASS(ags_panel_input_pad_parent_class)->show(pad); /* gtk_widget_hide(GTK_WIDGET(AGS_PAD(pad)->group)); gtk_widget_hide(GTK_WIDGET(AGS_PAD(pad)->mute)); gtk_widget_hide(GTK_WIDGET(AGS_PAD(pad)->solo)); */ } void ags_panel_input_pad_set_channel(AgsPad *pad, AgsChannel *channel) { AGS_PAD_CLASS(ags_panel_input_pad_parent_class)->set_channel(pad, channel); /* empty */ } void ags_panel_input_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old) { AGS_PAD_CLASS(ags_panel_input_pad_parent_class)->resize_lines(pad, line_type, audio_channels, audio_channels_old); /* empty */ } /** * ags_panel_input_pad_new: * @channel: the assigned channel * * Creates an #AgsPanelInputPad * * Returns: a new #AgsPanelInputPad * * Since: 1.0.0 */ AgsPanelInputPad* ags_panel_input_pad_new(AgsChannel *channel) { AgsPanelInputPad *panel_input_pad; panel_input_pad = (AgsPanelInputPad *) g_object_new(AGS_TYPE_PANEL_INPUT_PAD, "channel", channel, NULL); return(panel_input_pad); } gsequencer-1.4.24/ags/X/machine/ags_ffplayer_bridge.h0000644000175000017500000000411113247044247017404 00000000000000/* 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 . */ #ifndef __AGS_FFPLAYER_BRIDGE_H__ #define __AGS_FFPLAYER_BRIDGE_H__ #include #include #include #include #include #include #include #define AGS_TYPE_FFPLAYER_BRIDGE (ags_ffplayer_bridge_get_type()) #define AGS_FFPLAYER_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FFPLAYER_BRIDGE, AgsFFPlayerBridge)) #define AGS_FFPLAYER_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FFPLAYER_BRIDGE, AgsFFPlayerBridgeClass)) #define AGS_IS_FFPLAYER_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_FFPLAYER_BRIDGE)) #define AGS_IS_FFPLAYER_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FFPLAYER_BRIDGE)) #define AGS_FFPLAYER_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_FFPLAYER_BRIDGE, AgsFFPlayerBridgeClass)) typedef struct _AgsFFPlayerBridge AgsFFPlayerBridge; typedef struct _AgsFFPlayerBridgeClass AgsFFPlayerBridgeClass; struct _AgsFFPlayerBridge { AgsEffectBridge effect_bridge; }; struct _AgsFFPlayerBridgeClass { AgsEffectBridgeClass effect_bridge; }; GType ags_ffplayer_bridge_get_type(void); AgsFFPlayerBridge* ags_ffplayer_bridge_new(AgsAudio *audio); #endif /*__AGS_FFPLAYER_BRIDGE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_output_pad.c0000644000175000017500000001520013247044247017467 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_drum_output_pad_class_init(AgsDrumOutputPadClass *drum_output_pad); void ags_drum_output_pad_connectable_interface_init(AgsConnectableInterface *connectable); void ags_drum_output_pad_plugin_interface_init(AgsPluginInterface *plugin); void ags_drum_output_pad_init(AgsDrumOutputPad *drum_output_pad); void ags_drum_output_pad_destroy(GtkObject *object); void ags_drum_output_pad_connect(AgsConnectable *connectable); void ags_drum_output_pad_disconnect(AgsConnectable *connectable); gchar* ags_drum_output_pad_get_name(AgsPlugin *plugin); void ags_drum_output_pad_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_drum_output_pad_get_xml_type(AgsPlugin *plugin); void ags_drum_output_pad_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_drum_output_pad_set_channel(AgsPad *pad, AgsChannel *channel); void ags_drum_output_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old); /** * SECTION:ags_drum_output_pad * @short_description: drum sequencer output pad * @title: AgsDrumOutputPad * @section_id: * @include: ags/X/machine/ags_drum_output_pad.h * * The #AgsDrumOutputPad is a composite widget to act as drum sequencer output pad. */ static gpointer ags_drum_output_pad_parent_class = NULL; static AgsConnectableInterface *ags_drum_output_pad_parent_connectable_interface; GType ags_drum_output_pad_get_type() { static GType ags_type_drum_output_pad = 0; if(!ags_type_drum_output_pad){ static const GTypeInfo ags_drum_output_pad_info = { sizeof(AgsDrumOutputPadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_drum_output_pad_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsDrumOutputPad), 0, /* n_preallocs */ (GInstanceInitFunc) ags_drum_output_pad_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_drum_output_pad_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_drum_output_pad_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_drum_output_pad = g_type_register_static(AGS_TYPE_PAD, "AgsDrumOutputPad", &ags_drum_output_pad_info, 0); g_type_add_interface_static(ags_type_drum_output_pad, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_drum_output_pad, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_drum_output_pad); } void ags_drum_output_pad_class_init(AgsDrumOutputPadClass *drum_output_pad) { GObjectClass *gobject; AgsPadClass *pad; ags_drum_output_pad_parent_class = g_type_class_peek_parent(drum_output_pad); /* AgsPadClass */ pad = (AgsPadClass *) drum_output_pad; pad->set_channel = ags_drum_output_pad_set_channel; pad->resize_lines = ags_drum_output_pad_resize_lines; } void ags_drum_output_pad_connectable_interface_init(AgsConnectableInterface *connectable) { ags_drum_output_pad_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_drum_output_pad_connect; connectable->disconnect = ags_drum_output_pad_disconnect; } void ags_drum_output_pad_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_drum_output_pad_get_name; plugin->set_name = ags_drum_output_pad_set_name; plugin->get_xml_type = ags_drum_output_pad_get_xml_type; plugin->set_xml_type = ags_drum_output_pad_set_xml_type; } void ags_drum_output_pad_init(AgsDrumOutputPad *drum_output_pad) { drum_output_pad->flags = 0; drum_output_pad->xml_type = "ags-drum-output-pad"; } void ags_drum_output_pad_connect(AgsConnectable *connectable) { AgsDrumOutputPad *drum_output_pad; drum_output_pad = AGS_DRUM_OUTPUT_PAD(connectable); if((AGS_PAD_CONNECTED & (AGS_PAD(drum_output_pad)->flags)) != 0){ return; } ags_drum_output_pad_parent_connectable_interface->connect(connectable); /* empty */ } void ags_drum_output_pad_disconnect(AgsConnectable *connectable) { ags_drum_output_pad_parent_connectable_interface->disconnect(connectable); /* empty */ } gchar* ags_drum_output_pad_get_name(AgsPlugin *plugin) { return(AGS_DRUM_OUTPUT_PAD(plugin)->name); } void ags_drum_output_pad_set_name(AgsPlugin *plugin, gchar *name) { AGS_DRUM_OUTPUT_PAD(plugin)->name = name; } gchar* ags_drum_output_pad_get_xml_type(AgsPlugin *plugin) { return(AGS_DRUM_OUTPUT_PAD(plugin)->xml_type); } void ags_drum_output_pad_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_DRUM_OUTPUT_PAD(plugin)->xml_type = xml_type; } void ags_drum_output_pad_destroy(GtkObject *object) { /* empty */ } void ags_drum_output_pad_set_channel(AgsPad *pad, AgsChannel *channel) { AGS_PAD_CLASS(ags_drum_output_pad_parent_class)->set_channel(pad, channel); /* empty */ } void ags_drum_output_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old) { AGS_PAD_CLASS(ags_drum_output_pad_parent_class)->resize_lines(pad, line_type, audio_channels, audio_channels_old); /* empty */ } /** * ags_drum_output_pad_new: * @channel: the assigned channel * * Creates an #AgsDrumOutputPad * * Returns: a new #AgsDrumOutputPad * * Since: 1.0.0 */ AgsDrumOutputPad* ags_drum_output_pad_new(AgsChannel *channel) { AgsDrumOutputPad *drum_output_pad; drum_output_pad = (AgsDrumOutputPad *) g_object_new(AGS_TYPE_DRUM_OUTPUT_PAD, "channel", channel, NULL); return(drum_output_pad); } gsequencer-1.4.24/ags/X/machine/ags_ffplayer_input_line_callbacks.c0000644000175000017500000000372513247044247022322 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_ffplayer_input_line_notify_channel_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data) { AgsFFPlayerInputLine *ffplayer_input_line; AgsChannel *channel; AgsMutexManager *mutex_manager; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; ffplayer_input_line = AGS_FFPLAYER_INPUT_LINE(gobject); if(AGS_EFFECT_LINE(ffplayer_input_line)->channel == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); channel = AGS_EFFECT_LINE(ffplayer_input_line)->channel; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(channel_mutex); str = g_strdup_printf("in: %d, %d", channel->pad + 1, channel->audio_channel + 1); pthread_mutex_unlock(channel_mutex); gtk_label_set_text(AGS_EFFECT_LINE(ffplayer_input_line)->label, str); g_free(str); } gsequencer-1.4.24/ags/X/machine/ags_drum_input_pad_callbacks.c0000644000175000017500000001762213247044247021277 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_drum_input_pad_open_response_callback(GtkWidget *widget, gint response, AgsDrumInputPad *pad); #define AGS_DRUM_INPUT_PAD_OPEN_AUDIO_FILE_NAME "AgsDrumInputPadOpenAudioFileName" #define AGS_DRUM_INPUT_PAD_OPEN_SPIN_BUTTON "AgsDrumInputPadOpenSpinButton" void ags_drum_input_pad_open_callback(GtkWidget *widget, AgsDrumInputPad *drum_input_pad) { GtkFileChooserDialog *file_chooser; GtkHBox *hbox; GtkLabel *label; GtkSpinButton *spin_button; GtkToggleButton *play; if(drum_input_pad->file_chooser != NULL) return; drum_input_pad->file_chooser = file_chooser = (GtkFileChooserDialog *) gtk_file_chooser_dialog_new(i18n("Open File"), (GtkWindow *) gtk_widget_get_toplevel((GtkWidget *) drum_input_pad), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(file_chooser), FALSE); g_object_set_data((GObject *) file_chooser, (char *) g_type_name(AGS_TYPE_AUDIO_FILE), NULL); g_object_set_data((GObject *) file_chooser, AGS_DRUM_INPUT_PAD_OPEN_AUDIO_FILE_NAME, NULL); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_file_chooser_set_extra_widget((GtkFileChooser *) file_chooser, (GtkWidget *) hbox); label = (GtkLabel *) gtk_label_new(i18n("channel: ")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 0); spin_button = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_AUDIO(AGS_PAD(drum_input_pad)->channel->audio)->audio_channels - 1, 1.0); g_object_set_data((GObject *) file_chooser, AGS_DRUM_INPUT_PAD_OPEN_SPIN_BUTTON, spin_button); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) spin_button, FALSE, FALSE, 0); if(drum_input_pad->pad.group->active){ gtk_widget_set_sensitive((GtkWidget *) spin_button, FALSE); } #if 0 play = (GtkToggleButton *) g_object_new(GTK_TYPE_TOGGLE_BUTTON, "label", GTK_STOCK_MEDIA_PLAY, "use-stock", TRUE, "use-underline", TRUE, NULL); gtk_box_pack_start((GtkBox *) GTK_DIALOG(file_chooser)->action_area, (GtkWidget *) play, FALSE, FALSE, 0); gtk_box_reorder_child((GtkBox *) GTK_DIALOG(file_chooser)->action_area, (GtkWidget *) play, 0); #endif gtk_widget_show_all((GtkWidget *) file_chooser); g_signal_connect((GObject *) file_chooser, "response", G_CALLBACK(ags_drum_input_pad_open_response_callback), (gpointer) drum_input_pad); } void ags_drum_input_pad_open_response_callback(GtkWidget *widget, gint response, AgsDrumInputPad *drum_input_pad) { AgsWindow *window; AgsDrum *drum; GtkFileChooserDialog *file_chooser; GtkSpinButton *spin_button; AgsAudioFile *audio_file; AgsOpenSingleFile *open_single_file; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; char *name0, *name1; pthread_mutex_t *application_mutex; drum = (AgsDrum *) gtk_widget_get_ancestor(GTK_WIDGET(drum_input_pad), AGS_TYPE_DRUM); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) drum_input_pad, AGS_TYPE_WINDOW); file_chooser = drum_input_pad->file_chooser; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get main loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* find task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); if(response == GTK_RESPONSE_ACCEPT){ name0 = gtk_file_chooser_get_filename((GtkFileChooser *) file_chooser); name1 = (char *) g_object_get_data((GObject *) file_chooser, AGS_DRUM_INPUT_PAD_OPEN_AUDIO_FILE_NAME); spin_button = (GtkSpinButton *) g_object_get_data((GObject *) file_chooser, AGS_DRUM_INPUT_PAD_OPEN_SPIN_BUTTON); /* open audio file and read audio signal */ if(g_strcmp0(name0, name1)){ if(name1 != NULL){ audio_file = (AgsAudioFile *) g_object_get_data((GObject *) file_chooser, g_type_name(AGS_TYPE_AUDIO_FILE)); g_object_unref(G_OBJECT(audio_file)); } } /* task */ if(AGS_PAD(drum_input_pad)->group->active){ open_single_file = ags_open_single_file_new(AGS_PAD(drum_input_pad)->channel, AGS_AUDIO(AGS_MACHINE(drum)->audio)->soundcard, name0, 0, AGS_AUDIO(AGS_MACHINE(drum)->audio)->audio_channels); }else{ AgsLine *line; GList *list; list = gtk_container_get_children(GTK_CONTAINER(AGS_PAD(drum_input_pad)->expander_set)); line = AGS_LINE(ags_line_find_next_grouped(list)->data); open_single_file = ags_open_single_file_new(line->channel, AGS_AUDIO(AGS_MACHINE(drum)->audio)->soundcard, name0, (guint) spin_button->adjustment->value, 1); g_list_free(list); } ags_gui_thread_schedule_task(gui_thread, open_single_file); gtk_widget_destroy((GtkWidget *) file_chooser); }else if(response == GTK_RESPONSE_CANCEL){ audio_file = (AgsAudioFile *) g_object_get_data((GObject *) file_chooser, g_type_name(AGS_TYPE_AUDIO_FILE)); if(audio_file != NULL){ g_object_unref(G_OBJECT(audio_file)); } gtk_widget_destroy((GtkWidget *) file_chooser); } drum_input_pad->file_chooser = NULL; } void ags_drum_input_pad_play_callback(GtkToggleButton *toggle_button, AgsDrumInputPad *drum_input_pad) { ags_pad_play(AGS_PAD(drum_input_pad)); } void ags_drum_input_pad_edit_callback(GtkWidget *toggle_button, AgsDrumInputPad *drum_input_pad) { GtkToggleButton *toggle; AgsDrum *drum; drum = (AgsDrum *) gtk_widget_get_ancestor((GtkWidget *) drum_input_pad, AGS_TYPE_DRUM); if(drum->selected_edit_button != NULL){ if(GTK_TOGGLE_BUTTON(toggle_button) != drum->selected_edit_button){ /* unset old */ toggle = drum->selected_edit_button; drum->selected_edit_button = NULL; gtk_toggle_button_set_active((GtkToggleButton *) toggle, FALSE); /* apply new */ drum->selected_edit_button = (GtkToggleButton *) toggle_button; drum->selected_pad = (AgsDrumInputPad *) gtk_widget_get_ancestor((GtkWidget *) toggle_button, AGS_TYPE_DRUM_INPUT_PAD); AGS_MACHINE(drum)->selected_input_pad = (GtkWidget *) drum->selected_pad; ags_pattern_box_set_pattern(drum->pattern_box); }else{ /* chain up */ toggle = drum->selected_edit_button; drum->selected_edit_button = NULL; gtk_toggle_button_set_active((GtkToggleButton *) toggle, TRUE); /* reset */ drum->selected_edit_button = toggle; } } } gsequencer-1.4.24/ags/X/machine/ags_synth_callbacks.c0000644000175000017500000000363013247044247017424 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_synth_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsSynth *synth) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = (AgsWindow *) gtk_widget_get_toplevel(widget); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_SYNTH)->counter); g_object_set(AGS_MACHINE(synth), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_SYNTH); g_free(str); } void ags_synth_lower_callback(GtkSpinButton *spin_button, AgsSynth *synth) { //TODO:JK: implement me } void ags_synth_auto_update_callback(GtkToggleButton *toggle, AgsSynth *synth) { if(gtk_toggle_button_get_active(toggle)){ synth->flags |= AGS_SYNTH_AUTO_UPDATE; }else{ synth->flags &= (~AGS_SYNTH_AUTO_UPDATE); } } void ags_synth_update_callback(GtkButton *button, AgsSynth *synth) { ags_synth_update(synth); } gsequencer-1.4.24/ags/X/machine/ags_ffplayer.c0000644000175000017500000013132313247044247016071 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_ffplayer_class_init(AgsFFPlayerClass *ffplayer); void ags_ffplayer_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ffplayer_plugin_interface_init(AgsPluginInterface *plugin); void ags_ffplayer_init(AgsFFPlayer *ffplayer); void ags_ffplayer_connect(AgsConnectable *connectable); void ags_ffplayer_disconnect(AgsConnectable *connectable); void ags_ffplayer_finalize(GObject *gobject); void ags_ffplayer_realize(GtkWidget *widget); void ags_ffplayer_show(GtkWidget *widget); void ags_ffplayer_map_recall(AgsMachine *machine); gchar* ags_ffplayer_get_name(AgsPlugin *plugin); void ags_ffplayer_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_ffplayer_get_xml_type(AgsPlugin *plugin); void ags_ffplayer_set_xml_type(AgsPlugin *plugin, gchar *xml_type); void ags_ffplayer_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); void ags_ffplayer_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine); void ags_ffplayer_launch_task(AgsFileLaunch *file_launch, AgsFFPlayer *ffplayer); xmlNode* ags_ffplayer_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_ffplayer_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data); void ags_ffplayer_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data); void ags_ffplayer_output_map_recall(AgsFFPlayer *ffplayer, guint output_pad_start); void ags_ffplayer_input_map_recall(AgsFFPlayer *ffplayer, guint input_pad_start); void ags_ffplayer_paint(AgsFFPlayer *ffplayer); /** * SECTION:ags_ffplayer * @short_description: ffplayer notation * @title: AgsFFPlayer * @section_id: * @include: ags/X/machine/ags_ffplayer.h * * The #AgsFFPlayer is a composite widget to act as soundfont2 notation player. */ static gpointer ags_ffplayer_parent_class = NULL; static AgsConnectableInterface *ags_ffplayer_parent_connectable_interface; GtkStyle *ffplayer_style = NULL; GType ags_ffplayer_get_type(void) { static GType ags_type_ffplayer = 0; if(!ags_type_ffplayer){ static const GTypeInfo ags_ffplayer_info = { sizeof(AgsFFPlayerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ffplayer_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsFFPlayer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ffplayer_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ffplayer_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_ffplayer_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ffplayer = g_type_register_static(AGS_TYPE_MACHINE, "AgsFFPlayer", &ags_ffplayer_info, 0); g_type_add_interface_static(ags_type_ffplayer, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_ffplayer, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_ffplayer); } void ags_ffplayer_class_init(AgsFFPlayerClass *ffplayer) { GObjectClass *gobject; GtkWidgetClass *widget; AgsMachineClass *machine; ags_ffplayer_parent_class = g_type_class_peek_parent(ffplayer); /* GObjectClass */ gobject = (GObjectClass *) ffplayer; gobject->finalize = ags_ffplayer_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) ffplayer; widget->realize = ags_ffplayer_realize; widget->show = ags_ffplayer_show; /* AgsMachineClass */ machine = (AgsMachineClass *) ffplayer; machine->map_recall = ags_ffplayer_map_recall; } void ags_ffplayer_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_ffplayer_connectable_parent_interface; ags_ffplayer_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_ffplayer_connect; } void ags_ffplayer_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_ffplayer_get_name; plugin->set_name = ags_ffplayer_set_name; plugin->get_xml_type = ags_ffplayer_get_xml_type; plugin->set_xml_type = ags_ffplayer_set_xml_type; plugin->read = ags_ffplayer_read; plugin->write = ags_ffplayer_write; } void ags_ffplayer_init(AgsFFPlayer *ffplayer) { GtkVBox *vbox; GtkAlignment *alignment; GtkTable *table; GtkHBox *hbox; GtkVBox *piano_vbox; GtkLabel *label; PangoAttrList *attr_list; PangoAttribute *attr; AgsAudio *audio; g_signal_connect_after((GObject *) ffplayer, "parent_set", G_CALLBACK(ags_ffplayer_parent_set_callback), (gpointer) ffplayer); audio = AGS_MACHINE(ffplayer)->audio; audio->flags |= (AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_TAKES_FILE | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_NOTATION_DEFAULT | AGS_AUDIO_REVERSE_MAPPING); g_object_set(audio, "audio-start-mapping", 0, "audio-end-mapping", 128, "midi-start-mapping", 0, "midi-end-mapping", 128, NULL); AGS_MACHINE(ffplayer)->flags |= (AGS_MACHINE_IS_SYNTHESIZER | AGS_MACHINE_REVERSE_NOTATION); AGS_MACHINE(ffplayer)->file_input_flags |= AGS_MACHINE_ACCEPT_SOUNDFONT2; AGS_MACHINE(ffplayer)->input_pad_type = G_TYPE_NONE; AGS_MACHINE(ffplayer)->input_line_type = G_TYPE_NONE; AGS_MACHINE(ffplayer)->output_pad_type = G_TYPE_NONE; AGS_MACHINE(ffplayer)->output_line_type = G_TYPE_NONE; /* context menu */ ags_machine_popup_add_connection_options(ffplayer, (AGS_MACHINE_POPUP_MIDI_DIALOG)); /* audio resize */ g_signal_connect_after(G_OBJECT(ffplayer), "resize-audio-channels", G_CALLBACK(ags_ffplayer_resize_audio_channels), NULL); g_signal_connect_after(G_OBJECT(ffplayer), "resize-pads", G_CALLBACK(ags_ffplayer_resize_pads), NULL); /* flags */ ffplayer->flags = 0; /* mapped IO */ ffplayer->mapped_input_pad = 0; ffplayer->mapped_output_pad = 0; /* context menu */ ags_machine_popup_add_edit_options((AgsMachine *) ffplayer, (AGS_MACHINE_POPUP_ENVELOPE)); /* name and xml type */ ffplayer->name = NULL; ffplayer->xml_type = "ags-ffplayer"; /* create widgets */ vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add((GtkContainer *) (gtk_bin_get_child((GtkBin *) ffplayer)), (GtkWidget *) vbox); alignment = (GtkAlignment *) g_object_new(GTK_TYPE_ALIGNMENT, "xalign", 0.0, NULL); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) alignment, FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(3, 2, FALSE); gtk_container_add((GtkContainer *) alignment, (GtkWidget *) table); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(hbox), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("preset"), "xalign", 0.0, NULL); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); ffplayer->preset = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ffplayer->preset), TRUE, FALSE, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("instrument"), "xalign", 0.0, NULL); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); ffplayer->instrument = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ffplayer->instrument), TRUE, FALSE, 0); ffplayer->open = (GtkButton *) g_object_new(GTK_TYPE_BUTTON, "label", GTK_STOCK_OPEN, "use-stock", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ffplayer->open), FALSE, FALSE, 0); ffplayer->open_dialog = NULL; piano_vbox = (GtkVBox *) gtk_vbox_new(FALSE, 2); gtk_table_attach(table, (GtkWidget *) piano_vbox, 1, 2, 0, 3, GTK_FILL, GTK_FILL, 0, 0); ffplayer->control_width = 12; ffplayer->control_height = 40; ffplayer->drawing_area = (GtkDrawingArea *) gtk_drawing_area_new(); gtk_widget_set_size_request((GtkWidget *) ffplayer->drawing_area, 16 * ffplayer->control_width, ffplayer->control_width * 8 + ffplayer->control_height); gtk_widget_set_events((GtkWidget *) ffplayer->drawing_area, GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); gtk_box_pack_start((GtkBox *) piano_vbox, (GtkWidget *) ffplayer->drawing_area, FALSE, FALSE, 0); ffplayer->hadjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 76 * ffplayer->control_width - GTK_WIDGET(ffplayer->drawing_area)->allocation.width, 1.0, (double) ffplayer->control_width, (double) (16 * ffplayer->control_width)); ffplayer->hscrollbar = (GtkHScrollbar *) gtk_hscrollbar_new(ffplayer->hadjustment); gtk_box_pack_start((GtkBox *) piano_vbox, (GtkWidget *) ffplayer->hscrollbar, FALSE, FALSE, 0); /* effect bridge */ AGS_MACHINE(ffplayer)->bridge = (GtkContainer *) ags_ffplayer_bridge_new(audio); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) AGS_MACHINE(ffplayer)->bridge, FALSE, FALSE, 0); } void ags_ffplayer_map_recall(AgsMachine *machine) { AgsWindow *window; AgsFFPlayer *ffplayer; AgsAudio *audio; AgsDelayAudio *play_delay_audio; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudio *play_count_beats_audio; AgsCountBeatsAudioRun *play_count_beats_audio_run; AgsRecordMidiAudio *recall_record_midi_audio; AgsRecordMidiAudioRun *recall_record_midi_audio_run; AgsPlayNotationAudio *recall_notation_audio; AgsPlayNotationAudioRun *recall_notation_audio_run; GList *list; if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0 || (AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) != 0){ return; } ffplayer = AGS_FFPLAYER(machine); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); audio = machine->audio; /* ags-delay */ ags_recall_factory_create(audio, NULL, NULL, "ags-delay", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); list = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(list != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(list->data); // AGS_RECALL(play_delay_audio_run)->flags |= AGS_RECALL_PERSISTENT; }else{ play_delay_audio_run = NULL; } /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); list = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ GValue value = {0,}; play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run", play_delay_audio_run, NULL); ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run), window->navigation->position_tact->adjustment->value, TRUE); g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, gtk_toggle_button_get_active((GtkToggleButton *) window->navigation->loop)); ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(play_count_beats_audio_run)->recall_audio)->notation_loop, &value); }else{ play_count_beats_audio_run = NULL; } /* ags-record-midi */ ags_recall_factory_create(audio, NULL, NULL, "ags-record-midi", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); list = ags_recall_find_type(audio->recall, AGS_TYPE_RECORD_MIDI_AUDIO_RUN); if(list != NULL){ recall_record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_record_midi_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } /* ags-play-notation */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-notation", 0, 0, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); list = ags_recall_find_type(audio->recall, AGS_TYPE_PLAY_NOTATION_AUDIO_RUN); if(list != NULL){ recall_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(list->data); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "delay-audio-run", play_delay_audio_run, NULL); /* set dependency */ g_object_set(G_OBJECT(recall_notation_audio_run), "count-beats-audio-run", play_count_beats_audio_run, NULL); } /* depending on destination */ ags_ffplayer_input_map_recall(ffplayer, 0); /* depending on destination */ ags_ffplayer_output_map_recall(ffplayer, 0); /* call parent */ AGS_MACHINE_CLASS(ags_ffplayer_parent_class)->map_recall(machine); } void ags_ffplayer_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_ffplayer_parent_class)->finalize(gobject); } void ags_ffplayer_connect(AgsConnectable *connectable) { AgsWindow *window; AgsFFPlayer *ffplayer; GList *list; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) != 0){ return; } ags_ffplayer_parent_connectable_interface->connect(connectable); ffplayer = AGS_FFPLAYER(connectable); window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) ffplayer); g_signal_connect((GObject *) ffplayer, "destroy", G_CALLBACK(ags_ffplayer_destroy_callback), (gpointer) ffplayer); /* AgsFFPlayer */ g_signal_connect((GObject *) ffplayer->open, "clicked", G_CALLBACK(ags_ffplayer_open_clicked_callback), (gpointer) ffplayer); g_signal_connect_after((GObject *) ffplayer->preset, "changed", G_CALLBACK(ags_ffplayer_preset_changed_callback), (gpointer) ffplayer); g_signal_connect_after((GObject *) ffplayer->instrument, "changed", G_CALLBACK(ags_ffplayer_instrument_changed_callback), (gpointer) ffplayer); g_signal_connect((GObject *) ffplayer->drawing_area, "expose_event", G_CALLBACK(ags_ffplayer_drawing_area_expose_callback), (gpointer) ffplayer); g_signal_connect((GObject *) ffplayer->drawing_area, "button_press_event", G_CALLBACK(ags_ffplayer_drawing_area_button_press_callback), (gpointer) ffplayer); g_signal_connect((GObject *) ffplayer->hadjustment, "value_changed", G_CALLBACK(ags_ffplayer_hscrollbar_value_changed), (gpointer) ffplayer); /* AgsAudio */ //TODO:JK: magnify it if(!gtk_toggle_button_get_active((GtkToggleButton *) window->navigation->loop)){ GList *list; list = ags_recall_find_type(ffplayer->machine.audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(list != NULL){ AgsCountBeatsAudioRun *play_count_beats_audio_run; GValue value = {0,}; play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(list->data); g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, FALSE); ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(play_count_beats_audio_run)->recall_audio)->notation_loop, &value); } } } void ags_ffplayer_disconnect(AgsConnectable *connectable) { AgsFFPlayer *ffplayer; GList *list; if((AGS_MACHINE_CONNECTED & (AGS_MACHINE(connectable)->flags)) == 0){ return; } ags_ffplayer_parent_connectable_interface->disconnect(connectable); ffplayer = AGS_FFPLAYER(connectable); g_object_disconnect((GObject *) ffplayer, "any_signal::destroy", G_CALLBACK(ags_ffplayer_destroy_callback), (gpointer) ffplayer, NULL); /* AgsFFPlayer */ g_object_disconnect((GObject *) ffplayer->open, "any_signal::clicked", G_CALLBACK(ags_ffplayer_open_clicked_callback), (gpointer) ffplayer, NULL); g_object_disconnect((GObject *) ffplayer->preset, "any_signal::changed", G_CALLBACK(ags_ffplayer_preset_changed_callback), (gpointer) ffplayer, NULL); g_object_disconnect((GObject *) ffplayer->instrument, "any_signal::changed", G_CALLBACK(ags_ffplayer_instrument_changed_callback), (gpointer) ffplayer, NULL); g_object_disconnect((GObject *) ffplayer->drawing_area, "any_signal::expose_event", G_CALLBACK(ags_ffplayer_drawing_area_expose_callback), (gpointer) ffplayer, NULL); g_object_disconnect((GObject *) ffplayer->drawing_area, "any_signal::button_press_event", G_CALLBACK(ags_ffplayer_drawing_area_button_press_callback), (gpointer) ffplayer, NULL); g_object_disconnect((GObject *) ffplayer->hadjustment, "any_signal::value_changed", G_CALLBACK(ags_ffplayer_hscrollbar_value_changed), (gpointer) ffplayer, NULL); } void ags_ffplayer_realize(GtkWidget *widget) { AgsFFPlayer *ffplayer; ffplayer = widget; /* call parent */ GTK_WIDGET_CLASS(ags_ffplayer_parent_class)->realize(widget); if(ffplayer_style == NULL){ ffplayer_style = gtk_style_copy(gtk_widget_get_style(ffplayer)); } gtk_widget_set_style((GtkWidget *) ffplayer->drawing_area, ffplayer_style); gtk_widget_set_style((GtkWidget *) ffplayer->hscrollbar, ffplayer_style); } void ags_ffplayer_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_ffplayer_parent_class)->show(widget); } gchar* ags_ffplayer_get_name(AgsPlugin *plugin) { return(AGS_FFPLAYER(plugin)->name); } void ags_ffplayer_set_name(AgsPlugin *plugin, gchar *name) { AGS_FFPLAYER(plugin)->name = name; } gchar* ags_ffplayer_get_xml_type(AgsPlugin *plugin) { return(AGS_FFPLAYER(plugin)->xml_type); } void ags_ffplayer_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_FFPLAYER(plugin)->xml_type = xml_type; } void ags_ffplayer_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFFPlayer *gobject; AgsFileLookup *file_lookup; AgsFileLaunch *file_launch; GList *list; gobject = AGS_FFPLAYER(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* lookup */ list = file->lookup; while((list = ags_file_lookup_find_by_node(list, node->parent)) != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); if(g_signal_handler_find(list->data, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, ags_file_read_machine_resolve_audio, NULL) != 0){ g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_ffplayer_read_resolve_audio), gobject); break; } list = list->next; } /* launch */ file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_ffplayer_launch_task), gobject); ags_file_add_launch(file, G_OBJECT(file_launch)); } void ags_ffplayer_read_resolve_audio(AgsFileLookup *file_lookup, AgsMachine *machine) { AgsFFPlayer *ffplayer; ffplayer = AGS_FFPLAYER(machine); g_signal_connect_after(G_OBJECT(machine), "resize-audio-channels", G_CALLBACK(ags_ffplayer_resize_audio_channels), ffplayer); g_signal_connect_after(G_OBJECT(machine), "resize-pads", G_CALLBACK(ags_ffplayer_resize_pads), ffplayer); if((AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) == 0){ /* ags-play-notation */ ags_recall_factory_create(machine->audio, NULL, NULL, "ags-play-notation", 0, machine->audio->audio_channels, 0, 0, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_REMAP | AGS_RECALL_FACTORY_RECALL), 0); ags_ffplayer_output_map_recall(ffplayer, 0); ags_ffplayer_input_map_recall(ffplayer, 0); }else{ ffplayer->mapped_output_pad = machine->audio->output_pads; ffplayer->mapped_input_pad = machine->audio->input_pads; } } void ags_ffplayer_launch_task(AgsFileLaunch *file_launch, AgsFFPlayer *ffplayer) { AgsWindow *window; AgsFFPlayer *gobject; GtkTreeModel *list_store; GtkTreeIter iter; xmlNode *node; gchar *filename; gchar *preset, *instrument; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(ffplayer))); node = file_launch->node; filename = xmlGetProp(node, "filename"); if(filename == NULL){ return; } if(g_str_has_suffix(filename, ".sf2")){ AgsIpatch *ipatch; AgsPlayable *playable; gchar **preset, **instrument, *selected; GError *error; /* clear preset, instrument and sample*/ gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(ffplayer->instrument)))); /* Ipatch related */ ffplayer->ipatch = ipatch = g_object_new(AGS_TYPE_IPATCH, "mode", AGS_IPATCH_READ, "filename", filename, NULL); ipatch->soundcard = window->soundcard; ags_playable_open(AGS_PLAYABLE(ipatch), filename); playable = AGS_PLAYABLE(ipatch); ags_playable_open(playable, filename); error = NULL; ipatch->nth_level = 0; ags_playable_level_select(playable, 0, filename, &error); if(error != NULL){ g_warning("%s", error->message); } /* select first preset */ ipatch->nth_level = 1; preset = ags_playable_sublevel_names(playable); error = NULL; ags_playable_level_select(playable, 1, *preset, &error); if(error != NULL){ g_warning("%s", error->message); } /* fill ffplayer->preset */ while(*preset != NULL){ gtk_combo_box_text_append_text(ffplayer->preset, *preset); preset++; } /* Get the first iter in the list */ selected = xmlGetProp(node, "preset"); list_store = gtk_combo_box_get_model((GtkComboBox *) ffplayer->preset); if(gtk_tree_model_get_iter_first(list_store, &iter)){ do{ gchar *str; gtk_tree_model_get(list_store, &iter, 0, &str, -1); if(!g_strcmp0(selected, str)){ break; } }while(gtk_tree_model_iter_next(list_store, &iter)); gtk_combo_box_set_active_iter(GTK_COMBO_BOX(ffplayer->preset), &iter); } /* select first instrument */ ipatch->nth_level = 2; instrument = ags_playable_sublevel_names(playable); error = NULL; ags_playable_level_select(playable, 2, *instrument, &error); if(error != NULL){ g_warning("%s", error->message); } /* fill ffplayer->instrument */ while(*instrument != NULL){ gtk_combo_box_text_append_text(ffplayer->instrument, *instrument); instrument++; } /* Get the first iter in the list */ selected = xmlGetProp(node, "instrument"); list_store = gtk_combo_box_get_model((GtkComboBox *) ffplayer->instrument); if(gtk_tree_model_get_iter_first(list_store, &iter)){ do{ gchar *str; gtk_tree_model_get(list_store, &iter, 0, &str, -1); if(!g_strcmp0(selected, str)){ break; } }while(gtk_tree_model_iter_next(list_store, &iter)); gtk_combo_box_set_active_iter(GTK_COMBO_BOX(ffplayer->instrument), &iter); } } } xmlNode* ags_ffplayer_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFFPlayer *ffplayer; xmlNode *node; gchar *id; ffplayer = AGS_FFPLAYER(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-ffplayer"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", ffplayer, NULL)); if(ffplayer->ipatch != NULL && ffplayer->ipatch->filename != NULL){ xmlNewProp(node, "filename", g_strdup(ffplayer->ipatch->filename)); xmlNewProp(node, "preset", g_strdup(gtk_combo_box_text_get_active_text((GtkComboBoxText *) ffplayer->preset))); xmlNewProp(node, "instrument", g_strdup(gtk_combo_box_text_get_active_text((GtkComboBoxText *) ffplayer->instrument))); } xmlAddChild(parent, node); return(node); } void ags_ffplayer_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { AgsAudio *audio; AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; guint input_pads; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); /* */ if(audio_channels > audio_channels_old){ /* map dependending on output */ str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* ags-envelope */ ags_recall_factory_create(audio, NULL, NULL, "ags-envelope", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-stream */ if(!rt_safe){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); }else{ ags_recall_factory_create(audio, NULL, NULL, "ags-rt-stream", audio_channels_old, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* AgsOutput */ /* ags-stream */ if(!performance_mode){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", audio_channels_old, audio_channels, 0, audio->output_pads, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); } } } void ags_ffplayer_resize_pads(AgsMachine *machine, GType type, guint pads, guint pads_old, gpointer data) { AgsFFPlayer *ffplayer; AgsAudio *audio; AgsMutexManager *mutex_manager; guint output_pads, input_pads; gboolean grow; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(pads_old == pads){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); ffplayer = machine; audio = machine->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output_pads = audio->output_pads; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); /* check grow */ if(pads_old < pads){ grow = TRUE; }else{ grow = FALSE; } if(type == AGS_TYPE_INPUT){ if(grow){ /* depending on destination */ ags_ffplayer_input_map_recall(ffplayer, pads_old); }else{ ffplayer->mapped_input_pad = input_pads; } }else{ if(grow){ /* depending on destination */ ags_ffplayer_output_map_recall(ffplayer, pads_old); }else{ ffplayer->mapped_output_pad = output_pads; } } } void ags_ffplayer_input_map_recall(AgsFFPlayer *ffplayer, guint input_pad_start) { AgsAudio *audio; AgsChannel *source, *current; AgsMutexManager *mutex_manager; AgsConfig *config; GList *list; gchar *str; guint input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(ffplayer->mapped_input_pad > input_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(ffplayer)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } /* remap for input */ if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } /* ags-play */ ags_recall_factory_create(audio, NULL, NULL, "ags-play", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* ags-feed */ ags_recall_factory_create(audio, NULL, NULL, "ags-feed", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-envelope */ ags_recall_factory_create(audio, NULL, NULL, "ags-envelope", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* ags-stream */ if(!rt_safe){ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); }else{ ags_recall_factory_create(audio, NULL, NULL, "ags-rt-stream", 0, audio_channels, input_pad_start, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } ffplayer->mapped_input_pad = input_pads; } void ags_ffplayer_output_map_recall(AgsFFPlayer *ffplayer, guint output_pad_start) { AgsAudio *audio; AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; guint output_pads, input_pads; guint audio_channels; gboolean rt_safe; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(ffplayer->mapped_output_pad > output_pad_start){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); audio = AGS_MACHINE(ffplayer)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output_pads = audio->output_pads; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* map dependending on output */ rt_safe = TRUE; performance_mode = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); if(str != NULL && !g_ascii_strncasecmp(str, "FALSE", 6)){ rt_safe = FALSE; } str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } /* remap for input */ if(rt_safe || performance_mode){ /* ags-copy */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy", 0, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); /* set performance mode */ performance_mode = TRUE; }else{ /* ags-buffer */ ags_recall_factory_create(audio, NULL, NULL, "ags-buffer", 0, audio_channels, 0, input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_RECALL | AGS_RECALL_FACTORY_ADD), 0); } if(!performance_mode){ /* ags-stream */ ags_recall_factory_create(audio, NULL, NULL, "ags-stream", 0, audio_channels, output_pad_start, output_pads, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); } ffplayer->mapped_output_pad = output_pads; } void ags_ffplayer_paint(AgsFFPlayer *ffplayer) { GtkWidget *widget; GtkStyle *ffplayer_style; cairo_t *cr; double semi_key_height; guint bitmap; guint x[2]; guint i, i_stop, j, j0; static const gdouble white_gc = 65535.0; widget = (GtkWidget *) ffplayer->drawing_area; ffplayer_style = gtk_widget_get_style(widget); semi_key_height = 2.0 / 3.0 * (double) ffplayer->control_height; bitmap = 0x52a52a; // description of the keyboard j = (guint) ceil(ffplayer->hadjustment->value / (double) ffplayer->control_width); j = j % 12; x[0] = (guint) round(ffplayer->hadjustment->value) % ffplayer->control_width; if(x[0] != 0){ x[0] = ffplayer->control_width - x[0]; } x[1] = ((guint) widget->allocation.width - x[0]) % ffplayer->control_width; i_stop = (widget->allocation.width - x[0] - x[1]) / ffplayer->control_width; cr = gdk_cairo_create(widget->window); /* clear with background color */ cairo_set_source_rgb(cr, ffplayer_style->bg[0].red / white_gc, ffplayer_style->bg[0].green / white_gc, ffplayer_style->bg[0].blue / white_gc); cairo_rectangle(cr, 0.0, 0.0, (double) widget->allocation.width, (double) widget->allocation.height); cairo_fill(cr); /* draw piano */ cairo_set_line_width(cr, 1.0); cairo_set_source_rgb(cr, ffplayer_style->fg[0].red / white_gc, ffplayer_style->fg[0].green / white_gc, ffplayer_style->fg[0].blue / white_gc); if(x[0] != 0){ j0 = (j != 0) ? j -1: 11; if(((1 << j0) & bitmap) != 0){ cairo_rectangle(cr, 0.0, 0.0, x[0], (double) semi_key_height); cairo_fill(cr); if(x[0] > ffplayer->control_width / 2){ cairo_move_to(cr, (double) (x[0] - ffplayer->control_width / 2), semi_key_height); cairo_line_to(cr, (double) (x[0] - ffplayer->control_width / 2), (double) ffplayer->control_height); cairo_stroke(cr); } cairo_move_to(cr, 0.0, ffplayer->control_height); cairo_line_to(cr, (double) x[0], ffplayer->control_height); cairo_stroke(cr); }else{ if(((1 << (j0 + 1)) & bitmap) == 0){ cairo_move_to(cr, (double) x[0], 0.0); cairo_line_to(cr, (double) x[0], ffplayer->control_height); cairo_stroke(cr); } cairo_move_to(cr, 0.0, ffplayer->control_height); cairo_line_to(cr, (double) x[0], ffplayer->control_height); cairo_stroke(cr); } } for(i = 0; i < i_stop; i++){ if(((1 << j) & bitmap) != 0){ // draw semi tone key cairo_rectangle(cr, (double) (i * ffplayer->control_width + x[0]), 0.0, (double) ffplayer->control_width, semi_key_height); cairo_fill(cr); cairo_move_to(cr, (double) (i * ffplayer->control_width + x[0] + ffplayer->control_width / 2), semi_key_height); cairo_line_to(cr, (double) (i * ffplayer->control_width + x[0] + ffplayer->control_width / 2), ffplayer->control_height); cairo_stroke(cr); cairo_move_to(cr, (double) (i * ffplayer->control_width + x[0]), ffplayer->control_height); cairo_line_to(cr, (double) (i * ffplayer->control_width + x[0] + ffplayer->control_width), ffplayer->control_height); cairo_stroke(cr); }else{ // no semi tone key if(((1 << (j + 1)) & bitmap) == 0){ cairo_move_to(cr, (double) (i * ffplayer->control_width + x[0] + ffplayer->control_width), 0.0); cairo_line_to(cr, (double) (i * ffplayer->control_width + x[0] + ffplayer->control_width), ffplayer->control_height); cairo_stroke(cr); } cairo_move_to(cr, (double) (i * ffplayer->control_width + x[0]), ffplayer->control_height); cairo_line_to(cr, (double) (i * ffplayer->control_width + x[0] + ffplayer->control_width), ffplayer->control_height); cairo_stroke(cr); } if(j == 11) j = 0; else j++; } if(x[1] != 0){ j0 = j; if(((1 << j0) & bitmap) != 0){ cairo_rectangle(cr, (double) (widget->allocation.width - x[1]), 0.0, (double) x[1], semi_key_height); cairo_fill(cr); if(x[1] > ffplayer->control_width / 2){ cairo_move_to(cr, (double) (widget->allocation.width - x[1] + ffplayer->control_width / 2), semi_key_height); cairo_line_to(cr, (double) (widget->allocation.width - x[1] + ffplayer->control_width / 2), ffplayer->control_height); cairo_stroke(cr); } cairo_move_to(cr, (double) (widget->allocation.width - x[1]), ffplayer->control_height); cairo_line_to(cr, (double) widget->allocation.width, ffplayer->control_height); cairo_stroke(cr); }else{ cairo_move_to(cr, (double) (widget->allocation.width - x[1]), ffplayer->control_height); cairo_line_to(cr, (double) widget->allocation.width, ffplayer->control_height); cairo_stroke(cr); } } cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_ffplayer_open_filename(AgsFFPlayer *ffplayer, gchar *filename) { if(filename == NULL){ return; } if(g_str_has_suffix(filename, ".sf2")){ AgsWindow *window; AgsIpatch *ipatch; AgsPlayable *playable; GError *error; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) ffplayer); /* clear preset and instrument */ gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(ffplayer->preset)))); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(ffplayer->instrument)))); /* Ipatch related */ ipatch = g_object_new(AGS_TYPE_IPATCH, "mode", AGS_IPATCH_READ, "filename", filename, NULL); ffplayer->ipatch = ipatch; ipatch->soundcard = window->soundcard; playable = AGS_PLAYABLE(ipatch); error = NULL; ags_playable_level_select(playable, 0, filename, &error); ags_ffplayer_load_preset(ffplayer); ags_ffplayer_load_instrument(ffplayer); } } void ags_ffplayer_load_preset(AgsFFPlayer *ffplayer) { AgsPlayable *playable; gchar **preset; GError *error; playable = AGS_PLAYABLE(ffplayer->ipatch); /* select first preset */ ffplayer->ipatch->nth_level = 1; preset = ags_playable_sublevel_names(playable); error = NULL; ags_playable_level_select(playable, 1, *preset, &error); /* fill ffplayer->preset */ while(preset != NULL && preset[0] != NULL){ gtk_combo_box_text_append_text(ffplayer->preset, *preset); preset++; } } void ags_ffplayer_load_instrument(AgsFFPlayer *ffplayer) { AgsPlayable *playable; gchar **instrument; GError *error; playable = AGS_PLAYABLE(ffplayer->ipatch); ffplayer->ipatch->nth_level = 2; instrument = ags_playable_sublevel_names(playable); error = NULL; ags_playable_level_select(playable, 2, *instrument, &error); /* fill ffplayer->instrument */ while(instrument != NULL && instrument[0] != NULL){ gtk_combo_box_text_append_text(ffplayer->instrument, *instrument); instrument++; } } /** * ags_ffplayer_new: * @soundcard: the assigned soundcard. * * Creates an #AgsFFPlayer * * Returns: a new #AgsFFPlayer * * Since: 1.0.0 */ AgsFFPlayer* ags_ffplayer_new(GObject *soundcard) { AgsFFPlayer *ffplayer; GValue value = {0,}; ffplayer = (AgsFFPlayer *) g_object_new(AGS_TYPE_FFPLAYER, NULL); if(soundcard != NULL){ g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, soundcard); g_object_set_property(G_OBJECT(ffplayer->machine.audio), "soundcard", &value); g_value_unset(&value); } return(ffplayer); } gsequencer-1.4.24/ags/X/machine/ags_synth_input_pad.h0000644000175000017500000000405613247044247017500 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SYNTH_INPUT_PAD_H__ #define __AGS_SYNTH_INPUT_PAD_H__ #include #include #include #include #include #include #include #define AGS_TYPE_SYNTH_INPUT_PAD (ags_synth_input_pad_get_type()) #define AGS_SYNTH_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SYNTH_INPUT_PAD, AgsSynthInputPad)) #define AGS_SYNTH_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SYNTH_INPUT_PAD, AgsSynthInputPadClass)) #define AGS_IS_SYNTH_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SYNTH_INPUT_PAD)) #define AGS_IS_SYNTH_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SYNTH_INPUT_PAD)) #define AGS_SYNTH_INPUT_PAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SYNTH_INPUT_PAD, AgsSynthInputPadClass)) typedef struct _AgsSynthInputPad AgsSynthInputPad; typedef struct _AgsSynthInputPadClass AgsSynthInputPadClass; struct _AgsSynthInputPad { AgsPad pad; gchar *name; gchar *xml_type; }; struct _AgsSynthInputPadClass { AgsPadClass pad; }; GType ags_synth_input_pad_get_type(); AgsSynthInputPad* ags_synth_input_pad_new(AgsChannel *channel); #endif /*__AGS_SYNTH_INPUT_PAD_H__*/ gsequencer-1.4.24/ags/X/machine/ags_mixer_input_line.h0000644000175000017500000000405413247044247017640 00000000000000/* 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 . */ #ifndef __AGS_MIXER_INPUT_LINE_H__ #define __AGS_MIXER_INPUT_LINE_H__ #include #include #include #include #include #include #include #define AGS_TYPE_MIXER_INPUT_LINE (ags_mixer_input_line_get_type()) #define AGS_MIXER_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIXER_INPUT_LINE, AgsMixerInputLine)) #define AGS_MIXER_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_MIXER_INPUT_LINE, AgsMixerInputLineClass)) #define AGS_IS_MIXER_INPUT_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MIXER_INPUT_LINE)) #define AGS_IS_MIXER_INPUT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MIXER_INPUT_LINE)) #define AGS_MIXER_INPUT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_MIXER_INPUT_LINE, AgsMixerInputLineClass)) typedef struct _AgsMixerInputLine AgsMixerInputLine; typedef struct _AgsMixerInputLineClass AgsMixerInputLineClass; struct _AgsMixerInputLine { AgsLine line; }; struct _AgsMixerInputLineClass { AgsLineClass line; }; GType ags_mixer_input_line_get_type(); AgsMixerInputLine* ags_mixer_input_line_new(AgsChannel *channel); #endif /*__AGS_MIXER_INPUT_LINE_H__*/ gsequencer-1.4.24/ags/X/machine/ags_matrix_bulk_input_callbacks.c0000644000175000017500000000147513246707333022025 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/machine/ags_ffplayer_input_line_callbacks.h0000644000175000017500000000222213247044247022316 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_FFPLAYER_INPUT_LINE_CALLBACKS_H__ #define __AGS_FFPLAYER_INPUT_LINE_CALLBACKS_H__ #include #include #include #include void ags_ffplayer_input_line_notify_channel_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data); #endif /*__AGS_FFPLAYER_INPUT_LINE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_lv2_bridge_callbacks.h0000644000175000017500000000462113247044247020304 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LV2_BRIDGE_CALLBACKS_H__ #define __AGS_LV2_BRIDGE_CALLBACKS_H__ #include #include #include #include #include #include void ags_lv2_bridge_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_show_gui_callback(GtkMenuItem *item, AgsLv2Bridge *lv2_bridge); gboolean ags_lv2_bridge_delete_event_callback(GtkWidget *widget, GdkEvent *event, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_lv2ui_cleanup_function(LV2UI_Handle handle); void ags_lv2_bridge_lv2ui_write_function(LV2UI_Controller controller, uint32_t port_index, uint32_t buffer_size, uint32_t port_protocol, const void *buffer); void ags_lv2_bridge_program_changed_callback(GtkComboBox *combo_box, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_preset_changed_callback(GtkComboBox *combo_box, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_dial_changed_callback(GtkWidget *dial, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_vscale_changed_callback(GtkWidget *vscale, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_hscale_changed_callback(GtkWidget *hscale, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_spin_button_changed_callback(GtkWidget *spin_button, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_check_button_clicked_callback(GtkWidget *check_button, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_toggle_button_clicked_callback(GtkWidget *toggle_button, AgsLv2Bridge *lv2_bridge); void ags_lv2_bridge_button_clicked_callback(GtkWidget *button, AgsLv2Bridge *lv2_bridge); #endif /*__AGS_LV2_BRIDGE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_oscillator_callbacks.h0000644000175000017500000000316113247044247020436 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OSCILLATOR_CALLBACKS_H__ #define __AGS_OSCILLATOR_CALLBACKS_H__ #include #include #include #include void ags_oscillator_wave_callback(GtkComboBox *combo, AgsOscillator *oscillator); void ags_oscillator_attack_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator); void ags_oscillator_frame_count_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator); void ags_oscillator_frequency_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator); void ags_oscillator_phase_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator); void ags_oscillator_volume_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator); void ags_oscillator_sync_point_callback(GtkSpinButton *spin_button, AgsOscillator *oscillator); #endif /*__AGS_OSCILLATOR_CALLBACKS_H__ */ gsequencer-1.4.24/ags/X/machine/ags_mixer_callbacks.h0000644000175000017500000000206713247044247017413 00000000000000/* 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 . */ #ifndef __AGS_MIXER_CALLBACKS_H__ #define __AGS_MIXER_CALLBACKS_H__ #include #include #include #include void ags_mixer_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsMixer *mixer); #endif /*__AGS_MIXER_CALLBACKS_H__ */ gsequencer-1.4.24/ags/X/machine/ags_matrix_callbacks.h0000644000175000017500000000400313247044247017563 00000000000000/* 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 . */ #ifndef __AGS_MATRIX_CALLBACKS_H__ #define __AGS_MATRIX_CALLBACKS_H__ #include #include #include #include #include #include #include void ags_matrix_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsMatrix *matrix); /* controls */ void ags_matrix_index_callback(GtkWidget *widget, AgsMatrix *matrix); gboolean ags_matrix_drawing_area_configure_callback(GtkWidget *widget, GdkEventConfigure *event, AgsMatrix *matrix); gboolean ags_matrix_drawing_area_expose_callback(GtkWidget *widget, GdkEventExpose *event, AgsMatrix *matrix); gboolean ags_matrix_drawing_area_button_press_callback(GtkWidget *widget, GdkEventButton *event, AgsMatrix *matrix); void ags_matrix_adjustment_value_changed_callback(GtkWidget *widget, AgsMatrix *matrix); void ags_matrix_bpm_callback(GtkWidget *spin_button, AgsMatrix *matrix); void ags_matrix_length_spin_callback(GtkWidget *spin_button, AgsMatrix *matrix); void ags_matrix_loop_button_callback(GtkWidget *button, AgsMatrix *matrix); /* forwarded callbacks */ void ags_matrix_done_callback(AgsMatrix *matrix, AgsRecallID *recall_id, gpointer data); #endif /*__AGS_MATRIX_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/machine/ags_drum_output_pad_callbacks.c0000644000175000017500000000154013246707333021471 00000000000000/* 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 . */ #include #include gsequencer-1.4.24/ags/X/machine/ags_pattern_box_callbacks.c0000644000175000017500000002617013247044247020610 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include gboolean ags_pattern_box_focus_in_callback(GtkWidget *widget, GdkEvent *event, AgsPatternBox *pattern_box) { GList *list; list = gtk_container_get_children((GtkContainer *) pattern_box->pattern); gtk_widget_set_state((GtkWidget *) g_list_nth_data(list, pattern_box->cursor_x), GTK_STATE_PRELIGHT); g_list_free(list); return(TRUE); } gboolean ags_pattern_box_focus_out_callback(GtkWidget *widget, GdkEvent *event, AgsPatternBox *pattern_box) { GList *list; list = gtk_container_get_children((GtkContainer *) pattern_box->pattern); if(!gtk_toggle_button_get_active((GtkToggleButton *) g_list_nth_data(list, pattern_box->cursor_x - 1))){ gtk_widget_set_state((GtkWidget *) g_list_nth_data(list, pattern_box->cursor_x), GTK_STATE_NORMAL); }else{ gtk_widget_set_state((GtkWidget *) g_list_nth_data(list, pattern_box->cursor_x), GTK_STATE_ACTIVE); } g_list_free(list); return(TRUE); } void ags_pattern_box_pad_callback(GtkWidget *toggle_button, AgsPatternBox *pattern_box) { AgsWindow *window; AgsMachine *machine; AgsLine *selected_line; AgsPattern *pattern; AgsMutexManager *mutex_manager; GList *list, *list_start; GList *line, *line_start; GList *tasks; guint i, index0, index1, offset; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) pattern_box, AGS_TYPE_MACHINE); if(machine->selected_input_pad == NULL){ return; } /* */ if((AGS_PATTERN_BOX_BLOCK_PATTERN & (pattern_box->flags)) != 0){ #ifdef AGS_DEBUG g_message("AgsPatternBox pattern is blocked\n"); #endif return; } window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* calculate offset */ list_start = list = gtk_container_get_children((GtkContainer *) pattern_box->pattern); for(i = 0; i < pattern_box->n_controls && toggle_button != list->data; i++){ list = list->next; } offset = i; g_list_free(list_start); /* retrieve indices */ index0 = machine->bank_0; index1 = machine->bank_1; /* calculate offset / page */ list_start = list = gtk_container_get_children((GtkContainer *) pattern_box->offset); for(i = 0; i < 4 && !GTK_TOGGLE_BUTTON(list->data)->active; i++){ list = list->next; } offset += (i * pattern_box->n_controls); g_list_free(list_start); /**/ line_start = line = gtk_container_get_children(GTK_CONTAINER(AGS_PAD(machine->selected_input_pad)->expander_set)); tasks = NULL; while((line = ags_line_find_next_grouped(line)) != NULL){ selected_line = AGS_LINE(line->data); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) selected_line->channel); pthread_mutex_unlock(application_mutex); /* toggle */ pthread_mutex_lock(channel_mutex); ags_pattern_toggle_bit(selected_line->channel->pattern->data, index0, index1, offset); pthread_mutex_unlock(channel_mutex); line = line->next; } g_list_free(line_start); } void ags_pattern_box_offset_callback(GtkWidget *widget, AgsPatternBox *pattern_box) { ags_pattern_box_set_pattern(pattern_box); } gboolean ags_pattern_box_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsPatternBox *pattern_box) { if(event->keyval == GDK_KEY_Tab){ return(FALSE); } switch(event->keyval){ case GDK_KEY_Control_L: { pattern_box->key_mask |= AGS_PATTERN_BOX_KEY_L_CONTROL; } break; case GDK_KEY_Control_R: { pattern_box->key_mask |= AGS_PATTERN_BOX_KEY_R_CONTROL; } break; case GDK_KEY_c: { /* copy notes */ if((AGS_PATTERN_BOX_KEY_L_CONTROL & (pattern_box->key_mask)) != 0 || (AGS_PATTERN_BOX_KEY_R_CONTROL & (pattern_box->key_mask)) != 0){ AgsMachine *machine; machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) pattern_box, AGS_TYPE_MACHINE); ags_machine_copy_pattern(machine); } } break; } return(TRUE); } gboolean ags_pattern_box_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsPatternBox *pattern_box) { AgsWindow *window; AgsMachine *machine; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; if(event->keyval == GDK_KEY_Tab){ return(FALSE); } machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) pattern_box, AGS_TYPE_MACHINE); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); switch(event->keyval){ case GDK_KEY_Control_L: { pattern_box->key_mask &= (~AGS_PATTERN_BOX_KEY_L_CONTROL); } break; case GDK_KEY_Control_R: { pattern_box->key_mask &= (~AGS_PATTERN_BOX_KEY_R_CONTROL); } break; case GDK_KEY_Left: case GDK_KEY_leftarrow: { if(pattern_box->cursor_x > 0){ GList *list; pattern_box->cursor_x -= 1; list = gtk_container_get_children((GtkContainer *) pattern_box->pattern); gtk_widget_set_state((GtkWidget *) g_list_nth_data(list, pattern_box->cursor_x), GTK_STATE_PRELIGHT); if(!gtk_toggle_button_get_active((GtkToggleButton *) g_list_nth_data(list, pattern_box->cursor_x + 1))){ gtk_widget_set_state((GtkWidget *) g_list_nth_data(list, pattern_box->cursor_x + 1), GTK_STATE_NORMAL); }else{ gtk_widget_set_state((GtkWidget *) g_list_nth_data(list, pattern_box->cursor_x + 1), GTK_STATE_ACTIVE); } if(gtk_toggle_button_get_active((GtkToggleButton *) g_list_nth_data(list, pattern_box->cursor_y * pattern_box->n_controls + pattern_box->cursor_x))){ /* give audible feedback */ ags_pad_play((AgsPad *) machine->selected_input_pad); } g_list_free(list); } } break; case GDK_KEY_Right: case GDK_KEY_rightarrow: { if(pattern_box->cursor_x + 1 < pattern_box->n_controls){ GList *list; pattern_box->cursor_x += 1; list = gtk_container_get_children((GtkContainer *) pattern_box->pattern); gtk_widget_set_state((GtkWidget *) g_list_nth_data(list, pattern_box->cursor_x), GTK_STATE_PRELIGHT); if(!gtk_toggle_button_get_active((GtkToggleButton *) g_list_nth_data(list, pattern_box->cursor_x - 1))){ gtk_widget_set_state((GtkWidget *) g_list_nth_data(list, pattern_box->cursor_x - 1), GTK_STATE_NORMAL); }else{ gtk_widget_set_state((GtkWidget *) g_list_nth_data(list, pattern_box->cursor_x - 1), GTK_STATE_ACTIVE); } if(gtk_toggle_button_get_active((GtkToggleButton *) g_list_nth_data(list, pattern_box->cursor_y * pattern_box->n_controls + pattern_box->cursor_x))){ /* give audible feedback */ ags_pad_play((AgsPad *) machine->selected_input_pad); } g_list_free(list); } } break; case GDK_KEY_Up: case GDK_KEY_uparrow: { if(pattern_box->cursor_y > 0){ GList *list, *pad; pattern_box->cursor_y -= 1; list = gtk_container_get_children((GtkContainer *) pattern_box->offset); gtk_button_clicked(g_list_nth_data(list, pattern_box->cursor_y)); g_list_free(list); /* give audible feedback */ pad = gtk_container_get_children((GtkContainer *) pattern_box->pattern); if(gtk_toggle_button_get_active((GtkToggleButton *) g_list_nth_data(pad, pattern_box->cursor_y * pattern_box->n_controls + pattern_box->cursor_x))){ ags_pad_play((AgsPad *) machine->selected_input_pad); } } } break; case GDK_KEY_Down: case GDK_KEY_downarrow: { if(pattern_box->cursor_y + 1 < pattern_box->n_indices){ GList *list, *pad; list = gtk_container_get_children((GtkContainer *) pattern_box->offset); pattern_box->cursor_y += 1; gtk_button_clicked(g_list_nth_data(list, pattern_box->cursor_y)); g_list_free(list); /* give audible feedback */ pad = gtk_container_get_children((GtkContainer *) pattern_box->pattern); if(gtk_toggle_button_get_active((GtkToggleButton *) g_list_nth_data(pad, pattern_box->cursor_y * pattern_box->n_controls + pattern_box->cursor_x))){ ags_pad_play((AgsPad *) machine->selected_input_pad); } } } break; case GDK_KEY_space: { AgsLine *selected_line; AgsChannel *channel; GList *line, *line_start; GList *tasks; guint i, j; guint offset; guint index0, index1; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); i = pattern_box->cursor_y; j = pattern_box->cursor_x; offset = (i * pattern_box->n_controls) + j; index0 = machine->bank_0; index1 = machine->bank_1; line_start = line = gtk_container_get_children(GTK_CONTAINER(AGS_PAD(machine->selected_input_pad)->expander_set)); tasks = NULL; while((line = ags_line_find_next_grouped(line)) != NULL){ selected_line = AGS_LINE(line->data); channel = selected_line->channel; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* toggle pattern */ pthread_mutex_lock(channel_mutex); ags_pattern_toggle_bit(channel->pattern->data, index0, index1, offset); pthread_mutex_unlock(channel_mutex); line = line->next; } g_list_free(line_start); /* give audible feedback */ ags_pad_play((AgsPad *) machine->selected_input_pad); } break; } return(TRUE); } gsequencer-1.4.24/ags/X/machine/ags_mixer_input_pad.h0000644000175000017500000000401313247044247017450 00000000000000/* 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 . */ #ifndef __AGS_MIXER_INPUT_PAD_H__ #define __AGS_MIXER_INPUT_PAD_H__ #include #include #include #include #include #include #include #define AGS_TYPE_MIXER_INPUT_PAD (ags_mixer_input_pad_get_type()) #define AGS_MIXER_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIXER_INPUT_PAD, AgsMixerInputPad)) #define AGS_MIXER_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_MIXER_INPUT_PAD, AgsMixerInputPadClass)) #define AGS_IS_MIXER_INPUT_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MIXER_INPUT_PAD)) #define AGS_IS_MIXER_INPUT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MIXER_INPUT_PAD)) #define AGS_MIXER_INPUT_PAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_MIXER_INPUT_PAD, AgsMixerInputPadClass)) typedef struct _AgsMixerInputPad AgsMixerInputPad; typedef struct _AgsMixerInputPadClass AgsMixerInputPadClass; struct _AgsMixerInputPad { AgsPad pad; }; struct _AgsMixerInputPadClass { AgsPadClass pad; }; GType ags_mixer_input_pad_get_type(); AgsMixerInputPad* ags_mixer_input_pad_new(AgsChannel *channel); #endif /*__AGS_MIXER_INPUT_PAD_H__*/ gsequencer-1.4.24/ags/X/machine/ags_ffplayer_callbacks.h0000644000175000017500000000370613247044247020100 00000000000000/* 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 . */ #ifndef __AGS_FFPLAYER_CALLBACKS_H__ #define __AGS_FFPLAYER_CALLBACKS_H__ #include #include #include #include void ags_ffplayer_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsFFPlayer *ffplayer); void ags_ffplayer_destroy_callback(GtkWidget *widget, AgsFFPlayer *ffplayer); void ags_ffplayer_open_clicked_callback(GtkWidget *widget, AgsFFPlayer *ffplayer); void ags_ffplayer_open_dialog_response_callback(GtkWidget *widget, gint response, AgsMachine *machine); void ags_ffplayer_preset_changed_callback(GtkComboBox *preset, AgsFFPlayer *ffplayer); void ags_ffplayer_instrument_changed_callback(GtkComboBox *instrument, AgsFFPlayer *ffplayer); gboolean ags_ffplayer_drawing_area_expose_callback(GtkWidget *widget, GdkEventExpose *event, AgsFFPlayer *ffplayer); gboolean ags_ffplayer_drawing_area_configure_callback(GtkWidget *widget, GdkEventConfigure *event, AgsFFPlayer *ffplayer); gboolean ags_ffplayer_drawing_area_button_press_callback(GtkWidget *widget, AgsFFPlayer *ffplayer); void ags_ffplayer_hscrollbar_value_changed(GtkAdjustment *adjustment, AgsFFPlayer *ffplayer); #endif /*__AGS_FFPLAYER_CALLBACKS_H__ */ gsequencer-1.4.24/ags/X/machine/ags_mixer_input_pad.c0000644000175000017500000001210313247044247017442 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_mixer_input_pad_class_init(AgsMixerInputPadClass *mixer_input_pad); void ags_mixer_input_pad_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mixer_input_pad_init(AgsMixerInputPad *mixer_input_pad); void ags_mixer_input_pad_destroy(GtkObject *object); void ags_mixer_input_pad_connect(AgsConnectable *connectable); void ags_mixer_input_pad_disconnect(AgsConnectable *connectable); void ags_mixer_input_pad_set_channel(AgsPad *pad, AgsChannel *channel); void ags_mixer_input_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old); /** * SECTION:ags_mixer_input_pad * @short_description: mixer input pad * @title: AgsMixerInputPad * @section_id: * @include: ags/X/machine/ags_mixer_input_pad.h * * The #AgsMixerInputPad is a composite widget to act as mixer input pad. */ static gpointer ags_mixer_input_pad_parent_class = NULL; static AgsConnectableInterface *ags_mixer_input_pad_parent_connectable_interface; GType ags_mixer_input_pad_get_type() { static GType ags_type_mixer_input_pad = 0; if(!ags_type_mixer_input_pad){ static const GTypeInfo ags_mixer_input_pad_info = { sizeof(AgsMixerInputPadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mixer_input_pad_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsMixerInputPad), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mixer_input_pad_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mixer_input_pad_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mixer_input_pad = g_type_register_static(AGS_TYPE_PAD, "AgsMixerInputPad", &ags_mixer_input_pad_info, 0); g_type_add_interface_static(ags_type_mixer_input_pad, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_mixer_input_pad); } void ags_mixer_input_pad_class_init(AgsMixerInputPadClass *mixer_input_pad) { AgsPadClass *pad; ags_mixer_input_pad_parent_class = g_type_class_peek_parent(mixer_input_pad); pad = (AgsPadClass *) mixer_input_pad; pad->set_channel = ags_mixer_input_pad_set_channel; pad->resize_lines = ags_mixer_input_pad_resize_lines; } void ags_mixer_input_pad_connectable_interface_init(AgsConnectableInterface *connectable) { ags_mixer_input_pad_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_mixer_input_pad_connect; connectable->disconnect = ags_mixer_input_pad_disconnect; } void ags_mixer_input_pad_init(AgsMixerInputPad *mixer_input_pad) { } void ags_mixer_input_pad_connect(AgsConnectable *connectable) { AgsMixerInputPad *mixer_input_pad; /* AgsMixerInputPad */ mixer_input_pad = AGS_MIXER_INPUT_PAD(connectable); if((AGS_PAD_CONNECTED & (AGS_PAD(mixer_input_pad)->flags)) != 0){ return; } ags_mixer_input_pad_parent_connectable_interface->connect(connectable); } void ags_mixer_input_pad_disconnect(AgsConnectable *connectable) { ags_mixer_input_pad_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_mixer_input_pad_destroy(GtkObject *object) { /* empty */ } void ags_mixer_input_pad_set_channel(AgsPad *pad, AgsChannel *channel) { AGS_PAD_CLASS(ags_mixer_input_pad_parent_class)->set_channel(pad, channel); /* empty */ } void ags_mixer_input_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old) { AGS_PAD_CLASS(ags_mixer_input_pad_parent_class)->resize_lines(pad, line_type, audio_channels, audio_channels_old); /* empty */ } /** * ags_mixer_input_pad_new: * @channel: the assigned channel * * Creates an #AgsMixerInputPad * * Returns: a new #AgsMixerInputPad * * Since: 1.0.0 */ AgsMixerInputPad* ags_mixer_input_pad_new(AgsChannel *channel) { AgsMixerInputPad *mixer_input_pad; mixer_input_pad = (AgsMixerInputPad *) g_object_new(AGS_TYPE_MIXER_INPUT_PAD, "channel", channel, NULL); return(mixer_input_pad); } gsequencer-1.4.24/ags/X/machine/ags_oscillator.h0000644000175000017500000000522213247044247016437 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OSCILLATOR_H__ #define __AGS_OSCILLATOR_H__ #include #include #include #include #include #include #include #define AGS_TYPE_OSCILLATOR (ags_oscillator_get_type()) #define AGS_OSCILLATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_OSCILLATOR, AgsOscillator)) #define AGS_OSCILLATOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_OSCILLATOR, AgsOscillatorClass)) #define AGS_IS_OSCILLATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_OSCILLATOR)) #define AGS_IS_OSCILLATOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_OSCILLATOR)) #define AGS_OSCILLATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_OSCILLATOR, AgsOscillatorClass)) #define AGS_OSCILLATOR_DEFAULT_FRAME_COUNT (44100.0 / 27.5) #define AGS_OSCILLATOR_DEFAULT_SYNC_POINT_COUNT (3) typedef struct _AgsOscillator AgsOscillator; typedef struct _AgsOscillatorClass AgsOscillatorClass; typedef enum{ AGS_OSCILLATOR_CONNECTED = 1, }AgsOscillatorFlags; struct _AgsOscillator { GtkFrame frame; guint flags; GtkComboBox *wave; gulong wave_handler; GtkSpinButton *attack; GtkSpinButton *frame_count; GtkSpinButton *frequency; GtkSpinButton *phase; GtkSpinButton *volume; GtkCheckButton *do_sync; GtkSpinButton **sync_point; guint sync_point_count; }; struct _AgsOscillatorClass { GtkFrameClass frame; void (*control_changed)(AgsOscillator *oscillator); }; GType ags_oscillator_get_type(void); void ags_file_read_oscillator(AgsFile *file, xmlNode *node, AgsOscillator **oscillator); xmlNode* ags_file_write_oscillator(AgsFile *file, xmlNode *parent, AgsOscillator *oscillator); void ags_oscillator_control_changed(AgsOscillator *oscillator); AgsOscillator* ags_oscillator_new(); #endif /*__AGS_OSCILLATOR_H__*/ gsequencer-1.4.24/ags/X/machine/ags_matrix_bulk_input.c0000644000175000017500000001311513247044247020017 00000000000000/* 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 . */ #include #include #include #include #include void ags_matrix_bulk_input_class_init(AgsMatrixBulkInputClass *matrix_bulk_input); void ags_matrix_bulk_input_connectable_interface_init(AgsConnectableInterface *connectable); void ags_matrix_bulk_input_plugin_interface_init(AgsPluginInterface *plugin); void ags_matrix_bulk_input_init(AgsMatrixBulkInput *matrix_bulk_input); void ags_matrix_bulk_input_connect(AgsConnectable *connectable); void ags_matrix_bulk_input_disconnect(AgsConnectable *connectable); void ags_matrix_bulk_input_finalize(GObject *gobject); /** * SECTION:ags_matrix_bulk_input * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsMatrixBulkInput * @section_id: * @include: ags/X/machine/ags_matrix_bulk_input.h * * #AgsMatrixBulkInput is a composite widget to visualize one #AgsChannel. It should be * packed by an #AgsMatrixBulkInput. */ static gpointer ags_matrix_bulk_input_parent_class = NULL; static AgsConnectableInterface *ags_matrix_bulk_input_parent_connectable_interface; GType ags_matrix_bulk_input_get_type(void) { static GType ags_type_matrix_bulk_input = 0; if(!ags_type_matrix_bulk_input){ static const GTypeInfo ags_matrix_bulk_input_info = { sizeof(AgsMatrixBulkInputClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_matrix_bulk_input_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsMatrixBulkInput), 0, /* n_preallocs */ (GInstanceInitFunc) ags_matrix_bulk_input_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_matrix_bulk_input_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_matrix_bulk_input_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_matrix_bulk_input = g_type_register_static(AGS_TYPE_EFFECT_BULK, "AgsMatrixBulkInput", &ags_matrix_bulk_input_info, 0); g_type_add_interface_static(ags_type_matrix_bulk_input, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_matrix_bulk_input, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_matrix_bulk_input); } void ags_matrix_bulk_input_class_init(AgsMatrixBulkInputClass *matrix_bulk_input) { GObjectClass *gobject; ags_matrix_bulk_input_parent_class = g_type_class_peek_parent(matrix_bulk_input); /* GObjectClass */ gobject = G_OBJECT_CLASS(matrix_bulk_input); gobject->finalize = ags_matrix_bulk_input_finalize; } void ags_matrix_bulk_input_connectable_interface_init(AgsConnectableInterface *connectable) { ags_matrix_bulk_input_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_matrix_bulk_input_connect; connectable->disconnect = ags_matrix_bulk_input_disconnect; } void ags_matrix_bulk_input_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_matrix_bulk_input_init(AgsMatrixBulkInput *matrix_bulk_input) { //TODO:JK: implement me } void ags_matrix_bulk_input_connect(AgsConnectable *connectable) { if((AGS_EFFECT_BULK_CONNECTED & (AGS_EFFECT_BULK(connectable)->flags)) != 0){ return; } ags_matrix_bulk_input_parent_connectable_interface->connect(connectable); //TODO:JK: implement me } void ags_matrix_bulk_input_disconnect(AgsConnectable *connectable) { if((AGS_EFFECT_BULK_CONNECTED & (AGS_EFFECT_BULK(connectable)->flags)) == 0){ return; } ags_matrix_bulk_input_parent_connectable_interface->disconnect(connectable); //TODO:JK: implement me } void ags_matrix_bulk_input_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_matrix_bulk_input_parent_class)->finalize(gobject); } /** * ags_matrix_bulk_input_new: * @audio: the #AgsAudio to visualize * @channel_type: either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT * * Creates an #AgsMatrixBulkInput * * Returns: a new #AgsMatrixBulkInput * * Since: 1.0.0 */ AgsMatrixBulkInput* ags_matrix_bulk_input_new(AgsAudio *audio, GType channel_type) { AgsMatrixBulkInput *matrix_bulk_input; matrix_bulk_input = (AgsMatrixBulkInput *) g_object_new(AGS_TYPE_MATRIX_BULK_INPUT, "audio", audio, "channel-type", channel_type, NULL); return(matrix_bulk_input); } gsequencer-1.4.24/ags/X/machine/ags_matrix_callbacks.c0000644000175000017500000001520313247044247017562 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_matrix_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsMatrix *matrix) { AgsWindow *window; gchar *str; if(old_parent != NULL){ return; } window = (AgsWindow *) gtk_widget_get_toplevel(widget); str = g_strdup_printf("Default %d", ags_window_find_machine_counter(window, AGS_TYPE_MATRIX)->counter); g_object_set(AGS_MACHINE(matrix), "machine-name", str, NULL); ags_window_increment_machine_counter(window, AGS_TYPE_MATRIX); g_free(str); } void ags_matrix_index_callback(GtkWidget *widget, AgsMatrix *matrix) { GtkToggleButton *toggle; if(matrix->selected != NULL){ if(GTK_TOGGLE_BUTTON(widget) != matrix->selected){ AgsAudio *audio; AgsCopyPatternAudio *recall_copy_pattern_audio, *play_copy_pattern_audio; GList *list; guint64 index1; GValue recall_value = {0,}; audio = AGS_MACHINE(matrix)->audio; /* refresh GUI */ toggle = matrix->selected; matrix->selected = NULL; gtk_toggle_button_set_active(toggle, FALSE); matrix->selected = (GtkToggleButton*) widget; ags_cell_pattern_paint(matrix->cell_pattern); /* */ AGS_MACHINE(matrix)->bank_1 = index1 = ((guint) g_ascii_strtoull(matrix->selected->button.label_text, NULL, 10)) - 1; /* recall */ list = ags_recall_find_type(audio->recall, AGS_TYPE_COPY_PATTERN_AUDIO); if(list != NULL){ recall_copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(list->data); } g_value_init(&recall_value, G_TYPE_UINT64); g_value_set_uint64(&recall_value, index1); ags_port_safe_write(recall_copy_pattern_audio->bank_index_1, &recall_value); g_value_unset(&recall_value); gtk_widget_queue_draw(matrix->cell_pattern->drawing_area); }else{ toggle = matrix->selected; matrix->selected = NULL; gtk_toggle_button_set_active(toggle, TRUE); matrix->selected = toggle; } } } void ags_matrix_length_spin_callback(GtkWidget *spin_button, AgsMatrix *matrix) { AgsWindow *window; AgsApplySequencerLength *apply_sequencer_length; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; gdouble length; pthread_mutex_t *application_mutex; window = (AgsWindow *) gtk_widget_get_toplevel(GTK_WIDGET(matrix)); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* find gui_thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); length = GTK_SPIN_BUTTON(spin_button)->adjustment->value; apply_sequencer_length = ags_apply_sequencer_length_new(G_OBJECT(AGS_MACHINE(matrix)->audio), length); ags_gui_thread_schedule_task(gui_thread, apply_sequencer_length); } void ags_matrix_loop_button_callback(GtkWidget *button, AgsMatrix *matrix) { AgsCountBeatsAudio *count_beats_audio; AgsMutexManager *mutex_manager; GList *list; gboolean loop; GValue value = {0,}; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) AGS_MACHINE(matrix)->audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(audio_mutex); loop = (GTK_TOGGLE_BUTTON(button)->active) ? TRUE: FALSE; /* AgsCopyPatternAudio */ list = AGS_MACHINE(matrix)->audio->play; g_value_init(&value, G_TYPE_BOOLEAN); while((list = ags_recall_find_type(list, AGS_TYPE_COUNT_BEATS_AUDIO)) != NULL){ count_beats_audio = AGS_COUNT_BEATS_AUDIO(list->data); g_value_set_boolean(&value, loop); ags_port_safe_write(count_beats_audio->sequencer_loop, &value); list = list->next; } list = AGS_MACHINE(matrix)->audio->recall; while((list = ags_recall_find_type(list, AGS_TYPE_COUNT_BEATS_AUDIO)) != NULL){ count_beats_audio = AGS_COUNT_BEATS_AUDIO(list->data); g_value_set_boolean(&value, loop); ags_port_safe_write(count_beats_audio->sequencer_loop, &value); list = list->next; } pthread_mutex_unlock(audio_mutex); } void ags_matrix_done_callback(AgsMatrix *matrix, AgsRecallID *recall_id, gpointer data) { AgsAudio *audio; AgsMutexManager *mutex_manager; GList *playback; gboolean all_done; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); audio = AGS_MACHINE(matrix)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* check unset */ pthread_mutex_lock(audio_mutex); playback = AGS_PLAYBACK_DOMAIN(audio->playback_domain)->playback; all_done = TRUE; while(playback != NULL){ if(AGS_PLAYBACK(playback->data)->recall_id[1] != NULL){ all_done = FALSE; break; } playback = playback->next; } pthread_mutex_unlock(audio_mutex); /* all done */ if(all_done){ ags_led_array_unset_all(matrix->cell_pattern->hled_array); } } gsequencer-1.4.24/ags/X/machine/ags_ladspa_bridge.h0000644000175000017500000000522113247044247017043 00000000000000/* 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 . */ #ifndef __AGS_LADSPA_BRIDGE_H__ #define __AGS_LADSPA_BRIDGE_H__ #include #include #include #include #include #include #include #define AGS_TYPE_LADSPA_BRIDGE (ags_ladspa_bridge_get_type()) #define AGS_LADSPA_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LADSPA_BRIDGE, AgsLadspaBridge)) #define AGS_LADSPA_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LADSPA_BRIDGE, AgsLadspaBridgeClass)) #define AGS_IS_LADSPA_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_LADSPA_BRIDGE)) #define AGS_IS_LADSPA_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_LADSPA_BRIDGE)) #define AGS_LADSPA_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_LADSPA_BRIDGE, AgsLadspaBridgeClass)) #define AGS_LADSPA_BRIDGE_DEFAULT_VERSION "0.4.3" #define AGS_LADSPA_BRIDGE_DEFAULT_BUILD_ID "CEST 15-03-2015 13:40" typedef struct _AgsLadspaBridge AgsLadspaBridge; typedef struct _AgsLadspaBridgeClass AgsLadspaBridgeClass; typedef enum{ AGS_LADSPA_BRIDGE_DISPLAY_INPUT = 1, AGS_LADSPA_BRIDGE_BULK_OUTPUT = 1 << 1, AGS_LADSPA_BRIDGE_DISPLAY_OUTPUT = 1 << 2, AGS_LADSPA_BRIDGE_BULK_INPUT = 1 << 3, }AgsLadspaBridgeFlags; struct _AgsLadspaBridge { AgsMachine machine; guint flags; gchar *name; gchar *version; gchar *build_id; gchar *xml_type; guint mapped_output; guint mapped_input; gchar *filename; gchar *effect; unsigned long effect_index; }; struct _AgsLadspaBridgeClass { AgsMachineClass machine; }; GType ags_ladspa_bridge_get_type(void); void ags_ladspa_bridge_load(AgsLadspaBridge *ladspa_bridge); AgsLadspaBridge* ags_ladspa_bridge_new(GObject *soundcard, gchar *filename, gchar *effect); #endif /*__AGS_LADSPA_BRIDGE_H__*/ gsequencer-1.4.24/ags/X/ags_pad.h0000644000175000017500000000561513247044247013432 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PAD_H__ #define __AGS_PAD_H__ #include #include #include #include #include #include #include #define AGS_TYPE_PAD (ags_pad_get_type()) #define AGS_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PAD, AgsPad)) #define AGS_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PAD, AgsPadClass)) #define AGS_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PAD)) #define AGS_IS_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PAD)) #define AGS_PAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PAD, AgsPadClass)) #define AGS_PAD_DEFAULT_VERSION "0.4.2" #define AGS_PAD_DEFAULT_BUILD_ID "CEST 02-10-2014 19:36" typedef struct _AgsPad AgsPad; typedef struct _AgsPadClass AgsPadClass; typedef enum{ AGS_PAD_CONNECTED = 1, AGS_PAD_SHOW_GROUPING = 1 << 1, AGS_PAD_GROUP_ALL = 1 << 2, AGS_PAD_GROUP_LINE = 1 << 3, AGS_PAD_MAPPED_RECALL = 1 << 4, AGS_PAD_PREMAPPED_RECALL = 1 << 5, }AgsPadFlags; struct _AgsPad { GtkVBox vbox; guint flags; gchar *name; gchar *version; gchar *build_id; AgsChannel *channel; guint cols; AgsExpanderSet *expander_set; GtkToggleButton *group; GtkToggleButton *mute; GtkToggleButton *solo; GtkToggleButton *play; }; struct _AgsPadClass { GtkVBoxClass vbox; void (*set_channel)(AgsPad *pad, AgsChannel *channel); void (*resize_lines)(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old); void (*map_recall)(AgsPad *pad, guint output_pad_start); GList* (*find_port)(AgsPad *pad); }; GType ags_pad_get_type(void); void ags_pad_set_channel(AgsPad *pad, AgsChannel *channel); void ags_pad_resize_lines(AgsPad *pad, GType line_type, guint audio_channels, guint audio_channels_old); void ags_pad_map_recall(AgsPad *pad, guint output_pad_start); GList* ags_pad_find_port(AgsPad *pad); void ags_pad_play(AgsPad *pad); AgsPad* ags_pad_new(AgsChannel *channel); #endif /*__AGS_PAD_H__*/ gsequencer-1.4.24/ags/X/editor/0000755000175000017500000000000013256233676013230 500000000000000gsequencer-1.4.24/ags/X/editor/ags_ramp_acceleration_dialog_callbacks.h0000644000175000017500000000310713246707333023135 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RAMP_ACCELERATION_DIALOG_CALLBACKS_H__ #define __AGS_RAMP_ACCELERATION_DIALOG_CALLBACKS_H__ #include #include #include #include #include #include void ags_ramp_acceleration_dialog_response_callback(GtkWidget *dialog, gint response, AgsRampAccelerationDialog *ramp_acceleration_dialog); void ags_ramp_acceleration_dialog_port_callback(GtkComboBox *combo_box, AgsRampAccelerationDialog *ramp_acceleration_dialog); void ags_ramp_acceleration_dialog_machine_changed_callback(AgsAutomationEditor *automation_editor, AgsMachine *machine, AgsRampAccelerationDialog *ramp_acceleration_dialog); #endif /*__AGS_RAMP_ACCELERATION_DIALOG_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_inline_player.h0000644000175000017500000000376113246707333017007 00000000000000/* 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 . */ #ifndef __AGS_INLINE_PLAYER_H__ #define __AGS_INLINE_PLAYER_H__ #include #include #include #include #define AGS_TYPE_INLINE_PLAYER (ags_inline_player_get_type ()) #define AGS_INLINE_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_INLINE_PLAYER, AgsInlinePlayer)) #define AGS_INLINE_PLAYER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_INLINE_PLAYER, AgsInlinePlayerClass)) #define AGS_IS_INLINE_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_INLINE_PLAYER)) #define AGS_IS_INLINE_PLAYER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_INLINE_PLAYER)) #define AGS_INLINE_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_INLINE_PLAYER, AgsInlinePlayerClass)) typedef struct _AgsInlinePlayer AgsInlinePlayer; typedef struct _AgsInlinePlayerClass AgsInlinePlayerClass; struct _AgsInlinePlayer { GtkHBox vbox; AgsPlayable *playable; GtkToggleButton *play; GtkHScale *position; GtkVolumeButton *volume; }; struct _AgsInlinePlayerClass { GtkHBoxClass vbox; }; GType ags_inline_player_get_type(); AgsInlinePlayer* ags_inline_player_new(); #endif /*__AGS_INLINE_PLAYER_H__*/ gsequencer-1.4.24/ags/X/editor/ags_scrolled_wave_edit_box.h0000644000175000017500000000440713247044247020660 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SCROLLED_WAVE_EDIT_BOX_H__ #define __AGS_SCROLLED_WAVE_EDIT_BOX_H__ #include #include #include #include #define AGS_TYPE_SCROLLED_WAVE_EDIT_BOX (ags_scrolled_wave_edit_box_get_type()) #define AGS_SCROLLED_WAVE_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SCROLLED_WAVE_EDIT_BOX, AgsScrolledWaveEditBox)) #define AGS_SCROLLED_WAVE_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SCROLLED_WAVE_EDIT_BOX, AgsScrolledWaveEditBoxClass)) #define AGS_IS_SCROLLED_WAVE_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SCROLLED_WAVE_EDIT_BOX)) #define AGS_IS_SCROLLED_WAVE_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SCROLLED_WAVE_EDIT_BOX)) #define AGS_SCROLLED_WAVE_EDIT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SCROLLED_WAVE_EDIT_BOX, AgsScrolledWaveEditBoxClass)) typedef struct _AgsScrolledWaveEditBox AgsScrolledWaveEditBox; typedef struct _AgsScrolledWaveEditBoxClass AgsScrolledWaveEditBoxClass; struct _AgsScrolledWaveEditBox { GtkBin bin; guint margin_top; guint margin_bottom; guint margin_left; guint margin_right; GtkViewport *viewport; AgsWaveEditBox *wave_edit_box; }; struct _AgsScrolledWaveEditBoxClass { GtkBinClass bin; }; GType ags_scrolled_wave_edit_box_get_type(void); AgsScrolledWaveEditBox* ags_scrolled_wave_edit_box_new(); #endif /*__AGS_SCROLLED_WAVE_EDIT_BOX_H__*/ gsequencer-1.4.24/ags/X/editor/ags_vwave_edit_box.h0000644000175000017500000000371013247044247017153 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_VWAVE_EDIT_BOX_H__ #define __AGS_VWAVE_EDIT_BOX_H__ #include #include #include #include #define AGS_TYPE_VWAVE_EDIT_BOX (ags_vwave_edit_box_get_type()) #define AGS_VWAVE_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_VWAVE_EDIT_BOX, AgsVWaveEditBox)) #define AGS_VWAVE_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_VWAVE_EDIT_BOX, AgsVWaveEditBoxClass)) #define AGS_IS_VWAVE_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_VWAVE_EDIT_BOX)) #define AGS_IS_VWAVE_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_VWAVE_EDIT_BOX)) #define AGS_VWAVE_EDIT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_VWAVE_EDIT_BOX, AgsVWaveEditBoxClass)) typedef struct _AgsVWaveEditBox AgsVWaveEditBox; typedef struct _AgsVWaveEditBoxClass AgsVWaveEditBoxClass; struct _AgsVWaveEditBox { AgsWaveEditBox wave_edit_box; }; struct _AgsVWaveEditBoxClass { AgsWaveEditBoxClass wave_edit_box; }; GType ags_vwave_edit_box_get_type(void); AgsVWaveEditBox* ags_vwave_edit_box_new(); #endif /*__AGS_VWAVE_EDIT_BOX_H__*/ gsequencer-1.4.24/ags/X/editor/ags_machine_selection.h0000644000175000017500000000462213247044247017622 00000000000000/* 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 . */ #ifndef __AGS_MACHINE_SELECTION_H__ #define __AGS_MACHINE_SELECTION_H__ #include #include #include #include #define AGS_TYPE_MACHINE_SELECTION (ags_machine_selection_get_type()) #define AGS_MACHINE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MACHINE_SELECTION, AgsMachineSelection)) #define AGS_MACHINE_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MACHINE_SELECTION, AgsMachineSelectionClass)) #define AGS_IS_MACHINE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MACHINE_SELECTION)) #define AGS_IS_MACHINE_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MACHINE_SELECTION)) #define AGS_MACHINE_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_MACHINE_SELECTION, AgsMachineSelectionClass)) #define AGS_MACHINE_SELECTION_INDEX "ags-machine-selection-index\0" typedef struct _AgsMachineSelection AgsMachineSelection; typedef struct _AgsMachineSelectionClass AgsMachineSelectionClass; typedef enum{ AGS_MACHINE_SELECTION_CONNECTED = 1, AGS_MACHINE_SELECTION_NOTATION = 1 << 1, AGS_MACHINE_SELECTION_AUTOMATION = 1 << 2, }AgsMachineSelectionFlags; struct _AgsMachineSelection { GtkDialog dialog; guint flags; AgsWindow *window; GList *machine; }; struct _AgsMachineSelectionClass { GtkDialogClass dialog; }; GType ags_machine_selection_get_type(void); void ags_machine_selection_load_defaults(AgsMachineSelection *machine_selection); AgsMachineSelection* ags_machine_selection_new(AgsWindow *window); #endif /*__AGS_MACHINE_SELECTION_H__*/ gsequencer-1.4.24/ags/X/editor/ags_automation_edit.c0000644000175000017500000016733713247044247017346 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include static GType ags_accessible_automation_edit_get_type(void); void ags_automation_edit_class_init(AgsAutomationEditClass *automation_edit); void ags_accessible_automation_edit_class_init(AtkObject *object); void ags_accessible_automation_edit_action_interface_init(AtkActionIface *action); void ags_automation_edit_connectable_interface_init(AgsConnectableInterface *connectable); void ags_automation_edit_init(AgsAutomationEdit *automation_edit); void ags_automation_edit_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_automation_edit_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_automation_edit_connect(AgsConnectable *connectable); void ags_automation_edit_disconnect(AgsConnectable *connectable); AtkObject* ags_automation_edit_get_accessible(GtkWidget *widget); void ags_automation_edit_finalize(GObject *gobject); gboolean ags_accessible_automation_edit_do_action(AtkAction *action, gint i); gint ags_accessible_automation_edit_get_n_actions(AtkAction *action); const gchar* ags_accessible_automation_edit_get_description(AtkAction *action, gint i); const gchar* ags_accessible_automation_edit_get_name(AtkAction *action, gint i); const gchar* ags_accessible_automation_edit_get_keybinding(AtkAction *action, gint i); gboolean ags_accessible_automation_edit_set_description(AtkAction *action, gint i); gchar* ags_accessible_automation_edit_get_localized_name(AtkAction *action, gint i); void ags_automation_edit_size_request(GtkWidget *widget, GtkRequisition *requisition); void ags_automation_edit_size_allocate(GtkWidget *widget, GtkAllocation *allocation); void ags_automation_edit_show(GtkWidget *widget); void ags_automation_edit_show_all(GtkWidget *widget); gboolean ags_automation_edit_auto_scroll_timeout(GtkWidget *widget); /** * SECTION:ags_automation_edit * @short_description: edit automations * @title: AgsAutomationEdit * @section_id: * @include: ags/X/editor/ags_automation_edit.h * * The #AgsAutomationEdit lets you edit automations. */ enum{ PROP_0, PROP_CHANNEL_TYPE, PROP_FILENAME, PROP_EFFECT, PROP_CONTROL_SPECIFIER, PROP_CONTROL_NAME, PROP_LOWER, PROP_UPPER, PROP_DEFAULT_VALUE, }; static gpointer ags_automation_edit_parent_class = NULL; static GQuark quark_accessible_object = 0; GtkStyle *automation_edit_style = NULL; GHashTable *ags_automation_edit_auto_scroll = NULL; GType ags_automation_edit_get_type(void) { static GType ags_type_automation_edit = 0; if(!ags_type_automation_edit){ static const GTypeInfo ags_automation_edit_info = { sizeof (AgsAutomationEditClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_automation_edit_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAutomationEdit), 0, /* n_preallocs */ (GInstanceInitFunc) ags_automation_edit_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_automation_edit_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_automation_edit = g_type_register_static(GTK_TYPE_TABLE, "AgsAutomationEdit", &ags_automation_edit_info, 0); g_type_add_interface_static(ags_type_automation_edit, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_automation_edit); } static GType ags_accessible_automation_edit_get_type(void) { static GType ags_type_accessible_automation_edit = 0; if(!ags_type_accessible_automation_edit){ const GTypeInfo ags_accesssible_automation_edit_info = { sizeof(GtkAccessibleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_accessible_automation_edit_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GtkAccessible), 0, /* n_preallocs */ NULL, NULL }; static const GInterfaceInfo atk_action_interface_info = { (GInterfaceInitFunc) ags_accessible_automation_edit_action_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_accessible_automation_edit = g_type_register_static(GTK_TYPE_ACCESSIBLE, "AgsAccessibleAutomationEdit", &ags_accesssible_automation_edit_info, 0); g_type_add_interface_static(ags_type_accessible_automation_edit, ATK_TYPE_ACTION, &atk_action_interface_info); } return(ags_type_accessible_automation_edit); } void ags_automation_edit_class_init(AgsAutomationEditClass *automation_edit) { GtkWidgetClass *widget; GObjectClass *gobject; GParamSpec *param_spec; ags_automation_edit_parent_class = g_type_class_peek_parent(automation_edit); /* GObjectClass */ gobject = G_OBJECT_CLASS(automation_edit); gobject->set_property = ags_automation_edit_set_property; gobject->get_property = ags_automation_edit_get_property; gobject->finalize = ags_automation_edit_finalize; /* properties */ /** * AgsAutomationArea:channel-type: * * The target channel. * * Since: 1.3.0 */ param_spec = g_param_spec_gtype("channel-type", i18n_pspec("assigned channel type"), i18n_pspec("The channel type it is assigned with"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL_TYPE, param_spec); /** * AgsChannel:filename: * * The assigned #AgsFilename representing this channel. * * Since: 1.3.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("filename assigned with"), i18n_pspec("The filename it is assigned with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsChannel:effect: * * The assigned #AgsEffect representing this channel. * * Since: 1.3.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("effect assigned with"), i18n_pspec("The effect name it is assigned with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsChannel:control-specifier: * * The assigned #AgsControl-Specifier representing this channel. * * Since: 1.3.0 */ param_spec = g_param_spec_string("control-specifier", i18n_pspec("assigned control specifier"), i18n_pspec("The control specifier it is assigned with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTROL_SPECIFIER, param_spec); /** * AgsChannel:control-name: * * The assigned #AgsControl-Name representing this channel. * * Since: 1.3.0 */ param_spec = g_param_spec_string("control-name", i18n_pspec("displayed control name"), i18n_pspec("The control name to display"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTROL_NAME, param_spec); /** * AgsAutomationEdit:lower: * * The automation edit's lower range. * * Since: 1.3.0 */ param_spec = g_param_spec_double("lower", "lower", "The lower of automation edit", -G_MAXDOUBLE, G_MAXDOUBLE, AGS_AUTOMATION_EDIT_DEFAULT_LOWER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LOWER, param_spec); /** * AgsAutomationEdit:upper: * * The automation edit's upper range. * * Since: 1.3.0 */ param_spec = g_param_spec_double("upper", "upper", "The upper of automation edit", -G_MAXDOUBLE, G_MAXDOUBLE, AGS_AUTOMATION_EDIT_DEFAULT_UPPER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UPPER, param_spec); /** * AgsAutomationEdit:default-value: * * The automation edit's default value. * * Since: 1.3.0 */ param_spec = g_param_spec_double("default-value", "default value", "The default value of automation edit", -G_MAXDOUBLE, G_MAXDOUBLE, AGS_AUTOMATION_EDIT_DEFAULT_VALUE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEFAULT_VALUE, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) automation_edit; widget->size_request = ags_automation_edit_size_request; widget->size_allocate = ags_automation_edit_size_allocate; widget->show = ags_automation_edit_show; widget->show_all = ags_automation_edit_show_all; } void ags_accessible_automation_edit_class_init(AtkObject *object) { quark_accessible_object = g_quark_from_static_string("ags-accessible-object"); } void ags_accessible_automation_edit_action_interface_init(AtkActionIface *action) { action->do_action = ags_accessible_automation_edit_do_action; action->get_n_actions = ags_accessible_automation_edit_get_n_actions; action->get_description = ags_accessible_automation_edit_get_description; action->get_name = ags_accessible_automation_edit_get_name; action->get_keybinding = ags_accessible_automation_edit_get_keybinding; action->set_description = ags_accessible_automation_edit_set_description; action->get_localized_name = ags_accessible_automation_edit_get_localized_name; } void ags_automation_edit_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_automation_edit_connect; connectable->disconnect = ags_automation_edit_disconnect; } void ags_automation_edit_init(AgsAutomationEdit *automation_edit) { GtkAdjustment *adjustment; g_object_set(automation_edit, "can-focus", FALSE, "n-columns", 3, "n-rows", 4, "homogeneous", FALSE, NULL); automation_edit->flags = 0; automation_edit->mode = AGS_AUTOMATION_EDIT_NO_EDIT_MODE; automation_edit->button_mask = 0; automation_edit->key_mask = 0; automation_edit->note_offset = 0; automation_edit->note_offset_absolute = 0; automation_edit->point_radius = AGS_AUTOMATION_EDIT_DEFAULT_POINT_RADIUS; automation_edit->scan_width = AGS_AUTOMATION_EDIT_DEFAULT_SCAN_WIDTH; automation_edit->scan_height = AGS_AUTOMATION_EDIT_DEFAULT_SCAN_HEIGHT; automation_edit->control_width = AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH; automation_edit->control_height = AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_HEIGHT; automation_edit->step_count = AGS_AUTOMATION_EDIT_DEFAULT_STEP_COUNT; automation_edit->cursor_position_x = AGS_AUTOMATION_EDIT_DEFAULT_CURSOR_POSITION_X; automation_edit->cursor_position_y = AGS_AUTOMATION_EDIT_DEFAULT_CURSOR_POSITION_Y; automation_edit->selection_x0 = 0; automation_edit->selection_x1 = 0; automation_edit->selection_y0 = 0; automation_edit->selection_y1 = 0; automation_edit->current_acceleration = NULL; if(automation_edit_style == NULL){ automation_edit_style = gtk_style_copy(gtk_widget_get_style(automation_edit)); } automation_edit->ruler = ags_ruler_new(); g_object_set(automation_edit->ruler, "no-show-all", TRUE, NULL); gtk_table_attach(GTK_TABLE(automation_edit), (GtkWidget *) automation_edit->ruler, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); automation_edit->channel_type = G_TYPE_NONE; automation_edit->filename = NULL; automation_edit->effect = NULL; automation_edit->control_specifier = NULL; automation_edit->control_name = NULL; automation_edit->lower = AGS_AUTOMATION_EDIT_DEFAULT_LOWER; automation_edit->upper = AGS_AUTOMATION_EDIT_DEFAULT_UPPER; automation_edit->default_value = AGS_AUTOMATION_EDIT_DEFAULT_VALUE; automation_edit->drawing_area = (GtkDrawingArea *) gtk_drawing_area_new(); gtk_widget_set_events(GTK_WIDGET (automation_edit->drawing_area), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_CONTROL_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); gtk_widget_set_can_focus((GtkWidget *) automation_edit->drawing_area, TRUE); gtk_widget_set_size_request(automation_edit->drawing_area, -1, AGS_SCALE_DEFAULT_HEIGHT); gtk_table_attach(GTK_TABLE(automation_edit), (GtkWidget *) automation_edit->drawing_area, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* vscrollbar */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, automation_edit->control_height, 1.0); automation_edit->vscrollbar = gtk_vscrollbar_new(adjustment); g_object_set(automation_edit->vscrollbar, "no-show-all", TRUE, NULL); gtk_widget_set_size_request(automation_edit->vscrollbar, -1, AGS_SCALE_DEFAULT_HEIGHT); gtk_table_attach(GTK_TABLE(automation_edit), (GtkWidget *) automation_edit->vscrollbar, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* hscrollbar */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, (gdouble) automation_edit->control_width, 1.0); automation_edit->hscrollbar = gtk_hscrollbar_new(adjustment); g_object_set(automation_edit->hscrollbar, "no-show-all", TRUE, NULL); gtk_widget_set_size_request(automation_edit->hscrollbar, -1, -1); gtk_table_attach(GTK_TABLE(automation_edit), (GtkWidget *) automation_edit->hscrollbar, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* auto-scroll */ if(ags_automation_edit_auto_scroll == NULL){ ags_automation_edit_auto_scroll = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_automation_edit_auto_scroll, automation_edit, ags_automation_edit_auto_scroll_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_automation_edit_auto_scroll_timeout, (gpointer) automation_edit); } void ags_automation_edit_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAutomationEdit *automation_edit; automation_edit = AGS_AUTOMATION_EDIT(gobject); switch(prop_id){ case PROP_CHANNEL_TYPE: { automation_edit->channel_type = g_value_get_gtype(value); } break; case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(automation_edit->filename == filename){ return; } automation_edit->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(automation_edit->effect == effect){ return; } automation_edit->effect = g_strdup(effect); } break; case PROP_CONTROL_SPECIFIER: { gchar *control_specifier; control_specifier = g_value_get_string(value); if(automation_edit->control_specifier == control_specifier){ return; } automation_edit->control_specifier = g_strdup(control_specifier); } break; case PROP_CONTROL_NAME: { gchar *control_name; control_name = g_value_get_string(value); if(automation_edit->control_name == control_name){ return; } automation_edit->control_name = g_strdup(control_name); } break; case PROP_LOWER: { automation_edit->lower = g_value_get_double(value); gtk_widget_queue_draw(automation_edit); } break; case PROP_UPPER: { automation_edit->upper = g_value_get_double(value); gtk_widget_queue_draw(automation_edit); } break; case PROP_DEFAULT_VALUE: { automation_edit->default_value = g_value_get_double(value); gtk_widget_queue_draw(automation_edit); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_edit_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAutomationEdit *automation_edit; automation_edit = AGS_AUTOMATION_EDIT(gobject); switch(prop_id){ case PROP_CHANNEL_TYPE: { g_value_set_gtype(value, automation_edit->channel_type); } break; case PROP_FILENAME: { g_value_set_string(value, automation_edit->filename); } break; case PROP_EFFECT: { g_value_set_string(value, automation_edit->effect); } break; case PROP_CONTROL_SPECIFIER: { g_value_set_string(value, automation_edit->control_specifier); } break; case PROP_CONTROL_NAME: { g_value_set_string(value, automation_edit->control_name); } break; case PROP_LOWER: { g_value_set_double(value, automation_edit->lower); } break; case PROP_UPPER: { g_value_set_double(value, automation_edit->upper); } break; case PROP_DEFAULT_VALUE: { g_value_set_double(value, automation_edit->default_value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_edit_connect(AgsConnectable *connectable) { AgsAutomationEditor *automation_editor; AgsAutomationEdit *automation_edit; automation_edit = AGS_AUTOMATION_EDIT(connectable); if((AGS_AUTOMATION_EDIT_CONNECTED & (automation_edit->flags)) != 0){ return; } automation_edit->flags |= AGS_AUTOMATION_EDIT_CONNECTED; /* drawing area */ g_signal_connect_after((GObject *) automation_edit->drawing_area, "expose_event", G_CALLBACK(ags_automation_edit_drawing_area_expose_event), (gpointer) automation_edit); g_signal_connect_after((GObject *) automation_edit->drawing_area, "configure_event", G_CALLBACK(ags_automation_edit_drawing_area_configure_event), (gpointer) automation_edit); g_signal_connect((GObject *) automation_edit->drawing_area, "button_press_event", G_CALLBACK(ags_automation_edit_drawing_area_button_press_event), (gpointer) automation_edit); g_signal_connect((GObject *) automation_edit->drawing_area, "button_release_event", G_CALLBACK(ags_automation_edit_drawing_area_button_release_event), (gpointer) automation_edit); g_signal_connect((GObject *) automation_edit->drawing_area, "motion_notify_event", G_CALLBACK(ags_automation_edit_drawing_area_motion_notify_event), (gpointer) automation_edit); g_signal_connect((GObject *) automation_edit->drawing_area, "key_press_event", G_CALLBACK(ags_automation_edit_drawing_area_key_press_event), (gpointer) automation_edit); g_signal_connect((GObject *) automation_edit->drawing_area, "key_release_event", G_CALLBACK(ags_automation_edit_drawing_area_key_release_event), (gpointer) automation_edit); /* scrollbars */ g_signal_connect_after((GObject *) automation_edit->vscrollbar, "value-changed", G_CALLBACK(ags_automation_edit_vscrollbar_value_changed), (gpointer) automation_edit); g_signal_connect_after((GObject *) automation_edit->hscrollbar, "value-changed", G_CALLBACK(ags_automation_edit_hscrollbar_value_changed), (gpointer) automation_edit); } void ags_automation_edit_disconnect(AgsConnectable *connectable) { AgsAutomationEditor *automation_editor; AgsAutomationEdit *automation_edit; automation_edit = AGS_AUTOMATION_EDIT(connectable); if((AGS_AUTOMATION_EDIT_CONNECTED & (automation_edit->flags)) == 0){ return; } automation_edit->flags &= (~AGS_AUTOMATION_EDIT_CONNECTED); /* drawing area */ g_object_disconnect((GObject *) automation_edit->drawing_area, "any_signal::expose_event", G_CALLBACK(ags_automation_edit_drawing_area_expose_event), automation_edit, "any_signal::configure_event", G_CALLBACK(ags_automation_edit_drawing_area_configure_event), automation_edit, "any_signal::button_press_event", G_CALLBACK(ags_automation_edit_drawing_area_button_press_event), automation_edit, "any_signal::button_release_event", G_CALLBACK(ags_automation_edit_drawing_area_button_release_event), automation_edit, "any_signal::motion_notify_event", G_CALLBACK(ags_automation_edit_drawing_area_motion_notify_event), automation_edit, "any_signal::key_press_event", G_CALLBACK(ags_automation_edit_drawing_area_key_press_event), automation_edit, "any_signal::key_release_event", G_CALLBACK(ags_automation_edit_drawing_area_key_release_event), automation_edit, NULL); /* scrollbars */ g_object_disconnect((GObject *) automation_edit->vscrollbar, "any_signal::value-changed", G_CALLBACK(ags_automation_edit_vscrollbar_value_changed), (gpointer) automation_edit, NULL); g_object_disconnect((GObject *) automation_edit->hscrollbar, "any_signal::value-changed", G_CALLBACK(ags_automation_edit_hscrollbar_value_changed), (gpointer) automation_edit, NULL); } AtkObject* ags_automation_edit_get_accessible(GtkWidget *widget) { AtkObject* accessible; accessible = g_object_get_qdata(G_OBJECT(widget), quark_accessible_object); if(!accessible){ accessible = g_object_new(ags_accessible_automation_edit_get_type(), NULL); g_object_set_qdata(G_OBJECT(widget), quark_accessible_object, accessible); gtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), widget); } return(accessible); } void ags_automation_edit_finalize(GObject *gobject) { AgsAutomationEdit *automation_edit; automation_edit = AGS_AUTOMATION_EDIT(gobject); /* remove auto scroll */ g_hash_table_remove(ags_automation_edit_auto_scroll, automation_edit); /* call parent */ G_OBJECT_CLASS(ags_automation_edit_parent_class)->finalize(gobject); } gboolean ags_accessible_automation_edit_do_action(AtkAction *action, gint i) { AgsAutomationEdit *automation_edit; GdkEventKey *key_press, *key_release; GdkEventKey *modifier_press, *modifier_release; GdkEventKey *second_level_press, *second_level_release; if(!(i >= 0 && i < 13)){ return(FALSE); } automation_edit = gtk_accessible_get_widget(GTK_ACCESSIBLE(action)); key_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); key_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); /* create modifier */ modifier_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); modifier_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); modifier_press->keyval = modifier_release->keyval = GDK_KEY_Control_R; /* create second level */ second_level_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); second_level_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); second_level_press->keyval = second_level_release->keyval = GDK_KEY_Shift_R; switch(i){ case 0: { key_press->keyval = key_release->keyval = GDK_KEY_Left; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event(automation_edit->drawing_area, key_release); } break; case 1: { key_press->keyval = key_release->keyval = GDK_KEY_Right; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); } break; case 2: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); } break; case 3: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); } break; case 4: { key_press->keyval = key_release->keyval = GDK_KEY_Left; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 5: { key_press->keyval = key_release->keyval = GDK_KEY_Right; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 6: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 7: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 8: { key_press->keyval = key_release->keyval = GDK_KEY_space; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); } break; case 9: { key_press->keyval = key_release->keyval = GDK_KEY_Delete; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); } break; case 10: { key_press->keyval = key_release->keyval = GDK_KEY_c; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 11: { key_press->keyval = key_release->keyval = GDK_KEY_x; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 12: { key_press->keyval = key_release->keyval = GDK_KEY_v; /* send event */ gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) automation_edit->drawing_area, (GdkEvent *) modifier_release); } break; } return(TRUE); } gint ags_accessible_automation_edit_get_n_actions(AtkAction *action) { return(13); } const gchar* ags_accessible_automation_edit_get_description(AtkAction *action, gint i) { static const gchar *actions[] = { "move cursor left", "move cursor right", "move cursor up", "move cursor down", "move cursor relative up", "move cursor relative down", "move cursor small left", "move cursor small right", "add acceleration", "remove acceleration", "copy automation to clipboard", "cut automation to clipbaord", "paste automation from clipboard", }; if(i >= 0 && i < 13){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_automation_edit_get_name(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "up", "down", "small-left", "small-right", "relative-up", "relative-down", "add", "remove", "copy", "cut", "paste", }; if(i >= 0 && i < 13){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_automation_edit_get_keybinding(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "up", "down", "Shft+Left", "Shft+Right", "Shft+up", "Schft+down", "space", "Del" "Ctrl+c" "Ctrl+x", "Ctrl+v", }; if(i >= 0 && i < 13){ return(actions[i]); }else{ return(NULL); } } gboolean ags_accessible_automation_edit_set_description(AtkAction *action, gint i) { //TODO:JK: implement me return(FALSE); } gchar* ags_accessible_automation_edit_get_localized_name(AtkAction *action, gint i) { //TODO:JK: implement me return(NULL); } void ags_automation_edit_size_request(GtkWidget *widget, GtkRequisition *requisition) { AgsAutomationEdit *automation_edit; automation_edit = AGS_AUTOMATION_EDIT(widget); requisition->width = -1; requisition->height = AGS_SCALE_DEFAULT_HEIGHT; } void ags_automation_edit_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsAutomationEdit *automation_edit; GtkAllocation child_allocation; GdkWindow *window; automation_edit = AGS_AUTOMATION_EDIT(widget); widget->allocation = *allocation; widget->allocation.height = AGS_SCALE_DEFAULT_HEIGHT; allocation->height = AGS_SCALE_DEFAULT_HEIGHT; child_allocation.x = allocation->x; child_allocation.y = allocation->y; child_allocation.width = allocation->width; child_allocation.height = AGS_SCALE_DEFAULT_HEIGHT; gtk_widget_size_allocate(automation_edit->drawing_area, &child_allocation); window = gtk_widget_get_window(automation_edit->drawing_area); gdk_window_move(window, allocation->x, allocation->y); } void ags_automation_edit_show(GtkWidget *widget) { AgsAutomationEdit *automation_edit; automation_edit = AGS_AUTOMATION_EDIT(widget); /* call parent */ GTK_WIDGET_CLASS(ags_automation_edit_parent_class)->show(widget); gtk_widget_show(automation_edit->drawing_area); if((AGS_AUTOMATION_EDIT_SHOW_RULER & (automation_edit->flags)) != 0){ gtk_widget_show(automation_edit->ruler); } if((AGS_AUTOMATION_EDIT_SHOW_VSCROLLBAR & (automation_edit->flags)) != 0){ gtk_widget_show(automation_edit->vscrollbar); } if((AGS_AUTOMATION_EDIT_SHOW_HSCROLLBAR & (automation_edit->flags)) != 0){ gtk_widget_show(automation_edit->hscrollbar); } } void ags_automation_edit_show_all(GtkWidget *widget) { AgsAutomationEdit *automation_edit; automation_edit = AGS_AUTOMATION_EDIT(widget); /* call parent */ GTK_WIDGET_CLASS(ags_automation_edit_parent_class)->show_all(widget); gtk_widget_show_all(automation_edit->drawing_area); if((AGS_AUTOMATION_EDIT_SHOW_RULER & (automation_edit->flags)) != 0){ gtk_widget_show(automation_edit->ruler); } if((AGS_AUTOMATION_EDIT_SHOW_VSCROLLBAR & (automation_edit->flags)) != 0){ gtk_widget_show(automation_edit->vscrollbar); } if((AGS_AUTOMATION_EDIT_SHOW_HSCROLLBAR & (automation_edit->flags)) != 0){ gtk_widget_show(automation_edit->hscrollbar); } } gboolean ags_automation_edit_auto_scroll_timeout(GtkWidget *widget) { if(g_hash_table_lookup(ags_automation_edit_auto_scroll, widget) != NULL){ AgsAutomationEditor *automation_editor; AgsAutomationEdit *automation_edit; AgsAutomationToolbar *automation_toolbar; double zoom; double x; automation_edit = AGS_AUTOMATION_EDIT(widget); if((AGS_AUTOMATION_EDIT_AUTO_SCROLL & (automation_edit->flags)) == 0){ return(TRUE); } automation_editor = gtk_widget_get_ancestor(automation_edit, AGS_TYPE_AUTOMATION_EDITOR); if(automation_editor->selected_machine == NULL){ return(TRUE); } automation_toolbar = automation_editor->automation_toolbar; /* zoom */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom) - 2.0); /* reset offset */ automation_edit->note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(automation_editor->selected_machine->audio->soundcard)); automation_edit->note_offset_absolute = ags_soundcard_get_note_offset_absolute(AGS_SOUNDCARD(automation_editor->selected_machine->audio->soundcard)); /* reset scrollbar */ x = ((automation_edit->note_offset * automation_edit->control_width) / (AGS_AUTOMATION_EDITOR_MAX_CONTROLS * automation_edit->control_width)) * GTK_RANGE(automation_edit->hscrollbar)->adjustment->upper; gtk_range_set_value(GTK_RANGE(automation_edit->hscrollbar), x); return(TRUE); }else{ return(FALSE); } } void ags_automation_edit_reset_vscrollbar(AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; GtkAdjustment *adjustment; double varea_height; gdouble upper, old_upper; if(!AGS_IS_AUTOMATION_EDIT(automation_edit)){ return; } automation_editor = gtk_widget_get_ancestor(automation_edit, AGS_TYPE_AUTOMATION_EDITOR); if(automation_editor->selected_machine == NULL){ return; } adjustment = GTK_RANGE(automation_edit->vscrollbar)->adjustment; /* upper */ old_upper = adjustment->upper; varea_height = automation_edit->step_count * automation_edit->control_height; upper = varea_height - GTK_WIDGET(automation_edit->drawing_area)->allocation.height; if(upper < 0.0){ upper = 0.0; } gtk_adjustment_set_upper(adjustment, upper); /* reset value */ if(old_upper != 0.0){ gtk_adjustment_set_value(adjustment, adjustment->value / old_upper * upper); } } void ags_automation_edit_reset_hscrollbar(AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; GtkAdjustment *adjustment; double zoom_factor, zoom; double zoom_correction; guint map_width; gdouble upper, old_upper; if(!AGS_IS_AUTOMATION_EDIT(automation_edit)){ return; } automation_editor = gtk_widget_get_ancestor(automation_edit, AGS_TYPE_AUTOMATION_EDITOR); if(automation_editor->selected_machine == NULL){ return; } automation_toolbar = automation_editor->automation_toolbar; /* adjustment */ adjustment = GTK_RANGE(automation_edit->hscrollbar)->adjustment; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom) - 2.0); /* upper */ old_upper = adjustment->upper; zoom_correction = 1.0 / 16; map_width = ((double) AGS_AUTOMATION_EDITOR_MAX_CONTROLS * zoom * zoom_correction); upper = map_width - GTK_WIDGET(automation_edit->drawing_area)->allocation.width; if(upper < 0.0){ upper = 0.0; } gtk_adjustment_set_upper(adjustment, upper); /* ruler */ automation_edit->ruler->factor = zoom_factor; automation_edit->ruler->precision = zoom; automation_edit->ruler->scale_precision = 1.0 / zoom; gtk_adjustment_set_upper(automation_edit->ruler->adjustment, upper / automation_edit->control_width); /* reset value */ if(old_upper != 0.0){ gtk_adjustment_set_value(adjustment, adjustment->value / old_upper * upper); } } void ags_automation_edit_draw_segment(AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; GtkStyle *automation_edit_style; cairo_t *cr; gdouble x_offset, y_offset; gdouble translated_ground; double tact; gdouble y; gdouble map_height; gdouble width, height; guint control_width; guint i, j; guint j_set; static const gdouble white_gc = 65535.0; const static double dashes = { 0.25, }; if(!AGS_IS_AUTOMATION_EDIT(automation_edit)){ return; } automation_editor = gtk_widget_get_ancestor(automation_edit, AGS_TYPE_AUTOMATION_EDITOR); if(automation_editor->selected_machine == NULL){ return; } automation_toolbar = automation_editor->automation_toolbar; automation_edit_style = gtk_widget_get_style(GTK_WIDGET(automation_edit->drawing_area)); x_offset = GTK_RANGE(automation_edit->hscrollbar)->adjustment->value; y_offset = GTK_RANGE(automation_edit->vscrollbar)->adjustment->value; /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(automation_edit->drawing_area)->window); if(cr == NULL){ return; } width = (gdouble) GTK_WIDGET(automation_edit->drawing_area)->allocation.width; height = (gdouble) GTK_WIDGET(automation_edit->drawing_area)->allocation.height; /* background */ cairo_set_source_rgb(cr, automation_edit_style->bg[0].red / white_gc, automation_edit_style->bg[0].red / white_gc, automation_edit_style->bg[0].red / white_gc); cairo_rectangle(cr, 0.0, y, width, height); cairo_fill(cr); /* background border */ cairo_set_source_rgb(cr, automation_edit_style->base[0].red / white_gc, automation_edit_style->base[0].green / white_gc, automation_edit_style->base[0].blue / white_gc); cairo_set_line_width(cr, 1.0); cairo_rectangle(cr, 0.0, y, width, height); cairo_stroke(cr); cairo_set_line_width(cr, 1.0); tact = exp2((double) gtk_combo_box_get_active(automation_editor->automation_toolbar->zoom) - 2.0); y = (gdouble) 0.0; map_height = (gdouble) height; control_width = AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH; i = control_width - (guint) x_offset % control_width; if(i < width && tact > 1.0 ){ j_set = ((guint) x_offset / control_width + 1) % ((guint) tact); cairo_set_source_rgb(cr, automation_edit_style->mid[0].red / white_gc, automation_edit_style->mid[0].green / white_gc, automation_edit_style->mid[0].blue / white_gc); if(j_set != 0){ j = j_set; goto ags_automation_edit_draw_segment0; } } for(; i < width; ){ cairo_set_source_rgb(cr, automation_edit_style->fg[0].red / white_gc, automation_edit_style->fg[0].blue / white_gc, automation_edit_style->fg[0].green / white_gc); cairo_move_to(cr, (double) i, y); cairo_line_to(cr, (double) i, y + height); cairo_stroke(cr); i += control_width; cairo_set_source_rgb(cr, automation_edit_style->mid[0].red / white_gc, automation_edit_style->mid[0].green / white_gc, automation_edit_style->mid[0].blue / white_gc); for(j = 1; i < width && j < tact; j++){ ags_automation_edit_draw_segment0: cairo_move_to(cr, (double) i, y); cairo_line_to(cr, (double) i, y + height); cairo_stroke(cr); i += control_width; } } cairo_set_source_rgb(cr, automation_edit_style->bg[0].red / white_gc, automation_edit_style->bg[0].green / white_gc, automation_edit_style->bg[0].blue / white_gc); /* middle */ if(map_height * 0.5 < height){ cairo_move_to(cr, 0.0, y + map_height * 0.5); cairo_line_to(cr, width, y + map_height * 0.5); cairo_stroke(cr); } /* set dash */ cairo_set_source_rgb(cr, automation_edit_style->bg[0].red / white_gc, automation_edit_style->bg[0].green / white_gc, automation_edit_style->bg[0].blue / white_gc); cairo_set_dash(cr, &dashes, 1, 0.0); /* lower quarter */ if(map_height * 0.25 < height){ cairo_move_to(cr, 0.0, y + map_height * 0.25); cairo_line_to(cr, width, y + map_height * 0.25); cairo_stroke(cr); } /* upper quarter */ if(map_height * 0.75 < height){ cairo_move_to(cr, 0.0, y + map_height * 0.75); cairo_line_to(cr, width, y + map_height * 0.75); cairo_stroke(cr); } /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_automation_edit_draw_position(AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; GtkStyle *automation_edit_style; cairo_t *cr; double position; double x, y; double width, height; gboolean height_fits; static const gdouble white_gc = 65535.0; if(!AGS_IS_AUTOMATION_EDIT(automation_edit)){ return; } automation_editor = gtk_widget_get_ancestor(automation_edit, AGS_TYPE_AUTOMATION_EDITOR); if(automation_editor->selected_machine == NULL){ return; } automation_edit_style = gtk_widget_get_style(GTK_WIDGET(automation_edit->drawing_area)); /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(automation_edit->drawing_area)->window); if(cr == NULL){ return; } /* get offset and dimensions */ position = ((double) automation_edit->note_offset) * ((double) automation_edit->control_width); y = 0.0; x = (position) - (GTK_RANGE(automation_edit->hscrollbar)->adjustment->value); width = (double) AGS_AUTOMATION_EDIT_DEFAULT_FADER_WIDTH; height = automation_edit->step_count * automation_edit->control_height; /* push group */ cairo_push_group(cr); /* draw fader */ cairo_set_source_rgba(cr, automation_edit_style->dark[0].red / white_gc, automation_edit_style->dark[0].green / white_gc, automation_edit_style->dark[0].blue / white_gc, 0.5); cairo_rectangle(cr, (double) x, (double) y, (double) width, (double) height); cairo_fill(cr); /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_automation_edit_draw_cursor(AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; GtkStyle *automation_edit_style; gdouble c_range; double zoom, zoom_factor; double x, y; double width, height; cairo_t *cr; static const gdouble white_gc = 65535.0; if(!AGS_IS_AUTOMATION_EDIT(automation_edit)){ return; } automation_editor = gtk_widget_get_ancestor(automation_edit, AGS_TYPE_AUTOMATION_EDITOR); if(automation_editor->selected_machine == NULL){ return; } automation_toolbar = automation_editor->automation_toolbar; automation_edit_style = gtk_widget_get_style(GTK_WIDGET(automation_edit->drawing_area)); /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(automation_edit->drawing_area)->window); if(cr == NULL){ return; } if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } /* zoom */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom) - 2.0); zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* get offset */ x = ((double) automation_edit->cursor_position_x) - (GTK_RANGE(automation_edit->hscrollbar)->adjustment->value * zoom_factor); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ y = GTK_WIDGET(automation_edit->drawing_area)->allocation.height - ((((double) exp(automation_edit->cursor_position_y) / c_range) * GTK_WIDGET(automation_edit->drawing_area)->allocation.height) - GTK_RANGE(automation_edit->vscrollbar)->adjustment->value); }else{ y = GTK_WIDGET(automation_edit->drawing_area)->allocation.height - ((((double) automation_edit->cursor_position_y / c_range) * GTK_WIDGET(automation_edit->drawing_area)->allocation.height) - GTK_RANGE(automation_edit->vscrollbar)->adjustment->value); } width = (double) AGS_AUTOMATION_EDIT_CURSOR_WIDTH; height = (double) AGS_AUTOMATION_EDIT_CURSOR_HEIGHT; /* apply zoom */ x /= zoom_factor; /* clip */ if(x < 0.0){ width += x; x = 0.0; }else if(x > GTK_WIDGET(automation_edit->drawing_area)->allocation.width){ return; } if(x + width > GTK_WIDGET(automation_edit->drawing_area)->allocation.width){ width = ((double) GTK_WIDGET(automation_edit->drawing_area)->allocation.width) - x; } if(y < 0.0){ height += y; y = 0.0; }else if(y > GTK_WIDGET(automation_edit->drawing_area)->allocation.height){ return; } if(y + height > GTK_WIDGET(automation_edit->drawing_area)->allocation.height){ height = ((double) GTK_WIDGET(automation_edit->drawing_area)->allocation.height) - y; } /* push group */ cairo_push_group(cr); /* draw cursor */ cairo_set_source_rgba(cr, automation_edit_style->base[0].red / white_gc, automation_edit_style->base[0].green / white_gc, automation_edit_style->base[0].blue / white_gc, 0.5); cairo_move_to(cr, x, y); cairo_line_to(cr, x + width, y); cairo_stroke(cr); cairo_move_to(cr, x, y); cairo_line_to(cr, x, y + height); cairo_stroke(cr); /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_automation_edit_draw_selection(AgsAutomationEdit *automation_edit) { GtkStyle *automation_edit_style; cairo_t *cr; double x, y; double width, height; if(!AGS_IS_AUTOMATION_EDIT(automation_edit)){ return; } automation_edit_style = gtk_widget_get_style(GTK_WIDGET(automation_edit->drawing_area)); /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(automation_edit->drawing_area)->window); if(cr == NULL){ return; } /* get offset and dimensions */ if(automation_edit->selection_x0 < automation_edit->selection_x1){ x = ((double) automation_edit->selection_x0) - GTK_RANGE(automation_edit->hscrollbar)->adjustment->value; width = ((double) automation_edit->selection_x1 - (double) automation_edit->selection_x0); }else{ x = ((double) automation_edit->selection_x1) - GTK_RANGE(automation_edit->hscrollbar)->adjustment->value; width = ((double) automation_edit->selection_x0 - (double) automation_edit->selection_x1); } if(automation_edit->selection_y0 < automation_edit->selection_y1){ y = ((double) automation_edit->selection_y0) - GTK_RANGE(automation_edit->vscrollbar)->adjustment->value; height = ((double) automation_edit->selection_y1 - (double) automation_edit->selection_y0); }else{ y = ((double) automation_edit->selection_y1) - GTK_RANGE(automation_edit->vscrollbar)->adjustment->value; height = ((double) automation_edit->selection_y0 - (double) automation_edit->selection_y1); } /* clip */ if(x < 0.0){ width += x; x = 0.0; }else if(x > GTK_WIDGET(automation_edit->drawing_area)->allocation.width){ cairo_destroy(cr); return; } if(x + width > GTK_WIDGET(automation_edit->drawing_area)->allocation.width){ width = ((double) GTK_WIDGET(automation_edit->drawing_area)->allocation.width) - x; } if(y < 0.0){ height += y; y = 0.0; }else if(y > GTK_WIDGET(automation_edit->drawing_area)->allocation.height){ cairo_destroy(cr); return; } if(y + height > GTK_WIDGET(automation_edit->drawing_area)->allocation.height){ height = ((double) GTK_WIDGET(automation_edit->drawing_area)->allocation.height) - y; } /* push group */ cairo_push_group(cr); /* draw selection */ cairo_set_source_rgba(cr, 1.0, 0.0, 0.0, 0.3); cairo_rectangle(cr, x, y, width, height); cairo_fill(cr); /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_automation_edit_draw_acceleration(AgsAutomationEdit *automation_edit, AgsAcceleration *acceleration_a, AgsAcceleration *acceleration_b, cairo_t *cr, double r, double g, double b, double a) { AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; GtkStyle *automation_edit_style; gdouble c_range; gdouble y_upper; double zoom, zoom_factor; double viewport_x, viewport_y; double x, y; double width, height; static const gdouble white_gc = 65535.0; if(!AGS_IS_AUTOMATION_EDIT(automation_edit) || !AGS_IS_ACCELERATION(acceleration_a) || cr == NULL){ return; } automation_editor = gtk_widget_get_ancestor(automation_edit, AGS_TYPE_AUTOMATION_EDITOR); if(automation_editor->selected_machine == NULL){ return; } automation_toolbar = automation_editor->automation_toolbar; automation_edit_style = gtk_widget_get_style(GTK_WIDGET(automation_edit->drawing_area)); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } /* zoom */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom) - 2.0); zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* get offset and dimensions */ if(AGS_AUTOMATION_EDITOR_MAX_CONTROLS > GTK_WIDGET(automation_edit->drawing_area)->allocation.width){ viewport_x = zoom_factor * GTK_RANGE(automation_edit->hscrollbar)->adjustment->value; }else{ viewport_x = 0.0; } viewport_y = GTK_RANGE(automation_edit->vscrollbar)->adjustment->value; x = ((double) acceleration_a->x) - viewport_x; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ y = GTK_WIDGET(automation_edit->drawing_area)->allocation.height - ((double) exp(acceleration_a->y) / c_range) * GTK_WIDGET(automation_edit->drawing_area)->allocation.height - viewport_y; }else{ y = GTK_WIDGET(automation_edit->drawing_area)->allocation.height - ((double) acceleration_a->y / c_range) * GTK_WIDGET(automation_edit->drawing_area)->allocation.height - viewport_y; } if(acceleration_b != NULL){ width = ((double) acceleration_b->x - acceleration_a->x); }else{ width = 1.0; } height = GTK_WIDGET(automation_edit->drawing_area)->allocation.height - y; /* apply zoom */ x /= zoom_factor; width /= zoom_factor; /* clip */ if(x < 0.0){ if(x + width < 0.0){ return; }else{ width += x; x = 0.0; } }else if(x > GTK_WIDGET(automation_edit->drawing_area)->allocation.width){ return; } if(x + width > GTK_WIDGET(automation_edit->drawing_area)->allocation.width){ width = ((double) GTK_WIDGET(automation_edit->drawing_area)->allocation.width) - x; } if(acceleration_b == NULL){ width = ((double) GTK_WIDGET(automation_edit->drawing_area)->allocation.width - x); } if(y < 0.0){ if(y + height < 0.0){ return; }else{ height += y; y = 0.0; } }else if(y > GTK_WIDGET(automation_edit->drawing_area)->allocation.height){ return; } if(y + height > GTK_WIDGET(automation_edit->drawing_area)->allocation.height){ height = ((double) GTK_WIDGET(automation_edit->drawing_area)->allocation.height) - y; } /* draw point */ if((AGS_ACCELERATION_IS_SELECTED & (acceleration_a->flags)) != 0){ /* draw selected acceleration */ cairo_set_source_rgba(cr, r, g, b, 1.0); cairo_arc(cr, x, y, automation_edit->point_radius, 0.0, 2.0 * M_PI); cairo_stroke(cr); }else{ /* draw acceleration */ cairo_set_source_rgba(cr, r, g, b, a); cairo_arc(cr, x, y, automation_edit->point_radius, 0.0, 2.0 * M_PI); cairo_stroke(cr); } /* draw acceleration */ cairo_set_source_rgba(cr, r, g, b, a); cairo_rectangle(cr, x, y, width, height); cairo_fill(cr); } void ags_automation_edit_draw_automation(AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; AgsNotebook *notebook; GtkStyle *automation_edit_style; AgsMutexManager *mutex_manager; cairo_t *cr; GList *list_automation; GList *list_acceleration; gdouble c_range; gdouble y_upper, y_value; guint x0, x1; guint y0, y1; guint offset; gint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; static const gdouble white_gc = 65535.0; if(!AGS_IS_AUTOMATION_EDIT(automation_edit)){ return; } automation_editor = gtk_widget_get_ancestor(automation_edit, AGS_TYPE_AUTOMATION_EDITOR); if(automation_editor->selected_machine == NULL){ return; } if(automation_edit->channel_type == G_TYPE_NONE){ notebook = NULL; }else if(automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; }else if(automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; } automation_edit_style = gtk_widget_get_style(GTK_WIDGET(automation_edit->drawing_area)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) automation_editor->selected_machine->audio); pthread_mutex_unlock(application_mutex); /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(automation_edit->drawing_area)->window); if(cr == NULL){ return; } if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } /* get visisble region */ x0 = GTK_RANGE(automation_edit->hscrollbar)->adjustment->value; x1 = (GTK_RANGE(automation_edit->hscrollbar)->adjustment->value + GTK_WIDGET(automation_edit->drawing_area)->allocation.width); y_value = GTK_RANGE(automation_edit->vscrollbar)->adjustment->value; y_upper = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ y0 = log((y_value / y_upper) * c_range); y1 = log(((y_value + GTK_WIDGET(automation_edit->drawing_area)->allocation.height) / y_upper) * c_range); }else{ y0 = (y_value / y_upper) * c_range; y1 = ((y_value + GTK_WIDGET(automation_edit->drawing_area)->allocation.height) / y_upper) * c_range; } /* push group */ cairo_push_group(cr); /* draw automation */ pthread_mutex_lock(audio_mutex); i = 0; while(notebook == NULL || (i = ags_notebook_next_active_tab(notebook, i)) != -1){ list_automation = automation_editor->selected_machine->audio->automation; while((list_automation = ags_automation_find_near_timestamp_extended(list_automation, i, automation_edit->channel_type, automation_edit->control_name, NULL)) != NULL){ AgsAutomation *automation; GList *list_acceleration; automation = AGS_AUTOMATION(list_automation->data); if(automation->timestamp != NULL && AGS_TIMESTAMP(automation->timestamp)->timer.ags_offset.offset > x1){ break; } if(automation->timestamp != NULL && AGS_TIMESTAMP(automation->timestamp)->timer.ags_offset.offset + AGS_AUTOMATION_DEFAULT_OFFSET < x0){ list_automation = list_automation->next; continue; } list_acceleration = automation->acceleration; while(list_acceleration != NULL){ ags_automation_edit_draw_acceleration(automation_edit, list_acceleration->data, ((list_acceleration->next != NULL) ? list_acceleration->next->data: NULL), cr, automation_edit_style->fg[0].red / white_gc, automation_edit_style->fg[0].green / white_gc, automation_edit_style->fg[0].blue / white_gc, 0.4); list_acceleration = list_acceleration->next; } list_automation = list_automation->next; } if(notebook == NULL){ break; } i++; } pthread_mutex_unlock(audio_mutex); /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_automation_edit_draw(AgsAutomationEdit *automation_edit) { /* segment */ ags_automation_edit_draw_segment(automation_edit); /* automation */ ags_automation_edit_draw_automation(automation_edit); /* edit mode */ switch(automation_edit->mode){ case AGS_AUTOMATION_EDIT_POSITION_CURSOR: { ags_automation_edit_draw_cursor(automation_edit); } break; case AGS_AUTOMATION_EDIT_ADD_ACCELERATION: { if(automation_edit->current_acceleration != NULL){ GtkStyle *automation_edit_style; cairo_t *cr; static const gdouble white_gc = 65535.0; automation_edit_style = gtk_widget_get_style(GTK_WIDGET(automation_edit->drawing_area)); cr = gdk_cairo_create(GTK_WIDGET(automation_edit->drawing_area)->window); if(cr != NULL){ ags_automation_edit_draw_acceleration(automation_edit, automation_edit->current_acceleration, NULL, cr, automation_edit_style->fg[0].red / white_gc, automation_edit_style->fg[0].green / white_gc, automation_edit_style->fg[0].blue / white_gc, 1.0); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } } } break; case AGS_AUTOMATION_EDIT_SELECT_ACCELERATION: { ags_automation_edit_draw_selection(automation_edit); } break; } /* fader */ if((AGS_AUTOMATION_EDIT_AUTO_SCROLL & (automation_edit->flags)) != 0){ ags_automation_edit_draw_position(automation_edit); } } /** * ags_automation_edit_new: * * Create a new #AgsAutomationEdit. * * Returns: a new #AgsAutomationEdit * * Since: 1.0.0 */ AgsAutomationEdit* ags_automation_edit_new() { AgsAutomationEdit *automation_edit; automation_edit = (AgsAutomationEdit *) g_object_new(AGS_TYPE_AUTOMATION_EDIT, NULL); return(automation_edit); } gsequencer-1.4.24/ags/X/editor/ags_file_selection_callbacks.c0000644000175000017500000000215213246707333021124 00000000000000/* 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 . */ #include void ags_file_selection_remove_callback(GtkButton *button, GtkTable *table) { AgsFileSelection *file_selection; file_selection = (AgsFileSelection *) gtk_widget_get_ancestor(GTK_WIDGET(table), AGS_TYPE_FILE_SELECTION); ags_file_selection_remove_entry(file_selection, GTK_WIDGET(table)); } gsequencer-1.4.24/ags/X/editor/ags_pattern_envelope_callbacks.c0000644000175000017500000006526213246707333021525 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include pthread_mutex_t* ags_pattern_envelope_get_audio_mutex(AgsPatternEnvelope *pattern_envelope); pthread_mutex_t* ags_pattern_envelope_get_audio_mutex(AgsPatternEnvelope *pattern_envelope) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); return(audio_mutex); } void ags_pattern_envelope_edit_callback(GtkCellRendererToggle *cell_renderer, gchar *path_str, AgsPatternEnvelope *pattern_envelope) { GtkTreeModel *model; GtkTreeIter iter; GtkTreePath *path; gchar *str; gboolean do_edit; model = gtk_tree_view_get_model(pattern_envelope->tree_view); path = gtk_tree_path_new_from_string(path_str); /* get toggled iter */ gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_EDIT, &do_edit, -1); /* do something with the value */ do_edit ^= 1; /* set new value */ gtk_list_store_set(GTK_LIST_STORE(model), &iter, AGS_PATTERN_ENVELOPE_COLUMN_EDIT, do_edit, -1); /* clean up */ gtk_tree_path_free(path); /* turn-off others */ if(gtk_tree_model_get_iter_first(model, &iter)){ do{ str = gtk_tree_model_get_string_from_iter(model, &iter); if(strcmp(path_str, str) != 0){ gtk_list_store_set(GTK_LIST_STORE(model), &iter, AGS_PATTERN_ENVELOPE_COLUMN_EDIT, FALSE, -1); } g_free(str); }while(gtk_tree_model_iter_next(model, &iter)); } /* reset control */ ags_pattern_envelope_reset_control(pattern_envelope); } void ags_pattern_envelope_plot_callback(GtkCellRendererToggle *cell_renderer, gchar *path_str, AgsPatternEnvelope *pattern_envelope) { GtkTreeModel *model; GtkTreeIter iter; GtkTreePath *path; gboolean do_plot; model = gtk_tree_view_get_model(pattern_envelope->tree_view); path = gtk_tree_path_new_from_string(path_str); /* get toggled iter */ gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_PLOT, &do_plot, -1); /* do something with the value */ do_plot ^= 1; /* set new value */ gtk_list_store_set(GTK_LIST_STORE(model), &iter, AGS_PATTERN_ENVELOPE_COLUMN_PLOT, do_plot, -1); /* clean up */ gtk_tree_path_free(path); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_audio_channel_start_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; GValue value = {0,}; guint audio_channel_start; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } /* set property */ audio_channel_start = gtk_spin_button_get_value_as_int((GtkSpinButton *) spin_button); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, audio_channel_start); ags_pattern_envelope_set_preset_property(pattern_envelope, preset, "audio-channel-start", &value); } void ags_pattern_envelope_audio_channel_end_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; guint audio_channel_end; GValue value = {0,}; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } /* set property */ audio_channel_end = gtk_spin_button_get_value_as_int((GtkSpinButton *) spin_button); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, audio_channel_end); ags_pattern_envelope_set_preset_property(pattern_envelope, preset, "audio-channel-end", &value); } void ags_pattern_envelope_pad_start_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; guint pad_start; GValue value = {0,}; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } /* set property */ pad_start = gtk_spin_button_get_value_as_int((GtkSpinButton *) spin_button); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, pad_start); ags_pattern_envelope_set_preset_property(pattern_envelope, preset, "pad-start", &value); } void ags_pattern_envelope_pad_end_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; guint pad_end; GValue value = {0,}; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } /* set property */ pad_end = gtk_spin_button_get_value_as_int((GtkSpinButton *) spin_button); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, pad_end); ags_pattern_envelope_set_preset_property(pattern_envelope, preset, "pad-end", &value); } void ags_pattern_envelope_x_start_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; guint x_start; GValue value = {0,}; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } /* set property */ x_start = gtk_spin_button_get_value_as_int((GtkSpinButton *) spin_button); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, x_start); ags_pattern_envelope_set_preset_property(pattern_envelope, preset, "x-start", &value); } void ags_pattern_envelope_x_end_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; guint x_end; GValue value = {0,}; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } /* set property */ x_end = gtk_spin_button_get_value_as_int((GtkSpinButton *) spin_button); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, x_end); ags_pattern_envelope_set_preset_property(pattern_envelope, preset, "x-end", &value); } void ags_pattern_envelope_attack_x_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; AgsComplex *val; gdouble attack_x; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } audio_mutex = ags_pattern_envelope_get_audio_mutex(pattern_envelope); /* get value and update preset */ attack_x = gtk_range_get_value(GTK_RANGE(range)); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "attack", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][0] = attack_x; ags_preset_add_parameter(preset, "attack", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_attack_y_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; AgsComplex *val; gdouble attack_y; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } audio_mutex = ags_pattern_envelope_get_audio_mutex(pattern_envelope); /* get value and update preset */ attack_y = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "attack", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = attack_y; ags_preset_add_parameter(preset, "attack", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_decay_x_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; AgsComplex *val; gdouble decay_x; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } audio_mutex = ags_pattern_envelope_get_audio_mutex(pattern_envelope); /* get value and update preset */ decay_x = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "decay", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][0] = decay_x; ags_preset_add_parameter(preset, "decay", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_decay_y_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; AgsComplex *val; gdouble decay_y; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } audio_mutex = ags_pattern_envelope_get_audio_mutex(pattern_envelope); /* get value and update preset */ decay_y = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "decay", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = decay_y; ags_preset_add_parameter(preset, "decay", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_sustain_x_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; AgsComplex *val; gdouble sustain_x; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } audio_mutex = ags_pattern_envelope_get_audio_mutex(pattern_envelope); /* get value and update preset */ sustain_x = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "sustain", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][0] = sustain_x; ags_preset_add_parameter(preset, "sustain", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_sustain_y_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; AgsComplex *val; gdouble sustain_y; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } audio_mutex = ags_pattern_envelope_get_audio_mutex(pattern_envelope); /* get value and update preset */ sustain_y = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "sustain", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = sustain_y; ags_preset_add_parameter(preset, "sustain", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_release_x_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; AgsComplex *val; gdouble release_x; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } audio_mutex = ags_pattern_envelope_get_audio_mutex(pattern_envelope); /* get value and update preset */ release_x = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "release", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][0] = release_x; ags_preset_add_parameter(preset, "release", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_release_y_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; AgsComplex *val; gdouble release_y; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } audio_mutex = ags_pattern_envelope_get_audio_mutex(pattern_envelope); /* get value and update preset */ release_y = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "release", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = release_y; ags_preset_add_parameter(preset, "release", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_ratio_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope) { AgsPreset *preset; AgsComplex *val; gdouble ratio; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_PATTERN_ENVELOPE_NO_UPDATE & (pattern_envelope->flags)) != 0){ return; } /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ return; } audio_mutex = ags_pattern_envelope_get_audio_mutex(pattern_envelope); /* get value and update preset */ ratio = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "ratio", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = ratio; ags_preset_add_parameter(preset, "ratio", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_pattern_envelope_plot(pattern_envelope); } void ags_pattern_envelope_preset_move_up_callback(GtkWidget *button, AgsPatternEnvelope *pattern_envelope) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; GtkTreeModel *model; GtkTreeIter iter; AgsAudio *audio; AgsPreset *current; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *preset, *prev; gchar *preset_name, *prev_name; guint nth; gboolean do_edit; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* get model */ model = gtk_tree_view_get_model(pattern_envelope->tree_view); /* get position */ nth = 0; do_edit = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_EDIT, &do_edit, -1); if(do_edit){ break; } nth++; }while(gtk_tree_model_iter_next(model, &iter)); } /* move position */ if(!do_edit || nth == 0){ return; } /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get prev and current preset name */ gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_PRESET_NAME, &preset_name, -1); gtk_tree_model_iter_nth_child(model, &iter, NULL, nth - 1); gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_PRESET_NAME, &prev_name, -1); /* find preset */ pthread_mutex_lock(audio_mutex); preset = ags_preset_find_name(audio->preset, preset_name); prev = ags_preset_find_name(audio->preset, prev_name); /* reorder list */ current = preset->data; audio->preset = g_list_delete_link(audio->preset, preset); audio->preset = g_list_insert_before(audio->preset, prev, current); pthread_mutex_unlock(audio_mutex); /* load preset */ ags_envelope_dialog_load_preset(envelope_dialog); } void ags_pattern_envelope_preset_move_down_callback(GtkWidget *button, AgsPatternEnvelope *pattern_envelope) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; GtkTreeModel *model; GtkTreeIter iter; AgsAudio *audio; AgsPreset *current; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *preset, *next; gchar *preset_name, *next_name; guint nth; gboolean do_edit; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* get model */ model = gtk_tree_view_get_model(pattern_envelope->tree_view); /* get position */ nth = 0; do_edit = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_EDIT, &do_edit, -1); if(do_edit){ break; } nth++; }while(gtk_tree_model_iter_next(model, &iter)); } /* move position */ if(!do_edit){ return; } /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get next and current preset name */ gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_PRESET_NAME, &preset_name, -1); if(!gtk_tree_model_iter_next(model, &iter)){ return; } gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_PRESET_NAME, &next_name, -1); /* find preset */ pthread_mutex_lock(audio_mutex); preset = ags_preset_find_name(audio->preset, preset_name); next = ags_preset_find_name(audio->preset, next_name); /* reorder list */ current = next->data; audio->preset = g_list_delete_link(audio->preset, next); audio->preset = g_list_insert_before(audio->preset, preset, current); pthread_mutex_unlock(audio_mutex); /* load preset */ ags_envelope_dialog_load_preset(envelope_dialog); } void ags_pattern_envelope_preset_add_callback(GtkWidget *button, AgsPatternEnvelope *pattern_envelope) { GtkDialog *dialog; GtkEntry *entry; if(pattern_envelope->rename != NULL){ return; } pattern_envelope->rename = dialog = (GtkDialog *) gtk_dialog_new_with_buttons(i18n("preset name"), (GtkWindow *) gtk_widget_get_toplevel(GTK_WIDGET(pattern_envelope)), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); entry = (GtkEntry *) gtk_entry_new(); gtk_box_pack_start((GtkBox *) dialog->vbox, (GtkWidget *) entry, FALSE, FALSE, 0); gtk_widget_show_all((GtkWidget *) dialog); g_signal_connect((GObject *) dialog, "response", G_CALLBACK(ags_pattern_envelope_preset_rename_response_callback), (gpointer) pattern_envelope); } void ags_pattern_envelope_preset_remove_callback(GtkWidget *button, AgsPatternEnvelope *pattern_envelope) { GtkTreeModel *model; GtkTreeIter iter; gint nth; gboolean do_edit; model = gtk_tree_view_get_model(pattern_envelope->tree_view); nth = -1; do_edit = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, AGS_PATTERN_ENVELOPE_COLUMN_PLOT, &do_edit, -1); nth++; }while(!do_edit && gtk_tree_model_iter_next(model, &iter)); } /* remove preset */ if(do_edit){ AgsEnvelopeDialog *envelope_dialog; envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); ags_pattern_envelope_remove_preset(pattern_envelope, nth); /* load preset */ ags_envelope_dialog_load_preset(envelope_dialog); } } int ags_pattern_envelope_preset_rename_response_callback(GtkWidget *widget, gint response, AgsPatternEnvelope *pattern_envelope) { if(response == GTK_RESPONSE_ACCEPT){ AgsEnvelopeDialog *envelope_dialog; gchar *text; envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); /* get name */ text = gtk_editable_get_chars(GTK_EDITABLE(gtk_container_get_children((GtkContainer *) GTK_DIALOG(widget)->vbox)->data), 0, -1); /* add preset */ ags_pattern_envelope_add_preset(pattern_envelope, text); /* load preset */ ags_envelope_dialog_load_preset(envelope_dialog); } pattern_envelope->rename = NULL; gtk_widget_destroy(widget); return(0); } gsequencer-1.4.24/ags/X/editor/ags_automation_edit_callbacks.h0000644000175000017500000000422513247044247021334 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUTOMATION_EDIT_CALLBACKS_H__ #define __AGS_AUTOMATION_EDIT_CALLBACKS_H__ #include #include #include #include gboolean ags_automation_edit_drawing_area_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsAutomationEdit *automation_edit); gboolean ags_automation_edit_drawing_area_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsAutomationEdit *automation_edit); gboolean ags_automation_edit_drawing_area_button_press_event(GtkWidget *widget, GdkEventButton *event, AgsAutomationEdit *automation_edit); gboolean ags_automation_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButton *event, AgsAutomationEdit *automation_edit); gboolean ags_automation_edit_drawing_area_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, AgsAutomationEdit *automation_edit); gboolean ags_automation_edit_drawing_area_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsAutomationEdit *automation_edit); gboolean ags_automation_edit_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsAutomationEdit *automation_edit); void ags_automation_edit_vscrollbar_value_changed(GtkRange *range, AgsAutomationEdit *automation_edit); void ags_automation_edit_hscrollbar_value_changed(GtkRange *range, AgsAutomationEdit *automation_edit); #endif /*__AGS_AUTOMATION_EDIT_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_automation_toolbar_callbacks.h0000644000175000017500000000535413247044247022055 00000000000000/* 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 . */ #ifndef __AGS_AUTOMATION_TOOLBAR_CALLBACKS_H__ #define __AGS_AUTOMATION_TOOLBAR_CALLBACKS_H__ #include #include #include #include #include #include void ags_automation_toolbar_machine_changed_callback(AgsAutomationEditor *automation_editor, AgsMachine *machine, AgsAutomationToolbar *toolbar); void ags_automation_toolbar_position_callback(GtkToggleButton *toggle_button, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_edit_callback(GtkToggleButton *toggle_button, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_clear_callback(GtkToggleButton *toggle_button, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_select_callback(GtkToggleButton *toggle_button, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_copy_or_cut_callback(GtkWidget *widget, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_paste_callback(GtkWidget *widget, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_match_line_callback(GtkWidget *widget, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_no_duplicates_callback(GtkWidget *widget, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_tool_popup_select_acceleration_callback(GtkWidget *item, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_tool_popup_ramp_acceleration_callback(GtkWidget *item, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_tool_popup_position_cursor_callback(GtkWidget *item, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_zoom_callback(GtkComboBox *combo_box, AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_port_callback(GtkComboBox *combo_box, AgsAutomationToolbar *automation_toolbar); #endif /*__AGS_AUTOMATION_TOOLBAR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_envelope_dialog.c0000644000175000017500000003323013247044247017275 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_envelope_dialog_class_init(AgsEnvelopeDialogClass *envelope_dialog); void ags_envelope_dialog_connectable_interface_init(AgsConnectableInterface *connectable); void ags_envelope_dialog_applicable_interface_init(AgsApplicableInterface *applicable); void ags_envelope_dialog_init(AgsEnvelopeDialog *envelope_dialog); void ags_envelope_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_envelope_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_envelope_dialog_connect(AgsConnectable *connectable); void ags_envelope_dialog_disconnect(AgsConnectable *connectable); void ags_envelope_dialog_set_update(AgsApplicable *applicable, gboolean update); void ags_envelope_dialog_apply(AgsApplicable *applicable); void ags_envelope_dialog_reset(AgsApplicable *applicable); /** * SECTION:ags_envelope_dialog * @short_description: pack pad editors. * @title: AgsEnvelopeDialog * @section_id: * @include: ags/X/ags_envelope_dialog.h * * #AgsEnvelopeDialog is a composite widget to edit envelope controls * of selected AgsNote. */ enum{ PROP_0, PROP_MACHINE, }; static gpointer ags_envelope_dialog_parent_class = NULL; GType ags_envelope_dialog_get_type(void) { static GType ags_type_envelope_dialog = 0; if(!ags_type_envelope_dialog){ static const GTypeInfo ags_envelope_dialog_info = { sizeof (AgsEnvelopeDialogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_envelope_dialog_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsEnvelopeDialog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_envelope_dialog_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_dialog_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_envelope_dialog_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_envelope_dialog = g_type_register_static(GTK_TYPE_DIALOG, "AgsEnvelopeDialog", &ags_envelope_dialog_info, 0); g_type_add_interface_static(ags_type_envelope_dialog, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_envelope_dialog, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_envelope_dialog); } void ags_envelope_dialog_class_init(AgsEnvelopeDialogClass *envelope_dialog) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_envelope_dialog_parent_class = g_type_class_peek_parent(envelope_dialog); /* GObjectClass */ gobject = (GObjectClass *) envelope_dialog; gobject->set_property = ags_envelope_dialog_set_property; gobject->get_property = ags_envelope_dialog_get_property; /* properties */ /** * AgsMachine:machine: * * The #AgsMachine to edit. * * Since: 1.0.0 */ param_spec = g_param_spec_object("machine", i18n_pspec("assigned machine"), i18n_pspec("The machine which this machine editor is assigned with"), AGS_TYPE_MACHINE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MACHINE, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) envelope_dialog; // widget->delete_event = ags_envelope_dialog_delete_event; } void ags_envelope_dialog_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_envelope_dialog_connect; connectable->disconnect = ags_envelope_dialog_disconnect; } void ags_envelope_dialog_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_envelope_dialog_set_update; applicable->apply = ags_envelope_dialog_apply; applicable->reset = ags_envelope_dialog_reset; } void ags_envelope_dialog_init(AgsEnvelopeDialog *envelope_dialog) { GtkNotebook *notebook; GtkScrolledWindow *scrolled_window; gtk_window_set_title((GtkWindow *) envelope_dialog, i18n("Envelope")); envelope_dialog->flags = 0; envelope_dialog->version = AGS_ENVELOPE_DIALOG_DEFAULT_VERSION; envelope_dialog->build_id = AGS_ENVELOPE_DIALOG_DEFAULT_BUILD_ID; envelope_dialog->machine = NULL; envelope_dialog->notebook = notebook = (GtkNotebook *) gtk_notebook_new(); gtk_box_pack_start((GtkBox *) envelope_dialog->dialog.vbox, (GtkWidget *) notebook, TRUE, TRUE, 0); /* envelope editor */ envelope_dialog->envelope_editor_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("editor"))); envelope_dialog->envelope_editor = ags_envelope_editor_new(); gtk_scrolled_window_add_with_viewport(envelope_dialog->envelope_editor_scrolled_window, (GtkWidget *) envelope_dialog->envelope_editor); /* envelope info */ envelope_dialog->envelope_info_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("info"))); envelope_dialog->envelope_info = ags_envelope_info_new(); gtk_scrolled_window_add_with_viewport(envelope_dialog->envelope_info_scrolled_window, (GtkWidget *) envelope_dialog->envelope_info); envelope_dialog->pattern_envelope_scrolled_window = NULL; envelope_dialog->pattern_envelope = NULL; /* GtkButton's in GtkDialog->action_area */ envelope_dialog->apply = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_APPLY); gtk_box_pack_start((GtkBox *) GTK_DIALOG(envelope_dialog)->action_area, (GtkWidget *) envelope_dialog->apply, FALSE, FALSE, 0); envelope_dialog->ok = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_OK); gtk_box_pack_start((GtkBox *) GTK_DIALOG(envelope_dialog)->action_area, (GtkWidget *) envelope_dialog->ok, FALSE, FALSE, 0); envelope_dialog->cancel = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_CANCEL); gtk_box_pack_start((GtkBox *) GTK_DIALOG(envelope_dialog)->action_area, (GtkWidget *) envelope_dialog->cancel, FALSE, FALSE, 0); } void ags_envelope_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsEnvelopeDialog *envelope_dialog; envelope_dialog = AGS_ENVELOPE_DIALOG(gobject); switch(prop_id){ case PROP_MACHINE: { AgsMachine *machine; machine = (AgsMachine *) g_value_get_object(value); if(machine == envelope_dialog->machine){ return; } if(envelope_dialog->machine != NULL){ g_object_unref(envelope_dialog->machine); } if(machine != NULL){ g_object_ref(machine); } envelope_dialog->machine = machine; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_envelope_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsEnvelopeDialog *envelope_dialog; envelope_dialog = AGS_ENVELOPE_DIALOG(gobject); switch(prop_id){ case PROP_MACHINE: { g_value_set_object(value, envelope_dialog->machine); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_envelope_dialog_connect(AgsConnectable *connectable) { AgsEnvelopeDialog *envelope_dialog; envelope_dialog = AGS_ENVELOPE_DIALOG(connectable); if((AGS_ENVELOPE_DIALOG_CONNECTED & (envelope_dialog->flags)) != 0){ return; } envelope_dialog->flags |= AGS_ENVELOPE_DIALOG_CONNECTED; ags_connectable_connect(AGS_CONNECTABLE(envelope_dialog->envelope_editor)); ags_connectable_connect(AGS_CONNECTABLE(envelope_dialog->envelope_info)); if(envelope_dialog->pattern_envelope != NULL){ ags_connectable_connect(AGS_CONNECTABLE(envelope_dialog->pattern_envelope)); } /* applicable */ g_signal_connect((GObject *) envelope_dialog->apply, "clicked", G_CALLBACK(ags_envelope_dialog_apply_callback), (gpointer) envelope_dialog); g_signal_connect((GObject *) envelope_dialog->ok, "clicked", G_CALLBACK(ags_envelope_dialog_ok_callback), (gpointer) envelope_dialog); g_signal_connect((GObject *) envelope_dialog->cancel, "clicked", G_CALLBACK(ags_envelope_dialog_cancel_callback), (gpointer) envelope_dialog); g_signal_connect((GObject *) envelope_dialog, "delete-event", G_CALLBACK(ags_envelope_dialog_delete_event), (gpointer) envelope_dialog); } void ags_envelope_dialog_disconnect(AgsConnectable *connectable) { AgsEnvelopeDialog *envelope_dialog; envelope_dialog = AGS_ENVELOPE_DIALOG(connectable); if((AGS_ENVELOPE_DIALOG_CONNECTED & (envelope_dialog->flags)) == 0){ return; } envelope_dialog->flags &= (~AGS_ENVELOPE_DIALOG_CONNECTED); ags_connectable_disconnect(AGS_CONNECTABLE(envelope_dialog->envelope_editor)); ags_connectable_disconnect(AGS_CONNECTABLE(envelope_dialog->envelope_info)); if(envelope_dialog->pattern_envelope != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(envelope_dialog->pattern_envelope)); } /* applicable */ g_object_disconnect((GObject *) envelope_dialog->apply, "any_signal::clicked", G_CALLBACK(ags_envelope_dialog_apply_callback), (gpointer) envelope_dialog, NULL); g_object_disconnect((GObject *) envelope_dialog->ok, "any_signal::clicked", G_CALLBACK(ags_envelope_dialog_ok_callback), (gpointer) envelope_dialog, NULL); g_object_disconnect((GObject *) envelope_dialog->cancel, "any_signal::clicked", G_CALLBACK(ags_envelope_dialog_cancel_callback), (gpointer) envelope_dialog, NULL); } void ags_envelope_dialog_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_envelope_dialog_apply(AgsApplicable *applicable) { AgsEnvelopeDialog *envelope_dialog; envelope_dialog = AGS_ENVELOPE_DIALOG(applicable); ags_applicable_apply(AGS_APPLICABLE(envelope_dialog->envelope_editor)); ags_applicable_apply(AGS_APPLICABLE(envelope_dialog->envelope_info)); if(envelope_dialog->pattern_envelope != NULL){ ags_applicable_apply(AGS_APPLICABLE(envelope_dialog->pattern_envelope)); } } void ags_envelope_dialog_reset(AgsApplicable *applicable) { AgsEnvelopeDialog *envelope_dialog; envelope_dialog = AGS_ENVELOPE_DIALOG(applicable); ags_applicable_reset(AGS_APPLICABLE(envelope_dialog->envelope_editor)); ags_applicable_reset(AGS_APPLICABLE(envelope_dialog->envelope_info)); if(envelope_dialog->pattern_envelope != NULL){ ags_applicable_reset(AGS_APPLICABLE(envelope_dialog->pattern_envelope)); } } /** * ags_envelope_dialog_load_preset: * @envelope_dialog: the #AgsEnvelopeDialog * * Load presets. * * Since: 1.0.0 */ void ags_envelope_dialog_load_preset(AgsEnvelopeDialog *envelope_dialog) { ags_envelope_editor_load_preset(envelope_dialog->envelope_editor); if(envelope_dialog->pattern_envelope != NULL){ ags_pattern_envelope_load_preset(envelope_dialog->pattern_envelope); } } /** * ags_envelope_dialog_add_pattern_tab: * @envelope_dialog: the #AgsEnvelopeDialog * * Add pattern tab. * * Since: 1.0.0 */ void ags_envelope_dialog_add_pattern_tab(AgsEnvelopeDialog *envelope_dialog) { GtkNotebook *notebook; GtkScrolledWindow *scrolled_window; if(!AGS_IS_ENVELOPE_DIALOG(envelope_dialog)){ return; } notebook = envelope_dialog->notebook; /* pattern envelope */ envelope_dialog->pattern_envelope_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("pattern"))); envelope_dialog->pattern_envelope = ags_pattern_envelope_new(); gtk_scrolled_window_add_with_viewport(envelope_dialog->pattern_envelope_scrolled_window, (GtkWidget *) envelope_dialog->pattern_envelope); } /** * ags_envelope_dialog_new: * @machine: the assigned machine. * * Creates an #AgsEnvelopeDialog * * Returns: a new #AgsEnvelopeDialog * * Since: 1.0.0 */ AgsEnvelopeDialog* ags_envelope_dialog_new(AgsMachine *machine) { AgsEnvelopeDialog *envelope_dialog; envelope_dialog = (AgsEnvelopeDialog *) g_object_new(AGS_TYPE_ENVELOPE_DIALOG, "machine", machine, NULL); return(envelope_dialog); } gsequencer-1.4.24/ags/X/editor/ags_crop_note_dialog.c0000644000175000017500000003724313247044247017460 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_crop_note_dialog_class_init(AgsCropNoteDialogClass *crop_note_dialog); void ags_crop_note_dialog_connectable_interface_init(AgsConnectableInterface *connectable); void ags_crop_note_dialog_applicable_interface_init(AgsApplicableInterface *applicable); void ags_crop_note_dialog_init(AgsCropNoteDialog *crop_note_dialog); void ags_crop_note_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_crop_note_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_crop_note_dialog_finalize(GObject *gobject); void ags_crop_note_dialog_connect(AgsConnectable *connectable); void ags_crop_note_dialog_disconnect(AgsConnectable *connectable); void ags_crop_note_dialog_set_update(AgsApplicable *applicable, gboolean update); void ags_crop_note_dialog_apply(AgsApplicable *applicable); void ags_crop_note_dialog_reset(AgsApplicable *applicable); gboolean ags_crop_note_dialog_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_crop_note_dialog * @short_description: crop tool * @title: AgsCropNoteDialog * @section_id: * @include: ags/X/editor/ags_crop_note_dialog.h * * The #AgsCropNoteDialog lets you crop notes. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; static gpointer ags_crop_note_dialog_parent_class = NULL; GType ags_crop_note_dialog_get_type(void) { static GType ags_type_crop_note_dialog = 0; if (!ags_type_crop_note_dialog){ static const GTypeInfo ags_crop_note_dialog_info = { sizeof (AgsCropNoteDialogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_crop_note_dialog_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCropNoteDialog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_crop_note_dialog_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_crop_note_dialog_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_crop_note_dialog_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_crop_note_dialog = g_type_register_static(GTK_TYPE_DIALOG, "AgsCropNoteDialog", &ags_crop_note_dialog_info, 0); g_type_add_interface_static(ags_type_crop_note_dialog, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_crop_note_dialog, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return (ags_type_crop_note_dialog); } void ags_crop_note_dialog_class_init(AgsCropNoteDialogClass *crop_note_dialog) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_crop_note_dialog_parent_class = g_type_class_peek_parent(crop_note_dialog); /* GObjectClass */ gobject = (GObjectClass *) crop_note_dialog; gobject->set_property = ags_crop_note_dialog_set_property; gobject->get_property = ags_crop_note_dialog_get_property; gobject->finalize = ags_crop_note_dialog_finalize; /* properties */ /** * AgsCropNoteDialog:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsCropNoteDialog:main-window: * * The assigned #AgsWindow. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) crop_note_dialog; widget->delete_event = ags_crop_note_dialog_delete_event; } void ags_crop_note_dialog_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_crop_note_dialog_connect; connectable->disconnect = ags_crop_note_dialog_disconnect; } void ags_crop_note_dialog_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_crop_note_dialog_set_update; applicable->apply = ags_crop_note_dialog_apply; applicable->reset = ags_crop_note_dialog_reset; } void ags_crop_note_dialog_init(AgsCropNoteDialog *crop_note_dialog) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; crop_note_dialog->flags = 0; g_object_set(crop_note_dialog, "title", i18n("crop notes"), NULL); vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) crop_note_dialog->dialog.vbox, GTK_WIDGET(vbox), FALSE, FALSE, 0); /* absolute */ crop_note_dialog->absolute = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("absolute")); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(crop_note_dialog->absolute), FALSE, FALSE, 0); /* radio - in place */ crop_note_dialog->in_place = (GtkRadioButton *) gtk_radio_button_new_with_label(NULL, i18n("in-place")); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(crop_note_dialog->in_place), FALSE, FALSE, 0); /* radio - do resize */ crop_note_dialog->do_resize = (GtkRadioButton *) gtk_radio_button_new_with_label(gtk_radio_button_get_group(crop_note_dialog->in_place), i18n("do resize")); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(crop_note_dialog->do_resize), FALSE, FALSE, 0); /* crop note - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* crop note - label */ label = (GtkLabel *) gtk_label_new(i18n("crop note")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* crop note - spin button */ crop_note_dialog->crop_note = (GtkSpinButton *) gtk_spin_button_new_with_range(-1.0 * AGS_CROP_NOTE_DIALOG_MAX_WIDTH, AGS_CROP_NOTE_DIALOG_MAX_WIDTH, 1.0); gtk_spin_button_set_value(crop_note_dialog->crop_note, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(crop_note_dialog->crop_note), FALSE, FALSE, 0); /* padding note - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* padding note - label */ label = (GtkLabel *) gtk_label_new(i18n("padding note")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* padding note - spin button */ crop_note_dialog->padding_note = (GtkSpinButton *) gtk_spin_button_new_with_range(-1.0 * AGS_CROP_NOTE_DIALOG_MAX_WIDTH, AGS_CROP_NOTE_DIALOG_MAX_WIDTH, 1.0); gtk_spin_button_set_value(crop_note_dialog->padding_note, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(crop_note_dialog->padding_note), FALSE, FALSE, 0); /* dialog buttons */ gtk_dialog_add_buttons((GtkDialog *) crop_note_dialog, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); } void ags_crop_note_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCropNoteDialog *crop_note_dialog; crop_note_dialog = AGS_CROP_NOTE_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) crop_note_dialog->application_context == application_context){ return; } if(crop_note_dialog->application_context != NULL){ g_object_unref(crop_note_dialog->application_context); } if(application_context != NULL){ g_object_ref(application_context); } crop_note_dialog->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) crop_note_dialog->main_window == main_window){ return; } if(crop_note_dialog->main_window != NULL){ g_object_unref(crop_note_dialog->main_window); } if(main_window != NULL){ g_object_ref(main_window); } crop_note_dialog->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_crop_note_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCropNoteDialog *crop_note_dialog; crop_note_dialog = AGS_CROP_NOTE_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, crop_note_dialog->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, crop_note_dialog->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_crop_note_dialog_connect(AgsConnectable *connectable) { AgsCropNoteDialog *crop_note_dialog; crop_note_dialog = AGS_CROP_NOTE_DIALOG(connectable); if((AGS_CROP_NOTE_DIALOG_CONNECTED & (crop_note_dialog->flags)) != 0){ return; } crop_note_dialog->flags |= AGS_CROP_NOTE_DIALOG_CONNECTED; g_signal_connect(crop_note_dialog, "response", G_CALLBACK(ags_crop_note_dialog_response_callback), crop_note_dialog); /* absolute */ g_signal_connect_after(crop_note_dialog->absolute, "clicked", G_CALLBACK(ags_crop_note_dialog_absolute_callback), crop_note_dialog); } void ags_crop_note_dialog_disconnect(AgsConnectable *connectable) { AgsCropNoteDialog *crop_note_dialog; crop_note_dialog = AGS_CROP_NOTE_DIALOG(connectable); if((AGS_CROP_NOTE_DIALOG_CONNECTED & (crop_note_dialog->flags)) == 0){ return; } crop_note_dialog->flags &= (~AGS_CROP_NOTE_DIALOG_CONNECTED); g_object_disconnect(G_OBJECT(crop_note_dialog), "any_signal::response", G_CALLBACK(ags_crop_note_dialog_response_callback), crop_note_dialog, NULL); /* absolute */ g_object_disconnect(G_OBJECT(crop_note_dialog->absolute), "any_signal::clicked", G_CALLBACK(ags_crop_note_dialog_absolute_callback), crop_note_dialog, NULL); } void ags_crop_note_dialog_finalize(GObject *gobject) { AgsCropNoteDialog *crop_note_dialog; crop_note_dialog = (AgsCropNoteDialog *) gobject; if(crop_note_dialog->application_context != NULL){ g_object_unref(crop_note_dialog->application_context); } G_OBJECT_CLASS(ags_crop_note_dialog_parent_class)->finalize(gobject); } void ags_crop_note_dialog_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_crop_note_dialog_apply(AgsApplicable *applicable) { AgsCropNoteDialog *crop_note_dialog; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachine *machine; AgsCropNote *crop_note; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GList *notation; GList *selection; GList *task; guint x_padding; guint x_crop; gboolean absolute; gboolean in_place; gboolean do_resize; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; crop_note_dialog = AGS_CROP_NOTE_DIALOG(applicable); window = crop_note_dialog->main_window; notation_editor = window->notation_editor; machine = notation_editor->selected_machine; if(machine == NULL){ return; } audio = machine->audio; /* get some values */ x_crop = gtk_spin_button_get_value_as_int(crop_note_dialog->crop_note); x_padding = gtk_spin_button_get_value_as_int(crop_note_dialog->padding_note); absolute = gtk_toggle_button_get_active(crop_note_dialog->absolute); in_place = gtk_toggle_button_get_active(crop_note_dialog->in_place); do_resize = gtk_toggle_button_get_active(crop_note_dialog->do_resize); /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get task thread */ pthread_mutex_lock(application_mutex); gui_thread = (AgsGuiThread *) ags_thread_find_type(application_context->main_loop, AGS_TYPE_GUI_THREAD); pthread_mutex_unlock(application_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* crop note */ pthread_mutex_lock(audio_mutex); notation = audio->notation; task = NULL; while(notation != NULL){ selection = AGS_NOTATION(notation->data)->selection; if(selection != NULL){ crop_note = ags_crop_note_new(notation->data, selection, x_padding, x_crop, absolute, in_place, do_resize); g_object_set(crop_note, "audio", audio, NULL); task = g_list_prepend(task, crop_note); } notation = notation->next; } pthread_mutex_unlock(audio_mutex); /* append tasks */ ags_gui_thread_schedule_task_list(gui_thread, task); } void ags_crop_note_dialog_reset(AgsApplicable *applicable) { //TODO:JK: implement me } gboolean ags_crop_note_dialog_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_crop_note_dialog_parent_class)->delete_event(widget, event); return(TRUE); } /** * ags_crop_note_dialog_new: * @main_window: the #AgsWindow * * Create a new #AgsCropNoteDialog. * * Returns: a new #AgsCropNoteDialog * * Since: 1.0.0 */ AgsCropNoteDialog* ags_crop_note_dialog_new(GtkWidget *main_window) { AgsCropNoteDialog *crop_note_dialog; crop_note_dialog = (AgsCropNoteDialog *) g_object_new(AGS_TYPE_CROP_NOTE_DIALOG, "main-window", main_window, NULL); return(crop_note_dialog); } gsequencer-1.4.24/ags/X/editor/ags_move_note_dialog.c0000644000175000017500000004020213247044247017450 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_move_note_dialog_class_init(AgsMoveNoteDialogClass *move_note_dialog); void ags_move_note_dialog_connectable_interface_init(AgsConnectableInterface *connectable); void ags_move_note_dialog_applicable_interface_init(AgsApplicableInterface *applicable); void ags_move_note_dialog_init(AgsMoveNoteDialog *move_note_dialog); void ags_move_note_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_move_note_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_move_note_dialog_finalize(GObject *gobject); void ags_move_note_dialog_connect(AgsConnectable *connectable); void ags_move_note_dialog_disconnect(AgsConnectable *connectable); void ags_move_note_dialog_set_update(AgsApplicable *applicable, gboolean update); void ags_move_note_dialog_apply(AgsApplicable *applicable); void ags_move_note_dialog_reset(AgsApplicable *applicable); gboolean ags_move_note_dialog_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_move_note_dialog * @short_description: move tool * @title: AgsMoveNoteDialog * @section_id: * @include: ags/X/editor/ags_move_note_dialog.h * * The #AgsMoveNoteDialog lets you move notes. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; static gpointer ags_move_note_dialog_parent_class = NULL; GType ags_move_note_dialog_get_type(void) { static GType ags_type_move_note_dialog = 0; if (!ags_type_move_note_dialog){ static const GTypeInfo ags_move_note_dialog_info = { sizeof (AgsMoveNoteDialogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_move_note_dialog_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMoveNoteDialog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_move_note_dialog_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_move_note_dialog_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_move_note_dialog_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_move_note_dialog = g_type_register_static(GTK_TYPE_DIALOG, "AgsMoveNoteDialog", &ags_move_note_dialog_info, 0); g_type_add_interface_static(ags_type_move_note_dialog, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_move_note_dialog, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return (ags_type_move_note_dialog); } void ags_move_note_dialog_class_init(AgsMoveNoteDialogClass *move_note_dialog) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_move_note_dialog_parent_class = g_type_class_peek_parent(move_note_dialog); /* GObjectClass */ gobject = (GObjectClass *) move_note_dialog; gobject->set_property = ags_move_note_dialog_set_property; gobject->get_property = ags_move_note_dialog_get_property; gobject->finalize = ags_move_note_dialog_finalize; /* properties */ /** * AgsMoveNoteDialog:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsMoveNoteDialog:main-window: * * The assigned #AgsWindow. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) move_note_dialog; widget->delete_event = ags_move_note_dialog_delete_event; } void ags_move_note_dialog_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_move_note_dialog_connect; connectable->disconnect = ags_move_note_dialog_disconnect; } void ags_move_note_dialog_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_move_note_dialog_set_update; applicable->apply = ags_move_note_dialog_apply; applicable->reset = ags_move_note_dialog_reset; } void ags_move_note_dialog_init(AgsMoveNoteDialog *move_note_dialog) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; move_note_dialog->flags = 0; g_object_set(move_note_dialog, "title", i18n("move notes"), NULL); vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) move_note_dialog->dialog.vbox, GTK_WIDGET(vbox), FALSE, FALSE, 0); /* radio - relative */ move_note_dialog->relative = (GtkRadioButton *) gtk_radio_button_new_with_label(NULL, i18n("relative")); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) move_note_dialog->relative, FALSE, FALSE, 0); /* radio - absolute */ move_note_dialog->absolute = (GtkRadioButton *) gtk_radio_button_new_with_label(gtk_radio_button_get_group(move_note_dialog->relative), i18n("absolute")); gtk_box_pack_start((GtkBox *) vbox, (GtkWidget *) move_note_dialog->absolute, FALSE, FALSE, 0); /* move x - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* move x - label */ label = (GtkLabel *) gtk_label_new(i18n("move x")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* move x - spin button */ move_note_dialog->move_x = (GtkSpinButton *) gtk_spin_button_new_with_range(-1.0 * AGS_MOVE_NOTE_DIALOG_MAX_X, AGS_MOVE_NOTE_DIALOG_MAX_X, 1.0); gtk_spin_button_set_value(move_note_dialog->move_x, 0.0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) move_note_dialog->move_x, FALSE, FALSE, 0); /* move y - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* move y - label */ label = (GtkLabel *) gtk_label_new(i18n("move y")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* move y - spin button */ move_note_dialog->move_y = (GtkSpinButton *) gtk_spin_button_new_with_range(-1.0 * AGS_MOVE_NOTE_DIALOG_MAX_Y, AGS_MOVE_NOTE_DIALOG_MAX_Y, 1.0); gtk_spin_button_set_value(move_note_dialog->move_y, 0.0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) move_note_dialog->move_y, FALSE, FALSE, 0); /* dialog buttons */ gtk_dialog_add_buttons((GtkDialog *) move_note_dialog, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); } void ags_move_note_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMoveNoteDialog *move_note_dialog; move_note_dialog = AGS_MOVE_NOTE_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) move_note_dialog->application_context == application_context){ return; } if(move_note_dialog->application_context != NULL){ g_object_unref(move_note_dialog->application_context); } if(application_context != NULL){ g_object_ref(application_context); } move_note_dialog->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) move_note_dialog->main_window == main_window){ return; } if(move_note_dialog->main_window != NULL){ g_object_unref(move_note_dialog->main_window); } if(main_window != NULL){ g_object_ref(main_window); } move_note_dialog->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_move_note_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMoveNoteDialog *move_note_dialog; move_note_dialog = AGS_MOVE_NOTE_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, move_note_dialog->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, move_note_dialog->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_move_note_dialog_connect(AgsConnectable *connectable) { AgsMoveNoteDialog *move_note_dialog; move_note_dialog = AGS_MOVE_NOTE_DIALOG(connectable); if((AGS_MOVE_NOTE_DIALOG_CONNECTED & (move_note_dialog->flags)) != 0){ return; } move_note_dialog->flags |= AGS_MOVE_NOTE_DIALOG_CONNECTED; g_signal_connect(move_note_dialog, "response", G_CALLBACK(ags_move_note_dialog_response_callback), move_note_dialog); g_signal_connect_after(move_note_dialog->relative, "clicked", G_CALLBACK(ags_move_note_dialog_relative_callback), move_note_dialog); g_signal_connect_after(move_note_dialog->absolute, "clicked", G_CALLBACK(ags_move_note_dialog_absolute_callback), move_note_dialog); } void ags_move_note_dialog_disconnect(AgsConnectable *connectable) { AgsMoveNoteDialog *move_note_dialog; move_note_dialog = AGS_MOVE_NOTE_DIALOG(connectable); if((AGS_MOVE_NOTE_DIALOG_CONNECTED & (move_note_dialog->flags)) == 0){ return; } move_note_dialog->flags &= (~AGS_MOVE_NOTE_DIALOG_CONNECTED); g_object_disconnect(G_OBJECT(move_note_dialog), "any_signal::response", G_CALLBACK(ags_move_note_dialog_response_callback), move_note_dialog, NULL); g_object_disconnect(G_OBJECT(move_note_dialog->relative), "any_signal::clicked", G_CALLBACK(ags_move_note_dialog_relative_callback), move_note_dialog, NULL); g_object_disconnect(G_OBJECT(move_note_dialog->absolute), "any_signal::clicked", G_CALLBACK(ags_move_note_dialog_absolute_callback), move_note_dialog, NULL); } void ags_move_note_dialog_finalize(GObject *gobject) { AgsMoveNoteDialog *move_note_dialog; move_note_dialog = (AgsMoveNoteDialog *) gobject; if(move_note_dialog->application_context != NULL){ g_object_unref(move_note_dialog->application_context); } G_OBJECT_CLASS(ags_move_note_dialog_parent_class)->finalize(gobject); } void ags_move_note_dialog_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_move_note_dialog_apply(AgsApplicable *applicable) { AgsMoveNoteDialog *move_note_dialog; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachine *machine; AgsMoveNote *move_note; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GList *notation; GList *selection; GList *task; guint first_x; guint first_y; guint move_x; guint move_y; gboolean relative; gboolean absolute; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; move_note_dialog = AGS_MOVE_NOTE_DIALOG(applicable); window = move_note_dialog->main_window; notation_editor = window->notation_editor; machine = notation_editor->selected_machine; if(machine == NULL){ return; } audio = machine->audio; /* get some values */ move_x = gtk_spin_button_get_value_as_int(move_note_dialog->move_x); move_y = gtk_spin_button_get_value_as_int(move_note_dialog->move_y); relative = gtk_toggle_button_get_active(move_note_dialog->relative); absolute = gtk_toggle_button_get_active(move_note_dialog->absolute); /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get task thread */ pthread_mutex_lock(application_mutex); gui_thread = (AgsGuiThread *) ags_thread_find_type(application_context->main_loop, AGS_TYPE_GUI_THREAD); pthread_mutex_unlock(application_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get position and move note */ pthread_mutex_lock(audio_mutex); first_x = 0; first_y = 0; if(absolute){ notation = audio->notation; first_x = G_MAXUINT; first_y = G_MAXUINT; while(notation != NULL){ selection = AGS_NOTATION(notation->data); while(selection != NULL){ if(AGS_NOTE(selection->data)->x[0] < first_x){ first_x = AGS_NOTE(selection->data)->x[0]; } if(AGS_NOTE(selection->data)->y < first_y){ first_y = AGS_NOTE(selection->data)->y; } selection = selection->next; } notation = notation->next; } } /* create move note task */ notation = audio->notation; task = NULL; while(notation != NULL){ selection = AGS_NOTATION(notation->data)->selection; if(selection != NULL){ move_note = ags_move_note_new(notation->data, selection, first_x, first_y, move_x, move_y, relative, absolute); g_object_set(move_note, "audio", audio, NULL); task = g_list_prepend(task, move_note); } notation = notation->next; } pthread_mutex_unlock(audio_mutex); /* append tasks */ ags_gui_thread_schedule_task_list(gui_thread, task); } void ags_move_note_dialog_reset(AgsApplicable *applicable) { //TODO:JK: implement me } gboolean ags_move_note_dialog_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_move_note_dialog_parent_class)->delete_event(widget, event); return(TRUE); } /** * ags_move_note_dialog_new: * @main_window: the #AgsWindow * * Create a new #AgsMoveNoteDialog. * * Returns: a new #AgsMoveNoteDialog * * Since: 1.0.0 */ AgsMoveNoteDialog* ags_move_note_dialog_new(GtkWidget *main_window) { AgsMoveNoteDialog *move_note_dialog; move_note_dialog = (AgsMoveNoteDialog *) g_object_new(AGS_TYPE_MOVE_NOTE_DIALOG, "main-window", main_window, NULL); return(move_note_dialog); } gsequencer-1.4.24/ags/X/editor/ags_notation_edit_callbacks.h0000644000175000017500000000412713247044247021010 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTATION_EDIT_CALLBACKS_H__ #define __AGS_NOTATION_EDIT_CALLBACKS_H__ #include #include #include #include gboolean ags_notation_edit_drawing_area_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsNotationEdit *notation_edit); gboolean ags_notation_edit_drawing_area_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsNotationEdit *notation_edit); gboolean ags_notation_edit_drawing_area_button_press_event(GtkWidget *widget, GdkEventButton *event, AgsNotationEdit *notation_edit); gboolean ags_notation_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButton *event, AgsNotationEdit *notation_edit); gboolean ags_notation_edit_drawing_area_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, AgsNotationEdit *notation_edit); gboolean ags_notation_edit_drawing_area_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsNotationEdit *notation_edit); gboolean ags_notation_edit_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsNotationEdit *notation_edit); void ags_notation_edit_vscrollbar_value_changed(GtkRange *range, AgsNotationEdit *notation_edit); void ags_notation_edit_hscrollbar_value_changed(GtkRange *range, AgsNotationEdit *notation_edit); #endif /*__AGS_NOTATION_EDIT_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_wave_edit_callbacks.c0000644000175000017500000000166613247044247020117 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include gsequencer-1.4.24/ags/X/editor/ags_move_note_dialog.h0000644000175000017500000000446413246707333017470 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MOVE_NOTE_DIALOG_H__ #define __AGS_MOVE_NOTE_DIALOG_H__ #include #include #include #define AGS_TYPE_MOVE_NOTE_DIALOG (ags_move_note_dialog_get_type()) #define AGS_MOVE_NOTE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MOVE_NOTE_DIALOG, AgsMoveNoteDialog)) #define AGS_MOVE_NOTE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MOVE_NOTE_DIALOG, AgsMoveNoteDialogClass)) #define AGS_IS_MOVE_NOTE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MOVE_NOTE_DIALOG)) #define AGS_IS_MOVE_NOTE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MOVE_NOTE_DIALOG)) #define AGS_MOVE_NOTE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_MOVE_NOTE_DIALOG, AgsMoveNoteDialogClass)) #define AGS_MOVE_NOTE_DIALOG_MAX_X (16 * 19200) #define AGS_MOVE_NOTE_DIALOG_MAX_Y (1024) typedef struct _AgsMoveNoteDialog AgsMoveNoteDialog; typedef struct _AgsMoveNoteDialogClass AgsMoveNoteDialogClass; typedef enum{ AGS_MOVE_NOTE_DIALOG_CONNECTED = 1, }AgsMoveNoteDialogFlags; struct _AgsMoveNoteDialog { GtkDialog dialog; guint flags; GObject *application_context; GtkWidget *main_window; GtkRadioButton *relative; GtkRadioButton *absolute; GtkSpinButton *move_x; GtkSpinButton *move_y; }; struct _AgsMoveNoteDialogClass { GtkDialogClass dialog; }; GType ags_move_note_dialog_get_type(void); AgsMoveNoteDialog* ags_move_note_dialog_new(GtkWidget *main_window); #endif /*__AGS_MOVE_NOTE_DIALOG_H__*/ gsequencer-1.4.24/ags/X/editor/ags_notation_toolbar_callbacks.c0000644000175000017500000001552113247044247021520 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_notation_toolbar_position_callback(GtkToggleButton *toggle_button, AgsNotationToolbar *notation_toolbar) { if(toggle_button == notation_toolbar->selected_edit_mode){ if(!gtk_toggle_tool_button_get_active(toggle_button)){ gtk_toggle_tool_button_set_active(toggle_button, TRUE); } }else if(gtk_toggle_tool_button_get_active(toggle_button)){ GtkToggleButton *old_selected_edit_mode; old_selected_edit_mode = notation_toolbar->selected_edit_mode; notation_toolbar->selected_edit_mode = toggle_button; gtk_toggle_tool_button_set_active(old_selected_edit_mode, FALSE); } } void ags_notation_toolbar_edit_callback(GtkToggleButton *toggle_button, AgsNotationToolbar *notation_toolbar) { if(toggle_button == notation_toolbar->selected_edit_mode){ if(!gtk_toggle_tool_button_get_active(toggle_button)){ gtk_toggle_tool_button_set_active(toggle_button, TRUE); } }else if(gtk_toggle_tool_button_get_active(toggle_button)){ GtkToggleButton *old_selected_edit_mode; old_selected_edit_mode = notation_toolbar->selected_edit_mode; notation_toolbar->selected_edit_mode = toggle_button; gtk_toggle_tool_button_set_active(old_selected_edit_mode, FALSE); } } void ags_notation_toolbar_clear_callback(GtkToggleButton *toggle_button, AgsNotationToolbar *notation_toolbar) { if(toggle_button == notation_toolbar->selected_edit_mode){ if(!gtk_toggle_tool_button_get_active(toggle_button)){ gtk_toggle_tool_button_set_active(toggle_button, TRUE); } }else if(gtk_toggle_tool_button_get_active(toggle_button)){ GtkToggleButton *old_selected_edit_mode; old_selected_edit_mode = notation_toolbar->selected_edit_mode; notation_toolbar->selected_edit_mode = toggle_button; gtk_toggle_tool_button_set_active(old_selected_edit_mode, FALSE); } } void ags_notation_toolbar_select_callback(GtkToggleButton *toggle_button, AgsNotationToolbar *notation_toolbar) { if(toggle_button == notation_toolbar->selected_edit_mode){ if(!gtk_toggle_tool_button_get_active(toggle_button)){ gtk_toggle_tool_button_set_active(toggle_button, TRUE); } }else if(gtk_toggle_tool_button_get_active(toggle_button)){ GtkToggleButton *old_selected_edit_mode; old_selected_edit_mode = notation_toolbar->selected_edit_mode; notation_toolbar->selected_edit_mode = toggle_button; gtk_toggle_tool_button_set_active(old_selected_edit_mode, FALSE); } } void ags_notation_toolbar_copy_or_cut_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar) { AgsNotationEditor *notation_editor; /* add notation to root node */ notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(notation_toolbar), AGS_TYPE_NOTATION_EDITOR); if(widget == (GtkWidget *) notation_toolbar->copy){ ags_notation_editor_copy(notation_editor); }else{ ags_notation_editor_cut(notation_editor); } } void ags_notation_toolbar_paste_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar) { AgsNotationEditor *notation_editor; notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(notation_toolbar), AGS_TYPE_NOTATION_EDITOR); ags_notation_editor_paste(notation_editor); } void ags_notation_toolbar_match_audio_channel_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar) { AgsNotationEditor *notation_editor; notation_editor = AGS_NOTATION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(notation_toolbar), AGS_TYPE_NOTATION_EDITOR)); if(gtk_check_menu_item_get_active(widget)){ notation_editor->flags |= AGS_NOTATION_EDITOR_PASTE_MATCH_AUDIO_CHANNEL; }else{ notation_editor->flags &= (~AGS_NOTATION_EDITOR_PASTE_MATCH_AUDIO_CHANNEL); } } void ags_notation_toolbar_no_duplicates_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar) { AgsNotationEditor *notation_editor; notation_editor = AGS_NOTATION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(notation_toolbar), AGS_TYPE_NOTATION_EDITOR)); if(gtk_check_menu_item_get_active(widget)){ notation_editor->flags |= AGS_NOTATION_EDITOR_PASTE_NO_DUPLICATES; }else{ notation_editor->flags &= (~AGS_NOTATION_EDITOR_PASTE_NO_DUPLICATES); } } void ags_notation_toolbar_invert_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar) { AgsNotationEditor *notation_editor; notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(notation_toolbar), AGS_TYPE_NOTATION_EDITOR); ags_notation_editor_invert(notation_editor); } void ags_notation_toolbar_tool_popup_move_note_callback(GtkWidget *item, AgsNotationToolbar *notation_toolbar) { gtk_widget_show_all(notation_toolbar->move_note); } void ags_notation_toolbar_tool_popup_crop_note_callback(GtkWidget *item, AgsNotationToolbar *notation_toolbar) { gtk_widget_show_all(notation_toolbar->crop_note); } void ags_notation_toolbar_tool_popup_select_note_callback(GtkWidget *item, AgsNotationToolbar *notation_toolbar) { gtk_widget_show_all(notation_toolbar->select_note); } void ags_notation_toolbar_tool_popup_position_cursor_callback(GtkWidget *item, AgsNotationToolbar *notation_toolbar) { gtk_widget_show_all(notation_toolbar->position_notation_cursor); } void ags_notation_toolbar_zoom_callback(GtkComboBox *combo_box, AgsNotationToolbar *notation_toolbar) { AgsNotationEditor *notation_editor; AgsNotationEdit *notation_edit; double zoom_factor, zoom; notation_editor = gtk_widget_get_ancestor(notation_toolbar, AGS_TYPE_NOTATION_EDITOR); notation_edit = notation_editor->notation_edit; gtk_widget_queue_draw((GtkWidget *) notation_edit); /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom) - 2.0); /* reset ruler */ notation_edit->ruler->factor = zoom_factor; notation_edit->ruler->precision = zoom; notation_edit->ruler->scale_precision = 1.0 / zoom; gtk_widget_queue_draw((GtkWidget *) notation_edit->ruler); } gsequencer-1.4.24/ags/X/editor/ags_envelope_dialog_callbacks.c0000644000175000017500000000370613246707333021302 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include int ags_envelope_dialog_apply_callback(GtkWidget *widget, AgsEnvelopeDialog *envelope_dialog) { ags_applicable_apply(AGS_APPLICABLE(envelope_dialog)); //TODO:JK: remove me // ags_applicable_reset(AGS_APPLICABLE(envelope_dialog)); return(0); } int ags_envelope_dialog_ok_callback(GtkWidget *widget, AgsEnvelopeDialog *envelope_dialog) { // ags_applicable_set_update(AGS_APPLICABLE(envelope_dialog), FALSE); ags_connectable_disconnect(AGS_CONNECTABLE(envelope_dialog)); ags_applicable_apply(AGS_APPLICABLE(envelope_dialog)); envelope_dialog->machine->envelope_dialog = NULL; gtk_widget_destroy((GtkWidget *) envelope_dialog); return(0); } int ags_envelope_dialog_cancel_callback(GtkWidget *widget, AgsEnvelopeDialog *envelope_dialog) { envelope_dialog->machine->envelope_dialog = NULL; gtk_widget_destroy((GtkWidget *) envelope_dialog); return(0); } gboolean ags_envelope_dialog_delete_event(GtkWidget *widget, GdkEventAny *event, AgsEnvelopeDialog *envelope_dialog) { envelope_dialog->machine->envelope_dialog = NULL; return(FALSE); } gsequencer-1.4.24/ags/X/editor/ags_inline_player_callbacks.c0000644000175000017500000000147013246707333020774 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/editor/ags_select_acceleration_dialog.h0000644000175000017500000000537213246707333021464 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SELECT_ACCELERATION_DIALOG_H__ #define __AGS_SELECT_ACCELERATION_DIALOG_H__ #include #include #include #define AGS_TYPE_SELECT_ACCELERATION_DIALOG (ags_select_acceleration_dialog_get_type()) #define AGS_SELECT_ACCELERATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SELECT_ACCELERATION_DIALOG, AgsSelectAccelerationDialog)) #define AGS_SELECT_ACCELERATION_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SELECT_ACCELERATION_DIALOG, AgsSelectAccelerationDialogClass)) #define AGS_IS_SELECT_ACCELERATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SELECT_ACCELERATION_DIALOG)) #define AGS_IS_SELECT_ACCELERATION_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SELECT_ACCELERATION_DIALOG)) #define AGS_SELECT_ACCELERATION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SELECT_ACCELERATION_DIALOG, AgsSelectAccelerationDialogClass)) #define AGS_SELECT_ACCELERATION(ptr) ((AgsSelectAcceleration *)(ptr)) #define AGS_SELECT_ACCELERATION_MAX_BEATS (16 * 1200) #define AGS_SELECT_ACCELERATION_DEFAULT_WIDTH (64) typedef struct _AgsSelectAccelerationDialog AgsSelectAccelerationDialog; typedef struct _AgsSelectAccelerationDialogClass AgsSelectAccelerationDialogClass; typedef struct _AgsSelectAutomation AgsSelectAutomation; typedef enum{ AGS_SELECT_ACCELERATION_DIALOG_CONNECTED = 1, }AgsSelectAccelerationDialogFlags; struct _AgsSelectAccelerationDialog { GtkDialog dialog; guint flags; GObject *application_context; GtkWidget *main_window; GtkCheckButton *copy_selection; GtkVBox *port; GtkButton *add; GtkSpinButton *select_x0; GtkSpinButton *select_x1; }; struct _AgsSelectAccelerationDialogClass { GtkDialogClass dialog; }; GType ags_select_acceleration_dialog_get_type(void); AgsSelectAccelerationDialog* ags_select_acceleration_dialog_new(GtkWidget *main_window); #endif /*__AGS_SELECT_ACCELERATION_DIALOG_H__*/ gsequencer-1.4.24/ags/X/editor/ags_envelope_editor.c0000644000175000017500000011231213247044247017323 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_envelope_editor_class_init(AgsEnvelopeEditorClass *envelope_editor); void ags_envelope_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_envelope_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_envelope_editor_init(AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_connect(AgsConnectable *connectable); void ags_envelope_editor_disconnect(AgsConnectable *connectable); void ags_envelope_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_envelope_editor_apply(AgsApplicable *applicable); void ags_envelope_editor_reset(AgsApplicable *applicable); gboolean ags_envelope_editor_delete_event(GtkWidget *widget, GdkEventAny *event); gchar* ags_envelope_editor_x_label_func(gdouble value, gpointer data); gchar* ags_envelope_editor_y_label_func(gdouble value, gpointer data); /** * SECTION:ags_envelope_editor * @short_description: pack pad editors. * @title: AgsEnvelopeEditor * @section_id: * @include: ags/X/ags_envelope_editor.h * * #AgsEnvelopeEditor is a composite widget to edit envelope controls * of selected AgsNote. */ static gpointer ags_envelope_editor_parent_class = NULL; GType ags_envelope_editor_get_type(void) { static GType ags_type_envelope_editor = 0; if(!ags_type_envelope_editor){ static const GTypeInfo ags_envelope_editor_info = { sizeof (AgsEnvelopeEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_envelope_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsEnvelopeEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_envelope_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_envelope_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_envelope_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsEnvelopeEditor", &ags_envelope_editor_info, 0); g_type_add_interface_static(ags_type_envelope_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_envelope_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_envelope_editor); } void ags_envelope_editor_class_init(AgsEnvelopeEditorClass *envelope_editor) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_envelope_editor_parent_class = g_type_class_peek_parent(envelope_editor); /* GObjectClass */ gobject = (GObjectClass *) envelope_editor; /* GtkWidgetClass */ widget = (GtkWidgetClass *) envelope_editor; } void ags_envelope_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_envelope_editor_connect; connectable->disconnect = ags_envelope_editor_disconnect; } void ags_envelope_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_envelope_editor_set_update; applicable->apply = ags_envelope_editor_apply; applicable->reset = ags_envelope_editor_reset; } void ags_envelope_editor_init(AgsEnvelopeEditor *envelope_editor) { GtkFrame *frame; GtkHBox *hbox; GtkVBox *control; GtkTable *table; GtkLabel *label; AgsCartesian *cartesian; AgsPlot *plot; gdouble width, height; gdouble default_width, default_height; gdouble offset; envelope_editor->flags = 0; envelope_editor->version = AGS_ENVELOPE_EDITOR_DEFAULT_VERSION; envelope_editor->build_id = AGS_ENVELOPE_EDITOR_DEFAULT_BUILD_ID; /* enabled */ envelope_editor->enabled = gtk_check_button_new_with_label(i18n("enabled")); gtk_box_pack_start((GtkBox *) envelope_editor, (GtkWidget *) envelope_editor->enabled, FALSE, FALSE, 0); /* rename dialog */ envelope_editor->rename = NULL; /* frame - preset */ frame = (GtkFrame *) gtk_frame_new(i18n("preset")); gtk_box_pack_start((GtkBox *) envelope_editor, (GtkWidget *) frame, FALSE, FALSE, 0); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_container_add((GtkContainer *) frame, (GtkWidget *) hbox); envelope_editor->preset = gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) envelope_editor->preset, FALSE, FALSE, 0); envelope_editor->add = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) envelope_editor->add, FALSE, FALSE, 0); envelope_editor->remove = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) envelope_editor->remove, FALSE, FALSE, 0); /* cartesian */ cartesian = envelope_editor->cartesian = ags_cartesian_new(); cartesian->x_label_func = ags_envelope_editor_x_label_func; cartesian->y_label_func = ags_envelope_editor_y_label_func; ags_cartesian_fill_label(cartesian, TRUE); ags_cartesian_fill_label(cartesian, FALSE); /* cartesian - plot */ plot = ags_plot_alloc(5, 0, 0); plot->join_points = TRUE; plot->point_color[0][0] = 0.125; plot->point_color[0][1] = 0.5; plot->point_color[0][2] = 1.0; plot->point_color[1][0] = 0.125; plot->point_color[1][1] = 0.5; plot->point_color[1][2] = 1.0; plot->point_color[2][0] = 0.125; plot->point_color[2][1] = 0.5; plot->point_color[2][2] = 1.0; plot->point_color[3][0] = 0.125; plot->point_color[3][1] = 0.5; plot->point_color[3][2] = 1.0; plot->point_color[4][0] = 0.125; plot->point_color[4][1] = 0.5; plot->point_color[4][2] = 1.0; width = cartesian->x_end - cartesian->x_start; height = cartesian->y_end - cartesian->y_start; default_width = cartesian->x_step_width * cartesian->x_scale_step_width; default_height = cartesian->y_step_height * cartesian->y_scale_step_height; plot->point[0][0] = 0.0; plot->point[0][1] = default_height * 1.0; plot->point[1][0] = default_width * 0.25; plot->point[1][1] = default_height * 1.0; offset = default_width * 0.25; plot->point[2][0] = offset + default_width * 0.25; plot->point[2][1] = default_height * 1.0; offset += default_width * 0.25; plot->point[3][0] = offset + default_width * 0.25; plot->point[3][1] = default_height * 1.0; offset += default_width * 0.25; plot->point[4][0] = offset + default_width * 0.25; plot->point[4][1] = default_height * 1.0; ags_cartesian_add_plot(cartesian, plot); /* cartesian - size, pack and redraw */ gtk_widget_set_size_request(cartesian, (gint) width + 2.0 * cartesian->x_margin, (gint) height + 2.0 * cartesian->y_margin); gtk_box_pack_start((GtkBox *) envelope_editor, GTK_WIDGET(cartesian), FALSE, FALSE, 0); gtk_widget_queue_draw(cartesian); /* table */ table = (GtkTable *) gtk_table_new(5, 2, FALSE); gtk_box_pack_start((GtkBox *) envelope_editor, GTK_WIDGET(table), FALSE, FALSE, 0); /* attack */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("attack"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); control = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(control), 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); envelope_editor->attack_x = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(envelope_editor->attack_x, TRUE); gtk_range_set_value((GtkRange *) envelope_editor->attack_x, 0.25); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) envelope_editor->attack_x, FALSE, FALSE, 0); envelope_editor->attack_y = (GtkHScale *) gtk_hscale_new_with_range(-1.0, 1.0, 0.001); gtk_scale_set_draw_value(envelope_editor->attack_y, TRUE); gtk_range_set_value((GtkRange *) envelope_editor->attack_y, 1.0); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) envelope_editor->attack_y, FALSE, FALSE, 0); /* decay */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("decay"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); control = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(control), 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); envelope_editor->decay_x = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(envelope_editor->decay_x, TRUE); gtk_range_set_value((GtkRange *) envelope_editor->decay_x, 0.25); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) envelope_editor->decay_x, FALSE, FALSE, 0); envelope_editor->decay_y = (GtkHScale *) gtk_hscale_new_with_range(-1.0, 1.0, 0.001); gtk_scale_set_draw_value(envelope_editor->decay_y, TRUE); gtk_range_set_value((GtkRange *) envelope_editor->decay_y, 1.0); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) envelope_editor->decay_y, FALSE, FALSE, 0); /* sustain */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("sustain"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); control = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(control), 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); envelope_editor->sustain_x = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(envelope_editor->sustain_x, TRUE); gtk_range_set_value((GtkRange *) envelope_editor->sustain_x, 0.25); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) envelope_editor->sustain_x, FALSE, FALSE, 0); envelope_editor->sustain_y = (GtkHScale *) gtk_hscale_new_with_range(-1.0, 1.0, 0.001); gtk_scale_set_draw_value(envelope_editor->sustain_y, TRUE); gtk_range_set_value((GtkRange *) envelope_editor->sustain_y, 1.0); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) envelope_editor->sustain_y, FALSE, FALSE, 0); /* release */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("release"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0); control = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(control), 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); envelope_editor->release_x = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(envelope_editor->release_x, TRUE); gtk_range_set_value((GtkRange *) envelope_editor->release_x, 0.25); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) envelope_editor->release_x, FALSE, FALSE, 0); envelope_editor->release_y = (GtkHScale *) gtk_hscale_new_with_range(-1.0, 1.0, 0.001); gtk_scale_set_draw_value(envelope_editor->release_y, TRUE); gtk_range_set_value((GtkRange *) envelope_editor->release_y, 1.0); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) envelope_editor->release_y, FALSE, FALSE, 0); /* ratio */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("ratio"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0); envelope_editor->ratio = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(envelope_editor->ratio, TRUE); gtk_range_set_value((GtkRange *) envelope_editor->ratio, 0.0); gtk_table_attach(table, GTK_WIDGET(envelope_editor->ratio), 1, 2, 4, 5, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); } void ags_envelope_editor_connect(AgsConnectable *connectable) { AgsEnvelopeEditor *envelope_editor; envelope_editor = AGS_ENVELOPE_EDITOR(connectable); if((AGS_ENVELOPE_EDITOR_CONNECTED & (envelope_editor->flags)) != 0){ return; } envelope_editor->flags |= AGS_ENVELOPE_EDITOR_CONNECTED; /* preset */ g_signal_connect((GObject *) envelope_editor->preset, "changed", G_CALLBACK(ags_envelope_editor_preset_callback), (gpointer) envelope_editor); g_signal_connect((GObject *) envelope_editor->add, "clicked", G_CALLBACK(ags_envelope_editor_preset_add_callback), (gpointer) envelope_editor); g_signal_connect((GObject *) envelope_editor->remove, "clicked", G_CALLBACK(ags_envelope_editor_preset_remove_callback), (gpointer) envelope_editor); /* attack x,y */ g_signal_connect((GObject *) envelope_editor->attack_x, "value-changed", G_CALLBACK(ags_envelope_editor_attack_x_callback), (gpointer) envelope_editor); g_signal_connect((GObject *) envelope_editor->attack_y, "value-changed", G_CALLBACK(ags_envelope_editor_attack_y_callback), (gpointer) envelope_editor); /* decay x,y */ g_signal_connect((GObject *) envelope_editor->decay_x, "value-changed", G_CALLBACK(ags_envelope_editor_decay_x_callback), (gpointer) envelope_editor); g_signal_connect((GObject *) envelope_editor->decay_y, "value-changed", G_CALLBACK(ags_envelope_editor_decay_y_callback), (gpointer) envelope_editor); /* sustain x,y */ g_signal_connect((GObject *) envelope_editor->sustain_x, "value-changed", G_CALLBACK(ags_envelope_editor_sustain_x_callback), (gpointer) envelope_editor); g_signal_connect((GObject *) envelope_editor->sustain_y, "value-changed", G_CALLBACK(ags_envelope_editor_sustain_y_callback), (gpointer) envelope_editor); /* release x,y */ g_signal_connect((GObject *) envelope_editor->release_x, "value-changed", G_CALLBACK(ags_envelope_editor_release_x_callback), (gpointer) envelope_editor); g_signal_connect((GObject *) envelope_editor->release_y, "value-changed", G_CALLBACK(ags_envelope_editor_release_y_callback), (gpointer) envelope_editor); /* ratio */ g_signal_connect((GObject *) envelope_editor->ratio, "value-changed", G_CALLBACK(ags_envelope_editor_ratio_callback), (gpointer) envelope_editor); } void ags_envelope_editor_disconnect(AgsConnectable *connectable) { AgsEnvelopeEditor *envelope_editor; envelope_editor = AGS_ENVELOPE_EDITOR(connectable); if((AGS_ENVELOPE_EDITOR_CONNECTED & (envelope_editor->flags)) == 0){ return; } envelope_editor->flags &= (~AGS_ENVELOPE_EDITOR_CONNECTED); /* preset */ g_object_disconnect((GObject *) envelope_editor->preset, "any_signal::changed", G_CALLBACK(ags_envelope_editor_preset_callback), (gpointer) envelope_editor, NULL); g_object_disconnect((GObject *) envelope_editor->add, "any_signal::clicked", G_CALLBACK(ags_envelope_editor_preset_add_callback), (gpointer) envelope_editor, NULL); g_object_disconnect((GObject *) envelope_editor->remove, "any_signal::clicked", G_CALLBACK(ags_envelope_editor_preset_remove_callback), (gpointer) envelope_editor, NULL); /* attack x,y */ g_object_disconnect((GObject *) envelope_editor->attack_x, "any_signal::value-changed", G_CALLBACK(ags_envelope_editor_attack_x_callback), (gpointer) envelope_editor, NULL); g_object_disconnect((GObject *) envelope_editor->attack_y, "any_signal::value-changed", G_CALLBACK(ags_envelope_editor_attack_y_callback), (gpointer) envelope_editor, NULL); /* decay x,y */ g_object_disconnect((GObject *) envelope_editor->decay_x, "any_signal::value-changed", G_CALLBACK(ags_envelope_editor_decay_x_callback), (gpointer) envelope_editor, NULL); g_object_disconnect((GObject *) envelope_editor->decay_y, "any_signal::value-changed", G_CALLBACK(ags_envelope_editor_decay_y_callback), (gpointer) envelope_editor, NULL); /* sustain x,y */ g_object_disconnect((GObject *) envelope_editor->sustain_x, "any_signal::value-changed", G_CALLBACK(ags_envelope_editor_sustain_x_callback), (gpointer) envelope_editor, NULL); g_object_disconnect((GObject *) envelope_editor->sustain_y, "any_signal::value-changed", G_CALLBACK(ags_envelope_editor_sustain_y_callback), (gpointer) envelope_editor, NULL); /* release x,y */ g_object_disconnect((GObject *) envelope_editor->release_x, "any_signal::value-changed", G_CALLBACK(ags_envelope_editor_release_x_callback), (gpointer) envelope_editor, NULL); g_object_disconnect((GObject *) envelope_editor->release_y, "any_signal::value-changed", G_CALLBACK(ags_envelope_editor_release_y_callback), (gpointer) envelope_editor, NULL); /* ratio */ g_object_disconnect((GObject *) envelope_editor->ratio, "any_signal::value-changed", G_CALLBACK(ags_envelope_editor_ratio_callback), (gpointer) envelope_editor, NULL); } void ags_envelope_editor_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_envelope_editor_apply(AgsApplicable *applicable) { AgsEnvelopeDialog *envelope_dialog; AgsEnvelopeEditor *envelope_editor; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *notation; GList *selection; double attack_x, attack_y; double decay_x, decay_y; double sustain_x, sustain_y; double release_x, release_y; double ratio; complex z; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; envelope_editor = AGS_ENVELOPE_EDITOR(applicable); envelope_dialog = gtk_widget_get_ancestor(envelope_editor, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get z */ attack_x = gtk_range_get_value(GTK_RANGE(envelope_editor->attack_x)); attack_y = gtk_range_get_value(GTK_RANGE(envelope_editor->attack_y)); decay_x = gtk_range_get_value(GTK_RANGE(envelope_editor->decay_x)); decay_y = gtk_range_get_value(GTK_RANGE(envelope_editor->decay_y)); sustain_x = gtk_range_get_value(GTK_RANGE(envelope_editor->sustain_x)); sustain_y = gtk_range_get_value(GTK_RANGE(envelope_editor->sustain_y)); release_x = gtk_range_get_value(GTK_RANGE(envelope_editor->release_x)); release_y = gtk_range_get_value(GTK_RANGE(envelope_editor->release_y)); ratio = gtk_range_get_value(GTK_RANGE(envelope_editor->ratio)); /* notation */ pthread_mutex_lock(audio_mutex); notation = audio->notation; /* set attack, decay, sustain and release */ while(notation != NULL){ selection = AGS_NOTATION(notation->data)->selection; while(selection != NULL){ AGS_NOTE(selection->data)->flags |= AGS_NOTE_ENVELOPE; z = attack_x + I * attack_y; ags_complex_set(&(AGS_NOTE(selection->data)->attack), z); z = decay_x + I * decay_y; ags_complex_set(&(AGS_NOTE(selection->data)->decay), z); z = sustain_x + I * sustain_y; ags_complex_set(&(AGS_NOTE(selection->data)->sustain), z); z = release_x + I * release_y; ags_complex_set(&(AGS_NOTE(selection->data)->release), z); z = I * ratio; ags_complex_set(&(AGS_NOTE(selection->data)->ratio), z); selection = selection->next; } notation = notation->next; } pthread_mutex_unlock(audio_mutex); } void ags_envelope_editor_reset(AgsApplicable *applicable) { AgsEnvelopeEditor *envelope_editor; envelope_editor = AGS_ENVELOPE_EDITOR(applicable); ags_envelope_editor_load_preset(envelope_editor); } gchar* ags_envelope_editor_x_label_func(gdouble value, gpointer data) { gchar *format; gchar *str; format = g_strdup_printf("%%.%df", (guint) ceil(AGS_CARTESIAN(data)->y_label_precision)); str = g_strdup_printf(format, value / 10.0); g_free(format); return(str); } gchar* ags_envelope_editor_y_label_func(gdouble value, gpointer data) { gchar *format; gchar *str; format = g_strdup_printf("%%.%df", (guint) ceil(AGS_CARTESIAN(data)->y_label_precision)); str = g_strdup_printf(format, value / 10.0); g_free(format); return(str); } /** * ags_envelope_editor_get_active_preset: * @envelope_editor: the #AgsEnvelopeEditor * * Get active preset. * * Returns: the matching #AgsPreset, if none selected %NULL * * Since: 1.0.0 */ AgsPreset* ags_envelope_editor_get_active_preset(AgsEnvelopeEditor *envelope_editor) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsPreset *current; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *preset; gchar *preset_name; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_ENVELOPE_EDITOR(envelope_editor)){ return(NULL); } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(envelope_editor, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* preset name */ preset_name = gtk_combo_box_text_get_active_text(envelope_editor->preset); /* find preset */ pthread_mutex_lock(audio_mutex); preset = audio->preset; current = NULL; preset = ags_preset_find_name(preset, preset_name); g_free(preset_name); if(preset != NULL){ current = preset->data; } pthread_mutex_unlock(audio_mutex); return(current); } /** * ags_envelope_editor_load_preset: * @envelope_editor: the #AgsPatternEnvelope * * Load preset. * * Since: 1.0.0 */ void ags_envelope_editor_load_preset(AgsEnvelopeEditor *envelope_editor) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; GtkTreeModel *model; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *preset; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_ENVELOPE_EDITOR(envelope_editor)){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(envelope_editor, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get model */ model = GTK_TREE_MODEL(gtk_combo_box_get_model(envelope_editor->preset)); /* clear old */ gtk_list_store_clear(GTK_LIST_STORE(model)); /* create new */ pthread_mutex_lock(audio_mutex); preset = audio->preset; while(preset != NULL){ if(AGS_PRESET(preset->data)->preset_name != NULL){ gtk_combo_box_text_append_text(envelope_editor->preset, AGS_PRESET(preset->data)->preset_name); } preset = preset->next; } pthread_mutex_unlock(audio_mutex); } /** * ags_envelope_editor_add_preset: * @envelope_editor: the #AgsPatternEnvelope * @preset_name: the preset name * * Add preset. * * Since: 1.0.0 */ void ags_envelope_editor_add_preset(AgsEnvelopeEditor *envelope_editor, gchar *preset_name) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsPreset *preset; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; AgsComplex *val; GValue value = {0,}; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_ENVELOPE_EDITOR(envelope_editor) || preset_name == NULL){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(envelope_editor, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* check if already present */ pthread_mutex_lock(audio_mutex); if(ags_preset_find_name(audio->preset, preset_name) != NULL){ pthread_mutex_unlock(audio_mutex); return; } /* create preset */ preset = g_object_new(AGS_TYPE_PRESET, "scope", "ags-envelope", "preset-name", preset_name, NULL); ags_audio_add_preset(audio, preset); /* preset - attack */ val = ags_complex_alloc(); ags_complex_set(val, 0.25 + I * 1.0); g_value_init(&value, AGS_TYPE_COMPLEX); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "attack", &value); /* preset - decay */ val = ags_complex_alloc(); ags_complex_set(val, 0.25 + I * 1.0); g_value_reset(&value); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "decay", &value); /* preset - sustain */ val = ags_complex_alloc(); ags_complex_set(val, 0.25 + I * 1.0); g_value_reset(&value); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "sustain", &value); /* preset - release */ val = ags_complex_alloc(); ags_complex_set(val, 0.25 + I * 1.0); g_value_reset(&value); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "release", &value); /* preset - ratio */ val = ags_complex_alloc(); ags_complex_set(val, 0.0); g_value_reset(&value); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "ratio", &value); /* release mutex */ pthread_mutex_unlock(audio_mutex); } /** * ags_envelope_editor_remove_preset: * @envelope_editor: the #AgsPatternEnvelope * @nth: the nth preset to remove * * Remove preset. * * Since: 1.0.0 */ void ags_envelope_editor_remove_preset(AgsEnvelopeEditor *envelope_editor, guint nth) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsPreset *preset; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_ENVELOPE_EDITOR(envelope_editor)){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(envelope_editor, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove preset */ pthread_mutex_lock(audio_mutex); preset = g_list_nth_data(audio->preset, nth); pthread_mutex_unlock(audio_mutex); ags_audio_remove_preset(audio, preset); } /** * ags_envelope_editor_reset_control: * @envelope_editor: the #AgsEnvelopeEditor * * Reset controls. * * Since: 1.0.0 */ void ags_envelope_editor_reset_control(AgsEnvelopeEditor *envelope_editor) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsPreset *preset; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; AgsComplex *val; complex z; GValue value = {0,}; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_ENVELOPE_EDITOR(envelope_editor)){ return; } /* disable update */ envelope_editor->flags |= AGS_ENVELOPE_EDITOR_NO_UPDATE; /* check preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ envelope_editor->flags &= (~AGS_ENVELOPE_EDITOR_NO_UPDATE); return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(envelope_editor, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* attack */ pthread_mutex_lock(audio_mutex); g_value_init(&value, AGS_TYPE_COMPLEX); error = NULL; ags_preset_get_parameter(preset, "attack", &value, &error); if(error != NULL){ g_warning("%s", error->message); envelope_editor->flags &= (~AGS_ENVELOPE_EDITOR_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); z = ags_complex_get(val); gtk_range_set_value(envelope_editor->attack_x, creal(z)); gtk_range_set_value(envelope_editor->attack_y, cimag(z)); /* decay */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset, "decay", &value, &error); if(error != NULL){ g_warning("%s", error->message); envelope_editor->flags &= (~AGS_ENVELOPE_EDITOR_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); z = ags_complex_get(val); gtk_range_set_value(envelope_editor->decay_x, creal(z)); gtk_range_set_value(envelope_editor->decay_y, cimag(z)); /* sustain */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset, "sustain", &value, &error); if(error != NULL){ g_warning("%s", error->message); envelope_editor->flags &= (~AGS_ENVELOPE_EDITOR_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); z = ags_complex_get(val); gtk_range_set_value(envelope_editor->sustain_x, creal(z)); gtk_range_set_value(envelope_editor->sustain_y, cimag(z)); /* release */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset, "release", &value, &error); if(error != NULL){ g_warning("%s", error->message); envelope_editor->flags &= (~AGS_ENVELOPE_EDITOR_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); z = ags_complex_get(val); gtk_range_set_value(envelope_editor->release_x, creal(z)); gtk_range_set_value(envelope_editor->release_y, cimag(z)); /* ratio */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset, "ratio", &value, &error); if(error != NULL){ g_warning("%s", error->message); envelope_editor->flags &= (~AGS_ENVELOPE_EDITOR_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); z = ags_complex_get(val); gtk_range_set_value(envelope_editor->ratio, cimag(z)); /* unset no update */ envelope_editor->flags &= (~AGS_ENVELOPE_EDITOR_NO_UPDATE); pthread_mutex_unlock(audio_mutex); } /** * ags_envelope_editor_plot: * @envelope_editor: the #AgsEnvelopeEditor * * Plot envelope. * * Since: 1.0.0 */ void ags_envelope_editor_plot(AgsEnvelopeEditor *envelope_editor) { AgsCartesian *cartesian; AgsPlot *plot; gdouble width, height; gdouble default_width, default_height; gdouble attack_x, attack_y; gdouble decay_x, decay_y; gdouble sustain_x, sustain_y; gdouble release_x, release_y; gdouble ratio; gdouble offset; if(!AGS_IS_ENVELOPE_EDITOR(envelope_editor)){ return; } cartesian = envelope_editor->cartesian; plot = cartesian->plot->data; width = (gdouble) cartesian->x_end - cartesian->x_start; height = (gdouble) cartesian->y_end - cartesian->y_start; default_width = cartesian->x_step_width * cartesian->x_scale_step_width; default_height = cartesian->y_step_height * cartesian->y_scale_step_height; attack_x = gtk_range_get_value(envelope_editor->attack_x); attack_y = gtk_range_get_value(envelope_editor->attack_y); decay_x = gtk_range_get_value(envelope_editor->decay_x); decay_y = gtk_range_get_value(envelope_editor->decay_y); sustain_x = gtk_range_get_value(envelope_editor->sustain_x); sustain_y = gtk_range_get_value(envelope_editor->sustain_y); release_x = gtk_range_get_value(envelope_editor->release_x); release_y = gtk_range_get_value(envelope_editor->release_y); ratio = gtk_range_get_value(envelope_editor->ratio); /* reset plot points */ plot->point[0][0] = 0.0; plot->point[0][1] = default_height * ratio; plot->point[1][0] = default_width * attack_x; plot->point[1][1] = default_height * (attack_y + ratio); offset = default_width * attack_x; plot->point[2][0] = offset + default_width * decay_x; plot->point[2][1] = default_height * (decay_y + ratio); offset += default_width * decay_x; plot->point[3][0] = offset + default_width * sustain_x; plot->point[3][1] = default_height * (sustain_y + ratio); offset += default_width * sustain_x; plot->point[4][0] = offset + default_width * release_x; plot->point[4][1] = default_height * (release_y + ratio); /* redraw */ gtk_widget_queue_draw(cartesian); } /** * ags_envelope_editor_new: * * Creates an #AgsEnvelopeEditor * * Returns: a new #AgsEnvelopeEditor * * Since: 1.0.0 */ AgsEnvelopeEditor* ags_envelope_editor_new() { AgsEnvelopeEditor *envelope_editor; envelope_editor = (AgsEnvelopeEditor *) g_object_new(AGS_TYPE_ENVELOPE_EDITOR, NULL); return(envelope_editor); } gsequencer-1.4.24/ags/X/editor/ags_pattern_envelope_callbacks.h0000644000175000017500000000712413246707333021523 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PATTERN_ENVELOPE_CALLBACKS_H__ #define __AGS_PATTERN_ENVELOPE_CALLBACKS_H__ #include #include #include #include void ags_pattern_envelope_edit_callback(GtkCellRendererToggle *cell_renderer, gchar *path_str, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_plot_callback(GtkCellRendererToggle *cell_renderer, gchar *path_str, AgsPatternEnvelope *pattern_envelope); /* range */ void ags_pattern_envelope_audio_channel_start_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_audio_channel_end_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_pad_start_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_pad_end_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_x_start_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_x_end_callback(GtkWidget *spin_button, AgsPatternEnvelope *pattern_envelope); /* envelope */ void ags_pattern_envelope_attack_x_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_attack_y_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_decay_x_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_decay_y_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_sustain_x_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_sustain_y_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_release_x_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_release_y_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_ratio_callback(GtkWidget *range, AgsPatternEnvelope *pattern_envelope); /* actions */ void ags_pattern_envelope_preset_move_up_callback(GtkWidget *button, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_preset_move_down_callback(GtkWidget *button, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_preset_add_callback(GtkWidget *button, AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_preset_remove_callback(GtkWidget *button, AgsPatternEnvelope *pattern_envelope); int ags_pattern_envelope_preset_rename_response_callback(GtkWidget *widget, gint response, AgsPatternEnvelope *pattern_envelope); #endif /*__AGS_PATTERN_ENVELOPE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_scrolled_automation_edit_box.h0000644000175000017500000000467313247044247022103 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SCROLLED_AUTOMATION_EDIT_BOX_H__ #define __AGS_SCROLLED_AUTOMATION_EDIT_BOX_H__ #include #include #include #include #define AGS_TYPE_SCROLLED_AUTOMATION_EDIT_BOX (ags_scrolled_automation_edit_box_get_type()) #define AGS_SCROLLED_AUTOMATION_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SCROLLED_AUTOMATION_EDIT_BOX, AgsScrolledAutomationEditBox)) #define AGS_SCROLLED_AUTOMATION_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SCROLLED_AUTOMATION_EDIT_BOX, AgsScrolledAutomationEditBoxClass)) #define AGS_IS_SCROLLED_AUTOMATION_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SCROLLED_AUTOMATION_EDIT_BOX)) #define AGS_IS_SCROLLED_AUTOMATION_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SCROLLED_AUTOMATION_EDIT_BOX)) #define AGS_SCROLLED_AUTOMATION_EDIT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SCROLLED_AUTOMATION_EDIT_BOX, AgsScrolledAutomationEditBoxClass)) typedef struct _AgsScrolledAutomationEditBox AgsScrolledAutomationEditBox; typedef struct _AgsScrolledAutomationEditBoxClass AgsScrolledAutomationEditBoxClass; struct _AgsScrolledAutomationEditBox { GtkBin bin; guint margin_top; guint margin_bottom; guint margin_left; guint margin_right; GtkViewport *viewport; AgsAutomationEditBox *automation_edit_box; }; struct _AgsScrolledAutomationEditBoxClass { GtkBinClass bin; }; GType ags_scrolled_automation_edit_box_get_type(void); AgsScrolledAutomationEditBox* ags_scrolled_automation_edit_box_new(); #endif /*__AGS_SCROLLED_AUTOMATION_EDIT_BOX_H__*/ gsequencer-1.4.24/ags/X/editor/ags_select_acceleration_dialog_callbacks.c0000644000175000017500000001004513246707333023447 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_select_acceleration_dialog_response_callback(GtkWidget *dialog, gint response, AgsSelectAccelerationDialog *select_acceleration_dialog) { gboolean hide_dialog; hide_dialog = TRUE; switch(response){ case GTK_RESPONSE_APPLY: { hide_dialog = FALSE; } case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(select_acceleration_dialog)); } case GTK_RESPONSE_CANCEL: { if(hide_dialog){ gtk_widget_hide(select_acceleration_dialog); } } } } void ags_select_acceleration_dialog_add_callback(GtkWidget *button, AgsSelectAccelerationDialog *select_acceleration_dialog) { AgsWindow *window; AgsAutomationEditor *automation_editor; AgsMachine *machine; GtkHBox *hbox; GtkComboBoxText *combo_box; GtkButton *remove; AgsAudio *audio; AgsMutexManager *mutex_manager; gchar **specifier; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; window = AGS_WINDOW(select_acceleration_dialog->main_window); automation_editor = window->automation_window->automation_editor; machine = automation_editor->selected_machine; audio = machine->audio; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* select automation */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) select_acceleration_dialog->port, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* automation combo box */ combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(combo_box), FALSE, FALSE, 0); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(audio_mutex); specifier = ags_automation_get_specifier_unique(audio->automation); for(; *specifier != NULL; specifier++){ gtk_combo_box_text_append_text(combo_box, g_strdup(*specifier)); } pthread_mutex_unlock(audio_mutex); /* remove button */ remove = (GtkCheckButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_box_pack_start((GtkBox *) hbox, remove, FALSE, FALSE, 0); gtk_widget_show_all(hbox); g_signal_connect(remove, "clicked", G_CALLBACK(ags_select_acceleration_dialog_remove_callback), select_acceleration_dialog); } void ags_select_acceleration_dialog_remove_callback(GtkWidget *button, AgsSelectAccelerationDialog *select_acceleration_dialog) { gtk_widget_destroy(button->parent); } void ags_select_acceleration_dialog_machine_changed_callback(AgsAutomationEditor *automation_editor, AgsMachine *machine, AgsSelectAccelerationDialog *select_acceleration_dialog) { ags_applicable_reset(AGS_APPLICABLE(select_acceleration_dialog)); } gsequencer-1.4.24/ags/X/editor/ags_wave_edit_box.h0000644000175000017500000000402213247044247016762 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WAVE_EDIT_BOX_H__ #define __AGS_WAVE_EDIT_BOX_H__ #include #include #include #define AGS_TYPE_WAVE_EDIT_BOX (ags_wave_edit_box_get_type()) #define AGS_WAVE_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WAVE_EDIT_BOX, AgsWaveEditBox)) #define AGS_WAVE_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_WAVE_EDIT_BOX, AgsWaveEditBoxClass)) #define AGS_IS_WAVE_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_WAVE_EDIT_BOX)) #define AGS_IS_WAVE_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_WAVE_EDIT_BOX)) #define AGS_WAVE_EDIT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_WAVE_EDIT_BOX, AgsWaveEditBoxClass)) #define AGS_WAVE_EDIT_BOX_DEFAULT_FIXED_EDIT_HEIGHT (128) typedef struct _AgsWaveEditBox AgsWaveEditBox; typedef struct _AgsWaveEditBoxClass AgsWaveEditBoxClass; typedef enum{ AGS_WAVE_EDIT_BOX_FIXED_EDIT_SIZE = 1, }AgsWaveEditBoxFlags; struct _AgsWaveEditBox { GtkBox box; guint flags; guint fixed_edit_height; }; struct _AgsWaveEditBoxClass { GtkBoxClass box; }; GType ags_wave_edit_box_get_type(void); AgsWaveEditBox* ags_wave_edit_box_new(); #endif /*__AGS_WAVE_EDIT_BOX_H__*/ gsequencer-1.4.24/ags/X/editor/ags_machine_selector.h0000644000175000017500000000571113246707333017456 00000000000000/* 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 . */ #ifndef __AGS_MACHINE_SELECTOR_H__ #define __AGS_MACHINE_SELECTOR_H__ #include #include #include #include #define AGS_TYPE_MACHINE_SELECTOR (ags_machine_selector_get_type()) #define AGS_MACHINE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MACHINE_SELECTOR, AgsMachineSelector)) #define AGS_MACHINE_SELECTOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MACHINE_SELECTOR, AgsMachineSelectorClass)) #define AGS_IS_MACHINE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MACHINE_SELECTOR)) #define AGS_IS_MACHINE_SELECTOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MACHINE_SELECTOR)) #define AGS_MACHINE_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_MACHINE_SELECTOR, AgsMachineSelectorClass)) typedef struct _AgsMachineSelector AgsMachineSelector; typedef struct _AgsMachineSelectorClass AgsMachineSelectorClass; typedef enum{ AGS_MACHINE_SELECTOR_CONNECTED = 1, AGS_MACHINE_SELECTOR_SHOW_REVERSE_MAPPING = 1 << 1, AGS_MACHINE_SELECTOR_SHOW_SHIFT_PIANO = 1 << 2, AGS_MACHINE_SELECTOR_NOTATION = 1 << 3, AGS_MACHINE_SELECTOR_AUTOMATION = 1 << 4, }AgsMachineSelectorFlags; struct _AgsMachineSelector { GtkVBox vbox; guint flags; GtkLabel *label; GtkMenuToolButton *menu_button; GtkMenu *popup; GtkWidget *current; GtkDialog *machine_selection; }; struct _AgsMachineSelectorClass { GtkVBoxClass vbox; void (*changed)(AgsMachineSelector *machine_selector, AgsMachine *machine); }; GType ags_machine_selector_get_type(void); void ags_machine_selector_add_index(AgsMachineSelector *machine_selector); void ags_machine_selector_remove_index(AgsMachineSelector *machine_selector, guint nth); void ags_machine_selector_link_index(AgsMachineSelector *machine_selector, AgsMachine *machine); void ags_machine_selector_changed(AgsMachineSelector *machine_selector, AgsMachine *machine); GtkMenu* ags_machine_selector_popup_new(AgsMachineSelector *machine_selector); AgsMachineSelector* ags_machine_selector_new(); #endif /*__AGS_MACHINE_SELECTOR_H__*/ gsequencer-1.4.24/ags/X/editor/ags_scrolled_automation_edit_box.c0000644000175000017500000002454013247044247022071 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_scrolled_automation_edit_box_class_init(AgsScrolledAutomationEditBoxClass *scrolled_automation_edit_box); void ags_scrolled_automation_edit_box_init(AgsScrolledAutomationEditBox *scrolled_automation_edit_box); void ags_scrolled_automation_edit_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_scrolled_automation_edit_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_scrolled_automation_edit_box_finalize(GObject *gobject); void ags_scrolled_automation_edit_box_size_allocate(GtkWidget *widget, GtkAllocation *allocation); void ags_scrolled_automation_edit_box_size_request(GtkWidget *widget, GtkRequisition *requisition); /** * SECTION:ags_scrolled_automation_edit_box * @short_description: scrolled automation_edit box widget * @title: AgsScrolledAutomationEditBox * @section_id: * @include: ags/widget/ags_scrolled_automation_edit_box.h * * The #AgsScrolledAutomationEditBox lets you to have a scrolled automation_edit box widget. */ enum{ PROP_0, PROP_MARGIN_TOP, PROP_MARGIN_BOTTOM, PROP_MARGIN_LEFT, PROP_MARGIN_RIGHT, }; static gpointer ags_scrolled_automation_edit_box_parent_class = NULL; GType ags_scrolled_automation_edit_box_get_type(void) { static GType ags_type_scrolled_automation_edit_box = 0; if(!ags_type_scrolled_automation_edit_box){ static const GTypeInfo ags_scrolled_automation_edit_box_info = { sizeof (AgsScrolledAutomationEditBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_scrolled_automation_edit_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsScrolledAutomationEditBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_scrolled_automation_edit_box_init, }; ags_type_scrolled_automation_edit_box = g_type_register_static(GTK_TYPE_BIN, "AgsScrolledAutomationEditBox", &ags_scrolled_automation_edit_box_info, 0); } return(ags_type_scrolled_automation_edit_box); } void ags_scrolled_automation_edit_box_class_init(AgsScrolledAutomationEditBoxClass *scrolled_automation_edit_box) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_scrolled_automation_edit_box_parent_class = g_type_class_peek_parent(scrolled_automation_edit_box); /* GObjectClass */ gobject = (GObjectClass *) scrolled_automation_edit_box; gobject->set_property = ags_scrolled_automation_edit_box_set_property; gobject->get_property = ags_scrolled_automation_edit_box_get_property; gobject->finalize = ags_scrolled_automation_edit_box_finalize; /* properties */ /** * AgsScrolledAutomationEditBox:margin-top: * * The margin top. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("margin-top", "margin top", "The margin top", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_TOP, param_spec); /** * AgsScrolledAutomationEditBox:margin-bottom: * * The margin bottom. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("margin-bottom", "margin bottom", "The margin bottom", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_BOTTOM, param_spec); /** * AgsScrolledAutomationEditBox:margin-left: * * The margin left. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("margin-left", "margin left", "The margin left", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_LEFT, param_spec); /** * AgsScrolledAutomationEditBox:margin-right: * * The margin right. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("margin-right", "margin right", "The margin right", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_RIGHT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) scrolled_automation_edit_box; widget->size_request = ags_scrolled_automation_edit_box_size_request; widget->size_allocate = ags_scrolled_automation_edit_box_size_allocate; } void ags_scrolled_automation_edit_box_init(AgsScrolledAutomationEditBox *scrolled_automation_edit_box) { scrolled_automation_edit_box->margin_top = 0; scrolled_automation_edit_box->margin_bottom = 0; scrolled_automation_edit_box->margin_left = 0; scrolled_automation_edit_box->margin_right = 0; /* viewport */ scrolled_automation_edit_box->viewport = gtk_viewport_new(NULL, NULL); g_object_set(scrolled_automation_edit_box->viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_container_add(scrolled_automation_edit_box, scrolled_automation_edit_box->viewport); /* automation_edit box */ scrolled_automation_edit_box->automation_edit_box = NULL; #if 0 scrolled_automation_edit_box->automation_edit_box = ags_vautomation_edit_box_new(); gtk_container_add(scrolled_automation_edit_box->viewport, scrolled_automation_edit_box->automation_edit_box); #endif } void ags_scrolled_automation_edit_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsScrolledAutomationEditBox *scrolled_automation_edit_box; scrolled_automation_edit_box = AGS_SCROLLED_AUTOMATION_EDIT_BOX(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { scrolled_automation_edit_box->margin_top = g_value_get_uint(value); } break; case PROP_MARGIN_BOTTOM: { scrolled_automation_edit_box->margin_bottom = g_value_get_uint(value); } break; case PROP_MARGIN_LEFT: { scrolled_automation_edit_box->margin_left = g_value_get_uint(value); } break; case PROP_MARGIN_RIGHT: { scrolled_automation_edit_box->margin_right = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_automation_edit_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsScrolledAutomationEditBox *scrolled_automation_edit_box; scrolled_automation_edit_box = AGS_SCROLLED_AUTOMATION_EDIT_BOX(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { g_value_set_uint(value, scrolled_automation_edit_box->margin_top); } break; case PROP_MARGIN_BOTTOM: { g_value_set_uint(value, scrolled_automation_edit_box->margin_bottom); } break; case PROP_MARGIN_LEFT: { g_value_set_uint(value, scrolled_automation_edit_box->margin_left); } break; case PROP_MARGIN_RIGHT: { g_value_set_uint(value, scrolled_automation_edit_box->margin_right); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_automation_edit_box_finalize(GObject *gobject) { AgsScrolledAutomationEditBox *scrolled_automation_edit_box; scrolled_automation_edit_box = AGS_SCROLLED_AUTOMATION_EDIT_BOX(gobject); /* call parent */ G_OBJECT_CLASS(ags_scrolled_automation_edit_box_parent_class)->finalize(gobject); } void ags_scrolled_automation_edit_box_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsScrolledAutomationEditBox *scrolled_automation_edit_box; GtkAllocation child_allocation; GtkRequisition child_requisition; scrolled_automation_edit_box = AGS_SCROLLED_AUTOMATION_EDIT_BOX(widget); widget->allocation = *allocation; widget->allocation.height = AGS_SCALE_DEFAULT_HEIGHT; /* viewport allocation */ gtk_widget_get_child_requisition((GtkWidget *) scrolled_automation_edit_box->viewport, &child_requisition); child_allocation.x = allocation->x; child_allocation.y = allocation->y; child_allocation.width = allocation->width; child_allocation.height = allocation->height; gtk_widget_size_allocate((GtkWidget *) scrolled_automation_edit_box->viewport, &child_allocation); /* box */ gtk_widget_get_child_requisition((GtkWidget *) scrolled_automation_edit_box->automation_edit_box, &child_requisition); child_allocation.x = 0; child_allocation.y = 0; child_allocation.width = allocation->width; child_allocation.height = child_requisition.height; gtk_widget_size_allocate((GtkWidget *) scrolled_automation_edit_box->automation_edit_box, &child_allocation); } void ags_scrolled_automation_edit_box_size_request(GtkWidget *widget, GtkRequisition *requisition) { GtkRequisition child_requisition; GtkOrientation orientation; requisition->width = AGS_SCALE_DEFAULT_HEIGHT; requisition->height = AGS_SCALE_DEFAULT_HEIGHT; gtk_widget_size_request(gtk_bin_get_child((GtkContainer *) widget), &child_requisition); } /** * ags_scrolled_automation_edit_box_new: * * Create a new #AgsScrolledAutomationEditBox. * * Returns: a new #AgsScrolledAutomationEditBox * * Since: 1.3.0 */ AgsScrolledAutomationEditBox* ags_scrolled_automation_edit_box_new() { AgsScrolledAutomationEditBox *scrolled_automation_edit_box; scrolled_automation_edit_box = (AgsScrolledAutomationEditBox *) g_object_new(AGS_TYPE_SCROLLED_AUTOMATION_EDIT_BOX, NULL); return(scrolled_automation_edit_box); } gsequencer-1.4.24/ags/X/editor/ags_file_selection.c0000644000175000017500000003103413246707333017126 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_file_selection_class_init(AgsFileSelectionClass *file_selection); void ags_file_selection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_file_selection_init(AgsFileSelection *file_selection); void ags_file_selection_connect(AgsConnectable *connectable); void ags_file_selection_disconnect(AgsConnectable *connectable); static void ags_file_selection_finalize(GObject *gobject); void ags_file_selection_show(GtkWidget *widget); void ags_file_selection_real_add_entry(AgsFileSelection *file_selection, GtkWidget *widget); void ags_file_selection_real_remove_entry(AgsFileSelection *file_selection, GtkWidget *widget); void ags_file_selection_real_completed(AgsFileSelection *file_selection); enum{ ADD_ENTRY, REMOVE_ENTRY, COMPLETED, LAST_SIGNAL, }; static gpointer ags_file_selection_parent_class = NULL; static guint file_selection_signals[LAST_SIGNAL]; GType ags_file_selection_get_type(void) { static GType ags_type_file_selection = 0; if(!ags_type_file_selection){ static const GTypeInfo ags_file_selection_info = { sizeof (AgsFileSelectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_file_selection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFileSelection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_file_selection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_file_selection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_file_selection = g_type_register_static(GTK_TYPE_VBOX, "AgsFileSelection", &ags_file_selection_info, 0); g_type_add_interface_static(ags_type_file_selection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_file_selection); } void ags_file_selection_class_init(AgsFileSelectionClass *file_selection) { GObjectClass *gobject; GtkWidgetClass *widget; ags_file_selection_parent_class = g_type_class_peek_parent(file_selection); /* GtkObjectClass */ gobject = (GObjectClass *) file_selection; gobject->finalize = ags_file_selection_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) file_selection; widget->show = ags_file_selection_show; /* AgsFileSelectionClass */ file_selection->add_entry = ags_file_selection_real_add_entry; file_selection->remove_entry = ags_file_selection_real_remove_entry; file_selection->completed = NULL; file_selection_signals[ADD_ENTRY] = g_signal_new("add_entry", G_TYPE_FROM_CLASS(file_selection), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileSelectionClass, add_entry), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); file_selection_signals[REMOVE_ENTRY] = g_signal_new("remove_entry", G_TYPE_FROM_CLASS(file_selection), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileSelectionClass, remove_entry), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); file_selection_signals[COMPLETED] = g_signal_new("completed", G_TYPE_FROM_CLASS(file_selection), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsFileSelectionClass, completed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_file_selection_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_file_selection_connect; connectable->disconnect = ags_file_selection_disconnect; } void ags_file_selection_init(AgsFileSelection *file_selection) { GtkHBox *hbox; GtkLabel *label; file_selection->flags = 0; file_selection->directory = NULL; file_selection->entry_count = 0; file_selection->entry = NULL; hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_end(GTK_BOX(file_selection), GTK_WIDGET(hbox), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new("Choosed: "); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); file_selection->chosed = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", g_strdup_printf("%d", 0), NULL); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(file_selection->chosed), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new("/"); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); file_selection->selected = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", g_strdup_printf("%d", 0), NULL); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(file_selection->selected), FALSE, FALSE, 0); } void ags_file_selection_connect(AgsConnectable *connectable) { AgsFileSelection *file_selection; /* AgsFileSelection */ file_selection = AGS_FILE_SELECTION(connectable); } void ags_file_selection_disconnect(AgsConnectable *connectable) { /* implement me */ } static void ags_file_selection_finalize(GObject *gobject) { AgsFileSelection *file_selection; file_selection = (AgsFileSelection *) gobject; /* free directory string */ if(file_selection->directory != NULL) free(file_selection->directory); /* free entries */ g_list_free_full(file_selection->entry, g_free); /* call finalize of parent class */ G_OBJECT_CLASS(ags_file_selection_parent_class)->finalize(gobject); } void ags_file_selection_show(GtkWidget *widget) { AgsFileSelection *file_selection; file_selection = (AgsFileSelection *) widget; GTK_WIDGET_CLASS(ags_file_selection_parent_class)->show(widget); } /** * ags_file_selection_set_entry: * @file_selection: an #AgsFileSelection * @entry_list: a #GList * * Add new entries to the #AgsFileSelection. */ void ags_file_selection_set_entry(AgsFileSelection *file_selection, GList *entry_list) { AgsFileSelectionEntry *entry; auto GtkTable* ags_file_selection_set_entry_new_entry(); GtkTable* ags_file_selection_set_entry_new_entry(){ GtkTable *table; GtkTable *range_table; GtkLabel *label; GtkButton *remove; AgsInlinePlayer *inline_player; table = (GtkTable *) gtk_table_new(3, 3, FALSE); /* the range buttons */ range_table = (GtkTable *) gtk_table_new(2, 3, FALSE); gtk_table_attach(table, GTK_WIDGET(range_table), 1, 3, 0, 1, GTK_FILL, GTK_FILL, 0, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", "nth sample: ", "xalign", 0.0, NULL); gtk_table_attach(range_table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", "nth channel: ", "xalign", 0.0, NULL); gtk_table_attach(range_table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", "count: ", "xalign", 0.0, NULL); gtk_table_attach(range_table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); entry->nth_sample = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65534.0, 1.0); gtk_table_attach(range_table, GTK_WIDGET(entry->nth_sample), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); entry->nth_channel = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65534.0, 1.0); gtk_table_attach(range_table, GTK_WIDGET(entry->nth_channel), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); entry->count = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65534.0, 1.0); gtk_table_attach(range_table, GTK_WIDGET(entry->count), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* the remove button */ remove = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_table_attach(table, GTK_WIDGET(remove), 2, 3, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* and it's callback */ g_signal_connect(G_OBJECT(remove), "clicked", G_CALLBACK(ags_file_selection_remove_callback), table); /* create an AgsInlinePlayer */ inline_player = ags_inline_player_new(); gtk_table_attach(table, GTK_WIDGET(inline_player), 0, 1, 2, 3, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); return(table); } while(entry_list != NULL){ if(g_str_has_suffix(AGS_FILE_SELECTION_ENTRY(entry_list->data)->filename, ".sf2")){ entry = AGS_FILE_SELECTION_ENTRY(entry_list->data); entry->table = ags_file_selection_set_entry_new_entry(); entry->entry = (GtkWidget *) ags_sf2_chooser_new(); gtk_table_attach(entry->table, GTK_WIDGET(entry->entry), 0, 1, 0, 2, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); ags_sf2_chooser_open(AGS_SF2_CHOOSER(entry->entry), entry->filename); ags_file_selection_add_entry(file_selection, (GtkWidget *) entry->table); ags_connectable_connect(AGS_CONNECTABLE(entry->entry)); } entry_list = entry_list->next; } } void ags_file_selection_add_entry(AgsFileSelection *file_selection, GtkWidget *widget) { g_return_if_fail(AGS_IS_FILE_SELECTION(file_selection)); g_object_ref((GObject *) file_selection); g_signal_emit(G_OBJECT(file_selection), file_selection_signals[ADD_ENTRY], 0, widget); g_object_unref((GObject *) file_selection); } void ags_file_selection_real_add_entry(AgsFileSelection *file_selection, GtkWidget *widget) { file_selection->entry_count++; gtk_label_set_text(file_selection->selected, g_strdup_printf("%d", file_selection->entry_count)); gtk_box_pack_start(GTK_BOX(file_selection), widget, FALSE, FALSE, 0); } void ags_file_selection_remove_entry(AgsFileSelection *file_selection, GtkWidget *widget) { g_return_if_fail(AGS_IS_FILE_SELECTION(file_selection)); g_object_ref((GObject *) file_selection); g_signal_emit(G_OBJECT(file_selection), file_selection_signals[REMOVE_ENTRY], 0, widget); g_object_unref((GObject *) file_selection); } void ags_file_selection_real_remove_entry(AgsFileSelection *file_selection, GtkWidget *widget) { file_selection->entry_count--; gtk_label_set_text(file_selection->selected, g_strdup_printf("%d", file_selection->entry_count)); gtk_widget_destroy(widget); } gboolean ags_file_selection_contains_file(AgsFileSelection *file_selection, gchar *filename) { GList *list; list = file_selection->entry; while(list != NULL){ if(!g_strcmp0(list->data, filename)) return(TRUE); } return(FALSE); } void ags_file_selection_completed(AgsFileSelection *file_selection) { g_return_if_fail(AGS_IS_FILE_SELECTION(file_selection)); g_object_ref((GObject *) file_selection); g_signal_emit(G_OBJECT(file_selection), file_selection_signals[COMPLETED], 0); g_object_unref((GObject *) file_selection); } AgsFileSelectionEntry* ags_file_selection_entry_alloc() { AgsFileSelectionEntry *entry; entry = (AgsFileSelectionEntry *) malloc(sizeof(AgsFileSelectionEntry)); entry->table = NULL; entry->entry = NULL; entry->chosed = FALSE; entry->filename = NULL; entry->nth_sample = NULL; entry->nth_channel = NULL; entry->count = NULL; return(entry); } AgsFileSelection* ags_file_selection_new() { AgsFileSelection *file_selection; file_selection = (AgsFileSelection *) g_object_new(AGS_TYPE_FILE_SELECTION, NULL); return(file_selection); } gsequencer-1.4.24/ags/X/editor/ags_wave_edit_callbacks.h0000644000175000017500000000174313247044247020120 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WAVE_EDIT_CALLBACKS_H__ #define __AGS_WAVE_EDIT_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_WAVE_EDIT_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_pattern_envelope.c0000644000175000017500000015114313247044247017517 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_pattern_envelope_class_init(AgsPatternEnvelopeClass *pattern_envelope); void ags_pattern_envelope_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pattern_envelope_applicable_interface_init(AgsApplicableInterface *applicable); void ags_pattern_envelope_init(AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_connect(AgsConnectable *connectable); void ags_pattern_envelope_disconnect(AgsConnectable *connectable); void ags_pattern_envelope_finalize(GObject *gobject); void ags_pattern_envelope_set_update(AgsApplicable *applicable, gboolean update); void ags_pattern_envelope_apply(AgsApplicable *applicable); void ags_pattern_envelope_reset(AgsApplicable *applicable); gchar* ags_pattern_envelope_x_label_func(gdouble value, gpointer data); gchar* ags_pattern_envelope_y_label_func(gdouble value, gpointer data); /** * SECTION:ags_pattern_envelope * @short_description: pack pad editors. * @title: AgsPatternEnvelope * @section_id: * @include: ags/X/editor/ags_pattern_envelope.h * * #AgsPatternEnvelope is a composite widget to show envelope controls * of selected AgsNote. */ static gpointer ags_pattern_envelope_parent_class = NULL; GType ags_pattern_envelope_get_type(void) { static GType ags_type_pattern_envelope = 0; if(!ags_type_pattern_envelope){ static const GTypeInfo ags_pattern_envelope_info = { sizeof (AgsPatternEnvelopeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pattern_envelope_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPatternEnvelope), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pattern_envelope_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pattern_envelope_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_pattern_envelope_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pattern_envelope = g_type_register_static(GTK_TYPE_VBOX, "AgsPatternEnvelope", &ags_pattern_envelope_info, 0); g_type_add_interface_static(ags_type_pattern_envelope, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_pattern_envelope, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_pattern_envelope); } void ags_pattern_envelope_class_init(AgsPatternEnvelopeClass *pattern_envelope) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_pattern_envelope_parent_class = g_type_class_peek_parent(pattern_envelope); /* GObjectClass */ gobject = (GObjectClass *) pattern_envelope; gobject->finalize = ags_pattern_envelope_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) pattern_envelope; } void ags_pattern_envelope_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_pattern_envelope_connect; connectable->disconnect = ags_pattern_envelope_disconnect; } void ags_pattern_envelope_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_pattern_envelope_set_update; applicable->apply = ags_pattern_envelope_apply; applicable->reset = ags_pattern_envelope_reset; } void ags_pattern_envelope_init(AgsPatternEnvelope *pattern_envelope) { GtkTable *table; GtkHBox *hbox; GtkVBox *control; AgsCartesian *cartesian; GtkLabel *label; GtkCellRenderer *edit_renderer; GtkCellRenderer *plot_renderer; GtkCellRenderer *renderer; GtkListStore *model; gdouble width, height; pattern_envelope->flags = 0; pattern_envelope->version = AGS_PATTERN_ENVELOPE_DEFAULT_VERSION; pattern_envelope->build_id = AGS_PATTERN_ENVELOPE_DEFAULT_BUILD_ID; /* enabled */ //NOTE:JK: it is edited in place since only preset is used pattern_envelope->enabled = NULL; // gtk_check_button_new_with_label(i18n("enabled")); // gtk_box_pack_start((GtkBox *) pattern_envelope, // pattern_envelope->enabled, // FALSE, FALSE, // 0); /* cartesian */ cartesian = pattern_envelope->cartesian = ags_cartesian_new(); cartesian->x_label_func = ags_pattern_envelope_x_label_func; cartesian->y_label_func = ags_pattern_envelope_y_label_func; ags_cartesian_fill_label(cartesian, TRUE); ags_cartesian_fill_label(cartesian, FALSE); /* cartesian - width and height */ width = cartesian->x_end - cartesian->x_start; height = cartesian->y_end - cartesian->y_start; /* cartesian - size, pack and redraw */ gtk_widget_set_size_request(cartesian, (gint) width + 2.0 * cartesian->x_margin, (gint) height + 2.0 * cartesian->y_margin); gtk_box_pack_start((GtkBox *) pattern_envelope, (GtkWidget *) cartesian, FALSE, FALSE, 0); gtk_widget_queue_draw(cartesian); /* tree view */ pattern_envelope->tree_view = (GtkTreeView *) gtk_tree_view_new(); g_object_set(pattern_envelope->tree_view, "enable-grid-lines", TRUE, NULL); model = gtk_list_store_new(AGS_PATTERN_ENVELOPE_COLUMN_LAST, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); gtk_tree_view_set_model(pattern_envelope->tree_view, model); edit_renderer = gtk_cell_renderer_toggle_new(); plot_renderer = gtk_cell_renderer_toggle_new(); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(pattern_envelope->tree_view), -1, i18n("edit"), edit_renderer, "active", AGS_PATTERN_ENVELOPE_COLUMN_EDIT, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(pattern_envelope->tree_view), -1, i18n("plot"), plot_renderer, "active", AGS_PATTERN_ENVELOPE_COLUMN_PLOT, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(pattern_envelope->tree_view), -1, i18n("preset"), renderer, "text", AGS_PATTERN_ENVELOPE_COLUMN_PRESET_NAME, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(pattern_envelope->tree_view), -1, i18n("audio channel start"), renderer, "text", AGS_PATTERN_ENVELOPE_COLUMN_AUDIO_CHANNEL_START, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(pattern_envelope->tree_view), -1, i18n("audio channel end"), renderer, "text", AGS_PATTERN_ENVELOPE_COLUMN_AUDIO_CHANNEL_END, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(pattern_envelope->tree_view), -1, i18n("pad start"), renderer, "text", AGS_PATTERN_ENVELOPE_COLUMN_PAD_START, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(pattern_envelope->tree_view), -1, i18n("pad end"), renderer, "text", AGS_PATTERN_ENVELOPE_COLUMN_PAD_END, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(pattern_envelope->tree_view), -1, i18n("x start"), renderer, "text", AGS_PATTERN_ENVELOPE_COLUMN_X_START, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(pattern_envelope->tree_view), -1, i18n("x end"), renderer, "text", AGS_PATTERN_ENVELOPE_COLUMN_X_END, NULL); gtk_box_pack_start((GtkBox *) pattern_envelope, (GtkWidget *) pattern_envelope->tree_view, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(edit_renderer), "toggled\0", G_CALLBACK(ags_pattern_envelope_edit_callback), pattern_envelope); g_signal_connect(G_OBJECT(plot_renderer), "toggled\0", G_CALLBACK(ags_pattern_envelope_plot_callback), pattern_envelope); /* table */ table = (GtkTable *) gtk_table_new(6, 2, FALSE); gtk_box_pack_start((GtkBox *) pattern_envelope, GTK_WIDGET(table), FALSE, FALSE, 0); /* audio channel - start */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("audio channel start"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); pattern_envelope->audio_channel_start = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 0.0, 1.0); gtk_table_attach(table, GTK_WIDGET(pattern_envelope->audio_channel_start), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); /* audio channel - end */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("audio channel end"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); pattern_envelope->audio_channel_end = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65535.0, 1.0); gtk_table_attach(table, GTK_WIDGET(pattern_envelope->audio_channel_end), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* pad - start */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("pad start"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); pattern_envelope->pad_start = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65535.0, 1.0); gtk_table_attach(table, GTK_WIDGET(pattern_envelope->pad_start), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* pad - end */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("pad end"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0); pattern_envelope->pad_end = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65535.0, 1.0); gtk_table_attach(table, GTK_WIDGET(pattern_envelope->pad_end), 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); /* x - start */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("x start"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0); pattern_envelope->x_start = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65535.0, 1.0); gtk_table_attach(table, GTK_WIDGET(pattern_envelope->x_start), 1, 2, 4, 5, GTK_FILL, GTK_FILL, 0, 0); /* x - end */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("x end"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 5, 6, GTK_FILL, GTK_FILL, 0, 0); pattern_envelope->x_end = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65535.0, 1.0); gtk_table_attach(table, GTK_WIDGET(pattern_envelope->x_end), 1, 2, 5, 6, GTK_FILL, GTK_FILL, 0, 0); /* table */ table = (GtkTable *) gtk_table_new(5, 2, FALSE); gtk_box_pack_start((GtkBox *) pattern_envelope, GTK_WIDGET(table), FALSE, FALSE, 0); /* attack */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("attack"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); control = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(control), 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); pattern_envelope->attack_x = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(pattern_envelope->attack_x, TRUE); gtk_range_set_value((GtkRange *) pattern_envelope->attack_x, 0.25); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) pattern_envelope->attack_x, FALSE, FALSE, 0); pattern_envelope->attack_y = (GtkHScale *) gtk_hscale_new_with_range(-1.0, 1.0, 0.001); gtk_scale_set_draw_value(pattern_envelope->attack_y, TRUE); gtk_range_set_value((GtkRange *) pattern_envelope->attack_y, 1.0); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) pattern_envelope->attack_y, FALSE, FALSE, 0); /* decay */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("decay"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); control = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(control), 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); pattern_envelope->decay_x = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(pattern_envelope->decay_x, TRUE); gtk_range_set_value((GtkRange *) pattern_envelope->decay_x, 0.25); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) pattern_envelope->decay_x, FALSE, FALSE, 0); pattern_envelope->decay_y = (GtkHScale *) gtk_hscale_new_with_range(-1.0, 1.0, 0.001); gtk_scale_set_draw_value(pattern_envelope->decay_y, TRUE); gtk_range_set_value((GtkRange *) pattern_envelope->decay_y, 1.0); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) pattern_envelope->decay_y, FALSE, FALSE, 0); /* sustain */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("sustain"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); control = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(control), 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); pattern_envelope->sustain_x = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(pattern_envelope->sustain_x, TRUE); gtk_range_set_value((GtkRange *) pattern_envelope->sustain_x, 0.25); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) pattern_envelope->sustain_x, FALSE, FALSE, 0); pattern_envelope->sustain_y = (GtkHScale *) gtk_hscale_new_with_range(-1.0, 1.0, 0.001); gtk_scale_set_draw_value(pattern_envelope->sustain_y, TRUE); gtk_range_set_value((GtkRange *) pattern_envelope->sustain_y, 1.0); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) pattern_envelope->sustain_y, FALSE, FALSE, 0); /* release */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("release"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0); control = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(control), 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); pattern_envelope->release_x = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(pattern_envelope->release_x, TRUE); gtk_range_set_value((GtkRange *) pattern_envelope->release_x, 0.25); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) pattern_envelope->release_x, FALSE, FALSE, 0); pattern_envelope->release_y = (GtkHScale *) gtk_hscale_new_with_range(-1.0, 1.0, 0.001); gtk_scale_set_draw_value(pattern_envelope->release_y, TRUE); gtk_range_set_value((GtkRange *) pattern_envelope->release_y, 1.0); gtk_box_pack_start((GtkBox *) control, (GtkWidget *) pattern_envelope->release_y, FALSE, FALSE, 0); /* ratio */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("ratio"), "xalign", 0.0, "yalign", 1.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0); pattern_envelope->ratio = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 0.001); gtk_scale_set_draw_value(pattern_envelope->ratio, TRUE); gtk_range_set_value((GtkRange *) pattern_envelope->ratio, 0.0); gtk_table_attach(table, GTK_WIDGET(pattern_envelope->ratio), 1, 2, 4, 5, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); /* rename dialog */ pattern_envelope->rename = NULL; /* hbox - actions */ hbox = (GtkBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) pattern_envelope, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* move up */ pattern_envelope->move_up = (GtkButton *) gtk_button_new_with_label(i18n("move up")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(pattern_envelope->move_up), FALSE, FALSE, 0); /* move down */ pattern_envelope->move_down = (GtkButton *) gtk_button_new_with_label(i18n("move down")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(pattern_envelope->move_down), FALSE, FALSE, 0); /* add */ pattern_envelope->add = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(pattern_envelope->add), FALSE, FALSE, 0); /* remove */ pattern_envelope->remove = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(pattern_envelope->remove), FALSE, FALSE, 0); } void ags_pattern_envelope_connect(AgsConnectable *connectable) { AgsPatternEnvelope *pattern_envelope; pattern_envelope = AGS_PATTERN_ENVELOPE(connectable); if((AGS_PATTERN_ENVELOPE_CONNECTED & (pattern_envelope->flags)) != 0){ return; } pattern_envelope->flags |= AGS_PATTERN_ENVELOPE_CONNECTED; /* audio channel start/end */ g_signal_connect((GObject *) pattern_envelope->audio_channel_start, "value-changed", G_CALLBACK(ags_pattern_envelope_audio_channel_start_callback), (gpointer) pattern_envelope); g_signal_connect((GObject *) pattern_envelope->audio_channel_end, "value-changed", G_CALLBACK(ags_pattern_envelope_audio_channel_end_callback), (gpointer) pattern_envelope); /* pad start/end */ g_signal_connect((GObject *) pattern_envelope->pad_start, "value-changed", G_CALLBACK(ags_pattern_envelope_pad_start_callback), (gpointer) pattern_envelope); g_signal_connect((GObject *) pattern_envelope->pad_end, "value-changed", G_CALLBACK(ags_pattern_envelope_pad_end_callback), (gpointer) pattern_envelope); /* x start/end */ g_signal_connect((GObject *) pattern_envelope->x_start, "value-changed", G_CALLBACK(ags_pattern_envelope_x_start_callback), (gpointer) pattern_envelope); g_signal_connect((GObject *) pattern_envelope->x_end, "value-changed", G_CALLBACK(ags_pattern_envelope_x_end_callback), (gpointer) pattern_envelope); /* attack x,y */ g_signal_connect((GObject *) pattern_envelope->attack_x, "value-changed", G_CALLBACK(ags_pattern_envelope_attack_x_callback), (gpointer) pattern_envelope); g_signal_connect((GObject *) pattern_envelope->attack_y, "value-changed", G_CALLBACK(ags_pattern_envelope_attack_y_callback), (gpointer) pattern_envelope); /* decay x,y */ g_signal_connect((GObject *) pattern_envelope->decay_x, "value-changed", G_CALLBACK(ags_pattern_envelope_decay_x_callback), (gpointer) pattern_envelope); g_signal_connect((GObject *) pattern_envelope->decay_y, "value-changed", G_CALLBACK(ags_pattern_envelope_decay_y_callback), (gpointer) pattern_envelope); /* sustain x,y */ g_signal_connect((GObject *) pattern_envelope->sustain_x, "value-changed", G_CALLBACK(ags_pattern_envelope_sustain_x_callback), (gpointer) pattern_envelope); g_signal_connect((GObject *) pattern_envelope->sustain_y, "value-changed", G_CALLBACK(ags_pattern_envelope_sustain_y_callback), (gpointer) pattern_envelope); /* release x,y */ g_signal_connect((GObject *) pattern_envelope->release_x, "value-changed", G_CALLBACK(ags_pattern_envelope_release_x_callback), (gpointer) pattern_envelope); g_signal_connect((GObject *) pattern_envelope->release_y, "value-changed", G_CALLBACK(ags_pattern_envelope_release_y_callback), (gpointer) pattern_envelope); /* ratio y */ g_signal_connect((GObject *) pattern_envelope->ratio, "value-changed", G_CALLBACK(ags_pattern_envelope_ratio_callback), (gpointer) pattern_envelope); /* move up/down preset */ g_signal_connect((GObject *) pattern_envelope->move_up, "clicked", G_CALLBACK(ags_pattern_envelope_preset_move_up_callback), (gpointer) pattern_envelope); g_signal_connect((GObject *) pattern_envelope->move_down, "clicked", G_CALLBACK(ags_pattern_envelope_preset_move_down_callback), (gpointer) pattern_envelope); /* add/remove preset */ g_signal_connect((GObject *) pattern_envelope->add, "clicked", G_CALLBACK(ags_pattern_envelope_preset_add_callback), (gpointer) pattern_envelope); g_signal_connect((GObject *) pattern_envelope->remove, "clicked", G_CALLBACK(ags_pattern_envelope_preset_remove_callback), (gpointer) pattern_envelope); } void ags_pattern_envelope_disconnect(AgsConnectable *connectable) { AgsPatternEnvelope *pattern_envelope; pattern_envelope = AGS_PATTERN_ENVELOPE(connectable); if((AGS_PATTERN_ENVELOPE_CONNECTED & (pattern_envelope->flags)) == 0){ return; } pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_CONNECTED); /* audio channel start/end */ g_object_disconnect((GObject *) pattern_envelope->audio_channel_start, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_audio_channel_start_callback), (gpointer) pattern_envelope, NULL); g_object_disconnect((GObject *) pattern_envelope->audio_channel_end, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_audio_channel_end_callback), (gpointer) pattern_envelope, NULL); /* pad start/end */ g_object_disconnect((GObject *) pattern_envelope->pad_start, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_pad_start_callback), (gpointer) pattern_envelope, NULL); g_object_disconnect((GObject *) pattern_envelope->pad_end, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_pad_end_callback), (gpointer) pattern_envelope, NULL); /* x start/end */ g_object_disconnect((GObject *) pattern_envelope->x_start, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_x_start_callback), (gpointer) pattern_envelope, NULL); g_object_disconnect((GObject *) pattern_envelope->x_end, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_x_end_callback), (gpointer) pattern_envelope, NULL); /* attack x,y */ g_object_disconnect((GObject *) pattern_envelope->attack_x, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_attack_x_callback), (gpointer) pattern_envelope, NULL); g_object_disconnect((GObject *) pattern_envelope->attack_y, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_attack_y_callback), (gpointer) pattern_envelope, NULL); /* decay x,y */ g_object_disconnect((GObject *) pattern_envelope->decay_x, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_decay_x_callback), (gpointer) pattern_envelope, NULL); g_object_disconnect((GObject *) pattern_envelope->decay_y, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_decay_y_callback), (gpointer) pattern_envelope, NULL); /* sustain x,y */ g_object_disconnect((GObject *) pattern_envelope->sustain_x, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_sustain_x_callback), (gpointer) pattern_envelope, NULL); g_object_disconnect((GObject *) pattern_envelope->sustain_y, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_sustain_y_callback), (gpointer) pattern_envelope, NULL); /* release x,y */ g_object_disconnect((GObject *) pattern_envelope->release_x, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_release_x_callback), (gpointer) pattern_envelope, NULL); g_object_disconnect((GObject *) pattern_envelope->release_y, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_release_y_callback), (gpointer) pattern_envelope, NULL); /* ratio */ g_object_disconnect((GObject *) pattern_envelope->ratio, "any_signal::value-changed", G_CALLBACK(ags_pattern_envelope_ratio_callback), (gpointer) pattern_envelope, NULL); /* move up/down preset */ g_object_disconnect((GObject *) pattern_envelope->move_up, "any_signal::clicked", G_CALLBACK(ags_pattern_envelope_preset_move_up_callback), (gpointer) pattern_envelope, NULL); g_object_disconnect((GObject *) pattern_envelope->move_down, "any_signal::clicked", G_CALLBACK(ags_pattern_envelope_preset_move_down_callback), (gpointer) pattern_envelope, NULL); /* add/remove preset */ g_object_disconnect((GObject *) pattern_envelope->add, "any_signal::clicked", G_CALLBACK(ags_pattern_envelope_preset_add_callback), (gpointer) pattern_envelope, NULL); g_object_disconnect((GObject *) pattern_envelope->remove, "any_signal::clicked", G_CALLBACK(ags_pattern_envelope_preset_remove_callback), (gpointer) pattern_envelope, NULL); } void ags_pattern_envelope_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_pattern_envelope_parent_class)->finalize(gobject); } void ags_pattern_envelope_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_pattern_envelope_apply(AgsApplicable *applicable) { /* empty */ } void ags_pattern_envelope_reset(AgsApplicable *applicable) { AgsPatternEnvelope *pattern_envelope; pattern_envelope = AGS_PATTERN_ENVELOPE(applicable); ags_pattern_envelope_load_preset(pattern_envelope); } gchar* ags_pattern_envelope_x_label_func(gdouble value, gpointer data) { gchar *format; gchar *str; format = g_strdup_printf("%%.%df", (guint) ceil(AGS_CARTESIAN(data)->y_label_precision)); str = g_strdup_printf(format, value / 10.0); g_free(format); return(str); } gchar* ags_pattern_envelope_y_label_func(gdouble value, gpointer data) { gchar *format; gchar *str; format = g_strdup_printf("%%.%df", (guint) ceil(AGS_CARTESIAN(data)->y_label_precision)); str = g_strdup_printf(format, value / 10.0); g_free(format); return(str); } /** * ags_pattern_envelope_get_active_preset: * @pattern_envelope: the #AgsPatternEnvelope * * Get active preset. * * Returns: the matching #AgsPreset, if none selected %NULL * * Since: 1.0.0 */ AgsPreset* ags_pattern_envelope_get_active_preset(AgsPatternEnvelope *pattern_envelope) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; GtkTreeModel *model; GtkTreeIter iter; AgsAudio *audio; AgsPreset *current; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *preset; gchar *preset_name; gboolean do_edit; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_PATTERN_ENVELOPE(pattern_envelope)){ return(NULL); } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get model */ model = gtk_tree_view_get_model(pattern_envelope->tree_view); /* get active */ do_edit = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_EDIT, &do_edit, -1); if(do_edit){ break; } }while(gtk_tree_model_iter_next(model, &iter)); } if(!do_edit){ return(NULL); } /* preset name */ gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_PRESET_NAME, &preset_name, -1); /* find preset */ pthread_mutex_lock(audio_mutex); preset = audio->preset; current = NULL; preset = ags_preset_find_name(preset, preset_name); if(preset != NULL){ current = preset->data; } pthread_mutex_unlock(audio_mutex); return(current); } /** * ags_pattern_envelope_load_preset: * @pattern_envelope: the #AgsPatternEnvelope * * Load preset. * * Since: 1.0.0 */ void ags_pattern_envelope_load_preset(AgsPatternEnvelope *pattern_envelope) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; GtkListStore *model; GtkTreeIter iter; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *preset; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_PATTERN_ENVELOPE(pattern_envelope)){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get model */ model = GTK_LIST_STORE(gtk_tree_view_get_model(pattern_envelope->tree_view)); /* clear old */ gtk_list_store_clear(model); /* create new */ pthread_mutex_lock(audio_mutex); preset = audio->preset; while(preset != NULL){ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_PRESET_NAME, AGS_PRESET(preset->data)->preset_name, AGS_PATTERN_ENVELOPE_COLUMN_AUDIO_CHANNEL_START, AGS_PRESET(preset->data)->audio_channel_start, AGS_PATTERN_ENVELOPE_COLUMN_AUDIO_CHANNEL_END, AGS_PRESET(preset->data)->audio_channel_end, AGS_PATTERN_ENVELOPE_COLUMN_PAD_START, AGS_PRESET(preset->data)->pad_start, AGS_PATTERN_ENVELOPE_COLUMN_PAD_END, AGS_PRESET(preset->data)->pad_end, AGS_PATTERN_ENVELOPE_COLUMN_X_START, AGS_PRESET(preset->data)->x_start, AGS_PATTERN_ENVELOPE_COLUMN_X_END, AGS_PRESET(preset->data)->x_end, -1); preset = preset->next; } pthread_mutex_unlock(audio_mutex); } /** * ags_pattern_envelope_set_preset_property: * @pattern_envelope: the #AgsPatternEnvelope * @preset: the preset name * @property_name: the property name * @value: the #GValue-struct * * Set preset property. * * Since: 1.0.0 */ void ags_pattern_envelope_set_preset_property(AgsPatternEnvelope *pattern_envelope, AgsPreset *preset, gchar *property_name, GValue *value) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_PATTERN_ENVELOPE(pattern_envelope)){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* set property */ pthread_mutex_lock(audio_mutex); g_object_set_property(preset, property_name, value); pthread_mutex_unlock(audio_mutex); /* reset */ ags_pattern_envelope_reset_tree_view(pattern_envelope); } /** * ags_pattern_envelope_add_preset: * @pattern_envelope: the #AgsPatternEnvelope * @preset_name: the preset name * * Add preset. * * Since: 1.0.0 */ void ags_pattern_envelope_add_preset(AgsPatternEnvelope *pattern_envelope, gchar *preset_name) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsPreset *preset; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; AgsComplex *val; GValue value = {0,}; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_PATTERN_ENVELOPE(pattern_envelope) || preset_name == NULL){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* check if already present */ pthread_mutex_lock(audio_mutex); if(ags_preset_find_name(audio->preset, preset_name) != NULL){ pthread_mutex_unlock(audio_mutex); return; } /* create preset */ preset = g_object_new(AGS_TYPE_PRESET, "scope", "ags-envelope", "preset-name", preset_name, NULL); ags_audio_add_preset(audio, preset); /* preset - ratio */ val = ags_complex_alloc(); ags_complex_set(val, 0.0); g_value_init(&value, AGS_TYPE_COMPLEX); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "ratio", &value); /* preset - attack */ val = ags_complex_alloc(); ags_complex_set(val, 0.25 + 1.0 * I); g_value_reset(&value); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "attack", &value); /* preset - decay */ val = ags_complex_alloc(); ags_complex_set(val, 0.25 + 1.0 * I); g_value_reset(&value); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "decay", &value); /* preset - sustain */ val = ags_complex_alloc(); ags_complex_set(val, 0.25 + 1.0 * I); g_value_reset(&value); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "sustain", &value); /* preset - release */ val = ags_complex_alloc(); ags_complex_set(val, 0.25 + 1.0 * I); g_value_reset(&value); g_value_set_boxed(&value, val); ags_preset_add_parameter(preset, "release", &value); /* release mutex */ pthread_mutex_unlock(audio_mutex); } /** * ags_pattern_envelope_remove_preset: * @pattern_envelope: the #AgsPatternEnvelope * @nth: the nth preset to remove * * Remove preset. * * Since: 1.0.0 */ void ags_pattern_envelope_remove_preset(AgsPatternEnvelope *pattern_envelope, guint nth) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsPreset *preset; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_PATTERN_ENVELOPE(pattern_envelope)){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* create preset */ pthread_mutex_lock(audio_mutex); preset = g_list_nth_data(audio->preset, nth); pthread_mutex_unlock(audio_mutex); ags_audio_remove_preset(audio, preset); } /** * ags_pattern_envelope_reset_control: * @pattern_envelope: the #AgsPatternEnvelope * * Reset controls. * * Since: 1.0.0 */ void ags_pattern_envelope_reset_control(AgsPatternEnvelope *pattern_envelope) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsPreset *preset; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; AgsComplex *val; guint audio_channel_start, audio_channel_end; guint pad_start, pad_end; guint x_start, x_end; GValue value = {0,}; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_PATTERN_ENVELOPE(pattern_envelope)){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* disable update */ pattern_envelope->flags |= AGS_PATTERN_ENVELOPE_NO_UPDATE; /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_NO_UPDATE); return; } /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get preset properties */ pthread_mutex_lock(audio_mutex); g_object_get(preset, "audio-channel-start", &audio_channel_start, "audio-channel-end", &audio_channel_end, "pad-start", &pad_start, "pad-end", &pad_end, "x-start", &x_start, "x-end", &x_end, NULL); gtk_spin_button_set_value(pattern_envelope->audio_channel_start, audio_channel_start); gtk_spin_button_set_value(pattern_envelope->audio_channel_end, audio_channel_end); gtk_spin_button_set_value(pattern_envelope->pad_start, pad_start); gtk_spin_button_set_value(pattern_envelope->pad_end, pad_end); gtk_spin_button_set_value(pattern_envelope->x_start, x_start); gtk_spin_button_set_value(pattern_envelope->x_end, x_end); /* attack */ g_value_init(&value, AGS_TYPE_COMPLEX); error = NULL; ags_preset_get_parameter(preset, "attack", &value, &error); if(error != NULL){ g_warning("%s", error->message); pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); gtk_range_set_value(pattern_envelope->attack_x, val[0][0]); gtk_range_set_value(pattern_envelope->attack_y, val[0][1]); /* decay */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset, "decay", &value, &error); if(error != NULL){ g_warning("%s", error->message); pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); gtk_range_set_value(pattern_envelope->decay_x, val[0][0]); gtk_range_set_value(pattern_envelope->decay_y, val[0][1]); /* sustain */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset, "sustain", &value, &error); if(error != NULL){ g_warning("%s", error->message); pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); gtk_range_set_value(pattern_envelope->sustain_x, val[0][0]); gtk_range_set_value(pattern_envelope->sustain_y, val[0][1]); /* release */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset, "release", &value, &error); if(error != NULL){ g_warning("%s", error->message); pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); gtk_range_set_value(pattern_envelope->release_x, val[0][0]); gtk_range_set_value(pattern_envelope->release_y, val[0][1]); /* ratio */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset, "ratio", &value, &error); if(error != NULL){ g_warning("%s", error->message); pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_NO_UPDATE); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); gtk_range_set_value(pattern_envelope->ratio, val[0][1]); /* unset no update */ pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_NO_UPDATE); /* release mutex */ pthread_mutex_unlock(audio_mutex); } /** * ags_pattern_envelope_reset_tree_view: * @pattern_envelope: the #AgsPatternEnvelope * * Reset tree view. * * Since: 1.0.0 */ void ags_pattern_envelope_reset_tree_view(AgsPatternEnvelope *pattern_envelope) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; GtkTreeModel *model; GtkTreeIter iter; AgsAudio *audio; AgsPreset *preset; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; gboolean do_edit; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_PATTERN_ENVELOPE(pattern_envelope)){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* disable update */ pattern_envelope->flags |= AGS_PATTERN_ENVELOPE_NO_UPDATE; /* get preset */ preset = ags_pattern_envelope_get_active_preset(pattern_envelope); if(preset == NULL){ pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_NO_UPDATE); return; } /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get model and get editing iter */ model = gtk_tree_view_get_model(pattern_envelope->tree_view); do_edit = FALSE; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, AGS_PATTERN_ENVELOPE_COLUMN_EDIT, &do_edit, -1); if(do_edit){ break; } }while(gtk_tree_model_iter_next(model, &iter)); } /* update row */ if(do_edit){ guint audio_channel_start, audio_channel_end; guint pad_start, pad_end; guint x_start, x_end; pthread_mutex_lock(audio_mutex); g_object_get(preset, "audio-channel-start", &audio_channel_start, "audio-channel-end", &audio_channel_end, "pad-start", &pad_start, "pad-end", &pad_end, "x-start", &x_start, "x-end", &x_end, NULL); gtk_list_store_set(GTK_LIST_STORE(model), &iter, AGS_PATTERN_ENVELOPE_COLUMN_AUDIO_CHANNEL_START, audio_channel_start, AGS_PATTERN_ENVELOPE_COLUMN_AUDIO_CHANNEL_END, audio_channel_end, AGS_PATTERN_ENVELOPE_COLUMN_PAD_START, pad_start, AGS_PATTERN_ENVELOPE_COLUMN_PAD_END, pad_end, AGS_PATTERN_ENVELOPE_COLUMN_X_START, x_start, AGS_PATTERN_ENVELOPE_COLUMN_X_END, x_end, -1); pthread_mutex_unlock(audio_mutex); } /* unset no update */ pattern_envelope->flags &= (~AGS_PATTERN_ENVELOPE_NO_UPDATE); } /** * ags_pattern_envelope_plot: * @pattern_envelope: the #AgsPatternEnvelope * * Plot envelope. * * Since: 1.0.0 */ void ags_pattern_envelope_plot(AgsPatternEnvelope *pattern_envelope) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsCartesian *cartesian; AgsPlot *plot; GtkTreeModel *model; GtkTreeIter iter; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *preset; AgsComplex *val; gchar *preset_name; gdouble default_width, default_height; gdouble offset; gboolean do_plot; GValue value = {0,}; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_PATTERN_ENVELOPE(pattern_envelope)){ return; } envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(pattern_envelope, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get dimension of cartesian */ cartesian = pattern_envelope->cartesian; default_width = cartesian->x_step_width * cartesian->x_scale_step_width; default_height = cartesian->y_step_height * cartesian->y_scale_step_height; /* get model */ model = GTK_TREE_MODEL(gtk_tree_view_get_model(pattern_envelope->tree_view)); /* clear old plot */ if(cartesian->plot != NULL){ g_list_free_full(cartesian->plot, ags_plot_free); cartesian->plot = NULL; } /* plot */ if(gtk_tree_model_get_iter_first(model, &iter)){ pthread_mutex_lock(audio_mutex); g_value_init(&value, AGS_TYPE_COMPLEX); do{ gtk_tree_model_get(model, &iter, AGS_PATTERN_ENVELOPE_COLUMN_PLOT, &do_plot, AGS_PATTERN_ENVELOPE_COLUMN_PRESET_NAME, &preset_name, -1); if(do_plot){ gdouble ratio; preset = ags_preset_find_name(audio->preset, preset_name); /* AgsPlot struct */ plot = ags_plot_alloc(5, 0, 0); plot->join_points = TRUE; plot->point_color[0][0] = 0.125; plot->point_color[0][1] = 0.5; plot->point_color[0][2] = 1.0; plot->point_color[1][0] = 0.125; plot->point_color[1][1] = 0.5; plot->point_color[1][2] = 1.0; plot->point_color[2][0] = 0.125; plot->point_color[2][1] = 0.5; plot->point_color[2][2] = 1.0; plot->point_color[3][0] = 0.125; plot->point_color[3][1] = 0.5; plot->point_color[3][2] = 1.0; plot->point_color[4][0] = 0.125; plot->point_color[4][1] = 0.5; plot->point_color[4][2] = 1.0; /* add plot */ ags_cartesian_add_plot(cartesian, plot); /* set plot points - ratio */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset->data, "ratio", &value, &error); if(error != NULL){ g_warning("%s", error->message); continue; } val = (AgsComplex *) g_value_get_boxed(&value); ratio = val[0][1]; plot->point[0][0] = 0.0; plot->point[0][1] = default_height * val[0][1]; /* set plot points - attack */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset->data, "attack", &value, &error); if(error != NULL){ g_warning("%s", error->message); continue; } val = (AgsComplex *) g_value_get_boxed(&value); plot->point[1][0] = default_width * val[0][0]; plot->point[1][1] = default_height * (val[0][1] + ratio); offset = default_width * val[0][0]; /* set plot points - decay */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset->data, "decay", &value, &error); if(error != NULL){ g_warning("%s", error->message); continue; } val = (AgsComplex *) g_value_get_boxed(&value); plot->point[2][0] = offset + default_width * val[0][0]; plot->point[2][1] = default_height * (val[0][1] + ratio); offset += default_width * val[0][0]; /* set plot points - sustain */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset->data, "sustain", &value, &error); if(error != NULL){ g_warning("%s", error->message); continue; } val = (AgsComplex *) g_value_get_boxed(&value); plot->point[3][0] = offset + default_width * val[0][0]; plot->point[3][1] = default_height * (val[0][1] + ratio); offset += default_width * val[0][0]; /* set plot points - release */ g_value_reset(&value); error = NULL; ags_preset_get_parameter(preset->data, "release", &value, &error); if(error != NULL){ g_warning("%s", error->message); continue; } val = (AgsComplex *) g_value_get_boxed(&value); plot->point[4][0] = offset + default_width * val[0][0]; plot->point[4][1] = default_height * (val[0][1] + ratio); } }while(gtk_tree_model_iter_next(model, &iter)); pthread_mutex_unlock(audio_mutex); } /* queue draw */ gtk_widget_queue_draw(cartesian); } /** * ags_pattern_envelope_new: * * Creates an #AgsPatternEnvelope * * Returns: a new #AgsPatternEnvelope * * Since: 1.0.0 */ AgsPatternEnvelope* ags_pattern_envelope_new() { AgsPatternEnvelope *pattern_envelope; pattern_envelope = (AgsPatternEnvelope *) g_object_new(AGS_TYPE_PATTERN_ENVELOPE, NULL); return(pattern_envelope); } gsequencer-1.4.24/ags/X/editor/ags_envelope_info.h0000644000175000017500000000503013246707333016774 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ENVELOPE_INFO_H__ #define __AGS_ENVELOPE_INFO_H__ #include #include #include #include #define AGS_TYPE_ENVELOPE_INFO (ags_envelope_info_get_type()) #define AGS_ENVELOPE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ENVELOPE_INFO, AgsEnvelopeInfo)) #define AGS_ENVELOPE_INFO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ENVELOPE_INFO, AgsEnvelopeInfoClass)) #define AGS_IS_ENVELOPE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ENVELOPE_INFO)) #define AGS_IS_ENVELOPE_INFO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ENVELOPE_INFO)) #define AGS_ENVELOPE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ENVELOPE_INFO, AgsEnvelopeInfoClass)) #define AGS_ENVELOPE_INFO_DEFAULT_VERSION "0.8.2\0" #define AGS_ENVELOPE_INFO_DEFAULT_BUILD_ID "CEST 24-05-2017 10:19\0" typedef struct _AgsEnvelopeInfo AgsEnvelopeInfo; typedef struct _AgsEnvelopeInfoClass AgsEnvelopeInfoClass; typedef enum{ AGS_ENVELOPE_INFO_CONNECTED = 1, }AgsEnvelopeInfoFlags; typedef enum{ AGS_ENVELOPE_INFO_COLUMN_PLOT, AGS_ENVELOPE_INFO_COLUMN_AUDIO_CHANNEL, AGS_ENVELOPE_INFO_COLUMN_NOTE_X0, AGS_ENVELOPE_INFO_COLUMN_NOTE_X1, AGS_ENVELOPE_INFO_COLUMN_NOTE_Y, AGS_ENVELOPE_INFO_COLUMN_LAST, }AgsEnvelopeInfoColumn; struct _AgsEnvelopeInfo { GtkVBox vbox; guint flags; gchar *version; gchar *build_id; GList *selection; AgsCartesian *cartesian; GtkTreeView *tree_view; }; struct _AgsEnvelopeInfoClass { GtkVBoxClass vbox; }; GType ags_envelope_info_get_type(void); void ags_envelope_info_plot(AgsEnvelopeInfo *envelope_info); AgsEnvelopeInfo* ags_envelope_info_new(); #endif /*__AGS_ENVELOPE_INFO_H__*/ gsequencer-1.4.24/ags/X/editor/ags_select_note_dialog.h0000644000175000017500000000462313246707333017776 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SELECT_NOTE_DIALOG_H__ #define __AGS_SELECT_NOTE_DIALOG_H__ #include #include #include #define AGS_TYPE_SELECT_NOTE_DIALOG (ags_select_note_dialog_get_type()) #define AGS_SELECT_NOTE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SELECT_NOTE_DIALOG, AgsSelectNoteDialog)) #define AGS_SELECT_NOTE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SELECT_NOTE_DIALOG, AgsSelectNoteDialogClass)) #define AGS_IS_SELECT_NOTE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SELECT_NOTE_DIALOG)) #define AGS_IS_SELECT_NOTE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SELECT_NOTE_DIALOG)) #define AGS_SELECT_NOTE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SELECT_NOTE_DIALOG, AgsSelectNoteDialogClass)) #define AGS_SELECT_NOTE_MAX_BEATS (16 * 1200) #define AGS_SELECT_NOTE_MAX_KEYS (1024) typedef struct _AgsSelectNoteDialog AgsSelectNoteDialog; typedef struct _AgsSelectNoteDialogClass AgsSelectNoteDialogClass; typedef enum{ AGS_SELECT_NOTE_DIALOG_CONNECTED = 1, }AgsSelectNoteDialogFlags; struct _AgsSelectNoteDialog { GtkDialog dialog; guint flags; GObject *application_context; GtkWidget *main_window; GtkCheckButton *copy_selection; GtkSpinButton *select_x0; GtkSpinButton *select_y0; GtkSpinButton *select_x1; GtkSpinButton *select_y1; }; struct _AgsSelectNoteDialogClass { GtkDialogClass dialog; }; GType ags_select_note_dialog_get_type(void); AgsSelectNoteDialog* ags_select_note_dialog_new(GtkWidget *main_window); #endif /*__AGS_SELECT_NOTE_DIALOG_H__*/ gsequencer-1.4.24/ags/X/editor/ags_inline_player.c0000644000175000017500000001652313246707333017002 00000000000000/* 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 . */ #include #include #include #include void ags_inline_player_class_init(AgsInlinePlayerClass *inline_player); void ags_inline_player_connectable_interface_init(AgsConnectableInterface *connectable); void ags_inline_player_init(AgsInlinePlayer *inline_player); void ags_inline_player_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_inline_player_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_inline_player_finalize(GObject *gobject); void ags_inline_player_connect(AgsConnectable *connectable); void ags_inline_player_disconnect(AgsConnectable *connectable); void ags_inline_player_show(GtkWidget *widget); void ags_inline_player_update(AgsInlinePlayer *inline_player); enum{ PROP_0, PROP_PLAYABLE, }; static gpointer ags_inline_player_parent_class = NULL; GType ags_inline_player_get_type(void) { static GType ags_type_inline_player = 0; if(!ags_type_inline_player){ static const GTypeInfo ags_inline_player_info = { sizeof (AgsInlinePlayerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_inline_player_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsInlinePlayer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_inline_player_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_inline_player_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_inline_player = g_type_register_static(GTK_TYPE_VBOX, "AgsInlinePlayer", &ags_inline_player_info, 0); g_type_add_interface_static(ags_type_inline_player, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_inline_player); } void ags_inline_player_class_init(AgsInlinePlayerClass *inline_player) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_inline_player_parent_class = g_type_class_peek_parent(inline_player); /* GObjectClass */ gobject = (GObjectClass *) inline_player; gobject->set_property = ags_inline_player_set_property; gobject->get_property = ags_inline_player_get_property; gobject->finalize = ags_inline_player_finalize; /* properties */ param_spec = g_param_spec_object("playable", "playable for player", "The AgsPlayable to use within the AgsInlinePlayer", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYABLE, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) inline_player; widget->show = ags_inline_player_show; } void ags_inline_player_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_inline_player_connect; connectable->disconnect = ags_inline_player_disconnect; } void ags_inline_player_init(AgsInlinePlayer *inline_player) { GtkHBox *hbox; inline_player->playable = NULL; hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) inline_player, (GtkWidget *) hbox, FALSE, FALSE, 0); inline_player->play = (GtkToggleButton *) g_object_new(GTK_TYPE_TOGGLE_BUTTON, "image", (GtkWidget *) gtk_image_new_from_stock(GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_LARGE_TOOLBAR), NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) inline_player->play, FALSE, FALSE, 0); inline_player->position = (GtkHScale *) gtk_hscale_new_with_range(0.0, 1.0, 1.0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) inline_player->position, TRUE, TRUE, 0); inline_player->volume = (GtkVolumeButton *) gtk_volume_button_new(); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) inline_player->volume, FALSE, FALSE, 0); } void ags_inline_player_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsInlinePlayer *inline_player; inline_player = AGS_INLINE_PLAYER(gobject); switch(prop_id){ case PROP_PLAYABLE: { AgsPlayable *playable; playable = (AgsPlayable *) g_value_get_object(value); if(inline_player->playable == playable) return; if(inline_player->playable != NULL){ g_object_unref(inline_player->playable); } if(playable != NULL){ g_object_ref(playable); } inline_player->playable = playable; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_inline_player_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsInlinePlayer *inline_player; inline_player = AGS_INLINE_PLAYER(gobject); switch(prop_id){ case PROP_PLAYABLE: g_value_set_object(value, inline_player->playable); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_inline_player_finalize(GObject *gobject) { AgsInlinePlayer *inline_player; inline_player = (AgsInlinePlayer *) gobject; //TODO:JK: /* implement me */ G_OBJECT_CLASS(ags_inline_player_parent_class)->finalize(gobject); } void ags_inline_player_connect(AgsConnectable *connectable) { AgsInlinePlayer *inline_player; /* AgsInlinePlayer */ inline_player = AGS_INLINE_PLAYER(connectable); //TODO:JK: implement me /* g_signal_connect(G_OBJECT(inline_player->preset), "changed", G_CALLBACK(ags_inline_player_preset_changed), inline_player); g_signal_connect(G_OBJECT(inline_player->instrument), "changed", G_CALLBACK(ags_inline_player_instrument_changed), inline_player); g_signal_connect(G_OBJECT(inline_player->sample), "changed", G_CALLBACK(ags_inline_player_sample_changed), inline_player); */ } void ags_inline_player_disconnect(AgsConnectable *connectable) { //TODO:JK: /* implement me */ } void ags_inline_player_show(GtkWidget *widget) { AgsInlinePlayer *inline_player = (AgsInlinePlayer *) widget; GTK_WIDGET_CLASS(ags_inline_player_parent_class)->show(widget); //TODO:JK: /* perhaps empty */ } AgsInlinePlayer* ags_inline_player_new() { AgsInlinePlayer *inline_player; inline_player = (AgsInlinePlayer *) g_object_new(AGS_TYPE_INLINE_PLAYER, NULL); return(inline_player); } gsequencer-1.4.24/ags/X/editor/ags_scrolled_wave_edit_box.c0000644000175000017500000002321213247044247020646 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_scrolled_wave_edit_box_class_init(AgsScrolledWaveEditBoxClass *scrolled_wave_edit_box); void ags_scrolled_wave_edit_box_init(AgsScrolledWaveEditBox *scrolled_wave_edit_box); void ags_scrolled_wave_edit_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_scrolled_wave_edit_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_scrolled_wave_edit_box_finalize(GObject *gobject); void ags_scrolled_wave_edit_box_size_allocate(GtkWidget *widget, GtkAllocation *allocation); void ags_scrolled_wave_edit_box_size_request(GtkWidget *widget, GtkRequisition *requisition); /** * SECTION:ags_scrolled_wave_edit_box * @short_description: scrolled wave_edit box widget * @title: AgsScrolledWaveEditBox * @section_id: * @include: ags/widget/ags_scrolled_wave_edit_box.h * * The #AgsScrolledWaveEditBox lets you to have a scrolled wave_edit box widget. */ enum{ PROP_0, PROP_MARGIN_TOP, PROP_MARGIN_BOTTOM, PROP_MARGIN_LEFT, PROP_MARGIN_RIGHT, }; static gpointer ags_scrolled_wave_edit_box_parent_class = NULL; GType ags_scrolled_wave_edit_box_get_type(void) { static GType ags_type_scrolled_wave_edit_box = 0; if(!ags_type_scrolled_wave_edit_box){ static const GTypeInfo ags_scrolled_wave_edit_box_info = { sizeof (AgsScrolledWaveEditBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_scrolled_wave_edit_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsScrolledWaveEditBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_scrolled_wave_edit_box_init, }; ags_type_scrolled_wave_edit_box = g_type_register_static(GTK_TYPE_BIN, "AgsScrolledWaveEditBox", &ags_scrolled_wave_edit_box_info, 0); } return(ags_type_scrolled_wave_edit_box); } void ags_scrolled_wave_edit_box_class_init(AgsScrolledWaveEditBoxClass *scrolled_wave_edit_box) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_scrolled_wave_edit_box_parent_class = g_type_class_peek_parent(scrolled_wave_edit_box); /* GObjectClass */ gobject = (GObjectClass *) scrolled_wave_edit_box; gobject->set_property = ags_scrolled_wave_edit_box_set_property; gobject->get_property = ags_scrolled_wave_edit_box_get_property; gobject->finalize = ags_scrolled_wave_edit_box_finalize; /* properties */ /** * AgsScrolledWaveEditBox:margin-top: * * The margin top. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("margin-top", "margin top", "The margin top", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_TOP, param_spec); /** * AgsScrolledWaveEditBox:margin-bottom: * * The margin bottom. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("margin-bottom", "margin bottom", "The margin bottom", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_BOTTOM, param_spec); /** * AgsScrolledWaveEditBox:margin-left: * * The margin left. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("margin-left", "margin left", "The margin left", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_LEFT, param_spec); /** * AgsScrolledWaveEditBox:margin-right: * * The margin right. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("margin-right", "margin right", "The margin right", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MARGIN_RIGHT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) scrolled_wave_edit_box; widget->size_request = ags_scrolled_wave_edit_box_size_request; widget->size_allocate = ags_scrolled_wave_edit_box_size_allocate; } void ags_scrolled_wave_edit_box_init(AgsScrolledWaveEditBox *scrolled_wave_edit_box) { scrolled_wave_edit_box->margin_top = 0; scrolled_wave_edit_box->margin_bottom = 0; scrolled_wave_edit_box->margin_left = 0; scrolled_wave_edit_box->margin_right = 0; /* viewport */ scrolled_wave_edit_box->viewport = gtk_viewport_new(NULL, NULL); g_object_set(scrolled_wave_edit_box->viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_container_add(scrolled_wave_edit_box, scrolled_wave_edit_box->viewport); /* wave_edit box */ scrolled_wave_edit_box->wave_edit_box = NULL; #if 0 scrolled_wave_edit_box->wave_edit_box = ags_vwave_edit_box_new(); gtk_container_add(scrolled_wave_edit_box->viewport, scrolled_wave_edit_box->wave_edit_box); #endif } void ags_scrolled_wave_edit_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsScrolledWaveEditBox *scrolled_wave_edit_box; scrolled_wave_edit_box = AGS_SCROLLED_WAVE_EDIT_BOX(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { scrolled_wave_edit_box->margin_top = g_value_get_uint(value); } break; case PROP_MARGIN_BOTTOM: { scrolled_wave_edit_box->margin_bottom = g_value_get_uint(value); } break; case PROP_MARGIN_LEFT: { scrolled_wave_edit_box->margin_left = g_value_get_uint(value); } break; case PROP_MARGIN_RIGHT: { scrolled_wave_edit_box->margin_right = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_wave_edit_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsScrolledWaveEditBox *scrolled_wave_edit_box; scrolled_wave_edit_box = AGS_SCROLLED_WAVE_EDIT_BOX(gobject); switch(prop_id){ case PROP_MARGIN_TOP: { g_value_set_uint(value, scrolled_wave_edit_box->margin_top); } break; case PROP_MARGIN_BOTTOM: { g_value_set_uint(value, scrolled_wave_edit_box->margin_bottom); } break; case PROP_MARGIN_LEFT: { g_value_set_uint(value, scrolled_wave_edit_box->margin_left); } break; case PROP_MARGIN_RIGHT: { g_value_set_uint(value, scrolled_wave_edit_box->margin_right); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_scrolled_wave_edit_box_finalize(GObject *gobject) { AgsScrolledWaveEditBox *scrolled_wave_edit_box; scrolled_wave_edit_box = AGS_SCROLLED_WAVE_EDIT_BOX(gobject); /* call parent */ G_OBJECT_CLASS(ags_scrolled_wave_edit_box_parent_class)->finalize(gobject); } void ags_scrolled_wave_edit_box_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { AgsScrolledWaveEditBox *scrolled_wave_edit_box; GtkAllocation child_allocation; GtkRequisition child_requisition; scrolled_wave_edit_box = AGS_SCROLLED_WAVE_EDIT_BOX(widget); widget->allocation = *allocation; widget->allocation.height = AGS_LEVEL_DEFAULT_HEIGHT; /* viewport allocation */ gtk_widget_get_child_requisition((GtkWidget *) scrolled_wave_edit_box->viewport, &child_requisition); child_allocation.x = allocation->x; child_allocation.y = allocation->y; child_allocation.width = allocation->width; child_allocation.height = allocation->height; gtk_widget_size_allocate((GtkWidget *) scrolled_wave_edit_box->viewport, &child_allocation); /* box */ gtk_widget_get_child_requisition((GtkWidget *) scrolled_wave_edit_box->wave_edit_box, &child_requisition); child_allocation.x = 0; child_allocation.y = 0; child_allocation.width = allocation->width; child_allocation.height = child_requisition.height; gtk_widget_size_allocate((GtkWidget *) scrolled_wave_edit_box->wave_edit_box, &child_allocation); } void ags_scrolled_wave_edit_box_size_request(GtkWidget *widget, GtkRequisition *requisition) { GtkRequisition child_requisition; GtkOrientation orientation; requisition->width = AGS_LEVEL_DEFAULT_HEIGHT; requisition->height = AGS_LEVEL_DEFAULT_HEIGHT; gtk_widget_size_request(gtk_bin_get_child((GtkContainer *) widget), &child_requisition); } /** * ags_scrolled_wave_edit_box_new: * * Create a new #AgsScrolledWaveEditBox. * * Returns: a new #AgsScrolledWaveEditBox * * Since: 1.4.0 */ AgsScrolledWaveEditBox* ags_scrolled_wave_edit_box_new() { AgsScrolledWaveEditBox *scrolled_wave_edit_box; scrolled_wave_edit_box = (AgsScrolledWaveEditBox *) g_object_new(AGS_TYPE_SCROLLED_WAVE_EDIT_BOX, NULL); return(scrolled_wave_edit_box); } gsequencer-1.4.24/ags/X/editor/ags_sf2_chooser.c0000644000175000017500000002423113246707333016357 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_sf2_chooser_class_init(AgsSF2ChooserClass *sf2_chooser); void ags_sf2_chooser_connectable_interface_init(AgsConnectableInterface *connectable); void ags_sf2_chooser_init(AgsSF2Chooser *sf2_chooser); void ags_sf2_chooser_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_sf2_chooser_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_sf2_chooser_finalize(GObject *gobject); void ags_sf2_chooser_connect(AgsConnectable *connectable); void ags_sf2_chooser_disconnect(AgsConnectable *connectable); void ags_sf2_chooser_show(GtkWidget *widget); void ags_sf2_chooser_update(AgsSF2Chooser *sf2_chooser); enum{ PROP_0, PROP_IPATCH, }; static gpointer ags_sf2_chooser_parent_class = NULL; GType ags_sf2_chooser_get_type(void) { static GType ags_type_sf2_chooser = 0; if(!ags_type_sf2_chooser){ static const GTypeInfo ags_sf2_chooser_info = { sizeof (AgsSF2ChooserClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_sf2_chooser_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSF2Chooser), 0, /* n_preallocs */ (GInstanceInitFunc) ags_sf2_chooser_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_sf2_chooser_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_sf2_chooser = g_type_register_static(GTK_TYPE_VBOX, "AgsSF2Chooser", &ags_sf2_chooser_info, 0); g_type_add_interface_static(ags_type_sf2_chooser, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_sf2_chooser); } void ags_sf2_chooser_class_init(AgsSF2ChooserClass *sf2_chooser) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_sf2_chooser_parent_class = g_type_class_peek_parent(sf2_chooser); /* GObjectClass */ gobject = (GObjectClass *) sf2_chooser; gobject->set_property = ags_sf2_chooser_set_property; gobject->get_property = ags_sf2_chooser_get_property; gobject->finalize = ags_sf2_chooser_finalize; /* properties */ param_spec = g_param_spec_object("ipatch", "current ipatch", "The current AgsIpatch", AGS_TYPE_IPATCH, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_IPATCH, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) sf2_chooser; widget->show = ags_sf2_chooser_show; } void ags_sf2_chooser_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_sf2_chooser_connect; connectable->disconnect = ags_sf2_chooser_disconnect; } void ags_sf2_chooser_init(AgsSF2Chooser *sf2_chooser) { GtkTable *table; GtkLabel *label; sf2_chooser->ipatch = NULL; table = (GtkTable *) gtk_table_new(2, 3, FALSE); gtk_box_pack_start(GTK_BOX(sf2_chooser), GTK_WIDGET(table), FALSE, FALSE, 0); /* first row - preset */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", "preset: ", "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); sf2_chooser->preset = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(sf2_chooser->preset), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); /* second row - instrument */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", "instrument: ", "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); sf2_chooser->instrument = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(sf2_chooser->instrument), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* third row - sample */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", "sample: ", "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); sf2_chooser->sample = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(sf2_chooser->sample), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); } void ags_sf2_chooser_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSF2Chooser *sf2_chooser; sf2_chooser = AGS_SF2_CHOOSER(gobject); switch(prop_id){ case PROP_IPATCH: { AgsIpatch *ipatch; ipatch = (AgsIpatch *) g_value_get_object(value); if(sf2_chooser->ipatch == ipatch) return; if(sf2_chooser->ipatch != NULL){ g_object_unref(sf2_chooser->ipatch); } if(ipatch != NULL){ g_object_ref(ipatch); } sf2_chooser->ipatch = ipatch; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_sf2_chooser_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSF2Chooser *sf2_chooser; sf2_chooser = AGS_SF2_CHOOSER(gobject); switch(prop_id){ case PROP_IPATCH: g_value_set_object(value, sf2_chooser->ipatch); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_sf2_chooser_finalize(GObject *gobject) { AgsSF2Chooser *sf2_chooser; sf2_chooser = (AgsSF2Chooser *) gobject; //TODO:JK: /* implement me */ G_OBJECT_CLASS(ags_sf2_chooser_parent_class)->finalize(gobject); } void ags_sf2_chooser_connect(AgsConnectable *connectable) { AgsSF2Chooser *sf2_chooser; /* AgsSF2Chooser */ sf2_chooser = AGS_SF2_CHOOSER(connectable); g_signal_connect(G_OBJECT(sf2_chooser->preset), "changed", G_CALLBACK(ags_sf2_chooser_preset_changed), sf2_chooser); g_signal_connect(G_OBJECT(sf2_chooser->instrument), "changed", G_CALLBACK(ags_sf2_chooser_instrument_changed), sf2_chooser); g_signal_connect(G_OBJECT(sf2_chooser->sample), "changed", G_CALLBACK(ags_sf2_chooser_sample_changed), sf2_chooser); } void ags_sf2_chooser_disconnect(AgsConnectable *connectable) { //TODO:JK: /* implement me */ } void ags_sf2_chooser_show(GtkWidget *widget) { AgsSF2Chooser *sf2_chooser = (AgsSF2Chooser *) widget; GTK_WIDGET_CLASS(ags_sf2_chooser_parent_class)->show(widget); //TODO:JK: /* perhaps empty */ } void ags_sf2_chooser_open(AgsSF2Chooser *sf2_chooser, gchar *filename) { AgsIpatch *ipatch; AgsIpatchSF2Reader *sf2_reader; AgsPlayable *playable; gchar **preset; gchar **instrument; gchar **sample; GError *error; /* clear preset, instrument and sample*/ gtk_list_store_clear(GTK_LIST_STORE(sf2_chooser->preset)); gtk_list_store_clear(GTK_LIST_STORE(sf2_chooser->instrument)); gtk_list_store_clear(GTK_LIST_STORE(sf2_chooser->sample)); /* Ipatch related */ ipatch = g_object_new(AGS_TYPE_IPATCH, "mode", AGS_IPATCH_READ, "filename", filename, NULL); ags_playable_open(AGS_PLAYABLE(ipatch), filename); sf2_reader = ags_ipatch_sf2_reader_new(); sf2_reader->ipatch = ipatch; ipatch->reader = (GObject *) sf2_reader; g_object_set(G_OBJECT(sf2_chooser), "ipatch", ipatch, NULL); /* fill sf2_chooser->preset */ playable = AGS_PLAYABLE(ipatch); ags_playable_open(playable, filename); error = NULL; ags_playable_level_select(playable, 0, filename, &error); if(error != NULL){ g_error("%s", error->message); } preset = ags_playable_sublevel_names(playable); while(*preset != NULL){ gtk_combo_box_text_append_text(sf2_chooser->preset, *preset); preset++; } /* fill sf2_chooser->instrument */ sf2_chooser->ipatch->nth_level = 1; instrument = ags_playable_sublevel_names(playable); while(*instrument != NULL){ gtk_combo_box_text_append_text(sf2_chooser->instrument, *instrument); instrument++; } /* fill sf2_chooser->sample */ sf2_chooser->ipatch->nth_level = 2; sample = ags_playable_sublevel_names(playable); while(*sample != NULL){ gtk_combo_box_text_append_text(sf2_chooser->sample, *sample); sample++; } /* reset nth_level */ sf2_chooser->ipatch->nth_level = 0; } void ags_sf2_chooser_update(AgsSF2Chooser *sf2_chooser) { //TODO:JK: /* implement me */ } gboolean ags_sf2_chooser_completed(AgsSF2Chooser *sf2_chooser) { gchar *preset, *instrument, *sample; preset = gtk_combo_box_text_get_active_text(sf2_chooser->preset); instrument = gtk_combo_box_text_get_active_text(sf2_chooser->instrument); sample = gtk_combo_box_text_get_active_text(sf2_chooser->sample); if(preset != NULL && preset[0] != '\0' && instrument != NULL && instrument[0] != '\0' && sample != NULL && sample[0] != '\0'){ return(TRUE); }else{ return(FALSE); } } AgsSF2Chooser* ags_sf2_chooser_new() { AgsSF2Chooser *sf2_chooser; sf2_chooser = (AgsSF2Chooser *) g_object_new(AGS_TYPE_SF2_CHOOSER, NULL); return(sf2_chooser); } gsequencer-1.4.24/ags/X/editor/ags_sf2_chooser_callbacks.h0000644000175000017500000000237113246707333020364 00000000000000/* 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 . */ #ifndef __AGS_SF2_CHOOSER_CALLBACKS_H__ #define __AGS_SF2_CHOOSER_CALLBACKS_H__ #include #include #include #include void ags_sf2_chooser_preset_changed(GtkComboBox *combo_box, AgsSF2Chooser *sf2_chooser); void ags_sf2_chooser_instrument_changed(GtkComboBox *combo_box, AgsSF2Chooser *sf2_chooser); void ags_sf2_chooser_sample_changed(GtkComboBox *combo_box, AgsSF2Chooser *sf2_chooser); #endif /*__AGS_SF2_CHOOSER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_envelope_info.c0000644000175000017500000003755213246707333017005 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_envelope_info_class_init(AgsEnvelopeInfoClass *envelope_info); void ags_envelope_info_connectable_interface_init(AgsConnectableInterface *connectable); void ags_envelope_info_applicable_interface_init(AgsApplicableInterface *applicable); void ags_envelope_info_init(AgsEnvelopeInfo *envelope_info); void ags_envelope_info_connect(AgsConnectable *connectable); void ags_envelope_info_disconnect(AgsConnectable *connectable); void ags_envelope_info_finalize(GObject *gobject); void ags_envelope_info_set_update(AgsApplicable *applicable, gboolean update); void ags_envelope_info_apply(AgsApplicable *applicable); void ags_envelope_info_reset(AgsApplicable *applicable); gchar* ags_envelope_info_x_label_func(gdouble value, gpointer data); gchar* ags_envelope_info_y_label_func(gdouble value, gpointer data); /** * SECTION:ags_envelope_info * @short_description: pack pad editors. * @title: AgsEnvelopeInfo * @section_id: * @include: ags/X/ags_envelope_info.h * * #AgsEnvelopeInfo is a composite widget to show envelope controls * of selected AgsNote. */ static gpointer ags_envelope_info_parent_class = NULL; GType ags_envelope_info_get_type(void) { static GType ags_type_envelope_info = 0; if(!ags_type_envelope_info){ static const GTypeInfo ags_envelope_info_info = { sizeof (AgsEnvelopeInfoClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_envelope_info_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsEnvelopeInfo), 0, /* n_preallocs */ (GInstanceInitFunc) ags_envelope_info_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_info_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_envelope_info_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_envelope_info = g_type_register_static(GTK_TYPE_VBOX, "AgsEnvelopeInfo", &ags_envelope_info_info, 0); g_type_add_interface_static(ags_type_envelope_info, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_envelope_info, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_envelope_info); } void ags_envelope_info_class_init(AgsEnvelopeInfoClass *envelope_info) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_envelope_info_parent_class = g_type_class_peek_parent(envelope_info); /* GObjectClass */ gobject = (GObjectClass *) envelope_info; gobject->finalize = ags_envelope_info_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) envelope_info; } void ags_envelope_info_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_envelope_info_connect; connectable->disconnect = ags_envelope_info_disconnect; } void ags_envelope_info_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_envelope_info_set_update; applicable->apply = ags_envelope_info_apply; applicable->reset = ags_envelope_info_reset; } void ags_envelope_info_init(AgsEnvelopeInfo *envelope_info) { AgsCartesian *cartesian; GtkCellRenderer *toggle_renderer; GtkCellRenderer *renderer; GtkListStore *model; GtkTreeIter iter; gdouble width, height; envelope_info->flags = 0; envelope_info->version = AGS_ENVELOPE_INFO_DEFAULT_VERSION; envelope_info->build_id = AGS_ENVELOPE_INFO_DEFAULT_BUILD_ID; envelope_info->selection = NULL; /* cartesian */ cartesian = envelope_info->cartesian = ags_cartesian_new(); cartesian->x_label_func = ags_envelope_info_x_label_func; cartesian->y_label_func = ags_envelope_info_y_label_func; ags_cartesian_fill_label(cartesian, TRUE); ags_cartesian_fill_label(cartesian, FALSE); /* cartesian - width and height */ width = cartesian->x_end - cartesian->x_start; height = cartesian->y_end - cartesian->y_start; /* cartesian - size, pack and redraw */ gtk_widget_set_size_request(cartesian, (gint) width + 2.0 * cartesian->x_margin, (gint) height + 2.0 * cartesian->y_margin); gtk_box_pack_start((GtkBox *) envelope_info, (GtkWidget *) cartesian, FALSE, FALSE, 0); gtk_widget_queue_draw(cartesian); /* tree view */ envelope_info->tree_view = (GtkTreeView *) gtk_tree_view_new(); g_object_set(envelope_info->tree_view, "enable-grid-lines", TRUE, NULL); model = gtk_list_store_new(AGS_ENVELOPE_INFO_COLUMN_LAST, G_TYPE_BOOLEAN, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); gtk_tree_view_set_model(envelope_info->tree_view, model); toggle_renderer = gtk_cell_renderer_toggle_new(); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(envelope_info->tree_view), -1, i18n("plot"), toggle_renderer, "active", AGS_ENVELOPE_INFO_COLUMN_PLOT, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(envelope_info->tree_view), -1, i18n("audio channel"), renderer, "text", AGS_ENVELOPE_INFO_COLUMN_AUDIO_CHANNEL, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(envelope_info->tree_view), -1, i18n("Note:x0"), renderer, "text", AGS_ENVELOPE_INFO_COLUMN_NOTE_X0, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(envelope_info->tree_view), -1, i18n("Note:x1"), renderer, "text", AGS_ENVELOPE_INFO_COLUMN_NOTE_X1, NULL); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(envelope_info->tree_view), -1, i18n("Note:y"), renderer, "text", AGS_ENVELOPE_INFO_COLUMN_NOTE_Y, NULL); gtk_box_pack_start((GtkBox *) envelope_info, (GtkWidget *) envelope_info->tree_view, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(toggle_renderer), "toggled\0", G_CALLBACK(ags_envelope_info_plot_callback), envelope_info); } void ags_envelope_info_connect(AgsConnectable *connectable) { AgsEnvelopeInfo *envelope_info; envelope_info = AGS_ENVELOPE_INFO(connectable); if((AGS_ENVELOPE_INFO_CONNECTED & (envelope_info->flags)) != 0){ return; } envelope_info->flags |= AGS_ENVELOPE_INFO_CONNECTED; } void ags_envelope_info_disconnect(AgsConnectable *connectable) { AgsEnvelopeInfo *envelope_info; envelope_info = AGS_ENVELOPE_INFO(connectable); if((AGS_ENVELOPE_INFO_CONNECTED & (envelope_info->flags)) == 0){ return; } envelope_info->flags &= (~AGS_ENVELOPE_INFO_CONNECTED); } void ags_envelope_info_finalize(GObject *gobject) { AgsEnvelopeInfo *envelope_info; envelope_info = AGS_ENVELOPE_INFO(gobject); if(envelope_info->selection != NULL){ g_list_free_full(envelope_info->selection, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_envelope_info_parent_class)->finalize(gobject); } void ags_envelope_info_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_envelope_info_apply(AgsApplicable *applicable) { /* empty */ } void ags_envelope_info_reset(AgsApplicable *applicable) { AgsEnvelopeDialog *envelope_dialog; AgsEnvelopeInfo *envelope_info; AgsWindow *window; AgsMachine *machine; GtkListStore *model; GtkTreeIter iter; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *notation; GList *selection; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; envelope_info = AGS_ENVELOPE_INFO(applicable); envelope_dialog = gtk_widget_get_ancestor(envelope_info, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get tree model */ model = GTK_LIST_STORE(gtk_tree_view_get_model(envelope_info->tree_view)); /* fill tree view */ pthread_mutex_lock(audio_mutex); notation = audio->notation; while(notation != NULL){ selection = AGS_NOTATION(notation->data)->selection; if(envelope_info->selection == NULL){ envelope_info->selection = ags_list_util_copy_and_ref(selection); }else{ envelope_info->selection = g_list_concat(envelope_info->selection, ags_list_util_copy_and_ref(selection)); } while(selection != NULL){ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, AGS_ENVELOPE_INFO_COLUMN_AUDIO_CHANNEL, AGS_NOTATION(notation->data)->audio_channel, AGS_ENVELOPE_INFO_COLUMN_NOTE_X0, AGS_NOTE(selection->data)->x[0], AGS_ENVELOPE_INFO_COLUMN_NOTE_X1, AGS_NOTE(selection->data)->x[1], AGS_ENVELOPE_INFO_COLUMN_NOTE_Y, AGS_NOTE(selection->data)->y, -1); selection = selection->next; } notation = notation->next; } pthread_mutex_unlock(audio_mutex); } gchar* ags_envelope_info_x_label_func(gdouble value, gpointer data) { gchar *format; gchar *str; format = g_strdup_printf("%%.%df", (guint) ceil(AGS_CARTESIAN(data)->y_label_precision)); str = g_strdup_printf(format, value / 10.0); g_free(format); return(str); } gchar* ags_envelope_info_y_label_func(gdouble value, gpointer data) { gchar *format; gchar *str; format = g_strdup_printf("%%.%df", (guint) ceil(AGS_CARTESIAN(data)->y_label_precision)); str = g_strdup_printf(format, value / 10.0); g_free(format); return(str); } /** * ags_envelope_info_plot: * @envelope_info: the #AgsEnvelopeInfo * * Plot envelope. * * Since: 1.0.0 */ void ags_envelope_info_plot(AgsEnvelopeInfo *envelope_info) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsCartesian *cartesian; AgsPlot *plot; GtkTreeModel *model; GtkTreeIter iter; AgsAudio *audio; AgsNote *note; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *selection; complex z; gdouble default_width, default_height; gdouble offset; gboolean do_plot; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!AGS_IS_ENVELOPE_INFO(envelope_info)){ return; } envelope_dialog = gtk_widget_get_ancestor(envelope_info, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* cartesian */ cartesian = envelope_info->cartesian; default_width = cartesian->x_step_width * cartesian->x_scale_step_width; default_height = cartesian->y_step_height * cartesian->y_scale_step_height; model = GTK_TREE_MODEL(gtk_tree_view_get_model(envelope_info->tree_view)); /* clear old plot */ if(cartesian->plot != NULL){ g_list_free_full(cartesian->plot, ags_plot_free); cartesian->plot = NULL; } /* plot */ if(gtk_tree_model_get_iter_first(model, &iter)){ pthread_mutex_lock(audio_mutex); selection = envelope_info->selection; while(selection != NULL){ gtk_tree_model_get(model, &iter, AGS_ENVELOPE_INFO_COLUMN_PLOT, &do_plot, -1); if(do_plot){ gdouble ratio; note = AGS_NOTE(selection->data); /* AgsPlot struct */ plot = ags_plot_alloc(5, 0, 0); plot->join_points = TRUE; plot->point_color[0][0] = 0.125; plot->point_color[0][1] = 0.5; plot->point_color[0][2] = 1.0; plot->point_color[1][0] = 0.125; plot->point_color[1][1] = 0.5; plot->point_color[1][2] = 1.0; plot->point_color[2][0] = 0.125; plot->point_color[2][1] = 0.5; plot->point_color[2][2] = 1.0; plot->point_color[3][0] = 0.125; plot->point_color[3][1] = 0.5; plot->point_color[3][2] = 1.0; plot->point_color[4][0] = 0.125; plot->point_color[4][1] = 0.5; plot->point_color[4][2] = 1.0; /* set plot points */ z = ags_complex_get(&(note->ratio)); ratio = cimag(z); plot->point[0][0] = 0.0; plot->point[0][1] = default_height * cimag(z); z = ags_complex_get(&(note->attack)); plot->point[1][0] = default_width * creal(z); plot->point[1][1] = default_height * (cimag(z) + ratio); offset = default_width * creal(z); z = ags_complex_get(&(note->decay)); plot->point[2][0] = offset + default_width * creal(z); plot->point[2][1] = default_height * (cimag(z) + ratio); offset += default_width * creal(z); z = ags_complex_get(&(note->sustain)); plot->point[3][0] = offset + default_width * creal(z); plot->point[3][1] = default_height * (cimag(z) + ratio); offset += default_width * creal(z); z = ags_complex_get(&(note->release)); plot->point[4][0] = offset + default_width * creal(z); plot->point[4][1] = default_height * (cimag(z) + ratio); /* add plot */ ags_cartesian_add_plot(cartesian, plot); } /* iterate */ selection = selection->next; if(!gtk_tree_model_iter_next(model, &iter)){ break; } } pthread_mutex_unlock(audio_mutex); } /* queue draw */ gtk_widget_queue_draw(cartesian); } /** * ags_envelope_info_new: * * Creates an #AgsEnvelopeInfo * * Returns: a new #AgsEnvelopeInfo * * Since: 1.0.0 */ AgsEnvelopeInfo* ags_envelope_info_new() { AgsEnvelopeInfo *envelope_info; envelope_info = (AgsEnvelopeInfo *) g_object_new(AGS_TYPE_ENVELOPE_INFO, NULL); return(envelope_info); } gsequencer-1.4.24/ags/X/editor/ags_sf2_chooser_callbacks.c0000644000175000017500000000505213246707333020356 00000000000000/* 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 . */ #include #include #include void ags_sf2_chooser_preset_changed(GtkComboBox *combo_box, AgsSF2Chooser *sf2_chooser) { AgsPlayable *playable; gchar *preset; GError *error; guint nth_level; /* Ipatch related */ playable = AGS_PLAYABLE(sf2_chooser->ipatch); nth_level = ags_playable_nth_level(playable); sf2_chooser->ipatch->nth_level = 1; preset = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo_box)); error = NULL; ags_playable_level_select(playable, 1, preset, &error); if(error != NULL){ g_error("%s", error->message); } } void ags_sf2_chooser_instrument_changed(GtkComboBox *combo_box, AgsSF2Chooser *sf2_chooser) { AgsPlayable *playable; gchar *instrument; GError *error; guint nth_level; /* Ipatch related */ playable = AGS_PLAYABLE(sf2_chooser->ipatch); nth_level = ags_playable_nth_level(playable); sf2_chooser->ipatch->nth_level = 2; instrument = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo_box)); error = NULL; ags_playable_level_select(playable, 2, instrument, &error); if(error != NULL){ g_error("%s", error->message); } } void ags_sf2_chooser_sample_changed(GtkComboBox *combo_box, AgsSF2Chooser *sf2_chooser) { AgsPlayable *playable; gchar *sample; GError *error; guint nth_level; /* Ipatch related */ playable = AGS_PLAYABLE(sf2_chooser->ipatch); nth_level = ags_playable_nth_level(playable); sf2_chooser->ipatch->nth_level = 3; sample = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo_box)); error = NULL; ags_playable_level_select(playable, 3, sample, &error); if(error != NULL){ g_error("%s", error->message); } } gsequencer-1.4.24/ags/X/editor/ags_wave_toolbar_callbacks.c0000644000175000017500000000223013247044247020620 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_wave_toolbar_tool_popup_select_audio_data_callback(GtkWidget *item, AgsWaveToolbar *wave_toolbar) { } void ags_wave_toolbar_tool_popup_position_cursor_callback(GtkWidget *item, AgsWaveToolbar *wave_toolbar) { } gsequencer-1.4.24/ags/X/editor/ags_machine_selector.c0000644000175000017500000003541313247044247017452 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_machine_selector_class_init(AgsMachineSelectorClass *machine_selector); void ags_machine_selector_connectable_interface_init(AgsConnectableInterface *connectable); void ags_machine_selector_init(AgsMachineSelector *machine_selector); void ags_machine_selector_connect(AgsConnectable *connectable); void ags_machine_selector_disconnect(AgsConnectable *connectable); void ags_machine_selector_show(GtkWidget *widget); /** * SECTION:ags_machine_selector * @short_description: machine radio buttons * @title: AgsMachineSelector * @section_id: * @include: ags/X/editor/ags_machine_selector.h * * The #AgsMachineSelector enables you make choice of an #AgsMachine. */ enum{ CHANGED, LAST_SIGNAL, }; static gpointer ags_machine_selector_parent_class = NULL; static guint machine_selector_signals[LAST_SIGNAL]; GType ags_machine_selector_get_type(void) { static GType ags_type_machine_selector = 0; if(!ags_type_machine_selector){ static const GTypeInfo ags_machine_selector_info = { sizeof (AgsMachineSelectorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_machine_selector_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMachineSelector), 0, /* n_preallocs */ (GInstanceInitFunc) ags_machine_selector_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_machine_selector_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_machine_selector = g_type_register_static(GTK_TYPE_VBOX, "AgsMachineSelector", &ags_machine_selector_info, 0); g_type_add_interface_static(ags_type_machine_selector, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_machine_selector); } void ags_machine_selector_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_machine_selector_connect; connectable->disconnect = ags_machine_selector_disconnect; } void ags_machine_selector_class_init(AgsMachineSelectorClass *machine_selector) { ags_machine_selector_parent_class = g_type_class_peek_parent(machine_selector); /* AgsMachineSelectorClass */ machine_selector->changed = NULL; /** * AgsMachineSelector::changed: * @machine_selector: the #AgsMachineSelector * @machine: the changed #AgsMachine * * The ::changed signal notifies changed #AgsMachine. * * Since: 1.0.0 */ machine_selector_signals[CHANGED] = g_signal_new("changed", G_TYPE_FROM_CLASS(machine_selector), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMachineSelectorClass, changed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_machine_selector_init(AgsMachineSelector *machine_selector) { GtkHBox *hbox; machine_selector->flags = 0; hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(machine_selector), GTK_WIDGET(hbox), FALSE, FALSE, 0); machine_selector->label = (GtkLabel *) gtk_label_new(NULL); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(machine_selector->label), FALSE, FALSE, 0); machine_selector->current = NULL; machine_selector->popup = NULL; machine_selector->menu_button = g_object_new(GTK_TYPE_MENU_TOOL_BUTTON, "stock-id", GTK_STOCK_EXECUTE, NULL); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(machine_selector->menu_button), FALSE, FALSE, 0); machine_selector->machine_selection = NULL; } void ags_machine_selector_connect(AgsConnectable *connectable) { AgsMachineSelector *machine_selector; GList *list, *list_start; machine_selector = AGS_MACHINE_SELECTOR(connectable); if((AGS_MACHINE_SELECTOR_CONNECTED & (machine_selector->flags)) != 0){ return; } machine_selector->flags |= AGS_MACHINE_SELECTOR_CONNECTED; /* machine radio button */ list = list_start = gtk_container_get_children((GtkContainer *) machine_selector); list = list->next; while(list != NULL){ g_signal_connect_after(G_OBJECT(list->data), "clicked", G_CALLBACK(ags_machine_selector_radio_changed), machine_selector); list = list->next; } g_list_free(list_start); } void ags_machine_selector_disconnect(AgsConnectable *connectable) { AgsMachineSelector *machine_selector; GList *list, *list_start; machine_selector = AGS_MACHINE_SELECTOR(connectable); if((AGS_MACHINE_SELECTOR_CONNECTED & (machine_selector->flags)) == 0){ return; } machine_selector->flags &= (~AGS_MACHINE_SELECTOR_CONNECTED); /* machine radio button */ list = list_start = gtk_container_get_children((GtkContainer *) machine_selector); list = list->next; while(list != NULL){ g_object_disconnect(G_OBJECT(list->data), "any_signal::clicked", G_CALLBACK(ags_machine_selector_radio_changed), machine_selector, NULL); list = list->next; } g_list_free(list_start); } void ags_machine_selector_add_index(AgsMachineSelector *machine_selector) { AgsMachineRadioButton *machine_radio_button, *group; GList *list, *list_start; list_start = list = gtk_container_get_children(GTK_CONTAINER(machine_selector)); list = list->next; if(list == NULL){ group = NULL; }else{ group = AGS_MACHINE_RADIO_BUTTON(list->data); } g_list_free(list_start); machine_radio_button = (AgsMachineRadioButton *) g_object_new(AGS_TYPE_MACHINE_RADIO_BUTTON, "group", group, NULL); gtk_box_pack_start(GTK_BOX(machine_selector), GTK_WIDGET(machine_radio_button), FALSE, FALSE, 0); g_signal_connect_after(G_OBJECT(machine_radio_button), "clicked", G_CALLBACK(ags_machine_selector_radio_changed), machine_selector); gtk_widget_show_all((GtkWidget *) machine_radio_button); } void ags_machine_selector_remove_index(AgsMachineSelector *machine_selector, guint nth) { AgsNotationEditor *notation_editor; AgsAutomationEditor *automation_editor; AgsMachineRadioButton *machine_radio_button; GList *list, *list_start; /* get machine radio button */ machine_radio_button = NULL; list_start = list = gtk_container_get_children(GTK_CONTAINER(machine_selector)); list = list->next; list = g_list_nth(list, nth); if(list != NULL){ machine_radio_button = list->data; } g_list_free(list_start); if(machine_radio_button == NULL){ return; } /**/ gtk_widget_destroy(GTK_WIDGET(machine_radio_button)); } void ags_machine_selector_link_index(AgsMachineSelector *machine_selector, AgsMachine *machine) { AgsMachineRadioButton *machine_radio_button, *existing_radio_button; GList *list, *list_start; /* retrieve selected */ machine_radio_button = NULL; existing_radio_button = NULL; list_start = list = gtk_container_get_children(GTK_CONTAINER(machine_selector)); list = list->next; while(list != NULL){ if(GTK_IS_TOGGLE_BUTTON(list->data)){ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(list->data))){ machine_radio_button = AGS_MACHINE_RADIO_BUTTON(list->data); } if(AGS_MACHINE_RADIO_BUTTON(list->data)->machine == machine){ existing_radio_button = AGS_MACHINE_RADIO_BUTTON(list->data); } } list = list->next; } g_list_free(list_start); /* decide if link to editor or change index */ if(existing_radio_button != NULL){ gtk_button_clicked((GtkButton *) existing_radio_button); }else{ g_object_set(G_OBJECT(machine_radio_button), "machine", machine, NULL); } } /** * ags_machine_selector_changed: * @machine_selector: the #AgsMachineSelector * @machine: the selected #AgsMachine * * Emitted as #AgsMachineSelector modified. * * Since: 1.0.0 */ void ags_machine_selector_changed(AgsMachineSelector *machine_selector, AgsMachine *machine) { g_return_if_fail(AGS_IS_MACHINE_SELECTOR(machine_selector)); g_object_ref((GObject *) machine_selector); g_signal_emit((GObject *) machine_selector, machine_selector_signals[CHANGED], 0, machine); g_object_unref((GObject *) machine_selector); } /** * ags_machine_selector_new: * * Create a new #AgsMachineSelector. * * Returns: a new #AgsMachineSelector * * Since: 1.0.0 */ AgsMachineSelector* ags_machine_selector_new() { AgsMachineSelector *machine_selector; machine_selector = (AgsMachineSelector *) g_object_new(AGS_TYPE_MACHINE_SELECTOR, NULL); return(machine_selector); } /** * ags_machine_selector_popup_new: * @machine_selector: the #AgsMachineSelector * * Create a new #AgsMachineSelectorPopup. * * Returns: a new #GtkMenu suitable for #AgsMachineSelector * * Since: 1.0.0 */ GtkMenu* ags_machine_selector_popup_new(AgsMachineSelector *machine_selector) { GtkMenu *popup, *keys; GtkMenuItem *item; GList *list, *list_start; popup = (GtkMenu *) gtk_menu_new(); g_object_set_data((GObject *) popup, g_type_name(AGS_TYPE_MACHINE_SELECTOR), machine_selector); /* item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("add tab")); gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("remove tab")); gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item); */ item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("add index")); gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("remove index")); gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("link index")); gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item); if((AGS_MACHINE_SELECTOR_SHOW_REVERSE_MAPPING & (machine_selector->flags)) != 0){ item = (GtkMenuItem *) gtk_check_menu_item_new_with_label(i18n("reverse mapping")); gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item); } if((AGS_MACHINE_SELECTOR_SHOW_SHIFT_PIANO & (machine_selector->flags)) != 0){ item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("shift piano")); gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item); keys = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu(item, (GtkWidget *) keys); item = (GtkMenuItem *) gtk_menu_item_new_with_label("A"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("A#"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("H"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("C"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("C#"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("D"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("D#"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("E"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("F"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("F#"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("G"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label("G#"); gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item); } /* connect */ list_start = list = gtk_container_get_children((GtkContainer *) popup); /* g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_machine_selector_popup_add_tab_callback), (gpointer) machine_selector); list = list->next; g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_machine_selector_popup_remove_tab_callback), (gpointer) machine_selector); list = list->next; */ g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_machine_selector_popup_add_index_callback), (gpointer) machine_selector); list = list->next; g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_machine_selector_popup_remove_index_callback), (gpointer) machine_selector); list = list->next; g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_machine_selector_popup_link_index_callback), (gpointer) machine_selector); if((AGS_MACHINE_SELECTOR_SHOW_REVERSE_MAPPING & (machine_selector->flags)) != 0){ list = list->next; g_signal_connect_after(G_OBJECT(list->data), "activate", G_CALLBACK(ags_machine_selector_popup_reverse_mapping_callback), (gpointer) machine_selector); } g_list_free(list_start); /* keys */ if((AGS_MACHINE_SELECTOR_SHOW_SHIFT_PIANO & (machine_selector->flags)) != 0){ list_start = list = gtk_container_get_children((GtkContainer *) keys); while(list != NULL){ g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_machine_selector_popup_shift_piano_callback), (gpointer) machine_selector); list = list->next; } g_list_free(list_start); } /* show */ if((AGS_MACHINE_SELECTOR_SHOW_SHIFT_PIANO & (machine_selector->flags)) != 0){ gtk_widget_show_all((GtkWidget *) keys); } gtk_widget_show_all((GtkWidget *) popup); return(popup); } gsequencer-1.4.24/ags/X/editor/ags_machine_radio_button.c0000644000175000017500000001624113246707333020322 00000000000000/* 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 . */ #include #include #include #include #include void ags_machine_radio_button_class_init(AgsMachineRadioButtonClass *machine_radio_button); void ags_machine_radio_button_connectable_interface_init(AgsConnectableInterface *connectable); void ags_machine_radio_button_init(AgsMachineRadioButton *machine_radio_button); void ags_machine_radio_button_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_machine_radio_button_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_machine_radio_button_connect(AgsConnectable *connectable); void ags_machine_radio_button_disconnect(AgsConnectable *connectable); void ags_machine_radio_button_finalize(GObject *gobject); /** * SECTION:ags_machine_radio_button * @short_description: machine radio buttons * @title: AgsMachineRadioButton * @section_id: * @include: ags/X/editor/ags_machine_radio_button.h * * The #AgsMachineRadioButton enables you make choice of an #AgsMachine. */ enum{ PROP_0, PROP_MACHINE, }; static gpointer ags_machine_radio_button_parent_class = NULL; GType ags_machine_radio_button_get_type(void) { static GType ags_type_machine_radio_button = 0; if(!ags_type_machine_radio_button){ static const GTypeInfo ags_machine_radio_button_info = { sizeof (AgsMachineRadioButtonClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_machine_radio_button_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMachineRadioButton), 0, /* n_preallocs */ (GInstanceInitFunc) ags_machine_radio_button_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_machine_radio_button_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_machine_radio_button = g_type_register_static(GTK_TYPE_RADIO_BUTTON, "AgsMachineRadioButton", &ags_machine_radio_button_info, 0); g_type_add_interface_static(ags_type_machine_radio_button, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_machine_radio_button); } void ags_machine_radio_button_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_machine_radio_button_connect; connectable->disconnect = ags_machine_radio_button_disconnect; } void ags_machine_radio_button_class_init(AgsMachineRadioButtonClass *machine_radio_button) { GObjectClass *gobject; GParamSpec *param_spec; ags_machine_radio_button_parent_class = g_type_class_peek_parent(machine_radio_button); /* GObjectClass */ gobject = (GObjectClass *) machine_radio_button; gobject->set_property = ags_machine_radio_button_set_property; gobject->get_property = ags_machine_radio_button_get_property; gobject->finalize = ags_machine_radio_button_finalize; /* properties */ /** * AgsMachineRadioButton:machine: * * The assigned #AgsMachine * * Since: 1.0.0 */ param_spec = g_param_spec_object("machine", i18n_pspec("assigned machine"), i18n_pspec("The machine it is assigned to"), AGS_TYPE_MACHINE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MACHINE, param_spec); } void ags_machine_radio_button_init(AgsMachineRadioButton *machine_radio_button) { machine_radio_button->machine = NULL; } void ags_machine_radio_button_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMachineRadioButton *machine_radio_button; machine_radio_button = AGS_MACHINE_RADIO_BUTTON(gobject); switch(prop_id){ case PROP_MACHINE: { AgsMachine *machine; AgsMachineSelector *machine_selector; machine = (AgsMachine *) g_value_get_object(value); if(machine == machine_radio_button->machine){ return; } if(machine_radio_button->machine != NULL){ g_object_unref(machine_radio_button->machine); } if(machine != NULL){ gchar *str; str = g_strdup_printf("%s: %s", G_OBJECT_TYPE_NAME(machine), machine->machine_name); g_object_set(gobject, "label", str, NULL); g_signal_connect_after(machine, "notify::machine-name", G_CALLBACK(ags_machine_radio_button_notify_machine_name_callback), machine_radio_button); g_object_ref(machine); g_free(str); } machine_radio_button->machine = machine; machine_selector = (AgsMachineSelector *) gtk_widget_get_ancestor((GtkWidget *) machine_radio_button, AGS_TYPE_MACHINE_SELECTOR); ags_machine_selector_changed(machine_selector, machine); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_radio_button_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMachineRadioButton *machine_radio_button; machine_radio_button = AGS_MACHINE_RADIO_BUTTON(gobject); switch(prop_id){ case PROP_MACHINE: { g_value_set_object(value, machine_radio_button->machine); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_radio_button_connect(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_machine_radio_button_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_machine_radio_button_finalize(GObject *gobject) { AgsMachineRadioButton *machine_radio_button; machine_radio_button = AGS_MACHINE_RADIO_BUTTON(gobject); if(machine_radio_button->machine != NULL){ g_object_unref(G_OBJECT(machine_radio_button->machine)); } } /** * ags_machine_radio_button_new: * * Create a new #AgsMachineRadioButton. * * Returns: a new #AgsMachineRadioButton * * Since: 1.0.0 */ AgsMachineRadioButton* ags_machine_radio_button_new() { AgsMachineRadioButton *machine_radio_button; machine_radio_button = (AgsMachineRadioButton *) g_object_new(AGS_TYPE_MACHINE_RADIO_BUTTON, NULL); return(machine_radio_button); } gsequencer-1.4.24/ags/X/editor/ags_move_note_dialog_callbacks.h0000644000175000017500000000253213246707333021461 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MOVE_NOTE_DIALOG_CALLBACKS_H__ #define __AGS_MOVE_NOTE_DIALOG_CALLBACKS_H__ #include #include #include #include void ags_move_note_dialog_response_callback(GtkWidget *dialog, gint response, AgsMoveNoteDialog *move_note_dialog); void ags_move_note_dialog_relative_callback(GtkWidget *button, AgsMoveNoteDialog *move_note_dialog); void ags_move_note_dialog_absolute_callback(GtkWidget *button, AgsMoveNoteDialog *move_note_dialog); #endif /*__AGS_MOVE_NOTE_DIALOG_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_automation_toolbar_callbacks.c0000644000175000017500000002402013247044247022037 00000000000000/* 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 . */ #include #include #include void ags_automation_toolbar_machine_changed_callback(AgsAutomationEditor *automation_editor, AgsMachine *machine, AgsAutomationToolbar *toolbar) { AgsAutomation *automation; /* load ports */ ags_automation_toolbar_load_port(automation_editor->automation_toolbar); } void ags_automation_toolbar_position_callback(GtkToggleButton *toggle_button, AgsAutomationToolbar *automation_toolbar) { AgsAutomationEditor *automation_editor; automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor((GtkWidget *) automation_toolbar, AGS_TYPE_AUTOMATION_EDITOR); if(toggle_button == automation_toolbar->selected_edit_mode){ if(!gtk_toggle_tool_button_get_active(toggle_button)){ gtk_toggle_tool_button_set_active(toggle_button, TRUE); } }else if(gtk_toggle_tool_button_get_active(toggle_button)){ GtkToggleButton *old_selected_edit_mode; old_selected_edit_mode = automation_toolbar->selected_edit_mode; automation_toolbar->selected_edit_mode = toggle_button; gtk_toggle_tool_button_set_active(old_selected_edit_mode, FALSE); } } void ags_automation_toolbar_edit_callback(GtkToggleButton *toggle_button, AgsAutomationToolbar *automation_toolbar) { if(toggle_button == automation_toolbar->selected_edit_mode){ if(!gtk_toggle_tool_button_get_active(toggle_button)){ gtk_toggle_tool_button_set_active(toggle_button, TRUE); } }else if(gtk_toggle_tool_button_get_active(toggle_button)){ GtkToggleButton *old_selected_edit_mode; old_selected_edit_mode = automation_toolbar->selected_edit_mode; automation_toolbar->selected_edit_mode = toggle_button; gtk_toggle_tool_button_set_active(old_selected_edit_mode, FALSE); } } void ags_automation_toolbar_clear_callback(GtkToggleButton *toggle_button, AgsAutomationToolbar *automation_toolbar) { if(toggle_button == automation_toolbar->selected_edit_mode){ if(!gtk_toggle_tool_button_get_active(toggle_button)){ gtk_toggle_tool_button_set_active(toggle_button, TRUE); } }else if(gtk_toggle_tool_button_get_active(toggle_button)){ GtkToggleButton *old_selected_edit_mode; old_selected_edit_mode = automation_toolbar->selected_edit_mode; automation_toolbar->selected_edit_mode = toggle_button; gtk_toggle_tool_button_set_active(old_selected_edit_mode, FALSE); } } void ags_automation_toolbar_select_callback(GtkToggleButton *toggle_button, AgsAutomationToolbar *automation_toolbar) { if(toggle_button == automation_toolbar->selected_edit_mode){ if(!gtk_toggle_tool_button_get_active(toggle_button)){ gtk_toggle_tool_button_set_active(toggle_button, TRUE); } }else if(gtk_toggle_tool_button_get_active(toggle_button)){ GtkToggleButton *old_selected_edit_mode; old_selected_edit_mode = automation_toolbar->selected_edit_mode; automation_toolbar->selected_edit_mode = toggle_button; gtk_toggle_tool_button_set_active(old_selected_edit_mode, FALSE); } } void ags_automation_toolbar_copy_or_cut_callback(GtkWidget *widget, AgsAutomationToolbar *automation_toolbar) { AgsAutomationEditor *automation_editor; automation_editor = AGS_AUTOMATION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(automation_toolbar), AGS_TYPE_AUTOMATION_EDITOR)); if(widget == (GtkWidget *) automation_toolbar->copy){ ags_automation_editor_copy(automation_editor); }else{ ags_automation_editor_cut(automation_editor); } } void ags_automation_toolbar_paste_callback(GtkWidget *widget, AgsAutomationToolbar *automation_toolbar) { AgsAutomationEditor *automation_editor; automation_editor = AGS_AUTOMATION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(automation_toolbar), AGS_TYPE_AUTOMATION_EDITOR)); ags_automation_editor_paste(automation_editor); } void ags_automation_toolbar_match_line_callback(GtkWidget *widget, AgsAutomationToolbar *automation_toolbar) { AgsAutomationEditor *automation_editor; automation_editor = AGS_AUTOMATION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(automation_toolbar), AGS_TYPE_AUTOMATION_EDITOR)); if(gtk_check_menu_item_get_active(widget)){ automation_editor->flags |= AGS_AUTOMATION_EDITOR_PASTE_MATCH_LINE; }else{ automation_editor->flags &= (~AGS_AUTOMATION_EDITOR_PASTE_MATCH_LINE); } } void ags_automation_toolbar_no_duplicates_callback(GtkWidget *widget, AgsAutomationToolbar *automation_toolbar) { AgsAutomationEditor *automation_editor; automation_editor = AGS_AUTOMATION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(automation_toolbar), AGS_TYPE_AUTOMATION_EDITOR)); if(gtk_check_menu_item_get_active(widget)){ automation_editor->flags |= AGS_AUTOMATION_EDITOR_PASTE_NO_DUPLICATES; }else{ automation_editor->flags &= (~AGS_AUTOMATION_EDITOR_PASTE_NO_DUPLICATES); } } void ags_automation_toolbar_tool_popup_select_acceleration_callback(GtkWidget *item, AgsAutomationToolbar *automation_toolbar) { gtk_widget_show_all(automation_toolbar->select_acceleration); } void ags_automation_toolbar_tool_popup_ramp_acceleration_callback(GtkWidget *item, AgsAutomationToolbar *automation_toolbar) { gtk_widget_show_all(automation_toolbar->ramp_acceleration); } void ags_automation_toolbar_tool_popup_position_cursor_callback(GtkWidget *item, AgsAutomationToolbar *automation_toolbar) { gtk_widget_show_all(automation_toolbar->position_automation_cursor); } void ags_automation_toolbar_zoom_callback(GtkComboBox *combo_box, AgsAutomationToolbar *automation_toolbar) { AgsAutomationEditor *automation_editor; GtkWidget *widget; GtkAdjustment *adjustment; GList *list_start; double zoom_factor, zoom; auto void ags_automation_toolbar_zoom_callback_apply(GList *list); void ags_automation_toolbar_zoom_callback_apply(GList *list){ AgsAutomationEdit *automation_edit; while(list != NULL){ automation_edit = list->data; gtk_widget_queue_draw(automation_edit); /* reset ruler */ automation_edit->ruler->factor = zoom_factor; automation_edit->ruler->precision = zoom; automation_edit->ruler->scale_precision = 1.0 / zoom; gtk_widget_queue_draw((GtkWidget *) automation_edit->ruler); list = list->next; } } automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor((GtkWidget *) automation_toolbar, AGS_TYPE_AUTOMATION_EDITOR); /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom) - 2.0); /* audio */ automation_editor->audio_ruler->factor = zoom_factor; automation_editor->audio_ruler->precision = zoom; automation_editor->audio_ruler->scale_precision = 1.0 / zoom; gtk_widget_queue_draw((GtkWidget *) automation_editor->audio_ruler); list_start = gtk_container_get_children(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box); ags_automation_toolbar_zoom_callback_apply(list_start); g_list_free(list_start); ags_automation_editor_reset_audio_scrollbar(automation_editor); /* output */ automation_editor->output_ruler->factor = zoom_factor; automation_editor->output_ruler->precision = zoom; automation_editor->output_ruler->scale_precision = 1.0 / zoom; gtk_widget_queue_draw((GtkWidget *) automation_editor->output_ruler); list_start = gtk_container_get_children(automation_editor->output_scrolled_automation_edit_box->automation_edit_box); ags_automation_toolbar_zoom_callback_apply(list_start); g_list_free(list_start); ags_automation_editor_reset_output_scrollbar(automation_editor); /* input */ automation_editor->input_ruler->factor = zoom_factor; automation_editor->input_ruler->precision = zoom; automation_editor->input_ruler->scale_precision = 1.0 / zoom; gtk_widget_queue_draw((GtkWidget *) automation_editor->input_ruler); list_start = gtk_container_get_children(automation_editor->input_scrolled_automation_edit_box->automation_edit_box); ags_automation_toolbar_zoom_callback_apply(list_start); g_list_free(list_start); ags_automation_editor_reset_input_scrollbar(automation_editor); } void ags_automation_toolbar_port_callback(GtkComboBox *combo_box, AgsAutomationToolbar *automation_toolbar) { GtkTreeModel *model; GtkTreeIter iter; gchar *scope; gchar *control_name; GType channel_type; GValue value = {0,}; if((AGS_AUTOMATION_TOOLBAR_RESET_PORT & (automation_toolbar->flags)) != 0){ return; } automation_toolbar->flags |= AGS_AUTOMATION_TOOLBAR_RESET_PORT; model = gtk_combo_box_get_model(combo_box); gtk_combo_box_get_active_iter(combo_box, &iter); gtk_tree_model_get(model, &iter, 1, &scope, 2, &control_name, -1); if(!g_strcmp0("audio", scope)){ channel_type = G_TYPE_NONE; }else if(!g_strcmp0("output", scope)){ channel_type = AGS_TYPE_OUTPUT; }else if(!g_strcmp0("input", scope)){ channel_type = AGS_TYPE_INPUT; } if(control_name != NULL && g_ascii_strncasecmp(control_name, "", 1)){ ags_automation_toolbar_apply_port(automation_toolbar, channel_type, control_name); } automation_toolbar->flags &= (~AGS_AUTOMATION_TOOLBAR_RESET_PORT); } gsequencer-1.4.24/ags/X/editor/ags_wave_toolbar.c0000644000175000017500000001766713247044247016645 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_wave_toolbar_class_init(AgsWaveToolbarClass *wave_toolbar); void ags_wave_toolbar_connectable_interface_init(AgsConnectableInterface *connectable); void ags_wave_toolbar_init(AgsWaveToolbar *wave_toolbar); void ags_wave_toolbar_connect(AgsConnectable *connectable); void ags_wave_toolbar_disconnect(AgsConnectable *connectable); /** * SECTION:ags_wave_toolbar * @short_description: wave toolbar * @title: AgsWaveToolbar * @section_id: * @include: ags/X/editor/ags_wave_toolbar.h * * The #AgsWaveToolbar lets you choose edit tool. */ GType ags_wave_toolbar_get_type(void) { static GType ags_type_wave_toolbar = 0; if (!ags_type_wave_toolbar){ static const GTypeInfo ags_wave_toolbar_info = { sizeof (AgsWaveToolbarClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_wave_toolbar_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsWaveToolbar), 0, /* n_preallocs */ (GInstanceInitFunc) ags_wave_toolbar_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_wave_toolbar_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_wave_toolbar = g_type_register_static(GTK_TYPE_TOOLBAR, "AgsWaveToolbar", &ags_wave_toolbar_info, 0); g_type_add_interface_static(ags_type_wave_toolbar, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_wave_toolbar); } void ags_wave_toolbar_class_init(AgsWaveToolbarClass *wave_toolbar) { } void ags_wave_toolbar_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_wave_toolbar_connect; connectable->disconnect = ags_wave_toolbar_disconnect; } void ags_wave_toolbar_init(AgsWaveToolbar *wave_toolbar) { GtkMenuToolButton *menu_tool_button; GtkMenu *menu; GtkLabel *label; GtkCellRenderer *cell_renderer; wave_toolbar->position = g_object_new(GTK_TYPE_TOGGLE_BUTTON, "image", gtk_image_new_from_stock(GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_LARGE_TOOLBAR), "relief", GTK_RELIEF_NONE, NULL); gtk_toolbar_append_widget((GtkToolbar *) wave_toolbar, (GtkWidget *) wave_toolbar->position, "position cursor", NULL); wave_toolbar->select = g_object_new(GTK_TYPE_TOGGLE_BUTTON, "image", gtk_image_new_from_stock(GTK_STOCK_SELECT_ALL, GTK_ICON_SIZE_LARGE_TOOLBAR), "relief", GTK_RELIEF_NONE, NULL); gtk_toolbar_append_widget((GtkToolbar *) wave_toolbar, (GtkWidget *) wave_toolbar->select, "select wave", NULL); wave_toolbar->copy = (GtkButton *) g_object_new(GTK_TYPE_BUTTON, "image", gtk_image_new_from_stock(GTK_STOCK_COPY, GTK_ICON_SIZE_LARGE_TOOLBAR), "relief", GTK_RELIEF_NONE, NULL); gtk_toolbar_append_widget((GtkToolbar *) wave_toolbar, (GtkWidget *) wave_toolbar->copy, "copy wave", NULL); wave_toolbar->cut = (GtkButton *) g_object_new(GTK_TYPE_BUTTON, "image", gtk_image_new_from_stock(GTK_STOCK_CUT, GTK_ICON_SIZE_LARGE_TOOLBAR), "relief", GTK_RELIEF_NONE, NULL); gtk_toolbar_append_widget((GtkToolbar *) wave_toolbar, (GtkWidget *) wave_toolbar->cut, "cut wave", NULL); wave_toolbar->paste = (GtkButton *) g_object_new(GTK_TYPE_BUTTON, "image", gtk_image_new_from_stock(GTK_STOCK_PASTE, GTK_ICON_SIZE_LARGE_TOOLBAR), "relief", GTK_RELIEF_NONE, NULL); gtk_toolbar_append_widget((GtkToolbar *) wave_toolbar, (GtkWidget *) wave_toolbar->paste, "paste wave", NULL); /* menu tool */ wave_toolbar->menu_tool = (GtkMenuToolButton *) g_object_new(GTK_TYPE_MENU_TOOL_BUTTON, "label", i18n("tool"), "stock-id", GTK_STOCK_EXECUTE, NULL); gtk_toolbar_append_widget((GtkToolbar *) wave_toolbar, (GtkWidget *) wave_toolbar->menu_tool, i18n("additional tools"), NULL); /* menu tool - tool popup */ wave_toolbar->tool_popup = ags_wave_toolbar_tool_popup_new(wave_toolbar); gtk_menu_tool_button_set_menu(wave_toolbar->menu_tool, wave_toolbar->tool_popup); /* menu tool - dialogs */ wave_toolbar->select_audio_data = NULL; wave_toolbar->position_wave_cursor = NULL; /* */ wave_toolbar->zoom_history = 4; label = (GtkLabel *) gtk_label_new(i18n("zoom")); gtk_container_add(GTK_CONTAINER(wave_toolbar), (GtkWidget *) label); wave_toolbar->zoom = ags_zoom_combo_box_new(); gtk_combo_box_set_active(GTK_COMBO_BOX(wave_toolbar->zoom), 2); gtk_toolbar_append_widget((GtkToolbar *) wave_toolbar, (GtkWidget *) wave_toolbar->zoom, NULL, NULL); } void ags_wave_toolbar_connect(AgsConnectable *connectable) { AgsWaveToolbar *wave_toolbar; wave_toolbar = AGS_WAVE_TOOLBAR(connectable); if((AGS_WAVE_TOOLBAR_CONNECTED & (wave_toolbar->flags)) != 0){ return; } wave_toolbar->flags |= AGS_WAVE_TOOLBAR_CONNECTED; } void ags_wave_toolbar_disconnect(AgsConnectable *connectable) { AgsWaveToolbar *wave_toolbar; wave_toolbar = AGS_WAVE_TOOLBAR(connectable); if((AGS_WAVE_TOOLBAR_CONNECTED & (wave_toolbar->flags)) == 0){ return; } wave_toolbar->flags &= (~AGS_WAVE_TOOLBAR_CONNECTED); } /** * ags_wave_toolbar_tool_popup_new: * * Create a new #GtkMenu suitable for menu tool button. * * Returns: a new #GtkMenu * * Since: 1.2.0 */ GtkMenu* ags_wave_toolbar_tool_popup_new(GtkToolbar *wave_toolbar) { GtkMenu *tool_popup; GtkMenuItem *item; GList *list, *list_start; tool_popup = (GtkMenu *) gtk_menu_new(); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("select audio data")); gtk_menu_shell_append((GtkMenuShell *) tool_popup, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("position cursor")); gtk_menu_shell_append((GtkMenuShell *) tool_popup, (GtkWidget *) item); /* connect */ list_start = list = gtk_container_get_children((GtkContainer *) tool_popup); g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_wave_toolbar_tool_popup_select_audio_data_callback), (gpointer) wave_toolbar); list = list->next; g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_wave_toolbar_tool_popup_position_cursor_callback), (gpointer) wave_toolbar); g_list_free(list_start); /* show */ gtk_widget_show_all((GtkWidget *) tool_popup); return(tool_popup); } /** * ags_wave_toolbar_new: * * Create a new #AgsWaveToolbar. * * Returns: a new #AgsWaveToolbar * * Since: 1.2.0 */ AgsWaveToolbar* ags_wave_toolbar_new() { AgsWaveToolbar *wave_toolbar; wave_toolbar = (AgsWaveToolbar *) g_object_new(AGS_TYPE_WAVE_TOOLBAR, NULL); return(wave_toolbar); } gsequencer-1.4.24/ags/X/editor/ags_crop_note_dialog_callbacks.h0000644000175000017500000000235413246707333021460 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CROP_NOTE_DIALOG_CALLBACKS_H__ #define __AGS_CROP_NOTE_DIALOG_CALLBACKS_H__ #include #include #include #include void ags_crop_note_dialog_response_callback(GtkWidget *dialog, gint response, AgsCropNoteDialog *crop_note_dialog); void ags_crop_note_dialog_absolute_callback(GtkWidget *button, AgsCropNoteDialog *crop_note_dialog); #endif /*__AGS_CROP_NOTE_DIALOG_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_select_note_dialog.c0000644000175000017500000004120713247044247017767 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_select_note_dialog_class_init(AgsSelectNoteDialogClass *select_note_dialog); void ags_select_note_dialog_connectable_interface_init(AgsConnectableInterface *connectable); void ags_select_note_dialog_applicable_interface_init(AgsApplicableInterface *applicable); void ags_select_note_dialog_init(AgsSelectNoteDialog *select_note_dialog); void ags_select_note_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_select_note_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_select_note_dialog_finalize(GObject *gobject); void ags_select_note_dialog_connect(AgsConnectable *connectable); void ags_select_note_dialog_disconnect(AgsConnectable *connectable); void ags_select_note_dialog_set_update(AgsApplicable *applicable, gboolean update); void ags_select_note_dialog_apply(AgsApplicable *applicable); void ags_select_note_dialog_reset(AgsApplicable *applicable); gboolean ags_select_note_dialog_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_select_note_dialog * @short_description: select tool * @title: AgsSelectNoteDialog * @section_id: * @include: ags/X/editor/ags_select_note_dialog.h * * The #AgsSelectNoteDialog lets you select notes. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; static gpointer ags_select_note_dialog_parent_class = NULL; GType ags_select_note_dialog_get_type(void) { static GType ags_type_select_note_dialog = 0; if (!ags_type_select_note_dialog){ static const GTypeInfo ags_select_note_dialog_info = { sizeof (AgsSelectNoteDialogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_select_note_dialog_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSelectNoteDialog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_select_note_dialog_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_select_note_dialog_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_select_note_dialog_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_select_note_dialog = g_type_register_static(GTK_TYPE_DIALOG, "AgsSelectNoteDialog", &ags_select_note_dialog_info, 0); g_type_add_interface_static(ags_type_select_note_dialog, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_select_note_dialog, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return (ags_type_select_note_dialog); } void ags_select_note_dialog_class_init(AgsSelectNoteDialogClass *select_note_dialog) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_select_note_dialog_parent_class = g_type_class_peek_parent(select_note_dialog); /* GObjectClass */ gobject = (GObjectClass *) select_note_dialog; gobject->set_property = ags_select_note_dialog_set_property; gobject->get_property = ags_select_note_dialog_get_property; gobject->finalize = ags_select_note_dialog_finalize; /* properties */ /** * AgsSelectNoteDialog:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsSelectNoteDialog:main-window: * * The assigned #AgsWindow. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) select_note_dialog; widget->delete_event = ags_select_note_dialog_delete_event; } void ags_select_note_dialog_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_select_note_dialog_connect; connectable->disconnect = ags_select_note_dialog_disconnect; } void ags_select_note_dialog_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_select_note_dialog_set_update; applicable->apply = ags_select_note_dialog_apply; applicable->reset = ags_select_note_dialog_reset; } void ags_select_note_dialog_init(AgsSelectNoteDialog *select_note_dialog) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; select_note_dialog->flags = 0; g_object_set(select_note_dialog, "title", i18n("select notes"), NULL); vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) select_note_dialog->dialog.vbox, GTK_WIDGET(vbox), FALSE, FALSE, 0); /* copy selection */ select_note_dialog->copy_selection = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("copy selection")); gtk_toggle_button_set_active(select_note_dialog->copy_selection, TRUE); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(select_note_dialog->copy_selection), FALSE, FALSE, 0); /* select x0 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* select x0 - label */ label = (GtkLabel *) gtk_label_new(i18n("select x0")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* select x0 - spin button */ select_note_dialog->select_x0 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_SELECT_NOTE_MAX_BEATS, 1.0); gtk_spin_button_set_value(select_note_dialog->select_x0, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(select_note_dialog->select_x0), FALSE, FALSE, 0); /* select y0 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* select y0 - label */ label = (GtkLabel *) gtk_label_new(i18n("select y0")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* select y0 - spin button */ select_note_dialog->select_y0 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_SELECT_NOTE_MAX_KEYS, 1.0); gtk_spin_button_set_value(select_note_dialog->select_y0, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(select_note_dialog->select_y0), FALSE, FALSE, 0); /* select x1 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* select x1 - label */ label = (GtkLabel *) gtk_label_new(i18n("select x1")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* select x1 - spin button */ select_note_dialog->select_x1 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_SELECT_NOTE_MAX_BEATS, 1.0); gtk_spin_button_set_value(select_note_dialog->select_x1, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(select_note_dialog->select_x1), FALSE, FALSE, 0); /* select y1 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* select y1 - label */ label = (GtkLabel *) gtk_label_new(i18n("select y1")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* select y1 - spin button */ select_note_dialog->select_y1 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_SELECT_NOTE_MAX_KEYS, 1.0); gtk_spin_button_set_value(select_note_dialog->select_y1, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(select_note_dialog->select_y1), FALSE, FALSE, 0); /* dialog buttons */ gtk_dialog_add_buttons((GtkDialog *) select_note_dialog, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); } void ags_select_note_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSelectNoteDialog *select_note_dialog; select_note_dialog = AGS_SELECT_NOTE_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) select_note_dialog->application_context == application_context){ return; } if(select_note_dialog->application_context != NULL){ g_object_unref(select_note_dialog->application_context); } if(application_context != NULL){ g_object_ref(application_context); } select_note_dialog->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) select_note_dialog->main_window == main_window){ return; } if(select_note_dialog->main_window != NULL){ g_object_unref(select_note_dialog->main_window); } if(main_window != NULL){ g_object_ref(main_window); } select_note_dialog->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_select_note_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSelectNoteDialog *select_note_dialog; select_note_dialog = AGS_SELECT_NOTE_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, select_note_dialog->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, select_note_dialog->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_select_note_dialog_connect(AgsConnectable *connectable) { AgsSelectNoteDialog *select_note_dialog; select_note_dialog = AGS_SELECT_NOTE_DIALOG(connectable); if((AGS_SELECT_NOTE_DIALOG_CONNECTED & (select_note_dialog->flags)) != 0){ return; } select_note_dialog->flags |= AGS_SELECT_NOTE_DIALOG_CONNECTED; g_signal_connect(select_note_dialog, "response", G_CALLBACK(ags_select_note_dialog_response_callback), select_note_dialog); } void ags_select_note_dialog_disconnect(AgsConnectable *connectable) { AgsSelectNoteDialog *select_note_dialog; select_note_dialog = AGS_SELECT_NOTE_DIALOG(connectable); if((AGS_SELECT_NOTE_DIALOG_CONNECTED & (select_note_dialog->flags)) == 0){ return; } select_note_dialog->flags &= (~AGS_SELECT_NOTE_DIALOG_CONNECTED); g_object_disconnect(G_OBJECT(select_note_dialog), "any_signal::response", G_CALLBACK(ags_select_note_dialog_response_callback), select_note_dialog, NULL); } void ags_select_note_dialog_finalize(GObject *gobject) { AgsSelectNoteDialog *select_note_dialog; select_note_dialog = (AgsSelectNoteDialog *) gobject; if(select_note_dialog->application_context != NULL){ g_object_unref(select_note_dialog->application_context); } G_OBJECT_CLASS(ags_select_note_dialog_parent_class)->finalize(gobject); } void ags_select_note_dialog_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_select_note_dialog_apply(AgsApplicable *applicable) { AgsSelectNoteDialog *select_note_dialog; AgsWindow *window; AgsNotationEditor *notation_editor; AgsMachine *machine; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; xmlDoc *clipboard; xmlNode *audio_node, *notation_node; GList *list_notation; xmlChar *buffer; int size; guint x0, y0; guint x1, y1; gint i; gboolean copy_selection; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; select_note_dialog = AGS_SELECT_NOTE_DIALOG(applicable); window = select_note_dialog->main_window; notation_editor = window->notation_editor; machine = notation_editor->selected_machine; if(machine == NULL){ return; } audio = machine->audio; /* get some values */ copy_selection = gtk_toggle_button_get_active(select_note_dialog->copy_selection); x0 = gtk_spin_button_get_value_as_int(select_note_dialog->select_x0); y0 = gtk_spin_button_get_value_as_int(select_note_dialog->select_y0); x1 = gtk_spin_button_get_value_as_int(select_note_dialog->select_x1); y1 = gtk_spin_button_get_value_as_int(select_note_dialog->select_y1); /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* select note */ pthread_mutex_lock(audio_mutex); if(copy_selection){ /* create document */ clipboard = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION); /* create root node */ audio_node = xmlNewNode(NULL, BAD_CAST "audio"); xmlDocSetRootElement(clipboard, audio_node); } list_notation = audio->notation; i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ list_notation = g_list_nth(audio->notation, i); ags_notation_add_region_to_selection(AGS_NOTATION(list_notation->data), x0, y0, x1, y1, TRUE); if(copy_selection){ notation_node = ags_notation_copy_selection(AGS_NOTATION(list_notation->data)); xmlAddChild(audio_node, notation_node); } i++; } pthread_mutex_unlock(audio_mutex); /* write to clipboard */ if(copy_selection){ xmlDocDumpFormatMemoryEnc(clipboard, &buffer, &size, "UTF-8", TRUE); gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), buffer, size); gtk_clipboard_store(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); xmlFreeDoc(clipboard); } } void ags_select_note_dialog_reset(AgsApplicable *applicable) { //TODO:JK: implement me } gboolean ags_select_note_dialog_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_select_note_dialog_parent_class)->delete_event(widget, event); return(TRUE); } /** * ags_select_note_dialog_new: * @main_window: the #AgsWindow * * Create a new #AgsSelectNoteDialog. * * Returns: a new #AgsSelectNoteDialog * * Since: 1.0.0 */ AgsSelectNoteDialog* ags_select_note_dialog_new(GtkWidget *main_window) { AgsSelectNoteDialog *select_note_dialog; select_note_dialog = (AgsSelectNoteDialog *) g_object_new(AGS_TYPE_SELECT_NOTE_DIALOG, "main-window", main_window, NULL); return(select_note_dialog); } gsequencer-1.4.24/ags/X/editor/ags_machine_radio_button_callbacks.h0000644000175000017500000000225013246707333022321 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MACHINE_RADIO_BUTTON_CALLBACKS_H__ #define __AGS_MACHINE_RADIO_BUTTON_CALLBACKS_H__ #include #include #include #include void ags_machine_radio_button_notify_machine_name_callback(GObject *machine, GParamSpec *pspec, AgsMachineRadioButton *machine_radio_button); #endif /*__AGS_MACHINE_RADIO_BUTTON_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_envelope_dialog_callbacks.h0000644000175000017500000000262413246707333021305 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ENVELOPE_DIALOG_CALLBACKS_H__ #define __AGS_ENVELOPE_DIALOG_CALLBACKS_H__ #include #include #include #include int ags_envelope_dialog_apply_callback(GtkWidget *widget, AgsEnvelopeDialog *envelope_dialog); int ags_envelope_dialog_ok_callback(GtkWidget *widget, AgsEnvelopeDialog *envelope_dialog); int ags_envelope_dialog_cancel_callback(GtkWidget *widget, AgsEnvelopeDialog *envelope_dialog); gboolean ags_envelope_dialog_delete_event(GtkWidget *widget, GdkEventAny *event, AgsEnvelopeDialog *envelope_dialog); #endif /*__AGS_ENVELOPE_DIALOG_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_move_note_dialog_callbacks.c0000644000175000017500000000376513246707333021465 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_move_note_dialog_response_callback(GtkWidget *dialog, gint response, AgsMoveNoteDialog *move_note_dialog) { gboolean hide_dialog; hide_dialog = TRUE; switch(response){ case GTK_RESPONSE_APPLY: { hide_dialog = FALSE; } case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(move_note_dialog)); } case GTK_RESPONSE_CANCEL: { if(hide_dialog){ gtk_widget_hide(move_note_dialog); } } } } void ags_move_note_dialog_relative_callback(GtkWidget *button, AgsMoveNoteDialog *move_note_dialog) { gtk_spin_button_set_range(move_note_dialog->move_x, -1 * AGS_MOVE_NOTE_DIALOG_MAX_X, AGS_MOVE_NOTE_DIALOG_MAX_X); gtk_spin_button_set_range(move_note_dialog->move_y, -1 * AGS_MOVE_NOTE_DIALOG_MAX_Y, AGS_MOVE_NOTE_DIALOG_MAX_Y); } void ags_move_note_dialog_absolute_callback(GtkWidget *button, AgsMoveNoteDialog *move_note_dialog) { gtk_spin_button_set_range(move_note_dialog->move_x, 0, AGS_MOVE_NOTE_DIALOG_MAX_X); gtk_spin_button_set_range(move_note_dialog->move_y, 0, AGS_MOVE_NOTE_DIALOG_MAX_Y); } gsequencer-1.4.24/ags/X/editor/ags_automation_toolbar.h0000644000175000017500000000601113247044247020045 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUTOMATION_TOOLBAR_H__ #define __AGS_AUTOMATION_TOOLBAR_H__ #include #include #include #define AGS_TYPE_AUTOMATION_TOOLBAR (ags_automation_toolbar_get_type()) #define AGS_AUTOMATION_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTOMATION_TOOLBAR, AgsAutomationToolbar)) #define AGS_AUTOMATION_TOOLBAR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUTOMATION_TOOLBAR, AgsAutomationToolbarClass)) #define AGS_IS_AUTOMATION_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUTOMATION_TOOLBAR)) #define AGS_IS_AUTOMATION_TOOLBAR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUTOMATION_TOOLBAR)) #define AGS_AUTOMATION_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_AUTOMATION_TOOLBAR, AgsAutomationToolbarClass)) #define AGS_AUTOMATION_TOOLBAR_DATA_CHANNEL "ags-channel" #define AGS_AUTOMATION_TOOLBAR_DATA_PORT "ags-port" typedef struct _AgsAutomationToolbar AgsAutomationToolbar; typedef struct _AgsAutomationToolbarClass AgsAutomationToolbarClass; typedef enum{ AGS_AUTOMATION_TOOLBAR_CONNECTED = 1, AGS_AUTOMATION_TOOLBAR_RESET_PORT = 1 << 1, }AgsAutomationToolbarFlags; struct _AgsAutomationToolbar { GtkToolbar toolbar; guint flags; GtkToggleToolButton *selected_edit_mode; GtkToggleToolButton *position; GtkToggleToolButton *edit; GtkToggleToolButton *clear; GtkToggleToolButton *select; GtkToolButton *copy; GtkToolButton *cut; GtkMenuToolButton *paste_tool; GtkMenuToolButton *menu_tool; GtkMenu *tool_popup; GtkDialog *select_acceleration; GtkDialog *ramp_acceleration; GtkDialog *position_automation_cursor; guint zoom_history; GtkComboBox *zoom; GtkComboBox *port; }; struct _AgsAutomationToolbarClass { GtkToolbarClass toolbar; }; GType ags_automation_toolbar_get_type(void); void ags_automation_toolbar_load_port(AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_apply_port(AgsAutomationToolbar *automation_toolbar, GType channel_type, gchar *control_name); GtkMenu* ags_automation_toolbar_tool_popup_new(GtkToolbar *automation_toolbar); AgsAutomationToolbar* ags_automation_toolbar_new(); #endif /*__AGS_AUTOMATION_TOOLBAR_H__*/ gsequencer-1.4.24/ags/X/editor/ags_envelope_info_callbacks.h0000644000175000017500000000220313246707333020772 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ENVELOPE_INFO_CALLBACKS_H__ #define __AGS_ENVELOPE_INFO_CALLBACKS_H__ #include #include #include #include void ags_envelope_info_plot_callback(GtkCellRendererToggle *cell_renderer, gchar *path_str, AgsEnvelopeInfo *envelope_info); #endif /*__AGS_ENVELOPE_INFO_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_envelope_editor_callbacks.h0000644000175000017500000000450213246707333021331 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ENVELOPE_EDITOR_CALLBACKS_H__ #define __AGS_ENVELOPE_EDITOR_CALLBACKS_H__ #include #include #include #include void ags_envelope_editor_preset_callback(GtkWidget *combo_box, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_preset_add_callback(GtkWidget *button, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_preset_remove_callback(GtkWidget *button, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_preset_rename_response_callback(GtkWidget *widget, gint response, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_attack_x_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_attack_y_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_decay_x_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_decay_y_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_sustain_x_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_sustain_y_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_release_x_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_release_y_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_ratio_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor); #endif /*__AGS_ENVELOPE_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_notation_toolbar_callbacks.h0000644000175000017500000000514513247044247021526 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTATION_TOOLBAR_CALLBACKS_H__ #define __AGS_NOTATION_TOOLBAR_CALLBACKS_H__ #include #include #include #include void ags_notation_toolbar_position_callback(GtkToggleButton *toggle_button, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_edit_callback(GtkToggleButton *toggle_button, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_clear_callback(GtkToggleButton *toggle_button, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_select_callback(GtkToggleButton *toggle_button, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_copy_or_cut_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_paste_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_invert_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_match_audio_channel_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_no_duplicates_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_tool_popup_move_note_callback(GtkWidget *item, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_tool_popup_crop_note_callback(GtkWidget *item, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_tool_popup_select_note_callback(GtkWidget *item, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_tool_popup_position_cursor_callback(GtkWidget *item, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_zoom_callback(GtkComboBox *combo_box, AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_mode_callback(GtkWidget *widget, AgsNotationToolbar *notation_toolbar); #endif /*__AGS_NOTATION_TOOLBAR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_automation_edit_box.h0000644000175000017500000000430613247044247020205 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUTOMATION_EDIT_BOX_H__ #define __AGS_AUTOMATION_EDIT_BOX_H__ #include #include #include #define AGS_TYPE_AUTOMATION_EDIT_BOX (ags_automation_edit_box_get_type()) #define AGS_AUTOMATION_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTOMATION_EDIT_BOX, AgsAutomationEditBox)) #define AGS_AUTOMATION_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUTOMATION_EDIT_BOX, AgsAutomationEditBoxClass)) #define AGS_IS_AUTOMATION_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUTOMATION_EDIT_BOX)) #define AGS_IS_AUTOMATION_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUTOMATION_EDIT_BOX)) #define AGS_AUTOMATION_EDIT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_AUTOMATION_EDIT_BOX, AgsAutomationEditBoxClass)) #define AGS_AUTOMATION_EDIT_BOX_DEFAULT_FIXED_EDIT_HEIGHT (128) typedef struct _AgsAutomationEditBox AgsAutomationEditBox; typedef struct _AgsAutomationEditBoxClass AgsAutomationEditBoxClass; typedef enum{ AGS_AUTOMATION_EDIT_BOX_FIXED_EDIT_SIZE = 1, }AgsAutomationEditBoxFlags; struct _AgsAutomationEditBox { GtkBox box; guint flags; guint fixed_edit_height; }; struct _AgsAutomationEditBoxClass { GtkBoxClass box; }; GType ags_automation_edit_box_get_type(void); AgsAutomationEditBox* ags_automation_edit_box_new(); #endif /*__AGS_AUTOMATION_EDIT_BOX_H__*/ gsequencer-1.4.24/ags/X/editor/ags_position_automation_cursor_dialog.c0000644000175000017500000003746213247044247023174 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_position_automation_cursor_dialog_class_init(AgsPositionAutomationCursorDialogClass *position_automation_cursor_dialog); void ags_position_automation_cursor_dialog_connectable_interface_init(AgsConnectableInterface *connectable); void ags_position_automation_cursor_dialog_applicable_interface_init(AgsApplicableInterface *applicable); void ags_position_automation_cursor_dialog_init(AgsPositionAutomationCursorDialog *position_automation_cursor_dialog); void ags_position_automation_cursor_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_position_automation_cursor_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_position_automation_cursor_dialog_finalize(GObject *gobject); void ags_position_automation_cursor_dialog_connect(AgsConnectable *connectable); void ags_position_automation_cursor_dialog_disconnect(AgsConnectable *connectable); void ags_position_automation_cursor_dialog_set_update(AgsApplicable *applicable, gboolean update); void ags_position_automation_cursor_dialog_apply(AgsApplicable *applicable); void ags_position_automation_cursor_dialog_reset(AgsApplicable *applicable); gboolean ags_position_automation_cursor_dialog_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_position_automation_cursor_dialog * @short_description: position tool * @title: AgsPositionAutomationCursorDialog * @section_id: * @include: ags/X/editor/ags_position_automation_cursor_dialog.h * * The #AgsPositionAutomationCursorDialog lets you position automation editor cursor. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; static gpointer ags_position_automation_cursor_dialog_parent_class = NULL; GType ags_position_automation_cursor_dialog_get_type(void) { static GType ags_type_position_automation_cursor_dialog = 0; if (!ags_type_position_automation_cursor_dialog){ static const GTypeInfo ags_position_automation_cursor_dialog_info = { sizeof (AgsPositionAutomationCursorDialogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_position_automation_cursor_dialog_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPositionAutomationCursorDialog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_position_automation_cursor_dialog_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_position_automation_cursor_dialog_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_position_automation_cursor_dialog_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_position_automation_cursor_dialog = g_type_register_static(GTK_TYPE_DIALOG, "AgsPositionAutomationCursorDialog", &ags_position_automation_cursor_dialog_info, 0); g_type_add_interface_static(ags_type_position_automation_cursor_dialog, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_position_automation_cursor_dialog, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return (ags_type_position_automation_cursor_dialog); } void ags_position_automation_cursor_dialog_class_init(AgsPositionAutomationCursorDialogClass *position_automation_cursor_dialog) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_position_automation_cursor_dialog_parent_class = g_type_class_peek_parent(position_automation_cursor_dialog); /* GObjectClass */ gobject = (GObjectClass *) position_automation_cursor_dialog; gobject->set_property = ags_position_automation_cursor_dialog_set_property; gobject->get_property = ags_position_automation_cursor_dialog_get_property; gobject->finalize = ags_position_automation_cursor_dialog_finalize; /* properties */ /** * AgsPositionAutomationCursorDialog:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.1.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsPositionAutomationCursorDialog:main-window: * * The assigned #AgsWindow. * * Since: 1.1.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) position_automation_cursor_dialog; widget->delete_event = ags_position_automation_cursor_dialog_delete_event; } void ags_position_automation_cursor_dialog_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_position_automation_cursor_dialog_connect; connectable->disconnect = ags_position_automation_cursor_dialog_disconnect; } void ags_position_automation_cursor_dialog_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_position_automation_cursor_dialog_set_update; applicable->apply = ags_position_automation_cursor_dialog_apply; applicable->reset = ags_position_automation_cursor_dialog_reset; } void ags_position_automation_cursor_dialog_init(AgsPositionAutomationCursorDialog *position_automation_cursor_dialog) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; position_automation_cursor_dialog->flags = 0; g_object_set(position_automation_cursor_dialog, "title", i18n("position automation cursor"), NULL); vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) position_automation_cursor_dialog->dialog.vbox, GTK_WIDGET(vbox), FALSE, FALSE, 0); /* set focus */ position_automation_cursor_dialog->set_focus = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("set focus")); gtk_toggle_button_set_active(position_automation_cursor_dialog->set_focus, TRUE); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(position_automation_cursor_dialog->set_focus), FALSE, FALSE, 0); /* position x - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* position x - label */ label = (GtkLabel *) gtk_label_new(i18n("position x")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* position x - spin button */ position_automation_cursor_dialog->position_x = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_POSITION_AUTOMATION_CURSOR_MAX_BEATS, 1.0); gtk_spin_button_set_value(position_automation_cursor_dialog->position_x, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(position_automation_cursor_dialog->position_x), FALSE, FALSE, 0); /* dialog buttons */ gtk_dialog_add_buttons((GtkDialog *) position_automation_cursor_dialog, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); } void ags_position_automation_cursor_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPositionAutomationCursorDialog *position_automation_cursor_dialog; position_automation_cursor_dialog = AGS_POSITION_AUTOMATION_CURSOR_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) position_automation_cursor_dialog->application_context == application_context){ return; } if(position_automation_cursor_dialog->application_context != NULL){ g_object_unref(position_automation_cursor_dialog->application_context); } if(application_context != NULL){ g_object_ref(application_context); } position_automation_cursor_dialog->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) position_automation_cursor_dialog->main_window == main_window){ return; } if(position_automation_cursor_dialog->main_window != NULL){ g_object_unref(position_automation_cursor_dialog->main_window); } if(main_window != NULL){ g_object_ref(main_window); } position_automation_cursor_dialog->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_position_automation_cursor_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPositionAutomationCursorDialog *position_automation_cursor_dialog; position_automation_cursor_dialog = AGS_POSITION_AUTOMATION_CURSOR_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, position_automation_cursor_dialog->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, position_automation_cursor_dialog->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_position_automation_cursor_dialog_connect(AgsConnectable *connectable) { AgsPositionAutomationCursorDialog *position_automation_cursor_dialog; position_automation_cursor_dialog = AGS_POSITION_AUTOMATION_CURSOR_DIALOG(connectable); if((AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CONNECTED & (position_automation_cursor_dialog->flags)) != 0){ return; } position_automation_cursor_dialog->flags |= AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CONNECTED; g_signal_connect(position_automation_cursor_dialog, "response", G_CALLBACK(ags_position_automation_cursor_dialog_response_callback), position_automation_cursor_dialog); } void ags_position_automation_cursor_dialog_disconnect(AgsConnectable *connectable) { AgsPositionAutomationCursorDialog *position_automation_cursor_dialog; position_automation_cursor_dialog = AGS_POSITION_AUTOMATION_CURSOR_DIALOG(connectable); if((AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CONNECTED & (position_automation_cursor_dialog->flags)) == 0){ return; } position_automation_cursor_dialog->flags &= (~AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CONNECTED); g_object_disconnect(G_OBJECT(position_automation_cursor_dialog), "any_signal::response", G_CALLBACK(ags_position_automation_cursor_dialog_response_callback), position_automation_cursor_dialog, NULL); } void ags_position_automation_cursor_dialog_finalize(GObject *gobject) { AgsPositionAutomationCursorDialog *position_automation_cursor_dialog; position_automation_cursor_dialog = (AgsPositionAutomationCursorDialog *) gobject; if(position_automation_cursor_dialog->application_context != NULL){ g_object_unref(position_automation_cursor_dialog->application_context); } G_OBJECT_CLASS(ags_position_automation_cursor_dialog_parent_class)->finalize(gobject); } void ags_position_automation_cursor_dialog_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_position_automation_cursor_dialog_apply(AgsApplicable *applicable) { AgsPositionAutomationCursorDialog *position_automation_cursor_dialog; AgsWindow *window; AgsAutomationWindow *automation_window; AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; AgsAutomationEdit *automation_edit; AgsMachine *machine; GtkWidget *widget; GtkAdjustment *hadjustment; gdouble zoom; guint history; gint current_page; guint x; position_automation_cursor_dialog = AGS_POSITION_AUTOMATION_CURSOR_DIALOG(applicable); window = position_automation_cursor_dialog->main_window; automation_window = window->automation_window; automation_editor = automation_window->automation_editor; machine = automation_editor->selected_machine; if(machine == NULL){ return; } automation_toolbar = automation_editor->automation_toolbar; history = gtk_combo_box_get_active(GTK_COMBO_BOX(automation_toolbar->zoom)); zoom = exp2((double) history - 2.0); current_page = gtk_notebook_get_current_page(automation_editor->notebook); automation_edit = automation_editor->focused_automation_edit; if(automation_edit == NULL){ return; } x = gtk_spin_button_get_value_as_int(position_automation_cursor_dialog->position_x); automation_edit->cursor_position_x = 16 * x; automation_edit->cursor_position_y = 0.0; hadjustment = GTK_RANGE(automation_edit->hscrollbar)->adjustment; widget = automation_edit->drawing_area; /* make visible */ if(hadjustment != NULL){ gtk_adjustment_set_value(hadjustment, ((x * 16 * 64 / zoom) * (hadjustment->upper / (AGS_AUTOMATION_EDITOR_MAX_CONTROLS / zoom)))); } if(gtk_toggle_button_get_active(position_automation_cursor_dialog->set_focus)){ gtk_widget_grab_focus(widget); } } void ags_position_automation_cursor_dialog_reset(AgsApplicable *applicable) { //TODO:JK: implement me } gboolean ags_position_automation_cursor_dialog_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_position_automation_cursor_dialog_parent_class)->delete_event(widget, event); return(TRUE); } /** * ags_position_automation_cursor_dialog_new: * @main_window: the #AgsWindow * * Create a new #AgsPositionAutomationCursorDialog. * * Returns: a new #AgsPositionAutomationCursorDialog * * Since: 1.1.0 */ AgsPositionAutomationCursorDialog* ags_position_automation_cursor_dialog_new(GtkWidget *main_window) { AgsPositionAutomationCursorDialog *position_automation_cursor_dialog; position_automation_cursor_dialog = (AgsPositionAutomationCursorDialog *) g_object_new(AGS_TYPE_POSITION_AUTOMATION_CURSOR_DIALOG, "main-window", main_window, NULL); return(position_automation_cursor_dialog); } gsequencer-1.4.24/ags/X/editor/ags_select_acceleration_dialog.c0000644000175000017500000005423113247044247021454 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_select_acceleration_dialog_class_init(AgsSelectAccelerationDialogClass *select_acceleration_dialog); void ags_select_acceleration_dialog_connectable_interface_init(AgsConnectableInterface *connectable); void ags_select_acceleration_dialog_applicable_interface_init(AgsApplicableInterface *applicable); void ags_select_acceleration_dialog_init(AgsSelectAccelerationDialog *select_acceleration_dialog); void ags_select_acceleration_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_select_acceleration_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_select_acceleration_dialog_finalize(GObject *gobject); void ags_select_acceleration_dialog_connect(AgsConnectable *connectable); void ags_select_acceleration_dialog_disconnect(AgsConnectable *connectable); void ags_select_acceleration_dialog_set_update(AgsApplicable *applicable, gboolean update); void ags_select_acceleration_dialog_apply(AgsApplicable *applicable); void ags_select_acceleration_dialog_reset(AgsApplicable *applicable); gboolean ags_select_acceleration_dialog_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_select_acceleration_dialog * @short_description: select tool * @title: AgsSelectAccelerationDialog * @section_id: * @include: ags/X/editor/ags_select_acceleration_dialog.h * * The #AgsSelectAccelerationDialog lets you select accelerations. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; static gpointer ags_select_acceleration_dialog_parent_class = NULL; GType ags_select_acceleration_dialog_get_type(void) { static GType ags_type_select_acceleration_dialog = 0; if (!ags_type_select_acceleration_dialog){ static const GTypeInfo ags_select_acceleration_dialog_info = { sizeof (AgsSelectAccelerationDialogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_select_acceleration_dialog_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSelectAccelerationDialog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_select_acceleration_dialog_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_select_acceleration_dialog_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_select_acceleration_dialog_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_select_acceleration_dialog = g_type_register_static(GTK_TYPE_DIALOG, "AgsSelectAccelerationDialog", &ags_select_acceleration_dialog_info, 0); g_type_add_interface_static(ags_type_select_acceleration_dialog, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_select_acceleration_dialog, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return (ags_type_select_acceleration_dialog); } void ags_select_acceleration_dialog_class_init(AgsSelectAccelerationDialogClass *select_acceleration_dialog) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_select_acceleration_dialog_parent_class = g_type_class_peek_parent(select_acceleration_dialog); /* GObjectClass */ gobject = (GObjectClass *) select_acceleration_dialog; gobject->set_property = ags_select_acceleration_dialog_set_property; gobject->get_property = ags_select_acceleration_dialog_get_property; gobject->finalize = ags_select_acceleration_dialog_finalize; /* properties */ /** * AgsSelectAccelerationDialog:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsSelectAccelerationDialog:main-window: * * The assigned #AgsWindow. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) select_acceleration_dialog; widget->delete_event = ags_select_acceleration_dialog_delete_event; } void ags_select_acceleration_dialog_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_select_acceleration_dialog_connect; connectable->disconnect = ags_select_acceleration_dialog_disconnect; } void ags_select_acceleration_dialog_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_select_acceleration_dialog_set_update; applicable->apply = ags_select_acceleration_dialog_apply; applicable->reset = ags_select_acceleration_dialog_reset; } void ags_select_acceleration_dialog_init(AgsSelectAccelerationDialog *select_acceleration_dialog) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; select_acceleration_dialog->flags = 0; g_object_set(select_acceleration_dialog, "title", i18n("select accelerations"), NULL); vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) select_acceleration_dialog->dialog.vbox, GTK_WIDGET(vbox), FALSE, FALSE, 0); /* copy selection */ select_acceleration_dialog->copy_selection = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("copy selection")); gtk_toggle_button_set_active(select_acceleration_dialog->copy_selection, TRUE); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(select_acceleration_dialog->copy_selection), FALSE, FALSE, 0); /* automation */ select_acceleration_dialog->port = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(select_acceleration_dialog->port), FALSE, FALSE, 0); /* add */ select_acceleration_dialog->add = (GtkCheckButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(select_acceleration_dialog->add), FALSE, FALSE, 0); /* select x0 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* select x0 - label */ label = (GtkLabel *) gtk_label_new(i18n("select x0")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* select x0 - spin button */ select_acceleration_dialog->select_x0 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_SELECT_ACCELERATION_MAX_BEATS, 0.25); gtk_spin_button_set_digits(select_acceleration_dialog->select_x0, 2); gtk_spin_button_set_value(select_acceleration_dialog->select_x0, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(select_acceleration_dialog->select_x0), FALSE, FALSE, 0); /* select x1 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* select x1 - label */ label = (GtkLabel *) gtk_label_new(i18n("select x1")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* select x1 - spin button */ select_acceleration_dialog->select_x1 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_SELECT_ACCELERATION_MAX_BEATS, 0.25); gtk_spin_button_set_digits(select_acceleration_dialog->select_x1, 2); gtk_spin_button_set_value(select_acceleration_dialog->select_x1, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(select_acceleration_dialog->select_x1), FALSE, FALSE, 0); /* dialog buttons */ gtk_dialog_add_buttons((GtkDialog *) select_acceleration_dialog, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); } void ags_select_acceleration_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSelectAccelerationDialog *select_acceleration_dialog; select_acceleration_dialog = AGS_SELECT_ACCELERATION_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) select_acceleration_dialog->application_context == application_context){ return; } if(select_acceleration_dialog->application_context != NULL){ g_object_unref(select_acceleration_dialog->application_context); } if(application_context != NULL){ g_object_ref(application_context); } select_acceleration_dialog->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) select_acceleration_dialog->main_window == main_window){ return; } if(select_acceleration_dialog->main_window != NULL){ g_object_unref(select_acceleration_dialog->main_window); } if(main_window != NULL){ g_object_ref(main_window); } select_acceleration_dialog->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_select_acceleration_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSelectAccelerationDialog *select_acceleration_dialog; select_acceleration_dialog = AGS_SELECT_ACCELERATION_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, select_acceleration_dialog->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, select_acceleration_dialog->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_select_acceleration_dialog_connect(AgsConnectable *connectable) { AgsAutomationEditor *automation_editor; AgsSelectAccelerationDialog *select_acceleration_dialog; select_acceleration_dialog = AGS_SELECT_ACCELERATION_DIALOG(connectable); if((AGS_SELECT_ACCELERATION_DIALOG_CONNECTED & (select_acceleration_dialog->flags)) != 0){ return; } select_acceleration_dialog->flags |= AGS_SELECT_ACCELERATION_DIALOG_CONNECTED; automation_editor = AGS_WINDOW(select_acceleration_dialog->main_window)->automation_window->automation_editor; g_signal_connect(select_acceleration_dialog, "response", G_CALLBACK(ags_select_acceleration_dialog_response_callback), select_acceleration_dialog); /* add automation */ g_signal_connect(select_acceleration_dialog->add, "clicked", G_CALLBACK(ags_select_acceleration_dialog_add_callback), select_acceleration_dialog); /* machine changed */ g_signal_connect_after(automation_editor, "machine-changed", G_CALLBACK(ags_select_acceleration_dialog_machine_changed_callback), select_acceleration_dialog); } void ags_select_acceleration_dialog_disconnect(AgsConnectable *connectable) { AgsAutomationEditor *automation_editor; AgsSelectAccelerationDialog *select_acceleration_dialog; select_acceleration_dialog = AGS_SELECT_ACCELERATION_DIALOG(connectable); if((AGS_SELECT_ACCELERATION_DIALOG_CONNECTED & (select_acceleration_dialog->flags)) == 0){ return; } select_acceleration_dialog->flags &= (~AGS_SELECT_ACCELERATION_DIALOG_CONNECTED); automation_editor = AGS_WINDOW(select_acceleration_dialog->main_window)->automation_window->automation_editor; g_object_disconnect(G_OBJECT(select_acceleration_dialog), "any_signal::response", G_CALLBACK(ags_select_acceleration_dialog_response_callback), select_acceleration_dialog, NULL); g_object_disconnect(G_OBJECT(select_acceleration_dialog->add), "any_signal::clicked", G_CALLBACK(ags_select_acceleration_dialog_add_callback), select_acceleration_dialog, NULL); g_object_disconnect(G_OBJECT(automation_editor), "any_signal::machine-changed", G_CALLBACK(ags_select_acceleration_dialog_machine_changed_callback), select_acceleration_dialog, NULL); } void ags_select_acceleration_dialog_finalize(GObject *gobject) { AgsSelectAccelerationDialog *select_acceleration_dialog; select_acceleration_dialog = (AgsSelectAccelerationDialog *) gobject; if(select_acceleration_dialog->application_context != NULL){ g_object_unref(select_acceleration_dialog->application_context); } G_OBJECT_CLASS(ags_select_acceleration_dialog_parent_class)->finalize(gobject); } void ags_select_acceleration_dialog_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_select_acceleration_dialog_apply(AgsApplicable *applicable) { AgsSelectAccelerationDialog *select_acceleration_dialog; AgsWindow *window; AgsAutomationEditor *automation_editor; AgsMachine *machine; AgsNotebook *notebook; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; xmlDoc *clipboard; xmlNode *audio_node, *automation_node; GList *list_automation; GList *port, *port_start; GList *list; gchar **specifier; xmlChar *buffer; gchar *str; GType channel_type; gdouble gui_y; gdouble c_y0, c_y1; gdouble val; gdouble upper, lower, range, step; gdouble c_upper, c_lower, c_range; int size; guint x0, y0; guint x1, y1; guint i; gint line; gboolean copy_selection; gboolean is_audio, is_output, is_input; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; select_acceleration_dialog = AGS_SELECT_ACCELERATION_DIALOG(applicable); window = select_acceleration_dialog->main_window; automation_editor = window->automation_window->automation_editor; machine = automation_editor->selected_machine; if(machine == NULL || automation_editor->focused_automation_edit == NULL){ return; } if(automation_editor->focused_automation_edit->channel_type == G_TYPE_NONE){ notebook = NULL; channel_type = G_TYPE_NONE; is_audio = TRUE; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; channel_type = AGS_TYPE_OUTPUT; is_output = TRUE; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; channel_type = AGS_TYPE_INPUT; is_input = TRUE; } audio = machine->audio; /* get some values */ copy_selection = gtk_toggle_button_get_active(select_acceleration_dialog->copy_selection); x0 = (AGS_SELECT_ACCELERATION_DEFAULT_WIDTH / 16) * gtk_spin_button_get_value_as_int(select_acceleration_dialog->select_x0); x1 = (AGS_SELECT_ACCELERATION_DEFAULT_WIDTH / 16) * gtk_spin_button_get_value_as_int(select_acceleration_dialog->select_x1); /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* select acceleration */ port = port_start = gtk_container_get_children(select_acceleration_dialog->port); specifier = NULL; if(copy_selection){ /* create document */ clipboard = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION); /* create root node */ audio_node = xmlNewNode(NULL, BAD_CAST "audio"); xmlDocSetRootElement(clipboard, audio_node); } for(i = 0; port != NULL;){ list = gtk_container_get_children(port->data); str = gtk_combo_box_text_get_active_text(list->data); g_list_free(list); if(specifier != NULL && g_strv_contains(specifier, str)){ port = port->next; continue; } if(specifier == NULL){ specifier = (gchar **) malloc(2 * sizeof(gchar *)); }else{ specifier = (gchar **) realloc(specifier, (i + 2) * sizeof(gchar *)); } specifier[i] = str; specifier[i + 1] = NULL; line = 0; while((line = ags_notebook_next_active_tab(notebook, line)) != -1){ list_automation = audio->automation; while((list_automation = ags_automation_find_specifier_with_type_and_line(list_automation, specifier[i], channel_type, line)) != NULL){ if(AGS_AUTOMATION(list_automation->data)->timestamp->timer.ags_offset.offset + AGS_AUTOMATION_DEFAULT_OFFSET < x0){ list_automation = list_automation->next; continue; } if(AGS_AUTOMATION(list_automation->data)->timestamp->timer.ags_offset.offset > x1){ break; } upper = AGS_AUTOMATION(list_automation->data)->upper; lower = AGS_AUTOMATION(list_automation->data)->lower; range = upper - lower; if(AGS_PORT(AGS_AUTOMATION(list_automation->data)->port)->conversion != NULL){ c_upper = ags_conversion_convert(AGS_PORT(AGS_AUTOMATION(list_automation->data)->port)->conversion, upper, FALSE); c_lower = ags_conversion_convert(AGS_PORT(AGS_AUTOMATION(list_automation->data)->port)->conversion, lower, FALSE); c_range = c_upper - c_lower; }else{ c_upper = upper; c_lower = lower; c_range = range; } if(range == 0.0){ list_automation = list_automation->next; g_warning("ags_select_acceleration_dialog.c - range = 0.0"); continue; } /* check steps */ gui_y = AGS_AUTOMATION(list_automation->data)->steps; val = c_lower + (gui_y * (c_range / AGS_AUTOMATION(list_automation->data)->steps)); c_y0 = val; /* conversion */ if(AGS_PORT(AGS_AUTOMATION(list_automation->data)->port)->conversion != NULL){ c_y0 = ags_conversion_convert(AGS_PORT(AGS_AUTOMATION(list_automation->data)->port)->conversion, c_y0, TRUE); } /* check steps */ gui_y = 0; val = c_lower + (gui_y * (c_range / AGS_AUTOMATION(list_automation->data)->steps)); c_y1 = val; /* conversion */ if(AGS_PORT(AGS_AUTOMATION(list_automation->data)->port)->conversion != NULL){ c_y1 = ags_conversion_convert(AGS_PORT(AGS_AUTOMATION(list_automation->data)->port)->conversion, c_y1, TRUE); } /* select */ ags_automation_add_region_to_selection(list_automation->data, x0 * AGS_SELECT_ACCELERATION_DEFAULT_WIDTH, c_y0, x1 * AGS_SELECT_ACCELERATION_DEFAULT_WIDTH, c_y1, TRUE); if(copy_selection){ automation_node = ags_automation_copy_selection(list_automation->data); ags_automation_merge_clipboard(audio_node, automation_node); xmlFreeNode(automation_node); } list_automation = list_automation->next; } line++; } port = port->next; i++; } g_list_free(port_start); /* write to clipboard */ if(copy_selection){ xmlDocDumpFormatMemoryEnc(clipboard, &buffer, &size, "UTF-8", TRUE); gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), buffer, size); gtk_clipboard_store(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); xmlFreeDoc(clipboard); } } void ags_select_acceleration_dialog_reset(AgsApplicable *applicable) { AgsSelectAccelerationDialog *select_acceleration_dialog; GList *list_start, *list; select_acceleration_dialog = AGS_SELECT_ACCELERATION_DIALOG(applicable); list = list_start = gtk_container_get_children(select_acceleration_dialog->port); while(list != NULL){ gtk_widget_destroy(list->data); list = list->next; } g_list_free(list_start); } gboolean ags_select_acceleration_dialog_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_select_acceleration_dialog_parent_class)->delete_event(widget, event); return(TRUE); } /** * ags_select_acceleration_dialog_new: * @main_window: the #AgsWindow * * Create a new #AgsSelectAccelerationDialog. * * Returns: a new #AgsSelectAccelerationDialog * * Since: 1.0.0 */ AgsSelectAccelerationDialog* ags_select_acceleration_dialog_new(GtkWidget *main_window) { AgsSelectAccelerationDialog *select_acceleration_dialog; select_acceleration_dialog = (AgsSelectAccelerationDialog *) g_object_new(AGS_TYPE_SELECT_ACCELERATION_DIALOG, "main-window", main_window, NULL); return(select_acceleration_dialog); } gsequencer-1.4.24/ags/X/editor/ags_wave_toolbar.h0000644000175000017500000000447613247044247016644 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WAVE_TOOLBAR_H__ #define __AGS_WAVE_TOOLBAR_H__ #include #include #include #define AGS_TYPE_WAVE_TOOLBAR (ags_wave_toolbar_get_type()) #define AGS_WAVE_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WAVE_TOOLBAR, AgsWaveToolbar)) #define AGS_WAVE_TOOLBAR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_WAVE_TOOLBAR, AgsWaveToolbarClass)) #define AGS_IS_WAVE_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_WAVE_TOOLBAR)) #define AGS_IS_WAVE_TOOLBAR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_WAVE_TOOLBAR)) #define AGS_WAVE_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_WAVE_TOOLBAR, AgsWaveToolbarClass)) typedef struct _AgsWaveToolbar AgsWaveToolbar; typedef struct _AgsWaveToolbarClass AgsWaveToolbarClass; typedef enum{ AGS_WAVE_TOOLBAR_CONNECTED = 1, }AgsWaveToolbarFlags; struct _AgsWaveToolbar { GtkToolbar toolbar; guint flags; GtkToggleButton *selected_edit_mode; GtkToggleButton *position; GtkToggleButton *select; GtkButton *copy; GtkButton *cut; GtkButton *paste; GtkMenuToolButton *menu_tool; GtkMenu *tool_popup; GtkDialog *select_audio_data; GtkDialog *position_wave_cursor; guint zoom_history; GtkComboBox *zoom; }; struct _AgsWaveToolbarClass { GtkToolbarClass toolbar; }; GType ags_wave_toolbar_get_type(void); GtkMenu* ags_wave_toolbar_tool_popup_new(GtkToolbar *wave_toolbar); AgsWaveToolbar* ags_wave_toolbar_new(); #endif /*__AGS_WAVE_TOOLBAR_H__*/ gsequencer-1.4.24/ags/X/editor/ags_ramp_acceleration_dialog.c0000644000175000017500000007374013247044247021142 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_ramp_acceleration_dialog_class_init(AgsRampAccelerationDialogClass *ramp_acceleration_dialog); void ags_ramp_acceleration_dialog_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ramp_acceleration_dialog_applicable_interface_init(AgsApplicableInterface *applicable); void ags_ramp_acceleration_dialog_init(AgsRampAccelerationDialog *ramp_acceleration_dialog); void ags_ramp_acceleration_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_ramp_acceleration_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_ramp_acceleration_dialog_finalize(GObject *gobject); void ags_ramp_acceleration_dialog_connect(AgsConnectable *connectable); void ags_ramp_acceleration_dialog_disconnect(AgsConnectable *connectable); void ags_ramp_acceleration_dialog_set_update(AgsApplicable *applicable, gboolean update); void ags_ramp_acceleration_dialog_apply(AgsApplicable *applicable); void ags_ramp_acceleration_dialog_reset(AgsApplicable *applicable); gboolean ags_ramp_acceleration_dialog_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_ramp_acceleration_dialog * @short_description: ramp tool * @title: AgsRampAccelerationDialog * @section_id: * @include: ags/X/editor/ags_ramp_acceleration_dialog.h * * The #AgsRampAccelerationDialog lets you ramp accelerations. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; static gpointer ags_ramp_acceleration_dialog_parent_class = NULL; GType ags_ramp_acceleration_dialog_get_type(void) { static GType ags_type_ramp_acceleration_dialog = 0; if (!ags_type_ramp_acceleration_dialog){ static const GTypeInfo ags_ramp_acceleration_dialog_info = { sizeof (AgsRampAccelerationDialogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ramp_acceleration_dialog_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRampAccelerationDialog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ramp_acceleration_dialog_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ramp_acceleration_dialog_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_ramp_acceleration_dialog_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ramp_acceleration_dialog = g_type_register_static(GTK_TYPE_DIALOG, "AgsRampAccelerationDialog", &ags_ramp_acceleration_dialog_info, 0); g_type_add_interface_static(ags_type_ramp_acceleration_dialog, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_ramp_acceleration_dialog, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return (ags_type_ramp_acceleration_dialog); } void ags_ramp_acceleration_dialog_class_init(AgsRampAccelerationDialogClass *ramp_acceleration_dialog) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_ramp_acceleration_dialog_parent_class = g_type_class_peek_parent(ramp_acceleration_dialog); /* GObjectClass */ gobject = (GObjectClass *) ramp_acceleration_dialog; gobject->set_property = ags_ramp_acceleration_dialog_set_property; gobject->get_property = ags_ramp_acceleration_dialog_get_property; gobject->finalize = ags_ramp_acceleration_dialog_finalize; /* properties */ /** * AgsRampAccelerationDialog:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsRampAccelerationDialog:main-window: * * The assigned #AgsWindow. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) ramp_acceleration_dialog; widget->delete_event = ags_ramp_acceleration_dialog_delete_event; } void ags_ramp_acceleration_dialog_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_ramp_acceleration_dialog_connect; connectable->disconnect = ags_ramp_acceleration_dialog_disconnect; } void ags_ramp_acceleration_dialog_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_ramp_acceleration_dialog_set_update; applicable->apply = ags_ramp_acceleration_dialog_apply; applicable->reset = ags_ramp_acceleration_dialog_reset; } void ags_ramp_acceleration_dialog_init(AgsRampAccelerationDialog *ramp_acceleration_dialog) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; ramp_acceleration_dialog->flags = 0; g_object_set(ramp_acceleration_dialog, "title", i18n("ramp accelerations"), NULL); vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) ramp_acceleration_dialog->dialog.vbox, GTK_WIDGET(vbox), FALSE, FALSE, 0); /* automation */ ramp_acceleration_dialog->port = (GtkVBox *) gtk_combo_box_text_new(); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(ramp_acceleration_dialog->port), FALSE, FALSE, 0); /* ramp x0 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* ramp x0 - label */ label = (GtkLabel *) gtk_label_new(i18n("ramp x0")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* ramp x0 - spin button */ ramp_acceleration_dialog->ramp_x0 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_RAMP_ACCELERATION_MAX_BEATS, 0.25); gtk_spin_button_set_digits(ramp_acceleration_dialog->ramp_x0, 2); gtk_spin_button_set_value(ramp_acceleration_dialog->ramp_x0, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(ramp_acceleration_dialog->ramp_x0), FALSE, FALSE, 0); /* ramp y0 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* ramp y0 - label */ label = (GtkLabel *) gtk_label_new(i18n("ramp y0")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* ramp y0 - spin button */ ramp_acceleration_dialog->ramp_y0 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 1.0, 0.001); gtk_spin_button_set_value(ramp_acceleration_dialog->ramp_y0, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(ramp_acceleration_dialog->ramp_y0), FALSE, FALSE, 0); /* ramp x1 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* ramp x1 - label */ label = (GtkLabel *) gtk_label_new(i18n("ramp x1")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* ramp x1 - spin button */ ramp_acceleration_dialog->ramp_x1 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_RAMP_ACCELERATION_MAX_BEATS, 0.25); gtk_spin_button_set_digits(ramp_acceleration_dialog->ramp_x1, 2); gtk_spin_button_set_value(ramp_acceleration_dialog->ramp_x1, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(ramp_acceleration_dialog->ramp_x1), FALSE, FALSE, 0); /* ramp y1 - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* ramp y1 - label */ label = (GtkLabel *) gtk_label_new(i18n("ramp y1")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* ramp y1 - spin button */ ramp_acceleration_dialog->ramp_y1 = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 1.0, 0.001); gtk_spin_button_set_value(ramp_acceleration_dialog->ramp_y1, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(ramp_acceleration_dialog->ramp_y1), FALSE, FALSE, 0); /* ramp step count - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* ramp step count - label */ label = (GtkLabel *) gtk_label_new(i18n("ramp step count")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* ramp step count - spin button */ ramp_acceleration_dialog->ramp_step_count = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_RAMP_ACCELERATION_MAX_STEPS, 1.0); gtk_spin_button_set_value(ramp_acceleration_dialog->ramp_step_count, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(ramp_acceleration_dialog->ramp_step_count), FALSE, FALSE, 0); /* dialog buttons */ gtk_dialog_add_buttons((GtkDialog *) ramp_acceleration_dialog, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); } void ags_ramp_acceleration_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRampAccelerationDialog *ramp_acceleration_dialog; ramp_acceleration_dialog = AGS_RAMP_ACCELERATION_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) ramp_acceleration_dialog->application_context == application_context){ return; } if(ramp_acceleration_dialog->application_context != NULL){ g_object_unref(ramp_acceleration_dialog->application_context); } if(application_context != NULL){ g_object_ref(application_context); } ramp_acceleration_dialog->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) ramp_acceleration_dialog->main_window == main_window){ return; } if(ramp_acceleration_dialog->main_window != NULL){ g_object_unref(ramp_acceleration_dialog->main_window); } if(main_window != NULL){ g_object_ref(main_window); } ramp_acceleration_dialog->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ramp_acceleration_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRampAccelerationDialog *ramp_acceleration_dialog; ramp_acceleration_dialog = AGS_RAMP_ACCELERATION_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, ramp_acceleration_dialog->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, ramp_acceleration_dialog->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ramp_acceleration_dialog_connect(AgsConnectable *connectable) { AgsAutomationEditor *automation_editor; AgsRampAccelerationDialog *ramp_acceleration_dialog; ramp_acceleration_dialog = AGS_RAMP_ACCELERATION_DIALOG(connectable); if((AGS_RAMP_ACCELERATION_DIALOG_CONNECTED & (ramp_acceleration_dialog->flags)) != 0){ return; } ramp_acceleration_dialog->flags |= AGS_RAMP_ACCELERATION_DIALOG_CONNECTED; automation_editor = AGS_WINDOW(ramp_acceleration_dialog->main_window)->automation_window->automation_editor; g_signal_connect(ramp_acceleration_dialog, "response", G_CALLBACK(ags_ramp_acceleration_dialog_response_callback), ramp_acceleration_dialog); g_signal_connect(ramp_acceleration_dialog->port, "changed", G_CALLBACK(ags_ramp_acceleration_dialog_port_callback), ramp_acceleration_dialog); /* machine changed */ g_signal_connect_after(automation_editor, "machine-changed", G_CALLBACK(ags_ramp_acceleration_dialog_machine_changed_callback), ramp_acceleration_dialog); } void ags_ramp_acceleration_dialog_disconnect(AgsConnectable *connectable) { AgsAutomationEditor *automation_editor; AgsRampAccelerationDialog *ramp_acceleration_dialog; ramp_acceleration_dialog = AGS_RAMP_ACCELERATION_DIALOG(connectable); if((AGS_RAMP_ACCELERATION_DIALOG_CONNECTED & (ramp_acceleration_dialog->flags)) == 0){ return; } ramp_acceleration_dialog->flags &= (~AGS_RAMP_ACCELERATION_DIALOG_CONNECTED); automation_editor = AGS_WINDOW(ramp_acceleration_dialog->main_window)->automation_window->automation_editor; g_object_disconnect(G_OBJECT(ramp_acceleration_dialog), "any_signal::response", G_CALLBACK(ags_ramp_acceleration_dialog_response_callback), ramp_acceleration_dialog, NULL); g_object_disconnect(G_OBJECT(ramp_acceleration_dialog->port), "any_signal::changed", G_CALLBACK(ags_ramp_acceleration_dialog_port_callback), ramp_acceleration_dialog, NULL); g_object_disconnect(G_OBJECT(automation_editor), "any_signal::machine-changed", G_CALLBACK(ags_ramp_acceleration_dialog_machine_changed_callback), ramp_acceleration_dialog, NULL); } void ags_ramp_acceleration_dialog_finalize(GObject *gobject) { AgsRampAccelerationDialog *ramp_acceleration_dialog; ramp_acceleration_dialog = (AgsRampAccelerationDialog *) gobject; if(ramp_acceleration_dialog->application_context != NULL){ g_object_unref(ramp_acceleration_dialog->application_context); } G_OBJECT_CLASS(ags_ramp_acceleration_dialog_parent_class)->finalize(gobject); } void ags_ramp_acceleration_dialog_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_ramp_acceleration_dialog_apply(AgsApplicable *applicable) { AgsRampAccelerationDialog *ramp_acceleration_dialog; AgsWindow *window; AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; AgsMachine *machine; AgsNotebook *notebook; AgsAudio *audio; AgsAutomation *current; AgsAcceleration *acceleration; AgsMutexManager *mutex_manager; AgsTimestamp *timestamp; AgsApplicationContext *application_context; GList *list_automation; GList *list_acceleration, *list_acceleration_start; gchar *specifier; GType channel_type; gdouble gui_y; gdouble tact; gdouble c_y0, c_y1; gdouble val; gdouble upper, lower, range, step; gdouble c_upper, c_lower, c_range; guint tmp; guint x0, x1; gdouble y0, y1; guint step_count; gint line; guint i, i_start, i_stop; guint nth_match, match_count; gboolean is_audio, is_output, is_input; gboolean success; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; ramp_acceleration_dialog = AGS_RAMP_ACCELERATION_DIALOG(applicable); window = ramp_acceleration_dialog->main_window; automation_editor = window->automation_window->automation_editor; machine = automation_editor->selected_machine; if(machine == NULL || automation_editor->focused_automation_edit == NULL){ return; } automation_toolbar = automation_editor->automation_toolbar; specifier = gtk_combo_box_text_get_active_text(ramp_acceleration_dialog->port); if(automation_editor->focused_automation_edit->channel_type == G_TYPE_NONE){ notebook = NULL; channel_type = G_TYPE_NONE; is_audio = TRUE; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; channel_type = AGS_TYPE_OUTPUT; is_output = TRUE; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; channel_type = AGS_TYPE_INPUT; is_input = TRUE; } audio = machine->audio; /* get some values */ x0 = AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH * gtk_spin_button_get_value_as_int(ramp_acceleration_dialog->ramp_x0); y0 = gtk_spin_button_get_value(ramp_acceleration_dialog->ramp_y0); x1 = AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH * gtk_spin_button_get_value_as_int(ramp_acceleration_dialog->ramp_x1); y1 = gtk_spin_button_get_value(ramp_acceleration_dialog->ramp_y1); step_count = gtk_spin_button_get_value_as_int(ramp_acceleration_dialog->ramp_step_count); /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove acceleration of region */ line = 0; while(notebook == NULL || (line = ags_notebook_next_active_tab(notebook, line)) != -1){ list_automation = audio->automation; while((list_automation = ags_automation_find_specifier_with_type_and_line(list_automation, specifier, channel_type, line)) != NULL){ current = AGS_AUTOMATION(list_automation->data); if(current->timestamp->timer.ags_offset.offset < x0){ list_automation = list_automation->next; continue; } if(current->timestamp->timer.ags_offset.offset > x1){ break; } upper = current->upper; lower = current->lower; range = upper - lower; if(AGS_PORT(current->port)->conversion != NULL){ c_upper = ags_conversion_convert(AGS_PORT(current->port)->conversion, upper, FALSE); c_lower = ags_conversion_convert(AGS_PORT(current->port)->conversion, lower, FALSE); c_range = c_upper - c_lower; }else{ c_upper = upper; c_lower = lower; c_range = range; } if(range == 0.0){ list_automation = list_automation->next; g_warning("ags_ramp_acceleration_dialog.c - range = 0.0"); continue; } /* check steps */ gui_y = current->steps; val = c_lower + (gui_y * (c_range / current->steps)); c_y0 = val; /* conversion */ if(AGS_PORT(current->port)->conversion != NULL){ c_y0 = ags_conversion_convert(AGS_PORT(current->port)->conversion, c_y0, TRUE); } /* check steps */ gui_y = 0; val = c_lower + (gui_y * (c_range / current->steps)); c_y1 = val; /* conversion */ if(AGS_PORT(current->port)->conversion != NULL){ c_y1 = ags_conversion_convert(AGS_PORT(current->port)->conversion, c_y1, TRUE); } /* find and remove region */ list_acceleration = list_acceleration_start = ags_automation_find_region(list_automation->data, x0, c_y0, x1, c_y1, FALSE); while(list_acceleration != NULL){ current->acceleration = g_list_remove(current->acceleration, list_acceleration->data); list_acceleration = list_acceleration->next; } g_list_free(list_acceleration_start); list_automation = list_automation->next; } if(notebook == NULL){ break; } line++; } /* ramp acceleration */ line = 0; timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; while(notebook == NULL || (line = ags_notebook_next_active_tab(notebook, line)) != -1){ AgsChannel *channel; AgsPort *play_port, *recall_port; guint j; guint tmp; play_port = NULL; recall_port = NULL; if(channel_type == AGS_TYPE_OUTPUT){ channel = ags_channel_nth(machine->audio->output, line); play_port = ags_channel_find_port_by_specifier_and_scope(channel, specifier, TRUE); recall_port = ags_channel_find_port_by_specifier_and_scope(channel, specifier, FALSE); }else if(channel_type == AGS_TYPE_INPUT){ channel = ags_channel_nth(machine->audio->input, line); play_port = ags_channel_find_port_by_specifier_and_scope(channel, specifier, TRUE); recall_port = ags_channel_find_port_by_specifier_and_scope(channel, specifier, FALSE); }else{ play_port = ags_audio_find_port_by_specifier_and_scope(machine->audio, specifier, TRUE); recall_port = ags_audio_find_port_by_specifier_and_scope(machine->audio, specifier, FALSE); } if(play_port != NULL){ match_count = 0; tmp = x1 - x0; if(x0 % (guint) AGS_AUTOMATION_DEFAULT_OFFSET != 0 && x0 / (guint) AGS_AUTOMATION_DEFAULT_OFFSET != (x1 - AGS_AUTOMATION_DEFAULT_OFFSET) / (guint) AGS_AUTOMATION_DEFAULT_OFFSET){ match_count = 1; tmp -= (x0 % (guint) AGS_AUTOMATION_DEFAULT_OFFSET); } match_count += (guint) ceil((gdouble) tmp / AGS_AUTOMATION_DEFAULT_OFFSET); success = FALSE; timestamp->timer.ags_offset.offset = AGS_AUTOMATION_DEFAULT_OFFSET * floor(x0 / AGS_AUTOMATION_DEFAULT_OFFSET); for(nth_match = 0; nth_match < match_count; nth_match++){ list_automation = play_port->automation; list_automation = ags_automation_find_near_timestamp(list_automation, line, timestamp); if(list_automation == NULL){ current = ags_automation_new(machine->audio, line, channel_type, specifier); g_object_set(current, "port", play_port, NULL); current->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; ags_audio_add_automation(machine->audio, current); play_port->automation = ags_automation_add(play_port->automation, current); }else{ current = list_automation->data; } upper = current->upper; lower = current->lower; range = upper - lower; if(range == 0.0){ g_warning("ags_ramp_acceleration_dialog.c - range = 0.0"); break; } /* ramp value and move offset */ if(!success){ i = 0; if(floor(x0 / (guint) AGS_AUTOMATION_DEFAULT_OFFSET) == floor(x1 / (guint) AGS_AUTOMATION_DEFAULT_OFFSET)){ i_stop = step_count; tmp += (x1 - x0); }else{ i_stop = tmp / (x1 - x0) * step_count; if(tmp + AGS_AUTOMATION_DEFAULT_OFFSET < x1 - x0){ tmp += AGS_AUTOMATION_DEFAULT_OFFSET; }else{ tmp = x1 - x0; } } success = TRUE; }else{ i_stop = (x1 - tmp) / (x1 - x0) * step_count; if(tmp + AGS_AUTOMATION_DEFAULT_OFFSET < x1 - x0){ tmp += AGS_AUTOMATION_DEFAULT_OFFSET; }else{ tmp = x1 - x0; } } for(; i < step_count && i < i_stop; i++){ acceleration = ags_acceleration_new(); acceleration->x = ((gdouble) x0 + (gdouble) ((gdouble) (x1 - x0) * (gdouble) ((gdouble) (i) / ((gdouble) step_count)))); acceleration->y = ((gdouble) y0 + ((gdouble) (y1 - y0) * (gdouble) ((gdouble) (i + 1) / ((gdouble) step_count)))); //#ifdef AGS_DEBUG g_message("line %d - %d %f", line, acceleration->x, acceleration->y); //#endif ags_automation_add_acceleration(current, acceleration, FALSE); } timestamp->timer.ags_offset.offset += AGS_AUTOMATION_DEFAULT_OFFSET; } } if(recall_port != NULL){ match_count = 0; tmp = x1 - x0; if(x0 % (guint) AGS_AUTOMATION_DEFAULT_OFFSET != 0 && x0 / (guint) AGS_AUTOMATION_DEFAULT_OFFSET != (x1 - AGS_AUTOMATION_DEFAULT_OFFSET) / (guint) AGS_AUTOMATION_DEFAULT_OFFSET){ match_count = 1; tmp -= (x0 % (guint) AGS_AUTOMATION_DEFAULT_OFFSET); } match_count += (guint) ceil((gdouble) tmp / AGS_AUTOMATION_DEFAULT_OFFSET); success = FALSE; timestamp->timer.ags_offset.offset = AGS_AUTOMATION_DEFAULT_OFFSET * floor(x0 / AGS_AUTOMATION_DEFAULT_OFFSET); for(nth_match = 0; nth_match < match_count; nth_match++){ list_automation = recall_port->automation; list_automation = ags_automation_find_near_timestamp(list_automation, line, timestamp); if(list_automation == NULL){ current = ags_automation_new(machine->audio, line, channel_type, specifier); g_object_set(current, "port", recall_port, NULL); current->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; ags_audio_add_automation(machine->audio, current); recall_port->automation = ags_automation_add(recall_port->automation, current); }else{ current = list_automation->data; } upper = current->upper; lower = current->lower; range = upper - lower; if(range == 0.0){ g_warning("ags_ramp_acceleration_dialog.c - range = 0.0"); break; } /* ramp value and move offset */ if(!success){ i = 0; if(floor(x0 / (guint) AGS_AUTOMATION_DEFAULT_OFFSET) == floor(x1 / (guint) AGS_AUTOMATION_DEFAULT_OFFSET)){ i_stop = step_count; tmp += (x1 - x0); }else{ i_stop = tmp / (x1 - x0) * step_count; if(tmp + AGS_AUTOMATION_DEFAULT_OFFSET < x1 - x0){ tmp += AGS_AUTOMATION_DEFAULT_OFFSET; }else{ tmp = x1 - x0; } } success = TRUE; }else{ i_stop = (x1 - tmp) / (x1 - x0) * step_count; if(tmp + AGS_AUTOMATION_DEFAULT_OFFSET < x1 - x0){ tmp += AGS_AUTOMATION_DEFAULT_OFFSET; }else{ tmp = x1 - x0; } } for(; i < step_count && i < i_stop; i++){ acceleration = ags_acceleration_new(); acceleration->x = ((gdouble) x0 + (gdouble) ((gdouble) (x1 - x0) * (gdouble) ((gdouble) (i) / ((gdouble) step_count)))); acceleration->y = ((gdouble) y0 + ((gdouble) (y1 - y0) * (gdouble) ((gdouble) (i + 1) / ((gdouble) step_count)))); //#ifdef AGS_DEBUG g_message("line %d - %d %f", line, acceleration->x, acceleration->y); //#endif ags_automation_add_acceleration(current, acceleration, FALSE); } timestamp->timer.ags_offset.offset += AGS_AUTOMATION_DEFAULT_OFFSET; } } if(notebook == NULL){ break; } line++; } } void ags_ramp_acceleration_dialog_reset(AgsApplicable *applicable) { AgsWindow *window; AgsAutomationEditor *automation_editor; AgsMachine *machine; AgsRampAccelerationDialog *ramp_acceleration_dialog; AgsAudio *audio; AgsMutexManager *mutex_manager; gchar **specifier; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; ramp_acceleration_dialog = AGS_RAMP_ACCELERATION_DIALOG(applicable); window = AGS_WINDOW(ramp_acceleration_dialog->main_window); automation_editor = window->automation_window->automation_editor; machine = automation_editor->selected_machine; gtk_list_store_clear(gtk_combo_box_get_model(ramp_acceleration_dialog->port)); if(machine == NULL){ return; } audio = machine->audio; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(audio_mutex); specifier = ags_automation_get_specifier_unique(audio->automation); for(; *specifier != NULL; specifier++){ gtk_combo_box_text_append_text(ramp_acceleration_dialog->port, g_strdup(*specifier)); } pthread_mutex_unlock(audio_mutex); } gboolean ags_ramp_acceleration_dialog_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_ramp_acceleration_dialog_parent_class)->delete_event(widget, event); return(TRUE); } /** * ags_ramp_acceleration_dialog_new: * @main_window: the #AgsWindow * * Create a new #AgsRampAccelerationDialog. * * Returns: a new #AgsRampAccelerationDialog * * Since: 1.0.0 */ AgsRampAccelerationDialog* ags_ramp_acceleration_dialog_new(GtkWidget *main_window) { AgsRampAccelerationDialog *ramp_acceleration_dialog; ramp_acceleration_dialog = (AgsRampAccelerationDialog *) g_object_new(AGS_TYPE_RAMP_ACCELERATION_DIALOG, "main-window", main_window, NULL); return(ramp_acceleration_dialog); } gsequencer-1.4.24/ags/X/editor/ags_position_automation_cursor_dialog_callbacks.h0000644000175000017500000000236613247044247025173 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CALLBACKS_H__ #define __AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CALLBACKS_H__ #include #include #include #include void ags_position_automation_cursor_dialog_response_callback(GtkWidget *dialog, gint response, AgsPositionAutomationCursorDialog *position_automation_cursor_dialog); #endif /*__AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_automation_edit_callbacks.c0000644000175000017500000007306213247044247021334 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include gboolean ags_automation_edit_drawing_area_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsAutomationEdit *automation_edit) { ags_automation_edit_reset_vscrollbar(automation_edit); ags_automation_edit_reset_hscrollbar(automation_edit); ags_automation_edit_draw(automation_edit); return(TRUE); } gboolean ags_automation_edit_drawing_area_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsAutomationEdit *automation_edit) { ags_automation_edit_reset_vscrollbar(automation_edit); ags_automation_edit_reset_hscrollbar(automation_edit); ags_automation_edit_draw(automation_edit); return(FALSE); } gboolean ags_automation_edit_drawing_area_button_press_event(GtkWidget *widget, GdkEventButton *event, AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; AgsMachine *machine; auto void ags_automation_edit_drawing_area_button_press_position_cursor(); auto void ags_automation_edit_drawing_area_button_press_add_acceleration(); auto void ags_automation_edit_drawing_area_button_press_select_acceleration(); void ags_automation_edit_drawing_area_button_press_position_cursor() { gdouble c_range; guint g_range; double zoom_factor; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* cursor position */ automation_edit->cursor_position_x = (guint) (zoom_factor * (event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value)) / automation_edit->control_width; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ automation_edit->cursor_position_y = log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); }else{ automation_edit->cursor_position_y = (((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); } /* queue draw */ gtk_widget_queue_draw(automation_edit); } void ags_automation_edit_drawing_area_button_press_add_acceleration() { AgsAcceleration *acceleration; gdouble c_range; guint g_range; double zoom_factor; acceleration = ags_acceleration_new(); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* acceleration */ acceleration->x = (guint) (zoom_factor * (event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value)); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ acceleration->y = log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); }else{ acceleration->y = (((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); } /* current acceleration */ if(automation_edit->current_acceleration != NULL){ g_object_unref(automation_edit->current_acceleration); automation_edit->current_acceleration = NULL; } automation_edit->current_acceleration = acceleration; g_object_ref(acceleration); /* queue draw */ gtk_widget_queue_draw(automation_edit); } void ags_automation_edit_drawing_area_button_press_select_acceleration() { automation_edit->selection_x0 = (guint) event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value; automation_edit->selection_x1 = automation_edit->selection_x0; automation_edit->selection_y0 = (guint) event->y + GTK_RANGE(automation_edit->vscrollbar)->adjustment->value; automation_edit->selection_y1 = automation_edit->selection_y0; gtk_widget_queue_draw(automation_edit); } automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(automation_edit), AGS_TYPE_AUTOMATION_EDITOR); automation_toolbar = automation_editor->automation_toolbar; gtk_widget_grab_focus((GtkWidget *) automation_edit->drawing_area); automation_editor->focused_automation_edit = automation_edit; if((machine = automation_editor->selected_machine) != NULL && event->button == 1){ automation_edit->button_mask = AGS_AUTOMATION_EDIT_BUTTON_1; if(automation_toolbar->selected_edit_mode == automation_toolbar->position){ automation_edit->mode = AGS_AUTOMATION_EDIT_POSITION_CURSOR; ags_automation_edit_drawing_area_button_press_position_cursor(); }else if(automation_toolbar->selected_edit_mode == automation_toolbar->edit){ automation_edit->mode = AGS_AUTOMATION_EDIT_ADD_ACCELERATION; ags_automation_edit_drawing_area_button_press_add_acceleration(); }else if(automation_toolbar->selected_edit_mode == automation_toolbar->clear){ automation_edit->mode = AGS_AUTOMATION_EDIT_DELETE_ACCELERATION; //ACCELERATION:JK: only takes action on release }else if(automation_toolbar->selected_edit_mode == automation_toolbar->select){ automation_edit->mode = AGS_AUTOMATION_EDIT_SELECT_ACCELERATION; ags_automation_edit_drawing_area_button_press_select_acceleration(); } } return(TRUE); } gboolean ags_automation_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButton *event, AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; AgsMachine *machine; auto void ags_automation_edit_drawing_area_button_release_position_cursor(); auto void ags_automation_edit_drawing_area_button_release_add_acceleration(); auto void ags_automation_edit_drawing_area_button_release_delete_acceleration(); auto void ags_automation_edit_drawing_area_button_release_select_acceleration(); void ags_automation_edit_drawing_area_button_release_position_cursor() { gdouble c_range; guint g_range; double zoom_factor; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* cursor position */ automation_edit->cursor_position_x = (guint) (zoom_factor * (event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value)) / automation_edit->control_width; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ automation_edit->cursor_position_y = log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); }else{ automation_edit->cursor_position_y = (((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); } /* queue draw */ gtk_widget_queue_draw(automation_edit); } void ags_automation_edit_drawing_area_button_release_add_acceleration() { AgsAcceleration *acceleration; gdouble c_range; guint g_range; double zoom_factor; guint new_x; acceleration = automation_edit->current_acceleration; if(acceleration == NULL){ return; } if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* acceleration */ acceleration->x = (guint) (zoom_factor * (event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value)); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ acceleration->y = log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); }else{ acceleration->y = (((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); } #ifdef AGS_DEBUG g_message("%lu %f", acceleration->x, acceleration->y); #endif /* add acceleration */ ags_automation_editor_add_acceleration(automation_editor, acceleration); automation_edit->current_acceleration = NULL; g_object_unref(acceleration); } void ags_automation_edit_drawing_area_button_release_delete_acceleration() { gdouble c_range; guint g_range; double zoom_factor; guint x; gdouble y; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* acceleration */ x = (guint) zoom_factor * ((event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value)); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ y = log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); }else{ y = (((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); } /* delete acceleration */ ags_automation_editor_delete_acceleration(automation_editor, x, y); } void ags_automation_edit_drawing_area_button_release_select_acceleration() { gdouble c_range; guint g_range; double zoom_factor; guint x0, x1; gdouble y0, y1; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* region */ x0 = (guint) zoom_factor * automation_edit->selection_x0; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ y0 = log((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - automation_edit->selection_y0) / g_range) * c_range; }else{ y0 = ((gdouble) (GTK_WIDGET(automation_edit->drawing_area)->allocation.height - automation_edit->selection_y0) / g_range) * c_range; } x1 = (guint) zoom_factor * (event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ y1 = log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) + GTK_RANGE(automation_edit->vscrollbar)->adjustment->value) / g_range) * c_range; }else{ y1 = (((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) + GTK_RANGE(automation_edit->vscrollbar)->adjustment->value) / g_range) * c_range; } /* select region */ ags_automation_editor_select_region(automation_editor, x0, y0, x1, y1); } automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(automation_edit), AGS_TYPE_AUTOMATION_EDITOR); automation_toolbar = automation_editor->automation_toolbar; if((machine = automation_editor->selected_machine) != NULL && event->button == 1){ automation_edit->button_mask &= (~AGS_AUTOMATION_EDIT_BUTTON_1); if(automation_edit->mode == AGS_AUTOMATION_EDIT_POSITION_CURSOR){ ags_automation_edit_drawing_area_button_release_position_cursor(); automation_edit->mode = AGS_AUTOMATION_EDIT_NO_EDIT_MODE; }else if(automation_edit->mode == AGS_AUTOMATION_EDIT_ADD_ACCELERATION){ ags_automation_edit_drawing_area_button_release_add_acceleration(); automation_edit->mode = AGS_AUTOMATION_EDIT_NO_EDIT_MODE; }else if(automation_edit->mode == AGS_AUTOMATION_EDIT_DELETE_ACCELERATION){ ags_automation_edit_drawing_area_button_release_delete_acceleration(); automation_edit->mode = AGS_AUTOMATION_EDIT_NO_EDIT_MODE; }else if(automation_edit->mode == AGS_AUTOMATION_EDIT_SELECT_ACCELERATION){ ags_automation_edit_drawing_area_button_release_select_acceleration(); automation_edit->mode = AGS_AUTOMATION_EDIT_NO_EDIT_MODE; } } return(FALSE); } gboolean ags_automation_edit_drawing_area_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; AgsMachine *machine; auto void ags_automation_edit_drawing_area_motion_notify_position_cursor(); auto void ags_automation_edit_drawing_area_motion_notify_add_acceleration(); auto void ags_automation_edit_drawing_area_motion_notify_select_acceleration(); void ags_automation_edit_drawing_area_motion_notify_position_cursor() { gdouble c_range; guint g_range; double zoom_factor; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* cursor position */ automation_edit->cursor_position_x = (guint) zoom_factor * ((event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value)); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ automation_edit->cursor_position_y = log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); }else{ automation_edit->cursor_position_y = (((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); } #ifdef AGS_DEBUG g_message("%lu %f", automation_edit->cursor_position_x, automation_edit->cursor_position_y); #endif /* queue draw */ gtk_widget_queue_draw(automation_edit); } void ags_automation_edit_drawing_area_motion_notify_add_acceleration() { AgsAcceleration *acceleration; gdouble c_range; guint g_range; double zoom_factor; acceleration = automation_edit->current_acceleration; if(acceleration == NULL){ return; } if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* acceleration */ acceleration->x = (guint) zoom_factor * ((event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value)); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ acceleration->y = log(((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); }else{ acceleration->y = (((GTK_WIDGET(automation_edit->drawing_area)->allocation.height - event->y) / g_range) * c_range); } #ifdef AGS_DEBUG g_message("%lu %f", acceleration->x, acceleration->y); #endif /* queue draw */ gtk_widget_queue_draw(automation_edit); } void ags_automation_edit_drawing_area_motion_notify_select_acceleration() { if(event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value >= 0.0){ automation_edit->selection_x1 = (guint) event->x + GTK_RANGE(automation_edit->hscrollbar)->adjustment->value; }else{ automation_edit->selection_x1 = 0.0; } if(event->y + GTK_RANGE(automation_edit->vscrollbar)->adjustment->value >= 0.0){ automation_edit->selection_y1 = (guint) event->y + GTK_RANGE(automation_edit->vscrollbar)->adjustment->value; }else{ automation_edit->selection_y1 = 0.0; } gtk_widget_queue_draw(automation_edit); } automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(automation_edit), AGS_TYPE_AUTOMATION_EDITOR); automation_toolbar = automation_editor->automation_toolbar; gtk_widget_grab_focus((GtkWidget *) automation_edit->drawing_area); if((machine = automation_editor->selected_machine) != NULL && (AGS_AUTOMATION_EDIT_BUTTON_1 & (automation_edit->button_mask)) != 0){ if(automation_edit->mode == AGS_AUTOMATION_EDIT_POSITION_CURSOR){ ags_automation_edit_drawing_area_motion_notify_position_cursor(); }else if(automation_edit->mode == AGS_AUTOMATION_EDIT_ADD_ACCELERATION){ ags_automation_edit_drawing_area_motion_notify_add_acceleration(); }else if(automation_edit->mode == AGS_AUTOMATION_EDIT_DELETE_ACCELERATION){ //ACCELERATION:JK: only takes action on release }else if(automation_edit->mode == AGS_AUTOMATION_EDIT_SELECT_ACCELERATION){ ags_automation_edit_drawing_area_motion_notify_select_acceleration(); } } return(FALSE); } gboolean ags_automation_edit_drawing_area_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; AgsMachine *machine; gboolean retval; if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ retval = FALSE; }else{ retval = TRUE; } automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(automation_edit), AGS_TYPE_AUTOMATION_EDITOR); machine = automation_editor->selected_machine; if(machine != NULL){ switch(event->keyval){ case GDK_KEY_Control_L: { automation_edit->key_mask |= AGS_AUTOMATION_EDIT_KEY_L_CONTROL; } break; case GDK_KEY_Control_R: { automation_edit->key_mask |= AGS_AUTOMATION_EDIT_KEY_R_CONTROL; } break; case GDK_KEY_Shift_L: { automation_edit->key_mask |= AGS_AUTOMATION_EDIT_KEY_L_SHIFT; } break; case GDK_KEY_Shift_R: { automation_edit->key_mask |= AGS_AUTOMATION_EDIT_KEY_R_SHIFT; } break; case GDK_KEY_a: { /* select all accelerations */ if((AGS_AUTOMATION_EDIT_KEY_L_CONTROL & (automation_edit->key_mask)) != 0 || (AGS_AUTOMATION_EDIT_KEY_R_CONTROL & (automation_edit->key_mask)) != 0){ ags_automation_editor_select_all(automation_editor); } } break; case GDK_KEY_c: { /* copy accelerations */ if((AGS_AUTOMATION_EDIT_KEY_L_CONTROL & (automation_edit->key_mask)) != 0 || (AGS_AUTOMATION_EDIT_KEY_R_CONTROL & (automation_edit->key_mask)) != 0){ ags_automation_editor_copy(automation_editor); } } break; case GDK_KEY_v: { /* paste accelerations */ if((AGS_AUTOMATION_EDIT_KEY_L_CONTROL & (automation_edit->key_mask)) != 0 || (AGS_AUTOMATION_EDIT_KEY_R_CONTROL & (automation_edit->key_mask)) != 0){ ags_automation_editor_paste(automation_editor); } } break; case GDK_KEY_x: { /* cut accelerations */ if((AGS_AUTOMATION_EDIT_KEY_L_CONTROL & (automation_edit->key_mask)) != 0 || (AGS_AUTOMATION_EDIT_KEY_R_CONTROL & (automation_edit->key_mask)) != 0){ ags_automation_editor_cut(automation_editor); } } break; case GDK_KEY_i: { /* invert accelerations */ if((AGS_AUTOMATION_EDIT_KEY_L_CONTROL & (automation_edit->key_mask)) != 0 || (AGS_AUTOMATION_EDIT_KEY_R_CONTROL & (automation_edit->key_mask)) != 0){ ags_automation_editor_invert(automation_editor); } } break; } } return(retval); } gboolean ags_automation_edit_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; AgsMachine *machine; AgsNotebook *notebook; AgsMutexManager *mutex_manager; double zoom_factor; gint i; gboolean retval; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(automation_edit), AGS_TYPE_AUTOMATION_EDITOR); automation_toolbar = automation_editor->automation_toolbar; machine = automation_editor->selected_machine; if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ retval = FALSE; }else{ retval = TRUE; } if(machine != NULL){ if(automation_edit->channel_type == G_TYPE_NONE){ notebook = NULL; }else if(automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; }else if(automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom)); /* check key value */ switch(event->keyval){ case GDK_KEY_Control_L: { automation_edit->key_mask &= (~AGS_AUTOMATION_EDIT_KEY_L_CONTROL); } break; case GDK_KEY_Control_R: { automation_edit->key_mask &= (~AGS_AUTOMATION_EDIT_KEY_R_CONTROL); } break; case GDK_KEY_Shift_L: { automation_edit->key_mask &= (~AGS_AUTOMATION_EDIT_KEY_L_SHIFT); } break; case GDK_KEY_Shift_R: { automation_edit->key_mask &= (~AGS_AUTOMATION_EDIT_KEY_R_SHIFT); } break; case GDK_KEY_Left: case GDK_KEY_leftarrow: { gdouble x0_offset; /* position cursor */ if(automation_edit->cursor_position_x > 0){ if(automation_edit->cursor_position_x - (zoom_factor * automation_edit->control_width) > 0){ automation_edit->cursor_position_x -= (zoom_factor * automation_edit->control_width); }else{ automation_edit->cursor_position_x = 0; } } x0_offset = automation_edit->cursor_position_x / zoom_factor; if(x0_offset < GTK_RANGE(automation_edit->hscrollbar)->adjustment->value){ gtk_range_set_value(GTK_RANGE(automation_edit->hscrollbar), x0_offset); } } break; case GDK_KEY_Right: case GDK_KEY_rightarrow: { gdouble x0_offset; /* position cursor */ if(automation_edit->cursor_position_x < AGS_AUTOMATION_EDITOR_MAX_CONTROLS){ automation_edit->cursor_position_x += (zoom_factor * automation_edit->control_width); } x0_offset = automation_edit->cursor_position_x / zoom_factor; if(x0_offset + automation_edit->control_width > GTK_RANGE(automation_edit->hscrollbar)->adjustment->value + GTK_WIDGET(automation_edit->drawing_area)->allocation.width){ gtk_range_set_value(GTK_RANGE(automation_edit->hscrollbar), x0_offset); } } break; case GDK_KEY_Up: case GDK_KEY_uparrow: { gdouble y0_offset; gdouble c_range; guint g_range; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; if(automation_edit->cursor_position_y < automation_edit->upper){ if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ automation_edit->cursor_position_y += log((1.0 / g_range) * c_range); }else{ automation_edit->cursor_position_y += ((1.0 / g_range) * c_range); } if(automation_edit->cursor_position_y > automation_edit->upper){ automation_edit->cursor_position_y = automation_edit->upper; } } if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ y0_offset = exp(automation_edit->cursor_position_y) / c_range * g_range; }else{ y0_offset = automation_edit->cursor_position_y / c_range * g_range; } if(y0_offset < GTK_RANGE(automation_edit->vscrollbar)->adjustment->value){ gtk_range_set_value(GTK_RANGE(automation_edit->vscrollbar), y0_offset); } } break; case GDK_KEY_Down: case GDK_KEY_downarrow: { gdouble y0_offset; gdouble c_range; guint g_range; if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ c_range = exp(automation_edit->upper) - exp(automation_edit->lower); }else{ c_range = automation_edit->upper - automation_edit->lower; } g_range = GTK_RANGE(automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_edit->drawing_area)->allocation.height; if(automation_edit->cursor_position_y < automation_edit->lower){ if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ automation_edit->cursor_position_y -= log((1.0 / g_range) * c_range); }else{ automation_edit->cursor_position_y -= ((1.0 / g_range) * c_range); } if(automation_edit->cursor_position_y < automation_edit->lower){ automation_edit->cursor_position_y = automation_edit->lower; } } if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_edit->flags)) != 0){ y0_offset = exp(automation_edit->cursor_position_y) / c_range * g_range; }else{ y0_offset = automation_edit->cursor_position_y / c_range * g_range; } if(y0_offset < GTK_RANGE(automation_edit->vscrollbar)->adjustment->value){ gtk_range_set_value(GTK_RANGE(automation_edit->vscrollbar), y0_offset); } } break; case GDK_KEY_space: { AgsAcceleration *acceleration; acceleration = ags_acceleration_new(); acceleration->x = automation_edit->cursor_position_x; acceleration->y = automation_edit->cursor_position_y; /* add acceleration */ ags_automation_editor_add_acceleration(automation_editor, acceleration); } break; case GDK_KEY_Delete: { /* delete acceleration */ ags_automation_editor_delete_acceleration(automation_editor, automation_edit->cursor_position_x, automation_edit->cursor_position_y); } break; } gtk_widget_queue_draw(automation_edit); } return(retval); } void ags_automation_edit_vscrollbar_value_changed(GtkRange *range, AgsAutomationEdit *automation_edit) { AgsAutomationEditor *automation_editor; GtkAdjustment *piano_adjustment; automation_editor = gtk_widget_get_ancestor(automation_edit, AGS_TYPE_AUTOMATION_EDITOR); /* queue draw */ gtk_widget_queue_draw(automation_edit->drawing_area); } void ags_automation_edit_hscrollbar_value_changed(GtkRange *range, AgsAutomationEdit *automation_edit) { gdouble value; value = GTK_RANGE(automation_edit->hscrollbar)->adjustment->value / 64.0; gtk_adjustment_set_value(automation_edit->ruler->adjustment, value); gtk_widget_queue_draw(automation_edit->ruler); /* queue draw */ gtk_widget_queue_draw(automation_edit->drawing_area); } gsequencer-1.4.24/ags/X/editor/ags_select_acceleration_dialog_callbacks.h0000644000175000017500000000335513246707333023462 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SELECT_ACCELERATION_DIALOG_CALLBACKS_H__ #define __AGS_SELECT_ACCELERATION_DIALOG_CALLBACKS_H__ #include #include #include #include #include #include void ags_select_acceleration_dialog_response_callback(GtkWidget *dialog, gint response, AgsSelectAccelerationDialog *select_acceleration_dialog); void ags_select_acceleration_dialog_add_callback(GtkWidget *button, AgsSelectAccelerationDialog *select_acceleration_dialog); void ags_select_acceleration_dialog_remove_callback(GtkWidget *button, AgsSelectAccelerationDialog *select_acceleration_dialog); void ags_select_acceleration_dialog_machine_changed_callback(AgsAutomationEditor *automation_editor, AgsMachine *machine, AgsSelectAccelerationDialog *select_acceleration_dialog); #endif /*__AGS_SELECT_ACCELERATION_DIALOG_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_automation_toolbar.c0000644000175000017500000007244013247044247020051 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_automation_toolbar_class_init(AgsAutomationToolbarClass *automation_toolbar); void ags_automation_toolbar_connectable_interface_init(AgsConnectableInterface *connectable); void ags_automation_toolbar_init(AgsAutomationToolbar *automation_toolbar); void ags_automation_toolbar_connect(AgsConnectable *connectable); void ags_automation_toolbar_disconnect(AgsConnectable *connectable); /** * SECTION:ags_automation_toolbar * @short_description: automation toolbar * @title: AgsAutomationToolbar * @section_id: * @include: ags/X/editor/ags_automation_toolbar.h * * The #AgsAutomationToolbar lets you choose edit tool. */ GType ags_automation_toolbar_get_type(void) { static GType ags_type_automation_toolbar = 0; if (!ags_type_automation_toolbar){ static const GTypeInfo ags_automation_toolbar_info = { sizeof (AgsAutomationToolbarClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_automation_toolbar_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAutomationToolbar), 0, /* n_preallocs */ (GInstanceInitFunc) ags_automation_toolbar_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_automation_toolbar_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_automation_toolbar = g_type_register_static(GTK_TYPE_TOOLBAR, "AgsAutomationToolbar", &ags_automation_toolbar_info, 0); g_type_add_interface_static(ags_type_automation_toolbar, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_automation_toolbar); } void ags_automation_toolbar_class_init(AgsAutomationToolbarClass *automation_toolbar) { } void ags_automation_toolbar_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_automation_toolbar_connect; connectable->disconnect = ags_automation_toolbar_disconnect; } void ags_automation_toolbar_init(AgsAutomationToolbar *automation_toolbar) { GtkMenuToolButton *menu_tool_button; GtkMenu *menu; GtkMenuItem *item; GtkLabel *label; GtkCellRenderer *cell_renderer; automation_toolbar->position = g_object_new(GTK_TYPE_TOGGLE_TOOL_BUTTON, "label", i18n("Position"), "stock-id", GTK_STOCK_JUMP_TO, NULL); gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->position, "position cursor", NULL); automation_toolbar->edit = g_object_new(GTK_TYPE_TOGGLE_TOOL_BUTTON, "stock-id", GTK_STOCK_EDIT, NULL); automation_toolbar->selected_edit_mode = automation_toolbar->edit; gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->edit, "edit automation", NULL); automation_toolbar->clear = g_object_new(GTK_TYPE_TOGGLE_TOOL_BUTTON, "stock-id", GTK_STOCK_CLEAR, NULL); gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->clear, "select automation", NULL); automation_toolbar->select = g_object_new(GTK_TYPE_TOGGLE_TOOL_BUTTON, "label", i18n("Select"), "stock-id", GTK_STOCK_SELECT_ALL, NULL); gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->select, "select automation", NULL); automation_toolbar->copy = (GtkButton *) g_object_new(GTK_TYPE_TOOL_BUTTON, "stock-id", GTK_STOCK_COPY, NULL); gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->copy, i18n("copy automation"), NULL); automation_toolbar->cut = (GtkButton *) g_object_new(GTK_TYPE_TOOL_BUTTON, "stock-id", GTK_STOCK_CUT, NULL); gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->cut, i18n("cut automation"), NULL); automation_toolbar->paste_tool = (GtkButton *) g_object_new(GTK_TYPE_MENU_TOOL_BUTTON, "stock-id", GTK_STOCK_PASTE, NULL); menu = gtk_menu_new(); item = g_object_new(GTK_TYPE_CHECK_MENU_ITEM, "label", "match line", "active", TRUE, NULL); gtk_menu_shell_append(menu, item); item = g_object_new(GTK_TYPE_CHECK_MENU_ITEM, "label", "no duplicates", "active", TRUE, NULL); gtk_menu_shell_append(menu, item); gtk_menu_tool_button_set_menu(automation_toolbar->paste_tool, menu); gtk_widget_show_all(menu); gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->paste_tool, "paste automation", NULL); /* menu tool */ automation_toolbar->menu_tool = (GtkMenuToolButton *) g_object_new(GTK_TYPE_MENU_TOOL_BUTTON, "label", i18n("tool"), "stock-id", GTK_STOCK_EXECUTE, NULL); gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->menu_tool, i18n("additional tools"), NULL); /* menu tool - tool popup */ automation_toolbar->tool_popup = ags_automation_toolbar_tool_popup_new(automation_toolbar); gtk_menu_tool_button_set_menu(automation_toolbar->menu_tool, automation_toolbar->tool_popup); /* menu tool - dialogs */ automation_toolbar->select_acceleration = ags_select_acceleration_dialog_new(NULL); automation_toolbar->ramp_acceleration = ags_ramp_acceleration_dialog_new(NULL); automation_toolbar->position_automation_cursor = ags_position_automation_cursor_dialog_new(NULL); /* */ automation_toolbar->zoom_history = 4; label = (GtkLabel *) gtk_label_new(i18n("zoom")); gtk_container_add(GTK_CONTAINER(automation_toolbar), (GtkWidget *) label); automation_toolbar->zoom = ags_zoom_combo_box_new(); gtk_combo_box_set_active(GTK_COMBO_BOX(automation_toolbar->zoom), 2); gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->zoom, NULL, NULL); /* */ label = (GtkLabel *) gtk_label_new(i18n("port")); gtk_container_add(GTK_CONTAINER(automation_toolbar), (GtkWidget *) label); automation_toolbar->port = (GtkComboBox *) gtk_combo_box_new(); cell_renderer = gtk_cell_renderer_toggle_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(automation_toolbar->port), cell_renderer, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(automation_toolbar->port), cell_renderer, "active", 0, NULL); gtk_cell_renderer_toggle_set_activatable(GTK_CELL_RENDERER_TOGGLE(cell_renderer), TRUE); cell_renderer = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(automation_toolbar->port), cell_renderer, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(automation_toolbar->port), cell_renderer, "text", 1, "text", 2, NULL); gtk_toolbar_append_widget((GtkToolbar *) automation_toolbar, (GtkWidget *) automation_toolbar->port, NULL, NULL); } void ags_automation_toolbar_connect(AgsConnectable *connectable) { AgsWindow *window; AgsAutomationWindow *automation_window; AgsAutomationEditor *automation_editor; AgsAutomationToolbar *automation_toolbar; GList *list; automation_toolbar = AGS_AUTOMATION_TOOLBAR(connectable); if((AGS_AUTOMATION_TOOLBAR_CONNECTED & (automation_toolbar->flags)) != 0){ return; } automation_toolbar->flags |= AGS_AUTOMATION_TOOLBAR_CONNECTED; automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor((GtkWidget *) automation_toolbar, AGS_TYPE_AUTOMATION_EDITOR); automation_window = (AgsAutomationWindow *) gtk_widget_get_ancestor((GtkWidget *) automation_toolbar, AGS_TYPE_AUTOMATION_WINDOW); window = automation_window->parent_window; g_object_set(automation_toolbar->select_acceleration, "main-window", window, NULL); g_object_set(automation_toolbar->ramp_acceleration, "main-window", window, NULL); g_object_set(automation_toolbar->position_automation_cursor, "main-window", window, NULL); /* */ g_signal_connect_after(G_OBJECT(automation_editor), "machine-changed", G_CALLBACK(ags_automation_toolbar_machine_changed_callback), automation_toolbar); /* tool */ g_signal_connect_after((GObject *) automation_toolbar->position, "toggled", G_CALLBACK(ags_automation_toolbar_position_callback), (gpointer) automation_toolbar); g_signal_connect_after((GObject *) automation_toolbar->edit, "toggled", G_CALLBACK(ags_automation_toolbar_edit_callback), (gpointer) automation_toolbar); g_signal_connect_after((GObject *) automation_toolbar->clear, "toggled", G_CALLBACK(ags_automation_toolbar_clear_callback), (gpointer) automation_toolbar); g_signal_connect_after((GObject *) automation_toolbar->select, "toggled", G_CALLBACK(ags_automation_toolbar_select_callback), (gpointer) automation_toolbar); /* edit */ g_signal_connect((GObject *) automation_toolbar->copy, "clicked", G_CALLBACK(ags_automation_toolbar_copy_or_cut_callback), (gpointer) automation_toolbar); g_signal_connect((GObject *) automation_toolbar->cut, "clicked", G_CALLBACK(ags_automation_toolbar_copy_or_cut_callback), (gpointer) automation_toolbar); g_signal_connect((GObject *) automation_toolbar->paste_tool, "clicked", G_CALLBACK(ags_automation_toolbar_paste_callback), (gpointer) automation_toolbar); list = gtk_container_get_children(gtk_menu_tool_button_get_menu(automation_toolbar->paste_tool)); g_signal_connect_after(list->data, "activate", G_CALLBACK(ags_automation_toolbar_match_line_callback), automation_toolbar); g_signal_connect_after(list->next->data, "activate", G_CALLBACK(ags_automation_toolbar_no_duplicates_callback), automation_toolbar); g_list_free(list); /* additional tools */ ags_connectable_connect(AGS_CONNECTABLE(automation_toolbar->select_acceleration)); ags_connectable_connect(AGS_CONNECTABLE(automation_toolbar->ramp_acceleration)); ags_connectable_connect(AGS_CONNECTABLE(automation_toolbar->position_automation_cursor)); /* zoom */ g_signal_connect_after((GObject *) automation_toolbar->zoom, "changed", G_CALLBACK(ags_automation_toolbar_zoom_callback), (gpointer) automation_toolbar); /* port */ g_signal_connect_after(automation_toolbar->port, "changed", G_CALLBACK(ags_automation_toolbar_port_callback), automation_toolbar); } void ags_automation_toolbar_disconnect(AgsConnectable *connectable) { AgsAutomationToolbar *automation_toolbar; GList *list; automation_toolbar = AGS_AUTOMATION_TOOLBAR(connectable); if((AGS_AUTOMATION_TOOLBAR_CONNECTED & (automation_toolbar->flags)) == 0){ return; } automation_toolbar->flags &= (~AGS_AUTOMATION_TOOLBAR_CONNECTED); /* tool */ g_object_disconnect(G_OBJECT(automation_toolbar->position), "any_signal::toggled", G_CALLBACK(ags_automation_toolbar_position_callback), automation_toolbar, NULL); g_object_disconnect(G_OBJECT(automation_toolbar->edit), "any_signal::toggled", G_CALLBACK(ags_automation_toolbar_edit_callback), automation_toolbar, NULL); g_object_disconnect(G_OBJECT(automation_toolbar->clear), "any_signal::toggled", G_CALLBACK(ags_automation_toolbar_clear_callback), automation_toolbar, NULL); g_object_disconnect(G_OBJECT(automation_toolbar->select), "any_signal::toggled", G_CALLBACK(ags_automation_toolbar_select_callback), automation_toolbar, NULL); /* edit */ g_object_disconnect(G_OBJECT(automation_toolbar->copy), "any_signal::clicked", G_CALLBACK(ags_automation_toolbar_copy_or_cut_callback), automation_toolbar, NULL); g_object_disconnect(G_OBJECT(automation_toolbar->cut), "any_signal::clicked", G_CALLBACK(ags_automation_toolbar_copy_or_cut_callback), automation_toolbar, NULL); g_object_disconnect(G_OBJECT(automation_toolbar->paste_tool), "any_signal::clicked", G_CALLBACK(ags_automation_toolbar_paste_callback), automation_toolbar, NULL); list = gtk_container_get_children(gtk_menu_tool_button_get_menu(automation_toolbar->paste_tool)); g_object_disconnect(G_OBJECT(list->data), "any_signal::activate", G_CALLBACK(ags_automation_toolbar_match_line_callback), automation_toolbar, NULL); g_object_disconnect(G_OBJECT(list->next->data), "any_signal::activate", G_CALLBACK(ags_automation_toolbar_no_duplicates_callback), automation_toolbar, NULL); g_list_free(list); /* additional tools */ ags_connectable_disconnect(AGS_CONNECTABLE(automation_toolbar->select_acceleration)); ags_connectable_disconnect(AGS_CONNECTABLE(automation_toolbar->ramp_acceleration)); ags_connectable_disconnect(AGS_CONNECTABLE(automation_toolbar->position_automation_cursor)); /* zoom */ g_object_disconnect(G_OBJECT(automation_toolbar->zoom), "any_signal::changed", G_CALLBACK(ags_automation_toolbar_zoom_callback), automation_toolbar, NULL); /* port */ g_object_disconnect(G_OBJECT(automation_toolbar->port), "any_signal::changed", G_CALLBACK(ags_automation_toolbar_port_callback), automation_toolbar, NULL); } /** * ags_automation_toolbar_load_port: * @automation_toolbar: an #AgsAutomationToolbar * * Fill in port field with available ports. * * Since: 1.0.0 */ void ags_automation_toolbar_load_port(AgsAutomationToolbar *automation_toolbar) { AgsAutomationEditor *automation_editor; AgsMachine *machine; GtkListStore *list_store; GtkTreeIter iter; AgsMutexManager *mutex_manager; gchar **specifier; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor((GtkWidget *) automation_toolbar, AGS_TYPE_AUTOMATION_EDITOR); machine = automation_editor->selected_machine; if(machine == NULL){ gtk_combo_box_set_model(automation_toolbar->port, NULL); return; } /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* */ list_store = gtk_list_store_new(3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING); gtk_combo_box_set_model(automation_toolbar->port, GTK_TREE_MODEL(list_store)); /* audio */ pthread_mutex_lock(audio_mutex); specifier = ags_automation_get_specifier_unique_with_channel_type(machine->audio->automation, G_TYPE_NONE); pthread_mutex_unlock(audio_mutex); for(; *specifier != NULL; specifier++){ gboolean is_enabled; gtk_list_store_append(list_store, &iter); is_enabled = (ags_machine_automation_port_find_channel_type_with_control_name(machine->enabled_automation_port, G_TYPE_NONE, *specifier)) ? TRUE: FALSE; gtk_list_store_set(list_store, &iter, 0, is_enabled, 1, g_strdup("audio"), 2, g_strdup(*specifier), -1); } /* output */ pthread_mutex_lock(audio_mutex); specifier = ags_automation_get_specifier_unique_with_channel_type(machine->audio->automation, AGS_TYPE_OUTPUT); pthread_mutex_unlock(audio_mutex); for(; *specifier != NULL; specifier++){ gboolean is_enabled; gtk_list_store_append(list_store, &iter); is_enabled = (ags_machine_automation_port_find_channel_type_with_control_name(machine->enabled_automation_port, AGS_TYPE_OUTPUT, *specifier)) ? TRUE: FALSE; gtk_list_store_set(list_store, &iter, 0, is_enabled, 1, g_strdup("output"), 2, g_strdup(*specifier), -1); } /* input */ pthread_mutex_lock(audio_mutex); specifier = ags_automation_get_specifier_unique_with_channel_type(machine->audio->automation, AGS_TYPE_INPUT); pthread_mutex_unlock(audio_mutex); for(; *specifier != NULL; specifier++){ gboolean is_enabled; gtk_list_store_append(list_store, &iter); is_enabled = (ags_machine_automation_port_find_channel_type_with_control_name(machine->enabled_automation_port, AGS_TYPE_INPUT, *specifier)) ? TRUE: FALSE; gtk_list_store_set(list_store, &iter, 0, is_enabled, 1, g_strdup("input"), 2, g_strdup(*specifier), -1); } gtk_list_store_append(list_store, &iter); gtk_list_store_set(list_store, &iter, 0, FALSE, 1, g_strdup(""), 2, g_strdup(""), -1); gtk_combo_box_set_active_iter(automation_toolbar->port, &iter); } /** * ags_automation_toolbar_apply_port: * @automation_toolbar: an #AgsAutomationToolbar * @channel_type: the #GType of channel * @control_name: the specifier as string * @port: the #AgsPort * * Applies all port to appropriate #AgsMachine. * * Since: 1.3.0 */ void ags_automation_toolbar_apply_port(AgsAutomationToolbar *automation_toolbar, GType channel_type, gchar *control_name) { AgsAutomationEditor *automation_editor; AgsMachine *machine; GtkTreeModel *model; GtkTreeIter iter; AgsMutexManager *mutex_manager; GList *automation; guint length; gboolean contains_specifier; gboolean is_active; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(!g_ascii_strncasecmp(control_name, "", 1)){ return; } automation_editor = (AgsAutomationEditor *) gtk_widget_get_ancestor((GtkWidget *) automation_toolbar, AGS_TYPE_AUTOMATION_EDITOR); machine = automation_editor->selected_machine; model = gtk_combo_box_get_model(automation_toolbar->port); /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* update port combo box */ contains_specifier = FALSE; if(gtk_combo_box_get_active_iter(automation_toolbar->port, &iter)){ GType scope; gchar *str, *specifier; GValue value = {0,}; gtk_tree_model_get(model, &iter, 1, &str, 2, &specifier, -1); if(!g_ascii_strcasecmp("audio", str)){ scope = G_TYPE_NONE; }else if(!g_ascii_strcasecmp("output", str)){ scope = AGS_TYPE_OUTPUT; }else if(!g_ascii_strcasecmp("input", str)){ scope = AGS_TYPE_INPUT; } if(scope == channel_type && !g_ascii_strcasecmp(specifier, control_name)){ gtk_tree_model_get_value(model, &iter, 0, &value); if(g_value_get_boolean(&value)){ g_value_set_boolean(&value, FALSE); }else{ g_value_set_boolean(&value, TRUE); contains_specifier = TRUE; } gtk_list_store_set_value(GTK_LIST_STORE(model), &iter, 0, &value); } } /* add/remove enabled automation port */ if(contains_specifier){ machine->enabled_automation_port = g_list_prepend(machine->enabled_automation_port, ags_machine_automation_port_alloc(channel_type, control_name)); }else{ machine->enabled_automation_port = g_list_delete_link(machine->enabled_automation_port, ags_machine_automation_port_find_channel_type_with_control_name(machine->enabled_automation_port, channel_type, control_name)); } /* apply */ if(contains_specifier){ AgsAutomationEdit *automation_edit; AgsScale *scale; GList *automation; gboolean create_audio_automation_edit; gboolean create_output_automation_edit; gboolean create_input_automation_edit; /* audio */ pthread_mutex_lock(audio_mutex); create_audio_automation_edit = ((automation = ags_automation_find_specifier_with_type_and_line(machine->audio->automation, control_name, channel_type, 0)) != NULL) ? TRUE: FALSE; pthread_mutex_unlock(audio_mutex); if(create_audio_automation_edit){ /* scale */ scale = ags_scale_new(); pthread_mutex_lock(audio_mutex); g_object_set(scale, "control-name", AGS_AUTOMATION(automation->data)->control_name, "upper", AGS_AUTOMATION(automation->data)->upper, "lower", AGS_AUTOMATION(automation->data)->lower, "default-value", AGS_AUTOMATION(automation->data)->default_value, NULL); pthread_mutex_unlock(audio_mutex); if(channel_type == G_TYPE_NONE){ gtk_box_pack_start(automation_editor->audio_scrolled_scale_box->scale_box, scale, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); }else if(channel_type == AGS_TYPE_OUTPUT){ gtk_box_pack_start(automation_editor->output_scrolled_scale_box->scale_box, scale, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); }else if(channel_type == AGS_TYPE_INPUT){ gtk_box_pack_start(automation_editor->input_scrolled_scale_box->scale_box, scale, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); } gtk_widget_show(scale); /* automation edit */ automation_edit = ags_automation_edit_new(); pthread_mutex_lock(audio_mutex); g_object_set(automation_edit, "channel-type", channel_type, "control-specifier", control_name, "control-name", AGS_AUTOMATION(automation->data)->control_name, "upper", AGS_AUTOMATION(automation->data)->upper, "lower", AGS_AUTOMATION(automation->data)->lower, "default-value", AGS_AUTOMATION(automation->data)->default_value, NULL); pthread_mutex_unlock(audio_mutex); if(channel_type == G_TYPE_NONE){ gtk_box_pack_start(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box, automation_edit, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); }else if(channel_type == AGS_TYPE_OUTPUT){ gtk_box_pack_start(automation_editor->output_scrolled_automation_edit_box->automation_edit_box, automation_edit, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); }else if(channel_type == AGS_TYPE_INPUT){ gtk_box_pack_start(automation_editor->input_scrolled_automation_edit_box->automation_edit_box, automation_edit, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); } ags_connectable_connect(AGS_CONNECTABLE(automation_edit)); gtk_widget_show(automation_edit); if(channel_type == G_TYPE_NONE){ g_signal_connect_after((GObject *) automation_edit->hscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_audio_automation_edit_hscrollbar_value_changed), (gpointer) automation_editor); }else if(channel_type == AGS_TYPE_OUTPUT){ g_signal_connect_after((GObject *) automation_edit->hscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_output_automation_edit_hscrollbar_value_changed), (gpointer) automation_editor); }else if(channel_type == AGS_TYPE_INPUT){ g_signal_connect_after((GObject *) automation_edit->hscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_input_automation_edit_hscrollbar_value_changed), (gpointer) automation_editor); } } /* unset bypass */ pthread_mutex_lock(audio_mutex); automation = machine->audio->automation; while((automation = ags_automation_find_channel_type_with_control_name(automation, channel_type, control_name)) != NULL){ AGS_AUTOMATION(automation->data)->flags &= (~AGS_AUTOMATION_BYPASS); automation = automation->next; } pthread_mutex_unlock(audio_mutex); }else{ GList *list_start, *list; gint nth; gboolean success; /* audio */ nth = -1; success = FALSE; list = list_start = NULL; if(channel_type == G_TYPE_NONE){ list = list_start = gtk_container_get_children(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box); }else if(channel_type == AGS_TYPE_OUTPUT){ list = list_start = gtk_container_get_children(automation_editor->output_scrolled_automation_edit_box->automation_edit_box); }else if(channel_type == AGS_TYPE_INPUT){ list = list_start = gtk_container_get_children(automation_editor->input_scrolled_automation_edit_box->automation_edit_box); } while(list != NULL){ nth++; if(AGS_AUTOMATION_EDIT(list->data)->channel_type == channel_type && !g_strcmp0(AGS_AUTOMATION_EDIT(list->data)->control_name, control_name)){ gtk_widget_destroy(list->data); success = TRUE; break; } list = list->next; } g_list_free(list_start); if(success){ if(channel_type == G_TYPE_NONE){ list_start = gtk_container_get_children(automation_editor->audio_scrolled_scale_box->scale_box); }else if(channel_type == AGS_TYPE_OUTPUT){ list_start = gtk_container_get_children(automation_editor->output_scrolled_scale_box->scale_box); }else if(channel_type == AGS_TYPE_INPUT){ list_start = gtk_container_get_children(automation_editor->input_scrolled_scale_box->scale_box); } list = g_list_nth(list_start, nth); gtk_widget_destroy(list->data); g_list_free(list_start); } /* set bypass */ pthread_mutex_lock(audio_mutex); automation = machine->audio->automation; while((automation = ags_automation_find_channel_type_with_control_name(automation, channel_type, control_name)) != NULL){ AGS_AUTOMATION(automation->data)->flags |= AGS_AUTOMATION_BYPASS; automation = automation->next; } pthread_mutex_unlock(audio_mutex); } } /** * ags_automation_toolbar_tool_popup_new: * * Create a new #GtkMenu suitable for menu tool button. * * Returns: a new #GtkMenu * * Since: 1.0.0 */ GtkMenu* ags_automation_toolbar_tool_popup_new(GtkToolbar *automation_toolbar) { GtkMenu *tool_popup; GtkMenuItem *item; GList *list, *list_start; tool_popup = (GtkMenu *) gtk_menu_new(); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("select accelerations")); gtk_menu_shell_append((GtkMenuShell *) tool_popup, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("ramp accelerations")); gtk_menu_shell_append((GtkMenuShell *) tool_popup, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("position cursor")); gtk_menu_shell_append((GtkMenuShell *) tool_popup, (GtkWidget *) item); /* connect */ list_start = list = gtk_container_get_children((GtkContainer *) tool_popup); g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_automation_toolbar_tool_popup_select_acceleration_callback), (gpointer) automation_toolbar); list = list->next; g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_automation_toolbar_tool_popup_ramp_acceleration_callback), (gpointer) automation_toolbar); list = list->next; g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_automation_toolbar_tool_popup_position_cursor_callback), (gpointer) automation_toolbar); g_list_free(list_start); /* show */ gtk_widget_show_all((GtkWidget *) tool_popup); return(tool_popup); } /** * ags_automation_toolbar_new: * * Create a new #AgsAutomationToolbar. * * Returns: a new #AgsAutomationToolbar * * Since: 1.0.0 */ AgsAutomationToolbar* ags_automation_toolbar_new() { AgsAutomationToolbar *automation_toolbar; automation_toolbar = (AgsAutomationToolbar *) g_object_new(AGS_TYPE_AUTOMATION_TOOLBAR, NULL); return(automation_toolbar); } gsequencer-1.4.24/ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c0000644000175000017500000000264013247044247025161 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_position_automation_cursor_dialog_response_callback(GtkWidget *dialog, gint response, AgsPositionAutomationCursorDialog *position_automation_cursor_dialog) { gboolean hide_dialog; hide_dialog = TRUE; switch(response){ case GTK_RESPONSE_APPLY: { hide_dialog = FALSE; } case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(position_automation_cursor_dialog)); } case GTK_RESPONSE_CANCEL: { if(hide_dialog){ gtk_widget_hide(position_automation_cursor_dialog); } } } } gsequencer-1.4.24/ags/X/editor/ags_machine_radio_button.h0000644000175000017500000000416313246707333020327 00000000000000/* 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 . */ #ifndef __AGS_MACHINE_RADIO_BUTTON_H__ #define __AGS_MACHINE_RADIO_BUTTON_H__ #include #include #include #include #define AGS_TYPE_MACHINE_RADIO_BUTTON (ags_machine_radio_button_get_type()) #define AGS_MACHINE_RADIO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MACHINE_RADIO_BUTTON, AgsMachineRadioButton)) #define AGS_MACHINE_RADIO_BUTTON_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MACHINE_RADIO_BUTTON, AgsMachineRadioButtonClass)) #define AGS_IS_MACHINE_RADIO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MACHINE_RADIO_BUTTON)) #define AGS_IS_MACHINE_RADIO_BUTTON_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MACHINE_RADIO_BUTTON)) #define AGS_MACHINE_RADIO_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_MACHINE_RADIO_BUTTON, AgsMachineRadioButtonClass)) typedef struct _AgsMachineRadioButton AgsMachineRadioButton; typedef struct _AgsMachineRadioButtonClass AgsMachineRadioButtonClass; struct _AgsMachineRadioButton { GtkRadioButton radio_button; AgsMachine *machine; }; struct _AgsMachineRadioButtonClass { GtkRadioButtonClass radio_button; }; GType ags_machine_radio_button_get_type(void); AgsMachineRadioButton* ags_machine_radio_button_new(); #endif /*__AGS_MACHINE_RADIO_BUTTON_H__*/ gsequencer-1.4.24/ags/X/editor/ags_machine_radio_button_callbacks.c0000644000175000017500000000225313246707333022317 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_machine_radio_button_notify_machine_name_callback(GObject *machine, GParamSpec *pspec, AgsMachineRadioButton *machine_radio_button) { gchar *str; str = g_strdup_printf("%s: %s", G_OBJECT_TYPE_NAME(machine), AGS_MACHINE(machine)->machine_name); g_object_set(machine_radio_button, "label", str, NULL); g_free(str); } gsequencer-1.4.24/ags/X/editor/ags_notation_edit_callbacks.c0000644000175000017500000006237413247044247021013 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include gboolean ags_notation_edit_drawing_area_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsNotationEdit *notation_edit) { ags_notation_edit_reset_vscrollbar(notation_edit); ags_notation_edit_reset_hscrollbar(notation_edit); ags_notation_edit_draw(notation_edit); return(TRUE); } gboolean ags_notation_edit_drawing_area_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsNotationEdit *notation_edit) { ags_notation_edit_reset_vscrollbar(notation_edit); ags_notation_edit_reset_hscrollbar(notation_edit); ags_notation_edit_draw(notation_edit); return(FALSE); } gboolean ags_notation_edit_drawing_area_button_press_event(GtkWidget *widget, GdkEventButton *event, AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; AgsMachine *machine; auto void ags_notation_edit_drawing_area_button_press_position_cursor(); auto void ags_notation_edit_drawing_area_button_press_add_note(); auto void ags_notation_edit_drawing_area_button_press_select_note(); void ags_notation_edit_drawing_area_button_press_position_cursor() { double zoom_factor; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* cursor position */ notation_edit->cursor_position_x = (guint) (zoom_factor * (event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value)) / notation_edit->control_width; notation_edit->cursor_position_x = zoom_factor * floor(notation_edit->cursor_position_x / zoom_factor); notation_edit->cursor_position_y = (guint) ((event->y + GTK_RANGE(notation_edit->vscrollbar)->adjustment->value) / notation_edit->control_height); /* queue draw */ gtk_widget_queue_draw(notation_edit); } void ags_notation_edit_drawing_area_button_press_add_note() { AgsNote *note; double zoom_factor; note = ags_note_new(); /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* note */ note->x[0] = (guint) (zoom_factor * (event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value)) / notation_edit->control_width; note->x[0] = zoom_factor * floor(note->x[0] / zoom_factor); if((AGS_NOTATION_EDITOR_PATTERN_MODE & (notation_editor->flags)) == 0){ note->x[1] = note->x[0] + zoom_factor; }else{ note->x[1] = note->x[0] + 1; } note->y = (guint) ((event->y + GTK_RANGE(notation_edit->vscrollbar)->adjustment->value) / notation_edit->control_height); /* current note */ if(notation_edit->current_note != NULL){ g_object_unref(notation_edit->current_note); notation_edit->current_note = NULL; } notation_edit->current_note = note; g_object_ref(note); /* queue draw */ gtk_widget_queue_draw(notation_edit); } void ags_notation_edit_drawing_area_button_press_select_note() { notation_edit->selection_x0 = (guint) event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value; notation_edit->selection_x1 = notation_edit->selection_x0; notation_edit->selection_y0 = (guint) event->y + GTK_RANGE(notation_edit->vscrollbar)->adjustment->value; notation_edit->selection_y1 = notation_edit->selection_y0; gtk_widget_queue_draw(notation_edit); } notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(notation_edit), AGS_TYPE_NOTATION_EDITOR); notation_toolbar = notation_editor->notation_toolbar; gtk_widget_grab_focus((GtkWidget *) notation_edit->drawing_area); if((machine = notation_editor->selected_machine) != NULL && event->button == 1){ notation_edit->button_mask |= AGS_NOTATION_EDIT_BUTTON_1; if(notation_toolbar->selected_edit_mode == notation_toolbar->position){ notation_edit->mode = AGS_NOTATION_EDIT_POSITION_CURSOR; ags_notation_edit_drawing_area_button_press_position_cursor(); }else if(notation_toolbar->selected_edit_mode == notation_toolbar->edit){ notation_edit->mode = AGS_NOTATION_EDIT_ADD_NOTE; ags_notation_edit_drawing_area_button_press_add_note(); }else if(notation_toolbar->selected_edit_mode == notation_toolbar->clear){ notation_edit->mode = AGS_NOTATION_EDIT_DELETE_NOTE; //NOTE:JK: only takes action on release }else if(notation_toolbar->selected_edit_mode == notation_toolbar->select){ notation_edit->mode = AGS_NOTATION_EDIT_SELECT_NOTE; ags_notation_edit_drawing_area_button_press_select_note(); } } return(TRUE); } gboolean ags_notation_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButton *event, AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; AgsMachine *machine; auto void ags_notation_edit_drawing_area_button_release_position_cursor(); auto void ags_notation_edit_drawing_area_button_release_add_note(); auto void ags_notation_edit_drawing_area_button_release_delete_note(); auto void ags_notation_edit_drawing_area_button_release_select_note(); void ags_notation_edit_drawing_area_button_release_position_cursor() { double zoom_factor; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* cursor position */ notation_edit->cursor_position_x = (guint) (zoom_factor * (event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value)) / notation_edit->control_width; notation_edit->cursor_position_x = zoom_factor * floor(notation_edit->cursor_position_x / zoom_factor); notation_edit->cursor_position_y = (guint) ((event->y + GTK_RANGE(notation_edit->vscrollbar)->adjustment->value) / notation_edit->control_height); /* queue draw */ gtk_widget_queue_draw(notation_edit); } void ags_notation_edit_drawing_area_button_release_add_note() { AgsNote *note; double zoom_factor; guint new_x; note = notation_edit->current_note; if(note == NULL){ return; } /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* new x[1] */ if((AGS_NOTATION_EDITOR_PATTERN_MODE & (notation_editor->flags)) == 0){ new_x = (guint) (zoom_factor * (event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value)) / notation_edit->control_width; new_x = zoom_factor * floor((new_x + zoom_factor) / zoom_factor); if(new_x >= note->x[0] + zoom_factor){ note->x[1] = new_x; } }else{ note->x[1] = note->x[0] + 1; } #ifdef AGS_DEBUG g_message("%lu-%lu %lu", note->x[0], note->x[1], note->y); #endif /* add note */ ags_notation_editor_add_note(notation_editor, note); notation_edit->current_note = NULL; g_object_unref(note); } void ags_notation_edit_drawing_area_button_release_delete_note() { double zoom_factor; guint x, y; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* note */ x = (guint) (zoom_factor * (event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value)) / notation_edit->control_width; x = zoom_factor * floor(x / zoom_factor); y = (guint) ((event->y + GTK_RANGE(notation_edit->vscrollbar)->adjustment->value) / notation_edit->control_height); /* delete note */ ags_notation_editor_delete_note(notation_editor, x, y); } void ags_notation_edit_drawing_area_button_release_select_note() { double zoom_factor; guint x0, x1, y0, y1; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* region */ x0 = (guint) (zoom_factor * notation_edit->selection_x0) / notation_edit->control_width; y0 = (guint) (notation_edit->selection_y0 / notation_edit->control_height); x1 = (guint) (zoom_factor * (event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value)) / notation_edit->control_width; y1 = (guint) ((event->y + GTK_RANGE(notation_edit->vscrollbar)->adjustment->value) / notation_edit->control_height); /* select region */ ags_notation_editor_select_region(notation_editor, x0, y0, x1, y1); } notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(notation_edit), AGS_TYPE_NOTATION_EDITOR); notation_toolbar = notation_editor->notation_toolbar; if((machine = notation_editor->selected_machine) != NULL && event->button == 1){ notation_edit->button_mask &= (~AGS_NOTATION_EDIT_BUTTON_1); if(notation_edit->mode == AGS_NOTATION_EDIT_POSITION_CURSOR){ ags_notation_edit_drawing_area_button_release_position_cursor(); // notation_edit->mode = AGS_NOTATION_EDIT_NO_EDIT_MODE; }else if(notation_edit->mode == AGS_NOTATION_EDIT_ADD_NOTE){ ags_notation_edit_drawing_area_button_release_add_note(); notation_edit->mode = AGS_NOTATION_EDIT_NO_EDIT_MODE; }else if(notation_edit->mode == AGS_NOTATION_EDIT_DELETE_NOTE){ ags_notation_edit_drawing_area_button_release_delete_note(); notation_edit->mode = AGS_NOTATION_EDIT_NO_EDIT_MODE; }else if(notation_edit->mode == AGS_NOTATION_EDIT_SELECT_NOTE){ ags_notation_edit_drawing_area_button_release_select_note(); notation_edit->mode = AGS_NOTATION_EDIT_NO_EDIT_MODE; } } return(FALSE); } gboolean ags_notation_edit_drawing_area_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; AgsMachine *machine; auto void ags_notation_edit_drawing_area_motion_notify_position_cursor(); auto void ags_notation_edit_drawing_area_motion_notify_add_note(); auto void ags_notation_edit_drawing_area_motion_notify_select_note(); void ags_notation_edit_drawing_area_motion_notify_position_cursor() { double zoom_factor; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* cursor position */ notation_edit->cursor_position_x = (guint) (zoom_factor * (event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value)) / notation_edit->control_width; notation_edit->cursor_position_x = zoom_factor * floor(notation_edit->cursor_position_x / zoom_factor); notation_edit->cursor_position_y = (guint) ((event->y + GTK_RANGE(notation_edit->vscrollbar)->adjustment->value) / notation_edit->control_height); #ifdef AGS_DEBUG g_message("%lu %lu", notation_edit->cursor_position_x, notation_edit->cursor_position_y); #endif /* queue draw */ gtk_widget_queue_draw(notation_edit); } void ags_notation_edit_drawing_area_motion_notify_add_note() { AgsNote *note; double zoom_factor; guint new_x; note = notation_edit->current_note; if(note == NULL){ return; } /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* new x[1] */ if((AGS_NOTATION_EDITOR_PATTERN_MODE & (notation_editor->flags)) == 0){ new_x = (guint) (zoom_factor * (event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value)) / notation_edit->control_width; new_x = zoom_factor * floor((new_x + zoom_factor) / zoom_factor); if(new_x >= note->x[0] + zoom_factor){ note->x[1] = new_x; } }else{ note->x[1] = note->x[0] + 1; } #ifdef AGS_DEBUG g_message("%lu-%lu %lu", note->x[0], note->x[1], note->y); #endif /* queue draw */ gtk_widget_queue_draw(notation_edit); } void ags_notation_edit_drawing_area_motion_notify_select_note() { if(event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value >= 0.0){ notation_edit->selection_x1 = (guint) event->x + GTK_RANGE(notation_edit->hscrollbar)->adjustment->value; }else{ notation_edit->selection_x1 = 0.0; } if(event->y + GTK_RANGE(notation_edit->vscrollbar)->adjustment->value >= 0.0){ notation_edit->selection_y1 = (guint) event->y + GTK_RANGE(notation_edit->vscrollbar)->adjustment->value; }else{ notation_edit->selection_y1 = 0.0; } gtk_widget_queue_draw(notation_edit); } notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(notation_edit), AGS_TYPE_NOTATION_EDITOR); notation_toolbar = notation_editor->notation_toolbar; gtk_widget_grab_focus((GtkWidget *) notation_edit->drawing_area); if((machine = notation_editor->selected_machine) != NULL && (AGS_NOTATION_EDIT_BUTTON_1 & (notation_edit->button_mask)) != 0){ if(notation_edit->mode == AGS_NOTATION_EDIT_POSITION_CURSOR){ ags_notation_edit_drawing_area_motion_notify_position_cursor(); }else if(notation_edit->mode == AGS_NOTATION_EDIT_ADD_NOTE){ ags_notation_edit_drawing_area_motion_notify_add_note(); }else if(notation_edit->mode == AGS_NOTATION_EDIT_DELETE_NOTE){ //NOTE:JK: only takes action on release }else if(notation_edit->mode == AGS_NOTATION_EDIT_SELECT_NOTE){ ags_notation_edit_drawing_area_motion_notify_select_note(); } } return(FALSE); } gboolean ags_notation_edit_drawing_area_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; AgsMachine *machine; gboolean retval; if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ retval = FALSE; }else{ retval = TRUE; } notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(notation_edit), AGS_TYPE_NOTATION_EDITOR); machine = notation_editor->selected_machine; if(machine != NULL){ switch(event->keyval){ case GDK_KEY_Control_L: { notation_edit->key_mask |= AGS_NOTATION_EDIT_KEY_L_CONTROL; } break; case GDK_KEY_Control_R: { notation_edit->key_mask |= AGS_NOTATION_EDIT_KEY_R_CONTROL; } break; case GDK_KEY_Shift_L: { notation_edit->key_mask |= AGS_NOTATION_EDIT_KEY_L_SHIFT; } break; case GDK_KEY_Shift_R: { notation_edit->key_mask |= AGS_NOTATION_EDIT_KEY_R_SHIFT; } break; case GDK_KEY_a: { /* select all notes */ if((AGS_NOTATION_EDIT_KEY_L_CONTROL & (notation_edit->key_mask)) != 0 || (AGS_NOTATION_EDIT_KEY_R_CONTROL & (notation_edit->key_mask)) != 0){ ags_notation_editor_select_all(notation_editor); } } break; case GDK_KEY_c: { /* copy notes */ if((AGS_NOTATION_EDIT_KEY_L_CONTROL & (notation_edit->key_mask)) != 0 || (AGS_NOTATION_EDIT_KEY_R_CONTROL & (notation_edit->key_mask)) != 0){ ags_notation_editor_copy(notation_editor); } } break; case GDK_KEY_v: { /* paste notes */ if((AGS_NOTATION_EDIT_KEY_L_CONTROL & (notation_edit->key_mask)) != 0 || (AGS_NOTATION_EDIT_KEY_R_CONTROL & (notation_edit->key_mask)) != 0){ ags_notation_editor_paste(notation_editor); } } break; case GDK_KEY_x: { /* cut notes */ if((AGS_NOTATION_EDIT_KEY_L_CONTROL & (notation_edit->key_mask)) != 0 || (AGS_NOTATION_EDIT_KEY_R_CONTROL & (notation_edit->key_mask)) != 0){ ags_notation_editor_cut(notation_editor); } } break; case GDK_KEY_i: { /* invert notes */ if((AGS_NOTATION_EDIT_KEY_L_CONTROL & (notation_edit->key_mask)) != 0 || (AGS_NOTATION_EDIT_KEY_R_CONTROL & (notation_edit->key_mask)) != 0){ ags_notation_editor_invert(notation_editor); } } break; } } return(retval); } gboolean ags_notation_edit_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; AgsMachine *machine; AgsMutexManager *mutex_manager; double zoom_factor; gint i; gboolean retval; gboolean do_feedback; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor(GTK_WIDGET(notation_edit), AGS_TYPE_NOTATION_EDITOR); notation_toolbar = notation_editor->notation_toolbar; machine = notation_editor->selected_machine; if(event->keyval == GDK_KEY_Tab || event->keyval == GDK_ISO_Left_Tab || event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R || event->keyval == GDK_KEY_Alt_L || event->keyval == GDK_KEY_Alt_R || event->keyval == GDK_KEY_Control_L || event->keyval == GDK_KEY_Control_R ){ retval = FALSE; }else{ retval = TRUE; } if(machine != NULL){ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* do feedback - initial set */ do_feedback = FALSE; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* check key value */ switch(event->keyval){ case GDK_KEY_Control_L: { notation_edit->key_mask &= (~AGS_NOTATION_EDIT_KEY_L_CONTROL); } break; case GDK_KEY_Control_R: { notation_edit->key_mask &= (~AGS_NOTATION_EDIT_KEY_R_CONTROL); } break; case GDK_KEY_Shift_L: { notation_edit->key_mask &= (~AGS_NOTATION_EDIT_KEY_L_SHIFT); } break; case GDK_KEY_Shift_R: { notation_edit->key_mask &= (~AGS_NOTATION_EDIT_KEY_R_SHIFT); } break; case GDK_KEY_Left: case GDK_KEY_leftarrow: { if((AGS_NOTATION_EDIT_KEY_L_SHIFT & (notation_edit->key_mask)) != 0 || (AGS_NOTATION_EDIT_KEY_R_SHIFT & (notation_edit->key_mask)) != 0){ AgsTimestamp *timestamp; if((AGS_NOTATION_EDITOR_PATTERN_MODE & (notation_editor->flags)) != 0){ return(retval); } /* shrink note */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(notation_edit->cursor_position_x / AGS_NOTATION_DEFAULT_OFFSET); i = 0; do_feedback = TRUE; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ GList *list_notation; pthread_mutex_lock(audio_mutex); list_notation = ags_notation_find_near_timestamp(machine->audio->notation, i, timestamp); if(list_notation != NULL){ AgsNote *note; note = ags_notation_find_point(AGS_NOTATION(list_notation->data), notation_edit->cursor_position_x, notation_edit->cursor_position_y, FALSE); if(note != NULL && note->x[1] - note->x[0] - zoom_factor >= zoom_factor){ note->x[1] -= zoom_factor; } } pthread_mutex_unlock(audio_mutex); i++; } g_object_unref(timestamp); }else{ gdouble x0_offset; /* position cursor */ if(notation_edit->cursor_position_x > 0){ if(notation_edit->cursor_position_x - (zoom_factor) > 0){ notation_edit->cursor_position_x -= (zoom_factor); }else{ notation_edit->cursor_position_x = 0; } do_feedback = TRUE; } x0_offset = notation_edit->cursor_position_x * notation_edit->control_width; if(x0_offset < GTK_RANGE(notation_edit->hscrollbar)->adjustment->value){ gtk_range_set_value(GTK_RANGE(notation_edit->hscrollbar), x0_offset); } } } break; case GDK_KEY_Right: case GDK_KEY_rightarrow: { if((AGS_NOTATION_EDIT_KEY_L_SHIFT & (notation_edit->key_mask)) != 0 || (AGS_NOTATION_EDIT_KEY_R_SHIFT & (notation_edit->key_mask)) != 0){ AgsTimestamp *timestamp; if((AGS_NOTATION_EDITOR_PATTERN_MODE & (notation_editor->flags)) != 0){ return(retval); } /* shrink note */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(notation_edit->cursor_position_x / AGS_NOTATION_DEFAULT_OFFSET); i = 0; do_feedback = TRUE; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ GList *list_notation; pthread_mutex_lock(audio_mutex); list_notation = ags_notation_find_near_timestamp(machine->audio->notation, i, timestamp); if(list_notation != NULL){ AgsNote *note; note = ags_notation_find_point(AGS_NOTATION(list_notation->data), notation_edit->cursor_position_x, notation_edit->cursor_position_y, FALSE); if(note != NULL){ note->x[1] += zoom_factor; } } pthread_mutex_unlock(audio_mutex); i++; } g_object_unref(timestamp); }else{ gdouble x0_offset; /* position cursor */ if(notation_edit->cursor_position_x < AGS_NOTATION_EDITOR_MAX_CONTROLS){ notation_edit->cursor_position_x += (zoom_factor); do_feedback = TRUE; } x0_offset = notation_edit->cursor_position_x * notation_edit->control_width; if(x0_offset + notation_edit->control_width > GTK_RANGE(notation_edit->hscrollbar)->adjustment->value + GTK_WIDGET(notation_edit->drawing_area)->allocation.width){ gtk_range_set_value(GTK_RANGE(notation_edit->hscrollbar), x0_offset); } } } break; case GDK_KEY_Up: case GDK_KEY_uparrow: { gdouble y0_offset; if(notation_edit->cursor_position_y > 0){ notation_edit->cursor_position_y -= 1; do_feedback = TRUE; } y0_offset = notation_edit->cursor_position_y * notation_edit->control_height; if(y0_offset < GTK_RANGE(notation_edit->vscrollbar)->adjustment->value){ gtk_range_set_value(GTK_RANGE(notation_edit->vscrollbar), y0_offset); } } break; case GDK_KEY_Down: case GDK_KEY_downarrow: { gdouble y0_offset; if(notation_edit->cursor_position_y > 0){ notation_edit->cursor_position_y -= 1; do_feedback = TRUE; } y0_offset = notation_edit->cursor_position_y * notation_edit->control_height; if(y0_offset < GTK_RANGE(notation_edit->vscrollbar)->adjustment->value){ gtk_range_set_value(GTK_RANGE(notation_edit->vscrollbar), y0_offset); } } break; case GDK_KEY_space: { AgsNote *note; do_feedback = TRUE; note = ags_note_new(); note->x[0] = notation_edit->cursor_position_x; if((AGS_NOTATION_EDITOR_PATTERN_MODE & (notation_editor->flags)) == 0){ note->x[1] = notation_edit->cursor_position_x + zoom_factor; }else{ note->x[1] = note->x[0] + 1; } note->y = notation_edit->cursor_position_y; /* add note */ ags_notation_editor_add_note(notation_editor, note); } break; case GDK_KEY_Delete: { /* delete note */ ags_notation_editor_delete_note(notation_editor, notation_edit->cursor_position_x, notation_edit->cursor_position_y); } break; } gtk_widget_queue_draw(notation_edit); /* do feedback */ if(do_feedback){ ags_notation_editor_do_feedback(notation_editor); } } return(retval); } void ags_notation_edit_vscrollbar_value_changed(GtkRange *range, AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; GtkAdjustment *piano_adjustment; notation_editor = gtk_widget_get_ancestor(notation_edit, AGS_TYPE_NOTATION_EDITOR); g_object_get(notation_editor->scrolled_piano->viewport, "vadjustment", &piano_adjustment, NULL); gtk_adjustment_set_value(piano_adjustment, range->adjustment->value); gtk_widget_queue_draw(notation_editor->scrolled_piano->piano); /* queue draw */ gtk_widget_queue_draw(notation_edit->drawing_area); } void ags_notation_edit_hscrollbar_value_changed(GtkRange *range, AgsNotationEdit *notation_edit) { gdouble value; value = GTK_RANGE(notation_edit->hscrollbar)->adjustment->value / 64.0; gtk_adjustment_set_value(notation_edit->ruler->adjustment, value); gtk_widget_queue_draw(notation_edit->ruler); /* queue draw */ gtk_widget_queue_draw(notation_edit->drawing_area); } gsequencer-1.4.24/ags/X/editor/ags_notation_edit.c0000644000175000017500000014552613247044247017015 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include static GType ags_accessible_notation_edit_get_type(void); void ags_notation_edit_class_init(AgsNotationEditClass *notation_edit); void ags_accessible_notation_edit_class_init(AtkObject *object); void ags_accessible_notation_edit_action_interface_init(AtkActionIface *action); void ags_notation_edit_connectable_interface_init(AgsConnectableInterface *connectable); void ags_notation_edit_init(AgsNotationEdit *notation_edit); void ags_notation_edit_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_notation_edit_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_notation_edit_connect(AgsConnectable *connectable); void ags_notation_edit_disconnect(AgsConnectable *connectable); AtkObject* ags_notation_edit_get_accessible(GtkWidget *widget); void ags_notation_edit_finalize(GObject *gobject); gboolean ags_accessible_notation_edit_do_action(AtkAction *action, gint i); gint ags_accessible_notation_edit_get_n_actions(AtkAction *action); const gchar* ags_accessible_notation_edit_get_description(AtkAction *action, gint i); const gchar* ags_accessible_notation_edit_get_name(AtkAction *action, gint i); const gchar* ags_accessible_notation_edit_get_keybinding(AtkAction *action, gint i); gboolean ags_accessible_notation_edit_set_description(AtkAction *action, gint i); gchar* ags_accessible_notation_edit_get_localized_name(AtkAction *action, gint i); void ags_notation_edit_show(GtkWidget *widget); void ags_notation_edit_show_all(GtkWidget *widget); gboolean ags_notation_edit_auto_scroll_timeout(GtkWidget *widget); /** * SECTION:ags_notation_edit * @short_description: edit notes * @title: AgsNotationEdit * @section_id: * @include: ags/X/editor/ags_notation_edit.h * * The #AgsNotationEdit lets you edit notes. */ enum{ PROP_0, }; static gpointer ags_notation_edit_parent_class = NULL; static GQuark quark_accessible_object = 0; GtkStyle *notation_edit_style = NULL; GHashTable *ags_notation_edit_auto_scroll = NULL; GType ags_notation_edit_get_type(void) { static GType ags_type_notation_edit = 0; if(!ags_type_notation_edit){ static const GTypeInfo ags_notation_edit_info = { sizeof (AgsNotationEditClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_notation_edit_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsNotationEdit), 0, /* n_preallocs */ (GInstanceInitFunc) ags_notation_edit_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_notation_edit_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_notation_edit = g_type_register_static(GTK_TYPE_TABLE, "AgsNotationEdit", &ags_notation_edit_info, 0); g_type_add_interface_static(ags_type_notation_edit, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_notation_edit); } static GType ags_accessible_notation_edit_get_type(void) { static GType ags_type_accessible_notation_edit = 0; if(!ags_type_accessible_notation_edit){ const GTypeInfo ags_accesssible_notation_edit_info = { sizeof(GtkAccessibleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_accessible_notation_edit_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GtkAccessible), 0, /* n_preallocs */ NULL, NULL }; static const GInterfaceInfo atk_action_interface_info = { (GInterfaceInitFunc) ags_accessible_notation_edit_action_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_accessible_notation_edit = g_type_register_static(GTK_TYPE_ACCESSIBLE, "AgsAccessibleNotationEdit", &ags_accesssible_notation_edit_info, 0); g_type_add_interface_static(ags_type_accessible_notation_edit, ATK_TYPE_ACTION, &atk_action_interface_info); } return(ags_type_accessible_notation_edit); } void ags_notation_edit_class_init(AgsNotationEditClass *notation_edit) { GtkWidgetClass *widget; GObjectClass *gobject; GParamSpec *param_spec; ags_notation_edit_parent_class = g_type_class_peek_parent(notation_edit); /* GObjectClass */ gobject = G_OBJECT_CLASS(notation_edit); gobject->set_property = ags_notation_edit_set_property; gobject->get_property = ags_notation_edit_get_property; gobject->finalize = ags_notation_edit_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) notation_edit; widget->show = ags_notation_edit_show; widget->show_all = ags_notation_edit_show_all; } void ags_accessible_notation_edit_class_init(AtkObject *object) { quark_accessible_object = g_quark_from_static_string("ags-accessible-object"); } void ags_accessible_notation_edit_action_interface_init(AtkActionIface *action) { action->do_action = ags_accessible_notation_edit_do_action; action->get_n_actions = ags_accessible_notation_edit_get_n_actions; action->get_description = ags_accessible_notation_edit_get_description; action->get_name = ags_accessible_notation_edit_get_name; action->get_keybinding = ags_accessible_notation_edit_get_keybinding; action->set_description = ags_accessible_notation_edit_set_description; action->get_localized_name = ags_accessible_notation_edit_get_localized_name; } void ags_notation_edit_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_notation_edit_connect; connectable->disconnect = ags_notation_edit_disconnect; } void ags_notation_edit_init(AgsNotationEdit *notation_edit) { GtkAdjustment *adjustment; notation_edit->flags = (AGS_NOTATION_EDIT_SHOW_RULER | AGS_NOTATION_EDIT_SHOW_VSCROLLBAR | AGS_NOTATION_EDIT_SHOW_HSCROLLBAR); notation_edit->mode = AGS_NOTATION_EDIT_NO_EDIT_MODE; notation_edit->button_mask = 0; notation_edit->key_mask = 0; notation_edit->note_offset = 0; notation_edit->note_offset_absolute = 0; notation_edit->control_width = AGS_NOTATION_EDIT_DEFAULT_CONTROL_WIDTH; notation_edit->control_height = AGS_NOTATION_EDIT_DEFAULT_CONTROL_HEIGHT; notation_edit->control_margin_x = AGS_NOTATION_EDIT_DEFAULT_CONTROL_MARGIN_X; notation_edit->control_margin_y = AGS_NOTATION_EDIT_DEFAULT_CONTROL_MARGIN_Y; notation_edit->cursor_position_x = AGS_NOTATION_EDIT_DEFAULT_CURSOR_POSITION_X; notation_edit->cursor_position_y = AGS_NOTATION_EDIT_DEFAULT_CURSOR_POSITION_Y; notation_edit->selection_x0 = 0; notation_edit->selection_x1 = 0; notation_edit->selection_y0 = 0; notation_edit->selection_y1 = 0; notation_edit->current_note = NULL; if(notation_edit_style == NULL){ notation_edit_style = gtk_style_copy(gtk_widget_get_style(notation_edit)); } notation_edit->ruler = ags_ruler_new(); g_object_set(notation_edit->ruler, "no-show-all", TRUE, NULL); gtk_table_attach(GTK_TABLE(notation_edit), (GtkWidget *) notation_edit->ruler, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); notation_edit->drawing_area = gtk_drawing_area_new(); gtk_widget_set_events(GTK_WIDGET(notation_edit->drawing_area), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_CONTROL_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); gtk_widget_set_can_focus((GtkWidget *) notation_edit->drawing_area, TRUE); gtk_table_attach(GTK_TABLE(notation_edit), (GtkWidget *) notation_edit->drawing_area, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); /* vscrollbar */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, notation_edit->control_height, 1.0); notation_edit->vscrollbar = gtk_vscrollbar_new(adjustment); g_object_set(notation_edit->vscrollbar, "no-show-all", TRUE, NULL); gtk_table_attach(GTK_TABLE(notation_edit), (GtkWidget *) notation_edit->vscrollbar, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* hscrollbar */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, (gdouble) notation_edit->control_width, 1.0); notation_edit->hscrollbar = gtk_hscrollbar_new(adjustment); g_object_set(notation_edit->hscrollbar, "no-show-all", TRUE, NULL); gtk_table_attach(GTK_TABLE(notation_edit), (GtkWidget *) notation_edit->hscrollbar, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* auto-scroll */ if(ags_notation_edit_auto_scroll == NULL){ ags_notation_edit_auto_scroll = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_notation_edit_auto_scroll, notation_edit, ags_notation_edit_auto_scroll_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_notation_edit_auto_scroll_timeout, (gpointer) notation_edit); } void ags_notation_edit_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsNotationEdit *notation_edit; notation_edit = AGS_NOTATION_EDIT(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notation_edit_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsNotationEdit *notation_edit; notation_edit = AGS_NOTATION_EDIT(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notation_edit_connect(AgsConnectable *connectable) { AgsNotationEdit *notation_edit; notation_edit = AGS_NOTATION_EDIT(connectable); if((AGS_NOTATION_EDIT_CONNECTED & (notation_edit->flags)) != 0){ return; } notation_edit->flags |= AGS_NOTATION_EDIT_CONNECTED; /* drawing area */ g_signal_connect_after((GObject *) notation_edit->drawing_area, "expose_event", G_CALLBACK(ags_notation_edit_drawing_area_expose_event), (gpointer) notation_edit); g_signal_connect_after((GObject *) notation_edit->drawing_area, "configure_event", G_CALLBACK(ags_notation_edit_drawing_area_configure_event), (gpointer) notation_edit); g_signal_connect((GObject *) notation_edit->drawing_area, "button_press_event", G_CALLBACK(ags_notation_edit_drawing_area_button_press_event), (gpointer) notation_edit); g_signal_connect((GObject *) notation_edit->drawing_area, "button_release_event", G_CALLBACK(ags_notation_edit_drawing_area_button_release_event), (gpointer) notation_edit); g_signal_connect((GObject *) notation_edit->drawing_area, "motion_notify_event", G_CALLBACK(ags_notation_edit_drawing_area_motion_notify_event), (gpointer) notation_edit); g_signal_connect((GObject *) notation_edit->drawing_area, "key_press_event", G_CALLBACK(ags_notation_edit_drawing_area_key_press_event), (gpointer) notation_edit); g_signal_connect((GObject *) notation_edit->drawing_area, "key_release_event", G_CALLBACK(ags_notation_edit_drawing_area_key_release_event), (gpointer) notation_edit); /* scrollbars */ g_signal_connect_after((GObject *) notation_edit->vscrollbar, "value-changed", G_CALLBACK(ags_notation_edit_vscrollbar_value_changed), (gpointer) notation_edit); g_signal_connect_after((GObject *) notation_edit->hscrollbar, "value-changed", G_CALLBACK(ags_notation_edit_hscrollbar_value_changed), (gpointer) notation_edit); } void ags_notation_edit_disconnect(AgsConnectable *connectable) { AgsNotationEdit *notation_edit; notation_edit = AGS_NOTATION_EDIT(connectable); if((AGS_NOTATION_EDIT_CONNECTED & (notation_edit->flags)) == 0){ return; } notation_edit->flags &= (~AGS_NOTATION_EDIT_CONNECTED); /* drawing area */ g_object_disconnect(notation_edit->drawing_area, "any_signal::expose_event", G_CALLBACK(ags_notation_edit_drawing_area_expose_event), (gpointer) notation_edit, "any_signal::configure_event", G_CALLBACK(ags_notation_edit_drawing_area_configure_event), (gpointer) notation_edit, "any_signal::button_press_event", G_CALLBACK(ags_notation_edit_drawing_area_button_press_event), (gpointer) notation_edit, "any_signal::button_release_event", G_CALLBACK(ags_notation_edit_drawing_area_button_release_event), (gpointer) notation_edit, "any_signal::motion_notify_event", G_CALLBACK(ags_notation_edit_drawing_area_motion_notify_event), notation_edit, "any_signal::key_press_event", G_CALLBACK(ags_notation_edit_drawing_area_key_press_event), (gpointer) notation_edit, "any_signal::key_release_event", G_CALLBACK(ags_notation_edit_drawing_area_key_release_event), (gpointer) notation_edit, NULL); /* scrollbars */ g_object_disconnect(notation_edit->vscrollbar, "any_signal::value-changed", G_CALLBACK(ags_notation_edit_vscrollbar_value_changed), (gpointer) notation_edit, NULL); g_object_disconnect(notation_edit->hscrollbar, "any_signal::value-changed", G_CALLBACK(ags_notation_edit_hscrollbar_value_changed), (gpointer) notation_edit, NULL); } AtkObject* ags_notation_edit_get_accessible(GtkWidget *widget) { AtkObject* accessible; accessible = g_object_get_qdata(G_OBJECT(widget), quark_accessible_object); if(!accessible){ accessible = g_object_new(ags_accessible_notation_edit_get_type(), NULL); g_object_set_qdata(G_OBJECT(widget), quark_accessible_object, accessible); gtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), widget); } return(accessible); } void ags_notation_edit_finalize(GObject *gobject) { AgsNotationEdit *notation_edit; notation_edit = AGS_NOTATION_EDIT(gobject); /* remove auto scroll */ g_hash_table_remove(ags_notation_edit_auto_scroll, notation_edit); /* call parent */ G_OBJECT_CLASS(ags_notation_edit_parent_class)->finalize(gobject); } gboolean ags_accessible_notation_edit_do_action(AtkAction *action, gint i) { AgsNotationEdit *notation_edit; GdkEventKey *key_press, *key_release; GdkEventKey *modifier_press, *modifier_release; GdkEventKey *second_level_press, *second_level_release; if(!(i >= 0 && i < 13)){ return(FALSE); } notation_edit = gtk_accessible_get_widget(GTK_ACCESSIBLE(action)); key_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); key_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); /* create modifier */ modifier_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); modifier_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); modifier_press->keyval = modifier_release->keyval = GDK_KEY_Control_R; /* create second level */ second_level_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); second_level_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); second_level_press->keyval = second_level_release->keyval = GDK_KEY_Shift_R; switch(i){ case 0: { key_press->keyval = key_release->keyval = GDK_KEY_Left; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); } break; case 1: { key_press->keyval = key_release->keyval = GDK_KEY_Right; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); } break; case 2: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); } break; case 3: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); } break; case 4: { key_press->keyval = key_release->keyval = GDK_KEY_space; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); } break; case 5: { key_press->keyval = key_release->keyval = GDK_KEY_Left; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 6: { key_press->keyval = key_release->keyval = GDK_KEY_Right; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 7: { key_press->keyval = key_release->keyval = GDK_KEY_Delete; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); } break; case 8: { key_press->keyval = key_release->keyval = GDK_KEY_c; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 9: { key_press->keyval = key_release->keyval = GDK_KEY_x; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 10: { key_press->keyval = key_release->keyval = GDK_KEY_v; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 11: { key_press->keyval = key_release->keyval = GDK_KEY_a; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 12: { key_press->keyval = key_release->keyval = GDK_KEY_i; /* send event */ gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) notation_edit->drawing_area, (GdkEvent *) modifier_release); } break; } return(TRUE); } gint ags_accessible_notation_edit_get_n_actions(AtkAction *action) { return(13); } const gchar* ags_accessible_notation_edit_get_description(AtkAction *action, gint i) { static const gchar *actions[] = { "move cursor left", "move cursor right", "move cursor up", "move cursor down", "add audio note", "shrink audio note", "grow audio note", "remove audio note", "copy note to clipboard", "cut note to clipbaord", "paste note from clipboard", "select all note", "invert note", }; if(i >= 0 && i < 13){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_notation_edit_get_name(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "up", "down", "add", "shrink", "grow", "remove", "copy", "cut", "paste", "select-all", "invert", }; if(i >= 0 && i < 13){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_notation_edit_get_keybinding(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "up", "down", "space", "Shft+Left", "Shft+Right", "Del" "Ctrl+c" "Ctrl+x", "Ctrl+v", "Ctrl+a", "Ctrl+i", }; if(i >= 0 && i < 13){ return(actions[i]); }else{ return(NULL); } } gboolean ags_accessible_notation_edit_set_description(AtkAction *action, gint i) { //TODO:JK: implement me return(FALSE); } gchar* ags_accessible_notation_edit_get_localized_name(AtkAction *action, gint i) { //TODO:JK: implement me return(NULL); } void ags_notation_edit_show(GtkWidget *widget) { AgsNotationEdit *notation_edit; notation_edit = AGS_NOTATION_EDIT(widget); /* call parent */ GTK_WIDGET_CLASS(ags_notation_edit_parent_class)->show(widget); if((AGS_NOTATION_EDIT_SHOW_RULER & (notation_edit->flags)) != 0){ gtk_widget_show(notation_edit->ruler); } if((AGS_NOTATION_EDIT_SHOW_VSCROLLBAR & (notation_edit->flags)) != 0){ gtk_widget_show(notation_edit->vscrollbar); } if((AGS_NOTATION_EDIT_SHOW_HSCROLLBAR & (notation_edit->flags)) != 0){ gtk_widget_show(notation_edit->hscrollbar); } } void ags_notation_edit_show_all(GtkWidget *widget) { AgsNotationEdit *notation_edit; notation_edit = AGS_NOTATION_EDIT(widget); /* call parent */ GTK_WIDGET_CLASS(ags_notation_edit_parent_class)->show_all(widget); if((AGS_NOTATION_EDIT_SHOW_RULER & (notation_edit->flags)) != 0){ gtk_widget_show(notation_edit->ruler); } if((AGS_NOTATION_EDIT_SHOW_VSCROLLBAR & (notation_edit->flags)) != 0){ gtk_widget_show(notation_edit->vscrollbar); } if((AGS_NOTATION_EDIT_SHOW_HSCROLLBAR & (notation_edit->flags)) != 0){ gtk_widget_show(notation_edit->hscrollbar); } } gboolean ags_notation_edit_auto_scroll_timeout(GtkWidget *widget) { if(g_hash_table_lookup(ags_notation_edit_auto_scroll, widget) != NULL){ AgsNotationEditor *notation_editor; AgsNotationEdit *notation_edit; AgsNotationToolbar *notation_toolbar; double zoom; double x; notation_edit = AGS_NOTATION_EDIT(widget); if((AGS_NOTATION_EDIT_AUTO_SCROLL & (notation_edit->flags)) == 0){ return(TRUE); } notation_editor = gtk_widget_get_ancestor(notation_edit, AGS_TYPE_NOTATION_EDITOR); if(notation_editor->selected_machine == NULL){ return(TRUE); } notation_toolbar = notation_editor->notation_toolbar; /* zoom */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom) - 2.0); /* reset offset */ notation_edit->note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(notation_editor->selected_machine->audio->soundcard)); notation_edit->note_offset_absolute = ags_soundcard_get_note_offset_absolute(AGS_SOUNDCARD(notation_editor->selected_machine->audio->soundcard)); /* reset scrollbar */ x = ((notation_edit->note_offset * notation_edit->control_width) / (AGS_NOTATION_EDITOR_MAX_CONTROLS * notation_edit->control_width)) * GTK_RANGE(notation_edit->hscrollbar)->adjustment->upper; gtk_range_set_value(GTK_RANGE(notation_edit->hscrollbar), x); return(TRUE); }else{ return(FALSE); } } void ags_notation_edit_reset_vscrollbar(AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; GtkAdjustment *adjustment; GtkAdjustment *piano_adjustment; guint channel_count; double varea_height; gdouble upper, old_upper; if(!AGS_IS_NOTATION_EDIT(notation_edit)){ return; } notation_editor = gtk_widget_get_ancestor(notation_edit, AGS_TYPE_NOTATION_EDITOR); if(notation_editor->selected_machine == NULL){ return; } /* adjustment */ adjustment = GTK_RANGE(notation_edit->vscrollbar)->adjustment; g_object_get(notation_editor->scrolled_piano->viewport, "vadjustment", &piano_adjustment, NULL); /* get channel count */ #if 0 if((AGS_AUDIO_NOTATION_DEFAULT & (notation_editor->selected_machine->audio->flags)) != 0){ channel_count = notation_editor->selected_machine->audio->input_pads; }else{ channel_count = notation_editor->selected_machine->audio->output_pads; } #else channel_count = notation_editor->selected_machine->audio->input_pads; #endif /* upper */ old_upper = adjustment->upper; varea_height = (channel_count * notation_edit->control_height); upper = varea_height - GTK_WIDGET(notation_edit->drawing_area)->allocation.height; if(upper < 0.0){ upper = 0.0; } gtk_adjustment_set_upper(adjustment, upper); /* piano - only upper */ gtk_adjustment_set_upper(piano_adjustment, upper); /* reset value */ if(old_upper != 0.0){ gtk_adjustment_set_value(adjustment, adjustment->value / old_upper * upper); } } void ags_notation_edit_reset_hscrollbar(AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkAdjustment *adjustment; double zoom_factor, zoom; double zoom_correction; guint map_width; gdouble upper, old_upper; if(!AGS_IS_NOTATION_EDIT(notation_edit)){ return; } notation_editor = gtk_widget_get_ancestor(notation_edit, AGS_TYPE_NOTATION_EDITOR); if(notation_editor->selected_machine == NULL){ return; } notation_toolbar = notation_editor->notation_toolbar; /* adjustment */ adjustment = GTK_RANGE(notation_edit->hscrollbar)->adjustment; /* zoom */ zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom) - 2.0); /* upper */ old_upper = adjustment->upper; zoom_correction = 1.0 / 16; map_width = ((double) AGS_NOTATION_EDITOR_MAX_CONTROLS * notation_edit->control_width * zoom * zoom_correction); upper = map_width - GTK_WIDGET(notation_edit->drawing_area)->allocation.width; if(upper < 0.0){ upper = 0.0; } gtk_adjustment_set_upper(adjustment, upper); /* ruler */ notation_edit->ruler->factor = zoom_factor; notation_edit->ruler->precision = zoom; notation_edit->ruler->scale_precision = 1.0 / zoom; gtk_adjustment_set_upper(notation_edit->ruler->adjustment, upper / notation_edit->control_width); /* reset value */ if(old_upper != 0.0){ gtk_adjustment_set_value(adjustment, adjustment->value / old_upper * upper); } } void ags_notation_edit_draw_segment(AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkStyle *notation_edit_style; cairo_t *cr; guint channel_count; guint width, height; gboolean width_fits, height_fits; double zoom; guint y0, x0; guint nth_x; guint i, j; guint j_set; static const gdouble white_gc = 65535.0; if(!AGS_IS_NOTATION_EDIT(notation_edit)){ return; } notation_editor = gtk_widget_get_ancestor(notation_edit, AGS_TYPE_NOTATION_EDITOR); if(notation_editor->selected_machine == NULL){ return; } notation_toolbar = notation_editor->notation_toolbar; notation_edit_style = gtk_widget_get_style(GTK_WIDGET(notation_edit->drawing_area)); /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(notation_edit->drawing_area)->window); if(cr == NULL){ return; } /* get channel count */ #if 0 if((AGS_AUDIO_NOTATION_DEFAULT & (notation_editor->selected_machine->audio->flags)) != 0){ channel_count = notation_editor->selected_machine->audio->input_pads; }else{ channel_count = notation_editor->selected_machine->audio->output_pads; } #else channel_count = notation_editor->selected_machine->audio->input_pads; #endif /* get width */ width = GTK_WIDGET(notation_edit->drawing_area)->allocation.width; width_fits = FALSE; if(AGS_NOTATION_EDITOR_MAX_CONTROLS * notation_edit->control_width < width){ width = AGS_NOTATION_EDITOR_MAX_CONTROLS * notation_edit->control_width; width_fits = TRUE; } /* get height */ height = GTK_WIDGET(notation_edit->drawing_area)->allocation.height; height_fits = FALSE; if(channel_count * notation_edit->control_height < height){ height = channel_count * notation_edit->control_height; height_fits = TRUE; } /* zoom */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom) - 2.0); /* */ if(width_fits){ x0 = 0; }else{ x0 = notation_edit->control_width - ((guint) GTK_RANGE(notation_edit->hscrollbar)->adjustment->value) % notation_edit->control_width; } if(height_fits){ y0 = 0; }else{ y0 = notation_edit->control_height - ((guint) GTK_RANGE(notation_edit->vscrollbar)->adjustment->value) % notation_edit->control_height; } nth_x = (guint) floor(GTK_RANGE(notation_edit->hscrollbar)->adjustment->value / notation_edit->control_width); nth_x += 1; /* push group */ cairo_push_group(cr); /* clear with background color */ cairo_set_source_rgb(cr, notation_edit_style->bg[0].red / white_gc, notation_edit_style->bg[0].green / white_gc, notation_edit_style->bg[0].blue / white_gc); cairo_rectangle(cr, 0.0, 0.0, (double) GTK_WIDGET(notation_edit->drawing_area)->allocation.width, (double) GTK_WIDGET(notation_edit->drawing_area)->allocation.height); cairo_fill(cr); /* horizontal lines */ cairo_set_line_width(cr, 1.0); cairo_set_source_rgb(cr, notation_edit_style->fg[0].red / white_gc, notation_edit_style->fg[0].green / white_gc, notation_edit_style->fg[0].blue / white_gc); for(i = y0 ; i < height; ){ cairo_move_to(cr, 0.0, (double) i); cairo_line_to(cr, (double) width, (double) i); cairo_stroke(cr); i += notation_edit->control_height; } if(height_fits){ cairo_move_to(cr, 0.0, (double) i); cairo_line_to(cr, (double) width, (double) i); cairo_stroke(cr); } /* vertical lines */ i = x0; if(i < width && zoom > 1.0 ){ j_set = nth_x % ((guint) zoom); /* thin lines */ cairo_set_source_rgb(cr, notation_edit_style->mid[0].red / white_gc, notation_edit_style->mid[0].green / white_gc, notation_edit_style->mid[0].blue / white_gc); if(j_set != 0){ j = j_set; goto ags_notation_edit_draw_segment0; } } for(; i < width; ){ /* strong lines */ cairo_set_source_rgb(cr, notation_edit_style->fg[0].red / white_gc, notation_edit_style->fg[0].green / white_gc, notation_edit_style->fg[0].blue / white_gc); cairo_move_to(cr, (double) i, 0.0); cairo_line_to(cr, (double) i, (double) height); cairo_stroke(cr); i += notation_edit->control_width; /* thin lines */ cairo_set_source_rgb(cr, notation_edit_style->mid[0].red / white_gc, notation_edit_style->mid[0].green / white_gc, notation_edit_style->mid[0].blue / white_gc); for(j = 1; i < width && j < zoom; j++){ ags_notation_edit_draw_segment0: cairo_move_to(cr, (double) i, 0.0); cairo_line_to(cr, (double) i, (double) height); cairo_stroke(cr); i += notation_edit->control_width; } } /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_notation_edit_draw_position(AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; GtkStyle *notation_edit_style; cairo_t *cr; guint channel_count; double position; double x, y; double width, height; gboolean height_fits; static const gdouble white_gc = 65535.0; if(!AGS_IS_NOTATION_EDIT(notation_edit)){ return; } notation_editor = gtk_widget_get_ancestor(notation_edit, AGS_TYPE_NOTATION_EDITOR); if(notation_editor->selected_machine == NULL){ return; } notation_edit_style = gtk_widget_get_style(GTK_WIDGET(notation_edit->drawing_area)); /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(notation_edit->drawing_area)->window); if(cr == NULL){ return; } /* get channel count */ #if 0 if((AGS_AUDIO_NOTATION_DEFAULT & (notation_editor->selected_machine->audio->flags)) != 0){ channel_count = notation_editor->selected_machine->audio->input_pads; }else{ channel_count = notation_editor->selected_machine->audio->output_pads; } #else channel_count = notation_editor->selected_machine->audio->input_pads; #endif /* get offset and dimensions */ position = ((double) notation_edit->note_offset) * ((double) notation_edit->control_width); y = 0.0; x = (position) - (GTK_RANGE(notation_edit->hscrollbar)->adjustment->value); height = (double) GTK_WIDGET(notation_edit->drawing_area)->allocation.height; width = (double) AGS_NOTATION_EDIT_DEFAULT_FADER_WIDTH; if(height < channel_count * notation_edit->control_height){ height = channel_count * notation_edit->control_height; } /* push group */ cairo_push_group(cr); /* draw fader */ cairo_set_source_rgba(cr, notation_edit_style->dark[0].red / white_gc, notation_edit_style->dark[0].green / white_gc, notation_edit_style->dark[0].blue / white_gc, 0.5); cairo_rectangle(cr, (double) x, (double) y, (double) width, (double) height); cairo_fill(cr); /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_notation_edit_draw_cursor(AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkStyle *notation_edit_style; double zoom, zoom_factor; double x, y; double width, height; cairo_t *cr; static const gdouble white_gc = 65535.0; if(!AGS_IS_NOTATION_EDIT(notation_edit)){ return; } notation_editor = gtk_widget_get_ancestor(notation_edit, AGS_TYPE_NOTATION_EDITOR); if(notation_editor->selected_machine == NULL){ return; } notation_toolbar = notation_editor->notation_toolbar; notation_edit_style = gtk_widget_get_style(GTK_WIDGET(notation_edit->drawing_area)); /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(notation_edit->drawing_area)->window); if(cr == NULL){ return; } /* zoom */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom) - 2.0); zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* get offset */ x = ((double) notation_edit->cursor_position_x * (double) notation_edit->control_width) - (GTK_RANGE(notation_edit->hscrollbar)->adjustment->value * zoom_factor); y = ((double) notation_edit->cursor_position_y * (double) notation_edit->control_height) - GTK_RANGE(notation_edit->vscrollbar)->adjustment->value; width = (double) notation_edit->control_width; height = (double) notation_edit->control_height; /* apply zoom */ x /= zoom_factor; /* clip */ if(x < 0.0){ width += x; x = 0.0; }else if(x > GTK_WIDGET(notation_edit->drawing_area)->allocation.width){ return; } if(x + width > GTK_WIDGET(notation_edit->drawing_area)->allocation.width){ width = ((double) GTK_WIDGET(notation_edit->drawing_area)->allocation.width) - x; } if(y < 0.0){ height += y; y = 0.0; }else if(y > GTK_WIDGET(notation_edit->drawing_area)->allocation.height){ return; } if(y + height > GTK_WIDGET(notation_edit->drawing_area)->allocation.height){ height = ((double) GTK_WIDGET(notation_edit->drawing_area)->allocation.height) - y; } /* push group */ cairo_push_group(cr); /* draw cursor */ cairo_set_source_rgba(cr, notation_edit_style->base[0].red / white_gc, notation_edit_style->base[0].green / white_gc, notation_edit_style->base[0].blue / white_gc, 0.5); cairo_rectangle(cr, x, y, width, height); cairo_fill(cr); /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_notation_edit_draw_selection(AgsNotationEdit *notation_edit) { GtkStyle *notation_edit_style; cairo_t *cr; double x, y; double width, height; if(!AGS_IS_NOTATION_EDIT(notation_edit)){ return; } notation_edit_style = gtk_widget_get_style(GTK_WIDGET(notation_edit->drawing_area)); /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(notation_edit->drawing_area)->window); if(cr == NULL){ return; } /* get offset and dimensions */ if(notation_edit->selection_x0 < notation_edit->selection_x1){ x = ((double) notation_edit->selection_x0) - GTK_RANGE(notation_edit->hscrollbar)->adjustment->value; width = ((double) notation_edit->selection_x1 - (double) notation_edit->selection_x0); }else{ x = ((double) notation_edit->selection_x1) - GTK_RANGE(notation_edit->hscrollbar)->adjustment->value; width = ((double) notation_edit->selection_x0 - (double) notation_edit->selection_x1); } if(notation_edit->selection_y0 < notation_edit->selection_y1){ y = ((double) notation_edit->selection_y0) - GTK_RANGE(notation_edit->vscrollbar)->adjustment->value; height = ((double) notation_edit->selection_y1 - (double) notation_edit->selection_y0); }else{ y = ((double) notation_edit->selection_y1) - GTK_RANGE(notation_edit->vscrollbar)->adjustment->value; height = ((double) notation_edit->selection_y0 - (double) notation_edit->selection_y1); } /* clip */ if(x < 0.0){ width += x; x = 0.0; }else if(x > GTK_WIDGET(notation_edit->drawing_area)->allocation.width){ cairo_destroy(cr); return; } if(x + width > GTK_WIDGET(notation_edit->drawing_area)->allocation.width){ width = ((double) GTK_WIDGET(notation_edit->drawing_area)->allocation.width) - x; } if(y < 0.0){ height += y; y = 0.0; }else if(y > GTK_WIDGET(notation_edit->drawing_area)->allocation.height){ cairo_destroy(cr); return; } if(y + height > GTK_WIDGET(notation_edit->drawing_area)->allocation.height){ height = ((double) GTK_WIDGET(notation_edit->drawing_area)->allocation.height) - y; } /* push group */ cairo_push_group(cr); /* draw selection */ cairo_set_source_rgba(cr, 1.0, 0.0, 0.0, 0.3); cairo_rectangle(cr, x, y, width, height); cairo_fill(cr); /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_notation_edit_draw_note(AgsNotationEdit *notation_edit, AgsNote *note, cairo_t *cr, double r, double g, double b, double a) { AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkStyle *notation_edit_style; double zoom, zoom_factor; guint channel_count; double viewport_x, viewport_y; double x, y; double width, height; static const gdouble white_gc = 65535.0; if(!AGS_IS_NOTATION_EDIT(notation_edit) || !AGS_IS_NOTE(note) || cr == NULL){ return; } notation_editor = gtk_widget_get_ancestor(notation_edit, AGS_TYPE_NOTATION_EDITOR); if(notation_editor->selected_machine == NULL){ return; } notation_toolbar = notation_editor->notation_toolbar; notation_edit_style = gtk_widget_get_style(GTK_WIDGET(notation_edit->drawing_area)); /* get channel count */ #if 0 if((AGS_AUDIO_NOTATION_DEFAULT & (notation_editor->selected_machine->audio->flags)) != 0){ channel_count = notation_editor->selected_machine->audio->input_pads; }else{ channel_count = notation_editor->selected_machine->audio->output_pads; } #else channel_count = notation_editor->selected_machine->audio->input_pads; #endif /* zoom */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom) - 2.0); zoom_factor = exp2(6.0 - (double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom)); /* get offset and dimensions */ if((AGS_NOTATION_EDITOR_MAX_CONTROLS * notation_edit->control_width) > GTK_WIDGET(notation_edit->drawing_area)->allocation.width){ viewport_x = zoom_factor * GTK_RANGE(notation_edit->hscrollbar)->adjustment->value; }else{ viewport_x = 0.0; } if((channel_count * notation_edit->control_height) > GTK_WIDGET(notation_edit->drawing_area)->allocation.height){ viewport_y = GTK_RANGE(notation_edit->vscrollbar)->adjustment->value; }else{ viewport_y = 0.0; } x = ((double) note->x[0]) * ((double) notation_edit->control_width) - viewport_x; y = ((double) note->y) * ((double) notation_edit->control_height) - viewport_y; width = ((double) (note->x[1] - note->x[0])) * ((double) notation_edit->control_width); height = ((double) notation_edit->control_height); /* apply zoom */ x /= zoom_factor; x += ((double) notation_edit->control_margin_x); y += ((double) notation_edit->control_margin_y); width /= zoom_factor; width -= (2.0 * (double) notation_edit->control_margin_x); height -= (2.0 * (double) notation_edit->control_margin_y); /* clip */ if(x < 0.0){ if(x + width < 0.0){ return; }else{ width += x; x = 0.0; } }else if(x > GTK_WIDGET(notation_edit->drawing_area)->allocation.width){ return; } if(x + width > GTK_WIDGET(notation_edit->drawing_area)->allocation.width){ width = ((double) GTK_WIDGET(notation_edit->drawing_area)->allocation.width) - x; } if(y < 0.0){ if(y + height < 0.0){ return; }else{ height += y; y = 0.0; } }else if(y > GTK_WIDGET(notation_edit->drawing_area)->allocation.height){ return; } if(y + height > GTK_WIDGET(notation_edit->drawing_area)->allocation.height){ height = ((double) GTK_WIDGET(notation_edit->drawing_area)->allocation.height) - y; } /* check note selected */ if((AGS_NOTE_IS_SELECTED & (note->flags)) != 0){ double selected_x, selected_y; double selected_width, selected_height; selected_x = x - notation_edit->control_margin_x; selected_y = y - notation_edit->control_margin_y; selected_width = width + (2.0 * (double) notation_edit->control_margin_x); selected_height = height + (2.0 * (double) notation_edit->control_margin_y); /* clip */ if(selected_x < 0.0){ selected_x = 0.0; } if(selected_x + selected_width > GTK_WIDGET(notation_edit->drawing_area)->allocation.width){ selected_width = ((double) GTK_WIDGET(notation_edit->drawing_area)->allocation.width) - selected_x; } if(selected_y < 0.0){ selected_y = 0.0; } if(selected_y + selected_height > GTK_WIDGET(notation_edit->drawing_area)->allocation.height){ selected_height = ((double) GTK_WIDGET(notation_edit->drawing_area)->allocation.height) - selected_y; } /* draw selected note */ cairo_set_source_rgba(cr, notation_edit_style->light[0].red / white_gc, notation_edit_style->light[0].green / white_gc, notation_edit_style->light[0].blue / white_gc, 0.7); cairo_rectangle(cr, selected_x, selected_y, selected_width, selected_height); cairo_stroke(cr); } /* draw note */ cairo_set_source_rgba(cr, r, g, b, a); cairo_rectangle(cr, x, y, width, height); cairo_fill(cr); } void ags_notation_edit_draw_notation(AgsNotationEdit *notation_edit) { AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; GtkStyle *notation_edit_style; AgsMutexManager *mutex_manager; cairo_t *cr; GList *list_notation; GList *list_note; gdouble zoom; guint x0, x1; guint y0, y1; guint offset; gint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; static const gdouble white_gc = 65535.0; if(!AGS_IS_NOTATION_EDIT(notation_edit)){ return; } notation_editor = gtk_widget_get_ancestor(notation_edit, AGS_TYPE_NOTATION_EDITOR); notation_toolbar = notation_editor->notation_toolbar; if(notation_editor->selected_machine == NULL){ return; } notation_edit_style = gtk_widget_get_style(GTK_WIDGET(notation_edit->drawing_area)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) notation_editor->selected_machine->audio); pthread_mutex_unlock(application_mutex); /* create cairo context */ cr = gdk_cairo_create(GTK_WIDGET(notation_edit->drawing_area)->window); if(cr == NULL){ return; } /* zoom */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) notation_toolbar->zoom) - 2.0); /* get visisble region */ x0 = GTK_RANGE(notation_edit->hscrollbar)->adjustment->value / notation_edit->control_width; x1 = (GTK_RANGE(notation_edit->hscrollbar)->adjustment->value / notation_edit->control_width) + (GTK_WIDGET(notation_edit->drawing_area)->allocation.width * zoom); y0 = GTK_RANGE(notation_edit->vscrollbar)->adjustment->value / notation_edit->control_height; y1 = (GTK_RANGE(notation_edit->vscrollbar)->adjustment->value + GTK_WIDGET(notation_edit->drawing_area)->allocation.height) / notation_edit->control_height; /* push group */ cairo_push_group(cr); /* draw notation */ pthread_mutex_lock(audio_mutex); i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ list_notation = notation_editor->selected_machine->audio->notation; while((list_notation = ags_notation_find_near_timestamp(list_notation, i, NULL)) != NULL){ AgsNotation *notation; GList *list_note; notation = AGS_NOTATION(list_notation->data); if(notation->timestamp != NULL && AGS_TIMESTAMP(notation->timestamp)->timer.ags_offset.offset > x1){ break; } if(notation->timestamp != NULL && AGS_TIMESTAMP(notation->timestamp)->timer.ags_offset.offset + AGS_NOTATION_DEFAULT_OFFSET < x0){ list_notation = list_notation->next; continue; } list_note = notation->notes; while(list_note != NULL){ ags_notation_edit_draw_note(notation_edit, list_note->data, cr, notation_edit_style->fg[0].red / white_gc, notation_edit_style->fg[0].green / white_gc, notation_edit_style->fg[0].blue / white_gc, 0.8); list_note = list_note->next; } list_notation = list_notation->next; } i++; } pthread_mutex_unlock(audio_mutex); /* complete */ cairo_pop_group_to_source(cr); cairo_paint(cr); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } void ags_notation_edit_draw(AgsNotationEdit *notation_edit) { /* segment */ ags_notation_edit_draw_segment(notation_edit); /* notation */ ags_notation_edit_draw_notation(notation_edit); /* edit mode */ switch(notation_edit->mode){ case AGS_NOTATION_EDIT_POSITION_CURSOR: { ags_notation_edit_draw_cursor(notation_edit); } break; case AGS_NOTATION_EDIT_ADD_NOTE: { if(notation_edit->current_note != NULL){ GtkStyle *notation_edit_style; cairo_t *cr; static const gdouble white_gc = 65535.0; notation_edit_style = gtk_widget_get_style(GTK_WIDGET(notation_edit->drawing_area)); cr = gdk_cairo_create(GTK_WIDGET(notation_edit->drawing_area)->window); if(cr != NULL){ ags_notation_edit_draw_note(notation_edit, notation_edit->current_note, cr, notation_edit_style->fg[0].red / white_gc, notation_edit_style->fg[0].green / white_gc, notation_edit_style->fg[0].blue / white_gc, 1.0); cairo_surface_mark_dirty(cairo_get_target(cr)); cairo_destroy(cr); } } } break; case AGS_NOTATION_EDIT_SELECT_NOTE: { ags_notation_edit_draw_selection(notation_edit); } break; } /* fader */ if((AGS_NOTATION_EDIT_AUTO_SCROLL & (notation_edit->flags)) != 0){ ags_notation_edit_draw_position(notation_edit); } } /** * ags_notation_edit_new: * * Create a new #AgsNotationEdit. * * Returns: a new #AgsNotationEdit * * Since: 1.2.0 */ AgsNotationEdit* ags_notation_edit_new() { AgsNotationEdit *notation_edit; notation_edit = (AgsNotationEdit *) g_object_new(AGS_TYPE_NOTATION_EDIT, NULL); return(notation_edit); } gsequencer-1.4.24/ags/X/editor/ags_vautomation_edit_box.h0000644000175000017500000000421013247044247020365 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_VAUTOMATION_EDIT_BOX_H__ #define __AGS_VAUTOMATION_EDIT_BOX_H__ #include #include #include #include #define AGS_TYPE_VAUTOMATION_EDIT_BOX (ags_vautomation_edit_box_get_type()) #define AGS_VAUTOMATION_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_VAUTOMATION_EDIT_BOX, AgsVAutomationEditBox)) #define AGS_VAUTOMATION_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_VAUTOMATION_EDIT_BOX, AgsVAutomationEditBoxClass)) #define AGS_IS_VAUTOMATION_EDIT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_VAUTOMATION_EDIT_BOX)) #define AGS_IS_VAUTOMATION_EDIT_BOX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_VAUTOMATION_EDIT_BOX)) #define AGS_VAUTOMATION_EDIT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_VAUTOMATION_EDIT_BOX, AgsVAutomationEditBoxClass)) typedef struct _AgsVAutomationEditBox AgsVAutomationEditBox; typedef struct _AgsVAutomationEditBoxClass AgsVAutomationEditBoxClass; struct _AgsVAutomationEditBox { AgsAutomationEditBox automation_edit_box; }; struct _AgsVAutomationEditBoxClass { AgsAutomationEditBoxClass automation_edit_box; }; GType ags_vautomation_edit_box_get_type(void); AgsVAutomationEditBox* ags_vautomation_edit_box_new(); #endif /*__AGS_VAUTOMATION_EDIT_BOX_H__*/ gsequencer-1.4.24/ags/X/editor/ags_crop_note_dialog_callbacks.c0000644000175000017500000000341013246707333021445 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_crop_note_dialog_response_callback(GtkWidget *dialog, gint response, AgsCropNoteDialog *crop_note_dialog) { gboolean hide_dialog; hide_dialog = TRUE; switch(response){ case GTK_RESPONSE_APPLY: { hide_dialog = FALSE; } case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(crop_note_dialog)); } case GTK_RESPONSE_CANCEL: { if(hide_dialog){ gtk_widget_hide(crop_note_dialog); } } } } void ags_crop_note_dialog_absolute_callback(GtkWidget *button, AgsCropNoteDialog *crop_note_dialog) { if(gtk_toggle_button_get_active(crop_note_dialog->absolute)){ gtk_spin_button_set_range(crop_note_dialog->crop_note, 0.0, AGS_CROP_NOTE_DIALOG_MAX_WIDTH); }else{ gtk_spin_button_set_range(crop_note_dialog->crop_note, -1.0 * AGS_CROP_NOTE_DIALOG_MAX_WIDTH, AGS_CROP_NOTE_DIALOG_MAX_WIDTH); } } gsequencer-1.4.24/ags/X/editor/ags_pattern_envelope.h0000644000175000017500000001011513247044247017515 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PATTERN_ENVELOPE_H__ #define __AGS_PATTERN_ENVELOPE_H__ #include #include #include #include #include #define AGS_TYPE_PATTERN_ENVELOPE (ags_pattern_envelope_get_type()) #define AGS_PATTERN_ENVELOPE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PATTERN_ENVELOPE, AgsPatternEnvelope)) #define AGS_PATTERN_ENVELOPE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PATTERN_ENVELOPE, AgsPatternEnvelopeClass)) #define AGS_IS_PATTERN_ENVELOPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PATTERN_ENVELOPE)) #define AGS_IS_PATTERN_ENVELOPE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PATTERN_ENVELOPE)) #define AGS_PATTERN_ENVELOPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PATTERN_ENVELOPE, AgsPatternEnvelopeClass)) #define AGS_PATTERN_ENVELOPE_DEFAULT_VERSION "0.8.5\0" #define AGS_PATTERN_ENVELOPE_DEFAULT_BUILD_ID "CEST 16-06-2017 11:29\0" typedef struct _AgsPatternEnvelope AgsPatternEnvelope; typedef struct _AgsPatternEnvelopeClass AgsPatternEnvelopeClass; typedef enum{ AGS_PATTERN_ENVELOPE_CONNECTED = 1, AGS_PATTERN_ENVELOPE_NO_UPDATE = 1 << 1, }AgsPatternEnvelopeFlags; typedef enum{ AGS_PATTERN_ENVELOPE_COLUMN_EDIT, AGS_PATTERN_ENVELOPE_COLUMN_PLOT, AGS_PATTERN_ENVELOPE_COLUMN_PRESET_NAME, AGS_PATTERN_ENVELOPE_COLUMN_AUDIO_CHANNEL_START, AGS_PATTERN_ENVELOPE_COLUMN_AUDIO_CHANNEL_END, AGS_PATTERN_ENVELOPE_COLUMN_PAD_START, AGS_PATTERN_ENVELOPE_COLUMN_PAD_END, AGS_PATTERN_ENVELOPE_COLUMN_X_START, AGS_PATTERN_ENVELOPE_COLUMN_X_END, AGS_PATTERN_ENVELOPE_COLUMN_LAST, }AgsPatternEnvelopeColumn; struct _AgsPatternEnvelope { GtkVBox vbox; guint flags; gchar *version; gchar *build_id; GtkCheckButton *enabled; AgsCartesian *cartesian; GtkTreeView *tree_view; GtkSpinButton *audio_channel_start; GtkSpinButton *audio_channel_end; GtkSpinButton *pad_start; GtkSpinButton *pad_end; GtkSpinButton *x_start; GtkSpinButton *x_end; GtkHScale *attack_x; GtkHScale *attack_y; GtkHScale *decay_x; GtkHScale *decay_y; GtkHScale *sustain_x; GtkHScale *sustain_y; GtkHScale *release_x; GtkHScale *release_y; GtkHScale *ratio; GtkDialog *rename; GtkButton *move_up; GtkButton *move_down; GtkButton *add; GtkButton *remove; }; struct _AgsPatternEnvelopeClass { GtkVBoxClass vbox; }; GType ags_pattern_envelope_get_type(void); void ags_pattern_envelope_set_preset_property(AgsPatternEnvelope *pattern_envelope, AgsPreset *preset, gchar *property_name, GValue *value); AgsPreset* ags_pattern_envelope_get_active_preset(AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_load_preset(AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_add_preset(AgsPatternEnvelope *pattern_envelope, gchar *preset_name); void ags_pattern_envelope_remove_preset(AgsPatternEnvelope *pattern_envelope, guint nth); void ags_pattern_envelope_reset_control(AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_reset_tree_view(AgsPatternEnvelope *pattern_envelope); void ags_pattern_envelope_plot(AgsPatternEnvelope *pattern_envelope); AgsPatternEnvelope* ags_pattern_envelope_new(); #endif /*__AGS_PATTERN_ENVELOPE_H__*/ gsequencer-1.4.24/ags/X/editor/ags_automation_edit.h0000644000175000017500000001270413247044247017336 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUTOMATION_EDIT_H__ #define __AGS_AUTOMATION_EDIT_H__ #include #include #include #include #include #include #define AGS_TYPE_AUTOMATION_EDIT (ags_automation_edit_get_type()) #define AGS_AUTOMATION_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTOMATION_EDIT, AgsAutomationEdit)) #define AGS_AUTOMATION_EDIT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUTOMATION_EDIT, AgsAutomationEditClass)) #define AGS_IS_AUTOMATION_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUTOMATION_EDIT)) #define AGS_IS_AUTOMATION_EDIT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUTOMATION_EDIT)) #define AGS_AUTOMATION_EDIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_AUTOMATION_EDIT, AgsAutomationEditClass)) #define AGS_AUTOMATION_EDIT_DEFAULT_HEIGHT (128) #define AGS_AUTOMATION_EDIT_DEFAULT_WIDTH (512) #define AGS_AUTOMATION_EDIT_DEFAULT_POINT_RADIUS (1.75) #define AGS_AUTOMATION_EDIT_DEFAULT_SCAN_HEIGHT (8) #define AGS_AUTOMATION_EDIT_DEFAULT_SCAN_WIDTH (64) #define AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH (64) #define AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_HEIGHT (8) #define AGS_AUTOMATION_EDIT_DEFAULT_STEP_COUNT (16) #define AGS_AUTOMATION_EDIT_DEFAULT_CURSOR_POSITION_X (0) #define AGS_AUTOMATION_EDIT_DEFAULT_CURSOR_POSITION_Y (0.0) #define AGS_AUTOMATION_EDIT_DEFAULT_FADER_WIDTH (3) #define AGS_AUTOMATION_EDIT_CURSOR_WIDTH (5) #define AGS_AUTOMATION_EDIT_CURSOR_HEIGHT (5) #define AGS_AUTOMATION_EDIT_MIN_ZOOM (1.0 / 16.0) #define AGS_AUTOMATION_EDIT_MAX_ZOOM (4.0) #define AGS_AUTOMATION_EDIT_DEFAULT_LOWER (0.0) #define AGS_AUTOMATION_EDIT_DEFAULT_UPPER (1.0) #define AGS_AUTOMATION_EDIT_DEFAULT_VALUE (0.0) #define AGS_AUTOMATION_EDIT_DEFAULT_PADDING (8) typedef struct _AgsAutomationEdit AgsAutomationEdit; typedef struct _AgsAutomationEditClass AgsAutomationEditClass; typedef enum{ AGS_AUTOMATION_EDIT_CONNECTED = 1, AGS_AUTOMATION_EDIT_AUTO_SCROLL = 1 << 1, AGS_AUTOMATION_EDIT_SHOW_RULER = 1 << 2, AGS_AUTOMATION_EDIT_SHOW_VSCROLLBAR = 1 << 3, AGS_AUTOMATION_EDIT_SHOW_HSCROLLBAR = 1 << 4, AGS_AUTOMATION_EDIT_LOGARITHMIC = 1 << 5, }AgsAutomationEditFlags; typedef enum{ AGS_AUTOMATION_EDIT_NO_EDIT_MODE, AGS_AUTOMATION_EDIT_POSITION_CURSOR, AGS_AUTOMATION_EDIT_ADD_ACCELERATION, AGS_AUTOMATION_EDIT_DELETE_ACCELERATION, AGS_AUTOMATION_EDIT_SELECT_ACCELERATION, }AgsAutomationEditMode; typedef enum{ AGS_AUTOMATION_EDIT_BUTTON_1 = 1, }AgsAutomationEditButtonMask; typedef enum{ AGS_AUTOMATION_EDIT_KEY_L_CONTROL = 1, AGS_AUTOMATION_EDIT_KEY_R_CONTROL = 1 << 1, AGS_AUTOMATION_EDIT_KEY_L_SHIFT = 1 << 2, AGS_AUTOMATION_EDIT_KEY_R_SHIFT = 1 << 3, }AgsAutomationEditKeyMask; struct _AgsAutomationEdit { GtkTable table; guint flags; guint mode; guint button_mask; guint key_mask; guint note_offset; guint note_offset_absolute; guint point_radius; guint scan_width; guint scan_height; guint control_width; guint control_height; guint step_count; guint cursor_position_x; gdouble cursor_position_y; guint selection_x0; guint selection_x1; guint selection_y0; guint selection_y1; AgsAcceleration *current_acceleration; AgsRuler *ruler; GType channel_type; gchar *filename; gchar *effect; gchar *control_specifier; gchar *control_name; gdouble lower; gdouble upper; gdouble default_value; GtkDrawingArea *drawing_area; GtkVScrollbar *vscrollbar; GtkHScrollbar *hscrollbar; }; struct _AgsAutomationEditClass { GtkTableClass table; }; GType ags_automation_edit_get_type(void); void ags_automation_edit_reset_vscrollbar(AgsAutomationEdit *automation_edit); void ags_automation_edit_reset_hscrollbar(AgsAutomationEdit *automation_edit); void ags_automation_edit_draw_segment(AgsAutomationEdit *automation_edit); void ags_automation_edit_draw_position(AgsAutomationEdit *automation_edit); void ags_automation_edit_draw_cursor(AgsAutomationEdit *automation_edit); void ags_automation_edit_draw_selection(AgsAutomationEdit *automation_edit); void ags_automation_edit_draw_acceleration(AgsAutomationEdit *automation_edit, AgsAcceleration *acceleration_a, AgsAcceleration *acceleration_b, cairo_t *cr, double r, double g, double b, double a); void ags_automation_edit_draw_automation(AgsAutomationEdit *automation_edit); void ags_automation_edit_draw(AgsAutomationEdit *automation_edit); AgsAutomationEdit* ags_automation_edit_new(); #endif /*__AGS_AUTOMATION_EDIT_H__*/ gsequencer-1.4.24/ags/X/editor/ags_sf2_chooser.h0000644000175000017500000000422213246707333016362 00000000000000/* 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 . */ #ifndef __AGS_SF2_CHOOSER_H__ #define __AGS_SF2_CHOOSER_H__ #include #include #include #include #define AGS_TYPE_SF2_CHOOSER (ags_sf2_chooser_get_type ()) #define AGS_SF2_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SF2_CHOOSER, AgsSF2Chooser)) #define AGS_SF2_CHOOSER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SF2_CHOOSER, AgsSF2ChooserClass)) #define AGS_IS_SF2_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SF2_CHOOSER)) #define AGS_IS_SF2_CHOOSER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SF2_CHOOSER)) #define AGS_SF2_CHOOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SF2_CHOOSER, AgsSF2ChooserClass)) typedef struct _AgsSF2Chooser AgsSF2Chooser; typedef struct _AgsSF2ChooserClass AgsSF2ChooserClass; struct _AgsSF2Chooser { GtkVBox vbox; AgsIpatch *ipatch; GtkComboBoxText *preset; GtkComboBoxText *instrument; GtkComboBoxText *sample; }; struct _AgsSF2ChooserClass { GtkVBoxClass vbox; }; GType ags_sf2_chooser_get_type(); void ags_sf2_chooser_open(AgsSF2Chooser *sf2_chooser, gchar *filename); gboolean ags_sf2_chooser_completed(AgsSF2Chooser *sf2_chooser); void ags_sf2_chooser_remove_all_from_combo(GtkComboBoxText *combo); AgsSF2Chooser* ags_sf2_chooser_new(); #endif /*__AGS_SF2_CHOOSER_H__*/ gsequencer-1.4.24/ags/X/editor/ags_envelope_dialog.h0000644000175000017500000000567113246707333017313 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ENVELOPE_DIALOG_H__ #define __AGS_ENVELOPE_DIALOG_H__ #include #include #include #include #include #include #include #define AGS_TYPE_ENVELOPE_DIALOG (ags_envelope_dialog_get_type()) #define AGS_ENVELOPE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ENVELOPE_DIALOG, AgsEnvelopeDialog)) #define AGS_ENVELOPE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ENVELOPE_DIALOG, AgsEnvelopeDialogClass)) #define AGS_IS_ENVELOPE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ENVELOPE_DIALOG)) #define AGS_IS_ENVELOPE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ENVELOPE_DIALOG)) #define AGS_ENVELOPE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ENVELOPE_DIALOG, AgsEnvelopeDialogClass)) #define AGS_ENVELOPE_DIALOG_DEFAULT_VERSION "0.8.1\0" #define AGS_ENVELOPE_DIALOG_DEFAULT_BUILD_ID "CEST 29-04-2017 09:55\0" typedef struct _AgsEnvelopeDialog AgsEnvelopeDialog; typedef struct _AgsEnvelopeDialogClass AgsEnvelopeDialogClass; typedef enum{ AGS_ENVELOPE_DIALOG_CONNECTED = 1, AGS_ENVELOPE_DIALOG_PATTERN_TAB = 1 << 1, }AgsEnvelopeDialogFlags; struct _AgsEnvelopeDialog { GtkDialog dialog; guint flags; gchar *version; gchar *build_id; AgsMachine *machine; GtkNotebook *notebook; GtkScrolledWindow *envelope_editor_scrolled_window; AgsEnvelopeEditor *envelope_editor; GtkScrolledWindow *pattern_envelope_scrolled_window; AgsPatternEnvelope *pattern_envelope; GtkScrolledWindow *envelope_info_scrolled_window; AgsEnvelopeInfo *envelope_info; GtkButton *apply; GtkButton *ok; GtkButton *cancel; }; struct _AgsEnvelopeDialogClass { GtkDialogClass dialog; }; GType ags_envelope_dialog_get_type(void); void ags_envelope_dialog_load_preset(AgsEnvelopeDialog *envelope_dialog); void ags_envelope_dialog_add_pattern_tab(AgsEnvelopeDialog *envelope_dialog); AgsEnvelopeDialog* ags_envelope_dialog_new(AgsMachine *machine); #endif /*__AGS_ENVELOPE_DIALOG_H__*/ gsequencer-1.4.24/ags/X/editor/ags_machine_selection.c0000644000175000017500000001564713247044247017626 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_machine_selection_class_init(AgsMachineSelectionClass *machine_selection); void ags_machine_selection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_machine_selection_init(AgsMachineSelection *machine_selection); void ags_machine_selection_connect(AgsConnectable *connectable); void ags_machine_selection_disconnect(AgsConnectable *connectable); void ags_machine_selection_finalize(GObject *gobject); /** * SECTION:ags_machine_selection * @short_description: machine radio buttons * @title: AgsMachineSelection * @section_id: * @include: ags/X/editor/ags_machine_selection.h * * The #AgsMachineSelection enables you make choice of an #AgsMachine. */ static gpointer ags_machine_selection_parent_class = NULL; GType ags_machine_selection_get_type(void) { static GType ags_type_machine_selection = 0; if(!ags_type_machine_selection){ static const GTypeInfo ags_machine_selection_info = { sizeof (AgsMachineSelectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_machine_selection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMachineSelection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_machine_selection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_machine_selection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_machine_selection = g_type_register_static(GTK_TYPE_DIALOG, "AgsMachineSelection", &ags_machine_selection_info, 0); g_type_add_interface_static(ags_type_machine_selection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_machine_selection); } void ags_machine_selection_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_machine_selection_connect; connectable->disconnect = ags_machine_selection_disconnect; } void ags_machine_selection_class_init(AgsMachineSelectionClass *machine_selection) { GObjectClass *gobject; ags_machine_selection_parent_class = g_type_class_peek_parent(machine_selection); /* GObjectClass */ gobject = (GObjectClass *) machine_selection; gobject->finalize = ags_machine_selection_finalize; } void ags_machine_selection_init(AgsMachineSelection *machine_selection) { machine_selection->flags = 0; g_object_set(G_OBJECT(machine_selection), "modal", TRUE, "title", i18n("select machines"), NULL); gtk_dialog_add_buttons(GTK_DIALOG(machine_selection), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); } void ags_machine_selection_connect(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_machine_selection_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_machine_selection_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_machine_selection_parent_class)->finalize(gobject); } void ags_machine_selection_load_defaults(AgsMachineSelection *machine_selection) { AgsMachine *machine; AgsMachineRadioButton *machine_radio_button; GtkVBox *vbox; GtkRadioButton *group; GList *list, *list_start, *index, *index_start; gchar *str; gint response; machine_selection->machine = list = gtk_container_get_children(GTK_CONTAINER(machine_selection->window->machines)); machine = NULL; vbox = (GtkVBox *) GTK_DIALOG(machine_selection)->vbox; group = NULL; while(list != NULL){ GtkRadioButton *radio_button; if((AGS_MACHINE_SELECTION_NOTATION & (machine_selection->flags)) != 0){ if(AGS_IS_FFPLAYER(list->data) || AGS_IS_DRUM(list->data) || AGS_IS_MATRIX(list->data) || AGS_IS_SYNCSYNTH(list->data) || AGS_IS_DSSI_BRIDGE(list->data) || (AGS_IS_LV2_BRIDGE(list->data) && (AGS_MACHINE_IS_SYNTHESIZER & (AGS_MACHINE(list->data)->flags)) != 0) || AGS_IS_LIVE_DSSI_BRIDGE(list->data) || AGS_IS_LIVE_LV2_BRIDGE(list->data)){ str = g_strdup_printf("%s: %s", G_OBJECT_TYPE_NAME(list->data), AGS_MACHINE(list->data)->machine_name); radio_button = (GtkRadioButton *) gtk_radio_button_new_with_label_from_widget(group, str); g_object_set_data((GObject *) radio_button, AGS_MACHINE_SELECTION_INDEX, list->data); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(radio_button), FALSE, FALSE, 0); g_free(str); if(group == NULL){ group = radio_button; } } }else if((AGS_MACHINE_SELECTION_AUTOMATION & (machine_selection->flags)) != 0){ str = g_strdup_printf("%s: %s", G_OBJECT_TYPE_NAME(list->data), AGS_MACHINE(list->data)->machine_name); radio_button = (GtkRadioButton *) gtk_radio_button_new_with_label_from_widget(group, str); g_object_set_data((GObject *) radio_button, AGS_MACHINE_SELECTION_INDEX, list->data); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(radio_button), FALSE, FALSE, 0); g_free(str); if(group == NULL){ group = radio_button; } } list = list->next; } } /** * ags_machine_selection_new: * @window: the #AgsWindow * * Create a new #AgsMachineSelection. * * Returns: a new #AgsMachineSelection * * Since: 1.0.0 */ AgsMachineSelection* ags_machine_selection_new(AgsWindow *window) { AgsMachineSelection *machine_selection; machine_selection = (AgsMachineSelection *) g_object_new(AGS_TYPE_MACHINE_SELECTION, NULL); machine_selection->window = window; return(machine_selection); } gsequencer-1.4.24/ags/X/editor/ags_vwave_edit_box.c0000644000175000017500000000471513247044247017154 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_vwave_edit_box_class_init(AgsVWaveEditBoxClass *vwave_edit_box); void ags_vwave_edit_box_init(AgsVWaveEditBox *vwave_edit_box); /** * SECTION:ags_vwave_edit_box * @short_description: horizontal box widget * @title: AgsVWaveEditBox * @section_id: * @include: ags/widget/ags_vwave_edit_box.h * * The #AgsVWaveEditBox is an horizontal box widget containing #AgsWaveEdit. */ GType ags_vwave_edit_box_get_type(void) { static GType ags_type_vwave_edit_box = 0; if(!ags_type_vwave_edit_box){ static const GTypeInfo ags_vwave_edit_box_info = { sizeof (AgsVWaveEditBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_vwave_edit_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsVWaveEditBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_vwave_edit_box_init, }; ags_type_vwave_edit_box = g_type_register_static(AGS_TYPE_WAVE_EDIT_BOX, "AgsVWaveEditBox", &ags_vwave_edit_box_info, 0); } return(ags_type_vwave_edit_box); } void ags_vwave_edit_box_class_init(AgsVWaveEditBoxClass *vwave_edit_box) { } void ags_vwave_edit_box_init(AgsVWaveEditBox *vwave_edit_box) { gtk_orientable_set_orientation(GTK_ORIENTABLE(vwave_edit_box), GTK_ORIENTATION_VERTICAL); } /** * ags_vwave_edit_box_new: * * Create a new instance of #AgsVWaveEditBox. * * Returns: the new #AgsVWaveEditBox instance * * Since: 1.4.0 */ AgsVWaveEditBox* ags_vwave_edit_box_new() { AgsVWaveEditBox *vwave_edit_box; vwave_edit_box = (AgsVWaveEditBox *) g_object_new(AGS_TYPE_VWAVE_EDIT_BOX, NULL); return(vwave_edit_box); } gsequencer-1.4.24/ags/X/editor/ags_notation_toolbar.c0000644000175000017500000003731613247044247017527 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_notation_toolbar_class_init(AgsNotationToolbarClass *notation_toolbar); void ags_notation_toolbar_connectable_interface_init(AgsConnectableInterface *connectable); void ags_notation_toolbar_init(AgsNotationToolbar *notation_toolbar); void ags_notation_toolbar_connect(AgsConnectable *connectable); void ags_notation_toolbar_disconnect(AgsConnectable *connectable); /** * SECTION:ags_notation_toolbar * @short_description: notation_toolbar * @title: AgsNotationToolbar * @section_id: * @include: ags/X/editor/ags_notation_toolbar.h * * The #AgsNotationToolbar lets you choose edit tool. */ GType ags_notation_toolbar_get_type(void) { static GType ags_type_notation_toolbar = 0; if (!ags_type_notation_toolbar){ static const GTypeInfo ags_notation_toolbar_info = { sizeof (AgsNotationToolbarClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_notation_toolbar_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsNotationToolbar), 0, /* n_preallocs */ (GInstanceInitFunc) ags_notation_toolbar_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_notation_toolbar_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_notation_toolbar = g_type_register_static(GTK_TYPE_TOOLBAR, "AgsNotationToolbar", &ags_notation_toolbar_info, 0); g_type_add_interface_static(ags_type_notation_toolbar, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_notation_toolbar); } void ags_notation_toolbar_class_init(AgsNotationToolbarClass *notation_toolbar) { } void ags_notation_toolbar_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_notation_toolbar_connect; connectable->disconnect = ags_notation_toolbar_disconnect; } void ags_notation_toolbar_init(AgsNotationToolbar *notation_toolbar) { GtkLabel *label; GtkMenu *menu; GtkMenuItem *item; notation_toolbar->flags = 0; /* position */ notation_toolbar->position = (GtkToggleButton *) g_object_new(GTK_TYPE_TOGGLE_TOOL_BUTTON, "label", i18n("Position"), "stock-id", GTK_STOCK_JUMP_TO, NULL); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->position, i18n("position cursor"), NULL); /* edit */ notation_toolbar->edit = (GtkToggleButton *) g_object_new(GTK_TYPE_TOGGLE_TOOL_BUTTON, "stock-id", GTK_STOCK_EDIT, "active", TRUE, NULL); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->edit, i18n("edit notes"), NULL); notation_toolbar->selected_edit_mode = notation_toolbar->edit; /* clear */ notation_toolbar->clear = (GtkToggleButton *) g_object_new(GTK_TYPE_TOGGLE_TOOL_BUTTON, "stock-id", GTK_STOCK_CLEAR, NULL); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->clear, i18n("clear notes"), NULL); /* select */ notation_toolbar->select = (GtkToggleButton *) g_object_new(GTK_TYPE_TOGGLE_TOOL_BUTTON, "label", i18n("Select"), "stock-id", GTK_STOCK_SELECT_ALL, NULL); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->select, i18n("select notes"), NULL); /* copy */ notation_toolbar->copy = (GtkButton *) g_object_new(GTK_TYPE_TOOL_BUTTON, "stock-id", GTK_STOCK_COPY, NULL); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->copy, i18n("copy notes"), NULL); /* cut */ notation_toolbar->cut = (GtkButton *) g_object_new(GTK_TYPE_TOOL_BUTTON, "stock-id", GTK_STOCK_CUT, NULL); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->cut, i18n("cut notes"), NULL); /* paste */ notation_toolbar->paste_tool = (GtkButton *) g_object_new(GTK_TYPE_MENU_TOOL_BUTTON, "stock-id", GTK_STOCK_PASTE, NULL); menu = gtk_menu_new(); item = g_object_new(GTK_TYPE_CHECK_MENU_ITEM, "label", i18n("match audio channel"), "active", TRUE, NULL); gtk_menu_shell_append(menu, item); item = g_object_new(GTK_TYPE_CHECK_MENU_ITEM, "label", i18n("no duplicates"), "active", TRUE, NULL); gtk_menu_shell_append(menu, item); gtk_menu_tool_button_set_menu(notation_toolbar->paste_tool, menu); gtk_widget_show_all(menu); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->paste_tool, i18n("paste notes"), NULL); /* invert */ notation_toolbar->invert = (GtkButton *) g_object_new(GTK_TYPE_TOOL_BUTTON, "icon-widget", (GtkWidget *) gtk_image_new_from_icon_name("object-flip-vertical", GTK_ICON_SIZE_LARGE_TOOLBAR), "label", i18n("invert"), NULL); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->invert, i18n("invert notes"), NULL); /* menu tool */ notation_toolbar->menu_tool = (GtkMenuToolButton *) g_object_new(GTK_TYPE_MENU_TOOL_BUTTON, "label", i18n("tool"), "stock-id", GTK_STOCK_EXECUTE, NULL); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->menu_tool, i18n("additional tools"), NULL); /* menu tool - tool popup */ notation_toolbar->tool_popup = ags_notation_toolbar_tool_popup_new(notation_toolbar); gtk_menu_tool_button_set_menu(notation_toolbar->menu_tool, notation_toolbar->tool_popup); /* menu tool - dialogs */ notation_toolbar->move_note = ags_move_note_dialog_new(NULL); notation_toolbar->crop_note = ags_crop_note_dialog_new(NULL); notation_toolbar->select_note = ags_select_note_dialog_new(NULL); notation_toolbar->position_notation_cursor = ags_position_notation_cursor_dialog_new(NULL); /* zoom */ label = (GtkLabel *) gtk_label_new(i18n("zoom")); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) label, NULL, NULL); notation_toolbar->zoom_history = 2; notation_toolbar->zoom = (GtkComboBoxText *) ags_zoom_combo_box_new(); gtk_combo_box_set_active((GtkComboBox *) notation_toolbar->zoom, 2); gtk_toolbar_append_widget((GtkToolbar *) notation_toolbar, (GtkWidget *) notation_toolbar->zoom, NULL , NULL); } void ags_notation_toolbar_connect(AgsConnectable *connectable) { AgsWindow *window; AgsNotationToolbar *notation_toolbar; GList *list; notation_toolbar = AGS_NOTATION_TOOLBAR(connectable); if((AGS_NOTATION_TOOLBAR_CONNECTED & (notation_toolbar->flags)) != 0){ return; } notation_toolbar->flags |= AGS_NOTATION_TOOLBAR_CONNECTED; window = AGS_WINDOW(gtk_widget_get_ancestor((GtkWidget *) notation_toolbar, AGS_TYPE_WINDOW)); g_object_set(notation_toolbar->move_note, "main-window", window, NULL); g_object_set(notation_toolbar->crop_note, "main-window", window, NULL); g_object_set(notation_toolbar->select_note, "main-window", window, NULL); g_object_set(notation_toolbar->position_notation_cursor, "main-window", window, NULL); /* tool */ g_signal_connect_after((GObject *) notation_toolbar->position, "toggled", G_CALLBACK(ags_notation_toolbar_position_callback), (gpointer) notation_toolbar); g_signal_connect_after((GObject *) notation_toolbar->edit, "toggled", G_CALLBACK(ags_notation_toolbar_edit_callback), (gpointer) notation_toolbar); g_signal_connect_after((GObject *) notation_toolbar->clear, "toggled", G_CALLBACK(ags_notation_toolbar_clear_callback), (gpointer) notation_toolbar); g_signal_connect_after((GObject *) notation_toolbar->select, "toggled", G_CALLBACK(ags_notation_toolbar_select_callback), (gpointer) notation_toolbar); /* edit */ g_signal_connect((GObject *) notation_toolbar->copy, "clicked", G_CALLBACK(ags_notation_toolbar_copy_or_cut_callback), (gpointer) notation_toolbar); g_signal_connect((GObject *) notation_toolbar->cut, "clicked", G_CALLBACK(ags_notation_toolbar_copy_or_cut_callback), (gpointer) notation_toolbar); g_signal_connect((GObject *) notation_toolbar->paste_tool, "clicked", G_CALLBACK(ags_notation_toolbar_paste_callback), (gpointer) notation_toolbar); g_signal_connect((GObject *) notation_toolbar->invert, "clicked", G_CALLBACK(ags_notation_toolbar_invert_callback), (gpointer) notation_toolbar); list = gtk_container_get_children(gtk_menu_tool_button_get_menu(notation_toolbar->paste_tool)); g_signal_connect_after(list->data, "activate", G_CALLBACK(ags_notation_toolbar_match_audio_channel_callback), notation_toolbar); g_signal_connect_after(list->next->data, "activate", G_CALLBACK(ags_notation_toolbar_no_duplicates_callback), notation_toolbar); g_list_free(list); /* additional tools */ ags_connectable_connect(AGS_CONNECTABLE(notation_toolbar->position_notation_cursor)); ags_connectable_connect(AGS_CONNECTABLE(notation_toolbar->crop_note)); ags_connectable_connect(AGS_CONNECTABLE(notation_toolbar->move_note)); ags_connectable_connect(AGS_CONNECTABLE(notation_toolbar->select_note)); /* zoom */ g_signal_connect_after((GObject *) notation_toolbar->zoom, "changed", G_CALLBACK(ags_notation_toolbar_zoom_callback), (gpointer) notation_toolbar); } void ags_notation_toolbar_disconnect(AgsConnectable *connectable) { AgsNotationToolbar *notation_toolbar; GList *list; notation_toolbar = AGS_NOTATION_TOOLBAR(connectable); if((AGS_NOTATION_TOOLBAR_CONNECTED & (notation_toolbar->flags)) == 0){ return; } notation_toolbar->flags &= (~AGS_NOTATION_TOOLBAR_CONNECTED); /* tool */ g_object_disconnect(G_OBJECT(notation_toolbar->position), "any_signal::toggled", G_CALLBACK(ags_notation_toolbar_position_callback), notation_toolbar, NULL); g_object_disconnect(G_OBJECT(notation_toolbar->edit), "any_signal::toggled", G_CALLBACK(ags_notation_toolbar_edit_callback), notation_toolbar, NULL); g_object_disconnect(G_OBJECT(notation_toolbar->clear), "any_signal::toggled", G_CALLBACK(ags_notation_toolbar_clear_callback), notation_toolbar, NULL); g_object_disconnect(G_OBJECT(notation_toolbar->select), "any_signal::toggled", G_CALLBACK(ags_notation_toolbar_select_callback), notation_toolbar, NULL); /* edit */ g_object_disconnect(G_OBJECT(notation_toolbar->copy), "any_signal::clicked", G_CALLBACK(ags_notation_toolbar_copy_or_cut_callback), notation_toolbar, NULL); g_object_disconnect(G_OBJECT(notation_toolbar->cut), "any_signal::clicked", G_CALLBACK(ags_notation_toolbar_copy_or_cut_callback), notation_toolbar, NULL); g_object_disconnect(G_OBJECT(notation_toolbar->paste_tool), "any_signal::clicked", G_CALLBACK(ags_notation_toolbar_paste_callback), notation_toolbar, NULL); g_object_disconnect(G_OBJECT(notation_toolbar->invert), "any_signal::clicked", G_CALLBACK(ags_notation_toolbar_invert_callback), notation_toolbar, NULL); list = gtk_container_get_children(gtk_menu_tool_button_get_menu(notation_toolbar->paste_tool)); g_object_disconnect(G_OBJECT(list->data), "any_signal::activate", G_CALLBACK(ags_notation_toolbar_match_audio_channel_callback), notation_toolbar, NULL); g_object_disconnect(G_OBJECT(list->next->data), "any_signal::activate", G_CALLBACK(ags_notation_toolbar_no_duplicates_callback), notation_toolbar, NULL); g_list_free(list); /* additional tools */ ags_connectable_disconnect(AGS_CONNECTABLE(notation_toolbar->position_notation_cursor)); ags_connectable_disconnect(AGS_CONNECTABLE(notation_toolbar->crop_note)); ags_connectable_disconnect(AGS_CONNECTABLE(notation_toolbar->move_note)); ags_connectable_disconnect(AGS_CONNECTABLE(notation_toolbar->select_note)); /* zoom */ g_object_disconnect(G_OBJECT(notation_toolbar->zoom), "any_signal::changed", G_CALLBACK(ags_notation_toolbar_zoom_callback), notation_toolbar, NULL); } /** * ags_notation_toolbar_tool_popup_new: * * Create a new #GtkMenu suitable for menu tool button. * * Returns: a new #GtkMenu * * Since: 1.0.0 */ GtkMenu* ags_notation_toolbar_tool_popup_new(GtkToolbar *notation_toolbar) { GtkMenu *tool_popup; GtkMenuItem *item; GList *list, *list_start; tool_popup = (GtkMenu *) gtk_menu_new(); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("move notes")); gtk_menu_shell_append((GtkMenuShell *) tool_popup, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("crop notes")); gtk_menu_shell_append((GtkMenuShell *) tool_popup, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("select notes")); gtk_menu_shell_append((GtkMenuShell *) tool_popup, (GtkWidget *) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("position cursor")); gtk_menu_shell_append((GtkMenuShell *) tool_popup, (GtkWidget *) item); /* connect */ list_start = list = gtk_container_get_children((GtkContainer *) tool_popup); g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_notation_toolbar_tool_popup_move_note_callback), (gpointer) notation_toolbar); list = list->next; g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_notation_toolbar_tool_popup_crop_note_callback), (gpointer) notation_toolbar); list = list->next; g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_notation_toolbar_tool_popup_select_note_callback), (gpointer) notation_toolbar); list = list->next; g_signal_connect(G_OBJECT(list->data), "activate", G_CALLBACK(ags_notation_toolbar_tool_popup_position_cursor_callback), (gpointer) notation_toolbar); g_list_free(list_start); /* show */ gtk_widget_show_all((GtkWidget *) tool_popup); return(tool_popup); } /** * ags_notation_toolbar_new: * * Create a new #AgsNotationToolbar. * * Returns: a new #AgsNotationToolbar * * Since: 1.0.0 */ AgsNotationToolbar* ags_notation_toolbar_new() { AgsNotationToolbar *notation_toolbar; notation_toolbar = (AgsNotationToolbar *) g_object_new(AGS_TYPE_NOTATION_TOOLBAR, NULL); return(notation_toolbar); } gsequencer-1.4.24/ags/X/editor/ags_machine_selector_callbacks.c0000644000175000017500000001675313247044247021457 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_machine_selector_selection_response(GtkWidget *machine_selection, gint response, AgsMachineSelector *machine_selector); void ags_machine_selector_popup_add_tab_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector) { //TODO:JK: implement me } void ags_machine_selector_popup_remove_tab_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector) { //TODO:JK: implement me } void ags_machine_selector_popup_add_index_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector) { ags_machine_selector_add_index(machine_selector); } void ags_machine_selector_popup_remove_index_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector) { GList *list, *list_start; guint nth; /* find index */ list_start = list = gtk_container_get_children(GTK_CONTAINER(machine_selector)); list = list->next; nth = 0; while(list != NULL){ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(list->data))){ ags_machine_selector_changed(machine_selector, NULL); break; } list = list->next; nth++; } g_list_free(list_start); /* remove index */ ags_machine_selector_remove_index(machine_selector, nth); } void ags_machine_selector_popup_link_index_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector) { AgsWindow *window; AgsMachine *machine; AgsMachineSelection *machine_selection; AgsMachineRadioButton *machine_radio_button; GList *list; list = gtk_window_list_toplevels(); while(list != NULL && !AGS_IS_WINDOW(list->data)) list = list->next; window = list->data; machine_selector->machine_selection = machine_selection = (AgsMachineSelection *) ags_machine_selection_new(window); if((AGS_MACHINE_SELECTOR_NOTATION & (machine_selector->flags)) != 0){ machine_selection->flags |= AGS_MACHINE_SELECTION_NOTATION; }else if((AGS_MACHINE_SELECTOR_AUTOMATION & (machine_selector->flags)) != 0){ machine_selection->flags |= AGS_MACHINE_SELECTION_AUTOMATION; } ags_machine_selection_load_defaults(machine_selection); g_signal_connect(G_OBJECT(machine_selection), "response", G_CALLBACK(ags_machine_selector_selection_response), machine_selector); gtk_widget_show_all((GtkWidget *) machine_selection); } void ags_machine_selector_selection_response(GtkWidget *machine_selection, gint response, AgsMachineSelector *machine_selector) { AgsMachine *machine; GtkVBox *vbox; GtkContainer *content_area; GList *list, *list_start; if(response == GTK_RESPONSE_ACCEPT){ /* retrieve machine */ machine = NULL; vbox = (GtkVBox *) GTK_DIALOG(machine_selection)->vbox; if(response == GTK_RESPONSE_ACCEPT){ list_start = list = gtk_container_get_children((GtkContainer *) vbox); while(list != NULL){ if(GTK_IS_TOGGLE_BUTTON(list->data) && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(list->data))){ machine = g_object_get_data(list->data, AGS_MACHINE_SELECTION_INDEX); break; } list = list->next; } g_list_free(list_start); } /* link index */ ags_machine_selector_link_index(machine_selector, machine); } /* unset machine selection and destroy */ machine_selector->machine_selection = NULL; gtk_widget_destroy(machine_selection); } void ags_machine_selector_radio_changed(GtkWidget *radio_button, AgsMachineSelector *machine_selector) { ags_machine_selector_changed(machine_selector, AGS_MACHINE_RADIO_BUTTON(radio_button)->machine); } void ags_machine_selector_popup_reverse_mapping_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector) { AgsNotationEditor *notation_editor; notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor((GtkWidget *) machine_selector, AGS_TYPE_NOTATION_EDITOR); if(notation_editor->selected_machine != NULL){ if(gtk_check_menu_item_get_active((GtkCheckMenuItem *) menu_item)){ notation_editor->selected_machine->audio->flags |= AGS_AUDIO_REVERSE_MAPPING; }else{ notation_editor->selected_machine->audio->flags &= (~AGS_AUDIO_REVERSE_MAPPING); } } } void ags_machine_selector_popup_shift_piano_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector) { AgsNotationEditor *notation_editor; notation_editor = (AgsNotationEditor *) gtk_widget_get_ancestor((GtkWidget *) machine_selector, AGS_TYPE_NOTATION_EDITOR); if(notation_editor->selected_machine != NULL){ GList *notation; gchar *base_note; gchar *label; gint base_key_code; notation = notation_editor->selected_machine->audio->notation; label = gtk_menu_item_get_label((GtkMenuItem *) menu_item); while(notation != NULL){ g_free(AGS_NOTATION(notation->data)->base_note); AGS_NOTATION(notation->data)->base_note = g_strdup(label); notation = notation->next; } if(!g_strcmp0(label, "A")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_A; base_key_code = 33; }else if(!g_strcmp0(label, "A#")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_AIS; base_key_code = 34; }else if(!g_strcmp0(label, "H")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_H; base_key_code = 35; }else if(!g_strcmp0(label, "C")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_C; base_key_code = 24; }else if(!g_strcmp0(label, "C#")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_CIS; base_key_code = 25; }else if(!g_strcmp0(label, "D")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_D; base_key_code = 26; }else if(!g_strcmp0(label, "D#")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_DIS; base_key_code = 27; }else if(!g_strcmp0(label, "E")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_E; base_key_code = 28; }else if(!g_strcmp0(label, "F")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_F; base_key_code = 29; }else if(!g_strcmp0(label, "F#")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_FIS; base_key_code = 30; }else if(!g_strcmp0(label, "G")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_G; base_key_code = 31; }else if(!g_strcmp0(label, "G#")){ base_note = AGS_PIANO_KEYS_OCTAVE_2_GIS; base_key_code = 32; } g_object_set(notation_editor->scrolled_piano->piano, "base-note", base_note, "base-key-code", base_key_code, NULL); gtk_widget_queue_draw(notation_editor->scrolled_piano->piano); } } gsequencer-1.4.24/ags/X/editor/ags_wave_edit.c0000644000175000017500000005106313247044247016114 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include static GType ags_accessible_wave_edit_get_type(void); void ags_wave_edit_class_init(AgsWaveEditClass *wave_edit); void ags_accessible_wave_edit_class_init(AtkObject *object); void ags_accessible_wave_edit_action_interface_init(AtkActionIface *action); void ags_wave_edit_connectable_interface_init(AgsConnectableInterface *connectable); void ags_wave_edit_init(AgsWaveEdit *wave_edit); void ags_wave_edit_connect(AgsConnectable *connectable); void ags_wave_edit_disconnect(AgsConnectable *connectable); AtkObject* ags_wave_edit_get_accessible(GtkWidget *widget); gboolean ags_accessible_wave_edit_do_action(AtkAction *action, gint i); gint ags_accessible_wave_edit_get_n_actions(AtkAction *action); const gchar* ags_accessible_wave_edit_get_description(AtkAction *action, gint i); const gchar* ags_accessible_wave_edit_get_name(AtkAction *action, gint i); const gchar* ags_accessible_wave_edit_get_keybinding(AtkAction *action, gint i); gboolean ags_accessible_wave_edit_set_description(AtkAction *action, gint i); gchar* ags_accessible_wave_edit_get_localized_name(AtkAction *action, gint i); gboolean ags_wave_edit_auto_scroll_timeout(GtkWidget *widget); /** * SECTION:ags_wave_edit * @short_description: edit audio data * @title: AgsWaveEdit * @section_id: * @include: ags/X/editor/ags_wave_edit.h * * The #AgsWaveEdit lets you edit audio data. */ static gpointer ags_wave_edit_parent_class = NULL; static GQuark quark_accessible_object = 0; GtkStyle *wave_edit_style = NULL; GHashTable *ags_wave_edit_auto_scroll = NULL; GType ags_wave_edit_get_type(void) { static GType ags_type_wave_edit = 0; if(!ags_type_wave_edit){ static const GTypeInfo ags_wave_edit_info = { sizeof (AgsWaveEditClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_wave_edit_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsWaveEdit), 0, /* n_preallocs */ (GInstanceInitFunc) ags_wave_edit_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_wave_edit_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_wave_edit = g_type_register_static(GTK_TYPE_TABLE, "AgsWaveEdit", &ags_wave_edit_info, 0); g_type_add_interface_static(ags_type_wave_edit, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_wave_edit); } static GType ags_accessible_wave_edit_get_type(void) { static GType ags_type_accessible_wave_edit = 0; if(!ags_type_accessible_wave_edit){ const GTypeInfo ags_accesssible_wave_edit_info = { sizeof(GtkAccessibleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_accessible_wave_edit_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(GtkAccessible), 0, /* n_preallocs */ NULL, NULL }; static const GInterfaceInfo atk_action_interface_info = { (GInterfaceInitFunc) ags_accessible_wave_edit_action_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_accessible_wave_edit = g_type_register_static(GTK_TYPE_ACCESSIBLE, "AgsAccessibleWaveEdit", &ags_accesssible_wave_edit_info, 0); g_type_add_interface_static(ags_type_accessible_wave_edit, ATK_TYPE_ACTION, &atk_action_interface_info); } return(ags_type_accessible_wave_edit); } void ags_wave_edit_class_init(AgsWaveEditClass *wave_edit) { ags_wave_edit_parent_class = g_type_class_peek_parent(wave_edit); quark_accessible_object = g_quark_from_static_string("ags-accessible-object"); } void ags_wave_edit_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_wave_edit_connect; connectable->disconnect = ags_wave_edit_disconnect; } void ags_accessible_wave_edit_class_init(AtkObject *object) { /* empty */ } void ags_accessible_wave_edit_action_interface_init(AtkActionIface *action) { action->do_action = ags_accessible_wave_edit_do_action; action->get_n_actions = ags_accessible_wave_edit_get_n_actions; action->get_description = ags_accessible_wave_edit_get_description; action->get_name = ags_accessible_wave_edit_get_name; action->get_keybinding = ags_accessible_wave_edit_get_keybinding; action->set_description = ags_accessible_wave_edit_set_description; action->get_localized_name = ags_accessible_wave_edit_get_localized_name; } void ags_wave_edit_init(AgsWaveEdit *wave_edit) { GtkAdjustment *adjustment; g_object_set(wave_edit, "can-focus", FALSE, "n-columns", 3, "n-rows", 4, "homogeneous", FALSE, NULL); wave_edit->flags = 0; wave_edit->mode = AGS_WAVE_EDIT_NO_EDIT_MODE; wave_edit->key_mask = 0; wave_edit->note_offset = 0; wave_edit->note_offset_absolute = 0; wave_edit->control_width = AGS_WAVE_EDIT_DEFAULT_CONTROL_WIDTH; wave_edit->control_height = AGS_WAVE_EDIT_DEFAULT_CONTROL_HEIGHT; wave_edit->cursor_position_x = AGS_WAVE_EDIT_DEFAULT_CURSOR_POSITION_X; wave_edit->cursor_position_y = AGS_WAVE_EDIT_DEFAULT_CURSOR_POSITION_Y; wave_edit->selection_x0 = 0; wave_edit->selection_x1 = 0; wave_edit->selection_y0 = 0; wave_edit->selection_y1 = 0; if(wave_edit_style == NULL){ wave_edit_style = gtk_style_copy(gtk_widget_get_style(wave_edit)); } wave_edit->ruler = ags_ruler_new(); g_object_set(wave_edit->ruler, "no-show-all", TRUE, NULL); gtk_table_attach(GTK_TABLE(wave_edit), (GtkWidget *) wave_edit->ruler, 0, 1, 0, 1, GTK_FILL|GTK_EXPAND, GTK_FILL, 0, 0); wave_edit->lower = AGS_WAVE_EDIT_DEFAULT_LOWER; wave_edit->upper = AGS_WAVE_EDIT_DEFAULT_UPPER; wave_edit->default_value = AGS_WAVE_EDIT_DEFAULT_VALUE; wave_edit->drawing_area = (GtkDrawingArea *) gtk_drawing_area_new(); gtk_widget_set_events(GTK_WIDGET (wave_edit->drawing_area), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_CONTROL_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); gtk_widget_set_can_focus((GtkWidget *) wave_edit->drawing_area, TRUE); gtk_widget_set_size_request(wave_edit->drawing_area, -1, AGS_LEVEL_DEFAULT_HEIGHT); gtk_table_attach(GTK_TABLE(wave_edit), (GtkWidget *) wave_edit->drawing_area, 0, 1, 1, 2, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); /* vscrollbar */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, wave_edit->control_height, 1.0); wave_edit->vscrollbar = gtk_vscrollbar_new(adjustment); g_object_set(wave_edit->vscrollbar, "no-show-all", TRUE, NULL); gtk_widget_set_size_request(wave_edit->vscrollbar, -1, AGS_LEVEL_DEFAULT_HEIGHT); gtk_table_attach(GTK_TABLE(wave_edit), (GtkWidget *) wave_edit->vscrollbar, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* hscrollbar */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, (gdouble) wave_edit->control_width, 1.0); wave_edit->hscrollbar = gtk_hscrollbar_new(adjustment); g_object_set(wave_edit->hscrollbar, "no-show-all", TRUE, NULL); gtk_widget_set_size_request(wave_edit->hscrollbar, -1, -1); gtk_table_attach(GTK_TABLE(wave_edit), (GtkWidget *) wave_edit->hscrollbar, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* auto-scroll */ if(ags_wave_edit_auto_scroll == NULL){ ags_wave_edit_auto_scroll = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_wave_edit_auto_scroll, wave_edit, ags_wave_edit_auto_scroll_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_wave_edit_auto_scroll_timeout, (gpointer) wave_edit); } void ags_wave_edit_connect(AgsConnectable *connectable) { AgsWaveEdit *wave_edit; wave_edit = AGS_WAVE_EDIT(connectable); if((AGS_WAVE_EDIT_CONNECTED & (wave_edit->flags)) != 0){ return; } wave_edit->flags |= AGS_WAVE_EDIT_CONNECTED; //TODO:JK: implement me } void ags_wave_edit_disconnect(AgsConnectable *connectable) { AgsWaveEdit *wave_edit; wave_edit = AGS_WAVE_EDIT(connectable); if((AGS_WAVE_EDIT_CONNECTED & (wave_edit->flags)) == 0){ return; } wave_edit->flags &= (~AGS_WAVE_EDIT_CONNECTED); //TODO:JK: implement me } AtkObject* ags_wave_edit_get_accessible(GtkWidget *widget) { AtkObject* accessible; accessible = g_object_get_qdata(G_OBJECT(widget), quark_accessible_object); if(!accessible){ accessible = g_object_new(ags_accessible_wave_edit_get_type(), NULL); g_object_set_qdata(G_OBJECT(widget), quark_accessible_object, accessible); gtk_accessible_set_widget(GTK_ACCESSIBLE(accessible), widget); } return(accessible); } gboolean ags_accessible_wave_edit_do_action(AtkAction *action, gint i) { AgsWaveEdit *wave_edit; GdkEventKey *key_press, *key_release; GdkEventKey *modifier_press, *modifier_release; GdkEventKey *second_level_press, *second_level_release; if(!(i >= 0 && i < 15)){ return(FALSE); } wave_edit = gtk_accessible_get_widget(GTK_ACCESSIBLE(action)); key_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); key_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); /* create modifier */ modifier_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); modifier_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); modifier_press->keyval = modifier_release->keyval = GDK_KEY_Control_R; /* create second level */ second_level_press = (GdkEventKey *) gdk_event_new(GDK_KEY_PRESS); second_level_release = (GdkEventKey *) gdk_event_new(GDK_KEY_RELEASE); second_level_press->keyval = second_level_release->keyval = GDK_KEY_Shift_R; switch(i){ case 0: { key_press->keyval = key_release->keyval = GDK_KEY_Left; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event(wave_edit->drawing_area, key_release); } break; case 1: { key_press->keyval = key_release->keyval = GDK_KEY_Right; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); } break; case 2: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); } break; case 3: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); } break; case 4: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 5: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 6: { key_press->keyval = key_release->keyval = GDK_KEY_Left; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 7: { key_press->keyval = key_release->keyval = GDK_KEY_Right; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 8: { key_press->keyval = key_release->keyval = GDK_KEY_Up; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 9: { key_press->keyval = key_release->keyval = GDK_KEY_Down; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) second_level_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) second_level_release); } break; case 10: { key_press->keyval = key_release->keyval = GDK_KEY_space; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); } break; case 11: { key_press->keyval = key_release->keyval = GDK_KEY_Delete; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); } break; case 12: { key_press->keyval = key_release->keyval = GDK_KEY_c; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 13: { key_press->keyval = key_release->keyval = GDK_KEY_x; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_release); } break; case 14: { key_press->keyval = key_release->keyval = GDK_KEY_v; /* send event */ gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_press); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) key_release); gtk_widget_event((GtkWidget *) wave_edit->drawing_area, (GdkEvent *) modifier_release); } break; } return(TRUE); } gint ags_accessible_wave_edit_get_n_actions(AtkAction *action) { return(15); } const gchar* ags_accessible_wave_edit_get_description(AtkAction *action, gint i) { static const gchar *actions[] = { "move cursor left", "move cursor right", "move cursor small left", "move cursor small right", "copy wave to clipboard", "cut wave to clipbaord", "paste wave from clipboard", }; if(i >= 0 && i < 15){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_wave_edit_get_name(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "small-left", "small-right", "copy", "cut", "paste", }; if(i >= 0 && i < 15){ return(actions[i]); }else{ return(NULL); } } const gchar* ags_accessible_wave_edit_get_keybinding(AtkAction *action, gint i) { static const gchar *actions[] = { "left", "right", "Shft+Left", "Shft+Right", "Ctrl+c", "Ctrl+x", "Ctrl+v", }; if(i >= 0 && i < 15){ return(actions[i]); }else{ return(NULL); } } gboolean ags_accessible_wave_edit_set_description(AtkAction *action, gint i) { //TODO:JK: implement me return(FALSE); } gchar* ags_accessible_wave_edit_get_localized_name(AtkAction *action, gint i) { //TODO:JK: implement me return(NULL); } gboolean ags_wave_edit_auto_scroll_timeout(GtkWidget *widget) { if(g_hash_table_lookup(ags_wave_edit_auto_scroll, widget) != NULL){ AgsWaveEditor *wave_editor; AgsWaveEdit *wave_edit; AgsWaveToolbar *wave_toolbar; double zoom; double x; wave_edit = AGS_WAVE_EDIT(widget); if((AGS_WAVE_EDIT_AUTO_SCROLL & (wave_edit->flags)) == 0){ return(TRUE); } wave_editor = gtk_widget_get_ancestor(wave_edit, AGS_TYPE_WAVE_EDITOR); if(wave_editor->selected_machine == NULL){ return(TRUE); } wave_toolbar = wave_editor->wave_toolbar; /* zoom */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) wave_toolbar->zoom) - 2.0); /* reset offset */ wave_edit->note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(wave_editor->selected_machine->audio->soundcard)); wave_edit->note_offset_absolute = ags_soundcard_get_note_offset_absolute(AGS_SOUNDCARD(wave_editor->selected_machine->audio->soundcard)); /* reset scrollbar */ x = ((wave_edit->note_offset * wave_edit->control_width) / (AGS_WAVE_EDITOR_MAX_CONTROLS * wave_edit->control_width)) * GTK_RANGE(wave_edit->hscrollbar)->adjustment->upper; gtk_range_set_value(GTK_RANGE(wave_edit->hscrollbar), x); return(TRUE); }else{ return(FALSE); } } /** * ags_wave_edit_new: * * Create a new #AgsWaveEdit. * * Returns: a new #AgsWaveEdit * * Since: 1.2.0 */ AgsWaveEdit* ags_wave_edit_new() { AgsWaveEdit *wave_edit; wave_edit = (AgsWaveEdit *) g_object_new(AGS_TYPE_WAVE_EDIT, NULL); return(wave_edit); } gsequencer-1.4.24/ags/X/editor/ags_envelope_editor.h0000644000175000017500000000620513246707333017334 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ENVELOPE_EDITOR_H__ #define __AGS_ENVELOPE_EDITOR_H__ #include #include #include #include #include #define AGS_TYPE_ENVELOPE_EDITOR (ags_envelope_editor_get_type()) #define AGS_ENVELOPE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ENVELOPE_EDITOR, AgsEnvelopeEditor)) #define AGS_ENVELOPE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ENVELOPE_EDITOR, AgsEnvelopeEditorClass)) #define AGS_IS_ENVELOPE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ENVELOPE_EDITOR)) #define AGS_IS_ENVELOPE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ENVELOPE_EDITOR)) #define AGS_ENVELOPE_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ENVELOPE_EDITOR, AgsEnvelopeEditorClass)) #define AGS_ENVELOPE_EDITOR_DEFAULT_VERSION "0.8.2\0" #define AGS_ENVELOPE_EDITOR_DEFAULT_BUILD_ID "CEST 24-05-2017 10:16\0" typedef struct _AgsEnvelopeEditor AgsEnvelopeEditor; typedef struct _AgsEnvelopeEditorClass AgsEnvelopeEditorClass; typedef enum{ AGS_ENVELOPE_EDITOR_CONNECTED = 1, AGS_ENVELOPE_EDITOR_NO_UPDATE = 1 << 1, }AgsEnvelopeEditorFlags; struct _AgsEnvelopeEditor { GtkVBox vbox; guint flags; gchar *version; gchar *build_id; GtkCheckButton *enabled; GtkDialog *rename; GtkComboBoxText *preset; GtkButton *add; GtkButton *remove; AgsCartesian *cartesian; GtkHScale *attack_x; GtkHScale *attack_y; GtkHScale *decay_x; GtkHScale *decay_y; GtkHScale *sustain_x; GtkHScale *sustain_y; GtkHScale *release_x; GtkHScale *release_y; GtkHScale *ratio; }; struct _AgsEnvelopeEditorClass { GtkVBoxClass vbox; }; GType ags_envelope_editor_get_type(void); AgsPreset* ags_envelope_editor_get_active_preset(AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_load_preset(AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_add_preset(AgsEnvelopeEditor *envelope_editor, gchar *preset_name); void ags_envelope_editor_remove_preset(AgsEnvelopeEditor *envelope_editor, guint nth); void ags_envelope_editor_reset_control(AgsEnvelopeEditor *envelope_editor); void ags_envelope_editor_plot(AgsEnvelopeEditor *envelope_editor); AgsEnvelopeEditor* ags_envelope_editor_new(); #endif /*__AGS_ENVELOPE_EDITOR_H__*/ gsequencer-1.4.24/ags/X/editor/ags_vautomation_edit_box.c0000644000175000017500000000531313247044247020365 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_vautomation_edit_box_class_init(AgsVAutomationEditBoxClass *vautomation_edit_box); void ags_vautomation_edit_box_init(AgsVAutomationEditBox *vautomation_edit_box); /** * SECTION:ags_vautomation_edit_box * @short_description: horizontal box widget * @title: AgsVAutomationEditBox * @section_id: * @include: ags/widget/ags_vautomation_edit_box.h * * The #AgsVAutomationEditBox is an horizontal box widget containing #AgsAutomationEdit. */ GType ags_vautomation_edit_box_get_type(void) { static GType ags_type_vautomation_edit_box = 0; if(!ags_type_vautomation_edit_box){ static const GTypeInfo ags_vautomation_edit_box_info = { sizeof (AgsVAutomationEditBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_vautomation_edit_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsVAutomationEditBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_vautomation_edit_box_init, }; ags_type_vautomation_edit_box = g_type_register_static(AGS_TYPE_AUTOMATION_EDIT_BOX, "AgsVAutomationEditBox", &ags_vautomation_edit_box_info, 0); } return(ags_type_vautomation_edit_box); } void ags_vautomation_edit_box_class_init(AgsVAutomationEditBoxClass *vautomation_edit_box) { } void ags_vautomation_edit_box_init(AgsVAutomationEditBox *vautomation_edit_box) { gtk_orientable_set_orientation(GTK_ORIENTABLE(vautomation_edit_box), GTK_ORIENTATION_VERTICAL); } /** * ags_vautomation_edit_box_new: * * Create a new instance of #AgsVAutomationEditBox. * * Returns: the new #AgsVAutomationEditBox instance * * Since: 1.3.0 */ AgsVAutomationEditBox* ags_vautomation_edit_box_new() { AgsVAutomationEditBox *vautomation_edit_box; vautomation_edit_box = (AgsVAutomationEditBox *) g_object_new(AGS_TYPE_VAUTOMATION_EDIT_BOX, NULL); return(vautomation_edit_box); } gsequencer-1.4.24/ags/X/editor/ags_file_selection.h0000644000175000017500000000625213246707333017137 00000000000000/* 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 . */ #ifndef __AGS_FILE_SELECTION_H__ #define __AGS_FILE_SELECTION_H__ #include #include #include #include #include #define AGS_TYPE_FILE_SELECTION (ags_file_selection_get_type()) #define AGS_FILE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FILE_SELECTION, AgsFileSelection)) #define AGS_FILE_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FILE_SELECTION, AgsFileSelectionClass)) #define AGS_IS_FILE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_FILE_SELECTION)) #define AGS_IS_FILE_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_FILE_SELECTION)) #define AGS_FILE_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_FILE_SELECTION, AgsFileSelectionClass)) #define AGS_FILE_SELECTION_ENTRY(strct) ((AgsFileSelectionEntry *) (strct)) typedef struct _AgsFileSelection AgsFileSelection; typedef struct _AgsFileSelectionClass AgsFileSelectionClass; typedef struct _AgsFileSelectionEntry AgsFileSelectionEntry; typedef enum{ AGS_FILE_SELECTION_COMPLETED = 1, }AgsFileSelectionFlags; struct _AgsFileSelection { GtkVBox vbox; guint flags; gchar *directory; guint entry_count; GList *entry; GtkLabel *chosed; GtkLabel *selected; }; struct _AgsFileSelectionClass { GtkVBoxClass vbox; void (*add_entry)(AgsFileSelection *file_selection, GtkWidget *widget); void (*remove_entry)(AgsFileSelection *file_selection, GtkWidget *widget); void (*completed)(AgsFileSelection *file_selection); }; struct _AgsFileSelectionEntry { GtkTable *table; GtkWidget *entry; gboolean chosed; gchar *filename; GtkSpinButton *nth_sample; GtkSpinButton *nth_channel; GtkSpinButton *count; }; GType ags_file_selection_get_type(void); AgsFileSelectionEntry* ags_file_selection_entry_alloc(); void ags_file_selection_set_entry(AgsFileSelection *file_selection, GList *entry_list); void ags_file_selection_add_entry(AgsFileSelection *file_selection, GtkWidget *widget); void ags_file_selection_remove_entry(AgsFileSelection *file_selection, GtkWidget *widget); gboolean ags_file_selection_contains_file(AgsFileSelection *file_selection, gchar *filename); void ags_file_selection_completed(AgsFileSelection *file_selection); AgsFileSelection* ags_file_selection_new(); #endif /*__AGS_FILE_SELECTION_H__*/ gsequencer-1.4.24/ags/X/editor/ags_ramp_acceleration_dialog.h0000644000175000017500000000541513246707333021142 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RAMP_ACCELERATION_DIALOG_H__ #define __AGS_RAMP_ACCELERATION_DIALOG_H__ #include #include #include #define AGS_TYPE_RAMP_ACCELERATION_DIALOG (ags_ramp_acceleration_dialog_get_type()) #define AGS_RAMP_ACCELERATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RAMP_ACCELERATION_DIALOG, AgsRampAccelerationDialog)) #define AGS_RAMP_ACCELERATION_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RAMP_ACCELERATION_DIALOG, AgsRampAccelerationDialogClass)) #define AGS_IS_RAMP_ACCELERATION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RAMP_ACCELERATION_DIALOG)) #define AGS_IS_RAMP_ACCELERATION_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RAMP_ACCELERATION_DIALOG)) #define AGS_RAMP_ACCELERATION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_RAMP_ACCELERATION_DIALOG, AgsRampAccelerationDialogClass)) #define AGS_RAMP_ACCELERATION(ptr) ((AgsRampAcceleration *)(ptr)) #define AGS_RAMP_ACCELERATION_MAX_BEATS (16 * 16 * 1200) #define AGS_RAMP_ACCELERATION_MAX_STEPS (128) #define AGS_RAMP_ACCELERATION_DEFAULT_WIDTH (64) typedef struct _AgsRampAccelerationDialog AgsRampAccelerationDialog; typedef struct _AgsRampAccelerationDialogClass AgsRampAccelerationDialogClass; typedef struct _AgsRampAutomation AgsRampAutomation; typedef enum{ AGS_RAMP_ACCELERATION_DIALOG_CONNECTED = 1, }AgsRampAccelerationDialogFlags; struct _AgsRampAccelerationDialog { GtkDialog dialog; guint flags; GObject *application_context; GtkWidget *main_window; GtkComboBoxText *port; GtkSpinButton *ramp_x0; GtkSpinButton *ramp_y0; GtkSpinButton *ramp_x1; GtkSpinButton *ramp_y1; GtkSpinButton *ramp_step_count; }; struct _AgsRampAccelerationDialogClass { GtkDialogClass dialog; }; GType ags_ramp_acceleration_dialog_get_type(void); AgsRampAccelerationDialog* ags_ramp_acceleration_dialog_new(GtkWidget *main_window); #endif /*__AGS_RAMP_ACCELERATION_DIALOG_H__*/ gsequencer-1.4.24/ags/X/editor/ags_wave_edit.h0000644000175000017500000000734613247044247016126 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WAVE_EDIT_H__ #define __AGS_WAVE_EDIT_H__ #include #include #include #include #include #include #define AGS_TYPE_WAVE_EDIT (ags_wave_edit_get_type()) #define AGS_WAVE_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WAVE_EDIT, AgsWaveEdit)) #define AGS_WAVE_EDIT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_WAVE_EDIT, AgsWaveEditClass)) #define AGS_IS_WAVE_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_WAVE_EDIT)) #define AGS_IS_WAVE_EDIT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_WAVE_EDIT)) #define AGS_WAVE_EDIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_WAVE_EDIT, AgsWaveEditClass)) #define AGS_WAVE_EDIT_DEFAULT_HEIGHT (512) #define AGS_WAVE_EDIT_DEFAULT_WIDTH (512) #define AGS_WAVE_EDIT_DEFAULT_CONTROL_WIDTH (64) #define AGS_WAVE_EDIT_DEFAULT_CONTROL_HEIGHT (8) #define AGS_WAVE_EDIT_DEFAULT_STEP_COUNT (16) #define AGS_WAVE_EDIT_DEFAULT_CURSOR_POSITION_X (0) #define AGS_WAVE_EDIT_DEFAULT_CURSOR_POSITION_Y (0.0) #define AGS_WAVE_EDIT_DEFAULT_FADER_WIDTH (3) #define AGS_WAVE_EDIT_CURSOR_WIDTH (5) #define AGS_WAVE_EDIT_CURSOR_HEIGHT (5) #define AGS_WAVE_EDIT_MIN_ZOOM (1.0 / 16.0) #define AGS_WAVE_EDIT_MAX_ZOOM (4.0) #define AGS_WAVE_EDIT_DEFAULT_LOWER (0.0) #define AGS_WAVE_EDIT_DEFAULT_UPPER (1.0) #define AGS_WAVE_EDIT_DEFAULT_VALUE (0.0) #define AGS_WAVE_EDIT_DEFAULT_PADDING (8) typedef struct _AgsWaveEdit AgsWaveEdit; typedef struct _AgsWaveEditClass AgsWaveEditClass; typedef enum{ AGS_WAVE_EDIT_CONNECTED = 1, AGS_WAVE_EDIT_AUTO_SCROLL = 1 << 1, AGS_WAVE_EDIT_SHOW_RULER = 1 << 2, AGS_WAVE_EDIT_SHOW_VSCROLLBAR = 1 << 3, AGS_WAVE_EDIT_SHOW_HSCROLLBAR = 1 << 4, }AgsWaveEditFlags; typedef enum{ AGS_WAVE_EDIT_NO_EDIT_MODE, AGS_WAVE_EDIT_POSITION_CURSOR, AGS_WAVE_EDIT_ADD_ACCELERATION, AGS_WAVE_EDIT_DELETE_ACCELERATION, AGS_WAVE_EDIT_SELECT_ACCELERATION, }AgsWaveEditMode; typedef enum{ AGS_WAVE_EDIT_KEY_L_CONTROL = 1, AGS_WAVE_EDIT_KEY_R_CONTROL = 1 << 1, AGS_WAVE_EDIT_KEY_L_SHIFT = 1 << 2, AGS_WAVE_EDIT_KEY_R_SHIFT = 1 << 3, }AgsWaveEditKeyMask; struct _AgsWaveEdit { GtkTable table; guint flags; guint mode; guint key_mask; guint note_offset; guint note_offset_absolute; guint control_width; guint control_height; guint step_count; guint cursor_position_x; gdouble cursor_position_y; guint selection_x0; guint selection_x1; guint selection_y0; guint selection_y1; AgsRuler *ruler; gdouble lower; gdouble upper; gdouble default_value; GtkDrawingArea *drawing_area; GtkVScrollbar *vscrollbar; GtkHScrollbar *hscrollbar; }; struct _AgsWaveEditClass { GtkTableClass table; }; GType ags_wave_edit_get_type(void); AgsWaveEdit* ags_wave_edit_new(); #endif /*__AGS_WAVE_EDIT_H__*/ gsequencer-1.4.24/ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c0000644000175000017500000001117213246707333023131 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_ramp_acceleration_dialog_response_callback(GtkWidget *dialog, gint response, AgsRampAccelerationDialog *ramp_acceleration_dialog) { gboolean hide_dialog; hide_dialog = TRUE; switch(response){ case GTK_RESPONSE_APPLY: { hide_dialog = FALSE; } case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(ramp_acceleration_dialog)); } case GTK_RESPONSE_CANCEL: { if(hide_dialog){ gtk_widget_hide(ramp_acceleration_dialog); } } } } void ags_ramp_acceleration_dialog_port_callback(GtkComboBox *combo_box, AgsRampAccelerationDialog *ramp_acceleration_dialog) { AgsWindow *window; AgsAutomationEditor *automation_editor; AgsMachine *machine; AgsAudio *audio; AgsMutexManager *mutex_manager; GList *list_automation; gchar *specifier; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; window = AGS_WINDOW(ramp_acceleration_dialog->main_window); automation_editor = window->automation_window->automation_editor; machine = automation_editor->selected_machine; if(machine == NULL){ return; } audio = machine->audio; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* specifier */ list_automation = NULL; specifier = gtk_combo_box_text_get_active_text(ramp_acceleration_dialog->port); if(specifier != NULL && strlen(specifier) > 0){ pthread_mutex_lock(audio_mutex); list_automation = ags_automation_find_specifier(audio->automation, specifier); pthread_mutex_unlock(audio_mutex); } /* reset range */ if(list_automation != NULL){ AgsAutomation *automation; automation = AGS_AUTOMATION(list_automation->data); gtk_spin_button_set_range(ramp_acceleration_dialog->ramp_y0, automation->lower, automation->upper); gtk_spin_button_set_increments(ramp_acceleration_dialog->ramp_y0, (automation->upper - automation->lower) / automation->steps, (automation->upper - automation->lower) / automation->steps); gtk_spin_button_set_range(ramp_acceleration_dialog->ramp_y1, automation->lower, automation->upper); gtk_spin_button_set_increments(ramp_acceleration_dialog->ramp_y1, (automation->upper - automation->lower) / automation->steps, (automation->upper - automation->lower) / automation->steps); gtk_spin_button_set_range(ramp_acceleration_dialog->ramp_step_count, 0.0, automation->steps); }else{ gtk_spin_button_set_range(ramp_acceleration_dialog->ramp_y0, 0.0, 0.0); gtk_spin_button_set_increments(ramp_acceleration_dialog->ramp_y0, 1.0, 1.0); gtk_spin_button_set_range(ramp_acceleration_dialog->ramp_y1, 0.0, 0.0); gtk_spin_button_set_increments(ramp_acceleration_dialog->ramp_y1, 1.0, 1.0); gtk_spin_button_set_range(ramp_acceleration_dialog->ramp_step_count, 0.0, 0.0); } } void ags_ramp_acceleration_dialog_machine_changed_callback(AgsAutomationEditor *automation_editor, AgsMachine *machine, AgsRampAccelerationDialog *ramp_acceleration_dialog) { ags_applicable_reset(AGS_APPLICABLE(ramp_acceleration_dialog)); } gsequencer-1.4.24/ags/X/editor/ags_position_notation_cursor_dialog_callbacks.h0000644000175000017500000000234613247044247024644 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_POSITION_NOTATION_CURSOR_DIALOG_CALLBACKS_H__ #define __AGS_POSITION_NOTATION_CURSOR_DIALOG_CALLBACKS_H__ #include #include #include #include void ags_position_notation_cursor_dialog_response_callback(GtkWidget *dialog, gint response, AgsPositionNotationCursorDialog *position_notation_cursor_dialog); #endif /*__AGS_POSITION_NOTATION_CURSOR_DIALOG_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_crop_note_dialog.h0000644000175000017500000000446513246707333017466 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CROP_NOTE_DIALOG_H__ #define __AGS_CROP_NOTE_DIALOG_H__ #include #include #include #define AGS_TYPE_CROP_NOTE_DIALOG (ags_crop_note_dialog_get_type()) #define AGS_CROP_NOTE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CROP_NOTE_DIALOG, AgsCropNoteDialog)) #define AGS_CROP_NOTE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CROP_NOTE_DIALOG, AgsCropNoteDialogClass)) #define AGS_IS_CROP_NOTE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CROP_NOTE_DIALOG)) #define AGS_IS_CROP_NOTE_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CROP_NOTE_DIALOG)) #define AGS_CROP_NOTE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_CROP_NOTE_DIALOG, AgsCropNoteDialogClass)) #define AGS_CROP_NOTE_DIALOG_MAX_WIDTH (128 * 16) typedef struct _AgsCropNoteDialog AgsCropNoteDialog; typedef struct _AgsCropNoteDialogClass AgsCropNoteDialogClass; typedef enum{ AGS_CROP_NOTE_DIALOG_CONNECTED = 1, }AgsCropNoteDialogFlags; struct _AgsCropNoteDialog { GtkDialog dialog; guint flags; GObject *application_context; GtkWidget *main_window; GtkCheckButton *absolute; GtkRadioButton *in_place; GtkRadioButton *do_resize; GtkSpinButton *crop_note; GtkSpinButton *padding_note; }; struct _AgsCropNoteDialogClass { GtkDialogClass dialog; }; GType ags_crop_note_dialog_get_type(void); AgsCropNoteDialog* ags_crop_note_dialog_new(GtkWidget *main_window); #endif /*__AGS_CROP_NOTE_DIALOG_H__*/ gsequencer-1.4.24/ags/X/editor/ags_machine_selector_callbacks.h0000644000175000017500000000350113246707333021450 00000000000000/* 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 . */ #ifndef __AGS_MACHINE_SELECTOR_CALLBACKS_H__ #define __AGS_MACHINE_SELECTOR_CALLBACKS_H__ #include void ags_machine_selector_popup_add_tab_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector); void ags_machine_selector_popup_remove_tab_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector); void ags_machine_selector_popup_add_index_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector); void ags_machine_selector_popup_remove_index_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector); void ags_machine_selector_popup_link_index_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector); void ags_machine_selector_popup_reverse_mapping_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector); void ags_machine_selector_popup_shift_piano_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector); void ags_machine_selector_radio_changed(GtkWidget *radio_button, AgsMachineSelector *machine_selector); #endif /*__AGS_MACHINE_SELECTOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_notation_toolbar.h0000644000175000017500000000514013247044247017522 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTATION_TOOLBAR_H__ #define __AGS_NOTATION_TOOLBAR_H__ #include #include #include #define AGS_TYPE_NOTATION_TOOLBAR (ags_notation_toolbar_get_type()) #define AGS_NOTATION_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_NOTATION_TOOLBAR, AgsNotationToolbar)) #define AGS_NOTATION_TOOLBAR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NOTATION_TOOLBAR, AgsNotationToolbarClass)) #define AGS_IS_NOTATION_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_NOTATION_TOOLBAR)) #define AGS_IS_NOTATION_TOOLBAR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_NOTATION_TOOLBAR)) #define AGS_NOTATION_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_NOTATION_TOOLBAR, AgsNotationToolbarClass)) typedef struct _AgsNotationToolbar AgsNotationToolbar; typedef struct _AgsNotationToolbarClass AgsNotationToolbarClass; typedef enum{ AGS_NOTATION_TOOLBAR_CONNECTED = 1, }AgsNotationToolbarFlags; struct _AgsNotationToolbar { GtkToolbar toolbar; guint flags; GtkToggleToolButton *selected_edit_mode; GtkToggleToolButton *position; GtkToggleToolButton *edit; GtkToggleToolButton *clear; GtkToggleToolButton *select; GtkToolButton *copy; GtkToolButton *cut; GtkMenuToolButton *paste_tool; GtkButton *invert; GtkMenuToolButton *menu_tool; GtkMenu *tool_popup; GtkDialog *move_note; GtkDialog *crop_note; GtkDialog *select_note; GtkDialog *position_notation_cursor; guint zoom_history; GtkComboBoxText *zoom; }; struct _AgsNotationToolbarClass { GtkToolbarClass toolbar; }; GType ags_notation_toolbar_get_type(void); GtkMenu* ags_notation_toolbar_tool_popup_new(GtkToolbar *notation_toolbar); AgsNotationToolbar* ags_notation_toolbar_new(); #endif /*__AGS_NOTATION_TOOLBAR_H__*/ gsequencer-1.4.24/ags/X/editor/ags_notation_edit.h0000644000175000017500000001077613247044247017020 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTATION_EDIT_H__ #define __AGS_NOTATION_EDIT_H__ #include #include #include #include #include #include #define AGS_TYPE_NOTATION_EDIT (ags_notation_edit_get_type ()) #define AGS_NOTATION_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_NOTATION_EDIT, AgsNotationEdit)) #define AGS_NOTATION_EDIT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NOTATION_EDIT, AgsNotationEditClass)) #define AGS_IS_NOTATION_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_NOTATION_EDIT)) #define AGS_IS_NOTATION_EDIT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_NOTATION_EDIT)) #define AGS_NOTATION_EDIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_NOTATION_EDIT, AgsNotationEditClass)) #define AGS_NOTATION_EDIT_DEFAULT_CONTROL_WIDTH (64) #define AGS_NOTATION_EDIT_DEFAULT_CONTROL_HEIGHT (14) #define AGS_NOTATION_EDIT_DEFAULT_CONTROL_MARGIN_X (0) #define AGS_NOTATION_EDIT_DEFAULT_CONTROL_MARGIN_Y (2) #define AGS_NOTATION_EDIT_DEFAULT_CURSOR_POSITION_X (0) #define AGS_NOTATION_EDIT_DEFAULT_CURSOR_POSITION_Y (0) #define AGS_NOTATION_EDIT_DEFAULT_FADER_WIDTH (3) #define AGS_NOTATION_EDIT_MIN_ZOOM (1.0 / 16.0) #define AGS_NOTATION_EDIT_MAX_ZOOM (4.0) #define AGS_NOTATION_EDIT_MAX_ZOOM_CONTROL_WIDTH (64.0 * AGS_NOTATION_EDIT_DEFAULT_CONTROL_WIDTH) typedef struct _AgsNotationEdit AgsNotationEdit; typedef struct _AgsNotationEditClass AgsNotationEditClass; typedef enum{ AGS_NOTATION_EDIT_CONNECTED = 1, AGS_NOTATION_EDIT_AUTO_SCROLL = 1 << 1, AGS_NOTATION_EDIT_SHOW_RULER = 1 << 2, AGS_NOTATION_EDIT_SHOW_VSCROLLBAR = 1 << 3, AGS_NOTATION_EDIT_SHOW_HSCROLLBAR = 1 << 4, }AgsNotationEditFlags; typedef enum{ AGS_NOTATION_EDIT_NO_EDIT_MODE, AGS_NOTATION_EDIT_POSITION_CURSOR, AGS_NOTATION_EDIT_ADD_NOTE, AGS_NOTATION_EDIT_DELETE_NOTE, AGS_NOTATION_EDIT_SELECT_NOTE, }AgsNotationEditMode; typedef enum{ AGS_NOTATION_EDIT_BUTTON_1 = 1, }AgsNotationEditButtonMask; typedef enum{ AGS_NOTATION_EDIT_KEY_L_CONTROL = 1, AGS_NOTATION_EDIT_KEY_R_CONTROL = 1 << 1, AGS_NOTATION_EDIT_KEY_L_SHIFT = 1 << 2, AGS_NOTATION_EDIT_KEY_R_SHIFT = 1 << 3, }AgsNotationEditKeyMask; struct _AgsNotationEdit { GtkTable table; guint flags; guint mode; guint button_mask; guint key_mask; guint note_offset; guint note_offset_absolute; guint control_width; guint control_height; guint control_margin_x; guint control_margin_y; guint cursor_position_x; guint cursor_position_y; guint selection_x0; guint selection_x1; guint selection_y0; guint selection_y1; AgsNote *current_note; AgsRuler *ruler; GtkDrawingArea *drawing_area; GtkVScrollbar *vscrollbar; GtkHScrollbar *hscrollbar; }; struct _AgsNotationEditClass { GtkTableClass table; }; GType ags_notation_edit_get_type(void); void ags_notation_edit_reset_vscrollbar(AgsNotationEdit *notation_edit); void ags_notation_edit_reset_hscrollbar(AgsNotationEdit *notation_edit); void ags_notation_edit_draw_segment(AgsNotationEdit *notation_edit); void ags_notation_edit_draw_position(AgsNotationEdit *notation_edit); void ags_notation_edit_draw_cursor(AgsNotationEdit *notation_edit); void ags_notation_edit_draw_selection(AgsNotationEdit *notation_edit); void ags_notation_edit_draw_note(AgsNotationEdit *notation_edit, AgsNote *note, cairo_t *cr, double r, double g, double b, double a); void ags_notation_edit_draw_notation(AgsNotationEdit *notation_edit); void ags_notation_edit_draw(AgsNotationEdit *notation_edit); AgsNotationEdit* ags_notation_edit_new(); #endif /*__AGS_NOTATION_EDIT_H__*/ gsequencer-1.4.24/ags/X/editor/ags_envelope_info_callbacks.c0000644000175000017500000000324113246707333020770 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_envelope_info_plot_callback(GtkCellRendererToggle *cell_renderer, gchar *path_str, AgsEnvelopeInfo *envelope_info) { GtkTreeModel *model; GtkTreeIter iter; GtkTreePath *path; gboolean do_plot; model = gtk_tree_view_get_model(envelope_info->tree_view); path = gtk_tree_path_new_from_string(path_str); /* get toggled iter */ gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, AGS_ENVELOPE_INFO_COLUMN_PLOT, &do_plot, -1); /* do something with the value */ do_plot ^= 1; /* set new value */ gtk_list_store_set(GTK_LIST_STORE(model), &iter, AGS_ENVELOPE_INFO_COLUMN_PLOT, do_plot, -1); /* clean up */ gtk_tree_path_free(path); /* plot */ ags_envelope_info_plot(envelope_info); } gsequencer-1.4.24/ags/X/editor/ags_select_note_dialog_callbacks.c0000644000175000017500000000250613246707333021766 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_select_note_dialog_response_callback(GtkWidget *dialog, gint response, AgsSelectNoteDialog *select_note_dialog) { gboolean hide_dialog; hide_dialog = TRUE; switch(response){ case GTK_RESPONSE_APPLY: { hide_dialog = FALSE; } case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(select_note_dialog)); } case GTK_RESPONSE_CANCEL: { if(hide_dialog){ gtk_widget_hide(select_note_dialog); } } } } gsequencer-1.4.24/ags/X/editor/ags_position_automation_cursor_dialog.h0000644000175000017500000000531113247044247023165 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_POSITION_AUTOMATION_CURSOR_DIALOG_H__ #define __AGS_POSITION_AUTOMATION_CURSOR_DIALOG_H__ #include #include #include #define AGS_TYPE_POSITION_AUTOMATION_CURSOR_DIALOG (ags_position_automation_cursor_dialog_get_type()) #define AGS_POSITION_AUTOMATION_CURSOR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_POSITION_AUTOMATION_CURSOR_DIALOG, AgsPositionAutomationCursorDialog)) #define AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_POSITION_AUTOMATION_CURSOR_DIALOG, AgsPositionAutomationCursorDialogClass)) #define AGS_IS_POSITION_AUTOMATION_CURSOR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_POSITION_AUTOMATION_CURSOR_DIALOG)) #define AGS_IS_POSITION_AUTOMATION_CURSOR_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_POSITION_AUTOMATION_CURSOR_DIALOG)) #define AGS_POSITION_AUTOMATION_CURSOR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_POSITION_AUTOMATION_CURSOR_DIALOG, AgsPositionAutomationCursorDialogClass)) #define AGS_POSITION_AUTOMATION_CURSOR_MAX_BEATS (16 * 1200) typedef struct _AgsPositionAutomationCursorDialog AgsPositionAutomationCursorDialog; typedef struct _AgsPositionAutomationCursorDialogClass AgsPositionAutomationCursorDialogClass; typedef enum{ AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CONNECTED = 1, }AgsPositionAutomationCursorDialogFlags; struct _AgsPositionAutomationCursorDialog { GtkDialog dialog; guint flags; GObject *application_context; GtkWidget *main_window; GtkCheckButton *set_focus; GtkSpinButton *position_x; }; struct _AgsPositionAutomationCursorDialogClass { GtkDialogClass dialog; }; GType ags_position_automation_cursor_dialog_get_type(void); AgsPositionAutomationCursorDialog* ags_position_automation_cursor_dialog_new(GtkWidget *main_window); #endif /*__AGS_POSITION_AUTOMATION_CURSOR_DIALOG_H__*/ gsequencer-1.4.24/ags/X/editor/ags_position_notation_cursor_dialog.c0000644000175000017500000003652313247044247022644 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_position_notation_cursor_dialog_class_init(AgsPositionNotationCursorDialogClass *position_notation_cursor_dialog); void ags_position_notation_cursor_dialog_connectable_interface_init(AgsConnectableInterface *connectable); void ags_position_notation_cursor_dialog_applicable_interface_init(AgsApplicableInterface *applicable); void ags_position_notation_cursor_dialog_init(AgsPositionNotationCursorDialog *position_notation_cursor_dialog); void ags_position_notation_cursor_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_position_notation_cursor_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_position_notation_cursor_dialog_finalize(GObject *gobject); void ags_position_notation_cursor_dialog_connect(AgsConnectable *connectable); void ags_position_notation_cursor_dialog_disconnect(AgsConnectable *connectable); void ags_position_notation_cursor_dialog_set_update(AgsApplicable *applicable, gboolean update); void ags_position_notation_cursor_dialog_apply(AgsApplicable *applicable); void ags_position_notation_cursor_dialog_reset(AgsApplicable *applicable); gboolean ags_position_notation_cursor_dialog_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_position_notation_cursor_dialog * @short_description: position tool * @title: AgsPositionNotationCursorDialog * @section_id: * @include: ags/X/editor/ags_position_notation_cursor_dialog.h * * The #AgsPositionNotationCursorDialog lets you position notation editor cursor. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; static gpointer ags_position_notation_cursor_dialog_parent_class = NULL; GType ags_position_notation_cursor_dialog_get_type(void) { static GType ags_type_position_notation_cursor_dialog = 0; if (!ags_type_position_notation_cursor_dialog){ static const GTypeInfo ags_position_notation_cursor_dialog_info = { sizeof (AgsPositionNotationCursorDialogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_position_notation_cursor_dialog_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPositionNotationCursorDialog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_position_notation_cursor_dialog_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_position_notation_cursor_dialog_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_position_notation_cursor_dialog_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_position_notation_cursor_dialog = g_type_register_static(GTK_TYPE_DIALOG, "AgsPositionNotationCursorDialog", &ags_position_notation_cursor_dialog_info, 0); g_type_add_interface_static(ags_type_position_notation_cursor_dialog, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_position_notation_cursor_dialog, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return (ags_type_position_notation_cursor_dialog); } void ags_position_notation_cursor_dialog_class_init(AgsPositionNotationCursorDialogClass *position_notation_cursor_dialog) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_position_notation_cursor_dialog_parent_class = g_type_class_peek_parent(position_notation_cursor_dialog); /* GObjectClass */ gobject = (GObjectClass *) position_notation_cursor_dialog; gobject->set_property = ags_position_notation_cursor_dialog_set_property; gobject->get_property = ags_position_notation_cursor_dialog_get_property; gobject->finalize = ags_position_notation_cursor_dialog_finalize; /* properties */ /** * AgsPositionNotationCursorDialog:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.1.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsPositionNotationCursorDialog:main-window: * * The assigned #AgsWindow. * * Since: 1.1.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) position_notation_cursor_dialog; widget->delete_event = ags_position_notation_cursor_dialog_delete_event; } void ags_position_notation_cursor_dialog_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_position_notation_cursor_dialog_connect; connectable->disconnect = ags_position_notation_cursor_dialog_disconnect; } void ags_position_notation_cursor_dialog_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_position_notation_cursor_dialog_set_update; applicable->apply = ags_position_notation_cursor_dialog_apply; applicable->reset = ags_position_notation_cursor_dialog_reset; } void ags_position_notation_cursor_dialog_init(AgsPositionNotationCursorDialog *position_notation_cursor_dialog) { GtkVBox *vbox; GtkHBox *hbox; GtkLabel *label; position_notation_cursor_dialog->flags = 0; g_object_set(position_notation_cursor_dialog, "title", i18n("position notation cursor"), NULL); vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) position_notation_cursor_dialog->dialog.vbox, GTK_WIDGET(vbox), FALSE, FALSE, 0); /* set focus */ position_notation_cursor_dialog->set_focus = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("set focus")); gtk_toggle_button_set_active(position_notation_cursor_dialog->set_focus, TRUE); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(position_notation_cursor_dialog->set_focus), FALSE, FALSE, 0); /* position x - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* position x - label */ label = (GtkLabel *) gtk_label_new(i18n("position x")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* position x - spin button */ position_notation_cursor_dialog->position_x = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_POSITION_NOTATION_CURSOR_MAX_BEATS, 1.0); gtk_spin_button_set_value(position_notation_cursor_dialog->position_x, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(position_notation_cursor_dialog->position_x), FALSE, FALSE, 0); /* position y - hbox */ hbox = (GtkVBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) vbox, GTK_WIDGET(hbox), FALSE, FALSE, 0); /* position y - label */ label = (GtkLabel *) gtk_label_new(i18n("position y")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); /* position y - spin button */ position_notation_cursor_dialog->position_y = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_POSITION_NOTATION_CURSOR_MAX_KEYS, 1.0); gtk_spin_button_set_value(position_notation_cursor_dialog->position_y, 0.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(position_notation_cursor_dialog->position_y), FALSE, FALSE, 0); /* dialog buttons */ gtk_dialog_add_buttons((GtkDialog *) position_notation_cursor_dialog, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); } void ags_position_notation_cursor_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPositionNotationCursorDialog *position_notation_cursor_dialog; position_notation_cursor_dialog = AGS_POSITION_NOTATION_CURSOR_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) position_notation_cursor_dialog->application_context == application_context){ return; } if(position_notation_cursor_dialog->application_context != NULL){ g_object_unref(position_notation_cursor_dialog->application_context); } if(application_context != NULL){ g_object_ref(application_context); } position_notation_cursor_dialog->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) position_notation_cursor_dialog->main_window == main_window){ return; } if(position_notation_cursor_dialog->main_window != NULL){ g_object_unref(position_notation_cursor_dialog->main_window); } if(main_window != NULL){ g_object_ref(main_window); } position_notation_cursor_dialog->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_position_notation_cursor_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPositionNotationCursorDialog *position_notation_cursor_dialog; position_notation_cursor_dialog = AGS_POSITION_NOTATION_CURSOR_DIALOG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, position_notation_cursor_dialog->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, position_notation_cursor_dialog->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_position_notation_cursor_dialog_connect(AgsConnectable *connectable) { AgsPositionNotationCursorDialog *position_notation_cursor_dialog; position_notation_cursor_dialog = AGS_POSITION_NOTATION_CURSOR_DIALOG(connectable); if((AGS_POSITION_NOTATION_CURSOR_DIALOG_CONNECTED & (position_notation_cursor_dialog->flags)) != 0){ return; } position_notation_cursor_dialog->flags |= AGS_POSITION_NOTATION_CURSOR_DIALOG_CONNECTED; g_signal_connect(position_notation_cursor_dialog, "response", G_CALLBACK(ags_position_notation_cursor_dialog_response_callback), position_notation_cursor_dialog); } void ags_position_notation_cursor_dialog_disconnect(AgsConnectable *connectable) { AgsPositionNotationCursorDialog *position_notation_cursor_dialog; position_notation_cursor_dialog = AGS_POSITION_NOTATION_CURSOR_DIALOG(connectable); if((AGS_POSITION_NOTATION_CURSOR_DIALOG_CONNECTED & (position_notation_cursor_dialog->flags)) == 0){ return; } position_notation_cursor_dialog->flags &= (~AGS_POSITION_NOTATION_CURSOR_DIALOG_CONNECTED); g_object_disconnect(G_OBJECT(position_notation_cursor_dialog), "any_signal::response", G_CALLBACK(ags_position_notation_cursor_dialog_response_callback), position_notation_cursor_dialog, NULL); } void ags_position_notation_cursor_dialog_finalize(GObject *gobject) { AgsPositionNotationCursorDialog *position_notation_cursor_dialog; position_notation_cursor_dialog = (AgsPositionNotationCursorDialog *) gobject; if(position_notation_cursor_dialog->application_context != NULL){ g_object_unref(position_notation_cursor_dialog->application_context); } G_OBJECT_CLASS(ags_position_notation_cursor_dialog_parent_class)->finalize(gobject); } void ags_position_notation_cursor_dialog_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_position_notation_cursor_dialog_apply(AgsApplicable *applicable) { AgsPositionNotationCursorDialog *position_notation_cursor_dialog; AgsWindow *window; AgsNotationEditor *notation_editor; AgsNotationToolbar *notation_toolbar; AgsMachine *machine; GtkWidget *widget; GtkAdjustment *vadjustment, *hadjustment; gdouble zoom; guint map_height, height; guint history; guint x, y; position_notation_cursor_dialog = AGS_POSITION_NOTATION_CURSOR_DIALOG(applicable); window = position_notation_cursor_dialog->main_window; notation_editor = window->notation_editor; machine = notation_editor->selected_machine; if(machine == NULL){ return; } notation_toolbar = notation_editor->notation_toolbar; history = gtk_combo_box_get_active(GTK_COMBO_BOX(notation_toolbar->zoom)); zoom = exp2((double) history - 2.0); //TODO:JK: implement me } void ags_position_notation_cursor_dialog_reset(AgsApplicable *applicable) { //TODO:JK: implement me } gboolean ags_position_notation_cursor_dialog_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); // GTK_WIDGET_CLASS(ags_position_notation_cursor_dialog_parent_class)->delete_event(widget, event); return(TRUE); } /** * ags_position_notation_cursor_dialog_new: * @main_window: the #AgsWindow * * Create a new #AgsPositionNotationCursorDialog. * * Returns: a new #AgsPositionNotationCursorDialog * * Since: 1.1.0 */ AgsPositionNotationCursorDialog* ags_position_notation_cursor_dialog_new(GtkWidget *main_window) { AgsPositionNotationCursorDialog *position_notation_cursor_dialog; position_notation_cursor_dialog = (AgsPositionNotationCursorDialog *) g_object_new(AGS_TYPE_POSITION_NOTATION_CURSOR_DIALOG, "main-window", main_window, NULL); return(position_notation_cursor_dialog); } gsequencer-1.4.24/ags/X/editor/ags_file_selection_callbacks.h0000644000175000017500000000210313246707333021125 00000000000000/* 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 . */ #ifndef __AGS_FILE_SELECTION_CALLBACKS_H__ #define __AGS_FILE_SELECTION_CALLBACKS_H__ #include #include #include #include void ags_file_selection_remove_callback(GtkButton *button, GtkTable *hbox); #endif /*__AGS_FILE_SELECTION_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_envelope_editor_callbacks.c0000644000175000017500000003566113246707333021336 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include pthread_mutex_t* ags_envelope_editor_get_audio_mutex(AgsEnvelopeInfo *envelope_editor); pthread_mutex_t* ags_envelope_editor_get_audio_mutex(AgsEnvelopeInfo *envelope_editor) { AgsEnvelopeDialog *envelope_dialog; AgsWindow *window; AgsMachine *machine; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(envelope_editor, AGS_TYPE_ENVELOPE_DIALOG); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) envelope_dialog->machine, AGS_TYPE_WINDOW); machine = envelope_dialog->machine; audio = machine->audio; /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); return(audio_mutex); } void ags_envelope_editor_preset_callback(GtkWidget *combo_box, AgsEnvelopeEditor *envelope_editor) { ags_envelope_editor_reset_control(envelope_editor); } void ags_envelope_editor_preset_add_callback(GtkWidget *button, AgsEnvelopeEditor *envelope_editor) { GtkDialog *dialog; GtkEntry *entry; if(envelope_editor->rename != NULL){ return; } envelope_editor->rename = dialog = (GtkDialog *) gtk_dialog_new_with_buttons(i18n("preset name"), (GtkWindow *) gtk_widget_get_toplevel(GTK_WIDGET(envelope_editor)), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); entry = (GtkEntry *) gtk_entry_new(); gtk_box_pack_start((GtkBox *) dialog->vbox, (GtkWidget *) entry, FALSE, FALSE, 0); gtk_widget_show_all((GtkWidget *) dialog); g_signal_connect((GObject *) dialog, "response", G_CALLBACK(ags_envelope_editor_preset_rename_response_callback), (gpointer) envelope_editor); } void ags_envelope_editor_preset_remove_callback(GtkWidget *button, AgsEnvelopeEditor *envelope_editor) { AgsEnvelopeDialog *envelope_dialog; envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(envelope_editor, AGS_TYPE_ENVELOPE_DIALOG); /* remove preset */ ags_envelope_editor_remove_preset(envelope_editor, gtk_combo_box_get_active(envelope_editor->preset)); /* load preset */ ags_envelope_dialog_load_preset(envelope_dialog); } void ags_envelope_editor_preset_rename_response_callback(GtkWidget *widget, gint response, AgsEnvelopeEditor *envelope_editor) { if(response == GTK_RESPONSE_ACCEPT){ AgsEnvelopeDialog *envelope_dialog; gchar *text; envelope_dialog = (AgsEnvelopeDialog *) gtk_widget_get_ancestor(envelope_editor, AGS_TYPE_ENVELOPE_DIALOG); /* get name */ text = gtk_editable_get_chars(GTK_EDITABLE(gtk_container_get_children((GtkContainer *) GTK_DIALOG(widget)->vbox)->data), 0, -1); /* add preset */ ags_envelope_editor_add_preset(envelope_editor, text); /* load preset */ ags_envelope_dialog_load_preset(envelope_dialog); } envelope_editor->rename = NULL; gtk_widget_destroy(widget); return(0); } void ags_envelope_editor_attack_x_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor) { AgsPreset *preset; AgsComplex *val; gdouble attack_x; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_ENVELOPE_EDITOR_NO_UPDATE & (envelope_editor->flags)) != 0){ return; } /* get preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ return; } audio_mutex = ags_envelope_editor_get_audio_mutex(envelope_editor); /* get value and update preset */ attack_x = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "attack", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][0] = attack_x; ags_preset_add_parameter(preset, "attack", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_envelope_editor_plot(envelope_editor); } void ags_envelope_editor_attack_y_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor) { AgsPreset *preset; AgsComplex *val; gdouble attack_y; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_ENVELOPE_EDITOR_NO_UPDATE & (envelope_editor->flags)) != 0){ return; } /* get preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ return; } audio_mutex = ags_envelope_editor_get_audio_mutex(envelope_editor); /* get value and update preset */ attack_y = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "attack", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = attack_y; ags_preset_add_parameter(preset, "attack", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_envelope_editor_plot(envelope_editor); } void ags_envelope_editor_decay_x_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor) { AgsPreset *preset; AgsComplex *val; gdouble decay_x; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_ENVELOPE_EDITOR_NO_UPDATE & (envelope_editor->flags)) != 0){ return; } /* get preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ return; } audio_mutex = ags_envelope_editor_get_audio_mutex(envelope_editor); /* get value and update preset */ decay_x = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "decay", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][0] = decay_x; ags_preset_add_parameter(preset, "decay", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_envelope_editor_plot(envelope_editor); } void ags_envelope_editor_decay_y_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor) { AgsPreset *preset; AgsComplex *val; gdouble decay_y; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_ENVELOPE_EDITOR_NO_UPDATE & (envelope_editor->flags)) != 0){ return; } /* get preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ return; } audio_mutex = ags_envelope_editor_get_audio_mutex(envelope_editor); /* get value and update preset */ decay_y = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "decay", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = decay_y; ags_preset_add_parameter(preset, "decay", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_envelope_editor_plot(envelope_editor); } void ags_envelope_editor_sustain_x_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor) { AgsPreset *preset; AgsComplex *val; gdouble sustain_x; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_ENVELOPE_EDITOR_NO_UPDATE & (envelope_editor->flags)) != 0){ return; } /* get preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ return; } audio_mutex = ags_envelope_editor_get_audio_mutex(envelope_editor); /* get value and update preset */ sustain_x = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "sustain", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][0] = sustain_x; ags_preset_add_parameter(preset, "sustain", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_envelope_editor_plot(envelope_editor); } void ags_envelope_editor_sustain_y_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor) { AgsPreset *preset; AgsComplex *val; gdouble sustain_y; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_ENVELOPE_EDITOR_NO_UPDATE & (envelope_editor->flags)) != 0){ return; } /* get preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ return; } audio_mutex = ags_envelope_editor_get_audio_mutex(envelope_editor); /* get value and update preset */ sustain_y = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "sustain", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = sustain_y; ags_preset_add_parameter(preset, "sustain", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_envelope_editor_plot(envelope_editor); } void ags_envelope_editor_release_x_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor) { AgsPreset *preset; AgsComplex *val; gdouble release_x; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_ENVELOPE_EDITOR_NO_UPDATE & (envelope_editor->flags)) != 0){ return; } /* get preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ return; } audio_mutex = ags_envelope_editor_get_audio_mutex(envelope_editor); /* get value and update preset */ release_x = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "release", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][0] = release_x; ags_preset_add_parameter(preset, "release", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_envelope_editor_plot(envelope_editor); } void ags_envelope_editor_release_y_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor) { AgsPreset *preset; AgsComplex *val; gdouble release_y; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_ENVELOPE_EDITOR_NO_UPDATE & (envelope_editor->flags)) != 0){ return; } /* get preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ return; } audio_mutex = ags_envelope_editor_get_audio_mutex(envelope_editor); /* get value and update preset */ release_y = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "release", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = release_y; ags_preset_add_parameter(preset, "release", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_envelope_editor_plot(envelope_editor); } void ags_envelope_editor_ratio_callback(GtkWidget *range, AgsEnvelopeEditor *envelope_editor) { AgsPreset *preset; AgsComplex *val; gdouble ratio; GValue value = {0,}; GError *error; pthread_mutex_t *audio_mutex; if((AGS_ENVELOPE_EDITOR_NO_UPDATE & (envelope_editor->flags)) != 0){ return; } /* get preset */ preset = ags_envelope_editor_get_active_preset(envelope_editor); if(preset == NULL){ return; } audio_mutex = ags_envelope_editor_get_audio_mutex(envelope_editor); /* get value and update preset */ ratio = gtk_range_get_value((GtkRange *) range); g_value_init(&value, AGS_TYPE_COMPLEX); pthread_mutex_lock(audio_mutex); error = NULL; ags_preset_get_parameter(preset, "ratio", &value, &error); if(error != NULL){ g_message("%s", error->message); pthread_mutex_unlock(audio_mutex); return; } val = (AgsComplex *) g_value_get_boxed(&value); /* add parameter */ val[0][1] = ratio; ags_preset_add_parameter(preset, "ratio", &value); pthread_mutex_unlock(audio_mutex); /* plot */ ags_envelope_editor_plot(envelope_editor); } gsequencer-1.4.24/ags/X/editor/ags_wave_toolbar_callbacks.h0000644000175000017500000000230613247044247020631 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WAVE_TOOLBAR_CALLBACKS_H__ #define __AGS_WAVE_TOOLBAR_CALLBACKS_H__ #include #include #include #include void ags_wave_toolbar_tool_popup_select_audio_data_callback(GtkWidget *item, AgsWaveToolbar *wave_toolbar); void ags_wave_toolbar_tool_popup_position_cursor_callback(GtkWidget *item, AgsWaveToolbar *wave_toolbar); #endif /*__AGS_WAVE_TOOLBAR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_automation_edit_box.c0000644000175000017500000001330313247044247020175 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_automation_edit_box_class_init(AgsAutomationEditBoxClass *automation_edit_box); void ags_automation_edit_box_init(AgsAutomationEditBox *automation_edit_box); void ags_automation_edit_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_automation_edit_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_automation_edit_box_finalize(GObject *gobject); GType ags_automation_edit_box_child_type(GtkContainer *container); /** * SECTION:ags_automation_edit_box * @short_description: abstract box widget * @title: AgsAutomationEditBox * @section_id: * @include: ags/widget/ags_automation_edit_box.h * * The #AgsAutomationEditBox is an abstract box widget containing #AgsAutomationEdit. */ enum{ PROP_0, PROP_FIXED_EDIT_WIDTH, PROP_FIXED_EDIT_HEIGHT, }; static gpointer ags_automation_edit_box_parent_class = NULL; GType ags_automation_edit_box_get_type(void) { static GType ags_type_automation_edit_box = 0; if(!ags_type_automation_edit_box){ static const GTypeInfo ags_automation_edit_box_info = { sizeof (AgsAutomationEditBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_automation_edit_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAutomationEditBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_automation_edit_box_init, }; ags_type_automation_edit_box = g_type_register_static(GTK_TYPE_BOX, "AgsAutomationEditBox", &ags_automation_edit_box_info, 0); } return(ags_type_automation_edit_box); } void ags_automation_edit_box_class_init(AgsAutomationEditBoxClass *automation_edit_box) { GObjectClass *gobject; GtkWidgetClass *widget; GtkContainerClass *container; GParamSpec *param_spec; ags_automation_edit_box_parent_class = g_type_class_peek_parent(automation_edit_box); /* GObjectClass */ gobject = (GObjectClass *) automation_edit_box; gobject->set_property = ags_automation_edit_box_set_property; gobject->get_property = ags_automation_edit_box_get_property; gobject->finalize = ags_automation_edit_box_finalize; /* properties */ /** * AgsAutomationEditBox:fixed-edit-height: * * The fixed height of a edit. * * Since: 1.3.0 */ param_spec = g_param_spec_uint("fixed-edit-height", "fixed edit height", "The fixed height of a edit", 0, G_MAXUINT, AGS_AUTOMATION_EDIT_BOX_DEFAULT_FIXED_EDIT_HEIGHT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIXED_EDIT_HEIGHT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) automation_edit_box; /* GtkContainerClass */ container = (GtkWidgetClass *) automation_edit_box; container->child_type = ags_automation_edit_box_child_type; } void ags_automation_edit_box_init(AgsAutomationEditBox *automation_edit_box) { g_object_set(automation_edit_box, "homogeneous", FALSE, "spacing", 0, NULL); automation_edit_box->flags = 0; automation_edit_box->fixed_edit_height = AGS_AUTOMATION_EDIT_BOX_DEFAULT_FIXED_EDIT_HEIGHT; } void ags_automation_edit_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAutomationEditBox *automation_edit_box; automation_edit_box = AGS_AUTOMATION_EDIT_BOX(gobject); switch(prop_id){ case PROP_FIXED_EDIT_HEIGHT: { automation_edit_box->fixed_edit_height = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_edit_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAutomationEditBox *automation_edit_box; automation_edit_box = AGS_AUTOMATION_EDIT_BOX(gobject); switch(prop_id){ case PROP_FIXED_EDIT_HEIGHT: { g_value_set_uint(value, automation_edit_box->fixed_edit_height); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_edit_box_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_automation_edit_box_parent_class)->finalize(gobject); } GType ags_automation_edit_box_child_type(GtkContainer *container) { return(AGS_TYPE_AUTOMATION_EDIT); } /** * ags_automation_edit_box_new: * * Create a new instance of #AgsAutomationEditBox. * * Returns: the new #AgsAutomationEditBox instance * * Since: 1.3.0 */ AgsAutomationEditBox* ags_automation_edit_box_new() { AgsAutomationEditBox *automation_edit_box; automation_edit_box = (AgsAutomationEditBox *) g_object_new(AGS_TYPE_AUTOMATION_EDIT_BOX, NULL); return(automation_edit_box); } gsequencer-1.4.24/ags/X/editor/ags_wave_edit_box.c0000644000175000017500000001237013247044247016762 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_wave_edit_box_class_init(AgsWaveEditBoxClass *wave_edit_box); void ags_wave_edit_box_init(AgsWaveEditBox *wave_edit_box); void ags_wave_edit_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_wave_edit_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_wave_edit_box_finalize(GObject *gobject); GType ags_wave_edit_box_child_type(GtkContainer *container); /** * SECTION:ags_wave_edit_box * @short_description: abstract box widget * @title: AgsWaveEditBox * @section_id: * @include: ags/widget/ags_wave_edit_box.h * * The #AgsWaveEditBox is an abstract box widget containing #AgsWaveEdit. */ enum{ PROP_0, PROP_FIXED_EDIT_WIDTH, PROP_FIXED_EDIT_HEIGHT, }; static gpointer ags_wave_edit_box_parent_class = NULL; GType ags_wave_edit_box_get_type(void) { static GType ags_type_wave_edit_box = 0; if(!ags_type_wave_edit_box){ static const GTypeInfo ags_wave_edit_box_info = { sizeof (AgsWaveEditBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_wave_edit_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsWaveEditBox), 0, /* n_preallocs */ (GInstanceInitFunc) ags_wave_edit_box_init, }; ags_type_wave_edit_box = g_type_register_static(GTK_TYPE_BOX, "AgsWaveEditBox", &ags_wave_edit_box_info, 0); } return(ags_type_wave_edit_box); } void ags_wave_edit_box_class_init(AgsWaveEditBoxClass *wave_edit_box) { GObjectClass *gobject; GtkWidgetClass *widget; GtkContainerClass *container; GParamSpec *param_spec; ags_wave_edit_box_parent_class = g_type_class_peek_parent(wave_edit_box); /* GObjectClass */ gobject = (GObjectClass *) wave_edit_box; gobject->set_property = ags_wave_edit_box_set_property; gobject->get_property = ags_wave_edit_box_get_property; gobject->finalize = ags_wave_edit_box_finalize; /* properties */ /** * AgsWaveEditBox:fixed-edit-height: * * The fixed height of a edit. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("fixed-edit-height", "fixed edit height", "The fixed height of a edit", 0, G_MAXUINT, AGS_WAVE_EDIT_BOX_DEFAULT_FIXED_EDIT_HEIGHT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIXED_EDIT_HEIGHT, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) wave_edit_box; /* GtkContainerClass */ container = (GtkWidgetClass *) wave_edit_box; container->child_type = ags_wave_edit_box_child_type; } void ags_wave_edit_box_init(AgsWaveEditBox *wave_edit_box) { g_object_set(wave_edit_box, "homogeneous", FALSE, "spacing", 0, NULL); wave_edit_box->flags = 0; wave_edit_box->fixed_edit_height = AGS_WAVE_EDIT_BOX_DEFAULT_FIXED_EDIT_HEIGHT; } void ags_wave_edit_box_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsWaveEditBox *wave_edit_box; wave_edit_box = AGS_WAVE_EDIT_BOX(gobject); switch(prop_id){ case PROP_FIXED_EDIT_HEIGHT: { wave_edit_box->fixed_edit_height = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_wave_edit_box_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsWaveEditBox *wave_edit_box; wave_edit_box = AGS_WAVE_EDIT_BOX(gobject); switch(prop_id){ case PROP_FIXED_EDIT_HEIGHT: { g_value_set_uint(value, wave_edit_box->fixed_edit_height); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_wave_edit_box_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_wave_edit_box_parent_class)->finalize(gobject); } GType ags_wave_edit_box_child_type(GtkContainer *container) { return(AGS_TYPE_WAVE_EDIT); } /** * ags_wave_edit_box_new: * * Create a new instance of #AgsWaveEditBox. * * Returns: the new #AgsWaveEditBox instance * * Since: 1.4.0 */ AgsWaveEditBox* ags_wave_edit_box_new() { AgsWaveEditBox *wave_edit_box; wave_edit_box = (AgsWaveEditBox *) g_object_new(AGS_TYPE_WAVE_EDIT_BOX, NULL); return(wave_edit_box); } gsequencer-1.4.24/ags/X/editor/ags_position_notation_cursor_dialog.h0000644000175000017500000000533713247044247022650 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_POSITION_NOTATION_CURSOR_DIALOG_H__ #define __AGS_POSITION_NOTATION_CURSOR_DIALOG_H__ #include #include #include #define AGS_TYPE_POSITION_NOTATION_CURSOR_DIALOG (ags_position_notation_cursor_dialog_get_type()) #define AGS_POSITION_NOTATION_CURSOR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_POSITION_NOTATION_CURSOR_DIALOG, AgsPositionNotationCursorDialog)) #define AGS_POSITION_NOTATION_CURSOR_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_POSITION_NOTATION_CURSOR_DIALOG, AgsPositionNotationCursorDialogClass)) #define AGS_IS_POSITION_NOTATION_CURSOR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_POSITION_NOTATION_CURSOR_DIALOG)) #define AGS_IS_POSITION_NOTATION_CURSOR_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_POSITION_NOTATION_CURSOR_DIALOG)) #define AGS_POSITION_NOTATION_CURSOR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_POSITION_NOTATION_CURSOR_DIALOG, AgsPositionNotationCursorDialogClass)) #define AGS_POSITION_NOTATION_CURSOR_MAX_BEATS (16 * 1200) #define AGS_POSITION_NOTATION_CURSOR_MAX_KEYS (1024) typedef struct _AgsPositionNotationCursorDialog AgsPositionNotationCursorDialog; typedef struct _AgsPositionNotationCursorDialogClass AgsPositionNotationCursorDialogClass; typedef enum{ AGS_POSITION_NOTATION_CURSOR_DIALOG_CONNECTED = 1, }AgsPositionNotationCursorDialogFlags; struct _AgsPositionNotationCursorDialog { GtkDialog dialog; guint flags; GObject *application_context; GtkWidget *main_window; GtkCheckButton *set_focus; GtkSpinButton *position_x; GtkSpinButton *position_y; }; struct _AgsPositionNotationCursorDialogClass { GtkDialogClass dialog; }; GType ags_position_notation_cursor_dialog_get_type(void); AgsPositionNotationCursorDialog* ags_position_notation_cursor_dialog_new(GtkWidget *main_window); #endif /*__AGS_POSITION_NOTATION_CURSOR_DIALOG_H__*/ gsequencer-1.4.24/ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c0000644000175000017500000000263113247044247024634 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_position_notation_cursor_dialog_response_callback(GtkWidget *dialog, gint response, AgsPositionNotationCursorDialog *position_notation_cursor_dialog) { gboolean hide_dialog; hide_dialog = TRUE; switch(response){ case GTK_RESPONSE_APPLY: { hide_dialog = FALSE; } case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(position_notation_cursor_dialog)); } case GTK_RESPONSE_CANCEL: { if(hide_dialog){ gtk_widget_hide(position_notation_cursor_dialog); } } } } gsequencer-1.4.24/ags/X/editor/ags_inline_player_callbacks.h0000644000175000017500000000176113246707333021004 00000000000000/* 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 . */ #ifndef __AGS_INLINE_PLAYER_CALLBACKS_H__ #define __AGS_INLINE_PLAYER_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_INLINE_PLAYER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/editor/ags_select_note_dialog_callbacks.h0000644000175000017500000000221513246707333021770 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SELECT_NOTE_DIALOG_CALLBACKS_H__ #define __AGS_SELECT_NOTE_DIALOG_CALLBACKS_H__ #include #include #include #include void ags_select_note_dialog_response_callback(GtkWidget *dialog, gint response, AgsSelectNoteDialog *select_note_dialog); #endif /*__AGS_SELECT_NOTE_DIALOG_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_ui_provider.c0000644000175000017500000001360113247044247015202 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_ui_provider_class_init(AgsUiProviderInterface *interface); /** * SECTION:ags_ui_provider * @short_description: provide accoustics * @title: AgsUiProvider * @section_id: AgsUiProvider * @include: ags/X/ags_ui_provider.h * * The #AgsUiProvider provides you the window capabilities. */ GType ags_ui_provider_get_type() { static GType ags_type_ui_provider = 0; if(!ags_type_ui_provider){ ags_type_ui_provider = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsUiProvider", sizeof(AgsUiProviderInterface), (GClassInitFunc) ags_ui_provider_class_init, 0, NULL, 0); } return(ags_type_ui_provider); } void ags_ui_provider_class_init(AgsUiProviderInterface *interface) { /* empty */ } /** * ags_ui_provider_get_window: * @ui_provider: the #AgsUiProvider * * Get window. * * Returns: the #AgsWindow * * Since: 1.0.0 */ GtkWidget* ags_ui_provider_get_window(AgsUiProvider *ui_provider) { AgsUiProviderInterface *ui_provider_interface; g_return_val_if_fail(AGS_IS_UI_PROVIDER(ui_provider), NULL); ui_provider_interface = AGS_UI_PROVIDER_GET_INTERFACE(ui_provider); g_return_val_if_fail(ui_provider_interface->get_window, NULL); return(ui_provider_interface->get_window(ui_provider)); } /** * ags_ui_provider_get_window: * @ui_provider: the #AgsUiProvider * @window: the #AgsWindow * * Set window. * * Since: 1.0.0 */ void ags_ui_provider_set_window(AgsUiProvider *ui_provider, GtkWidget *window) { AgsUiProviderInterface *ui_provider_interface; g_return_if_fail(AGS_IS_UI_PROVIDER(ui_provider)); ui_provider_interface = AGS_UI_PROVIDER_GET_INTERFACE(ui_provider); g_return_if_fail(ui_provider_interface->set_window); ui_provider_interface->set_window(ui_provider, window); } /** * ags_ui_provider_get_gui_thread: * @ui_provider: the #AgsUiProvider * * Get gui thread. * * Returns: the #AgsGuiThread * * Since: 1.4.0 */ AgsThread* ags_ui_provider_get_gui_thread(AgsUiProvider *ui_provider) { AgsUiProviderInterface *ui_provider_interface; g_return_val_if_fail(AGS_IS_UI_PROVIDER(ui_provider), NULL); ui_provider_interface = AGS_UI_PROVIDER_GET_INTERFACE(ui_provider); g_return_val_if_fail(ui_provider_interface->get_gui_thread, NULL); return(ui_provider_interface->get_gui_thread(ui_provider)); } /** * ags_ui_provider_get_gui_thread: * @ui_provider: the #AgsUiProvider * @gui_thread: the #AgsGuiThread * * Set gui thread. * * Since: 1.4.0 */ void ags_ui_provider_set_gui_thread(AgsUiProvider *ui_provider, AgsThread *gui_thread) { AgsUiProviderInterface *ui_provider_interface; g_return_if_fail(AGS_IS_UI_PROVIDER(ui_provider)); ui_provider_interface = AGS_UI_PROVIDER_GET_INTERFACE(ui_provider); g_return_if_fail(ui_provider_interface->set_gui_thread); ui_provider_interface->set_gui_thread(ui_provider, gui_thread); } /** * ags_ui_provider_get_show_animation: * @ui_provider: the #AgsUiProvider * * Get show animation. * * Returns: %TRUE if animation does show, else %FALSE * * Since: 1.4.0 */ gboolean ags_ui_provider_get_show_animation(AgsUiProvider *ui_provider) { AgsUiProviderInterface *ui_provider_interface; g_return_val_if_fail(AGS_IS_UI_PROVIDER(ui_provider), NULL); ui_provider_interface = AGS_UI_PROVIDER_GET_INTERFACE(ui_provider); g_return_val_if_fail(ui_provider_interface->get_show_animation, NULL); return(ui_provider_interface->get_show_animation(ui_provider)); } /** * ags_ui_provider_set_show_animation: * @ui_provider: the #AgsUiProvider * @do_show_animation: do show animation * * Set show animation. * * Since: 1.4.0 */ void ags_ui_provider_set_show_animation(AgsUiProvider *ui_provider, gboolean do_show_animation) { AgsUiProviderInterface *ui_provider_interface; g_return_if_fail(AGS_IS_UI_PROVIDER(ui_provider)); ui_provider_interface = AGS_UI_PROVIDER_GET_INTERFACE(ui_provider); g_return_if_fail(ui_provider_interface->set_show_animation); ui_provider_interface->set_show_animation(ui_provider, do_show_animation); } /** * ags_ui_provider_get_gui_ready: * @ui_provider: the #AgsUiProvider * * Get GUI ready. * * Returns: %TRUE if gui is ready, else %FALSE * * Since: 1.4.0 */ gboolean ags_ui_provider_get_gui_ready(AgsUiProvider *ui_provider) { AgsUiProviderInterface *ui_provider_interface; g_return_val_if_fail(AGS_IS_UI_PROVIDER(ui_provider), NULL); ui_provider_interface = AGS_UI_PROVIDER_GET_INTERFACE(ui_provider); g_return_val_if_fail(ui_provider_interface->get_gui_ready, NULL); return(ui_provider_interface->get_gui_ready(ui_provider)); } /** * ags_ui_provider_set_gui_ready: * @ui_provider: the #AgsUiProvider * @is_gui_ready: is GUI ready * * Set GUI ready. * * Since: 1.4.0 */ void ags_ui_provider_set_gui_ready(AgsUiProvider *ui_provider, gboolean is_gui_ready) { AgsUiProviderInterface *ui_provider_interface; g_return_if_fail(AGS_IS_UI_PROVIDER(ui_provider)); ui_provider_interface = AGS_UI_PROVIDER_GET_INTERFACE(ui_provider); g_return_if_fail(ui_provider_interface->set_gui_ready); ui_provider_interface->set_gui_ready(ui_provider, is_gui_ready); } gsequencer-1.4.24/ags/X/ags_context_menu.c0000644000175000017500000004373213246707333015374 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_context_menu_class_init(AgsContextMenuClass *context_menu); void ags_context_menu_connectable_interface_init(AgsConnectableInterface *connectable); void ags_context_menu_init(AgsContextMenu *context_menu); void ags_context_menu_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_context_menu_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_context_menu_connect(AgsConnectable *connectable); void ags_context_menu_disconnect(AgsConnectable *connectable); /** * SECTION:ags_context_menu * @short_description: the menu bar. * @title: AgsContextMenu * @section_id: * @include: ags/X/ags_context_menu.h * * #AgsContextMenu is a composite widget to be used as application's menu bar. */ GType ags_context_menu_get_type(void) { static GType ags_type_context_menu = 0; if(!ags_type_context_menu){ static const GTypeInfo ags_context_menu_info = { sizeof (AgsContextMenuClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_context_menu_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsContextMenu), 0, /* n_preallocs */ (GInstanceInitFunc) ags_context_menu_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_context_menu_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_context_menu = g_type_register_static(GTK_TYPE_MENU, "AgsContextMenu", &ags_context_menu_info, 0); g_type_add_interface_static(ags_type_context_menu, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_context_menu); } void ags_context_menu_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_context_menu_connect; connectable->disconnect = ags_context_menu_disconnect; } void ags_context_menu_class_init(AgsContextMenuClass *context_menu) { } void ags_context_menu_init(AgsContextMenu *context_menu) { GtkImageMenuItem *item; GtkAccelGroup *accel_group; accel_group = gtk_accel_group_new(); context_menu->flags = 0; item = (GtkImageMenuItem *) gtk_tearoff_menu_item_new(); gtk_menu_shell_append((GtkMenuShell*) context_menu, (GtkWidget*) item); /* File */ item = (GtkImageMenuItem *) gtk_menu_item_new_with_mnemonic("_File"); gtk_menu_shell_append((GtkMenuShell*) context_menu, (GtkWidget*) item); context_menu->file = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) context_menu->file); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_OPEN, accel_group); gtk_menu_shell_append((GtkMenuShell*) context_menu->file, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_SAVE, accel_group); gtk_menu_shell_append((GtkMenuShell*) context_menu->file, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_SAVE_AS, accel_group); gtk_menu_shell_append((GtkMenuShell*) context_menu->file, (GtkWidget*) item); gtk_menu_shell_append((GtkMenuShell*) context_menu->file, (GtkWidget*) gtk_separator_menu_item_new()); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("export")); gtk_menu_shell_append((GtkMenuShell*) context_menu->file, (GtkWidget*) item); gtk_menu_shell_append((GtkMenuShell*) context_menu->file, (GtkWidget*) gtk_separator_menu_item_new()); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT, accel_group); gtk_menu_shell_append((GtkMenuShell*) context_menu->file, (GtkWidget*) item); /* Edit */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_EDIT, accel_group); gtk_menu_shell_append((GtkMenuShell*) context_menu, (GtkWidget*) item); context_menu->edit = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) context_menu->edit); // item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_UNDO, accel_group); // gtk_menu_shell_append((GtkMenuShell*) menu, (GtkWidget*) item); // item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_REDO, accel_group); // gtk_menu_shell_append((GtkMenuShell*) menu, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD, accel_group); gtk_menu_shell_append((GtkMenuShell*) context_menu->edit, (GtkWidget*) item); context_menu->add = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) context_menu->add); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Panel")); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Mixer")); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Drum")); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Matrix")); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Synth")); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Syncsynth")); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); #ifdef AGS_WITH_LIBINSTPATCH item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("FPlayer")); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); #endif /* bridge */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("LADSPA")); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) ags_ladspa_bridge_menu_new()); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("DSSI")); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) ags_dssi_bridge_menu_new()); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Lv2")); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) ags_lv2_bridge_menu_new()); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); /* live */ context_menu->live = (GtkMenu *) gtk_menu_new(); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("live!"); gtk_menu_item_set_submenu((GtkMenuItem*) item, context_menu->live); gtk_menu_shell_append((GtkMenuShell*) context_menu->add, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("DSSI")); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) ags_live_dssi_bridge_menu_new()); gtk_menu_shell_append((GtkMenuShell*) context_menu->live, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Lv2")); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) ags_live_lv2_bridge_menu_new()); gtk_menu_shell_append((GtkMenuShell*) context_menu->live, (GtkWidget*) item); /* automation */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label(i18n("Automation")); // gtk_widget_set_sensitive(item, // FALSE); gtk_menu_shell_append((GtkMenuShell*) context_menu->edit, (GtkWidget*) item); /* preferences */ gtk_menu_shell_append((GtkMenuShell*) context_menu->edit, (GtkWidget*) gtk_separator_menu_item_new()); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_PREFERENCES, accel_group); gtk_menu_shell_append((GtkMenuShell*) context_menu->edit, (GtkWidget*) item); /* MIDI */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("MIDI"); gtk_menu_shell_append((GtkMenuShell*) context_menu, (GtkWidget*) item); context_menu->midi = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) context_menu->midi); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("import"); gtk_menu_shell_append((GtkMenuShell*) context_menu->midi, (GtkWidget*) item); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("export track"); gtk_menu_shell_append((GtkMenuShell*) context_menu->midi, (GtkWidget*) item); gtk_menu_shell_append((GtkMenuShell*) context_menu->midi, (GtkWidget*) gtk_separator_menu_item_new()); item = (GtkImageMenuItem *) gtk_image_menu_item_new_with_label("playback"); gtk_widget_set_sensitive(item, FALSE); gtk_menu_shell_append((GtkMenuShell*) context_menu->midi, (GtkWidget*) item); /* Help */ item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_HELP, accel_group); gtk_menu_shell_append((GtkMenuShell*) context_menu, (GtkWidget*) item); context_menu->help = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu((GtkMenuItem*) item, (GtkWidget*) context_menu->help); item = (GtkImageMenuItem *) gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, accel_group); gtk_menu_shell_append((GtkMenuShell*) context_menu->help, (GtkWidget*) item); } void ags_context_menu_connect(AgsConnectable *connectable) { AgsContextMenu *context_menu; GList *list0, *list1, *list2, *list3, *list4; GList *list1_start, *list2_start, *list3_start, *list4_start; context_menu = AGS_CONTEXT_MENU(connectable); if((AGS_CONTEXT_MENU_CONNECTED & (context_menu->flags)) != 0){ return; } context_menu->flags |= AGS_CONTEXT_MENU_CONNECTED; /* File */ list0 = GTK_MENU_SHELL(context_menu)->children; list0 = list0->next; list1_start = list1 = gtk_container_get_children ((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list0->data)); g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_open_callback), (gpointer) context_menu); list1 = list1->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_save_callback), (gpointer) context_menu); list1 = list1->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_save_as_callback), context_menu); list1 = list1->next->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_export_callback), context_menu); list1 = list1->next->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_quit_callback), (gpointer) context_menu); g_list_free(list1_start); /* Edit */ list0 = list0->next; list1_start = list1 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list0->data)); g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_add_callback), (gpointer) context_menu); list2_start = list2 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list1->data)); list1 = list1->next; /* machines */ g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_panel_callback), (gpointer) context_menu); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_mixer_callback), (gpointer) context_menu); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_drum_callback), (gpointer) context_menu); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_matrix_callback), (gpointer) context_menu); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_synth_callback), (gpointer) context_menu); list2 = list2->next; g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_syncsynth_callback), (gpointer) context_menu); list2 = list2->next; #ifdef AGS_WITH_LIBINSTPATCH g_signal_connect (G_OBJECT (list2->data), "activate", G_CALLBACK (ags_menu_action_add_ffplayer_callback), (gpointer) context_menu); list2 = list2->next; #endif /* ladspa */ list3_start = list3 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list2->data)); list2 = list2->next; while(list3 != NULL){ g_signal_connect(G_OBJECT(list3->data), "activate", G_CALLBACK(ags_menu_action_add_ladspa_bridge_callback), (gpointer) context_menu); list3 = list3->next; } g_list_free(list3_start); /* dssi */ list3_start = list3 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list2->data)); list2 = list2->next; while(list3 != NULL){ g_signal_connect(G_OBJECT(list3->data), "activate", G_CALLBACK(ags_menu_action_add_dssi_bridge_callback), (gpointer) context_menu); list3 = list3->next; } g_list_free(list3_start); /* lv2 */ list3_start = list3 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list2->data)); list2 = list2->next; while(list3 != NULL){ g_signal_connect(G_OBJECT(list3->data), "activate", G_CALLBACK(ags_menu_action_add_lv2_bridge_callback), (gpointer) context_menu); list3 = list3->next; } g_list_free(list3_start); /* live! */ list3 = list3_start = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list2->data)); /* dssi */ list4_start = list4 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list3->data)); list3 = list3->next; while(list4 != NULL){ g_signal_connect(G_OBJECT(list4->data), "activate", G_CALLBACK(ags_menu_action_add_live_dssi_bridge_callback), (gpointer) context_menu); list4 = list4->next; } g_list_free(list4_start); /* lv2 */ list4_start = list4 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list3->data)); // list3 = list3->next; while(list4 != NULL){ g_signal_connect(G_OBJECT(list4->data), "activate", G_CALLBACK(ags_menu_action_add_live_lv2_bridge_callback), (gpointer) context_menu); list4 = list4->next; } g_list_free(list4_start); g_list_free(list3_start); g_list_free(list2_start); /* automation and preferences */ g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_automation_callback), (gpointer) context_menu); list1 = list1->next; list1 = list1->next; g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_preferences_callback), (gpointer) context_menu); g_list_free(list1_start); /* MIDI */ list0 = list0->next; list1_start = list1 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list0->data)); g_signal_connect(G_OBJECT(list1->data), "activate", G_CALLBACK(ags_menu_action_midi_import_callback), (gpointer) context_menu); list1 = list1->next; g_signal_connect(G_OBJECT(list1->data), "activate", G_CALLBACK(ags_menu_action_midi_export_track_callback), (gpointer) context_menu); list1 = list1->next; list1 = list1->next; g_signal_connect(G_OBJECT(list1->data), "activate", G_CALLBACK(ags_menu_action_midi_playback_callback), (gpointer) context_menu); g_list_free(list1_start); /* Help */ list0 = list0->next; list1_start = list1 = gtk_container_get_children((GtkContainer *) gtk_menu_item_get_submenu((GtkMenuItem *) list0->data)); g_signal_connect (G_OBJECT (list1->data), "activate", G_CALLBACK (ags_menu_action_about_callback), (gpointer) context_menu); g_list_free(list1_start); } void ags_context_menu_disconnect(AgsConnectable *connectable) { AgsContextMenu *context_menu; context_menu = AGS_CONTEXT_MENU(connectable); if((AGS_CONTEXT_MENU_CONNECTED & (context_menu->flags)) == 0){ return; } context_menu->flags &= (~AGS_CONTEXT_MENU_CONNECTED); /* empty */ } /** * ags_context_menu_new: * * Creates an #AgsContextMenu * * Returns: a new #AgsContextMenu * * Since: 1.0.0 */ AgsContextMenu* ags_context_menu_new() { AgsContextMenu *context_menu; context_menu = (AgsContextMenu *) g_object_new(AGS_TYPE_CONTEXT_MENU, NULL); return(context_menu); } gsequencer-1.4.24/ags/X/ags_effect_pad.h0000644000175000017500000000603513246707333014744 00000000000000/* 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 . */ #ifndef __AGS_EFFECT_PAD_H__ #define __AGS_EFFECT_PAD_H__ #include #include #include #include #define AGS_TYPE_EFFECT_PAD (ags_effect_pad_get_type()) #define AGS_EFFECT_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EFFECT_PAD, AgsEffectPad)) #define AGS_EFFECT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EFFECT_PAD, AgsEffectPadClass)) #define AGS_IS_EFFECT_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_EFFECT_PAD)) #define AGS_IS_EFFECT_PAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_EFFECT_PAD)) #define AGS_EFFECT_PAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_EFFECT_PAD, AgsEffectPadClass)) #define AGS_EFFECT_PAD_DEFAULT_VERSION "0.7.8\0" #define AGS_EFFECT_PAD_DEFAULT_BUILD_ID "CEST 01-03-2016 00:23\0" #define AGS_EFFECT_PAD_COLUMNS_COUNT (2) typedef struct _AgsEffectPad AgsEffectPad; typedef struct _AgsEffectPadClass AgsEffectPadClass; typedef enum{ AGS_EFFECT_PAD_MAPPED_RECALL = 1, AGS_EFFECT_PAD_PREMAPPED_RECALL = 1 << 1, AGS_EFFECT_PAD_CONNECTED = 1 << 2, AGS_EFFECT_PAD_SHOW_GROUPING = 1 << 3, AGS_EFFECT_PAD_GROUP_ALL = 1 << 4, AGS_EFFECT_PAD_GROUP_LINE = 1 << 5, }AgsEffectPadFlags; struct _AgsEffectPad { GtkVBox vbox; guint flags; gchar *name; gchar *version; gchar *build_id; AgsChannel *channel; guint cols; GtkTable *table; }; struct _AgsEffectPadClass { GtkVBoxClass vbox; void (*set_channel)(AgsEffectPad *effect_pad, AgsChannel *channel); void (*resize_lines)(AgsEffectPad *effect_pad, GType line_type, guint audio_channels, guint audio_channels_old); void (*map_recall)(AgsEffectPad *effect_pad); GList* (*find_port)(AgsEffectPad *effect_pad); }; GType ags_effect_pad_get_type(void); void ags_effect_pad_set_channel(AgsEffectPad *effect_pad, AgsChannel *channel); void ags_effect_pad_resize_lines(AgsEffectPad *effect_pad, GType line_type, guint audio_channels, guint audio_channels_old); void ags_effect_pad_map_recall(AgsEffectPad *effect_pad); GList* ags_effect_pad_find_port(AgsEffectPad *effect_pad); AgsEffectPad* ags_effect_pad_new(AgsChannel *channel); #endif /*__AGS_EFFECT_PAD_H__*/ gsequencer-1.4.24/ags/X/ags_property_editor_callbacks.h0000644000175000017500000000214013246707333020106 00000000000000/* 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 . */ #ifndef __AGS_PROPERTY_EDITOR_CALLBACKS_H__ #define __AGS_PROPERTY_EDITOR_CALLBACKS_H__ #include #include #include #include void ags_property_editor_enable_callback(GtkToggleButton *toggle, AgsPropertyEditor *property_editor); #endif /*__AGS_PROPERTY_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_listing_editor.c0000644000175000017500000002646513247044247015706 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_listing_editor_class_init(AgsListingEditorClass *listing_editor); void ags_listing_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_listing_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_listing_editor_init(AgsListingEditor *listing_editor); void ags_listing_editor_connect(AgsConnectable *connectable); void ags_listing_editor_disconnect(AgsConnectable *connectable); void ags_listing_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_listing_editor_apply(AgsApplicable *applicable); void ags_listing_editor_reset(AgsApplicable *applicable); /** * SECTION:ags_listing_editor * @short_description: pack pad editors. * @title: AgsListingEditor * @section_id: * @include: ags/X/ags_listing_editor.h * * #AgsListingEditor is a composite widget to pack #AgsPadEditor. */ static gpointer ags_listing_editor_parent_class = NULL; static AgsConnectableInterface* ags_listing_editor_parent_connectable_interface; GType ags_listing_editor_get_type(void) { static GType ags_type_listing_editor = 0; if(!ags_type_listing_editor){ static const GTypeInfo ags_listing_editor_info = { sizeof (AgsListingEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_listing_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsListingEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_listing_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_listing_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_listing_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_listing_editor = g_type_register_static(AGS_TYPE_PROPERTY_LISTING_EDITOR, "AgsListingEditor", &ags_listing_editor_info, 0); g_type_add_interface_static(ags_type_listing_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_listing_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_listing_editor); } void ags_listing_editor_class_init(AgsListingEditorClass *listing_editor) { } void ags_listing_editor_connectable_interface_init(AgsConnectableInterface *connectable) { ags_listing_editor_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_listing_editor_connect; connectable->disconnect = ags_listing_editor_disconnect; } void ags_listing_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_listing_editor_set_update; applicable->apply = ags_listing_editor_apply; applicable->reset = ags_listing_editor_reset; } void ags_listing_editor_init(AgsListingEditor *listing_editor) { g_signal_connect_after(G_OBJECT(listing_editor), "parent_set", G_CALLBACK(ags_listing_editor_parent_set_callback), listing_editor); listing_editor->channel_type = G_TYPE_NONE; listing_editor->child = NULL; } void ags_listing_editor_connect(AgsConnectable *connectable) { AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; GList *pad_editor, *pad_editor_start; listing_editor = AGS_LISTING_EDITOR(connectable); if((AGS_PROPERTY_EDITOR_CONNECTED & (AGS_PROPERTY_EDITOR(listing_editor)->flags)) != 0){ return; } ags_listing_editor_parent_connectable_interface->connect(connectable); machine_editor = (AgsMachineEditor *) gtk_widget_get_ancestor(GTK_WIDGET(listing_editor), AGS_TYPE_MACHINE_EDITOR); if(machine_editor != NULL && machine_editor->machine != NULL){ g_signal_connect_after(G_OBJECT(machine_editor->machine), "resize-pads", G_CALLBACK(ags_listing_editor_resize_pads_callback), listing_editor); } /* AgsPadEditor */ pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(listing_editor->child)); while(pad_editor != NULL){ ags_connectable_connect(AGS_CONNECTABLE(pad_editor->data)); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } void ags_listing_editor_disconnect(AgsConnectable *connectable) { AgsMachineEditor *machine_editor; AgsListingEditor *listing_editor; GList *pad_editor, *pad_editor_start; listing_editor = AGS_LISTING_EDITOR(connectable); if((AGS_PROPERTY_EDITOR_CONNECTED & (AGS_PROPERTY_EDITOR(listing_editor)->flags)) == 0){ return; } ags_listing_editor_parent_connectable_interface->disconnect(connectable); machine_editor = (AgsMachineEditor *) gtk_widget_get_ancestor(GTK_WIDGET(listing_editor), AGS_TYPE_MACHINE_EDITOR); if(machine_editor != NULL && machine_editor->machine != NULL){ g_object_disconnect(G_OBJECT(machine_editor->machine), "any_signal::resize-pads", G_CALLBACK(ags_listing_editor_resize_pads_callback), listing_editor, NULL); } /* AgsPadEditor */ pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(listing_editor->child)); while(pad_editor != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(pad_editor->data)); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } void ags_listing_editor_set_update(AgsApplicable *applicable, gboolean update) { AgsListingEditor *listing_editor; GList *pad_editor, *pad_editor_start; listing_editor = AGS_LISTING_EDITOR(applicable); pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(listing_editor->child)); while(pad_editor != NULL){ ags_applicable_set_update(AGS_APPLICABLE(pad_editor->data), update); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } void ags_listing_editor_apply(AgsApplicable *applicable) { AgsListingEditor *listing_editor; GList *pad_editor, *pad_editor_start; listing_editor = AGS_LISTING_EDITOR(applicable); if((AGS_PROPERTY_EDITOR_ENABLED & (AGS_PROPERTY_EDITOR(listing_editor)->flags)) == 0){ return; } pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(listing_editor->child)); while(pad_editor != NULL){ ags_applicable_apply(AGS_APPLICABLE(pad_editor->data)); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } void ags_listing_editor_reset(AgsApplicable *applicable) { AgsListingEditor *listing_editor; GList *pad_editor, *pad_editor_start; listing_editor = AGS_LISTING_EDITOR(applicable); pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(listing_editor->child)); while(pad_editor != NULL){ ags_applicable_reset(AGS_APPLICABLE(pad_editor->data)); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } /** * ags_listing_editor_add_children: * @listing_editor: the #AgsListingEditor * @audio: the #AgsAudio to use * @nth_channel: nth channel to start creation until end * @connect: if %TRUE widget is connected and shown * * Creates new pad editors or destroys them. * * Since: 1.0.0 */ void ags_listing_editor_add_children(AgsListingEditor *listing_editor, AgsAudio *audio, guint nth_channel, gboolean connect) { AgsPadEditor *pad_editor; GtkVBox *vbox; AgsChannel *channel; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(nth_channel == 0 && listing_editor->child != NULL){ vbox = listing_editor->child; listing_editor->child = NULL; gtk_widget_destroy(GTK_WIDGET(vbox)); } if(audio == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, audio); pthread_mutex_unlock(application_mutex); /* instantiate pad editor vbox */ if(nth_channel == 0){ listing_editor->child = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(listing_editor), GTK_WIDGET(listing_editor->child), FALSE, FALSE, 0); } /* get current channel */ if(listing_editor->channel_type == AGS_TYPE_OUTPUT){ pthread_mutex_lock(audio_mutex); channel = audio->output; pthread_mutex_unlock(audio_mutex); channel = ags_channel_nth(channel, nth_channel); }else{ pthread_mutex_lock(audio_mutex); channel = audio->input; pthread_mutex_unlock(audio_mutex); channel = ags_channel_nth(channel, nth_channel); } while(channel != NULL){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, channel); pthread_mutex_unlock(application_mutex); /* instantiate pad editor */ pad_editor = ags_pad_editor_new(NULL); pad_editor->editor_type_count = 2; pad_editor->editor_type = (GType *) malloc(pad_editor->editor_type_count * sizeof(GType)); pad_editor->editor_type[0] = AGS_TYPE_LINK_EDITOR; pad_editor->editor_type[1] = AGS_TYPE_LINE_MEMBER_EDITOR; g_object_set(pad_editor, "channel", channel, NULL); gtk_box_pack_start(GTK_BOX(listing_editor->child), GTK_WIDGET(pad_editor), FALSE, FALSE, 0); if(connect){ ags_connectable_connect(AGS_CONNECTABLE(pad_editor)); gtk_widget_show_all(GTK_WIDGET(pad_editor)); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next_pad; pthread_mutex_unlock(channel_mutex); } } /** * ags_listing_editor_new: * @channel_type: the channel type to represent * * Creates an #AgsListingEditor * * Returns: a new #AgsListingEditor * * Since: 1.0.0 */ AgsListingEditor* ags_listing_editor_new(GType channel_type) { AgsListingEditor *listing_editor; listing_editor = (AgsListingEditor *) g_object_new(AGS_TYPE_LISTING_EDITOR, NULL); listing_editor->channel_type = channel_type; return(listing_editor); } gsequencer-1.4.24/ags/X/ags_machine_editor.h0000644000175000017500000000676013247044247015642 00000000000000/* 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 . */ #ifndef __AGS_MACHINE_EDITOR_H__ #define __AGS_MACHINE_EDITOR_H__ #include #include #include #include #include #include #include #define AGS_TYPE_MACHINE_EDITOR (ags_machine_editor_get_type()) #define AGS_MACHINE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MACHINE_EDITOR, AgsMachineEditor)) #define AGS_MACHINE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MACHINE_EDITOR, AgsMachineEditorClass)) #define AGS_IS_MACHINE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MACHINE_EDITOR)) #define AGS_IS_MACHINE_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MACHINE_EDITOR)) #define AGS_MACHINE_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MACHINE_EDITOR, AgsMachineEditorClass)) #define AGS_MACHINE_EDITOR_DEFAULT_VERSION "0.4.2\0" #define AGS_MACHINE_EDITOR_DEFAULT_BUILD_ID "CEST 02-10-2014 19:36\0" typedef struct _AgsMachineEditor AgsMachineEditor; typedef struct _AgsMachineEditorClass AgsMachineEditorClass; typedef enum{ AGS_MACHINE_EDITOR_CONNECTED = 1, AGS_MACHINE_EDITOR_CLOSING = 1 << 1, }AgsMachineEditorFlags; struct _AgsMachineEditor { GtkDialog dialog; guint flags; gchar *version; gchar *build_id; AgsMachine *machine; GtkNotebook *notebook; GtkScrolledWindow *output_scrolled_window; AgsListingEditor *output_editor; GtkScrolledWindow *input_scrolled_window; AgsListingEditor *input_editor; GtkScrolledWindow *output_link_editor_scrolled_window; AgsPropertyCollectionEditor *output_link_editor; GtkScrolledWindow *input_link_editor_scrolled_window; AgsPropertyCollectionEditor *input_link_editor; GtkScrolledWindow *resize_editor_scrolled_window; AgsResizeEditor *resize_editor; GtkButton *add; GtkButton *remove; GtkButton *apply; GtkButton *ok; GtkButton *cancel; }; struct _AgsMachineEditorClass { GtkDialogClass dialog; void (*set_machine)(AgsMachineEditor *machine_editor, AgsMachine *machine); }; GType ags_machine_editor_get_type(void); void ags_machine_editor_add_children(AgsMachineEditor *machine_editor); void ags_machine_editor_set_machine(AgsMachineEditor *machine_editor, AgsMachine *machine); void ags_machine_editor_add_input(AgsMachineEditor *machine_editor); void ags_machine_editor_add_output(AgsMachineEditor *machine_editor); void ags_machine_editor_remove_input(AgsMachineEditor *machine_editor); void ags_machine_editor_remove_output(AgsMachineEditor *machine_editor); AgsMachineEditor* ags_machine_editor_new(AgsMachine *machine); #endif /*__AGS_MACHINE_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_midi_dialog.c0000644000175000017500000004655313247044247015130 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_midi_dialog_class_init(AgsMidiDialogClass *midi_dialog); void ags_midi_dialog_connectable_interface_init(AgsConnectableInterface *connectable); void ags_midi_dialog_applicable_interface_init(AgsApplicableInterface *applicable); void ags_midi_dialog_init(AgsMidiDialog *midi_dialog); void ags_midi_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_midi_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_midi_dialog_connect(AgsConnectable *connectable); void ags_midi_dialog_disconnect(AgsConnectable *connectable); void ags_midi_dialog_set_update(AgsApplicable *applicable, gboolean update); void ags_midi_dialog_apply(AgsApplicable *applicable); void ags_midi_dialog_reset(AgsApplicable *applicable); void ags_midi_dialog_show_all(GtkWidget *widget); /** * SECTION:ags_midi_dialog * @short_description: pack pad editors. * @title: AgsMidiDialog * @section_id: * @include: ags/X/ags_midi_dialog.h * * #AgsMidiDialog is a composite widget to edit all aspects of #AgsAudio. * It consists of multiple child editors. */ enum{ SET_MACHINE, LAST_SIGNAL, }; enum{ PROP_0, PROP_MACHINE, }; static guint midi_dialog_signals[LAST_SIGNAL]; static gpointer ags_midi_dialog_parent_class = NULL; GType ags_midi_dialog_get_type(void) { static GType ags_type_midi_dialog = 0; if(!ags_type_midi_dialog){ static const GTypeInfo ags_midi_dialog_info = { sizeof (AgsMidiDialogClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_midi_dialog_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMidiDialog), 0, /* n_preallocs */ (GInstanceInitFunc) ags_midi_dialog_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_midi_dialog_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_midi_dialog_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_midi_dialog = g_type_register_static(GTK_TYPE_DIALOG, "AgsMidiDialog", &ags_midi_dialog_info, 0); g_type_add_interface_static(ags_type_midi_dialog, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_midi_dialog, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_midi_dialog); } void ags_midi_dialog_class_init(AgsMidiDialogClass *midi_dialog) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_midi_dialog_parent_class = g_type_class_peek_parent(midi_dialog); /* GObjectClass */ gobject = (GObjectClass *) midi_dialog; gobject->set_property = ags_midi_dialog_set_property; gobject->get_property = ags_midi_dialog_get_property; /* properties */ /** * AgsMachine:machine: * * The #AgsMachine to edit. * * Since: 1.0.0 */ param_spec = g_param_spec_object("machine", i18n_pspec("assigned machine"), i18n_pspec("The machine which this machine editor is assigned with"), AGS_TYPE_MACHINE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MACHINE, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) midi_dialog; widget->show_all = ags_midi_dialog_show_all; // widget->delete_event = ags_midi_dialog_delete_event; } void ags_midi_dialog_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_midi_dialog_connect; connectable->disconnect = ags_midi_dialog_disconnect; } void ags_midi_dialog_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_midi_dialog_set_update; applicable->apply = ags_midi_dialog_apply; applicable->reset = ags_midi_dialog_reset; } void ags_midi_dialog_init(AgsMidiDialog *midi_dialog) { GtkLabel *label; GtkTable *table; GtkHBox *hbox; gtk_window_set_title((GtkWindow *) midi_dialog, g_strdup("MIDI connection")); midi_dialog->flags = 0; midi_dialog->version = AGS_MIDI_DIALOG_DEFAULT_VERSION; midi_dialog->build_id = AGS_MIDI_DIALOG_DEFAULT_BUILD_ID; midi_dialog->machine = NULL; /* connection */ midi_dialog->io_options = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) GTK_DIALOG(midi_dialog)->vbox, GTK_WIDGET(midi_dialog->io_options), FALSE, FALSE, 0); /* midi channel */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) midi_dialog->io_options, GTK_WIDGET(hbox), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("midi channel")); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(label), FALSE, FALSE, 0); midi_dialog->midi_channel = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 15.0, 1.0); gtk_box_pack_start((GtkBox *) hbox, GTK_WIDGET(midi_dialog->midi_channel), FALSE, FALSE, 0); /* playback */ midi_dialog->playback = NULL; // midi_dialog->playback = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("playback")); // gtk_box_pack_start((GtkBox *) midi_dialog->io_options, // GTK_WIDGET(midi_dialog->playback), // FALSE, FALSE, // 0); /* record */ midi_dialog->record = NULL; // midi_dialog->record = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("record")); // gtk_box_pack_start((GtkBox *) midi_dialog->io_options, // GTK_WIDGET(midi_dialog->record), // FALSE, FALSE, // 0); /* mapping */ midi_dialog->mapping = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) GTK_DIALOG(midi_dialog)->vbox, GTK_WIDGET(midi_dialog->mapping), FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(4, 2, FALSE); gtk_box_pack_start((GtkBox *) midi_dialog->mapping, GTK_WIDGET(table), FALSE, FALSE, 0); /* audio start */ label = (GtkLabel *) gtk_label_new(i18n("audio start mapping")); g_object_set(label, "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); midi_dialog->audio_start = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65535.0, 1.0); gtk_table_attach(table, GTK_WIDGET(midi_dialog->audio_start), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); /* audio end */ label = (GtkLabel *) gtk_label_new(i18n("audio end mapping")); g_object_set(label, "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); midi_dialog->audio_end = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65535.0, 1.0); gtk_table_attach(table, GTK_WIDGET(midi_dialog->audio_end), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* midi start */ label = (GtkLabel *) gtk_label_new(i18n("midi start mapping")); g_object_set(label, "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); midi_dialog->midi_start = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 128.0, 1.0); gtk_table_attach(table, GTK_WIDGET(midi_dialog->midi_start), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* midi end */ label = (GtkLabel *) gtk_label_new(i18n("midi end mapping")); g_object_set(label, "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0); midi_dialog->midi_end = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 128.0, 1.0); gtk_table_attach(table, GTK_WIDGET(midi_dialog->midi_end), 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); /* device */ midi_dialog->device = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) GTK_DIALOG(midi_dialog)->vbox, GTK_WIDGET(midi_dialog->device), FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(8, 2, FALSE); gtk_box_pack_start((GtkBox *) midi_dialog->device, GTK_WIDGET(table), FALSE, FALSE, 0); /* midi device */ label = (GtkLabel *) gtk_label_new(i18n("midi device")); g_object_set(label, "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); midi_dialog->midi_device = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(midi_dialog->midi_device), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* GtkButton's in GtkDialog->action_area */ midi_dialog->apply = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_APPLY); gtk_box_pack_start((GtkBox *) GTK_DIALOG(midi_dialog)->action_area, (GtkWidget *) midi_dialog->apply, FALSE, FALSE, 0); midi_dialog->ok = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_OK); gtk_box_pack_start((GtkBox *) GTK_DIALOG(midi_dialog)->action_area, (GtkWidget *) midi_dialog->ok, FALSE, FALSE, 0); midi_dialog->cancel = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_CANCEL); gtk_box_pack_start((GtkBox *) GTK_DIALOG(midi_dialog)->action_area, (GtkWidget *) midi_dialog->cancel, FALSE, FALSE, 0); } void ags_midi_dialog_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMidiDialog *midi_dialog; midi_dialog = AGS_MIDI_DIALOG(gobject); switch(prop_id){ case PROP_MACHINE: { AgsMachine *machine; machine = (AgsMachine *) g_value_get_object(value); if(machine == midi_dialog->machine){ return; } if(midi_dialog->machine != NULL){ g_object_unref(midi_dialog->machine); } if(machine != NULL){ g_object_ref(machine); } midi_dialog->machine = machine; /* set cards */ ags_midi_dialog_load_sequencers(midi_dialog); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_dialog_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMidiDialog *midi_dialog; midi_dialog = AGS_MIDI_DIALOG(gobject); switch(prop_id){ case PROP_MACHINE: { g_value_set_object(value, midi_dialog->machine); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_dialog_connect(AgsConnectable *connectable) { AgsMidiDialog *midi_dialog; midi_dialog = AGS_MIDI_DIALOG(connectable); if((AGS_MIDI_DIALOG_CONNECTED & (midi_dialog->flags)) != 0){ return; } midi_dialog->flags |= AGS_MIDI_DIALOG_CONNECTED; g_signal_connect((GObject *) midi_dialog, "delete-event", G_CALLBACK(ags_midi_dialog_delete_event), (gpointer) midi_dialog); /* applicable */ g_signal_connect((GObject *) midi_dialog->apply, "clicked", G_CALLBACK(ags_midi_dialog_apply_callback), (gpointer) midi_dialog); g_signal_connect((GObject *) midi_dialog->ok, "clicked", G_CALLBACK(ags_midi_dialog_ok_callback), (gpointer) midi_dialog); g_signal_connect((GObject *) midi_dialog->cancel, "clicked", G_CALLBACK(ags_midi_dialog_cancel_callback), (gpointer) midi_dialog); } void ags_midi_dialog_disconnect(AgsConnectable *connectable) { AgsMidiDialog *midi_dialog; midi_dialog = AGS_MIDI_DIALOG(connectable); if((AGS_MIDI_DIALOG_CONNECTED & (midi_dialog->flags)) == 0){ return; } midi_dialog->flags &= (~AGS_MIDI_DIALOG_CONNECTED); /* applicable */ g_object_disconnect((GObject *) midi_dialog->apply, "any_signal::clicked", G_CALLBACK(ags_midi_dialog_apply_callback), (gpointer) midi_dialog, NULL); g_object_disconnect((GObject *) midi_dialog->ok, "any_signal::clicked", G_CALLBACK(ags_midi_dialog_ok_callback), (gpointer) midi_dialog, NULL); g_object_disconnect((GObject *) midi_dialog->cancel, "any_signal::clicked", G_CALLBACK(ags_midi_dialog_cancel_callback), (gpointer) midi_dialog, NULL); } void ags_midi_dialog_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_midi_dialog_apply(AgsApplicable *applicable) { AgsWindow *window; AgsMidiDialog *midi_dialog; AgsMachine *machine; AgsAudio *audio; GObject *sequencer; GtkTreeIter tree_iter; midi_dialog = AGS_MIDI_DIALOG(applicable); machine = midi_dialog->machine; window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); /* audio and sequencer */ audio = machine->audio; gtk_combo_box_get_active_iter(GTK_COMBO_BOX(midi_dialog->midi_device), &tree_iter); gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX(midi_dialog->midi_device)), &tree_iter, 1, &sequencer, -1); /* set properties */ g_object_set(audio, "midi-channel", gtk_spin_button_get_value_as_int(midi_dialog->midi_channel), "audio-start-mapping", gtk_spin_button_get_value_as_int(midi_dialog->audio_start), "audio-end-mapping", gtk_spin_button_get_value_as_int(midi_dialog->audio_end), "midi-start-mapping", gtk_spin_button_get_value_as_int(midi_dialog->midi_start), "midi-end-mapping", gtk_spin_button_get_value_as_int(midi_dialog->midi_end), "sequencer", sequencer, NULL); } void ags_midi_dialog_reset(AgsApplicable *applicable) { AgsWindow *window; AgsMidiDialog *midi_dialog; AgsMachine *machine; AgsAudio *audio; GObject *sequencer; GObject *current; GList *list; GtkTreeModel *model; GtkTreeIter iter; guint midi_channel; guint audio_start, audio_end; guint midi_start, midi_end; guint i; gboolean found_device; midi_dialog = AGS_MIDI_DIALOG(applicable); machine = midi_dialog->machine; window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); /* audio and sequencer */ audio = machine->audio; /* */ g_object_get(audio, "midi-channel", &midi_channel, "audio-start-mapping", &audio_start, "audio-end-mapping", &audio_end, "midi-start-mapping", &midi_start, "midi-end-mapping", &midi_end, "sequencer", &sequencer, NULL); /* mapping */ gtk_spin_button_set_value(midi_dialog->midi_channel, (gdouble) midi_channel); gtk_spin_button_set_value(midi_dialog->audio_start, (gdouble) audio_start); gtk_spin_button_set_value(midi_dialog->audio_end, (gdouble) audio_end); gtk_spin_button_set_value(midi_dialog->midi_start, (gdouble) midi_start); gtk_spin_button_set_value(midi_dialog->midi_end, (gdouble) midi_end); /* load midi devices */ ags_midi_dialog_load_sequencers(midi_dialog); /* find device */ found_device = FALSE; if(sequencer != NULL){ model = gtk_combo_box_get_model(GTK_COMBO_BOX(midi_dialog->midi_device)); i = 0; if(model != NULL && gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 1, ¤t, -1); if(current == sequencer){ found_device = TRUE; break; } i++; }while(gtk_tree_model_iter_next(model, &iter)); } } if(found_device){ gtk_combo_box_set_active(GTK_COMBO_BOX(midi_dialog->midi_device), i); }else{ gtk_combo_box_set_active(GTK_COMBO_BOX(midi_dialog->midi_device), 0); } } void ags_midi_dialog_load_sequencers(AgsMidiDialog *midi_dialog) { AgsWindow *window; GObject *sequencer; GtkListStore *model; AgsAudio *audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GtkTreeIter iter; GList *list; gchar *midi_device; pthread_mutex_t *application_mutex; window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) midi_dialog->machine, AGS_TYPE_WINDOW); /* application context and mutex manager */ application_context = window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* clear model */ gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(midi_dialog->midi_device)))); /* tree model */ model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); /* null device */ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "NULL", 1, NULL, -1); /* load sequencer */ pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, ags_sequencer_get_device(AGS_SEQUENCER(list->data)), 1, list->data, -1); list = list->next; } pthread_mutex_unlock(application_mutex); gtk_combo_box_set_model(GTK_COMBO_BOX(midi_dialog->midi_device), GTK_TREE_MODEL(model)); } void ags_midi_dialog_show_all(GtkWidget *widget) { AgsMidiDialog *midi_dialog; midi_dialog = (AgsMidiDialog *) widget; if((AGS_MIDI_DIALOG_IO_OPTIONS & (midi_dialog->flags)) != 0){ gtk_widget_show_all((GtkWidget *) midi_dialog->io_options); } if((AGS_MIDI_DIALOG_MAPPING & (midi_dialog->flags)) != 0){ gtk_widget_show_all((GtkWidget *) midi_dialog->mapping); } if((AGS_MIDI_DIALOG_DEVICE & (midi_dialog->flags)) != 0){ gtk_widget_show_all((GtkWidget *) midi_dialog->device); } gtk_widget_show(widget); gtk_widget_show((GtkWidget *) midi_dialog->apply); gtk_widget_show((GtkWidget *) midi_dialog->ok); gtk_widget_show((GtkWidget *) midi_dialog->cancel); } /** * ags_midi_dialog_new: * @machine: the assigned machine. * * Creates an #AgsMidiDialog * * Returns: a new #AgsMidiDialog * * Since: 1.0.0 */ AgsMidiDialog* ags_midi_dialog_new(AgsMachine *machine) { AgsMidiDialog *midi_dialog; midi_dialog = (AgsMidiDialog *) g_object_new(AGS_TYPE_MIDI_DIALOG, "machine", machine, NULL); return(midi_dialog); } gsequencer-1.4.24/ags/X/ags_effect_pad.c0000644000175000017500000003653613256163135014745 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_effect_pad_class_init(AgsEffectPadClass *effect_pad); void ags_effect_pad_connectable_interface_init(AgsConnectableInterface *connectable); void ags_effect_pad_plugin_interface_init(AgsPluginInterface *plugin); void ags_effect_pad_init(AgsEffectPad *effect_pad); void ags_effect_pad_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_effect_pad_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_effect_pad_connect(AgsConnectable *connectable); void ags_effect_pad_disconnect(AgsConnectable *connectable); gchar* ags_effect_pad_get_name(AgsPlugin *plugin); void ags_effect_pad_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_effect_pad_get_version(AgsPlugin *plugin); void ags_effect_pad_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_effect_pad_get_build_id(AgsPlugin *plugin); void ags_effect_pad_set_build_id(AgsPlugin *plugin, gchar *build_id); void ags_effect_pad_real_resize_lines(AgsEffectPad *effect_pad, GType line_type, guint audio_channels, guint audio_channels_old); void ags_effect_pad_real_map_recall(AgsEffectPad *effect_pad); GList* ags_effect_pad_real_find_port(AgsEffectPad *effect_pad); /** * SECTION:ags_effect_pad * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsEffectPad * @section_id: * @include: ags/X/ags_effect_pad.h * * #AgsEffectPad is a composite widget to visualize a bunch of #AgsChannel. It should be * packed by an #AgsEffectBridge. */ enum{ RESIZE_LINES, MAP_RECALL, FIND_PORT, LAST_SIGNAL, }; enum{ PROP_0, PROP_CHANNEL, }; static gpointer ags_effect_pad_parent_class = NULL; static guint effect_pad_signals[LAST_SIGNAL]; GType ags_effect_pad_get_type(void) { static GType ags_type_effect_pad = 0; if(!ags_type_effect_pad){ static const GTypeInfo ags_effect_pad_info = { sizeof(AgsEffectPadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_effect_pad_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsEffectPad), 0, /* n_preallocs */ (GInstanceInitFunc) ags_effect_pad_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_effect_pad_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_effect_pad_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_effect_pad = g_type_register_static(GTK_TYPE_VBOX, "AgsEffectPad", &ags_effect_pad_info, 0); g_type_add_interface_static(ags_type_effect_pad, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_effect_pad, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_effect_pad); } void ags_effect_pad_class_init(AgsEffectPadClass *effect_pad) { GObjectClass *gobject; GParamSpec *param_spec; ags_effect_pad_parent_class = g_type_class_peek_parent(effect_pad); /* GObjectClass */ gobject = G_OBJECT_CLASS(effect_pad); gobject->set_property = ags_effect_pad_set_property; gobject->get_property = ags_effect_pad_get_property; /* AgsEffectPadClass */ effect_pad->resize_lines = ags_effect_pad_real_resize_lines; /* properties */ /** * AgsEffectPad:channel: * * The start of a bunch of #AgsChannel to visualize. * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("assigned channel"), i18n_pspec("The channel it is assigned with"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /* AgsEffectPadClass */ effect_pad->map_recall = ags_effect_pad_real_map_recall; effect_pad->find_port = ags_effect_pad_real_find_port; /* signals */ /** * AgsPad::resize-lines: * @pad: the #AgsPad to resize * @line_type: the channel type * @audio_channels: count of lines * @audio_channels_old: old count of lines * * The ::resize-lines is emitted as count of lines pack is modified. */ effect_pad_signals[RESIZE_LINES] = g_signal_new("resize-lines", G_TYPE_FROM_CLASS(effect_pad), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectPadClass, resize_lines), NULL, NULL, g_cclosure_user_marshal_VOID__ULONG_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_ULONG, G_TYPE_UINT, G_TYPE_UINT); /** * AgsEffectPad::map-recall: * @effect_pad: the #AgsEffectPad * * The ::map-recall should be used to add the effect_pad's default recall. */ effect_pad_signals[MAP_RECALL] = g_signal_new("map-recall", G_TYPE_FROM_CLASS (effect_pad), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsEffectPadClass, map_recall), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 0); /** * AgsEffectPad::find-port: * @effect_pad: the #AgsEffectPad to resize * Returns: a #GList with associated ports * * The ::find-port as recall should be mapped */ effect_pad_signals[FIND_PORT] = g_signal_new("find-port", G_TYPE_FROM_CLASS(effect_pad), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectPadClass, find_port), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); } void ags_effect_pad_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_effect_pad_connect; connectable->disconnect = ags_effect_pad_disconnect; } void ags_effect_pad_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_effect_pad_get_version; plugin->set_version = ags_effect_pad_set_version; plugin->get_build_id = ags_effect_pad_get_build_id; plugin->set_build_id = ags_effect_pad_set_build_id; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_effect_pad_init(AgsEffectPad *effect_pad) { effect_pad->flags = 0; effect_pad->name = NULL; effect_pad->version = AGS_EFFECT_PAD_DEFAULT_VERSION; effect_pad->build_id = AGS_EFFECT_PAD_DEFAULT_BUILD_ID; effect_pad->channel = NULL; effect_pad->cols = AGS_EFFECT_PAD_COLUMNS_COUNT; effect_pad->table = (GtkTable *) gtk_table_new(1, AGS_EFFECT_PAD_COLUMNS_COUNT, TRUE); gtk_box_pack_start(GTK_BOX(effect_pad), GTK_WIDGET(effect_pad->table), FALSE, TRUE, 0); } void ags_effect_pad_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsEffectPad *effect_pad; effect_pad = AGS_EFFECT_PAD(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; GList *effect_line, *effect_line_start; channel = (AgsChannel *) g_value_get_object(value); if(effect_pad->channel == channel){ return; } if(effect_pad->channel != NULL){ g_object_unref(effect_pad->channel); } if(channel != NULL){ g_object_ref(channel); } effect_pad->channel = channel; effect_line = effect_line_start = gtk_container_get_children((GtkContainer *) effect_pad->table); while(effect_line != NULL){ g_object_set(G_OBJECT(effect_line->data), "channel", channel, NULL); effect_line = effect_line->next; } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_effect_pad_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsEffectPad *effect_pad; effect_pad = AGS_EFFECT_PAD(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, effect_pad->channel); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_effect_pad_connect(AgsConnectable *connectable) { AgsEffectPad *effect_pad; GList *effect_line_list, *effect_line_list_start; /* AgsEffect_Pad */ effect_pad = AGS_EFFECT_PAD(connectable); if((AGS_EFFECT_PAD_CONNECTED & (effect_pad->flags)) != 0){ return; } effect_pad->flags |= AGS_EFFECT_PAD_CONNECTED; if((AGS_EFFECT_PAD_PREMAPPED_RECALL & (effect_pad->flags)) == 0){ if((AGS_EFFECT_PAD_MAPPED_RECALL & (effect_pad->flags)) == 0){ //TODO:JK: implement me } }else{ effect_pad->flags &= (~AGS_EFFECT_PAD_PREMAPPED_RECALL); } /* AgsEffectLine */ effect_line_list_start = effect_line_list = gtk_container_get_children(GTK_CONTAINER(effect_pad->table)); while(effect_line_list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(effect_line_list->data)); effect_line_list = effect_line_list->next; } g_list_free(effect_line_list_start); } void ags_effect_pad_disconnect(AgsConnectable *connectable) { AgsEffectPad *effect_pad; GList *effect_line_list, *effect_line_list_start; /* AgsEffect_Pad */ effect_pad = AGS_EFFECT_PAD(connectable); if((AGS_EFFECT_PAD_CONNECTED & (effect_pad->flags)) == 0){ return; } effect_pad->flags &= (~AGS_EFFECT_PAD_CONNECTED); /* AgsEffectLine */ effect_line_list_start = effect_line_list = gtk_container_get_children(GTK_CONTAINER(effect_pad->table)); while(effect_line_list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(effect_line_list->data)); effect_line_list = effect_line_list->next; } g_list_free(effect_line_list_start); g_signal_handlers_disconnect_by_data(effect_pad->channel, effect_pad); } gchar* ags_effect_pad_get_name(AgsPlugin *plugin) { return(AGS_EFFECT_PAD(plugin)->name); } void ags_effect_pad_set_name(AgsPlugin *plugin, gchar *name) { AgsEffectPad *effect_pad; effect_pad = AGS_EFFECT_PAD(plugin); effect_pad->name = name; } gchar* ags_effect_pad_get_version(AgsPlugin *plugin) { return(AGS_EFFECT_PAD(plugin)->version); } void ags_effect_pad_set_version(AgsPlugin *plugin, gchar *version) { AgsEffectPad *effect_pad; effect_pad = AGS_EFFECT_PAD(plugin); effect_pad->version = version; } gchar* ags_effect_pad_get_build_id(AgsPlugin *plugin) { return(AGS_EFFECT_PAD(plugin)->build_id); } void ags_effect_pad_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsEffectPad *effect_pad; effect_pad = AGS_EFFECT_PAD(plugin); effect_pad->build_id = build_id; } void ags_effect_pad_real_resize_lines(AgsEffectPad *effect_pad, GType effect_line_type, guint audio_channels, guint audio_channels_old) { AgsEffectLine *effect_line; AgsChannel *channel; GList *list, *list_next; guint i, j; if(audio_channels > audio_channels_old){ channel = ags_channel_nth(effect_pad->channel, audio_channels_old); if(channel == NULL){ return; } for(i = audio_channels_old; i < audio_channels;){ for(j = audio_channels_old % effect_pad->cols; j < effect_pad->cols && i < audio_channels; j++, i++){ effect_line = (AgsEffectLine *) g_object_new(effect_line_type, "channel", channel, NULL); gtk_table_attach(effect_pad->table, (GtkWidget *) effect_line, j, j + 1, i / effect_pad->cols, i / effect_pad->cols + 1, FALSE, FALSE, 0, 0); channel = channel->next; } } }else{ list = gtk_container_get_children((GtkContainer *) effect_pad->table); list = g_list_nth(list, audio_channels); while(list != NULL){ list_next = list->next; gtk_widget_destroy(list->data); list = list_next; } } } void ags_effect_pad_resize_lines(AgsEffectPad *effect_pad, GType line_type, guint audio_channels, guint audio_channels_old) { g_return_if_fail(AGS_IS_EFFECT_PAD(effect_pad)); g_object_ref((GObject *) effect_pad); g_signal_emit(G_OBJECT(effect_pad), effect_pad_signals[RESIZE_LINES], 0, line_type, audio_channels, audio_channels_old); g_object_unref((GObject *) effect_pad); } void ags_effect_pad_real_map_recall(AgsEffectPad *effect_pad) { if((AGS_EFFECT_PAD_MAPPED_RECALL & (effect_pad->flags)) != 0){ return; } effect_pad->flags |= AGS_EFFECT_PAD_MAPPED_RECALL; ags_effect_pad_find_port(effect_pad); } /** * ags_effect_pad_map_recall: * @effect_pad: the #AgsEffectPad to add its default recall. * * You may want the @effect_pad to add its default recall. */ void ags_effect_pad_map_recall(AgsEffectPad *effect_pad) { g_return_if_fail(AGS_IS_EFFECT_PAD(effect_pad)); g_object_ref((GObject *) effect_pad); g_signal_emit((GObject *) effect_pad, effect_pad_signals[MAP_RECALL], 0); g_object_unref((GObject *) effect_pad); } GList* ags_effect_pad_real_find_port(AgsEffectPad *effect_pad) { GList *effect_line, *effect_line_start; GList *port, *tmp_port; port = NULL; /* find output ports */ if(effect_pad->table != NULL){ effect_line_start = effect_line = gtk_container_get_children((GtkContainer *) effect_pad->table); while(effect_line != NULL){ tmp_port = ags_effect_line_find_port(AGS_EFFECT_LINE(effect_line->data)); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } effect_line = effect_line->next; } g_list_free(effect_line_start); } return(port); } /** * ags_effect_pad_find_port: * @effect_pad: the #AgsEffectPad * Returns: an #GList containing all related #AgsPort * * Lookup ports of associated recalls. * * Since: 1.0.0 */ GList* ags_effect_pad_find_port(AgsEffectPad *effect_pad) { GList *list; list = NULL; g_return_val_if_fail(AGS_IS_EFFECT_PAD(effect_pad), NULL); g_object_ref((GObject *) effect_pad); g_signal_emit((GObject *) effect_pad, effect_pad_signals[FIND_PORT], 0, &list); g_object_unref((GObject *) effect_pad); return(list); } /** * ags_effect_pad_new: * @channel: the #AgsChannel to visualize * * Creates an #AgsEffectPad * * Returns: a new #AgsEffectPad * * Since: 1.0.0 */ AgsEffectPad* ags_effect_pad_new(AgsChannel *channel) { AgsEffectPad *effect_pad; effect_pad = (AgsEffectPad *) g_object_new(AGS_TYPE_EFFECT_PAD, "channel", channel, NULL); return(effect_pad); } gsequencer-1.4.24/ags/X/ags_property_collection_editor_callbacks.h0000644000175000017500000000244113246707333022325 00000000000000/* 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 . */ #ifndef __AGS_PROPERTY_COLLECTION_EDITOR_CALLBACKS__ #define __AGS_PROPERTY_COLLECTION_EDITOR_CALLBACKS__ #include #include #include #include void ags_property_collection_editor_add_collection_callback(GtkButton *button, AgsPropertyCollectionEditor *property_collection_editor); void ags_property_collection_editor_remove_collection_callback(GtkButton *button, GtkTable *table); #endif /*__AGS_PROPERTY_COLLECTION_EDITOR_CALLBACKS__*/ gsequencer-1.4.24/ags/X/ags_performance_preferences_callbacks.h0000644000175000017500000000217313247044247021543 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PERFORMANCE_PREFERENCES_CALLBACKS_H__ #define __AGS_PERFORMANCE_PREFERENCES_CALLBACKS_H__ #include #include void ags_performance_preferences_super_threaded_channel_callback(GtkWidget *button, AgsPerformancePreferences *performance_preferences); #endif /*__AGS_PERFORMANCE_PREFERENCES_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_preferences.c0000644000175000017500000002575213247044247015166 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_preferences_class_init(AgsPreferencesClass *preferences); void ags_preferences_connectable_interface_init(AgsConnectableInterface *connectable); void ags_preferences_applicable_interface_init(AgsApplicableInterface *applicable); void ags_preferences_init(AgsPreferences *preferences); void ags_preferences_connect(AgsConnectable *connectable); void ags_preferences_disconnect(AgsConnectable *connectable); void ags_preferences_set_update(AgsApplicable *applicable, gboolean update); void ags_preferences_apply(AgsApplicable *applicable); void ags_preferences_reset(AgsApplicable *applicable); static void ags_preferences_finalize(GObject *gobject); void ags_preferences_show(GtkWidget *widget); void ags_preferences_show_all(GtkWidget *widget); /** * SECTION:ags_preferences * @short_description: A dialog to do preferences * @title: AgsPluginPreferences * @section_id: * @include: ags/X/ags_plugin_preferences.h * * #AgsDialogPreferences enables you to make preferences. */ static gpointer ags_preferences_parent_class = NULL; GType ags_preferences_get_type(void) { static GType ags_type_preferences = 0; if(!ags_type_preferences){ static const GTypeInfo ags_preferences_info = { sizeof (AgsPreferencesClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_preferences_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPreferences), 0, /* n_preallocs */ (GInstanceInitFunc) ags_preferences_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_preferences_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_preferences_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_preferences = g_type_register_static(GTK_TYPE_DIALOG, "AgsPreferences", &ags_preferences_info, 0); g_type_add_interface_static(ags_type_preferences, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_preferences, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_preferences); } void ags_preferences_class_init(AgsPreferencesClass *preferences) { GObjectClass *gobject; GtkWidgetClass *widget; ags_preferences_parent_class = g_type_class_peek_parent(preferences); /* GtkObjectClass */ gobject = (GObjectClass *) preferences; gobject->finalize = ags_preferences_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) preferences; widget->show = ags_preferences_show; widget->show_all = ags_preferences_show_all; } void ags_preferences_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_preferences_connect; connectable->disconnect = ags_preferences_disconnect; } void ags_preferences_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_preferences_set_update; applicable->apply = ags_preferences_apply; applicable->reset = ags_preferences_reset; } void ags_preferences_init(AgsPreferences *preferences) { GtkButton *button; gchar *str; preferences->flags = 0; preferences->window = NULL; gtk_window_set_title(GTK_WINDOW(preferences), i18n("preferences")); gtk_window_set_deletable(GTK_WINDOW(preferences), TRUE); preferences->notebook = (GtkNotebook *) gtk_notebook_new(); g_object_set(G_OBJECT(preferences->notebook), "tab-pos", GTK_POS_LEFT, NULL); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(preferences)->vbox), GTK_WIDGET(preferences->notebook)); preferences->generic_preferences = ags_generic_preferences_new(); gtk_notebook_append_page(preferences->notebook, GTK_WIDGET(preferences->generic_preferences), gtk_label_new(i18n("generic"))); preferences->audio_preferences = ags_audio_preferences_new(); gtk_notebook_append_page(preferences->notebook, GTK_WIDGET(preferences->audio_preferences), gtk_label_new(i18n("audio"))); preferences->midi_preferences = ags_midi_preferences_new(); gtk_notebook_append_page(preferences->notebook, GTK_WIDGET(preferences->midi_preferences), gtk_label_new(i18n("midi"))); preferences->performance_preferences = ags_performance_preferences_new(); gtk_notebook_append_page(preferences->notebook, GTK_WIDGET(preferences->performance_preferences), gtk_label_new(i18n("performance"))); str = ags_config_get_value(ags_config_get_instance(), AGS_CONFIG_GENERIC, "disable-feature"); if(str == NULL || !g_ascii_strncasecmp(str, "experimental", 13)){ preferences->server_preferences = NULL; }else{ preferences->server_preferences = ags_server_preferences_new(); gtk_notebook_append_page(preferences->notebook, GTK_WIDGET(preferences->server_preferences), gtk_label_new(i18n("server"))); } gtk_dialog_add_action_widget(GTK_DIALOG(preferences), gtk_button_new_from_stock(GTK_STOCK_APPLY), GTK_RESPONSE_APPLY); gtk_dialog_add_action_widget(GTK_DIALOG(preferences), gtk_button_new_from_stock(GTK_STOCK_CANCEL), GTK_RESPONSE_CANCEL); gtk_dialog_add_action_widget(GTK_DIALOG(preferences), gtk_button_new_from_stock(GTK_STOCK_OK), GTK_RESPONSE_OK); } void ags_preferences_connect(AgsConnectable *connectable) { AgsPreferences *preferences; preferences = AGS_PREFERENCES(connectable); ags_connectable_connect(AGS_CONNECTABLE(preferences->generic_preferences)); ags_connectable_connect(AGS_CONNECTABLE(preferences->audio_preferences)); ags_connectable_connect(AGS_CONNECTABLE(preferences->midi_preferences)); ags_connectable_connect(AGS_CONNECTABLE(preferences->performance_preferences)); if(preferences->server_preferences != NULL){ ags_connectable_connect(AGS_CONNECTABLE(preferences->server_preferences)); } g_signal_connect_after(G_OBJECT(preferences), "response", G_CALLBACK(ags_preferences_response_callback), NULL); g_signal_connect_after(G_OBJECT(preferences->notebook), "switch-page", G_CALLBACK(ags_preferences_notebook_switch_page_callback), preferences); } void ags_preferences_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_preferences_set_update(AgsApplicable *applicable, gboolean update) { AgsPreferences *preferences; preferences = AGS_PREFERENCES(applicable); ags_applicable_set_update(AGS_APPLICABLE(preferences->generic_preferences), update); ags_applicable_set_update(AGS_APPLICABLE(preferences->audio_preferences), update); ags_applicable_set_update(AGS_APPLICABLE(preferences->midi_preferences), update); ags_applicable_set_update(AGS_APPLICABLE(preferences->performance_preferences), update); if(preferences->server_preferences != NULL){ ags_applicable_set_update(AGS_APPLICABLE(preferences->server_preferences), update); } } void ags_preferences_apply(AgsApplicable *applicable) { AgsPreferences *preferences; GtkDialog *dialog; AgsConfig *config; gchar *filename; struct passwd *pw; uid_t uid; gchar **argv; GError *error; preferences = AGS_PREFERENCES(applicable); config = ags_config_get_instance(); ags_config_clear(config); ags_applicable_apply(AGS_APPLICABLE(preferences->generic_preferences)); ags_applicable_apply(AGS_APPLICABLE(preferences->audio_preferences)); ags_applicable_apply(AGS_APPLICABLE(preferences->midi_preferences)); ags_applicable_apply(AGS_APPLICABLE(preferences->performance_preferences)); if(preferences->server_preferences != NULL){ ags_applicable_apply(AGS_APPLICABLE(preferences->server_preferences)); } ags_config_save(config); /* notify user about restarting GSequencer */ dialog = gtk_message_dialog_new(preferences->window, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "You should safe your file and restart GSequencer"); g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show_all(dialog); } void ags_preferences_reset(AgsApplicable *applicable) { AgsPreferences *preferences; preferences = AGS_PREFERENCES(applicable); ags_applicable_reset(AGS_APPLICABLE(preferences->generic_preferences)); ags_applicable_reset(AGS_APPLICABLE(preferences->audio_preferences)); ags_applicable_reset(AGS_APPLICABLE(preferences->midi_preferences)); ags_applicable_reset(AGS_APPLICABLE(preferences->performance_preferences)); if(preferences->server_preferences != NULL){ ags_applicable_reset(AGS_APPLICABLE(preferences->server_preferences)); } } static void ags_preferences_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_preferences_parent_class)->finalize(gobject); } void ags_preferences_show(GtkWidget *widget) { GList *list, *list_start; GTK_WIDGET_CLASS(ags_preferences_parent_class)->show(widget); list_start = list = gtk_container_get_children((GtkContainer *) GTK_DIALOG(widget)->action_area); list = g_list_nth(list, 3); while(list != NULL){ gtk_widget_hide((GtkWidget *) list->data); list = list->next; } g_list_free(list_start); } void ags_preferences_show_all(GtkWidget *widget) { GList *list, *list_start; GTK_WIDGET_CLASS(ags_preferences_parent_class)->show_all(widget); list_start = list = gtk_container_get_children((GtkContainer *) GTK_DIALOG(widget)->action_area); list = g_list_nth(list, 3); while(list != NULL){ gtk_widget_hide(list->data); list = list->next; } g_list_free(list_start); } /** * ags_preferences_new: * * Creates an #AgsPreferences * * Returns: a new #AgsPreferences * * Since: 1.0.0 */ AgsPreferences* ags_preferences_new() { AgsPreferences *preferences; preferences = (AgsPreferences *) g_object_new(AGS_TYPE_PREFERENCES, NULL); return(preferences); } gsequencer-1.4.24/ags/X/ags_sequencer_editor.h0000644000175000017500000000573313256163135016225 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SEQUENCER_EDITOR_H__ #define __AGS_SEQUENCER_EDITOR_H__ #include #include #include #define AGS_TYPE_SEQUENCER_EDITOR (ags_sequencer_editor_get_type()) #define AGS_SEQUENCER_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SEQUENCER_EDITOR, AgsSequencerEditor)) #define AGS_SEQUENCER_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SEQUENCER_EDITOR, AgsSequencerEditorClass)) #define AGS_IS_SEQUENCER_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SEQUENCER_EDITOR)) #define AGS_IS_SEQUENCER_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SEQUENCER_EDITOR)) #define AGS_SEQUENCER_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_SEQUENCER_EDITOR, AgsSequencerEditorClass)) typedef struct _AgsSequencerEditor AgsSequencerEditor; typedef struct _AgsSequencerEditorClass AgsSequencerEditorClass; typedef enum{ AGS_SEQUENCER_EDITOR_CONNECTED = 1, }AgsSequencerEditorFlags; struct _AgsSequencerEditor { GtkVBox vbox; guint flags; GObject *sequencer; GObject *sequencer_thread; GtkComboBoxText *backend; GtkComboBoxText *card; GtkHBox *source_hbox; GtkButton *add_source; GtkButton *remove_source; GtkButton *remove; }; struct _AgsSequencerEditorClass { GtkVBoxClass vbox; }; GType ags_sequencer_editor_get_type(void); void ags_sequencer_editor_add_source(AgsSequencerEditor *sequencer_editor, gchar *device); void ags_sequencer_editor_remove_source(AgsSequencerEditor *sequencer_editor, gchar *device); void ags_sequencer_editor_add_sequencer(AgsSequencerEditor *sequencer_editor, GObject *sequencer); void ags_sequencer_editor_remove_sequencer(AgsSequencerEditor *sequencer_editor, GObject *sequencer); void ags_sequencer_editor_load_core_audio_card(AgsSequencerEditor *sequencer_editor); void ags_sequencer_editor_load_jack_card(AgsSequencerEditor *sequencer_editor); void ags_sequencer_editor_load_alsa_card(AgsSequencerEditor *sequencer_editor); void ags_sequencer_editor_load_oss_card(AgsSequencerEditor *sequencer_editor); AgsSequencerEditor* ags_sequencer_editor_new(); #endif /*__AGS_SEQUENCER_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_line_member_callbacks.c0000644000175000017500000000634113246707333017134 00000000000000/* 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 . */ #include int ags_line_member_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLineMember *line_member) { if(old_parent == NULL){ //TODO:JK: implement me } return(0); } void ags_line_member_dial_changed_callback(GtkWidget *dial, AgsLineMember *line_member) { GtkAdjustment *adjustment; g_object_get(dial, "adjustment", &adjustment, NULL); ags_line_member_change_port(line_member, (gpointer) &(adjustment->value)); ags_line_member_chained_event(line_member); } void ags_line_member_vscale_changed_callback(GtkWidget *vscale, AgsLineMember *line_member) { GtkAdjustment *adjustment; adjustment = gtk_range_get_adjustment(GTK_RANGE(vscale)); ags_line_member_change_port(line_member, (gpointer) &(adjustment->value)); ags_line_member_chained_event(line_member); } void ags_line_member_hscale_changed_callback(GtkWidget *hscale, AgsLineMember *line_member) { GtkAdjustment *adjustment; adjustment = gtk_range_get_adjustment(GTK_RANGE(hscale)); ags_line_member_change_port(line_member, &(adjustment->value)); ags_line_member_chained_event(line_member); } void ags_line_member_spin_button_changed_callback(GtkWidget *spin_button, AgsLineMember *line_member) { GtkAdjustment *adjustment; adjustment = gtk_spin_button_get_adjustment((GtkSpinButton *) spin_button); ags_line_member_change_port(line_member, &(adjustment->value)); ags_line_member_chained_event(line_member); } void ags_line_member_check_button_clicked_callback(GtkWidget *check_button, AgsLineMember *line_member) { line_member->active = gtk_toggle_button_get_active((GtkToggleButton *) check_button); ags_line_member_change_port(line_member, &(line_member->active)); ags_line_member_chained_event(line_member); } void ags_line_member_toggle_button_clicked_callback(GtkWidget *toggle_button, AgsLineMember *line_member) { line_member->active = gtk_toggle_button_get_active((GtkToggleButton *) toggle_button); ags_line_member_change_port(line_member, &(line_member->active)); ags_line_member_chained_event(line_member); } void ags_line_member_button_clicked_callback(GtkWidget *button, AgsLineMember *line_member) { ags_line_member_change_port(line_member, &(line_member->active)); ags_line_member_chained_event(line_member); } void ags_line_member_port_safe_write_callback(AgsPort *port, GValue *value, AgsLineMember *line_member) { //TODO:JK: implement me } gsequencer-1.4.24/ags/X/ags_notation_editor.c0000644000175000017500000013127213247044247016061 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_notation_editor_class_init(AgsNotationEditorClass *notation_editor); void ags_notation_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_notation_editor_init(AgsNotationEditor *notation_editor); void ags_notation_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_notation_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_notation_editor_connect(AgsConnectable *connectable); void ags_notation_editor_disconnect(AgsConnectable *connectable); void ags_notation_editor_finalize(GObject *gobject); void ags_notation_editor_real_machine_changed(AgsNotationEditor *notation_editor, AgsMachine *machine); void ags_notation_edit_play_channel(AgsNotationEdit *notation_edit, AgsChannel *channel, AgsNote *note); enum{ MACHINE_CHANGED, LAST_SIGNAL, }; enum{ PROP_0, PROP_SOUNDCARD, }; static gpointer ags_notation_editor_parent_class = NULL; static guint notation_editor_signals[LAST_SIGNAL]; /** * SECTION:ags_notation_editor * @short_description: A composite widget to edit notation * @title: AgsNotationEditor * @section_id: * @include: ags/X/ags_notation_editor.h * * #AgsNotationEditor is a composite widget to edit notation. You may select machines * or change editor tool to do notation. */ GType ags_notation_editor_get_type(void) { static GType ags_type_notation_editor = 0; if(!ags_type_notation_editor){ static const GTypeInfo ags_notation_editor_info = { sizeof (AgsNotationEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_notation_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsNotationEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_notation_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_notation_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_notation_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsNotationEditor", &ags_notation_editor_info, 0); g_type_add_interface_static(ags_type_notation_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_notation_editor); } void ags_notation_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_notation_editor_connect; connectable->disconnect = ags_notation_editor_disconnect; } void ags_notation_editor_class_init(AgsNotationEditorClass *notation_editor) { GObjectClass *gobject; GParamSpec *param_spec; ags_notation_editor_parent_class = g_type_class_peek_parent(notation_editor); /* GObjectClass */ gobject = (GObjectClass *) notation_editor; gobject->set_property = ags_notation_editor_set_property; gobject->get_property = ags_notation_editor_get_property; gobject->finalize = ags_notation_editor_finalize; /* properties */ /** * AgsNotationEditor:soundcard: * * The assigned #AgsSoundcard acting as default sink. * * Since: 1.2.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* AgsEditorClass */ notation_editor->machine_changed = ags_notation_editor_real_machine_changed; /* signals */ /** * AgsEditor::machine-changed: * @editor: the object to change machine. * @machine: the #AgsMachine to set * * The ::machine-changed signal notifies about changed machine. * * Since: 1.2.0 */ notation_editor_signals[MACHINE_CHANGED] = g_signal_new("machine-changed", G_TYPE_FROM_CLASS(notation_editor), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsNotationEditorClass, machine_changed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_notation_editor_init(AgsNotationEditor *notation_editor) { GtkViewport *viewport; GtkScrolledWindow *scrolled_window; GtkTable *table; notation_editor->flags = (AGS_NOTATION_EDITOR_PASTE_MATCH_AUDIO_CHANNEL | AGS_NOTATION_EDITOR_PASTE_NO_DUPLICATES); notation_editor->version = AGS_NOTATION_EDITOR_DEFAULT_VERSION; notation_editor->build_id = AGS_NOTATION_EDITOR_DEFAULT_BUILD_ID; /* offset */ notation_editor->tact_counter = 0; notation_editor->current_tact = 0.0; /* soundcard */ notation_editor->soundcard = NULL; /* notation toolbar */ notation_editor->notation_toolbar = ags_notation_toolbar_new(); gtk_box_pack_start((GtkBox *) notation_editor, (GtkWidget *) notation_editor->notation_toolbar, FALSE, FALSE, 0); /* paned */ notation_editor->paned = (GtkHPaned *) gtk_hpaned_new(); gtk_box_pack_start((GtkBox *) notation_editor, (GtkWidget *) notation_editor->paned, TRUE, TRUE, 0); /* machine selector */ viewport = gtk_viewport_new(NULL, NULL); g_object_set(viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_paned_pack1((GtkPaned *) notation_editor->paned, (GtkWidget *) viewport, FALSE, TRUE); scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_container_add(viewport, scrolled_window); notation_editor->machine_selector = g_object_new(AGS_TYPE_MACHINE_SELECTOR, "homogeneous", FALSE, "spacing", 0, NULL); notation_editor->machine_selector->flags |= (AGS_MACHINE_SELECTOR_SHOW_REVERSE_MAPPING | AGS_MACHINE_SELECTOR_SHOW_SHIFT_PIANO | AGS_MACHINE_SELECTOR_NOTATION); gtk_label_set_label(notation_editor->machine_selector->label, i18n("notation")); notation_editor->machine_selector->popup = ags_machine_selector_popup_new(notation_editor->machine_selector); g_object_set(notation_editor->machine_selector->menu_button, "menu", notation_editor->machine_selector->popup, NULL); gtk_scrolled_window_add_with_viewport(scrolled_window, (GtkWidget *) notation_editor->machine_selector); /* selected machine */ notation_editor->selected_machine = NULL; /* table */ viewport = gtk_viewport_new(NULL, NULL); g_object_set(viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_paned_pack2((GtkPaned *) notation_editor->paned, (GtkWidget *) viewport, TRUE, TRUE); table = (GtkTable *) gtk_table_new(3, 2, FALSE); gtk_container_add(viewport, table); /* notebook */ notation_editor->notebook = g_object_new(AGS_TYPE_NOTEBOOK, "homogeneous", FALSE, "spacing", 0, "prefix", i18n("channel"), NULL); gtk_table_attach(table, (GtkWidget *) notation_editor->notebook, 0, 3, 0, 1, GTK_FILL|GTK_EXPAND, GTK_FILL, 0, 0); /* scrolled piano */ notation_editor->scrolled_piano = ags_scrolled_piano_new(); g_object_set(notation_editor->scrolled_piano, "margin-top", (guint) ((AGS_RULER_FONT_SIZE + (2 * AGS_RULER_FREE_SPACE) + AGS_RULER_LARGE_STEP) - (ceil(AGS_PIANO_DEFAULT_KEY_HEIGHT / 4.0))), NULL); gtk_table_attach(table, (GtkWidget *) notation_editor->scrolled_piano, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* notation edit */ notation_editor->notation_edit = ags_notation_edit_new(); gtk_table_attach(table, (GtkWidget *) notation_editor->notation_edit, 1, 2, 1, 2, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); } void ags_notation_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsNotationEditor *notation_editor; notation_editor = AGS_NOTATION_EDITOR(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(notation_editor->soundcard == soundcard){ return; } if(notation_editor->soundcard != NULL){ g_object_unref(notation_editor->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } notation_editor->soundcard = soundcard; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notation_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsNotationEditor *notation_editor; notation_editor = AGS_NOTATION_EDITOR(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, notation_editor->soundcard); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notation_editor_connect(AgsConnectable *connectable) { AgsNotationEditor *notation_editor; notation_editor = AGS_NOTATION_EDITOR(connectable); if((AGS_NOTATION_EDITOR_CONNECTED & (notation_editor->flags)) != 0){ return; } notation_editor->flags |= AGS_NOTATION_EDITOR_CONNECTED; g_signal_connect((GObject *) notation_editor->machine_selector, "changed", G_CALLBACK(ags_notation_editor_machine_changed_callback), (gpointer) notation_editor); /* toolbar */ ags_connectable_connect(AGS_CONNECTABLE(notation_editor->notation_toolbar)); /* machine selector */ ags_connectable_connect(AGS_CONNECTABLE(notation_editor->machine_selector)); /* notation edit */ ags_connectable_connect(AGS_CONNECTABLE(notation_editor->notation_edit)); } void ags_notation_editor_disconnect(AgsConnectable *connectable) { AgsNotationEditor *notation_editor; notation_editor = AGS_NOTATION_EDITOR(connectable); /* notation toolbar */ ags_connectable_disconnect(AGS_CONNECTABLE(notation_editor->notation_toolbar)); /* machine selector */ ags_connectable_disconnect(AGS_CONNECTABLE(notation_editor->machine_selector)); /* notation edit */ ags_connectable_disconnect(AGS_CONNECTABLE(notation_editor->notation_edit)); } void ags_notation_editor_finalize(GObject *gobject) { AgsNotationEditor *notation_editor; notation_editor = AGS_NOTATION_EDITOR(gobject); if(notation_editor->soundcard != NULL){ g_object_unref(notation_editor->soundcard); } /* call parent */ G_OBJECT_CLASS(ags_notation_editor_parent_class)->finalize(gobject); } void ags_notation_editor_real_machine_changed(AgsNotationEditor *notation_editor, AgsMachine *machine) { AgsMachine *old_machine; AgsMutexManager *mutex_manager; GList *tab; guint length; guint audio_channels; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* disconnect set pads - old */ old_machine = notation_editor->selected_machine; if(old_machine != NULL){ g_object_disconnect(old_machine, "any_signal::resize-audio-channels", G_CALLBACK(ags_notation_editor_resize_audio_channels_callback), (gpointer) notation_editor, "any_signal::resize-pads", G_CALLBACK(ags_notation_editor_resize_pads_callback), (gpointer) notation_editor, NULL); } /* get audio mutex */ if(machine != NULL){ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); } /* notebook - remove tabs */ length = g_list_length(notation_editor->notebook->tab); for(i = 0; i < length; i++){ ags_notebook_remove_tab(notation_editor->notebook, 0); } /* check pattern mode */ if(AGS_IS_DRUM(machine) || AGS_IS_MATRIX(machine)){ notation_editor->flags |= AGS_NOTATION_EDITOR_PATTERN_MODE; }else{ notation_editor->flags &= (~AGS_NOTATION_EDITOR_PATTERN_MODE); } /* notebook - add tabs */ if(machine != NULL){ pthread_mutex_lock(audio_mutex); audio_channels = machine->audio->audio_channels; pthread_mutex_unlock(audio_mutex); for(i = 0; i < audio_channels; i++){ ags_notebook_insert_tab(notation_editor->notebook, i); tab = notation_editor->notebook->tab; gtk_toggle_button_set_active(AGS_NOTEBOOK_TAB(tab->data)->toggle, TRUE); } } /* piano */ if(machine != NULL){ guint channel_count; /* get channel count */ pthread_mutex_lock(audio_mutex); #if 0 if((AGS_AUDIO_NOTATION_DEFAULT & (machine->audio->flags)) != 0){ channel_count = machine->audio->input_pads; }else{ channel_count = machine->audio->output_pads; } #else channel_count = machine->audio->input_pads; #endif pthread_mutex_unlock(audio_mutex); /* apply channel count */ g_object_set(notation_editor->scrolled_piano->piano, "key-count", channel_count, NULL); }else{ /* apply default */ g_object_set(notation_editor->scrolled_piano->piano, "key-count", AGS_PIANO_DEFAULT_KEY_COUNT, NULL); } gtk_widget_queue_draw(notation_editor->scrolled_piano->piano); /* selected machine */ notation_editor->selected_machine = machine; /* reset scrollbars */ ags_notation_edit_reset_vscrollbar(notation_editor->notation_edit); ags_notation_edit_reset_hscrollbar(notation_editor->notation_edit); /* redraw */ gtk_widget_queue_draw(notation_editor->notation_edit); /* connect set-pads - new */ if(machine != NULL){ g_signal_connect_after(machine, "resize-audio-channels", G_CALLBACK(ags_notation_editor_resize_audio_channels_callback), notation_editor); g_signal_connect_after(machine, "resize-pads", G_CALLBACK(ags_notation_editor_resize_pads_callback), notation_editor); } } /** * ags_notation_editor_machine_changed: * @notation_editor: an #AgsNotationEditor * @machine: the new #AgsMachine * * Is emitted as machine changed of notation_editor. * * Since: 1.2.0 */ void ags_notation_editor_machine_changed(AgsNotationEditor *notation_editor, AgsMachine *machine) { g_return_if_fail(AGS_IS_NOTATION_EDITOR(notation_editor)); g_object_ref((GObject *) notation_editor); g_signal_emit((GObject *) notation_editor, notation_editor_signals[MACHINE_CHANGED], 0, machine); g_object_unref((GObject *) notation_editor); } /** * ags_notation_editor_add_note: * @notation_editor: an #AgsNotationEditor * @note: the #AgsNote to add * * Add note. * * Since: 1.2.0 */ void ags_notation_editor_add_note(AgsNotationEditor *notation_editor, AgsNote *note) { AgsMachine *machine; AgsNotation *notation; AgsTimestamp *timestamp; GList *list_notation; gint i; if(!AGS_IS_NOTATION_EDITOR(notation_editor) || !AGS_IS_NOTE(note)){ return; } if(notation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = notation_editor->selected_machine; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* check all active tabs */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = (guint64) AGS_NOTATION_DEFAULT_OFFSET * floor((double) note->x[0] / (double) AGS_NOTATION_DEFAULT_OFFSET); pthread_mutex_lock(audio_mutex); i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ AgsNote *new_note; list_notation = machine->audio->notation; list_notation = ags_notation_find_near_timestamp(list_notation, i, timestamp); if(list_notation != NULL){ notation = list_notation->data; }else{ notation = ags_notation_new(machine->audio, i); machine->audio->notation = ags_notation_add(machine->audio->notation, notation); } new_note = ags_note_duplicate(note); ags_notation_add_note(notation, new_note, FALSE); i++; } pthread_mutex_unlock(audio_mutex); gtk_widget_queue_draw(notation_editor->notation_edit); } } /** * ags_notation_editor_delete_note: * @notation_editor: an #AgsNotationEditor * @x: point x * @y: point y * * Delete note. * * Since: 1.2.0 */ void ags_notation_editor_delete_note(AgsNotationEditor *notation_editor, guint x, guint y) { AgsMachine *machine; AgsNotation *notation; AgsTimestamp *timestamp; GList *list_notation; gint i; if(!AGS_IS_NOTATION_EDITOR(notation_editor)){ return; } if(notation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = notation_editor->selected_machine; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* check all active tabs */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(x / AGS_NOTATION_DEFAULT_OFFSET); pthread_mutex_lock(audio_mutex); i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ AgsNote *new_note; list_notation = machine->audio->notation; list_notation = ags_notation_find_near_timestamp(list_notation, i, timestamp); if(list_notation != NULL){ notation = list_notation->data; }else{ i++; continue; } ags_notation_remove_note_at_position(notation, x, y); i++; } pthread_mutex_unlock(audio_mutex); gtk_widget_queue_draw(notation_editor->notation_edit); } } /** * ags_notation_editor_select_region: * @notation_editor: an #AgsNotationEditor * @x0: point x0 * @y0: point y0 * @x1: point x1 * @y1: point y1 * * Select region. * * Since: 1.2.0 */ void ags_notation_editor_select_region(AgsNotationEditor *notation_editor, guint x0, guint y0, guint x1, guint y1) { AgsMachine *machine; AgsNotation *notation; AgsTimestamp *timestamp; GList *list_notation; gint i; if(!AGS_IS_NOTATION_EDITOR(notation_editor)){ return; } if(notation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = notation_editor->selected_machine; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* swap values if needed */ if(x0 > x1){ guint tmp; tmp = x0; x0 = x1; x1 = tmp; } if(y0 > y1){ guint tmp; tmp = y0; y0 = y1; y1 = tmp; } /* check all active tabs */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; pthread_mutex_lock(audio_mutex); i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ list_notation = machine->audio->notation; timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(x0 / AGS_NOTATION_DEFAULT_OFFSET); while((list_notation = ags_notation_find_near_timestamp(list_notation, i, timestamp)) != NULL && timestamp->timer.ags_offset.offset < (AGS_NOTATION_DEFAULT_OFFSET * floor(x1 / AGS_NOTATION_DEFAULT_OFFSET)) + AGS_NOTATION_DEFAULT_OFFSET){ ags_notation_add_region_to_selection(list_notation->data, x0, y0, x1, y1, TRUE); /* iterate */ timestamp->timer.ags_offset.offset += AGS_NOTATION_DEFAULT_OFFSET; list_notation = list_notation->next; } i++; } pthread_mutex_unlock(audio_mutex); gtk_widget_queue_draw(notation_editor->notation_edit); } } void ags_notation_edit_play_channel(AgsNotationEdit *notation_edit, AgsChannel *channel, AgsNote *note) { AgsWindow *window; AgsGuiThread *gui_thread; AgsStartSoundcard *start_soundcard; AgsInitChannel *init_channel; AgsAppendChannel *append_channel; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsApplicationContext *application_context; GObject *soundcard; GList *task; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) notation_edit); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get threads */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get soundcard */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; pthread_mutex_unlock(channel_mutex); if(soundcard == NULL){ return; } /* create tasks */ task = NULL; /* init channel for playback */ init_channel = ags_init_channel_new(channel, FALSE, TRUE, FALSE, FALSE); g_signal_connect_after(G_OBJECT(init_channel), "launch", G_CALLBACK(ags_notation_editor_init_channel_launch_callback), note); task = g_list_prepend(task, init_channel); /* append channel for playback */ append_channel = ags_append_channel_new((GObject *) main_loop, (GObject *) channel); task = g_list_prepend(task, append_channel); /* create start task */ start_soundcard = ags_start_soundcard_new(application_context); task = g_list_prepend(task, start_soundcard); /* perform playback */ task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); } /** * ags_notation_editor_do_feedback: * @notation_editor: an #AgsNotationEditor * * Do playback feedback. * * Since: 1.2.0 */ void ags_notation_editor_do_feedback(AgsNotationEditor *notation_editor) { AgsNotationEdit *notation_edit; AgsMachine *machine; AgsNotation *notation; AgsTimestamp *timestamp; GList *list_notation; gint i; if(!AGS_IS_NOTATION_EDITOR(notation_editor)){ return; } if(notation_editor->selected_machine != NULL){ AgsChannel *output, *input; AgsChannel *channel; AgsMutexManager *mutex_manager; guint audio_flags; guint output_pads, input_pads; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; notation_edit = notation_editor->notation_edit; machine = notation_editor->selected_machine; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* check all active tabs */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(notation_edit->cursor_position_x / AGS_NOTATION_DEFAULT_OFFSET); i = 0; pthread_mutex_lock(audio_mutex); audio_flags = machine->audio->flags; output_pads = machine->audio->output_pads; input_pads = machine->audio->input_pads; output = machine->audio->output; input = machine->audio->input; pthread_mutex_unlock(audio_mutex); while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ AgsNote *current_note; pthread_mutex_lock(audio_mutex); list_notation = machine->audio->notation; list_notation = ags_notation_find_near_timestamp(list_notation, i, timestamp); if(list_notation != NULL){ notation = list_notation->data; }else{ i++; pthread_mutex_unlock(audio_mutex); continue; } current_note = ags_notation_find_point(list_notation->data, notation_edit->cursor_position_x, notation_edit->cursor_position_y, FALSE); pthread_mutex_unlock(audio_mutex); if(current_note != NULL){ #if 0 if((AGS_AUDIO_NOTATION_DEFAULT & audio_flags) == 0){ channel = ags_channel_nth(output, i); }else{ channel = ags_channel_nth(input, i); } #else channel = ags_channel_nth(input, i); #endif if((AGS_AUDIO_REVERSE_MAPPING & audio_flags) != 0){ channel = ags_channel_pad_nth(channel, (((AGS_AUDIO_NOTATION_DEFAULT & audio_flags) == 0) ? output_pads: input_pads) - notation_edit->cursor_position_y - 1); }else{ channel = ags_channel_pad_nth(channel, notation_edit->cursor_position_y); } ags_notation_edit_play_channel(notation_edit, channel, current_note); } i++; } } } /** * ags_notation_editor_select_all: * @notation_editor: an #AgsNotationEditor * * Is emitted as machine changed of notation_editor. * * Since: 1.2.0 */ void ags_notation_editor_select_all(AgsNotationEditor *notation_editor) { AgsMachine *machine; GList *list_notation; gint i; if(!AGS_IS_NOTATION_EDITOR(notation_editor)){ return; } if(notation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = notation_editor->selected_machine; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* check all active tabs */ pthread_mutex_lock(audio_mutex); i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ list_notation = machine->audio->notation; while((list_notation = ags_notation_find_near_timestamp(list_notation, i, NULL)) != NULL){ ags_notation_add_all_to_selection(AGS_NOTATION(list_notation->data)); list_notation = list_notation->next; } i++; } pthread_mutex_unlock(audio_mutex); gtk_widget_queue_draw(notation_editor->notation_edit); } } /** * ags_notation_editor_paste: * @notation_editor: an #AgsNotationEditor * * Is emitted as machine changed of notation_editor. * * Since: 1.2.0 */ void ags_notation_editor_paste(AgsNotationEditor *notation_editor) { AgsMachine *machine; AgsNotationEdit *notation_edit; AgsNotation *notation; xmlDoc *clipboard; xmlNode *audio_node; xmlNode *notation_list_node, *notation_node; xmlNode *timestamp_node; gchar *buffer; guint position_x, position_y; gint first_x, last_x; gboolean paste_from_position; auto gint ags_notation_editor_paste_notation_all(xmlNode *notation_node, AgsTimestamp *timestamp, gboolean match_channel, gboolean no_duplicates); auto gint ags_notation_editor_paste_notation(xmlNode *audio_node); gint ags_notation_editor_paste_notation_all(xmlNode *notation_node, AgsTimestamp *timestamp, gboolean match_channel, gboolean no_duplicates) { AgsNotation *notation; GList *list_notation; gint first_x; guint current_x; gint i; first_x = -1; /* */ i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ list_notation = ags_notation_find_near_timestamp(machine->audio->notation, i, timestamp); if(list_notation == NULL){ notation = ags_notation_new(machine->audio, i); notation->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; machine->audio->notation = ags_notation_add(machine->audio->notation, notation); }else{ notation = AGS_NOTATION(list_notation->data); } if(paste_from_position){ xmlNode *child; guint x_boundary; ags_notation_insert_from_clipboard_extended(notation, notation_node, TRUE, position_x, TRUE, position_y, match_channel, no_duplicates); /* get boundaries */ child = notation_node->children; current_x = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "note", 5)){ guint tmp; tmp = g_ascii_strtoull(xmlGetProp(child, "x1"), NULL, 10); if(tmp > current_x){ current_x = tmp; } } } child = child->next; } x_boundary = g_ascii_strtoull(xmlGetProp(notation_node, "x_boundary"), NULL, 10); if(first_x == -1 || x_boundary < first_x){ first_x = x_boundary; } if(position_x > x_boundary){ current_x += (position_x - x_boundary); }else{ current_x -= (x_boundary - position_x); } if(current_x > last_x){ last_x = current_x; } }else{ xmlNode *child; ags_notation_insert_from_clipboard(notation, notation_node, FALSE, 0, FALSE, 0); /* get boundaries */ child = notation_node->children; current_x = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "note", 5)){ guint tmp; tmp = g_ascii_strtoull(xmlGetProp(child, "x1"), NULL, 10); if(tmp > current_x){ current_x = tmp; } } } child = child->next; } if(current_x > last_x){ last_x = current_x; } } i++; } return(first_x); } gint ags_notation_editor_paste_notation(xmlNode *audio_node){ AgsTimestamp *timestamp; gint first_x; gboolean match_channel, no_duplicates; first_x = -1; match_channel = ((AGS_NOTATION_EDITOR_PASTE_MATCH_AUDIO_CHANNEL & (notation_editor->flags)) != 0) ? TRUE: FALSE; no_duplicates = ((AGS_NOTATION_EDITOR_PASTE_NO_DUPLICATES & (notation_editor->flags)) != 0) ? TRUE: FALSE; /* timestamp */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = 0; /* paste notation */ notation_list_node = audio_node->children; while(notation_list_node != NULL){ if(notation_list_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(notation_list_node->name, "notation-list", 14)){ notation_node = notation_list_node->children; while(notation_node != NULL){ if(notation_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(notation_node->name, "notation", 9)){ guint64 offset; timestamp_node = notation_node->children; offset = 0; while(timestamp_node != NULL){ if(timestamp_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(timestamp_node->name, "timestamp", 10)){ offset = g_ascii_strtoull(xmlGetProp(timestamp_node, "offset"), NULL, 10); break; } } timestamp_node = timestamp_node->next; } /* 1st attempt */ timestamp->timer.ags_offset.offset = offset; first_x = ags_notation_editor_paste_notation_all(notation_node, timestamp, match_channel, no_duplicates); /* 2nd attempt */ timestamp->timer.ags_offset.offset = offset + AGS_NOTATION_DEFAULT_OFFSET; ags_notation_editor_paste_notation_all(notation_node, timestamp, match_channel, no_duplicates); } } notation_node = notation_node->next; } } } notation_list_node = notation_list_node->next; } g_object_unref(timestamp); return(first_x); } if(!AGS_IS_NOTATION_EDITOR(notation_editor)){ return; } if((machine = notation_editor->selected_machine) != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; notation_edit = notation_editor->notation_edit; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) notation_editor->selected_machine->audio); pthread_mutex_unlock(application_mutex); /* get clipboard */ buffer = gtk_clipboard_wait_for_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); if(buffer == NULL){ return; } /* get position */ if(notation_editor->notation_toolbar->selected_edit_mode == notation_editor->notation_toolbar->position){ last_x = 0; paste_from_position = TRUE; position_x = notation_editor->notation_edit->cursor_position_x; position_y = notation_editor->notation_edit->cursor_position_y; #ifdef DEBUG printf("pasting at position: [%u,%u]\n", position_x, position_y); #endif }else{ paste_from_position = FALSE; } /* get xml tree */ clipboard = xmlReadMemory(buffer, strlen(buffer), NULL, "UTF-8", 0); audio_node = xmlDocGetRootElement(clipboard); first_x = -1; /* iterate xml tree */ pthread_mutex_lock(audio_mutex); while(audio_node != NULL){ if(audio_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("audio", audio_node->name, 6)){ notation_node = audio_node->children; first_x = ags_notation_editor_paste_notation(audio_node); break; } } audio_node = audio_node->next; } if(first_x == -1){ first_x = 0; } xmlFreeDoc(clipboard); pthread_mutex_unlock(audio_mutex); if(paste_from_position){ gint big_step, small_step; //TODO:JK: implement me big_step = (guint) ceil((double) last_x / 16.0) * 16.0 + (notation_edit->cursor_position_x % (guint) 16); small_step = (guint) big_step - 16; if(small_step < last_x){ notation_editor->notation_edit->cursor_position_x = big_step; }else{ notation_editor->notation_edit->cursor_position_x = small_step; } } gtk_widget_queue_draw(notation_editor->notation_edit); } } /** * ags_notation_editor_copy: * @notation_editor: an #AgsNotationEditor * * Is emitted as machine changed of notation_editor. * * Since: 1.2.0 */ void ags_notation_editor_copy(AgsNotationEditor *notation_editor) { AgsMachine *machine; AgsNotation *notation; xmlDoc *clipboard; xmlNode *audio_node, *notation_list_node, *notation_node; GList *list_notation; xmlChar *buffer; int size; gint i; if(!AGS_IS_NOTATION_EDITOR(notation_editor)){ return; } if(notation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = notation_editor->selected_machine; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* create document */ clipboard = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION); /* create root node */ audio_node = xmlNewNode(NULL, BAD_CAST "audio"); xmlDocSetRootElement(clipboard, audio_node); notation_list_node = xmlNewNode(NULL, BAD_CAST "notation-list"); xmlAddChild(audio_node, notation_list_node); /* create notation nodes */ list_notation = machine->audio->notation; i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ pthread_mutex_lock(audio_mutex); list_notation = machine->audio->notation; /* copy */ while((list_notation = ags_notation_find_near_timestamp(list_notation, i, NULL)) != NULL){ notation_node = ags_notation_copy_selection(AGS_NOTATION(list_notation->data)); xmlAddChild(notation_list_node, notation_node); list_notation = list_notation->next; } pthread_mutex_unlock(audio_mutex); i++; } /* write to clipboard */ xmlDocDumpFormatMemoryEnc(clipboard, &buffer, &size, "UTF-8", TRUE); gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), buffer, size); gtk_clipboard_store(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); xmlFreeDoc(clipboard); } } /** * ags_notation_editor_cut: * @notation_editor: an #AgsNotationEditor * * Is emitted as machine changed of notation_editor. * * Since: 1.2.0 */ void ags_notation_editor_cut(AgsNotationEditor *notation_editor) { AgsMachine *machine; AgsNotation *notation; xmlDoc *clipboard; xmlNode *audio_node; xmlNode *notation_list_node, *notation_node; GList *list_notation; xmlChar *buffer; int size; gint i; if(!AGS_IS_NOTATION_EDITOR(notation_editor)){ return; } if(notation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = notation_editor->selected_machine; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* create document */ clipboard = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION); /* create root node */ audio_node = xmlNewNode(NULL, BAD_CAST "audio"); xmlDocSetRootElement(clipboard, audio_node); notation_list_node = xmlNewNode(NULL, BAD_CAST "notation-list"); xmlAddChild(audio_node, notation_list_node); /* create notation nodes */ pthread_mutex_lock(audio_mutex); list_notation = machine->audio->notation; pthread_mutex_unlock(audio_mutex); i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ pthread_mutex_lock(audio_mutex); list_notation = machine->audio->notation; /* cut */ while((list_notation = ags_notation_find_near_timestamp(list_notation, i, NULL)) != NULL){ notation_node = ags_notation_cut_selection(AGS_NOTATION(list_notation->data)); xmlAddChild(notation_list_node, notation_node); list_notation = list_notation->next; } pthread_mutex_unlock(audio_mutex); i++; } gtk_widget_queue_draw(notation_editor->notation_edit); /* write to clipboard */ xmlDocDumpFormatMemoryEnc(clipboard, &buffer, &size, "UTF-8", TRUE); gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), buffer, size); gtk_clipboard_store(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); xmlFreeDoc(clipboard); } } /** * ags_notation_editor_invert: * @notation_editor: an #AgsNotationEditor * * Invert all notation of @notation_editor's selected machine. * * Since: 1.2.0 */ void ags_notation_editor_invert(AgsNotationEditor *notation_editor) { AgsMachine *machine; AgsNotation *notation; GList *list_notation; int size; gint i; auto void ags_notation_editor_get_boundary(AgsNotation *notation, guint *lower, guint *upper); auto void ags_notation_editor_invert_notation(AgsNotation *notation, guint lower, guint upper); void ags_notation_editor_get_boundary(AgsNotation *notation, guint *lower, guint *upper) { GList *note; /* retrieve upper and lower */ while(note != NULL){ if(AGS_NOTE(note->data)->y < lower[0]){ lower[0] = AGS_NOTE(note->data)->y; } if(AGS_NOTE(note->data)->y > upper[0]){ upper[0] = AGS_NOTE(note->data)->y; } note = note->next; } } void ags_notation_editor_invert_notation(AgsNotation *notation, guint lower, guint upper) { GList *note; /* invert */ note = notation->notes; while(note != NULL){ if((gdouble) AGS_NOTE(note->data)->y < (gdouble) (upper - lower) / 2.0){ AGS_NOTE(note->data)->y = (upper - (AGS_NOTE(note->data)->y - lower)); }else if((gdouble) AGS_NOTE(note->data)->y > (gdouble) (upper - lower) / 2.0){ AGS_NOTE(note->data)->y = (lower + (upper - AGS_NOTE(note->data)->y)); } note = note->next; } } if(!AGS_IS_NOTATION_EDITOR(notation_editor)){ return; } if(notation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; guint lower, upper; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) notation_editor->selected_machine->audio); pthread_mutex_unlock(application_mutex); /* create notation nodes */ pthread_mutex_lock(audio_mutex); machine = notation_editor->selected_machine; i = 0; while((i = ags_notebook_next_active_tab(notation_editor->notebook, i)) != -1){ /* get boundary */ list_notation = machine->audio->notation; lower = G_MAXUINT; upper = 0; while(list_notation != NULL){ list_notation = ags_notation_find_near_timestamp(list_notation, i, NULL); ags_notation_editor_get_boundary(AGS_NOTATION(list_notation->data), &lower, &upper); list_notation = list_notation->next; } /* invert */ list_notation = machine->audio->notation; while((list_notation = ags_notation_find_near_timestamp(list_notation, i, NULL)) != NULL){ ags_notation_editor_invert_notation(AGS_NOTATION(list_notation->data), lower, upper); list_notation = list_notation->next; } i++; } pthread_mutex_unlock(audio_mutex); gtk_widget_queue_draw(notation_editor->notation_edit); } } /** * ags_notation_editor_new: * * Creates an #AgsNotationEditor * * Returns: a new #AgsNotationEditor * * Since: 1.2.0 */ AgsNotationEditor* ags_notation_editor_new() { AgsNotationEditor *notation_editor; notation_editor = (AgsNotationEditor *) g_object_new(AGS_TYPE_NOTATION_EDITOR, NULL); return(notation_editor); } gsequencer-1.4.24/ags/X/ags_audio_preferences_callbacks.c0000644000175000017500000002243713246707333020344 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include int ags_audio_preferences_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsAudioPreferences *audio_preferences) { AgsPreferences *preferences; if(old_parent != NULL){ return(0); } preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(audio_preferences), AGS_TYPE_PREFERENCES); audio_preferences->connect_sink = (GtkButton *) gtk_button_new_with_label(i18n("connect sink")); gtk_box_pack_end((GtkBox *) GTK_DIALOG(preferences)->action_area, (GtkWidget *) audio_preferences->connect_sink, TRUE, FALSE, 0); audio_preferences->add = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_end((GtkBox *) GTK_DIALOG(preferences)->action_area, (GtkWidget *) audio_preferences->add, TRUE, FALSE, 0); return(0); } void ags_audio_preferences_connect_sink_callback(GtkWidget *widget, AgsAudioPreferences *audio_preferences) { AgsWindow *window; AgsPreferences *preferences; AgsApplicationContext *application_context; GObject *server; GList *list; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(audio_preferences), AGS_TYPE_PREFERENCES); window = (AgsWindow *) preferences->window; application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ server = (AgsJackServer *) list->data; ags_jack_server_connect_client(server); list = list->next; } pthread_mutex_unlock(application_mutex); } void ags_audio_preferences_add_callback(GtkWidget *widget, AgsAudioPreferences *audio_preferences) { AgsWindow *window; AgsPreferences *preferences; AgsSoundcardEditor *soundcard_editor; AgsSoundcardThread *soundcard_thread; AgsApplicationContext *application_context; GList *list; GObject *soundcard; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(audio_preferences), AGS_TYPE_PREFERENCES); window = (AgsWindow *) preferences->window; application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; /* retrieve first soundcard */ soundcard = NULL; pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); if(list != NULL){ soundcard = list->data; } pthread_mutex_unlock(application_mutex); /* soundcard editor */ soundcard_editor = ags_soundcard_editor_new(); if(soundcard != NULL){ soundcard_editor->soundcard = soundcard; soundcard_editor->soundcard_thread = (GObject *) ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_SOUNDCARD_THREAD); } list = gtk_container_get_children((GtkContainer *) audio_preferences->soundcard_editor); if(list != NULL){ gtk_widget_set_sensitive((GtkWidget *) soundcard_editor->buffer_size, FALSE); } g_list_free(list); gtk_box_pack_start((GtkBox *) audio_preferences->soundcard_editor, (GtkWidget *) soundcard_editor, FALSE, FALSE, 0); ags_applicable_reset(AGS_APPLICABLE(soundcard_editor)); ags_connectable_connect(AGS_CONNECTABLE(soundcard_editor)); g_signal_connect(soundcard_editor->remove, "clicked", G_CALLBACK(ags_audio_preferences_remove_soundcard_editor_callback), audio_preferences); gtk_widget_show_all((GtkWidget *) soundcard_editor); /* reset default card */ g_object_set(window, "soundcard", soundcard, NULL); } void ags_audio_preferences_remove_soundcard_editor_callback(GtkWidget *button, AgsAudioPreferences *audio_preferences) { AgsWindow *window; AgsPreferences *preferences; AgsSoundcardEditor *soundcard_editor; AgsApplicationContext *application_context; GList *list; GObject *soundcard; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(audio_preferences), AGS_TYPE_PREFERENCES); window = (AgsWindow *) preferences->window; application_context = (AgsApplicationContext *) window->application_context; application_mutex = window->application_mutex; soundcard_editor = (AgsSoundcardEditor *) gtk_widget_get_ancestor(button, AGS_TYPE_SOUNDCARD_EDITOR); if(!AGS_IS_JACK_DEVOUT(soundcard_editor->soundcard)){ ags_soundcard_editor_remove_soundcard(soundcard_editor, soundcard_editor->soundcard); } gtk_widget_destroy((GtkWidget *) soundcard_editor); /* reset default card */ #if 0 soundcard = NULL; pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); if(list != NULL){ soundcard = list->data; } pthread_mutex_unlock(application_mutex); g_object_set(window, "soundcard", soundcard, NULL); #endif /* */ list = gtk_container_get_children((GtkContainer *) audio_preferences->soundcard_editor); if(list != NULL){ gtk_widget_set_sensitive((GtkWidget *) AGS_SOUNDCARD_EDITOR(list->data)->buffer_size, TRUE); } g_list_free(list); } void ags_audio_preferences_start_jack_callback(GtkButton *button, AgsAudioPreferences *audio_preferences) { AgsWindow *window; AgsJackServer *jack_server; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; #ifdef AGS_WITH_JACK jackctl_driver_t *driver; #endif GList *list; #ifdef AGS_WITH_JACK JSList *jslist; #endif // gchar *driver_name; pthread_mutex_t *application_mutex; window = AGS_WINDOW(AGS_PREFERENCES(gtk_widget_get_ancestor(GTK_WIDGET(audio_preferences), AGS_TYPE_PREFERENCES))->window); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); //TODO:JK: improve me list = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(AGS_IS_JACK_SERVER(list->data)){ jack_server = list->data; break; } list = list->next; } pthread_mutex_unlock(application_mutex); #ifdef AGS_WITH_JACK /* find driver */ driver = NULL; // driver_name = gtk_combo_box_text_get_active_text(audio_preferences->jack_driver); jslist = NULL; // jslist = jackctl_server_get_drivers_list(jack_server->jackctl); while(jslist != NULL){ // if(!g_ascii_strcasecmp(driver_name, // jackctl_driver_get_name(jslist->data))){ // driver = jslist->data; // break; // } } /* start server */ if(jack_server != NULL){ // jackctl_server_start(jack_server->jackctl); } #endif } void ags_audio_preferences_stop_jack_callback(GtkButton *button, AgsAudioPreferences *audio_preferences) { AgsWindow *window; AgsJackServer *jack_server; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *list; pthread_mutex_t *application_mutex; window = AGS_WINDOW(AGS_PREFERENCES(gtk_widget_get_ancestor(GTK_WIDGET(audio_preferences), AGS_TYPE_PREFERENCES))->window); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); //TODO:JK: improve me list = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(AGS_IS_JACK_SERVER(list->data)){ jack_server = list->data; break; } list = list->next; } pthread_mutex_unlock(application_mutex); if(jack_server != NULL){ #ifdef AGS_WITH_JACK // jackctl_server_stop(jack_server->jackctl); #endif } } gsequencer-1.4.24/ags/X/ags_window.h0000644000175000017500000000750713256163135014175 00000000000000/* 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 . */ #ifndef __AGS_WINDOW_H__ #define __AGS_WINDOW_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include #define AGS_TYPE_WINDOW (ags_window_get_type()) #define AGS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WINDOW, AgsWindow)) #define AGS_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_WINDOW, AgsWindowClass)) #define AGS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_WINDOW)) #define AGS_IS_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_WINDOW)) #define AGS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_WINDOW, AgsWindowClass)) #define AGS_MACHINE_COUNTER(ptr) ((AgsMachineCounter *)(ptr)) typedef struct _AgsWindow AgsWindow; typedef struct _AgsWindowClass AgsWindowClass; typedef struct _AgsMachineCounter AgsMachineCounter; typedef enum{ AGS_WINDOW_CONNECTED = 1, AGS_WINDOW_READY = 1 << 1, AGS_WINDOW_LOADING = 1 << 2, AGS_WINDOW_SAVING = 1 << 3, AGS_WINDOW_TERMINATING = 1 << 4, }AgsWindowFlags; struct _AgsWindow { GtkWindow window; guint flags; gchar *filename; char *name; GObject *application_context; pthread_mutex_t *application_mutex; GObject *soundcard; AgsMenuBar *menu_bar; AgsContextMenu *context_menu; GtkVPaned *paned; GtkVBox *machines; GList *machine_counter; AgsMachine *selected; AgsNotationEditor *notation_editor; AgsNavigation *navigation; GList *dialog; AgsAutomationWindow *automation_window; AgsWaveWindow *wave_window; AgsExportWindow *export_window; GtkWidget *midi_import_wizard; GtkWidget *midi_export_wizard; GtkWidget *midi_file_chooser; AgsPreferences *preferences; AgsHistoryBrowser *history_browser; }; struct _AgsWindowClass { GtkWindowClass window; }; struct _AgsMachineCounter { gchar *version; gchar *build_id; GType machine_type; gchar *filename; gchar *effect; guint counter; }; GType ags_window_get_type(void); GList* ags_window_standard_machine_counter_alloc(); AgsMachineCounter* ags_window_find_machine_counter(AgsWindow *window, GType machine_type); void ags_window_increment_machine_counter(AgsWindow *window, GType machine_type); void ags_window_decrement_machine_counter(AgsWindow *window, GType machine_type); AgsMachineCounter* ags_machine_counter_alloc(gchar *version, gchar *build_id, GType machine_type, guint initial_value); void ags_window_show_error(AgsWindow *window, gchar *message); gboolean ags_window_load_libags_audio_timeout(AgsWindow *window); gboolean ags_window_load_file_timeout(AgsWindow *window); AgsWindow* ags_window_new(GObject *application_context); #endif /*__AGS_WINDOW_H__*/ gsequencer-1.4.24/ags/X/ags_wave_window.h0000644000175000017500000000405113247044247015210 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WAVE_WINDOW_H__ #define __AGS_WAVE_WINDOW_H__ #include #include #include #include #define AGS_TYPE_WAVE_WINDOW (ags_wave_window_get_type()) #define AGS_WAVE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WAVE_WINDOW, AgsWaveWindow)) #define AGS_WAVE_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_WAVE_WINDOW, AgsWaveWindowClass)) #define AGS_IS_WAVE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_WAVE_WINDOW)) #define AGS_IS_WAVE_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_WAVE_WINDOW)) #define AGS_WAVE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_WAVE_WINDOW, AgsWaveWindowClass)) typedef struct _AgsWaveWindow AgsWaveWindow; typedef struct _AgsWaveWindowClass AgsWaveWindowClass; typedef enum{ AGS_WAVE_WINDOW_CONNECTED = 1, }AgsWaveWindowFlags; struct _AgsWaveWindow { GtkWindow window; guint flags; GObject *soundcard; GtkWidget *parent_window; AgsWaveEditor *wave_editor; }; struct _AgsWaveWindowClass { GtkWindowClass window; }; GType ags_wave_window_get_type(void); AgsWaveWindow* ags_wave_window_new(GtkWidget *parent_window); #endif /*__AGS_WAVE_WINDOW_H__*/ gsequencer-1.4.24/ags/X/ags_output_listing_editor_callbacks.h0000644000175000017500000000260713247044247021322 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OUTPUT_LISTING_EDITOR_CALLBACKS_H__ #define __AGS_OUTPUT_LISTING_EDITOR_CALLBACKS_H__ #include #include #include #include #include int ags_output_listing_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsOutputListingEditor *output_listing_editor); void ags_output_listing_editor_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsOutputListingEditor *output_listing_editor); #endif /*__AGS_OUTPUT_LISTING_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_plugin_browser.h0000644000175000017500000000463413246707333015730 00000000000000/* 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 . */ #ifndef __AGS_PLUGIN_BROWSER_H__ #define __AGS_PLUGIN_BROWSER_H__ #include #include #include #define AGS_TYPE_PLUGIN_BROWSER (ags_plugin_browser_get_type()) #define AGS_PLUGIN_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_PLUGIN_BROWSER, AgsPluginBrowser)) #define AGS_PLUGIN_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PLUGIN_BROWSER, AgsPluginBrowserClass)) #define AGS_IS_PLUGIN_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLUGIN_BROWSER)) #define AGS_IS_PLUGIN_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLUGIN_BROWSER)) #define AGS_PLUGIN_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLUGIN_BROWSER, AgsPluginBrowserClass)) typedef struct _AgsPluginBrowser AgsPluginBrowser; typedef struct _AgsPluginBrowserClass AgsPluginBrowserClass; typedef enum{ AGS_PLUGIN_BROWSER_CONNECTED = 1, }AgsPluginBrowserFlags; struct _AgsPluginBrowser { GtkDialog dialog; guint flags; GtkWidget *parent; GtkComboBoxText *plugin_type; GtkWidget *active_browser; GtkWidget *lv2_browser; GtkWidget *dssi_browser; GtkWidget *ladspa_browser; GtkWidget *vst_browser; GtkButton *apply; GtkButton *ok; GtkButton *cancel; }; struct _AgsPluginBrowserClass { GtkDialogClass dialog; }; GType ags_plugin_browser_get_type(void); gchar* ags_plugin_browser_get_plugin_filename(AgsPluginBrowser *plugin_browser); gchar* ags_plugin_browser_get_plugin_effect(AgsPluginBrowser *plugin_browser); AgsPluginBrowser* ags_plugin_browser_new(GtkWidget *parent); #endif /*__AGS_PLUGIN_BROWSER_H__*/ gsequencer-1.4.24/ags/X/ags_effect_bulk.c0000644000175000017500000023266313256163135015135 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_effect_bulk_class_init(AgsEffectBulkClass *effect_bulk); void ags_effect_bulk_connectable_interface_init(AgsConnectableInterface *connectable); void ags_effect_bulk_plugin_interface_init(AgsPluginInterface *plugin); void ags_effect_bulk_init(AgsEffectBulk *effect_bulk); void ags_effect_bulk_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_effect_bulk_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_effect_bulk_connect(AgsConnectable *connectable); void ags_effect_bulk_disconnect(AgsConnectable *connectable); gchar* ags_effect_bulk_get_name(AgsPlugin *plugin); void ags_effect_bulk_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_effect_bulk_get_version(AgsPlugin *plugin); void ags_effect_bulk_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_effect_bulk_get_build_id(AgsPlugin *plugin); void ags_effect_bulk_set_build_id(AgsPlugin *plugin, gchar *build_id); void ags_effect_bulk_finalize(GObject *gobject); void ags_effect_bulk_show(GtkWidget *widget); GList* ags_effect_bulk_add_ladspa_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect); GList* ags_effect_bulk_add_dssi_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect); GList* ags_effect_bulk_add_lv2_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect); GList* ags_effect_bulk_real_add_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect); void ags_effect_bulk_real_remove_effect(AgsEffectBulk *effect_bulk, guint nth); void ags_effect_bulk_real_resize_audio_channels(AgsEffectBulk *effect_bulk, guint new_size, guint old_size); void ags_effect_bulk_real_resize_pads(AgsEffectBulk *effect_bulk, guint new_size, guint old_size); void ags_effect_bulk_real_map_recall(AgsEffectBulk *effect_bulk); GList* ags_effect_bulk_real_find_port(AgsEffectBulk *effect_bulk); /** * SECTION:ags_effect_bulk * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsEffectBulk * @section_id: * @include: ags/X/ags_effect_bulk.h * * #AgsEffectBulk is a composite widget to visualize one #AgsChannel. It should be * packed by an #AgsEffectBulk. */ enum{ ADD_EFFECT, REMOVE_EFFECT, RESIZE_AUDIO_CHANNELS, RESIZE_PADS, MAP_RECALL, FIND_PORT, LAST_SIGNAL, }; enum{ PROP_0, PROP_AUDIO, PROP_CHANNEL_TYPE, }; static gpointer ags_effect_bulk_parent_class = NULL; static guint effect_bulk_signals[LAST_SIGNAL]; GHashTable *ags_effect_bulk_indicator_queue_draw = NULL; GType ags_effect_bulk_get_type(void) { static GType ags_type_effect_bulk = 0; if(!ags_type_effect_bulk){ static const GTypeInfo ags_effect_bulk_info = { sizeof(AgsEffectBulkClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_effect_bulk_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsEffectBulk), 0, /* n_preallocs */ (GInstanceInitFunc) ags_effect_bulk_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_effect_bulk_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_effect_bulk_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_effect_bulk = g_type_register_static(GTK_TYPE_VBOX, "AgsEffectBulk", &ags_effect_bulk_info, 0); g_type_add_interface_static(ags_type_effect_bulk, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_effect_bulk, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_effect_bulk); } void ags_effect_bulk_class_init(AgsEffectBulkClass *effect_bulk) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_effect_bulk_parent_class = g_type_class_peek_parent(effect_bulk); /* GObjectClass */ gobject = G_OBJECT_CLASS(effect_bulk); gobject->set_property = ags_effect_bulk_set_property; gobject->get_property = ags_effect_bulk_get_property; gobject->finalize = ags_effect_bulk_finalize; /* properties */ /** * AgsEffectBulk:audio: * * The #AgsAudio to visualize. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("assigned audio"), i18n_pspec("The audio it is assigned with"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsEffectBulk:channel-type: * * The target channel. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("channel-type", i18n_pspec("assigned channel type"), i18n_pspec("The channel type it is assigned with"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL_TYPE, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) effect_bulk; widget->show = ags_effect_bulk_show; /* AgsEffectBulkClass */ effect_bulk->add_effect = ags_effect_bulk_real_add_effect; effect_bulk->remove_effect = ags_effect_bulk_real_remove_effect; effect_bulk->resize_audio_channels = ags_effect_bulk_real_resize_audio_channels; effect_bulk->resize_pads = ags_effect_bulk_real_resize_pads; effect_bulk->map_recall = ags_effect_bulk_real_map_recall; effect_bulk->find_port = ags_effect_bulk_real_find_port; /* signals */ /** * AgsEffectBulk::add-effect: * @effect_bulk: the #AgsEffectBulk to modify * @effect: the effect's name * * The ::add-effect signal notifies about added effect. */ effect_bulk_signals[ADD_EFFECT] = g_signal_new("add-effect", G_TYPE_FROM_CLASS(effect_bulk), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectBulkClass, add_effect), NULL, NULL, g_cclosure_user_marshal_POINTER__POINTER_STRING_STRING, G_TYPE_POINTER, 3, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); /** * AgsEffectBulk::remove-effect: * @effect_bulk: the #AgsEffectBulk to modify * @nth: the nth effect * * The ::remove-effect signal notifies about removed effect. */ effect_bulk_signals[REMOVE_EFFECT] = g_signal_new("remove-effect", G_TYPE_FROM_CLASS(effect_bulk), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectBulkClass, remove_effect), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsEffectBulk::resize-audio-channels: * @effect_bulk: the object to adjust the channels. * @new_size: new audio channel count * @old_size: old audio channel count * * The ::resize-audio-channels signal notifies about changes in channel * alignment. */ effect_bulk_signals[RESIZE_AUDIO_CHANNELS] = g_signal_new("resize-audio-channels", G_TYPE_FROM_CLASS(effect_bulk), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectBulkClass, resize_audio_channels), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); /** * AgsEffectBulk::resize-pads: * @effect_bulk: the object to adjust the channels. * @new_size: new pad count * @old_size: old pad count * * The ::resize-pads signal notifies about changes in channel * alignment. */ effect_bulk_signals[RESIZE_PADS] = g_signal_new("resize_pads", G_TYPE_FROM_CLASS(effect_bulk), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectBulkClass, resize_pads), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); /** * AgsEffectBulk::map-recall: * @effect_bulk: the #AgsEffectBulk * * The ::map-recall should be used to add the effect_bulk's default recall. */ effect_bulk_signals[MAP_RECALL] = g_signal_new("map-recall", G_TYPE_FROM_CLASS (effect_bulk), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsEffectBulkClass, map_recall), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 0); /** * AgsEffectBulk::find-port: * @effect_bulk: the #AgsEffectBulk to resize * Returns: a #GList with associated ports * * The ::find-port as recall should be mapped */ effect_bulk_signals[FIND_PORT] = g_signal_new("find-port", G_TYPE_FROM_CLASS(effect_bulk), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectBulkClass, find_port), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); } void ags_effect_bulk_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_effect_bulk_connect; connectable->disconnect = ags_effect_bulk_disconnect; } void ags_effect_bulk_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_effect_bulk_get_version; plugin->set_version = ags_effect_bulk_set_version; plugin->get_build_id = ags_effect_bulk_get_build_id; plugin->set_build_id = ags_effect_bulk_set_build_id; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_effect_bulk_init(AgsEffectBulk *effect_bulk) { GtkAlignment *alignment; GtkHBox *hbox; if(ags_effect_bulk_indicator_queue_draw == NULL){ ags_effect_bulk_indicator_queue_draw = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } effect_bulk->flags = 0; effect_bulk->name = NULL; effect_bulk->version = AGS_EFFECT_BULK_DEFAULT_VERSION; effect_bulk->build_id = AGS_EFFECT_BULK_DEFAULT_BUILD_ID; effect_bulk->channel_type = G_TYPE_NONE; effect_bulk->audio = NULL; effect_bulk->plugin = NULL; alignment = (GtkAlignment *) g_object_new(GTK_TYPE_ALIGNMENT, "xalign", 1.0, NULL); gtk_box_pack_start((GtkBox *) effect_bulk, (GtkWidget *) alignment, FALSE, FALSE, 0); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_widget_set_no_show_all((GtkWidget *) hbox, TRUE); gtk_container_add((GtkContainer *) alignment, (GtkWidget *) hbox); effect_bulk->add = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) effect_bulk->add, FALSE, FALSE, 0); gtk_widget_show((GtkWidget *) effect_bulk->add); effect_bulk->remove = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_REMOVE); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) effect_bulk->remove, FALSE, FALSE, 0); gtk_widget_show((GtkWidget *) effect_bulk->remove); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) effect_bulk, (GtkWidget *) hbox, FALSE, FALSE, 0); effect_bulk->bulk_member = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_widget_set_no_show_all((GtkWidget *) effect_bulk->bulk_member, TRUE); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) effect_bulk->bulk_member, FALSE, FALSE, 0); effect_bulk->table = (GtkTable *) gtk_table_new(1, AGS_EFFECT_BULK_COLUMNS_COUNT, FALSE); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) effect_bulk->table, FALSE, FALSE, 0); effect_bulk->plugin_browser = (GtkDialog *) ags_plugin_browser_new((GtkWidget *) effect_bulk); effect_bulk->queued_drawing = NULL; } void ags_effect_bulk_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsEffectBulk *effect_bulk; effect_bulk = AGS_EFFECT_BULK(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(effect_bulk->audio == audio){ return; } if(effect_bulk->audio != NULL){ if((AGS_EFFECT_BULK_CONNECTED & (effect_bulk->flags)) != 0){ //TODO:JK: implement me } if(effect_bulk->channel_type == AGS_TYPE_OUTPUT){ ags_effect_bulk_resize_pads(effect_bulk, 0, effect_bulk->audio->output_pads); }else{ ags_effect_bulk_resize_pads(effect_bulk, 0, effect_bulk->audio->input_pads); } g_object_unref(effect_bulk->audio); } if(audio != NULL){ g_object_ref(audio); } effect_bulk->audio = audio; if((AGS_EFFECT_BULK_CONNECTED & (effect_bulk->flags)) != 0){ if(audio != NULL){ if(effect_bulk->channel_type == AGS_TYPE_OUTPUT){ ags_effect_bulk_resize_pads(effect_bulk, audio->output_pads, 0); }else{ ags_effect_bulk_resize_pads(effect_bulk, audio->input_pads, 0); } } } } break; case PROP_CHANNEL_TYPE: { GType channel_type; channel_type = (GType) g_value_get_gtype(value); effect_bulk->channel_type = channel_type; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_effect_bulk_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsEffectBulk *effect_bulk; effect_bulk = AGS_EFFECT_BULK(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, effect_bulk->audio); } break; case PROP_CHANNEL_TYPE: { g_value_set_gtype(value, effect_bulk->channel_type); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_effect_bulk_connect(AgsConnectable *connectable) { AgsMachine *machine; AgsEffectBulk *effect_bulk; GList *list, *list_start; effect_bulk = AGS_EFFECT_BULK(connectable); if((AGS_EFFECT_BULK_CONNECTED & (effect_bulk->flags)) != 0){ return; } effect_bulk->flags |= AGS_EFFECT_BULK_CONNECTED; machine = gtk_widget_get_ancestor(effect_bulk, AGS_TYPE_MACHINE); g_signal_connect_after(machine, "resize-audio-channels", G_CALLBACK(ags_effect_bulk_resize_audio_channels_callback), effect_bulk); g_signal_connect_after(machine, "resize-pads", G_CALLBACK(ags_effect_bulk_resize_pads_callback), effect_bulk); /* */ g_signal_connect(G_OBJECT(effect_bulk->add), "clicked", G_CALLBACK(ags_effect_bulk_add_callback), effect_bulk); g_signal_connect(G_OBJECT(effect_bulk->remove), "clicked", G_CALLBACK(ags_effect_bulk_remove_callback), effect_bulk); ags_connectable_connect(AGS_CONNECTABLE(effect_bulk->plugin_browser)); g_signal_connect(G_OBJECT(effect_bulk->plugin_browser), "response", G_CALLBACK(ags_effect_bulk_plugin_browser_response_callback), effect_bulk); list = list_start = gtk_container_get_children((GtkContainer *) effect_bulk->table); while(list != NULL){ if(AGS_IS_CONNECTABLE(list->data)){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); } list = list->next; } g_list_free(list_start); } void ags_effect_bulk_disconnect(AgsConnectable *connectable) { AgsMachine *machine; AgsEffectBulk *effect_bulk; GList *list, *list_start; effect_bulk = AGS_EFFECT_BULK(connectable); if((AGS_EFFECT_BULK_CONNECTED & (effect_bulk->flags)) == 0){ return; } effect_bulk->flags &= (~AGS_EFFECT_BULK_CONNECTED); machine = gtk_widget_get_ancestor(effect_bulk, AGS_TYPE_MACHINE); g_object_disconnect(G_OBJECT(machine), "any_signal::resize-audio-channels", G_CALLBACK(ags_effect_bulk_resize_audio_channels_callback), effect_bulk, "any_signal::resize-pads", G_CALLBACK(ags_effect_bulk_resize_pads_callback), effect_bulk, NULL); g_object_disconnect(G_OBJECT(effect_bulk->add), "any_signal::clicked", G_CALLBACK(ags_effect_bulk_add_callback), effect_bulk, NULL); g_object_disconnect(G_OBJECT(effect_bulk->remove), "any_signal::clicked", G_CALLBACK(ags_effect_bulk_remove_callback), effect_bulk, NULL); ags_connectable_disconnect(AGS_CONNECTABLE(effect_bulk->plugin_browser)); g_object_disconnect(G_OBJECT(effect_bulk->plugin_browser), "any_signal::response", G_CALLBACK(ags_effect_bulk_plugin_browser_response_callback), effect_bulk, NULL); list = list_start = gtk_container_get_children((GtkContainer *) effect_bulk->table); while(list != NULL){ if(AGS_IS_CONNECTABLE(list->data)){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); } list = list->next; } g_list_free(list_start); } gchar* ags_effect_bulk_get_name(AgsPlugin *plugin) { return(AGS_EFFECT_BULK(plugin)->name); } void ags_effect_bulk_set_name(AgsPlugin *plugin, gchar *name) { AgsEffectBulk *effect_bulk; effect_bulk = AGS_EFFECT_BULK(plugin); effect_bulk->name = name; } gchar* ags_effect_bulk_get_version(AgsPlugin *plugin) { return(AGS_EFFECT_BULK(plugin)->version); } void ags_effect_bulk_set_version(AgsPlugin *plugin, gchar *version) { AgsEffectBulk *effect_bulk; effect_bulk = AGS_EFFECT_BULK(plugin); effect_bulk->version = version; } gchar* ags_effect_bulk_get_build_id(AgsPlugin *plugin) { return(AGS_EFFECT_BULK(plugin)->build_id); } void ags_effect_bulk_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsEffectBulk *effect_bulk; effect_bulk = AGS_EFFECT_BULK(plugin); effect_bulk->build_id = build_id; } void ags_effect_bulk_finalize(GObject *gobject) { AgsEffectBulk *effect_bulk; GList *list; effect_bulk = (AgsEffectBulk *) gobject; /* unref audio */ if(effect_bulk->audio != NULL){ g_object_unref(effect_bulk->audio); } /* free plugin list */ g_list_free_full(effect_bulk->plugin, ags_effect_bulk_plugin_free); /* destroy plugin browser */ gtk_widget_destroy(effect_bulk->plugin_browser); /* remove of the queued drawing hash */ list = effect_bulk->queued_drawing; while(list != NULL){ g_hash_table_remove(ags_effect_bulk_indicator_queue_draw, list->data); list = list->next; } /* call parent */ G_OBJECT_CLASS(ags_effect_bulk_parent_class)->finalize(gobject); } void ags_effect_bulk_show(GtkWidget *widget) { AgsEffectBulk *effect_bulk; effect_bulk = AGS_EFFECT_BULK(widget); GTK_WIDGET_CLASS(ags_effect_bulk_parent_class)->show(widget); if((AGS_EFFECT_BULK_HIDE_BUTTONS & (effect_bulk->flags)) == 0){ gtk_widget_show(GTK_WIDGET(effect_bulk->add)->parent); } if((AGS_EFFECT_BULK_HIDE_ENTRIES & (effect_bulk->flags)) == 0){ gtk_widget_show((GtkWidget *) effect_bulk->bulk_member); } } /** * ags_effect_bulk_plugin_alloc: * @filename: the filename as string * @effect: the effect as string * * Allocate #AgsEffectBulkPlugin-struct. * * Returns: the newly allocated #AgsEffectBulkPlugin-struct * * Since: 1.0.0 */ AgsEffectBulkPlugin* ags_effect_bulk_plugin_alloc(gchar *filename, gchar *effect) { AgsEffectBulkPlugin *effect_plugin; effect_plugin = (AgsEffectBulkPlugin *) malloc(sizeof(AgsEffectBulkPlugin)); effect_plugin->filename = g_strdup(filename); effect_plugin->effect = g_strdup(effect); effect_plugin->control_type_name = NULL; return(effect_plugin); } /** * ags_effect_bulk_plugin_free: * @effect_bulk_plugin: the #AgsEffectBulkPlugin-struct * * Free @effect_bulk_plugin. * * Since: 1.0.0 */ void ags_effect_bulk_plugin_free(AgsEffectBulkPlugin *effect_bulk_plugin) { if(effect_bulk_plugin == NULL){ return; } if(effect_bulk_plugin->filename != NULL){ free(effect_bulk_plugin->filename); } if(effect_bulk_plugin->effect != NULL){ free(effect_bulk_plugin->effect); } if(effect_bulk_plugin->control_type_name != NULL){ g_list_free(effect_bulk_plugin->control_type_name); } free(effect_bulk_plugin); } GList* ags_effect_bulk_add_ladspa_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect) { AgsWindow *window; AgsBulkMember *bulk_member; GtkAdjustment *adjustment; AgsEffectBulkPlugin *effect_bulk_plugin; GObject *soundcard; AgsChannel *current; AgsRecallContainer *recall_container; AgsRecallChannelRunDummy *recall_channel_run_dummy; AgsRecallLadspa *recall_ladspa; AgsRecallHandler *recall_handler; AgsAddRecallContainer *add_recall_container; AgsAddRecall *add_recall; AgsLadspaPlugin *ladspa_plugin; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *retport; GList *port, *recall_port; GList *list; GList *task; GList *port_descriptor; guint pads, audio_channels; gdouble step; guint port_count; gboolean has_output_port; guint x, y; guint i, j; guint k; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get window and application context */ window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget * )effect_bulk, AGS_TYPE_WINDOW); application_context = (AgsApplicationContext *) window->application_context; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* alloc effect bulk plugin */ effect_bulk_plugin = ags_effect_bulk_plugin_alloc(filename, effect); effect_bulk_plugin->control_type_name = control_type_name; effect_bulk->plugin = g_list_append(effect_bulk->plugin, effect_bulk_plugin); /* get main loop and task thread */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) effect_bulk->audio); pthread_mutex_unlock(application_mutex); /* get audio properties */ pthread_mutex_lock(audio_mutex); soundcard = effect_bulk->audio->soundcard; audio_channels = effect_bulk->audio->audio_channels; if(effect_bulk->channel_type == AGS_TYPE_OUTPUT){ current = effect_bulk->audio->output; pads = effect_bulk->audio->output_pads; }else{ current = effect_bulk->audio->input; pads = effect_bulk->audio->input_pads; } pthread_mutex_unlock(audio_mutex); /* load plugin */ ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), filename, effect); task = NULL; retport = NULL; has_output_port = FALSE; for(i = 0; i < pads; i++){ for(j = 0; j < audio_channels; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* ladspa play */ recall_container = ags_recall_container_new(); ags_audio_add_recall_container(effect_bulk->audio, (GObject *) recall_container); recall_ladspa = ags_recall_ladspa_new(current, filename, effect, AGS_BASE_PLUGIN(ladspa_plugin)->effect_index); g_object_set(G_OBJECT(recall_ladspa), "soundcard", soundcard, "recall-container", recall_container, NULL); AGS_RECALL(recall_ladspa)->flags |= (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE); ags_recall_ladspa_load(recall_ladspa); port = ags_recall_ladspa_load_ports(recall_ladspa); if((AGS_RECALL_HAS_OUTPUT_PORT & (AGS_RECALL(recall_ladspa)->flags)) != 0){ has_output_port = TRUE; } if(retport == NULL){ retport = port; }else{ retport = g_list_concat(retport, port); } ags_channel_add_recall(current, (GObject *) recall_ladspa, TRUE); ags_connectable_connect(AGS_CONNECTABLE(recall_ladspa)); /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(current, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LADSPA_RUN); AGS_RECALL(recall_channel_run_dummy)->flags |= AGS_RECALL_TEMPLATE; g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "recall-container", recall_container, "recall-channel", recall_ladspa, NULL); AGS_RECALL(recall_channel_run_dummy)->flags |= (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE); ags_channel_add_recall(current, (GObject *) recall_channel_run_dummy, FALSE); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* ladspa recall */ recall_container = ags_recall_container_new(); ags_audio_add_recall_container(effect_bulk->audio, (GObject *) recall_container); recall_ladspa = ags_recall_ladspa_new(current, filename, effect, AGS_BASE_PLUGIN(ladspa_plugin)->effect_index); g_object_set(G_OBJECT(recall_ladspa), "soundcard", soundcard, "recall-container", recall_container, NULL); AGS_RECALL(recall_ladspa)->flags |= (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE); ags_recall_ladspa_load(recall_ladspa); recall_port = ags_recall_ladspa_load_ports(recall_ladspa); if(retport == NULL){ retport = recall_port; }else{ retport = g_list_concat(retport, recall_port); } ags_channel_add_recall(current, (GObject *) recall_ladspa, FALSE); ags_connectable_connect(AGS_CONNECTABLE(recall_ladspa)); /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(current, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LADSPA_RUN); AGS_RECALL(recall_channel_run_dummy)->flags |= AGS_RECALL_TEMPLATE; g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "recall-container", recall_container, "recall-channel", recall_ladspa, NULL); AGS_RECALL(recall_channel_run_dummy)->flags |= (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE); ags_channel_add_recall(current, (GObject *) recall_channel_run_dummy, FALSE); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* iterate */ pthread_mutex_lock(channel_mutex); current = current->next; pthread_mutex_unlock(channel_mutex); } } /* retrieve position within table */ x = 0; y = 0; list = effect_bulk->table->children; while(list != NULL){ if(y <= ((GtkTableChild *) list->data)->top_attach){ y = ((GtkTableChild *) list->data)->top_attach + 1; } list = list->next; } /* load ports */ port_descriptor = AGS_BASE_PLUGIN(ladspa_plugin)->port; port_count = g_list_length(port_descriptor); k = 0; while(port_descriptor != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ GtkWidget *child_widget; AgsLadspaConversion *ladspa_conversion; LADSPA_Data default_value; GType widget_type; gchar *plugin_name; gchar *control_port; guint step_count; gboolean disable_seemless; disable_seemless = FALSE; if(x == AGS_EFFECT_BULK_COLUMNS_COUNT){ x = 0; y++; gtk_table_resize(effect_bulk->table, y + 1, AGS_EFFECT_BULK_COLUMNS_COUNT); } if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ disable_seemless = TRUE; if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_LED; }else{ widget_type = GTK_TYPE_TOGGLE_BUTTON; } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_HINDICATOR; }else{ widget_type = AGS_TYPE_DIAL; } } step_count = AGS_DIAL_DEFAULT_PRECISION; if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ step_count = AGS_PORT_DESCRIPTOR(port_descriptor->data)->scale_steps; disable_seemless = TRUE; } /* add bulk member */ plugin_name = g_strdup_printf("ladspa-%u", ladspa_plugin->unique_id); control_port = g_strdup_printf("%u/%u", k, port_count); bulk_member = (AgsBulkMember *) g_object_new(AGS_TYPE_BULK_MEMBER, "widget-type", widget_type, "widget-label", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "plugin-name", plugin_name, "filename", filename, "effect", effect, "specifier", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "control-port", control_port, "steps", step_count, NULL); child_widget = ags_bulk_member_get_widget(bulk_member); g_free(plugin_name); g_free(control_port); /* ladspa conversion */ ladspa_conversion = NULL; if((AGS_PORT_DESCRIPTOR_BOUNDED_BELOW & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_BELOW; } if((AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_ABOVE; } if((AGS_PORT_DESCRIPTOR_SAMPLERATE & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_SAMPLERATE; } if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_LOGARITHMIC; } bulk_member->conversion = (AgsConversion *) ladspa_conversion; /* child widget */ if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_BOOLEAN; } if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_INTEGER; } if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; GtkAdjustment *adjustment; LADSPA_Data lower_bound, upper_bound; dial = (AgsDial *) child_widget; if(disable_seemless){ dial->flags &= (~AGS_DIAL_SEEMLESS_MODE); } /* add controls of ports and apply range */ lower_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->lower_value); upper_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->upper_value); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(dial, "adjustment", adjustment, NULL); if(upper_bound >= 0.0 && lower_bound >= 0.0){ step = (upper_bound - lower_bound) / step_count; }else if(upper_bound < 0.0 && lower_bound < 0.0){ step = -1.0 * (lower_bound - upper_bound) / step_count; }else{ step = (upper_bound - lower_bound) / step_count; } gtk_adjustment_set_step_increment(adjustment, step); gtk_adjustment_set_lower(adjustment, lower_bound); gtk_adjustment_set_upper(adjustment, upper_bound); default_value = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value); if(ladspa_conversion != NULL){ // default_value = ags_ladspa_conversion_convert(ladspa_conversion, // default_value, // TRUE); } gtk_adjustment_set_value(adjustment, default_value); }else if(AGS_IS_INDICATOR(child_widget) || AGS_IS_LED(child_widget)){ g_hash_table_insert(ags_effect_bulk_indicator_queue_draw, child_widget, ags_effect_bulk_indicator_queue_draw_timeout); effect_bulk->queued_drawing = g_list_prepend(effect_bulk->queued_drawing, child_widget); g_timeout_add(1000 / 30, (GSourceFunc) ags_effect_bulk_indicator_queue_draw_timeout, (gpointer) child_widget); } #ifdef AGS_DEBUG g_message("ladspa bounds: %f %f", lower_bound, upper_bound); #endif gtk_table_attach(effect_bulk->table, (GtkWidget *) bulk_member, x, x + 1, y, y + 1, GTK_FILL, GTK_FILL, 0, 0); ags_connectable_connect(AGS_CONNECTABLE(bulk_member)); gtk_widget_show_all((GtkWidget *) effect_bulk->table); x++; } port_descriptor = port_descriptor->next; k++; } /* launch tasks */ task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); return(retport); } GList* ags_effect_bulk_add_dssi_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect) { AgsWindow *window; AgsBulkMember *bulk_member; GtkAdjustment *adjustment; AgsEffectBulkPlugin *effect_bulk_plugin; GObject *soundcard; AgsChannel *current; AgsRecallContainer *recall_container; AgsRecallChannelRunDummy *recall_channel_run_dummy; AgsRecallDssi *recall_dssi; AgsRecallHandler *recall_handler; AgsAddRecallContainer *add_recall_container; AgsAddRecall *add_recall; AgsDssiPlugin *dssi_plugin; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *retport; GList *port, *recall_port; GList *list; GList *task; GList *port_descriptor; guint pads, audio_channels; gdouble step; guint port_count; gboolean has_output_port; guint x, y; guint i, j; guint k; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get window and application context */ window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) effect_bulk, AGS_TYPE_WINDOW); application_context = (AgsApplicationContext *) window->application_context; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* alloc effect bulk plugin */ effect_bulk_plugin = ags_effect_bulk_plugin_alloc(filename, effect); effect_bulk_plugin->control_type_name = control_type_name; effect_bulk->plugin = g_list_append(effect_bulk->plugin, effect_bulk_plugin); /* get main loop and task thread */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) effect_bulk->audio); pthread_mutex_unlock(application_mutex); /* get audio properties */ pthread_mutex_lock(audio_mutex); soundcard = effect_bulk->audio->soundcard; audio_channels = effect_bulk->audio->audio_channels; if(effect_bulk->channel_type == AGS_TYPE_OUTPUT){ current = effect_bulk->audio->output; pads = effect_bulk->audio->output_pads; }else{ current = effect_bulk->audio->input; pads = effect_bulk->audio->input_pads; } pthread_mutex_unlock(audio_mutex); /* load plugin */ dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), filename, effect); task = NULL; retport = NULL; has_output_port = FALSE; for(i = 0; i < pads; i++){ for(j = 0; j < audio_channels; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* dssi play */ recall_container = ags_recall_container_new(); ags_audio_add_recall_container(effect_bulk->audio, (GObject *) recall_container); // add_recall_container = ags_add_recall_container_new(current->audio, // recall_container); // task = g_list_prepend(task, // add_recall_container); recall_dssi = ags_recall_dssi_new(current, filename, effect, AGS_BASE_PLUGIN(dssi_plugin)->effect_index); g_object_set(G_OBJECT(recall_dssi), "soundcard", soundcard, "source", current, "recall-container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_dssi), (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE)); ags_recall_dssi_load(recall_dssi); port = ags_recall_dssi_load_ports(recall_dssi); if(retport == NULL){ retport = port; }else{ retport = g_list_concat(retport, port); } if((AGS_RECALL_HAS_OUTPUT_PORT & (AGS_RECALL(recall_dssi)->flags)) != 0){ has_output_port = TRUE; } ags_channel_add_recall(current, (GObject *) recall_dssi, TRUE); ags_connectable_connect(AGS_CONNECTABLE(recall_dssi)); /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(current, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_DSSI_RUN); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE)); g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "source", current, "recall-channel", recall_dssi, "recall-container", recall_container, NULL); ags_channel_add_recall(current, (GObject *) recall_channel_run_dummy, TRUE); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* dssi recall */ recall_container = ags_recall_container_new(); ags_audio_add_recall_container(effect_bulk->audio, (GObject *) recall_container); // add_recall_container = ags_add_recall_container_new(current->audio, // recall_container); // task = g_list_prepend(task, // add_recall_container); recall_dssi = ags_recall_dssi_new(current, filename, effect, AGS_BASE_PLUGIN(dssi_plugin)->effect_index); g_object_set(G_OBJECT(recall_dssi), "soundcard", soundcard, "source", current, "recall-container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_dssi), (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE)); ags_recall_dssi_load(recall_dssi); recall_port = ags_recall_dssi_load_ports(recall_dssi); if(retport == NULL){ retport = port; }else{ retport = g_list_concat(retport, recall_port); } ags_channel_add_recall(current, (GObject *) recall_dssi, FALSE); ags_connectable_connect(AGS_CONNECTABLE(recall_dssi)); /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(current, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_DSSI_RUN); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE)); g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "source", current, "recall-channel", recall_dssi, "recall-container", recall_container, NULL); ags_channel_add_recall(current, (GObject *) recall_channel_run_dummy, FALSE); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* iterate */ pthread_mutex_lock(channel_mutex); current = current->next; pthread_mutex_unlock(channel_mutex); } } /* retrieve position within table */ x = 0; y = 0; list = effect_bulk->table->children; while(list != NULL){ if(y <= ((GtkTableChild *) list->data)->top_attach){ y = ((GtkTableChild *) list->data)->top_attach + 1; } list = list->next; } /* load ports */ port_descriptor = AGS_BASE_PLUGIN(dssi_plugin)->port; port_count = g_list_length(port_descriptor); k = 0; while(port_descriptor != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ GtkWidget *child_widget; AgsLadspaConversion *ladspa_conversion; GType widget_type; gchar *plugin_name; gchar *control_port; guint step_count; gboolean disable_seemless; disable_seemless = FALSE; if(x == AGS_EFFECT_BULK_COLUMNS_COUNT){ x = 0; y++; gtk_table_resize(effect_bulk->table, y + 1, AGS_EFFECT_BULK_COLUMNS_COUNT); } if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_LED; }else{ widget_type = GTK_TYPE_TOGGLE_BUTTON; } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_HINDICATOR; }else{ widget_type = AGS_TYPE_DIAL; } } step_count = AGS_DIAL_DEFAULT_PRECISION; if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ step_count = AGS_PORT_DESCRIPTOR(port_descriptor->data)->scale_steps; disable_seemless = TRUE; } /* add bulk member */ plugin_name = g_strdup_printf("dssi-%u", dssi_plugin->unique_id); control_port = g_strdup_printf("%u/%u", k, port_count); bulk_member = (AgsBulkMember *) g_object_new(AGS_TYPE_BULK_MEMBER, "widget-type", widget_type, "widget-label", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "plugin-name", plugin_name, "filename", filename, "effect", effect, "specifier", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "control-port", control_port, "steps", step_count, NULL); child_widget = ags_bulk_member_get_widget(bulk_member); g_free(plugin_name); g_free(control_port); /* ladspa conversion */ ladspa_conversion = NULL; if((AGS_PORT_DESCRIPTOR_BOUNDED_BELOW & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_BELOW; } if((AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_ABOVE; } if((AGS_PORT_DESCRIPTOR_SAMPLERATE & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_SAMPLERATE; } if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_LOGARITHMIC; } bulk_member->conversion = (AgsConversion *) ladspa_conversion; /* child widget */ if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_BOOLEAN; } if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_INTEGER; } if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; GtkAdjustment *adjustment; LADSPA_Data lower_bound, upper_bound; LADSPA_Data default_value; dial = (AgsDial *) child_widget; if(disable_seemless){ dial->flags &= (~AGS_DIAL_SEEMLESS_MODE); } /* add controls of ports and apply range */ lower_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->lower_value); upper_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->upper_value); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(dial, "adjustment", adjustment, NULL); if(upper_bound >= 0.0 && lower_bound >= 0.0){ step = (upper_bound - lower_bound) / step_count; }else if(upper_bound < 0.0 && lower_bound < 0.0){ step = -1.0 * (lower_bound - upper_bound) / step_count; }else{ step = (upper_bound - lower_bound) / step_count; } gtk_adjustment_set_step_increment(adjustment, step); gtk_adjustment_set_lower(adjustment, lower_bound); gtk_adjustment_set_upper(adjustment, upper_bound); default_value = (LADSPA_Data) g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value); if(ladspa_conversion != NULL){ // default_value = ags_ladspa_conversion_convert(ladspa_conversion, // default_value, // TRUE); } gtk_adjustment_set_value(adjustment, default_value); #ifdef AGS_DEBUG g_message("dssi bounds: %f %f", lower_bound, upper_bound); #endif }else if(AGS_IS_INDICATOR(child_widget) || AGS_IS_LED(child_widget)){ g_hash_table_insert(ags_effect_bulk_indicator_queue_draw, child_widget, ags_effect_bulk_indicator_queue_draw_timeout); effect_bulk->queued_drawing = g_list_prepend(effect_bulk->queued_drawing, child_widget); g_timeout_add(1000 / 30, (GSourceFunc) ags_effect_bulk_indicator_queue_draw_timeout, (gpointer) child_widget); } gtk_table_attach(effect_bulk->table, (GtkWidget *) bulk_member, x, x + 1, y, y + 1, GTK_FILL, GTK_FILL, 0, 0); ags_connectable_connect(AGS_CONNECTABLE(bulk_member)); gtk_widget_show_all((GtkWidget *) effect_bulk->table); x++; } port_descriptor = port_descriptor->next; k++; } /* launch tasks */ task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); return(retport); } GList* ags_effect_bulk_add_lv2_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect) { AgsWindow *window; AgsBulkMember *bulk_member; GtkAdjustment *adjustment; AgsEffectBulkPlugin *effect_bulk_plugin; GObject *soundcard; AgsChannel *current; AgsRecallContainer *recall_container; AgsRecallChannelRunDummy *recall_channel_run_dummy; AgsRecallLv2 *recall_lv2; AgsRecallHandler *recall_handler; AgsAddRecallContainer *add_recall_container; AgsAddRecall *add_recall; AgsLv2Plugin *lv2_plugin; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; xmlNode *parent; GList *retport; GList *port, *recall_port; GList *list; GList *task; GList *port_descriptor; gchar *uri; gchar *port_name; gchar *str; gdouble step; guint pads, audio_channels; guint port_count; gboolean has_output_port; guint x, y; guint i, j; guint k; float lower_bound, upper_bound, default_bound; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get window and application context */ window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) effect_bulk, AGS_TYPE_WINDOW); application_context = (AgsApplicationContext *) window->application_context; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* alloc effect bulk plugin */ effect_bulk_plugin = ags_effect_bulk_plugin_alloc(filename, effect); effect_bulk_plugin->control_type_name = control_type_name; effect_bulk->plugin = g_list_append(effect_bulk->plugin, effect_bulk_plugin); /* get main loop and task thread */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) effect_bulk->audio); pthread_mutex_unlock(application_mutex); /* get audio properties */ pthread_mutex_lock(audio_mutex); soundcard = effect_bulk->audio->soundcard; audio_channels = effect_bulk->audio->audio_channels; if(effect_bulk->channel_type == AGS_TYPE_OUTPUT){ current = effect_bulk->audio->output; pads = effect_bulk->audio->output_pads; }else{ current = effect_bulk->audio->input; pads = effect_bulk->audio->input_pads; } pthread_mutex_unlock(audio_mutex); /* load plugin */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); task = NULL; retport = NULL; has_output_port = FALSE; for(i = 0; i < pads; i++){ for(j = 0; j < audio_channels; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* lv2 play */ recall_container = ags_recall_container_new(); ags_audio_add_recall_container(effect_bulk->audio, (GObject *) recall_container); // add_recall_container = ags_add_recall_container_new(current->audio, // recall_container); // task = g_list_prepend(task, // add_recall_container); recall_lv2 = ags_recall_lv2_new(current, lv2_plugin->turtle, filename, effect, lv2_plugin->uri, AGS_BASE_PLUGIN(lv2_plugin)->effect_index); g_object_set(G_OBJECT(recall_lv2), "soundcard", soundcard, "source", current, "recall-container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_lv2), (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE)); ags_recall_lv2_load(recall_lv2); port = ags_recall_lv2_load_ports(recall_lv2); if(retport == NULL){ retport = port; }else{ retport = g_list_concat(retport, port); } if((AGS_RECALL_HAS_OUTPUT_PORT & (AGS_RECALL(recall_lv2)->flags)) != 0){ has_output_port = TRUE; } ags_channel_add_recall(current, (GObject *) recall_lv2, TRUE); ags_connectable_connect(AGS_CONNECTABLE(recall_lv2)); /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(current, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LV2_RUN); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE)); g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "source", current, "recall-channel", recall_lv2, "recall-container", recall_container, NULL); ags_channel_add_recall(current, (GObject *) recall_channel_run_dummy, TRUE); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* lv2 recall */ recall_container = ags_recall_container_new(); ags_audio_add_recall_container(effect_bulk->audio, (GObject *) recall_container); // add_recall_container = ags_add_recall_container_new(current->audio, // recall_container); // task = g_list_prepend(task, // add_recall_container); recall_lv2 = ags_recall_lv2_new(current, lv2_plugin->turtle, filename, effect, lv2_plugin->uri, AGS_BASE_PLUGIN(lv2_plugin)->effect_index); g_object_set(G_OBJECT(recall_lv2), "soundcard", soundcard, "source", current, "recall-container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_lv2), (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE)); ags_recall_lv2_load(recall_lv2); recall_port = ags_recall_lv2_load_ports(recall_lv2); if(retport == NULL){ retport = port; }else{ retport = g_list_concat(retport, recall_port); } ags_channel_add_recall(current, (GObject *) recall_lv2, FALSE); ags_connectable_connect(AGS_CONNECTABLE(recall_lv2)); /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(current, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LV2_RUN); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_BULK_MODE)); g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "source", current, "recall-channel", recall_lv2, "recall-container", recall_container, NULL); ags_channel_add_recall(current, (GObject *) recall_channel_run_dummy, FALSE); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* iterate */ pthread_mutex_lock(channel_mutex); current = current->next; pthread_mutex_unlock(channel_mutex); } } /* retrieve position within table */ x = 0; y = 0; list = effect_bulk->table->children; while(list != NULL){ if(y <= ((GtkTableChild *) list->data)->top_attach){ y = ((GtkTableChild *) list->data)->top_attach + 1; } list = list->next; } /* load ports */ port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; port_count = g_list_length(port_descriptor); k = 0; while(port_descriptor != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ GtkWidget *child_widget; AgsLv2Conversion *lv2_conversion; GType widget_type; gchar *plugin_name; gchar *control_port; guint step_count; gboolean disable_seemless; disable_seemless = FALSE; if(x == AGS_EFFECT_BULK_COLUMNS_COUNT){ x = 0; y++; gtk_table_resize(effect_bulk->table, y + 1, AGS_EFFECT_BULK_COLUMNS_COUNT); } if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ disable_seemless = TRUE; if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_LED; }else{ widget_type = GTK_TYPE_TOGGLE_BUTTON; } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_HINDICATOR; }else{ widget_type = AGS_TYPE_DIAL; } } step_count = AGS_DIAL_DEFAULT_PRECISION; if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ step_count = AGS_PORT_DESCRIPTOR(port_descriptor->data)->scale_steps; disable_seemless = TRUE; } /* add bulk member */ plugin_name = g_strdup_printf("lv2-<%s>", lv2_plugin->uri); control_port = g_strdup_printf("%u/%u", k, port_count); bulk_member = (AgsBulkMember *) g_object_new(AGS_TYPE_BULK_MEMBER, "widget-type", widget_type, "widget-label", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "plugin-name", plugin_name, "filename", filename, "effect", effect, "specifier", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "control-port", control_port, "steps", step_count, NULL); child_widget = ags_bulk_member_get_widget(bulk_member); g_free(plugin_name); g_free(control_port); /* lv2 conversion */ lv2_conversion = NULL; if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(lv2_conversion == NULL || !AGS_IS_LV2_CONVERSION(lv2_conversion)){ lv2_conversion = ags_lv2_conversion_new(); } lv2_conversion->flags |= AGS_LV2_CONVERSION_LOGARITHMIC; } bulk_member->conversion = (AgsConversion *) lv2_conversion; /* child widget */ if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_BOOLEAN; } if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ bulk_member->port_flags = AGS_BULK_MEMBER_PORT_INTEGER; } if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; GtkAdjustment *adjustment; float lower_bound, upper_bound; dial = (AgsDial *) child_widget; if(disable_seemless){ dial->flags &= (~AGS_DIAL_SEEMLESS_MODE); } /* add controls of ports and apply range */ lower_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->lower_value); upper_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->upper_value); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(dial, "adjustment", adjustment, NULL); if(upper_bound >= 0.0 && lower_bound >= 0.0){ step = (upper_bound - lower_bound) / step_count; }else if(upper_bound < 0.0 && lower_bound < 0.0){ step = -1.0 * (lower_bound - upper_bound) / step_count; }else{ step = (upper_bound - lower_bound) / step_count; } gtk_adjustment_set_step_increment(adjustment, step); gtk_adjustment_set_lower(adjustment, lower_bound); gtk_adjustment_set_upper(adjustment, upper_bound); gtk_adjustment_set_value(adjustment, g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value)); }else if(AGS_IS_INDICATOR(child_widget) || AGS_IS_LED(child_widget)){ g_hash_table_insert(ags_effect_bulk_indicator_queue_draw, child_widget, ags_effect_bulk_indicator_queue_draw_timeout); effect_bulk->queued_drawing = g_list_prepend(effect_bulk->queued_drawing, child_widget); g_timeout_add(1000 / 30, (GSourceFunc) ags_effect_bulk_indicator_queue_draw_timeout, (gpointer) child_widget); } #ifdef AGS_DEBUG g_message("lv2 bounds: %f %f", lower_bound, upper_bound); #endif gtk_table_attach(effect_bulk->table, (GtkWidget *) bulk_member, x, x + 1, y, y + 1, GTK_FILL, GTK_FILL, 0, 0); ags_connectable_connect(AGS_CONNECTABLE(bulk_member)); gtk_widget_show_all((GtkWidget *) effect_bulk->table); x++; } port_descriptor = port_descriptor->next; k++; } /* launch tasks */ task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); return(retport); } GList* ags_effect_bulk_real_add_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect) { AgsLadspaPlugin *ladspa_plugin; AgsDssiPlugin *dssi_plugin; AgsLv2Plugin *lv2_plugin; GList *port; /* load plugin */ ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), filename, effect); port = NULL; if(ladspa_plugin != NULL){ port = ags_effect_bulk_add_ladspa_effect(effect_bulk, control_type_name, filename, effect); } if(ladspa_plugin == NULL){ dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), filename, effect); if(dssi_plugin != NULL){ port = ags_effect_bulk_add_dssi_effect(effect_bulk, control_type_name, filename, effect); } } if(ladspa_plugin == NULL && dssi_plugin == NULL){ GList *ui_node; gchar *str; lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); if(lv2_plugin != NULL){ port = ags_effect_bulk_add_lv2_effect(effect_bulk, control_type_name, filename, effect); } } return(port); } GList* ags_effect_bulk_add_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect) { GList *list; g_return_val_if_fail(AGS_IS_EFFECT_BULK(effect_bulk), NULL); g_object_ref((GObject *) effect_bulk); g_signal_emit(G_OBJECT(effect_bulk), effect_bulk_signals[ADD_EFFECT], 0, control_type_name, filename, effect, &list); g_object_unref((GObject *) effect_bulk); return(list); } void ags_effect_bulk_real_remove_effect(AgsEffectBulk *effect_bulk, guint nth) { AgsAddBulkMember *add_bulk_member; GtkAdjustment *adjustment; AgsChannel *current; AgsEffectBulkPlugin *effect_bulk_plugin; AgsMutexManager *mutex_manager; GList *recall; GList *list, *list_next; gchar *filename, *effect; guint nth_effect, n_recall; guint pads, audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) effect_bulk->audio); pthread_mutex_unlock(application_mutex); /* free plugin specification */ effect_bulk_plugin = g_list_nth_data(effect_bulk->plugin, nth); effect_bulk->plugin = g_list_remove(effect_bulk->plugin, effect_bulk_plugin); free(effect_bulk_plugin); /* retrieve audio properties and channel */ pthread_mutex_lock(audio_mutex); audio_channels = effect_bulk->audio->audio_channels; if(effect_bulk->channel_type == AGS_TYPE_OUTPUT){ current = effect_bulk->audio->output; pads = effect_bulk->audio->output_pads; }else{ current = effect_bulk->audio->input; pads = effect_bulk->audio->input_pads; } pthread_mutex_unlock(audio_mutex); if(current != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get nth_effect */ pthread_mutex_lock(channel_mutex); recall = current->play; nth_effect = 0; n_recall = 0; while((recall = ags_recall_template_find_all_type(recall, AGS_TYPE_RECALL_LADSPA, AGS_TYPE_RECALL_DSSI, AGS_TYPE_RECALL_LV2, G_TYPE_NONE)) != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(recall->data)->flags)) != 0){ nth_effect++; } if((AGS_RECALL_BULK_MODE & (AGS_RECALL(recall->data)->flags)) == 0){ n_recall++; } if(nth_effect - n_recall == nth){ break; } recall = recall->next; } pthread_mutex_unlock(channel_mutex); } nth_effect--; /* destroy control */ list = gtk_container_get_children((GtkContainer *) effect_bulk->table); filename = AGS_BULK_MEMBER(list->data)->filename; effect = AGS_BULK_MEMBER(list->data)->effect; i = 0; while(list != NULL && i <= nth){ list_next = list->next; if(AGS_IS_BULK_MEMBER(list->data)){ if(!(!g_strcmp0(AGS_BULK_MEMBER(list->data)->filename, filename) && !g_strcmp0(AGS_BULK_MEMBER(list->data)->effect, effect))){ filename = AGS_BULK_MEMBER(list->data)->filename; effect = AGS_BULK_MEMBER(list->data)->effect; i++; } if(i == nth){ GtkWidget *child_widget; child_widget = gtk_bin_get_child(list->data); if(AGS_IS_LED(child_widget) || AGS_IS_INDICATOR(child_widget)){ g_hash_table_remove(ags_effect_bulk_indicator_queue_draw, child_widget); } gtk_widget_destroy(list->data); } } list = list_next; } /* remove recalls */ if(current != NULL){ for(i = 0; i < pads; i++){ for(j = 0; j < audio_channels; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* remove effect */ ags_channel_remove_effect(current, nth_effect); /* iterate */ pthread_mutex_lock(channel_mutex); current = current->next; pthread_mutex_unlock(channel_mutex); } } } } void ags_effect_bulk_remove_effect(AgsEffectBulk *effect_bulk, guint nth) { g_return_if_fail(AGS_IS_EFFECT_BULK(effect_bulk)); g_object_ref((GObject *) effect_bulk); g_signal_emit(G_OBJECT(effect_bulk), effect_bulk_signals[REMOVE_EFFECT], 0, nth); g_object_unref((GObject *) effect_bulk); } void ags_effect_bulk_real_resize_audio_channels(AgsEffectBulk *effect_bulk, guint new_size, guint old_size) { AgsWindow *window; AgsUpdateBulkMember *update_bulk_member; AgsChannel *current; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *task; GList *effect_bulk_plugin; GList *list; guint pads; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) effect_bulk, AGS_TYPE_WINDOW); application_context = (AgsApplicationContext *) window->application_context; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) effect_bulk->audio); pthread_mutex_unlock(application_mutex); /* retrieve channel */ pthread_mutex_lock(audio_mutex); if(effect_bulk->channel_type == AGS_TYPE_OUTPUT){ current = effect_bulk->audio->output; pads = effect_bulk->audio->output_pads; }else{ current = effect_bulk->audio->input; pads = effect_bulk->audio->input_pads; } pthread_mutex_unlock(audio_mutex); if(pads == 0){ return; } /* collect bulk member */ task = NULL; list = gtk_container_get_children((GtkContainer *) effect_bulk->table); while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ /* create task */ update_bulk_member = ags_update_bulk_member_new((GtkWidget *) effect_bulk, list->data, new_size, old_size, FALSE); task = g_list_prepend(task, update_bulk_member); } list = list->next; } if(new_size > old_size){ /* add effect */ for(i = 0; i < pads; i++){ current = ags_channel_nth(current, old_size); /* */ for(j = old_size; j < new_size; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* add effect */ effect_bulk_plugin = effect_bulk->plugin; while(effect_bulk_plugin != NULL){ ags_channel_add_effect(current, AGS_EFFECT_BULK_PLUGIN(effect_bulk_plugin->data)->filename, AGS_EFFECT_BULK_PLUGIN(effect_bulk_plugin->data)->effect); effect_bulk_plugin = effect_bulk_plugin->next; } /* iterate */ pthread_mutex_lock(channel_mutex); current = current->next; pthread_mutex_unlock(channel_mutex); } } } /* launch tasks */ task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); } void ags_effect_bulk_resize_audio_channels(AgsEffectBulk *effect_bulk, guint new_size, guint old_size) { g_return_if_fail(AGS_IS_EFFECT_BULK(effect_bulk)); g_object_ref((GObject *) effect_bulk); g_signal_emit(G_OBJECT(effect_bulk), effect_bulk_signals[RESIZE_AUDIO_CHANNELS], 0, new_size, old_size); g_object_unref((GObject *) effect_bulk); } void ags_effect_bulk_real_resize_pads(AgsEffectBulk *effect_bulk, guint new_size, guint old_size) { AgsWindow *window; AgsUpdateBulkMember *update_bulk_member; AgsChannel *current; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *task; GList *effect_bulk_plugin; GList *list; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) effect_bulk, AGS_TYPE_WINDOW); application_context = (AgsApplicationContext *) window->application_context; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) effect_bulk->audio); pthread_mutex_unlock(application_mutex); /* retrieve channel */ pthread_mutex_lock(audio_mutex); audio_channels = effect_bulk->audio->audio_channels; if(effect_bulk->channel_type == AGS_TYPE_OUTPUT){ current = effect_bulk->audio->output; }else{ current = effect_bulk->audio->input; } pthread_mutex_unlock(audio_mutex); if(audio_channels == 0){ return; } /* collect bulk member */ task = NULL; list = gtk_container_get_children((GtkContainer *) effect_bulk->table); while(list != NULL){ if(AGS_IS_BULK_MEMBER(list->data)){ /* create task */ update_bulk_member = ags_update_bulk_member_new((GtkWidget *) effect_bulk, list->data, new_size, old_size, TRUE); task = g_list_prepend(task, update_bulk_member); } list = list->next; } if(new_size > old_size){ /* add effect */ current = ags_channel_pad_nth(current, old_size); /* */ for(i = old_size; i < new_size; i++){ for(j = 0; j < audio_channels; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* add effect */ effect_bulk_plugin = effect_bulk->plugin; while(effect_bulk_plugin != NULL){ ags_channel_add_effect(current, AGS_EFFECT_BULK_PLUGIN(effect_bulk_plugin->data)->filename, AGS_EFFECT_BULK_PLUGIN(effect_bulk_plugin->data)->effect); effect_bulk_plugin = effect_bulk_plugin->next; } /* iterate */ pthread_mutex_lock(channel_mutex); current = current->next; pthread_mutex_unlock(channel_mutex); } } } /* launch tasks */ task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); } void ags_effect_bulk_resize_pads(AgsEffectBulk *effect_bulk, guint new_size, guint old_size) { g_return_if_fail(AGS_IS_EFFECT_BULK(effect_bulk)); g_object_ref((GObject *) effect_bulk); g_signal_emit(G_OBJECT(effect_bulk), effect_bulk_signals[RESIZE_PADS], 0, new_size, old_size); g_object_unref((GObject *) effect_bulk); } void ags_effect_bulk_real_map_recall(AgsEffectBulk *effect_bulk) { if((AGS_MACHINE_PREMAPPED_RECALL & (effect_bulk->flags)) == 0 || (AGS_EFFECT_BULK_MAPPED_RECALL & (effect_bulk->flags)) != 0){ return; } effect_bulk->flags |= AGS_EFFECT_BULK_MAPPED_RECALL; ags_effect_bulk_find_port(effect_bulk); } /** * ags_effect_bulk_map_recall: * @effect_bulk: the #AgsEffectBulk to add its default recall. * * You may want the @effect_bulk to add its default recall. */ void ags_effect_bulk_map_recall(AgsEffectBulk *effect_bulk) { g_return_if_fail(AGS_IS_EFFECT_BULK(effect_bulk)); g_object_ref((GObject *) effect_bulk); g_signal_emit((GObject *) effect_bulk, effect_bulk_signals[MAP_RECALL], 0); g_object_unref((GObject *) effect_bulk); } GList* ags_effect_bulk_real_find_port(AgsEffectBulk *effect_bulk) { GList *bulk_member, *bulk_member_start; GList *port, *tmp_port; port = NULL; /* find output ports */ bulk_member_start = bulk_member = gtk_container_get_children((GtkContainer *) effect_bulk->table); if(bulk_member != NULL){ while(bulk_member != NULL){ tmp_port = ags_bulk_member_find_port(AGS_BULK_MEMBER(bulk_member->data)); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } bulk_member = bulk_member->next; } g_list_free(bulk_member_start); } return(port); } /** * ags_effect_bulk_find_port: * @effect_bulk: the #AgsEffectBulk * Returns: an #GList containing all related #AgsPort * * Lookup ports of associated recalls. * * Since: 1.0.0 */ GList* ags_effect_bulk_find_port(AgsEffectBulk *effect_bulk) { GList *list; list = NULL; g_return_val_if_fail(AGS_IS_EFFECT_BULK(effect_bulk), NULL); g_object_ref((GObject *) effect_bulk); g_signal_emit((GObject *) effect_bulk, effect_bulk_signals[FIND_PORT], 0, &list); g_object_unref((GObject *) effect_bulk); return(list); } /** * ags_effect_bulk_indicator_queue_draw_timeout: * @widget: the indicator widgt * * Queue draw widget * * Returns: %TRUE if proceed with redraw, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_effect_bulk_indicator_queue_draw_timeout(GtkWidget *widget) { if(g_hash_table_lookup(ags_effect_bulk_indicator_queue_draw, widget) != NULL){ gtk_widget_queue_draw(widget); return(TRUE); }else{ return(FALSE); } } /** * ags_effect_bulk_new: * @audio: the #AgsAudio to visualize * @channel_type: either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT * * Creates an #AgsEffectBulk * * Returns: a new #AgsEffectBulk * * Since: 1.0.0 */ AgsEffectBulk* ags_effect_bulk_new(AgsAudio *audio, GType channel_type) { AgsEffectBulk *effect_bulk; effect_bulk = (AgsEffectBulk *) g_object_new(AGS_TYPE_EFFECT_BULK, "audio", audio, "channel-type", channel_type, NULL); return(effect_bulk); } gsequencer-1.4.24/ags/X/ags_midi_dialog_callbacks.h0000644000175000017500000000252013246707333017117 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MIDI_DIALOG_CALLBACKS_H__ #define __AGS_MIDI_DIALOG_CALLBACKS_H__ #include #include #include #include int ags_midi_dialog_apply_callback(GtkWidget *widget, AgsMidiDialog *midi_dialog); int ags_midi_dialog_ok_callback(GtkWidget *widget, AgsMidiDialog *midi_dialog); int ags_midi_dialog_cancel_callback(GtkWidget *widget, AgsMidiDialog *midi_dialog); gboolean ags_midi_dialog_delete_event(GtkWidget *widget, GdkEventAny *event, AgsMidiDialog *midi_dialog); #endif /*__AGS_MIDI_DIALOG_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_server_preferences_callbacks.h0000644000175000017500000000172513246707333020553 00000000000000/* 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 . */ #ifndef __AGS_SERVER_PREFERENCES_CALLBACKS_H__ #define __AGS_SERVER_PREFERENCES_CALLBACKS_H__ #include #include #endif /*__AGS_SERVER_PREFERENCES_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_pad_editor.c0000644000175000017500000003121013247044247014761 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_pad_editor_class_init(AgsPadEditorClass *pad_editor); void ags_pad_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pad_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_pad_editor_init(AgsPadEditor *pad_editor); void ags_pad_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_pad_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_pad_editor_connect(AgsConnectable *connectable); void ags_pad_editor_disconnect(AgsConnectable *connectable); void ags_pad_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_pad_editor_apply(AgsApplicable *applicable); void ags_pad_editor_reset(AgsApplicable *applicable); /** * SECTION:ags_pad_editor * @short_description: A composite widget to edit #AgsChannel * @title: AgsPadEditor * @section_id: * @include: ags/X/ags_pad_editor.h * * #AgsPadEditor is a composite widget to edit #AgsChannel. It should be * packed by an #AgsPadEditor. */ enum{ PROP_0, PROP_CHANNEL, }; GType ags_pad_editor_get_type(void) { static GType ags_type_pad_editor = 0; if(!ags_type_pad_editor){ static const GTypeInfo ags_pad_editor_info = { sizeof (AgsPadEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pad_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPadEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pad_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pad_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_pad_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pad_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsPadEditor", &ags_pad_editor_info, 0); g_type_add_interface_static(ags_type_pad_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_pad_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_pad_editor); } void ags_pad_editor_class_init(AgsPadEditorClass *pad_editor) { GObjectClass *gobject; GParamSpec *param_spec; gobject = (GObjectClass *) pad_editor; gobject->set_property = ags_pad_editor_set_property; gobject->get_property = ags_pad_editor_get_property; param_spec = g_param_spec_object("channel", i18n_pspec("assigned channel"), i18n_pspec("The channel which this pad editor is assigned with"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); } void ags_pad_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_pad_editor_connect; connectable->disconnect = ags_pad_editor_disconnect; } void ags_pad_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_pad_editor_set_update; applicable->apply = ags_pad_editor_apply; applicable->reset = ags_pad_editor_reset; } void ags_pad_editor_init(AgsPadEditor *pad_editor) { pad_editor->flags = 0; pad_editor->version = AGS_PAD_EDITOR_DEFAULT_VERSION; pad_editor->build_id = AGS_PAD_EDITOR_DEFAULT_BUILD_ID; pad_editor->line_editor_expander = (GtkExpander *) gtk_expander_new(NULL); gtk_box_pack_start(GTK_BOX(pad_editor), GTK_WIDGET(pad_editor->line_editor_expander), FALSE, FALSE, 0); pad_editor->line_editor = NULL; } void ags_pad_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPadEditor *pad_editor; pad_editor = AGS_PAD_EDITOR(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); ags_pad_editor_set_channel(pad_editor, channel); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pad_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPadEditor *pad_editor; pad_editor = AGS_PAD_EDITOR(gobject); switch(prop_id){ case PROP_CHANNEL: g_value_set_object(value, pad_editor->pad); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pad_editor_connect(AgsConnectable *connectable) { AgsMachine *machine; AgsMachineEditor *machine_editor; AgsConnectionEditor *connection_editor; AgsPadEditor *pad_editor; GList *line_editor, *line_editor_start; pad_editor = AGS_PAD_EDITOR(connectable); if((AGS_PAD_EDITOR_CONNECTED & (pad_editor->flags)) != 0){ return; } pad_editor->flags |= AGS_PAD_EDITOR_CONNECTED; machine = NULL; machine_editor = gtk_widget_get_ancestor(pad_editor, AGS_TYPE_MACHINE_EDITOR); connection_editor = gtk_widget_get_ancestor(pad_editor, AGS_TYPE_CONNECTION_EDITOR); if(machine_editor != NULL){ machine = machine_editor->machine; }else if(connection_editor != NULL){ machine = connection_editor->machine; } /* */ if(machine != NULL){ g_signal_connect_after(G_OBJECT(machine), "resize-audio-channels", G_CALLBACK(ags_pad_editor_resize_audio_channels_callback), pad_editor); } /* AgsLineEditor */ line_editor_start = line_editor = gtk_container_get_children(GTK_CONTAINER(pad_editor->line_editor)); while(line_editor != NULL){ ags_connectable_connect(AGS_CONNECTABLE(line_editor->data)); line_editor = line_editor->next; } g_list_free(line_editor_start); } void ags_pad_editor_disconnect(AgsConnectable *connectable) { AgsMachine *machine; AgsMachineEditor *machine_editor; AgsConnectionEditor *connection_editor; AgsPadEditor *pad_editor; GList *line_editor, *line_editor_start; pad_editor = AGS_PAD_EDITOR(connectable); if((AGS_PAD_EDITOR_CONNECTED & (pad_editor->flags)) == 0){ return; } pad_editor->flags &= (~AGS_PAD_EDITOR_CONNECTED); machine = NULL; machine_editor = gtk_widget_get_ancestor(pad_editor, AGS_TYPE_MACHINE_EDITOR); connection_editor = gtk_widget_get_ancestor(pad_editor, AGS_TYPE_CONNECTION_EDITOR); if(machine_editor != NULL){ machine = machine_editor->machine; }else if(connection_editor != NULL){ machine = connection_editor->machine; } /* */ if(machine != NULL){ g_object_disconnect(G_OBJECT(machine), "any_signal::resize-audio-channels", G_CALLBACK(ags_pad_editor_resize_audio_channels_callback), pad_editor, NULL); } /* AgsLineEditor */ line_editor_start = line_editor = gtk_container_get_children(GTK_CONTAINER(pad_editor->line_editor)); while(line_editor != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(line_editor->data)); line_editor = line_editor->next; } g_list_free(line_editor_start); } void ags_pad_editor_set_update(AgsApplicable *applicable, gboolean update) { AgsPadEditor *pad_editor; GList *line_editor, *line_editor_start; pad_editor = AGS_PAD_EDITOR(applicable); line_editor_start = line_editor = gtk_container_get_children(GTK_CONTAINER(pad_editor->line_editor)); while(line_editor != NULL){ ags_applicable_set_update(AGS_APPLICABLE(line_editor->data), update); line_editor = line_editor->next; } g_list_free(line_editor_start); } void ags_pad_editor_apply(AgsApplicable *applicable) { AgsPadEditor *pad_editor; GList *line_editor, *line_editor_start; pad_editor = AGS_PAD_EDITOR(applicable); line_editor_start = line_editor = gtk_container_get_children(GTK_CONTAINER(pad_editor->line_editor)); while(line_editor != NULL){ ags_applicable_apply(AGS_APPLICABLE(line_editor->data)); line_editor = line_editor->next; } g_list_free(line_editor_start); } void ags_pad_editor_reset(AgsApplicable *applicable) { AgsPadEditor *pad_editor; GList *line_editor, *line_editor_start; pad_editor = AGS_PAD_EDITOR(applicable); line_editor_start = line_editor = gtk_container_get_children(GTK_CONTAINER(pad_editor->line_editor)); while(line_editor != NULL){ ags_applicable_reset(AGS_APPLICABLE(line_editor->data)); line_editor = line_editor->next; } g_list_free(line_editor_start); } /** * ags_pad_editor_set_channel: * @pad_editor: an #AgsPadEditor * @channel: the new #AgsChannel * * Is called as channel gets modified. * * Since: 1.0.0 */ void ags_pad_editor_set_channel(AgsPadEditor *pad_editor, AgsChannel *channel) { GtkVBox *vbox; if(pad_editor->line_editor != NULL){ vbox = pad_editor->line_editor; pad_editor->line_editor = NULL; gtk_widget_destroy(GTK_WIDGET(vbox)); } pad_editor->pad = channel; if(channel != NULL){ AgsLineEditor *line_editor; AgsChannel *next_pad; AgsMutexManager *mutex_manager; gchar *str; guint pad; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, channel); pthread_mutex_unlock(application_mutex); /* get some channel fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pad = channel->pad; pthread_mutex_unlock(channel_mutex); /* set label */ str = g_strdup_printf("%s: %u", i18n("pad"), pad + 1); gtk_expander_set_label(pad_editor->line_editor_expander, str); g_free(str); pad_editor->line_editor = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(pad_editor->line_editor_expander), GTK_WIDGET(pad_editor->line_editor)); while(channel != next_pad){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, channel); pthread_mutex_unlock(application_mutex); /* instantiate line editor */ line_editor = ags_line_editor_new(NULL); line_editor->editor_type_count = pad_editor->editor_type_count; line_editor->editor_type = (GType *) malloc(line_editor->editor_type_count * sizeof(GType)); for(i = 0; i < line_editor->editor_type_count; i++){ line_editor->editor_type[i] = pad_editor->editor_type[i]; } g_object_set(line_editor, "channel", channel, NULL); gtk_box_pack_start(GTK_BOX(pad_editor->line_editor), GTK_WIDGET(line_editor), FALSE, FALSE, 0); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } }else{ gtk_expander_set_label(pad_editor->line_editor_expander, NULL); } } /** * ags_pad_editor_new: * @channel: the channel to edit * * Creates an #AgsPadEditor * * Returns: a new #AgsPadEditor * * Since: 1.0.0 */ AgsPadEditor* ags_pad_editor_new(AgsChannel *channel) { AgsPadEditor *pad_editor; pad_editor = (AgsPadEditor *) g_object_new(AGS_TYPE_PAD_EDITOR, "channel", channel, NULL); return(pad_editor); } gsequencer-1.4.24/ags/X/ags_lv2_browser.h0000644000175000017500000000454413246707333015135 00000000000000/* 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 . */ #ifndef __AGS_LV2_BROWSER_H__ #define __AGS_LV2_BROWSER_H__ #include #include #include #define AGS_TYPE_LV2_BROWSER (ags_lv2_browser_get_type()) #define AGS_LV2_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_LV2_BROWSER, AgsLv2Browser)) #define AGS_LV2_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_LV2_BROWSER, AgsLv2BrowserClass)) #define AGS_IS_LV2_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LV2_BROWSER)) #define AGS_IS_LV2_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LV2_BROWSER)) #define AGS_LV2_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LV2_BROWSER, AgsLv2BrowserClass)) typedef struct _AgsLv2Browser AgsLv2Browser; typedef struct _AgsLv2BrowserClass AgsLv2BrowserClass; struct _AgsLv2Browser { GtkVBox vbox; gchar *path; GtkHBox *plugin; GtkComboBox *filename; GtkComboBox *effect; GtkVBox *description; GtkWidget *preview; }; struct _AgsLv2BrowserClass { GtkVBoxClass vbox; }; GType ags_lv2_browser_get_type(void); gchar* ags_lv2_browser_get_plugin_filename(AgsLv2Browser *lv2_browser); gchar* ags_lv2_browser_get_plugin_effect(AgsLv2Browser *lv2_browser); GtkWidget* ags_lv2_browser_combo_box_output_boolean_controls_new(); GtkWidget* ags_lv2_browser_combo_box_output_controls_new(); GtkWidget* ags_lv2_browser_combo_box_boolean_controls_new(); GtkWidget* ags_lv2_browser_combo_box_controls_new(); GtkWidget* ags_lv2_browser_preview_new(); AgsLv2Browser* ags_lv2_browser_new(); #endif /*__AGS_LV2_BROWSER_H__*/ gsequencer-1.4.24/ags/X/ags_xorg_application_context.h0000644000175000017500000000570213247044247017771 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_XORG_APPLICATION_CONTEXT_H__ #define __AGS_XORG_APPLICATION_CONTEXT_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_XORG_APPLICATION_CONTEXT (ags_xorg_application_context_get_type()) #define AGS_XORG_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_XORG_APPLICATION_CONTEXT, AgsXorgApplicationContext)) #define AGS_XORG_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_XORG_APPLICATION_CONTEXT, AgsXorgApplicationContextClass)) #define AGS_IS_XORG_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_XORG_APPLICATION_CONTEXT)) #define AGS_IS_XORG_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_XORG_APPLICATION_CONTEXT)) #define AGS_XORG_APPLICATION_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_XORG_APPLICATION_CONTEXT, AgsXorgApplicationContextClass)) #define AGS_XORG_VERSION "1.2.0" #define AGS_XORG_BUILD_ID "Thu Nov 30 22:50:27 UTC 2017" typedef struct _AgsXorgApplicationContext AgsXorgApplicationContext; typedef struct _AgsXorgApplicationContextClass AgsXorgApplicationContextClass; typedef enum{ AGS_XORG_APPLICATION_CONTEXT_SHOW_GUI = 1, }AgsXorgApplicationContextFlags; struct _AgsXorgApplicationContext { AgsApplicationContext application_context; volatile gboolean gui_ready; volatile gboolean show_animation; volatile gboolean file_ready; AgsThreadPool *thread_pool; AgsPollingThread *polling_thread; GList *worker; AgsThread *soundcard_thread; AgsThread *export_thread; AgsThread *gui_thread; AgsThread *autosave_thread; AgsServer *server; GList *soundcard; GList *sequencer; GList *distributed_manager; AgsWindow *window; }; struct _AgsXorgApplicationContextClass { AgsApplicationContextClass application_context; }; GType ags_xorg_application_context_get_type(); AgsXorgApplicationContext* ags_xorg_application_context_new(); #endif /*__AGS_XORG_APPLICATION_CONTEXT_H__*/ gsequencer-1.4.24/ags/X/ags_effect_separator.c0000644000175000017500000001616513246707333016200 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_effect_separator_class_init(AgsEffectSeparatorClass *effect_separator); void ags_effect_separator_init(AgsEffectSeparator *effect_separator); void ags_effect_separator_connectable_interface_init(AgsConnectableInterface *connectable); void ags_effect_separator_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_effect_separator_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); /** * SECTION:ags_effect_separator * @short_description: A effect separator widget * @title: AgsEffectSeparator * @section_id: * @include: ags/widget/ags_effect_separator.h * * #AgsEffectSeparator is a widget representing an separator of effects. */ enum{ PROP_0, PROP_FILENAME, PROP_EFFECT, PROP_TEXT, }; static gpointer ags_effect_separator_parent_class = NULL; GType ags_effect_separator_get_type(void) { static GType ags_type_effect_separator = 0; if(!ags_type_effect_separator){ static const GTypeInfo ags_effect_separator_info = { sizeof(AgsEffectSeparatorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_effect_separator_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsEffectSeparator), 0, /* n_preallocs */ (GInstanceInitFunc) ags_effect_separator_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_effect_separator_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_effect_separator = g_type_register_static(GTK_TYPE_HBOX, "AgsEffectSeparator", &ags_effect_separator_info, 0); g_type_add_interface_static(ags_type_effect_separator, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_effect_separator); } void ags_effect_separator_class_init(AgsEffectSeparatorClass *effect_separator) { GObjectClass *gobject; GParamSpec *param_spec; ags_effect_separator_parent_class = g_type_class_peek_parent(effect_separator); /* GObjectClass */ gobject = (GObjectClass *) effect_separator; gobject->set_property = ags_effect_separator_set_property; gobject->get_property = ags_effect_separator_get_property; /* properties */ /** * AgsEffectSeparator:filename: * * The filename. * * Since: 1.0.0.19 */ param_spec = g_param_spec_string("filename", i18n_pspec("filename"), i18n_pspec("The filename"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsEffectSeparator:effect: * * The effect. * * Since: 1.0.0.19 */ param_spec = g_param_spec_string("effect", i18n_pspec("effect"), i18n_pspec("The effect"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsEffectSeparator:text: * * The text. * * Since: 1.0.0.19 */ param_spec = g_param_spec_string("text", i18n_pspec("text"), i18n_pspec("The text"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TEXT, param_spec); } void ags_effect_separator_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = NULL; connectable->disconnect = NULL; } void ags_effect_separator_init(AgsEffectSeparator *effect_separator) { GtkSeparator *separator; effect_separator->filename = NULL; effect_separator->effect = NULL; /* heading separator */ separator = gtk_hseparator_new(); gtk_box_pack_start(effect_separator, separator, TRUE, TRUE, 0); /* label */ effect_separator->label = gtk_label_new(NULL); gtk_box_pack_start(effect_separator, effect_separator->label, FALSE, FALSE, 0); /* trailing separator */ separator = gtk_hseparator_new(); gtk_box_pack_start(effect_separator, separator, TRUE, TRUE, 0); } void ags_effect_separator_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsEffectSeparator *effect_separator; effect_separator = AGS_EFFECT_SEPARATOR(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(effect_separator->filename != NULL){ g_free(effect_separator->filename); } effect_separator->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect_separator->effect != NULL){ g_free(effect_separator->effect); } effect_separator->effect = g_strdup(effect); } break; case PROP_TEXT: { gchar *text; text = g_value_get_string(value); gtk_label_set_text(effect_separator->label, text); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_effect_separator_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsEffectSeparator *effect_separator; effect_separator = AGS_EFFECT_SEPARATOR(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, effect_separator->filename); } break; case PROP_EFFECT: { g_value_set_string(value, effect_separator->effect); } break; case PROP_TEXT: { g_value_set_string(value, gtk_label_get_text(effect_separator->label)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } /** * ags_effect_separator_new: * * Creates an #AgsEffectSeparator. Note, use rather its implementation #AgsVEffectSeparator or * #AgsHEffectSeparator. * * Returns: a new #AgsEffectSeparator * * Since: 1.0.0.19 */ AgsEffectSeparator* ags_effect_separator_new() { AgsEffectSeparator *effect_separator; effect_separator = (AgsEffectSeparator *) g_object_new(AGS_TYPE_EFFECT_SEPARATOR, NULL); return(effect_separator); } gsequencer-1.4.24/ags/X/ags_history_browser_callbacks.h0000644000175000017500000000176413246707333020133 00000000000000/* 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 . */ #ifndef __AGS_HISTORY_BROWSER_CALLBACKS_H__ #define __AGS_HISTORY_BROWSER_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_HISTORY_BROWSER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_menu_action_callbacks.c0000644000175000017500000011075313247044247017161 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_menu_action_open_response_callback(GtkFileChooserDialog *file_chooser, gint response, gpointer data); void ags_menu_action_open_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; GtkFileChooserDialog *file_chooser; gint response; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); file_chooser = (GtkFileChooserDialog *) gtk_file_chooser_dialog_new("open file", (GtkWindow *) window, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(file_chooser), FALSE); gtk_widget_show_all((GtkWidget *) file_chooser); g_signal_connect((GObject *) file_chooser, "response", G_CALLBACK(ags_menu_action_open_response_callback), data); } void ags_menu_action_open_response_callback(GtkFileChooserDialog *file_chooser, gint response, gpointer data) { if(response == GTK_RESPONSE_ACCEPT){ AgsFile *file; AgsSaveFile *save_file; char *filename; gchar *str; GError *error; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); error = NULL; str = g_strdup_printf("gsequencer --filename %s", filename); g_spawn_command_line_async(str, &error); g_free(filename); g_free(str); } gtk_widget_destroy((GtkWidget *) file_chooser); } void ags_menu_action_save_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; GError *error; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); if(g_strcmp0(ags_config_get_value(AGS_APPLICATION_CONTEXT(application_context)->config, AGS_CONFIG_GENERIC, "simple-file"), "false")){ AgsSimpleFile *simple_file; simple_file = (AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, "application-context", application_context, "filename", window->name, NULL); error = NULL; ags_simple_file_rw_open(simple_file, TRUE, &error); ags_simple_file_write(simple_file); ags_simple_file_close(simple_file); g_object_unref(G_OBJECT(simple_file)); }else{ AgsFile *file; file = (AgsFile *) g_object_new(AGS_TYPE_FILE, "application-context", application_context, "filename", window->name, NULL); error = NULL; ags_file_rw_open(file, TRUE, &error); ags_file_write(file); ags_file_close(file); g_object_unref(G_OBJECT(file)); } } void ags_menu_action_save_as_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; GtkFileChooserDialog *file_chooser; gint response; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); file_chooser = (GtkFileChooserDialog *) gtk_file_chooser_dialog_new("save file as", (GtkWindow *) window, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(file_chooser), FALSE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_widget_show_all((GtkWidget *) file_chooser); response = gtk_dialog_run(GTK_DIALOG(file_chooser)); if(response == GTK_RESPONSE_ACCEPT){ gchar *filename; gchar *str; GError *error; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); if(g_strcmp0(ags_config_get_value(AGS_APPLICATION_CONTEXT(application_context)->config, AGS_CONFIG_GENERIC, "simple-file"), "false")){ AgsSimpleFile *simple_file; simple_file = (AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, "application-context", application_context, "filename", filename, NULL); error = NULL; ags_simple_file_rw_open(simple_file, TRUE, &error); ags_simple_file_write(simple_file); ags_simple_file_close(simple_file); g_object_unref(G_OBJECT(simple_file)); }else{ AgsFile *file; file = (AgsFile *) g_object_new(AGS_TYPE_FILE, "application-context", application_context, "filename", filename, NULL); error = NULL; ags_file_rw_open(file, TRUE, &error); ags_file_write(file); ags_file_close(file); g_object_unref(G_OBJECT(file)); } if(window->name != NULL){ g_free(window->name); } window->name = g_strdup(filename); str = g_strconcat("GSequencer - ", window->name, NULL); gtk_window_set_title((GtkWindow *) window, str); g_free(str); } gtk_widget_destroy((GtkWidget *) file_chooser); } void ags_menu_action_export_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); gtk_widget_show_all((GtkWidget *) window->export_window); } void ags_menu_action_quit_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; GtkDialog *dialog; GtkWidget *cancel_button; gint response; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); /* ask the user if he wants save to a file */ dialog = (GtkDialog *) gtk_message_dialog_new(GTK_WINDOW(window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "Do you want to save '%s'?", window->name); cancel_button = gtk_dialog_add_button(dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_widget_grab_focus(cancel_button); response = gtk_dialog_run(dialog); if(response == GTK_RESPONSE_YES){ AgsFile *file; //TODO:JK: revise me file = (AgsFile *) g_object_new(AGS_TYPE_FILE, "application-context", application_context, "filename", window->name, NULL); ags_file_write(file); g_object_unref(G_OBJECT(file)); } if(response != GTK_RESPONSE_CANCEL){ ags_application_context_quit(AGS_APPLICATION_CONTEXT(application_context)); }else{ gtk_widget_destroy(GTK_WIDGET(dialog)); } } void ags_menu_action_add_callback(GtkWidget *menu_item, gpointer data) { } void ags_menu_action_add_panel_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsPanel *panel; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); panel = ags_panel_new(G_OBJECT(window->soundcard)); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(panel)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(panel), FALSE, FALSE, 0); AGS_MACHINE(panel)->audio->audio_channels = 2; ags_connectable_connect(AGS_CONNECTABLE(panel)); ags_audio_set_pads(AGS_MACHINE(panel)->audio, AGS_TYPE_INPUT, 1); ags_audio_set_pads(AGS_MACHINE(panel)->audio, AGS_TYPE_OUTPUT, 1); gtk_widget_show_all(GTK_WIDGET(panel)); } void ags_menu_action_add_mixer_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsMixer *mixer; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); mixer = ags_mixer_new(G_OBJECT(window->soundcard)); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(mixer)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(mixer), FALSE, FALSE, 0); ags_connectable_connect(AGS_CONNECTABLE(mixer)); mixer->machine.audio->audio_channels = 2; ags_audio_set_pads(mixer->machine.audio, AGS_TYPE_INPUT, 8); ags_audio_set_pads(mixer->machine.audio, AGS_TYPE_OUTPUT, 1); gtk_widget_show_all(GTK_WIDGET(mixer)); } void ags_menu_action_add_drum_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsDrum *drum; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); drum = ags_drum_new(G_OBJECT(window->soundcard)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(drum)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(drum), FALSE, FALSE, 0); /* connect everything */ ags_connectable_connect(AGS_CONNECTABLE(drum)); /* */ drum->machine.audio->audio_channels = 2; /* AgsDrumInputPad */ ags_audio_set_pads(drum->machine.audio, AGS_TYPE_INPUT, 8); ags_audio_set_pads(drum->machine.audio, AGS_TYPE_OUTPUT, 1); /* */ gtk_widget_show_all(GTK_WIDGET(drum)); } void ags_menu_action_add_matrix_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsMatrix *matrix; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); matrix = ags_matrix_new(G_OBJECT(window->soundcard)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(matrix)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(matrix), FALSE, FALSE, 0); /* connect everything */ ags_connectable_connect(AGS_CONNECTABLE(matrix)); /* */ matrix->machine.audio->audio_channels = 1; /* AgsMatrixInputPad */ ags_audio_set_pads(matrix->machine.audio, AGS_TYPE_INPUT, 78); ags_audio_set_pads(matrix->machine.audio, AGS_TYPE_OUTPUT, 1); /* */ gtk_widget_show_all(GTK_WIDGET(matrix)); } void ags_menu_action_add_synth_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsSynth *synth; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); synth = ags_synth_new(G_OBJECT(window->soundcard)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(synth)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, (GtkWidget *) synth, FALSE, FALSE, 0); ags_connectable_connect(AGS_CONNECTABLE(synth)); synth->machine.audio->audio_channels = 1; ags_audio_set_pads((AgsAudio*) synth->machine.audio, AGS_TYPE_INPUT, 2); ags_audio_set_pads((AgsAudio*) synth->machine.audio, AGS_TYPE_OUTPUT, 78); gtk_widget_show_all((GtkWidget *) synth); } void ags_menu_action_add_syncsynth_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsSyncsynth *syncsynth; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); syncsynth = ags_syncsynth_new(G_OBJECT(window->soundcard)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(syncsynth)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, (GtkWidget *) syncsynth, FALSE, FALSE, 0); ags_connectable_connect(AGS_CONNECTABLE(syncsynth)); syncsynth->machine.audio->audio_channels = 1; ags_audio_set_pads((AgsAudio*) syncsynth->machine.audio, AGS_TYPE_INPUT, 78); ags_audio_set_pads((AgsAudio*) syncsynth->machine.audio, AGS_TYPE_OUTPUT, 1); gtk_widget_show_all((GtkWidget *) syncsynth); } void ags_menu_action_add_ffplayer_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsFFPlayer *ffplayer; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); ffplayer = ags_ffplayer_new(G_OBJECT(window->soundcard)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(ffplayer)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, (GtkWidget *) ffplayer, FALSE, FALSE, 0); ags_connectable_connect(AGS_CONNECTABLE(ffplayer)); // ffplayer->machine.audio->frequence = ; ffplayer->machine.audio->audio_channels = 2; ags_audio_set_pads(AGS_MACHINE(ffplayer)->audio, AGS_TYPE_INPUT, 78); ags_audio_set_pads(AGS_MACHINE(ffplayer)->audio, AGS_TYPE_OUTPUT, 1); gtk_widget_show_all((GtkWidget *) ffplayer); } void ags_menu_action_add_audiorec_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsAudiorec *audiorec; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); audiorec = ags_audiorec_new(G_OBJECT(window->soundcard)); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(audiorec)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, (GtkWidget *) audiorec, FALSE, FALSE, 0); ags_connectable_connect(AGS_CONNECTABLE(audiorec)); // audiorec->machine.audio->frequence = ; audiorec->machine.audio->audio_channels = 2; ags_audio_set_pads(AGS_MACHINE(audiorec)->audio, AGS_TYPE_INPUT, 1); ags_audio_set_pads(AGS_MACHINE(audiorec)->audio, AGS_TYPE_OUTPUT, 1); gtk_widget_show_all((GtkWidget *) audiorec); } void ags_menu_action_add_ladspa_bridge_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsLadspaBridge *ladspa_bridge; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; gchar *filename, *effect; pthread_mutex_t *application_mutex; filename = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_FILENAME_KEY); effect = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_EFFECT_KEY); application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); ladspa_bridge = ags_ladspa_bridge_new(G_OBJECT(window->soundcard), filename, effect); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(ladspa_bridge)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(ladspa_bridge), FALSE, FALSE, 0); /* connect everything */ ags_connectable_connect(AGS_CONNECTABLE(ladspa_bridge)); /* */ ladspa_bridge->machine.audio->audio_channels = 2; /* */ ags_audio_set_pads(ladspa_bridge->machine.audio, AGS_TYPE_INPUT, 1); ags_audio_set_pads(ladspa_bridge->machine.audio, AGS_TYPE_OUTPUT, 1); /* */ ags_ladspa_bridge_load(ladspa_bridge); /* */ gtk_widget_show_all(GTK_WIDGET(ladspa_bridge)); } void ags_menu_action_add_dssi_bridge_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsDssiBridge *dssi_bridge; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; gchar *filename, *effect; pthread_mutex_t *application_mutex; filename = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_FILENAME_KEY); effect = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_EFFECT_KEY); application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); dssi_bridge = ags_dssi_bridge_new(G_OBJECT(window->soundcard), filename, effect); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(dssi_bridge)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(dssi_bridge), FALSE, FALSE, 0); /* connect everything */ ags_connectable_connect(AGS_CONNECTABLE(dssi_bridge)); /* */ dssi_bridge->machine.audio->audio_channels = 2; /* */ ags_audio_set_pads(dssi_bridge->machine.audio, AGS_TYPE_INPUT, 128); ags_audio_set_pads(dssi_bridge->machine.audio, AGS_TYPE_OUTPUT, 1); /* */ ags_dssi_bridge_load(dssi_bridge); /* */ gtk_widget_show_all(GTK_WIDGET(dssi_bridge)); } void ags_menu_action_add_lv2_bridge_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsLv2Bridge *lv2_bridge; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsLv2Plugin *lv2_plugin; gchar *filename, *effect; pthread_mutex_t *application_mutex; filename = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_FILENAME_KEY); effect = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_EFFECT_KEY); application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); lv2_bridge = ags_lv2_bridge_new(G_OBJECT(window->soundcard), filename, effect); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); if(lv2_plugin != NULL && (AGS_LV2_PLUGIN_IS_SYNTHESIZER & (lv2_plugin->flags)) != 0){ AGS_MACHINE(lv2_bridge)->audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING | AGS_AUDIO_SYNC | AGS_AUDIO_ASYNC | AGS_AUDIO_HAS_NOTATION | AGS_AUDIO_NOTATION_DEFAULT | AGS_AUDIO_REVERSE_MAPPING); g_object_set(AGS_MACHINE(lv2_bridge)->audio, "audio-start-mapping", 0, "audio-end-mapping", 128, "midi-start-mapping", 0, "midi-end-mapping", 128, NULL); AGS_MACHINE(lv2_bridge)->flags |= (AGS_MACHINE_IS_SYNTHESIZER | AGS_MACHINE_REVERSE_NOTATION); ags_machine_popup_add_connection_options((AgsMachine *) lv2_bridge, (AGS_MACHINE_POPUP_MIDI_DIALOG)); ags_machine_popup_add_edit_options((AgsMachine *) lv2_bridge, (AGS_MACHINE_POPUP_ENVELOPE)); } /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(lv2_bridge)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(lv2_bridge), FALSE, FALSE, 0); /* connect everything */ ags_connectable_connect(AGS_CONNECTABLE(lv2_bridge)); /* */ lv2_bridge->machine.audio->audio_channels = 2; /* */ if(lv2_plugin != NULL){ if((AGS_LV2_PLUGIN_IS_SYNTHESIZER & (lv2_plugin->flags)) == 0){ ags_audio_set_pads(lv2_bridge->machine.audio, AGS_TYPE_INPUT, 1); }else{ ags_audio_set_pads(lv2_bridge->machine.audio, AGS_TYPE_INPUT, 128); } } ags_audio_set_pads(lv2_bridge->machine.audio, AGS_TYPE_OUTPUT, 1); /* */ ags_lv2_bridge_load(lv2_bridge); /* */ gtk_widget_show_all(GTK_WIDGET(lv2_bridge)); } void ags_menu_action_add_live_dssi_bridge_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsLiveDssiBridge *live_dssi_bridge; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; gchar *filename, *effect; pthread_mutex_t *application_mutex; filename = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_FILENAME_KEY); effect = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_EFFECT_KEY); application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); live_dssi_bridge = ags_live_dssi_bridge_new(G_OBJECT(window->soundcard), filename, effect); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(live_dssi_bridge)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(live_dssi_bridge), FALSE, FALSE, 0); /* connect everything */ ags_connectable_connect(AGS_CONNECTABLE(live_dssi_bridge)); /* */ live_dssi_bridge->machine.audio->audio_channels = 2; /* */ ags_audio_set_pads(live_dssi_bridge->machine.audio, AGS_TYPE_INPUT, 128); ags_audio_set_pads(live_dssi_bridge->machine.audio, AGS_TYPE_OUTPUT, 1); /* */ ags_live_dssi_bridge_load(live_dssi_bridge); /* */ gtk_widget_show_all(GTK_WIDGET(live_dssi_bridge)); } void ags_menu_action_add_live_lv2_bridge_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; AgsLiveLv2Bridge *live_lv2_bridge; AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsLv2Plugin *lv2_plugin; gchar *filename, *effect; pthread_mutex_t *application_mutex; filename = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_FILENAME_KEY); effect = g_object_get_data((GObject *) menu_item, AGS_MENU_ITEM_EFFECT_KEY); application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); live_lv2_bridge = ags_live_lv2_bridge_new(G_OBJECT(window->soundcard), filename, effect); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); add_audio = ags_add_audio_new(window->soundcard, AGS_MACHINE(live_lv2_bridge)->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(live_lv2_bridge), FALSE, FALSE, 0); /* connect everything */ ags_connectable_connect(AGS_CONNECTABLE(live_lv2_bridge)); /* */ live_lv2_bridge->machine.audio->audio_channels = 2; /* */ if(lv2_plugin != NULL){ if((AGS_LV2_PLUGIN_IS_SYNTHESIZER & (lv2_plugin->flags)) == 0){ ags_audio_set_pads(live_lv2_bridge->machine.audio, AGS_TYPE_INPUT, 1); }else{ ags_audio_set_pads(live_lv2_bridge->machine.audio, AGS_TYPE_INPUT, 128); } } ags_audio_set_pads(live_lv2_bridge->machine.audio, AGS_TYPE_OUTPUT, 1); /* */ ags_live_lv2_bridge_load(live_lv2_bridge); /* */ gtk_widget_show_all(GTK_WIDGET(live_lv2_bridge)); } void ags_menu_action_automation_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); gtk_widget_show_all((GtkWidget *) window->automation_window); } void ags_menu_action_wave_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); gtk_widget_show_all((GtkWidget *) window->wave_window); } void ags_menu_action_preferences_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); if(window->preferences != NULL){ return; } window->preferences = ags_preferences_new(); window->preferences->window = GTK_WINDOW(window); ags_connectable_connect(AGS_CONNECTABLE(window->preferences)); ags_applicable_reset(AGS_APPLICABLE(window->preferences)); gtk_widget_show_all(GTK_WIDGET(window->preferences)); } void ags_menu_action_midi_import_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); if(window->midi_import_wizard != NULL){ return; } window->midi_import_wizard = ags_midi_import_wizard_new(); g_object_set(window->midi_import_wizard, "application-context", application_context, "main-window", window, NULL); ags_connectable_connect(AGS_CONNECTABLE(window->midi_import_wizard)); ags_applicable_reset(AGS_APPLICABLE(window->midi_import_wizard)); gtk_widget_show_all(GTK_WIDGET(window->midi_import_wizard)); } void ags_menu_action_midi_export_track_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); if(window->midi_export_wizard != NULL){ return; } window->midi_export_wizard = ags_midi_export_wizard_new(); g_object_set(window->midi_export_wizard, "application-context", application_context, "main-window", window, NULL); ags_connectable_connect(AGS_CONNECTABLE(window->midi_export_wizard)); ags_applicable_reset(AGS_APPLICABLE(window->midi_export_wizard)); gtk_widget_show_all(GTK_WIDGET(window->midi_export_wizard)); } void ags_menu_action_midi_playback_callback(GtkWidget *menu_item, gpointer data) { //TODO:JK: implement me } void ags_menu_action_about_callback(GtkWidget *menu_item, gpointer data) { AgsApplicationContext *application_context; AgsWindow *window; static FILE *file = NULL; struct stat sb; static gchar *license; static GdkPixbuf *logo = NULL; gchar *license_filename; gchar *logo_filename; gchar *str; int n_read; GError *error; gchar *authors[] = { "Joël Krähemann", NULL }; #ifdef AGS_LICENSE_FILENAME license_filename = AGS_LICENSE_FILENAME; #else if((license_filename = getenv("AGS_LICENSE_FILENAME")) == NULL){ license_filename = "/usr/share/common-licenses/GPL-3"; } #endif if(g_file_test(license_filename, G_FILE_TEST_EXISTS)){ if(file == NULL){ file = fopen(license_filename, "r"); stat(license_filename, &sb); license = (gchar *) malloc((sb.st_size + 1) * sizeof(gchar)); n_read = fread(license, sizeof(char), sb.st_size, file); if(n_read != sb.st_size){ g_critical("fread() number of bytes returned doesn't match buffer size"); } license[sb.st_size] = '\0'; fclose(file); #ifdef AGS_LOGO_FILENAME logo_filename = g_strdup(AGS_LOGO_FILENAME); #else if((logo_filename = getenv("AGS_LOGO_FILENAME")) == NULL){ logo_filename = g_strdup_printf("%s%s", DESTDIR, "/gsequencer/images/ags.png"); }else{ logo_filename = g_strdup(logo_filename); } #endif error = NULL; logo = gdk_pixbuf_new_from_file(logo_filename, &error); //g_free(logo_filename); } } application_context = ags_application_context_get_instance(); window = ags_ui_provider_get_window(AGS_UI_PROVIDER(application_context)); gtk_show_about_dialog((GtkWindow *) window, "program-name", "gsequencer", "authors", authors, "license", license, "version", AGS_VERSION, "website", "http://nongnu.org/gsequencer", "title", "Advanced Gtk+ Sequencer", "logo", logo, NULL); } gsequencer-1.4.24/ags/X/ags_effect_bulk.h0000644000175000017500000001025213247044247015130 00000000000000/* 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 . */ #ifndef __AGS_EFFECT_BULK_H__ #define __AGS_EFFECT_BULK_H__ #include #include #include #include #include #include #define AGS_TYPE_EFFECT_BULK (ags_effect_bulk_get_type()) #define AGS_EFFECT_BULK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EFFECT_BULK, AgsEffectBulk)) #define AGS_EFFECT_BULK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EFFECT_BULK, AgsEffectBulkClass)) #define AGS_IS_EFFECT_BULK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_EFFECT_BULK)) #define AGS_IS_EFFECT_BULK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_EFFECT_BULK)) #define AGS_EFFECT_BULK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_EFFECT_BULK, AgsEffectBulkClass)) #define AGS_EFFECT_BULK_PLUGIN(ptr) ((AgsEffectBulkPlugin *)(ptr)) #define AGS_EFFECT_BULK_DEFAULT_VERSION "0.7.8" #define AGS_EFFECT_BULK_DEFAULT_BUILD_ID "CEST 01-03-2016 00:23" #define AGS_EFFECT_BULK_COLUMNS_COUNT (4) typedef struct _AgsEffectBulk AgsEffectBulk; typedef struct _AgsEffectBulkClass AgsEffectBulkClass; typedef struct _AgsEffectBulkPlugin AgsEffectBulkPlugin; typedef enum{ AGS_EFFECT_BULK_MAPPED_RECALL = 1, AGS_EFFECT_BULK_PREMAPPED_RECALL = 1 << 1, AGS_EFFECT_BULK_CONNECTED = 1 << 2, AGS_EFFECT_BULK_HIDE_BUTTONS = 1 << 3, AGS_EFFECT_BULK_HIDE_ENTRIES = 1 << 4, AGS_EFFECT_BULK_SHOW_LABELS = 1 << 5, }AgsEffectBulkFlags; struct _AgsEffectBulk { GtkVBox vbox; guint flags; gchar *name; gchar *version; gchar *build_id; GType channel_type; AgsAudio *audio; GtkButton *add; GtkButton *remove; GtkVBox *bulk_member; GtkTable *table; GList *plugin; GtkDialog *plugin_browser; GList *queued_drawing; }; struct _AgsEffectBulkClass { GtkVBoxClass vbox; GList* (*add_effect)(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect); void (*remove_effect)(AgsEffectBulk *effect_bulk, guint nth); void (*resize_audio_channels)(AgsEffectBulk *effect_bulk, guint new_size, guint old_size); void (*resize_pads)(AgsEffectBulk *effect_bulk, guint new_size, guint old_size); void (*map_recall)(AgsEffectBulk *effect_bulk); GList* (*find_port)(AgsEffectBulk *effect_bulk); }; struct _AgsEffectBulkPlugin { gchar *filename; gchar *effect; GList *control_type_name; }; GType ags_effect_bulk_get_type(void); AgsEffectBulkPlugin* ags_effect_bulk_plugin_alloc(gchar *filename, gchar *effect); void ags_effect_bulk_plugin_free(AgsEffectBulkPlugin *effect_bulk_plugin); GList* ags_effect_bulk_add_effect(AgsEffectBulk *effect_bulk, GList *control_type_name, gchar *filename, gchar *effect); void ags_effect_bulk_remove_effect(AgsEffectBulk *effect_bulk, guint nth); void ags_effect_bulk_resize_audio_channels(AgsEffectBulk *effect_bulk, guint new_size, guint old_size); void ags_effect_bulk_resize_pads(AgsEffectBulk *effect_bulk, guint new_size, guint old_size); void ags_effect_bulk_map_recall(AgsEffectBulk *effect_bulk); GList* ags_effect_bulk_find_port(AgsEffectBulk *effect_bulk); gboolean ags_effect_bulk_indicator_queue_draw_timeout(GtkWidget *widget); AgsEffectBulk* ags_effect_bulk_new(AgsAudio *audio, GType channel_type); #endif /*__AGS_EFFECT_BULK_H__*/ gsequencer-1.4.24/ags/X/ags_midi_preferences.h0000644000175000017500000000411613246707333016165 00000000000000/* 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 . */ #ifndef __AGS_MIDI_PREFERENCES_H__ #define __AGS_MIDI_PREFERENCES_H__ #include #include #include #define AGS_TYPE_MIDI_PREFERENCES (ags_midi_preferences_get_type()) #define AGS_MIDI_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIDI_PREFERENCES, AgsMidiPreferences)) #define AGS_MIDI_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MIDI_PREFERENCES, AgsMidiPreferencesClass)) #define AGS_IS_MIDI_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MIDI_PREFERENCES)) #define AGS_IS_MIDI_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MIDI_PREFERENCES)) #define AGS_MIDI_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MIDI_PREFERENCES, AgsMidiPreferencesClass)) typedef struct _AgsMidiPreferences AgsMidiPreferences; typedef struct _AgsMidiPreferencesClass AgsMidiPreferencesClass; typedef enum{ AGS_MIDI_PREFERENCES_CONNECTED = 1, }AgsMidiPreferencesFlags; struct _AgsMidiPreferences { GtkVBox vbox; guint flags; GtkVBox *sequencer_editor; GtkButton *add; }; struct _AgsMidiPreferencesClass { GtkVBoxClass vbox; }; GType ags_midi_preferences_get_type(void); AgsMidiPreferences* ags_midi_preferences_new(); #endif /*__AGS_MIDI_PREFERENCES_H__*/ gsequencer-1.4.24/ags/X/ags_xorg_application_context.c0000644000175000017500000017545213256163135017774 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef __APPLE__ #include #endif #ifdef AGS_WITH_QUARTZ #include #endif #include #include #include #include #include void ags_xorg_application_context_signal_handler(int signr); static void ags_xorg_application_context_signal_cleanup(); void ags_xorg_application_context_class_init(AgsXorgApplicationContextClass *xorg_application_context); void ags_xorg_application_context_connectable_interface_init(AgsConnectableInterface *connectable); void ags_xorg_application_context_concurrency_provider_interface_init(AgsConcurrencyProviderInterface *concurrency_provider); void ags_xorg_application_context_sound_provider_interface_init(AgsSoundProviderInterface *sound_provider); void ags_xorg_application_context_ui_provider_interface_init(AgsUiProviderInterface *ui_provider); void ags_xorg_application_context_init(AgsXorgApplicationContext *xorg_application_context); void ags_xorg_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_xorg_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_xorg_application_context_connect(AgsConnectable *connectable); void ags_xorg_application_context_disconnect(AgsConnectable *connectable); AgsThread* ags_xorg_application_context_get_main_loop(AgsConcurrencyProvider *concurrency_provider); AgsThread* ags_xorg_application_context_get_task_thread(AgsConcurrencyProvider *concurrency_provider); AgsThreadPool* ags_xorg_application_context_get_thread_pool(AgsConcurrencyProvider *concurrency_provider); GList* ags_xorg_application_context_get_worker(AgsConcurrencyProvider *concurrency_provider); void ags_xorg_application_context_set_worker(AgsConcurrencyProvider *concurrency_provider, GList *worker); GList* ags_xorg_application_context_get_soundcard(AgsSoundProvider *sound_provider); void ags_xorg_application_context_set_soundcard(AgsSoundProvider *sound_provider, GList *soundcard); GObject* ags_xorg_application_context_get_default_soundcard_thread(AgsSoundProvider *sound_provider); void ags_xorg_application_context_set_default_soundcard_thread(AgsSoundProvider *sound_provider, GObject *soundcard_thread); GList* ags_xorg_application_context_get_sequencer(AgsSoundProvider *sound_provider); void ags_xorg_application_context_set_sequencer(AgsSoundProvider *sound_provider, GList *sequencer); GList* ags_xorg_application_context_get_distributed_manager(AgsSoundProvider *sound_provider); GtkWidget* ags_xorg_application_context_get_window(AgsUiProvider *ui_provider); void ags_xorg_application_context_set_window(AgsUiProvider *ui_provider, GtkWidget *widget); AgsThread* ags_xorg_application_context_get_gui_thread(AgsUiProvider *ui_provider); void ags_xorg_application_context_set_gui_thread(AgsUiProvider *ui_provider, AgsThread *gui_thread); gboolean ags_xorg_application_context_get_show_animation(AgsUiProvider *ui_provider); void ags_xorg_application_context_set_show_animation(AgsUiProvider *ui_provider, gboolean do_show_animation); gboolean ags_xorg_application_context_get_gui_ready(AgsUiProvider *ui_provider); void ags_xorg_application_context_set_gui_ready(AgsUiProvider *ui_provider, gboolean is_gui_ready); void ags_xorg_application_context_dispose(GObject *gobject); void ags_xorg_application_context_finalize(GObject *gobject); void ags_xorg_application_context_load_config(AgsApplicationContext *application_context); void ags_xorg_application_context_prepare(AgsApplicationContext *application_context); void ags_xorg_application_context_setup(AgsApplicationContext *application_context); void ags_xorg_application_context_register_types(AgsApplicationContext *application_context); void ags_xorg_application_context_read(AgsFile *file, xmlNode *node, GObject **application_context); xmlNode* ags_xorg_application_context_write(AgsFile *file, xmlNode *parent, GObject *application_context); void ags_xorg_application_context_quit(AgsApplicationContext *application_context); void ags_xorg_application_context_launch(AgsFileLaunch *launch, AgsXorgApplicationContext *application_context); void ags_xorg_application_context_clear_cache(AgsTaskThread *task_thread, gpointer data); /** * SECTION:ags_xorg_application_context * @short_description: The xorg application context * @title: AgsXorgApplicationContext * @section_id: * @include: ags/X/ags_xorg_application_context.h * * #AgsXorgApplicationContext is a application context providing * the main window and sets up a functional audio layer. */ enum{ PROP_0, PROP_WINDOW, }; static gpointer ags_xorg_application_context_parent_class = NULL; static AgsConnectableInterface* ags_xorg_application_context_parent_connectable_interface; AgsXorgApplicationContext *ags_xorg_application_context; volatile gboolean ags_show_start_animation; extern AgsApplicationContext *ags_application_context; //TODO:JK: implement get functions #ifndef AGS_USE_TIMER static sigset_t ags_wait_mask; struct sigaction ags_sigact; #else static sigset_t ags_timer_mask; struct sigaction ags_sigact_timer; struct sigevent ags_sev_timer; struct itimerspec its; #endif GType ags_xorg_application_context_get_type() { static GType ags_type_xorg_application_context = 0; if(!ags_type_xorg_application_context){ static const GTypeInfo ags_xorg_application_context_info = { sizeof (AgsXorgApplicationContextClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_xorg_application_context_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsXorgApplicationContext), 0, /* n_preallocs */ (GInstanceInitFunc) ags_xorg_application_context_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_xorg_application_context_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_concurrency_provider_interface_info = { (GInterfaceInitFunc) ags_xorg_application_context_concurrency_provider_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_sound_provider_interface_info = { (GInterfaceInitFunc) ags_xorg_application_context_sound_provider_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_ui_provider_interface_info = { (GInterfaceInitFunc) ags_xorg_application_context_ui_provider_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_xorg_application_context = g_type_register_static(AGS_TYPE_APPLICATION_CONTEXT, "AgsXorgApplicationContext", &ags_xorg_application_context_info, 0); g_type_add_interface_static(ags_type_xorg_application_context, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_xorg_application_context, AGS_TYPE_CONCURRENCY_PROVIDER, &ags_concurrency_provider_interface_info); g_type_add_interface_static(ags_type_xorg_application_context, AGS_TYPE_SOUND_PROVIDER, &ags_sound_provider_interface_info); g_type_add_interface_static(ags_type_xorg_application_context, AGS_TYPE_UI_PROVIDER, &ags_ui_provider_interface_info); } return (ags_type_xorg_application_context); } #ifndef AGS_USE_TIMER void ags_xorg_application_context_signal_handler(int signr) { if(signr == SIGINT){ //TODO:JK: do backup exit(-1); }else{ sigemptyset(&(ags_sigact.sa_mask)); // if(signr == AGS_ASYNC_QUEUE_SIGNAL_HIGH){ // pthread_yield(); // } } } static void ags_xorg_application_context_signal_cleanup() { sigemptyset(&(ags_sigact.sa_mask)); } #endif #ifdef AGS_USE_TIMER void ags_xorg_application_context_signal_handler_timer(int sig, siginfo_t *si, void *uc) { pthread_mutex_lock(AGS_THREAD(ags_application_context->main_loop)->timer_mutex); g_atomic_int_set(&(AGS_THREAD(ags_application_context->main_loop)->timer_expired), TRUE); if(AGS_THREAD(ags_application_context->main_loop)->timer_wait){ pthread_cond_signal(AGS_THREAD(ags_application_context->main_loop)->timer_cond); } pthread_mutex_unlock(AGS_THREAD(ags_application_context->main_loop)->timer_mutex); // signal(sig, SIG_IGN); } #endif void ags_xorg_application_context_class_init(AgsXorgApplicationContextClass *xorg_application_context) { GObjectClass *gobject; AgsApplicationContextClass *application_context; GParamSpec *param_spec; ags_xorg_application_context_parent_class = g_type_class_peek_parent(xorg_application_context); /* GObjectClass */ gobject = (GObjectClass *) xorg_application_context; gobject->set_property = ags_xorg_application_context_set_property; gobject->get_property = ags_xorg_application_context_get_property; gobject->dispose = ags_xorg_application_context_dispose; gobject->finalize = ags_xorg_application_context_finalize; /* properties */ /** * AgsXorgApplicationContext:window: * * The assigned window. * * Since: 1.0.0 */ param_spec = g_param_spec_object("window", i18n_pspec("window of xorg application context"), i18n_pspec("The window which this xorg application context assigned to"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_WINDOW, param_spec); /* AgsXorgApplicationContextClass */ application_context = (AgsApplicationContextClass *) xorg_application_context; application_context->load_config = ags_xorg_application_context_load_config; application_context->prepare = ags_xorg_application_context_prepare; application_context->setup = ags_xorg_application_context_setup; application_context->register_types = ags_xorg_application_context_register_types; application_context->quit = ags_xorg_application_context_quit; application_context->write = ags_xorg_application_context_write; application_context->read = ags_xorg_application_context_read; } void ags_xorg_application_context_connectable_interface_init(AgsConnectableInterface *connectable) { ags_xorg_application_context_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_xorg_application_context_connect; connectable->disconnect = ags_xorg_application_context_disconnect; } void ags_xorg_application_context_concurrency_provider_interface_init(AgsConcurrencyProviderInterface *concurrency_provider) { concurrency_provider->get_main_loop = ags_xorg_application_context_get_main_loop; concurrency_provider->get_task_thread = ags_xorg_application_context_get_task_thread; concurrency_provider->get_thread_pool = ags_xorg_application_context_get_thread_pool; concurrency_provider->get_worker = ags_xorg_application_context_get_worker; concurrency_provider->set_worker = ags_xorg_application_context_set_worker; } void ags_xorg_application_context_sound_provider_interface_init(AgsSoundProviderInterface *sound_provider) { sound_provider->get_soundcard = ags_xorg_application_context_get_soundcard; sound_provider->set_soundcard = ags_xorg_application_context_set_soundcard; sound_provider->get_default_soundcard_thread = ags_xorg_application_context_get_default_soundcard_thread; sound_provider->set_default_soundcard_thread = ags_xorg_application_context_set_default_soundcard_thread; sound_provider->get_sequencer = ags_xorg_application_context_get_sequencer; sound_provider->set_sequencer = ags_xorg_application_context_set_sequencer; sound_provider->get_distributed_manager = ags_xorg_application_context_get_distributed_manager; } void ags_xorg_application_context_ui_provider_interface_init(AgsUiProviderInterface *ui_provider) { ui_provider->get_window = ags_xorg_application_context_get_window; ui_provider->set_window = ags_xorg_application_context_set_window; ui_provider->get_gui_thread = ags_xorg_application_context_get_gui_thread; ui_provider->set_gui_thread = ags_xorg_application_context_set_gui_thread; ui_provider->get_show_animation = ags_xorg_application_context_get_show_animation; ui_provider->set_show_animation = ags_xorg_application_context_set_show_animation; ui_provider->get_gui_ready = ags_xorg_application_context_get_gui_ready; ui_provider->set_gui_ready = ags_xorg_application_context_set_gui_ready; } void ags_xorg_application_context_init(AgsXorgApplicationContext *xorg_application_context) { AgsConfig *config; if(ags_application_context == NULL){ ags_application_context = xorg_application_context; } /* fundamental instances */ config = ags_config_get_instance(); AGS_APPLICATION_CONTEXT(xorg_application_context)->config = config; g_object_ref(config); g_object_set(config, "application-context", xorg_application_context, NULL); AGS_APPLICATION_CONTEXT(xorg_application_context)->log = ags_log_get_instance(); g_object_ref(AGS_APPLICATION_CONTEXT(xorg_application_context)->log); /* Xorg application context */ g_atomic_int_set(&(xorg_application_context->gui_ready), FALSE); g_atomic_int_set(&(xorg_application_context->show_animation), TRUE); g_atomic_int_set(&(xorg_application_context->file_ready), FALSE); xorg_application_context->thread_pool = NULL; xorg_application_context->polling_thread = NULL; xorg_application_context->worker = NULL; xorg_application_context->soundcard_thread = NULL; xorg_application_context->export_thread = NULL; xorg_application_context->gui_thread = NULL; xorg_application_context->autosave_thread = NULL; xorg_application_context->server = NULL; xorg_application_context->soundcard = NULL; xorg_application_context->sequencer = NULL; xorg_application_context->distributed_manager = NULL; xorg_application_context->window = NULL; } void ags_xorg_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsXorgApplicationContext *xorg_application_context; xorg_application_context = AGS_XORG_APPLICATION_CONTEXT(gobject); switch(prop_id){ case PROP_WINDOW: { AgsWindow *window; window = (AgsWindow *) g_value_get_object(value); if(window == xorg_application_context->window){ return; } if(xorg_application_context->window != NULL){ g_object_unref(xorg_application_context->window); } if(window != NULL){ g_object_ref(G_OBJECT(window)); } xorg_application_context->window = window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_xorg_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsXorgApplicationContext *xorg_application_context; xorg_application_context = AGS_XORG_APPLICATION_CONTEXT(gobject); switch(prop_id){ case PROP_WINDOW: { g_value_set_object(value, xorg_application_context->window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_xorg_application_context_connect(AgsConnectable *connectable) { AgsXorgApplicationContext *xorg_application_context; GList *soundcard, *sequencer; xorg_application_context = AGS_XORG_APPLICATION_CONTEXT(connectable); if((AGS_APPLICATION_CONTEXT_CONNECTED & (AGS_APPLICATION_CONTEXT(xorg_application_context)->flags)) != 0){ return; } ags_xorg_application_context_parent_connectable_interface->connect(connectable); /* soundcard */ soundcard = xorg_application_context->soundcard; while(soundcard != NULL){ ags_connectable_connect(AGS_CONNECTABLE(soundcard->data)); soundcard = soundcard->next; } /* sequencer */ sequencer = xorg_application_context->sequencer; while(sequencer != NULL){ ags_connectable_connect(AGS_CONNECTABLE(sequencer->data)); sequencer = sequencer->next; } ags_connectable_connect(AGS_CONNECTABLE(xorg_application_context->window)); } void ags_xorg_application_context_disconnect(AgsConnectable *connectable) { AgsXorgApplicationContext *xorg_application_context; xorg_application_context = AGS_XORG_APPLICATION_CONTEXT(connectable); if((AGS_APPLICATION_CONTEXT_CONNECTED & (AGS_APPLICATION_CONTEXT(xorg_application_context)->flags)) == 0){ return; } ags_xorg_application_context_parent_connectable_interface->disconnect(connectable); } AgsThread* ags_xorg_application_context_get_main_loop(AgsConcurrencyProvider *concurrency_provider) { return((AgsThread *) AGS_APPLICATION_CONTEXT(concurrency_provider)->main_loop); } AgsThread* ags_xorg_application_context_get_task_thread(AgsConcurrencyProvider *concurrency_provider) { return((AgsThread *) AGS_APPLICATION_CONTEXT(concurrency_provider)->task_thread); } AgsThreadPool* ags_xorg_application_context_get_thread_pool(AgsConcurrencyProvider *concurrency_provider) { return(AGS_XORG_APPLICATION_CONTEXT(concurrency_provider)->thread_pool); } GList* ags_xorg_application_context_get_worker(AgsConcurrencyProvider *concurrency_provider) { return(AGS_XORG_APPLICATION_CONTEXT(concurrency_provider)->worker); } void ags_xorg_application_context_set_worker(AgsConcurrencyProvider *concurrency_provider, GList *worker) { AGS_XORG_APPLICATION_CONTEXT(concurrency_provider)->worker = worker; } GList* ags_xorg_application_context_get_soundcard(AgsSoundProvider *sound_provider) { return(AGS_XORG_APPLICATION_CONTEXT(sound_provider)->soundcard); } void ags_xorg_application_context_set_soundcard(AgsSoundProvider *sound_provider, GList *soundcard) { AGS_XORG_APPLICATION_CONTEXT(sound_provider)->soundcard = soundcard; } GObject* ags_xorg_application_context_get_default_soundcard_thread(AgsSoundProvider *sound_provider) { return((GObject *) AGS_XORG_APPLICATION_CONTEXT(sound_provider)->soundcard_thread); } void ags_xorg_application_context_set_default_soundcard_thread(AgsSoundProvider *sound_provider, GObject *soundcard_thread) { AGS_XORG_APPLICATION_CONTEXT(sound_provider)->soundcard_thread = (AgsThread *) soundcard_thread; } GList* ags_xorg_application_context_get_sequencer(AgsSoundProvider *sound_provider) { return(AGS_XORG_APPLICATION_CONTEXT(sound_provider)->sequencer); } void ags_xorg_application_context_set_sequencer(AgsSoundProvider *sound_provider, GList *sequencer) { AGS_XORG_APPLICATION_CONTEXT(sound_provider)->sequencer = sequencer; } GList* ags_xorg_application_context_get_distributed_manager(AgsSoundProvider *sound_provider) { return(AGS_XORG_APPLICATION_CONTEXT(sound_provider)->distributed_manager); } void ags_xorg_application_context_dispose(GObject *gobject) { AgsXorgApplicationContext *xorg_application_context; GList *list; xorg_application_context = AGS_XORG_APPLICATION_CONTEXT(gobject); /* thread pool */ if(xorg_application_context->thread_pool != NULL){ g_object_unref(xorg_application_context->thread_pool); xorg_application_context->thread_pool = NULL; } /* polling thread */ if(xorg_application_context->polling_thread != NULL){ g_object_unref(xorg_application_context->polling_thread); xorg_application_context->polling_thread = NULL; } /* worker thread */ if(xorg_application_context->worker != NULL){ list = xorg_application_context->worker; while(list != NULL){ g_object_run_dispose(list->data); list = list->next; } g_list_free_full(xorg_application_context->worker, g_object_unref); xorg_application_context->worker = NULL; } /* soundcard and export thread */ if(xorg_application_context->soundcard_thread != NULL){ g_object_unref(xorg_application_context->soundcard_thread); xorg_application_context->soundcard_thread = NULL; } if(xorg_application_context->export_thread != NULL){ g_object_unref(xorg_application_context->export_thread); xorg_application_context->export_thread = NULL; } /* server */ if(xorg_application_context->server != NULL){ g_object_set(xorg_application_context->server, "application-context", NULL, NULL); g_object_unref(xorg_application_context->server); xorg_application_context->server = NULL; } /* soundcard and sequencer */ if(xorg_application_context->soundcard != NULL){ list = xorg_application_context->soundcard; while(list != NULL){ g_object_set(list->data, "application-context", NULL, NULL); list = list->next; } g_list_free_full(xorg_application_context->soundcard, g_object_unref); xorg_application_context->soundcard = NULL; } if(xorg_application_context->sequencer != NULL){ list = xorg_application_context->sequencer; while(list != NULL){ g_object_set(list->data, "application-context", NULL, NULL); list = list->next; } g_list_free_full(xorg_application_context->sequencer, g_object_unref); xorg_application_context->sequencer = NULL; } /* distributed manager */ if(xorg_application_context->distributed_manager != NULL){ list = xorg_application_context->distributed_manager; while(list != NULL){ g_object_set(list->data, "application-context", NULL, NULL); list = list->next; } g_list_free_full(xorg_application_context->distributed_manager, g_object_unref); xorg_application_context->distributed_manager = NULL; } /* window */ if(xorg_application_context->window != NULL){ g_object_set(xorg_application_context->window, "application-context", NULL, NULL); gtk_widget_destroy(xorg_application_context->window); xorg_application_context->window = NULL; } /* call parent */ G_OBJECT_CLASS(ags_xorg_application_context_parent_class)->dispose(gobject); } void ags_xorg_application_context_finalize(GObject *gobject) { AgsXorgApplicationContext *xorg_application_context; xorg_application_context = AGS_XORG_APPLICATION_CONTEXT(gobject); if(xorg_application_context->thread_pool != NULL){ g_object_unref(xorg_application_context->thread_pool); } if(xorg_application_context->polling_thread != NULL){ g_object_unref(xorg_application_context->polling_thread); } if(xorg_application_context->worker != NULL){ g_list_free_full(xorg_application_context->worker, g_object_unref); xorg_application_context->worker = NULL; } if(xorg_application_context->soundcard_thread != NULL){ g_object_unref(xorg_application_context->soundcard_thread); } if(xorg_application_context->export_thread != NULL){ g_object_unref(xorg_application_context->export_thread); } if(xorg_application_context->server != NULL){ g_object_unref(xorg_application_context->server); } if(xorg_application_context->soundcard != NULL){ g_list_free_full(xorg_application_context->soundcard, g_object_unref); } if(xorg_application_context->sequencer != NULL){ g_list_free_full(xorg_application_context->sequencer, g_object_unref); } if(xorg_application_context->distributed_manager != NULL){ g_list_free_full(xorg_application_context->distributed_manager, g_object_unref); } if(xorg_application_context->window != NULL){ gtk_widget_destroy(xorg_application_context->window); } /* call parent */ G_OBJECT_CLASS(ags_xorg_application_context_parent_class)->finalize(gobject); } GtkWidget* ags_xorg_application_context_get_window(AgsUiProvider *ui_provider) { return(AGS_XORG_APPLICATION_CONTEXT(ui_provider)->window); } void ags_xorg_application_context_set_window(AgsUiProvider *ui_provider, GtkWidget *widget) { AGS_XORG_APPLICATION_CONTEXT(ui_provider)->window = widget; } AgsThread* ags_xorg_application_context_get_gui_thread(AgsUiProvider *ui_provider) { return(AGS_XORG_APPLICATION_CONTEXT(ui_provider)->gui_thread); } void ags_xorg_application_context_set_gui_thread(AgsUiProvider *ui_provider, AgsThread *gui_thread) { AGS_XORG_APPLICATION_CONTEXT(ui_provider)->gui_thread = gui_thread; } gboolean ags_xorg_application_context_get_show_animation(AgsUiProvider *ui_provider) { return(g_atomic_int_get(&(AGS_XORG_APPLICATION_CONTEXT(ui_provider)->show_animation))); } void ags_xorg_application_context_set_show_animation(AgsUiProvider *ui_provider, gboolean do_show_animation) { g_atomic_int_set(&(AGS_XORG_APPLICATION_CONTEXT(ui_provider)->show_animation), do_show_animation); } gboolean ags_xorg_application_context_get_gui_ready(AgsUiProvider *ui_provider) { return(g_atomic_int_get(&(AGS_XORG_APPLICATION_CONTEXT(ui_provider)->gui_ready))); } void ags_xorg_application_context_set_gui_ready(AgsUiProvider *ui_provider, gboolean is_gui_ready) { g_atomic_int_set(&(AGS_XORG_APPLICATION_CONTEXT(ui_provider)->gui_ready), is_gui_ready); } void ags_xorg_application_context_load_config(AgsApplicationContext *application_context) { //TODO:JK: implement me } void ags_xorg_application_context_prepare(AgsApplicationContext *application_context) { AgsXorgApplicationContext *xorg_application_context; AgsWindow *window; AgsThread *audio_loop, *polling_thread, *task_thread; AgsThread *gui_thread; AgsThreadPool *thread_pool; GList *start_queue; xorg_application_context = (AgsXorgApplicationContext *) application_context; #ifdef AGS_WITH_QUARTZ g_object_new(GTKOSX_TYPE_APPLICATION, NULL); #endif window = g_object_new(AGS_TYPE_WINDOW, "app-paintable", TRUE, "type", GTK_WINDOW_TOPLEVEL, "application-context", application_context, NULL); /* call parent */ AGS_APPLICATION_CONTEXT_CLASS(ags_xorg_application_context_parent_class)->prepare(application_context); /* register types */ ags_application_context_register_types(xorg_application_context); /* * fundamental thread setup */ /* AgsAudioLoop */ audio_loop = application_context->main_loop = ags_audio_loop_new((GObject *) NULL, (GObject *) xorg_application_context); g_object_set(xorg_application_context, "main-loop", audio_loop, NULL); g_object_ref(audio_loop); ags_connectable_connect(AGS_CONNECTABLE(audio_loop)); /* AgsPollingThread */ polling_thread = xorg_application_context->polling_thread = ags_polling_thread_new(); ags_thread_add_child_extended(AGS_THREAD(audio_loop), (AgsThread *) polling_thread, TRUE, TRUE); /* AgsTaskThread */ task_thread = application_context->task_thread = (GObject *) ags_task_thread_new(); thread_pool = AGS_TASK_THREAD(task_thread)->thread_pool; ags_main_loop_set_async_queue(AGS_MAIN_LOOP(audio_loop), task_thread); ags_thread_add_child_extended(AGS_THREAD(audio_loop), (AgsThread *) task_thread, TRUE, TRUE); g_signal_connect(application_context->task_thread, "clear-cache", G_CALLBACK(ags_xorg_application_context_clear_cache), NULL); /* AgsGuiThread */ gui_thread = xorg_application_context->gui_thread = (AgsThread *) ags_gui_thread_new(); g_object_ref(gui_thread); ags_thread_add_child_extended(AGS_THREAD(audio_loop), (AgsThread *) gui_thread, TRUE, TRUE); /* start engine */ pthread_mutex_lock(audio_loop->start_mutex); start_queue = NULL; start_queue = g_list_prepend(start_queue, polling_thread); start_queue = g_list_prepend(start_queue, task_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop->start_mutex); /* start audio loop and thread pool*/ ags_thread_start(audio_loop); ags_thread_pool_start(thread_pool); /* wait for audio loop */ pthread_mutex_lock(audio_loop->start_mutex); if(g_atomic_int_get(&(audio_loop->start_wait)) == TRUE){ g_atomic_int_set(&(audio_loop->start_done), FALSE); while(g_atomic_int_get(&(audio_loop->start_wait)) == TRUE && g_atomic_int_get(&(audio_loop->start_done)) == FALSE){ pthread_cond_wait(audio_loop->start_cond, audio_loop->start_mutex); } } pthread_mutex_unlock(audio_loop->start_mutex); /* start gui thread */ ags_gui_thread_do_run(gui_thread); } void ags_xorg_application_context_setup(AgsApplicationContext *application_context) { AgsXorgApplicationContext *xorg_application_context; AgsGuiThread *gui_thread; AgsServer *server; AgsAudioLoop *audio_loop; GObject *soundcard; GObject *sequencer; AgsJackServer *jack_server; AgsPulseServer *pulse_server; AgsCoreAudioServer *core_audio_server; AgsLadspaManager *ladspa_manager; AgsDssiManager *dssi_manager; AgsLv2Manager *lv2_manager; AgsLv2uiManager *lv2ui_manager; AgsLv2WorkerManager *lv2_worker_manager; AgsMessageDelivery *message_delivery; AgsMessageQueue *message_queue; AgsMessageQueue *audio_message_queue; AgsThread *soundcard_thread; AgsThread *export_thread; AgsThread *sequencer_thread; AgsDestroyWorker *destroy_worker; AgsThread *main_loop; AgsMutexManager *mutex_manager; AgsLog *log; AgsConfig *config; GList *list; struct passwd *pw; #ifdef AGS_USE_TIMER timer_t *timer_id; #endif gchar *blacklist_filename; gchar *filename; gchar *soundcard_group; gchar *sequencer_group; gchar *str; uid_t uid; guint i; gboolean single_thread_enabled; gboolean has_core_audio; gboolean has_pulse; gboolean has_jack; pthread_mutex_t *application_mutex; xorg_application_context = (AgsXorgApplicationContext *) application_context; audio_loop = AGS_APPLICATION_CONTEXT(xorg_application_context)->main_loop; config = ags_config_get_instance(); /* call parent */ AGS_APPLICATION_CONTEXT_CLASS(ags_xorg_application_context_parent_class)->setup(application_context); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); main_loop = AGS_APPLICATION_CONTEXT(xorg_application_context)->main_loop; pthread_mutex_unlock(application_mutex); gui_thread = ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); log = ags_log_get_instance(); #ifndef AGS_USE_TIMER atexit(ags_xorg_application_context_signal_cleanup); /* Ignore interactive and job-control signals. */ signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); signal(SIGTSTP, SIG_IGN); signal(SIGTTIN, SIG_IGN); signal(SIGTTOU, SIG_IGN); signal(SIGCHLD, SIG_IGN); signal(AGS_THREAD_RESUME_SIG, SIG_IGN); signal(AGS_THREAD_SUSPEND_SIG, SIG_IGN); ags_sigact.sa_handler = ags_xorg_application_context_signal_handler; sigemptyset(&ags_sigact.sa_mask); ags_sigact.sa_flags = 0; sigaction(SIGINT, &ags_sigact, (struct sigaction *) NULL); sigaction(SA_RESTART, &ags_sigact, (struct sigaction *) NULL); #else timer_id = (timer_t *) malloc(sizeof(timer_t)); /* create timer */ ags_sigact_timer.sa_flags = SA_SIGINFO; ags_sigact_timer.sa_sigaction = ags_xorg_application_context_signal_handler_timer; sigemptyset(&ags_sigact_timer.sa_mask); if(sigaction(SIGRTMIN, &ags_sigact_timer, NULL) == -1){ perror("sigaction"); exit(EXIT_FAILURE); } /* Block timer signal temporarily */ sigemptyset(&ags_timer_mask); sigaddset(&ags_timer_mask, SIGRTMIN); if(sigprocmask(SIG_SETMASK, &ags_timer_mask, NULL) == -1){ perror("sigprocmask"); exit(EXIT_FAILURE); } /* Create the timer */ ags_sev_timer.sigev_notify = SIGEV_SIGNAL; ags_sev_timer.sigev_signo = SIGRTMIN; ags_sev_timer.sigev_value.sival_ptr = timer_id; if(timer_create(CLOCK_MONOTONIC, &ags_sev_timer, timer_id) == -1){ perror("timer_create"); exit(EXIT_FAILURE); } #endif /* check filename */ filename = NULL; // pthread_mutex_lock(ags_gui_thread_get_dispatch_mutex()); for(i = 0; i < AGS_APPLICATION_CONTEXT(xorg_application_context)->argc; i++){ if(!strncmp(AGS_APPLICATION_CONTEXT(xorg_application_context)->argv[i], "--filename", 11)){ AgsSimpleFile *simple_file; xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode **node; xmlChar *xpath; gchar *buffer; guint buffer_length; filename = AGS_APPLICATION_CONTEXT(xorg_application_context)->argv[i + 1]; simple_file = ags_simple_file_new(); g_object_set(simple_file, "filename", filename, NULL); ags_simple_file_open(simple_file, NULL); str = g_strdup_printf("* Read config from file: %s", filename); ags_log_add_message(log, str); xpath = "/ags-simple-file/ags-sf-config"; /* Create xpath evaluation context */ xpath_context = xmlXPathNewContext(simple_file->doc); if(xpath_context == NULL) { g_warning("Error: unable to create new XPath context"); break; } /* Evaluate xpath expression */ xpath_object = xmlXPathEval(xpath, xpath_context); if(xpath_object == NULL) { g_warning("Error: unable to evaluate xpath expression \"%s\"", xpath); xmlXPathFreeContext(xpath_context); break; } node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ buffer = xmlNodeGetContent(node[i]); buffer_length = strlen(buffer); break; } } if(buffer != NULL){ // ags_config_clear(ags_config_get_instance()); ags_config_load_from_data(ags_config_get_instance(), buffer, buffer_length); } break; } } /* get user information */ uid = getuid(); pw = getpwuid(uid); /* message delivery */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_queue_new("libags"); ags_message_delivery_add_queue(message_delivery, message_queue); audio_message_queue = ags_message_queue_new("libags-audio"); ags_message_delivery_add_queue(message_delivery, audio_message_queue); /* load ladspa manager */ ladspa_manager = ags_ladspa_manager_get_instance(); blacklist_filename = g_strdup_printf("%s/%s/ladspa_plugin.blacklist", pw->pw_dir, AGS_DEFAULT_DIRECTORY); ags_ladspa_manager_load_blacklist(ladspa_manager, blacklist_filename); ags_log_add_message(log, "* Loading LADSPA plugins"); ags_ladspa_manager_load_default_directory(ladspa_manager); /* load dssi manager */ dssi_manager = ags_dssi_manager_get_instance(); blacklist_filename = g_strdup_printf("%s/%s/dssi_plugin.blacklist", pw->pw_dir, AGS_DEFAULT_DIRECTORY); ags_dssi_manager_load_blacklist(dssi_manager, blacklist_filename); ags_log_add_message(log, "* Loading DSSI plugins"); ags_dssi_manager_load_default_directory(dssi_manager); /* load lv2 manager */ lv2_manager = ags_lv2_manager_get_instance(); lv2_worker_manager = ags_lv2_worker_manager_get_instance(); blacklist_filename = g_strdup_printf("%s/%s/lv2_plugin.blacklist", pw->pw_dir, AGS_DEFAULT_DIRECTORY); ags_lv2_manager_load_blacklist(lv2_manager, blacklist_filename); ags_log_add_message(log, "* Loading Lv2 plugins"); ags_lv2_manager_load_default_directory(lv2_manager); /* load lv2ui manager */ lv2ui_manager = ags_lv2ui_manager_get_instance(); blacklist_filename = g_strdup_printf("%s/%s/lv2ui_plugin.blacklist", pw->pw_dir, AGS_DEFAULT_DIRECTORY); ags_lv2ui_manager_load_blacklist(lv2ui_manager, blacklist_filename); ags_log_add_message(log, "* Loading Lv2ui plugins"); ags_lv2ui_manager_load_default_directory(lv2ui_manager); /* fix cross-references in managers */ lv2_worker_manager->thread_pool = ((AgsXorgApplicationContext *) ags_application_context)->thread_pool; /* launch GUI */ ags_log_add_message(log, "* Launch user interface"); single_thread_enabled = FALSE; #ifdef AGS_USE_TIMER ags_gui_thread_timer_launch(gui_thread, timer_id, single_thread_enabled); #else ags_gui_thread_launch(gui_thread, single_thread_enabled); #endif /* distributed manager */ xorg_application_context->distributed_manager = NULL; /* core audio server */ core_audio_server = ags_core_audio_server_new((GObject *) xorg_application_context, NULL); xorg_application_context->distributed_manager = g_list_append(xorg_application_context->distributed_manager, core_audio_server); g_object_ref(G_OBJECT(core_audio_server)); has_core_audio = FALSE; /* pulse server */ pulse_server = ags_pulse_server_new((GObject *) xorg_application_context, NULL); xorg_application_context->distributed_manager = g_list_append(xorg_application_context->distributed_manager, pulse_server); g_object_ref(G_OBJECT(pulse_server)); has_pulse = FALSE; /* jack server */ jack_server = ags_jack_server_new((GObject *) xorg_application_context, NULL); xorg_application_context->distributed_manager = g_list_append(xorg_application_context->distributed_manager, jack_server); g_object_ref(G_OBJECT(jack_server)); has_jack = FALSE; /* AgsSoundcard */ xorg_application_context->soundcard = NULL; soundcard = NULL; soundcard_group = g_strdup("soundcard"); for(i = 0; ; i++){ guint pcm_channels, buffer_size, samplerate, format; if(!g_key_file_has_group(config->key_file, soundcard_group)){ if(i == 0){ g_free(soundcard_group); soundcard_group = g_strdup_printf("%s-%d", AGS_CONFIG_SOUNDCARD, i); continue; }else{ break; } } str = ags_config_get_value(config, soundcard_group, "backend"); /* change soundcard */ if(str != NULL){ if(!g_ascii_strncasecmp(str, "core-audio", 11)){ soundcard = ags_distributed_manager_register_soundcard(AGS_DISTRIBUTED_MANAGER(core_audio_server), TRUE); has_core_audio = TRUE; }else if(!g_ascii_strncasecmp(str, "pulse", 6)){ soundcard = ags_distributed_manager_register_soundcard(AGS_DISTRIBUTED_MANAGER(pulse_server), TRUE); has_pulse = TRUE; }else if(!g_ascii_strncasecmp(str, "jack", 5)){ soundcard = ags_distributed_manager_register_soundcard(AGS_DISTRIBUTED_MANAGER(jack_server), TRUE); has_jack = TRUE; }else if(!g_ascii_strncasecmp(str, "alsa", 5)){ soundcard = (GObject *) ags_devout_new((GObject *) xorg_application_context); AGS_DEVOUT(soundcard)->flags &= (~AGS_DEVOUT_OSS); AGS_DEVOUT(soundcard)->flags |= AGS_DEVOUT_ALSA; }else if(!g_ascii_strncasecmp(str, "oss", 4)){ soundcard = (GObject *) ags_devout_new((GObject *) xorg_application_context); AGS_DEVOUT(soundcard)->flags &= (~AGS_DEVOUT_ALSA); AGS_DEVOUT(soundcard)->flags |= AGS_DEVOUT_OSS; }else{ g_warning(i18n("unknown soundcard backend - %s"), str); g_free(soundcard_group); soundcard_group = g_strdup_printf("%s-%d", AGS_CONFIG_SOUNDCARD, i); continue; } }else{ g_warning(i18n("unknown soundcard backend - NULL")); g_free(soundcard_group); soundcard_group = g_strdup_printf("%s-%d", AGS_CONFIG_SOUNDCARD, i); continue; } if(xorg_application_context->soundcard == NULL){ g_object_set(audio_loop, "soundcard", G_OBJECT(soundcard), NULL); } xorg_application_context->soundcard = g_list_append(xorg_application_context->soundcard, soundcard); g_object_ref(soundcard); /* device */ str = ags_config_get_value(config, soundcard_group, "device"); if(str != NULL){ ags_soundcard_set_device(AGS_SOUNDCARD(soundcard), str); g_free(str); } /* presets */ pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; format = AGS_SOUNDCARD_DEFAULT_FORMAT; str = ags_config_get_value(config, soundcard_group, "pcm-channels"); if(str != NULL){ pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } str = ags_config_get_value(config, soundcard_group, "buffer-size"); if(str != NULL){ buffer_size = g_ascii_strtoull(str, NULL, 10); g_free(str); } str = ags_config_get_value(config, soundcard_group, "samplerate"); if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); g_free(str); } str = ags_config_get_value(config, soundcard_group, "format"); if(str != NULL){ format = g_ascii_strtoull(str, NULL, 10); g_free(str); } ags_soundcard_set_presets(AGS_SOUNDCARD(soundcard), pcm_channels, samplerate, buffer_size, format); g_free(soundcard_group); soundcard_group = g_strdup_printf("%s-%d", AGS_CONFIG_SOUNDCARD, i); } if(xorg_application_context->soundcard != NULL){ soundcard = xorg_application_context->soundcard->data; } g_free(soundcard_group); /* AgsSequencer */ xorg_application_context->sequencer = NULL; sequencer = NULL; sequencer_group = g_strdup("sequencer"); for(i = 0; ; i++){ guint pcm_channels, buffer_size, samplerate, format; if(!g_key_file_has_group(config->key_file, sequencer_group)){ if(i == 0){ g_free(sequencer_group); sequencer_group = g_strdup_printf("%s-%d", AGS_CONFIG_SEQUENCER, i); continue; }else{ break; } } str = ags_config_get_value(config, sequencer_group, "backend"); /* change sequencer */ if(str != NULL){ if(!g_ascii_strncasecmp(str, "core-audio", 5)){ sequencer = ags_distributed_manager_register_sequencer(AGS_DISTRIBUTED_MANAGER(core_audio_server), FALSE); has_core_audio = TRUE; }else if(!g_ascii_strncasecmp(str, "jack", 5)){ sequencer = ags_distributed_manager_register_sequencer(AGS_DISTRIBUTED_MANAGER(jack_server), FALSE); has_jack = TRUE; }else if(!g_ascii_strncasecmp(str, "alsa", 5)){ sequencer = (GObject *) ags_midiin_new((GObject *) xorg_application_context); AGS_MIDIIN(sequencer)->flags &= (~AGS_MIDIIN_OSS); AGS_MIDIIN(sequencer)->flags |= AGS_MIDIIN_ALSA; }else if(!g_ascii_strncasecmp(str, "oss", 4)){ sequencer = (GObject *) ags_midiin_new((GObject *) xorg_application_context); AGS_MIDIIN(sequencer)->flags &= (~AGS_MIDIIN_ALSA); AGS_MIDIIN(sequencer)->flags |= AGS_MIDIIN_OSS; }else{ g_warning(i18n("unknown sequencer backend - %s"), str); g_free(sequencer_group); sequencer_group = g_strdup_printf("%s-%d", AGS_CONFIG_SEQUENCER, i); continue; } }else{ g_warning(i18n("unknown sequencer backend - NULL")); g_free(sequencer_group); sequencer_group = g_strdup_printf("%s-%d", AGS_CONFIG_SEQUENCER, i); continue; } xorg_application_context->sequencer = g_list_append(xorg_application_context->sequencer, sequencer); g_object_ref(sequencer); /* device */ str = ags_config_get_value(config, sequencer_group, "device"); if(str != NULL){ ags_sequencer_set_device(AGS_SEQUENCER(sequencer), str); g_free(str); } g_free(sequencer_group); sequencer_group = g_strdup_printf("%s-%d", AGS_CONFIG_SEQUENCER, i); } g_free(sequencer_group); /* stop animation */ ags_ui_provider_set_show_animation(AGS_UI_PROVIDER(xorg_application_context), FALSE); /* AgsServer */ xorg_application_context->server = ags_server_new((GObject *) xorg_application_context); /* AgsSoundcardThread and AgsExportThread */ xorg_application_context->soundcard_thread = NULL; list = xorg_application_context->soundcard; while(list != NULL){ AgsNotifySoundcard *notify_soundcard; soundcard_thread = (AgsThread *) ags_soundcard_thread_new(list->data); ags_thread_add_child_extended(AGS_THREAD(audio_loop), (AgsThread *) soundcard_thread, TRUE, TRUE); /* notify soundcard */ notify_soundcard = ags_notify_soundcard_new(soundcard_thread); AGS_TASK(notify_soundcard)->task_thread = application_context->task_thread; if(AGS_IS_DEVOUT(list->data)){ AGS_DEVOUT(list->data)->notify_soundcard = notify_soundcard; }else if(AGS_IS_JACK_DEVOUT(list->data)){ AGS_JACK_DEVOUT(list->data)->notify_soundcard = notify_soundcard; }else if(AGS_IS_PULSE_DEVOUT(list->data)){ AGS_PULSE_DEVOUT(list->data)->notify_soundcard = notify_soundcard; }else if(AGS_IS_CORE_AUDIO_DEVOUT(list->data)){ AGS_CORE_AUDIO_DEVOUT(list->data)->notify_soundcard = notify_soundcard; } ags_task_thread_append_cyclic_task(application_context->task_thread, notify_soundcard); /* export thread */ export_thread = (AgsThread *) ags_export_thread_new(list->data, NULL); ags_thread_add_child_extended(AGS_THREAD(audio_loop), (AgsThread *) export_thread, TRUE, TRUE); /* default soundcard thread */ if(xorg_application_context->soundcard_thread == NULL){ xorg_application_context->soundcard_thread = soundcard_thread; g_object_ref(soundcard_thread); } /* default export thread */ if(export_thread != NULL){ xorg_application_context->export_thread = export_thread; } /* iterate */ list = list->next; } /* AgsSequencerThread */ list = xorg_application_context->sequencer; while(list != NULL){ sequencer_thread = (AgsThread *) ags_sequencer_thread_new(list->data); ags_thread_add_child_extended(AGS_THREAD(audio_loop), (AgsThread *) sequencer_thread, TRUE, TRUE); list = list->next; } /* AgsAutosaveThread */ xorg_application_context->autosave_thread = NULL; if(!g_strcmp0(ags_config_get_value(application_context->config, AGS_CONFIG_GENERIC, "autosave-thread"), "true")){ if(g_strcmp0(ags_config_get_value(application_context->config, AGS_CONFIG_GENERIC, "simple-file"), "false")){ xorg_application_context->autosave_thread = (AgsThread *) ags_autosave_thread_new((GObject *) xorg_application_context); ags_thread_add_child_extended(AGS_THREAD(audio_loop), (AgsThread *) xorg_application_context->autosave_thread, TRUE, TRUE); } } /* AgsWorkerThread */ xorg_application_context->worker = NULL; /* AgsDestroyWorker */ destroy_worker = ags_destroy_worker_new(); g_object_ref(destroy_worker); ags_thread_add_child_extended(AGS_THREAD(audio_loop), destroy_worker, TRUE, TRUE); xorg_application_context->worker = g_list_prepend(xorg_application_context->worker, destroy_worker); ags_thread_start(destroy_worker); /* AgsThreadPool */ xorg_application_context->thread_pool = AGS_TASK_THREAD(application_context->task_thread)->thread_pool; /* launch */ if(has_core_audio){ ags_core_audio_server_connect_client(core_audio_server); } if(has_pulse){ ags_pulse_server_connect_client(pulse_server); ags_pulse_server_start_poll(pulse_server); } if(has_jack){ ags_jack_server_connect_client(jack_server); } /* emit message */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_delivery_find_namespace(message_delivery, "libags-audio"); if(message_queue != NULL){ AgsMessageEnvelope *message; xmlDoc *doc; xmlNode *root_node; /* specify message body */ doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags-command"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "method", "AgsSoundProvider::config-read"); /* add message */ message = ags_message_envelope_alloc(application_context, NULL, doc); /* add message */ ags_message_delivery_add_message(message_delivery, "libags-audio", message); } // if(filename != NULL){ // window->filename = filename; // } // pthread_mutex_unlock(ags_gui_thread_get_dispatch_mutex()); } void ags_xorg_application_context_register_types(AgsApplicationContext *application_context) { ags_complex_get_type(); ags_gui_thread_get_type(); /* */ ags_connectable_get_type(); /* */ ags_lv2_manager_get_type(); ags_lv2_urid_manager_get_type(); ags_lv2_worker_manager_get_type(); ags_lv2_worker_get_type(); /* */ ags_audio_loop_get_type(); ags_soundcard_thread_get_type(); ags_export_thread_get_type(); ags_record_thread_get_type(); ags_iterator_thread_get_type(); ags_recycling_thread_get_type(); /* */ ags_audio_file_get_type(); ags_audio_file_link_get_type(); /* register tasks */ ags_cancel_audio_get_type(); ags_cancel_channel_get_type(); /* register backend */ ags_core_audio_server_get_type(); ags_pulse_server_get_type(); ags_jack_server_get_type(); //TODO:JK: extend me /* register recalls */ ags_recall_channel_run_dummy_get_type(); ags_play_audio_get_type(); ags_play_channel_get_type(); ags_play_channel_run_get_type(); ags_play_channel_run_master_get_type(); ags_stream_channel_get_type(); ags_stream_channel_run_get_type(); ags_loop_channel_get_type(); ags_loop_channel_run_get_type(); ags_copy_channel_get_type(); ags_copy_channel_run_get_type(); ags_volume_channel_get_type(); ags_volume_channel_run_get_type(); ags_peak_channel_get_type(); ags_peak_channel_run_get_type(); ags_recall_ladspa_get_type(); ags_recall_ladspa_run_get_type(); ags_recall_dssi_get_type(); ags_recall_dssi_run_get_type(); ags_recall_lv2_get_type(); ags_recall_lv2_run_get_type(); ags_delay_audio_get_type(); ags_delay_audio_run_get_type(); ags_count_beats_audio_get_type(); ags_count_beats_audio_run_get_type(); ags_copy_pattern_audio_get_type(); ags_copy_pattern_audio_run_get_type(); ags_copy_pattern_channel_get_type(); ags_copy_pattern_channel_run_get_type(); ags_buffer_channel_get_type(); ags_buffer_channel_run_get_type(); ags_play_notation_audio_get_type(); ags_play_notation_audio_run_get_type(); ags_route_dssi_audio_get_type(); ags_route_dssi_audio_run_get_type(); ags_route_lv2_audio_get_type(); ags_route_lv2_audio_run_get_type(); /* gui */ //TODO:JK: move me ags_led_get_type(); ags_indicator_get_type(); ags_vindicator_get_type(); ags_hindicator_get_type(); ags_dial_get_type(); ags_notebook_get_type(); ags_piano_get_type(); /* register machine */ ags_effect_bridge_get_type(); ags_effect_bulk_get_type(); ags_effect_pad_get_type(); ags_effect_line_get_type(); ags_effect_separator_get_type(); ags_bulk_member_get_type(); ags_line_member_get_type(); ags_panel_get_type(); ags_panel_input_pad_get_type(); ags_panel_input_line_get_type(); ags_mixer_get_type(); ags_mixer_input_pad_get_type(); ags_mixer_input_line_get_type(); ags_drum_get_type(); ags_drum_output_pad_get_type(); ags_drum_output_line_get_type(); ags_drum_input_pad_get_type(); ags_drum_input_line_get_type(); ags_matrix_get_type(); ags_synth_get_type(); ags_synth_input_pad_get_type(); ags_synth_input_line_get_type(); ags_ffplayer_get_type(); ags_ladspa_bridge_get_type(); ags_lv2_bridge_get_type(); ags_dssi_bridge_get_type(); } void ags_xorg_application_context_quit(AgsApplicationContext *application_context) { AgsLadspaManager *ladspa_manager; AgsDssiManager *dssi_manager; AgsLv2Manager *lv2_manager; AgsCoreAudioServer *core_audio_server; AgsPulseServer *pulse_server; AgsJackServer *jack_server; AgsMutexManager *mutex_manager; AgsConfig *config; GList *core_audio_client; GList *jack_client; GList *list; gchar *filename; gchar *str; gboolean autosave_thread_enabled; pthread_mutex_t *application_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); config = application_context->config; /* autosave thread */ str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "autosave-thread"); autosave_thread_enabled = (str != NULL && !g_ascii_strncasecmp(str, "true", 8)) ? TRUE: FALSE; /* free managers */ ladspa_manager = ags_ladspa_manager_get_instance(); g_object_unref(ladspa_manager); dssi_manager = ags_dssi_manager_get_instance(); g_object_unref(dssi_manager); lv2_manager = ags_lv2_manager_get_instance(); g_object_unref(lv2_manager); /* delete autosave file */ if(autosave_thread_enabled){ GFile *autosave_file; struct passwd *pw; gchar *autosave_filename; uid_t uid; uid = getuid(); pw = getpwuid(uid); autosave_filename = NULL; if(g_strcmp0(ags_config_get_value(config, AGS_CONFIG_GENERIC, "simple-file"), "false")){ gchar *filename, *offset; filename = g_strdup_printf("%s/%s/%s", pw->pw_dir, AGS_DEFAULT_DIRECTORY, AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_FILENAME); if((offset = strstr(filename, "{PID}")) != NULL){ gchar *tmp; tmp = g_strndup(filename, offset - filename); autosave_filename = g_strdup_printf("%s%d%s", tmp, getpid(), &(offset[5])); g_free(tmp); g_free(filename); } }else{ autosave_filename = g_strdup_printf("%s/%s/%d-%s", pw->pw_dir, AGS_DEFAULT_DIRECTORY, getpid(), AGS_AUTOSAVE_THREAD_DEFAULT_FILENAME); } autosave_file = g_file_new_for_path(autosave_filename); if(g_file_query_exists(autosave_file, NULL)){ g_file_delete(autosave_file, NULL, NULL); } g_free(autosave_filename); g_object_unref(autosave_file); } /* retrieve core audio server */ list = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); while((list = ags_list_util_find_type(list, AGS_TYPE_CORE_AUDIO_SERVER)) != NULL){ core_audio_server = list->data; /* close client */ core_audio_client = core_audio_server->client; while(core_audio_client != NULL){ #ifdef AGS_WITH_CORE_AUDIO AUGraphStop(AGS_CORE_AUDIO_CLIENT(core_audio_client->data)->graph); #endif core_audio_client = core_audio_client->next; } list = list->next; } /* retrieve pulseaudio server */ list = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); while((list = ags_list_util_find_type(list, AGS_TYPE_PULSE_SERVER)) != NULL){ pulse_server = list->data; #ifdef AGS_WITH_PULSE pa_mainloop_quit(pulse_server->main_loop, 0); #endif list = list->next; } /* retrieve JACK server */ list = ags_sound_provider_get_distributed_manager(AGS_SOUND_PROVIDER(application_context)); if((list = ags_list_util_find_type(list, AGS_TYPE_JACK_SERVER)) != NULL){ jack_server = list->data; /* close client */ jack_client = jack_server->client; while(jack_client != NULL){ #ifdef AGS_WITH_JACK jack_client_close(AGS_JACK_CLIENT(jack_client->data)->client); #endif jack_client = jack_client->next; } list = list->next; } pthread_mutex_unlock(application_mutex); gtk_main_quit(); } void ags_xorg_application_context_read(AgsFile *file, xmlNode *node, GObject **application_context) { AgsXorgApplicationContext *gobject; AgsConfig *config; AgsFileLaunch *file_launch; xmlNode *child; if(*application_context == NULL){ gobject = (AgsXorgApplicationContext *) g_object_new(AGS_TYPE_XORG_APPLICATION_CONTEXT, NULL); *application_context = (GObject *) gobject; }else{ gobject = (AgsXorgApplicationContext *) *application_context; } g_object_set(G_OBJECT(file), "application-context", gobject, NULL); config = ags_config_get_instance(); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* properties */ AGS_APPLICATION_CONTEXT(gobject)->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); AGS_APPLICATION_CONTEXT(gobject)->version = xmlGetProp(node, AGS_FILE_VERSION_PROP); AGS_APPLICATION_CONTEXT(gobject)->build_id = xmlGetProp(node, AGS_FILE_BUILD_ID_PROP); //TODO:JK: check version compatibelity /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-config", child->name, 11)){ ags_file_read_config(file, child, (GObject **) &(config)); }else if(!xmlStrncmp("ags-window", child->name, 11)){ ags_file_read_window(file, child, &(gobject->window)); }else if(!xmlStrncmp("ags-soundcard-list", child->name, 19)){ if(gobject->soundcard != NULL){ g_list_free_full(gobject->soundcard, g_object_unref); gobject->soundcard = NULL; } ags_file_read_soundcard_list(file, child, &(gobject->soundcard)); } } child = child->next; } file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_xorg_application_context_launch), gobject); ags_file_add_launch(file, (GObject *) file_launch); } void ags_xorg_application_context_launch(AgsFileLaunch *launch, AgsXorgApplicationContext *application_context) { AgsMutexManager *mutex_manager; AgsThread *audio_loop, *task_thread, *gui_thread; GList *list; GList *start_queue; pthread_mutex_t *audio_loop_mutex; pthread_mutex_t *application_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); audio_loop = (AgsThread *) AGS_APPLICATION_CONTEXT(application_context)->main_loop; audio_loop_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio_loop); pthread_mutex_unlock(application_mutex); /* show all */ gtk_widget_show_all((GtkWidget *) application_context->window); /* wait for audio loop */ task_thread = ags_thread_find_type(audio_loop, AGS_TYPE_TASK_THREAD); application_context->thread_pool->parent = task_thread; gui_thread = ags_thread_find_type(audio_loop, AGS_TYPE_GUI_THREAD); pthread_mutex_lock(audio_loop_mutex); start_queue = NULL; start_queue = g_list_prepend(start_queue, task_thread); start_queue = g_list_prepend(start_queue, gui_thread); g_atomic_pointer_set(&(audio_loop->start_queue), start_queue); pthread_mutex_unlock(audio_loop_mutex); ags_thread_pool_start(application_context->thread_pool); ags_thread_start(audio_loop); } xmlNode* ags_xorg_application_context_write(AgsFile *file, xmlNode *parent, GObject *application_context) { AgsConfig *config; xmlNode *node, *child; gchar *id; config = ags_config_get_instance(); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-main"); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", application_context, NULL)); xmlNewProp(node, AGS_FILE_CONTEXT_PROP, "xorg"); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", ((~AGS_APPLICATION_CONTEXT_CONNECTED) & (AGS_APPLICATION_CONTEXT(application_context)->flags)))); xmlNewProp(node, AGS_FILE_VERSION_PROP, AGS_APPLICATION_CONTEXT(application_context)->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, AGS_APPLICATION_CONTEXT(application_context)->build_id); /* add to parent */ xmlAddChild(parent, node); ags_file_write_config(file, node, (GObject *) config); ags_file_write_soundcard_list(file, node, AGS_XORG_APPLICATION_CONTEXT(application_context)->soundcard); ags_file_write_window(file, node, AGS_XORG_APPLICATION_CONTEXT(application_context)->window); return(node); } void ags_xorg_application_context_clear_cache(AgsTaskThread *task_thread, gpointer data) { //TODO:JK: improve me // pango_fc_font_map_cache_clear(pango_cairo_font_map_get_default()); // pango_cairo_font_map_set_default(NULL); // cairo_debug_reset_static_data(); // FcFini(); } AgsXorgApplicationContext* ags_xorg_application_context_new() { AgsXorgApplicationContext *xorg_application_context; xorg_application_context = (AgsXorgApplicationContext *) g_object_new(AGS_TYPE_XORG_APPLICATION_CONTEXT, NULL); return(xorg_application_context); } gsequencer-1.4.24/ags/X/ags_lv2_browser.c0000644000175000017500000003011313246707333015117 00000000000000/* 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 . */ #include #include #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #include #include #include #include #include #include #include #include void ags_lv2_browser_class_init(AgsLv2BrowserClass *lv2_browser); void ags_lv2_browser_init(AgsLv2Browser *lv2_browser); void ags_lv2_browser_connectable_interface_init(AgsConnectableInterface *connectable); void ags_lv2_browser_applicable_interface_init(AgsApplicableInterface *applicable); void ags_lv2_browser_connect(AgsConnectable *connectable); void ags_lv2_browser_disconnect(AgsConnectable *connectable); void ags_lv2_browser_set_update(AgsApplicable *applicable, gboolean update); void ags_lv2_browser_apply(AgsApplicable *applicable); void ags_lv2_browser_reset(AgsApplicable *applicable); /** * SECTION:ags_lv2_browser * @short_description: A composite to select lv2 uri. * @title: AgsLv2Browser * @section_id: * @include: ags/X/ags_lv2_browser.h * * #AgsLv2Browser is a composite widget to select lv2 plugin and the desired * uri. */ GType ags_lv2_browser_get_type(void) { static GType ags_type_lv2_browser = 0; if(!ags_type_lv2_browser){ static const GTypeInfo ags_lv2_browser_info = { sizeof (AgsLv2BrowserClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_lv2_browser_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLv2Browser), 0, /* n_preallocs */ (GInstanceInitFunc) ags_lv2_browser_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_lv2_browser_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_lv2_browser_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_lv2_browser = g_type_register_static(GTK_TYPE_VBOX, "AgsLv2Browser", &ags_lv2_browser_info, 0); g_type_add_interface_static(ags_type_lv2_browser, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_lv2_browser, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_lv2_browser); } void ags_lv2_browser_class_init(AgsLv2BrowserClass *lv2_browser) { /* empty */ } void ags_lv2_browser_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_lv2_browser_connect; connectable->disconnect = ags_lv2_browser_disconnect; } void ags_lv2_browser_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_lv2_browser_set_update; applicable->apply = ags_lv2_browser_apply; applicable->reset = ags_lv2_browser_reset; } void ags_lv2_browser_init(AgsLv2Browser *lv2_browser) { GtkTable *table; GtkComboBoxText *combo_box; GtkLabel *label; GList *list; gchar *str; gchar **filenames, **filenames_start; /* plugin */ lv2_browser->plugin = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) lv2_browser, GTK_WIDGET(lv2_browser->plugin), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("filename: ")); gtk_box_pack_start(GTK_BOX(lv2_browser->plugin), GTK_WIDGET(label), FALSE, FALSE, 0); lv2_browser->filename = combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(lv2_browser->plugin), GTK_WIDGET(combo_box), FALSE, FALSE, 0); lv2_browser->path = NULL; filenames = filenames_start = ags_lv2_manager_get_filenames(ags_lv2_manager_get_instance()); if(filenames_start != NULL){ while(*filenames != NULL){ gtk_combo_box_text_append_text(combo_box, *filenames); filenames++; } g_free(filenames_start); } label = (GtkLabel *) gtk_label_new(i18n("effect: ")); gtk_box_pack_start(GTK_BOX(lv2_browser->plugin), GTK_WIDGET(label), FALSE, FALSE, 0); lv2_browser->effect = combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(lv2_browser->plugin), GTK_WIDGET(combo_box), FALSE, FALSE, 0); /* description */ lv2_browser->description = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) lv2_browser, GTK_WIDGET(lv2_browser->description), FALSE, FALSE, 0); str = g_strdup_printf("%s: ", i18n("Name")); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", str, NULL); gtk_box_pack_start(GTK_BOX(lv2_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); g_free(str); str = g_strdup_printf("%s: ", i18n("Homepage")); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", str, NULL); gtk_box_pack_start(GTK_BOX(lv2_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); g_free(str); str = g_strdup_printf("%s: ", i18n("M-Box")); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", str, NULL); gtk_box_pack_start(GTK_BOX(lv2_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); g_free(str); str = g_strdup_printf("%s: ", i18n("Ports")); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", str, NULL); gtk_box_pack_start(GTK_BOX(lv2_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); g_free(str); table = (GtkTable *) gtk_table_new(256, 2, FALSE); gtk_box_pack_start(GTK_BOX(lv2_browser->description), GTK_WIDGET(table), FALSE, FALSE, 0); } void ags_lv2_browser_connect(AgsConnectable *connectable) { AgsLv2Browser *lv2_browser; GList *list, *list_start; lv2_browser = AGS_LV2_BROWSER(connectable); list_start = list = gtk_container_get_children(GTK_CONTAINER(lv2_browser->plugin)); list = list->next; g_signal_connect_after(G_OBJECT(list->data), "changed", G_CALLBACK(ags_lv2_browser_plugin_filename_callback), lv2_browser); list = list->next->next; g_signal_connect_after(G_OBJECT(list->data), "changed", G_CALLBACK(ags_lv2_browser_plugin_uri_callback), lv2_browser); g_list_free(list_start); } void ags_lv2_browser_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_lv2_browser_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_lv2_browser_apply(AgsApplicable *applicable) { /* empty */ } void ags_lv2_browser_reset(AgsApplicable *applicable) { AgsLv2Browser *lv2_browser; GtkComboBoxText *filename; GList *list; lv2_browser = AGS_LV2_BROWSER(applicable); list = gtk_container_get_children(GTK_CONTAINER(lv2_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); g_list_free(list); gtk_combo_box_set_active((GtkComboBox *) filename, 0); } /** * ags_lv2_browser_get_plugin_filename: * @lv2_browser: the #AgsLv2Browser * * Retrieve selected lv2 plugin filename. * * Returns: the active lv2 filename * * Since: 1.0.0 */ gchar* ags_lv2_browser_get_plugin_filename(AgsLv2Browser *lv2_browser) { GtkComboBoxText *filename; GList *list, *list_start; list_start = list = gtk_container_get_children(GTK_CONTAINER(lv2_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); g_list_free(list_start); return(gtk_combo_box_text_get_active_text(filename)); } /** * ags_lv2_browser_get_plugin_uri: * @lv2_browser: the #AgsLv2Browser * * Retrieve selected lv2 uri. * * Returns: the active lv2 uri * * Since: 1.0.0 */ gchar* ags_lv2_browser_get_plugin_effect(AgsLv2Browser *lv2_browser) { GtkComboBoxText *effect; AgsLv2Plugin *lv2_plugin; GList *list, *list_start; gchar *effect_name; /* retrieve filename and effect */ list_start = list = gtk_container_get_children(GTK_CONTAINER(lv2_browser->plugin)); effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data); effect_name = gtk_combo_box_text_get_active_text(effect); g_list_free(list_start); return(effect_name); } /** * ags_lv2_browser_combo_box_output_boolean_controls_new: * * Creates a #GtkComboBox containing suitable widgets as controls. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkWidget* ags_lv2_browser_combo_box_output_boolean_controls_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "led"); gtk_combo_box_set_active((GtkComboBox *) combo_box, 1); return((GtkWidget *) combo_box); } /** * ags_lv2_browser_combo_box_controls_new: * * Creates a #GtkComboBox containing suitable widgets as controls. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkWidget* ags_lv2_browser_combo_box_output_controls_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "vertical indicator"); gtk_combo_box_text_append_text(combo_box, "horizontal indicator"); gtk_combo_box_set_active((GtkComboBox *) combo_box, 1); return((GtkWidget *) combo_box); } /** * ags_lv2_browser_combo_box_boolean_controls_new: * * Creates a #GtkComboBox containing suitable widgets as controls. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkWidget* ags_lv2_browser_combo_box_boolean_controls_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "check-button"); gtk_combo_box_text_append_text(combo_box, "toggle button"); gtk_combo_box_set_active((GtkComboBox *) combo_box, 1); return((GtkWidget *) combo_box); } /** * ags_lv2_browser_combo_box_controls_new: * * Creates a #GtkComboBox containing suitable widgets as controls. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkWidget* ags_lv2_browser_combo_box_controls_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "spin button"); gtk_combo_box_text_append_text(combo_box, "dial"); gtk_combo_box_text_append_text(combo_box, "vertical scale"); gtk_combo_box_text_append_text(combo_box, "horizontal scale"); gtk_combo_box_set_active((GtkComboBox *) combo_box, 1); return((GtkWidget *) combo_box); } GtkWidget* ags_lv2_browser_preview_new() { GtkWidget *preview; preview = NULL; //TODO:JK: implement me return(preview); } /** * ags_lv2_browser_new: * * Creates an #AgsLv2Browser * * Returns: a new #AgsLv2Browser * * Since: 1.0.0 */ AgsLv2Browser* ags_lv2_browser_new() { AgsLv2Browser *lv2_browser; lv2_browser = (AgsLv2Browser *) g_object_new(AGS_TYPE_LV2_BROWSER, "homogeneous", FALSE, "spacing", 0, NULL); return(lv2_browser); } gsequencer-1.4.24/ags/X/ags_listing_editor_callbacks.c0000644000175000017500000000555713247044247017704 00000000000000/* 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 . */ #include #include #include #include #include int ags_listing_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsListingEditor *listing_editor) { AgsMachineEditor *machine_editor; if(old_parent != NULL) return(0); machine_editor = (AgsMachineEditor *) gtk_widget_get_ancestor(widget, AGS_TYPE_MACHINE_EDITOR); if(machine_editor->machine != NULL){ ags_listing_editor_add_children(listing_editor, machine_editor->machine->audio, 0, FALSE); } return(0); } void ags_listing_editor_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsListingEditor *listing_editor) { AgsAudio *audio; audio = machine->audio; if(channel_type != listing_editor->channel_type){ return; } if(pads_old < pads){ AgsMutexManager *mutex_manager; guint audio_channels; guint nth_channel; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, audio); pthread_mutex_unlock(application_mutex); /* get some audio fields */ pthread_mutex_lock(audio_mutex); audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* add children */ nth_channel = pads_old * audio_channels; ags_listing_editor_add_children(listing_editor, audio, nth_channel, TRUE); }else{ GList *list, *list_next, *list_start; list_start = list = gtk_container_get_children(GTK_CONTAINER(listing_editor->child)); list = g_list_nth(list, pads); while(list != NULL){ list_next = list->next; gtk_widget_destroy(GTK_WIDGET(list->data)); list = list_next; } g_list_free(list_start); } } gsequencer-1.4.24/ags/X/ags_notation_editor.h0000644000175000017500000000766013247044247016071 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTATION_EDITOR_H__ #define __AGS_NOTATION_EDITOR_H__ #include #include #include #include #include #include #include #include #include #include #define AGS_TYPE_NOTATION_EDITOR (ags_notation_editor_get_type ()) #define AGS_NOTATION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_NOTATION_EDITOR, AgsNotationEditor)) #define AGS_NOTATION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NOTATION_EDITOR, AgsNotationEditorClass)) #define AGS_IS_NOTATION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_NOTATION_EDITOR)) #define AGS_IS_NOTATION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_NOTATION_EDITOR)) #define AGS_NOTATION_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_NOTATION_EDITOR, AgsNotationEditorClass)) #define AGS_NOTATION_EDITOR_DEFAULT_VERSION "1.2.0" #define AGS_NOTATION_EDITOR_DEFAULT_BUILD_ID "Mon Nov 27 08:23:16 UTC 2017" #define AGS_NOTATION_EDITOR_MAX_CONTROLS (16 * 16 * 1200) typedef struct _AgsNotationEditor AgsNotationEditor; typedef struct _AgsNotationEditorClass AgsNotationEditorClass; typedef enum{ AGS_NOTATION_EDITOR_CONNECTED = 1, AGS_NOTATION_EDITOR_PATTERN_MODE = 1 << 1, AGS_NOTATION_EDITOR_PASTE_MATCH_AUDIO_CHANNEL = 1 << 2, AGS_NOTATION_EDITOR_PASTE_NO_DUPLICATES = 1 << 3, }AgsNotationEditorFlags; struct _AgsNotationEditor { GtkVBox vbox; guint flags; gchar *version; gchar *build_id; guint tact_counter; gdouble current_tact; guint chunk_duration; GObject *soundcard; GtkHPaned *paned; AgsNotationToolbar *notation_toolbar; AgsMachineSelector *machine_selector; AgsMachine *selected_machine; AgsNotebook *notebook; AgsScrolledPiano *scrolled_piano; AgsNotationEdit *notation_edit; }; struct _AgsNotationEditorClass { GtkVBoxClass vbox; void (*machine_changed)(AgsNotationEditor *notation_editor, AgsMachine *machine); }; GType ags_notation_editor_get_type(void); void ags_notation_editor_machine_changed(AgsNotationEditor *notation_editor, AgsMachine *machine); void ags_notation_editor_add_note(AgsNotationEditor *notation_editor, AgsNote *note); void ags_notation_editor_delete_note(AgsNotationEditor *notation_editor, guint x, guint y); void ags_notation_editor_select_region(AgsNotationEditor *notation_editor, guint x0, guint y0, guint x1, guint y1); void ags_notation_editor_do_feedback(AgsNotationEditor *notation_editor); void ags_notation_editor_select_all(AgsNotationEditor *notation_editor); void ags_notation_editor_paste(AgsNotationEditor *notation_editor); void ags_notation_editor_copy(AgsNotationEditor *notation_editor); void ags_notation_editor_cut(AgsNotationEditor *notation_editor); void ags_notation_editor_invert(AgsNotationEditor *notation_editor); AgsNotationEditor* ags_notation_editor_new(); #endif /*__AGS_NOTATION_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_export_soundcard.c0000644000175000017500000004206713247044247016246 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_export_soundcard_class_init(AgsExportSoundcardClass *export_soundcard); void ags_export_soundcard_connectable_interface_init(AgsConnectableInterface *connectable); void ags_export_soundcard_init(AgsExportSoundcard *export_soundcard); void ags_export_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_export_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_export_soundcard_finalize(GObject *gobject); void ags_export_soundcard_connect(AgsConnectable *connectable); void ags_export_soundcard_disconnect(AgsConnectable *connectable); void ags_export_soundcard_show(GtkWidget *widget); gboolean ags_export_soundcard_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_export_soundcard * @short_description: The export dialog * @title: AgsExportSoundcard * @section_id: * @include: ags/X/ags_export_soundcard.h * * #AgsExportSoundcard lets you export to audio files. */ enum{ PROP_0, PROP_SOUNDCARD, }; static gpointer ags_export_soundcard_parent_class = NULL; GType ags_export_soundcard_get_type() { static GType ags_type_export_soundcard = 0; if(!ags_type_export_soundcard){ static const GTypeInfo ags_export_soundcard_info = { sizeof (AgsExportSoundcardClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_export_soundcard_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsExportSoundcard), 0, /* n_preallocs */ (GInstanceInitFunc) ags_export_soundcard_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_export_soundcard_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_export_soundcard = g_type_register_static(GTK_TYPE_VBOX, "AgsExportSoundcard", &ags_export_soundcard_info, 0); g_type_add_interface_static(ags_type_export_soundcard, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_export_soundcard); } void ags_export_soundcard_class_init(AgsExportSoundcardClass *export_soundcard) { GObjectClass *gobject; GParamSpec *param_spec; ags_export_soundcard_parent_class = g_type_class_peek_parent(export_soundcard); /* GObjectClass */ gobject = (GObjectClass *) export_soundcard; gobject->set_property = ags_export_soundcard_set_property; gobject->get_property = ags_export_soundcard_get_property; gobject->finalize = ags_export_soundcard_finalize; /* properties */ /** * AgsExportSoundcard:soundcard: * * The assigned #AgsSoundcard acting as default sink. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); } void ags_export_soundcard_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_export_soundcard_connect; connectable->disconnect = ags_export_soundcard_disconnect; } void ags_export_soundcard_init(AgsExportSoundcard *export_soundcard) { GtkHBox *hbox; GtkTable *table; GtkLabel *label; export_soundcard->flags = 0; /* table */ table = (GtkTable *) gtk_table_new(4, 2, FALSE); gtk_box_pack_start(GTK_BOX(export_soundcard), GTK_WIDGET(table), FALSE, FALSE, 0); /* backend */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("backend"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); export_soundcard->backend = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(export_soundcard->backend), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); #ifdef AGS_WITH_CORE_AUDIO gtk_combo_box_text_append_text(export_soundcard->backend, "core-audio"); #endif #ifdef AGS_WITH_PULSE gtk_combo_box_text_append_text(export_soundcard->backend, "pulse"); #endif #ifdef AGS_WITH_JACK gtk_combo_box_text_append_text(export_soundcard->backend, "jack"); #endif #ifdef AGS_WITH_ALSA gtk_combo_box_text_append_text(export_soundcard->backend, "alsa"); #endif #ifdef AGS_WITH_OSS gtk_combo_box_text_append_text(export_soundcard->backend, "oss"); #endif gtk_combo_box_set_active(GTK_COMBO_BOX(export_soundcard->backend), 0); /* sound card */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("soundcard"), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); export_soundcard->card = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(export_soundcard->card), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* filename */ label = (GtkLabel *) gtk_label_new(i18n("file")); g_object_set(G_OBJECT(label), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 2, 3, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_table_attach(table, GTK_WIDGET(hbox), 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); export_soundcard->filename = (GtkEntry *) gtk_entry_new(); gtk_entry_set_text(export_soundcard->filename, "out.wav"); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(export_soundcard->filename), TRUE, TRUE, 0); export_soundcard->file_chooser_button = (GtkButton *) gtk_button_new_with_label(i18n("open")); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(export_soundcard->file_chooser_button), TRUE, TRUE, 0); /* output format */ label = (GtkLabel *) gtk_label_new(i18n("output format")); g_object_set(G_OBJECT(label), "xalign", 0.0, NULL); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 3, 4, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); export_soundcard->output_format = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(export_soundcard->output_format, AGS_EXPORT_SOUNDCARD_FORMAT_WAV); gtk_combo_box_text_append_text(export_soundcard->output_format, AGS_EXPORT_SOUNDCARD_FORMAT_FLAC); gtk_combo_box_text_append_text(export_soundcard->output_format, AGS_EXPORT_SOUNDCARD_FORMAT_OGG); gtk_combo_box_set_active((GtkComboBox *) export_soundcard->output_format, 0); gtk_table_attach(table, GTK_WIDGET(export_soundcard->output_format), 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); } void ags_export_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsExportSoundcard *export_soundcard; export_soundcard = AGS_EXPORT_SOUNDCARD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(export_soundcard->soundcard == soundcard){ return; } if(soundcard != NULL){ g_object_ref(soundcard); } export_soundcard->soundcard = soundcard; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_export_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsExportSoundcard *export_soundcard; export_soundcard = AGS_EXPORT_SOUNDCARD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, export_soundcard->soundcard); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_export_soundcard_connect(AgsConnectable *connectable) { AgsExportSoundcard *export_soundcard; export_soundcard = AGS_EXPORT_SOUNDCARD(connectable); if((AGS_EXPORT_SOUNDCARD_CONNECTED & (export_soundcard->flags)) != 0){ return; } export_soundcard->flags |= AGS_EXPORT_SOUNDCARD_CONNECTED; g_signal_connect_after(G_OBJECT(export_soundcard->backend), "changed", G_CALLBACK(ags_export_soundcard_backend_callback), export_soundcard); g_signal_connect_after(G_OBJECT(export_soundcard->card), "changed", G_CALLBACK(ags_export_soundcard_card_callback), export_soundcard); g_signal_connect_after(G_OBJECT(export_soundcard->file_chooser_button), "clicked", G_CALLBACK(ags_export_soundcard_file_chooser_button_callback), export_soundcard); } void ags_export_soundcard_disconnect(AgsConnectable *connectable) { AgsExportSoundcard *export_soundcard; export_soundcard = AGS_EXPORT_SOUNDCARD(connectable); if((AGS_EXPORT_SOUNDCARD_CONNECTED & (export_soundcard->flags)) == 0){ return; } export_soundcard->flags &= (~AGS_EXPORT_SOUNDCARD_CONNECTED); g_object_disconnect(G_OBJECT(export_soundcard->backend), "any_signal::changed", G_CALLBACK(ags_export_soundcard_backend_callback), export_soundcard, NULL); g_object_disconnect(G_OBJECT(export_soundcard->card), "any_signal::changed", G_CALLBACK(ags_export_soundcard_card_callback), export_soundcard, NULL); g_object_disconnect(G_OBJECT(export_soundcard->file_chooser_button), "any_signal::clicked", G_CALLBACK(ags_export_soundcard_file_chooser_button_callback), export_soundcard, NULL); } void ags_export_soundcard_finalize(GObject *gobject) { AgsExportSoundcard *export_soundcard; export_soundcard = (AgsExportSoundcard *) gobject; if(export_soundcard->soundcard != NULL){ g_object_unref(export_soundcard->soundcard); } G_OBJECT_CLASS(ags_export_soundcard_parent_class)->finalize(gobject); } /** * ags_export_soundcard_set_backend: * @export_soundcard: the #AgsExportSoundcard * @backend: the backend * * Set backend. * * Since: 1.0.0 */ gboolean ags_export_soundcard_set_backend(AgsExportSoundcard *export_soundcard, gchar *backend) { GtkTreeModel *model; GtkTreeIter iter; gchar *str; guint i; model = gtk_combo_box_get_model(GTK_COMBO_BOX(export_soundcard->backend)); i = 0; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &str, -1); if(!g_ascii_strcasecmp(str, backend)){ break; } i++; }while(gtk_tree_model_iter_next(model, &iter)); } gtk_combo_box_set_active(GTK_COMBO_BOX(export_soundcard->backend), i); return(TRUE); } /** * ags_export_soundcard_refresh_card: * @export_soundcard: the #AgsExportSoundcard * * Refresh cards. * * Since: 1.0.0 */ void ags_export_soundcard_refresh_card(AgsExportSoundcard *export_soundcard) { AgsExportWindow *export_window; GtkTreeModel *model; GList *soundcard; GList *card, *card_start; gchar *backend; gchar *device; export_window = gtk_widget_get_ancestor(export_soundcard, AGS_TYPE_EXPORT_WINDOW); soundcard = NULL; if(export_window != NULL && export_window->application_context != NULL){ soundcard = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(export_window->application_context)); } card_start = NULL; backend = gtk_combo_box_text_get_active_text(export_soundcard->backend); if(backend != NULL){ if(!g_ascii_strncasecmp(backend, "alsa", 5)){ while(soundcard != NULL){ if(AGS_IS_DEVOUT(soundcard->data) && (AGS_DEVOUT_ALSA & (AGS_DEVOUT(soundcard->data)->flags)) != 0){ device = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)); if(device != NULL){ card_start = g_list_prepend(card_start, device); } } soundcard = soundcard->next; } }else if(!g_ascii_strncasecmp(backend, "oss", 4)){ while(soundcard != NULL){ if(AGS_IS_DEVOUT(soundcard->data) && (AGS_DEVOUT_OSS & (AGS_DEVOUT(soundcard->data)->flags)) != 0){ device = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)); if(device != NULL){ card_start = g_list_prepend(card_start, device); } } soundcard = soundcard->next; } }else if(!g_ascii_strncasecmp(backend, "jack", 5)){ while(soundcard != NULL){ if(AGS_IS_JACK_DEVOUT(soundcard->data)){ device = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)); if(device != NULL){ card_start = g_list_prepend(card_start, device); } } soundcard = soundcard->next; } }else if(!g_ascii_strncasecmp(backend, "pulse", 6)){ while(soundcard != NULL){ if(AGS_IS_PULSE_DEVOUT(soundcard->data)){ device = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)); if(device != NULL){ card_start = g_list_prepend(card_start, device); } } soundcard = soundcard->next; } }else if(!g_ascii_strncasecmp(backend, "core-audio", 6)){ while(soundcard != NULL){ if(AGS_IS_CORE_AUDIO_DEVOUT(soundcard->data)){ device = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard->data)); if(device != NULL){ card_start = g_list_prepend(card_start, device); } } soundcard = soundcard->next; } } } model = gtk_combo_box_get_model(GTK_COMBO_BOX(export_soundcard->card)); gtk_list_store_clear(GTK_LIST_STORE(model)); if(card_start != NULL){ card_start = g_list_reverse(card_start); card = card_start; while(card != NULL){ if(card->data != NULL){ gtk_combo_box_text_append_text(export_soundcard->card, (gchar *) card->data); } card = card->next; } g_list_free(card_start); } } /** * ags_export_soundcard_set_card: * @export_soundcard: the #AgsExportSoundcard * @card: the card * * Set card. * * Since: 1.0.0 */ gboolean ags_export_soundcard_set_card(AgsExportSoundcard *export_soundcard, gchar *card) { GtkTreeModel *model; GtkTreeIter iter; gchar *str; guint i; model = gtk_combo_box_get_model(GTK_COMBO_BOX(export_soundcard->card)); i = 0; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &str, -1); if(!g_ascii_strcasecmp(str, card)){ break; } i++; }while(gtk_tree_model_iter_next(model, &iter)); } gtk_combo_box_set_active(GTK_COMBO_BOX(export_soundcard->card), i); return(TRUE); } /** * ags_export_soundcard_set_filename: * @export_soundcard: the #AgsExportSoundcard * @filename: the filename * * Set filename. * * Since: 1.0.0 */ void ags_export_soundcard_set_filename(AgsExportSoundcard *export_soundcard, gchar *filename) { gtk_entry_set_text(export_soundcard->filename, filename); } /** * ags_export_soundcard_set_format: * @export_soundcard: the #AgsExportSoundcard * @format: the format * * Set format. * * Since: 1.0.0 */ void ags_export_soundcard_set_format(AgsExportSoundcard *export_soundcard, gchar *format) { GtkTreeModel *model; GtkTreeIter iter; gchar *str; guint i; model = gtk_combo_box_get_model(GTK_COMBO_BOX(export_soundcard->output_format)); i = 0; if(gtk_tree_model_get_iter_first(model, &iter)){ do{ gtk_tree_model_get(model, &iter, 0, &str, -1); if(!g_ascii_strcasecmp(str, format)){ break; } i++; }while(gtk_tree_model_iter_next(model, &iter)); } gtk_combo_box_set_active(GTK_COMBO_BOX(export_soundcard->output_format), i); } /** * ags_export_soundcard_new: * * Instantiate an #AgsExportSoundcard * * Returns: an #AgsExportSoundcard * * Since: 1.0.0 */ AgsExportSoundcard* ags_export_soundcard_new() { AgsExportSoundcard *export_soundcard; export_soundcard = (AgsExportSoundcard *) g_object_new(AGS_TYPE_EXPORT_SOUNDCARD, NULL); return(export_soundcard); } gsequencer-1.4.24/ags/X/import/0000755000175000017500000000000013256233676013254 500000000000000gsequencer-1.4.24/ags/X/import/ags_track_collection_callbacks.h0000644000175000017500000000177613246707333021523 00000000000000/* 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 . */ #ifndef __AGS_TRACK_COLLECTION_CALLBACKS_H__ #define __AGS_TRACK_COLLECTION_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_TRACK_COLLECTION_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/import/ags_midi_import_wizard.c0000644000175000017500000003060313246707333020063 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_midi_import_wizard_class_init(AgsMidiImportWizardClass *midi_import_wizard); void ags_midi_import_wizard_connectable_interface_init(AgsConnectableInterface *connectable); void ags_midi_import_wizard_applicable_interface_init(AgsApplicableInterface *applicable); void ags_midi_import_wizard_init(AgsMidiImportWizard *midi_import_wizard); void ags_midi_import_wizard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_midi_import_wizard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_midi_import_wizard_connect(AgsConnectable *connectable); void ags_midi_import_wizard_disconnect(AgsConnectable *connectable); void ags_midi_import_wizard_set_update(AgsApplicable *applicable, gboolean update); void ags_midi_import_wizard_apply(AgsApplicable *applicable); void ags_midi_import_wizard_reset(AgsApplicable *applicable); gboolean ags_midi_import_wizard_delete_event(GtkWidget *widget, GdkEventAny *event); void ags_midi_import_wizard_show(GtkWidget *widget); /** * SECTION:ags_midi_import_wizard * @short_description: pack pad editors. * @title: AgsMidiImportWizard * @section_id: * @include: ags/X/ags_midi_import_wizard.h * * #AgsMidiImportWizard is a wizard to import midi files and do track mapping. */ static gpointer ags_midi_import_wizard_parent_class = NULL; enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; GType ags_midi_import_wizard_get_type(void) { static GType ags_type_midi_import_wizard = 0; if(!ags_type_midi_import_wizard){ static const GTypeInfo ags_midi_import_wizard_info = { sizeof (AgsMidiImportWizardClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_midi_import_wizard_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMidiImportWizard), 0, /* n_preallocs */ (GInstanceInitFunc) ags_midi_import_wizard_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_midi_import_wizard_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_midi_import_wizard_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_midi_import_wizard = g_type_register_static(GTK_TYPE_DIALOG, "AgsMidiImportWizard", &ags_midi_import_wizard_info, 0); g_type_add_interface_static(ags_type_midi_import_wizard, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_midi_import_wizard, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_midi_import_wizard); } void ags_midi_import_wizard_class_init(AgsMidiImportWizardClass *midi_import_wizard) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_midi_import_wizard_parent_class = g_type_class_peek_parent(midi_import_wizard); /* GObjectClass */ gobject = (GObjectClass *) midi_import_wizard; /* GtkWidgetClass */ widget = (GtkWidgetClass *) midi_import_wizard; gobject->set_property = ags_midi_import_wizard_set_property; gobject->get_property = ags_midi_import_wizard_get_property; /* properties */ /** * AgsMidiImportWizard:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsMidiImportWizard:main-window: * * The assigned #AgsWindow. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidget */ widget->delete_event = ags_midi_import_wizard_delete_event; widget->show = ags_midi_import_wizard_show; } void ags_midi_import_wizard_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_midi_import_wizard_connect; connectable->disconnect = ags_midi_import_wizard_disconnect; } void ags_midi_import_wizard_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_midi_import_wizard_set_update; applicable->apply = ags_midi_import_wizard_apply; applicable->reset = ags_midi_import_wizard_reset; } void ags_midi_import_wizard_init(AgsMidiImportWizard *midi_import_wizard) { GtkAlignment *alignment; midi_import_wizard->flags = AGS_MIDI_IMPORT_WIZARD_SHOW_FILE_CHOOSER; midi_import_wizard->application_context = NULL; midi_import_wizard->main_window = NULL; /* file chooser */ alignment = g_object_new(GTK_TYPE_ALIGNMENT, NULL); gtk_widget_set_no_show_all((GtkWidget *) alignment, TRUE); gtk_box_pack_start((GtkBox *) midi_import_wizard->dialog.vbox, (GtkWidget*) alignment, TRUE, TRUE, 0); midi_import_wizard->file_chooser = gtk_file_chooser_widget_new(GTK_FILE_CHOOSER_ACTION_OPEN); gtk_container_add((GtkContainer *) alignment, midi_import_wizard->file_chooser); /* track collection */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.0, 1.0, 1.0); gtk_widget_set_no_show_all((GtkWidget *) alignment, TRUE); gtk_box_pack_start((GtkBox *) midi_import_wizard->dialog.vbox, (GtkWidget*) alignment, TRUE, TRUE, 0); midi_import_wizard->track_collection = (GtkWidget *) ags_track_collection_new(AGS_TYPE_TRACK_COLLECTION_MAPPER, 0, NULL); gtk_container_add((GtkContainer *) alignment, midi_import_wizard->track_collection); gtk_dialog_add_buttons((GtkDialog *) midi_import_wizard, GTK_STOCK_GO_BACK, GTK_RESPONSE_REJECT, GTK_STOCK_GO_FORWARD, GTK_RESPONSE_ACCEPT, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); } void ags_midi_import_wizard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = AGS_MIDI_IMPORT_WIZARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) midi_import_wizard->application_context == application_context){ return; } if(midi_import_wizard->application_context != NULL){ g_object_unref(midi_import_wizard->application_context); } if(application_context != NULL){ g_object_ref(application_context); } midi_import_wizard->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) midi_import_wizard->main_window == main_window){ return; } if(midi_import_wizard->main_window != NULL){ g_object_unref(midi_import_wizard->main_window); } if(main_window != NULL){ g_object_ref(main_window); } midi_import_wizard->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_import_wizard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = AGS_MIDI_IMPORT_WIZARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, midi_import_wizard->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, midi_import_wizard->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_import_wizard_connect(AgsConnectable *connectable) { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = AGS_MIDI_IMPORT_WIZARD(connectable); if((AGS_MIDI_IMPORT_WIZARD_CONNECTED & (midi_import_wizard->flags)) != 0){ return; } midi_import_wizard->flags |= AGS_MIDI_IMPORT_WIZARD_CONNECTED; g_signal_connect(midi_import_wizard, "response", G_CALLBACK(ags_midi_import_wizard_response_callback), NULL); ags_connectable_connect(AGS_CONNECTABLE(midi_import_wizard->track_collection)); } void ags_midi_import_wizard_disconnect(AgsConnectable *connectable) { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = AGS_MIDI_IMPORT_WIZARD(connectable); if((AGS_MIDI_IMPORT_WIZARD_CONNECTED & (midi_import_wizard->flags)) == 0){ return; } midi_import_wizard->flags &= (~AGS_MIDI_IMPORT_WIZARD_CONNECTED); ags_connectable_disconnect(AGS_CONNECTABLE(midi_import_wizard->track_collection)); } void ags_midi_import_wizard_set_update(AgsApplicable *applicable, gboolean update) { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = AGS_MIDI_IMPORT_WIZARD(applicable); ags_applicable_set_update(AGS_APPLICABLE(midi_import_wizard->track_collection), update); } void ags_midi_import_wizard_apply(AgsApplicable *applicable) { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = AGS_MIDI_IMPORT_WIZARD(applicable); ags_applicable_apply(AGS_APPLICABLE(midi_import_wizard->track_collection)); } void ags_midi_import_wizard_reset(AgsApplicable *applicable) { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = AGS_MIDI_IMPORT_WIZARD(applicable); ags_applicable_reset(AGS_APPLICABLE(midi_import_wizard->track_collection)); } gboolean ags_midi_import_wizard_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); return(TRUE); } void ags_midi_import_wizard_show(GtkWidget *widget) { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = AGS_MIDI_IMPORT_WIZARD(widget); GTK_WIDGET_CLASS(ags_midi_import_wizard_parent_class)->show(widget); if((AGS_MIDI_IMPORT_WIZARD_SHOW_FILE_CHOOSER & (midi_import_wizard->flags)) != 0){ gtk_widget_show(midi_import_wizard->file_chooser->parent); gtk_widget_show_all(midi_import_wizard->file_chooser); } if((AGS_MIDI_IMPORT_WIZARD_SHOW_TRACK_COLLECTION & (midi_import_wizard->flags)) != 0){ gtk_widget_show(midi_import_wizard->track_collection->parent); gtk_widget_show_all(midi_import_wizard->track_collection); } } /** * ags_midi_import_wizard_new: * * Creates an #AgsMidiImportWizard * * Returns: a new #AgsMidiImportWizard * * Since: 1.0.0 */ AgsMidiImportWizard* ags_midi_import_wizard_new() { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = (AgsMidiImportWizard *) g_object_new(AGS_TYPE_MIDI_IMPORT_WIZARD, NULL); return(midi_import_wizard); } gsequencer-1.4.24/ags/X/import/ags_track_collection_mapper.c0000644000175000017500000005103413247044247021052 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_track_collection_mapper_class_init(AgsTrackCollectionMapperClass *track_collection_mapper); void ags_track_collection_mapper_connectable_interface_init(AgsConnectableInterface *connectable); void ags_track_collection_mapper_applicable_interface_init(AgsApplicableInterface *applicable); void ags_track_collection_mapper_init(AgsTrackCollectionMapper *track_collection_mapper); void ags_track_collection_mapper_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_track_collection_mapper_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_track_collection_mapper_connect(AgsConnectable *connectable); void ags_track_collection_mapper_disconnect(AgsConnectable *connectable); void ags_track_collection_mapper_set_update(AgsApplicable *applicable, gboolean update); void ags_track_collection_mapper_apply(AgsApplicable *applicable); void ags_track_collection_mapper_reset(AgsApplicable *applicable); /** * SECTION:ags_track_collection_mapper * @short_description: pack pad editors. * @title: AgsTrackCollectionMapper * @section_id: * @include: ags/X/ags_track_collection_mapper.h * * #AgsTrackCollectionMapper is a wizard to import midi files and do track mapping.. */ enum{ PROP_0, PROP_TRACK, PROP_INSTRUMENT, PROP_SEQUENCE, }; GType ags_track_collection_mapper_get_type(void) { static GType ags_type_track_collection_mapper = 0; if(!ags_type_track_collection_mapper){ static const GTypeInfo ags_track_collection_mapper_info = { sizeof (AgsTrackCollectionMapperClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_track_collection_mapper_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTrackCollectionMapper), 0, /* n_preallocs */ (GInstanceInitFunc) ags_track_collection_mapper_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_track_collection_mapper_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_track_collection_mapper_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_track_collection_mapper = g_type_register_static(GTK_TYPE_TABLE, "AgsTrackCollectionMapper", &ags_track_collection_mapper_info, 0); g_type_add_interface_static(ags_type_track_collection_mapper, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_track_collection_mapper, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_track_collection_mapper); } void ags_track_collection_mapper_class_init(AgsTrackCollectionMapperClass *track_collection_mapper) { GObjectClass *gobject; GParamSpec *param_spec; /* GObjectClass */ gobject = (GObjectClass *) track_collection_mapper; gobject->set_property = ags_track_collection_mapper_set_property; gobject->get_property = ags_track_collection_mapper_get_property; /* properties */ /** * AgsTrackCollectionMapper:track: * * The tracks as xmlNode to parse. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("track", i18n_pspec("assigned track"), i18n_pspec("The track which this track mapper is assigned with"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TRACK, param_spec); /** * AgsTrackCollectionMapper:instrument: * * The instruments as string to parse. * * Since: 1.0.0 */ param_spec = g_param_spec_string("instrument", i18n_pspec("assigned instrument"), i18n_pspec("The instrument which this track mapper is assigned with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INSTRUMENT, param_spec); /** * AgsTrackCollectionMapper:sequence: * * The sequences as string to parse. * * Since: 1.0.0 */ param_spec = g_param_spec_string("sequence", i18n_pspec("assigned sequence"), i18n_pspec("The sequence which this track mapper is assigned with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCE, param_spec); } void ags_track_collection_mapper_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_track_collection_mapper_connect; connectable->disconnect = ags_track_collection_mapper_disconnect; } void ags_track_collection_mapper_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_track_collection_mapper_set_update; applicable->apply = ags_track_collection_mapper_apply; applicable->reset = ags_track_collection_mapper_reset; } void ags_track_collection_mapper_init(AgsTrackCollectionMapper *track_collection_mapper) { GtkLabel *label; gtk_table_resize((GtkTable *) track_collection_mapper, 3, 4); track_collection_mapper->instrument = NULL; track_collection_mapper->sequence = NULL; track_collection_mapper->track = NULL; track_collection_mapper->notation = NULL; /* enabled */ track_collection_mapper->enabled = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("enabled")); gtk_table_attach((GtkTable *) track_collection_mapper, (GtkWidget *) track_collection_mapper->enabled, 0, 4, 0, 1, GTK_FILL, GTK_FILL, 0, 0); /* info box */ track_collection_mapper->info = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_table_attach((GtkTable *) track_collection_mapper, (GtkWidget *) track_collection_mapper->info, 0, 4, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* instrument */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("instrument: "), "xalign", 0.0, NULL); gtk_box_pack_start(GTK_BOX(track_collection_mapper->info), GTK_WIDGET(label), TRUE, TRUE, 0); /* sequence */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("sequence: "), "xalign", 0.0, NULL); gtk_box_pack_start(GTK_BOX(track_collection_mapper->info), GTK_WIDGET(label), TRUE, TRUE, 0); /* machine type */ track_collection_mapper->machine_type = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach((GtkTable *) track_collection_mapper, (GtkWidget *) track_collection_mapper->machine_type, 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* audio channels */ track_collection_mapper->audio_channels = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 16.0, 1.0); gtk_spin_button_set_value(track_collection_mapper->audio_channels, 2.0); gtk_table_attach((GtkTable *) track_collection_mapper, (GtkWidget *) track_collection_mapper->audio_channels, 2, 3, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* offset */ track_collection_mapper->offset = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, (gdouble) AGS_NOTATION_EDITOR_MAX_CONTROLS, 1.0); gtk_table_attach((GtkTable *) track_collection_mapper, (GtkWidget *) track_collection_mapper->offset, 3, 4, 2, 3, GTK_FILL, GTK_FILL, 0, 0); } void ags_track_collection_mapper_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsTrackCollectionMapper *track_collection_mapper; track_collection_mapper = AGS_TRACK_COLLECTION_MAPPER(gobject); switch(prop_id){ case PROP_TRACK: { xmlNode *track; track = (xmlNode *) g_value_get_pointer(value); if(g_list_find(track_collection_mapper->track, track) != NULL){ return; } track_collection_mapper->track = g_list_prepend(track_collection_mapper->track, track); } break; case PROP_INSTRUMENT: { GList *list, *list_start; gchar *str; gchar *instrument; instrument = g_value_get_string(value); if(instrument == track_collection_mapper->instrument){ return; } if(track_collection_mapper->instrument != NULL){ g_free(track_collection_mapper->instrument); } track_collection_mapper->instrument = g_strdup(instrument); list_start = list = gtk_container_get_children((GtkContainer *) track_collection_mapper->info); str = g_strdup_printf("%s: %s", i18n("instrument"), instrument); gtk_label_set_text(list->data, str); g_list_free(list_start); g_free(str); } break; case PROP_SEQUENCE: { GList *list, *list_start; gchar *str; gchar *sequence; sequence = g_value_get_string(value); if(sequence == track_collection_mapper->sequence){ return; } if(track_collection_mapper->sequence != NULL){ g_free(track_collection_mapper->sequence); } track_collection_mapper->sequence = g_strdup(sequence); list_start = list = gtk_container_get_children((GtkContainer *) track_collection_mapper->info); list = list->next; str = g_strdup_printf("%s: %s", i18n("sequence"), sequence); gtk_label_set_text(list->data, str); g_list_free(list_start); g_free(str); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_track_collection_mapper_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsTrackCollectionMapper *track_collection_mapper; track_collection_mapper = AGS_TRACK_COLLECTION_MAPPER(gobject); switch(prop_id){ case PROP_TRACK: { g_value_set_pointer(value, g_list_copy(track_collection_mapper->track)); } break; case PROP_INSTRUMENT: { g_value_set_string(value, track_collection_mapper->instrument); } break; case PROP_SEQUENCE: { g_value_set_string(value, track_collection_mapper->sequence); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_track_collection_mapper_connect(AgsConnectable *connectable) { AgsTrackCollectionMapper *track_collection_mapper; track_collection_mapper = AGS_TRACK_COLLECTION_MAPPER(connectable); } void ags_track_collection_mapper_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_track_collection_mapper_set_update(AgsApplicable *applicable, gboolean update) { AgsTrackCollectionMapper *track_collection_mapper; track_collection_mapper = AGS_TRACK_COLLECTION_MAPPER(applicable); } void ags_track_collection_mapper_apply(AgsApplicable *applicable) { AgsWindow *window; AgsMachine *machine; AgsMidiImportWizard *midi_import_wizard; AgsTrackCollectionMapper *track_collection_mapper; AgsAddAudio *add_audio; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; xmlNode *clipboard; GList *notation, *imported_notation; gchar *machine_type; track_collection_mapper = AGS_TRACK_COLLECTION_MAPPER(applicable); if(!gtk_toggle_button_get_active(track_collection_mapper->enabled)){ return; } midi_import_wizard = (AgsMidiImportWizard *) gtk_widget_get_ancestor((GtkWidget *) track_collection_mapper, AGS_TYPE_MIDI_IMPORT_WIZARD); window = (AgsWindow *) midi_import_wizard->main_window; application_context = (AgsApplicationContext *) window->application_context; main_loop = (AgsThread *) application_context->main_loop; gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* create machine */ machine_type = gtk_combo_box_text_get_active_text(track_collection_mapper->machine_type); if(!g_ascii_strcasecmp(machine_type, g_type_name(AGS_TYPE_DRUM))){ machine = (AgsMachine *) ags_drum_new(window->soundcard); }else if(!g_ascii_strcasecmp(machine_type, g_type_name(AGS_TYPE_MATRIX))){ machine = (AgsMachine *) ags_matrix_new(window->soundcard); }else if(!g_ascii_strcasecmp(machine_type, g_type_name(AGS_TYPE_SYNCSYNTH))){ machine = (AgsMachine *) ags_syncsynth_new(window->soundcard); }else if(!g_ascii_strcasecmp(machine_type, g_type_name(AGS_TYPE_FFPLAYER))){ machine = (AgsMachine *) ags_ffplayer_new(window->soundcard); }else if(!g_ascii_strcasecmp(machine_type, g_type_name(AGS_TYPE_SYNTH))){ machine = (AgsMachine *) ags_synth_new(window->soundcard); }else{ g_warning("unknown machine type"); } /* connect everything */ ags_connectable_connect(AGS_CONNECTABLE(machine)); /* set size */ ags_audio_set_audio_channels(machine->audio, gtk_spin_button_get_value_as_int(track_collection_mapper->audio_channels)); ags_audio_set_pads(machine->audio, AGS_TYPE_OUTPUT, 1); ags_audio_set_pads(machine->audio, AGS_TYPE_INPUT, 128); /* apply notation */ imported_notation = track_collection_mapper->notation; notation = machine->audio->notation; ags_notation_add_all_to_selection(imported_notation->data); clipboard = ags_notation_copy_selection(imported_notation->data); while(notation != NULL){ ags_notation_insert_from_clipboard(notation->data, clipboard, 0, 0, 0, 0); notation = notation->next; } /* add audio */ add_audio = ags_add_audio_new(window->soundcard, machine->audio); ags_gui_thread_schedule_task(gui_thread, add_audio); gtk_box_pack_start((GtkBox *) window->machines, GTK_WIDGET(machine), FALSE, FALSE, 0); /* */ gtk_widget_show_all(GTK_WIDGET(machine)); } void ags_track_collection_mapper_reset(AgsApplicable *applicable) { AgsTrackCollectionMapper *track_collection_mapper; track_collection_mapper = AGS_TRACK_COLLECTION_MAPPER(applicable); } /** * ags_track_collection_mapper_find_instrument_with_sequence: * @track_collection_mapper: a #GList containing #AgsTrackCollectionMapper * @instrument: the instrument as string * @sequence: the sequence as string * * Finds next matching track in a #GList. * * Returns: the next matching #GList * * Since: 1.0.0 */ GList* ags_track_collection_mapper_find_instrument_with_sequence(GList *track_collection_mapper, gchar *instrument, gchar *sequence) { if(instrument == NULL || sequence == NULL){ return(NULL); } while(track_collection_mapper != NULL){ if((!g_ascii_strcasecmp(AGS_TRACK_COLLECTION_MAPPER(track_collection_mapper->data)->instrument, instrument) && !g_ascii_strcasecmp(AGS_TRACK_COLLECTION_MAPPER(track_collection_mapper->data)->sequence, sequence))){ return(track_collection_mapper); } track_collection_mapper = track_collection_mapper->next; } return(NULL); } /** * ags_track_collection_mapper_map: * @track_collection_mapper: an #AgsTrackCollectionMapper * * Maps XML tracks to #AgsNotation * * Since: 1.0.0 */ void ags_track_collection_mapper_map(AgsTrackCollectionMapper *track_collection_mapper) { AgsTrackCollection *track_collection; AgsNotation *current_notation; AgsNote *note; xmlNode *current, *child; GList *track, *notation_start, *notation; GList *list; guint audio_channels; guint n_key_on, n_key_off; guint x, y, velocity; guint default_length; guint i; gboolean pattern; track_collection = (AgsTrackCollection *) gtk_widget_get_ancestor((GtkWidget *) track_collection_mapper, AGS_TYPE_TRACK_COLLECTION); track = track_collection_mapper->track; /* map notation */ notation_start = notation = NULL; audio_channels = 1; for(i = 0; i < audio_channels; i++){ current_notation = ags_notation_new(NULL, i); notation_start = g_list_prepend(notation_start, current_notation); } track_collection_mapper->notation = notation_start; n_key_on = 0; n_key_off = 0; default_length = track_collection->default_length; if(default_length == 0){ default_length = 1; } while(track != NULL){ current = track->data; notation = notation_start; child = current->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(xmlGetProp(child, "event"), "note-on", 8)){ x = (AGS_TRACK_COLLECTION_MAPPER_DEFAULT_BEATS / AGS_MIDI_DEFAULT_BEATS) * (guint) round(g_ascii_strtod(xmlGetProp(child, "delta-time"), NULL) / track_collection->bpm) - track_collection->first_offset; y = (guint) g_ascii_strtoull(xmlGetProp(child, "note"), NULL, 10); velocity = (guint) g_ascii_strtoull(xmlGetProp(child, "velocity"), NULL, 10); notation = notation_start; while(notation != NULL){ note = ags_note_new(); note->x[0] = x; note->x[1] = x + default_length; note->y = y; ags_complex_set(&(note->attack), velocity); ags_notation_add_note(notation->data, note, FALSE); notation = notation->next; } // g_object_unref(note); n_key_on++; }else if(!xmlStrncmp(xmlGetProp(child, "event"), "note-off", 9)){ x = (AGS_TRACK_COLLECTION_MAPPER_DEFAULT_BEATS / AGS_MIDI_DEFAULT_BEATS) * (guint) round(g_ascii_strtod(xmlGetProp(child, "delta-time"), NULL) / track_collection->bpm) - track_collection->first_offset; y = (guint) g_ascii_strtoull(xmlGetProp(child, "note"), NULL, 10); velocity = (guint) g_ascii_strtoull(xmlGetProp(child, "velocity"), NULL, 10); while(notation != NULL){ list = ags_note_find_prev(AGS_NOTATION(notation->data)->notes, x, y); if(list != NULL){ note = list->data; if(note->x[0] == x){ note->x[1] = x + 1; }else{ note->x[1] = x; } note->y = y; ags_complex_set(&(note->release), velocity); } notation = notation->next; } n_key_off++; } } child = child->next; } track = track->next; } /* populate machine_type */ gtk_combo_box_text_append_text(track_collection_mapper->machine_type, g_type_name(AGS_TYPE_SYNCSYNTH)); gtk_combo_box_text_append_text(track_collection_mapper->machine_type, g_type_name(AGS_TYPE_FFPLAYER)); gtk_combo_box_text_append_text(track_collection_mapper->machine_type, g_type_name(AGS_TYPE_DRUM)); gtk_combo_box_text_append_text(track_collection_mapper->machine_type, g_type_name(AGS_TYPE_MATRIX)); gtk_combo_box_set_active(GTK_COMBO_BOX(track_collection_mapper->machine_type), 0); } /** * ags_track_collection_mapper_new: * * Creates an #AgsTrackCollectionMapper * * Returns: a new #AgsTrackCollectionMapper * * Since: 1.0.0 */ AgsTrackCollectionMapper* ags_track_collection_mapper_new() { AgsTrackCollectionMapper *track_collection_mapper; track_collection_mapper = (AgsTrackCollectionMapper *) g_object_new(AGS_TYPE_TRACK_COLLECTION_MAPPER, NULL); return(track_collection_mapper); } gsequencer-1.4.24/ags/X/import/ags_midi_import_wizard.h0000644000175000017500000000451713246707333020075 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MIDI_IMPORT_WIZARD_H__ #define __AGS_MIDI_IMPORT_WIZARD_H__ #include #include #include #define AGS_TYPE_MIDI_IMPORT_WIZARD (ags_midi_import_wizard_get_type()) #define AGS_MIDI_IMPORT_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIDI_IMPORT_WIZARD, AgsMidiImportWizard)) #define AGS_MIDI_IMPORT_WIZARD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MIDI_IMPORT_WIZARD, AgsMidiImportWizardClass)) #define AGS_IS_MIDI_IMPORT_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MIDI_IMPORT_WIZARD)) #define AGS_IS_MIDI_IMPORT_WIZARD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MIDI_IMPORT_WIZARD)) #define AGS_MIDI_IMPORT_WIZARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MIDI_IMPORT_WIZARD, AgsMidiImportWizardClass)) typedef struct _AgsMidiImportWizard AgsMidiImportWizard; typedef struct _AgsMidiImportWizardClass AgsMidiImportWizardClass; typedef enum{ AGS_MIDI_IMPORT_WIZARD_CONNECTED = 1, AGS_MIDI_IMPORT_WIZARD_SHOW_FILE_CHOOSER = 1 << 1, AGS_MIDI_IMPORT_WIZARD_SHOW_TRACK_COLLECTION = 1 << 2, }AgsMidiImportWizardFlags; struct _AgsMidiImportWizard { GtkDialog dialog; guint flags; GObject *application_context; GtkWidget *main_window; GtkWidget *file_chooser; GtkWidget *track_collection; }; struct _AgsMidiImportWizardClass { GtkDialogClass dialog; }; GType ags_midi_import_wizard_get_type(void); AgsMidiImportWizard* ags_midi_import_wizard_new(); #endif /*__AGS_MIDI_IMPORT_WIZARD_H__*/ gsequencer-1.4.24/ags/X/import/ags_track_collection.c0000644000175000017500000003767313246707333017524 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_track_collection_class_init(AgsTrackCollectionClass *track_collection); void ags_track_collection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_track_collection_applicable_interface_init(AgsApplicableInterface *applicable); void ags_track_collection_init(AgsTrackCollection *track_collection); void ags_track_collection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_track_collection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_track_collection_connect(AgsConnectable *connectable); void ags_track_collection_disconnect(AgsConnectable *connectable); void ags_track_collection_set_update(AgsApplicable *applicable, gboolean update); void ags_track_collection_apply(AgsApplicable *applicable); void ags_track_collection_reset(AgsApplicable *applicable); /** * SECTION:ags_track_collection * @short_description: Property of audio, channels or pads in bulk mode. * @title: AgsTrackCollection * @section_id: * @include: ags/X/ags_track_collection.h * * #AgsTrackCollection is a composite widget to property. A property editor * should be packed by a #AgsPropertyCollectionEditor. */ enum{ PROP_0, PROP_MIDI_DOCUMENT, }; static gpointer ags_track_collection_parent_class = NULL; GType ags_track_collection_get_type(void) { static GType ags_type_track_collection = 0; if(!ags_type_track_collection){ static const GTypeInfo ags_track_collection_info = { sizeof (AgsTrackCollectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_track_collection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTrackCollection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_track_collection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_track_collection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_track_collection_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_track_collection = g_type_register_static(GTK_TYPE_VBOX, "AgsTrackCollection", &ags_track_collection_info, 0); g_type_add_interface_static(ags_type_track_collection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_track_collection, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_track_collection); } void ags_track_collection_class_init(AgsTrackCollectionClass *track_collection) { GObjectClass *gobject; GParamSpec *param_spec; ags_track_collection_parent_class = g_type_class_peek_parent(track_collection); /* GObjectClass */ gobject = (GObjectClass *) track_collection; gobject->set_property = ags_track_collection_set_property; gobject->get_property = ags_track_collection_get_property; /* properties */ /** * AgsTrackCollection:midi-document: * * The assigned midi document. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("midi-document", i18n_pspec("midi document of track collection"), i18n_pspec("The midi document this track collection is assigned to"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MIDI_DOCUMENT, param_spec); } void ags_track_collection_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_track_collection_connect; connectable->disconnect = ags_track_collection_disconnect; } void ags_track_collection_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_track_collection_set_update; applicable->apply = ags_track_collection_apply; applicable->reset = ags_track_collection_reset; } void ags_track_collection_init(AgsTrackCollection *track_collection) { GtkScrolledWindow *scrolled_window; track_collection->midi_doc = NULL; track_collection->first_offset = 0; track_collection->bpm = 120.0; track_collection->default_length = 4; scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(track_collection), (GtkWidget *) scrolled_window, TRUE, TRUE, 0); track_collection->child = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_scrolled_window_add_with_viewport(scrolled_window, (GtkWidget *) track_collection->child); } void ags_track_collection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsTrackCollection *track_collection; track_collection = AGS_TRACK_COLLECTION(gobject); switch(prop_id){ case PROP_MIDI_DOCUMENT: { xmlDoc *midi_document; midi_document = (gchar *) g_value_get_pointer(value); if(track_collection->midi_doc == midi_document){ return; } track_collection->midi_doc = midi_document; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_track_collection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsTrackCollection *track_collection; track_collection = AGS_TRACK_COLLECTION(gobject); switch(prop_id){ case PROP_MIDI_DOCUMENT: { g_value_set_pointer(value, track_collection->midi_doc); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_track_collection_connect(AgsConnectable *connectable) { AgsTrackCollection *track_collection; GList *list, *list_start; track_collection = AGS_TRACK_COLLECTION(connectable); /* children */ list_start = list = gtk_container_get_children((GtkContainer *) track_collection->child); while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_track_collection_disconnect(AgsConnectable *connectable) { AgsTrackCollection *track_collection; GList *list, *list_start; track_collection = AGS_TRACK_COLLECTION(connectable); /* children */ list_start = list = gtk_container_get_children((GtkContainer *) track_collection->child); while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_track_collection_set_update(AgsApplicable *applicable, gboolean update) { AgsTrackCollection *track_collection; GList *list, *list_start; track_collection = AGS_TRACK_COLLECTION(applicable); list_start = list = gtk_container_get_children((GtkContainer *) track_collection->child); while(list != NULL){ ags_applicable_set_update(AGS_APPLICABLE(list->data), update); list = list->next; } g_list_free(list_start); } void ags_track_collection_apply(AgsApplicable *applicable) { AgsTrackCollection *track_collection; GList *list, *list_start; track_collection = AGS_TRACK_COLLECTION(applicable); list_start = list = gtk_container_get_children((GtkContainer *) track_collection->child); while(list != NULL){ ags_applicable_apply(AGS_APPLICABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_track_collection_reset(AgsApplicable *applicable) { AgsTrackCollection *track_collection; GList *list, *list_start; track_collection = AGS_TRACK_COLLECTION(applicable); list_start = list = gtk_container_get_children((GtkContainer *) track_collection->child); while(list != NULL){ ags_applicable_reset(AGS_APPLICABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_track_collection_parse(AgsTrackCollection *track_collection) { xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xmlNode *header_node, *tempo_node; xmlNode *time_signature_node; xmlNode **node, **instrument_node, **sequence_node; GList *list, *list_start; gchar *instrument, *sequence; gdouble sec_val; guint denominator, numerator; guint i, j; /* bpm and first_offset */ header_node = NULL; xpath_context = xmlXPathNewContext(track_collection->midi_doc); xpath_object = xmlXPathEval((xmlChar *) "//midi-header", xpath_context); if(xpath_object->nodesetval != NULL){ node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ header_node = node[i]; } } } tempo_node = NULL; xpath_context = xmlXPathNewContext(track_collection->midi_doc); xpath_object = xmlXPathEval((xmlChar *) "//midi-tracks/midi-track/midi-message[@event=\"tempo-number\"]", xpath_context); if(xpath_object->nodesetval != NULL){ node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ tempo_node = node[i]; } } } if(header_node == NULL || tempo_node == NULL){ return; } track_collection->first_offset = 0; sec_val = ags_midi_parser_ticks_to_sec(NULL, (guint) g_ascii_strtoull(xmlGetProp(header_node, "division"), NULL, 10), (gint) g_ascii_strtoll(xmlGetProp(header_node, "division"), NULL, 10), (guint) g_ascii_strtoull(xmlGetProp(tempo_node, "tempo"), NULL, 10)); // g_message("", sec_val); track_collection->bpm = 60.0 / sec_val; // g_message("bpm %f", track_collection->bpm); /* default length */ time_signature_node = NULL; denominator = 4; numerator = 4; xpath_context = xmlXPathNewContext(track_collection->midi_doc); xpath_object = xmlXPathEval((xmlChar *) "//midi-tracks/midi-track/midi-message[@event=\"time-signature\"]", xpath_context); if(xpath_object->nodesetval != NULL){ node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ time_signature_node = node[i]; } } if(time_signature_node != NULL){ xmlChar *str; str = xmlGetProp(time_signature_node, "timesig"); if(str != NULL){ sscanf(str, "%d/%d", &numerator, &denominator); } } } track_collection->default_length = numerator * (numerator / denominator); /* collect */ xpath_context = xmlXPathNewContext(track_collection->midi_doc); xpath_object = xmlXPathEval((xmlChar *) "//midi-tracks/midi-track", xpath_context); if(xpath_object->nodesetval != NULL){ node = xpath_object->nodesetval->nodeTab; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(node[i]->type == XML_ELEMENT_NODE){ xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; GList *track_collection_mapper; instrument = NULL; sequence = NULL; xpath_context = xmlXPathNewContext(track_collection->midi_doc); // xmlXPathSetContextNode(node[i], // xpath_context); xpath_context->node = node[i]; xpath_object = xmlXPathEval((xmlChar *) "./midi-message[boolean(@instrument-name)]", xpath_context); if(xpath_object->nodesetval != NULL){ instrument_node = xpath_object->nodesetval->nodeTab; for(j = 0; j < xpath_object->nodesetval->nodeNr; j++){ if(instrument_node[j]->type == XML_ELEMENT_NODE){ instrument = xmlGetProp(instrument_node[j], "instrument-name"); break; } } } xpath_context = xmlXPathNewContext(track_collection->midi_doc); // xmlXPathSetContextNode(node[i], // xpath_context); xpath_context->node = node[i]; xpath_object = xmlXPathEval((xmlChar *) "./midi-message[boolean(@sequence-name)]", xpath_context); if(xpath_object->nodesetval != NULL){ sequence_node = xpath_object->nodesetval->nodeTab; for(j = 0; j < xpath_object->nodesetval->nodeNr; j++){ if(sequence_node[j]->type == XML_ELEMENT_NODE){ sequence = xmlGetProp(sequence_node[j], "sequence-name"); break; } } } if(instrument == NULL){ instrument = g_strdup("GSequencer - instrument default"); } if(sequence == NULL){ sequence = g_strdup("GSequencer - sequence default"); } list = gtk_container_get_children((GtkContainer *) track_collection->child); track_collection_mapper = ags_track_collection_mapper_find_instrument_with_sequence(list, instrument, sequence); if(track_collection_mapper == NULL){ ags_track_collection_add_mapper(track_collection, node[i], instrument, sequence); }else{ g_object_set(AGS_TRACK_COLLECTION_MAPPER(track_collection_mapper->data), "track", node[i], NULL); } g_list_free(list); } } } // xmlSaveFormatFileEnc("-", track_collection->midi_doc, "UTF-8", 1); /* map */ list_start = list = gtk_container_get_children((GtkContainer *) track_collection->child); while(list != NULL){ ags_track_collection_mapper_map(list->data); gtk_widget_show_all(GTK_WIDGET(list->data)); list = list->next; } g_list_free(list_start); } void ags_track_collection_add_mapper(AgsTrackCollection *track_collection, xmlNode *track, gchar *instrument, gchar *sequence) { AgsTrackCollectionMapper *track_collection_mapper; if(track == NULL){ return; } g_message("%s", instrument); g_message("%s", sequence); track_collection_mapper = (AgsTrackCollectionMapper *) g_object_newv(track_collection->child_type, track_collection->child_parameter_count, track_collection->child_parameter); g_object_set(track_collection_mapper, "track", track, "instrument", instrument, "sequence", sequence, NULL); gtk_box_pack_start(GTK_BOX(track_collection->child), GTK_WIDGET(track_collection_mapper), FALSE, FALSE, 0); } /** * ags_track_collection_new: * @child_type: the child type * @child_parameter_count: the child parameter count * @child_parameter: the child parameters * * Creates an #AgsTrackCollection * * Returns: a new #AgsTrackCollection * * Since: 1.0.0 */ AgsTrackCollection* ags_track_collection_new(GType child_type, guint child_parameter_count, GParameter *child_parameter) { AgsTrackCollection *track_collection; track_collection = (AgsTrackCollection *) g_object_new(AGS_TYPE_TRACK_COLLECTION, NULL); track_collection->child_type = child_type; track_collection->child_parameter_count = child_parameter_count; track_collection->child_parameter = child_parameter; return(track_collection); } gsequencer-1.4.24/ags/X/import/ags_track_collection.h0000644000175000017500000000471013246707333017513 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_TRACK_COLLECTION_H__ #define __AGS_TRACK_COLLECTION_H__ #include #include #include #include #define AGS_TYPE_TRACK_COLLECTION (ags_track_collection_get_type()) #define AGS_TRACK_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TRACK_COLLECTION, AgsTrackCollection)) #define AGS_TRACK_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TRACK_COLLECTION, AgsTrackCollectionClass)) #define AGS_IS_TRACK_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TRACK_COLLECTION)) #define AGS_IS_TRACK_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TRACK_COLLECTION)) #define AGS_TRACK_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_TRACK_COLLECTION, AgsTrackCollectionClass)) typedef struct _AgsTrackCollection AgsTrackCollection; typedef struct _AgsTrackCollectionClass AgsTrackCollectionClass; struct _AgsTrackCollection { GtkVBox vbox; xmlDoc *midi_doc; guint first_offset; gdouble bpm; guint default_length; GType child_type; guint child_parameter_count; GParameter *child_parameter; GtkVBox *child; }; struct _AgsTrackCollectionClass { GtkVBoxClass vbox; }; GType ags_track_collection_get_type(); void ags_track_collection_parse(AgsTrackCollection *track_collection); void ags_track_collection_add_mapper(AgsTrackCollection *track_collection, xmlNode *track, gchar *instrument, gchar *sequence); AgsTrackCollection* ags_track_collection_new(GType child_type, guint child_parameter_count, GParameter *child_parameter); #endif /*__AGS_TRACK_COLLECTION_H__*/ gsequencer-1.4.24/ags/X/import/ags_midi_import_wizard_callbacks.c0000644000175000017500000000611013246707333022056 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_midi_import_wizard_response_callback(GtkWidget *wizard, gint response, gpointer data) { AgsMidiImportWizard *midi_import_wizard; midi_import_wizard = (AgsMidiImportWizard *) wizard; switch(response){ case GTK_RESPONSE_REJECT: { if((AGS_MIDI_IMPORT_WIZARD_SHOW_TRACK_COLLECTION & (midi_import_wizard->flags)) != 0){ /* show/hide */ midi_import_wizard->flags |= AGS_MIDI_IMPORT_WIZARD_SHOW_FILE_CHOOSER; midi_import_wizard->flags &= (~AGS_MIDI_IMPORT_WIZARD_SHOW_TRACK_COLLECTION); gtk_widget_hide(midi_import_wizard->track_collection->parent); gtk_widget_show(midi_import_wizard->file_chooser->parent); gtk_widget_show_all(midi_import_wizard->file_chooser); } } break; case GTK_RESPONSE_ACCEPT: { if((AGS_MIDI_IMPORT_WIZARD_SHOW_FILE_CHOOSER & (midi_import_wizard->flags)) != 0){ AgsMidiParser *midi_parser; xmlDoc *midi_doc; FILE *file; /* show/hide */ gtk_widget_hide(midi_import_wizard->file_chooser->parent); gtk_widget_show(midi_import_wizard->track_collection->parent); gtk_widget_show_all(midi_import_wizard->track_collection); midi_import_wizard->flags |= AGS_MIDI_IMPORT_WIZARD_SHOW_TRACK_COLLECTION; midi_import_wizard->flags &= (~AGS_MIDI_IMPORT_WIZARD_SHOW_FILE_CHOOSER); /* parse */ file = fopen(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(midi_import_wizard->file_chooser)), "r"); midi_parser = ags_midi_parser_new(file); midi_doc = ags_midi_parser_parse_full(midi_parser); // xmlSaveFormatFileEnc("-", midi_doc, "UTF-8", 1); g_object_set(midi_import_wizard->track_collection, "midi-document", midi_doc, NULL); ags_track_collection_parse((AgsTrackCollection *) midi_import_wizard->track_collection); } } break; case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(wizard)); } case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_CLOSE: case GTK_RESPONSE_CANCEL: { AGS_WINDOW(midi_import_wizard->main_window)->midi_import_wizard = NULL; gtk_widget_destroy(wizard); } break; default: g_warning("unknown response"); } } gsequencer-1.4.24/ags/X/import/ags_track_collection_mapper_callbacks.c0000644000175000017500000000150213246707333023045 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/import/ags_midi_import_wizard_callbacks.h0000644000175000017500000000214713246707333022071 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MIDI_IMPORT_WIZARD_CALLBACKS_H__ #define __AGS_MIDI_IMPORT_WIZARD_CALLBACKS_H__ #include #include #include #include void ags_midi_import_wizard_response_callback(GtkWidget *wizard, gint response, gpointer data); #endif /*__AGS_MIDI_IMPORT_WIZARD_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/import/ags_track_collection_mapper.h0000644000175000017500000000523213246707333021057 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_TRACK_COLLECTION_MAPPER_H__ #define __AGS_TRACK_COLLECTION_MAPPER_H__ #include #include #include #define AGS_TYPE_TRACK_COLLECTION_MAPPER (ags_track_collection_mapper_get_type()) #define AGS_TRACK_COLLECTION_MAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TRACK_COLLECTION_MAPPER, AgsTrackCollectionMapper)) #define AGS_TRACK_COLLECTION_MAPPER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TRACK_COLLECTION_MAPPER, AgsTrackCollectionMapperClass)) #define AGS_IS_TRACK_COLLECTION_MAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TRACK_COLLECTION_MAPPER)) #define AGS_IS_TRACK_COLLECTION_MAPPER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TRACK_COLLECTION_MAPPER)) #define AGS_TRACK_COLLECTION_MAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_TRACK_COLLECTION_MAPPER, AgsTrackCollectionMapperClass)) #define AGS_TRACK_COLLECTION_MAPPER_DEFAULT_BEATS (16.0) #define AGS_MIDI_DEFAULT_BEATS (4.0) typedef struct _AgsTrackCollectionMapper AgsTrackCollectionMapper; typedef struct _AgsTrackCollectionMapperClass AgsTrackCollectionMapperClass; struct _AgsTrackCollectionMapper { GtkTable table; gchar *instrument; gchar *sequence; GList *track; GList *notation; GtkCheckButton *enabled; GtkVBox *info; GtkComboBoxText *machine_type; GtkSpinButton *audio_channels; GtkSpinButton *offset; }; struct _AgsTrackCollectionMapperClass { GtkTableClass table; }; GType ags_track_collection_mapper_get_type(void); GList* ags_track_collection_mapper_find_instrument_with_sequence(GList *track_collection_mapper, gchar *instrument, gchar *sequence); void ags_track_collection_mapper_map(AgsTrackCollectionMapper *track_collection_mapper); AgsTrackCollectionMapper* ags_track_collection_mapper_new(); #endif /*__AGS_TRACK_COLLECTION_MAPPER_H__*/ gsequencer-1.4.24/ags/X/import/ags_track_collection_callbacks.c0000644000175000017500000000147413246707333021511 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/import/ags_track_collection_mapper_callbacks.h0000644000175000017500000000203213246707333023051 00000000000000/* 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 . */ #ifndef __AGS_TRACK_COLLECTION_MAPPER_CALLBACKS_H__ #define __AGS_TRACK_COLLECTION_MAPPER_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_TRACK_COLLECTION_MAPPER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/export/0000755000175000017500000000000013256233676013263 500000000000000gsequencer-1.4.24/ags/X/export/ags_machine_collection_entry.h0000644000175000017500000000440413246707333021243 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MACHINE_COLLECTION_ENTRY_H__ #define __AGS_MACHINE_COLLECTION_ENTRY_H__ #include #include #include #define AGS_TYPE_MACHINE_COLLECTION_ENTRY (ags_machine_collection_entry_get_type()) #define AGS_MACHINE_COLLECTION_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MACHINE_COLLECTION_ENTRY, AgsMachineCollectionEntry)) #define AGS_MACHINE_COLLECTION_ENTRY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MACHINE_COLLECTION_ENTRY, AgsMachineCollectionEntryClass)) #define AGS_IS_MACHINE_COLLECTION_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MACHINE_COLLECTION_ENTRY)) #define AGS_IS_MACHINE_COLLECTION_ENTRY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MACHINE_COLLECTION_ENTRY)) #define AGS_MACHINE_COLLECTION_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MACHINE_COLLECTION_ENTRY, AgsMachineCollectionEntryClass)) typedef struct _AgsMachineCollectionEntry AgsMachineCollectionEntry; typedef struct _AgsMachineCollectionEntryClass AgsMachineCollectionEntryClass; struct _AgsMachineCollectionEntry { GtkTable table; GtkWidget *machine; GtkCheckButton *enabled; GtkLabel *label; GtkEntry *instrument; GtkEntry *sequence; }; struct _AgsMachineCollectionEntryClass { GtkTableClass table; }; GType ags_machine_collection_entry_get_type(void); AgsMachineCollectionEntry* ags_machine_collection_entry_new(); #endif /*__AGS_MACHINE_COLLECTION_ENTRY_H__*/ gsequencer-1.4.24/ags/X/export/ags_machine_collection_entry_callbacks.h0000644000175000017500000000174713246707333023251 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MACHINE_COLLECTION_ENTRY_CALLBACKS_H__ #define __AGS_MACHINE_COLLECTION_ENTRY_CALLBACKS_H__ #include #include #include #endif /*__AGS_MACHINE_COLLECTION_ENTRY_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/export/ags_machine_collection_entry.c0000644000175000017500000003553613246707333021250 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_machine_collection_entry_class_init(AgsMachineCollectionEntryClass *machine_collection_entry); void ags_machine_collection_entry_connectable_interface_init(AgsConnectableInterface *connectable); void ags_machine_collection_entry_applicable_interface_init(AgsApplicableInterface *applicable); void ags_machine_collection_entry_init(AgsMachineCollectionEntry *machine_collection_entry); void ags_machine_collection_entry_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_machine_collection_entry_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_machine_collection_entry_connect(AgsConnectable *connectable); void ags_machine_collection_entry_disconnect(AgsConnectable *connectable); void ags_machine_collection_entry_set_update(AgsApplicable *applicable, gboolean update); void ags_machine_collection_entry_apply(AgsApplicable *applicable); void ags_machine_collection_entry_reset(AgsApplicable *applicable); /** * SECTION:ags_machine_collection_entry * @short_description: pack pad editors. * @title: AgsMachineCollectionEntry * @section_id: * @include: ags/X/ags_machine_collection_entry.h * * #AgsMachineCollectionEntry is a wizard to export midi files and do machine mapping. */ enum{ PROP_0, PROP_MACHINE, }; GType ags_machine_collection_entry_get_type(void) { static GType ags_type_machine_collection_entry = 0; if(!ags_type_machine_collection_entry){ static const GTypeInfo ags_machine_collection_entry_info = { sizeof (AgsMachineCollectionEntryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_machine_collection_entry_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMachineCollectionEntry), 0, /* n_preallocs */ (GInstanceInitFunc) ags_machine_collection_entry_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_machine_collection_entry_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_machine_collection_entry_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_machine_collection_entry = g_type_register_static(GTK_TYPE_TABLE, "AgsMachineCollectionEntry", &ags_machine_collection_entry_info, 0); g_type_add_interface_static(ags_type_machine_collection_entry, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_machine_collection_entry, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_machine_collection_entry); } void ags_machine_collection_entry_class_init(AgsMachineCollectionEntryClass *machine_collection_entry) { GObjectClass *gobject; GParamSpec *param_spec; /* GObjectClass */ gobject = (GObjectClass *) machine_collection_entry; gobject->set_property = ags_machine_collection_entry_set_property; gobject->get_property = ags_machine_collection_entry_get_property; /* properties */ /** * AgsMachineCollectionEntry:machine: * * The assigned #AgsMachine. * * Since: 1.0.0 */ param_spec = g_param_spec_object("machine", i18n_pspec("assigned machine"), i18n_pspec("The machine which this machine entry is assigned with"), AGS_TYPE_MACHINE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MACHINE, param_spec); } void ags_machine_collection_entry_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_machine_collection_entry_connect; connectable->disconnect = ags_machine_collection_entry_disconnect; } void ags_machine_collection_entry_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_machine_collection_entry_set_update; applicable->apply = ags_machine_collection_entry_apply; applicable->reset = ags_machine_collection_entry_reset; } void ags_machine_collection_entry_init(AgsMachineCollectionEntry *machine_collection_entry) { GtkLabel *label; gtk_table_resize((GtkTable *) machine_collection_entry, 4, 4); machine_collection_entry->machine = NULL; /* enabled */ machine_collection_entry->enabled = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("enabled")); gtk_table_attach((GtkTable *) machine_collection_entry, (GtkWidget *) machine_collection_entry->enabled, 0, 4, 0, 1, GTK_FILL, GTK_FILL, 0, 0); /* machine label */ machine_collection_entry->label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, NULL); gtk_table_attach((GtkTable *) machine_collection_entry, (GtkWidget *) machine_collection_entry->label, 0, 4, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* instrument * / label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", "instrument: ", "xalign", 0.0, NULL); gtk_table_attach((GtkTable *) machine_collection_entry, (GtkWidget *) label, 0, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); machine_collection_entry->instrument = (GtkEntry *) gtk_entry_new(); gtk_table_attach((GtkTable *) machine_collection_entry, (GtkWidget *) machine_collection_entry->instrument, 2, 4, 2, 3, GTK_FILL, GTK_FILL, 0, 0); */ machine_collection_entry->instrument = NULL; /* sequence */ label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "label", i18n("sequence: "), "xalign", 0.0, NULL); gtk_table_attach((GtkTable *) machine_collection_entry, (GtkWidget *) label, 0, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); machine_collection_entry->sequence = (GtkEntry *) gtk_entry_new(); gtk_table_attach((GtkTable *) machine_collection_entry, (GtkWidget *) machine_collection_entry->sequence, 2, 4, 3, 4, GTK_FILL, GTK_FILL, 0, 0); } void ags_machine_collection_entry_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMachineCollectionEntry *machine_collection_entry; machine_collection_entry = AGS_MACHINE_COLLECTION_ENTRY(gobject); switch(prop_id){ case PROP_MACHINE: { GtkWidget *machine; machine = (GtkWidget *) g_value_get_object(value); if(machine_collection_entry->machine == machine){ return; } if(machine_collection_entry->machine != NULL){ g_object_unref(machine_collection_entry->machine); } if(machine != NULL){ g_object_ref(machine); /* fill in some fields */ gtk_label_set_text(machine_collection_entry->label, g_strdup_printf("%s: %s", G_OBJECT_TYPE_NAME(machine), AGS_MACHINE(machine)->machine_name)); // gtk_entry_set_text(machine_collection_entry->instrument, // G_OBJECT_TYPE_NAME(machine)); gtk_entry_set_text(machine_collection_entry->sequence, AGS_MACHINE(machine)->machine_name); } machine_collection_entry->machine = machine; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_collection_entry_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMachineCollectionEntry *machine_collection_entry; machine_collection_entry = AGS_MACHINE_COLLECTION_ENTRY(gobject); switch(prop_id){ case PROP_MACHINE: { g_value_set_object(value, machine_collection_entry->machine); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_collection_entry_connect(AgsConnectable *connectable) { AgsMachineCollectionEntry *machine_collection_entry; machine_collection_entry = AGS_MACHINE_COLLECTION_ENTRY(connectable); } void ags_machine_collection_entry_disconnect(AgsConnectable *connectable) { AgsMachineCollectionEntry *machine_collection_entry; machine_collection_entry = AGS_MACHINE_COLLECTION_ENTRY(connectable); /* empty */ } void ags_machine_collection_entry_set_update(AgsApplicable *applicable, gboolean update) { AgsMachineCollectionEntry *machine_collection_entry; machine_collection_entry = AGS_MACHINE_COLLECTION_ENTRY(applicable); } void ags_machine_collection_entry_apply(AgsApplicable *applicable) { AgsWindow *window; AgsMachine *machine; AgsMidiExportWizard *midi_export_wizard; AgsMachineCollectionEntry *machine_collection_entry; AgsMidiBuilder *midi_builder; AgsNote **check_match; GList *notation, *notation_start; GList *note; gint key_on[128]; gint key_off[128]; gboolean key_active[128]; gdouble bpm; guint division; guint delta_time; guint pulse_unit; guint notation_count; guint x, prev_x; guint i; gboolean initial_track; gboolean success; machine_collection_entry = AGS_MACHINE_COLLECTION_ENTRY(applicable); if(!gtk_toggle_button_get_active(machine_collection_entry->enabled)){ return; } midi_export_wizard = gtk_widget_get_ancestor(machine_collection_entry, AGS_TYPE_MIDI_EXPORT_WIZARD); window = midi_export_wizard->main_window; machine = machine_collection_entry->machine; notation_start = machine->audio->notation; midi_builder = midi_export_wizard->midi_builder; pulse_unit = midi_export_wizard->pulse_unit; bpm = midi_builder->midi_header->beat; division = midi_builder->midi_header->division; notation_count = g_list_length(notation_start); if(midi_builder->current_midi_track == NULL){ initial_track = TRUE; }else{ initial_track = FALSE; } /* append track */ ags_midi_builder_append_track(midi_builder, gtk_entry_get_text(machine_collection_entry->sequence)); /* append tempo */ if(initial_track){ //TODO:JK: improve hard-coded values ags_midi_builder_append_time_signature(midi_builder, 0, 4, 4, 4, 16); ags_midi_builder_append_tempo(midi_builder, 0, (guint) round(60.0 * 1000000.0 / bpm)); } /* put keys */ check_match = (AgsNote **) malloc(notation_count * sizeof(AgsNote *)); memset(key_on, -1, 128 * sizeof(gint)); memset(key_off, -1, 128 * sizeof(gint)); memset(key_active, FALSE, 128 * sizeof(gboolean)); delta_time = 0; prev_x = 0; success = TRUE; while(success){ notation = notation_start; for(i = 0; i < notation_count; i++){ check_match[i] = NULL; } /* check key-on */ for(i = 0; notation != NULL; i++){ note = AGS_NOTATION(notation->data)->notes; while(note != NULL){ if(AGS_NOTE(note->data)->y < 128){ if(key_on[AGS_NOTE(note->data)->y] < (gint) AGS_NOTE(note->data)->x[0]){ check_match[i] = AGS_NOTE(note->data); break; } } note = note->next; } notation = notation->next; } /* check key-off */ notation = notation_start; for(i = 0; notation != NULL; i++){ note = AGS_NOTATION(notation->data)->notes; while(note != NULL){ if(AGS_NOTE(note->data)->y < 128){ if(check_match[i] != NULL && check_match[i]->x[0] < AGS_NOTE(note->data)->x[1]){ break; } if(key_off[AGS_NOTE(note->data)->y] < (gint) AGS_NOTE(note->data)->x[1]){ check_match[i] = AGS_NOTE(note->data); break; } } note = note->next; } notation = notation->next; } /* find next pulse */ x = G_MAXUINT; success = FALSE; for(i = 0; i < notation_count; i++){ if(check_match[i] != NULL){ if(!key_active[check_match[i]->y]){ /* check key-on */ if(check_match[i]->x[0] < x){ x = check_match[i]->x[0]; success = TRUE; } }else if(key_active[check_match[i]->y]){ /* check key-off */ if(check_match[i]->x[1] < x){ x = check_match[i]->x[1]; success = TRUE; } } } } /* apply events matching pulse */ if(success){ for(i = 0; i < notation_count; i++){ if(check_match[i] != NULL){ if(x > prev_x){ delta_time += (x - prev_x) * pulse_unit; }else{ delta_time = 0; } if(check_match[i]->x[0] == x){ if(key_on[check_match[i]->y] != check_match[i]->x[0]){ /* append key-on */ ags_midi_builder_append_key_on(midi_builder, delta_time, 0, check_match[i]->y, 127); #ifdef AGS_DEBUG g_message("key-on %d,%d - %d", check_match[i]->x[0], check_match[i]->x[1], check_match[i]->y); #endif key_on[check_match[i]->y] = check_match[i]->x[0]; key_active[check_match[i]->y] = TRUE; } }else if(check_match[i]->x[1] == x){ if(key_off[check_match[i]->y] != check_match[i]->x[1]){ /* append key-off */ ags_midi_builder_append_key_off(midi_builder, delta_time, 0, check_match[i]->y, 127); key_off[check_match[i]->y] = check_match[i]->x[1]; key_active[check_match[i]->y] = FALSE; } } prev_x = x; } } } } } void ags_machine_collection_entry_reset(AgsApplicable *applicable) { AgsMachineCollectionEntry *machine_collection_entry; machine_collection_entry = AGS_MACHINE_COLLECTION_ENTRY(applicable); } /** * ags_machine_collection_entry_new: * * Creates an #AgsMachineCollectionEntry * * Returns: a new #AgsMachineCollectionEntry * * Since: 1.0.0 */ AgsMachineCollectionEntry* ags_machine_collection_entry_new() { AgsMachineCollectionEntry *machine_collection_entry; machine_collection_entry = (AgsMachineCollectionEntry *) g_object_new(AGS_TYPE_MACHINE_COLLECTION_ENTRY, NULL); return(machine_collection_entry); } gsequencer-1.4.24/ags/X/export/ags_machine_collection.h0000644000175000017500000000455613246707333020032 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MACHINE_COLLECTION_H__ #define __AGS_MACHINE_COLLECTION_H__ #include #include #include #define AGS_TYPE_MACHINE_COLLECTION (ags_machine_collection_get_type()) #define AGS_MACHINE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MACHINE_COLLECTION, AgsMachineCollection)) #define AGS_MACHINE_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MACHINE_COLLECTION, AgsMachineCollectionClass)) #define AGS_IS_MACHINE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MACHINE_COLLECTION)) #define AGS_IS_MACHINE_COLLECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MACHINE_COLLECTION)) #define AGS_MACHINE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MACHINE_COLLECTION, AgsMachineCollectionClass)) typedef struct _AgsMachineCollection AgsMachineCollection; typedef struct _AgsMachineCollectionClass AgsMachineCollectionClass; struct _AgsMachineCollection { GtkVBox vbox; GType child_type; guint child_parameter_count; GParameter *child_parameter; GtkVBox *child; }; struct _AgsMachineCollectionClass { GtkVBoxClass vbox; }; GType ags_machine_collection_get_type(); void ags_machine_collection_reload(AgsMachineCollection *machine_collection); void ags_machine_collection_add_entry(AgsMachineCollection *machine_collection, GtkWidget *machine); AgsMachineCollection* ags_machine_collection_new(GType child_type, guint child_parameter_count, GParameter *child_parameter); #endif /*__AGS_MACHINE_COLLECTION_H__*/ gsequencer-1.4.24/ags/X/export/ags_midi_export_wizard.h0000644000175000017500000000537313246707333020114 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MIDI_EXPORT_WIZARD_H__ #define __AGS_MIDI_EXPORT_WIZARD_H__ #include #include #include #include #include #define AGS_TYPE_MIDI_EXPORT_WIZARD (ags_midi_export_wizard_get_type()) #define AGS_MIDI_EXPORT_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIDI_EXPORT_WIZARD, AgsMidiExportWizard)) #define AGS_MIDI_EXPORT_WIZARD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MIDI_EXPORT_WIZARD, AgsMidiExportWizardClass)) #define AGS_IS_MIDI_EXPORT_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MIDI_EXPORT_WIZARD)) #define AGS_IS_MIDI_EXPORT_WIZARD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MIDI_EXPORT_WIZARD)) #define AGS_MIDI_EXPORT_WIZARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MIDI_EXPORT_WIZARD, AgsMidiExportWizardClass)) #define AGS_MIDI_EXPORT_WIZARD_DEFAULT_FILENAME "out.mid\0" #define AGS_MIDI_EXPORT_WIZARD_DEFAULT_TIMES (30) #define AGS_MIDI_EXPORT_WIZARD_DEFAULT_CLICKS (4) #define AGS_MIDI_EXPORT_WIZARD_DEFAULT_DIVISION (480) #define AGS_MIDI_EXPORT_WIZARD_DEFAULT_PULSE_UNIT (480.0 / 16.0) typedef struct _AgsMidiExportWizard AgsMidiExportWizard; typedef struct _AgsMidiExportWizardClass AgsMidiExportWizardClass; typedef enum{ AGS_MIDI_EXPORT_WIZARD_CONNECTED = 1, AGS_MIDI_EXPORT_WIZARD_SHOW_MACHINE_COLLECTION = 1 << 1, AGS_MIDI_EXPORT_WIZARD_SHOW_FILE_CHOOSER = 1 << 2, }AgsMidiExportWizardFlags; struct _AgsMidiExportWizard { GtkDialog dialog; guint flags; GObject *application_context; GtkWidget *main_window; AgsMidiBuilder *midi_builder; guint pulse_unit; GtkWidget *machine_collection; GtkWidget *file_chooser; }; struct _AgsMidiExportWizardClass { GtkDialogClass dialog; }; GType ags_midi_export_wizard_get_type(void); AgsMidiExportWizard* ags_midi_export_wizard_new(); #endif /*__AGS_MIDI_EXPORT_WIZARD_H__*/ gsequencer-1.4.24/ags/X/export/ags_midi_export_wizard_callbacks.h0000644000175000017500000000214713246707333022107 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MIDI_EXPORT_WIZARD_CALLBACKS_H__ #define __AGS_MIDI_EXPORT_WIZARD_CALLBACKS_H__ #include #include #include #include void ags_midi_export_wizard_response_callback(GtkWidget *wizard, gint response, gpointer data); #endif /*__AGS_MIDI_EXPORT_WIZARD_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/export/ags_machine_collection_callbacks.c0000644000175000017500000000147513246707333022021 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include gsequencer-1.4.24/ags/X/export/ags_machine_collection_entry_callbacks.c0000644000175000017500000000150313246707333023232 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include gsequencer-1.4.24/ags/X/export/ags_midi_export_wizard_callbacks.c0000644000175000017500000000470613246707333022105 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_midi_export_wizard_response_callback(GtkWidget *wizard, gint response, gpointer data) { AgsMidiExportWizard *midi_export_wizard; midi_export_wizard = (AgsMidiExportWizard *) wizard; switch(response){ case GTK_RESPONSE_REJECT: { if((AGS_MIDI_EXPORT_WIZARD_SHOW_FILE_CHOOSER & (midi_export_wizard->flags)) != 0){ /* show/hide */ gtk_widget_hide(midi_export_wizard->file_chooser->parent); gtk_widget_show(midi_export_wizard->machine_collection->parent); gtk_widget_show_all(midi_export_wizard->machine_collection); midi_export_wizard->flags |= AGS_MIDI_EXPORT_WIZARD_SHOW_MACHINE_COLLECTION; midi_export_wizard->flags &= (~AGS_MIDI_EXPORT_WIZARD_SHOW_FILE_CHOOSER); } } break; case GTK_RESPONSE_ACCEPT: { if((AGS_MIDI_EXPORT_WIZARD_SHOW_MACHINE_COLLECTION & (midi_export_wizard->flags)) != 0){ /* show/hide */ midi_export_wizard->flags |= AGS_MIDI_EXPORT_WIZARD_SHOW_FILE_CHOOSER; midi_export_wizard->flags &= (~AGS_MIDI_EXPORT_WIZARD_SHOW_MACHINE_COLLECTION); gtk_widget_hide(midi_export_wizard->machine_collection->parent); gtk_widget_show(midi_export_wizard->file_chooser->parent); gtk_widget_show_all(midi_export_wizard->file_chooser); } } break; case GTK_RESPONSE_OK: { ags_applicable_apply(AGS_APPLICABLE(wizard)); } case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_CLOSE: case GTK_RESPONSE_CANCEL: { AGS_WINDOW(midi_export_wizard->main_window)->midi_export_wizard = NULL; gtk_widget_destroy(wizard); } break; default: g_warning("unknown response"); } } gsequencer-1.4.24/ags/X/export/ags_machine_collection.c0000644000175000017500000002537213246707333020024 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_machine_collection_class_init(AgsMachineCollectionClass *machine_collection); void ags_machine_collection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_machine_collection_applicable_interface_init(AgsApplicableInterface *applicable); void ags_machine_collection_init(AgsMachineCollection *machine_collection); void ags_machine_collection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_machine_collection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_machine_collection_connect(AgsConnectable *connectable); void ags_machine_collection_disconnect(AgsConnectable *connectable); void ags_machine_collection_set_update(AgsApplicable *applicable, gboolean update); void ags_machine_collection_apply(AgsApplicable *applicable); void ags_machine_collection_reset(AgsApplicable *applicable); /** * SECTION:ags_machine_collection * @short_description: Property of audio, channels or pads in bulk mode. * @title: AgsMachineCollection * @section_id: * @include: ags/X/ags_machine_collection.h * * #AgsMachineCollection is a composite widget to property. A property editor * should be packed by a #AgsPropertyCollectionEditor. */ enum{ PROP_0, }; static gpointer ags_machine_collection_parent_class = NULL; GType ags_machine_collection_get_type(void) { static GType ags_type_machine_collection = 0; if(!ags_type_machine_collection){ static const GTypeInfo ags_machine_collection_info = { sizeof (AgsMachineCollectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_machine_collection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMachineCollection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_machine_collection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_machine_collection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_machine_collection_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_machine_collection = g_type_register_static(GTK_TYPE_VBOX, "AgsMachineCollection", &ags_machine_collection_info, 0); g_type_add_interface_static(ags_type_machine_collection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_machine_collection, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_machine_collection); } void ags_machine_collection_class_init(AgsMachineCollectionClass *machine_collection) { GObjectClass *gobject; GParamSpec *param_spec; ags_machine_collection_parent_class = g_type_class_peek_parent(machine_collection); /* GObjectClass */ gobject = (GObjectClass *) machine_collection; gobject->set_property = ags_machine_collection_set_property; gobject->get_property = ags_machine_collection_get_property; /* properties */ } void ags_machine_collection_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_machine_collection_connect; connectable->disconnect = ags_machine_collection_disconnect; } void ags_machine_collection_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_machine_collection_set_update; applicable->apply = ags_machine_collection_apply; applicable->reset = ags_machine_collection_reset; } void ags_machine_collection_init(AgsMachineCollection *machine_collection) { GtkScrolledWindow *scrolled_window; scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(machine_collection), (GtkWidget *) scrolled_window, TRUE, TRUE, 0); machine_collection->child = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_scrolled_window_add_with_viewport(scrolled_window, (GtkWidget *) machine_collection->child); } void ags_machine_collection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMachineCollection *machine_collection; machine_collection = AGS_MACHINE_COLLECTION(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_collection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMachineCollection *machine_collection; machine_collection = AGS_MACHINE_COLLECTION(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_collection_connect(AgsConnectable *connectable) { AgsMachineCollection *machine_collection; GList *list, *list_start; machine_collection = AGS_MACHINE_COLLECTION(connectable); /* children */ list_start = list = gtk_container_get_children((GtkContainer *) machine_collection->child); while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_machine_collection_disconnect(AgsConnectable *connectable) { AgsMachineCollection *machine_collection; GList *list, *list_start; machine_collection = AGS_MACHINE_COLLECTION(connectable); /* children */ list_start = list = gtk_container_get_children((GtkContainer *) machine_collection->child); while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_machine_collection_set_update(AgsApplicable *applicable, gboolean update) { AgsMachineCollection *machine_collection; GList *list, *list_start; machine_collection = AGS_MACHINE_COLLECTION(applicable); list_start = list = gtk_container_get_children((GtkContainer *) machine_collection->child); while(list != NULL){ ags_applicable_set_update(AGS_APPLICABLE(list->data), update); list = list->next; } g_list_free(list_start); } void ags_machine_collection_apply(AgsApplicable *applicable) { AgsMachineCollection *machine_collection; GList *list, *list_start; machine_collection = AGS_MACHINE_COLLECTION(applicable); list_start = list = gtk_container_get_children((GtkContainer *) machine_collection->child); while(list != NULL){ ags_applicable_apply(AGS_APPLICABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_machine_collection_reset(AgsApplicable *applicable) { AgsMachineCollection *machine_collection; GList *list, *list_start; machine_collection = AGS_MACHINE_COLLECTION(applicable); list_start = list = gtk_container_get_children((GtkContainer *) machine_collection->child); while(list != NULL){ ags_applicable_reset(AGS_APPLICABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_machine_collection_reload(AgsMachineCollection *machine_collection) { AgsWindow *window; AgsMidiExportWizard *midi_export_wizard; GtkWidget *parent; GList *machine, *machine_start; midi_export_wizard = gtk_widget_get_ancestor(machine_collection, AGS_TYPE_MIDI_EXPORT_WIZARD); window = midi_export_wizard->main_window; /* destroy old */ parent = GTK_WIDGET(machine_collection->child)->parent; gtk_widget_destroy(machine_collection->child); machine_collection->child = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_container_add(parent, machine_collection->child); /* add entry */ machine = machine_start = gtk_container_get_children(window->machines); while(machine != NULL){ if(AGS_MACHINE(machine->data)->audio != NULL && (AGS_AUDIO_HAS_NOTATION & (AGS_MACHINE(machine->data)->audio->flags)) != 0){ ags_machine_collection_add_entry(machine_collection, machine->data); } machine = machine->next; } g_list_free(machine_start); } void ags_machine_collection_add_entry(AgsMachineCollection *machine_collection, GtkWidget *machine) { AgsMachineCollectionEntry *machine_collection_entry; if(machine == NULL){ return; } machine_collection_entry = (AgsMachineCollectionEntry *) g_object_newv(machine_collection->child_type, machine_collection->child_parameter_count, machine_collection->child_parameter); g_object_set(machine_collection_entry, "machine", machine, NULL); gtk_box_pack_start(GTK_BOX(machine_collection->child), GTK_WIDGET(machine_collection_entry), FALSE, FALSE, 0); } /** * ags_machine_collection_new: * @child_type: the child type * @child_parameter_count: the child parameter count * @child_parameter: the child parameters * * Creates an #AgsMachineCollection * * Returns: a new #AgsMachineCollection * * Since: 1.0.0 */ AgsMachineCollection* ags_machine_collection_new(GType child_type, guint child_parameter_count, GParameter *child_parameter) { AgsMachineCollection *machine_collection; machine_collection = (AgsMachineCollection *) g_object_new(AGS_TYPE_MACHINE_COLLECTION, NULL); machine_collection->child_type = child_type; machine_collection->child_parameter_count = child_parameter_count; machine_collection->child_parameter = child_parameter; return(machine_collection); } gsequencer-1.4.24/ags/X/export/ags_machine_collection_callbacks.h0000644000175000017500000000172513246707333022024 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MACHINE_COLLECTION_CALLBACKS_H__ #define __AGS_MACHINE_COLLECTION_CALLBACKS_H__ #include #include #include #endif /*__AGS_MACHINE_COLLECTION_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/export/ags_midi_export_wizard.c0000644000175000017500000003412013246707333020077 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_midi_export_wizard_class_init(AgsMidiExportWizardClass *midi_export_wizard); void ags_midi_export_wizard_connectable_interface_init(AgsConnectableInterface *connectable); void ags_midi_export_wizard_applicable_interface_init(AgsApplicableInterface *applicable); void ags_midi_export_wizard_init(AgsMidiExportWizard *midi_export_wizard); void ags_midi_export_wizard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_midi_export_wizard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_midi_export_wizard_connect(AgsConnectable *connectable); void ags_midi_export_wizard_disconnect(AgsConnectable *connectable); void ags_midi_export_wizard_set_update(AgsApplicable *applicable, gboolean update); void ags_midi_export_wizard_apply(AgsApplicable *applicable); void ags_midi_export_wizard_reset(AgsApplicable *applicable); void ags_midi_export_wizard_show(GtkWidget *widget); /** * SECTION:ags_midi_export_wizard * @short_description: pack pad editors. * @title: AgsMidiExportWizard * @section_id: * @include: ags/X/ags_midi_export_wizard.h * * #AgsMidiExportWizard is a wizard to select machines in order * to export to midi files. */ static gpointer ags_midi_export_wizard_parent_class = NULL; enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_MAIN_WINDOW, }; GType ags_midi_export_wizard_get_type(void) { static GType ags_type_midi_export_wizard = 0; if(!ags_type_midi_export_wizard){ static const GTypeInfo ags_midi_export_wizard_info = { sizeof (AgsMidiExportWizardClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_midi_export_wizard_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMidiExportWizard), 0, /* n_preallocs */ (GInstanceInitFunc) ags_midi_export_wizard_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_midi_export_wizard_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_midi_export_wizard_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_midi_export_wizard = g_type_register_static(GTK_TYPE_DIALOG, "AgsMidiExportWizard", &ags_midi_export_wizard_info, 0); g_type_add_interface_static(ags_type_midi_export_wizard, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_midi_export_wizard, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_midi_export_wizard); } void ags_midi_export_wizard_class_init(AgsMidiExportWizardClass *midi_export_wizard) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_midi_export_wizard_parent_class = g_type_class_peek_parent(midi_export_wizard); /* GObjectClass */ gobject = (GObjectClass *) midi_export_wizard; /* GtkWidgetClass */ widget = (GtkWidgetClass *) midi_export_wizard; gobject->set_property = ags_midi_export_wizard_set_property; gobject->get_property = ags_midi_export_wizard_get_property; /* properties */ /** * AgsMidiExportWizard:application-context: * * The assigned #AgsApplicationContext to give control of application. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("assigned application context"), i18n_pspec("The AgsApplicationContext it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsMidiExportWizard:main-window: * * The assigned #AgsWindow. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-window", i18n_pspec("assigned main window"), i18n_pspec("The assigned main window"), AGS_TYPE_WINDOW, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_WINDOW, param_spec); /* GtkWidget */ widget->show = ags_midi_export_wizard_show; } void ags_midi_export_wizard_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_midi_export_wizard_connect; connectable->disconnect = ags_midi_export_wizard_disconnect; } void ags_midi_export_wizard_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_midi_export_wizard_set_update; applicable->apply = ags_midi_export_wizard_apply; applicable->reset = ags_midi_export_wizard_reset; } void ags_midi_export_wizard_init(AgsMidiExportWizard *midi_export_wizard) { GtkAlignment *alignment; midi_export_wizard->flags = AGS_MIDI_EXPORT_WIZARD_SHOW_MACHINE_COLLECTION; midi_export_wizard->application_context = NULL; midi_export_wizard->main_window = NULL; /* midi builder */ midi_export_wizard->midi_builder = ags_midi_builder_new(NULL); midi_export_wizard->pulse_unit = AGS_MIDI_EXPORT_WIZARD_DEFAULT_PULSE_UNIT; /* machine collection */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.0, 1.0, 1.0); gtk_widget_set_no_show_all((GtkWidget *) alignment, TRUE); gtk_box_pack_start((GtkBox *) midi_export_wizard->dialog.vbox, (GtkWidget*) alignment, TRUE, TRUE, 0); midi_export_wizard->machine_collection = (GtkWidget *) ags_machine_collection_new(AGS_TYPE_MACHINE_COLLECTION_ENTRY, 0, NULL); gtk_container_add((GtkContainer *) alignment, midi_export_wizard->machine_collection); /* file chooser */ alignment = g_object_new(GTK_TYPE_ALIGNMENT, NULL); gtk_widget_set_no_show_all((GtkWidget *) alignment, TRUE); gtk_box_pack_start((GtkBox *) midi_export_wizard->dialog.vbox, (GtkWidget*) alignment, TRUE, TRUE, 0); midi_export_wizard->file_chooser = gtk_file_chooser_widget_new(GTK_FILE_CHOOSER_ACTION_SAVE); gtk_file_chooser_set_filename(midi_export_wizard->file_chooser, AGS_MIDI_EXPORT_WIZARD_DEFAULT_FILENAME); gtk_container_add((GtkContainer *) alignment, midi_export_wizard->file_chooser); gtk_dialog_add_buttons((GtkDialog *) midi_export_wizard, GTK_STOCK_GO_BACK, GTK_RESPONSE_REJECT, GTK_STOCK_GO_FORWARD, GTK_RESPONSE_ACCEPT, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); } void ags_midi_export_wizard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMidiExportWizard *midi_export_wizard; midi_export_wizard = AGS_MIDI_EXPORT_WIZARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if((AgsApplicationContext *) midi_export_wizard->application_context == application_context){ return; } if(midi_export_wizard->application_context != NULL){ g_object_unref(midi_export_wizard->application_context); } if(application_context != NULL){ g_object_ref(application_context); } midi_export_wizard->application_context = (GObject *) application_context; } break; case PROP_MAIN_WINDOW: { AgsWindow *main_window; main_window = (AgsWindow *) g_value_get_object(value); if((AgsWindow *) midi_export_wizard->main_window == main_window){ return; } if(midi_export_wizard->main_window != NULL){ g_object_unref(midi_export_wizard->main_window); } if(main_window != NULL){ g_object_ref(main_window); } midi_export_wizard->main_window = (GObject *) main_window; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_export_wizard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMidiExportWizard *midi_export_wizard; midi_export_wizard = AGS_MIDI_EXPORT_WIZARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, midi_export_wizard->application_context); } break; case PROP_MAIN_WINDOW: { g_value_set_object(value, midi_export_wizard->main_window); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_export_wizard_connect(AgsConnectable *connectable) { AgsMidiExportWizard *midi_export_wizard; midi_export_wizard = AGS_MIDI_EXPORT_WIZARD(connectable); if((AGS_MIDI_EXPORT_WIZARD_CONNECTED & (midi_export_wizard->flags)) != 0){ return; } midi_export_wizard->flags |= AGS_MIDI_EXPORT_WIZARD_CONNECTED; g_signal_connect(midi_export_wizard, "response", G_CALLBACK(ags_midi_export_wizard_response_callback), NULL); ags_connectable_connect(AGS_CONNECTABLE(midi_export_wizard->machine_collection)); } void ags_midi_export_wizard_disconnect(AgsConnectable *connectable) { AgsMidiExportWizard *midi_export_wizard; midi_export_wizard = AGS_MIDI_EXPORT_WIZARD(connectable); if((AGS_MIDI_EXPORT_WIZARD_CONNECTED & (midi_export_wizard->flags)) == 0){ return; } midi_export_wizard->flags &= (~AGS_MIDI_EXPORT_WIZARD_CONNECTED); ags_connectable_disconnect(AGS_CONNECTABLE(midi_export_wizard->machine_collection)); } void ags_midi_export_wizard_set_update(AgsApplicable *applicable, gboolean update) { AgsMidiExportWizard *midi_export_wizard; midi_export_wizard = AGS_MIDI_EXPORT_WIZARD(applicable); ags_applicable_set_update(AGS_APPLICABLE(midi_export_wizard->machine_collection), update); } void ags_midi_export_wizard_apply(AgsApplicable *applicable) { AgsWindow *window; AgsMidiExportWizard *midi_export_wizard; FILE *file; GList *list, *list_start; gchar *filename; guint track_count; guint division; guint times; guint bpm; guint clicks; midi_export_wizard = AGS_MIDI_EXPORT_WIZARD(applicable); window = midi_export_wizard->main_window; /* retrieve BPM */ bpm = gtk_spin_button_get_value_as_int(window->navigation->bpm); /* find tracks */ list = list_start = gtk_container_get_children(AGS_MACHINE_COLLECTION(midi_export_wizard->machine_collection)->child); while(list != NULL){ if(gtk_toggle_button_get_active(AGS_MACHINE_COLLECTION_ENTRY(list->data)->enabled)){ track_count++; } list = list->next; } g_list_free(list_start); if(track_count == 0){ return; } /* set division, times and clicks */ division = AGS_MIDI_EXPORT_WIZARD_DEFAULT_DIVISION; times = AGS_MIDI_EXPORT_WIZARD_DEFAULT_TIMES; clicks = AGS_MIDI_EXPORT_WIZARD_DEFAULT_CLICKS; /* set pulse unit */ midi_export_wizard->pulse_unit = division / 16.0; /* open file */ filename = gtk_file_chooser_get_filename(midi_export_wizard->file_chooser); file = fopen(filename, "w"); g_object_set(midi_export_wizard->midi_builder, "file", file, NULL); /* add header */ ags_midi_builder_append_header(midi_export_wizard->midi_builder, 0, 1, track_count, division, times, bpm, clicks); /* apply tracks */ ags_applicable_apply(AGS_APPLICABLE(midi_export_wizard->machine_collection)); /* build and write */ ags_midi_builder_build(midi_export_wizard->midi_builder); fwrite(midi_export_wizard->midi_builder->data, sizeof(unsigned char), midi_export_wizard->midi_builder->length, file); fflush(file); fclose(file); } void ags_midi_export_wizard_reset(AgsApplicable *applicable) { AgsMidiExportWizard *midi_export_wizard; midi_export_wizard = AGS_MIDI_EXPORT_WIZARD(applicable); ags_machine_collection_reload(midi_export_wizard->machine_collection); ags_applicable_reset(AGS_APPLICABLE(midi_export_wizard->machine_collection)); } void ags_midi_export_wizard_show(GtkWidget *widget) { AgsMidiExportWizard *midi_export_wizard; midi_export_wizard = AGS_MIDI_EXPORT_WIZARD(widget); GTK_WIDGET_CLASS(ags_midi_export_wizard_parent_class)->show(widget); if((AGS_MIDI_EXPORT_WIZARD_SHOW_FILE_CHOOSER & (midi_export_wizard->flags)) != 0){ gtk_widget_show(midi_export_wizard->file_chooser->parent); gtk_widget_show_all(midi_export_wizard->file_chooser); } if((AGS_MIDI_EXPORT_WIZARD_SHOW_MACHINE_COLLECTION & (midi_export_wizard->flags)) != 0){ gtk_widget_show(midi_export_wizard->machine_collection->parent); gtk_widget_show_all(midi_export_wizard->machine_collection); } } /** * ags_midi_export_wizard_new: * * Creates an #AgsMidiExportWizard * * Returns: a new #AgsMidiExportWizard * * Since: 1.0.0 */ AgsMidiExportWizard* ags_midi_export_wizard_new() { AgsMidiExportWizard *midi_export_wizard; midi_export_wizard = (AgsMidiExportWizard *) g_object_new(AGS_TYPE_MIDI_EXPORT_WIZARD, NULL); return(midi_export_wizard); } gsequencer-1.4.24/ags/X/ags_wave_window.c0000644000175000017500000001661113247044247015210 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_wave_window_class_init(AgsWaveWindowClass *wave_window); void ags_wave_window_connectable_interface_init(AgsConnectableInterface *connectable); void ags_wave_window_init(AgsWaveWindow *wave_window); void ags_wave_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_wave_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_wave_window_finalize(GObject *gobject); void ags_wave_window_connect(AgsConnectable *connectable); void ags_wave_window_disconnect(AgsConnectable *connectable); gboolean ags_wave_window_delete_event(GtkWidget *widget, GdkEventAny *event); /** * SECTION:ags_wave_window * @short_description: The wave window * @title: AgsWaveWindow * @section_id: * @include: ags/X/ags_wave_window.h * * #AgsWaveWindow lets you edit audio files. */ enum{ PROP_0, PROP_SOUNDCARD, }; static gpointer ags_wave_window_parent_class = NULL; GType ags_wave_window_get_type() { static GType ags_type_wave_window = 0; if(!ags_type_wave_window){ static const GTypeInfo ags_wave_window_info = { sizeof (AgsWaveWindowClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_wave_window_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsWaveWindow), 0, /* n_preallocs */ (GInstanceInitFunc) ags_wave_window_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_wave_window_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_wave_window = g_type_register_static(GTK_TYPE_WINDOW, "AgsWaveWindow", &ags_wave_window_info, 0); g_type_add_interface_static(ags_type_wave_window, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_wave_window); } void ags_wave_window_class_init(AgsWaveWindowClass *wave_window) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_wave_window_parent_class = g_type_class_peek_parent(wave_window); /* GObjectClass */ gobject = (GObjectClass *) wave_window; gobject->set_property = ags_wave_window_set_property; gobject->get_property = ags_wave_window_get_property; gobject->finalize = ags_wave_window_finalize; /** * AgsWaveWindow:soundcard: * * The assigned #AgsSoundcard acting as default sink. * * Since: 1.2.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) wave_window; widget->delete_event = ags_wave_window_delete_event; } void ags_wave_window_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_wave_window_connect; connectable->disconnect = ags_wave_window_disconnect; } void ags_wave_window_init(AgsWaveWindow *wave_window) { g_object_set(G_OBJECT(wave_window), "title", "edit wave", NULL); wave_window->flags = 0; wave_window->soundcard = NULL; wave_window->wave_editor = ags_wave_editor_new(); gtk_container_add((GtkContainer *) wave_window, (GtkWidget *) wave_window->wave_editor); } void ags_wave_window_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsWaveWindow *wave_window; wave_window = AGS_WAVE_WINDOW(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(wave_window->soundcard == soundcard){ return; } if(wave_window->soundcard != NULL){ g_object_unref(wave_window->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } wave_window->soundcard = soundcard; g_object_set(G_OBJECT(wave_window->wave_editor), "soundcard", soundcard, NULL); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_wave_window_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsWaveWindow *wave_window; wave_window = AGS_WAVE_WINDOW(gobject); switch(prop_id){ case PROP_SOUNDCARD: g_value_set_object(value, wave_window->soundcard); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_wave_window_connect(AgsConnectable *connectable) { AgsWaveWindow *wave_window; wave_window = AGS_WAVE_WINDOW(connectable); if((AGS_WAVE_WINDOW_CONNECTED & (wave_window->flags)) != 0){ return; } wave_window->flags |= AGS_WAVE_WINDOW_CONNECTED; if(wave_window->wave_editor != NULL){ ags_connectable_connect(AGS_CONNECTABLE(wave_window->wave_editor)); } } void ags_wave_window_disconnect(AgsConnectable *connectable) { AgsWaveWindow *wave_window; wave_window = AGS_WAVE_WINDOW(connectable); if((AGS_WAVE_WINDOW_CONNECTED & (wave_window->flags)) == 0){ return; } wave_window->flags &= (~AGS_WAVE_WINDOW_CONNECTED); if(wave_window->wave_editor != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(wave_window->wave_editor)); } } void ags_wave_window_finalize(GObject *gobject) { AgsWaveWindow *wave_window; wave_window = (AgsWaveWindow *) gobject; if(wave_window->soundcard != NULL){ g_object_unref(G_OBJECT(wave_window->soundcard)); } G_OBJECT_CLASS(ags_wave_window_parent_class)->finalize(gobject); } gboolean ags_wave_window_delete_event(GtkWidget *widget, GdkEventAny *event) { gtk_widget_hide(widget); return(TRUE); } /** * ags_wave_window_new: * @parent_window: the parent #AgsWindow * * Instantiate #AgsWaveWindow * * Returns: the new #AgsWaveWindow instance * * Since: 1.2.0 */ AgsWaveWindow* ags_wave_window_new(GtkWidget *parent_window) { AgsWaveWindow *wave_window; wave_window = (AgsWaveWindow *) g_object_new(AGS_TYPE_WAVE_WINDOW, NULL); wave_window->parent_window = parent_window; return(wave_window); } gsequencer-1.4.24/ags/X/ags_playback_window.h0000644000175000017500000000410413246707333016034 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PLAYBACK_WINDOW_H__ #define __AGS_PLAYBACK_WINDOW_H__ #include #include #include #define AGS_TYPE_PLAYBACK_WINDOW (ags_playback_window_get_type()) #define AGS_PLAYBACK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAYBACK_WINDOW, AgsPlaybackWindow)) #define AGS_PLAYBACK_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAYBACK_WINDOW, AgsPlaybackWindowClass)) #define AGS_IS_PLAYBACK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PLAYBACK_WINDOW)) #define AGS_IS_PLAYBACK_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PLAYBACK_WINDOW)) #define AGS_PLAYBACK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PLAYBACK_WINDOW, AgsPlaybackWindowClass)) typedef struct _AgsPlaybackWindow AgsPlaybackWindow; typedef struct _AgsPlaybackWindowClass AgsPlaybackWindowClass; typedef enum{ AGS_PLAYBACK_WINDOW_CONNECTED = 1, }AgsPlaybackWindowFlags; struct _AgsPlaybackWindow { GtkWindow window; guint flags; GObject *application_context; GtkWidget *main_window; }; struct _AgsPlaybackWindowClass { GtkWindowClass window; }; GType ags_playback_window_get_type(void); AgsPlaybackWindow* ags_playback_window_new(); #endif /*__AGS_PLAYBACK_WINDOW_H__*/ gsequencer-1.4.24/ags/X/ags_bulk_member.h0000644000175000017500000000716113246707333015151 00000000000000/* 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 . */ #ifndef __AGS_BULK_MEMBER_H__ #define __AGS_BULK_MEMBER_H__ #include #include #include #include #include #include #include #define AGS_TYPE_BULK_MEMBER (ags_bulk_member_get_type()) #define AGS_BULK_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BULK_MEMBER, AgsBulkMember)) #define AGS_BULK_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_BULK_MEMBER, AgsBulkMemberClass)) #define AGS_IS_BULK_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_BULK_MEMBER)) #define AGS_IS_BULK_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_BULK_MEMBER)) #define AGS_BULK_MEMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_BULK_MEMBER, AgsBulkMemberClass)) #define AGS_BULK_PORT(ptr) ((AgsBulkPort *)(ptr)) #define AGS_BULK_MEMBER_DEFAULT_VERSION "0.7.21\0" #define AGS_BULK_MEMBER_DEFAULT_BUILD_ID "CEST 01-03-2016 00:23\0" typedef struct _AgsBulkMember AgsBulkMember; typedef struct _AgsBulkMemberClass AgsBulkMemberClass; typedef struct _AgsBulkPort AgsBulkPort; typedef enum{ AGS_BULK_MEMBER_CONNECTED = 1, AGS_BULK_MEMBER_DEFAULT_TEMPLATE = 1 << 1, AGS_BULK_MEMBER_RESET_BY_ATOMIC = 1 << 2, AGS_BULK_MEMBER_RESET_BY_TASK = 1 << 3, AGS_BULK_MEMBER_APPLY_RECALL = 1 << 4, AGS_BULK_MEMBER_NO_UPDATE = 1 << 5, AGS_BULK_MEMBER_APPLY_INITIAL = 1 << 6, }AgsBulkMemberFlags; typedef enum{ AGS_BULK_MEMBER_PORT_BOOLEAN = 1, AGS_BULK_MEMBER_PORT_INTEGER = 1 << 1, }AgsBulkMemberPortFlags; struct _AgsBulkMember { GtkFrame frame; guint flags; guint port_flags; gchar *version; gchar *build_id; GList *handler; GType widget_type; gchar *widget_label; gchar *filename; gchar *effect; gchar *plugin_name; gchar *specifier; gchar *control_port; guint steps; AgsConversion *conversion; GList *bulk_port; GList *recall_bulk_port; GType task_type; }; struct _AgsBulkMemberClass { GtkFrameClass frame; void (*change_port)(AgsBulkMember *bulk_member, gpointer port_data); GList* (*find_port)(AgsBulkMember *bulk_member); }; struct _AgsBulkPort { AgsPort *port; gpointer port_data; gboolean active; }; GType ags_bulk_member_get_type(void); AgsBulkPort* ags_bulk_port_alloc(AgsPort *port); GList* ags_bulk_port_find(GList *list, AgsPort *port); GtkWidget* ags_bulk_member_get_widget(AgsBulkMember *bulk_member); void ags_bulk_member_set_label(AgsBulkMember *bulk_member, gchar *label); void ags_bulk_member_change_port(AgsBulkMember *bulk_member, gpointer port_data); GList* ags_bulk_member_find_port(AgsBulkMember *bulk_member); AgsBulkMember* ags_bulk_member_new(); #endif /*__AGS_BULK_MEMBER_H__*/ gsequencer-1.4.24/ags/X/ags_automation_window.h0000644000175000017500000000443513247044247016434 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUTOMATION_WINDOW_H__ #define __AGS_AUTOMATION_WINDOW_H__ #include #include #include #include #define AGS_TYPE_AUTOMATION_WINDOW (ags_automation_window_get_type()) #define AGS_AUTOMATION_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTOMATION_WINDOW, AgsAutomationWindow)) #define AGS_AUTOMATION_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUTOMATION_WINDOW, AgsAutomationWindowClass)) #define AGS_IS_AUTOMATION_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_AUTOMATION_WINDOW)) #define AGS_IS_AUTOMATION_WINDOW_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_AUTOMATION_WINDOW)) #define AGS_AUTOMATION_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_AUTOMATION_WINDOW, AgsAutomationWindowClass)) typedef struct _AgsAutomationWindow AgsAutomationWindow; typedef struct _AgsAutomationWindowClass AgsAutomationWindowClass; typedef enum{ AGS_AUTOMATION_WINDOW_CONNECTED = 1, AGS_AUTOMATION_WINDOW_LIVE_AUTOMATION = 1 << 1, }AgsAutomationWindowFlags; struct _AgsAutomationWindow { GtkWindow window; guint flags; GObject *soundcard; GtkWidget *parent_window; AgsAutomationEditor *automation_editor; }; struct _AgsAutomationWindowClass { GtkWindowClass window; }; GType ags_automation_window_get_type(void); AgsAutomationWindow* ags_automation_window_new(GtkWidget *parent_window); #endif /*__AGS_AUTOMATION_WINDOW_H__*/ gsequencer-1.4.24/ags/X/ags_playback_window_callbacks.c0000644000175000017500000000146413246707333020034 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include gsequencer-1.4.24/ags/X/ags_server_preferences_callbacks.c0000644000175000017500000000146713246707333020551 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/ags_machine_editor.c0000644000175000017500000004107713247044247015635 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_machine_editor_class_init(AgsMachineEditorClass *machine_editor); void ags_machine_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_machine_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_machine_editor_init(AgsMachineEditor *machine_editor); void ags_machine_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_machine_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_machine_editor_connect(AgsConnectable *connectable); void ags_machine_editor_disconnect(AgsConnectable *connectable); void ags_machine_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_machine_editor_apply(AgsApplicable *applicable); void ags_machine_editor_reset(AgsApplicable *applicable); void ags_machine_editor_real_set_machine(AgsMachineEditor *machine_editor, AgsMachine *machine); /** * SECTION:ags_machine_editor * @short_description: pack pad editors. * @title: AgsMachineEditor * @section_id: * @include: ags/X/ags_machine_editor.h * * #AgsMachineEditor is a composite widget to edit all aspects of #AgsAudio. * It consists of multiple child editors. */ enum{ SET_MACHINE, LAST_SIGNAL, }; enum{ PROP_0, PROP_MACHINE, }; static guint machine_editor_signals[LAST_SIGNAL]; GType ags_machine_editor_get_type(void) { static GType ags_type_machine_editor = 0; if(!ags_type_machine_editor){ static const GTypeInfo ags_machine_editor_info = { sizeof (AgsMachineEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_machine_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMachineEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_machine_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_machine_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_machine_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_machine_editor = g_type_register_static(GTK_TYPE_DIALOG, "AgsMachineEditor", &ags_machine_editor_info, 0); g_type_add_interface_static(ags_type_machine_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_machine_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_machine_editor); } void ags_machine_editor_class_init(AgsMachineEditorClass *machine_editor) { GObjectClass *gobject; GParamSpec *param_spec; /* GObjectClass */ gobject = (GObjectClass *) machine_editor; gobject->set_property = ags_machine_editor_set_property; gobject->get_property = ags_machine_editor_get_property; /* properties */ /** * AgsMachineEditor:machine: * * The #AgsMachine to edit. * * Since: 1.0.0 */ param_spec = g_param_spec_object("machine", i18n_pspec("assigned machine"), i18n_pspec("The machine which this machine editor is assigned with"), AGS_TYPE_MACHINE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MACHINE, param_spec); /* AgsMachineEditorClass */ machine_editor->set_machine = ags_machine_editor_real_set_machine; /* signals */ /** * AgsMachineEditor::set-machine: * @machine_editor: the #AgsMachineEditor * @machine: the #AgsMachine to set * * The ::set-machine notify about modified machine. */ machine_editor_signals[SET_MACHINE] = g_signal_new("set-machine", G_TYPE_FROM_CLASS (machine_editor), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsMachineEditorClass, set_machine), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_machine_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_machine_editor_connect; connectable->disconnect = ags_machine_editor_disconnect; } void ags_machine_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_machine_editor_set_update; applicable->apply = ags_machine_editor_apply; applicable->reset = ags_machine_editor_reset; } void ags_machine_editor_init(AgsMachineEditor *machine_editor) { GtkNotebook *notebook; GtkScrolledWindow *scrolled_window; gtk_window_set_title((GtkWindow *) machine_editor, i18n("properties")); machine_editor->flags = 0; machine_editor->version = AGS_MACHINE_EDITOR_DEFAULT_VERSION; machine_editor->build_id = AGS_MACHINE_EDITOR_DEFAULT_BUILD_ID; machine_editor->machine = NULL; machine_editor->notebook = notebook = (GtkNotebook *) gtk_notebook_new(); gtk_box_pack_start((GtkBox *) machine_editor->dialog.vbox, (GtkWidget *) notebook, TRUE, TRUE, 0); /* AgsOutput */ machine_editor->output_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("output"))); /* AgsInput */ machine_editor->input_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("input"))); /* AgsOutput link editor */ machine_editor->output_link_editor_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("link output"))); /* AgsInput link editor */ machine_editor->input_link_editor_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("link input"))); /* resize editor */ machine_editor->resize_editor_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("resize channels"))); /* GtkButton's in GtkDialog->action_area */ machine_editor->apply = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_APPLY); gtk_box_pack_start((GtkBox *) machine_editor->dialog.action_area, (GtkWidget *) machine_editor->apply, FALSE, FALSE, 0); machine_editor->ok = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_OK); gtk_box_pack_start((GtkBox *) machine_editor->dialog.action_area, (GtkWidget *) machine_editor->ok, FALSE, FALSE, 0); machine_editor->cancel = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_CANCEL); gtk_box_pack_start((GtkBox *) machine_editor->dialog.action_area, (GtkWidget *) machine_editor->cancel, FALSE, FALSE, 0); } void ags_machine_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMachineEditor *machine_editor; machine_editor = AGS_MACHINE_EDITOR(gobject); switch(prop_id){ case PROP_MACHINE: { AgsMachine *machine; machine = (AgsMachine *) g_value_get_object(value); ags_machine_editor_set_machine(machine_editor, machine); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMachineEditor *machine_editor; machine_editor = AGS_MACHINE_EDITOR(gobject); switch(prop_id){ case PROP_MACHINE: g_value_set_object(value, machine_editor->machine); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_editor_connect(AgsConnectable *connectable) { AgsMachineEditor *machine_editor; machine_editor = AGS_MACHINE_EDITOR(connectable); if((AGS_MACHINE_EDITOR_CONNECTED & (machine_editor->flags)) != 0){ return; } machine_editor->flags |= AGS_MACHINE_EDITOR_CONNECTED; /* GtkNotebook */ g_signal_connect((GtkNotebook *) machine_editor->notebook, "switch-page", G_CALLBACK(ags_machine_editor_switch_page_callback), (gpointer) machine_editor); /* AgsMachineEditor tabs */ ags_connectable_connect(AGS_CONNECTABLE(machine_editor->output_editor)); ags_connectable_connect(AGS_CONNECTABLE(machine_editor->input_editor)); ags_connectable_connect(AGS_CONNECTABLE(machine_editor->output_link_editor)); ags_connectable_connect(AGS_CONNECTABLE(machine_editor->input_link_editor)); ags_connectable_connect(AGS_CONNECTABLE(machine_editor->resize_editor)); /* AgsMachineEditor buttons */ g_signal_connect((GObject *) machine_editor->apply, "clicked", G_CALLBACK(ags_machine_editor_apply_callback), (gpointer) machine_editor); g_signal_connect((GObject *) machine_editor->ok, "clicked", G_CALLBACK(ags_machine_editor_ok_callback), (gpointer) machine_editor); g_signal_connect((GObject *) machine_editor->cancel, "clicked", G_CALLBACK(ags_machine_editor_cancel_callback), (gpointer) machine_editor); } void ags_machine_editor_disconnect(AgsConnectable *connectable) { AgsMachineEditor *machine_editor; machine_editor = AGS_MACHINE_EDITOR(connectable); if((AGS_MACHINE_EDITOR_CONNECTED & (machine_editor->flags)) == 0){ return; } machine_editor->flags &= (~AGS_MACHINE_EDITOR_CONNECTED); /* AgsMachineEditor tabs */ ags_connectable_disconnect(AGS_CONNECTABLE(machine_editor->output_editor)); ags_connectable_disconnect(AGS_CONNECTABLE(machine_editor->input_editor)); ags_connectable_disconnect(AGS_CONNECTABLE(machine_editor->output_link_editor)); ags_connectable_disconnect(AGS_CONNECTABLE(machine_editor->input_link_editor)); ags_connectable_disconnect(AGS_CONNECTABLE(machine_editor->resize_editor)); } void ags_machine_editor_set_update(AgsApplicable *applicable, gboolean update) { AgsMachineEditor *machine_editor; machine_editor = AGS_MACHINE_EDITOR(applicable); ags_applicable_set_update(AGS_APPLICABLE(machine_editor->output_editor), update); ags_applicable_set_update(AGS_APPLICABLE(machine_editor->input_editor), update); ags_applicable_set_update(AGS_APPLICABLE(machine_editor->output_link_editor), update); ags_applicable_set_update(AGS_APPLICABLE(machine_editor->input_link_editor), update); ags_applicable_set_update(AGS_APPLICABLE(machine_editor->resize_editor), update); } void ags_machine_editor_apply(AgsApplicable *applicable) { AgsMachineEditor *machine_editor; machine_editor = AGS_MACHINE_EDITOR(applicable); ags_applicable_apply(AGS_APPLICABLE(machine_editor->output_editor)); ags_applicable_apply(AGS_APPLICABLE(machine_editor->input_editor)); ags_applicable_apply(AGS_APPLICABLE(machine_editor->output_link_editor)); ags_applicable_apply(AGS_APPLICABLE(machine_editor->input_link_editor)); ags_applicable_apply(AGS_APPLICABLE(machine_editor->resize_editor)); } void ags_machine_editor_reset(AgsApplicable *applicable) { AgsMachineEditor *machine_editor; machine_editor = AGS_MACHINE_EDITOR(applicable); ags_applicable_reset(AGS_APPLICABLE(machine_editor->output_editor)); ags_applicable_reset(AGS_APPLICABLE(machine_editor->input_editor)); ags_applicable_reset(AGS_APPLICABLE(machine_editor->output_link_editor)); ags_applicable_reset(AGS_APPLICABLE(machine_editor->input_link_editor)); ags_applicable_reset(AGS_APPLICABLE(machine_editor->resize_editor)); } /** * ags_machine_editor_add_children: * @machine_editor: the #AgsMachineEditor * * Add all child editors. * * Since: 1.0.0 */ void ags_machine_editor_add_children(AgsMachineEditor *machine_editor) { GParameter *output_link_editor_child_parameter; GParameter *input_link_editor_child_parameter; /* output */ output_link_editor_child_parameter = g_new0(GParameter, 1); output_link_editor_child_parameter[0].name = "channel_type"; g_value_init(&(output_link_editor_child_parameter[0].value), G_TYPE_GTYPE); g_value_set_gtype(&(output_link_editor_child_parameter[0].value), AGS_TYPE_OUTPUT); /* input */ input_link_editor_child_parameter = g_new0(GParameter, 1); input_link_editor_child_parameter[0].name = "channel_type"; g_value_init(&(input_link_editor_child_parameter[0].value), G_TYPE_GTYPE); g_value_set_gtype(&(input_link_editor_child_parameter[0].value), AGS_TYPE_INPUT); /* AgsOutput */ machine_editor->output_editor = ags_listing_editor_new(AGS_TYPE_OUTPUT); gtk_scrolled_window_add_with_viewport(machine_editor->output_scrolled_window, (GtkWidget *) machine_editor->output_editor); /* AgsInput */ machine_editor->input_editor = ags_listing_editor_new(AGS_TYPE_INPUT); gtk_scrolled_window_add_with_viewport(machine_editor->input_scrolled_window, (GtkWidget *) machine_editor->input_editor); /* AgsOutput link editor */ machine_editor->output_link_editor = ags_property_collection_editor_new(AGS_TYPE_LINK_COLLECTION_EDITOR, 1, output_link_editor_child_parameter); gtk_scrolled_window_add_with_viewport(machine_editor->output_link_editor_scrolled_window, (GtkWidget *) machine_editor->output_link_editor); /* AgsInput link editor */ machine_editor->input_link_editor = ags_property_collection_editor_new(AGS_TYPE_LINK_COLLECTION_EDITOR, 1, input_link_editor_child_parameter); gtk_scrolled_window_add_with_viewport(machine_editor->input_link_editor_scrolled_window, (GtkWidget *) machine_editor->input_link_editor); /* resize editor */ machine_editor->resize_editor = ags_resize_editor_new(AGS_TYPE_OUTPUT); gtk_scrolled_window_add_with_viewport(machine_editor->resize_editor_scrolled_window, (GtkWidget *) machine_editor->resize_editor); } void ags_machine_editor_real_set_machine(AgsMachineEditor *machine_editor, AgsMachine *machine) { if(machine_editor->machine != NULL){ gtk_widget_destroy(GTK_WIDGET(machine_editor->output_editor)); gtk_widget_destroy(GTK_WIDGET(machine_editor->input_editor)); gtk_widget_destroy(GTK_WIDGET(machine_editor->output_link_editor)); gtk_widget_destroy(GTK_WIDGET(machine_editor->input_link_editor)); gtk_widget_destroy(GTK_WIDGET(machine_editor->resize_editor)); } machine_editor->machine = machine; if(machine != NULL){ ags_machine_editor_add_children(machine_editor); } } /** * ags_machine_editor_set_machine: * @machine_editor: an #AgsMachineEditor * @machine: the new #AgsMachine * * Is emitted as machine gets modified. * * Since: 1.0.0 */ void ags_machine_editor_set_machine(AgsMachineEditor *machine_editor, AgsMachine *machine) { g_return_if_fail(AGS_IS_MACHINE_EDITOR(machine_editor)); g_object_ref((GObject *) machine_editor); g_signal_emit(G_OBJECT(machine_editor), machine_editor_signals[SET_MACHINE], 0, machine); g_object_unref((GObject *) machine_editor); } /** * ags_machine_editor_new: * @machine: the assigned machine. * * Creates an #AgsMachineEditor * * Returns: a new #AgsMachineEditor * * Since: 1.0.0 */ AgsMachineEditor* ags_machine_editor_new(AgsMachine *machine) { AgsMachineEditor *machine_editor; machine_editor = (AgsMachineEditor *) g_object_new(AGS_TYPE_MACHINE_EDITOR, "machine", machine, NULL); return(machine_editor); } gsequencer-1.4.24/ags/X/ags_line_editor_callbacks.c0000644000175000017500000000354113246707333017152 00000000000000/* 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 . */ #include #include #include #include int ags_line_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLineEditor *line_editor) { if(old_parent != NULL){ return(0); } if(line_editor->link_editor != NULL){ gtk_box_pack_start((GtkBox *) line_editor, (GtkWidget *) line_editor->link_editor, FALSE, FALSE, 0); } if(line_editor->output_editor != NULL){ gtk_box_pack_start((GtkBox *) line_editor, (GtkWidget *) line_editor->output_editor, FALSE, FALSE, 0); } return(0); } int ags_line_editor_show_callback(GtkWidget *widget, AgsLineEditor *line_editor) { if(line_editor->link_editor != NULL){ gtk_widget_show((GtkWidget *) line_editor->link_editor); } if(line_editor->output_editor != NULL){ gtk_widget_show((GtkWidget *) line_editor->output_editor); } if(line_editor->member_editor != NULL){ gtk_widget_show((GtkWidget *) line_editor->member_editor); } return(0); } gsequencer-1.4.24/ags/X/ags_automation_editor_callbacks.c0000644000175000017500000003314513247044247020405 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include gboolean ags_automation_editor_audio_edit_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsAutomationEditor *automation_editor) { ags_automation_editor_reset_audio_scrollbar(automation_editor); return(TRUE); } gboolean ags_automation_editor_audio_edit_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsAutomationEditor *automation_editor) { ags_automation_editor_reset_audio_scrollbar(automation_editor); return(FALSE); } gboolean ags_automation_editor_output_edit_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsAutomationEditor *automation_editor) { ags_automation_editor_reset_output_scrollbar(automation_editor); return(TRUE); } gboolean ags_automation_editor_output_edit_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsAutomationEditor *automation_editor) { ags_automation_editor_reset_output_scrollbar(automation_editor); return(FALSE); } gboolean ags_automation_editor_input_edit_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsAutomationEditor *automation_editor) { ags_automation_editor_reset_input_scrollbar(automation_editor); return(FALSE); } gboolean ags_automation_editor_input_edit_configure_event(GtkWidget *widget, GdkEventConfigure *event, AgsAutomationEditor *automation_editor) { ags_automation_editor_reset_input_scrollbar(automation_editor); return(FALSE); } void ags_automation_editor_audio_vscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor) { GtkAdjustment *vadjustment; vadjustment = gtk_viewport_get_vadjustment(automation_editor->audio_scrolled_automation_edit_box->viewport); gtk_adjustment_set_value(vadjustment, range->adjustment->value); vadjustment = gtk_viewport_get_vadjustment(automation_editor->audio_scrolled_scale_box->viewport); gtk_adjustment_set_value(vadjustment, range->adjustment->value); } void ags_automation_editor_audio_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor) { GList *list_start, *list; gtk_adjustment_set_value(automation_editor->audio_ruler->adjustment, range->adjustment->value / AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH); gtk_widget_queue_draw(automation_editor->audio_ruler); /* automation edit */ if((AGS_AUTOMATION_EDITOR_RESET_AUDIO_HSCROLLBAR & (automation_editor->flags)) == 0){ list_start = list = gtk_container_get_children(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ gtk_adjustment_set_value(GTK_RANGE(AGS_AUTOMATION_EDIT(list->data)->hscrollbar)->adjustment, range->adjustment->value); list = list->next; } g_list_free(list_start); } } void ags_automation_editor_output_vscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor) { GtkAdjustment *vadjustment; vadjustment = gtk_viewport_get_vadjustment(automation_editor->output_scrolled_automation_edit_box->viewport); gtk_adjustment_set_value(vadjustment, range->adjustment->value); vadjustment = gtk_viewport_get_vadjustment(automation_editor->output_scrolled_scale_box->viewport); gtk_adjustment_set_value(vadjustment, range->adjustment->value); } void ags_automation_editor_output_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor) { GList *list_start, *list; gtk_adjustment_set_value(automation_editor->output_ruler->adjustment, range->adjustment->value / AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH); gtk_widget_queue_draw(automation_editor->output_ruler); /* automation edit */ if((AGS_AUTOMATION_EDITOR_RESET_OUTPUT_HSCROLLBAR & (automation_editor->flags)) == 0){ list_start = list = gtk_container_get_children(automation_editor->output_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ gtk_adjustment_set_value(GTK_RANGE(AGS_AUTOMATION_EDIT(list->data)->hscrollbar)->adjustment, range->adjustment->value); list = list->next; } g_list_free(list_start); } } void ags_automation_editor_input_vscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor) { GtkAdjustment *vadjustment; vadjustment = gtk_viewport_get_vadjustment(automation_editor->input_scrolled_automation_edit_box->viewport); gtk_adjustment_set_value(vadjustment, range->adjustment->value); vadjustment = gtk_viewport_get_vadjustment(automation_editor->input_scrolled_scale_box->viewport); gtk_adjustment_set_value(vadjustment, range->adjustment->value); } void ags_automation_editor_input_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor) { GList *list_start, *list; gtk_adjustment_set_value(automation_editor->input_ruler->adjustment, range->adjustment->value / AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH); gtk_widget_queue_draw(automation_editor->input_ruler); /* automation edit */ if((AGS_AUTOMATION_EDITOR_RESET_INPUT_HSCROLLBAR & (automation_editor->flags)) == 0){ list_start = list = gtk_container_get_children(automation_editor->input_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ gtk_adjustment_set_value(GTK_RANGE(AGS_AUTOMATION_EDIT(list->data)->hscrollbar)->adjustment, range->adjustment->value); list = list->next; } g_list_free(list_start); } } void ags_automation_editor_audio_automation_edit_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor) { AgsAutomationEdit *automation_edit; GList *list_start, *list; if((AGS_AUTOMATION_EDITOR_RESET_AUDIO_HSCROLLBAR & (automation_editor->flags)) != 0){ return; } automation_edit = gtk_widget_get_ancestor(range, AGS_TYPE_AUTOMATION_EDIT); automation_editor->flags |= AGS_AUTOMATION_EDITOR_RESET_AUDIO_HSCROLLBAR; gtk_adjustment_set_value(GTK_RANGE(automation_editor->audio_hscrollbar)->adjustment, range->adjustment->value); /* automation edit */ list_start = list = gtk_container_get_children(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ if(automation_edit != list->data){ gtk_adjustment_set_value(GTK_RANGE(AGS_AUTOMATION_EDIT(list->data)->hscrollbar)->adjustment, range->adjustment->value); } list = list->next; } g_list_free(list_start); automation_editor->flags &= (~AGS_AUTOMATION_EDITOR_RESET_AUDIO_HSCROLLBAR); } void ags_automation_editor_output_automation_edit_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor) { AgsAutomationEdit *automation_edit; GList *list_start, *list; if((AGS_AUTOMATION_EDITOR_RESET_OUTPUT_HSCROLLBAR & (automation_editor->flags)) != 0){ return; } automation_edit = gtk_widget_get_ancestor(range, AGS_TYPE_AUTOMATION_EDIT); automation_editor->flags |= AGS_AUTOMATION_EDITOR_RESET_OUTPUT_HSCROLLBAR; gtk_adjustment_set_value(GTK_RANGE(automation_editor->output_hscrollbar)->adjustment, range->adjustment->value); /* automation edit */ list_start = list = gtk_container_get_children(automation_editor->output_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ if(automation_edit != list->data){ gtk_adjustment_set_value(GTK_RANGE(AGS_AUTOMATION_EDIT(list->data)->hscrollbar)->adjustment, range->adjustment->value); } list = list->next; } g_list_free(list_start); automation_editor->flags &= (~AGS_AUTOMATION_EDITOR_RESET_OUTPUT_HSCROLLBAR); } void ags_automation_editor_input_automation_edit_hscrollbar_value_changed(GtkRange *range, AgsAutomationEditor *automation_editor) { AgsAutomationEdit *automation_edit; GList *list_start, *list; if((AGS_AUTOMATION_EDITOR_RESET_INPUT_HSCROLLBAR & (automation_editor->flags)) != 0){ return; } automation_edit = gtk_widget_get_ancestor(range, AGS_TYPE_AUTOMATION_EDIT); automation_editor->flags |= AGS_AUTOMATION_EDITOR_RESET_INPUT_HSCROLLBAR; gtk_adjustment_set_value(GTK_RANGE(automation_editor->input_hscrollbar)->adjustment, range->adjustment->value); /* automation edit */ list_start = list = gtk_container_get_children(automation_editor->input_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ if(automation_edit != list->data){ gtk_adjustment_set_value(GTK_RANGE(AGS_AUTOMATION_EDIT(list->data)->hscrollbar)->adjustment, range->adjustment->value); } list = list->next; } g_list_free(list_start); automation_editor->flags &= (~AGS_AUTOMATION_EDITOR_RESET_INPUT_HSCROLLBAR); } void ags_automation_editor_machine_changed_callback(AgsMachineSelector *machine_selector, AgsMachine *machine, AgsAutomationEditor *automation_editor) { ags_automation_editor_machine_changed(automation_editor, machine); } void ags_automation_editor_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsAutomationEditor *automation_editor) { AgsAudio *audio; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; guint output_pads, input_pads; guint i; audio = machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output_pads = audio->output_pads; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); if(audio_channels > audio_channels_old){ GList *tab; /* output line */ for(i = audio_channels_old * output_pads; i < audio_channels * output_pads; i++){ ags_notebook_insert_tab(automation_editor->output_notebook, i); tab = automation_editor->output_notebook->tab; gtk_toggle_button_set_active(AGS_NOTEBOOK_TAB(tab->data)->toggle, TRUE); } /* input line */ for(i = audio_channels_old * input_pads; i < audio_channels * input_pads; i++){ ags_notebook_insert_tab(automation_editor->output_notebook, i); tab = automation_editor->output_notebook->tab; gtk_toggle_button_set_active(AGS_NOTEBOOK_TAB(tab->data)->toggle, TRUE); } }else{ /* output line */ for(i = audio_channels * output_pads; i < audio_channels_old * output_pads; i++){ ags_notebook_remove_tab(automation_editor->output_notebook, audio_channels * output_pads); } /* input line */ for(i = audio_channels * input_pads; i < audio_channels_old * input_pads; i++){ ags_notebook_remove_tab(automation_editor->input_notebook, audio_channels * input_pads); } } } void ags_automation_editor_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsAutomationEditor *automation_editor) { AgsAudio *audio; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; guint audio_channels; guint i; audio = machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); if(pads > pads_old){ GList *tab; if(channel_type == AGS_TYPE_OUTPUT){ for(i = audio_channels * pads_old; i < audio_channels * pads; i++){ ags_notebook_insert_tab(automation_editor->output_notebook, i); tab = automation_editor->output_notebook->tab; gtk_toggle_button_set_active(AGS_NOTEBOOK_TAB(tab->data)->toggle, TRUE); } }else if(channel_type == AGS_TYPE_INPUT){ for(i = audio_channels * pads_old; i < audio_channels * pads; i++){ ags_notebook_insert_tab(automation_editor->input_notebook, i); tab = automation_editor->input_notebook->tab; gtk_toggle_button_set_active(AGS_NOTEBOOK_TAB(tab->data)->toggle, TRUE); } } }else{ if(channel_type == AGS_TYPE_OUTPUT){ for(i = audio_channels * pads; i < audio_channels * pads_old; i++){ ags_notebook_remove_tab(automation_editor->output_notebook, audio_channels * pads); } }else if(channel_type == AGS_TYPE_INPUT){ for(i = audio_channels * pads; i < audio_channels * pads_old; i++){ ags_notebook_remove_tab(automation_editor->input_notebook, audio_channels * pads); } } } } gsequencer-1.4.24/ags/X/ags_export_window_callbacks.h0000644000175000017500000000265213246707333017574 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_EXPORT_WINDOW_CALLBACKS_H__ #define __AGS_EXPORT_WINDOW_CALLBACKS_H__ #include #include #include #include void ags_export_window_add_export_soundcard_callback(GtkWidget *button, AgsExportWindow *export_window); void ags_export_window_remove_export_soundcard_callback(GtkWidget *button, AgsExportWindow *export_window); void ags_export_window_tact_callback(GtkWidget *spin_button, AgsExportWindow *export_window); void ags_export_window_export_callback(GtkWidget *toggle_button, AgsExportWindow *export_window); #endif /*__AGS_EXPORT_WINDOW_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_property_listing_editor.c0000644000175000017500000000737613246707333017653 00000000000000/* 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 . */ #include #include void ags_property_listing_editor_class_init(AgsPropertyListingEditorClass *property_listing_editor); void ags_property_listing_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_property_listing_editor_init(AgsPropertyListingEditor *property_listing_editor); void ags_property_listing_editor_connect(AgsConnectable *connectable); void ags_property_listing_editor_disconnect(AgsConnectable *connectable); static AgsConnectableInterface* ags_property_listing_editor_parent_connectable_interface; GType ags_property_listing_editor_get_type(void) { static GType ags_type_property_listing_editor = 0; if(!ags_type_property_listing_editor){ static const GTypeInfo ags_property_listing_editor_info = { sizeof (AgsPropertyListingEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_property_listing_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPropertyListingEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_property_listing_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_property_listing_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_property_listing_editor = g_type_register_static(AGS_TYPE_PROPERTY_EDITOR, "AgsPropertyListingEditor", &ags_property_listing_editor_info, 0); g_type_add_interface_static(ags_type_property_listing_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_property_listing_editor); } void ags_property_listing_editor_class_init(AgsPropertyListingEditorClass *property_listing_editor) { /* empty */ } void ags_property_listing_editor_connectable_interface_init(AgsConnectableInterface *connectable) { ags_property_listing_editor_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_property_listing_editor_connect; connectable->disconnect = ags_property_listing_editor_disconnect; } void ags_property_listing_editor_init(AgsPropertyListingEditor *property_listing_editor) { /* empty */ } void ags_property_listing_editor_connect(AgsConnectable *connectable) { ags_property_listing_editor_parent_connectable_interface->connect(connectable); /* empty */ } void ags_property_listing_editor_disconnect(AgsConnectable *connectable) { /* empty */ ags_property_listing_editor_parent_connectable_interface->disconnect(connectable); } AgsPropertyListingEditor* ags_property_listing_editor_new() { AgsPropertyListingEditor *property_listing_editor; property_listing_editor = (AgsPropertyListingEditor *) g_object_new(AGS_TYPE_PROPERTY_LISTING_EDITOR, NULL); return(property_listing_editor); } gsequencer-1.4.24/ags/X/ags_ladspa_browser.h0000644000175000017500000000473213246707333015675 00000000000000/* 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 . */ #ifndef __AGS_LADSPA_BROWSER_H__ #define __AGS_LADSPA_BROWSER_H__ #include #include #include #define AGS_TYPE_LADSPA_BROWSER (ags_ladspa_browser_get_type()) #define AGS_LADSPA_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_LADSPA_BROWSER, AgsLadspaBrowser)) #define AGS_LADSPA_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_LADSPA_BROWSER, AgsLadspaBrowserClass)) #define AGS_IS_LADSPA_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LADSPA_BROWSER)) #define AGS_IS_LADSPA_BROWSER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LADSPA_BROWSER)) #define AGS_LADSPA_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LADSPA_BROWSER, AgsLadspaBrowserClass)) typedef struct _AgsLadspaBrowser AgsLadspaBrowser; typedef struct _AgsLadspaBrowserClass AgsLadspaBrowserClass; struct _AgsLadspaBrowser { GtkVBox vbox; gchar *path; GtkHBox *plugin; GtkComboBox *filename; GtkComboBox *effect; GtkVBox *description; GtkWidget *preview; }; struct _AgsLadspaBrowserClass { GtkVBoxClass vbox; }; GType ags_ladspa_browser_get_type(void); gchar* ags_ladspa_browser_get_plugin_filename(AgsLadspaBrowser *ladspa_browser); gchar* ags_ladspa_browser_get_plugin_effect(AgsLadspaBrowser *ladspa_browser); GtkWidget* ags_ladspa_browser_combo_box_output_boolean_controls_new(); GtkWidget* ags_ladspa_browser_combo_box_output_controls_new(); GtkWidget* ags_ladspa_browser_combo_box_boolean_controls_new(); GtkWidget* ags_ladspa_browser_combo_box_controls_new(); GtkWidget* ags_ladspa_browser_preview_new(); AgsLadspaBrowser* ags_ladspa_browser_new(); #endif /*__AGS_LADSPA_BROWSER_H__*/ gsequencer-1.4.24/ags/X/ags_output_collection_editor.c0000644000175000017500000004202313247044247017774 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_output_collection_editor_class_init(AgsOutputCollectionEditorClass *output_collection_editor); void ags_output_collection_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_output_collection_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_output_collection_editor_init(AgsOutputCollectionEditor *output_collection_editor); void ags_output_collection_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_output_collection_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_output_collection_editor_connect(AgsConnectable *connectable); void ags_output_collection_editor_disconnect(AgsConnectable *connectable); void ags_output_collection_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_output_collection_editor_apply(AgsApplicable *applicable); void ags_output_collection_editor_reset(AgsApplicable *applicable); /** * SECTION:ags_output_collection_editor * @short_description: edit audio connections in bulk mode. * @title: AgsOutputCollectionEditor * @section_id: * @include: ags/X/ags_output_collection_editor.h * * #AgsOutputCollectionEditor is a composite widget to modify audio connections. A output collection * editor should be packed by a #AgsConnectionEditor. */ static gpointer ags_output_collection_editor_parent_class = NULL; enum{ PROP_0, PROP_CHANNEL_TYPE, }; GType ags_output_collection_editor_get_type(void) { static GType ags_type_output_collection_editor = 0; if(!ags_type_output_collection_editor){ static const GTypeInfo ags_output_collection_editor_info = { sizeof (AgsOutputCollectionEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_output_collection_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsOutputCollectionEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_output_collection_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_output_collection_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_output_collection_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_output_collection_editor = g_type_register_static(GTK_TYPE_TABLE, "AgsOutputCollectionEditor", &ags_output_collection_editor_info, 0); g_type_add_interface_static(ags_type_output_collection_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_output_collection_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_output_collection_editor); } void ags_output_collection_editor_class_init(AgsOutputCollectionEditorClass *output_collection_editor) { GObjectClass *gobject; GParamSpec *param_spec; ags_output_collection_editor_parent_class = g_type_class_peek_parent(output_collection_editor); /* GObjectClass */ gobject = (GObjectClass *) output_collection_editor; gobject->set_property = ags_output_collection_editor_set_property; gobject->get_property = ags_output_collection_editor_get_property; /* properties */ /** * AgsOutputCollectionEditor:channel-type: * * The channel type to apply to. Either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("channel-type", i18n_pspec("assigned channel type"), i18n_pspec("The channel type which this channel output collection editor is assigned with"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL_TYPE, param_spec); } void ags_output_collection_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_output_collection_editor_connect; connectable->disconnect = ags_output_collection_editor_disconnect; } void ags_output_collection_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_output_collection_editor_set_update; applicable->apply = ags_output_collection_editor_apply; applicable->reset = ags_output_collection_editor_reset; } void ags_output_collection_editor_init(AgsOutputCollectionEditor *output_collection_editor) { GtkAlignment *alignment; GtkLabel *label; g_signal_connect_after(GTK_WIDGET(output_collection_editor), "parent-set", G_CALLBACK(ags_output_collection_editor_parent_set_callback), output_collection_editor); output_collection_editor->channel_type = G_TYPE_NONE; gtk_table_resize(GTK_TABLE(output_collection_editor), 4, 2); gtk_table_set_row_spacings(GTK_TABLE(output_collection_editor), 4); gtk_table_set_col_spacings(GTK_TABLE(output_collection_editor), 2); /* first line */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(output_collection_editor), GTK_WIDGET(alignment), 0, 1, 0, 1, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("first line")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); output_collection_editor->first_line = (GtkSpinButton *) gtk_spin_button_new_with_range(-1.0, -1.0, 1.0); gtk_table_attach(GTK_TABLE(output_collection_editor), GTK_WIDGET(output_collection_editor->first_line), 1, 2, 0, 1, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); /* count */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(output_collection_editor), GTK_WIDGET(alignment), 0, 1, 1, 2, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("count")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); output_collection_editor->count = (GtkSpinButton *) gtk_spin_button_new_with_range(-1.0, -1.0, 1.0); gtk_table_attach(GTK_TABLE(output_collection_editor), GTK_WIDGET(output_collection_editor->count), 1, 2, 1, 2, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); /* soundcard */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(output_collection_editor), GTK_WIDGET(alignment), 0, 1, 2, 3, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("soundcard")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); output_collection_editor->soundcard = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(GTK_TABLE(output_collection_editor), GTK_WIDGET(output_collection_editor->soundcard), 1, 2, 2, 3, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); /* audio channel */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(output_collection_editor), GTK_WIDGET(alignment), 0, 1, 3, 4, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("audio channel")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); output_collection_editor->audio_channel = (GtkSpinButton *) gtk_spin_button_new_with_range(-1.0, -1.0, 1.0); gtk_table_attach(GTK_TABLE(output_collection_editor), GTK_WIDGET(output_collection_editor->audio_channel), 1, 2, 3, 4, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); } void ags_output_collection_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsOutputCollectionEditor *output_collection_editor; output_collection_editor = AGS_OUTPUT_COLLECTION_EDITOR(gobject); switch(prop_id){ case PROP_CHANNEL_TYPE: { output_collection_editor->channel_type = g_value_get_gtype(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_output_collection_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsOutputCollectionEditor *output_collection_editor; output_collection_editor = AGS_OUTPUT_COLLECTION_EDITOR(gobject); switch(prop_id){ case PROP_CHANNEL_TYPE: { g_value_set_gtype(value, output_collection_editor->channel_type); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_output_collection_editor_connect(AgsConnectable *connectable) { AgsOutputCollectionEditor *output_collection_editor; /* AgsOutputCollectionEditor */ output_collection_editor = AGS_OUTPUT_COLLECTION_EDITOR(connectable); g_signal_connect_after(G_OBJECT(output_collection_editor->soundcard), "changed", G_CALLBACK(ags_output_collection_editor_soundcard_callback), output_collection_editor); } void ags_output_collection_editor_disconnect(AgsConnectable *connectable) { AgsOutputCollectionEditor *output_collection_editor; /* AgsOutputCollectionEditor */ output_collection_editor = AGS_OUTPUT_COLLECTION_EDITOR(connectable); g_object_disconnect(G_OBJECT(output_collection_editor->soundcard), "any_signal::changed", G_CALLBACK(ags_output_collection_editor_soundcard_callback), output_collection_editor, NULL); } void ags_output_collection_editor_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_output_collection_editor_apply(AgsApplicable *applicable) { AgsOutputCollectionEditor *output_collection_editor; GtkTreeIter iter; output_collection_editor = AGS_OUTPUT_COLLECTION_EDITOR(applicable); if(gtk_combo_box_get_active_iter(GTK_COMBO_BOX(output_collection_editor->soundcard), &iter)){ AgsWindow *window; AgsMachine *machine; AgsConnectionEditor *connection_editor; AgsAudio *audio; AgsResetAudioConnection *reset_audio_connection; AgsMutexManager *mutex_manager; AgsAudioLoop *audio_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GObject *soundcard; GtkTreeModel *model; GList *task; guint audio_channels; guint first_line, count; guint audio_channel; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; connection_editor = AGS_CONNECTION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(output_collection_editor), AGS_TYPE_CONNECTION_EDITOR)); machine = connection_editor->machine; audio = machine->audio; /* get window and application_context */ window = (AgsWindow *) gtk_widget_get_toplevel(GTK_WIDGET(machine)); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); audio_loop = (AgsAudioLoop *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, audio); pthread_mutex_unlock(application_mutex); /* get audio fields */ pthread_mutex_lock(audio_mutex); audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) audio_loop, AGS_TYPE_GUI_THREAD); /* get mapping and soundcard */ first_line = (guint) gtk_spin_button_get_value_as_int(output_collection_editor->first_line); count = (guint) gtk_spin_button_get_value_as_int(output_collection_editor->count); audio_channel = (guint) gtk_spin_button_get_value_as_int(output_collection_editor->audio_channel); model = gtk_combo_box_get_model(GTK_COMBO_BOX(output_collection_editor->soundcard)); gtk_tree_model_get(model, &iter, 1, &soundcard, -1); /* create task */ task = NULL; for(i = 0; i < count; i++){ reset_audio_connection = ags_reset_audio_connection_new(soundcard, audio, output_collection_editor->channel_type, floor((double) (first_line + i) / (double) audio_channels), (first_line + i) % audio_channels, audio_channel + i); task = g_list_prepend(task, reset_audio_connection); } ags_gui_thread_schedule_task_list(gui_thread, task); } } void ags_output_collection_editor_reset(AgsApplicable *applicable) { /* empty */ } /** * ags_output_collection_editor_check: * @output_collection_editor: the #AgsOutputCollectionEditor * * Checks for possible channels to output. And modifies its ranges. * * Since: 1.0.0 */ void ags_output_collection_editor_check(AgsOutputCollectionEditor *output_collection_editor) { AgsConnectionEditor *connection_editor; AgsAudio *audio; AgsMutexManager *mutex_manager; GtkTreeIter iter; guint count; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; connection_editor = AGS_CONNECTION_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(output_collection_editor), AGS_TYPE_CONNECTION_EDITOR)); audio = connection_editor->machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = (AgsAudioLoop *) ags_mutex_manager_lookup(mutex_manager, audio); pthread_mutex_unlock(application_mutex); /* get audio fields */ if(output_collection_editor->channel_type == AGS_TYPE_INPUT){ pthread_mutex_lock(audio_mutex); count = audio->input_lines; pthread_mutex_unlock(audio_mutex); }else{ pthread_mutex_lock(audio_mutex); count = audio->output_lines; pthread_mutex_unlock(audio_mutex); } gtk_spin_button_set_range(output_collection_editor->first_line, 0.0, count - 1.0); gtk_spin_button_set_range(output_collection_editor->count, 0.0, count); if(gtk_combo_box_get_active_iter(GTK_COMBO_BOX(output_collection_editor->soundcard), &iter)){ GObject *soundcard; GtkTreeModel *model; guint audio_channels; /* soundcard connection */ model = gtk_combo_box_get_model(GTK_COMBO_BOX(output_collection_editor->soundcard)); gtk_tree_model_get(model, &iter, 1, &soundcard, -1); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), &audio_channels, NULL, NULL, NULL); gtk_spin_button_set_range(output_collection_editor->audio_channel, 0.0, audio_channels - 1.0); if(audio_channels < count){ gtk_spin_button_set_range(output_collection_editor->count, 0.0, audio_channels); } }else{ gtk_spin_button_set_range(output_collection_editor->audio_channel, -1.0, -1.0); } } /** * ags_output_collection_editor_new: * @channel_type: either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT * * Creates an #AgsOutputCollectionEditor * * Returns: a new #AgsOutputCollectionEditor * * Since: 1.0.0 */ AgsOutputCollectionEditor* ags_output_collection_editor_new(GType channel_type) { AgsOutputCollectionEditor *output_collection_editor; output_collection_editor = (AgsOutputCollectionEditor *) g_object_new(AGS_TYPE_OUTPUT_COLLECTION_EDITOR, "channel_type", channel_type, NULL); return(output_collection_editor); } gsequencer-1.4.24/ags/X/ags_wave_editor_callbacks.h0000644000175000017500000000247513247044247017176 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_WAVE_EDITOR_CALLBACKS_H__ #define __AGS_WAVE_EDITOR_CALLBACKS_H__ #include #include #include #include #include #include void ags_wave_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsWaveEditor *wave_editor); void ags_wave_editor_machine_changed_callback(AgsMachineSelector *machine_selector, AgsMachine *machine, AgsWaveEditor *wave_editor); #endif /*__AGS_WAVE_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_output_listing_editor.h0000644000175000017500000000465713247044247017332 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OUTPUT_LISTING_EDITOR_H__ #define __AGS_OUTPUT_LISTING_EDITOR_H__ #include #include #include #include #include #define AGS_TYPE_OUTPUT_LISTING_EDITOR (ags_output_listing_editor_get_type()) #define AGS_OUTPUT_LISTING_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_OUTPUT_LISTING_EDITOR, AgsOutputListingEditor)) #define AGS_OUTPUT_LISTING_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_OUTPUT_LISTING_EDITOR, AgsOutputListingEditorClass)) #define AGS_IS_OUTPUT_LISTING_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_OUTPUT_LISTING_EDITOR)) #define AGS_IS_OUTPUT_LISTING_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_OUTPUT_LISTING_EDITOR)) #define AGS_OUTPUT_LISTING_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_OUTPUT_LISTING_EDITOR, AgsOutputListingEditorClass)) typedef struct _AgsOutputListingEditor AgsOutputListingEditor; typedef struct _AgsOutputListingEditorClass AgsOutputListingEditorClass; struct _AgsOutputListingEditor { AgsPropertyListingEditor property_listing_editor; GType channel_type; GtkVBox *child; }; struct _AgsOutputListingEditorClass { AgsPropertyListingEditorClass property_listing_editor; }; GType ags_output_listing_editor_get_type(); void ags_output_listing_editor_add_children(AgsOutputListingEditor *output_listing_editor, AgsAudio *audio, guint nth_channel, gboolean connect); AgsOutputListingEditor* ags_output_listing_editor_new(GType channel_type); #endif /*__AGS_OUTPUT_LISTING_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_sequencer_editor_callbacks.c0000644000175000017500000001233113256163135020207 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_sequencer_editor_backend_changed_callback(GtkComboBox *combo, AgsSequencerEditor *sequencer_editor) { gchar *str; str = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo)); if(str != NULL){ if(!g_ascii_strncasecmp(str, "core-audio", 5)){ ags_sequencer_editor_load_core_audio_card(sequencer_editor); gtk_widget_show_all((GtkWidget *) sequencer_editor->source_hbox); }else if(!g_ascii_strncasecmp(str, "jack", 5)){ ags_sequencer_editor_load_jack_card(sequencer_editor); gtk_widget_show_all((GtkWidget *) sequencer_editor->source_hbox); }else if(!g_ascii_strncasecmp(str, "alsa", 5)){ ags_sequencer_editor_load_alsa_card(sequencer_editor); gtk_widget_hide((GtkWidget *) sequencer_editor->source_hbox); }else if(!g_ascii_strncasecmp(str, "oss", 4)){ ags_sequencer_editor_load_oss_card(sequencer_editor); gtk_widget_hide((GtkWidget *) sequencer_editor->source_hbox); } } } void ags_sequencer_editor_card_changed_callback(GtkComboBox *combo, AgsSequencerEditor *sequencer_editor) { AgsWindow *window; AgsSetInputDevice *set_input_device; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GObject *sequencer; GtkTreeIter current; gchar *str; gchar *card; gboolean use_alsa; guint channels, channels_min, channels_max; guint rate, rate_min, rate_max; guint buffer_size, buffer_size_min, buffer_size_max; GError *error; pthread_mutex_t *application_mutex; window = AGS_WINDOW(AGS_PREFERENCES(gtk_widget_get_ancestor(GTK_WIDGET(sequencer_editor), AGS_TYPE_PREFERENCES))->window); sequencer = sequencer_editor->sequencer; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task and sequencer thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* */ use_alsa = FALSE; str = NULL; if(AGS_IS_CORE_AUDIO_MIDIIN(sequencer)){ str = "core-audio"; }else if(AGS_IS_JACK_MIDIIN(sequencer)){ str = "jack"; }else if(AGS_IS_MIDIIN(sequencer)){ if((AGS_MIDIIN_ALSA & (AGS_MIDIIN(sequencer)->flags)) != 0){ str = "alsa"; }else if((AGS_MIDIIN_OSS & (AGS_MIDIIN(sequencer)->flags)) != 0){ str = "oss"; } } if(str != NULL && !g_ascii_strncasecmp(str, "alsa", 5)){ use_alsa = TRUE; } card = gtk_combo_box_text_get_active_text(sequencer_editor->card); if(card != NULL && use_alsa){ if(index(card, ',') != NULL){ str = g_strndup(card, index(card, ',') - card); g_free(card); card = str; } } /* reset dialog */ if(card != NULL){ set_input_device = ags_set_input_device_new(sequencer, card); ags_gui_thread_schedule_task(gui_thread, set_input_device); } } void ags_sequencer_editor_add_source_callback(GtkWidget *button, AgsSequencerEditor *sequencer_editor) { ags_sequencer_editor_add_source(sequencer_editor, NULL); } void ags_sequencer_editor_remove_source_callback(GtkWidget *button, AgsSequencerEditor *sequencer_editor) { ags_sequencer_editor_remove_source(sequencer_editor, gtk_combo_box_text_get_active_text(sequencer_editor->card)); } gsequencer-1.4.24/ags/X/ags_effect_bridge_callbacks.h0000644000175000017500000000255713247044247017437 00000000000000/* 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 . */ #ifndef __AGS_EFFECT_BRIDGE_CALLBACKS_H__ #define __AGS_EFFECT_BRIDGE_CALLBACKS_H__ #include #include #include #include #include void ags_effect_bridge_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsEffectBridge *effect_bridge); void ags_effect_bridge_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsEffectBridge *effect_bridge); #endif /*__AGS_EFFECT_BRIDGE_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_notation_editor_callbacks.c0000644000175000017500000001732413247044247020061 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include void ags_notation_editor_machine_changed_callback(AgsMachineSelector *machine_selector, AgsMachine *machine, AgsNotationEditor *notation_editor) { ags_notation_editor_machine_changed(notation_editor, machine); } void ags_notation_editor_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsNotationEditor *notation_editor) { guint i; if(audio_channels > audio_channels_old){ GList *tab; for(i = audio_channels_old; i < audio_channels; i++){ ags_notebook_insert_tab(notation_editor->notebook, i); tab = notation_editor->notebook->tab; gtk_toggle_button_set_active(AGS_NOTEBOOK_TAB(tab->data)->toggle, TRUE); } }else{ /* shrink notebook */ for(i = audio_channels; i < audio_channels_old; i++){ ags_notebook_remove_tab(notation_editor->notebook, audio_channels); } } } void ags_notation_editor_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsNotationEditor *notation_editor) { AgsAudio *audio; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; audio = machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* verify pads */ pthread_mutex_lock(audio_mutex); #if 0 if((AGS_AUDIO_NOTATION_DEFAULT & (audio->flags)) != 0){ if(!g_type_is_a(channel_type, AGS_TYPE_INPUT)){ pthread_mutex_unlock(audio_mutex); return; } }else{ if(!g_type_is_a(channel_type, AGS_TYPE_OUTPUT)){ pthread_mutex_unlock(audio_mutex); return; } } #else if(!g_type_is_a(channel_type, AGS_TYPE_INPUT)){ pthread_mutex_unlock(audio_mutex); return; } #endif pthread_mutex_unlock(audio_mutex); /* */ g_object_set(notation_editor->scrolled_piano->piano, "key-count", pads, NULL); gtk_widget_queue_draw(notation_editor->scrolled_piano->piano); /* */ gtk_widget_queue_draw(notation_editor->notation_edit); } void ags_notation_editor_init_channel_launch_callback(AgsTask *task, AgsNote *note) { AgsAudio *audio; AgsChannel *channel; AgsRecycling *recycling, *last_recycling; AgsRecallID *recall_id; AgsAddAudioSignal *add_audio_signal; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; AgsConfig *config; GObject *soundcard; GList *recall, *tmp; GList *delay_audio; gchar *str; gdouble notation_delay; guint samplerate; GValue value = {0,}; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); channel = AGS_INIT_CHANNEL(task)->channel; /* */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; audio = channel->audio; pthread_mutex_unlock(channel_mutex); /* */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, NULL, NULL); pthread_mutex_unlock(soundcard_mutex); #ifdef AGS_DEBUG g_message("launch"); #endif pthread_mutex_lock(channel_mutex); if(AGS_PLAYBACK(channel->playback) == NULL || AGS_PLAYBACK(channel->playback)->recall_id[0] == NULL){ pthread_mutex_unlock(channel_mutex); return; } recall_id = AGS_PLAYBACK(channel->playback)->recall_id[0]; last_recycling = channel->last_recycling; /* connect done */ recall = ags_recall_find_provider_with_recycling_context(channel->play, G_OBJECT(channel), G_OBJECT(recall_id->recycling_context)); tmp = recall; recall = ags_recall_find_type(recall, AGS_TYPE_PLAY_CHANNEL_RUN); //FIXME:JK: below // g_list_free(tmp); pthread_mutex_unlock(channel_mutex); /* */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* read notation delay */ pthread_mutex_lock(audio_mutex); delay_audio = audio->play; delay_audio = ags_recall_find_type(delay_audio, AGS_TYPE_DELAY_AUDIO); if(delay_audio != NULL){ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(AGS_DELAY_AUDIO(delay_audio->data)->notation_delay, &value); notation_delay = g_value_get_double(&value); }else{ notation_delay = 1.0; } pthread_mutex_unlock(audio_mutex); if(recall != NULL){ AgsAudioSignal *audio_signal; /* add audio signal */ recycling = channel->first_recycling; while(recycling != last_recycling->next){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); if(!AGS_RECALL(recall->data)->rt_safe){ audio_signal = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) recall_id); g_object_set(audio_signal, "note", note, NULL); /* add audio signal */ ags_recycling_create_audio_signal_with_frame_count(recycling, audio_signal, (note->x[1] - note->x[0]) * ((gdouble) samplerate / notation_delay), 0.0, 0); audio_signal->stream_current = audio_signal->stream_beginning; ags_connectable_connect(AGS_CONNECTABLE(audio_signal)); /* * emit add_audio_signal on AgsRecycling */ ags_recycling_add_audio_signal(recycling, audio_signal); }else{ GList *list; pthread_mutex_lock(recycling_mutex); audio_signal = NULL; list = ags_audio_signal_get_by_recall_id(recycling->audio_signal, recall_id); if(list != NULL){ audio_signal = list->data; g_object_set(audio_signal, "note", note, NULL); } note->rt_offset = 0; pthread_mutex_unlock(recycling_mutex); } pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } } } gsequencer-1.4.24/ags/X/ags_automation_editor.h0000644000175000017500000001241313247044247016406 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUTOMATION_EDITOR_H__ #define __AGS_AUTOMATION_EDITOR_H__ #include #include #include #include #include #include #include #include #include #include #include #define AGS_TYPE_AUTOMATION_EDITOR (ags_automation_editor_get_type()) #define AGS_AUTOMATION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTOMATION_EDITOR, AgsAutomationEditor)) #define AGS_AUTOMATION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUTOMATION_EDITOR, AgsAutomationEditorClass)) #define AGS_IS_AUTOMATION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUTOMATION_EDITOR)) #define AGS_IS_AUTOMATION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUTOMATION_EDITOR)) #define AGS_AUTOMATION_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_AUTOMATION_EDITOR, AgsAutomationEditorClass)) #define AGS_AUTOMATION_EDITOR_CHILD(ptr) ((AgsAutomationEditorChild *)(ptr)) #define AGS_AUTOMATION_EDITOR_MAX_VALUE_COUNT (64 * 16 * 16 * 1200) #define AGS_AUTOMATION_EDITOR_MAX_CONTROLS (64 * 16 * 16 * 1200) #define AGS_AUTOMATION_EDITOR_DEFAULT_VERSION "1.3.0" #define AGS_AUTOMATION_EDITOR_DEFAULT_BUILD_ID "Wed Dec 27 03:43:55 UTC 2017" typedef struct _AgsAutomationEditor AgsAutomationEditor; typedef struct _AgsAutomationEditorClass AgsAutomationEditorClass; typedef enum{ AGS_AUTOMATION_EDITOR_CONNECTED = 1, AGS_AUTOMATION_EDITOR_RESET_AUDIO_HSCROLLBAR = 1 << 1, AGS_AUTOMATION_EDITOR_RESET_OUTPUT_HSCROLLBAR = 1 << 2, AGS_AUTOMATION_EDITOR_RESET_INPUT_HSCROLLBAR = 1 << 3, AGS_AUTOMATION_EDITOR_PASTE_MATCH_LINE = 1 << 4, AGS_AUTOMATION_EDITOR_PASTE_NO_DUPLICATES = 1 << 5, }AgsAutomationEditorFlags; struct _AgsAutomationEditor { GtkVBox vbox; guint flags; gchar *version; gchar *build_id; guint tact_counter; gdouble current_tact; guint chunk_duration; GObject *soundcard; GtkHPaned *paned; AgsMachineSelector *machine_selector; AgsMachine *selected_machine; AgsAutomationToolbar *automation_toolbar; GtkNotebook *notebook; AgsRuler *audio_ruler; AgsScrolledScaleBox *audio_scrolled_scale_box; AgsScrolledAutomationEditBox *audio_scrolled_automation_edit_box; GtkVScrollbar *audio_vscrollbar; GtkHScrollbar *audio_hscrollbar; AgsNotebook *output_notebook; AgsRuler *output_ruler; AgsScrolledScaleBox *output_scrolled_scale_box; AgsScrolledAutomationEditBox *output_scrolled_automation_edit_box; GtkVScrollbar *output_vscrollbar; GtkHScrollbar *output_hscrollbar; AgsNotebook *input_notebook; AgsRuler *input_ruler; AgsScrolledScaleBox *input_scrolled_scale_box; AgsScrolledAutomationEditBox *input_scrolled_automation_edit_box; GtkVScrollbar *input_vscrollbar; GtkHScrollbar *input_hscrollbar; AgsAutomationEdit *focused_automation_edit; }; struct _AgsAutomationEditorClass { GtkVBoxClass vbox; void (*machine_changed)(AgsAutomationEditor *automation_editor, AgsMachine *machine); }; GType ags_automation_editor_get_type(void); void ags_automation_editor_reset_audio_scrollbar(AgsAutomationEditor *automation_editor); void ags_automation_editor_reset_output_scrollbar(AgsAutomationEditor *automation_editor); void ags_automation_editor_reset_input_scrollbar(AgsAutomationEditor *automation_editor); void ags_automation_editor_machine_changed(AgsAutomationEditor *automation_editor, AgsMachine *machine); void ags_automation_editor_add_acceleration(AgsAutomationEditor *automation_editor, AgsAcceleration *acceleration); void ags_automation_editor_delete_acceleration(AgsAutomationEditor *automation_editor, guint x, gdouble y); void ags_automation_editor_select_region(AgsAutomationEditor *automation_editor, guint x0, gdouble y0, guint x1, gdouble y1); void ags_automation_editor_select_all(AgsAutomationEditor *automation_editor); void ags_automation_editor_paste(AgsAutomationEditor *automation_editor); void ags_automation_editor_copy(AgsAutomationEditor *automation_editor); void ags_automation_editor_cut(AgsAutomationEditor *automation_editor); void ags_automation_editor_invert(AgsAutomationEditor *automation_editor); AgsAutomationEditor* ags_automation_editor_new(); #endif /*__AGS_AUTOMATION_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_listing_editor_callbacks.h0000644000175000017500000000250313247044247017675 00000000000000/* 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 . */ #ifndef __AGS_LISTING_EDITOR_CALLBACKS_H__ #define __AGS_LISTING_EDITOR_CALLBACKS_H__ #include #include #include #include #include int ags_listing_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsListingEditor *listing_editor); void ags_listing_editor_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, AgsListingEditor *listing_editor); #endif /*__AGS_LISTING_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_output_collection_editor_callbacks.h0000644000175000017500000000250613246707333022003 00000000000000/* 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 . */ #ifndef __AGS_OUTPUT_COLLECTION_EDITOR_CALLBACKS_H__ #define __AGS_OUTPUT_COLLECTION_EDITOR_CALLBACKS_H__ #include #include #include #include int ags_output_collection_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsOutputCollectionEditor *output_collection_editor); void ags_output_collection_editor_soundcard_callback(GtkWidget *combo_box, AgsOutputCollectionEditor *output_collection_editor); #endif /*__AGS_OUTPUT_COLLECTION_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_ui_provider.h0000644000175000017500000000600113247044247015203 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_UI_PROVIDER_H__ #define __AGS_UI_PROVIDER_H__ #include #include #include #include #define AGS_TYPE_UI_PROVIDER (ags_ui_provider_get_type()) #define AGS_UI_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_UI_PROVIDER, AgsUiProvider)) #define AGS_UI_PROVIDER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_UI_PROVIDER, AgsUiProviderInterface)) #define AGS_IS_UI_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_UI_PROVIDER)) #define AGS_IS_UI_PROVIDER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_UI_PROVIDER)) #define AGS_UI_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_UI_PROVIDER, AgsUiProviderInterface)) typedef struct _AgsUiProvider AgsUiProvider; typedef struct _AgsUiProviderInterface AgsUiProviderInterface; struct _AgsUiProviderInterface { GTypeInterface ginterface; GtkWidget* (*get_window)(AgsUiProvider *ui_provider); void (*set_window)(AgsUiProvider *ui_provider, GtkWidget *window); AgsThread* (*get_gui_thread)(AgsUiProvider *ui_provider); void (*set_gui_thread)(AgsUiProvider *ui_provider, AgsThread *gui_thread); gboolean (*get_show_animation)(AgsUiProvider *ui_provider); void (*set_show_animation)(AgsUiProvider *ui_provider, gboolean do_show_animation); gboolean (*get_gui_ready)(AgsUiProvider *ui_provider); void (*set_gui_ready)(AgsUiProvider *ui_provider, gboolean is_gui_ready); }; GType ags_ui_provider_get_type(); GtkWidget* ags_ui_provider_get_window(AgsUiProvider *ui_provider); void ags_ui_provider_set_window(AgsUiProvider *ui_provider, GtkWidget *window); AgsThread* ags_ui_provider_get_gui_thread(AgsUiProvider *ui_provider); void ags_ui_provider_set_gui_thread(AgsUiProvider *ui_provider, AgsThread *gui_thread); gboolean ags_ui_provider_get_show_animation(AgsUiProvider *ui_provider); void ags_ui_provider_set_show_animation(AgsUiProvider *ui_provider, gboolean do_show_animation); gboolean ags_ui_provider_get_gui_ready(AgsUiProvider *ui_provider); void ags_ui_provider_set_gui_ready(AgsUiProvider *ui_provider, gboolean is_gui_ready); #endif /*__AGS_UI_PROVIDER_H__*/ gsequencer-1.4.24/ags/X/ags_navigation.c0000644000175000017500000005511113247044247015014 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_navigation_class_init(AgsNavigationClass *navigation); void ags_navigation_connectable_interface_init(AgsConnectableInterface *connectable); void ags_navigation_init(AgsNavigation *navigation); void ags_navigation_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_navigation_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_navigation_finalize(GObject *gobject); void ags_navigation_connect(AgsConnectable *connectable); void ags_navigation_disconnect(AgsConnectable *connectable); void ags_navigation_real_change_position(AgsNavigation *navigation, gdouble tact); /** * SECTION:ags_navigation * @short_description: control audio object's playback. * @title: AgsNavigation * @section_id: * @include: ags/X/ags_navigation.h * * #AgsNavigation is a composite widget to control playback of #AgsAudio objects. * It can start #AgsMachine in bulk mode or position the stream. */ enum{ PROP_0, PROP_SOUNDCARD, }; enum{ CHANGE_POSITION, LAST_SIGNAL, }; static gpointer ags_navigation_parent_class = NULL; static guint navigation_signals[LAST_SIGNAL]; GType ags_navigation_get_type(void) { static GType ags_type_navigation = 0; if(!ags_type_navigation){ static const GTypeInfo ags_navigation_info = { sizeof (AgsNavigationClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_navigation_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsNavigation), 0, /* n_preallocs */ (GInstanceInitFunc) ags_navigation_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_navigation_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_navigation = g_type_register_static(GTK_TYPE_VBOX, "AgsNavigation", &ags_navigation_info, 0); g_type_add_interface_static(ags_type_navigation, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_navigation); } void ags_navigation_class_init(AgsNavigationClass *navigation) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_navigation_parent_class = g_type_class_peek_parent(navigation); /* GObjectClass */ gobject = (GObjectClass *) navigation; gobject->set_property = ags_navigation_set_property; gobject->get_property = ags_navigation_get_property; gobject->finalize = ags_navigation_finalize; /* properties */ /** * AgsNavigation:soundcard: * * The assigned #AgsSoundcard to use as default sink. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* AgsNavigationClass */ navigation->change_position = ags_navigation_real_change_position; /* signals */ /** * AgsNavigation::change-position: * @navigation: the #AgsNavigation * @tact: the new position * * The ::change-position seeks the stream. */ navigation_signals[CHANGE_POSITION] = g_signal_new("change-position", G_TYPE_FROM_CLASS (navigation), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsNavigationClass, change_position), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); } void ags_navigation_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_navigation_connect; connectable->disconnect = ags_navigation_disconnect; } void ags_navigation_init(AgsNavigation *navigation) { GtkHBox *hbox; GtkLabel *label; navigation->flags = AGS_NAVIGATION_BLOCK_TIC; navigation->soundcard = NULL; g_signal_connect_after(G_OBJECT(navigation), "parent-set", G_CALLBACK(ags_navigation_parent_set_callback), NULL); navigation->start_tact = 0.0; navigation->note_offset = 0.0; /* GtkWidget */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start((GtkBox *) navigation, (GtkWidget *) hbox, FALSE, FALSE, 2); navigation->expander = (GtkToggleButton *) gtk_toggle_button_new(); gtk_widget_set_name(navigation->expander, "ags-navigation-expander"); gtk_box_pack_start((GtkBox*) hbox, (GtkWidget *) navigation->expander, FALSE, FALSE, 2); gtk_container_add((GtkContainer *) navigation->expander, (GtkWidget *) gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE)); label = (GtkLabel *) gtk_label_new(i18n("bpm")); gtk_box_pack_start((GtkBox*) hbox, (GtkWidget *) label, FALSE, FALSE, 2); navigation->bpm = (GtkSpinButton *) gtk_spin_button_new_with_range(1.0, 1000.0, 1.0); navigation->bpm->adjustment->value = 120.0; gtk_box_pack_start((GtkBox*) hbox, (GtkWidget *) navigation->bpm, FALSE, FALSE, 2); navigation->current_bpm = 120.0; navigation->rewind = (GtkToggleButton *) g_object_new(GTK_TYPE_BUTTON, "image", (GtkWidget *) gtk_image_new_from_stock(GTK_STOCK_MEDIA_REWIND, GTK_ICON_SIZE_LARGE_TOOLBAR), NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->rewind, FALSE, FALSE, 0); navigation->previous = (GtkButton *) g_object_new(GTK_TYPE_BUTTON, "image", (GtkWidget *) gtk_image_new_from_stock(GTK_STOCK_MEDIA_PREVIOUS, GTK_ICON_SIZE_LARGE_TOOLBAR), NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->previous, FALSE, FALSE, 0); navigation->play = (GtkToggleButton *) g_object_new(GTK_TYPE_TOGGLE_BUTTON, "image", (GtkWidget *) gtk_image_new_from_stock(GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_LARGE_TOOLBAR), NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->play, FALSE, FALSE, 0); navigation->stop = (GtkButton *) g_object_new(GTK_TYPE_BUTTON, "image", (GtkWidget *) gtk_image_new_from_stock(GTK_STOCK_MEDIA_STOP, GTK_ICON_SIZE_LARGE_TOOLBAR), NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->stop, FALSE, FALSE, 0); navigation->next = (GtkButton *) g_object_new(GTK_TYPE_BUTTON, "image", (GtkWidget *) gtk_image_new_from_stock(GTK_STOCK_MEDIA_NEXT, GTK_ICON_SIZE_LARGE_TOOLBAR), NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->next, FALSE, FALSE, 0); navigation->forward = (GtkToggleButton *) g_object_new(GTK_TYPE_BUTTON, "image", (GtkWidget *) gtk_image_new_from_stock(GTK_STOCK_MEDIA_FORWARD, GTK_ICON_SIZE_LARGE_TOOLBAR), NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->forward, FALSE, FALSE, 0); navigation->loop = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("loop")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->loop, FALSE, FALSE, 2); label = (GtkLabel *) gtk_label_new("position"); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 2); navigation->position_time = (GtkLabel *) gtk_label_new("00:00.000"); 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_NOTATION_EDITOR_MAX_CONTROLS, 1.0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->position_tact, FALSE, FALSE, 2); label = (GtkLabel *) gtk_label_new("duration"); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 2); navigation->duration_time = (GtkLabel *) gtk_label_new(NULL); g_object_set(navigation->duration_time, "label", "0000:00.000", NULL); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->duration_time, FALSE, FALSE, 2); g_timeout_add(1000 / 30, (GSourceFunc) ags_navigation_duration_time_queue_draw, (gpointer) navigation); navigation->duration_tact = NULL; // navigation->duration_tact = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_NOTATION_EDITOR_MAX_CONTROLS, 1.0); // gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->duration_tact, FALSE, FALSE, 2); /* expansion */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); // GTK_WIDGET_SET_FLAGS((GtkWidget *) hbox, GTK_NO_SHOW_ALL); gtk_box_pack_start((GtkBox *) navigation, (GtkWidget *) hbox, FALSE, FALSE, 2); label = (GtkLabel *) gtk_label_new(i18n("loop L")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 2); navigation->loop_left_tact = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65000.0, 1.0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->loop_left_tact, FALSE, FALSE, 2); label = (GtkLabel *) gtk_label_new(i18n("loop R")); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 2); navigation->loop_right_tact = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 65000.0, 1.0); gtk_spin_button_set_value(navigation->loop_right_tact, 4.0); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->loop_right_tact, FALSE, FALSE, 2); navigation->scroll = NULL; /* navigation->scroll = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("auto-scroll")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(navigation->scroll), FALSE); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->scroll, FALSE, FALSE, 2); */ navigation->exclude_sequencer = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("exclude sequencers")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(navigation->exclude_sequencer), TRUE); gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->exclude_sequencer, FALSE, FALSE, 2); } void ags_navigation_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsNavigation *navigation; navigation = AGS_NAVIGATION(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(navigation->soundcard == soundcard){ return; } if(navigation->soundcard != NULL){ g_object_unref(navigation->soundcard); } if(soundcard != NULL){ g_signal_connect_after(soundcard, "stop", G_CALLBACK(ags_navigation_soundcard_stop_callback), (gpointer) navigation); g_object_ref(soundcard); } navigation->soundcard = soundcard; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_navigation_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsNavigation *navigation; navigation = AGS_NAVIGATION(gobject); switch(prop_id){ case PROP_SOUNDCARD: g_value_set_object(value, navigation->soundcard); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_navigation_connect(AgsConnectable *connectable) { AgsNavigation *navigation; navigation = AGS_NAVIGATION(connectable); g_signal_connect((GObject *) navigation->expander, "clicked", G_CALLBACK(ags_navigation_expander_callback), (gpointer) navigation); g_signal_connect_after((GObject *) navigation->bpm, "value-changed", G_CALLBACK(ags_navigation_bpm_callback), (gpointer) navigation); g_signal_connect((GObject *) navigation->rewind, "clicked", G_CALLBACK(ags_navigation_rewind_callback), (gpointer) navigation); g_signal_connect((GObject *) navigation->previous, "clicked", G_CALLBACK(ags_navigation_prev_callback), (gpointer) navigation); g_signal_connect((GObject *) navigation->play, "clicked", G_CALLBACK(ags_navigation_play_callback), (gpointer) navigation); g_signal_connect((GObject *) navigation->stop, "clicked", G_CALLBACK(ags_navigation_stop_callback), (gpointer) navigation); g_signal_connect((GObject *) navigation->next, "clicked", G_CALLBACK(ags_navigation_next_callback), (gpointer) navigation); g_signal_connect((GObject *) navigation->forward, "clicked", G_CALLBACK(ags_navigation_forward_callback), (gpointer) navigation); g_signal_connect((GObject *) navigation->loop, "clicked", G_CALLBACK(ags_navigation_loop_callback), (gpointer) navigation); g_signal_connect_after((GObject *) navigation->position_tact, "value-changed", G_CALLBACK(ags_navigation_position_tact_callback), (gpointer) navigation); // g_signal_connect((GObject *) navigation->duration_tact, "value-changed", // G_CALLBACK(ags_navigation_duration_tact_callback), (gpointer) navigation); /* soundcard */ // g_signal_connect_after((GObject *) navigation->soundcard, "tic", // G_CALLBACK(ags_navigation_tic_callback), (gpointer) navigation); if(navigation->soundcard != NULL){ g_signal_connect_after(navigation->soundcard, "stop", G_CALLBACK(ags_navigation_soundcard_stop_callback), (gpointer) navigation); } /* expansion */ g_signal_connect((GObject *) navigation->loop_left_tact, "value-changed", G_CALLBACK(ags_navigation_loop_left_tact_callback), (gpointer) navigation); g_signal_connect((GObject *) navigation->loop_right_tact, "value-changed", G_CALLBACK(ags_navigation_loop_right_tact_callback), (gpointer) navigation); } void ags_navigation_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_navigation_finalize(GObject *gobject) { /* empty */ } void ags_navigation_real_change_position(AgsNavigation *navigation, gdouble tact_counter) { AgsWindow *window; AgsSeekSoundcard *seek_soundcard; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; gchar *timestr; gdouble delay; gdouble delay_factor; double tact_factor; double tact; guint steps; guint note_offset; gboolean move_forward; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; window = AGS_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(navigation))); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, window->soundcard); pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* seek soundcard */ pthread_mutex_lock(soundcard_mutex); note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(window->soundcard)); delay = ags_soundcard_get_delay(AGS_SOUNDCARD(window->soundcard)); delay_factor = ags_soundcard_get_delay_factor(AGS_SOUNDCARD(window->soundcard)); pthread_mutex_unlock(soundcard_mutex); tact = note_offset - navigation->start_tact; if(note_offset < 16 * tact_counter){ steps = (guint) (16 * tact_counter - note_offset); move_forward = TRUE; }else{ steps = (guint) (note_offset - 16 * tact_counter); move_forward = FALSE; } seek_soundcard = ags_seek_soundcard_new(window->soundcard, steps, move_forward); ags_gui_thread_schedule_task(gui_thread, seek_soundcard); //TODO:JK: implement me /* update */ timestr = ags_time_get_uptime_from_offset(16.0 * tact_counter, navigation->bpm->adjustment->value, delay, delay_factor); gtk_label_set_text(navigation->position_time, timestr); g_free(timestr); } /** * ags_navigation_change_position: * @navigation: the #AgsNavigation * @tact: the new position * * Change tact position of editor. The scrollbar is adjustet * and its playback position seeked. * * Since: 1.0.0 */ void ags_navigation_change_position(AgsNavigation *navigation, gdouble tact) { g_return_if_fail(AGS_IS_NAVIGATION(navigation)); g_object_ref(G_OBJECT(navigation)); g_signal_emit(G_OBJECT(navigation), navigation_signals[CHANGE_POSITION], 0, tact); g_object_unref(G_OBJECT(navigation)); } /** * ags_navigation_tact_to_time_string: * @tact: the new position * @bpm: the BPM * @delay_factor: the delay factor * * Convert tact unit to time. * * Returns: tact as time string * * Since: 1.0.0 */ gchar* ags_navigation_tact_to_time_string(gdouble tact, gdouble bpm, gdouble delay_factor) { gdouble delay_min, delay_sec, delay_msec; gchar *timestr; gdouble tact_redux; guint min, sec, msec; delay_min = bpm / delay_factor; delay_sec = delay_min / 60.0; delay_msec = delay_sec / 1000.0; tact_redux = (tact + (tact / 16.0)) * 16.0; min = (guint) floor(tact_redux / delay_min); if(min > 0){ tact_redux = tact_redux - (min * delay_min); } sec = (guint) floor(tact_redux / delay_sec); if(sec > 0){ tact_redux = tact_redux - (sec * delay_sec); } msec = (guint) floor(tact_redux / delay_msec); timestr = g_strdup_printf("%.4d:%.2d.%.3d", min, sec, msec); return(timestr); } /** * ags_navigation_update_time_string: * @tact: the new position * @bpm: the BPM * @delay_factor: the delay factor * @time_string: the pointer location to set * * Updates time as string. * * Since: 1.0.0 */ void ags_navigation_update_time_string(double tact, gdouble bpm, gdouble delay_factor, gchar *time_string) { gdouble delay_min, delay_sec, delay_msec; gchar *timestr; gdouble tact_redux; guint min, sec, msec; delay_min = bpm * (60.0 / bpm) * (60.0 / bpm) * delay_factor; delay_sec = delay_min / 60.0; delay_msec = delay_sec / 1000.0; tact_redux = 1.0 / 16.0; min = (guint) floor(tact_redux / delay_min); if(min > 0){ tact_redux = tact_redux - (min * delay_min); } sec = (guint) floor(tact_redux / delay_sec); if(sec > 0){ tact_redux = tact_redux - (sec * delay_sec); } msec = (guint) floor(tact_redux / delay_msec); sprintf(time_string, "%.4d:%.2d.%.3d", min, sec, msec); } gchar* ags_navigation_relative_tact_to_time_string(gchar *timestr, gdouble delay, gdouble bpm, gdouble delay_factor) { guint min, sec, msec; guint prev_min, prev_sec, prev_msec; gdouble sec_value; sscanf(timestr, "%d:%d.%d", &prev_min, &prev_sec, &prev_msec); sec_value = prev_min * 60.0; sec_value += prev_sec; 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); min = (guint) floor(sec_value / 60.0); sec = sec_value - 60 * min; msec = (sec_value - sec - min * 60) * 1000; timestr = g_strdup_printf("%.4d:%.2d.%.3d", min, sec, msec); return(timestr); } gchar* ags_navigation_absolute_tact_to_time_string(gdouble tact, gdouble bpm, gdouble delay_factor) { AgsConfig *config; gchar *timestr; gdouble delay_min, delay_sec, delay_msec; gdouble tact_redux; guint min, sec, msec; /* calculate delays */ delay_sec = ((bpm / delay_factor) / 60.0); delay_min = delay_sec * 60.0; delay_msec = delay_sec / 1000.0; /* translate to time string */ tact_redux = tact; min = (guint) floor(tact_redux / delay_min); if(min > 0){ tact_redux = tact_redux - (min * delay_min); } sec = (guint) floor(tact_redux / delay_sec); if(sec > 0){ tact_redux = tact_redux - (sec * delay_sec); } msec = (guint) floor(tact_redux / delay_msec); timestr = g_strdup_printf("%.4d:%.2d.%.3d", min, sec, msec); return(timestr); } /** * ags_navigation_set_seeking_sensitive_new: * @navigation: the #AgsNavigation * @enabled: if %TRUE then sensitive, otherwise insensitive. * * Enables/Disables the #AgsNavigation to control the tree. * * Since: 1.0.0 */ void ags_navigation_set_seeking_sensitive(AgsNavigation *navigation, gboolean enabled) { gtk_widget_set_sensitive((GtkWidget *) navigation->rewind, enabled); gtk_widget_set_sensitive((GtkWidget *) navigation->previous, enabled); gtk_widget_set_sensitive((GtkWidget *) navigation->play, enabled); gtk_widget_set_sensitive((GtkWidget *) navigation->stop, enabled); gtk_widget_set_sensitive((GtkWidget *) navigation->next, enabled); gtk_widget_set_sensitive((GtkWidget *) navigation->forward, enabled); } gboolean ags_navigation_duration_time_queue_draw(GtkWidget *widget) { AgsNavigation *navigation; AgsMutexManager *mutex_manager; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; navigation = AGS_NAVIGATION(widget); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); if(!AGS_IS_SOUNDCARD(navigation->soundcard)){ return(TRUE); } /* lookup soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) navigation->soundcard); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(soundcard_mutex); str = ags_soundcard_get_uptime(AGS_SOUNDCARD(navigation->soundcard)); pthread_mutex_unlock(soundcard_mutex); g_object_set(navigation->duration_time, "label", str, NULL); g_free(str); gtk_widget_queue_draw((GtkWidget *) navigation->duration_time); return(TRUE); } /** * ags_navigation_new: * * Creates an #AgsNavigation to control the tree. * * Returns: a new #AgsNavigation * * Since: 1.0.0 */ AgsNavigation* ags_navigation_new() { AgsNavigation *navigation; navigation = (AgsNavigation *) g_object_new(AGS_TYPE_NAVIGATION, NULL); return(navigation); } gsequencer-1.4.24/ags/X/ags_line_member.h0000644000175000017500000000721113246707333015137 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LINE_MEMBER_H__ #define __AGS_LINE_MEMBER_H__ #include #include #include #include #include #include #include #define AGS_TYPE_LINE_MEMBER (ags_line_member_get_type()) #define AGS_LINE_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LINE_MEMBER, AgsLineMember)) #define AGS_LINE_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LINE_MEMBER, AgsLineMemberClass)) #define AGS_IS_LINE_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LINE_MEMBER)) #define AGS_IS_LINE_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LINE_MEMBER)) #define AGS_LINE_MEMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LINE_MEMBER, AgsLineMemberClass)) #define AGS_LINE_MEMBER_DEFAULT_VERSION "0.7.33\0" #define AGS_LINE_MEMBER_DEFAULT_BUILD_ID "Wed Jun 15 13:48:15 UTC 2016\0" typedef struct _AgsLineMember AgsLineMember; typedef struct _AgsLineMemberClass AgsLineMemberClass; typedef enum{ AGS_LINE_MEMBER_CONNECTED = 1, AGS_LINE_MEMBER_DEFAULT_TEMPLATE = 1 << 1, AGS_LINE_MEMBER_RESET_BY_ATOMIC = 1 << 2, AGS_LINE_MEMBER_RESET_BY_TASK = 1 << 3, AGS_LINE_MEMBER_APPLY_RECALL = 1 << 4, AGS_LINE_MEMBER_PLAY_CALLBACK_WRITE = 1 << 5, AGS_LINE_MEMBER_RECALL_CALLBACK_WRITE = 1 << 6, AGS_LINE_MEMBER_CALLBACK_READ_BLOCK = 1 << 7, AGS_LINE_MEMBER_CALLBACK_WRITE_BLOCK = 1 << 8, AGS_LINE_MEMBER_APPLY_INITIAL = 1 << 9, AGS_LINE_MEMBER_BLOCK_CHAINED = 1 << 10, }Agslinememberflags; typedef enum{ AGS_LINE_MEMBER_PORT_BOOLEAN = 1, AGS_LINE_MEMBER_PORT_INTEGER = 1 << 1, }AgsLineMemberPortFlags; struct _AgsLineMember { GtkFrame frame; guint flags; guint port_flags; GType widget_type; gchar *widget_label; gchar *filename; gchar *effect; gchar *plugin_name; gchar *specifier; gchar *control_port; guint steps; AgsConversion *conversion; AgsPort *port; gpointer port_data; gboolean active; AgsPort *recall_port; gpointer recall_port_data; gboolean recall_active; GType task_type; }; struct _AgsLineMemberClass { GtkFrameClass frame; void (*change_port)(AgsLineMember *line_member, gpointer port_data); GList* (*find_port)(AgsLineMember *line_member); }; GType ags_line_member_get_type(void); GtkWidget* ags_line_member_get_widget(AgsLineMember *line_member); void ags_line_member_set_label(AgsLineMember *line_member, gchar *label); void ags_line_member_change_port(AgsLineMember *line_member, gpointer port_data); GList* ags_line_member_find_port(AgsLineMember *line_member); void ags_line_member_chained_event(AgsLineMember *line_member); AgsLineMember* ags_line_member_new(); #endif /*__AGS_LINE_MEMBER_H__*/ gsequencer-1.4.24/ags/X/ags_bulk_member.c0000644000175000017500000007751313256163135015151 00000000000000/* 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 . */ #include #include #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #include #include #include #include #include #include #include void ags_bulk_member_class_init(AgsBulkMemberClass *bulk_member); void ags_bulk_member_connectable_interface_init(AgsConnectableInterface *connectable); void ags_bulk_member_init(AgsBulkMember *bulk_member); void ags_bulk_member_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_bulk_member_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_bulk_member_connect(AgsConnectable *connectable); void ags_bulk_member_disconnect(AgsConnectable *connectable); void ags_bulk_member_finalize(GObject *gobject); void ags_bulk_member_real_change_port(AgsBulkMember *bulk_member, gpointer port_data); GList* ags_bulk_member_real_find_port(AgsBulkMember *bulk_member); /** * SECTION:ags_bulk_member * @short_description: Modify assigned recall's port * @title: AgsBulkMember * @section_id: * @include: ags/X/ags_bulk_member.h * * #AgsBulkMember is a composite widget to modify ports of recalls. A bulk member * controls only one specific port of a recall but distinguishes between simple/complex * recall. It is generally packed into a #AgsBulk. */ enum{ CHANGE_PORT, FIND_PORT, LAST_SIGNAL, }; enum{ PROP_0, PROP_WIDGET_TYPE, PROP_WIDGET_LABEL, PROP_PLUGIN_NAME, PROP_FILENAME, PROP_EFFECT, PROP_SPECIFIER, PROP_CONTROL_PORT, PROP_STEPS, PROP_TASK_TYPE, PROP_BULK_PORT, PROP_RECALL_BULK_PORT, }; static gpointer ags_bulk_member_parent_class = NULL; static guint bulk_member_signals[LAST_SIGNAL]; GType ags_bulk_member_get_type(void) { static GType ags_type_bulk_member = 0; if(!ags_type_bulk_member){ static const GTypeInfo ags_bulk_member_info = { sizeof(AgsBulkMemberClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_bulk_member_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsBulkMember), 0, /* n_preallocs */ (GInstanceInitFunc) ags_bulk_member_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_bulk_member_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_bulk_member = g_type_register_static(GTK_TYPE_FRAME, "AgsBulkMember", &ags_bulk_member_info, 0); g_type_add_interface_static(ags_type_bulk_member, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_bulk_member); } void ags_bulk_member_class_init(AgsBulkMemberClass *bulk_member) { GObjectClass *gobject; GParamSpec *param_spec; ags_bulk_member_parent_class = g_type_class_peek_parent(bulk_member); /* GObjectClass */ gobject = G_OBJECT_CLASS(bulk_member); gobject->set_property = ags_bulk_member_set_property; gobject->get_property = ags_bulk_member_get_property; gobject->finalize = ags_bulk_member_finalize; /* properties */ /** * AgsBulkMember:widget-type: * * The widget type to instantiate and use as control. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("widget-type", i18n_pspec("widget type of bulk member"), i18n_pspec("The widget type this bulk member packs"), 0, G_MAXULONG, G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_WIDGET_TYPE, param_spec); /** * AgsBulkMember:widget-label: * * The widget's label to use. * * Since: 1.0.0 */ param_spec = g_param_spec_string("widget-label", i18n_pspec("label to display"), i18n_pspec("The label to display"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_WIDGET_LABEL, param_spec); /** * AgsBulkMember:plugin-name: * * The plugin name of the recall to use. * * Since: 1.0.0 */ param_spec = g_param_spec_string("plugin-name", i18n_pspec("plugin name to control"), i18n_pspec("The plugin's name to control"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLUGIN_NAME, param_spec); /** * AgsBulkMember:specifier: * * The plugin specifier of the recall to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_string("specifier", i18n_pspec("port specifier"), i18n_pspec("The specifier of the port"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SPECIFIER, param_spec); /** * AgsBulkMember:filename: * * The plugin filename of the recall to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the filename"), i18n_pspec("The filename of the plugin"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsBulkMember:effect: * * The plugin effect of the recall to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect of the plugin"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsBulkMember:control-port: * * The control port of the recall. * * Since: 1.0.0 */ param_spec = g_param_spec_string("control-port", i18n_pspec("control port index"), i18n_pspec("The index of the port to control"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTROL_PORT, param_spec); /** * AgsBulkMember:steps: * * If bulk member has integer ports, this is the number of steps. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("steps", i18n_pspec("steps of bulk members port"), i18n_pspec("The steps this bulk members port has"), 0, G_MAXUINT, AGS_DIAL_DEFAULT_PRECISION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STEPS, param_spec); /** * AgsBulkMember:bulk-port: * * The playback bulk port to be added. * * Since: 1.0.0 */ param_spec = g_param_spec_object("bulk-port", i18n_pspec("a bulk port"), i18n_pspec("The bulk port to add"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BULK_PORT, param_spec); /** * AgsBulkMember:recall-bulk-port: * * The recall bulk port to be added. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-bulk-port", i18n_pspec("a recall bulk port"), i18n_pspec("The bulk port to add"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_BULK_PORT, param_spec); /** * AgsBulkMember:task-type: * * The task type to apply the ports. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("task-type", i18n_pspec("task type to apply"), i18n_pspec("The task type to apply the ports"), 0, G_MAXULONG, G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TASK_TYPE, param_spec); /* AgsBulkMember */ bulk_member->change_port = ags_bulk_member_real_change_port; bulk_member->find_port = ags_bulk_member_real_find_port; /* signals */ /** * AgsBulkMember::change-port: * @bulk_member: the #AgsBulkMember * @port_data: the port's data * * The ::change-port signal notifies modified port. * * Since: 1.0.0 */ bulk_member_signals[CHANGE_PORT] = g_signal_new("change-port", G_TYPE_FROM_CLASS(bulk_member), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsBulkMemberClass, change_port), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsBulkMember::find-port: * @bulk_member: the #AgsBulkMember to resize * * The ::find-port as recall should be mapped * * Returns: a #GList with associated ports * * Since: 1.0.0 */ bulk_member_signals[FIND_PORT] = g_signal_new("find-port", G_TYPE_FROM_CLASS(bulk_member), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsBulkMemberClass, find_port), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); } void ags_bulk_member_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_bulk_member_connect; connectable->disconnect = ags_bulk_member_disconnect; } void ags_bulk_member_init(AgsBulkMember *bulk_member) { AgsDial *dial; g_signal_connect_after((GObject *) bulk_member, "parent_set", G_CALLBACK(ags_bulk_member_parent_set_callback), (gpointer) bulk_member); bulk_member->flags = (AGS_BULK_MEMBER_RESET_BY_ATOMIC | AGS_BULK_MEMBER_APPLY_RECALL); bulk_member->port_flags = 0; bulk_member->widget_type = AGS_TYPE_DIAL; dial = (AgsDial *) g_object_new(AGS_TYPE_DIAL, "adjustment", gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0), NULL); gtk_widget_set_size_request((GtkWidget *) dial, 2 * (dial->radius + dial->outline_strength + dial->button_width + 4), 2 * (dial->radius + dial->outline_strength + 1)); gtk_container_add(GTK_CONTAINER(bulk_member), (GtkWidget *) dial); bulk_member->widget_label = NULL; bulk_member->plugin_name = NULL; bulk_member->filename = NULL; bulk_member->effect = NULL; bulk_member->specifier = NULL; bulk_member->control_port = NULL; bulk_member->steps = 0; bulk_member->conversion = NULL; bulk_member->bulk_port = NULL; bulk_member->recall_bulk_port = NULL; bulk_member->task_type = G_TYPE_NONE; } void ags_bulk_member_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsBulkMember *bulk_member; bulk_member = AGS_BULK_MEMBER(gobject); switch(prop_id){ case PROP_WIDGET_TYPE: { GtkWidget *child, *new_child; GType widget_type; widget_type = g_value_get_ulong(value); if(widget_type == bulk_member->widget_type){ return; } child = gtk_bin_get_child(GTK_BIN(bulk_member)); if(child != NULL){ gtk_widget_destroy(child); } bulk_member->widget_type = widget_type; new_child = (GtkWidget *) g_object_new(widget_type, NULL); if(AGS_IS_DIAL(new_child)){ AgsDial *dial; dial = (AgsDial *) new_child; gtk_widget_set_size_request((GtkWidget *) dial, 2 * (dial->radius + dial->outline_strength + dial->button_width + 4), 2 * (dial->radius + dial->outline_strength + 1)); } gtk_container_add(GTK_CONTAINER(bulk_member), new_child); } break; case PROP_WIDGET_LABEL: { gchar *label; label = g_value_get_string(value); if(label == bulk_member->widget_label){ return; } if(bulk_member->widget_label != NULL){ g_free(bulk_member->widget_label); } bulk_member->widget_label = g_strdup(label); ags_bulk_member_set_label(bulk_member, label); } break; case PROP_PLUGIN_NAME: { gchar *plugin_name; plugin_name = g_value_get_string(value); if(plugin_name == bulk_member->plugin_name){ return; } if(bulk_member->plugin_name != NULL){ g_free(bulk_member->plugin_name); } bulk_member->plugin_name = g_strdup(plugin_name); } break; case PROP_FILENAME: { gchar *str; gchar *filename; filename = g_value_get_string(value); if(filename == bulk_member->filename){ return; } if(bulk_member->filename != NULL){ g_free(bulk_member->filename); } if(filename != NULL){ if(!g_file_test(filename, G_FILE_TEST_EXISTS)){ AgsWindow *window; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) bulk_member); str = g_strdup_printf("%s %s", i18n("Plugin file not present"), filename); ags_window_show_error(window, str); g_free(str); } } bulk_member->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == bulk_member->effect){ return; } if(bulk_member->effect != NULL){ g_free(bulk_member->effect); } bulk_member->effect = g_strdup(effect); } break; case PROP_SPECIFIER: { gchar *specifier; specifier = g_value_get_string(value); if(specifier == bulk_member->specifier){ return; } if(bulk_member->specifier != NULL){ g_free(bulk_member->specifier); } bulk_member->specifier = g_strdup(specifier); } break; case PROP_CONTROL_PORT: { gchar *control_port; control_port = g_value_get_string(value); if(control_port == bulk_member->control_port){ return; } if(bulk_member->control_port != NULL){ g_free(bulk_member->control_port); } bulk_member->control_port = g_strdup(control_port); } break; case PROP_STEPS: { GtkWidget *child; guint steps; steps = g_value_get_uint(value); bulk_member->steps = steps; child = gtk_bin_get_child(GTK_BIN(bulk_member)); if(AGS_IS_DIAL(child)){ g_object_set(child, "scale-precision", steps, NULL); } } break; case PROP_BULK_PORT: { AgsPort *port; AgsBulkPort *bulk_port; port = (AgsPort *) g_value_get_object(value); if(port == NULL){ return; } if(ags_bulk_port_find(bulk_member->bulk_port, port) != NULL){ return; } if((AGS_PORT_INFINITE_RANGE & (port->flags)) != 0){ GtkWidget *child; child = gtk_bin_get_child(GTK_BIN(bulk_member)); //TODO:JK: add more types if(AGS_IS_DIAL(child)){ AGS_DIAL(child)->flags |= AGS_DIAL_SEEMLESS_MODE; } } g_object_ref(port); bulk_port = ags_bulk_port_alloc(port); bulk_member->bulk_port = g_list_prepend(bulk_member->bulk_port, bulk_port); } break; case PROP_RECALL_BULK_PORT: { AgsPort *port; AgsBulkPort *bulk_port; port = (AgsPort *) g_value_get_object(value); if(port == NULL){ return; } if(ags_bulk_port_find(bulk_member->recall_bulk_port, port) != NULL){ return; } g_object_ref(port); bulk_port = ags_bulk_port_alloc(port); bulk_member->recall_bulk_port = g_list_prepend(bulk_member->recall_bulk_port, bulk_port); } break; case PROP_TASK_TYPE: { GType type; type = g_value_get_ulong(value); if(bulk_member->task_type == type){ return; } bulk_member->task_type = type; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_bulk_member_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsBulkMember *bulk_member; bulk_member = AGS_BULK_MEMBER(gobject); switch(prop_id){ case PROP_WIDGET_TYPE: { g_value_set_ulong(value, bulk_member->widget_type); } break; case PROP_WIDGET_LABEL: { g_value_set_string(value, bulk_member->widget_label); } break; case PROP_PLUGIN_NAME: { g_value_set_string(value, bulk_member->plugin_name); } break; case PROP_FILENAME: { g_value_set_string(value, bulk_member->filename); } break; case PROP_EFFECT: { g_value_set_string(value, bulk_member->effect); } break; case PROP_SPECIFIER: { g_value_set_string(value, bulk_member->specifier); } break; case PROP_CONTROL_PORT: { g_value_set_string(value, bulk_member->control_port); } break; case PROP_TASK_TYPE: { g_value_set_ulong(value, bulk_member->task_type); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_bulk_member_connect(AgsConnectable *connectable) { AgsBulkMember *bulk_member; GtkWidget *control; bulk_member = AGS_BULK_MEMBER(connectable); if((AGS_BULK_MEMBER_CONNECTED & (bulk_member->flags)) != 0){ return; } bulk_member->flags |= AGS_BULK_MEMBER_CONNECTED; ags_bulk_member_find_port(bulk_member); control = gtk_bin_get_child(GTK_BIN(bulk_member)); if((AGS_BULK_MEMBER_APPLY_INITIAL & (bulk_member->flags)) != 0){ GtkAdjustment *adjustment; gboolean active; gboolean is_toggled; adjustment = NULL; is_toggled = FALSE; if(AGS_IS_DIAL(control)){ adjustment = AGS_DIAL(control)->adjustment; }else if(GTK_IS_RANGE(control)){ adjustment = GTK_RANGE(control)->adjustment; }else if(GTK_IS_SPIN_BUTTON(control)){ adjustment = GTK_SPIN_BUTTON(control)->adjustment; }else if(GTK_IS_TOGGLE_BUTTON(control)){ active = gtk_toggle_button_get_active((GtkToggleButton *) control); is_toggled = TRUE; } if(is_toggled){ ags_bulk_member_change_port(bulk_member, &(active)); }else if(adjustment != NULL){ ags_bulk_member_change_port(bulk_member, &(adjustment->value)); } bulk_member->flags &= (~AGS_BULK_MEMBER_APPLY_INITIAL); } /* widget callback */ if(bulk_member->widget_type == AGS_TYPE_DIAL){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_bulk_member_dial_changed_callback), bulk_member); }else if(bulk_member->widget_type == GTK_TYPE_VSCALE){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_bulk_member_vscale_changed_callback), bulk_member); }else if(bulk_member->widget_type == GTK_TYPE_HSCALE){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_bulk_member_hscale_changed_callback), bulk_member); }else if(bulk_member->widget_type == GTK_TYPE_SPIN_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_bulk_member_spin_button_changed_callback), bulk_member); }else if(bulk_member->widget_type == GTK_TYPE_CHECK_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "clicked", G_CALLBACK(ags_bulk_member_check_button_clicked_callback), bulk_member); }else if(bulk_member->widget_type == GTK_TYPE_TOGGLE_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "clicked", G_CALLBACK(ags_bulk_member_toggle_button_clicked_callback), bulk_member); }else if(bulk_member->widget_type == GTK_TYPE_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "clicked", G_CALLBACK(ags_bulk_member_button_clicked_callback), bulk_member); } } void ags_bulk_member_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_bulk_member_finalize(GObject *gobject) { /* empty */ } GtkWidget* ags_bulk_member_get_widget(AgsBulkMember *bulk_member) { return(gtk_bin_get_child(GTK_BIN(bulk_member))); } /** * ags_bulk_port_alloc: * @port: the #AgsPort to set * * Allocate #AgsBulkPort-struct. * * Returns: the newly allocated #AgsBulkPort-struct * * Since: 1.0.0 */ AgsBulkPort* ags_bulk_port_alloc(AgsPort *port) { AgsBulkPort *bulk_port; bulk_port = (AgsBulkPort *) malloc(sizeof(AgsBulkPort)); bulk_port->port = port; bulk_port->port_data = &(port->port_value); bulk_port->active = FALSE; return(bulk_port); } /** * ags_bulk_port_find: * @list: the #GList-struct to search * @port: the #AgsPort to find * * Find port within @list. * * Returns: the #GList-struct containing port if found otherwise %NULL * * Since: 1.0.0 */ GList* ags_bulk_port_find(GList *list, AgsPort *port) { while(list != NULL){ if(AGS_BULK_PORT(list->data)->port == port){ break; } list = list->next; } return(list); } /** * ags_bulk_member_set_label: * @bulk_member: an #AgsBulkMember * @label: the label of the control * * Modify the label of the bulk member. */ void ags_bulk_member_set_label(AgsBulkMember *bulk_member, gchar *label) { GtkWidget *child_widget; if(g_type_is_a(bulk_member->widget_type, GTK_TYPE_BUTTON)){ child_widget = gtk_bin_get_child(GTK_BIN(bulk_member)); g_object_set(G_OBJECT(child_widget), "label", label, NULL); }else{ gtk_frame_set_label_widget((GtkFrame *) bulk_member, (GtkWidget *) g_object_new(GTK_TYPE_LABEL, "wrap", TRUE, "wrap-mode", PANGO_WRAP_CHAR, "use-markup", TRUE, "label", g_markup_printf_escaped("%s", label), NULL)); } bulk_member->widget_label = label; } void ags_bulk_member_real_change_port(AgsBulkMember *bulk_member, gpointer port_data) { AgsWindow *window; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; auto void ags_bulk_member_real_change_port_iter(GList *list); void ags_bulk_member_real_change_port_iter(GList *list){ AgsPort *port; while(list != NULL){ GValue value = {0,}; port = AGS_BULK_PORT(list->data)->port; pthread_mutex_lock(port->mutex); if(!port->port_value_is_pointer){ if(port->port_value_type == G_TYPE_BOOLEAN){ g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, ((gboolean *) port_data)[0]); }else if(port->port_value_type == G_TYPE_INT64){ g_value_init(&value, G_TYPE_INT64); g_value_set_int64(&value, ((gint *) port_data)[0]); }else if(port->port_value_type == G_TYPE_UINT64){ g_value_init(&value, G_TYPE_UINT64); g_value_set_uint64(&value, ((guint *) port_data)[0]); }else if(port->port_value_type == G_TYPE_FLOAT){ gfloat val; if(GTK_IS_TOGGLE_BUTTON(gtk_bin_get_child((GtkBin *) bulk_member))){ if(((gboolean *) port_data)[0]){ val = 1.0; }else{ val = 0.0; } }else{ val = ((gdouble *) port_data)[0]; } if(bulk_member->conversion != NULL){ gfloat upper, lower, range, step; gfloat c_upper, c_lower, c_range; gboolean success; success = FALSE; if(AGS_IS_DIAL(gtk_bin_get_child(GTK_BIN(bulk_member)))){ AgsDial *dial; dial = (AgsDial *) gtk_bin_get_child(GTK_BIN(bulk_member)); upper = dial->adjustment->upper; lower = dial->adjustment->lower; success = TRUE; }else{ g_warning("unsupported child type in conversion"); } if(success){ range = upper - lower; step = range / val; val = ags_conversion_convert(bulk_member->conversion, val, FALSE); c_upper = ags_conversion_convert(bulk_member->conversion, upper, FALSE); c_lower = ags_conversion_convert(bulk_member->conversion, lower, FALSE); c_range = c_upper - c_lower; val = ags_conversion_convert(bulk_member->conversion, c_lower + (c_range / step), TRUE); } } g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, val); }else if(port->port_value_type == G_TYPE_DOUBLE){ gdouble val; if(GTK_IS_TOGGLE_BUTTON(gtk_bin_get_child((GtkBin *) bulk_member))){ if(((gboolean *) port_data)[0]){ val = 1.0; }else{ val = 0.0; } }else{ val = ((gdouble *) port_data)[0]; } if(bulk_member->conversion != NULL){ gdouble upper, lower, range, step; gdouble c_upper, c_lower, c_range; gboolean success; success = FALSE; if(AGS_IS_DIAL(gtk_bin_get_child(GTK_BIN(bulk_member)))){ AgsDial *dial; dial = (AgsDial *) gtk_bin_get_child(GTK_BIN(bulk_member)); upper = dial->adjustment->upper; lower = dial->adjustment->lower; success = TRUE; }else{ g_warning("unsupported child type in conversion"); } if(success){ range = upper - lower; step = range / val; val = ags_conversion_convert(bulk_member->conversion, val, FALSE); c_upper = ags_conversion_convert(bulk_member->conversion, upper, FALSE); c_lower = ags_conversion_convert(bulk_member->conversion, lower, FALSE); c_range = c_upper - c_lower; val = ags_conversion_convert(bulk_member->conversion, c_lower + (c_range / step), TRUE); } } g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, ((gdouble *) port_data)[0]); } }else{ if(port->port_value_type == G_TYPE_OBJECT){ g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, port_data); }else{ if(port->port_value_type == G_TYPE_BOOLEAN || port->port_value_type == G_TYPE_INT64 || port->port_value_type == G_TYPE_UINT64 || port->port_value_type == G_TYPE_FLOAT || port->port_value_type == G_TYPE_DOUBLE || port->port_value_type == G_TYPE_POINTER){ g_value_init(&value, G_TYPE_POINTER); g_value_set_pointer(&value, port_data); } } } pthread_mutex_unlock(port->mutex); // g_message("change %f", g_value_get_float(&value)); ags_port_safe_write(port, &value); list = list->next; } } window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) bulk_member, AGS_TYPE_WINDOW); application_context = (AgsApplicationContext *) window->application_context; main_loop = (AgsThread *) application_context->main_loop; gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); if((AGS_BULK_MEMBER_RESET_BY_ATOMIC & (bulk_member->flags)) != 0){ ags_bulk_member_real_change_port_iter(bulk_member->bulk_port); if((AGS_BULK_MEMBER_APPLY_RECALL & (bulk_member->flags)) != 0){ ags_bulk_member_real_change_port_iter(bulk_member->recall_bulk_port); } } if((AGS_BULK_MEMBER_RESET_BY_TASK & (bulk_member->flags)) != 0){ AgsEffectBulk *effect_bulk; AgsGuiThread *gui_thread; AgsTask *task; effect_bulk = (AgsEffectBulk *) gtk_widget_get_ancestor(GTK_WIDGET(bulk_member), AGS_TYPE_EFFECT_BULK); task = (AgsTask *) g_object_new(bulk_member->task_type, bulk_member->control_port, port_data, NULL); ags_gui_thread_schedule_task(gui_thread, task); } } /** * ags_bulk_change_port: * @bulk_member: an #AgsBulkMember * @port_data: the port's value * * Is emitted as port's value is modified. * * Since: 1.0.0 */ void ags_bulk_member_change_port(AgsBulkMember *bulk_member, gpointer port_data) { g_return_if_fail(AGS_IS_BULK_MEMBER(bulk_member)); g_object_ref((GObject *) bulk_member); g_signal_emit(G_OBJECT(bulk_member), bulk_member_signals[CHANGE_PORT], 0, port_data); g_object_unref((GObject *) bulk_member); } GList* ags_bulk_member_real_find_port(AgsBulkMember *bulk_member) { GtkWidget *effect_bulk; AgsAudio *audio; AgsChannel *channel; AgsPort *audio_port, *channel_port; AgsPort *recall_audio_port, *recall_channel_port; gchar *specifier; auto AgsPort* ags_bulk_member_find_specifier(GList *recall); AgsPort* ags_bulk_member_find_specifier(GList *recall){ GList *port; while(recall != NULL){ if((AGS_RECALL_BULK_MODE & (AGS_RECALL(recall->data)->flags)) == 0){ recall = recall->next; continue; } port = AGS_RECALL(recall->data)->port; #ifdef AGS_DEBUG g_message("search port in %s", G_OBJECT_TYPE_NAME(recall->data)); #endif while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, specifier)){ return(AGS_PORT(port->data)); } port = port->next; } recall = recall->next; } return(NULL); } if(bulk_member == NULL || !AGS_IS_BULK_MEMBER(bulk_member)){ return(NULL); } specifier = bulk_member->specifier; if(specifier == NULL){ return(NULL); } effect_bulk = gtk_widget_get_ancestor(GTK_WIDGET(bulk_member), AGS_TYPE_EFFECT_BULK); audio = AGS_EFFECT_BULK(effect_bulk)->audio; audio_port = NULL; channel_port = NULL; recall_audio_port = NULL; recall_channel_port = NULL; /* search channels */ channel = NULL; if(AGS_EFFECT_BULK(effect_bulk)->channel_type == AGS_TYPE_OUTPUT){ channel = audio->output; }else if(AGS_EFFECT_BULK(effect_bulk)->channel_type == AGS_TYPE_INPUT){ channel = audio->input; } while(channel != NULL){ channel_port = ags_bulk_member_find_specifier(channel->play); if(channel_port != NULL && ags_bulk_port_find(bulk_member->bulk_port, channel_port) == NULL){ bulk_member->bulk_port = g_list_prepend(bulk_member->bulk_port, ags_bulk_port_alloc(channel_port)); } recall_channel_port = ags_bulk_member_find_specifier(channel->recall); if(recall_channel_port != NULL && ags_bulk_port_find(bulk_member->recall_bulk_port, recall_channel_port) == NULL){ bulk_member->recall_bulk_port = g_list_prepend(bulk_member->recall_bulk_port, ags_bulk_port_alloc(recall_channel_port)); } channel = channel->next; } /* search audio */ if(channel_port == NULL && recall_channel_port == NULL){ audio_port = ags_bulk_member_find_specifier(audio->play); if(audio_port != NULL && ags_bulk_port_find(bulk_member->bulk_port, audio_port) == NULL){ bulk_member->bulk_port = g_list_prepend(bulk_member->bulk_port, ags_bulk_port_alloc(audio_port)); } recall_audio_port = ags_bulk_member_find_specifier(audio->recall); if(recall_audio_port != NULL && ags_bulk_port_find(bulk_member->recall_bulk_port, recall_audio_port) == NULL){ bulk_member->recall_bulk_port = g_list_prepend(bulk_member->recall_bulk_port, ags_bulk_port_alloc(recall_audio_port)); } } return(g_list_copy(bulk_member->bulk_port)); } /** * ags_bulk_member_find_port: * @bulk_member: an #AgsBulkMember * * Lookup ports of assigned recalls. * * Returns: an #GList containing all related #AgsPort * * Since: 1.0.0 */ GList* ags_bulk_member_find_port(AgsBulkMember *bulk_member) { GList *list; list = NULL; g_return_val_if_fail(AGS_IS_BULK_MEMBER(bulk_member), NULL); g_object_ref((GObject *) bulk_member); g_signal_emit((GObject *) bulk_member, bulk_member_signals[FIND_PORT], 0, &list); g_object_unref((GObject *) bulk_member); return(list); } /** * ags_bulk_member_new: * * Creates an #AgsBulkMember * * Returns: a new #AgsBulkMember * * Since: 1.0.0 */ AgsBulkMember* ags_bulk_member_new() { AgsBulkMember *bulk_member; bulk_member = (AgsBulkMember *) g_object_new(AGS_TYPE_BULK_MEMBER, NULL); return(bulk_member); } gsequencer-1.4.24/ags/X/ags_soundcard_editor_callbacks.h0000644000175000017500000000372013246707333020211 00000000000000/* 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 . */ #ifndef __AGS_SOUNCARD_EDITOR_CALLBACKS_H__ #define __AGS_SOUNCARD_EDITOR_CALLBACKS_H__ #include #include #include #include void ags_soundcard_editor_backend_changed_callback(GtkComboBox *combo, AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_card_changed_callback(GtkComboBox *combo, AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_add_sink_callback(GtkWidget *button, AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_remove_sink_callback(GtkWidget *button, AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_audio_channels_changed_callback(GtkSpinButton *spin_button, AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_samplerate_changed_callback(GtkSpinButton *spin_button, AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_buffer_size_changed_callback(GtkSpinButton *spin_button, AgsSoundcardEditor *soundcard_editor); void ags_soundcard_editor_format_changed_callback(GtkComboBox *combo_box, AgsSoundcardEditor *soundcard_editor); #endif /*__AGS_SOUNDCARD_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_link_editor.h0000644000175000017500000000430313246707333015163 00000000000000/* 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 . */ #ifndef __AGS_LINK_EDITOR_H__ #define __AGS_LINK_EDITOR_H__ #include #include #include #include #include #define AGS_TYPE_LINK_EDITOR (ags_link_editor_get_type()) #define AGS_LINK_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_LINK_EDITOR, AgsLinkEditor)) #define AGS_LINK_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_LINK_EDITOR, AgsLinkEditorClass)) #define AGS_IS_LINK_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LINK_EDITOR)) #define AGS_IS_LINK_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LINK_EDITOR)) #define AGS_LINK_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LINK_EDITOR, AgsLinkEditorClass)) typedef struct _AgsLinkEditor AgsLinkEditor; typedef struct _AgsLinkEditorClass AgsLinkEditorClass; typedef enum{ AGS_LINK_EDITOR_CONNECTED = 1, AGS_LINK_EDITOR_FILE_CHOOSER_PLAY_DONE = 1 << 1, AGS_LINK_EDITOR_BLOCK_FILE_CHOOSER = 1 << 2, }AgsLinkEditorFlags; struct _AgsLinkEditor { GtkHBox hbox; guint flags; GtkComboBox *combo; GtkSpinButton *spin_button; AgsAudioFile *audio_file; GtkFileChooserDialog *file_chooser; }; struct _AgsLinkEditorClass { GtkHBoxClass hbox; }; GType ags_link_editor_get_type(void); AgsLinkEditor* ags_link_editor_new(); #endif /*__AGS_LINK_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_line_member_editor_callbacks.h0000644000175000017500000000260113246707333020502 00000000000000/* 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 . */ #ifndef __AGS_LINE_MEMBER_EDITOR_CALLBACKS_H__ #define __AGS_LINE_MEMBER_EDITOR_CALLBACKS_H__ #include #include #include #include void ags_line_member_editor_add_callback(GtkWidget *button, AgsLineMemberEditor *line_member_editor); void ags_line_member_editor_remove_callback(GtkWidget *button, AgsLineMemberEditor *line_member_editor); void ags_line_member_editor_plugin_browser_response_callback(GtkDialog *dialog, gint response, AgsLineMemberEditor *line_member_editor); #endif /*__AGS_LINE_MEMBER_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_line.c0000644000175000017500000014530613256163135013610 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_line_class_init(AgsLineClass *line); void ags_line_connectable_interface_init(AgsConnectableInterface *connectable); void ags_line_plugin_interface_init(AgsPluginInterface *plugin); void ags_line_init(AgsLine *line); void ags_line_finalize(GObject *gobject); void ags_line_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_line_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_line_connect(AgsConnectable *connectable); void ags_line_disconnect(AgsConnectable *connectable); gchar* ags_line_get_version(AgsPlugin *plugin); void ags_line_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_line_get_build_id(AgsPlugin *plugin); void ags_line_set_build_id(AgsPlugin *plugin, gchar *build_id); void ags_line_real_set_channel(AgsLine *line, AgsChannel *channel); GList* ags_line_add_ladspa_effect(AgsLine *line, GList *control_type_name, gchar *filename, gchar *effect); GList* ags_line_add_lv2_effect(AgsLine *line, GList *control_type_name, gchar *filename, gchar *effect); GList* ags_line_real_add_effect(AgsLine *line, GList *control_type_name, gchar *filename, gchar *effect); void ags_line_real_remove_effect(AgsLine *line, guint nth); void ags_line_real_map_recall(AgsLine *line, guint output_pad_start); GList* ags_line_real_find_port(AgsLine *line); /** * SECTION:ags_line * @short_description: A composite widget to visualize #AgsChannel * @title: AgsLine * @section_id: * @include: ags/X/ags_line.h * * #AgsLine is a composite widget to visualize #AgsChannel. It should be * packed by an #AgsPad. It may contain #AgsLineMember to modify ports of * #AgsRecall. */ enum{ SET_CHANNEL, GROUP_CHANGED, ADD_EFFECT, REMOVE_EFFECT, MAP_RECALL, FIND_PORT, DONE, LAST_SIGNAL, }; enum{ PROP_0, PROP_PAD, PROP_CHANNEL, }; static gpointer ags_line_parent_class = NULL; static guint line_signals[LAST_SIGNAL]; GHashTable *ags_line_message_monitor = NULL; GHashTable *ags_line_indicator_queue_draw = NULL; GType ags_line_get_type(void) { static GType ags_type_line = 0; if(!ags_type_line){ static const GTypeInfo ags_line_info = { sizeof(AgsLineClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_line_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsLine), 0, /* n_preallocs */ (GInstanceInitFunc) ags_line_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_line_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_line_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_line = g_type_register_static(GTK_TYPE_VBOX, "AgsLine", &ags_line_info, 0); g_type_add_interface_static(ags_type_line, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_line, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_line); } void ags_line_class_init(AgsLineClass *line) { GObjectClass *gobject; GParamSpec *param_spec; ags_line_parent_class = g_type_class_peek_parent(line); /* GObjectClass */ gobject = G_OBJECT_CLASS(line); gobject->set_property = ags_line_set_property; gobject->get_property = ags_line_get_property; gobject->finalize = ags_line_finalize; /* properties */ /** * AgsLine:pad: * * The assigned #AgsPad. * * Since: 1.0.0 */ param_spec = g_param_spec_object("pad", i18n_pspec("parent pad"), i18n_pspec("The pad which is its parent"), AGS_TYPE_PAD, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PAD, param_spec); /** * AgsLine:channel: * * The assigned #AgsChannel to visualize. * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("assigned channel"), i18n_pspec("The channel it is assigned with"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /* AgsLineClass */ line->set_channel = ags_line_real_set_channel; line->group_changed = NULL; line->add_effect = ags_line_real_add_effect; line->remove_effect = ags_line_real_remove_effect; line->map_recall = ags_line_real_map_recall; line->find_port = ags_line_real_find_port; line->done = NULL; /* signals */ /** * AgsLine::set-channel: * @line: the #AgsLine to modify * @channel: the #AgsChannel to set * * The ::set-channel signal notifies about changed channel. * * Since: 1.0.0 */ line_signals[SET_CHANNEL] = g_signal_new("set-channel", G_TYPE_FROM_CLASS(line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLineClass, set_channel), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); /** * AgsLine::group-changed: * @line: the object group changed * * The ::group-changed signal notifies about changed grouping. This * normally happens as toggling group button in #AgsPad or #AgsLine. * * Since: 1.0.0 */ line_signals[GROUP_CHANGED] = g_signal_new("group-changed", G_TYPE_FROM_CLASS(line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLineClass, group_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsLine::add-effect: * @line: the #AgsLine to modify * @control_type_name: the control #GType string representation * @filename: the effect's filename * @effect: the effect's name * * The ::add-effect signal notifies about added effect. * * Returns: a #GList-struct containing new #AgsPort objects * * Since: 1.0.0 */ line_signals[ADD_EFFECT] = g_signal_new("add-effect", G_TYPE_FROM_CLASS(line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLineClass, add_effect), NULL, NULL, g_cclosure_user_marshal_POINTER__POINTER_STRING_STRING, G_TYPE_POINTER, 3, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); /** * AgsLine::remove-effect: * @line: the #AgsLine to modify * @nth: the nth effect * * The ::remove-effect signal notifies about removed effect. * * Since: 1.0.0 */ line_signals[REMOVE_EFFECT] = g_signal_new("remove-effect", G_TYPE_FROM_CLASS(line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLineClass, remove_effect), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsLine::map-recall: * @line: the #AgsLine * @output_pad_start: the channels start pad * * The ::map-recall as recalls should be mapped. * * Since: 1.0.0 */ line_signals[MAP_RECALL] = g_signal_new("map-recall", G_TYPE_FROM_CLASS(line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLineClass, map_recall), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsLine::find-port: * @line: the #AgsLine * * The ::find-port retrieves all associated ports. * * Returns: a #GList with associated ports * * Since: 1.0.0 */ line_signals[FIND_PORT] = g_signal_new("find-port", G_TYPE_FROM_CLASS(line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLineClass, find_port), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); /** * AgsLine::done: * @line: the #AgsLine * @recall_id: the #AgsRecallID * * The ::done signal gets emited as audio stops playback. * * Since: 1.2.0 */ line_signals[DONE] = g_signal_new("done", G_TYPE_FROM_CLASS(line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLineClass, done), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_line_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_line_connect; connectable->disconnect = ags_line_disconnect; } void ags_line_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_line_get_version; plugin->set_version = ags_line_set_version; plugin->get_build_id = ags_line_get_build_id; plugin->set_build_id = ags_line_set_build_id; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_line_init(AgsLine *line) { if(ags_line_message_monitor == NULL){ ags_line_message_monitor = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_line_message_monitor, line, ags_line_message_monitor_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_line_message_monitor_timeout, (gpointer) line); if(ags_line_indicator_queue_draw == NULL){ ags_line_indicator_queue_draw = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_signal_connect_after((GObject *) line, "parent_set", G_CALLBACK(ags_line_parent_set_callback), (gpointer) line); line->flags = 0; line->version = AGS_VERSION; line->build_id = AGS_BUILD_ID; line->channel = NULL; // gtk_widget_set_can_focus(line, // TRUE); line->pad = NULL; line->label = (GtkLabel *) gtk_label_new(NULL); gtk_box_pack_start(GTK_BOX(line), GTK_WIDGET(line->label), FALSE, FALSE, 0); line->group = (GtkToggleButton *) gtk_toggle_button_new_with_label(i18n("group")); gtk_toggle_button_set_active(line->group, TRUE); gtk_box_pack_start(GTK_BOX(line), GTK_WIDGET(line->group), FALSE, FALSE, 0); line->expander = ags_expander_new(1, 1); gtk_table_set_row_spacings(line->expander->table, 2); gtk_table_set_col_spacings(line->expander->table, 2); gtk_box_pack_start(GTK_BOX(line), GTK_WIDGET(line->expander), TRUE, TRUE, 0); line->indicator = NULL; /* forwarded callbacks */ g_signal_connect_after(line, "done", G_CALLBACK(ags_line_done_callback), NULL); } void ags_line_finalize(GObject *gobject) { AgsLine *line; GList *list; line = AGS_LINE(gobject); /* remove message monitor */ g_hash_table_remove(ags_line_message_monitor, line); /* remove indicator widget */ if(line->indicator != NULL){ g_hash_table_remove(ags_line_indicator_queue_draw, line->indicator); } /* remove of the queued drawing hash */ list = line->queued_drawing; while(list != NULL){ g_hash_table_remove(ags_line_indicator_queue_draw, list->data); list = list->next; } /* call parent */ G_OBJECT_CLASS(ags_line_parent_class)->finalize(gobject); } void ags_line_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLine *line; line = AGS_LINE(gobject); switch(prop_id){ case PROP_PAD: { GtkWidget *pad; pad = (GtkWidget *) g_value_get_object(value); if(line->pad == pad){ return; } if(line->pad != NULL){ g_object_unref(G_OBJECT(line->pad)); } if(pad != NULL){ g_object_ref(G_OBJECT(pad)); } line->pad = pad; } break; case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); ags_line_set_channel(line, channel); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_line_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLine *line; line = AGS_LINE(gobject); switch(prop_id){ case PROP_PAD: g_value_set_object(value, line->pad); break; case PROP_CHANNEL: g_value_set_object(value, line->channel); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_line_connect(AgsConnectable *connectable) { AgsLine *line; GList *list, *list_start; line = AGS_LINE(connectable); if((AGS_LINE_CONNECTED & (line->flags)) != 0){ return; } /* set connected flag */ line->flags |= AGS_LINE_CONNECTED; #ifdef AGS_DEBUG g_message("line connect"); #endif if((AGS_LINE_PREMAPPED_RECALL & (line->flags)) == 0){ if((AGS_LINE_MAPPED_RECALL & (line->flags)) == 0){ ags_line_map_recall(line, 0); } }else{ ags_line_find_port(line); } /* connect group button */ g_signal_connect_after((GObject *) line->group, "clicked", G_CALLBACK(ags_line_group_clicked_callback), (gpointer) line); /* connect line members */ list_start = list = gtk_container_get_children(GTK_CONTAINER(line->expander->table)); while(list != NULL){ if(AGS_IS_CONNECTABLE(list->data)){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); } list = list->next; } if(list_start != NULL){ g_list_free(list_start); } } void ags_line_disconnect(AgsConnectable *connectable) { AgsLine *line; GList *list, *list_start; line = AGS_LINE(connectable); if((AGS_LINE_CONNECTED & (line->flags)) == 0){ return; } /* unset connected flag */ line->flags &= (~AGS_LINE_CONNECTED); #ifdef AGS_DEBUG g_message("line disconnect"); #endif /* disconnect group button */ if(line->group != NULL && GTK_IS_BUTTON(line->group)){ g_object_disconnect(line->group, "any_signal::clicked", G_CALLBACK(ags_line_group_clicked_callback), (gpointer) line, NULL); } /* disconnect line members */ list_start = list = gtk_container_get_children(GTK_CONTAINER(line->expander->table)); while(list != NULL){ if(AGS_IS_CONNECTABLE(list->data)){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); } list = list->next; } if(list_start != NULL){ g_list_free(list_start); } } gchar* ags_line_get_version(AgsPlugin *plugin) { return(AGS_LINE(plugin)->version); } void ags_line_set_version(AgsPlugin *plugin, gchar *version) { AGS_LINE(plugin)->version = version; } gchar* ags_line_get_build_id(AgsPlugin *plugin) { return(AGS_LINE(plugin)->build_id); } void ags_line_set_build_id(AgsPlugin *plugin, gchar *build_id) { AGS_LINE(plugin)->build_id = build_id; } void ags_line_real_set_channel(AgsLine *line, AgsChannel *channel) { AgsMutexManager *mutex_manager; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; if(line->channel == channel){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); if(line->channel != NULL){ g_object_unref(G_OBJECT(line->channel)); } if(channel != NULL){ g_object_ref(G_OBJECT(channel)); } if(line->channel != NULL){ line->flags &= (~AGS_LINE_PREMAPPED_RECALL); } line->channel = channel; if(channel != NULL){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* set label */ pthread_mutex_lock(channel_mutex); str = g_strdup_printf("%s %d", i18n("channel"), channel->audio_channel + 1); gtk_label_set_label(line->label, str); g_free(str); pthread_mutex_unlock(channel_mutex); }else{ str = g_strdup_printf("%s (null)", i18n("channel")); gtk_label_set_label(line->label, str); g_free(str); } } /** * ags_line_set_channel: * @line: an #AgsLine * @channel: the #AgsChannel to set * * Is emitted as channel gets modified. * * Since: 1.0.0 */ void ags_line_set_channel(AgsLine *line, AgsChannel *channel) { g_return_if_fail(AGS_IS_LINE(line)); g_object_ref((GObject *) line); g_signal_emit(G_OBJECT(line), line_signals[SET_CHANNEL], 0, channel); g_object_unref((GObject *) line); } /** * ags_line_group_changed: * @line: an #AgsLine * * Is emitted as group is changed. * * Since: 1.0.0 */ void ags_line_group_changed(AgsLine *line) { g_return_if_fail(AGS_IS_LINE(line)); g_object_ref((GObject *) line); g_signal_emit(G_OBJECT(line), line_signals[GROUP_CHANGED], 0); g_object_unref((GObject *) line); } GList* ags_line_add_ladspa_effect(AgsLine *line, GList *control_type_name, gchar *filename, gchar *effect) { AgsLineMember *line_member; AgsEffectSeparator *separator; GtkAdjustment *adjustment; AgsRecallHandler *recall_handler; AgsLadspaPlugin *ladspa_plugin; GList *list; GList *recall, *recall_start; GList *port, *recall_port; GList *port_descriptor; gchar *plugin_name; gchar *control_port; gdouble step; guint port_count; guint x, y; guint k; /* load plugin */ ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), filename, effect); port = NULL; recall_port = NULL; /* retrieve position within table */ x = 0; y = 0; list = line->expander->children; while(list != NULL){ if(y <= AGS_EXPANDER_CHILD(list->data)->y){ y = AGS_EXPANDER_CHILD(list->data)->y + 1; } list = list->next; } /* add separator */ separator = ags_effect_separator_new(); g_object_set(separator, "text", effect, "filename", filename, "effect", effect, NULL); ags_expander_add(line->expander, (GtkWidget *) separator, 0, y, AGS_LINE_COLUMNS_COUNT, 1); gtk_widget_show_all(separator); y++; /* load ports */ port_descriptor = AGS_BASE_PLUGIN(ladspa_plugin)->port; port_count = g_list_length(port_descriptor); k = 0; while(port_descriptor != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ GtkWidget *child_widget; AgsLadspaConversion *ladspa_conversion; GType widget_type; guint step_count; gboolean disable_seemless; disable_seemless = FALSE; if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ disable_seemless = TRUE; if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_LED; }else{ widget_type = GTK_TYPE_TOGGLE_BUTTON; } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_HINDICATOR; }else{ widget_type = AGS_TYPE_DIAL; } } if(control_type_name != NULL){ widget_type = g_type_from_name(control_type_name->data); control_type_name = control_type_name->next; } step_count = AGS_DIAL_DEFAULT_PRECISION; if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ step_count = AGS_PORT_DESCRIPTOR(port_descriptor->data)->scale_steps; disable_seemless = TRUE; } /* add line member */ plugin_name = g_strdup_printf("ladspa-%u", ladspa_plugin->unique_id); control_port = g_strdup_printf("%u/%u", k, port_count); line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, "widget-type", widget_type, "widget-label", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "plugin-name", plugin_name, "filename", filename, "effect", effect, "specifier", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "control-port", control_port, "steps", step_count, NULL); child_widget = ags_line_member_get_widget(line_member); g_free(plugin_name); g_free(control_port); /* ladspa conversion */ ladspa_conversion = NULL; if((AGS_PORT_DESCRIPTOR_BOUNDED_BELOW & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_BELOW; } if((AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_ABOVE; } if((AGS_PORT_DESCRIPTOR_SAMPLERATE & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_SAMPLERATE; } if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_LOGARITHMIC; } line_member->conversion = (AgsConversion *) ladspa_conversion; /* child widget */ if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ line_member->port_flags = AGS_LINE_MEMBER_PORT_BOOLEAN; } if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ line_member->port_flags = AGS_LINE_MEMBER_PORT_INTEGER; } if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; GtkAdjustment *adjustment; float lower_bound, upper_bound; dial = (AgsDial *) child_widget; if(disable_seemless){ dial->flags &= (~AGS_DIAL_SEEMLESS_MODE); } /* add controls of ports and apply range */ lower_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->lower_value); upper_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->upper_value); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(dial, "adjustment", adjustment, NULL); if(upper_bound >= 0.0 && lower_bound >= 0.0){ step = (upper_bound - lower_bound) / step_count; }else if(upper_bound < 0.0 && lower_bound < 0.0){ step = -1.0 * (lower_bound - upper_bound) / step_count; }else{ step = (upper_bound - lower_bound) / step_count; } gtk_adjustment_set_step_increment(adjustment, step); gtk_adjustment_set_lower(adjustment, lower_bound); gtk_adjustment_set_upper(adjustment, upper_bound); gtk_adjustment_set_value(adjustment, g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value)); }else if(AGS_IS_INDICATOR(child_widget) || AGS_IS_LED(child_widget)){ g_hash_table_insert(ags_line_indicator_queue_draw, child_widget, ags_line_indicator_queue_draw_timeout); line->queued_drawing = g_list_prepend(line->queued_drawing, child_widget); g_timeout_add(1000 / 30, (GSourceFunc) ags_line_indicator_queue_draw_timeout, (gpointer) child_widget); } #ifdef AGS_DEBUG g_message("ladspa bounds: %f %f", lower_bound, upper_bound); #endif ags_expander_add(line->expander, (GtkWidget *) line_member, x % AGS_LINE_COLUMNS_COUNT, y, 1, 1); ags_connectable_connect(AGS_CONNECTABLE(line_member)); gtk_widget_show_all((GtkWidget *) line_member); // port = port->next; x++; if(x % AGS_LINE_COLUMNS_COUNT == 0){ y++; } } port_descriptor = port_descriptor->next; k++; } return(g_list_concat(g_list_copy(port), g_list_copy(recall_port))); } GList* ags_line_add_lv2_effect(AgsLine *line, GList *control_type_name, gchar *filename, gchar *effect) { AgsLineMember *line_member; AgsEffectSeparator *separator; GtkAdjustment *adjustment; AgsRecallHandler *recall_handler; AgsLv2Plugin *lv2_plugin; AgsMutexManager *mutex_manager; GList *list; GList *recall, *recall_start; GList *port, *recall_port; GList *port_descriptor; gchar *port_type_0, *port_type_1; gchar *plugin_name; gchar *control_port; gdouble step; guint port_count; guint x, y; guint k; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; /* load plugin */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); port = NULL; recall_port = NULL; /* retrieve position within table */ x = 0; y = 0; list = line->expander->children; while(list != NULL){ if(y <= AGS_EXPANDER_CHILD(list->data)->y){ y = AGS_EXPANDER_CHILD(list->data)->y + 1; } list = list->next; } /* add separator */ separator = ags_effect_separator_new(); g_object_set(separator, "text", effect, "filename", filename, "effect", effect, NULL); ags_expander_add(line->expander, (GtkWidget *) separator, 0, y, AGS_LINE_COLUMNS_COUNT, 1); gtk_widget_show_all(separator); y++; /* load ports */ port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; port_count = g_list_length(port_descriptor); k = 0; while(port_descriptor != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ GtkWidget *child_widget; AgsLv2Conversion *lv2_conversion; GType widget_type; guint step_count; gboolean disable_seemless; disable_seemless = FALSE; if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ disable_seemless = TRUE; if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_LED; }else{ widget_type = GTK_TYPE_TOGGLE_BUTTON; } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_HINDICATOR; }else{ widget_type = AGS_TYPE_DIAL; } } if(control_type_name != NULL){ widget_type = g_type_from_name(control_type_name->data); control_type_name = control_type_name->next; } step_count = AGS_DIAL_DEFAULT_PRECISION; if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ step_count = AGS_PORT_DESCRIPTOR(port_descriptor->data)->scale_steps; disable_seemless = TRUE; } /* add line member */ plugin_name = g_strdup_printf("lv2-<%s>", lv2_plugin->uri); control_port = g_strdup_printf("%d/%d", k, port_count); line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, "widget-type", widget_type, "widget-label", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "plugin-name", plugin_name, "filename", filename, "effect", effect, "specifier", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "control-port", control_port, "steps", step_count, NULL); child_widget = ags_line_member_get_widget(line_member); g_free(plugin_name); g_free(control_port); /* lv2 conversion */ lv2_conversion = NULL; if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(lv2_conversion == NULL || !AGS_IS_LV2_CONVERSION(lv2_conversion)){ lv2_conversion = ags_lv2_conversion_new(); } lv2_conversion->flags |= AGS_LV2_CONVERSION_LOGARITHMIC; } line_member->conversion = (AgsConversion *) lv2_conversion; /* child widget */ if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ line_member->port_flags = AGS_LINE_MEMBER_PORT_BOOLEAN; } if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ line_member->port_flags = AGS_LINE_MEMBER_PORT_INTEGER; } if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; GtkAdjustment *adjustment; float lower_bound, upper_bound; dial = (AgsDial *) child_widget; if(disable_seemless){ dial->flags &= (~AGS_DIAL_SEEMLESS_MODE); } /* add controls of ports and apply range */ lower_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->lower_value); upper_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->upper_value); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(dial, "adjustment", adjustment, NULL); if(upper_bound >= 0.0 && lower_bound >= 0.0){ step = (upper_bound - lower_bound) / step_count; }else if(upper_bound < 0.0 && lower_bound < 0.0){ step = -1.0 * (lower_bound - upper_bound) / step_count; }else{ step = (upper_bound - lower_bound) / step_count; } gtk_adjustment_set_step_increment(adjustment, step); gtk_adjustment_set_lower(adjustment, lower_bound); gtk_adjustment_set_upper(adjustment, upper_bound); gtk_adjustment_set_value(adjustment, g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value)); }else if(AGS_IS_INDICATOR(child_widget)){ g_hash_table_insert(ags_line_indicator_queue_draw, child_widget, ags_line_indicator_queue_draw_timeout); line->queued_drawing = g_list_prepend(line->queued_drawing, child_widget); g_timeout_add(1000 / 30, (GSourceFunc) ags_line_indicator_queue_draw_timeout, (gpointer) child_widget); } #ifdef AGS_DEBUG g_message("lv2 bounds: %f %f", lower_bound, upper_bound); #endif ags_expander_add(line->expander, (GtkWidget *) line_member, x % AGS_LINE_COLUMNS_COUNT, y, 1, 1); ags_connectable_connect(AGS_CONNECTABLE(line_member)); gtk_widget_show_all((GtkWidget *) line_member); // port = port->next; x++; if(x % AGS_LINE_COLUMNS_COUNT == 0){ y++; } } port_descriptor = port_descriptor->next; k++; } return(g_list_concat(g_list_copy(port), g_list_copy(recall_port))); } GList* ags_line_real_add_effect(AgsLine *line, GList *control_type_name, gchar *filename, gchar *effect) { AgsWindow *window; AgsLadspaPlugin *ladspa_plugin; AgsLv2Plugin *lv2_plugin; GList *port; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) line); /* load plugin */ ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), filename, effect); port = NULL; if(ladspa_plugin != NULL){ port = ags_line_add_ladspa_effect(line, control_type_name, filename, effect); }else{ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); if(lv2_plugin != NULL){ port = ags_line_add_lv2_effect(line, control_type_name, filename, effect); } } /* */ ags_automation_toolbar_load_port(window->automation_window->automation_editor->automation_toolbar); return(port); } /** * ags_line_add_effect: * @line: the #AgsLine * @control_type_name: the control #GType string representation * @filename: the filename of the plugin * @effect: the effect's name * * Add a line member. * * Returns: a #GList-struct containing new #AgsPort objects * * Since: 1.0.0 */ GList* ags_line_add_effect(AgsLine *line, GList *control_type_name, gchar *filename, gchar *effect) { GList *port; g_return_val_if_fail(AGS_IS_LINE(line), NULL); g_object_ref((GObject *) line); g_signal_emit(G_OBJECT(line), line_signals[ADD_EFFECT], 0, control_type_name, filename, effect, &port); g_object_unref((GObject *) line); return(port); } void ags_line_real_remove_effect(AgsLine *line, guint nth) { AgsWindow *window; AgsMachine *machine; AgsMutexManager *mutex_manager; GList *control, *control_start; GList *recall; GList *port; gchar **remove_specifier; gchar *filename, *effect; guint nth_effect, n_bulk; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) line); machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) line, AGS_TYPE_MACHINE); /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) line->channel); pthread_mutex_unlock(application_mutex); /* get nth_effect */ pthread_mutex_lock(channel_mutex); recall = line->channel->play; nth_effect = 0; n_bulk = 0; while((recall = ags_recall_template_find_all_type(recall, AGS_TYPE_RECALL_LADSPA, AGS_TYPE_RECALL_LV2, G_TYPE_NONE)) != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(recall->data)->flags)) != 0){ nth_effect += 1; } if((AGS_RECALL_BULK_MODE & (AGS_RECALL(recall->data)->flags)) != 0){ n_bulk += 1; } if(nth_effect - n_bulk == nth + 1){ break; } recall = recall->next; } if(recall == NULL){ pthread_mutex_unlock(channel_mutex); return; } nth_effect--; /* destroy separator */ filename = NULL; effect = NULL; if(AGS_IS_RECALL_LV2(recall->data)){ filename = AGS_RECALL_LV2(recall->data)->filename; effect = AGS_RECALL_LV2(recall->data)->effect; }else if(AGS_IS_RECALL_LADSPA(recall->data)){ filename = AGS_RECALL_LADSPA(recall->data)->filename; effect = AGS_RECALL_LADSPA(recall->data)->effect; } pthread_mutex_unlock(channel_mutex); /* destroy separator */ control_start = control = gtk_container_get_children((GtkContainer *) line->expander->table); while(control != NULL){ gchar *separator_filename; gchar *separator_effect; if(AGS_IS_EFFECT_SEPARATOR(control->data)){ g_object_get(control->data, "filename", &separator_filename, "effect", &separator_effect, NULL); if(separator_filename != NULL && separator_effect != NULL && !g_strcmp0(filename, separator_filename) && !g_strcmp0(effect, separator_effect)){ gtk_widget_destroy(control->data); break; } } control = control->next; } g_list_free(control_start); /* destroy controls */ port = AGS_RECALL(recall->data)->port; remove_specifier = NULL; i = 0; while(port != NULL){ control_start = control = gtk_container_get_children((GtkContainer *) line->expander->table); while(control != NULL){ if(AGS_IS_LINE_MEMBER(control->data) && AGS_LINE_MEMBER(control->data)->port == port->data){ GtkWidget *child_widget; child_widget = gtk_bin_get_child(control->data); /* collect specifier */ if(remove_specifier == NULL){ remove_specifier = (gchar **) malloc(2 * sizeof(gchar *)); }else{ remove_specifier = (gchar **) realloc(remove_specifier, (i + 2) * sizeof(gchar *)); } remove_specifier[i] = g_strdup(AGS_LINE_MEMBER(control->data)->specifier); i++; /* remove widget */ if(AGS_IS_LED(child_widget) || AGS_IS_INDICATOR(child_widget)){ g_hash_table_remove(ags_line_indicator_queue_draw, child_widget); } ags_expander_remove(line->expander, control->data); break; } control = control->next; } g_list_free(control_start); port = port->next; } if(remove_specifier != NULL){ remove_specifier[i] = NULL; } /* remove recalls */ //FIXME:JK: might be a task ags_channel_remove_effect(line->channel, nth_effect); /* reset automation editor */ ags_automation_toolbar_load_port(window->automation_window->automation_editor->automation_toolbar); } /** * ags_line_remove_effect: * @line: the #AgsLine * @nth: nth effect to remove * * Remove a line member. * * Since: 1.0.0 */ void ags_line_remove_effect(AgsLine *line, guint nth) { g_return_if_fail(AGS_IS_LINE(line)); g_object_ref((GObject *) line); g_signal_emit(G_OBJECT(line), line_signals[REMOVE_EFFECT], 0, nth); g_object_unref((GObject *) line); } void ags_line_real_map_recall(AgsLine *line, guint output_pad_start) { if((AGS_LINE_MAPPED_RECALL & (line->flags)) != 0){ return; } line->flags |= AGS_LINE_MAPPED_RECALL; ags_line_find_port(line); } /** * ags_line_map_recall: * @line: an #AgsLine * @output_pad_start: the start pad * * Is emitted as group is changed. * * Since: 1.0.0 */ void ags_line_map_recall(AgsLine *line, guint output_pad_start) { g_return_if_fail(AGS_IS_LINE(line)); g_object_ref((GObject *) line); g_signal_emit(G_OBJECT(line), line_signals[MAP_RECALL], 0, output_pad_start); g_object_unref((GObject *) line); } GList* ags_line_real_find_port(AgsLine *line) { GList *port, *tmp_port; GList *line_member, *line_member_start; if(line == NULL || line->expander == NULL){ return(NULL); } line_member_start = line_member = gtk_container_get_children(GTK_CONTAINER(line->expander->table)); port = NULL; if(line_member != NULL){ while(line_member != NULL){ if(AGS_IS_LINE_MEMBER(line_member->data)){ tmp_port = ags_line_member_find_port(AGS_LINE_MEMBER(line_member->data)); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } } line_member = line_member->next; } g_list_free(line_member_start); } return(port); } /** * ags_line_find_port: * @line: an #AgsLine * * Lookup ports of assigned recalls. * * Returns: an #GList containing all related #AgsPort * * Since: 1.0.0 */ GList* ags_line_find_port(AgsLine *line) { GList *list; list = NULL; g_return_val_if_fail(AGS_IS_LINE(line), NULL); g_object_ref((GObject *) line); g_signal_emit((GObject *) line, line_signals[FIND_PORT], 0, &list); g_object_unref((GObject *) line); return(list); } /** * ags_line_done: * @line: the #AgsLine * @recall_id: the #AgsRecallID * * Notify about to stop playback of @recall_id. * * Since: 1.2.0 */ void ags_line_done(AgsLine *line, GObject *recall_id) { g_return_if_fail(AGS_IS_LINE(line)); g_object_ref((GObject *) line); g_signal_emit((GObject *) line, line_signals[DONE], 0, recall_id); g_object_unref((GObject *) line); } /** * ags_line_find_next_grouped: * @line: a #GList-struct of #AgsLine objects * * Retrieve next grouped line. * * Returns: next matching #GList-struct containing #AgsLine * * Since: 1.0.0 */ GList* ags_line_find_next_grouped(GList *line) { while(line != NULL && !gtk_toggle_button_get_active(AGS_LINE(line->data)->group)){ line = line->next; } return(line); } /** * ags_line_message_monitor_timeout: * @line: the #AgsLine * * Monitor messages. * * Returns: %TRUE if proceed with redraw, otherwise %FALSE * * Since: 1.2.0 */ gboolean ags_line_message_monitor_timeout(AgsLine *line) { if(g_hash_table_lookup(ags_line_message_monitor, line) != NULL){ AgsChannel *channel; AgsMessageDelivery *message_delivery; GList *message_start, *message; /* retrieve message */ message_delivery = ags_message_delivery_get_instance(); channel = line->channel; message_start = message = ags_message_delivery_find_sender(message_delivery, "libags-audio", channel); while(message != NULL){ xmlNode *root_node; root_node = xmlDocGetRootElement(AGS_MESSAGE_ENVELOPE(message->data)->doc); if(!xmlStrncmp(root_node->name, "ags-command", 12)){ if(!xmlStrncmp(xmlGetProp(root_node, "method"), "AgsChannel::add-effect", 22)){ AgsMachine *machine; AgsMachineEditor *machine_editor; AgsLineMemberEditor *line_member_editor; AgsPluginBrowser *plugin_browser; GList *pad_editor, *pad_editor_start; GList *line_editor, *line_editor_start; GList *control_type_name; GValue *value; gchar *filename, *effect; pthread_mutex_t *application_mutex; value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "filename"); filename = g_value_get_string(value); value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "effect"); effect = g_value_get_string(value); /* get machine and machine editor */ machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) line, AGS_TYPE_MACHINE); machine_editor = (AgsMachineEditor *) machine->properties; /* get control type */ control_type_name = NULL; pad_editor_start = NULL; line_editor_start = NULL; if(machine_editor != NULL){ pad_editor_start = pad_editor = gtk_container_get_children((GtkContainer *) machine_editor->input_editor->child); pad_editor = g_list_nth(pad_editor, channel->pad); if(pad_editor != NULL){ line_editor_start = line_editor = gtk_container_get_children((GtkContainer *) AGS_PAD_EDITOR(pad_editor->data)->line_editor); line_editor = g_list_nth(line_editor, channel->audio_channel); }else{ line_editor = NULL; } if(line_editor != NULL){ line_member_editor = AGS_LINE_EDITOR(line_editor->data)->member_editor; plugin_browser = line_member_editor->plugin_browser; if(plugin_browser != NULL && plugin_browser->active_browser != NULL){ GList *description, *description_start; GList *port_control, *port_control_start; gchar *controls; /* get plugin browser */ description_start = NULL; port_control_start = NULL; if(AGS_IS_LADSPA_BROWSER(plugin_browser->active_browser)){ description_start = description = gtk_container_get_children((GtkContainer *) AGS_LADSPA_BROWSER(plugin_browser->active_browser)->description); }else if(AGS_IS_DSSI_BROWSER(plugin_browser->active_browser)){ description_start = description = gtk_container_get_children((GtkContainer *) AGS_DSSI_BROWSER(plugin_browser->active_browser)->description); }else if(AGS_IS_LV2_BROWSER(plugin_browser->active_browser)){ description_start = description = gtk_container_get_children((GtkContainer *) AGS_LV2_BROWSER(plugin_browser->active_browser)->description); }else{ g_message("ags_line_callbacks.c unsupported plugin browser"); } /* get port description */ if(description != NULL){ description = g_list_last(description); port_control_start = port_control = gtk_container_get_children(GTK_CONTAINER(description->data)); if(port_control != NULL){ while(port_control != NULL){ controls = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(port_control->data)); if(!g_ascii_strncasecmp(controls, "led", 4)){ control_type_name = g_list_prepend(control_type_name, "AgsLed"); }else if(!g_ascii_strncasecmp(controls, "vertical indicator", 19)){ control_type_name = g_list_prepend(control_type_name, "AgsVIndicator"); }else if(!g_ascii_strncasecmp(controls, "horizontal indicator", 19)){ control_type_name = g_list_prepend(control_type_name, "AgsHIndicator"); }else if(!g_ascii_strncasecmp(controls, "spin button", 12)){ control_type_name = g_list_prepend(control_type_name, "GtkSpinButton"); }else if(!g_ascii_strncasecmp(controls, "dial", 5)){ control_type_name = g_list_prepend(control_type_name, "AgsDial"); }else if(!g_ascii_strncasecmp(controls, "vertical scale", 15)){ control_type_name = g_list_prepend(control_type_name, "GtkVScale"); }else if(!g_ascii_strncasecmp(controls, "horizontal scale", 17)){ control_type_name = g_list_prepend(control_type_name, "GtkHScale"); }else if(!g_ascii_strncasecmp(controls, "check-button", 13)){ control_type_name = g_list_prepend(control_type_name, "GtkCheckButton"); }else if(!g_ascii_strncasecmp(controls, "toggle button", 14)){ control_type_name = g_list_prepend(control_type_name, "GtkToggleButton"); } port_control = port_control->next; port_control = port_control->next; } } /* free lists */ g_list_free(description_start); g_list_free(port_control_start); } } // line_member_editor->plugin_browser; } }else{ control_type_name = NULL; } /* free lists */ g_list_free(pad_editor_start); g_list_free(line_editor_start); /* add effect */ ags_line_add_effect(line, control_type_name, filename, effect); }else if(!xmlStrncmp(xmlGetProp(root_node, "method"), "AgsChannel::done", 16)){ AgsRecallID *recall_id; GValue *value; value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "recall-id"); recall_id = g_value_get_object(value); /* done */ ags_line_done(line, recall_id); } } ags_message_delivery_remove_message(message_delivery, "libags-audio", message->data); message = message->next; } g_list_free_full(message_start, ags_message_envelope_free); return(TRUE); }else{ return(FALSE); } } /** * ags_line_indicator_queue_draw_timeout: * @widget: the widget * * Queue draw widget * * Returns: %TRUE if proceed with redraw, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_line_indicator_queue_draw_timeout(GtkWidget *widget) { AgsLine *line; if(g_hash_table_lookup(ags_line_indicator_queue_draw, widget) != NULL){ GList *list, *list_start; line = gtk_widget_get_ancestor(widget, AGS_TYPE_LINE); list_start = list = gtk_container_get_children((GtkContainer *) AGS_LINE(line)->expander->table); /* check members */ while(list != NULL){ if(AGS_IS_LINE_MEMBER(list->data) && (AGS_LINE_MEMBER(list->data)->widget_type == AGS_TYPE_VINDICATOR || AGS_LINE_MEMBER(list->data)->widget_type == AGS_TYPE_HINDICATOR || AGS_LINE_MEMBER(list->data)->widget_type == AGS_TYPE_LED)){ AgsLineMember *line_member; GtkAdjustment *adjustment; GtkWidget *child; AgsPort *current; gdouble average_peak; gdouble lower, upper; gdouble range; gdouble peak; GValue value = {0,}; line_member = AGS_LINE_MEMBER(list->data); child = GTK_BIN(line_member)->child; average_peak = 0.0; /* play port */ current = line_member->port; if(current == NULL){ list = list->next; continue; } /* check if output port and specifier matches */ pthread_mutex_lock(current->mutex); if((AGS_PORT_IS_OUTPUT & (current->flags)) == 0 || current->port_descriptor == NULL || g_ascii_strcasecmp(current->specifier, line_member->specifier)){ pthread_mutex_unlock(current->mutex); list = list->next; continue; } /* lower and upper */ lower = g_value_get_float(AGS_PORT_DESCRIPTOR(current->port_descriptor)->lower_value); upper = g_value_get_float(AGS_PORT_DESCRIPTOR(current->port_descriptor)->upper_value); pthread_mutex_unlock(current->mutex); /* get range */ if(line_member->conversion != NULL){ lower = ags_conversion_convert(line_member->conversion, lower, TRUE); upper = ags_conversion_convert(line_member->conversion, upper, TRUE); } range = upper - lower; /* play port - read value */ g_value_init(&value, G_TYPE_FLOAT); ags_port_safe_read(current, &value); peak = g_value_get_float(&value); g_value_unset(&value); if(line_member->conversion != NULL){ peak = ags_conversion_convert(line_member->conversion, peak, TRUE); } /* calculate peak */ if(range == 0.0 || current->port_value_type == G_TYPE_BOOLEAN){ if(peak != 0.0){ average_peak = 10.0; } }else{ average_peak += ((1.0 / (range / peak)) * 10.0); } /* recall port */ current = line_member->recall_port; /* recall port - read value */ g_value_init(&value, G_TYPE_FLOAT); ags_port_safe_read(current, &value); peak = g_value_get_float(&value); g_value_unset(&value); if(line_member->conversion != NULL){ peak = ags_conversion_convert(line_member->conversion, peak, TRUE); } /* calculate peak */ if(range == 0.0 || current->port_value_type == G_TYPE_BOOLEAN){ if(peak != 0.0){ average_peak = 10.0; } }else{ average_peak += ((1.0 / (range / peak)) * 10.0); } /* apply */ if(AGS_IS_LED(child)){ if(average_peak != 0.0){ ags_led_set_active(child); } }else{ g_object_get(child, "adjustment", &adjustment, NULL); gtk_adjustment_set_value(adjustment, average_peak); } } list = list->next; } g_list_free(list_start); /* queue draw */ gtk_widget_queue_draw(widget); return(TRUE); }else{ return(FALSE); } } /** * ags_line_new: * @pad: the parent pad * @channel: the channel to visualize * * Creates an #AgsLine * * Returns: a new #AgsLine * * Since: 1.0.0 */ AgsLine* ags_line_new(GtkWidget *pad, AgsChannel *channel) { AgsLine *line; line = (AgsLine *) g_object_new(AGS_TYPE_LINE, "pad", pad, "channel", channel, NULL); return(line); } gsequencer-1.4.24/ags/X/ags_performance_preferences_callbacks.c0000644000175000017500000000250413247044247021534 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_performance_preferences_super_threaded_channel_callback(GtkWidget *button, AgsPerformancePreferences *performance_preferences) { if(gtk_toggle_button_get_active(button)){ gtk_toggle_button_set_active(performance_preferences->super_threaded_audio, TRUE); gtk_widget_set_sensitive(performance_preferences->super_threaded_audio, FALSE); }else{ gtk_widget_set_sensitive(performance_preferences->super_threaded_audio, TRUE); } } gsequencer-1.4.24/ags/X/ags_audio_preferences.c0000644000175000017500000003114513247044247016340 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_audio_preferences_class_init(AgsAudioPreferencesClass *audio_preferences); void ags_audio_preferences_connectable_interface_init(AgsConnectableInterface *connectable); void ags_audio_preferences_applicable_interface_init(AgsApplicableInterface *applicable); void ags_audio_preferences_init(AgsAudioPreferences *audio_preferences); void ags_audio_preferences_connect(AgsConnectable *connectable); void ags_audio_preferences_disconnect(AgsConnectable *connectable); void ags_audio_preferences_set_update(AgsApplicable *applicable, gboolean update); void ags_audio_preferences_apply(AgsApplicable *applicable); void ags_audio_preferences_reset(AgsApplicable *applicable); static void ags_audio_preferences_finalize(GObject *gobject); /** * SECTION:ags_audio_preferences * @short_description: A composite widget to do audio related preferences * @title: AgsAudioPreferences * @section_id: * @include: ags/X/ags_audio_preferences.h * * #AgsAudioPreferences enables you to make preferences of soundcard, audio channels, * samplerate and buffer size. */ static gpointer ags_audio_preferences_parent_class = NULL; GType ags_audio_preferences_get_type(void) { static GType ags_type_audio_preferences = 0; if(!ags_type_audio_preferences){ static const GTypeInfo ags_audio_preferences_info = { sizeof (AgsAudioPreferencesClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_preferences_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAudioPreferences), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_preferences_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_audio_preferences_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_audio_preferences_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audio_preferences = g_type_register_static(GTK_TYPE_VBOX, "AgsAudioPreferences", &ags_audio_preferences_info, 0); g_type_add_interface_static(ags_type_audio_preferences, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_audio_preferences, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_audio_preferences); } void ags_audio_preferences_class_init(AgsAudioPreferencesClass *audio_preferences) { GObjectClass *gobject; GtkWidgetClass *widget; ags_audio_preferences_parent_class = g_type_class_peek_parent(audio_preferences); /* GtkObjectClass */ gobject = (GObjectClass *) audio_preferences; gobject->finalize = ags_audio_preferences_finalize; } void ags_audio_preferences_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_audio_preferences_connect; connectable->disconnect = ags_audio_preferences_disconnect; } void ags_audio_preferences_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_audio_preferences_set_update; applicable->apply = ags_audio_preferences_apply; applicable->reset = ags_audio_preferences_reset; } void ags_audio_preferences_init(AgsAudioPreferences *audio_preferences) { GtkScrolledWindow *scrolled_window; GtkTable *table; GtkHBox *hbox; GtkLabel *label; gchar *str; g_signal_connect_after((GObject *) audio_preferences, "parent-set", G_CALLBACK(ags_audio_preferences_parent_set_callback), (gpointer) audio_preferences); audio_preferences->flags = 0; /* scrolled window */ scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start((GtkBox *) audio_preferences, (GtkWidget *) scrolled_window, TRUE, TRUE, 0); audio_preferences->soundcard_editor = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_scrolled_window_add_with_viewport(scrolled_window, (GtkWidget *) audio_preferences->soundcard_editor); /* */ audio_preferences->connect_sink = NULL; audio_preferences->add = NULL; /* */ table = (GtkTable *) gtk_table_new(2, 9, FALSE); gtk_box_pack_start(GTK_BOX(audio_preferences), GTK_WIDGET(table), FALSE, FALSE, 2); str = ags_config_get_value(ags_config_get_instance(), AGS_CONFIG_GENERIC, "disable-feature"); /* JACK */ if(str == NULL || !g_ascii_strncasecmp(str, "experimental", 13)){ audio_preferences->jack_driver = NULL; audio_preferences->start_jack = NULL; audio_preferences->stop_jack = NULL; }else{ label = (GtkLabel *) gtk_label_new(i18n("JACK driver")); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 7, 8, GTK_FILL, GTK_FILL, 0, 0); audio_preferences->jack_driver = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_table_attach(table, GTK_WIDGET(audio_preferences->jack_driver), 1, 2, 7, 8, GTK_FILL, GTK_FILL, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("JACK server")); gtk_table_attach(table, GTK_WIDGET(label), 0, 1, 7, 8, GTK_FILL, GTK_FILL, 0, 0); hbox = (GtkHBox *) gtk_hbox_new(TRUE, 0); gtk_table_attach(table, GTK_WIDGET(hbox), 1, 2, 8, 9, GTK_FILL, GTK_FILL, 0, 0); audio_preferences->start_jack = (GtkButton *) gtk_button_new_with_label(i18n("start")); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(audio_preferences->start_jack), FALSE, FALSE, 0); audio_preferences->stop_jack = (GtkButton *) gtk_button_new_with_label(i18n("stop")); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(audio_preferences->stop_jack), FALSE, FALSE, 0); /* set default insensitive */ gtk_widget_set_sensitive((GtkWidget *) audio_preferences->jack_driver, FALSE); gtk_widget_set_sensitive((GtkWidget *) audio_preferences->start_jack, FALSE); gtk_widget_set_sensitive((GtkWidget *) audio_preferences->stop_jack, FALSE); } g_free(str); } void ags_audio_preferences_connect(AgsConnectable *connectable) { AgsAudioPreferences *audio_preferences; audio_preferences = AGS_AUDIO_PREFERENCES(connectable); if((AGS_AUDIO_PREFERENCES_CONNECTED & (audio_preferences->flags)) != 0){ return; } audio_preferences->flags |= AGS_AUDIO_PREFERENCES_CONNECTED; if(audio_preferences->add != NULL){ g_signal_connect(G_OBJECT(audio_preferences->add), "clicked", G_CALLBACK(ags_audio_preferences_add_callback), audio_preferences); } if(audio_preferences->connect_sink != NULL){ g_signal_connect(G_OBJECT(audio_preferences->connect_sink), "clicked", G_CALLBACK(ags_audio_preferences_connect_sink_callback), audio_preferences); } /* experimental */ if(audio_preferences->start_jack != NULL){ g_signal_connect(G_OBJECT(audio_preferences->start_jack), "clicked", G_CALLBACK(ags_audio_preferences_start_jack_callback), audio_preferences); } if(audio_preferences->stop_jack != NULL){ g_signal_connect(G_OBJECT(audio_preferences->stop_jack), "clicked", G_CALLBACK(ags_audio_preferences_stop_jack_callback), audio_preferences); } } void ags_audio_preferences_disconnect(AgsConnectable *connectable) { AgsAudioPreferences *audio_preferences; gchar *str; audio_preferences = AGS_AUDIO_PREFERENCES(connectable); if((AGS_AUDIO_PREFERENCES_CONNECTED & (audio_preferences->flags)) == 0){ return; } audio_preferences->flags &= (~AGS_AUDIO_PREFERENCES_CONNECTED); if(audio_preferences->add != NULL){ g_object_disconnect(G_OBJECT(audio_preferences->add), "any_signal::clicked", G_CALLBACK(ags_audio_preferences_add_callback), audio_preferences, NULL); } if(audio_preferences->connect_sink != NULL){ g_object_disconnect(G_OBJECT(audio_preferences->connect_sink), "any_signal::clicked", G_CALLBACK(ags_audio_preferences_connect_sink_callback), audio_preferences, NULL); } /* experimental */ if(audio_preferences->start_jack != NULL){ g_object_disconnect(G_OBJECT(audio_preferences->start_jack), "any_signal::clicked", G_CALLBACK(ags_audio_preferences_start_jack_callback), audio_preferences, NULL); } if(audio_preferences->stop_jack != NULL){ g_object_disconnect(G_OBJECT(audio_preferences->stop_jack), "any_signal::clicked", G_CALLBACK(ags_audio_preferences_stop_jack_callback), audio_preferences, NULL); } } static void ags_audio_preferences_finalize(GObject *gobject) { //TODO:JK: implement me } void ags_audio_preferences_set_update(AgsApplicable *applicable, gboolean update) { //TODO:JK: implement me } void ags_audio_preferences_apply(AgsApplicable *applicable) { AgsAudioPreferences *audio_preferences; GList *list_start, *list; audio_preferences = AGS_AUDIO_PREFERENCES(applicable); list = list_start = gtk_container_get_children((GtkContainer *) audio_preferences->soundcard_editor); while(list != NULL){ ags_applicable_apply(AGS_APPLICABLE(list->data)); list = list->next; } g_list_free(list_start); } void ags_audio_preferences_reset(AgsApplicable *applicable) { AgsWindow *window; AgsPreferences *preferences; AgsAudioPreferences *audio_preferences; AgsSoundcardEditor *soundcard_editor; AgsThread *soundcard_thread; AgsApplicationContext *application_context; GObject *soundcard; GList *list_start, *list; audio_preferences = AGS_AUDIO_PREFERENCES(applicable); preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(audio_preferences), AGS_TYPE_PREFERENCES); window = (AgsWindow *) preferences->window; application_context = (AgsApplicationContext *) window->application_context; soundcard_thread = ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_SOUNDCARD_THREAD); /* clear */ list = list_start = gtk_container_get_children((GtkContainer *) audio_preferences->soundcard_editor); while(list != NULL){ gtk_widget_destroy(GTK_WIDGET(list->data)); list = list->next; } g_list_free(list_start); /* reset */ list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ soundcard_editor = ags_soundcard_editor_new(); soundcard_editor->soundcard = list->data; soundcard_editor->soundcard_thread = (GObject *) ags_soundcard_thread_find_soundcard((AgsSoundcardThread *) soundcard_thread, list->data); gtk_box_pack_start((GtkBox *) audio_preferences->soundcard_editor, (GtkWidget *) soundcard_editor, FALSE, FALSE, 0); ags_applicable_reset(AGS_APPLICABLE(soundcard_editor)); ags_connectable_connect(AGS_CONNECTABLE(soundcard_editor)); g_signal_connect(soundcard_editor->remove, "clicked", G_CALLBACK(ags_audio_preferences_remove_soundcard_editor_callback), audio_preferences); list = list->next; } gtk_widget_show_all((GtkWidget *) audio_preferences->soundcard_editor); } /** * ags_audio_preferences_new: * * Creates an #AgsAudioPreferences * * Returns: a new #AgsAudioPreferences * * Since: 1.0.0 */ AgsAudioPreferences* ags_audio_preferences_new() { AgsAudioPreferences *audio_preferences; audio_preferences = (AgsAudioPreferences *) g_object_new(AGS_TYPE_AUDIO_PREFERENCES, NULL); return(audio_preferences); } gsequencer-1.4.24/ags/X/ags_preferences.h0000644000175000017500000000464313246707333015170 00000000000000/* 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 . */ #ifndef __AGS_PREFERENCES_H__ #define __AGS_PREFERENCES_H__ #include #include #include #include #include #include #define AGS_TYPE_PREFERENCES (ags_preferences_get_type()) #define AGS_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PREFERENCES, AgsPreferences)) #define AGS_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PREFERENCES, AgsPreferencesClass)) #define AGS_IS_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PREFERENCES)) #define AGS_IS_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PREFERENCES)) #define AGS_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PREFERENCES, AgsPreferencesClass)) #define AGS_PREFERENCES_DEFAULT_FILENAME "ags_current.xml\0" typedef struct _AgsPreferences AgsPreferences; typedef struct _AgsPreferencesClass AgsPreferencesClass; typedef enum{ AGS_PREFERENCES_SHUTDOWN = 1, }AgsPreferencesFlags; struct _AgsPreferences { GtkDialog dialog; guint flags; GtkWindow *window; GtkNotebook *notebook; AgsGenericPreferences *generic_preferences; AgsAudioPreferences *audio_preferences; AgsMidiPreferences *midi_preferences; AgsPerformancePreferences *performance_preferences; AgsServerPreferences *server_preferences; }; struct _AgsPreferencesClass { GtkDialogClass dialog; }; GType ags_preferences_get_type(void); AgsPreferences* ags_preferences_new(); #endif /*__AGS_PREFERENCES_H__*/ gsequencer-1.4.24/ags/X/ags_context_menu.h0000644000175000017500000000423113246707333015370 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CONTEXT_MENU_H__ #define __AGS_CONTEXT_MENU_H__ #include #include #include #define AGS_TYPE_CONTEXT_MENU (ags_context_menu_get_type ()) #define AGS_CONTEXT_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONTEXT_MENU, AgsContextMenu)) #define AGS_CONTEXT_MENU_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CONTEXT_MENU, AgsContextMenuClass)) #define AGS_IS_CONTEXT_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CONTEXT_MENU)) #define AGS_IS_CONTEXT_MENU_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CONTEXT_MENU)) #define AGS_CONTEXT_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_CONTEXT_MENU, AgsContextMenuClass)) #define AGS_MENU_ITEM_FILENAME_KEY "ags-menu-bar-filename-key\0" #define AGS_MENU_ITEM_EFFECT_KEY "ags-menu-bar-effect-key\0" typedef struct _AgsContextMenu AgsContextMenu; typedef struct _AgsContextMenuClass AgsContextMenuClass; typedef enum{ AGS_CONTEXT_MENU_CONNECTED = 1, }; struct _AgsContextMenu { GtkMenu context_menu; guint flags; GtkMenu *file; GtkMenu *edit; GtkMenu *add; GtkMenu *live; GtkMenu *midi; GtkMenu *help; }; struct _AgsContextMenuClass { GtkMenuClass context_menu; }; GType ags_context_menu_get_type(void); AgsContextMenu* ags_context_menu_new(); #endif /*__AGS_CONTEXT_MENU_H__*/ gsequencer-1.4.24/ags/X/ags_audio_preferences.h0000644000175000017500000000433213246707333016344 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUDIO_PREFERENCES_H__ #define __AGS_AUDIO_PREFERENCES_H__ #include #include #include #define AGS_TYPE_AUDIO_PREFERENCES (ags_audio_preferences_get_type()) #define AGS_AUDIO_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_PREFERENCES, AgsAudioPreferences)) #define AGS_AUDIO_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUDIO_PREFERENCES, AgsAudioPreferencesClass)) #define AGS_IS_AUDIO_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_AUDIO_PREFERENCES)) #define AGS_IS_AUDIO_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_AUDIO_PREFERENCES)) #define AGS_AUDIO_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_AUDIO_PREFERENCES, AgsAudioPreferencesClass)) typedef struct _AgsAudioPreferences AgsAudioPreferences; typedef struct _AgsAudioPreferencesClass AgsAudioPreferencesClass; typedef enum{ AGS_AUDIO_PREFERENCES_CONNECTED = 1, }AgsAudioPreferencesFlags; struct _AgsAudioPreferences { GtkVBox vbox; guint flags; GtkVBox *soundcard_editor; GtkButton *connect_sink; GtkButton *add; GtkComboBoxText *jack_driver; GtkButton *start_jack; GtkButton *stop_jack; }; struct _AgsAudioPreferencesClass { GtkVBoxClass vbox; }; GType ags_audio_preferences_get_type(void); AgsAudioPreferences* ags_audio_preferences_new(); #endif /*__AGS_AUDIO_PREFERENCES_H__*/ gsequencer-1.4.24/ags/X/ags_machine_callbacks.c0000644000175000017500000004544413247044247016270 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define AGS_RENAME_ENTRY "AgsRenameEntry" int ags_machine_popup_rename_response_callback(GtkWidget *widget, gint response, AgsMachine *machine); int ags_machine_popup_properties_destroy_callback(GtkWidget *widget, AgsMachine *machine); int ags_machine_button_press_callback(GtkWidget *handle_box, GdkEventButton *event, AgsMachine *machine) { AgsWindow *window = AGS_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET(handle_box))); if(event->button == 3){ gtk_menu_popup (GTK_MENU (machine->popup), NULL, NULL, NULL, NULL, event->button, event->time); }else if(event->button == 1){ window->selected = machine; } return(0); } void ags_machine_popup_move_up_activate_callback(GtkWidget *widget, AgsMachine *machine) { GValue val={0,}; g_value_init (&val, G_TYPE_INT); gtk_container_child_get_property(GTK_CONTAINER(GTK_WIDGET(machine)->parent), GTK_WIDGET(machine), "position", &val); if(g_value_get_int (&val) > 0){ gtk_box_reorder_child(GTK_BOX(GTK_WIDGET(machine)->parent), GTK_WIDGET(machine), g_value_get_int (&val) - 1); } g_value_unset (&val); } void ags_machine_popup_move_down_activate_callback(GtkWidget *widget, AgsMachine *machine) { GValue val={0,}; g_value_init (&val, G_TYPE_INT); gtk_container_child_get_property(GTK_CONTAINER(GTK_WIDGET(machine)->parent), GTK_WIDGET(machine), "position", &val); if(g_value_get_int (&val) < g_list_length(gtk_container_get_children((GtkContainer *) GTK_WIDGET(machine)->parent)) - 1){ gtk_box_reorder_child(GTK_BOX(GTK_WIDGET(machine)->parent), GTK_WIDGET(machine), g_value_get_int (&val) + 1); } g_value_unset (&val); } void ags_machine_popup_hide_activate_callback(GtkWidget *widget, AgsMachine *machine) { gtk_widget_hide(GTK_BIN(gtk_container_get_children((GtkContainer *) GTK_WIDGET(machine))->data)->child); } void ags_machine_popup_show_activate_callback(GtkWidget *widget, AgsMachine *machine) { gtk_widget_show(GTK_BIN(gtk_container_get_children((GtkContainer *) GTK_WIDGET(machine))->data)->child); } void ags_machine_popup_destroy_activate_callback(GtkWidget *widget, AgsMachine *machine) { AgsWindow *window; AgsAudio *audio; AgsRemoveAudio *remove_audio; AgsMutexManager *mutex_manager; AgsAudioLoop *audio_loop; AgsGuiThread *gui_thread; AgsTaskThread *task_thread; AgsApplicationContext *application_context; GObject *soundcard; GList *list, *list_start; pthread_mutex_t *application_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); application_context = (AgsApplicationContext *) window->application_context; /* destroy editor */ list = list_start = gtk_container_get_children((GtkContainer *) window->notation_editor->machine_selector); list = list->next; while(list != NULL){ if(AGS_IS_MACHINE_RADIO_BUTTON(list->data) && AGS_MACHINE_RADIO_BUTTON(list->data)->machine == machine){ gtk_widget_destroy(list->data); break; } list = list->next; } g_list_free(list_start); /* destroy automation editor */ list = list_start = gtk_container_get_children((GtkContainer *) window->automation_window->automation_editor->machine_selector); list = list->next; while(list != NULL){ if(AGS_IS_MACHINE_RADIO_BUTTON(list->data) && AGS_MACHINE_RADIO_BUTTON(list->data)->machine == machine){ gtk_widget_destroy(list->data); break; } list = list->next; } g_list_free(list_start); /* destroy machine */ soundcard = window->soundcard; audio = machine->audio; g_object_ref(audio); ags_connectable_disconnect(AGS_CONNECTABLE(machine)); gtk_widget_destroy((GtkWidget *) machine); /* get audio loop */ pthread_mutex_lock(application_mutex); audio_loop = (AgsAudioLoop *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ task_thread = (AgsTaskThread *) ags_thread_find_type((AgsThread *) audio_loop, AGS_TYPE_TASK_THREAD); gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) audio_loop, AGS_TYPE_GUI_THREAD); remove_audio = ags_remove_audio_new(soundcard, audio); g_object_set(remove_audio, "task-thread", task_thread, NULL); ags_gui_thread_schedule_task(gui_thread, remove_audio); } void ags_machine_popup_rename_activate_callback(GtkWidget *widget, AgsMachine *machine) { GtkDialog *dialog; GtkEntry *entry; if(machine->rename != NULL){ return; } machine->rename = dialog = (GtkDialog *) gtk_dialog_new_with_buttons(i18n("rename"), (GtkWindow *) gtk_widget_get_toplevel(GTK_WIDGET(machine)), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); entry = (GtkEntry *) gtk_entry_new(); gtk_entry_set_text(entry, machine->machine_name); gtk_box_pack_start((GtkBox *) dialog->vbox, (GtkWidget *) entry, FALSE, FALSE, 0); gtk_widget_show_all((GtkWidget *) dialog); g_signal_connect((GObject *) dialog, "response", G_CALLBACK(ags_machine_popup_rename_response_callback), (gpointer) machine); return; } int ags_machine_popup_rename_response_callback(GtkWidget *widget, gint response, AgsMachine *machine) { if(response == GTK_RESPONSE_ACCEPT){ gchar *str; str = gtk_editable_get_chars(GTK_EDITABLE(gtk_container_get_children((GtkContainer *) GTK_DIALOG(widget)->vbox)->data), 0, -1); g_object_set(machine, "machine-name", str, NULL); } machine->rename = NULL; gtk_widget_destroy(widget); return(0); } void ags_machine_popup_properties_activate_callback(GtkWidget *widget, AgsMachine *machine) { machine->properties = (GtkDialog *) ags_machine_editor_new(machine); g_signal_connect_after(machine->properties, "destroy", G_CALLBACK(ags_machine_popup_properties_destroy_callback), machine); gtk_window_set_default_size((GtkWindow *) machine->properties, -1, 400); ags_connectable_connect(AGS_CONNECTABLE(machine->properties)); ags_applicable_reset(AGS_APPLICABLE(machine->properties)); gtk_widget_show_all((GtkWidget *) machine->properties); } void ags_machine_popup_sticky_controls_toggled_callback(GtkWidget *widget, AgsMachine *machine) { if(gtk_check_menu_item_get_active(widget)){ machine->flags |= AGS_MACHINE_STICKY_CONTROLS; }else{ machine->flags &= (~AGS_MACHINE_STICKY_CONTROLS); } } int ags_machine_popup_properties_destroy_callback(GtkWidget *widget, AgsMachine *machine) { machine->properties = NULL; return(0); } void ags_machine_popup_copy_pattern_callback(GtkWidget *widget, AgsMachine *machine) { ags_machine_copy_pattern(machine); } void ags_machine_popup_paste_pattern_callback(GtkWidget *widget, AgsMachine *machine) { //TODO:JK: implement me } void ags_machine_popup_envelope_callback(GtkWidget *widget, AgsMachine *machine) { AgsEnvelopeDialog *envelope_dialog; if(machine->envelope_dialog == NULL){ envelope_dialog = ags_envelope_dialog_new(machine); if((AGS_MACHINE_IS_SEQUENCER & (machine->flags)) != 0){ ags_envelope_dialog_add_pattern_tab(envelope_dialog); } machine->envelope_dialog = envelope_dialog; ags_connectable_connect(AGS_CONNECTABLE(envelope_dialog)); ags_applicable_reset(AGS_APPLICABLE(envelope_dialog)); gtk_widget_show_all(envelope_dialog); } } void ags_machine_popup_connection_editor_callback(GtkWidget *widget, AgsMachine *machine) { AgsConnectionEditor *connection_editor; if(machine->connection_editor == NULL){ connection_editor = ags_connection_editor_new(machine); machine->connection_editor = (GtkDialog *) connection_editor; ags_connectable_connect(AGS_CONNECTABLE(connection_editor)); ags_applicable_reset(AGS_APPLICABLE(connection_editor)); gtk_widget_show_all((GtkWidget *) connection_editor); }else{ connection_editor = (AgsConnectionEditor *) machine->connection_editor; } gtk_widget_show_all((GtkWidget *) connection_editor); } void ags_machine_popup_midi_dialog_callback(GtkWidget *widget, AgsMachine *machine) { AgsMidiDialog *midi_dialog; if(machine->midi_dialog == NULL){ midi_dialog = ags_midi_dialog_new(machine); machine->midi_dialog = (GtkDialog *) midi_dialog; midi_dialog->flags |= (AGS_MIDI_DIALOG_IO_OPTIONS | AGS_MIDI_DIALOG_MAPPING | AGS_MIDI_DIALOG_DEVICE); ags_connectable_connect(AGS_CONNECTABLE(midi_dialog)); ags_applicable_reset(AGS_APPLICABLE(midi_dialog)); gtk_widget_show_all((GtkWidget *) midi_dialog); }else{ midi_dialog = (AgsMidiDialog *) machine->midi_dialog; } gtk_widget_show_all((GtkWidget *) midi_dialog); } void ags_machine_open_response_callback(GtkDialog *dialog, gint response, AgsMachine *machine) { GtkFileChooserDialog *file_chooser; GtkCheckButton *overwrite; GtkCheckButton *create; GSList *filenames; file_chooser = GTK_FILE_CHOOSER_DIALOG(dialog); if(response == GTK_RESPONSE_ACCEPT){ filenames = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(file_chooser)); overwrite = g_object_get_data(G_OBJECT(dialog), "overwrite"); create = g_object_get_data(G_OBJECT(dialog), "create"); ags_machine_open_files(machine, filenames, GTK_TOGGLE_BUTTON(overwrite)->active, GTK_TOGGLE_BUTTON(create)->active); } gtk_widget_destroy(GTK_WIDGET(file_chooser)); } void ags_machine_open_extended_response_callback(GtkWidget *widget, gint response, AgsMachine *machine) { GtkFileChooserDialog *file_chooser; AgsFileSelection *file_selection; GtkCheckButton *overwrite; GtkCheckButton *create; GSList *filenames; gchar *current_folder; GError *error; file_chooser = (GtkFileChooserDialog *) gtk_widget_get_toplevel(widget); if(response == GTK_RESPONSE_ACCEPT){ filenames = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(file_chooser)); overwrite = g_object_get_data((GObject *) widget, "overwrite"); create = g_object_get_data((GObject *) widget, "create"); current_folder = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(file_chooser)); //TODO:JK: you need to check against recently used //TODO:JK: add more file types to AgsFileSelection /* check for supported packed audio files */ file_selection = (AgsFileSelection *) gtk_file_chooser_get_extra_widget(GTK_FILE_CHOOSER(file_chooser)); if(file_selection != NULL && g_strcmp0(file_selection->directory, current_folder)){ gtk_widget_destroy(GTK_WIDGET(file_selection)); file_selection = NULL; } if(file_selection == NULL || (AGS_FILE_SELECTION_COMPLETED & (file_selection->flags)) == 0){ if((AGS_MACHINE_ACCEPT_SOUNDFONT2 & (machine->file_input_flags)) != 0){ GDir *current_directory; GList *new_entry, *old_entry; GSList *slist; gchar *current_filename; slist = filenames; new_entry = NULL; while(slist != NULL){ if(g_str_has_suffix(slist->data, ".sf2")){ AgsFileSelectionEntry *entry; entry = ags_file_selection_entry_alloc(); entry->filename = slist->data; new_entry = g_list_prepend(new_entry, entry); } slist = slist->next; } old_entry = NULL; if(file_selection == NULL){ if(new_entry != NULL){ file_selection = ags_file_selection_new(); gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(file_chooser), GTK_WIDGET(file_selection)); ags_file_selection_set_entry(file_selection, new_entry); ags_connectable_connect(AGS_CONNECTABLE(file_selection)); gtk_widget_show_all(GTK_WIDGET(file_selection)); return; } }else if(AGS_IS_FILE_SELECTION(file_selection)){ GList *really_new_entry; GList *list; old_entry = file_selection->entry; list = new_entry; really_new_entry = NULL; /* check against existing entries */ if(new_entry != NULL){ while(list != NULL){ if(g_list_find(old_entry, list->data) == NULL){ really_new_entry = g_list_prepend(really_new_entry, list->data); }else{ free(list->data); } list = list->next; } g_list_free(new_entry); } ags_file_selection_set_entry(file_selection, really_new_entry); /* adding lost files */ //TODO:JK: figure out if you need to copy the GSList of filenames gtk_file_chooser_select_all(GTK_FILE_CHOOSER(file_chooser)); current_directory = g_dir_open(current_folder, 0, &error); while((current_filename = (gchar *) g_dir_read_name(current_directory)) != NULL){ if(!g_strcmp0(".", current_filename) || !g_strcmp0("..", current_filename)) continue; if(!ags_file_selection_contains_file(file_selection, current_filename) && g_slist_find(filenames, current_filename) == NULL){ gtk_file_chooser_unselect_filename(GTK_FILE_CHOOSER(file_chooser), current_filename); } } g_dir_close(current_directory); return; } } } //TODO:JK: fix GSList filenames memory leak ags_machine_open_files(machine, filenames, overwrite->toggle_button.active, create->toggle_button.active); } } void ags_machine_play_callback(GtkWidget *toggle_button, AgsMachine *machine) { if(machine == NULL){ return; } if(GTK_TOGGLE_BUTTON(toggle_button)->active){ if((AGS_MACHINE_BLOCK_PLAY & (machine->flags)) != 0){ return; } g_message("machine: on"); machine->flags |= AGS_MACHINE_BLOCK_PLAY; ags_machine_set_run_extended(machine, TRUE, TRUE, FALSE); machine->flags &= (~AGS_MACHINE_BLOCK_PLAY); }else{ if((AGS_MACHINE_BLOCK_STOP & (machine->flags)) != 0){ return; } g_message("machine: off"); machine->flags |= AGS_MACHINE_BLOCK_STOP; ags_machine_set_run_extended(machine, FALSE, TRUE, FALSE); machine->flags &= (~AGS_MACHINE_BLOCK_STOP); } } void ags_machine_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, gpointer data) { AgsWindow *window; GList *pad_list; GList *line_list; guint i; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); /* resize */ if((AGS_MACHINE_CONNECTED & (machine->flags)) != 0){ if(audio_channels > audio_channels_old){ if(machine->input != NULL){ pad_list = gtk_container_get_children(GTK_CONTAINER(machine->input)); while(pad_list != NULL){ line_list = gtk_container_get_children((GtkContainer *) AGS_PAD(pad_list->data)->expander_set); line_list = g_list_nth(line_list, audio_channels_old); for(i = 0; i < audio_channels - audio_channels_old; i++){ ags_connectable_connect(AGS_CONNECTABLE(line_list->data)); line_list = line_list->next; } pad_list = pad_list->next; } } if(machine->output != NULL){ pad_list = gtk_container_get_children(GTK_CONTAINER(machine->output)); while(pad_list != NULL){ line_list = gtk_container_get_children((GtkContainer *) AGS_PAD(pad_list->data)->expander_set); line_list = g_list_nth(line_list, audio_channels_old); for(i = 0; i < audio_channels - audio_channels_old; i++){ ags_connectable_connect(AGS_CONNECTABLE(line_list->data)); line_list = line_list->next; } pad_list = pad_list->next; } } } } } void ags_machine_resize_pads_callback(AgsMachine *machine, GType channel_type, guint pads, guint pads_old, gpointer data) { AgsWindow *window; GList *pad_list; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); /* resize */ if((AGS_MACHINE_CONNECTED & (machine->flags)) != 0){ if(pads > pads_old){ if(g_type_is_a(channel_type, AGS_TYPE_INPUT)){ if(machine->input != NULL){ pad_list = gtk_container_get_children(GTK_CONTAINER(machine->input)); pad_list = g_list_nth(pad_list, pads_old); while(pad_list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(pad_list->data)); pad_list = pad_list->next; } } } if(g_type_is_a(channel_type, AGS_TYPE_OUTPUT)){ if(machine->output != NULL){ pad_list = gtk_container_get_children(GTK_CONTAINER(machine->output)); pad_list = g_list_nth(pad_list, pads_old); while(pad_list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(pad_list->data)); pad_list = pad_list->next; } } } } } } void ags_machine_done_callback(AgsMachine *machine, AgsRecallID *recall_id, gpointer data) { AgsMutexManager *mutex_manager; gboolean reset_active; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if((AGS_MACHINE_BLOCK_STOP & (machine->flags)) != 0){ return; } machine->flags |= AGS_MACHINE_BLOCK_STOP; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* play button - check reset active */ pthread_mutex_lock(audio_mutex); reset_active = ((AGS_RECALL_ID_SEQUENCER & (recall_id->flags)) != 0) ? TRUE: FALSE; pthread_mutex_unlock(audio_mutex); if(reset_active){ gtk_toggle_button_set_active(machine->play, FALSE); } machine->flags &= (~AGS_MACHINE_BLOCK_STOP); } gsequencer-1.4.24/ags/X/ags_plugin_preferences.h0000644000175000017500000000442313246707333016542 00000000000000/* 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 . */ #ifndef __AGS_PLUGIN_PREFERENCES_H__ #define __AGS_PLUGIN_PREFERENCES_H__ #include #include #include #define AGS_TYPE_PLUGIN_PREFERENCES (ags_plugin_preferences_get_type()) #define AGS_PLUGIN_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLUGIN_PREFERENCES, AgsPluginPreferences)) #define AGS_PLUGIN_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLUGIN_PREFERENCES, AgsPluginPreferencesClass)) #define AGS_IS_PLUGIN_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PLUGIN_PREFERENCES)) #define AGS_IS_PLUGIN_PREFERENCES_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PLUGIN_PREFERENCES)) #define AGS_PLUGIN_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PLUGIN_PREFERENCES, AgsPluginPreferencesClass)) typedef struct _AgsPluginPreferences AgsPluginPreferences; typedef struct _AgsPluginPreferencesClass AgsPluginPreferencesClass; typedef struct _AgsLadspaPluginPreferences AgsLadspaPluginPreferences; struct _AgsPluginPreferences { GtkVBox vbox; AgsLadspaPluginPreferences *ladspa_plugin_preferencens; }; struct _AgsPluginPreferencesClass { GtkVBoxClass vbox; }; struct _AgsLadspaPluginPreferences { GtkEntry *ladspa_path; GtkCellView *plugin_file; }; GType ags_plugin_preferences_get_type(void); AgsLadspaPluginPreferences* ags_ladspa_plugin_preferences_alloc(); AgsPluginPreferences* ags_plugin_preferences_new(); #endif /*__AGS_PLUGIN_PREFERENCES_H__*/ gsequencer-1.4.24/ags/X/ags_link_editor.c0000644000175000017500000003736713247044247015175 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_link_editor_class_init(AgsLinkEditorClass *link_editor); void ags_link_editor_init(AgsLinkEditor *link_editor); void ags_link_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_link_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_link_editor_connect(AgsConnectable *connectable); void ags_link_editor_disconnect(AgsConnectable *connectable); void ags_link_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_link_editor_apply(AgsApplicable *applicable); void ags_link_editor_reset(AgsApplicable *applicable); /** * SECTION:ags_link_editor * @short_description: Edit links. * @title: AgsLinkEditor * @section_id: * @include: ags/X/ags_link_editor.h * * #AgsLinkEditor is a composite widget to modify links. A link editor * should be packed by a #AgsLineEditor. */ static gpointer ags_link_editor_parent_class = NULL; GType ags_link_editor_get_type(void) { static GType ags_type_link_editor = 0; if(!ags_type_link_editor){ static const GTypeInfo ags_link_editor_info = { sizeof (AgsLinkEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_link_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLinkEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_link_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_link_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_link_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_link_editor = g_type_register_static(GTK_TYPE_HBOX, "AgsLinkEditor", &ags_link_editor_info, 0); g_type_add_interface_static(ags_type_link_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_link_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_link_editor); } void ags_link_editor_class_init(AgsLinkEditorClass *link_editor) { ags_link_editor_parent_class = g_type_class_peek_parent(link_editor); } void ags_link_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_link_editor_connect; connectable->disconnect = ags_link_editor_disconnect; } void ags_link_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_link_editor_set_update; applicable->apply = ags_link_editor_apply; applicable->reset = ags_link_editor_reset; } void ags_link_editor_init(AgsLinkEditor *link_editor) { GtkCellRenderer *cell_renderer; g_signal_connect_after((GObject *) link_editor, "parent_set", G_CALLBACK(ags_link_editor_parent_set_callback), (gpointer) link_editor); link_editor->flags = 0; /* linking machine */ link_editor->combo = (GtkComboBox *) gtk_combo_box_new(); gtk_box_pack_start(GTK_BOX(link_editor), GTK_WIDGET(link_editor->combo), FALSE, FALSE, 0); cell_renderer = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(link_editor->combo), cell_renderer, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(link_editor->combo), cell_renderer, "text", 0, NULL); /* link with line */ link_editor->spin_button = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 0.0, 1.0); gtk_box_pack_start(GTK_BOX(link_editor), GTK_WIDGET(link_editor->spin_button), FALSE, FALSE, 0); link_editor->audio_file = NULL; link_editor->file_chooser = NULL; } void ags_link_editor_connect(AgsConnectable *connectable) { AgsLinkEditor *link_editor; link_editor = AGS_LINK_EDITOR(connectable); if((AGS_LINK_EDITOR_CONNECTED & (link_editor->flags)) != 0){ return; } link_editor->flags |= AGS_LINK_EDITOR_CONNECTED; /* GtkComboBox */ g_signal_connect(G_OBJECT(link_editor->combo), "changed", G_CALLBACK(ags_link_editor_combo_callback), link_editor); } void ags_link_editor_disconnect(AgsConnectable *connectable) { AgsLinkEditor *link_editor; link_editor = AGS_LINK_EDITOR(connectable); if((AGS_LINK_EDITOR_CONNECTED & (link_editor->flags)) == 0){ return; } link_editor->flags &= (~AGS_LINK_EDITOR_CONNECTED); /* GtkComboBox */ g_object_disconnect(G_OBJECT(link_editor->combo), "any_signal::changed", G_CALLBACK(ags_link_editor_combo_callback), link_editor, NULL); } void ags_link_editor_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_link_editor_apply(AgsApplicable *applicable) { AgsLinkEditor *link_editor; GtkTreeIter iter; link_editor = AGS_LINK_EDITOR(applicable); /* reset */ if(gtk_combo_box_get_active_iter(link_editor->combo, &iter)){ AgsWindow *window; AgsMachine *link_machine, *machine; AgsLineEditor *line_editor; GObject *soundcard; AgsAudio *audio; AgsChannel *channel, *link; AgsLinkChannel *link_channel; GtkTreeModel *model; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; line_editor = AGS_LINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(link_editor), AGS_TYPE_LINE_EDITOR)); /* get channel */ channel = line_editor->channel; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio */ pthread_mutex_lock(channel_mutex); audio = (AgsAudio *) channel->audio; pthread_mutex_unlock(channel_mutex); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get soundcard and machine */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; machine = (AgsMachine *) audio->machine; pthread_mutex_unlock(audio_mutex); /* get window and application_context */ window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); application_context = (AgsApplicationContext *) window->application_context; /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* get model */ model = gtk_combo_box_get_model(link_editor->combo); gtk_tree_model_get(model, &iter, 1, &link_machine, -1); if(link_machine == NULL){ if((AGS_MACHINE_TAKES_FILE_INPUT & (machine->flags)) != 0 && ((AGS_MACHINE_ACCEPT_WAV & (machine->file_input_flags)) != 0 || ((AGS_MACHINE_ACCEPT_OGG & (machine->file_input_flags)) != 0)) && gtk_combo_box_get_active(link_editor->combo) + 1 == gtk_tree_model_iter_n_children(model, NULL)){ AgsOpenSingleFile *open_single_file; gchar *str, *filename; gtk_tree_model_get(model, &iter, 0, &str, -1); filename = g_strdup(str + 7); if(g_strcmp0(filename, "")){ open_single_file = ags_open_single_file_new(channel, soundcard, filename, (guint) gtk_spin_button_get_value_as_int(link_editor->spin_button), 1); /* append AgsLinkChannel */ ags_gui_thread_schedule_task(gui_thread, open_single_file); } }else{ /* create task */ link_channel = ags_link_channel_new(channel, NULL); /* append AgsLinkChannel */ ags_gui_thread_schedule_task(gui_thread, link_channel); } }else{ guint link_line; gboolean is_output; pthread_mutex_t *link_audio_mutex; link_line = (guint) gtk_spin_button_get_value_as_int(link_editor->spin_button); pthread_mutex_lock(channel_mutex); is_output = (AGS_IS_OUTPUT(channel)) ? TRUE: FALSE; pthread_mutex_unlock(channel_mutex); /* lookup link's audio mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); link_audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link_machine->audio); pthread_mutex_unlock(application_mutex); /* get link */ pthread_mutex_lock(link_audio_mutex); if(!is_output){ link = link_machine->audio->output; }else{ link = link_machine->audio->input; } pthread_mutex_unlock(link_audio_mutex); link = ags_channel_nth(link, link_line); /* create task */ link_channel = ags_link_channel_new(channel, link); /* append AgsLinkChannel */ ags_gui_thread_schedule_task(gui_thread, link_channel); } } } void ags_link_editor_reset(AgsApplicable *applicable) { AgsLinkEditor *link_editor; GtkTreeModel *model; GtkTreeIter iter; link_editor = AGS_LINK_EDITOR(applicable); model = gtk_combo_box_get_model(link_editor->combo); if(gtk_tree_model_get_iter_first(model, &iter)){ AgsMachine *machine, *link_machine, *link; AgsLineEditor *line_editor; AgsAudio *audio; AgsChannel *channel, *link_channel; AgsMutexManager *mutex_manager; gint i; gboolean found; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *link_channel_mutex; line_editor = AGS_LINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(link_editor), AGS_TYPE_LINE_EDITOR)); channel = line_editor->channel; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio and channel's link */ pthread_mutex_lock(channel_mutex); audio = (AgsAudio *) channel->audio; link_channel = channel->link; pthread_mutex_unlock(channel_mutex); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get machine */ pthread_mutex_lock(audio_mutex); machine = (AgsMachine *) audio->machine; pthread_mutex_unlock(audio_mutex); /* */ if(link_channel != NULL){ AgsAudio *link_audio; pthread_mutex_t *link_audio_mutex; /* lookup channel mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); link_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link_channel); pthread_mutex_unlock(application_mutex); /* get audio */ pthread_mutex_lock(link_channel_mutex); link_audio = (AgsAudio *) link_channel->audio; pthread_mutex_unlock(link_channel_mutex); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); link_audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link_audio); pthread_mutex_unlock(application_mutex); /* get machine */ pthread_mutex_lock(link_audio_mutex); link_machine = (AgsMachine *) link_audio->machine; pthread_mutex_unlock(link_audio_mutex); }else{ link_machine = NULL; } i = 0; found = FALSE; if(link_machine != NULL){ do{ gtk_tree_model_get(model, &iter, 1, &link, -1); if(link_machine == link){ found = TRUE; break; } i++; }while(gtk_tree_model_iter_next(model, &iter)); } gtk_widget_set_sensitive((GtkWidget *) link_editor->spin_button, FALSE); if(found){ /* set channel link */ gtk_combo_box_set_active(link_editor->combo, i); if(link_channel == NULL){ gtk_spin_button_set_value(link_editor->spin_button, 0); }else{ pthread_mutex_lock(link_channel_mutex); gtk_spin_button_set_value(link_editor->spin_button, link_channel->line); pthread_mutex_unlock(link_channel_mutex); } }else{ gtk_combo_box_set_active(link_editor->combo, 0); } /* set file link */ pthread_mutex_lock(channel_mutex); if((AGS_MACHINE_TAKES_FILE_INPUT & (machine->flags)) != 0 && ((AGS_MACHINE_ACCEPT_WAV & (machine->file_input_flags)) != 0 || (AGS_MACHINE_ACCEPT_OGG & (machine->file_input_flags)) != 0) && AGS_IS_INPUT(channel)){ gtk_tree_model_iter_nth_child(model, &iter, NULL, gtk_tree_model_iter_n_children(model, NULL) - 1); if(AGS_INPUT(channel)->file_link != NULL){ /* add file link */ gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, g_strdup_printf("file://%s", AGS_FILE_LINK(AGS_INPUT(channel)->file_link)->filename), 1, NULL, -1); /* file link set active */ link_editor->flags |= AGS_LINK_EDITOR_BLOCK_FILE_CHOOSER; gtk_combo_box_set_active(link_editor->combo, gtk_tree_model_iter_n_children(model, NULL) - 1); /* set spin button insensitive */ gtk_spin_button_set_range(link_editor->spin_button, 0.0, 256.0); gtk_spin_button_set_value(link_editor->spin_button, AGS_AUDIO_FILE_LINK(AGS_INPUT(channel)->file_link)->audio_channel); gtk_widget_set_sensitive((GtkWidget *) link_editor->spin_button, FALSE); /* re-enable file chooser */ link_editor->flags &= (~AGS_LINK_EDITOR_BLOCK_FILE_CHOOSER); }else{ gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, "file://", 1, NULL, -1); } } pthread_mutex_unlock(channel_mutex); } } /** * ags_link_editor_new: * * Creates an #AgsLinkEditor * * Returns: a new #AgsLinkEditor * * Since: 1.0.0 */ AgsLinkEditor* ags_link_editor_new() { AgsLinkEditor *link_editor; link_editor = (AgsLinkEditor *) g_object_new(AGS_TYPE_LINK_EDITOR, NULL); return(link_editor); } gsequencer-1.4.24/ags/X/ags_history_browser_callbacks.c0000644000175000017500000000146313246707333020122 00000000000000/* 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 . */ #include gsequencer-1.4.24/ags/X/ags_line_member_callbacks.h0000644000175000017500000000356513246707333017146 00000000000000/* 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 . */ #ifndef __AGS_LINE_MEMBER_CALLBACKS_H__ #define __AGS_LINE_MEMBER_CALLBACKS_H__ #include #include #include #include int ags_line_member_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLineMember *line_member); void ags_line_member_dial_changed_callback(GtkWidget *dial, AgsLineMember *line_member); void ags_line_member_vscale_changed_callback(GtkWidget *vscale, AgsLineMember *line_member); void ags_line_member_hscale_changed_callback(GtkWidget *hscale, AgsLineMember *line_member); void ags_line_member_spin_button_changed_callback(GtkWidget *spin_button, AgsLineMember *line_member); void ags_line_member_check_button_clicked_callback(GtkWidget *check_button, AgsLineMember *line_member); void ags_line_member_toggle_button_clicked_callback(GtkWidget *toggle_button, AgsLineMember *line_member); void ags_line_member_button_clicked_callback(GtkWidget *button, AgsLineMember *line_member); void ags_line_member_port_safe_write_callback(AgsPort *port, GValue *value, AgsLineMember *line_member); #endif /*__AGS_LINE_MEMBER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_pad_editor_callbacks.c0000644000175000017500000000653613247044247016775 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_pad_editor_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsPadEditor *pad_editor) { AgsAudio *audio; if(audio_channels > audio_channels_old){ AgsLineEditor *line_editor; AgsChannel *channel, *next_pad; AgsMutexManager *mutex_manager; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, pad_editor->pad); pthread_mutex_unlock(application_mutex); /* get some channel fields */ pthread_mutex_lock(channel_mutex); next_pad = pad_editor->pad->next_pad; pthread_mutex_unlock(channel_mutex); /* get current last of pad */ channel = ags_channel_nth(pad_editor->pad, audio_channels_old); while(channel != next_pad){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, channel); pthread_mutex_unlock(application_mutex); /* instantiate line editor */ line_editor = ags_line_editor_new(channel); line_editor->editor_type_count = pad_editor->editor_type_count; line_editor->editor_type = (GType *) malloc(line_editor->editor_type_count * sizeof(GType)); for(i = 0; i < line_editor->editor_type_count; i++){ line_editor->editor_type[i] = pad_editor->editor_type[i]; } gtk_box_pack_start(GTK_BOX(pad_editor->line_editor), GTK_WIDGET(line_editor), FALSE, FALSE, 0); ags_connectable_connect(AGS_CONNECTABLE(line_editor)); gtk_widget_show_all(GTK_WIDGET(line_editor)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } }else{ GList *list, *list_next, *list_start; list_start = list = gtk_container_get_children(GTK_CONTAINER(pad_editor->line_editor)); list = g_list_nth(list, audio_channels); while(list != NULL){ list_next = list->next; gtk_widget_destroy(GTK_WIDGET(list->data)); list = list_next; } g_list_free(list_start); } } gsequencer-1.4.24/ags/X/ags_generic_preferences_callbacks.h0000644000175000017500000000235213247044247020655 00000000000000/* 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 . */ #ifndef __AGS_GENERIC_PREFERENCES_CALLBACKS_H__ #define __AGS_GENERIC_PREFERENCES_CALLBACKS_H__ #include #include void ags_generic_preferences_autosave_thread_clicked_callback(GtkWidget *check_button, AgsGenericPreferences *generic_preferences); void ags_generic_preferences_rt_safe_callback(GtkWidget *check_button, AgsGenericPreferences *generic_preferences); #endif /*__AGS_GENERIC_PREFERENCES_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_performance_preferences.c0000644000175000017500000003372513247044247017546 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_performance_preferences_class_init(AgsPerformancePreferencesClass *performance_preferences); void ags_performance_preferences_connectable_interface_init(AgsConnectableInterface *connectable); void ags_performance_preferences_applicable_interface_init(AgsApplicableInterface *applicable); void ags_performance_preferences_init(AgsPerformancePreferences *performance_preferences); void ags_performance_preferences_connect(AgsConnectable *connectable); void ags_performance_preferences_disconnect(AgsConnectable *connectable); void ags_performance_preferences_set_update(AgsApplicable *applicable, gboolean update); void ags_performance_preferences_apply(AgsApplicable *applicable); void ags_performance_preferences_reset(AgsApplicable *applicable); static void ags_performance_preferences_finalize(GObject *gobject); void ags_performance_preferences_show(GtkWidget *widget); /** * SECTION:ags_performance_preferences * @short_description: A composite widget to do performance related preferences * @title: AgsPerformancePreferences * @section_id: * @include: ags/X/ags_performance_preferences.h * * #AgsPerformancePreferences enables you to make performance related preferences. */ static gpointer ags_performance_preferences_parent_class = NULL; GType ags_performance_preferences_get_type(void) { static GType ags_type_performance_preferences = 0; if(!ags_type_performance_preferences){ static const GTypeInfo ags_performance_preferences_info = { sizeof (AgsPerformancePreferencesClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_performance_preferences_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPerformancePreferences), 0, /* n_preallocs */ (GInstanceInitFunc) ags_performance_preferences_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_performance_preferences_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_performance_preferences_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_performance_preferences = g_type_register_static(GTK_TYPE_VBOX, "AgsPerformancePreferences", &ags_performance_preferences_info, 0); g_type_add_interface_static(ags_type_performance_preferences, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_performance_preferences, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_performance_preferences); } void ags_performance_preferences_class_init(AgsPerformancePreferencesClass *performance_preferences) { GObjectClass *gobject; GtkWidgetClass *widget; ags_performance_preferences_parent_class = g_type_class_peek_parent(performance_preferences); /* GtkObjectClass */ gobject = (GObjectClass *) performance_preferences; gobject->finalize = ags_performance_preferences_finalize; /* GtkWidgetClass */ widget = (GtkWidgetClass *) performance_preferences; widget->show = ags_performance_preferences_show; } void ags_performance_preferences_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_performance_preferences_connect; connectable->disconnect = ags_performance_preferences_disconnect; } void ags_performance_preferences_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_performance_preferences_set_update; applicable->apply = ags_performance_preferences_apply; applicable->reset = ags_performance_preferences_reset; } void ags_performance_preferences_init(AgsPerformancePreferences *performance_preferences) { GtkHBox *hbox; GtkLabel *label; performance_preferences->flags = 0; /* auto-sense */ performance_preferences->stream_auto_sense = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("Auto-sense on stream")); gtk_box_pack_start(GTK_BOX(performance_preferences), GTK_WIDGET(performance_preferences->stream_auto_sense), FALSE, FALSE, 0); /* super threaded - audio */ performance_preferences->super_threaded_audio = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("Super threaded - audio")); gtk_box_pack_start(GTK_BOX(performance_preferences), GTK_WIDGET(performance_preferences->super_threaded_audio), FALSE, FALSE, 0); /* super threaded - channel */ performance_preferences->super_threaded_channel = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("Super threaded - channel")); gtk_box_pack_start(GTK_BOX(performance_preferences), GTK_WIDGET(performance_preferences->super_threaded_channel), FALSE, FALSE, 0); /* thread-pool - max unused threads */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(performance_preferences), GTK_WIDGET(hbox), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("thread pool - max unused threads")); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); performance_preferences->thread_pool_max_unused_threads = gtk_spin_button_new_with_range(1.0, (gdouble) AGS_THREAD_POOL_DEFAULT_MAX_THREADS, 1.0); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(performance_preferences->thread_pool_max_unused_threads), FALSE, FALSE, 0); /* max precision */ hbox = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(performance_preferences), GTK_WIDGET(hbox), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("max precision of threads [Hz]")); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); performance_preferences->max_precision = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(performance_preferences->max_precision, "125"); gtk_combo_box_text_append_text(performance_preferences->max_precision, "250"); gtk_combo_box_text_append_text(performance_preferences->max_precision, "1000"); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(performance_preferences->max_precision), FALSE, FALSE, 0); } void ags_performance_preferences_connect(AgsConnectable *connectable) { AgsPerformancePreferences *performance_preferences; performance_preferences = AGS_PERFORMANCE_PREFERENCES(connectable); if((AGS_PERFORMANCE_PREFERENCES_CONNECTED & (performance_preferences->flags)) != 0){ return; } performance_preferences->flags |= AGS_PERFORMANCE_PREFERENCES_CONNECTED; g_signal_connect_after(G_OBJECT(performance_preferences->super_threaded_channel), "clicked", G_CALLBACK(ags_performance_preferences_super_threaded_channel_callback), performance_preferences); } void ags_performance_preferences_disconnect(AgsConnectable *connectable) { AgsPerformancePreferences *performance_preferences; performance_preferences = AGS_PERFORMANCE_PREFERENCES(connectable); if((AGS_PERFORMANCE_PREFERENCES_CONNECTED & (performance_preferences->flags)) == 0){ return; } performance_preferences->flags &= (~AGS_PERFORMANCE_PREFERENCES_CONNECTED); g_object_disconnect(G_OBJECT(performance_preferences->super_threaded_channel), "any_signal::clicked", G_CALLBACK(ags_performance_preferences_super_threaded_channel_callback), performance_preferences, NULL); } void ags_performance_preferences_set_update(AgsApplicable *applicable, gboolean update) { //TODO:JK: implement me } void ags_performance_preferences_apply(AgsApplicable *applicable) { AgsPerformancePreferences *performance_preferences; AgsConfig *config; gchar *str; guint max_precision; performance_preferences = AGS_PERFORMANCE_PREFERENCES(applicable); config = ags_config_get_instance(); /* auto-sense */ str = g_strdup(((gtk_toggle_button_get_active((GtkToggleButton *) performance_preferences->stream_auto_sense)) ? "true": "false")); ags_config_set_value(config, AGS_CONFIG_RECALL, "auto-sense", str); g_free(str); /* restore thread config */ if(gtk_toggle_button_get_active(performance_preferences->super_threaded_audio) || gtk_toggle_button_get_active(performance_preferences->super_threaded_channel)){ ags_config_set_value(config, AGS_CONFIG_THREAD, "model", "super-threaded"); if(gtk_toggle_button_get_active(performance_preferences->super_threaded_channel)){ ags_config_set_value(config, AGS_CONFIG_THREAD, "super-threaded-scope", "channel"); }else if(gtk_toggle_button_get_active(performance_preferences->super_threaded_audio)){ ags_config_set_value(config, AGS_CONFIG_THREAD, "super-threaded-scope", "audio"); } }else{ ags_config_set_value(config, AGS_CONFIG_THREAD, "model", "multi-threaded"); } ags_config_set_value(config, AGS_CONFIG_THREAD, "lock-global", "ags-thread"); ags_config_set_value(config, AGS_CONFIG_THREAD, "lock-parent", "ags-recycling-thread"); /* thread pool - max unused threads */ str = g_strdup_printf("%d", gtk_spin_button_get_value_as_int(performance_preferences->thread_pool_max_unused_threads)); ags_config_set_value(config, AGS_CONFIG_THREAD, "thread-pool-max-unused-threads", str); g_free(str); /* max-precision */ str = gtk_combo_box_get_active_text(performance_preferences->max_precision); max_precision = 0; if(str != NULL){ max_precision = g_ascii_strtoull(str, NULL, 10); } switch(max_precision){ case 0: { g_critical("invalid max-precision configuration"); max_precision = AGS_THREAD_DEFAULT_MAX_PRECISION; } case 125: case 250: case 1000: default: str = g_strdup_printf("%d", max_precision); ags_config_set_value(config, AGS_CONFIG_THREAD, "max-precision", str); g_free(str); } //TODO:JK: implement me } void ags_performance_preferences_reset(AgsApplicable *applicable) { AgsPerformancePreferences *performance_preferences; AgsConfig *config; gchar *str; guint max_precision; performance_preferences = AGS_PERFORMANCE_PREFERENCES(applicable); config = ags_config_get_instance(); /* auto-sense */ str = ags_config_get_value(config, AGS_CONFIG_RECALL, "auto-sense"); gtk_toggle_button_set_active((GtkToggleButton *) performance_preferences->stream_auto_sense, !g_strcmp0("true", str)); /* */ str = ags_config_get_value(config, AGS_CONFIG_THREAD, "super-threaded-scope"); if(str != NULL){ if(!g_ascii_strncasecmp(str, "audio", 6)){ gtk_toggle_button_set_active((GtkToggleButton *) performance_preferences->super_threaded_audio, TRUE); }else if(!g_ascii_strncasecmp(str, "channel", 8)){ gtk_toggle_button_set_active((GtkToggleButton *) performance_preferences->super_threaded_channel, TRUE); } } /* */ str = ags_config_get_value(config, AGS_CONFIG_THREAD, "thread-pool-max-unused-threads"); if(str != NULL){ gtk_spin_button_set_value(performance_preferences->thread_pool_max_unused_threads, g_ascii_strtod(str, NULL)); }else{ gtk_spin_button_set_value(performance_preferences->thread_pool_max_unused_threads, AGS_THREAD_POOL_DEFAULT_MAX_UNUSED_THREADS); } /* max-precision */ str = ags_config_get_value(config, AGS_CONFIG_THREAD, "max-precision"); if(str != NULL){ max_precision = g_ascii_strtoull(str, NULL, 10); switch(max_precision){ case 125: { gtk_combo_box_set_active(performance_preferences->max_precision, 0); } break; case 250: { gtk_combo_box_set_active(performance_preferences->max_precision, 1); } break; case 1000: { gtk_combo_box_set_active(performance_preferences->max_precision, 2); } break; default: g_warning("unknown max-precision configuration"); } } //TODO:JK: implement me } static void ags_performance_preferences_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_performance_preferences_parent_class)->finalize(gobject); } void ags_performance_preferences_show(GtkWidget *widget) { GTK_WIDGET_CLASS(ags_performance_preferences_parent_class)->show(widget); } /** * ags_performance_preferences_new: * * Creates an #AgsPerformancePreferences * * Returns: a new #AgsPerformancePreferences * * Since: 1.0.0 */ AgsPerformancePreferences* ags_performance_preferences_new() { AgsPerformancePreferences *performance_preferences; performance_preferences = (AgsPerformancePreferences *) g_object_new(AGS_TYPE_PERFORMANCE_PREFERENCES, NULL); return(performance_preferences); } gsequencer-1.4.24/ags/X/ags_plugin_preferences_callbacks.c0000644000175000017500000000154213246707333020533 00000000000000/* 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 . */ #include #include #include gsequencer-1.4.24/ags/X/ags_automation_editor.c0000644000175000017500000020741013247044247016404 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_automation_editor_class_init(AgsAutomationEditorClass *automation_editor); void ags_automation_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_automation_editor_init(AgsAutomationEditor *automation_editor); void ags_automation_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_automation_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_automation_editor_connect(AgsConnectable *connectable); void ags_automation_editor_disconnect(AgsConnectable *connectable); void ags_automation_editor_finalize(GObject *gobject); void ags_automation_editor_real_machine_changed(AgsAutomationEditor *automation_editor, AgsMachine *machine); enum{ MACHINE_CHANGED, LAST_SIGNAL, }; enum{ PROP_0, PROP_SOUNDCARD, }; static gpointer ags_automation_editor_parent_class = NULL; static guint automation_editor_signals[LAST_SIGNAL]; /** * SECTION:ags_automation_editor * @short_description: A composite widget to edit automation * @title: AgsAutomationEditor * @section_id: * @include: ags/X/ags_automation_editor.h * * #AgsAutomationEditor is a composite widget to edit automation. You may select machines * or change editor tool to do automation. */ GType ags_automation_editor_get_type(void) { static GType ags_type_automation_editor = 0; if(!ags_type_automation_editor){ static const GTypeInfo ags_automation_editor_info = { sizeof (AgsAutomationEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_automation_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAutomationEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_automation_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_automation_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_automation_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsAutomationEditor", &ags_automation_editor_info, 0); g_type_add_interface_static(ags_type_automation_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_automation_editor); } void ags_automation_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_automation_editor_connect; connectable->disconnect = ags_automation_editor_disconnect; } void ags_automation_editor_class_init(AgsAutomationEditorClass *automation_editor) { GObjectClass *gobject; GParamSpec *param_spec; ags_automation_editor_parent_class = g_type_class_peek_parent(automation_editor); /* GObjectClass */ gobject = (GObjectClass *) automation_editor; gobject->set_property = ags_automation_editor_set_property; gobject->get_property = ags_automation_editor_get_property; gobject->finalize = ags_automation_editor_finalize; /* properties */ /** * AgsAutomationEditor:soundcard: * * The assigned #AgsSoundcard acting as default sink. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* AgsEditorClass */ automation_editor->machine_changed = ags_automation_editor_real_machine_changed; /* signals */ /** * AgsEditor::machine-changed: * @editor: the object to change machine. * @machine: the #AgsMachine to set * * The ::machine-changed signal notifies about changed machine. * * Since: 1.0.0 */ automation_editor_signals[MACHINE_CHANGED] = g_signal_new("machine-changed", G_TYPE_FROM_CLASS(automation_editor), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsAutomationEditorClass, machine_changed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_automation_editor_init(AgsAutomationEditor *automation_editor) { GtkViewport *viewport; GtkScrolledWindow *scrolled_window; GtkTable *table; GtkAdjustment *adjustment; automation_editor->flags = (AGS_AUTOMATION_EDITOR_PASTE_MATCH_LINE | AGS_AUTOMATION_EDITOR_PASTE_NO_DUPLICATES); automation_editor->version = AGS_AUTOMATION_EDITOR_DEFAULT_VERSION; automation_editor->build_id = AGS_AUTOMATION_EDITOR_DEFAULT_BUILD_ID; /* offset */ automation_editor->tact_counter = 0; automation_editor->current_tact = 0.0; /* soundcard */ automation_editor->soundcard = NULL; /* automation toolbar */ automation_editor->automation_toolbar = ags_automation_toolbar_new(); gtk_box_pack_start((GtkBox *) automation_editor, (GtkWidget *) automation_editor->automation_toolbar, FALSE, FALSE, 0); /* paned */ automation_editor->paned = (GtkHPaned *) gtk_hpaned_new(); gtk_box_pack_start((GtkBox *) automation_editor, (GtkWidget *) automation_editor->paned, TRUE, TRUE, 0); /* machine selector */ viewport = gtk_viewport_new(NULL, NULL); g_object_set(viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_paned_pack1((GtkPaned *) automation_editor->paned, (GtkWidget *) viewport, FALSE, TRUE); scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_container_add(viewport, scrolled_window); automation_editor->machine_selector = g_object_new(AGS_TYPE_MACHINE_SELECTOR, "homogeneous", FALSE, "spacing", 0, NULL); automation_editor->machine_selector->flags |= (AGS_MACHINE_SELECTOR_AUTOMATION); gtk_label_set_label(automation_editor->machine_selector->label, i18n("automation")); automation_editor->machine_selector->popup = ags_machine_selector_popup_new(automation_editor->machine_selector); g_object_set(automation_editor->machine_selector->menu_button, "menu", automation_editor->machine_selector->popup, NULL); gtk_scrolled_window_add_with_viewport(scrolled_window, (GtkWidget *) automation_editor->machine_selector); /* selected machine */ automation_editor->selected_machine = NULL; /* notebook audio, output, input */ viewport = gtk_viewport_new(NULL, NULL); g_object_set(viewport, "shadow-type", GTK_SHADOW_NONE, NULL); gtk_paned_pack2((GtkPaned *) automation_editor->paned, (GtkWidget *) viewport, TRUE, TRUE); automation_editor->notebook = (GtkNotebook *) gtk_notebook_new(); gtk_container_add(viewport, automation_editor->notebook); /* audio */ table = (GtkTable *) gtk_table_new(4, 3, FALSE); gtk_notebook_append_page(automation_editor->notebook, (GtkWidget *) table, gtk_label_new(i18n("audio"))); /* audio - scrollbars */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_HEIGHT, 1.0); automation_editor->audio_vscrollbar = gtk_vscrollbar_new(adjustment); gtk_table_attach(table, (GtkWidget *) automation_editor->audio_vscrollbar, 2, 3, 2, 3, GTK_FILL, GTK_FILL, 0, 0); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH, 1.0); automation_editor->audio_hscrollbar = gtk_hscrollbar_new(adjustment); gtk_table_attach(table, (GtkWidget *) automation_editor->audio_hscrollbar, 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); /* audio - ruler */ automation_editor->audio_ruler = ags_ruler_new(); gtk_table_attach(table, (GtkWidget *) automation_editor->audio_ruler, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); /* audio - scale */ automation_editor->audio_scrolled_scale_box = ags_scrolled_scale_box_new(); automation_editor->audio_scrolled_scale_box->scale_box = ags_vscale_box_new(); gtk_container_add(automation_editor->audio_scrolled_scale_box->viewport, automation_editor->audio_scrolled_scale_box->scale_box); gtk_table_attach(table, (GtkWidget *) automation_editor->audio_scrolled_scale_box, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* audio - automation edit */ automation_editor->audio_scrolled_automation_edit_box = ags_scrolled_automation_edit_box_new(); automation_editor->audio_scrolled_automation_edit_box->automation_edit_box = ags_vautomation_edit_box_new(); gtk_container_add(automation_editor->audio_scrolled_automation_edit_box->viewport, automation_editor->audio_scrolled_automation_edit_box->automation_edit_box); gtk_table_attach(table, (GtkWidget *) automation_editor->audio_scrolled_automation_edit_box, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); gtk_widget_set_events(GTK_WIDGET(automation_editor->audio_scrolled_automation_edit_box->viewport), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_CONTROL_MASK); /* output */ table = (GtkTable *) gtk_table_new(4, 3, FALSE); gtk_notebook_append_page(automation_editor->notebook, (GtkWidget *) table, gtk_label_new(i18n("output"))); /* output - scrollbars */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_HEIGHT, 1.0); automation_editor->output_vscrollbar = gtk_vscrollbar_new(adjustment); gtk_table_attach(table, (GtkWidget *) automation_editor->output_vscrollbar, 2, 3, 2, 3, GTK_FILL, GTK_FILL, 0, 0); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH, 1.0); automation_editor->output_hscrollbar = gtk_hscrollbar_new(adjustment); gtk_table_attach(table, (GtkWidget *) automation_editor->output_hscrollbar, 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); /* output - notebook */ automation_editor->output_notebook = g_object_new(AGS_TYPE_NOTEBOOK, "homogeneous", FALSE, "spacing", 0, "prefix", i18n("line"), NULL); gtk_table_attach(table, (GtkWidget *) automation_editor->output_notebook, 0, 3, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); /* output - ruler */ automation_editor->output_ruler = ags_ruler_new(); gtk_table_attach(table, (GtkWidget *) automation_editor->output_ruler, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); /* output - scale */ automation_editor->output_scrolled_scale_box = ags_scrolled_scale_box_new(); automation_editor->output_scrolled_scale_box->scale_box = ags_vscale_box_new(); gtk_container_add(automation_editor->output_scrolled_scale_box->viewport, automation_editor->output_scrolled_scale_box->scale_box); gtk_table_attach(table, (GtkWidget *) automation_editor->output_scrolled_scale_box, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); /* output - automation edit */ automation_editor->output_scrolled_automation_edit_box = ags_scrolled_automation_edit_box_new(); automation_editor->output_scrolled_automation_edit_box->automation_edit_box = ags_vautomation_edit_box_new(); gtk_container_add(automation_editor->output_scrolled_automation_edit_box->viewport, automation_editor->output_scrolled_automation_edit_box->automation_edit_box); gtk_table_attach(table, (GtkWidget *) automation_editor->output_scrolled_automation_edit_box, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); gtk_widget_set_events(GTK_WIDGET(automation_editor->output_scrolled_automation_edit_box->viewport), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_CONTROL_MASK); /* input */ table = (GtkTable *) gtk_table_new(4, 3, FALSE); gtk_notebook_append_page(automation_editor->notebook, (GtkWidget *) table, gtk_label_new(i18n("input"))); /* input - scrollbars */ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_HEIGHT, 1.0); automation_editor->input_vscrollbar = gtk_vscrollbar_new(adjustment); gtk_table_attach(table, (GtkWidget *) automation_editor->input_vscrollbar, 2, 3, 2, 3, GTK_FILL, GTK_FILL, 0, 0); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH, 1.0); automation_editor->input_hscrollbar = gtk_hscrollbar_new(adjustment); gtk_table_attach(table, (GtkWidget *) automation_editor->input_hscrollbar, 1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0); /* input - notebook */ automation_editor->input_notebook = g_object_new(AGS_TYPE_NOTEBOOK, "homogeneous", FALSE, "spacing", 0, "prefix", i18n("line"), NULL); gtk_table_attach(table, (GtkWidget *) automation_editor->input_notebook, 0, 3, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); /* input - ruler */ automation_editor->input_ruler = ags_ruler_new(); gtk_table_attach(table, (GtkWidget *) automation_editor->input_ruler, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); /* input - scale */ automation_editor->input_scrolled_scale_box = ags_scrolled_scale_box_new(); automation_editor->input_scrolled_scale_box->scale_box = ags_vscale_box_new(); gtk_container_add(automation_editor->input_scrolled_scale_box->viewport, automation_editor->input_scrolled_scale_box->scale_box); gtk_table_attach(table, (GtkWidget *) automation_editor->input_scrolled_scale_box, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show_all(automation_editor->input_scrolled_scale_box); gtk_widget_show_all(automation_editor->input_scrolled_scale_box->viewport); /* input automation edit */ automation_editor->input_scrolled_automation_edit_box = ags_scrolled_automation_edit_box_new(); automation_editor->input_scrolled_automation_edit_box->automation_edit_box = ags_vautomation_edit_box_new(); gtk_container_add(automation_editor->input_scrolled_automation_edit_box->viewport, automation_editor->input_scrolled_automation_edit_box->automation_edit_box); gtk_table_attach(table, (GtkWidget *) automation_editor->input_scrolled_automation_edit_box, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); gtk_widget_set_events(GTK_WIDGET(automation_editor->input_scrolled_automation_edit_box->viewport), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_CONTROL_MASK); /* focused automation edit */ automation_editor->focused_automation_edit = NULL; } void ags_automation_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAutomationEditor *automation_editor; automation_editor = AGS_AUTOMATION_EDITOR(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(automation_editor->soundcard == soundcard){ return; } if(automation_editor->soundcard != NULL){ g_object_unref(automation_editor->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } automation_editor->soundcard = soundcard; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAutomationEditor *automation_editor; automation_editor = AGS_AUTOMATION_EDITOR(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, automation_editor->soundcard); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_editor_connect(AgsConnectable *connectable) { AgsAutomationEditor *automation_editor; automation_editor = AGS_AUTOMATION_EDITOR(connectable); if((AGS_AUTOMATION_EDITOR_CONNECTED & (automation_editor->flags)) != 0){ return; } automation_editor->flags |= AGS_AUTOMATION_EDITOR_CONNECTED; /* audio */ g_signal_connect_after((GObject *) automation_editor->audio_scrolled_automation_edit_box->viewport, "expose_event", G_CALLBACK(ags_automation_editor_audio_edit_expose_event), (gpointer) automation_editor); g_signal_connect_after((GObject *) automation_editor->audio_scrolled_automation_edit_box->viewport, "configure_event", G_CALLBACK(ags_automation_editor_audio_edit_configure_event), (gpointer) automation_editor); g_signal_connect_after((GObject *) automation_editor->audio_vscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_audio_vscrollbar_value_changed), (gpointer) automation_editor); g_signal_connect_after((GObject *) automation_editor->audio_hscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_audio_hscrollbar_value_changed), (gpointer) automation_editor); /* output */ g_signal_connect_after((GObject *) automation_editor->output_scrolled_automation_edit_box->viewport, "expose_event", G_CALLBACK(ags_automation_editor_output_edit_expose_event), (gpointer) automation_editor); g_signal_connect_after((GObject *) automation_editor->output_scrolled_automation_edit_box->viewport, "configure_event", G_CALLBACK(ags_automation_editor_output_edit_configure_event), (gpointer) automation_editor); g_signal_connect_after((GObject *) automation_editor->output_vscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_output_vscrollbar_value_changed), (gpointer) automation_editor); g_signal_connect_after((GObject *) automation_editor->output_hscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_output_hscrollbar_value_changed), (gpointer) automation_editor); /* input */ g_signal_connect_after((GObject *) automation_editor->input_scrolled_automation_edit_box->viewport, "expose_event", G_CALLBACK(ags_automation_editor_input_edit_expose_event), (gpointer) automation_editor); g_signal_connect_after((GObject *) automation_editor->input_scrolled_automation_edit_box->viewport, "configure_event", G_CALLBACK(ags_automation_editor_input_edit_configure_event), (gpointer) automation_editor); g_signal_connect_after((GObject *) automation_editor->input_vscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_input_vscrollbar_value_changed), (gpointer) automation_editor); g_signal_connect_after((GObject *) automation_editor->input_hscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_input_hscrollbar_value_changed), (gpointer) automation_editor); /* machine selector */ g_signal_connect((GObject *) automation_editor->machine_selector, "changed", G_CALLBACK(ags_automation_editor_machine_changed_callback), (gpointer) automation_editor); /* toolbar and selector */ ags_connectable_connect(AGS_CONNECTABLE(automation_editor->automation_toolbar)); ags_connectable_connect(AGS_CONNECTABLE(automation_editor->machine_selector)); } void ags_automation_editor_disconnect(AgsConnectable *connectable) { AgsAutomationEditor *automation_editor; automation_editor = AGS_AUTOMATION_EDITOR(connectable); if((AGS_AUTOMATION_EDITOR_CONNECTED & (automation_editor->flags)) == 0){ return; } automation_editor->flags &= (~AGS_AUTOMATION_EDITOR_CONNECTED); /* audio */ g_object_disconnect((GObject *) automation_editor->audio_scrolled_automation_edit_box->viewport, "any_signal::expose_event", G_CALLBACK(ags_automation_editor_audio_edit_expose_event), automation_editor, "any_signal::configure_event", G_CALLBACK(ags_automation_editor_audio_edit_configure_event), automation_editor, NULL); /* output */ g_object_disconnect((GObject *) automation_editor->output_scrolled_automation_edit_box->viewport, "any_signal::expose_event", G_CALLBACK(ags_automation_editor_output_edit_expose_event), automation_editor, "any_signal::configure_event", G_CALLBACK(ags_automation_editor_output_edit_configure_event), automation_editor, NULL); /* input */ g_object_disconnect((GObject *) automation_editor->input_scrolled_automation_edit_box->viewport, "any_signal::expose_event", G_CALLBACK(ags_automation_editor_input_edit_expose_event), automation_editor, "any_signal::configure_event", G_CALLBACK(ags_automation_editor_input_edit_configure_event), automation_editor, NULL); /* toolbar and selector */ ags_connectable_disconnect(AGS_CONNECTABLE(automation_editor->automation_toolbar)); ags_connectable_disconnect(AGS_CONNECTABLE(automation_editor->machine_selector)); } void ags_automation_editor_finalize(GObject *gobject) { AgsAutomationEditor *automation_editor; automation_editor = AGS_AUTOMATION_EDITOR(gobject); /* call parent */ G_OBJECT_CLASS(ags_automation_editor_parent_class)->finalize(gobject); } void ags_automation_editor_reset_audio_scrollbar(AgsAutomationEditor *automation_editor) { AgsAutomationToolbar *automation_toolbar; GList *list_start, *list; gdouble v_upper, h_upper; double zoom_factor, zoom; double zoom_correction; guint map_width; automation_toolbar = automation_editor->automation_toolbar; /* reset vertical scrollbar */ v_upper = GTK_WIDGET(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box)->allocation.height - GTK_WIDGET(automation_editor->audio_scrolled_automation_edit_box->viewport)->allocation.height; if(v_upper < 0.0){ v_upper = 0.0; } gtk_adjustment_set_upper(GTK_RANGE(automation_editor->audio_vscrollbar)->adjustment, v_upper); gtk_adjustment_set_upper(gtk_viewport_get_vadjustment(automation_editor->audio_scrolled_automation_edit_box->viewport), v_upper); gtk_adjustment_set_upper(gtk_viewport_get_vadjustment(automation_editor->audio_scrolled_scale_box->viewport), v_upper); /* reset horizontal scrollbar */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom) - 2.0); zoom_correction = 1.0 / 16; map_width = ((double) AGS_AUTOMATION_EDITOR_MAX_CONTROLS * zoom * zoom_correction); h_upper = map_width - GTK_WIDGET(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box)->allocation.width; if(h_upper < 0.0){ h_upper = 0.0; } gtk_adjustment_set_upper(automation_editor->audio_ruler->adjustment, h_upper); gtk_adjustment_set_upper(GTK_RANGE(automation_editor->audio_hscrollbar)->adjustment, h_upper); /* automation edit */ list_start = list = gtk_container_get_children(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ gtk_adjustment_set_upper(GTK_RANGE(AGS_AUTOMATION_EDIT(list->data)->hscrollbar)->adjustment, h_upper); list = list->next; } g_list_free(list_start); } void ags_automation_editor_reset_output_scrollbar(AgsAutomationEditor *automation_editor) { AgsAutomationToolbar *automation_toolbar; GList *list_start, *list; gdouble v_upper, h_upper; double zoom_factor, zoom; double zoom_correction; guint map_width; automation_toolbar = automation_editor->automation_toolbar; /* reset vertical scrollbar */ v_upper = GTK_WIDGET(automation_editor->output_scrolled_automation_edit_box->automation_edit_box)->allocation.height - GTK_WIDGET(automation_editor->output_scrolled_automation_edit_box->viewport)->allocation.height; if(v_upper < 0.0){ v_upper = 0.0; } gtk_adjustment_set_upper(GTK_RANGE(automation_editor->output_vscrollbar)->adjustment, v_upper); gtk_adjustment_set_upper(gtk_viewport_get_vadjustment(automation_editor->output_scrolled_automation_edit_box->viewport), v_upper); gtk_adjustment_set_upper(gtk_viewport_get_vadjustment(automation_editor->output_scrolled_scale_box->viewport), v_upper); /* reset horizontal scrollbar */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom) - 2.0); zoom_correction = 1.0 / 16; map_width = ((double) AGS_AUTOMATION_EDITOR_MAX_CONTROLS * zoom * zoom_correction); h_upper = map_width - GTK_WIDGET(automation_editor->output_scrolled_automation_edit_box->automation_edit_box)->allocation.width; if(h_upper < 0.0){ h_upper = 0.0; } gtk_adjustment_set_upper(automation_editor->output_ruler->adjustment, h_upper); gtk_adjustment_set_upper(GTK_RANGE(automation_editor->output_hscrollbar)->adjustment, h_upper); /* automation edit */ list_start = list = gtk_container_get_children(automation_editor->output_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ gtk_adjustment_set_upper(GTK_RANGE(AGS_AUTOMATION_EDIT(list->data)->hscrollbar)->adjustment, h_upper); list = list->next; } g_list_free(list_start); } void ags_automation_editor_reset_input_scrollbar(AgsAutomationEditor *automation_editor) { AgsAutomationToolbar *automation_toolbar; GList *list_start, *list; gdouble v_upper, h_upper; double zoom_factor, zoom; double zoom_correction; guint map_width; automation_toolbar = automation_editor->automation_toolbar; /* reset vertical scrollbar */ v_upper = GTK_WIDGET(automation_editor->input_scrolled_automation_edit_box->automation_edit_box)->allocation.height - GTK_WIDGET(automation_editor->input_scrolled_automation_edit_box->viewport)->allocation.height; if(v_upper < 0.0){ v_upper = 0.0; } gtk_adjustment_set_upper(GTK_RANGE(automation_editor->input_vscrollbar)->adjustment, v_upper); gtk_adjustment_set_upper(gtk_viewport_get_vadjustment(automation_editor->input_scrolled_automation_edit_box->viewport), v_upper); gtk_adjustment_set_upper(gtk_viewport_get_vadjustment(automation_editor->input_scrolled_scale_box->viewport), v_upper); /* reset horizontal scrollbar */ zoom = exp2((double) gtk_combo_box_get_active((GtkComboBox *) automation_toolbar->zoom) - 2.0); zoom_correction = 1.0 / 16; map_width = ((double) AGS_AUTOMATION_EDITOR_MAX_CONTROLS * zoom * zoom_correction); h_upper = map_width - GTK_WIDGET(automation_editor->input_scrolled_automation_edit_box->automation_edit_box)->allocation.width; if(h_upper < 0.0){ h_upper = 0.0; } gtk_adjustment_set_upper(automation_editor->input_ruler->adjustment, h_upper); gtk_adjustment_set_upper(GTK_RANGE(automation_editor->input_hscrollbar)->adjustment, h_upper); /* automation edit */ list_start = list = gtk_container_get_children(automation_editor->input_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ gtk_adjustment_set_upper(GTK_RANGE(AGS_AUTOMATION_EDIT(list->data)->hscrollbar)->adjustment, h_upper); list = list->next; } g_list_free(list_start); } void ags_automation_editor_real_machine_changed(AgsAutomationEditor *automation_editor, AgsMachine *machine) { AgsMachine *old_machine; AgsMutexManager *mutex_manager; GList *list_start, *list; GList *tab; guint length; guint output_pads, input_pads; guint audio_channels; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* disconnect set pads - old */ old_machine = automation_editor->selected_machine; if(old_machine != NULL){ g_object_disconnect(old_machine, "any_signal::resize-audio-channels", G_CALLBACK(ags_automation_editor_resize_audio_channels_callback), (gpointer) automation_editor, "any_signal::resize-pads", G_CALLBACK(ags_automation_editor_resize_pads_callback), (gpointer) automation_editor, NULL); } /* get audio mutex */ if(machine != NULL){ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); } /* notebook - remove tabs */ length = g_list_length(automation_editor->output_notebook->tab); for(i = 0; i < length; i++){ ags_notebook_remove_tab(automation_editor->output_notebook, 0); } length = g_list_length(automation_editor->input_notebook->tab); for(i = 0; i < length; i++){ ags_notebook_remove_tab(automation_editor->input_notebook, 0); } /* notebook - add tabs */ if(machine != NULL){ pthread_mutex_lock(audio_mutex); output_pads = machine->audio->output_pads; input_pads = machine->audio->input_pads; audio_channels = machine->audio->audio_channels; pthread_mutex_unlock(audio_mutex); for(i = 0; i < output_pads * audio_channels; i++){ ags_notebook_insert_tab(automation_editor->output_notebook, i); tab = automation_editor->output_notebook->tab; gtk_toggle_button_set_active(AGS_NOTEBOOK_TAB(tab->data)->toggle, TRUE); } for(i = 0; i < input_pads * audio_channels; i++){ ags_notebook_insert_tab(automation_editor->input_notebook, i); tab = automation_editor->input_notebook->tab; gtk_toggle_button_set_active(AGS_NOTEBOOK_TAB(tab->data)->toggle, TRUE); } } /* * destroy old */ /* audio */ list = list_start = gtk_container_get_children(automation_editor->audio_scrolled_scale_box->scale_box); while(list != NULL){ gtk_widget_destroy(list->data); list = list->next; } g_list_free(list_start); list = list_start = gtk_container_get_children(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ g_object_disconnect(AGS_AUTOMATION_EDIT(list->data)->hscrollbar, "any_signal::value-changed", G_CALLBACK(ags_automation_editor_audio_automation_edit_hscrollbar_value_changed), (gpointer) automation_editor, NULL); gtk_widget_destroy(list->data); list = list->next; } g_list_free(list_start); /* output */ list = list_start = gtk_container_get_children(automation_editor->output_scrolled_scale_box->scale_box); while(list != NULL){ gtk_widget_destroy(list->data); list = list->next; } g_list_free(list_start); list = list_start = gtk_container_get_children(automation_editor->output_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ g_object_disconnect(AGS_AUTOMATION_EDIT(list->data)->hscrollbar, "any_signal::value-changed", G_CALLBACK(ags_automation_editor_output_automation_edit_hscrollbar_value_changed), (gpointer) automation_editor, NULL); gtk_widget_destroy(list->data); list = list->next; } g_list_free(list_start); /* input */ list = list_start = gtk_container_get_children(automation_editor->input_scrolled_scale_box->scale_box); while(list != NULL){ gtk_widget_destroy(list->data); list = list->next; } g_list_free(list_start); list = list_start = gtk_container_get_children(automation_editor->input_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ g_object_disconnect(AGS_AUTOMATION_EDIT(list->data)->hscrollbar, "any_signal::value-changed", G_CALLBACK(ags_automation_editor_input_automation_edit_hscrollbar_value_changed), (gpointer) automation_editor, NULL); gtk_widget_destroy(list->data); list = list->next; } g_list_free(list_start); /* * add new */ if(machine != NULL){ GList *automation_port; /* audio */ automation_port = machine->enabled_automation_port; while(automation_port != NULL){ AgsAutomationEdit *automation_edit; AgsScale *scale; GList *automation; gboolean contains_specifier; pthread_mutex_lock(audio_mutex); contains_specifier = ((automation = ags_automation_find_specifier_with_type_and_line(machine->audio->automation, AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->control_name, AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type, 0)) != NULL) ? TRUE: FALSE; pthread_mutex_unlock(audio_mutex); if(contains_specifier){ /* scale */ scale = ags_scale_new(); pthread_mutex_lock(audio_mutex); g_object_set(scale, "control-name", AGS_AUTOMATION(automation->data)->control_name, "upper", AGS_AUTOMATION(automation->data)->upper, "lower", AGS_AUTOMATION(automation->data)->lower, "default-value", AGS_AUTOMATION(automation->data)->default_value, NULL); pthread_mutex_unlock(audio_mutex); if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == G_TYPE_NONE){ gtk_box_pack_start(automation_editor->audio_scrolled_scale_box->scale_box, scale, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); }else if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == AGS_TYPE_OUTPUT){ gtk_box_pack_start(automation_editor->output_scrolled_scale_box->scale_box, scale, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); }else if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == AGS_TYPE_INPUT){ gtk_box_pack_start(automation_editor->input_scrolled_scale_box->scale_box, scale, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); } gtk_widget_show(scale); /* automation edit */ automation_edit = ags_automation_edit_new(); pthread_mutex_lock(audio_mutex); g_object_set(automation_edit, "channel-type", G_TYPE_NONE, "control-specifier", AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->control_name, "control-name", AGS_AUTOMATION(automation->data)->control_name, "upper", AGS_AUTOMATION(automation->data)->upper, "lower", AGS_AUTOMATION(automation->data)->lower, "default-value", AGS_AUTOMATION(automation->data)->default_value, NULL); pthread_mutex_unlock(audio_mutex); if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == G_TYPE_NONE){ gtk_box_pack_start(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box, automation_edit, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); }else if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == AGS_TYPE_OUTPUT){ gtk_box_pack_start(automation_editor->output_scrolled_automation_edit_box->automation_edit_box, automation_edit, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); }else if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == AGS_TYPE_INPUT){ gtk_box_pack_start(automation_editor->input_scrolled_automation_edit_box->automation_edit_box, automation_edit, FALSE, FALSE, AGS_AUTOMATION_EDIT_DEFAULT_PADDING); } ags_connectable_connect(AGS_CONNECTABLE(automation_edit)); gtk_widget_show(automation_edit); if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == G_TYPE_NONE){ g_signal_connect_after((GObject *) automation_edit->hscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_audio_automation_edit_hscrollbar_value_changed), (gpointer) automation_editor); }else if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == AGS_TYPE_OUTPUT){ g_signal_connect_after((GObject *) automation_edit->hscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_output_automation_edit_hscrollbar_value_changed), (gpointer) automation_editor); }else if(AGS_MACHINE_AUTOMATION_PORT(automation_port->data)->channel_type == AGS_TYPE_INPUT){ g_signal_connect_after((GObject *) automation_edit->hscrollbar, "value-changed", G_CALLBACK(ags_automation_editor_input_automation_edit_hscrollbar_value_changed), (gpointer) automation_editor); } } automation_port = automation_port->next; } } /* selected machine */ automation_editor->selected_machine = machine; /* connect set-pads - new */ if(machine != NULL){ g_signal_connect_after(machine, "resize-audio-channels", G_CALLBACK(ags_automation_editor_resize_audio_channels_callback), automation_editor); g_signal_connect_after(machine, "resize-pads", G_CALLBACK(ags_automation_editor_resize_pads_callback), automation_editor); } } /** * ags_automation_editor_machine_changed: * @automation_editor: an #AgsAutomationEditor * @machine: the new #AgsMachine * * Is emitted as machine changed of automation editor. * * Since: 1.0.0 */ void ags_automation_editor_machine_changed(AgsAutomationEditor *automation_editor, AgsMachine *machine) { g_return_if_fail(AGS_IS_AUTOMATION_EDITOR(automation_editor)); g_object_ref((GObject *) automation_editor); g_signal_emit((GObject *) automation_editor, automation_editor_signals[MACHINE_CHANGED], 0, machine); g_object_unref((GObject *) automation_editor); } void ags_automation_editor_add_acceleration(AgsAutomationEditor *automation_editor, AgsAcceleration *acceleration) { AgsMachine *machine; AgsNotebook *notebook; AgsAutomation *automation; AgsTimestamp *timestamp; GList *list_automation; gint i; if(!AGS_IS_AUTOMATION_EDITOR(automation_editor) || !AGS_IS_ACCELERATION(acceleration) || automation_editor->focused_automation_edit == NULL){ return; } if(automation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = automation_editor->selected_machine; notebook = NULL; if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* check all active tabs */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = AGS_AUTOMATION_DEFAULT_OFFSET * floor(acceleration->x / AGS_AUTOMATION_DEFAULT_OFFSET); i = 0; while(notebook == NULL || (i = ags_notebook_next_active_tab(notebook, i)) != -1){ AgsChannel *channel; AgsPort *play_port, *recall_port; AgsAcceleration *new_acceleration; GList *list; play_port = NULL; recall_port = NULL; if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ channel = ags_channel_nth(machine->audio->output, i); play_port = ags_channel_find_port_by_specifier_and_scope(channel, automation_editor->focused_automation_edit->control_name, TRUE); recall_port = ags_channel_find_port_by_specifier_and_scope(channel, automation_editor->focused_automation_edit->control_name, FALSE); }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ channel = ags_channel_nth(machine->audio->input, i); play_port = ags_channel_find_port_by_specifier_and_scope(channel, automation_editor->focused_automation_edit->control_name, TRUE); recall_port = ags_channel_find_port_by_specifier_and_scope(channel, automation_editor->focused_automation_edit->control_name, FALSE); }else{ play_port = ags_audio_find_port_by_specifier_and_scope(machine->audio, automation_editor->focused_automation_edit->control_name, TRUE); recall_port = ags_audio_find_port_by_specifier_and_scope(machine->audio, automation_editor->focused_automation_edit->control_name, FALSE); } pthread_mutex_lock(audio_mutex); /* play port */ if(play_port != NULL){ list = ags_automation_find_near_timestamp(play_port->automation, i, timestamp); if(list == NULL){ automation = ags_automation_new(machine->audio, i, automation_editor->focused_automation_edit->channel_type, automation_editor->focused_automation_edit->control_name); g_object_set(automation, "port", play_port, NULL); automation->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; machine->audio->automation = ags_automation_add(machine->audio->automation, automation); play_port->automation = ags_automation_add(play_port->automation, automation); }else{ automation = list->data; } new_acceleration = ags_acceleration_duplicate(acceleration); ags_automation_add_acceleration(automation, new_acceleration, FALSE); } /* recall port */ if(recall_port != NULL){ list = ags_automation_find_near_timestamp(recall_port->automation, i, timestamp); if(list == NULL){ automation = ags_automation_new(machine->audio, i, automation_editor->focused_automation_edit->channel_type, automation_editor->focused_automation_edit->control_name); g_object_set(automation, "port", recall_port, NULL); automation->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; machine->audio->automation = ags_automation_add(machine->audio->automation, automation); recall_port->automation = ags_automation_add(recall_port->automation, automation); }else{ automation = list->data; } new_acceleration = ags_acceleration_duplicate(acceleration); ags_automation_add_acceleration(automation, new_acceleration, FALSE); } pthread_mutex_unlock(audio_mutex); if(notebook == NULL){ break; } i++; } g_object_unref(timestamp); gtk_widget_queue_draw(automation_editor->focused_automation_edit); } } void ags_automation_editor_delete_acceleration(AgsAutomationEditor *automation_editor, guint x, gdouble y) { AgsMachine *machine; AgsNotebook *notebook; AgsAutomation *automation; AgsTimestamp *timestamp; GList *list_automation; gdouble c_range; guint g_range; guint scan_x; gdouble scan_y; gboolean success; gint i, j, j_step, j_stop; if(!AGS_IS_AUTOMATION_EDITOR(automation_editor) || automation_editor->focused_automation_edit == NULL){ return; } if(automation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = automation_editor->selected_machine; notebook = NULL; if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; } if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_editor->focused_automation_edit->flags)) != 0){ c_range = exp(automation_editor->focused_automation_edit->upper) - exp(automation_editor->focused_automation_edit->lower); }else{ c_range = automation_editor->focused_automation_edit->upper - automation_editor->focused_automation_edit->lower; } g_range = GTK_RANGE(automation_editor->focused_automation_edit->vscrollbar)->adjustment->upper + GTK_WIDGET(automation_editor->focused_automation_edit->drawing_area)->allocation.height; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* check all active tabs */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = AGS_AUTOMATION_DEFAULT_OFFSET * floor(x / AGS_AUTOMATION_DEFAULT_OFFSET); pthread_mutex_lock(audio_mutex); i = 0; while(notebook == NULL || (i = ags_notebook_next_active_tab(notebook, i)) != -1){ AgsAcceleration *new_acceleration; list_automation = machine->audio->automation; while((list_automation = ags_automation_find_near_timestamp_extended(list_automation, i, automation_editor->focused_automation_edit->channel_type, automation_editor->focused_automation_edit->control_name, timestamp)) != NULL){ if(list_automation != NULL){ automation = list_automation->data; }else{ if(notebook == NULL){ break; } list_automation = list_automation->next; i++; continue; } success = FALSE; j = 0; j_step = 1; j_stop = 4; while(!success && exp2(j_step) <= AGS_AUTOMATION_EDIT_DEFAULT_SCAN_WIDTH){ scan_x = (-1 * j_step + floor(j / (2 * j_step))); if((AGS_AUTOMATION_EDIT_LOGARITHMIC & (automation_editor->focused_automation_edit->flags)) != 0){ scan_y = log((-1 * j_step + floor(j % (2 * j_step))) / g_range) * c_range; }else{ scan_y = ((-1 * j_step + floor(j % (2 * j_step))) / g_range) * c_range; } success = ags_automation_remove_acceleration_at_position(automation, x - scan_x, y - scan_y); j++; if(j >= j_stop){ j_step++; j_stop = exp2(j_step + 1); } } list_automation = list_automation->next; } if(notebook == NULL){ break; } i++; } pthread_mutex_unlock(audio_mutex); gtk_widget_queue_draw(automation_editor->focused_automation_edit); } } void ags_automation_editor_select_region(AgsAutomationEditor *automation_editor, guint x0, gdouble y0, guint x1, gdouble y1) { AgsMachine *machine; AgsNotebook *notebook; AgsAutomation *automation; AgsTimestamp *timestamp; GList *list_automation; gint i; if(!AGS_IS_AUTOMATION_EDITOR(automation_editor) || automation_editor->focused_automation_edit == NULL){ return; } if(automation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = automation_editor->selected_machine; notebook = NULL; if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* swap values if needed */ if(x0 > x1){ guint tmp; tmp = x0; x0 = x1; x1 = tmp; } if(y0 > y1){ gdouble tmp; tmp = y0; y0 = y1; y1 = tmp; } /* check all active tabs */ timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; pthread_mutex_lock(audio_mutex); i = 0; while(notebook == NULL || (i = ags_notebook_next_active_tab(notebook, i)) != -1){ list_automation = machine->audio->automation; timestamp->timer.ags_offset.offset = AGS_AUTOMATION_DEFAULT_OFFSET * floor(x0 / AGS_AUTOMATION_DEFAULT_OFFSET); while(timestamp->timer.ags_offset.offset < (AGS_AUTOMATION_DEFAULT_OFFSET * floor(x1 / AGS_AUTOMATION_DEFAULT_OFFSET)) + AGS_AUTOMATION_DEFAULT_OFFSET){ while((list_automation = ags_automation_find_near_timestamp_extended(list_automation, i, automation_editor->focused_automation_edit->channel_type, automation_editor->focused_automation_edit->control_name, timestamp)) != NULL){ ags_automation_add_region_to_selection(list_automation->data, x0, y0, x1, y1, TRUE); /* iterate */ list_automation = list_automation->next; } timestamp->timer.ags_offset.offset += AGS_AUTOMATION_DEFAULT_OFFSET; } if(notebook == NULL){ break; } i++; } pthread_mutex_unlock(audio_mutex); gtk_widget_queue_draw(automation_editor->focused_automation_edit); } } void ags_automation_editor_select_all(AgsAutomationEditor *automation_editor) { AgsMachine *machine; AgsNotebook *notebook; GList *list_automation; gint i; if(!AGS_IS_AUTOMATION_EDITOR(automation_editor)){ return; } if(automation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = automation_editor->selected_machine; notebook = NULL; if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* check all active tabs */ pthread_mutex_lock(audio_mutex); i = 0; while(notebook == NULL || (i = ags_notebook_next_active_tab(notebook, i)) != -1){ list_automation = machine->audio->automation; while((list_automation = ags_automation_find_near_timestamp_extended(list_automation, i, automation_editor->focused_automation_edit->channel_type, automation_editor->focused_automation_edit->control_name, NULL)) != NULL){ ags_automation_add_all_to_selection(AGS_AUTOMATION(list_automation->data)); list_automation = list_automation->next; } if(notebook == NULL){ break; } i++; } pthread_mutex_unlock(audio_mutex); gtk_widget_queue_draw(automation_editor->focused_automation_edit); } } void ags_automation_editor_paste(AgsAutomationEditor *automation_editor) { AgsMachine *machine; AgsAutomationEdit *automation_edit; AgsNotebook *notebook; AgsAutomation *automation; xmlDoc *clipboard; xmlNode *audio_node; xmlNode *automation_list_node, *automation_node; xmlNode *timestamp_node; gchar *buffer; guint position_x, position_y; gint first_x, last_x; gboolean paste_from_position; auto gint ags_automation_editor_paste_automation_all(xmlNode *automation_node, AgsTimestamp *timestamp, gboolean match_line, gboolean no_duplicates); auto gint ags_automation_editor_paste_automation(xmlNode *audio_node); gint ags_automation_editor_paste_automation_all(xmlNode *automation_node, AgsTimestamp *timestamp, gboolean match_line, gboolean no_duplicates) { AgsAutomation *automation; GList *list_automation; guint first_x; guint current_x; gint i; first_x = -1; /* */ i = 0; while(notebook == NULL || (i = ags_notebook_next_active_tab(notebook, i)) != -1){ list_automation = ags_automation_find_near_timestamp_extended(machine->audio->automation, i, automation_editor->focused_automation_edit->channel_type, automation_editor->focused_automation_edit->control_name, timestamp); if(list_automation == NULL){ automation = ags_automation_new(machine->audio, i, automation_editor->focused_automation_edit->channel_type, automation_editor->focused_automation_edit->control_name); automation->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; machine->audio->automation = ags_automation_add(machine->audio->automation, automation); }else{ automation = AGS_AUTOMATION(list_automation->data); } if(paste_from_position){ xmlNode *child; guint x_boundary; ags_automation_insert_from_clipboard_extended(automation, automation_node, TRUE, position_x, TRUE, position_y, match_line, no_duplicates); /* get boundaries */ child = automation_node->children; current_x = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "note", 5)){ guint tmp; tmp = g_ascii_strtoull(xmlGetProp(child, "x"), NULL, 10); if(tmp > current_x){ current_x = tmp; } } } child = child->next; } x_boundary = g_ascii_strtoull(xmlGetProp(automation_node, "x_boundary"), NULL, 10); if(first_x == -1 || x_boundary < first_x){ first_x = x_boundary; } if(position_x > x_boundary){ current_x += (position_x - x_boundary); }else{ current_x -= (x_boundary - position_x); } if(current_x > last_x){ last_x = current_x; } }else{ xmlNode *child; ags_automation_insert_from_clipboard(automation, automation_node, FALSE, 0, FALSE, 0); /* get boundaries */ child = automation_node->children; current_x = 0; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "note", 5)){ guint tmp; tmp = g_ascii_strtoull(xmlGetProp(child, "x"), NULL, 10); if(tmp > current_x){ current_x = tmp; } } } child = child->next; } if(current_x > last_x){ last_x = current_x; } } if(notebook == NULL){ break; } i++; } return(first_x); } gint ags_automation_editor_paste_automation(xmlNode *audio_node){ AgsTimestamp *timestamp; guint first_x; gboolean match_line, no_duplicates; first_x = -1; match_line = ((AGS_AUTOMATION_EDITOR_PASTE_MATCH_LINE & (automation_editor->flags)) != 0) ? TRUE: FALSE; no_duplicates = ((AGS_AUTOMATION_EDITOR_PASTE_NO_DUPLICATES & (automation_editor->flags)) != 0) ? TRUE: FALSE; timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = 0; /* paste automation */ automation_list_node = audio_node->children; while(automation_list_node != NULL){ if(automation_list_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(automation_list_node->name, "automation-list", 14)){ automation_node = automation_list_node->children; while(automation_node != NULL){ if(automation_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(automation_node->name, "automation", 9)){ guint64 offset; timestamp_node = automation_node->children; offset = 0; while(timestamp_node != NULL){ if(timestamp_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(timestamp_node->name, "timestamp", 10)){ offset = g_ascii_strtoull(xmlGetProp(timestamp_node, "offset"), NULL, 10); break; } } timestamp_node = timestamp_node->next; } /* 1st attempt */ timestamp->timer.ags_offset.offset = offset; first_x = ags_automation_editor_paste_automation_all(automation_node, timestamp, match_line, no_duplicates); /* 2nd attempt */ timestamp->timer.ags_offset.offset = offset + AGS_AUTOMATION_DEFAULT_OFFSET; ags_automation_editor_paste_automation_all(automation_node, timestamp, match_line, no_duplicates); } } automation_node = automation_node->next; } } } automation_list_node = automation_list_node->next; } g_object_unref(timestamp); return(first_x); } if(!AGS_IS_AUTOMATION_EDITOR(automation_editor) || automation_editor->focused_automation_edit == NULL){ return; } if((machine = automation_editor->selected_machine) != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = automation_editor->selected_machine; automation_edit = NULL; notebook = NULL; if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ GList *list_start, *list; notebook = automation_editor->output_notebook; list = list_start = gtk_container_get_children(automation_editor->output_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ if(!g_strcmp0(automation_editor->focused_automation_edit->control_name, AGS_AUTOMATION_EDIT(list->data)->control_name)){ automation_edit = list->data; break; } list = list->next; } g_list_free(list_start); }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ GList *list_start, *list; notebook = automation_editor->input_notebook; list = list_start = gtk_container_get_children(automation_editor->input_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ if(!g_strcmp0(automation_editor->focused_automation_edit->control_name, AGS_AUTOMATION_EDIT(list->data)->control_name)){ automation_edit = list->data; break; } list = list->next; } g_list_free(list_start); }else{ GList *list_start, *list; list = list_start = gtk_container_get_children(automation_editor->audio_scrolled_automation_edit_box->automation_edit_box); while(list != NULL){ if(!g_strcmp0(automation_editor->focused_automation_edit->control_name, AGS_AUTOMATION_EDIT(list->data)->control_name)){ automation_edit = list->data; break; } list = list->next; } g_list_free(list_start); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* get clipboard */ buffer = gtk_clipboard_wait_for_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); if(buffer == NULL){ return; } /* get position */ if(automation_editor->automation_toolbar->selected_edit_mode == automation_editor->automation_toolbar->position){ last_x = 0; paste_from_position = TRUE; position_x = automation_editor->focused_automation_edit->cursor_position_x; position_y = automation_editor->focused_automation_edit->cursor_position_y; #ifdef DEBUG printf("pasting at position: [%u,%u]\n", position_x, position_y); #endif }else{ paste_from_position = FALSE; } /* get xml tree */ clipboard = xmlReadMemory(buffer, strlen(buffer), NULL, "UTF-8", 0); audio_node = xmlDocGetRootElement(clipboard); first_x = -1; /* iterate xml tree */ pthread_mutex_lock(audio_mutex); while(audio_node != NULL){ if(audio_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("audio", audio_node->name, 6)){ automation_node = audio_node->children; first_x = ags_automation_editor_paste_automation(audio_node); break; } } audio_node = audio_node->next; } if(first_x == -1){ first_x = 0; } xmlFreeDoc(clipboard); pthread_mutex_unlock(audio_mutex); if(paste_from_position){ gint big_step, small_step; //TODO:JK: implement me big_step = (guint) ceil((double) last_x / 16.0) * 16.0 + (automation_edit->cursor_position_x % (guint) 16); small_step = (guint) big_step - 16; if(small_step < last_x){ automation_editor->focused_automation_edit->cursor_position_x = big_step; }else{ automation_editor->focused_automation_edit->cursor_position_x = small_step; } } gtk_widget_queue_draw(automation_edit); } } void ags_automation_editor_copy(AgsAutomationEditor *automation_editor) { AgsMachine *machine; AgsNotebook *notebook; AgsAutomation *automation; xmlDoc *clipboard; xmlNode *audio_node, *automation_list_node, *automation_node; GList *list_automation; xmlChar *buffer; int size; gint i; if(!AGS_IS_AUTOMATION_EDITOR(automation_editor) || automation_editor->focused_automation_edit == NULL){ return; } if(automation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = automation_editor->selected_machine; notebook = NULL; if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* create document */ clipboard = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION); /* create root node */ audio_node = xmlNewNode(NULL, BAD_CAST "audio"); xmlDocSetRootElement(clipboard, audio_node); automation_list_node = xmlNewNode(NULL, BAD_CAST "automation-list"); xmlAddChild(audio_node, automation_list_node); /* create automation nodes */ list_automation = machine->audio->automation; i = 0; while(notebook == NULL || (i = ags_notebook_next_active_tab(notebook, i)) != -1){ pthread_mutex_lock(audio_mutex); list_automation = machine->audio->automation; /* copy */ while((list_automation = ags_automation_find_near_timestamp_extended(list_automation, i, automation_editor->focused_automation_edit->channel_type, automation_editor->focused_automation_edit->control_name, NULL)) != NULL){ automation_node = ags_automation_copy_selection(AGS_AUTOMATION(list_automation->data)); xmlAddChild(automation_list_node, automation_node); list_automation = list_automation->next; } pthread_mutex_unlock(audio_mutex); if(notebook == NULL){ break; } i++; } /* write to clipboard */ xmlDocDumpFormatMemoryEnc(clipboard, &buffer, &size, "UTF-8", TRUE); gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), buffer, size); gtk_clipboard_store(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); xmlFreeDoc(clipboard); } } void ags_automation_editor_cut(AgsAutomationEditor *automation_editor) { AgsMachine *machine; AgsNotebook *notebook; AgsAutomation *automation; xmlDoc *clipboard; xmlNode *audio_node; xmlNode *automation_list_node, *automation_node; GList *list_automation; xmlChar *buffer; int size; gint i; if(!AGS_IS_AUTOMATION_EDITOR(automation_editor) || automation_editor->focused_automation_edit == NULL){ return; } if(automation_editor->selected_machine != NULL){ AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; machine = automation_editor->selected_machine; notebook = NULL; if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_OUTPUT){ notebook = automation_editor->output_notebook; }else if(automation_editor->focused_automation_edit->channel_type == AGS_TYPE_INPUT){ notebook = automation_editor->input_notebook; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) machine->audio); pthread_mutex_unlock(application_mutex); /* create document */ clipboard = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION); /* create root node */ audio_node = xmlNewNode(NULL, BAD_CAST "audio"); xmlDocSetRootElement(clipboard, audio_node); automation_list_node = xmlNewNode(NULL, BAD_CAST "automation-list"); xmlAddChild(audio_node, automation_list_node); /* create automation nodes */ pthread_mutex_lock(audio_mutex); list_automation = machine->audio->automation; pthread_mutex_unlock(audio_mutex); i = 0; while(notebook == NULL || (i = ags_notebook_next_active_tab(notebook, i)) != -1){ pthread_mutex_lock(audio_mutex); list_automation = machine->audio->automation; /* cut */ while((list_automation = ags_automation_find_near_timestamp_extended(list_automation, i, automation_editor->focused_automation_edit->channel_type, automation_editor->focused_automation_edit->control_name, NULL)) != NULL){ automation_node = ags_automation_cut_selection(AGS_AUTOMATION(list_automation->data)); xmlAddChild(automation_list_node, automation_node); list_automation = list_automation->next; } pthread_mutex_unlock(audio_mutex); if(notebook == NULL){ break; } i++; } gtk_widget_queue_draw(automation_editor->focused_automation_edit); /* write to clipboard */ xmlDocDumpFormatMemoryEnc(clipboard, &buffer, &size, "UTF-8", TRUE); gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), buffer, size); gtk_clipboard_store(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); xmlFreeDoc(clipboard); } } void ags_automation_editor_invert(AgsAutomationEditor *automation_editor) { g_message("ags_automation_editor_invert() - not implemented"); } /** * ags_automation_editor_new: * * Create a new #AgsAutomationEditor. * * Returns: a new #AgsAutomationEditor * * Since: 1.0.0 */ AgsAutomationEditor* ags_automation_editor_new() { AgsAutomationEditor *automation_editor; automation_editor = (AgsAutomationEditor *) g_object_new(AGS_TYPE_AUTOMATION_EDITOR, NULL); return(automation_editor); } gsequencer-1.4.24/ags/X/ags_generic_preferences_callbacks.c0000644000175000017500000000424713247044247020655 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_generic_preferences_autosave_thread_clicked_callback(GtkWidget *check_button, AgsGenericPreferences *generic_preferences) { AgsApplicationContext *application_context; AgsAutosaveThread *autosave_thread; AgsPreferences *preferences; preferences = (AgsPreferences *) gtk_widget_get_ancestor(GTK_WIDGET(generic_preferences), AGS_TYPE_PREFERENCES); application_context = (AgsApplicationContext *) AGS_WINDOW(preferences->window)->application_context; autosave_thread = (AgsAutosaveThread *) application_context->autosave_thread; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_button))){ ags_thread_start((AgsThread *) autosave_thread); }else{ ags_thread_stop((AgsThread *) autosave_thread); } } void ags_generic_preferences_rt_safe_callback(GtkWidget *check_button, AgsGenericPreferences *generic_preferences) { if(gtk_toggle_button_get_active(check_button)){ gtk_toggle_button_set_active(generic_preferences->engine_mode, 1); gtk_widget_set_sensitive(generic_preferences->engine_mode, FALSE); }else{ gtk_widget_set_sensitive(generic_preferences->engine_mode, TRUE); } } gsequencer-1.4.24/ags/X/ags_line_editor.c0000644000175000017500000002431113247044247015150 00000000000000/* 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 . */ #include #include #include #include #include void ags_line_editor_class_init(AgsLineEditorClass *line_editor); void ags_line_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_line_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_line_editor_init(AgsLineEditor *line_editor); void ags_line_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_line_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_line_editor_connect(AgsConnectable *connectable); void ags_line_editor_disconnect(AgsConnectable *connectable); void ags_line_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_line_editor_apply(AgsApplicable *applicable); void ags_line_editor_reset(AgsApplicable *applicable); /** * SECTION:ags_line_editor * @short_description: A composite widget to edit #AgsChannel * @title: AgsLineEditor * @section_id: * @include: ags/X/ags_line_editor.h * * #AgsLineEditor is a composite widget to edit #AgsChannel. It should be * packed by an #AgsPadEditor. */ enum{ PROP_0, PROP_CHANNEL, }; GType ags_line_editor_get_type(void) { static GType ags_type_line_editor = 0; if(!ags_type_line_editor){ static const GTypeInfo ags_line_editor_info = { sizeof (AgsLineEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_line_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLineEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_line_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_line_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_line_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_line_editor = g_type_register_static(GTK_TYPE_VBOX, "AgsLineEditor", &ags_line_editor_info, 0); g_type_add_interface_static(ags_type_line_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_line_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_line_editor); } void ags_line_editor_class_init(AgsLineEditorClass *line_editor) { GObjectClass *gobject; GParamSpec *param_spec; gobject = (GObjectClass *) line_editor; gobject->set_property = ags_line_editor_set_property; gobject->get_property = ags_line_editor_get_property; /** * AgsLineEditor:channel: * * The assigned #AgsChannel to edit. * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("assigned channel"), i18n_pspec("The channel which this line editor is assigned with"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); } void ags_line_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_line_editor_connect; connectable->disconnect = ags_line_editor_disconnect; } void ags_line_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_line_editor_set_update; applicable->apply = ags_line_editor_apply; applicable->reset = ags_line_editor_reset; } void ags_line_editor_init(AgsLineEditor *line_editor) { line_editor->flags = 0; line_editor->version = AGS_LINE_EDITOR_DEFAULT_VERSION; line_editor->build_id = AGS_LINE_EDITOR_DEFAULT_BUILD_ID; line_editor->link_editor = NULL; line_editor->member_editor = NULL; } void ags_line_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLineEditor *line_editor; line_editor = AGS_LINE_EDITOR(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); ags_line_editor_set_channel(line_editor, channel); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_line_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLineEditor *line_editor; line_editor = AGS_LINE_EDITOR(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, line_editor->channel); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_line_editor_connect(AgsConnectable *connectable) { AgsLineEditor *line_editor; line_editor = AGS_LINE_EDITOR(connectable); if((AGS_LINE_EDITOR_CONNECTED & (line_editor->flags)) != 0){ return; } line_editor->flags |= AGS_LINE_EDITOR_CONNECTED; g_signal_connect(G_OBJECT(line_editor), "show", G_CALLBACK(ags_line_editor_show_callback), (gpointer) line_editor); if(line_editor->link_editor != NULL){ ags_connectable_connect(AGS_CONNECTABLE(line_editor->link_editor)); } if(line_editor->output_editor != NULL){ ags_connectable_connect(AGS_CONNECTABLE(line_editor->output_editor)); } if(line_editor->member_editor != NULL){ ags_connectable_connect(AGS_CONNECTABLE(line_editor->member_editor)); } } void ags_line_editor_disconnect(AgsConnectable *connectable) { AgsLineEditor *line_editor; line_editor = AGS_LINE_EDITOR(connectable); if((AGS_LINE_EDITOR_CONNECTED & (line_editor->flags)) == 0){ return; } line_editor->flags &= (~AGS_LINE_EDITOR_CONNECTED); g_object_disconnect(G_OBJECT(line_editor), "any_signal::show", G_CALLBACK(ags_line_editor_show_callback), (gpointer) line_editor, NULL); if(line_editor->link_editor != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(line_editor->link_editor)); } if(line_editor->output_editor != NULL){ ags_connectable_connect(AGS_CONNECTABLE(line_editor->output_editor)); } if(line_editor->member_editor != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(line_editor->member_editor)); } } void ags_line_editor_set_update(AgsApplicable *applicable, gboolean update) { AgsLineEditor *line_editor; line_editor = AGS_LINE_EDITOR(applicable); if(line_editor->link_editor != NULL){ ags_applicable_set_update(AGS_APPLICABLE(line_editor->link_editor), update); } } void ags_line_editor_apply(AgsApplicable *applicable) { AgsLineEditor *line_editor; line_editor = AGS_LINE_EDITOR(applicable); if(line_editor->link_editor != NULL){ ags_applicable_apply(AGS_APPLICABLE(line_editor->link_editor)); } if(line_editor->output_editor != NULL){ ags_applicable_apply(AGS_APPLICABLE(line_editor->output_editor)); } } void ags_line_editor_reset(AgsApplicable *applicable) { AgsLineEditor *line_editor; line_editor = AGS_LINE_EDITOR(applicable); if(line_editor->link_editor != NULL){ ags_applicable_reset(AGS_APPLICABLE(line_editor->link_editor)); } if(line_editor->output_editor != NULL){ ags_applicable_reset(AGS_APPLICABLE(line_editor->output_editor)); } if(line_editor->member_editor != NULL){ ags_applicable_reset(AGS_APPLICABLE(line_editor->member_editor)); } } /** * ags_line_editor_set_channel: * @line_editor: an #AgsLineEditor * @channel: the new #AgsChannel * * Is called as channel gets modified. * * Since: 1.0.0 */ void ags_line_editor_set_channel(AgsLineEditor *line_editor, AgsChannel *channel) { if(line_editor->link_editor != NULL){ line_editor->link_editor = NULL; gtk_widget_destroy(GTK_WIDGET(line_editor->link_editor)); gtk_widget_destroy(GTK_WIDGET(line_editor->output_editor)); gtk_widget_destroy(GTK_WIDGET(line_editor->member_editor)); } line_editor->channel = channel; if(channel != NULL){ guint i; for(i = 0; i < line_editor->editor_type_count; i++){ /* link */ if(line_editor->editor_type[i] == AGS_TYPE_LINK_EDITOR){ line_editor->link_editor = ags_link_editor_new(); gtk_box_pack_start(GTK_BOX(line_editor), GTK_WIDGET(line_editor->link_editor), FALSE, FALSE, 0); } /* recall */ if(line_editor->editor_type[i] == AGS_TYPE_OUTPUT_EDITOR){ line_editor->output_editor = ags_output_editor_new(); gtk_box_pack_start(GTK_BOX(line_editor), GTK_WIDGET(line_editor->output_editor), FALSE, FALSE, 0); } /* recall */ if(line_editor->editor_type[i] == AGS_TYPE_LINE_MEMBER_EDITOR){ line_editor->member_editor = ags_line_member_editor_new(); gtk_box_pack_start(GTK_BOX(line_editor), GTK_WIDGET(line_editor->member_editor), FALSE, FALSE, 0); } } } } /** * ags_line_editor_new: * @channel: the channel to edit * * Creates an #AgsLineEditor * * Returns: a new #AgsLineEditor * * Since: 1.0.0 */ AgsLineEditor* ags_line_editor_new(AgsChannel *channel) { AgsLineEditor *line_editor; line_editor = (AgsLineEditor *) g_object_new(AGS_TYPE_LINE_EDITOR, "channel", channel, NULL); return(line_editor); } gsequencer-1.4.24/ags/X/ags_link_collection_editor.c0000644000175000017500000005216613247044247017402 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_link_collection_editor_class_init(AgsLinkCollectionEditorClass *link_collection_editor); void ags_link_collection_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_link_collection_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_link_collection_editor_init(AgsLinkCollectionEditor *link_collection_editor); void ags_link_collection_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_link_collection_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_link_collection_editor_connect(AgsConnectable *connectable); void ags_link_collection_editor_disconnect(AgsConnectable *connectable); void ags_link_collection_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_link_collection_editor_apply(AgsApplicable *applicable); void ags_link_collection_editor_reset(AgsApplicable *applicable); /** * SECTION:ags_link_collection_editor * @short_description: edit links in bulk mode. * @title: AgsLinkCollectionEditor * @section_id: * @include: ags/X/ags_link_collection_editor.h * * #AgsLinkCollectionEditor is a composite widget to modify links in bulk mode. A link collection * editor should be packed by a #AgsMachineEditor. */ enum{ PROP_0, PROP_CHANNEL_TYPE, }; static gpointer ags_link_collection_editor_parent_class = NULL; GType ags_link_collection_editor_get_type(void) { static GType ags_type_link_collection_editor = 0; if(!ags_type_link_collection_editor){ static const GTypeInfo ags_link_collection_editor_info = { sizeof (AgsLinkCollectionEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_link_collection_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLinkCollectionEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_link_collection_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_link_collection_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_link_collection_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_link_collection_editor = g_type_register_static(GTK_TYPE_TABLE, "AgsLinkCollectionEditor", &ags_link_collection_editor_info, 0); g_type_add_interface_static(ags_type_link_collection_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_link_collection_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_link_collection_editor); } void ags_link_collection_editor_class_init(AgsLinkCollectionEditorClass *link_collection_editor) { GObjectClass *gobject; GParamSpec *param_spec; ags_link_collection_editor_parent_class = g_type_class_peek_parent(link_collection_editor); /* GObjectClass */ gobject = (GObjectClass *) link_collection_editor; gobject->set_property = ags_link_collection_editor_set_property; gobject->get_property = ags_link_collection_editor_get_property; /* properties */ /** * AgsLinkCollectionEditor:channel-type: * * The channel type to apply to. Either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("channel-type", i18n_pspec("assigned channel type"), i18n_pspec("The channel type which this channel link collection editor is assigned with"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL_TYPE, param_spec); } void ags_link_collection_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_link_collection_editor_connect; connectable->disconnect = ags_link_collection_editor_disconnect; } void ags_link_collection_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_link_collection_editor_set_update; applicable->apply = ags_link_collection_editor_apply; applicable->reset = ags_link_collection_editor_reset; } void ags_link_collection_editor_init(AgsLinkCollectionEditor *link_collection_editor) { GtkAlignment *alignment; GtkLabel *label; GtkCellRenderer *cell_renderer; GtkListStore *model; GtkTreeIter iter; link_collection_editor->flags = 0; g_signal_connect_after(GTK_WIDGET(link_collection_editor), "parent_set", G_CALLBACK(ags_link_collection_editor_parent_set_callback), link_collection_editor); link_collection_editor->channel_type = G_TYPE_NONE; gtk_table_resize(GTK_TABLE(link_collection_editor), 4, 2); gtk_table_set_row_spacings(GTK_TABLE(link_collection_editor), 4); gtk_table_set_col_spacings(GTK_TABLE(link_collection_editor), 2); /* link */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(link_collection_editor), GTK_WIDGET(alignment), 0, 1, 0, 1, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("link")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(link_collection_editor), GTK_WIDGET(alignment), 1, 2, 0, 1, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); link_collection_editor->link = (GtkComboBox *) gtk_combo_box_new(); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(link_collection_editor->link)); model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "NULL", 1, NULL, -1); cell_renderer = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(link_collection_editor->link), cell_renderer, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(link_collection_editor->link), cell_renderer, "text", 0, NULL); gtk_combo_box_set_model(link_collection_editor->link, GTK_TREE_MODEL(model)); /* first line */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(link_collection_editor), GTK_WIDGET(alignment), 0, 1, 1, 2, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("first line")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(link_collection_editor), GTK_WIDGET(alignment), 1, 2, 1, 2, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); link_collection_editor->first_line = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 0.0, 1.0); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(link_collection_editor->first_line)); /* first link line */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(link_collection_editor), GTK_WIDGET(alignment), 0, 1, 2, 3, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("first link line")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(link_collection_editor), GTK_WIDGET(alignment), 1, 2, 2, 3, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); link_collection_editor->first_link = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 0.0, 1.0); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(link_collection_editor->first_link)); /* count */ alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(link_collection_editor), GTK_WIDGET(alignment), 0, 1, 3, 4, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); label = (GtkLabel *) gtk_label_new(i18n("count")); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(label)); alignment = (GtkAlignment *) gtk_alignment_new(0.0, 0.5, 0.0, 0.0); gtk_table_attach(GTK_TABLE(link_collection_editor), GTK_WIDGET(alignment), 1, 2, 3, 4, GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); link_collection_editor->count = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 0.0, 1.0); gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(link_collection_editor->count)); } void ags_link_collection_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLinkCollectionEditor *link_collection_editor; link_collection_editor = AGS_LINK_COLLECTION_EDITOR(gobject); switch(prop_id){ case PROP_CHANNEL_TYPE: link_collection_editor->channel_type = g_value_get_gtype(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_link_collection_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLinkCollectionEditor *link_collection_editor; link_collection_editor = AGS_LINK_COLLECTION_EDITOR(gobject); switch(prop_id){ case PROP_CHANNEL_TYPE: g_value_set_gtype(value, link_collection_editor->channel_type); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_link_collection_editor_connect(AgsConnectable *connectable) { AgsLinkCollectionEditor *link_collection_editor; link_collection_editor = AGS_LINK_COLLECTION_EDITOR(connectable); if((AGS_LINK_COLLECTION_EDITOR_CONNECTED & (link_collection_editor->flags)) != 0){ return; } link_collection_editor->flags |= AGS_LINK_COLLECTION_EDITOR_CONNECTED; /* AgsLinkCollectionEditor */ g_signal_connect_after(G_OBJECT(link_collection_editor->link), "changed", G_CALLBACK(ags_link_collection_editor_link_callback), link_collection_editor); g_signal_connect_after(G_OBJECT(link_collection_editor->first_line), "value-changed", G_CALLBACK(ags_link_collection_editor_first_line_callback), link_collection_editor); g_signal_connect_after(G_OBJECT(link_collection_editor->first_link), "value-changed", G_CALLBACK(ags_link_collection_editor_first_link_callback), link_collection_editor); } void ags_link_collection_editor_disconnect(AgsConnectable *connectable) { AgsLinkCollectionEditor *link_collection_editor; link_collection_editor = AGS_LINK_COLLECTION_EDITOR(connectable); if((AGS_LINK_COLLECTION_EDITOR_CONNECTED & (link_collection_editor->flags)) == 0){ return; } link_collection_editor->flags &= (~AGS_LINK_COLLECTION_EDITOR_CONNECTED); /* AgsLinkCollectionEditor */ g_object_disconnect(G_OBJECT(link_collection_editor->link), "any_signal::changed", G_CALLBACK(ags_link_collection_editor_link_callback), link_collection_editor, NULL); g_object_disconnect(G_OBJECT(link_collection_editor->first_line), "any_signal::value-changed", G_CALLBACK(ags_link_collection_editor_first_line_callback), link_collection_editor, NULL); g_object_disconnect(G_OBJECT(link_collection_editor->first_link), "any_signal::value-changed", G_CALLBACK(ags_link_collection_editor_first_link_callback), link_collection_editor, NULL); } void ags_link_collection_editor_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_link_collection_editor_apply(AgsApplicable *applicable) { AgsLinkCollectionEditor *link_collection_editor; GtkTreeIter iter; link_collection_editor = AGS_LINK_COLLECTION_EDITOR(applicable); if(gtk_combo_box_get_active_iter(link_collection_editor->link, &iter)){ AgsWindow *window; AgsMachine *machine, *link_machine; AgsMachineEditor *machine_editor; AgsAudio *audio; AgsChannel *channel, *link; AgsLinkChannel *link_channel; GtkTreeModel *model; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GList *task; guint first_line, count; guint i; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; machine_editor = AGS_MACHINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(link_collection_editor), AGS_TYPE_MACHINE_EDITOR)); machine = machine_editor->machine; audio = machine->audio; /* get window and application_context */ window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get first line */ first_line = (guint) gtk_spin_button_get_value_as_int(link_collection_editor->first_line); if(g_type_is_a(link_collection_editor->channel_type, AGS_TYPE_INPUT)){ pthread_mutex_lock(audio_mutex); channel = audio->input; pthread_mutex_unlock(audio_mutex); channel = ags_channel_nth(channel, first_line); }else{ pthread_mutex_lock(audio_mutex); channel = audio->output; pthread_mutex_unlock(audio_mutex); channel = ags_channel_nth(channel, first_line); } model = gtk_combo_box_get_model(link_collection_editor->link); gtk_tree_model_get(model, &iter, 1, &link_machine, -1); task = NULL; count = (guint) gtk_spin_button_get_value_as_int(link_collection_editor->count); error = NULL; if(link_machine == NULL){ for(i = 0; i < count; i++){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* create task */ link_channel = ags_link_channel_new(channel, NULL); task = g_list_prepend(task, link_channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* append AgsLinkChannel */ task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); }else{ guint first_link; pthread_mutex_t *link_audio_mutex; pthread_mutex_t *link_mutex; first_link = (guint) gtk_spin_button_get_value_as_int(link_collection_editor->first_link); /* lookup link's audio mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); link_audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link_machine->audio); pthread_mutex_unlock(application_mutex); /* get link */ pthread_mutex_lock(link_audio_mutex); if(g_type_is_a(link_collection_editor->channel_type, AGS_TYPE_INPUT)){ link = link_machine->audio->output; }else{ link = link_machine->audio->input; } pthread_mutex_unlock(link_audio_mutex); link = ags_channel_nth(link, first_link); for(i = 0; i < count; i++){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* lookup link mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* create task */ link_channel = ags_link_channel_new(channel, link); task = g_list_prepend(task, link_channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); pthread_mutex_lock(link_mutex); link = link->next; pthread_mutex_unlock(link_mutex); } task = g_list_reverse(task); ags_gui_thread_schedule_task_list(gui_thread, task); } } } void ags_link_collection_editor_reset(AgsApplicable *applicable) { /* empty */ } /** * ags_link_collection_editor_check: * @link_collection_editor: the #AgsLinkCollectionEditor * * Checks for possible channels to link. And modifies its ranges. * * Since: 1.0.0 */ void ags_link_collection_editor_check(AgsLinkCollectionEditor *link_collection_editor) { GtkTreeIter iter; if(gtk_combo_box_get_active_iter(link_collection_editor->link, &iter)){ AgsMachine *link_machine; AgsMachineEditor *machine_editor; GtkTreeModel *model; gdouble first_line, first_line_stop, first_line_range; gdouble first_link, first_link_stop, first_link_range; gdouble max; first_line = gtk_spin_button_get_value(link_collection_editor->first_line); machine_editor = AGS_MACHINE_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(link_collection_editor), AGS_TYPE_MACHINE_EDITOR)); if(link_collection_editor->channel_type == AGS_TYPE_INPUT) first_line_stop = (gdouble) machine_editor->machine->audio->input_lines; else first_line_stop = (gdouble) machine_editor->machine->audio->output_lines; /* link machine */ first_link = gtk_spin_button_get_value(link_collection_editor->first_link); model = gtk_combo_box_get_model(link_collection_editor->link); gtk_tree_model_get(model, &iter, 1, &link_machine, -1); first_line_range = first_line_stop - first_line; if(link_machine != NULL){ if(link_collection_editor->channel_type == AGS_TYPE_INPUT) first_link_stop = (gdouble) link_machine->audio->output_lines; else first_link_stop = (gdouble) link_machine->audio->input_lines; first_link_range = first_link_stop - first_link; if(first_line_range > first_link_range) max = first_link_range; else max = first_line_range; }else{ first_link_stop = 0.0; max = first_line_range; } gtk_spin_button_set_range(link_collection_editor->first_line, 0.0, first_line_stop - 1.0); if(link_machine == NULL) gtk_spin_button_set_range(link_collection_editor->first_link, 0.0, 0.0); else gtk_spin_button_set_range(link_collection_editor->first_link, 0.0, first_link_stop - 1.0); gtk_spin_button_set_range(link_collection_editor->count, 0.0, max); }else{ gtk_spin_button_set_range(link_collection_editor->count, -1.0, -1.0); } } /** * ags_link_collection_editor_new: * @channel_type: either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT * * Creates an #AgsLinkCollectionEditor * * Returns: a new #AgsLinkCollectionEditor * * Since: 1.0.0 */ AgsLinkCollectionEditor* ags_link_collection_editor_new(GType channel_type) { AgsLinkCollectionEditor *link_collection_editor; link_collection_editor = (AgsLinkCollectionEditor *) g_object_new(AGS_TYPE_LINK_COLLECTION_EDITOR, "channel_type", channel_type, NULL); return(link_collection_editor); } gsequencer-1.4.24/ags/X/ags_wave_editor_callbacks.c0000644000175000017500000000222713247044247017164 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_wave_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsWaveEditor *wave_editor) { if(old_parent != NULL){ return; } } void ags_wave_editor_machine_changed_callback(AgsMachineSelector *machine_selector, AgsMachine *machine, AgsWaveEditor *wave_editor) { ags_wave_editor_machine_changed(wave_editor, machine); } gsequencer-1.4.24/ags/X/ags_line_member.c0000644000175000017500000012104013256163135015124 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_line_member_class_init(AgsLineMemberClass *line_member); void ags_line_member_connectable_interface_init(AgsConnectableInterface *connectable); void ags_line_member_init(AgsLineMember *line_member); void ags_line_member_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_line_member_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_line_member_connect(AgsConnectable *connectable); void ags_line_member_disconnect(AgsConnectable *connectable); void ags_line_member_finalize(GObject *gobject); void ags_line_member_real_change_port(AgsLineMember *line_member, gpointer port_data); GList* ags_line_member_real_find_port(AgsLineMember *line_member); /** * SECTION:ags_line_member * @short_description: Modify assigned recall's port * @title: AgsLineMember * @section_id: * @include: ags/X/ags_line_member.h * * #AgsLineMember is a composite widget to modify ports of recalls. A line member * controls only one specific port of a recall but distinguishes between simple/complex * recall. It is generally packed into a #AgsLine. */ enum{ CHANGE_PORT, FIND_PORT, LAST_SIGNAL, }; enum{ PROP_0, PROP_WIDGET_TYPE, PROP_WIDGET_LABEL, PROP_PLUGIN_NAME, PROP_FILENAME, PROP_EFFECT, PROP_SPECIFIER, PROP_CONTROL_PORT, PROP_STEPS, PROP_PORT, PROP_PORT_DATA, PROP_RECALL_PORT, PROP_RECALL_PORT_DATA, PROP_TASK_TYPE, }; static gpointer ags_line_member_parent_class = NULL; static guint line_member_signals[LAST_SIGNAL]; GType ags_line_member_get_type(void) { static GType ags_type_line_member = 0; if(!ags_type_line_member){ static const GTypeInfo ags_line_member_info = { sizeof(AgsLineMemberClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_line_member_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsLineMember), 0, /* n_preallocs */ (GInstanceInitFunc) ags_line_member_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_line_member_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_line_member = g_type_register_static(GTK_TYPE_FRAME, "AgsLineMember", &ags_line_member_info, 0); g_type_add_interface_static(ags_type_line_member, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_line_member); } void ags_line_member_class_init(AgsLineMemberClass *line_member) { GObjectClass *gobject; GParamSpec *param_spec; ags_line_member_parent_class = g_type_class_peek_parent(line_member); /* GObjectClass */ gobject = G_OBJECT_CLASS(line_member); gobject->set_property = ags_line_member_set_property; gobject->get_property = ags_line_member_get_property; gobject->finalize = ags_line_member_finalize; /* properties */ /** * AgsLineMember:widget-type: * * The widget type to instantiate and use as control. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("widget-type", i18n_pspec("widget type of line member"), i18n_pspec("The widget type this line member packs"), 0, G_MAXULONG, G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_WIDGET_TYPE, param_spec); /** * AgsLineMember:widget-label: * * The widget's label to use. * * Since: 1.0.0 */ param_spec = g_param_spec_string("widget-label", i18n_pspec("label to display"), i18n_pspec("The label to display"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_WIDGET_LABEL, param_spec); /** * AgsLineMember:plugin-name: * * The plugin name of the recall to use. * * Since: 1.0.0 */ param_spec = g_param_spec_string("plugin-name", i18n_pspec("plugin name to control"), i18n_pspec("The plugin's name to control"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLUGIN_NAME, param_spec); /** * AgsLineMember:filename: * * The plugin filename of the recall to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the filename"), i18n_pspec("The filename of the plugin"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsLineMember:effect: * * The plugin effect of the recall to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect of the plugin"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsLineMember:specifier: * * The plugin specifier of the recall to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_string("specifier", i18n_pspec("port specifier"), i18n_pspec("The specifier of the port"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SPECIFIER, param_spec); /** * AgsLineMember:control-port: * * The control port of the recall. * * Since: 1.0.0 */ param_spec = g_param_spec_string("control-port", i18n_pspec("control port index"), i18n_pspec("The index of the port to control"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTROL_PORT, param_spec); /** * AgsLineMember:steps: * * If line member has integer ports, this is the number of steps. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("steps", i18n_pspec("steps of line members port"), i18n_pspec("The steps this line members port has"), 0, G_MAXUINT, AGS_DIAL_DEFAULT_PRECISION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STEPS, param_spec); /** * AgsLineMember:port: * * The matching simple port of plugin name and specifier. * * Since: 1.0.0 */ param_spec = g_param_spec_object("port", i18n_pspec("port to apply"), i18n_pspec("The port to apply"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT, param_spec); /** * AgsLineMember:port-data: * * The port data to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("port-data", i18n_pspec("port data"), i18n_pspec("The port data"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT_DATA, param_spec); /** * AgsLineMember:recall-port: * * The matching complex port of plugin name and specifier. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-port", i18n_pspec("recall port to apply"), i18n_pspec("The recall port to apply"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_PORT, param_spec); /** * AgsLineMember:recall-port-data: * * The complex port data to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("recall-port-data", i18n_pspec("recall port data"), i18n_pspec("The recall port data"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_PORT_DATA, param_spec); /** * AgsLineMember:task-type: * * The task type to apply the port. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("task-type", i18n_pspec("task type to apply"), i18n_pspec("The task type to apply the port"), 0, G_MAXULONG, G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TASK_TYPE, param_spec); /* AgsLineMember */ line_member->change_port = ags_line_member_real_change_port; line_member->find_port = ags_line_member_real_find_port; /* signals */ /** * AgsLineMember::change-port: * @line_member: the #AgsLineMember * @port_data: the port's data * * The ::change-port signal notifies modified port. */ line_member_signals[CHANGE_PORT] = g_signal_new("change-port", G_TYPE_FROM_CLASS(line_member), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLineMemberClass, change_port), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsLine_Member::find-port: * @line_member: the #AgsLineMember to resize * Returns: a #GList with associated ports * * The ::find-port retrieves all associated ports */ line_member_signals[FIND_PORT] = g_signal_new("find-port", G_TYPE_FROM_CLASS(line_member), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsLineMemberClass, find_port), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); } void ags_line_member_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_line_member_connect; connectable->disconnect = ags_line_member_disconnect; } void ags_line_member_init(AgsLineMember *line_member) { AgsDial *dial; g_signal_connect_after((GObject *) line_member, "parent_set", G_CALLBACK(ags_line_member_parent_set_callback), (gpointer) line_member); line_member->flags = (AGS_LINE_MEMBER_RESET_BY_ATOMIC | AGS_LINE_MEMBER_APPLY_RECALL); line_member->port_flags = 0; line_member->widget_type = AGS_TYPE_DIAL; dial = (AgsDial *) g_object_new(AGS_TYPE_DIAL, "adjustment", gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0), NULL); gtk_container_add(GTK_CONTAINER(line_member), (GtkWidget *) dial); line_member->widget_label = NULL; line_member->filename = NULL; line_member->effect = NULL; line_member->plugin_name = NULL; line_member->specifier = NULL; line_member->control_port = NULL; line_member->steps = 0; line_member->conversion = NULL; line_member->port = NULL; line_member->port_data = NULL; line_member->active = FALSE; line_member->recall_port = NULL; line_member->recall_port_data = NULL; line_member->recall_active = FALSE; line_member->task_type = G_TYPE_NONE; } void ags_line_member_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLineMember *line_member; line_member = AGS_LINE_MEMBER(gobject); switch(prop_id){ case PROP_WIDGET_TYPE: { GtkWidget *child, *new_child; GtkAdjustment *adjustment; GType widget_type; gboolean active; //TODO:JK: verify me widget_type = g_value_get_ulong(value); if(widget_type == line_member->widget_type){ return; } child = gtk_bin_get_child(GTK_BIN(line_member)); /* preserver previous range */ adjustment = NULL; active = FALSE; if(GTK_IS_RANGE(child)){ adjustment = GTK_RANGE(child)->adjustment; }else if(GTK_IS_SPIN_BUTTON(child)){ adjustment = GTK_SPIN_BUTTON(child)->adjustment; }else if(AGS_IS_DIAL(child)){ adjustment = AGS_DIAL(child)->adjustment; }else if(GTK_IS_TOGGLE_BUTTON(child)){ active = gtk_toggle_button_get_active((GtkToggleButton *) child); } if(adjustment != NULL){ g_object_ref(adjustment); } /* destroy old */ if(child != NULL){ gtk_widget_destroy(child); } line_member->widget_type = widget_type; new_child = (GtkWidget *) g_object_new(widget_type, NULL); if(AGS_IS_DIAL(new_child)){ AgsDial *dial; dial = (AgsDial *) new_child; gtk_widget_set_size_request((GtkWidget *) dial, 2 * (dial->radius + dial->outline_strength + dial->button_width + 4), 2 * (dial->radius + dial->outline_strength + 1)); } /* set range */ if(GTK_IS_RANGE(new_child)){ gtk_adjustment_set_lower(GTK_RANGE(new_child)->adjustment, adjustment->lower); gtk_adjustment_set_upper(GTK_RANGE(new_child)->adjustment, adjustment->upper); gtk_adjustment_set_value(GTK_RANGE(new_child)->adjustment, adjustment->value); }else if(GTK_IS_SPIN_BUTTON(new_child)){ gtk_adjustment_set_lower(GTK_SPIN_BUTTON(new_child)->adjustment, adjustment->lower); gtk_adjustment_set_upper(GTK_SPIN_BUTTON(new_child)->adjustment, adjustment->upper); gtk_adjustment_set_value(GTK_SPIN_BUTTON(new_child)->adjustment, adjustment->value); }else if(AGS_IS_DIAL(new_child)){ gtk_adjustment_set_lower(AGS_DIAL(new_child)->adjustment, adjustment->lower); gtk_adjustment_set_upper(AGS_DIAL(new_child)->adjustment, adjustment->upper); gtk_adjustment_set_value(AGS_DIAL(new_child)->adjustment, adjustment->value); ags_dial_draw((AgsDial *) new_child); }else if(GTK_IS_TOGGLE_BUTTON(new_child)){ gtk_toggle_button_set_active((GtkToggleButton *) new_child, active); }else{ if(!(AGS_IS_INDICATOR(new_child) || AGS_IS_LED(new_child))){ g_warning("ags_line_member_set_property() - unknown child type %s", g_type_name(widget_type)); } } /* add */ gtk_container_add(GTK_CONTAINER(line_member), new_child); } break; case PROP_WIDGET_LABEL: { gchar *label; label = g_value_get_string(value); if(label == line_member->widget_label){ return; } if(line_member->widget_label != NULL){ g_free(line_member->widget_label); } line_member->widget_label = g_strdup(label); ags_line_member_set_label(line_member, line_member->widget_label); } break; case PROP_PLUGIN_NAME: { gchar *plugin_name; plugin_name = g_value_get_string(value); if(plugin_name == line_member->plugin_name){ return; } line_member->plugin_name = g_strdup(plugin_name); } break; case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(filename == line_member->filename){ return; } if(line_member->filename != NULL){ g_free(line_member->filename); } if(filename != NULL){ if(!g_file_test(filename, G_FILE_TEST_EXISTS)){ AgsWindow *window; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) line_member); ags_window_show_error(window, g_strdup_printf("Plugin file not present %s", filename)); } } line_member->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == line_member->effect){ return; } line_member->effect = g_strdup(effect); } break; case PROP_SPECIFIER: { gchar *specifier; specifier = g_value_get_string(value); if(specifier == line_member->specifier){ return; } line_member->specifier = g_strdup(specifier); } break; case PROP_CONTROL_PORT: { gchar *control_port; control_port = g_value_get_string(value); if(control_port == line_member->control_port){ return; } line_member->control_port = g_strdup(control_port); } break; case PROP_STEPS: { GtkWidget *child; guint steps; steps = g_value_get_uint(value); line_member->steps = steps; child = gtk_bin_get_child(GTK_BIN(line_member)); if(AGS_IS_DIAL(child)){ g_object_set(child, "scale-precision", steps, NULL); } } break; case PROP_PORT: { AgsPort *port; port = g_value_get_object(value); if(port == line_member->port){ return; } if(line_member->port != NULL){ g_object_unref(line_member->port); } if(port != NULL){ g_object_ref(port); if((AGS_PORT_INFINITE_RANGE & (port->flags)) != 0){ GtkWidget *child; child = gtk_bin_get_child(GTK_BIN(line_member)); //TODO:JK: add more types if(AGS_IS_DIAL(child)){ AGS_DIAL(child)->flags |= AGS_DIAL_SEEMLESS_MODE; } } } line_member->port = port; } break; case PROP_PORT_DATA: { gpointer port_data; port_data = g_value_get_pointer(value); if(port_data == line_member->port_data){ return; } line_member->port_data = port_data; } break; case PROP_RECALL_PORT: { AgsPort *port; port = g_value_get_object(value); if(port == line_member->recall_port){ return; } if(line_member->recall_port != NULL){ g_object_unref(line_member->recall_port); } if(port != NULL){ g_object_ref(port); } line_member->recall_port = port; } break; case PROP_RECALL_PORT_DATA: { gpointer port_data; port_data = g_value_get_pointer(value); if(port_data == line_member->recall_port_data){ return; } line_member->recall_port_data = port_data; } break; case PROP_TASK_TYPE: { GType type; type = g_value_get_ulong(value); if(line_member->task_type == type){ return; } line_member->task_type = type; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_line_member_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLineMember *line_member; line_member = AGS_LINE_MEMBER(gobject); switch(prop_id){ case PROP_WIDGET_TYPE: { g_value_set_ulong(value, line_member->widget_type); } break; case PROP_WIDGET_LABEL: { g_value_set_string(value, line_member->widget_label); } break; case PROP_PLUGIN_NAME: { g_value_set_string(value, line_member->plugin_name); } break; case PROP_FILENAME: { g_value_set_string(value, line_member->filename); } break; case PROP_EFFECT: { g_value_set_string(value, line_member->effect); } break; case PROP_SPECIFIER: { g_value_set_string(value, line_member->specifier); } break; case PROP_CONTROL_PORT: { g_value_set_string(value, line_member->control_port); } break; case PROP_PORT: { g_value_set_object(value, line_member->port); } break; case PROP_PORT_DATA: { g_value_set_pointer(value, line_member->port_data); } break; case PROP_RECALL_PORT: { g_value_set_object(value, line_member->port); } break; case PROP_RECALL_PORT_DATA: { g_value_set_pointer(value, line_member->port_data); } break; case PROP_TASK_TYPE: { g_value_set_ulong(value, line_member->task_type); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_line_member_connect(AgsConnectable *connectable) { AgsLineMember *line_member; GtkWidget *control; line_member = AGS_LINE_MEMBER(connectable); if((AGS_LINE_MEMBER_CONNECTED & (line_member->flags)) != 0){ return; } line_member->flags |= AGS_LINE_MEMBER_CONNECTED; ags_line_member_find_port(line_member); control = gtk_bin_get_child(GTK_BIN(line_member)); if((AGS_LINE_MEMBER_APPLY_INITIAL & (line_member->flags)) != 0){ GtkAdjustment *adjustment; gboolean is_toggled; adjustment = NULL; is_toggled = FALSE; if(AGS_IS_DIAL(control)){ adjustment = AGS_DIAL(control)->adjustment; }else if(GTK_IS_RANGE(control)){ adjustment = GTK_RANGE(control)->adjustment; }else if(GTK_IS_SPIN_BUTTON(control)){ adjustment = GTK_SPIN_BUTTON(control)->adjustment; }else if(GTK_IS_TOGGLE_BUTTON(control)){ line_member->active = gtk_toggle_button_get_active((GtkToggleButton *) control); is_toggled = TRUE; } if(is_toggled){ ags_line_member_change_port(line_member, &(line_member->active)); }else if(adjustment != NULL){ ags_line_member_change_port(line_member, &(adjustment->value)); } line_member->flags &= (~AGS_LINE_MEMBER_APPLY_INITIAL); } /* widget callback */ if(line_member->widget_type == AGS_TYPE_DIAL){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_line_member_dial_changed_callback), line_member); }else if(line_member->widget_type == GTK_TYPE_VSCALE){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_line_member_vscale_changed_callback), line_member); }else if(line_member->widget_type == GTK_TYPE_HSCALE){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_line_member_hscale_changed_callback), line_member); }else if(line_member->widget_type == GTK_TYPE_SPIN_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "value-changed", G_CALLBACK(ags_line_member_spin_button_changed_callback), line_member); }else if(line_member->widget_type == GTK_TYPE_CHECK_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "clicked", G_CALLBACK(ags_line_member_check_button_clicked_callback), line_member); }else if(line_member->widget_type == GTK_TYPE_TOGGLE_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "clicked", G_CALLBACK(ags_line_member_toggle_button_clicked_callback), line_member); }else if(line_member->widget_type == GTK_TYPE_BUTTON){ g_signal_connect_after(GTK_WIDGET(control), "clicked", G_CALLBACK(ags_line_member_button_clicked_callback), line_member); } /* port callback */ if((AGS_LINE_MEMBER_PLAY_CALLBACK_WRITE & (line_member->flags)) != 0 && line_member->port != NULL){ g_signal_connect_after(line_member->port, "safe-write", G_CALLBACK(ags_line_member_port_safe_write_callback), line_member); } if((AGS_LINE_MEMBER_RECALL_CALLBACK_WRITE & (line_member->flags)) != 0 && line_member->recall_port != NULL){ g_signal_connect_after(line_member->recall_port, "safe-write", G_CALLBACK(ags_line_member_port_safe_write_callback), line_member); } } void ags_line_member_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_line_member_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_line_member_parent_class)->finalize(gobject); } GtkWidget* ags_line_member_get_widget(AgsLineMember *line_member) { return(gtk_bin_get_child(GTK_BIN(line_member))); } /** * ags_line_member_set_label: * @line_member: an #AgsLineMember * @label: the label of the control * * Modify the label of the line member. */ void ags_line_member_set_label(AgsLineMember *line_member, gchar *label) { GtkWidget *child_widget; if(g_type_is_a(line_member->widget_type, GTK_TYPE_BUTTON)){ child_widget = gtk_bin_get_child(GTK_BIN(line_member)); g_object_set(G_OBJECT(child_widget), "label", label, NULL); }else{ gtk_frame_set_label_widget((GtkFrame *) line_member, g_object_new(GTK_TYPE_LABEL, "wrap", TRUE, "wrap-mode", PANGO_WRAP_CHAR, "use-markup", TRUE, "label", g_markup_printf_escaped("%s", label), NULL)); } line_member->widget_label = label; } void ags_line_member_real_change_port(AgsLineMember *line_member, gpointer port_data) { if((AGS_LINE_MEMBER_RESET_BY_ATOMIC & (line_member->flags)) != 0){ AgsPort *port; GValue value = {0,}; port = line_member->port; if(port == NULL){ g_warning("ags_line_member_change_port() - no port available"); return; } pthread_mutex_lock(port->mutex); if(!port->port_value_is_pointer){ if(port->port_value_type == G_TYPE_BOOLEAN){ g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, ((gboolean *) port_data)[0]); }else if(port->port_value_type == G_TYPE_INT64){ g_value_init(&value, G_TYPE_INT64); g_value_set_int64(&value, ((gint *) port_data)[0]); }else if(port->port_value_type == G_TYPE_UINT64){ g_value_init(&value, G_TYPE_UINT64); g_value_set_uint64(&value, ((guint *) port_data)[0]); }else if(port->port_value_type == G_TYPE_FLOAT){ gfloat val; if(GTK_IS_TOGGLE_BUTTON(gtk_bin_get_child((GtkBin *) line_member))){ if(((gboolean *) port_data)[0]){ val = 1.0; }else{ val = 0.0; } }else{ val = ((gdouble *) port_data)[0]; } if(line_member->conversion != NULL){ gfloat upper, lower, range, step; gfloat c_upper, c_lower, c_range; gboolean success; success = FALSE; if(AGS_IS_DIAL(gtk_bin_get_child((GtkBin *) line_member))){ AgsDial *dial; dial = (AgsDial *) gtk_bin_get_child((GtkBin *) line_member); upper = dial->adjustment->upper; lower = dial->adjustment->lower; success = TRUE; }else if(GTK_IS_RANGE(gtk_bin_get_child((GtkBin *) line_member))){ GtkRange *range; range = (GtkRange *) gtk_bin_get_child((GtkBin *) line_member); upper = range->adjustment->upper; lower = range->adjustment->lower; success = TRUE; }else if(GTK_IS_SPIN_BUTTON(gtk_bin_get_child((GtkBin *) line_member))){ GtkSpinButton *spin_button; spin_button = (GtkSpinButton *) gtk_bin_get_child((GtkBin *) line_member); upper = spin_button->adjustment->upper; lower = spin_button->adjustment->lower; success = TRUE; }else{ g_warning("unsupported child type in conversion"); } if(success){ range = upper - lower; step = range / val; val = ags_conversion_convert(line_member->conversion, val, FALSE); c_upper = ags_conversion_convert(line_member->conversion, upper, FALSE); c_lower = ags_conversion_convert(line_member->conversion, lower, FALSE); c_range = c_upper - c_lower; val = ags_conversion_convert(line_member->conversion, c_lower + (c_range / step), TRUE); } } g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, (gfloat) val); }else if(port->port_value_type == G_TYPE_DOUBLE){ gdouble val; if(GTK_IS_TOGGLE_BUTTON(gtk_bin_get_child((GtkBin *) line_member))){ if(((gboolean *) port_data)[0]){ val = 1.0; }else{ val = 0.0; } }else{ val = ((gdouble *) port_data)[0]; } if(line_member->conversion != NULL){ gdouble upper, lower, range, step; gdouble c_upper, c_lower, c_range; gboolean success; success = FALSE; if(AGS_IS_DIAL(gtk_bin_get_child((GtkBin *) line_member))){ AgsDial *dial; dial = (AgsDial *) gtk_bin_get_child((GtkBin *) line_member); upper = dial->adjustment->upper; lower = dial->adjustment->lower; success = TRUE; }else if(GTK_IS_RANGE(gtk_bin_get_child((GtkBin *) line_member))){ GtkRange *range; range = (GtkRange *) gtk_bin_get_child((GtkBin *) line_member); upper = range->adjustment->upper; lower = range->adjustment->lower; success = TRUE; }else if(GTK_IS_SPIN_BUTTON(gtk_bin_get_child((GtkBin *) line_member))){ GtkSpinButton *spin_button; spin_button = (GtkSpinButton *) gtk_bin_get_child((GtkBin *) line_member); upper = spin_button->adjustment->upper; lower = spin_button->adjustment->lower; success = TRUE; }else{ g_warning("unsupported child type in conversion"); } if(success){ range = upper - lower; step = range / val; val = ags_conversion_convert(line_member->conversion, val, FALSE); c_upper = ags_conversion_convert(line_member->conversion, upper, FALSE); c_lower = ags_conversion_convert(line_member->conversion, lower, FALSE); c_range = c_upper - c_lower; val = ags_conversion_convert(line_member->conversion, c_lower + (c_range / step), TRUE); } } g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, val); } }else{ if(port->port_value_type == G_TYPE_OBJECT){ g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, port_data); }else{ if(port->port_value_type == G_TYPE_BOOLEAN || port->port_value_type == G_TYPE_INT64 || port->port_value_type == G_TYPE_UINT64 || port->port_value_type == G_TYPE_FLOAT || port->port_value_type == G_TYPE_DOUBLE || port->port_value_type == G_TYPE_POINTER){ g_value_init(&value, G_TYPE_POINTER); g_value_set_pointer(&value, port_data); } } } pthread_mutex_unlock(port->mutex); ags_port_safe_write(line_member->port, &value); if((AGS_LINE_MEMBER_APPLY_RECALL & (line_member->flags)) != 0){ ags_port_safe_write(line_member->recall_port, &value); } } if((AGS_LINE_MEMBER_RESET_BY_TASK & (line_member->flags)) != 0){ AgsWindow *window; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsTask *task; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) line_member, AGS_TYPE_WINDOW); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); task = (AgsTask *) g_object_new(line_member->task_type, line_member->control_port, port_data, NULL); ags_gui_thread_schedule_task(gui_thread, task); } } /** * ags_line_change_port: * @line_member: an #AgsLineMember * @port_data: the port's value * * Is emitted as port's value is modified. * * Since: 1.0.0 */ void ags_line_member_change_port(AgsLineMember *line_member, gpointer port_data) { g_return_if_fail(AGS_IS_LINE_MEMBER(line_member)); g_object_ref((GObject *) line_member); g_signal_emit(G_OBJECT(line_member), line_member_signals[CHANGE_PORT], 0, port_data); g_object_unref((GObject *) line_member); } GList* ags_line_member_real_find_port(AgsLineMember *line_member) { AgsMachine *machine; GtkWidget *parent; AgsAudio *audio; AgsChannel *channel; AgsPort *audio_port, *channel_port; AgsPort *recall_audio_port, *recall_channel_port; GList *recall; GList *port; gchar *specifier; auto AgsPort* ags_line_member_find_specifier(GList *recall); AgsPort* ags_line_member_find_specifier(GList *recall){ GList *port; while(recall != NULL){ if((AGS_RECALL_BULK_MODE & (AGS_RECALL(recall->data)->flags)) != 0){ recall = recall->next; continue; } port = AGS_RECALL(recall->data)->port; #ifdef AGS_DEBUG g_message("search port in %s", G_OBJECT_TYPE_NAME(recall->data)); #endif while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, specifier)){ return(AGS_PORT(port->data)); } port = port->next; } recall = recall->next; } return(NULL); } if(line_member == NULL){ return(NULL); } specifier = line_member->specifier; if(!AGS_IS_LINE_MEMBER(line_member) || specifier == NULL){ return(NULL); } machine = (AgsMachine *) gtk_widget_get_ancestor(GTK_WIDGET(line_member), AGS_TYPE_MACHINE); parent = gtk_widget_get_ancestor(GTK_WIDGET(line_member), AGS_TYPE_LINE); audio = machine->audio; if(parent != NULL){ channel = AGS_LINE(parent)->channel; }else{ parent = gtk_widget_get_ancestor(GTK_WIDGET(line_member), AGS_TYPE_EFFECT_LINE); if(parent != NULL){ channel = AGS_EFFECT_LINE(parent)->channel; }else{ return(NULL); } } audio_port = NULL; channel_port = NULL; recall_audio_port = NULL; recall_channel_port = NULL; port = NULL; /* search channels */ recall = channel->play; channel_port = ags_line_member_find_specifier(recall); recall = channel->recall; recall_channel_port = ags_line_member_find_specifier(recall); if(channel_port != NULL){ port = g_list_prepend(port, channel_port); } if(recall_channel_port != NULL){ port = g_list_prepend(port, recall_channel_port); } /* search audio */ if(channel_port == NULL && recall_channel_port == NULL){ recall = audio->play; audio_port = ags_line_member_find_specifier(recall); recall = audio->recall; recall_audio_port = ags_line_member_find_specifier(recall); if(audio_port != NULL){ port = g_list_prepend(port, audio_port); } if(recall_audio_port != NULL){ port = g_list_prepend(port, recall_audio_port); } } if(channel_port != NULL || recall_channel_port != NULL){ g_object_set(G_OBJECT(line_member), "port", channel_port, NULL); g_object_set(G_OBJECT(line_member), "recall-port", recall_channel_port, NULL); }else if(audio_port != NULL || recall_audio_port != NULL){ g_object_set(G_OBJECT(line_member), "port", audio_port, NULL); g_object_set(G_OBJECT(line_member), "recall-port", recall_audio_port, NULL); } return(port); } /** * ags_line_member_find_port: * @line_member: an #AgsLineMember * * Lookup ports of assigned recalls. * * Returns: an #GList containing all related #AgsPort * * Since: 1.0.0 */ GList* ags_line_member_find_port(AgsLineMember *line_member) { GList *list; list = NULL; g_return_val_if_fail(AGS_IS_LINE_MEMBER(line_member), NULL); g_object_ref((GObject *) line_member); g_signal_emit((GObject *) line_member, line_member_signals[FIND_PORT], 0, &list); g_object_unref((GObject *) line_member); return(list); } /** * ags_line_member_chained_event: * @line_member: an #AgsLineMember * * Chain changed control and apply the very same value to grouped * controls if sticky controls set. * * Since: 1.0.0 */ void ags_line_member_chained_event(AgsLineMember *line_member) { AgsMachine *machine; if(!AGS_IS_LINE_MEMBER(line_member) || (AGS_LINE_MEMBER_BLOCK_CHAINED & (line_member->flags)) != 0){ return; } machine = gtk_widget_get_ancestor(line_member, AGS_TYPE_MACHINE); if((AGS_MACHINE_STICKY_CONTROLS & (machine->flags)) != 0){ AgsPad *pad; AgsEffectPad *effect_pad; GtkWidget *child_widget; GtkAdjustment *adjustment; gboolean is_active; pad = gtk_widget_get_ancestor(line_member, AGS_TYPE_PAD); effect_pad = gtk_widget_get_ancestor(line_member, AGS_TYPE_EFFECT_PAD); is_active = FALSE; child_widget = gtk_bin_get_child(line_member); if(AGS_IS_DIAL(child_widget) || GTK_IS_SPIN_BUTTON(child_widget) || GTK_IS_SCALE(child_widget)){ g_object_get(gtk_bin_get_child(line_member), "adjustment", &adjustment, NULL); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ is_active = gtk_toggle_button_get_active(gtk_bin_get_child(line_member)); } if(pad != NULL){ AgsLine *line; GList *list_line, *list_line_start; GList *list_line_member, *list_line_member_start; line = gtk_widget_get_ancestor(line_member, AGS_TYPE_LINE); list_line = list_line_start = gtk_container_get_children(GTK_CONTAINER(pad->expander_set)); while((list_line = ags_line_find_next_grouped(list_line)) != NULL){ if(list_line->data != line){ list_line_member = list_line_member_start = gtk_container_get_children((GtkContainer *) AGS_LINE(list_line->data)->expander->table); while(list_line_member != NULL){ if(!g_strcmp0(line_member->specifier, AGS_LINE_MEMBER(list_line_member->data)->specifier)){ AGS_LINE_MEMBER(list_line_member->data)->flags |= AGS_LINE_MEMBER_BLOCK_CHAINED; child_widget = gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data)); if(AGS_IS_DIAL(child_widget)){ ags_dial_set_value(gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data)), adjustment->value); }else if(GTK_IS_SPIN_BUTTON(child_widget)){ gtk_spin_button_set_value(gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data)), adjustment->value); }else if(GTK_IS_SCALE(child_widget)){ gtk_range_set_value(gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data)), adjustment->value); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active(gtk_bin_get_child(list_line_member->data), is_active); }else if(GTK_IS_BUTTON(child_widget)){ gtk_button_clicked(gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data))); } AGS_LINE_MEMBER(list_line_member->data)->flags &= (~AGS_LINE_MEMBER_BLOCK_CHAINED); break; } list_line_member = list_line_member->next; } g_list_free(list_line_member_start); } list_line = list_line->next; } g_list_free(list_line_start); }else if(effect_pad != NULL){ AgsEffectLine *effect_line; GList *list_effect_line, *list_effect_line_start; GList *list_line_member, *list_line_member_start; effect_line = gtk_widget_get_ancestor(line_member, AGS_TYPE_EFFECT_LINE); list_effect_line = list_effect_line_start = gtk_container_get_children(GTK_CONTAINER(effect_pad->table)); while((list_effect_line = ags_effect_line_find_next_grouped(list_effect_line)) != NULL){ if(list_effect_line->data != effect_line){ list_line_member = list_line_member_start = gtk_container_get_children((GtkContainer *) AGS_EFFECT_LINE(list_effect_line->data)->table); while(list_line_member != NULL){ if(!g_strcmp0(line_member->specifier, AGS_LINE_MEMBER(list_line_member->data)->specifier)){ AGS_LINE_MEMBER(list_line_member->data)->flags |= AGS_LINE_MEMBER_BLOCK_CHAINED; child_widget = gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data)); if(AGS_IS_DIAL(child_widget)){ ags_dial_set_value(gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data)), adjustment->value); }else if(GTK_IS_SPIN_BUTTON(child_widget)){ gtk_spin_button_set_value(gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data)), adjustment->value); }else if(GTK_IS_SCALE(child_widget)){ gtk_range_set_value(gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data)), adjustment->value); }else if(GTK_IS_TOGGLE_BUTTON(child_widget)){ gtk_toggle_button_set_active(gtk_bin_get_child(list_line_member->data), is_active); }else if(GTK_IS_BUTTON(child_widget)){ gtk_button_clicked(gtk_bin_get_child(AGS_LINE_MEMBER(list_line_member->data))); } AGS_LINE_MEMBER(list_line_member->data)->flags &= (~AGS_LINE_MEMBER_BLOCK_CHAINED); break; } list_line_member = list_line_member->next; } g_list_free(list_line_member_start); } list_effect_line = list_effect_line->next; } g_list_free(list_effect_line_start); } } } /** * ags_line_member_new: * * Creates an #AgsLineMember * * Returns: a new #AgsLineMember * * Since: 1.0.0 */ AgsLineMember* ags_line_member_new() { AgsLineMember *line_member; line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, NULL); return(line_member); } gsequencer-1.4.24/ags/X/ags_lv2_browser_callbacks.h0000644000175000017500000000227613246707333017134 00000000000000/* 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 . */ #ifndef __AGS_LV2_BROWSER_CALLBACKS_H__ #define __AGS_LV2_BROWSER_CALLBACKS_H__ #include #include #include #include void ags_lv2_browser_plugin_filename_callback(GtkComboBoxText *combo_box, AgsLv2Browser *lv2_browser); void ags_lv2_browser_plugin_uri_callback(GtkComboBoxText *combo_box, AgsLv2Browser *lv2_browser); #endif /*__AGS_LV2_BROWSER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_machine.c0000644000175000017500000020050513256163135014256 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_machine_class_init(AgsMachineClass *machine); void ags_machine_connectable_interface_init(AgsConnectableInterface *connectable); void ags_machine_plugin_interface_init(AgsPluginInterface *plugin); void ags_machine_init(AgsMachine *machine); void ags_machine_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_machine_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_machine_connect(AgsConnectable *connectable); void ags_machine_disconnect(AgsConnectable *connectable); gchar* ags_machine_get_version(AgsPlugin *plugin); void ags_machine_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_machine_get_build_id(AgsPlugin *plugin); void ags_machine_set_build_id(AgsPlugin *plugin, gchar *build_id); static void ags_machine_finalize(GObject *gobject); void ags_machine_show(GtkWidget *widget); void ags_machine_real_resize_audio_channels(AgsMachine *machine, guint new_size, guint old_size); void ags_machine_real_resize_pads(AgsMachine *machine, GType channel_type, guint new_size, guint old_size); void ags_machine_real_map_recall(AgsMachine *machine); GList* ags_machine_real_find_port(AgsMachine *machine); GtkMenu* ags_machine_popup_new(AgsMachine *machine); /** * SECTION:ags_machine * @short_description: visualize audio object. * @title: AgsMachine * @section_id: * @include: ags/X/ags_machine.h * * #AgsMachine is a composite widget to act as base class to visualize #AgsAudio. */ #define AGS_DEFAULT_MACHINE "ags-default-machine" enum{ RESIZE_AUDIO_CHANNELS, RESIZE_PADS, MAP_RECALL, FIND_PORT, DONE, LAST_SIGNAL, }; enum{ PROP_0, PROP_AUDIO, PROP_MACHINE_NAME, }; static gpointer ags_machine_parent_class = NULL; static guint machine_signals[LAST_SIGNAL]; GHashTable *ags_machine_message_monitor = NULL; GType ags_machine_get_type(void) { static GType ags_type_machine = 0; if(!ags_type_machine){ static const GTypeInfo ags_machine_info = { sizeof (AgsMachineClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_machine_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMachine), 0, /* n_preallocs */ (GInstanceInitFunc) ags_machine_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_machine_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_machine_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_machine = g_type_register_static(GTK_TYPE_HANDLE_BOX, "AgsMachine", &ags_machine_info, 0); g_type_add_interface_static(ags_type_machine, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_machine, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_machine); } void ags_machine_class_init(AgsMachineClass *machine) { GObjectClass *gobject; GtkWidgetClass *widget; GParamSpec *param_spec; ags_machine_parent_class = g_type_class_peek_parent(machine); /* GObjectClass */ gobject = (GObjectClass *) machine; gobject->set_property = ags_machine_set_property; gobject->get_property = ags_machine_get_property; gobject->finalize = ags_machine_finalize; /* properties */ /** * AgsMachine:audio: * * The assigned #AgsAudio to visualize. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("assigned audio"), i18n_pspec("The audio it is assigned to"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsMachine:machine-name: * * The machine's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("machine-name", i18n_pspec("machine name"), i18n_pspec("The machine's name"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MACHINE_NAME, param_spec); /* GtkWidgetClass */ widget = (GtkWidgetClass *) machine; widget->show = ags_machine_show; /* AgsMachineClass */ machine->resize_pads = ags_machine_real_resize_pads; machine->resize_audio_channels = ags_machine_real_resize_audio_channels; machine->map_recall = ags_machine_real_map_recall; machine->find_port = ags_machine_real_find_port; machine->done = NULL; /* signals */ /** * AgsMachine::resize-audio-channels: * @machine: the #AgsMachine to modify * @channel: the #AgsChannel to set * @new_size: the new size * @old_size: the old size * * The ::resize-audio-channels signal notifies about changed channel allocation within * audio. * * Since: 1.0.0 */ machine_signals[RESIZE_AUDIO_CHANNELS] = g_signal_new("resize-audio-channels", G_TYPE_FROM_CLASS(machine), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMachineClass, resize_audio_channels), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMachine::resize-pads: * @machine: the #AgsMachine to modify * @channel: the #AgsChannel to set * @channel_type: either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT * @new_size: the new size * @old_size: the old size * * The ::resize-pads signal notifies about changed channel allocation within * audio. * * Since: 1.0.0 */ machine_signals[RESIZE_PADS] = g_signal_new("resize-pads", G_TYPE_FROM_CLASS(machine), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMachineClass, resize_pads), NULL, NULL, g_cclosure_user_marshal_VOID__ULONG_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_ULONG, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMachine::map-recall: * @machine: the #AgsMachine * * The ::map-recall should be used to add the machine's default recall. * * Since: 1.0.0 */ machine_signals[MAP_RECALL] = g_signal_new("map-recall", G_TYPE_FROM_CLASS(machine), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMachineClass, map_recall), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsMachine::find-port: * @machine: the #AgsMachine to resize * Returns: a #GList with associated ports * * The ::find-port signal emits as recall should be mapped. * * Since: 1.0.0 */ machine_signals[FIND_PORT] = g_signal_new("find-port", G_TYPE_FROM_CLASS(machine), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMachineClass, find_port), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); /** * AgsMachine::done: * @machine: the #AgsMachine * @recall_id: the #AgsRecallID * * The ::done signal gets emited as audio stops playback. * * Since: 1.2.0 */ machine_signals[DONE] = g_signal_new("done", G_TYPE_FROM_CLASS(machine), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMachineClass, done), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_machine_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_machine_connect; connectable->disconnect = ags_machine_disconnect; } void ags_machine_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_machine_get_version; plugin->set_version = ags_machine_set_version; plugin->get_build_id = ags_machine_get_build_id; plugin->set_build_id = ags_machine_set_build_id; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->read = NULL; plugin->write = NULL; plugin->get_ports = NULL; } void ags_machine_init(AgsMachine *machine) { GtkVBox *vbox; GtkFrame *frame; if(ags_machine_message_monitor == NULL){ ags_machine_message_monitor = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } g_hash_table_insert(ags_machine_message_monitor, machine, ags_machine_message_monitor_timeout); g_timeout_add(1000 / 30, (GSourceFunc) ags_machine_message_monitor_timeout, (gpointer) machine); machine->machine_name = NULL; machine->version = AGS_MACHINE_DEFAULT_VERSION; machine->build_id = AGS_MACHINE_DEFAULT_BUILD_ID; machine->flags = 0; machine->file_input_flags = 0; machine->mapping_flags = 0; machine->connection_flags = 0; machine->output_pad_type = G_TYPE_NONE; machine->input_pad_type = G_TYPE_NONE; machine->bank_0 = 0; machine->bank_1 = 0; vbox = (GtkVBox *) gtk_vbox_new(FALSE, 0); frame = (GtkFrame *) gtk_frame_new(NULL); gtk_container_add((GtkContainer *) machine, (GtkWidget *) frame); machine->audio = ags_audio_new(NULL); g_object_ref(G_OBJECT(machine->audio)); machine->audio->flags |= AGS_AUDIO_CAN_NEXT_ACTIVE; machine->audio->machine = (GObject *) machine; /* AgsAudio related forwarded signals */ g_signal_connect_after(G_OBJECT(machine), "resize-audio-channels", G_CALLBACK(ags_machine_resize_audio_channels_callback), NULL); g_signal_connect_after(G_OBJECT(machine), "resize-pads", G_CALLBACK(ags_machine_resize_pads_callback), NULL); g_signal_connect_after(G_OBJECT(machine), "done", G_CALLBACK(ags_machine_done_callback), NULL); machine->play = NULL; machine->output = NULL; machine->selected_output_pad = NULL; machine->input = NULL; machine->selected_input_pad = NULL; machine->bridge = NULL; machine->port = NULL; machine->enabled_automation_port = NULL; machine->popup = ags_machine_popup_new(machine); g_object_ref(machine->popup); machine->menu_tool_button = (GtkMenuToolButton *) g_object_new(GTK_TYPE_MENU_TOOL_BUTTON, "label", "machine", "menu", machine->popup, NULL); gtk_frame_set_label_widget(frame, (GtkWidget *) machine->menu_tool_button); machine->properties = NULL; machine->rename = NULL; machine->connection_editor = NULL; machine->midi_dialog = NULL; machine->envelope_dialog = NULL; machine->application_context = NULL; } void ags_machine_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsWindow *window; AgsMachine *machine; machine = AGS_MACHINE(gobject); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; gboolean reset; audio = (AgsAudio *) g_value_get_object(value); reset = TRUE; if(machine->audio != NULL){ AgsSoundcard *soundcard; GList *pad; GList *list; /* remove from soundcard */ soundcard = AGS_SOUNDCARD(audio->soundcard); list = ags_soundcard_get_audio(soundcard); list = g_list_remove(list, G_OBJECT(audio)); ags_soundcard_set_audio(soundcard, list); audio->soundcard = NULL; g_object_unref(G_OBJECT(machine->audio)); if(audio == NULL){ /* destroy pad */ pad = gtk_container_get_children(machine->output); // pad = g_list_nth(pad, audio->output_pads); while(pad != NULL){ gtk_widget_destroy(pad->data); pad = pad->next; } pad = gtk_container_get_children(machine->input); // pad = g_list_nth(pad, audio->input_pads); while(pad != NULL){ gtk_widget_destroy(pad->data); pad = pad->next; } reset = FALSE; } } if(audio != NULL){ g_object_ref(G_OBJECT(audio)); machine->audio = audio; if(reset){ AgsChannel *input, *output; GList *pad; GList *line; guint i; /* set channel and resize for AgsOutput */ if(machine->output_pad_type != G_TYPE_NONE){ output = audio->output; pad = gtk_container_get_children(machine->output); i = 0; while(pad != NULL && output != NULL){ line = gtk_container_get_children(GTK_CONTAINER(AGS_PAD(pad->data)->expander_set)); ags_pad_resize_lines(AGS_PAD(pad->data), machine->output_line_type, audio->audio_channels, g_list_length(line)); g_object_set(G_OBJECT(pad->data), "channel", output, NULL); g_list_free(line); output = output->next_pad; pad = pad->next; i++; } if(output != NULL){ AgsPad *pad; /* add pad */ for(; i < audio->output_pads; i++){ pad = g_object_new(machine->output_pad_type, "channel", output, NULL); gtk_container_add(machine->output, GTK_WIDGET(pad)); ags_pad_resize_lines(pad, machine->output_line_type, audio->audio_channels, 0); } }else{ /* destroy pad */ pad = gtk_container_get_children(machine->output); pad = g_list_nth(pad, audio->output_pads); while(pad != NULL){ gtk_widget_destroy(pad->data); pad = pad->next; } } } /* set channel and resize for AgsOutput */ if(machine->input_pad_type != G_TYPE_NONE){ input = audio->input; pad = gtk_container_get_children(machine->input); i = 0; while(pad != NULL && input != NULL){ line = gtk_container_get_children(GTK_CONTAINER(AGS_PAD(pad->data)->expander_set)); ags_pad_resize_lines(AGS_PAD(pad->data), machine->input_line_type, audio->audio_channels, g_list_length(line)); g_object_set(G_OBJECT(pad->data), "channel", input, NULL); g_list_free(line); input = input->next_pad; pad = pad->next; i++; } if(input != NULL){ AgsPad *pad; /* add pad */ for(; i < audio->input_pads; i++){ pad = g_object_new(machine->input_pad_type, "channel", input, NULL); gtk_container_add(machine->input, GTK_WIDGET(pad)); ags_pad_resize_lines(pad, machine->input_line_type, audio->audio_channels, 0); } }else{ /* destroy pad */ pad = gtk_container_get_children(machine->input); pad = g_list_nth(pad, audio->input_pads); while(pad != NULL){ gtk_widget_destroy(pad->data); pad = pad->next; } } } }else{ AgsPad *pad; AgsChannel *channel; guint i; /* add pad */ if(machine->output_pad_type != G_TYPE_NONE){ channel = audio->output; for(i = 0; i < audio->output_pads; i++){ pad = g_object_new(machine->output_pad_type, "channel", channel, NULL); gtk_container_add(machine->output, GTK_WIDGET(pad)); ags_pad_resize_lines(pad, machine->output_line_type, audio->audio_channels, 0); channel = channel->next_pad; } } if(machine->input_pad_type != G_TYPE_NONE){ channel = audio->input; for(i = 0; i < audio->input_pads; i++){ pad = g_object_new(machine->input_pad_type, "channel", channel, NULL); gtk_container_add(machine->output, GTK_WIDGET(pad)); ags_pad_resize_lines(pad, machine->input_line_type, audio->audio_channels, 0); channel = channel->next_pad; } } } }else{ machine->audio = NULL; } } break; case PROP_MACHINE_NAME: { gchar *machine_name; gchar *str; machine_name = g_value_get_string(value); if(machine_name == machine->machine_name){ return; } if(machine->machine_name != NULL){ g_free(machine->machine_name); } machine->machine_name = g_strdup(machine_name); /* update UI */ str = g_strdup_printf("%s: %s", G_OBJECT_TYPE_NAME(machine), machine_name); g_object_set(machine->menu_tool_button, "label", str, NULL); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMachine *machine; machine = AGS_MACHINE(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, machine->audio); } break; case PROP_MACHINE_NAME: { g_value_set_string(value, machine->machine_name); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_machine_connect(AgsConnectable *connectable) { AgsMachine *machine; GList *list_start, *list; /* AgsMachine */ machine = AGS_MACHINE(connectable); if((AGS_MACHINE_CONNECTED & (machine->flags)) != 0){ return; } machine->flags |= AGS_MACHINE_CONNECTED; if((AGS_MACHINE_PREMAPPED_RECALL & (machine->flags)) == 0){ if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) == 0){ ags_machine_map_recall(machine); } }else{ // machine->flags &= ~AGS_MACHINE_PREMAPPED_RECALL; #ifdef AGS_DEBUG g_message("find port"); #endif ags_machine_find_port(machine); } if(machine->bridge != NULL){ ags_connectable_connect(AGS_CONNECTABLE(machine->bridge)); } if(machine->play != NULL){ g_signal_connect(G_OBJECT(machine->play), "clicked", G_CALLBACK(ags_machine_play_callback), (gpointer) machine); } /* GtkWidget */ // g_signal_connect(G_OBJECT (machine), "button_press_event", // G_CALLBACK(ags_machine_button_press_callback), (gpointer) machine); /* AgsPad - input */ if(machine->input != NULL){ list_start = list = gtk_container_get_children(GTK_CONTAINER(machine->input)); while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); } /* AgsPad - output */ if(machine->output != NULL){ list_start = list = gtk_container_get_children(GTK_CONTAINER(machine->output)); while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); } } void ags_machine_disconnect(AgsConnectable *connectable) { AgsMachine *machine; GList *list_start, *list; /* AgsMachine */ machine = AGS_MACHINE(connectable); if((AGS_MACHINE_CONNECTED & (machine->flags)) == 0){ return; } machine->flags &= (~AGS_MACHINE_CONNECTED); if(machine->bridge != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(machine->bridge)); } /* AgsPad - input */ if(machine->input != NULL){ list_start = list = gtk_container_get_children(GTK_CONTAINER(machine->input)); while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); } /* AgsPad - output */ if(machine->output != NULL){ list_start = list = gtk_container_get_children(GTK_CONTAINER(machine->output)); while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } g_list_free(list_start); } //TODO:JK: implement me g_signal_handlers_disconnect_by_data(machine->audio, machine); } gchar* ags_machine_get_version(AgsPlugin *plugin) { return(AGS_MACHINE(plugin)->version); } void ags_machine_set_version(AgsPlugin *plugin, gchar *version) { AGS_MACHINE(plugin)->version = version; //TODO:JK: implement me } gchar* ags_machine_get_build_id(AgsPlugin *plugin) { return(AGS_MACHINE(plugin)->build_id); } void ags_machine_set_build_id(AgsPlugin *plugin, gchar *build_id) { AGS_MACHINE(plugin)->build_id = build_id; //TODO:JK: implement me } static void ags_machine_finalize(GObject *gobject) { AgsMachine *machine; AgsAudio *audio; GObject *soundcard; AgsMutexManager *mutex_manager; GList *list, *list_start; char *str; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; machine = (AgsMachine *) gobject; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); soundcard = machine->audio->soundcard; soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* remove from soundcard */ if(soundcard_mutex != NULL){ pthread_mutex_lock(soundcard_mutex); } list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), g_list_remove(list, machine->audio)); if(soundcard_mutex != NULL){ pthread_mutex_unlock(soundcard_mutex); } /* remove message monitor */ g_hash_table_remove(ags_machine_message_monitor, machine); g_list_free_full(machine->enabled_automation_port, ags_machine_automation_port_free); //TODO:JK: better clean-up of audio if(machine->properties != NULL){ gtk_widget_destroy((GtkWidget *) machine->properties); } if(machine->rename != NULL){ gtk_widget_destroy((GtkWidget *) machine->rename); } if(machine->machine_name != NULL){ g_free(machine->machine_name); } audio = machine->audio; /* call parent */ G_OBJECT_CLASS(ags_machine_parent_class)->finalize(gobject); if(audio != NULL){ g_object_unref(G_OBJECT(audio)); } } void ags_machine_show(GtkWidget *widget) { AgsMachine *machine; AgsWindow *window; GtkFrame *frame; GTK_WIDGET_CLASS(ags_machine_parent_class)->show(widget); machine = (AgsMachine *) widget; GTK_WIDGET_CLASS(ags_machine_parent_class)->show(widget); window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) widget); frame = (GtkFrame *) gtk_container_get_children((GtkContainer *) machine)->data; gtk_widget_show_all((GtkWidget *) frame); } /** * ags_machine_automation_port_alloc: * @channel_type: the #GType of channel * @control_name: the control name as string * * Allocate #AgsMachineAutomationPort * * Returns: the new allocated #AgsMachineAutomationPort * * Since: 1.3.0 */ AgsMachineAutomationPort* ags_machine_automation_port_alloc(GType channel_type, gchar *control_name) { AgsMachineAutomationPort *automation_port; automation_port = (AgsMachineAutomationPort *) malloc(sizeof(AgsMachineAutomationPort)); automation_port->channel_type = channel_type; automation_port->control_name = g_strdup(control_name); return(automation_port); } /** * ags_machine_automation_port_free: * @automation_port: the #AgsAutomationPort * * Free @automation_port * * Since: 1.3.0 */ void ags_machine_automation_port_free(AgsMachineAutomationPort *automation_port) { g_free(automation_port->control_name); } /** * ags_machine_automation_port_find_channel_type_with_control_name: * @list: a #GList-struct containing #AgsAutomationPort * @channel_type: the #GType to match * @control_name: the control name as string to match * * Find #AgsAutomationPort by specifying channel type and control name. * * Returns: the matching #AgsAutomationPort or %NULL * * Since: 1.3.0 */ GList* ags_machine_automation_port_find_channel_type_with_control_name(GList *list, GType channel_type, gchar *control_name) { while(list != NULL){ if(AGS_MACHINE_AUTOMATION_PORT(list->data)->channel_type == channel_type && !g_strcmp0(AGS_MACHINE_AUTOMATION_PORT(list->data)->control_name, control_name)){ return(list); } list = list->next; } return(NULL); } void ags_machine_real_resize_audio_channels(AgsMachine *machine, guint audio_channels, guint audio_channels_old) { AgsAudio *audio; AgsChannel *channel; AgsMutexManager *mutex_manager; GList *list_output_pad, *list_output_pad_start; GList *list_input_pad, *list_input_pad_start; GList *list_output_pad_next, *list_output_pad_next_start; GList *list_input_pad_next, *list_input_pad_next_start; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; audio = machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); if(audio_channels > audio_channels_old){ /* grow lines */ AgsPad *pad; GList *list, *list_start; guint input_pads, output_pads; pthread_mutex_lock(audio_mutex); input_pads = audio->input_pads; output_pads = audio->output_pads; pthread_mutex_unlock(audio_mutex); if(machine->input != NULL){ list_input_pad_start = list_input_pad = g_list_reverse(gtk_container_get_children((GtkContainer *) machine->input)); }else{ list_input_pad_start = NULL; } if(machine->output != NULL){ list_output_pad_start = list_output_pad = g_list_reverse(gtk_container_get_children((GtkContainer *) machine->output)); }else{ list_output_pad_start = NULL; } /* AgsInput */ if(machine->input != NULL){ /* get input */ pthread_mutex_lock(audio_mutex); channel = audio->input; pthread_mutex_unlock(audio_mutex); for(i = 0; i < input_pads; i++){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* create AgsPad's if necessary or resize */ if(audio_channels_old == 0){ pad = g_object_new(machine->input_pad_type, "channel", channel, NULL); gtk_box_pack_start((GtkBox *) machine->input, (GtkWidget *) pad, FALSE, FALSE, 0); ags_pad_resize_lines((AgsPad *) pad, machine->input_line_type, audio_channels, 0); }else{ pad = AGS_PAD(list_input_pad->data); ags_pad_resize_lines((AgsPad *) pad, machine->input_line_type, audio_channels, audio_channels_old); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next_pad; pthread_mutex_unlock(channel_mutex); if(audio_channels_old != 0){ list_input_pad = list_input_pad->next; } } } /* AgsOutput */ if(machine->output != NULL){ /* get output */ pthread_mutex_lock(audio_mutex); channel = audio->output; pthread_mutex_unlock(audio_mutex); for(i = 0; i < output_pads; i++){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* create AgsPad's if necessary or resize */ if(audio_channels_old == 0){ pad = g_object_new(machine->output_pad_type, "channel", channel, NULL); gtk_box_pack_start((GtkBox *) machine->output, (GtkWidget *) pad, FALSE, FALSE, 0); ags_pad_resize_lines((AgsPad *) pad, machine->output_line_type, audio_channels, 0); }else{ pad = AGS_PAD(list_output_pad->data); ags_pad_resize_lines((AgsPad *) pad, machine->output_line_type, audio_channels, audio_channels_old); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next_pad; pthread_mutex_unlock(channel_mutex); if(audio_channels_old != 0){ list_output_pad = list_output_pad->next; } } } /* show all */ if(audio_channels_old == 0){ if(machine->input != NULL){ list_input_pad_start = list_input_pad = g_list_reverse(gtk_container_get_children((GtkContainer *) machine->input)); }else{ list_input_pad_start = NULL; } if(machine->output != NULL){ list_output_pad_start = list_output_pad = g_list_reverse(gtk_container_get_children((GtkContainer *) machine->output)); }else{ list_output_pad_start = NULL; } } if(gtk_widget_get_visible((GtkWidget *) machine)){ if(audio_channels_old == 0){ /* AgsInput */ if(machine->input != NULL){ list_input_pad = list_input_pad_start; while(list_input_pad != NULL){ gtk_widget_show_all(GTK_WIDGET(list_input_pad->data)); list_input_pad = list_input_pad->next; } } /* AgsOutput */ if(machine->output != NULL){ list_output_pad = list_output_pad_start; while(list_input_pad != NULL){ gtk_widget_show_all(GTK_WIDGET(list_input_pad->data)); list_input_pad = list_input_pad->next; } } }else{ if(machine->input != NULL){ GList *list_input_line, *list_input_line_start; list_input_pad = list_input_pad_start; while(list_input_pad != NULL){ list_input_line_start = list_input_line = g_list_reverse(gtk_container_get_children(GTK_CONTAINER(AGS_PAD(list_input_pad->data)->expander_set))); list_input_line = g_list_nth(list_input_line, audio_channels_old); while(list_input_line != NULL){ gtk_widget_show_all(GTK_WIDGET(list_input_line->data)); list_input_line = list_input_line->next; } g_list_free(list_input_line_start); list_input_pad = list_input_pad->next; } } /* AgsOutput */ if(machine->output != NULL){ GList *list_output_line, *list_output_line_start; list_output_pad = list_output_pad_start; while(list_output_pad != NULL){ list_output_line_start = list_output_line = g_list_reverse(gtk_container_get_children(GTK_CONTAINER(AGS_PAD(list_output_pad->data)->expander_set))); list_output_line = g_list_nth(list_output_line, audio_channels_old); while(list_output_line != NULL){ gtk_widget_show_all(GTK_WIDGET(list_output_line->data)); list_output_line = list_output_line->next; } list_output_pad = list_output_pad->next; } } } } g_list_free(list_input_pad_start); g_list_free(list_output_pad_start); }else if(audio_channels < audio_channels_old){ /* shrink lines */ if(machine->output != NULL){ list_output_pad_start = list_output_pad = gtk_container_get_children((GtkContainer *) machine->output); }else{ list_output_pad_start = NULL; } if(machine->input != NULL){ list_input_pad_start = list_input_pad = gtk_container_get_children((GtkContainer *) machine->input); }else{ list_input_pad_start = NULL; } if(audio_channels == 0){ /* AgsInput */ if(machine->input != NULL){ while(list_input_pad != NULL){ list_input_pad_next = list_input_pad->next; gtk_widget_destroy(GTK_WIDGET(list_input_pad->data)); list_input_pad = list_input_pad_next; } } /* AgsOutput */ if(machine->output != NULL){ while(list_output_pad != NULL){ list_output_pad_next = list_output_pad->next; gtk_widget_destroy(GTK_WIDGET(list_output_pad->data)); list_output_pad = list_output_pad_next; } } }else{ /* AgsInput */ if(machine->input != NULL){ for(i = 0; list_input_pad != NULL; i++){ ags_pad_resize_lines(AGS_PAD(list_input_pad->data), machine->input_pad_type, audio_channels, audio_channels_old); list_input_pad = list_input_pad->next; } } /* AgsOutput */ if(machine->output != NULL){ for(i = 0; list_output_pad != NULL; i++){ ags_pad_resize_lines(AGS_PAD(list_output_pad->data), machine->output_pad_type, audio_channels, audio_channels_old); list_output_pad = list_output_pad->next; } } } g_list_free(list_output_pad_start); g_list_free(list_input_pad_start); } } /** * ags_machine_resize_audio_channels: * @machine: the #AgsMachine * @new_size: new allocation * @old_size: old allocation * * Resize audio channel allocation. * * Since: 1.0.0 */ void ags_machine_resize_audio_channels(AgsMachine *machine, guint new_size, guint old_size) { g_return_if_fail(AGS_IS_MACHINE(machine)); g_object_ref((GObject *) machine); g_signal_emit(G_OBJECT(machine), machine_signals[RESIZE_AUDIO_CHANNELS], 0, new_size, old_size); g_object_unref((GObject *) machine); } void ags_machine_real_resize_pads(AgsMachine *machine, GType channel_type, guint pads, guint pads_old) { AgsPad *pad; AgsAudio *audio; AgsChannel *channel; AgsChannel *input, *output; AgsMutexManager *mutex_manager; GList *list_pad_start, *list_pad; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; audio = machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); if(pads_old < pads){ pthread_mutex_lock(audio_mutex); input = audio->input; output = audio->output; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* grow input */ if(machine->input != NULL){ if(channel_type == AGS_TYPE_INPUT){ channel = ags_channel_nth(input, pads_old * audio_channels); for(i = pads_old; i < pads; i++){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* instantiate pad */ pad = g_object_new(machine->input_pad_type, "channel", channel, NULL); gtk_box_pack_start((GtkBox *) machine->input, (GtkWidget *) pad, FALSE, FALSE, 0); /* resize lines */ ags_pad_resize_lines((AgsPad *) pad, machine->input_line_type, audio_channels, 0); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next_pad; pthread_mutex_unlock(channel_mutex); } /* show all */ list_pad_start = list_pad = gtk_container_get_children(GTK_CONTAINER(machine->input)); list_pad = g_list_nth(list_pad, pads_old); while(list_pad != NULL){ gtk_widget_show_all(GTK_WIDGET(list_pad->data)); list_pad = list_pad->next; } g_list_free(list_pad_start); } } /* grow output */ if(machine->output != NULL){ if(channel_type == AGS_TYPE_OUTPUT){ channel = ags_channel_nth(output, pads_old * audio_channels); for(i = pads_old; i < pads; i++){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* instantiate pad */ pad = g_object_new(machine->output_pad_type, "channel", channel, NULL); gtk_box_pack_start((GtkBox *) machine->output, (GtkWidget *) pad, FALSE, FALSE, 0); /* resize lines */ ags_pad_resize_lines((AgsPad *) pad, machine->output_line_type, audio_channels, 0); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next_pad; pthread_mutex_unlock(channel_mutex); } /* show all */ list_pad_start = list_pad = gtk_container_get_children(GTK_CONTAINER(machine->output)); list_pad = g_list_nth(list_pad, pads_old); while(list_pad != NULL){ gtk_widget_show_all(GTK_WIDGET(list_pad->data)); list_pad = list_pad->next; } g_list_free(list_pad_start); } } }else if(pads_old > pads){ GList *list, *list_start; /* input - destroy AgsPad's */ if(channel_type == AGS_TYPE_INPUT && machine->input != NULL){ for(i = 0; i < pads_old - pads; i++){ list_start = gtk_container_get_children(GTK_CONTAINER(machine->input)); list = g_list_nth(list_start, pads); if(list != NULL){ gtk_widget_destroy(GTK_WIDGET(list->data)); } g_list_free(list_start); } } /* output - destroy AgsPad's */ if(channel_type == AGS_TYPE_OUTPUT && machine->output != NULL){ for(i = 0; i < pads_old - pads; i++){ list_start = gtk_container_get_children(GTK_CONTAINER(machine->output)); list = g_list_nth(list_start, pads); if(list != NULL){ gtk_widget_destroy(GTK_WIDGET(list->data)); } g_list_free(list_start); } } } } /** * ags_machine_resize_pads: * @machine: the #AgsMachine * @channel_type: the channel #GType * @new_size: new allocation * @old_size: old allocation * * Resize pad allocation. * * Since: 1.0.0 */ void ags_machine_resize_pads(AgsMachine *machine, GType channel_type, guint new_size, guint old_size) { g_return_if_fail(AGS_IS_MACHINE(machine)); g_object_ref((GObject *) machine); g_signal_emit(G_OBJECT(machine), machine_signals[RESIZE_PADS], 0, channel_type, new_size, old_size); g_object_unref((GObject *) machine); } void ags_machine_real_map_recall(AgsMachine *machine) { if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){ return; } machine->flags |= AGS_MACHINE_MAPPED_RECALL; ags_machine_find_port(machine); } /** * ags_machine_map_recall: * @machine: the #AgsMachine to add its default recall. * * You may want the @machine to add its default recall. * * Since: 1.0.0 */ void ags_machine_map_recall(AgsMachine *machine) { g_return_if_fail(AGS_IS_MACHINE(machine)); g_object_ref((GObject *) machine); g_signal_emit((GObject *) machine, machine_signals[MAP_RECALL], 0); g_object_unref((GObject *) machine); } GList* ags_machine_real_find_port(AgsMachine *machine) { GList *pad, *pad_start; GList *port, *tmp_port; port = NULL; /* find output ports */ if(machine->output != NULL){ pad_start = pad = gtk_container_get_children(machine->output); while(pad != NULL){ tmp_port = ags_pad_find_port(AGS_PAD(pad->data)); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } pad = pad->next; } g_list_free(pad_start); } /* find input ports */ if(machine->input != NULL){ pad_start = pad = gtk_container_get_children(machine->input); while(pad != NULL){ tmp_port = ags_pad_find_port(AGS_PAD(pad->data)); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } pad = pad->next; } g_list_free(pad_start); } /* find bridge ports */ if(machine->bridge != NULL){ tmp_port = ags_effect_bridge_find_port((AgsEffectBridge *) machine->bridge); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } } return(port); } /** * ags_machine_find_port: * @machine: the #AgsMachine * Returns: an #GList containing all related #AgsPort * * Lookup ports of associated recalls. * * Since: 1.0.0 */ GList* ags_machine_find_port(AgsMachine *machine) { GList *list; list = NULL; g_return_val_if_fail(AGS_IS_MACHINE(machine), NULL); g_object_ref((GObject *) machine); g_signal_emit((GObject *) machine, machine_signals[FIND_PORT], 0, &list); g_object_unref((GObject *) machine); return(list); } /** * ags_machine_done: * @machine: the #AgsMachine * @recall_id: the #AgsRecallID * * Notify about to stop playback of @recall_id. * * Since: 1.2.0 */ void ags_machine_done(AgsMachine *machine, GObject *recall_id) { g_return_if_fail(AGS_IS_MACHINE(machine)); g_object_ref((GObject *) machine); g_signal_emit((GObject *) machine, machine_signals[DONE], 0, recall_id); g_object_unref((GObject *) machine); } /** * ags_machine_find_by_name: * @list: a #GList of #AgsMachine * @name: the name of machine * * Find the specified by @name machine. * * Returns: the matching #AgsMachine, or %NULL * * Since: 1.0.0 */ AgsMachine* ags_machine_find_by_name(GList *list, char *name) { while(list != NULL){ if(!g_strcmp0(AGS_MACHINE(list->data)->machine_name, name)) return((AgsMachine *) list->data); list = list->next; } return(NULL); } /** * ags_machine_set_run: * @machine: the #AgsMachine * @run: if %TRUE playback is started, otherwise stopped * * Start/stop playback of @machine. * * Since: 1.0.0 */ void ags_machine_set_run(AgsMachine *machine, gboolean run) { ags_machine_set_run_extended(machine, run, TRUE, TRUE); } /** * ags_machine_set_run_extended: * @machine: the #AgsMachine * @run: if %TRUE playback is started, otherwise stopped * @sequencer: if doing sequencer * @notation: if doing notation * * Start/stop playback of @machine. * * Since: 1.0.0 */ void ags_machine_set_run_extended(AgsMachine *machine, gboolean run, gboolean sequencer, gboolean notation) { AgsWindow *window; AgsMutexManager *mutex_manager; AgsAudioLoop *audio_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; gboolean no_soundcard; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_loop_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); no_soundcard = FALSE; pthread_mutex_lock(application_mutex); if(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)) == NULL){ no_soundcard = TRUE; } pthread_mutex_unlock(application_mutex); if(no_soundcard){ g_message("No soundcard available"); return; } /* get threads */ pthread_mutex_lock(application_mutex); audio_loop = (AgsAudioLoop *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* lookup audio loop mutex */ pthread_mutex_lock(application_mutex); audio_loop_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio_loop); pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) audio_loop, AGS_TYPE_GUI_THREAD); if(run){ AgsInitAudio *init_audio; AgsAppendAudio *append_audio; AgsStartSoundcard *start_soundcard; AgsStartSequencer *start_sequencer; GList *list; list = NULL; if(sequencer){ /* create init task */ init_audio = ags_init_audio_new(machine->audio, FALSE, TRUE, FALSE); list = g_list_prepend(list, init_audio); /* create append task */ append_audio = ags_append_audio_new((GObject *) audio_loop, (GObject *) machine->audio, FALSE, TRUE, FALSE); list = g_list_prepend(list, append_audio); } if(notation){ /* create init task */ init_audio = ags_init_audio_new(machine->audio, FALSE, FALSE, TRUE); list = g_list_prepend(list, init_audio); /* create append task */ append_audio = ags_append_audio_new((GObject *) audio_loop, (GObject *) machine->audio, FALSE, FALSE, TRUE); list = g_list_prepend(list, append_audio); } /* create start task */ if(list != NULL){ AgsGuiThread *gui_thread; gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) audio_loop, AGS_TYPE_GUI_THREAD); /* start soundcard */ start_soundcard = ags_start_soundcard_new(window->application_context); list = g_list_prepend(list, start_soundcard); /* start sequencer */ start_sequencer = ags_start_sequencer_new(window->application_context); list = g_list_prepend(list, start_sequencer); /* append AgsStartSoundcard and AgsStartSequencer */ list = g_list_reverse(list); ags_gui_thread_schedule_task_list((AgsGuiThread *) gui_thread, list); } }else{ AgsCancelAudio *cancel_audio; /* create cancel task */ cancel_audio = ags_cancel_audio_new(machine->audio, FALSE, sequencer, notation); /* append AgsCancelAudio */ ags_gui_thread_schedule_task((AgsGuiThread *) gui_thread, cancel_audio); } } /** * ags_machine_get_possible_audio_output_connections: * @machine: the #AgsMachine * * Find audio output connections suitable for @machine. * * Returns: a #GtkListStore containing one column with a string representing * machines by its type and name. * * Since: 1.0.0 */ GtkListStore* ags_machine_get_possible_audio_output_connections(AgsMachine *machine) { AgsWindow *window; AgsApplicationContext *application_context; GtkListStore *model; GList *list; GtkTreeIter iter; window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) machine, AGS_TYPE_WINDOW); if(window != NULL){ application_context = (AgsApplicationContext *) window->application_context; }else{ application_context = NULL; } model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "NULL", 1, NULL, -1); if(application_context != NULL){ list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(list->data != machine){ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, g_strdup_printf("%s: %s", G_OBJECT_TYPE_NAME(G_OBJECT(list->data)), ags_soundcard_get_device(AGS_SOUNDCARD(list->data))), 1, list->data, -1); } list = list->next; } } return(model); } /** * ags_machine_get_possible_links: * @machine: the #AgsMachine * * Find links suitable for @machine. * * Returns: a #GtkListStore containing one column with a string representing * machines by its type and name. * * Since: 1.0.0 */ GtkListStore* ags_machine_get_possible_links(AgsMachine *machine) { GtkListStore *model; GList *list; GtkTreeIter iter; model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, "NULL", 1, NULL, -1); if(GTK_WIDGET(machine)->parent != NULL){ list = gtk_container_get_children(GTK_CONTAINER(GTK_WIDGET(machine)->parent)); while(list != NULL){ if(list->data != machine){ gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, g_strdup_printf("%s: %s", G_OBJECT_TYPE_NAME(G_OBJECT(list->data)), AGS_MACHINE(list->data)->machine_name), 1, list->data, -1); } list = list->next; } } return(model); } /** * ags_machine_file_chooser_dialog_new: * @machine: the #AgsMachine * * Creates a new machine file chooser dialog in order to * open audio files. * * Returns: a new #GtkFileChooserDialog * * Since: 1.0.0 */ GtkFileChooserDialog* ags_machine_file_chooser_dialog_new(AgsMachine *machine) { GtkFileChooserDialog *file_chooser; GtkCheckButton *check_button; file_chooser = (GtkFileChooserDialog *) gtk_file_chooser_dialog_new(i18n("Open audio files"), (GtkWindow *) gtk_widget_get_toplevel((GtkWidget *) machine), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(file_chooser), TRUE); check_button = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("open in new channel")); gtk_toggle_button_set_active((GtkToggleButton *) check_button, TRUE); gtk_box_pack_start((GtkBox *) GTK_DIALOG(file_chooser)->vbox, (GtkWidget *) check_button, FALSE, FALSE, 0); g_object_set_data((GObject *) file_chooser, "create", (gpointer) check_button); check_button = (GtkCheckButton *) gtk_check_button_new_with_label(i18n("overwrite existing links")); gtk_toggle_button_set_active((GtkToggleButton *) check_button, TRUE); gtk_box_pack_start((GtkBox *) GTK_DIALOG(file_chooser)->vbox, (GtkWidget *) check_button, FALSE, FALSE, 0); g_object_set_data((GObject *) file_chooser, "overwrite", (gpointer) check_button); return(file_chooser); } /** * ags_machine_open_files: * @machine: the #AgsMachine * @filenames: the filenames * @overwrite_channels: reset channels * @create_channels: instantiate new channels * * Opens audio files and modifies or creates new channels if wished. * * Since: 1.0.0 */ void ags_machine_open_files(AgsMachine *machine, GSList *filenames, gboolean overwrite_channels, gboolean create_channels) { AgsWindow *window; AgsOpenFile *open_file; AgsMutexManager *mutex_manager; AgsAudioLoop *audio_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_loop_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) machine); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); audio_loop = (AgsAudioLoop *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* lookup audio loop mutex */ pthread_mutex_lock(application_mutex); audio_loop_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio_loop); pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) audio_loop, AGS_TYPE_GUI_THREAD); /* instantiate open file task */ open_file = ags_open_file_new(machine->audio, filenames, overwrite_channels, create_channels); ags_gui_thread_schedule_task(gui_thread, open_file); } void ags_machine_copy_pattern(AgsMachine *machine) { AgsAudio *audio; AgsChannel *channel; AgsMutexManager *mutex_manager; xmlDoc *clipboard; xmlNode *audio_node, *notation_list_node, *notation_node; xmlChar *buffer; int size; gint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *current_mutex; auto xmlNode* ags_machine_copy_pattern_to_notation(AgsChannel *current); xmlNode* ags_machine_copy_pattern_to_notation(AgsChannel *current){ AgsPattern *pattern; xmlNode *notation_node, *current_note; guint x_boundary, y_boundary; guint bank_0, bank_1, k; /* create root node */ notation_node = xmlNewNode(NULL, BAD_CAST "notation"); xmlNewProp(notation_node, BAD_CAST "program", BAD_CAST "ags"); xmlNewProp(notation_node, BAD_CAST "type", BAD_CAST AGS_NOTATION_CLIPBOARD_TYPE); xmlNewProp(notation_node, BAD_CAST "version", BAD_CAST AGS_NOTATION_CLIPBOARD_VERSION); xmlNewProp(notation_node, BAD_CAST "format", BAD_CAST AGS_NOTATION_CLIPBOARD_FORMAT); xmlNewProp(notation_node, BAD_CAST "base_frequency", BAD_CAST g_strdup("0")); xmlNewProp(notation_node, BAD_CAST "audio-channel", BAD_CAST g_strdup_printf("%u", current->audio_channel)); bank_0 = machine->bank_0; bank_1 = machine->bank_1; x_boundary = G_MAXUINT; y_boundary = G_MAXUINT; while(current != NULL){ pattern = current->pattern->data; for(k = 0; k < pattern->dim[2]; k++){ if(ags_pattern_get_bit(pattern, bank_0, bank_1, k)){ current_note = xmlNewChild(notation_node, NULL, BAD_CAST "note", NULL); xmlNewProp(current_note, BAD_CAST "x", BAD_CAST g_strdup_printf("%u", k)); xmlNewProp(current_note, BAD_CAST "x1", BAD_CAST g_strdup_printf("%u", k + 1)); if((AGS_MACHINE_REVERSE_NOTATION & (machine->flags)) != 0){ xmlNewProp(current_note, BAD_CAST "y", BAD_CAST g_strdup_printf("%u", machine->audio->input_pads - current->pad - 1)); }else{ xmlNewProp(current_note, BAD_CAST "y", BAD_CAST g_strdup_printf("%u", current->pad)); } if(x_boundary > k){ x_boundary = k; } if((AGS_MACHINE_REVERSE_NOTATION & (machine->flags)) != 0){ guint tmp; tmp = machine->audio->input_pads - current->pad - 1; if(y_boundary > tmp){ y_boundary = tmp; } }else{ if(y_boundary > current->pad){ y_boundary = current->pad; } } } } current = current->next; } xmlNewProp(notation_node, BAD_CAST "x_boundary", BAD_CAST g_strdup_printf("%u", x_boundary)); xmlNewProp(notation_node, BAD_CAST "y_boundary", BAD_CAST g_strdup_printf("%u", y_boundary)); return(notation_node); } /* create document */ clipboard = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION); /* create root node */ audio_node = xmlNewNode(NULL, BAD_CAST "audio"); xmlDocSetRootElement(clipboard, audio_node); notation_list_node = xmlNewNode(NULL, BAD_CAST "notation-list"); xmlAddChild(audio_node, notation_list_node); audio = machine->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* copy to clipboard */ pthread_mutex_lock(audio_mutex); channel = audio->input; pthread_mutex_unlock(audio_mutex); for(i = 0; i < machine->audio->audio_channels; i++){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* do it so */ pthread_mutex_lock(current_mutex); notation_node = ags_machine_copy_pattern_to_notation(channel); xmlAddChild(notation_list_node, notation_node); channel = channel->next; pthread_mutex_unlock(current_mutex); } /* write to clipboard */ xmlDocDumpFormatMemoryEnc(clipboard, &buffer, &size, "UTF-8", TRUE); gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), buffer, size); gtk_clipboard_store(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); xmlFreeDoc(clipboard); } /** * ags_machine_message_monitor_timeout: * @machine: the #AgsMachine * * Monitor messages. * * Returns: %TRUE if proceed with redraw, otherwise %FALSE * * Since: 1.2.0 */ gboolean ags_machine_message_monitor_timeout(AgsMachine *machine) { if(g_hash_table_lookup(ags_machine_message_monitor, machine) != NULL){ AgsMessageDelivery *message_delivery; GList *message_start, *message; /* retrieve message */ message_delivery = ags_message_delivery_get_instance(); message_start = message = ags_message_delivery_find_sender(message_delivery, "libags-audio", machine->audio); while(message != NULL){ xmlNode *root_node; root_node = xmlDocGetRootElement(AGS_MESSAGE_ENVELOPE(message->data)->doc); if(!xmlStrncmp(root_node->name, "ags-command", 12)){ if(!xmlStrncmp(xmlGetProp(root_node, "method"), "AgsAudio::set-audio-channels", 28)){ GValue *value; guint audio_channels, audio_channels_old; value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "audio-channels"); audio_channels = g_value_get_uint(value); value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "audio-channels-old"); audio_channels_old = g_value_get_uint(value); /* resize audio channels */ ags_machine_resize_audio_channels(machine, audio_channels, audio_channels_old); }else if(!xmlStrncmp(xmlGetProp(root_node, "method"), "AgsAudio::set-pads", 19)){ GValue *value; GType channel_type; guint pads, pads_old; value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "channel-type"); channel_type = g_value_get_ulong(value); value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "pads"); pads = g_value_get_uint(value); value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "pads-old"); pads_old = g_value_get_uint(value); /* resize pads */ ags_machine_resize_pads(machine, channel_type, pads, pads_old); }else if(!xmlStrncmp(xmlGetProp(root_node, "method"), "AgsAudio::done", 15)){ AgsRecallID *recall_id; GValue *value; value = ags_parameter_find(AGS_MESSAGE_ENVELOPE(message->data)->parameter, AGS_MESSAGE_ENVELOPE(message->data)->n_params, "recall-id"); recall_id = g_value_get_object(value); /* done */ ags_machine_done(machine, recall_id); } } ags_message_delivery_remove_message(message_delivery, "libags-audio", message->data); message = message->next; } g_list_free_full(message_start, ags_message_envelope_free); return(TRUE); }else{ return(FALSE); } } /** * ags_machine_new: * @soundcard: the assigned soundcard. * * Creates an #AgsMachine * * Returns: a new #AgsMachine * * Since: 1.0.0 */ AgsMachine* ags_machine_new(GObject *soundcard) { AgsMachine *machine; GValue value; machine = (AgsMachine *) g_object_new(AGS_TYPE_MACHINE, NULL); g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, soundcard); g_object_set_property(G_OBJECT(machine->audio), "soundcard", &value); g_value_unset(&value); return(machine); } /** * ags_machine_popup_new: * @machine: the assigned machine. * * Creates #GtkMenu to use as @machine's popup context menu. * * Returns: a new #GtkMenu containing basic actions. * * Since: 1.0.0 */ GtkMenu* ags_machine_popup_new(AgsMachine *machine) { GtkMenu *popup; GtkMenuItem *item; GList *list, *list_start; popup = (GtkMenu *) gtk_menu_new(); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("move up")); gtk_menu_shell_append((GtkMenuShell *) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("move down")); gtk_menu_shell_append((GtkMenuShell *) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("hide")); gtk_menu_shell_append((GtkMenuShell *) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("show")); gtk_menu_shell_append((GtkMenuShell *) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("destroy")); gtk_menu_shell_append((GtkMenuShell *) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("rename")); gtk_menu_shell_append((GtkMenuShell *) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("properties")); gtk_menu_shell_append((GtkMenuShell *) popup, (GtkWidget*) item); item = (GtkMenuItem *) gtk_check_menu_item_new_with_label(i18n("sticky controls")); gtk_menu_shell_append((GtkMenuShell *) popup, (GtkWidget*) item); list_start = list = gtk_container_get_children((GtkContainer *) popup); g_signal_connect((GObject*) list->data, "activate", G_CALLBACK(ags_machine_popup_move_up_activate_callback), (gpointer) machine); list = list->next; g_signal_connect((GObject*) list->data, "activate", G_CALLBACK(ags_machine_popup_move_down_activate_callback), (gpointer) machine); list = list->next; g_signal_connect((GObject*) list->data, "activate", G_CALLBACK(ags_machine_popup_hide_activate_callback), (gpointer) machine); list = list->next; g_signal_connect((GObject*) list->data, "activate", G_CALLBACK(ags_machine_popup_show_activate_callback), (gpointer) machine); list = list->next; g_signal_connect((GObject*) list->data, "activate", G_CALLBACK(ags_machine_popup_destroy_activate_callback), (gpointer) machine); list = list->next; g_signal_connect((GObject*) list->data, "activate", G_CALLBACK(ags_machine_popup_rename_activate_callback), (gpointer) machine); list = list->next; g_signal_connect((GObject*) list->data, "activate", G_CALLBACK(ags_machine_popup_properties_activate_callback), (gpointer) machine); list = list->next; g_signal_connect_after((GObject*) list->data, "toggled", G_CALLBACK(ags_machine_popup_sticky_controls_toggled_callback), (gpointer) machine); g_list_free(list_start); gtk_widget_show_all((GtkWidget*) popup); return(popup); } /** * ags_machine_popup_add_edit_options: * @machine: the assigned machine. * @edit_options: the options to set * * Add options to edit submenu * * Since: 1.0.0 */ void ags_machine_popup_add_edit_options(AgsMachine *machine, guint edit_options) { GtkMenu *edit; GtkMenuItem *item; item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("edit")); gtk_menu_shell_append((GtkMenuShell *) machine->popup, (GtkWidget*) item); gtk_widget_show((GtkWidget *) item); edit = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu(item, (GtkWidget *) edit); gtk_widget_show((GtkWidget *) edit); if((AGS_MACHINE_POPUP_COPY_PATTERN & edit_options) != 0){ item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("copy pattern")); gtk_menu_shell_append((GtkMenuShell *) edit, (GtkWidget*) item); g_signal_connect((GObject*) item, "activate", G_CALLBACK(ags_machine_popup_copy_pattern_callback), (gpointer) machine); gtk_widget_show((GtkWidget *) item); } if((AGS_MACHINE_POPUP_PASTE_PATTERN & edit_options) != 0){ item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("paste pattern")); gtk_menu_shell_append((GtkMenuShell *) edit, (GtkWidget*) item); g_signal_connect((GObject*) item, "activate", G_CALLBACK(ags_machine_popup_paste_pattern_callback), (gpointer) machine); gtk_widget_show((GtkWidget *) item); } if((AGS_MACHINE_POPUP_ENVELOPE & edit_options) != 0){ item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("envelope")); gtk_menu_shell_append((GtkMenuShell *) edit, (GtkWidget*) item); g_signal_connect((GObject*) item, "activate", G_CALLBACK(ags_machine_popup_envelope_callback), (gpointer) machine); gtk_widget_show((GtkWidget *) item); } gtk_widget_show_all(machine->popup); } /** * ags_machine_popup_add_connection_options: * @machine: the assigned machine. * @connection_options: the options to set * * Add options to connection submenu * * Since: 1.0.0 */ void ags_machine_popup_add_connection_options(AgsMachine *machine, guint connection_options) { GtkMenu *connection; GtkMenuItem *item; gchar *str; item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("connection")); gtk_menu_shell_append((GtkMenuShell *) machine->popup, (GtkWidget*) item); gtk_widget_show((GtkWidget *) item); connection = (GtkMenu *) gtk_menu_new(); gtk_menu_item_set_submenu(item, (GtkWidget *) connection); gtk_widget_show((GtkWidget *) connection); if((AGS_MACHINE_POPUP_CONNECTION_EDITOR & connection_options) != 0){ item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("audio connection")); gtk_menu_shell_append((GtkMenuShell *) connection, (GtkWidget*) item); g_signal_connect((GObject*) item, "activate", G_CALLBACK(ags_machine_popup_connection_editor_callback), (gpointer) machine); gtk_widget_show((GtkWidget *) item); } if((AGS_MACHINE_POPUP_MIDI_DIALOG & connection_options) != 0){ item = (GtkMenuItem *) gtk_menu_item_new_with_label(i18n("MIDI dialog")); gtk_menu_shell_append((GtkMenuShell *) connection, (GtkWidget*) item); g_signal_connect((GObject*) item, "activate", G_CALLBACK(ags_machine_popup_midi_dialog_callback), (gpointer) machine); gtk_widget_show((GtkWidget *) item); } gtk_widget_show_all(machine->popup); } gsequencer-1.4.24/ags/X/ags_effect_line.c0000644000175000017500000012665513256163135015132 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_effect_line_class_init(AgsEffectLineClass *effect_line); void ags_effect_line_connectable_interface_init(AgsConnectableInterface *connectable); void ags_effect_line_plugin_interface_init(AgsPluginInterface *plugin); void ags_effect_line_init(AgsEffectLine *effect_line); void ags_effect_line_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_effect_line_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_effect_line_connect(AgsConnectable *connectable); void ags_effect_line_disconnect(AgsConnectable *connectable); gchar* ags_effect_line_get_name(AgsPlugin *plugin); void ags_effect_line_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_effect_line_get_version(AgsPlugin *plugin); void ags_effect_line_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_effect_line_get_build_id(AgsPlugin *plugin); void ags_effect_line_set_build_id(AgsPlugin *plugin, gchar *build_id); void ags_effect_line_finalize(GObject *gobject); GList* ags_effect_line_add_ladspa_effect(AgsEffectLine *effect_line, GList *control_type_name, gchar *filename, gchar *effect); GList* ags_effect_line_add_lv2_effect(AgsEffectLine *effect_line, GList *control_type_name, gchar *filename, gchar *effect); GList* ags_effect_line_real_add_effect(AgsEffectLine *effect_line, GList *control_type_name, gchar *filename, gchar *effect); void ags_effect_line_real_remove_effect(AgsEffectLine *effect_line, guint nth); void ags_effect_line_real_map_recall(AgsEffectLine *effect_line, guint output_pad_start); GList* ags_effect_line_real_find_port(AgsEffectLine *effect_line); /** * SECTION:ags_effect_line * @short_description: A composite widget to visualize a bunch of #AgsChannel * @title: AgsEffectLine * @section_id: * @include: ags/X/ags_effect_line.h * * #AgsEffectLine is a composite widget to visualize one #AgsChannel. It should be * packed by an #AgsEffectLine. */ enum{ ADD_EFFECT, REMOVE_EFFECT, MAP_RECALL, FIND_PORT, LAST_SIGNAL, }; enum{ PROP_0, PROP_CHANNEL, }; static gpointer ags_effect_line_parent_class = NULL; static guint effect_line_signals[LAST_SIGNAL]; GHashTable *ags_effect_line_indicator_queue_draw = NULL; GType ags_effect_line_get_type(void) { static GType ags_type_effect_line = 0; if(!ags_type_effect_line){ static const GTypeInfo ags_effect_line_info = { sizeof(AgsEffectLineClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_effect_line_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsEffectLine), 0, /* n_preallocs */ (GInstanceInitFunc) ags_effect_line_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_effect_line_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_effect_line_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_effect_line = g_type_register_static(GTK_TYPE_VBOX, "AgsEffectLine", &ags_effect_line_info, 0); g_type_add_interface_static(ags_type_effect_line, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_effect_line, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_effect_line); } void ags_effect_line_class_init(AgsEffectLineClass *effect_line) { GObjectClass *gobject; GParamSpec *param_spec; ags_effect_line_parent_class = g_type_class_peek_parent(effect_line); /* GObjectClass */ gobject = G_OBJECT_CLASS(effect_line); gobject->set_property = ags_effect_line_set_property; gobject->get_property = ags_effect_line_get_property; gobject->finalize = ags_effect_line_finalize; /* properties */ /** * AgsEffectLine:channel: * * The start of a bunch of #AgsChannel to visualize. * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("assigned channel"), i18n_pspec("The channel it is assigned with"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /* AgsEffectLineClass */ effect_line->add_effect = ags_effect_line_real_add_effect; effect_line->remove_effect = ags_effect_line_real_remove_effect; effect_line->map_recall = ags_effect_line_real_map_recall; effect_line->find_port = ags_effect_line_real_find_port; /* signals */ /** * AgsEffectLine::add-effect: * @effect_line: the #AgsEffectLine to modify * @control_type_name: the string representation of a #GType * @filename: the effect's filename * @effect: the effect's name * * The ::add-effect signal notifies about added effect. * * Returns: the #GList-struct containing the #AgsPort objects added * * Since: 1.0.0 */ effect_line_signals[ADD_EFFECT] = g_signal_new("add-effect", G_TYPE_FROM_CLASS(effect_line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectLineClass, add_effect), NULL, NULL, g_cclosure_user_marshal_POINTER__POINTER_STRING_STRING, G_TYPE_POINTER, 3, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); /** * AgsEffectLine::remove-effect: * @effect_line: the #AgsEffectLine to modify * @nth: the nth effect * * The ::remove-effect signal notifies about removed effect. * * Since: 1.0.0 */ effect_line_signals[REMOVE_EFFECT] = g_signal_new("remove-effect", G_TYPE_FROM_CLASS(effect_line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectLineClass, remove_effect), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsEffectLine::map-recall: * @effect_line: the #AgsEffectLine * @output_pad_start: the channel's start pad * * The ::map-recall should be used to add the effect_line's default recall. This function * may call ags_effect_line_find_port(). * * Since: 1.0.0 */ effect_line_signals[MAP_RECALL] = g_signal_new("map-recall", G_TYPE_FROM_CLASS (effect_line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsEffectLineClass, map_recall), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsEffectLine::find-port: * @effect_line: the #AgsEffectLine to resize * Returns: a #GList with associated ports * * The ::find-port as recall should be mapped * * Returns: an #GList containing all related #AgsPort * * Since: 1.0.0 */ effect_line_signals[FIND_PORT] = g_signal_new("find-port", G_TYPE_FROM_CLASS(effect_line), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsEffectLineClass, find_port), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); } void ags_effect_line_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_effect_line_connect; connectable->disconnect = ags_effect_line_disconnect; } void ags_effect_line_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = NULL; plugin->set_name = NULL; plugin->get_version = ags_effect_line_get_version; plugin->set_version = ags_effect_line_set_version; plugin->get_build_id = ags_effect_line_get_build_id; plugin->set_build_id = ags_effect_line_set_build_id; plugin->get_xml_type = NULL; plugin->set_xml_type = NULL; plugin->get_ports = NULL; plugin->read = NULL; plugin->write = NULL; plugin->set_ports = NULL; } void ags_effect_line_init(AgsEffectLine *effect_line) { if(ags_effect_line_indicator_queue_draw == NULL){ ags_effect_line_indicator_queue_draw = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); } effect_line->flags = 0; effect_line->name = NULL; effect_line->version = AGS_EFFECT_LINE_DEFAULT_VERSION; effect_line->build_id = AGS_EFFECT_LINE_DEFAULT_BUILD_ID; effect_line->channel = NULL; effect_line->label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, NULL); gtk_box_pack_start(GTK_BOX(effect_line), GTK_WIDGET(effect_line->label), FALSE, FALSE, 0); effect_line->group = (GtkLabel *) gtk_toggle_button_new_with_label(i18n("group")); gtk_box_pack_start(GTK_BOX(effect_line), GTK_WIDGET(effect_line->group), FALSE, FALSE, 0); effect_line->table = (GtkTable *) gtk_table_new(1, AGS_EFFECT_LINE_COLUMNS_COUNT, TRUE); gtk_box_pack_start(GTK_BOX(effect_line), GTK_WIDGET(effect_line->table), FALSE, FALSE, 0); effect_line->queued_drawing = NULL; } void ags_effect_line_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsEffectLine *effect_line; effect_line = AGS_EFFECT_LINE(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(effect_line->channel == channel){ return; } if(effect_line->channel != NULL){ g_object_unref(effect_line->channel); } if(channel != NULL){ g_object_ref(channel); g_signal_connect_after(channel, "add-effect", G_CALLBACK(ags_effect_line_add_effect_callback), effect_line); // g_signal_connect_after(channel, "remove-effect", // G_CALLBACK(ags_effect_line_remove_effect_callback), effect_line); } effect_line->channel = channel; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_effect_line_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsEffectLine *effect_line; effect_line = AGS_EFFECT_LINE(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, effect_line->channel); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_effect_line_connect(AgsConnectable *connectable) { AgsEffectLine *effect_line; GList *list, *list_start; effect_line = AGS_EFFECT_LINE(connectable); if((AGS_EFFECT_LINE_CONNECTED & (effect_line->flags)) == 0){ return; } effect_line->flags &= (~AGS_EFFECT_LINE_CONNECTED); /* connect line members */ list_start = list = gtk_container_get_children(GTK_CONTAINER(effect_line->table)); while(list != NULL){ if(AGS_IS_CONNECTABLE(list->data)){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); } list = list->next; } if(list_start != NULL){ g_list_free(list_start); } } void ags_effect_line_disconnect(AgsConnectable *connectable) { AgsEffectLine *effect_line; GList *list, *list_start; effect_line = AGS_EFFECT_LINE(connectable); if((AGS_EFFECT_LINE_CONNECTED & (effect_line->flags)) != 0){ return; } effect_line->flags |= AGS_EFFECT_LINE_CONNECTED; if((AGS_EFFECT_LINE_PREMAPPED_RECALL & (effect_line->flags)) == 0){ if((AGS_EFFECT_LINE_MAPPED_RECALL & (effect_line->flags)) == 0){ ags_effect_line_map_recall(effect_line, 0); } }else{ ags_effect_line_find_port(effect_line); } /* connect line members */ list_start = list = gtk_container_get_children(GTK_CONTAINER(effect_line->table)); while(list != NULL){ if(AGS_IS_CONNECTABLE(list->data)){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); } list = list->next; } if(list_start != NULL){ g_list_free(list_start); } g_signal_handlers_disconnect_by_data(effect_line->channel, effect_line); } gchar* ags_effect_line_get_name(AgsPlugin *plugin) { return(AGS_EFFECT_LINE(plugin)->name); } void ags_effect_line_set_name(AgsPlugin *plugin, gchar *name) { AgsEffectLine *effect_line; effect_line = AGS_EFFECT_LINE(plugin); effect_line->name = name; } gchar* ags_effect_line_get_version(AgsPlugin *plugin) { return(AGS_EFFECT_LINE(plugin)->version); } void ags_effect_line_set_version(AgsPlugin *plugin, gchar *version) { AgsEffectLine *effect_line; effect_line = AGS_EFFECT_LINE(plugin); effect_line->version = version; } gchar* ags_effect_line_get_build_id(AgsPlugin *plugin) { return(AGS_EFFECT_LINE(plugin)->build_id); } void ags_effect_line_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsEffectLine *effect_line; effect_line = AGS_EFFECT_LINE(plugin); effect_line->build_id = build_id; } void ags_effect_line_finalize(GObject *gobject) { AgsEffectLine *effect_line; GList *list; effect_line = AGS_EFFECT_LINE(gobject); /* remove of the queued drawing hash */ list = effect_line->queued_drawing; while(list != NULL){ g_hash_table_remove(ags_effect_line_indicator_queue_draw, list->data); list = list->next; } } GList* ags_effect_line_add_ladspa_effect(AgsEffectLine *effect_line, GList *control_type_name, gchar *filename, gchar *effect) { AgsLineMember *line_member; AgsEffectSeparator *separator; GtkAdjustment *adjustment; AgsAddLineMember *add_line_member; AgsRecallHandler *recall_handler; AgsLadspaPlugin *ladspa_plugin; AgsMutexManager *mutex_manager; GList *list; GList *recall, *recall_start; GList *port, *recall_port; GList *port_descriptor; gdouble step; guint port_count; gboolean has_output_port; guint x, y; guint k; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* load plugin */ ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), filename, effect); /* retrieve position within table */ x = 0; y = 0; list = effect_line->table->children; while(list != NULL){ if(y <= ((GtkTableChild *) list->data)->top_attach){ y = ((GtkTableChild *) list->data)->top_attach + 1; } list = list->next; } /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) effect_line->channel); pthread_mutex_unlock(application_mutex); /* play - find ports */ pthread_mutex_lock(channel_mutex); recall_start = recall = ags_recall_get_by_effect(effect_line->channel->play, filename, effect); if(recall == NULL){ pthread_mutex_unlock(channel_mutex); return(NULL); } /* check has output port */ if((AGS_RECALL_HAS_OUTPUT_PORT & (AGS_RECALL(recall->data)->flags)) != 0){ has_output_port = TRUE; }else{ has_output_port = FALSE; } /* recall handler of output port */ if(has_output_port){ AgsRecall *recall_channel_run_dummy; recall_channel_run_dummy = ags_recall_find_template(AGS_RECALL_CONTAINER(AGS_RECALL(recall->data)->container)->recall_channel_run)->data; /* alloc handler */ recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler)); recall_handler->signal_name = "run-post"; recall_handler->callback = G_CALLBACK(ags_effect_line_output_port_run_post_callback); recall_handler->data = (gpointer) effect_line; ags_recall_add_handler(AGS_RECALL(recall_channel_run_dummy), recall_handler); } /* recall - find ports */ recall = g_list_last(recall); port = AGS_RECALL(recall->data)->port; g_list_free(recall_start); recall_start = recall = ags_recall_get_by_effect(effect_line->channel->recall, filename, effect); recall = g_list_last(recall); recall_port = AGS_RECALL(recall->data)->port; /* recall handler of output port */ if(has_output_port){ AgsRecall *recall_channel_run_dummy; recall_channel_run_dummy = ags_recall_find_template(AGS_RECALL_CONTAINER(AGS_RECALL(recall->data)->container)->recall_channel_run)->data; /* alloc handler */ recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler)); recall_handler->signal_name = "run-post"; recall_handler->callback = G_CALLBACK(ags_effect_line_output_port_run_post_callback); recall_handler->data = (gpointer) effect_line; ags_recall_add_handler(AGS_RECALL(recall_channel_run_dummy), recall_handler); } g_list_free(recall_start); pthread_mutex_unlock(channel_mutex); /* add separator */ separator = ags_effect_separator_new(); g_object_set(separator, "text", effect, "filename", filename, "effect", effect, NULL); gtk_table_attach(effect_line->table, (GtkWidget *) separator, 0, AGS_EFFECT_LINE_COLUMNS_COUNT, y, y + 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show_all(separator); y++; /* load ports */ port_descriptor = AGS_BASE_PLUGIN(ladspa_plugin)->port; port_count = g_list_length(port_descriptor); k = 0; while(port_descriptor != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ GtkWidget *child_widget; AgsLadspaConversion *ladspa_conversion; GType widget_type; gchar *plugin_name; gchar *control_port; guint step_count; gboolean disable_seemless; disable_seemless = FALSE; if(x == AGS_EFFECT_LINE_COLUMNS_COUNT){ x = 0; y++; gtk_table_resize(effect_line->table, y + 1, AGS_EFFECT_LINE_COLUMNS_COUNT); } if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ disable_seemless = TRUE; if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_LED; }else{ widget_type = GTK_TYPE_TOGGLE_BUTTON; } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_HINDICATOR; }else{ widget_type = AGS_TYPE_DIAL; } } if(control_type_name != NULL){ widget_type = g_type_from_name(control_type_name->data); control_type_name = control_type_name->next; } step_count = AGS_DIAL_DEFAULT_PRECISION; if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ step_count = AGS_PORT_DESCRIPTOR(port_descriptor->data)->scale_steps; disable_seemless = TRUE; } /* add line member */ plugin_name = g_strdup_printf("ladspa-%u", ladspa_plugin->unique_id); control_port = g_strdup_printf("%u/%u", k, port_count); line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, "widget-type", widget_type, "widget-label", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "plugin-name", plugin_name, "filename", filename, "effect", effect, "specifier", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "control-port", control_port, "steps", step_count, NULL); child_widget = ags_line_member_get_widget(line_member); g_free(plugin_name); g_free(control_port); /* ladspa conversion */ ladspa_conversion = NULL; if((AGS_PORT_DESCRIPTOR_BOUNDED_BELOW & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_BELOW; } if((AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_ABOVE; } if((AGS_PORT_DESCRIPTOR_SAMPLERATE & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_SAMPLERATE; } if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_LOGARITHMIC; } line_member->conversion = (AgsConversion *) ladspa_conversion; /* child widget */ if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ line_member->port_flags = AGS_LINE_MEMBER_PORT_BOOLEAN; } if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ line_member->port_flags = AGS_LINE_MEMBER_PORT_INTEGER; } if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; GtkAdjustment *adjustment; float lower_bound, upper_bound; dial = (AgsDial *) child_widget; if(disable_seemless){ dial->flags &= (~AGS_DIAL_SEEMLESS_MODE); } /* add controls of ports and apply range */ lower_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->lower_value); upper_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->upper_value); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(dial, "adjustment", adjustment, NULL); if(upper_bound >= 0.0 && lower_bound >= 0.0){ step = (upper_bound - lower_bound) / step_count; }else if(upper_bound < 0.0 && lower_bound < 0.0){ step = -1.0 * (lower_bound - upper_bound) / step_count; }else{ step = (upper_bound - lower_bound) / step_count; } gtk_adjustment_set_step_increment(adjustment, step); gtk_adjustment_set_lower(adjustment, lower_bound); gtk_adjustment_set_upper(adjustment, upper_bound); gtk_adjustment_set_value(adjustment, g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value)); }else if(AGS_IS_INDICATOR(child_widget) || AGS_IS_LED(child_widget)){ g_hash_table_insert(ags_effect_line_indicator_queue_draw, child_widget, ags_effect_line_indicator_queue_draw_timeout); effect_line->queued_drawing = g_list_prepend(effect_line->queued_drawing, child_widget); g_timeout_add(1000 / 30, (GSourceFunc) ags_effect_line_indicator_queue_draw_timeout, (gpointer) child_widget); } #ifdef AGS_DEBUG g_message("ladspa bounds: %f %f", lower_bound, upper_bound); #endif gtk_table_attach(effect_line->table, (GtkWidget *) line_member, (x % AGS_EFFECT_LINE_COLUMNS_COUNT), (x % AGS_EFFECT_LINE_COLUMNS_COUNT) + 1, y, y + 1, GTK_FILL, GTK_FILL, 0, 0); ags_connectable_connect(AGS_CONNECTABLE(line_member)); gtk_widget_show_all((GtkWidget *) line_member); port = port->next; x++; if(x % AGS_EFFECT_LINE_COLUMNS_COUNT == 0){ y++; } } port_descriptor = port_descriptor->next; k++; } return(g_list_concat(g_list_copy(port), g_list_copy(recall_port))); } GList* ags_effect_line_add_lv2_effect(AgsEffectLine *effect_line, GList *control_type_name, gchar *filename, gchar *effect) { AgsLineMember *line_member; AgsEffectSeparator *separator; GtkAdjustment *adjustment; AgsAddLineMember *add_line_member; AgsRecallHandler *recall_handler; AgsLv2Plugin *lv2_plugin; AgsMutexManager *mutex_manager; GList *list; GList *recall, *recall_start; GList *port, *recall_port; GList *port_descriptor; gdouble step; guint port_count; gboolean has_output_port; guint x, y; guint k; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* load plugin */ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); /* retrieve position within table */ x = 0; y = 0; list = effect_line->table->children; while(list != NULL){ if(y <= ((GtkTableChild *) list->data)->top_attach){ y = ((GtkTableChild *) list->data)->top_attach + 1; } list = list->next; } /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) effect_line->channel); pthread_mutex_unlock(application_mutex); /* play - find ports */ pthread_mutex_lock(channel_mutex); recall_start = recall = ags_recall_get_by_effect(effect_line->channel->play, filename, effect); if(recall == NULL){ pthread_mutex_unlock(channel_mutex); return(NULL); } recall = g_list_last(recall); port = AGS_RECALL(recall->data)->port; /* check has output port */ if((AGS_RECALL_HAS_OUTPUT_PORT & (AGS_RECALL(recall->data)->flags)) != 0){ has_output_port = TRUE; }else{ has_output_port = FALSE; } /* recall handler of output port */ if(has_output_port){ AgsRecall *recall_channel_run_dummy; recall_channel_run_dummy = ags_recall_find_template(AGS_RECALL_CONTAINER(AGS_RECALL(recall->data)->container)->recall_channel_run)->data; /* alloc handler */ recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler)); recall_handler->signal_name = "run-post"; recall_handler->callback = G_CALLBACK(ags_effect_line_output_port_run_post_callback); recall_handler->data = (gpointer) effect_line; ags_recall_add_handler(AGS_RECALL(recall_channel_run_dummy), recall_handler); } g_list_free(recall_start); /* recall - find ports */ recall_start = recall = ags_recall_get_by_effect(effect_line->channel->recall, filename, effect); recall = g_list_last(recall); recall_port = AGS_RECALL(recall->data)->port; /* recall handler of output port */ if(has_output_port){ AgsRecall *recall_channel_run_dummy; recall_channel_run_dummy = ags_recall_find_template(AGS_RECALL_CONTAINER(AGS_RECALL(recall->data)->container)->recall_channel_run)->data; /* alloc handler */ recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler)); recall_handler->signal_name = "run-post"; recall_handler->callback = G_CALLBACK(ags_effect_line_output_port_run_post_callback); recall_handler->data = (gpointer) effect_line; ags_recall_add_handler(AGS_RECALL(recall_channel_run_dummy), recall_handler); } g_list_free(recall_start); pthread_mutex_unlock(channel_mutex); /* add separator */ separator = ags_effect_separator_new(); g_object_set(separator, "text", effect, "filename", filename, "effect", effect, NULL); gtk_table_attach(effect_line->table, (GtkWidget *) separator, 0, AGS_EFFECT_LINE_COLUMNS_COUNT, y, y + 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show_all(separator); y++; /* load ports */ port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; port_count = g_list_length(port_descriptor); k = 0; while(port_descriptor != NULL && port != NULL){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ GtkWidget *child_widget; AgsLv2Conversion *lv2_conversion; GType widget_type; gchar *plugin_name; gchar *control_port; guint step_count; gboolean disable_seemless; disable_seemless = FALSE; if(x == AGS_EFFECT_LINE_COLUMNS_COUNT){ x = 0; y++; gtk_table_resize(effect_line->table, y + 1, AGS_EFFECT_LINE_COLUMNS_COUNT); } if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ disable_seemless = TRUE; if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_LED; }else{ widget_type = GTK_TYPE_TOGGLE_BUTTON; } }else{ if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ widget_type = AGS_TYPE_HINDICATOR; }else{ widget_type = AGS_TYPE_DIAL; } } if(control_type_name != NULL){ widget_type = g_type_from_name(control_type_name->data); control_type_name = control_type_name->next; } step_count = AGS_DIAL_DEFAULT_PRECISION; if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ step_count = AGS_PORT_DESCRIPTOR(port_descriptor->data)->scale_steps; disable_seemless = TRUE; } /* add line member */ plugin_name = g_strdup_printf("lv2-<%s>", lv2_plugin->uri); control_port = g_strdup_printf("%u/%u", k, port_count); line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER, "widget-type", widget_type, "widget-label", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "plugin-name", plugin_name, "filename", filename, "effect", effect, "specifier", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name, "control-port", control_port, "steps", step_count, NULL); child_widget = ags_line_member_get_widget(line_member); g_free(plugin_name); g_free(control_port); /* lv2 conversion */ lv2_conversion = NULL; if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(lv2_conversion == NULL || !AGS_IS_LV2_CONVERSION(lv2_conversion)){ lv2_conversion = ags_lv2_conversion_new(); } lv2_conversion->flags |= AGS_LV2_CONVERSION_LOGARITHMIC; } line_member->conversion = (AgsConversion *) lv2_conversion; /* child widget */ if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ line_member->port_flags = AGS_LINE_MEMBER_PORT_BOOLEAN; } if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ line_member->port_flags = AGS_LINE_MEMBER_PORT_INTEGER; } if(AGS_IS_DIAL(child_widget)){ AgsDial *dial; GtkAdjustment *adjustment; float lower_bound, upper_bound; dial = (AgsDial *) child_widget; if(disable_seemless){ dial->flags &= (~AGS_DIAL_SEEMLESS_MODE); } /* add controls of ports and apply range */ lower_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->lower_value); upper_bound = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->upper_value); adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 0.1, 0.1, 0.0); g_object_set(dial, "adjustment", adjustment, NULL); if(upper_bound >= 0.0 && lower_bound >= 0.0){ step = (upper_bound - lower_bound) / step_count; }else if(upper_bound < 0.0 && lower_bound < 0.0){ step = -1.0 * (lower_bound - upper_bound) / step_count; }else{ step = (upper_bound - lower_bound) / step_count; } gtk_adjustment_set_step_increment(adjustment, step); gtk_adjustment_set_lower(adjustment, lower_bound); gtk_adjustment_set_upper(adjustment, upper_bound); gtk_adjustment_set_value(adjustment, g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value)); }else if(AGS_IS_INDICATOR(child_widget) || AGS_IS_LED(child_widget)){ g_hash_table_insert(ags_effect_line_indicator_queue_draw, child_widget, ags_effect_line_indicator_queue_draw_timeout); effect_line->queued_drawing = g_list_prepend(effect_line->queued_drawing, child_widget); g_timeout_add(1000 / 30, (GSourceFunc) ags_effect_line_indicator_queue_draw_timeout, (gpointer) child_widget); } #ifdef AGS_DEBUG g_message("lv2 bounds: %f %f", lower_bound, upper_bound); #endif gtk_table_attach(effect_line->table, (GtkWidget *) line_member, (x % AGS_EFFECT_LINE_COLUMNS_COUNT), (x % AGS_EFFECT_LINE_COLUMNS_COUNT) + 1, y, y + 1, GTK_FILL, GTK_FILL, 0, 0); ags_connectable_connect(AGS_CONNECTABLE(line_member)); gtk_widget_show_all((GtkWidget *) line_member); port = port->next; x++; if(x % AGS_EFFECT_LINE_COLUMNS_COUNT == 0){ y++; } } port_descriptor = port_descriptor->next; k++; } return(g_list_concat(g_list_copy(port), g_list_copy(recall_port))); } GList* ags_effect_line_real_add_effect(AgsEffectLine *effect_line, GList *control_type_name, gchar *filename, gchar *effect) { AgsWindow *window; AgsLadspaPlugin *ladspa_plugin; AgsLv2Plugin *lv2_plugin; GList *port; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) effect_line); /* load plugin */ ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), filename, effect); port = NULL; if(ladspa_plugin != NULL){ port = ags_effect_line_add_ladspa_effect(effect_line, control_type_name, filename, effect); }else{ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); if(lv2_plugin != NULL){ port = ags_effect_line_add_lv2_effect(effect_line, control_type_name, filename, effect); } } /* */ ags_automation_toolbar_load_port(window->automation_window->automation_editor->automation_toolbar); return(port); } /** * ags_effect_line_add_effect: * @effect_line: the #AgsEffectLine to modify * @control_type_name: the string representation of a #GType * @filename: the effect's filename * @effect: the effect's name * * Add an effect by its filename and effect specifier. * * Returns: the #GList-struct containing the #AgsPort objects added * * Since: 1.0.0 */ GList* ags_effect_line_add_effect(AgsEffectLine *effect_line, GList *control_type_name, gchar *filename, gchar *effect) { GList *port; g_return_val_if_fail(AGS_IS_EFFECT_LINE(effect_line), NULL); g_object_ref((GObject *) effect_line); g_signal_emit(G_OBJECT(effect_line), effect_line_signals[ADD_EFFECT], 0, control_type_name, filename, effect, &port); g_object_unref((GObject *) effect_line); return(port); } void ags_effect_line_real_remove_effect(AgsEffectLine *effect_line, guint nth) { AgsWindow *window; AgsMachine *machine; AgsMutexManager *mutex_manager; GList *control, *control_start; GList *recall; GList *port; gchar *filename, *effect; gchar **remove_specifier; guint nth_effect, n_bulk; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) effect_line); machine = (AgsMachine *) gtk_widget_get_ancestor((GtkWidget *) effect_line, AGS_TYPE_MACHINE); /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) effect_line->channel); pthread_mutex_unlock(application_mutex); /* get nth_effect */ pthread_mutex_lock(channel_mutex); recall = effect_line->channel->play; nth_effect = 0; n_bulk = 0; while((recall = ags_recall_template_find_all_type(recall, AGS_TYPE_RECALL_LADSPA, AGS_TYPE_RECALL_LV2, G_TYPE_NONE)) != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(recall->data)->flags)) != 0){ nth_effect++; } if((AGS_RECALL_BULK_MODE & (AGS_RECALL(recall->data)->flags)) != 0){ n_bulk++; } if(nth_effect - n_bulk == nth + 1){ break; } recall = recall->next; } if(recall == NULL){ pthread_mutex_unlock(channel_mutex); return; } nth_effect--; /* destroy separator */ filename = NULL; effect = NULL; if(AGS_IS_RECALL_LV2(recall->data)){ filename = AGS_RECALL_LV2(recall->data)->filename; effect = AGS_RECALL_LV2(recall->data)->effect; }else if(AGS_IS_RECALL_LADSPA(recall->data)){ filename = AGS_RECALL_LADSPA(recall->data)->filename; effect = AGS_RECALL_LADSPA(recall->data)->effect; } /* destroy separator */ control_start = control = gtk_container_get_children((GtkContainer *) effect_line->table); while(control != NULL){ gchar *separator_filename; gchar *separator_effect; if(AGS_IS_EFFECT_SEPARATOR(control->data)){ g_object_get(control->data, "filename", &separator_filename, "effect", &separator_effect, NULL); if(separator_filename != NULL && separator_effect != NULL && !g_strcmp0(filename, separator_filename) && !g_strcmp0(effect, separator_effect)){ gtk_widget_destroy(control->data); break; } } control = control->next; } g_list_free(control_start); /* destroy controls */ port = AGS_RECALL(recall->data)->port; remove_specifier = NULL; i = 0; while(port != NULL){ control_start = control = gtk_container_get_children((GtkContainer *) effect_line->table); while(control != NULL){ if(AGS_IS_LINE_MEMBER(control->data) && AGS_LINE_MEMBER(control->data)->port == port->data){ GtkWidget *child_widget; child_widget = gtk_bin_get_child(control->data); /* collect specifier */ if(remove_specifier == NULL){ remove_specifier = (gchar **) malloc(2 * sizeof(gchar *)); }else{ remove_specifier = (gchar **) realloc(remove_specifier, (i + 2) * sizeof(gchar *)); } remove_specifier[i] = g_strdup(AGS_LINE_MEMBER(control->data)->specifier); i++; /* remove widget */ if(AGS_IS_LED(child_widget) || AGS_IS_INDICATOR(child_widget)){ g_hash_table_remove(ags_effect_line_indicator_queue_draw, child_widget); } gtk_widget_destroy(control->data); break; } control = control->next; } g_list_free(control_start); port = port->next; } pthread_mutex_unlock(channel_mutex); if(remove_specifier != NULL){ remove_specifier[i] = NULL; } /* remove recalls */ ags_channel_remove_effect(effect_line->channel, nth_effect); /* reset automation editor */ ags_automation_toolbar_load_port(window->automation_window->automation_editor->automation_toolbar); } /** * ags_effect_line_remove_effect: * @effect_line: the #AgsEffectLine to modify * @nth: the nth effect to remove * * Remove an effect by its position. * * Since: 1.0.0 */ void ags_effect_line_remove_effect(AgsEffectLine *effect_line, guint nth) { g_return_if_fail(AGS_IS_EFFECT_LINE(effect_line)); g_object_ref((GObject *) effect_line); g_signal_emit(G_OBJECT(effect_line), effect_line_signals[REMOVE_EFFECT], 0, nth); g_object_unref((GObject *) effect_line); } void ags_effect_line_real_map_recall(AgsEffectLine *effect_line, guint ouput_pad_start) { if((AGS_EFFECT_LINE_MAPPED_RECALL & (effect_line->flags)) != 0){ return; } effect_line->flags |= AGS_EFFECT_LINE_MAPPED_RECALL; ags_effect_line_find_port(effect_line); } /** * ags_effect_line_map_recall: * @effect_line: the #AgsEffectLine to add its default recall. * @output_pad_start: the start channel's index * * You may want the @effect_line to add its default recall. This function * may call ags_effect_line_find_port(). * * Since: 1.0.0 */ void ags_effect_line_map_recall(AgsEffectLine *effect_line, guint output_pad_start) { g_return_if_fail(AGS_IS_EFFECT_LINE(effect_line)); g_object_ref((GObject *) effect_line); g_signal_emit((GObject *) effect_line, effect_line_signals[MAP_RECALL], 0, output_pad_start); g_object_unref((GObject *) effect_line); } GList* ags_effect_line_real_find_port(AgsEffectLine *effect_line) { GList *port, *tmp_port; GList *line_member, *line_member_start; if(effect_line == NULL || effect_line->table == NULL){ return(NULL); } line_member_start = line_member = gtk_container_get_children(GTK_CONTAINER(effect_line->table)); port = NULL; if(line_member != NULL){ while(line_member != NULL){ if(AGS_IS_LINE_MEMBER(line_member->data)){ tmp_port = ags_line_member_find_port(AGS_LINE_MEMBER(line_member->data)); if(port != NULL){ port = g_list_concat(port, tmp_port); }else{ port = tmp_port; } } line_member = line_member->next; } g_list_free(line_member_start); } return(port); } /** * ags_effect_line_find_port: * @effect_line: the #AgsEffectLine * * Lookup ports of associated recalls. * * Returns: an #GList containing all related #AgsPort * * Since: 1.0.0 */ GList* ags_effect_line_find_port(AgsEffectLine *effect_line) { GList *list; list = NULL; g_return_val_if_fail(AGS_IS_EFFECT_LINE(effect_line), NULL); g_object_ref((GObject *) effect_line); g_signal_emit((GObject *) effect_line, effect_line_signals[FIND_PORT], 0, &list); g_object_unref((GObject *) effect_line); return(list); } /** * ags_effect_line_find_next_grouped: * @effect_line: a #GList-struct of #AgsEffectLine objects * * Retrieve next grouped effect_line. * * Returns: next matching #GList-struct containing #AgsEffectLine * * Since: 1.0.0 */ GList* ags_effect_line_find_next_grouped(GList *effect_line) { while(effect_line != NULL && !gtk_toggle_button_get_active(AGS_EFFECT_LINE(effect_line->data)->group)){ effect_line = effect_line->next; } return(effect_line); } /** * ags_effect_line_indicator_queue_draw_timeout: * @widget: the indicator widgt * * Queue draw widget * * Returns: %TRUE if proceed with redraw, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_effect_line_indicator_queue_draw_timeout(GtkWidget *widget) { if(g_hash_table_lookup(ags_effect_line_indicator_queue_draw, widget) != NULL){ gtk_widget_queue_draw(widget); return(TRUE); }else{ return(FALSE); } } /** * ags_effect_line_new: * @channel: the #AgsChannel to visualize * * Creates an #AgsEffectLine * * Returns: a new #AgsEffectLine * * Since: 1.0.0 */ AgsEffectLine* ags_effect_line_new(AgsChannel *channel) { AgsEffectLine *effect_line; effect_line = (AgsEffectLine *) g_object_new(AGS_TYPE_EFFECT_LINE, "channel", channel, NULL); return(effect_line); } gsequencer-1.4.24/ags/X/ags_bulk_member_callbacks.c0000644000175000017500000000671013246707333017142 00000000000000/* 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 . */ #include int ags_bulk_member_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsBulkMember *bulk_member) { if(old_parent == NULL){ //TODO:JK: implement me } return(0); } void ags_bulk_member_dial_changed_callback(GtkWidget *dial, AgsBulkMember *bulk_member) { GtkAdjustment *adjustment; if((AGS_BULK_MEMBER_NO_UPDATE & (bulk_member->flags)) != 0){ return; } g_object_get(dial, "adjustment", &adjustment, NULL); ags_bulk_member_change_port(bulk_member, (gpointer) &(adjustment->value)); } void ags_bulk_member_vscale_changed_callback(GtkWidget *vscale, AgsBulkMember *bulk_member) { GtkAdjustment *adjustment; if((AGS_BULK_MEMBER_NO_UPDATE & (bulk_member->flags)) != 0){ return; } adjustment = gtk_range_get_adjustment(GTK_RANGE(vscale)); ags_bulk_member_change_port(bulk_member, (gpointer) &(adjustment->value)); } void ags_bulk_member_hscale_changed_callback(GtkWidget *hscale, AgsBulkMember *bulk_member) { GtkAdjustment *adjustment; if((AGS_BULK_MEMBER_NO_UPDATE & (bulk_member->flags)) != 0){ return; } adjustment = gtk_range_get_adjustment(GTK_RANGE(hscale)); ags_bulk_member_change_port(bulk_member, &(adjustment->value)); } void ags_bulk_member_spin_button_changed_callback(GtkWidget *spin_button, AgsBulkMember *bulk_member) { GtkAdjustment *adjustment; if((AGS_BULK_MEMBER_NO_UPDATE & (bulk_member->flags)) != 0){ return; } adjustment = gtk_spin_button_get_adjustment((GtkSpinButton *) spin_button); ags_bulk_member_change_port(bulk_member, &(adjustment->value)); } void ags_bulk_member_check_button_clicked_callback(GtkWidget *check_button, AgsBulkMember *bulk_member) { gboolean active; if((AGS_BULK_MEMBER_NO_UPDATE & (bulk_member->flags)) != 0){ return; } active = gtk_toggle_button_get_active((GtkToggleButton *) check_button); ags_bulk_member_change_port(bulk_member, &(active)); } void ags_bulk_member_toggle_button_clicked_callback(GtkWidget *toggle_button, AgsBulkMember *bulk_member) { gboolean active; if((AGS_BULK_MEMBER_NO_UPDATE & (bulk_member->flags)) != 0){ return; } active = gtk_toggle_button_get_active((GtkToggleButton *) toggle_button); ags_bulk_member_change_port(bulk_member, &(active)); } void ags_bulk_member_button_clicked_callback(GtkWidget *button, AgsBulkMember *bulk_member) { gboolean active; if((AGS_BULK_MEMBER_NO_UPDATE & (bulk_member->flags)) != 0){ return; } ags_bulk_member_change_port(bulk_member, &(active)); } void ags_bulk_member_port_safe_write_callback(AgsPort *port, GValue *value, AgsBulkMember *bulk_member) { //TODO:JK: implement me } gsequencer-1.4.24/ags/X/ags_line_editor_callbacks.h0000644000175000017500000000224513246707333017157 00000000000000/* 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 . */ #ifndef __AGS_LINE_EDITOR_CALLBACKS_H__ #define __AGS_LINE_EDITOR_CALLBACKS_H__ #include #include #include #include int ags_line_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLineEditor *line_editor); int ags_line_editor_show_callback(GtkWidget *widget, AgsLineEditor *line_editor); #endif /*__AGS_LINE_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_connection_editor.h0000644000175000017500000000561213247044247016370 00000000000000/* 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 . */ #ifndef __AGS_CONNECTION_EDITOR_H__ #define __AGS_CONNECTION_EDITOR_H__ #include #include #include #include #include #define AGS_TYPE_CONNECTION_EDITOR (ags_connection_editor_get_type()) #define AGS_CONNECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONNECTION_EDITOR, AgsConnectionEditor)) #define AGS_CONNECTION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CONNECTION_EDITOR, AgsConnectionEditorClass)) #define AGS_IS_CONNECTION_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CONNECTION_EDITOR)) #define AGS_IS_CONNECTION_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CONNECTION_EDITOR)) #define AGS_CONNECTION_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CONNECTION_EDITOR, AgsConnectionEditorClass)) #define AGS_CONNECTION_EDITOR_DEFAULT_VERSION "0.7.65" #define AGS_CONNECTION_EDITOR_DEFAULT_BUILD_ID "Sat Sep 10 07:49:08 CEST 2016" typedef struct _AgsConnectionEditor AgsConnectionEditor; typedef struct _AgsConnectionEditorClass AgsConnectionEditorClass; typedef enum{ AGS_CONNECTION_EDITOR_CLOSING = 1, }AgsConnectionEditorFlags; struct _AgsConnectionEditor { GtkDialog dialog; guint flags; gchar *version; gchar *build_id; AgsMachine *machine; GtkNotebook *notebook; GtkScrolledWindow *output_listing_editor_scrolled_window; AgsPropertyCollectionEditor *output_listing_editor; GtkScrolledWindow *output_connection_editor_scrolled_window; AgsPropertyCollectionEditor *output_connection_editor; GtkButton *apply; GtkButton *ok; GtkButton *cancel; }; struct _AgsConnectionEditorClass { GtkDialogClass dialog; void (*set_machine)(AgsConnectionEditor *connection_editor, AgsMachine *machine); }; GType ags_connection_editor_get_type(void); void ags_connection_editor_set_machine(AgsConnectionEditor *connection_editor, AgsMachine *machine); AgsConnectionEditor* ags_connection_editor_new(AgsMachine *machine); #endif /*__AGS_CONNECTION_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_bulk_member_callbacks.h0000644000175000017500000000356513246707333017154 00000000000000/* 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 . */ #ifndef __AGS_BULK_MEMBER_CALLBACKS_H__ #define __AGS_BULK_MEMBER_CALLBACKS_H__ #include #include #include #include int ags_bulk_member_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsBulkMember *bulk_member); void ags_bulk_member_dial_changed_callback(GtkWidget *dial, AgsBulkMember *bulk_member); void ags_bulk_member_vscale_changed_callback(GtkWidget *vscale, AgsBulkMember *bulk_member); void ags_bulk_member_hscale_changed_callback(GtkWidget *hscale, AgsBulkMember *bulk_member); void ags_bulk_member_spin_button_changed_callback(GtkWidget *spin_button, AgsBulkMember *bulk_member); void ags_bulk_member_check_button_clicked_callback(GtkWidget *check_button, AgsBulkMember *bulk_member); void ags_bulk_member_toggle_button_clicked_callback(GtkWidget *toggle_button, AgsBulkMember *bulk_member); void ags_bulk_member_button_clicked_callback(GtkWidget *button, AgsBulkMember *bulk_member); void ags_bulk_member_port_safe_write_callback(AgsPort *port, GValue *value, AgsBulkMember *bulk_member); #endif /*__AGS_BULK_MEMBER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_effect_separator.h0000644000175000017500000000376613246707333016210 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_EFFECT_SEPARATOR_H__ #define __AGS_EFFECT_SEPARATOR_H__ #include #include #include #define AGS_TYPE_EFFECT_SEPARATOR (ags_effect_separator_get_type()) #define AGS_EFFECT_SEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EFFECT_SEPARATOR, AgsEffectSeparator)) #define AGS_EFFECT_SEPARATOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EFFECT_SEPARATOR, AgsEffectSeparatorClass)) #define AGS_IS_EFFECT_SEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_EFFECT_SEPARATOR)) #define AGS_IS_EFFECT_SEPARATOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_EFFECT_SEPARATOR)) #define AGS_EFFECT_SEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_EFFECT_SEPARATOR, AgsEffectSeparatorClass)) typedef struct _AgsEffectSeparator AgsEffectSeparator; typedef struct _AgsEffectSeparatorClass AgsEffectSeparatorClass; struct _AgsEffectSeparator { GtkHBox hbox; gchar *filename; gchar *effect; GtkLabel *label; }; struct _AgsEffectSeparatorClass { GtkHBoxClass hbox; }; GType ags_effect_separator_get_type(void); AgsEffectSeparator* ags_effect_separator_new(); #endif /*__AGS_EFFECT_SEPARATOR_H__*/ gsequencer-1.4.24/ags/X/ags_output_listing_editor.c0000644000175000017500000003027313247044247017316 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_output_listing_editor_class_init(AgsOutputListingEditorClass *output_listing_editor); void ags_output_listing_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_output_listing_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_output_listing_editor_init(AgsOutputListingEditor *output_listing_editor); void ags_output_listing_editor_connect(AgsConnectable *connectable); void ags_output_listing_editor_disconnect(AgsConnectable *connectable); void ags_output_listing_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_output_listing_editor_apply(AgsApplicable *applicable); void ags_output_listing_editor_reset(AgsApplicable *applicable); void ags_output_listing_editor_destroy(GtkObject *object); void ags_output_listing_editor_show(GtkWidget *widget); /** * SECTION:ags_output_listing_editor * @short_description: pack output editors * @title: AgsOutputListingEditor * @section_id: * @include: ags/X/ags_output_listing_editor.h * * #AgsOutputListingEditor is a composite widget to pack #AgsOutputEditor. */ static gpointer ags_output_listing_editor_parent_class = NULL; static AgsConnectableInterface* ags_output_listing_editor_parent_connectable_interface; GType ags_output_listing_editor_get_type(void) { static GType ags_type_output_listing_editor = 0; if(!ags_type_output_listing_editor){ static const GTypeInfo ags_output_listing_editor_info = { sizeof (AgsOutputListingEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_output_listing_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsOutputListingEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_output_listing_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_output_listing_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_output_listing_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_output_listing_editor = g_type_register_static(AGS_TYPE_PROPERTY_LISTING_EDITOR, "AgsOutputListingEditor", &ags_output_listing_editor_info, 0); g_type_add_interface_static(ags_type_output_listing_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_output_listing_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_output_listing_editor); } void ags_output_listing_editor_class_init(AgsOutputListingEditorClass *output_listing_editor) { } void ags_output_listing_editor_connectable_interface_init(AgsConnectableInterface *connectable) { ags_output_listing_editor_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_output_listing_editor_connect; connectable->disconnect = ags_output_listing_editor_disconnect; } void ags_output_listing_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_output_listing_editor_set_update; applicable->apply = ags_output_listing_editor_apply; applicable->reset = ags_output_listing_editor_reset; } void ags_output_listing_editor_init(AgsOutputListingEditor *output_listing_editor) { g_signal_connect_after(G_OBJECT(output_listing_editor), "parent_set", G_CALLBACK(ags_output_listing_editor_parent_set_callback), output_listing_editor); output_listing_editor->channel_type = G_TYPE_NONE; output_listing_editor->child = NULL; } void ags_output_listing_editor_connect(AgsConnectable *connectable) { AgsConnectionEditor *connection_editor; AgsOutputListingEditor *output_listing_editor; GList *pad_editor, *pad_editor_start; output_listing_editor = AGS_OUTPUT_LISTING_EDITOR(connectable); if((AGS_PROPERTY_EDITOR_CONNECTED & (AGS_PROPERTY_EDITOR(output_listing_editor)->flags)) != 0){ return; } ags_output_listing_editor_parent_connectable_interface->connect(connectable); connection_editor = (AgsConnectionEditor *) gtk_widget_get_ancestor(GTK_WIDGET(output_listing_editor), AGS_TYPE_CONNECTION_EDITOR); if(connection_editor != NULL && connection_editor->machine != NULL){ g_signal_connect_after(G_OBJECT(connection_editor->machine), "resize-pads", G_CALLBACK(ags_output_listing_editor_resize_pads_callback), output_listing_editor); } /* AgsPadEditor */ pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(output_listing_editor->child)); while(pad_editor != NULL){ ags_connectable_connect(AGS_CONNECTABLE(pad_editor->data)); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } void ags_output_listing_editor_disconnect(AgsConnectable *connectable) { AgsConnectionEditor *connection_editor; AgsOutputListingEditor *output_listing_editor; GList *pad_editor, *pad_editor_start; output_listing_editor = AGS_OUTPUT_LISTING_EDITOR(connectable); if((AGS_PROPERTY_EDITOR_CONNECTED & (AGS_PROPERTY_EDITOR(output_listing_editor)->flags)) == 0){ return; } ags_output_listing_editor_parent_connectable_interface->connect(connectable); connection_editor = (AgsConnectionEditor *) gtk_widget_get_ancestor(GTK_WIDGET(output_listing_editor), AGS_TYPE_CONNECTION_EDITOR); if(connection_editor != NULL && connection_editor->machine != NULL){ g_object_disconnect(G_OBJECT(connection_editor->machine), "any_signal::resize-pads", G_CALLBACK(ags_output_listing_editor_resize_pads_callback), output_listing_editor, NULL); } /* AgsPadEditor */ pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(output_listing_editor->child)); while(pad_editor != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(pad_editor->data)); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } void ags_output_listing_editor_set_update(AgsApplicable *applicable, gboolean update) { AgsOutputListingEditor *output_listing_editor; GList *pad_editor, *pad_editor_start; output_listing_editor = AGS_OUTPUT_LISTING_EDITOR(applicable); pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(output_listing_editor->child)); while(pad_editor != NULL){ ags_applicable_set_update(AGS_APPLICABLE(pad_editor->data), update); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } void ags_output_listing_editor_apply(AgsApplicable *applicable) { AgsOutputListingEditor *output_listing_editor; GList *pad_editor, *pad_editor_start; output_listing_editor = AGS_OUTPUT_LISTING_EDITOR(applicable); if((AGS_PROPERTY_EDITOR_ENABLED & (AGS_PROPERTY_EDITOR(output_listing_editor)->flags)) == 0){ return; } pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(output_listing_editor->child)); while(pad_editor != NULL){ ags_applicable_apply(AGS_APPLICABLE(pad_editor->data)); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } void ags_output_listing_editor_reset(AgsApplicable *applicable) { AgsOutputListingEditor *output_listing_editor; GList *pad_editor, *pad_editor_start; output_listing_editor = AGS_OUTPUT_LISTING_EDITOR(applicable); pad_editor_start = pad_editor = gtk_container_get_children(GTK_CONTAINER(output_listing_editor->child)); while(pad_editor != NULL){ ags_applicable_reset(AGS_APPLICABLE(pad_editor->data)); pad_editor = pad_editor->next; } g_list_free(pad_editor_start); } /** * ags_output_listing_editor_add_children: * @output_listing_editor: the #AgsOutputListingEditor * @audio: the #AgsAudio to use * @nth_channel: nth channel to start creation until end * @connect: if %TRUE widget is connected and shown * * Creates new pad editors or destroys them. * * Since: 1.0.0 */ void ags_output_listing_editor_add_children(AgsOutputListingEditor *output_listing_editor, AgsAudio *audio, guint nth_channel, gboolean connect) { AgsPadEditor *pad_editor; GtkVBox *vbox; AgsChannel *channel; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(nth_channel == 0 && output_listing_editor->child != NULL){ vbox = output_listing_editor->child; output_listing_editor->child = NULL; gtk_widget_destroy(GTK_WIDGET(vbox)); } if(audio == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, audio); pthread_mutex_unlock(application_mutex); /* instantiate pad editor vbox */ if(nth_channel == 0){ output_listing_editor->child = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(output_listing_editor), GTK_WIDGET(output_listing_editor->child), FALSE, FALSE, 0); } /* get current channel */ if(output_listing_editor->channel_type == AGS_TYPE_OUTPUT){ pthread_mutex_lock(audio_mutex); channel = audio->output; pthread_mutex_unlock(audio_mutex); channel = ags_channel_nth(channel, nth_channel); }else{ pthread_mutex_lock(audio_mutex); channel = audio->input; pthread_mutex_unlock(audio_mutex); channel = ags_channel_nth(channel, nth_channel); } while(channel != NULL){ /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, channel); pthread_mutex_unlock(application_mutex); /* instantiate pad editor */ pad_editor = ags_pad_editor_new(NULL); pad_editor->editor_type_count = 1; pad_editor->editor_type = (GType *) malloc(pad_editor->editor_type_count * sizeof(GType)); pad_editor->editor_type[0] = AGS_TYPE_OUTPUT_EDITOR; g_object_set(pad_editor, "channel", channel, NULL); gtk_box_pack_start(GTK_BOX(output_listing_editor->child), GTK_WIDGET(pad_editor), FALSE, FALSE, 0); if(connect){ ags_connectable_connect(AGS_CONNECTABLE(pad_editor)); gtk_widget_show_all(GTK_WIDGET(pad_editor)); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next_pad; pthread_mutex_unlock(channel_mutex); } } /** * ags_output_listing_editor_new: * @channel_type: the channel type to represent * * Creates an #AgsOutputListingEditor * * Returns: a new #AgsOutputListingEditor * * Since: 1.0.0 */ AgsOutputListingEditor* ags_output_listing_editor_new(GType channel_type) { AgsOutputListingEditor *output_listing_editor; output_listing_editor = (AgsOutputListingEditor *) g_object_new(AGS_TYPE_OUTPUT_LISTING_EDITOR, NULL); output_listing_editor->channel_type = channel_type; return(output_listing_editor); } gsequencer-1.4.24/ags/X/ags_link_editor_callbacks.h0000644000175000017500000000225113246707333017162 00000000000000/* 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 . */ #ifndef __AGS_LINK_EDITOR_CALLBACKS_H__ #define __AGS_LINK_EDITOR_CALLBACKS_H__ #include #include #include #include int ags_link_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsLinkEditor *link_editor); void ags_link_editor_combo_callback(GtkComboBox *combo, AgsLinkEditor *link_editor); #endif /*__AGS_LINK_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_ladspa_browser_callbacks.h0000644000175000017500000000234113246707333017666 00000000000000/* 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 . */ #ifndef __AGS_LADSPA_BROWSER_CALLBACKS_H__ #define __AGS_LADSPA_BROWSER_CALLBACKS_H__ #include #include #include #include void ags_ladspa_browser_plugin_filename_callback(GtkComboBoxText *combo_box, AgsLadspaBrowser *ladspa_browser); void ags_ladspa_browser_plugin_effect_callback(GtkComboBoxText *combo_box, AgsLadspaBrowser *ladspa_browser); #endif /*__AGS_LADSPA_BROWSER_CALLBACKS_H__*/ gsequencer-1.4.24/ags/X/ags_dssi_browser.c0000644000175000017500000002427113246707333015366 00000000000000/* 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 . */ #include #include #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #include #include #include #include #include #include #include #include void ags_dssi_browser_class_init(AgsDssiBrowserClass *dssi_browser); void ags_dssi_browser_init(AgsDssiBrowser *dssi_browser); void ags_dssi_browser_connectable_interface_init(AgsConnectableInterface *connectable); void ags_dssi_browser_applicable_interface_init(AgsApplicableInterface *applicable); void ags_dssi_browser_connect(AgsConnectable *connectable); void ags_dssi_browser_disconnect(AgsConnectable *connectable); void ags_dssi_browser_set_update(AgsApplicable *applicable, gboolean update); void ags_dssi_browser_apply(AgsApplicable *applicable); void ags_dssi_browser_reset(AgsApplicable *applicable); /** * SECTION:ags_dssi_browser * @short_description: A composite to select dssi effect. * @title: AgsDssiBrowser * @section_id: * @include: ags/X/ags_dssi_browser.h * * #AgsDssiBrowser is a composite widget to select dssi plugin and the desired * effect. */ GType ags_dssi_browser_get_type(void) { static GType ags_type_dssi_browser = 0; if(!ags_type_dssi_browser){ static const GTypeInfo ags_dssi_browser_info = { sizeof (AgsDssiBrowserClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_dssi_browser_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsDssiBrowser), 0, /* n_preallocs */ (GInstanceInitFunc) ags_dssi_browser_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_dssi_browser_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_dssi_browser_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_dssi_browser = g_type_register_static(GTK_TYPE_VBOX, "AgsDssiBrowser", &ags_dssi_browser_info, 0); g_type_add_interface_static(ags_type_dssi_browser, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_dssi_browser, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_dssi_browser); } void ags_dssi_browser_class_init(AgsDssiBrowserClass *dssi_browser) { /* empty */ } void ags_dssi_browser_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_dssi_browser_connect; connectable->disconnect = ags_dssi_browser_disconnect; } void ags_dssi_browser_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_dssi_browser_set_update; applicable->apply = ags_dssi_browser_apply; applicable->reset = ags_dssi_browser_reset; } void ags_dssi_browser_init(AgsDssiBrowser *dssi_browser) { GtkTable *table; GtkComboBoxText *combo_box; GtkLabel *label; AgsDssiManager *dssi_manager; GList *list; gchar *str; gchar **filenames, **filenames_start; dssi_manager = ags_dssi_manager_get_instance(); /* plugin */ dssi_browser->plugin = (GtkHBox *) gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(dssi_browser), GTK_WIDGET(dssi_browser->plugin), FALSE, FALSE, 0); label = (GtkLabel *) gtk_label_new(i18n("filename: ")); gtk_box_pack_start(GTK_BOX(dssi_browser->plugin), GTK_WIDGET(label), FALSE, FALSE, 0); combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(dssi_browser->plugin), GTK_WIDGET(combo_box), FALSE, FALSE, 0); dssi_browser->path = NULL; ags_dssi_manager_load_default_directory(dssi_manager); filenames = filenames_start = ags_dssi_manager_get_filenames(dssi_manager); while(*filenames != NULL){ gtk_combo_box_text_append_text(combo_box, *filenames); filenames++; } free(filenames_start); label = (GtkLabel *) gtk_label_new(i18n("effect: ")); gtk_box_pack_start(GTK_BOX(dssi_browser->plugin), GTK_WIDGET(label), FALSE, FALSE, 0); combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_box_pack_start(GTK_BOX(dssi_browser->plugin), GTK_WIDGET(combo_box), FALSE, FALSE, 0); /* description */ dssi_browser->description = (GtkVBox *) gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(dssi_browser), GTK_WIDGET(dssi_browser->description), FALSE, FALSE, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", i18n("Label: "), NULL); gtk_box_pack_start(GTK_BOX(dssi_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", i18n("Maker: "), NULL); gtk_box_pack_start(GTK_BOX(dssi_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", i18n("Copyright: "), NULL); gtk_box_pack_start(GTK_BOX(dssi_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); label = (GtkLabel *) g_object_new(GTK_TYPE_LABEL, "xalign", 0.0, "label", i18n("Ports: "), NULL); gtk_box_pack_start(GTK_BOX(dssi_browser->description), GTK_WIDGET(label), FALSE, FALSE, 0); table = (GtkTable *) gtk_table_new(256, 2, FALSE); gtk_box_pack_start(GTK_BOX(dssi_browser->description), GTK_WIDGET(table), FALSE, FALSE, 0); } void ags_dssi_browser_connect(AgsConnectable *connectable) { AgsDssiBrowser *dssi_browser; GList *list, *list_start; dssi_browser = AGS_DSSI_BROWSER(connectable); list_start = list = gtk_container_get_children(GTK_CONTAINER(dssi_browser->plugin)); list = list->next; g_signal_connect_after(G_OBJECT(list->data), "changed", G_CALLBACK(ags_dssi_browser_plugin_filename_callback), dssi_browser); list = list->next->next; g_signal_connect_after(G_OBJECT(list->data), "changed", G_CALLBACK(ags_dssi_browser_plugin_effect_callback), dssi_browser); g_list_free(list_start); } void ags_dssi_browser_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_dssi_browser_set_update(AgsApplicable *applicable, gboolean update) { /* empty */ } void ags_dssi_browser_apply(AgsApplicable *applicable) { /* empty */ } void ags_dssi_browser_reset(AgsApplicable *applicable) { AgsDssiBrowser *dssi_browser; GtkComboBoxText *filename; GList *list; dssi_browser = AGS_DSSI_BROWSER(applicable); list = gtk_container_get_children(GTK_CONTAINER(dssi_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); g_list_free(list); gtk_combo_box_set_active((GtkComboBox *) filename, 0); } /** * ags_dssi_browser_get_plugin_filename: * @dssi_browser: the #AgsDssiBrowser * * Retrieve selected dssi plugin filename. * * Returns: the active dssi filename * * Since: 1.0.0 */ gchar* ags_dssi_browser_get_plugin_filename(AgsDssiBrowser *dssi_browser) { GtkComboBoxText *filename; GList *list; list = gtk_container_get_children(GTK_CONTAINER(dssi_browser->plugin)); filename = GTK_COMBO_BOX_TEXT(list->next->data); g_list_free(list); return(gtk_combo_box_text_get_active_text(filename)); } /** * ags_dssi_browser_get_plugin_effect: * @dssi_browser: the #AgsDssiBrowser * * Retrieve selected dssi effect. * * Returns: the active dssi effect * * Since: 1.0.0 */ gchar* ags_dssi_browser_get_plugin_effect(AgsDssiBrowser *dssi_browser) { GtkComboBoxText *effect; GList *list; list = gtk_container_get_children(GTK_CONTAINER(dssi_browser->plugin)); effect = GTK_COMBO_BOX_TEXT(list->next->next->next->data); g_list_free(list); return(gtk_combo_box_text_get_active_text(effect)); } /** * ags_dssi_browser_combo_box_controls_new: * * Creates a #GtkComboBox containing suitable widgets as controls. * * Returns: a new #GtkComboBox * * Since: 1.0.0 */ GtkWidget* ags_dssi_browser_combo_box_controls_new() { GtkComboBoxText *combo_box; combo_box = (GtkComboBoxText *) gtk_combo_box_text_new(); gtk_combo_box_text_append_text(combo_box, "spin button"); gtk_combo_box_text_append_text(combo_box, "dial"); gtk_combo_box_text_append_text(combo_box, "vertical scale"); gtk_combo_box_text_append_text(combo_box, "horizontal scale"); gtk_combo_box_set_active((GtkComboBox *) combo_box, 1); return((GtkWidget *) combo_box); } GtkWidget* ags_dssi_browser_preview_new() { GtkWidget *preview; preview = NULL; //TODO:JK: implement me return(preview); } /** * ags_dssi_browser_new: * * Creates an #AgsDssiBrowser * * Returns: a new #AgsDssiBrowser * * Since: 1.0.0 */ AgsDssiBrowser* ags_dssi_browser_new() { AgsDssiBrowser *dssi_browser; dssi_browser = (AgsDssiBrowser *) g_object_new(AGS_TYPE_DSSI_BROWSER, "homogeneous", FALSE, "spacing", 0, NULL); return(dssi_browser); } gsequencer-1.4.24/ags/X/ags_window_callbacks.c0000644000175000017500000000660413246707333016167 00000000000000/* 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 . */ #include #include #include #include #include #include #include gboolean ags_window_delete_event_callback(GtkWidget *widget, gpointer data) { AgsWindow *window; GtkDialog *dialog; GtkWidget *cancel_button; gint response; window = AGS_WINDOW(widget); /* ask the user if he wants save to a file */ dialog = (GtkDialog *) gtk_message_dialog_new(GTK_WINDOW(window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "Do you want to save '%s'?", window->name); cancel_button = gtk_dialog_add_button(dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_widget_grab_focus(cancel_button); response = gtk_dialog_run(dialog); if(response == GTK_RESPONSE_YES){ AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) window->application_context; if(g_strcmp0(ags_config_get_value(application_context->config, AGS_CONFIG_GENERIC, "simple-file"), "false")){ AgsSimpleFile *simple_file; GError *error; simple_file = (AgsSimpleFile *) g_object_new(AGS_TYPE_SIMPLE_FILE, "application-context", window->application_context, "filename", window->name, NULL); error = NULL; ags_simple_file_rw_open(simple_file, TRUE, &error); ags_simple_file_write(simple_file); ags_simple_file_close(simple_file); g_object_unref(G_OBJECT(simple_file)); }else{ AgsFile *file; GError *error; file = (AgsFile *) g_object_new(AGS_TYPE_FILE, "application-context", window->application_context, "filename", window->name, NULL); error = NULL; ags_file_rw_open(file, TRUE, &error); ags_file_write(file); ags_file_close(file); g_object_unref(G_OBJECT(file)); } } if(response != GTK_RESPONSE_CANCEL){ ags_application_context_quit(AGS_APPLICATION_CONTEXT(window->application_context)); }else{ gtk_widget_destroy(GTK_WIDGET(dialog)); } return(TRUE); } void ags_window_button_press_event(GtkWidget *widget, GdkEventButton *event, AgsWindow *window) { if(event->type == GDK_BUTTON_PRESS && event->button == 3){ gtk_menu_popup(GTK_MENU(window->context_menu), NULL, NULL, NULL, NULL, (event != NULL) ? event->button : 0, gdk_event_get_time((GdkEvent*)event)); } } gsequencer-1.4.24/ags/X/ags_midi_dialog.h0000644000175000017500000000527313246707333015130 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MIDI_DIALOG_H__ #define __AGS_MIDI_DIALOG_H__ #include #include #include #include #define AGS_TYPE_MIDI_DIALOG (ags_midi_dialog_get_type()) #define AGS_MIDI_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIDI_DIALOG, AgsMidiDialog)) #define AGS_MIDI_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MIDI_DIALOG, AgsMidiDialogClass)) #define AGS_IS_MIDI_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MIDI_DIALOG)) #define AGS_IS_MIDI_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MIDI_DIALOG)) #define AGS_MIDI_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MIDI_DIALOG, AgsMidiDialogClass)) #define AGS_MIDI_DIALOG_DEFAULT_VERSION "0.7.0\0" #define AGS_MIDI_DIALOG_DEFAULT_BUILD_ID "CEST 02-11-2015 19:44\0" typedef struct _AgsMidiDialog AgsMidiDialog; typedef struct _AgsMidiDialogClass AgsMidiDialogClass; typedef enum{ AGS_MIDI_DIALOG_CONNECTED = 1, AGS_MIDI_DIALOG_IO_OPTIONS = 1 << 1, AGS_MIDI_DIALOG_MAPPING = 1 << 2, AGS_MIDI_DIALOG_DEVICE = 1 << 3, }AgsMidiDialogFlags; struct _AgsMidiDialog { GtkDialog dialog; guint flags; gchar *version; gchar *build_id; AgsMachine *machine; GtkVBox *io_options; GtkSpinButton *midi_channel; GtkCheckButton *playback; GtkCheckButton *record; GtkVBox *mapping; GtkSpinButton *audio_start; GtkSpinButton *audio_end; GtkSpinButton *midi_start; GtkSpinButton *midi_end; GtkVBox *device; GtkComboBoxText *midi_device; GtkButton *apply; GtkButton *ok; GtkButton *cancel; }; struct _AgsMidiDialogClass { GtkDialogClass dialog; }; GType ags_midi_dialog_get_type(void); void ags_midi_dialog_load_sequencers(AgsMidiDialog *midi_dialog); AgsMidiDialog* ags_midi_dialog_new(AgsMachine *machine); #endif /*__AGS_MIDI_DIALOG_H__*/ gsequencer-1.4.24/ags/X/task/0000755000175000017500000000000013256233676012704 500000000000000gsequencer-1.4.24/ags/X/task/ags_change_tact.h0000644000175000017500000000362413246707333016067 00000000000000/* 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 . */ #ifndef __AGS_CHANGE_TACT_H__ #define __AGS_CHANGE_TACT_H__ #include #include #include #include #define AGS_TYPE_CHANGE_TACT (ags_change_tact_get_type()) #define AGS_CHANGE_TACT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CHANGE_TACT, AgsChangeTact)) #define AGS_CHANGE_TACT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CHANGE_TACT, AgsChangeTactClass)) #define AGS_IS_CHANGE_TACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CHANGE_TACT)) #define AGS_IS_CHANGE_TACT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CHANGE_TACT)) #define AGS_CHANGE_TACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CHANGE_TACT, AgsChangeTactClass)) typedef struct _AgsChangeTact AgsChangeTact; typedef struct _AgsChangeTactClass AgsChangeTactClass; struct _AgsChangeTact { AgsTask task; AgsNavigation *navigation; }; struct _AgsChangeTactClass { AgsTaskClass task; }; GType ags_change_tact_get_type(); AgsChangeTact* ags_change_tact_new(AgsNavigation *navigation); #endif /*__AGS_CHANGE_TACT_H__*/ gsequencer-1.4.24/ags/X/task/ags_add_bulk_member.h0000644000175000017500000000424313246707333016721 00000000000000/* 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 . */ #ifndef __AGS_ADD_BULK_MEMBER_H__ #define __AGS_ADD_BULK_MEMBER_H__ #include #include #include #include #define AGS_TYPE_ADD_BULK_MEMBER (ags_add_bulk_member_get_type()) #define AGS_ADD_BULK_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_BULK_MEMBER, AgsAddBulkMember)) #define AGS_ADD_BULK_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_BULK_MEMBER, AgsAddBulkMemberClass)) #define AGS_IS_ADD_BULK_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_BULK_MEMBER)) #define AGS_IS_ADD_BULK_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_BULK_MEMBER)) #define AGS_ADD_BULK_MEMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_BULK_MEMBER, AgsAddBulkMemberClass)) typedef struct _AgsAddBulkMember AgsAddBulkMember; typedef struct _AgsAddBulkMemberClass AgsAddBulkMemberClass; struct _AgsAddBulkMember { AgsTask task; GtkWidget *effect_bulk; AgsBulkMember *bulk_member; guint x; guint y; guint width; guint height; }; struct _AgsAddBulkMemberClass { AgsTaskClass task; }; GType ags_add_bulk_member_get_type(); AgsAddBulkMember* ags_add_bulk_member_new(GtkWidget *effect_bulk, AgsBulkMember *bulk_member, guint x, guint y, guint width, guint height); #endif /*__AGS_ADD_BULK_MEMBER_H__*/ gsequencer-1.4.24/ags/X/task/ags_update_bulk_member.c0000644000175000017500000003564213246707333017455 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_update_bulk_member_class_init(AgsUpdateBulkMemberClass *update_bulk_member); void ags_update_bulk_member_connectable_interface_init(AgsConnectableInterface *connectable); void ags_update_bulk_member_init(AgsUpdateBulkMember *update_bulk_member); void ags_update_bulk_member_connect(AgsConnectable *connectable); void ags_update_bulk_member_disconnect(AgsConnectable *connectable); void ags_update_bulk_member_finalize(GObject *gobject); void ags_update_bulk_member_launch(AgsTask *task); /** * SECTION:ags_update_bulk_member * @short_description: add line_member object to line * @title: AgsUpdateBulkMember * @section_id: * @include: ags/audio/task/ags_update_bulk_member.h * * The #AgsUpdateBulkMember task addspacks #AgsLineMember to #AgsLine. */ static gpointer ags_update_bulk_member_parent_class = NULL; static AgsConnectableInterface *ags_update_bulk_member_parent_connectable_interface; GType ags_update_bulk_member_get_type() { static GType ags_type_update_bulk_member = 0; if(!ags_type_update_bulk_member){ static const GTypeInfo ags_update_bulk_member_info = { sizeof (AgsUpdateBulkMemberClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_update_bulk_member_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsUpdateBulkMember), 0, /* n_preallocs */ (GInstanceInitFunc) ags_update_bulk_member_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_update_bulk_member_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_update_bulk_member = g_type_register_static(AGS_TYPE_TASK, "AgsUpdateBulkMember", &ags_update_bulk_member_info, 0); g_type_add_interface_static(ags_type_update_bulk_member, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_update_bulk_member); } void ags_update_bulk_member_class_init(AgsUpdateBulkMemberClass *update_bulk_member) { GObjectClass *gobject; AgsTaskClass *task; ags_update_bulk_member_parent_class = g_type_class_peek_parent(update_bulk_member); /* gobject */ gobject = (GObjectClass *) update_bulk_member; gobject->finalize = ags_update_bulk_member_finalize; /* task */ task = (AgsTaskClass *) update_bulk_member; task->launch = ags_update_bulk_member_launch; } void ags_update_bulk_member_connectable_interface_init(AgsConnectableInterface *connectable) { ags_update_bulk_member_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_update_bulk_member_connect; connectable->disconnect = ags_update_bulk_member_disconnect; } void ags_update_bulk_member_init(AgsUpdateBulkMember *update_bulk_member) { update_bulk_member->effect_bulk = NULL; update_bulk_member->bulk_member = NULL; update_bulk_member->new_size = 0; update_bulk_member->old_size = 0; update_bulk_member->pads = FALSE; } void ags_update_bulk_member_connect(AgsConnectable *connectable) { ags_update_bulk_member_parent_connectable_interface->connect(connectable); /* empty */ } void ags_update_bulk_member_disconnect(AgsConnectable *connectable) { ags_update_bulk_member_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_update_bulk_member_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_update_bulk_member_parent_class)->finalize(gobject); /* empty */ } void ags_update_bulk_member_launch(AgsTask *task) { AgsUpdateBulkMember *update_bulk_member; AgsChannel *current; AgsBulkPort *bulk_port; AgsBulkPort *recall_bulk_port; GList *list, *list_next; GList *recall, *play; GList *port, *recall_port; guint pads, pads_old, audio_channels, audio_channels_old; guint i, j, k; update_bulk_member = AGS_UPDATE_BULK_MEMBER(task); if(!update_bulk_member->pads){ audio_channels = update_bulk_member->new_size; audio_channels_old = update_bulk_member->old_size; }else{ audio_channels = AGS_EFFECT_BULK(update_bulk_member->effect_bulk)->audio->audio_channels; audio_channels_old = 0; } /* retrieve channel */ if(AGS_EFFECT_BULK(update_bulk_member->effect_bulk)->channel_type == AGS_TYPE_OUTPUT){ current = AGS_EFFECT_BULK(update_bulk_member->effect_bulk)->audio->output; if(update_bulk_member->pads){ pads = update_bulk_member->new_size; pads_old = update_bulk_member->old_size; }else{ pads = AGS_EFFECT_BULK(update_bulk_member->effect_bulk)->audio->output_pads; pads_old = 0; } }else{ current = AGS_EFFECT_BULK(update_bulk_member->effect_bulk)->audio->input; if(update_bulk_member->pads){ pads = update_bulk_member->new_size; pads_old = update_bulk_member->old_size; }else{ pads = AGS_EFFECT_BULK(update_bulk_member->effect_bulk)->audio->input_pads; pads_old = 0; } } if(update_bulk_member->new_size > update_bulk_member->old_size){ // g_message("%s %s", update_bulk_member->bulk_member->filename, update_bulk_member->bulk_member->effect); /* grow bulk port */ if(update_bulk_member->pads){ current = ags_channel_pad_nth(current, pads_old); } for(i = pads_old; i < pads; i++){ if(!update_bulk_member->pads){ current = ags_channel_nth(current, audio_channels_old); } for(j = audio_channels_old; j < audio_channels; j++){ //TODO:JK: verify list order k = 0; /* play */ play = current->play; while((play = ags_recall_template_find_all_type(play, AGS_TYPE_RECALL_LADSPA, AGS_TYPE_RECALL_DSSI, AGS_TYPE_RECALL_LV2, G_TYPE_NONE)) != NULL){ gboolean apply_port; apply_port = FALSE; if(AGS_IS_RECALL_LADSPA(play->data)){ if(!g_strcmp0(AGS_RECALL_LADSPA(play->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_LADSPA(play->data)->effect, update_bulk_member->bulk_member->effect)){ apply_port = TRUE; }else{ k += g_list_length(AGS_RECALL(recall->data)->port); } }else if(AGS_IS_RECALL_DSSI(play->data)){ if(!g_strcmp0(AGS_RECALL_DSSI(play->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_DSSI(play->data)->effect, update_bulk_member->bulk_member->effect)){ apply_port = TRUE; }else{ k += g_list_length(AGS_RECALL(recall->data)->port); } }else if(AGS_IS_RECALL_LV2(play->data)){ if(!g_strcmp0(AGS_RECALL_LV2(play->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_LV2(play->data)->effect, update_bulk_member->bulk_member->effect)){ apply_port = TRUE; }else{ k += g_list_length(AGS_RECALL(recall->data)->port); } } /* found effect and filename */ if(apply_port){ port = AGS_RECALL(play->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, update_bulk_member->bulk_member->specifier)){ bulk_port = ags_bulk_port_alloc(port->data); if(k != 0){ update_bulk_member->bulk_member->bulk_port = g_list_insert(update_bulk_member->bulk_member->bulk_port, bulk_port, k); }else{ update_bulk_member->bulk_member->bulk_port = g_list_prepend(update_bulk_member->bulk_member->bulk_port, bulk_port); } } k++; port = port->next; } break; } /* iterate */ play = play->next; } /* recall */ recall = current->recall; while((play = ags_recall_template_find_type(play, AGS_TYPE_RECALL_LADSPA)) != NULL){ recall = ags_recall_template_find_all_type(recall, AGS_TYPE_RECALL_LADSPA, AGS_TYPE_RECALL_LV2, G_TYPE_NONE); gboolean apply_port; apply_port = FALSE; if(AGS_IS_RECALL_LADSPA(play->data)){ if(!g_strcmp0(AGS_RECALL_LADSPA(play->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_LADSPA(play->data)->effect, update_bulk_member->bulk_member->effect)){ apply_port = TRUE; }else{ k += g_list_length(AGS_RECALL(recall->data)->port); } }else if(AGS_IS_RECALL_DSSI(play->data)){ if(!g_strcmp0(AGS_RECALL_DSSI(play->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_DSSI(play->data)->effect, update_bulk_member->bulk_member->effect)){ apply_port = TRUE; }else{ k += g_list_length(AGS_RECALL(recall->data)->port); } }else if(AGS_IS_RECALL_LV2(play->data)){ if(!g_strcmp0(AGS_RECALL_LV2(play->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_LV2(play->data)->effect, update_bulk_member->bulk_member->effect)){ apply_port = TRUE; }else{ k += g_list_length(AGS_RECALL(recall->data)->port); } } /* found effect and filename */ if(apply_port){ recall_port = AGS_RECALL(recall->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, update_bulk_member->bulk_member->specifier)){ recall_bulk_port = ags_bulk_port_alloc(recall_port->data); if(k != 0){ update_bulk_member->bulk_member->recall_bulk_port = g_list_insert(update_bulk_member->bulk_member->recall_bulk_port, recall_bulk_port, k); }else{ update_bulk_member->bulk_member->recall_bulk_port = g_list_prepend(update_bulk_member->bulk_member->recall_bulk_port, recall_bulk_port); } } k++; recall_port = recall_port->next; } break; } /* iterate */ recall = recall->next; } /* iterate */ current = current->next; } } }else{ /* shrink bulk port */ if(update_bulk_member->pads){ current = ags_channel_pad_nth(current, pads_old); } for(i = pads_old; i < pads; i++){ if(!update_bulk_member->pads){ current = ags_channel_nth(current, audio_channels_old); } for(j = audio_channels_old; j < audio_channels; j++){ //TODO:JK: verify list order play = current->play; while(play != NULL){ gboolean remove_port; remove_port = FALSE; if(AGS_IS_RECALL_LADSPA(play->data)){ if(!g_strcmp0(AGS_RECALL_LADSPA(play->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_LADSPA(play->data)->effect, update_bulk_member->bulk_member->effect)){ remove_port = TRUE; } }else if(AGS_IS_RECALL_LV2(play->data)){ if(!g_strcmp0(AGS_RECALL_LV2(play->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_LV2(play->data)->effect, update_bulk_member->bulk_member->effect)){ remove_port = TRUE; } } if(remove_port){ list = update_bulk_member->bulk_member->bulk_port; while(list != NULL){ list_next = list->next; port = AGS_RECALL(recall->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, update_bulk_member->bulk_member->specifier)){ goto ags_update_bulk_member_launch_REMOVE_LADSPA_CURRENT_END; } port = port->next; } update_bulk_member->bulk_member->bulk_port = g_list_remove(update_bulk_member->bulk_member->bulk_port, list->data); ags_update_bulk_member_launch_REMOVE_LADSPA_CURRENT_END: list = list_next; } } play = play->next; } /* recall */ recall = current->recall; while(recall != NULL){ gboolean remove_port; remove_port = FALSE; if(AGS_IS_RECALL_LADSPA(recall->data)){ if(!g_strcmp0(AGS_RECALL_LADSPA(recall->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_LADSPA(recall->data)->effect, update_bulk_member->bulk_member->effect)){ remove_port = TRUE; } }else if(AGS_IS_RECALL_DSSI(recall->data)){ if(!g_strcmp0(AGS_RECALL_DSSI(recall->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_DSSI(recall->data)->effect, update_bulk_member->bulk_member->effect)){ remove_port = TRUE; } }else if(AGS_IS_RECALL_LV2(recall->data)){ if(!g_strcmp0(AGS_RECALL_LV2(recall->data)->filename, update_bulk_member->bulk_member->filename) && !g_strcmp0(AGS_RECALL_LV2(recall->data)->effect, update_bulk_member->bulk_member->effect)){ remove_port = TRUE; } } if(remove_port){ list = update_bulk_member->bulk_member->bulk_port; while(list != NULL){ list_next = list->next; port = AGS_RECALL(recall->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, update_bulk_member->bulk_member->specifier)){ goto ags_update_bulk_member_launch_REMOVE_LV2_CURRENT_END; } port = port->next; } update_bulk_member->bulk_member->bulk_port = g_list_remove(update_bulk_member->bulk_member->bulk_port, list->data); ags_update_bulk_member_launch_REMOVE_LV2_CURRENT_END: list = list_next; } } recall = recall->next; } /* iterate */ current = current->next; } } } } AgsUpdateBulkMember* ags_update_bulk_member_new(GtkWidget *effect_bulk, AgsBulkMember *bulk_member, guint new_size, guint old_size, gboolean pads) { AgsUpdateBulkMember *update_bulk_member; update_bulk_member = (AgsUpdateBulkMember *) g_object_new(AGS_TYPE_UPDATE_BULK_MEMBER, NULL); update_bulk_member->effect_bulk = effect_bulk; update_bulk_member->bulk_member = bulk_member; update_bulk_member->new_size = new_size; update_bulk_member->old_size = old_size; update_bulk_member->pads = pads; return(update_bulk_member); } gsequencer-1.4.24/ags/X/task/ags_remove_sequencer_editor_jack.c0000644000175000017500000001543013256163135021522 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_remove_sequencer_editor_jack_class_init(AgsRemoveSequencerEditorJackClass *remove_sequencer_editor_jack); void ags_remove_sequencer_editor_jack_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_sequencer_editor_jack_init(AgsRemoveSequencerEditorJack *remove_sequencer_editor_jack); void ags_remove_sequencer_editor_jack_connect(AgsConnectable *connectable); void ags_remove_sequencer_editor_jack_disconnect(AgsConnectable *connectable); void ags_remove_sequencer_editor_jack_finalize(GObject *gobject); void ags_remove_sequencer_editor_jack_launch(AgsTask *task); /** * SECTION:ags_remove_sequencer_editor_jack * @short_description: remove line_member object to line * @title: AgsRemoveSequencerEditorJack * @section_id: * @include: ags/X/task/ags_remove_sequencer_editor_jack.h * * The #AgsRemoveSequencerEditorJack task removespacks #AgsLineMember to #AgsLine. */ static gpointer ags_remove_sequencer_editor_jack_parent_class = NULL; static AgsConnectableInterface *ags_remove_sequencer_editor_jack_parent_connectable_interface; GType ags_remove_sequencer_editor_jack_get_type() { static GType ags_type_remove_sequencer_editor_jack = 0; if(!ags_type_remove_sequencer_editor_jack){ static const GTypeInfo ags_remove_sequencer_editor_jack_info = { sizeof (AgsRemoveSequencerEditorJackClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_sequencer_editor_jack_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoveSequencerEditorJack), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_sequencer_editor_jack_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_sequencer_editor_jack_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_sequencer_editor_jack = g_type_register_static(AGS_TYPE_TASK, "AgsRemoveSequencerEditorJack", &ags_remove_sequencer_editor_jack_info, 0); g_type_add_interface_static(ags_type_remove_sequencer_editor_jack, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_sequencer_editor_jack); } void ags_remove_sequencer_editor_jack_class_init(AgsRemoveSequencerEditorJackClass *remove_sequencer_editor_jack) { GObjectClass *gobject; AgsTaskClass *task; ags_remove_sequencer_editor_jack_parent_class = g_type_class_peek_parent(remove_sequencer_editor_jack); /* gobject */ gobject = (GObjectClass *) remove_sequencer_editor_jack; gobject->finalize = ags_remove_sequencer_editor_jack_finalize; /* task */ task = (AgsTaskClass *) remove_sequencer_editor_jack; task->launch = ags_remove_sequencer_editor_jack_launch; } void ags_remove_sequencer_editor_jack_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_sequencer_editor_jack_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_sequencer_editor_jack_connect; connectable->disconnect = ags_remove_sequencer_editor_jack_disconnect; } void ags_remove_sequencer_editor_jack_init(AgsRemoveSequencerEditorJack *remove_sequencer_editor_jack) { remove_sequencer_editor_jack->sequencer_editor = NULL; remove_sequencer_editor_jack->card = NULL; } void ags_remove_sequencer_editor_jack_connect(AgsConnectable *connectable) { ags_remove_sequencer_editor_jack_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_sequencer_editor_jack_disconnect(AgsConnectable *connectable) { ags_remove_sequencer_editor_jack_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_sequencer_editor_jack_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_remove_sequencer_editor_jack_parent_class)->finalize(gobject); /* empty */ } void ags_remove_sequencer_editor_jack_launch(AgsTask *task) { AgsWindow *window; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) AGS_REMOVE_SEQUENCER_EDITOR_JACK(task)->sequencer_editor); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) main_loop, AGS_TYPE_GUI_THREAD); /* */ ags_sequencer_editor_remove_source(AGS_REMOVE_SEQUENCER_EDITOR_JACK(task)->sequencer_editor, AGS_REMOVE_SEQUENCER_EDITOR_JACK(task)->card); } /** * ags_remove_sequencer_editor_jack_new: * @sequencer_editor: the #AgsRemoveSequencerEditor * @card: the card to remove * * Creates an #AgsRemoveSequencerEditorJack. * * Returns: an new #AgsRemoveSequencerEditorJack. * * Since: 1.0.0 */ AgsRemoveSequencerEditorJack* ags_remove_sequencer_editor_jack_new(AgsSequencerEditor *sequencer_editor, gchar *card) { AgsRemoveSequencerEditorJack *remove_sequencer_editor_jack; remove_sequencer_editor_jack = (AgsRemoveSequencerEditorJack *) g_object_new(AGS_TYPE_REMOVE_SEQUENCER_EDITOR_JACK, NULL); remove_sequencer_editor_jack->sequencer_editor = sequencer_editor; remove_sequencer_editor_jack->card = card; return(remove_sequencer_editor_jack); } gsequencer-1.4.24/ags/X/task/ags_simple_file_write.c0000644000175000017500000001156313246707333017325 00000000000000/* 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 . */ #include #include #include void ags_simple_file_write_class_init(AgsSimpleFileWriteClass *simple_file_write); void ags_simple_file_write_connectable_interface_init(AgsConnectableInterface *connectable); void ags_simple_file_write_init(AgsSimpleFileWrite *simple_file_write); void ags_simple_file_write_connect(AgsConnectable *connectable); void ags_simple_file_write_disconnect(AgsConnectable *connectable); void ags_simple_file_write_finalize(GObject *gobject); void ags_simple_file_write_launch(AgsTask *task); /** * SECTION:ags_simple_file_write * @short_description: task to write simple file format * @title: AgsSimpleFileWrite * @section_id: * @include: ags/X/task/ags_simple_file_write.h * * #AgsSimpleFileWrite lets you write the simple file format as a task. */ static gpointer ags_simple_file_write_parent_class = NULL; static AgsConnectableInterface *ags_simple_file_write_parent_connectable_interface; GType ags_simple_file_write_get_type() { static GType ags_type_simple_file_write = 0; if(!ags_type_simple_file_write){ static const GTypeInfo ags_simple_file_write_info = { sizeof (AgsSimpleFileWriteClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_simple_file_write_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSimpleFileWrite), 0, /* n_preallocs */ (GInstanceInitFunc) ags_simple_file_write_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_simple_file_write_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_simple_file_write = g_type_register_static(AGS_TYPE_TASK, "AgsSimpleFileWrite", &ags_simple_file_write_info, 0); g_type_add_interface_static(ags_type_simple_file_write, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_simple_file_write); } void ags_simple_file_write_class_init(AgsSimpleFileWriteClass *simple_file_write) { GObjectClass *gobject; AgsTaskClass *task; ags_simple_file_write_parent_class = g_type_class_peek_parent(simple_file_write); /* gobject */ gobject = (GObjectClass *) simple_file_write; gobject->finalize = ags_simple_file_write_finalize; /* task */ task = (AgsTaskClass *) simple_file_write; task->launch = ags_simple_file_write_launch; } void ags_simple_file_write_connectable_interface_init(AgsConnectableInterface *connectable) { ags_simple_file_write_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_simple_file_write_connect; connectable->disconnect = ags_simple_file_write_disconnect; } void ags_simple_file_write_init(AgsSimpleFileWrite *simple_file_write) { simple_file_write->simple_file = NULL; } void ags_simple_file_write_connect(AgsConnectable *connectable) { ags_simple_file_write_parent_connectable_interface->connect(connectable); /* empty */ } void ags_simple_file_write_disconnect(AgsConnectable *connectable) { ags_simple_file_write_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_simple_file_write_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_simple_file_write_parent_class)->finalize(gobject); /* empty */ } void ags_simple_file_write_launch(AgsTask *task) { ags_simple_file_write(AGS_SIMPLE_FILE_WRITE(task)->simple_file); ags_simple_file_close(AGS_SIMPLE_FILE_WRITE(task)->simple_file); g_object_unref(AGS_SIMPLE_FILE_WRITE(task)->simple_file); } /** * ags_simple_file_write_new: * @simple_file: the #AgsSimpleFile * * Create a new task to write the simple file format. * * Returns: the #AgsSimpleFileWrite task * * Since: 1.0.0 */ AgsSimpleFileWrite* ags_simple_file_write_new(AgsSimpleFile *simple_file) { AgsSimpleFileWrite *simple_file_write; simple_file_write = (AgsSimpleFileWrite *) g_object_new(AGS_TYPE_SIMPLE_FILE_WRITE, NULL); simple_file_write->simple_file = simple_file; g_object_ref(simple_file); return(simple_file_write); } gsequencer-1.4.24/ags/X/task/ags_add_line_member.h0000644000175000017500000000422513246707333016713 00000000000000/* 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 . */ #ifndef __AGS_ADD_LINE_MEMBER_H__ #define __AGS_ADD_LINE_MEMBER_H__ #include #include #include #include #define AGS_TYPE_ADD_LINE_MEMBER (ags_add_line_member_get_type()) #define AGS_ADD_LINE_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_LINE_MEMBER, AgsAddLineMember)) #define AGS_ADD_LINE_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_LINE_MEMBER, AgsAddLineMemberClass)) #define AGS_IS_ADD_LINE_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_LINE_MEMBER)) #define AGS_IS_ADD_LINE_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_LINE_MEMBER)) #define AGS_ADD_LINE_MEMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_LINE_MEMBER, AgsAddLineMemberClass)) typedef struct _AgsAddLineMember AgsAddLineMember; typedef struct _AgsAddLineMemberClass AgsAddLineMemberClass; struct _AgsAddLineMember { AgsTask task; GtkWidget *line; AgsLineMember *line_member; guint x; guint y; guint width; guint height; }; struct _AgsAddLineMemberClass { AgsTaskClass task; }; GType ags_add_line_member_get_type(); AgsAddLineMember* ags_add_line_member_new(GtkWidget *line, AgsLineMember *line_member, guint x, guint y, guint width, guint height); #endif /*__AGS_ADD_LINE_MEMBER_H__*/ gsequencer-1.4.24/ags/X/task/ags_display_tact.h0000644000175000017500000000370013246707333016302 00000000000000/* 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 . */ #ifndef __AGS_DISPLAY_TACT_H__ #define __AGS_DISPLAY_TACT_H__ #include #include #include #include #include #define AGS_TYPE_DISPLAY_TACT (ags_display_tact_get_type()) #define AGS_DISPLAY_TACT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DISPLAY_TACT, AgsDisplayTact)) #define AGS_DISPLAY_TACT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_DISPLAY_TACT, AgsDisplayTactClass)) #define AGS_IS_DISPLAY_TACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DISPLAY_TACT)) #define AGS_IS_DISPLAY_TACT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_DISPLAY_TACT)) #define AGS_DISPLAY_TACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_DISPLAY_TACT, AgsDisplayTactClass)) typedef struct _AgsDisplayTact AgsDisplayTact; typedef struct _AgsDisplayTactClass AgsDisplayTactClass; struct _AgsDisplayTact { AgsTask task; GtkWidget *navigation; }; struct _AgsDisplayTactClass { AgsTaskClass task; }; GType ags_display_tact_get_type(); AgsDisplayTact* ags_display_tact_new(GtkWidget *navigation); #endif /*__AGS_DISPLAY_TACT_H__*/ gsequencer-1.4.24/ags/X/task/ags_add_soundcard_editor_sink.h0000644000175000017500000000442613246707333021014 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_SOUNDCARD_EDITOR_SINK_H__ #define __AGS_ADD_SOUNDCARD_EDITOR_SINK_H__ #include #include #include #include #define AGS_TYPE_ADD_SOUNDCARD_EDITOR_SINK (ags_add_soundcard_editor_sink_get_type()) #define AGS_ADD_SOUNDCARD_EDITOR_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_SOUNDCARD_EDITOR_SINK, AgsAddSoundcardEditorSink)) #define AGS_ADD_SOUNDCARD_EDITOR_SINK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_SOUNDCARD_EDITOR_SINK, AgsAddSoundcardEditorSinkClass)) #define AGS_IS_ADD_SOUNDCARD_EDITOR_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_SOUNDCARD_EDITOR_SINK)) #define AGS_IS_ADD_SOUNDCARD_EDITOR_SINK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_SOUNDCARD_EDITOR_SINK)) #define AGS_ADD_SOUNDCARD_EDITOR_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_SOUNDCARD_EDITOR_SINK, AgsAddSoundcardEditorSinkClass)) typedef struct _AgsAddSoundcardEditorSink AgsAddSoundcardEditorSink; typedef struct _AgsAddSoundcardEditorSinkClass AgsAddSoundcardEditorSinkClass; struct _AgsAddSoundcardEditorSink { AgsTask task; AgsSoundcardEditor *soundcard_editor; }; struct _AgsAddSoundcardEditorSinkClass { AgsTaskClass task; }; GType ags_add_soundcard_editor_sink_get_type(); AgsAddSoundcardEditorSink* ags_add_soundcard_editor_sink_new(AgsSoundcardEditor *soundcard_editor); #endif /*__AGS_ADD_SOUNDCARD_EDITOR_SINK_H__*/ gsequencer-1.4.24/ags/X/task/ags_display_tact.c0000644000175000017500000001241513246707333016300 00000000000000/* 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 . */ #include #include #include #include #include void ags_display_tact_class_init(AgsDisplayTactClass *display_tact); void ags_display_tact_connectable_interface_init(AgsConnectableInterface *connectable); void ags_display_tact_init(AgsDisplayTact *display_tact); void ags_display_tact_connect(AgsConnectable *connectable); void ags_display_tact_disconnect(AgsConnectable *connectable); void ags_display_tact_finalize(GObject *gobject); void ags_display_tact_launch(AgsTask *task); /** * SECTION:ags_display_tact * @short_description: display tact object * @title: AgsDisplayTact * @section_id: * @include: ags/audio/task/ags_display_tact.h * * The #AgsDisplayTact task displays #AgsTact and the GUI is updated. */ static gpointer ags_display_tact_parent_class = NULL; static AgsConnectableInterface *ags_display_tact_parent_connectable_interface; GType ags_display_tact_get_type() { static GType ags_type_display_tact = 0; if(!ags_type_display_tact){ static const GTypeInfo ags_display_tact_info = { sizeof (AgsDisplayTactClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_display_tact_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsDisplayTact), 0, /* n_preallocs */ (GInstanceInitFunc) ags_display_tact_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_display_tact_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_display_tact = g_type_register_static(AGS_TYPE_TASK, "AgsDisplayTact", &ags_display_tact_info, 0); g_type_add_interface_static(ags_type_display_tact, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_display_tact); } void ags_display_tact_class_init(AgsDisplayTactClass *display_tact) { GObjectClass *gobject; AgsTaskClass *task; ags_display_tact_parent_class = g_type_class_peek_parent(display_tact); /* gobject */ gobject = (GObjectClass *) display_tact; gobject->finalize = ags_display_tact_finalize; /* task */ task = (AgsTaskClass *) display_tact; task->launch = ags_display_tact_launch; } void ags_display_tact_connectable_interface_init(AgsConnectableInterface *connectable) { ags_display_tact_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_display_tact_connect; connectable->disconnect = ags_display_tact_disconnect; } void ags_display_tact_init(AgsDisplayTact *display_tact) { display_tact->navigation = NULL; } void ags_display_tact_connect(AgsConnectable *connectable) { ags_display_tact_parent_connectable_interface->connect(connectable); /* empty */ } void ags_display_tact_disconnect(AgsConnectable *connectable) { ags_display_tact_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_display_tact_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_display_tact_parent_class)->finalize(gobject); /* empty */ } void ags_display_tact_launch(AgsTask *task) { AgsDisplayTact *display_tact; AgsWindow *window; AgsNavigation *navigation; gchar *timestr; gdouble delay, tact; display_tact = AGS_DISPLAY_TACT(task); navigation = AGS_NAVIGATION(display_tact->navigation); window = (AgsWindow *) gtk_widget_get_ancestor((GtkWidget *) navigation, AGS_TYPE_WINDOW); navigation->note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(window->soundcard)); tact = navigation->note_offset - navigation->start_tact; gdk_window_flush(GTK_WIDGET(navigation->duration_time)->window); timestr = ags_navigation_absolute_tact_to_time_string(tact, ags_soundcard_get_bpm(AGS_SOUNDCARD(window->soundcard)), ags_soundcard_get_delay_factor(AGS_SOUNDCARD(window->soundcard))); gtk_label_set_label(navigation->duration_time, timestr); gtk_widget_queue_draw((GtkWidget *) navigation->duration_time); g_free(timestr); } /** * ags_display_tact_new: * @navigation: the #AgsNavigation to update * * Creates an #AgsDisplayTact. * * Returns: an new #AgsDisplayTact. * * Since: 1.0.0 */ AgsDisplayTact* ags_display_tact_new(GtkWidget *navigation) { AgsDisplayTact *display_tact; display_tact = (AgsDisplayTact *) g_object_new(AGS_TYPE_DISPLAY_TACT, NULL); display_tact->navigation = navigation; return(display_tact); } gsequencer-1.4.24/ags/X/task/ags_add_line_member.c0000644000175000017500000001441413246707333016707 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_add_line_member_class_init(AgsAddLineMemberClass *add_line_member); void ags_add_line_member_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_line_member_init(AgsAddLineMember *add_line_member); void ags_add_line_member_connect(AgsConnectable *connectable); void ags_add_line_member_disconnect(AgsConnectable *connectable); void ags_add_line_member_finalize(GObject *gobject); void ags_add_line_member_launch(AgsTask *task); /** * SECTION:ags_add_line_member * @short_description: add line_member object to line * @title: AgsAddLineMember * @section_id: * @include: ags/audio/task/ags_add_line_member.h * * The #AgsAddLineMember task addspacks #AgsLineMember to #AgsLine. */ static gpointer ags_add_line_member_parent_class = NULL; static AgsConnectableInterface *ags_add_line_member_parent_connectable_interface; GType ags_add_line_member_get_type() { static GType ags_type_add_line_member = 0; if(!ags_type_add_line_member){ static const GTypeInfo ags_add_line_member_info = { sizeof (AgsAddLineMemberClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_line_member_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddLineMember), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_line_member_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_line_member_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_line_member = g_type_register_static(AGS_TYPE_TASK, "AgsAddLineMember", &ags_add_line_member_info, 0); g_type_add_interface_static(ags_type_add_line_member, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_line_member); } void ags_add_line_member_class_init(AgsAddLineMemberClass *add_line_member) { GObjectClass *gobject; AgsTaskClass *task; ags_add_line_member_parent_class = g_type_class_peek_parent(add_line_member); /* gobject */ gobject = (GObjectClass *) add_line_member; gobject->finalize = ags_add_line_member_finalize; /* task */ task = (AgsTaskClass *) add_line_member; task->launch = ags_add_line_member_launch; } void ags_add_line_member_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_line_member_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_line_member_connect; connectable->disconnect = ags_add_line_member_disconnect; } void ags_add_line_member_init(AgsAddLineMember *add_line_member) { add_line_member->line = NULL; add_line_member->line_member = NULL; add_line_member->x = 0; add_line_member->y = 0; add_line_member->width = 0; add_line_member->height = 0; } void ags_add_line_member_connect(AgsConnectable *connectable) { ags_add_line_member_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_line_member_disconnect(AgsConnectable *connectable) { ags_add_line_member_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_line_member_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_add_line_member_parent_class)->finalize(gobject); /* empty */ } void ags_add_line_member_launch(AgsTask *task) { AgsAddLineMember *add_line_member; add_line_member = AGS_ADD_LINE_MEMBER(task); if(AGS_IS_LINE(add_line_member->line)){ ags_expander_add(AGS_LINE(add_line_member->line)->expander, (GtkWidget *) add_line_member->line_member, add_line_member->x, add_line_member->y, add_line_member->width, add_line_member->height); ags_connectable_connect(AGS_CONNECTABLE(add_line_member->line_member)); }else if(AGS_IS_EFFECT_LINE(add_line_member->line)){ gtk_table_attach(AGS_EFFECT_LINE(add_line_member->line)->table, (GtkWidget *) add_line_member->line_member, add_line_member->x, add_line_member->x + add_line_member->width, add_line_member->y, add_line_member->y + add_line_member->height, GTK_FILL, GTK_FILL, 0, 0); ags_connectable_connect(AGS_CONNECTABLE(add_line_member->line_member)); gtk_widget_show_all((GtkWidget *) AGS_EFFECT_LINE(add_line_member->line)->table); }else{ g_warning("ags_add_line_member.c - unknown line type"); } ags_line_member_find_port(add_line_member->line_member); // gtk_widget_set_child_visible(GTK_BIN(add_line_member->line->expander)->child, // TRUE); } /** * ags_add_line_member_new: * @line: the #AgsLine or #AgsEffectLine * @line_member: the #AgsLineMember to add * @x: pack start x * @y: pack start y * @width: pack width * @height: pack height * * Creates an #AgsAddLineMember. * * Returns: an new #AgsAddLineMember. * * Since: 1.0.0 */ AgsAddLineMember* ags_add_line_member_new(GtkWidget *line, AgsLineMember *line_member, guint x, guint y, guint width, guint height) { AgsAddLineMember *add_line_member; add_line_member = (AgsAddLineMember *) g_object_new(AGS_TYPE_ADD_LINE_MEMBER, NULL); add_line_member->line = line; add_line_member->line_member = line_member; add_line_member->x = x; add_line_member->y = y; add_line_member->width = width; add_line_member->height = height; return(add_line_member); } gsequencer-1.4.24/ags/X/task/ags_add_sequencer_editor_jack.h0000644000175000017500000000442613246707333020770 00000000000000/* 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 . */ #ifndef __AGS_ADD_SEQUENCER_EDITOR_JACK_H__ #define __AGS_ADD_SEQUENCER_EDITOR_JACK_H__ #include #include #include #include #define AGS_TYPE_ADD_SEQUENCER_EDITOR_JACK (ags_add_sequencer_editor_jack_get_type()) #define AGS_ADD_SEQUENCER_EDITOR_JACK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_SEQUENCER_EDITOR_JACK, AgsAddSequencerEditorJack)) #define AGS_ADD_SEQUENCER_EDITOR_JACK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_SEQUENCER_EDITOR_JACK, AgsAddSequencerEditorJackClass)) #define AGS_IS_ADD_SEQUENCER_EDITOR_JACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_SEQUENCER_EDITOR_JACK)) #define AGS_IS_ADD_SEQUENCER_EDITOR_JACK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_SEQUENCER_EDITOR_JACK)) #define AGS_ADD_SEQUENCER_EDITOR_JACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_SEQUENCER_EDITOR_JACK, AgsAddSequencerEditorJackClass)) typedef struct _AgsAddSequencerEditorJack AgsAddSequencerEditorJack; typedef struct _AgsAddSequencerEditorJackClass AgsAddSequencerEditorJackClass; struct _AgsAddSequencerEditorJack { AgsTask task; AgsSequencerEditor *sequencer_editor; }; struct _AgsAddSequencerEditorJackClass { AgsTaskClass task; }; GType ags_add_sequencer_editor_jack_get_type(); AgsAddSequencerEditorJack* ags_add_sequencer_editor_jack_new(AgsSequencerEditor *sequencer_editor); #endif /*__AGS_ADD_SEQUENCER_EDITOR_JACK_H__*/ gsequencer-1.4.24/ags/X/task/ags_change_indicator.c0000644000175000017500000001203213246707333017074 00000000000000/* 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 . */ #include #include void ags_change_indicator_class_init(AgsChangeIndicatorClass *change_indicator); void ags_change_indicator_connectable_interface_init(AgsConnectableInterface *connectable); void ags_change_indicator_init(AgsChangeIndicator *change_indicator); void ags_change_indicator_connect(AgsConnectable *connectable); void ags_change_indicator_disconnect(AgsConnectable *connectable); void ags_change_indicator_finalize(GObject *gobject); void ags_change_indicator_launch(AgsTask *task); /** * SECTION:ags_change_indicator * @short_description: change indicator object * @title: AgsChangeIndicator * @section_id: * @include: ags/audio/task/ags_change_indicator.h * * The #AgsChangeIndicator task changes #AgsIndicator and the GUI is updated. */ static gpointer ags_change_indicator_parent_class = NULL; static AgsConnectableInterface *ags_change_indicator_parent_connectable_interface; GType ags_change_indicator_get_type() { static GType ags_type_change_indicator = 0; if(!ags_type_change_indicator){ static const GTypeInfo ags_change_indicator_info = { sizeof (AgsChangeIndicatorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_change_indicator_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsChangeIndicator), 0, /* n_preallocs */ (GInstanceInitFunc) ags_change_indicator_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_change_indicator_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_change_indicator = g_type_register_static(AGS_TYPE_TASK, "AgsChangeIndicator", &ags_change_indicator_info, 0); g_type_add_interface_static(ags_type_change_indicator, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_change_indicator); } void ags_change_indicator_class_init(AgsChangeIndicatorClass *change_indicator) { GObjectClass *gobject; AgsTaskClass *task; ags_change_indicator_parent_class = g_type_class_peek_parent(change_indicator); /* GObject */ gobject = (GObjectClass *) change_indicator; gobject->finalize = ags_change_indicator_finalize; /* AgsTask */ task = (AgsTaskClass *) change_indicator; task->launch = ags_change_indicator_launch; } void ags_change_indicator_connectable_interface_init(AgsConnectableInterface *connectable) { ags_change_indicator_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_change_indicator_connect; connectable->disconnect = ags_change_indicator_disconnect; } void ags_change_indicator_init(AgsChangeIndicator *change_indicator) { change_indicator->indicator = NULL; change_indicator->value = 0.0; } void ags_change_indicator_connect(AgsConnectable *connectable) { ags_change_indicator_parent_connectable_interface->connect(connectable); /* empty */ } void ags_change_indicator_disconnect(AgsConnectable *connectable) { ags_change_indicator_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_change_indicator_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_change_indicator_parent_class)->finalize(gobject); /* empty */ } void ags_change_indicator_launch(AgsTask *task) { AgsChangeIndicator *change_indicator; GtkAdjustment *adjustment; change_indicator = AGS_CHANGE_INDICATOR(task); g_object_get(change_indicator->indicator, "adjustment", &adjustment, NULL); gtk_adjustment_set_value(adjustment, change_indicator->value); gtk_widget_queue_draw((GtkWidget *) change_indicator->indicator); } /** * ags_change_indicator_new: * @indicator: the #AgsIndicator to change * @value: the value to apply * * Creates an #AgsChangeIndicator. * * Returns: an new #AgsChangeIndicator. * * Since: 1.0.0 */ AgsChangeIndicator* ags_change_indicator_new(AgsIndicator *indicator, gdouble value) { AgsChangeIndicator *change_indicator; change_indicator = (AgsChangeIndicator *) g_object_new(AGS_TYPE_CHANGE_INDICATOR, NULL); change_indicator->indicator = indicator; change_indicator->value = value; return(change_indicator); } gsequencer-1.4.24/ags/X/task/ags_change_tact.c0000644000175000017500000001150313246707333016055 00000000000000/* 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 . */ #include #include #include #include void ags_change_tact_class_init(AgsChangeTactClass *change_tact); void ags_change_tact_connectable_interface_init(AgsConnectableInterface *connectable); void ags_change_tact_init(AgsChangeTact *change_tact); void ags_change_tact_connect(AgsConnectable *connectable); void ags_change_tact_disconnect(AgsConnectable *connectable); void ags_change_tact_finalize(GObject *gobject); void ags_change_tact_launch(AgsTask *task); static gpointer ags_change_tact_parent_class = NULL; static AgsConnectableInterface *ags_change_tact_parent_connectable_interface; GType ags_change_tact_get_type() { static GType ags_type_change_tact = 0; if(!ags_type_change_tact){ static const GTypeInfo ags_change_tact_info = { sizeof (AgsChangeTactClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_change_tact_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsChangeTact), 0, /* n_preallocs */ (GInstanceInitFunc) ags_change_tact_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_change_tact_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_change_tact = g_type_register_static(AGS_TYPE_TASK, "AgsChangeTact", &ags_change_tact_info, 0); g_type_add_interface_static(ags_type_change_tact, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_change_tact); } void ags_change_tact_class_init(AgsChangeTactClass *change_tact) { GObjectClass *gobject; AgsTaskClass *task; ags_change_tact_parent_class = g_type_class_peek_parent(change_tact); /* gobject */ gobject = (GObjectClass *) change_tact; gobject->finalize = ags_change_tact_finalize; /* task */ task = (AgsTaskClass *) change_tact; task->launch = ags_change_tact_launch; } void ags_change_tact_connectable_interface_init(AgsConnectableInterface *connectable) { ags_change_tact_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_change_tact_connect; connectable->disconnect = ags_change_tact_disconnect; } void ags_change_tact_init(AgsChangeTact *change_tact) { change_tact->navigation = NULL; } void ags_change_tact_connect(AgsConnectable *connectable) { ags_change_tact_parent_connectable_interface->connect(connectable); /* empty */ } void ags_change_tact_disconnect(AgsConnectable *connectable) { ags_change_tact_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_change_tact_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_change_tact_parent_class)->finalize(gobject); /* empty */ } void ags_change_tact_launch(AgsTask *task) { gdouble tact; if(!gtk_toggle_button_get_active((GtkToggleButton *) AGS_CHANGE_TACT(task)->navigation->scroll)){ return; } AGS_CHANGE_TACT(task)->navigation->flags |= AGS_NAVIGATION_BLOCK_TACT; tact = gtk_spin_button_get_value(AGS_CHANGE_TACT(task)->navigation->position_tact); if(!gtk_toggle_button_get_active((GtkToggleButton *) AGS_CHANGE_TACT(task)->navigation->loop) || tact + AGS_NAVIGATION_DEFAULT_TACT_STEP < gtk_spin_button_get_value(AGS_CHANGE_TACT(task)->navigation->loop_right_tact)){ gtk_spin_button_set_value(AGS_CHANGE_TACT(task)->navigation->position_tact, tact + AGS_NAVIGATION_DEFAULT_TACT_STEP); }else{ gtk_spin_button_set_value(AGS_CHANGE_TACT(task)->navigation->position_tact, gtk_spin_button_get_value(AGS_CHANGE_TACT(task)->navigation->loop_left_tact)); } AGS_CHANGE_TACT(task)->navigation->flags &= (~AGS_NAVIGATION_BLOCK_TACT); } AgsChangeTact* ags_change_tact_new(AgsNavigation *navigation) { AgsChangeTact *change_tact; change_tact = (AgsChangeTact *) g_object_new(AGS_TYPE_CHANGE_TACT, NULL); change_tact->navigation = navigation; return(change_tact); } gsequencer-1.4.24/ags/X/task/ags_remove_soundcard_editor_sink.h0000644000175000017500000000461613246707333021562 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REMOVE_SOUNDCARD_EDITOR_SINK_H__ #define __AGS_REMOVE_SOUNDCARD_EDITOR_SINK_H__ #include #include #include #include #define AGS_TYPE_REMOVE_SOUNDCARD_EDITOR_SINK (ags_remove_soundcard_editor_sink_get_type()) #define AGS_REMOVE_SOUNDCARD_EDITOR_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_SOUNDCARD_EDITOR_SINK, AgsRemoveSoundcardEditorSink)) #define AGS_REMOVE_SOUNDCARD_EDITOR_SINK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_SOUNDCARD_EDITOR_SINK, AgsRemoveSoundcardEditorSinkClass)) #define AGS_IS_REMOVE_SOUNDCARD_EDITOR_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_SOUNDCARD_EDITOR_SINK)) #define AGS_IS_REMOVE_SOUNDCARD_EDITOR_SINK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_SOUNDCARD_EDITOR_SINK)) #define AGS_REMOVE_SOUNDCARD_EDITOR_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_SOUNDCARD_EDITOR_SINK, AgsRemoveSoundcardEditorSinkClass)) typedef struct _AgsRemoveSoundcardEditorSink AgsRemoveSoundcardEditorSink; typedef struct _AgsRemoveSoundcardEditorSinkClass AgsRemoveSoundcardEditorSinkClass; struct _AgsRemoveSoundcardEditorSink { AgsTask task; AgsSoundcardEditor *soundcard_editor; gchar *card; }; struct _AgsRemoveSoundcardEditorSinkClass { AgsTaskClass task; }; GType ags_remove_soundcard_editor_sink_get_type(); AgsRemoveSoundcardEditorSink* ags_remove_soundcard_editor_sink_new(AgsSoundcardEditor *soundcard_editor, gchar *card); #endif /*__AGS_REMOVE_SOUNDCARD_EDITOR_SINK_H__*/ gsequencer-1.4.24/ags/X/task/ags_blink_cell_pattern_cursor.c0000644000175000017500000001342713246707333021054 00000000000000/* 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 . */ #include #include #include void ags_blink_cell_pattern_cursor_class_init(AgsBlinkCellPatternCursorClass *blink_cell_pattern_cursor); void ags_blink_cell_pattern_cursor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_blink_cell_pattern_cursor_init(AgsBlinkCellPatternCursor *blink_cell_pattern_cursor); void ags_blink_cell_pattern_cursor_connect(AgsConnectable *connectable); void ags_blink_cell_pattern_cursor_disconnect(AgsConnectable *connectable); void ags_blink_cell_pattern_cursor_finalize(GObject *gobject); void ags_blink_cell_pattern_cursor_launch(AgsTask *task); /** * SECTION:ags_blink_cell_pattern_cursor * @short_description: toggle led object * @title: AgsBlinkCellPatternCursor * @section_id: * @include: ags/audio/task/ags_blink_cell_pattern_cursor.h * * The #AgsBlinkCellPatternCursor task blinks the cell pattern cursor. */ static gpointer ags_blink_cell_pattern_cursor_parent_class = NULL; static AgsConnectableInterface *ags_blink_cell_pattern_cursor_parent_connectable_interface; GType ags_blink_cell_pattern_cursor_get_type() { static GType ags_type_blink_cell_pattern_cursor = 0; if(!ags_type_blink_cell_pattern_cursor){ static const GTypeInfo ags_blink_cell_pattern_cursor_info = { sizeof (AgsBlinkCellPatternCursorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_blink_cell_pattern_cursor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsBlinkCellPatternCursor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_blink_cell_pattern_cursor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_blink_cell_pattern_cursor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_blink_cell_pattern_cursor = g_type_register_static(AGS_TYPE_TASK, "AgsBlinkCellPatternCursor", &ags_blink_cell_pattern_cursor_info, 0); g_type_add_interface_static(ags_type_blink_cell_pattern_cursor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_blink_cell_pattern_cursor); } void ags_blink_cell_pattern_cursor_class_init(AgsBlinkCellPatternCursorClass *blink_cell_pattern_cursor) { GObjectClass *gobject; AgsTaskClass *task; ags_blink_cell_pattern_cursor_parent_class = g_type_class_peek_parent(blink_cell_pattern_cursor); /* GObject */ gobject = (GObjectClass *) blink_cell_pattern_cursor; gobject->finalize = ags_blink_cell_pattern_cursor_finalize; /* AgsTask */ task = (AgsTaskClass *) blink_cell_pattern_cursor; task->launch = ags_blink_cell_pattern_cursor_launch; } void ags_blink_cell_pattern_cursor_connectable_interface_init(AgsConnectableInterface *connectable) { ags_blink_cell_pattern_cursor_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_blink_cell_pattern_cursor_connect; connectable->disconnect = ags_blink_cell_pattern_cursor_disconnect; } void ags_blink_cell_pattern_cursor_init(AgsBlinkCellPatternCursor *blink_cell_pattern_cursor) { blink_cell_pattern_cursor->cell_pattern = NULL; blink_cell_pattern_cursor->highlight_cursor = FALSE; } void ags_blink_cell_pattern_cursor_connect(AgsConnectable *connectable) { ags_blink_cell_pattern_cursor_parent_connectable_interface->connect(connectable); /* empty */ } void ags_blink_cell_pattern_cursor_disconnect(AgsConnectable *connectable) { ags_blink_cell_pattern_cursor_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_blink_cell_pattern_cursor_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_blink_cell_pattern_cursor_parent_class)->finalize(gobject); /* empty */ } void ags_blink_cell_pattern_cursor_launch(AgsTask *task) { AgsBlinkCellPatternCursor *blink_cell_pattern_cursor; blink_cell_pattern_cursor = AGS_BLINK_CELL_PATTERN_CURSOR(task); if(blink_cell_pattern_cursor->highlight_cursor){ blink_cell_pattern_cursor->cell_pattern->flags |= AGS_CELL_PATTERN_CURSOR_ON; }else{ blink_cell_pattern_cursor->cell_pattern->flags &= (~AGS_CELL_PATTERN_CURSOR_ON); } gtk_widget_queue_draw((GtkWidget *) blink_cell_pattern_cursor->cell_pattern); } /** * ags_blink_cell_pattern_cursor_new: * @cell_pattern: the #AgsCellPattern to blink * @highlight_cursor: %TRUE if highlighted * * Creates an #AgsBlinkCellPatternCursor. * * Returns: an new #AgsBlinkCellPatternCursor. * * Since: 1.0.0 */ AgsBlinkCellPatternCursor* ags_blink_cell_pattern_cursor_new(AgsCellPattern *cell_pattern, gboolean highlight_cursor) { AgsBlinkCellPatternCursor *blink_cell_pattern_cursor; blink_cell_pattern_cursor = (AgsBlinkCellPatternCursor *) g_object_new(AGS_TYPE_BLINK_CELL_PATTERN_CURSOR, NULL); blink_cell_pattern_cursor->cell_pattern = cell_pattern; blink_cell_pattern_cursor->highlight_cursor = highlight_cursor; return(blink_cell_pattern_cursor); } gsequencer-1.4.24/ags/X/task/ags_toggle_led.h0000644000175000017500000000360113246707333015727 00000000000000/* 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 . */ #ifndef __AGS_TOGGLE_LED_H__ #define __AGS_TOGGLE_LED_H__ #include #include #define AGS_TYPE_TOGGLE_LED (ags_toggle_led_get_type()) #define AGS_TOGGLE_LED(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TOGGLE_LED, AgsToggleLed)) #define AGS_TOGGLE_LED_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TOGGLE_LED, AgsToggleLedClass)) #define AGS_IS_TOGGLE_LED(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_TOGGLE_LED)) #define AGS_IS_TOGGLE_LED_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_TOGGLE_LED)) #define AGS_TOGGLE_LED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_TOGGLE_LED, AgsToggleLedClass)) typedef struct _AgsToggleLed AgsToggleLed; typedef struct _AgsToggleLedClass AgsToggleLedClass; struct _AgsToggleLed { AgsTask task; GList *led; guint set_active; guint unset_active; }; struct _AgsToggleLedClass { AgsTaskClass task; }; GType ags_toggle_led_get_type(); AgsToggleLed* ags_toggle_led_new(GList *led, guint set_active, guint unset_active); #endif /*__AGS_TOGGLE_LED_H__*/ gsequencer-1.4.24/ags/X/task/ags_add_soundcard_editor_sink.c0000644000175000017500000001466313246707333021013 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_add_soundcard_editor_sink_class_init(AgsAddSoundcardEditorSinkClass *add_soundcard_editor_sink); void ags_add_soundcard_editor_sink_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_soundcard_editor_sink_init(AgsAddSoundcardEditorSink *add_soundcard_editor_sink); void ags_add_soundcard_editor_sink_connect(AgsConnectable *connectable); void ags_add_soundcard_editor_sink_disconnect(AgsConnectable *connectable); void ags_add_soundcard_editor_sink_finalize(GObject *gobject); void ags_add_soundcard_editor_sink_launch(AgsTask *task); /** * SECTION:ags_add_soundcard_editor_sink * @short_description: add sink to distributed manager * @title: AgsAddSoundcardEditorSink * @section_id: * @include: ags/X/task/ags_add_soundcard_editor_sink.h * * The #AgsAddSoundcardEditorSink task adds #AgsSoundcard to #AgsDistributedManager. */ static gpointer ags_add_soundcard_editor_sink_parent_class = NULL; static AgsConnectableInterface *ags_add_soundcard_editor_sink_parent_connectable_interface; GType ags_add_soundcard_editor_sink_get_type() { static GType ags_type_add_soundcard_editor_sink = 0; if(!ags_type_add_soundcard_editor_sink){ static const GTypeInfo ags_add_soundcard_editor_sink_info = { sizeof (AgsAddSoundcardEditorSinkClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_soundcard_editor_sink_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddSoundcardEditorSink), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_soundcard_editor_sink_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_soundcard_editor_sink_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_soundcard_editor_sink = g_type_register_static(AGS_TYPE_TASK, "AgsAddSoundcardEditorSink", &ags_add_soundcard_editor_sink_info, 0); g_type_add_interface_static(ags_type_add_soundcard_editor_sink, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_soundcard_editor_sink); } void ags_add_soundcard_editor_sink_class_init(AgsAddSoundcardEditorSinkClass *add_soundcard_editor_sink) { GObjectClass *gobject; AgsTaskClass *task; ags_add_soundcard_editor_sink_parent_class = g_type_class_peek_parent(add_soundcard_editor_sink); /* gobject */ gobject = (GObjectClass *) add_soundcard_editor_sink; gobject->finalize = ags_add_soundcard_editor_sink_finalize; /* task */ task = (AgsTaskClass *) add_soundcard_editor_sink; task->launch = ags_add_soundcard_editor_sink_launch; } void ags_add_soundcard_editor_sink_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_soundcard_editor_sink_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_soundcard_editor_sink_connect; connectable->disconnect = ags_add_soundcard_editor_sink_disconnect; } void ags_add_soundcard_editor_sink_init(AgsAddSoundcardEditorSink *add_soundcard_editor_sink) { add_soundcard_editor_sink->soundcard_editor = NULL; } void ags_add_soundcard_editor_sink_connect(AgsConnectable *connectable) { ags_add_soundcard_editor_sink_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_soundcard_editor_sink_disconnect(AgsConnectable *connectable) { ags_add_soundcard_editor_sink_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_soundcard_editor_sink_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_add_soundcard_editor_sink_parent_class)->finalize(gobject); /* empty */ } void ags_add_soundcard_editor_sink_launch(AgsTask *task) { AgsPreferences *preferences; AgsWindow *window; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_toplevel((GtkWidget *) AGS_ADD_SOUNDCARD_EDITOR_SINK(task)->soundcard_editor); window = (AgsWindow *) preferences->window; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) main_loop, AGS_TYPE_GUI_THREAD); ags_soundcard_editor_add_sink(AGS_ADD_SOUNDCARD_EDITOR_SINK(task)->soundcard_editor, NULL); } /** * ags_add_soundcard_editor_sink_new: * @soundcard_editor: the #AgsAddSoundcardEditor * * Creates an #AgsAddSoundcardEditorSink. * * Returns: an new #AgsAddSoundcardEditorSink. * * Since: 1.0.0 */ AgsAddSoundcardEditorSink* ags_add_soundcard_editor_sink_new(AgsSoundcardEditor *soundcard_editor) { AgsAddSoundcardEditorSink *add_soundcard_editor_sink; add_soundcard_editor_sink = (AgsAddSoundcardEditorSink *) g_object_new(AGS_TYPE_ADD_SOUNDCARD_EDITOR_SINK, NULL); add_soundcard_editor_sink->soundcard_editor = soundcard_editor; return(add_soundcard_editor_sink); } gsequencer-1.4.24/ags/X/task/ags_remove_soundcard_editor_sink.c0000644000175000017500000001555613246707333021562 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_remove_soundcard_editor_sink_class_init(AgsRemoveSoundcardEditorSinkClass *remove_soundcard_editor_sink); void ags_remove_soundcard_editor_sink_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_soundcard_editor_sink_init(AgsRemoveSoundcardEditorSink *remove_soundcard_editor_sink); void ags_remove_soundcard_editor_sink_connect(AgsConnectable *connectable); void ags_remove_soundcard_editor_sink_disconnect(AgsConnectable *connectable); void ags_remove_soundcard_editor_sink_finalize(GObject *gobject); void ags_remove_soundcard_editor_sink_launch(AgsTask *task); /** * SECTION:ags_remove_soundcard_editor_sink * @short_description: remove sink of distributed manager * @title: AgsRemoveSoundcardEditorSink * @section_id: * @include: ags/X/task/ags_remove_soundcard_editor_sink.h * * The #AgsRemoveSoundcardEditorSink task removes #AgsSoundcard of #AgsDistributedManager. */ static gpointer ags_remove_soundcard_editor_sink_parent_class = NULL; static AgsConnectableInterface *ags_remove_soundcard_editor_sink_parent_connectable_interface; GType ags_remove_soundcard_editor_sink_get_type() { static GType ags_type_remove_soundcard_editor_sink = 0; if(!ags_type_remove_soundcard_editor_sink){ static const GTypeInfo ags_remove_soundcard_editor_sink_info = { sizeof (AgsRemoveSoundcardEditorSinkClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_soundcard_editor_sink_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoveSoundcardEditorSink), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_soundcard_editor_sink_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_soundcard_editor_sink_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_soundcard_editor_sink = g_type_register_static(AGS_TYPE_TASK, "AgsRemoveSoundcardEditorSink", &ags_remove_soundcard_editor_sink_info, 0); g_type_add_interface_static(ags_type_remove_soundcard_editor_sink, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_soundcard_editor_sink); } void ags_remove_soundcard_editor_sink_class_init(AgsRemoveSoundcardEditorSinkClass *remove_soundcard_editor_sink) { GObjectClass *gobject; AgsTaskClass *task; ags_remove_soundcard_editor_sink_parent_class = g_type_class_peek_parent(remove_soundcard_editor_sink); /* gobject */ gobject = (GObjectClass *) remove_soundcard_editor_sink; gobject->finalize = ags_remove_soundcard_editor_sink_finalize; /* task */ task = (AgsTaskClass *) remove_soundcard_editor_sink; task->launch = ags_remove_soundcard_editor_sink_launch; } void ags_remove_soundcard_editor_sink_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_soundcard_editor_sink_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_soundcard_editor_sink_connect; connectable->disconnect = ags_remove_soundcard_editor_sink_disconnect; } void ags_remove_soundcard_editor_sink_init(AgsRemoveSoundcardEditorSink *remove_soundcard_editor_sink) { remove_soundcard_editor_sink->soundcard_editor = NULL; remove_soundcard_editor_sink->card = NULL; } void ags_remove_soundcard_editor_sink_connect(AgsConnectable *connectable) { ags_remove_soundcard_editor_sink_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_soundcard_editor_sink_disconnect(AgsConnectable *connectable) { ags_remove_soundcard_editor_sink_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_soundcard_editor_sink_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_remove_soundcard_editor_sink_parent_class)->finalize(gobject); /* empty */ } void ags_remove_soundcard_editor_sink_launch(AgsTask *task) { AgsPreferences *preferences; AgsWindow *window; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; preferences = (AgsPreferences *) gtk_widget_get_toplevel((GtkWidget *) AGS_REMOVE_SOUNDCARD_EDITOR_SINK(task)->soundcard_editor); window = (AgsWindow *) preferences->window; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) main_loop, AGS_TYPE_GUI_THREAD); ags_soundcard_editor_remove_sink(AGS_REMOVE_SOUNDCARD_EDITOR_SINK(task)->soundcard_editor, AGS_REMOVE_SOUNDCARD_EDITOR_SINK(task)->card); } /** * ags_remove_soundcard_editor_sink_new: * @soundcard_editor: the #AgsRemoveSoundcardEditor * @card: the card to remove * * Creates an #AgsRemoveSoundcardEditorSink. * * Returns: an new #AgsRemoveSoundcardEditorSink. * * Since: 1.0.0 */ AgsRemoveSoundcardEditorSink* ags_remove_soundcard_editor_sink_new(AgsSoundcardEditor *soundcard_editor, gchar *card) { AgsRemoveSoundcardEditorSink *remove_soundcard_editor_sink; remove_soundcard_editor_sink = (AgsRemoveSoundcardEditorSink *) g_object_new(AGS_TYPE_REMOVE_SOUNDCARD_EDITOR_SINK, NULL); remove_soundcard_editor_sink->soundcard_editor = soundcard_editor; remove_soundcard_editor_sink->card = card; return(remove_soundcard_editor_sink); } gsequencer-1.4.24/ags/X/task/ags_simple_file_read.c0000644000175000017500000001133713246707333017105 00000000000000/* 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 . */ #include #include #include void ags_simple_file_read_class_init(AgsSimpleFileReadClass *simple_file_read); void ags_simple_file_read_connectable_interface_init(AgsConnectableInterface *connectable); void ags_simple_file_read_init(AgsSimpleFileRead *simple_file_read); void ags_simple_file_read_connect(AgsConnectable *connectable); void ags_simple_file_read_disconnect(AgsConnectable *connectable); void ags_simple_file_read_finalize(GObject *gobject); void ags_simple_file_read_launch(AgsTask *task); /** * SECTION:ags_simple_file_read * @short_description: task to read simple file format * @title: AgsSimpleFileRead * @section_id: * @include: ags/X/task/ags_simple_file_read.h * * #AgsSimpleFileRead lets you read the simple file format as a task. */ static gpointer ags_simple_file_read_parent_class = NULL; static AgsConnectableInterface *ags_simple_file_read_parent_connectable_interface; GType ags_simple_file_read_get_type() { static GType ags_type_simple_file_read = 0; if(!ags_type_simple_file_read){ static const GTypeInfo ags_simple_file_read_info = { sizeof (AgsSimpleFileReadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_simple_file_read_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSimpleFileRead), 0, /* n_preallocs */ (GInstanceInitFunc) ags_simple_file_read_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_simple_file_read_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_simple_file_read = g_type_register_static(AGS_TYPE_TASK, "AgsSimpleFileRead", &ags_simple_file_read_info, 0); g_type_add_interface_static(ags_type_simple_file_read, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_simple_file_read); } void ags_simple_file_read_class_init(AgsSimpleFileReadClass *simple_file_read) { GObjectClass *gobject; AgsTaskClass *task; ags_simple_file_read_parent_class = g_type_class_peek_parent(simple_file_read); /* gobject */ gobject = (GObjectClass *) simple_file_read; gobject->finalize = ags_simple_file_read_finalize; /* task */ task = (AgsTaskClass *) simple_file_read; task->launch = ags_simple_file_read_launch; } void ags_simple_file_read_connectable_interface_init(AgsConnectableInterface *connectable) { ags_simple_file_read_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_simple_file_read_connect; connectable->disconnect = ags_simple_file_read_disconnect; } void ags_simple_file_read_init(AgsSimpleFileRead *simple_file_read) { simple_file_read->simple_file = NULL; } void ags_simple_file_read_connect(AgsConnectable *connectable) { ags_simple_file_read_parent_connectable_interface->connect(connectable); /* empty */ } void ags_simple_file_read_disconnect(AgsConnectable *connectable) { ags_simple_file_read_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_simple_file_read_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_simple_file_read_parent_class)->finalize(gobject); /* empty */ } void ags_simple_file_read_launch(AgsTask *task) { ags_simple_file_read(AGS_SIMPLE_FILE_READ(task)->simple_file); ags_simple_file_close(AGS_SIMPLE_FILE_READ(task)->simple_file); } /** * ags_simple_file_read_new: * @simple_file: the #AgsSimpleFile * * Create a new task to read the simple file format. * * Returns: the #AgsSimpleFileRead task * * Since: 1.0.0 */ AgsSimpleFileRead* ags_simple_file_read_new(AgsSimpleFile *simple_file) { AgsSimpleFileRead *simple_file_read; simple_file_read = (AgsSimpleFileRead *) g_object_new(AGS_TYPE_SIMPLE_FILE_READ, NULL); simple_file_read->simple_file = simple_file; return(simple_file_read); } gsequencer-1.4.24/ags/X/task/ags_blink_cell_pattern_cursor.h0000644000175000017500000000454413246707333021061 00000000000000/* 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 . */ #ifndef __AGS_BLINK_CELL_PATTERN_CURSOR_H__ #define __AGS_BLINK_CELL_PATTERN_CURSOR_H__ #include #include #include #include #include #define AGS_TYPE_BLINK_CELL_PATTERN_CURSOR (ags_blink_cell_pattern_cursor_get_type()) #define AGS_BLINK_CELL_PATTERN_CURSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BLINK_CELL_PATTERN_CURSOR, AgsBlinkCellPatternCursor)) #define AGS_BLINK_CELL_PATTERN_CURSOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_BLINK_CELL_PATTERN_CURSOR, AgsBlinkCellPatternCursorClass)) #define AGS_IS_BLINK_CELL_PATTERN_CURSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_BLINK_CELL_PATTERN_CURSOR)) #define AGS_IS_BLINK_CELL_PATTERN_CURSOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_BLINK_CELL_PATTERN_CURSOR)) #define AGS_BLINK_CELL_PATTERN_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_BLINK_CELL_PATTERN_CURSOR, AgsBlinkCellPatternCursorClass)) typedef struct _AgsBlinkCellPatternCursor AgsBlinkCellPatternCursor; typedef struct _AgsBlinkCellPatternCursorClass AgsBlinkCellPatternCursorClass; struct _AgsBlinkCellPatternCursor { AgsTask task; AgsCellPattern *cell_pattern; gboolean highlight_cursor; }; struct _AgsBlinkCellPatternCursorClass { AgsTaskClass task; }; GType ags_blink_cell_pattern_cursor_get_type(); AgsBlinkCellPatternCursor* ags_blink_cell_pattern_cursor_new(AgsCellPattern *cell_pattern, gboolean highlight_cursor); #endif /*__AGS_BLINK_CELL_PATTERN_CURSOR_H__*/ gsequencer-1.4.24/ags/X/task/ags_remove_sequencer_editor_jack.h0000644000175000017500000000461613246707333021536 00000000000000/* 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 . */ #ifndef __AGS_REMOVE_SEQUENCER_EDITOR_JACK_H__ #define __AGS_REMOVE_SEQUENCER_EDITOR_JACK_H__ #include #include #include #include #define AGS_TYPE_REMOVE_SEQUENCER_EDITOR_JACK (ags_remove_sequencer_editor_jack_get_type()) #define AGS_REMOVE_SEQUENCER_EDITOR_JACK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_SEQUENCER_EDITOR_JACK, AgsRemoveSequencerEditorJack)) #define AGS_REMOVE_SEQUENCER_EDITOR_JACK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_SEQUENCER_EDITOR_JACK, AgsRemoveSequencerEditorJackClass)) #define AGS_IS_REMOVE_SEQUENCER_EDITOR_JACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_SEQUENCER_EDITOR_JACK)) #define AGS_IS_REMOVE_SEQUENCER_EDITOR_JACK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_SEQUENCER_EDITOR_JACK)) #define AGS_REMOVE_SEQUENCER_EDITOR_JACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_SEQUENCER_EDITOR_JACK, AgsRemoveSequencerEditorJackClass)) typedef struct _AgsRemoveSequencerEditorJack AgsRemoveSequencerEditorJack; typedef struct _AgsRemoveSequencerEditorJackClass AgsRemoveSequencerEditorJackClass; struct _AgsRemoveSequencerEditorJack { AgsTask task; AgsSequencerEditor *sequencer_editor; gchar *card; }; struct _AgsRemoveSequencerEditorJackClass { AgsTaskClass task; }; GType ags_remove_sequencer_editor_jack_get_type(); AgsRemoveSequencerEditorJack* ags_remove_sequencer_editor_jack_new(AgsSequencerEditor *sequencer_editor, gchar *card); #endif /*__AGS_REMOVE_SEQUENCER_EDITOR_JACK_H__*/ gsequencer-1.4.24/ags/X/task/ags_toggle_led.c0000644000175000017500000001156413246707333015731 00000000000000/* 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 . */ #include #include #include void ags_toggle_led_class_init(AgsToggleLedClass *toggle_led); void ags_toggle_led_connectable_interface_init(AgsConnectableInterface *connectable); void ags_toggle_led_init(AgsToggleLed *toggle_led); void ags_toggle_led_connect(AgsConnectable *connectable); void ags_toggle_led_disconnect(AgsConnectable *connectable); void ags_toggle_led_finalize(GObject *gobject); void ags_toggle_led_launch(AgsTask *task); /** * SECTION:ags_toggle_led * @short_description: toggle led object * @title: AgsToggleLed * @section_id: * @include: ags/audio/task/ags_toggle_led.h * * The #AgsToggleLed task toggles #AgsLed and the GUI is updated. */ static gpointer ags_toggle_led_parent_class = NULL; static AgsConnectableInterface *ags_toggle_led_parent_connectable_interface; GType ags_toggle_led_get_type() { static GType ags_type_toggle_led = 0; if(!ags_type_toggle_led){ static const GTypeInfo ags_toggle_led_info = { sizeof (AgsToggleLedClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_toggle_led_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsToggleLed), 0, /* n_preallocs */ (GInstanceInitFunc) ags_toggle_led_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_toggle_led_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_toggle_led = g_type_register_static(AGS_TYPE_TASK, "AgsToggleLed", &ags_toggle_led_info, 0); g_type_add_interface_static(ags_type_toggle_led, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_toggle_led); } void ags_toggle_led_class_init(AgsToggleLedClass *toggle_led) { GObjectClass *gobject; AgsTaskClass *task; ags_toggle_led_parent_class = g_type_class_peek_parent(toggle_led); /* GObject */ gobject = (GObjectClass *) toggle_led; gobject->finalize = ags_toggle_led_finalize; /* AgsTask */ task = (AgsTaskClass *) toggle_led; task->launch = ags_toggle_led_launch; } void ags_toggle_led_connectable_interface_init(AgsConnectableInterface *connectable) { ags_toggle_led_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_toggle_led_connect; connectable->disconnect = ags_toggle_led_disconnect; } void ags_toggle_led_init(AgsToggleLed *toggle_led) { toggle_led->led = NULL; toggle_led->set_active = 0; toggle_led->unset_active = 0; } void ags_toggle_led_connect(AgsConnectable *connectable) { ags_toggle_led_parent_connectable_interface->connect(connectable); /* empty */ } void ags_toggle_led_disconnect(AgsConnectable *connectable) { ags_toggle_led_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_toggle_led_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_toggle_led_parent_class)->finalize(gobject); /* empty */ } void ags_toggle_led_launch(AgsTask *task) { AgsToggleLed *toggle_led; GList *list, *active; guint i; toggle_led = AGS_TOGGLE_LED(task); list = toggle_led->led; active = NULL; for(i = 0; list != NULL; i++){ if(i == toggle_led->set_active){ active = list; list = list->next; continue; } ags_led_unset_active(AGS_LED(list->data)); list = list->next; } if(active != NULL){ ags_led_set_active(AGS_LED(active->data)); } g_list_free(toggle_led->led); } /** * ags_toggle_led_new: * @led: the #AgsLed to toggle * @set_active: the nth led to activate * @unset_active: the nth led to deactivate * * Creates an #AgsToggleLed. * * Returns: an new #AgsToggleLed. * * Since: 1.0.0 */ AgsToggleLed* ags_toggle_led_new(GList *led, guint set_active, guint unset_active) { AgsToggleLed *toggle_led; toggle_led = (AgsToggleLed *) g_object_new(AGS_TYPE_TOGGLE_LED, NULL); toggle_led->led = led; toggle_led->set_active = set_active; toggle_led->unset_active = unset_active; return(toggle_led); } gsequencer-1.4.24/ags/X/task/ags_update_bulk_member.h0000644000175000017500000000437213246707333017456 00000000000000/* 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 . */ #ifndef __AGS_UPDATE_BULK_MEMBER_H__ #define __AGS_UPDATE_BULK_MEMBER_H__ #include #include #include #include #define AGS_TYPE_UPDATE_BULK_MEMBER (ags_update_bulk_member_get_type()) #define AGS_UPDATE_BULK_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_UPDATE_BULK_MEMBER, AgsUpdateBulkMember)) #define AGS_UPDATE_BULK_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_UPDATE_BULK_MEMBER, AgsUpdateBulkMemberClass)) #define AGS_IS_UPDATE_BULK_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_UPDATE_BULK_MEMBER)) #define AGS_IS_UPDATE_BULK_MEMBER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_UPDATE_BULK_MEMBER)) #define AGS_UPDATE_BULK_MEMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_UPDATE_BULK_MEMBER, AgsUpdateBulkMemberClass)) typedef struct _AgsUpdateBulkMember AgsUpdateBulkMember; typedef struct _AgsUpdateBulkMemberClass AgsUpdateBulkMemberClass; struct _AgsUpdateBulkMember { AgsTask task; GtkWidget *effect_bulk; AgsBulkMember *bulk_member; guint new_size; guint old_size; gboolean pads; }; struct _AgsUpdateBulkMemberClass { AgsTaskClass task; }; GType ags_update_bulk_member_get_type(); AgsUpdateBulkMember* ags_update_bulk_member_new(GtkWidget *effect_bulk, AgsBulkMember *bulk_member, guint new_size, guint old_size, gboolean pads); #endif /*__AGS_UPDATE_BULK_MEMBER_H__*/ gsequencer-1.4.24/ags/X/task/ags_change_indicator.h0000644000175000017500000000413413246707333017105 00000000000000/* 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 . */ #ifndef __AGS_CHANGE_INDICATOR_H__ #define __AGS_CHANGE_INDICATOR_H__ #include #include #include #include #include #define AGS_TYPE_CHANGE_INDICATOR (ags_change_indicator_get_type()) #define AGS_CHANGE_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CHANGE_INDICATOR, AgsChangeIndicator)) #define AGS_CHANGE_INDICATOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CHANGE_INDICATOR, AgsChangeIndicatorClass)) #define AGS_IS_CHANGE_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CHANGE_INDICATOR)) #define AGS_IS_CHANGE_INDICATOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CHANGE_INDICATOR)) #define AGS_CHANGE_INDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CHANGE_INDICATOR, AgsChangeIndicatorClass)) typedef struct _AgsChangeIndicator AgsChangeIndicator; typedef struct _AgsChangeIndicatorClass AgsChangeIndicatorClass; struct _AgsChangeIndicator { AgsTask task; AgsIndicator *indicator; gdouble value; }; struct _AgsChangeIndicatorClass { AgsTaskClass task; }; GType ags_change_indicator_get_type(); AgsChangeIndicator* ags_change_indicator_new(AgsIndicator *indicator, gdouble value); #endif /*__AGS_CHANGE_INDICATOR_H__*/ gsequencer-1.4.24/ags/X/task/ags_simple_file_read.h0000644000175000017500000000403213246707333017104 00000000000000/* 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 . */ #ifndef __AGS_SIMPLE_FILE_READ_H__ #define __AGS_SIMPLE_FILE_READ_H__ #include #include #include #include #define AGS_TYPE_SIMPLE_FILE_READ (ags_simple_file_read_get_type()) #define AGS_SIMPLE_FILE_READ(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SIMPLE_FILE_READ, AgsSimpleFileRead)) #define AGS_SIMPLE_FILE_READ_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SIMPLE_FILE_READ, AgsSimpleFileReadClass)) #define AGS_IS_SIMPLE_FILE_READ(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SIMPLE_FILE_READ)) #define AGS_IS_SIMPLE_FILE_READ_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SIMPLE_FILE_READ)) #define AGS_SIMPLE_FILE_READ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SIMPLE_FILE_READ, AgsSimpleFileReadClass)) typedef struct _AgsSimpleFileRead AgsSimpleFileRead; typedef struct _AgsSimpleFileReadClass AgsSimpleFileReadClass; struct _AgsSimpleFileRead { AgsTask task; AgsSimpleFile *simple_file; }; struct _AgsSimpleFileReadClass { AgsTaskClass task; }; GType ags_simple_file_read_get_type(); AgsSimpleFileRead* ags_simple_file_read_new(AgsSimpleFile *simple_file); #endif /*__AGS_SIMPLE_FILE_READ_H__*/ gsequencer-1.4.24/ags/X/task/ags_simple_file_write.h0000644000175000017500000000406513246707333017331 00000000000000/* 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 . */ #ifndef __AGS_SIMPLE_FILE_WRITE_H__ #define __AGS_SIMPLE_FILE_WRITE_H__ #include #include #include #include #define AGS_TYPE_SIMPLE_FILE_WRITE (ags_simple_file_write_get_type()) #define AGS_SIMPLE_FILE_WRITE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SIMPLE_FILE_WRITE, AgsSimpleFileWrite)) #define AGS_SIMPLE_FILE_WRITE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SIMPLE_FILE_WRITE, AgsSimpleFileWriteClass)) #define AGS_IS_SIMPLE_FILE_WRITE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SIMPLE_FILE_WRITE)) #define AGS_IS_SIMPLE_FILE_WRITE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SIMPLE_FILE_WRITE)) #define AGS_SIMPLE_FILE_WRITE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SIMPLE_FILE_WRITE, AgsSimpleFileWriteClass)) typedef struct _AgsSimpleFileWrite AgsSimpleFileWrite; typedef struct _AgsSimpleFileWriteClass AgsSimpleFileWriteClass; struct _AgsSimpleFileWrite { AgsTask task; AgsSimpleFile *simple_file; }; struct _AgsSimpleFileWriteClass { AgsTaskClass task; }; GType ags_simple_file_write_get_type(); AgsSimpleFileWrite* ags_simple_file_write_new(AgsSimpleFile *simple_file); #endif /*__AGS_SIMPLE_FILE_WRITE_H__*/ gsequencer-1.4.24/ags/X/task/ags_add_sequencer_editor_jack.c0000644000175000017500000001463313256163135020761 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_add_sequencer_editor_jack_class_init(AgsAddSequencerEditorJackClass *add_sequencer_editor_jack); void ags_add_sequencer_editor_jack_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_sequencer_editor_jack_init(AgsAddSequencerEditorJack *add_sequencer_editor_jack); void ags_add_sequencer_editor_jack_connect(AgsConnectable *connectable); void ags_add_sequencer_editor_jack_disconnect(AgsConnectable *connectable); void ags_add_sequencer_editor_jack_finalize(GObject *gobject); void ags_add_sequencer_editor_jack_launch(AgsTask *task); /** * SECTION:ags_add_sequencer_editor_jack * @short_description: add line_member object to line * @title: AgsAddSequencerEditorJack * @section_id: * @include: ags/X/task/ags_add_sequencer_editor_jack.h * * The #AgsAddSequencerEditorJack task addspacks #AgsLineMember to #AgsLine. */ static gpointer ags_add_sequencer_editor_jack_parent_class = NULL; static AgsConnectableInterface *ags_add_sequencer_editor_jack_parent_connectable_interface; GType ags_add_sequencer_editor_jack_get_type() { static GType ags_type_add_sequencer_editor_jack = 0; if(!ags_type_add_sequencer_editor_jack){ static const GTypeInfo ags_add_sequencer_editor_jack_info = { sizeof (AgsAddSequencerEditorJackClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_sequencer_editor_jack_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddSequencerEditorJack), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_sequencer_editor_jack_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_sequencer_editor_jack_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_sequencer_editor_jack = g_type_register_static(AGS_TYPE_TASK, "AgsAddSequencerEditorJack", &ags_add_sequencer_editor_jack_info, 0); g_type_add_interface_static(ags_type_add_sequencer_editor_jack, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_sequencer_editor_jack); } void ags_add_sequencer_editor_jack_class_init(AgsAddSequencerEditorJackClass *add_sequencer_editor_jack) { GObjectClass *gobject; AgsTaskClass *task; ags_add_sequencer_editor_jack_parent_class = g_type_class_peek_parent(add_sequencer_editor_jack); /* gobject */ gobject = (GObjectClass *) add_sequencer_editor_jack; gobject->finalize = ags_add_sequencer_editor_jack_finalize; /* task */ task = (AgsTaskClass *) add_sequencer_editor_jack; task->launch = ags_add_sequencer_editor_jack_launch; } void ags_add_sequencer_editor_jack_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_sequencer_editor_jack_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_sequencer_editor_jack_connect; connectable->disconnect = ags_add_sequencer_editor_jack_disconnect; } void ags_add_sequencer_editor_jack_init(AgsAddSequencerEditorJack *add_sequencer_editor_jack) { add_sequencer_editor_jack->sequencer_editor = NULL; } void ags_add_sequencer_editor_jack_connect(AgsConnectable *connectable) { ags_add_sequencer_editor_jack_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_sequencer_editor_jack_disconnect(AgsConnectable *connectable) { ags_add_sequencer_editor_jack_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_sequencer_editor_jack_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_add_sequencer_editor_jack_parent_class)->finalize(gobject); /* empty */ } void ags_add_sequencer_editor_jack_launch(AgsTask *task) { AgsPreferences *preferences; AgsWindow *window; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; preferences = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) AGS_ADD_SEQUENCER_EDITOR_JACK(task)->sequencer_editor); window = preferences->window; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) main_loop, AGS_TYPE_GUI_THREAD); ags_sequencer_editor_add_source(AGS_ADD_SEQUENCER_EDITOR_JACK(task)->sequencer_editor, NULL); } /** * ags_add_sequencer_editor_jack_new: * @sequencer_editor: the #AgsAddSequencerEditor * * Creates an #AgsAddSequencerEditorJack. * * Returns: an new #AgsAddSequencerEditorJack. * * Since: 1.0.0 */ AgsAddSequencerEditorJack* ags_add_sequencer_editor_jack_new(AgsSequencerEditor *sequencer_editor) { AgsAddSequencerEditorJack *add_sequencer_editor_jack; add_sequencer_editor_jack = (AgsAddSequencerEditorJack *) g_object_new(AGS_TYPE_ADD_SEQUENCER_EDITOR_JACK, NULL); add_sequencer_editor_jack->sequencer_editor = sequencer_editor; return(add_sequencer_editor_jack); } gsequencer-1.4.24/ags/X/task/ags_add_bulk_member.c0000644000175000017500000001547713246707333016727 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_add_bulk_member_class_init(AgsAddBulkMemberClass *add_bulk_member); void ags_add_bulk_member_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_bulk_member_init(AgsAddBulkMember *add_bulk_member); void ags_add_bulk_member_connect(AgsConnectable *connectable); void ags_add_bulk_member_disconnect(AgsConnectable *connectable); void ags_add_bulk_member_finalize(GObject *gobject); void ags_add_bulk_member_launch(AgsTask *task); /** * SECTION:ags_add_bulk_member * @short_description: add line_member object to line * @title: AgsAddBulkMember * @section_id: * @include: ags/X/task/ags_add_bulk_member.h * * The #AgsAddBulkMember task addspacks #AgsLineMember to #AgsLine. */ static gpointer ags_add_bulk_member_parent_class = NULL; static AgsConnectableInterface *ags_add_bulk_member_parent_connectable_interface; GType ags_add_bulk_member_get_type() { static GType ags_type_add_bulk_member = 0; if(!ags_type_add_bulk_member){ static const GTypeInfo ags_add_bulk_member_info = { sizeof (AgsAddBulkMemberClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_bulk_member_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddBulkMember), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_bulk_member_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_bulk_member_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_bulk_member = g_type_register_static(AGS_TYPE_TASK, "AgsAddBulkMember", &ags_add_bulk_member_info, 0); g_type_add_interface_static(ags_type_add_bulk_member, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_bulk_member); } void ags_add_bulk_member_class_init(AgsAddBulkMemberClass *add_bulk_member) { GObjectClass *gobject; AgsTaskClass *task; ags_add_bulk_member_parent_class = g_type_class_peek_parent(add_bulk_member); /* gobject */ gobject = (GObjectClass *) add_bulk_member; gobject->finalize = ags_add_bulk_member_finalize; /* task */ task = (AgsTaskClass *) add_bulk_member; task->launch = ags_add_bulk_member_launch; } void ags_add_bulk_member_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_bulk_member_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_bulk_member_connect; connectable->disconnect = ags_add_bulk_member_disconnect; } void ags_add_bulk_member_init(AgsAddBulkMember *add_bulk_member) { add_bulk_member->effect_bulk = NULL; add_bulk_member->bulk_member = NULL; add_bulk_member->x = 0; add_bulk_member->y = 0; add_bulk_member->width = 0; add_bulk_member->height = 0; } void ags_add_bulk_member_connect(AgsConnectable *connectable) { ags_add_bulk_member_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_bulk_member_disconnect(AgsConnectable *connectable) { ags_add_bulk_member_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_bulk_member_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_add_bulk_member_parent_class)->finalize(gobject); /* empty */ } void ags_add_bulk_member_launch(AgsTask *task) { AgsWindow *window; AgsEffectBridge *effect_bridge; AgsAddBulkMember *add_bulk_member; AgsGuiThread *gui_thread; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsApplicationContext *application_context; AgsChannel *channel; gboolean found_ports; pthread_mutex_t *application_mutex; add_bulk_member = AGS_ADD_BULK_MEMBER(task); window = (AgsWindow *) gtk_widget_get_toplevel((GtkWidget *) add_bulk_member->effect_bulk); application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type((AgsThread *) main_loop, AGS_TYPE_GUI_THREAD); /* */ gtk_table_attach(AGS_EFFECT_BULK(add_bulk_member->effect_bulk)->table, (GtkWidget *) add_bulk_member->bulk_member, add_bulk_member->x, add_bulk_member->x + add_bulk_member->width, add_bulk_member->y, add_bulk_member->y + add_bulk_member->height, GTK_FILL, GTK_FILL, 0, 0); ags_connectable_connect(AGS_CONNECTABLE(add_bulk_member->bulk_member)); gtk_widget_show_all((GtkWidget *) AGS_EFFECT_BULK(add_bulk_member->effect_bulk)->table); /* find ports */ ags_bulk_member_find_port(add_bulk_member->bulk_member); } /** * ags_add_bulk_member_new: * @effect_bulk: the #AgsEffectBulk * @bulk_member: the #AgsBulkMember to add * @x: pack start x * @y: pack start y * @width: pack width * @height: pack height * * Creates an #AgsAddBulkMember. * * Returns: an new #AgsAddBulkMember. * * Since: 1.0.0 */ AgsAddBulkMember* ags_add_bulk_member_new(GtkWidget *effect_bulk, AgsBulkMember *bulk_member, guint x, guint y, guint width, guint height) { AgsAddBulkMember *add_bulk_member; add_bulk_member = (AgsAddBulkMember *) g_object_new(AGS_TYPE_ADD_BULK_MEMBER, NULL); add_bulk_member->effect_bulk = effect_bulk; add_bulk_member->bulk_member = bulk_member; add_bulk_member->x = x; add_bulk_member->y = y; add_bulk_member->width = width; add_bulk_member->height = height; return(add_bulk_member); } gsequencer-1.4.24/ags/X/ags_soundcard_editor_callbacks.c0000644000175000017500000002763313256163135020212 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_soundcard_editor_backend_changed_callback(GtkComboBox *combo, AgsSoundcardEditor *soundcard_editor) { gchar *str; str = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo)); if(str != NULL){ if(!g_ascii_strncasecmp(str, "core-audio", 6)){ ags_soundcard_editor_load_core_audio_card(soundcard_editor); gtk_widget_show_all((GtkWidget *) soundcard_editor->sink_hbox); }else if(!g_ascii_strncasecmp(str, "pulse", 6)){ ags_soundcard_editor_load_pulse_card(soundcard_editor); gtk_widget_show_all((GtkWidget *) soundcard_editor->sink_hbox); }else if(!g_ascii_strncasecmp(str, "jack", 5)){ ags_soundcard_editor_load_jack_card(soundcard_editor); gtk_widget_show_all((GtkWidget *) soundcard_editor->sink_hbox); }else if(!g_ascii_strncasecmp(str, "alsa", 5)){ ags_soundcard_editor_load_alsa_card(soundcard_editor); gtk_widget_hide((GtkWidget *) soundcard_editor->sink_hbox); }else if(!g_ascii_strncasecmp(str, "oss", 4)){ ags_soundcard_editor_load_oss_card(soundcard_editor); gtk_widget_hide((GtkWidget *) soundcard_editor->sink_hbox); } } } void ags_soundcard_editor_card_changed_callback(GtkComboBox *combo, AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; AgsSetOutputDevice *set_output_device; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; GObject *soundcard; GtkTreeIter current; gchar *str; gchar *card; gboolean use_alsa; guint channels, channels_min, channels_max; guint rate, rate_min, rate_max; guint buffer_size, buffer_size_min, buffer_size_max; GError *error; pthread_mutex_t *application_mutex; if((AGS_SOUNDCARD_EDITOR_BLOCK_CARD & (soundcard_editor->flags)) != 0){ return; } soundcard_editor->flags |= AGS_SOUNDCARD_EDITOR_BLOCK_CARD; window = AGS_WINDOW(AGS_PREFERENCES(gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES))->window); soundcard = soundcard_editor->soundcard; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* */ use_alsa = FALSE; str = NULL; if(AGS_IS_CORE_AUDIO_DEVOUT(soundcard)){ str = "core-audio"; }else if(AGS_IS_PULSE_DEVOUT(soundcard)){ str = "pulse"; }else if(AGS_IS_JACK_DEVOUT(soundcard)){ str = "jack"; }else if(AGS_IS_DEVOUT(soundcard)){ if((AGS_DEVOUT_ALSA & (AGS_DEVOUT(soundcard)->flags)) != 0){ str = "alsa"; }else if((AGS_DEVOUT_OSS & (AGS_DEVOUT(soundcard)->flags)) != 0){ str = "oss"; } } if(str != NULL && !g_ascii_strncasecmp(str, "alsa", 5)){ use_alsa = TRUE; } card = gtk_combo_box_text_get_active_text(soundcard_editor->card); /* reset dialog */ error = NULL; ags_soundcard_pcm_info(AGS_SOUNDCARD(soundcard), card, &channels_min, &channels_max, &rate_min, &rate_max, &buffer_size_min, &buffer_size_max, &error); if(error != NULL){ GtkMessageDialog *dialog; dialog = (GtkMessageDialog *) gtk_message_dialog_new((GtkWindow *) gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", error->message); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(GTK_WIDGET(dialog)); gtk_spin_button_set_range(soundcard_editor->audio_channels, 0.0, 24.0); gtk_spin_button_set_range(soundcard_editor->samplerate, 1.0, 192000.0); gtk_spin_button_set_range(soundcard_editor->buffer_size, 1.0, 65535.0); soundcard_editor->flags &= (~AGS_SOUNDCARD_EDITOR_BLOCK_CARD); return; } if(card != NULL){ set_output_device = ags_set_output_device_new(soundcard, card); ags_gui_thread_schedule_task(gui_thread, set_output_device); gtk_spin_button_set_range(soundcard_editor->audio_channels, channels_min, channels_max); gtk_spin_button_set_range(soundcard_editor->samplerate, rate_min, rate_max); gtk_spin_button_set_range(soundcard_editor->buffer_size, buffer_size_min, buffer_size_max); } soundcard_editor->flags &= (~AGS_SOUNDCARD_EDITOR_BLOCK_CARD); } void ags_soundcard_editor_add_sink_callback(GtkWidget *button, AgsSoundcardEditor *soundcard_editor) { ags_soundcard_editor_add_sink(soundcard_editor, NULL); } void ags_soundcard_editor_remove_sink_callback(GtkWidget *button, AgsSoundcardEditor *soundcard_editor) { ags_soundcard_editor_remove_sink(soundcard_editor, gtk_combo_box_text_get_active_text(soundcard_editor->card)); } void ags_soundcard_editor_audio_channels_changed_callback(GtkSpinButton *spin_button, AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; GObject *soundcard; AgsSetAudioChannels *set_audio_channels; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; window = AGS_WINDOW(AGS_PREFERENCES(gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES))->window); soundcard = window->soundcard; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* create set output device task */ set_audio_channels = ags_set_audio_channels_new(soundcard, (guint) gtk_spin_button_get_value(spin_button)); /* append AgsSetAudioChannels */ ags_gui_thread_schedule_task(gui_thread, set_audio_channels); } void ags_soundcard_editor_samplerate_changed_callback(GtkSpinButton *spin_button, AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; GObject *soundcard; AgsSetSamplerate *set_samplerate; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; window = AGS_WINDOW(AGS_PREFERENCES(gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES))->window); soundcard = soundcard_editor->soundcard; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* create set output device task */ set_samplerate = ags_set_samplerate_new(soundcard, (guint) gtk_spin_button_get_value(spin_button)); /* append AgsSetSamplerate */ ags_gui_thread_schedule_task(gui_thread, set_samplerate); } void ags_soundcard_editor_buffer_size_changed_callback(GtkSpinButton *spin_button, AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; GObject *soundcard; AgsSetBufferSize *set_buffer_size; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; window = AGS_WINDOW(AGS_PREFERENCES(gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES))->window); soundcard = soundcard_editor->soundcard; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* create set output device task */ set_buffer_size = ags_set_buffer_size_new(soundcard, (guint) gtk_spin_button_get_value(spin_button)); /* append AgsSetBufferSize */ ags_gui_thread_schedule_task(gui_thread, set_buffer_size); } void ags_soundcard_editor_format_changed_callback(GtkComboBox *combo_box, AgsSoundcardEditor *soundcard_editor) { AgsWindow *window; GObject *soundcard; AgsSetFormat *set_format; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsGuiThread *gui_thread; AgsApplicationContext *application_context; guint format; pthread_mutex_t *application_mutex; window = AGS_WINDOW(AGS_PREFERENCES(gtk_widget_get_ancestor(GTK_WIDGET(soundcard_editor), AGS_TYPE_PREFERENCES))->window); soundcard = soundcard_editor->soundcard; application_context = (AgsApplicationContext *) window->application_context; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task and soundcard thread */ gui_thread = (AgsGuiThread *) ags_thread_find_type(main_loop, AGS_TYPE_GUI_THREAD); /* format */ switch(gtk_combo_box_get_active(GTK_COMBO_BOX(soundcard_editor->format))){ case 0: format = AGS_SOUNDCARD_SIGNED_8_BIT; break; case 1: format = AGS_SOUNDCARD_SIGNED_16_BIT; break; case 2: format = AGS_SOUNDCARD_SIGNED_24_BIT; break; case 3: format = AGS_SOUNDCARD_SIGNED_32_BIT; break; case 4: format = AGS_SOUNDCARD_SIGNED_64_BIT; break; } /* create set output device task */ set_format = ags_set_format_new((GObject *) soundcard, format); /* append AgsSetBufferSize */ ags_gui_thread_schedule_task(gui_thread, set_format); } gsequencer-1.4.24/ags/X/ags_effect_bridge.h0000644000175000017500000000701713247044247015434 00000000000000/* 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 . */ #ifndef __AGS_EFFECT_BRIDGE_H__ #define __AGS_EFFECT_BRIDGE_H__ #include #include #include #include #include #include #define AGS_TYPE_EFFECT_BRIDGE (ags_effect_bridge_get_type()) #define AGS_EFFECT_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EFFECT_BRIDGE, AgsEffectBridge)) #define AGS_EFFECT_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EFFECT_BRIDGE, AgsEffectBridgeClass)) #define AGS_IS_EFFECT_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_EFFECT_BRIDGE)) #define AGS_IS_EFFECT_BRIDGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_EFFECT_BRIDGE)) #define AGS_EFFECT_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_EFFECT_BRIDGE, AgsEffectBridgeClass)) #define AGS_EFFECT_BRIDGE_DEFAULT_VERSION "0.7.8" #define AGS_EFFECT_BRIDGE_DEFAULT_BUILD_ID "CEST 01-03-2016 00:23" #define AGS_EFFECT_BRIDGE_MAX_COLUMNS (2) typedef struct _AgsEffectBridge AgsEffectBridge; typedef struct _AgsEffectBridgeClass AgsEffectBridgeClass; typedef enum{ AGS_EFFECT_BRIDGE_MAPPED_RECALL = 1, AGS_EFFECT_BRIDGE_PREMAPPED_RECALL = 1 << 1, AGS_EFFECT_BRIDGE_CONNECTED = 1 << 2, AGS_EFFECT_BRIDGE_DISPLAY_INPUT = 1 << 3, AGS_EFFECT_BRIDGE_BULK_OUTPUT = 1 << 4, AGS_EFFECT_BRIDGE_DISPLAY_OUTPUT = 1 << 5, AGS_EFFECT_BRIDGE_BULK_INPUT = 1 << 6, }AgsEffectBridgeFlags; struct _AgsEffectBridge { GtkVBox vbox; guint flags; gchar *name; gchar *version; gchar *build_id; AgsAudio *audio; GType bulk_output_type; GtkWidget *bulk_output; GType output_pad_type; GType output_line_type; GtkHBox *output; GType bulk_input_type; GtkWidget *bulk_input; GType input_pad_type; GType input_line_type; GtkHBox *input; }; struct _AgsEffectBridgeClass { GtkVBoxClass vbox; void (*resize_audio_channels)(AgsEffectBridge *effect_bridge, guint new_size, guint old_size); void (*resize_pads)(AgsEffectBridge *effect_bridge, GType channel_type, guint new_size, guint old_size); void (*map_recall)(AgsEffectBridge *effect_bridge); GList* (*find_port)(AgsEffectBridge *effect_bridge); }; GType ags_effect_bridge_get_type(void); void ags_effect_bridge_resize_audio_channels(AgsEffectBridge *effect_bridge, guint new_size, guint old_size); void ags_effect_bridge_resize_pads(AgsEffectBridge *effect_bridge, GType channel_type, guint new_size, guint old_size); void ags_effect_bridge_map_recall(AgsEffectBridge *effect_bridge); GList* ags_effect_bridge_find_port(AgsEffectBridge *effect_bridge); AgsEffectBridge* ags_effect_bridge_new(AgsAudio *audio); #endif /*__AGS_EFFECT_BRIDGE_H__*/ gsequencer-1.4.24/ags/X/ags_plugin_preferences_callbacks.h0000644000175000017500000000177513246707333020550 00000000000000/* 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 . */ #ifndef __AGS_PLUGIN_PREFERENCES_CALLBACKS_H__ #define __AGS_PLUGIN_PREFERENCES_CALLBACKS_H__ #include #include #include #include #endif /*__AGS_PLUGIN_PREFERENCES_CALLBACKS__*/ gsequencer-1.4.24/ags/X/ags_property_listing_editor.h0000644000175000017500000000432013247044247017641 00000000000000/* 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 . */ #ifndef __AGS_PROPERTY_LISTING_EDITOR_H__ #define __AGS_PROPERTY_LISTING_EDITOR_H__ #include #include #include #include #define AGS_TYPE_PROPERTY_LISTING_EDITOR (ags_property_listing_editor_get_type()) #define AGS_PROPERTY_LISTING_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PROPERTY_LISTING_EDITOR, AgsPropertyListingEditor)) #define AGS_PROPERTY_LISTING_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PROPERTY_LISTING_EDITOR, AgsPropertyListingEditorClass)) #define AGS_IS_PROPERTY_LISTING_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PROPERTY_LISTING_EDITOR)) #define AGS_IS_PROPERTY_LISTING_EDITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PROPERTY_LISTING_EDITOR)) #define AGS_PROPERTY_LISTING_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PROPERTY_LISTING_EDITOR, AgsPropertyListingEditorClass)) typedef struct _AgsPropertyListingEditor AgsPropertyListingEditor; typedef struct _AgsPropertyListingEditorClass AgsPropertyListingEditorClass; struct _AgsPropertyListingEditor { AgsPropertyEditor property_editor; GtkVBox *child; }; struct _AgsPropertyListingEditorClass { AgsPropertyEditorClass property_editor; }; GType ags_property_listing_editor_get_type(); AgsPropertyListingEditor* ags_property_listing_editor_new(); #endif /*__AGS_PROPERTY_LISTING_EDITOR_H__*/ gsequencer-1.4.24/ags/X/ags_effect_line.h0000644000175000017500000000700213246707333015122 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_EFFECT_LINE_H__ #define __AGS_EFFECT_LINE_H__ #include #include #include #include #define AGS_TYPE_EFFECT_LINE (ags_effect_line_get_type()) #define AGS_EFFECT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EFFECT_LINE, AgsEffectLine)) #define AGS_EFFECT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EFFECT_LINE, AgsEffectLineClass)) #define AGS_IS_EFFECT_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_EFFECT_LINE)) #define AGS_IS_EFFECT_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_EFFECT_LINE)) #define AGS_EFFECT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_EFFECT_LINE, AgsEffectLineClass)) #define AGS_EFFECT_LINE_DEFAULT_VERSION "0.7.8\0" #define AGS_EFFECT_LINE_DEFAULT_BUILD_ID "CEST 01-03-2016 00:23\0" #define AGS_EFFECT_LINE_COLUMNS_COUNT (2) #define AGS_EFFECT_LINE_SEPARATOR_FILENAME "ags-effect-line-separator-filename\0" #define AGS_EFFECT_LINE_SEPARATOR_EFFECT "ags-effect-line-separator-effect\0" typedef struct _AgsEffectLine AgsEffectLine; typedef struct _AgsEffectLineClass AgsEffectLineClass; typedef enum{ AGS_EFFECT_LINE_CONNECTED = 1, AGS_EFFECT_LINE_MAPPED_RECALL = 1 << 1, AGS_EFFECT_LINE_PREMAPPED_RECALL = 1 << 2, }AgsEffectLineFlags; struct _AgsEffectLine { GtkVBox vbox; guint flags; gchar *name; gchar *version; gchar *build_id; AgsChannel *channel; GtkLabel *label; GtkToggleButton *group; GtkTable *table; GList *queued_drawing; }; struct _AgsEffectLineClass { GtkVBoxClass vbox; void (*set_channel)(AgsEffectLine *effect_line, AgsChannel *channel); GList* (*add_effect)(AgsEffectLine *effect_line, GList *control_type_name, gchar *filename, gchar *effect); void (*remove_effect)(AgsEffectLine *effect_line, guint nth); void (*map_recall)(AgsEffectLine *effect_line, guint output_pad_start); GList* (*find_port)(AgsEffectLine *effect_line); }; GType ags_effect_line_get_type(void); void ags_effect_line_set_channel(AgsEffectLine *effect_line, AgsChannel *channel); GList* ags_effect_line_add_effect(AgsEffectLine *effect_line, GList *control_type_name, gchar *filename, gchar *effect); void ags_effect_line_remove_effect(AgsEffectLine *effect_line, guint nth); void ags_effect_line_map_recall(AgsEffectLine *effect_line, guint output_pad_start); GList* ags_effect_line_find_port(AgsEffectLine *effect_line); GList* ags_effect_line_find_next_grouped(GList *line); gboolean ags_effect_line_indicator_queue_draw_timeout(GtkWidget *widget); AgsEffectLine* ags_effect_line_new(AgsChannel *channel); #endif /*__AGS_EFFECT_LINE_H__*/ gsequencer-1.4.24/ags/X/ags_midi_dialog_callbacks.c0000644000175000017500000000433313246707333017116 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include int ags_midi_dialog_apply_callback(GtkWidget *widget, AgsMidiDialog *midi_dialog) { ags_applicable_apply(AGS_APPLICABLE(midi_dialog)); //TODO:JK: remove me // ags_applicable_reset(AGS_APPLICABLE(midi_dialog)); return(0); } int ags_midi_dialog_ok_callback(GtkWidget *widget, AgsMidiDialog *midi_dialog) { // ags_applicable_set_update(AGS_APPLICABLE(midi_dialog), FALSE); ags_connectable_disconnect(AGS_CONNECTABLE(midi_dialog)); ags_applicable_apply(AGS_APPLICABLE(midi_dialog)); midi_dialog->machine->midi_dialog = NULL; gtk_widget_destroy((GtkWidget *) midi_dialog); return(0); } int ags_midi_dialog_cancel_callback(GtkWidget *widget, AgsMidiDialog *midi_dialog) { midi_dialog->machine->midi_dialog = NULL; gtk_widget_destroy((GtkWidget *) midi_dialog); return(0); } gboolean ags_midi_dialog_delete_event(GtkWidget *widget, GdkEventAny *event, AgsMidiDialog *midi_dialog) { midi_dialog->machine->midi_dialog = NULL; return(TRUE); } gsequencer-1.4.24/ags/X/ags_connection_editor.c0000644000175000017500000003365513246707333016374 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_connection_editor_class_init(AgsConnectionEditorClass *connection_editor); void ags_connection_editor_connectable_interface_init(AgsConnectableInterface *connectable); void ags_connection_editor_applicable_interface_init(AgsApplicableInterface *applicable); void ags_connection_editor_init(AgsConnectionEditor *connection_editor); void ags_connection_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_connection_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_connection_editor_connect(AgsConnectable *connectable); void ags_connection_editor_disconnect(AgsConnectable *connectable); void ags_connection_editor_set_update(AgsApplicable *applicable, gboolean update); void ags_connection_editor_apply(AgsApplicable *applicable); void ags_connection_editor_reset(AgsApplicable *applicable); void ags_connection_editor_real_set_machine(AgsConnectionEditor *connection_editor, AgsMachine *machine); /** * SECTION:ags_connection_editor * @short_description: pack pad editors. * @title: AgsConnectionEditor * @section_id: * @include: ags/X/ags_connection_editor.h * * #AgsConnectionEditor is a composite widget to edit all aspects of #AgsAudio. * It consists of multiple child editors. */ enum{ SET_MACHINE, LAST_SIGNAL, }; enum{ PROP_0, PROP_MACHINE, }; static guint connection_editor_signals[LAST_SIGNAL]; GType ags_connection_editor_get_type(void) { static GType ags_type_connection_editor = 0; if(!ags_type_connection_editor){ static const GTypeInfo ags_connection_editor_info = { sizeof (AgsConnectionEditorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_connection_editor_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsConnectionEditor), 0, /* n_preallocs */ (GInstanceInitFunc) ags_connection_editor_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_connection_editor_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_applicable_interface_info = { (GInterfaceInitFunc) ags_connection_editor_applicable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_connection_editor = g_type_register_static(GTK_TYPE_DIALOG, "AgsConnectionEditor", &ags_connection_editor_info, 0); g_type_add_interface_static(ags_type_connection_editor, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_connection_editor, AGS_TYPE_APPLICABLE, &ags_applicable_interface_info); } return(ags_type_connection_editor); } void ags_connection_editor_class_init(AgsConnectionEditorClass *connection_editor) { GObjectClass *gobject; GParamSpec *param_spec; /* GObjectClass */ gobject = (GObjectClass *) connection_editor; gobject->set_property = ags_connection_editor_set_property; gobject->get_property = ags_connection_editor_get_property; /* properties */ /** * AgsConnection:machine: * * The #AgsMachine to edit. * * Since: 1.0.0 */ param_spec = g_param_spec_object("machine", i18n_pspec("assigned machine"), i18n_pspec("The machine which this machine editor is assigned with"), AGS_TYPE_MACHINE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MACHINE, param_spec); /* AgsConnectionEditorClass */ connection_editor->set_machine = ags_connection_editor_real_set_machine; /* signals */ /** * AgsConnection::set-machine: * @connection_editor: the #AgsConnectionEditor * @machine: the #AgsMachine to set * * The ::set-machine notify about modified machine. */ connection_editor_signals[SET_MACHINE] = g_signal_new("set-machine", G_TYPE_FROM_CLASS (connection_editor), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsConnectionEditorClass, set_machine), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_connection_editor_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_connection_editor_connect; connectable->disconnect = ags_connection_editor_disconnect; } void ags_connection_editor_applicable_interface_init(AgsApplicableInterface *applicable) { applicable->set_update = ags_connection_editor_set_update; applicable->apply = ags_connection_editor_apply; applicable->reset = ags_connection_editor_reset; } void ags_connection_editor_init(AgsConnectionEditor *connection_editor) { GtkNotebook *notebook; GtkScrolledWindow *scrolled_window; gtk_window_set_title((GtkWindow *) connection_editor, i18n("connections")); connection_editor->flags = 0; connection_editor->version = AGS_CONNECTION_EDITOR_DEFAULT_VERSION; connection_editor->build_id = AGS_CONNECTION_EDITOR_DEFAULT_BUILD_ID; connection_editor->machine = NULL; connection_editor->notebook = notebook = (GtkNotebook *) gtk_notebook_new(); gtk_box_pack_start((GtkBox *) connection_editor->dialog.vbox, (GtkWidget*) notebook, TRUE, TRUE, 0); /* output listing editor */ connection_editor->output_listing_editor_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("output"))); /* audio connection editor */ connection_editor->output_connection_editor_scrolled_window = scrolled_window = (GtkScrolledWindow *) gtk_scrolled_window_new(NULL, NULL); gtk_notebook_append_page(notebook, (GtkWidget *) scrolled_window, (GtkWidget *) gtk_label_new(i18n("connect output"))); /* GtkButton's in GtkDialog->action_area */ connection_editor->apply = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_APPLY); gtk_box_pack_start((GtkBox *) connection_editor->dialog.action_area, (GtkWidget *) connection_editor->apply, FALSE, FALSE, 0); connection_editor->ok = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_OK); gtk_box_pack_start((GtkBox *) connection_editor->dialog.action_area, (GtkWidget *) connection_editor->ok, FALSE, FALSE, 0); connection_editor->cancel = (GtkButton *) gtk_button_new_from_stock(GTK_STOCK_CANCEL); gtk_box_pack_start((GtkBox *) connection_editor->dialog.action_area, (GtkWidget *) connection_editor->cancel, FALSE, FALSE, 0); } void ags_connection_editor_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsConnectionEditor *connection_editor; connection_editor = AGS_CONNECTION_EDITOR(gobject); switch(prop_id){ case PROP_MACHINE: { AgsMachine *machine; machine = (AgsMachine *) g_value_get_object(value); ags_connection_editor_set_machine(connection_editor, machine); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_connection_editor_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsConnectionEditor *connection_editor; connection_editor = AGS_CONNECTION_EDITOR(gobject); switch(prop_id){ case PROP_MACHINE: g_value_set_object(value, connection_editor->machine); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_connection_editor_connect(AgsConnectable *connectable) { AgsConnectionEditor *connection_editor; connection_editor = AGS_CONNECTION_EDITOR(connectable); g_signal_connect(connection_editor, "delete-event", G_CALLBACK(ags_connection_editor_delete_event), connection_editor); /* GtkNotebook */ g_signal_connect((GtkNotebook *) connection_editor->notebook, "switch-page", G_CALLBACK(ags_connection_editor_switch_page_callback), (gpointer) connection_editor); /* AgsConnectionEditor tabs */ ags_connectable_connect(AGS_CONNECTABLE(connection_editor->output_listing_editor)); ags_connectable_connect(AGS_CONNECTABLE(connection_editor->output_connection_editor)); /* AgsConnectionEditor buttons */ g_signal_connect((GObject *) connection_editor->apply, "clicked", G_CALLBACK(ags_connection_editor_apply_callback), (gpointer) connection_editor); g_signal_connect((GObject *) connection_editor->ok, "clicked", G_CALLBACK(ags_connection_editor_ok_callback), (gpointer) connection_editor); g_signal_connect((GObject *) connection_editor->cancel, "clicked", G_CALLBACK(ags_connection_editor_cancel_callback), (gpointer) connection_editor); } void ags_connection_editor_disconnect(AgsConnectable *connectable) { AgsConnectionEditor *connection_editor; connection_editor = AGS_CONNECTION_EDITOR(connectable); /* AgsConnectionEditor tabs */ ags_connectable_disconnect(AGS_CONNECTABLE(connection_editor->output_listing_editor)); ags_connectable_disconnect(AGS_CONNECTABLE(connection_editor->output_connection_editor)); } void ags_connection_editor_set_update(AgsApplicable *applicable, gboolean update) { AgsConnectionEditor *connection_editor; connection_editor = AGS_CONNECTION_EDITOR(applicable); ags_applicable_set_update(AGS_APPLICABLE(connection_editor->output_listing_editor), update); ags_applicable_set_update(AGS_APPLICABLE(connection_editor->output_connection_editor), update); } void ags_connection_editor_apply(AgsApplicable *applicable) { AgsConnectionEditor *connection_editor; connection_editor = AGS_CONNECTION_EDITOR(applicable); ags_applicable_apply(AGS_APPLICABLE(connection_editor->output_listing_editor)); ags_applicable_apply(AGS_APPLICABLE(connection_editor->output_connection_editor)); } void ags_connection_editor_reset(AgsApplicable *applicable) { AgsConnectionEditor *connection_editor; connection_editor = AGS_CONNECTION_EDITOR(applicable); ags_applicable_reset(AGS_APPLICABLE(connection_editor->output_listing_editor)); ags_applicable_reset(AGS_APPLICABLE(connection_editor->output_connection_editor)); } /** * ags_connection_editor_add_children: * @connection_editor: the #AgsConnectionEditor * * Add all child editors. * * Since: 1.0.0 */ void ags_connection_editor_add_children(AgsConnectionEditor *connection_editor) { GParameter *output_connection_editor_child_parameter; /* output */ output_connection_editor_child_parameter = g_new0(GParameter, 1); output_connection_editor_child_parameter[0].name = "channel_type"; g_value_init(&(output_connection_editor_child_parameter[0].value), G_TYPE_GTYPE); g_value_set_gtype(&(output_connection_editor_child_parameter[0].value), AGS_TYPE_OUTPUT); /* AgsOutput listing editor */ connection_editor->output_listing_editor = ags_output_listing_editor_new(AGS_TYPE_OUTPUT); gtk_scrolled_window_add_with_viewport(connection_editor->output_listing_editor_scrolled_window, (GtkWidget *) connection_editor->output_listing_editor); /* AgsOutput connection editor */ connection_editor->output_connection_editor = ags_property_collection_editor_new(AGS_TYPE_OUTPUT_COLLECTION_EDITOR, 1, output_connection_editor_child_parameter); gtk_scrolled_window_add_with_viewport(connection_editor->output_connection_editor_scrolled_window, (GtkWidget *) connection_editor->output_connection_editor); } void ags_connection_editor_real_set_machine(AgsConnectionEditor *connection_editor, AgsMachine *machine) { if(connection_editor->machine != NULL){ gtk_widget_destroy(GTK_WIDGET(connection_editor->output_listing_editor)); gtk_widget_destroy(GTK_WIDGET(connection_editor->output_connection_editor)); } connection_editor->machine = machine; if(machine != NULL){ ags_connection_editor_add_children(connection_editor); } } /** * ags_connection_editor_set_machine: * @connection_editor: an #AgsConnectionEditor * @machine: the new #AgsMachine * * Is emitted as machine gets modified. * * Since: 1.0.0 */ void ags_connection_editor_set_machine(AgsConnectionEditor *connection_editor, AgsMachine *machine) { g_return_if_fail(AGS_IS_CONNECTION_EDITOR(connection_editor)); g_object_ref((GObject *) connection_editor); g_signal_emit(G_OBJECT(connection_editor), connection_editor_signals[SET_MACHINE], 0, machine); g_object_unref((GObject *) connection_editor); } /** * ags_connection_editor_new: * @machine: the assigned machine. * * Creates an #AgsConnectionEditor * * Returns: a new #AgsConnectionEditor * * Since: 1.0.0 */ AgsConnectionEditor* ags_connection_editor_new(AgsMachine *machine) { AgsConnectionEditor *connection_editor; connection_editor = (AgsConnectionEditor *) g_object_new(AGS_TYPE_CONNECTION_EDITOR, "machine", machine, NULL); return(connection_editor); } gsequencer-1.4.24/ags/X/ags_pad_editor_callbacks.h0000644000175000017500000000242313247044247016771 00000000000000/* 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 . */ #ifndef __AGS_PAD_EDITOR_CALLBACKS_H__ #define __AGS_PAD_EDITOR_CALLBACKS_H__ #include #include #include #include #include int ags_pad_editor_parent_set_callback(GtkWidget *widget, GtkObject *old_parent, AgsPadEditor *pad_editor); void ags_pad_editor_resize_audio_channels_callback(AgsMachine *machine, guint audio_channels, guint audio_channels_old, AgsPadEditor *pad_editor); #endif /*__AGS_PAD_EDITOR_CALLBACKS_H__*/ gsequencer-1.4.24/ags/object/0000755000175000017500000000000013256233676013001 500000000000000gsequencer-1.4.24/ags/object/ags_portlet.c0000644000175000017500000001013213246707333015400 00000000000000/* 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 . */ #include #include void ags_portlet_base_init(AgsPortletInterface *interface); /** * SECTION:ags_portlet * @short_description: interfacing portlets * @title: AgsPortlet * @section_id: AgsPortlet * @include: ags/object/ags_portlet.h * * The #AgsPortlet interface is intended to use with ports containing #GObject. * Whereas its should implement this interface. */ GType ags_portlet_get_type() { static GType ags_type_portlet = 0; if(!ags_type_portlet){ static const GTypeInfo ags_portlet_info = { sizeof(AgsPortletInterface), (GBaseInitFunc) ags_portlet_base_init, NULL, /* base_finalize */ }; ags_type_portlet = g_type_register_static(G_TYPE_INTERFACE, "AgsPortlet", &ags_portlet_info, 0); } return(ags_type_portlet); } void ags_portlet_base_init(AgsPortletInterface *interface) { /* empty */ } /** * ags_portlet_set_port: * @portlet: an #AgsPortlet * @port: the #GObject * * Set port. * * Since: 1.0.0 */ void ags_portlet_set_port(AgsPortlet *portlet, GObject *port) { AgsPortletInterface *portlet_interface; g_return_if_fail(AGS_IS_PORTLET(portlet)); portlet_interface = AGS_PORTLET_GET_INTERFACE(portlet); g_return_if_fail(portlet_interface->set_port); portlet_interface->set_port(portlet, port); } /** * ags_portlet_get_port: * @portlet: an #AgsPortlet * * Get port. * * Returns: the #GObject * * Since: 1.0.0 */ GObject* ags_portlet_get_port(AgsPortlet *portlet) { AgsPortletInterface *portlet_interface; g_return_val_if_fail(AGS_IS_PORTLET(portlet), NULL); portlet_interface = AGS_PORTLET_GET_INTERFACE(portlet); g_return_val_if_fail(portlet_interface->get_port, NULL); return(portlet_interface->get_port(portlet)); } /** * ags_portlet_list_safe_properties: * @portlet: an #AgsPortlet * * Retrieve thread-safe properties. * * Returns: a #GList containing properties * * Since: 1.0.0 */ GList* ags_portlet_list_safe_properties(AgsPortlet *portlet) { AgsPortletInterface *portlet_interface; g_return_val_if_fail(AGS_IS_PORTLET(portlet), NULL); portlet_interface = AGS_PORTLET_GET_INTERFACE(portlet); g_return_val_if_fail(portlet_interface->list_safe_properties, NULL); return(portlet_interface->list_safe_properties(portlet)); } /** * ags_portlet_safe_get_property: * @portlet: an #AgsPortlet * @property_name: propertie's name * @value: the #GValue * * Get property thread safe. * * Since: 1.0.0 */ void ags_portlet_safe_get_property(AgsPortlet *portlet, gchar *property_name, GValue *value) { AgsPortletInterface *portlet_interface; g_return_if_fail(AGS_IS_PORTLET(portlet)); portlet_interface = AGS_PORTLET_GET_INTERFACE(portlet); g_return_if_fail(portlet_interface->safe_get_property); portlet_interface->safe_get_property(portlet, property_name, value); } /** * ags_portlet_safe_set_property: * @portlet: an #AgsPortlet * @property_name: propertie's name * @value: the #GValue * * Set property thread safe. * * Since: 1.0.0 */ void ags_portlet_safe_set_property(AgsPortlet *portlet, gchar *property_name, GValue *value) { AgsPortletInterface *portlet_interface; g_return_if_fail(AGS_IS_PORTLET(portlet)); portlet_interface = AGS_PORTLET_GET_INTERFACE(portlet); g_return_if_fail(portlet_interface->safe_set_property); portlet_interface->safe_set_property(portlet, property_name, value); } gsequencer-1.4.24/ags/object/ags_dynamic_connectable.c0000644000175000017500000000622113246707333017674 00000000000000/* 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 . */ #include #include void ags_dynamic_connectable_base_init(AgsDynamicConnectableInterface *interface); /** * SECTION:ags_dynamic_connectable * @short_description: unique access to dynamic connectable classes * @title: AgsDynamicConnectable * @section_id: AgsDynamicConnectable * @include: ags/object/ags_dynamic_connectable.h * * The #AgsDynamicConnectable interface gives you a unique access to classes. Its main * purpose is to setup up signal handlers with dynamic context for ::connect-dynamic. * A dynamic context would be a dependency that has to be resolved first within run * initialization. */ GType ags_dynamic_connectable_get_type() { static GType ags_type_dynamic_connectable = 0; if(!ags_type_dynamic_connectable){ static const GTypeInfo ags_dynamic_connectable_info = { sizeof(AgsDynamicConnectableInterface), (GBaseInitFunc) ags_dynamic_connectable_base_init, NULL, /* base_finalize */ }; ags_type_dynamic_connectable = g_type_register_static(G_TYPE_INTERFACE, "AgsDynamicConnectable", &ags_dynamic_connectable_info, 0); } return(ags_type_dynamic_connectable); } void ags_dynamic_connectable_base_init(AgsDynamicConnectableInterface *interface) { /* empty */ } /** * ags_dynamic_connectable_connect_dynamic: * @connectable: an #AgsDynamicConnectable * * Connect signal handlers within dynamic context. * * Since: 1.0.0 */ void ags_dynamic_connectable_connect_dynamic(AgsDynamicConnectable *connectable) { AgsDynamicConnectableInterface *connectable_interface; g_return_if_fail(AGS_IS_DYNAMIC_CONNECTABLE(connectable)); connectable_interface = AGS_DYNAMIC_CONNECTABLE_GET_INTERFACE(connectable); g_return_if_fail(connectable_interface->connect_dynamic); connectable_interface->connect_dynamic(connectable); } /** * ags_dynamic_connectable_disconnect_dynamic: * @connectable: an #AgsDynamicConnectable * * Disconnect signal handlers within dynamic context. * * Since: 1.0.0 */ void ags_dynamic_connectable_disconnect_dynamic(AgsDynamicConnectable *connectable) { AgsDynamicConnectableInterface *connectable_interface; g_return_if_fail(AGS_IS_DYNAMIC_CONNECTABLE(connectable)); connectable_interface = AGS_DYNAMIC_CONNECTABLE_GET_INTERFACE(connectable); g_return_if_fail(connectable_interface->disconnect_dynamic); connectable_interface->disconnect_dynamic(connectable); } gsequencer-1.4.24/ags/object/ags_plugin.h0000644000175000017500000000607013256163135015215 00000000000000/* 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 . */ #ifndef __AGS_PLUGIN_H__ #define __AGS_PLUGIN_H__ #include #include #include #define AGS_TYPE_PLUGIN (ags_plugin_get_type()) #define AGS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLUGIN, AgsPlugin)) #define AGS_PLUGIN_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_PLUGIN, AgsPluginInterface)) #define AGS_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PLUGIN)) #define AGS_IS_PLUGIN_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_PLUGIN)) #define AGS_PLUGIN_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_PLUGIN, AgsPluginInterface)) typedef struct _AgsPlugin AgsPlugin; typedef struct _AgsPluginInterface AgsPluginInterface; struct _AgsPluginInterface { GTypeInterface ginterface; gchar* (*get_name)(AgsPlugin *plugin); void (*set_name)(AgsPlugin *plugin, gchar *name); gchar* (*get_version)(AgsPlugin *plugin); void (*set_version)(AgsPlugin *plugin, gchar *version); gchar* (*get_build_id)(AgsPlugin *plugin); void (*set_build_id)(AgsPlugin *plugin, gchar *build_id); gchar* (*get_xml_type)(AgsPlugin *plugin); void (*set_xml_type)(AgsPlugin *plugin, gchar *xml_type); GList* (*get_ports)(AgsPlugin *plugin); void (*set_ports)(AgsPlugin *plugin, GList *ports); void (*read)(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* (*write)(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); }; GType ags_plugin_get_type(); gchar* ags_plugin_get_name(AgsPlugin *plugin); void ags_plugin_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_plugin_get_version(AgsPlugin *plugin); void ags_plugin_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_plugin_get_build_id(AgsPlugin *plugin); void ags_plugin_set_build_id(AgsPlugin *plugin, gchar *build_id); gchar* ags_plugin_get_xml_type(AgsPlugin *plugin); void ags_plugin_set_xml_type(AgsPlugin *plugin, gchar *xml_type); GList* ags_plugin_get_ports(AgsPlugin *plugin); void ags_plugin_set_ports(AgsPlugin *plugin, GList *ports); void ags_plugin_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_plugin_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); #endif /*__AGS_PLUGIN_H__*/ gsequencer-1.4.24/ags/object/ags_config.c0000644000175000017500000004605513256163135015166 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_config_class_init(AgsConfigClass *config_class); void ags_config_connectable_interface_init(AgsConnectableInterface *connectable); void ags_config_init(AgsConfig *config); void ags_config_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_config_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_config_add_to_registry(AgsConnectable *connectable); void ags_config_remove_from_registry(AgsConnectable *connectable); gboolean ags_config_is_connected(AgsConnectable *connectable); void ags_config_connect(AgsConnectable *connectable); void ags_config_disconnect(AgsConnectable *connectable); void ags_config_dispose(GObject *gobject); void ags_config_finalize(GObject *gobject); gchar* ags_config_get_version(AgsConfig *config); void ags_config_set_version(AgsConfig *config, gchar *version); gchar* ags_config_get_build_id(AgsConfig *config); void ags_config_set_build_id(AgsConfig *config, gchar *build_id); void ags_config_real_load_defaults(AgsConfig *config); void ags_config_real_set_value(AgsConfig *config, gchar *group, gchar *key, gchar *value); gchar* ags_config_real_get_value(AgsConfig *config, gchar *group, gchar *key); /** * SECTION:ags_config * @short_description: Config Advanced Gtk+ Sequencer * @title: AgsConfig * @section_id: * @include: ags/object/ags_config.h * * #AgsConfig provides configuration to Advanced Gtk+ Sequencer. */ enum{ LOAD_DEFAULTS, SET_VALUE, GET_VALUE, LAST_SIGNAL, }; enum{ PROP_0, PROP_APPLICATION_CONTEXT, }; static gpointer ags_config_parent_class = NULL; static guint config_signals[LAST_SIGNAL]; AgsConfig *ags_config = NULL; GType ags_config_get_type (void) { static GType ags_type_config = 0; if(!ags_type_config){ static const GTypeInfo ags_config_info = { sizeof (AgsConfigClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_config_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsConfig), 0, /* n_preallocs */ (GInstanceInitFunc) ags_config_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_config_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_config = g_type_register_static(G_TYPE_OBJECT, "AgsConfig", &ags_config_info, 0); g_type_add_interface_static(ags_type_config, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_config); } void ags_config_class_init(AgsConfigClass *config) { GObjectClass *gobject; GParamSpec *param_spec; ags_config_parent_class = g_type_class_peek_parent(config); /* GObjectClass */ gobject = (GObjectClass *) config; gobject->set_property = ags_config_set_property; gobject->get_property = ags_config_get_property; gobject->dispose = ags_config_dispose; gobject->finalize = ags_config_finalize; /* properties */ /** * AgsConfig:application-context: * * The assigned application context. * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context of config"), i18n_pspec("The application context which this config is packed into"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* AgsConfigClass */ config->load_defaults = ags_config_real_load_defaults; config->set_value = ags_config_real_set_value; config->get_value = ags_config_real_get_value; /* signals */ /** * AgsConfig::load-defaults: * @config: the object to resolve * * The ::load-defaults signal notifies about loading defaults * * Since: 1.0.0 */ config_signals[LOAD_DEFAULTS] = g_signal_new("load-defaults", G_TYPE_FROM_CLASS (config), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsConfigClass, load_defaults), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsConfig::set-value: * @config: the object to resolve * @group: the group to apply to * @key: the key to set * @value: the value to apply * * The ::set-value signal notifies about value been setting. * * Since: 1.0.0 */ config_signals[SET_VALUE] = g_signal_new("set-value", G_TYPE_FROM_CLASS (config), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsConfigClass, set_value), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); /** * AgsConfig::get-value: * @config: the object to resolve * @group: the group to retrieve from * @key: the key to get * * The ::get-value signal notifies about value been getting. * * Returns: the value * * Since: 1.0.0 */ config_signals[GET_VALUE] = g_signal_new("get-value", G_TYPE_FROM_CLASS (config), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsConfigClass, get_value), NULL, NULL, g_cclosure_user_marshal_STRING__STRING_STRING, G_TYPE_STRING, 2, G_TYPE_STRING, G_TYPE_STRING); } void ags_config_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = ags_config_add_to_registry; connectable->remove_from_registry = ags_config_remove_from_registry; connectable->is_ready = NULL; connectable->is_connected = ags_config_is_connected; connectable->connect = ags_config_connect; connectable->disconnect = ags_config_disconnect; } void ags_config_init(AgsConfig *config) { config->flags = 0; config->version = AGS_CONFIG_DEFAULT_VERSION; config->build_id = AGS_CONFIG_DEFAULT_BUILD_ID; config->application_context == NULL; config->key_file = g_key_file_new(); g_key_file_ref(config->key_file); } void ags_config_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsConfig *config; config = AGS_CONFIG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(application_context == ((AgsApplicationContext *) config->application_context)){ return; } if(config->application_context != NULL){ g_object_unref(config->application_context); } if(application_context != NULL){ g_object_ref(G_OBJECT(application_context)); } config->application_context = (GObject *) application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_config_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsConfig *config; config = AGS_CONFIG(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, config->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_config_add_to_registry(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_config_remove_from_registry(AgsConnectable *connectable) { //TODO:JK: implement me } gboolean ags_config_is_connected(AgsConnectable *connectable) { if((AGS_CONFIG_CONNECTED & (AGS_CONFIG(connectable)->flags)) != 0){ return(TRUE); }else{ return(FALSE); } } void ags_config_connect(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_config_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_config_dispose(GObject *gobject) { AgsConfig *config; config = (AgsConfig *) gobject; if(config->application_context != NULL){ g_object_unref(config->application_context); config->application_context = NULL; } /* call parent */ G_OBJECT_CLASS(ags_config_parent_class)->dispose(gobject); } void ags_config_finalize(GObject *gobject) { AgsConfig *config; config = (AgsConfig *) gobject; if(config->application_context != NULL){ g_object_unref(config->application_context); } if(config->key_file != NULL){ g_key_file_unref(config->key_file); } if(ags_config == config){ ags_config = NULL; } /* call parent */ G_OBJECT_CLASS(ags_config_parent_class)->finalize(gobject); } gchar* ags_config_get_version(AgsConfig *config) { return(config->version); } void ags_config_set_version(AgsConfig *config, gchar *version) { config->version = version; } gchar* ags_config_get_build_id(AgsConfig *config) { return(config->build_id); } void ags_config_set_build_id(AgsConfig *config, gchar *build_id) { config->build_id = build_id; } void ags_config_real_load_defaults(AgsConfig *config) { ags_config_set_value(config, AGS_CONFIG_GENERIC, "autosave-thread", "false"); ags_config_set_value(config, AGS_CONFIG_GENERIC, "simple-file", "true"); ags_config_set_value(config, AGS_CONFIG_GENERIC, "disable-feature", "experimental"); ags_config_set_value(config, AGS_CONFIG_GENERIC, "engine-mode", "performance"); ags_config_set_value(config, AGS_CONFIG_THREAD, "model", "super-threaded"); ags_config_set_value(config, AGS_CONFIG_THREAD, "super-threaded-scope", "audio"); ags_config_set_value(config, AGS_CONFIG_THREAD, "lock-global", "ags-thread"); ags_config_set_value(config, AGS_CONFIG_THREAD, "lock-parent", "ags-recycling-thread"); ags_config_set_value(config, AGS_CONFIG_THREAD, "max-precision", "125"); #ifdef AGS_WITH_CORE_AUDIO ags_config_set_value(config, AGS_CONFIG_SOUNDCARD_0, "backend", "core-audio"); ags_config_set_value(config, AGS_CONFIG_SOUNDCARD_0, "device", "ags-core-audio-devout-0"); #else ags_config_set_value(config, AGS_CONFIG_SOUNDCARD_0, "backend", "pulse"); ags_config_set_value(config, AGS_CONFIG_SOUNDCARD_0, "device", "ags-pulse-devout-0"); #endif ags_config_set_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels", "2"); ags_config_set_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate", "44100"); ags_config_set_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size", "2048"); ags_config_set_value(config, AGS_CONFIG_SOUNDCARD_0, "format", "16"); //ags_config_set_value(config, AGS_CONFIG_SEQUENCER_0, "backend", "jack"); //ags_config_set_value(config, AGS_CONFIG_SEQUENCER_0, "device", "ags-jack-midiin-0"); ags_config_set_value(config, AGS_CONFIG_RECALL, "auto-sense", "true"); } /** * ags_config_load_defaults: * @config: the #AgsConfig * * Load configuration from default values. * * Since: 1.0.0 */ void ags_config_load_defaults(AgsConfig *config) { g_return_if_fail(AGS_IS_CONFIG(config)); g_object_ref(G_OBJECT(config)); g_signal_emit(G_OBJECT(config), config_signals[LOAD_DEFAULTS], 0); g_object_unref(G_OBJECT(config)); } /** * ags_config_load_from_file: * @config: the #AgsConfig * @filename: the configuration file * * Load configuration from @filename. * * Since: 1.0.0 */ void ags_config_load_from_file(AgsConfig *config, gchar *filename) { GFile *file; if(config == NULL){ return; } file = g_file_new_for_path(filename); g_message("loading preferences for: %s", filename); if(!g_file_query_exists(file, NULL)){ ags_config_load_defaults(config); }else{ GKeyFile *key_file; gchar **groups, **groups_start; gchar **keys, **keys_start; gchar *value; GError *error; error = NULL; key_file = g_key_file_new(); g_key_file_load_from_file(key_file, filename, G_KEY_FILE_NONE, &error); if(error != NULL){ g_warning("%s", error->message); g_error_free(error); } groups = groups_start = g_key_file_get_groups(key_file, NULL); while(*groups != NULL){ keys = keys_start = g_key_file_get_keys(key_file, *groups, NULL, NULL); while(*keys != NULL){ value = g_key_file_get_value(key_file, *groups, *keys, NULL); ags_config_set_value(config, *groups, *keys, value); keys++; } g_strfreev(keys_start); groups++; } g_strfreev(groups_start); g_key_file_unref(key_file); } g_object_unref(file); } /** * ags_config_load_from_data: * @config: the #AgsConfig * @buffer: the data buffer * @buffer_length: the size of the buffer * * Read configuration in memory. * * Since: 1.0.0 */ void ags_config_load_from_data(AgsConfig *config, char *buffer, gsize buffer_length) { //#ifdef AGS_DEBUG g_message("loading preferences from data[0x%x]", (unsigned int) buffer); //#endif if(buffer == NULL){ ags_config_load_defaults(config); }else{ GKeyFile *key_file; gchar **groups; gchar **keys; gchar *value; gsize n_groups, n_keys; guint i, j; GError *error; error = NULL; key_file = g_key_file_new(); g_key_file_load_from_data(key_file, buffer, buffer_length, G_KEY_FILE_NONE, &error); if(error != NULL){ g_warning("%s", error->message); g_error_free(error); } groups = g_key_file_get_groups(key_file, &n_groups); for(i = 0; i < n_groups; i++){ keys = g_key_file_get_keys(key_file, groups[i], &n_keys, NULL); for(j = 0; j < n_keys; j++){ value = g_key_file_get_value(key_file, groups[i], keys[j], NULL); ags_config_set_value(config, groups[i], keys[j], value); g_message("%s", keys[j]); g_message("%s", value); } g_strfreev(keys); } g_strfreev(groups); g_key_file_unref(key_file); } } /** * ags_config_to_data: * @config: the #AgsConfig * @buffer: the data buffer * @buffer_length: the size of the buffer * * Save configuration. * * Since: 1.0.0 */ void ags_config_to_data(AgsConfig *config, char **buffer, gsize *buffer_length) { gchar *data; gsize length; GError *error; error = NULL; data = g_key_file_to_data(config->key_file, &length, &error); if(error != NULL){ g_warning("%s", error->message); } if(buffer != NULL){ *buffer = data; } if(buffer_length != NULL){ *buffer_length = length; } } /** * ags_config_save: * @config: the #AgsConfig * * Save configuration. * * Since: 1.0.0 */ void ags_config_save(AgsConfig *config) { struct passwd *pw; uid_t uid; gchar *path, *filename; gchar *content; gsize length; GError *error; uid = getuid(); pw = getpwuid(uid); /* open conf dir */ path = g_strdup_printf("%s/%s", pw->pw_dir, AGS_DEFAULT_DIRECTORY); if(!g_mkdir_with_parents(path, 0755)){ filename = g_strdup_printf("%s/%s", path, AGS_DEFAULT_CONFIG); /* get content */ error = NULL; content = g_key_file_to_data(config->key_file, &length, &error); if(error != NULL){ //TODO:JK: do recovery goto ags_config_save_END; } /* write content */ error = NULL; g_file_set_contents(filename, content, length, &error); ags_config_save_END: g_free(filename); } g_free(path); } void ags_config_real_set_value(AgsConfig *config, gchar *group, gchar *key, gchar *value) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; if(config == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); g_key_file_set_value(config->key_file, group, key, value); pthread_mutex_unlock(application_mutex); } /** * ags_config_set_value: * @config: the #AgsConfig * @group: the config group identifier * @key: the key of the property * @value: the value to set * * Set config by @group and @key, applying @value. * * Since: 1.0.0 */ void ags_config_set_value(AgsConfig *config, gchar *group, gchar *key, gchar *value) { g_return_if_fail(AGS_IS_CONFIG(config)); g_object_ref(G_OBJECT(config)); g_signal_emit(G_OBJECT(config), config_signals[SET_VALUE], 0, group, key, value); g_object_unref(G_OBJECT(config)); } gchar* ags_config_real_get_value(AgsConfig *config, gchar *group, gchar *key) { gchar *str; GError *error; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); error = NULL; str = g_key_file_get_value(config->key_file, group, key, &error); pthread_mutex_unlock(&mutex); return(str); } /** * ags_config_get_value: * @config: the #AgsConfig * @group: the config group identifier * @key: the key of the property * * Retrieve config by @group and @key. * * Returns: the property's value * * Since: 1.0.0 */ gchar* ags_config_get_value(AgsConfig *config, gchar *group, gchar *key) { gchar *value; g_return_val_if_fail(AGS_IS_CONFIG(config), NULL); g_object_ref(G_OBJECT(config)); g_signal_emit(G_OBJECT(config), config_signals[GET_VALUE], 0, group, key, &value); g_object_unref(G_OBJECT(config)); return(value); } /** * ags_config_clear: * @config: the #AgsConfig * * Clears configuration. * * Since: 1.0.0 */ void ags_config_clear(AgsConfig *config) { gchar **group; gsize n_group; guint i; group = g_key_file_get_groups(config->key_file, &n_group); for(i = 0; i < n_group; i++){ g_key_file_remove_group(config->key_file, group[i], NULL); } } /** * ags_config_get_instance: * * Get config instance. * * Returns: the config instance * * Since: 1.0.0 */ AgsConfig* ags_config_get_instance() { if(ags_config == NULL){ ags_config = ags_config_new(NULL); } return(ags_config); } /** * ags_config_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsConfig. * * Returns: a new #AgsConfig. * * Since: 1.0.0 */ AgsConfig* ags_config_new(GObject *application_context) { AgsConfig *config; config = (AgsConfig *) g_object_new(AGS_TYPE_CONFIG, "application-context", application_context, NULL); return(config); } gsequencer-1.4.24/ags/object/ags_applicable.h0000644000175000017500000000410613246707333016014 00000000000000/* 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 . */ #ifndef __AGS_APPLICABLE_H__ #define __AGS_APPLICABLE_H__ #include #include #define AGS_TYPE_APPLICABLE (ags_applicable_get_type()) #define AGS_APPLICABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPLICABLE, AgsApplicable)) #define AGS_APPLICABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_APPLICABLE, AgsApplicableInterface)) #define AGS_IS_APPLICABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPLICABLE)) #define AGS_IS_APPLICABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_APPLICABLE)) #define AGS_APPLICABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_APPLICABLE, AgsApplicableInterface)) typedef struct _AgsApplicable AgsApplicable; typedef struct _AgsApplicableInterface AgsApplicableInterface; struct _AgsApplicableInterface { GTypeInterface ginterface; void (*set_update)(AgsApplicable *applicable, gboolean update); void (*apply)(AgsApplicable *applicable); void (*reset)(AgsApplicable *applicable); }; GType ags_applicable_get_type(); void ags_applicable_set_update(AgsApplicable *applicable, gboolean update); void ags_applicable_apply(AgsApplicable *applicable); void ags_applicable_reset(AgsApplicable *applicable); #endif /*__AGS_APPLICABLE_H__*/ gsequencer-1.4.24/ags/object/ags_connectable.h0000644000175000017500000000571713256163135016203 00000000000000/* 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 . */ #ifndef __AGS_CONNECTABLE_H__ #define __AGS_CONNECTABLE_H__ #include #include #include #define AGS_TYPE_CONNECTABLE (ags_connectable_get_type()) #define AGS_CONNECTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONNECTABLE, AgsConnectable)) #define AGS_CONNECTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_CONNECTABLE, AgsConnectableInterface)) #define AGS_IS_CONNECTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CONNECTABLE)) #define AGS_IS_CONNECTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_CONNECTABLE)) #define AGS_CONNECTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_CONNECTABLE, AgsConnectableInterface)) typedef struct _AgsConnectable AgsConnectable; typedef struct _AgsConnectableInterface AgsConnectableInterface; struct _AgsConnectableInterface { GTypeInterface ginterface; void (*add_to_registry)(AgsConnectable *connectable); void (*remove_from_registry)(AgsConnectable *connectable); xmlNode* (*update)(AgsConnectable *connectable); gboolean (*is_ready)(AgsConnectable *connectable); gboolean (*is_connected)(AgsConnectable *connectable); void (*connect)(AgsConnectable *connectable); void (*disconnect)(AgsConnectable *connectable); void (*connect_scope)(AgsConnectable *connectable, GObject *connection); void (*disconnect_scope)(AgsConnectable *connectable, GObject *connection); }; GType ags_connectable_get_type(); void ags_connectable_add_to_registry(AgsConnectable *connectable); void ags_connectable_remove_from_registry(AgsConnectable *connectable); xmlNode* ags_connectable_update(AgsConnectable *connectable); gboolean ags_connectable_is_ready(AgsConnectable *connectable); gboolean ags_connectable_is_connected(AgsConnectable *connectable); void ags_connectable_connect(AgsConnectable *connectable); void ags_connectable_disconnect(AgsConnectable *connectable); void ags_connectable_connect_scope(AgsConnectable *connectable, GObject *connection); void ags_connectable_disconnect_scope(AgsConnectable *connectable, GObject *connection); #endif /*__AGS_CONNECTABLE_H__*/ gsequencer-1.4.24/ags/object/ags_tree_iterator.c0000644000175000017500000001022113246707333016556 00000000000000/* 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 . */ #include #include void ags_tree_iterator_base_init(AgsTreeIteratorInterface *interface); /** * SECTION:ags_tree_iterator * @short_description: concurrent iterating tree * @title: AgsTreeIterator * @section_id: AgsTreeIterator * @include: ags/object/ags_tree_iterator.h * * The #AgsTreeIterator interface supports you iterating trees. */ GType ags_tree_iterator_get_type() { static GType ags_type_tree_iterator = 0; if(!ags_type_tree_iterator){ static const GTypeInfo ags_tree_iterator_info = { sizeof(AgsTreeIteratorInterface), (GBaseInitFunc) ags_tree_iterator_base_init, NULL, /* base_finalize */ }; ags_type_tree_iterator = g_type_register_static(G_TYPE_INTERFACE, "AgsTreeIterator", &ags_tree_iterator_info, 0); } return(ags_type_tree_iterator); } void ags_tree_iterator_base_init(AgsTreeIteratorInterface *interface) { /* empty */ } void ags_tree_iterator_set_inverse_mode(AgsTreeIterator *tree_iterator, gboolean mode) { AgsTreeIteratorInterface *tree_iterator_interface; g_return_if_fail(AGS_IS_TREE_ITERATOR(tree_iterator)); tree_iterator_interface = AGS_TREE_ITERATOR_GET_INTERFACE(tree_iterator); g_return_if_fail(tree_iterator_interface->set_inverse_mode); tree_iterator_interface->set_inverse_mode(tree_iterator, mode); } gboolean ags_tree_iterator_is_inverse_mode(AgsTreeIterator *tree_iterator) { AgsTreeIteratorInterface *tree_iterator_interface; g_return_val_if_fail(AGS_IS_TREE_ITERATOR(tree_iterator), FALSE); tree_iterator_interface = AGS_TREE_ITERATOR_GET_INTERFACE(tree_iterator); g_return_val_if_fail(tree_iterator_interface->is_inverse_mode, FALSE); return(tree_iterator_interface->is_inverse_mode(tree_iterator)); } void ags_tree_iterator_iterate(AgsTreeIterator *tree_iterator, gpointer node_id) { AgsTreeIteratorInterface *tree_iterator_interface; g_return_if_fail(AGS_IS_TREE_ITERATOR(tree_iterator)); tree_iterator_interface = AGS_TREE_ITERATOR_GET_INTERFACE(tree_iterator); g_return_if_fail(tree_iterator_interface->iterate); tree_iterator_interface->iterate(tree_iterator, node_id); } void ags_tree_iterator_iterate_nested(AgsTreeIterator *tree_iterator, gpointer node_id) { AgsTreeIteratorInterface *tree_iterator_interface; g_return_if_fail(AGS_IS_TREE_ITERATOR(tree_iterator)); tree_iterator_interface = AGS_TREE_ITERATOR_GET_INTERFACE(tree_iterator); g_return_if_fail(tree_iterator_interface->iterate_nested); tree_iterator_interface->iterate_nested(tree_iterator, node_id); } void ags_tree_iterator_safe_iterate(AgsTreeIterator *toplevel, AgsTreeIterator *current, gpointer node_id) { AgsTreeIteratorInterface *tree_iterator_interface; g_return_if_fail(AGS_IS_TREE_ITERATOR(toplevel)); tree_iterator_interface = AGS_TREE_ITERATOR_GET_INTERFACE(toplevel); g_return_if_fail(tree_iterator_interface->iterate); tree_iterator_interface->safe_iterate(toplevel, current, node_id); } void ags_tree_iterator_safe_iterate_nested(AgsTreeIterator *toplevel, AgsTreeIterator *current, gpointer node_id) { AgsTreeIteratorInterface *tree_iterator_interface; g_return_if_fail(AGS_IS_TREE_ITERATOR(toplevel)); tree_iterator_interface = AGS_TREE_ITERATOR_GET_INTERFACE(toplevel); g_return_if_fail(tree_iterator_interface->iterate); tree_iterator_interface->safe_iterate_nested(toplevel, current, node_id); } gsequencer-1.4.24/ags/object/ags_distributed_manager.c0000644000175000017500000002527713256163135017740 00000000000000/* 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 . */ #include void ags_distributed_manager_class_init(AgsDistributedManagerInterface *interface); /** * SECTION:ags_distributed_manager * @short_description: access distributed ressources * @title: AgsDistributedManager * @section_id: * @include: ags/object/ags_distributed_manager.h * * The #AgsDistributedManager interface gives you a unique access distributed resources. */ GType ags_distributed_manager_get_type() { static GType ags_type_distributed_manager = 0; if(!ags_type_distributed_manager){ ags_type_distributed_manager = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsDistributedManager", sizeof(AgsDistributedManagerInterface), (GClassInitFunc) ags_distributed_manager_class_init, 0, NULL, 0); } return(ags_type_distributed_manager); } void ags_distributed_manager_class_init(AgsDistributedManagerInterface *interface) { /* empty */ } /** * ags_distributed_manager_set_url: * @distributed_manager: The #AgsDistributedManager * @url: the url to set * * Sets the url of @distributed_manager. * * Since: 1.0.0 */ void ags_distributed_manager_set_url(AgsDistributedManager *distributed_manager, gchar *url) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager)); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_if_fail(distributed_manager_interface->set_url); distributed_manager_interface->set_url(distributed_manager, url); } /** * ags_distributed_manager_get_url: * @distributed_manager: the #AgsDistributedManager * * Gets the URL of @distributed_manager. * * Returns: the URL as string * * Since: 1.0.0 */ gchar* ags_distributed_manager_get_url(AgsDistributedManager *distributed_manager) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_val_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager), NULL); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_val_if_fail(distributed_manager_interface->get_url, NULL); return(distributed_manager_interface->get_url(distributed_manager)); } /** * ags_distributed_manager_set_port: * @distributed_manager: The #AgsDistributedManager * @port: the ports to set * @port_count: the number of ports * * Sets the ports of @distributed_manager. * * Since: 1.0.0 */ void ags_distributed_manager_set_ports(AgsDistributedManager *distributed_manager, guint *port, guint port_count) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager)); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_if_fail(distributed_manager_interface->set_ports); distributed_manager_interface->set_ports(distributed_manager, port, port_count); } /** * ags_distributed_manager_get_ports: * @distributed_manager: the #AgsDistributedManager * @port_count: the number of ports returned * * Gets the ports of @distributed_manager. * * Returns: the port as string %NULL-terminated array * * Since: 1.0.0 */ guint* ags_distributed_manager_get_ports(AgsDistributedManager *distributed_manager, guint *port_count) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_val_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager), NULL); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_val_if_fail(distributed_manager_interface->get_ports, NULL); return(distributed_manager_interface->get_ports(distributed_manager, port_count)); } /** * ags_distributed_manager_set_soundcard: * @distributed_manager: The #AgsDistributedManager * @client_uuid: the location to fetch from * @soundcard: the soundcard to set * * Sets the soundcard at @client_uuid. * * Since: 1.0.0 */ void ags_distributed_manager_set_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *soundcard) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager)); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_if_fail(distributed_manager_interface->set_soundcard); distributed_manager_interface->set_soundcard(distributed_manager, client_uuid, soundcard); } /** * ags_distributed_manager_get_soundcard: * @client_uuid: the client uuid * @distributed_manager: the #AgsDistributedManager * * Gets the soundcard of @distributed_manager associated with @client_uuid. * * Returns: the soundcard as #GList-struct * * Since: 1.0.0 */ GList* ags_distributed_manager_get_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_val_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager), NULL); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_val_if_fail(distributed_manager_interface->get_soundcard, NULL); return(distributed_manager_interface->get_soundcard(distributed_manager, client_uuid)); } /** * ags_distributed_manager_set_sequencer: * @distributed_manager: The #AgsDistributedManager * @client_uuid: the location to fetch from * @sequencer: the sequencer to set * * Sets the sequencer at @client_uuid. * * Since: 1.0.0 */ void ags_distributed_manager_set_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *sequencer) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager)); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_if_fail(distributed_manager_interface->set_sequencer); distributed_manager_interface->set_sequencer(distributed_manager, client_uuid, sequencer); } /** * ags_distributed_manager_get_sequencer: * @client_uuid: the client uuid * @distributed_manager: the #AgsDistributedManager * * Gets the sequencer of @distributed_manager associated with @client_uuid. * * Returns: the sequencer as #GList-struct * * Since: 1.0.0 */ GList* ags_distributed_manager_get_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_val_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager), NULL); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_val_if_fail(distributed_manager_interface->get_sequencer, NULL); return(distributed_manager_interface->get_sequencer(distributed_manager, client_uuid)); } /** * ags_distributed_manager_register_soundcard: * @distributed_manager: The #AgsDistributedManager * @is_output: if %TRUE the used as sink, else as source * * Fetches @soundcard of @distributed_manager. * * Returns: a new #AgsSoundcard * * Since: 1.0.0 */ GObject* ags_distributed_manager_register_soundcard(AgsDistributedManager *distributed_manager, gboolean is_output) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_val_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager), NULL); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_val_if_fail(distributed_manager_interface->register_soundcard, NULL); return(distributed_manager_interface->register_soundcard(distributed_manager, is_output)); } /** * ags_distributed_manager_unregister_soundcard: * @distributed_manager: The #AgsDistributedManager * @soundcard: the #AgsSoundcard * * Releases @soundcard in @distributed_manager. * * Since: 1.0.0 */ void ags_distributed_manager_unregister_soundcard(AgsDistributedManager *distributed_manager, GObject *soundcard) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager)); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_if_fail(distributed_manager_interface->unregister_soundcard); distributed_manager_interface->unregister_soundcard(distributed_manager, soundcard); } /** * ags_distributed_manager_register_sequencer: * @distributed_manager: The #AgsDistributedManager * @is_output: if %TRUE the used as sink, else as source * * Fetches @sequencer of @distributed_manager. * * Returns: a new #AgsSequencer * * Since: 1.0.0 */ GObject* ags_distributed_manager_register_sequencer(AgsDistributedManager *distributed_manager, gboolean is_output) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_val_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager), NULL); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_val_if_fail(distributed_manager_interface->register_sequencer, NULL); return(distributed_manager_interface->register_sequencer(distributed_manager, is_output)); } /** * ags_distributed_manager_unregister_sequencer: * @distributed_manager: The #AgsDistributedManager * @sequencer: the #AgsSequencer * * Releases @sequencer in @distributed_manager. * * Since: 1.0.0 */ void ags_distributed_manager_unregister_sequencer(AgsDistributedManager *distributed_manager, GObject *sequencer) { AgsDistributedManagerInterface *distributed_manager_interface; g_return_if_fail(AGS_IS_DISTRIBUTED_MANAGER(distributed_manager)); distributed_manager_interface = AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(distributed_manager); g_return_if_fail(distributed_manager_interface->unregister_sequencer); distributed_manager_interface->unregister_sequencer(distributed_manager, sequencer); } gsequencer-1.4.24/ags/object/ags_portlet.h0000644000175000017500000000454513246707333015420 00000000000000/* 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 . */ #ifndef __AGS_PORTLET_H__ #define __AGS_PORTLET_H__ #include #include #define AGS_TYPE_PORTLET (ags_portlet_get_type()) #define AGS_PORTLET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PORTLET, AgsPortlet)) #define AGS_PORTLET_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_PORTLET, AgsPortletInterface)) #define AGS_IS_PORTLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PORTLET)) #define AGS_IS_PORTLET_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_PORTLET)) #define AGS_PORTLET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_PORTLET, AgsPortletInterface)) typedef struct _AgsPortlet AgsPortlet; typedef struct _AgsPortletInterface AgsPortletInterface; struct _AgsPortletInterface { GTypeInterface ginterface; GObject* (*get_port)(AgsPortlet *portlet); void (*set_port)(AgsPortlet *portlet, GObject *port); GList* (*list_safe_properties)(AgsPortlet *portlet); void (*safe_get_property)(AgsPortlet *portlet, gchar *property_name, GValue *value); void (*safe_set_property)(AgsPortlet *portlet, gchar *property_name, GValue *value); }; GType ags_portlet_get_type(); GObject* ags_portlet_get_port(AgsPortlet *portlet); void ags_portlet_set_port(AgsPortlet *portlet, GObject *port); GList* ags_portlet_list_safe_properties(AgsPortlet *portlet); void ags_portlet_safe_get_property(AgsPortlet *portlet, gchar *property_name, GValue *value); void ags_portlet_safe_set_property(AgsPortlet *portlet, gchar *property_name, GValue *value); #endif /*__AGS_PORTLET_H__*/ gsequencer-1.4.24/ags/object/ags_packable.h0000644000175000017500000000365213246707333015467 00000000000000/* 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 . */ #ifndef __AGS_PACKABLE_H__ #define __AGS_PACKABLE_H__ #include #include #define AGS_TYPE_PACKABLE (ags_packable_get_type()) #define AGS_PACKABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PACKABLE, AgsPackable)) #define AGS_PACKABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_PACKABLE, AgsPackableInterface)) #define AGS_IS_PACKABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PACKABLE)) #define AGS_IS_PACKABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_PACKABLE)) #define AGS_PACKABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_PACKABLE, AgsPackableInterface)) typedef struct _AgsPackable AgsPackable; typedef struct _AgsPackableInterface AgsPackableInterface; struct _AgsPackableInterface { GTypeInterface ginterface; gboolean (*pack)(AgsPackable *packable, GObject *container); gboolean (*unpack)(AgsPackable *packable); }; GType ags_packable_get_type(); gboolean ags_packable_pack(AgsPackable *packable, GObject *container); gboolean ags_packable_unpack(AgsPackable *packable); #endif /*__AGS_PACKABLE_H__*/ gsequencer-1.4.24/ags/object/ags_macros.h0000644000175000017500000000347413246707333015213 00000000000000/* 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 . */ #ifndef __AGS_MACROS_H__ #define __AGS_MACROS_H__ #include #include #define AGS_DECLARE_INTERFACE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, PrerequisiteName) \ GType module_obj_name##_get_type (void); \ G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ typedef struct _##ModuleObjName ModuleObjName; \ typedef struct _##ModuleObjName##Interface ModuleObjName##Interface; \ \ _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, PrerequisiteName) \ \ static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \ return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \ static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \ static inline ModuleObjName##Interface * MODULE##_##OBJ_NAME##_GET_INTERFACE (gpointer ptr) { \ return G_TYPE_INSTANCE_GET_INTERFACE (ptr, module_obj_name##_get_type (), ModuleObjName##Interface); } \ G_GNUC_END_IGNORE_DEPRECATIONS #endif /*__AGS_MACROS_H__*/ gsequencer-1.4.24/ags/object/ags_marshal.h0000644000175000017500000010414513256163135015350 00000000000000/* This file is generated, all changes will be lost */ #ifndef __G_CCLOSURE_USER_MARSHAL_MARSHAL_H__ #define __G_CCLOSURE_USER_MARSHAL_MARSHAL_H__ #include G_BEGIN_DECLS /* VOID:BOOLEAN,POINTER (ags_marshallers.list:1) */ extern void g_cclosure_user_marshal_VOID__BOOLEAN_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:INT,UINT,POINTER (ags_marshallers.list:2) */ extern void g_cclosure_user_marshal_VOID__INT_UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,BOOLEAN (ags_marshallers.list:3) */ extern void g_cclosure_user_marshal_VOID__UINT_BOOLEAN (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,UINT (ags_marshallers.list:4) */ extern void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,UINT,BOOLEAN (ags_marshallers.list:5) */ extern void g_cclosure_user_marshal_VOID__UINT_UINT_BOOLEAN (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,UINT,UINT (ags_marshallers.list:6) */ extern void g_cclosure_user_marshal_VOID__UINT_UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,UINT,UINT,UINT (ags_marshallers.list:7) */ extern void g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,UINT,UINT,UINT,UINT (ags_marshallers.list:8) */ extern void g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,UINT,UINT,UINT,UINT,UINT (ags_marshallers.list:9) */ extern void g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,UINT,UINT,UINT,UINT,UINT,UINT (ags_marshallers.list:10) */ extern void g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,DOUBLE,UINT (ags_marshallers.list:11) */ extern void g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,INT (ags_marshallers.list:12) */ extern void g_cclosure_user_marshal_VOID__UINT_INT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,DOUBLE (ags_marshallers.list:13) */ extern void g_cclosure_user_marshal_VOID__UINT_DOUBLE (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,STRING,UINT (ags_marshallers.list:14) */ extern void g_cclosure_user_marshal_VOID__UINT_STRING_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:UINT,POINTER,UINT (ags_marshallers.list:15) */ extern void g_cclosure_user_marshal_VOID__UINT_POINTER_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:ULONG,UINT (ags_marshallers.list:16) */ extern void g_cclosure_user_marshal_VOID__ULONG_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:ULONG,UINT,BOOLEAN (ags_marshallers.list:17) */ extern void g_cclosure_user_marshal_VOID__ULONG_UINT_BOOLEAN (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:DOUBLE,DOUBLE (ags_marshallers.list:18) */ extern void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:ULONG,UINT,UINT (ags_marshallers.list:19) */ extern void g_cclosure_user_marshal_VOID__ULONG_UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:STRING,UINT (ags_marshallers.list:20) */ extern void g_cclosure_user_marshal_VOID__STRING_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:STRING,UINT,DOUBLE (ags_marshallers.list:21) */ extern void g_cclosure_user_marshal_VOID__STRING_UINT_DOUBLE (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:STRING,UINT,POINTER (ags_marshallers.list:22) */ extern void g_cclosure_user_marshal_VOID__STRING_UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:STRING,UINT,STRING,DOUBLE (ags_marshallers.list:23) */ extern void g_cclosure_user_marshal_VOID__STRING_UINT_STRING_DOUBLE (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:STRING,POINTER (ags_marshallers.list:24) */ extern void g_cclosure_user_marshal_VOID__STRING_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:STRING,STRING,STRING (ags_marshallers.list:25) */ extern void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:POINTER,UINT (ags_marshallers.list:26) */ extern void g_cclosure_user_marshal_VOID__POINTER_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:POINTER,UINT,UINT (ags_marshallers.list:27) */ extern void g_cclosure_user_marshal_VOID__POINTER_UINT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:POINTER,UINT,POINTER (ags_marshallers.list:28) */ extern void g_cclosure_user_marshal_VOID__POINTER_UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:POINTER,POINTER,UINT (ags_marshallers.list:29) */ extern void g_cclosure_user_marshal_VOID__POINTER_POINTER_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:POINTER,POINTER,POINTER (ags_marshallers.list:30) */ extern void g_cclosure_user_marshal_VOID__POINTER_POINTER_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:OBJECT,UINT (ags_marshallers.list:31) */ extern void g_cclosure_user_marshal_VOID__OBJECT_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:OBJECT,OBJECT (ags_marshallers.list:32) */ extern void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:OBJECT,OBJECT,OBJECT,INT,BOOLEAN (ags_marshallers.list:33) */ extern void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_INT_BOOLEAN (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,UINT,INT,BOOLEAN (ags_marshallers.list:34) */ extern void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_UINT_INT_BOOLEAN (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT (ags_marshallers.list:35) */ extern void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* ULONG:VOID (ags_marshallers.list:36) */ extern void g_cclosure_user_marshal_ULONG__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* INT:VOID (ags_marshallers.list:37) */ extern void g_cclosure_user_marshal_INT__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* UINT:VOID (ags_marshallers.list:38) */ extern void g_cclosure_user_marshal_UINT__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* BOOLEAN:UINT,POINTER (ags_marshallers.list:39) */ extern void g_cclosure_user_marshal_BOOLEAN__UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* BOOLEAN:OBJECT,OBJECT (ags_marshallers.list:40) */ extern void g_cclosure_user_marshal_BOOLEAN__OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* UINT:INT,UINT,POINTER (ags_marshallers.list:41) */ extern void g_cclosure_user_marshal_UINT__INT_UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* DOUBLE:DOUBLE,BOOLEAN (ags_marshallers.list:42) */ extern void g_cclosure_user_marshal_DOUBLE__DOUBLE_BOOLEAN (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* STRING:STRING,STRING (ags_marshallers.list:43) */ extern void g_cclosure_user_marshal_STRING__STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* STRING:ULONG,STRING,STRING,STRING,STRING,UINT,POINTER (ags_marshallers.list:44) */ extern void g_cclosure_user_marshal_STRING__ULONG_STRING_STRING_STRING_STRING_UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:VOID (ags_marshallers.list:45) */ extern void g_cclosure_user_marshal_POINTER__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:UINT (ags_marshallers.list:46) */ extern void g_cclosure_user_marshal_POINTER__UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:POINTER,UINT (ags_marshallers.list:47) */ extern void g_cclosure_user_marshal_POINTER__POINTER_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:STRING,STRING (ags_marshallers.list:48) */ extern void g_cclosure_user_marshal_POINTER__STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:STRING,STRING,STRING (ags_marshallers.list:49) */ extern void g_cclosure_user_marshal_POINTER__STRING_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:STRING,STRING,STRING,STRING (ags_marshallers.list:50) */ extern void g_cclosure_user_marshal_POINTER__STRING_STRING_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:ULONG,POINTER,UINT (ags_marshallers.list:51) */ extern void g_cclosure_user_marshal_POINTER__ULONG_POINTER_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:OBJECT (ags_marshallers.list:52) */ extern void g_cclosure_user_marshal_POINTER__OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:OBJECT,OBJECT (ags_marshallers.list:53) */ extern void g_cclosure_user_marshal_POINTER__OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:OBJECT,STRING,STRING,STRING,POINTER (ags_marshallers.list:54) */ extern void g_cclosure_user_marshal_POINTER__OBJECT_STRING_STRING_STRING_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:OBJECT,STRING,STRING,STRING,STRING,POINTER (ags_marshallers.list:55) */ extern void g_cclosure_user_marshal_POINTER__OBJECT_STRING_STRING_STRING_STRING_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* POINTER:POINTER,STRING,STRING (ags_marshallers.list:56) */ extern void g_cclosure_user_marshal_POINTER__POINTER_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* OBJECT:VOID (ags_marshallers.list:57) */ extern void g_cclosure_user_marshal_OBJECT__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* OBJECT:OBJECT (ags_marshallers.list:58) */ extern void g_cclosure_user_marshal_OBJECT__OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* OBJECT:STRING,STRING,STRING (ags_marshallers.list:59) */ extern void g_cclosure_user_marshal_OBJECT__STRING_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* OBJECT:OBJECT,POINTER,POINTER (ags_marshallers.list:60) */ extern void g_cclosure_user_marshal_OBJECT__OBJECT_POINTER_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* OBJECT:OBJECT,OBJECT (ags_marshallers.list:61) */ extern void g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); G_END_DECLS #endif /* __G_CCLOSURE_USER_MARSHAL_MARSHAL_H__ */ gsequencer-1.4.24/ags/object/ags_connection.c0000644000175000017500000002152313256163135016051 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_connection_class_init(AgsConnectionClass *connection); void ags_connection_init (AgsConnection *connection); void ags_connection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_connection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_connection_dispose(GObject *gobject); void ags_connection_finalize(GObject *gobject); /** * SECTION:ags_connection * @short_description: Abstraction of connections * @title: AgsConnection * @section_id: * @include: ags/object/ags_connection.h * * The #AgsConnection provides you a data object and you might want to * use it in conjunction with #AgsConnectable to get connect with its * scope. */ static gpointer ags_connection_parent_class = NULL; enum{ PROP_0, PROP_DATA_OBJECT, }; GType ags_connection_get_type (void) { static GType ags_type_connection = 0; if(!ags_type_connection){ static const GTypeInfo ags_connection_info = { sizeof (AgsConnectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_connection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsConnection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_connection_init, }; ags_type_connection = g_type_register_static(G_TYPE_OBJECT, "AgsConnection", &ags_connection_info, 0); } return (ags_type_connection); } void ags_connection_class_init(AgsConnectionClass *connection) { GObjectClass *gobject; GParamSpec *param_spec; ags_connection_parent_class = g_type_class_peek_parent(connection); /* GObjectClass */ gobject = (GObjectClass *) connection; gobject->set_property = ags_connection_set_property; gobject->get_property = ags_connection_get_property; gobject->dispose = ags_connection_dispose; gobject->finalize = ags_connection_finalize; /* properties */ /** * AgsConnection:data-object: * * The assigned #GObject acting as data object. * * Since: 1.0.0 */ param_spec = g_param_spec_object("data-object", "assigned data object", "The data object it is assigned with", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DATA_OBJECT, param_spec); } void ags_connection_init(AgsConnection *connection) { connection->mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(connection->mutexattr); pthread_mutexattr_settype(connection->mutexattr, PTHREAD_MUTEX_RECURSIVE); connection->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(connection->mutex, connection->mutexattr); connection->data_object = NULL; } void ags_connection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsConnection *connection; connection = AGS_CONNECTION(gobject); switch(prop_id){ case PROP_DATA_OBJECT: { GObject *data_object; AgsMessageDelivery *message_delivery; AgsMessageQueue *message_queue; data_object = (GObject *) g_value_get_object(value); if(connection->data_object == data_object){ return; } if(connection->data_object != NULL){ g_object_unref(connection->data_object); } if(data_object != NULL){ g_object_ref(data_object); } connection->data_object = data_object; /* emit message */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_delivery_find_namespace(message_delivery, "libags"); if(message_queue != NULL){ AgsMessageEnvelope *message; xmlDoc *doc; xmlNode *root_node; /* specify message body */ doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags-command"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "method", "GObject::notify::data-object"); /* add message */ message = ags_message_envelope_alloc(connection, NULL, doc); /* set parameter */ message->parameter = g_new0(GParameter, 1); message->n_params = 1; message->parameter[0].name = "data-object"; g_value_init(&(message->parameter[0].value), G_TYPE_OBJECT); g_value_set_object(&(message->parameter[0].value), data_object); /* add message */ ags_message_delivery_add_message(message_delivery, "libags", message); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_connection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsConnection *connection; connection = AGS_CONNECTION(gobject); switch(prop_id){ case PROP_DATA_OBJECT: { g_value_set_object(value, connection->data_object); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); } } void ags_connection_dispose(GObject *gobject) { AgsConnection *connection; connection = AGS_CONNECTION(gobject); if(connection->data_object != NULL){ g_object_unref(connection->data_object); connection->data_object = NULL; } /* call parent */ G_OBJECT_CLASS(ags_connection_parent_class)->dispose(gobject); } void ags_connection_finalize(GObject *gobject) { AgsConnection *connection; connection = AGS_CONNECTION(gobject); if(connection->data_object != NULL){ g_object_unref(connection->data_object); } pthread_mutex_destroy(connection->mutex); free(connection->mutex); pthread_mutexattr_destroy(connection->mutexattr); free(connection->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_connection_parent_class)->finalize(gobject); } /** * ags_connection_find_type: * @connection: the #GList-struct to search * @connection_type: the #GType to find * * Find next matching @type within @connection. * * Returns: a matching #GList-struct * * Since: 1.0.0 */ GList* ags_connection_find_type(GList *connection, GType connection_type) { if(connection == NULL || connection_type == G_TYPE_NONE){ return(NULL); } while(connection != NULL){ /* check type */ if(AGS_IS_CONNECTION(connection->data) && g_type_is_a(G_OBJECT_TYPE(G_OBJECT(connection->data)), connection_type)){ return(connection); } connection = connection->next; } return(NULL); } /** * ags_connection_find_type_and_data_object_type: * @connection: the #GList-struct to search * @connection_type: the #GType to find * @data_object_type: the #GType to find * * Find next matching @connection_type and @data_object_type * within @connection. * * Returns: a matching #GList-struct * * Since: 1.0.0 */ GList* ags_connection_find_type_and_data_object_type(GList *connection, GType connection_type, GType data_object_type) { GObject *data_object; if(connection == NULL || connection_type == G_TYPE_NONE || data_object_type == G_TYPE_NONE){ return(NULL); } while(connection != NULL){ if(!AGS_IS_CONNECTION(connection->data)){ connection = connection->next; continue; } /* get data object */ pthread_mutex_lock(AGS_CONNECTION(connection->data)->mutex); data_object = AGS_CONNECTION(connection->data)->data_object; pthread_mutex_unlock(AGS_CONNECTION(connection->data)->mutex); /* check type */ if(g_type_is_a(G_OBJECT_TYPE(connection->data), connection_type) && g_type_is_a(G_OBJECT_TYPE(data_object), data_object_type)){ return(connection); } connection = connection->next; } return(NULL); } /** * ags_connection_new: * * Creates an #AgsConnection * * Returns: a new #AgsConnection * * Since: 1.0.0 */ AgsConnection* ags_connection_new() { AgsConnection *connection; connection = (AgsConnection *) g_object_new(AGS_TYPE_CONNECTION, NULL); return(connection); } gsequencer-1.4.24/ags/object/ags_connection_manager.c0000644000175000017500000001336513256163135017550 00000000000000/* 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 . */ #include void ags_connection_manager_class_init(AgsConnectionManagerClass *connection_manager); void ags_connection_manager_init (AgsConnectionManager *connection_manager); void ags_connection_manager_dispose(GObject *gobject); void ags_connection_manager_finalize(GObject *gobject); /** * SECTION:ags_connection_manager * @short_description: Singleton pattern to organize connections * @title: AgsConnectionManager * @section_id: * @include: ags/object/ags_connection_manager.h * * The #AgsConnectionManager manages your connections. */ static gpointer ags_connection_manager_parent_class = NULL; AgsConnectionManager *ags_connection_manager = NULL; GType ags_connection_manager_get_type (void) { static GType ags_type_connection_manager = 0; if(!ags_type_connection_manager){ static const GTypeInfo ags_connection_manager_info = { sizeof (AgsConnectionManagerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_connection_manager_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsConnectionManager), 0, /* n_preallocs */ (GInstanceInitFunc) ags_connection_manager_init, }; ags_type_connection_manager = g_type_register_static(G_TYPE_OBJECT, "AgsConnectionManager", &ags_connection_manager_info, 0); } return (ags_type_connection_manager); } void ags_connection_manager_class_init(AgsConnectionManagerClass *connection_manager) { GObjectClass *gobject; GParamSpec *param_spec; ags_connection_manager_parent_class = g_type_class_peek_parent(connection_manager); /* GObjectClass */ gobject = (GObjectClass *) connection_manager; gobject->dispose = ags_connection_manager_dispose; gobject->finalize = ags_connection_manager_finalize; } void ags_connection_manager_init(AgsConnectionManager *connection_manager) { connection_manager->connection = NULL; } void ags_connection_manager_dispose(GObject *gobject) { AgsConnectionManager *connection_manager; connection_manager = AGS_CONNECTION_MANAGER(gobject); if(connection_manager->connection != NULL){ g_list_free_full(connection_manager->connection, g_object_unref); connection_manager->connection = NULL; } /* call parent */ G_OBJECT_CLASS(ags_connection_manager_parent_class)->dispose(gobject); } void ags_connection_manager_finalize(GObject *gobject) { AgsConnectionManager *connection_manager; connection_manager = AGS_CONNECTION_MANAGER(gobject); if(connection_manager->connection != NULL){ g_list_free_full(connection_manager->connection, g_object_unref); } if(connection_manager == ags_connection_manager){ ags_connection_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_connection_manager_parent_class)->finalize(gobject); } GList* ags_connection_manager_get_connection(AgsConnectionManager *connection_manager) { if(connection_manager == NULL){ connection_manager = ags_connection_manager_get_instance(); } return(g_list_copy(connection_manager->connection)); } /** * ags_connection_manager_add_connection: * @connection_manager: the #AgsConnectionManager * @connection: the #AgsConnection * * Add an #AgsConnection to @connection_manager. * * Since: 1.0.0 */ void ags_connection_manager_add_connection(AgsConnectionManager *connection_manager, AgsConnection *connection) { if(connection_manager == NULL){ connection_manager = ags_connection_manager_get_instance(); } connection_manager->connection = g_list_prepend(connection_manager->connection, connection); } /** * ags_connection_manager_remove_connection: * @connection_manager: the #AgsConnectionManager * @connection: the #AgsConnection * * Remove an #AgsConnection from @connection_manager. * * Since: 1.0.0 */ void ags_connection_manager_remove_connection(AgsConnectionManager *connection_manager, AgsConnection *connection) { if(connection_manager == NULL){ connection_manager = ags_connection_manager_get_instance(); } connection_manager->connection = g_list_remove(connection_manager->connection, connection); } /** * ags_connection_manager_get_instance: * * Get instance. * * Returns: the #AgsConnectionManager * * Since: 1.0.0 */ AgsConnectionManager* ags_connection_manager_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&(mutex)); if(ags_connection_manager == NULL){ ags_connection_manager = ags_connection_manager_new(); pthread_mutex_unlock(&(mutex)); }else{ pthread_mutex_unlock(&(mutex)); } return(ags_connection_manager); } /** * ags_connection_manager_new: * * Creates an #AgsConnectionManager * * Returns: a new #AgsConnectionManager * * Since: 1.0.0 */ AgsConnectionManager* ags_connection_manager_new() { AgsConnectionManager *connection_manager; connection_manager = (AgsConnectionManager *) g_object_new(AGS_TYPE_CONNECTION_MANAGER, NULL); return(connection_manager); } gsequencer-1.4.24/ags/object/ags_async_queue.c0000644000175000017500000001635213247044247016241 00000000000000/* 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 . */ #include #include void ags_async_queue_base_init(AgsAsyncQueueInterface *interface); /** * SECTION:ags_async_queue * @short_description: asynchronous run * @title: AgsAsyncQueue * @section_id: AgsAsyncQueue * @include: ags/object/ags_async_queue.h * * The #AgsAsyncQueue interface determines a thread-safe/collision-free slot. The implementation shall * run tasks in a safe context. */ 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", &ags_async_queue_info, 0); } return(ags_type_async_queue); } void ags_async_queue_base_init(AgsAsyncQueueInterface *interface) { /* empty */ } /** * ags_async_queue_increment_wait_ref: * @async_queue: the #AgsAsyncQueue * * Increments wait ref. * * Since: 1.0.0 */ void ags_async_queue_increment_wait_ref(AgsAsyncQueue *async_queue) { 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->increment_wait_ref); async_queue_interface->increment_wait_ref(async_queue); } /** * ags_async_queue_get_wait_ref: * @async_queue: the #AgsAsyncQueue * * Get wait ref. * * Returns: The number of threads waiting. * * Since: 1.0.0 */ guint ags_async_queue_get_wait_ref(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->get_wait_ref, FALSE); return(async_queue_interface->get_wait_ref(async_queue)); } /** * ags_async_queue_set_run_mutex: * @async_queue: the #AgsAsyncQueue * @run_mutex: a pthread_mutex_t * * Sets the mutex to access the condition variable. * * Since: 1.0.0 */ 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); } /** * ags_async_queue_get_run_mutex: * @async_queue: the #AgsAsyncQueue * * Get the mutex to access the condition variable. * * Returns: a pthread_mutex_t * * Since: 1.0.0 */ 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)); } /** * ags_async_queue_set_run_cond: * @async_queue: the #AgsAsyncQueue * @run_cond: a pthread_cond_t * * Sets the condition to determine if @async_queue was run. * * Since: 1.0.0 */ 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); } /** * ags_async_queue_get_run_cond: * @async_queue: the #AgsAsyncQueue * * Get the condition to wait for @async_queue. * * Returns: the pthread_cond_t * * Since: 1.0.0 */ 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)); } /** * ags_async_queue_set_run: * @async_queue: the #AgsAsyncQueue * @is_run: if %TRUE the queue was already running * * Determine if you are allowed to pass the condition. * * Since: 1.0.0 */ 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); } /** * ags_async_queue_is_run: * @async_queue: the #AgsAsyncQueue * * Decide if you are allowed to pass the condition. * * Returns: if %TRUE it is safe to continue, else you should wait for the condition. * * Since: 1.0.0 */ 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)); } /** * ags_async_queue_schedule_task: * @async_queue: the #AgsAsyncQueue * @task: the task object * * Schedule @task to be launched in a safe context. * * Since: 1.3.0 */ void ags_async_queue_schedule_task(AgsAsyncQueue *async_queue, GObject *task) { 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->schedule_task); async_queue_interface->schedule_task(async_queue, task); } /** * ags_async_queue_schedule_task_list: * @async_queue: the #AgsAsyncQueue * @task_list: a list of task objects * * Schedule @task_list to be launched in a safe context. * * Since: 1.3.0 */ void ags_async_queue_schedule_task_list(AgsAsyncQueue *async_queue, GList *task_list) { 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->schedule_task_list); async_queue_interface->schedule_task_list(async_queue, task_list); } gsequencer-1.4.24/ags/object/ags_packable.c0000644000175000017500000000505113246707333015455 00000000000000/* 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 . */ #include void ags_packable_base_init(AgsPackableInterface *interface); /** * SECTION:ags_packable * @short_description: pack ressources * @title: AgsPackable * @section_id: * @include: ags/object/ags_packable.h * * The #AgsPackable interface gives you a unique access to packable classes. */ GType ags_packable_get_type() { static GType ags_type_packable = 0; if(!ags_type_packable){ static const GTypeInfo ags_packable_info = { sizeof(AgsPackableInterface), (GBaseInitFunc) ags_packable_base_init, NULL, /* base_finalize */ }; ags_type_packable = g_type_register_static(G_TYPE_INTERFACE, "AgsPackable", &ags_packable_info, 0); } return(ags_type_packable); } void ags_packable_base_init(AgsPackableInterface *interface) { /* empty */ } /** * ags_packable_pack: * @packable: the #AgsPackable * @container: the container * * Pack to container. * * Returns: %TRUE on success * * Since: 1.0.0 */ gboolean ags_packable_pack(AgsPackable *packable, GObject *container) { AgsPackableInterface *packable_interface; g_return_val_if_fail(AGS_IS_PACKABLE(packable), TRUE); packable_interface = AGS_PACKABLE_GET_INTERFACE(packable); g_return_val_if_fail(packable_interface->pack, TRUE); return(packable_interface->pack(packable, container)); } /** * ags_packable_unpack: * @packable: the #AgsPackable * * Unpack from container. * * Returns: %TRUE on success * * Since: 1.0.0 */ gboolean ags_packable_unpack(AgsPackable *packable) { AgsPackableInterface *packable_interface; g_return_val_if_fail(AGS_IS_PACKABLE(packable), TRUE); packable_interface = AGS_PACKABLE_GET_INTERFACE(packable); g_return_val_if_fail(packable_interface->unpack, TRUE); return(packable_interface->unpack(packable)); } gsequencer-1.4.24/ags/object/ags_dynamic_connectable.h0000644000175000017500000000435213246707333017704 00000000000000/* 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 . */ #ifndef __AGS_DYNAMIC_CONNECTABLE_H__ #define __AGS_DYNAMIC_CONNECTABLE_H__ #include #include #define AGS_TYPE_DYNAMIC_CONNECTABLE (ags_dynamic_connectable_get_type()) #define AGS_DYNAMIC_CONNECTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DYNAMIC_CONNECTABLE, AgsDynamicConnectable)) #define AGS_DYNAMIC_CONNECTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_DYNAMIC_CONNECTABLE, AgsDynamicConnectableInterface)) #define AGS_IS_DYNAMIC_CONNECTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DYNAMIC_CONNECTABLE)) #define AGS_IS_DYNAMIC_CONNECTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_DYNAMIC_CONNECTABLE)) #define AGS_DYNAMIC_CONNECTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_DYNAMIC_CONNECTABLE, AgsDynamicConnectableInterface)) typedef struct _AgsDynamicConnectable AgsDynamicConnectable; typedef struct _AgsDynamicConnectableInterface AgsDynamicConnectableInterface; struct _AgsDynamicConnectableInterface { GTypeInterface ginterface; void (*connect_dynamic)(AgsDynamicConnectable *connectable); void (*disconnect_dynamic)(AgsDynamicConnectable *connectable); }; GType ags_dynamic_connectable_get_type(); void ags_dynamic_connectable_connect_dynamic(AgsDynamicConnectable *connectable); void ags_dynamic_connectable_disconnect_dynamic(AgsDynamicConnectable *connectable); #endif /*__AGS_DYNAMIC_CONNECTABLE_H__*/ gsequencer-1.4.24/ags/object/ags_tree_iterator.h0000644000175000017500000000573413246707333016600 00000000000000/* 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 . */ #ifndef __AGS_TREE_ITERATOR_H__ #define __AGS_TREE_ITERATOR_H__ #include #include #define AGS_TYPE_TREE_ITERATOR (ags_tree_iterator_get_type()) #define AGS_TREE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TREE_ITERATOR, AgsTreeIterator)) #define AGS_TREE_ITERATOR_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_TREE_ITERATOR, AgsTreeIteratorInterface)) #define AGS_IS_TREE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_TREE_ITERATOR)) #define AGS_IS_TREE_ITERATOR_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_TREE_ITERATOR)) #define AGS_TREE_ITERATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_TREE_ITERATOR, AgsTreeIteratorInterface)) typedef struct _AgsTreeIterator AgsTreeIterator; typedef struct _AgsTreeIteratorInterface AgsTreeIteratorInterface; struct _AgsTreeIteratorInterface { GTypeInterface ginterface; void (*set_inverse_mode)(AgsTreeIterator *tree, gboolean mode); gboolean (*is_inverse_mode)(AgsTreeIterator *tree); void (*iterate)(AgsTreeIterator *tree, gpointer node_id); void (*iterate_nested)(AgsTreeIterator *tree, gpointer node_id); void (*safe_iterate)(AgsTreeIterator *toplevel, AgsTreeIterator *current, gpointer node_id); void (*safe_iterate_nested)(AgsTreeIterator *toplevel, AgsTreeIterator *current, gpointer node_id); void (*loop_action)(AgsTreeIterator *current, gpointer node_id); void (*nested_loop_action)(AgsTreeIterator *current, gpointer node_id); }; GType ags_tree_iterator_get_type(); void ags_tree_iterator_set_inverse_mode(AgsTreeIterator *tree, gboolean mode); gboolean ags_tree_iterator_is_inverse_mode(AgsTreeIterator *tree); void ags_tree_iterator_iterate(AgsTreeIterator *tree, gpointer node_id); void ags_tree_iterator_iterate_nested(AgsTreeIterator *tree, gpointer node_id); void ags_tree_iterator_safe_iterate(AgsTreeIterator *toplevel, AgsTreeIterator *current, gpointer node_id); void ags_tree_iterator_safe_iterate_nested(AgsTreeIterator *toplevel, AgsTreeIterator *current, gpointer node_id); #endif /*__AGS_TREE_ITERATOR_H__*/ gsequencer-1.4.24/ags/object/ags_applicable.c0000644000175000017500000000604513246707333016013 00000000000000/* 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 . */ #include #include void ags_applicable_base_init(AgsApplicableInterface *interface); /** * SECTION:ags_applicable * @short_description: unique access to applicable objects * @title: AgsApplicable * @section_id: AgsApplicable * @include: ags/object/ags_applicable.h * * The #AgsApplicable interface gives you a unique access to applicable objects. */ GType ags_applicable_get_type() { static GType ags_type_applicable = 0; if(!ags_type_applicable){ static const GTypeInfo ags_applicable_info = { sizeof(AgsApplicableInterface), (GBaseInitFunc) ags_applicable_base_init, NULL, /* base_finalize */ }; ags_type_applicable = g_type_register_static(G_TYPE_INTERFACE, "AgsApplicable", &ags_applicable_info, 0); } return(ags_type_applicable); } void ags_applicable_base_init(AgsApplicableInterface *interface) { /* empty */ } /** * ags_applicable_set_update: * @applicable: an #AgsApplicable * @update: if %TRUE do ::reset after ::apply * * Update behaviour. * * Since: 1.0.0 */ void ags_applicable_set_update(AgsApplicable *applicable, gboolean update) { AgsApplicableInterface *applicable_interface; g_return_if_fail(AGS_IS_APPLICABLE(applicable)); applicable_interface = AGS_APPLICABLE_GET_INTERFACE(applicable); g_return_if_fail(applicable_interface->set_update); applicable_interface->set_update(applicable, update); } /** * ags_applicable_apply: * @applicable: an #AgsApplicable * * Apply all changes done so far. * * Since: 1.0.0 */ void ags_applicable_apply(AgsApplicable *applicable) { AgsApplicableInterface *applicable_interface; g_return_if_fail(AGS_IS_APPLICABLE(applicable)); applicable_interface = AGS_APPLICABLE_GET_INTERFACE(applicable); g_return_if_fail(applicable_interface->apply); applicable_interface->apply(applicable); } /** * ags_applicable_reset: * @applicable: an #AgsApplicable * * Reset all changes within the user interface. * * Since: 1.0.0 */ void ags_applicable_reset(AgsApplicable *applicable) { AgsApplicableInterface *applicable_interface; g_return_if_fail(AGS_IS_APPLICABLE(applicable)); applicable_interface = AGS_APPLICABLE_GET_INTERFACE(applicable); g_return_if_fail(applicable_interface->reset); applicable_interface->reset(applicable); } gsequencer-1.4.24/ags/object/ags_connectable.c0000644000175000017500000001466413256163135016177 00000000000000/* 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 . */ #include void ags_connectable_base_init(AgsConnectableInterface *interface); /** * SECTION:ags_connectable * @short_description: unique access to objects * @title: AgsConnectable * @section_id: AgsConnectable * @include: ags/object/ags_connectable.h * * The #AgsConnectable interface gives you a unique access to all objects * and is responsible to set up signal handlers. */ GType ags_connectable_get_type() { static GType ags_type_connectable = 0; if(!ags_type_connectable){ static const GTypeInfo ags_connectable_info = { sizeof(AgsConnectableInterface), (GBaseInitFunc) ags_connectable_base_init, NULL, /* base_finalize */ }; ags_type_connectable = g_type_register_static(G_TYPE_INTERFACE, "AgsConnectable", &ags_connectable_info, 0); } return(ags_type_connectable); } void ags_connectable_base_init(AgsConnectableInterface *interface) { /* empty */ } /** * ags_connectable_add_to_registry: * @connectable: the #AgsConnectable * * Add connectable to registry. * * Since: 1.0.0 */ void ags_connectable_add_to_registry(AgsConnectable *connectable) { AgsConnectableInterface *connectable_interface; g_return_if_fail(AGS_IS_CONNECTABLE(connectable)); connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable); g_return_if_fail(connectable_interface->add_to_registry); connectable_interface->add_to_registry(connectable); } /** * ags_connectable_remove_from_registry: * @connectable: the #AgsConnectable * * Remove connectable from registry. * * Since: 1.0.0 */ void ags_connectable_remove_from_registry(AgsConnectable *connectable) { AgsConnectableInterface *connectable_interface; g_return_if_fail(AGS_IS_CONNECTABLE(connectable)); connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable); g_return_if_fail(connectable_interface->remove_from_registry); connectable_interface->remove_from_registry(connectable); } /** * ags_connectable_update: * @connectable: the #AgsConnectable * * Disconnect the connectable. * * Returns: the #xmlNode-struct describing howto update * * Since: 1.0.0 */ xmlNode* ags_connectable_update(AgsConnectable *connectable) { AgsConnectableInterface *connectable_interface; g_return_val_if_fail(AGS_IS_CONNECTABLE(connectable), NULL); connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable); g_return_val_if_fail(connectable_interface->update, NULL); return(connectable_interface->update(connectable)); } /** * ags_connectable_is_ready: * @connectable: the #AgsConnectable * * Connect the connectable. * * Returns: %TRUE if is added to registry, otherwise %FALSE. * * Since: 1.0.0 */ gboolean ags_connectable_is_ready(AgsConnectable *connectable) { AgsConnectableInterface *connectable_interface; g_return_val_if_fail(AGS_IS_CONNECTABLE(connectable), FALSE); connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable); if(connectable_interface->is_ready == NULL) return(TRUE); return(connectable_interface->is_ready(connectable)); } /** * ags_connectable_is_connected: * @connectable: the #AgsConnectable * * Connect the connectable. * * Returns: %TRUE if is connected, otherwise %FALSE. * * Since: 1.0.0 */ gboolean ags_connectable_is_connected(AgsConnectable *connectable) { AgsConnectableInterface *connectable_interface; g_return_val_if_fail(AGS_IS_CONNECTABLE(connectable), FALSE); connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable); g_return_val_if_fail(connectable_interface->is_connected, FALSE); return(connectable_interface->is_connected(connectable)); } /** * ags_connectable_connect: * @connectable: the #AgsConnectable * * Connect the connectable. * * Since: 1.0.0 */ void ags_connectable_connect(AgsConnectable *connectable) { AgsConnectableInterface *connectable_interface; g_return_if_fail(AGS_IS_CONNECTABLE(connectable)); connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable); g_return_if_fail(connectable_interface->connect); // if(!ags_connectable_is_ready(connectable)){ // return; // } connectable_interface->connect(connectable); } /** * ags_connectable_disconnect: * @connectable: the #AgsConnectable * * Disconnect the connectable. * * Since: 1.0.0 */ void ags_connectable_disconnect(AgsConnectable *connectable) { AgsConnectableInterface *connectable_interface; g_return_if_fail(AGS_IS_CONNECTABLE(connectable)); connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable); g_return_if_fail(connectable_interface->disconnect); connectable_interface->disconnect(connectable); } /** * ags_connectable_connect_scope: * @connectable: the #AgsConnectable * @connection: the connection * * Disconnect the connectable. * * Since: 1.0.0 */ void ags_connectable_connect_scope(AgsConnectable *connectable, GObject *connection) { AgsConnectableInterface *connectable_interface; g_return_if_fail(AGS_IS_CONNECTABLE(connectable)); connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable); g_return_if_fail(connectable_interface->connect_scope); connectable_interface->connect_scope(connectable, connection); } /** * ags_connectable_disconnect_scope: * @connectable: the #AgsConnectable * @connection: the connection * * Disconnect the connectable. * * Since: 1.0.0 */ void ags_connectable_disconnect_scope(AgsConnectable *connectable, GObject *connection) { AgsConnectableInterface *connectable_interface; g_return_if_fail(AGS_IS_CONNECTABLE(connectable)); connectable_interface = AGS_CONNECTABLE_GET_INTERFACE(connectable); g_return_if_fail(connectable_interface->disconnect_scope); connectable_interface->disconnect_scope(connectable, connection); } gsequencer-1.4.24/ags/object/ags_seekable.h0000644000175000017500000000352713246707333015501 00000000000000/* 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 . */ #ifndef __AGS_SEEKABLE_H__ #define __AGS_SEEKABLE_H__ #include #include #define AGS_TYPE_SEEKABLE (ags_seekable_get_type()) #define AGS_SEEKABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SEEKABLE, AgsSeekable)) #define AGS_SEEKABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_SEEKABLE, AgsSeekableInterface)) #define AGS_IS_SEEKABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SEEKABLE)) #define AGS_IS_SEEKABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_SEEKABLE)) #define AGS_SEEKABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_SEEKABLE, AgsSeekableInterface)) typedef struct _AgsSeekable AgsSeekable; typedef struct _AgsSeekableInterface AgsSeekableInterface; struct _AgsSeekableInterface { GTypeInterface ginterface; void (*seek)(AgsSeekable *seekable, guint steps, gboolean forward); }; GType ags_seekable_get_type(); void ags_seekable_seek(AgsSeekable *seekable, guint steps, gboolean forward); #endif /*__AGS_SEEKABLE_H__*/ gsequencer-1.4.24/ags/object/ags_marshallers.list0000644000175000017500000000274713256163135016767 00000000000000VOID:BOOLEAN,POINTER VOID:INT,UINT,POINTER VOID:UINT,BOOLEAN VOID:UINT,UINT VOID:UINT,UINT,BOOLEAN VOID:UINT,UINT,UINT VOID:UINT,UINT,UINT,UINT VOID:UINT,UINT,UINT,UINT,UINT VOID:UINT,UINT,UINT,UINT,UINT,UINT VOID:UINT,UINT,UINT,UINT,UINT,UINT,UINT VOID:UINT,DOUBLE,UINT VOID:UINT,INT VOID:UINT,DOUBLE VOID:UINT,STRING,UINT VOID:UINT,POINTER,UINT VOID:ULONG,UINT VOID:ULONG,UINT,BOOLEAN VOID:DOUBLE,DOUBLE VOID:ULONG,UINT,UINT VOID:STRING,UINT VOID:STRING,UINT,DOUBLE VOID:STRING,UINT,POINTER VOID:STRING,UINT,STRING,DOUBLE VOID:STRING,POINTER VOID:STRING,STRING,STRING VOID:POINTER,UINT VOID:POINTER,UINT,UINT VOID:POINTER,UINT,POINTER VOID:POINTER,POINTER,UINT VOID:POINTER,POINTER,POINTER VOID:OBJECT,UINT VOID:OBJECT,OBJECT VOID:OBJECT,OBJECT,OBJECT,INT,BOOLEAN VOID:OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,UINT,INT,BOOLEAN VOID:OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT ULONG:VOID INT:VOID UINT:VOID BOOLEAN:UINT,POINTER BOOLEAN:OBJECT,OBJECT UINT:INT,UINT,POINTER DOUBLE:DOUBLE,BOOLEAN STRING:STRING,STRING STRING:ULONG,STRING,STRING,STRING,STRING,UINT,POINTER POINTER:VOID POINTER:UINT POINTER:POINTER,UINT POINTER:STRING,STRING POINTER:STRING,STRING,STRING POINTER:STRING,STRING,STRING,STRING POINTER:ULONG,POINTER,UINT POINTER:OBJECT POINTER:OBJECT,OBJECT POINTER:OBJECT,STRING,STRING,STRING,POINTER POINTER:OBJECT,STRING,STRING,STRING,STRING,POINTER POINTER:POINTER,STRING,STRING OBJECT:VOID OBJECT:OBJECT OBJECT:STRING,STRING,STRING OBJECT:OBJECT,POINTER,POINTER OBJECT:OBJECT,OBJECT gsequencer-1.4.24/ags/object/ags_async_queue.h0000644000175000017500000000625013247044247016242 00000000000000/* 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 . */ #ifndef __AGS_ASYNC_QUEUE_H__ #define __AGS_ASYNC_QUEUE_H__ #include #include #include #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 struct _AgsAsyncQueue AgsAsyncQueue; typedef struct _AgsAsyncQueueInterface AgsAsyncQueueInterface; struct _AgsAsyncQueueInterface { GTypeInterface ginterface; void (*increment_wait_ref)(AgsAsyncQueue *async_queue); guint (*get_wait_ref)(AgsAsyncQueue *async_queue); 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); void (*schedule_task)(AgsAsyncQueue *async_queue, GObject *task); void (*schedule_task_list)(AgsAsyncQueue *async_queue, GObject *task); }; GType ags_async_queue_get_type(); void ags_async_queue_increment_wait_ref(AgsAsyncQueue *async_queue); guint ags_async_queue_get_wait_ref(AgsAsyncQueue *async_queue); 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); void ags_async_queue_schedule_task(AgsAsyncQueue *async_queue, GObject *task); void ags_async_queue_schedule_task_list(AgsAsyncQueue *async_queue, GList *list); #endif /*__AGS_ASYNC_QUEUE_H__*/ gsequencer-1.4.24/ags/object/ags_distributed_manager.h0000644000175000017500000001101713256163135017730 00000000000000/* 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 . */ #ifndef __AGS_DISTRIBUTED_MANAGER_H__ #define __AGS_DISTRIBUTED_MANAGER_H__ #include #include #define AGS_TYPE_DISTRIBUTED_MANAGER (ags_distributed_manager_get_type()) #define AGS_DISTRIBUTED_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DISTRIBUTED_MANAGER, AgsDistributedManager)) #define AGS_DISTRIBUTED_MANAGER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_DISTRIBUTED_MANAGER, AgsDistributedManagerInterface)) #define AGS_IS_DISTRIBUTED_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DISTRIBUTED_MANAGER)) #define AGS_IS_DISTRIBUTED_MANAGER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_DISTRIBUTED_MANAGER)) #define AGS_DISTRIBUTED_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_DISTRIBUTED_MANAGER, AgsDistributedManagerInterface)) typedef struct _AgsDistributedManager AgsDistributedManager; typedef struct _AgsDistributedManagerInterface AgsDistributedManagerInterface; struct _AgsDistributedManagerInterface { GTypeInterface ginterface; void (*set_url)(AgsDistributedManager *distributed_manager, gchar *url); gchar* (*get_url)(AgsDistributedManager *distributed_manager); void (*set_ports)(AgsDistributedManager *distributed_manager, guint *ports, guint port_count); guint* (*get_ports)(AgsDistributedManager *distributed_manager, guint *port_count); void (*set_soundcard)(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *soundcard); GList* (*get_soundcard)(AgsDistributedManager *distributed_manager, gchar *client_uuid); void (*set_sequencer)(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *sequencer); GList* (*get_sequencer)(AgsDistributedManager *distributed_manager, gchar *client_uuid); GObject* (*register_soundcard)(AgsDistributedManager *distributed_manager, gboolean is_output); void (*unregister_soundcard)(AgsDistributedManager *distributed_manager, GObject *soundcard); GObject* (*register_sequencer)(AgsDistributedManager *distributed_manager, gboolean is_output); void (*unregister_sequencer)(AgsDistributedManager *distributed_manager, GObject *sequencer); }; GType ags_distributed_manager_get_type(); void ags_distributed_manager_set_url(AgsDistributedManager *distributed_manager, gchar *url); gchar* ags_distributed_manager_get_url(AgsDistributedManager *distributed_manager); void ags_distributed_manager_set_ports(AgsDistributedManager *distributed_manager, guint *port, guint port_count); guint* ags_distributed_manager_get_ports(AgsDistributedManager *distributed_manager, guint *port_count); void ags_distributed_manager_set_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *soundcard); GList* ags_distributed_manager_get_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid); void ags_distributed_manager_set_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *sequencer); GList* ags_distributed_manager_get_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid); GObject* ags_distributed_manager_register_soundcard(AgsDistributedManager *distributed_manager, gboolean is_output); void ags_distributed_manager_unregister_soundcard(AgsDistributedManager *distributed_manager, GObject *soundcard); GObject* ags_distributed_manager_register_sequencer(AgsDistributedManager *distributed_manager, gboolean is_output); void ags_distributed_manager_unregister_sequencer(AgsDistributedManager *distributed_manager, GObject *sequencer); #endif /*__AGS_DISTRIBUTED_MANAGER_H__*/ gsequencer-1.4.24/ags/object/ags_mutable.h0000644000175000017500000000344513246707333015356 00000000000000/* 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 . */ #ifndef __AGS_MUTABLE_H__ #define __AGS_MUTABLE_H__ #include #include #define AGS_TYPE_MUTABLE (ags_mutable_get_type()) #define AGS_MUTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTABLE, AgsMutable)) #define AGS_MUTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_MUTABLE, AgsMutableInterface)) #define AGS_IS_MUTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MUTABLE)) #define AGS_IS_MUTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_MUTABLE)) #define AGS_MUTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_MUTABLE, AgsMutableInterface)) typedef struct _AgsMutable AgsMutable; typedef struct _AgsMutableInterface AgsMutableInterface; struct _AgsMutableInterface { GTypeInterface ginterface; void (*set_muted)(AgsMutable *mutable, gboolean muted); }; GType ags_mutable_get_type(); void ags_mutable_set_muted(AgsMutable *mutable, gboolean muted); #endif /*__AGS_MUTABLE_H__*/ gsequencer-1.4.24/ags/object/ags_connection_manager.h0000644000175000017500000000467013256163135017554 00000000000000/* 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 . */ #ifndef __AGS_CONNECTION_MANAGER_H__ #define __AGS_CONNECTION_MANAGER_H__ #include #include #include #define AGS_TYPE_CONNECTION_MANAGER (ags_connection_manager_get_type()) #define AGS_CONNECTION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONNECTION_MANAGER, AgsConnectionManager)) #define AGS_CONNECTION_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CONNECTION_MANAGER, AgsConnectionManagerClass)) #define AGS_IS_CONNECTION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CONNECTION_MANAGER)) #define AGS_IS_CONNECTION_MANAGER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CONNECTION_MANAGER)) #define AGS_CONNECTION_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_CONNECTION_MANAGER, AgsConnectionManagerClass)) typedef struct _AgsConnectionManager AgsConnectionManager; typedef struct _AgsConnectionManagerClass AgsConnectionManagerClass; struct _AgsConnectionManager { GObject object; GList *connection; }; struct _AgsConnectionManagerClass { GObjectClass object; }; GType ags_connection_manager_get_type(void); GList* ags_connection_manager_get_connection(AgsConnectionManager *connection_manager); void ags_connection_manager_add_connection(AgsConnectionManager *connection_manager, AgsConnection *connection); void ags_connection_manager_remove_connection(AgsConnectionManager *connection_manager, AgsConnection *connection); /* */ AgsConnectionManager* ags_connection_manager_get_instance(); AgsConnectionManager* ags_connection_manager_new(); #endif /*__AGS_CONNECTION_MANAGER_H__*/ gsequencer-1.4.24/ags/object/ags_tactable.h0000644000175000017500000000545013256163135015477 00000000000000/* 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 . */ #ifndef __AGS_TACTABLE_H__ #define __AGS_TACTABLE_H__ #include #include #define AGS_TYPE_TACTABLE (ags_tactable_get_type()) #define AGS_TACTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TACTABLE, AgsTactable)) #define AGS_TACTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_TACTABLE, AgsTactableInterface)) #define AGS_IS_TACTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_TACTABLE)) #define AGS_IS_TACTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_TACTABLE)) #define AGS_TACTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_TACTABLE, AgsTactableInterface)) typedef struct _AgsTactable AgsTactable; typedef struct _AgsTactableInterface AgsTactableInterface; struct _AgsTactableInterface { GTypeInterface ginterface; gdouble (*get_sequencer_duration)(AgsTactable *tactable); gdouble (*get_notation_duration)(AgsTactable *tactable); gdouble (*get_tact)(AgsTactable *tactable); gdouble (*get_bpm)(AgsTactable *tactable); void (*change_sequencer_duration)(AgsTactable *tactable, gdouble duration); void (*change_notation_duration)(AgsTactable *tactable, gdouble duration); void (*change_tact)(AgsTactable *tactable, gdouble new_tact, gdouble old_tact); void (*change_bpm)(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm); }; GType ags_tactable_get_type(); gdouble ags_tactable_get_sequencer_duration(AgsTactable *tactable); gdouble ags_tactable_get_notation_duration(AgsTactable *tactable); gdouble ags_tactable_get_tact(AgsTactable *tactable); gdouble ags_tactable_get_bpm(AgsTactable *tactable); void ags_tactable_change_sequencer_duration(AgsTactable *tactable, gdouble duration); void ags_tactable_change_notation_duration(AgsTactable *tactable, gdouble duration); void ags_tactable_change_tact(AgsTactable *tactable, gdouble new_tact, gdouble old_tact); void ags_tactable_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm); #endif /*__AGS_TACTABLE_H__*/ gsequencer-1.4.24/ags/object/ags_application_context.h0000644000175000017500000001241413247044247017767 00000000000000/* 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 . */ #ifndef __AGS_APPLICATION_CONTEXT_H__ #define __AGS_APPLICATION_CONTEXT_H__ #include #include #include #include #define AGS_TYPE_APPLICATION_CONTEXT (ags_application_context_get_type()) #define AGS_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPLICATION_CONTEXT, AgsApplicationContext)) #define AGS_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_APPLICATION_CONTEXT, AgsApplicationContextClass)) #define AGS_IS_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_APPLICATION_CONTEXT)) #define AGS_IS_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_APPLICATION_CONTEXT)) #define AGS_APPLICATION_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_APPLICATION_CONTEXT, AgsApplicationContextClass)) #ifndef PACKAGE_VERSION #define AGS_VERSION "1.2.0" #else #define AGS_VERSION PACKAGE_VERSION #endif #define AGS_BUILD_ID "CEST 14-09-2017 04:33" #define AGS_DEFAULT_DIRECTORY ".gsequencer" #define AGS_DEFAULT_CONFIG "ags.conf" #define AGS_INIT_CONTEXT_TSD_APPLICATION_CONTEXT "ags-application-context" typedef struct _AgsApplicationContext AgsApplicationContext; typedef struct _AgsApplicationContextClass AgsApplicationContextClass; /** * AgsApplicationContextFlags: * @AGS_APPLICATION_CONTEXT_DEFAULT: indicates the default context, used if siblings available * @AGS_APPLICATION_CONTEXT_REGISTER_TYPES: enable to register types * @AGS_APPLICATION_CONTEXT_ADD_TO_REGISTRY: add to #AgsRegistry * @AGS_APPLICATION_CONTEXT_CONNECT: call connect of #AgsConnectable descending objects * @AGS_APPLICATION_CONTEXT_TYPES_REGISTERED: indicates the types have been registered * @AGS_APPLICATION_CONTEXT_ADDED_TO_REGISTRY: indicates the application context was added to #AgsRegistry * @AGS_APPLICATION_CONTEXT_CONNECTED: indicates the application context was connected by calling #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsApplicationContext by * enable/disable as flags. */ typedef enum{ AGS_APPLICATION_CONTEXT_DEFAULT = 1, AGS_APPLICATION_CONTEXT_REGISTER_TYPES = 1 << 1, AGS_APPLICATION_CONTEXT_ADD_TO_REGISTRY = 1 << 2, AGS_APPLICATION_CONTEXT_CONNECT = 1 << 3, AGS_APPLICATION_CONTEXT_TYPES_REGISTERED = 1 << 4, AGS_APPLICATION_CONTEXT_ADDED_TO_REGISTRY = 1 << 5, AGS_APPLICATION_CONTEXT_CONNECTED = 1 << 6, }AgsApplicationContextFlags; struct _AgsApplicationContext { GObject object; guint flags; gchar *version; gchar *build_id; int argc; char **argv; GObject *log; gchar *domain; GList *sibling; AgsConfig *config; pthread_mutexattr_t *mutexattr; pthread_mutex_t *mutex; GObject *main_loop; GObject *autosave_thread; GObject *task_thread; AgsFile *file; GObject *history; }; struct _AgsApplicationContextClass { GObjectClass object; void (*load_config)(AgsApplicationContext *application_context); void (*prepare)(AgsApplicationContext *application_context); void (*setup)(AgsApplicationContext *application_context); void (*register_types)(AgsApplicationContext *application_context); void (*read)(AgsFile *file, xmlNode *node, GObject **gobject); xmlNode* (*write)(AgsFile *file, xmlNode *parent, GObject *gobject); void (*quit)(AgsApplicationContext *application_context); }; GType ags_application_context_get_type(); void ags_application_context_load_config(AgsApplicationContext *application_context); void ags_application_context_prepare(AgsApplicationContext *application_context); void ags_application_context_setup(AgsApplicationContext *application_context); void ags_application_context_register_types(AgsApplicationContext *application_context); void ags_application_context_add_sibling(AgsApplicationContext *application_context, AgsApplicationContext *sibling); void ags_application_context_remove_sibling(AgsApplicationContext *application_context, AgsApplicationContext *sibling); AgsApplicationContext* ags_application_context_find_default(GList *application_context); GList* ags_application_context_find_main_loop(GList *application_context); void ags_application_context_quit(AgsApplicationContext *application_context); AgsApplicationContext* ags_application_context_get_instance(); AgsApplicationContext* ags_application_context_new(GObject *main_loop, AgsConfig *config); #endif /*__AGS_APPLICATION_CONTEXT_H__*/ gsequencer-1.4.24/ags/object/ags_countable.c0000644000175000017500000000552613256163135015673 00000000000000/* 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 . */ #include #include void ags_countable_base_init(AgsCountableInterface *interface); /** * SECTION:ags_countable * @short_description: a counter interface * @title: AgsCountable * @section_id: * @include: ags/object/ags_countable.h * * The #AgsCountable interface gives you a unique access to counters. Generally we * distinguish between notation and sequencer counters. Those may have their own * relative positions, especially the sequencers may loop. */ GType ags_countable_get_type() { static GType ags_type_countable = 0; if(!ags_type_countable){ static const GTypeInfo ags_countable_info = { sizeof(AgsCountableInterface), (GBaseInitFunc) ags_countable_base_init, NULL, /* base_finalize */ }; ags_type_countable = g_type_register_static(G_TYPE_INTERFACE, "AgsCountable", &ags_countable_info, 0); } return(ags_type_countable); } void ags_countable_base_init(AgsCountableInterface *interface) { /* empty */ } /** * ags_countable_get_notation_counter: * @countable: an #AgsCountable * * Retrieve current position of notation. * * Returns: the current position * * Since: 1.0.0 */ guint ags_countable_get_notation_counter(AgsCountable *countable) { AgsCountableInterface *countable_interface; g_return_val_if_fail(AGS_IS_COUNTABLE(countable), -1); countable_interface = AGS_COUNTABLE_GET_INTERFACE(countable); g_return_val_if_fail(countable_interface->get_notation_counter, -1); return(countable_interface->get_notation_counter(countable)); } /** * ags_countable_get_sequencer_counter: * @countable: an #AgsCountable * * Retrieve current position of sequencer. * * Returns: the current position * * Since: 1.0.0 */ guint ags_countable_get_sequencer_counter(AgsCountable *countable) { AgsCountableInterface *countable_interface; g_return_val_if_fail(AGS_IS_COUNTABLE(countable), -1); countable_interface = AGS_COUNTABLE_GET_INTERFACE(countable); g_return_val_if_fail(countable_interface->get_sequencer_counter, -1); return(countable_interface->get_sequencer_counter(countable)); } gsequencer-1.4.24/ags/object/ags_soundcard.c0000644000175000017500000006403513246707333015704 00000000000000/* 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 . */ #include #include void ags_soundcard_class_init(AgsSoundcardInterface *interface); /** * SECTION:ags_soundcard * @short_description: unique access to soundcards * @title: AgsSoundcard * @section_id: AgsSoundcard * @include: ags/object/ags_soundcard.h * * The #AgsSoundcard interface gives you a unique access to audio devices. */ enum { TIC, OFFSET_CHANGED, STOP, LAST_SIGNAL, }; static guint soundcard_signals[LAST_SIGNAL]; GType ags_soundcard_get_type() { static GType ags_type_soundcard = 0; if(!ags_type_soundcard){ ags_type_soundcard = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsSoundcard", sizeof(AgsSoundcardInterface), (GClassInitFunc) ags_soundcard_class_init, 0, NULL, 0); } return(ags_type_soundcard); } GQuark ags_soundcard_error_quark() { return(g_quark_from_static_string("ags-soundcard-error-quark")); } void ags_soundcard_class_init(AgsSoundcardInterface *interface) { /** * AgsSoundcard::tic: * @soundcard: the object * * The ::tic signal is emitted every tic of the soundcard. This notifies * about a newly played buffer. * * Since: 1.0.0 */ soundcard_signals[TIC] = g_signal_new("tic", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSoundcardInterface, tic), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsSoundcard::offset-changed: * @soundcard: the object * @note_offset: new notation offset * * The ::offset-changed signal notifies about changed position within * notation. * * Since: 1.0.0 */ soundcard_signals[OFFSET_CHANGED] = g_signal_new("offset-changed", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSoundcardInterface, offset_changed), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsSoundcard::stop: * @soundcard: the object * * The ::stop signal is emitted every stop of the soundcard. This notifies * about a newly played buffer. * * Since: 1.0.0 */ soundcard_signals[STOP] = g_signal_new("stop", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSoundcardInterface, stop), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } /** * ags_soundcard_set_application_context: * @soundcard: the #AgsSoundcard * @application_context: the application context to set * * Set application context. * * Since: 1.0.0 */ void ags_soundcard_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_application_context); soundcard_interface->set_application_context(soundcard, application_context); } /** * ags_soundcard_get_application_context: * @soundcard: the #AgsSoundcard * * Get application context. * * Returns: #AgsApplicationContext * * Since: 1.0.0 */ AgsApplicationContext* ags_soundcard_get_application_context(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), NULL); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_application_context, NULL); return(soundcard_interface->get_application_context(soundcard)); } /** * ags_soundcard_set_application_mutex: * @soundcard: the #AgsSoundcard * @application_mutex: the application mutex to set * * Set application mutex. * * Since: 1.0.0 */ void ags_soundcard_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_application_mutex); soundcard_interface->set_application_mutex(soundcard, application_mutex); } /** * ags_soundcard_get_application_mutex: * @soundcard: the #AgsSoundcard * * Get application mutex. * * Returns: #AgsApplicationMutex * * Since: 1.0.0 */ pthread_mutex_t* ags_soundcard_get_application_mutex(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), NULL); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_application_mutex, NULL); return(soundcard_interface->get_application_mutex(soundcard)); } /** * ags_soundcard_set_device: * @soundcard: the #AgsSoundcard * @device_id: the device to set * * Set device. * * Since: 1.0.0 */ void ags_soundcard_set_device(AgsSoundcard *soundcard, gchar *device_id) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_device); soundcard_interface->set_device(soundcard, device_id); } /** * ags_soundcard_get_device: * @soundcard: the #AgsSoundcard * * Get device. * * Returns: the device's identifier * * Since: 1.0.0 */ gchar* ags_soundcard_get_device(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), NULL); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_device, NULL); return(soundcard_interface->get_device(soundcard)); } /** * ags_soundcard_get_presets: * @soundcard: the #AgsSoundcard * @channels: the audio channels * @rate: the samplerate * @buffer_size: the buffer size * @format: the format * * Get presets. * * Since: 1.0.0 */ void ags_soundcard_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->get_presets); soundcard_interface->get_presets(soundcard, channels, rate, buffer_size, format); } /** * ags_soundcard_set_presets: * @soundcard: the #AgsSoundcard * @channels: the audio channels * @rate: the samplerate * @buffer_size: the buffer size * @format: the format * * Set presets. * * Since: 1.0.0 */ void ags_soundcard_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_presets); soundcard_interface->set_presets(soundcard, channels, rate, buffer_size, format); } /** * ags_soundcard_list_cards: * @soundcard: the #AgsSoundcard * @card_id: a list containing card ids * @card_name: a list containing card names * * Retrieve @card_id and @card_name as a list of strings. * * Since: 1.0.0 */ void ags_soundcard_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->list_cards); soundcard_interface->list_cards(soundcard, card_id, card_name); } /** * ags_soundcard_pcm_info: * @soundcard: the #AgsSoundcard * @card_id: the selected soundcard by its string identifier * @channels_min: min channels supported * @channels_max: max channels supported * @rate_min: min samplerate supported * @rate_max: max samplerate supported * @buffer_size_min: min buffer size supported by soundcard * @buffer_size_max: max buffer size supported by soundcard * @error: an error that may occure * * Retrieve detailed information of @card_id soundcard. * * Since: 1.0.0 */ void ags_soundcard_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->pcm_info); soundcard_interface->pcm_info(soundcard, card_id, channels_min, channels_max, rate_min, rate_max, buffer_size_min, buffer_size_max, error); } /** * ags_soundcard_get_poll_fd: * @soundcard: the #AgsSoundcard * * Get poll file descriptors. * * Returns: a #GList-struct containing poll file descriptors * * Since: 1.0.0 */ GList* ags_soundcard_get_poll_fd(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), NULL); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_poll_fd, NULL); return(soundcard_interface->get_poll_fd(soundcard)); } /** * ags_soundcard_is_available: * @soundcard: the #AgsSoundcard * * Get available. * * Returns: %TRUE if available, else %FALSE * * Since: 1.0.0 */ gboolean ags_soundcard_is_available(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), FALSE); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->is_available, FALSE); return(soundcard_interface->is_available(soundcard)); } /** * ags_soundcard_is_starting: * @soundcard: the #AgsSoundcard * * Get starting. * * Returns: %TRUE if starting, else %FALSE * * Since: 1.0.0 */ gboolean ags_soundcard_is_starting(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), FALSE); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->is_starting, FALSE); return(soundcard_interface->is_starting(soundcard)); } /** * ags_soundcard_is_playing: * @soundcard: the #AgsSoundcard * * Get playing. * * Returns: %TRUE if playing, else %FALSE * * Since: 1.0.0 */ gboolean ags_soundcard_is_playing(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), FALSE); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->is_playing, FALSE); return(soundcard_interface->is_playing(soundcard)); } /** * ags_soundcard_is_recording: * @soundcard: the #AgsSoundcard * * Get recording. * * Returns: %TRUE if recording, else %FALSE * * Since: 1.0.0 */ gboolean ags_soundcard_is_recording(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), FALSE); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->is_recording, FALSE); return(soundcard_interface->is_recording(soundcard)); } /** * ags_soundcard_get_uptime: * @soundcard: the #AgsSoundcard * * Get playback time as string. * * Returns: playback time as string * * Since: 1.0.0 */ gchar* ags_soundcard_get_uptime(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), NULL); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_uptime, NULL); return(soundcard_interface->get_uptime(soundcard)); } /** * ags_soundcard_play_init: * @soundcard: the #AgsSoundcard * @error: an error that may occure * * Initializes the soundcard for playback. * * Since: 1.0.0 */ void ags_soundcard_play_init(AgsSoundcard *soundcard, GError **error) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->play_init); soundcard_interface->play_init(soundcard, error); } /** * ags_soundcard_play: * @soundcard: the #AgsSoundcard * @error: an error that may occure * * Plays the current buffer of soundcard. * * Since: 1.0.0 */ void ags_soundcard_play(AgsSoundcard *soundcard, GError **error) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->play); soundcard_interface->play(soundcard, error); } /** * ags_soundcard_record_init: * @soundcard: the #AgsSoundcard * @error: an error that may occure * * Initializes the soundcard for recordback. * * Since: 1.0.0 */ void ags_soundcard_record_init(AgsSoundcard *soundcard, GError **error) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->record_init); soundcard_interface->record_init(soundcard, error); } /** * ags_soundcard_record: * @soundcard: the #AgsSoundcard * @error: an error that may occure * * Records the current buffer of soundcard. * * Since: 1.0.0 */ void ags_soundcard_record(AgsSoundcard *soundcard, GError **error) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->record); soundcard_interface->record(soundcard, error); } /** * ags_soundcard_stop: * @soundcard: the #AgsSoundcard * * Stops the soundcard from playing to it. * * Since: 1.0.0 */ void ags_soundcard_stop(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_signal_emit(soundcard, soundcard_signals[STOP], 0); } /** * ags_soundcard_tic: * @soundcard: the #AgsSoundcard * * Every call to play may generate a tic. * * Since: 1.0.0 */ void ags_soundcard_tic(AgsSoundcard *soundcard) { g_signal_emit(soundcard, soundcard_signals[TIC], 0); } /** * ags_soundcard_offset_changed: * @soundcard: the #AgsSoundcard * @note_offset: the current note offset * * Callback when counter expires minor note offset. * * Since: 1.0.0 */ void ags_soundcard_offset_changed(AgsSoundcard *soundcard, guint note_offset) { g_signal_emit(soundcard, soundcard_signals[OFFSET_CHANGED], 0, note_offset); } /** * ags_soundcard_get_buffer: * @soundcard: the #AgsSoundcard * * Get current playback buffer. * * Returns: current playback buffer * * Since: 1.0.0 */ void* ags_soundcard_get_buffer(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), NULL); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_buffer, NULL); return(soundcard_interface->get_buffer(soundcard)); } /** * ags_soundcard_get_next_buffer: * @soundcard: the #AgsSoundcard * * Get future playback buffer. * * Returns: next playback buffer * * Since: 1.0.0 */ void* ags_soundcard_get_next_buffer(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), NULL); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_next_buffer, NULL); return(soundcard_interface->get_next_buffer(soundcard)); } /** * ags_soundcard_get_prev_buffer: * @soundcard: the #AgsSoundcard * * Get future playback buffer. * * Returns: prev playback buffer * * Since: 1.0.0 */ void* ags_soundcard_get_prev_buffer(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), NULL); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_prev_buffer, NULL); return(soundcard_interface->get_prev_buffer(soundcard)); } /** * ags_soundcard_set_bpm: * @soundcard: the #AgsSoundcard * @bpm: the bpm to set * * Set current playback bpm. * * Since: 1.0.0 */ void ags_soundcard_set_bpm(AgsSoundcard *soundcard, gdouble bpm) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_bpm); soundcard_interface->set_bpm(soundcard, bpm); } /** * ags_soundcard_get_bpm: * @soundcard: the #AgsSoundcard * * Get current playback bpm. * * Returns: bpm * * Since: 1.0.0 */ gdouble ags_soundcard_get_bpm(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), G_MAXUINT); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_bpm, G_MAXUINT); return(soundcard_interface->get_bpm(soundcard)); } /** * ags_soundcard_set_delay_factor: * @soundcard: the #AgsSoundcard * @delay_factor: the delay factor to set * * Set current playback delay factor. * * Since: 1.0.0 */ void ags_soundcard_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_delay_factor); soundcard_interface->set_delay_factor(soundcard, delay_factor); } /** * ags_soundcard_get_delay_factor: * @soundcard: the #AgsSoundcard * * Get current playback delay factor. * * Returns: delay factor * * Since: 1.0.0 */ gdouble ags_soundcard_get_delay_factor(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), G_MAXDOUBLE); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_delay_factor, G_MAXDOUBLE); return(soundcard_interface->get_delay_factor(soundcard)); } /** * ags_soundcard_get_absolute_delay: * @soundcard: the #AgsSoundcard * * Get current playback delay. * * Returns: delay * * Since: 1.0.0 */ gdouble ags_soundcard_get_absolute_delay(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), G_MAXDOUBLE); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_absolute_delay, G_MAXDOUBLE); return(soundcard_interface->get_absolute_delay(soundcard)); } /** * ags_soundcard_get_delay: * @soundcard: the #AgsSoundcard * * Get current playback delay. * * Returns: delay * * Since: 1.0.0 */ gdouble ags_soundcard_get_delay(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), G_MAXDOUBLE); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_delay, G_MAXDOUBLE); return(soundcard_interface->get_delay(soundcard)); } /** * ags_soundcard_get_attack: * @soundcard: the #AgsSoundcard * * Get current playback attack. * * Returns: attack * * Since: 1.0.0 */ guint ags_soundcard_get_attack(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), G_MAXUINT); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_attack, G_MAXUINT); return(soundcard_interface->get_attack(soundcard)); } /** * ags_soundcard_get_delay_counter: * @soundcard: the #AgsSoundcard * * Get current playback note offset. * * Returns: offset * * Since: 1.0.0 */ guint ags_soundcard_get_delay_counter(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), G_MAXUINT); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_delay_counter, G_MAXUINT); return(soundcard_interface->get_delay_counter(soundcard)); } /** * ags_soundcard_set_note_offset: * @soundcard: the #AgsSoundcard * @note_offset: the note offset to set * * Set current playback note offset. * * Since: 1.0.0 */ void ags_soundcard_set_note_offset(AgsSoundcard *soundcard, guint note_offset) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_note_offset); soundcard_interface->set_note_offset(soundcard, note_offset); } /** * ags_soundcard_get_note_offset: * @soundcard: the #AgsSoundcard * * Get current playback note offset. * * Returns: offset * * Since: 1.0.0 */ guint ags_soundcard_get_note_offset(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), G_MAXUINT); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_note_offset, G_MAXUINT); return(soundcard_interface->get_note_offset(soundcard)); } /** * ags_soundcard_set_note_offset_absolute: * @soundcard: the #AgsSoundcard * @note_offset: the note offset to set * * Set current playback note offset. * * Since: 1.0.0 */ void ags_soundcard_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_note_offset_absolute); soundcard_interface->set_note_offset_absolute(soundcard, note_offset); } /** * ags_soundcard_get_note_offset_absolute: * @soundcard: the #AgsSoundcard * * Get current playback note offset. * * Returns: offset * * Since: 1.0.0 */ guint ags_soundcard_get_note_offset_absolute(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), G_MAXUINT); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_note_offset_absolute, G_MAXUINT); return(soundcard_interface->get_note_offset_absolute(soundcard)); } /** * ags_soundcard_set_loop: * @soundcard: the #AgsSoundcard * @loop_left: loop position of region * @loop_right: loop position of region * @do_loop: if %TRUE do loop, else don't loop * * Set loop parameters of @soundcard. * * Since: 1.0.0 */ void ags_soundcard_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_loop); soundcard_interface->set_loop(soundcard, loop_left, loop_right, do_loop); } /** * ags_soundcard_get_loop: * @soundcard: the #AgsSoundcard * @loop_left: return location of loop position's region * @loop_right: return location of loop position's region * @do_loop: return location of do loop * * Get loop parameters of @soundcard. * * Since: 1.0.0 */ void ags_soundcard_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->get_loop); soundcard_interface->get_loop(soundcard, loop_left, loop_right, do_loop); } /** * ags_soundcard_get_loop_offset: * @soundcard: the #AgsSoundcard * * Get current playback loop offset. * * Returns: offset * * Since: 1.0.0 */ guint ags_soundcard_get_loop_offset(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), 0); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_loop_offset, 0); return(soundcard_interface->get_loop_offset(soundcard)); } /** * ags_soundcard_set_audio: * @soundcard: the #AgsSoundcard * @audio: the audio as #GList-struct to set * * Set audio. * * Since: 1.0.0 */ void ags_soundcard_set_audio(AgsSoundcard *soundcard, GList *audio) { AgsSoundcardInterface *soundcard_interface; g_return_if_fail(AGS_IS_SOUNDCARD(soundcard)); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_if_fail(soundcard_interface->set_audio); soundcard_interface->set_audio(soundcard, audio); } /** * ags_soundcard_get_audio: * @soundcard: the #AgsSoundcard * * Get audio. * * Returns: a #GList-struct container #AgsAudio * * Since: 1.0.0 */ GList* ags_soundcard_get_audio(AgsSoundcard *soundcard) { AgsSoundcardInterface *soundcard_interface; g_return_val_if_fail(AGS_IS_SOUNDCARD(soundcard), NULL); soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(soundcard); g_return_val_if_fail(soundcard_interface->get_audio, NULL); return(soundcard_interface->get_audio(soundcard)); } gsequencer-1.4.24/ags/object/ags_sequencer.h0000644000175000017500000001461213246707333015715 00000000000000/* 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 . */ #ifndef __AGS_SEQUENCER_H__ #define __AGS_SEQUENCER_H__ #include #include #include #include #define AGS_TYPE_SEQUENCER (ags_sequencer_get_type()) #define AGS_SEQUENCER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SEQUENCER, AgsSequencer)) #define AGS_SEQUENCER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_SEQUENCER, AgsSequencerInterface)) #define AGS_IS_SEQUENCER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SEQUENCER)) #define AGS_IS_SEQUENCER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_SEQUENCER)) #define AGS_SEQUENCER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_SEQUENCER, AgsSequencerInterface)) typedef struct _AgsSequencer AgsSequencer; typedef struct _AgsSequencerInterface AgsSequencerInterface; #define AGS_SEQUENCER_DEFAULT_SAMPLERATE (44100.0) #define AGS_SEQUENCER_DEFAULT_BUFFER_SIZE (944) #define AGS_SEQUENCER_DEFAULT_DEVICE "hw:0" #define AGS_SEQUENCER_DEFAULT_BPM (120.0) #define AGS_SEQUENCER_DEFAULT_DELAY_FACTOR (1.0 / 4.0) #define AGS_SEQUENCER_DEFAULT_JIFFIE ((double) AGS_SEQUENCER_DEFAULT_SAMPLERATE / (double) AGS_SEQUENCER_DEFAULT_BUFFER_SIZE) #define AGS_SEQUENCER_DEFAULT_TACT (1.0 / 1.0) #define AGS_SEQUENCER_DEFAULT_TACT_JIFFIE (60.0 / AGS_SEQUENCER_DEFAULT_BPM * AGS_SEQUENCER_DEFAULT_TACT) #define AGS_SEQUENCER_DEFAULT_TACTRATE (1.0 / AGS_SEQUENCER_DEFAULT_TACT_JIFFIE) #define AGS_SEQUENCER_DEFAULT_SCALE (1.0) #define AGS_SEQUENCER_DEFAULT_DELAY (AGS_SEQUENCER_DEFAULT_JIFFIE * (60.0 / AGS_SEQUENCER_DEFAULT_BPM)) #define AGS_SEQUENCER_DEFAULT_PERIOD (64.0) #define AGS_SEQUENCER_DEFAULT_LATENCY (400) struct _AgsSequencerInterface { GTypeInterface ginterface; void (*set_application_context)(AgsSequencer *sequencer, AgsApplicationContext *application_context); AgsApplicationContext* (*get_application_context)(AgsSequencer *sequencer); void (*set_application_mutex)(AgsSequencer *sequencer, pthread_mutex_t *application_mutex); pthread_mutex_t* (*get_application_mutex)(AgsSequencer *sequencer); void (*set_device)(AgsSequencer *sequencer, gchar *card_id); gchar* (*get_device)(AgsSequencer *sequencer); void (*list_cards)(AgsSequencer *sequencer, GList **card_id, GList **card_name); gboolean (*is_starting)(AgsSequencer *sequencer); gboolean (*is_playing)(AgsSequencer *sequencer); gboolean (*is_recording)(AgsSequencer *sequencer); void (*play_init)(AgsSequencer *sequencer, GError **error); void (*play)(AgsSequencer *sequencer, GError **error); void (*record_init)(AgsSequencer *sequencer, GError **error); void (*record)(AgsSequencer *sequencer, GError **error); void (*stop)(AgsSequencer *sequencer); void (*tic)(AgsSequencer *sequencer); void (*offset_changed)(AgsSequencer *sequencer, guint note_offset); void* (*get_buffer)(AgsSequencer *sequencer, guint *buffer_length); void* (*get_next_buffer)(AgsSequencer *sequencer, guint *buffer_length); void (*set_bpm)(AgsSequencer *sequencer, gdouble bpm); gdouble (*get_bpm)(AgsSequencer *sequencer); void (*set_delay_factor)(AgsSequencer *sequencer, gdouble delay_factor); gdouble (*get_delay_factor)(AgsSequencer *sequencer); void (*set_note_offset)(AgsSequencer *sequencer, guint note_offset); guint (*get_note_offset)(AgsSequencer *sequencer); void (*set_audio)(AgsSequencer *sequencer, GList *audio); GList* (*get_audio)(AgsSequencer *sequencer); }; GType ags_sequencer_get_type(); void ags_sequencer_set_application_context(AgsSequencer *sequencer, AgsApplicationContext *application_context); AgsApplicationContext* ags_sequencer_get_application_context(AgsSequencer *sequencer); void ags_sequencer_set_application_mutex(AgsSequencer *sequencer, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_sequencer_get_application_mutex(AgsSequencer *sequencer); void ags_sequencer_set_device(AgsSequencer *sequencer, gchar *device_id); gchar* ags_sequencer_get_device(AgsSequencer *sequencer); void ags_sequencer_list_cards(AgsSequencer *sequencer, GList **card_id, GList **card_name); gboolean ags_sequencer_is_starting(AgsSequencer *sequencer); gboolean ags_sequencer_is_playing(AgsSequencer *sequencer); gboolean ags_sequencer_is_recording(AgsSequencer *sequencer); void ags_sequencer_play_init(AgsSequencer *sequencer, GError **error); void ags_sequencer_play(AgsSequencer *sequencer, GError **error); void ags_sequencer_record_init(AgsSequencer *sequencer, GError **error); void ags_sequencer_record(AgsSequencer *sequencer, GError **error); void ags_sequencer_stop(AgsSequencer *sequencer); void ags_sequencer_tic(AgsSequencer *sequencer); void ags_sequencer_offset_changed(AgsSequencer *sequencer, guint note_offset); void* ags_sequencer_get_buffer(AgsSequencer *sequencer, guint *buffer_length); void* ags_sequencer_get_next_buffer(AgsSequencer *sequencer, guint *buffer_length); void ags_sequencer_set_bpm(AgsSequencer *sequencer, gdouble bpm); gdouble ags_sequencer_get_bpm(AgsSequencer *sequencer); void ags_sequencer_set_delay_factor(AgsSequencer *sequencer, gdouble delay_factor); gdouble ags_sequencer_get_delay_factor(AgsSequencer *sequencer); void ags_sequencer_set_note_offset(AgsSequencer *sequencer, guint note_offset); guint ags_sequencer_get_note_offset(AgsSequencer *sequencer); void ags_sequencer_set_audio(AgsSequencer *sequencer, GList *audio); GList* ags_sequencer_get_audio(AgsSequencer *sequencer); #endif /*__AGS_SEQUENCER_H__*/ gsequencer-1.4.24/ags/object/ags_mutable.c0000644000175000017500000000410013246707333015336 00000000000000/* 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 . */ #include void ags_mutable_base_init(AgsMutableInterface *interface); /** * SECTION:ags_mutable * @short_description: unique access to recalls * @title: AgsMutable * @section_id: AgsMutable * @include: ags/object/ags_mutable.h * * The #AgsMutable interface gives you a unique access to mutable classes Its * purpose is to set muted. */ GType ags_mutable_get_type() { static GType ags_type_mutable = 0; if(!ags_type_mutable){ static const GTypeInfo ags_mutable_info = { sizeof(AgsMutableInterface), (GBaseInitFunc) ags_mutable_base_init, NULL, /* base_finalize */ }; ags_type_mutable = g_type_register_static(G_TYPE_INTERFACE, "AgsMutable", &ags_mutable_info, 0); } return(ags_type_mutable); } void ags_mutable_base_init(AgsMutableInterface *interface) { /* empty */ } /** * ags_mutable_set_muted: * @mutable: an #AgsMutable * @muted: if %TRUE then muted, else playing * * Mute a class instance. * * Since: 1.0.0 */ void ags_mutable_set_muted(AgsMutable *mutable, gboolean muted) { AgsMutableInterface *mutable_interface; g_return_if_fail(AGS_IS_MUTABLE(mutable)); mutable_interface = AGS_MUTABLE_GET_INTERFACE(mutable); g_return_if_fail(mutable_interface->set_muted); mutable_interface->set_muted(mutable, muted); } gsequencer-1.4.24/ags/object/ags_connection.h0000644000175000017500000000412413256163135016054 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CONNECTION_H__ #define __AGS_CONNECTION_H__ #include #include #define AGS_TYPE_CONNECTION (ags_connection_get_type()) #define AGS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONNECTION, AgsConnection)) #define AGS_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CONNECTION, AgsConnectionClass)) #define AGS_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CONNECTION)) #define AGS_IS_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CONNECTION)) #define AGS_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_CONNECTION, AgsConnectionClass)) typedef struct _AgsConnection AgsConnection; typedef struct _AgsConnectionClass AgsConnectionClass; struct _AgsConnection { GObject object; pthread_mutexattr_t *mutexattr; pthread_mutex_t *mutex; GObject *data_object; }; struct _AgsConnectionClass { GObjectClass object; }; GType ags_connection_get_type(void); GList* ags_connection_find_type(GList *connection, GType connection_type); GList* ags_connection_find_type_and_data_object_type(GList *connection, GType connection_type, GType data_object_type); /* */ AgsConnection* ags_connection_new(); #endif /*__AGS_CONNECTION_H__*/ gsequencer-1.4.24/ags/object/ags_config.h0000644000175000017500000000636013256163135015166 00000000000000/* 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 . */ #ifndef __AGS_CONFIG_H__ #define __AGS_CONFIG_H__ #include #include #define AGS_TYPE_CONFIG (ags_config_get_type ()) #define AGS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONFIG, AgsConfig)) #define AGS_CONFIG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CONFIG, AgsConfigClass)) #define AGS_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CONFIG)) #define AGS_IS_CONFIG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CONFIG)) #define AGS_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CONFIG, AgsConfigClass)) #define AGS_CONFIG_DEFAULT_VERSION "0.7.0\0" #define AGS_CONFIG_DEFAULT_BUILD_ID "CEST 13-10-2015 01:19\0" #define AGS_CONFIG_GENERIC "generic\0" #define AGS_CONFIG_THREAD "thread\0" #define AGS_CONFIG_SOUNDCARD "soundcard\0" #define AGS_CONFIG_SOUNDCARD_0 "soundcard-0\0" #define AGS_CONFIG_SEQUENCER "sequencer\0" #define AGS_CONFIG_SEQUENCER_0 "sequencer-0\0" #define AGS_CONFIG_RECALL "recall\0" typedef struct _AgsConfig AgsConfig; typedef struct _AgsConfigClass AgsConfigClass; /** * AgsConfigFlags: * @AGS_CONFIG_CONNECTED: the config was connected by calling #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsConfig by * enable/disable as flags. */ typedef enum{ AGS_CONFIG_CONNECTED = 1, }AgsConfigFlags; struct _AgsConfig { GObject object; guint flags; gchar *version; gchar *build_id; GObject *application_context; GKeyFile *key_file; }; struct _AgsConfigClass { GObjectClass object; void (*load_defaults)(AgsConfig *config); void (*set_value)(AgsConfig *config, gchar *group, gchar *key, gchar *value); gchar* (*get_value)(AgsConfig *config, gchar *group, gchar *key); }; GType ags_config_get_type(); void ags_config_load_defaults(AgsConfig *config); void ags_config_load_from_file(AgsConfig *config, gchar *filename); void ags_config_load_from_data(AgsConfig *config, char *buffer, gsize buffer_length); void ags_config_set_value(AgsConfig *config, gchar *group, gchar *key, gchar *value); gchar* ags_config_get_value(AgsConfig *config, gchar *group, gchar *key); void ags_config_to_data(AgsConfig *config, char **buffer, gsize *buffer_length); void ags_config_save(AgsConfig *config); void ags_config_clear(AgsConfig *config); AgsConfig* ags_config_get_instance(); AgsConfig* ags_config_new(GObject *application_context); #endif /*__AGS_CONFIG_H__*/ gsequencer-1.4.24/ags/object/ags_soundcard.h0000644000175000017500000002403413256163135015701 00000000000000/* 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 . */ #ifndef __AGS_SOUNDCARD_H__ #define __AGS_SOUNDCARD_H__ #include #include #include #include #define AGS_TYPE_SOUNDCARD (ags_soundcard_get_type()) #define AGS_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SOUNDCARD, AgsSoundcard)) #define AGS_SOUNDCARD_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_SOUNDCARD, AgsSoundcardInterface)) #define AGS_IS_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SOUNDCARD)) #define AGS_IS_SOUNDCARD_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_SOUNDCARD)) #define AGS_SOUNDCARD_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_SOUNDCARD, AgsSoundcardInterface)) #define AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS (2) #define AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS (2) #define AGS_SOUNDCARD_DEFAULT_SAMPLERATE (48000.0) #define AGS_SOUNDCARD_DEFAULT_FORMAT (AGS_SOUNDCARD_SIGNED_16_BIT) #define AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE (1024) #define AGS_SOUNDCARD_DEFAULT_BPM (120.0) #define AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR (1.0 / 4.0) #define AGS_SOUNDCARD_DEFAULT_JIFFIE ((double) AGS_SOUNDCARD_DEFAULT_SAMPLERATE / (double) AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) #define AGS_SOUNDCARD_DEFAULT_TACT (1.0 / 1.0) #define AGS_SOUNDCARD_DEFAULT_TACT_JIFFIE (60.0 / AGS_SOUNDCARD_DEFAULT_BPM * AGS_SOUNDCARD_DEFAULT_TACT) #define AGS_SOUNDCARD_DEFAULT_TACTRATE (1.0 / AGS_SOUNDCARD_DEFAULT_TACT_JIFFIE) #define AGS_SOUNDCARD_DEFAULT_SCALE (1.0) #define AGS_SOUNDCARD_DEFAULT_DELAY ((60.0 * ((AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) / AGS_SOUNDCARD_DEFAULT_BPM)) * ((1.0 / 16.0) * (1.0 / AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR))) #define AGS_SOUNDCARD_DEFAULT_PERIOD (64.0) #define AGS_SOUNDCARD_DEFAULT_LOOP_LEFT (0) #define AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT (64) #define AGS_SOUNDCARD_DEFAULT_OVERCLOCK (0.0) typedef struct _AgsSoundcard AgsSoundcard; typedef struct _AgsSoundcardInterface AgsSoundcardInterface; /** * AgsSoundcardFormat: * @AGS_SOUNDCARD_SIGNED_8_BIT: signed 8 bit raw pcm data * @AGS_SOUNDCARD_SIGNED_16_BIT: signed 16 bit raw pcm data * @AGS_SOUNDCARD_SIGNED_24_BIT: signed 24 bit raw pcm data * @AGS_SOUNDCARD_SIGNED_32_BIT: signed 32 bit raw pcm data * @AGS_SOUNDCARD_SIGNED_64_BIT: signed 64 bit raw pcm data * * #AgsSoundcardFormat specifies the audio data representation to be used. */ typedef enum{ AGS_SOUNDCARD_SIGNED_8_BIT = 8, AGS_SOUNDCARD_SIGNED_16_BIT = 16, AGS_SOUNDCARD_SIGNED_24_BIT = 24, AGS_SOUNDCARD_SIGNED_32_BIT = 32, AGS_SOUNDCARD_SIGNED_64_BIT = 64, }AgsSoundcardFormat; struct _AgsSoundcardInterface { GTypeInterface ginterface; void (*set_application_context)(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* (*get_application_context)(AgsSoundcard *soundcard); void (*set_application_mutex)(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* (*get_application_mutex)(AgsSoundcard *soundcard); void (*set_device)(AgsSoundcard *soundcard, gchar *card_id); gchar* (*get_device)(AgsSoundcard *soundcard); void (*pcm_info)(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); void (*set_presets)(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void (*get_presets)(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void (*list_cards)(AgsSoundcard *soundcard, GList **card_id, GList **card_name); GList* (*get_poll_fd)(AgsSoundcard *soundcard); gboolean (*is_available)(AgsSoundcard *soundcard); gboolean (*is_starting)(AgsSoundcard *soundcard); gboolean (*is_playing)(AgsSoundcard *soundcard); gboolean (*is_recording)(AgsSoundcard *soundcard); gchar* (*get_uptime)(AgsSoundcard *soundcard); void (*play_init)(AgsSoundcard *soundcard, GError **error); void (*play)(AgsSoundcard *soundcard, GError **error); void (*record_init)(AgsSoundcard *soundcard, GError **error); void (*record)(AgsSoundcard *soundcard, GError **error); void (*stop)(AgsSoundcard *soundcard); void (*tic)(AgsSoundcard *soundcard); void (*offset_changed)(AgsSoundcard *soundcard, guint note_offset); void* (*get_buffer)(AgsSoundcard *soundcard); void* (*get_next_buffer)(AgsSoundcard *soundcard); void* (*get_prev_buffer)(AgsSoundcard *soundcard); void (*set_bpm)(AgsSoundcard *soundcard, gdouble bpm); gdouble (*get_bpm)(AgsSoundcard *soundcard); void (*set_delay_factor)(AgsSoundcard *soundcard, gdouble delay_factor); gdouble (*get_delay_factor)(AgsSoundcard *soundcard); gdouble (*get_absolute_delay)(AgsSoundcard *soundcard); gdouble (*get_delay)(AgsSoundcard *soundcard); guint (*get_attack)(AgsSoundcard *soundcard); guint (*get_delay_counter)(AgsSoundcard *soundcard); void (*set_note_offset)(AgsSoundcard *soundcard, guint note_offset); guint (*get_note_offset)(AgsSoundcard *soundcard); void (*set_note_offset_absolute)(AgsSoundcard *soundcard, guint note_offset); guint (*get_note_offset_absolute)(AgsSoundcard *soundcard); void (*set_loop)(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void (*get_loop)(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint (*get_loop_offset)(AgsSoundcard *soundcard); void (*set_audio)(AgsSoundcard *soundcard, GList *audio); GList* (*get_audio)(AgsSoundcard *soundcard); }; GType ags_soundcard_get_type(); void ags_soundcard_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* ags_soundcard_get_application_context(AgsSoundcard *soundcard); void ags_soundcard_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_soundcard_get_application_mutex(AgsSoundcard *soundcard); void ags_soundcard_set_device(AgsSoundcard *soundcard, gchar *device_id); gchar* ags_soundcard_get_device(AgsSoundcard *soundcard); void ags_soundcard_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void ags_soundcard_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void ags_soundcard_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name); void ags_soundcard_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); GList* ags_soundcard_get_poll_fd(AgsSoundcard *soundcard); gboolean ags_soundcard_is_available(AgsSoundcard *soundcard); gboolean ags_soundcard_is_starting(AgsSoundcard *soundcard); gboolean ags_soundcard_is_playing(AgsSoundcard *soundcard); gboolean ags_soundcard_is_recording(AgsSoundcard *soundcard); gchar* ags_soundcard_get_uptime(AgsSoundcard *soundcard); void ags_soundcard_play_init(AgsSoundcard *soundcard, GError **error); void ags_soundcard_play(AgsSoundcard *soundcard, GError **error); void ags_soundcard_record_init(AgsSoundcard *soundcard, GError **error); void ags_soundcard_record(AgsSoundcard *soundcard, GError **error); void ags_soundcard_stop(AgsSoundcard *soundcard); void ags_soundcard_tic(AgsSoundcard *soundcard); void ags_soundcard_offset_changed(AgsSoundcard *soundcard, guint note_offset); void* ags_soundcard_get_buffer(AgsSoundcard *soundcard); void* ags_soundcard_get_next_buffer(AgsSoundcard *soundcard); void* ags_soundcard_get_prev_buffer(AgsSoundcard *soundcard); void ags_soundcard_set_bpm(AgsSoundcard *soundcard, gdouble bpm); gdouble ags_soundcard_get_bpm(AgsSoundcard *soundcard); void ags_soundcard_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor); gdouble ags_soundcard_get_delay_factor(AgsSoundcard *soundcard); gdouble ags_soundcard_get_absolute_delay(AgsSoundcard *soundcard); gdouble ags_soundcard_get_delay(AgsSoundcard *soundcard); guint ags_soundcard_get_attack(AgsSoundcard *soundcard); guint ags_soundcard_get_delay_counter(AgsSoundcard *soundcard); void ags_soundcard_set_note_offset(AgsSoundcard *soundcard, guint note_offset); guint ags_soundcard_get_note_offset(AgsSoundcard *soundcard); void ags_soundcard_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset); guint ags_soundcard_get_note_offset_absolute(AgsSoundcard *soundcard); void ags_soundcard_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void ags_soundcard_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint ags_soundcard_get_loop_offset(AgsSoundcard *soundcard); void ags_soundcard_set_audio(AgsSoundcard *soundcard, GList *audio); GList* ags_soundcard_get_audio(AgsSoundcard *soundcard); #endif /*__AGS_SOUNDCARD_H__*/ gsequencer-1.4.24/ags/object/ags_application_context.c0000644000175000017500000005323113247044247017764 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_application_context_class_init(AgsApplicationContextClass *application_context); void ags_application_context_connectable_interface_init(AgsConnectableInterface *connectable); void ags_application_context_init(AgsApplicationContext *application_context); void ags_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_application_context_connect(AgsConnectable *connectable); void ags_application_context_disconnect(AgsConnectable *connectable); void ags_application_context_dispose(GObject *gobject); void ags_application_context_finalize(GObject *gobject); void ags_application_context_real_load_config(AgsApplicationContext *application_context); void ags_application_context_real_prepare(AgsApplicationContext *application_context); void ags_application_context_real_setup(AgsApplicationContext *application_context); void ags_application_context_real_register_types(AgsApplicationContext *application_context); void ags_application_context_real_quit(AgsApplicationContext *application_context); /** * SECTION:ags_application_context * @short_description: The application context * @title: AgsApplicationContext * @section_id: * @include: ags/object/ags_application_context.h * * #AgsApplicationContext is a context provider is your and libraries entry * point to the application. You might subtype it to implement your own contices. * Thus you should consider to create a provider interface for reusability. */ enum{ LOAD_CONFIG, PREPARE, SETUP, REGISTER_TYPES, QUIT, LAST_SIGNAL, }; enum{ PROP_0, PROP_APPLICATION_MUTEX, PROP_MAIN_LOOP, PROP_CONFIG, PROP_FILE, }; static gpointer ags_application_context_parent_class = NULL; static guint application_context_signals[LAST_SIGNAL]; AgsApplicationContext *ags_application_context = NULL; GType ags_application_context_get_type() { static GType ags_type_application_context = 0; if(!ags_type_application_context){ static const GTypeInfo ags_application_context_info = { sizeof (AgsApplicationContextClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_application_context_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsApplicationContext), 0, /* n_preallocs */ (GInstanceInitFunc) ags_application_context_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_application_context_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_application_context = g_type_register_static(G_TYPE_OBJECT, "AgsApplicationContext", &ags_application_context_info, 0); g_type_add_interface_static(ags_type_application_context, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_application_context); } void ags_application_context_class_init(AgsApplicationContextClass *application_context) { GObjectClass *gobject; GParamSpec *param_spec; ags_application_context_parent_class = g_type_class_peek_parent(application_context); /* GObjectClass */ gobject = (GObjectClass *) application_context; gobject->set_property = ags_application_context_set_property; gobject->get_property = ags_application_context_get_property; gobject->dispose = ags_application_context_dispose; gobject->finalize = ags_application_context_finalize; /* properties */ /** * AgsApplicationContext:main-loop: * * The assigned main-loop. * * Since: 1.0.0 */ param_spec = g_param_spec_object("main-loop", i18n_pspec("main-loop of application context"), i18n_pspec("The main-loop what application context is running in"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAIN_LOOP, param_spec); /** * AgsApplicationContext:config: * * The assigned config. * * Since: 1.0.0 */ param_spec = g_param_spec_object("config", i18n_pspec("config of application context"), i18n_pspec("The config what application context is running in"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONFIG, param_spec); /** * AgsApplicationContext:file: * * The assigned file. * * Since: 1.0.0 */ param_spec = g_param_spec_object("file", i18n_pspec("file of application context"), i18n_pspec("The file what application context does persist"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILE, param_spec); /* AgsApplicationContextClass */ application_context->load_config = ags_application_context_real_load_config; application_context->prepare = ags_application_context_real_prepare; application_context->setup = ags_application_context_real_setup; application_context->register_types = ags_application_context_real_register_types; application_context->quit = ags_application_context_real_quit; /* signals */ /** * AgsApplicationContext::load-config: * @application_context: the #AgsApplicationContext * * The ::load-config notifies to load configuration. * * Since: 1.0.0 */ application_context_signals[LOAD_CONFIG] = g_signal_new("load-config", G_TYPE_FROM_CLASS (application_context), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsApplicationContextClass, load_config), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsApplicationContext::prepare: * @application_context: the #AgsApplicationContext * * The ::prepare signal should be implemented to prepare * your application context. * * Since: 1.0.0 */ application_context_signals[PREPARE] = g_signal_new("prepare", G_TYPE_FROM_CLASS (application_context), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsApplicationContextClass, prepare), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsApplicationContext::setup: * @application_context: the #AgsApplicationContext * * The ::setup signal should be implemented to setup * your application context. * * Since: 1.0.0 */ application_context_signals[SETUP] = g_signal_new("setup", G_TYPE_FROM_CLASS (application_context), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsApplicationContextClass, setup), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsApplicationContext::register-types: * @application_context: the #AgsApplicationContext * * The ::register-types signal should be implemented to load * your types. * * Since: 1.0.0 */ application_context_signals[REGISTER_TYPES] = g_signal_new("register-types", G_TYPE_FROM_CLASS (application_context), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsApplicationContextClass, register_types), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsApplicationContext::quit: * @application_context: the #AgsApplicationContext * * The ::quit notifies to load configuration. * * Since: 1.0.0 */ application_context_signals[QUIT] = g_signal_new("quit", G_TYPE_FROM_CLASS (application_context), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsApplicationContextClass, quit), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_application_context_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_application_context_connect; connectable->disconnect = ags_application_context_disconnect; } void ags_application_context_init(AgsApplicationContext *application_context) { GFile *file; struct passwd *pw; application_context->flags = 0; application_context->argc = 0; application_context->argv = NULL; application_context->version = AGS_VERSION; application_context->build_id = AGS_BUILD_ID; application_context->log = NULL; application_context->domain = NULL; application_context->config = NULL; application_context->mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(application_context->mutexattr); pthread_mutexattr_settype(application_context->mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(application_context->mutexattr, PTHREAD_PRIO_INHERIT); #endif application_context->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(application_context->mutex, application_context->mutexattr); application_context->main_loop = NULL; application_context->task_thread = NULL; application_context->autosave_thread = NULL; application_context->file = NULL; application_context->history = NULL; } void ags_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsApplicationContext *application_context; application_context = AGS_APPLICATION_CONTEXT(gobject); switch(prop_id){ case PROP_CONFIG: { AgsConfig *config; config = (AgsConfig *) g_value_get_object(value); if(config == application_context->config){ return; } if(application_context->config != NULL){ g_object_unref(application_context->config); } if(config != NULL){ g_object_ref(G_OBJECT(config)); } application_context->config = config; } break; case PROP_MAIN_LOOP: { GObject *main_loop; main_loop = (GObject *) g_value_get_object(value); if(main_loop == application_context->main_loop){ return; } if(application_context->main_loop != NULL){ g_object_unref(application_context->main_loop); } if(main_loop != NULL){ g_object_ref(G_OBJECT(main_loop)); } application_context->main_loop = main_loop; } break; case PROP_FILE: { AgsFile *file; file = (AgsFile *) g_value_get_object(value); if(file == application_context->file){ return; } if(application_context->file != NULL){ g_object_unref(application_context->file); } if(file != NULL){ g_object_ref(G_OBJECT(file)); } application_context->file = (AgsFile *) file; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsApplicationContext *application_context; application_context = AGS_APPLICATION_CONTEXT(gobject); switch(prop_id){ case PROP_CONFIG: { g_value_set_object(value, application_context->config); } break; case PROP_MAIN_LOOP: { g_value_set_object(value, application_context->main_loop); } break; case PROP_FILE: { g_value_set_object(value, application_context->file); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_application_context_connect(AgsConnectable *connectable) { AgsApplicationContext *application_context; application_context = AGS_APPLICATION_CONTEXT(connectable); if((AGS_APPLICATION_CONTEXT_CONNECTED & (application_context->flags)) != 0) return; application_context->flags |= AGS_APPLICATION_CONTEXT_CONNECTED; if((AGS_APPLICATION_CONTEXT_DEFAULT & (application_context->flags)) != 0){ GList *list; list = application_context->sibling; while(list != NULL){ if(application_context != list->data){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); } list = list->next; } } /* note main loop won't connect here */ } void ags_application_context_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_application_context_dispose(GObject *gobject) { AgsApplicationContext *application_context; application_context = AGS_APPLICATION_CONTEXT(gobject); /* log */ if(application_context->log != NULL){ g_object_unref(application_context->log); application_context->log = NULL; } /* config */ if(application_context->config != NULL){ g_object_set(application_context->config, "application-context", NULL, NULL); g_object_unref(application_context->config); application_context->config = NULL; } /* main loop */ if(application_context->main_loop != NULL){ g_object_set(application_context->main_loop, "application-context", NULL, NULL); g_object_unref(application_context->main_loop); application_context->main_loop = NULL; } /* autosave thread */ if(application_context->autosave_thread != NULL){ g_object_set(application_context->autosave_thread, "application-context", NULL, NULL); g_object_unref(application_context->autosave_thread); application_context->autosave_thread = NULL; } /* task thread */ if(application_context->task_thread != NULL){ g_object_unref(application_context->task_thread); application_context->task_thread = NULL; } /* file */ if(application_context->file != NULL){ g_object_set(application_context->file, "application-context", NULL, NULL); g_object_unref(application_context->file); application_context->file = NULL; } /* call parent */ G_OBJECT_CLASS(ags_application_context_parent_class)->dispose(gobject); } void ags_application_context_finalize(GObject *gobject) { AgsApplicationContext *application_context; application_context = AGS_APPLICATION_CONTEXT(gobject); /* application mutex */ pthread_mutexattr_destroy(application_context->mutexattr); free(application_context->mutexattr); pthread_mutex_destroy(application_context->mutex); free(application_context->mutex); /* log */ if(application_context->log != NULL){ g_object_unref(application_context->log); } /* config */ if(application_context->config != NULL){ g_object_set(application_context->config, "application-context", NULL, NULL); g_object_unref(application_context->config); } /* main loop */ if(application_context->main_loop != NULL){ g_object_set(application_context->main_loop, "application-context", NULL, NULL); g_object_unref(application_context->main_loop); } /* autosave thread */ if(application_context->autosave_thread != NULL){ g_object_set(application_context->autosave_thread, "application-context", NULL, NULL); g_object_unref(application_context->autosave_thread); } /* task thread */ if(application_context->task_thread != NULL){ g_object_unref(application_context->task_thread); } /* file */ if(application_context->file != NULL){ g_object_unref(application_context->file); } if(application_context == ags_application_context){ ags_application_context = NULL; } /* call parent */ G_OBJECT_CLASS(ags_application_context_parent_class)->finalize(gobject); } void ags_application_context_real_load_config(AgsApplicationContext *application_context) { AgsConfig *config; if(application_context == NULL){ return; } config = application_context->config; if(config == NULL){ return; } //TODO:JK: implement me } /** * ags_application_context_load_config: * @application_context: the #AgsApplicationContext * * Signal to load and parse configuration. * * Since 0.7.0 */ void ags_application_context_load_config(AgsApplicationContext *application_context) { g_return_if_fail(AGS_IS_APPLICATION_CONTEXT(application_context)); g_object_ref(G_OBJECT(application_context)); g_signal_emit(G_OBJECT(application_context), application_context_signals[LOAD_CONFIG], 0); g_object_unref(G_OBJECT(application_context)); g_object_unref(application_context); } void ags_application_context_real_prepare(AgsApplicationContext *application_context) { ags_log_add_message(ags_log_get_instance(), "prepare Advanced Gtk+ Sequencer"); } void ags_application_context_prepare(AgsApplicationContext *application_context) { g_return_if_fail(AGS_IS_APPLICATION_CONTEXT(application_context)); g_object_ref(G_OBJECT(application_context)); g_signal_emit(G_OBJECT(application_context), application_context_signals[PREPARE], 0); g_object_unref(G_OBJECT(application_context)); g_object_unref(application_context); } void ags_application_context_real_setup(AgsApplicationContext *application_context) { ags_log_add_message(ags_log_get_instance(), "setup Advanced Gtk+ Sequencer"); } void ags_application_context_setup(AgsApplicationContext *application_context) { g_return_if_fail(AGS_IS_APPLICATION_CONTEXT(application_context)); g_object_ref(G_OBJECT(application_context)); g_signal_emit(G_OBJECT(application_context), application_context_signals[SETUP], 0); g_object_unref(G_OBJECT(application_context)); g_object_unref(application_context); } void ags_application_context_real_register_types(AgsApplicationContext *application_context) { //TODO:JK: implement me } /** * ags_application_context_register_types: * @application_context: the #AgsApplicationContext * * Notification to register your types. * * Since 0.7.0 */ void ags_application_context_register_types(AgsApplicationContext *application_context) { g_return_if_fail(AGS_IS_APPLICATION_CONTEXT(application_context)); g_object_ref(G_OBJECT(application_context)); g_signal_emit(G_OBJECT(application_context), application_context_signals[REGISTER_TYPES], 0); g_object_unref(G_OBJECT(application_context)); g_object_unref(application_context); } void ags_application_context_add_sibling(AgsApplicationContext *application_context, AgsApplicationContext *sibling) { //TODO:JK: implement me } void ags_application_context_remove_sibling(AgsApplicationContext *application_context, AgsApplicationContext *sibling) { //TODO:JK: implement me } /** * ags_application_context_find_default: * @application_context: the #GList-struct containing #AgsApplicationContext * * Find default context in @application_context #GList-struct containing * #AgsApplicationContext. * * Since: 1.0.0 */ AgsApplicationContext* ags_application_context_find_default(GList *application_context) { while(application_context != NULL){ if((AGS_APPLICATION_CONTEXT_DEFAULT & (AGS_APPLICATION_CONTEXT(application_context->data)->flags)) != 0){ return(application_context->data); } application_context = application_context->next; } return(NULL); } /** * ags_application_context_find_main_loop: * @application_context: the #GList-struct containing #AgsApplicationContext * * Find :main-loop in @application_context #GList-struct containing * #AgsApplicationContext. * * Since: 1.0.0 */ GList* ags_application_context_find_main_loop(GList *application_context) { while(application_context != NULL){ if(AGS_APPLICATION_CONTEXT(application_context->data)->main_loop != NULL){ break; } application_context = application_context->next; } return(application_context); } void ags_application_context_real_quit(AgsApplicationContext *application_context) { //TODO:JK: enhance me exit(0); } /** * ags_application_context_quit: * @application_context: the context to quit * * Calls exit() * * Since: 1.0.0 */ void ags_application_context_quit(AgsApplicationContext *application_context) { g_return_if_fail(AGS_IS_APPLICATION_CONTEXT(application_context)); g_object_ref(G_OBJECT(application_context)); g_signal_emit(G_OBJECT(application_context), application_context_signals[QUIT], 0); g_object_unref(G_OBJECT(application_context)); } /** * ags_application_context_get_instance: * * Get your application context instance. * * Returns: the #AgsApplicationContext instance * * Since: 1.0.0 */ AgsApplicationContext* ags_application_context_get_instance() { if(ags_application_context == NULL){ ags_application_context = ags_application_context_new(NULL, NULL); } return(ags_application_context); } /** * ags_application_context_new: * @main_loop: the #AgsMainLoop * @config: the #AgsConfig * * Create a new instance of #AgsApplicationContext * * Returns: the #AgsApplicationContext instance * * Since: 1.0.0 */ AgsApplicationContext* ags_application_context_new(GObject *main_loop, AgsConfig *config) { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_object_new(AGS_TYPE_APPLICATION_CONTEXT, "main-loop", main_loop, "config", config, NULL); return(application_context); } gsequencer-1.4.24/ags/object/ags_main_loop.h0000644000175000017500000000711513246707333015700 00000000000000/* 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 . */ #ifndef __AGS_MAIN_LOOP_H__ #define __AGS_MAIN_LOOP_H__ #include #include #include #include #define AGS_TYPE_MAIN_LOOP (ags_main_loop_get_type()) #define AGS_MAIN_LOOP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MAIN_LOOP, AgsMainLoop)) #define AGS_MAIN_LOOP_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_MAIN_LOOP, AgsMainLoopInterface)) #define AGS_IS_MAIN_LOOP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MAIN_LOOP)) #define AGS_IS_MAIN_LOOP_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_MAIN_LOOP)) #define AGS_MAIN_LOOP_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_MAIN_LOOP, AgsMainLoopInterface)) typedef struct _AgsMainLoop AgsMainLoop; typedef struct _AgsMainLoopInterface AgsMainLoopInterface; struct _AgsMainLoopInterface { GTypeInterface ginterface; pthread_mutex_t* (*get_tree_lock)(AgsMainLoop *main_loop); void (*set_application_context)(AgsMainLoop *main_loop, AgsApplicationContext *application_context); AgsApplicationContext* (*get_application_context)(AgsMainLoop *main_loop); void (*set_async_queue)(AgsMainLoop *main_loop, GObject *async_queue); GObject* (*get_async_queue)(AgsMainLoop *main_loop); void (*set_tic)(AgsMainLoop *main_loop, guint tic); guint (*get_tic)(AgsMainLoop *main_loop); void (*set_last_sync)(AgsMainLoop *main_loop, guint last_sync); guint (*get_last_sync)(AgsMainLoop *main_loop); void (*interrupt)(AgsMainLoop *main_loop, int sig, guint time_cycle, guint *time_spent); gboolean (*monitor)(AgsMainLoop *main_loop, guint time_cycle, guint *time_spent); void (*change_frequency)(AgsMainLoop *main_loop, gdouble frequency); }; GType ags_main_loop_get_type(); pthread_mutex_t* ags_main_loop_get_tree_lock(AgsMainLoop *main_loop); void ags_main_loop_set_application_context(AgsMainLoop *main_loop, AgsApplicationContext *application_context); AgsApplicationContext* ags_main_loop_get_application_context(AgsMainLoop *main_loop); void ags_main_loop_set_async_queue(AgsMainLoop *main_loop, GObject *async_queue); GObject* ags_main_loop_get_async_queue(AgsMainLoop *main_loop); void ags_main_loop_set_tic(AgsMainLoop *main_loop, guint tic); guint ags_main_loop_get_tic(AgsMainLoop *main_loop); void ags_main_loop_set_last_sync(AgsMainLoop *main_loop, guint last_sync); guint ags_main_loop_get_last_sync(AgsMainLoop *main_loop); void ags_main_loop_interrupt(AgsMainLoop *main_loop, int sig, guint time_cycle, guint *time_spent); gboolean ags_main_loop_monitor(AgsMainLoop *main_loop, guint time_cycle, guint *time_spent); void ags_main_loop_change_frequency(AgsMainLoop *main_loop, gdouble frequency); #endif /*__AGS_MAIN_LOOP_H__*/ gsequencer-1.4.24/ags/object/ags_plugin.c0000644000175000017500000001651113246707333015214 00000000000000/* 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 . */ #include #include void ags_plugin_base_init(AgsPluginInterface *interface); /** * SECTION:ags_plugin * @short_description: interfacing plugins * @title: AgsPlugin * @section_id: AgsPlugin * @include: ags/object/ags_plugin.h * * The #AgsPlugin interface gives you a unique access to classes. It * can be used by #AgsFile and solves some of the serialization. */ GType ags_plugin_get_type() { static GType ags_type_plugin = 0; if(!ags_type_plugin){ static const GTypeInfo ags_plugin_info = { sizeof(AgsPluginInterface), (GBaseInitFunc) ags_plugin_base_init, NULL, /* base_finalize */ }; ags_type_plugin = g_type_register_static(G_TYPE_INTERFACE, "AgsPlugin", &ags_plugin_info, 0); } return(ags_type_plugin); } void ags_plugin_base_init(AgsPluginInterface *interface) { /* empty */ } /** * ags_plugin_get_name: * @plugin: an @AgsPlugin * * Retrieve the name of the plugin. * * Returns: the plugins name * * Since: 1.0.0 */ gchar* ags_plugin_get_name(AgsPlugin *plugin) { AgsPluginInterface *plugin_interface; gchar *ret_val; g_return_val_if_fail(AGS_IS_PLUGIN(plugin), NULL); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_val_if_fail(plugin_interface->get_name, NULL); ret_val = plugin_interface->get_name(plugin); return(ret_val); } /** * ags_plugin_set_name: * @plugin: an @AgsPlugin * @name: the name of plugin * * Set the name of the plugin. * * Since: 1.0.0 */ void ags_plugin_set_name(AgsPlugin *plugin, gchar *name) { AgsPluginInterface *plugin_interface; g_return_if_fail(AGS_IS_PLUGIN(plugin)); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_if_fail(plugin_interface->set_name); plugin_interface->set_name(plugin, name); } /** * ags_plugin_get_version: * @plugin: an @AgsPlugin * * Retrieve the version of the plugin. * * Returns: the plugins version * * Since: 1.0.0 */ gchar* ags_plugin_get_version(AgsPlugin *plugin) { AgsPluginInterface *plugin_interface; gchar *ret_val; g_return_val_if_fail(AGS_IS_PLUGIN(plugin), NULL); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_val_if_fail(plugin_interface->get_version, NULL); ret_val = plugin_interface->get_version(plugin); return(ret_val); } /** * ags_plugin_set_version: * @plugin: an @AgsPlugin * @version: the version of plugin * * Set the version of the plugin. * * Since: 1.0.0 */ void ags_plugin_set_version(AgsPlugin *plugin, gchar *version) { AgsPluginInterface *plugin_interface; g_return_if_fail(AGS_IS_PLUGIN(plugin)); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_if_fail(plugin_interface->set_version); plugin_interface->set_version(plugin, version); } /** * ags_plugin_get_build_id: * @plugin: an @AgsPlugin * * Retrieve the build id of the plugin. * * Returns: the plugins build id * * Since: 1.0.0 */ gchar* ags_plugin_get_build_id(AgsPlugin *plugin) { AgsPluginInterface *plugin_interface; gchar *ret_val; g_return_val_if_fail(AGS_IS_PLUGIN(plugin), NULL); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_val_if_fail(plugin_interface->get_build_id, NULL); ret_val = plugin_interface->get_build_id(plugin); return(ret_val); } /** * ags_plugin_set_build_id: * @plugin: an @AgsPlugin * @build_id: the build id of plugin * * Set the build id of the plugin. * * Since: 1.0.0 */ void ags_plugin_set_build_id(AgsPlugin *plugin, gchar *build_id) { AgsPluginInterface *plugin_interface; g_return_if_fail(AGS_IS_PLUGIN(plugin)); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_if_fail(plugin_interface->set_build_id); plugin_interface->set_build_id(plugin, build_id); } /** * ags_plugin_get_xml_type: * @plugin: an @AgsPlugin * * Retrieve the xml type of the plugin. * * Returns: the plugins xml type * * Since: 1.0.0 */ gchar* ags_plugin_get_xml_type(AgsPlugin *plugin) { AgsPluginInterface *plugin_interface; gchar *ret_val; g_return_val_if_fail(AGS_IS_PLUGIN(plugin), NULL); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_val_if_fail(plugin_interface->get_xml_type, NULL); ret_val = plugin_interface->get_xml_type(plugin); return(ret_val); } /** * ags_plugin_set_xml_type: * @plugin: an @AgsPlugin * @xml_type: the build id of plugin * * Set the build id of the plugin. * * Since: 1.0.0 */ void ags_plugin_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AgsPluginInterface *plugin_interface; g_return_if_fail(AGS_IS_PLUGIN(plugin)); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_if_fail(plugin_interface->set_xml_type); plugin_interface->set_xml_type(plugin, xml_type); } /** * ags_plugin_get_ports: * @plugin: an @AgsPlugin * * Retrieve the ports of the plugin. * * Returns: the plugins ports * * Since: 1.0.0 */ GList* ags_plugin_get_ports(AgsPlugin *plugin) { AgsPluginInterface *plugin_interface; GList *ret_val; g_return_val_if_fail(AGS_IS_PLUGIN(plugin), NULL); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_val_if_fail(plugin_interface->get_ports, NULL); ret_val = plugin_interface->get_ports(plugin); return(ret_val); } /** * ags_plugin_set_ports: * @plugin: an @AgsPlugin * @ports: the build id of plugin * * Set the build id of the plugin. * * Since: 1.0.0 */ void ags_plugin_set_ports(AgsPlugin *plugin, GList *ports) { AgsPluginInterface *plugin_interface; g_return_if_fail(AGS_IS_PLUGIN(plugin)); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_if_fail(plugin_interface->set_ports); plugin_interface->set_ports(plugin, ports); } /** * ags_plugin_read: * @file: the #AgsFile * @node: the node * @plugin: the #AgsPlugin * * Read of file. * * Since: 1.0.0 */ void ags_plugin_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsPluginInterface *plugin_interface; g_return_if_fail(AGS_IS_PLUGIN(plugin)); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_if_fail(plugin_interface->read); plugin_interface->read(file, node, plugin); } /** * ags_plugin_write: * @file: the #AgsFile * @parent: the parent node * @plugin: the #AgsPlugin * * Write to file. * * Returns: the new node you created * * Since: 1.0.0 */ xmlNode* ags_plugin_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsPluginInterface *plugin_interface; xmlNode *ret_val; g_return_val_if_fail(AGS_IS_PLUGIN(plugin), NULL); plugin_interface = AGS_PLUGIN_GET_INTERFACE(plugin); g_return_val_if_fail(plugin_interface->write, NULL); ret_val = plugin_interface->write(file, parent, plugin); return(ret_val); } gsequencer-1.4.24/ags/object/ags_countable.h0000644000175000017500000000372613256163135015700 00000000000000/* 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 . */ #ifndef __AGS_COUNTABLE_H__ #define __AGS_COUNTABLE_H__ #include #include #define AGS_TYPE_COUNTABLE (ags_countable_get_type()) #define AGS_COUNTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COUNTABLE, AgsCountable)) #define AGS_COUNTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_COUNTABLE, AgsCountableInterface)) #define AGS_IS_COUNTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_COUNTABLE)) #define AGS_IS_COUNTABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_COUNTABLE)) #define AGS_COUNTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_COUNTABLE, AgsCountableInterface)) typedef struct _AgsCountable AgsCountable; typedef struct _AgsCountableInterface AgsCountableInterface; struct _AgsCountableInterface { GTypeInterface ginterface; guint (*get_notation_counter)(AgsCountable *countable); guint (*get_sequencer_counter)(AgsCountable *countable); }; GType ags_countable_get_type(); guint ags_countable_get_notation_counter(AgsCountable *countable); guint ags_countable_get_sequencer_counter(AgsCountable *countable); #endif /*__AGS_COUNTABLE_H__*/ gsequencer-1.4.24/ags/object/ags_main_loop.c0000644000175000017500000002230413256163135015665 00000000000000/* 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 . */ #include #include #include void ags_main_loop_class_init(AgsMainLoopInterface *interface); /** * SECTION:ags_main_loop * @short_description: toplevel threads * @title: AgsMainLoop * @section_id: AgsMainLoop * @include: ags/object/ags_main_loop.h * * The #AgsMainLoop interface gives you a unique access to toplevel * threads. */ enum { INTERRUPT, MONITOR, CHANGE_FREQUENCY, LAST_SIGNAL, }; static guint main_loop_signals[LAST_SIGNAL]; GType ags_main_loop_get_type() { static GType main_loop_type = 0; if(!main_loop_type){ main_loop_type = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsMainLoop", sizeof (AgsMainLoopInterface), (GClassInitFunc) ags_main_loop_class_init, 0, NULL, 0); } return(main_loop_type); } void ags_main_loop_class_init(AgsMainLoopInterface *interface) { /** * AgsMainLoop::interrupt: * @main_loop: the #AgsMainLoop * @sig: the signal number * @time_cycle: the amount of time of a cycle * @time_spent: the amount of time passed since last cycle * * Notify about interrupt threads. * * Since: 1.0.0 */ main_loop_signals[INTERRUPT] = g_signal_new("interrupt", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMainLoopInterface, interrupt), NULL, NULL, g_cclosure_user_marshal_VOID__INT_UINT_POINTER, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_UINT, G_TYPE_POINTER); /** * AgsMainLoop::monitor: * @main_loop: the #AgsMainLoop * @time_cycle: the amount of time of a cycle * @time_spent: the amount of time passed since last cycle * * Notify to monitor time. * * Returns: if monitor is allowed * * Since: 1.0.0 */ main_loop_signals[MONITOR] = g_signal_new("monitor", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMainLoopInterface, monitor), NULL, NULL, g_cclosure_user_marshal_BOOLEAN__UINT_POINTER, G_TYPE_BOOLEAN, 2, G_TYPE_UINT, G_TYPE_POINTER); /** * AgsMainLoop::change-frequency: * @main_loop: the #AgsMainLoop * @frequency: the new frequency * * Change frequency. * * Since: 1.0.0 */ main_loop_signals[CHANGE_FREQUENCY] = g_signal_new("change-frequency", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMainLoopInterface, change_frequency), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); } /** * ags_main_loop_get_tree_lock: * @main_loop: the #AgsMainLoop * * Retrieve the tree mutex. * * Returns: the mutex * * Since: 1.0.0 */ pthread_mutex_t* ags_main_loop_get_tree_lock(AgsMainLoop *main_loop) { AgsMainLoopInterface *main_loop_interface; 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_tree_lock, NULL); return(main_loop_interface->get_tree_lock(main_loop)); } /** * ags_main_loop_set_application_context: * @main_loop: the #AgsMainLoop * @application_context: the #AgsApplicationContext * * Sets the application context. * * Since: 1.0.0 */ void ags_main_loop_set_application_context(AgsMainLoop *main_loop, AgsApplicationContext *application_context) { AgsMainLoopInterface *main_loop_interface; g_return_if_fail(AGS_IS_MAIN_LOOP(main_loop)); main_loop_interface = AGS_MAIN_LOOP_GET_INTERFACE(main_loop); g_return_if_fail(main_loop_interface->set_application_context); main_loop_interface->set_application_context(main_loop, application_context); } /** * ags_main_loop_get_application_context: * @main_loop: the #AgsMainLoop * * Retrieve the #AgsApplicationContext. * * Returns: the #AgsApplicationContext * * Since: 1.0.0 */ AgsApplicationContext* ags_main_loop_get_application_context(AgsMainLoop *main_loop) { AgsMainLoopInterface *main_loop_interface; 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_application_context, NULL); return(main_loop_interface->get_application_context(main_loop)); } /** * ags_main_loop_set_async_queue: * @main_loop: the #AgsMainLoop * @async_queue: the #AgsAsyncQueue * * Sets the asynchronous queue. * * Since: 1.0.0 */ void ags_main_loop_set_async_queue(AgsMainLoop *main_loop, GObject *async_queue) { AgsMainLoopInterface *main_loop_interface; g_return_if_fail(AGS_IS_MAIN_LOOP(main_loop)); main_loop_interface = AGS_MAIN_LOOP_GET_INTERFACE(main_loop); g_return_if_fail(main_loop_interface->set_async_queue); main_loop_interface->set_async_queue(main_loop, async_queue); } /** * ags_main_loop_get_async_queue: * @main_loop: the #AgsMainLoop * * Retrieve the #AgsAsyncQueue. * * Returns: the #AgsAsyncQueue * * Since: 1.0.0 */ GObject* ags_main_loop_get_async_queue(AgsMainLoop *main_loop) { AgsMainLoopInterface *main_loop_interface; 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); return(main_loop_interface->get_async_queue(main_loop)); } /** * ags_main_loop_set_tic: * @main_loop: the #AgsMainLoop * @tic: tic * * Sets tic to @tic. * * Since: 1.0.0 */ void ags_main_loop_set_tic(AgsMainLoop *main_loop, guint tic) { AgsMainLoopInterface *main_loop_interface; g_return_if_fail(AGS_IS_MAIN_LOOP(main_loop)); main_loop_interface = AGS_MAIN_LOOP_GET_INTERFACE(main_loop); g_return_if_fail(main_loop_interface->set_tic); main_loop_interface->set_tic(main_loop, tic); } /** * ags_main_loop_get_tic: * @main_loop: the #AgsMainLoop * * Retrieve current tic of synchronization context. * * Returns: current tic * * Since: 1.0.0 */ guint ags_main_loop_get_tic(AgsMainLoop *main_loop) { AgsMainLoopInterface *main_loop_interface; 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); return(main_loop_interface->get_tic(main_loop)); } /** * ags_main_loop_set_last_sync: * @main_loop: the #AgsMainLoop * @last_sync: last sync * * Sets last sync to @last_sync. * * Since: 1.0.0 */ void ags_main_loop_set_last_sync(AgsMainLoop *main_loop, guint last_sync) { AgsMainLoopInterface *main_loop_interface; g_return_if_fail(AGS_IS_MAIN_LOOP(main_loop)); main_loop_interface = AGS_MAIN_LOOP_GET_INTERFACE(main_loop); g_return_if_fail(main_loop_interface->set_last_sync); main_loop_interface->set_last_sync(main_loop, last_sync); } /** * ags_main_loop_get_last_sync: * @main_loop: the #AgsMainLoop * * Retrieve last sync as tic of synchronization context. * * Returns: last synced tic * * Since: 1.0.0 */ guint ags_main_loop_get_last_sync(AgsMainLoop *main_loop) { AgsMainLoopInterface *main_loop_interface; 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); return(main_loop_interface->get_last_sync(main_loop)); } /** * ags_main_loop_interrupt: * @main_loop: the #AgsMainLoop * @sig: the singal number * @time_cycle: the amount of time of a cycle * @time_spent: the amount of time passed since last cycle * * Notify about interrupt threads. * * Since: 1.0.0 */ void ags_main_loop_interrupt(AgsMainLoop *main_loop, int sig, guint time_cycle, guint *time_spent) { g_signal_emit(main_loop, main_loop_signals[INTERRUPT], 0, sig, time_cycle, time_spent); } /** * ags_main_loop_monitor: * @main_loop: the #AgsMainLoop * @time_cycle: the amount of time of a cycle * @time_spent: the amount of time passed since last cycle * * Notify to monitor time. * * Returns: if monitor is allowed * * Since: 1.0.0 */ gboolean ags_main_loop_monitor(AgsMainLoop *main_loop, guint time_cycle, guint *time_spent) { gboolean has_monitor; g_signal_emit(main_loop, main_loop_signals[MONITOR], 0, time_cycle, time_spent, &has_monitor); return(has_monitor); } /** * ags_main_loop_change_frequency: * @main_loop: the #AgsMainLoop * @frequency: the new frequency * * Change frequency. * * Since: 1.0.0 */ void ags_main_loop_change_frequency(AgsMainLoop *main_loop, gdouble frequency) { g_signal_emit(main_loop, main_loop_signals[CHANGE_FREQUENCY], 0, frequency); } gsequencer-1.4.24/ags/object/ags_tactable.c0000644000175000017500000001572513256163135015500 00000000000000/* 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 . */ #include #include void ags_tactable_class_init(AgsTactableInterface *interface); /** * SECTION:ags_tactable * @short_description: Unique tempo set or attributes access * @title: AgsTactable * @section_id: AgsTactable * @include: ags/object/ags_tactable.h * * The #AgsTactable interface gives you a unique access to modify tempo. */ enum { CHANGE_SEQUENCER_DURATION, CHANGE_NOTATION_DURATION, CHANGE_TACT, CHANGE_BPM, LAST_SIGNAL, }; static guint tactable_signals[LAST_SIGNAL]; GType ags_tactable_get_type() { static GType tactable_type = 0; if(!tactable_type){ tactable_type = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsTactable", sizeof (AgsTactableInterface), (GClassInitFunc) ags_tactable_class_init, 0, NULL, 0); } return(tactable_type); } void ags_tactable_class_init(AgsTactableInterface *interface) { /** * AgsTactable::change-sequencer-duration: * @tactable: the #AgsTactable * @duration: new duration * * The ::change-sequencer-duration signal notifies about changed duration * of sequencer. * * Since: 1.0.0 */ tactable_signals[CHANGE_SEQUENCER_DURATION] = g_signal_new("change-sequencer-duration", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsTactableInterface, change_sequencer_duration), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); /** * AgsTactable::change-notation-duration: * @tactable: the #AgsTactable * @duration: new duration * * The ::change-notation-duration signal notifies about changed duration * of notation. * * Since: 1.0.0 */ tactable_signals[CHANGE_NOTATION_DURATION] = g_signal_new("change-notation-duration", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsTactableInterface, change_notation_duration), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); /** * AgsTactable::change-tact * @tactable: the #AgsTactable * @tact: new tact * * The ::change-tact signal notifies about changed tact. * * Since: 1.0.0 */ tactable_signals[CHANGE_TACT] = g_signal_new("change-tact", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsTactableInterface, change_tact), NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE, G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); /** * AgsTactable::change-bpm: * @tactable: the #AgsTactable * @duration: new duration * * The ::change-bpm signal notifies about changed bpm. * * Since: 1.0.0 */ tactable_signals[CHANGE_BPM] = g_signal_new("change-bpm", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsTactableInterface, change_bpm), NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE, G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); } /** * ags_tactable_get_sequencer_duration: * @tactable: an #AgsTactable * * Get sequencer duration. * * Returns: the sequencer duration * * Since: 1.0.0 */ gdouble ags_tactable_get_sequencer_duration(AgsTactable *tactable) { AgsTactableInterface *tactable_interface; g_return_val_if_fail(AGS_IS_TACTABLE(tactable), -1.0); tactable_interface = AGS_TACTABLE_GET_INTERFACE(tactable); g_return_val_if_fail(tactable_interface->get_sequencer_duration, -1.0); return(tactable_interface->get_sequencer_duration(tactable)); } /** * ags_tactable_get_notation_duration: * @tactable: an #AgsTactable * * Get notation duration. * * Returns: the notation duration * * Since: 1.0.0 */ gdouble ags_tactable_get_notation_duration(AgsTactable *tactable) { AgsTactableInterface *tactable_interface; g_return_val_if_fail(AGS_IS_TACTABLE(tactable), -1.0); tactable_interface = AGS_TACTABLE_GET_INTERFACE(tactable); g_return_val_if_fail(tactable_interface->get_notation_duration, -1.0); return(tactable_interface->get_notation_duration(tactable)); } /** * ags_tactable_get_tact: * @tactable: an #AgsTactable * * Get tact. * * Returns: the tact * * Since: 1.0.0 */ gdouble ags_tactable_get_tact(AgsTactable *tactable) { AgsTactableInterface *tactable_interface; g_return_val_if_fail(AGS_IS_TACTABLE(tactable), -1.0); tactable_interface = AGS_TACTABLE_GET_INTERFACE(tactable); g_return_val_if_fail(tactable_interface->get_tact, -1.0); return(tactable_interface->get_tact(tactable)); } /** * ags_tactable_get_bpm: * @tactable: an #AgsTactable * * Get bpm. * * Returns: the bpm * * Since: 1.0.0 */ gdouble ags_tactable_get_bpm(AgsTactable *tactable) { AgsTactableInterface *tactable_interface; g_return_val_if_fail(AGS_IS_TACTABLE(tactable), -1.0); tactable_interface = AGS_TACTABLE_GET_INTERFACE(tactable); g_return_val_if_fail(tactable_interface->get_bpm, -1.0); return(tactable_interface->get_bpm(tactable)); } /** * ags_tactable_change_sequencer_duration: * @tactable: an #AgsTactable * @duration: the duration * * Sequencer duration changed. * * Since: 1.0.0 */ void ags_tactable_change_sequencer_duration(AgsTactable *tactable, double duration) { g_signal_emit(tactable, tactable_signals[CHANGE_SEQUENCER_DURATION], 0, duration); } /** * ags_tactable_change_notation_duration: * @tactable: an #AgsTactable * @duration: the duration * * Notation duration changed. * * Since: 1.0.0 */ void ags_tactable_change_notation_duration(AgsTactable *tactable, double duration) { g_signal_emit(tactable, tactable_signals[CHANGE_NOTATION_DURATION], 0, duration); } /** * ags_tactable_change_tact: * @tactable: an #AgsTactable * @new_tact: the new tact * @old_tact: the old tact * * Tact changed. * * Since: 1.0.0 */ void ags_tactable_change_tact(AgsTactable *tactable, gdouble new_tact, gdouble old_tact) { g_signal_emit(tactable, tactable_signals[CHANGE_TACT], 0, new_tact, old_tact); } /** * ags_tactable_change_bpm: * @tactable: an #AgsTactable * @new_bpm: the new bpm * @old_bpm: the old bpm * * Bpm changed. * * Since: 1.0.0 */ void ags_tactable_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm) { g_signal_emit(tactable, tactable_signals[CHANGE_BPM], 0, new_bpm, old_bpm); } gsequencer-1.4.24/ags/object/ags_sequencer.c0000644000175000017500000004103713246707333015711 00000000000000/* 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 . */ #include #include void ags_sequencer_class_init(AgsSequencerInterface *interface); /** * SECTION:ags_sequencer * @short_description: unique access to sequencers * @title: AgsSequencer * @section_id: AgsSequencer * @include: ags/object/ags_sequencer.h * * The #AgsSequencer interface gives you a unique access to MIDI devices. */ GType ags_sequencer_get_type() { static GType ags_type_sequencer = 0; if(!ags_type_sequencer){ ags_type_sequencer = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsSequencer", sizeof(AgsSequencerInterface), (GClassInitFunc) ags_sequencer_class_init, 0, NULL, 0); } return(ags_type_sequencer); } GQuark ags_sequencer_error_quark() { return(g_quark_from_static_string("ags-sequencer-error-quark")); } void ags_sequencer_class_init(AgsSequencerInterface *interface) { /** * AgsSequencer::tic: * @sequencer: the object * * The ::tic signal is emitted every tic of the sequencer. This notifies * about a newly played buffer. * * Since: 1.0.0 */ g_signal_new("tic", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSequencerInterface, tic), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsSequencer::offset-changed: * @sequencer: the object * @note_offset: new notation offset * * The ::offset-changed signal notifies about changed position within * notation. * * Since: 1.0.0 */ g_signal_new("offset-changed", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSequencerInterface, offset_changed), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); } /** * ags_sequencer_set_application_context: * @sequencer: an #AgsSequencer * @application_context: the application context to set * * Set application context. * * Since: 1.0.0 */ void ags_sequencer_set_application_context(AgsSequencer *sequencer, AgsApplicationContext *application_context) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->set_application_context); sequencer_interface->set_application_context(sequencer, application_context); } /** * ags_sequencer_get_application_context: * @sequencer: an #AgsSequencer * * Get application context. * * Returns: #AgsApplicationContext * * Since: 1.0.0 */ AgsApplicationContext* ags_sequencer_get_application_context(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), NULL); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->get_application_context, NULL); return(sequencer_interface->get_application_context(sequencer)); } /** * ags_sequencer_set_application_mutex: * @sequencer: an #AgsSequencer * @application_mutex: the application mutex to set * * Set application mutex. * * Since: 1.0.0 */ void ags_sequencer_set_application_mutex(AgsSequencer *sequencer, pthread_mutex_t *application_mutex) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->set_application_mutex); sequencer_interface->set_application_mutex(sequencer, application_mutex); } /** * ags_sequencer_get_application_mutex: * @sequencer: an #AgsSequencer * * Get application mutex. * * Returns: the application mutex * * Since: 1.0.0 */ pthread_mutex_t* ags_sequencer_get_application_mutex(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), NULL); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->get_application_mutex, NULL); return(sequencer_interface->get_application_mutex(sequencer)); } /** * ags_sequencer_set_device: * @sequencer: an #AgsSequencer * @device_id: the device to set * * Set device. * * Since: 1.0.0 */ void ags_sequencer_set_device(AgsSequencer *sequencer, gchar *device_id) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->set_device); sequencer_interface->set_device(sequencer, device_id); } /** * ags_sequencer_get_device: * @sequencer: an #AgsSequencer * * Get device. * * Returns: the device's identifier * * Since: 1.0.0 */ gchar* ags_sequencer_get_device(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), NULL); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->get_device, NULL); return(sequencer_interface->get_device(sequencer)); } /** * ags_sequencer_list_cards: * @sequencer: an #AgsSequencer * @card_id: a list containing card ids * @card_name: a list containing card names * * Retrieve @card_id and @card_name as a list of strings. * * Since: 1.0.0 */ void ags_sequencer_list_cards(AgsSequencer *sequencer, GList **card_id, GList **card_name) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->list_cards); sequencer_interface->list_cards(sequencer, card_id, card_name); } /** * ags_sequencer_is_starting: * @sequencer: an #AgsSequencer * * Get starting. * * Returns: %TRUE if starting, else %FALSE * * Since: 1.0.0 */ gboolean ags_sequencer_is_starting(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), FALSE); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->is_starting, FALSE); return(sequencer_interface->is_starting(sequencer)); } /** * ags_sequencer_is_playing: * @sequencer: an #AgsSequencer * * Get playing. * * Returns: %TRUE if playing, else %FALSE * * Since: 1.0.0 */ gboolean ags_sequencer_is_playing(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), FALSE); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->is_playing, FALSE); return(sequencer_interface->is_playing(sequencer)); } /** * ags_sequencer_is_recording: * @sequencer: an #AgsSequencer * * Get recording. * * Returns: %TRUE if recording, else %FALSE * * Since: 1.0.0 */ gboolean ags_sequencer_is_recording(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), FALSE); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->is_recording, FALSE); return(sequencer_interface->is_recording(sequencer)); } /** * ags_sequencer_play: * @sequencer: an #AgsSequencer * @error: an error that may occure * * Initializes the sequencer for playback. * * Since: 1.0.0 */ void ags_sequencer_play_init(AgsSequencer *sequencer, GError **error) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->play_init); sequencer_interface->play_init(sequencer, error); } /** * ags_sequencer_play: * @sequencer: an #AgsSequencer * @error: an error that may occure * * Plays the current buffer of sequencer. * * Since: 1.0.0 */ void ags_sequencer_play(AgsSequencer *sequencer, GError **error) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->play); sequencer_interface->play(sequencer, error); } /** * ags_sequencer_record: * @sequencer: an #AgsSequencer * @error: an error that may occure * * Initializes the sequencer for recordback. * * Since: 1.0.0 */ void ags_sequencer_record_init(AgsSequencer *sequencer, GError **error) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->record_init); sequencer_interface->record_init(sequencer, error); } /** * ags_sequencer_record: * @sequencer: an #AgsSequencer * @error: an error that may occure * * Records the current buffer of sequencer. * * Since: 1.0.0 */ void ags_sequencer_record(AgsSequencer *sequencer, GError **error) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->record); sequencer_interface->record(sequencer, error); } /** * ags_sequencer_stop: * @sequencer: an #AgsSequencer * * Stops the sequencer from playing to it. * * Since: 1.0.0 */ void ags_sequencer_stop(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->stop); sequencer_interface->stop(sequencer); } /** * ags_sequencer_tic: * @sequencer: an #AgsSequencer * * Every call to play may generate a tic. * * Since: 1.0.0 */ void ags_sequencer_tic(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->tic); sequencer_interface->tic(sequencer); } /** * ags_sequencer_tic: * @sequencer: an #AgsSequencer * * Callback when counter expires minor note offset. * * Since: 1.0.0 */ void ags_sequencer_offset_changed(AgsSequencer *sequencer, guint note_offset) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->offset_changed); sequencer_interface->offset_changed(sequencer, note_offset); } /** * ags_sequencer_get_buffer: * @sequencer: an #AgsSequencer * @buffer_length: the buffer's length * * Get current playback buffer. * * Returns: current playback buffer * * Since: 1.0.0 */ void* ags_sequencer_get_buffer(AgsSequencer *sequencer, guint *buffer_length) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), NULL); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->get_buffer, NULL); return(sequencer_interface->get_buffer(sequencer, buffer_length)); } /** * ags_sequencer_get_next_buffer: * @sequencer: an #AgsSequencer * @buffer_length: the buffer's length * * Get future playback buffer. * * Returns: next playback buffer * * Since: 1.0.0 */ void* ags_sequencer_get_next_buffer(AgsSequencer *sequencer, guint *buffer_length) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), NULL); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->get_next_buffer, NULL); return(sequencer_interface->get_next_buffer(sequencer, buffer_length)); } /** * ags_sequencer_set_bpm: * @sequencer: an #AgsSequencer * @bpm: the bpm to set * * Set current playback bpm. * * Since: 1.0.0 */ void ags_sequencer_set_bpm(AgsSequencer *sequencer, gdouble bpm) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->set_bpm); sequencer_interface->set_bpm(sequencer, bpm); } /** * ags_sequencer_get_bpm: * @sequencer: an #AgsSequencer * * Get current playback bpm. * * Returns: bpm * * Since: 1.0.0 */ gdouble ags_sequencer_get_bpm(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), G_MAXUINT); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->get_bpm, G_MAXUINT); return(sequencer_interface->get_bpm(sequencer)); } /** * ags_sequencer_set_delay_factor: * @sequencer: an #AgsSequencer * @delay_factor: the delay factor to set * * Set current playback delay factor. * * Since: 1.0.0 */ void ags_sequencer_set_delay_factor(AgsSequencer *sequencer, gdouble delay_factor) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->set_delay_factor); sequencer_interface->set_delay_factor(sequencer, delay_factor); } /** * ags_sequencer_get_delay_factor: * @sequencer: an #AgsSequencer * * Get current playback delay factor. * * Returns: delay factor * * Since: 1.0.0 */ gdouble ags_sequencer_get_delay_factor(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), G_MAXUINT); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->get_delay_factor, G_MAXUINT); return(sequencer_interface->get_delay_factor(sequencer)); } /** * ags_sequencer_get_note_offset: * @sequencer: an #AgsSequencer * * Get current playback note offset. * * Returns: offset * * Since: 1.0.0 */ guint ags_sequencer_get_note_offset(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), G_MAXUINT); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->get_note_offset, G_MAXUINT); return(sequencer_interface->get_note_offset(sequencer)); } /** * ags_sequencer_set_note_offset: * @sequencer: an #AgsSequencer * @note_offset: the note offset to set * * Set current playback note offset. * * Since: 1.0.0 */ void ags_sequencer_set_note_offset(AgsSequencer *sequencer, guint note_offset) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->set_note_offset); sequencer_interface->set_note_offset(sequencer, note_offset); } /** * ags_sequencer_set_audio: * @sequencer: an #AgsSequencer * @audio: the audio to set * * Set audio. * * Since: 1.0.0 */ void ags_sequencer_set_audio(AgsSequencer *sequencer, GList *audio) { AgsSequencerInterface *sequencer_interface; g_return_if_fail(AGS_IS_SEQUENCER(sequencer)); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_if_fail(sequencer_interface->set_audio); sequencer_interface->set_audio(sequencer, audio); } /** * ags_sequencer_get_audio: * @sequencer: an #AgsSequencer * * Get audio. * * Returns: a #GList container #AgsAudio * * Since: 1.0.0 */ GList* ags_sequencer_get_audio(AgsSequencer *sequencer) { AgsSequencerInterface *sequencer_interface; g_return_val_if_fail(AGS_IS_SEQUENCER(sequencer), NULL); sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(sequencer); g_return_val_if_fail(sequencer_interface->get_audio, NULL); return(sequencer_interface->get_audio(sequencer)); } gsequencer-1.4.24/ags/object/ags_concurrent_tree.c0000644000175000017500000001310713246707333017115 00000000000000/* 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 . */ #include #include void ags_concurrent_tree_base_init(AgsConcurrentTreeInterface *interface); /** * SECTION:ags_concurrent_tree * @short_description: thread-safe locking of tree * @title: AgsConcurrentTree * @section_id: AgsConcurrentTree * @include: ags/object/ags_concurrent_tree.h * * The #AgsConcurrentTree interface provides essential locks to process tree * with parallelism. */ GType ags_concurrent_tree_get_type() { static GType ags_type_concurrent_tree = 0; if(!ags_type_concurrent_tree){ static const GTypeInfo ags_concurrent_tree_info = { sizeof(AgsConcurrentTreeInterface), (GBaseInitFunc) ags_concurrent_tree_base_init, NULL, /* base_finalize */ }; ags_type_concurrent_tree = g_type_register_static(G_TYPE_INTERFACE, "AgsConcurrentTree", &ags_concurrent_tree_info, 0); } return(ags_type_concurrent_tree); } void ags_concurrent_tree_base_init(AgsConcurrentTreeInterface *interface) { /* empty */ } /** * ags_concurrent_tree_set_parent_locked: * @concurrent_tree: an #AgsConcurrentTree * @parent_locked: %TRUE means the parent is locked * * Set context owns parent lock * * Since: 1.0.0 */ void ags_concurrent_tree_set_parent_locked(AgsConcurrentTree *concurrent_tree, gboolean parent_locked) { AgsConcurrentTreeInterface *concurrent_tree_interface; g_return_if_fail(AGS_IS_CONCURRENT_TREE(concurrent_tree)); concurrent_tree_interface = AGS_CONCURRENT_TREE_GET_INTERFACE(concurrent_tree); g_return_if_fail(concurrent_tree_interface->set_parent_locked); concurrent_tree_interface->set_parent_locked(concurrent_tree, parent_locked); } /** * ags_concurrent_tree_get_parent_locked: * @concurrent_tree: an #AgsConcurrentTree * * If context owns parent lock * * Returns: the %TRUE if parent locked, else %FALSE * * Since: 1.0.0 */ gboolean ags_concurrent_tree_get_parent_locked(AgsConcurrentTree *concurrent_tree) { AgsConcurrentTreeInterface *concurrent_tree_interface; g_return_val_if_fail(AGS_IS_CONCURRENT_TREE(concurrent_tree), FALSE); concurrent_tree_interface = AGS_CONCURRENT_TREE_GET_INTERFACE(concurrent_tree); g_return_val_if_fail(concurrent_tree_interface->get_parent_locked, FALSE); return(concurrent_tree_interface->get_parent_locked(concurrent_tree)); } /** * ags_concurrent_tree_get_lock: * @concurrent_tree: an #AgsConcurrentTree * * Get tree node's lock. * * Returns: the pthread_mutex_t * * Since: 1.0.0 */ pthread_mutex_t* ags_concurrent_tree_get_lock(AgsConcurrentTree *concurrent_tree) { AgsConcurrentTreeInterface *concurrent_tree_interface; g_return_val_if_fail(AGS_IS_CONCURRENT_TREE(concurrent_tree), NULL); concurrent_tree_interface = AGS_CONCURRENT_TREE_GET_INTERFACE(concurrent_tree); g_return_val_if_fail(concurrent_tree_interface->get_lock, NULL); return(concurrent_tree_interface->get_lock(concurrent_tree)); } /** * ags_concurrent_tree_get_parent_lock: * @concurrent_tree: an #AgsConcurrentTree * * Get tree node's parent lock. * * Returns: the pthread_mutex_t * * Since: 1.0.0 */ pthread_mutex_t* ags_concurrent_tree_get_parent_lock(AgsConcurrentTree *concurrent_tree) { AgsConcurrentTreeInterface *concurrent_tree_interface; g_return_val_if_fail(AGS_IS_CONCURRENT_TREE(concurrent_tree), NULL); concurrent_tree_interface = AGS_CONCURRENT_TREE_GET_INTERFACE(concurrent_tree); g_return_val_if_fail(concurrent_tree_interface->get_parent_lock, NULL); return(concurrent_tree_interface->get_parent_lock(concurrent_tree)); } /** * ags_concurrent_tree_lock_context: * @concurrent_tree: the #AgsConcurrentTree * * Locks the context of @concurrent_tree and blocks until success. * * Returns: %TRUE if parent locked * * Since: 1.0.0 */ gboolean ags_concurrent_tree_lock_context(AgsConcurrentTree *concurrent_tree) { pthread_mutex_t *parent_mutex, *mutex; int err; gboolean parent_locked; static pthread_mutex_t exclusive_lock = PTHREAD_MUTEX_INITIALIZER; parent_mutex = ags_concurrent_tree_get_parent_lock(concurrent_tree); mutex = ags_concurrent_tree_get_lock(concurrent_tree); pthread_mutex_lock(&exclusive_lock); //FIXME:JK: check depenendencies - probably should be pthread_mutex_trylock() pthread_mutex_lock(parent_mutex); parent_locked = TRUE; pthread_mutex_lock(mutex); pthread_mutex_unlock(&exclusive_lock); return(parent_locked); } /** * ags_concurrent_tree_unlock_context: * @concurrent_tree: the #AgsConcurrentTree * * Unlocks the context of @concurrent_tree. * * Since: 1.0.0 */ void ags_concurrent_tree_unlock_context(AgsConcurrentTree *concurrent_tree) { pthread_mutex_t *parent_mutex, *mutex; parent_mutex = ags_concurrent_tree_get_parent_lock(concurrent_tree); mutex = ags_concurrent_tree_get_lock(concurrent_tree); pthread_mutex_unlock(mutex); pthread_mutex_unlock(parent_mutex); } gsequencer-1.4.24/ags/object/ags_seekable.c0000644000175000017500000000531713256163135015470 00000000000000/* 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 . */ #include #include void ags_seekable_class_init(AgsSeekableInterface *interface); /** * SECTION:ags_seekable * @short_description: unique access to seekable classes * @title: AgsSeekable * @section_id: AgsSeekable * @include: ags/object/ags_seekable.h * * The #AgsSeekable interface gives you the #AgsSeekable::seek() signal * what notifies about changed offset of pattern or notation. */ GType ags_seekable_get_type() { static GType seekable_type = 0; if(!seekable_type){ seekable_type = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsSeekable", sizeof (AgsSeekableInterface), (GClassInitFunc) ags_seekable_class_init, 0, NULL, 0); } return seekable_type; } void ags_seekable_class_init(AgsSeekableInterface *interface) { /** * AgsSeekable::seek: * @seekable: the object * @steps: relative seeking * @forward: direction to seek, if %TRUE seek forward * * The ::seek signal notifies about changed position * of sequencer. * * Since: 1.0.0 */ g_signal_new("seek", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSeekableInterface, seek), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_BOOLEAN, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_BOOLEAN); } void ags_seekable_base_init(AgsSeekableInterface *interface) { /* empty */ } /** * ags_seekable_seek: * @seekable: the #AgsSeekable interface * @steps: the amount of seeking * @forward: the direction, %TRUE for moving ahead * * Seek relatively. * * Since: 1.0.0 */ void ags_seekable_seek(AgsSeekable *seekable, guint steps, gboolean forward) { AgsSeekableInterface *seekable_interface; g_return_if_fail(AGS_IS_SEEKABLE(seekable)); seekable_interface = AGS_SEEKABLE_GET_INTERFACE(seekable); g_return_if_fail(seekable_interface->seek); seekable_interface->seek(seekable, steps, forward); } gsequencer-1.4.24/ags/object/ags_marshal.c0000644000175000017500000032176713256163135015356 00000000000000#include #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) #define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) #define g_marshal_value_peek_long(v) g_value_get_long (v) #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) #define g_marshal_value_peek_enum(v) g_value_get_enum (v) #define g_marshal_value_peek_flags(v) g_value_get_flags (v) #define g_marshal_value_peek_float(v) g_value_get_float (v) #define g_marshal_value_peek_double(v) g_value_get_double (v) #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) #define g_marshal_value_peek_param(v) g_value_get_param (v) #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) #define g_marshal_value_peek_variant(v) g_value_get_variant (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the * g_value_get_*() functions */ #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int #define g_marshal_value_peek_char(v) (v)->data[0].v_int #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint #define g_marshal_value_peek_int(v) (v)->data[0].v_int #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint #define g_marshal_value_peek_long(v) (v)->data[0].v_long #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong #define g_marshal_value_peek_float(v) (v)->data[0].v_float #define g_marshal_value_peek_double(v) (v)->data[0].v_double #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ /* VOID:BOOLEAN,POINTER (ags_marshallers.list:1) */ void g_cclosure_user_marshal_VOID__BOOLEAN_POINTER (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__BOOLEAN_POINTER) (gpointer data1, gboolean arg1, gpointer arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__BOOLEAN_POINTER callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_boolean (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), data2); } /* VOID:INT,UINT,POINTER (ags_marshallers.list:2) */ void g_cclosure_user_marshal_VOID__INT_UINT_POINTER (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__INT_UINT_POINTER) (gpointer data1, gint arg1, guint arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__INT_UINT_POINTER callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__INT_UINT_POINTER) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_int (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_pointer (param_values + 3), data2); } /* VOID:UINT,BOOLEAN (ags_marshallers.list:3) */ void g_cclosure_user_marshal_VOID__UINT_BOOLEAN (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_BOOLEAN) (gpointer data1, guint arg1, gboolean arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_BOOLEAN callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_BOOLEAN) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_boolean (param_values + 2), data2); } /* VOID:UINT,UINT (ags_marshallers.list:4) */ void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint arg1, guint arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_UINT callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_uint (param_values + 2), data2); } /* VOID:UINT,UINT,BOOLEAN (ags_marshallers.list:5) */ void g_cclosure_user_marshal_VOID__UINT_UINT_BOOLEAN (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_UINT_BOOLEAN) (gpointer data1, guint arg1, guint arg2, gboolean arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_UINT_BOOLEAN callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_UINT_BOOLEAN) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_boolean (param_values + 3), data2); } /* VOID:UINT,UINT,UINT (ags_marshallers.list:6) */ void g_cclosure_user_marshal_VOID__UINT_UINT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT) (gpointer data1, guint arg1, guint arg2, guint arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_UINT_UINT callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_uint (param_values + 3), data2); } /* VOID:UINT,UINT,UINT,UINT (ags_marshallers.list:7) */ void g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT_UINT) (gpointer data1, guint arg1, guint arg2, guint arg3, guint arg4, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_UINT_UINT_UINT callback; g_return_if_fail (n_param_values == 5); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_uint (param_values + 3), g_marshal_value_peek_uint (param_values + 4), data2); } /* VOID:UINT,UINT,UINT,UINT,UINT (ags_marshallers.list:8) */ void g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT_UINT_UINT) (gpointer data1, guint arg1, guint arg2, guint arg3, guint arg4, guint arg5, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_UINT_UINT_UINT_UINT callback; g_return_if_fail (n_param_values == 6); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_UINT_UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_uint (param_values + 3), g_marshal_value_peek_uint (param_values + 4), g_marshal_value_peek_uint (param_values + 5), data2); } /* VOID:UINT,UINT,UINT,UINT,UINT,UINT (ags_marshallers.list:9) */ void g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT_UINT_UINT_UINT) (gpointer data1, guint arg1, guint arg2, guint arg3, guint arg4, guint arg5, guint arg6, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_UINT_UINT_UINT_UINT_UINT callback; g_return_if_fail (n_param_values == 7); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_UINT_UINT_UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_uint (param_values + 3), g_marshal_value_peek_uint (param_values + 4), g_marshal_value_peek_uint (param_values + 5), g_marshal_value_peek_uint (param_values + 6), data2); } /* VOID:UINT,UINT,UINT,UINT,UINT,UINT,UINT (ags_marshallers.list:10) */ void g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT_UINT_UINT_UINT_UINT) (gpointer data1, guint arg1, guint arg2, guint arg3, guint arg4, guint arg5, guint arg6, guint arg7, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_UINT_UINT_UINT_UINT_UINT_UINT callback; g_return_if_fail (n_param_values == 8); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_UINT_UINT_UINT_UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_uint (param_values + 3), g_marshal_value_peek_uint (param_values + 4), g_marshal_value_peek_uint (param_values + 5), g_marshal_value_peek_uint (param_values + 6), g_marshal_value_peek_uint (param_values + 7), data2); } /* VOID:UINT,DOUBLE,UINT (ags_marshallers.list:11) */ void g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_DOUBLE_UINT) (gpointer data1, guint arg1, gdouble arg2, guint arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_DOUBLE_UINT callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_DOUBLE_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_double (param_values + 2), g_marshal_value_peek_uint (param_values + 3), data2); } /* VOID:UINT,INT (ags_marshallers.list:12) */ void g_cclosure_user_marshal_VOID__UINT_INT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_INT) (gpointer data1, guint arg1, gint arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_INT callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_INT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_int (param_values + 2), data2); } /* VOID:UINT,DOUBLE (ags_marshallers.list:13) */ void g_cclosure_user_marshal_VOID__UINT_DOUBLE (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_DOUBLE) (gpointer data1, guint arg1, gdouble arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_DOUBLE callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_DOUBLE) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_double (param_values + 2), data2); } /* VOID:UINT,STRING,UINT (ags_marshallers.list:14) */ void g_cclosure_user_marshal_VOID__UINT_STRING_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_STRING_UINT) (gpointer data1, guint arg1, gpointer arg2, guint arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_STRING_UINT callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_STRING_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_uint (param_values + 3), data2); } /* VOID:UINT,POINTER,UINT (ags_marshallers.list:15) */ void g_cclosure_user_marshal_VOID__UINT_POINTER_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__UINT_POINTER_UINT) (gpointer data1, guint arg1, gpointer arg2, guint arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__UINT_POINTER_UINT callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__UINT_POINTER_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), g_marshal_value_peek_uint (param_values + 3), data2); } /* VOID:ULONG,UINT (ags_marshallers.list:16) */ void g_cclosure_user_marshal_VOID__ULONG_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__ULONG_UINT) (gpointer data1, gulong arg1, guint arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__ULONG_UINT callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__ULONG_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_ulong (param_values + 1), g_marshal_value_peek_uint (param_values + 2), data2); } /* VOID:ULONG,UINT,BOOLEAN (ags_marshallers.list:17) */ void g_cclosure_user_marshal_VOID__ULONG_UINT_BOOLEAN (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__ULONG_UINT_BOOLEAN) (gpointer data1, gulong arg1, guint arg2, gboolean arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__ULONG_UINT_BOOLEAN callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__ULONG_UINT_BOOLEAN) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_ulong (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_boolean (param_values + 3), data2); } /* VOID:DOUBLE,DOUBLE (ags_marshallers.list:18) */ void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__DOUBLE_DOUBLE) (gpointer data1, gdouble arg1, gdouble arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__DOUBLE_DOUBLE callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__DOUBLE_DOUBLE) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_double (param_values + 1), g_marshal_value_peek_double (param_values + 2), data2); } /* VOID:ULONG,UINT,UINT (ags_marshallers.list:19) */ void g_cclosure_user_marshal_VOID__ULONG_UINT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__ULONG_UINT_UINT) (gpointer data1, gulong arg1, guint arg2, guint arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__ULONG_UINT_UINT callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__ULONG_UINT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_ulong (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_uint (param_values + 3), data2); } /* VOID:STRING,UINT (ags_marshallers.list:20) */ void g_cclosure_user_marshal_VOID__STRING_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_UINT) (gpointer data1, gpointer arg1, guint arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__STRING_UINT callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_uint (param_values + 2), data2); } /* VOID:STRING,UINT,DOUBLE (ags_marshallers.list:21) */ void g_cclosure_user_marshal_VOID__STRING_UINT_DOUBLE (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_UINT_DOUBLE) (gpointer data1, gpointer arg1, guint arg2, gdouble arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__STRING_UINT_DOUBLE callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_UINT_DOUBLE) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_double (param_values + 3), data2); } /* VOID:STRING,UINT,POINTER (ags_marshallers.list:22) */ void g_cclosure_user_marshal_VOID__STRING_UINT_POINTER (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_UINT_POINTER) (gpointer data1, gpointer arg1, guint arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__STRING_UINT_POINTER callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_UINT_POINTER) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_pointer (param_values + 3), data2); } /* VOID:STRING,UINT,STRING,DOUBLE (ags_marshallers.list:23) */ void g_cclosure_user_marshal_VOID__STRING_UINT_STRING_DOUBLE (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_UINT_STRING_DOUBLE) (gpointer data1, gpointer arg1, guint arg2, gpointer arg3, gdouble arg4, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__STRING_UINT_STRING_DOUBLE callback; g_return_if_fail (n_param_values == 5); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_UINT_STRING_DOUBLE) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_string (param_values + 3), g_marshal_value_peek_double (param_values + 4), data2); } /* VOID:STRING,POINTER (ags_marshallers.list:24) */ void g_cclosure_user_marshal_VOID__STRING_POINTER (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_POINTER) (gpointer data1, gpointer arg1, gpointer arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__STRING_POINTER callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_POINTER) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), data2); } /* VOID:STRING,STRING,STRING (ags_marshallers.list:25) */ void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__STRING_STRING_STRING callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), data2); } /* VOID:POINTER,UINT (ags_marshallers.list:26) */ void g_cclosure_user_marshal_VOID__POINTER_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__POINTER_UINT) (gpointer data1, gpointer arg1, guint arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__POINTER_UINT callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__POINTER_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_pointer (param_values + 1), g_marshal_value_peek_uint (param_values + 2), data2); } /* VOID:POINTER,UINT,UINT (ags_marshallers.list:27) */ void g_cclosure_user_marshal_VOID__POINTER_UINT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__POINTER_UINT_UINT) (gpointer data1, gpointer arg1, guint arg2, guint arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__POINTER_UINT_UINT callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__POINTER_UINT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_pointer (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_uint (param_values + 3), data2); } /* VOID:POINTER,UINT,POINTER (ags_marshallers.list:28) */ void g_cclosure_user_marshal_VOID__POINTER_UINT_POINTER (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__POINTER_UINT_POINTER) (gpointer data1, gpointer arg1, guint arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__POINTER_UINT_POINTER callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__POINTER_UINT_POINTER) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_pointer (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_pointer (param_values + 3), data2); } /* VOID:POINTER,POINTER,UINT (ags_marshallers.list:29) */ void g_cclosure_user_marshal_VOID__POINTER_POINTER_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__POINTER_POINTER_UINT) (gpointer data1, gpointer arg1, gpointer arg2, guint arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__POINTER_POINTER_UINT callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__POINTER_POINTER_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_pointer (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), g_marshal_value_peek_uint (param_values + 3), data2); } /* VOID:POINTER,POINTER,POINTER (ags_marshallers.list:30) */ void g_cclosure_user_marshal_VOID__POINTER_POINTER_POINTER (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__POINTER_POINTER_POINTER) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__POINTER_POINTER_POINTER callback; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__POINTER_POINTER_POINTER) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_pointer (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), g_marshal_value_peek_pointer (param_values + 3), data2); } /* VOID:OBJECT,UINT (ags_marshallers.list:31) */ void g_cclosure_user_marshal_VOID__OBJECT_UINT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__OBJECT_UINT) (gpointer data1, gpointer arg1, guint arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__OBJECT_UINT callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__OBJECT_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_uint (param_values + 2), data2); } /* VOID:OBJECT,OBJECT (ags_marshallers.list:32) */ void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg1, gpointer arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__OBJECT_OBJECT callback; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_object (param_values + 2), data2); } /* VOID:OBJECT,OBJECT,OBJECT,INT,BOOLEAN (ags_marshallers.list:33) */ void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_INT_BOOLEAN (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_OBJECT_INT_BOOLEAN) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gint arg4, gboolean arg5, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__OBJECT_OBJECT_OBJECT_INT_BOOLEAN callback; g_return_if_fail (n_param_values == 6); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__OBJECT_OBJECT_OBJECT_INT_BOOLEAN) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_object (param_values + 2), g_marshal_value_peek_object (param_values + 3), g_marshal_value_peek_int (param_values + 4), g_marshal_value_peek_boolean (param_values + 5), data2); } /* VOID:OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,UINT,INT,BOOLEAN (ags_marshallers.list:34) */ void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_UINT_INT_BOOLEAN (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_UINT_INT_BOOLEAN) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer arg5, gpointer arg6, guint arg7, gint arg8, gboolean arg9, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_UINT_INT_BOOLEAN callback; g_return_if_fail (n_param_values == 10); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_UINT_INT_BOOLEAN) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_object (param_values + 2), g_marshal_value_peek_object (param_values + 3), g_marshal_value_peek_object (param_values + 4), g_marshal_value_peek_object (param_values + 5), g_marshal_value_peek_object (param_values + 6), g_marshal_value_peek_uint (param_values + 7), g_marshal_value_peek_int (param_values + 8), g_marshal_value_peek_boolean (param_values + 9), data2); } /* VOID:OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT,OBJECT (ags_marshallers.list:35) */ void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer arg5, gpointer arg6, gpointer arg7, gpointer arg8, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT callback; g_return_if_fail (n_param_values == 9); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_object (param_values + 2), g_marshal_value_peek_object (param_values + 3), g_marshal_value_peek_object (param_values + 4), g_marshal_value_peek_object (param_values + 5), g_marshal_value_peek_object (param_values + 6), g_marshal_value_peek_object (param_values + 7), g_marshal_value_peek_object (param_values + 8), data2); } /* ULONG:VOID (ags_marshallers.list:36) */ void g_cclosure_user_marshal_ULONG__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gulong (*GMarshalFunc_ULONG__VOID) (gpointer data1, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_ULONG__VOID callback; gulong v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 1); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_ULONG__VOID) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, data2); g_value_set_ulong (return_value, v_return); } /* INT:VOID (ags_marshallers.list:37) */ void g_cclosure_user_marshal_INT__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gint (*GMarshalFunc_INT__VOID) (gpointer data1, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_INT__VOID callback; gint v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 1); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_INT__VOID) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, data2); g_value_set_int (return_value, v_return); } /* UINT:VOID (ags_marshallers.list:38) */ void g_cclosure_user_marshal_UINT__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef guint (*GMarshalFunc_UINT__VOID) (gpointer data1, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_UINT__VOID callback; guint v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 1); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_UINT__VOID) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, data2); g_value_set_uint (return_value, v_return); } /* BOOLEAN:UINT,POINTER (ags_marshallers.list:39) */ void g_cclosure_user_marshal_BOOLEAN__UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gboolean (*GMarshalFunc_BOOLEAN__UINT_POINTER) (gpointer data1, guint arg1, gpointer arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_BOOLEAN__UINT_POINTER callback; gboolean v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_BOOLEAN__UINT_POINTER) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_uint (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), data2); g_value_set_boolean (return_value, v_return); } /* BOOLEAN:OBJECT,OBJECT (ags_marshallers.list:40) */ void g_cclosure_user_marshal_BOOLEAN__OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_OBJECT) (gpointer data1, gpointer arg1, gpointer arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_BOOLEAN__OBJECT_OBJECT callback; gboolean v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_BOOLEAN__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_object (param_values + 2), data2); g_value_set_boolean (return_value, v_return); } /* UINT:INT,UINT,POINTER (ags_marshallers.list:41) */ void g_cclosure_user_marshal_UINT__INT_UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef guint (*GMarshalFunc_UINT__INT_UINT_POINTER) (gpointer data1, gint arg1, guint arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_UINT__INT_UINT_POINTER callback; guint v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_UINT__INT_UINT_POINTER) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_int (param_values + 1), g_marshal_value_peek_uint (param_values + 2), g_marshal_value_peek_pointer (param_values + 3), data2); g_value_set_uint (return_value, v_return); } /* DOUBLE:DOUBLE,BOOLEAN (ags_marshallers.list:42) */ void g_cclosure_user_marshal_DOUBLE__DOUBLE_BOOLEAN (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gdouble (*GMarshalFunc_DOUBLE__DOUBLE_BOOLEAN) (gpointer data1, gdouble arg1, gboolean arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_DOUBLE__DOUBLE_BOOLEAN callback; gdouble v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_DOUBLE__DOUBLE_BOOLEAN) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_double (param_values + 1), g_marshal_value_peek_boolean (param_values + 2), data2); g_value_set_double (return_value, v_return); } /* STRING:STRING,STRING (ags_marshallers.list:43) */ void g_cclosure_user_marshal_STRING__STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gchar* (*GMarshalFunc_STRING__STRING_STRING) (gpointer data1, gpointer arg1, gpointer arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_STRING__STRING_STRING callback; gchar* v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_STRING__STRING_STRING) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), data2); g_value_take_string (return_value, v_return); } /* STRING:ULONG,STRING,STRING,STRING,STRING,UINT,POINTER (ags_marshallers.list:44) */ void g_cclosure_user_marshal_STRING__ULONG_STRING_STRING_STRING_STRING_UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gchar* (*GMarshalFunc_STRING__ULONG_STRING_STRING_STRING_STRING_UINT_POINTER) (gpointer data1, gulong arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer arg5, guint arg6, gpointer arg7, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_STRING__ULONG_STRING_STRING_STRING_STRING_UINT_POINTER callback; gchar* v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 8); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_STRING__ULONG_STRING_STRING_STRING_STRING_UINT_POINTER) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_ulong (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), g_marshal_value_peek_string (param_values + 4), g_marshal_value_peek_string (param_values + 5), g_marshal_value_peek_uint (param_values + 6), g_marshal_value_peek_pointer (param_values + 7), data2); g_value_take_string (return_value, v_return); } /* POINTER:VOID (ags_marshallers.list:45) */ void g_cclosure_user_marshal_POINTER__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__VOID) (gpointer data1, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__VOID callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 1); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__VOID) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, data2); g_value_set_pointer (return_value, v_return); } /* POINTER:UINT (ags_marshallers.list:46) */ void g_cclosure_user_marshal_POINTER__UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__UINT) (gpointer data1, guint arg1, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__UINT callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 2); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__UINT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_uint (param_values + 1), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:POINTER,UINT (ags_marshallers.list:47) */ void g_cclosure_user_marshal_POINTER__POINTER_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__POINTER_UINT) (gpointer data1, gpointer arg1, guint arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__POINTER_UINT callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__POINTER_UINT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_pointer (param_values + 1), g_marshal_value_peek_uint (param_values + 2), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:STRING,STRING (ags_marshallers.list:48) */ void g_cclosure_user_marshal_POINTER__STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__STRING_STRING) (gpointer data1, gpointer arg1, gpointer arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__STRING_STRING callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__STRING_STRING) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:STRING,STRING,STRING (ags_marshallers.list:49) */ void g_cclosure_user_marshal_POINTER__STRING_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__STRING_STRING_STRING) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__STRING_STRING_STRING callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:STRING,STRING,STRING,STRING (ags_marshallers.list:50) */ void g_cclosure_user_marshal_POINTER__STRING_STRING_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__STRING_STRING_STRING_STRING) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__STRING_STRING_STRING_STRING callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 5); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__STRING_STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), g_marshal_value_peek_string (param_values + 4), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:ULONG,POINTER,UINT (ags_marshallers.list:51) */ void g_cclosure_user_marshal_POINTER__ULONG_POINTER_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__ULONG_POINTER_UINT) (gpointer data1, gulong arg1, gpointer arg2, guint arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__ULONG_POINTER_UINT callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__ULONG_POINTER_UINT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_ulong (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), g_marshal_value_peek_uint (param_values + 3), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:OBJECT (ags_marshallers.list:52) */ void g_cclosure_user_marshal_POINTER__OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__OBJECT) (gpointer data1, gpointer arg1, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__OBJECT callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 2); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__OBJECT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_object (param_values + 1), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:OBJECT,OBJECT (ags_marshallers.list:53) */ void g_cclosure_user_marshal_POINTER__OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__OBJECT_OBJECT) (gpointer data1, gpointer arg1, gpointer arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__OBJECT_OBJECT callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_object (param_values + 2), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:OBJECT,STRING,STRING,STRING,POINTER (ags_marshallers.list:54) */ void g_cclosure_user_marshal_POINTER__OBJECT_STRING_STRING_STRING_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__OBJECT_STRING_STRING_STRING_POINTER) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer arg5, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__OBJECT_STRING_STRING_STRING_POINTER callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 6); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__OBJECT_STRING_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), g_marshal_value_peek_string (param_values + 4), g_marshal_value_peek_pointer (param_values + 5), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:OBJECT,STRING,STRING,STRING,STRING,POINTER (ags_marshallers.list:55) */ void g_cclosure_user_marshal_POINTER__OBJECT_STRING_STRING_STRING_STRING_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__OBJECT_STRING_STRING_STRING_STRING_POINTER) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer arg5, gpointer arg6, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__OBJECT_STRING_STRING_STRING_STRING_POINTER callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 7); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__OBJECT_STRING_STRING_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), g_marshal_value_peek_string (param_values + 4), g_marshal_value_peek_string (param_values + 5), g_marshal_value_peek_pointer (param_values + 6), data2); g_value_set_pointer (return_value, v_return); } /* POINTER:POINTER,STRING,STRING (ags_marshallers.list:56) */ void g_cclosure_user_marshal_POINTER__POINTER_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef gpointer (*GMarshalFunc_POINTER__POINTER_STRING_STRING) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_POINTER__POINTER_STRING_STRING callback; gpointer v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_POINTER__POINTER_STRING_STRING) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_pointer (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), data2); g_value_set_pointer (return_value, v_return); } /* OBJECT:VOID (ags_marshallers.list:57) */ void g_cclosure_user_marshal_OBJECT__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef GObject* (*GMarshalFunc_OBJECT__VOID) (gpointer data1, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_OBJECT__VOID callback; GObject* v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 1); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_OBJECT__VOID) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, data2); g_value_take_object (return_value, v_return); } /* OBJECT:OBJECT (ags_marshallers.list:58) */ void g_cclosure_user_marshal_OBJECT__OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef GObject* (*GMarshalFunc_OBJECT__OBJECT) (gpointer data1, gpointer arg1, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_OBJECT__OBJECT callback; GObject* v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 2); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_OBJECT__OBJECT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_object (param_values + 1), data2); g_value_take_object (return_value, v_return); } /* OBJECT:STRING,STRING,STRING (ags_marshallers.list:59) */ void g_cclosure_user_marshal_OBJECT__STRING_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef GObject* (*GMarshalFunc_OBJECT__STRING_STRING_STRING) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_OBJECT__STRING_STRING_STRING callback; GObject* v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_OBJECT__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), data2); g_value_take_object (return_value, v_return); } /* OBJECT:OBJECT,POINTER,POINTER (ags_marshallers.list:60) */ void g_cclosure_user_marshal_OBJECT__OBJECT_POINTER_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef GObject* (*GMarshalFunc_OBJECT__OBJECT_POINTER_POINTER) (gpointer data1, gpointer arg1, gpointer arg2, gpointer arg3, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_OBJECT__OBJECT_POINTER_POINTER callback; GObject* v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_OBJECT__OBJECT_POINTER_POINTER) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_pointer (param_values + 2), g_marshal_value_peek_pointer (param_values + 3), data2); g_value_take_object (return_value, v_return); } /* OBJECT:OBJECT,OBJECT (ags_marshallers.list:61) */ void g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef GObject* (*GMarshalFunc_OBJECT__OBJECT_OBJECT) (gpointer data1, gpointer arg1, gpointer arg2, gpointer data2); GCClosure *cc = (GCClosure *) closure; gpointer data1, data2; GMarshalFunc_OBJECT__OBJECT_OBJECT callback; GObject* v_return; g_return_if_fail (return_value != NULL); g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_OBJECT__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); v_return = callback (data1, g_marshal_value_peek_object (param_values + 1), g_marshal_value_peek_object (param_values + 2), data2); g_value_take_object (return_value, v_return); } gsequencer-1.4.24/ags/object/ags_concurrent_tree.h0000644000175000017500000000527613246707333017132 00000000000000/* 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 . */ #ifndef __AGS_CONCURRENT_TREE_H__ #define __AGS_CONCURRENT_TREE_H__ #include #include #include #define AGS_TYPE_CONCURRENT_TREE (ags_concurrent_tree_get_type()) #define AGS_CONCURRENT_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONCURRENT_TREE, AgsConcurrentTree)) #define AGS_CONCURRENT_TREE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_CONCURRENT_TREE, AgsConcurrentTreeInterface)) #define AGS_IS_CONCURRENT_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CONCURRENT_TREE)) #define AGS_IS_CONCURRENT_TREE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_CONCURRENT_TREE)) #define AGS_CONCURRENT_TREE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_CONCURRENT_TREE, AgsConcurrentTreeInterface)) typedef struct _AgsConcurrentTree AgsConcurrentTree; typedef struct _AgsConcurrentTreeInterface AgsConcurrentTreeInterface; struct _AgsConcurrentTreeInterface { GTypeInterface ginterface; void (*set_parent_locked)(AgsConcurrentTree *concurrent_tree, gboolean parent_locked); gboolean (*get_parent_locked)(AgsConcurrentTree *concurrent_tree); pthread_mutex_t* (*get_lock)(AgsConcurrentTree *concurrent_tree); pthread_mutex_t* (*get_parent_lock)(AgsConcurrentTree *concurrent_tree); }; GType ags_concurrent_tree_get_type(); void ags_concurrent_tree_set_parent_locked(AgsConcurrentTree *concurrent_tree, gboolean parent_locked); gboolean ags_concurrent_tree_get_parent_locked(AgsConcurrentTree *concurrent_tree); pthread_mutex_t* ags_concurrent_tree_get_lock(AgsConcurrentTree *concurrent_tree); pthread_mutex_t* ags_concurrent_tree_get_parent_lock(AgsConcurrentTree *concurrent_tree); gboolean ags_concurrent_tree_lock_context(AgsConcurrentTree *concurrent_tree); void ags_concurrent_tree_unlock_context(AgsConcurrentTree *concurrent_tree); #endif /*__AGS_CONCURRENT_TREE_H__*/ gsequencer-1.4.24/ags/util/0000755000175000017500000000000013256233674012506 500000000000000gsequencer-1.4.24/ags/util/ags_id_generator.h0000644000175000017500000000163613256163135016073 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ID_GENERATOR_H__ #define __AGS_ID_GENERATOR_H__ #include gchar* ags_id_generator_create_uuid(); #endif /*__AGS_ID_GENERATOR_H__*/ gsequencer-1.4.24/ags/util/ags_destroy_util.h0000644000175000017500000000171313246707333016156 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_DESTROY_UTIL_H__ #define __AGS_DESTROY_UTIL_H__ #include #include void ags_destroy_util_dispose_and_unref(GObject *gobject); #endif /*__AGS_DESTROY_UTIL_H__*/ gsequencer-1.4.24/ags/util/ags_list_util.h0000644000175000017500000000177313246707333015446 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LIST_UTIL_H__ #define __AGS_LIST_UTIL_H__ #include #include GList* ags_list_util_find_type(GList *list, GType gtype); GList* ags_list_util_copy_and_ref(GList *list); #endif /*__AGS_LIST_UTIL_H__*/ gsequencer-1.4.24/ags/util/ags_id_generator.c0000644000175000017500000000325513256163135016065 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include /** * SECTION:ags_id_generator * @short_description: UUID util functions * @title: AgsIdGenerator * @section_id: * @include: ags/util/ags_id_generator.h * * Functions related to UUID. */ #define AGS_ID_GENERATOR_DEFAULT_UUID_LENGTH (36) /** * ags_id_generator_create_uuid: * * Creates a new string containing an UUID. * * Returns: the UUID as string * * Since: 1.0.0 */ gchar* ags_id_generator_create_uuid() { uuid_t out; gchar *uuid_str; /* make sure uuid is really unique */ //FIXME:JK: uncomment me // while(uuid_generate_time_safe(out) != 0); uuid_generate_time_safe(out); /* create a string representation */ uuid_str = (gchar *) malloc((AGS_ID_GENERATOR_DEFAULT_UUID_LENGTH + 1) * sizeof(gchar)); uuid_unparse(out, uuid_str); uuid_str[AGS_ID_GENERATOR_DEFAULT_UUID_LENGTH] = '\0'; return(uuid_str); } gsequencer-1.4.24/ags/util/ags_destroy_util.c0000644000175000017500000000246613247044247016156 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include /** * SECTION:ags_destroy_util * @short_description: destroy util * @title: AgsDestroyUtil * @section_id: * @include: ags/util/ags_destroy_util.h * * Destroying items utility. */ /** * ags_destroy_util_dispose_and_unref: * @gobject: the #GObject to destroy * * Run dispose and unref @gobject. * * Since: 1.0.0 */ void ags_destroy_util_dispose_and_unref(GObject *gobject) { if(gobject == NULL || !G_IS_OBJECT(gobject)){ return; } g_object_run_dispose(gobject); g_object_unref(gobject); } gsequencer-1.4.24/ags/util/ags_list_util.c0000644000175000017500000000354113246707333015434 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include /** * SECTION:ags_list_util * @short_description: list util * @title: AgsListUtil * @section_id: * @include: ags/util/ags_list_util.h * * List utility. */ /** * ags_list_util_find_type: * @list: the #GList-struct * @gtype: the GType to find * * Find @gtype within @list. * * Returns: the next matching #GList-struct * * Since: 1.0.0 */ GList* ags_list_util_find_type(GList *list, GType gtype) { if(gtype == G_TYPE_NONE){ return(NULL); } while(list != NULL){ if(g_type_is_a(G_OBJECT_TYPE(G_OBJECT(list->data)), gtype)){ return(list); } list = list->next; } return(NULL); } /** * ags_list_util_copy_and_ref: * @list: the #GList-struct * * Copy @list and increase ref count on entries. * * Returns: the start of the copied #GList-struct * * Since: 1.0.0 */ GList* ags_list_util_copy_and_ref(GList *list) { GList *list_start; list = list_start = g_list_copy(list); while(list != NULL){ g_object_ref(G_OBJECT(list->data)); list = list->next; } return(list_start); } gsequencer-1.4.24/ags/libags.h0000644000175000017500000001144213247044247013061 00000000000000/* 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 . */ #ifndef __LIBAGS_H__ #define __LIBAGS_H__ #include #include #include /* library */ #include #include #include #include #include #include #include #include #include #include #include /* object */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* file */ #include #include #include #include #include #include #include /* thread */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* thread file */ #include /* server */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif /*__LIBAGS_H__*/ gsequencer-1.4.24/ags/gsequencer_main.c0000644000175000017500000002272113256163135014760 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gsequencer_main.h" #include "config.h" #ifdef AGS_MAC_BUNDLE void premain() __attribute__ ((constructor)); #endif void* ags_setup_thread(void *ptr); void ags_setup(int argc, char **argv); extern AgsApplicationContext *ags_application_context; gchar *base_dir; #ifdef AGS_MAC_BUNDLE void premain() { gchar path[PATH_MAX]; uint32_t size = sizeof(path); if(_NSGetExecutablePath(path, &size) == 0){ gchar *ld_library_path; gchar *gdk_pixbuf_module_file; gchar *frameworks_dir; gchar *data_dir; gchar *plugin_dir; gchar *str; base_dir = strndup(path, rindex(path, '/') - path); printf("base dir %s\n", base_dir); sprintf(path, "%s/../Frameworks", base_dir); gdk_pixbuf_module_file = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "GDK_PIXBUF_MODULE_FILE=%s/gdk-pixbuf-2.0/2.10.0/loaders.cache", gdk_pixbuf_module_file); putenv(str); ld_library_path = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "DT_RUNPATH=%s/gdk-pixbuf-2.0/2.10.0/loaders", ld_library_path); putenv(str); frameworks_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "DYLD_FALLBACK_LIBRARY_PATH=%s", frameworks_dir); putenv(str); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "GDK_PIXBUF_MODULEDIR=%s", frameworks_dir); putenv(str); printf(".. %s", str); sprintf(path, "%s/../Resources", base_dir); data_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "GSEQUENCER_DATA_DIR=%s", data_dir); putenv(str); sprintf(path, "%s/../Resources", base_dir); data_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "AGS_RC_FILENAME=%s/ags.rc", data_dir); putenv(str); sprintf(path, "%s/../Resources", base_dir); data_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "AGS_ANIMATION_FILENAME=%s/ags_supermoon-800x450.png", data_dir); putenv(str); sprintf(path, "%s/../Resources", base_dir); data_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "AGS_LOGO_FILENAME=%s/ags.png", data_dir); putenv(str); sprintf(path, "%s/../Resources", base_dir); data_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "AGS_LICENSE_FILENAME=%s/GPL-3", data_dir); putenv(str); sprintf(path, "%s/../Plugins", base_dir); plugin_dir = realpath(path, NULL); str = malloc(PATH_MAX * sizeof(gchar)); sprintf(str, "GSEQUENCER_PLUGIN_DIR=%s", plugin_dir); putenv(str); }else{ base_dir = NULL; } } #endif void* ags_setup_thread(void *ptr) { AgsXorgApplicationContext *xorg_application_context; xorg_application_context = (AgsXorgApplicationContext *) ptr; while(g_atomic_int_get(&(xorg_application_context->gui_ready)) == 0){ usleep(500000); } // pthread_mutex_lock(ags_gui_thread_get_dispatch_mutex()); ags_application_context_setup(xorg_application_context); // pthread_mutex_unlock(ags_gui_thread_get_dispatch_mutex()); pthread_exit(NULL); } void ags_setup(int argc, char **argv) { AgsApplicationContext *application_context; AgsLog *log; pthread_t thread; /* application context */ application_context = ags_application_context = (AgsApplicationContext *) ags_xorg_application_context_new(); g_object_ref(application_context); application_context->argc = argc; application_context->argv = argv; log = ags_log_get_instance(); ags_log_add_message(log, "Welcome to Advanced Gtk+ Sequencer"); /* application context */ pthread_create(&thread, NULL, ags_setup_thread, application_context); ags_application_context_prepare(application_context); } int main(int argc, char **argv) { AgsConfig *config; gchar *filename; gboolean single_thread_enabled; gboolean builtin_theme_disabled; guint i; #ifdef AGS_WITH_RT struct sched_param param; struct rlimit rl; #endif struct passwd *pw; gchar *wdir, *config_file; gchar *rc_filename; uid_t uid; int result; const rlim_t kStackSize = 64L * 1024L * 1024L; // min stack size = 64 Mb setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); single_thread_enabled = FALSE; builtin_theme_disabled = FALSE; // mtrace(); #ifdef AGS_WITH_RT result = getrlimit(RLIMIT_STACK, &rl); /* set stack size 64M */ if(result == 0){ if(rl.rlim_cur < kStackSize){ rl.rlim_cur = kStackSize; result = setrlimit(RLIMIT_STACK, &rl); if(result != 0){ //TODO:JK } } } param.sched_priority = GSEQUENCER_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } #endif /* parse command line parameter */ filename = NULL; for(i = 0; i < argc; i++){ if(!strncmp(argv[i], "--help", 7)){ printf("GSequencer is an audio sequencer and notation editor\n\n"); printf("Usage:\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\n", "Report bugs to \n", "--filename file open file", "--single-thread run in single thread mode", "--no-builtin-theme disable built-in theme", "--help display this help and exit", "--version output version information and exit"); exit(0); }else if(!strncmp(argv[i], "--version", 10)){ printf("GSequencer %s\n\n", AGS_VERSION); printf("%s\n%s\n%s\n\n", "Copyright (C) 2005-2017 Joël Krähemann", "This is free software; see the source for copying conditions. There is NO", "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); printf("Written by Joël Krähemann\n"); exit(0); }else if(!strncmp(argv[i], "--single-thread", 16)){ single_thread_enabled = TRUE; }else if(!strncmp(argv[i], "--no-builtin-theme", 19)){ builtin_theme_disabled = TRUE; }else if(!strncmp(argv[i], "--filename", 11)){ filename = argv[i + 1]; i++; } } uid = getuid(); pw = getpwuid(uid); /* parse rc file */ if(!builtin_theme_disabled){ rc_filename = g_strdup_printf("%s/%s/ags.rc", pw->pw_dir, AGS_DEFAULT_DIRECTORY); if(!g_file_test(rc_filename, G_FILE_TEST_IS_REGULAR)){ g_free(rc_filename); #ifdef AGS_RC_FILENAME rc_filename = g_strdup(AGS_RC_FILENAME); #else if((rc_filename = getenv("AGS_RC_FILENAME")) == NULL){ rc_filename = g_strdup_printf("%s%s", DESTDIR, "/gsequencer/styles/ags.rc"); }else{ rc_filename = g_strdup(rc_filename); } #endif } gtk_rc_parse(rc_filename); g_free(rc_filename); } /**/ LIBXML_TEST_VERSION; //ao_initialize(); // gdk_threads_enter(); // g_thread_init(NULL); ags_gui_init(&argc, &argv); gtk_init(&argc, &argv); ags_window_get_type(); if(!builtin_theme_disabled){ g_object_set(gtk_settings_get_default(), "gtk-theme-name", "Raleigh", NULL); g_signal_handlers_block_matched(gtk_settings_get_default(), G_SIGNAL_MATCH_DETAIL, g_signal_lookup("set-property", GTK_TYPE_SETTINGS), g_quark_from_string("gtk-theme-name"), NULL, NULL, NULL); } #ifdef AGS_WITH_LIBINSTPATCH ipatch_init(); #endif #if 0 g_log_set_fatal_mask("GLib-GObject", // "Gtk" , // G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); // G_LOG_LEVEL_WARNING g_log_set_fatal_mask("Gtk", // "Gtk" , // G_LOG_LEVEL_CRITICAL); // G_LOG_LEVEL_WARNING #endif /* setup */ wdir = g_strdup_printf("%s/%s", pw->pw_dir, AGS_DEFAULT_DIRECTORY); config_file = g_strdup_printf("%s/%s", wdir, AGS_DEFAULT_CONFIG); config = ags_config_get_instance(); ags_config_load_from_file(config, config_file); g_free(wdir); g_free(config_file); ags_setup(argc, argv); // muntrace(); return(0); } gsequencer-1.4.24/ags/audio/0000755000175000017500000000000013256233674012632 500000000000000gsequencer-1.4.24/ags/audio/ags_recall_recycling.c0000644000175000017500000010514313247044247017051 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_recycling_class_init(AgsRecallRecyclingClass *recall_recycling); void ags_recall_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_recall_recycling_init(AgsRecallRecycling *recall_recycling); void ags_recall_recycling_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_recycling_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_recycling_connect(AgsConnectable *connectable); void ags_recall_recycling_disconnect(AgsConnectable *connectable); void ags_recall_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_recycling_dispose(GObject *gobject); void ags_recall_recycling_finalize(GObject *gobject); AgsRecall* ags_recall_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_recall_recycling_source_add_audio_signal_callback(AgsRecycling *source, AgsAudioSignal *audio_signal, AgsRecallRecycling *recall_recycling); void ags_recall_recycling_source_remove_audio_signal_callback(AgsRecycling *source, AgsAudioSignal *audio_signal, AgsRecallRecycling *recall_recycling); void ags_recall_recycling_destination_add_audio_signal_callback(AgsRecycling *destination, AgsAudioSignal *audio_signal, AgsRecallRecycling *recall_recycling); void ags_recall_recycling_destination_remove_audio_signal_callback(AgsRecycling *destination, AgsAudioSignal *audio_signal, AgsRecallRecycling *recall_recycling); /** * SECTION:ags_recall_recycling * @short_description: recycling context of recall * @title: AgsRecallRecycling * @section_id: * @include: ags/audio/ags_recall_recycling.h * * #AgsRecallRecycling acts as recycling recall. */ enum{ PROP_0, PROP_AUDIO_CHANNEL, PROP_DESTINATION, PROP_SOURCE, PROP_CHILD_DESTINATION, PROP_CHILD_SOURCE, }; static gpointer ags_recall_recycling_parent_class = NULL; static AgsConnectableInterface* ags_recall_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_recall_recycling_parent_dynamic_connectable_interface; GType ags_recall_recycling_get_type() { static GType ags_type_recall_recycling = 0; if(!ags_type_recall_recycling){ static const GTypeInfo ags_recall_recycling_info = { sizeof (AgsRecallRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_recycling = g_type_register_static(AGS_TYPE_RECALL, "AgsRecallRecycling", &ags_recall_recycling_info, 0); g_type_add_interface_static(ags_type_recall_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_recall_recycling); } void ags_recall_recycling_class_init(AgsRecallRecyclingClass *recall_recycling) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_recycling_parent_class = g_type_class_peek_parent(recall_recycling); /* GObjectClass */ gobject = (GObjectClass *) recall_recycling; gobject->set_property = ags_recall_recycling_set_property; gobject->get_property = ags_recall_recycling_get_property; gobject->dispose = ags_recall_recycling_dispose; gobject->finalize = ags_recall_recycling_finalize; /* properties */ /** * AgsRecallRecycling:audio-channel: * * The assigned destination recycling. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("assigned audio channel"), i18n_pspec("The audio channel this recall does output to"), 0, 65536, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsRecallRecycling:destination: * * The assigned destination recycling. * * Since: 1.0.0 */ param_spec = g_param_spec_object("destination", i18n_pspec("AgsRecycling destination of this recall"), i18n_pspec("The AgsRecycling destination of this recall"), AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DESTINATION, param_spec); /** * AgsRecallRecycling:destination: * * The assigned source recycling. * * Since: 1.0.0 */ param_spec = g_param_spec_object("source", i18n_pspec("AgsRecycling source of this recall"), i18n_pspec("The AgsRecycling source of this recall"), AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOURCE, param_spec); /** * AgsRecallRecycling:child-destination: * * The assigned destination audio signal. * * Since: 1.0.0 */ param_spec = g_param_spec_object("child-destination", i18n_pspec("AgsAudioSignal of this recall"), i18n_pspec("The destination AgsAudioSignal child recall needs"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHILD_DESTINATION, param_spec); /** * AgsRecallRecycling:child-source: * * The assigned source audio signal. * * Since: 1.0.0 */ param_spec = g_param_spec_object("child-source", i18n_pspec("AgsAudioSignal of this recall"), i18n_pspec("The source AgsAudioSignal child recall needs"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHILD_SOURCE, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) recall_recycling; recall->duplicate = ags_recall_recycling_duplicate; /* AgsRecallRecyclingClass */ } void ags_recall_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_recall_recycling_connectable_parent_interface; ags_recall_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_recycling_connect; connectable->disconnect = ags_recall_recycling_disconnect; } void ags_recall_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_recall_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_recall_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_recall_recycling_disconnect_dynamic; } void ags_recall_recycling_init(AgsRecallRecycling *recall_recycling) { recall_recycling->flags = (AGS_RECALL_RECYCLING_MAP_CHILD_DESTINATION | AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE); recall_recycling->audio_channel = 0; recall_recycling->destination = NULL; recall_recycling->source = NULL; recall_recycling->child_destination = NULL; recall_recycling->child_source = NULL; } void ags_recall_recycling_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallRecycling *recall_recycling; recall_recycling = AGS_RECALL_RECYCLING(gobject); switch(prop_id){ case PROP_AUDIO_CHANNEL: { recall_recycling->audio_channel = g_value_get_uint(value); } break; case PROP_DESTINATION: { AgsRecycling *destination; destination = (AgsRecycling *) g_value_get_object(value); if(recall_recycling->destination == destination){ return; } if(recall_recycling->destination != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_recycling)->flags)) == 0){ gobject = G_OBJECT(recall_recycling->destination); if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(recall_recycling)->flags)) != 0){ // g_signal_handler_disconnect(gobject, recall_recycling->destination_add_audio_signal_handler); // g_signal_handler_disconnect(gobject, recall_recycling->destination_remove_audio_signal_handler); } } g_object_unref(G_OBJECT(recall_recycling->destination)); } if(destination != NULL){ g_object_ref(G_OBJECT(destination)); } if((AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_recycling)->flags)) == 0){ gobject = G_OBJECT(destination); if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(recall_recycling)->flags)) != 0){ // recall_recycling->destination_add_audio_signal_handler = // g_signal_connect_after(gobject, "add_audio_signal", // G_CALLBACK(ags_recall_recycling_destination_add_audio_signal_callback), recall_recycling); // recall_recycling->destination_remove_audio_signal_handler = // g_signal_connect(gobject, "remove_audio_signal", // G_CALLBACK(ags_recall_recycling_destination_remove_audio_signal_callback), recall_recycling); } } recall_recycling->destination = destination; } break; case PROP_SOURCE: { AgsRecycling *source; source = (AgsRecycling *) g_value_get_object(value); if(recall_recycling->source == source){ return; } if(recall_recycling->source != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_recycling)->flags)) == 0){ gobject = G_OBJECT(recall_recycling->source); if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(recall_recycling)->flags)) != 0){ g_signal_handler_disconnect(gobject, recall_recycling->source_add_audio_signal_handler); g_signal_handler_disconnect(gobject, recall_recycling->source_remove_audio_signal_handler); } } g_object_unref(G_OBJECT(recall_recycling->source)); } if(source != NULL){ g_object_ref(G_OBJECT(source)); } recall_recycling->source = source; if(source != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_recycling)->flags)) == 0){ gobject = G_OBJECT(source); if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(recall_recycling)->flags)) != 0){ recall_recycling->source_add_audio_signal_handler = g_signal_connect_after(gobject, "add_audio_signal", G_CALLBACK(ags_recall_recycling_source_add_audio_signal_callback), recall_recycling); recall_recycling->source_remove_audio_signal_handler = g_signal_connect(gobject, "remove_audio_signal", G_CALLBACK(ags_recall_recycling_source_remove_audio_signal_callback), recall_recycling); } } } } break; case PROP_CHILD_DESTINATION: { AgsAudioSignal *child_destination; child_destination = (AgsAudioSignal *) g_value_get_object(value); if(recall_recycling->child_destination == child_destination){ return; } if(recall_recycling->child_destination != NULL){ g_object_unref(G_OBJECT(recall_recycling->child_destination)); } if(child_destination != NULL){ g_object_ref(G_OBJECT(child_destination)); } recall_recycling->child_destination = child_destination; } break; case PROP_CHILD_SOURCE: { AgsAudioSignal *child_source; child_source = (AgsAudioSignal *) g_value_get_object(value); if(g_list_find(recall_recycling->child_source, child_source) != NULL){ return; } if(child_source != NULL){ g_object_ref(G_OBJECT(child_source)); recall_recycling->child_source = g_list_prepend(recall_recycling->child_source, child_source); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_recycling_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallRecycling *recall_recycling; recall_recycling = AGS_RECALL_RECYCLING(gobject); switch(prop_id){ case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, recall_recycling->audio_channel); } break; case PROP_DESTINATION: { g_value_set_object(value, recall_recycling->destination); } break; case PROP_SOURCE: { g_value_set_object(value, recall_recycling->source); } break; case PROP_CHILD_DESTINATION: { g_value_set_object(value, recall_recycling->child_destination); } break; }; } void ags_recall_recycling_dispose(GObject *gobject) { AgsRecallRecycling *recall_recycling; recall_recycling = AGS_RECALL_RECYCLING(gobject); /* destination */ if(recall_recycling->destination != NULL){ g_object_unref(G_OBJECT(recall_recycling->destination)); recall_recycling->destination = NULL; } /* source */ if(recall_recycling->source != NULL){ g_object_unref(G_OBJECT(recall_recycling->source)); recall_recycling->source = NULL; } /* child destination */ if(recall_recycling->child_destination != NULL){ g_object_unref(G_OBJECT(recall_recycling->child_destination)); recall_recycling->child_destination = NULL; } /* child source */ if(recall_recycling->child_source != NULL){ g_list_free_full(recall_recycling->child_source, g_object_unref); recall_recycling->child_source = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_recycling_parent_class)->dispose(gobject); } void ags_recall_recycling_finalize(GObject *gobject) { AgsRecallRecycling *recall_recycling; recall_recycling = AGS_RECALL_RECYCLING(gobject); /* destination */ if(recall_recycling->destination != NULL){ g_object_unref(G_OBJECT(recall_recycling->destination)); } /* source */ if(recall_recycling->source != NULL){ g_object_unref(G_OBJECT(recall_recycling->source)); } /* child destination */ if(recall_recycling->child_destination != NULL){ g_object_unref(G_OBJECT(recall_recycling->child_destination)); } /* child source */ if(recall_recycling->child_source != NULL){ g_list_free_full(recall_recycling->child_source, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_recall_recycling_parent_class)->finalize(gobject); } void ags_recall_recycling_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_recall_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_recall_recycling_disconnect(AgsConnectable *connectable) { ags_recall_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_recall_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRecallRecycling *recall_recycling; GObject *gobject; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } ags_recall_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* AgsRecallRecycling */ recall_recycling = AGS_RECALL_RECYCLING(dynamic_connectable); /* destination */ if(recall_recycling->destination != NULL){ gobject = G_OBJECT(recall_recycling->destination); // recall_recycling->destination_add_audio_signal_handler = // g_signal_connect_after(gobject, "add_audio_signal", // G_CALLBACK(ags_recall_recycling_destination_add_audio_signal_callback), recall_recycling); // recall_recycling->destination_remove_audio_signal_handler = // g_signal_connect(gobject, "remove_audio_signal", // G_CALLBACK(ags_recall_recycling_destination_remove_audio_signal_callback), recall_recycling); } /* source */ gobject = G_OBJECT(recall_recycling->source); recall_recycling->source_add_audio_signal_handler = g_signal_connect_after(gobject, "add_audio_signal", G_CALLBACK(ags_recall_recycling_source_add_audio_signal_callback), recall_recycling); recall_recycling->source_remove_audio_signal_handler = g_signal_connect(gobject, "remove_audio_signal", G_CALLBACK(ags_recall_recycling_source_remove_audio_signal_callback), recall_recycling); } void ags_recall_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRecallRecycling *recall_recycling; GObject *gobject; recall_recycling = AGS_RECALL_RECYCLING(dynamic_connectable); if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(recall_recycling)->flags)) == 0){ return; } /* destination */ if(recall_recycling->destination != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_recycling)->flags)) == 0){ gobject = G_OBJECT(recall_recycling->destination); // g_signal_handler_disconnect(gobject, recall_recycling->destination_add_audio_signal_handler); // g_signal_handler_disconnect(gobject, recall_recycling->destination_remove_audio_signal_handler); } /* source */ if(recall_recycling->source != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_recycling)->flags)) == 0){ gobject = G_OBJECT(recall_recycling->source); g_signal_handler_disconnect(gobject, recall_recycling->source_add_audio_signal_handler); g_signal_handler_disconnect(gobject, recall_recycling->source_remove_audio_signal_handler); } /* call parent */ ags_recall_recycling_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } AgsRecall* ags_recall_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecallRecycling *recall_recycling, *copy; GList *list; recall_recycling = AGS_RECALL_RECYCLING(recall); parameter = ags_parameter_grow(G_OBJECT_TYPE(recall), parameter, n_params, "soundcard", recall->soundcard, "audio_channel", recall_recycling->audio_channel, "destination", recall_recycling->destination, "source", recall_recycling->source, NULL); copy = AGS_RECALL_RECYCLING(AGS_RECALL_CLASS(ags_recall_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } GList* ags_recall_recycling_get_child_source(AgsRecallRecycling *recall_recycling) { GList *child_source; child_source = g_list_copy(recall_recycling->child_source); return(child_source); } void ags_recall_recycling_source_add_audio_signal_callback(AgsRecycling *source, AgsAudioSignal *audio_signal, AgsRecallRecycling *recall_recycling) { AgsChannel *channel; AgsRecall *recall; AgsRecallAudioSignal *recall_audio_signal; AgsRecallID *recall_id; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(source == NULL || recall_recycling == NULL || audio_signal == NULL){ return; } recall = AGS_RECALL(recall_recycling); //FIXME:JK: work-around for crashing while resetting link if(recall->parent == NULL){ return; } channel = AGS_RECALL_CHANNEL_RUN(recall->parent)->source; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) != 0 || (AGS_AUDIO_SIGNAL_RT_TEMPLATE & (audio_signal->flags)) != 0 || audio_signal->recall_id == NULL || recall->recall_id == NULL){ pthread_mutex_unlock(mutex); return; } recall_id = (AgsRecallID *) audio_signal->recall_id; if(recall_id->recycling_context == NULL){ pthread_mutex_unlock(mutex); return; } if(recall_id->recycling_context != recall->recall_id->recycling_context){ if(AGS_IS_INPUT(channel)){ if(channel->link != NULL){ if(recall_id->recycling_context->parent != NULL){ if(recall_id->recycling_context->parent != recall->recall_id->recycling_context){ pthread_mutex_unlock(mutex); return; } }else{ pthread_mutex_unlock(mutex); return; } }else{ pthread_mutex_unlock(mutex); return; } }else{ pthread_mutex_unlock(mutex); return; } } if(AGS_RECALL_CHANNEL_RUN(recall->parent)->destination != NULL && ags_recall_id_find_recycling_context(AGS_RECALL_CHANNEL_RUN(recall->parent)->destination->recall_id, recall_id->recycling_context->parent) == NULL){ if(AGS_RECALL_CHANNEL_RUN(recall->parent)->source->link != NULL){ if(ags_recall_id_find_recycling_context(AGS_RECALL_CHANNEL_RUN(recall->parent)->destination->recall_id, recall_id->recycling_context->parent->parent) == NULL){ pthread_mutex_unlock(mutex); return; } }else{ pthread_mutex_unlock(mutex); return; } } if(((AGS_RECALL_ID_PLAYBACK & (recall_id->flags)) != 0 && (AGS_RECALL_PLAYBACK & (recall->flags)) == 0) || ((AGS_RECALL_ID_SEQUENCER & (recall_id->flags)) != 0 && (AGS_RECALL_SEQUENCER & (recall->flags)) == 0) || ((AGS_RECALL_ID_NOTATION & (recall_id->flags)) != 0 && (AGS_RECALL_NOTATION & (recall->flags)) == 0)){ pthread_mutex_unlock(mutex); return; } #ifdef AGS_DEBUG g_message("add %s:%x -> %x @ %x", G_OBJECT_TYPE_NAME(recall), recall->recall_id, audio_signal->recall_id, recall->recall_id->recycling_context); g_message("ags_recall_recycling_source_add_audio_signal_callback %s[%llx]", G_OBJECT_TYPE_NAME(recall_recycling), (long long unsigned int) recall_recycling); g_message("ags_recall_recycling_source_add_audio_signal - channel: %s[%u]", G_OBJECT_TYPE_NAME(recall_recycling), AGS_CHANNEL(recall_recycling->source->channel)->line); if(!AGS_IS_INPUT(source->channel)){ g_message("ags_recall_recycling_source_add_audio_signal_callback[%s]", G_OBJECT_TYPE_NAME(recall)); } #endif if((AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE & (recall_recycling->flags)) != 0){ // g_object_set(G_OBJECT(recall_recycling), // "child-source", audio_signal, // NULL); } pthread_mutex_unlock(mutex); if(AGS_RECALL(recall_recycling)->child_type != G_TYPE_NONE){ recall_audio_signal = g_object_new(AGS_RECALL(recall_recycling)->child_type, "soundcard", recall->soundcard, "recall_id", audio_signal->recall_id, "audio_channel", recall_recycling->audio_channel, // "destination", ((AGS_RECALL(recall_recycling)->child_type == AGS_TYPE_COPY_AUDIO_SIGNAL) ? recall_recycling->child_destination: NULL), "source", audio_signal, NULL); #ifdef AGS_DEBUG g_message("%s", G_OBJECT_TYPE_NAME(recall_audio_signal)); #endif ags_recall_add_child(AGS_RECALL(recall_recycling), AGS_RECALL(recall_audio_signal)); } } void ags_recall_recycling_source_remove_audio_signal_callback(AgsRecycling *source, AgsAudioSignal *audio_signal, AgsRecallRecycling *recall_recycling) { AgsChannel *channel; AgsRecall *recall; AgsCancelRecall *cancel_recall; AgsRecallAudioSignal *recall_audio_signal; AgsMutexManager *mutex_manager; AgsConfig *config; GList *list, *list_start; gchar *str; gboolean performance_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(source == NULL || recall_recycling == NULL || audio_signal == NULL){ return; } recall = AGS_RECALL(recall_recycling); //FIXME:JK: work-around for crashing while resetting link if(recall->parent == NULL){ return; } channel = AGS_RECALL_CHANNEL_RUN(recall->parent)->source; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) != 0 || (AGS_AUDIO_SIGNAL_RT_TEMPLATE & (audio_signal->flags)) != 0 || audio_signal->recall_id == NULL || recall->recall_id == NULL){ pthread_mutex_unlock(mutex); return; } if(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context != recall->recall_id->recycling_context){ if(AGS_IS_INPUT(channel)){ if(channel->link != NULL){ if(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context->parent != NULL){ if(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context->parent != recall->recall_id->recycling_context){ pthread_mutex_unlock(mutex); return; } }else{ if(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context != recall->recall_id->recycling_context){ pthread_mutex_unlock(mutex); return; } } }else{ pthread_mutex_unlock(mutex); return; } }else{ pthread_mutex_unlock(mutex); return; } } if(AGS_RECALL_CHANNEL_RUN(recall->parent)->destination != NULL && ags_recall_id_find_recycling_context(AGS_RECALL_CHANNEL_RUN(recall->parent)->destination->recall_id, recall->recall_id->recycling_context->parent) == NULL){ pthread_mutex_unlock(mutex); return; } #ifdef AGS_DEBUG g_message("ags_recall_recycling_source_remove_audio_signal - channel: %s[%u]\n", G_OBJECT_TYPE_NAME(recall_recycling), AGS_CHANNEL(recall_recycling->source->channel)->line); #endif config = ags_config_get_instance(); str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "engine-mode"); if(str != NULL && !g_ascii_strncasecmp(str, "performance", 12)){ performance_mode = TRUE; }else{ performance_mode = FALSE; } list_start = list = ags_recall_get_children(recall); while(list != NULL){ recall_audio_signal = AGS_RECALL_AUDIO_SIGNAL(list->data); if((recall_audio_signal->source == audio_signal) && (AGS_RECALL_DONE & (AGS_RECALL(recall_audio_signal)->flags)) == 0){ ags_recall_done(recall_audio_signal); // cancel_recall = ags_cancel_recall_new(AGS_RECALL(recall_audio_signal), // NULL); // ags_task_thread_append_task(AGS_TASK_THREAD(AGS_AUDIO_LOOP(AGS_MAIN(soundcard->application_context)->main_loop)->task_thread), // (AgsTask *) cancel_recall); } list = list->next; } g_list_free(list_start); if((AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE & (recall_recycling->flags)) != 0){ if(g_list_find(recall_recycling->child_source, audio_signal) != NULL){ // recall_recycling->child_source = g_list_remove(recall_recycling->child_source, // audio_signal); // g_object_unref(audio_signal); } } pthread_mutex_unlock(mutex); } void ags_recall_recycling_destination_add_audio_signal_callback(AgsRecycling *destination, AgsAudioSignal *audio_signal, AgsRecallRecycling *recall_recycling) { AgsChannel *channel; AgsRecall *recall; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(destination == NULL || recall_recycling == NULL || audio_signal == NULL){ return; } recall = AGS_RECALL(recall_recycling); //FIXME:JK: work-around for crashing while resetting link if(recall->parent == NULL){ return; } channel = AGS_RECALL_CHANNEL_RUN(recall->parent)->source; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) != 0 || (AGS_AUDIO_SIGNAL_RT_TEMPLATE & (audio_signal->flags)) != 0 || audio_signal->recall_id == NULL || recall->recall_id == NULL){ pthread_mutex_unlock(mutex); return; } if(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context != recall->recall_id->recycling_context){ if(AGS_IS_INPUT(channel)){ if(channel->link != NULL){ if(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context->parent != recall->recall_id->recycling_context){ pthread_mutex_unlock(mutex); return; } }else{ pthread_mutex_unlock(mutex); return; } }else{ pthread_mutex_unlock(mutex); return; } } #ifdef AGS_DEBUG g_message("ags_recall_recycling_destination_add_audio_signal_callback %s[%llx]", G_OBJECT_TYPE_NAME(recall_recycling), (long long unsigned int) recall_recycling); if((AGS_RECALL_RECYCLING_MAP_CHILD_DESTINATION & (recall_recycling->flags)) != 0){ g_message("ags_recall_recycling_destination_add_audio_signal - channel: %s[%u]\n", G_OBJECT_TYPE_NAME(recall_recycling), AGS_CHANNEL(recall_recycling->source->channel)->line); } g_message(" -- g_object_set -- child_destination@%llx", (long long unsigned int) audio_signal); #endif // g_object_set(G_OBJECT(recall_recycling), // "child_destination", audio_signal, // NULL); if((AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE & (recall_recycling->flags)) != 0){ if(recall_recycling->child_source != NULL){ // g_list_free_full(recall_recycling->child_source, // g_object_unref); } // recall_recycling->child_source = NULL; } pthread_mutex_unlock(mutex); } void ags_recall_recycling_destination_remove_audio_signal_callback(AgsRecycling *destination, AgsAudioSignal *audio_signal, AgsRecallRecycling *recall_recycling) { AgsChannel *channel; AgsRecall *recall; AgsCancelRecall *cancel_recall; AgsRecallAudioSignal *recall_audio_signal; AgsMutexManager *mutex_manager; GList *list, *list_start; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(destination == NULL || recall_recycling == NULL || audio_signal == NULL){ return; } recall = AGS_RECALL(recall_recycling); //FIXME:JK: work-around for crashing while resetting link if(recall->parent == NULL){ return; } channel = AGS_RECALL_CHANNEL_RUN(recall->parent)->source; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) != 0 || (AGS_AUDIO_SIGNAL_RT_TEMPLATE & (audio_signal->flags)) != 0 || audio_signal->recall_id == NULL || recall->recall_id == NULL){ pthread_mutex_unlock(mutex); return; } if(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context != recall->recall_id->recycling_context){ if(AGS_IS_INPUT(channel)){ if(channel->link != NULL){ if(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context->parent != recall->recall_id->recycling_context){ pthread_mutex_unlock(mutex); return; } }else{ pthread_mutex_unlock(mutex); return; } }else{ pthread_mutex_unlock(mutex); return; } } #ifdef AGS_DEBUG g_message("ags_recall_recycling_destination_remove_audio_signal - channel: %s[%u]\n", G_OBJECT_TYPE_NAME(recall_recycling), AGS_CHANNEL(recall_recycling->source->channel)->line); #endif list_start = list = ags_recall_get_children(AGS_RECALL(recall_recycling)); while(list != NULL){ recall_audio_signal = AGS_RECALL_AUDIO_SIGNAL(list->data); if(recall_audio_signal->destination == audio_signal && (AGS_RECALL_DONE & (AGS_RECALL(recall_audio_signal)->flags)) == 0){ // ags_recall_done(recall_audio_signal); // cancel_recall = ags_cancel_recall_new(AGS_RECALL(recall_audio_signal), // NULL); // ags_task_thread_append_task(AGS_TASK_THREAD(AGS_AUDIO_LOOP(AGS_MAIN(soundcard->application_context)->main_loop)->task_thread), // (AgsTask *) cancel_recall); } list = list->next; } g_list_free(list_start); if((AGS_RECALL_RECYCLING_MAP_CHILD_DESTINATION & (recall_recycling->flags)) != 0){ if(recall_recycling->child_destination == audio_signal){ // g_object_set(G_OBJECT(recall_recycling), // "child_destination", NULL, // NULL); } } if((AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE & (recall_recycling->flags)) != 0){ if(recall_recycling->child_source != NULL){ // recall_recycling->child_source = NULL; } // recall_recycling->child_source = NULL; } pthread_mutex_unlock(mutex); } /** * ags_recall_recycling_new: * * Creates a #AgsRecallRecycling * * Returns: a new #AgsRecallRecycling * * Since: 1.0.0 */ AgsRecallRecycling* ags_recall_recycling_new() { AgsRecallRecycling *recall_recycling; recall_recycling = (AgsRecallRecycling *) g_object_new(AGS_TYPE_RECALL_RECYCLING, NULL); return(recall_recycling); } gsequencer-1.4.24/ags/audio/ags_devin.c0000644000175000017500000026303613247044247014663 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef __APPLE__ #include #endif #include #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include void ags_devin_class_init(AgsDevinClass *devin); void ags_devin_connectable_interface_init(AgsConnectableInterface *connectable); void ags_devin_soundcard_interface_init(AgsSoundcardInterface *soundcard); void ags_devin_concurrent_tree_interface_init(AgsConcurrentTreeInterface *concurrent_tree); void ags_devin_init(AgsDevin *devin); void ags_devin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_devin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_devin_disconnect(AgsConnectable *connectable); void ags_devin_connect(AgsConnectable *connectable); pthread_mutex_t* ags_devin_get_lock(AgsConcurrentTree *concurrent_tree); pthread_mutex_t* ags_devin_get_parent_lock(AgsConcurrentTree *concurrent_tree); void ags_devin_dispose(GObject *gobject); void ags_devin_finalize(GObject *gobject); void ags_devin_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* ags_devin_get_application_context(AgsSoundcard *soundcard); void ags_devin_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_devin_get_application_mutex(AgsSoundcard *soundcard); void ags_devin_set_device(AgsSoundcard *soundcard, gchar *device); gchar* ags_devin_get_device(AgsSoundcard *soundcard); void ags_devin_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void ags_devin_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void ags_devin_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name); void ags_devin_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); GList* ags_devin_get_poll_fd(AgsSoundcard *soundcard); gboolean ags_devin_is_available(AgsSoundcard *soundcard); gboolean ags_devin_is_starting(AgsSoundcard *soundcard); gboolean ags_devin_is_recording(AgsSoundcard *soundcard); gchar* ags_devin_get_uptime(AgsSoundcard *soundcard); void ags_devin_delegate_record_init(AgsSoundcard *soundcard, GError **error); void ags_devin_delegate_record(AgsSoundcard *soundcard, GError **error); void ags_devin_delegate_stop(AgsSoundcard *soundcard); void ags_devin_oss_init(AgsSoundcard *soundcard, GError **error); void ags_devin_oss_record(AgsSoundcard *soundcard, GError **error); void ags_devin_oss_free(AgsSoundcard *soundcard); void ags_devin_alsa_init(AgsSoundcard *soundcard, GError **error); void ags_devin_alsa_record(AgsSoundcard *soundcard, GError **error); void ags_devin_alsa_free(AgsSoundcard *soundcard); void ags_devin_tic(AgsSoundcard *soundcard); void ags_devin_offset_changed(AgsSoundcard *soundcard, guint note_offset); void ags_devin_set_bpm(AgsSoundcard *soundcard, gdouble bpm); gdouble ags_devin_get_bpm(AgsSoundcard *soundcard); void ags_devin_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor); gdouble ags_devin_get_delay_factor(AgsSoundcard *soundcard); gdouble ags_devin_get_absolute_delay(AgsSoundcard *soundcard); gdouble ags_devin_get_delay(AgsSoundcard *soundcard); guint ags_devin_get_attack(AgsSoundcard *soundcard); void* ags_devin_get_buffer(AgsSoundcard *soundcard); void* ags_devin_get_next_buffer(AgsSoundcard *soundcard); void* ags_devin_get_prev_buffer(AgsSoundcard *soundcard); guint ags_devin_get_delay_counter(AgsSoundcard *soundcard); void ags_devin_set_note_offset(AgsSoundcard *soundcard, guint note_offset); guint ags_devin_get_note_offset(AgsSoundcard *soundcard); void ags_devin_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset); guint ags_devin_get_note_offset_absolute(AgsSoundcard *soundcard); void ags_devin_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void ags_devin_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint ags_devin_get_loop_offset(AgsSoundcard *soundcard); void ags_devin_set_audio(AgsSoundcard *soundcard, GList *audio); GList* ags_devin_get_audio(AgsSoundcard *soundcard); /** * SECTION:ags_devin * @short_description: Output to soundcard * @title: AgsDevin * @section_id: * @include: ags/audio/ags_devin.h * * #AgsDevin represents a soundcard and supports output. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_DSP_CHANNELS, PROP_PCM_CHANNELS, PROP_FORMAT, PROP_BUFFER_SIZE, PROP_SAMPLERATE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, }; enum{ LAST_SIGNAL, }; static gpointer ags_devin_parent_class = NULL; static guint devin_signals[LAST_SIGNAL]; const int ags_devin_endian_i = 1; #define is_bigendian() ( (*(char*)&ags_devin_endian_i) == 0 ) GType ags_devin_get_type (void) { static GType ags_type_devin = 0; if(!ags_type_devin){ static const GTypeInfo ags_devin_info = { sizeof (AgsDevinClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_devin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsDevin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_devin_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_devin_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_soundcard_interface_info = { (GInterfaceInitFunc) ags_devin_soundcard_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_concurrent_tree_interface_info = { (GInterfaceInitFunc) ags_devin_concurrent_tree_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_devin = g_type_register_static(G_TYPE_OBJECT, "AgsDevin", &ags_devin_info, 0); g_type_add_interface_static(ags_type_devin, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_devin, AGS_TYPE_SOUNDCARD, &ags_soundcard_interface_info); g_type_add_interface_static(ags_type_devin, AGS_TYPE_CONCURRENT_TREE, &ags_concurrent_tree_interface_info); } return (ags_type_devin); } void ags_devin_class_init(AgsDevinClass *devin) { GObjectClass *gobject; GParamSpec *param_spec; ags_devin_parent_class = g_type_class_peek_parent(devin); /* GObjectClass */ gobject = (GObjectClass *) devin; gobject->set_property = ags_devin_set_property; gobject->get_property = ags_devin_get_property; gobject->dispose = ags_devin_dispose; gobject->finalize = ags_devin_finalize; /* properties */ /** * AgsDevin:application-context: * * The assigned #AgsApplicationContext * * Since: 1.2.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsDevin:application-mutex: * * The assigned application mutex * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsDevin:device: * * The alsa soundcard indentifier * * Since: 1.2.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "hw:0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsDevin:dsp-channels: * * The dsp channel count * * Since: 1.2.0 */ param_spec = g_param_spec_uint("dsp-channels", i18n_pspec("count of DSP channels"), i18n_pspec("The count of DSP channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DSP_CHANNELS, param_spec); /** * AgsDevin:pcm-channels: * * The pcm channel count * * Since: 1.2.0 */ param_spec = g_param_spec_uint("pcm-channels", i18n_pspec("count of PCM channels"), i18n_pspec("The count of PCM channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PCM_CHANNELS, param_spec); /* * TODO:JK: add support for other quality than 16 bit */ /** * AgsDevin:format: * * The precision of the buffer * * Since: 1.2.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("precision of buffer"), i18n_pspec("The precision to use for a frame"), 1, 64, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsDevin:buffer-size: * * The buffer size * * Since: 1.2.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("frame count of a buffer"), i18n_pspec("The count of frames a buffer contains"), 1, 44100, AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsDevin:samplerate: * * The samplerate * * Since: 1.2.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("frames per second"), i18n_pspec("The frames count recorded during a second"), 8000, 96000, 44100, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsDevin:buffer: * * The buffer * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to record"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsDevin:bpm: * * Beats per minute * * Since: 1.2.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsDevin:delay-factor: * * tact * * Since: 1.2.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsDevin:attack: * * Attack of the buffer * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /* AgsDevinClass */ } GQuark ags_devin_error_quark() { return(g_quark_from_static_string("ags-devin-error-quark")); } void ags_devin_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_devin_connect; connectable->disconnect = ags_devin_disconnect; } void ags_devin_concurrent_tree_interface_init(AgsConcurrentTreeInterface *concurrent_tree) { concurrent_tree->get_lock = ags_devin_get_lock; concurrent_tree->get_parent_lock = ags_devin_get_parent_lock; } void ags_devin_soundcard_interface_init(AgsSoundcardInterface *soundcard) { soundcard->set_application_context = ags_devin_set_application_context; soundcard->get_application_context = ags_devin_get_application_context; soundcard->set_application_mutex = ags_devin_set_application_mutex; soundcard->get_application_mutex = ags_devin_get_application_mutex; soundcard->set_device = ags_devin_set_device; soundcard->get_device = ags_devin_get_device; soundcard->set_presets = ags_devin_set_presets; soundcard->get_presets = ags_devin_get_presets; soundcard->list_cards = ags_devin_list_cards; soundcard->pcm_info = ags_devin_pcm_info; soundcard->get_poll_fd = ags_devin_get_poll_fd; soundcard->is_available = ags_devin_is_available; soundcard->is_starting = ags_devin_is_starting; soundcard->is_recording = ags_devin_is_recording; soundcard->is_recording = NULL; soundcard->get_uptime = ags_devin_get_uptime; soundcard->record_init = ags_devin_delegate_record_init; soundcard->record = ags_devin_delegate_record; soundcard->record_init = NULL; soundcard->record = NULL; soundcard->stop = ags_devin_delegate_stop; soundcard->tic = ags_devin_tic; soundcard->offset_changed = ags_devin_offset_changed; soundcard->set_bpm = ags_devin_set_bpm; soundcard->get_bpm = ags_devin_get_bpm; soundcard->set_delay_factor = ags_devin_set_delay_factor; soundcard->get_delay_factor = ags_devin_get_delay_factor; soundcard->get_absolute_delay = ags_devin_get_absolute_delay; soundcard->get_delay = ags_devin_get_delay; soundcard->get_attack = ags_devin_get_attack; soundcard->get_buffer = ags_devin_get_buffer; soundcard->get_next_buffer = ags_devin_get_next_buffer; soundcard->get_prev_buffer = ags_devin_get_prev_buffer; soundcard->get_delay_counter = ags_devin_get_delay_counter; soundcard->set_note_offset = ags_devin_set_note_offset; soundcard->get_note_offset = ags_devin_get_note_offset; soundcard->set_note_offset_absolute = ags_devin_set_note_offset_absolute; soundcard->get_note_offset_absolute = ags_devin_get_note_offset_absolute; soundcard->set_loop = ags_devin_set_loop; soundcard->get_loop = ags_devin_get_loop; soundcard->get_loop_offset = ags_devin_get_loop_offset; soundcard->set_audio = ags_devin_set_audio; soundcard->get_audio = ags_devin_get_audio; } void ags_devin_init(AgsDevin *devin) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; gboolean use_alsa; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert devin mutex */ devin->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif devin->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) devin, mutex); pthread_mutex_unlock(application_mutex); /* flags */ config = ags_config_get_instance(); #ifdef AGS_WITH_ALSA use_alsa = TRUE; #else use_alsa = FALSE; #endif str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "backend"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "backend"); } if(str != NULL && !g_ascii_strncasecmp(str, "oss", 4)){ use_alsa = FALSE; } if(use_alsa){ devin->flags = (AGS_DEVIN_ALSA); }else{ devin->flags = (AGS_DEVIN_OSS); } /* quality */ devin->dsp_channels = AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS; devin->pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; devin->format = AGS_SOUNDCARD_SIGNED_16_BIT; devin->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; devin->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; /* read config */ /* dsp channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "dsp-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "dsp-channels"); } if(str != NULL){ devin->dsp_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ devin->pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ devin->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ devin->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ devin->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* device */ if(use_alsa){ devin->out.alsa.handle = NULL; devin->out.alsa.device = AGS_DEVIN_DEFAULT_ALSA_DEVICE; }else{ devin->out.oss.device_fd = -1; devin->out.oss.device = AGS_DEVIN_DEFAULT_OSS_DEVICE; } /* buffer */ devin->buffer = (void **) malloc(4 * sizeof(void*)); devin->buffer[0] = NULL; devin->buffer[1] = NULL; devin->buffer[2] = NULL; devin->buffer[3] = NULL; g_atomic_int_set(&(devin->available), FALSE); devin->ring_buffer_size = AGS_DEVIN_DEFAULT_RING_BUFFER_SIZE; devin->nth_ring_buffer = 0; devin->ring_buffer = NULL; ags_devin_realloc_buffer(devin); /* bpm */ devin->bpm = AGS_SOUNDCARD_DEFAULT_BPM; /* delay factor */ devin->delay_factor = AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR; /* delay and attack */ devin->delay = (gdouble *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(gdouble)); devin->attack = (guint *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(guint)); ags_devin_adjust_delay_and_attack(devin); /* counters */ devin->tact_counter = 0.0; devin->delay_counter = 0; devin->tic_counter = 0; devin->note_offset = 0; devin->note_offset_absolute = 0; devin->loop_left = AGS_SOUNDCARD_DEFAULT_LOOP_LEFT; devin->loop_right = AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT; devin->do_loop = FALSE; devin->loop_offset = 0; /* parent */ devin->application_context = NULL; devin->application_mutex = NULL; devin->poll_fd = NULL; devin->notify_soundcard = NULL; /* all AgsAudio */ devin->audio = NULL; } void ags_devin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsDevin *devin; devin = AGS_DEVIN(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(devin->application_context == (GObject *) application_context){ return; } if(devin->application_context != NULL){ g_object_unref(G_OBJECT(devin->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *segmentation; guint denumerator, numerator; g_object_ref(G_OBJECT(application_context)); devin->application_mutex = application_context->mutex; config = ags_config_get_instance(); /* segmentation */ segmentation = ags_config_get_value(config, AGS_CONFIG_GENERIC, "segmentation"); if(segmentation != NULL){ sscanf(segmentation, "%d/%d", &denumerator, &numerator); devin->delay_factor = 1.0 / numerator * (numerator / denumerator); g_free(segmentation); } ags_devin_adjust_delay_and_attack(devin); ags_devin_realloc_buffer(devin); }else{ devin->application_mutex = NULL; } devin->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(devin->application_mutex == application_mutex){ return; } devin->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); if((AGS_DEVIN_OSS & (devin->flags)) != 0){ devin->out.oss.device = g_strdup(device); }else if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ devin->out.alsa.device = g_strdup(device); } } break; case PROP_DSP_CHANNELS: { guint dsp_channels; dsp_channels = g_value_get_uint(value); if(dsp_channels == devin->dsp_channels){ return; } devin->dsp_channels = dsp_channels; } break; case PROP_PCM_CHANNELS: { guint pcm_channels; pcm_channels = g_value_get_uint(value); if(pcm_channels == devin->pcm_channels){ return; } devin->pcm_channels = pcm_channels; ags_devin_realloc_buffer(devin); } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); if(format == devin->format){ return; } devin->format = format; ags_devin_realloc_buffer(devin); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); if(buffer_size == devin->buffer_size){ return; } devin->buffer_size = buffer_size; ags_devin_realloc_buffer(devin); ags_devin_adjust_delay_and_attack(devin); } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); if(samplerate == devin->samplerate){ return; } devin->samplerate = samplerate; ags_devin_adjust_delay_and_attack(devin); } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); devin->bpm = bpm; ags_devin_adjust_delay_and_attack(devin); } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); devin->delay_factor = delay_factor; ags_devin_adjust_delay_and_attack(devin); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_devin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsDevin *devin; devin = AGS_DEVIN(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, devin->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, devin->application_mutex); } break; case PROP_DEVICE: { if((AGS_DEVIN_OSS & (devin->flags)) != 0){ g_value_set_string(value, devin->out.oss.device); }else if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ g_value_set_string(value, devin->out.alsa.device); } } break; case PROP_DSP_CHANNELS: { g_value_set_uint(value, devin->dsp_channels); } break; case PROP_PCM_CHANNELS: { g_value_set_uint(value, devin->pcm_channels); } break; case PROP_FORMAT: { g_value_set_uint(value, devin->format); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, devin->buffer_size); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, devin->samplerate); } break; case PROP_BUFFER: { g_value_set_pointer(value, devin->buffer); } break; case PROP_BPM: { g_value_set_double(value, devin->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, devin->delay_factor); } break; case PROP_ATTACK: { g_value_set_pointer(value, devin->attack); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } pthread_mutex_t* ags_devin_get_lock(AgsConcurrentTree *concurrent_tree) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *devin_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); devin_mutex = ags_mutex_manager_lookup(mutex_manager, G_OBJECT(concurrent_tree)); pthread_mutex_unlock(application_mutex); return(devin_mutex); } pthread_mutex_t* ags_devin_get_parent_lock(AgsConcurrentTree *concurrent_tree) { return(NULL); } void ags_devin_dispose(GObject *gobject) { AgsDevin *devin; GList *list; devin = AGS_DEVIN(gobject); /* application context */ if(devin->application_context != NULL){ g_object_unref(devin->application_context); devin->application_context = NULL; } /* unref audio */ if(devin->audio != NULL){ list = devin->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(devin->audio, g_object_unref); devin->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_devin_parent_class)->dispose(gobject); } void ags_devin_finalize(GObject *gobject) { AgsDevin *devin; AgsMutexManager *mutex_manager; GList *list; devin = AGS_DEVIN(gobject); /* remove devin mutex */ pthread_mutex_lock(devin->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(devin->application_mutex); /* free output buffer */ free(devin->buffer[0]); free(devin->buffer[1]); free(devin->buffer[2]); free(devin->buffer[3]); /* free buffer array */ free(devin->buffer); /* free AgsAttack */ free(devin->attack); /* notify soundcard */ if(devin->notify_soundcard != NULL){ if(devin->application_context != NULL){ ags_task_thread_remove_cyclic_task(AGS_APPLICATION_CONTEXT(devin->application_context)->task_thread, devin->notify_soundcard); } g_object_unref(devin->notify_soundcard); } /* application context */ if(devin->application_context != NULL){ g_object_unref(devin->application_context); } /* unref audio */ if(devin->audio != NULL){ list = devin->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(devin->audio, g_object_unref); } pthread_mutex_destroy(devin->mutex); free(devin->mutex); pthread_mutexattr_destroy(devin->mutexattr); free(devin->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_devin_parent_class)->finalize(gobject); } void ags_devin_connect(AgsConnectable *connectable) { AgsDevin *devin; GList *list; devin = AGS_DEVIN(connectable); /* */ list = devin->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_devin_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_devin_switch_buffer_flag: * @devin: an #AgsDevin * * The buffer flag indicates the currently recorded buffer. * * Since: 1.2.0 */ void ags_devin_switch_buffer_flag(AgsDevin *devin) { AgsApplicationContext *application_context; AgsMutexManager *mutex_manager; pthread_mutex_t *mutex; application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(devin)); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devin); pthread_mutex_unlock(application_context->mutex); // g_message("switch - 0x%0x", ((AGS_DEVIN_BUFFER0 | // AGS_DEVIN_BUFFER1 | // AGS_DEVIN_BUFFER2 | // AGS_DEVIN_BUFFER3) & (devin->flags))); /* switch buffer flag */ pthread_mutex_lock(mutex); if((AGS_DEVIN_BUFFER0 & (devin->flags)) != 0){ devin->flags &= (~AGS_DEVIN_BUFFER0); devin->flags |= AGS_DEVIN_BUFFER1; }else if((AGS_DEVIN_BUFFER1 & (devin->flags)) != 0){ devin->flags &= (~AGS_DEVIN_BUFFER1); devin->flags |= AGS_DEVIN_BUFFER2; }else if((AGS_DEVIN_BUFFER2 & (devin->flags)) != 0){ devin->flags &= (~AGS_DEVIN_BUFFER2); devin->flags |= AGS_DEVIN_BUFFER3; }else if((AGS_DEVIN_BUFFER3 & (devin->flags)) != 0){ devin->flags &= (~AGS_DEVIN_BUFFER3); devin->flags |= AGS_DEVIN_BUFFER0; } pthread_mutex_unlock(mutex); } void ags_devin_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); devin->application_context = (GObject *) application_context; } AgsApplicationContext* ags_devin_get_application_context(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); return((AgsApplicationContext *) devin->application_context); } void ags_devin_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); devin->application_mutex = application_mutex; } pthread_mutex_t* ags_devin_get_application_mutex(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); return(devin->application_mutex); } void ags_devin_set_device(AgsSoundcard *soundcard, gchar *device) { AgsDevin *devin; GList *card_id, *card_id_start, *card_name, *card_name_start; devin = AGS_DEVIN(soundcard); card_id = NULL; card_name = NULL; ags_soundcard_list_cards(soundcard, &card_id, &card_name); card_id_start = card_id; card_name_start = card_name; while(card_id != NULL){ if(!g_ascii_strncasecmp(card_id->data, device, strlen(card_id->data))){ if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ devin->out.alsa.device = g_strdup(device); }else{ devin->out.oss.device = g_strdup(device); } break; } card_id = card_id->next; } g_list_free_full(card_id_start, g_free); g_list_free_full(card_name_start, g_free); } gchar* ags_devin_get_device(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ return(devin->out.alsa.device); }else{ return(devin->out.oss.device); } } void ags_devin_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); g_object_set(devin, "pcm-channels", channels, "samplerate", rate, "buffer-size", buffer_size, "format", format, NULL); } void ags_devin_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); if(channels != NULL){ *channels = devin->pcm_channels; } if(rate != NULL){ *rate = devin->samplerate; } if(buffer_size != NULL){ *buffer_size = devin->buffer_size; } if(format != NULL){ *format = devin->format; } } /** * ags_devin_list_cards: * @soundcard: the #AgsSoundcard * @card_id: alsa identifier * @card_name: card name * * List available soundcards. * * Since: 1.2.0 */ void ags_devin_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ #ifdef AGS_WITH_ALSA snd_ctl_t *card_handle; snd_ctl_card_info_t *card_info; char *name; gchar *str; gchar *str_err; int card_num; int device; int error; card_num = -1; while(TRUE){ error = snd_card_next(&card_num); if(card_num < 0 || error < 0){ str_err = snd_strerror(error); g_message("Can't get the next card number: %s", str_err); //free(str_err); break; } str = g_strdup_printf("hw:%d", card_num); #ifdef AGS_DEBUG g_message("found soundcard - %s", str); #endif error = snd_ctl_open(&card_handle, str, 0); if(error < 0){ g_free(str); continue; } snd_ctl_card_info_alloca(&card_info); error = snd_ctl_card_info(card_handle, card_info); if(error < 0){ g_free(str); continue; } device = -1; error = snd_ctl_pcm_next_device(card_handle, &device); if(error < 0){ g_free(str); continue; } if(card_id != NULL){ *card_id = g_list_prepend(*card_id, str); } if(card_name != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(snd_ctl_card_info_get_name(card_info))); } snd_ctl_close(card_handle); } snd_config_update_free_global(); #endif }else{ #ifdef AGS_WITH_OSS oss_sysinfo sysinfo; oss_audioinfo ai; char *mixer_device; int mixerfd = -1; int next, n; int i; if((mixer_device = getenv("OSS_MIXERDEV")) == NULL){ mixer_device = "/dev/mixer"; } if((mixerfd = open(mixer_device, O_RDONLY, 0)) == -1){ int e = errno; switch(e){ case ENXIO: case ENODEV: { g_warning("Open Sound System is not running in your system."); } break; case ENOENT: { g_warning("No %s device available in your system.\nPerhaps Open Sound System is not installed or running.", mixer_device); } break; default: g_warning("%s", strerror(e)); } } if(ioctl(mixerfd, SNDCTL_SYSINFO, &sysinfo) == -1){ if(errno == ENXIO){ g_warning("OSS has not detected any supported sound hardware in your system."); }else{ g_warning("SNDCTL_SYSINFO"); if(errno == EINVAL){ g_warning("Error: OSS version 4.0 or later is required"); } } n = 0; }else{ n = sysinfo.numaudios; } memset(&ai, 0, sizeof(oss_audioinfo)); ioctl(mixerfd, SNDCTL_AUDIOINFO_EX, &ai); for(i = 0; i < n; i++){ ai.dev = i; if(ioctl(mixerfd, SNDCTL_ENGINEINFO, &ai) == -1){ int e = errno; g_warning("Can't get device info for /dev/dsp%d (SNDCTL_AUDIOINFO)\nerrno = %d: %s", i, e, strerror(e)); continue; } if((DSP_CAP_OUTPUT & (ai.caps)) != 0){ if(card_id != NULL){ *card_id = g_list_prepend(*card_id, g_strdup_printf("/dev/dsp%i", i)); } if(card_name != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(ai.name)); } } next = ai.next_rec_engine; if(next <= 0){ break; } } #endif } if(card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL){ *card_name = g_list_reverse(*card_name); } } void ags_devin_pcm_info(AgsSoundcard *soundcard, char *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error) { AgsDevin *devin; if(card_id == NULL){ return; } devin = AGS_DEVIN(soundcard); if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ #ifdef AGS_WITH_ALSA snd_pcm_t *handle; snd_pcm_hw_params_t *params; gchar *str; unsigned int val; int dir; snd_pcm_uframes_t frames; int rc; int err; /* Open PCM device for recordback. */ handle = NULL; rc = snd_pcm_open(&handle, card_id, SND_PCM_STREAM_CAPTURE, 0); if(rc < 0) { str = snd_strerror(rc); g_message("unable to open pcm device: %s\n", str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_LOCKED_SOUNDCARD, "unable to open pcm device: %s\n", str); } // free(str); return; } /* Allocate a hardware parameters object. */ snd_pcm_hw_params_alloca(¶ms); /* Fill it in with default values. */ snd_pcm_hw_params_any(handle, params); /* channels */ snd_pcm_hw_params_get_channels_min(params, &val); *channels_min = val; snd_pcm_hw_params_get_channels_max(params, &val); *channels_max = val; /* samplerate */ dir = 0; snd_pcm_hw_params_get_rate_min(params, &val, &dir); *rate_min = val; dir = 0; snd_pcm_hw_params_get_rate_max(params, &val, &dir); *rate_max = val; /* buffer size */ dir = 0; snd_pcm_hw_params_get_buffer_size_min(params, &frames); *buffer_size_min = frames; dir = 0; snd_pcm_hw_params_get_buffer_size_max(params, &frames); *buffer_size_max = frames; snd_pcm_close(handle); #endif }else{ #ifdef AGS_WITH_OSS oss_audioinfo ainfo; gchar *str; int mixerfd; int acc; unsigned int cmd; mixerfd = open(card_id, O_RDWR, 0); if(mixerfd == -1){ int e = errno; str = strerror(e); g_message("unable to open pcm device: %s\n", str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_LOCKED_SOUNDCARD, "unable to open pcm device: %s\n", str); } return; } memset(&ainfo, 0, sizeof (ainfo)); cmd = SNDCTL_AUDIOINFO; if(card_id != NULL && !g_ascii_strncasecmp(card_id, "/dev/dsp", 8)){ if(strlen(card_id) > 8){ sscanf(card_id, "/dev/dsp%d", &(ainfo.dev)); }else{ ainfo.dev = 0; } }else{ return; } if(ioctl(mixerfd, cmd, &ainfo) == -1){ int e = errno; str = strerror(e); g_message("unable to retrieve audio info: %s\n", str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_LOCKED_SOUNDCARD, "unable to retrieve audio info: %s\n", str); } return; } *channels_min = ainfo.min_channels; *channels_max = ainfo.max_channels; *rate_min = ainfo.min_rate; *rate_max = ainfo.max_rate; *buffer_size_min = 64; *buffer_size_max = 8192; #endif } } GList* ags_devin_get_poll_fd(AgsSoundcard *soundcard) { AgsDevin *devin; AgsPollFd *poll_fd; GList *list; struct pollfd *fds; gint count; guint i; devin = AGS_DEVIN(soundcard); if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ if(devin->out.alsa.handle == NULL){ return(NULL); } }else{ if(devin->out.oss.device_fd == -1){ return(NULL); } } if(devin->poll_fd == NULL){ count = 0; if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ #ifdef AGS_WITH_ALSA /* get poll fds of ALSA */ count = snd_pcm_poll_descriptors_count(devin->out.alsa.handle); if(count > 0){ fds = (struct pollfd *) malloc(count * sizeof(struct pollfd)); snd_pcm_poll_descriptors(devin->out.alsa.handle, fds, count); } #endif }else{ if(devin->out.oss.device_fd != -1){ count = 1; fds = (struct pollfd *) malloc(sizeof(struct pollfd)); fds->fd = devin->out.oss.device_fd; } } /* map fds */ list = NULL; for(i = 0; i < count; i++){ poll_fd = ags_poll_fd_new(); poll_fd->fd = fds[i].fd; poll_fd->poll_fd = &(fds[i]); list = g_list_prepend(list, poll_fd); } devin->poll_fd = list; }else{ list = devin->poll_fd; } return(list); } gboolean ags_devin_is_available(AgsSoundcard *soundcard) { AgsDevin *devin; GList *list; devin = AGS_DEVIN(soundcard); list = devin->poll_fd; while(list != NULL){ signed short revents; if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ #ifdef AGS_WITH_ALSA snd_pcm_poll_descriptors_revents(devin->out.alsa.handle, AGS_POLL_FD(list->data)->poll_fd, 1, &revents); #endif if((POLLOUT & revents) != 0){ g_atomic_int_set(&(devin->available), TRUE); AGS_POLL_FD(list->data)->poll_fd->revents = 0; return(TRUE); } }else{ #ifdef AGS_WITH_OSS fd_set writefds; FD_ZERO(&writefds); FD_SET(AGS_POLL_FD(list->data)->poll_fd->fd, &writefds); if(FD_ISSET(AGS_POLL_FD(list->data)->poll_fd->fd, &writefds)){ g_atomic_int_set(&(devin->available), TRUE); AGS_POLL_FD(list->data)->poll_fd->revents = 0; return(TRUE); } #endif } list = list->next; } return(FALSE); } gboolean ags_devin_is_starting(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); return(((AGS_DEVIN_START_RECORD & (devin->flags)) != 0) ? TRUE: FALSE); } gboolean ags_devin_is_recording(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); return(((AGS_DEVIN_RECORD & (devin->flags)) != 0) ? TRUE: FALSE); } gchar* ags_devin_get_uptime(AgsSoundcard *soundcard) { gchar *uptime; if(ags_soundcard_is_recording(soundcard)){ guint samplerate; guint buffer_size; guint note_offset; gdouble bpm; gdouble delay_factor; gdouble delay; ags_soundcard_get_presets(soundcard, NULL, &samplerate, &buffer_size, NULL); note_offset = ags_soundcard_get_note_offset_absolute(soundcard); bpm = ags_soundcard_get_bpm(soundcard); delay_factor = ags_soundcard_get_delay_factor(soundcard); /* calculate delays */ delay = ags_soundcard_get_absolute_delay(soundcard); uptime = ags_time_get_uptime_from_offset(note_offset, bpm, delay, delay_factor); }else{ uptime = g_strdup(AGS_TIME_ZERO); } return(uptime); } void ags_devin_delegate_record_init(AgsSoundcard *soundcard, GError **error) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ ags_devin_alsa_init(soundcard, error); }else if((AGS_DEVIN_OSS & (devin->flags)) != 0){ ags_devin_oss_init(soundcard, error); } } void ags_devin_delegate_record(AgsSoundcard *soundcard, GError **error) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ ags_devin_alsa_record(soundcard, error); }else if((AGS_DEVIN_OSS & (devin->flags)) != 0){ ags_devin_oss_record(soundcard, error); } } void ags_devin_delegate_stop(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); if((AGS_DEVIN_ALSA & (devin->flags)) != 0){ ags_devin_alsa_free(soundcard); }else if((AGS_DEVIN_OSS & (devin->flags)) != 0){ ags_devin_oss_free(soundcard); } } void ags_devin_oss_init(AgsSoundcard *soundcard, GError **error) { AgsDevin *devin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; gchar *str; guint word_size; int format; int tmp; guint i; pthread_mutex_t *mutex; devin = AGS_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devin); pthread_mutex_unlock(application_context->mutex); /* retrieve word size */ pthread_mutex_lock(mutex); switch(devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { #ifdef AGS_WITH_OSS format = AFMT_U8; #endif word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { #ifdef AGS_WITH_OSS format = AFMT_S16_NE; #endif word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { #ifdef AGS_WITH_OSS format = AFMT_S24_NE; #endif word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { #ifdef AGS_WITH_OSS format = AFMT_S32_NE; #endif word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } default: g_warning("ags_devin_oss_init(): unsupported word size"); return; } /* prepare for recordback */ devin->flags |= (AGS_DEVIN_BUFFER3 | AGS_DEVIN_START_RECORD | AGS_DEVIN_RECORD | AGS_DEVIN_NONBLOCKING); memset(devin->buffer[0], 0, devin->pcm_channels * devin->buffer_size * word_size); memset(devin->buffer[1], 0, devin->pcm_channels * devin->buffer_size * word_size); memset(devin->buffer[2], 0, devin->pcm_channels * devin->buffer_size * word_size); memset(devin->buffer[3], 0, devin->pcm_channels * devin->buffer_size * word_size); /* allocate ring buffer */ g_atomic_int_set(&(devin->available), FALSE); devin->ring_buffer = (unsigned char **) malloc(devin->ring_buffer_size * sizeof(unsigned char *)); for(i = 0; i < devin->ring_buffer_size; i++){ devin->ring_buffer[i] = (unsigned char *) malloc(devin->pcm_channels * devin->buffer_size * word_size * sizeof(unsigned char)); } #ifdef AGS_WITH_OSS /* open device fd */ str = devin->out.oss.device; devin->out.oss.device_fd = open(str, O_RDONLY, 0); if(devin->out.oss.device_fd == -1){ pthread_mutex_unlock(mutex); g_warning("couldn't open device %s", devin->out.oss.device); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_LOCKED_SOUNDCARD, "unable to open dsp device: %s\n", str); } return; } //NOTE:JK: unsupported on kfreebsd 9.0 // tmp = APF_NORMAL; // ioctl(devin->out.oss.device_fd, SNDCTL_DSP_PROFILE, &tmp); tmp = format; if(ioctl(devin->out.oss.device_fd, SNDCTL_DSP_SETFMT, &tmp) == -1){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("failed to select bits/sample"); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE, "unable to open dsp device: %s", str); } devin->out.oss.device_fd = -1; return; } if(tmp != format){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("failed to select bits/sample"); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE, "unable to open dsp device: %s", str); } devin->out.oss.device_fd = -1; return; } tmp = devin->dsp_channels; if(ioctl(devin->out.oss.device_fd, SNDCTL_DSP_CHANNELS, &tmp) == -1){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("Channels count (%i) not available for recordbacks: %s", devin->dsp_channels, str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_CHANNELS_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.oss.device_fd = -1; return; } if(tmp != devin->dsp_channels){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("Channels count (%i) not available for capture: %s", devin->dsp_channels, str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_CHANNELS_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.oss.device_fd = -1; return; } tmp = devin->samplerate; if(ioctl(devin->out.oss.device_fd, SNDCTL_DSP_SPEED, &tmp) == -1){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("Rate %iHz not available for capture: %s", devin->samplerate, str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_SAMPLERATE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.oss.device_fd = -1; return; } if(tmp != devin->samplerate){ g_warning("Warning: Capture using %d Hz (file %d Hz)", tmp, devin->samplerate); } #endif devin->tact_counter = 0.0; devin->delay_counter = 0.0; devin->tic_counter = 0; devin->nth_ring_buffer = 0; ags_soundcard_get_poll_fd(soundcard); #ifdef AGS_WITH_OSS devin->flags |= AGS_DEVIN_INITIALIZED; #endif devin->flags |= AGS_DEVIN_BUFFER0; devin->flags &= (~(AGS_DEVIN_BUFFER1 | AGS_DEVIN_BUFFER2 | AGS_DEVIN_BUFFER3)); pthread_mutex_unlock(mutex); } void ags_devin_oss_record(AgsSoundcard *soundcard, GError **error) { AgsDevin *devin; AgsNotifySoundcard *notify_soundcard; AgsTicDevice *tic_device; AgsClearBuffer *clear_buffer; AgsSwitchBufferFlag *switch_buffer_flag; AgsThread *task_thread; AgsPollFd *poll_fd; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *task; GList *list; gchar *str; guint word_size; guint nth_buffer; int n_write; pthread_mutex_t *mutex; static const struct timespec poll_interval = { 0, 250, }; auto void ags_devin_oss_record_fill_ring_buffer(void *buffer, guint ags_format, unsigned char *ring_buffer, guint channels, guint buffer_size); void ags_devin_oss_record_fill_ring_buffer(void *buffer, guint ags_format, unsigned char *ring_buffer, guint channels, guint buffer_size){ int format_bits; guint word_size; int bps; int res; guint chn; guint count, i; switch(ags_format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(char); bps = 1; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(short); bps = 2; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(long); bps = 3; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(long); bps = 4; } break; default: g_warning("ags_devin_oss_record(): unsupported word size"); return; } /* fill the channel areas */ for(count = 0; count < buffer_size; count++){ for(chn = 0; chn < channels; chn++){ switch(ags_format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { res = (int) ((signed char *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { res = (int) ((signed short *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { res = (int) ((signed long *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { res = (int) ((signed long *) buffer)[count * channels + chn]; } break; } /* Generate data in native endian format */ if(is_bigendian()){ for(i = 0; i < bps; i++){ *(ring_buffer + chn * bps + word_size - 1 - i) = (res >> i * 8) & 0xff; } }else{ for(i = 0; i < bps; i++){ *(ring_buffer + chn * bps + i) = (res >> i * 8) & 0xff; } } } ring_buffer += channels * bps; } } devin = AGS_DEVIN(soundcard); /* retrieve mutex */ application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devin); pthread_mutex_unlock(application_context->mutex); /* lock */ pthread_mutex_lock(mutex); notify_soundcard = AGS_NOTIFY_SOUNDCARD(devin->notify_soundcard); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); /* retrieve word size */ switch(devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } //NOTE:JK: not available break; default: g_warning("ags_devin_oss_record(): unsupported word size"); return; } /* do capture */ devin->flags &= (~AGS_DEVIN_START_RECORD); if((AGS_DEVIN_INITIALIZED & (devin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } /* check buffer flag */ if((AGS_DEVIN_BUFFER0 & (devin->flags)) != 0){ nth_buffer = 0; }else if((AGS_DEVIN_BUFFER1 & (devin->flags)) != 0){ nth_buffer = 1; }else if((AGS_DEVIN_BUFFER2 & (devin->flags)) != 0){ nth_buffer = 2; }else if((AGS_DEVIN_BUFFER3 & (devin->flags)) != 0){ nth_buffer = 3; } #ifdef AGS_WITH_OSS /* fill ring buffer */ ags_devin_oss_record_fill_ring_buffer(devin->buffer[nth_buffer], devin->format, devin->ring_buffer[devin->nth_ring_buffer], devin->pcm_channels, devin->buffer_size); /* wait until available */ list = ags_soundcard_get_poll_fd(soundcard); if(!ags_soundcard_is_available(soundcard) && !g_atomic_int_get(&(devin->available)) && list != NULL){ poll_fd = list->data; poll_fd->poll_fd->events = POLLOUT; while(!ags_soundcard_is_available(soundcard) && !g_atomic_int_get(&(devin->available))){ ppoll(poll_fd->poll_fd, 1, &poll_interval, NULL); } } /* write ring buffer */ n_write = read(devin->out.oss.device_fd, devin->ring_buffer[devin->nth_ring_buffer], devin->pcm_channels * devin->buffer_size * word_size * sizeof (char)); g_atomic_int_set(&(devin->available), FALSE); if(n_write != devin->pcm_channels * devin->buffer_size * word_size * sizeof (char)){ g_critical("write() return doesn't match written bytes"); } #endif /* increment nth ring-buffer */ if(devin->nth_ring_buffer + 1 >= devin->ring_buffer_size){ devin->nth_ring_buffer = 0; }else{ devin->nth_ring_buffer += 1; } pthread_mutex_unlock(mutex); /* update soundcard */ task_thread = ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_TASK_THREAD); task = NULL; /* tic soundcard */ tic_device = ags_tic_device_new((GObject *) devin); task = g_list_append(task, tic_device); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) devin); task = g_list_append(task, clear_buffer); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) devin); task = g_list_append(task, clear_buffer); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) devin); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); } void ags_devin_oss_free(AgsSoundcard *soundcard) { AgsDevin *devin; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *poll_fd; guint i; pthread_mutex_t *mutex; devin = AGS_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devin); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); #ifdef AGS_WITH_OSS /* remove poll fd */ poll_fd = devin->poll_fd; while(poll_fd != NULL){ ags_polling_thread_remove_poll_fd(AGS_POLL_FD(poll_fd->data)->polling_thread, poll_fd->data); g_object_unref(poll_fd->data); poll_fd = poll_fd->next; } g_list_free(poll_fd); devin->poll_fd = NULL; #endif notify_soundcard = AGS_NOTIFY_SOUNDCARD(devin->notify_soundcard); if((AGS_DEVIN_INITIALIZED & (devin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } close(devin->out.oss.device_fd); devin->out.oss.device_fd = -1; /* free ring-buffer */ g_atomic_int_set(&(devin->available), FALSE); for(i = 0; i < devin->ring_buffer_size; i++){ free(devin->ring_buffer[i]); } free(devin->ring_buffer); devin->ring_buffer = NULL; /* reset flags */ devin->flags &= (~(AGS_DEVIN_BUFFER0 | AGS_DEVIN_BUFFER1 | AGS_DEVIN_BUFFER2 | AGS_DEVIN_BUFFER3 | AGS_DEVIN_RECORD | AGS_DEVIN_INITIALIZED)); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); devin->note_offset = 0; devin->note_offset_absolute = 0; pthread_mutex_unlock(mutex); } void ags_devin_alsa_init(AgsSoundcard *soundcard, GError **error) { AgsDevin *devin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; #ifdef AGS_WITH_ALSA snd_pcm_t *handle; snd_pcm_hw_params_t *hwparams; snd_pcm_sw_params_t *swparams; gchar *str; int rc; unsigned int val; snd_pcm_uframes_t frames; unsigned int rate; unsigned int rrate; unsigned int channels; snd_pcm_uframes_t size; snd_pcm_sframes_t buffer_size; snd_pcm_sframes_t period_size; snd_pcm_format_t format; int period_event; int err, dir; #endif guint word_size; guint i; pthread_mutex_t *mutex; static unsigned int period_time = 100000; static unsigned int buffer_time = 100000; devin = AGS_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devin); pthread_mutex_unlock(application_context->mutex); /* retrieve word size */ pthread_mutex_lock(mutex); switch(devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { #ifdef AGS_WITH_ALSA format = SND_PCM_FORMAT_S8; #endif word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { #ifdef AGS_WITH_ALSA format = SND_PCM_FORMAT_S16; #endif word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { #ifdef AGS_WITH_ALSA format = SND_PCM_FORMAT_S24; #endif //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { #ifdef AGS_WITH_ALSA format = SND_PCM_FORMAT_S32; #endif word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_devin_alsa_init(): unsupported word size"); return; } /* prepare for capture */ devin->flags |= (AGS_DEVIN_BUFFER3 | AGS_DEVIN_START_RECORD | AGS_DEVIN_RECORD | AGS_DEVIN_NONBLOCKING); memset(devin->buffer[0], 0, devin->pcm_channels * devin->buffer_size * word_size); memset(devin->buffer[1], 0, devin->pcm_channels * devin->buffer_size * word_size); memset(devin->buffer[2], 0, devin->pcm_channels * devin->buffer_size * word_size); memset(devin->buffer[3], 0, devin->pcm_channels * devin->buffer_size * word_size); /* allocate ring buffer */ #ifdef AGS_WITH_ALSA g_atomic_int_set(&(devin->available), FALSE); devin->ring_buffer = (unsigned char **) malloc(devin->ring_buffer_size * sizeof(unsigned char *)); for(i = 0; i < devin->ring_buffer_size; i++){ devin->ring_buffer[i] = (unsigned char *) malloc(devin->pcm_channels * devin->buffer_size * (snd_pcm_format_physical_width(format) / 8) * sizeof(unsigned char)); } /* */ period_event = 0; /* Open PCM device for capture. */ if ((err = snd_pcm_open(&handle, devin->out.alsa.device, SND_PCM_STREAM_CAPTURE, 0)) < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Capture open error: %s", str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_LOCKED_SOUNDCARD, "unable to open pcm device: %s", str); } // free(str); return; } snd_pcm_hw_params_alloca(&hwparams); snd_pcm_sw_params_alloca(&swparams); /* choose all parameters */ err = snd_pcm_hw_params_any(handle, hwparams); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Broken configuration for capture: no configurations available: %s", str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_BROKEN_CONFIGURATION, "unable to open pcm device: %s", str); } devin->out.alsa.handle = NULL; // free(str); return; } /* set hardware resampling * / err = snd_pcm_hw_params_set_rate_resample(handle, hwparams, 0); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Resampling setup failed for capture: %s\n", str); // free(str); return; } */ /* set the interleaved read/write format */ err = snd_pcm_hw_params_set_access(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Access type not available for capture: %s", str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_ACCESS_TYPE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.alsa.handle = NULL; // free(str); return; } /* set the sample format */ err = snd_pcm_hw_params_set_format(handle, hwparams, format); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Sample format not available for capture: %s", str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.alsa.handle = NULL; // free(str); return; } /* set the count of channels */ channels = devin->pcm_channels; err = snd_pcm_hw_params_set_channels(handle, hwparams, channels); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Channels count (%i) not available for capture: %s", channels, str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_CHANNELS_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.alsa.handle = NULL; // free(str); return; } /* set the stream rate */ rate = devin->samplerate; rrate = rate; err = snd_pcm_hw_params_set_rate_near(handle, hwparams, &rrate, 0); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Rate %iHz not available for capture: %s", rate, str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_SAMPLERATE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.alsa.handle = NULL; // free(str); return; } if (rrate != rate) { pthread_mutex_unlock(mutex); g_warning("Rate doesn't match (requested %iHz, get %iHz)", rate, err); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_SAMPLERATE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.alsa.handle = NULL; return; } /* set the buffer size */ size = 2 * devin->buffer_size; err = snd_pcm_hw_params_set_buffer_size(handle, hwparams, size); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set buffer size %lu for capture: %s", size, str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_BUFFER_SIZE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.alsa.handle = NULL; // free(str); return; } /* set the period size * / period_size = devin->buffer_size; err = snd_pcm_hw_params_set_period_size_near(handle, hwparams, period_size, dir); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to get period size for capture: %s\n", str); // free(str); return; } */ /* write the parameters to device */ err = snd_pcm_hw_params(handle, hwparams); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set hw params for capture: %s", str); if(error != NULL){ g_set_error(error, AGS_DEVIN_ERROR, AGS_DEVIN_ERROR_HW_PARAMETERS_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devin->out.alsa.handle = NULL; // free(str); return; } /* get the current swparams * / err = snd_pcm_sw_params_current(handle, swparams); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to determine current swparams for capture: %s\n", str); // free(str); return; } */ /* start the transfer when the buffer is almost full: */ /* (buffer_size / avail_min) * avail_min * / err = snd_pcm_sw_params_set_start_threshold(handle, swparams, (buffer_size / period_size) * period_size); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set start threshold mode for capture: %s\n", str); // free(str); return; } */ /* allow the transfer when at least period_size samples can be processed */ /* or disable this mechanism when period event is enabled (aka interrupt like style processing) * / err = snd_pcm_sw_params_set_avail_min(handle, swparams, period_event ? buffer_size : period_size); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set avail min for capture: %s\n", str); // free(str); return; } /* write the parameters to the capture device * / err = snd_pcm_sw_params(handle, swparams); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set sw params for capture: %s\n", str); // free(str); return; } */ /* */ devin->out.alsa.handle = handle; #endif devin->tact_counter = 0.0; devin->delay_counter = 0.0; devin->tic_counter = 0; devin->nth_ring_buffer = 0; ags_soundcard_get_poll_fd(soundcard); #ifdef AGS_WITH_ALSA devin->flags |= AGS_DEVIN_INITIALIZED; #endif devin->flags |= AGS_DEVIN_BUFFER0; devin->flags &= (~(AGS_DEVIN_BUFFER1 | AGS_DEVIN_BUFFER2 | AGS_DEVIN_BUFFER3)); pthread_mutex_unlock(mutex); } void ags_devin_alsa_record(AgsSoundcard *soundcard, GError **error) { AgsDevin *devin; AgsNotifySoundcard *notify_soundcard; AgsTicDevice *tic_device; AgsClearBuffer *clear_buffer; AgsSwitchBufferFlag *switch_buffer_flag; AgsThread *task_thread; AgsPollFd *poll_fd; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *task; GList *list; gchar *str; guint word_size; guint nth_buffer; pthread_mutex_t *mutex; static const struct timespec poll_interval = { 0, 250, }; #ifdef AGS_WITH_ALSA auto void ags_devin_alsa_record_fill_ring_buffer(void *buffer, guint ags_format, unsigned char *ring_buffer, guint channels, guint buffer_size); void ags_devin_alsa_record_fill_ring_buffer(void *buffer, guint ags_format, unsigned char *ring_buffer, guint channels, guint buffer_size){ snd_pcm_format_t format; int format_bits; unsigned int max_val; int bps; /* bytes per sample */ int phys_bps; int big_endian; int to_unsigned; int res; gint count; guint i, chn; switch(ags_format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { format = SND_PCM_FORMAT_S8; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { format = SND_PCM_FORMAT_S16; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { format = SND_PCM_FORMAT_S24; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { format = SND_PCM_FORMAT_S32; } break; default: g_warning("ags_devin_alsa_record(): unsupported word size"); return; } count = buffer_size; format_bits = snd_pcm_format_width(format); max_val = (1 << (format_bits - 1)) - 1; bps = format_bits / 8; phys_bps = snd_pcm_format_physical_width(format) / 8; big_endian = snd_pcm_format_big_endian(format) == 1; to_unsigned = snd_pcm_format_unsigned(format) == 1; /* fill the channel areas */ for(count = 0; count < buffer_size; count++){ for(chn = 0; chn < channels; chn++){ switch(ags_format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { res = (int) ((signed char *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { res = (int) ((signed short *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { res = (int) ((signed long *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { res = (int) ((signed long *) buffer)[count * channels + chn]; } break; } if(to_unsigned){ res ^= 1U << (format_bits - 1); } /* Generate data in native endian format */ if (big_endian) { for (i = 0; i < bps; i++) *(ring_buffer + chn * bps + phys_bps - 1 - i) = (res >> i * 8) & 0xff; } else { for (i = 0; i < bps; i++) *(ring_buffer + chn * bps + i) = (res >> i * 8) & 0xff; } } ring_buffer += channels * bps; } } #endif devin = AGS_DEVIN(soundcard); /* */ application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devin); pthread_mutex_unlock(application_context->mutex); /* lock */ pthread_mutex_lock(mutex); notify_soundcard = AGS_NOTIFY_SOUNDCARD(devin->notify_soundcard); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); /* retrieve word size */ switch(devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_devin_alsa_record(): unsupported word size"); return; } /* do capture */ devin->flags &= (~AGS_DEVIN_START_RECORD); if((AGS_DEVIN_INITIALIZED & (devin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } // g_message("record - 0x%0x", ((AGS_DEVIN_BUFFER0 | // AGS_DEVIN_BUFFER1 | // AGS_DEVIN_BUFFER2 | // AGS_DEVIN_BUFFER3) & (devin->flags))); /* check buffer flag */ if((AGS_DEVIN_BUFFER0 & (devin->flags)) != 0){ nth_buffer = 0; }else if((AGS_DEVIN_BUFFER1 & (devin->flags)) != 0){ nth_buffer = 1; }else if((AGS_DEVIN_BUFFER2 & (devin->flags)) != 0){ nth_buffer = 2; }else if((AGS_DEVIN_BUFFER3 & (devin->flags)) != 0){ nth_buffer = 3; } #ifdef AGS_WITH_ALSA /* fill ring buffer */ ags_devin_alsa_record_fill_ring_buffer(devin->buffer[nth_buffer], devin->format, devin->ring_buffer[devin->nth_ring_buffer], devin->pcm_channels, devin->buffer_size); /* wait until available */ list = ags_soundcard_get_poll_fd(soundcard); if(!ags_soundcard_is_available(soundcard) && !g_atomic_int_get(&(devin->available)) && list != NULL){ poll_fd = list->data; poll_fd->poll_fd->events = POLLOUT; while(!ags_soundcard_is_available(soundcard) && !g_atomic_int_get(&(devin->available))){ ppoll(poll_fd->poll_fd, 1, &poll_interval, NULL); } } /* write ring buffer */ devin->out.alsa.rc = snd_pcm_readi(devin->out.alsa.handle, devin->ring_buffer[devin->nth_ring_buffer], (snd_pcm_uframes_t) (devin->buffer_size)); g_atomic_int_set(&(devin->available), FALSE); /* check error flag */ if((AGS_DEVIN_NONBLOCKING & (devin->flags)) == 0){ if(devin->out.alsa.rc == -EPIPE){ /* EPIPE means underrun */ snd_pcm_prepare(devin->out.alsa.handle); #ifdef AGS_DEBUG g_message("underrun occurred"); #endif }else if(devin->out.alsa.rc == -ESTRPIPE){ static const struct timespec idle = { 0, 4000, }; int err; while((err = snd_pcm_resume(devin->out.alsa.handle)) < 0){ // == -EAGAIN nanosleep(&idle, NULL); /* wait until the suspend flag is released */ } if(err < 0){ err = snd_pcm_prepare(devin->out.alsa.handle); } }else if(devin->out.alsa.rc < 0){ str = snd_strerror(devin->out.alsa.rc); g_message("error from writei: %s", str); }else if(devin->out.alsa.rc != (int) devin->buffer_size) { g_message("short write, write %d frames", devin->out.alsa.rc); } } #endif /* increment nth ring-buffer */ g_atomic_int_set(&(devin->available), FALSE); if(devin->nth_ring_buffer + 1 >= devin->ring_buffer_size){ devin->nth_ring_buffer = 0; }else{ devin->nth_ring_buffer += 1; } pthread_mutex_unlock(mutex); /* update soundcard */ task_thread = ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_TASK_THREAD); task = NULL; /* tic soundcard */ tic_device = ags_tic_device_new((GObject *) devin); task = g_list_append(task, tic_device); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) devin); task = g_list_append(task, clear_buffer); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) devin); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); #ifdef AGS_WITH_ALSA snd_pcm_prepare(devin->out.alsa.handle); #endif } void ags_devin_alsa_free(AgsSoundcard *soundcard) { AgsDevin *devin; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *poll_fd; guint i; pthread_mutex_t *mutex; devin = AGS_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devin); pthread_mutex_unlock(application_context->mutex); /* lock */ pthread_mutex_lock(mutex); #ifdef AGS_WITH_ALSA /* remove poll fd */ poll_fd = devin->poll_fd; while(poll_fd != NULL){ ags_polling_thread_remove_poll_fd(AGS_POLL_FD(poll_fd->data)->polling_thread, poll_fd->data); g_object_unref(poll_fd->data); poll_fd = poll_fd->next; } g_list_free(poll_fd); devin->poll_fd = NULL; #endif notify_soundcard = AGS_NOTIFY_SOUNDCARD(devin->notify_soundcard); if((AGS_DEVIN_INITIALIZED & (devin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } #ifdef AGS_WITH_ALSA snd_pcm_drain(devin->out.alsa.handle); snd_pcm_close(devin->out.alsa.handle); devin->out.alsa.handle = NULL; #endif /* free ring-buffer */ for(i = 0; i < devin->ring_buffer_size; i++){ free(devin->ring_buffer[i]); } free(devin->ring_buffer); devin->ring_buffer = NULL; /* reset flags */ devin->flags &= (~(AGS_DEVIN_BUFFER0 | AGS_DEVIN_BUFFER1 | AGS_DEVIN_BUFFER2 | AGS_DEVIN_BUFFER3 | AGS_DEVIN_RECORD | AGS_DEVIN_INITIALIZED)); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); devin->note_offset = 0; devin->note_offset_absolute = 0; pthread_mutex_unlock(mutex); } void ags_devin_tic(AgsSoundcard *soundcard) { AgsDevin *devin; gdouble delay; devin = AGS_DEVIN(soundcard); /* determine if attack should be switched */ delay = devin->delay[devin->tic_counter]; if((guint) devin->delay_counter + 1 >= (guint) delay){ if(devin->do_loop && devin->note_offset + 1 == devin->loop_right){ ags_soundcard_set_note_offset(soundcard, devin->loop_left); }else{ ags_soundcard_set_note_offset(soundcard, devin->note_offset + 1); } ags_soundcard_set_note_offset_absolute(soundcard, devin->note_offset_absolute + 1); /* delay */ ags_soundcard_offset_changed(soundcard, devin->note_offset); /* reset - delay counter */ devin->delay_counter = 0.0; devin->tact_counter += 1.0; }else{ devin->delay_counter += 1.0; } } void ags_devin_offset_changed(AgsSoundcard *soundcard, guint note_offset) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); devin->tic_counter += 1; if(devin->tic_counter == AGS_SOUNDCARD_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ devin->tic_counter = 0; } } void ags_devin_set_bpm(AgsSoundcard *soundcard, gdouble bpm) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); devin->bpm = bpm; ags_devin_adjust_delay_and_attack(devin); } gdouble ags_devin_get_bpm(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); return(devin->bpm); } void ags_devin_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); devin->delay_factor = delay_factor; ags_devin_adjust_delay_and_attack(devin); } gdouble ags_devin_get_delay_factor(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); return(devin->delay_factor); } gdouble ags_devin_get_delay(AgsSoundcard *soundcard) { AgsDevin *devin; guint index; devin = AGS_DEVIN(soundcard); index = devin->tic_counter; return(devin->delay[index]); } gdouble ags_devin_get_absolute_delay(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); return((60.0 * (((gdouble) devin->samplerate / (gdouble) devin->buffer_size) / (gdouble) devin->bpm) * ((1.0 / 16.0) * (1.0 / (gdouble) devin->delay_factor)))); } guint ags_devin_get_attack(AgsSoundcard *soundcard) { AgsDevin *devin; guint index; devin = AGS_DEVIN(soundcard); index = devin->tic_counter; return(devin->attack[index]); } void* ags_devin_get_buffer(AgsSoundcard *soundcard) { AgsDevin *devin; void *buffer; devin = AGS_DEVIN(soundcard); if((AGS_DEVIN_BUFFER0 & (devin->flags)) != 0){ buffer = devin->buffer[0]; }else if((AGS_DEVIN_BUFFER1 & (devin->flags)) != 0){ buffer = devin->buffer[1]; }else if((AGS_DEVIN_BUFFER2 & (devin->flags)) != 0){ buffer = devin->buffer[2]; }else if((AGS_DEVIN_BUFFER3 & (devin->flags)) != 0){ buffer = devin->buffer[3]; }else{ buffer = NULL; } return(buffer); } void* ags_devin_get_next_buffer(AgsSoundcard *soundcard) { AgsDevin *devin; void *buffer; devin = AGS_DEVIN(soundcard); // g_message("next - 0x%0x", ((AGS_DEVIN_BUFFER0 | // AGS_DEVIN_BUFFER1 | // AGS_DEVIN_BUFFER2 | // AGS_DEVIN_BUFFER3) & (devin->flags))); if((AGS_DEVIN_BUFFER0 & (devin->flags)) != 0){ buffer = devin->buffer[1]; }else if((AGS_DEVIN_BUFFER1 & (devin->flags)) != 0){ buffer = devin->buffer[2]; }else if((AGS_DEVIN_BUFFER2 & (devin->flags)) != 0){ buffer = devin->buffer[3]; }else if((AGS_DEVIN_BUFFER3 & (devin->flags)) != 0){ buffer = devin->buffer[0]; }else{ buffer = NULL; } return(buffer); } void* ags_devin_get_prev_buffer(AgsSoundcard *soundcard) { AgsDevin *devin; void *buffer; devin = AGS_DEVIN(soundcard); if((AGS_DEVIN_BUFFER0 & (devin->flags)) != 0){ buffer = devin->buffer[3]; }else if((AGS_DEVIN_BUFFER1 & (devin->flags)) != 0){ buffer = devin->buffer[0]; }else if((AGS_DEVIN_BUFFER2 & (devin->flags)) != 0){ buffer = devin->buffer[1]; }else if((AGS_DEVIN_BUFFER3 & (devin->flags)) != 0){ buffer = devin->buffer[2]; }else{ buffer = NULL; } return(buffer); } guint ags_devin_get_delay_counter(AgsSoundcard *soundcard) { return(AGS_DEVIN(soundcard)->delay_counter); } void ags_devin_set_note_offset(AgsSoundcard *soundcard, guint note_offset) { AGS_DEVIN(soundcard)->note_offset = note_offset; } guint ags_devin_get_note_offset(AgsSoundcard *soundcard) { return(AGS_DEVIN(soundcard)->note_offset); } void ags_devin_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset) { AGS_DEVIN(soundcard)->note_offset_absolute = note_offset; } guint ags_devin_get_note_offset_absolute(AgsSoundcard *soundcard) { return(AGS_DEVIN(soundcard)->note_offset_absolute); } void ags_devin_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop) { AGS_DEVIN(soundcard)->loop_left = loop_left; AGS_DEVIN(soundcard)->loop_right = loop_right; AGS_DEVIN(soundcard)->do_loop = do_loop; if(do_loop){ AGS_DEVIN(soundcard)->loop_offset = AGS_DEVIN(soundcard)->note_offset; } } void ags_devin_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop) { if(loop_left != NULL){ *loop_left = AGS_DEVIN(soundcard)->loop_left; } if(loop_right != NULL){ *loop_right = AGS_DEVIN(soundcard)->loop_right; } if(do_loop != NULL){ *do_loop = AGS_DEVIN(soundcard)->do_loop; } } guint ags_devin_get_loop_offset(AgsSoundcard *soundcard) { return(AGS_DEVIN(soundcard)->loop_offset); } void ags_devin_set_audio(AgsSoundcard *soundcard, GList *audio) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); devin->audio = audio; } GList* ags_devin_get_audio(AgsSoundcard *soundcard) { AgsDevin *devin; devin = AGS_DEVIN(soundcard); return(devin->audio); } /** * ags_devin_adjust_delay_and_attack: * @devin: the #AgsDevin * * Calculate delay and attack and reset it. * * Since: 1.2.0 */ void ags_devin_adjust_delay_and_attack(AgsDevin *devin) { gdouble delay; guint default_tact_frames; guint delay_tact_frames; guint default_period; gint next_attack; guint i; if(devin == NULL){ return; } delay = ags_devin_get_absolute_delay(AGS_SOUNDCARD(devin)); #ifdef AGS_DEBUG g_message("delay : %f", delay); #endif default_tact_frames = (guint) (delay * devin->buffer_size); delay_tact_frames = (guint) (floor(delay) * devin->buffer_size); default_period = (1.0 / AGS_SOUNDCARD_DEFAULT_PERIOD) * (default_tact_frames); i = 0; devin->attack[0] = (guint) floor(0.25 * devin->buffer_size); next_attack = (((devin->attack[i] + default_tact_frames) / devin->buffer_size) - delay) * devin->buffer_size; if(next_attack >= devin->buffer_size){ next_attack = devin->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ devin->attack[i] = devin->attack[i] - ((gdouble) next_attack / 2.0); if(devin->attack[i] < 0){ devin->attack[i] = 0; } if(devin->attack[i] >= devin->buffer_size){ devin->attack[i] = devin->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= devin->buffer_size){ next_attack = devin->buffer_size - 1; } } for(i = 1; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD; i++){ devin->attack[i] = next_attack; next_attack = (((devin->attack[i] + default_tact_frames) / devin->buffer_size) - delay) * devin->buffer_size; if(next_attack >= devin->buffer_size){ next_attack = devin->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ devin->attack[i] = devin->attack[i] - ((gdouble) next_attack / 2.0); if(devin->attack[i] < 0){ devin->attack[i] = 0; } if(devin->attack[i] >= devin->buffer_size){ devin->attack[i] = devin->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= devin->buffer_size){ next_attack = devin->buffer_size - 1; } } #ifdef AGS_DEBUG g_message("%d", devin->attack[i]); #endif } devin->attack[0] = devin->attack[i - 2]; for(i = 0; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD - 1; i++){ devin->delay[i] = ((gdouble) (default_tact_frames + devin->attack[i] - devin->attack[i + 1])) / (gdouble) devin->buffer_size; #ifdef AGS_DEBUG g_message("%f", devin->delay[i]); #endif } devin->delay[i] = ((gdouble) (default_tact_frames + devin->attack[i] - devin->attack[0])) / (gdouble) devin->buffer_size; } /** * ags_devin_realloc_buffer: * @devin: the #AgsDevin * * Reallocate the internal audio buffer. * * Since: 1.2.0 */ void ags_devin_realloc_buffer(AgsDevin *devin) { guint word_size; if(devin == NULL){ return; } switch(devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_devin_realloc_buffer(): unsupported word size"); return; } /* AGS_DEVIN_BUFFER_0 */ if(devin->buffer[0] != NULL){ free(devin->buffer[0]); } devin->buffer[0] = (void *) malloc(devin->pcm_channels * devin->buffer_size * word_size); /* AGS_DEVIN_BUFFER_1 */ if(devin->buffer[1] != NULL){ free(devin->buffer[1]); } devin->buffer[1] = (void *) malloc(devin->pcm_channels * devin->buffer_size * word_size); /* AGS_DEVIN_BUFFER_2 */ if(devin->buffer[2] != NULL){ free(devin->buffer[2]); } devin->buffer[2] = (void *) malloc(devin->pcm_channels * devin->buffer_size * word_size); /* AGS_DEVIN_BUFFER_3 */ if(devin->buffer[3] != NULL){ free(devin->buffer[3]); } devin->buffer[3] = (void *) malloc(devin->pcm_channels * devin->buffer_size * word_size); } /** * ags_devin_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsDevin, refering to @application_context. * * Returns: a new #AgsDevin * * Since: 1.2.0 */ AgsDevin* ags_devin_new(GObject *application_context) { AgsDevin *devin; devin = (AgsDevin *) g_object_new(AGS_TYPE_DEVIN, "application-context", application_context, NULL); return(devin); } gsequencer-1.4.24/ags/audio/ags_recall_adaptor_run.c0000644000175000017500000002662713246707333017422 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_recall_adaptor_run_class_init(AgsRecallAdaptorRunClass *recall_adaptor_run); void ags_recall_adaptor_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_adaptor_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_recall_adaptor_run_init(AgsRecallAdaptorRun *recall_adaptor_run); void ags_recall_adaptor_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_adaptor_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_adaptor_run_finalize(GObject *gobject); void ags_recall_adaptor_run_connect(AgsConnectable *connectable); void ags_recall_adaptor_run_disconnect(AgsConnectable *connectable); void ags_recall_adaptor_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_adaptor_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); AgsRecall* ags_recall_adaptor_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_recall_adaptor_run_run_inter(AgsRecall *recall); /** * SECTION:ags_recall_adaptor_run * @short_description: recall adaptor * @title: AgsRecallAdaptorRun * @section_id: * @include: ags/audio/recall/ags_recall_adaptor_run.h * * The #AgsRecallAdaptorRun acts as an adaptor of different audio * mapping. It is used to divide out non-/interleaved multi channel * audio buffers. */ static gpointer ags_recall_adaptor_run_parent_class = NULL; static AgsConnectableInterface* ags_recall_adaptor_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_recall_adaptor_run_parent_dynamic_connectable_interface; GType ags_recall_adaptor_run_get_type() { static GType ags_type_recall_adaptor_run = 0; if(!ags_type_recall_adaptor_run){ static const GTypeInfo ags_recall_adaptor_run_info = { sizeof (AgsRecallAdaptorRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_adaptor_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallAdaptorRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_adaptor_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_adaptor_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_adaptor_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_adaptor_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsRecallAdaptorRun", &ags_recall_adaptor_run_info, 0); g_type_add_interface_static(ags_type_recall_adaptor_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_adaptor_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_recall_adaptor_run); } void ags_recall_adaptor_run_class_init(AgsRecallAdaptorRunClass *recall_adaptor_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_adaptor_run_parent_class = g_type_class_peek_parent(recall_adaptor_run); /* GObjectClass */ gobject = (GObjectClass *) recall_adaptor_run; gobject->set_property = ags_recall_adaptor_run_set_property; gobject->get_property = ags_recall_adaptor_run_get_property; gobject->finalize = ags_recall_adaptor_run_finalize; /* properties */ /* AgsRecallClass */ recall = (AgsRecallClass *) recall_adaptor_run; recall->run_inter = ags_recall_adaptor_run_run_inter; } void ags_recall_adaptor_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_adaptor_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_adaptor_run_connect; connectable->disconnect = ags_recall_adaptor_run_disconnect; } void ags_recall_adaptor_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_recall_adaptor_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_recall_adaptor_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_recall_adaptor_run_disconnect_dynamic; } void ags_recall_adaptor_run_init(AgsRecallAdaptorRun *recall_adaptor_run) { } void ags_recall_adaptor_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallAdaptorRun *recall_adaptor_run; recall_adaptor_run = AGS_RECALL_ADAPTOR_RUN(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_adaptor_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallAdaptorRun *recall_adaptor_run; recall_adaptor_run = AGS_RECALL_ADAPTOR_RUN(gobject); switch(prop_id){ default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_adaptor_run_finalize(GObject *gobject) { AgsRecallAdaptorRun *recall_adaptor_run; recall_adaptor_run = AGS_RECALL_ADAPTOR_RUN(gobject); G_OBJECT_CLASS(ags_recall_adaptor_run_parent_class)->finalize(gobject); } void ags_recall_adaptor_run_connect(AgsConnectable *connectable) { AgsRecallAdaptorRun *recall_adaptor_run; if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_recall_adaptor_run_parent_connectable_interface->connect(connectable); recall_adaptor_run = AGS_RECALL_ADAPTOR_RUN(connectable); } void ags_recall_adaptor_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_recall_adaptor_run_parent_connectable_interface->disconnect(connectable); } void ags_recall_adaptor_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRecallAdaptorRun *recall_adaptor_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } recall_adaptor_run = AGS_RECALL_ADAPTOR_RUN(dynamic_connectable); /* call parent */ ags_recall_adaptor_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_recall_adaptor_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRecallAdaptorRun *recall_adaptor_run; /* call parent */ ags_recall_adaptor_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); recall_adaptor_run = AGS_RECALL_ADAPTOR_RUN(dynamic_connectable); } AgsRecall* ags_recall_adaptor_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecallAudio *recall_audio; AgsRecallAdaptorRun *copy; AgsMutexManager *mutex_manager; guint buffer_size; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; /* */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get recall audio */ recall_audio = AGS_RECALL_AUDIO_RUN(recall)->recall_audio; /* duplicate */ copy = AGS_RECALL_ADAPTOR_RUN(AGS_RECALL_CLASS(ags_recall_adaptor_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); /* audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, recall_audio->audio); pthread_mutex_unlock(application_mutex); /* get buffer size */ pthread_mutex_lock(audio_mutex); buffer_size = recall_audio->audio->buffer_size; pthread_mutex_unlock(audio_mutex); /* allocate multi-channel buffer */ copy->buffer = malloc(recall_audio->n_channels * buffer_size); memset(copy->buffer, 0, recall_audio->n_channels * buffer_size); return((AgsRecall *) copy); } void ags_recall_adaptor_run_run_inter(AgsRecall *recall) { AgsAudio *audio; AgsChannel *start, *current; AgsRecallAudio *recall_audio; AgsRecallAdaptorRun *recall_adaptor_run; AgsMutexManager *mutex_manager; guint samplerate; guint buffer_size; guint format; guint audio_channels; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* */ recall_adaptor_run = (AgsRecallAdaptorRun *) recall; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get recall audio */ recall_audio = AGS_RECALL_AUDIO_RUN(recall)->recall_audio; audio = recall_audio->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, audio); pthread_mutex_unlock(application_mutex); /* get buffer size */ pthread_mutex_lock(audio_mutex); start = audio->input; samplerate = audio->samplerate; buffer_size = audio->buffer_size; format = audio->format; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* fill the adapted buffers */ for(i = 0; i < audio_channels; i++){ current = ags_channel_nth(start, recall_audio->mapping[i]); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, current); pthread_mutex_unlock(application_mutex); if(current != NULL){ pthread_mutex_lock(channel_mutex); pthread_mutex_unlock(channel_mutex); //TODO:JK: implement me // ags_audio_buffer_util_copy_buffer_to_buffer(,); } } /* call parent */ AGS_RECALL_CLASS(ags_recall_adaptor_run_parent_class)->run_inter(recall); } /** * ags_recall_adaptor_run_new: * * Creates an #AgsRecallAdaptorRun * * Returns: a new #AgsRecallAdaptorRun * * Since: 1.0.0 */ AgsRecallAdaptorRun* ags_recall_adaptor_run_new() { AgsRecallAdaptorRun *recall_adaptor_run; recall_adaptor_run = (AgsRecallAdaptorRun *) g_object_new(AGS_TYPE_RECALL_ADAPTOR_RUN, NULL); return(recall_adaptor_run); } gsequencer-1.4.24/ags/audio/thread/0000755000175000017500000000000013256233674014101 500000000000000gsequencer-1.4.24/ags/audio/thread/ags_audio_loop.h0000644000175000017500000001214013256163135017146 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUDIO_LOOP_H__ #define __AGS_AUDIO_LOOP_H__ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #define AGS_TYPE_AUDIO_LOOP (ags_audio_loop_get_type()) #define AGS_AUDIO_LOOP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_LOOP, AgsAudioLoop)) #define AGS_AUDIO_LOOP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_AUDIO_LOOP, AgsAudioLoopClass)) #define AGS_IS_AUDIO_LOOP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUDIO_LOOP)) #define AGS_IS_AUDIO_LOOP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUDIO_LOOP)) #define AGS_AUDIO_LOOP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_AUDIO_LOOP, AgsAudioLoopClass)) #define AGS_AUDIO_LOOP_DEFAULT_JIFFIE (ceil(AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK) typedef struct _AgsAudioLoop AgsAudioLoop; typedef struct _AgsAudioLoopClass AgsAudioLoopClass; /** * AgsAudioLoopFlags: * @AGS_AUDIO_LOOP_PLAY_RECALL: play recall * @AGS_AUDIO_LOOP_PLAYING_RECALL: plaing recall * @AGS_AUDIO_LOOP_PLAY_RECALL_TERMINATING: play recall terminating * @AGS_AUDIO_LOOP_PLAY_CHANNEL: play channel * @AGS_AUDIO_LOOP_PLAYING_CHANNEL: playing channnel * @AGS_AUDIO_LOOP_PLAY_CHANNEL_TERMINATING: play channe terminating * @AGS_AUDIO_LOOP_PLAY_AUDIO: play audio * @AGS_AUDIO_LOOP_PLAYING_AUDIO: playing audio * @AGS_AUDIO_LOOP_PLAY_NOTATION: play notation * @AGS_AUDIO_LOOP_PLAYING_NOTATION: playing notation * @AGS_AUDIO_LOOP_PLAY_AUDIO_TERMINATING: play audio terminating * * Enum values to control the behavior or indicate internal state of #AgsAudioLoop by * enable/disable as flags. */ typedef enum{ AGS_AUDIO_LOOP_PLAY_RECALL = 1, AGS_AUDIO_LOOP_PLAYING_RECALL = 1 << 1, AGS_AUDIO_LOOP_PLAY_RECALL_TERMINATING = 1 << 2, AGS_AUDIO_LOOP_PLAY_CHANNEL = 1 << 3, AGS_AUDIO_LOOP_PLAYING_CHANNEL = 1 << 4, AGS_AUDIO_LOOP_PLAY_CHANNEL_TERMINATING = 1 << 5, AGS_AUDIO_LOOP_PLAY_AUDIO = 1 << 6, AGS_AUDIO_LOOP_PLAYING_AUDIO = 1 << 7, AGS_AUDIO_LOOP_PLAY_NOTATION = 1 << 8, AGS_AUDIO_LOOP_PLAYING_NOTATION = 1 << 9, AGS_AUDIO_LOOP_PLAY_AUDIO_TERMINATING = 1 << 10, }AgsAudioLoopFlags; /** * AgsAudioLoopTimingFlags: * @AGS_AUDIO_LOOP_TIMING_WAITING: timing waiting * @AGS_AUDIO_LOOP_TIMING_WAKEUP: timing wakeup * * Enum values to control timing. */ typedef enum{ AGS_AUDIO_LOOP_TIMING_WAITING = 1, AGS_AUDIO_LOOP_TIMING_WAKEUP = 1 << 1, }AgsAudioLoopTimingFlags; struct _AgsAudioLoop { AgsThread thread; guint flags; volatile guint timing_flags; volatile guint tic; volatile guint last_sync; guint time_cycle; volatile guint time_spent; GObject *application_context; GObject *soundcard; GObject *async_queue; pthread_mutexattr_t tree_lock_mutexattr; pthread_mutex_t *tree_lock; pthread_mutex_t *recall_mutex; GMutex mutex; GCond cond; GMainContext *main_context; gint cached_poll_array_size; GPollFD *cached_poll_array; pthread_mutex_t *timing_mutex; pthread_cond_t *timing_cond; pthread_t *timing_thread; guint play_recall_ref; GList *play_recall; // play AgsRecall guint play_channel_ref; GList *play_channel; // play AgsChannel guint play_audio_ref; GList *play_audio; // play AgsAudio guint play_notation_ref; GList *play_notation; GList *tree_sanity; }; struct _AgsAudioLoopClass { AgsThreadClass thread; }; GType ags_audio_loop_get_type(); void ags_audio_loop_add_audio(AgsAudioLoop *audio_loop, GObject *audio); void ags_audio_loop_remove_audio(AgsAudioLoop *audio_loop, GObject *audio); void ags_audio_loop_add_channel(AgsAudioLoop *audio_loop, GObject *channel); void ags_audio_loop_remove_channel(AgsAudioLoop *audio_loop, GObject *channel); void ags_audio_loop_add_recall(AgsAudioLoop *audio_loop, gpointer playback); void ags_audio_loop_remove_recall(AgsAudioLoop *audio_loop, gpointer playback); AgsAudioLoop* ags_audio_loop_new(GObject *soundcard, GObject *application_context); #endif /*__AGS_AUDIO_LOOP_H__*/ gsequencer-1.4.24/ags/audio/thread/ags_recycling_thread.c0000644000175000017500000004737713256163135020341 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recycling_thread_class_init(AgsRecyclingThreadClass *recycling_thread); void ags_recycling_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recycling_thread_init(AgsRecyclingThread *recycling_thread); void ags_recycling_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recycling_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recycling_thread_connect(AgsConnectable *connectable); void ags_recycling_thread_disconnect(AgsConnectable *connectable); void ags_recycling_thread_finalize(GObject *gobject); void* ags_recycling_thread_queue(void *data); void ags_recycling_thread_start(AgsThread *thread); void ags_recycling_thread_run(AgsThread *thread); void ags_recycling_thread_real_play_channel(AgsRecyclingThread *recycling_thread, GObject *channel, AgsRecallID *recall_id, gint stage); void ags_recycling_thread_real_play_audio(AgsRecyclingThread *recycling_thread, GObject *output, GObject *audio, AgsRecallID *recall_id, gint stage); void ags_recycling_thread_play_channel_worker(AgsRecyclingThread *recycling_thread, GObject *channel, AgsRecallID *recall_id, gint stage); void ags_recycling_thread_play_audio_worker(AgsRecyclingThread *recycling_thread, GObject *output, GObject *audio, AgsRecallID *recall_id, gint stage); enum{ PROP_0, PROP_ITERATOR_THREAD, PROP_FIRST_RECYCLING, PROP_LAST_RECYCLING, }; enum{ PLAY_AUDIO, PLAY_CHANNEL, LAST_SIGNAL, }; static gpointer ags_recycling_thread_parent_class = NULL; static AgsConnectableInterface *ags_recycling_thread_parent_connectable_interface; static guint recycling_thread_signals[LAST_SIGNAL]; GType ags_recycling_thread_get_type() { static GType ags_type_recycling_thread = 0; if(!ags_type_recycling_thread){ static const GTypeInfo ags_recycling_thread_info = { sizeof (AgsRecyclingThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recycling_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecyclingThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recycling_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recycling_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recycling_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsRecyclingThread", &ags_recycling_thread_info, 0); g_type_add_interface_static(ags_type_recycling_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_recycling_thread); } void ags_recycling_thread_class_init(AgsRecyclingThreadClass *recycling_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_recycling_thread_parent_class = g_type_class_peek_parent(recycling_thread); /* GObject */ gobject = (GObjectClass *) recycling_thread; gobject->set_property = ags_recycling_thread_set_property; gobject->get_property = ags_recycling_thread_get_property; gobject->finalize = ags_recycling_thread_finalize; /* properties */ param_spec = g_param_spec_object("iterator-thread", i18n_pspec("assigned iterator thread"), i18n_pspec("The iterator thread object it is assigned to"), AGS_TYPE_ITERATOR_THREAD, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ITERATOR_THREAD, param_spec); param_spec = g_param_spec_object("first-recycling", i18n_pspec("assigned first recycling"), i18n_pspec("The first recycling to acquire lock"), AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIRST_RECYCLING, param_spec); param_spec = g_param_spec_object("last-recycling", i18n_pspec("assigned last recycling"), i18n_pspec("The last recycling to acquire lock"), AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LAST_RECYCLING, param_spec); /* AgsThread */ thread = (AgsThreadClass *) recycling_thread; thread->start = ags_recycling_thread_start; thread->run = ags_recycling_thread_run; /* AgsRecyclingThread */ recycling_thread->play_channel = ags_recycling_thread_play_channel; recycling_thread->play_audio = ags_recycling_thread_play_audio; /* signals */ recycling_thread_signals[PLAY_CHANNEL] = g_signal_new("play_channel", G_TYPE_FROM_CLASS(recycling_thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsRecyclingThreadClass, play_channel), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_INT_BOOLEAN, G_TYPE_NONE, 5, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_INT, G_TYPE_BOOLEAN); recycling_thread_signals[PLAY_AUDIO] = g_signal_new("play_audio", G_TYPE_FROM_CLASS(recycling_thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsRecyclingThreadClass, play_audio), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_UINT_INT_BOOLEAN, G_TYPE_NONE, 9, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_UINT, G_TYPE_INT, G_TYPE_BOOLEAN); } void ags_recycling_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recycling_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recycling_thread_connect; connectable->disconnect = ags_recycling_thread_disconnect; } void ags_recycling_thread_init(AgsRecyclingThread *recycling_thread) { recycling_thread->flags = 0; recycling_thread->iterator_thread = NULL; recycling_thread->iteration_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(recycling_thread->iteration_mutex, NULL); recycling_thread->iteration_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(recycling_thread->iteration_cond, NULL); recycling_thread->worker_queue = (pthread_t *) malloc(sizeof(pthread_t)); recycling_thread->worker_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(recycling_thread->worker_mutex, NULL); recycling_thread->worker_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(recycling_thread->worker_cond, NULL); recycling_thread->first_recycling = NULL; recycling_thread->last_recycling = NULL; recycling_thread->worker = NULL; } void ags_recycling_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecyclingThread *recycling_thread; recycling_thread = AGS_RECYCLING_THREAD(gobject); switch(prop_id){ case PROP_ITERATOR_THREAD: { AgsThread *iterator_thread; iterator_thread = (AgsThread *) g_value_get_object(value); if(recycling_thread->iterator_thread == iterator_thread){ return; } if(recycling_thread->iterator_thread != NULL){ g_object_unref(recycling_thread->iterator_thread); } if(iterator_thread != NULL){ g_object_ref(iterator_thread); } recycling_thread->iterator_thread = iterator_thread; } break; case PROP_FIRST_RECYCLING: { AgsRecycling *first_recycling; first_recycling = (AgsRecycling *) g_value_get_object(value); if(recycling_thread->first_recycling == (GObject *) first_recycling){ return; } if(recycling_thread->first_recycling != NULL){ g_object_unref(recycling_thread->first_recycling); } if(first_recycling != NULL){ g_object_ref(first_recycling); } recycling_thread->first_recycling = (GObject *) first_recycling; } break; case PROP_LAST_RECYCLING: { AgsRecycling *last_recycling; last_recycling = (AgsRecycling *) g_value_get_object(value); if(recycling_thread->last_recycling == (GObject *) last_recycling){ return; } if(recycling_thread->last_recycling != NULL){ g_object_unref(recycling_thread->last_recycling); } if(last_recycling != NULL){ g_object_ref(last_recycling); } recycling_thread->last_recycling = (GObject *) last_recycling; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recycling_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecyclingThread *recycling_thread; recycling_thread = AGS_RECYCLING_THREAD(gobject); switch(prop_id){ case PROP_ITERATOR_THREAD: g_value_set_object(value, recycling_thread->iterator_thread); break; case PROP_FIRST_RECYCLING: g_value_set_object(value, recycling_thread->first_recycling); break; case PROP_LAST_RECYCLING: g_value_set_object(value, recycling_thread->last_recycling); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recycling_thread_connect(AgsConnectable *connectable) { AgsThread *thread; thread = AGS_THREAD(connectable); ags_recycling_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_recycling_thread_disconnect(AgsConnectable *connectable) { ags_recycling_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_recycling_thread_finalize(GObject *gobject) { AgsRecyclingThread *recycling_thread; recycling_thread = AGS_RECYCLING_THREAD(gobject); /* */ G_OBJECT_CLASS(ags_recycling_thread_parent_class)->finalize(gobject); } void* ags_recycling_thread_queue(void *data) { AgsRecyclingThread *recycling_thread; AgsRecyclingThreadWorker *worker; GList *list; guint flags; recycling_thread = AGS_RECYCLING_THREAD(data); while((AGS_THREAD_RUNNING & (g_atomic_int_get(&(recycling_thread->flags)))) != 0){ /* wait until fifo is available */ pthread_mutex_lock(recycling_thread->worker_mutex); g_atomic_int_and(&(recycling_thread->flags), ~AGS_RECYCLING_THREAD_WORKER_DONE); flags = g_atomic_int_get(&(recycling_thread->flags)); if((AGS_RECYCLING_THREAD_WORKER_WAIT & (flags)) != 0 && (AGS_RECYCLING_THREAD_WORKER_DONE & (flags)) == 0){ while((AGS_RECYCLING_THREAD_WORKER_WAIT & (flags)) != 0 && (AGS_RECYCLING_THREAD_WORKER_DONE & (flags)) == 0){ pthread_cond_wait(recycling_thread->worker_cond, recycling_thread->worker_mutex); flags = g_atomic_int_get(&(recycling_thread->flags)); } } g_atomic_int_or(&(recycling_thread->flags), (AGS_RECYCLING_THREAD_WORKER_WAIT | AGS_RECYCLING_THREAD_WORKER_DONE)); pthread_mutex_unlock(recycling_thread->worker_mutex); /* lock context */ ags_concurrent_tree_lock_context(AGS_CONCURRENT_TREE(recycling_thread->first_recycling)); /* process worker */ list = g_list_reverse(recycling_thread->worker); while(list != NULL){ worker = list->data; if(worker->audio_worker){ ags_recycling_thread_play_audio_worker(recycling_thread, worker->channel, worker->audio, worker->recall_id, worker->stage); }else{ ags_recycling_thread_play_channel_worker(recycling_thread, worker->channel, worker->recall_id, worker->stage); } list = list->next; } /* clear worker */ g_list_free_full(recycling_thread->worker, free); recycling_thread->worker = NULL; /* unlock context */ ags_concurrent_tree_unlock_context(AGS_CONCURRENT_TREE(recycling_thread->first_recycling)); /* notify iterator thread, signal fifo */ ags_iterator_thread_children_ready((AgsIteratorThread *) recycling_thread->iterator_thread, (AgsThread *) recycling_thread); } pthread_exit(NULL); } void ags_recycling_thread_start(AgsThread *thread) { AgsRecyclingThread *recycling_thread; recycling_thread = AGS_RECYCLING_THREAD(thread); pthread_create(recycling_thread->worker_queue, NULL, ags_recycling_thread_queue, thread); AGS_THREAD_CLASS(ags_recycling_thread_parent_class)->start(thread); } void ags_recycling_thread_run(AgsThread *thread) { AgsRecyclingThread *recycling_thread; guint flags; guint i; recycling_thread = AGS_RECYCLING_THREAD(thread); for(i = 0; i < 3; i++){ /* wait for next run */ ags_recycling_thread_fifo(recycling_thread); /* signal worker */ pthread_mutex_lock(recycling_thread->worker_mutex); g_atomic_int_and(&(recycling_thread->flags), ~AGS_RECYCLING_THREAD_WORKER_WAIT); flags = g_atomic_int_get(&(recycling_thread->flags)); if((AGS_RECYCLING_THREAD_WORKER_DONE & (flags)) == 0){ pthread_cond_signal(recycling_thread->worker_cond); } pthread_mutex_unlock(recycling_thread->worker_mutex); } } AgsRecyclingThreadWorker* ags_recycling_thread_worker_alloc(AgsRecyclingThread *recycling_thread, GObject *audio, GObject *channel, AgsRecallID *recall_id, gint stage, gboolean audio_worker) { AgsRecyclingThreadWorker *worker; worker = (AgsRecyclingThreadWorker *) malloc(sizeof(AgsRecyclingThreadWorker)); worker->audio = audio; worker->channel = channel; worker->recall_id = recall_id; worker->stage = stage; worker->audio_worker = audio_worker; return(worker); } void ags_recycling_thread_add_worker(AgsRecyclingThread *recycling_thread, AgsRecyclingThreadWorker *worker) { recycling_thread->worker = g_list_prepend(recycling_thread->worker, worker); } void ags_recycling_thread_remove_worker(AgsRecyclingThread *recycling_thread, AgsRecyclingThreadWorker *worker) { recycling_thread->worker = g_list_remove(recycling_thread->worker, worker); } void ags_recycling_thread_real_play_channel(AgsRecyclingThread *recycling_thread, GObject *channel, AgsRecallID *recall_id, gint stage) { ags_recycling_thread_add_worker(recycling_thread, ags_recycling_thread_worker_alloc(recycling_thread, NULL, channel, recall_id, stage, FALSE)); } void ags_recycling_thread_play_channel(AgsRecyclingThread *recycling_thread, GObject *channel, AgsRecallID *recall_id, gint stage) { g_return_if_fail(AGS_IS_RECYCLING_THREAD(recycling_thread)); g_return_if_fail(AGS_IS_CHANNEL(channel)); g_object_ref((GObject *) recycling_thread); g_signal_emit(G_OBJECT(recycling_thread), recycling_thread_signals[PLAY_CHANNEL], 0, channel, recall_id, stage); g_object_unref((GObject *) recycling_thread); } void ags_recycling_thread_real_play_audio(AgsRecyclingThread *recycling_thread, GObject *output, GObject *audio, AgsRecallID *recall_id, gint stage) { ags_recycling_thread_add_worker(recycling_thread, ags_recycling_thread_worker_alloc(recycling_thread, audio, output, recall_id, stage, TRUE)); } void ags_recycling_thread_play_audio(AgsRecyclingThread *recycling_thread, GObject *output, GObject *audio, AgsRecallID *recall_id, gint stage) { g_return_if_fail(AGS_IS_RECYCLING_THREAD(recycling_thread)); g_return_if_fail(AGS_IS_AUDIO(audio)); g_return_if_fail(AGS_IS_CHANNEL(output)); g_object_ref((GObject *) recycling_thread); g_signal_emit(G_OBJECT(recycling_thread), recycling_thread_signals[PLAY_CHANNEL], 0, output, audio, recall_id, stage); g_object_unref((GObject *) recycling_thread); } void ags_recycling_thread_play_channel_worker(AgsRecyclingThread *recycling_thread, GObject *channel, AgsRecallID *recall_id, gint stage) { ags_channel_play(AGS_CHANNEL(channel), recall_id, stage); } void ags_recycling_thread_play_audio_worker(AgsRecyclingThread *recycling_thread, GObject *output, GObject *audio, AgsRecallID *recall_id, gint stage) { AgsChannel *input; if((AGS_AUDIO_ASYNC & (AGS_AUDIO(audio)->flags)) != 0){ input = ags_channel_nth(AGS_AUDIO(audio)->input, AGS_CHANNEL(output)->audio_channel); }else{ input = ags_channel_nth(AGS_AUDIO(audio)->input, AGS_CHANNEL(output)->line); } if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (AGS_AUDIO(audio)->flags)) != 0){ AgsRecallID *input_recall_id; gint child_position; /* input_recall_id - check if there is a new recycling */ child_position = ags_recycling_context_find_child(recall_id->recycling_context, input->first_recycling); if(child_position == -1){ input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, recall_id->recycling_context); }else{ GList *list; list = g_list_nth(recall_id->recycling_context->children, child_position); if(list != NULL){ input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, AGS_RECYCLING_CONTEXT(list->data)); }else{ input_recall_id = NULL; } } ags_audio_play(AGS_AUDIO(audio), input_recall_id, stage); } ags_audio_play(AGS_AUDIO(audio), recall_id, stage); } AgsRecyclingThread* ags_recycling_thread_find_child(AgsRecyclingThread *recycling_thread, GObject *first_recycling) { //TODO:JK: implement me return(NULL); } void ags_recycling_thread_fifo(AgsRecyclingThread *recycling_thread) { guint flags; pthread_mutex_lock(recycling_thread->iteration_mutex); g_atomic_int_or(&(recycling_thread->flags), AGS_RECYCLING_THREAD_WAIT); flags = g_atomic_int_get(&(recycling_thread->flags)); while((AGS_RECYCLING_THREAD_WAIT & (flags)) != 0 && (AGS_RECYCLING_THREAD_DONE & (flags)) == 0){ pthread_cond_wait(recycling_thread->iteration_cond, recycling_thread->iteration_mutex); flags = g_atomic_int_get(&(recycling_thread->flags)); } pthread_mutex_unlock(recycling_thread->iteration_mutex); } AgsRecyclingThread* ags_recycling_thread_new(GObject *first_recycling, GObject *last_recycling) { AgsRecyclingThread *recycling_thread; recycling_thread = (AgsRecyclingThread *) g_object_new(AGS_TYPE_RECYCLING_THREAD, "first-recycling", first_recycling, "last-recycling", last_recycling, NULL); return(recycling_thread); } gsequencer-1.4.24/ags/audio/thread/ags_export_thread.c0000644000175000017500000003222213256223224017656 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_export_thread_class_init(AgsExportThreadClass *export_thread); void ags_export_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_export_thread_init(AgsExportThread *export_thread); void ags_export_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_export_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_export_thread_connect(AgsConnectable *connectable); void ags_export_thread_disconnect(AgsConnectable *connectable); void ags_export_thread_dispose(GObject *gobject); void ags_export_thread_finalize(GObject *gobject); void ags_export_thread_start(AgsThread *thread); void ags_export_thread_run(AgsThread *thread); void ags_export_thread_stop(AgsThread *thread); /** * SECTION:ags_export_thread * @short_description: export thread * @title: AgsExportThread * @section_id: * @include: ags/audio/thread/ags_export_thread.h * * The #AgsExportThread acts as audio output thread to file. */ enum{ PROP_0, PROP_SOUNDCARD, PROP_AUDIO_FILE, }; static gpointer ags_export_thread_parent_class = NULL; static AgsConnectableInterface *ags_export_thread_parent_connectable_interface; GType ags_export_thread_get_type() { static GType ags_type_export_thread = 0; if(!ags_type_export_thread){ static const GTypeInfo ags_export_thread_info = { sizeof (AgsExportThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_export_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsExportThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_export_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_export_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_export_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsExportThread", &ags_export_thread_info, 0); g_type_add_interface_static(ags_type_export_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_export_thread); } void ags_export_thread_class_init(AgsExportThreadClass *export_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_export_thread_parent_class = g_type_class_peek_parent(export_thread); /* GObject */ gobject = (GObjectClass *) export_thread; gobject->get_property = ags_export_thread_get_property; gobject->set_property = ags_export_thread_set_property; gobject->dispose = ags_export_thread_dispose; gobject->finalize = ags_export_thread_finalize; /* properties */ /** * AgsExportThread:soundcard: * * The assigned #AgsSoundcard. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard assigned to"), i18n_pspec("The AgsSoundcard it is assigned to"), G_TYPE_OBJECT, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsExportThread:audio-file: * * The assigned #AgsAudioFile. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-file", i18n_pspec("audio file to write"), i18n_pspec("The audio file to write output"), AGS_TYPE_AUDIO_FILE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_FILE, param_spec); /* AgsThread */ thread = (AgsThreadClass *) export_thread; thread->start = ags_export_thread_start; thread->run = ags_export_thread_run; thread->stop = ags_export_thread_stop; } void ags_export_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_export_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_export_thread_connect; connectable->disconnect = ags_export_thread_disconnect; } void ags_export_thread_init(AgsExportThread *export_thread) { AgsThread *thread; AgsConfig *config; gchar *str0, *str1; thread = (AgsThread *) export_thread; g_atomic_int_or(&(thread->flags), (AGS_THREAD_START_SYNCED_FREQ | AGS_THREAD_INTERMEDIATE_POST_SYNC)); config = ags_config_get_instance(); str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str0 == NULL){ str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str1 == NULL){ str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str0 == NULL || str1 == NULL){ thread->freq = AGS_EXPORT_THREAD_DEFAULT_JIFFIE; }else{ guint samplerate; guint buffer_size; samplerate = g_ascii_strtoull(str0, NULL, 10); buffer_size = g_ascii_strtoull(str1, NULL, 10); thread->freq = ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; } g_free(str0); g_free(str1); export_thread->flags = 0; export_thread->tic = 0; export_thread->counter = 0; export_thread->soundcard = NULL; export_thread->audio_file = NULL; } void ags_export_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsExportThread *export_thread; export_thread = AGS_EXPORT_THREAD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; guint samplerate; guint buffer_size; soundcard = (GObject *) g_value_get_object(value); if(export_thread->soundcard != NULL){ g_object_unref(G_OBJECT(export_thread->soundcard)); } if(soundcard != NULL){ g_object_ref(G_OBJECT(soundcard)); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, &buffer_size, NULL); g_object_set(export_thread, "frequency", ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK, NULL); if(AGS_IS_DEVOUT(soundcard)){ g_atomic_int_or(&(AGS_THREAD(export_thread)->flags), (AGS_THREAD_INTERMEDIATE_POST_SYNC)); }else if(AGS_IS_JACK_DEVOUT(soundcard) || AGS_IS_PULSE_DEVOUT(soundcard)){ g_atomic_int_and(&(AGS_THREAD(export_thread)->flags), (~AGS_THREAD_INTERMEDIATE_POST_SYNC)); }else if(AGS_IS_CORE_AUDIO_DEVOUT(soundcard)){ g_atomic_int_or(&(AGS_THREAD(export_thread)->flags), (AGS_THREAD_INTERMEDIATE_POST_SYNC)); } } export_thread->soundcard = G_OBJECT(soundcard); } break; case PROP_AUDIO_FILE: { AgsAudioFile *audio_file; audio_file = g_value_get_object(value); if(export_thread->audio_file == audio_file){ return; } if(export_thread->audio_file != NULL){ g_object_unref(export_thread->audio_file); } if(audio_file != NULL){ g_object_ref(audio_file); } export_thread->audio_file = audio_file; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_export_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsExportThread *export_thread; export_thread = AGS_EXPORT_THREAD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, G_OBJECT(export_thread->soundcard)); } break; case PROP_AUDIO_FILE: { g_value_set_object(value, export_thread->audio_file); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_export_thread_connect(AgsConnectable *connectable) { ags_export_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_export_thread_disconnect(AgsConnectable *connectable) { ags_export_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_export_thread_dispose(GObject *gobject) { AgsExportThread *export_thread; export_thread = AGS_EXPORT_THREAD(gobject); /* soundcard */ if(export_thread->soundcard != NULL){ g_object_unref(export_thread->soundcard); export_thread->soundcard = NULL; } /* audio file */ if(export_thread->audio_file != NULL){ g_object_unref(export_thread->audio_file); export_thread->audio_file = NULL; } /* call parent */ G_OBJECT_CLASS(ags_export_thread_parent_class)->dispose(gobject); } void ags_export_thread_finalize(GObject *gobject) { AgsExportThread *export_thread; export_thread = AGS_EXPORT_THREAD(gobject); /* soundcard */ if(export_thread->soundcard != NULL){ g_object_unref(export_thread->soundcard); } /* audio file */ if(export_thread->audio_file != NULL){ g_object_unref(export_thread->audio_file); } /* call parent */ G_OBJECT_CLASS(ags_export_thread_parent_class)->finalize(gobject); } void ags_export_thread_start(AgsThread *thread) { AgsExportThread *export_thread; //TODO:JK: implement me g_message("export start"); export_thread = (AgsExportThread *) thread; export_thread->counter = 0; AGS_THREAD_CLASS(ags_export_thread_parent_class)->start(thread); } void ags_export_thread_run(AgsThread *thread) { AgsExportThread *export_thread; AgsMutexManager *mutex_manager; AgsSoundcard *soundcard; void *soundcard_buffer; guint pcm_channels; guint buffer_size; guint format; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; export_thread = AGS_EXPORT_THREAD(thread); if(export_thread->counter == export_thread->tic){ ags_thread_stop(thread); }else{ export_thread->counter += 1; } /* */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) export_thread->soundcard); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(mutex); soundcard = AGS_SOUNDCARD(export_thread->soundcard); if(AGS_IS_JACK_DEVOUT(soundcard) || AGS_IS_PULSE_DEVOUT(soundcard)){ soundcard_buffer = ags_soundcard_get_prev_buffer(soundcard); }else{ soundcard_buffer = ags_soundcard_get_buffer(soundcard); } ags_soundcard_get_presets(soundcard, &pcm_channels, NULL, &buffer_size, &format); ags_audio_file_write(export_thread->audio_file, soundcard_buffer, (guint) buffer_size, format); pthread_mutex_unlock(mutex); } void ags_export_thread_stop(AgsThread *thread) { AgsExportThread *export_thread; export_thread = AGS_EXPORT_THREAD(thread); AGS_THREAD_CLASS(ags_export_thread_parent_class)->stop(thread); ags_audio_file_flush(export_thread->audio_file); ags_audio_file_close(export_thread->audio_file); } /** * ags_export_thread_find_soundcard: * @export_thread: the #AgsExportThread * @soundcard: the #AgsSoundcard to find * * Returns: the matching #AgsExportThread, if not * found %NULL. * * Since: 1.0.0 */ AgsExportThread* ags_export_thread_find_soundcard(AgsExportThread *export_thread, GObject *soundcard) { if(export_thread == NULL || !AGS_IS_EXPORT_THREAD(export_thread)){ return(NULL); } while(export_thread != NULL){ if(AGS_IS_EXPORT_THREAD(export_thread) && export_thread->soundcard == soundcard){ return(export_thread); } export_thread = g_atomic_pointer_get(&(((AgsThread *) export_thread)->next)); } return(NULL); } /** * ags_export_thread_new: * @soundcard: the #AgsSoundcard * @audio_file: the output file * * Create a new #AgsExportThread. * * Returns: the new #AgsExportThread * * Since: 1.0.0 */ AgsExportThread* ags_export_thread_new(GObject *soundcard, AgsAudioFile *audio_file) { AgsExportThread *export_thread; export_thread = (AgsExportThread *) g_object_new(AGS_TYPE_EXPORT_THREAD, "soundcard", soundcard, "audio-file", audio_file, NULL); return(export_thread); } gsequencer-1.4.24/ags/audio/thread/ags_soundcard_thread.h0000644000175000017500000000472613246707333020343 00000000000000/* 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 . */ #ifndef __AGS_SOUNDCARD_THREAD_H__ #define __AGS_SOUNDCARD_THREAD_H__ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_SOUNDCARD_THREAD (ags_soundcard_thread_get_type()) #define AGS_SOUNDCARD_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SOUNDCARD_THREAD, AgsSoundcardThread)) #define AGS_SOUNDCARD_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SOUNDCARD_THREAD, AgsSoundcardThreadClass)) #define AGS_IS_SOUNDCARD_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SOUNDCARD_THREAD)) #define AGS_IS_SOUNDCARD_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SOUNDCARD_THREAD)) #define AGS_SOUNDCARD_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SOUNDCARD_THREAD, AgsSoundcardThreadClass)) #define AGS_SOUNDCARD_THREAD_DEFAULT_JIFFIE (ceil(AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK) typedef struct _AgsSoundcardThread AgsSoundcardThread; typedef struct _AgsSoundcardThreadClass AgsSoundcardThreadClass; struct _AgsSoundcardThread { AgsThread thread; time_t time_val; GObject *soundcard; AgsThread *timestamp_thread; GError *error; }; struct _AgsSoundcardThreadClass { AgsThreadClass thread; }; GType ags_soundcard_thread_get_type(); AgsSoundcardThread* ags_soundcard_thread_find_soundcard(AgsSoundcardThread *soundcard_thread, GObject *soundcard); AgsSoundcardThread* ags_soundcard_thread_new(GObject *soundcard); #endif /*__AGS_SOUNDCARD_THREAD_H__*/ gsequencer-1.4.24/ags/audio/thread/ags_channel_thread.h0000644000175000017500000000634513256163135017765 00000000000000/* 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 . */ #ifndef __AGS_CHANNEL_THREAD_H__ #define __AGS_CHANNEL_THREAD_H__ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_CHANNEL_THREAD (ags_channel_thread_get_type()) #define AGS_CHANNEL_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CHANNEL_THREAD, AgsChannelThread)) #define AGS_CHANNEL_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_CHANNEL_THREAD, AgsChannelThreadClass)) #define AGS_IS_CHANNEL_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CHANNEL_THREAD)) #define AGS_IS_CHANNEL_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CHANNEL_THREAD)) #define AGS_CHANNEL_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_CHANNEL_THREAD, AgsChannelThreadClass)) #define AGS_CHANNEL_THREAD_DEFAULT_JIFFIE (ceil(AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK) typedef struct _AgsChannelThread AgsChannelThread; typedef struct _AgsChannelThreadClass AgsChannelThreadClass; /** * AgsChannelThreadFlags: * @AGS_CHANNEL_THREAD_DONE: sync done parent thread, initial wait during #AgsThread::run() * @AGS_CHANNEL_THREAD_WAIT: sync wait parent thread, initial wait during #AgsThread::run() * @AGS_CHANNEL_THREAD_DONE_SYNC: sync done parent thread, signal completed during #AgsThread::run() * @AGS_CHANNEL_THREAD_WAIT_SYNC: sync wait parent thread, signal completed during #AgsThread::run() * * Enum values to control the behavior or indicate internal state of #AgsChannelThread by * enable/disable as flags. */ typedef enum{ AGS_CHANNEL_THREAD_DONE = 1, AGS_CHANNEL_THREAD_WAIT = 1 << 1, AGS_CHANNEL_THREAD_DONE_SYNC = 1 << 2, AGS_CHANNEL_THREAD_WAIT_SYNC = 1 << 3, }AgsChannelThreadFlags; struct _AgsChannelThread { AgsThread thread; volatile guint flags; GObject *soundcard; pthread_mutexattr_t wakeup_attr; pthread_mutex_t *wakeup_mutex; pthread_cond_t *wakeup_cond; pthread_mutexattr_t done_attr; pthread_mutex_t *done_mutex; pthread_cond_t *done_cond; GObject *channel; }; struct _AgsChannelThreadClass { AgsThreadClass thread; }; GType ags_channel_thread_get_type(); AgsChannelThread* ags_channel_thread_new(GObject *soundcard, GObject *channel); #endif /*__AGS_CHANNEL_THREAD_H__*/ gsequencer-1.4.24/ags/audio/thread/ags_audio_thread.h0000644000175000017500000000622413256163135017452 00000000000000/* 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 . */ #ifndef __AGS_AUDIO_THREAD_H__ #define __AGS_AUDIO_THREAD_H__ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_AUDIO_THREAD (ags_audio_thread_get_type()) #define AGS_AUDIO_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_THREAD, AgsAudioThread)) #define AGS_AUDIO_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_AUDIO_THREAD, AgsAudioThreadClass)) #define AGS_IS_AUDIO_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUDIO_THREAD)) #define AGS_IS_AUDIO_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUDIO_THREAD)) #define AGS_AUDIO_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_AUDIO_THREAD, AgsAudioThreadClass)) #define AGS_AUDIO_THREAD_DEFAULT_JIFFIE (ceil(AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK) typedef struct _AgsAudioThread AgsAudioThread; typedef struct _AgsAudioThreadClass AgsAudioThreadClass; /** * AgsAudioThreadFlags: * @AGS_AUDIO_THREAD_DONE: sync done parent thread, initial wait during #AgsThread::run() * @AGS_AUDIO_THREAD_WAIT: sync wait parent thread, initial wait during #AgsThread::run() * @AGS_AUDIO_THREAD_DONE_SYNC: sync done parent thread, signal completed during #AgsThread::run() * @AGS_AUDIO_THREAD_WAIT_SYNC: sync wait parent thread, signal completed during #AgsThread::run() * * Enum values to control the behavior or indicate internal state of #AgsAudioThread by * enable/disable as flags. */ typedef enum{ AGS_AUDIO_THREAD_DONE = 1, AGS_AUDIO_THREAD_WAIT = 1 << 1, AGS_AUDIO_THREAD_DONE_SYNC = 1 << 2, AGS_AUDIO_THREAD_WAIT_SYNC = 1 << 3, }AgsAudioThreadFlags; struct _AgsAudioThread { AgsThread thread; volatile guint flags; GObject *soundcard; pthread_mutexattr_t wakeup_attr; pthread_mutex_t *wakeup_mutex; pthread_cond_t *wakeup_cond; pthread_mutexattr_t done_attr; pthread_mutex_t *done_mutex; pthread_cond_t *done_cond; GObject *audio; }; struct _AgsAudioThreadClass { AgsThreadClass thread; }; GType ags_audio_thread_get_type(); AgsAudioThread* ags_audio_thread_new(GObject *soundcard, GObject *audio); #endif /*__AGS_AUDIO_THREAD_H__*/ gsequencer-1.4.24/ags/audio/thread/ags_soundcard_thread.c0000644000175000017500000004051413256223112020316 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_soundcard_thread_class_init(AgsSoundcardThreadClass *soundcard_thread); void ags_soundcard_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_soundcard_thread_init(AgsSoundcardThread *soundcard_thread); void ags_soundcard_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_soundcard_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_soundcard_thread_connect(AgsConnectable *connectable); void ags_soundcard_thread_disconnect(AgsConnectable *connectable); void ags_soundcard_thread_dispose(GObject *gobject); void ags_soundcard_thread_finalize(GObject *gobject); void ags_soundcard_thread_start(AgsThread *thread); void ags_soundcard_thread_run(AgsThread *thread); void ags_soundcard_thread_stop(AgsThread *thread); void ags_soundcard_thread_dispatch_callback(AgsPollFd *poll_fd, AgsSoundcardThread *soundcard_thread); void ags_soundcard_thread_stopped_all_callback(AgsAudioLoop *audio_loop, AgsSoundcardThread *soundcard_thread); /** * SECTION:ags_soundcard_thread * @short_description: soundcard thread * @title: AgsSoundcardThread * @section_id: * @include: ags/audio/thread/ags_soundcard_thread.h * * The #AgsSoundcardThread acts as audio output thread to soundcard. */ static gpointer ags_soundcard_thread_parent_class = NULL; static AgsConnectableInterface *ags_soundcard_thread_parent_connectable_interface; enum{ PROP_0, PROP_SOUNDCARD, }; GType ags_soundcard_thread_get_type() { static GType ags_type_soundcard_thread = 0; if(!ags_type_soundcard_thread){ static const GTypeInfo ags_soundcard_thread_info = { sizeof (AgsSoundcardThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_soundcard_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSoundcardThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_soundcard_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_soundcard_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_soundcard_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsSoundcardThread", &ags_soundcard_thread_info, 0); g_type_add_interface_static(ags_type_soundcard_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_soundcard_thread); } void ags_soundcard_thread_class_init(AgsSoundcardThreadClass *soundcard_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_soundcard_thread_parent_class = g_type_class_peek_parent(soundcard_thread); /* GObject */ gobject = (GObjectClass *) soundcard_thread; gobject->set_property = ags_soundcard_thread_set_property; gobject->get_property = ags_soundcard_thread_get_property; gobject->dispose = ags_soundcard_thread_dispose; gobject->finalize = ags_soundcard_thread_finalize; /** * AgsSoundcardThread:soundcard: * * The assigned #AgsSoundcard. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard assigned to"), i18n_pspec("The AgsSoundcard it is assigned to"), G_TYPE_OBJECT, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* AgsThread */ thread = (AgsThreadClass *) soundcard_thread; thread->start = ags_soundcard_thread_start; thread->run = ags_soundcard_thread_run; thread->stop = ags_soundcard_thread_stop; } void ags_soundcard_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_soundcard_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_soundcard_thread_connect; connectable->disconnect = ags_soundcard_thread_disconnect; } void ags_soundcard_thread_init(AgsSoundcardThread *soundcard_thread) { AgsThread *thread; AgsConfig *config; gchar *str0, *str1; thread = (AgsThread *) soundcard_thread; g_atomic_int_or(&(thread->flags), (AGS_THREAD_START_SYNCED_FREQ | AGS_THREAD_INTERMEDIATE_POST_SYNC)); // g_atomic_int_or(&(thread->flags), // AGS_THREAD_TIMING); config = ags_config_get_instance(); str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str0 == NULL){ str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str1 == NULL){ str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str0 == NULL || str1 == NULL){ thread->freq = AGS_SOUNDCARD_THREAD_DEFAULT_JIFFIE; }else{ guint samplerate; guint buffer_size; samplerate = g_ascii_strtoull(str0, NULL, 10); buffer_size = g_ascii_strtoull(str1, NULL, 10); thread->freq = ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; } g_free(str0); g_free(str1); /* */ soundcard_thread->soundcard = NULL; soundcard_thread->timestamp_thread = NULL; // soundcard_thread->timestamp_thread = (AgsThread *) ags_timestamp_thread_new(); // ags_thread_add_child(thread, soundcard_thread->timestamp_thread); soundcard_thread->error = NULL; } void ags_soundcard_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSoundcardThread *soundcard_thread; soundcard_thread = AGS_SOUNDCARD_THREAD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; guint samplerate; guint buffer_size; soundcard = (GObject *) g_value_get_object(value); if(soundcard_thread->soundcard != NULL){ g_object_unref(G_OBJECT(soundcard_thread->soundcard)); } if(soundcard != NULL){ g_object_ref(G_OBJECT(soundcard)); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, &buffer_size, NULL); g_object_set(soundcard_thread, "frequency", ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK, NULL); if(AGS_IS_DEVOUT(soundcard)){ g_atomic_int_or(&(AGS_THREAD(soundcard_thread)->flags), (AGS_THREAD_INTERMEDIATE_POST_SYNC)); }else if(AGS_IS_JACK_DEVOUT(soundcard) || AGS_IS_PULSE_DEVOUT(soundcard)){ g_atomic_int_or(&(AGS_THREAD(soundcard_thread)->flags), (AGS_THREAD_INTERMEDIATE_POST_SYNC)); // g_atomic_int_and(&(AGS_THREAD(soundcard_thread)->flags), // (~AGS_THREAD_INTERMEDIATE_POST_SYNC)); }else if(AGS_IS_CORE_AUDIO_DEVOUT(soundcard)){ g_atomic_int_or(&(AGS_THREAD(soundcard_thread)->flags), (AGS_THREAD_INTERMEDIATE_POST_SYNC)); } } soundcard_thread->soundcard = G_OBJECT(soundcard); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_soundcard_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSoundcardThread *soundcard_thread; soundcard_thread = AGS_SOUNDCARD_THREAD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, G_OBJECT(soundcard_thread->soundcard)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_soundcard_thread_connect(AgsConnectable *connectable) { AgsThread *audio_loop, *soundcard_thread; soundcard_thread = AGS_THREAD(connectable); if((AGS_THREAD_CONNECTED & (g_atomic_int_get(&(soundcard_thread->flags)))) != 0){ return; } ags_soundcard_thread_parent_connectable_interface->connect(connectable); audio_loop = ags_thread_get_toplevel(soundcard_thread); g_signal_connect((GObject *) audio_loop, "stopped-all", G_CALLBACK(ags_soundcard_thread_stopped_all_callback), soundcard_thread); } void ags_soundcard_thread_disconnect(AgsConnectable *connectable) { ags_soundcard_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_soundcard_thread_dispose(GObject *gobject) { AgsSoundcardThread *soundcard_thread; soundcard_thread = AGS_SOUNDCARD_THREAD(gobject); /* soundcard */ if(soundcard_thread->soundcard != NULL){ g_object_unref(soundcard_thread->soundcard); soundcard_thread->soundcard = NULL; } /* call parent */ G_OBJECT_CLASS(ags_soundcard_thread_parent_class)->dispose(gobject); } void ags_soundcard_thread_finalize(GObject *gobject) { AgsSoundcardThread *soundcard_thread; soundcard_thread = AGS_SOUNDCARD_THREAD(gobject); /* soundcard */ if(soundcard_thread->soundcard != NULL){ g_object_unref(soundcard_thread->soundcard); } /* call parent */ G_OBJECT_CLASS(ags_soundcard_thread_parent_class)->finalize(gobject); } void ags_soundcard_thread_start(AgsThread *thread) { AgsSoundcardThread *soundcard_thread; AgsThread *main_loop; AgsPollingThread *polling_thread; GObject *soundcard; GList *poll_fd; GError *error; soundcard_thread = AGS_SOUNDCARD_THREAD(thread); main_loop = ags_thread_get_toplevel(thread); soundcard = soundcard_thread->soundcard; /* disable timing */ g_atomic_int_and(&(thread->flags), (~AGS_THREAD_TIMING)); /* find polling thread */ polling_thread = (AgsPollingThread *) ags_thread_find_type(main_loop, AGS_TYPE_POLLING_THREAD); /* add poll fd and connect dispatch */ poll_fd = ags_soundcard_get_poll_fd(AGS_SOUNDCARD(soundcard)); while(poll_fd != NULL){ if(polling_thread != NULL){ gint position; ags_polling_thread_add_poll_fd(polling_thread, poll_fd->data); g_signal_connect(G_OBJECT(poll_fd->data), "dispatch", G_CALLBACK(ags_soundcard_thread_dispatch_callback), soundcard_thread); position = ags_polling_thread_fd_position(polling_thread, AGS_POLL_FD(poll_fd->data)->fd); if(position != -1){ polling_thread->fds[position].events = POLLOUT; } } poll_fd = poll_fd->next; } if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ AGS_THREAD_CLASS(ags_soundcard_thread_parent_class)->start(thread); } } void ags_soundcard_thread_run(AgsThread *thread) { AgsSoundcardThread *soundcard_thread; AgsMutexManager *mutex_manager; GObject *soundcard; GList *poll_fd; gboolean is_playing; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; soundcard_thread = AGS_SOUNDCARD_THREAD(thread); soundcard = soundcard_thread->soundcard; /* */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard_thread->soundcard); pthread_mutex_unlock(application_mutex); /* real-time setup */ #ifdef AGS_WITH_RT if((AGS_THREAD_RT_SETUP & (g_atomic_int_get(&(thread->flags)))) == 0){ struct sched_param param; /* Declare ourself as a real time task */ param.sched_priority = AGS_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } g_atomic_int_or(&(thread->flags), AGS_THREAD_RT_SETUP); } #endif /* playback */ pthread_mutex_lock(mutex); is_playing = ags_soundcard_is_playing(AGS_SOUNDCARD(soundcard)); pthread_mutex_unlock(mutex); if(is_playing){ error = NULL; ags_soundcard_play(AGS_SOUNDCARD(soundcard), &error); if(error != NULL){ //TODO:JK: implement me g_warning("%s", error->message); } } } void ags_soundcard_thread_stop(AgsThread *thread) { AgsSoundcardThread *soundcard_thread; AgsThread *main_loop; AgsPollingThread *polling_thread; GObject *soundcard; GList *poll_fd; soundcard_thread = AGS_SOUNDCARD_THREAD(thread); main_loop = ags_thread_get_toplevel(thread); soundcard = soundcard_thread->soundcard; /* stop thread and soundcard */ AGS_THREAD_CLASS(ags_soundcard_thread_parent_class)->stop(thread); //FIXME:JK: is this safe? ags_soundcard_stop(AGS_SOUNDCARD(soundcard)); g_atomic_int_or(&(thread->flags), AGS_THREAD_TIMING); /* find polling thread */ polling_thread = (AgsPollingThread *) ags_thread_find_type(main_loop, AGS_TYPE_POLLING_THREAD); /* remove poll fd */ poll_fd = ags_soundcard_get_poll_fd(AGS_SOUNDCARD(soundcard)); while(poll_fd != NULL){ if(polling_thread != NULL){ gint position; ags_polling_thread_remove_poll_fd(polling_thread, poll_fd->data); } poll_fd = poll_fd->next; } } void ags_soundcard_thread_dispatch_callback(AgsPollFd *poll_fd, AgsSoundcardThread *soundcard_thread) { AgsAudioLoop *audio_loop; AgsPollingThread *polling_thread; guint time_spent; audio_loop = (AgsAudioLoop *) ags_thread_get_toplevel((AgsThread *) soundcard_thread); if(ags_soundcard_is_available(AGS_SOUNDCARD(soundcard_thread->soundcard))){ pthread_mutex_lock(audio_loop->timing_mutex); g_atomic_int_set(&(audio_loop->time_spent), audio_loop->time_cycle); pthread_mutex_unlock(audio_loop->timing_mutex); // ags_main_loop_interrupt(AGS_MAIN_LOOP(audio_loop), // AGS_THREAD_SUSPEND_SIG, // 0, &time_spent); polling_thread = ags_thread_find_type(audio_loop, AGS_TYPE_POLLING_THREAD); if(polling_thread != NULL){ g_atomic_int_or(&(polling_thread->flags), AGS_POLLING_THREAD_OMIT); g_atomic_int_inc(&(polling_thread->omit_count)); } } } void ags_soundcard_thread_stopped_all_callback(AgsAudioLoop *audio_loop, AgsSoundcardThread *soundcard_thread) { AgsSoundcard *soundcard; soundcard = AGS_SOUNDCARD(soundcard_thread->soundcard); if(ags_soundcard_is_playing(soundcard)){ ags_thread_stop((AgsThread *) soundcard_thread); } } /** * ags_soundcard_thread_find_soundcard: * @soundcard_thread: the #AgsSoundcardThread * @soundcard: the #AgsSoundcard to find * * Returns: the matching #AgsSoundcardThread, if not * found %NULL. * * Since: 1.0.0 */ AgsSoundcardThread* ags_soundcard_thread_find_soundcard(AgsSoundcardThread *soundcard_thread, GObject *soundcard) { if(soundcard_thread == NULL || !AGS_IS_SOUNDCARD_THREAD(soundcard_thread)){ return(NULL); } while(soundcard_thread != NULL){ if(AGS_IS_SOUNDCARD_THREAD(soundcard_thread) && soundcard_thread->soundcard == soundcard){ return(soundcard_thread); } soundcard_thread = g_atomic_pointer_get(&(((AgsThread *) soundcard_thread)->next)); } return(NULL); } /** * ags_soundcard_thread_new: * @soundcard: the #AgsSoundcard * * Create a new #AgsSoundcardThread. * * Returns: the new #AgsSoundcardThread * * Since: 1.0.0 */ AgsSoundcardThread* ags_soundcard_thread_new(GObject *soundcard) { AgsSoundcardThread *soundcard_thread; soundcard_thread = (AgsSoundcardThread *) g_object_new(AGS_TYPE_SOUNDCARD_THREAD, "soundcard", soundcard, NULL); return(soundcard_thread); } gsequencer-1.4.24/ags/audio/thread/ags_export_thread.h0000644000175000017500000000540313246707333017673 00000000000000/* 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 . */ #ifndef __AGS_EXPORT_THREAD_H__ #define __AGS_EXPORT_THREAD_H__ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #define AGS_TYPE_EXPORT_THREAD (ags_export_thread_get_type()) #define AGS_EXPORT_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EXPORT_THREAD, AgsExportThread)) #define AGS_EXPORT_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_EXPORT_THREAD, AgsExportThreadClass)) #define AGS_IS_EXPORT_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_EXPORT_THREAD)) #define AGS_IS_EXPORT_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_EXPORT_THREAD)) #define AGS_EXPORT_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_EXPORT_THREAD, AgsExportThreadClass)) #define AGS_EXPORT_THREAD_DEFAULT_JIFFIE (ceil(AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK) // same as soundcard thread typedef struct _AgsExportThread AgsExportThread; typedef struct _AgsExportThreadClass AgsExportThreadClass; /** * AgsExportThreadFlags: * @AGS_EXPORT_THREAD_LIVE_PERFORMANCE: do live export * * Enum values to control the behavior or indicate internal state of #AgsExportThread by * enable/disable as flags. */ typedef enum{ AGS_EXPORT_THREAD_LIVE_PERFORMANCE = 1, }AgsExportThreadFlags; struct _AgsExportThread { AgsThread thread; guint flags; guint tic; guint counter; GObject *soundcard; AgsAudioFile *audio_file; }; struct _AgsExportThreadClass { AgsThreadClass thread; }; GType ags_export_thread_get_type(); AgsExportThread* ags_export_thread_find_soundcard(AgsExportThread *export_thread, GObject *soundcard); AgsExportThread* ags_export_thread_new(GObject *soundcard, AgsAudioFile *audio_file); #endif /*__AGS_EXPORT_THREAD_H__*/ gsequencer-1.4.24/ags/audio/thread/ags_record_thread.c0000644000175000017500000001652213246707333017627 00000000000000/* 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 . */ #include #include #include #include void ags_record_thread_class_init(AgsRecordThreadClass *record_thread); void ags_record_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_record_thread_init(AgsRecordThread *record_thread); void ags_record_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_record_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_record_thread_connect(AgsConnectable *connectable); void ags_record_thread_disconnect(AgsConnectable *connectable); void ags_record_thread_finalize(GObject *gobject); void ags_record_thread_start(AgsThread *thread); void ags_record_thread_run(AgsThread *thread); void ags_record_thread_stop(AgsThread *thread); enum{ PROP_0, PROP_REGISTRY, }; static gpointer ags_record_thread_parent_class = NULL; static AgsConnectableInterface *ags_record_thread_parent_connectable_interface; GType ags_record_thread_get_type() { static GType ags_type_record_thread = 0; if(!ags_type_record_thread){ static const GTypeInfo ags_record_thread_info = { sizeof (AgsRecordThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_record_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecordThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_record_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_record_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_record_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsRecordThread", &ags_record_thread_info, 0); g_type_add_interface_static(ags_type_record_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_record_thread); } void ags_record_thread_class_init(AgsRecordThreadClass *record_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_record_thread_parent_class = g_type_class_peek_parent(record_thread); /* GObject */ gobject = (GObjectClass *) record_thread; gobject->get_property = ags_record_thread_get_property; gobject->set_property = ags_record_thread_set_property; gobject->finalize = ags_record_thread_finalize; /* properties */ param_spec = g_param_spec_object("registry", i18n_pspec("registry to check against"), i18n_pspec("The registry to check against serialization"), AGS_TYPE_REGISTRY, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_REGISTRY, param_spec); /* AgsThread */ thread = (AgsThreadClass *) record_thread; thread->start = ags_record_thread_start; thread->run = ags_record_thread_run; thread->stop = ags_record_thread_stop; } void ags_record_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_record_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_record_thread_connect; connectable->disconnect = ags_record_thread_disconnect; } void ags_record_thread_init(AgsRecordThread *record_thread) { AgsThread *thread; thread = AGS_THREAD(record_thread); record_thread->registry = NULL; record_thread->delay = AGS_RECORD_THREAD_DEFAULT_DELAY; record_thread->counter = 0; } void ags_record_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecordThread *record_thread; record_thread = AGS_RECORD_THREAD(gobject); switch(prop_id){ case PROP_REGISTRY: { AgsRegistry *registry; registry = g_value_get_object(value); if(record_thread->registry == registry){ return; } if(record_thread->registry != NULL){ g_object_unref(record_thread->registry); } if(registry != NULL){ g_object_ref(registry); } record_thread->registry = registry; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_record_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecordThread *record_thread; record_thread = AGS_RECORD_THREAD(gobject); switch(prop_id){ case PROP_REGISTRY: { g_value_set_object(value, record_thread->registry); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_record_thread_connect(AgsConnectable *connectable) { ags_record_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_record_thread_disconnect(AgsConnectable *connectable) { ags_record_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_record_thread_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_record_thread_parent_class)->finalize(gobject); /* empty */ } void ags_record_thread_start(AgsThread *thread) { //TODO:JK: implement me AGS_THREAD_CLASS(ags_record_thread_parent_class)->start(thread); } void ags_record_thread_run(AgsThread *thread) { AgsRecordThread *record_thread; record_thread = AGS_RECORD_THREAD(thread); if(record_thread->counter != record_thread->delay){ record_thread->counter += 1; }else{ record_thread->counter = 0; if((AGS_REGISTRY_DIRTY & (record_thread->registry->flags)) != 0){ AgsFile *next_file, *current_file; current_file = record_thread->registry->current; next_file = ags_file_new(current_file->filename); pthread_mutex_lock(&(record_thread->registry->mutex)); g_object_unref(record_thread->registry->previous); record_thread->registry->previous = current_file; record_thread->registry->current = next_file; pthread_mutex_unlock(&(record_thread->registry->mutex)); ags_file_write(current_file); record_thread->registry->flags &= (~AGS_REGISTRY_DIRTY); } } } void ags_record_thread_stop(AgsThread *thread) { //TODO:JK: implement me } AgsRecordThread* ags_record_thread_new(GObject *devout, AgsRegistry *registry) { AgsRecordThread *record_thread; record_thread = (AgsRecordThread *) g_object_new(AGS_TYPE_RECORD_THREAD, "devout", devout, "registry", registry, NULL); return(record_thread); } gsequencer-1.4.24/ags/audio/thread/ags_audio_loop.c0000644000175000017500000014442713247044247017161 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_audio_loop_class_init(AgsAudioLoopClass *audio_loop); void ags_audio_loop_connectable_interface_init(AgsConnectableInterface *connectable); void ags_audio_loop_main_loop_interface_init(AgsMainLoopInterface *main_loop); void ags_audio_loop_init(AgsAudioLoop *audio_loop); void ags_audio_loop_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_audio_loop_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_audio_loop_connect(AgsConnectable *connectable); void ags_audio_loop_disconnect(AgsConnectable *connectable); pthread_mutex_t* ags_audio_loop_get_tree_lock(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); guint ags_audio_loop_get_last_sync(AgsMainLoop *main_loop); gboolean ags_audio_loop_monitor(AgsMainLoop *main_loop, guint time_cycle, guint *time_spent); void ags_audio_loop_change_frequency(AgsMainLoop *main_loop, gdouble frequency); void ags_audio_loop_dispose(GObject *gobject); void ags_audio_loop_finalize(GObject *gobject); void ags_audio_loop_start(AgsThread *thread); void ags_audio_loop_run(AgsThread *thread); void ags_audio_loop_notify_frequency(GObject *gobject, GParamSpec *pspec, gpointer user_data); void* ags_audio_loop_timing_thread(void *ptr); void ags_audio_loop_play_recall(AgsAudioLoop *audio_loop); void ags_audio_loop_play_channel(AgsAudioLoop *audio_loop); void ags_audio_loop_play_channel_super_threaded(AgsAudioLoop *audio_loop, AgsPlayback *playback); void ags_audio_loop_sync_channel_super_threaded(AgsAudioLoop *audio_loop, AgsPlayback *playback); void ags_audio_loop_play_audio(AgsAudioLoop *audio_loop); void ags_audio_loop_play_audio_super_threaded(AgsAudioLoop *audio_loop, AgsPlaybackDomain *playback_domain); void ags_audio_loop_sync_audio_super_threaded(AgsAudioLoop *audio_loop, AgsPlaybackDomain *playback_domain); /** * SECTION:ags_audio_loop * @short_description: audio loop * @title: AgsAudioLoop * @section_id: * @include: ags/audio/thread/ags_audio_loop.h * * The #AgsAudioLoop is suitable as #AgsMainLoop and does * audio processing. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_SOUNDCARD, PROP_PLAY_RECALL, PROP_PLAY_CHANNEL, PROP_PLAY_AUDIO, }; static gpointer ags_audio_loop_parent_class = NULL; static AgsConnectableInterface *ags_audio_loop_parent_connectable_interface; GType ags_audio_loop_get_type() { static GType ags_type_audio_loop = 0; if(!ags_type_audio_loop){ static const GTypeInfo ags_audio_loop_info = { sizeof (AgsAudioLoopClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_loop_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAudioLoop), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_loop_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_audio_loop_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_main_loop_interface_info = { (GInterfaceInitFunc) ags_audio_loop_main_loop_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audio_loop = g_type_register_static(AGS_TYPE_THREAD, "AgsAudioLoop", &ags_audio_loop_info, 0); g_type_add_interface_static(ags_type_audio_loop, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_audio_loop, AGS_TYPE_MAIN_LOOP, &ags_main_loop_interface_info); } return (ags_type_audio_loop); } void ags_audio_loop_class_init(AgsAudioLoopClass *audio_loop) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_audio_loop_parent_class = g_type_class_peek_parent(audio_loop); /* GObject */ gobject = (GObjectClass *) audio_loop; gobject->set_property = ags_audio_loop_set_property; gobject->get_property = ags_audio_loop_get_property; gobject->dispose = ags_audio_loop_dispose; gobject->finalize = ags_audio_loop_finalize; /* properties */ /** * AgsDevout:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsAudioLoop:soundcard: * * The assigned #AgsAudio. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard assigned to"), i18n_pspec("The AgsSoundcard it is assigned to"), G_TYPE_OBJECT, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsAudioLoop:play-recall: * * An #AgsRecall to add for playback. * * Since: 1.0.0 */ param_spec = g_param_spec_object("play-recall", i18n_pspec("recall to run"), i18n_pspec("A recall to run"), AGS_TYPE_RECALL, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAY_RECALL, param_spec); /** * AgsAudioLoop:play-channel: * * An #AgsChannel to add for playback. * * Since: 1.0.0 */ param_spec = g_param_spec_object("play-channel", i18n_pspec("channel to run"), i18n_pspec("A channel to run"), AGS_TYPE_CHANNEL, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAY_CHANNEL, param_spec); /** * AgsAudioLoop:play-audio: * * An #AgsAudio to add for playback. * * Since: 1.0.0 */ param_spec = g_param_spec_object("play-audio", i18n_pspec("audio to run"), i18n_pspec("A audio to run"), AGS_TYPE_AUDIO, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAY_AUDIO, param_spec); /* AgsThread */ thread = (AgsThreadClass *) audio_loop; thread->start = ags_audio_loop_start; thread->run = ags_audio_loop_run; /* AgsAudioLoop */ } void ags_audio_loop_connectable_interface_init(AgsConnectableInterface *connectable) { ags_audio_loop_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_audio_loop_connect; connectable->disconnect = ags_audio_loop_disconnect; } void ags_audio_loop_main_loop_interface_init(AgsMainLoopInterface *main_loop) { main_loop->get_tree_lock = ags_audio_loop_get_tree_lock; main_loop->set_async_queue = ags_audio_loop_set_async_queue; main_loop->get_async_queue = ags_audio_loop_get_async_queue; main_loop->set_tic = ags_audio_loop_set_tic; main_loop->get_tic = ags_audio_loop_get_tic; main_loop->set_last_sync = ags_audio_loop_set_last_sync; main_loop->get_last_sync = ags_audio_loop_get_last_sync; main_loop->interrupt = NULL; main_loop->monitor = ags_audio_loop_monitor; main_loop->change_frequency = ags_audio_loop_change_frequency; } void ags_audio_loop_init(AgsAudioLoop *audio_loop) { AgsMutexManager *mutex_manager; AgsThread *thread; AgsConfig *config; gchar *str0, *str1; pthread_mutex_t *application_mutex; /* calculate frequency */ thread = (AgsThread *) audio_loop; g_atomic_int_or(&(thread->flags), AGS_THREAD_TIMING); g_signal_connect_after(thread, "notify::frequency", G_CALLBACK(ags_audio_loop_notify_frequency), NULL); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); // thread->flags |= AGS_THREAD_WAIT_FOR_CHILDREN; pthread_mutex_lock(application_mutex); config = ags_config_get_instance(); str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str0 == NULL){ str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str1 == NULL){ str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } pthread_mutex_unlock(application_mutex); if(str0 == NULL || str1 == NULL){ thread->freq = AGS_AUDIO_LOOP_DEFAULT_JIFFIE; }else{ guint samplerate; guint buffer_size; samplerate = g_ascii_strtoull(str0, NULL, 10); buffer_size = g_ascii_strtoull(str1, NULL, 10); thread->freq = ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; } g_free(str0); g_free(str1); audio_loop->flags = 0; g_atomic_int_set(&(audio_loop->tic), 0); g_atomic_int_set(&(audio_loop->last_sync), 0); audio_loop->time_cycle = NSEC_PER_SEC / thread->freq; audio_loop->application_context = NULL; audio_loop->soundcard = NULL; audio_loop->async_queue = NULL; /* tree lock mutex */ pthread_mutexattr_init(&(audio_loop->tree_lock_mutexattr)); pthread_mutexattr_settype(&(audio_loop->tree_lock_mutexattr), PTHREAD_MUTEX_RECURSIVE); audio_loop->tree_lock = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(audio_loop->tree_lock, &(audio_loop->tree_lock_mutexattr)); /* recall mutex */ audio_loop->recall_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(audio_loop->recall_mutex, NULL); /* event main loop */ g_cond_init(&(audio_loop->cond)); g_mutex_init(&(audio_loop->mutex)); audio_loop->main_context = NULL; audio_loop->cached_poll_array_size = 0; audio_loop->cached_poll_array = NULL; /* timing thread */ audio_loop->timing_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(audio_loop->timing_mutex, NULL); audio_loop->timing_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(audio_loop->timing_cond, NULL); audio_loop->timing_thread = (pthread_t *) malloc(sizeof(pthread_t)); /* recall related lists */ audio_loop->play_recall_ref = 0; audio_loop->play_recall = NULL; audio_loop->play_channel_ref = 0; audio_loop->play_channel = NULL; audio_loop->play_audio_ref = 0; audio_loop->play_audio = NULL; audio_loop->play_notation_ref = 0; audio_loop->play_notation = NULL; } void ags_audio_loop_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAudioLoop *audio_loop; audio_loop = AGS_AUDIO_LOOP(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(audio_loop->application_context == (GObject *) application_context){ return; } if(audio_loop->application_context != NULL){ g_object_unref(G_OBJECT(audio_loop->application_context)); } if(application_context != NULL){ g_object_ref(G_OBJECT(application_context)); } audio_loop->application_context = (GObject *) application_context; } break; case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(audio_loop->soundcard != NULL){ g_object_unref(audio_loop->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } audio_loop->soundcard = soundcard; } break; case PROP_PLAY_RECALL: { AgsRecall *recall; recall = (AgsRecall *) g_value_get_pointer(value); if(recall != NULL){ audio_loop->play_recall = g_list_prepend(audio_loop->play_recall, recall); } } break; case PROP_PLAY_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_pointer(value); if(channel != NULL){ audio_loop->play_channel = g_list_prepend(audio_loop->play_channel, channel); } } break; case PROP_PLAY_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_pointer(value); if(audio != NULL){ audio_loop->play_audio = g_list_prepend(audio_loop->play_audio, audio); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_loop_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAudioLoop *audio_loop; audio_loop = AGS_AUDIO_LOOP(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, audio_loop->application_context); } break; case PROP_SOUNDCARD: { g_value_set_object(value, audio_loop->soundcard); } break; case PROP_PLAY_RECALL: { g_value_set_pointer(value, audio_loop->play_recall); } break; case PROP_PLAY_CHANNEL: { g_value_set_pointer(value, audio_loop->play_channel); } break; case PROP_PLAY_AUDIO: { g_value_set_pointer(value, audio_loop->play_audio); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_loop_connect(AgsConnectable *connectable) { ags_audio_loop_parent_connectable_interface->connect(connectable); /* empty */ } void ags_audio_loop_disconnect(AgsConnectable *connectable) { ags_audio_loop_parent_connectable_interface->disconnect(connectable); /* empty */ } pthread_mutex_t* ags_audio_loop_get_tree_lock(AgsMainLoop *main_loop) { return(AGS_AUDIO_LOOP(main_loop)->tree_lock); } void ags_audio_loop_set_async_queue(AgsMainLoop *main_loop, GObject *async_queue) { if(AGS_AUDIO_LOOP(main_loop)->async_queue == async_queue){ return; } if(AGS_AUDIO_LOOP(main_loop)->async_queue != NULL){ g_object_unref(AGS_AUDIO_LOOP(main_loop)->async_queue); } if(async_queue != NULL){ g_object_ref(async_queue); } AGS_AUDIO_LOOP(main_loop)->async_queue = async_queue; } GObject* ags_audio_loop_get_async_queue(AgsMainLoop *main_loop) { return(AGS_AUDIO_LOOP(main_loop)->async_queue); } void ags_audio_loop_set_tic(AgsMainLoop *main_loop, guint tic) { g_atomic_int_set(&(AGS_AUDIO_LOOP(main_loop)->tic), tic); } guint ags_audio_loop_get_tic(AgsMainLoop *main_loop) { return(g_atomic_int_get(&(AGS_AUDIO_LOOP(main_loop)->tic))); } void ags_audio_loop_set_last_sync(AgsMainLoop *main_loop, guint last_sync) { g_atomic_int_set(&(AGS_AUDIO_LOOP(main_loop)->last_sync), last_sync); } guint ags_audio_loop_get_last_sync(AgsMainLoop *main_loop) { gint val; val = g_atomic_int_get(&(AGS_AUDIO_LOOP(main_loop)->last_sync)); return(val); } gboolean ags_audio_loop_monitor(AgsMainLoop *main_loop, guint time_cycle, guint *time_spent) { if(g_atomic_int_get(&(AGS_AUDIO_LOOP(main_loop)->time_spent)) == 0){ return(TRUE); }else{ return(FALSE); } } void ags_audio_loop_change_frequency(AgsMainLoop *main_loop, gdouble frequency) { AgsThread *audio_loop, *thread; audio_loop = AGS_THREAD(main_loop); g_object_set(audio_loop, "frequency", frequency, NULL); /* reset soundcard thread */ thread = audio_loop; while(ags_thread_find_type(thread, AGS_TYPE_SOUNDCARD_THREAD) != NULL){ g_object_set(thread, "frequency", frequency, NULL); thread = g_atomic_pointer_get(&(thread->next)); } /* reset sequencer thread */ thread = audio_loop; while(ags_thread_find_type(thread, AGS_TYPE_SEQUENCER_THREAD) != NULL){ g_object_set(thread, "frequency", frequency, NULL); thread = g_atomic_pointer_get(&(thread->next)); } /* reset export thread */ thread = audio_loop; while(ags_thread_find_type(thread, AGS_TYPE_EXPORT_THREAD) != NULL){ g_object_set(thread, "frequency", frequency, NULL); thread = g_atomic_pointer_get(&(thread->next)); } /* reset audio thread */ thread = audio_loop; while(ags_thread_find_type(thread, AGS_TYPE_AUDIO_THREAD) != NULL){ g_object_set(thread, "frequency", frequency, NULL); thread = g_atomic_pointer_get(&(thread->next)); } /* reset channel thread */ thread = audio_loop; while(ags_thread_find_type(thread, AGS_TYPE_CHANNEL_THREAD) != NULL){ g_object_set(thread, "frequency", frequency, NULL); thread = g_atomic_pointer_get(&(thread->next)); } } void ags_audio_loop_dispose(GObject *gobject) { AgsAudioLoop *audio_loop; audio_loop = AGS_AUDIO_LOOP(gobject); /* application context */ if(audio_loop->application_context != NULL){ g_object_unref(audio_loop->application_context); audio_loop->application_context = NULL; } /* soundcard */ if(audio_loop->soundcard != NULL){ g_object_unref(audio_loop->soundcard); audio_loop->soundcard = NULL; } /* async queue */ if(audio_loop->async_queue != NULL){ g_object_unref(audio_loop->async_queue); audio_loop->async_queue = NULL; } /* unref AgsPlayback lists */ if(audio_loop->play_recall != NULL){ g_list_free_full(audio_loop->play_recall, g_object_unref); audio_loop->play_recall = NULL; } if(audio_loop->play_channel != NULL){ g_list_free_full(audio_loop->play_channel, g_object_unref); audio_loop->play_channel = NULL; } if(audio_loop->play_audio != NULL){ g_list_free_full(audio_loop->play_audio, g_object_unref); audio_loop->play_audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_audio_loop_parent_class)->dispose(gobject); } void ags_audio_loop_finalize(GObject *gobject) { AgsAudioLoop *audio_loop; audio_loop = AGS_AUDIO_LOOP(gobject); /* application context */ if(audio_loop->application_context != NULL){ g_object_unref(audio_loop->application_context); } /* soundcard */ if(audio_loop->soundcard != NULL){ g_object_unref(audio_loop->soundcard); } /* async queue */ if(audio_loop->async_queue != NULL){ g_object_unref(audio_loop->async_queue); } /* tree lock and recall mutex */ pthread_mutex_destroy(audio_loop->tree_lock); free(audio_loop->tree_lock); pthread_mutex_destroy(audio_loop->recall_mutex); free(audio_loop->recall_mutex); /* timing mutex and cond */ pthread_mutex_destroy(audio_loop->timing_mutex); free(audio_loop->timing_mutex); pthread_cond_destroy(audio_loop->timing_cond); free(audio_loop->timing_cond); //FIXME:JK: destroy timing thread /* unref AgsPlayback lists */ g_list_free_full(audio_loop->play_recall, g_object_unref); g_list_free_full(audio_loop->play_channel, g_object_unref); g_list_free_full(audio_loop->play_audio, g_object_unref); /* call parent */ G_OBJECT_CLASS(ags_audio_loop_parent_class)->finalize(gobject); } void ags_audio_loop_start(AgsThread *thread) { AgsAudioLoop *audio_loop; audio_loop = AGS_AUDIO_LOOP(thread); if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ /* */ AGS_THREAD_CLASS(ags_audio_loop_parent_class)->start(thread); // pthread_create(audio_loop->timing_thread, NULL, // ags_audio_loop_timing_thread, audio_loop); } } void ags_audio_loop_run(AgsThread *thread) { AgsAudioLoop *audio_loop; AgsPollingThread *polling_thread; GPollFD *fds = NULL; gint max_priority; gint timeout; gint nfds, allocated_nfds; gboolean some_ready; guint val; static gboolean initialized = FALSE; audio_loop = AGS_AUDIO_LOOP(thread); polling_thread = (AgsPollingThread *) ags_thread_find_type(thread, AGS_TYPE_POLLING_THREAD); /* real-time setup */ if((AGS_THREAD_RT_SETUP & (g_atomic_int_get(&(thread->flags)))) == 0){ #ifdef AGS_WITH_RT struct sched_param param; /* Declare ourself as a real time task */ param.sched_priority = AGS_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } #endif g_atomic_int_or(&(thread->flags), AGS_THREAD_RT_SETUP); } /* reset polling thread */ if(polling_thread != NULL){ pthread_mutex_lock(polling_thread->fd_mutex); if(g_atomic_int_get(&(polling_thread->omit_count)) != 0){ g_atomic_int_dec_and_test(&(polling_thread->omit_count)); if(g_atomic_int_get(&(polling_thread->omit_count)) == 0){ g_atomic_int_and(&(polling_thread->flags), (~AGS_POLLING_THREAD_OMIT)); } }else{ g_atomic_int_and(&(polling_thread->flags), (~AGS_POLLING_THREAD_OMIT)); } pthread_mutex_unlock(polling_thread->fd_mutex); } /* wake-up timing thread */ pthread_mutex_lock(audio_loop->timing_mutex); g_atomic_int_set(&(audio_loop->time_spent), 0); g_atomic_int_or(&(audio_loop->timing_flags), AGS_AUDIO_LOOP_TIMING_WAKEUP); pthread_cond_signal(audio_loop->timing_cond); pthread_mutex_unlock(audio_loop->timing_mutex); /* */ pthread_mutex_lock(audio_loop->recall_mutex); /* play recall */ if((AGS_AUDIO_LOOP_PLAY_RECALL & (audio_loop->flags)) != 0){ ags_audio_loop_play_recall(audio_loop); if(audio_loop->play_recall_ref == 0 && g_atomic_pointer_get(&(thread->start_queue)) == NULL){ audio_loop->flags &= (~AGS_AUDIO_LOOP_PLAY_RECALL); } } /* play channel */ if((AGS_AUDIO_LOOP_PLAY_CHANNEL & (audio_loop->flags)) != 0){ ags_audio_loop_play_channel(audio_loop); if(audio_loop->play_channel_ref == 0 && g_atomic_pointer_get(&(thread->start_queue)) == NULL){ audio_loop->flags &= (~AGS_AUDIO_LOOP_PLAY_CHANNEL); } } /* play audio */ if((AGS_AUDIO_LOOP_PLAY_AUDIO & (audio_loop->flags)) != 0){ ags_audio_loop_play_audio(audio_loop); if(audio_loop->play_audio_ref == 0 && g_atomic_pointer_get(&(thread->start_queue)) == NULL){ audio_loop->flags &= (~AGS_AUDIO_LOOP_PLAY_AUDIO); } } pthread_mutex_unlock(audio_loop->recall_mutex); /* decide if we stop */ if(audio_loop->play_recall_ref == 0 && audio_loop->play_channel_ref == 0 && audio_loop->play_audio_ref == 0 && audio_loop->play_notation_ref == 0){ AgsThread *soundcard_thread; AgsThread *sequencer_thread; AgsThread *export_thread; /* soundcard thread */ soundcard_thread = thread; while((soundcard_thread = ags_thread_find_type(soundcard_thread, AGS_TYPE_SOUNDCARD_THREAD)) != NULL){ if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(soundcard_thread->flags)))) != 0){ ags_thread_stop(soundcard_thread); } soundcard_thread = g_atomic_pointer_get(&(soundcard_thread->next)); } /* sequencer thread */ sequencer_thread = thread; while((sequencer_thread = ags_thread_find_type(sequencer_thread, AGS_TYPE_SEQUENCER_THREAD)) != NULL){ if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(sequencer_thread->flags)))) != 0){ ags_thread_stop(sequencer_thread); } sequencer_thread = g_atomic_pointer_get(&(sequencer_thread->next)); } /* export thread */ export_thread = thread; while((export_thread = ags_thread_find_type(export_thread, AGS_TYPE_EXPORT_THREAD)) != NULL){ if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(export_thread->flags)))) != 0){ ags_thread_stop(export_thread); } export_thread = g_atomic_pointer_get(&(export_thread->next)); } } } void ags_audio_loop_notify_frequency(GObject *gobject, GParamSpec *pspec, gpointer user_data) { AGS_AUDIO_LOOP(gobject)->time_cycle = NSEC_PER_SEC / AGS_THREAD(gobject)->freq; } void* ags_audio_loop_timing_thread(void *ptr) { AgsAudioLoop *audio_loop; AgsThread *thread; struct timespec idle; guint time_spent; pthread_mutex_t *timing_mutex; pthread_cond_t *timing_cond; audio_loop = AGS_AUDIO_LOOP(ptr); thread = (AgsThread *) audio_loop; timing_mutex = audio_loop->timing_mutex; timing_cond = audio_loop->timing_cond; while((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0){ pthread_mutex_lock(timing_mutex); if((AGS_AUDIO_LOOP_TIMING_WAKEUP & (g_atomic_int_get(&(audio_loop->timing_flags)))) == 0){ g_atomic_int_or(&(audio_loop->timing_flags), AGS_AUDIO_LOOP_TIMING_WAITING); while((AGS_AUDIO_LOOP_TIMING_WAKEUP & (g_atomic_int_get(&(audio_loop->timing_flags)))) == 0 && (AGS_AUDIO_LOOP_TIMING_WAITING & (g_atomic_int_get(&(audio_loop->timing_flags)))) != 0){ pthread_cond_wait(timing_cond, timing_mutex); } g_atomic_int_and(&(audio_loop->timing_flags), ~(AGS_AUDIO_LOOP_TIMING_WAITING | AGS_AUDIO_LOOP_TIMING_WAKEUP)); } pthread_mutex_unlock(timing_mutex); idle.tv_sec = 0; idle.tv_nsec = audio_loop->time_cycle - 4000; //NOTE:JK: 4 usec tolerance nanosleep(&idle, NULL); g_atomic_int_set(&(audio_loop->time_spent), audio_loop->time_cycle); // ags_main_loop_interrupt(AGS_MAIN_LOOP(thread), // AGS_THREAD_SUSPEND_SIG, // audio_loop->time_cycle, &time_spent); // g_message("inter"); } pthread_exit(NULL); } /** * ags_audio_loop_play_recall: * @audio_loop: an #AgsAudioLoop * * Runs all recalls assigned with @audio_loop. You may want to use * #AgsAppendRecall task to add an #AgsRecall. * * Since: 1.0.0 */ void ags_audio_loop_play_recall(AgsAudioLoop *audio_loop) { AgsPlayback *playback; AgsRecall *recall; GList *list, *list_next; guint stage; guint recall_flags; /* set flags */ audio_loop->flags |= AGS_AUDIO_LOOP_PLAYING_RECALL; stage = 0; ags_audio_loop_play_recall0: list = audio_loop->play_recall; if(list == NULL){ if((AGS_AUDIO_LOOP_PLAY_RECALL_TERMINATING & (audio_loop->flags)) != 0){ audio_loop->flags &= (~(AGS_AUDIO_LOOP_PLAY_RECALL | AGS_AUDIO_LOOP_PLAY_RECALL_TERMINATING)); }else{ audio_loop->flags |= AGS_AUDIO_LOOP_PLAY_RECALL_TERMINATING; } } audio_loop->flags &= (~AGS_AUDIO_LOOP_PLAY_RECALL_TERMINATING); /* */ while(list != NULL){ list_next = list->next; /* get playback fields */ playback = AGS_PLAYBACK(list->data); recall = (AgsRecall *) playback->source; /* recall flags */ //FIXME:JK: thread-unsafe recall_flags = recall->flags; /* initialize run or remove */ if((AGS_RECALL_REMOVE & (recall_flags)) == 0){ if((AGS_RECALL_HIDE & (recall_flags)) == 0){ if(stage == 0){ ags_recall_run_pre(recall); }else if(stage == 1){ ags_recall_run_inter(recall); }else{ ags_recall_run_post(recall); } } }else{ ags_audio_loop_remove_recall(audio_loop, playback); } /* iterate */ list = list_next; } /* 3 stages */ if(stage == 0){ stage = 1; goto ags_audio_loop_play_recall0; }else if(stage == 1){ stage = 2; goto ags_audio_loop_play_recall0; } audio_loop->flags &= (~AGS_AUDIO_LOOP_PLAYING_RECALL); } /** * ags_audio_loop_play_channel: * @audio_loop: an #AgsAudioLoop * * Runs all recalls descending recursively and ascending till next * #AgsRecycling around prior added #AgsChannel with #AgsAppendChannel * task. * * Since: 1.0.0 */ void ags_audio_loop_play_channel(AgsAudioLoop *audio_loop) { AgsPlayback *playback; AgsChannel *channel; AgsMutexManager *mutex_manager; GList *list_play, *list_next_play; gint stage; if(audio_loop->play_channel == NULL){ if((AGS_AUDIO_LOOP_PLAY_CHANNEL_TERMINATING & (audio_loop->flags)) != 0){ audio_loop->flags &= (~(AGS_AUDIO_LOOP_PLAY_CHANNEL | AGS_AUDIO_LOOP_PLAY_CHANNEL_TERMINATING)); }else{ audio_loop->flags |= AGS_AUDIO_LOOP_PLAY_CHANNEL_TERMINATING; } } /* entry point */ audio_loop->flags &= (~AGS_AUDIO_LOOP_PLAY_CHANNEL_TERMINATING); audio_loop->flags |= AGS_AUDIO_LOOP_PLAYING_CHANNEL; /* run the 3 stages */ list_play = audio_loop->play_channel; while(list_play != NULL){ list_next_play = list_play->next; playback = (AgsPlayback *) list_play->data; channel = (AgsChannel *) playback->source; /* play */ if((AGS_PLAYBACK_REMOVE & (g_atomic_int_get(&(playback->flags)))) == 0){ if((AGS_PLAYBACK_SUPER_THREADED_CHANNEL & (g_atomic_int_get(&(playback->flags)))) != 0){ /* super threaded */ ags_audio_loop_play_channel_super_threaded(audio_loop, playback); }else{ gboolean remove_play; /* not super threaded */ remove_play = TRUE; for(stage = 0; stage < 3; stage++){ if((AGS_PLAYBACK_PLAYBACK & (g_atomic_int_get(&(playback->flags)))) != 0 && playback->recall_id[0] != NULL){ remove_play = FALSE; ags_channel_recursive_play(channel, playback->recall_id[0], stage); } if((AGS_PLAYBACK_SEQUENCER & (g_atomic_int_get(&(playback->flags)))) != 0 && playback->recall_id[1] != NULL){ remove_play = FALSE; ags_channel_recursive_play(channel, playback->recall_id[1], stage); } if((AGS_PLAYBACK_NOTATION & (g_atomic_int_get(&(playback->flags)))) != 0 && playback->recall_id[2] != NULL){ remove_play = FALSE; ags_channel_recursive_play(channel, playback->recall_id[2], stage); } } if(remove_play){ ags_audio_loop_remove_channel(audio_loop, (GObject *) channel); } } } /* iterate */ list_play = list_next_play; } /* sync the 3 stages */ list_play = audio_loop->play_channel; while(list_play != NULL){ list_next_play = list_play->next; playback = (AgsPlayback *) list_play->data; /* sync */ if((AGS_PLAYBACK_SUPER_THREADED_CHANNEL & (g_atomic_int_get(&(playback->flags)))) != 0){ /* super threaded */ ags_audio_loop_sync_channel_super_threaded(audio_loop, playback); } /* iterate */ list_play = list_next_play; } } void ags_audio_loop_play_channel_super_threaded(AgsAudioLoop *audio_loop, AgsPlayback *playback) { AgsChannelThread *channel_thread; AgsThread *thread; /* playback */ thread = playback->channel_thread[0]; channel_thread = (AgsChannelThread *) thread; if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0 && (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) == 0){ /* wakeup wait */ pthread_mutex_lock(channel_thread->wakeup_mutex); g_atomic_int_and(&(channel_thread->flags), (~AGS_CHANNEL_THREAD_WAIT)); if((AGS_CHANNEL_THREAD_DONE & (g_atomic_int_get(&(channel_thread->flags)))) == 0){ pthread_cond_signal(channel_thread->wakeup_cond); } pthread_mutex_unlock(channel_thread->wakeup_mutex); } } void ags_audio_loop_sync_channel_super_threaded(AgsAudioLoop *audio_loop, AgsPlayback *playback) { AgsChannelThread *channel_thread; AgsThread *thread; gboolean do_playback; /* playback */ thread = playback->channel_thread[0]; channel_thread = (AgsChannelThread *) thread; do_playback = FALSE; if((AGS_PLAYBACK_PLAYBACK & (g_atomic_int_get(&(playback->flags)))) != 0){ do_playback = TRUE; pthread_mutex_lock(channel_thread->done_mutex); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0 && (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) == 0 && (AGS_THREAD_INITIAL_SYNC & (g_atomic_int_get(&(thread->flags)))) == 0){ if((AGS_CHANNEL_THREAD_WAIT_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) != 0){ g_atomic_int_and(&(channel_thread->flags), (~AGS_CHANNEL_THREAD_DONE_SYNC)); while((AGS_CHANNEL_THREAD_DONE_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) == 0 && (AGS_CHANNEL_THREAD_WAIT_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) != 0){ pthread_cond_wait(channel_thread->done_cond, channel_thread->done_mutex); } } } g_atomic_int_or(&(channel_thread->flags), (AGS_CHANNEL_THREAD_WAIT_SYNC | AGS_CHANNEL_THREAD_DONE_SYNC)); pthread_mutex_unlock(channel_thread->done_mutex); } /* */ if(do_playback && playback->recall_id[0] == NULL){ ags_thread_stop(thread); g_atomic_int_and(&(playback->flags), (~AGS_PLAYBACK_PLAYBACK)); } /* remove from playback */ if(!do_playback){ ags_thread_stop(thread); ags_audio_loop_remove_channel(audio_loop, playback->source); } } /** * ags_audio_loop_play_audio: * @audio_loop: an #AgsAudioLoop * * Like ags_audio_loop_play_channel() except that it runs all channels within * #AgsAudio. * * Since: 1.0.0 */ void ags_audio_loop_play_audio(AgsAudioLoop *audio_loop) { AgsAudio *audio; AgsChannel *output; AgsPlaybackDomain *playback_domain; AgsPlayback *playback; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list_play_domain, *list_next_play_domain; GList *list_play; gint stage; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *output_mutex; if(audio_loop->play_audio == NULL){ if((AGS_AUDIO_LOOP_PLAY_AUDIO_TERMINATING & (audio_loop->flags)) != 0){ audio_loop->flags &= (~(AGS_AUDIO_LOOP_PLAY_AUDIO | AGS_AUDIO_LOOP_PLAY_AUDIO_TERMINATING)); }else{ audio_loop->flags |= AGS_AUDIO_LOOP_PLAY_AUDIO_TERMINATING; } } audio_loop->flags &= (~AGS_AUDIO_LOOP_PLAY_AUDIO_TERMINATING); audio_loop->flags |= AGS_AUDIO_LOOP_PLAYING_AUDIO; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* playing */ list_play_domain = audio_loop->play_audio; while(list_play_domain != NULL){ list_next_play_domain = list_play_domain->next; playback_domain = (AgsPlaybackDomain *) list_play_domain->data; audio = (AgsAudio *) playback_domain->domain; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get audio fields */ pthread_mutex_lock(audio_mutex); output = audio->output; pthread_mutex_unlock(audio_mutex); /* play */ if((AGS_PLAYBACK_DOMAIN_SUPER_THREADED_AUDIO & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ ags_audio_loop_play_audio_super_threaded(audio_loop, playback_domain); }else{ while(output != NULL){ /* get output mutex */ pthread_mutex_lock(application_mutex); output_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* get playback */ pthread_mutex_lock(output_mutex); playback = (AgsPlayback *) output->playback; // ags_playback_find_source(playback_domain->playback, // (GObject *) output); if(playback == NULL){ output = output->next; pthread_mutex_unlock(output_mutex); continue; } pthread_mutex_unlock(output_mutex); /* play */ if((AGS_PLAYBACK_SUPER_THREADED_RECYCLING & (g_atomic_int_get(&(playback->flags)))) != 0){ //TODO:JK: implement me /* super threaded recycling level */ if((AGS_PLAYBACK_PLAYBACK & (g_atomic_int_get(&(playback->flags)))) != 0){ AGS_ITERATOR_THREAD(playback->iterator_thread[0])->flags |= AGS_ITERATOR_THREAD_DONE; pthread_cond_signal(AGS_ITERATOR_THREAD(playback->iterator_thread[0])->tic_cond); } if((AGS_PLAYBACK_SEQUENCER & (g_atomic_int_get(&(playback->flags)))) != 0){ AGS_ITERATOR_THREAD(playback->iterator_thread[1])->flags |= AGS_ITERATOR_THREAD_DONE; pthread_cond_signal(AGS_ITERATOR_THREAD(playback->iterator_thread[1])->tic_cond); } if((AGS_PLAYBACK_NOTATION & (g_atomic_int_get(&(playback->flags)))) != 0){ AGS_ITERATOR_THREAD(playback->iterator_thread[2])->flags |= AGS_ITERATOR_THREAD_DONE; pthread_cond_signal(AGS_ITERATOR_THREAD(playback->iterator_thread[2])->tic_cond); } }else{ gboolean remove_domain; /* not super threaded */ // pthread_mutex_lock(audio_mutex); // pthread_mutex_lock(soundcard_mutex); remove_domain = TRUE; /* run the 3 stages */ for(stage = 0; stage < 3; stage++){ if((AGS_PLAYBACK_REMOVE & (g_atomic_int_get(&(playback->flags)))) == 0){ if((AGS_PLAYBACK_PLAYBACK & (g_atomic_int_get(&(playback->flags)))) != 0 && playback->recall_id[0] != NULL){ remove_domain = FALSE; ags_channel_recursive_play(output, playback->recall_id[0], stage); } if((AGS_PLAYBACK_SEQUENCER & (g_atomic_int_get(&(playback->flags)))) != 0 && playback->recall_id[1] != NULL){ remove_domain = FALSE; ags_channel_recursive_play(output, playback->recall_id[1], stage); } if((AGS_PLAYBACK_NOTATION & (g_atomic_int_get(&(playback->flags)))) != 0 && playback->recall_id[2] != NULL){ remove_domain = FALSE; ags_channel_recursive_play(output, playback->recall_id[2], stage); } } } /* check for removal */ if(remove_domain){ AgsChannel *channel; ags_audio_loop_remove_audio(audio_loop, (GObject *) audio); channel = audio->output; while(channel != NULL){ playback = AGS_PLAYBACK(channel->playback); g_atomic_int_and(&(playback->flags), (~(AGS_PLAYBACK_REMOVE | AGS_PLAYBACK_DONE))); // ags_audio_done(audio); //TODO:JK: verify g_object_unref() missing playback->recall_id[0] = NULL; playback->recall_id[1] = NULL; playback->recall_id[2] = NULL; channel = channel->next; } } // pthread_mutex_unlock(soundcard_mutex); // pthread_mutex_unlock(audio_mutex); } /* iterate */ pthread_mutex_lock(output_mutex); output = output->next; pthread_mutex_unlock(output_mutex); } } /* iterate */ list_play_domain = list_next_play_domain; } /* sync - wait the 3 stages */ list_play_domain = audio_loop->play_audio; while(list_play_domain != NULL){ list_next_play_domain = list_play_domain->next; playback_domain = (AgsPlaybackDomain *) list_play_domain->data; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get audio fields */ pthread_mutex_lock(audio_mutex); output = audio->output; pthread_mutex_unlock(audio_mutex); /* sync */ if((AGS_PLAYBACK_DOMAIN_SUPER_THREADED_AUDIO & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ ags_audio_loop_sync_audio_super_threaded(audio_loop, playback_domain); }else{ while(output != NULL){ /* get output mutex */ pthread_mutex_lock(application_mutex); output_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* get playback */ pthread_mutex_lock(output_mutex); playback = (AgsPlayback *) output->playback; // ags_playback_find_source(playback_domain->playback, // (GObject *) output); if(playback == NULL){ output = output->next; pthread_mutex_unlock(output_mutex); continue; } pthread_mutex_unlock(output_mutex); /* sync */ if((AGS_PLAYBACK_SUPER_THREADED_CHANNEL & (g_atomic_int_get(&(playback->flags)))) != 0){ ags_audio_loop_sync_channel_super_threaded(audio_loop, playback); }else if((AGS_PLAYBACK_SUPER_THREADED_RECYCLING & (g_atomic_int_get(&(playback->flags)))) != 0){ //TODO:JK: implement me } /* iterate */ pthread_mutex_lock(output_mutex); output = output->next; pthread_mutex_unlock(output_mutex); } } /* iterate */ list_play_domain = list_next_play_domain; } } /** * ags_audio_loop_play_audio_super_threaded: * @audio_loop: the #AgsAudioLoop * @playback_domain: an #AgsPlaybackDomain * * Play audio super-threaded. * * Since: 1.0.0 */ void ags_audio_loop_play_audio_super_threaded(AgsAudioLoop *audio_loop, AgsPlaybackDomain *playback_domain) { /* sequencer */ if((AGS_PLAYBACK_DOMAIN_SEQUENCER & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ AgsAudioThread *audio_thread; AgsThread *thread; thread = playback_domain->audio_thread[1]; if(thread != NULL){ audio_thread = (AgsAudioThread *) thread; if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0 && (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) == 0){ /* wakeup wait */ pthread_mutex_lock(audio_thread->wakeup_mutex); g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_WAIT)); if((AGS_AUDIO_THREAD_DONE & (g_atomic_int_get(&(audio_thread->flags)))) == 0){ pthread_cond_signal(audio_thread->wakeup_cond); } pthread_mutex_unlock(audio_thread->wakeup_mutex); } } } /* notation */ if((AGS_PLAYBACK_DOMAIN_NOTATION & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ AgsAudioThread *audio_thread; AgsThread *thread; thread = playback_domain->audio_thread[2]; if(thread != NULL){ audio_thread = (AgsAudioThread *) thread; if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0 && (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) == 0){ /* wakeup wait */ pthread_mutex_lock(audio_thread->wakeup_mutex); g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_WAIT)); if((AGS_AUDIO_THREAD_DONE & (g_atomic_int_get(&(audio_thread->flags)))) == 0){ pthread_cond_signal(audio_thread->wakeup_cond); } pthread_mutex_unlock(audio_thread->wakeup_mutex); } } } } /** * ags_audio_loop_sync_audio_super_threaded: * @audio_loop: the #AgsAudioLoop * @playback_domain: an #AgsPlaybackDomain * * Sync audio super-threaded. * * Since: 1.0.0 */ void ags_audio_loop_sync_audio_super_threaded(AgsAudioLoop *audio_loop, AgsPlaybackDomain *playback_domain) { GList *playback; gboolean do_sequencer, do_notation; gboolean found_sequencer, found_notation; gboolean initial_sequencer, initial_notation; do_sequencer = FALSE; do_notation = FALSE; initial_sequencer = FALSE; initial_notation = FALSE; /* sequencer */ if((AGS_PLAYBACK_DOMAIN_SEQUENCER & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ AgsAudioThread *audio_thread; audio_thread = AGS_AUDIO_THREAD(playback_domain->audio_thread[1]); do_sequencer = TRUE; pthread_mutex_lock(audio_thread->done_mutex); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(playback_domain->audio_thread[1]->flags)))) != 0 && (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(playback_domain->audio_thread[1]->flags)))) == 0){ if((AGS_AUDIO_THREAD_WAIT_SYNC & (g_atomic_int_get(&(audio_thread->flags)))) != 0){ g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_DONE_SYNC)); while((AGS_AUDIO_THREAD_DONE_SYNC & (g_atomic_int_get(&(audio_thread->flags)))) == 0 && (AGS_AUDIO_THREAD_WAIT_SYNC & (g_atomic_int_get(&(audio_thread->flags)))) != 0){ pthread_cond_wait(audio_thread->done_cond, audio_thread->done_mutex); } } }else{ initial_sequencer = TRUE; } g_atomic_int_or(&(audio_thread->flags), (AGS_AUDIO_THREAD_WAIT_SYNC | AGS_AUDIO_THREAD_DONE_SYNC)); pthread_mutex_unlock(audio_thread->done_mutex); } /* notation */ if((AGS_PLAYBACK_DOMAIN_NOTATION & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ AgsAudioThread *audio_thread; audio_thread = AGS_AUDIO_THREAD(playback_domain->audio_thread[2]); if(audio_thread != NULL){ do_notation = TRUE; pthread_mutex_lock(audio_thread->done_mutex); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(playback_domain->audio_thread[2]->flags)))) != 0 && (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(playback_domain->audio_thread[2]->flags)))) == 0){ if((AGS_AUDIO_THREAD_WAIT_SYNC & (g_atomic_int_get(&(audio_thread->flags)))) != 0){ g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_DONE_SYNC)); while((AGS_AUDIO_THREAD_DONE_SYNC & (g_atomic_int_get(&(audio_thread->flags)))) == 0 && (AGS_AUDIO_THREAD_WAIT_SYNC & (g_atomic_int_get(&(audio_thread->flags)))) != 0){ pthread_cond_wait(audio_thread->done_cond, audio_thread->done_mutex); } } }else{ initial_notation = TRUE; } g_atomic_int_or(&(audio_thread->flags), (AGS_AUDIO_THREAD_WAIT_SYNC | AGS_AUDIO_THREAD_DONE_SYNC)); pthread_mutex_unlock(audio_thread->done_mutex); } } /* check if flags are still valid */ found_sequencer = FALSE; found_notation = FALSE; playback = playback_domain->playback; while(playback != NULL){ if(do_sequencer && AGS_PLAYBACK(playback->data)->recall_id[1] != NULL){ found_sequencer = TRUE; } if(do_notation && AGS_PLAYBACK(playback->data)->recall_id[2] != NULL){ found_notation = TRUE; } playback = playback->next; } if(!found_sequencer && !initial_sequencer){ ags_thread_stop(playback_domain->audio_thread[1]); g_atomic_int_and(&(playback_domain->flags), (~AGS_PLAYBACK_DOMAIN_SEQUENCER)); } if(!found_notation && !initial_notation){ ags_thread_stop(playback_domain->audio_thread[2]); g_atomic_int_and(&(playback_domain->flags), (~AGS_PLAYBACK_DOMAIN_NOTATION)); } /* remove domain from playback */ if(!found_sequencer && !found_notation && !initial_sequencer && !initial_notation){ ags_audio_loop_remove_audio(audio_loop, playback_domain->domain); } } /** * ags_audio_loop_add_audio: * @audio_loop: the #AgsAudioLoop * @audio: an #AgsAudio * * Add audio for playback. * * Since: 1.0.0 */ void ags_audio_loop_add_audio(AgsAudioLoop *audio_loop, GObject *audio) { if(g_list_find(audio_loop->play_audio, AGS_AUDIO(audio)->playback_domain) == NULL){ audio_loop->play_audio_ref = audio_loop->play_audio_ref + 1; g_object_ref(G_OBJECT(audio)); audio_loop->play_audio = g_list_prepend(audio_loop->play_audio, AGS_AUDIO(audio)->playback_domain); } } /** * ags_audio_loop_remove_audio: * @audio_loop: the #AgsAudioLoop * @audio: an #AgsAudio * * Remove audio of playback. * * Since: 1.0.0 */ void ags_audio_loop_remove_audio(AgsAudioLoop *audio_loop, GObject *audio) { if(g_list_find(audio_loop->play_audio, AGS_AUDIO(audio)->playback_domain) != NULL){ audio_loop->play_audio = g_list_remove(audio_loop->play_audio, AGS_AUDIO(audio)->playback_domain); audio_loop->play_audio_ref = audio_loop->play_audio_ref - 1; g_object_unref(audio); } } /** * ags_audio_loop_add_channel: * @audio_loop: the #AgsAudioLoop * @channel: an #AgsChannel * * Add channel for playback. * * Since: 1.0.0 */ void ags_audio_loop_add_channel(AgsAudioLoop *audio_loop, GObject *channel) { if(g_list_find(audio_loop->play_channel, AGS_CHANNEL(channel)->playback) == NULL){ g_object_ref(G_OBJECT(channel)); audio_loop->play_channel = g_list_prepend(audio_loop->play_channel, AGS_CHANNEL(channel)->playback); audio_loop->play_channel_ref = audio_loop->play_channel_ref + 1; } } /** * ags_audio_loop_remove_channel: * @audio_loop: the #AgsAudioLoop * @channel: an #AgsChannel * * Remove channel of playback. * * Since: 1.0.0 */ void ags_audio_loop_remove_channel(AgsAudioLoop *audio_loop, GObject *channel) { if(g_list_find(audio_loop->play_channel, AGS_CHANNEL(channel)->playback) != NULL){ audio_loop->play_channel = g_list_remove(audio_loop->play_channel, AGS_CHANNEL(channel)->playback); audio_loop->play_channel_ref = audio_loop->play_channel_ref - 1; g_object_unref(channel); } } /** * ags_audio_loop_add_recall: * @audio_loop: the #AgsAudioLoop * @playback: an #AgsRecall * * Add recall for playback. * * Since: 1.0.0 */ void ags_audio_loop_add_recall(AgsAudioLoop *audio_loop, gpointer playback) { if(g_list_find(audio_loop->play_recall, playback) == NULL){ /* append to GObject */ AGS_PLAYBACK(playback)->flags &= (~AGS_PLAYBACK_REMOVE); audio_loop->play_recall = g_list_append(audio_loop->play_recall, playback); audio_loop->play_recall_ref += 1; } } /** * ags_audio_loop_remove_recall: * @audio_loop: the #AgsAudioLoop * @playback: an #AgsRecall * * Remove recall of playback. * * Since: 1.0.0 */ void ags_audio_loop_remove_recall(AgsAudioLoop *audio_loop, gpointer playback) { if(g_list_find(audio_loop->play_recall, playback) != NULL){ audio_loop->play_recall = g_list_remove(audio_loop->play_recall, playback); audio_loop->play_recall_ref = audio_loop->play_recall_ref - 1; } } /** * ags_audio_loop_new: * @soundcard: the #GObject * @application_context: the #AgsApplicationContext * * Create a new #AgsAudioLoop. * * Returns: the new #AgsAudioLoop * * Since: 1.0.0 */ AgsAudioLoop* ags_audio_loop_new(GObject *soundcard, GObject *application_context) { AgsAudioLoop *audio_loop; audio_loop = (AgsAudioLoop *) g_object_new(AGS_TYPE_AUDIO_LOOP, "soundcard", soundcard, NULL); if(application_context != NULL){ g_object_ref(G_OBJECT(application_context)); audio_loop->application_context = application_context; } return(audio_loop); } gsequencer-1.4.24/ags/audio/thread/ags_record_thread.h0000644000175000017500000000421413246707333017627 00000000000000/* 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 . */ #ifndef __AGS_RECORD_THREAD_H__ #define __AGS_RECORD_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #define AGS_TYPE_RECORD_THREAD (ags_record_thread_get_type()) #define AGS_RECORD_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECORD_THREAD, AgsRecordThread)) #define AGS_RECORD_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_RECORD_THREAD, AgsRecordThreadClass)) #define AGS_IS_RECORD_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECORD_THREAD)) #define AGS_IS_RECORD_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECORD_THREAD)) #define AGS_RECORD_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_RECORD_THREAD, AgsRecordThreadClass)) #define AGS_RECORD_THREAD_DEFAULT_DELAY (128) typedef struct _AgsRecordThread AgsRecordThread; typedef struct _AgsRecordThreadClass AgsRecordThreadClass; struct _AgsRecordThread { AgsThread thread; AgsRegistry *registry; guint delay; guint counter; }; struct _AgsRecordThreadClass { AgsThreadClass thread; }; GType ags_record_thread_get_type(); AgsRecordThread* ags_record_thread_new(GObject *devout, AgsRegistry *registry); #endif /*__AGS_RECORD_THREAD_H__*/ gsequencer-1.4.24/ags/audio/thread/ags_channel_thread.c0000644000175000017500000003752313247044247017764 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_channel_thread_class_init(AgsChannelThreadClass *channel_thread); void ags_channel_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_channel_thread_init(AgsChannelThread *channel_thread); void ags_channel_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_channel_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_channel_thread_connect(AgsConnectable *connectable); void ags_channel_thread_disconnect(AgsConnectable *connectable); void ags_channel_thread_dispose(GObject *gobject); void ags_channel_thread_finalize(GObject *gobject); void ags_channel_thread_start(AgsThread *thread); void ags_channel_thread_run(AgsThread *thread); void ags_channel_thread_stop(AgsThread *thread); /** * SECTION:ags_channel_thread * @short_description: channel thread * @title: AgsChannelThread * @section_id: * @include: ags/audio/thread/ags_channel_thread.h * * The #AgsChannelThread acts as channel output thread to soundcard. */ enum{ PROP_0, PROP_SOUNDCARD, PROP_CHANNEL, }; static gpointer ags_channel_thread_parent_class = NULL; static AgsConnectableInterface *ags_channel_thread_parent_connectable_interface; GType ags_channel_thread_get_type() { static GType ags_type_channel_thread = 0; if(!ags_type_channel_thread){ static const GTypeInfo ags_channel_thread_info = { sizeof (AgsChannelThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_channel_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsChannelThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_channel_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_channel_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_channel_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsChannelThread", &ags_channel_thread_info, 0); g_type_add_interface_static(ags_type_channel_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_channel_thread); } void ags_channel_thread_class_init(AgsChannelThreadClass *channel_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_channel_thread_parent_class = g_type_class_peek_parent(channel_thread); /* GObject */ gobject = (GObjectClass *) channel_thread; gobject->set_property = ags_channel_thread_set_property; gobject->get_property = ags_channel_thread_get_property; gobject->dispose = ags_channel_thread_dispose; gobject->finalize = ags_channel_thread_finalize; /* properties */ /** * AgsChannelThread:soundcard: * * The assigned #AgsChannel. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard assigned to"), i18n_pspec("The AgsSoundcard it is assigned to."), G_TYPE_OBJECT, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsChannelThread:channel: * * The assigned #AgsChannel. * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel assigned to"), i18n_pspec("The AgsChannel it is assigned to."), AGS_TYPE_CHANNEL, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /* AgsThread */ thread = (AgsThreadClass *) channel_thread; thread->start = ags_channel_thread_start; thread->run = ags_channel_thread_run; thread->stop = ags_channel_thread_stop; } void ags_channel_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_channel_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_channel_thread_connect; connectable->disconnect = ags_channel_thread_disconnect; } void ags_channel_thread_init(AgsChannelThread *channel_thread) { AgsThread *thread; AgsConfig *config; gchar *str0, *str1; thread = (AgsThread *) channel_thread; g_atomic_int_or(&(thread->flags), (AGS_THREAD_START_SYNCED_FREQ)); config = ags_config_get_instance(); str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str0 == NULL){ str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str1 == NULL){ str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str0 == NULL || str1 == NULL){ thread->freq = AGS_CHANNEL_THREAD_DEFAULT_JIFFIE; }else{ guint samplerate; guint buffer_size; samplerate = g_ascii_strtoull(str0, NULL, 10); buffer_size = g_ascii_strtoull(str1, NULL, 10); thread->freq = ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; } g_free(str0); g_free(str1); g_atomic_int_set(&(channel_thread->flags), 0); channel_thread->soundcard = NULL; /* start */ pthread_mutexattr_init(&(channel_thread->wakeup_attr)); pthread_mutexattr_settype(&(channel_thread->wakeup_attr), PTHREAD_MUTEX_RECURSIVE); channel_thread->wakeup_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(channel_thread->wakeup_mutex, &(channel_thread->wakeup_attr)); channel_thread->wakeup_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(channel_thread->wakeup_cond, NULL); /* sync */ pthread_mutexattr_init(&(channel_thread->done_attr)); pthread_mutexattr_settype(&(channel_thread->done_attr), PTHREAD_MUTEX_RECURSIVE); channel_thread->done_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(channel_thread->done_mutex, &(channel_thread->done_attr)); channel_thread->done_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(channel_thread->done_cond, NULL); } void ags_channel_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsChannelThread *channel_thread; channel_thread = AGS_CHANNEL_THREAD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(soundcard == channel_thread->soundcard){ return; } if(channel_thread->soundcard != NULL){ g_object_unref(channel_thread->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } channel_thread->soundcard = soundcard; } break; case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(channel_thread->channel == (GObject *) channel){ return; } if(channel_thread->channel != NULL){ g_object_unref(G_OBJECT(channel_thread->channel)); } if(channel != NULL){ g_object_ref(G_OBJECT(channel)); } channel_thread->channel = (GObject *) channel; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_channel_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsChannelThread *channel_thread; channel_thread = AGS_CHANNEL_THREAD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, channel_thread->soundcard); } break; case PROP_CHANNEL: { g_value_set_object(value, G_OBJECT(channel_thread->channel)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_channel_thread_connect(AgsConnectable *connectable) { ags_channel_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_channel_thread_disconnect(AgsConnectable *connectable) { ags_channel_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_channel_thread_dispose(GObject *gobject) { AgsChannelThread *channel_thread; channel_thread = AGS_CHANNEL_THREAD(gobject); /* soundcard */ if(channel_thread->soundcard != NULL){ g_object_unref(channel_thread->soundcard); channel_thread->soundcard = NULL; } /* channel */ if(channel_thread->channel != NULL){ g_object_unref(channel_thread->channel); channel_thread->channel = NULL; } /* call parent */ G_OBJECT_CLASS(ags_channel_thread_parent_class)->dispose(gobject); } void ags_channel_thread_finalize(GObject *gobject) { AgsChannelThread *channel_thread; channel_thread = AGS_CHANNEL_THREAD(gobject); /* soundcard */ if(channel_thread->soundcard != NULL){ g_object_unref(channel_thread->soundcard); } /* wakeup mutex and cond */ pthread_mutex_destroy(channel_thread->wakeup_mutex); free(channel_thread->wakeup_mutex); pthread_cond_destroy(channel_thread->wakeup_cond); free(channel_thread->wakeup_cond); /* sync mutex and cond */ pthread_mutex_destroy(channel_thread->done_mutex); free(channel_thread->done_mutex); pthread_cond_destroy(channel_thread->done_cond); free(channel_thread->done_cond); /* channel */ if(channel_thread->channel != NULL){ g_object_unref(channel_thread->channel); } /* call parent */ G_OBJECT_CLASS(ags_channel_thread_parent_class)->finalize(gobject); } void ags_channel_thread_start(AgsThread *thread) { g_message("channel thread start"); /* reset status */ g_atomic_int_or(&(AGS_CHANNEL_THREAD(thread)->flags), (AGS_CHANNEL_THREAD_WAIT | AGS_CHANNEL_THREAD_DONE | AGS_CHANNEL_THREAD_WAIT_SYNC | AGS_CHANNEL_THREAD_DONE_SYNC)); if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ AGS_THREAD_CLASS(ags_channel_thread_parent_class)->start(thread); } } void ags_channel_thread_run(AgsThread *thread) { AgsChannel *channel; AgsPlayback *playback; AgsMutexManager *mutex_manager; AgsChannelThread *channel_thread; AgsRecallID *current_recall_id; AgsThread *current_thread; gint stage; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; #ifdef AGS_WITH_RT if((AGS_THREAD_RT_SETUP & (g_atomic_int_get(&(thread->flags)))) == 0){ struct sched_param param; /* Declare ourself as a real time task */ param.sched_priority = AGS_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } g_atomic_int_or(&(thread->flags), AGS_THREAD_RT_SETUP); } #endif if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) != 0){ return; } // g_message("eer"); channel_thread = AGS_CHANNEL_THREAD(thread); // thread->freq = AGS_SOUNDCARD(thread->soundcard)->delay[AGS_SOUNDCARD(thread->soundcard)->tic_counter] / AGS_SOUNDCARD(thread->soundcard)->delay_factor; channel = (AgsChannel *) channel_thread->channel; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get soundcard play */ pthread_mutex_lock(channel_mutex); playback = (AgsPlayback *) channel->playback; pthread_mutex_unlock(channel_mutex); /* start - wait until signaled */ pthread_mutex_lock(channel_thread->wakeup_mutex); if((AGS_CHANNEL_THREAD_DONE & (g_atomic_int_get(&(channel_thread->flags)))) == 0 && (AGS_CHANNEL_THREAD_WAIT & (g_atomic_int_get(&(channel_thread->flags)))) != 0){ g_atomic_int_and(&(channel_thread->flags), (~AGS_CHANNEL_THREAD_DONE)); while((AGS_CHANNEL_THREAD_DONE & (g_atomic_int_get(&(channel_thread->flags)))) == 0 && (AGS_CHANNEL_THREAD_WAIT & (g_atomic_int_get(&(channel_thread->flags)))) != 0){ pthread_cond_wait(channel_thread->wakeup_cond, channel_thread->wakeup_mutex); } } g_atomic_int_or(&(channel_thread->flags), (AGS_CHANNEL_THREAD_DONE | AGS_CHANNEL_THREAD_WAIT)); pthread_mutex_unlock(channel_thread->wakeup_mutex); /* do channel processing */ for(stage = 0; stage < 3; stage++){ /* playback */ pthread_mutex_lock(channel_mutex); current_thread = playback->channel_thread[0]; current_recall_id = playback->recall_id[0]; pthread_mutex_unlock(channel_mutex); if(thread == current_thread){ ags_channel_recursive_play(channel, current_recall_id, stage); } /* sequencer */ pthread_mutex_lock(channel_mutex); current_thread = playback->channel_thread[1]; current_recall_id = playback->recall_id[1]; pthread_mutex_unlock(channel_mutex); if(thread == current_thread){ ags_channel_recursive_play(channel, current_recall_id, stage); } /* notation */ pthread_mutex_lock(channel_mutex); current_thread = playback->channel_thread[2]; current_recall_id = playback->recall_id[2]; pthread_mutex_unlock(channel_mutex); if(thread == current_thread){ ags_channel_recursive_play(channel, current_recall_id, stage); } } /* sync */ pthread_mutex_lock(channel_thread->done_mutex); g_atomic_int_and(&(channel_thread->flags), (~AGS_CHANNEL_THREAD_WAIT_SYNC)); if((AGS_CHANNEL_THREAD_DONE_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) == 0){ pthread_cond_signal(channel_thread->done_cond); } pthread_mutex_unlock(channel_thread->done_mutex); } void ags_channel_thread_stop(AgsThread *thread) { AgsChannelThread *channel_thread; if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) == 0){ return; } /* */ channel_thread = AGS_CHANNEL_THREAD(thread); g_message("channel thread stop"); /* call parent */ AGS_THREAD_CLASS(ags_channel_thread_parent_class)->stop(thread); /* ensure synced */ pthread_mutex_lock(channel_thread->done_mutex); g_atomic_int_and(&(channel_thread->flags), (~AGS_CHANNEL_THREAD_WAIT_SYNC)); if((AGS_CHANNEL_THREAD_DONE_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) == 0){ pthread_cond_signal(channel_thread->done_cond); } pthread_mutex_unlock(channel_thread->done_mutex); } /** * ags_channel_thread_new: * @soundcard: the #GObject * @channel: the #AgsChannel * * Create a new #AgsChannelThread. * * Returns: the new #AgsChannelThread * * Since: 1.0.0 */ AgsChannelThread* ags_channel_thread_new(GObject *soundcard, GObject *channel) { AgsChannelThread *channel_thread; channel_thread = (AgsChannelThread *) g_object_new(AGS_TYPE_CHANNEL_THREAD, "soundcard", soundcard, "channel", channel, NULL); return(channel_thread); } gsequencer-1.4.24/ags/audio/thread/ags_iterator_thread.c0000644000175000017500000001726413256163135020203 00000000000000/* 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 . */ #include #include #include #include void ags_iterator_thread_class_init(AgsIteratorThreadClass *iterator_thread); void ags_iterator_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_iterator_thread_init(AgsIteratorThread *iterator_thread); void ags_iterator_thread_connect(AgsConnectable *connectable); void ags_iterator_thread_disconnect(AgsConnectable *connectable); void ags_iterator_thread_finalize(GObject *gobject); void ags_iterator_thread_start(AgsThread *thread); void ags_iterator_thread_run(AgsThread *thread); void ags_iterator_thread_real_children_ready(AgsIteratorThread *iterator_thread, AgsThread *current); enum{ CHILDREN_READY, LAST_SIGNAL, }; static gpointer ags_iterator_thread_parent_class = NULL; static AgsConnectableInterface *ags_iterator_thread_parent_connectable_interface; static guint iterator_thread_signals[LAST_SIGNAL]; GType ags_iterator_thread_get_type() { static GType ags_type_iterator_thread = 0; if(!ags_type_iterator_thread){ static const GTypeInfo ags_iterator_thread_info = { sizeof (AgsIteratorThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_iterator_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsIteratorThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_iterator_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_iterator_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_iterator_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsIteratorThread", &ags_iterator_thread_info, 0); g_type_add_interface_static(ags_type_iterator_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_iterator_thread); } void ags_iterator_thread_class_init(AgsIteratorThreadClass *iterator_thread) { GObjectClass *gobject; AgsThreadClass *thread; ags_iterator_thread_parent_class = g_type_class_peek_parent(iterator_thread); /* GObject */ gobject = (GObjectClass *) iterator_thread; gobject->finalize = ags_iterator_thread_finalize; /* AgsThread */ thread = (AgsThreadClass *) iterator_thread; thread->start = ags_iterator_thread_start; /* AgsIteratorThread */ iterator_thread->children_ready = ags_iterator_thread_real_children_ready; /* signals */ iterator_thread_signals[CHILDREN_READY] = g_signal_new("children_ready", G_TYPE_FROM_CLASS(iterator_thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsIteratorThreadClass, children_ready), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_BOOLEAN, 2, G_TYPE_OBJECT, G_TYPE_OBJECT); } void ags_iterator_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_iterator_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_iterator_thread_connect; connectable->disconnect = ags_iterator_thread_disconnect; } void ags_iterator_thread_init(AgsIteratorThread *iterator_thread) { iterator_thread->flags = 0; iterator_thread->tic_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(iterator_thread->tic_mutex, NULL); iterator_thread->tic_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(iterator_thread->tic_cond, NULL); iterator_thread->recycling_thread = NULL; iterator_thread->channel = NULL; iterator_thread->recall_id = 0; iterator_thread->stage = 0; } void ags_iterator_thread_connect(AgsConnectable *connectable) { AgsThread *thread; thread = AGS_THREAD(connectable); ags_iterator_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_iterator_thread_disconnect(AgsConnectable *connectable) { ags_iterator_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_iterator_thread_finalize(GObject *gobject) { AgsIteratorThread *iterator_thread; iterator_thread = AGS_ITERATOR_THREAD(gobject); /* */ G_OBJECT_CLASS(ags_iterator_thread_parent_class)->finalize(gobject); } void ags_iterator_thread_start(AgsThread *thread) { AGS_THREAD_CLASS(ags_iterator_thread_parent_class)->start(thread); } void ags_iterator_thread_run(AgsThread *thread) { AgsIteratorThread *iterator_thread; guint flags; guint i; iterator_thread = AGS_ITERATOR_THREAD(thread); /* */ for(i = 0; i < 3; i++){ /* wait to be signaled */ pthread_mutex_lock(iterator_thread->tic_mutex); g_atomic_int_and(&(iterator_thread->flags), (~AGS_ITERATOR_THREAD_DONE)); flags = g_atomic_int_get(&(iterator_thread->flags)); if((AGS_ITERATOR_THREAD_WAIT & (flags)) != 0 && (AGS_ITERATOR_THREAD_DONE & (flags)) == 0){ flags = g_atomic_int_get(&(iterator_thread->flags)); while((AGS_ITERATOR_THREAD_WAIT & (flags)) != 0 && (AGS_ITERATOR_THREAD_DONE & (flags)) == 0){ pthread_cond_wait(iterator_thread->tic_cond, iterator_thread->tic_mutex); } } g_atomic_int_or(&(iterator_thread->flags), (AGS_ITERATOR_THREAD_WAIT | AGS_ITERATOR_THREAD_DONE)); pthread_mutex_unlock(iterator_thread->tic_mutex); /* process tree */ iterator_thread->stage = i; ags_channel_recursive_play_threaded(iterator_thread->channel, iterator_thread->recall_id, iterator_thread->stage); } } void ags_iterator_thread_real_children_ready(AgsIteratorThread *iterator_thread, AgsThread *current) { AgsRecyclingThread *recycling_thread; recycling_thread = AGS_RECYCLING_THREAD(current); /* signal iterator thread's run */ pthread_mutex_lock(recycling_thread->iteration_mutex); g_atomic_int_and(&(recycling_thread->flags), (~AGS_RECYCLING_THREAD_WAIT)); if((AGS_RECYCLING_THREAD_DONE & (g_atomic_int_get(&(iterator_thread->flags)))) == 0){ pthread_cond_signal(recycling_thread->iteration_cond); } pthread_mutex_unlock(recycling_thread->iteration_mutex); } void ags_iterator_thread_children_ready(AgsIteratorThread *iterator_thread, AgsThread *current) { g_return_if_fail(AGS_IS_ITERATOR_THREAD(iterator_thread)); g_object_ref((GObject *) iterator_thread); g_signal_emit(G_OBJECT(iterator_thread), iterator_thread_signals[CHILDREN_READY], 0, current); g_object_unref((GObject *) iterator_thread); } AgsIteratorThread* ags_iterator_thread_new(AgsChannel *channel, AgsRecallID *recall_id, gint stage) { AgsIteratorThread *iterator_thread; iterator_thread = (AgsIteratorThread *) g_object_new(AGS_TYPE_ITERATOR_THREAD, NULL); iterator_thread->channel = channel; iterator_thread->recall_id = recall_id; iterator_thread->stage = stage; return(iterator_thread); } gsequencer-1.4.24/ags/audio/thread/ags_recycling_thread_callbacks.c0000644000175000017500000000164113246707333022323 00000000000000/* 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 . */ #include void ags_recycling_thread_iterate_callback(AgsRecyclingThread *thread, gpointer user_data) { } gsequencer-1.4.24/ags/audio/thread/ags_sequencer_thread.c0000644000175000017500000003333213246707333020341 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_sequencer_thread_class_init(AgsSequencerThreadClass *sequencer_thread); void ags_sequencer_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_sequencer_thread_init(AgsSequencerThread *sequencer_thread); void ags_sequencer_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_sequencer_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_sequencer_thread_connect(AgsConnectable *connectable); void ags_sequencer_thread_disconnect(AgsConnectable *connectable); void ags_sequencer_thread_dispose(GObject *gobject); void ags_sequencer_thread_finalize(GObject *gobject); void ags_sequencer_thread_start(AgsThread *thread); void ags_sequencer_thread_run(AgsThread *thread); void ags_sequencer_thread_stop(AgsThread *thread); void ags_sequencer_stopped_all_callback(AgsAudioLoop *audio_loop, AgsSequencerThread *sequencer_thread); /** * SECTION:ags_sequencer_thread * @short_description: sequencer thread * @title: AgsSequencerThread * @section_id: * @include: ags/thread/ags_sequencer_thread.h * * The #AgsSequencerThread acts as midi input thread. */ enum{ INTERVAL_TIMEOUT, LAST_SIGNAL, }; enum{ PROP_0, PROP_SEQUENCER, }; static gpointer ags_sequencer_thread_parent_class = NULL; static AgsConnectableInterface *ags_sequencer_thread_parent_connectable_interface; static guint sequencer_thread_signals[LAST_SIGNAL]; GType ags_sequencer_thread_get_type() { static GType ags_type_sequencer_thread = 0; if(!ags_type_sequencer_thread){ static const GTypeInfo ags_sequencer_thread_info = { sizeof (AgsSequencerThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_sequencer_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSequencerThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_sequencer_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_sequencer_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_sequencer_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsSequencerThread", &ags_sequencer_thread_info, 0); g_type_add_interface_static(ags_type_sequencer_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_sequencer_thread); } void ags_sequencer_thread_class_init(AgsSequencerThreadClass *sequencer_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_sequencer_thread_parent_class = g_type_class_peek_parent(sequencer_thread); /* GObject */ gobject = (GObjectClass *) sequencer_thread; gobject->set_property = ags_sequencer_thread_set_property; gobject->get_property = ags_sequencer_thread_get_property; gobject->dispose = ags_sequencer_thread_dispose; gobject->finalize = ags_sequencer_thread_finalize; /** * AgsSequencerThread:sequencer: * * The assigned #AgsSequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer", i18n_pspec("sequencer assigned to"), i18n_pspec("The AgsSequencer it is assigned to"), G_TYPE_OBJECT, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER, param_spec); /* AgsThread */ thread = (AgsThreadClass *) sequencer_thread; thread->start = ags_sequencer_thread_start; thread->run = ags_sequencer_thread_run; thread->stop = ags_sequencer_thread_stop; /* AgsSequencerThread */ sequencer_thread->interval_timeout = NULL; /* signals */ sequencer_thread_signals[INTERVAL_TIMEOUT] = g_signal_new("interval-timeout", G_TYPE_FROM_CLASS(sequencer_thread), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsSequencerThreadClass, interval_timeout), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_sequencer_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_sequencer_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_sequencer_thread_connect; connectable->disconnect = ags_sequencer_thread_disconnect; } void ags_sequencer_thread_init(AgsSequencerThread *sequencer_thread) { AgsThread *thread; AgsConfig *config; gchar *str0, *str1; thread = (AgsThread *) sequencer_thread; g_atomic_int_or(&(thread->flags), (AGS_THREAD_START_SYNCED_FREQ)); config = ags_config_get_instance(); str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str0 == NULL){ str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str1 == NULL){ str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str0 == NULL || str1 == NULL){ thread->freq = AGS_SEQUENCER_THREAD_DEFAULT_JIFFIE; }else{ guint samplerate; guint buffer_size; samplerate = g_ascii_strtoull(str0, NULL, 10); buffer_size = g_ascii_strtoull(str1, NULL, 10); thread->freq = ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; } g_free(str0); g_free(str1); sequencer_thread->sequencer = NULL; sequencer_thread->timestamp_thread = NULL; // sequencer_thread->timestamp_thread = (AgsThread *) ags_timestamp_thread_new(); // ags_thread_add_child(thread, sequencer_thread->timestamp_thread); sequencer_thread->error = NULL; } void ags_sequencer_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSequencerThread *sequencer_thread; sequencer_thread = AGS_SEQUENCER_THREAD(gobject); switch(prop_id){ case PROP_SEQUENCER: { AgsSequencer *sequencer; sequencer = (AgsSequencer *) g_value_get_object(value); if(sequencer_thread->sequencer != NULL){ g_object_unref(G_OBJECT(sequencer_thread->sequencer)); } if(sequencer != NULL){ g_object_ref(G_OBJECT(sequencer)); if(AGS_IS_MIDIIN(sequencer)){ g_atomic_int_or(&(AGS_THREAD(sequencer_thread)->flags), (AGS_THREAD_INTERMEDIATE_PRE_SYNC)); }else if(AGS_IS_JACK_MIDIIN(sequencer)){ g_atomic_int_or(&(AGS_THREAD(sequencer_thread)->flags), (AGS_THREAD_INTERMEDIATE_PRE_SYNC)); // g_atomic_int_and(&(AGS_THREAD(sequencer_thread)->flags), // (~AGS_THREAD_INTERMEDIATE_PRE_SYNC)); } } sequencer_thread->sequencer = G_OBJECT(sequencer); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_sequencer_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSequencerThread *sequencer_thread; sequencer_thread = AGS_SEQUENCER_THREAD(gobject); switch(prop_id){ case PROP_SEQUENCER: { g_value_set_object(value, G_OBJECT(sequencer_thread->sequencer)); } break; } } void ags_sequencer_thread_connect(AgsConnectable *connectable) { AgsThread *audio_loop, *sequencer_thread; sequencer_thread = AGS_THREAD(connectable); if((AGS_THREAD_CONNECTED & (g_atomic_int_get(&(sequencer_thread->flags)))) != 0){ return; } ags_sequencer_thread_parent_connectable_interface->connect(connectable); audio_loop = ags_thread_get_toplevel(sequencer_thread); g_signal_connect((GObject *) audio_loop, "stopped-all", G_CALLBACK(ags_sequencer_stopped_all_callback), sequencer_thread); } void ags_sequencer_thread_disconnect(AgsConnectable *connectable) { ags_sequencer_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_sequencer_thread_dispose(GObject *gobject) { AgsSequencerThread *sequencer_thread; sequencer_thread = AGS_SEQUENCER_THREAD(gobject); /* sequencer */ if(sequencer_thread->sequencer != NULL){ g_object_unref(sequencer_thread->sequencer); sequencer_thread->sequencer = NULL; } /* call parent */ G_OBJECT_CLASS(ags_sequencer_thread_parent_class)->dispose(gobject); } void ags_sequencer_thread_finalize(GObject *gobject) { AgsSequencerThread *sequencer_thread; sequencer_thread = AGS_SEQUENCER_THREAD(gobject); /* sequencer */ if(sequencer_thread->sequencer != NULL){ g_object_unref(sequencer_thread->sequencer); } /* call parent */ G_OBJECT_CLASS(ags_sequencer_thread_parent_class)->finalize(gobject); } void ags_sequencer_thread_start(AgsThread *thread) { AgsSequencer *sequencer; AgsSequencerThread *sequencer_thread; static gboolean initialized = FALSE; GError *error; sequencer_thread = AGS_SEQUENCER_THREAD(thread); sequencer = AGS_SEQUENCER(sequencer_thread->sequencer); /* abort if already recording */ if(ags_sequencer_is_recording(sequencer)){ return; } /* check if already initialized */ sequencer_thread->error = NULL; if(ags_sequencer_get_buffer(sequencer, NULL) == NULL){ ags_sequencer_record_init(sequencer, &(sequencer_thread->error)); #ifdef AGS_DEBUG g_message("ags_sequencer_record"); #endif } if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ AGS_THREAD_CLASS(ags_sequencer_thread_parent_class)->start(thread); } } void ags_sequencer_thread_run(AgsThread *thread) { AgsSequencer *sequencer; AgsSequencerThread *sequencer_thread; long delay; GError *error; sequencer_thread = AGS_SEQUENCER_THREAD(thread); sequencer = AGS_SEQUENCER(sequencer_thread->sequencer); /* real-time setup */ #ifdef AGS_WITH_RT if((AGS_THREAD_RT_SETUP & (g_atomic_int_get(&(thread->flags)))) == 0){ struct sched_param param; /* Declare ourself as a real time task */ param.sched_priority = AGS_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } g_atomic_int_or(&(thread->flags), AGS_THREAD_RT_SETUP); } #endif if(ags_sequencer_is_recording(sequencer)){ error = NULL; ags_sequencer_record(sequencer, &error); if(error != NULL){ g_warning("ags_sequencer_thread - %s", error->message); } } /* notify about time exceeded */ ags_sequencer_thread_interval_timeout(sequencer_thread); } void ags_sequencer_thread_stop(AgsThread *thread) { AgsSequencer *sequencer; AgsSequencerThread *sequencer_thread; sequencer_thread = AGS_SEQUENCER_THREAD(thread); sequencer = AGS_SEQUENCER(sequencer_thread->sequencer); AGS_THREAD_CLASS(ags_sequencer_thread_parent_class)->stop(thread); ags_sequencer_stop(sequencer); } void ags_sequencer_stopped_all_callback(AgsAudioLoop *audio_loop, AgsSequencerThread *sequencer_thread) { AgsSequencer *sequencer; sequencer = AGS_SEQUENCER(sequencer_thread->sequencer); if(ags_sequencer_is_recording(sequencer)){ ags_thread_stop((AgsThread *) sequencer_thread); } } void ags_sequencer_thread_interval_timeout(AgsSequencerThread *sequencer_thread) { g_return_if_fail(AGS_IS_SEQUENCER_THREAD(sequencer_thread)); g_object_ref((GObject *) sequencer_thread); g_signal_emit(G_OBJECT(sequencer_thread), sequencer_thread_signals[INTERVAL_TIMEOUT], 0); g_object_unref((GObject *) sequencer_thread); } /** * ags_sequencer_thread_find_sequencer: * @sequencer_thread: the #AgsSequencerThread * @sequencer: the #AgsSequencer to find * * Returns: the matching #AgsSequencerThread, if not * found %NULL. * * Since: 1.0.0 */ AgsSequencerThread* ags_sequencer_thread_find_sequencer(AgsSequencerThread *sequencer_thread, GObject *sequencer) { if(sequencer_thread == NULL || !AGS_IS_SEQUENCER_THREAD(sequencer_thread)){ return(NULL); } while(sequencer_thread != NULL){ if(AGS_IS_SEQUENCER_THREAD(sequencer_thread) && sequencer_thread->sequencer == sequencer){ return(sequencer_thread); } sequencer_thread = g_atomic_pointer_get(&(((AgsThread *) sequencer_thread)->next)); } return(NULL); } /** * ags_sequencer_thread_new: * @sequencer: the #AgsSequencer * * Create a new #AgsSequencerThread. * * Returns: the new #AgsSequencerThread * * Since: 1.0.0 */ AgsSequencerThread* ags_sequencer_thread_new(GObject *sequencer) { AgsSequencerThread *sequencer_thread; sequencer_thread = (AgsSequencerThread *) g_object_new(AGS_TYPE_SEQUENCER_THREAD, "sequencer", sequencer, NULL); return(sequencer_thread); } gsequencer-1.4.24/ags/audio/thread/ags_recycling_thread.h0000644000175000017500000001147713246707333020341 00000000000000/* 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 . */ #ifndef __AGS_RECYCLING_THREAD_H__ #define __AGS_RECYCLING_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #define AGS_TYPE_RECYCLING_THREAD (ags_recycling_thread_get_type()) #define AGS_RECYCLING_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECYCLING_THREAD, AgsRecyclingThread)) #define AGS_RECYCLING_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_RECYCLING_THREAD, AgsRecyclingThread)) #define AGS_IS_RECYCLING_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECYCLING_THREAD)) #define AGS_IS_RECYCLING_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECYCLING_THREAD)) #define AGS_RECYCLING_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_RECYCLING_THREAD, AgsRecyclingThreadClass)) #define AGS_RECYCLING_THREAD_DEFAULT_JIFFIE (100) typedef struct _AgsRecyclingThread AgsRecyclingThread; typedef struct _AgsRecyclingThreadClass AgsRecyclingThreadClass; typedef struct _AgsRecyclingThreadWorker AgsRecyclingThreadWorker; /** * AgsRecyclingThreadFlags: * @AGS_RECYCLING_THREAD_WAIT: TODO:JK: implement me * @AGS_RECYCLING_THREAD_DONE: TODO:JK: implement me * @AGS_RECYCLING_THREAD_LOCKED: TODO:JK: implement me * @AGS_RECYCLING_THREAD_LOCKED_PARENT: TODO:JK: implement me * @AGS_RECYCLING_THREAD_WORKER_WAIT: TODO:JK: implement me * @AGS_RECYCLING_THREAD_WORKER_DONE: TODO:JK: implement me * * Enum values to control the behavior or indicate internal state of #AgsRecyclingThread by * enable/disable as flags. */ typedef enum{ AGS_RECYCLING_THREAD_WAIT = 1, AGS_RECYCLING_THREAD_DONE = 1 << 1, AGS_RECYCLING_THREAD_LOCKED = 1 << 2, AGS_RECYCLING_THREAD_LOCKED_PARENT = 1 << 3, AGS_RECYCLING_THREAD_WORKER_WAIT = 1 << 4, AGS_RECYCLING_THREAD_WORKER_DONE = 1 << 5, }AgsRecyclingThreadFlags; struct _AgsRecyclingThread { AgsThread thread; volatile guint flags; AgsThread *iterator_thread; pthread_mutex_t *iteration_mutex; pthread_cond_t *iteration_cond; pthread_t *worker_queue; pthread_mutex_t *worker_mutex; pthread_cond_t *worker_cond; GObject *first_recycling; GObject *last_recycling; GList *worker; }; struct _AgsRecyclingThreadClass { AgsThreadClass thread; void (*play_channel)(AgsRecyclingThread *recycling_thread, GObject *channel, AgsRecallID *recall_id, gint stage); void (*play_audio)(AgsRecyclingThread *recycling_thread, GObject *output, GObject *audio, AgsRecallID *recall_id, gint stage); }; struct _AgsRecyclingThreadWorker { AgsRecyclingThread *recycling_thread; GObject *audio; GObject *channel; AgsRecallID *recall_id; gint stage; gboolean audio_worker; }; GType ags_recycling_thread_get_type(); AgsRecyclingThreadWorker* ags_recycling_thread_worker_alloc(AgsRecyclingThread *recycling_thread, GObject *audio, GObject *channel, AgsRecallID *recall_id, gint stage, gboolean audio_worker); void ags_recycling_thread_add_worker(AgsRecyclingThread *recycling_thread, AgsRecyclingThreadWorker *worker); void ags_recycling_thread_remove_worker(AgsRecyclingThread *recycling_thread, AgsRecyclingThreadWorker *worker); void ags_recycling_thread_play_channel(AgsRecyclingThread *recycling_thread, GObject *channel, AgsRecallID *recall_id, gint stage); void ags_recycling_thread_play_audio(AgsRecyclingThread *recycling_thread, GObject *output, GObject *audio, AgsRecallID *recall_id, gint stage); AgsRecyclingThread* ags_recycling_thread_find_child(AgsRecyclingThread *recycling_thread, GObject *first_recycling); void ags_recycling_thread_fifo(AgsRecyclingThread *recycling_thread); AgsRecyclingThread* ags_recycling_thread_new(GObject *first_recycling, GObject *last_recycling); #endif /*__AGS_RECYCLING_THREAD_H__*/ gsequencer-1.4.24/ags/audio/thread/ags_iterator_thread.h0000644000175000017500000000502613246707333020204 00000000000000/* 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 . */ #ifndef __AGS_ITERATOR_THREAD_H__ #define __AGS_ITERATOR_THREAD_H__ #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #define AGS_TYPE_ITERATOR_THREAD (ags_iterator_thread_get_type()) #define AGS_ITERATOR_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ITERATOR_THREAD, AgsIteratorThread)) #define AGS_ITERATOR_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_ITERATOR_THREAD, AgsIteratorThread)) #define AGS_IS_ITERATOR_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ITERATOR_THREAD)) #define AGS_IS_ITERATOR_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ITERATOR_THREAD)) #define AGS_ITERATOR_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_ITERATOR_THREAD, AgsIteratorThreadClass)) typedef struct _AgsIteratorThread AgsIteratorThread; typedef struct _AgsIteratorThreadClass AgsIteratorThreadClass; typedef enum{ AGS_ITERATOR_THREAD_DONE = 1, AGS_ITERATOR_THREAD_WAIT = 1 << 1, }AgsIteratorThreadFlags; struct _AgsIteratorThread { AgsThread thread; volatile guint flags; pthread_mutex_t *tic_mutex; pthread_cond_t *tic_cond; AgsThread *recycling_thread; AgsChannel *channel; AgsRecallID *recall_id; gint stage; }; struct _AgsIteratorThreadClass { AgsThreadClass thread; void (*children_ready)(AgsIteratorThread *iterator_thread, AgsThread *current); }; GType ags_iterator_thread_get_type(); void ags_iterator_thread_children_ready(AgsIteratorThread *iterator_thread, AgsThread *current); AgsIteratorThread* ags_iterator_thread_new(); #endif /*__AGS_ITERATOR_THREAD_H__*/ gsequencer-1.4.24/ags/audio/thread/ags_recycling_thread_callbacks.h0000644000175000017500000000210113246707333022320 00000000000000/* 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 . */ #ifndef __AGS_RECYCLING_THREAD_CALLBACKS_H__ #define __AGS_RECYCLING_THREAD_CALLBACKS_H__ #include #include void ags_recycling_thread_iterate_callback(AgsRecyclingThread *thread, gpointer user_data); #endif /* __AGS_RECYCLING_THREAD_CALLBACKS_H__ */ gsequencer-1.4.24/ags/audio/thread/ags_sequencer_thread.h0000644000175000017500000000515413246707333020347 00000000000000/* 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 . */ #ifndef __AGS_SEQUENCER_THREAD_H__ #define __AGS_SEQUENCER_THREAD_H__ #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #define AGS_TYPE_SEQUENCER_THREAD (ags_sequencer_thread_get_type()) #define AGS_SEQUENCER_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SEQUENCER_THREAD, AgsSequencerThread)) #define AGS_SEQUENCER_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_SEQUENCER_THREAD, AgsSequencerThreadClass)) #define AGS_IS_SEQUENCER_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SEQUENCER_THREAD)) #define AGS_IS_SEQUENCER_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SEQUENCER_THREAD)) #define AGS_SEQUENCER_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_SEQUENCER_THREAD, AgsSequencerThreadClass)) #define AGS_SEQUENCER_THREAD_DEFAULT_JIFFIE (ceil(AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK) typedef struct _AgsSequencerThread AgsSequencerThread; typedef struct _AgsSequencerThreadClass AgsSequencerThreadClass; struct _AgsSequencerThread { AgsThread thread; time_t time_val; GObject *sequencer; AgsThread *timestamp_thread; GError *error; }; struct _AgsSequencerThreadClass { AgsThreadClass thread; void (*interval_timeout)(AgsSequencerThread *sequencer_thread); }; GType ags_sequencer_thread_get_type(); void ags_sequencer_thread_interval_timeout(AgsSequencerThread *sequencer_thread); AgsSequencerThread* ags_sequencer_thread_find_sequencer(AgsSequencerThread *sequencer_thread, GObject *sequencer); AgsSequencerThread* ags_sequencer_thread_new(GObject *sequencer); #endif /*__AGS_SEQUENCER_THREAD_H__*/ gsequencer-1.4.24/ags/audio/thread/ags_audio_thread.c0000644000175000017500000005135013247044247017447 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_audio_thread_class_init(AgsAudioThreadClass *audio_thread); void ags_audio_thread_connectable_interface_init(AgsConnectableInterface *connectable); void ags_audio_thread_init(AgsAudioThread *audio_thread); void ags_audio_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_audio_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_audio_thread_connect(AgsConnectable *connectable); void ags_audio_thread_disconnect(AgsConnectable *connectable); void ags_audio_thread_dispose(GObject *gobject); void ags_audio_thread_finalize(GObject *gobject); void ags_audio_thread_start(AgsThread *thread); void ags_audio_thread_run(AgsThread *thread); void ags_audio_thread_stop(AgsThread *thread); void ags_audio_thread_play_channel_super_threaded(AgsAudioThread *audio_thread, AgsPlayback *playback); void ags_audio_thread_sync_channel_super_threaded(AgsAudioThread *audio_thread, AgsPlayback *playback); /** * SECTION:ags_audio_thread * @short_description: audio thread * @title: AgsAudioThread * @section_id: * @include: ags/audio/thread/ags_audio_thread.h * * The #AgsAudioThread acts as audio output thread to soundcard. */ enum{ PROP_0, PROP_SOUNDCARD, PROP_AUDIO, }; static gpointer ags_audio_thread_parent_class = NULL; static AgsConnectableInterface *ags_audio_thread_parent_connectable_interface; GType ags_audio_thread_get_type() { static GType ags_type_audio_thread = 0; if(!ags_type_audio_thread){ static const GTypeInfo ags_audio_thread_info = { sizeof (AgsAudioThreadClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_thread_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAudioThread), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_thread_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_audio_thread_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audio_thread = g_type_register_static(AGS_TYPE_THREAD, "AgsAudioThread", &ags_audio_thread_info, 0); g_type_add_interface_static(ags_type_audio_thread, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_audio_thread); } void ags_audio_thread_class_init(AgsAudioThreadClass *audio_thread) { GObjectClass *gobject; AgsThreadClass *thread; GParamSpec *param_spec; ags_audio_thread_parent_class = g_type_class_peek_parent(audio_thread); /* GObject */ gobject = (GObjectClass *) audio_thread; gobject->set_property = ags_audio_thread_set_property; gobject->get_property = ags_audio_thread_get_property; gobject->dispose = ags_audio_thread_dispose; gobject->finalize = ags_audio_thread_finalize; /* properties */ /** * AgsAudioThread:soundcard: * * The assigned #AgsAudio. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard assigned to"), i18n_pspec("The AgsSoundcard it is assigned to"), G_TYPE_OBJECT, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsAudioThread:audio: * * The assigned #AgsAudio. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio assigned to"), i18n_pspec("The AgsAudio it is assigned to"), AGS_TYPE_AUDIO, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /* AgsThread */ thread = (AgsThreadClass *) audio_thread; thread->start = ags_audio_thread_start; thread->run = ags_audio_thread_run; thread->stop = ags_audio_thread_stop; } void ags_audio_thread_connectable_interface_init(AgsConnectableInterface *connectable) { ags_audio_thread_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_audio_thread_connect; connectable->disconnect = ags_audio_thread_disconnect; } void ags_audio_thread_init(AgsAudioThread *audio_thread) { AgsThread *thread; AgsConfig *config; gchar *str0, *str1; thread = (AgsThread *) audio_thread; g_atomic_int_or(&(thread->flags), (AGS_THREAD_START_SYNCED_FREQ)); config = ags_config_get_instance(); str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str0 == NULL){ str0 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str1 == NULL){ str1 = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str0 == NULL || str1 == NULL){ thread->freq = AGS_AUDIO_THREAD_DEFAULT_JIFFIE; }else{ guint samplerate; guint buffer_size; samplerate = g_ascii_strtoull(str0, NULL, 10); buffer_size = g_ascii_strtoull(str1, NULL, 10); thread->freq = ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; } g_free(str0); g_free(str1); g_atomic_int_set(&(audio_thread->flags), 0); audio_thread->soundcard = NULL; /* start */ pthread_mutexattr_init(&(audio_thread->wakeup_attr)); pthread_mutexattr_settype(&(audio_thread->wakeup_attr), PTHREAD_MUTEX_RECURSIVE); audio_thread->wakeup_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(audio_thread->wakeup_mutex, &(audio_thread->wakeup_attr)); audio_thread->wakeup_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(audio_thread->wakeup_cond, NULL); /* sync */ pthread_mutexattr_init(&(audio_thread->done_attr)); pthread_mutexattr_settype(&(audio_thread->done_attr), PTHREAD_MUTEX_RECURSIVE); audio_thread->done_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(audio_thread->done_mutex, &(audio_thread->done_attr)); audio_thread->done_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(audio_thread->done_cond, NULL); } void ags_audio_thread_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAudioThread *audio_thread; audio_thread = AGS_AUDIO_THREAD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); if(soundcard == audio_thread->soundcard){ return; } if(audio_thread->soundcard != NULL){ g_object_unref(audio_thread->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } audio_thread->soundcard = soundcard; } break; case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(audio_thread->audio == (GObject *) audio){ return; } if(audio_thread->audio != NULL){ g_object_unref(G_OBJECT(audio_thread->audio)); } if(audio != NULL){ g_object_ref(G_OBJECT(audio)); } audio_thread->audio = (GObject *) audio; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_thread_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAudioThread *audio_thread; audio_thread = AGS_AUDIO_THREAD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, audio_thread->soundcard); } break; case PROP_AUDIO: { g_value_set_object(value, G_OBJECT(audio_thread->audio)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_thread_connect(AgsConnectable *connectable) { ags_audio_thread_parent_connectable_interface->connect(connectable); /* empty */ } void ags_audio_thread_disconnect(AgsConnectable *connectable) { ags_audio_thread_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_audio_thread_dispose(GObject *gobject) { AgsAudioThread *audio_thread; audio_thread = AGS_AUDIO_THREAD(gobject); /* soundcard */ if(audio_thread->soundcard != NULL){ g_object_unref(audio_thread->soundcard); audio_thread->soundcard = NULL; } /* audio */ if(audio_thread->audio != NULL){ g_object_unref(audio_thread->audio); audio_thread->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_audio_thread_parent_class)->dispose(gobject); } void ags_audio_thread_finalize(GObject *gobject) { AgsAudioThread *audio_thread; audio_thread = AGS_AUDIO_THREAD(gobject); /* soundcard */ if(audio_thread->soundcard != NULL){ g_object_unref(audio_thread->soundcard); } /* wakeup mutex and cond */ pthread_mutex_destroy(audio_thread->wakeup_mutex); free(audio_thread->wakeup_mutex); pthread_cond_destroy(audio_thread->wakeup_cond); free(audio_thread->wakeup_cond); /* sync mutex and cond */ pthread_mutex_destroy(audio_thread->done_mutex); free(audio_thread->done_mutex); pthread_cond_destroy(audio_thread->done_cond); free(audio_thread->done_cond); /* audio */ if(audio_thread->audio != NULL){ g_object_unref(audio_thread->audio); } /* call parent */ G_OBJECT_CLASS(ags_audio_thread_parent_class)->finalize(gobject); } void ags_audio_thread_start(AgsThread *thread) { g_message("audio thread start"); /* reset status */ g_atomic_int_or(&(AGS_AUDIO_THREAD(thread)->flags), (AGS_AUDIO_THREAD_WAIT | AGS_AUDIO_THREAD_DONE | AGS_AUDIO_THREAD_WAIT_SYNC | AGS_AUDIO_THREAD_DONE_SYNC)); if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(thread->flags)))) == 0){ AGS_THREAD_CLASS(ags_audio_thread_parent_class)->start(thread); } } void ags_audio_thread_run(AgsThread *thread) { AgsAudio *audio; AgsChannel *output; AgsPlaybackDomain *playback_domain; AgsPlayback *playback; AgsMutexManager *mutex_manager; AgsAudioThread *audio_thread; gint stage; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *output_mutex; #ifdef AGS_WITH_RT if((AGS_THREAD_RT_SETUP & (g_atomic_int_get(&(thread->flags)))) == 0){ struct sched_param param; /* Declare ourself as a real time task */ param.sched_priority = AGS_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } g_atomic_int_or(&(thread->flags), AGS_THREAD_RT_SETUP); } #endif if((AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) != 0){ return; } audio_thread = AGS_AUDIO_THREAD(thread); // thread->freq = AGS_SOUNDCARD(thread->soundcard)->delay[AGS_SOUNDCARD(thread->soundcard)->tic_counter] / AGS_SOUNDCARD(thread->soundcard)->delay_factor; audio = (AgsAudio *) audio_thread->audio; playback_domain = (AgsPlaybackDomain *) audio->playback_domain; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); // g_message(" --- a"); /* start - wait until signaled */ pthread_mutex_lock(audio_thread->wakeup_mutex); if((AGS_AUDIO_THREAD_WAIT & (g_atomic_int_get(&(audio_thread->flags)))) != 0){ g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_DONE)); while((AGS_AUDIO_THREAD_WAIT & (g_atomic_int_get(&(audio_thread->flags)))) != 0 && (AGS_AUDIO_THREAD_DONE & (g_atomic_int_get(&(audio_thread->flags)))) == 0){ pthread_cond_wait(audio_thread->wakeup_cond, audio_thread->wakeup_mutex); } } g_atomic_int_or(&(audio_thread->flags), (AGS_AUDIO_THREAD_WAIT | AGS_AUDIO_THREAD_DONE)); pthread_mutex_unlock(audio_thread->wakeup_mutex); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* emit tact callback */ // ags_audio_tact(audio); /* do audio processing */ pthread_mutex_lock(audio_mutex); output = audio->output; pthread_mutex_unlock(audio_mutex); while(output != NULL){ /* lookup output mutex */ pthread_mutex_lock(application_mutex); output_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* get playback */ pthread_mutex_lock(output_mutex); playback = (AgsPlayback *) output->playback; pthread_mutex_unlock(output_mutex); if((AGS_PLAYBACK_SUPER_THREADED_CHANNEL & (g_atomic_int_get(&(playback->flags)))) != 0){ ags_audio_thread_play_channel_super_threaded(audio_thread, playback); }else{ for(stage = 0; stage < 3; stage++){ if((AgsThread *) audio_thread == playback_domain->audio_thread[0]){ ags_channel_recursive_play(output, playback->recall_id[0], stage); } if((AgsThread *) audio_thread == playback_domain->audio_thread[1]){ ags_channel_recursive_play(output, playback->recall_id[1], stage); } if((AgsThread *) audio_thread == playback_domain->audio_thread[2]){ ags_channel_recursive_play(output, playback->recall_id[2], stage); } } } output = output->next; } /* sync - wait the 3 stages */ pthread_mutex_lock(audio_mutex); output = audio->output; pthread_mutex_unlock(audio_mutex); while(output != NULL){ /* lookup output mutex */ pthread_mutex_lock(application_mutex); output_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* get playback */ pthread_mutex_lock(output_mutex); playback = (AgsPlayback *) output->playback; pthread_mutex_unlock(output_mutex); if((AGS_PLAYBACK_SUPER_THREADED_CHANNEL & (g_atomic_int_get(&(playback->flags)))) != 0){ ags_audio_thread_sync_channel_super_threaded(audio_thread, playback); } output = output->next; } /* sync */ pthread_mutex_lock(audio_thread->done_mutex); g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_WAIT_SYNC)); if((AGS_AUDIO_THREAD_DONE_SYNC & (g_atomic_int_get(&(audio_thread->flags)))) == 0){ pthread_cond_signal(audio_thread->done_cond); } pthread_mutex_unlock(audio_thread->done_mutex); } void ags_audio_thread_stop(AgsThread *thread) { AgsAudioThread *audio_thread; AgsThread *child; if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) == 0){ return; } audio_thread = AGS_AUDIO_THREAD(thread); g_message("audio thread stop"); /* call parent */ AGS_THREAD_CLASS(ags_audio_thread_parent_class)->stop(thread); /* stop channel */ child = g_atomic_pointer_get(&(thread->children)); while(child != NULL){ ags_thread_stop(child); child = g_atomic_pointer_get(&(child->next)); } /* ensure synced */ pthread_mutex_lock(audio_thread->done_mutex); g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_WAIT_SYNC)); if((AGS_AUDIO_THREAD_DONE_SYNC & (g_atomic_int_get(&(audio_thread->flags)))) == 0){ pthread_cond_signal(audio_thread->done_cond); } pthread_mutex_unlock(audio_thread->done_mutex); } void ags_audio_thread_play_channel_super_threaded(AgsAudioThread *audio_thread, AgsPlayback *playback) { AgsAudio *audio; AgsPlaybackDomain *playback_domain; audio = (AgsAudio *) audio_thread->audio; playback_domain = (AgsPlaybackDomain *) audio->playback_domain; /* sequencer */ if((AgsThread *) audio_thread == playback_domain->audio_thread[1]){ AgsThread *thread; AgsChannelThread *channel_thread; thread = playback->channel_thread[1]; channel_thread = (AgsChannelThread *) thread; if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0){ /* wakeup wait */ pthread_mutex_lock(channel_thread->wakeup_mutex); g_atomic_int_and(&(channel_thread->flags), (~AGS_CHANNEL_THREAD_WAIT)); if((AGS_CHANNEL_THREAD_DONE & (g_atomic_int_get(&(channel_thread->flags)))) == 0){ pthread_cond_signal(channel_thread->wakeup_cond); } pthread_mutex_unlock(channel_thread->wakeup_mutex); } } /* notation */ if((AgsThread *) audio_thread == playback_domain->audio_thread[2]){ AgsThread *thread; AgsChannelThread *channel_thread; thread = playback->channel_thread[2]; channel_thread = (AgsChannelThread *) thread; if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(thread->flags)))) != 0){ /* wakeup wait */ pthread_mutex_lock(channel_thread->wakeup_mutex); g_atomic_int_and(&(channel_thread->flags), (~AGS_CHANNEL_THREAD_WAIT)); if((AGS_CHANNEL_THREAD_DONE & (g_atomic_int_get(&(channel_thread->flags)))) == 0){ pthread_cond_signal(channel_thread->wakeup_cond); } pthread_mutex_unlock(channel_thread->wakeup_mutex); } } } void ags_audio_thread_sync_channel_super_threaded(AgsAudioThread *audio_thread, AgsPlayback *playback) { AgsAudio *audio; AgsPlaybackDomain *playback_domain; audio = (AgsAudio *) audio_thread->audio; playback_domain = (AgsPlaybackDomain *) audio->playback_domain; /* sequencer */ if((AgsThread *) audio_thread == playback_domain->audio_thread[1]){ AgsChannelThread *channel_thread; channel_thread = (AgsChannelThread *) playback->channel_thread[1]; pthread_mutex_lock(channel_thread->done_mutex); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(playback->channel_thread[1]->flags)))) != 0){ if((AGS_CHANNEL_THREAD_WAIT_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) != 0){ g_atomic_int_and(&(channel_thread->flags), (~AGS_CHANNEL_THREAD_DONE_SYNC)); while((AGS_CHANNEL_THREAD_DONE_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) == 0 && (AGS_CHANNEL_THREAD_WAIT_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) != 0){ pthread_cond_wait(channel_thread->done_cond, channel_thread->done_mutex); } } } g_atomic_int_or(&(channel_thread->flags), (AGS_CHANNEL_THREAD_WAIT_SYNC | AGS_CHANNEL_THREAD_DONE_SYNC)); pthread_mutex_unlock(channel_thread->done_mutex); } /* notation */ if((AgsThread *) audio_thread == playback_domain->audio_thread[2]){ AgsChannelThread *channel_thread; channel_thread = (AgsChannelThread *) playback->channel_thread[2]; pthread_mutex_lock(channel_thread->done_mutex); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(playback->channel_thread[2]->flags)))) != 0){ if((AGS_CHANNEL_THREAD_WAIT_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) != 0){ g_atomic_int_and(&(channel_thread->flags), (~AGS_CHANNEL_THREAD_DONE_SYNC)); while((AGS_CHANNEL_THREAD_DONE_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) == 0 && (AGS_CHANNEL_THREAD_WAIT_SYNC & (g_atomic_int_get(&(channel_thread->flags)))) != 0){ pthread_cond_wait(channel_thread->done_cond, channel_thread->done_mutex); } } } g_atomic_int_or(&(channel_thread->flags), (AGS_CHANNEL_THREAD_WAIT_SYNC | AGS_CHANNEL_THREAD_DONE_SYNC)); pthread_mutex_unlock(channel_thread->done_mutex); } } /** * ags_audio_thread_new: * @soundcard: the #GObject * @audio: the #AgsAudio * * Create a new #AgsAudioThread. * * Returns: the new #AgsAudioThread * * Since: 1.0.0 */ AgsAudioThread* ags_audio_thread_new(GObject *soundcard, GObject *audio) { AgsAudioThread *audio_thread; audio_thread = (AgsAudioThread *) g_object_new(AGS_TYPE_AUDIO_THREAD, "soundcard", soundcard, "audio", audio, NULL); return(audio_thread); } gsequencer-1.4.24/ags/audio/ags_channel.h0000644000175000017500000002247713256163135015173 00000000000000/* 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 . */ #ifndef __AGS_CHANNEL_H__ #define __AGS_CHANNEL_H__ #include #include #include #include #include #include #include #include #include #define AGS_TYPE_CHANNEL (ags_channel_get_type()) #define AGS_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CHANNEL, AgsChannel)) #define AGS_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CHANNEL, AgsChannelClass)) #define AGS_IS_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CHANNEL)) #define AGS_IS_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CHANNEL)) #define AGS_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CHANNEL, AgsChannelClass)) typedef struct _AgsChannel AgsChannel; typedef struct _AgsChannelClass AgsChannelClass; /** * AgsChannelFlags: * @AGS_CHANNEL_ADDED_TO_REGISTRY: added to registry * @AGS_CHANNEL_CONNECTED: indicates the channel was connected by calling #AgsConnectable::connect() * @AGS_CHANNEL_RUNNING: channel running * * Enum values to control the behavior or indicate internal state of #AgsChannel by * enable/disable as flags. */ typedef enum{ AGS_CHANNEL_ADDED_TO_REGISTRY = 1, AGS_CHANNEL_CONNECTED = 1 << 1, AGS_CHANNEL_RUNNING = 1 << 2, }AgsChannelFlags; typedef enum{ AGS_CHANNEL_RECALL_ID_RUN_STAGE, AGS_CHANNEL_RECALL_ID_CANCEL, }AgsChannelRecallIDMode; #define AGS_CHANNEL_ERROR (ags_channel_error_quark()) typedef enum{ AGS_CHANNEL_ERROR_LOOP_IN_LINK, }AgsChannelError; struct _AgsChannel { GObject object; guint flags; pthread_mutex_t *obj_mutex; pthread_mutexattr_t *obj_mutexattr; GObject *audio; GObject *soundcard; guint samplerate; guint buffer_size; guint format; AgsChannel *prev; AgsChannel *prev_pad; AgsChannel *next; AgsChannel *next_pad; guint pad; guint audio_channel; guint line; char *note; GList *remote_channel; GObject *playback; // GObject *recycling_context; // contains child recycling GList *recall_id; // there may be several recall's running pthread_mutexattr_t *recall_mutexattr; pthread_mutex_t *recall_mutex; pthread_mutexattr_t *play_mutexattr; pthread_mutex_t *play_mutex; GList *container; GList *recall; GList *play; AgsChannel *link; AgsRecycling *first_recycling; AgsRecycling *last_recycling; GList *pattern; GObject *line_widget; gpointer file_data; }; struct _AgsChannelClass { GObjectClass object; GList* (*add_effect)(AgsChannel *channel, gchar *filename, gchar *effect); void (*remove_effect)(AgsChannel *channel, guint nth); void (*recycling_changed)(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region); void (*done)(AgsChannel *channel, AgsRecallID *recall_id); }; GType ags_channel_get_type(); GQuark ags_channel_error_quark(); AgsRecall* ags_channel_find_recall(AgsChannel *channel, char *effect, char *name); AgsChannel* ags_channel_first(AgsChannel *channel); AgsChannel* ags_channel_last(AgsChannel *channel); AgsChannel* ags_channel_nth(AgsChannel *channel, guint nth); AgsChannel* ags_channel_pad_first(AgsChannel *channel); AgsChannel* ags_channel_pad_last(AgsChannel *channel); AgsChannel* ags_channel_pad_nth(AgsChannel *channel, guint nth); AgsChannel* ags_channel_first_with_recycling(AgsChannel *channel); AgsChannel* ags_channel_last_with_recycling(AgsChannel *channel); AgsChannel* ags_channel_prev_with_recycling(AgsChannel *channel); AgsChannel* ags_channel_next_with_recycling(AgsChannel *channel); void ags_channel_set_soundcard(AgsChannel *channel, GObject *soundcard); void ags_channel_set_samplerate(AgsChannel *channel, guint samplerate); void ags_channel_set_buffer_size(AgsChannel *channel, guint buffer_size); void ags_channel_set_format(AgsChannel *channel, guint format); void ags_channel_add_remote_channel(AgsChannel *channel, GObject *remote_channel); void ags_channel_remove_remote_channel(AgsChannel *channel, GObject *remote_channel); void ags_channel_add_recall_id(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_remove_recall_id(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_add_recall_container(AgsChannel *channel, GObject *recall_container); void ags_channel_remove_recall_container(AgsChannel *channel, GObject *recall_container); void ags_channel_add_recall(AgsChannel *channel, GObject *recall, gboolean play); void ags_channel_remove_recall(AgsChannel *channel, GObject *recall, gboolean play); void ags_channel_add_pattern(AgsChannel *channel, GObject *pattern); void ags_channel_remove_pattern(AgsChannel *channel, GObject *pattern); GList* ags_channel_add_effect(AgsChannel *channel, char *filename, gchar *effect); void ags_channel_remove_effect(AgsChannel *channel, guint nth); void ags_channel_safe_resize_audio_signal(AgsChannel *channel, guint length); void ags_channel_duplicate_recall(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_resolve_recall(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_init_recall(AgsChannel *channel, gint stage, AgsRecallID *recall_id); void ags_channel_play(AgsChannel *channel, AgsRecallID *recall_id, gint stage); void ags_channel_done(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_cancel(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_remove(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_recall_id_set(AgsChannel *output, AgsRecallID *recall_id, gboolean ommit_own_channel, guint mode, ...); GList* ags_channel_find_port(AgsChannel *channel); GObject* ags_channel_find_port_by_specifier_and_scope(AgsChannel *channel, gchar *specifier, gboolean play); void ags_channel_set_link(AgsChannel *channel, AgsChannel *link, GError **error); void ags_channel_set_recycling(AgsChannel *channel, AgsRecycling *first_recycling, AgsRecycling *last_recycling, gboolean update, gboolean destroy_old); void ags_channel_recursive_reset_recycling_context(AgsChannel *channel, AgsRecyclingContext *old_recycling_context, AgsRecyclingContext *recycling_context); void ags_channel_recycling_changed(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region); void ags_channel_recursive_set_property(AgsChannel *channel, GParameter *parameter, gint n_params); AgsRecallID* ags_channel_recursive_play_init(AgsChannel *channel, gint stage, gboolean arrange_recall_id, gboolean duplicate_templates, gboolean do_playback, gboolean do_sequencer, gboolean do_notation, gboolean resolve_dependencies, AgsRecallID *recall_id); void ags_channel_recursive_play_threaded(AgsChannel *channel, AgsRecallID *recall_id, gint stage); void ags_channel_recursive_play(AgsChannel *channel, AgsRecallID *recall_id, gint stage); void ags_channel_tillrecycling_cancel(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link, AgsChannel *old_channel_link, AgsChannel *old_link_link); AgsChannel* ags_channel_get_level(AgsChannel *channel); void ags_channel_recursive_reset_recall_id(AgsChannel *channel, AgsRecallID *valid_recall_id, gboolean valid_set_up, gboolean valid_set_down, AgsRecallID *invalid_recall_id, gboolean invalid_set_up, gboolean invalid_set_down); void ags_channel_recursive_init(AgsChannel *channel, AgsRecallID *recall_id, gint stage, gint init_stage, gboolean init_up, gboolean init_down); void ags_channel_recursive_run(AgsChannel *channel, AgsRecallID *recall_id, gint run_stage, gboolean run_up, gboolean run_down, gboolean current_level_only); void ags_channel_recursive_cancel(AgsChannel *channel, AgsRecallID *recall_id, gboolean cancel_up, gboolean cancel_down); AgsChannel* ags_channel_new(GObject *audio); #endif /*__AGS_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/file/0000755000175000017500000000000013256233674013551 500000000000000gsequencer-1.4.24/ags/audio/file/ags_audio_file_link.h0000644000175000017500000000410213256163135017600 00000000000000/* 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 . */ #ifndef __AGS_AUDIO_FILE_LINK_H__ #define __AGS_AUDIO_FILE_LINK_H__ #include #include #include #include #define AGS_TYPE_AUDIO_FILE_LINK (ags_audio_file_link_get_type()) #define AGS_AUDIO_FILE_LINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_FILE_LINK, AgsAudioFileLink)) #define AGS_AUDIO_FILE_LINK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_AUDIO_FILE_LINK, AgsAudioFileLink)) #define AGS_IS_AUDIO_FILE_LINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUDIO_FILE_LINK)) #define AGS_IS_AUDIO_FILE_LINK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUDIO_FILE_LINK)) #define AGS_AUDIO_FILE_LINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_AUDIO_FILE_LINK, AgsAudioFileLinkClass)) typedef struct _AgsAudioFileLink AgsAudioFileLink; typedef struct _AgsAudioFileLinkClass AgsAudioFileLinkClass; struct _AgsAudioFileLink { AgsFileLink file_link; gchar *preset; gchar *instrument; gchar *sample; guint audio_channel; AgsTimestamp *timestamp; }; struct _AgsAudioFileLinkClass { AgsFileLinkClass file_link; }; GType ags_audio_file_link_get_type(); AgsAudioFileLink* ags_audio_file_link_new(); #endif /*__AGS_AUDIO_FILE_LINK_H__*/ gsequencer-1.4.24/ags/audio/file/ags_ipatch_dls2_reader.h0000644000175000017500000000535613246707333020220 00000000000000/* 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 . */ #ifndef __AGS_IPATCH_DLS2_READER_H__ #define __AGS_IPATCH_DLS2_READER_H__ #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #define AGS_TYPE_IPATCH_DLS2_READER (ags_ipatch_dls2_reader_get_type()) #define AGS_IPATCH_DLS2_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_IPATCH_DLS2_READER, AgsIpatchDLS2Reader)) #define AGS_IPATCH_DLS2_READER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_IPATCH_DLS2_READER, AgsIpatchDLS2ReaderClass)) #define AGS_IS_IPATCH_DLS2_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_IPATCH_DLS2_READER)) #define AGS_IS_IPATCH_DLS2_READER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_IPATCH_DLS2_READER)) #define AGS_IPATCH_DLS2_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_IPATCH_DLS2_READER, AgsIpatchDLS2ReaderClass)) typedef struct _AgsIpatchDLS2Reader AgsIpatchDLS2Reader; typedef struct _AgsIpatchDLS2ReaderClass AgsIpatchDLS2ReaderClass; /** * AgsDLS2Levels: * @AGS_DLS2_FILENAME: filename * @AGS_DLS2_IHDR: instrument header * @AGS_DLS2_SHDR: sample header * * Enum values to describe the different levels of a DLS2 file. */ typedef enum{ AGS_DLS2_FILENAME = 0, AGS_DLS2_IHDR = 1, AGS_DLS2_SHDR = 2, }AgsDLS2Levels; struct _AgsIpatchDLS2Reader { GObject object; AgsIpatch *ipatch; gchar **selected; #ifdef AGS_WITH_LIBINSTPATCH IpatchDLSReader *reader; IpatchDLS2 *dls2; #else gpointer reader; gpointer dls2; #endif int bank; int program; #ifdef AGS_WITH_LIBINSTPATCH IpatchContainer *instrument; IpatchContainer *sample; #else gpointer instrument; gpointer sample; #endif int count; }; struct _AgsIpatchDLS2ReaderClass { GObjectClass object; }; GType ags_ipatch_dls2_reader_get_type(); AgsIpatchDLS2Reader* ags_ipatch_dls2_reader_new(); #endif /*__AGS_IPATCH_DLS2_READER_H__*/ gsequencer-1.4.24/ags/audio/file/ags_audio_xml_serialization_factory.h0000644000175000017500000000505413246707333023142 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUDIO_XML_SERIALIZATION_FACTORY_H__ #define __AGS_AUDIO_XML_SERIALIZATION_FACTORY_H__ #include #include #include #define AGS_TYPE_AUDIO_XML_SERIALIZATION_FACTORY (ags_audio_xml_serialization_factory_get_type()) #define AGS_AUDIO_XML_SERIALIZATION_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_XML_SERIALIZATION_FACTORY, AgsAudioXmlSerializationFactory)) #define AGS_AUDIO_XML_SERIALIZATION_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUDIO_XML_SERIALIZATION_FACTORY, AgsAudioXmlSerializationFactoryClass)) #define AGS_IS_AUDIO_XML_SERIALIZATION_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_AUDIO_XML_SERIALIZATION_FACTORY)) #define AGS_IS_AUDIO_XML_SERIALIZATION_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_AUDIO_XML_SERIALIZATION_FACTORY)) #define AGS_AUDIO_XML_SERIALIZATION_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_AUDIO_XML_SERIALIZATION_FACTORY, AgsAudioXmlSerializationFactoryClass)) typedef struct _AgsAudioXmlSerializationFactory AgsAudioXmlSerializationFactory; typedef struct _AgsAudioXmlSerializationFactoryClass AgsAudioXmlSerializationFactoryClass; struct _AgsAudioXmlSerializationFactory { GObject object; }; struct _AgsAudioXmlSerializationFactoryClass { GObjectClass object; }; GType ags_audio_xml_serialization_factory_get_type(); gpointer ags_audio_xml_serialization_factory_create(AgsAudioXmlSerializationFactory *audio_xml_serialization_factory, xmlNode *node); /* */ AgsAudioXmlSerializationFactory* ags_audio_xml_serialization_factory_get_instance(); AgsAudioXmlSerializationFactory* ags_audio_xml_serialization_factory_new(); #endif /*__AGS_AUDIO_XML_SERIALIZATION_FACTORY_H__*/ gsequencer-1.4.24/ags/audio/file/ags_ipatch.h0000644000175000017500000000546213256163135015745 00000000000000/* 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 . */ #ifndef __AGS_IPATCH_H__ #define __AGS_IPATCH_H__ #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #define AGS_TYPE_IPATCH (ags_ipatch_get_type()) #define AGS_IPATCH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_IPATCH, AgsIpatch)) #define AGS_IPATCH_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_IPATCH, AgsIpatchClass)) #define AGS_IS_IPATCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_IPATCH)) #define AGS_IS_IPATCH_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_IPATCH)) #define AGS_IPATCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_IPATCH, AgsIpatchClass)) #define AGS_IPATCH_DEFAULT_CHANNELS 2 #define AGS_IPATCH_READ "r" #define AGS_IPATCH_WRITE "w" typedef struct _AgsIpatch AgsIpatch; typedef struct _AgsIpatchClass AgsIpatchClass; /** * AgsIpatchFlags: * @AGS_IPATCH_DLS2: DLS2 format * @AGS_IPATCH_SF2: Soundfont2 format * @AGS_IPATCH_GIG: Gigasampler format * * Enum values to control the behavior or indicate internal state of #AgsFifoout by * enable/disable as flags. */ typedef enum{ AGS_IPATCH_DLS2 = 1, AGS_IPATCH_SF2 = 1 << 1, AGS_IPATCH_GIG = 1 << 2, }AgsIpatchFlags; struct _AgsIpatch { GObject object; guint flags; GObject *soundcard; GList *audio_signal; #ifdef AGS_WITH_LIBINSTPATCH IpatchFile *file; #else gpointer file; #endif char *filename; char *mode; #ifdef AGS_WITH_LIBINSTPATCH IpatchFileHandle *handle; #else gpointer handle; #endif GError *error; #ifdef AGS_WITH_LIBINSTPATCH IpatchBase *base; #else gpointer base; #endif GObject *reader; #ifdef AGS_WITH_LIBINSTPATCH IpatchList *samples; #else gpointer samples; #endif GList *iter; guint nth_level; }; struct _AgsIpatchClass { GObjectClass object; }; GType ags_ipatch_get_type(); gboolean ags_ipatch_check_suffix(gchar *filename); AgsIpatch* ags_ipatch_new(); #endif /*__AGS_IPATCH_H__*/ gsequencer-1.4.24/ags/audio/file/ags_sndfile.h0000644000175000017500000000422113256163135016111 00000000000000/* 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 . */ #ifndef __AGS_SNDFILE_H__ #define __AGS_SNDFILE_H__ #include #include #include #define AGS_TYPE_SNDFILE (ags_sndfile_get_type()) #define AGS_SNDFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SNDFILE, AgsSndfile)) #define AGS_SNDFILE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SNDFILE, AgsSndfileClass)) #define AGS_IS_SNDFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SNDFILE)) #define AGS_IS_SNDFILE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SNDFILE)) #define AGS_SNDFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SNDFILE, AgsSndfileClass)) typedef struct _AgsSndfile AgsSndfile; typedef struct _AgsSndfileClass AgsSndfileClass; /** * AgsSndfileFlags: * @AGS_SNDFILE_ITER_START: iter start * @AGS_SNDFILE_VIRTUAL: virtual IO * * Enum values to control the behavior or indicate internal state of #AgsSndfile by * enable/disable as flags. */ typedef enum{ AGS_SNDFILE_ITER_START = 1, AGS_SNDFILE_VIRTUAL = 1 << 1, }AgsSndfileFlags; struct _AgsSndfile { GObject object; guint flags; SF_INFO *info; SNDFILE *file; guchar *pointer; guchar *current; gsize length; gpointer buffer; }; struct _AgsSndfileClass { GObjectClass object; }; GType ags_sndfile_get_type(); AgsSndfile* ags_sndfile_new(); #endif /*__AGS_SNDFILE_H__*/ gsequencer-1.4.24/ags/audio/file/ags_audio_file.h0000644000175000017500000000523513256163135016573 00000000000000/* 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 . */ #ifndef __AGS_AUDIO_FILE_H__ #define __AGS_AUDIO_FILE_H__ #include #include #define AGS_TYPE_AUDIO_FILE (ags_audio_file_get_type()) #define AGS_AUDIO_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_FILE, AgsAudioFile)) #define AGS_AUDIO_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUDIO_FILE, AgsAudioFileClass)) #define AGS_IS_AUDIO_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_AUDIO_FILE)) #define AGS_IS_AUDIO_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_AUDIO_FILE)) #define AGS_AUDIO_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_AUDIO_FILE, AgsAudioFileClass)) typedef struct _AgsAudioFile AgsAudioFile; typedef struct _AgsAudioFileClass AgsAudioFileClass; struct _AgsAudioFile { GObject object; GObject *soundcard; gchar *filename; guint samplerate; guint frames; guint channels; guint format; guint start_channel; guint audio_channels; GObject *playable; GList *audio_signal; }; struct _AgsAudioFileClass { GObjectClass object; }; GType ags_audio_file_get_type(); gboolean ags_audio_file_check_suffix(gchar *filename); gboolean ags_audio_file_open(AgsAudioFile *audio_file); gboolean ags_audio_file_open_from_data(AgsAudioFile *audio_file, gchar *data); gboolean ags_audio_file_rw_open(AgsAudioFile *audio_file, gboolean create); void ags_audio_file_close(AgsAudioFile *audio_file); void ags_audio_file_read_audio_signal(AgsAudioFile *audio_file); void ags_audio_file_seek(AgsAudioFile *audio_file, guint frames, gint whence); void ags_audio_file_write(AgsAudioFile *audio_file, void *buffer, guint buffer_size, guint format); void ags_audio_file_flush(AgsAudioFile *audio_file); AgsAudioFile* ags_audio_file_new(gchar *filename, GObject *soundcard, guint start_channel, guint audio_channels); #endif /*__AGS_AUDIO_FILE_H__*/ gsequencer-1.4.24/ags/audio/file/ags_ipatch_sf2_reader.c0000644000175000017500000001530313256163135020027 00000000000000/* 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 . */ #include #include #include #include void ags_ipatch_sf2_reader_class_init(AgsIpatchSF2ReaderClass *ipatch_sf2_reader); void ags_ipatch_sf2_reader_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ipatch_sf2_reader_init(AgsIpatchSF2Reader *ipatch_sf2_reader); void ags_ipatch_sf2_reader_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_ipatch_sf2_reader_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_ipatch_sf2_reader_finalize(GObject *gobject); void ags_ipatch_sf2_reader_connect(AgsConnectable *connectable); void ags_ipatch_sf2_reader_disconnect(AgsConnectable *connectable); /** * SECTION:ags_ipatch_sf2_reader * @short_description: interfacing Soundfont2 related API of libinstpatch * @title: AgsIpatchSF2Reader * @section_id: * @include: ags/audio/file/ags_ipatch_sf2_reader.h * * #AgsIpatchSF2Reader is the base object to ineract with Soundfont2 related API. */ static gpointer ags_ipatch_sf2_reader_parent_class = NULL; static AgsConnectableInterface *ags_ipatch_sf2_reader_parent_connectable_interface; enum{ PROP_0, PROP_IPATCH, }; GType ags_ipatch_sf2_reader_get_type() { static GType ags_type_ipatch_sf2_reader = 0; if(!ags_type_ipatch_sf2_reader){ static const GTypeInfo ags_ipatch_sf2_reader_info = { sizeof (AgsIpatchSF2ReaderClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ipatch_sf2_reader_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsIpatchSF2Reader), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ipatch_sf2_reader_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ipatch_sf2_reader_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ipatch_sf2_reader = g_type_register_static(G_TYPE_OBJECT, "AgsIpatchSF2Reader", &ags_ipatch_sf2_reader_info, 0); g_type_add_interface_static(ags_type_ipatch_sf2_reader, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_ipatch_sf2_reader); } void ags_ipatch_sf2_reader_class_init(AgsIpatchSF2ReaderClass *ipatch_sf2_reader) { GObjectClass *gobject; GParamSpec *param_spec; ags_ipatch_sf2_reader_parent_class = g_type_class_peek_parent(ipatch_sf2_reader); gobject = (GObjectClass *) ipatch_sf2_reader; gobject->set_property = ags_ipatch_sf2_reader_set_property; gobject->get_property = ags_ipatch_sf2_reader_get_property; gobject->finalize = ags_ipatch_sf2_reader_finalize; /* properties */ /** * AgsIpatchSF2Reader:ipatch: * * The assigned #AgsIpatch * * Since: 1.0.0 */ param_spec = g_param_spec_object("ipatch", i18n_pspec("the ipatch"), i18n_pspec("The assigned ipatch"), AGS_TYPE_IPATCH, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_IPATCH, param_spec); } void ags_ipatch_sf2_reader_connectable_interface_init(AgsConnectableInterface *connectable) { ags_ipatch_sf2_reader_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_ipatch_sf2_reader_connect; connectable->disconnect = ags_ipatch_sf2_reader_disconnect; } void ags_ipatch_sf2_reader_init(AgsIpatchSF2Reader *ipatch_sf2_reader) { ipatch_sf2_reader->ipatch = NULL; ipatch_sf2_reader->bank = -1; ipatch_sf2_reader->program = -1; ipatch_sf2_reader->selected = (gchar **) malloc(4 * sizeof(gchar *)); ipatch_sf2_reader->selected[0] = NULL; ipatch_sf2_reader->selected[1] = NULL; ipatch_sf2_reader->selected[2] = NULL; ipatch_sf2_reader->selected[3] = NULL; ipatch_sf2_reader->preset = NULL; ipatch_sf2_reader->instrument = NULL; ipatch_sf2_reader->sample = NULL; } void ags_ipatch_sf2_reader_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsIpatchSF2Reader *ipatch_sf2_reader; ipatch_sf2_reader = AGS_IPATCH_SF2_READER(gobject); switch(prop_id){ case PROP_IPATCH: { AgsIpatch *ipatch; ipatch = (AgsIpatch *) g_value_get_object(value); if(ipatch_sf2_reader->ipatch != NULL){ g_object_unref(ipatch_sf2_reader->ipatch); } ipatch_sf2_reader->ipatch = ipatch; if(ipatch != NULL){ g_object_ref(ipatch); ipatch->reader = (GObject *) ipatch_sf2_reader; } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ipatch_sf2_reader_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsIpatchSF2Reader *ipatch_sf2_reader; ipatch_sf2_reader = AGS_IPATCH_SF2_READER(gobject); switch(prop_id){ case PROP_IPATCH: g_value_set_object(value, ipatch_sf2_reader->ipatch); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ipatch_sf2_reader_connect(AgsConnectable *connectable) { ags_ipatch_sf2_reader_parent_connectable_interface->connect(connectable); /* empty */ } void ags_ipatch_sf2_reader_disconnect(AgsConnectable *connectable) { ags_ipatch_sf2_reader_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_ipatch_sf2_reader_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_ipatch_sf2_reader_parent_class)->finalize(gobject); /* empty */ } /** * ags_ipatch_sf2_reader_new: * * Creates an #AgsIpatchSF2Reader. * * Returns: an empty #AgsIpatchSF2Reader. * * Since: 1.0.0 */ AgsIpatchSF2Reader* ags_ipatch_sf2_reader_new() { AgsIpatchSF2Reader *ipatch_sf2_reader; ipatch_sf2_reader = (AgsIpatchSF2Reader *) g_object_new(AGS_TYPE_IPATCH_SF2_READER, NULL); return(ipatch_sf2_reader); } gsequencer-1.4.24/ags/audio/file/ags_ipatch_sf2_reader.h0000644000175000017500000000546013246707333020042 00000000000000/* 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 . */ #ifndef __AGS_IPATCH_SF2_READER_H__ #define __AGS_IPATCH_SF2_READER_H__ #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include #define AGS_TYPE_IPATCH_SF2_READER (ags_ipatch_sf2_reader_get_type()) #define AGS_IPATCH_SF2_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_IPATCH_SF2_READER, AgsIpatchSF2Reader)) #define AGS_IPATCH_SF2_READER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_IPATCH_SF2_READER, AgsIpatchSF2ReaderClass)) #define AGS_IS_IPATCH_SF2_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_IPATCH_SF2_READER)) #define AGS_IS_IPATCH_SF2_READER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_IPATCH_SF2_READER)) #define AGS_IPATCH_SF2_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_IPATCH_SF2_READER, AgsIpatchSF2ReaderClass)) typedef struct _AgsIpatchSF2Reader AgsIpatchSF2Reader; typedef struct _AgsIpatchSF2ReaderClass AgsIpatchSF2ReaderClass; /** * AgsSF2Levels: * @AGS_SF2_FILENAME: filename * @AGS_SF2_PHDR: preset header * @AGS_SF2_IHDR: instrument header * @AGS_SF2_SHDR: sample header * * Enum values to describe the different levels of a Soundfont2 file. */ typedef enum{ AGS_SF2_FILENAME = 0, AGS_SF2_PHDR = 1, AGS_SF2_IHDR = 2, AGS_SF2_SHDR = 3, }AgsSF2Levels; struct _AgsIpatchSF2Reader { GObject object; AgsIpatch *ipatch; gchar **selected; #ifdef AGS_WITH_LIBINSTPATCH IpatchSF2Reader *reader; IpatchSF2 *sf2; #else gpointer reader; gpointer sf2; #endif int bank; int program; #ifdef AGS_WITH_LIBINSTPATCH IpatchContainer *preset; IpatchContainer *instrument; IpatchContainer *sample; #else gpointer preset; gpointer instrument; gpointer sample; #endif int count; }; struct _AgsIpatchSF2ReaderClass { GObjectClass object; }; GType ags_ipatch_sf2_reader_get_type(); AgsIpatchSF2Reader* ags_ipatch_sf2_reader_new(); #endif /*__AGS_IPATCH_SF2_READER_H__*/ gsequencer-1.4.24/ags/audio/file/ags_audio_xml_serialization_factory.c0000644000175000017500000001025013246707333023127 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_audio_xml_serialization_factory_class_init(AgsAudioXmlSerializationFactoryClass *audio_xml_serialization_factory_class); void ags_audio_xml_serialization_factory_connectable_interface_init(AgsConnectableInterface *connectable); void ags_audio_xml_serialization_factory_init(AgsAudioXmlSerializationFactory *audio_xml_serialization_factory); /** * SECTION:ags_audio_xml_serialization_factory * @short_description: Factory pattern * @title: AgsAudioXmlSerializationFactory * @section_id: * @include: ags/audio/file/ags_audio_xml_serialization_factory.h * * #AgsAudioXmlSerializationFactory allocates or instantiates specified #xmlNode-struct. */ static gpointer ags_audio_xml_serialization_factory_parent_class = NULL; GType ags_audio_xml_serialization_factory_get_type (void) { static GType ags_type_audio_xml_serialization_factory = 0; if(!ags_type_audio_xml_serialization_factory){ static const GTypeInfo ags_audio_xml_serialization_factory_info = { sizeof (AgsAudioXmlSerializationFactoryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_xml_serialization_factory_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAudioXmlSerializationFactory), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_xml_serialization_factory_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_audio_xml_serialization_factory_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audio_xml_serialization_factory = g_type_register_static(G_TYPE_OBJECT, "AgsAudioXmlSerializationFactory", &ags_audio_xml_serialization_factory_info, 0); g_type_add_interface_static(ags_type_audio_xml_serialization_factory, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_audio_xml_serialization_factory); } void ags_audio_xml_serialization_factory_class_init(AgsAudioXmlSerializationFactoryClass *audio_xml_serialization_factory) { ags_audio_xml_serialization_factory_parent_class = g_type_class_peek_parent(audio_xml_serialization_factory); } void ags_audio_xml_serialization_factory_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = NULL; connectable->remove_from_registry = NULL; connectable->connect = NULL; connectable->disconnect = NULL; } void ags_audio_xml_serialization_factory_init(AgsAudioXmlSerializationFactory *audio_xml_serialization_factory) { } gpointer ags_audio_xml_serialization_factory_create(AgsAudioXmlSerializationFactory *audio_xml_serialization_factory, xmlNode *node) { gpointer ret_val; ret_val = NULL; //TODO:JK: implement me return(ret_val); } /** * ags_audio_xml_serialization_factory_new: * * Creates a #AgsAudioXmlSerializationFactory * * Returns: a new #AgsAudioXmlSerializationFactory * * Since: 1.0.0 */ AgsAudioXmlSerializationFactory* ags_audio_xml_serialization_factory_new() { AgsAudioXmlSerializationFactory *audio_xml_serialization_factory; audio_xml_serialization_factory = (AgsAudioXmlSerializationFactory *) g_object_new(AGS_TYPE_AUDIO_XML_SERIALIZATION_FACTORY, NULL); return(audio_xml_serialization_factory); } gsequencer-1.4.24/ags/audio/file/ags_audio_file_xml.h0000644000175000017500000002321713246707333017456 00000000000000/* 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 . */ #ifndef __AGS_AUDIO_FILE_XML_H__ #define __AGS_AUDIO_FILE_XML_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* AgsSoundcard */ void ags_file_read_soundcard(AgsFile *file, xmlNode *node, GObject **soundcard); xmlNode* ags_file_write_soundcard(AgsFile *file, xmlNode *parent, GObject *soundcard); void ags_file_read_soundcard_list(AgsFile *file, xmlNode *node, GList **soundcard); xmlNode* ags_file_write_soundcard_list(AgsFile *file, xmlNode *parent, GList *soundcard); void ags_file_read_playback(AgsFile *file, xmlNode *node, AgsPlayback **playback); xmlNode* ags_file_write_playback(AgsFile *file, xmlNode *parent, AgsPlayback *playback); void ags_file_read_playback_list(AgsFile *file, xmlNode *node, GList **playback); xmlNode* ags_file_write_playback_list(AgsFile *file, xmlNode *parent, GList *playback); /* AgsAudio */ void ags_file_read_audio(AgsFile *file, xmlNode *node, AgsAudio **audio); xmlNode* ags_file_write_audio(AgsFile *file, xmlNode *parent, AgsAudio *audio); void ags_file_read_audio_list(AgsFile *file, xmlNode *node, GList **audio); xmlNode* ags_file_write_audio_list(AgsFile *file, xmlNode *parent, GList *audio); /* AgsChannel */ void ags_file_read_channel(AgsFile *file, xmlNode *node, AgsChannel **channel); xmlNode* ags_file_write_channel(AgsFile *file, xmlNode *parent, AgsChannel *channel); void ags_file_read_channel_list(AgsFile *file, xmlNode *node, GList **channel); xmlNode* ags_file_write_channel_list(AgsFile *file, xmlNode *parent, GList *channel); void ags_file_read_input(AgsFile *file, xmlNode *node, AgsChannel *input); xmlNode* ags_file_write_input(AgsFile *file, xmlNode *parent, AgsChannel *input); void ags_file_read_output(AgsFile *file, xmlNode *node, AgsChannel *output); xmlNode* ags_file_write_output(AgsFile *file, xmlNode *parent, AgsChannel *output); /* AgsRecall */ void ags_file_read_recall(AgsFile *file, xmlNode *node, AgsRecall **recall); xmlNode* ags_file_write_recall(AgsFile *file, xmlNode *parent, AgsRecall *recall); void ags_file_read_recall_list(AgsFile *file, xmlNode *node, GList **recall); xmlNode* ags_file_write_recall_list(AgsFile *file, xmlNode *parent, GList *recall); void ags_file_read_recall_container(AgsFile *file, xmlNode *node, AgsRecallContainer **recall_container); xmlNode* ags_file_write_recall_container(AgsFile *file, xmlNode *parent, AgsRecallContainer *recall_container); void ags_file_read_recall_container_list(AgsFile *file, xmlNode *node, GList **recall_container); xmlNode* ags_file_write_recall_container_list(AgsFile *file, xmlNode *parent, GList *recall_container); void ags_file_read_recall_audio(AgsFile *file, xmlNode *node, AgsRecall *recall); xmlNode* ags_file_write_recall_audio(AgsFile *file, xmlNode *parent, AgsRecall *recall); void ags_file_read_recall_audio_run(AgsFile *file, xmlNode *node, AgsRecall *recall); xmlNode* ags_file_write_recall_audio_run(AgsFile *file, xmlNode *parent, AgsRecall *recall); void ags_file_read_recall_channel(AgsFile *file, xmlNode *node, AgsRecall *recall); xmlNode* ags_file_write_recall_channel(AgsFile *file, xmlNode *parent, AgsRecall *recall); void ags_file_read_recall_channel_run(AgsFile *file, xmlNode *node, AgsRecall *recall); xmlNode* ags_file_write_recall_channel_run(AgsFile *file, xmlNode *parent, AgsRecall *recall); void ags_file_read_recall_recycling(AgsFile *file, xmlNode *node, AgsRecall *recall); xmlNode* ags_file_write_recall_recycling(AgsFile *file, xmlNode *parent, AgsRecall *recall); void ags_file_read_recall_audio_signal(AgsFile *file, xmlNode *node, AgsRecall *recall); xmlNode* ags_file_write_recall_audio_signal(AgsFile *file, xmlNode *parent, AgsRecall *recall); /* AgsPort */ void ags_file_read_port(AgsFile *file, xmlNode *node, AgsPort **port); xmlNode* ags_file_write_port(AgsFile *file, xmlNode *parent, AgsPort *port); void ags_file_read_port_list(AgsFile *file, xmlNode *node, GList **port); xmlNode* ags_file_write_port_list(AgsFile *file, xmlNode *parent, GList *port); /* AgsRecycling */ void ags_file_read_recycling(AgsFile *file, xmlNode *node, AgsRecycling **recycling); xmlNode* ags_file_write_recycling(AgsFile *file, xmlNode *parent, AgsRecycling *recycling); void ags_file_read_recycling_list(AgsFile *file, xmlNode *node, GList **recycling); xmlNode* ags_file_write_recycling_list(AgsFile *file, xmlNode *parent, GList *recycling); /* AgsAudioSignal */ void ags_file_read_audio_signal(AgsFile *file, xmlNode *node, AgsAudioSignal **audio_signal); xmlNode* ags_file_write_audio_signal(AgsFile *file, xmlNode *parent, AgsAudioSignal *audio_signal); void ags_file_read_audio_signal_list(AgsFile *file, xmlNode *node, GList **audio_signal); xmlNode* ags_file_write_audio_signal_list(AgsFile *file, xmlNode *parent, GList *audio_signal); /* AgsStream */ void ags_file_read_stream(AgsFile *file, xmlNode *node, GList **stream, guint *index, guint buffer_size); xmlNode* ags_file_write_stream(AgsFile *file, xmlNode *parent, GList *stream, guint index, guint buffer_size); void ags_file_read_stream_list(AgsFile *file, xmlNode *node, GList **stream, guint buffer_size); xmlNode* ags_file_write_stream_list(AgsFile *file, xmlNode *parent, GList *stream, guint buffer_size); /* AgsPattern */ void ags_file_read_pattern(AgsFile *file, xmlNode *node, AgsPattern **pattern); xmlNode* ags_file_write_pattern(AgsFile *file, xmlNode *parent, AgsPattern *pattern); void ags_file_read_pattern_list(AgsFile *file, xmlNode *node, GList **pattern); xmlNode* ags_file_write_pattern_list(AgsFile *file, xmlNode *parent, GList *pattern); void ags_file_read_pattern_data(AgsFile *file, xmlNode *node, AgsPattern *pattern, guint *i, guint *j, guint length); xmlNode* ags_file_write_pattern_data(AgsFile *file, xmlNode *parent, AgsPattern *pattern, guint i, guint j, guint length); void ags_file_read_pattern_data_list(AgsFile *file, xmlNode *node, AgsPattern *pattern, guint length); xmlNode* ags_file_write_pattern_data_list(AgsFile *file, xmlNode *parent, AgsPattern *pattern, guint length); /* AgsNotation */ void ags_file_read_notation(AgsFile *file, xmlNode *node, AgsNotation **notation); xmlNode* ags_file_write_notation(AgsFile *file, xmlNode *parent, AgsNotation *notation); void ags_file_read_notation_list(AgsFile *file, xmlNode *node, GList **notation); xmlNode* ags_file_write_notation_list(AgsFile *file, xmlNode *parent, GList *notation); void ags_file_read_note(AgsFile *file, xmlNode *node, AgsNote **note); xmlNode* ags_file_write_note(AgsFile *file, xmlNode *parent, AgsNote *note); void ags_file_read_note_list(AgsFile *file, xmlNode *node, GList **note); xmlNode* ags_file_write_note_list(AgsFile *file, xmlNode *parent, GList *note); /* AgsAutomation */ void ags_file_read_automation(AgsFile *file, xmlNode *node, AgsAutomation **automation); xmlNode* ags_file_write_automation(AgsFile *file, xmlNode *parent, AgsAutomation *automation); void ags_file_read_automation_list(AgsFile *file, xmlNode *node, GList **automation); xmlNode* ags_file_write_automation_list(AgsFile *file, xmlNode *parent, GList *automation); void ags_file_read_acceleration(AgsFile *file, xmlNode *node, AgsAcceleration **acceleration); xmlNode* ags_file_write_acceleration(AgsFile *file, xmlNode *parent, AgsAcceleration *acceleration); void ags_file_read_acceleration_list(AgsFile *file, xmlNode *node, GList **acceleration); xmlNode* ags_file_write_acceleration_list(AgsFile *file, xmlNode *parent, GList *acceleration); /* AgsTask */ void ags_file_read_task(AgsFile *file, xmlNode *node, AgsTask **task); xmlNode* ags_file_write_task(AgsFile *file, xmlNode *parent, AgsTask *task); void ags_file_read_task_list(AgsFile *file, xmlNode *node, GList **task); xmlNode* ags_file_write_task_list(AgsFile *file, xmlNode *parent, GList *task); /* embedded audio */ void ags_file_read_embedded_audio(AgsFile *file, xmlNode *node, gchar **embedded_audio); xmlNode* ags_file_write_embedded_audio(AgsFile *file, xmlNode *parent, gchar *embedded_audio); void ags_file_read_embedded_audio_list(AgsFile *file, xmlNode *node, GList **embedded_audio); xmlNode* ags_file_write_embedded_audio_list(AgsFile *file, xmlNode *parent, GList *embedded_audio); #endif /*__AGS_AUDIO_FILE_XML_H__*/ gsequencer-1.4.24/ags/audio/file/ags_ipatch_dls2_reader.c0000644000175000017500000001515113246707333020205 00000000000000/* 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 . */ #include #include #include #include void ags_ipatch_dls2_reader_class_init(AgsIpatchDLS2ReaderClass *ipatch_dls2_reader); void ags_ipatch_dls2_reader_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ipatch_dls2_reader_init(AgsIpatchDLS2Reader *ipatch_dls2_reader); void ags_ipatch_dls2_reader_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_ipatch_dls2_reader_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_ipatch_dls2_reader_finalize(GObject *gobject); void ags_ipatch_dls2_reader_connect(AgsConnectable *connectable); void ags_ipatch_dls2_reader_disconnect(AgsConnectable *connectable); /** * SECTION:ags_ipatch_dls2_reader * @short_description: interfacing Soundfont2 related API of libinstpatch * @title: AgsIpatchDLS2Reader * @section_id: * @include: ags/audio/file/ags_ipatch_dls2_reader.h * * #AgsIpatchDLS2Reader is the base object to ineract with Soundfont2 related API. */ static gpointer ags_ipatch_dls2_reader_parent_class = NULL; static AgsConnectableInterface *ags_ipatch_dls2_reader_parent_connectable_interface; enum{ PROP_0, PROP_IPATCH, }; GType ags_ipatch_dls2_reader_get_type() { static GType ags_type_ipatch_dls2_reader = 0; if(!ags_type_ipatch_dls2_reader){ static const GTypeInfo ags_ipatch_dls2_reader_info = { sizeof (AgsIpatchDLS2ReaderClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ipatch_dls2_reader_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsIpatchDLS2Reader), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ipatch_dls2_reader_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ipatch_dls2_reader_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ipatch_dls2_reader = g_type_register_static(G_TYPE_OBJECT, "AgsIpatchDLS2Reader", &ags_ipatch_dls2_reader_info, 0); g_type_add_interface_static(ags_type_ipatch_dls2_reader, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_ipatch_dls2_reader); } void ags_ipatch_dls2_reader_class_init(AgsIpatchDLS2ReaderClass *ipatch_dls2_reader) { GObjectClass *gobject; GParamSpec *param_spec; ags_ipatch_dls2_reader_parent_class = g_type_class_peek_parent(ipatch_dls2_reader); gobject = (GObjectClass *) ipatch_dls2_reader; gobject->set_property = ags_ipatch_dls2_reader_set_property; gobject->get_property = ags_ipatch_dls2_reader_get_property; gobject->finalize = ags_ipatch_dls2_reader_finalize; /* properties */ /** * AgsIpatchDLS2Reader:ipatch: * * The assigned #AgsIpatch * * Since: 1.0.0 */ param_spec = g_param_spec_object("ipatch", i18n_pspec("the ipatch"), i18n_pspec("The assigned ipatch"), AGS_TYPE_IPATCH, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_IPATCH, param_spec); } void ags_ipatch_dls2_reader_connectable_interface_init(AgsConnectableInterface *connectable) { ags_ipatch_dls2_reader_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_ipatch_dls2_reader_connect; connectable->disconnect = ags_ipatch_dls2_reader_disconnect; } void ags_ipatch_dls2_reader_init(AgsIpatchDLS2Reader *ipatch_dls2_reader) { ipatch_dls2_reader->ipatch = NULL; ipatch_dls2_reader->bank = -1; ipatch_dls2_reader->program = -1; ipatch_dls2_reader->selected = (gchar **) malloc(3 * sizeof(gchar *)); ipatch_dls2_reader->instrument = NULL; ipatch_dls2_reader->sample = NULL; } void ags_ipatch_dls2_reader_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsIpatchDLS2Reader *ipatch_dls2_reader; ipatch_dls2_reader = AGS_IPATCH_DLS2_READER(gobject); switch(prop_id){ case PROP_IPATCH: { AgsIpatch *ipatch; ipatch = (AgsIpatch *) g_value_get_object(value); if(ipatch_dls2_reader->ipatch != NULL){ g_object_unref(ipatch_dls2_reader->ipatch); } ipatch_dls2_reader->ipatch = ipatch; if(ipatch != NULL){ g_object_ref(ipatch); ipatch->reader = (GObject *) ipatch_dls2_reader; } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ipatch_dls2_reader_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsIpatchDLS2Reader *ipatch_dls2_reader; ipatch_dls2_reader = AGS_IPATCH_DLS2_READER(gobject); switch(prop_id){ case PROP_IPATCH: g_value_set_object(value, ipatch_dls2_reader->ipatch); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ipatch_dls2_reader_connect(AgsConnectable *connectable) { ags_ipatch_dls2_reader_parent_connectable_interface->connect(connectable); /* empty */ } void ags_ipatch_dls2_reader_disconnect(AgsConnectable *connectable) { ags_ipatch_dls2_reader_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_ipatch_dls2_reader_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_ipatch_dls2_reader_parent_class)->finalize(gobject); /* empty */ } /** * ags_ipatch_dls2_reader_new: * * Creates an #AgsIpatchDLS2Reader. * * Returns: an empty #AgsIpatchDLS2Reader. * * Since: 1.0.0 */ AgsIpatchDLS2Reader* ags_ipatch_dls2_reader_new() { AgsIpatchDLS2Reader *ipatch_dls2_reader; ipatch_dls2_reader = (AgsIpatchDLS2Reader *) g_object_new(AGS_TYPE_IPATCH_DLS2_READER, NULL); return(ipatch_dls2_reader); } gsequencer-1.4.24/ags/audio/file/ags_ipatch.c0000644000175000017500000006577213256163135015752 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_ipatch_class_init(AgsIpatchClass *ipatch); void ags_ipatch_connectable_interface_init(AgsConnectableInterface *connectable); void ags_ipatch_playable_interface_init(AgsPlayableInterface *playable); void ags_ipatch_init(AgsIpatch *ipatch); void ags_ipatch_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_ipatch_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_ipatch_finalize(GObject *gobject); void ags_ipatch_connect(AgsConnectable *connectable); void ags_ipatch_disconnect(AgsConnectable *connectable); gboolean ags_ipatch_open(AgsPlayable *playable, gchar *name); guint ags_ipatch_level_count(AgsPlayable *playable); guint ags_ipatch_nth_level(AgsPlayable *playable); gchar** ags_ipatch_sublevel_names(AgsPlayable *playable); void ags_ipatch_level_select(AgsPlayable *playable, guint nth_level, gchar *sublevel_name, GError **error); void ags_ipatch_iter_start(AgsPlayable *playable); gboolean ags_ipatch_iter_next(AgsPlayable *playable); void ags_ipatch_info(AgsPlayable *playable, guint *channels, guint *frames, guint *loop_start, guint *loop_end, GError **error); guint ags_ipatch_get_samplerate(AgsPlayable *playable); guint ags_ipatch_get_format(AgsPlayable *playable); double* ags_ipatch_read(AgsPlayable *playable, guint channel, GError **error); int* ags_ipatch_read_int(AgsPlayable *playable, guint channel, GError **error); void ags_ipatch_close(AgsPlayable *playable); /** * SECTION:ags_ipatch * @short_description: Libinstpatch wrapper * @title: AgsIpatch * @section_id: * @include: ags/audio/file/ags_ipatch.h * * #AgsIpatch is the base object to ineract with libinstpatch. */ static gpointer ags_ipatch_parent_class = NULL; static AgsConnectableInterface *ags_ipatch_parent_connectable_interface; static AgsPlayableInterface *ags_ipatch_parent_playable_interface; enum{ PROP_0, PROP_SOUNDCARD, PROP_FILENAME, PROP_MODE, }; GType ags_ipatch_get_type() { static GType ags_type_ipatch = 0; if(!ags_type_ipatch){ static const GTypeInfo ags_ipatch_info = { sizeof (AgsIpatchClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_ipatch_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsIpatch), 0, /* n_preallocs */ (GInstanceInitFunc) ags_ipatch_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_ipatch_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_playable_interface_info = { (GInterfaceInitFunc) ags_ipatch_playable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_ipatch = g_type_register_static(G_TYPE_OBJECT, "AgsIpatch", &ags_ipatch_info, 0); g_type_add_interface_static(ags_type_ipatch, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_ipatch, AGS_TYPE_PLAYABLE, &ags_playable_interface_info); } return (ags_type_ipatch); } void ags_ipatch_class_init(AgsIpatchClass *ipatch) { GObjectClass *gobject; GParamSpec *param_spec; ags_ipatch_parent_class = g_type_class_peek_parent(ipatch); /* GObjectClass */ gobject = (GObjectClass *) ipatch; gobject->set_property = ags_ipatch_set_property; gobject->get_property = ags_ipatch_get_property; gobject->finalize = ags_ipatch_finalize; /* properties */ /** * AgsIpatch:soundcard: * * The assigned soundcard. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of ipatch"), i18n_pspec("The soundcard what ipatch has it's presets"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsIpatch:filename: * * The assigned filename. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("filename", i18n_pspec("the filename"), i18n_pspec("The filename to open"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsIpatch:mode: * * The assigned mode. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("mode", i18n_pspec("the mode"), i18n_pspec("The mode to open the file"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MODE, param_spec); } void ags_ipatch_connectable_interface_init(AgsConnectableInterface *connectable) { ags_ipatch_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_ipatch_connect; connectable->disconnect = ags_ipatch_disconnect; } void ags_ipatch_playable_interface_init(AgsPlayableInterface *playable) { ags_ipatch_parent_playable_interface = g_type_interface_peek_parent(playable); playable->open = ags_ipatch_open; playable->nth_level = ags_ipatch_nth_level; playable->level_count = ags_ipatch_level_count; playable->sublevel_names = ags_ipatch_sublevel_names; playable->level_select = ags_ipatch_level_select; playable->iter_start = ags_ipatch_iter_start; playable->iter_next = ags_ipatch_iter_next; playable->info = ags_ipatch_info; playable->get_samplerate = ags_ipatch_get_samplerate; playable->get_format = ags_ipatch_get_format; playable->read = ags_ipatch_read; playable->read_int = ags_ipatch_read_int; playable->close = ags_ipatch_close; } void ags_ipatch_init(AgsIpatch *ipatch) { ipatch->flags = 0; ipatch->soundcard = NULL; ipatch->audio_signal= NULL; ipatch->file = NULL; ipatch->filename = NULL; ipatch->mode = AGS_IPATCH_READ; ipatch->handle = NULL; ipatch->error = NULL; ipatch->base = NULL; ipatch->reader = NULL; ipatch->samples = NULL; ipatch->iter = NULL; ipatch->nth_level = 0; } void ags_ipatch_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsIpatch *ipatch; ipatch = AGS_IPATCH(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(soundcard == ((GObject *) ipatch->soundcard)){ return; } if(ipatch->soundcard != NULL){ g_object_unref(ipatch->soundcard); } if(soundcard != NULL){ g_object_ref(G_OBJECT(soundcard)); } ipatch->soundcard = (GObject *) soundcard; } break; case PROP_FILENAME: { gchar *filename; filename = (gchar *) g_value_get_pointer(value); ags_playable_open(AGS_PLAYABLE(ipatch), g_strdup(filename)); } break; case PROP_MODE: { gchar *mode; mode = (gchar *) g_value_get_pointer(value); ipatch->mode = mode; #ifdef AGS_WITH_LIBINSTPATCH if(ipatch->handle != NULL){ GError *error; error = NULL; ipatch_file_default_open_method(ipatch->handle, mode, &error); if(error != NULL){ g_warning("%s", error->message); } } #endif } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ipatch_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsIpatch *ipatch; ipatch = AGS_IPATCH(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, ipatch->soundcard); } break; case PROP_FILENAME: { g_value_set_pointer(value, ipatch->filename); } break; case PROP_MODE: { g_value_set_pointer(value, ipatch->mode); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_ipatch_connect(AgsConnectable *connectable) { ags_ipatch_parent_connectable_interface->connect(connectable); /* empty */ } void ags_ipatch_disconnect(AgsConnectable *connectable) { ags_ipatch_parent_connectable_interface->disconnect(connectable); /* empty */ } gboolean ags_ipatch_check_suffix(gchar *filename) { if(g_str_has_suffix(filename, ".sf2") || g_str_has_suffix(filename, ".dls") || g_str_has_suffix(filename, ".gig")){ return(TRUE); } return(FALSE); } gboolean ags_ipatch_open(AgsPlayable *playable, gchar *filename) { AgsIpatch *ipatch; #ifdef AGS_WITH_LIBINSTPATCH IpatchFileIOFuncs *io_funcs; #endif GError *error; #ifdef AGS_DEBUG g_message("open %s with libinstpatch.", filename); #endif ipatch = AGS_IPATCH(playable); ipatch->filename = filename; error = NULL; #ifdef AGS_WITH_LIBINSTPATCH ipatch->handle = ipatch_file_identify_open(ipatch->filename, &error); if(error != NULL){ g_warning("%s", error->message); } if(ipatch->handle == NULL){ return(FALSE); } if(IPATCH_IS_DLS_FILE(ipatch->handle->file)){ ipatch->flags |= AGS_IPATCH_DLS2; //TODO:JK: implement me }else if(g_str_has_suffix(filename, ".sf2")){ /* */ ipatch->flags |= AGS_IPATCH_SF2; /* */ ipatch->reader = (GObject *) ags_ipatch_sf2_reader_new(); AGS_IPATCH_SF2_READER(ipatch->reader)->ipatch = ipatch; AGS_IPATCH_SF2_READER(ipatch->reader)->reader = ipatch_sf2_reader_new(ipatch->handle); error = NULL; ipatch->base = (IpatchBase *) ipatch_sf2_reader_load(AGS_IPATCH_SF2_READER(ipatch->reader)->reader, &error); error = NULL; AGS_IPATCH_SF2_READER(ipatch->reader)->sf2 = (IpatchSF2 *) ipatch_convert_object_to_type((GObject *) ipatch->handle->file, IPATCH_TYPE_SF2, &error); if(error != NULL){ g_warning("%s", error->message); } /* load samples */ ipatch->samples = (IpatchList *) ipatch_container_get_children(IPATCH_CONTAINER(ipatch->base), IPATCH_TYPE_SF2_SAMPLE); while(g_static_rec_mutex_unlock_full(((IpatchItem *) (ipatch->base))->mutex) != 0); }else if(IPATCH_IS_GIG_FILE(ipatch->handle->file)){ ipatch->flags |= AGS_IPATCH_GIG; //TODO:JK: implement me } #endif if(error == NULL){ return(TRUE); }else{ return(FALSE); } } guint ags_ipatch_nth_level(AgsPlayable *playable) { AgsIpatch *ipatch; ipatch = AGS_IPATCH(playable); return(ipatch->nth_level); } guint ags_ipatch_level_count(AgsPlayable *playable) { AgsIpatch *ipatch; ipatch = AGS_IPATCH(playable); if((AGS_IPATCH_DLS2 & (ipatch->flags)) != 0){ return(4); }else if((AGS_IPATCH_SF2 & (ipatch->flags)) != 0){ return(4); }else if((AGS_IPATCH_GIG & (ipatch->flags)) != 0){ return(4); } return(0); } gchar** ags_ipatch_sublevel_names(AgsPlayable *playable) { AgsIpatch *ipatch; AgsIpatchSF2Reader *ipatch_sf2_reader; #ifdef AGS_WITH_LIBINSTPATCH IpatchItem *ipatch_item; IpatchList *ipatch_list; #endif GList *list; gchar **names; gchar *name; guint sublevel; guint i; ipatch = AGS_IPATCH(playable); list = NULL; names = (gchar **) malloc(1 * sizeof(gchar*)); names[0] = NULL; #ifdef AGS_WITH_LIBINSTPATCH if((AGS_IPATCH_SF2 & (ipatch->flags)) != 0){ ipatch_sf2_reader = AGS_IPATCH_SF2_READER(ipatch->reader); sublevel = ipatch->nth_level; switch(sublevel){ case AGS_SF2_FILENAME: { names = realloc(names, 2 * sizeof(char*)); names[0] = ipatch_sf2_reader->ipatch->filename; names[1] = NULL; return(names); } case AGS_SF2_PHDR: { ipatch_list = ipatch_container_get_children(IPATCH_CONTAINER(ipatch_sf2_reader->sf2), IPATCH_TYPE_SF2_PRESET); while(g_static_rec_mutex_unlock_full(((IpatchItem *) (ipatch_sf2_reader->sf2))->mutex) != 0); if(ipatch_list != NULL){ list = ipatch_list->items; }else{ return(names); } } break; case AGS_SF2_IHDR: { GList *tmp; ipatch_list = ipatch_sf2_preset_get_zones(ipatch_sf2_reader->preset); tmp = ipatch_list->items; while(tmp != NULL){ list = g_list_prepend(list, ipatch_sf2_zone_get_link_item(IPATCH_SF2_ZONE(tmp->data))); tmp = tmp->next; } if(list != NULL){ list = g_list_reverse(list); }else{ return(names); } } break; case AGS_SF2_SHDR: { GList *tmp; ipatch_list = ipatch_sf2_preset_get_zones(ipatch_sf2_reader->instrument); tmp = ipatch_list->items; while(tmp != NULL){ list = g_list_prepend(list, ipatch_sf2_zone_get_link_item(IPATCH_SF2_ZONE(tmp->data))); tmp = tmp->next; } if(list != NULL){ list = g_list_reverse(list); }else{ return(names); } } break; }; } for(i = 0; list != NULL; i++){ switch(sublevel){ case AGS_SF2_PHDR: { if(IPATCH_IS_SF2_PRESET(list->data)){ names = (gchar **) realloc(names, (i + 2) * sizeof(char*)); names[i] = ipatch_sf2_preset_get_name(IPATCH_SF2_PRESET(list->data)); } } break; case AGS_SF2_IHDR: { if(IPATCH_IS_SF2_INST(list->data)){ names = (gchar **) realloc(names, (i + 2) * sizeof(char*)); names[i] = ipatch_sf2_inst_get_name(IPATCH_SF2_INST(list->data)); } } break; case AGS_SF2_SHDR: { if(IPATCH_IS_SF2_SAMPLE(list->data)){ names = (gchar **) realloc(names, (i + 2) * sizeof(char*)); names[i] = ipatch_sf2_sample_get_name(IPATCH_SF2_SAMPLE(list->data)); } } break; }; list = list->next; } #endif if(i > 0){ names[i] = NULL; } return(names); } void ags_ipatch_level_select(AgsPlayable *playable, guint nth_level, gchar *sublevel_name, GError **error) { AgsIpatch *ipatch; AgsIpatchSF2Reader *ipatch_sf2_reader; gboolean success; GError *this_error; ipatch = AGS_IPATCH(playable); #ifdef AGS_WITH_LIBINSTPATCH if((AGS_IPATCH_SF2 & (ipatch->flags)) != 0){ ipatch_sf2_reader = AGS_IPATCH_SF2_READER(ipatch->reader); //TODO:JK: apply mods and gens if(sublevel_name == NULL){ ipatch->nth_level = 0; ipatch_sf2_reader->selected[0] = NULL; }else{ IpatchList *ipatch_list; IpatchItem *ipatch_item; GList *list; if(nth_level == 0 && !g_strcmp0(ipatch_sf2_reader->ipatch->filename, sublevel_name)){ ipatch->nth_level = 0; if(ipatch_sf2_reader->selected[0] != NULL){ g_free(ipatch_sf2_reader->selected[0]); } ipatch_sf2_reader->selected[0] = g_strdup(sublevel_name); return; } if(nth_level == 1){ ipatch->nth_level = 1; if(ipatch_sf2_reader->selected[1] != NULL){ g_free(ipatch_sf2_reader->selected[1]); } ipatch_sf2_reader->selected[1] = g_strdup(sublevel_name); /* preset */ ipatch_list = ipatch_container_get_children(IPATCH_CONTAINER(ipatch_sf2_reader->sf2), IPATCH_TYPE_SF2_PRESET); while(g_static_rec_mutex_unlock_full(((IpatchItem *) (ipatch_sf2_reader->sf2))->mutex) != 0); if(ipatch_list == NULL){ ipatch->iter = NULL; return; } list = ipatch_list->items; while(list != NULL){ if(!g_strcmp0(ipatch_sf2_preset_get_name(IPATCH_SF2_PRESET(list->data)), sublevel_name)){ /* some extra code for bank and program */ // ipatch_sf2_preset_get_midi_locale(IPATCH_SF2_PRESET(list->data), // &(ipatch_sf2_reader->bank), // &(ipatch_sf2_reader->program)); // g_message("bank %d program %d\n", ipatch_sf2_reader->bank, ipatch_sf2_reader->program); this_error = NULL; ipatch_sf2_reader->preset = (IpatchContainer *) IPATCH_SF2_PRESET(list->data); break; } list = list->next; } ipatch->iter = list; }else{ if(nth_level == 2){ GList *tmp; ipatch->nth_level = 2; if(ipatch_sf2_reader->selected[2] != NULL){ g_free(ipatch_sf2_reader->selected[2]); } ipatch_sf2_reader->selected[2] = g_strdup(sublevel_name); /* instrument */ ipatch_list = ipatch_sf2_preset_get_zones(ipatch_sf2_reader->preset); if(ipatch_list == NULL){ ipatch->iter = NULL; return; } list = NULL; tmp = ipatch_list->items; while(tmp != NULL){ list = g_list_prepend(list, ipatch_sf2_zone_get_link_item(IPATCH_SF2_ZONE(tmp->data))); if(!g_strcmp0(IPATCH_SF2_INST(list->data)->name, sublevel_name)){ ipatch_sf2_reader->instrument = (IpatchContainer *) IPATCH_SF2_INST(list->data); } tmp = tmp->next; } ipatch->iter = g_list_reverse(list); }else if(ipatch->nth_level == 3){ GList *tmp; ipatch->nth_level = 3; if(ipatch_sf2_reader->selected[3] != NULL){ g_free(ipatch_sf2_reader->selected[3]); } ipatch_sf2_reader->selected[3] = g_strdup(sublevel_name); /* sample */ ipatch_list = ipatch_sf2_preset_get_zones(ipatch_sf2_reader->instrument); if(ipatch_list == NULL){ ipatch->iter = NULL; return; } list = NULL; tmp = ipatch_list->items; while(tmp != NULL){ list = g_list_prepend(list, ipatch_sf2_zone_get_link_item(IPATCH_SF2_ZONE(tmp->data))); if(!g_ascii_strcasecmp(IPATCH_SF2_SAMPLE(list->data)->name, sublevel_name)){ ipatch_sf2_reader->sample = (IpatchContainer *) IPATCH_SF2_SAMPLE(list->data); } tmp = tmp->next; } ipatch->iter = g_list_reverse(list); }else{ g_set_error(error, AGS_PLAYABLE_ERROR, AGS_PLAYABLE_ERROR_NO_SUCH_LEVEL, "no level called %s in soundfont2 file: %s", sublevel_name, ipatch_sf2_reader->ipatch->filename); } } } } #endif } void ags_ipatch_level_up(AgsPlayable *playable, guint levels, GError **error) { AgsIpatch *ipatch; guint i; if(levels == 0) return; ipatch = AGS_IPATCH(playable); if(ipatch->nth_level >= levels){ ipatch->nth_level -= levels; }else{ g_set_error(error, AGS_PLAYABLE_ERROR, AGS_PLAYABLE_ERROR_NO_SUCH_LEVEL, "Not able to go %u steps higher in soundfont2 file: %s", levels, ipatch->filename); } } void ags_ipatch_iter_start(AgsPlayable *playable) { AgsIpatch *ipatch; ipatch = AGS_IPATCH(playable); if(ipatch->nth_level == 3){ if((AGS_IPATCH_DLS2 & (ipatch->flags)) != 0){ //TODO:JK: implement me }else if((AGS_IPATCH_SF2 & (ipatch->flags)) != 0){ //TODO:JK: implement me }else if((AGS_IPATCH_GIG & (ipatch->flags)) != 0){ //TODO:JK: implement me } } } gboolean ags_ipatch_iter_next(AgsPlayable *playable) { AgsIpatch *ipatch; ipatch = AGS_IPATCH(playable); if(ipatch->iter != NULL){ ipatch->iter = ipatch->iter->next; return(TRUE); }else{ return(FALSE); } } void ags_ipatch_info(AgsPlayable *playable, guint *channels, guint *frames, guint *loop_start, guint *loop_end, GError **error) { AgsIpatch *ipatch; #ifdef AGS_WITH_LIBINSTPATCH IpatchSample *sample; #endif ipatch = AGS_IPATCH(playable); if(ipatch->iter == NULL){ if(channels != NULL){ *channels = 0; } if(frames != NULL){ *frames = 0; } if(loop_start != NULL){ *loop_start = 0; } if(loop_end != NULL){ *loop_end = 0; } if(error != NULL){ g_set_error(error, AGS_PLAYABLE_ERROR, AGS_PLAYABLE_ERROR_NO_SAMPLE, "no sample selected for file: %s", ipatch->filename); } return; } #ifdef AGS_WITH_LIBINSTPATCH sample = IPATCH_SAMPLE(ipatch->iter->data); g_object_get(G_OBJECT(sample), "sample-size", frames, "loop-start", loop_start, "loop-end", loop_end, NULL); #endif //TODO:JK: verify me if(channels != NULL){ *channels = AGS_IPATCH_DEFAULT_CHANNELS; } } guint ags_ipatch_get_samplerate(AgsPlayable *playable) { AgsIpatch *ipatch; #ifdef AGS_WITH_LIBINSTPATCH IpatchSample *sample; #endif guint samplerate; ipatch = AGS_IPATCH(playable); samplerate = 0; #ifdef AGS_WITH_LIBINSTPATCH if(ipatch->nth_level == 3){ if(ipatch->iter != NULL){ sample = IPATCH_SAMPLE(ipatch->iter->data); }else{ sample = NULL; } }else{ sample = NULL; if((AGS_IPATCH_DLS2 & (ipatch->flags)) != 0){ //TODO:JK: implement me }else if((AGS_IPATCH_SF2 & (ipatch->flags)) != 0){ AgsIpatchSF2Reader *reader; reader = AGS_IPATCH_SF2_READER(ipatch->reader); sample = (IpatchSample *) ipatch_sf2_find_sample(reader->sf2, reader->selected[3], NULL); }else if((AGS_IPATCH_GIG & (ipatch->flags)) != 0){ //TODO:JK: implement me } } g_object_get(sample, "sample-rate", &samplerate, NULL); #endif return(samplerate); } guint ags_ipatch_get_format(AgsPlayable *playable) { AgsIpatch *ipatch; #ifdef AGS_WITH_LIBINSTPATCH IpatchSample *sample; #endif guint format; ipatch = AGS_IPATCH(playable); #ifdef AGS_WITH_LIBINSTPATCH sample = NULL; if(ipatch->nth_level == 3){ if(ipatch->iter != NULL){ sample = IPATCH_SAMPLE(ipatch->iter->data); } }else{ if((AGS_IPATCH_DLS2 & (ipatch->flags)) != 0){ //TODO:JK: implement me }else if((AGS_IPATCH_SF2 & (ipatch->flags)) != 0){ AgsIpatchSF2Reader *reader; reader = AGS_IPATCH_SF2_READER(ipatch->reader); sample = (IpatchSample *) ipatch_sf2_find_sample(reader->sf2, reader->selected[3], NULL); }else if((AGS_IPATCH_GIG & (ipatch->flags)) != 0){ //TODO:JK: implement me } } format = 0; if(sample != NULL){ g_object_get(sample, "sample-format", &format, NULL); } switch(format){ case IPATCH_SAMPLE_8BIT: return(AGS_AUDIO_BUFFER_UTIL_S8); case IPATCH_SAMPLE_16BIT: return(AGS_AUDIO_BUFFER_UTIL_S16); case IPATCH_SAMPLE_24BIT: return(AGS_AUDIO_BUFFER_UTIL_S24); case IPATCH_SAMPLE_32BIT: return(AGS_AUDIO_BUFFER_UTIL_S32); case IPATCH_SAMPLE_FLOAT: return(AGS_AUDIO_BUFFER_UTIL_FLOAT); case IPATCH_SAMPLE_DOUBLE: return(AGS_AUDIO_BUFFER_UTIL_DOUBLE); default: g_warning("ags_ipatch_get_format() - unknown format"); return(0); } #else return(0); #endif } double* ags_ipatch_read(AgsPlayable *playable, guint channel, GError **error) { AgsIpatch *ipatch; #ifdef AGS_WITH_LIBINSTPATCH IpatchSample *sample; #endif double *buffer, *source; guint channels, frames; guint loop_start, loop_end; guint i; GError *this_error; ipatch = AGS_IPATCH(playable); this_error = NULL; ags_playable_info(playable, &channels, &frames, &loop_start, &loop_end, &this_error); if(this_error != NULL){ g_warning("%s", this_error->message); } if(channels == 0 || frames == 0){ buffer = NULL; }else{ buffer = (double *) malloc(channels * frames * sizeof(double)); } #ifdef AGS_WITH_LIBINSTPATCH if(ipatch->nth_level == 3){ if(AGS_IPATCH_SF2_READER(ipatch->reader)->sample != NULL){ sample = AGS_IPATCH_SF2_READER(ipatch->reader)->sample; }else{ if(ipatch->iter != NULL){ sample = IPATCH_SAMPLE(ipatch->iter->data); }else{ sample = NULL; } } }else{ sample = NULL; if((AGS_IPATCH_DLS2 & (ipatch->flags)) != 0){ //TODO:JK: implement me }else if((AGS_IPATCH_SF2 & (ipatch->flags)) != 0){ AgsIpatchSF2Reader *reader; reader = AGS_IPATCH_SF2_READER(ipatch->reader); this_error = NULL; sample = (IpatchSample *) ipatch_sf2_find_sample(reader->sf2, reader->selected[3], NULL); }else if((AGS_IPATCH_GIG & (ipatch->flags)) != 0){ //TODO:JK: implement me } } this_error = NULL; ipatch_sample_read_transform(sample, 0, frames, buffer, IPATCH_SAMPLE_DOUBLE | IPATCH_SAMPLE_MONO, IPATCH_SAMPLE_UNITY_CHANNEL_MAP, &this_error); if(this_error != NULL){ g_warning("%s", this_error->message); } #endif return(buffer); } int* ags_ipatch_read_int(AgsPlayable *playable, guint channel, GError **error) { AgsIpatch *ipatch; #ifdef AGS_WITH_LIBINSTPATCH IpatchSample *sample; #endif int *buffer; gint32 *source; guint channels, frames; guint loop_start, loop_end; guint i; GError *this_error; ipatch = AGS_IPATCH(playable); this_error = NULL; ags_playable_info(playable, &channels, &frames, &loop_start, &loop_end, &this_error); if(this_error != NULL){ g_warning("%s", this_error->message); } if(channels == 0 || frames == 0){ source = NULL; }else{ source = (gint32 *) malloc(channels * frames * sizeof(gint32)); } #ifdef AGS_WITH_LIBINSTPATCH if(ipatch->nth_level == 3){ if(AGS_IPATCH_SF2_READER(ipatch->reader)->sample != NULL){ sample = AGS_IPATCH_SF2_READER(ipatch->reader)->sample; }else{ if(ipatch->iter != NULL){ sample = IPATCH_SAMPLE(ipatch->iter->data); }else{ sample = NULL; } } }else{ sample = NULL; if((AGS_IPATCH_DLS2 & (ipatch->flags)) != 0){ //TODO:JK: implement me }else if((AGS_IPATCH_SF2 & (ipatch->flags)) != 0){ AgsIpatchSF2Reader *reader; reader = AGS_IPATCH_SF2_READER(ipatch->reader); this_error = NULL; sample = (IpatchSample *) ipatch_sf2_find_sample(reader->sf2, reader->selected[3], NULL); }else if((AGS_IPATCH_GIG & (ipatch->flags)) != 0){ //TODO:JK: implement me } } this_error = NULL; ipatch_sample_read_transform(sample, 0, frames, source, IPATCH_SAMPLE_32BIT | IPATCH_SAMPLE_MONO, IPATCH_SAMPLE_UNITY_CHANNEL_MAP, &this_error); if(this_error != NULL){ g_warning("%s", this_error->message); } #endif if(sizeof(int) == 8){ if(channels == 0 || frames == 0){ buffer = NULL; }else{ buffer = (int *) malloc(channels * frames * sizeof(int)); ags_audio_buffer_util_clear_buffer(buffer, 1, frames, AGS_AUDIO_BUFFER_UTIL_S64); ags_audio_buffer_util_copy_s32_to_s64(buffer, 1, source, 1, frames); free(source); } }else{ buffer = source; } return(buffer); } void ags_ipatch_close(AgsPlayable *playable) { /* empty */ } void ags_ipatch_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_ipatch_parent_class)->finalize(gobject); /* empty */ } /** * ags_ipatch_new: * * Creates an #AgsIpatch. * * Returns: an empty #AgsIpatch. * * Since: 1.0.0 */ AgsIpatch* ags_ipatch_new() { AgsIpatch *ipatch; ipatch = (AgsIpatch *) g_object_new(AGS_TYPE_IPATCH, NULL); return(ipatch); } gsequencer-1.4.24/ags/audio/file/ags_sndfile.c0000644000175000017500000004145613256224345016120 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_sndfile_class_init(AgsSndfileClass *sndfile); void ags_sndfile_connectable_interface_init(AgsConnectableInterface *connectable); void ags_sndfile_playable_interface_init(AgsPlayableInterface *playable); void ags_sndfile_init(AgsSndfile *sndfile); void ags_sndfile_finalize(GObject *gobject); void ags_sndfile_connect(AgsConnectable *connectable); void ags_sndfile_disconnect(AgsConnectable *connectable); gboolean ags_sndfile_open(AgsPlayable *playable, gchar *name); gboolean ags_sndfile_rw_open(AgsPlayable *playable, gchar *name, gboolean create, guint samplerate, guint channels, guint frames, guint format); guint ags_sndfile_level_count(AgsPlayable *playable); gchar** ags_sndfile_sublevel_names(AgsPlayable *playable); void ags_sndfile_iter_start(AgsPlayable *playable); gboolean ags_sndfile_iter_next(AgsPlayable *playable); void ags_sndfile_info(AgsPlayable *playable, guint *channels, guint *frames, guint *loop_start, guint *loop_end, GError **error); guint ags_sndfile_get_samplerate(AgsPlayable *playable); guint ags_sndfile_get_format(AgsPlayable *playable); double* ags_sndfile_read(AgsPlayable *playable, guint channel, GError **error); int* ags_sndfile_read_int(AgsPlayable *playable, guint channel, GError **error); void ags_sndfile_write(AgsPlayable *playable, double *buffer, guint buffer_length); void ags_sndfile_write_int(AgsPlayable *playable, int *buffer, guint buffer_length); void ags_sndfile_flush(AgsPlayable *playable); void ags_sndfile_seek(AgsPlayable *playable, guint frames, gint whence); void ags_sndfile_close(AgsPlayable *playable); sf_count_t ags_sndfile_vio_get_filelen(void *user_data); sf_count_t ags_sndfile_vio_seek(sf_count_t offset, int whence, void *user_data); sf_count_t ags_sndfile_vio_read(void *ptr, sf_count_t count, void *user_data); sf_count_t ags_sndfile_vio_write(const void *ptr, sf_count_t count, void *user_data); sf_count_t ags_sndfile_vio_tell(const void *ptr, sf_count_t count, void *user_data); /** * SECTION:ags_sndfile * @short_description: Libsndfile wrapper * @title: AgsSndfile * @section_id: * @include: ags/audio/file/ags_sndfile.h * * #AgsSndfile is the base object to ineract with libsndfile. */ static gpointer ags_sndfile_parent_class = NULL; static AgsConnectableInterface *ags_sndfile_parent_connectable_interface; static AgsPlayableInterface *ags_sndfile_parent_playable_interface; static SF_VIRTUAL_IO *ags_sndfile_virtual_io = NULL; GType ags_sndfile_get_type() { static GType ags_type_sndfile = 0; if(!ags_type_sndfile){ static const GTypeInfo ags_sndfile_info = { sizeof (AgsSndfileClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_sndfile_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSndfile), 0, /* n_preallocs */ (GInstanceInitFunc) ags_sndfile_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_sndfile_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_playable_interface_info = { (GInterfaceInitFunc) ags_sndfile_playable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_sndfile = g_type_register_static(G_TYPE_OBJECT, "AgsSndfile", &ags_sndfile_info, 0); g_type_add_interface_static(ags_type_sndfile, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_sndfile, AGS_TYPE_PLAYABLE, &ags_playable_interface_info); } return (ags_type_sndfile); } void ags_sndfile_class_init(AgsSndfileClass *sndfile) { GObjectClass *gobject; ags_sndfile_parent_class = g_type_class_peek_parent(sndfile); gobject = (GObjectClass *) sndfile; gobject->finalize = ags_sndfile_finalize; /* sndfile callbacks */ if(ags_sndfile_virtual_io == NULL){ ags_sndfile_virtual_io = (SF_VIRTUAL_IO *) malloc(sizeof(SF_VIRTUAL_IO)); ags_sndfile_virtual_io->get_filelen = ags_sndfile_vio_get_filelen; ags_sndfile_virtual_io->seek = ags_sndfile_vio_seek; ags_sndfile_virtual_io->read = ags_sndfile_vio_read; ags_sndfile_virtual_io->write = ags_sndfile_vio_write; ags_sndfile_virtual_io->tell = ags_sndfile_vio_tell; } } void ags_sndfile_connectable_interface_init(AgsConnectableInterface *connectable) { ags_sndfile_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_sndfile_connect; connectable->disconnect = ags_sndfile_disconnect; } void ags_sndfile_playable_interface_init(AgsPlayableInterface *playable) { ags_sndfile_parent_playable_interface = g_type_interface_peek_parent(playable); playable->open = ags_sndfile_open; playable->rw_open = ags_sndfile_rw_open; playable->level_count = ags_sndfile_level_count; playable->sublevel_names = ags_sndfile_sublevel_names; playable->level_select = NULL; playable->iter_start = ags_sndfile_iter_start; playable->iter_next = ags_sndfile_iter_next; playable->info = ags_sndfile_info; playable->get_samplerate = ags_sndfile_get_samplerate; playable->get_format = ags_sndfile_get_format; playable->read = ags_sndfile_read; playable->read_int = ags_sndfile_read_int; playable->write = ags_sndfile_write; playable->write_int = ags_sndfile_write_int; playable->flush = ags_sndfile_flush; playable->seek = ags_sndfile_seek; playable->close = ags_sndfile_close; } void ags_sndfile_init(AgsSndfile *sndfile) { sndfile->flags = 0; sndfile->info = NULL; sndfile->file = NULL; sndfile->pointer = NULL; sndfile->current = NULL; sndfile->length = 0; sndfile->buffer = NULL; } void ags_sndfile_connect(AgsConnectable *connectable) { ags_sndfile_parent_connectable_interface->connect(connectable); /* empty */ } void ags_sndfile_disconnect(AgsConnectable *connectable) { ags_sndfile_parent_connectable_interface->disconnect(connectable); /* empty */ } gboolean ags_sndfile_open(AgsPlayable *playable, gchar *name) { AgsSndfile *sndfile; sndfile = AGS_SNDFILE(playable); sndfile->info = (SF_INFO *) malloc(sizeof(SF_INFO)); sndfile->info->format = 0; sndfile->info->channels = 0; sndfile->info->samplerate = 0; if((AGS_SNDFILE_VIRTUAL & (sndfile->flags)) == 0){ if(name != NULL){ sndfile->file = (SNDFILE *) sf_open(name, SFM_READ, sndfile->info); } }else{ sndfile->file = (SNDFILE *) sf_open_virtual(ags_sndfile_virtual_io, SFM_READ, sndfile->info, sndfile); } #ifdef AGS_DEBUG g_message("ags_sndfile_open(): channels %d frames %d", sndfile->info->channels, sndfile->info->frames); #endif if(sndfile->file == NULL){ return(FALSE); }else{ return(TRUE); } } gboolean ags_sndfile_rw_open(AgsPlayable *playable, gchar *name, gboolean create, guint samplerate, guint channels, guint frames, guint format) { AgsSndfile *sndfile; // sf_count_t multi_frames; sndfile = AGS_SNDFILE(playable); sndfile->info = (SF_INFO *) malloc(sizeof(SF_INFO)); sndfile->info->samplerate = (int) samplerate; sndfile->info->channels = (int) channels; sndfile->info->format = (int) format; sndfile->info->frames = 0; sndfile->info->seekable = 0; sndfile->info->sections = 0; g_message("export to: %s\n samplerate: %d\n channels: %d\n format: %x", name, samplerate, channels, format); if(!sf_format_check(sndfile->info)){ g_warning("invalid format"); } if((AGS_SNDFILE_VIRTUAL & (sndfile->flags)) == 0){ if(name != NULL){ sndfile->file = (SNDFILE *) sf_open(name, SFM_RDWR, sndfile->info); } }else{ sndfile->file = (SNDFILE *) sf_open_virtual(ags_sndfile_virtual_io, SFM_RDWR, sndfile->info, sndfile); } // multi_frames = frames * sndfile->info->channels; // sf_command(sndfile->file, SFC_FILE_TRUNCATE, &(multi_frames), sizeof(multi_frames)); // sf_command (sndfile, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_TRUE); // sf_seek(sndfile->file, 0, SEEK_SET); // sndfile->info->frames = multi_frames; if(sndfile->file == NULL){ return(FALSE); }else{ return(TRUE); } } guint ags_sndfile_level_count(AgsPlayable *playable) { return(1); } gchar** ags_sndfile_sublevel_names(AgsPlayable *playable) { return(NULL); } void ags_sndfile_iter_start(AgsPlayable *playable) { AgsSndfile *sndfile; sndfile = AGS_SNDFILE(playable); sndfile->flags |= AGS_SNDFILE_ITER_START; } gboolean ags_sndfile_iter_next(AgsPlayable *playable) { AgsSndfile *sndfile; sndfile = AGS_SNDFILE(playable); if((AGS_SNDFILE_ITER_START & (sndfile->flags)) != 0){ sndfile->flags &= (~AGS_SNDFILE_ITER_START); return(TRUE); }else{ return(FALSE); } } void ags_sndfile_info(AgsPlayable *playable, guint *channels, guint *frames, guint *loop_start, guint *loop_end, GError **error) { AgsSndfile *sndfile; sndfile = AGS_SNDFILE(playable); *channels = sndfile->info->channels; *frames = sndfile->info->frames; *loop_start = 0; *loop_end = 0; } guint ags_sndfile_get_samplerate(AgsPlayable *playable) { AgsSndfile *sndfile; sndfile = AGS_SNDFILE(playable); return(sndfile->info->samplerate); } guint ags_sndfile_get_format(AgsPlayable *playable) { AgsSndfile *sndfile; sndfile = AGS_SNDFILE(playable); switch(((SF_FORMAT_PCM_S8 | SF_FORMAT_PCM_16 | SF_FORMAT_PCM_24 | SF_FORMAT_PCM_32 | SF_FORMAT_FLOAT | SF_FORMAT_DOUBLE ) & sndfile->info->format)){ case SF_FORMAT_PCM_S8: return(AGS_AUDIO_BUFFER_UTIL_S8); case SF_FORMAT_PCM_16: return(AGS_AUDIO_BUFFER_UTIL_S16); case SF_FORMAT_PCM_24: return(AGS_AUDIO_BUFFER_UTIL_S24); case SF_FORMAT_PCM_32: return(AGS_AUDIO_BUFFER_UTIL_S32); case SF_FORMAT_FLOAT: return(AGS_AUDIO_BUFFER_UTIL_FLOAT); case SF_FORMAT_DOUBLE: return(AGS_AUDIO_BUFFER_UTIL_DOUBLE); default: g_warning("ags_sndfile_get_format() - unknown format"); return(0); } } double* ags_sndfile_read(AgsPlayable *playable, guint channel, GError **error) { AgsSndfile *sndfile; double *buffer, *source; guint i; guint num_read; sndfile = AGS_SNDFILE(playable); if(sndfile->buffer == NULL){ sndfile->buffer = source = (double *) malloc((size_t) sndfile->info->channels * sndfile->info->frames * sizeof(double)); ags_audio_buffer_util_clear_double(source, sndfile->info->channels, sndfile->info->frames); //FIXME:JK: work-around comment me out // sf_seek(sndfile->file, 0, SEEK_SET); num_read = sf_read_double(sndfile->file, source, sndfile->info->frames * sndfile->info->channels); if(num_read != sndfile->info->frames * sndfile->info->channels){ g_warning("ags_sndfile_read(): read to many items"); } }else{ source = sndfile->buffer; } if(sndfile->info->frames != 0){ buffer = (double *) malloc((size_t) sndfile->info->frames * sizeof(double)); ags_audio_buffer_util_clear_double(buffer, 1, sndfile->info->frames); ags_audio_buffer_util_copy_double_to_double(buffer, 1, &(source[channel]), sndfile->info->channels, sndfile->info->frames); }else{ buffer = NULL; } return(buffer); } int* ags_sndfile_read_int(AgsPlayable *playable, guint channel, GError **error) { AgsSndfile *sndfile; int *buffer, *source; guint i; guint num_read; sndfile = AGS_SNDFILE(playable); if(sndfile->buffer == NULL){ sndfile->buffer = source = (int *) malloc((size_t) sndfile->info->channels * sndfile->info->frames * sizeof(int)); if(sizeof(int) == 8){ ags_audio_buffer_util_clear_buffer(source, sndfile->info->channels, sndfile->info->frames, AGS_AUDIO_BUFFER_UTIL_S64); }else{ ags_audio_buffer_util_clear_buffer(source, sndfile->info->channels, sndfile->info->frames, AGS_AUDIO_BUFFER_UTIL_S32); } //FIXME:JK: work-around comment me out // sf_seek(sndfile->file, 0, SEEK_SET); num_read = sf_read_int(sndfile->file, source, sndfile->info->frames * sndfile->info->channels); if(num_read != sndfile->info->frames * sndfile->info->channels){ g_warning("ags_sndfile_read(): read to many items"); } }else{ source = sndfile->buffer; } if(sndfile->info->frames != 0){ buffer = (int *) malloc((size_t) sndfile->info->frames * sizeof(int)); if(sizeof(int) == 8){ ags_audio_buffer_util_clear_buffer(buffer, 1, sndfile->info->frames, AGS_AUDIO_BUFFER_UTIL_S64); }else{ ags_audio_buffer_util_clear_buffer(buffer, 1, sndfile->info->frames, AGS_AUDIO_BUFFER_UTIL_S32); } if(sizeof(int) == 8){ ags_audio_buffer_util_copy_s64_to_s64(buffer, 1, &(source[channel]), sndfile->info->channels, sndfile->info->frames); }else{ ags_audio_buffer_util_copy_s32_to_s32(buffer, 1, &(source[channel]), sndfile->info->channels, sndfile->info->frames); } }else{ buffer = NULL; } return(buffer); } void ags_sndfile_write(AgsPlayable *playable, double *buffer, guint buffer_length) { AgsSndfile *sndfile; sf_count_t multi_frames, retval; sndfile = AGS_SNDFILE(playable); multi_frames = buffer_length * sndfile->info->channels; retval = sf_write_double(sndfile->file, buffer, multi_frames); if(retval > multi_frames){ g_warning("retval > multi_frames"); // sf_seek(sndfile->file, (multi_frames - retval), SEEK_CUR); } } void ags_sndfile_write_int(AgsPlayable *playable, int *buffer, guint buffer_length) { AgsSndfile *sndfile; sf_count_t multi_frames, retval; sndfile = AGS_SNDFILE(playable); multi_frames = buffer_length * sndfile->info->channels * sizeof(int); retval = sf_write_int(sndfile->file, buffer, multi_frames); if(retval > multi_frames){ g_warning("retval > multi_frames"); // sf_seek(sndfile->file, (multi_frames - retval), SEEK_CUR); } } void ags_sndfile_flush(AgsPlayable *playable) { AgsSndfile *sndfile; sndfile = AGS_SNDFILE(playable); sf_write_sync(sndfile->file); } void ags_sndfile_seek(AgsPlayable *playable, guint frames, gint whence) { AgsSndfile *sndfile; sndfile = AGS_SNDFILE(playable); sf_seek(sndfile->file, frames, whence); } void ags_sndfile_close(AgsPlayable *playable) { AgsSndfile *sndfile; sndfile = AGS_SNDFILE(playable); sf_close(sndfile->file); free(sndfile->info); } void ags_sndfile_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_sndfile_parent_class)->finalize(gobject); /* empty */ } sf_count_t ags_sndfile_vio_get_filelen(void *user_data) { return(AGS_SNDFILE(user_data)->length); } sf_count_t ags_sndfile_vio_seek(sf_count_t offset, int whence, void *user_data) { switch(whence){ case SEEK_CUR: AGS_SNDFILE(user_data)->current += offset; break; case SEEK_SET: AGS_SNDFILE(user_data)->current = &(AGS_SNDFILE(user_data)->pointer[offset]); break; case SEEK_END: AGS_SNDFILE(user_data)->current = &(AGS_SNDFILE(user_data)->pointer[AGS_SNDFILE(user_data)->length - offset]); break; } return(AGS_SNDFILE(user_data)->current - AGS_SNDFILE(user_data)->pointer); } sf_count_t ags_sndfile_vio_read(void *ptr, sf_count_t count, void *user_data) { guchar *retval; retval = memcpy(ptr, AGS_SNDFILE(user_data)->current, count * sizeof(guchar)); return(retval - AGS_SNDFILE(user_data)->pointer); } sf_count_t ags_sndfile_vio_write(const void *ptr, sf_count_t count, void *user_data) { guchar *retval; retval = memcpy(AGS_SNDFILE(user_data)->current, ptr, count * sizeof(guchar)); return(retval - AGS_SNDFILE(user_data)->pointer); } sf_count_t ags_sndfile_vio_tell(const void *ptr, sf_count_t count, void *user_data) { return(AGS_SNDFILE(user_data)->current - AGS_SNDFILE(user_data)->pointer); } /** * ags_sndfile_new: * * Creates an #AgsSndfile. * * Returns: an empty #AgsSndfile. * * Since: 1.0.0 */ AgsSndfile* ags_sndfile_new() { AgsSndfile *sndfile; sndfile = (AgsSndfile *) g_object_new(AGS_TYPE_SNDFILE, NULL); return(sndfile); } gsequencer-1.4.24/ags/audio/file/ags_audio_file_xml.c0000644000175000017500000041044613246707333017455 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define AGS_FILE_READ_PORT_LIST_PORT_RESOLVED_COUNTER "ags-file-read-port-list-port-resolved-counter" void ags_file_read_audio_resolve_soundcard(AgsFileLookup *file_lookup, AgsAudio *audio); void ags_file_write_audio_resolve_soundcard(AgsFileLookup *file_lookup, AgsAudio *audio); void ags_file_read_channel_resolve_link(AgsFileLookup *file_lookup, AgsChannel *channel); void ags_file_write_channel_resolve_link(AgsFileLookup *file_lookup, AgsChannel *channel); void ags_file_read_recall_container_resolve_value(AgsFileLookup *file_lookup, AgsRecallContainer *recall_container); void ags_file_read_recall_resolve_audio(AgsFileLookup *file_lookup, AgsRecall *recall); void ags_file_read_recall_resolve_channel(AgsFileLookup *file_lookup, AgsRecall *recall); void ags_file_read_recall_resolve_port(AgsFileLookup *file_lookup, AgsRecall *recall); void ags_file_read_recall_resolve_parameter(AgsFileLookup *file_lookup, AgsRecall *recall); void ags_file_read_recall_resolve_soundcard(AgsFileLookup *file_lookup, AgsRecall *recall); void ags_file_write_recall_resolve_soundcard(AgsFileLookup *file_lookup, AgsRecall *recall); void ags_file_read_pattern_resolve_port(AgsFileLookup *file_lookup, AgsPattern *pattern); void ags_file_write_pattern_resolve_port(AgsFileLookup *file_lookup, AgsPattern *pattern); void ags_file_read_notation_resolve_port(AgsFileLookup *file_lookup, AgsNotation *notation); void ags_file_write_notation_resolve_port(AgsFileLookup *file_lookup, AgsNotation *notation); void ags_file_read_automation_resolve_port(AgsFileLookup *file_lookup, AgsAutomation *automation); void ags_file_write_automation_resolve_port(AgsFileLookup *file_lookup, AgsAutomation *automation); void ags_file_read_port_resolve_port_value(AgsFileLookup *file_lookup, AgsPort *port); void ags_file_read_task_resolve_parameter(AgsFileLookup *file_lookup, AgsTask *task); void ags_file_read_soundcard(AgsFile *file, xmlNode *node, GObject **soundcard) { GObject *gobject; xmlNode *child; GList *audio; gchar *type_name; xmlChar *device_id; guint channels, samplerate, buffer_size, format; gdouble bpm; guint note_offset; if(*soundcard == NULL){ GType type; type_name = (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_TYPE_PROP); type = g_type_from_name(type_name); gobject = g_object_new(type, NULL); *soundcard = gobject; }else{ gobject = *soundcard; } g_object_set(gobject, "application-context", file->application_context, NULL); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* device */ device_id = xmlGetProp(node, (xmlChar *) "device"); ags_soundcard_set_device(AGS_SOUNDCARD(gobject), (gchar *) device_id); /* presets */ channels = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "channels"), NULL, 10); samplerate = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "samplerate"), NULL, 10); buffer_size = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "buffer-size"), NULL, 10); format = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "format"), NULL, 10); ags_soundcard_set_presets(AGS_SOUNDCARD(gobject), channels, samplerate, buffer_size, format); /* bpm */ bpm = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "bpm"), NULL); ags_soundcard_set_bpm(AGS_SOUNDCARD(gobject), bpm); /* note offset */ note_offset = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "note-offset"), NULL, 10); ags_soundcard_set_note_offset(AGS_SOUNDCARD(gobject), note_offset); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-audio-list", 15)){ audio = NULL; ags_file_read_audio_list(file, child, &audio); ags_soundcard_set_audio(AGS_SOUNDCARD(gobject), audio); while(audio != NULL){ g_object_set(G_OBJECT(audio->data), "soundcard", gobject, NULL); audio = audio->next; } } } child = child->next; } } xmlNode* ags_file_write_soundcard(AgsFile *file, xmlNode *parent, GObject *soundcard) { xmlNode *node; GList *audio; gchar *id; gchar *device_id; guint channels, samplerate, buffer_size, format; gdouble bpm; guint note_offset; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-soundcard"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", soundcard, NULL)); /* device */ device_id = ags_soundcard_get_device(AGS_SOUNDCARD(soundcard)); xmlNewProp(node, (xmlChar *) "device", (xmlChar *) device_id); /* presets */ ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), &channels, &samplerate, &buffer_size, &format); xmlNewProp(node, (xmlChar *) "channels", (xmlChar *) g_strdup_printf("%d", channels)); xmlNewProp(node, (xmlChar *) "samplerate", (xmlChar *) g_strdup_printf("%d", samplerate)); xmlNewProp(node, (xmlChar *) "buffer-size", (xmlChar *) g_strdup_printf("%d", buffer_size)); xmlNewProp(node, (xmlChar *) "format", (xmlChar *) g_strdup_printf("%d", format)); /* bpm */ bpm = ags_soundcard_get_bpm(AGS_SOUNDCARD(soundcard)); xmlNewProp(node, (xmlChar *) "bpm", (xmlChar *) g_strdup_printf("%f", bpm)); /* note offset */ note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(soundcard)); xmlNewProp(node, (xmlChar *) "note-offset", (xmlChar *) g_strdup_printf("%u", note_offset)); /* ags-audio-list */ audio = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); ags_file_write_audio_list(file, node, audio); xmlAddChild(parent, node); return(node); } void ags_file_read_soundcard_list(AgsFile *file, xmlNode *node, GList **soundcard) { GObject *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-soundcard", 11)){ current = NULL; ags_file_read_soundcard(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *soundcard = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_soundcard_list(AgsFile *file, xmlNode *parent, GList *soundcard) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-soundcard-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", soundcard, NULL)); xmlAddChild(parent, node); list = soundcard; while(list != NULL){ ags_file_write_soundcard(file, node, G_OBJECT(list->data)); list = list->next; } return(node); } void ags_file_read_playback(AgsFile *file, xmlNode *node, AgsPlayback **playback) { AgsPlayback *gobject; gchar *id; if(*playback == NULL){ gobject = ags_playback_new(); *playback = gobject; }else{ gobject = *playback; } id = (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->audio_channel = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "audio-channel"), NULL, 10); // read by parent call: play->source } xmlNode* ags_file_write_playback(AgsFile *file, xmlNode *parent, AgsPlayback *playback) { xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-playback"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", playback, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", playback->flags)); xmlNewProp(node, (xmlChar *) "audio-channel", (xmlChar *) g_strdup_printf("%d", playback->audio_channel)); // write by parent call: playback->source return(node); } void ags_file_read_playback_list(AgsFile *file, xmlNode *node, GList **play) { GList *list; AgsPlayback *current; xmlNode *child; gchar *id; id = (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-playback", 16)){ current = NULL; ags_file_read_playback(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *play = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_playback_list(AgsFile *file, xmlNode *parent, GList *play) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-playback-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", play, NULL)); xmlAddChild(parent, node); list = play; while(list != NULL){ ags_file_write_playback(file, node, AGS_PLAYBACK(list->data)); list = list->next; } return(node); } void ags_file_read_audio(AgsFile *file, xmlNode *node, AgsAudio **audio) { AgsAudio *gobject; AgsFileLookup *file_lookup; xmlNode *child; guint pads; if(audio[0] == NULL){ gobject = (AgsAudio *) g_object_new(AGS_TYPE_AUDIO, NULL); *audio = gobject; }else{ gobject = *audio; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->sequence_length = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "sequence-length"), NULL, 10); gobject->audio_channels = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "audio-channels"), NULL, 10); pads= (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "output-pads"), NULL, 10); ags_audio_set_pads(gobject, AGS_TYPE_OUTPUT, pads); pads = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "input-pads"), NULL, 10); ags_audio_set_pads(gobject, AGS_TYPE_INPUT, pads); /* soundcard */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_audio_resolve_soundcard), gobject); /* read child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-channel-list", 17)){ xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xpath_context = xmlXPathNewContext(file->doc); // xmlXPathSetContextNode(child, // xpath_context); xpath_context->node = child; xpath_object = xmlXPathEval((xmlChar *) "./ags-channel/ags-output", xpath_context); if(xmlXPathCastToBoolean(xpath_object)){ xmlNode *channel_node; channel_node = child->children; while(channel_node != NULL){ if(channel_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(channel_node->name, (xmlChar *) "ags-channel", 12)){ AgsChannel *channel; guint pad, audio_channel; pad = (guint) g_ascii_strtoull((gchar *) xmlGetProp(channel_node, (xmlChar *) "pad"), NULL, 10); audio_channel = (guint) g_ascii_strtoull((gchar *) xmlGetProp(channel_node, (xmlChar *) "audio-channel"), NULL, 10); channel = ags_channel_nth(gobject->output, pad * gobject->audio_channels + audio_channel); /* ags-channel output */ ags_file_read_channel(file, channel_node, &channel); g_object_set(channel, "audio", gobject, NULL); } } channel_node = channel_node->next; } }else{ xmlNode *channel_node; channel_node = child->children; while(channel_node != NULL){ if(channel_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(channel_node->name, (xmlChar *) "ags-channel", 12)){ AgsChannel *channel; guint pad, audio_channel; pad = (guint) g_ascii_strtoull((gchar *) xmlGetProp(channel_node, (xmlChar *) "pad"), NULL, 10); audio_channel = (guint) g_ascii_strtoull((gchar *) xmlGetProp(channel_node, (xmlChar *) "audio-channel"), NULL, 10); channel = ags_channel_nth(gobject->input, pad * gobject->audio_channels + audio_channel); /* ags-channel input */ ags_file_read_channel(file, channel_node, &channel); g_object_set(channel, "audio", gobject, NULL); } } channel_node = channel_node->next; } } }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-container-list", 26)){ ags_file_read_recall_container_list(file, child, &(gobject->container)); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-list", 15)){ GList *list; if(!xmlStrncmp(xmlGetProp(child, (xmlChar *) "is-play"), (xmlChar *) "TRUE", 4)){ /* ags-recall-list play */ ags_file_read_recall_list(file, child, &list); gobject->play = list; }else{ /* ags-recall-list recall */ ags_file_read_recall_list(file, child, &list); gobject->recall = list; } while(list != NULL){ g_object_ref(list->data); list = list->next; } }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-notation-list", 17)){ /* ags-notation-list */ ags_file_read_notation_list(file, child, &(gobject->notation)); } } child = child->next; } } void ags_file_read_audio_resolve_soundcard(AgsFileLookup *file_lookup, AgsAudio *audio) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) (gchar *) xmlGetProp(file_lookup->node, (xmlChar *) "soundcard"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref != NULL){ GObject *soundcard; AgsChannel *channel; AgsAudioSignal *audio_signal; soundcard = (GObject *) id_ref->ref; g_object_set(G_OBJECT(audio), "soundcard", soundcard, NULL); /* create output audio signal template */ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){ channel = audio->output; while(channel != NULL){ audio_signal = ags_audio_signal_new(soundcard, (GObject *) channel->first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(channel->first_recycling, audio_signal); channel = channel->next; } } /* create input audio signal template */ if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ channel = audio->input; while(channel != NULL){ audio_signal = ags_audio_signal_new(soundcard, (GObject *) channel->first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(channel->first_recycling, audio_signal); channel = channel->next; } } } } xmlNode* ags_file_write_audio(AgsFile *file, xmlNode *parent, AgsAudio *audio) { AgsFileLookup *file_lookup; AgsChannel *channel; xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-audio"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", audio, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", audio->flags)); xmlNewProp(node, (xmlChar *) "sequence-length", (xmlChar *) g_strdup_printf("%d", audio->sequence_length)); xmlNewProp(node, (xmlChar *) "audio-channels", (xmlChar *) g_strdup_printf("%d", audio->audio_channels)); xmlNewProp(node, (xmlChar *) "output-pads", (xmlChar *) g_strdup_printf("%d", audio->output_pads)); xmlNewProp(node, (xmlChar *) "input-pads", (xmlChar *) g_strdup_printf("%d", audio->input_pads)); /* soundcard */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", audio, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_audio_resolve_soundcard), audio); /* */ xmlAddChild(parent, node); /* child elements */ /* ags-channel-list output */ channel = audio->output; child = xmlNewNode(NULL, (xmlChar *) "ags-channel-list"); xmlAddChild(node, child); //TODO:JK: generate id and add id ref while(channel != NULL){ ags_file_write_channel(file, child, channel); channel = channel->next; } /* ags-channel-list input */ channel = audio->input; child = xmlNewNode(NULL, (xmlChar *) "ags-channel-list"); xmlAddChild(node, child); //TODO:JK: generate id and add id ref while(channel != NULL){ ags_file_write_channel(file, child, channel); channel = channel->next; } /* ags-recall-container */ ags_file_write_recall_container_list(file, node, audio->container); /* ags-recall-list play */ child = ags_file_write_recall_list(file, node, audio->play); xmlNewProp(child, (xmlChar *) "is-play", (xmlChar *) AGS_FILE_TRUE); /* ags-recall-list recall */ child = ags_file_write_recall_list(file, node, audio->recall); xmlNewProp(child, (xmlChar *) "is-play", (xmlChar *) AGS_FILE_FALSE); /* ags-notation-list */ ags_file_write_notation_list(file, node, audio->notation); return(node); } void ags_file_write_audio_resolve_soundcard(AgsFileLookup *file_lookup, AgsAudio *audio) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, audio->soundcard); id = (gchar *) xmlGetProp(id_ref->node, (xmlChar *) AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, (xmlChar *) "soundcard", (xmlChar *) g_strdup_printf("xpath=//ags-soundcard[@id='%s']", id)); } void ags_file_read_audio_list(AgsFile *file, xmlNode *node, GList **audio) { AgsAudio *current; GList *list; xmlNode *child; list = NULL; child = node->children; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-audio", 10)){ current = NULL; ags_file_read_audio(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *audio = list; } xmlNode* ags_file_write_audio_list(AgsFile *file, xmlNode *parent, GList *audio) { AgsAudio *current; GList *list; xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-audio-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", audio, NULL)); xmlAddChild(parent, node); list = audio; while(list != NULL){ ags_file_write_audio(file, node, AGS_AUDIO(list->data)); list = list->next; } return(node); } void ags_file_read_channel(AgsFile *file, xmlNode *node, AgsChannel **channel) { AgsChannel *gobject; AgsFileLookup *file_lookup; xmlNode *child; gboolean preset; guint pad, audio_channel; gboolean is_output; if(*channel == NULL){ xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; xpath_context = xmlXPathNewContext(file->doc); // xmlXPathSetContextNode(node, // xpath_context); xpath_context->node = node; xpath_object = xmlXPathEval((xmlChar *) "./ags-output", xpath_context); if(xmlXPathCastToBoolean(xpath_object)){ gobject = (AgsChannel *) g_object_new(AGS_TYPE_OUTPUT, NULL); is_output = TRUE; }else{ gobject = (AgsChannel *) g_object_new(AGS_TYPE_INPUT, NULL); is_output = FALSE; } *channel = gobject; preset = FALSE; }else{ gobject = *channel; if(AGS_IS_OUTPUT(gobject)){ is_output = TRUE; }else{ is_output = FALSE; } preset = TRUE; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); /* well known properties */ pad = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "pad"), NULL, 10); audio_channel = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "audio-channel"), NULL, 10); if(!preset){ gobject->pad = pad; gobject->audio_channel = audio_channel; } /* link */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", AGS_CHANNEL(gobject), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_channel_resolve_link), AGS_CHANNEL(gobject)); /* */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-recycling", 13)){ /* ags-recycling */ ags_file_read_recycling(file, child, &(gobject->first_recycling)); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-container-list", 26)){ ags_file_read_recall_container_list(file, child, &(gobject->container)); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-list", 15)){ GList *list; if(!xmlStrncmp((gchar *) xmlGetProp(child, (xmlChar *) "is-play"), (xmlChar *) "TRUE", 4)){ /* ags-recall-list play */ ags_file_read_recall_list(file, child, &list); gobject->play = list; }else{ /* ags-recall-list recall */ ags_file_read_recall_list(file, child, &list); gobject->recall = list; } while(list != NULL){ g_object_ref(list->data); list = list->next; } }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-pattern-list", 17)){ g_list_free_full(gobject->pattern, g_object_unref); gobject->pattern = NULL; /* ags-pattern-list */ ags_file_read_pattern_list(file, child, &(gobject->pattern)); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-output", 10)){ /* ags-output */ ags_file_read_output(file, child, gobject); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-input", 9)){ /* ags-input */ ags_file_read_input(file, child, gobject); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-playback", 15)){ /* ags-playback */ ags_file_read_playback(file, child, (AgsPlayback **) &gobject->playback); AGS_PLAYBACK(gobject->playback)->source = (GObject *) gobject; } } child = child->next; } } void ags_file_read_channel_resolve_link(AgsFileLookup *file_lookup, AgsChannel *channel) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) (gchar *) xmlGetProp(file_lookup->node, (xmlChar *) "link"); if(xpath == NULL){ return; } id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref != NULL){ GError *error; error = NULL; if(channel->link == NULL){ ags_channel_set_link(channel, (AgsChannel *) id_ref->ref, &error); } } } xmlNode* ags_file_write_channel(AgsFile *file, xmlNode *parent, AgsChannel *channel) { AgsFileLookup *file_lookup; xmlNode *node, *child; gchar *id, *link_id; gboolean is_output; id = ags_id_generator_create_uuid(); if(AGS_IS_OUTPUT(channel)){ is_output = TRUE; }else{ is_output = FALSE; } node = xmlNewNode(NULL, (xmlChar *) "ags-channel"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", AGS_CHANNEL(channel), NULL)); /* well known properties */ xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", channel->flags)); xmlNewProp(node, (xmlChar *) "pad", (xmlChar *) g_strdup_printf("%d", channel->pad)); xmlNewProp(node, (xmlChar *) "audio-channel", (xmlChar *) g_strdup_printf("%d", channel->audio_channel)); /* link */ if(channel->link != NULL){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", AGS_CHANNEL(channel), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_channel_resolve_link), AGS_CHANNEL(channel)); } xmlAddChild(parent, node); /* ags-recycling */ if(is_output){ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (AGS_AUDIO(channel->audio)->flags)) != 0){ ags_file_write_recycling(file, node, channel->first_recycling); } }else{ if((AGS_AUDIO_INPUT_HAS_RECYCLING & (AGS_AUDIO(channel->audio)->flags)) != 0){ ags_file_write_recycling(file, node, channel->first_recycling); } } /* ags-recall-container */ if(g_list_find(AGS_AUDIO(channel->audio)->container, channel->container) != NULL){ ags_file_write_recall_container_list(file, node, channel->container); } /* ags-recall-list play */ child = ags_file_write_recall_list(file, node, channel->play); xmlNewProp(child, (xmlChar *) "is-play", (xmlChar *) AGS_FILE_TRUE); /* ags-recall-list recall */ child = ags_file_write_recall_list(file, node, channel->recall); xmlNewProp(child, (xmlChar *) "is-play", (xmlChar *) AGS_FILE_FALSE); /* ags-pattern-list */ if(channel->pattern != NULL){ ags_file_write_pattern_list(file, node, channel->pattern); } /* ags-input or ags-output */ if(AGS_IS_OUTPUT(channel)){ ags_file_write_output(file, node, channel); }else{ ags_file_write_input(file, node, channel); } /* ags-playback */ child = ags_file_write_playback(file, node, (AgsPlayback *) channel->playback); return(node); } void ags_file_write_channel_resolve_link(AgsFileLookup *file_lookup, AgsChannel *channel) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_CHANNEL(channel->link)); id = (gchar *) xmlGetProp(id_ref->node, (xmlChar *) AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, (xmlChar *) "link", (xmlChar *) g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_file_read_channel_list(AgsFile *file, xmlNode *node, GList **channel) { AgsChannel *current; xmlNode *child; GList *list; list = NULL; child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-channel", 12)){ current = NULL; ags_file_read_channel(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *channel = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_channel_list(AgsFile *file, xmlNode *parent, GList *channel) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-channel-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", channel, NULL)); xmlAddChild(parent, node); list = channel; while(list != NULL){ ags_file_write_channel(file, node, AGS_CHANNEL(list->data)); list = list->next; } return(node); } void ags_file_read_input(AgsFile *file, xmlNode *node, AgsChannel *channel) { AgsInput *input; xmlNode *child; input = AGS_INPUT(channel); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", input, NULL)); child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-file-link", 13)){ ags_file_read_file_link(file, child, (AgsFileLink **) &(input->file_link)); } } child = child->next; } } xmlNode* ags_file_write_input(AgsFile *file, xmlNode *parent, AgsChannel *channel) { AgsInput *input; xmlNode *node; gchar *id; input = AGS_INPUT(channel); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-input"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", input, NULL)); xmlAddChild(parent, node); if(input->file_link != NULL){ ags_file_write_file_link(file, node, (AgsFileLink *) input->file_link); } return(node); } void ags_file_read_output(AgsFile *file, xmlNode *node, AgsChannel *channel) { AgsOutput *output; output = AGS_OUTPUT(channel); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", output, NULL)); } xmlNode* ags_file_write_output(AgsFile *file, xmlNode *parent, AgsChannel *channel) { AgsOutput *output; xmlNode *node; gchar *id; output = AGS_OUTPUT(channel); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-output"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", output, NULL)); xmlAddChild(parent, node); return(node); } void ags_file_read_recall(AgsFile *file, xmlNode *node, AgsRecall **recall) { AgsFileLookup *file_lookup; AgsRecall *gobject; xmlNode *child; gchar *type_name; if(*recall == NULL){ GType type; type_name = (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_TYPE_PROP); g_message("type name : %s", type_name); type = g_type_from_name(type_name); gobject = g_object_new(type, NULL); *recall = gobject; }else{ gobject = *recall; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->version = (gchar *) (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_VERSION_PROP); gobject->build_id = (gchar *) (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_BUILD_ID_PROP); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->flags |= AGS_RECALL_TEMPLATE; gobject->flags &= (~(AGS_RECALL_CONNECTED | AGS_RECALL_DYNAMIC_CONNECTED)); /* soundcard */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_recall_resolve_soundcard), gobject); /* audio */ if(AGS_IS_RECALL_AUDIO(gobject)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_recall_resolve_audio), gobject); } /* source and destination */ if(AGS_IS_RECALL_CHANNEL(gobject) || AGS_IS_RECALL_CHANNEL_RUN(gobject)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_recall_resolve_channel), gobject); } /* */ gobject->effect = (gchar *) (gchar *) xmlGetProp(node, (xmlChar *) "effect"); gobject->name = (gchar *) (gchar *) xmlGetProp(node, (xmlChar *) "name"); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-audio", 17)){ ags_file_read_recall_audio(file, child, gobject); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-audio-run", 21)){ ags_file_read_recall_audio_run(file, child, gobject); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-channel", 19)){ ags_file_read_recall_channel(file, child, gobject); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-channel-run", 23)){ ags_file_read_recall_channel_run(file, child, gobject); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-recycling", 21)){ ags_file_read_recall_recycling(file, child, gobject); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-audio-signal", 24)){ ags_file_read_recall_audio_signal(file, child, gobject); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-list", 16)){ GList *list, *start; ags_file_read_recall_list(file, child, &start); list = start; while(list != NULL){ g_object_set(G_OBJECT(gobject), "child", AGS_RECALL(list->data), NULL); list = list->next; } g_list_free(start); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-port-list", 14)){ GList *list; list = NULL; ags_file_read_port_list(file, child, &list); ags_plugin_set_ports(AGS_PLUGIN(gobject), list); gobject->port = list; }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-parameter", 13)){ ags_file_util_read_parameter(file, child, NULL, &(gobject->child_parameters), NULL, NULL); } } child = child->next; } } void ags_file_read_recall_resolve_audio(AgsFileLookup *file_lookup, AgsRecall *recall) { AgsAudio *audio; AgsFileIdRef *file_id_ref; xmlNode *node; audio = NULL; node = file_lookup->node->parent->parent; file_id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_node(file_lookup->file, node); if(file_id_ref != NULL){ audio = (AgsAudio *) file_id_ref->ref; } g_object_set(G_OBJECT(recall), "audio", AGS_AUDIO(audio), NULL); } void ags_file_read_recall_resolve_channel(AgsFileLookup *file_lookup, AgsRecall *recall) { AgsChannel *source, *destination; AgsFileIdRef *file_id_ref; xmlNode *node; source = NULL; destination = NULL; node = file_lookup->node->parent->parent; file_id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_node(file_lookup->file, node); if(file_id_ref != NULL){ source = AGS_CHANNEL(file_id_ref->ref); g_object_set(G_OBJECT(recall), "source", source, NULL); if(AGS_IS_INPUT(source)){ if((AGS_AUDIO_ASYNC & (AGS_AUDIO(source->audio)->flags)) != 0){ destination = ags_channel_nth(AGS_AUDIO(source->audio)->output, source->audio_channel); }else{ destination = ags_channel_nth(AGS_AUDIO(source->audio)->output, source->line); } g_object_set(G_OBJECT(recall), "destination", AGS_CHANNEL(destination), NULL); } } } void ags_file_read_recall_resolve_port(AgsFileLookup *file_lookup, AgsRecall *recall) { //TODO:JK: implement me } void ags_file_read_recall_resolve_parameter(AgsFileLookup *file_lookup, AgsRecall *recall) { //TODO:JK: implement me } void ags_file_read_recall_resolve_soundcard(AgsFileLookup *file_lookup, AgsRecall *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) (gchar *) xmlGetProp(file_lookup->node, (xmlChar *) "soundcard"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref != NULL){ recall->soundcard = (GObject *) id_ref->ref; } } xmlNode* ags_file_write_recall(AgsFile *file, xmlNode *parent, AgsRecall *recall) { AgsFileLookup *file_lookup; xmlNode *node; gchar *id; if((AGS_RECALL_TEMPLATE & (recall->flags)) == 0){ return(NULL); } id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_TYPE_PROP, (xmlChar *) G_OBJECT_TYPE_NAME(recall)); xmlNewProp(node, (xmlChar *) AGS_FILE_VERSION_PROP, (xmlChar *) recall->version); xmlNewProp(node, (xmlChar *) AGS_FILE_BUILD_ID_PROP, (xmlChar *) recall->build_id); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", recall->flags)); /* soundcard */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", recall, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_recall_resolve_soundcard), recall); /* */ xmlNewProp(node, (xmlChar *) "effect", (xmlChar *) recall->effect); xmlNewProp(node, (xmlChar *) AGS_FILE_NAME_PROP, (xmlChar *) recall->name); xmlAddChild(parent, node); /* child elements */ if(AGS_IS_RECALL_AUDIO(recall)){ ags_file_write_recall_audio(file, node, recall); }else if(AGS_IS_RECALL_AUDIO_RUN(recall)){ ags_file_write_recall_audio_run(file, node, recall); }else if(AGS_IS_RECALL_CHANNEL(recall)){ ags_file_write_recall_channel(file, node, recall); }else if(AGS_IS_RECALL_CHANNEL_RUN(recall)){ ags_file_write_recall_channel_run(file, node, recall); }else if(AGS_IS_RECALL_RECYCLING(recall)){ ags_file_write_recall_recycling(file, node, recall); }else if(AGS_IS_RECALL_AUDIO_SIGNAL(recall)){ ags_file_write_recall_audio_signal(file, node, recall); } if(recall->children != NULL){ ags_file_write_recall_list(file, node, recall->children); } if(recall->port != NULL){ ags_file_write_port_list(file, node, recall->port); } /* child parameters */ ags_file_util_write_parameter(file, node, ags_id_generator_create_uuid(), recall->child_parameters, recall->n_params); return(node); } void ags_file_write_recall_resolve_soundcard(AgsFileLookup *file_lookup, AgsRecall *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, recall->soundcard); id = (gchar *) xmlGetProp(id_ref->node, (xmlChar *) AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, (xmlChar *) "soundcard", (xmlChar *) g_strdup_printf("xpath=//ags-soundcard[@id='%s']", id)); } void ags_file_read_recall_list(AgsFile *file, xmlNode *node, GList **recall) { AgsRecall *current; xmlNode *child; GList *list; list = NULL; child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall", 11)){ current = NULL; ags_file_read_recall(file, child, ¤t); g_object_ref(current); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *recall = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_recall_list(AgsFile *file, xmlNode *parent, GList *recall) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall, NULL)); xmlAddChild(parent, node); list = recall; while(list != NULL){ ags_file_write_recall(file, node, AGS_RECALL(list->data)); list = list->next; } return(node); } void ags_file_read_recall_container(AgsFile *file, xmlNode *node, AgsRecallContainer **recall_container) { AgsRecallContainer *gobject; xmlNode *child; xmlChar *type_name; if(*recall_container == NULL){ gobject = g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); *recall_container = gobject; }else{ gobject = *recall_container; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-parameter", 14)){ AgsFileLookup *file_lookup; xmlNode *value_node; GList *list; ags_file_util_read_parameter(file, child, NULL, NULL, NULL, NULL); value_node = child->children; while(value_node != NULL){ if(value_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(value_node->name, (xmlChar *) "ags-value", 10)){ list = ags_file_lookup_find_by_node(file->lookup, value_node); if(list != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_recall_container_resolve_value), gobject); } } } value_node = value_node->next; } } } child = child->next; } } void ags_file_read_recall_container_resolve_value(AgsFileLookup *file_lookup, AgsRecallContainer *recall_container) { GObject *gobject; GValue *value; value = file_lookup->ref; if(G_VALUE_HOLDS(value, G_TYPE_OBJECT)){ gobject = g_value_get_object(value); if(gobject == NULL){ return; } g_object_set(gobject, "recall-container", recall_container, NULL); } } xmlNode* ags_file_write_recall_container(AgsFile *file, xmlNode *parent, AgsRecallContainer *recall_container) { xmlNode *node; GParameter *parameter; GList *list; gchar *id; gint n_params; auto GParameter* ags_file_write_recall_container_parameter(GList *list, GParameter *parameter, gchar *prop, gint *n_params); GParameter* ags_file_write_recall_container_parameter(GList *list, GParameter *parameter, gchar *prop, gint *n_params){ gint i; if(n_params == NULL){ i = 0; }else{ i = *n_params; } while(list != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(list->data)->flags)) == 0){ list = list->next; continue; } if(parameter == NULL){ parameter = (GParameter *) malloc(sizeof(GParameter)); }else{ parameter = (GParameter *) realloc(parameter, (i + 1) * sizeof(GParameter)); } parameter[i].name = prop; memset(&(parameter[i].value), 0, sizeof(GValue)); g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), G_OBJECT(list->data)); list = list->next; i++; } if(n_params != NULL){ *n_params = i; } return(parameter); } id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall-container"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_container, NULL)); xmlAddChild(parent, node); /* child elements */ parameter = NULL; n_params = 0; if(recall_container->recall_audio != NULL){ parameter = (GParameter *) malloc(sizeof(GParameter)); parameter[0].name = "recall-audio"; memset(&(parameter[0].value), 0, sizeof(GValue)); g_value_init(&(parameter[0].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[0].value), recall_container->recall_audio); n_params++; } list = ags_recall_container_get_recall_audio_run(recall_container); parameter = ags_file_write_recall_container_parameter(list, parameter, "recall-audio-run", &n_params); list = ags_recall_container_get_recall_channel(recall_container); parameter = ags_file_write_recall_container_parameter(list, parameter, "recall-channel", &n_params); list = ags_recall_container_get_recall_channel_run(recall_container); parameter = ags_file_write_recall_container_parameter(list, parameter, "recall-channel-run", &n_params); ags_file_util_write_parameter(file, node, ags_id_generator_create_uuid(), parameter, n_params); return(node); } void ags_file_read_recall_container_list(AgsFile *file, xmlNode *node, GList **recall_container) { AgsRecallContainer *current; GList *list; xmlNode *child; list = NULL; child = node->children; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-recall-container", 21)){ current = NULL; ags_file_read_recall_container(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *recall_container = list; } xmlNode* ags_file_write_recall_container_list(AgsFile *file, xmlNode *parent, GList *recall_container) { GList *list; xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall-container-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_container, NULL)); xmlAddChild(parent, node); list = recall_container; while(list != NULL){ ags_file_write_recall_container(file, node, AGS_RECALL_CONTAINER(list->data)); list = list->next; } return(node); } void ags_file_read_recall_audio(AgsFile *file, xmlNode *node, AgsRecall *recall) { AgsRecallAudio *recall_audio; xmlNode *child; recall_audio = AGS_RECALL_AUDIO(recall); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", recall_audio, NULL)); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp((xmlChar *) child->name, (xmlChar *) ags_plugin_get_xml_type(AGS_PLUGIN(recall)))){ ags_plugin_read(file, child, AGS_PLUGIN(recall)); } } child = child->next; } } xmlNode* ags_file_write_recall_audio(AgsFile *file, xmlNode *parent, AgsRecall *recall) { AgsRecallAudio *recall_audio; xmlNode *node; gchar *id; recall_audio = AGS_RECALL_AUDIO(recall); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall-audio"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall, NULL)); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(recall)); return(node); } void ags_file_read_recall_audio_run(AgsFile *file, xmlNode *node, AgsRecall *recall) { AgsRecallAudioRun *recall_audio_run; xmlNode *child; recall_audio_run = AGS_RECALL_AUDIO_RUN(recall); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", recall_audio_run, NULL)); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp((xmlChar *) child->name, (xmlChar *) ags_plugin_get_xml_type(AGS_PLUGIN(recall)))){ ags_plugin_read(file, child, AGS_PLUGIN(recall)); } } child = child->next; } } xmlNode* ags_file_write_recall_audio_run(AgsFile *file, xmlNode *parent, AgsRecall *recall) { AgsRecallAudioRun *recall_audio_run; xmlNode *node; gchar *id; recall_audio_run = AGS_RECALL_AUDIO_RUN(recall); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall-audio-run"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_audio_run, NULL)); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(recall)); return(node); } void ags_file_read_recall_channel(AgsFile *file, xmlNode *node, AgsRecall *recall) { AgsRecallChannel *recall_channel; xmlNode *child; recall_channel = AGS_RECALL_CHANNEL(recall); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", recall_channel, NULL)); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp((xmlChar *) child->name, (xmlChar *) ags_plugin_get_xml_type(AGS_PLUGIN(recall)))){ ags_plugin_read(file, child, AGS_PLUGIN(recall)); } } child = child->next; } } xmlNode* ags_file_write_recall_channel(AgsFile *file, xmlNode *parent, AgsRecall *recall) { AgsRecallChannel *recall_channel; xmlNode *node; gchar *id; recall_channel = AGS_RECALL_CHANNEL(recall); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall-channel"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_channel, NULL)); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(recall)); return(node); } void ags_file_read_recall_channel_run(AgsFile *file, xmlNode *node, AgsRecall *recall) { AgsRecallChannelRun *recall_channel_run; xmlNode *child; recall_channel_run = AGS_RECALL_CHANNEL_RUN(recall); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", recall_channel_run, NULL)); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp((xmlChar *) child->name, (xmlChar *) ags_plugin_get_xml_type(AGS_PLUGIN(recall)))){ ags_plugin_read(file, child, AGS_PLUGIN(recall)); } } child = child->next; } } xmlNode* ags_file_write_recall_channel_run(AgsFile *file, xmlNode *parent, AgsRecall *recall) { AgsRecallChannelRun *recall_channel_run; xmlNode *node; gchar *id; recall_channel_run = AGS_RECALL_CHANNEL_RUN(recall); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall-channel-run"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_channel_run, NULL)); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(recall)); return(node); } void ags_file_read_recall_recycling(AgsFile *file, xmlNode *node, AgsRecall *recall) { AgsRecallRecycling *recall_recycling; xmlNode *child; recall_recycling = AGS_RECALL_RECYCLING(recall); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", recall_recycling, NULL)); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp((xmlChar *) child->name, (xmlChar *) ags_plugin_get_xml_type(AGS_PLUGIN(recall)))){ ags_plugin_read(file, child, AGS_PLUGIN(recall)); } } child = child->next; } } xmlNode* ags_file_write_recall_recycling(AgsFile *file, xmlNode *parent, AgsRecall *recall) { AgsRecallRecycling *recall_recycling; xmlNode *node; gchar *id; recall_recycling = AGS_RECALL_RECYCLING(recall); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall-recycling"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_recycling, NULL)); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(recall)); return(node); } void ags_file_read_recall_audio_signal(AgsFile *file, xmlNode *node, AgsRecall *recall) { AgsRecallAudioSignal *recall_audio_signal; xmlNode *child; recall_audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", recall_audio_signal, NULL)); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrcmp((xmlChar *) child->name, (xmlChar *) ags_plugin_get_xml_type(AGS_PLUGIN(recall)))){ ags_plugin_read(file, child, AGS_PLUGIN(recall)); } } child = child->next; } } xmlNode* ags_file_write_recall_audio_signal(AgsFile *file, xmlNode *parent, AgsRecall *recall) { AgsRecallAudioSignal *recall_audio_signal; xmlNode *node; gchar *id; recall_audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recall-audio-signal"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_audio_signal, NULL)); xmlAddChild(parent, node); /* child elements */ ags_plugin_write(file, node, AGS_PLUGIN(recall)); return(node); } void ags_file_read_port(AgsFile *file, xmlNode *node, AgsPort **port) { AgsPort *gobject; AgsFileLookup *file_lookup; xmlNode *child; GList *list; if(*port == NULL){ gobject = g_object_new(AGS_TYPE_PORT, NULL); *port = gobject; }else{ gobject = *port; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->plugin_name = g_strdup((gchar *) xmlGetProp(node, (xmlChar *) "plugin-name")); gobject->specifier = g_strdup((gchar *) xmlGetProp(node, (xmlChar *) "specifier")); gobject->control_port = g_strdup((gchar *) xmlGetProp(node, (xmlChar *) "control-port")); gobject->port_value_is_pointer = g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "port-data-is-pointer"), NULL, 10); gobject->port_value_type = g_type_from_name((gchar *) xmlGetProp(node, (xmlChar *) "port-data-type")); gobject->port_value_size = g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "port-data-size"), NULL, 10); gobject->port_value_length = g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "port-data-length"), NULL, 10); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-value", 10)){ GValue *value; //FIXME:JK: memory leak value = (GValue *) g_new0(GValue, 1); memset(value, 0, sizeof(GValue)); g_value_init(value, gobject->port_value_type); ags_file_util_read_value(file, child, NULL, value, NULL); if(gobject->port_value_type == G_TYPE_POINTER || gobject->port_value_type == G_TYPE_OBJECT){ list = ags_file_lookup_find_by_node(file->lookup, child); if(list != NULL){ file_lookup = AGS_FILE_LOOKUP(list->data); g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_port_resolve_port_value), gobject); } }else{ ags_port_safe_write((AgsPort *) gobject, value); } } } child = child->next; } } void ags_file_read_port_resolve_port_value(AgsFileLookup *file_lookup, AgsPort *port) { AgsFileIdRef *file_id_ref; ags_port_safe_write(port, (GValue *) file_lookup->ref); file_id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, port); ags_file_id_ref_resolved(file_id_ref); } xmlNode* ags_file_write_port(AgsFile *file, xmlNode *parent, AgsPort *port) { xmlNode *node; gchar *id; GValue *a; if(!AGS_IS_PORT(port)){ return(node); } id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-port"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", port, NULL)); xmlNewProp(node, (xmlChar *) BAD_CAST "plugin-name", (xmlChar *) port->plugin_name); xmlNewProp(node, (xmlChar *) BAD_CAST "specifier", (xmlChar *) port->specifier); xmlNewProp(node, (xmlChar *) BAD_CAST "control-port", (xmlChar *) port->control_port); xmlNewProp(node, (xmlChar *) BAD_CAST "port-data-is-pointer", (xmlChar *) g_strdup_printf("%d", port->port_value_is_pointer)); xmlNewProp(node, (xmlChar *) BAD_CAST "port-data-type", (xmlChar *) g_strdup(g_type_name(port->port_value_type))); xmlNewProp(node, (xmlChar *) BAD_CAST "port-data-size", (xmlChar *) g_strdup_printf("%d", port->port_value_size)); xmlNewProp(node, (xmlChar *) BAD_CAST "port-data-length", (xmlChar *) g_strdup_printf("%d", port->port_value_length)); xmlAddChild(parent, node); /* child elements */ a = g_new0(GValue, 1); if(port->port_value_is_pointer){ if(port->port_value_type == G_TYPE_BOOLEAN){ gboolean *ptr; ptr = (gboolean *) port->port_value.ags_port_boolean_ptr; g_value_init(a, G_TYPE_POINTER); g_value_set_pointer(a, ptr); }else if(port->port_value_type == G_TYPE_UINT64){ guint64 *ptr; ptr = (guint64 *) port->port_value.ags_port_uint_ptr; g_value_init(a, G_TYPE_POINTER); g_value_set_pointer(a, ptr); }else if(port->port_value_type == G_TYPE_INT64){ gint64 *ptr; ptr = (gint64 *) port->port_value.ags_port_int_ptr; g_value_init(a, G_TYPE_POINTER); g_value_set_pointer(a, ptr); }else if(port->port_value_type == G_TYPE_FLOAT){ gfloat *ptr; ptr = (gfloat *) port->port_value.ags_port_float_ptr; g_value_init(a, G_TYPE_POINTER); g_value_set_pointer(a, ptr); }else if(port->port_value_type == G_TYPE_DOUBLE){ gdouble *ptr; ptr = (gdouble *) port->port_value.ags_port_double_ptr; g_value_init(a, G_TYPE_POINTER); g_value_set_pointer(a, ptr); }else if(port->port_value_type == G_TYPE_POINTER){ g_value_init(a, G_TYPE_POINTER); g_value_set_pointer(a, port->port_value.ags_port_pointer); } }else{ if(port->port_value_type == G_TYPE_BOOLEAN){ g_value_init(a, G_TYPE_BOOLEAN); g_value_set_boolean(a, port->port_value.ags_port_boolean); }else if(port->port_value_type == G_TYPE_UINT64){ g_value_init(a, G_TYPE_UINT64); g_value_set_uint64(a, port->port_value.ags_port_uint); }else if(port->port_value_type == G_TYPE_INT64){ g_value_init(a, G_TYPE_INT64); g_value_set_int64(a, port->port_value.ags_port_int); }else if(port->port_value_type == G_TYPE_FLOAT){ g_value_init(a, G_TYPE_FLOAT); g_value_set_float(a, port->port_value.ags_port_float); }else if(port->port_value_type == G_TYPE_DOUBLE){ g_value_init(a, G_TYPE_DOUBLE); g_value_set_double(a, port->port_value.ags_port_double); }else if(port->port_value_type == G_TYPE_OBJECT){ g_value_init(a, G_TYPE_OBJECT); g_value_set_object(a, port->port_value.ags_port_object); } } /* */ ags_file_util_write_value(file, node, ags_id_generator_create_uuid(), a, port->port_value_type, port->port_value_size); return(node); } void ags_file_read_port_list(AgsFile *file, xmlNode *node, GList **port) { AgsPort *current; xmlNode *child; GList *list; if(*port != NULL){ list = *port; }else{ list = NULL; } child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-port", 9)){ if(*port != NULL){ GList *list; list = ags_port_find_specifier(*port, (gchar *) xmlGetProp(child, (xmlChar *) "specifier")); if(list == NULL){ child = child->next; continue; }else{ current = list->data; g_message("found: %s", (gchar *) xmlGetProp(child, (xmlChar *) "specifier")); } }else{ current = NULL; } ags_file_read_port(file, child, ¤t); if(*port == NULL){ list = g_list_prepend(list, current); } } } child = child->next; } if(*port == NULL){ list = g_list_reverse(list); /* set return value */ *port = list; } /* add id ref */ ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", *port, NULL)); } xmlNode* ags_file_write_port_list(AgsFile *file, xmlNode *parent, GList *port) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-port-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", port, NULL)); xmlAddChild(parent, node); /* child elements */ list = port; while(list != NULL){ ags_file_write_port(file, node, AGS_PORT(list->data)); list = list->next; } return(node); } void ags_file_read_recycling(AgsFile *file, xmlNode *node, AgsRecycling **recycling) { AgsRecycling *gobject; xmlNode *child; if(*recycling == NULL){ gobject = (AgsRecycling *) g_object_new(AGS_TYPE_RECYCLING, NULL); *recycling = gobject; }else{ gobject = *recycling; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-audio-signal-list", 21)){ if((AGS_FILE_READ_AUDIO_SIGNAL & (file->flags)) != 0){ ags_file_read_audio_signal_list(file, child, &gobject->audio_signal); } } } child = child->next; } } xmlNode* ags_file_write_recycling(AgsFile *file, xmlNode *parent, AgsRecycling *recycling) { xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recycling"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recycling, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", recycling->flags)); xmlAddChild(parent, node); /* child elements */ if((AGS_FILE_WRITE_AUDIO_SIGNAL & (file->flags)) != 0){ ags_file_write_audio_signal_list(file, node, recycling->audio_signal); } return(node); } void ags_file_read_recycling_list(AgsFile *file, xmlNode *node, GList **recycling) { AgsRecycling *current; xmlNode *child; GList *list; list = NULL; child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-recycling", 14)){ current = NULL; ags_file_read_recycling(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *recycling = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_recycling_list(AgsFile *file, xmlNode *parent, GList *recycling) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-recycling-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recycling, NULL)); xmlAddChild(parent, node); list = recycling; while(list != NULL){ ags_file_write_recycling(file, node, AGS_RECYCLING(list->data)); list = list->next; } return(node); } void ags_file_read_audio_signal(AgsFile *file, xmlNode *node, AgsAudioSignal **audio_signal) { AgsAudioSignal *gobject; xmlNode *child; if(*audio_signal == NULL){ gobject = (AgsAudioSignal *) g_object_new(AGS_TYPE_AUDIO_SIGNAL, NULL); *audio_signal = gobject; }else{ gobject = *audio_signal; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->samplerate = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "samplerate"), NULL, 10); gobject->buffer_size = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "buffer-size"), NULL, 10); gobject->format = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "format"), NULL, 10); gobject->length = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "length"), NULL, 10); gobject->last_frame = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "last-frame"), NULL, 10); gobject->loop_start = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "loop-start"), NULL, 10); gobject->loop_end = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "loop-end"), NULL, 10); gobject->delay = g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "delay"), NULL); gobject->attack = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "attack"), NULL, 10); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-stream-list", 21)){ ags_file_read_stream_list(file, child, &gobject->stream_beginning, gobject->buffer_size); } } child = child->next; } } xmlNode* ags_file_write_audio_signal(AgsFile *file, xmlNode *parent, AgsAudioSignal *audio_signal) { xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-audio-signal"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", audio_signal, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", audio_signal->flags)); xmlNewProp(node, (xmlChar *) "samplerate", (xmlChar *) g_strdup_printf("%d", audio_signal->samplerate)); xmlNewProp(node, (xmlChar *) "buffer-size", (xmlChar *) g_strdup_printf("%d", audio_signal->buffer_size)); xmlNewProp(node, (xmlChar *) "format", (xmlChar *) g_strdup_printf("%d", audio_signal->format)); xmlNewProp(node, (xmlChar *) "length", (xmlChar *) g_strdup_printf("%d", audio_signal->length)); xmlNewProp(node, (xmlChar *) "last-frame", (xmlChar *) g_strdup_printf("%d", audio_signal->last_frame)); xmlNewProp(node, (xmlChar *) "loop-start", (xmlChar *) g_strdup_printf("%d", audio_signal->loop_start)); xmlNewProp(node, (xmlChar *) "loop-end", (xmlChar *) g_strdup_printf("%d", audio_signal->loop_end)); xmlNewProp(node, (xmlChar *) "delay", (xmlChar *) g_strdup_printf("%f", audio_signal->delay)); xmlNewProp(node, (xmlChar *) "attack", (xmlChar *) g_strdup_printf("%d", audio_signal->attack)); xmlAddChild(parent, node); /* child elements */ ags_file_write_stream_list(file, node, audio_signal->stream_beginning, audio_signal->buffer_size); return(node); } void ags_file_read_audio_signal_list(AgsFile *file, xmlNode *node, GList **audio_signal) { AgsAudioSignal *current; xmlNode *child; GList *list; list = NULL; child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-audio-signal", 17)){ current = NULL; ags_file_read_audio_signal(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *audio_signal = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_audio_signal_list(AgsFile *file, xmlNode *parent, GList *audio_signal) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-audio-signal-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", audio_signal, NULL)); xmlAddChild(parent, node); list = audio_signal; while(list != NULL){ ags_file_write_audio_signal(file, node, AGS_AUDIO_SIGNAL(list->data)); list = list->next; } return(node); } void ags_file_read_stream(AgsFile *file, xmlNode *node, GList **stream, guint *index, guint buffer_size) { GList *list; gchar *encoding; gchar *demuxer; xmlChar *content; if(*stream == NULL){ list = g_list_alloc(); *stream = list; }else{ list = *stream; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); if(index != NULL){ *index = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "index"), NULL, 10); } encoding = (gchar *) xmlGetProp(node, (xmlChar *) "encoding"); if(!xmlStrncmp((xmlChar *) encoding, (xmlChar *) "base64", 7)){ demuxer = (gchar *) xmlGetProp(node, (xmlChar *) "demuxer"); if(!xmlStrncmp((xmlChar *) demuxer, (xmlChar *) "raw", 4)){ content = node->content; //TODO:JK: verify list->data = g_base64_decode((gchar *) content, NULL); }else{ g_warning("ags_file_read_stream: unsupported demuxer %s", demuxer); } }else{ g_warning("ags_file_read_stream: unsupported encoding %s", encoding); } } xmlNode* ags_file_write_stream(AgsFile *file, xmlNode *parent, GList *stream, guint index, guint buffer_size) { xmlNode *node; xmlChar *content; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-stream"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", stream, NULL)); xmlNewProp(node, (xmlChar *) "index", (xmlChar *) g_strdup_printf("%d", index)); xmlNewProp(node, (xmlChar *) "encoding", (xmlChar *) file->audio_encoding); xmlNewProp(node, (xmlChar *) "demuxer", (xmlChar *) file->audio_format); content = g_base64_encode(stream->data, buffer_size); node->content = content; return(node); } void ags_file_read_stream_list(AgsFile *file, xmlNode *node, GList **stream, guint buffer_size) { GList *current; xmlNode *child; GList *list; guint *index; guint i; auto void ags_file_read_stream_list_sort(GList **stream, guint *index); void ags_file_read_stream_list_sort(GList **stream, guint *index){ GList *start, *list; GList *sorted; guint stream_length; guint i, i_stop; guint j, k; start = list = *stream; stream_length = i_stop = g_list_length(list); sorted = NULL; while(list != NULL){ j = index[stream_length - i_stop]; for(i = 0; i < stream_length - i_stop; i++){ if(j < index[i]){ break; } } sorted = g_list_insert(sorted, list->data, i); i_stop--; list = list->next; } *stream = sorted; g_list_free(start); } child = node->children; list = NULL; index = NULL; for(i = 0; child != NULL; i++){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-stream", 11)){ current = NULL; if(index == NULL){ index = (guint *) malloc(sizeof(guint)); }else{ index = (guint *) realloc(index, (i + 1) * sizeof(guint)); } ags_file_read_stream(file, child, ¤t, &(index[i]), buffer_size); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); ags_file_read_stream_list_sort(&list, index); *stream = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_stream_list(AgsFile *file, xmlNode *parent, GList *stream, guint buffer_size) { xmlNode *node; GList *list; gchar *id; guint i; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-stream-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", stream, NULL)); xmlAddChild(parent, node); /* child elements */ list = stream; for(i = 0; list != NULL; i++){ ags_file_write_stream(file, node, list, i, buffer_size); list = list->next; } return(node); } void ags_file_read_pattern(AgsFile *file, xmlNode *node, AgsPattern **pattern) { AgsPattern *gobject; AgsFileLookup *file_lookup; xmlNode *child; guint dim[3]; if(*pattern == NULL){ gobject = (AgsPattern *) g_object_new(AGS_TYPE_PATTERN, NULL); *pattern = gobject; }else{ gobject = *pattern; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); dim[0] = g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "dim-1st-level"), NULL, 10); dim[1] = g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "dim-2nd-level"), NULL, 10); dim[2] = g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "length"), NULL, 10); ags_pattern_set_dim((AgsPattern *) gobject, dim[0], dim[1], dim[2]); /* port */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_pattern_resolve_port), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-timestamp", 13)){ ags_file_read_timestamp(file, child, (AgsTimestamp **) &gobject->timestamp); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-pattern-data-list", 21)){ ags_file_read_pattern_data_list(file, child, gobject, gobject->dim[2]); } } child = child->next; } } void ags_file_read_pattern_resolve_port(AgsFileLookup *file_lookup, AgsPattern *pattern) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) (gchar *) xmlGetProp(file_lookup->node, (xmlChar *) "port"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref != NULL){ AgsPort *port; GValue value = {0,}; port = (AgsPort *) id_ref->ref; g_object_set(G_OBJECT(pattern), "port", (AgsPort *) port, NULL); g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, pattern); ags_port_safe_write(AGS_PORT(id_ref->ref), &value); } } xmlNode* ags_file_write_pattern(AgsFile *file, xmlNode *parent, AgsPattern *pattern) { AgsFileLookup *file_lookup; xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-pattern"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", pattern, NULL)); xmlNewProp(node, (xmlChar *) "dim-1st-level", (xmlChar *) g_strdup_printf("%d", pattern->dim[0])); xmlNewProp(node, (xmlChar *) "dim-2nd-level", (xmlChar *) g_strdup_printf("%d", pattern->dim[1])); xmlNewProp(node, (xmlChar *) "length", (xmlChar *) g_strdup_printf("%d", pattern->dim[2])); /* port */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", pattern, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_pattern_resolve_port), pattern); /* */ xmlAddChild(parent, node); /* child elements */ if(pattern->timestamp != NULL){ ags_file_write_timestamp(file, node, (AgsTimestamp *) pattern->timestamp); } ags_file_write_pattern_data_list(file, node, pattern, pattern->dim[2]); return(node); } void ags_file_write_pattern_resolve_port(AgsFileLookup *file_lookup, AgsPattern *pattern) { AgsFileIdRef *id_ref; gchar *id; if(pattern->port == NULL){ return; } id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, pattern->port); id = (gchar *) xmlGetProp(id_ref->node, (xmlChar *) AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, (xmlChar *) "port", (xmlChar *) g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_file_read_pattern_list(AgsFile *file, xmlNode *node, GList **pattern) { AgsPattern *current; xmlNode *child; GList *list; child = node->children; if(*pattern == NULL){ list = NULL; }else{ list = *pattern; } while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-pattern", 12)){ if(*pattern == NULL){ current = NULL; }else{ current = list->data; } ags_file_read_pattern(file, child, ¤t); if(*pattern == NULL){ list = g_list_prepend(list, current); }else{ list = list->next; } } } child = child->next; } if(*pattern == NULL){ list = g_list_reverse(list); *pattern = list; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_pattern_list(AgsFile *file, xmlNode *parent, GList *pattern) { xmlNode *node; GList *list; gchar *id; guint i; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-pattern-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", pattern, NULL)); xmlAddChild(parent, node); list = pattern; for(i = 0; list != NULL; i++){ ags_file_write_pattern(file, node, AGS_PATTERN(list->data)); list = list->next; } return(node); } void ags_file_read_pattern_data(AgsFile *file, xmlNode *node, AgsPattern *pattern, guint *i, guint *j, guint length) { xmlChar *content; xmlChar *coding; guint k; if(i != NULL){ *i = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "index-1st-level"), NULL, 10); } if(j != NULL){ *j = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "index-2nd-level"), NULL, 10); } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", pattern->pattern[*i][*j], NULL)); content = xmlNodeGetContent(node); coding = (gchar *) xmlGetProp(node, (xmlChar *) "coding"); if(!xmlStrncmp(coding, (xmlChar *) "human readable", 14)){ for(k = 0; k < length; k++){ if(!g_ascii_strncasecmp((gchar *) &(content[k]), "1", 1)){ ags_pattern_toggle_bit(pattern, *i, *j, k); } } }else{ g_warning("ags_file_read_pattern_data - unsupported coding: %s", coding); } } xmlNode* ags_file_write_pattern_data(AgsFile *file, xmlNode *parent, AgsPattern *pattern, guint i, guint j, guint length) { xmlNode *node; GString *content; gchar *id; guint k; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-pattern-data"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", pattern->pattern[i][j], NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) "0"); xmlNewProp(node, (xmlChar *) "index-1st-level", (xmlChar *) g_strdup_printf("%d", i)); xmlNewProp(node, (xmlChar *) "index-2nd-level", (xmlChar *) g_strdup_printf("%d", j)); xmlNewProp(node, (xmlChar *) "coding", (xmlChar *) "human readable"); content = g_string_sized_new(length + 1); for(k = 0; k < length; k++){ g_string_insert_c(content, k, (gchar) (ags_pattern_get_bit(pattern, i, j, k) ? '1': '0')); } g_string_insert_c(content, k, (gchar) '\0'); xmlNodeAddContent(node, BAD_CAST (content->str)); xmlAddChild(parent, node); return(node); } void ags_file_read_pattern_data_list(AgsFile *file, xmlNode *node, AgsPattern *pattern, guint length) { xmlNode *child; guint i, j; child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-pattern-data", 17)){ ags_file_read_pattern_data(file, child, pattern, &i, &j, length); } } child = child->next; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", pattern->pattern, NULL)); } xmlNode* ags_file_write_pattern_data_list(AgsFile *file, xmlNode *parent, AgsPattern *pattern, guint length) { xmlNode *node; gchar *id; guint i, j; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-pattern-data-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", pattern->pattern, NULL)); xmlAddChild(parent, node); for(i = 0; i < pattern->dim[0]; i++){ for(j = 0; j < pattern->dim[1]; j++){ ags_file_write_pattern_data(file, node, pattern, i, j, length); } } return(node); } void ags_file_read_notation(AgsFile *file, xmlNode *node, AgsNotation **notation) { AgsNotation *gobject; AgsFileLookup *file_lookup; xmlNode *child; xmlChar *prop; if(*notation == NULL){ gobject = (AgsNotation *) g_object_new(AGS_TYPE_NOTATION, NULL); *notation = gobject; }else{ gobject = *notation; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->audio_channel = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "audio-channel"), NULL, 10); gobject->key = g_strdup((gchar *) xmlGetProp(node, (xmlChar *) "key")); gobject->base_frequency = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "base-frequency"), NULL); gobject->tact = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "tact"), NULL); gobject->bpm = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "bpm"), NULL); gobject->maximum_note_length = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "max-note-length"), NULL); prop = (gchar *) xmlGetProp(node, (xmlChar *) "loop-start"); if(prop != NULL){ gobject->loop_start = (gdouble) g_ascii_strtod((gchar *) prop, NULL); gobject->loop_end = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "loop-end"), NULL); } /* port */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_notation_resolve_port), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-timestamp", 13)){ ags_file_read_timestamp(file, child, (AgsTimestamp **) &gobject->timestamp); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-note-list", 13)){ ags_file_read_note_list(file, child, &gobject->notes); } } child = child->next; } } void ags_file_read_notation_resolve_port(AgsFileLookup *file_lookup, AgsNotation *notation) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) (gchar *) xmlGetProp(file_lookup->node, (xmlChar *) "port"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref != NULL){ AgsPort *port; GValue value = {0,}; port = (AgsPort *) id_ref->ref; g_object_set(G_OBJECT(notation), "port", port, NULL); g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, notation); ags_port_safe_write(AGS_PORT(port), &value); } } xmlNode* ags_file_write_notation(AgsFile *file, xmlNode *parent, AgsNotation *notation) { AgsFileLookup *file_lookup; xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-notation"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", notation, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", notation->flags)); xmlNewProp(node, (xmlChar *) "key", (xmlChar *) notation->key); xmlNewProp(node, (xmlChar *) "audio-channel", (xmlChar *) g_strdup_printf("%d", notation->audio_channel)); xmlNewProp(node, (xmlChar *) "base-frequency", (xmlChar *) g_strdup_printf("%f", notation->base_frequency)); xmlNewProp(node, (xmlChar *) "tact", (xmlChar *) g_strdup_printf("%f", notation->tact)); xmlNewProp(node, (xmlChar *) "bpm", (xmlChar *) g_strdup_printf("%f", notation->bpm)); xmlNewProp(node, (xmlChar *) "max-note-length", (xmlChar *) g_strdup_printf("%f", notation->maximum_note_length)); xmlNewProp(node, (xmlChar *) "loop-start", (xmlChar *) g_strdup_printf("%f", notation->loop_start)); xmlNewProp(node, (xmlChar *) "loop-end", (xmlChar *) g_strdup_printf("%f", notation->loop_end)); /* port */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", notation, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_notation_resolve_port), notation); /* */ xmlAddChild(parent, node); /* child elements */ ags_file_write_timestamp(file, node, (AgsTimestamp *) notation->timestamp); ags_file_write_note_list(file, node, notation->notes); return(node); } void ags_file_write_notation_resolve_port(AgsFileLookup *file_lookup, AgsNotation *notation) { AgsFileIdRef *id_ref; gchar *id; if(notation->port == NULL){ return; } id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, notation->port); id = (gchar *) xmlGetProp(id_ref->node, (xmlChar *) AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, (xmlChar *) "port", (xmlChar *) g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_file_read_notation_list(AgsFile *file, xmlNode *node, GList **notation) { AgsNotation *current; xmlNode *child; GList *list; child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-notation", 13)){ current = NULL; ags_file_read_notation(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *notation = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_notation_list(AgsFile *file, xmlNode *parent, GList *notation) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-notation-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", notation, NULL)); xmlAddChild(parent, node); list = notation; while(list != NULL){ ags_file_write_notation(file, node, AGS_NOTATION(list->data)); list = list->next; } return(node); } void ags_file_read_note(AgsFile *file, xmlNode *node, AgsNote **note) { AgsNote *gobject; if(*note == NULL){ gobject = (AgsNote *) g_object_new(AGS_TYPE_NOTE, NULL); *note = gobject; }else{ gobject = *note; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->x[0] = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "x0"), NULL, 10); gobject->x[1] = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "x1"), NULL, 10); gobject->y = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "y"), NULL, 10); gobject->note_name = g_strdup((gchar *) xmlGetProp(node, (xmlChar *) "name")); gobject->frequency = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "frequency"), NULL); } xmlNode* ags_file_write_note(AgsFile *file, xmlNode *parent, AgsNote *note) { xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-note"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", note, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", note->flags)); xmlNewProp(node, (xmlChar *) "x0", (xmlChar *) g_strdup_printf("%d", note->x[0])); xmlNewProp(node, (xmlChar *) "x1", (xmlChar *) g_strdup_printf("%d", note->x[1])); xmlNewProp(node, (xmlChar *) "y", (xmlChar *) g_strdup_printf("%d", note->y)); xmlNewProp(node, (xmlChar *) "name", (xmlChar *) note->note_name); xmlNewProp(node, (xmlChar *) "frequency", (xmlChar *) g_strdup_printf("%f", note->frequency)); xmlAddChild(parent, node); return(node); } void ags_file_read_note_list(AgsFile *file, xmlNode *node, GList **note) { AgsNote *current; xmlNode *child; GList *list; child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-note", 9)){ current = NULL; ags_file_read_note(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *note = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_note_list(AgsFile *file, xmlNode *parent, GList *note) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-note-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", note, NULL)); xmlAddChild(parent, node); list = note; while(list != NULL){ ags_file_write_note(file, node, AGS_NOTE(list->data)); list = list->next; } return(node); } void ags_file_read_automation(AgsFile *file, xmlNode *node, AgsAutomation **automation) { AgsAutomation *gobject; AgsFileLookup *file_lookup; xmlNode *child; xmlChar *prop; if(*automation == NULL){ gobject = (AgsAutomation *) g_object_new(AGS_TYPE_AUTOMATION, NULL); *automation = gobject; }else{ gobject = *automation; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->line = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "line"), NULL, 10); gobject->channel_type = g_type_from_name((gchar *) xmlGetProp(node, (xmlChar *) "channel-type")); gobject->control_name = g_strdup((gchar *) xmlGetProp(node, (xmlChar *) "control-name")); gobject->steps = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "steps"), NULL); gobject->upper = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "upper"), NULL); gobject->lower = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "lower"), NULL); gobject->default_value = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "default-value"), NULL); prop = (gchar *) xmlGetProp(node, (xmlChar *) "loop-start"); if(prop != NULL){ gobject->loop_start = (gdouble) g_ascii_strtod((gchar *) prop, NULL); gobject->loop_end = (gdouble) g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "loop-end"), NULL); } prop = (gchar *) xmlGetProp(node, (xmlChar *) "offset"); if(prop != NULL){ gobject->offset = (gdouble) g_ascii_strtod((gchar *) prop, NULL); } /* port */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", gobject, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_automation_resolve_port), gobject); /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-timestamp", 13)){ ags_file_read_timestamp(file, child, (AgsTimestamp **) &gobject->timestamp); }else if(!xmlStrncmp(child->name, (xmlChar *) "ags-note-list", 13)){ ags_file_read_note_list(file, child, &gobject->acceleration); } } child = child->next; } } xmlNode* ags_file_write_automation(AgsFile *file, xmlNode *parent, AgsAutomation *automation) { AgsFileLookup *file_lookup; xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-automation"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", automation, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", automation->flags)); //TODO:JK: read audio ref xmlNewProp(node, (xmlChar *) "line", (xmlChar *) g_strdup_printf("%d", automation->line)); xmlNewProp(node, (xmlChar *) "channel-type", (xmlChar *) g_strdup_printf("%s", g_type_name(automation->channel_type))); xmlNewProp(node, (xmlChar *) "control-name", (xmlChar *) g_strdup_printf("%s", automation->control_name)); xmlNewProp(node, (xmlChar *) "steps", (xmlChar *) g_strdup_printf("%d", automation->steps)); xmlNewProp(node, (xmlChar *) "upper", (xmlChar *) g_strdup_printf("%f", automation->upper)); xmlNewProp(node, (xmlChar *) "lower", (xmlChar *) g_strdup_printf("%f", automation->lower)); xmlNewProp(node, (xmlChar *) "default-value", (xmlChar *) g_strdup_printf("%f", automation->default_value)); xmlNewProp(node, (xmlChar *) "loop-start", (xmlChar *) g_strdup_printf("%f", automation->loop_end)); xmlNewProp(node, (xmlChar *) "loop-end", (xmlChar *) g_strdup_printf("%f", automation->loop_start)); xmlNewProp(node, (xmlChar *) "offset", (xmlChar *) g_strdup_printf("%f", automation->offset)); /* port */ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", automation, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_write_automation_resolve_port), automation); /* */ xmlAddChild(parent, node); /* child elements */ ags_file_write_timestamp(file, node, (AgsTimestamp *) automation->timestamp); ags_file_write_note_list(file, node, automation->acceleration); return(node); } void ags_file_read_automation_resolve_port(AgsFileLookup *file_lookup, AgsAutomation *automation) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) (gchar *) xmlGetProp(file_lookup->node, (xmlChar *) "port"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(id_ref != NULL){ AgsPort *port; GValue value = {0,}; port = (AgsPort *) id_ref->ref; g_object_set(G_OBJECT(automation), "port", port, NULL); g_value_init(&value, G_TYPE_OBJECT); g_value_set_object(&value, automation); ags_port_safe_write(AGS_PORT(port), &value); } } void ags_file_write_automation_resolve_port(AgsFileLookup *file_lookup, AgsAutomation *automation) { AgsFileIdRef *id_ref; gchar *id; if(automation->port == NULL){ return; } id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, automation->port); id = (gchar *) xmlGetProp(id_ref->node, (xmlChar *) AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, (xmlChar *) "port", (xmlChar *) g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_file_read_automation_list(AgsFile *file, xmlNode *node, GList **automation) { AgsAutomation *current; xmlNode *child; GList *list; child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-automation", 13)){ current = NULL; ags_file_read_automation(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *automation = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_automation_list(AgsFile *file, xmlNode *parent, GList *automation) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-automation-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", automation, NULL)); xmlAddChild(parent, node); list = automation; while(list != NULL){ ags_file_write_automation(file, node, AGS_AUTOMATION(list->data)); list = list->next; } return(node); } void ags_file_read_acceleration(AgsFile *file, xmlNode *node, AgsAcceleration **acceleration) { AgsAcceleration *gobject; if(*acceleration == NULL){ gobject = (AgsAcceleration *) g_object_new(AGS_TYPE_ACCELERATION, NULL); *acceleration = gobject; }else{ gobject = *acceleration; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->x = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) "x"), NULL, 10); gobject->y = g_ascii_strtod((gchar *) xmlGetProp(node, (xmlChar *) "y"), NULL); gobject->acceleration_name = g_strdup((gchar *) xmlGetProp(node, (xmlChar *) "name")); } xmlNode* ags_file_write_acceleration(AgsFile *file, xmlNode *parent, AgsAcceleration *acceleration) { xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-acceleration"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", acceleration, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", acceleration->flags)); xmlNewProp(node, (xmlChar *) "x", (xmlChar *) g_strdup_printf("%d", acceleration->x)); xmlNewProp(node, (xmlChar *) "y", (xmlChar *) g_strdup_printf("%f", acceleration->y)); xmlNewProp(node, (xmlChar *) "name", (xmlChar *) acceleration->acceleration_name); xmlAddChild(parent, node); return(node); } void ags_file_read_acceleration_list(AgsFile *file, xmlNode *node, GList **acceleration) { AgsAcceleration *current; xmlNode *child; GList *list; child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-acceleration", 9)){ current = NULL; ags_file_read_acceleration(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *acceleration = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_acceleration_list(AgsFile *file, xmlNode *parent, GList *acceleration) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-acceleration-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", acceleration, NULL)); xmlAddChild(parent, node); list = acceleration; while(list != NULL){ ags_file_write_acceleration(file, node, AGS_ACCELERATION(list->data)); list = list->next; } return(node); } void ags_file_read_task(AgsFile *file, xmlNode *node, AgsTask **task) { AgsTask *gobject; GParameter *parameter; xmlNode *child; char *type_name; guint n_params; if(*task == NULL){ GType type; type_name = (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_TYPE_PROP); type = g_type_from_name(type_name); gobject = g_object_new(type, NULL); *task = gobject; }else{ gobject = *task; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* */ gobject->flags = (guint) g_ascii_strtoull((gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP), NULL, 16); gobject->name = (gchar *) (gchar *) xmlGetProp(node, (xmlChar *) "name"); gobject->delay = g_ascii_strtoull((gchar *) (gchar *) xmlGetProp(node, (xmlChar *) "delay"), NULL, 10); //TODO:JK: implement error message /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-parameter", 13)){ AgsFileLookup *file_lookup; ags_file_util_read_parameter(file, child, NULL, ¶meter, &n_params, NULL); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", node, "reference", parameter, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect_after(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_file_read_task_resolve_parameter), gobject); } } child = child->next; } } void ags_file_read_task_resolve_parameter(AgsFileLookup *file_lookup, AgsTask *task) { GParameter *parameter; GParamSpec **param_spec; guint n_properties; guint i, j; parameter = (GParameter *) file_lookup->ref; param_spec = g_object_class_list_properties(G_OBJECT_GET_CLASS(task), &n_properties); for(i = 0, j = 0; i < n_properties; i++){ if(g_type_is_a(param_spec[i]->owner_type, AGS_TYPE_TASK)){ g_object_set_property(G_OBJECT(task), parameter[j].name, ¶meter[j].value); j++; } } } xmlNode* ags_file_write_task(AgsFile *file, xmlNode *parent, AgsTask *task) { GParameter *parameter; GParamSpec **param_spec; xmlNode *node; gchar *id; guint n_properties, n_params; guint i, j; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-task"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", task, NULL)); xmlNewProp(node, (xmlChar *) AGS_FILE_TYPE_PROP, (xmlChar *) G_OBJECT_TYPE_NAME(task)); xmlNewProp(node, (xmlChar *) AGS_FILE_FLAGS_PROP, (xmlChar *) g_strdup_printf("%x", task->flags)); /* */ xmlNewProp(node, (xmlChar *) AGS_FILE_NAME_PROP, (xmlChar *) task->name); xmlNewProp(node, (xmlChar *) "delay", (xmlChar *) g_strdup_printf("%d", task->delay)); //TODO:JK: implement error message xmlAddChild(parent, node); /* child parameters */ param_spec = g_object_class_list_properties(G_OBJECT_GET_CLASS(task), &n_properties); parameter = NULL; for(i = 0, j = 0; i < n_properties; i++){ if(g_type_is_a(param_spec[i]->owner_type, AGS_TYPE_TASK)){ if(parameter == NULL){ parameter = (GParameter *) g_new(GParameter, 1); }else{ parameter = (GParameter *) g_renew(GParameter, parameter, (j + 1)); } parameter[j].name = param_spec[i]->name; g_object_get_property(G_OBJECT(task), param_spec[i]->name, &(parameter[j].value)); j++; } } n_params = j; ags_file_util_write_parameter(file, node, ags_id_generator_create_uuid(), parameter, n_params); return(node); } void ags_file_read_task_list(AgsFile *file, xmlNode *node, GList **task) { AgsTask *current; xmlNode *child; GList *list; child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "ags-task", 9)){ current = NULL; ags_file_read_task(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *task = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", (gchar *) xmlGetProp(node, (xmlChar *) AGS_FILE_ID_PROP)), "reference", list, NULL)); } xmlNode* ags_file_write_task_list(AgsFile *file, xmlNode *parent, GList *task) { xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, (xmlChar *) "ags-task-list"); xmlNewProp(node, (xmlChar *) AGS_FILE_ID_PROP, (xmlChar *) id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", task, NULL)); xmlAddChild(parent, node); list = task; while(list != NULL){ ags_file_write_task(file, node, AGS_TASK(list->data)); list = list->next; } return(node); } void ags_file_read_embedded_audio(AgsFile *file, xmlNode *node, gchar **embedded_audio) { gchar *data; xmlChar *content; if(*embedded_audio == NULL){ return; }else{ data = *embedded_audio; } ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", data, NULL)); content = node->content; *embedded_audio = content; } xmlNode* ags_file_write_embedded_audio(AgsFile *file, xmlNode *parent, gchar *embedded_audio) { xmlNode *node; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-embedded-audio"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", embedded_audio, NULL)); xmlNewProp(node, "encoding", g_strdup("base64")); xmlNewProp(node, "demuxer", g_strdup("raw")); xmlNodeSetContent(node, embedded_audio); xmlAddChild(parent, node); return(node); } void ags_file_read_embedded_audio_list(AgsFile *file, xmlNode *node, GList **embedded_audio) { gchar *current; GList *list; xmlNode *child; xmlChar *id; id = xmlGetProp(node, AGS_FILE_ID_PROP); child = node->children; list = NULL; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "ags-embedded-audio", 11)){ current = NULL; ags_file_read_embedded_audio(file, child, ¤t); list = g_list_prepend(list, current); } } child = child->next; } list = g_list_reverse(list); *embedded_audio = list; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); } xmlNode* ags_file_write_embedded_audio_list(AgsFile *file, xmlNode *parent, GList *embedded_audio) { gchar *current; xmlNode *node; GList *list; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-embedded-audio-list"); xmlNewProp(node, AGS_FILE_ID_PROP, id); list = embedded_audio; ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", list, NULL)); xmlAddChild(parent, node); while(list != NULL){ ags_file_write_embedded_audio(file, node, (gchar *) list->data); list = list->next; } return(node); } gsequencer-1.4.24/ags/audio/file/ags_audio_file.c0000644000175000017500000004364413256225725016600 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_audio_file_class_init(AgsAudioFileClass *audio_file); void ags_audio_file_connectable_interface_init(AgsConnectableInterface *connectable); void ags_audio_file_init(AgsAudioFile *audio_file); void ags_audio_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_audio_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_audio_file_connect(AgsConnectable *connectable); void ags_audio_file_disconnect(AgsConnectable *connectable); void ags_audio_file_finalize(GObject *object); enum{ PROP_0, PROP_SOUNDCARD, PROP_FILENAME, PROP_START_CHANNEL, PROP_AUDIO_CHANNELS, PROP_SAMPLERATE, PROP_BUFFER_SIZE, PROP_PLAYABLE, PROP_AUDIO_SIGNAL, }; enum{ READ_BUFFER, LAST_SIGNAL, }; /** * SECTION:ags_audio_file * @short_description: Audio file input/output * @title: AgsAudioFile * @section_id: * @include: ags/audio/file/ags_audio_file.h * * #AgsAudioFile is the base object to read/write audio data. */ static gpointer ags_audio_file_parent_class = NULL; static AgsConnectableInterface *ags_audio_file_parent_connectable_interface; static guint signals[LAST_SIGNAL]; GType ags_audio_file_get_type() { static GType ags_type_audio_file = 0; if(!ags_type_audio_file){ static const GTypeInfo ags_audio_file_info = { sizeof (AgsAudioFileClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_file_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAudioFile), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_file_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_audio_file_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audio_file = g_type_register_static(G_TYPE_OBJECT, "AgsAudioFile", &ags_audio_file_info, 0); g_type_add_interface_static(ags_type_audio_file, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_audio_file); } void ags_audio_file_class_init(AgsAudioFileClass *audio_file) { GObjectClass *gobject; GParamSpec *param_spec; ags_audio_file_parent_class = g_type_class_peek_parent(audio_file); gobject = (GObjectClass *) audio_file; gobject->set_property = ags_audio_file_set_property; gobject->get_property = ags_audio_file_get_property; gobject->finalize = ags_audio_file_finalize; /* properties */ /** * AgsAudioFile:soundcard: * * The assigned soundcard. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of audio file"), i18n_pspec("The soundcard what audio file has it's presets"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsAudioFile:filename: * * The assigned filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("filename of lv2 manager"), i18n_pspec("The filename this lv2 manager is assigned to"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsAudioFile:start-channel: * * The audio file's offset to start reading from. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("start-channel", i18n_pspec("start-channel is the start offset"), i18n_pspec("The start-channel indicates what audio channel should be read"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_START_CHANNEL, param_spec); /** * AgsAudioFile:audio-channels: * * The audio file's count of channels to be read. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channels", i18n_pspec("read audio-channels of channels"), i18n_pspec("The audio-channels indicates how many channels should be read"), 0, G_MAXUINT, 1, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNELS, param_spec); /** * AgsAudioFile:samplerate: * * The samplerate to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("using samplerate"), i18n_pspec("The samplerate to be used"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsAudioFile:buffer-size: * * The buffer size to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("using buffer size"), i18n_pspec("The buffer size to be used"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsAudioFile:playable: * * The containing #AgsAudioSignal. * * Since: 1.0.0 */ param_spec = g_param_spec_object("playable", i18n_pspec("containing playable"), i18n_pspec("The playable it contains"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYABLE, param_spec); /** * AgsAudioFile:audio-signal: * * The containing #AgsAudioSignal. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-signal", i18n_pspec("containing audio signal"), i18n_pspec("The audio signal it contains"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_SIGNAL, param_spec); } void ags_audio_file_connectable_interface_init(AgsConnectableInterface *connectable) { ags_audio_file_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_audio_file_connect; connectable->disconnect = ags_audio_file_disconnect; } void ags_audio_file_init(AgsAudioFile *audio_file) { audio_file->soundcard = NULL; audio_file->filename = NULL; audio_file->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; audio_file->frames = 0; audio_file->channels = 1; audio_file->format = SF_FORMAT_WAV | SF_FORMAT_PCM_16; audio_file->start_channel = 0; audio_file->audio_channels = 1; audio_file->playable = NULL; audio_file->audio_signal = NULL; } void ags_audio_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAudioFile *audio_file; audio_file = AGS_AUDIO_FILE(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(soundcard == ((GObject *) audio_file->soundcard)){ return; } if(audio_file->soundcard != NULL){ g_object_unref(audio_file->soundcard); } if(soundcard != NULL){ g_object_ref(G_OBJECT(soundcard)); } audio_file->soundcard = (GObject *) soundcard; } break; case PROP_FILENAME: { gchar *filename; filename = (gchar *) g_value_get_string(value); if(audio_file->filename == filename){ return; } if(audio_file->filename != NULL){ g_free(audio_file->filename); } audio_file->filename = g_strdup(filename); } break; case PROP_START_CHANNEL: { audio_file->start_channel = g_value_get_uint(value); } break; case PROP_AUDIO_CHANNELS: { audio_file->audio_channels = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAudioFile *audio_file; audio_file = AGS_AUDIO_FILE(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, audio_file->soundcard); } break; case PROP_FILENAME: { g_value_set_string(value, audio_file->filename); } break; case PROP_START_CHANNEL: { g_value_set_uint(value, audio_file->start_channel); } break; case PROP_AUDIO_CHANNELS: { g_value_set_uint(value, audio_file->audio_channels); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_file_finalize(GObject *gobject) { AgsAudioFile *audio_file; GList *list, *list_next; audio_file = AGS_AUDIO_FILE(gobject); /* AgsAudioSignal */ list = audio_file->audio_signal; while(list != NULL){ list_next = list->next; g_object_unref(G_OBJECT(list->data)); g_list_free1(list); list = list_next; } /* file */ g_object_unref(audio_file->playable); G_OBJECT_CLASS(ags_audio_file_parent_class)->finalize(gobject); } void ags_audio_file_connect(AgsConnectable *connectable) { /* empty */ } void ags_audio_file_disconnect(AgsConnectable *connectable) { /* empty */ } gboolean ags_audio_file_check_suffix(gchar *filename) { if(g_str_has_suffix(filename, ".wav") || g_str_has_suffix(filename, ".ogg") || g_str_has_suffix(filename, ".flac") || g_str_has_suffix(filename, ".aiff")){ return(TRUE); } return(FALSE); } /** * ags_audio_file_open: * @audio_file: the #AgsAudioFile * * Open the #AgsAudioFile in read mode. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_audio_file_open(AgsAudioFile *audio_file) { #ifdef AGS_DEBUG g_message("ags_audio_file_open: %s", audio_file->filename); #endif if(g_file_test(audio_file->filename, G_FILE_TEST_EXISTS)){ if(g_str_has_suffix(audio_file->filename, ".wav") || g_str_has_suffix(audio_file->filename, ".ogg") || g_str_has_suffix(audio_file->filename, ".flac") || g_str_has_suffix(audio_file->filename, ".aiff")){ GError *error; guint loop_start, loop_end; audio_file->playable = (GObject *) ags_sndfile_new(); if(ags_playable_open(AGS_PLAYABLE(audio_file->playable), audio_file->filename)){ //FIXME:JK: this call should occure just before reading frames because of the new iterate functions of an AgsPlayable error = NULL; ags_playable_info(AGS_PLAYABLE(audio_file->playable), &(audio_file->channels), &(audio_file->frames), &loop_start, &loop_end, &error); if(error != NULL){ g_error("%s", error->message); } return(TRUE); } }else{ g_message("ags_audio_file_open: unknown file type\n"); } } return(FALSE); } /** * ags_audio_file_rw_open: * @audio_file: the #AgsAudioFile * @create: create the file * * Open the #AgsAudioFile in read/write mode. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_audio_file_rw_open(AgsAudioFile *audio_file, gboolean create) { #ifdef AGS_DEBUG g_message("ags_audio_file_rw_open: %s", audio_file->filename); #endif if(!create && !g_file_test(audio_file->filename, G_FILE_TEST_EXISTS)){ return(FALSE); } if(g_str_has_suffix(audio_file->filename, ".wav") || g_str_has_suffix(audio_file->filename, ".ogg") || g_str_has_suffix(audio_file->filename, ".flac") || g_str_has_suffix(audio_file->filename, ".aiff")){ GError *error; guint loop_start, loop_end; audio_file->playable = (GObject *) ags_sndfile_new(); //TODO:JK: verify removal // ags_playable_set_presets(AGS_PLAYABLE(audio_file->playable), // audio_file->samplerate, // AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE, // audio_file->channels, // audio_file->format); // ags_playable_set_frames(AGS_PLAYABLE(audio_file->playable), // audio_file->frames); if(ags_playable_rw_open(AGS_PLAYABLE(audio_file->playable), audio_file->filename, create, audio_file->samplerate, audio_file->channels, audio_file->frames, audio_file->format)){ error = NULL; if(error != NULL){ g_error("%s", error->message); } return(TRUE); }else{ return(FALSE); } }else{ g_message("ags_audio_file_open: unknown file type\n"); return(FALSE); } } /** * ags_audio_file_open_from_data: * @audio_file: the #AgsAudioFile * @data: the audio data * * Open #AgsAudioFile using virtual functions. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_audio_file_open_from_data(AgsAudioFile *audio_file, gchar *data) { #ifdef AGS_DEBUG g_message("ags_audio_file_open_from_data:"); #endif if(data != NULL){ if(g_str_has_suffix(audio_file->filename, ".wav") || g_str_has_suffix(audio_file->filename, ".ogg") || g_str_has_suffix(audio_file->filename, ".flac") || g_str_has_suffix(audio_file->filename, ".aiff")){ GError *error; guint loop_start, loop_end; audio_file->playable = (GObject *) ags_sndfile_new(); AGS_SNDFILE(audio_file->playable)->flags = AGS_SNDFILE_VIRTUAL; if(ags_playable_open(AGS_PLAYABLE(audio_file->playable), audio_file->filename)){ AGS_SNDFILE(audio_file->playable)->pointer = g_base64_decode(data, &(AGS_SNDFILE(audio_file->playable)->length)); AGS_SNDFILE(audio_file->playable)->current = AGS_SNDFILE(audio_file->playable)->pointer; error = NULL; ags_playable_info(AGS_PLAYABLE(audio_file->playable), &(audio_file->channels), &(audio_file->frames), &loop_start, &loop_end, &error); if(error != NULL){ g_error("%s", error->message); } return(TRUE); } }else{ g_message("ags_audio_file_open: unknown file type\n"); } } return(FALSE); } /** * ags_audio_file_close: * @audio_file: the #AgsAudioFile * * Close the #AgsAudioFile. * * Since: 1.0.0 */ void ags_audio_file_close(AgsAudioFile *audio_file) { ags_playable_close(AGS_PLAYABLE(audio_file->playable)); } /** * ags_audio_file_read_audio_signal: * @audio_file: the #AgsAudioFile * * Convert the #AgsAudioFile to a #GList of buffers. * * Since: 1.0.0 */ void ags_audio_file_read_audio_signal(AgsAudioFile *audio_file) { GList *list; list = ags_playable_read_audio_signal(AGS_PLAYABLE(audio_file->playable), audio_file->soundcard, audio_file->start_channel, audio_file->audio_channels); audio_file->audio_signal = list; } /** * ags_audio_file_seek: * @audio_file: the #AgsAudioFile * @frames: number of frames to seek * @whence: SEEK_SET, SEEK_CUR, or SEEK_END * * Position the #AgsAudioFile's internal data address. * * Since: 1.0.0 */ void ags_audio_file_seek(AgsAudioFile *audio_file, guint frames, gint whence) { ags_playable_seek(AGS_PLAYABLE(audio_file->playable), frames, whence); } /** * ags_audio_file_write: * @audio_file: the #AgsAudioFile * @buffer: the audio data * @buffer_size: the count of frames to write * @format: the format * * Write the buffer to #AgsAudioFile. * * Since: 1.0.0 */ void ags_audio_file_write(AgsAudioFile *audio_file, void *buffer, guint buffer_size, guint format) { double *playable_buffer; guint copy_mode; guint i; if(audio_file == NULL || buffer == NULL){ return; } playable_buffer = (double *) malloc(audio_file->channels * buffer_size * sizeof(double)); copy_mode = ags_audio_buffer_util_get_copy_mode(AGS_AUDIO_BUFFER_UTIL_DOUBLE, ags_audio_buffer_util_format_from_soundcard(format)); for(i = 0; i < audio_file->channels; i++){ ags_audio_buffer_util_clear_double(&(playable_buffer[i]), audio_file->channels, buffer_size); ags_audio_buffer_util_copy_buffer_to_buffer(playable_buffer, audio_file->channels, i, buffer, audio_file->channels, i, buffer_size, copy_mode); } ags_playable_write(AGS_PLAYABLE(audio_file->playable), playable_buffer, buffer_size); free(playable_buffer); } /** * ags_audio_file_flush: * @audio_file: the #AgsAudioFile * * Flushes the #AgsAudioFile's internal buffer. * * Since: 1.0.0 */ void ags_audio_file_flush(AgsAudioFile *audio_file) { ags_playable_flush(AGS_PLAYABLE(audio_file->playable)); } /** * ags_audio_file_new: * @filename: the filename * @soundcard: defaults of #AgsSoundcard * @start_channel: ommited channels * @audio_channels: number of channels to read * * Creates an #AgsAudioFile. * * Returns: an empty #AgsAudioFile. * * Since: 1.0.0 */ AgsAudioFile* ags_audio_file_new(gchar *filename, GObject *soundcard, guint start_channel, guint audio_channels) { AgsAudioFile *audio_file; audio_file = (AgsAudioFile *) g_object_new(AGS_TYPE_AUDIO_FILE, "filename", filename, "soundcard", soundcard, "start-channel", start_channel, "audio-channels", audio_channels, NULL); return(audio_file); } gsequencer-1.4.24/ags/audio/file/ags_audio_file_link.c0000644000175000017500000003662613246707333017616 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_audio_file_link_class_init(AgsAudioFileLinkClass *audio_file_link); void ags_audio_file_link_plugin_interface_init(AgsPluginInterface *plugin); void ags_audio_file_link_init(AgsAudioFileLink *audio_file_link); void ags_audio_file_link_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_audio_file_link_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_audio_file_link_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_audio_file_link_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_audio_file_link_finalize(GObject *gobject); void ags_audio_file_link_read_launch(AgsFileLaunch *file_launch, AgsAudioFileLink *audio_file_link); /** * SECTION:ags_audio_file_link * @short_description: link objects read of file. * @title: AgsAudioFileLink * @section_id: * @include: ags/file/ags_audio_file_link.h * * The #AgsAudioFileLink links read objects of file. */ enum{ PROP_0, PROP_PRESET, PROP_INSTRUMENT, PROP_SAMPLE, PROP_AUDIO_CHANNEL, PROP_TIMESTAMP, }; static gpointer ags_audio_file_link_parent_class = NULL; static AgsPluginInterface *ags_audio_file_link_parent_plugin_interface; static const gchar *ags_audio_file_link_plugin_name = "ags-audio-file-link"; GType ags_audio_file_link_get_type() { static GType ags_type_audio_file_link = 0; if(!ags_type_audio_file_link){ static const GTypeInfo ags_audio_file_link_info = { sizeof (AgsAudioFileLinkClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_file_link_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAudioFileLink), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_file_link_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_audio_file_link_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audio_file_link = g_type_register_static(AGS_TYPE_FILE_LINK, "AgsAudioFileLink", &ags_audio_file_link_info, 0); g_type_add_interface_static(ags_type_audio_file_link, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_audio_file_link); } void ags_audio_file_link_class_init(AgsAudioFileLinkClass *audio_file_link) { GObjectClass *gobject; GParamSpec *param_spec; ags_audio_file_link_parent_class = g_type_class_peek_parent(audio_file_link); /* GObjectClass */ gobject = (GObjectClass *) audio_file_link; gobject->set_property = ags_audio_file_link_set_property; gobject->get_property = ags_audio_file_link_get_property; gobject->finalize = ags_audio_file_link_finalize; /* properties */ /** * AgsAudioFileLink:preset: * * The assigned preset. * * Since: 1.0.0 */ param_spec = g_param_spec_string("preset", i18n_pspec("the preset"), i18n_pspec("The preset to locate the file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PRESET, param_spec); /** * AgsAudioFileLink:instrument: * * The assigned instrument. * * Since: 1.0.0 */ param_spec = g_param_spec_string("instrument", i18n_pspec("the instrument"), i18n_pspec("The instrument to locate the file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INSTRUMENT, param_spec); /** * AgsAudioFileLink:sample: * * The assigned sample. * * Since: 1.0.0 */ param_spec = g_param_spec_string("sample", i18n_pspec("the sample"), i18n_pspec("The sample to locate the file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLE, param_spec); /** * AgsAudioFileLink:audio-channel: * * The assigned audio channel. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("audio channel to read"), i18n_pspec("The selected audio channel to read"), 0, 256, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsAudioFileLink:timestamp: * * The assigned timestamp. * * Since: 1.0.0 */ param_spec = g_param_spec_object("timestamp", i18n_pspec("timestamp"), i18n_pspec("The timestamp"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TIMESTAMP, param_spec); } void ags_audio_file_link_plugin_interface_init(AgsPluginInterface *plugin) { ags_audio_file_link_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_audio_file_link_read; plugin->write = ags_audio_file_link_write; } void ags_audio_file_link_init(AgsAudioFileLink *audio_file_link) { audio_file_link->preset = NULL; audio_file_link->instrument = NULL; audio_file_link->sample = NULL; audio_file_link->audio_channel = 0; audio_file_link->timestamp = NULL; } void ags_audio_file_link_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAudioFileLink *audio_file_link; audio_file_link = AGS_AUDIO_FILE_LINK(gobject); switch(prop_id){ case PROP_PRESET: { char *preset; preset = (char *) g_value_get_string(value); if(preset == audio_file_link->preset){ return; } if(audio_file_link->preset != NULL){ free(audio_file_link->preset); } audio_file_link->preset = g_strdup(preset); } break; case PROP_INSTRUMENT: { char *instrument; instrument = (char *) g_value_get_string(value); if(instrument == audio_file_link->instrument){ return; } if(audio_file_link->instrument != NULL){ free(audio_file_link->instrument); } audio_file_link->instrument = g_strdup(instrument); } break; case PROP_SAMPLE: { char *sample; sample = (char *) g_value_get_string(value); if(sample == audio_file_link->sample){ return; } if(audio_file_link->sample != NULL){ free(audio_file_link->sample); } audio_file_link->sample = g_strdup(sample); } break; case PROP_AUDIO_CHANNEL: { audio_file_link->audio_channel = g_value_get_uint(value); } break; case PROP_TIMESTAMP: { GObject *timestamp; timestamp = (GObject *) g_value_get_object(value); if((AgsTimestamp *) timestamp == audio_file_link->timestamp){ return; } if(audio_file_link->timestamp != NULL){ g_object_unref(audio_file_link->timestamp); } if(timestamp != NULL){ g_object_ref(timestamp); } audio_file_link->timestamp = (AgsTimestamp *) timestamp; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_file_link_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAudioFileLink *audio_file_link; audio_file_link = AGS_AUDIO_FILE_LINK(gobject); switch(prop_id){ case PROP_PRESET: { g_value_set_string(value, audio_file_link->preset); } break; case PROP_INSTRUMENT: { g_value_set_string(value, audio_file_link->instrument); } break; case PROP_SAMPLE: { g_value_set_string(value, audio_file_link->sample); } break; case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, audio_file_link->audio_channel); } break; case PROP_TIMESTAMP: { g_value_set_object(value, audio_file_link->timestamp); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_file_link_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsAudioFileLink *gobject; AgsFileLaunch *file_launch; xmlChar *str; gobject = AGS_AUDIO_FILE_LINK(plugin); /* read audio channel */ str = xmlGetProp(node, "audio-channel"); if(str != NULL){ gobject->audio_channel = g_ascii_strtoull(str, NULL, 10); }else{ gobject->audio_channel = 0; } //TODO:JK: add missing file_launch = (AgsFileLaunch *) g_object_new(AGS_TYPE_FILE_LAUNCH, "file", file, "node", node, NULL); g_signal_connect(G_OBJECT(file_launch), "start", G_CALLBACK(ags_audio_file_link_read_launch), gobject); ags_file_add_launch(file, (GObject *) file_launch); } xmlNode* ags_audio_file_link_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsAudioFileLink *audio_file_link; xmlNode *node; gchar *id; audio_file_link = AGS_AUDIO_FILE_LINK(plugin); /* allocate new node with uuid */ id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-audio-file-link"); xmlNewProp(node, AGS_FILE_ID_PROP, id); /* add reference and node to file object */ ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", audio_file_link, NULL)); /* write audio channel */ xmlNewProp(node, "audio-channel", g_strdup_printf("%d", audio_file_link->audio_channel)); //TODO:JK: add missing /* write timestamp */ if(audio_file_link->timestamp != NULL){ ags_file_write_timestamp(file, node, audio_file_link->timestamp); } return(node); } void ags_audio_file_link_finalize(GObject *gobject) { AgsAudioFileLink *audio_file_link; audio_file_link = AGS_AUDIO_FILE_LINK(gobject); if(audio_file_link->timestamp != NULL){ g_object_unref(audio_file_link->timestamp); } } void ags_audio_file_link_read_launch(AgsFileLaunch *file_launch, AgsAudioFileLink *audio_file_link) { AgsAudio *audio; AgsChannel *input; AgsAudioFile *audio_file; AgsFileIdRef *id_ref; GObject *soundcard; GList *audio_signal; xmlNode *node, *child; xmlChar *type; xmlChar *filename; xmlChar *encoding, *demuxer; guint audio_channels; guint audio_channel; node = file_launch->node; soundcard = NULL; audio_channel = audio_file_link->audio_channel; filename = NULL; /* retrieve input */ input = NULL; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_node((AgsFile *) file_launch->file, node->parent->parent->parent); if(id_ref != NULL){ input = (AgsChannel *) id_ref->ref; soundcard = input->soundcard; } /* get audio */ if(input != NULL && input->audio != NULL){ audio = AGS_AUDIO(input->audio); audio_channels = audio->audio_channels; }else{ audio_channels = 1; } /* read file link using URL or embedded */ type = xmlGetProp(node->parent, "type"); if(!xmlStrncmp(type, "url", 4)){ //TODO:JK: add missing /* instantiat audio file */ filename = AGS_FILE_LINK(audio_file_link)->filename; audio_file = ags_audio_file_new((gchar *) filename, soundcard, 0, audio_channels); /* open file and read audio signal */ ags_audio_file_open(audio_file); ags_audio_file_read_audio_signal(audio_file); /* retrieve audio channel */ audio_signal = g_list_nth(audio_file->audio_signal, audio_channel); if(audio_signal == NULL){ return; } /* set template flag */ AGS_AUDIO_SIGNAL(audio_signal->data)->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; /* unlink if needed */ if(input != NULL && input->link != NULL){ GError *error; error = NULL; ags_channel_set_link(input, NULL, &error); if(error != NULL){ g_warning("%s", error->message); } } /* set file link */ g_object_set(G_OBJECT(input), "file-link", g_object_new(AGS_TYPE_FILE_LINK, "filename", filename, NULL), NULL); if(input == NULL || audio_signal == NULL){ return; } /* add audio signal */ ags_recycling_add_audio_signal(input->first_recycling, AGS_AUDIO_SIGNAL(audio_signal->data)); }else if(!xmlStrncmp(type, "embedded", 9)){ xmlXPathContext *xpath_context; xmlXPathObject *xpath_object; /* */ xpath_context = xmlXPathNewContext(AGS_FILE(file_launch->file)->doc); // xmlXPathSetContextNode(node, // xpath_context); xpath_context->node = node; xpath_object = xmlXPathEval("./ags-embedded-audio", xpath_context); child = NULL; if(xpath_object->nodesetval != NULL && xpath_object->nodesetval->nodeTab != NULL){ guint i; for(i = 0; i < xpath_object->nodesetval->nodeNr; i++){ if(xpath_object->nodesetval->nodeTab[i]->type == XML_ELEMENT_NODE){ child = xpath_object->nodesetval->nodeTab[i]; break; } } } if(child != NULL){ /**/ encoding = xmlGetProp(child, "encoding"); demuxer = xmlGetProp(child, "demuxer"); if(!xmlStrncmp(encoding, "base64", 7)){ if(!xmlStrncmp(demuxer, "raw", 4)){ gchar *data; audio_file = ags_audio_file_new(NULL, soundcard, 0, audio_channels); data = child->content; ags_audio_file_open_from_data(audio_file, data); ags_audio_file_read_audio_signal(audio_file); audio_signal = audio_file->audio_signal; if(input == NULL || audio_signal == NULL){ return; } ags_recycling_add_audio_signal(input->first_recycling, AGS_AUDIO_SIGNAL(audio_signal->data)); } } } } } /** * ags_audio_file_link_new: * * Creates an #AgsAudioFileLink * * Returns: a new #AgsAudioFileLink * * Since: 1.0.0 */ AgsAudioFileLink* ags_audio_file_link_new() { AgsAudioFileLink *audio_file_link; audio_file_link = (AgsAudioFileLink *) g_object_new(AGS_TYPE_AUDIO_FILE_LINK, NULL); return(audio_file_link); } gsequencer-1.4.24/ags/audio/ags_wave.h0000644000175000017500000001101413256163135014506 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_WAVE_H__ #define __AGS_WAVE_H__ #include #include #include #include #include #define AGS_TYPE_WAVE (ags_wave_get_type()) #define AGS_WAVE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WAVE, AgsWave)) #define AGS_WAVE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_WAVE, AgsWaveClass)) #define AGS_IS_WAVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_WAVE)) #define AGS_IS_WAVE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_WAVE)) #define AGS_WAVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_WAVE, AgsWaveClass)) #define AGS_WAVE_DEFAULT_BPM (120.0) #define AGS_WAVE_TICS_PER_BEAT (1.0) #define AGS_WAVE_MINIMUM_BUFFER_LENGTH (1.0 / 16.0) #define AGS_WAVE_DEFAULT_LENGTH (65535.0 / AGS_WAVE_TICS_PER_BEAT - AGS_WAVE_MINIMUM_BUFFER_LENGTH) #define AGS_WAVE_DEFAULT_JIFFIE (60.0 / AGS_WAVE_DEFAULT_BPM / AGS_WAVE_TICS_PER_BEAT) #define AGS_WAVE_DEFAULT_DURATION (AGS_WAVE_DEFAULT_LENGTH * AGS_WAVE_DEFAULT_JIFFIE * AGS_MICROSECONDS_PER_SECOND) #define AGS_WAVE_DEFAULT_OFFSET (64 * (1 / AGS_WAVE_MINIMUM_BUFFER_LENGTH)) #define AGS_WAVE_CLIPBOARD_VERSION "1.4.0" #define AGS_WAVE_CLIPBOARD_TYPE "AgsWaveClipboardXml" #define AGS_WAVE_CLIPBOARD_FORMAT "AgsWaveNativeLevel" typedef struct _AgsWave AgsWave; typedef struct _AgsWaveClass AgsWaveClass; /** * AgsWaveFlags: * @AGS_WAVE_CONNECTED: indicates the wave was connected by calling #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsWave by * enable/disable as flags. */ typedef enum{ AGS_WAVE_CONNECTED = 1, }AgsWaveFlags; struct _AgsWave { GObject gobject; guint flags; AgsTimestamp *timestamp; GObject *audio; guint audio_channel; guint samplerate; guint buffer_size; guint format; GList *buffer; gdouble loop_start; gdouble loop_end; gdouble offset; GList *selection; }; struct _AgsWaveClass { GObjectClass gobject; }; GType ags_wave_get_type(void); void ags_wave_set_samplerate(AgsWave *wave, guint samplerate); void ags_wave_set_buffer_size(AgsWave *wave, guint buffer_size); void ags_wave_set_format(AgsWave *wave, guint format); GList* ags_wave_find_near_timestamp(GList *wave, guint audio_channel, AgsTimestamp *timestamp); GList* ags_wave_add(GList *wave, AgsWave *new_wave); void ags_wave_add_buffer(AgsWave *wave, AgsBuffer *buffer, gboolean use_selection_list); void ags_wave_remove_buffer(AgsWave *wave, AgsBuffer *buffer, gboolean use_selection_list); GList* ags_wave_get_selection(AgsWave *wave); gboolean ags_wave_is_buffer_selected(AgsWave *wave, AgsBuffer *buffer); GList* ags_wave_find_region(AgsWave *wave, guint x0, guint x1, gboolean use_selection_list); void ags_wave_free_selection(AgsWave *wave); void ags_wave_add_region_to_selection(AgsWave *wave, guint x0, guint x1, gboolean replace_current_selection); void ags_wave_remove_region_from_selection(AgsWave *wave, guint x0, guint x1); void ags_wave_add_all_to_selection(AgsWave *wave); xmlNode* ags_wave_copy_selection(AgsWave *wave); xmlNode* ags_wave_cut_selection(AgsWave *wave); void ags_wave_insert_from_clipboard(AgsWave *wave, xmlNode *wave_node, gboolean reset_x_offset, guint x_offset, gdouble delay, guint attack); void ags_wave_insert_from_clipboard_extended(AgsWave *wave, xmlNode *wave_node, gboolean reset_x_offset, guint x_offset, gdouble delay, guint attack, gboolean match_audio_channel, gboolean do_replace); AgsWave* ags_wave_new(GObject *audio, guint audio_channel); #endif /*__AGS_WAVE_H__*/ gsequencer-1.4.24/ags/audio/ags_recall.h0000644000175000017500000002420113256163135015010 00000000000000/* 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 . */ #ifndef __AGS_RECALL_H__ #define __AGS_RECALL_H__ #include #include #include #include #include #include #define AGS_TYPE_RECALL (ags_recall_get_type()) #define AGS_RECALL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL, AgsRecall)) #define AGS_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL, AgsRecallClass)) #define AGS_IS_RECALL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RECALL)) #define AGS_IS_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RECALL)) #define AGS_RECALL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RECALL, AgsRecallClass)) #define AGS_RECALL_HANDLER(handler) ((AgsRecallHandler *)(handler)) #define AGS_RECALL_DEFAULT_VERSION "0.4.2" #define AGS_RECALL_DEFAULT_BUILD_ID "CEST 02-10-2014 19:36" typedef struct _AgsRecall AgsRecall; typedef struct _AgsRecallClass AgsRecallClass; typedef struct _AgsRecallHandler AgsRecallHandler; /** * AgsRecallFlags: * @AGS_RECALL_ADDED_TO_REGISTRY: recall has been added to registry * @AGS_RECALL_CONNECTED: indicates the port was connected by calling #AgsConnectable::connect() * @AGS_RECALL_RUN_INITIALIZED: run initialized * @AGS_RECALL_TEMPLATE: is template * @AGS_RECALL_PLAYBACK: does playback * @AGS_RECALL_SEQUENCER: does sequencer * @AGS_RECALL_NOTATION: does notation * @AGS_RECALL_DEFAULT_TEMPLATE: * @AGS_RECALL_DYNAMIC_CONNECTED: dynamic connected * @AGS_RECALL_INPUT_ORIENTATED: input orientated * @AGS_RECALL_OUTPUT_ORIENTATED: output orientated * @AGS_RECALL_PERSISTENT: persistent processing * @AGS_RECALL_INITIAL_RUN: initial call to #AgsRecall::run() * @AGS_RECALL_TERMINATING: is terminating * @AGS_RECALL_DONE: is done * @AGS_RECALL_REMOVE: is remove * @AGS_RECALL_HIDE: is hidden * @AGS_RECALL_PROPAGATE_DONE: propagate done * @AGS_RECALL_PERSISTENT_PLAYBACK: persistent playback * @AGS_RECALL_PERSISTENT_SEQUENCER: persistent sequencer * @AGS_RECALL_PERSISTENT_NOTATION: persistent notation * @AGS_RECALL_SKIP_DEPENDENCIES: skip dependencies * @AGS_RECALL_BULK_MODE: the recall operates on bulk mode * @AGS_RECALL_HAS_OUTPUT_PORT: has output port * @AGS_RECALL_RUN_FIRST: scheduled for run-first * @AGS_RECALL_RUN_LAST: scheduled for run-last * * Enum values to control the behavior or indicate internal state of #AgsRecall by * enable/disable as flags. */ typedef enum{ AGS_RECALL_ADDED_TO_REGISTRY = 1, AGS_RECALL_CONNECTED = 1 << 1, AGS_RECALL_RUN_INITIALIZED = 1 << 2, //TODO:JK: rename to AGS_RECALL_RUN_CONNECTED AGS_RECALL_TEMPLATE = 1 << 3, AGS_RECALL_PLAYBACK = 1 << 4, AGS_RECALL_SEQUENCER = 1 << 5, AGS_RECALL_NOTATION = 1 << 6, AGS_RECALL_DEFAULT_TEMPLATE = 1 << 7, AGS_RECALL_DYNAMIC_CONNECTED = 1 << 8, AGS_RECALL_INPUT_ORIENTATED = 1 << 9, AGS_RECALL_OUTPUT_ORIENTATED = 1 << 10, AGS_RECALL_PERSISTENT = 1 << 11, AGS_RECALL_INITIAL_RUN = 1 << 12, AGS_RECALL_TERMINATING = 1 << 13, AGS_RECALL_DONE = 1 << 14, AGS_RECALL_REMOVE = 1 << 15, AGS_RECALL_HIDE = 1 << 16, AGS_RECALL_PROPAGATE_DONE = 1 << 17, // see ags_recall_real_remove AGS_RECALL_PERSISTENT_PLAYBACK = 1 << 18, AGS_RECALL_PERSISTENT_SEQUENCER = 1 << 19, AGS_RECALL_PERSISTENT_NOTATION = 1 << 20, AGS_RECALL_SKIP_DEPENDENCIES = 1 << 21, AGS_RECALL_BULK_MODE = 1 << 22, AGS_RECALL_HAS_OUTPUT_PORT = 1 << 23, AGS_RECALL_RUN_FIRST = 1 << 24, AGS_RECALL_RUN_LAST = 1 << 25, AGS_RECALL_PACKED = 1 << 26, }AgsRecallFlags; /** * AgsRecallNotifyDependencyMode: * @AGS_RECALL_NOTIFY_RUN: notify dependency as calling run * @AGS_RECALL_NOTIFY_AUDIO: notify dependency audio * @AGS_RECALL_NOTIFY_AUDIO_RUN: notifiy dependency audio run * @AGS_RECALL_NOTIFY_CHANNEL: notifiy dependency channel * @AGS_RECALL_NOTIFY_CHANNEL_RUN: notifiy dependency channel run * @AGS_RECALL_NOTIFY_RECALL: notifiy dependency recall * */ typedef enum{ AGS_RECALL_NOTIFY_RUN, AGS_RECALL_NOTIFY_AUDIO, AGS_RECALL_NOTIFY_AUDIO_RUN, AGS_RECALL_NOTIFY_CHANNEL, AGS_RECALL_NOTIFY_CHANNEL_RUN, AGS_RECALL_NOTIFY_RECALL, }AgsRecallNotifyDependencyMode; struct _AgsRecall { GObject object; guint flags; gboolean rt_safe; gchar *version; gchar *build_id; gchar *effect; gchar *name; gchar *xml_type; GObject *soundcard; GObject *container; // see AgsRecallContainer GList *dependencies; AgsRecallID *recall_id; pthread_mutexattr_t *children_attr; pthread_mutex_t *children_mutex; AgsRecall *parent; GList *children; GType child_type; GParameter *child_parameters; guint n_params; GList *port; GList *automation_port; GList *handlers; }; struct _AgsRecallClass { GObjectClass object; void (*load_automation)(AgsRecall *recall, GList *automation_port); void (*unload_automation)(AgsRecall *recall); void (*resolve_dependencies)(AgsRecall *recall); void (*run_init_pre)(AgsRecall *recall); void (*run_init_inter)(AgsRecall *recall); void (*run_init_post)(AgsRecall *recall); void (*check_rt_stream)(AgsRecall *recall); void (*automate)(AgsRecall *recall); void (*run_pre)(AgsRecall *recall); void (*run_inter)(AgsRecall *recall); void (*run_post)(AgsRecall *recall); void (*stop_persistent)(AgsRecall *recall); void (*done)(AgsRecall *recall); void (*cancel)(AgsRecall *recall); void (*remove)(AgsRecall *recall); AgsRecall* (*duplicate)(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *params); // if a sequencer is linked with a sequencer the AgsRecall's with the flag AGS_RECALL_SOURCE must be duplicated void (*notify_dependency)(AgsRecall *recall, guint dependency, gboolean increase); void (*child_added)(AgsRecall *recall, AgsRecall *child); }; /** * AgsRecallHandler: * @signal_name: the signal to listen * @callback: the callback to use * @data: user data to pass * @handler: the handler id * * A #AgsRecallHandler-struct acts as a callback definition */ struct _AgsRecallHandler { const gchar *signal_name; GCallback callback; GObject *data; gulong handler; }; GType ags_recall_get_type(); void ags_recall_set_flags(AgsRecall *recall, guint flags); void ags_recall_load_automation(AgsRecall *recall, GList *automation_port); void ags_recall_unload_automation(AgsRecall *recall); void ags_recall_resolve_dependencies(AgsRecall *recall); void ags_recall_child_added(AgsRecall *parent, AgsRecall *child); void ags_recall_run_init_pre(AgsRecall *recall); void ags_recall_run_init_inter(AgsRecall *recall); void ags_recall_run_init_post(AgsRecall *recall); void ags_recall_check_rt_stream(AgsRecall *recall); void ags_recall_automate(AgsRecall *recall); void ags_recall_run_pre(AgsRecall *recall); void ags_recall_run_inter(AgsRecall *recall); void ags_recall_run_post(AgsRecall *recall); void ags_recall_stop_persistent(AgsRecall *recall); void ags_recall_done(AgsRecall *recall); void ags_recall_cancel(AgsRecall *recall); void ags_recall_remove(AgsRecall *recall); gboolean ags_recall_is_done(GList *recalls, GObject *recycling_context); AgsRecall* ags_recall_duplicate(AgsRecall *recall, AgsRecallID *recall_id); void ags_recall_set_recall_id(AgsRecall *recall, AgsRecallID *recall_id); void ags_recall_set_soundcard_recursive(AgsRecall *recall, GObject *soundcard); void ags_recall_notify_dependency(AgsRecall *recall, guint flags, gint count); void ags_recall_add_dependency(AgsRecall *recall, AgsRecallDependency *recall_dependency); void ags_recall_remove_dependency(AgsRecall *recall, AgsRecall *dependency); GList* ags_recall_get_dependencies(AgsRecall *recall); void ags_recall_remove_child(AgsRecall *recall, AgsRecall *child); void ags_recall_add_child(AgsRecall *parent, AgsRecall *child); GList* ags_recall_get_children(AgsRecall *recall); GList* ags_recall_get_by_effect(GList *list, gchar *filename, gchar *effect); GList* ags_recall_find_recall_id_with_effect(GList *list, AgsRecallID *recall_id, gchar *filename, gchar *effect); GList* ags_recall_find_type(GList *recall_i, GType type); GList* ags_recall_find_template(GList *recall_i); GList* ags_recall_template_find_type(GList *recall_i, GType type); GList* ags_recall_template_find_all_type(GList *recall_i, ...); GList* ags_recall_find_type_with_recycling_context(GList *recall_i, GType type, GObject *recycling_context); GList* ags_recall_find_recycling_context(GList *recall_i, GObject *recycling_context); GList* ags_recall_find_provider(GList *recall, GObject *provider); GList* ags_recall_template_find_provider(GList *recall, GObject *provider); GList* ags_recall_find_provider_with_recycling_context(GList *recall_i, GObject *provider, GObject *recycling_context); void ags_recall_run_init(AgsRecall *recall, guint stage); AgsRecallHandler* ags_recall_handler_alloc(const gchar *signal_name, GCallback callback, GObject *data); void ags_recall_add_handler(AgsRecall *recall, AgsRecallHandler *recall_handler); void ags_recall_remove_handler(AgsRecall *recall, AgsRecallHandler *recall_handler); void ags_recall_lock_port(AgsRecall *recall); void ags_recall_unlock_port(AgsRecall *recall); AgsRecall* ags_recall_new(); #endif /*__AGS_RECALL_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_audio.c0000644000175000017500000003555113247044247016200 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_recall_audio_class_init(AgsRecallAudioClass *recall_audio); void ags_recall_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_audio_packable_interface_init(AgsPackableInterface *packable); void ags_recall_audio_init(AgsRecallAudio *recall_audio); void ags_recall_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_audio_connect(AgsConnectable *connectable); void ags_recall_audio_disconnect(AgsConnectable *connectable); gboolean ags_recall_audio_pack(AgsPackable *packable, GObject *container); gboolean ags_recall_audio_unpack(AgsPackable *packable); void ags_recall_audio_dispose(GObject *gobject); void ags_recall_audio_finalize(GObject *gobject); void ags_recall_audio_load_automation(AgsRecall *recall, GList *automation_port); void ags_recall_audio_unload_automation(AgsRecall *recall); void ags_recall_audio_automate(AgsRecall *recall); AgsRecall* ags_recall_audio_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_recall_audio * @short_description: audio context of recall * @title: AgsRecallAudio * @section_id: * @include: ags/audio/ags_recall_audio.h * * #AgsRecallAudio acts as audio recall. */ enum{ PROP_0, PROP_AUDIO, }; static gpointer ags_recall_audio_parent_class = NULL; static AgsConnectableInterface* ags_recall_audio_parent_connectable_interface; static AgsPackableInterface* ags_recall_audio_parent_packable_interface; GType ags_recall_audio_get_type() { static GType ags_type_recall_audio = 0; if(!ags_type_recall_audio){ static const GTypeInfo ags_recall_audio_info = { sizeof (AgsRecallAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_packable_interface_info = { (GInterfaceInitFunc) ags_recall_audio_packable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_audio = g_type_register_static(AGS_TYPE_RECALL, "AgsRecallAudio", &ags_recall_audio_info, 0); g_type_add_interface_static(ags_type_recall_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_audio, AGS_TYPE_PACKABLE, &ags_packable_interface_info); } return(ags_type_recall_audio); } void ags_recall_audio_class_init(AgsRecallAudioClass *recall_audio) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_audio_parent_class = g_type_class_peek_parent(recall_audio); /* GObjectClass */ gobject = (GObjectClass *) recall_audio; gobject->dispose = ags_recall_audio_dispose; gobject->finalize = ags_recall_audio_finalize; gobject->set_property = ags_recall_audio_set_property; gobject->get_property = ags_recall_audio_get_property; /* properties */ /** * AgsRecallAudio:audio: * * The assigned audio. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("assigned audio"), i18n_pspec("The audio object it is assigned to"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) recall_audio; recall->load_automation = ags_recall_audio_load_automation; recall->unload_automation = ags_recall_audio_unload_automation; recall->automate = ags_recall_audio_automate; recall->duplicate = ags_recall_audio_duplicate; } void ags_recall_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_audio_connect; connectable->disconnect = ags_recall_audio_disconnect; } void ags_recall_audio_packable_interface_init(AgsPackableInterface *packable) { ags_recall_audio_parent_packable_interface = g_type_interface_peek_parent(packable); packable->pack = ags_recall_audio_pack; packable->unpack = ags_recall_audio_unpack; } void ags_recall_audio_init(AgsRecallAudio *recall_audio) { recall_audio->flags = 0; recall_audio->samplerate = 0; recall_audio->buffer_size = 0; recall_audio->audio_buffer_util_format = 0; recall_audio->n_channels = 0; recall_audio->mapping = NULL; recall_audio->audio = NULL; } void ags_recall_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallAudio *recall_audio; recall_audio = AGS_RECALL_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; guint i; audio = (AgsAudio *) g_value_get_object(value); if(recall_audio->audio == audio){ return; } if(recall_audio->audio != NULL){ g_object_unref(recall_audio->audio); } if(audio != NULL){ g_object_ref(audio); /* get audio channels */ recall_audio->n_channels = audio->audio_channels; /* allocate mapping */ recall_audio->mapping = (guint *) malloc(recall_audio->n_channels * sizeof(guint)); for(i = 0; i < recall_audio->n_channels; i++){ recall_audio->mapping[i] = i; } } recall_audio->audio = audio; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallAudio *recall_audio; recall_audio = AGS_RECALL_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO: g_value_set_object(value, recall_audio->audio); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_audio_connect(AgsConnectable *connectable) { ags_recall_audio_parent_connectable_interface->connect(connectable); /* empty */ } void ags_recall_audio_disconnect(AgsConnectable *connectable) { ags_recall_audio_parent_connectable_interface->disconnect(connectable); /* empty */ } gboolean ags_recall_audio_pack(AgsPackable *packable, GObject *container) { AgsRecallContainer *recall_container; GList *list; if(ags_recall_audio_parent_packable_interface->pack(packable, container)) return(TRUE); recall_container = AGS_RECALL_CONTAINER(container); g_object_set(G_OBJECT(recall_container), "recall_audio", AGS_RECALL(packable), NULL); /* set in AgsRecallAudioRun */ list = recall_container->recall_audio_run; while(list != NULL){ g_object_set(G_OBJECT(list->data), "recall_audio", AGS_RECALL_AUDIO(packable), NULL); list = list->next; } return(FALSE); } gboolean ags_recall_audio_unpack(AgsPackable *packable) { AgsRecall *recall; AgsRecallContainer *recall_container; GList *list; recall = AGS_RECALL(packable); if(recall == NULL){ return(TRUE); } recall_container = AGS_RECALL_CONTAINER(recall->container); if(recall_container == NULL){ return(TRUE); } /* ref */ g_object_ref(recall); g_object_ref(recall_container); /* unset in AgsRecallAudioRun */ list = recall_container->recall_audio_run; while(list != NULL){ g_object_set(G_OBJECT(list->data), "recall_audio", NULL, NULL); list = list->next; } /* call parent */ if(ags_recall_audio_parent_packable_interface->unpack(packable)){ g_object_unref(recall); g_object_unref(recall_container); return(TRUE); } recall_container->recall_audio = NULL; /* unref */ g_object_unref(recall); g_object_unref(recall_container); return(FALSE); } void ags_recall_audio_dispose(GObject *gobject) { AgsRecallAudio *recall_audio; recall_audio = AGS_RECALL_AUDIO(gobject); /* unpack */ ags_packable_unpack(AGS_PACKABLE(recall_audio)); /* audio */ if(recall_audio->audio != NULL){ g_object_unref(G_OBJECT(recall_audio->audio)); recall_audio->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_audio_parent_class)->dispose(gobject); } void ags_recall_audio_finalize(GObject *gobject) { AgsRecallAudio *recall_audio; recall_audio = AGS_RECALL_AUDIO(gobject); /* audio */ if(recall_audio->audio != NULL){ g_object_unref(G_OBJECT(recall_audio->audio)); } if(recall_audio->mapping != NULL){ free(recall_audio->mapping); } /* call parent */ G_OBJECT_CLASS(ags_recall_audio_parent_class)->finalize(gobject); } void ags_recall_audio_load_automation(AgsRecall *recall, GList *automation_port) { AgsAudio *audio; GList *automation; audio = AGS_RECALL_AUDIO(recall)->audio; while(automation_port != NULL){ if((AGS_PORT_IS_OUTPUT & (AGS_PORT(automation_port->data)->flags)) != 0){ automation_port = automation_port->next; continue; } if(ags_automation_find_port(audio->automation, automation_port->data) == NULL){ AgsAutomation *current; current = ags_automation_new((GObject *) audio, 0, G_TYPE_NONE, AGS_PORT(automation_port->data)->specifier); g_object_set(current, "port", automation_port->data, NULL); ags_audio_add_automation(audio, (GObject *) current); //TODO:JK: property AGS_PORT(automation_port->data)->automation = ags_automation_add(AGS_PORT(automation_port->data)->automation, current); }else{ //TODO:JK: property if(g_list_find(AGS_PORT(automation_port->data)->automation, automation->data) == NULL){ AGS_PORT(automation_port->data)->automation = ags_automation_add(AGS_PORT(automation_port->data)->automation, automation->data); } } automation_port = automation_port->next; } if(recall->automation_port == NULL){ recall->automation_port = automation_port; }else{ recall->automation_port = g_list_concat(recall->automation_port, automation_port); } } void ags_recall_audio_unload_automation(AgsRecall *recall) { AgsAudio *audio; AgsAutomation *current; GList *automation; GList *automation_port; audio = AGS_RECALL_AUDIO(recall)->audio; automation_port = recall->automation_port; while(automation_port != NULL){ automation = audio->automation; while((automation = ags_automation_find_port(automation, (GObject *) automation_port->data)) != NULL){ current = automation->data; ags_audio_remove_automation(audio, (GObject *) current); automation = automation->next; } automation_port = automation_port->next; } g_list_free(recall->automation_port); recall->automation_port = NULL; } void ags_recall_audio_automate(AgsRecall *recall) { GObject *soundcard; AgsAudio *audio; AgsAutomation *current; GList *automation; GList *port; gdouble delay; guint note_offset, delay_counter; guint loop_left, loop_right; gboolean do_loop; double x, step; guint ret_x; gboolean return_prev_on_failure; audio = AGS_RECALL_AUDIO(recall)->audio; soundcard = audio->soundcard; /* retrieve position */ port = recall->port; note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(soundcard)); delay = ags_soundcard_get_delay(AGS_SOUNDCARD(soundcard)); delay_counter = ags_soundcard_get_delay_counter(AGS_SOUNDCARD(soundcard)); /* retrieve loop information */ ags_soundcard_get_loop(AGS_SOUNDCARD(soundcard), &loop_left, &loop_right, &do_loop); return_prev_on_failure = TRUE; if(do_loop && loop_left <= note_offset){ if(note_offset == loop_left){ return_prev_on_failure = TRUE; } } /* */ x = ((double) note_offset + (delay_counter / delay)) * ((1.0 / AGS_AUTOMATION_MINIMUM_ACCELERATION_LENGTH) * AGS_NOTATION_MINIMUM_NOTE_LENGTH); step = ((1.0 / AGS_AUTOMATION_MINIMUM_ACCELERATION_LENGTH) * AGS_NOTATION_MINIMUM_NOTE_LENGTH); while(port != NULL){ automation = (AgsAutomation *) AGS_PORT(port->data)->automation; while(automation != NULL){ current = automation->data; if(current->timestamp->timer.ags_offset.offset + AGS_AUTOMATION_DEFAULT_OFFSET < x){ automation = automation->next; continue; } if((AGS_AUTOMATION_BYPASS & (current->flags)) == 0){ GValue value = {0,}; ret_x = ags_automation_get_value(current, floor(x), ceil(x + step), return_prev_on_failure, &value); if(ret_x != G_MAXUINT){ ags_port_safe_write(port->data, &value); } } if(current->timestamp->timer.ags_offset.offset > ceil(x + step)){ break; } automation = automation->next; } port = port->next; } } AgsRecall* ags_recall_audio_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecallAudio *copy; /* duplicate */ copy = AGS_RECALL_AUDIO(AGS_RECALL_CLASS(ags_recall_audio_parent_class)->duplicate(recall, recall_id, n_params, parameter)); g_message("ags warning - ags_recall_audio_duplicate: you shouldn't do this %s\n", G_OBJECT_TYPE_NAME(recall)); return((AgsRecall *) copy); } /** * ags_recall_audio_new: * @audio: the assigned #AgsAudio * * Creates an #AgsRecallAudio. * * Returns: a new #AgsRecallAudio. * * Since: 1.0.0 */ AgsRecallAudio* ags_recall_audio_new(AgsAudio *audio) { AgsRecallAudio *recall_audio; recall_audio = (AgsRecallAudio *) g_object_new(AGS_TYPE_RECALL_AUDIO, "audio", audio, NULL); return(recall_audio); } gsequencer-1.4.24/ags/audio/ags_recall_ladspa.h0000644000175000017500000000524513246707333016346 00000000000000/* 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 . */ #ifndef __AGS_RECALL_LADSPA_H__ #define __AGS_RECALL_LADSPA_H__ #include #include #include #include #include #include #define AGS_TYPE_RECALL_LADSPA (ags_recall_ladspa_get_type()) #define AGS_RECALL_LADSPA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_LADSPA, AgsRecallLadspa)) #define AGS_RECALL_LADSPA_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_LADSPA, AgsRecallLadspaClass)) #define AGS_IS_RECALL_LADSPA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RECALL_LADSPA)) #define AGS_IS_RECALL_LADSPA_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RECALL_LADSPA)) #define AGS_RECALL_LADSPA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RECALL_LADSPA, AgsRecallLadspaClass)) typedef struct _AgsRecallLadspa AgsRecallLadspa; typedef struct _AgsRecallLadspaClass AgsRecallLadspaClass; struct _AgsRecallLadspa { AgsRecallChannel recall_channel; gchar *filename; gchar *effect; unsigned long index; LADSPA_Descriptor *plugin_descriptor; unsigned long *input_port; unsigned long input_lines; unsigned long *output_port; unsigned long output_lines; }; struct _AgsRecallLadspaClass { AgsRecallChannelClass recall_channel; }; GType ags_recall_ladspa_get_type(); void ags_recall_ladspa_load(AgsRecallLadspa *recall_ladspa); GList* ags_recall_ladspa_load_ports(AgsRecallLadspa *recall_ladspa); void ags_recall_ladspa_load_conversion(AgsRecallLadspa *recall_ladspa, GObject *port, gpointer port_descriptor); GList* ags_recall_ladspa_find(GList *recall, gchar *filename, gchar *effect); AgsRecallLadspa* ags_recall_ladspa_new(AgsChannel *source, gchar *filename, gchar *effect, unsigned long index); #endif /*__AGS_RECALL_LADSPA_H__*/ gsequencer-1.4.24/ags/audio/ags_recall.c0000644000175000017500000021716713256163135015022 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_class_init(AgsRecallClass *recall_class); void ags_recall_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_packable_interface_init(AgsPackableInterface *packable); void ags_recall_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_recall_plugin_interface_init(AgsPluginInterface *plugin); void ags_recall_init(AgsRecall *recall); void ags_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_add_to_registry(AgsConnectable *connectable); void ags_recall_remove_from_registry(AgsConnectable *connectable); gboolean ags_recall_is_connected(AgsConnectable *connectable); void ags_recall_connect(AgsConnectable *connectable); void ags_recall_disconnect(AgsConnectable *connectable); gboolean ags_recall_pack(AgsPackable *packable, GObject *container); gboolean ags_recall_unpack(AgsPackable *packable); void ags_recall_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); gchar* ags_recall_get_name(AgsPlugin *plugin); void ags_recall_set_name(AgsPlugin *plugin, gchar *name); gchar* ags_recall_get_version(AgsPlugin *plugin); void ags_recall_set_version(AgsPlugin *plugin, gchar *version); gchar* ags_recall_get_build_id(AgsPlugin *plugin); void ags_recall_set_build_id(AgsPlugin *plugin, gchar *build_id); gchar* ags_recall_get_xml_type(AgsPlugin *plugin); void ags_recall_set_xml_type(AgsPlugin *plugin, gchar *xml_type); GList* ags_recall_get_ports(AgsPlugin *plugin); void ags_recall_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_recall_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_recall_dispose(GObject *gobject); void ags_recall_finalize(GObject *gobject); void ags_recall_real_run_init_pre(AgsRecall *recall); void ags_recall_real_run_init_inter(AgsRecall *recall); void ags_recall_real_run_init_post(AgsRecall *recall); void ags_recall_real_run_automate(AgsRecall *recall); void ags_recall_real_run_pre(AgsRecall *recall); void ags_recall_real_run_inter(AgsRecall *recall); void ags_recall_real_run_post(AgsRecall *recall); void ags_recall_real_stop_persistent(AgsRecall *recall); void ags_recall_real_done(AgsRecall *recall); void ags_recall_real_cancel(AgsRecall *recall); void ags_recall_real_remove(AgsRecall *recall); AgsRecall* ags_recall_real_duplicate(AgsRecall *reall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_recall_child_done(AgsRecall *child, AgsRecall *parent); /** * SECTION:ags_recall * @short_description: The recall base class * @title: AgsRecall * @section_id: * @include: ags/audio/ags_recall.h * * #AgsRecall acts as effect processor. */ enum{ RESOLVE_DEPENDENCIES, LOAD_AUTOMATION, UNLOAD_AUTOMATION, RUN_INIT_PRE, RUN_INIT_INTER, RUN_INIT_POST, CHECK_RT_STREAM, AUTOMATE, RUN_PRE, RUN_INTER, RUN_POST, STOP_PERSISTENT, DONE, CANCEL, REMOVE, DUPLICATE, NOTIFY_DEPENDENCY, CHILD_ADDED, LAST_SIGNAL, }; enum{ PROP_0, PROP_SOUNDCARD, PROP_CONTAINER, PROP_DEPENDENCY, PROP_RECALL_ID, PROP_PARENT, PROP_CHILD, PROP_PORT, }; static gpointer ags_recall_parent_class = NULL; static guint recall_signals[LAST_SIGNAL]; GType ags_recall_get_type (void) { static GType ags_type_recall = 0; if(!ags_type_recall){ static const GTypeInfo ags_recall_info = { sizeof (AgsRecallClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecall), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_packable_interface_info = { (GInterfaceInitFunc) ags_recall_packable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_recall_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall = g_type_register_static(G_TYPE_OBJECT, "AgsRecall", &ags_recall_info, 0); g_type_add_interface_static(ags_type_recall, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall, AGS_TYPE_PACKABLE, &ags_packable_interface_info); g_type_add_interface_static(ags_type_recall, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_recall, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_recall); } void ags_recall_class_init(AgsRecallClass *recall) { GObjectClass *gobject; GParamSpec *param_spec; ags_recall_parent_class = g_type_class_peek_parent(recall); /* GObjectClass */ gobject = (GObjectClass *) recall; gobject->set_property = ags_recall_set_property; gobject->get_property = ags_recall_get_property; gobject->dispose = ags_recall_dispose; gobject->finalize = ags_recall_finalize; /* properties */ /** * AgsRecall:soundcard: * * The assigned soundcard. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of recall"), i18n_pspec("The soundcard which this recall is packed into"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsRecall:recall-container: * * The recall container packed into. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-container", i18n_pspec("container of recall"), i18n_pspec("The container which this recall is packed into"), AGS_TYPE_RECALL_CONTAINER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTAINER, param_spec); /** * AgsRecall:dependency: * * The recall depending on. * * Since: 1.0.0 */ param_spec = g_param_spec_object("dependency", i18n_pspec("dependency of recall"), i18n_pspec("The dependency that can be added"), AGS_TYPE_RECALL_DEPENDENCY, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEPENDENCY, param_spec); /** * AgsRecall:recall-id: * * The recall id running in. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-id", i18n_pspec("run id of recall"), i18n_pspec("The recall id of the recall"), AGS_TYPE_RECALL_ID, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_ID, param_spec); /** * AgsRecall:audio-channel: * * The parent recall. * * Since: 1.0.0 */ param_spec = g_param_spec_object("parent", i18n_pspec("parent recall of this recall"), i18n_pspec("The recall should be the parent instance of this recall"), AGS_TYPE_RECALL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PARENT, param_spec); /** * AgsRecall:child: * * The child recall. * * Since: 1.0.0 */ param_spec = g_param_spec_object("child", i18n_pspec("child of recall"), i18n_pspec("The child that can be added"), AGS_TYPE_RECALL, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHILD, param_spec); /** * AgsRecall:port: * * The assigned #AgsPort * * Since: 1.0.0 */ param_spec = g_param_spec_object("port", i18n_pspec("port of recall"), i18n_pspec("The port of recall"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT, param_spec); /* AgsRecallClass */ recall->resolve_dependencies = NULL; recall->load_automation = NULL; recall->unload_automation = NULL; recall->run_init_pre = ags_recall_real_run_init_pre; recall->run_init_inter = ags_recall_real_run_init_inter; recall->run_init_post = ags_recall_real_run_init_post; recall->check_rt_stream = NULL; recall->automate = NULL; recall->run_pre = ags_recall_real_run_pre; recall->run_inter = ags_recall_real_run_inter; recall->run_post = ags_recall_real_run_post; recall->stop_persistent = ags_recall_real_stop_persistent; recall->done = ags_recall_real_done; recall->cancel = ags_recall_real_cancel; recall->remove = ags_recall_real_remove; recall->duplicate = ags_recall_real_duplicate; recall->notify_dependency = NULL; recall->child_added = NULL; /* signals */ /** * AgsRecall::load-automation: * @recall: the #AgsRecall to initialize * * The ::load-automation signal notifies about loading automation. * * Since: 1.0.0 */ recall_signals[LOAD_AUTOMATION] = g_signal_new("load-automation", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, load_automation), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsRecall::unload-automation: * @recall: the #AgsRecall to initialize * * The ::unload-automation signal notifies about unloading automation. * * Since: 1.0.0 */ recall_signals[UNLOAD_AUTOMATION] = g_signal_new("unload-automation", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, unload_automation), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::resolve-dependencies: * @recall: the #AgsRecall to resolve * * The ::resolve-dependencies signal notifies about resolving * dependencies. * * Since: 1.0.0 */ recall_signals[RESOLVE_DEPENDENCIES] = g_signal_new("resolve-dependencies", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, resolve_dependencies), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::run-init-pre: * @recall: the #AgsRecall to initialize * * The ::run-init-pre signal notifies about initializing * stage 0. * * Since: 1.0.0 */ recall_signals[RUN_INIT_PRE] = g_signal_new("run-init-pre", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, run_init_pre), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::run-init-inter: * @recall: the #AgsRecall to initialize * * The ::run-init-inter signal notifies about initializing * stage 1. * * Since: 1.0.0 */ recall_signals[RUN_INIT_INTER] = g_signal_new("run-init-inter", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, run_init_inter), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::run-init-post: * @recall: the #AgsRecall to initialize * * The ::run-init-post signal notifies about initializing * stage 2. * * Since: 1.0.0 */ recall_signals[RUN_INIT_POST] = g_signal_new("run-init-post", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, run_init_post), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::check-rt-stream: * @recall: the #AgsRecall to initialize * * The ::check-rt-stream signal notifies about initializing * stage 0. * * Since: 1.4.0 */ recall_signals[CHECK_RT_STREAM] = g_signal_new("check-rt-stream", G_TYPE_FROM_CLASS(recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsRecallClass, check_rt_stream), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::automate: * @recall: the #AgsRecall to play * * The ::automate signal notifies about running * automation and is normally called during ::run-pre. * * Since: 1.0.0 */ recall_signals[AUTOMATE] = g_signal_new("automate", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, automate), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::run-pre: * @recall: the #AgsRecall to play * * The ::run-pre signal notifies about running * stage 0. * * Since: 1.0.0 */ recall_signals[RUN_PRE] = g_signal_new("run-pre", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, run_pre), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::run-inter: * @recall: the #AgsRecall to play * * The ::run-inter signal notifies about running * stage 1. * * Since: 1.0.0 */ recall_signals[RUN_INTER] = g_signal_new("run-inter", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, run_inter), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::run-post: * @recall: the #AgsRecall to play * * The ::run-post signal notifies about running * stage 2. * * Since: 1.0.0 */ recall_signals[RUN_POST] = g_signal_new("run-post", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, run_post), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::stop-persistent: * @recall: the #AgsRecall stop playback * * The ::stop-persistent signal notifies about definitively * stopping playback. * * Since: 1.0.0 */ recall_signals[STOP_PERSISTENT] = g_signal_new("stop_persistent", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, stop_persistent), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::done: * @recall: the #AgsRecall to finish playback * * The ::done signal notifies about stopping playback. * * Since: 1.0.0 */ recall_signals[DONE] = g_signal_new("done", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, done), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::cancel: * @recall: the #AgsRecall to cancel playback * * The ::cancel signal notifies about cancelling playback. * * Since: 1.0.0 */ recall_signals[CANCEL] = g_signal_new("cancel", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, cancel), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::remove: * @recall: the #AgsRecall to remove of audio loop * * The ::remove signal notifies about removing. * * Since: 1.0.0 */ recall_signals[REMOVE] = g_signal_new("remove", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, remove), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsRecall::duplicate: * @recall: the #AgsRecall to duplicate * @recall_id: the assigned #AgsRecallID * @n_params: pointer to array length * @parameter: parameter array * * The ::duplicate signal notifies about instantiating. * * Since: 1.0.0 */ recall_signals[DUPLICATE] = g_signal_new("duplicate", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, duplicate), NULL, NULL, g_cclosure_user_marshal_OBJECT__OBJECT_POINTER_POINTER, G_TYPE_OBJECT, 3, G_TYPE_OBJECT, G_TYPE_POINTER, G_TYPE_POINTER); /** * AgsRecall::notify-dependency: * @recall: the #AgsRecall to notify * @dependency: the kind of dependency * @count: the reference count * * The ::notify-dependency signal notifies about dependencies * added. * * Since: 1.0.0 */ recall_signals[NOTIFY_DEPENDENCY] = g_signal_new("notify-dependency", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, notify_dependency), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_INT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_INT); /** * AgsRecall::child-added: * @recall: the #AgsRecall to add the child * @child: the #AgsRecall to add * * The ::child-added signal notifies about children * added. * * Since: 1.0.0 */ recall_signals[CHILD_ADDED] = g_signal_new("child-added", G_TYPE_FROM_CLASS (recall), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallClass, child_added), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_recall_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = ags_recall_add_to_registry; connectable->remove_from_registry = ags_recall_remove_from_registry; connectable->is_ready = NULL; connectable->is_connected = ags_recall_is_connected; connectable->connect = ags_recall_connect; connectable->disconnect = ags_recall_disconnect; } void ags_recall_packable_interface_init(AgsPackableInterface *packable) { packable->pack = ags_recall_pack; packable->unpack = ags_recall_unpack; } void ags_recall_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { dynamic_connectable->connect_dynamic = ags_recall_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_recall_disconnect_dynamic; } void ags_recall_plugin_interface_init(AgsPluginInterface *plugin) { plugin->get_name = ags_recall_get_name; plugin->set_name = ags_recall_set_name; plugin->get_version = ags_recall_get_version; plugin->set_version = ags_recall_set_version; plugin->get_build_id = ags_recall_get_build_id; plugin->set_build_id = ags_recall_set_build_id; plugin->get_xml_type = ags_recall_get_xml_type; plugin->set_xml_type = ags_recall_set_xml_type; plugin->get_ports = ags_recall_get_ports; plugin->read = ags_recall_read; plugin->write = ags_recall_write; plugin->set_ports = NULL; } void ags_recall_init(AgsRecall *recall) { AgsConfig *config; gchar *str; gboolean rt_safe; pthread_mutexattr_t *attr; config = ags_config_get_instance(); rt_safe = TRUE; str = ags_config_get_value(config, AGS_CONFIG_GENERIC, "rt-safe"); /* rt-safe */ if(str != NULL && !g_ascii_strncasecmp(str, "false", 6)){ rt_safe = FALSE; } recall->flags = 0; recall->rt_safe = rt_safe; /* soundcard */ recall->soundcard = NULL; /* container */ recall->container = NULL; /* version and build id */ recall->version = NULL; recall->build_id = NULL; /* effect and name */ recall->effect = NULL; recall->name = NULL; /* xml type */ recall->xml_type = NULL; /* dependency */ recall->dependencies = NULL; /* recall id */ recall->recall_id = NULL; /* nested recall */ recall->children_attr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); recall->children_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(recall->children_mutex, attr); recall->parent = NULL; recall->children = NULL; recall->child_type = G_TYPE_NONE; recall->child_parameters = NULL; recall->n_params = 0; /* port */ recall->port = NULL; recall->automation_port = NULL; /* handlers */ recall->handlers = NULL; } void ags_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecall *recall; recall = AGS_RECALL(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; GList *current; soundcard = g_value_get_object(value); if(soundcard == recall->soundcard){ return; } if(recall->soundcard != NULL){ g_object_unref(recall->soundcard); } if(soundcard != NULL){ g_object_ref(G_OBJECT(soundcard)); } recall->soundcard = (GObject *) soundcard; current = recall->children; while(current != NULL){ g_object_set(G_OBJECT(current->data), "soundcard", soundcard, NULL); current = current->next; } } break; case PROP_CONTAINER: { AgsRecallContainer *container; container = (AgsRecallContainer *) g_value_get_object(value); if((AgsRecallContainer *) recall->container == container){ return; } if(recall->container != NULL){ ags_packable_unpack(AGS_PACKABLE(recall)); g_object_unref(G_OBJECT(recall->container)); recall->container = NULL; } if(container != NULL){ g_object_ref(container); } recall->container = (GObject *) container; if(container != NULL){ ags_packable_pack(AGS_PACKABLE(recall), G_OBJECT(container)); if(AGS_IS_RECALL_AUDIO(recall)){ g_object_set(G_OBJECT(container), "recall_audio", recall, NULL); }else if(AGS_IS_RECALL_AUDIO_RUN(recall)){ g_object_set(G_OBJECT(container), "recall_audio_run", recall, NULL); }else if(AGS_IS_RECALL_CHANNEL(recall)){ g_object_set(G_OBJECT(container), "recall_channel", recall, NULL); }else if(AGS_IS_RECALL_CHANNEL_RUN(recall)){ g_object_set(G_OBJECT(container), "recall_channel_run", recall, NULL); } } } break; case PROP_DEPENDENCY: { AgsRecallDependency *recall_dependency; recall_dependency = (AgsRecallDependency *) g_value_get_object(value); ags_recall_add_dependency(recall, recall_dependency); } break; case PROP_RECALL_ID: { AgsRecallID *recall_id; recall_id = (AgsRecallID *) g_value_get_object(value); if(recall->recall_id == recall_id){ return; } if(recall->recall_id != NULL){ g_object_unref(G_OBJECT(recall->recall_id)); } if(recall_id != NULL){ g_object_ref(G_OBJECT(recall_id)); } ags_recall_set_recall_id(recall, recall_id); } break; case PROP_PARENT: { AgsRecall *parent; parent = (AgsRecall *) g_value_get_object(value); if(recall->parent == parent){ return; } if(recall->parent != NULL){ g_object_unref(recall->parent); } if(parent != NULL){ g_object_ref(parent); } recall->parent = parent; } break; case PROP_CHILD: { AgsRecall *child; gboolean child_added; child = (AgsRecall *) g_value_get_object(value); pthread_mutex_lock(recall->children_mutex); child_added = (g_list_find(recall->children, child) != NULL) ? TRUE: FALSE; pthread_mutex_unlock(recall->children_mutex); if(child == NULL || child_added){ return; } ags_recall_add_child(recall, child); } break; case PROP_PORT: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == NULL || g_list_find(recall->port, port) != NULL){ return; } g_object_ref(port); recall->port = g_list_prepend(recall->port, port); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecall *recall; recall = AGS_RECALL(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, recall->soundcard); } break; case PROP_CONTAINER: { g_value_set_object(value, recall->container); } break; case PROP_RECALL_ID: { g_value_set_object(value, recall->recall_id); } break; case PROP_PARENT: { g_value_set_object(value, recall->parent); } break; case PROP_PORT: { g_value_set_object(value, g_list_copy(recall->port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_add_to_registry(AgsConnectable *connectable) { AgsApplicationContext *application_context; AgsRegistry *registry; AgsRecall *recall; AgsRegistryEntry *entry; GList *list; recall = AGS_RECALL(connectable); application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(recall->soundcard)); registry = ags_service_provider_get_registry(AGS_SERVICE_PROVIDER(application_context)); if(registry != NULL){ entry = ags_registry_entry_alloc(registry); g_value_set_object(&(entry->entry), (gpointer) recall); ags_registry_add_entry(registry, entry); } } void ags_recall_remove_from_registry(AgsConnectable *connectable) { //TODO:JK: implement me } gboolean ags_recall_is_connected(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return(TRUE); }else{ return(FALSE); } } void ags_recall_connect(AgsConnectable *connectable) { AgsRecall *recall; AgsRecallHandler *recall_handler; GList *list; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } list = recall->children; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } /* handlers */ list = recall->handlers; while(list != NULL){ recall_handler = AGS_RECALL_HANDLER(list->data); recall_handler->handler = g_signal_connect_after(G_OBJECT(recall), recall_handler->signal_name, G_CALLBACK(recall_handler->callback), recall_handler->data); list = list->next; } recall->flags |= AGS_RECALL_CONNECTED; } void ags_recall_disconnect(AgsConnectable *connectable) { AgsRecall *recall; GList *list; recall = AGS_RECALL(connectable); list = recall->children; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } recall->flags &= (~AGS_RECALL_CONNECTED); ags_recall_unload_automation(recall); } gboolean ags_recall_pack(AgsPackable *packable, GObject *container) { AgsRecall *recall; recall = AGS_RECALL(packable); if(!AGS_IS_RECALL(recall) || (AGS_RECALL_PACKED & (recall->flags)) != 0){ return(TRUE); } recall->flags |= AGS_RECALL_PACKED; #ifdef AGS_DEBUG g_message("===== packing: %s", G_OBJECT_TYPE_NAME(recall)); #endif return(FALSE); } gboolean ags_recall_unpack(AgsPackable *packable) { AgsRecall *recall; recall = AGS_RECALL(packable); if(!AGS_IS_RECALL(recall) || (AGS_RECALL_PACKED & (recall->flags)) == 0){ return(TRUE); } recall->flags &= (~AGS_RECALL_PACKED); return(FALSE); } void ags_recall_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRecall *recall; AgsRecallHandler *recall_handler; GList *list; recall = AGS_RECALL(dynamic_connectable); if((AGS_RECALL_DYNAMIC_CONNECTED & (recall->flags)) != 0){ return; } #ifdef AGS_DEBUG g_message("dynamic connect: %s", G_OBJECT_TYPE_NAME(recall)); #endif /* connect children */ list = recall->children; while(list != NULL){ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(list->data)); list = list->next; } /* connect handlers */ list = recall->handlers; while(list != NULL){ recall_handler = AGS_RECALL_HANDLER(list->data); recall_handler->handler = g_signal_connect_after(G_OBJECT(recall), recall_handler->signal_name, G_CALLBACK(recall_handler->callback), recall_handler->data); list = list->next; } //TODO:JK: fixme recall->flags |= AGS_RECALL_DYNAMIC_CONNECTED; } void ags_recall_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRecall *recall; AgsRecallHandler *recall_handler; GList *list; recall = AGS_RECALL(dynamic_connectable); if((AGS_RECALL_DYNAMIC_CONNECTED & (recall->flags)) == 0){ return; } /* disconnect children */ list = recall->children; while(list != NULL){ ags_dynamic_connectable_disconnect_dynamic(AGS_DYNAMIC_CONNECTABLE(list->data)); list = list->next; } /* disconnect handlers */ list = recall->handlers; while(list != NULL){ recall_handler = AGS_RECALL_HANDLER(list->data); g_signal_handler_disconnect(G_OBJECT(recall), recall_handler->handler); list = list->next; } recall->flags &= (~AGS_RECALL_DYNAMIC_CONNECTED); } gchar* ags_recall_get_name(AgsPlugin *plugin) { return(AGS_RECALL(plugin)->name); } void ags_recall_set_name(AgsPlugin *plugin, gchar *name) { AGS_RECALL(plugin)->name = name; } gchar* ags_recall_get_version(AgsPlugin *plugin) { return(AGS_RECALL(plugin)->version); } void ags_recall_set_version(AgsPlugin *plugin, gchar *version) { AGS_RECALL(plugin)->version = version; } gchar* ags_recall_get_build_id(AgsPlugin *plugin) { return(AGS_RECALL(plugin)->build_id); } void ags_recall_set_build_id(AgsPlugin *plugin, gchar *build_id) { AGS_RECALL(plugin)->build_id = build_id; } gchar* ags_recall_get_xml_type(AgsPlugin *plugin) { return(AGS_RECALL(plugin)->xml_type); } void ags_recall_set_xml_type(AgsPlugin *plugin, gchar *xml_type) { AGS_RECALL(plugin)->xml_type = xml_type; } GList* ags_recall_get_ports(AgsPlugin *plugin) { return(AGS_RECALL(plugin)->port); } void ags_recall_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsRecall *recall; recall = AGS_RECALL(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", recall, NULL)); } xmlNode* ags_recall_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsRecall *recall; xmlNode *node; gchar *id; recall = AGS_RECALL(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, AGS_RECALL(plugin)->xml_type); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall, NULL)); xmlAddChild(parent, node); return(node); } void ags_recall_dispose(GObject *gobject) { AgsRecall *recall; GList *list, *list_next; recall = AGS_RECALL(gobject); /* soundcard */ if(recall->soundcard != NULL){ g_object_unref(recall->soundcard); recall->soundcard = NULL; } /* dependency */ if(recall->dependencies != NULL){ g_list_free_full(recall->dependencies, g_object_unref); recall->dependencies = NULL; } /* recall id */ if(recall->recall_id != NULL){ g_object_unref(recall->recall_id); recall->recall_id = NULL; } /* children */ if(recall->children != NULL){ list = recall->children; while(list != NULL){ list_next = list->next; g_object_run_dispose(G_OBJECT(list->data)); list = list_next; } g_list_free_full(recall->children, g_object_unref); recall->children = NULL; } if(recall->container != NULL){ ags_packable_unpack(AGS_PACKABLE(recall)); recall->container = NULL; } /* port */ if(recall->port != NULL){ g_list_free_full(recall->port, g_object_unref); recall->port = NULL; } /* parent */ if(recall->parent != NULL){ ags_recall_remove_child(recall->parent, recall); recall->parent = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_parent_class)->dispose(gobject); } void ags_recall_finalize(GObject *gobject) { AgsRecall *recall; guint *ids; guint i, n_ids; recall = AGS_RECALL(gobject); #ifdef AGS_DEBUG g_message("finalize %s\n", G_OBJECT_TYPE_NAME(gobject)); #endif ids = g_signal_list_ids(AGS_TYPE_RECALL, &n_ids); for(i = 0; i < n_ids; i++){ g_signal_handlers_disconnect_matched(gobject, G_SIGNAL_MATCH_ID, ids[i], 0, NULL, NULL, NULL); } g_free(ids); /* soundcard */ if(recall->soundcard != NULL){ g_object_unref(recall->soundcard); } // if(recall->name != NULL){ // g_free(recall->name); // } /* dependency */ g_list_free_full(recall->dependencies, g_object_unref); /* recall id */ if(recall->recall_id != NULL){ g_object_unref(recall->recall_id); } /* children */ g_list_free_full(recall->children, g_object_unref); pthread_mutexattr_destroy(recall->children_attr); free(recall->children_attr); pthread_mutex_destroy(recall->children_mutex); free(recall->children_mutex); if(recall->container != NULL){ ags_packable_unpack(AGS_PACKABLE(recall)); } if(recall->child_parameters != NULL){ g_free(recall->child_parameters); } /* port */ g_list_free_full(recall->port, g_object_unref); /* parent */ if(recall->parent != NULL){ ags_recall_remove_child(recall->parent, recall); //TODO:JK: implement me } /* call parent */ G_OBJECT_CLASS(ags_recall_parent_class)->finalize(gobject); } /** * ags_recall_set_flags: * @recall: an #AgsRecall * @flags: the flags mask * * Set flags recursivly. * * Since: 1.0.0 */ void ags_recall_set_flags(AgsRecall *recall, guint flags) { GList *child; guint inheritated_flags_mask; /* set flags */ recall->flags |= flags; /* set recursivly - prepare mask */ inheritated_flags_mask = (AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_PROPAGATE_DONE | AGS_RECALL_INITIAL_RUN); if(!AGS_IS_RECALL_RECYCLING(recall)){ inheritated_flags_mask |= (AGS_RECALL_PERSISTENT | AGS_RECALL_PERSISTENT_PLAYBACK | AGS_RECALL_PERSISTENT_SEQUENCER | AGS_RECALL_PERSISTENT_NOTATION); } /* apply recursivly */ child = recall->children; while(child != NULL){ ags_recall_set_flags(AGS_RECALL(child->data), (inheritated_flags_mask & (flags))); child = child->next; } } /** * ags_recall_load_automation: * @recall: an #AgsRecall * @automation_port: a #GList-struct containing #AgsPort * * A signal indicating that additional automation will be loaded from * @automation_port. * * Since: 1.0.0 */ void ags_recall_load_automation(AgsRecall *recall, GList *automation_port) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[LOAD_AUTOMATION], 0, automation_port); g_object_unref(G_OBJECT(recall)); } /** * ags_recall_unload_automation: * @recall: an #AgsRecall * * A signal indicating that the automation will be unloaded. * * Since: 1.0.0 */ void ags_recall_unload_automation(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[UNLOAD_AUTOMATION], 0); g_object_unref(G_OBJECT(recall)); } /** * ags_recall_resolve_dependencies: * @recall: an #AgsRecall * * A signal indicating that the inheriting object should resolve * it's dependencies. * * Since: 1.0.0 */ void ags_recall_resolve_dependencies(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); #ifdef AGS_DEBUG g_message("resolving %s", G_OBJECT_TYPE_NAME(recall)); #endif g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[RESOLVE_DEPENDENCIES], 0); g_object_unref(G_OBJECT(recall)); } /** * ags_recall_child_added: * @parent: an #AgsRecall * @child: another #AgsRecall * * A signal indicating that the a child has been added. * * Since: 1.0.0 */ void ags_recall_child_added(AgsRecall *parent, AgsRecall *child) { g_return_if_fail(AGS_IS_RECALL(parent)); g_object_ref(G_OBJECT(parent)); g_signal_emit(G_OBJECT(parent), recall_signals[CHILD_ADDED], 0, child); g_object_unref(G_OBJECT(parent)); } void ags_recall_real_run_init_pre(AgsRecall *recall) { GList *list, *list_next; list = recall->children; while(list != NULL){ list_next = list->next; if((AGS_RECALL_TEMPLATE & (AGS_RECALL(list->data)->flags)) != 0){ g_warning("running on template"); } ags_recall_run_init_pre(AGS_RECALL(list->data)); list = list_next; } } /** * ags_recall_run_init_pre: * @recall: an #AgsRecall * * Prepare for run, this is the pre stage within the preparation. * * Since: 1.0.0 */ void ags_recall_run_init_pre(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[RUN_INIT_PRE], 0); g_object_unref(G_OBJECT(recall)); } void ags_recall_real_run_init_inter(AgsRecall *recall) { GList *list, *list_next; list = recall->children; while(list != NULL){ list_next = list->next; if((AGS_RECALL_TEMPLATE & (AGS_RECALL(list->data)->flags)) != 0){ g_warning("running on template"); } ags_recall_run_init_inter(AGS_RECALL(list->data)); list = list_next; } } /** * ags_recall_run_init_inter: * @recall: an #AgsRecall * * Prepare for run, this is the inter stage within the preparation. * * Since: 1.0.0 */ void ags_recall_run_init_inter(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[RUN_INIT_INTER], 0); g_object_unref(G_OBJECT(recall)); } void ags_recall_real_run_init_post(AgsRecall *recall) { GList *list, *list_next; list = recall->children; while(list != NULL){ list_next = list->next; if((AGS_RECALL_TEMPLATE & (AGS_RECALL(list->data)->flags)) != 0){ g_warning("running on template"); } ags_recall_run_init_post(AGS_RECALL(list->data)); list = list_next; } recall->flags |= (AGS_RECALL_INITIAL_RUN | AGS_RECALL_RUN_INITIALIZED); } /** * ags_recall_run_init_post: * @recall: an #AgsRecall * * Prepare for run, this is the post stage within the preparation. * * Since: 1.0.0 */ void ags_recall_run_init_post(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[RUN_INIT_POST], 0); g_object_unref(G_OBJECT(recall)); } /** * ags_recall_check_rt_stream: * @recall: an #AgsRecall * * Prepare for run, this is the pre stage within the preparation. * * Since: 1.4.0 */ void ags_recall_check_rt_stream(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[CHECK_RT_STREAM], 0); g_object_unref(G_OBJECT(recall)); } /** * ags_recall_automate: * @recall: an #AgsRecall * * This is the automate port of @recall. * * Since: 1.0.0 */ void ags_recall_automate(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[AUTOMATE], 0); g_object_unref(G_OBJECT(recall)); } void ags_recall_real_run_pre(AgsRecall *recall) { GList *list, *list_start; /* lock ports */ ags_recall_lock_port(recall); /* run */ list_start = list = ags_list_util_copy_and_ref(recall->children); while(list != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(list->data)->flags)) != 0){ g_warning("running on template"); list = list->next; continue; } g_object_ref(list->data); AGS_RECALL_GET_CLASS(AGS_RECALL(list->data))->run_pre(AGS_RECALL(list->data)); g_object_unref(list->data); g_object_unref(list->data); list = list->next; } g_list_free(list_start); /* unlock ports */ ags_recall_unlock_port(recall); } /** * ags_recall_run_pre: * @recall: an #AgsRecall * * This is the pre stage within a run. * * Since: 1.0.0 */ void ags_recall_run_pre(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[RUN_PRE], 0); g_object_unref(G_OBJECT(recall)); } void ags_recall_real_run_inter(AgsRecall *recall) { GList *list, *list_start; /* lock port */ ags_recall_lock_port(recall); /* run */ list_start = list = ags_list_util_copy_and_ref(recall->children); while(list != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(list->data)->flags)) != 0){ g_warning("running on template"); list = list->next; continue; } g_object_ref(list->data); AGS_RECALL_GET_CLASS(AGS_RECALL(list->data))->run_inter(AGS_RECALL(list->data)); g_object_unref(list->data); g_object_unref(list->data); list = list->next; } g_list_free(list_start); /* unlock port */ ags_recall_unlock_port(recall); } /** * ags_recall_run_inter: * @recall: an #AgsRecall * * This is the inter stage within a run. * * Since: 1.0.0 */ void ags_recall_run_inter(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[RUN_INTER], 0); g_object_unref(G_OBJECT(recall)); } void ags_recall_real_run_post(AgsRecall *recall) { GList *list, *list_start; /* lock port */ ags_recall_lock_port(recall); /* run */ list_start = list = ags_list_util_copy_and_ref(recall->children); while(list != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(list->data)->flags)) != 0){ g_warning("running on template"); list = list->next; continue; } g_object_ref(list->data); AGS_RECALL_GET_CLASS(AGS_RECALL(list->data))->run_post(AGS_RECALL(list->data)); g_object_unref(list->data); g_object_unref(list->data); list = list->next; } g_list_free(list_start); if((AGS_RECALL_INITIAL_RUN & (recall->flags)) != 0){ recall->flags &= (~AGS_RECALL_INITIAL_RUN); } /* unlock port */ ags_recall_unlock_port(recall); } /** * ags_recall_run_post: * @recall: an #AgsRecall * * This is the post stage within a run. * * Since: 1.0.0 */ void ags_recall_run_post(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[RUN_POST], 0); g_object_unref(G_OBJECT(recall)); } void ags_recall_real_stop_persistent(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[STOP_PERSISTENT], 0); g_object_unref(G_OBJECT(recall)); } /** * ags_recall_stop_persistent: * @recall: an #AgsRecall * * Unsets the %AGS_RECALL_PERSISTENT flag set and invokes ags_recall_done(). * * Since: 1.0.0 */ void ags_recall_stop_persistent(AgsRecall *recall) { if((AGS_RECALL_DONE & (recall->flags)) != 0){ return; } recall->flags &= (~(AGS_RECALL_PERSISTENT | AGS_RECALL_PERSISTENT_PLAYBACK | AGS_RECALL_PERSISTENT_SEQUENCER | AGS_RECALL_PERSISTENT_NOTATION)); ags_recall_done(recall); } void ags_recall_real_done(AgsRecall *recall) { if((AGS_RECALL_DONE & (recall->flags)) != 0){ return; } recall->flags |= AGS_RECALL_DONE; ags_recall_remove(recall); } /** * ags_recall_done: * @recall: an #AgsRecall * * The #AgsRecall doesn't want to run anymore, it has been done its * work. * * Since: 1.0.0 */ void ags_recall_done(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); if((AGS_RECALL_PERSISTENT & (recall->flags)) != 0 || (AGS_RECALL_TEMPLATE & (recall->flags)) != 0 || ((AGS_RECALL_PERSISTENT_PLAYBACK & (recall->flags)) != 0 && (AGS_RECALL_PLAYBACK & (recall->flags)) != 0) || ((AGS_RECALL_PERSISTENT_SEQUENCER & (recall->flags)) != 0 && (AGS_RECALL_SEQUENCER & (recall->flags)) != 0) || ((AGS_RECALL_PERSISTENT_NOTATION & (recall->flags)) != 0 && (AGS_RECALL_NOTATION & (recall->flags)) != 0)){ return; } g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[DONE], 0); g_object_unref(G_OBJECT(recall)); } void ags_recall_real_cancel(AgsRecall *recall) { GList *list, *list_next; if((AGS_RECALL_TEMPLATE & (recall->flags)) != 0){ return; } /* call cancel for children */ list = recall->children; while(list != NULL){ list_next = list->next; ags_recall_cancel(AGS_RECALL(list->data)); list = list_next; } if((AGS_RECALL_PERSISTENT & (recall->flags)) != 0 || (AGS_RECALL_PERSISTENT_PLAYBACK & (recall->flags)) != 0){ ags_recall_stop_persistent(recall); }else{ ags_recall_done(recall); } } /** * ags_recall_cancel: * @recall: an #AgsRecall * * The #AgsRecall doesn't want to run anymore, it aborts further execution. * * Since: 1.0.0 */ void ags_recall_cancel(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[CANCEL], 0); g_object_unref(G_OBJECT(recall)); } void ags_recall_real_remove(AgsRecall *recall) { AgsMutexManager *mutex_manager; AgsDestroyWorker *destroy_worker; AgsApplicationContext *application_context; AgsRecall *parent; GList *worker; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get destroy worker */ pthread_mutex_lock(application_mutex); worker = ags_concurrency_provider_get_worker(AGS_CONCURRENCY_PROVIDER(application_context)); worker = ags_list_util_find_type(worker, AGS_TYPE_DESTROY_WORKER); if(worker != NULL){ destroy_worker = worker->data; }else{ destroy_worker = NULL; } pthread_mutex_unlock(application_mutex); /* dispose and unref */ g_object_ref(recall); if(recall->parent == NULL){ #if 0 if(destroy_worker != NULL){ ags_destroy_worker_add(destroy_worker, recall, g_object_run_dispose); }else{ g_object_run_dispose(recall); } #endif return; }else{ parent = AGS_RECALL(recall->parent); ags_recall_remove_child(parent, recall); if(destroy_worker != NULL){ ags_destroy_worker_add(destroy_worker, recall, ags_destroy_util_dispose_and_unref); }else{ g_object_run_dispose(recall); g_object_unref(recall); } } /* propagate done */ if(parent != NULL && (AGS_RECALL_PROPAGATE_DONE & (parent->flags)) != 0 && (AGS_RECALL_PERSISTENT & (parent->flags)) == 0 && parent->children == NULL){ ags_recall_done(parent); } } /** * ags_recall_remove: * @recall: an #AgsRecall * * The #AgsRecall will be removed immediately. * * Since: 1.0.0 */ void ags_recall_remove(AgsRecall *recall) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[REMOVE], 0); g_object_unref(G_OBJECT(recall)); // g_object_unref(recall); } /** * ags_recall_is_done: * @recalls: a #GList-struct of #AgsRecall * @recycling_context: an #AgsRecyclingContext * * Check if recall is over. * * Returns: %TRUE if recall is done, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_recall_is_done(GList *recalls, GObject *recycling_context) { AgsRecall *recall; if(recalls == NULL || !AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(FALSE); } while(recalls != NULL){ recall = AGS_RECALL(recalls->data); if((AGS_RECALL_TEMPLATE & (recall->flags)) == 0 && !AGS_IS_RECALL_AUDIO(recall) && !AGS_IS_RECALL_CHANNEL(recall) && recall->recall_id != NULL && recall->recall_id->recycling_context == (AgsRecyclingContext *) recycling_context){ if((AGS_RECALL_DONE & (recall->flags)) == 0){ recall->flags &= (~AGS_RECALL_RUN_INITIALIZED); // g_message("done: %s", G_OBJECT_TYPE_NAME(recall)); return(FALSE); } } recalls = recalls->next; } return(TRUE); } AgsRecall* ags_recall_real_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecall *copy; AgsRecallClass *recall_class, *copy_class; AgsRecallContainer *recall_container; AgsRecallHandler *recall_handler, *recall_handler_copy; GList *list, *child; parameter = ags_parameter_grow(G_OBJECT_TYPE(recall), parameter, n_params, "soundcard", recall->soundcard, "recall-id", recall_id, "recall-container", recall->container, NULL); copy = g_object_newv(G_OBJECT_TYPE(recall), *n_params, parameter); g_free(parameter); ags_recall_set_flags(copy, (recall->flags & (~ (AGS_RECALL_TEMPLATE | AGS_RECALL_RUN_INITIALIZED | AGS_RECALL_CONNECTED | AGS_RECALL_DYNAMIC_CONNECTED)))); copy->child_type = recall->child_type; /* duplicate handlers */ list = recall->handlers; while(list != NULL){ recall_handler = AGS_RECALL_HANDLER(list->data); recall_handler_copy = ags_recall_handler_alloc(recall_handler->signal_name, recall_handler->callback, recall_handler->data); ags_recall_add_handler(copy, recall_handler_copy); list = list->next; } return(copy); } /** * ags_recall_duplicate: * @recall: an #AgsRecall * @recall_id: an #AgsRecallID * * Should duplicate an #AgsRecall, so it can pass the runs. Mainly used for * creating duplicates from templates, see %AGS_RECALL_TEMPLATE. * * Returns: the duplicated #AgsRecall * * Since: 1.0.0 */ AgsRecall* ags_recall_duplicate(AgsRecall *recall, AgsRecallID *recall_id) /*, guint n_params, GParameter *parameter */ { AgsRecall *copy; GParameter *params; guint n_params; g_return_val_if_fail(AGS_IS_RECALL(recall), NULL); params = NULL; n_params = 0; g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[DUPLICATE], 0, recall_id, &n_params, params, ©); g_object_unref(G_OBJECT(recall)); return(copy); } /** * ags_recall_set_recall_id: * @recall: an #AgsRecall * @recall_id: the #AgsRecallID to set * * Sets the recall id recursively. * * Since: 1.0.0 */ void ags_recall_set_recall_id(AgsRecall *recall, AgsRecallID *recall_id) { GList *list; list = recall->children; while(list != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(list->data)->flags)) != 0){ g_warning("running on template"); } ags_recall_set_recall_id(AGS_RECALL(list->data), recall_id); list = list->next; } recall->recall_id = recall_id; } /** * ags_recall_notify_dependency: * @recall: an #AgsRecall * @flags: see AgsRecallNotifyDependencyMode * @count: how many dependencies * * Notifies a recall that an other depends on it. * * Since: 1.0.0 */ void ags_recall_notify_dependency(AgsRecall *recall, guint flags, gint count) { g_return_if_fail(AGS_IS_RECALL(recall)); g_object_ref(G_OBJECT(recall)); g_signal_emit(G_OBJECT(recall), recall_signals[NOTIFY_DEPENDENCY], 0, flags, count); g_object_unref(G_OBJECT(recall)); } /** * ags_recall_add_dependency: * @recall: an #AgsRecall * @recall_dependency: an #AgsRecallDependency * * Associate a new dependency for this recall. * * Since: 1.0.0 */ void ags_recall_add_dependency(AgsRecall *recall, AgsRecallDependency *recall_dependency) { if(recall == NULL || recall_dependency == NULL){ return; } g_object_ref(recall_dependency); recall->dependencies = g_list_prepend(recall->dependencies, recall_dependency); ags_connectable_connect(AGS_CONNECTABLE(recall_dependency)); } /** * ags_recall_remove_dependency: * @recall: an #AgsRecall * @dependency: an #AgsRecall * * Remove a prior associated dependency. * * Since: 1.0.0 */ void ags_recall_remove_dependency(AgsRecall *recall, AgsRecall *dependency) { AgsRecallDependency *recall_dependency; GList *dependencies; if(recall == NULL || dependency == NULL){ return; } dependencies = ags_recall_dependency_find_dependency(recall->dependencies, (GObject *) dependency); if(dependencies == NULL){ return; } recall_dependency = AGS_RECALL_DEPENDENCY(dependencies->data); recall->dependencies = g_list_delete_link(recall->dependencies, dependencies); g_object_unref(G_OBJECT(recall_dependency)); } /** * ags_recall_get_dependencies: * @recall: an #AgsRecall * * Retrieve dependencies. * * Returns: a #GList with all dependencies. * * Since: 1.0.0 */ //FIXME:JK: duplicate the list GList* ags_recall_get_dependencies(AgsRecall *recall) { return(recall->dependencies); } /** * ags_recall_remove_child: * @recall: an #AgsRecall * @child: an #AgsRecall * * An #AgsRecall may have children. * * Since: 1.0.0 */ void ags_recall_remove_child(AgsRecall *recall, AgsRecall *child) { if(recall == NULL || child == NULL || child->parent != recall){ return; } if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ ags_connectable_disconnect(AGS_CONNECTABLE(child)); } if((AGS_RECALL_DYNAMIC_CONNECTED & (recall->flags)) != 0){ ags_dynamic_connectable_disconnect_dynamic(AGS_DYNAMIC_CONNECTABLE(child)); } pthread_mutex_lock(recall->children_mutex); recall->children = g_list_remove(recall->children, child); pthread_mutex_unlock(recall->children_mutex); child->parent = NULL; g_object_unref(recall); g_object_unref(child); } /** * ags_recall_add_child: * @parent: an #AgsRecall * @child: an #AgsRecall * * An #AgsRecall may have children. * * Since: 1.0.0 */ void ags_recall_add_child(AgsRecall *parent, AgsRecall *child) { guint inheritated_flags_mask; if(child == NULL || parent == NULL || child->parent == parent){ return; } g_object_ref(child); inheritated_flags_mask = (AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION | AGS_RECALL_PROPAGATE_DONE | AGS_RECALL_INITIAL_RUN); if(!AGS_IS_RECALL_AUDIO_SIGNAL(child)){ inheritated_flags_mask |= (AGS_RECALL_PERSISTENT | AGS_RECALL_PERSISTENT_PLAYBACK | AGS_RECALL_PERSISTENT_SEQUENCER | AGS_RECALL_PERSISTENT_NOTATION); } /* unref old */ if(child->parent != NULL){ child->flags &= (~inheritated_flags_mask); pthread_mutex_lock(child->parent->children_mutex); child->parent->children = g_list_remove(child->parent->children, child); pthread_mutex_unlock(child->parent->children_mutex); g_object_unref(child->parent); g_object_unref(child); g_object_set(G_OBJECT(child), "recall_id", NULL, NULL); } /* ref new */ if(parent != NULL){ g_object_ref(parent); g_object_ref(child); child->flags |= (inheritated_flags_mask & (parent->flags)); pthread_mutex_lock(parent->children_mutex); parent->children = g_list_prepend(parent->children, child); pthread_mutex_unlock(parent->children_mutex); g_object_set(G_OBJECT(child), "soundcard", parent->soundcard, "recall_id", parent->recall_id, NULL); g_signal_connect(G_OBJECT(child), "done", G_CALLBACK(ags_recall_child_done), parent); } child->parent = parent; if(parent != NULL){ ags_recall_child_added(parent, child); } ags_connectable_connect(AGS_CONNECTABLE(child)); if(parent != NULL && (AGS_RECALL_DYNAMIC_CONNECTED & (parent->flags)) != 0 && (AGS_RECALL_DYNAMIC_CONNECTED & (child->flags)) == 0){ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(child)); ags_recall_run_init_pre(AGS_RECALL(child)); ags_recall_run_init_inter(AGS_RECALL(child)); ags_recall_run_init_post(AGS_RECALL(child)); } g_object_unref(child); } /** * ags_recall_get_children: * @recall: an #AgsRecall * * Retrieve children. * * Returns: a GList with all children. * * Since: 1.0.0 */ GList* ags_recall_get_children(AgsRecall *recall) { return(g_list_copy(recall->children)); } /** * ags_recall_get_by_effect: * @list: a #GList with recalls * @filename: the filename containing @effect or %NULL * @effect: the effect name * * Finds all matching effect and filename. * * Returns: a GList, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_get_by_effect(GList *recall, gchar *filename, gchar *effect) { AgsRecall *current; GList *list; list = NULL; while(recall != NULL){ current = AGS_RECALL(recall->data); if(filename != NULL){ if(AGS_IS_RECALL_LADSPA(current) && !g_strcmp0(AGS_RECALL_LADSPA(current)->filename, filename) && !g_strcmp0(AGS_RECALL_LADSPA(current)->effect, effect)){ list = g_list_prepend(list, current); }else if(AGS_IS_RECALL_DSSI(current) && !g_strcmp0(AGS_RECALL_DSSI(current)->filename, filename) && !g_strcmp0(AGS_RECALL_DSSI(current)->effect, effect)){ list = g_list_prepend(list, current); }else if(AGS_IS_RECALL_LV2(current) && !g_strcmp0(AGS_RECALL_LV2(current)->filename, filename) && !g_strcmp0(AGS_RECALL_LV2(current)->effect, effect)){ list = g_list_prepend(list, current); }else if(!g_strcmp0(current->effect, effect)){ list = g_list_prepend(list, current); } } recall = recall->next; } list = g_list_reverse(list); return(list); } /** * ags_recall_find_recall_id_with_effect: * @list: a #GList with recalls * @recall_id: an #AgsRecallId, may be %NULL * @filename: the filename containing @effect or %NULL * @effect: the effect name * * Finds next matching effect name. Intended to be used as * iteration function. * * Returns: a GList, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_find_recall_id_with_effect(GList *list, AgsRecallID *recall_id, gchar *filename, gchar *effect) { AgsRecall *recall; while(list != NULL){ recall = AGS_RECALL(list->data); if(filename == NULL){ if(((recall_id != NULL && recall->recall_id != NULL && recall_id->recycling_context == recall->recall_id->recycling_context) || (recall_id == NULL && recall->recall_id == NULL)) && !g_strcmp0(recall->effect, effect)){ return(list); } }else{ if(AGS_IS_RECALL_LADSPA(recall) && ((recall_id != NULL && recall->recall_id != NULL && recall_id->recycling_context == recall->recall_id->recycling_context) || (recall_id == NULL && recall->recall_id == NULL)) && !g_strcmp0(AGS_RECALL_LADSPA(recall)->filename, filename) && !g_strcmp0(AGS_RECALL_LADSPA(recall)->effect, effect)){ return(list); }else if(AGS_IS_RECALL_DSSI(recall) && ((recall_id != NULL && recall->recall_id != NULL && recall_id->recycling_context == recall->recall_id->recycling_context) || (recall_id == NULL && recall->recall_id == NULL)) && !g_strcmp0(AGS_RECALL_DSSI(recall)->filename, filename) && !g_strcmp0(AGS_RECALL_DSSI(recall)->effect, effect)){ return(list); }else if(AGS_IS_RECALL_LV2(recall) && ((recall_id != NULL && recall->recall_id != NULL && recall_id->recycling_context == recall->recall_id->recycling_context) || (recall_id == NULL && recall->recall_id == NULL)) && !g_strcmp0(AGS_RECALL_LV2(recall)->filename, filename) && !g_strcmp0(AGS_RECALL_LV2(recall)->effect, effect)){ return(list); } } list = list->next; } return(NULL); } /** * ags_recall_find_type: * @recall_i: a #GList containing recalls * @type: a #GType * * Finds next matching recall for type. Intended to be used as * iteration function. * * Returns: a #GList containing recalls, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_find_type(GList *recall_i, GType gtype) { AgsRecall *recall; while(recall_i != NULL){ recall = AGS_RECALL(recall_i->data); if(G_OBJECT_TYPE(recall) == gtype){ break; } recall_i = recall_i->next; } return(recall_i); } /** * ags_recall_find_template: * @recall_i: a #GList containing recalls * * Finds next template, see #AGS_RECALL_TEMPLATE flag. Intended to be used as * iteration function. * * Returns: a #GList containing recalls, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_find_template(GList *recall_i) { AgsRecall *recall; while(recall_i != NULL){ recall = AGS_RECALL(recall_i->data); if((AGS_RECALL_TEMPLATE & (recall->flags)) != 0){ return(recall_i); } recall_i = recall_i->next; } return(NULL); } /** * ags_recall_template_find_type: * @recall_i: a #GList containing recalls * @type: a #GType * * Finds next matching recall for type which is a template, see #AGS_RECALL_TEMPLATE flag. * Intended to be used as iteration function. * * Returns: a #GList containing recalls, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_template_find_type(GList *recall_i, GType gtype) { AgsRecall *recall; while(recall_i != NULL){ recall = (AgsRecall *) recall_i->data; if(AGS_IS_RECALL(recall) && (AGS_RECALL_TEMPLATE & (recall->flags)) != 0 && G_OBJECT_TYPE(recall) == gtype){ break; } recall_i = recall_i->next; } return(recall_i); } /** * ags_recall_template_find_all_type: * @recall_i: a #GList containing recalls * @...: a #GType * * Finds next matching recall for type which is a template, see #AGS_RECALL_TEMPLATE flag. * Intended to be used as iteration function. * * Returns: a #GList containing recalls, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_template_find_all_type(GList *recall_i, ...) { AgsRecall *recall; GType *recall_types, *offset; GType current; guint i; va_list ap; va_start(ap, recall_i); recall_types = (GType *) malloc(sizeof(GType)); i = 0; while(TRUE){ current = va_arg(ap, GType); if(current == G_TYPE_NONE){ break; } recall_types = (GType *) realloc(recall_types, (i + 2) * sizeof(GType)); recall_types[i] = current; i++; } recall_types[i] = G_TYPE_NONE; va_end(ap); while(recall_i != NULL){ recall = (AgsRecall *) recall_i->data; if(AGS_IS_RECALL(recall)){ offset = recall_types; while(*offset != G_TYPE_NONE){ if((AGS_RECALL_TEMPLATE & (recall->flags)) != 0 && g_type_is_a(G_OBJECT_TYPE(recall), *offset)){ free(recall_types); return(recall_i); } offset++; } } recall_i = recall_i->next; } free(recall_types); return(NULL); } /** * ags_recall_find_type_with_recycling_context: * @recall_i: a #GList containing recalls * @type: a #GType * @recycling_context: an #AgsRecyclingContext * * Finds next matching recall for type which has @recycling_context, see #AgsRecallId for further * details about #AgsRecyclingContext. Intended to be used as iteration function. * * Returns: a #GList containing recalls, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_find_type_with_recycling_context(GList *recall_i, GType gtype, GObject *recycling_context) { AgsRecall *recall; while(recall_i != NULL){ recall = AGS_RECALL(recall_i->data); if(g_type_is_a(G_OBJECT_TYPE(recall), gtype) && recall->recall_id != NULL && recall->recall_id->recycling_context == (AgsRecyclingContext *) recycling_context){ return(recall_i); } recall_i = recall_i->next; } return(NULL); } /** * ags_recall_find_recycling_context: * @recall_i: a #GList containing recalls * @recycling_context: an #AgsRecyclingContext * * Finds next matching recall which has @recycling_context, see #AgsRecallId for further * details about #AgsRecyclingContext. Intended to be used as iteration function. * * Returns: a #GList containing recalls, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_find_recycling_context(GList *recall_i, GObject *recycling_context) { AgsRecall *recall; #ifdef AGS_DEBUG g_message("ags_recall_find_recycling_context: recycling_context = %llx\n", recycling_context); #endif while(recall_i != NULL){ recall = AGS_RECALL(recall_i->data); #ifdef AGS_DEBUG if(recall->recall_id != NULL){ g_message("ags_recall_find_recycling_context: recall_id->recycling_contianer = %llx\n", (long long unsigned int) recall->recall_id->recycling_context); } #endif if(recall->recall_id != NULL && recall->recall_id->recycling_context == (AgsRecyclingContext *) recycling_context){ return(recall_i); } recall_i = recall_i->next; } return(NULL); } /** * ags_recall_find_provider: * @recall_i: a #GList containing recalls * @provider: a #GObject * * Finds next matching recall for type which has @provider. The @provider may be either an #AgsChannel * or an #AgsAudio object. This function tries to find the corresponding #AgsRecallChannel and #AgsRecallAudio * objects of a #AgsRecall to find. If these recalls contains the @provider, the function will return. * * Returns: a #GList containing recalls, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_find_provider(GList *recall_i, GObject *provider) { AgsRecall *recall; while(recall_i != NULL){ recall = AGS_RECALL(recall_i->data); if(AGS_IS_AUDIO(provider)){ if(AGS_IS_RECALL_AUDIO(recall)){ if(((GObject *) AGS_RECALL_AUDIO(recall)->audio) == provider){ return(recall_i); } }else if(AGS_IS_RECALL_AUDIO_RUN(recall)){ AgsRecallAudio *recall_audio; recall_audio = AGS_RECALL_AUDIO_RUN(recall)->recall_audio; if(recall_audio != NULL && ((GObject *) recall_audio->audio) == provider){ return(recall_i); } } }else if(AGS_IS_CHANNEL(provider)){ if(AGS_IS_RECALL_CHANNEL(recall)){ if(((GObject *) AGS_RECALL_CHANNEL(recall)->source) == provider) return(recall_i); }else if(AGS_IS_RECALL_CHANNEL_RUN(recall)){ if(((GObject *) AGS_RECALL_CHANNEL_RUN(recall)->source) == provider){ return(recall_i); } } }else if(AGS_IS_RECYCLING(provider)){ if(AGS_IS_RECALL_RECYCLING(recall)){ if(((GObject *) AGS_RECALL_RECYCLING(recall)->source) == provider){ return(recall_i); } } }else if(AGS_IS_AUDIO_SIGNAL(provider)){ if(AGS_IS_RECALL_AUDIO_SIGNAL(recall)){ if(((GObject *) AGS_RECALL_AUDIO_SIGNAL(recall)->source) == provider){ return(recall_i); } } } recall_i = recall_i->next; } return(NULL); } /** * ags_recall_find_provider: * @recall: a #GList containing recalls * @provider: a #GObject * * Finds provider eg. #AgsAudio or #AgsChannel within #GList containig #AgsRecall. * * Returns: a #GList containing recalls, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_template_find_provider(GList *recall, GObject *provider) { GList *list; list = recall; while((list = (ags_recall_find_provider(list, provider))) != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(list->data)->flags)) != 0){ return(list); } list = list->next; } return(NULL); } /** * ags_recall_find_provider_with_recycling_context: * @recall_i: a #GList containing recalls * @provider: a #GObject * @recycling_context: an #AgsRecyclingContext * * Like ags_recall_template_find_provider() but given additionally @recycling_context as search parameter. * * Returns: a #GList containing recalls, or %NULL if not found * * Since: 1.0.0 */ GList* ags_recall_find_provider_with_recycling_context(GList *recall_i, GObject *provider, GObject *recycling_context) { AgsRecall *recall; while((recall_i = ags_recall_find_provider(recall_i, provider)) != NULL){ recall = AGS_RECALL(recall_i->data); if(recall->recall_id != NULL && recall->recall_id->recycling_context == (AgsRecyclingContext *) recycling_context){ return(recall_i); } recall_i = recall_i->next; } return(NULL); } void ags_recall_run_init(AgsRecall *recall, guint stage) { if(stage == 0){ ags_recall_run_init_pre(recall); }else if(stage == 1){ ags_recall_run_init_inter(recall); }else{ ags_recall_run_init_post(recall); } } /** * ags_recall_handler_alloc: * @signal_name: signal's name to connect * @callback: the #GCallback function * @data: the data to pass the callback * * Allocates #AgsRecallHandler-struct. * * Returns: the newly allocated #AgsRecallHandler-struct * * Since: 1.0.0 */ AgsRecallHandler* ags_recall_handler_alloc(const gchar *signal_name, GCallback callback, GObject *data) { AgsRecallHandler *recall_handler; recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler)); recall_handler->signal_name = signal_name; recall_handler->callback = callback; recall_handler->data = data; return(recall_handler); } /** * ags_recall_add_handler: * @recall: the #AgsRecall to connect * @recall_handler: the signal specs * * Connect callback to @recall specified by @recall_handler. * * Since: 1.0.0 */ void ags_recall_add_handler(AgsRecall *recall, AgsRecallHandler *recall_handler) { recall->handlers = g_list_prepend(recall->handlers, recall_handler); } /** * ags_recall_remove_handler: * @recall: the #AgsRecall to connect * @recall_handler: the signal specs * * Remove a #AgsRecallHandler-struct from @recall. * * Since: 1.0.0 */ void ags_recall_remove_handler(AgsRecall *recall, AgsRecallHandler *recall_handler) { recall->handlers = g_list_remove(recall->handlers, recall_handler); } void ags_recall_child_done(AgsRecall *child, AgsRecall *parent) { if(child == NULL || parent == NULL){ return; } ags_recall_remove_child(parent, child); g_object_run_dispose(child); } /** * ags_recall_lock_port: * @recall: the #AgsRecall * * Unlocks the ports. * * Since: 1.0.0 */ void ags_recall_lock_port(AgsRecall *recall) { GList *port; if(recall == NULL){ return; } port = recall->port; while(port != NULL){ pthread_mutex_lock(AGS_PORT(port->data)->mutex); port = port->next; } } /** * ags_recall_unlock_port: * @recall: the #AgsRecall * * Unlocks the ports. * * Since: 1.0.0 */ void ags_recall_unlock_port(AgsRecall *recall) { GList *port; if(recall == NULL){ return; } port = recall->port; while(port != NULL){ pthread_mutex_unlock(AGS_PORT(port->data)->mutex); port = port->next; } } /** * ags_recall_new: * * Creates an #AgsRecall. * * Returns: a new #AgsRecall. * * Since: 1.0.0 */ AgsRecall* ags_recall_new() { AgsRecall *recall; recall = (AgsRecall *) g_object_new(AGS_TYPE_RECALL, NULL); return(recall); } gsequencer-1.4.24/ags/audio/ags_channel_iter.h0000644000175000017500000000355013247044247016207 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CHANNEL_ITER_H__ #define __AGS_CHANNEL_ITER_H__ #include #include #include typedef struct _AgsChannelIter AgsChannelIter; typedef enum{ AGS_CHANNEL_ITER_LEVEL_STRICT = 1, AGS_CHANNEL_ITER_DIRECTION_AXIS_TO_LEAFES = 1 << 1, AGS_CHANNEL_ITER_DIRECTION_AXIS_TO_ROOT = 1 << 2, AGS_CHANNEL_ITER_DIRECTION_LEAFES_TO_ROOT = 1 << 3, AGS_CHANNEL_ITER_DIRECTION_ROOT_TO_LEAFES = 1 << 4, }AgsChannelIterFlags; typedef enum{ AGS_CHANNEL_ITER_UNTIL_NEXT_LEVEL, }AgsChannelIterMode; struct _AgsChannelIter { guint flags; guint flags_mask; AgsChannel *current_start; AgsChannelIter *parent; GList *children; AgsChannelIter *current_iter; AgsChannel *current; }; AgsChannelIter* ags_channel_iter_alloc(AgsChannel *start); void ags_channel_iter_free(AgsChannelIter *iter); AgsChannel* ags_channel_iter_prev(AgsChannelIter *iter, guint mode); AgsChannel* ags_channel_iter_next(AgsChannelIter *iter, guint mode); void ags_channel_iter_init(AgsChannelIter *iter, guint flags); #endif /*__AGS_CHANNEL_ITER_H__*/ gsequencer-1.4.24/ags/audio/ags_notation.h0000644000175000017500000001370113247044247015406 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTATION_H__ #define __AGS_NOTATION_H__ #include #include #include #include #include #define AGS_TYPE_NOTATION (ags_notation_get_type()) #define AGS_NOTATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_NOTATION, AgsNotation)) #define AGS_NOTATION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NOTATION, AgsNotationClass)) #define AGS_IS_NOTATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_NOTATION)) #define AGS_IS_NOTATION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_NOTATION)) #define AGS_NOTATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_NOTATION, AgsNotationClass)) #define AGS_NOTATION_DEFAULT_BPM (120.0) #define AGS_NOTATION_TICS_PER_BEAT (1.0) #define AGS_NOTATION_MINIMUM_NOTE_LENGTH (1.0 / 16.0) #define AGS_NOTATION_MAXIMUM_NOTE_LENGTH (16.0) #define AGS_NOTATION_DEFAULT_LENGTH (65535.0 / AGS_NOTATION_TICS_PER_BEAT - AGS_NOTATION_MAXIMUM_NOTE_LENGTH) #define AGS_NOTATION_DEFAULT_JIFFIE (60.0 / AGS_NOTATION_DEFAULT_BPM / AGS_NOTATION_TICS_PER_BEAT) #define AGS_NOTATION_DEFAULT_DURATION (AGS_NOTATION_DEFAULT_LENGTH * AGS_NOTATION_DEFAULT_JIFFIE * AGS_MICROSECONDS_PER_SECOND) #define AGS_NOTATION_DEFAULT_OFFSET (64 * (1 / AGS_NOTATION_MINIMUM_NOTE_LENGTH)) #define AGS_NOTATION_CLIPBOARD_VERSION "1.2.0" #define AGS_NOTATION_CLIPBOARD_TYPE "AgsNotationClipboardXml" #define AGS_NOTATION_CLIPBOARD_FORMAT "AgsNotationNativePiano" typedef struct _AgsNotation AgsNotation; typedef struct _AgsNotationClass AgsNotationClass; /** * AgsNotationFlags: * @AGS_NOTATION_CONNECTED: indicates the notation was connected by calling #AgsConnectable::connect() * @AGS_NOTATION_STICKY: sticky * @AGS_NOTATION_PATTERN_MODE: pattern mode * * Enum values to control the behavior or indicate internal state of #AgsNotation by * enable/disable as flags. */ typedef enum{ AGS_NOTATION_CONNECTED = 1, AGS_NOTATION_STICKY = 1 << 1, AGS_NOTATION_PATTERN_MODE = 1 << 2, }AgsNotationFlags; struct _AgsNotation { GObject object; guint flags; AgsTimestamp *timestamp; guint audio_channel; GObject *audio; gchar *key; gchar *base_note; gdouble base_frequency; gdouble tact; gdouble bpm; gdouble maximum_note_length; GList *notes; gdouble loop_start; gdouble loop_end; gdouble offset; GList *selection; GObject *port; GList *current_notes; GList *next_notes; }; struct _AgsNotationClass { GObjectClass object; }; GType ags_notation_get_type(); GList* ags_notation_find_near_timestamp(GList *notation, guint audio_channel, AgsTimestamp *timestamp); GList* ags_notation_add(GList *notation, AgsNotation *new_notation); void ags_notation_add_note(AgsNotation *notation, AgsNote *note, gboolean use_selection_list); void ags_notation_remove_note(AgsNotation *notation, AgsNote *note, gboolean use_selection_list); gboolean ags_notation_remove_note_at_position(AgsNotation *notation, guint x, guint y); GList* ags_notation_get_selection(AgsNotation *notation); gboolean ags_notation_is_note_selected(AgsNotation *notation, AgsNote *note); AgsNote* ags_notation_find_point(AgsNotation *notation, guint x, guint y, gboolean use_selection_list); GList* ags_notation_find_region(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1, gboolean use_selection_list); void ags_notation_free_selection(AgsNotation *notation); void ags_notation_add_all_to_selection(AgsNotation *notation); void ags_notation_add_point_to_selection(AgsNotation *notation, guint x, guint y, gboolean replace_current_selection); void ags_notation_remove_point_from_selection(AgsNotation *notation, guint x, guint y); void ags_notation_add_region_to_selection(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1, gboolean replace_current_selection); void ags_notation_remove_region_from_selection(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1); xmlNode* ags_notation_copy_selection(AgsNotation *notation); xmlNode* ags_notation_cut_selection(AgsNotation *notation); void ags_notation_insert_from_clipboard(AgsNotation *notation, xmlNode *notation_node, gboolean reset_x_offset, guint x_offset, gboolean reset_y_offset, guint y_offset); void ags_notation_insert_from_clipboard_extended(AgsNotation *notation, xmlNode *notation_node, gboolean reset_x_offset, guint x_offset, gboolean reset_y_offset, guint y_offset, gboolean match_channel, gboolean no_duplicates); GList* ags_notation_get_current(AgsNotation *notation); unsigned char* ags_notation_to_raw_midi(AgsNotation *notation, gdouble bpm, gdouble delay_factor, glong nn, glong dd, glong cc, glong bb, glong tempo, guint *buffer_length); AgsNotation* ags_notation_from_raw_midi(unsigned char *raw_midi, glong nn, glong dd, glong cc, glong bb, glong tempo, gdouble bpm, gdouble delay_factor, guint buffer_length); AgsNotation* ags_notation_new(GObject *audio, guint audio_channel); #endif /*__AGS_NOTATION_H__*/ gsequencer-1.4.24/ags/audio/ags_input.h0000644000175000017500000000514213256163135014710 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_INPUT_H__ #define __AGS_INPUT_H__ #include #include #include #include #define AGS_TYPE_INPUT (ags_input_get_type()) #define AGS_INPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_INPUT, AgsInput)) #define AGS_INPUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_INPUT, AgsInputClass)) #define AGS_IS_INPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_INPUT)) #define AGS_IS_INPUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_INPUT)) #define AGS_INPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_INPUT, AgsInputClass)) #define AGS_INPUT_SYNTH_BASE_NOTE (-48.0) typedef struct _AgsInput AgsInput; typedef struct _AgsInputClass AgsInputClass; struct _AgsInput { AgsChannel channel; GObject *file_link; GObject *synth_generator; }; struct _AgsInputClass { AgsChannelClass channel; }; GType ags_input_get_type(); gboolean ags_input_open_file(AgsInput *input, gchar *filename, gchar *preset, gchar *instrument, gchar *sample, guint audio_channel); gboolean ags_input_apply_synth(AgsInput *input, guint oscillator, gdouble frequency, gdouble phase, gdouble volume, guint n_frames); gboolean ags_input_apply_synth_extended(AgsInput *input, guint oscillator, gdouble frequency, gdouble phase, gdouble volume, guint n_frames, guint attack, gdouble base_note, AgsComplex *sync_start, AgsComplex *sync_end, guint compute_flags); gboolean ags_input_is_active(AgsInput *input, GObject *recycling_context); AgsInput* ags_input_next_active(AgsInput *input, GObject *recycling_context); AgsInput* ags_input_new(GObject *audio); #endif /*__AGS_INPUT_H__*/ gsequencer-1.4.24/ags/audio/ags_acceleration.h0000644000175000017500000000570413246707333016211 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ACCELERATION_H__ #define __AGS_ACCELERATION_H__ #include #include #define AGS_TYPE_ACCELERATION (ags_acceleration_get_type()) #define AGS_ACCELERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ACCELERATION, AgsAcceleration)) #define AGS_ACCELERATION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ACCELERATION, AgsAccelerationClass)) #define AGS_IS_ACCELERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ACCELERATION)) #define AGS_IS_ACCELERATION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ACCELERATION)) #define AGS_ACCELERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ACCELERATION, AgsAccelerationClass)) typedef struct _AgsAcceleration AgsAcceleration; typedef struct _AgsAccelerationClass AgsAccelerationClass; /** * AgsAccelerationFlags: * @AGS_ACCELERATION_CONNECTED: if this object is already connected * @AGS_ACCELERATION_DEFAULT_START: if start is default start point * @AGS_ACCELERATION_DEFAULT_END: if end is default end point * @AGS_ACCELERATION_GUI: interpret x and y as GUI format * @AGS_ACCELERATION_RUNTIME: interpret x and y as runtime formant * @AGS_ACCELERATION_HUMAN_READABLE: interpret x and y as human readable * @AGS_ACCELERATION_DEFAULT_LENGTH: if default length applies * @AGS_ACCELERATION_IS_SELECTED: if the acceleration is selected */ typedef enum{ AGS_ACCELERATION_CONNECTED = 1, AGS_ACCELERATION_DEFAULT_START = 1 << 1, AGS_ACCELERATION_DEFAULT_END = 1 << 2, AGS_ACCELERATION_GUI = 1 << 3, AGS_ACCELERATION_RUNTIME = 1 << 4, AGS_ACCELERATION_HUMAN_READABLE = 1 << 5, AGS_ACCELERATION_DEFAULT_LENGTH = 1 << 6, AGS_ACCELERATION_IS_SELECTED = 1 << 7, }AgsAccelerationFlags; struct _AgsAcceleration { GObject gobject; guint flags; // gui format, convert easy to visualization guint x; gdouble y; gchar *acceleration_name; }; struct _AgsAccelerationClass { GObjectClass gobject; }; GType ags_acceleration_get_type(); AgsAcceleration* ags_acceleration_duplicate(AgsAcceleration *acceleration); AgsAcceleration* ags_acceleration_new(); #endif /*__AGS_ACCELERATION_H__*/ gsequencer-1.4.24/ags/audio/ags_automation.c0000644000175000017500000015525513256163135015737 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_automation_class_init(AgsAutomationClass *automation); void ags_automation_connectable_interface_init(AgsConnectableInterface *connectable); void ags_automation_portlet_interface_init(AgsPortletInterface *portlet); void ags_automation_init(AgsAutomation *automation); void ags_automation_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_automation_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_automation_connect(AgsConnectable *connectable); void ags_automation_disconnect(AgsConnectable *connectable); void ags_automation_dispose(GObject *gobject); void ags_automation_finalize(GObject *gobject); void ags_automation_set_port(AgsPortlet *portlet, GObject *port); GObject* ags_automation_get_port(AgsPortlet *portlet); GList* ags_automation_list_safe_properties(AgsPortlet *portlet); void ags_automation_safe_set_property(AgsPortlet *portlet, gchar *property_name, GValue *value); void ags_automation_safe_get_property(AgsPortlet *portlet, gchar *property_name, GValue *value); void ags_automation_insert_native_scale_from_clipboard(AgsAutomation *automation, xmlNode *root_node, char *version, char *x_boundary, char *y_boundary, gboolean from_x_offset, guint x_offset, gboolean from_y_offset, guint y_offset, gboolean match_line, gboolean no_duplicates); /** * SECTION:ags_automation * @short_description: Automation class supporting selection and clipboard. * @title: AgsAutomation * @section_id: * @include: ags/audio/ags_automation.h * * #AgsAutomation acts as a container of #AgsAcceleration. */ enum{ PROP_0, PROP_AUDIO, PROP_LINE, PROP_CHANNEL_TYPE, PROP_CONTROL_NAME, PROP_PORT, PROP_STEPS, PROP_UPPER, PROP_LOWER, PROP_DEFAULT_VALUE, PROP_ACCELERATION, PROP_CURRENT_ACCELERATIONS, PROP_NEXT_ACCELERATIONS, PROP_TIMESTAMP, }; static gpointer ags_automation_parent_class = NULL; GType ags_automation_get_type() { static GType ags_type_automation = 0; if(!ags_type_automation){ static const GTypeInfo ags_automation_info = { sizeof(AgsAutomationClass), NULL, NULL, (GClassInitFunc) ags_automation_class_init, NULL, NULL, sizeof(AgsAutomation), 0, (GInstanceInitFunc) ags_automation_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_automation_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_portlet_interface_info = { (GInterfaceInitFunc) ags_automation_portlet_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_automation = g_type_register_static(G_TYPE_OBJECT, "AgsAutomation", &ags_automation_info, 0); g_type_add_interface_static(ags_type_automation, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_automation, AGS_TYPE_PORTLET, &ags_portlet_interface_info); } return(ags_type_automation); } void ags_automation_class_init(AgsAutomationClass *automation) { GObjectClass *gobject; GParamSpec *param_spec; ags_automation_parent_class = g_type_class_peek_parent(automation); gobject = (GObjectClass *) automation; gobject->set_property = ags_automation_set_property; gobject->get_property = ags_automation_get_property; gobject->dispose = ags_automation_dispose; gobject->finalize = ags_automation_finalize; /* properties */ /** * AgsAutomation:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of automation"), i18n_pspec("The audio of automation"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsAutomation:line: * * The effect's line. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("line", i18n_pspec("line of effect"), i18n_pspec("The numerical line of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LINE, param_spec); /** * AgsAutomation:channel-type: * * The effect's assigned channel type. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("channel-type", i18n_pspec("channel type to apply"), i18n_pspec("The channel type to apply"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL_TYPE, param_spec); /** * AgsAutomation:control-name: * * The effect's assigned control name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("control-name", i18n_pspec("control name"), i18n_pspec("The control name"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTROL_NAME, param_spec); /** * AgsAutomation:port: * * The assigned #AgsPort * * Since: 1.0.0 */ param_spec = g_param_spec_object("port", i18n_pspec("port of automation"), i18n_pspec("The port of automation"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT, param_spec); /** * AgsAutomation:steps: * * The effect's steps. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("steps", i18n_pspec("steps of effect"), i18n_pspec("The steps of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STEPS, param_spec); /** * AgsAutomation:upper: * * The effect's upper. * * Since: 1.0.0 */ param_spec = g_param_spec_double("upper", i18n_pspec("upper of effect"), i18n_pspec("The upper of effect"), -65535.0, 65535.0, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_UPPER, param_spec); /** * AgsAutomation:lower: * * The effect's lower. * * Since: 1.0.0 */ param_spec = g_param_spec_double("lower", i18n_pspec("lower of effect"), i18n_pspec("The lower of effect"), -65535.0, 65535.0, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LOWER, param_spec); /** * AgsAutomation:default-value: * * The effect's default-value. * * Since: 1.0.0 */ param_spec = g_param_spec_double("default-value", i18n_pspec("default value of effect"), i18n_pspec("The default value of effect"), -65535.0, 65535.0, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEFAULT_VALUE, param_spec); /** * AgsAutomation:acceleration: * * The acceleration list. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("acceleration", i18n_pspec("acceleration"), i18n_pspec("The acceleration"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ACCELERATION, param_spec); /** * AgsAutomation:current-accelerations: * * Offset of current position. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("current-accelerations", i18n_pspec("current accelerations for offset"), i18n_pspec("The current accelerations for offset"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CURRENT_ACCELERATIONS, param_spec); /** * AgsAutomation:next-accelerations: * * Offset of next position. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("next-accelerations", i18n_pspec("next accelerations for offset"), i18n_pspec("The next accelerations for offset"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NEXT_ACCELERATIONS, param_spec); /** * AgsAutomation:timestamp: * * The automation's timestamp. * * Since: 1.0.0 */ param_spec = g_param_spec_object("timestamp", i18n_pspec("timestamp of automation"), i18n_pspec("The timestamp of automation"), AGS_TYPE_TIMESTAMP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TIMESTAMP, param_spec); } void ags_automation_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_automation_connect; connectable->disconnect = ags_automation_disconnect; } void ags_automation_portlet_interface_init(AgsPortletInterface *portlet) { portlet->set_port = ags_automation_set_port; portlet->get_port = ags_automation_get_port; portlet->list_safe_properties = ags_automation_list_safe_properties; portlet->safe_set_property = ags_automation_safe_set_property; portlet->safe_get_property = ags_automation_safe_get_property; } void ags_automation_init(AgsAutomation *automation) { AgsAcceleration *acceleration; automation->flags = AGS_AUTOMATION_BYPASS; automation->timestamp = ags_timestamp_new(); automation->timestamp->flags &= (~AGS_TIMESTAMP_UNIX); automation->timestamp->flags |= AGS_TIMESTAMP_OFFSET; automation->timestamp->timer.ags_offset.offset = 0; g_object_ref(automation->timestamp); automation->audio = NULL; automation->line = 0; automation->channel_type = G_TYPE_NONE; automation->control_name = NULL; automation->steps = 8; automation->upper = 1.0; automation->lower = 0.0; automation->default_value = 0.0; automation->acceleration = NULL; automation->loop_start = 0.0; automation->loop_end = 0.0; automation->offset = 0.0; automation->selection = NULL; automation->port = NULL; automation->current_accelerations = NULL; automation->next_accelerations = NULL; } void ags_automation_connect(AgsConnectable *connectable) { AgsAutomation *automation; GList *list; automation = AGS_AUTOMATION(connectable); if((AGS_AUTOMATION_CONNECTED & (automation->flags)) != 0){ return; } automation->flags |= AGS_AUTOMATION_CONNECTED; /* acceleration */ list = automation->acceleration; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_automation_disconnect(AgsConnectable *connectable) { AgsAutomation *automation; GList *list; automation = AGS_AUTOMATION(connectable); if((AGS_AUTOMATION_CONNECTED & (automation->flags)) == 0){ return; } automation->flags &= (~AGS_AUTOMATION_CONNECTED); /* acceleration */ list = automation->acceleration; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_automation_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAutomation *automation; automation = AGS_AUTOMATION(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(automation->audio == (GObject *) audio){ return; } if(automation->audio != NULL){ g_object_unref(automation->audio); } if(audio != NULL){ g_object_ref(audio); } automation->audio = (GObject *) audio; } break; case PROP_LINE: { guint line; line = g_value_get_uint(value); automation->line = line; } break; case PROP_CHANNEL_TYPE: { GType channel_type; channel_type = (GType) g_value_get_gtype(value); automation->channel_type = channel_type; } break; case PROP_CONTROL_NAME: { gchar *control_name; control_name = g_value_get_string(value); if(automation->control_name != NULL){ g_free(automation->control_name); } automation->control_name = g_strdup(control_name); } break; case PROP_PORT: { AgsPort *port; port = g_value_get_object(value); if(automation->port == (GObject *) port){ return; } if(automation->port != NULL){ g_object_unref(automation->port); } if(port != NULL){ g_object_ref(port); if((AGS_PORT_INFINITE_RANGE & (port->flags)) != 0){ automation->steps = AGS_AUTOMATION_MAXIMUM_STEPS; } } automation->port = (GObject *) port; if(port->port_descriptor != NULL){ automation->lower = g_value_get_float(AGS_PORT_DESCRIPTOR(port->port_descriptor)->lower_value); automation->upper = g_value_get_float(AGS_PORT_DESCRIPTOR(port->port_descriptor)->upper_value); if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port->port_descriptor)->flags)) != 0){ automation->lower = 0.0; automation->upper = 1.0; automation->steps = 1; }else if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port->port_descriptor)->flags)) != 0){ automation->steps = AGS_PORT_DESCRIPTOR(port->port_descriptor)->scale_steps; }else{ automation->steps = AGS_AUTOMATION_DEFAULT_PRECISION; } } } break; case PROP_STEPS: { guint steps; steps = g_value_get_uint(value); automation->steps = steps; } break; case PROP_UPPER: { gdouble upper; upper = g_value_get_double(value); automation->upper = upper; } break; case PROP_LOWER: { gdouble lower; lower = g_value_get_double(value); automation->lower = lower; } break; case PROP_DEFAULT_VALUE: { gdouble default_value; default_value = g_value_get_double(value); automation->default_value = default_value; } break; case PROP_ACCELERATION: { AgsAcceleration *acceleration; acceleration = (AgsAcceleration *) g_value_get_object(value); if(acceleration == NULL || g_list_find(automation->acceleration, acceleration) != NULL){ return; } ags_automation_add_acceleration(automation, acceleration, FALSE); } break; case PROP_CURRENT_ACCELERATIONS: { GList *current_accelerations; current_accelerations = g_value_get_pointer(value); if(automation->current_accelerations == current_accelerations){ return; } automation->current_accelerations = current_accelerations; } break; case PROP_NEXT_ACCELERATIONS: { GList *next_accelerations; next_accelerations = g_value_get_pointer(value); if(automation->next_accelerations == next_accelerations){ return; } automation->next_accelerations = next_accelerations; } break; case PROP_TIMESTAMP: { AgsTimestamp *timestamp; timestamp = (AgsTimestamp *) g_value_get_object(value); if(automation->timestamp == (GObject *) timestamp){ return; } if(automation->timestamp != NULL){ g_object_unref(G_OBJECT(automation->timestamp)); } if(timestamp != NULL){ g_object_ref(G_OBJECT(timestamp)); } automation->timestamp = (GObject *) timestamp; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAutomation *automation; automation = AGS_AUTOMATION(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, automation->audio); } break; case PROP_LINE: { g_value_set_uint(value, automation->line); } break; case PROP_CHANNEL_TYPE: { g_value_set_gtype(value, automation->channel_type); } break; case PROP_CONTROL_NAME: { g_value_set_string(value, automation->control_name); } break; case PROP_PORT: { g_value_set_object(value, automation->port); } break; case PROP_STEPS: { g_value_set_uint(value, automation->steps); } break; case PROP_UPPER: { g_value_set_double(value, automation->upper); } break; case PROP_LOWER: { g_value_set_double(value, automation->lower); } break; case PROP_DEFAULT_VALUE: { g_value_set_double(value, automation->default_value); } break; case PROP_CURRENT_ACCELERATIONS: { g_value_set_pointer(value, automation->current_accelerations); } break; case PROP_NEXT_ACCELERATIONS: { g_value_set_pointer(value, automation->next_accelerations); } break; case PROP_TIMESTAMP: { g_value_set_object(value, automation->timestamp); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_automation_dispose(GObject *gobject) { AgsAutomation *automation; GList *list; automation = AGS_AUTOMATION(gobject); /* timestamp */ if(automation->timestamp != NULL){ g_object_unref(automation->timestamp); automation->timestamp = NULL; } /* audio */ if(automation->audio != NULL){ g_object_unref(automation->audio); automation->audio = NULL; } /* source function */ if(automation->source_function != NULL){ g_object_run_dispose(automation->source_function); g_object_unref(automation->source_function); automation->source_function = NULL; } /* acceleration */ list = automation->acceleration; while(list != NULL){ g_object_run_dispose(G_OBJECT(list->data)); list = list->next; } g_list_free_full(automation->acceleration, g_object_unref); g_list_free(automation->selection); automation->acceleration = NULL; automation->selection = NULL; /* port */ if(automation->port != NULL){ g_object_unref(automation->port); automation->port = NULL; } /* call parent */ G_OBJECT_CLASS(ags_automation_parent_class)->dispose(gobject); } void ags_automation_finalize(GObject *gobject) { AgsAutomation *automation; automation = AGS_AUTOMATION(gobject); /* timestamp */ if(automation->timestamp != NULL){ g_object_unref(automation->timestamp); } /* audio */ if(automation->audio != NULL){ g_object_unref(automation->audio); } /* control name */ if(automation->control_name != NULL){ free(automation->control_name); } /* source function */ if(automation->source_function != NULL){ g_object_unref(automation->source_function); } /* acceleration */ g_list_free_full(automation->acceleration, g_object_unref); g_list_free(automation->selection); /* port */ if(automation->port != NULL){ g_object_unref(automation->port); } /* call parent */ G_OBJECT_CLASS(ags_automation_parent_class)->finalize(gobject); } void ags_automation_set_port(AgsPortlet *portlet, GObject *port) { g_object_set(G_OBJECT(portlet), "port", port, NULL); } GObject* ags_automation_get_port(AgsPortlet *portlet) { GObject *port; g_object_get(G_OBJECT(portlet), "port", &port, NULL); return(port); } GList* ags_automation_list_safe_properties(AgsPortlet *portlet) { static GList *list = NULL; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(list == NULL){ list = g_list_prepend(list, "current-accelerations"); list = g_list_prepend(list, "next-accelerations"); } pthread_mutex_unlock(&mutex); return(list); } void ags_automation_safe_set_property(AgsPortlet *portlet, gchar *property_name, GValue *value) { //TODO:JK: add check for safe property g_object_set_property(G_OBJECT(portlet), property_name, value); } void ags_automation_safe_get_property(AgsPortlet *portlet, gchar *property_name, GValue *value) { //TODO:JK: add check for safe property g_object_get_property(G_OBJECT(portlet), property_name, value); } /** * ags_automation_find_port: * @automation: the #GList-struct containing #AgsAutomation * @port: the #AgsPort to match * * Find automation by port. * * Returns: next matching automation as #GList-struct or %NULL if not found * * Since: 1.3.0 */ GList* ags_automation_find_port(GList *automation, GObject *port) { if(automation == NULL || !AGS_IS_PORT(port)){ return(NULL); } while(automation != NULL){ if(AGS_AUTOMATION(automation->data)->port == port){ break; } automation = automation->next; } return(automation); } /** * ags_automation_find_near_timestamp: * @automation: a #GList containing #AgsAutomation * @line: the matching audio channel * @timestamp: the matching timestamp * * Retrieve appropriate automation for timestamp. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_automation_find_near_timestamp(GList *automation, guint line, AgsTimestamp *timestamp) { AgsTimestamp *current_timestamp; while(automation != NULL){ if(AGS_AUTOMATION(automation->data)->line != line){ automation = automation->next; continue; } if(timestamp == NULL){ return(automation); } current_timestamp = (AgsTimestamp *) AGS_AUTOMATION(automation->data)->timestamp; if(current_timestamp != NULL){ if((AGS_TIMESTAMP_UNIX & (timestamp->flags)) != 0 && (AGS_TIMESTAMP_UNIX & (current_timestamp->flags)) != 0){ if(current_timestamp->timer.unix_time.time_val >= timestamp->timer.unix_time.time_val && current_timestamp->timer.unix_time.time_val < timestamp->timer.unix_time.time_val + AGS_AUTOMATION_DEFAULT_DURATION){ return(automation); } }else if((AGS_TIMESTAMP_OFFSET & (timestamp->flags)) != 0 && (AGS_TIMESTAMP_OFFSET & (current_timestamp->flags)) != 0){ if(current_timestamp->timer.ags_offset.offset >= timestamp->timer.ags_offset.offset && current_timestamp->timer.ags_offset.offset < timestamp->timer.ags_offset.offset + AGS_AUTOMATION_DEFAULT_OFFSET){ return(automation); } } } automation = automation->next; } return(NULL); } /** * ags_automation_find_near_timestamp_extended: * @automation: a #GList containing #AgsAutomation * @line: the matching audio channel * @channel_type: the matching channel type * @control_name: the matching control name * @timestamp: the matching timestamp * * Retrieve appropriate automation for timestamp. * * Returns: Next match. * * Since: 1.3.0 */ GList* ags_automation_find_near_timestamp_extended(GList *automation, guint line, GType channel_type, gchar *control_name, AgsTimestamp *timestamp) { AgsTimestamp *current_timestamp; while(automation != NULL){ if(AGS_AUTOMATION(automation->data)->line != line || AGS_AUTOMATION(automation->data)->channel_type != channel_type || g_strcmp0(AGS_AUTOMATION(automation->data)->control_name, control_name)){ automation = automation->next; continue; } if(timestamp == NULL){ return(automation); } current_timestamp = (AgsTimestamp *) AGS_AUTOMATION(automation->data)->timestamp; if(current_timestamp != NULL){ if((AGS_TIMESTAMP_UNIX & (timestamp->flags)) != 0 && (AGS_TIMESTAMP_UNIX & (current_timestamp->flags)) != 0){ if(current_timestamp->timer.unix_time.time_val >= timestamp->timer.unix_time.time_val && current_timestamp->timer.unix_time.time_val < timestamp->timer.unix_time.time_val + AGS_AUTOMATION_DEFAULT_DURATION){ return(automation); } }else if((AGS_TIMESTAMP_OFFSET & (timestamp->flags)) != 0 && (AGS_TIMESTAMP_OFFSET & (current_timestamp->flags)) != 0){ if(current_timestamp->timer.ags_offset.offset >= timestamp->timer.ags_offset.offset && current_timestamp->timer.ags_offset.offset < timestamp->timer.ags_offset.offset + AGS_AUTOMATION_DEFAULT_OFFSET){ return(automation); } } } automation = automation->next; } return(NULL); } /** * ags_automation_add: * @automation: the #GList-struct containing #AgsAutomation * @new_automation: the automation to add * * Add @new_automation sorted to @automation * * Returns: the new beginning of @automation * * Since: 1.3.0 */ GList* ags_automation_add(GList *automation, AgsAutomation *new_automation) { auto gint ags_automation_add_compare(gconstpointer a, gconstpointer b); gint ags_automation_add_compare(gconstpointer a, gconstpointer b) { if(AGS_AUTOMATION(a)->timestamp->timer.ags_offset.offset == AGS_AUTOMATION(b)->timestamp->timer.ags_offset.offset){ return(0); }else if(AGS_AUTOMATION(a)->timestamp->timer.ags_offset.offset < AGS_AUTOMATION(b)->timestamp->timer.ags_offset.offset){ return(-1); }else if(AGS_AUTOMATION(a)->timestamp->timer.ags_offset.offset > AGS_AUTOMATION(b)->timestamp->timer.ags_offset.offset){ return(1); } return(0); } if(!AGS_IS_AUTOMATION(new_automation) || !AGS_IS_TIMESTAMP(new_automation->timestamp)){ return(automation); } automation = g_list_insert_sorted(automation, new_automation, ags_automation_add_compare); return(automation); } /** * ags_automation_add_acceleration: * @automation: an #AgsAutomation * @acceleration: the #AgsAcceleration to add * @use_selection_list: if %TRUE add to selection, else to default automation * * Adds a acceleration to automation. * * Since: 1.0.0 */ void ags_automation_add_acceleration(AgsAutomation *automation, AgsAcceleration *acceleration, gboolean use_selection_list) { GList *list, *list_new; auto gint ags_automation_add_acceleration_compare_function(gpointer a, gpointer b); gint ags_automation_add_acceleration_compare_function(gpointer a, gpointer b){ if(AGS_ACCELERATION(a)->x == AGS_ACCELERATION(b)->x){ return(0); } if(AGS_ACCELERATION(a)->x < AGS_ACCELERATION(b)->x){ return(-1); }else{ return(1); } } if(acceleration == NULL){ return; } g_object_ref(acceleration); if(use_selection_list){ automation->selection = g_list_insert_sorted(automation->selection, acceleration, (GCompareFunc) ags_automation_add_acceleration_compare_function); }else{ automation->acceleration = g_list_insert_sorted(automation->acceleration, acceleration, (GCompareFunc) ags_automation_add_acceleration_compare_function); } } /** * ags_automation_remove_acceleration_at_position: * @automation: an #AgsAutomation * @x: offset * @y: acceleration * * Removes one #AgsAcceleration of automation. * * Returns: %TRUE if successfully removed acceleration. * * Since: 1.0.0 */ gboolean ags_automation_remove_acceleration_at_position(AgsAutomation *automation, guint x, gdouble y) { GList *list, *current; gboolean retval; list = automation->acceleration; current = NULL; retval = FALSE; while(list != NULL){ if(AGS_ACCELERATION(list->data)->x == x && (AGS_ACCELERATION(list->data)->y - ((automation->upper - automation->lower) / AGS_AUTOMATION_MAXIMUM_STEPS) <= y && AGS_ACCELERATION(list->data)->y + ((automation->upper - automation->lower) / AGS_AUTOMATION_MAXIMUM_STEPS) >= y)){ current = list; retval = TRUE; break; } if(AGS_ACCELERATION(list->data)->x > x){ break; } list = list->next; } automation->acceleration = g_list_delete_link(automation->acceleration, current); return(retval); } /** * ags_automation_get_selection: * @automation: the #AgsAutomation * * Retrieve selection. * * Returns: the selection. * * Since: 1.0.0 */ GList* ags_automation_get_selection(AgsAutomation *automation) { return(automation->selection); } /** * ags_automation_is_acceleration_selected: * @automation: the #AgsAutomation * @acceleration: the #AgsAcceleration to check for * * Check selection for acceleration. * * Returns: %TRUE if selected * * Since: 1.0.0 */ gboolean ags_automation_is_acceleration_selected(AgsAutomation *automation, AgsAcceleration *acceleration) { GList *selection; selection = automation->selection; while(selection != NULL && AGS_ACCELERATION(selection->data)->x <= acceleration->x){ if(selection->data == acceleration){ return(TRUE); } selection = selection->next; } return(FALSE); } /** * ags_automation_find_point: * @automation: an #AgsAutomation * @x: offset * @y: acceleration, will be ignored * @use_selection_list: if %TRUE selection is searched * * Find acceleration by offset and acceleration. * * Returns: the matching acceleration. * * Since: 1.0.0 */ AgsAcceleration* ags_automation_find_point(AgsAutomation *automation, guint x, gdouble y, gboolean use_selection_list) { GList *acceleration; if(use_selection_list){ acceleration = automation->selection; }else{ acceleration = automation->acceleration; } while(acceleration != NULL && AGS_ACCELERATION(acceleration->data)->x < x){ acceleration = acceleration->next; } if(acceleration == NULL || AGS_ACCELERATION(acceleration->data)->x != x){ return(NULL); }else{ return(acceleration->data); } } /** * ags_automation_find_region: * @automation: an #AgsAutomation * @x0: start offset * @y0: start tone * @x1: end offset * @y1: end tone * @use_selection_list: if %TRUE selection is searched * * Find acceleration by offset and tone region. * * Returns: the matching acceleration as #GList. * * Since: 1.0.0 */ GList* ags_automation_find_region(AgsAutomation *automation, guint x0, gdouble y0, guint x1, gdouble y1, gboolean use_selection_list) { AgsAcceleration *current; GList *acceleration; GList *region; if(y0 > y1){ gdouble tmp_y; tmp_y = y0; y0 = y1; y1 = tmp_y; } if(use_selection_list){ acceleration = automation->selection; }else{ acceleration = automation->acceleration; } while(acceleration != NULL && AGS_ACCELERATION(acceleration->data)->x < x0){ acceleration = acceleration->next; } region = NULL; while(acceleration != NULL && (current = AGS_ACCELERATION(acceleration->data))->x < x1){ if(current->y >= y0 && current->y < y1){ region = g_list_prepend(region, current); } acceleration = acceleration->next; } region = g_list_reverse(region); return(region); } /** * ags_automation_free_selection: * @automation: an #AgsAutomation * * Clear selection. * * Since: 1.0.0 */ void ags_automation_free_selection(AgsAutomation *automation) { AgsAcceleration *acceleration; GList *list; list = automation->selection; while(list != NULL){ acceleration = AGS_ACCELERATION(list->data); acceleration->flags &= (~AGS_ACCELERATION_IS_SELECTED); g_object_unref(G_OBJECT(acceleration)); list = list->next; } list = automation->selection; automation->selection = NULL; g_list_free(list); } /** * ags_automation_add_point_to_selection: * @automation: an #AgsAutomation * @x: offset * @y: tone * @replace_current_selection: if %TRUE selection is replaced * * Select acceleration at position. * * Since: 1.0.0 */ void ags_automation_add_point_to_selection(AgsAutomation *automation, guint x, gdouble y, gboolean replace_current_selection) { AgsAcceleration *acceleration; acceleration = ags_automation_find_point(automation, x, y, FALSE); if(acceleration == NULL){ /* there is nothing to be selected */ if(replace_current_selection){ ags_automation_free_selection(automation); } }else{ /* add to or replace selection */ acceleration->flags |= AGS_ACCELERATION_IS_SELECTED; g_object_ref(acceleration); if(replace_current_selection){ GList *list; list = g_list_alloc(); list->data = acceleration; ags_automation_free_selection(automation); automation->selection = list; }else{ if(!ags_automation_is_acceleration_selected(automation, acceleration)){ ags_automation_add_acceleration(automation, acceleration, TRUE); } } } } /** * ags_automation_remove_point_from_selection: * @automation: an #AgsAutomation * @x: offset * @y: tone * * Remove acceleration at position of selection. * * Since: 1.0.0 */ void ags_automation_remove_point_from_selection(AgsAutomation *automation, guint x, gdouble y) { AgsAcceleration *acceleration; acceleration = ags_automation_find_point(automation, x, y, FALSE); if(acceleration != NULL){ acceleration->flags &= (~AGS_ACCELERATION_IS_SELECTED); /* remove acceleration from selection */ automation->selection = g_list_remove(automation->selection, acceleration); g_object_unref(acceleration); } } void ags_automation_add_region_to_selection(AgsAutomation *automation, guint x0, gdouble y0, guint x1, gdouble y1, gboolean replace_current_selection) { AgsAcceleration *acceleration; GList *region, *list; region = ags_automation_find_region(automation, x0, y0, x1, y1, FALSE); if(replace_current_selection){ ags_automation_free_selection(automation); list = region; while(list != NULL){ AGS_ACCELERATION(list->data)->flags |= AGS_ACCELERATION_IS_SELECTED; g_object_ref(G_OBJECT(list->data)); list = list->next; } automation->selection = region; }else{ while(region != NULL){ acceleration = AGS_ACCELERATION(region->data); if(!ags_automation_is_acceleration_selected(automation, acceleration)){ acceleration->flags |= AGS_ACCELERATION_IS_SELECTED; g_object_ref(G_OBJECT(acceleration)); ags_automation_add_acceleration(automation, acceleration, TRUE); } region = region->next; } g_list_free(region); } } /** * ags_automation_remove_region_from_selection: * @automation: an #AgsAutomation * @x0: start offset * @y0: start tone * @x1: end offset * @y1: end tone * * Remove acceleration within region of selection. * * Since: 1.0.0 */ void ags_automation_remove_region_from_selection(AgsAutomation *automation, guint x0, gdouble y0, guint x1, gdouble y1) { AgsAcceleration *acceleration; GList *region; region = ags_automation_find_region(automation, x0, y0, x1, y1, TRUE); while(region != NULL){ acceleration = AGS_ACCELERATION(region->data); acceleration->flags &= (~AGS_ACCELERATION_IS_SELECTED); automation->selection = g_list_remove(automation->selection, acceleration); g_object_unref(G_OBJECT(acceleration)); region = region->next; } g_list_free(region); } void ags_automation_add_all_to_selection(AgsAutomation *automation) { GList *acceleration; if(automation == NULL || automation->acceleration == NULL){ return; } acceleration = automation->acceleration; acceleration = acceleration->next; while(acceleration->next != NULL){ AGS_ACCELERATION(acceleration->data)->flags |= AGS_ACCELERATION_IS_SELECTED; acceleration = acceleration->next; } } /** * ags_automation_copy_selection: * @automation: an #AgsAutomation * * Copy selection to clipboard. * * Returns: the selection as XML. * * Since: 1.0.0 */ xmlNode* ags_automation_copy_selection(AgsAutomation *automation) { AgsAcceleration *acceleration; xmlNode *automation_node, *current_acceleration; GList *selection; guint x_boundary; gdouble y_boundary; selection = automation->selection; /* create root node */ automation_node = xmlNewNode(NULL, BAD_CAST "automation"); xmlNewProp(automation_node, BAD_CAST "program", BAD_CAST "ags"); xmlNewProp(automation_node, BAD_CAST "type", BAD_CAST AGS_AUTOMATION_CLIPBOARD_TYPE); xmlNewProp(automation_node, BAD_CAST "version", BAD_CAST AGS_AUTOMATION_CLIPBOARD_VERSION); xmlNewProp(automation_node, BAD_CAST "format", BAD_CAST AGS_AUTOMATION_CLIPBOARD_FORMAT); xmlNewProp(automation_node, "control-name", automation->control_name); xmlNewProp(automation_node, "line", g_strdup_printf("%u", automation->line)); selection = automation->selection; if(selection != NULL){ x_boundary = AGS_ACCELERATION(selection->data)->x; y_boundary = G_MAXDOUBLE; }else{ x_boundary = 0; y_boundary = 0.0; } while(selection != NULL){ acceleration = AGS_ACCELERATION(selection->data); current_acceleration = xmlNewChild(automation_node, NULL, BAD_CAST "acceleration", NULL); xmlNewProp(current_acceleration, BAD_CAST "x", BAD_CAST g_strdup_printf("%u", acceleration->x)); xmlNewProp(current_acceleration, BAD_CAST "y", BAD_CAST g_strdup_printf("%f", acceleration->y)); if(y_boundary > acceleration->y){ y_boundary = acceleration->y; } selection = selection->next; } xmlNewProp(automation_node, BAD_CAST "x-boundary", BAD_CAST g_strdup_printf("%u", x_boundary)); xmlNewProp(automation_node, BAD_CAST "y-boundary", BAD_CAST g_strdup_printf("%f", y_boundary)); return(automation_node); } /** * ags_automation_cut_selection: * @automation: an #AgsAutomation * * Cut selection to clipboard. * * Returns: the selection as XML. * * Since: 1.0.0 */ xmlNode* ags_automation_cut_selection(AgsAutomation *automation) { xmlNode *automation_node; GList *selection, *acceleration; automation_node = ags_automation_copy_selection(automation); selection = automation->selection; acceleration = automation->acceleration; while(selection != NULL){ acceleration = g_list_find(acceleration, selection->data); if(acceleration->prev == NULL){ automation->acceleration = g_list_remove_link(acceleration, acceleration); acceleration = automation->acceleration; }else{ GList *next_acceleration; next_acceleration = acceleration->next; acceleration->prev->next = next_acceleration; if(next_acceleration != NULL){ next_acceleration->prev = acceleration->prev; } g_list_free1(acceleration); acceleration = next_acceleration; } AGS_ACCELERATION(selection->data)->flags &= (~AGS_ACCELERATION_IS_SELECTED); g_object_unref(selection->data); selection = selection->next; } ags_automation_free_selection(automation); return(automation_node); } void ags_automation_insert_native_scale_from_clipboard(AgsAutomation *automation, xmlNode *root_node, char *version, char *x_boundary, char *y_boundary, gboolean from_x_offset, guint x_offset, gboolean from_y_offset, guint y_offset, gboolean match_line, gboolean no_duplicates) { gboolean match_timestamp; auto void ags_automation_insert_from_clipboard_version_0_4_3(); void ags_automation_insert_from_clipboard_version_0_4_3() { AgsAcceleration *acceleration; xmlNode *node; char *endptr; guint x_boundary_val, y_boundary_val; char *x, *y; guint x_val; gdouble y_val; guint base_x_difference, base_y_difference; gboolean subtract_x, subtract_y; node = root_node->children; /* retrieve x values for resetting */ if(from_x_offset){ if(x_boundary != NULL){ errno = 0; x_boundary_val = strtoul(x_boundary, &endptr, 10); if(errno == ERANGE){ goto dont_reset_x_offset; } if(x_boundary == endptr){ goto dont_reset_x_offset; } if(x_boundary_val < x_offset){ base_x_difference = x_offset - x_boundary_val; subtract_x = FALSE; }else{ base_x_difference = x_boundary_val - x_offset; subtract_x = TRUE; } }else{ dont_reset_x_offset: from_x_offset = FALSE; } } /* retrieve y values for resetting */ if(from_y_offset){ if(y_boundary != NULL){ errno = 0; y_boundary_val = strtoul(y_boundary, &endptr, 10); if(errno == ERANGE){ goto dont_reset_y_offset; } if(y_boundary == endptr){ goto dont_reset_y_offset; } if(y_boundary_val < y_offset){ base_y_difference = y_offset - y_boundary_val; subtract_y = FALSE; }else{ base_y_difference = y_boundary_val - y_offset; subtract_y = TRUE; } }else{ dont_reset_y_offset: from_y_offset = FALSE; } } for(; node != NULL; node = node->next){ if(node->type == XML_ELEMENT_NODE && !xmlStrncmp("acceleration", node->name, 5)){ /* retrieve x0 offset */ x = xmlGetProp(node, "x"); if(x == NULL){ continue; } errno = 0; x_val = strtoul(x, &endptr, 10); if(errno == ERANGE){ continue; } if(x == endptr){ continue; } /* retrieve y offset */ y = xmlGetProp(node, "y"); if(y == NULL){ continue; } errno = 0; y_val = strtod(y, &endptr); if(errno == ERANGE){ continue; } if(y == endptr){ continue; } /* calculate new offset */ if(from_x_offset){ errno = 0; if(subtract_x){ x_val -= base_x_difference; if(errno != 0){ continue; } }else{ x_val += base_x_difference; if(errno != 0){ continue; } } } if(from_y_offset){ errno = 0; if(subtract_y){ y_val -= base_y_difference; }else{ y_val += base_y_difference; } if(errno != 0){ continue; } } /* check duplicate */ if(no_duplicates && ags_automation_find_point(automation, x_val, y_val, FALSE) != NULL){ continue; } /* add acceleration */ if(!match_timestamp || x_val < automation->timestamp->timer.ags_offset.offset + AGS_AUTOMATION_DEFAULT_OFFSET){ acceleration = ags_acceleration_new(); acceleration->x = x_val; acceleration->y = y_val; #ifdef AGS_DEBUG g_message("adding acceleration at: [%u|%f]\n", x_val, y_val); #endif ags_automation_add_acceleration(automation, acceleration, FALSE); } } } } if(!AGS_IS_AUTOMATION(automation)){ return; } match_timestamp = TRUE; if(!xmlStrncmp("0.4.3", version, 6)){ ags_automation_insert_from_clipboard_version_0_4_3(); }else if(!xmlStrncmp("1.3.0", version, 6)){ match_timestamp = TRUE; if(match_line && automation->line != g_ascii_strtoull(xmlGetProp(root_node, "line"), NULL, 10)){ return; } ags_automation_insert_from_clipboard_version_0_4_3(); } } void ags_automation_merge_clipboard(xmlNode *audio_node, xmlNode *automation_node) { xmlNode *find_automation; xmlNode *find_acceleration; xmlNode *child; auto gboolean ags_automation_merge_clipboard_find_acceleration(xmlNode *automation_node, xmlChar *x, xmlChar *y); gboolean ags_automation_merge_clipboard_find_acceleration(xmlNode *automation_node, xmlChar *x, xmlChar *y){ xmlNode *child; child = automation_node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "acceleration", 13)){ if(!xmlStrcmp(xmlGetProp(child, "x"), x) && !xmlStrcmp(xmlGetProp(child, "y"), y)){ return(TRUE); } } } child = child->next; } return(FALSE); } if(audio_node == NULL || automation_node == NULL){ return; } find_automation = audio_node->children; while(find_automation != NULL){ if(find_automation->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(find_automation->name, "automation", 11)){ if(!xmlStrcmp(xmlGetProp(find_automation, "line"), xmlGetProp(automation_node, "line")) && !xmlStrcmp(xmlGetProp(find_automation, "control-name"), xmlGetProp(automation_node, "control-name"))){ break; } } } find_automation = find_automation->next; } if(find_automation == NULL){ xmlAddChild(audio_node, xmlCopyNode(automation_node, 1)); return; } child = automation_node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, "acceleration", 13)){ if(!ags_automation_merge_clipboard_find_acceleration(find_automation, xmlGetProp(child, "x"), xmlGetProp(child, "y"))){ xmlAddChild(find_automation, xmlCopyNode(child, 1)); } } } child = child->next; } } void ags_automation_insert_from_clipboard(AgsAutomation *automation, xmlNode *automation_node, gboolean reset_x_offset, guint x_offset, gboolean reset_y_offset, gdouble y_offset) { ags_automation_insert_from_clipboard_extended(automation, automation_node, reset_x_offset, x_offset, reset_y_offset, y_offset, FALSE, FALSE); } void ags_automation_insert_from_clipboard_extended(AgsAutomation *automation, xmlNode *automation_node, gboolean reset_x_offset, guint x_offset, gboolean reset_y_offset, gdouble y_offset, gboolean match_line, gboolean no_duplicates) { char *program, *version, *type, *format; char *base_frequency; char *x_boundary, *y_boundary; while(automation_node != NULL){ if(automation_node->type == XML_ELEMENT_NODE && !xmlStrncmp("automation", automation_node->name, 11)){ break; } automation_node = automation_node->next; } if(automation_node != NULL){ program = xmlGetProp(automation_node, "program"); if(!xmlStrncmp("ags", program, 4)){ version = xmlGetProp(automation_node, "version"); type = xmlGetProp(automation_node, "type"); format = xmlGetProp(automation_node, "format"); if(!xmlStrcmp(AGS_AUTOMATION_CLIPBOARD_FORMAT, format) || !xmlStrcmp(AGS_AUTOMATION_CLIPBOARD_LEGACY_FORMAT, format)){ x_boundary = xmlGetProp(automation_node, "x_boundary"); y_boundary = xmlGetProp(automation_node, "y_boundary"); ags_automation_insert_native_scale_from_clipboard(automation, automation_node, version, x_boundary, y_boundary, reset_x_offset, x_offset, reset_y_offset, y_offset, match_line, no_duplicates); } } } } GList* ags_automation_get_current(AgsAutomation *automation) { //TODO:JK: implement me return(NULL); } /** * ags_automation_get_specifier_unique: * @automation: a #GList containing #AgsAutomation * * Retrieve automation port specifier. * * Returns: a %NULL terminated string array * * Since: 1.0.0 */ gchar** ags_automation_get_specifier_unique(GList *automation) { gchar **specifier, **current; guint length, i; gboolean contains_control_name; specifier = (gchar **) malloc(sizeof(gchar*)); specifier[0] = NULL; length = 1; while(automation != NULL){ current = specifier; #ifdef HAVE_GLIB_2_44 contains_control_name = g_strv_contains(specifier, AGS_AUTOMATION(automation->data)->control_name); #else contains_control_name = ags_strv_contains(specifier, AGS_AUTOMATION(automation->data)->control_name); #endif if(!contains_control_name){ specifier = (gchar **) realloc(specifier, (length + 1) * sizeof(gchar *)); specifier[length - 1] = AGS_AUTOMATION(automation->data)->control_name; specifier[length] = NULL; length++; } automation = automation->next; } return(specifier); } /** * ags_automation_get_specifier_unique_with_channel_type: * @automation: a #GList containing #AgsAutomation * @channel_type: the channel's #GType * * Retrieve automation port specifier. * * Returns: a %NULL terminated string array * * Since: 1.3.0 */ gchar** ags_automation_get_specifier_unique_with_channel_type(GList *automation, GType channel_type) { gchar **specifier, **current; guint length, i; gboolean contains_control_name; specifier = (gchar **) malloc(sizeof(gchar*)); specifier[0] = NULL; length = 1; while(automation != NULL){ current = specifier; if(AGS_AUTOMATION(automation->data)->channel_type != channel_type){ automation = automation->next; continue; } #ifdef HAVE_GLIB_2_44 contains_control_name = g_strv_contains(specifier, AGS_AUTOMATION(automation->data)->control_name); #else contains_control_name = ags_strv_contains(specifier, AGS_AUTOMATION(automation->data)->control_name); #endif if(!contains_control_name){ specifier = (gchar **) realloc(specifier, (length + 1) * sizeof(gchar *)); specifier[length - 1] = AGS_AUTOMATION(automation->data)->control_name; specifier[length] = NULL; length++; } automation = automation->next; } return(specifier); } /** * ags_automation_find_specifier: * @automation: a #GList-struct containing #AgsAutomation * @specifier: the string specifier to find * * Find port specifier. * * Returns: Next matching #GList * * Since: 1.0.0 */ GList* ags_automation_find_specifier(GList *automation, gchar *specifier) { while(automation != NULL){ if(!g_ascii_strcasecmp(AGS_AUTOMATION(automation->data)->control_name, specifier)){ break; } automation = automation->next; } return(automation); } /** * ags_automation_find_channel_type_with_control_name: * @automation: the #GList-struct containing #AgsAutomation * @channel_type: the #AgsPort to match * * Find automation by port. * * Returns: next matching automation as #GList-struct or %NULL if not found * * Since: 1.3.0 */ GList* ags_automation_find_channel_type_with_control_name(GList *automation, GType channel_type, gchar *specifier) { if(automation == NULL){ return(NULL); } while(automation != NULL){ if(AGS_AUTOMATION(automation->data)->channel_type == channel_type && !g_strcmp0(AGS_AUTOMATION(automation->data)->control_name, specifier)){ break; } automation = automation->next; } return(automation); } /** * ags_automation_find_specifier_with_type_and_line: * @automation: a #GList-struct containing #AgsAutomation * @specifier: the string specifier to find * @channel_type: the channel #GType * @line: the line * * Find port specifier with channel type and line. * * Returns: Next matching #GList-struct * * Since: 1.0.0 */ GList* ags_automation_find_specifier_with_type_and_line(GList *automation, gchar *specifier, GType channel_type, guint line) { if(specifier == NULL){ return(NULL); } while(automation != NULL){ if(AGS_AUTOMATION(automation->data)->control_name != NULL && !g_ascii_strcasecmp(AGS_AUTOMATION(automation->data)->control_name, specifier) && AGS_AUTOMATION(automation->data)->channel_type == channel_type && AGS_AUTOMATION(automation->data)->line == AGS_AUTOMATION(automation->data)->line){ break; } automation = automation->next; } return(automation); } /** * ags_automation_get_value: * @automation: the #AgsAutomation * @x: the x-offset * @x_end: the x-end-offset * @use_prev_on_failure: if %TRUE use previous value, else return G_MAXUINT * @value: the return location of value * * Get automation value. * * Returns: the x_offset * * Since: 1.0.0 */ guint ags_automation_get_value(AgsAutomation *automation, guint x, guint x_end, gboolean use_prev_on_failure, GValue *value) { AgsPort *port; GList *acceleration; guint ret_x; port = (AgsPort *) automation->port; acceleration = automation->acceleration; ret_x = 0; if(acceleration != NULL){ while(acceleration != NULL){ if(AGS_ACCELERATION(acceleration->data)->x >= x && AGS_ACCELERATION(acceleration->data)->x < x_end){ break; } if(AGS_ACCELERATION(acceleration->data)->x > x_end){ if(use_prev_on_failure){ acceleration = acceleration->prev; break; }else{ return(G_MAXUINT); } } acceleration = acceleration->next; } if(acceleration == NULL){ return(G_MAXUINT); } ret_x = AGS_ACCELERATION(acceleration->data)->x; } if(!port->port_value_is_pointer){ if(port->port_value_type == G_TYPE_BOOLEAN){ gboolean current; current = FALSE; if(acceleration == NULL){ if(automation->default_value != 0){ current = TRUE; } }else{ if(AGS_ACCELERATION(acceleration->data)->y != 0){ current = TRUE; } } g_value_init(value, G_TYPE_BOOLEAN); g_value_set_boolean(value, current); }else if(port->port_value_type == G_TYPE_INT64){ gint64 current; current = floor(AGS_ACCELERATION(acceleration->data)->y); g_value_init(value, G_TYPE_INT64); g_value_set_int64(value, current); }else if(port->port_value_type == G_TYPE_UINT64){ guint64 current; current = floor(AGS_ACCELERATION(acceleration->data)->y); g_value_init(value, G_TYPE_UINT64); g_value_set_uint64(value, current); }else if(port->port_value_type == G_TYPE_FLOAT){ gfloat current; current = AGS_ACCELERATION(acceleration->data)->y; g_value_init(value, G_TYPE_FLOAT); g_value_set_float(value, current); }else if(port->port_value_type == G_TYPE_DOUBLE){ gdouble current; current = AGS_ACCELERATION(acceleration->data)->y; g_value_init(value, G_TYPE_DOUBLE); g_value_set_double(value, current); }else if(port->port_value_type == G_TYPE_POINTER){ g_warning("ags_automation.c - unsupported value type pointer"); }else if(port->port_value_type == G_TYPE_OBJECT){ g_warning("ags_automation.c - unsupported value type object"); }else{ g_warning("ags_automation.c - unknown type"); } }else{ g_warning("ags_automation.c - unsupported value type pointer"); } return(ret_x); } /** * ags_automation_new: * @audio: an #AgsAudio * @line: the line to apply * @channel_type: the channel type * @control_name: the control name * * Creates an #AgsAutomation. * * Returns: a new #AgsAutomation * * Since: 1.0.0 */ AgsAutomation* ags_automation_new(GObject *audio, guint line, GType channel_type, gchar *control_name) { AgsAutomation *automation; automation = (AgsAutomation *) g_object_new(AGS_TYPE_AUTOMATION, "audio", audio, "line", line, "channel-type", channel_type, "control-name", control_name, NULL); return(automation); } gsequencer-1.4.24/ags/audio/ags_effect.h0000644000175000017500000000172313246707333015011 00000000000000/* 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 . */ #ifndef __AGS_EFFECT_H__ #define __AGS_EFFECT_H__ #define AGS_EFFECT_COPY_STREAM "copy_stream" #define AGS_EFFECT_COPY_BUFFER "copy_buffer" #define AGS_EFFECT_DOWN_MIX "down_mix" #endif /*__AGS_EFFECT_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_channel_run.c0000644000175000017500000010461413247044247017370 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_channel_run_class_init(AgsRecallChannelRunClass *recall_channel_run); void ags_recall_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_channel_run_packable_interface_init(AgsPackableInterface *packable); void ags_recall_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_recall_channel_run_init(AgsRecallChannelRun *recall_channel_run); void ags_recall_channel_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_channel_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_channel_run_connect(AgsConnectable *connectable); void ags_recall_channel_run_disconnect(AgsConnectable *connectable); gboolean ags_recall_channel_run_pack(AgsPackable *packable, GObject *container); gboolean ags_recall_channel_run_unpack(AgsPackable *packable); void ags_recall_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_channel_run_dispose(GObject *gobject); void ags_recall_channel_run_finalize(GObject *gobject); void ags_recall_channel_run_remove(AgsRecall *recall); AgsRecall* ags_recall_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_recall_channel_run_map_recall_recycling(AgsRecallChannelRun *recall_channel_run); void ags_recall_channel_run_remap_child_source(AgsRecallChannelRun *recall_channel_run, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region); void ags_recall_channel_run_remap_child_destination(AgsRecallChannelRun *recall_channel_run, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region); void ags_recall_channel_run_source_recycling_changed_callback(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region, AgsRecallChannelRun *recall_channel_run); void ags_recall_channel_run_destination_recycling_changed_callback(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region, AgsRecallChannelRun *recall_channel_run); void ags_recall_channel_run_real_run_order_changed(AgsRecallChannelRun *recall_channel_run, guint run_order); /** * SECTION:ags_recall_channel_run * @short_description: dynamic channel context of recall * @title: AgsRecallChannelRun * @section_id: * @include: ags/audio/ags_recall_channel_run.h * * #AgsRecallChannelRun acts as channel recall run. */ enum{ RUN_ORDER_CHANGED, LAST_SIGNAL, }; enum{ PROP_0, PROP_AUDIO_CHANNEL, PROP_DESTINATION, PROP_SOURCE, PROP_RECALL_AUDIO_RUN, PROP_RECALL_CHANNEL, }; static gpointer ags_recall_channel_run_parent_class = NULL; static AgsConnectableInterface* ags_recall_channel_run_parent_connectable_interface; static AgsPackableInterface* ags_recall_channel_run_parent_packable_interface; static AgsDynamicConnectableInterface *ags_recall_channel_run_parent_dynamic_connectable_interface; static guint recall_channel_run_signals[LAST_SIGNAL]; GType ags_recall_channel_run_get_type() { static GType ags_type_recall_channel_run = 0; if(!ags_type_recall_channel_run){ static const GTypeInfo ags_recall_channel_run_info = { sizeof (AgsRecallChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_packable_interface_info = { (GInterfaceInitFunc) ags_recall_channel_run_packable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_channel_run = g_type_register_static(AGS_TYPE_RECALL, "AgsRecallChannelRun", &ags_recall_channel_run_info, 0); g_type_add_interface_static(ags_type_recall_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_channel_run, AGS_TYPE_PACKABLE, &ags_packable_interface_info); g_type_add_interface_static(ags_type_recall_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_recall_channel_run); } void ags_recall_channel_run_class_init(AgsRecallChannelRunClass *recall_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_channel_run_parent_class = g_type_class_peek_parent(recall_channel_run); /* GObjectClass */ gobject = (GObjectClass *) recall_channel_run; gobject->set_property = ags_recall_channel_run_set_property; gobject->get_property = ags_recall_channel_run_get_property; gobject->dispose = ags_recall_channel_run_dispose; gobject->finalize = ags_recall_channel_run_finalize; /* properties */ /** * AgsRecallChannelRun:audio-channel: * * The audio channel to output. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("assigned audio channel"), i18n_pspec("The audio channel this recall is assigned to"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsRecallChannelRun:recall-audio-run: * * The audio run opposite of this recall. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-audio-run", i18n_pspec("AgsRecallAudioRun of this recall"), i18n_pspec("The AgsRecallAudioRun which this recall needs"), AGS_TYPE_RECALL_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO_RUN, param_spec); /** * AgsRecallChannelRun:recall-channel: * * The channel context of this recall. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-channel", i18n_pspec("AsgRecallChannel of this recall"), i18n_pspec("The AgsRecallChannel which this recall needs"), AGS_TYPE_RECALL_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CHANNEL, param_spec); /** * AgsRecallChannelRun:destination: * * The channel to do output to. * * Since: 1.0.0 */ param_spec = g_param_spec_object("destination", i18n_pspec("destination of output"), i18n_pspec("The destination AgsChannel where it will output to"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DESTINATION, param_spec); /** * AgsRecallChannelRun:source: * * The channel to do input from. * * Since: 1.0.0 */ param_spec = g_param_spec_object("source", i18n_pspec("source of input"), i18n_pspec("The source AgsChannel where it will take the input from"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOURCE, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) recall_channel_run; recall->duplicate = ags_recall_channel_run_duplicate; recall->remove = ags_recall_channel_run_remove; /* AgsRecallChannelRunClass */ recall_channel_run->run_order_changed = ags_recall_channel_run_real_run_order_changed; /* signals */ /** * AgsRecallChannelRun::run-order-changed: * @recall_channel_run: the object run order changed * @run_order: nth run of parent recycling. * * The ::run-order-changed signal is invoked as changing link of destination * during playback. */ recall_channel_run_signals[RUN_ORDER_CHANGED] = g_signal_new("run-order-changed", G_TYPE_FROM_CLASS (recall_channel_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecallChannelRunClass, run_order_changed), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); } void ags_recall_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_recall_channel_run_connectable_parent_interface; ags_recall_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_channel_run_connect; connectable->disconnect = ags_recall_channel_run_disconnect; } void ags_recall_channel_run_packable_interface_init(AgsPackableInterface *packable) { ags_recall_channel_run_parent_packable_interface = g_type_interface_peek_parent(packable); packable->pack = ags_recall_channel_run_pack; packable->unpack = ags_recall_channel_run_unpack; } void ags_recall_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_recall_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_recall_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_recall_channel_run_disconnect_dynamic; } void ags_recall_channel_run_init(AgsRecallChannelRun *recall_channel_run) { recall_channel_run->audio_channel = 0; recall_channel_run->recall_audio_run = NULL; recall_channel_run->recall_channel = NULL; recall_channel_run->source = NULL; recall_channel_run->destination = NULL; recall_channel_run->run_order = 0; } void ags_recall_channel_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallChannelRun *recall_channel_run; recall_channel_run = AGS_RECALL_CHANNEL_RUN(gobject); switch(prop_id){ case PROP_AUDIO_CHANNEL: { recall_channel_run->audio_channel = g_value_get_uint(value); } break; case PROP_RECALL_AUDIO_RUN: { AgsRecallAudioRun *recall_audio_run; recall_audio_run = (AgsRecallAudioRun *) g_value_get_object(value); if(recall_channel_run->recall_audio_run == recall_audio_run){ return; } if(recall_channel_run->recall_audio_run != NULL){ g_object_unref(G_OBJECT(recall_channel_run->recall_audio_run)); } if(recall_audio_run != NULL){ g_object_ref(G_OBJECT(recall_audio_run)); } recall_channel_run->recall_audio_run = recall_audio_run; } break; case PROP_RECALL_CHANNEL: { AgsRecallChannel *recall_channel; recall_channel = (AgsRecallChannel *) g_value_get_object(value); if(recall_channel_run->recall_channel == recall_channel){ return; } if(recall_channel_run->recall_channel != NULL){ g_object_unref(G_OBJECT(recall_channel_run->recall_channel)); } if(recall_channel != NULL){ g_object_ref(G_OBJECT(recall_channel)); } recall_channel_run->recall_channel = recall_channel; } break; case PROP_DESTINATION: { AgsChannel *destination; AgsChannel *old_destination; destination = (AgsChannel *) g_value_get_object(value); if(recall_channel_run->destination == destination){ return; } old_destination = recall_channel_run->destination; if(destination != NULL){ g_object_ref(G_OBJECT(destination)); } recall_channel_run->destination = destination; /* child destination */ if(destination == recall_channel_run->source){ g_warning("destination == recall_channel_run->source"); } if(old_destination != NULL){ g_object_unref(G_OBJECT(old_destination)); } } break; case PROP_SOURCE: { AgsChannel *source; AgsChannel *old_source; source = (AgsChannel *) g_value_get_object(value); if(recall_channel_run->source == source){ return; } old_source = recall_channel_run->source; if(source != NULL){ g_object_ref(G_OBJECT(source)); } recall_channel_run->source = source; if(source == recall_channel_run->destination){ g_warning("destination == recall_channel_run->source"); } if(old_source != NULL){ g_object_unref(G_OBJECT(old_source)); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_channel_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallChannelRun *recall_channel_run; recall_channel_run = AGS_RECALL_CHANNEL_RUN(gobject); switch(prop_id){ case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, recall_channel_run->audio_channel); } break; case PROP_RECALL_AUDIO_RUN: { g_value_set_object(value, recall_channel_run->recall_audio_run); } break; case PROP_RECALL_CHANNEL: { g_value_set_object(value, recall_channel_run->recall_channel); } break; case PROP_DESTINATION: { g_value_set_object(value, recall_channel_run->destination); } break; case PROP_SOURCE: { g_value_set_object(value, recall_channel_run->source); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_channel_run_dispose(GObject *gobject) { AgsRecallChannelRun *recall_channel_run; recall_channel_run = AGS_RECALL_CHANNEL_RUN(gobject); /* unpack */ ags_packable_unpack(AGS_PACKABLE(recall_channel_run)); if(AGS_RECALL(gobject)->container != NULL){ AgsRecallContainer *recall_container; recall_container = AGS_RECALL(gobject)->container; recall_container->recall_channel_run = g_list_remove(recall_container->recall_channel_run, gobject); g_object_unref(gobject); g_object_unref(AGS_RECALL(gobject)->container); AGS_RECALL(gobject)->container = NULL; } /* recall audio run */ if(recall_channel_run->recall_audio_run != NULL){ g_object_unref(G_OBJECT(recall_channel_run->recall_audio_run)); recall_channel_run->recall_audio_run = NULL; } /* recall channel */ if(recall_channel_run->recall_channel != NULL){ g_object_unref(G_OBJECT(recall_channel_run->recall_channel)); recall_channel_run->recall_channel = NULL; } /* destination */ if(recall_channel_run->destination != NULL){ g_object_unref(recall_channel_run->destination); recall_channel_run->destination = NULL; } /* source */ if(recall_channel_run->source != NULL){ g_object_unref(recall_channel_run->source); recall_channel_run->source = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_channel_run_parent_class)->dispose(gobject); } void ags_recall_channel_run_finalize(GObject *gobject) { AgsRecallChannelRun *recall_channel_run; recall_channel_run = AGS_RECALL_CHANNEL_RUN(gobject); if(AGS_RECALL(gobject)->container != NULL){ AgsRecallContainer *recall_container; recall_container = AGS_RECALL(gobject)->container; recall_container->recall_channel_run = g_list_remove(recall_container->recall_channel_run, gobject); g_object_unref(AGS_RECALL(gobject)->container); } /* recall audio run */ if(recall_channel_run->recall_audio_run != NULL){ g_object_unref(G_OBJECT(recall_channel_run->recall_audio_run)); } /* recall channel */ if(recall_channel_run->recall_channel != NULL){ g_object_unref(G_OBJECT(recall_channel_run->recall_channel)); } /* destination */ if(recall_channel_run->destination != NULL){ g_object_unref(recall_channel_run->destination); } /* source */ if(recall_channel_run->source != NULL){ g_object_unref(recall_channel_run->source); } /* call parent */ G_OBJECT_CLASS(ags_recall_channel_run_parent_class)->finalize(gobject); } void ags_recall_channel_run_connect(AgsConnectable *connectable) { AgsRecallChannelRun *recall_channel_run; GObject *gobject; if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_recall_channel_run_parent_connectable_interface->connect(connectable); /* AgsCopyChannelRun */ recall_channel_run = AGS_RECALL_CHANNEL_RUN(connectable); /* destination */ if(recall_channel_run->destination != NULL){ gobject = G_OBJECT(recall_channel_run->destination); /* recycling changed */ g_signal_connect(gobject, "recycling-changed", G_CALLBACK(ags_recall_channel_run_destination_recycling_changed_callback), recall_channel_run); } /* source */ if(recall_channel_run->source != NULL){ gobject = G_OBJECT(recall_channel_run->source); g_signal_connect(gobject, "recycling-changed", G_CALLBACK(ags_recall_channel_run_source_recycling_changed_callback), recall_channel_run); } } void ags_recall_channel_run_disconnect(AgsConnectable *connectable) { AgsRecallChannelRun *recall_channel_run; GObject *gobject; if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } /* AgsRecallChannelRun */ recall_channel_run = AGS_RECALL_CHANNEL_RUN(connectable); /* destination */ if(recall_channel_run->destination != NULL){ gobject = G_OBJECT(recall_channel_run->destination); g_object_disconnect(gobject, "any_signal::recycling-changed", G_CALLBACK(ags_recall_channel_run_destination_recycling_changed_callback), recall_channel_run, NULL); } /* source */ if(recall_channel_run->source != NULL){ gobject = G_OBJECT(recall_channel_run->source); g_object_disconnect(gobject, "any_signal::recycling-changed", G_CALLBACK(ags_recall_channel_run_source_recycling_changed_callback), recall_channel_run, NULL); } /* call parent */ ags_recall_channel_run_parent_connectable_interface->disconnect(connectable); } gboolean ags_recall_channel_run_pack(AgsPackable *packable, GObject *container) { AgsRecallAudioRun *recall_audio_run; AgsRecallContainer *recall_container; GList *list; AgsRecallID *recall_id; if(ags_recall_channel_run_parent_packable_interface->pack(packable, container)){ return(TRUE); } // g_message("pack b %d", (AGS_IS_COPY_PATTERN_CHANNEL_RUN(packable) ? TRUE: FALSE)); recall_container = AGS_RECALL_CONTAINER(container); /* set AgsRecallAudioRun */ list = recall_container->recall_audio_run; if(AGS_RECALL(packable)->recall_id != NULL){ recall_id = AGS_RECALL(packable)->recall_id; list = ags_recall_find_recycling_context(list, (GObject *) recall_id->recycling_context); if(list != NULL){ recall_audio_run = AGS_RECALL_AUDIO_RUN(list->data); g_object_set(G_OBJECT(packable), "recall-audio-run", recall_audio_run, NULL); } }else if((AGS_RECALL_TEMPLATE & (AGS_RECALL(packable)->flags)) != 0){ list = ags_recall_find_template(list); if(list != NULL){ recall_audio_run = AGS_RECALL_AUDIO_RUN(list->data); g_object_set(G_OBJECT(packable), "recall-audio-run", recall_audio_run, NULL); } } /* set AgsRecallChannel */ if(AGS_RECALL_CHANNEL_RUN(packable)->source != NULL){ list = recall_container->recall_channel; if((list = ags_recall_find_provider(list, G_OBJECT(AGS_RECALL_CHANNEL_RUN(packable)->source))) != NULL){ g_object_set(G_OBJECT(packable), "recall-channel", AGS_RECALL_CHANNEL(list->data), NULL); } } g_object_set(G_OBJECT(recall_container), "recall-channel-run", AGS_RECALL(packable), NULL); return(FALSE); } gboolean ags_recall_channel_run_unpack(AgsPackable *packable) { AgsRecall *recall; AgsRecallContainer *recall_container; GList *list; AgsRecallID *recall_id; recall = AGS_RECALL(packable); if(recall == NULL){ return(TRUE); } recall_container = AGS_RECALL_CONTAINER(recall->container); if(recall_container == NULL){ return(TRUE); } /* ref */ g_object_ref(recall); g_object_ref(recall_container); /* unset AgsRecallAudioRun */ g_object_set(G_OBJECT(packable), "recall_audio_run", NULL, NULL); /* unset AgsRecallChannel */ g_object_set(G_OBJECT(packable), "recall_channel", NULL, NULL); /* call parent */ if(ags_recall_channel_run_parent_packable_interface->unpack(packable)){ g_object_unref(recall); g_object_unref(recall_container); return(TRUE); } /* remove from list */ recall_container->recall_channel_run = g_list_remove(recall_container->recall_channel_run, recall); /* unref */ g_object_unref(recall); g_object_unref(recall_container); return(FALSE); } void ags_recall_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } ags_recall_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_recall_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_recall_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_recall_channel_run_remove(AgsRecall *recall) { if(AGS_RECALL_CHANNEL_RUN(recall)->source != NULL){ ags_channel_remove_recall(AGS_RECALL_CHANNEL_RUN(recall)->source, (GObject *) recall, ((recall->recall_id->recycling_context->parent) ? TRUE: FALSE)); } AGS_RECALL_CLASS(ags_recall_channel_run_parent_class)->remove(recall); } AgsRecall* ags_recall_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecallChannelRun *recall_channel_run, *copy; recall_channel_run = AGS_RECALL_CHANNEL_RUN(recall); if(recall_channel_run->destination != NULL && ags_recall_id_find_recycling_context(recall_channel_run->destination->recall_id, recall_id->recycling_context->parent) == NULL){ return(NULL); } parameter = ags_parameter_grow(G_OBJECT_TYPE(recall), parameter, n_params, "soundcard", AGS_RECALL(recall_channel_run)->soundcard, "recall_channel", recall_channel_run->recall_channel, "audio_channel", recall_channel_run->audio_channel, "source", recall_channel_run->source, "destination", recall_channel_run->destination, NULL); copy = AGS_RECALL_CHANNEL_RUN(AGS_RECALL_CLASS(ags_recall_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); if(recall_channel_run->destination != NULL){ ags_recall_channel_run_remap_child_destination(copy, NULL, NULL, copy->destination->first_recycling, copy->destination->last_recycling); }else{ if(copy->source != NULL){ ags_recall_channel_run_remap_child_source(copy, NULL, NULL, copy->source->first_recycling, copy->source->last_recycling); } } //TODO:JK: remove because run order isn't used anymore /* if(recall_id->recycling_context->parent != NULL){ copy->run_order = g_list_index(recall_id->recycling_context->parent->children, recall_id->recycling_context); }else if(copy->destination != NULL){ copy->run_order = copy->destination->audio_channel; }else{ AgsRecycling *recycling; recycling = AGS_RECYCLING(recall_id->recycling); copy->run_order = AGS_CHANNEL(recycling->channel)->audio_channel; } */ return((AgsRecall *) copy); } void ags_recall_channel_run_map_recall_recycling(AgsRecallChannelRun *recall_channel_run) { AgsRecallChannel *recall_channel; AgsRecycling *source_recycling; AgsRecycling *destination_recycling, *start_destination_recycling, *end_destination_recycling; if(recall_channel_run->source == NULL || AGS_RECALL(recall_channel_run)->child_type == G_TYPE_NONE || (AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_channel_run)->flags)) != 0){ return; } /* AgsRecallChannel */ recall_channel = AGS_RECALL_CHANNEL(recall_channel_run->recall_channel); /* AgsRecycling - source */ source_recycling = recall_channel->source->first_recycling; /* AgsRecycling - destination*/ if(recall_channel_run->destination != NULL){ start_destination_recycling = recall_channel_run->destination->first_recycling; end_destination_recycling = recall_channel_run->destination->last_recycling->next; }else{ start_destination_recycling = NULL; end_destination_recycling = NULL; } if(source_recycling != NULL){ AgsRecallRecycling *recall_recycling; while(source_recycling != recall_channel->source->last_recycling->next){ destination_recycling = start_destination_recycling; #ifdef AGS_DEBUG g_message("ags_recall_channel_run_map_recall_recycling"); #endif do{ recall_recycling = g_object_new(AGS_RECALL(recall_channel_run)->child_type, "soundcard", AGS_RECALL(recall_channel_run)->soundcard, "recall_id", AGS_RECALL(recall_channel_run)->recall_id, "audio_channel", recall_channel_run->audio_channel, "source", source_recycling, "destination", destination_recycling, NULL); ags_recall_add_child(AGS_RECALL(recall_channel_run), AGS_RECALL(recall_recycling)); if(destination_recycling != NULL){ destination_recycling = destination_recycling->next; } }while(destination_recycling != end_destination_recycling); source_recycling = source_recycling->next; } } } void ags_recall_channel_run_remap_child_source(AgsRecallChannelRun *recall_channel_run, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region) { AgsRecycling *destination_recycling, *source_recycling; AgsRecallRecycling *recall_recycling; GList *list, *list_next, *list_start; if(recall_channel_run->source == NULL || AGS_RECALL(recall_channel_run)->child_type == G_TYPE_NONE || (AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_channel_run)->flags)) != 0){ return; } /* remove old */ if(old_start_changed_region != NULL){ AgsRecall *recall; AgsCancelRecall *cancel_recall; source_recycling = old_start_changed_region; while(source_recycling != old_end_changed_region->next){ list_start = list = ags_recall_get_children(AGS_RECALL(recall_channel_run)); while(list != NULL){ list_next = list->next; if(AGS_RECALL_RECYCLING(list->data)->source == source_recycling){ recall = AGS_RECALL(list->data); // g_message("disconnect"); ags_dynamic_connectable_disconnect_dynamic(AGS_DYNAMIC_CONNECTABLE(recall)); ags_recall_remove(recall); g_object_unref(recall); } list = list_next; } g_list_free(list_start); source_recycling = source_recycling->next; } } /* add new */ if(new_start_changed_region != NULL){ source_recycling = new_start_changed_region; while(source_recycling != new_end_changed_region->next){ recall_recycling = g_object_new(AGS_RECALL(recall_channel_run)->child_type, "soundcard", AGS_RECALL(recall_channel_run)->soundcard, "recall_id", AGS_RECALL(recall_channel_run)->recall_id, "audio_channel", recall_channel_run->audio_channel, "source", source_recycling, "destination", ((recall_channel_run->destination != NULL) ? recall_channel_run->destination->first_recycling: NULL), NULL); ags_recall_add_child(AGS_RECALL(recall_channel_run), AGS_RECALL(recall_recycling)); source_recycling = source_recycling->next; } } } void ags_recall_channel_run_remap_child_destination(AgsRecallChannelRun *recall_channel_run, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region) { AgsRecycling *destination_recycling, *source_recycling; AgsRecallRecycling *recall_recycling; GList *list, *list_start; if(recall_channel_run->source == NULL || AGS_RECALL(recall_channel_run)->child_type == G_TYPE_NONE || (AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_channel_run)->flags)) != 0){ return; } /* remove old */ if(old_start_changed_region != NULL){ AgsRecall *recall; AgsCancelRecall *cancel_recall; destination_recycling = old_start_changed_region; while(destination_recycling != old_end_changed_region->next){ list_start = list = ags_recall_get_children(AGS_RECALL(recall_channel_run)); while(list != NULL){ if(AGS_RECALL_RECYCLING(list->data)->destination == destination_recycling){ recall = AGS_RECALL(list->data); ags_recall_remove(recall); } list = list->next; } g_list_free(list_start); destination_recycling = destination_recycling->next; } } /* add new */ if(new_start_changed_region != NULL){ if(recall_channel_run->source != NULL){ if(recall_channel_run->source->first_recycling == NULL){ return; } destination_recycling = new_start_changed_region; while(destination_recycling != new_end_changed_region->next){ source_recycling = recall_channel_run->source->first_recycling; while(source_recycling != recall_channel_run->source->last_recycling->next){ recall_recycling = g_object_new(AGS_RECALL(recall_channel_run)->child_type, "soundcard", AGS_RECALL(recall_channel_run)->soundcard, "recall_id", AGS_RECALL(recall_channel_run)->recall_id, "audio_channel", recall_channel_run->audio_channel, "source", source_recycling, "destination", destination_recycling, NULL); ags_recall_add_child(AGS_RECALL(recall_channel_run), AGS_RECALL(recall_recycling)); source_recycling = source_recycling->next; } destination_recycling = destination_recycling->next; } } } } void ags_recall_channel_run_source_recycling_changed_callback(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region, AgsRecallChannelRun *recall_channel_run) { if(recall_channel_run->destination != NULL){ ags_recall_channel_run_remap_child_source(recall_channel_run, NULL, NULL, NULL, NULL); ags_recall_channel_run_remap_child_destination(recall_channel_run, NULL, NULL, recall_channel_run->destination->first_recycling, recall_channel_run->destination->last_recycling); }else{ ags_recall_channel_run_remap_child_source(recall_channel_run, old_start_changed_region, old_end_changed_region, new_start_changed_region, new_end_changed_region); } } void ags_recall_channel_run_destination_recycling_changed_callback(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region, AgsRecallChannelRun *recall_channel_run) { /* empty */ } void ags_recall_channel_run_real_run_order_changed(AgsRecallChannelRun *recall_channel_run, guint run_order) { recall_channel_run->run_order = run_order; } /** * ags_recall_channel_run_run_order_changed: * @recall_channel_run: an #AgsRecallChannelRun * @run_order: the run order * * Modify run order. * * Since: 1.0.0 */ void ags_recall_channel_run_run_order_changed(AgsRecallChannelRun *recall_channel_run, guint run_order) { g_return_if_fail(AGS_IS_RECALL(recall_channel_run)); g_object_ref(G_OBJECT(recall_channel_run)); g_signal_emit(G_OBJECT(recall_channel_run), recall_channel_run_signals[RUN_ORDER_CHANGED], 0, run_order); g_object_unref(G_OBJECT(recall_channel_run)); } /** * ags_recall_channel_run_new: * * Creates an #AgsRecallChannelRun * * Returns: a new #AgsRecallChannelRun * * Since: 1.0.0 */ AgsRecallChannelRun* ags_recall_channel_run_new() { AgsRecallChannelRun *recall_channel_run; recall_channel_run = (AgsRecallChannelRun *) g_object_new(AGS_TYPE_RECALL_CHANNEL_RUN, NULL); return(recall_channel_run); } gsequencer-1.4.24/ags/audio/ags_recall_adaptor_run.h0000644000175000017500000000416713246707333017422 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2015,2016 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 . */ #ifndef __AGS_RECALL_ADAPTOR_RUN_H__ #define __AGS_RECALL_ADAPTOR_RUN_H__ #include #include #define AGS_TYPE_RECALL_ADAPTOR_RUN (ags_recall_adaptor_run_get_type()) #define AGS_RECALL_ADAPTOR_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_ADAPTOR_RUN, AgsRecallAdaptorRun)) #define AGS_RECALL_ADAPTOR_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_ADAPTOR_RUN, AgsRecallAdaptorRun)) #define AGS_IS_RECALL_ADAPTOR_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_ADAPTOR_RUN)) #define AGS_IS_RECALL_ADAPTOR_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_ADAPTOR_RUN)) #define AGS_RECALL_ADAPTOR_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_ADAPTOR_RUN, AgsRecallAdaptorRunClass)) typedef struct _AgsRecallAdaptorRun AgsRecallAdaptorRun; typedef struct _AgsRecallAdaptorRunClass AgsRecallAdaptorRunClass; typedef enum{ AGS_RECALL_ADAPTOR_RUN_PROCESSED = 1, }; struct _AgsRecallAdaptorRun { AgsRecallAudioRun recall_audio_run; guint flags; void *buffer; }; struct _AgsRecallAdaptorRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_recall_adaptor_run_get_type(); AgsRecallAdaptorRun* ags_recall_adaptor_run_new(); #endif /*__AGS_RECALL_ADAPTOR_RUN_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_channel.h0000644000175000017500000000410313246707333016502 00000000000000/* 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 . */ #ifndef __AGS_RECALL_CHANNEL_H__ #define __AGS_RECALL_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_RECALL_CHANNEL (ags_recall_channel_get_type()) #define AGS_RECALL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_CHANNEL, AgsRecallChannel)) #define AGS_RECALL_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_CHANNEL, AgsRecallChannelClass)) #define AGS_IS_RECALL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_CHANNEL)) #define AGS_IS_RECALL_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_CHANNEL)) #define AGS_RECALL_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_CHANNEL, AgsRecallChannelClass)) typedef struct _AgsRecallChannel AgsRecallChannel; typedef struct _AgsRecallChannelClass AgsRecallChannelClass; struct _AgsRecallChannel { AgsRecall recall; AgsChannel *destination; AgsChannel *source; }; struct _AgsRecallChannelClass { AgsRecallClass recall; }; GType ags_recall_channel_get_type(); GList* ags_recall_channel_find_channel(GList *recall_channel_i, AgsChannel *source); AgsRecallChannel* ags_recall_channel_new(); #endif /*__AGS_RECALL_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/ags_audio_application_context.h0000644000175000017500000000651113246707333021005 00000000000000/* 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 . */ #ifndef __AGS_AUDIO_APPLICATION_CONTEXT_H__ #define __AGS_AUDIO_APPLICATION_CONTEXT_H__ #include #include #include #include #include #ifdef AGS_USE_LINUX_THREADS #include #else #include #endif #include #include #define AGS_TYPE_AUDIO_APPLICATION_CONTEXT (ags_audio_application_context_get_type()) #define AGS_AUDIO_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_APPLICATION_CONTEXT, AgsAudioApplicationContext)) #define AGS_AUDIO_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_AUDIO_APPLICATION_CONTEXT, AgsAudioApplicationContextClass)) #define AGS_IS_AUDIO_APPLICATION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUDIO_APPLICATION_CONTEXT)) #define AGS_IS_AUDIO_APPLICATION_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUDIO_APPLICATION_CONTEXT)) #define AGS_AUDIO_APPLICATION_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_AUDIO_APPLICATION_CONTEXT, AgsAudioApplicationContextClass)) #define AGS_AUDIO_RT_PRIORITY (49) #define AGS_AUDIO_DEFAULT_VERSION "0.7.122.8" #define AGS_AUDIO_BUILD_ID "Tue Mar 21 20:03:29 CET 2017" #define AGS_EFFECTS_DEFAULT_VERSION "0.7.13" typedef struct _AgsAudioApplicationContext AgsAudioApplicationContext; typedef struct _AgsAudioApplicationContextClass AgsAudioApplicationContextClass; /** * AgsAudioApplicationContextFlags: * @AGS_AUDIO_APPLICATION_CONTEXT_USE_ALSA: use alsa backend * * Enum values to control the behavior or indicate internal state of #AgsAudioApplicationContextFlags by * enable/disable as flags. */ typedef enum{ AGS_AUDIO_APPLICATION_CONTEXT_USE_ALSA = 1, }AgsAudioApplicationContextFlags; struct _AgsAudioApplicationContext { AgsApplicationContext appliacation_context; guint flags; gchar *version; gchar *build_id; AgsThreadPool *thread_pool; GList *worker; AgsThread *soundcard_thread; AgsThread *export_thread; AgsThread *autosave_thread; AgsServer *server; GList *soundcard; GList *sequencer; GList *distributed_manager; }; struct _AgsAudioApplicationContextClass { AgsApplicationContextClass appliacation_context; }; GType ags_audio_application_context_get_type(); AgsAudioApplicationContext* ags_audio_application_context_new(); #endif /*__AGS_AUDIO_APPLICATION_CONTEXT_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_channel_run.h0000644000175000017500000000476113246707333017400 00000000000000/* 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 . */ #ifndef __AGS_RECALL_CHANNEL_RUN_H__ #define __AGS_RECALL_CHANNEL_RUN_H__ #include #include #include #include #include #include #define AGS_TYPE_RECALL_CHANNEL_RUN (ags_recall_channel_run_get_type()) #define AGS_RECALL_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_CHANNEL_RUN, AgsRecallChannelRun)) #define AGS_RECALL_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_CHANNEL_RUN, AgsRecallChannelRunClass)) #define AGS_IS_RECALL_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_CHANNEL_RUN)) #define AGS_IS_RECALL_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_CHANNEL_RUN)) #define AGS_RECALL_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_CHANNEL_RUN, AgsRecallChannelRunClass)) typedef struct _AgsRecallChannelRun AgsRecallChannelRun; typedef struct _AgsRecallChannelRunClass AgsRecallChannelRunClass; struct _AgsRecallChannelRun { AgsRecall recall; guint audio_channel; AgsRecallChannel *recall_channel; AgsRecallAudioRun *recall_audio_run; AgsChannel *destination; AgsChannel *source; guint run_order; }; struct _AgsRecallChannelRunClass { AgsRecallClass recall; void (*run_order_changed)(AgsRecallChannelRun *recall_channel_run, guint nth_run); }; GType ags_recall_channel_run_get_type(); void ags_recall_channel_run_run_order_changed(AgsRecallChannelRun *recall_channel_run, guint run_order); AgsRecallChannelRun* ags_recall_channel_run_new(); #endif /*__AGS_RECALL_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/ags_buffer.h0000644000175000017500000000515113247044247015024 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_BUFFER_H__ #define __AGS_BUFFER_H__ #include #include #include #define AGS_TYPE_BUFFER (ags_buffer_get_type()) #define AGS_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BUFFER, AgsBuffer)) #define AGS_BUFFER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_BUFFER, AgsBufferClass)) #define AGS_IS_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_BUFFER)) #define AGS_IS_BUFFER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_BUFFER)) #define AGS_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_BUFFER, AgsBufferClass)) #define AGS_BUFFER_DEFAULT_TICKS_PER_QUARTER_BUFFER (16.0) typedef struct _AgsBuffer AgsBuffer; typedef struct _AgsBufferClass AgsBufferClass; /** * AgsBufferFlags: * @AGS_BUFFER_CONNECTED: indicates the buffer was connected by calling #AgsConnectable::connect() * @AGS_BUFFER_IS_SELECTED: is selected * * Enum values to control the behavior or indicate internal state of #AgsBuffer by * enable/disable as flags. */ typedef enum{ AGS_BUFFER_CONNECTED = 1, AGS_BUFFER_IS_SELECTED = 1 << 1, }AgsBufferFlags; struct _AgsBuffer { GObject object; guint flags; guint64 x; guint selection_x0; guint selection_x1; guint samplerate; guint buffer_size; guint format; void *data; }; struct _AgsBufferClass { GObjectClass object; }; GType ags_buffer_get_type(); void ags_buffer_set_samplerate(AgsBuffer *buffer, guint samplerate); void ags_buffer_set_buffer_size(AgsBuffer *buffer, guint buffer_size); void ags_buffer_set_format(AgsBuffer *buffer, guint format); gint ags_buffer_sort_func(gconstpointer a, gconstpointer b); AgsBuffer* ags_buffer_duplicate(AgsBuffer *buffer); AgsBuffer* ags_buffer_new(); #endif /*__AGS_BUFFER_H__*/ gsequencer-1.4.24/ags/audio/ags_pattern.h0000644000175000017500000000612213246707333015230 00000000000000/* 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 . */ #ifndef __AGS_PATTERN_H__ #define __AGS_PATTERN_H__ #include #include #include #include #define AGS_TYPE_PATTERN (ags_pattern_get_type()) #define AGS_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_PATTERN, AgsPattern)) #define AGS_PATTERN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PATTERN, AgsPatternClass)) #define AGS_IS_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PATTERN)) #define AGS_IS_PATTERN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PATTERN)) #define AGS_PATTERN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PATTERN, AgsPatternClass)) #define AGS_PATTERN_DEFAULT_BPM (120.0) #define AGS_PATTERN_TICS_PER_BEAT (1.0) #define AGS_PATTERN_MINIMUM_NOTE_LENGTH (1.0 / 16.0) #define AGS_PATTERN_MAXIMUM_NOTE_LENGTH (16.0) #define AGS_PATTERN_DEFAULT_LENGTH (65535.0 / AGS_PATTERN_TICS_PER_BEAT - AGS_PATTERN_MAXIMUM_NOTE_LENGTH) #define AGS_PATTERN_DEFAULT_JIFFIE (60.0 / AGS_PATTERN_DEFAULT_BPM / AGS_PATTERN_TICS_PER_BEAT) #define AGS_PATTERN_DEFAULT_DURATION (AGS_PATTERN_DEFAULT_LENGTH * AGS_PATTERN_DEFAULT_JIFFIE * AGS_MICROSECONDS_PER_SECOND) typedef struct _AgsPattern AgsPattern; typedef struct _AgsPatternClass AgsPatternClass; /** * AgsPatternFlags: * @AGS_PATTERN_CONNECTED: indicates the pattern was connected by calling #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsPattern by * enable/disable as flags. */ typedef enum{ AGS_PATTERN_CONNECTED = 1, }AgsPatternFlags; struct _AgsPattern { GObject gobject; guint flags; GObject *timestamp; guint dim[3]; guint ***pattern; GObject *port; guint i; guint j; guint bit; }; struct _AgsPatternClass { GObjectClass gobject; }; GType ags_pattern_get_type(); GList* ags_pattern_find_near_timestamp(GList *pattern, GObject *timestamp); void ags_pattern_set_dim(AgsPattern *pattern, guint dim0, guint dim1, guint length); gboolean ags_pattern_is_empty(AgsPattern *pattern, guint i, guint j); gboolean ags_pattern_get_bit(AgsPattern *pattern, guint i, guint j, guint bit); void ags_pattern_toggle_bit(AgsPattern *pattern, guint i, guint j, guint bit); AgsPattern* ags_pattern_new(); #endif /*__AGS_PATTERN_H__*/ gsequencer-1.4.24/ags/audio/ags_playback_domain.c0000644000175000017500000003522313256163135016664 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_playback_domain_class_init(AgsPlaybackDomainClass *playback_domain); void ags_playback_domain_connectable_interface_init(AgsConnectableInterface *connectable); void ags_playback_domain_init(AgsPlaybackDomain *playback_domain); void ags_playback_domain_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_playback_domain_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_playback_domain_disconnect(AgsConnectable *connectable); void ags_playback_domain_connect(AgsConnectable *connectable); void ags_playback_domain_dispose(GObject *gobject); void ags_playback_domain_finalize(GObject *gobject); /** * SECTION:ags_playback_domain * @short_description: Outputting to soundcard domain * @title: AgsPlaybackDomain * @section_id: * @include: ags/audio/ags_playback_domain.h * * #AgsPlaybackDomain represents a domain to output. */ static gpointer ags_playback_domain_parent_class = NULL; enum{ PROP_0, PROP_DOMAIN, PROP_PLAYBACK, }; GType ags_playback_domain_get_type (void) { static GType ags_type_playback_domain = 0; if(!ags_type_playback_domain){ static const GTypeInfo ags_playback_domain_info = { sizeof (AgsPlaybackDomainClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_playback_domain_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlaybackDomain), 0, /* n_preallocs */ (GInstanceInitFunc) ags_playback_domain_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_playback_domain_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_playback_domain = g_type_register_static(G_TYPE_OBJECT, "AgsPlaybackDomain", &ags_playback_domain_info, 0); g_type_add_interface_static(ags_type_playback_domain, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_playback_domain); } void ags_playback_domain_class_init(AgsPlaybackDomainClass *playback_domain) { GObjectClass *gobject; GParamSpec *param_spec; ags_playback_domain_parent_class = g_type_class_peek_parent(playback_domain); /* GObjectClass */ gobject = (GObjectClass *) playback_domain; gobject->set_property = ags_playback_domain_set_property; gobject->get_property = ags_playback_domain_get_property; gobject->dispose = ags_playback_domain_dispose; gobject->finalize = ags_playback_domain_finalize; /* properties */ /** * AgsPlaybackDomain:domain: * * The assigned domain. * * Since: 1.0.0 */ param_spec = g_param_spec_object("domain", i18n_pspec("assigned domain"), i18n_pspec("The domain it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DOMAIN, param_spec); /** * AgsPlaybackDomain:playback: * * The assigned playback. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("playback", i18n_pspec("assigned playback"), i18n_pspec("The playback it is assigned with"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK, param_spec); } void ags_playback_domain_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_playback_domain_connect; connectable->disconnect = ags_playback_domain_disconnect; } void ags_playback_domain_init(AgsPlaybackDomain *playback_domain) { AgsConfig *config; gchar *str, *str0, *str1; gboolean super_threaded_audio; /* config */ config = ags_config_get_instance(); /* thread model */ str0 = ags_config_get_value(config, AGS_CONFIG_THREAD, "model"); str1 = ags_config_get_value(config, AGS_CONFIG_THREAD, "super-threaded-scope"); if(str0 != NULL && str1 != NULL){ if(!g_ascii_strncasecmp(str0, "super-threaded", 15)){ if(!g_ascii_strncasecmp(str1, "audio", 6) || !g_ascii_strncasecmp(str1, "channel", 8) || !g_ascii_strncasecmp(str1, "recycling", 10)){ super_threaded_audio = TRUE; } } } if(str0 != NULL){ free(str0); } if(str1 != NULL){ free(str1); } /* default flags */ if(super_threaded_audio){ g_atomic_int_set(&(playback_domain->flags), AGS_PLAYBACK_DOMAIN_SUPER_THREADED_AUDIO); }else{ g_atomic_int_set(&(playback_domain->flags), 0); } /* domain */ playback_domain->domain = NULL; /* super threaded audio */ playback_domain->audio_thread = (AgsThread **) malloc(3 * sizeof(AgsThread *)); playback_domain->audio_thread[0] = NULL; playback_domain->audio_thread[1] = NULL; playback_domain->audio_thread[2] = NULL; if(super_threaded_audio){ guint samplerate, buffer_size; gdouble freq; samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* thread frequency */ freq = ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; /* playback audio thread */ playback_domain->audio_thread[0] = (AgsThread *) ags_audio_thread_new(NULL, NULL); g_object_ref(playback_domain->audio_thread[0]); playback_domain->audio_thread[0]->freq = freq; /* sequencer audio thread */ playback_domain->audio_thread[1] = (AgsThread *) ags_audio_thread_new(NULL, NULL); g_object_ref(playback_domain->audio_thread[1]); playback_domain->audio_thread[1]->freq = freq; /* notation audio thread */ playback_domain->audio_thread[2] = (AgsThread *) ags_audio_thread_new(NULL, NULL); g_object_ref(playback_domain->audio_thread[2]); playback_domain->audio_thread[2]->freq = freq; } /* playback */ playback_domain->playback = NULL; } void ags_playback_domain_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlaybackDomain *playback_domain; playback_domain = AGS_PLAYBACK_DOMAIN(gobject); switch(prop_id){ case PROP_DOMAIN: { GObject *domain; domain = (GObject *) g_value_get_object(value); if((GObject *) playback_domain->domain == domain){ return; } if(playback_domain->domain != NULL){ g_object_unref(G_OBJECT(playback_domain->domain)); } if(domain != NULL){ g_object_ref(G_OBJECT(domain)); if(AGS_IS_AUDIO(domain) && (AGS_PLAYBACK_DOMAIN_SUPER_THREADED_AUDIO & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ gdouble freq; /* thread frequency */ freq = ceil((gdouble) AGS_AUDIO(domain)->samplerate / (gdouble) AGS_AUDIO(domain)->buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; g_object_set(playback_domain->audio_thread[0], "frequency", freq, "audio", domain, NULL); g_object_set(playback_domain->audio_thread[1], "frequency", freq, "audio", domain, NULL); g_object_set(playback_domain->audio_thread[2], "frequency", freq, "audio", domain, NULL); } } playback_domain->domain = (GObject *) domain; } break; case PROP_PLAYBACK: { AgsPlayback *playback; playback = (AgsPlayback *) g_value_get_pointer(value); if(playback == NULL || g_list_find(playback_domain->playback, playback) != NULL){ return; } ags_playback_domain_add_playback(playback_domain, (GObject *) playback); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_playback_domain_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlaybackDomain *playback_domain; playback_domain = AGS_PLAYBACK_DOMAIN(gobject); switch(prop_id){ case PROP_DOMAIN: { g_value_set_object(value, playback_domain->domain); } break; case PROP_PLAYBACK: { g_value_set_pointer(value, g_list_copy(playback_domain->playback)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_playback_domain_dispose(GObject *gobject) { AgsPlaybackDomain *playback_domain; guint i; playback_domain = AGS_PLAYBACK_DOMAIN(gobject); if(playback_domain->audio_thread != NULL){ for(i = 0; i < 3; i++){ if(playback_domain->audio_thread[i] != NULL){ g_object_run_dispose(playback_domain->audio_thread[i]); g_object_unref(playback_domain->audio_thread[i]); playback_domain->audio_thread[i] = NULL; } } } /* domain */ if(playback_domain->domain != NULL){ g_object_unref(playback_domain->domain); playback_domain->domain = NULL; } /* playback */ if(playback_domain->playback != NULL){ g_list_free_full(playback_domain->playback, g_object_unref); playback_domain->playback = NULL; } /* call parent */ G_OBJECT_CLASS(ags_playback_domain_parent_class)->dispose(gobject); } void ags_playback_domain_finalize(GObject *gobject) { AgsPlaybackDomain *playback_domain; guint i; playback_domain = AGS_PLAYBACK_DOMAIN(gobject); /* audio thread */ if(playback_domain->audio_thread != NULL){ for(i = 0; i < 3; i++){ if(playback_domain->audio_thread[i] != NULL){ g_object_unref(playback_domain->audio_thread[i]); } } free(playback_domain->audio_thread); } /* domain */ if(playback_domain->domain != NULL){ g_object_unref(playback_domain->domain); } /* playback */ g_list_free_full(playback_domain->playback, g_object_unref); /* call parent */ G_OBJECT_CLASS(ags_playback_domain_parent_class)->finalize(gobject); } void ags_playback_domain_connect(AgsConnectable *connectable) { AgsPlaybackDomain *playback_domain; playback_domain = AGS_PLAYBACK_DOMAIN(connectable); if((AGS_PLAYBACK_DOMAIN_CONNECTED & (playback_domain->flags)) != 0){ return; } playback_domain->flags |= AGS_PLAYBACK_DOMAIN_CONNECTED; } void ags_playback_domain_disconnect(AgsConnectable *connectable) { AgsPlaybackDomain *playback_domain; playback_domain = AGS_PLAYBACK_DOMAIN(connectable); if((AGS_PLAYBACK_DOMAIN_CONNECTED & (playback_domain->flags)) == 0){ return; } playback_domain->flags &= (~AGS_PLAYBACK_DOMAIN_CONNECTED); } /** * ags_playback_domain_set_audio_thread: * @playback_domain: the #AgsPlaybackDomain * @thread: the #AgsThread * @scope: the thread's scope * * Set audio thread to specified scope. * * Since: 1.0.0 */ void ags_playback_domain_set_audio_thread(AgsPlaybackDomain *playback_domain, AgsThread *thread, guint scope) { if(!AGS_PLAYBACK_DOMAIN(playback_domain) || scope > 2){ return; } if(playback_domain->audio_thread[scope] != NULL){ g_object_unref(playback_domain->audio_thread[scope]); } if(thread != NULL){ g_object_ref(thread); } playback_domain->audio_thread[scope] = thread; } /** * ags_playback_domain_get_audio_thread: * @playback_domain: the #AgsPlaybackDomain * @scope: the thread's scope * * Get audio thread of specified scope. * * Returns: the matching #AgsThread or %NULL * * Since: 1.0.0 */ AgsThread* ags_playback_domain_get_audio_thread(AgsPlaybackDomain *playback_domain, guint scope) { if(playback_domain == NULL || playback_domain->audio_thread == NULL || scope > 2){ return(NULL); } return(playback_domain->audio_thread[scope]); } /** * ags_playback_domain_add_playback: * @playback_domain: the #AgsPlaybackDomain * @playback: the #AgsPlayback * * Add @playback to @playback_domain. * * Since: 1.0.0 */ void ags_playback_domain_add_playback(AgsPlaybackDomain *playback_domain, GObject *playback) { if(playback_domain == NULL || playback == NULL){ return; } //TODO:JK: rather use prepend but needs refactoring g_object_ref(playback); playback_domain->playback = g_list_append(playback_domain->playback, playback); } /** * ags_playback_domain_remove_playback: * @playback_domain: the #AgsPlaybackDomain * @playback: the #AgsPlayback * * Remove @playback of @playback_domain. * * Since: 1.0.0 */ void ags_playback_domain_remove_playback(AgsPlaybackDomain *playback_domain, GObject *playback) { if(playback_domain == NULL || playback == NULL){ return; } playback_domain->playback = g_list_remove(playback_domain->playback, playback); g_object_unref(playback); } /** * ags_playback_domain_new: * * Creates an #AgsPlaybackDomain, refering to @application_context. * * Returns: a new #AgsPlaybackDomain * * Since: 1.0.0 */ AgsPlaybackDomain* ags_playback_domain_new() { AgsPlaybackDomain *playback_domain; playback_domain = (AgsPlaybackDomain *) g_object_new(AGS_TYPE_PLAYBACK_DOMAIN, NULL); return(playback_domain); } gsequencer-1.4.24/ags/audio/recall/0000755000175000017500000000000013256233674014074 500000000000000gsequencer-1.4.24/ags/audio/recall/ags_stream_channel_run.h0000644000175000017500000000414113246707333020663 00000000000000/* 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 . */ #ifndef __AGS_STREAM_CHANNEL_RUN_H__ #define __AGS_STREAM_CHANNEL_RUN_H__ #include #include #include #include #define AGS_TYPE_STREAM_CHANNEL_RUN (ags_stream_channel_run_get_type()) #define AGS_STREAM_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_STREAM_CHANNEL_RUN, AgsStreamChannelRun)) #define AGS_STREAM_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_STREAM_CHANNEL_RUN, AgsStreamChannelRunClass)) #define AGS_IS_STREAM_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_STREAM_CHANNEL_RUN)) #define AGS_IS_STREAM_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_STREAM_CHANNEL_RUN)) #define AGS_STREAM_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_STREAM_CHANNEL_RUN, AgsStreamChannelRunClass)) typedef struct _AgsStreamChannelRun AgsStreamChannelRun; typedef struct _AgsStreamChannelRunClass AgsStreamChannelRunClass; struct _AgsStreamChannelRun { AgsRecallChannelRun recall_channel_run; }; struct _AgsStreamChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_stream_channel_run_get_type(); AgsStreamChannelRun* ags_stream_channel_run_new(); #endif /*__AGS_STREAM_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_envelope_channel.h0000644000175000017500000000431013246707333020317 00000000000000/* 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 . */ #ifndef __AGS_ENVELOPE_CHANNEL_H__ #define __AGS_ENVELOPE_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_ENVELOPE_CHANNEL (ags_envelope_channel_get_type()) #define AGS_ENVELOPE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ENVELOPE_CHANNEL, AgsEnvelopeChannel)) #define AGS_ENVELOPE_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ENVELOPE_CHANNEL, AgsEnvelopeChannel)) #define AGS_IS_ENVELOPE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ENVELOPE_CHANNEL)) #define AGS_IS_ENVELOPE_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ENVELOPE_CHANNEL)) #define AGS_ENVELOPE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_ENVELOPE_CHANNEL, AgsEnvelopeChannelClass)) typedef struct _AgsEnvelopeChannel AgsEnvelopeChannel; typedef struct _AgsEnvelopeChannelClass AgsEnvelopeChannelClass; struct _AgsEnvelopeChannel { AgsRecallChannel recall_channel; AgsPort *use_note_length; AgsPort *use_fixed_length; AgsPort *fixed_length; AgsPort *attack; AgsPort *decay; AgsPort *sustain; AgsPort *release; AgsPort *ratio; }; struct _AgsEnvelopeChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_envelope_channel_get_type(); AgsEnvelopeChannel* ags_envelope_channel_new(); #endif /*__AGS_ENVELOPE_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_count_beats_audio_run.h0000644000175000017500000000731213256163135021367 00000000000000/* 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 . */ #ifndef __AGS_COUNT_BEATS_AUDIO_RUN_H__ #define __AGS_COUNT_BEATS_AUDIO_RUN_H__ #include #include #include #include #define AGS_TYPE_COUNT_BEATS_AUDIO_RUN (ags_count_beats_audio_run_get_type()) #define AGS_COUNT_BEATS_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, AgsCountBeatsAudioRun)) #define AGS_COUNT_BEATS_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, AgsCountBeatsAudioRun)) #define AGS_IS_COUNT_BEATS_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COUNT_BEATS_AUDIO_RUN)) #define AGS_IS_COUNT_BEATS_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COUNT_BEATS_AUDIO_RUN)) #define AGS_COUNT_BEATS_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, AgsCountBeatsAudioRunClass)) typedef struct _AgsCountBeatsAudioRun AgsCountBeatsAudioRun; typedef struct _AgsCountBeatsAudioRunClass AgsCountBeatsAudioRunClass; struct _AgsCountBeatsAudioRun { AgsRecallAudioRun recall_audio_run; gboolean first_run; gdouble bpm; gdouble tact; guint notation_counter; guint sequencer_counter; guint recall_ref; guint hide_ref; guint notation_hide_ref_counter; guint sequencer_hide_ref_counter; AgsDelayAudioRun *delay_audio_run; }; struct _AgsCountBeatsAudioRunClass { AgsRecallAudioRunClass recall_audio_run; void (*notation_start)(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void (*notation_loop)(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void (*notation_stop)(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void (*sequencer_start)(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void (*sequencer_loop)(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void (*sequencer_stop)(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); }; GType ags_count_beats_audio_run_get_type(); void ags_count_beats_audio_run_notation_start(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void ags_count_beats_audio_run_notation_loop(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void ags_count_beats_audio_run_notation_stop(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void ags_count_beats_audio_run_sequencer_start(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void ags_count_beats_audio_run_sequencer_loop(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); void ags_count_beats_audio_run_sequencer_stop(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order); AgsCountBeatsAudioRun* ags_count_beats_audio_run_new(AgsDelayAudioRun *delay_audio_run); #endif /*__AGS_COUNT_BEATS_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_notation_audio.h0000644000175000017500000000405413246707333021060 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PLAY_NOTATION_AUDIO_H__ #define __AGS_PLAY_NOTATION_AUDIO_H__ #include #include #include #define AGS_TYPE_PLAY_NOTATION_AUDIO (ags_play_notation_audio_get_type()) #define AGS_PLAY_NOTATION_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_NOTATION_AUDIO, AgsPlayNotationAudio)) #define AGS_PLAY_NOTATION_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_NOTATION_AUDIO, AgsPlayNotationAudio)) #define AGS_IS_PLAY_NOTATION_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_NOTATION_AUDIO)) #define AGS_IS_PLAY_NOTATION_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_NOTATION_AUDIO)) #define AGS_PLAY_NOTATION_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_NOTATION_AUDIO, AgsPlayNotationAudioClass)) typedef struct _AgsPlayNotationAudio AgsPlayNotationAudio; typedef struct _AgsPlayNotationAudioClass AgsPlayNotationAudioClass; struct _AgsPlayNotationAudio { AgsRecallAudio recall_audio; }; struct _AgsPlayNotationAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_play_notation_audio_get_type(); AgsPlayNotationAudio* ags_play_notation_audio_new(); #endif /*__AGS_PLAY_NOTATION_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_rt_stream_recycling.c0000644000175000017500000001656613247044247021063 00000000000000/* 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 . */ #include #include #include #include void ags_rt_stream_recycling_class_init(AgsRtStreamRecyclingClass *rt_stream_recycling); void ags_rt_stream_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_rt_stream_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_rt_stream_recycling_init(AgsRtStreamRecycling *rt_stream_recycling); void ags_rt_stream_recycling_connect(AgsConnectable *connectable); void ags_rt_stream_recycling_disconnect(AgsConnectable *connectable); void ags_rt_stream_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_rt_stream_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_rt_stream_recycling_finalize(GObject *gobject); AgsRecall* ags_rt_stream_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_rt_stream_recycling * @short_description: rt_streams recycling * @title: AgsRtStreamRecycling * @section_id: * @include: ags/audio/recall/ags_rt_stream_recycling.h * * The #AgsRtStreamRecycling rt_streams the recycling with appropriate #AgsRecallID. */ static gpointer ags_rt_stream_recycling_parent_class = NULL; static AgsConnectableInterface *ags_rt_stream_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_rt_stream_recycling_parent_dynamic_connectable_interface; GType ags_rt_stream_recycling_get_type() { static GType ags_type_rt_stream_recycling = 0; if(!ags_type_rt_stream_recycling){ static const GTypeInfo ags_rt_stream_recycling_info = { sizeof (AgsRtStreamRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_rt_stream_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRtStreamRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_rt_stream_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_rt_stream_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_rt_stream_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_rt_stream_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsRtStreamRecycling", &ags_rt_stream_recycling_info, 0); g_type_add_interface_static(ags_type_rt_stream_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_rt_stream_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_rt_stream_recycling); } void ags_rt_stream_recycling_class_init(AgsRtStreamRecyclingClass *rt_stream_recycling) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_rt_stream_recycling_parent_class = g_type_class_peek_parent(rt_stream_recycling); /* GObjectClass */ gobject = (GObjectClass *) rt_stream_recycling; gobject->finalize = ags_rt_stream_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) rt_stream_recycling; recall->duplicate = ags_rt_stream_recycling_duplicate; } void ags_rt_stream_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_rt_stream_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_rt_stream_recycling_connect; connectable->disconnect = ags_rt_stream_recycling_disconnect; } void ags_rt_stream_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_rt_stream_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_rt_stream_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_rt_stream_recycling_disconnect_dynamic; } void ags_rt_stream_recycling_init(AgsRtStreamRecycling *rt_stream_recycling) { AGS_RECALL(rt_stream_recycling)->name = "ags-rt_stream"; AGS_RECALL(rt_stream_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(rt_stream_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(rt_stream_recycling)->xml_type = "ags-rt_stream-recycling"; AGS_RECALL(rt_stream_recycling)->port = NULL; AGS_RECALL(rt_stream_recycling)->child_type = AGS_TYPE_RT_STREAM_AUDIO_SIGNAL; AGS_RECALL_RECYCLING(rt_stream_recycling)->flags |= (AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE); } void ags_rt_stream_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_rt_stream_recycling_parent_class)->finalize(gobject); } void ags_rt_stream_recycling_connect(AgsConnectable *connectable) { ags_rt_stream_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_rt_stream_recycling_disconnect(AgsConnectable *connectable) { ags_rt_stream_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_rt_stream_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRtStreamRecycling *rt_stream_recycling; ags_rt_stream_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_rt_stream_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_rt_stream_recycling_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } AgsRecall* ags_rt_stream_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRtStreamRecycling *copy; copy = (AgsRtStreamRecycling *) AGS_RECALL_CLASS(ags_rt_stream_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_rt_stream_recycling_new: * @recycling: the #AgsRecycling * * Creates an #AgsRtStreamRecycling * * Returns: a new #AgsRtStreamRecycling * * Since: 1.4.0 */ AgsRtStreamRecycling* ags_rt_stream_recycling_new(AgsRecycling *recycling) { AgsRtStreamRecycling *rt_stream_recycling; rt_stream_recycling = (AgsRtStreamRecycling *) g_object_new(AGS_TYPE_RT_STREAM_RECYCLING, "source", recycling, NULL); return(rt_stream_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_envelope_recycling.c0000644000175000017500000002016313246707333020665 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_envelope_recycling_class_init(AgsEnvelopeRecyclingClass *envelope_recycling); void ags_envelope_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_envelope_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_envelope_recycling_init(AgsEnvelopeRecycling *envelope_recycling); void ags_envelope_recycling_connect(AgsConnectable *connectable); void ags_envelope_recycling_disconnect(AgsConnectable *connectable); void ags_envelope_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_envelope_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_envelope_recycling_finalize(GObject *gobject); void ags_envelope_recycling_done(AgsRecall *recall); void ags_envelope_recycling_cancel(AgsRecall *recall); void ags_envelope_recycling_remove(AgsRecall *recall); AgsRecall* ags_envelope_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_envelope_recycling * @short_description: envelopes recycling * @title: AgsEnvelopeRecycling * @section_id: * @include: ags/audio/recall/ags_envelope_recycling.h * * The #AgsEnvelopeRecycling class envelopes the recycling. */ static gpointer ags_envelope_recycling_parent_class = NULL; static AgsConnectableInterface *ags_envelope_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_envelope_recycling_parent_dynamic_connectable_interface; GType ags_envelope_recycling_get_type() { static GType ags_type_envelope_recycling = 0; if(!ags_type_envelope_recycling){ static const GTypeInfo ags_envelope_recycling_info = { sizeof (AgsEnvelopeRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_envelope_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsEnvelopeRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_envelope_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_envelope_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsEnvelopeRecycling", &ags_envelope_recycling_info, 0); g_type_add_interface_static(ags_type_envelope_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_envelope_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_envelope_recycling); } void ags_envelope_recycling_class_init(AgsEnvelopeRecyclingClass *envelope_recycling) { GObjectClass *gobject; AgsRecallClass *recall; ags_envelope_recycling_parent_class = g_type_class_peek_parent(envelope_recycling); /* GObjectClass */ gobject = (GObjectClass *) envelope_recycling; gobject->finalize = ags_envelope_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) envelope_recycling; recall->done = ags_envelope_recycling_done; recall->cancel = ags_envelope_recycling_cancel; recall->remove = ags_envelope_recycling_remove; recall->duplicate = ags_envelope_recycling_duplicate; } void ags_envelope_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_envelope_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_envelope_recycling_connect; connectable->disconnect = ags_envelope_recycling_disconnect; } void ags_envelope_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_envelope_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_envelope_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_envelope_recycling_disconnect_dynamic; } void ags_envelope_recycling_init(AgsEnvelopeRecycling *envelope_recycling) { AGS_RECALL(envelope_recycling)->name = "ags-envelope"; AGS_RECALL(envelope_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(envelope_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(envelope_recycling)->xml_type = "ags-envelope-recycling"; AGS_RECALL(envelope_recycling)->port = NULL; AGS_RECALL(envelope_recycling)->child_type = AGS_TYPE_ENVELOPE_AUDIO_SIGNAL; } void ags_envelope_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_envelope_recycling_parent_class)->finalize(gobject); } void ags_envelope_recycling_connect(AgsConnectable *connectable) { AgsEnvelopeRecycling *envelope_recycling; ags_envelope_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_envelope_recycling_disconnect(AgsConnectable *connectable) { AgsEnvelopeRecycling *envelope_recycling; ags_envelope_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_envelope_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsEnvelopeRecycling *envelope_recycling; GObject *gobject; ags_envelope_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_envelope_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsEnvelopeRecycling *envelope_recycling; GObject *gobject; ags_envelope_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_envelope_recycling_done(AgsRecall *recall) { AGS_RECALL_CLASS(ags_envelope_recycling_parent_class)->done(recall); /* empty */ } void ags_envelope_recycling_cancel(AgsRecall *recall) { AGS_RECALL_CLASS(ags_envelope_recycling_parent_class)->cancel(recall); /* empty */ } void ags_envelope_recycling_remove(AgsRecall *recall) { AGS_RECALL_CLASS(ags_envelope_recycling_parent_class)->remove(recall); /* empty */ } AgsRecall* ags_envelope_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsEnvelopeRecycling *envelope; envelope = (AgsEnvelopeRecycling *) AGS_RECALL_CLASS(ags_envelope_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) envelope); } /** * ags_envelope_recycling_new: * @source: the source #AgsRecycling * * Creates an #AgsEnvelopeRecycling * * Returns: a new #AgsEnvelopeRecycling * * Since: 0.6 */ AgsEnvelopeRecycling* ags_envelope_recycling_new(AgsRecycling *source) { AgsEnvelopeRecycling *envelope_recycling; envelope_recycling = (AgsEnvelopeRecycling *) g_object_new(AGS_TYPE_ENVELOPE_RECYCLING, "source", source, NULL); return(envelope_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_copy_recycling.h0000644000175000017500000000421013246707333020022 00000000000000/* 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 . */ #ifndef __AGS_COPY_RECYCLING_H__ #define __AGS_COPY_RECYCLING_H__ #include #include #include #include #include #include #define AGS_TYPE_COPY_RECYCLING (ags_copy_recycling_get_type()) #define AGS_COPY_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_RECYCLING, AgsCopyRecycling)) #define AGS_COPY_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_RECYCLING, AgsCopyRecyclingClass)) #define AGS_IS_COPY_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COPY_RECYCLING)) #define AGS_IS_COPY_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COPY_RECYCLING)) #define AGS_COPY_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COPY_RECYCLING, AgsCopyRecyclingClass)) typedef struct _AgsCopyRecycling AgsCopyRecycling; typedef struct _AgsCopyRecyclingClass AgsCopyRecyclingClass; struct _AgsCopyRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsCopyRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_copy_recycling_get_type(); AgsCopyRecycling* ags_copy_recycling_new(AgsRecycling *destination, AgsRecycling *source, GObject *soundcard); #endif /*__AGS_COPY_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_lv2_audio_run.c0000644000175000017500000012057113247044247020611 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_play_lv2_audio_run_class_init(AgsPlayLv2AudioRunClass *play_lv2_audio_run); void ags_play_lv2_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_lv2_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_play_lv2_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_play_lv2_audio_run_init(AgsPlayLv2AudioRun *play_lv2_audio_run); void ags_play_lv2_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_play_lv2_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_play_lv2_audio_run_dispose(GObject *gobject); void ags_play_lv2_audio_run_finalize(GObject *gobject); void ags_play_lv2_audio_run_connect(AgsConnectable *connectable); void ags_play_lv2_audio_run_disconnect(AgsConnectable *connectable); void ags_play_lv2_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_lv2_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_lv2_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_play_lv2_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_play_lv2_audio_run_run_init_pre(AgsRecall *recall); void ags_play_lv2_audio_run_run_pre(AgsRecall *recall); void ags_play_lv2_audio_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_play_lv2_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_play_lv2_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsPlayLv2AudioRun *play_lv2_audio_run); void ags_play_lv2_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_play_lv2_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); /** * SECTION:ags_play_lv2_audio_run * @short_description: play lv2 * @title: AgsPlayLv2AudioRun * @section_id: * @include: ags/audio/recall/ags_play_lv2_audio_run.h * * The #AgsPlayLv2AudioRun class play lv2. */ enum{ PROP_0, PROP_DELAY_AUDIO_RUN, PROP_COUNT_BEATS_AUDIO_RUN, PROP_NOTATION, }; static gpointer ags_play_lv2_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_play_lv2_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_play_lv2_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_play_lv2_audio_run_parent_plugin_interface; GType ags_play_lv2_audio_run_get_type() { static GType ags_type_play_lv2_audio_run = 0; if(!ags_type_play_lv2_audio_run){ static const GTypeInfo ags_play_lv2_audio_run_info = { sizeof (AgsPlayLv2AudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_lv2_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayLv2AudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_lv2_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_lv2_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_play_lv2_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_play_lv2_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_lv2_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsPlayLv2AudioRun", &ags_play_lv2_audio_run_info, 0); g_type_add_interface_static(ags_type_play_lv2_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_lv2_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_play_lv2_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_play_lv2_audio_run); } void ags_play_lv2_audio_run_class_init(AgsPlayLv2AudioRunClass *play_lv2_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_play_lv2_audio_run_parent_class = g_type_class_peek_parent(play_lv2_audio_run); /* GObjectClass */ gobject = (GObjectClass *) play_lv2_audio_run; gobject->set_property = ags_play_lv2_audio_run_set_property; gobject->get_property = ags_play_lv2_audio_run_get_property; gobject->dispose = ags_play_lv2_audio_run_dispose; gobject->finalize = ags_play_lv2_audio_run_finalize; /* properties */ /** * AgsPlayLv2AudioRun:delay-audio-run: * * The delay audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("delay-audio-run", i18n_pspec("assigned AgsDelayAudioRun"), i18n_pspec("the AgsDelayAudioRun which emits lv2_alloc_input signal"), AGS_TYPE_DELAY_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_AUDIO_RUN, param_spec); /** * AgsPlayLv2AudioRun:count-beats-audio-run: * * The count beats audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("count-beats-audio-run", i18n_pspec("assigned AgsCountBeatsAudioRun"), i18n_pspec("the AgsCountBeatsAudioRun which just counts"), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT_BEATS_AUDIO_RUN, param_spec); /** * AgsPlayLv2AudioRun:notation: * * The notation containing the notes. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("assigned AgsNotation"), i18n_pspec("The AgsNotation containing notes"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) play_lv2_audio_run; recall->resolve_dependencies = ags_play_lv2_audio_run_resolve_dependencies; recall->duplicate = ags_play_lv2_audio_run_duplicate; recall->run_init_pre = ags_play_lv2_audio_run_run_init_pre; recall->run_pre = ags_play_lv2_audio_run_run_pre; } void ags_play_lv2_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_lv2_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_lv2_audio_run_connect; connectable->disconnect = ags_play_lv2_audio_run_disconnect; } void ags_play_lv2_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_play_lv2_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_play_lv2_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_play_lv2_audio_run_disconnect_dynamic; } void ags_play_lv2_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_play_lv2_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_play_lv2_audio_run_read; plugin->write = ags_play_lv2_audio_run_write; } void ags_play_lv2_audio_run_init(AgsPlayLv2AudioRun *play_lv2_audio_run) { AGS_RECALL(play_lv2_audio_run)->name = "ags-play-lv2"; AGS_RECALL(play_lv2_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_lv2_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_lv2_audio_run)->xml_type = "ags-play-lv2-audio-run"; AGS_RECALL(play_lv2_audio_run)->port = NULL; play_lv2_audio_run->lv2_handle = NULL; play_lv2_audio_run->input = NULL; play_lv2_audio_run->output = NULL; play_lv2_audio_run->event_port = NULL; play_lv2_audio_run->atom_port = NULL; play_lv2_audio_run->delta_time = 0; play_lv2_audio_run->event_buffer = NULL; play_lv2_audio_run->event_count = NULL; play_lv2_audio_run->key_on = 0; play_lv2_audio_run->worker_handle = NULL; play_lv2_audio_run->delay_audio_run = NULL; play_lv2_audio_run->count_beats_audio_run = NULL; play_lv2_audio_run->destination = NULL; play_lv2_audio_run->notation = NULL; play_lv2_audio_run->offset = NULL; } void ags_play_lv2_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayLv2AudioRun *play_lv2_audio_run; play_lv2_audio_run = AGS_PLAY_LV2_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { AgsDelayAudioRun *delay_audio_run; gboolean is_template; delay_audio_run = g_value_get_object(value); if(delay_audio_run == play_lv2_audio_run->delay_audio_run){ return; } if(delay_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(delay_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(play_lv2_audio_run->delay_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(play_lv2_audio_run), (AgsRecall *) play_lv2_audio_run->delay_audio_run); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(play_lv2_audio_run)->flags)) != 0){ g_object_disconnect(G_OBJECT(play_lv2_audio_run->delay_audio_run), "any_signal::notation-alloc-input", G_CALLBACK(ags_play_lv2_audio_run_alloc_input_callback), play_lv2_audio_run, NULL); } } g_object_unref(G_OBJECT(play_lv2_audio_run->delay_audio_run)); } if(delay_audio_run != NULL){ g_object_ref(delay_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(play_lv2_audio_run), ags_recall_dependency_new((GObject *) delay_audio_run)); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(play_lv2_audio_run)->flags)) != 0){ g_signal_connect(G_OBJECT(delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_play_lv2_audio_run_alloc_input_callback), play_lv2_audio_run); } } } play_lv2_audio_run->delay_audio_run = delay_audio_run; } break; case PROP_COUNT_BEATS_AUDIO_RUN: { AgsCountBeatsAudioRun *count_beats_audio_run; gboolean is_template; count_beats_audio_run = g_value_get_object(value); if(count_beats_audio_run == play_lv2_audio_run->count_beats_audio_run){ return; } if(count_beats_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(count_beats_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(play_lv2_audio_run->count_beats_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(play_lv2_audio_run), (AgsRecall *) play_lv2_audio_run->count_beats_audio_run); } g_object_unref(G_OBJECT(play_lv2_audio_run->count_beats_audio_run)); } if(count_beats_audio_run != NULL){ g_object_ref(count_beats_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(play_lv2_audio_run), ags_recall_dependency_new((GObject *) count_beats_audio_run)); } } play_lv2_audio_run->count_beats_audio_run = count_beats_audio_run; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(play_lv2_audio_run->notation == notation){ return; } if(play_lv2_audio_run->notation != NULL){ g_object_unref(play_lv2_audio_run->notation); } if(notation != NULL){ g_object_ref(notation); } play_lv2_audio_run->notation = notation; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_play_lv2_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayLv2AudioRun *play_lv2_audio_run; play_lv2_audio_run = AGS_PLAY_LV2_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(play_lv2_audio_run->delay_audio_run)); } break; case PROP_COUNT_BEATS_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(play_lv2_audio_run->count_beats_audio_run)); } break; case PROP_NOTATION: { g_value_set_object(value, play_lv2_audio_run->notation); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_play_lv2_audio_run_dispose(GObject *gobject) { AgsPlayLv2AudioRun *play_lv2_audio_run; play_lv2_audio_run = AGS_PLAY_LV2_AUDIO_RUN(gobject); /* delay audio run */ if(play_lv2_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(play_lv2_audio_run->delay_audio_run)); play_lv2_audio_run->delay_audio_run = NULL; } /* count beats audio run */ if(play_lv2_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(play_lv2_audio_run->count_beats_audio_run)); play_lv2_audio_run->count_beats_audio_run = NULL; } /* notation */ if(play_lv2_audio_run->notation != NULL){ g_object_unref(G_OBJECT(play_lv2_audio_run->notation)); play_lv2_audio_run->notation = NULL; } /* call parent */ G_OBJECT_CLASS(ags_play_lv2_audio_run_parent_class)->dispose(gobject); } void ags_play_lv2_audio_run_finalize(GObject *gobject) { AgsPlayLv2AudioRun *play_lv2_audio_run; play_lv2_audio_run = AGS_PLAY_LV2_AUDIO_RUN(gobject); /* delay audio run */ if(play_lv2_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(play_lv2_audio_run->delay_audio_run)); } /* count beats audio run */ if(play_lv2_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(play_lv2_audio_run->count_beats_audio_run)); } /* notation */ if(play_lv2_audio_run->notation != NULL){ g_object_unref(G_OBJECT(play_lv2_audio_run->notation)); } /* call parent */ G_OBJECT_CLASS(ags_play_lv2_audio_run_parent_class)->finalize(gobject); } void ags_play_lv2_audio_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_play_lv2_audio_run_parent_connectable_interface->connect(connectable); } void ags_play_lv2_audio_run_disconnect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } /* call parent */ ags_play_lv2_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_play_lv2_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsPlayLv2AudioRun *play_lv2_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } play_lv2_audio_run = AGS_PLAY_LV2_AUDIO_RUN(dynamic_connectable); /* call parent */ ags_play_lv2_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* connect */ g_signal_connect(G_OBJECT(play_lv2_audio_run->delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_play_lv2_audio_run_alloc_input_callback), play_lv2_audio_run); } void ags_play_lv2_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsPlayLv2AudioRun *play_lv2_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) == 0){ return; } /* call parent */ ags_play_lv2_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); play_lv2_audio_run = AGS_PLAY_LV2_AUDIO_RUN(dynamic_connectable); if(play_lv2_audio_run->delay_audio_run != NULL){ g_object_disconnect(G_OBJECT(play_lv2_audio_run->delay_audio_run), "any_signal::notation-alloc-input", G_CALLBACK(ags_play_lv2_audio_run_alloc_input_callback), play_lv2_audio_run, NULL); } } void ags_play_lv2_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_play_lv2_audio_run_parent_plugin_interface->read(file, node, plugin); /* read depenendency */ iter = node->children; while(iter != NULL){ if(iter->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(iter->name, "ags-dependency-list", 19)){ xmlNode *dependency_node; dependency_node = iter->children; while(dependency_node != NULL){ if(dependency_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(dependency_node->name, "ags-dependency", 15)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_play_lv2_audio_run_read_resolve_dependency), G_OBJECT(plugin)); } } dependency_node = dependency_node->next; } } } iter = iter->next; } } xmlNode* ags_play_lv2_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_play_lv2_audio_run_parent_plugin_interface->write(file, parent, plugin); /* write dependencies */ child = xmlNewNode(NULL, "ags-dependency-list"); xmlNewProp(child, AGS_FILE_ID_PROP, ags_id_generator_create_uuid()); xmlAddChild(node, child); list = AGS_RECALL(plugin)->dependencies; while(list != NULL){ id = ags_id_generator_create_uuid(); dependency_node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(dependency_node, AGS_FILE_ID_PROP, id); xmlAddChild(child, dependency_node); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", list->data, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_play_lv2_audio_run_write_resolve_dependency), G_OBJECT(plugin)); list = list->next; } return(node); } void ags_play_lv2_audio_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallID *recall_id; AgsRecallContainer *recall_container; AgsRecallDependency *recall_dependency; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GList *list; guint i, i_stop; recall_container = AGS_RECALL_CONTAINER(recall->container); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ template = AGS_RECALL(list->data); }else{ g_warning("AgsRecallClass::resolve - missing dependency"); return; } list = template->dependencies; delay_audio_run = NULL; count_beats_audio_run = NULL; i_stop = 2; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_DELAY_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } delay_audio_run = (AgsDelayAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } count_beats_audio_run = (AgsCountBeatsAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "delay-audio-run", delay_audio_run, "count-beats-audio-run", count_beats_audio_run, NULL); } AgsRecall* ags_play_lv2_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPlayLv2AudioRun *copy; copy = AGS_PLAY_LV2_AUDIO_RUN(AGS_RECALL_CLASS(ags_play_lv2_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } void ags_play_lv2_audio_run_run_init_pre(AgsRecall *recall) { GObject *soundcard; AgsPlayLv2Audio *play_lv2_audio; AgsPlayLv2AudioRun *play_lv2_audio_run; AgsLv2Plugin *lv2_plugin; AgsMutexManager *mutex_manager; gchar *path; guint audio_channel; guint samplerate; guint buffer_size; uint32_t i; play_lv2_audio_run = AGS_PLAY_LV2_AUDIO_RUN(recall); play_lv2_audio = AGS_PLAY_LV2_AUDIO(AGS_RECALL_AUDIO_RUN(play_lv2_audio_run)->recall_audio); /* set up feature */ soundcard = recall->soundcard; ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, &buffer_size, NULL); play_lv2_audio_run->input = (float *) malloc(play_lv2_audio->input_lines * buffer_size * sizeof(float)); play_lv2_audio_run->output = (float *) malloc(play_lv2_audio->output_lines * buffer_size * sizeof(float)); /* instantiate lv2 */ lv2_plugin = play_lv2_audio->plugin; play_lv2_audio_run->lv2_handle = (LV2_Handle *) ags_base_plugin_instantiate(AGS_BASE_PLUGIN(lv2_plugin), samplerate); #ifdef AGS_DEBUG g_message("instantiate LV2 handle"); #endif ags_play_lv2_audio_run_load_ports(play_lv2_audio_run); /* can't be done in ags_play_lv2_audio_run_run_init_inter since possebility of overlapping buffers */ /* connect audio port */ for(i = 0; i < play_lv2_audio->input_lines; i++){ #ifdef AGS_DEBUG g_message("connect port: %d", play_lv2_audio->input_port[i]); #endif play_lv2_audio->plugin_descriptor->connect_port(play_lv2_audio_run->lv2_handle[0], play_lv2_audio->input_port[i], play_lv2_audio_run->input); } for(i = 0; i < play_lv2_audio->output_lines; i++){ #ifdef AGS_DEBUG g_message("connect port: %d", play_lv2_audio->output_port[i]); #endif play_lv2_audio->plugin_descriptor->connect_port(play_lv2_audio_run->lv2_handle[0], play_lv2_audio->output_port[i], play_lv2_audio_run->output); } /* connect event port */ if((AGS_PLAY_LV2_AUDIO_HAS_EVENT_PORT & (play_lv2_audio->flags)) != 0){ play_lv2_audio_run->event_port = ags_lv2_plugin_alloc_event_buffer(AGS_PLAY_LV2_AUDIO_DEFAULT_MIDI_LENGHT); play_lv2_audio->plugin_descriptor->connect_port(play_lv2_audio_run->lv2_handle[0], play_lv2_audio->event_port, play_lv2_audio_run->event_port); } /* connect atom port */ if((AGS_PLAY_LV2_AUDIO_HAS_ATOM_PORT & (play_lv2_audio->flags)) != 0){ play_lv2_audio_run->atom_port = ags_lv2_plugin_alloc_atom_sequence(AGS_PLAY_LV2_AUDIO_DEFAULT_MIDI_LENGHT); play_lv2_audio->plugin_descriptor->connect_port(play_lv2_audio_run->lv2_handle[0], play_lv2_audio->atom_port, play_lv2_audio_run->atom_port); } /* activate */ if(play_lv2_audio->plugin_descriptor->activate != NULL){ play_lv2_audio->plugin_descriptor->activate(play_lv2_audio_run->lv2_handle[0]); } /* set program */ if((AGS_LV2_PLUGIN_HAS_PROGRAM_INTERFACE & (lv2_plugin->flags)) != 0){ AgsPort *current; GList *list, *port; gchar *specifier; float *port_data; guint port_count; port = AGS_RECALL(play_lv2_audio)->port; port_count = g_list_length(port); port_data = (float *) malloc(port_count * sizeof(float)); for(i = 0; i < port_count; i++){ current = port->data; port_data[i] = current->port_value.ags_port_float; port = port->next; } ags_lv2_plugin_change_program(lv2_plugin, play_lv2_audio_run->lv2_handle, play_lv2_audio->bank, play_lv2_audio->program); /* reset port data */ port = AGS_RECALL(play_lv2_audio)->port; for(i = 0; i < port_count; i++){ current = port->data; current->port_value.ags_port_float = port_data[i]; port = port->next; } free(port_data); } /* call parent */ AGS_RECALL_CLASS(ags_play_lv2_audio_run_parent_class)->run_init_pre(recall); } void ags_play_lv2_audio_run_run_pre(AgsRecall *recall) { AgsAudio *audio; AgsChannel *channel; AgsChannel *selected_channel; AgsRecycling *recycling; AgsAudioSignal *destination; AgsMutexManager *mutex_manager; AgsPlayLv2Audio *play_lv2_audio; AgsPlayLv2AudioRun *play_lv2_audio_run; GObject *soundcard; guint audio_channel; guint copy_mode_out; guint buffer_size; uint32_t i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; play_lv2_audio_run = AGS_PLAY_LV2_AUDIO_RUN(recall); play_lv2_audio = AGS_PLAY_LV2_AUDIO(AGS_RECALL_AUDIO_RUN(play_lv2_audio_run)->recall_audio); destination = (AgsAudioSignal *) play_lv2_audio_run->destination; soundcard = recall->soundcard; ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, NULL, &buffer_size, NULL); audio = AGS_RECALL_AUDIO(play_lv2_audio)->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel = (AgsChannel *) AGS_RECYCLING(AGS_RECALL(play_lv2_audio_run)->recall_id->recycling)->channel; channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel = (AgsChannel *) AGS_RECYCLING(AGS_RECALL(play_lv2_audio_run)->recall_id->recycling)->channel; channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio channel */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* get channel */ if((AGS_AUDIO_NOTATION_DEFAULT & (audio->flags)) != 0){ selected_channel = ags_channel_nth(audio->input, audio_channel); }else{ selected_channel = ags_channel_nth(audio->output, audio_channel); } /* recycling */ recycling = selected_channel->first_recycling; recall->flags &= (~AGS_RECALL_PERSISTENT); pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); if(destination == NULL){ AgsRecyclingContext *recycling_context; gdouble delay; guint attack; guint length; /* recycling context */ recycling_context = recall->recall_id->recycling_context; //TODO:JK: unclear attack = 0; delay = 0.0; /* create new audio signal */ play_lv2_audio_run->destination = destination = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) recall->recall_id); //TODO:JK: create property g_object_ref(play_lv2_audio_run->destination); ags_recycling_create_audio_signal_with_defaults(recycling, destination, delay, attack); length = 1; // (guint) (2.0 * soundcard->delay[soundcard->tic_counter]) + 1; ags_audio_signal_stream_resize(destination, length); ags_connectable_connect(AGS_CONNECTABLE(destination)); destination->stream_current = destination->stream_beginning; pthread_mutex_lock(recycling_mutex); ags_recycling_add_audio_signal(recycling, destination); pthread_mutex_unlock(recycling_mutex); #ifdef AGS_DEBUG g_message("play %x to %x", destination, recall_id); g_message("creating destination"); #endif } /* * process data */ /* recycling */ pthread_mutex_lock(channel_mutex); recycling = selected_channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* lookup recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* create audio data */ pthread_mutex_lock(recycling_mutex); buffer_size = destination->buffer_size; ags_audio_buffer_util_clear_buffer(destination->stream_current->data, 1, buffer_size, ags_audio_buffer_util_format_from_soundcard(destination->format)); if(play_lv2_audio_run->input != NULL){ ags_audio_buffer_util_clear_float(play_lv2_audio_run->input, play_lv2_audio->input_lines, play_lv2_audio->input_lines * buffer_size); } /* get copy mode and clear buffer */ copy_mode_out = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(destination->format), AGS_AUDIO_BUFFER_UTIL_FLOAT); if(play_lv2_audio_run->output != NULL){ ags_audio_buffer_util_clear_float(play_lv2_audio_run->output, 1, play_lv2_audio->output_lines * buffer_size); } /* process data */ if(play_lv2_audio_run->key_on != 0 && play_lv2_audio_run->lv2_handle != NULL){ uint32_t sample_count; sample_count = (uint32_t) buffer_size; play_lv2_audio->plugin_descriptor->run(play_lv2_audio_run->lv2_handle[0], sample_count); } /* copy data */ if(play_lv2_audio_run->output != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(destination->stream_current->data, 1, 0, play_lv2_audio_run->output, (guint) 1, 0, (guint) buffer_size, copy_mode_out); } pthread_mutex_unlock(recycling_mutex); /* call parent */ AGS_RECALL_CLASS(ags_play_lv2_audio_run_parent_class)->run_pre(recall); } void ags_play_lv2_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsPlayLv2AudioRun *play_lv2_audio_run) { GObject *soundcard; AgsAudio *audio; AgsChannel *channel; AgsChannel *selected_channel; AgsNotation *notation; AgsNote *note; AgsPlayLv2Audio *play_lv2_audio; AgsDelayAudio *delay_audio; AgsMutexManager *mutex_manager; snd_seq_event_t *seq_event; GList *current_position; GList *list; guint audio_start_mapping; guint midi_start_mapping, midi_end_mapping; guint notation_counter; guint note_x0, note_x1; guint note_y; guint input_pads; guint selected_key; guint audio_channel; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(delay != 0.0){ return; } play_lv2_audio = AGS_PLAY_LV2_AUDIO(AGS_RECALL_AUDIO_RUN(play_lv2_audio_run)->recall_audio); delay_audio = AGS_DELAY_AUDIO(AGS_RECALL_AUDIO_RUN(delay_audio_run)->recall_audio); audio = AGS_RECALL_AUDIO(play_lv2_audio)->audio; soundcard = (GObject *) AGS_RECALL(play_lv2_audio_run)->soundcard; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* read config and audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(audio_mutex); list = audio->notation;//(GList *) g_value_get_pointer(&value); pthread_mutex_unlock(audio_mutex); if(list == NULL){ return; } /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel = (AgsChannel *) AGS_RECYCLING(AGS_RECALL(delay_audio_run)->recall_id->recycling)->channel; channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio channel */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* get channel */ if((AGS_AUDIO_NOTATION_DEFAULT & (audio->flags)) != 0){ selected_channel = ags_channel_nth(audio->input, audio_channel); }else{ selected_channel = ags_channel_nth(audio->output, audio_channel); } /* get notation */ pthread_mutex_lock(audio_mutex); //TODO:JK: make it advanced notation = AGS_NOTATION(g_list_nth(list, audio_channel)->data);//AGS_NOTATION(ags_notation_find_near_timestamp(list, audio_channel, // timestamp_thread->timestamp)->data); current_position = notation->notes; // start_loop notation_counter = play_lv2_audio_run->count_beats_audio_run->notation_counter; input_pads = audio->input_pads; audio_start_mapping = audio->audio_start_mapping; midi_start_mapping = audio->midi_start_mapping; midi_end_mapping = audio->midi_end_mapping; pthread_mutex_unlock(audio_mutex); /* * feed midi */ while(current_position != NULL){ gboolean success; pthread_mutex_lock(audio_mutex); note = AGS_NOTE(current_position->data); note_x0 = note->x[0]; note_x1 = note->x[1]; note_y = note->y; pthread_mutex_unlock(audio_mutex); success = FALSE; if(note_x0 == notation_counter){ /* send key-on */ if((AGS_AUDIO_REVERSE_MAPPING & (audio->flags)) != 0){ selected_key = input_pads - note->y - 1; }else{ selected_key = note->y; } /* key on */ seq_event = (snd_seq_event_t *) malloc(sizeof(snd_seq_event_t)); memset(seq_event, 0, sizeof(snd_seq_event_t)); seq_event->type = SND_SEQ_EVENT_NOTEON; seq_event->data.note.channel = 0; seq_event->data.note.note = 0x7f & (selected_key - audio_start_mapping + midi_start_mapping); seq_event->data.note.velocity = 127; /* write to port */ if((AGS_PLAY_LV2_AUDIO_HAS_ATOM_PORT & (play_lv2_audio->flags)) != 0){ success = ags_lv2_plugin_atom_sequence_append_midi(play_lv2_audio_run->atom_port, AGS_PLAY_LV2_AUDIO_DEFAULT_MIDI_LENGHT, seq_event, 1); }else if((AGS_PLAY_LV2_AUDIO_HAS_EVENT_PORT & (play_lv2_audio->flags)) != 0){ success = ags_lv2_plugin_event_buffer_append_midi(play_lv2_audio_run->event_port, AGS_PLAY_LV2_AUDIO_DEFAULT_MIDI_LENGHT, seq_event, 1); } if(success){ play_lv2_audio_run->key_on += 1; } free(seq_event); }else if(note_x1 == notation_counter){ /* send key off */ if((AGS_AUDIO_REVERSE_MAPPING & (audio->flags)) != 0){ selected_key = input_pads - note->y - 1; }else{ selected_key = note->y; } /* write to port */ if((AGS_PLAY_LV2_AUDIO_HAS_ATOM_PORT & (play_lv2_audio->flags)) != 0){ success = ags_lv2_plugin_atom_sequence_remove_midi(play_lv2_audio_run->atom_port, AGS_PLAY_LV2_AUDIO_DEFAULT_MIDI_LENGHT, (0x7f & (selected_key - audio_start_mapping + midi_start_mapping))); }else if((AGS_PLAY_LV2_AUDIO_HAS_EVENT_PORT & (play_lv2_audio->flags)) != 0){ success = ags_lv2_plugin_event_buffer_remove_midi(play_lv2_audio_run->event_port, AGS_PLAY_LV2_AUDIO_DEFAULT_MIDI_LENGHT, (0x7f & (selected_key - audio_start_mapping + midi_start_mapping))); } if(success && play_lv2_audio_run->key_on != 0){ play_lv2_audio_run->key_on -= 1; } }else if(note_x0 > notation_counter){ break; } pthread_mutex_lock(audio_mutex); current_position = current_position->next; pthread_mutex_unlock(audio_mutex); } } void ags_play_lv2_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_RECALL_DEPENDENCY(file_lookup->ref)->dependency); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_play_lv2_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "xpath"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(AGS_IS_DELAY_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "delay-audio-run", id_ref->ref, NULL); }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "count-beats-audio-run", id_ref->ref, NULL); } } /** * ags_play_lv2_audio_run_load_ports: * @play_lv2_audio_run: an #AgsRecallLv2Run * * Set up LV2 ports. * * Since: 1.0.0 */ void ags_play_lv2_audio_run_load_ports(AgsPlayLv2AudioRun *play_lv2_audio_run) { AgsPlayLv2Audio *play_lv2_audio; AgsPort *current; AgsLv2Plugin *lv2_plugin; GList *port; GList *port_descriptor; gchar *specifier; uint32_t i, j; play_lv2_audio = AGS_PLAY_LV2_AUDIO(AGS_RECALL_AUDIO_RUN(play_lv2_audio_run)->recall_audio); lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), play_lv2_audio->filename, play_lv2_audio->effect); if(AGS_BASE_PLUGIN(lv2_plugin)->port != NULL){ port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; for(i = 0; port_descriptor != NULL; i++){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ port = AGS_RECALL(play_lv2_audio)->port; current = NULL; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; while(port != NULL){ if(!g_strcmp0(specifier, AGS_PORT(port->data)->specifier)){ current = port->data; break; } port = port->next; } #ifdef AGS_DEBUG g_message("connect port: %d", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index); #endif play_lv2_audio->plugin_descriptor->connect_port(play_lv2_audio_run->lv2_handle[0], (uint32_t) AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index, (float *) &(current->port_value.ags_port_float)); } port_descriptor = port_descriptor->next; } } } /** * ags_play_lv2_audio_run_new: * * Creates an #AgsPlayLv2AudioRun * * Returns: a new #AgsPlayLv2AudioRun * * Since: 1.0.0 */ AgsPlayLv2AudioRun* ags_play_lv2_audio_run_new() { AgsPlayLv2AudioRun *play_lv2_audio_run; play_lv2_audio_run = (AgsPlayLv2AudioRun *) g_object_new(AGS_TYPE_PLAY_LV2_AUDIO_RUN, NULL); return(play_lv2_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_route_lv2_audio_run.c0000644000175000017500000010717513247044247021007 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_route_lv2_audio_run_class_init(AgsRouteLv2AudioRunClass *route_lv2_audio_run); void ags_route_lv2_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_route_lv2_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_route_lv2_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_route_lv2_audio_run_init(AgsRouteLv2AudioRun *route_lv2_audio_run); void ags_route_lv2_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_route_lv2_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_route_lv2_audio_run_dispose(GObject *gobject); void ags_route_lv2_audio_run_finalize(GObject *gobject); void ags_route_lv2_audio_run_connect(AgsConnectable *connectable); void ags_route_lv2_audio_run_disconnect(AgsConnectable *connectable); void ags_route_lv2_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_route_lv2_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_route_lv2_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_route_lv2_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_route_lv2_audio_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_route_lv2_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_route_lv2_audio_run_run_post(AgsRecall *recall); void ags_route_lv2_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsRouteLv2AudioRun *route_lv2_audio_run); void ags_route_lv2_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_route_lv2_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_route_lv2_audio_run_feed_midi(AgsRecall *recall, AgsNote *note); /** * SECTION:ags_route_lv2_audio_run * @short_description: route MIDI * @title: AgsRouteLv2AudioRun * @section_id: * @include: ags/audio/recall/ags_route_lv2_audio_run.h * * The #AgsRouteLv2AudioRun routes MIDI to LV2 recall. */ enum{ PROP_0, PROP_DELAY_AUDIO_RUN, PROP_COUNT_BEATS_AUDIO_RUN, }; static gpointer ags_route_lv2_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_route_lv2_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_route_lv2_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_route_lv2_audio_run_parent_plugin_interface; GType ags_route_lv2_audio_run_get_type() { static GType ags_type_route_lv2_audio_run = 0; if(!ags_type_route_lv2_audio_run){ static const GTypeInfo ags_route_lv2_audio_run_info = { sizeof (AgsRouteLv2AudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_route_lv2_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRouteLv2AudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_route_lv2_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_route_lv2_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_route_lv2_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_route_lv2_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_route_lv2_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsRouteLv2AudioRun", &ags_route_lv2_audio_run_info, 0); g_type_add_interface_static(ags_type_route_lv2_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_route_lv2_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_route_lv2_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_route_lv2_audio_run); } void ags_route_lv2_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_route_lv2_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_route_lv2_audio_run_connect; connectable->disconnect = ags_route_lv2_audio_run_disconnect; } void ags_route_lv2_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_route_lv2_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_route_lv2_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_route_lv2_audio_run_disconnect_dynamic; } void ags_route_lv2_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_route_lv2_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_route_lv2_audio_run_read; plugin->write = ags_route_lv2_audio_run_write; } void ags_route_lv2_audio_run_class_init(AgsRouteLv2AudioRunClass *route_lv2_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_route_lv2_audio_run_parent_class = g_type_class_peek_parent(route_lv2_audio_run); /* GObjectClass */ gobject = (GObjectClass *) route_lv2_audio_run; gobject->set_property = ags_route_lv2_audio_run_set_property; gobject->get_property = ags_route_lv2_audio_run_get_property; gobject->dispose = ags_route_lv2_audio_run_dispose; gobject->finalize = ags_route_lv2_audio_run_finalize; /* properties */ param_spec = g_param_spec_object("delay-audio-run", i18n_pspec("assigned AgsDelayAudioRun"), i18n_pspec("the AgsDelayAudioRun which emits notation_alloc_input signal"), AGS_TYPE_DELAY_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_AUDIO_RUN, param_spec); param_spec = g_param_spec_object("count-beats-audio-run", i18n_pspec("assigned AgsCountBeatsAudioRun"), i18n_pspec("the AgsCountBeatsAudioRun which just counts"), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT_BEATS_AUDIO_RUN, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) route_lv2_audio_run; recall->resolve_dependencies = ags_route_lv2_audio_run_resolve_dependencies; recall->duplicate = ags_route_lv2_audio_run_duplicate; recall->run_post = ags_route_lv2_audio_run_run_post; } void ags_route_lv2_audio_run_init(AgsRouteLv2AudioRun *route_lv2_audio_run) { AGS_RECALL(route_lv2_audio_run)->name = "ags-route-lv2"; AGS_RECALL(route_lv2_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(route_lv2_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(route_lv2_audio_run)->xml_type = "ags-route-lv2-audio-run"; AGS_RECALL(route_lv2_audio_run)->port = NULL; route_lv2_audio_run->delay_audio_run = NULL; route_lv2_audio_run->count_beats_audio_run = NULL; route_lv2_audio_run->notation = NULL; route_lv2_audio_run->timestamp = ags_timestamp_new(); route_lv2_audio_run->timestamp->flags &= (~AGS_TIMESTAMP_UNIX); route_lv2_audio_run->timestamp->flags |= AGS_TIMESTAMP_OFFSET; route_lv2_audio_run->timestamp->timer.ags_offset.offset = 0; route_lv2_audio_run->sequencer = NULL; route_lv2_audio_run->feed_midi = NULL; route_lv2_audio_run->delta_time = 0; } void ags_route_lv2_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRouteLv2AudioRun *route_lv2_audio_run; route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { AgsDelayAudioRun *delay_audio_run; gboolean is_template; delay_audio_run = g_value_get_object(value); if(delay_audio_run == route_lv2_audio_run->delay_audio_run){ return; } if(delay_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(delay_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(route_lv2_audio_run->delay_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(route_lv2_audio_run), (AgsRecall *) route_lv2_audio_run->delay_audio_run); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(route_lv2_audio_run)->flags)) != 0){ g_signal_handler_disconnect(G_OBJECT(route_lv2_audio_run), route_lv2_audio_run->notation_alloc_input_handler); } } g_object_unref(G_OBJECT(route_lv2_audio_run->delay_audio_run)); } if(delay_audio_run != NULL){ g_object_ref(delay_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(route_lv2_audio_run), ags_recall_dependency_new((GObject *) delay_audio_run)); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(route_lv2_audio_run)->flags)) != 0){ route_lv2_audio_run->notation_alloc_input_handler = g_signal_connect(G_OBJECT(delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_route_lv2_audio_run_alloc_input_callback), route_lv2_audio_run); } } } route_lv2_audio_run->delay_audio_run = delay_audio_run; } break; case PROP_COUNT_BEATS_AUDIO_RUN: { AgsCountBeatsAudioRun *count_beats_audio_run; gboolean is_template; count_beats_audio_run = g_value_get_object(value); if(count_beats_audio_run == route_lv2_audio_run->count_beats_audio_run){ return; } if(count_beats_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(count_beats_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(route_lv2_audio_run->count_beats_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(route_lv2_audio_run), (AgsRecall *) route_lv2_audio_run->count_beats_audio_run); } g_object_unref(G_OBJECT(route_lv2_audio_run->count_beats_audio_run)); } if(count_beats_audio_run != NULL){ g_object_ref(count_beats_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(route_lv2_audio_run), ags_recall_dependency_new((GObject *) count_beats_audio_run)); } } route_lv2_audio_run->count_beats_audio_run = count_beats_audio_run; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_route_lv2_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRouteLv2AudioRun *route_lv2_audio_run; route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(route_lv2_audio_run->delay_audio_run)); } break; case PROP_COUNT_BEATS_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(route_lv2_audio_run->count_beats_audio_run)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_route_lv2_audio_run_dispose(GObject *gobject) { AgsRouteLv2AudioRun *route_lv2_audio_run; route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(gobject); /* delay audio run */ if(route_lv2_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(route_lv2_audio_run->delay_audio_run)); route_lv2_audio_run->delay_audio_run = NULL; } /* count beats audio run */ if(route_lv2_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(route_lv2_audio_run->count_beats_audio_run)); route_lv2_audio_run->count_beats_audio_run = NULL; } /* feed midi */ g_list_free_full(route_lv2_audio_run->feed_midi, g_object_unref); route_lv2_audio_run->feed_midi = NULL; /* call parent */ G_OBJECT_CLASS(ags_route_lv2_audio_run_parent_class)->dispose(gobject); } void ags_route_lv2_audio_run_finalize(GObject *gobject) { AgsRouteLv2AudioRun *route_lv2_audio_run; GList *note; route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(gobject); /* delay audio run */ if(route_lv2_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(route_lv2_audio_run->delay_audio_run)); } /* count beats audio run */ if(route_lv2_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(route_lv2_audio_run->count_beats_audio_run)); } /* timestamp */ if(route_lv2_audio_run->timestamp != NULL){ g_object_unref(G_OBJECT(route_lv2_audio_run->timestamp)); } g_list_free_full(route_lv2_audio_run->feed_midi, g_object_unref); /* call parent */ G_OBJECT_CLASS(ags_route_lv2_audio_run_parent_class)->finalize(gobject); } void ags_route_lv2_audio_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_route_lv2_audio_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_route_lv2_audio_run_disconnect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } /* call parent */ ags_route_lv2_audio_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_route_lv2_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRouteLv2AudioRun *route_lv2_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(dynamic_connectable); /* call parent */ ags_route_lv2_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* connect */ route_lv2_audio_run->notation_alloc_input_handler = g_signal_connect(G_OBJECT(route_lv2_audio_run->delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_route_lv2_audio_run_alloc_input_callback), route_lv2_audio_run); } void ags_route_lv2_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRouteLv2AudioRun *route_lv2_audio_run; /* call parent */ ags_route_lv2_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(dynamic_connectable); if(route_lv2_audio_run->delay_audio_run != NULL){ g_signal_handler_disconnect(G_OBJECT(route_lv2_audio_run->delay_audio_run), route_lv2_audio_run->notation_alloc_input_handler); } } void ags_route_lv2_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_route_lv2_audio_run_parent_plugin_interface->read(file, node, plugin); /* read depenendency */ iter = node->children; while(iter != NULL){ if(iter->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(iter->name, "ags-dependency-list", 19)){ xmlNode *dependency_node; dependency_node = iter->children; while(dependency_node != NULL){ if(dependency_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(dependency_node->name, "ags-dependency", 15)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_route_lv2_audio_run_read_resolve_dependency), G_OBJECT(plugin)); } } dependency_node = dependency_node->next; } } } iter = iter->next; } } xmlNode* ags_route_lv2_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_route_lv2_audio_run_parent_plugin_interface->write(file, parent, plugin); /* write dependencies */ child = xmlNewNode(NULL, "ags-dependency-list"); xmlNewProp(child, AGS_FILE_ID_PROP, ags_id_generator_create_uuid()); xmlAddChild(node, child); list = AGS_RECALL(plugin)->dependencies; while(list != NULL){ id = ags_id_generator_create_uuid(); dependency_node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(dependency_node, AGS_FILE_ID_PROP, id); xmlAddChild(child, dependency_node); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", list->data, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_route_lv2_audio_run_write_resolve_dependency), G_OBJECT(plugin)); list = list->next; } return(node); } void ags_route_lv2_audio_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallID *recall_id; AgsRecallContainer *recall_container; AgsRecallDependency *recall_dependency; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GList *list; guint i, i_stop; recall_container = AGS_RECALL_CONTAINER(recall->container); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ template = AGS_RECALL(list->data); }else{ g_warning("AgsRecallClass::resolve - missing dependency"); return; } list = template->dependencies; delay_audio_run = NULL; count_beats_audio_run = NULL; i_stop = 2; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_DELAY_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } delay_audio_run = (AgsDelayAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } count_beats_audio_run = (AgsCountBeatsAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "delay-audio-run", delay_audio_run, "count-beats-audio-run", count_beats_audio_run, NULL); } AgsRecall* ags_route_lv2_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRouteLv2AudioRun *copy, *route_lv2_audio_run; copy = AGS_ROUTE_LV2_AUDIO_RUN(AGS_RECALL_CLASS(ags_route_lv2_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } void ags_route_lv2_audio_run_feed_midi(AgsRecall *recall, AgsNote *note) { AgsAudio *audio; AgsChannel *channel, *selected_channel; AgsChannel *link; AgsRecallLv2 *recall_lv2; AgsRecallLv2Run *recall_lv2_run; AgsRecallID *child_recall_id; AgsDelayAudioRun *delay_audio_run; AgsRouteLv2AudioRun *route_lv2_audio_run; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *channel_dummy, *recycling_dummy, *lv2; GList *list_recall; GList *list; snd_seq_event_t *seq_event; gchar *str; char *buffer; guint audio_start_mapping; guint midi_start_mapping, midi_end_mapping; guint audio_channel; guint input_pads; guint selected_pad; guint note_y; guint start_frame, end_frame; long seq_length; long velocity, pressure; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *selected_channel_mutex; pthread_mutex_t *link_mutex; route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(recall); delay_audio_run = route_lv2_audio_run->delay_audio_run; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio */ audio = AGS_RECALL_AUDIO_RUN(recall)->recall_audio->audio; /* audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get audio fields */ pthread_mutex_lock(audio_mutex); audio_start_mapping = audio->audio_start_mapping; midi_start_mapping = audio->midi_start_mapping; midi_end_mapping = audio->midi_end_mapping; channel = audio->input; input_pads = audio->input_pads; note_y = note->y; pthread_mutex_unlock(audio_mutex); /* channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio channel */ pthread_mutex_lock(channel_mutex); audio_channel = AGS_CHANNEL(AGS_RECYCLING(recall->recall_id->recycling)->channel)->audio_channel; pthread_mutex_unlock(channel_mutex); /* retrieve channel */ channel = ags_channel_nth(channel, audio_channel); if((AGS_AUDIO_REVERSE_MAPPING & (audio->flags)) != 0){ selected_channel = ags_channel_pad_nth(channel, audio_start_mapping + input_pads - note_y - 1); }else{ selected_channel = ags_channel_pad_nth(channel, audio_start_mapping + note_y); } /* selected channel mutex */ pthread_mutex_lock(application_mutex); selected_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) selected_channel); pthread_mutex_unlock(application_mutex); /* check within mapping */ pthread_mutex_lock(selected_channel_mutex); link = selected_channel->link; selected_pad = selected_channel->pad; pthread_mutex_unlock(selected_channel_mutex); /* check within mapping */ if(selected_pad - audio_start_mapping + midi_start_mapping < midi_start_mapping || selected_pad - audio_start_mapping + midi_start_mapping >= midi_end_mapping){ return; } /* link mutex */ if(link != NULL){ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); }else{ link_mutex = NULL; } /* get recall id */ child_recall_id = NULL; if(selected_channel != NULL){ if(link == NULL){ pthread_mutex_lock(selected_channel_mutex); list = selected_channel->recall_id; while(list != NULL){ if(AGS_RECALL_ID(list->data)->recycling_context->parent == AGS_RECALL(delay_audio_run)->recall_id->recycling_context){ child_recall_id = (AgsRecallID *) list->data; break; } list = list->next; } pthread_mutex_unlock(selected_channel_mutex); }else{ pthread_mutex_lock(link_mutex); list = link->recall_id; while(list != NULL){ if(AGS_RECALL_ID(list->data)->recycling_context->parent->parent == AGS_RECALL(delay_audio_run)->recall_id->recycling_context){ child_recall_id = (AgsRecallID *) list->data; break; } list = list->next; } pthread_mutex_unlock(link_mutex); } /* get lv2 run */ if(child_recall_id != NULL){ //FIXME:JK: use filename and effect to identify pthread_mutex_lock(selected_channel_mutex); list_recall = ags_recall_template_find_type(selected_channel->recall, AGS_TYPE_RECALL_LV2); channel_dummy = NULL; if(list_recall != NULL){ recall_lv2 = list_recall->data; channel_dummy = AGS_RECALL_CONTAINER(AGS_RECALL(list_recall->data)->container)->recall_channel_run; } while(channel_dummy != NULL){ if(AGS_RECALL(channel_dummy->data)->recall_id != NULL && AGS_RECALL(channel_dummy->data)->recall_id->recycling_context == child_recall_id->recycling_context){ recycling_dummy = AGS_RECALL(channel_dummy->data)->children; while(recycling_dummy != NULL){ lv2 = AGS_RECALL(recycling_dummy->data)->children; while(lv2 != NULL){ recall_lv2_run = AGS_RECALL_LV2_RUN(lv2->data); if(AGS_RECALL(recall_lv2_run)->rt_safe || recall_lv2_run->note == NULL){ /* prepend note */ // route_lv2_audio_run->feed_midi = g_list_prepend(route_lv2_audio_run->feed_midi, // note); recall_lv2_run->route_lv2_audio_run = (GObject *) route_lv2_audio_run; /* key on */ seq_event = (snd_seq_event_t *) malloc(sizeof(snd_seq_event_t)); memset(seq_event, 0, sizeof(snd_seq_event_t)); seq_event->type = SND_SEQ_EVENT_NOTEON; seq_event->data.note.channel = 0; seq_event->data.note.note = 0x7f & (selected_channel->pad - audio_start_mapping + midi_start_mapping); seq_event->data.note.velocity = 127; AGS_RECALL_AUDIO_SIGNAL(recall_lv2_run)->audio_channel = audio_channel; recall_lv2_run->note = g_list_prepend(recall_lv2_run->note, (GObject *) note); g_object_ref(note); /* write to port */ if((AGS_RECALL_LV2_HAS_ATOM_PORT & (recall_lv2->flags)) != 0){ ags_lv2_plugin_atom_sequence_append_midi(recall_lv2_run->atom_port, AGS_RECALL_LV2_DEFAULT_MIDI_LENGHT, seq_event, 1); }else if((AGS_RECALL_LV2_HAS_EVENT_PORT & (recall_lv2->flags)) != 0){ ags_lv2_plugin_event_buffer_append_midi(recall_lv2_run->event_port, AGS_RECALL_LV2_DEFAULT_MIDI_LENGHT, seq_event, 1); } free(seq_event); } lv2 = lv2->next; } recycling_dummy = recycling_dummy->next; } } channel_dummy = channel_dummy->next; } pthread_mutex_unlock(selected_channel_mutex); } } } void ags_route_lv2_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsRouteLv2AudioRun *route_lv2_audio_run) { GObject *soundcard; AgsAudio *audio; AgsChannel *selected_channel, *channel, *next_pad; AgsNotation *notation; AgsNote *note; AgsRouteLv2Audio *route_lv2_audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; AgsConfig *config; GList *current_position; GList *list; guint notation_counter; guint audio_channel; guint audio_start_mapping, audio_end_mapping; guint note_y; guint note_x0; guint i; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; auto void ags_route_lv2_audio_run_alloc_input_callback_feed_note(AgsNotation *notation); void ags_route_lv2_audio_run_alloc_input_callback_feed_note(AgsNotation *notation){ if(!AGS_IS_NOTATION(notation)){ return; } pthread_mutex_lock(audio_mutex); current_position = notation->notes; // start_loop pthread_mutex_unlock(audio_mutex); while(current_position != NULL){ pthread_mutex_lock(audio_mutex); audio_start_mapping = audio->audio_start_mapping; audio_end_mapping = audio->audio_end_mapping; note = AGS_NOTE(current_position->data); note_y = note->y; note_x0 = note->x[0]; pthread_mutex_unlock(audio_mutex); // g_message("--- %f %f ; %d %d", // note->stream_delay, delay, // note->x[0], route_lv2_audio_run->count_beats_audio_run->notation_counter); //FIXME:JK: should consider delay if(note_y >= audio_start_mapping && note_y < audio_end_mapping && note_x0 == notation_counter){ // && floor(note->stream_delay) == floor(delay) // g_object_ref(note); ags_route_lv2_audio_run_feed_midi((AgsRecall *) route_lv2_audio_run, note); }else if(note_x0 > notation_counter){ break; } current_position = current_position->next; } } if((guint) floor(delay) != 0){ // g_message("d %f", delay); return; } route_lv2_audio = AGS_ROUTE_LV2_AUDIO(AGS_RECALL_AUDIO_RUN(route_lv2_audio_run)->recall_audio); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); audio = AGS_RECALL_AUDIO(route_lv2_audio)->audio; /* audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) AGS_RECYCLING(AGS_RECALL(delay_audio_run)->recall_id->recycling)->channel); pthread_mutex_unlock(application_mutex); /* audio channel */ pthread_mutex_lock(channel_mutex); audio_channel = AGS_CHANNEL(AGS_RECYCLING(AGS_RECALL(delay_audio_run)->recall_id->recycling)->channel)->audio_channel; pthread_mutex_unlock(channel_mutex); /* feed note - first attempt */ notation = NULL; pthread_mutex_lock(audio_mutex); notation_counter = route_lv2_audio_run->count_beats_audio_run->notation_counter; route_lv2_audio_run->timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(notation_counter / AGS_NOTATION_DEFAULT_OFFSET); list = ags_notation_find_near_timestamp(audio->notation, audio_channel, route_lv2_audio_run->timestamp); if(list != NULL){ notation = list->data; } pthread_mutex_unlock(audio_mutex); ags_route_lv2_audio_run_alloc_input_callback_feed_note(notation); /* feed note - second attempt */ if(route_lv2_audio_run->timestamp->timer.ags_offset.offset != 0){ notation = NULL; route_lv2_audio_run->timestamp->timer.ags_offset.offset -= AGS_NOTATION_DEFAULT_OFFSET; pthread_mutex_lock(audio_mutex); list = ags_notation_find_near_timestamp(audio->notation, audio_channel, route_lv2_audio_run->timestamp); if(list != NULL){ notation = list->data; } pthread_mutex_unlock(audio_mutex); ags_route_lv2_audio_run_alloc_input_callback_feed_note(notation); } } void ags_route_lv2_audio_run_run_post(AgsRecall *recall) { AgsAudio *audio; AgsDelayAudio *delay_audio; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; AgsRouteLv2AudioRun *route_lv2_audio_run; AgsApplicationContext *application_context; AgsConfig *config; GObject *soundcard; AgsMutexManager *mutex_manager; gchar *str; guint buffer_size; gdouble bpm; gdouble notation_delay; gdouble x; GValue value = {0,}; pthread_mutex_t *application_mutex; route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(recall); delay_audio_run = route_lv2_audio_run->delay_audio_run; delay_audio = AGS_DELAY_AUDIO(AGS_RECALL_AUDIO_RUN(delay_audio_run)->recall_audio); count_beats_audio_run = route_lv2_audio_run->count_beats_audio_run; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); audio = AGS_RECALL_AUDIO_RUN(recall)->recall_audio->audio; soundcard = audio->soundcard; /* read config */ config = ags_config_get_instance(); pthread_mutex_lock(application_mutex); bpm = ags_soundcard_get_bpm(AGS_SOUNDCARD(soundcard)); /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); }else{ buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; } pthread_mutex_unlock(application_mutex); /* get notation delay */ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(delay_audio->notation_delay, &value); notation_delay = g_value_get_double(&value); g_value_unset(&value); /* */ x = (((count_beats_audio_run->notation_counter * notation_delay) + delay_audio_run->notation_counter) * buffer_size); route_lv2_audio_run->delta_time = x / 16.0 / bpm * 60.0 / ((USEC_PER_SEC * bpm / 4.0) / (4.0 * bpm) / USEC_PER_SEC); } void ags_route_lv2_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_RECALL_DEPENDENCY(file_lookup->ref)->dependency); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_route_lv2_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "xpath"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(AGS_IS_DELAY_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "delay-audio-run", id_ref->ref, NULL); }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "count-beats-audio-run", id_ref->ref, NULL); } } /** * ags_route_lv2_audio_run_new: * * Creates an #AgsRouteLv2AudioRun * * Returns: a new #AgsRouteLv2AudioRun * * Since: 1.0.0 */ AgsRouteLv2AudioRun* ags_route_lv2_audio_run_new() { AgsRouteLv2AudioRun *route_lv2_audio_run; route_lv2_audio_run = (AgsRouteLv2AudioRun *) g_object_new(AGS_TYPE_ROUTE_LV2_AUDIO_RUN, NULL); return(route_lv2_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_play_dssi_audio_run.h0000644000175000017500000000612613246707333021055 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PLAY_DSSI_AUDIO_RUN_H__ #define __AGS_PLAY_DSSI_AUDIO_RUN_H__ #include #include #include #include #include #include #include #include #include #define AGS_TYPE_PLAY_DSSI_AUDIO_RUN (ags_play_dssi_audio_run_get_type()) #define AGS_PLAY_DSSI_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_DSSI_AUDIO_RUN, AgsPlayDssiAudioRun)) #define AGS_PLAY_DSSI_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_DSSI_AUDIO_RUN, AgsPlayDssiAudioRun)) #define AGS_IS_PLAY_DSSI_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_DSSI_AUDIO_RUN)) #define AGS_IS_PLAY_DSSI_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_DSSI_AUDIO_RUN)) #define AGS_PLAY_DSSI_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_DSSI_AUDIO_RUN, AgsPlayDssiAudioRunClass)) #define AGS_PLAY_DSSI_AUDIO_DEFAULT_MIDI_LENGHT (8 * 256) typedef struct _AgsPlayDssiAudioRun AgsPlayDssiAudioRun; typedef struct _AgsPlayDssiAudioRunClass AgsPlayDssiAudioRunClass; /** * AgsPlayDssiAudioRunFlags: * @AGS_PLAY_DSSI_AUDIO_RUN_DEFAULT: not used * * Enum values to control the behavior or indicate internal state of #AgsPlayDssiAudioRun by * enable/disable as flags. */ typedef enum{ AGS_PLAY_DSSI_AUDIO_RUN_DEFAULT = 1, }AgsPlayDssiAudioRunFlags; struct _AgsPlayDssiAudioRun { AgsRecallAudioRun recall_audio_run; guint flags; LADSPA_Handle *ladspa_handle; unsigned long audio_channels; LADSPA_Data *input; LADSPA_Data *output; long delta_time; snd_seq_event_t **event_buffer; unsigned long *event_count; guint key_on; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GObject *destination; AgsNotation *notation; GList *offset; }; struct _AgsPlayDssiAudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_play_dssi_audio_run_get_type(); void ags_play_dssi_audio_run_load_ports(AgsPlayDssiAudioRun *play_dssi_audio_run); AgsPlayDssiAudioRun* ags_play_dssi_audio_run_new(); #endif /*__AGS_PLAY_DSSI_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_envelope_audio_signal.c0000644000175000017500000004021413247044247021342 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_envelope_audio_signal_class_init(AgsEnvelopeAudioSignalClass *envelope_audio_signal); void ags_envelope_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_envelope_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_envelope_audio_signal_init(AgsEnvelopeAudioSignal *envelope_audio_signal); void ags_envelope_audio_signal_connect(AgsConnectable *connectable); void ags_envelope_audio_signal_disconnect(AgsConnectable *connectable); void ags_envelope_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_envelope_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_envelope_audio_signal_finalize(GObject *gobject); void ags_envelope_audio_signal_run_inter(AgsRecall *recall); AgsRecall* ags_envelope_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_envelope_audio_signal * @short_description: envelopes audio signal * @title: AgsEnvelopeAudioSignal * @section_id: * @include: ags/audio/recall/ags_envelope_audio_signal.h * * The #AgsEnvelopeAudioSignal class envelopes the audio signal. */ static gpointer ags_envelope_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_envelope_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_envelope_audio_signal_parent_dynamic_connectable_interface; GType ags_envelope_audio_signal_get_type() { static GType ags_type_envelope_audio_signal = 0; if(!ags_type_envelope_audio_signal){ static const GTypeInfo ags_envelope_audio_signal_info = { sizeof (AgsEnvelopeAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_envelope_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsEnvelopeAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_envelope_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_envelope_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsEnvelopeAudioSignal", &ags_envelope_audio_signal_info, 0); g_type_add_interface_static(ags_type_envelope_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_envelope_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_envelope_audio_signal); } void ags_envelope_audio_signal_class_init(AgsEnvelopeAudioSignalClass *envelope_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; ags_envelope_audio_signal_parent_class = g_type_class_peek_parent(envelope_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) envelope_audio_signal; gobject->finalize = ags_envelope_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) envelope_audio_signal; recall->run_inter = ags_envelope_audio_signal_run_inter; recall->duplicate = ags_envelope_audio_signal_duplicate; } void ags_envelope_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_envelope_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_envelope_audio_signal_connect; connectable->disconnect = ags_envelope_audio_signal_disconnect; } void ags_envelope_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_envelope_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_envelope_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_envelope_audio_signal_disconnect_dynamic; } void ags_envelope_audio_signal_init(AgsEnvelopeAudioSignal *envelope_audio_signal) { AGS_RECALL(envelope_audio_signal)->name = "ags-envelope"; AGS_RECALL(envelope_audio_signal)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(envelope_audio_signal)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(envelope_audio_signal)->xml_type = "ags-envelope-audio-signal"; AGS_RECALL(envelope_audio_signal)->port = NULL; AGS_RECALL(envelope_audio_signal)->child_type = G_TYPE_NONE; envelope_audio_signal->frame_count = 0; } void ags_envelope_audio_signal_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_envelope_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_envelope_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_envelope_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_envelope_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_envelope_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_envelope_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_envelope_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_envelope_audio_signal_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_envelope_audio_signal_parent_class)->finalize(gobject); } AgsRecall* ags_envelope_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsEnvelopeAudioSignal *envelope; envelope = (AgsEnvelopeAudioSignal *) AGS_RECALL_CLASS(ags_envelope_audio_signal_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) envelope); } void ags_envelope_audio_signal_run_inter(AgsRecall *recall) { AgsEnvelopeChannel *envelope_channel; AgsEnvelopeAudioSignal *envelope_audio_signal; AgsAudioSignal *source; GList *note; AgsComplex *attack; AgsComplex *decay; AgsComplex *sustain; AgsComplex *release; AgsComplex *ratio; GList *stream_source; guint frame_count; guint buffer_size; gdouble delay; gdouble fixed_length; gdouble current_volume, current_ratio; guint i, j; gboolean use_note_length, use_fixed_length; GValue audio_value = {0,}; GValue channel_value = {0,}; GValue value = {0,}; auto gdouble ags_envelope_audio_signal_run_inter_get_ratio(guint x0, gdouble y0, guint x1, gdouble y1); auto gdouble ags_envelope_audio_signal_run_inter_get_volume(gdouble volume, gdouble ratio, guint start_x, guint current_x, guint length); gdouble ags_envelope_audio_signal_run_inter_get_ratio(guint x0, gdouble y0, guint x1, gdouble y1){ if(x1 - x0 == 0){ return(1.0); }else{ return((y1 - y0) / (x1 - x0)); } } gdouble ags_envelope_audio_signal_run_inter_get_volume(gdouble volume, gdouble ratio, guint start_x, guint current_x, guint length){ if(current_x - start_x == 0){ return(volume); }else{ return(volume + ratio * (length / (current_x - start_x))); } } AGS_RECALL_CLASS(ags_envelope_audio_signal_parent_class)->run_inter(recall); envelope_channel = AGS_ENVELOPE_CHANNEL(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); envelope_audio_signal = AGS_ENVELOPE_AUDIO_SIGNAL(recall); source = AGS_RECALL_AUDIO_SIGNAL(envelope_audio_signal)->source; stream_source = source->stream_current; if(stream_source == NULL){ ags_recall_done(recall); return; } /* get use note length port */ g_value_init(&value, G_TYPE_BOOLEAN); ags_port_safe_read(envelope_channel->use_note_length, &value); use_note_length = g_value_get_boolean(&value); g_value_unset(&value); /* get use fixed length port */ g_value_init(&value, G_TYPE_BOOLEAN); ags_port_safe_read(envelope_channel->use_fixed_length, &value); use_fixed_length = g_value_get_boolean(&value); g_value_unset(&value); note = source->note; /* initialize some control values */ delay = ags_soundcard_get_delay(AGS_SOUNDCARD(source->soundcard)); buffer_size = source->buffer_size; while(note != NULL){ if((AGS_NOTE_ENVELOPE & (AGS_NOTE(note->data)->flags)) != 0){ AgsNote *current; gdouble x0, y0; gdouble x1, y1; guint start_position; guint start_frame, first_frame, buffer_size; guint current_frame, current_buffer_size; guint offset, prev_offset; /* set frame count */ if(use_note_length){ frame_count = (AGS_NOTE(note->data)->x[1] - AGS_NOTE(note->data)->x[0]) * (delay * buffer_size); }else if(use_fixed_length){ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(envelope_channel->fixed_length, &value); fixed_length = g_value_get_double(&value); g_value_unset(&value); frame_count = fixed_length * (delay * buffer_size); } current = note->data; attack = &(current->attack); decay = &(current->decay); sustain = &(current->sustain); release = &(current->release); ratio = &(current->ratio); /* get offsets */ start_position = floor((delay * current->rt_offset) / frame_count); if(start_position == 0){ start_frame = 0; first_frame = source->first_frame; buffer_size = source->buffer_size - source->first_frame; }else{ start_frame = start_position * source->buffer_size - source->first_frame; first_frame = 0; buffer_size = source->buffer_size; } /* attack */ x0 = 0.0; y0 = ratio[0][1]; x1 = attack[0][0]; y1 = attack[0][1] + ratio[0][1]; offset = x1 * frame_count; current_frame = first_frame; if(offset >= start_frame){ if(current_frame + x1 * frame_count > buffer_size){ current_buffer_size = buffer_size - current_frame; }else{ if(x1 * frame_count > buffer_size){ current_buffer_size = buffer_size; }else{ current_buffer_size = x1 * frame_count; } } current_ratio = ags_envelope_audio_signal_run_inter_get_ratio(0, y0, x1 * frame_count, y1); current_volume = ags_envelope_audio_signal_run_inter_get_volume(y0, current_ratio, 0, start_frame, x1 * frame_count); ags_audio_buffer_util_envelope(stream_source->data + current_frame, 1, ags_audio_buffer_util_format_from_soundcard(source->format), current_buffer_size, current_volume, current_ratio); current_frame += current_buffer_size; } /* decay */ x0 = *attack[0]; y0 = *attack[1] + ratio[0][1]; x1 = *decay[0]; y1 = *decay[1] + ratio[0][1]; prev_offset = offset; offset += (x1 * frame_count); if(offset >= start_frame && prev_offset < start_frame + buffer_size){ if(current_frame + x1 * frame_count > buffer_size){ current_buffer_size = buffer_size - current_frame; }else{ if(x1 * frame_count > buffer_size){ current_buffer_size = buffer_size; }else{ current_buffer_size = x1 * frame_count; } } current_ratio = ags_envelope_audio_signal_run_inter_get_ratio(0, y0, x1 * frame_count, y1); current_volume = ags_envelope_audio_signal_run_inter_get_volume(y0, current_ratio, 0, prev_offset + current_frame, x1 * frame_count); ags_audio_buffer_util_envelope(stream_source->data + current_frame, 1, ags_audio_buffer_util_format_from_soundcard(source->format), current_buffer_size, current_volume, current_ratio); current_frame += current_buffer_size; } /* sustain */ x0 = *decay[0]; y0 = *decay[1] + ratio[0][1]; x1 = *sustain[0]; y1 = *sustain[1] + ratio[0][1]; prev_offset = offset; offset += (x1 * frame_count); if(offset >= start_frame && prev_offset < start_frame + buffer_size){ if(current_frame + x1 * frame_count > buffer_size){ current_buffer_size = buffer_size - current_frame; }else{ if(x1 * frame_count > buffer_size){ current_buffer_size = buffer_size; }else{ current_buffer_size = x1 * frame_count; } } current_ratio = ags_envelope_audio_signal_run_inter_get_ratio(0, y0, x1 * frame_count, y1); current_volume = ags_envelope_audio_signal_run_inter_get_volume(y0, current_ratio, 0, prev_offset + current_frame, x1 * frame_count); ags_audio_buffer_util_envelope(stream_source->data + current_frame, 1, ags_audio_buffer_util_format_from_soundcard(source->format), current_buffer_size, current_volume, current_ratio); current_frame += current_buffer_size; } /* release */ x0 = *sustain[0]; y0 = *sustain[1] + ratio[0][1]; x1 = *release[0]; y1 = *release[1] + ratio[0][1]; prev_offset = offset; offset += (x1 * frame_count); if(offset >= start_frame && prev_offset < start_frame + buffer_size){ if(current_frame + x1 * frame_count > buffer_size){ current_buffer_size = buffer_size - current_frame; }else{ if(x1 * frame_count > buffer_size){ current_buffer_size = buffer_size; }else{ current_buffer_size = x1 * frame_count; } } current_ratio = ags_envelope_audio_signal_run_inter_get_ratio(0, y0, x1 * frame_count, y1); current_volume = ags_envelope_audio_signal_run_inter_get_volume(y0, current_ratio, 0, prev_offset + current_frame, x1 * frame_count); ags_audio_buffer_util_envelope(stream_source->data + current_frame, 1, ags_audio_buffer_util_format_from_soundcard(source->format), current_buffer_size, current_volume, current_ratio); current_frame += current_buffer_size; } } note = note->next; } } /** * ags_envelope_audio_signal_new: * @source: the source #AgsAudioSignal * * Creates an #AgsEnvelopeAudioSignal * * Returns: a new #AgsEnvelopeAudioSignal * * Since: 1.0.0 */ AgsEnvelopeAudioSignal* ags_envelope_audio_signal_new(AgsAudioSignal *source) { AgsEnvelopeAudioSignal *envelope_audio_signal; envelope_audio_signal = (AgsEnvelopeAudioSignal *) g_object_new(AGS_TYPE_ENVELOPE_AUDIO_SIGNAL, "source", source, NULL); return(envelope_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_buffer_channel.h0000644000175000017500000000372113246707333017760 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_BUFFER_CHANNEL_H__ #define __AGS_BUFFER_CHANNEL_H__ #include #include #include #define AGS_TYPE_BUFFER_CHANNEL (ags_buffer_channel_get_type()) #define AGS_BUFFER_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BUFFER_CHANNEL, AgsBufferChannel)) #define AGS_BUFFER_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_BUFFER_CHANNEL, AgsBufferChannelClass)) #define AGS_IS_BUFFER_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_BUFFER_CHANNEL)) #define AGS_IS_BUFFER_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_BUFFER_CHANNEL)) #define AGS_BUFFER_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_BUFFER_CHANNEL, AgsBufferChannelClass)) typedef struct _AgsBufferChannel AgsBufferChannel; typedef struct _AgsBufferChannelClass AgsBufferChannelClass; struct _AgsBufferChannel { AgsRecallChannel recall_channel; AgsPort *muted; }; struct _AgsBufferChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_buffer_channel_get_type(); AgsBufferChannel* ags_buffer_channel_new(); #endif /*__AGS_BUFFER_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_audio_file.c0000644000175000017500000002344113246707333020140 00000000000000/* 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 . */ #include #include #include #include void ags_play_audio_file_class_init(AgsPlayAudioFileClass *play_audio_file); void ags_play_audio_file_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_audio_file_init(AgsPlayAudioFile *play_audio_file); void ags_play_audio_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_play_audio_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_play_audio_file_connect(AgsConnectable *connectable); void ags_play_audio_file_disconnect(AgsConnectable *connectable); void ags_play_audio_file_finalize(GObject *gobject); void ags_play_audio_file_run_inter(AgsRecall *recall); void ags_play_audio_file_remove(AgsRecall *recall); void ags_play_audio_file_cancel(AgsRecall *recall); enum{ PROP_0, PROP_SOUNDCARD, PROP_AUDIO_FILE, PROP_CURRENT_FRAME, }; static gpointer ags_play_audio_file_parent_class = NULL; static AgsConnectableInterface *ags_play_audio_file_parent_connectable_interface; GType ags_play_audio_file_get_type() { static GType ags_type_play_audio_file = 0; if(!ags_type_play_audio_file){ static const GTypeInfo ags_play_audio_file_info = { sizeof (AgsPlayAudioFileClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_audio_file_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayAudioFile), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_audio_file_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_audio_file_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_audio_file = g_type_register_static(AGS_TYPE_RECALL, "AgsPlayAudioFile", &ags_play_audio_file_info, 0); g_type_add_interface_static(ags_type_play_audio_file, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_play_audio_file); } void ags_play_audio_file_class_init(AgsPlayAudioFileClass *play_audio_file) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_play_audio_file_parent_class = g_type_class_peek_parent(play_audio_file); /* GObjectClass */ gobject = (GObjectClass *) play_audio_file; gobject->set_property = ags_play_audio_file_set_property; gobject->get_property = ags_play_audio_file_get_property; gobject->finalize = ags_play_audio_file_finalize; /* properties */ param_spec = g_param_spec_gtype("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard this recall is assigned to"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); param_spec = g_param_spec_gtype("audio_file", i18n_pspec("assigned audio file"), i18n_pspec("The audio file this recall is assigned to"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_FILE, param_spec); param_spec = g_param_spec_gtype("current", i18n_pspec("current frame"), i18n_pspec("The current frame this recall is playing"), G_TYPE_UINT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CURRENT_FRAME, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) play_audio_file; recall->run_inter = ags_play_audio_file_run_inter; recall->remove = ags_play_audio_file_remove; recall->cancel = ags_play_audio_file_cancel; } void ags_play_audio_file_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_audio_file_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_audio_file_connect; connectable->disconnect = ags_play_audio_file_disconnect; } void ags_play_audio_file_init(AgsPlayAudioFile *play_audio_file) { play_audio_file->audio_file = NULL; play_audio_file->current_frame = 0; play_audio_file->soundcard = NULL; } void ags_play_audio_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayAudioFile *play_audio_file; play_audio_file = AGS_PLAY_AUDIO_FILE(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(play_audio_file->soundcard == soundcard) return; if(play_audio_file->soundcard != NULL) g_object_unref(play_audio_file->soundcard); if(soundcard != NULL) g_object_ref(soundcard); play_audio_file->soundcard = soundcard; } break; case PROP_AUDIO_FILE: { AgsAudioFile *audio_file; audio_file = (AgsAudioFile *) g_value_get_object(value); if(play_audio_file->audio_file == audio_file) return; if(play_audio_file->audio_file != NULL) g_object_unref(play_audio_file->audio_file); if(play_audio_file != NULL) g_object_ref(play_audio_file); play_audio_file->audio_file = audio_file; } break; case PROP_CURRENT_FRAME: { play_audio_file->current_frame = (guint) g_value_get_uint(value); /* * TODO:JK: implement seeking over the buffer */ } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_audio_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayAudioFile *play_audio_file; play_audio_file = AGS_PLAY_AUDIO_FILE(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, play_audio_file->soundcard); } break; case PROP_AUDIO_FILE: { g_value_set_object(value, play_audio_file->audio_file); } break; case PROP_CURRENT_FRAME: { g_value_set_uint(value, play_audio_file->current_frame); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_audio_file_connect(AgsConnectable *connectable) { ags_play_audio_file_parent_connectable_interface->connect(connectable); /* empty */ } void ags_play_audio_file_disconnect(AgsConnectable *connectable) { ags_play_audio_file_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_play_audio_file_finalize(GObject *gobject) { AgsPlayAudioFile *play_audio_file; play_audio_file = AGS_PLAY_AUDIO_FILE(gobject); g_object_unref(G_OBJECT(play_audio_file->audio_file)); g_object_unref(G_OBJECT(play_audio_file->soundcard)); G_OBJECT_CLASS(ags_play_audio_file_parent_class)->finalize(gobject); } void ags_play_audio_file_run_inter(AgsRecall *recall) { /* DEPRECATED AgsPlayAudioFile *play_audio_file; signed short *buffer; guint i0, i1, j, stop; gboolean play_done; AGS_RECALL_CLASS(ags_play_audio_file_parent_class)->run_inter(recall); play_audio_file = (AgsPlayAudioFile *) recall; if((AGS_SOUNDCARD_BUFFER0 & play_audio_file->soundcard->flags) != 0){ buffer = play_audio_file->soundcard->buffer[1]; }else if((AGS_SOUNDCARD_BUFFER1 & play_audio_file->soundcard->flags) != 0){ buffer = play_audio_file->soundcard->buffer[2]; }else if((AGS_SOUNDCARD_BUFFER2 & play_audio_file->soundcard->flags) != 0){ buffer = play_audio_file->soundcard->buffer[3]; }else if((AGS_SOUNDCARD_BUFFER3 & play_audio_file->soundcard->flags) != 0){ buffer = play_audio_file->soundcard->buffer[0]; } i0 = play_audio_file->current_frame; stop = i0 + play_audio_file->soundcard->buffer_size; if(stop < play_audio_file->audio_file->frames) play_done = FALSE; else{ stop = play_audio_file->audio_file->frames; play_done = TRUE; } for(i1 = 0; i0 < stop; i0++, i1++){ for(j = 0; j < play_audio_file->audio_file->channels || j < play_audio_file->soundcard->dsp_channels; j++) buffer[i1 * play_audio_file->soundcard->dsp_channels + j] = ((buffer[i1 * play_audio_file->soundcard->dsp_channels + j]) / 2) + ((play_audio_file->audio_file->buffer[i0 * play_audio_file->audio_file->channels + j]) / 2); } play_audio_file->current_frame = i0; if(play_done) ags_recall_done(recall); */ } void ags_play_audio_file_remove(AgsRecall *recall) { AGS_RECALL_CLASS(ags_play_audio_file_parent_class)->remove(recall); } void ags_play_audio_file_cancel(AgsRecall *recall) { AGS_RECALL_CLASS(ags_play_audio_file_parent_class)->cancel(recall); } AgsPlayAudioFile* ags_play_audio_file_new(AgsAudioFile *audio_file, GObject *soundcard) { AgsPlayAudioFile *play_audio_file; play_audio_file = (AgsPlayAudioFile *) g_object_new(AGS_TYPE_PLAY_AUDIO_FILE, "audio_file", audio_file, "soundcard", soundcard, NULL); return(play_audio_file); } gsequencer-1.4.24/ags/audio/recall/ags_envelope_recycling.h0000644000175000017500000000422013246707333020666 00000000000000/* 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 . */ #ifndef __AGS_ENVELOPE_RECYCLING_H__ #define __AGS_ENVELOPE_RECYCLING_H__ #include #include #include #include #include #define AGS_TYPE_ENVELOPE_RECYCLING (ags_envelope_recycling_get_type()) #define AGS_ENVELOPE_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ENVELOPE_RECYCLING, AgsEnvelopeRecycling)) #define AGS_ENVELOPE_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ENVELOPE_RECYCLING, AgsEnvelopeRecyclingClass)) #define AGS_IS_ENVELOPE_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ENVELOPE_RECYCLING)) #define AGS_IS_ENVELOPE_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ENVELOPE_RECYCLING)) #define AGS_ENVELOPE_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_ENVELOPE_RECYCLING, AgsEnvelopeRecyclingClass)) typedef struct _AgsEnvelopeRecycling AgsEnvelopeRecycling; typedef struct _AgsEnvelopeRecyclingClass AgsEnvelopeRecyclingClass; struct _AgsEnvelopeRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsEnvelopeRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_envelope_recycling_get_type(); AgsEnvelopeRecycling* ags_envelope_recycling_new(AgsRecycling *source); #endif /*__AGS_ENVELOPE_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_feed_channel.h0000644000175000017500000000361013246707333017407 00000000000000/* 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 . */ #ifndef __AGS_FEED_CHANNEL_H__ #define __AGS_FEED_CHANNEL_H__ #include #include #include #define AGS_TYPE_FEED_CHANNEL (ags_feed_channel_get_type()) #define AGS_FEED_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FEED_CHANNEL, AgsFeedChannel)) #define AGS_FEED_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FEED_CHANNEL, AgsFeedChannelClass)) #define AGS_IS_FEED_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FEED_CHANNEL)) #define AGS_IS_FEED_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FEED_CHANNEL)) #define AGS_FEED_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_FEED_CHANNEL, AgsFeedChannelClass)) typedef struct _AgsFeedChannel AgsFeedChannel; typedef struct _AgsFeedChannelClass AgsFeedChannelClass; struct _AgsFeedChannel { AgsRecallChannel recall_channel; }; struct _AgsFeedChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_feed_channel_get_type(); AgsFeedChannel* ags_feed_channel_new(); #endif /*__AGS_FEED_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_lv2_audio_run.h0000644000175000017500000000605713246707333020621 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PLAY_LV2_AUDIO_RUN_H__ #define __AGS_PLAY_LV2_AUDIO_RUN_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_PLAY_LV2_AUDIO_RUN (ags_play_lv2_audio_run_get_type()) #define AGS_PLAY_LV2_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_LV2_AUDIO_RUN, AgsPlayLv2AudioRun)) #define AGS_PLAY_LV2_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_LV2_AUDIO_RUN, AgsPlayLv2AudioRun)) #define AGS_IS_PLAY_LV2_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_LV2_AUDIO_RUN)) #define AGS_IS_PLAY_LV2_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_LV2_AUDIO_RUN)) #define AGS_PLAY_LV2_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_LV2_AUDIO_RUN, AgsPlayLv2AudioRunClass)) #define AGS_PLAY_LV2_AUDIO_DEFAULT_MIDI_LENGHT (8 * 256) typedef struct _AgsPlayLv2AudioRun AgsPlayLv2AudioRun; typedef struct _AgsPlayLv2AudioRunClass AgsPlayLv2AudioRunClass; /** * AgsPlayLv2AudioRunFlags: * @AGS_PLAY_LV2_AUDIO_RUN_DEFAULT: not used * * Enum values to control the behavior or indicate internal state of #AgsPlayLv2AudioRun by * enable/disable as flags. */ typedef enum{ AGS_PLAY_LV2_AUDIO_RUN_DEFAULT = 1, }AgsPlayLv2AudioRunFlags; struct _AgsPlayLv2AudioRun { AgsRecallAudioRun recall_audio_run; guint flags; LV2_Handle *lv2_handle; float *input; float *output; void *event_port; void *atom_port; guint key_on; long delta_time; snd_seq_event_t **event_buffer; unsigned long *event_count; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GObject *destination; AgsNotation *notation; GList *offset; GObject *worker_handle; }; struct _AgsPlayLv2AudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_play_lv2_audio_run_get_type(); void ags_play_lv2_audio_run_load_ports(AgsPlayLv2AudioRun *play_lv2_audio_run); AgsPlayLv2AudioRun* ags_play_lv2_audio_run_new(); #endif /*__AGS_PLAY_LV2_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_volume_channel.c0000644000175000017500000002363713247044247020020 00000000000000/* 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 . */ #include #include #include #include void ags_volume_channel_class_init(AgsVolumeChannelClass *volume_channel); void ags_volume_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_volume_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_volume_channel_init(AgsVolumeChannel *volume_channel); void ags_volume_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_volume_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_volume_channel_connect(AgsConnectable *connectable); void ags_volume_channel_disconnect(AgsConnectable *connectable); void ags_volume_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_volume_channel_dispose(GObject *gobject); void ags_volume_channel_finalize(GObject *gobject); static AgsPortDescriptor* ags_volume_channel_get_volume_port_descriptor(); /** * SECTION:ags_volume_channel * @short_description: volumes channel * @title: AgsVolumeChannel * @section_id: * @include: ags/audio/recall/ags_volume_channel.h * * The #AgsVolumeChannel class provides ports to the effect processor. */ enum{ PROP_0, PROP_VOLUME, }; static gpointer ags_volume_channel_parent_class = NULL; static AgsConnectableInterface *ags_volume_channel_parent_connectable_interface; static const gchar *ags_volume_channel_plugin_name = "ags-volume"; static const gchar *ags_volume_channel_specifier[] = { "./volume[0]" }; static const gchar *ags_volume_channel_control_port[] = { "1/1" }; GType ags_volume_channel_get_type() { static GType ags_type_volume_channel = 0; if(!ags_type_volume_channel){ static const GTypeInfo ags_volume_channel_info = { sizeof (AgsVolumeChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_volume_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsVolumeChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_volume_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_volume_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_volume_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_volume_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsVolumeChannel", &ags_volume_channel_info, 0); g_type_add_interface_static(ags_type_volume_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_volume_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_volume_channel); } void ags_volume_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_volume_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_volume_channel_connect; connectable->disconnect = ags_volume_channel_disconnect; } void ags_volume_channel_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_volume_channel_set_ports; } void ags_volume_channel_class_init(AgsVolumeChannelClass *volume_channel) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_volume_channel_parent_class = g_type_class_peek_parent(volume_channel); /* GObjectClass */ gobject = (GObjectClass *) volume_channel; gobject->set_property = ags_volume_channel_set_property; gobject->get_property = ags_volume_channel_get_property; gobject->dispose = ags_volume_channel_dispose; gobject->finalize = ags_volume_channel_finalize; /* properties */ /** * AgsVolumeChannel:volume: * * The volume port. * * Since: 1.0.0 */ param_spec = g_param_spec_object("volume", i18n_pspec("volume to apply"), i18n_pspec("The volume to apply on the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_VOLUME, param_spec); } void ags_volume_channel_init(AgsVolumeChannel *volume_channel) { GList *port; AGS_RECALL(volume_channel)->name = "ags-volume"; AGS_RECALL(volume_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(volume_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(volume_channel)->xml_type = "ags-volume-channel"; /* initialize the port */ port = NULL; /* volume */ volume_channel->volume = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-volume", "specifier", "./volume[0]", "control-port", "1/1", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, "port-value-size", sizeof(gfloat), "port-value-length", 1, NULL); g_object_ref(volume_channel->volume); volume_channel->volume->port_value.ags_port_float = 1.0; /* port descriptor */ volume_channel->volume->port_descriptor = ags_volume_channel_get_volume_port_descriptor(); /* add to port */ port = g_list_prepend(port, volume_channel->volume); g_object_ref(volume_channel->volume); /* set port */ AGS_RECALL(volume_channel)->port = port; } void ags_volume_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsVolumeChannel *volume_channel; volume_channel = AGS_VOLUME_CHANNEL(gobject); switch(prop_id){ case PROP_VOLUME: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == volume_channel->volume){ return; } if(volume_channel->volume != NULL){ g_object_unref(G_OBJECT(volume_channel->volume)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } volume_channel->volume = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_volume_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsVolumeChannel *volume_channel; volume_channel = AGS_VOLUME_CHANNEL(gobject); switch(prop_id){ case PROP_VOLUME: { g_value_set_object(value, volume_channel->volume); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_volume_channel_connect(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } /* load automation */ ags_recall_load_automation(recall, g_list_copy(recall->port)); /* call parent */ ags_volume_channel_parent_connectable_interface->connect(connectable); } void ags_volume_channel_disconnect(AgsConnectable *connectable) { ags_volume_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_volume_channel_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./volume[0]", 12)){ g_object_set(G_OBJECT(plugin), "volume", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_volume_channel_dispose(GObject *gobject) { AgsVolumeChannel *volume_channel; volume_channel = AGS_VOLUME_CHANNEL(gobject); /* volume */ if(volume_channel->volume != NULL){ g_object_unref(G_OBJECT(volume_channel->volume)); } /* call parent */ G_OBJECT_CLASS(ags_volume_channel_parent_class)->dispose(gobject); } void ags_volume_channel_finalize(GObject *gobject) { AgsVolumeChannel *volume_channel; volume_channel = AGS_VOLUME_CHANNEL(gobject); /* volume */ if(volume_channel->volume != NULL){ g_object_unref(G_OBJECT(volume_channel->volume)); } /* call parent */ G_OBJECT_CLASS(ags_volume_channel_parent_class)->finalize(gobject); } static AgsPortDescriptor* ags_volume_channel_get_volume_port_descriptor() { static AgsPortDescriptor *port_descriptor = NULL; if(port_descriptor == NULL){ port_descriptor = ags_port_descriptor_alloc(); port_descriptor->flags |= (AGS_PORT_DESCRIPTOR_INPUT | AGS_PORT_DESCRIPTOR_CONTROL); port_descriptor->port_index = 0; /* range */ g_value_init(port_descriptor->default_value, G_TYPE_FLOAT); g_value_init(port_descriptor->lower_value, G_TYPE_FLOAT); g_value_init(port_descriptor->upper_value, G_TYPE_FLOAT); g_value_set_float(port_descriptor->default_value, 1.0); g_value_set_float(port_descriptor->lower_value, 0.0); g_value_set_float(port_descriptor->upper_value, 2.0); } return(port_descriptor); } /** * ags_volume_channel_new: * * Creates an #AgsVolumeChannel * * Returns: a new #AgsVolumeChannel * * Since: 1.0.0 */ AgsVolumeChannel* ags_volume_channel_new() { AgsVolumeChannel *volume_channel; volume_channel = (AgsVolumeChannel *) g_object_new(AGS_TYPE_VOLUME_CHANNEL, NULL); return(volume_channel); } gsequencer-1.4.24/ags/audio/recall/ags_play_audio_file.h0000644000175000017500000000413713246707333020146 00000000000000/* 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 . */ #ifndef __AGS_PLAY_AUDIO_FILE_H__ #define __AGS_PLAY_AUDIO_FILE_H__ #include #include #include #include #include #define AGS_TYPE_PLAY_AUDIO_FILE (ags_play_audio_file_get_type()) #define AGS_PLAY_AUDIO_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_AUDIO_FILE, AgsPlayAudioFile)) #define AGS_PLAY_AUDIO_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AgsPlayAudioFileClass)) #define AGS_IS_PLAY_AUDIO_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_AUDIO_FILE)) #define AGS_IS_PLAY_AUDIO_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_AUDIO_FILE)) #define AGS_PLAY_AUDIO_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_AUDIO_FILE, AgsPlayAudioFileClass)) typedef struct _AgsPlayAudioFile AgsPlayAudioFile; typedef struct _AgsPlayAudioFileClass AgsPlayAudioFileClass; struct _AgsPlayAudioFile { AgsRecall recall; AgsAudioFile *audio_file; guint current_frame; GObject *soundcard; }; struct _AgsPlayAudioFileClass { AgsRecallClass recall; }; GType ags_play_audio_file_get_type(); AgsPlayAudioFile* ags_play_audio_file_new(AgsAudioFile *audio_file, GObject *soundcard); #endif /*__AGS_PLAY_AUDIO_FILE_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_route_lv2_audio_run.h0000644000175000017500000000500413247044247021000 00000000000000/* 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 . */ #ifndef __AGS_ROUTE_LV2_AUDIO_RUN_H__ #define __AGS_ROUTE_LV2_AUDIO_RUN_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_ROUTE_LV2_AUDIO_RUN (ags_route_lv2_audio_run_get_type()) #define AGS_ROUTE_LV2_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ROUTE_LV2_AUDIO_RUN, AgsRouteLv2AudioRun)) #define AGS_ROUTE_LV2_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ROUTE_LV2_AUDIO_RUN, AgsRouteLv2AudioRun)) #define AGS_IS_ROUTE_LV2_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ROUTE_LV2_AUDIO_RUN)) #define AGS_IS_ROUTE_LV2_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ROUTE_LV2_AUDIO_RUN)) #define AGS_ROUTE_LV2_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_ROUTE_LV2_AUDIO_RUN, AgsRouteLv2AudioRunClass)) typedef struct _AgsRouteLv2AudioRun AgsRouteLv2AudioRun; typedef struct _AgsRouteLv2AudioRunClass AgsRouteLv2AudioRunClass; struct _AgsRouteLv2AudioRun { AgsRecallAudioRun recall_audio_run; AgsDelayAudioRun *delay_audio_run; gulong notation_alloc_input_handler; AgsCountBeatsAudioRun *count_beats_audio_run; AgsNotation *notation; AgsTimestamp *timestamp; GObject *sequencer; GList *feed_midi; long delta_time; }; struct _AgsRouteLv2AudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_route_lv2_audio_run_get_type(); AgsRouteLv2AudioRun* ags_route_lv2_audio_run_new(); #endif /*__AGS_ROUTE_LV2_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_loop_channel_run.h0000644000175000017500000000453513246707333020350 00000000000000/* 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 . */ #ifndef __AGS_LOOP_CHANNEL_RUN_H__ #define __AGS_LOOP_CHANNEL_RUN_H__ #include #include #include #include #include #include #define AGS_TYPE_LOOP_CHANNEL_RUN (ags_loop_channel_run_get_type()) #define AGS_LOOP_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LOOP_CHANNEL_RUN, AgsLoopChannelRun)) #define AGS_LOOP_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LOOP_CHANNEL_RUN, AgsLoopChannelRunClass)) #define AGS_IS_LOOP_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LOOP_CHANNEL_RUN)) #define AGS_IS_LOOP_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LOOP_CHANNEL_RUN)) #define AGS_LOOP_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LOOP_CHANNEL_RUN, AgsLoopChannelRunClass)) typedef struct _AgsLoopChannelRun AgsLoopChannelRun; typedef struct _AgsLoopChannelRunClass AgsLoopChannelRunClass; struct _AgsLoopChannelRun { AgsRecallChannelRun recall_channel_run; AgsCountBeatsAudioRun *count_beats_audio_run; gulong start_handler; gulong loop_handler; gulong stop_handler; }; struct _AgsLoopChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_loop_channel_run_get_type(); AgsLoopChannelRun* ags_loop_channel_run_new(AgsChannel *channel, AgsCountBeatsAudioRun *count_beats_audio_run, gboolean is_template); #endif /*__AGS_LOOP_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_dssi_audio.c0000644000175000017500000004530513246707333020166 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_play_dssi_audio_class_init(AgsPlayDssiAudioClass *play_dssi_audio); void ags_play_dssi_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_dssi_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_play_dssi_audio_init(AgsPlayDssiAudio *play_dssi_audio); void ags_play_dssi_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_play_dssi_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_play_dssi_audio_finalize(GObject *gobject); void ags_play_dssi_audio_connect(AgsConnectable *connectable); void ags_play_dssi_audio_disconnect(AgsConnectable *connectable); void ags_play_dssi_audio_set_ports(AgsPlugin *plugin, GList *port); /** * SECTION:ags_play_dssi_audio * @short_description: play audio dssi * @title: AgsPlayDssiAudio * @section_id: * @include: ags/audio/recall/ags_play_dssi_audio.h * * The #AgsPlayDssiAudio class provides ports to the effect processor. */ enum{ PROP_0, PROP_FILENAME, PROP_EFFECT, PROP_INDEX, }; static gpointer ags_play_dssi_audio_parent_class = NULL; static AgsConnectableInterface* ags_play_dssi_audio_parent_connectable_interface; static AgsPluginInterface *ags_play_dssi_parent_plugin_interface; static const gchar *ags_play_dssi_audio_plugin_name = "ags-play-dssi"; static const gchar *ags_play_dssi_audio_specifier[] = { }; static const gchar *ags_play_dssi_audio_control_port[] = { }; GType ags_play_dssi_audio_get_type() { static GType ags_type_play_dssi_audio = 0; if(!ags_type_play_dssi_audio){ static const GTypeInfo ags_play_dssi_audio_info = { sizeof (AgsPlayDssiAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_dssi_audio_class_init, NULL, /* class_finalize */ NULL, /* class_audio */ sizeof (AgsPlayDssiAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_dssi_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_dssi_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_play_dssi_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_dssi_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsPlayDssiAudio", &ags_play_dssi_audio_info, 0); g_type_add_interface_static(ags_type_play_dssi_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_dssi_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_play_dssi_audio); } void ags_play_dssi_audio_class_init(AgsPlayDssiAudioClass *play_dssi_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_play_dssi_audio_parent_class = g_type_class_peek_parent(play_dssi_audio); /* GObjectClass */ gobject = (GObjectClass *) play_dssi_audio; gobject->set_property = ags_play_dssi_audio_set_property; gobject->get_property = ags_play_dssi_audio_get_property; gobject->finalize = ags_play_dssi_audio_finalize; /* properties */ /** * AgsPlayDssiAudio:filename: * * The plugins filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the object file"), i18n_pspec("The filename as string of object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsPlayDssiAudio:effect: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsPlayDssiAudio:index: * * The effect's index. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("index", i18n_pspec("index of effect"), i18n_pspec("The numerical index of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); } void ags_play_dssi_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_dssi_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_dssi_audio_connect; connectable->disconnect = ags_play_dssi_audio_disconnect; } void ags_play_dssi_audio_plugin_interface_init(AgsPluginInterface *plugin) { ags_play_dssi_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->set_ports = ags_play_dssi_audio_set_ports; } void ags_play_dssi_audio_init(AgsPlayDssiAudio *play_dssi_audio) { GList *port; AGS_RECALL(play_dssi_audio)->name = "ags-play-dssi"; AGS_RECALL(play_dssi_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_dssi_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_dssi_audio)->xml_type = "ags-play-dssi-audio"; play_dssi_audio->filename = NULL; play_dssi_audio->effect = NULL; play_dssi_audio->index = 0; play_dssi_audio->bank = 0; play_dssi_audio->program = 0; play_dssi_audio->plugin_descriptor = NULL; play_dssi_audio->input_port = NULL; play_dssi_audio->input_lines = 0; play_dssi_audio->output_port = NULL; play_dssi_audio->output_lines = 0; } void ags_play_dssi_audio_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_play_dssi_audio_parent_class)->finalize(gobject); } void ags_play_dssi_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayDssiAudio *play_dssi_audio; play_dssi_audio = AGS_PLAY_DSSI_AUDIO(gobject); switch(prop_id){ case PROP_FILENAME: { GObject *soundcard; gchar *filename; filename = g_value_get_string(value); if(filename == play_dssi_audio->filename){ return; } if(play_dssi_audio->filename != NULL){ g_free(play_dssi_audio->filename); } play_dssi_audio->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == play_dssi_audio->effect){ return; } play_dssi_audio->effect = g_strdup(effect); } break; case PROP_INDEX: { unsigned long index; index = g_value_get_ulong(value); if(index == play_dssi_audio->index){ return; } play_dssi_audio->index = index; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_play_dssi_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayDssiAudio *play_dssi_audio; play_dssi_audio = AGS_PLAY_DSSI_AUDIO(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, play_dssi_audio->filename); } break; case PROP_EFFECT: { g_value_set_string(value, play_dssi_audio->effect); } break; case PROP_INDEX: { g_value_set_uint(value, play_dssi_audio->index); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_dssi_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ port = port->next; } } void ags_play_dssi_audio_connect(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } ags_recall_load_automation(recall, g_list_copy(recall->port)); ags_play_dssi_audio_parent_connectable_interface->connect(connectable); } void ags_play_dssi_audio_disconnect(AgsConnectable *connectable) { ags_play_dssi_audio_parent_connectable_interface->disconnect(connectable); } void ags_play_dssi_audio_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsPlayDssiAudio *gobject; AgsDssiPlugin *dssi_plugin; gchar *filename, *effect; unsigned long index; gobject = AGS_PLAY_DSSI_AUDIO(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); filename = xmlGetProp(node, "filename"); effect = xmlGetProp(node, "effect"); index = g_ascii_strtoull(xmlGetProp(node, "index"), NULL, 10); g_object_set(gobject, "filename", filename, "effect", effect, "index", index, NULL); ags_play_dssi_audio_load(gobject); } xmlNode* ags_play_dssi_audio_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsPlayDssiAudio *play_dssi_audio; xmlNode *node; gchar *id; play_dssi_audio = AGS_PLAY_DSSI_AUDIO(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-recall-dssi"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", play_dssi_audio, NULL)); xmlNewProp(node, "filename", g_strdup(play_dssi_audio->filename)); xmlNewProp(node, "effect", g_strdup(play_dssi_audio->effect)); xmlNewProp(node, "index", g_strdup_printf("%lu", play_dssi_audio->index)); xmlAddChild(parent, node); return(node); } /** * ags_play_dssi_audio_load: * @play_dssi_audio: an #AgsPlayDssiAudio * * Set up DSSI handle. * * Since: 1.0.0 */ void ags_play_dssi_audio_load(AgsPlayDssiAudio *play_dssi_audio) { AgsDssiPlugin *dssi_plugin; void *plugin_so; DSSI_Descriptor_Function dssi_descriptor; DSSI_Descriptor *plugin_descriptor; /* */ dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), play_dssi_audio->filename, play_dssi_audio->effect); plugin_so = AGS_BASE_PLUGIN(dssi_plugin)->plugin_so; if(plugin_so){ dssi_descriptor = (DSSI_Descriptor_Function) dlsym(plugin_so, "dssi_descriptor"); if(dlerror() == NULL && dssi_descriptor){ play_dssi_audio->plugin_descriptor = plugin_descriptor = dssi_descriptor(play_dssi_audio->index); } } } /** * ags_play_dssi_audio_load_ports: * @play_dssi_audio: an #AgsPlayDssiAudio * * Set up DSSI ports. * * Returns: a #GList containing #AgsPort. * * Since: 1.0.0 */ GList* ags_play_dssi_audio_load_ports(AgsPlayDssiAudio *play_dssi_audio) { AgsDssiPlugin *dssi_plugin; AgsPort *current; GList *port; GList *port_descriptor; unsigned long port_count; unsigned long i; dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), play_dssi_audio->filename, play_dssi_audio->effect); port = NULL; port_descriptor = AGS_BASE_PLUGIN(dssi_plugin)->port; if(port_descriptor != NULL){ port_count = g_list_length(port_descriptor); for(i = 0; i < port_count; i++){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ gchar *plugin_name; gchar *specifier; plugin_name = g_strdup_printf("dssi-%lu", dssi_plugin->unique_id); specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; current = g_object_new(AGS_TYPE_PORT, "plugin-name", plugin_name, "specifier", specifier, "control-port", g_strdup_printf("%lu/%lu", i, port_count), "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, NULL); g_object_ref(current); current->flags |= AGS_PORT_USE_LADSPA_FLOAT; if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ AGS_RECALL(play_dssi_audio)->flags |= AGS_RECALL_HAS_OUTPUT_PORT; current->flags |= AGS_PORT_IS_OUTPUT; }else{ if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0 && (AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0){ current->flags |= AGS_PORT_INFINITE_RANGE; } } current->port_descriptor = port_descriptor->data; ags_play_dssi_audio_load_conversion(play_dssi_audio, (GObject *) current, port_descriptor->data); current->port_value.ags_port_ladspa = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value); // g_message("connecting port: %d/%d %f", i, port_count, current->port_value.ags_port_float); port = g_list_prepend(port, current); }else if((AGS_PORT_DESCRIPTOR_AUDIO & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(play_dssi_audio->input_port == NULL){ play_dssi_audio->input_port = (unsigned long *) malloc(sizeof(unsigned long)); play_dssi_audio->input_port[0] = i; }else{ play_dssi_audio->input_port = (unsigned long *) realloc(play_dssi_audio->input_port, (play_dssi_audio->input_lines + 1) * sizeof(unsigned long)); play_dssi_audio->input_port[play_dssi_audio->input_lines] = i; } play_dssi_audio->input_lines += 1; }else if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(play_dssi_audio->output_port == NULL){ play_dssi_audio->output_port = (unsigned long *) malloc(sizeof(unsigned long)); play_dssi_audio->output_port[0] = i; }else{ play_dssi_audio->output_port = (unsigned long *) realloc(play_dssi_audio->output_port, (play_dssi_audio->output_lines + 1) * sizeof(unsigned long)); play_dssi_audio->output_port[play_dssi_audio->output_lines] = i; } play_dssi_audio->output_lines += 1; } } port_descriptor = port_descriptor->next; } AGS_RECALL(play_dssi_audio)->port = g_list_reverse(port); } g_message("output lines: %d", play_dssi_audio->output_lines); return(g_list_copy(AGS_RECALL(play_dssi_audio)->port)); } /** * ags_play_dssi_audio_load_conversion: * @play_dssi_audio: the #AgsPlayDssiAudio * @port: an #AgsPort * @port_descriptor: the #AgsPortDescriptor-struct * * Loads conversion object by using @port_descriptor and sets in on @port. * * Since: 1.0.0 */ void ags_play_dssi_audio_load_conversion(AgsPlayDssiAudio *play_dssi_audio, GObject *port, gpointer port_descriptor) { AgsLadspaConversion *ladspa_conversion; if(play_dssi_audio == NULL || port == NULL || port_descriptor == NULL){ return; } ladspa_conversion = NULL; if((AGS_PORT_DESCRIPTOR_BOUNDED_BELOW & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_BELOW; } if((AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_ABOVE; } if((AGS_PORT_DESCRIPTOR_SAMPLERATE & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_SAMPLERATE; } if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_LOGARITHMIC; } if(ladspa_conversion != NULL){ g_object_set(port, "conversion", ladspa_conversion, NULL); } } /** * ags_play_dssi_audio_find: * @recall: a #GList containing #AgsRecall * @filename: plugin filename * @effect: effect's name * * Retrieve DSSI recall. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_play_dssi_audio_find(GList *recall, gchar *filename, gchar *effect) { while(recall != NULL){ if(AGS_IS_PLAY_DSSI_AUDIO(recall->data)){ if(!g_strcmp0(AGS_PLAY_DSSI_AUDIO(recall->data)->filename, filename) && !g_strcmp0(AGS_PLAY_DSSI_AUDIO(recall->data)->effect, effect)){ return(recall); } } recall = recall->next; } return(NULL); } /** * ags_play_dssi_audio_new: * * Creates an #AgsPlayDssiAudio * * Returns: a new #AgsPlayDssiAudio * * Since: 1.0.0 */ AgsPlayDssiAudio* ags_play_dssi_audio_new() { AgsPlayDssiAudio *play_dssi_audio; play_dssi_audio = (AgsPlayDssiAudio *) g_object_new(AGS_TYPE_PLAY_DSSI_AUDIO, NULL); return(play_dssi_audio); } gsequencer-1.4.24/ags/audio/recall/ags_buffer_audio_signal.c0000644000175000017500000003370113246707333021002 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_buffer_audio_signal_class_init(AgsBufferAudioSignalClass *buffer_audio_signal); void ags_buffer_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_buffer_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_buffer_audio_signal_init(AgsBufferAudioSignal *buffer_audio_signal); void ags_buffer_audio_signal_connect(AgsConnectable *connectable); void ags_buffer_audio_signal_disconnect(AgsConnectable *connectable); void ags_buffer_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_buffer_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_buffer_audio_signal_finalize(GObject *gobject); void ags_buffer_audio_signal_run_init_pre(AgsRecall *recall); void ags_buffer_audio_signal_run_pre(AgsRecall *recall); void ags_buffer_audio_signal_run_inter(AgsRecall *recall); AgsRecall* ags_buffer_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_buffer_audio_signal * @short_description: buffers audio signal * @title: AgsBufferAudioSignal * @section_id: * @include: ags/audio/recall/ags_buffer_audio_signal.h * * The #AgsBufferAudioSignal class buffers the audio signal. */ static gpointer ags_buffer_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_buffer_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_buffer_audio_signal_parent_dynamic_connectable_interface; GType ags_buffer_audio_signal_get_type() { static GType ags_type_buffer_audio_signal = 0; if(!ags_type_buffer_audio_signal){ static const GTypeInfo ags_buffer_audio_signal_info = { sizeof (AgsBufferAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_buffer_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsBufferAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_buffer_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_buffer_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_buffer_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_buffer_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsBufferAudioSignal", &ags_buffer_audio_signal_info, 0); g_type_add_interface_static(ags_type_buffer_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_buffer_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_buffer_audio_signal); } void ags_buffer_audio_signal_class_init(AgsBufferAudioSignalClass *buffer_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_buffer_audio_signal_parent_class = g_type_class_peek_parent(buffer_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) buffer_audio_signal; gobject->finalize = ags_buffer_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) buffer_audio_signal; recall->run_init_pre = ags_buffer_audio_signal_run_init_pre; recall->run_pre = ags_buffer_audio_signal_run_pre; recall->run_inter = ags_buffer_audio_signal_run_inter; recall->duplicate = ags_buffer_audio_signal_duplicate; } void ags_buffer_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_buffer_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_buffer_audio_signal_connect; connectable->disconnect = ags_buffer_audio_signal_disconnect; } void ags_buffer_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_buffer_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_buffer_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_buffer_audio_signal_disconnect_dynamic; } void ags_buffer_audio_signal_init(AgsBufferAudioSignal *buffer_audio_signal) { AGS_RECALL(buffer_audio_signal)->child_type = G_TYPE_NONE; } void ags_buffer_audio_signal_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_buffer_audio_signal_parent_class)->finalize(gobject); } void ags_buffer_audio_signal_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_buffer_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_buffer_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_buffer_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_buffer_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_buffer_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_buffer_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_buffer_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_buffer_audio_signal_run_init_pre(AgsRecall *recall) { GObject *soundcard; AgsRecycling *recycling; AgsAudioSignal *destination; AgsRecallID *parent_recall_id; AgsRecyclingContext *recycling_context; AgsBufferRecycling *buffer_recycling; AgsBufferAudioSignal *buffer_audio_signal; AgsMutexManager *mutex_manager; GList *stream; gdouble delay; guint attack; guint length; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; buffer_audio_signal = AGS_BUFFER_AUDIO_SIGNAL(recall); buffer_recycling = AGS_BUFFER_RECYCLING(recall->parent); soundcard = AGS_RECALL(buffer_audio_signal)->soundcard; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* recycling */ recall->flags &= (~AGS_RECALL_PERSISTENT); recycling = AGS_RECALL_RECYCLING(buffer_recycling)->destination; pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* recycling context */ recycling_context = recall->recall_id->recycling_context; parent_recall_id = ags_recall_id_find_recycling_context(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->destination->recall_id, recycling_context->parent); //TODO:JK: unclear attack = 0; delay = 0.0; /* create new audio signal */ destination = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) parent_recall_id); g_object_set(buffer_audio_signal, "destination", destination, NULL); ags_recycling_create_audio_signal_with_defaults(recycling, destination, delay, attack); length = 3; // (guint) (2.0 * soundcard->delay[soundcard->tic_counter]) + 1; ags_audio_signal_stream_resize(destination, length); ags_connectable_connect(AGS_CONNECTABLE(destination)); destination->stream_current = destination->stream_beginning; pthread_mutex_lock(recycling_mutex); ags_recycling_add_audio_signal(recycling, destination); pthread_mutex_unlock(recycling_mutex); #ifdef AGS_DEBUG g_message("buffer %x to %x", destination, parent_recall_id); g_message("creating destination"); #endif /* call parent */ AGS_RECALL_CLASS(ags_buffer_audio_signal_parent_class)->run_init_pre(recall); } void ags_buffer_audio_signal_run_pre(AgsRecall *recall) { /* call parent */ AGS_RECALL_CLASS(ags_buffer_audio_signal_parent_class)->run_pre(recall); } void ags_buffer_audio_signal_run_inter(AgsRecall *recall) { AgsRecycling *recycling; AgsAudioSignal *source, *destination; AgsBufferChannel *buffer_channel; AgsBufferRecycling *buffer_recycling; AgsBufferAudioSignal *buffer_audio_signal; GList *stream_source, *stream_destination; gboolean muted; guint buffer_size; guint copy_mode; guint attack; GValue value = {0,}; /* call parent */ AGS_RECALL_CLASS(ags_buffer_audio_signal_parent_class)->run_inter(recall); /* initialize some variables */ buffer_audio_signal = AGS_BUFFER_AUDIO_SIGNAL(recall); buffer_recycling = AGS_BUFFER_RECYCLING(recall->parent); buffer_channel = AGS_BUFFER_CHANNEL(AGS_RECALL_CHANNEL_RUN(AGS_RECALL(buffer_recycling)->parent)->recall_channel); source = AGS_RECALL_AUDIO_SIGNAL(buffer_audio_signal)->source; stream_source = source->stream_current; if(stream_source == NULL){ // if((AGS_RECALL_PERSISTENT & (recall->flags)) == 0){ ags_recall_done(recall); // } return; } //FIXME:JK: attack probably needs to be removed destination = AGS_RECALL_AUDIO_SIGNAL(buffer_audio_signal)->destination; g_value_init(&value, G_TYPE_FLOAT); ags_port_safe_read(buffer_channel->muted, &value); if(g_value_get_float(&value) == 0.0){ muted = FALSE; }else{ muted = TRUE; } g_value_unset(&value); if(muted){ return; } stream_destination = destination->stream_current; buffer_size = source->buffer_size; if(stream_destination != NULL){ void *buffer_source; gboolean resample; copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(destination->format), ags_audio_buffer_util_format_from_soundcard(source->format)); resample = FALSE; if(stream_destination->next == NULL){ ags_audio_signal_add_stream(destination); } /* check if resample */ buffer_source = stream_source->data; attack = (destination->samplerate / source->samplerate) * source->attack; if(source->samplerate != destination->samplerate){ buffer_source = ags_audio_buffer_util_resample(buffer_source, 1, ags_audio_buffer_util_format_from_soundcard(source->format), source->samplerate, buffer_size, destination->samplerate); resample = TRUE; } /* copy */ if((AGS_RECALL_INITIAL_RUN & (AGS_RECALL_AUDIO_SIGNAL(recall)->flags)) != 0){ AGS_RECALL_AUDIO_SIGNAL(recall)->flags &= (~AGS_RECALL_INITIAL_RUN); ags_audio_buffer_util_copy_buffer_to_buffer(stream_destination->data, 1, attack, buffer_source, 1, 0, destination->buffer_size - attack, copy_mode); }else{ if(attack != 0 && stream_source->prev != NULL){ void *buffer_source_prev; buffer_source_prev = stream_source->prev->data; if(resample){ buffer_source_prev = ags_audio_buffer_util_resample(buffer_source_prev, 1, ags_audio_buffer_util_format_from_soundcard(source->format), source->samplerate, buffer_size, destination->samplerate); } ags_audio_buffer_util_copy_buffer_to_buffer(stream_destination->data, 1, 0, buffer_source_prev, 1, destination->buffer_size - attack, attack, copy_mode); if(resample){ free(buffer_source_prev); } } ags_audio_buffer_util_copy_buffer_to_buffer(stream_destination->data, 1, attack, buffer_source, 1, 0, destination->buffer_size - attack, copy_mode); } if(resample){ free(buffer_source); } } } AgsRecall* ags_buffer_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsBufferAudioSignal *buffer; buffer = (AgsBufferAudioSignal *) AGS_RECALL_CLASS(ags_buffer_audio_signal_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) buffer); } /** * ags_buffer_audio_signal_new: * @audio_signal: an #AgsAudioSignal * * Creates an #AgsBufferAudioSignal * * Returns: a new #AgsBufferAudioSignal * * Since: 1.0.0 */ AgsBufferAudioSignal* ags_buffer_audio_signal_new(AgsAudioSignal *audio_signal) { AgsBufferAudioSignal *buffer_audio_signal; buffer_audio_signal = (AgsBufferAudioSignal *) g_object_new(AGS_TYPE_BUFFER_AUDIO_SIGNAL, "source", audio_signal, NULL); return(buffer_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_rt_stream_channel_run.c0000644000175000017500000003310213247044247021361 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #include #include #include #include #include #include #include void ags_rt_stream_channel_run_class_init(AgsRtStreamChannelRunClass *rt_stream_channel_run); void ags_rt_stream_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_rt_stream_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_rt_stream_channel_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_rt_stream_channel_run_init(AgsRtStreamChannelRun *rt_stream_channel_run); void ags_rt_stream_channel_run_connect(AgsConnectable *connectable); void ags_rt_stream_channel_run_disconnect(AgsConnectable *connectable); void ags_rt_stream_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_rt_stream_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_rt_stream_channel_run_finalize(GObject *gobject); void ags_rt_stream_channel_run_check_rt_stream(AgsRecall *recall); void ags_rt_stream_channel_run_remove(AgsRecall *recall); AgsRecall* ags_rt_stream_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_rt_stream_channel_run * @short_description: rt_streams channel * @title: AgsRtStreamChannelRun * @section_id: * @include: ags/audio/recall/ags_rt_stream_channel_run.h * * The #AgsRtStreamChannelRun class streams the audio signal template. */ static gpointer ags_rt_stream_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_rt_stream_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_rt_stream_channel_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_rt_stream_channel_run_parent_plugin_interface; GType ags_rt_stream_channel_run_get_type() { static GType ags_type_rt_stream_channel_run = 0; if(!ags_type_rt_stream_channel_run){ static const GTypeInfo ags_rt_stream_channel_run_info = { sizeof (AgsRtStreamChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_rt_stream_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRtStreamChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_rt_stream_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_rt_stream_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_rt_stream_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_rt_stream_channel_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_rt_stream_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsRtStreamChannelRun", &ags_rt_stream_channel_run_info, 0); g_type_add_interface_static(ags_type_rt_stream_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_rt_stream_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_rt_stream_channel_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_rt_stream_channel_run); } void ags_rt_stream_channel_run_class_init(AgsRtStreamChannelRunClass *rt_stream_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; ags_rt_stream_channel_run_parent_class = g_type_class_peek_parent(rt_stream_channel_run); /* GObjectClass */ gobject = (GObjectClass *) rt_stream_channel_run; gobject->finalize = ags_rt_stream_channel_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) rt_stream_channel_run; recall->check_rt_stream = ags_rt_stream_channel_run_check_rt_stream; recall->duplicate = ags_rt_stream_channel_run_duplicate; recall->remove = ags_rt_stream_channel_run_remove; } void ags_rt_stream_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_rt_stream_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_rt_stream_channel_run_connect; connectable->disconnect = ags_rt_stream_channel_run_disconnect; } void ags_rt_stream_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_rt_stream_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_rt_stream_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_rt_stream_channel_run_disconnect_dynamic; } void ags_rt_stream_channel_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_rt_stream_channel_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_rt_stream_channel_run_init(AgsRtStreamChannelRun *rt_stream_channel_run) { AGS_RECALL(rt_stream_channel_run)->name = "ags-rt_stream"; AGS_RECALL(rt_stream_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(rt_stream_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(rt_stream_channel_run)->xml_type = "ags-rt_stream-channel-run"; AGS_RECALL(rt_stream_channel_run)->port = NULL; AGS_RECALL(rt_stream_channel_run)->flags |= (AGS_RECALL_OUTPUT_ORIENTATED | AGS_RECALL_RUN_FIRST); AGS_RECALL(rt_stream_channel_run)->child_type = AGS_TYPE_RT_STREAM_RECYCLING; } void ags_rt_stream_channel_run_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_rt_stream_channel_run_parent_class)->finalize(gobject); } void ags_rt_stream_channel_run_connect(AgsConnectable *connectable) { /* call parent */ ags_rt_stream_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_rt_stream_channel_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_rt_stream_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_rt_stream_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_rt_stream_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_rt_stream_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsChannel *channel; AgsRtStreamChannelRun *rt_stream_channel_run; ags_rt_stream_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_rt_stream_channel_run_check_rt_stream(AgsRecall *recall) { AgsChannel *source; AgsRecycling *first_recycling, *last_recycling; AgsRecycling *recycling, *end_recycling; AgsRtStreamChannelRun *rt_stream_channel_run; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *source_mutex; pthread_mutex_t *recycling_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); rt_stream_channel_run = recall; source = AGS_RECALL_CHANNEL_RUN(rt_stream_channel_run)->source; /* lookup mutex */ pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* get first and last recycling */ pthread_mutex_lock(source_mutex); first_recycling = source->first_recycling; last_recycling = source->last_recycling; pthread_mutex_unlock(source_mutex); /* lookup mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* get end */ pthread_mutex_lock(recycling_mutex); end_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); /* */ recycling = first_recycling; while(recycling != end_recycling){ AgsAudioSignal *audio_signal; AgsAudioSignal *rt_template, *template; /* lookup mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* create rt template */ rt_template = ags_audio_signal_new(recall->soundcard, recycling, recall->recall_id); rt_template->flags |= AGS_AUDIO_SIGNAL_RT_TEMPLATE; ags_recycling_create_audio_signal_with_defaults(recycling, rt_template, 0.0, 0); ags_recycling_add_audio_signal(recycling, rt_template); /* create buffer */ audio_signal = ags_audio_signal_new(recall->soundcard, recycling, recall->recall_id); pthread_mutex_lock(recycling_mutex); g_object_set(audio_signal, "rt-template", rt_template, NULL); ags_audio_signal_stream_resize(audio_signal, 3); audio_signal->stream_current = audio_signal->stream_beginning; pthread_mutex_unlock(recycling_mutex); /* add buffer */ ags_recycling_add_audio_signal(recycling, audio_signal); pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } } AgsRecall* ags_rt_stream_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRtStreamChannelRun *copy; copy = (AgsRtStreamChannelRun *) AGS_RECALL_CLASS(ags_rt_stream_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } void ags_rt_stream_channel_run_remove(AgsRecall *recall) { AgsChannel *source; AgsRecycling *first_recycling, *last_recycling; AgsRecycling *recycling, *end_recycling; AgsRtStreamChannelRun *rt_stream_channel_run; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *source_mutex; pthread_mutex_t *recycling_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); rt_stream_channel_run = recall; source = AGS_RECALL_CHANNEL_RUN(rt_stream_channel_run)->source; /* lookup mutex */ pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* get first and last recycling */ pthread_mutex_lock(source_mutex); first_recycling = source->first_recycling; last_recycling = source->last_recycling; pthread_mutex_unlock(source_mutex); /* lookup mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* get end */ pthread_mutex_lock(recycling_mutex); end_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); /* */ recycling = first_recycling; while(recycling != end_recycling){ GList *audio_signal, *audio_signal_start; /* lookup mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(recycling_mutex); audio_signal_start = audio_signal = g_list_copy(recycling->audio_signal); pthread_mutex_unlock(recycling_mutex); while((audio_signal = ags_audio_signal_get_by_recall_id(audio_signal, recall->recall_id)) != NULL){ ags_recycling_remove_audio_signal(recycling, audio_signal->data); audio_signal = audio_signal->next; } g_list_free(audio_signal_start); pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } /* call parent */ AGS_RECALL_CLASS(ags_rt_stream_channel_run_parent_class)->remove(recall); } /** * ags_rt_stream_channel_run_new: * * Creates an #AgsRtStreamChannelRun * * Returns: a new #AgsRtStreamChannelRun * * Since: 1.4.0 */ AgsRtStreamChannelRun* ags_rt_stream_channel_run_new() { AgsRtStreamChannelRun *rt_stream_channel_run; rt_stream_channel_run = (AgsRtStreamChannelRun *) g_object_new(AGS_TYPE_RT_STREAM_CHANNEL_RUN, NULL); return(rt_stream_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_capture_sound_audio.c0000644000175000017500000005111113247044247021041 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #include #include #include void ags_capture_sound_audio_class_init(AgsCaptureSoundAudioClass *capture_sound_audio); void ags_capture_sound_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_capture_sound_audio_init(AgsCaptureSoundAudio *capture_sound_audio); void ags_capture_sound_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_capture_sound_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_capture_sound_audio_finalize(GObject *gobject); void ags_capture_sound_audio_set_ports(AgsPlugin *plugin, GList *port); /** * SECTION:ags_capture_sound_audio * @short_description: capture audio sound * @title: AgsCaptureSoundAudio * @section_id: * @include: ags/audio/recall/ags_capture_sound_audio.h * * The #AgsCaptureSoundAudio class provides ports to the effect processor. */ enum{ PROP_0, PROP_PLAYBACK, PROP_RECORD, PROP_FILENAME, PROP_AUDIO_CHANNELS, PROP_FORMAT, PROP_SAMPLERATE, PROP_BUFFER_SIZE, }; static gpointer ags_capture_sound_audio_parent_class = NULL; static AgsPluginInterface *ags_capture_sound_parent_plugin_interface; static const gchar *ags_capture_sound_audio_plugin_name = "ags-capture-sound"; static const gchar *ags_capture_sound_audio_specifier[] = { "./playback[0]" "./record[0]", "./filename[0]", "./audio-channels[0]", "./format[0]", "./samplerate[0]", "./buffer-size[0]", }; static const gchar *ags_capture_sound_audio_control_port[] = { "1/7", "2/7", "3/7", "4/7", "5/7", "6/7", "7/7", }; GType ags_capture_sound_audio_get_type() { static GType ags_type_capture_sound_audio = 0; if(!ags_type_capture_sound_audio){ static const GTypeInfo ags_capture_sound_audio_info = { sizeof (AgsCaptureSoundAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_capture_sound_audio_class_init, NULL, /* class_finalize */ NULL, /* class_audio */ sizeof (AgsCaptureSoundAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_capture_sound_audio_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_capture_sound_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_capture_sound_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsCaptureSoundAudio", &ags_capture_sound_audio_info, 0); g_type_add_interface_static(ags_type_capture_sound_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_capture_sound_audio); } void ags_capture_sound_audio_class_init(AgsCaptureSoundAudioClass *capture_sound_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_capture_sound_audio_parent_class = g_type_class_peek_parent(capture_sound_audio); /* GObjectClass */ gobject = (GObjectClass *) capture_sound_audio; gobject->set_property = ags_capture_sound_audio_set_property; gobject->get_property = ags_capture_sound_audio_get_property; gobject->finalize = ags_capture_sound_audio_finalize; /* properties */ /** * AgsCaptureSoundAudio:playback: * * The playback port. * * Since: 1.4.0 */ param_spec = g_param_spec_object("playback", i18n_pspec("if do playback"), i18n_pspec("If playback should be performed"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK, param_spec); /** * AgsCaptureSoundAudio:record: * * The record port. * * Since: 1.4.0 */ param_spec = g_param_spec_object("record", i18n_pspec("if do record"), i18n_pspec("If record data for later use should be done"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECORD, param_spec); /** * AgsCaptureSoundAudio:filename: * * The filename port. * * Since: 1.4.0 */ param_spec = g_param_spec_object("filename", i18n_pspec("filename of record"), i18n_pspec("The filename of record"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsCaptureSoundAudio:audio-channels: * * The audio channels port. * * Since: 1.4.0 */ param_spec = g_param_spec_object("audio-channels", i18n_pspec("audio channels"), i18n_pspec("Audio channels count of file"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNELS, param_spec); /** * AgsCaptureSoundAudio:format: * * The format port. * * Since: 1.4.0 */ param_spec = g_param_spec_object("format", i18n_pspec("format"), i18n_pspec("Format to use of file"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsCaptureSoundAudio:samplerate: * * The samplerate port. * * Since: 1.4.0 */ param_spec = g_param_spec_object("samplerate", i18n_pspec("samplerate"), i18n_pspec("Samplerate to use of file"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsCaptureSoundAudio:buffer-size: * * The buffer size port. * * Since: 1.4.0 */ param_spec = g_param_spec_object("buffer-size", i18n_pspec("buffer size"), i18n_pspec("Buffer size to use"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); } void ags_capture_sound_audio_plugin_interface_init(AgsPluginInterface *plugin) { ags_capture_sound_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->set_ports = ags_capture_sound_audio_set_ports; } void ags_capture_sound_audio_init(AgsCaptureSoundAudio *capture_sound_audio) { GList *port; AGS_RECALL(capture_sound_audio)->name = "ags-capture-sound"; AGS_RECALL(capture_sound_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(capture_sound_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(capture_sound_audio)->xml_type = "ags-capture-sound-audio"; port = NULL; /* playback */ capture_sound_audio->playback = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_capture_sound_audio_plugin_name, "specifier", ags_capture_sound_audio_specifier[0], "control-port", ags_capture_sound_audio_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, NULL); g_object_ref(capture_sound_audio->playback); capture_sound_audio->playback->port_value.ags_port_boolean = TRUE; /* add to port */ port = g_list_prepend(port, capture_sound_audio->playback); g_object_ref(capture_sound_audio->playback); /* record */ capture_sound_audio->record = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_capture_sound_audio_plugin_name, "specifier", ags_capture_sound_audio_specifier[1], "control-port", ags_capture_sound_audio_control_port[1], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, NULL); g_object_ref(capture_sound_audio->record); capture_sound_audio->record->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, capture_sound_audio->record); g_object_ref(capture_sound_audio->record); /* filename */ capture_sound_audio->filename = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_capture_sound_audio_plugin_name, "specifier", ags_capture_sound_audio_specifier[2], "control-port", ags_capture_sound_audio_control_port[2], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_POINTER, NULL); g_object_ref(capture_sound_audio->filename); capture_sound_audio->filename->port_value.ags_port_pointer = NULL; /* add to port */ port = g_list_prepend(port, capture_sound_audio->filename); g_object_ref(capture_sound_audio->filename); /* audio channels */ capture_sound_audio->audio_channels = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_capture_sound_audio_plugin_name, "specifier", ags_capture_sound_audio_specifier[3], "control-port", ags_capture_sound_audio_control_port[3], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_UINT, NULL); g_object_ref(capture_sound_audio->audio_channels); capture_sound_audio->audio_channels->port_value.ags_port_uint = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; /* add to port */ port = g_list_prepend(port, capture_sound_audio->audio_channels); g_object_ref(capture_sound_audio->audio_channels); /* format */ capture_sound_audio->format = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_capture_sound_audio_plugin_name, "specifier", ags_capture_sound_audio_specifier[4], "control-port", ags_capture_sound_audio_control_port[4], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_UINT, NULL); g_object_ref(capture_sound_audio->format); capture_sound_audio->format->port_value.ags_port_uint = AGS_SOUNDCARD_DEFAULT_FORMAT; /* add to port */ port = g_list_prepend(port, capture_sound_audio->format); g_object_ref(capture_sound_audio->format); /* samplerate */ capture_sound_audio->samplerate = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_capture_sound_audio_plugin_name, "specifier", ags_capture_sound_audio_specifier[5], "control-port", ags_capture_sound_audio_control_port[5], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_UINT, NULL); g_object_ref(capture_sound_audio->samplerate); capture_sound_audio->samplerate->port_value.ags_port_uint = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; /* add to port */ port = g_list_prepend(port, capture_sound_audio->samplerate); g_object_ref(capture_sound_audio->samplerate); /* buffer size */ capture_sound_audio->buffer_size = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_capture_sound_audio_plugin_name, "specifier", ags_capture_sound_audio_specifier[6], "control-port", ags_capture_sound_audio_control_port[6], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_UINT, NULL); g_object_ref(capture_sound_audio->buffer_size); capture_sound_audio->buffer_size->port_value.ags_port_uint = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; /* add to port */ port = g_list_prepend(port, capture_sound_audio->buffer_size); g_object_ref(capture_sound_audio->buffer_size); /* set port */ AGS_RECALL(capture_sound_audio)->port = port; } void ags_capture_sound_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCaptureSoundAudio *capture_sound_audio; capture_sound_audio = AGS_CAPTURE_SOUND_AUDIO(gobject); switch(prop_id){ case PROP_PLAYBACK: { AgsPort *playback; playback = (AgsPort *) g_value_get_object(value); if(capture_sound_audio->playback == playback){ return; } if(capture_sound_audio->playback != NULL){ g_object_unref(G_OBJECT(capture_sound_audio->playback)); } if(playback != NULL){ g_object_ref(G_OBJECT(playback)); } capture_sound_audio->playback = playback; } break; case PROP_RECORD: { AgsPort *record; record = (AgsPort *) g_value_get_object(value); if(capture_sound_audio->record == record){ return; } if(capture_sound_audio->record != NULL){ g_object_unref(G_OBJECT(capture_sound_audio->record)); } if(record != NULL){ g_object_ref(G_OBJECT(record)); } capture_sound_audio->record = record; } break; case PROP_FILENAME: { AgsPort *filename; filename = (AgsPort *) g_value_get_object(value); if(capture_sound_audio->filename == filename){ return; } if(capture_sound_audio->filename != NULL){ g_object_unref(G_OBJECT(capture_sound_audio->filename)); } if(filename != NULL){ g_object_ref(G_OBJECT(filename)); } capture_sound_audio->filename = filename; } break; case PROP_AUDIO_CHANNELS: { AgsPort *audio_channels; audio_channels = (AgsPort *) g_value_get_object(value); if(capture_sound_audio->audio_channels == audio_channels){ return; } if(capture_sound_audio->audio_channels != NULL){ g_object_unref(G_OBJECT(capture_sound_audio->audio_channels)); } if(audio_channels != NULL){ g_object_ref(G_OBJECT(audio_channels)); } capture_sound_audio->audio_channels = audio_channels; } break; case PROP_FORMAT: { AgsPort *format; format = (AgsPort *) g_value_get_object(value); if(capture_sound_audio->format == format){ return; } if(capture_sound_audio->format != NULL){ g_object_unref(G_OBJECT(capture_sound_audio->format)); } if(format != NULL){ g_object_ref(G_OBJECT(format)); } capture_sound_audio->format = format; } break; case PROP_SAMPLERATE: { AgsPort *samplerate; samplerate = (AgsPort *) g_value_get_object(value); if(capture_sound_audio->samplerate == samplerate){ return; } if(capture_sound_audio->samplerate != NULL){ g_object_unref(G_OBJECT(capture_sound_audio->samplerate)); } if(samplerate != NULL){ g_object_ref(G_OBJECT(samplerate)); } capture_sound_audio->samplerate = samplerate; } break; case PROP_BUFFER_SIZE: { AgsPort *buffer_size; buffer_size = (AgsPort *) g_value_get_object(value); if(capture_sound_audio->buffer_size == buffer_size){ return; } if(capture_sound_audio->buffer_size != NULL){ g_object_unref(G_OBJECT(capture_sound_audio->buffer_size)); } if(buffer_size != NULL){ g_object_ref(G_OBJECT(buffer_size)); } capture_sound_audio->buffer_size = buffer_size; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_capture_sound_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCaptureSoundAudio *capture_sound_audio; capture_sound_audio = AGS_CAPTURE_SOUND_AUDIO(gobject); switch(prop_id){ case PROP_PLAYBACK: { g_value_set_object(value, capture_sound_audio->playback); } break; case PROP_RECORD: { g_value_set_object(value, capture_sound_audio->record); } break; case PROP_FILENAME: { g_value_set_object(value, capture_sound_audio->filename); } break; case PROP_AUDIO_CHANNELS: { g_value_set_object(value, capture_sound_audio->audio_channels); } break; case PROP_FORMAT: { g_value_set_object(value, capture_sound_audio->format); } break; case PROP_SAMPLERATE: { g_value_set_object(value, capture_sound_audio->samplerate); } break; case PROP_BUFFER_SIZE: { g_value_set_object(value, capture_sound_audio->buffer_size); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_capture_sound_audio_dispose(GObject *gobject) { AgsCaptureSoundAudio *capture_sound_audio; capture_sound_audio = AGS_CAPTURE_SOUND_AUDIO(gobject); /* playback */ if(capture_sound_audio->playback != NULL){ g_object_unref(capture_sound_audio->playback); capture_sound_audio->playback = NULL; } /* record */ if(capture_sound_audio->record != NULL){ g_object_unref(capture_sound_audio->record); capture_sound_audio->record = NULL; } /* filename */ if(capture_sound_audio->filename != NULL){ g_object_unref(capture_sound_audio->filename); capture_sound_audio->filename = NULL; } /* audio channels */ if(capture_sound_audio->audio_channels != NULL){ g_object_unref(capture_sound_audio->audio_channels); capture_sound_audio->audio_channels = NULL; } /* format */ if(capture_sound_audio->format != NULL){ g_object_unref(capture_sound_audio->format); capture_sound_audio->format = NULL; } /* samplerate */ if(capture_sound_audio->samplerate != NULL){ g_object_unref(capture_sound_audio->samplerate); capture_sound_audio->samplerate = NULL; } /* buffer size */ if(capture_sound_audio->buffer_size != NULL){ g_object_unref(capture_sound_audio->buffer_size); capture_sound_audio->buffer_size = NULL; } /* call parent */ G_OBJECT_CLASS(ags_capture_sound_audio_parent_class)->dispose(gobject); } void ags_capture_sound_audio_finalize(GObject *gobject) { AgsCaptureSoundAudio *capture_sound_audio; capture_sound_audio = AGS_CAPTURE_SOUND_AUDIO(gobject); /* playback */ if(capture_sound_audio->playback != NULL){ g_object_unref(capture_sound_audio->playback); } /* record */ if(capture_sound_audio->record != NULL){ g_object_unref(capture_sound_audio->record); } /* filename */ if(capture_sound_audio->filename != NULL){ g_object_unref(capture_sound_audio->filename); } /* audio channels */ if(capture_sound_audio->audio_channels != NULL){ g_object_unref(capture_sound_audio->audio_channels); } /* format */ if(capture_sound_audio->format != NULL){ g_object_unref(capture_sound_audio->format); } /* samplerate */ if(capture_sound_audio->samplerate != NULL){ g_object_unref(capture_sound_audio->samplerate); } /* buffer size */ if(capture_sound_audio->buffer_size != NULL){ g_object_unref(capture_sound_audio->buffer_size); } /* call parent */ G_OBJECT_CLASS(ags_capture_sound_audio_parent_class)->finalize(gobject); } void ags_capture_sound_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./playback[0]", 11)){ g_object_set(G_OBJECT(plugin), "playback", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./record[0]", 11)){ g_object_set(G_OBJECT(plugin), "record", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./filename[0]", 11)){ g_object_set(G_OBJECT(plugin), "filename", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./audio-channels[0]", 11)){ g_object_set(G_OBJECT(plugin), "audio-channels", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./format[0]", 11)){ g_object_set(G_OBJECT(plugin), "format", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./samplerate[0]", 11)){ g_object_set(G_OBJECT(plugin), "samplerate", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./buffer-size[0]", 11)){ g_object_set(G_OBJECT(plugin), "buffer-size", AGS_PORT(port->data), NULL); } port = port->next; } } /** * ags_capture_sound_audio_new: * * Creates an #AgsCaptureSoundAudio * * Returns: a new #AgsCaptureSoundAudio * * Since: 1.4.0 */ AgsCaptureSoundAudio* ags_capture_sound_audio_new() { AgsCaptureSoundAudio *capture_sound_audio; capture_sound_audio = (AgsCaptureSoundAudio *) g_object_new(AGS_TYPE_CAPTURE_SOUND_AUDIO, NULL); return(capture_sound_audio); } gsequencer-1.4.24/ags/audio/recall/ags_envelope_channel_run.h0000644000175000017500000000430113246707333021203 00000000000000/* 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 . */ #ifndef __AGS_ENVELOPE_CHANNEL_RUN_H__ #define __AGS_ENVELOPE_CHANNEL_RUN_H__ #include #include #include #include #include #define AGS_TYPE_ENVELOPE_CHANNEL_RUN (ags_envelope_channel_run_get_type()) #define AGS_ENVELOPE_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ENVELOPE_CHANNEL_RUN, AgsEnvelopeChannelRun)) #define AGS_ENVELOPE_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ENVELOPE_CHANNEL_RUN, AgsEnvelopeChannelRunClass)) #define AGS_IS_ENVELOPE_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ENVELOPE_CHANNEL_RUN)) #define AGS_IS_ENVELOPE_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ENVELOPE_CHANNEL_RUN)) #define AGS_ENVELOPE_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ENVELOPE_CHANNEL_RUN, AgsEnvelopeChannelRunClass)) typedef struct _AgsEnvelopeChannelRun AgsEnvelopeChannelRun; typedef struct _AgsEnvelopeChannelRunClass AgsEnvelopeChannelRunClass; struct _AgsEnvelopeChannelRun { AgsRecallChannelRun recall_channel_run; }; struct _AgsEnvelopeChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_envelope_channel_run_get_type(); AgsEnvelopeChannelRun* ags_envelope_channel_run_new(AgsChannel *source); #endif /*__AGS_ENVELOPE_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_copy_notation_audio.h0000644000175000017500000000512213246707333021062 00000000000000/* 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 . */ #ifndef __AGS_COPY_NOTATION_AUDIO_H__ #define __AGS_COPY_NOTATION_AUDIO_H__ #include #include #include #include #define AGS_TYPE_COPY_NOTATION_AUDIO (ags_copy_notation_audio_get_type()) #define AGS_COPY_NOTATION_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_NOTATION_AUDIO, AgsCopyNotationAudio)) #define AGS_COPY_NOTATION_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_NOTATION_AUDIO, AgsCopyNotationAudio)) #define AGS_IS_COPY_NOTATION_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COPY_NOTATION_AUDIO)) #define AGS_IS_COPY_NOTATION_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COPY_NOTATION_AUDIO)) #define AGS_COPY_NOTATION_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COPY_NOTATION_AUDIO, AgsCopyNotationAudioClass)) typedef struct _AgsCopyNotationAudio AgsCopyNotationAudio; typedef struct _AgsCopyNotationAudioClass AgsCopyNotationAudioClass; /** * AgsCopyNotationAudioFlags: * @AGS_COPY_NOTATION_AUDIO_FIT_AUDIO_SIGNAL: consider assigned note to get audio signal length * * Enum values to control the behavior or indicate internal state of #AgsCopyNotationAudio by * enable/disable as flags. */ typedef enum{ AGS_COPY_NOTATION_AUDIO_FIT_AUDIO_SIGNAL = 1, }AgsCopyNotationAudioFlags; struct _AgsCopyNotationAudio { AgsRecallAudio recall_audio; guint flags; AgsNotation *notation; guint audio_channel; }; struct _AgsCopyNotationAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_copy_notation_audio_get_type(); AgsCopyNotationAudio* ags_copy_notation_audio_new(GObject *soundcard, AgsNotation *notation, guint audio_channel); #endif /*__AGS_COPY_NOTATION_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_delay_audio_run.h0000644000175000017500000000707513256163135020165 00000000000000/* 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 . */ #ifndef __AGS_DELAY_AUDIO_RUN_H__ #define __AGS_DELAY_AUDIO_RUN_H__ #include #include #include #define AGS_TYPE_DELAY_AUDIO_RUN (ags_delay_audio_run_get_type()) #define AGS_DELAY_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DELAY_AUDIO_RUN, AgsDelayAudioRun)) #define AGS_DELAY_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_DELAY_AUDIO_RUN, AgsDelayAudioRun)) #define AGS_IS_DELAY_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_DELAY_AUDIO_RUN)) #define AGS_IS_DELAY_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_DELAY_AUDIO_RUN)) #define AGS_DELAY_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_DELAY_AUDIO_RUN, AgsDelayAudioRunClass)) typedef struct _AgsDelayAudioRun AgsDelayAudioRun; typedef struct _AgsDelayAudioRunClass AgsDelayAudioRunClass; struct _AgsDelayAudioRun { AgsRecallAudioRun recall_audio_run; guint dependency_ref; guint hide_ref; guint hide_ref_counter; guint notation_counter; guint sequencer_counter; }; struct _AgsDelayAudioRunClass { AgsRecallAudioRunClass recall_audio_run; void (*notation_alloc_output)(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void (*notation_alloc_input)(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void (*notation_count)(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void (*sequencer_alloc_output)(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void (*sequencer_alloc_input)(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void (*sequencer_count)(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); }; GType ags_delay_audio_run_get_type(); void ags_delay_audio_run_notation_alloc_output(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void ags_delay_audio_run_notation_alloc_input(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void ags_delay_audio_run_notation_count(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void ags_delay_audio_run_sequencer_alloc_output(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void ags_delay_audio_run_sequencer_alloc_input(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); void ags_delay_audio_run_sequencer_count(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack); AgsDelayAudioRun* ags_delay_audio_run_new(); #endif /*__AGS_DELAY_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_prepare_recycling.c0000644000175000017500000001654613246707333020520 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include void ags_prepare_recycling_class_init(AgsPrepareRecyclingClass *prepare_recycling); void ags_prepare_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_prepare_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_prepare_recycling_init(AgsPrepareRecycling *prepare_recycling); void ags_prepare_recycling_connect(AgsConnectable *connectable); void ags_prepare_recycling_disconnect(AgsConnectable *connectable); void ags_prepare_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_prepare_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_prepare_recycling_finalize(GObject *gobject); AgsRecall* ags_prepare_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_prepare_recycling_remove(AgsRecall *recall); /** * SECTION:ags_prepare_recycling * @short_description: prepares recycling * @title: AgsPrepareRecycling * @section_id: * @include: ags/audio/recall/ags_prepare_recycling.h * * The #AgsPrepareRecycling class prepares the recycling. */ static gpointer ags_prepare_recycling_parent_class = NULL; static AgsConnectableInterface *ags_prepare_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_prepare_recycling_parent_dynamic_connectable_interface; GType ags_prepare_recycling_get_type() { static GType ags_type_prepare_recycling = 0; if(!ags_type_prepare_recycling){ static const GTypeInfo ags_prepare_recycling_info = { sizeof (AgsPrepareRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_prepare_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPrepareRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_prepare_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_prepare_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_prepare_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_prepare_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsPrepareRecycling", &ags_prepare_recycling_info, 0); g_type_add_interface_static(ags_type_prepare_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_prepare_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_prepare_recycling); } void ags_prepare_recycling_class_init(AgsPrepareRecyclingClass *prepare_recycling) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_prepare_recycling_parent_class = g_type_class_peek_parent(prepare_recycling); /* GObjectClass */ gobject = (GObjectClass *) prepare_recycling; gobject->finalize = ags_prepare_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) prepare_recycling; recall->duplicate = ags_prepare_recycling_duplicate; } void ags_prepare_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_prepare_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_prepare_recycling_connect; connectable->disconnect = ags_prepare_recycling_disconnect; } void ags_prepare_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_prepare_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_prepare_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_prepare_recycling_disconnect_dynamic; } void ags_prepare_recycling_init(AgsPrepareRecycling *prepare_recycling) { AGS_RECALL(prepare_recycling)->name = "ags-prepare"; AGS_RECALL(prepare_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(prepare_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(prepare_recycling)->xml_type = "ags-prepare-recycling"; AGS_RECALL(prepare_recycling)->port = NULL; AGS_RECALL(prepare_recycling)->child_type = AGS_TYPE_PREPARE_AUDIO_SIGNAL; AGS_RECALL_RECYCLING(prepare_recycling)->flags |= (AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE); } void ags_prepare_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_prepare_recycling_parent_class)->finalize(gobject); } void ags_prepare_recycling_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_prepare_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_prepare_recycling_disconnect(AgsConnectable *connectable) { ags_prepare_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_prepare_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } ags_prepare_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_prepare_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_prepare_recycling_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } AgsRecall* ags_prepare_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPrepareRecycling *copy; copy = (AgsPrepareRecycling *) AGS_RECALL_CLASS(ags_prepare_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_prepare_recycling_new: * @recycling: an #AgsRecycling * * Creates an #AgsPrepareRecycling * * Returns: a new #AgsPrepareRecycling * * Since: 1.0.0.8 */ AgsPrepareRecycling* ags_prepare_recycling_new(AgsRecycling *recycling) { AgsPrepareRecycling *prepare_recycling; prepare_recycling = (AgsPrepareRecycling *) g_object_new(AGS_TYPE_PREPARE_RECYCLING, "source", recycling, NULL); return(prepare_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_stream_recycling.h0000644000175000017500000000402513246707333020347 00000000000000/* 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 . */ #ifndef __AGS_STREAM_RECYCLING_H__ #define __AGS_STREAM_RECYCLING_H__ #include #include #include #define AGS_TYPE_STREAM_RECYCLING (ags_stream_recycling_get_type()) #define AGS_STREAM_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_STREAM_RECYCLING, AgsStreamRecycling)) #define AGS_STREAM_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_STREAM_RECYCLING, AgsStreamRecyclingClass)) #define AGS_IS_STREAM_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_STREAM_RECYCLING)) #define AGS_IS_STREAM_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_STREAM_RECYCLING)) #define AGS_STREAM_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_STREAM_RECYCLING, AgsStreamRecyclingClass)) typedef struct _AgsStreamRecycling AgsStreamRecycling; typedef struct _AgsStreamRecyclingClass AgsStreamRecyclingClass; struct _AgsStreamRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsStreamRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_stream_recycling_get_type(); AgsStreamRecycling* ags_stream_recycling_new(AgsRecycling *recycling); #endif /*__AGS_STREAM_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_stream_channel.c0000644000175000017500000002264613247044247020003 00000000000000/* 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 . */ #include #include #include void ags_stream_channel_class_init(AgsStreamChannelClass *stream_channel); void ags_stream_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_stream_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_stream_channel_init(AgsStreamChannel *stream_channel); void ags_stream_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_stream_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_stream_channel_connect(AgsConnectable *connectable); void ags_stream_channel_disconnect(AgsConnectable *connectable); void ags_stream_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_stream_channel_dispose(GObject *gobject); void ags_stream_channel_finalize(GObject *gobject); /** * SECTION:ags_stream_channel * @short_description: streams channel * @title: AgsStreamChannel * @section_id: * @include: ags/audio/recall/ags_stream_channel.h * * The #AgsStreamChannel class provides ports to the effect processor. */ enum{ PROP_0, PROP_AUTO_SENSE, }; static gpointer ags_stream_channel_parent_class = NULL; static AgsConnectableInterface *ags_stream_channel_parent_connectable_interface; static AgsPluginInterface *ags_stream_channel_parent_plugin_interface; static const gchar *ags_stream_channel_plugin_name = "ags-stream"; static const gchar *ags_stream_channel_plugin_specifier[] = { "./auto-sense[0]", }; static const gchar *ags_stream_channel_plugin_control_port[] = { "1/1", }; GType ags_stream_channel_get_type() { static GType ags_type_stream_channel = 0; if(!ags_type_stream_channel){ static const GTypeInfo ags_stream_channel_info = { sizeof (AgsStreamChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_stream_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsStreamChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_stream_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_stream_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_stream_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_stream_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsStreamChannel", &ags_stream_channel_info, 0); g_type_add_interface_static(ags_type_stream_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_stream_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_stream_channel); } void ags_stream_channel_class_init(AgsStreamChannelClass *stream_channel) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_stream_channel_parent_class = g_type_class_peek_parent(stream_channel); /* GObjectClass */ gobject = (GObjectClass *) stream_channel; gobject->set_property = ags_stream_channel_set_property; gobject->get_property = ags_stream_channel_get_property; gobject->dispose = ags_stream_channel_dispose; gobject->finalize = ags_stream_channel_finalize; /* properties */ /** * AgsStreamChannel:auto-sense: * * The auto-sense port. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("auto-sense", i18n_pspec("mute channel"), i18n_pspec("Mute the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUTO_SENSE, param_spec); } void ags_stream_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_stream_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_stream_channel_connect; connectable->disconnect = ags_stream_channel_disconnect; } void ags_stream_channel_plugin_interface_init(AgsPluginInterface *plugin) { ags_stream_channel_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->set_ports = ags_stream_channel_set_ports; } void ags_stream_channel_init(AgsStreamChannel *stream_channel) { AgsConfig *config; GList *port; gchar *str; AGS_RECALL(stream_channel)->name = "ags-stream"; AGS_RECALL(stream_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(stream_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(stream_channel)->xml_type = "ags-stream-channel"; /* initialize port */ port = NULL; /* auto-sense */ stream_channel->auto_sense = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_stream_channel_plugin_name, "specifier", ags_stream_channel_plugin_specifier[0], "control-port", ags_stream_channel_plugin_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(stream_channel->auto_sense); config = ags_config_get_instance(); str = ags_config_get_value(config, AGS_CONFIG_RECALL, "auto-sense"); stream_channel->auto_sense->port_value.ags_port_boolean = ((!g_strcmp0(str, "true") ) ? TRUE: FALSE); free(str); /* add to port */ port = g_list_prepend(port, stream_channel->auto_sense); g_object_ref(stream_channel->auto_sense); /* set port */ AGS_RECALL(stream_channel)->port = port; } void ags_stream_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsStreamChannel *stream_channel; stream_channel = AGS_STREAM_CHANNEL(gobject); switch(prop_id){ case PROP_AUTO_SENSE: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == stream_channel->auto_sense){ return; } if(stream_channel->auto_sense != NULL){ g_object_unref(G_OBJECT(stream_channel->auto_sense)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } stream_channel->auto_sense = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_stream_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsStreamChannel *stream_channel; stream_channel = AGS_STREAM_CHANNEL(gobject); switch(prop_id){ case PROP_AUTO_SENSE: { g_value_set_object(value, stream_channel->auto_sense); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_stream_channel_dispose(GObject *gobject) { AgsStreamChannel *stream_channel; stream_channel = AGS_STREAM_CHANNEL(gobject); /* auto-sense */ if(stream_channel->auto_sense != NULL){ g_object_unref(G_OBJECT(stream_channel->auto_sense)); stream_channel->auto_sense = NULL; } /* call parent */ G_OBJECT_CLASS(ags_stream_channel_parent_class)->dispose(gobject); } void ags_stream_channel_finalize(GObject *gobject) { AgsStreamChannel *stream_channel; stream_channel = AGS_STREAM_CHANNEL(gobject); /* auto-sense */ if(stream_channel->auto_sense != NULL){ g_object_unref(G_OBJECT(stream_channel->auto_sense)); } /* call parent */ G_OBJECT_CLASS(ags_stream_channel_parent_class)->finalize(gobject); } void ags_stream_channel_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_stream_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_stream_channel_disconnect(AgsConnectable *connectable) { ags_stream_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_stream_channel_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./auto-sense[0]", 9)){ g_object_set(G_OBJECT(plugin), "auto-sense", AGS_PORT(port->data), NULL); } port = port->next; } } /** * ags_stream_channel_new: * * Creates an #AgsStreamChannel * * Returns: a new #AgsStreamChannel * * Since: 1.0.0 */ AgsStreamChannel* ags_stream_channel_new() { AgsStreamChannel *stream_channel; stream_channel = (AgsStreamChannel *) g_object_new(AGS_TYPE_STREAM_CHANNEL, NULL); return(stream_channel); } gsequencer-1.4.24/ags/audio/recall/ags_mute_channel.c0000644000175000017500000002503013247044247017450 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_mute_channel_class_init(AgsMuteChannelClass *mute_channel); void ags_mute_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mute_channel_mutable_interface_init(AgsMutableInterface *mutable); void ags_mute_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_mute_channel_init(AgsMuteChannel *mute_channel); void ags_mute_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_mute_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_mute_channel_connect(AgsConnectable *connectable); void ags_mute_channel_disconnect(AgsConnectable *connectable); void ags_mute_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_mute_channel_dispose(GObject *gobject); void ags_mute_channel_finalize(GObject *gobject); void ags_mute_channel_set_muted(AgsMutable *mutable, gboolean muted); static AgsPortDescriptor* ags_mute_channel_get_muted_port_descriptor(); /** * SECTION:ags_mute_channel * @short_description: mutes channel * @title: AgsMuteChannel * @section_id: * @include: ags/audio/recall/ags_mute_channel.h * * The #AgsMuteChannel class provides ports to the effect processor. */ enum{ PROP_0, PROP_MUTED, }; static gpointer ags_mute_channel_parent_class = NULL; static AgsConnectableInterface *ags_mute_channel_parent_connectable_interface; static AgsMutableInterface *ags_mute_channel_parent_mutable_interface; GType ags_mute_channel_get_type() { static GType ags_type_mute_channel = 0; if(!ags_type_mute_channel){ static const GTypeInfo ags_mute_channel_info = { sizeof (AgsMuteChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mute_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMuteChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mute_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_mutable_interface_info = { (GInterfaceInitFunc) ags_mute_channel_mutable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_mute_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mute_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsMuteChannel", &ags_mute_channel_info, 0); g_type_add_interface_static(ags_type_mute_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_mute_channel, AGS_TYPE_MUTABLE, &ags_mutable_interface_info); g_type_add_interface_static(ags_type_mute_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_mute_channel); } void ags_mute_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_mute_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_mute_channel_connect; connectable->disconnect = ags_mute_channel_disconnect; } void ags_mute_channel_mutable_interface_init(AgsMutableInterface *mutable) { ags_mute_channel_parent_mutable_interface = g_type_interface_peek_parent(mutable); mutable->set_muted = ags_mute_channel_set_muted; } void ags_mute_channel_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_mute_channel_set_ports; } void ags_mute_channel_class_init(AgsMuteChannelClass *mute_channel) { GObjectClass *gobject; GParamSpec *param_spec; ags_mute_channel_parent_class = g_type_class_peek_parent(mute_channel); /* GObjectClass */ gobject = (GObjectClass *) mute_channel; gobject->set_property = ags_mute_channel_set_property; gobject->get_property = ags_mute_channel_get_property; gobject->dispose = ags_mute_channel_dispose; gobject->finalize = ags_mute_channel_finalize; /* properties */ /** * AgsMuteChannel:muted: * * The mute port. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("muted", i18n_pspec("mute channel"), i18n_pspec("Mute the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MUTED, param_spec); } void ags_mute_channel_init(AgsMuteChannel *mute_channel) { GList *port; AGS_RECALL(mute_channel)->name = "ags-mute"; AGS_RECALL(mute_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(mute_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(mute_channel)->xml_type = "ags-mute-channel"; port = NULL; /* muted */ mute_channel->muted = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-mute", "specifier", "./muted[0]", "control-port", "1/1", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, "port-value-size", sizeof(gfloat), "port-value-length", 1, NULL); g_object_ref(mute_channel->muted); mute_channel->muted->port_value.ags_port_float = 0.0; /* port descriptor */ mute_channel->muted->port_descriptor = ags_mute_channel_get_muted_port_descriptor(); /* add to port */ port = g_list_prepend(port, mute_channel->muted); g_object_ref(mute_channel->muted); /* set port */ AGS_RECALL(mute_channel)->port = port; } void ags_mute_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMuteChannel *mute_channel; mute_channel = AGS_MUTE_CHANNEL(gobject); switch(prop_id){ case PROP_MUTED: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == mute_channel->muted){ return; } if(mute_channel->muted != NULL){ g_object_unref(G_OBJECT(mute_channel->muted)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } mute_channel->muted = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_mute_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMuteChannel *mute_channel; mute_channel = AGS_MUTE_CHANNEL(gobject); switch(prop_id){ case PROP_MUTED: { g_value_set_object(value, mute_channel->muted); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_mute_channel_connect(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } /* load automation */ ags_recall_load_automation(recall, g_list_copy(recall->port)); /* call parent */ ags_mute_channel_parent_connectable_interface->connect(connectable); } void ags_mute_channel_disconnect(AgsConnectable *connectable) { ags_mute_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_mute_channel_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "muted[0]", 9)){ g_object_set(G_OBJECT(plugin), "muted", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_mute_channel_dispose(GObject *gobject) { AgsMuteChannel *mute_channel; mute_channel = AGS_MUTE_CHANNEL(gobject); /* muted */ if(mute_channel->muted != NULL){ g_object_unref(G_OBJECT(mute_channel->muted)); mute_channel->muted = NULL; } /* call parent */ G_OBJECT_CLASS(ags_mute_channel_parent_class)->dispose(gobject); } void ags_mute_channel_finalize(GObject *gobject) { AgsMuteChannel *mute_channel; mute_channel = AGS_MUTE_CHANNEL(gobject); /* muted */ if(mute_channel->muted != NULL){ g_object_unref(G_OBJECT(mute_channel->muted)); } /* call parent */ G_OBJECT_CLASS(ags_mute_channel_parent_class)->finalize(gobject); } void ags_mute_channel_set_muted(AgsMutable *mutable, gboolean muted) { GValue value = {0,}; g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, (muted ? 1.0: 0.0)); ags_port_safe_write(AGS_MUTE_CHANNEL(mutable)->muted, &value); } static AgsPortDescriptor* ags_mute_channel_get_muted_port_descriptor() { static AgsPortDescriptor *port_descriptor = NULL; if(port_descriptor == NULL){ port_descriptor = ags_port_descriptor_alloc(); port_descriptor->flags |= (AGS_PORT_DESCRIPTOR_INPUT | AGS_PORT_DESCRIPTOR_CONTROL | AGS_PORT_DESCRIPTOR_TOGGLED); port_descriptor->port_index = 0; /* range */ g_value_init(port_descriptor->default_value, G_TYPE_FLOAT); g_value_init(port_descriptor->lower_value, G_TYPE_FLOAT); g_value_init(port_descriptor->upper_value, G_TYPE_FLOAT); g_value_set_float(port_descriptor->default_value, 0.0); g_value_set_float(port_descriptor->lower_value, 0.0); g_value_set_float(port_descriptor->upper_value, 1.0); } return(port_descriptor); } /** * ags_mute_channel_new: * * Creates an #AgsMuteChannel * * Returns: a new #AgsMuteChannel * * Since: 1.0.0 */ AgsMuteChannel* ags_mute_channel_new() { AgsMuteChannel *mute_channel; mute_channel = (AgsMuteChannel *) g_object_new(AGS_TYPE_MUTE_CHANNEL, NULL); return(mute_channel); } gsequencer-1.4.24/ags/audio/recall/ags_buffer_audio_signal.h0000644000175000017500000000415613246707333021011 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_BUFFER_AUDIO_SIGNAL_H__ #define __AGS_BUFFER_AUDIO_SIGNAL_H__ #include #include #include #define AGS_TYPE_BUFFER_AUDIO_SIGNAL (ags_buffer_audio_signal_get_type()) #define AGS_BUFFER_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BUFFER_AUDIO_SIGNAL, AgsBufferAudioSignal)) #define AGS_BUFFER_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_BUFFER_AUDIO_SIGNAL, AgsBufferAudioSignalClass)) #define AGS_IS_BUFFER_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_BUFFER_AUDIO_SIGNAL)) #define AGS_IS_BUFFER_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_BUFFER_AUDIO_SIGNAL)) #define AGS_BUFFER_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_BUFFER_AUDIO_SIGNAL, AgsBufferAudioSignalClass)) typedef struct _AgsBufferAudioSignal AgsBufferAudioSignal; typedef struct _AgsBufferAudioSignalClass AgsBufferAudioSignalClass; struct _AgsBufferAudioSignal { AgsRecallAudioSignal recall_audio_signal; }; struct _AgsBufferAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_buffer_audio_signal_get_type(); AgsBufferAudioSignal* ags_buffer_audio_signal_new(AgsAudioSignal *audio_signal); #endif /*__AGS_BUFFER_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_buffer_channel_run.h0000644000175000017500000000414113246707333020641 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_BUFFER_CHANNEL_RUN_H__ #define __AGS_BUFFER_CHANNEL_RUN_H__ #include #include #include #include #define AGS_TYPE_BUFFER_CHANNEL_RUN (ags_buffer_channel_run_get_type()) #define AGS_BUFFER_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BUFFER_CHANNEL_RUN, AgsBufferChannelRun)) #define AGS_BUFFER_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_BUFFER_CHANNEL_RUN, AgsBufferChannelRunClass)) #define AGS_IS_BUFFER_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_BUFFER_CHANNEL_RUN)) #define AGS_IS_BUFFER_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_BUFFER_CHANNEL_RUN)) #define AGS_BUFFER_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_BUFFER_CHANNEL_RUN, AgsBufferChannelRunClass)) typedef struct _AgsBufferChannelRun AgsBufferChannelRun; typedef struct _AgsBufferChannelRunClass AgsBufferChannelRunClass; struct _AgsBufferChannelRun { AgsRecallChannelRun recall_channel_run; }; struct _AgsBufferChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_buffer_channel_run_get_type(); AgsBufferChannelRun* ags_buffer_channel_run_new(); #endif /*__AGS_BUFFER_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_loop_channel.h0000644000175000017500000000372713246707333017466 00000000000000/* 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 . */ #ifndef __AGS_LOOP_CHANNEL_H__ #define __AGS_LOOP_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_LOOP_CHANNEL (ags_loop_channel_get_type()) #define AGS_LOOP_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LOOP_CHANNEL, AgsLoopChannel)) #define AGS_LOOP_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LOOP_CHANNEL, AgsLoopChannelClass)) #define AGS_IS_LOOP_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_LOOP_CHANNEL)) #define AGS_IS_LOOP_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_LOOP_CHANNEL)) #define AGS_LOOP_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_LOOP_CHANNEL, AgsLoopChannelClass)) typedef struct _AgsLoopChannel AgsLoopChannel; typedef struct _AgsLoopChannelClass AgsLoopChannelClass; struct _AgsLoopChannel { AgsRecallChannel recall_channel; AgsDelayAudio *delay_audio; }; struct _AgsLoopChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_loop_channel_get_type(); AgsLoopChannel* ags_loop_channel_new(); #endif /*__AGS_LOOP_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_copy_channel_run.c0000644000175000017500000002026013247044247020334 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_copy_channel_run_class_init(AgsCopyChannelRunClass *copy_channel_run); void ags_copy_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_copy_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_copy_channel_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_copy_channel_run_init(AgsCopyChannelRun *copy_channel_run); gboolean ags_copy_channel_run_is_ready(AgsConnectable *connectable); void ags_copy_channel_run_connect(AgsConnectable *connectable); void ags_copy_channel_run_disconnect(AgsConnectable *connectable); void ags_copy_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_channel_run_finalize(GObject *gobject); AgsRecall* ags_copy_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_copy_channel_run * @short_description: copys channel * @title: AgsCopyChannelRun * @section_id: * @include: ags/audio/recall/ags_copy_channel_run.h * * The #AgsCopyChannelRun class copys the channel. */ static gpointer ags_copy_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_copy_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_copy_channel_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_copy_channel_run_parent_plugin_interface; GType ags_copy_channel_run_get_type() { static GType ags_type_copy_channel_run = 0; if(!ags_type_copy_channel_run){ static const GTypeInfo ags_copy_channel_run_info = { sizeof (AgsCopyChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_copy_channel_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_copy_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsCopyChannelRun", &ags_copy_channel_run_info, 0); g_type_add_interface_static(ags_type_copy_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_copy_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_copy_channel_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_copy_channel_run); } void ags_copy_channel_run_class_init(AgsCopyChannelRunClass *copy_channel_run) { GObjectClass *gobject; ags_copy_channel_run_parent_class = g_type_class_peek_parent(copy_channel_run); /* GObjectClass */ gobject = (GObjectClass *) copy_channel_run; gobject->finalize = ags_copy_channel_run_finalize; } void ags_copy_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_copy_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->is_ready = ags_copy_channel_run_is_ready; connectable->connect = ags_copy_channel_run_connect; connectable->disconnect = ags_copy_channel_run_disconnect; } void ags_copy_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_copy_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_copy_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_copy_channel_run_disconnect_dynamic; } void ags_copy_channel_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_copy_channel_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_copy_channel_run_init(AgsCopyChannelRun *copy_channel_run) { AGS_RECALL(copy_channel_run)->name = "ags-copy"; AGS_RECALL(copy_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(copy_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(copy_channel_run)->xml_type = "ags-copy-channel-run"; AGS_RECALL(copy_channel_run)->port = NULL; AGS_RECALL(copy_channel_run)->flags |= (AGS_RECALL_OUTPUT_ORIENTATED | AGS_RECALL_INPUT_ORIENTATED); AGS_RECALL(copy_channel_run)->child_type = AGS_TYPE_COPY_RECYCLING; } gboolean ags_copy_channel_run_is_ready(AgsConnectable *connectable) { AgsRecallChannelRun *recall_channel_run; recall_channel_run = AGS_RECALL_CHANNEL_RUN(connectable); if(recall_channel_run->source != NULL && recall_channel_run->destination != NULL){ return(TRUE); } return(FALSE); } void ags_copy_channel_run_connect(AgsConnectable *connectable) { ags_copy_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_copy_channel_run_disconnect(AgsConnectable *connectable) { ags_copy_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_copy_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_copy_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_copy_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_copy_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_copy_channel_run_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_copy_channel_run_parent_class)->finalize(gobject); } AgsRecall* ags_copy_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsCopyChannelRun *copy; copy = (AgsCopyChannelRun *) AGS_RECALL_CLASS(ags_copy_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_copy_channel_run_new: * @destination: the destination #AgsChannel * @source: the source #AgsChannel * @soundcard: the #GObject defaulting to * * Creates an #AgsCopyChannelRun * * Returns: a new #AgsCopyChannelRun * * Since: 1.0.0 */ AgsCopyChannelRun* ags_copy_channel_run_new(AgsChannel *destination, AgsChannel *source, GObject *soundcard) { AgsCopyChannelRun *copy_channel_run; copy_channel_run = (AgsCopyChannelRun *) g_object_new(AGS_TYPE_COPY_CHANNEL_RUN, "destination", destination, "source", source, "soundcard", soundcard, NULL); return(copy_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_copy_notation_audio.c0000644000175000017500000001567413246707333021072 00000000000000/* 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 . */ #include #include void ags_copy_notation_audio_class_init(AgsCopyNotationAudioClass *copy_notation_audio); void ags_copy_notation_audio_init(AgsCopyNotationAudio *copy_notation_audio); void ags_copy_notation_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_copy_notation_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_copy_notation_audio_dispose(GObject *gobject); void ags_copy_notation_audio_finalize(GObject *gobject); /** * SECTION:ags_copy_notation_audio * @short_description: copy notations audio * @title: AgsCopyNotationAudio * @section_id: * @include: ags/audio/recall/ags_copy_notation_audio.h * * The #AgsCopyNotationAudio class provides ports to the effect processor. */ enum{ PROP_0, PROP_NOTATION, PROP_AUDIO_CHANNEL, }; static gpointer ags_copy_notation_audio_parent_class = NULL; GType ags_copy_notation_audio_get_type() { static GType ags_type_copy_notation_audio = 0; if(!ags_type_copy_notation_audio){ static const GTypeInfo ags_copy_notation_audio_info = { sizeof (AgsCopyNotationAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_notation_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyNotationAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_notation_audio_init, }; ags_type_copy_notation_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsCopyNotationAudio", &ags_copy_notation_audio_info, 0); } return(ags_type_copy_notation_audio); } void ags_copy_notation_audio_class_init(AgsCopyNotationAudioClass *copy_notation_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_copy_notation_audio_parent_class = g_type_class_peek_parent(copy_notation_audio); /* GObjectClass */ gobject = (GObjectClass *) copy_notation_audio; gobject->set_property = ags_copy_notation_audio_set_property; gobject->get_property = ags_copy_notation_audio_get_property; gobject->finalize = ags_copy_notation_audio_finalize; /* properties */ /** * AgsCopyNotationAudio:notation: * * The notation. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("notation", i18n_pspec("the assigned notation"), i18n_pspec("The AgsNotation it is assigned to"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsCopyNotationAudio:audio-channel: * * The audio channel. * * Since: 1.0.0.7 */ param_spec = g_param_spec_uint("audio_channel", i18n_pspec("the audio channel to play"), i18n_pspec("The audio channel to play of audio object"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); } void ags_copy_notation_audio_init(AgsCopyNotationAudio *copy_notation_audio) { copy_notation_audio->flags = 0; copy_notation_audio->notation = NULL; copy_notation_audio->audio_channel = 0; } void ags_copy_notation_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCopyNotationAudio *copy_notation_audio; copy_notation_audio = AGS_COPY_NOTATION_AUDIO(gobject); switch(prop_id){ case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(copy_notation_audio->notation != notation) return; if(copy_notation_audio->notation != NULL) g_object_unref(copy_notation_audio->notation); if(notation != NULL) g_object_ref(notation); copy_notation_audio->notation = notation; } break; case PROP_AUDIO_CHANNEL: { guint audio_channel; audio_channel = g_value_get_uint(value); copy_notation_audio->audio_channel = audio_channel; } default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_copy_notation_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCopyNotationAudio *copy_notation_audio; copy_notation_audio = AGS_COPY_NOTATION_AUDIO(gobject); switch(prop_id){ case PROP_NOTATION: { g_value_set_object(value, copy_notation_audio->notation); } break; case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, copy_notation_audio->audio_channel); } default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_copy_notation_audio_dispose(GObject *gobject) { AgsCopyNotationAudio *copy_notation_audio; copy_notation_audio = AGS_COPY_NOTATION_AUDIO(gobject); /* notation */ if(copy_notation_audio->notation != NULL){ g_object_unref(copy_notation_audio->notation); copy_notation_audio->notation = NULL; } /* call parent */ G_OBJECT_CLASS(ags_copy_notation_audio_parent_class)->dispose(gobject); } void ags_copy_notation_audio_finalize(GObject *gobject) { AgsCopyNotationAudio *copy_notation_audio; copy_notation_audio = AGS_COPY_NOTATION_AUDIO(gobject); /* notation */ if(copy_notation_audio->notation != NULL){ g_object_unref(copy_notation_audio->notation); } /* call parent */ G_OBJECT_CLASS(ags_copy_notation_audio_parent_class)->finalize(gobject); } /** * ags_copy_notation_audio_new: * @soundcard: the #AgsSoundcard * @notation: the notation * @audio_channel: the audio channel to use * * Creates an #AgsCopyNotationAudio * * Returns: a new #AgsCopyNotationAudio * * Since: 1.0.0 */ AgsCopyNotationAudio* ags_copy_notation_audio_new(GObject *soundcard, AgsNotation *notation, guint audio_channel) { AgsCopyNotationAudio *copy_notation_audio; copy_notation_audio = (AgsCopyNotationAudio *) g_object_new(AGS_TYPE_COPY_NOTATION_AUDIO, "soundcard", soundcard, "notation", notation, "audio_channel", audio_channel, NULL); return(copy_notation_audio); } gsequencer-1.4.24/ags/audio/recall/ags_play_note.h0000644000175000017500000000357213246707333017015 00000000000000/* 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 . */ #ifndef __AGS_PLAY_NOTE_H__ #define __AGS_PLAY_NOTE_H__ #include #include #include #include #define AGS_TYPE_PLAY_NOTE (ags_play_note_get_type()) #define AGS_PLAY_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_NOTE, AgsPlayNote)) #define AGS_PLAY_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_NOTE, AgsPlayNote)) #define AGS_IS_PLAY_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_NOTE)) #define AGS_IS_PLAY_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_NOTE)) #define AGS_PLAY_NOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_NOTE, AgsPlayNoteClass)) typedef struct _AgsPlayNote AgsPlayNote; typedef struct _AgsPlayNoteClass AgsPlayNoteClass; struct _AgsPlayNote { AgsRecall recall; GObject *soundcard; AgsChannel *channel; AgsNote *note; }; struct _AgsPlayNoteClass { AgsRecallClass recall; }; GType ags_play_note_get_type(); AgsPlayNote* ags_play_note_new(); #endif /*__AGS_PLAY_NOTE_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_prepare_audio_signal.h0000644000175000017500000000421113246707333021166 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PREPARE_AUDIO_SIGNAL_H__ #define __AGS_PREPARE_AUDIO_SIGNAL_H__ #include #include #include #define AGS_TYPE_PREPARE_AUDIO_SIGNAL (ags_prepare_audio_signal_get_type()) #define AGS_PREPARE_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PREPARE_AUDIO_SIGNAL, AgsPrepareAudioSignal)) #define AGS_PREPARE_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PREPARE_AUDIO_SIGNAL, AgsPrepareAudioSignalClass)) #define AGS_IS_PREPARE_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PREPARE_AUDIO_SIGNAL)) #define AGS_IS_PREPARE_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PREPARE_AUDIO_SIGNAL)) #define AGS_PREPARE_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PREPARE_AUDIO_SIGNAL, AgsPrepareAudioSignalClass)) typedef struct _AgsPrepareAudioSignal AgsPrepareAudioSignal; typedef struct _AgsPrepareAudioSignalClass AgsPrepareAudioSignalClass; struct _AgsPrepareAudioSignal { AgsRecallAudioSignal recall_audio_signal; }; struct _AgsPrepareAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_prepare_audio_signal_get_type(); AgsPrepareAudioSignal* ags_prepare_audio_signal_new(AgsAudioSignal *audio_signal); #endif /*__AGS_PREPARE_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_count_beats_audio.h0000644000175000017500000000427013256163135020503 00000000000000/* 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 . */ #ifndef __AGS_COUNT_BEATS_AUDIO_H__ #define __AGS_COUNT_BEATS_AUDIO_H__ #include #include #include #define AGS_TYPE_COUNT_BEATS_AUDIO (ags_count_beats_audio_get_type()) #define AGS_COUNT_BEATS_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COUNT_BEATS_AUDIO, AgsCountBeatsAudio)) #define AGS_COUNT_BEATS_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COUNT_BEATS_AUDIO, AgsCountBeatsAudio)) #define AGS_IS_COUNT_BEATS_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COUNT_BEATS_AUDIO)) #define AGS_IS_COUNT_BEATS_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COUNT_BEATS_AUDIO)) #define AGS_COUNT_BEATS_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COUNT_BEATS_AUDIO, AgsCountBeatsAudioClass)) typedef struct _AgsCountBeatsAudio AgsCountBeatsAudio; typedef struct _AgsCountBeatsAudioClass AgsCountBeatsAudioClass; struct _AgsCountBeatsAudio { AgsRecallAudio recall_audio; AgsPort *notation_loop; AgsPort *notation_loop_start; AgsPort *notation_loop_end; AgsPort *sequencer_loop; AgsPort *sequencer_loop_start; AgsPort *sequencer_loop_end; }; struct _AgsCountBeatsAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_count_beats_audio_get_type(); AgsCountBeatsAudio* ags_count_beats_audio_new(gboolean loop); #endif /*__AGS_COUNT_BEATS_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_route_lv2_audio.c0000644000175000017500000002420313246707333020112 00000000000000/* 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 . */ #include #include #include #include void ags_route_lv2_audio_class_init(AgsRouteLv2AudioClass *route_lv2_audio); void ags_route_lv2_audio_init(AgsRouteLv2Audio *route_lv2_audio); void ags_route_lv2_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_route_lv2_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_route_lv2_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_route_lv2_audio_set_ports(AgsPlugin *plugin, GList *port); void ags_route_lv2_audio_dispose(GObject *gobject); void ags_route_lv2_audio_finalize(GObject *gobject); /** * SECTION:ags_route_lv2_audio * @short_description: route MIDI to LV2 * @title: AgsRouteLv2Audio * @section_id: * @include: ags/audio/recall/ags_route_lv2_audio.h * * The #AgsRouteLv2Audio class provides ports to the effect processor. */ enum{ PROP_0, PROP_NOTATION_INPUT, PROP_SEQUENCER_INPUT, }; static gpointer ags_route_lv2_audio_parent_class = NULL; static const gchar *ags_route_lv2_audio_plugin_name = "ags-count-beats"; static const gchar *ags_route_lv2_audio_specifier[] = { "./notation-input[0]", "./sequencer-input[0]", }; static const gchar *ags_route_lv2_audio_control_port[] = { "1/2", "2/2", }; GType ags_route_lv2_audio_get_type() { static GType ags_type_route_lv2_audio = 0; if(!ags_type_route_lv2_audio){ static const GTypeInfo ags_route_lv2_audio_info = { sizeof (AgsRouteLv2AudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_route_lv2_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRouteLv2Audio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_route_lv2_audio_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_route_lv2_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_route_lv2_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsRouteLv2Audio", &ags_route_lv2_audio_info, 0); g_type_add_interface_static(ags_type_route_lv2_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_route_lv2_audio); } void ags_route_lv2_audio_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_route_lv2_audio_set_ports; } void ags_route_lv2_audio_class_init(AgsRouteLv2AudioClass *route_lv2_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_route_lv2_audio_parent_class = g_type_class_peek_parent(route_lv2_audio); gobject = (GObjectClass *) route_lv2_audio; gobject->set_property = ags_route_lv2_audio_set_property; gobject->get_property = ags_route_lv2_audio_get_property; gobject->dispose = ags_route_lv2_audio_dispose; gobject->finalize = ags_route_lv2_audio_finalize; /* properties */ /** * AgsRouteLv2Audio:notation-input: * * If enabled input is taken of #AgsNotation. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation-input", i18n_pspec("route notation input"), i18n_pspec("Route notation as input to the LV2 recall"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION_INPUT, param_spec); /** * AgsRouteLv2Audio:sequencer-input: * * If enabled input is taken of #AgsSequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer-input", i18n_pspec("route sequencer input"), i18n_pspec("Route sequencer as input to the LV2 recall"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER_INPUT, param_spec); } void ags_route_lv2_audio_init(AgsRouteLv2Audio *route_lv2_audio) { GList *port; AGS_RECALL(route_lv2_audio)->name = "ags-count-beats"; AGS_RECALL(route_lv2_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(route_lv2_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(route_lv2_audio)->xml_type = "ags-count-beats-audio"; port = NULL; /* notation input */ route_lv2_audio->notation_input = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_route_lv2_audio_plugin_name, "specifier", ags_route_lv2_audio_specifier[0], "control-port", ags_route_lv2_audio_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(route_lv2_audio->notation_input); route_lv2_audio->notation_input->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, route_lv2_audio->notation_input); g_object_ref(route_lv2_audio->notation_input); /* sequencer input */ route_lv2_audio->sequencer_input = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_route_lv2_audio_plugin_name, "specifier", ags_route_lv2_audio_specifier[1], "control-port", ags_route_lv2_audio_control_port[1], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(route_lv2_audio->sequencer_input); route_lv2_audio->sequencer_input->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, route_lv2_audio->sequencer_input); g_object_ref(route_lv2_audio->sequencer_input); /* set port */ AGS_RECALL(route_lv2_audio)->port = port; } void ags_route_lv2_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRouteLv2Audio *route_lv2_audio; route_lv2_audio = AGS_ROUTE_LV2_AUDIO(gobject); switch(prop_id){ case PROP_NOTATION_INPUT: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == route_lv2_audio->notation_input){ return; } if(route_lv2_audio->notation_input != NULL){ g_object_unref(G_OBJECT(route_lv2_audio->notation_input)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } route_lv2_audio->notation_input = port; } break; case PROP_SEQUENCER_INPUT: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == route_lv2_audio->sequencer_input){ return; } if(route_lv2_audio->sequencer_input != NULL){ g_object_unref(G_OBJECT(route_lv2_audio->sequencer_input)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } route_lv2_audio->sequencer_input = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_route_lv2_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRouteLv2Audio *route_lv2; route_lv2 = AGS_ROUTE_LV2_AUDIO(gobject); switch(prop_id){ case PROP_NOTATION_INPUT: { g_value_set_object(value, route_lv2->notation_input); } break; case PROP_SEQUENCER_INPUT: { g_value_set_object(value, route_lv2->sequencer_input); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_route_lv2_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./notation-input[0]", 18)){ g_object_set(G_OBJECT(plugin), "notation-input", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./sequencer-input[0]", 18)){ g_object_set(G_OBJECT(plugin), "sequencer-input", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_route_lv2_audio_dispose(GObject *gobject) { AgsRouteLv2Audio *route_lv2_audio; route_lv2_audio = AGS_ROUTE_LV2_AUDIO(gobject); /* notation input */ if(route_lv2_audio->notation_input != NULL){ g_object_unref(G_OBJECT(route_lv2_audio->notation_input)); route_lv2_audio->notation_input = NULL; } /* sequencer input */ if(route_lv2_audio->sequencer_input != NULL){ g_object_unref(G_OBJECT(route_lv2_audio->sequencer_input)); route_lv2_audio->sequencer_input = NULL; } /* call parent */ G_OBJECT_CLASS(ags_route_lv2_audio_parent_class)->dispose(gobject); } void ags_route_lv2_audio_finalize(GObject *gobject) { AgsRouteLv2Audio *route_lv2_audio; route_lv2_audio = AGS_ROUTE_LV2_AUDIO(gobject); /* notation input */ if(route_lv2_audio->notation_input != NULL){ g_object_unref(G_OBJECT(route_lv2_audio->notation_input)); } /* sequencer input */ if(route_lv2_audio->sequencer_input != NULL){ g_object_unref(G_OBJECT(route_lv2_audio->sequencer_input)); } /* call parent */ G_OBJECT_CLASS(ags_route_lv2_audio_parent_class)->finalize(gobject); } /** * ags_route_lv2_audio_new: * * Creates an #AgsRouteLv2Audio * * Returns: a new #AgsRouteLv2Audio * * Since: 1.0.0 */ AgsRouteLv2Audio* ags_route_lv2_audio_new() { AgsRouteLv2Audio *route_lv2_audio; route_lv2_audio = (AgsRouteLv2Audio *) g_object_new(AGS_TYPE_ROUTE_LV2_AUDIO, NULL); return(route_lv2_audio); } gsequencer-1.4.24/ags/audio/recall/ags_peak_channel.c0000644000175000017500000006444513256163135017431 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_peak_channel_class_init(AgsPeakChannelClass *peak_channel); void ags_peak_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_peak_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_peak_channel_init(AgsPeakChannel *peak_channel); void ags_peak_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_peak_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_peak_channel_connect(AgsConnectable *connectable); void ags_peak_channel_disconnect(AgsConnectable *connectable); void ags_peak_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_peak_channel_dispose(GObject *gobject); void ags_peak_channel_finalize(GObject *gobject); static AgsPortDescriptor* ags_peak_channel_get_peak_port_descriptor(); /** * SECTION:ags_peak_channel * @short_description: peaks channel * @title: AgsPeakChannel * @section_id: * @include: ags/audio/recall/ags_peak_channel.h * * The #AgsPeakChannel class provides ports to the effect processor. */ enum{ PROP_0, PROP_SAMPLERATE, PROP_BUFFER_SIZE, PROP_FORMAT, PROP_BUFFER_CLEARED, PROP_BUFFER_COMPUTED, PROP_SCALE_PRECISION, PROP_PEAK, }; static gpointer ags_peak_channel_parent_class = NULL; static AgsConnectableInterface *ags_peak_channel_parent_connectable_interface; static AgsPluginInterface *ags_peak_channel_parent_plugin_interface; static const gchar *ags_peak_channel_plugin_name = "ags-peak"; static const gchar *ags_peak_channel_plugin_specifier[] = { "./buffer-cleared[0]", "./buffer-computed[0]", "./scale-precision[0]", "./peak[0]", }; static const gchar *ags_peak_channel_plugin_control_port[] = { "1/4", "2/4", "3/4", "4/4", }; GType ags_peak_channel_get_type() { static GType ags_type_peak_channel = 0; if(!ags_type_peak_channel){ static const GTypeInfo ags_peak_channel_info = { sizeof (AgsPeakChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_peak_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPeakChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_peak_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_peak_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_peak_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_peak_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsPeakChannel", &ags_peak_channel_info, 0); g_type_add_interface_static(ags_type_peak_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_peak_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_peak_channel); } void ags_peak_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_peak_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_peak_channel_connect; connectable->disconnect = ags_peak_channel_disconnect; } void ags_peak_channel_plugin_interface_init(AgsPluginInterface *plugin) { ags_peak_channel_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->set_ports = ags_peak_channel_set_ports; } void ags_peak_channel_class_init(AgsPeakChannelClass *peak_channel) { GObjectClass *gobject; GParamSpec *param_spec; ags_peak_channel_parent_class = g_type_class_peek_parent(peak_channel); /* GObjectClass */ gobject = (GObjectClass *) peak_channel; gobject->set_property = ags_peak_channel_set_property; gobject->get_property = ags_peak_channel_get_property; gobject->dispose = ags_peak_channel_dispose; gobject->finalize = ags_peak_channel_finalize; /* properties */ /** * AgsAudioSignal:samplerate: * * The samplerate to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("using samplerate"), i18n_pspec("The samplerate to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsAudioSignal:buffer-size: * * The buffer size to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("using buffer size"), i18n_pspec("The buffer size to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsAudioSignal:format: * * The format to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("using format"), i18n_pspec("The format to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsPeakChannel:buffer-cleared: * * The property indicating if buffer was cleared. * * Since: 1.0.0 */ param_spec = g_param_spec_object("buffer-cleared", i18n_pspec("if buffer was cleared"), i18n_pspec("The buffer was cleared during this run"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_CLEARED, param_spec); /** * AgsPeakChannel:buffer-computed: * * The property indicating if buffer was computed. * * Since: 1.0.0 */ param_spec = g_param_spec_object("buffer-computed", i18n_pspec("if buffer was computed"), i18n_pspec("The buffer was computed during this run"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_COMPUTED, param_spec); /** * AgsPeakChannel:scale-precision: * * The property indicating if scale was precision. * * Since: 1.0.0 */ param_spec = g_param_spec_object("scale-precision", i18n_pspec("scale precision"), i18n_pspec("The scale precision to multiply the peak"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCALE_PRECISION, param_spec); /** * AgsPeakChannel:peak: * * The peak of the channel. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("peak", i18n_pspec("peak of channel"), i18n_pspec("The peak of channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PEAK, param_spec); } void ags_peak_channel_init(AgsPeakChannel *peak_channel) { AgsResetPeak *reset_peak; AgsConfig *config; GList *port; gchar *str; pthread_mutexattr_t *attr; AGS_RECALL(peak_channel)->flags |= AGS_RECALL_HAS_OUTPUT_PORT; AGS_RECALL(peak_channel)->name = "ags-peak"; AGS_RECALL(peak_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(peak_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(peak_channel)->xml_type = "ags-peak-channel"; config = ags_config_get_instance(); /* buffer field */ peak_channel->buffer_mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif peak_channel->buffer_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(peak_channel->buffer_mutex, attr); /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ peak_channel->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); }else{ peak_channel->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } /* buffer-size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ peak_channel->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); }else{ peak_channel->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ peak_channel->format = g_ascii_strtoull(str, NULL, 10); free(str); }else{ peak_channel->format = AGS_SOUNDCARD_SIGNED_16_BIT; } peak_channel->buffer = ags_stream_alloc(peak_channel->buffer_size, peak_channel->format); /* ports */ port = NULL; /* buffer cleared */ peak_channel->buffer_cleared = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_peak_channel_plugin_name, "specifier", ags_peak_channel_plugin_specifier[0], "control-port", ags_peak_channel_plugin_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(peak_channel->buffer_cleared); peak_channel->buffer_cleared->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, peak_channel->buffer_cleared); g_object_ref(peak_channel->buffer_cleared); /* buffer computed */ peak_channel->buffer_computed = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_peak_channel_plugin_name, "specifier", ags_peak_channel_plugin_specifier[1], "control-port", ags_peak_channel_plugin_control_port[1], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(peak_channel->buffer_computed); peak_channel->buffer_computed->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, peak_channel->buffer_computed); g_object_ref(peak_channel->buffer_computed); /* peak */ peak_channel->scale_precision = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_peak_channel_plugin_name, "specifier", ags_peak_channel_plugin_specifier[2], "control-port", ags_peak_channel_plugin_control_port[2], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, "port-value-size", sizeof(gfloat), "port-value-length", 1, NULL); g_object_ref(peak_channel->scale_precision); peak_channel->scale_precision->port_value.ags_port_float = 10.0; /* add to port */ port = g_list_prepend(port, peak_channel->scale_precision); g_object_ref(peak_channel->scale_precision); /* peak */ peak_channel->peak = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_peak_channel_plugin_name, "specifier", ags_peak_channel_plugin_specifier[3], "control-port", ags_peak_channel_plugin_control_port[3], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, "port-value-size", sizeof(gfloat), "port-value-length", 1, NULL); g_object_ref(peak_channel->peak); peak_channel->peak->flags |= AGS_PORT_IS_OUTPUT; peak_channel->peak->port_value.ags_port_float = 0.0; /* port descriptor */ peak_channel->peak->port_descriptor = ags_peak_channel_get_peak_port_descriptor(); /* add to port */ port = g_list_prepend(port, peak_channel->peak); g_object_ref(peak_channel->peak); /* set port */ AGS_RECALL(peak_channel)->port = port; /* add to reset peak task */ reset_peak = ags_reset_peak_get_instance(); ags_reset_peak_add(reset_peak, peak_channel); } void ags_peak_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPeakChannel *peak_channel; peak_channel = AGS_PEAK_CHANNEL(gobject); switch(prop_id){ case PROP_PEAK: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == peak_channel->peak){ return; } if(peak_channel->peak != NULL){ g_object_unref(G_OBJECT(peak_channel->peak)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } peak_channel->peak = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_peak_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPeakChannel *peak_channel; peak_channel = AGS_PEAK_CHANNEL(gobject); switch(prop_id){ case PROP_PEAK: { g_value_set_object(value, peak_channel->peak); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_peak_channel_dispose(GObject *gobject) { AgsPeakChannel *peak_channel; AgsResetPeak *reset_peak; peak_channel = AGS_PEAK_CHANNEL(gobject); /* buffer cleared */ if(peak_channel->buffer_cleared != NULL){ g_object_unref(G_OBJECT(peak_channel->buffer_cleared)); peak_channel->buffer_cleared = NULL; } /* buffer computed */ if(peak_channel->buffer_computed != NULL){ g_object_unref(G_OBJECT(peak_channel->buffer_computed)); peak_channel->buffer_computed = NULL; } /* scale precision */ if(peak_channel->scale_precision != NULL){ g_object_unref(G_OBJECT(peak_channel->scale_precision)); peak_channel->scale_precision = NULL; } /* peak */ if(peak_channel->peak != NULL){ g_object_unref(G_OBJECT(peak_channel->peak)); peak_channel->peak = NULL; } /* reset peak task */ reset_peak = ags_reset_peak_get_instance(); ags_reset_peak_remove(reset_peak, peak_channel); /* call parent */ G_OBJECT_CLASS(ags_peak_channel_parent_class)->dispose(gobject); } void ags_peak_channel_finalize(GObject *gobject) { AgsPeakChannel *peak_channel; AgsResetPeak *reset_peak; peak_channel = AGS_PEAK_CHANNEL(gobject); /* buffer field */ pthread_mutex_destroy(peak_channel->buffer_mutex); free(peak_channel->buffer_mutex); pthread_mutexattr_destroy(peak_channel->buffer_mutexattr); free(peak_channel->buffer_mutexattr); free(peak_channel->buffer); /* buffer cleared */ if(peak_channel->buffer_cleared != NULL){ g_object_unref(G_OBJECT(peak_channel->buffer_cleared)); } /* buffer computed */ if(peak_channel->buffer_computed != NULL){ g_object_unref(G_OBJECT(peak_channel->buffer_computed)); } /* scale precision */ if(peak_channel->scale_precision != NULL){ g_object_unref(G_OBJECT(peak_channel->scale_precision)); } /* peak */ if(peak_channel->peak != NULL){ g_object_unref(G_OBJECT(peak_channel->peak)); } /* reset peak task */ reset_peak = ags_reset_peak_get_instance(); ags_reset_peak_remove(reset_peak, peak_channel); /* call parent */ G_OBJECT_CLASS(ags_peak_channel_parent_class)->finalize(gobject); } void ags_peak_channel_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_peak_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_peak_channel_disconnect(AgsConnectable *connectable) { ags_peak_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_peak_channel_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./peak[0]", 9)){ g_object_set(G_OBJECT(plugin), "peak", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_peak_channel_retrieve_peak(AgsPeakChannel *peak_channel, gboolean is_play) { AgsAudio *audio; AgsChannel *source; AgsRecycling *recycling, *recycling_end_region, *tmp; AgsMutexManager *mutex_manager; GList *audio_signal; gchar *str; static const double scale_precision = 10.0; signed short *buffer; double current_value; guint buffer_size; guint limit; guint i; guint copy_mode; gboolean output_has_recycling, input_has_recycling; GValue *value; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; if(peak_channel == NULL){ return; } source = AGS_RECALL_CHANNEL(peak_channel)->source; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = AGS_AUDIO(source->audio); recycling = source->first_recycling; tmp = source->last_recycling; buffer_size = source->buffer_size; pthread_mutex_unlock(channel_mutex); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some flags */ pthread_mutex_lock(audio_mutex); input_has_recycling = ((AGS_AUDIO_INPUT_HAS_RECYCLING & (AGS_AUDIO(source->audio)->flags)) != 0) ? TRUE: FALSE; output_has_recycling = ((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (AGS_AUDIO(source->audio)->flags)) != 0) ? TRUE: FALSE; pthread_mutex_unlock(audio_mutex); /* lookup recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) tmp); pthread_mutex_unlock(application_mutex); /* get end region */ pthread_mutex_lock(recycling_mutex); recycling_end_region = tmp->next; pthread_mutex_unlock(recycling_mutex); /* initialize buffer */ buffer = (signed short *) malloc(buffer_size * sizeof(signed short)); memset(buffer, 0, buffer_size * sizeof(signed short)); while(recycling != recycling_end_region){ /* lookup recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* get current peak */ pthread_mutex_lock(recycling_mutex); audio_signal = recycling->audio_signal; while(audio_signal != NULL){ copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(AGS_SOUNDCARD_SIGNED_16_BIT), ags_audio_buffer_util_format_from_soundcard(AGS_AUDIO_SIGNAL(audio_signal->data)->format)); if((AGS_IS_INPUT(source) && input_has_recycling) || (AGS_IS_OUTPUT(source) && output_has_recycling)){ if((AGS_AUDIO_SIGNAL_TEMPLATE & (AGS_AUDIO_SIGNAL(audio_signal->data)->flags)) == 0 && AGS_AUDIO_SIGNAL(audio_signal->data)->stream_current != NULL){ /* copy buffer 1:1 */ ags_audio_buffer_util_copy_buffer_to_buffer(buffer, 1, 0, AGS_AUDIO_SIGNAL(audio_signal->data)->stream_current->data, 1, 0, buffer_size, copy_mode); } }else{ if((AGS_AUDIO_SIGNAL_TEMPLATE & (AGS_AUDIO_SIGNAL(audio_signal->data)->flags)) == 0 && AGS_AUDIO_SIGNAL(audio_signal->data)->stream_current != NULL){ /* copy buffer 1:1 */ ags_audio_buffer_util_copy_buffer_to_buffer(buffer, 1, 0, AGS_AUDIO_SIGNAL(audio_signal->data)->stream_current->data, 1, 0, buffer_size, copy_mode); } } audio_signal = audio_signal->next; } recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } /* calculate average value */ current_value = 0.0; limit = buffer_size - 8; for(i = 0; i < limit; i += 8){ /* unrolled loop */ if(buffer[i] != 0){ current_value += (1.0 / (1.0 / (double) G_MAXUINT16 * buffer[i])); } if(buffer[i + 1] != 0){ current_value += (1.0 / (1.0 / (double) G_MAXUINT16 * buffer[i + 1])); } if(buffer[i + 2] != 0){ current_value += (1.0 / (1.0 / (double) G_MAXUINT16 * buffer[i + 2])); } if(buffer[i + 3] != 0){ current_value += (1.0 / (1.0 / (double) G_MAXUINT16 * buffer[i + 3])); } if(buffer[i + 4] != 0){ current_value += (1.0 / (1.0 / (double) G_MAXUINT16 * buffer[i + 4])); } if(buffer[i + 5] != 0){ current_value += (1.0 / (1.0 / (double) G_MAXUINT16 * buffer[i + 5])); } if(buffer[i + 6] != 0){ current_value += (1.0 / (1.0 / (double) G_MAXUINT16 * buffer[i + 6])); } if(buffer[i + 7] != 0){ current_value += (1.0 / (1.0 / (double) G_MAXUINT16 * buffer[i + 7])); } } for(; i < buffer_size; i++){ if(buffer[i] != 0){ current_value += (1.0 / (1.0 / (double) G_MAXUINT16 * buffer[i])); } } /* break down to scale */ //TODO:JK: verify me if(current_value != 0.0){ current_value = scale_precision * (atan(1.0 / 440.0) / sin(current_value / 22000.0)); } value = g_new0(GValue, 1); g_value_init(value, G_TYPE_FLOAT); if(current_value < 0.0){ current_value *= -1.0; } g_value_set_float(value, current_value); ags_port_safe_write(peak_channel->peak, value); g_value_unset(value); g_free(value); /* free buffer */ free(buffer); } void ags_peak_channel_buffer_add(AgsPeakChannel *peak_channel, void *buffer, guint samplerate, guint buffer_size, guint format) { void *buffer_source; guint copy_mode; gboolean resample; if(peak_channel == NULL){ return; } resample = FALSE; pthread_mutex_lock(peak_channel->buffer_mutex); copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(peak_channel->format), ags_audio_buffer_util_format_from_soundcard(format)); if(samplerate != peak_channel->samplerate){ buffer_source = ags_audio_buffer_util_resample(buffer, 1, ags_audio_buffer_util_format_from_soundcard(format), samplerate, buffer_size, peak_channel->samplerate); resample = TRUE; }else{ buffer_source = buffer; } ags_audio_buffer_util_copy_buffer_to_buffer(peak_channel->buffer, 1, 0, buffer_source, 1, 0, peak_channel->buffer_size, copy_mode); pthread_mutex_unlock(peak_channel->buffer_mutex); if(resample){ free(buffer_source); } } void ags_peak_channel_retrieve_peak_internal(AgsPeakChannel *peak_channel) { void *buffer; gdouble scale_precision; gdouble current_value; GValue value = {0,}; if(peak_channel == NULL){ return; } pthread_mutex_lock(peak_channel->buffer_mutex); buffer = peak_channel->buffer; pthread_mutex_unlock(peak_channel->buffer_mutex); /* calculate average value */ current_value = ags_audio_buffer_util_peak(buffer, 1, ags_audio_buffer_util_format_from_soundcard(peak_channel->format), peak_channel->buffer_size, 440.0, 22000.0, 1.0); /* break down to scale */ g_value_init(&value, G_TYPE_FLOAT); ags_port_safe_read(peak_channel->scale_precision, &value); scale_precision = g_value_get_float(&value); current_value *= scale_precision; if(current_value < 0.0){ current_value *= -1.0; } /* set peak */ g_value_set_float(&value, current_value); ags_port_safe_write(peak_channel->peak, &value); g_value_unset(&value); } static AgsPortDescriptor* ags_peak_channel_get_peak_port_descriptor() { static AgsPortDescriptor *port_descriptor = NULL; if(port_descriptor == NULL){ port_descriptor = ags_port_descriptor_alloc(); port_descriptor->flags |= (AGS_PORT_DESCRIPTOR_INPUT | AGS_PORT_DESCRIPTOR_CONTROL); port_descriptor->port_index = 0; /* range */ g_value_init(port_descriptor->default_value, G_TYPE_FLOAT); g_value_init(port_descriptor->lower_value, G_TYPE_FLOAT); g_value_init(port_descriptor->upper_value, G_TYPE_FLOAT); g_value_set_float(port_descriptor->default_value, 0.0); g_value_set_float(port_descriptor->lower_value, 0.0); g_value_set_float(port_descriptor->upper_value, 10.0); } return(port_descriptor); } /** * ags_peak_channel_new: * @source: the #AgsChannel as source * * Creates an #AgsPeakChannel * * Returns: a new #AgsPeakChannel * * Since: 1.0.0 */ AgsPeakChannel* ags_peak_channel_new(AgsChannel *source) { AgsPeakChannel *peak_channel; peak_channel = (AgsPeakChannel *) g_object_new(AGS_TYPE_PEAK_CHANNEL, "channel", source, NULL); return(peak_channel); } gsequencer-1.4.24/ags/audio/recall/ags_volume_recycling.h0000644000175000017500000000402513246707333020363 00000000000000/* 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 . */ #ifndef __AGS_VOLUME_RECYCLING_H__ #define __AGS_VOLUME_RECYCLING_H__ #include #include #include #define AGS_TYPE_VOLUME_RECYCLING (ags_volume_recycling_get_type()) #define AGS_VOLUME_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_VOLUME_RECYCLING, AgsVolumeRecycling)) #define AGS_VOLUME_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_VOLUME_RECYCLING, AgsVolumeRecyclingClass)) #define AGS_IS_VOLUME_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_VOLUME_RECYCLING)) #define AGS_IS_VOLUME_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_VOLUME_RECYCLING)) #define AGS_VOLUME_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_VOLUME_RECYCLING, AgsVolumeRecyclingClass)) typedef struct _AgsVolumeRecycling AgsVolumeRecycling; typedef struct _AgsVolumeRecyclingClass AgsVolumeRecyclingClass; struct _AgsVolumeRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsVolumeRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_volume_recycling_get_type(); AgsVolumeRecycling* ags_volume_recycling_new(AgsRecycling *recycling); #endif /*__AGS_VOLUME_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_route_lv2_audio.h0000644000175000017500000000377213246707333020127 00000000000000/* 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 . */ #ifndef __AGS_ROUTE_LV2_AUDIO_H__ #define __AGS_ROUTE_LV2_AUDIO_H__ #include #include #include #define AGS_TYPE_ROUTE_LV2_AUDIO (ags_route_lv2_audio_get_type()) #define AGS_ROUTE_LV2_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ROUTE_LV2_AUDIO, AgsRouteLv2Audio)) #define AGS_ROUTE_LV2_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ROUTE_LV2_AUDIO, AgsRouteLv2Audio)) #define AGS_IS_ROUTE_LV2_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ROUTE_LV2_AUDIO)) #define AGS_IS_ROUTE_LV2_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ROUTE_LV2_AUDIO)) #define AGS_ROUTE_LV2_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_ROUTE_LV2_AUDIO, AgsRouteLv2AudioClass)) typedef struct _AgsRouteLv2Audio AgsRouteLv2Audio; typedef struct _AgsRouteLv2AudioClass AgsRouteLv2AudioClass; struct _AgsRouteLv2Audio { AgsRecallAudio recall_audio; AgsPort *notation_input; AgsPort *sequencer_input; }; struct _AgsRouteLv2AudioClass { AgsRecallAudioClass recall_audio; }; GType ags_route_lv2_audio_get_type(); AgsRouteLv2Audio* ags_route_lv2_audio_new(); #endif /*__AGS_ROUTE_LV2_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_feed_recycling.c0000644000175000017500000001617113246707333017757 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_feed_recycling_class_init(AgsFeedRecyclingClass *feed_recycling); void ags_feed_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_feed_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_feed_recycling_init(AgsFeedRecycling *feed_recycling); void ags_feed_recycling_connect(AgsConnectable *connectable); void ags_feed_recycling_disconnect(AgsConnectable *connectable); void ags_feed_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_feed_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_feed_recycling_finalize(GObject *gobject); AgsRecall* ags_feed_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_feed_recycling * @short_description: feeds recycling * @title: AgsFeedRecycling * @section_id: * @include: ags/audio/recall/ags_feed_recycling.h * * The #AgsFeedRecycling class feeds the recycling. */ static gpointer ags_feed_recycling_parent_class = NULL; static AgsConnectableInterface *ags_feed_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_feed_recycling_parent_dynamic_connectable_interface; GType ags_feed_recycling_get_type() { static GType ags_type_feed_recycling = 0; if(!ags_type_feed_recycling){ static const GTypeInfo ags_feed_recycling_info = { sizeof (AgsFeedRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_feed_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFeedRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_feed_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_feed_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_feed_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_feed_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsFeedRecycling", &ags_feed_recycling_info, 0); g_type_add_interface_static(ags_type_feed_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_feed_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_feed_recycling); } void ags_feed_recycling_class_init(AgsFeedRecyclingClass *feed_recycling) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_feed_recycling_parent_class = g_type_class_peek_parent(feed_recycling); /* GObjectClass */ gobject = (GObjectClass *) feed_recycling; gobject->finalize = ags_feed_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) feed_recycling; recall->duplicate = ags_feed_recycling_duplicate; } void ags_feed_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_feed_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_feed_recycling_connect; connectable->disconnect = ags_feed_recycling_disconnect; } void ags_feed_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_feed_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_feed_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_feed_recycling_disconnect_dynamic; } void ags_feed_recycling_init(AgsFeedRecycling *feed_recycling) { AGS_RECALL(feed_recycling)->name = "ags-feed"; AGS_RECALL(feed_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(feed_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(feed_recycling)->xml_type = "ags-feed-recycling"; AGS_RECALL(feed_recycling)->port = NULL; AGS_RECALL(feed_recycling)->child_type = AGS_TYPE_FEED_AUDIO_SIGNAL; AGS_RECALL_RECYCLING(feed_recycling)->flags |= (AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE); } void ags_feed_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_feed_recycling_parent_class)->finalize(gobject); } void ags_feed_recycling_connect(AgsConnectable *connectable) { /* call parent */ ags_feed_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_feed_recycling_disconnect(AgsConnectable *connectable) { /* call parent */ ags_feed_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_feed_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_feed_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_feed_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_feed_recycling_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } AgsRecall* ags_feed_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsFeedRecycling *copy; copy = (AgsFeedRecycling *) AGS_RECALL_CLASS(ags_feed_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_feed_recycling_new: * @recycling: the source #AgsRecycling * * Creates an #AgsFeedRecycling * * Returns: a new #AgsFeedRecycling * * Since: 1.0.0 */ AgsFeedRecycling* ags_feed_recycling_new(AgsRecycling *recycling) { AgsFeedRecycling *feed_recycling; feed_recycling = (AgsFeedRecycling *) g_object_new(AGS_TYPE_FEED_RECYCLING, "source", recycling, NULL); return(feed_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_play_audio_signal.c0000644000175000017500000003273013247044247020476 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_play_audio_signal_class_init(AgsPlayAudioSignalClass *play_audio_signal); void ags_play_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_play_audio_signal_init(AgsPlayAudioSignal *play_audio_signal); void ags_play_audio_signal_connect(AgsConnectable *connectable); void ags_play_audio_signal_disconnect(AgsConnectable *connectable); void ags_play_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_audio_signal_finalize(GObject *gobject); void ags_play_audio_signal_run_init_pre(AgsRecall *recall); void ags_play_audio_signal_run_inter(AgsRecall *recall); AgsRecall* ags_play_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_play_audio_signal * @short_description: plays audio signal * @title: AgsPlayAudioSignal * @section_id: * @include: ags/audio/recall/ags_play_audio_signal.h * * The #AgsPlayAudioSignal class plays the audio signal. */ static gpointer ags_play_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_play_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_play_audio_signal_parent_dynamic_connectable_interface; GType ags_play_audio_signal_get_type() { static GType ags_type_play_audio_signal = 0; if(!ags_type_play_audio_signal){ static const GTypeInfo ags_play_audio_signal_info = { sizeof (AgsPlayAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_play_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsPlayAudioSignal", &ags_play_audio_signal_info, 0); g_type_add_interface_static(ags_type_play_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_play_audio_signal); } void ags_play_audio_signal_class_init(AgsPlayAudioSignalClass *play_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_play_audio_signal_parent_class = g_type_class_peek_parent(play_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) play_audio_signal; gobject->finalize = ags_play_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) play_audio_signal; recall->run_init_pre = ags_play_audio_signal_run_init_pre; recall->run_inter = ags_play_audio_signal_run_inter; recall->duplicate = ags_play_audio_signal_duplicate; } void ags_play_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_audio_signal_connect; connectable->disconnect = ags_play_audio_signal_disconnect; } void ags_play_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_play_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_play_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_play_audio_signal_disconnect_dynamic; } void ags_play_audio_signal_init(AgsPlayAudioSignal *play_audio_signal) { AGS_RECALL(play_audio_signal)->child_type = G_TYPE_NONE; } void ags_play_audio_signal_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_play_audio_signal_parent_class)->finalize(gobject); } void ags_play_audio_signal_connect(AgsConnectable *connectable) { ags_play_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_play_audio_signal_disconnect(AgsConnectable *connectable) { ags_play_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_play_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_play_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_play_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_play_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_play_audio_signal_run_init_pre(AgsRecall *recall) { /* call parent */ AGS_RECALL_CLASS(ags_play_audio_signal_parent_class)->run_init_pre(recall); /* empty */ } void ags_play_audio_signal_run_inter(AgsRecall *recall) { AgsRecallChannelRun *play_channel_run; AgsPlayChannel *play_channel; AgsPlayAudioSignal *play_audio_signal; AgsRecycling *recycling; AgsAudioSignal *source; AgsAudioSignal *template; AgsMutexManager *mutex_manager; GObject *soundcard; GList *note; GList *stream; void *buffer_source; void *buffer0, *buffer1; gboolean muted; guint audio_channel, pcm_channels; guint samplerate; guint buffer_size, soundcard_buffer_size; guint soundcard_format; guint copy_mode; gboolean resample; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *recycling_mutex; GValue muted_value = {0,}; GValue audio_channel_value = {0,}; play_audio_signal = AGS_PLAY_AUDIO_SIGNAL(recall); soundcard = recall->soundcard; if(soundcard == NULL){ g_warning("no soundcard"); return; } source = AGS_AUDIO_SIGNAL(AGS_RECALL_AUDIO_SIGNAL(play_audio_signal)->source); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup recycling mutex */ recycling = source->recycling; pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* lookup soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(soundcard_mutex); /* get presets */ ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), &pcm_channels, &samplerate, &soundcard_buffer_size, &soundcard_format); buffer0 = ags_soundcard_get_buffer(AGS_SOUNDCARD(soundcard)); // ags_soundcard_get_next_buffer(AGS_SOUNDCARD(soundcard)); buffer1 = NULL; if(buffer0 == NULL && buffer1 == NULL){ pthread_mutex_unlock(soundcard_mutex); g_warning("no output buffer"); return; } if(recall->parent == NULL || recall->parent->parent == NULL){ play_channel_run = NULL; play_channel = NULL; audio_channel = AGS_RECALL_AUDIO_SIGNAL(play_audio_signal)->audio_channel; }else{ play_channel_run = AGS_RECALL_CHANNEL_RUN(recall->parent->parent); play_channel = (AgsPlayChannel *) play_channel_run->recall_channel; g_value_init(&muted_value, G_TYPE_BOOLEAN); ags_port_safe_read(play_channel->muted, &muted_value); muted = g_value_get_boolean(&muted_value); g_value_unset(&muted_value); if(muted){ pthread_mutex_unlock(soundcard_mutex); return; } g_value_init(&audio_channel_value, G_TYPE_UINT64); ags_port_safe_read(play_channel->audio_channel, &audio_channel_value); audio_channel = g_value_get_uint64(&audio_channel_value); g_value_unset(&audio_channel_value); } buffer_size = source->buffer_size; copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(soundcard_format), ags_audio_buffer_util_format_from_soundcard(source->format)); if(source->rt_template != NULL){ /* get template */ template = source->rt_template; note = source->note; while(note != NULL){ AgsNote *current; guint rt_attack; guint64 offset; current = note->data; offset = current->rt_offset; pthread_mutex_lock(recycling_mutex); rt_attack = current->rt_attack; pthread_mutex_unlock(recycling_mutex); stream = source->stream_beginning; if(stream == NULL){ note = note->next; continue; } ags_audio_buffer_util_copy_buffer_to_buffer(buffer0, pcm_channels, audio_channel, stream->data, 1, 0, buffer_size, copy_mode); note = note->next; } }else{ stream = source->stream_current; if(stream == NULL){ pthread_mutex_unlock(soundcard_mutex); ags_recall_done(recall); ags_recycling_remove_audio_signal(source->recycling, source); g_object_unref(source); return; } /* check if resample */ buffer_source = stream->data; resample = FALSE; if(source->samplerate != samplerate){ buffer_source = ags_audio_buffer_util_resample(buffer_source, 1, ags_audio_buffer_util_format_from_soundcard(source->format), source->samplerate, buffer_size, samplerate); resample = TRUE; } if((AGS_RECALL_INITIAL_RUN & (AGS_RECALL_AUDIO_SIGNAL(recall)->flags)) != 0){ ags_audio_buffer_util_copy_buffer_to_buffer(buffer0, pcm_channels, audio_channel + source->attack * pcm_channels, buffer_source, 1, 0, soundcard_buffer_size - source->attack, copy_mode); }else{ if(source->attack != 0 && stream->prev != NULL){ void *buffer_source_prev; buffer_source_prev = stream->prev->data; if(resample){ buffer_source_prev = ags_audio_buffer_util_resample(buffer_source_prev, 1, ags_audio_buffer_util_format_from_soundcard(source->format), source->samplerate, source->length, samplerate); } ags_audio_buffer_util_copy_buffer_to_buffer(buffer0, pcm_channels, audio_channel, buffer_source_prev, 1, soundcard_buffer_size - source->attack, source->attack, copy_mode); if(resample){ free(buffer_source_prev); } } ags_audio_buffer_util_copy_buffer_to_buffer(buffer0, pcm_channels, audio_channel + source->attack * pcm_channels, buffer_source, 1, 0, soundcard_buffer_size - source->attack, copy_mode); } if(resample){ free(buffer_source); } } pthread_mutex_unlock(soundcard_mutex); /* call parent */ AGS_RECALL_CLASS(ags_play_audio_signal_parent_class)->run_inter(recall); } AgsRecall* ags_play_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPlayAudioSignal *copy; copy = (AgsPlayAudioSignal *) AGS_RECALL_CLASS(ags_play_audio_signal_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_play_audio_signal_new: * @source: the source #AgsAudioSignal * @soundcard: the #GObject outputting to * @audio_channel: the audio channel * * Creates an #AgsPlayAudioSignal * * Returns: a new #AgsPlayAudioSignal * * Since: 1.0.0 */ AgsPlayAudioSignal* ags_play_audio_signal_new(AgsAudioSignal *source, GObject *soundcard, guint audio_channel) { AgsPlayAudioSignal *play_audio_signal; play_audio_signal = (AgsPlayAudioSignal *) g_object_new(AGS_TYPE_PLAY_AUDIO_SIGNAL, "source", source, "soundcard", soundcard, "audio_channel", audio_channel, NULL); return(play_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_capture_sound_audio_run.h0000644000175000017500000000461213256163135021734 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_CAPTURE_SOUND_AUDIO_RUN_H__ #define __AGS_CAPTURE_SOUND_AUDIO_RUN_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_CAPTURE_SOUND_AUDIO_RUN (ags_capture_sound_audio_run_get_type()) #define AGS_CAPTURE_SOUND_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CAPTURE_SOUND_AUDIO_RUN, AgsCaptureSoundAudioRun)) #define AGS_CAPTURE_SOUND_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CAPTURE_SOUND_AUDIO_RUN, AgsCaptureSoundAudioRun)) #define AGS_IS_CAPTURE_SOUND_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CAPTURE_SOUND_AUDIO_RUN)) #define AGS_IS_CAPTURE_SOUND_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CAPTURE_SOUND_AUDIO_RUN)) #define AGS_CAPTURE_SOUND_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_CAPTURE_SOUND_AUDIO_RUN, AgsCaptureSoundAudioRunClass)) typedef struct _AgsCaptureSoundAudioRun AgsCaptureSoundAudioRun; typedef struct _AgsCaptureSoundAudioRunClass AgsCaptureSoundAudioRunClass; struct _AgsCaptureSoundAudioRun { AgsRecallAudioRun recall_audio_run; GObject *audio_file; }; struct _AgsCaptureSoundAudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_capture_sound_audio_run_get_type(); AgsCaptureSoundAudioRun* ags_capture_sound_audio_run_new(); #endif /*__AGS_CAPTURE_SOUND_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_buffer_recycling.h0000644000175000017500000000402513246707333020325 00000000000000/* 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 . */ #ifndef __AGS_BUFFER_RECYCLING_H__ #define __AGS_BUFFER_RECYCLING_H__ #include #include #include #define AGS_TYPE_BUFFER_RECYCLING (ags_buffer_recycling_get_type()) #define AGS_BUFFER_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BUFFER_RECYCLING, AgsBufferRecycling)) #define AGS_BUFFER_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_BUFFER_RECYCLING, AgsBufferRecyclingClass)) #define AGS_IS_BUFFER_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_BUFFER_RECYCLING)) #define AGS_IS_BUFFER_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_BUFFER_RECYCLING)) #define AGS_BUFFER_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_BUFFER_RECYCLING, AgsBufferRecyclingClass)) typedef struct _AgsBufferRecycling AgsBufferRecycling; typedef struct _AgsBufferRecyclingClass AgsBufferRecyclingClass; struct _AgsBufferRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsBufferRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_buffer_recycling_get_type(); AgsBufferRecycling* ags_buffer_recycling_new(AgsRecycling *recycling); #endif /*__AGS_BUFFER_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_mute_channel.h0000644000175000017500000000367113246707333017465 00000000000000/* 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 . */ #ifndef __AGS_MUTE_CHANNEL_H__ #define __AGS_MUTE_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_MUTE_CHANNEL (ags_mute_channel_get_type()) #define AGS_MUTE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTE_CHANNEL, AgsMuteChannel)) #define AGS_MUTE_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MUTE_CHANNEL, AgsMuteChannel)) #define AGS_IS_MUTE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MUTE_CHANNEL)) #define AGS_IS_MUTE_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MUTE_CHANNEL)) #define AGS_MUTE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_MUTE_CHANNEL, AgsMuteChannelClass)) typedef struct _AgsMuteChannel AgsMuteChannel; typedef struct _AgsMuteChannelClass AgsMuteChannelClass; struct _AgsMuteChannel { AgsRecallChannel recall_channel; AgsPort *muted; }; struct _AgsMuteChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_mute_channel_get_type(); AgsMuteChannel* ags_mute_channel_new(); #endif /*__AGS_MUTE_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_channel.h0000644000175000017500000000405513246707333017455 00000000000000/* 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 . */ #ifndef __AGS_PLAY_CHANNEL_H__ #define __AGS_PLAY_CHANNEL_H__ #include #include #include #include #include #define AGS_TYPE_PLAY_CHANNEL (ags_play_channel_get_type()) #define AGS_PLAY_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_CHANNEL, AgsPlayChannel)) #define AGS_PLAY_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_CHANNEL, AgsPlayChannelClass)) #define AGS_IS_PLAY_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PLAY_CHANNEL)) #define AGS_IS_PLAY_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PLAY_CHANNEL)) #define AGS_PLAY_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PLAY_CHANNEL, AgsPlayChannelClass)) typedef struct _AgsPlayChannel AgsPlayChannel; typedef struct _AgsPlayChannelClass AgsPlayChannelClass; struct _AgsPlayChannel { AgsRecallChannel recall_channel; AgsPort *audio_channel; AgsPort *muted; }; struct _AgsPlayChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_play_channel_get_type(); AgsPlayChannel* ags_play_channel_new(GObject *soundcard, guint audio_channel); #endif /*__AGS_PLAY_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_buffer_recycling.c0000644000175000017500000001662213246707333020326 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include void ags_buffer_recycling_class_init(AgsBufferRecyclingClass *buffer_recycling); void ags_buffer_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_buffer_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_buffer_recycling_init(AgsBufferRecycling *buffer_recycling); void ags_buffer_recycling_connect(AgsConnectable *connectable); void ags_buffer_recycling_disconnect(AgsConnectable *connectable); void ags_buffer_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_buffer_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_buffer_recycling_finalize(GObject *gobject); AgsRecall* ags_buffer_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_buffer_recycling_remove(AgsRecall *recall); /** * SECTION:ags_buffer_recycling * @short_description: buffers recycling * @title: AgsBufferRecycling * @section_id: * @include: ags/audio/recall/ags_buffer_recycling.h * * The #AgsBufferRecycling class buffers the recycling. */ static gpointer ags_buffer_recycling_parent_class = NULL; static AgsConnectableInterface *ags_buffer_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_buffer_recycling_parent_dynamic_connectable_interface; GType ags_buffer_recycling_get_type() { static GType ags_type_buffer_recycling = 0; if(!ags_type_buffer_recycling){ static const GTypeInfo ags_buffer_recycling_info = { sizeof (AgsBufferRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_buffer_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsBufferRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_buffer_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_buffer_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_buffer_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_buffer_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsBufferRecycling", &ags_buffer_recycling_info, 0); g_type_add_interface_static(ags_type_buffer_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_buffer_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_buffer_recycling); } void ags_buffer_recycling_class_init(AgsBufferRecyclingClass *buffer_recycling) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_buffer_recycling_parent_class = g_type_class_peek_parent(buffer_recycling); /* GObjectClass */ gobject = (GObjectClass *) buffer_recycling; gobject->finalize = ags_buffer_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) buffer_recycling; recall->duplicate = ags_buffer_recycling_duplicate; } void ags_buffer_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_buffer_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_buffer_recycling_connect; connectable->disconnect = ags_buffer_recycling_disconnect; } void ags_buffer_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_buffer_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_buffer_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_buffer_recycling_disconnect_dynamic; } void ags_buffer_recycling_init(AgsBufferRecycling *buffer_recycling) { AGS_RECALL(buffer_recycling)->name = "ags-buffer"; AGS_RECALL(buffer_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(buffer_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(buffer_recycling)->xml_type = "ags-buffer-recycling"; AGS_RECALL(buffer_recycling)->port = NULL; AGS_RECALL(buffer_recycling)->child_type = AGS_TYPE_BUFFER_AUDIO_SIGNAL; AGS_RECALL_RECYCLING(buffer_recycling)->flags |= (AGS_RECALL_RECYCLING_MAP_CHILD_DESTINATION | AGS_RECALL_RECYCLING_CREATE_DESTINATION_ON_MAP_SOURCE); } void ags_buffer_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_buffer_recycling_parent_class)->finalize(gobject); } void ags_buffer_recycling_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_buffer_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_buffer_recycling_disconnect(AgsConnectable *connectable) { ags_buffer_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_buffer_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } ags_buffer_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_buffer_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_buffer_recycling_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } AgsRecall* ags_buffer_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsBufferRecycling *copy; copy = (AgsBufferRecycling *) AGS_RECALL_CLASS(ags_buffer_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_buffer_recycling_new: * @recycling: an #AgsRecycling * * Creates an #AgsBufferRecycling * * Returns: a new #AgsBufferRecycling * * Since: 1.0.0 */ AgsBufferRecycling* ags_buffer_recycling_new(AgsRecycling *recycling) { AgsBufferRecycling *buffer_recycling; buffer_recycling = (AgsBufferRecycling *) g_object_new(AGS_TYPE_BUFFER_RECYCLING, "source", recycling, NULL); return(buffer_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_delay_audio.h0000644000175000017500000000442413256163135017274 00000000000000/* 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 . */ #ifndef __AGS_DELAY_AUDIO_H__ #define __AGS_DELAY_AUDIO_H__ #include #include #include #define AGS_TYPE_DELAY_AUDIO (ags_delay_audio_get_type()) #define AGS_DELAY_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DELAY_AUDIO, AgsDelayAudio)) #define AGS_DELAY_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_DELAY_AUDIO, AgsDelayAudio)) #define AGS_IS_DELAY_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_DELAY_AUDIO)) #define AGS_IS_DELAY_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_DELAY_AUDIO)) #define AGS_DELAY_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_DELAY_AUDIO, AgsDelayAudioClass)) typedef struct _AgsDelayAudio AgsDelayAudio; typedef struct _AgsDelayAudioClass AgsDelayAudioClass; struct _AgsDelayAudio { AgsRecallAudio recall_audio; AgsPort *bpm; AgsPort *tact; AgsPort *notation_delay; AgsPort *sequencer_delay; AgsPort *sequencer_duration; AgsPort *notation_duration; }; struct _AgsDelayAudioClass { AgsRecallAudioClass recall_audio; void (*notation_duration_changed)(AgsDelayAudio *delay_audio); void (*sequencer_duration_changed)(AgsDelayAudio *delay_audio); }; GType ags_delay_audio_get_type(); void ags_delay_audio_notation_duration_changed(AgsDelayAudio *delay_audio); void ags_delay_audio_sequencer_duration_changed(AgsDelayAudio *delay_audio); AgsDelayAudio* ags_delay_audio_new(); #endif /*__AGS_DELAY_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_count_beats_audio_run.c0000644000175000017500000014700213256163135021363 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_count_beats_audio_run_class_init(AgsCountBeatsAudioRunClass *count_beats_audio_run); void ags_count_beats_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_count_beats_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_count_beats_audio_run_seekable_interface_init(AgsSeekableInterface *seekable); void ags_count_beats_audio_run_countable_interface_init(AgsCountableInterface *countable); void ags_count_beats_audio_run_tactable_interface_init(AgsTactableInterface *tactable); void ags_count_beats_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_count_beats_audio_run_init(AgsCountBeatsAudioRun *count_beats_audio_run); void ags_count_beats_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_count_beats_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_count_beats_audio_run_dispose(GObject *gobject); void ags_count_beats_audio_run_finalize(GObject *gobject); void ags_count_beats_audio_run_connect(AgsConnectable *connectable); void ags_count_beats_audio_run_disconnect(AgsConnectable *connectable); void ags_count_beats_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_count_beats_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_count_beats_audio_run_seek(AgsSeekable *seekable, guint steps, gboolean forward); guint ags_count_beats_audio_run_get_notation_counter(AgsCountable *countable); guint ags_count_beats_audio_run_get_sequencer_counter(AgsCountable *countable); void ags_count_beats_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_count_beats_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_count_beats_audio_run_notify_soundcard_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data); void ags_count_beats_audio_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_count_beats_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_count_beats_audio_run_notify_dependency(AgsRecall *recall, guint notify_mode, gint count); void ags_count_beats_audio_run_run_init_pre(AgsRecall *recall); void ags_count_beats_audio_run_done(AgsRecall *recall); gdouble ags_count_beats_audio_run_get_bpm(AgsTactable *tactable); gdouble ags_count_beats_audio_run_get_tact(AgsTactable *tactable); void ags_count_beats_audio_run_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm); void ags_count_beats_audio_run_change_tact(AgsTactable *tactable, gdouble new_tact, gdouble old_tact); void ags_count_beats_audio_run_notation_alloc_output_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCountBeatsAudioRun *count_beats_audio_run); void ags_count_beats_audio_run_notation_count_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCountBeatsAudioRun *count_beats_audio_run); void ags_count_beats_audio_run_sequencer_alloc_output_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCountBeatsAudioRun *count_beats_audio_run); void ags_count_beats_audio_run_sequencer_count_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCountBeatsAudioRun *count_beats_audio_run); void ags_count_beats_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_count_beats_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_count_beats_audio_run_stream_audio_signal_done_callback(AgsRecall *recall, AgsCountBeatsAudioRun *count_beats_audio_run); void ags_count_beats_audio_run_stop(AgsCountBeatsAudioRun *count_beats_audio_run, gboolean notation); /** * SECTION:ags_count_beats_audio_run * @short_description: count beats * @title: AgsCountBeatsAudioRun * @section_id: * @include: ags/audio/recall/ags_count_beats_audio_run.h * * The #AgsCountBeatsAudioRun class count beats. */ enum{ NOTATION_LOOP, NOTATION_START, NOTATION_STOP, SEQUENCER_LOOP, SEQUENCER_START, SEQUENCER_STOP, LAST_SIGNAL, }; enum{ PROP_0, PROP_DELAY_AUDIO_RUN, PROP_NOTATION_COUNTER, PROP_SEQUENCER_COUNTER, }; static gpointer ags_count_beats_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_count_beats_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_count_beats_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_count_beats_audio_run_parent_plugin_interface; static guint count_beats_audio_run_signals[LAST_SIGNAL]; GType ags_count_beats_audio_run_get_type() { static GType ags_type_count_beats_audio_run = 0; if(!ags_type_count_beats_audio_run){ static const GTypeInfo ags_count_beats_audio_run_info = { sizeof (AgsCountBeatsAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_count_beats_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCountBeatsAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_count_beats_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_count_beats_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_count_beats_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_seekable_interface_info = { (GInterfaceInitFunc) ags_count_beats_audio_run_seekable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_countable_interface_info = { (GInterfaceInitFunc) ags_count_beats_audio_run_countable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_tactable_interface_info = { (GInterfaceInitFunc) ags_count_beats_audio_run_tactable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_count_beats_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_count_beats_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsCountBeatsAudioRun", &ags_count_beats_audio_run_info, 0); g_type_add_interface_static(ags_type_count_beats_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_count_beats_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_count_beats_audio_run, AGS_TYPE_COUNTABLE, &ags_countable_interface_info); g_type_add_interface_static(ags_type_count_beats_audio_run, AGS_TYPE_SEEKABLE, &ags_seekable_interface_info); g_type_add_interface_static(ags_type_count_beats_audio_run, AGS_TYPE_TACTABLE, &ags_tactable_interface_info); g_type_add_interface_static(ags_type_count_beats_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_count_beats_audio_run); } void ags_count_beats_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_count_beats_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_count_beats_audio_run_connect; connectable->disconnect = ags_count_beats_audio_run_disconnect; } void ags_count_beats_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_count_beats_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_count_beats_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_count_beats_audio_run_disconnect_dynamic; } void ags_count_beats_audio_run_seekable_interface_init(AgsSeekableInterface *seekable) { seekable->seek = ags_count_beats_audio_run_seek; } void ags_count_beats_audio_run_countable_interface_init(AgsCountableInterface *countable) { countable->get_notation_counter = ags_count_beats_audio_run_get_notation_counter; countable->get_sequencer_counter = ags_count_beats_audio_run_get_sequencer_counter; } void ags_count_beats_audio_run_tactable_interface_init(AgsTactableInterface *tactable) { tactable->get_bpm = ags_count_beats_audio_run_get_bpm; tactable->get_tact = ags_count_beats_audio_run_get_tact; tactable->get_sequencer_duration = NULL; tactable->get_notation_duration = NULL; tactable->change_sequencer_duration = NULL; tactable->change_notation_duration = NULL; tactable->change_bpm = ags_count_beats_audio_run_change_bpm; tactable->change_tact = ags_count_beats_audio_run_change_tact; } void ags_count_beats_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_count_beats_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_count_beats_audio_run_read; plugin->write = ags_count_beats_audio_run_write; } void ags_count_beats_audio_run_class_init(AgsCountBeatsAudioRunClass *count_beats_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_count_beats_audio_run_parent_class = g_type_class_peek_parent(count_beats_audio_run); /* GObjectClass */ gobject = (GObjectClass *) count_beats_audio_run; gobject->set_property = ags_count_beats_audio_run_set_property; gobject->get_property = ags_count_beats_audio_run_get_property; gobject->dispose = ags_count_beats_audio_run_dispose; gobject->finalize = ags_count_beats_audio_run_finalize; /* properties */ /** * AgsCountBeatsAudioRun:delay-audio-run: * * The assigned #AgsDelayAudioRun dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("delay-audio-run", i18n_pspec("assigned AgsDelayAudioRun"), i18n_pspec("The AgsDelayAudioRun which emits sequencer_alloc_output sequencer_count signal"), AGS_TYPE_DELAY_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_AUDIO_RUN, param_spec); /** * AgsCountBeatsAudioRun:notation-counter: * * The notation counter. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("notation-counter", i18n_pspec("notation counter indicates offset"), i18n_pspec("The notation counter indicates the offset in the notation"), 0, 65535, //FIXME:JK: figure out how many beats this can really have 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION_COUNTER, param_spec); /** * AgsCountBeatsAudioRun:sequencer-counter: * * The sequencer counter. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("sequencer-counter", i18n_pspec("sequencer counter indicates offset"), i18n_pspec("The sequenecer counter indicates the offset in the sequencer"), 0, 65535, //FIXME:JK: figure out how many beats this can really have 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER_COUNTER, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) count_beats_audio_run; recall->resolve_dependencies = ags_count_beats_audio_run_resolve_dependencies; recall->duplicate = ags_count_beats_audio_run_duplicate; recall->notify_dependency = ags_count_beats_audio_run_notify_dependency; recall->run_init_pre = ags_count_beats_audio_run_run_init_pre; recall->done = ags_count_beats_audio_run_done; /* AgsCountBeatsAudioRunClass */ count_beats_audio_run->notation_start = NULL; count_beats_audio_run->notation_loop = NULL; count_beats_audio_run->notation_stop = NULL; count_beats_audio_run->sequencer_start = NULL; count_beats_audio_run->sequencer_loop = NULL; count_beats_audio_run->sequencer_stop = NULL; /* signals */ /** * AgsCountBeatsAudioRun::notation-start: * @count_beats_audio_run: the object * @run_order: the nth run * * The ::notation-start signal is emited while starting notation playback. */ count_beats_audio_run_signals[NOTATION_START] = g_signal_new("notation-start", G_TYPE_FROM_CLASS(count_beats_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsCountBeatsAudioRunClass, notation_start), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsCountBeatsAudioRun::notation-loop: * @count_beats_audio_run: the object * @run_order: the nth run * * The ::notation-loop signal is emited while looping notation playback. */ count_beats_audio_run_signals[NOTATION_LOOP] = g_signal_new("notation-loop", G_TYPE_FROM_CLASS(count_beats_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsCountBeatsAudioRunClass, notation_loop), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsCountBeatsAudioRun::notation-stop: * @count_beats_audio_run: the object * @run_order: the nth run * * The ::notation-loop signal is emited while stoping notation playback. */ count_beats_audio_run_signals[NOTATION_STOP] = g_signal_new("notation-stop", G_TYPE_FROM_CLASS(count_beats_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsCountBeatsAudioRunClass, notation_stop), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsCountBeatsAudioRun::sequencer-start: * @count_beats_audio_run: the object * @run_order: the nth run * * The ::sequencer-start signal is emited while starting sequencer playback. */ count_beats_audio_run_signals[SEQUENCER_START] = g_signal_new("sequencer-start", G_TYPE_FROM_CLASS(count_beats_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsCountBeatsAudioRunClass, sequencer_start), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsCountBeatsAudioRun::sequencer-loop: * @count_beats_audio_run: the object * @run_order: the nth run * * The ::sequencer-loop signal is emited while looping sequencer playback. */ count_beats_audio_run_signals[SEQUENCER_LOOP] = g_signal_new("sequencer-loop", G_TYPE_FROM_CLASS(count_beats_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsCountBeatsAudioRunClass, sequencer_loop), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsCountBeatsAudioRun::sequencer-stop: * @count_beats_audio_run: the object * @run_order: the nth run * * The ::sequencer-loop signal is emited while stoping sequencer playback. */ count_beats_audio_run_signals[SEQUENCER_STOP] = g_signal_new("sequencer-stop", G_TYPE_FROM_CLASS(count_beats_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsCountBeatsAudioRunClass, sequencer_stop), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); } void ags_count_beats_audio_run_init(AgsCountBeatsAudioRun *count_beats_audio_run) { AGS_RECALL(count_beats_audio_run)->name = "ags-count-beats"; AGS_RECALL(count_beats_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(count_beats_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(count_beats_audio_run)->xml_type = "ags-count-beats-audio-run"; AGS_RECALL(count_beats_audio_run)->port = NULL; count_beats_audio_run->notation_counter = 0; count_beats_audio_run->sequencer_counter = 0; count_beats_audio_run->recall_ref = 0; count_beats_audio_run->hide_ref = 0; count_beats_audio_run->notation_hide_ref_counter = 0; count_beats_audio_run->sequencer_hide_ref_counter = 0; count_beats_audio_run->delay_audio_run = NULL; g_signal_connect_after(count_beats_audio_run, "notify::soundcard", G_CALLBACK(ags_count_beats_audio_run_notify_soundcard_callback), NULL); } void ags_count_beats_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCountBeatsAudioRun *count_beats_audio_run; count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { AgsDelayAudioRun *delay_audio_run; gboolean is_template; delay_audio_run = (AgsDelayAudioRun *) g_value_get_object(value); if(count_beats_audio_run->delay_audio_run == delay_audio_run){ return; } if(delay_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(delay_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(count_beats_audio_run->delay_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(count_beats_audio_run), (AgsRecall *) count_beats_audio_run->delay_audio_run); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(count_beats_audio_run)->flags)) != 0){ g_object_disconnect(G_OBJECT(count_beats_audio_run->delay_audio_run), "any_signal::sequencer-alloc-output", G_CALLBACK(ags_count_beats_audio_run_sequencer_alloc_output_callback), count_beats_audio_run, "any_signal::sequencer-count", G_CALLBACK(ags_count_beats_audio_run_sequencer_count_callback), count_beats_audio_run, "any_signal::notation-alloc-output", G_CALLBACK(ags_count_beats_audio_run_notation_alloc_output_callback), count_beats_audio_run, "any_signal::notation-count", G_CALLBACK(ags_count_beats_audio_run_notation_count_callback), count_beats_audio_run, NULL); } } g_object_unref(G_OBJECT(count_beats_audio_run->delay_audio_run)); } if(delay_audio_run != NULL){ g_object_ref(G_OBJECT(delay_audio_run)); if(is_template){ ags_recall_add_dependency(AGS_RECALL(count_beats_audio_run), ags_recall_dependency_new((GObject *) delay_audio_run)); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(count_beats_audio_run)->flags)) != 0){ g_signal_connect(G_OBJECT(delay_audio_run), "sequencer-alloc-output", G_CALLBACK(ags_count_beats_audio_run_sequencer_alloc_output_callback), count_beats_audio_run); g_signal_connect(G_OBJECT(delay_audio_run), "sequencer-count", G_CALLBACK(ags_count_beats_audio_run_sequencer_count_callback), count_beats_audio_run); g_signal_connect(G_OBJECT(delay_audio_run), "notation-alloc-output", G_CALLBACK(ags_count_beats_audio_run_notation_alloc_output_callback), count_beats_audio_run); g_signal_connect(G_OBJECT(delay_audio_run), "notation-count", G_CALLBACK(ags_count_beats_audio_run_notation_count_callback), count_beats_audio_run); } } } count_beats_audio_run->delay_audio_run = delay_audio_run; } break; case PROP_NOTATION_COUNTER: { guint counter; counter = g_value_get_uint(value); count_beats_audio_run->notation_counter = counter; } break; case PROP_SEQUENCER_COUNTER: { guint counter; counter = g_value_get_uint(value); count_beats_audio_run->sequencer_counter = counter; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_count_beats_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCountBeatsAudioRun *count_beats_audio_run; count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { g_value_set_object(value, count_beats_audio_run->delay_audio_run); } break; case PROP_NOTATION_COUNTER: { g_value_set_uint(value, count_beats_audio_run->notation_counter); } break; case PROP_SEQUENCER_COUNTER: { g_value_set_uint(value, count_beats_audio_run->sequencer_counter); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_count_beats_audio_run_dispose(GObject *gobject) { AgsCountBeatsAudioRun *count_beats_audio_run; count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(gobject); /* delay audio run */ if(count_beats_audio_run->delay_audio_run != NULL){ g_object_unref(count_beats_audio_run->delay_audio_run); count_beats_audio_run->delay_audio_run = NULL; } /* call parent */ G_OBJECT_CLASS(ags_count_beats_audio_run_parent_class)->dispose(gobject); } void ags_count_beats_audio_run_finalize(GObject *gobject) { AgsCountBeatsAudioRun *count_beats_audio_run; count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(gobject); /* delay audio run */ if(count_beats_audio_run->delay_audio_run != NULL){ g_object_unref(count_beats_audio_run->delay_audio_run); } /* call parent */ G_OBJECT_CLASS(ags_count_beats_audio_run_parent_class)->finalize(gobject); } void ags_count_beats_audio_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_count_beats_audio_run_parent_connectable_interface->connect(connectable); } void ags_count_beats_audio_run_disconnect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } /* call parent */ ags_count_beats_audio_run_parent_connectable_interface->connect(connectable); } void ags_count_beats_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsCountBeatsAudioRun *count_beats_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } ags_count_beats_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* AgsCountBeats */ count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(dynamic_connectable); g_signal_connect(G_OBJECT(count_beats_audio_run->delay_audio_run), "sequencer-alloc-output", G_CALLBACK(ags_count_beats_audio_run_sequencer_alloc_output_callback), count_beats_audio_run); g_signal_connect(G_OBJECT(count_beats_audio_run->delay_audio_run), "sequencer-count", G_CALLBACK(ags_count_beats_audio_run_sequencer_count_callback), count_beats_audio_run); g_signal_connect(G_OBJECT(count_beats_audio_run->delay_audio_run), "notation-alloc-output", G_CALLBACK(ags_count_beats_audio_run_notation_alloc_output_callback), count_beats_audio_run); g_signal_connect(G_OBJECT(count_beats_audio_run->delay_audio_run), "notation-count", G_CALLBACK(ags_count_beats_audio_run_notation_count_callback), count_beats_audio_run); } void ags_count_beats_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsCountBeatsAudioRun *count_beats_audio_run; ags_count_beats_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* AgsCountBeats */ count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(dynamic_connectable); g_object_disconnect(G_OBJECT(count_beats_audio_run->delay_audio_run), "any_signal::sequencer-alloc-output", G_CALLBACK(ags_count_beats_audio_run_sequencer_alloc_output_callback), count_beats_audio_run, "any_signal::sequencer-count", G_CALLBACK(ags_count_beats_audio_run_sequencer_count_callback), count_beats_audio_run, "any_signal::notation-alloc-output", G_CALLBACK(ags_count_beats_audio_run_notation_alloc_output_callback), count_beats_audio_run, "any_signal::notation-count", G_CALLBACK(ags_count_beats_audio_run_notation_count_callback), count_beats_audio_run, NULL); } void ags_count_beats_audio_run_seek(AgsSeekable *seekable, guint steps, gboolean move_forward) { AgsDelayAudio *delay_audio; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; guint seq_steps; count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(seekable); delay_audio_run = count_beats_audio_run->delay_audio_run; delay_audio = (AgsDelayAudio *) AGS_RECALL_AUDIO_RUN(delay_audio_run)->recall_audio; if(delay_audio->sequencer_duration->port_value.ags_port_double != 0.0){ seq_steps = (steps % (guint) delay_audio->sequencer_duration->port_value.ags_port_double); }else{ return; } if(move_forward){ count_beats_audio_run->notation_counter += steps; if(count_beats_audio_run->sequencer_counter + seq_steps < (guint) delay_audio->sequencer_duration->port_value.ags_port_double){ count_beats_audio_run->sequencer_counter += seq_steps; }else{ count_beats_audio_run->sequencer_counter = (guint) (seq_steps + count_beats_audio_run->sequencer_counter) % (guint) (delay_audio->sequencer_duration->port_value.ags_port_double); } }else{ count_beats_audio_run->notation_counter -= steps; if(count_beats_audio_run->sequencer_counter - seq_steps >= 0){ count_beats_audio_run->sequencer_counter -= seq_steps; }else{ count_beats_audio_run->sequencer_counter = (guint) (delay_audio->sequencer_duration->port_value.ags_port_double) - (seq_steps - count_beats_audio_run->sequencer_counter); } } } guint ags_count_beats_audio_run_get_notation_counter(AgsCountable *countable) { return(AGS_COUNT_BEATS_AUDIO_RUN(countable)->notation_counter); } guint ags_count_beats_audio_run_get_sequencer_counter(AgsCountable *countable) { return(AGS_COUNT_BEATS_AUDIO_RUN(countable)->sequencer_counter); } void ags_count_beats_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsCountBeatsAudioRun *count_beats_audio_run; AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_count_beats_audio_run_parent_plugin_interface->read(file, node, plugin); count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(plugin); /* read depenendency */ iter = node->children; while(iter != NULL){ if(iter->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(iter->name, "ags-dependency-list", 19)){ xmlNode *dependency_node; dependency_node = iter->children; while(dependency_node != NULL){ if(dependency_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(dependency_node->name, "ags-dependency", 15)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", count_beats_audio_run, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_count_beats_audio_run_read_resolve_dependency), count_beats_audio_run); } } dependency_node = dependency_node->next; } } } iter = iter->next; } } xmlNode* ags_count_beats_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_count_beats_audio_run_parent_plugin_interface->write(file, parent, plugin); /* write dependencies */ child = xmlNewNode(NULL, "ags-dependency-list"); xmlNewProp(child, AGS_FILE_ID_PROP, ags_id_generator_create_uuid()); xmlAddChild(node, child); list = AGS_RECALL(plugin)->dependencies; while(list != NULL){ id = ags_id_generator_create_uuid(); dependency_node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(dependency_node, AGS_FILE_ID_PROP, id); xmlAddChild(child, dependency_node); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_count_beats_audio_run_write_resolve_dependency), G_OBJECT(plugin)); list = list->next; } return(node); } void ags_count_beats_audio_run_notify_soundcard_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data) { AgsCountBeatsAudioRun *count_beats_audio_run; GObject *soundcard; count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(gobject); soundcard = AGS_RECALL(count_beats_audio_run)->soundcard; /* bpm */ count_beats_audio_run->bpm = ags_soundcard_get_bpm(AGS_SOUNDCARD(soundcard)); /* tact */ count_beats_audio_run->tact = AGS_SOUNDCARD_DEFAULT_TACT; } void ags_count_beats_audio_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallDependency *recall_dependency; AgsRecallID *recall_id; AgsDelayAudioRun *delay_audio_run; GList *list; guint i, i_stop; if(recall->soundcard == NULL){ return; } template = AGS_RECALL(ags_recall_find_template(AGS_RECALL_CONTAINER(recall->container)->recall_audio_run)->data); list = template->dependencies; recall_id = recall->recall_id; delay_audio_run = NULL; i_stop = 1; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_DELAY_AUDIO_RUN(recall_dependency->dependency)){ AgsDelayAudio *delay_audio; guint note_offset; delay_audio_run = (AgsDelayAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); delay_audio = (AgsDelayAudio *) AGS_RECALL_AUDIO_RUN(delay_audio_run)->recall_audio; //NOTE:JK: not really thread-safe but might be initialized by a task note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(recall->soundcard)); AGS_COUNT_BEATS_AUDIO_RUN(recall)->sequencer_counter = note_offset % (guint) delay_audio->sequencer_duration->port_value.ags_port_double; AGS_COUNT_BEATS_AUDIO_RUN(recall)->notation_counter = note_offset; i++; } list = list->next; } g_object_set(G_OBJECT(recall), "delay-audio-run", delay_audio_run, NULL); } AgsRecall* ags_count_beats_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsCountBeatsAudioRun *copy; copy = AGS_COUNT_BEATS_AUDIO_RUN(AGS_RECALL_CLASS(ags_count_beats_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); // g_message("ags_count_beats_audio_run_duplicate\n"); return((AgsRecall *) copy); } void ags_count_beats_audio_run_notify_dependency(AgsRecall *recall, guint notify_mode, gint count) { AgsCountBeatsAudioRun *count_beats_audio_run; count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(recall); switch(notify_mode){ case AGS_RECALL_NOTIFY_RUN: count_beats_audio_run->hide_ref += count; // g_message("count_beats_audio_run->hide_ref: %u\n", count_beats_audio_run->hide_ref); break; case AGS_RECALL_NOTIFY_AUDIO: break; case AGS_RECALL_NOTIFY_AUDIO_RUN: break; case AGS_RECALL_NOTIFY_CHANNEL: break; case AGS_RECALL_NOTIFY_CHANNEL_RUN: count_beats_audio_run->recall_ref += count; break; default: g_message("ags_count_beats_audio_run.c - ags_count_beats_audio_run_notify: unknown notify"); } } void ags_count_beats_audio_run_run_init_pre(AgsRecall *recall) { AgsCountBeatsAudioRun *count_beats_audio_run; AGS_RECALL_CLASS(ags_count_beats_audio_run_parent_class)->run_init_pre(recall); count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(recall); count_beats_audio_run->first_run = TRUE; count_beats_audio_run->notation_hide_ref_counter = 0; count_beats_audio_run->sequencer_hide_ref_counter = 0; // count_beats_audio_run->sequencer_counter = 0; // count_beats_audio_run->notation_counter = 0; } void ags_count_beats_audio_run_done(AgsRecall *recall) { AgsAudio *audio; AgsRecallID *recall_id; AgsCountBeatsAudio *count_beats_audio; AgsCountBeatsAudioRun *count_beats_audio_run; AgsDelayAudioRun *delay_audio_run; AgsCancelAudio *cancel_audio; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsThread *async_queue; AgsApplicationContext *application_context; GObject *soundcard; gboolean sequencer, notation; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(recall); count_beats_audio = AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(count_beats_audio_run)->recall_audio); delay_audio_run = count_beats_audio_run->delay_audio_run; audio = AGS_RECALL_AUDIO(count_beats_audio)->audio; recall_id = AGS_RECALL(count_beats_audio_run)->recall_id; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); soundcard = AGS_RECALL_AUDIO(count_beats_audio)->audio->soundcard; /* lookup soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, soundcard); pthread_mutex_unlock(application_mutex); /* get application_context */ pthread_mutex_lock(soundcard_mutex); application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(soundcard)); pthread_mutex_unlock(soundcard_mutex); /* get main loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get async queue */ async_queue = (AgsThread *) ags_thread_find_type(main_loop, AGS_TYPE_TASK_THREAD); if((AGS_RECALL_ID_SEQUENCER & (recall_id->flags)) != 0){ sequencer = TRUE; }else{ sequencer = FALSE; } notation = FALSE; if((AGS_RECALL_ID_NOTATION & (recall->recall_id->flags)) != 0){ // notation = TRUE; } /* create cancel task */ cancel_audio = ags_cancel_audio_new(AGS_RECALL_AUDIO(count_beats_audio)->audio, FALSE, sequencer, notation); /* append AgsCancelAudio */ ags_task_thread_append_task((AgsTaskThread *) async_queue, (AgsTask *) cancel_audio); /* call parent */ AGS_RECALL_CLASS(ags_count_beats_audio_run_parent_class)->done(recall); ags_recall_done((AgsRecall *) delay_audio_run); ags_audio_done(audio, recall_id); } /** * ags_count_beats_audio_run_notation_start: * @count_beats_audio_run: the #AgsCountBeatsAudioRun * @run_order: the nth run order * * Emitted as notation starts playback. * * Since: 1.0.0 */ void ags_count_beats_audio_run_notation_start(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order) { g_return_if_fail(AGS_IS_COUNT_BEATS_AUDIO_RUN(count_beats_audio_run)); g_object_ref(G_OBJECT(count_beats_audio_run)); g_signal_emit(G_OBJECT(count_beats_audio_run), count_beats_audio_run_signals[NOTATION_START], 0, run_order); g_object_unref(G_OBJECT(count_beats_audio_run)); } /** * ags_count_beats_audio_run_notation_loop: * @count_beats_audio_run: the #AgsCountBeatsAudioRun * @run_order: the nth run order * * Emitted as notation loops playback. * * Since: 1.0.0 */ void ags_count_beats_audio_run_notation_loop(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order) { g_return_if_fail(AGS_IS_COUNT_BEATS_AUDIO_RUN(count_beats_audio_run)); g_object_ref(G_OBJECT(count_beats_audio_run)); g_signal_emit(G_OBJECT(count_beats_audio_run), count_beats_audio_run_signals[NOTATION_LOOP], 0, run_order); g_object_unref(G_OBJECT(count_beats_audio_run)); } /** * ags_count_beats_audio_run_notation_stop: * @count_beats_audio_run: the #AgsCountBeatsAudioRun * @run_order: the nth run order * * Emitted as notation stops playback. * * Since: 1.0.0 */ void ags_count_beats_audio_run_notation_stop(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order) { g_return_if_fail(AGS_IS_COUNT_BEATS_AUDIO_RUN(count_beats_audio_run)); g_object_ref(G_OBJECT(count_beats_audio_run)); g_signal_emit(G_OBJECT(count_beats_audio_run), count_beats_audio_run_signals[NOTATION_STOP], 0, run_order); g_object_unref(G_OBJECT(count_beats_audio_run)); } /** * ags_count_beats_audio_run_sequencer_start: * @count_beats_audio_run: the #AgsCountBeatsAudioRun * @run_order: the nth run order * * Emitted as sequencer starts playback. * * Since: 1.0.0 */ void ags_count_beats_audio_run_sequencer_start(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order) { g_return_if_fail(AGS_IS_COUNT_BEATS_AUDIO_RUN(count_beats_audio_run)); g_object_ref(G_OBJECT(count_beats_audio_run)); g_signal_emit(G_OBJECT(count_beats_audio_run), count_beats_audio_run_signals[SEQUENCER_START], 0, run_order); g_object_unref(G_OBJECT(count_beats_audio_run)); } /** * ags_count_beats_audio_run_sequencer_loop: * @count_beats_audio_run: the #AgsCountBeatsAudioRun * @run_order: the nth run order * * Emitted as sequencer loops playback. * * Since: 1.0.0 */ void ags_count_beats_audio_run_sequencer_loop(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order) { g_return_if_fail(AGS_IS_COUNT_BEATS_AUDIO_RUN(count_beats_audio_run)); g_object_ref(G_OBJECT(count_beats_audio_run)); g_signal_emit(G_OBJECT(count_beats_audio_run), count_beats_audio_run_signals[SEQUENCER_LOOP], 0, run_order); g_object_unref(G_OBJECT(count_beats_audio_run)); } /** * ags_count_beats_audio_run_sequencer_stop: * @count_beats_audio_run: the #AgsCountBeatsAudioRun * @run_order: the nth run order * * Emitted as sequencer stops playback. * * Since: 1.0.0 */ void ags_count_beats_audio_run_sequencer_stop(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order) { g_return_if_fail(AGS_IS_COUNT_BEATS_AUDIO_RUN(count_beats_audio_run)); g_object_ref(G_OBJECT(count_beats_audio_run)); g_signal_emit(G_OBJECT(count_beats_audio_run), count_beats_audio_run_signals[SEQUENCER_STOP], 0, run_order); g_object_unref(G_OBJECT(count_beats_audio_run)); } void ags_count_beats_audio_run_notation_alloc_output_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCountBeatsAudioRun *count_beats_audio_run) { AgsCountBeatsAudio *count_beats_audio; gboolean loop; GValue loop_value = {0,}; if((AGS_RECALL_ID_NOTATION & (AGS_RECALL(count_beats_audio_run)->recall_id->flags)) == 0){ return; } count_beats_audio = AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(count_beats_audio_run)->recall_audio); /* loop */ g_value_init(&loop_value, G_TYPE_BOOLEAN); ags_port_safe_read(count_beats_audio->notation_loop, &loop_value); loop = g_value_get_boolean(&loop_value); g_value_unset(&loop_value); /* start */ if(count_beats_audio_run->first_run){ // g_message("ags_count_beats_audio_run_sequencer_alloc_output_callback: start\n"); ags_count_beats_audio_run_notation_start(count_beats_audio_run, run_order); } /* loop */ if(!count_beats_audio_run->first_run && count_beats_audio_run->notation_counter == 0){ /* emit notation signals */ if(loop){ // g_message("ags_count_beats_audio_run_notation_alloc_output_callback: loop\n"); ags_count_beats_audio_run_notation_loop(count_beats_audio_run, run_order); } } } void ags_count_beats_audio_run_sequencer_alloc_output_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCountBeatsAudioRun *count_beats_audio_run) { AgsCountBeatsAudio *count_beats_audio; gboolean loop; GValue value = {0,}; if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL(count_beats_audio_run)->recall_id->flags)) == 0){ return; } count_beats_audio = AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(count_beats_audio_run)->recall_audio); /* loop */ g_value_init(&value, G_TYPE_BOOLEAN); ags_port_safe_read(count_beats_audio->sequencer_loop, &value); loop = g_value_get_boolean(&value); g_value_unset(&value); /* start */ if(count_beats_audio_run->first_run){ // g_message("ags_count_beats_audio_run_sequencer_alloc_output_callback: start\n"); ags_count_beats_audio_run_sequencer_start(count_beats_audio_run, run_order); } /* loop */ if(!count_beats_audio_run->first_run && count_beats_audio_run->sequencer_counter == 0){ /* emit sequencer signals */ if(loop){ // g_message("ags_count_beats_audio_run_sequencer_alloc_output_callback: loop\n"); ags_count_beats_audio_run_sequencer_loop(count_beats_audio_run, run_order); } } } void ags_count_beats_audio_run_notation_count_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCountBeatsAudioRun *count_beats_audio_run) { AgsCountBeatsAudio *count_beats_audio; gdouble loop_end; gboolean loop; GValue loop_value = {0,}; GValue loop_end_value = {0,}; if((guint) floor(delay) != 0){ return; } if((AGS_RECALL_ID_NOTATION & (AGS_RECALL(count_beats_audio_run)->recall_id->flags)) == 0){ return; } count_beats_audio = AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(count_beats_audio_run)->recall_audio); /* loop */ g_value_init(&loop_value, G_TYPE_BOOLEAN); ags_port_safe_read(count_beats_audio->notation_loop, &loop_value); loop = g_value_get_boolean(&loop_value); g_value_unset(&loop_value); /* loop end */ g_value_init(&loop_end_value, G_TYPE_DOUBLE); ags_port_safe_read(count_beats_audio->notation_loop_end, &loop_end_value); loop_end = g_value_get_double(&loop_end_value); g_value_unset(&loop_end_value); /* tact signal */ // g_message("notation %d", count_beats_audio_run->notation_counter); ags_audio_tact(AGS_RECALL_AUDIO(count_beats_audio)->audio, AGS_RECALL(count_beats_audio_run)->recall_id); /* * Block counter for sequencer and notation counter */ if(loop){ if(count_beats_audio_run->notation_counter >= (guint) loop_end - 1.0){ count_beats_audio_run->notation_counter = 0; }else{ count_beats_audio_run->notation_counter += 1; } }else{ count_beats_audio_run->notation_counter += 1; } } void ags_count_beats_audio_run_sequencer_count_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCountBeatsAudioRun *count_beats_audio_run) { AgsCountBeatsAudio *count_beats_audio; gdouble loop_end; gboolean loop; GValue loop_value = {0,}; GValue loop_end_value = {0,}; if((guint) floor(delay) != 0){ return; } if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL(count_beats_audio_run)->recall_id->flags)) == 0){ return; } count_beats_audio = AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(count_beats_audio_run)->recall_audio); /* loop */ g_value_init(&loop_value, G_TYPE_BOOLEAN); ags_port_safe_read(count_beats_audio->sequencer_loop, &loop_value); loop = g_value_get_boolean(&loop_value); g_value_unset(&loop_value); /* loop end */ g_value_init(&loop_end_value, G_TYPE_DOUBLE); ags_port_safe_read(count_beats_audio->sequencer_loop_end, &loop_end_value); loop_end = g_value_get_double(&loop_end_value); g_value_unset(&loop_end_value); /* tact signal */ ags_audio_tact(AGS_RECALL_AUDIO(count_beats_audio)->audio, AGS_RECALL(count_beats_audio_run)->recall_id); /* * Block counter for sequencer and notation counter */ // g_message("sequencer: tic"); if(count_beats_audio_run->first_run){ count_beats_audio_run->first_run = FALSE; } if(loop){ if(count_beats_audio_run->sequencer_counter >= (guint) loop_end - 1.0){ count_beats_audio_run->sequencer_counter = 0; }else{ count_beats_audio_run->sequencer_counter += 1; } }else{ if(count_beats_audio_run->sequencer_counter >= (guint) loop_end - 1.0){ AgsAudio *audio; AgsMutexManager *mutex_manager; GList *playback; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; audio = AGS_RECALL_AUDIO_RUN(count_beats_audio_run)->recall_audio->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, audio); pthread_mutex_unlock(application_mutex); /* reset sequencer counter */ count_beats_audio_run->sequencer_counter = 0; /* get playback */ pthread_mutex_lock(audio_mutex); playback = AGS_PLAYBACK_DOMAIN(audio->playback_domain)->playback; pthread_mutex_unlock(audio_mutex); /* emit stop signals */ ags_count_beats_audio_run_sequencer_stop(count_beats_audio_run, FALSE); /* set done flag in soundcard play */ while(playback != NULL){ AgsChannel *channel; AgsRecyclingContext *recycling_context; pthread_mutex_lock(audio_mutex); channel = audio->output; if(AGS_PLAYBACK(playback->data)->recall_id[1] != NULL){ recycling_context = AGS_PLAYBACK(playback->data)->recall_id[1]->recycling_context; }else{ recycling_context = NULL; } pthread_mutex_unlock(audio_mutex); if(recycling_context == AGS_RECALL(count_beats_audio_run)->recall_id->recycling_context){ AgsStreamChannelRun *stream_channel_run; GList *list; GList *recall_recycling_list, *recall_audio_signal_list; gboolean found; pthread_mutex_t *channel_mutex; // AGS_PLAYBACK(playback->data)->flags |= AGS_PLAYBACK_DONE; /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, channel); pthread_mutex_unlock(application_mutex); /* check if to stop audio processing */ found = FALSE; pthread_mutex_lock(channel_mutex); list = channel->play; list = ags_recall_find_type_with_recycling_context(list, AGS_TYPE_STREAM_CHANNEL_RUN, (GObject *) recycling_context); if(list != NULL){ stream_channel_run = AGS_STREAM_CHANNEL_RUN(list->data); recall_recycling_list = AGS_RECALL(stream_channel_run)->children; while(recall_recycling_list != NULL){ recall_audio_signal_list = AGS_RECALL(recall_recycling_list->data)->children; while(recall_audio_signal_list != NULL){ found = TRUE; g_signal_connect_after(G_OBJECT(recall_audio_signal_list->data), "done", G_CALLBACK(ags_count_beats_audio_run_stream_audio_signal_done_callback), AGS_RECALL(count_beats_audio_run)); recall_audio_signal_list = recall_audio_signal_list->next; } recall_recycling_list = recall_recycling_list->next; } } pthread_mutex_unlock(channel_mutex); /* stop audio processing*/ if(!found){ ags_count_beats_audio_run_stop(count_beats_audio_run, FALSE); } break; } /* iterate playback */ pthread_mutex_lock(audio_mutex); playback = playback->next; pthread_mutex_unlock(audio_mutex); } return; } count_beats_audio_run->sequencer_counter += 1; } } void ags_count_beats_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "xpath"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(AGS_IS_DELAY_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "delay-audio-run", AGS_DELAY_AUDIO_RUN(id_ref->ref), NULL); } } void ags_count_beats_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_COUNT_BEATS_AUDIO_RUN(file_lookup->ref)->delay_audio_run); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_count_beats_audio_run_stream_audio_signal_done_callback(AgsRecall *recall, AgsCountBeatsAudioRun *count_beats_audio_run) { AgsCountBeatsAudio *count_beats_audio; GValue loop_sequencer = {0,}; GValue loop_end_sequencer = {0,}; count_beats_audio = AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(count_beats_audio_run)->recall_audio); /* check for loop or notation */ g_value_init(&loop_sequencer, G_TYPE_BOOLEAN); ags_port_safe_read(count_beats_audio->sequencer_loop, &loop_sequencer); if((AGS_RECALL_ID_SEQUENCER & (recall->recall_id->flags)) != 0){ if(g_value_get_boolean(&loop_sequencer)){ g_value_unset(&loop_sequencer); return; }else{ g_value_unset(&loop_sequencer); } g_value_init(&loop_end_sequencer, G_TYPE_DOUBLE); ags_port_safe_read(count_beats_audio->sequencer_loop_end, &loop_end_sequencer); if(count_beats_audio_run->sequencer_counter < (guint) g_value_get_double(&loop_end_sequencer) - 1.0){ g_value_unset(&loop_end_sequencer); return; }else{ g_value_unset(&loop_end_sequencer); } /* you're done */ ags_recall_done((AgsRecall *) count_beats_audio_run); } } void ags_count_beats_audio_run_stop(AgsCountBeatsAudioRun *count_beats_audio_run, gboolean notation) { if(!notation){ if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL(count_beats_audio_run)->recall_id->flags)) != 0){ //TODO:JK: enhance me ags_recall_done((AgsRecall *) count_beats_audio_run); } }else{ // ags_count_beats_audio_run_done(count_beats_audio_run); } } gdouble ags_count_beats_audio_run_get_bpm(AgsTactable *tactable) { return(AGS_COUNT_BEATS_AUDIO_RUN(tactable)->bpm); } gdouble ags_count_beats_audio_run_get_tact(AgsTactable *tactable) { return(AGS_COUNT_BEATS_AUDIO_RUN(tactable)->tact); } void ags_count_beats_audio_run_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm) { /* empty */ } void ags_count_beats_audio_run_change_tact(AgsTactable *tactable, gdouble new_tact, gdouble old_tact) { /* empty */ } /** * ags_count_beats_audio_run_new: * @delay_audio_run: the #AgsDelayAudioRun dependency * * Creates an #AgsCountBeatsAudioRun * * Returns: a new #AgsCountBeatsAudioRun * * Since: 1.0.0 */ AgsCountBeatsAudioRun* ags_count_beats_audio_run_new(AgsDelayAudioRun *delay_audio_run) { AgsCountBeatsAudioRun *count_beats_audio_run; count_beats_audio_run = (AgsCountBeatsAudioRun *) g_object_new(AGS_TYPE_COUNT_BEATS_AUDIO_RUN, "delay_audio_run", delay_audio_run, NULL); return(count_beats_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_envelope_audio_signal.h0000644000175000017500000000440013246707333021345 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ENVELOPE_AUDIO_SIGNAL_H__ #define __AGS_ENVELOPE_AUDIO_SIGNAL_H__ #include #include #include #include #include #define AGS_TYPE_ENVELOPE_AUDIO_SIGNAL (ags_envelope_audio_signal_get_type()) #define AGS_ENVELOPE_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ENVELOPE_AUDIO_SIGNAL, AgsEnvelopeAudioSignal)) #define AGS_ENVELOPE_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ENVELOPE_AUDIO_SIGNAL, AgsEnvelopeAudioSignalClass)) #define AGS_IS_ENVELOPE_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ENVELOPE_AUDIO_SIGNAL)) #define AGS_IS_ENVELOPE_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ENVELOPE_AUDIO_SIGNAL)) #define AGS_ENVELOPE_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_ENVELOPE_AUDIO_SIGNAL, AgsEnvelopeAudioSignalClass)) typedef struct _AgsEnvelopeAudioSignal AgsEnvelopeAudioSignal; typedef struct _AgsEnvelopeAudioSignalClass AgsEnvelopeAudioSignalClass; struct _AgsEnvelopeAudioSignal { AgsRecallAudioSignal recall_audio_signal; guint frame_count; }; struct _AgsEnvelopeAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_envelope_audio_signal_get_type(); AgsEnvelopeAudioSignal* ags_envelope_audio_signal_new(AgsAudioSignal *source); #endif /*__AGS_ENVELOPE_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_buffer_channel.c0000644000175000017500000002635613246707333017764 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_buffer_channel_class_init(AgsBufferChannelClass *buffer_channel); void ags_buffer_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_buffer_channel_mutable_interface_init(AgsMutableInterface *mutable); void ags_buffer_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_buffer_channel_init(AgsBufferChannel *buffer_channel); void ags_buffer_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_buffer_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_buffer_channel_connect(AgsConnectable *connectable); void ags_buffer_channel_disconnect(AgsConnectable *connectable); void ags_buffer_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_buffer_channel_dispose(GObject *gobject); void ags_buffer_channel_finalize(GObject *gobject); void ags_buffer_channel_set_muted(AgsMutable *mutable, gboolean muted); static AgsPortDescriptor* ags_buffer_channel_get_muted_port_descriptor(); /** * SECTION:ags_buffer_channel * @short_description: buffers channel * @title: AgsBufferChannel * @section_id: * @include: ags/audio/recall/ags_buffer_channel.h * * The #AgsBufferChannel class provides ports to the effect processor. */ enum{ PROP_0, PROP_MUTED, }; static gpointer ags_buffer_channel_parent_class = NULL; static AgsConnectableInterface *ags_buffer_channel_parent_connectable_interface; static AgsMutableInterface *ags_buffer_channel_parent_mutable_interface; static AgsPluginInterface *ags_buffer_channel_parent_plugin_interface; static const gchar *ags_buffer_channel_plugin_name = "ags-buffer"; static const gchar *ags_buffer_channel_plugin_specifier[] = { "./muted[0]", }; static const gchar *ags_buffer_channel_plugin_control_port[] = { "1/1", }; GType ags_buffer_channel_get_type() { static GType ags_type_buffer_channel = 0; if(!ags_type_buffer_channel){ static const GTypeInfo ags_buffer_channel_info = { sizeof (AgsBufferChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_buffer_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsBufferChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_buffer_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_buffer_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_mutable_interface_info = { (GInterfaceInitFunc) ags_buffer_channel_mutable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_buffer_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_buffer_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsBufferChannel", &ags_buffer_channel_info, 0); g_type_add_interface_static(ags_type_buffer_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_buffer_channel, AGS_TYPE_MUTABLE, &ags_mutable_interface_info); g_type_add_interface_static(ags_type_buffer_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_buffer_channel); } void ags_buffer_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_buffer_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_buffer_channel_connect; connectable->disconnect = ags_buffer_channel_disconnect; } void ags_buffer_channel_mutable_interface_init(AgsMutableInterface *mutable) { ags_buffer_channel_parent_mutable_interface = g_type_interface_peek_parent(mutable); mutable->set_muted = ags_buffer_channel_set_muted; } void ags_buffer_channel_plugin_interface_init(AgsPluginInterface *plugin) { ags_buffer_channel_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->set_ports = ags_buffer_channel_set_ports; } void ags_buffer_channel_class_init(AgsBufferChannelClass *buffer_channel) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_buffer_channel_parent_class = g_type_class_peek_parent(buffer_channel); /* GObjectClass */ gobject = (GObjectClass *) buffer_channel; gobject->set_property = ags_buffer_channel_set_property; gobject->get_property = ags_buffer_channel_get_property; gobject->dispose = ags_buffer_channel_dispose; gobject->finalize = ags_buffer_channel_finalize; /* properties */ /** * AgsBufferChannel:muted: * * The mute port. * * Since: 1.0.0 */ param_spec = g_param_spec_object("muted", i18n_pspec("mute channel"), i18n_pspec("Mute the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MUTED, param_spec); } void ags_buffer_channel_init(AgsBufferChannel *buffer_channel) { GList *port; AGS_RECALL(buffer_channel)->name = "ags-buffer"; AGS_RECALL(buffer_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(buffer_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(buffer_channel)->xml_type = "ags-buffer-channel"; port = NULL; buffer_channel->muted = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_buffer_channel_plugin_name, "specifier", ags_buffer_channel_plugin_specifier[0], "control-port", ags_buffer_channel_plugin_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, "port-value-size", sizeof(gfloat), "port-value-length", 1, NULL); g_object_ref(buffer_channel->muted); buffer_channel->muted->port_value.ags_port_float = (float) FALSE; /* port descriptor */ buffer_channel->muted->port_descriptor = ags_buffer_channel_get_muted_port_descriptor(); /* add to port */ port = g_list_prepend(port, buffer_channel->muted); g_object_ref(buffer_channel->muted); /* set port */ AGS_RECALL(buffer_channel)->port = port; } void ags_buffer_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsBufferChannel *buffer_channel; buffer_channel = AGS_BUFFER_CHANNEL(gobject); switch(prop_id){ case PROP_MUTED: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == buffer_channel->muted){ return; } if(buffer_channel->muted != NULL){ g_object_unref(G_OBJECT(buffer_channel->muted)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } buffer_channel->muted = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_buffer_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsBufferChannel *buffer_channel; buffer_channel = AGS_BUFFER_CHANNEL(gobject); switch(prop_id){ case PROP_MUTED: { g_value_set_object(value, buffer_channel->muted); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_buffer_channel_dispose(GObject *gobject) { AgsBufferChannel *buffer_channel; buffer_channel = AGS_BUFFER_CHANNEL(gobject); if(buffer_channel->muted != NULL){ g_object_unref(G_OBJECT(buffer_channel->muted)); buffer_channel->muted = NULL; } /* call parent */ G_OBJECT_CLASS(ags_buffer_channel_parent_class)->dispose(gobject); } void ags_buffer_channel_finalize(GObject *gobject) { AgsBufferChannel *buffer_channel; buffer_channel = AGS_BUFFER_CHANNEL(gobject); if(buffer_channel->muted != NULL){ g_object_unref(G_OBJECT(buffer_channel->muted)); } /* call parent */ G_OBJECT_CLASS(ags_buffer_channel_parent_class)->finalize(gobject); } void ags_buffer_channel_connect(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } /* load automation */ ags_recall_load_automation(recall, g_list_copy(recall->port)); /* call parent */ ags_buffer_channel_parent_connectable_interface->connect(connectable); } void ags_buffer_channel_disconnect(AgsConnectable *connectable) { ags_buffer_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_buffer_channel_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./muted[0]", 9)){ g_object_set(G_OBJECT(plugin), "muted", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_buffer_channel_set_muted(AgsMutable *mutable, gboolean muted) { GValue value = {0,}; g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, (float) muted); ags_port_safe_write(AGS_BUFFER_CHANNEL(mutable)->muted, &value); } static AgsPortDescriptor* ags_buffer_channel_get_muted_port_descriptor() { static AgsPortDescriptor *port_descriptor = NULL; if(port_descriptor == NULL){ port_descriptor = ags_port_descriptor_alloc(); port_descriptor->flags |= (AGS_PORT_DESCRIPTOR_INPUT | AGS_PORT_DESCRIPTOR_CONTROL | AGS_PORT_DESCRIPTOR_TOGGLED); port_descriptor->port_index = 0; /* range */ g_value_init(port_descriptor->default_value, G_TYPE_FLOAT); g_value_init(port_descriptor->lower_value, G_TYPE_FLOAT); g_value_init(port_descriptor->upper_value, G_TYPE_FLOAT); g_value_set_float(port_descriptor->default_value, 0.0); g_value_set_float(port_descriptor->lower_value, 0.0); g_value_set_float(port_descriptor->upper_value, 1.0); } return(port_descriptor); } /** * ags_buffer_channel_new: * * Creates an #AgsBufferChannel * * Returns: a new #AgsBufferChannel * * Since: 1.0.0 */ AgsBufferChannel* ags_buffer_channel_new() { AgsBufferChannel *buffer_channel; buffer_channel = (AgsBufferChannel *) g_object_new(AGS_TYPE_BUFFER_CHANNEL, NULL); return(buffer_channel); } gsequencer-1.4.24/ags/audio/recall/ags_prepare_channel_run.h0000644000175000017500000000417513246707333021035 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PREPARE_CHANNEL_RUN_H__ #define __AGS_PREPARE_CHANNEL_RUN_H__ #include #include #include #include #define AGS_TYPE_PREPARE_CHANNEL_RUN (ags_prepare_channel_run_get_type()) #define AGS_PREPARE_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PREPARE_CHANNEL_RUN, AgsPrepareChannelRun)) #define AGS_PREPARE_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PREPARE_CHANNEL_RUN, AgsPrepareChannelRunClass)) #define AGS_IS_PREPARE_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PREPARE_CHANNEL_RUN)) #define AGS_IS_PREPARE_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PREPARE_CHANNEL_RUN)) #define AGS_PREPARE_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PREPARE_CHANNEL_RUN, AgsPrepareChannelRunClass)) typedef struct _AgsPrepareChannelRun AgsPrepareChannelRun; typedef struct _AgsPrepareChannelRunClass AgsPrepareChannelRunClass; struct _AgsPrepareChannelRun { AgsRecallChannelRun recall_channel_run; }; struct _AgsPrepareChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_prepare_channel_run_get_type(); AgsPrepareChannelRun* ags_prepare_channel_run_new(); #endif /*__AGS_PREPARE_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_feed_channel.c0000644000175000017500000001166413246707333017412 00000000000000/* 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 . */ #include #include #include void ags_feed_channel_class_init(AgsFeedChannelClass *feed_channel); void ags_feed_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_feed_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_feed_channel_init(AgsFeedChannel *feed_channel); void ags_feed_channel_connect(AgsConnectable *connectable); void ags_feed_channel_disconnect(AgsConnectable *connectable); void ags_feed_channel_finalize(GObject *gobject); /** * SECTION:ags_feed_channel * @short_description: feeds channel * @title: AgsFeedChannel * @section_id: * @include: ags/audio/recall/ags_feed_channel.h * * The #AgsFeedChannel is responsible to provide enough audio data * for real-time MIDI. */ static gpointer ags_feed_channel_parent_class = NULL; static AgsConnectableInterface *ags_feed_channel_parent_connectable_interface; static const gchar *ags_feed_channel_plugin_name = "ags-feed"; GType ags_feed_channel_get_type() { static GType ags_type_feed_channel = 0; if(!ags_type_feed_channel){ static const GTypeInfo ags_feed_channel_info = { sizeof (AgsFeedChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_feed_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFeedChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_feed_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_feed_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_feed_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_feed_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsFeedChannel", &ags_feed_channel_info, 0); g_type_add_interface_static(ags_type_feed_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_feed_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_feed_channel); } void ags_feed_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_feed_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_feed_channel_connect; connectable->disconnect = ags_feed_channel_disconnect; } void ags_feed_channel_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = NULL; } void ags_feed_channel_class_init(AgsFeedChannelClass *feed_channel) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_feed_channel_parent_class = g_type_class_peek_parent(feed_channel); /* GObjectClass */ gobject = (GObjectClass *) feed_channel; gobject->finalize = ags_feed_channel_finalize; } void ags_feed_channel_init(AgsFeedChannel *feed_channel) { GList *port; AGS_RECALL(feed_channel)->name = "ags-feed"; AGS_RECALL(feed_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(feed_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(feed_channel)->xml_type = "ags-feed-channel"; } void ags_feed_channel_connect(AgsConnectable *connectable) { ags_feed_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_feed_channel_disconnect(AgsConnectable *connectable) { ags_feed_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_feed_channel_finalize(GObject *gobject) { AgsFeedChannel *feed_channel; feed_channel = AGS_FEED_CHANNEL(gobject); /* call parent */ G_OBJECT_CLASS(ags_feed_channel_parent_class)->finalize(gobject); } /** * ags_feed_channel_new: * * Creates an #AgsFeedChannel * * Returns: a new #AgsFeedChannel * * Since: 1.0.0 */ AgsFeedChannel* ags_feed_channel_new() { AgsFeedChannel *feed_channel; feed_channel = (AgsFeedChannel *) g_object_new(AGS_TYPE_FEED_CHANNEL, NULL); return(feed_channel); } gsequencer-1.4.24/ags/audio/recall/ags_prepare_audio_signal.c0000644000175000017500000002503113246707333021164 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_prepare_audio_signal_class_init(AgsPrepareAudioSignalClass *prepare_audio_signal); void ags_prepare_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_prepare_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_prepare_audio_signal_init(AgsPrepareAudioSignal *prepare_audio_signal); void ags_prepare_audio_signal_connect(AgsConnectable *connectable); void ags_prepare_audio_signal_disconnect(AgsConnectable *connectable); void ags_prepare_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_prepare_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_prepare_audio_signal_finalize(GObject *gobject); void ags_prepare_audio_signal_run_init_pre(AgsRecall *recall); void ags_prepare_audio_signal_run_pre(AgsRecall *recall); AgsRecall* ags_prepare_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_prepare_audio_signal * @short_description: prepares audio signal * @title: AgsPrepareAudioSignal * @section_id: * @include: ags/audio/recall/ags_prepare_audio_signal.h * * The #AgsPrepareAudioSignal class prepares the audio signal. */ static gpointer ags_prepare_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_prepare_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_prepare_audio_signal_parent_dynamic_connectable_interface; GType ags_prepare_audio_signal_get_type() { static GType ags_type_prepare_audio_signal = 0; if(!ags_type_prepare_audio_signal){ static const GTypeInfo ags_prepare_audio_signal_info = { sizeof (AgsPrepareAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_prepare_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPrepareAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_prepare_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_prepare_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_prepare_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_prepare_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsPrepareAudioSignal", &ags_prepare_audio_signal_info, 0); g_type_add_interface_static(ags_type_prepare_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_prepare_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_prepare_audio_signal); } void ags_prepare_audio_signal_class_init(AgsPrepareAudioSignalClass *prepare_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_prepare_audio_signal_parent_class = g_type_class_peek_parent(prepare_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) prepare_audio_signal; gobject->finalize = ags_prepare_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) prepare_audio_signal; recall->run_init_pre = ags_prepare_audio_signal_run_init_pre; recall->run_pre = ags_prepare_audio_signal_run_pre; } void ags_prepare_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_prepare_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_prepare_audio_signal_connect; connectable->disconnect = ags_prepare_audio_signal_disconnect; } void ags_prepare_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_prepare_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_prepare_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_prepare_audio_signal_disconnect_dynamic; } void ags_prepare_audio_signal_init(AgsPrepareAudioSignal *prepare_audio_signal) { AGS_RECALL(prepare_audio_signal)->name = "ags-prepare"; AGS_RECALL(prepare_audio_signal)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(prepare_audio_signal)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(prepare_audio_signal)->xml_type = "ags-prepare-audio-signal"; AGS_RECALL(prepare_audio_signal)->port = NULL; } void ags_prepare_audio_signal_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_prepare_audio_signal_parent_class)->finalize(gobject); /* empty */ } void ags_prepare_audio_signal_connect(AgsConnectable *connectable) { /* call parent */ ags_prepare_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_prepare_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_prepare_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_prepare_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_prepare_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_prepare_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_prepare_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_prepare_audio_signal_run_init_pre(AgsRecall *recall) { GObject *soundcard; AgsRecycling *recycling; AgsAudioSignal *destination; AgsRecallID *parent_recall_id; AgsRecyclingContext *recycling_context; AgsPrepareRecycling *prepare_recycling; AgsPrepareAudioSignal *prepare_audio_signal; AgsMutexManager *mutex_manager; GList *stream; gdouble delay; guint attack; guint length; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; prepare_audio_signal = AGS_PREPARE_AUDIO_SIGNAL(recall); prepare_recycling = AGS_PREPARE_RECYCLING(recall->parent); soundcard = AGS_RECALL(prepare_audio_signal)->soundcard; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* recycling */ recall->flags &= (~AGS_RECALL_PERSISTENT); recycling = AGS_RECALL_RECYCLING(prepare_recycling)->destination; pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* recycling context */ recycling_context = recall->recall_id->recycling_context; parent_recall_id = ags_recall_id_find_recycling_context(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->destination->recall_id, recycling_context->parent); //TODO:JK: unclear attack = 0; delay = 0.0; /* create new audio signal */ destination = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) parent_recall_id); g_object_set(prepare_audio_signal, "destination", destination, NULL); ags_recycling_create_audio_signal_with_defaults(recycling, destination, delay, attack); length = 1; // (guint) (2.0 * soundcard->delay[soundcard->tic_counter]) + 1; ags_audio_signal_stream_resize(destination, length); ags_connectable_connect(AGS_CONNECTABLE(destination)); destination->stream_current = destination->stream_beginning; pthread_mutex_lock(recycling_mutex); ags_recycling_add_audio_signal(recycling, destination); pthread_mutex_unlock(recycling_mutex); #ifdef AGS_DEBUG g_message("prepare %x to %x", destination, parent_recall_id); g_message("creating destination"); #endif /* call parent */ AGS_RECALL_CLASS(ags_prepare_audio_signal_parent_class)->run_init_pre(recall); } void ags_prepare_audio_signal_run_pre(AgsRecall *recall) { AGS_RECALL_CLASS(ags_prepare_audio_signal_parent_class)->run_pre(recall); if(AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current != NULL){ void *buffer; guint buffer_size; buffer = (signed short *) AGS_RECALL_AUDIO_SIGNAL(recall)->destination->stream_current->data; buffer_size = AGS_RECALL_AUDIO_SIGNAL(recall)->destination->buffer_size; ags_audio_buffer_util_clear_buffer(buffer, 1, buffer_size, ags_audio_buffer_util_format_from_soundcard(AGS_RECALL_AUDIO_SIGNAL(recall)->destination->format)); }else{ ags_recall_done(recall); } } /** * ags_prepare_audio_signal_new: * @audio_signal: an #AgsAudioSignal * * Creates an #AgsPrepareAudioSignal * * Returns: a new #AgsPrepareAudioSignal * * Since: 1.0.0.8 */ AgsPrepareAudioSignal* ags_prepare_audio_signal_new(AgsAudioSignal *audio_signal) { AgsPrepareAudioSignal *prepare_audio_signal; prepare_audio_signal = (AgsPrepareAudioSignal *) g_object_new(AGS_TYPE_PREPARE_AUDIO_SIGNAL, NULL); return(prepare_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_prepare_channel.c0000644000175000017500000001272113246707333020140 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_prepare_channel_class_init(AgsPrepareChannelClass *prepare_channel); void ags_prepare_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_prepare_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_prepare_channel_init(AgsPrepareChannel *prepare_channel); void ags_prepare_channel_connect(AgsConnectable *connectable); void ags_prepare_channel_disconnect(AgsConnectable *connectable); void ags_prepare_channel_dispose(GObject *gobject); void ags_prepare_channel_finalize(GObject *gobject); /** * SECTION:ags_prepare_channel * @short_description: prepares channel * @title: AgsPrepareChannel * @section_id: * @include: ags/audio/recall/ags_prepare_channel.h * * The #AgsPrepareChannel class provides ports to the effect processor. */ static gpointer ags_prepare_channel_parent_class = NULL; static AgsConnectableInterface *ags_prepare_channel_parent_connectable_interface; static AgsPluginInterface *ags_prepare_channel_parent_plugin_interface; static const gchar *ags_prepare_channel_plugin_name = "ags-prepare"; GType ags_prepare_channel_get_type() { static GType ags_type_prepare_channel = 0; if(!ags_type_prepare_channel){ static const GTypeInfo ags_prepare_channel_info = { sizeof (AgsPrepareChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_prepare_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPrepareChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_prepare_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_prepare_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_prepare_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_prepare_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsPrepareChannel", &ags_prepare_channel_info, 0); g_type_add_interface_static(ags_type_prepare_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_prepare_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_prepare_channel); } void ags_prepare_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_prepare_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_prepare_channel_connect; connectable->disconnect = ags_prepare_channel_disconnect; } void ags_prepare_channel_plugin_interface_init(AgsPluginInterface *plugin) { ags_prepare_channel_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_prepare_channel_class_init(AgsPrepareChannelClass *prepare_channel) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_prepare_channel_parent_class = g_type_class_peek_parent(prepare_channel); /* GObjectClass */ gobject = (GObjectClass *) prepare_channel; gobject->dispose = ags_prepare_channel_dispose; gobject->finalize = ags_prepare_channel_finalize; } void ags_prepare_channel_init(AgsPrepareChannel *prepare_channel) { AGS_RECALL(prepare_channel)->name = "ags-prepare"; AGS_RECALL(prepare_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(prepare_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(prepare_channel)->xml_type = "ags-prepare-channel"; } void ags_prepare_channel_dispose(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_prepare_channel_parent_class)->dispose(gobject); } void ags_prepare_channel_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_prepare_channel_parent_class)->finalize(gobject); } void ags_prepare_channel_connect(AgsConnectable *connectable) { /* call parent */ ags_prepare_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_prepare_channel_disconnect(AgsConnectable *connectable) { /* call parent */ ags_prepare_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } /** * ags_prepare_channel_new: * * Creates an #AgsPrepareChannel * * Returns: a new #AgsPrepareChannel * * Since: 1.0.0.8 */ AgsPrepareChannel* ags_prepare_channel_new() { AgsPrepareChannel *prepare_channel; prepare_channel = (AgsPrepareChannel *) g_object_new(AGS_TYPE_PREPARE_CHANNEL, NULL); return(prepare_channel); } gsequencer-1.4.24/ags/audio/recall/ags_copy_notation_audio_run.c0000644000175000017500000004004713246707333021746 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_copy_notation_audio_run_class_init(AgsCopyNotationAudioRunClass *copy_notation_audio_run); void ags_copy_notation_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_copy_notation_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_copy_notation_audio_run_init(AgsCopyNotationAudioRun *copy_notation_audio_run); void ags_copy_notation_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_copy_notation_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_copy_notation_audio_run_connect(AgsConnectable *connectable); void ags_copy_notation_audio_run_disconnect(AgsConnectable *connectable); void ags_copy_notation_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_notation_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_notation_audio_run_dispose(GObject *gobject); void ags_copy_notation_audio_run_finalize(GObject *gobject); void ags_copy_notation_audio_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_copy_notation_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_copy_notation_audio_run_run_init_pre(AgsRecall *recall); void ags_copy_notation_audio_run_tic_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, AgsCopyNotationAudioRun *copy_notation_audio_run); /** * SECTION:ags_copy_notation_audio_run * @short_description: copy notations * @title: AgsCopyNotationAudioRun * @section_id: * @include: ags/audio/recall/ags_copy_notation_audio_run.h * * The #AgsCopyNotationAudioRun class copy notations. */ enum{ PROP_0, PROP_COUNT_BEATS_AUDIO_RUN, }; static gpointer ags_copy_notation_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_copy_notation_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_copy_notation_audio_run_parent_dynamic_connectable_interface; GType ags_copy_notation_audio_run_get_type() { static GType ags_type_copy_notation_audio_run = 0; if(!ags_type_copy_notation_audio_run){ static const GTypeInfo ags_copy_notation_audio_run_info = { sizeof (AgsCopyNotationAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_notation_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyNotationAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_notation_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_notation_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_notation_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_copy_notation_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsCopyNotationAudioRun", &ags_copy_notation_audio_run_info, 0); g_type_add_interface_static(ags_type_copy_notation_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_copy_notation_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_copy_notation_audio_run); } void ags_copy_notation_audio_run_class_init(AgsCopyNotationAudioRunClass *copy_notation_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_copy_notation_audio_run_parent_class = g_type_class_peek_parent(copy_notation_audio_run); /* GObjectClass */ gobject = (GObjectClass *) copy_notation_audio_run; gobject->set_property = ags_copy_notation_audio_run_set_property; gobject->get_property = ags_copy_notation_audio_run_get_property; gobject->dispose = ags_copy_notation_audio_run_dispose; gobject->finalize = ags_copy_notation_audio_run_finalize; /* properties */ param_spec = g_param_spec_object("count_beats_audio_run", i18n_pspec("assigned AgsCountBeatsAudioRun"), i18n_pspec("The AgsCountBeatsAudioRun which emits beat signal"), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT_BEATS_AUDIO_RUN, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) copy_notation_audio_run; recall->resolve_dependencies = ags_copy_notation_audio_run_resolve_dependencies; recall->duplicate = ags_copy_notation_audio_run_duplicate; recall->run_init_pre = ags_copy_notation_audio_run_run_init_pre; } void ags_copy_notation_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_copy_notation_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_copy_notation_audio_run_connect; connectable->disconnect = ags_copy_notation_audio_run_disconnect; } void ags_copy_notation_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_copy_notation_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_copy_notation_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_copy_notation_audio_run_disconnect_dynamic; } void ags_copy_notation_audio_run_init(AgsCopyNotationAudioRun *copy_notation_audio_run) { copy_notation_audio_run->count_beats_audio_run = NULL; copy_notation_audio_run->current_note = NULL; } void ags_copy_notation_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCopyNotationAudioRun *copy_notation_audio_run; copy_notation_audio_run = AGS_COPY_NOTATION_AUDIO_RUN(gobject); switch(prop_id){ case PROP_COUNT_BEATS_AUDIO_RUN: { AgsCountBeatsAudioRun *count_beats_audio_run; gboolean is_template; count_beats_audio_run = (AgsCountBeatsAudioRun *) g_value_get_object(value); if(copy_notation_audio_run->count_beats_audio_run == count_beats_audio_run) return; if(count_beats_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(count_beats_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(copy_notation_audio_run->count_beats_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(copy_notation_audio_run), (AgsRecall *) copy_notation_audio_run->count_beats_audio_run); } g_object_unref(G_OBJECT(copy_notation_audio_run->count_beats_audio_run)); } if(count_beats_audio_run != NULL){ g_object_ref(G_OBJECT(count_beats_audio_run)); if(is_template){ ags_recall_add_dependency(AGS_RECALL(copy_notation_audio_run), ags_recall_dependency_new((GObject *) count_beats_audio_run)); } } copy_notation_audio_run->count_beats_audio_run = count_beats_audio_run; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_copy_notation_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCopyNotationAudioRun *copy_notation_audio_run; copy_notation_audio_run = AGS_COPY_NOTATION_AUDIO_RUN(gobject); switch(prop_id){ case PROP_COUNT_BEATS_AUDIO_RUN: { g_value_set_object(value, copy_notation_audio_run->count_beats_audio_run); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_copy_notation_audio_run_dispose(GObject *gobject) { AgsCopyNotationAudioRun *copy_notation_audio_run; copy_notation_audio_run = AGS_COPY_NOTATION_AUDIO_RUN(gobject); /* count beats audio run */ if(copy_notation_audio_run->count_beats_audio_run != NULL){ g_object_unref(copy_notation_audio_run->count_beats_audio_run); copy_notation_audio_run->count_beats_audio_run = NULL; } /* call parent */ G_OBJECT_CLASS(ags_copy_notation_audio_run_parent_class)->dispose(gobject); } void ags_copy_notation_audio_run_finalize(GObject *gobject) { AgsCopyNotationAudioRun *copy_notation_audio_run; copy_notation_audio_run = AGS_COPY_NOTATION_AUDIO_RUN(gobject); /* count beats audio run */ if(copy_notation_audio_run->count_beats_audio_run != NULL){ g_object_unref(copy_notation_audio_run->count_beats_audio_run); } /* call parent */ G_OBJECT_CLASS(ags_copy_notation_audio_run_parent_class)->finalize(gobject); } void ags_copy_notation_audio_run_connect(AgsConnectable *connectable) { /* call parent */ ags_copy_notation_audio_run_parent_connectable_interface->connect(connectable); } void ags_copy_notation_audio_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_copy_notation_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_copy_notation_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsCopyNotationAudioRun *copy_notation_audio_run; AgsDelayAudioRun *delay_audio_run; copy_notation_audio_run = AGS_COPY_NOTATION_AUDIO_RUN(dynamic_connectable); /* call parent */ ags_copy_notation_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* connect tic_alloc in AgsDelayAudioRun */ delay_audio_run = copy_notation_audio_run->count_beats_audio_run->delay_audio_run; g_object_ref(G_OBJECT(delay_audio_run)); copy_notation_audio_run->tic_alloc_input_handler = g_signal_connect(G_OBJECT(delay_audio_run), "tic_alloc_input", G_CALLBACK(ags_copy_notation_audio_run_tic_alloc_input_callback), copy_notation_audio_run); } void ags_copy_notation_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsCopyNotationAudioRun *copy_notation_audio_run; AgsDelayAudioRun *delay_audio_run; copy_notation_audio_run = AGS_COPY_NOTATION_AUDIO_RUN(dynamic_connectable); /* call parent */ ags_copy_notation_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* disconnect tic_alloc in AgsDelayAudioRun */ delay_audio_run = copy_notation_audio_run->count_beats_audio_run->delay_audio_run; g_signal_handler_disconnect(G_OBJECT(delay_audio_run), copy_notation_audio_run->tic_alloc_input_handler); g_object_unref(G_OBJECT(delay_audio_run)); } void ags_copy_notation_audio_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallID *recall_id; AgsRecallDependency *recall_dependency; AgsCountBeatsAudioRun *count_beats_audio_run; GList *list; guint i, i_stop; template = AGS_RECALL(ags_recall_find_template(AGS_RECALL_CONTAINER(recall->container)->recall_audio_run)->data); list = template->dependencies; recall_id = recall->recall_id; count_beats_audio_run = NULL; i_stop = 1; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_COUNT_BEATS_AUDIO_RUN(recall_dependency->dependency)){ count_beats_audio_run = (AgsCountBeatsAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "count_beats_audio_run", count_beats_audio_run, NULL); } AgsRecall* ags_copy_notation_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsCopyNotationAudioRun *copy; copy = AGS_COPY_NOTATION_AUDIO_RUN(AGS_RECALL_CLASS(ags_copy_notation_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } void ags_copy_notation_audio_run_run_init_pre(AgsRecall *recall) { AgsCopyNotationAudio *copy_notation_audio; AgsCopyNotationAudioRun *copy_notation_audio_run; copy_notation_audio_run = AGS_COPY_NOTATION_AUDIO_RUN(recall); copy_notation_audio = AGS_COPY_NOTATION_AUDIO(AGS_RECALL_AUDIO_RUN(copy_notation_audio_run)->recall_audio); copy_notation_audio_run->current_note = copy_notation_audio->notation->notes; } void ags_copy_notation_audio_run_tic_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, AgsCopyNotationAudioRun *copy_notation_audio_run) { AgsAudio *audio; AgsChannel *input, *current_input; AgsCopyNotationAudio *copy_notation_audio; copy_notation_audio = AGS_COPY_NOTATION_AUDIO(AGS_RECALL_AUDIO_RUN(copy_notation_audio_run)->recall_audio); audio = AGS_RECALL_AUDIO(copy_notation_audio)->audio; input = ags_channel_nth(audio->input, copy_notation_audio->audio_channel); if(input != NULL){ AgsRecycling *recycling, *last_recycling; AgsAudioSignal *audio_signal; AgsNote *note; GList *note_list; guint offset; guint length; note_list = copy_notation_audio_run->current_note; offset = copy_notation_audio_run->count_beats_audio_run->notation_counter; while(note_list != NULL && (note = AGS_NOTE(note_list->data))->x[0] == offset){ current_input = ags_channel_nth(input, note->y); if(current_input != NULL){ recycling = current_input->first_recycling; if(recycling == NULL){ note_list = note_list->next; continue; } last_recycling = current_input->last_recycling; if((AGS_COPY_NOTATION_AUDIO_FIT_AUDIO_SIGNAL & (copy_notation_audio->flags)) != 0){ length = note->x[1] - note->x[0]; } while(recycling != last_recycling->next){ if((AGS_COPY_NOTATION_AUDIO_FIT_AUDIO_SIGNAL & (copy_notation_audio->flags)) != 0){ audio_signal = ags_audio_signal_new_with_length((GObject *) AGS_RECALL(copy_notation_audio)->soundcard, (GObject *) recycling, (GObject *) AGS_RECALL(copy_notation_audio_run)->recall_id, length); }else{ audio_signal = ags_audio_signal_new((GObject *) AGS_RECALL(copy_notation_audio)->soundcard, (GObject *) recycling, (GObject *) AGS_RECALL(copy_notation_audio_run)->recall_id); } ags_connectable_connect(AGS_CONNECTABLE(audio_signal)); ags_recycling_add_audio_signal(recycling, audio_signal); recycling = recycling->next; } } note_list = note_list->next; } copy_notation_audio_run->current_note = note_list; } } /** * ags_copy_notation_audio_run_new: * @count_beats_audio_run: the #AgsCountBeatsAudioRun * * Creates an #AgsCopyNotationAudioRun * * Returns: a new #AgsCopyNotationAudioRun * * Since: 1.0.0 */ AgsCopyNotationAudioRun* ags_copy_notation_audio_run_new(AgsCountBeatsAudioRun *count_beats_audio_run) { AgsCopyNotationAudioRun *copy_notation_audio_run; copy_notation_audio_run = (AgsCopyNotationAudioRun *) g_object_new(AGS_TYPE_COPY_NOTATION_AUDIO_RUN, "count_beats_audio_run", count_beats_audio_run, NULL); return(copy_notation_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_mute_audio.h0000644000175000017500000000356713246707333017162 00000000000000/* 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 . */ #ifndef __AGS_MUTE_AUDIO_H__ #define __AGS_MUTE_AUDIO_H__ #include #include #include #include #define AGS_TYPE_MUTE_AUDIO (ags_mute_audio_get_type()) #define AGS_MUTE_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTE_AUDIO, AgsMuteAudio)) #define AGS_MUTE_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MUTE_AUDIO, AgsMuteAudio)) #define AGS_IS_MUTE_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MUTE_AUDIO)) #define AGS_IS_MUTE_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MUTE_AUDIO)) #define AGS_MUTE_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_MUTE_AUDIO, AgsMuteAudioClass)) typedef struct _AgsMuteAudio AgsMuteAudio; typedef struct _AgsMuteAudioClass AgsMuteAudioClass; struct _AgsMuteAudio { AgsRecallAudio recall_audio; AgsPort *muted; }; struct _AgsMuteAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_mute_audio_get_type(); AgsMuteAudio* ags_mute_audio_new(); #endif /*__AGS_MUTE_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_peak_channel_run.c0000644000175000017500000002110213256163135020274 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_peak_channel_run_class_init(AgsPeakChannelRunClass *peak_channel_run); void ags_peak_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_peak_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_peak_channel_run_init(AgsPeakChannelRun *peak_channel_run); void ags_peak_channel_run_connect(AgsConnectable *connectable); void ags_peak_channel_run_disconnect(AgsConnectable *connectable); void ags_peak_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_peak_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_peak_channel_run_finalize(GObject *gobject); AgsRecall* ags_peak_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_peak_channel_run_run_pre(AgsRecall *recall); /** * SECTION:ags_peak_channel_run * @short_description: peak * @title: AgsPeakChannelRun * @section_id: * @include: ags/audio/recall/ags_peak_channel_run.h * * The #AgsPeakChannelRun class peaks the channel. */ static gpointer ags_peak_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_peak_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_peak_channel_run_parent_dynamic_connectable_interface; GType ags_peak_channel_run_get_type() { static GType ags_type_peak_channel_run = 0; if(!ags_type_peak_channel_run){ static const GTypeInfo ags_peak_channel_run_info = { sizeof (AgsPeakChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_peak_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPeakChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_peak_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_peak_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_peak_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_peak_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsPeakChannelRun", &ags_peak_channel_run_info, 0); g_type_add_interface_static(ags_type_peak_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_peak_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_peak_channel_run); } void ags_peak_channel_run_class_init(AgsPeakChannelRunClass *peak_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; ags_peak_channel_run_parent_class = g_type_class_peek_parent(peak_channel_run); /* GObjectClass */ gobject = (GObjectClass *) peak_channel_run; gobject->finalize = ags_peak_channel_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) peak_channel_run; recall->duplicate = ags_peak_channel_run_duplicate; recall->run_pre = ags_peak_channel_run_run_pre; } void ags_peak_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_peak_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_peak_channel_run_connect; connectable->disconnect = ags_peak_channel_run_disconnect; } void ags_peak_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_peak_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_peak_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_peak_channel_run_disconnect_dynamic; } void ags_peak_channel_run_init(AgsPeakChannelRun *peak_channel_run) { AGS_RECALL(peak_channel_run)->name = "ags-peak"; AGS_RECALL(peak_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(peak_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(peak_channel_run)->xml_type = "ags-peak-channel-run"; AGS_RECALL(peak_channel_run)->port = NULL; AGS_RECALL(peak_channel_run)->flags |= AGS_RECALL_INPUT_ORIENTATED; AGS_RECALL(peak_channel_run)->child_type = AGS_TYPE_PEAK_RECYCLING; } void ags_peak_channel_run_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_peak_channel_run_parent_class)->finalize(gobject); } void ags_peak_channel_run_connect(AgsConnectable *connectable) { /* call parent */ ags_peak_channel_run_parent_connectable_interface->connect(connectable); } void ags_peak_channel_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_peak_channel_run_parent_connectable_interface->disconnect(connectable); } void ags_peak_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_peak_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_peak_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_peak_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } AgsRecall* ags_peak_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPeakChannelRun *copy; copy = (AgsPeakChannelRun *) AGS_RECALL_CLASS(ags_peak_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } void ags_peak_channel_run_run_pre(AgsRecall *recall) { AgsPeakChannel *peak_channel; gboolean buffer_computed; GValue value = {0,}; AGS_RECALL_CLASS(ags_peak_channel_run_parent_class)->run_pre(recall); /* calculate of previous run */ peak_channel = AGS_RECALL_CHANNEL_RUN(recall)->recall_channel; pthread_mutex_lock(peak_channel->buffer_mutex); g_value_init(&value, G_TYPE_BOOLEAN); ags_port_safe_read(peak_channel->buffer_computed, &value); buffer_computed = g_value_get_boolean(&value); if(!buffer_computed){ /* set buffer-computed port to TRUE */ g_value_set_boolean(&value, TRUE); ags_port_safe_write(peak_channel->buffer_computed, &value); } pthread_mutex_unlock(peak_channel->buffer_mutex); /* lock free - buffer-computed reset by cyclic-task AgsResetPeak */ if(!buffer_computed){ /* retrieve peak */ ags_peak_channel_retrieve_peak_internal(peak_channel); /* clear buffer */ ags_audio_buffer_util_clear_buffer(peak_channel->buffer, 1, peak_channel->buffer_size, ags_audio_buffer_util_format_from_soundcard(peak_channel->format)); } g_value_unset(&value); } /** * ags_peak_channel_run_new: * @channel: the #AgsChannel as source * * Creates an #AgsPeakChannelRun * * Returns: a new #AgsPeakChannelRun * * Since: 1.0.0 */ AgsPeakChannelRun* ags_peak_channel_run_new(AgsChannel *channel) { AgsPeakChannelRun *peak_channel_run; peak_channel_run = (AgsPeakChannelRun *) g_object_new(AGS_TYPE_PEAK_CHANNEL_RUN, "source", channel, NULL); return(peak_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_copy_audio_signal.h0000644000175000017500000000417213246707333020510 00000000000000/* 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 . */ #ifndef __AGS_COPY_AUDIO_SIGNAL_H__ #define __AGS_COPY_AUDIO_SIGNAL_H__ #include #include #include #define AGS_TYPE_COPY_AUDIO_SIGNAL (ags_copy_audio_signal_get_type()) #define AGS_COPY_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_AUDIO_SIGNAL, AgsCopyAudioSignal)) #define AGS_COPY_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_AUDIO_SIGNAL, AgsCopyAudioSignalClass)) #define AGS_IS_COPY_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COPY_AUDIO_SIGNAL)) #define AGS_IS_COPY_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COPY_AUDIO_SIGNAL)) #define AGS_COPY_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COPY_AUDIO_SIGNAL, AgsCopyAudioSignalClass)) typedef struct _AgsCopyAudioSignal AgsCopyAudioSignal; typedef struct _AgsCopyAudioSignalClass AgsCopyAudioSignalClass; struct _AgsCopyAudioSignal { AgsRecallAudioSignal recall_audio_signal; }; struct _AgsCopyAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_copy_audio_signal_get_type(); AgsCopyAudioSignal* ags_copy_audio_signal_new(AgsAudioSignal *destination, AgsAudioSignal *source, GObject *soundcard); #endif /*__AGS_COPY_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_channel.c0000644000175000017500000003021313246707333017443 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_play_channel_class_init(AgsPlayChannelClass *play_channel); void ags_play_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_channel_mutable_interface_init(AgsMutableInterface *mutable); void ags_play_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_play_channel_init(AgsPlayChannel *play_channel); void ags_play_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_play_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_play_channel_connect(AgsConnectable *connectable); void ags_play_channel_disconnect(AgsConnectable *connectable); void ags_play_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_play_channel_dispose(GObject *gobject); void ags_play_channel_finalize(GObject *gobject); void ags_play_channel_set_muted(AgsMutable *mutable, gboolean muted); enum{ PROP_0, PROP_AUDIO_CHANNEL, PROP_MUTED, }; /** * SECTION:ags_play_channel * @short_description: plays channel * @title: AgsPlayChannel * @section_id: * @include: ags/audio/recall/ags_play_channel.h * * The #AgsPlayChannel class provides ports to the effect processor. */ static gpointer ags_play_channel_parent_class = NULL; static AgsConnectableInterface *ags_play_channel_parent_connectable_interface; static AgsMutableInterface *ags_play_channel_parent_mutable_interface; static AgsPluginInterface *ags_play_channel_parent_plugin_interface; static const gchar *ags_play_channel_plugin_name = "ags-play"; static const gchar *ags_play_channel_specifier[] = { "./audio-channel[0]", "./muted[0]", }; static const gchar *ags_play_channel_control_port[] = { "1/2", "2/2", }; GType ags_play_channel_get_type() { static GType ags_type_play_channel = 0; if(!ags_type_play_channel){ static const GTypeInfo ags_play_channel_info = { sizeof (AgsPlayChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_mutable_interface_info = { (GInterfaceInitFunc) ags_play_channel_mutable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_play_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsPlayChannel", &ags_play_channel_info, 0); g_type_add_interface_static(ags_type_play_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_channel, AGS_TYPE_MUTABLE, &ags_mutable_interface_info); g_type_add_interface_static(ags_type_play_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_play_channel); } void ags_play_channel_class_init(AgsPlayChannelClass *play_channel) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_play_channel_parent_class = g_type_class_peek_parent(play_channel); /* GObjectClass */ gobject = (GObjectClass *) play_channel; gobject->set_property = ags_play_channel_set_property; gobject->get_property = ags_play_channel_get_property; gobject->dispose = ags_play_channel_dispose; gobject->finalize = ags_play_channel_finalize; /* properties */ /** * AgsPlayChannel:audio-channel: * * The audio channel port. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("audio-channel", i18n_pspec("assigned audio channel"), i18n_pspec("The audio channel this recall does output to"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsPlayChannel:muted: * * The muted port. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("muted", i18n_pspec("mute channel"), i18n_pspec("Mute the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MUTED, param_spec); } void ags_play_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_channel_connect; connectable->disconnect = ags_play_channel_disconnect; } void ags_play_channel_mutable_interface_init(AgsMutableInterface *mutable) { ags_play_channel_parent_mutable_interface = g_type_interface_peek_parent(mutable); mutable->set_muted = ags_play_channel_set_muted; } void ags_play_channel_plugin_interface_init(AgsPluginInterface *plugin) { ags_play_channel_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->set_ports = ags_play_channel_set_ports; } void ags_play_channel_init(AgsPlayChannel *play_channel) { GList *port; AGS_RECALL(play_channel)->name = "ags-play"; AGS_RECALL(play_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_channel)->xml_type = "ags-play-channel"; port = NULL; /* audio channel */ play_channel->audio_channel = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_play_channel_plugin_name, "specifier", ags_play_channel_specifier[0], "control-port", ags_play_channel_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_UINT64, "port-value-size", sizeof(guint64), "port-value-length", 1, NULL); g_object_ref(play_channel->audio_channel); play_channel->audio_channel->port_value.ags_port_uint = 0; /* add to port */ port = g_list_prepend(port, play_channel->audio_channel); g_object_ref(play_channel->audio_channel); /* muted */ play_channel->muted = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_play_channel_plugin_name, "specifier", ags_play_channel_specifier[1], "control-port", ags_play_channel_control_port[1], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(play_channel->muted); play_channel->muted->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, play_channel->muted); g_object_ref(play_channel->muted); /* set port */ AGS_RECALL(play_channel)->port = port; } void ags_play_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayChannel *play_channel; play_channel = AGS_PLAY_CHANNEL(gobject); switch(prop_id){ case PROP_AUDIO_CHANNEL: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == play_channel->audio_channel){ return; } if(play_channel->audio_channel != NULL){ g_object_unref(G_OBJECT(play_channel->audio_channel)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } play_channel->audio_channel = port; } break; case PROP_MUTED: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == play_channel->muted){ return; } if(play_channel->muted != NULL){ g_object_unref(G_OBJECT(play_channel->muted)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } play_channel->muted = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayChannel *play_channel; play_channel = AGS_PLAY_CHANNEL(gobject); switch(prop_id){ case PROP_AUDIO_CHANNEL: { g_value_set_object(value, play_channel->audio_channel); } break; case PROP_MUTED: { g_value_set_object(value, play_channel->muted); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_channel_dispose(GObject *gobject) { AgsPlayChannel *play_channel; play_channel = AGS_PLAY_CHANNEL(gobject); /* audio channel */ if(play_channel->audio_channel != NULL){ g_object_unref(G_OBJECT(play_channel->audio_channel)); play_channel->audio_channel = NULL; } /* muted */ if(play_channel->muted != NULL){ g_object_unref(G_OBJECT(play_channel->muted)); play_channel->muted = NULL; } /* call parent */ G_OBJECT_CLASS(ags_play_channel_parent_class)->dispose(gobject); } void ags_play_channel_finalize(GObject *gobject) { AgsPlayChannel *play_channel; play_channel = AGS_PLAY_CHANNEL(gobject); /* audio channel */ if(play_channel->audio_channel != NULL){ g_object_unref(G_OBJECT(play_channel->audio_channel)); } /* muted */ if(play_channel->muted != NULL){ g_object_unref(G_OBJECT(play_channel->muted)); } /* call parent */ G_OBJECT_CLASS(ags_play_channel_parent_class)->finalize(gobject); } void ags_play_channel_connect(AgsConnectable *connectable) { AgsPlayChannel *play_channel; ags_play_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_play_channel_disconnect(AgsConnectable *connectable) { ags_play_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_play_channel_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./audio-channel[0]", 17)){ g_object_set(G_OBJECT(plugin), "audio-channel", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./muted[0]", 9)){ g_object_set(G_OBJECT(plugin), "muted", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_play_channel_set_muted(AgsMutable *mutable, gboolean muted) { GValue value = {0,}; g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, muted); ags_port_safe_write(AGS_PLAY_CHANNEL(mutable)->muted, &value); } /** * ags_play_channel_new: * @soundcard: the #GObject outputting to * @audio_channel: the audio channel to use * * Creates an #AgsPlayChannel * * Returns: a new #AgsPlayChannel * * Since: 1.0.0 */ AgsPlayChannel* ags_play_channel_new(GObject *soundcard, guint audio_channel) { AgsPlayChannel *play_channel; play_channel = (AgsPlayChannel *) g_object_new(AGS_TYPE_PLAY_CHANNEL, "soundcard", soundcard, NULL); play_channel->audio_channel->port_value.ags_port_uint = audio_channel; return(play_channel); } gsequencer-1.4.24/ags/audio/recall/ags_record_midi_audio.h0000644000175000017500000000415513247044247020461 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RECORD_MIDI_AUDIO_H__ #define __AGS_RECORD_MIDI_AUDIO_H__ #include #include #include #define AGS_TYPE_RECORD_MIDI_AUDIO (ags_record_midi_audio_get_type()) #define AGS_RECORD_MIDI_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECORD_MIDI_AUDIO, AgsRecordMidiAudio)) #define AGS_RECORD_MIDI_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECORD_MIDI_AUDIO, AgsRecordMidiAudio)) #define AGS_IS_RECORD_MIDI_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECORD_MIDI_AUDIO)) #define AGS_IS_RECORD_MIDI_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECORD_MIDI_AUDIO)) #define AGS_RECORD_MIDI_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECORD_MIDI_AUDIO, AgsRecordMidiAudioClass)) typedef struct _AgsRecordMidiAudio AgsRecordMidiAudio; typedef struct _AgsRecordMidiAudioClass AgsRecordMidiAudioClass; struct _AgsRecordMidiAudio { AgsRecallAudio recall_audio; AgsPort *playback; AgsPort *record; AgsPort *filename; AgsPort *division; AgsPort *tempo; AgsPort *bpm; }; struct _AgsRecordMidiAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_record_midi_audio_get_type(); AgsRecordMidiAudio* ags_record_midi_audio_new(); #endif /*__AGS_RECORD_MIDI_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_stream_recycling.c0000644000175000017500000001615113247044247020344 00000000000000/* 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 . */ #include #include #include #include void ags_stream_recycling_class_init(AgsStreamRecyclingClass *stream_recycling); void ags_stream_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_stream_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_stream_recycling_init(AgsStreamRecycling *stream_recycling); void ags_stream_recycling_connect(AgsConnectable *connectable); void ags_stream_recycling_disconnect(AgsConnectable *connectable); void ags_stream_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_stream_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_stream_recycling_finalize(GObject *gobject); AgsRecall* ags_stream_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_stream_recycling * @short_description: streams recycling * @title: AgsStreamRecycling * @section_id: * @include: ags/audio/recall/ags_stream_recycling.h * * The #AgsStreamRecycling streams the recycling with appropriate #AgsRecallID. */ static gpointer ags_stream_recycling_parent_class = NULL; static AgsConnectableInterface *ags_stream_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_stream_recycling_parent_dynamic_connectable_interface; GType ags_stream_recycling_get_type() { static GType ags_type_stream_recycling = 0; if(!ags_type_stream_recycling){ static const GTypeInfo ags_stream_recycling_info = { sizeof (AgsStreamRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_stream_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsStreamRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_stream_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_stream_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_stream_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_stream_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsStreamRecycling", &ags_stream_recycling_info, 0); g_type_add_interface_static(ags_type_stream_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_stream_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_stream_recycling); } void ags_stream_recycling_class_init(AgsStreamRecyclingClass *stream_recycling) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_stream_recycling_parent_class = g_type_class_peek_parent(stream_recycling); /* GObjectClass */ gobject = (GObjectClass *) stream_recycling; gobject->finalize = ags_stream_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) stream_recycling; recall->duplicate = ags_stream_recycling_duplicate; } void ags_stream_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_stream_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_stream_recycling_connect; connectable->disconnect = ags_stream_recycling_disconnect; } void ags_stream_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_stream_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_stream_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_stream_recycling_disconnect_dynamic; } void ags_stream_recycling_init(AgsStreamRecycling *stream_recycling) { AGS_RECALL(stream_recycling)->name = "ags-stream"; AGS_RECALL(stream_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(stream_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(stream_recycling)->xml_type = "ags-stream-recycling"; AGS_RECALL(stream_recycling)->port = NULL; AGS_RECALL(stream_recycling)->child_type = AGS_TYPE_STREAM_AUDIO_SIGNAL; AGS_RECALL_RECYCLING(stream_recycling)->flags |= (AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE); } void ags_stream_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_stream_recycling_parent_class)->finalize(gobject); } void ags_stream_recycling_connect(AgsConnectable *connectable) { ags_stream_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_stream_recycling_disconnect(AgsConnectable *connectable) { ags_stream_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_stream_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsStreamRecycling *stream_recycling; ags_stream_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_stream_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_stream_recycling_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } AgsRecall* ags_stream_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsStreamRecycling *copy; copy = (AgsStreamRecycling *) AGS_RECALL_CLASS(ags_stream_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_stream_recycling_new: * @recycling: the #AgsRecycling * * Creates an #AgsStreamRecycling * * Returns: a new #AgsStreamRecycling * * Since: 1.0.0 */ AgsStreamRecycling* ags_stream_recycling_new(AgsRecycling *recycling) { AgsStreamRecycling *stream_recycling; stream_recycling = (AgsStreamRecycling *) g_object_new(AGS_TYPE_STREAM_RECYCLING, "source", recycling, NULL); return(stream_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_copy_pattern_audio.c0000644000175000017500000002573513246707333020713 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_copy_pattern_audio_class_init(AgsCopyPatternAudioClass *copy_pattern_audio); void ags_copy_pattern_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_copy_pattern_audio_init(AgsCopyPatternAudio *copy_pattern_audio); void ags_copy_pattern_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_copy_pattern_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_copy_pattern_audio_set_ports(AgsPlugin *plugin, GList *port); void ags_copy_pattern_audio_dispose(GObject *gobject); void ags_copy_pattern_audio_finalize(GObject *gobject); /** * SECTION:ags_copy_pattern_audio * @short_description: copy audio pattern * @title: AgsCopyPatternAudio * @section_id: * @include: ags/audio/recall/ags_copy_pattern_audio.h * * The #AgsCopyPatternAudio class provides ports to the effect processor. */ enum{ PROP_0, PROP_BANK_INDEX_0, PROP_BANK_INDEX_1, }; static gpointer ags_copy_pattern_audio_parent_class = NULL; static const gchar *ags_copy_pattern_audio_plugin_name = "ags-copy-pattern"; static const gchar *ags_copy_pattern_audio_specifier[] = { "./bank-index-0[0]", "./bank-index-1[0]" }; static const gchar *ags_copy_pattern_audio_control_port[] = { "1/2", "2/2" }; GType ags_copy_pattern_audio_get_type() { static GType ags_type_copy_pattern_audio = 0; if(!ags_type_copy_pattern_audio){ static const GTypeInfo ags_copy_pattern_audio_info = { sizeof (AgsCopyPatternAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_pattern_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyPatternAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_pattern_audio_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_copy_pattern_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_copy_pattern_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsCopyPatternAudio", &ags_copy_pattern_audio_info, 0); g_type_add_interface_static(ags_type_copy_pattern_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_copy_pattern_audio); } void ags_copy_pattern_audio_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_copy_pattern_audio_set_ports; } void ags_copy_pattern_audio_class_init(AgsCopyPatternAudioClass *copy_pattern_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_copy_pattern_audio_parent_class = g_type_class_peek_parent(copy_pattern_audio); /* GObjectClass */ gobject = (GObjectClass *) copy_pattern_audio; gobject->set_property = ags_copy_pattern_audio_set_property; gobject->get_property = ags_copy_pattern_audio_get_property; gobject->dispose = ags_copy_pattern_audio_dispose; gobject->finalize = ags_copy_pattern_audio_finalize; /* properties */ /** * AgsCopyPatternAudio:bank-index-0: * * The bank index 0 port. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("bank-index-0", i18n_pspec("current bank index 0"), i18n_pspec("The current bank index 0 of the AgsPattern"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BANK_INDEX_0, param_spec); /** * AgsCopyPatternAudio:bank-index-1: * * The bank index 1 port. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("bank-index-1", i18n_pspec("current bank index 1"), i18n_pspec("The current bank index 1 of the AgsPattern"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BANK_INDEX_1, param_spec); } void ags_copy_pattern_audio_init(AgsCopyPatternAudio *copy_pattern_audio) { GList *port; AGS_RECALL(copy_pattern_audio)->name = "ags-copy-pattern"; AGS_RECALL(copy_pattern_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(copy_pattern_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(copy_pattern_audio)->xml_type = "ags-copy-pattern-audio"; port = NULL; /* bank index 0 */ copy_pattern_audio->bank_index_0 = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_copy_pattern_audio_plugin_name, "specifier", ags_copy_pattern_audio_specifier[0], "control-port", ags_copy_pattern_audio_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_UINT64, "port-value-size", sizeof(guint), "port-value-length", 1, NULL); g_object_ref(copy_pattern_audio->bank_index_0); copy_pattern_audio->bank_index_0->port_value.ags_port_uint = 0; /* add to port */ port = g_list_prepend(port, copy_pattern_audio->bank_index_0); g_object_ref(copy_pattern_audio->bank_index_0); /* bank index 1 */ copy_pattern_audio->bank_index_1 = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_copy_pattern_audio_plugin_name, "specifier", ags_copy_pattern_audio_specifier[1], "control-port", ags_copy_pattern_audio_control_port[1], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_UINT64, "port-value-size", sizeof(guint), "port-value-length", 1, NULL); g_object_ref(copy_pattern_audio->bank_index_1); copy_pattern_audio->bank_index_1->port_value.ags_port_uint = 0; /* add to port */ port = g_list_prepend(port, copy_pattern_audio->bank_index_1); g_object_ref(copy_pattern_audio->bank_index_1); /* set port */ AGS_RECALL(copy_pattern_audio)->port = port; } void ags_copy_pattern_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCopyPatternAudio *copy_pattern_audio; copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(gobject); switch(prop_id){ case PROP_BANK_INDEX_0: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == copy_pattern_audio->bank_index_0){ return; } if(copy_pattern_audio->bank_index_0 != NULL){ g_object_unref(G_OBJECT(copy_pattern_audio->bank_index_0)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } copy_pattern_audio->bank_index_0 = port; } break; case PROP_BANK_INDEX_1: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == copy_pattern_audio->bank_index_1){ return; } if(copy_pattern_audio->bank_index_1 != NULL){ g_object_unref(G_OBJECT(copy_pattern_audio->bank_index_1)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } copy_pattern_audio->bank_index_1 = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_copy_pattern_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCopyPatternAudio *copy_pattern_audio; copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(gobject); switch(prop_id){ case PROP_BANK_INDEX_0: { g_value_set_object(value, copy_pattern_audio->bank_index_0); } break; case PROP_BANK_INDEX_1: { g_value_set_object(value, copy_pattern_audio->bank_index_1); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_copy_pattern_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./bank-index-0[0]", 16)){ g_object_set(G_OBJECT(plugin), "bank-index-0", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./bank-index-1[0]", 16)){ g_object_set(G_OBJECT(plugin), "bank-index-1", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_copy_pattern_audio_dispose(GObject *gobject) { AgsCopyPatternAudio *copy_pattern_audio; copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(gobject); /* bank index 0 */ if(copy_pattern_audio->bank_index_0 != NULL){ g_object_unref(copy_pattern_audio->bank_index_0); copy_pattern_audio->bank_index_0 = NULL; } /* bank index 1 */ if(copy_pattern_audio->bank_index_1 != NULL){ g_object_unref(copy_pattern_audio->bank_index_1); copy_pattern_audio->bank_index_1 = NULL; } /* call parent */ G_OBJECT_CLASS(ags_copy_pattern_audio_parent_class)->dispose(gobject); } void ags_copy_pattern_audio_finalize(GObject *gobject) { AgsCopyPatternAudio *copy_pattern_audio; copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(gobject); /* bank index 0 */ if(copy_pattern_audio->bank_index_0 != NULL){ g_object_unref(copy_pattern_audio->bank_index_0); } /* bank index 1 */ if(copy_pattern_audio->bank_index_1 != NULL){ g_object_unref(copy_pattern_audio->bank_index_1); } /* call parent */ G_OBJECT_CLASS(ags_copy_pattern_audio_parent_class)->finalize(gobject); } /** * ags_copy_pattern_audio_new: * @soundcard: the #GObject defaulting to * @tact: the offset * @i: bank index 0 * @j: bank index 1 * * Creates an #AgsCopyPatternAudio * * Returns: a new #AgsCopyPatternAudio * * Since: 1.0.0 */ AgsCopyPatternAudio* ags_copy_pattern_audio_new(GObject *soundcard, gdouble tact, guint i, guint j) { AgsCopyPatternAudio *copy_pattern_audio; GValue *value; copy_pattern_audio = (AgsCopyPatternAudio *) g_object_new(AGS_TYPE_COPY_PATTERN_AUDIO, "soundcard", soundcard, "tact", tact, NULL); value = g_new0(GValue, 1); g_value_init(value, G_TYPE_UINT); g_value_set_uint(value, i); ags_port_safe_write(copy_pattern_audio->bank_index_0, value); g_value_set_uint(value, j); ags_port_safe_write(copy_pattern_audio->bank_index_1, value); g_value_unset(value); g_free(value); return(copy_pattern_audio); } gsequencer-1.4.24/ags/audio/recall/ags_mute_channel_run.h0000644000175000017500000000412513246707333020344 00000000000000/* 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 . */ #ifndef __AGS_MUTE_CHANNEL_RUN_H__ #define __AGS_MUTE_CHANNEL_RUN_H__ #include #include #include #include #include #define AGS_TYPE_MUTE_CHANNEL_RUN (ags_mute_channel_run_get_type()) #define AGS_MUTE_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTE_CHANNEL_RUN, AgsMuteChannelRun)) #define AGS_MUTE_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MUTE_CHANNEL_RUN, AgsMuteChannelRunClass)) #define AGS_IS_MUTE_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MUTE_CHANNEL_RUN)) #define AGS_IS_MUTE_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MUTE_CHANNEL_RUN)) #define AGS_MUTE_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MUTE_CHANNEL_RUN, AgsMuteChannelRunClass)) typedef struct _AgsMuteChannelRun AgsMuteChannelRun; typedef struct _AgsMuteChannelRunClass AgsMuteChannelRunClass; struct _AgsMuteChannelRun { AgsRecallChannelRun recall_channel_run; }; struct _AgsMuteChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_mute_channel_run_get_type(); AgsMuteChannelRun* ags_mute_channel_run_new(AgsChannel *source); #endif /*__AGS_MUTE_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_stream_channel.h0000644000175000017500000000372613246707333020007 00000000000000/* 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 . */ #ifndef __AGS_STREAM_CHANNEL_H__ #define __AGS_STREAM_CHANNEL_H__ #include #include #include #define AGS_TYPE_STREAM_CHANNEL (ags_stream_channel_get_type()) #define AGS_STREAM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_STREAM_CHANNEL, AgsStreamChannel)) #define AGS_STREAM_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_STREAM_CHANNEL, AgsStreamChannelClass)) #define AGS_IS_STREAM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_STREAM_CHANNEL)) #define AGS_IS_STREAM_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_STREAM_CHANNEL)) #define AGS_STREAM_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_STREAM_CHANNEL, AgsStreamChannelClass)) typedef struct _AgsStreamChannel AgsStreamChannel; typedef struct _AgsStreamChannelClass AgsStreamChannelClass; struct _AgsStreamChannel { AgsRecallChannel recall_channel; AgsPort *auto_sense; }; struct _AgsStreamChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_stream_channel_get_type(); AgsStreamChannel* ags_stream_channel_new(); #endif /*__AGS_STREAM_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_volume_channel_run.c0000644000175000017500000001760513246707333020703 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_volume_channel_run_class_init(AgsVolumeChannelRunClass *volume_channel_run); void ags_volume_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_volume_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_volume_channel_run_init(AgsVolumeChannelRun *volume_channel_run); void ags_volume_channel_run_connect(AgsConnectable *connectable); void ags_volume_channel_run_disconnect(AgsConnectable *connectable); void ags_volume_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_volume_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_volume_channel_run_finalize(GObject *gobject); AgsRecall* ags_volume_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_volume_channel_run * @short_description: volumes channel * @title: AgsVolumeChannelRun * @section_id: * @include: ags/audio/recall/ags_volume_channel_run.h * * The #AgsVolumeChannelRun class volumes the channel. */ static gpointer ags_volume_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_volume_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_volume_channel_run_parent_dynamic_connectable_interface; GType ags_volume_channel_run_get_type() { static GType ags_type_volume_channel_run = 0; if(!ags_type_volume_channel_run){ static const GTypeInfo ags_volume_channel_run_info = { sizeof (AgsVolumeChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_volume_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsVolumeChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_volume_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_volume_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_volume_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_volume_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsVolumeChannelRun", &ags_volume_channel_run_info, 0); g_type_add_interface_static(ags_type_volume_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_volume_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_volume_channel_run); } void ags_volume_channel_run_class_init(AgsVolumeChannelRunClass *volume_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; ags_volume_channel_run_parent_class = g_type_class_peek_parent(volume_channel_run); /* GObjectClass */ gobject = (GObjectClass *) volume_channel_run; gobject->finalize = ags_volume_channel_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) volume_channel_run; recall->duplicate = ags_volume_channel_run_duplicate; } void ags_volume_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_volume_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_volume_channel_run_connect; connectable->disconnect = ags_volume_channel_run_disconnect; } void ags_volume_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_volume_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_volume_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_volume_channel_run_disconnect_dynamic; } void ags_volume_channel_run_init(AgsVolumeChannelRun *volume_channel_run) { AGS_RECALL(volume_channel_run)->name = "ags-volume"; AGS_RECALL(volume_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(volume_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(volume_channel_run)->xml_type = "ags-volume-channel-run"; AGS_RECALL(volume_channel_run)->port = NULL; AGS_RECALL(volume_channel_run)->flags |= AGS_RECALL_INPUT_ORIENTATED; AGS_RECALL(volume_channel_run)->child_type = AGS_TYPE_VOLUME_RECYCLING; } void ags_volume_channel_run_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_volume_channel_run_parent_class)->finalize(gobject); } void ags_volume_channel_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_volume_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_volume_channel_run_disconnect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } /* empty */ /* call parent */ ags_volume_channel_run_parent_connectable_interface->disconnect(connectable); } void ags_volume_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_volume_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_volume_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) == 0){ return; } /* empty */ /* call parent */ ags_volume_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } AgsRecall* ags_volume_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsVolumeChannelRun *copy; copy = (AgsVolumeChannelRun *) AGS_RECALL_CLASS(ags_volume_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_volume_channel_run_new: * @channel: the assigned #AgsChannel * * Creates an #AgsVolumeChannelRun * * Returns: a new #AgsVolumeChannelRun * * Since: 1.0.0 */ AgsVolumeChannelRun* ags_volume_channel_run_new(AgsChannel *channel) { AgsVolumeChannelRun *volume_channel_run; volume_channel_run = (AgsVolumeChannelRun *) g_object_new(AGS_TYPE_VOLUME_CHANNEL_RUN, "source", channel, NULL); return(volume_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_copy_recycling.c0000644000175000017500000001745613246707333020035 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_copy_recycling_class_init(AgsCopyRecyclingClass *copy_recycling); void ags_copy_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_copy_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_copy_recycling_init(AgsCopyRecycling *copy_recycling); void ags_copy_recycling_connect(AgsConnectable *connectable); void ags_copy_recycling_disconnect(AgsConnectable *connectable); void ags_copy_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_recycling_finalize(GObject *gobject); void ags_copy_recycling_done(AgsRecall *recall); void ags_copy_recycling_cancel(AgsRecall *recall); void ags_copy_recycling_remove(AgsRecall *recall); AgsRecall* ags_copy_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_copy_recycling * @short_description: copys recycling * @title: AgsCopyRecycling * @section_id: * @include: ags/audio/recall/ags_copy_recycling.h * * The #AgsCopyRecycling class copys the recycling. */ static gpointer ags_copy_recycling_parent_class = NULL; static AgsConnectableInterface *ags_copy_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_copy_recycling_parent_dynamic_connectable_interface; GType ags_copy_recycling_get_type() { static GType ags_type_copy_recycling = 0; if(!ags_type_copy_recycling){ static const GTypeInfo ags_copy_recycling_info = { sizeof (AgsCopyRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_copy_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsCopyRecycling", &ags_copy_recycling_info, 0); g_type_add_interface_static(ags_type_copy_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_copy_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_copy_recycling); } void ags_copy_recycling_class_init(AgsCopyRecyclingClass *copy_recycling) { GObjectClass *gobject; AgsRecallClass *recall; ags_copy_recycling_parent_class = g_type_class_peek_parent(copy_recycling); /* GObjectClass */ gobject = (GObjectClass *) copy_recycling; gobject->finalize = ags_copy_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) copy_recycling; recall->done = ags_copy_recycling_done; recall->cancel = ags_copy_recycling_cancel; recall->remove = ags_copy_recycling_remove; recall->duplicate = ags_copy_recycling_duplicate; } void ags_copy_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_copy_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_copy_recycling_connect; connectable->disconnect = ags_copy_recycling_disconnect; } void ags_copy_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_copy_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_copy_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_copy_recycling_disconnect_dynamic; } void ags_copy_recycling_init(AgsCopyRecycling *copy_recycling) { AGS_RECALL(copy_recycling)->name = "ags-copy"; AGS_RECALL(copy_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(copy_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(copy_recycling)->xml_type = "ags-copy-recycling"; AGS_RECALL(copy_recycling)->port = NULL; AGS_RECALL(copy_recycling)->child_type = AGS_TYPE_COPY_AUDIO_SIGNAL; AGS_RECALL_RECYCLING(copy_recycling)->flags |= (AGS_RECALL_RECYCLING_MAP_CHILD_DESTINATION); } void ags_copy_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_copy_recycling_parent_class)->finalize(gobject); } void ags_copy_recycling_connect(AgsConnectable *connectable) { ags_copy_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_copy_recycling_disconnect(AgsConnectable *connectable) { ags_copy_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_copy_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_copy_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_copy_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_copy_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_copy_recycling_done(AgsRecall *recall) { AGS_RECALL_CLASS(ags_copy_recycling_parent_class)->done(recall); /* empty */ } void ags_copy_recycling_cancel(AgsRecall *recall) { AGS_RECALL_CLASS(ags_copy_recycling_parent_class)->cancel(recall); /* empty */ } void ags_copy_recycling_remove(AgsRecall *recall) { AGS_RECALL_CLASS(ags_copy_recycling_parent_class)->remove(recall); /* empty */ } AgsRecall* ags_copy_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsCopyRecycling *copy; copy = (AgsCopyRecycling *) AGS_RECALL_CLASS(ags_copy_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_copy_recycling_new: * @destination: the destination #AgsRecycling * @source: the source #AgsRecycling * @soundcard: the #GObject defaulting to * * Creates an #AgsCopyRecycling * * Returns: a new #AgsCopyRecycling * * Since: 1.0.0 */ AgsCopyRecycling* ags_copy_recycling_new(AgsRecycling *destination, AgsRecycling *source, GObject *soundcard) { AgsCopyRecycling *copy_recycling; copy_recycling = (AgsCopyRecycling *) g_object_new(AGS_TYPE_COPY_RECYCLING, "soundcard", soundcard, "destination", destination, "source", source, NULL); return(copy_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_peak_recycling.c0000644000175000017500000001617213246707333017775 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_peak_recycling_class_init(AgsPeakRecyclingClass *peak_recycling); void ags_peak_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_peak_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_peak_recycling_init(AgsPeakRecycling *peak_recycling); void ags_peak_recycling_connect(AgsConnectable *connectable); void ags_peak_recycling_disconnect(AgsConnectable *connectable); void ags_peak_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_peak_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_peak_recycling_finalize(GObject *gobject); AgsRecall* ags_peak_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_peak_recycling * @short_description: peaks recycling * @title: AgsPeakRecycling * @section_id: * @include: ags/audio/recall/ags_peak_recycling.h * * The #AgsPeakRecycling class peaks the recycling. */ static gpointer ags_peak_recycling_parent_class = NULL; static AgsConnectableInterface *ags_peak_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_peak_recycling_parent_dynamic_connectable_interface; GType ags_peak_recycling_get_type() { static GType ags_type_peak_recycling = 0; if(!ags_type_peak_recycling){ static const GTypeInfo ags_peak_recycling_info = { sizeof (AgsPeakRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_peak_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPeakRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_peak_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_peak_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_peak_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_peak_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsPeakRecycling", &ags_peak_recycling_info, 0); g_type_add_interface_static(ags_type_peak_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_peak_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_peak_recycling); } void ags_peak_recycling_class_init(AgsPeakRecyclingClass *peak_recycling) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_peak_recycling_parent_class = g_type_class_peek_parent(peak_recycling); /* GObjectClass */ gobject = (GObjectClass *) peak_recycling; gobject->finalize = ags_peak_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) peak_recycling; recall->duplicate = ags_peak_recycling_duplicate; } void ags_peak_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_peak_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_peak_recycling_connect; connectable->disconnect = ags_peak_recycling_disconnect; } void ags_peak_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_peak_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_peak_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_peak_recycling_disconnect_dynamic; } void ags_peak_recycling_init(AgsPeakRecycling *peak_recycling) { AGS_RECALL(peak_recycling)->name = "ags-peak"; AGS_RECALL(peak_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(peak_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(peak_recycling)->xml_type = "ags-peak-recycling"; AGS_RECALL(peak_recycling)->port = NULL; AGS_RECALL(peak_recycling)->child_type = AGS_TYPE_PEAK_AUDIO_SIGNAL; AGS_RECALL_RECYCLING(peak_recycling)->flags |= (AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE); } void ags_peak_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_peak_recycling_parent_class)->finalize(gobject); } void ags_peak_recycling_connect(AgsConnectable *connectable) { /* call parent */ ags_peak_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_peak_recycling_disconnect(AgsConnectable *connectable) { /* call parent */ ags_peak_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_peak_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_peak_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_peak_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_peak_recycling_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } AgsRecall* ags_peak_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPeakRecycling *copy; copy = (AgsPeakRecycling *) AGS_RECALL_CLASS(ags_peak_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_peak_recycling_new: * @recycling: the source #AgsRecycling * * Creates an #AgsPeakRecycling * * Returns: a new #AgsPeakRecycling * * Since: 1.0.0 */ AgsPeakRecycling* ags_peak_recycling_new(AgsRecycling *recycling) { AgsPeakRecycling *peak_recycling; peak_recycling = (AgsPeakRecycling *) g_object_new(AGS_TYPE_PEAK_RECYCLING, "source", recycling, NULL); return(peak_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_capture_sound_audio.h0000644000175000017500000000431113247044247021046 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_CAPTURE_SOUND_AUDIO_H__ #define __AGS_CAPTURE_SOUND_AUDIO_H__ #include #include #include #define AGS_TYPE_CAPTURE_SOUND_AUDIO (ags_capture_sound_audio_get_type()) #define AGS_CAPTURE_SOUND_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CAPTURE_SOUND_AUDIO, AgsCaptureSoundAudio)) #define AGS_CAPTURE_SOUND_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CAPTURE_SOUND_AUDIO, AgsCaptureSoundAudio)) #define AGS_IS_CAPTURE_SOUND_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CAPTURE_SOUND_AUDIO)) #define AGS_IS_CAPTURE_SOUND_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CAPTURE_SOUND_AUDIO)) #define AGS_CAPTURE_SOUND_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_CAPTURE_SOUND_AUDIO, AgsCaptureSoundAudioClass)) typedef struct _AgsCaptureSoundAudio AgsCaptureSoundAudio; typedef struct _AgsCaptureSoundAudioClass AgsCaptureSoundAudioClass; struct _AgsCaptureSoundAudio { AgsRecallAudio recall_audio; AgsPort *playback; AgsPort *record; AgsPort *filename; AgsPort *audio_channels; AgsPort *format; AgsPort *samplerate; AgsPort *buffer_size; }; struct _AgsCaptureSoundAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_capture_sound_audio_get_type(); AgsCaptureSoundAudio* ags_capture_sound_audio_new(); #endif /*__AGS_CAPTURE_SOUND_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_loop_channel_run.c0000644000175000017500000005475313246707333020352 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_loop_channel_run_class_init(AgsLoopChannelRunClass *loop_channel_run); void ags_loop_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_loop_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_loop_channel_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_loop_channel_run_init(AgsLoopChannelRun *loop_channel_run); void ags_loop_channel_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_loop_channel_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_loop_channel_run_dispose(GObject *gobject); void ags_loop_channel_run_finalize(GObject *gobject); void ags_loop_channel_run_connect(AgsConnectable *connectable); void ags_loop_channel_run_disconnect(AgsConnectable *connectable); void ags_loop_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_loop_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_loop_channel_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_loop_channel_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_loop_channel_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_loop_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_loop_channel_run_start_callback(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order, AgsLoopChannelRun *loop_channel_run); void ags_loop_channel_run_loop_callback(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order, AgsLoopChannelRun *loop_channel_run); void ags_loop_channel_run_stop_callback(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order, AgsLoopChannelRun *loop_channel_run); void ags_loop_channel_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_loop_channel_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); /** * SECTION:ags_loop_channel_run * @short_description: loop * @title: AgsLoopChannelRun * @section_id: * @include: ags/audio/recall/ags_loop_channel_run.h * * The #AgsLoopChannelRun class loops the channel. */ enum{ PROP_0, PROP_COUNT_BEATS_AUDIO_RUN, }; static gpointer ags_loop_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_loop_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_loop_channel_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_loop_channel_run_parent_plugin_interface; GType ags_loop_channel_run_get_type() { static GType ags_type_loop_channel_run = 0; if(!ags_type_loop_channel_run){ static const GTypeInfo ags_loop_channel_run_info = { sizeof (AgsLoopChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_loop_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLoopChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_loop_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_loop_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_loop_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_loop_channel_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_loop_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsLoopChannelRun", &ags_loop_channel_run_info, 0); g_type_add_interface_static(ags_type_loop_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_loop_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_loop_channel_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_loop_channel_run); } void ags_loop_channel_run_class_init(AgsLoopChannelRunClass *loop_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_loop_channel_run_parent_class = g_type_class_peek_parent(loop_channel_run); /* GObjectClass */ gobject = (GObjectClass *) loop_channel_run; gobject->set_property = ags_loop_channel_run_set_property; gobject->get_property = ags_loop_channel_run_get_property; gobject->dispose = ags_loop_channel_run_dispose; gobject->finalize = ags_loop_channel_run_finalize; /* properties */ /** * AgsLoopChannelRun:count-beats-audio-run: * * The count beats audio run dependency. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("count-beats-audio-run", "assigned AgsCountBeatsAudioRun", "The pointer to a counter object which indicates when looping should happen", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT_BEATS_AUDIO_RUN, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) loop_channel_run; recall->duplicate = ags_loop_channel_run_duplicate; recall->resolve_dependencies = ags_loop_channel_run_resolve_dependencies; } void ags_loop_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_loop_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_loop_channel_run_connect; connectable->disconnect = ags_loop_channel_run_disconnect; } void ags_loop_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_loop_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_loop_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_loop_channel_run_disconnect_dynamic; } void ags_loop_channel_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_loop_channel_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_loop_channel_run_read; plugin->write = ags_loop_channel_run_write; } void ags_loop_channel_run_init(AgsLoopChannelRun *loop_channel_run) { AGS_RECALL(loop_channel_run)->name = "ags-loop"; AGS_RECALL(loop_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(loop_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(loop_channel_run)->xml_type = "ags-loop-channel-run"; AGS_RECALL(loop_channel_run)->port = NULL; AGS_RECALL(loop_channel_run)->flags |= AGS_RECALL_INPUT_ORIENTATED; AGS_RECALL(loop_channel_run)->child_type = G_TYPE_NONE; loop_channel_run->count_beats_audio_run = NULL; } void ags_loop_channel_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLoopChannelRun *loop_channel_run; loop_channel_run = AGS_LOOP_CHANNEL_RUN(gobject); switch(prop_id){ case PROP_COUNT_BEATS_AUDIO_RUN: { AgsCountBeatsAudioRun *count_beats_audio_run; gboolean is_template; count_beats_audio_run = (AgsCountBeatsAudioRun *) g_value_get_object(value); if(loop_channel_run->count_beats_audio_run == count_beats_audio_run) return; if(count_beats_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(count_beats_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(loop_channel_run->count_beats_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(loop_channel_run), (AgsRecall *) loop_channel_run->count_beats_audio_run); }else{ if((AGS_RECALL_RUN_INITIALIZED & (AGS_RECALL(loop_channel_run)->flags)) != 0){ /* AgsCountBeatsAudioRun */ g_signal_handler_disconnect(G_OBJECT(loop_channel_run->count_beats_audio_run), loop_channel_run->start_handler); g_signal_handler_disconnect(G_OBJECT(loop_channel_run->count_beats_audio_run), loop_channel_run->loop_handler); g_signal_handler_disconnect(G_OBJECT(loop_channel_run->count_beats_audio_run), loop_channel_run->stop_handler); } g_object_unref(loop_channel_run->count_beats_audio_run); } } if(count_beats_audio_run != NULL){ g_object_ref(count_beats_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(loop_channel_run), ags_recall_dependency_new((GObject *) count_beats_audio_run)); }else{ if((AGS_RECALL_RUN_INITIALIZED & (AGS_RECALL(loop_channel_run)->flags)) != 0){ /* AgsCountBeatsAudioRun */ loop_channel_run->start_handler = g_signal_connect(G_OBJECT(loop_channel_run->count_beats_audio_run), "sequencer-start", G_CALLBACK(ags_loop_channel_run_loop_callback), loop_channel_run); loop_channel_run->loop_handler = g_signal_connect(G_OBJECT(loop_channel_run->count_beats_audio_run), "sequencer-loop", G_CALLBACK(ags_loop_channel_run_loop_callback), loop_channel_run); loop_channel_run->stop_handler = g_signal_connect(G_OBJECT(loop_channel_run->count_beats_audio_run), "sequencer-stop", G_CALLBACK(ags_loop_channel_run_loop_callback), loop_channel_run); } } } loop_channel_run->count_beats_audio_run = count_beats_audio_run; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_loop_channel_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLoopChannelRun *loop_channel_run; loop_channel_run = AGS_LOOP_CHANNEL_RUN(gobject); switch(prop_id){ case PROP_COUNT_BEATS_AUDIO_RUN: { g_value_set_object(value, loop_channel_run->count_beats_audio_run); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_loop_channel_run_dispose(GObject *gobject) { AgsLoopChannelRun *loop_channel_run; loop_channel_run = AGS_LOOP_CHANNEL_RUN(gobject); /* count beats audio run */ if(loop_channel_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(loop_channel_run->count_beats_audio_run)); loop_channel_run->count_beats_audio_run = NULL; } /* call parent */ G_OBJECT_CLASS(ags_loop_channel_run_parent_class)->dispose(gobject); } void ags_loop_channel_run_finalize(GObject *gobject) { AgsLoopChannelRun *loop_channel_run; loop_channel_run = AGS_LOOP_CHANNEL_RUN(gobject); /* count beats audio run */ if(loop_channel_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(loop_channel_run->count_beats_audio_run)); } /* call parent */ G_OBJECT_CLASS(ags_loop_channel_run_parent_class)->finalize(gobject); } void ags_loop_channel_run_connect(AgsConnectable *connectable) { ags_loop_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_loop_channel_run_disconnect(AgsConnectable *connectable) { ags_loop_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_loop_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsLoopChannelRun *loop_channel_run; ags_loop_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); loop_channel_run = AGS_LOOP_CHANNEL_RUN(dynamic_connectable); if(loop_channel_run->count_beats_audio_run != NULL){ /* AgsCountBeatsAudioRun */ loop_channel_run->start_handler = g_signal_connect(G_OBJECT(loop_channel_run->count_beats_audio_run), "sequencer-start", G_CALLBACK(ags_loop_channel_run_start_callback), loop_channel_run); loop_channel_run->loop_handler = g_signal_connect(G_OBJECT(loop_channel_run->count_beats_audio_run), "sequencer-loop", G_CALLBACK(ags_loop_channel_run_loop_callback), loop_channel_run); loop_channel_run->stop_handler = g_signal_connect(G_OBJECT(loop_channel_run->count_beats_audio_run), "sequencer-stop", G_CALLBACK(ags_loop_channel_run_stop_callback), loop_channel_run); } } void ags_loop_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsLoopChannelRun *loop_channel_run; ags_loop_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); loop_channel_run = AGS_LOOP_CHANNEL_RUN(dynamic_connectable); if(loop_channel_run->count_beats_audio_run != NULL){ /* AgsCountBeatsAudioRun */ g_signal_handler_disconnect(G_OBJECT(loop_channel_run->count_beats_audio_run), loop_channel_run->start_handler); g_signal_handler_disconnect(G_OBJECT(loop_channel_run->count_beats_audio_run), loop_channel_run->loop_handler); g_signal_handler_disconnect(G_OBJECT(loop_channel_run->count_beats_audio_run), loop_channel_run->stop_handler); } } void ags_loop_channel_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_loop_channel_run_parent_plugin_interface->read(file, node, plugin); /* read depenendency */ iter = node->children; while(iter != NULL){ if(iter->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(iter->name, "ags-dependency-list", 19)){ xmlNode *dependency_node; dependency_node = iter->children; while(dependency_node != NULL){ if(dependency_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(dependency_node->name, "ags-dependency", 15)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_loop_channel_run_read_resolve_dependency), G_OBJECT(plugin)); } } dependency_node = dependency_node->next; } } } iter = iter->next; } } xmlNode* ags_loop_channel_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_loop_channel_run_parent_plugin_interface->write(file, parent, plugin); /* write dependencies */ child = xmlNewNode(NULL, "ags-dependency-list"); xmlNewProp(child, AGS_FILE_ID_PROP, ags_id_generator_create_uuid()); xmlAddChild(node, child); list = AGS_RECALL(plugin)->dependencies; while(list != NULL){ id = ags_id_generator_create_uuid(); dependency_node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(dependency_node, AGS_FILE_ID_PROP, id); xmlAddChild(child, dependency_node); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_loop_channel_run_write_resolve_dependency), G_OBJECT(plugin)); list = list->next; } return(node); } void ags_loop_channel_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallID *recall_id; AgsRecallDependency *recall_dependency; AgsCountBeatsAudioRun *count_beats_audio_run; GList *list; guint i, i_stop; template = AGS_RECALL(ags_recall_find_template(AGS_RECALL_CONTAINER(recall->container)->recall_channel_run)->data); list = template->dependencies; recall_id = recall->recall_id; count_beats_audio_run = NULL; i_stop = 1; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_COUNT_BEATS_AUDIO_RUN(recall_dependency->dependency)){ count_beats_audio_run = (AgsCountBeatsAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "count-beats-audio-run", count_beats_audio_run, NULL); } AgsRecall* ags_loop_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsLoopChannelRun *copy; copy = (AgsLoopChannelRun *) AGS_RECALL_CLASS(ags_loop_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } void ags_loop_channel_run_create_audio_signals(AgsLoopChannelRun *loop_channel_run) { GObject *soundcard; AgsRecycling *recycling; AgsAudioSignal *audio_signal; gdouble delay; guint attack; // g_message("debug"); soundcard = AGS_RECALL(loop_channel_run)->soundcard; /* recycling */ recycling = AGS_RECALL_CHANNEL_RUN(loop_channel_run)->source->first_recycling; /* delay and attack */ //TODO:JK: unclear attack = 0;// soundcard->attack[((tic_counter_incr == AGS_NOTATION_TICS_PER_BEAT) ? // 0: // tic_counter_incr)]; delay = 0.0; //soundcard->delay[((tic_counter_incr == AGS_NOTATION_TICS_PER_BEAT) ? // 0: // tic_counter_incr)]; while(recycling != AGS_RECALL_CHANNEL_RUN(loop_channel_run)->source->last_recycling->next){ audio_signal = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) AGS_RECALL(loop_channel_run)->recall_id); audio_signal->stream_current = audio_signal->stream_beginning; /* */ ags_recycling_create_audio_signal_with_defaults(recycling, audio_signal, delay, attack); ags_connectable_connect(AGS_CONNECTABLE(audio_signal)); ags_recycling_add_audio_signal(recycling, audio_signal); /* * unref AgsAudioSignal because AgsLoopChannelRun has no need for it * if you need a valid reference to audio_signal you have to g_object_ref(audio_signal) */ //FIXME:JK: #ifdef AGS_DEBUG g_message("+++++++++++++++++++++++++\n\nloop channel created: AgsAudioSignal#%llx[%u]\n\n+++++++++++++++++++++++++", (long long unsigned int) audio_signal, audio_signal->length); #endif recycling = recycling->next; } } void ags_loop_channel_run_start_callback(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order, AgsLoopChannelRun *loop_channel_run) { #ifdef AGS_DEBUG g_message("ags_loop_channel_run_start_callback - run_order: %u; %u\n", AGS_RECALL_CHANNEL_RUN(loop_channel_run)->run_order, run_order); #endif //TODO:JK: optimize tree see deprecated AgsRunOrder // if(AGS_RECALL_CHANNEL_RUN(loop_channel_run)->run_order == run_order){ ags_loop_channel_run_create_audio_signals(loop_channel_run); // } } void ags_loop_channel_run_loop_callback(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order, AgsLoopChannelRun *loop_channel_run) { #ifdef AGS_DEBUG g_message("ags_loop_channel_run_loop_callback - run_order: %u; %u", AGS_RECALL_CHANNEL_RUN(loop_channel_run)->run_order, run_order); #endif //TODO:JK: optimize tree see deprecated AgsRunOrder // if(AGS_RECALL_CHANNEL_RUN(loop_channel_run)->run_order == run_order){ ags_loop_channel_run_create_audio_signals(loop_channel_run); // } } void ags_loop_channel_run_stop_callback(AgsCountBeatsAudioRun *count_beats_audio_run, guint run_order, AgsLoopChannelRun *loop_channel_run) { } void ags_loop_channel_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, file_lookup->ref); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_loop_channel_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "xpath"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(AGS_IS_DELAY_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "count-beats-audio-run", id_ref->ref, NULL); } } /** * ags_loop_channel_run_new: * @channel: the #AgsChannel as source * @count_beats_audio_run: an #AgsCountBeatsAudioRun * @is_template: if %TRUE recall is templated * * Creates an #AgsLoopChannelRun * * Returns: a new #AgsLoopChannelRun * * Since: 1.0.0 */ AgsLoopChannelRun* ags_loop_channel_run_new(AgsChannel *channel, AgsCountBeatsAudioRun *count_beats_audio_run, gboolean is_template) { AgsLoopChannelRun *loop_channel_run; loop_channel_run = (AgsLoopChannelRun *) g_object_new(AGS_TYPE_LOOP_CHANNEL_RUN, "source", channel, "count-beats-audio-run", count_beats_audio_run, NULL); if(is_template){ AGS_RECALL(loop_channel_run)->flags = AGS_RECALL_TEMPLATE; } return(loop_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_rt_stream_channel_run.h0000644000175000017500000000425313247044247021373 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_RT_STREAM_CHANNEL_RUN_H__ #define __AGS_RT_STREAM_CHANNEL_RUN_H__ #include #include #include #include #define AGS_TYPE_RT_STREAM_CHANNEL_RUN (ags_rt_stream_channel_run_get_type()) #define AGS_RT_STREAM_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RT_STREAM_CHANNEL_RUN, AgsRtStreamChannelRun)) #define AGS_RT_STREAM_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RT_STREAM_CHANNEL_RUN, AgsRtStreamChannelRunClass)) #define AGS_IS_RT_STREAM_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RT_STREAM_CHANNEL_RUN)) #define AGS_IS_RT_STREAM_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RT_STREAM_CHANNEL_RUN)) #define AGS_RT_STREAM_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RT_STREAM_CHANNEL_RUN, AgsRtStreamChannelRunClass)) typedef struct _AgsRtStreamChannelRun AgsRtStreamChannelRun; typedef struct _AgsRtStreamChannelRunClass AgsRtStreamChannelRunClass; struct _AgsRtStreamChannelRun { AgsRecallChannelRun recall_channel_run; }; struct _AgsRtStreamChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_rt_stream_channel_run_get_type(); AgsRtStreamChannelRun* ags_rt_stream_channel_run_new(); #endif /*__AGS_RT_STREAM_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_audio_signal.h0000644000175000017500000000416313246707333020503 00000000000000/* 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 . */ #ifndef __AGS_PLAY_AUDIO_SIGNAL_H__ #define __AGS_PLAY_AUDIO_SIGNAL_H__ #include #include #include #define AGS_TYPE_PLAY_AUDIO_SIGNAL (ags_play_audio_signal_get_type()) #define AGS_PLAY_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_AUDIO_SIGNAL, AgsPlayAudioSignal)) #define AGS_PLAY_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_AUDIO_SIGNAL, AgsPlayAudioSignalClass)) #define AGS_IS_PLAY_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_AUDIO_SIGNAL)) #define AGS_IS_PLAY_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_AUDIO_SIGNAL)) #define AGS_PLAY_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_AUDIO_SIGNAL, AgsPlayAudioSignalClass)) typedef struct _AgsPlayAudioSignal AgsPlayAudioSignal; typedef struct _AgsPlayAudioSignalClass AgsPlayAudioSignalClass; struct _AgsPlayAudioSignal { AgsRecallAudioSignal recall_audio_signal; }; struct _AgsPlayAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_play_audio_signal_get_type(); AgsPlayAudioSignal* ags_play_audio_signal_new(AgsAudioSignal *source, GObject *soundcard, guint audio_channel); #endif /*__AGS_PLAY_AUDIO_SIGNAL__H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_dssi_audio_run.c0000644000175000017500000012506413247044247021052 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_play_dssi_audio_run_class_init(AgsPlayDssiAudioRunClass *play_dssi_audio_run); void ags_play_dssi_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_dssi_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_play_dssi_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_play_dssi_audio_run_init(AgsPlayDssiAudioRun *play_dssi_audio_run); void ags_play_dssi_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_play_dssi_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_play_dssi_audio_run_dispose(GObject *gobject); void ags_play_dssi_audio_run_finalize(GObject *gobject); void ags_play_dssi_audio_run_connect(AgsConnectable *connectable); void ags_play_dssi_audio_run_disconnect(AgsConnectable *connectable); void ags_play_dssi_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_dssi_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_dssi_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_play_dssi_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_play_dssi_audio_run_run_init_pre(AgsRecall *recall); void ags_play_dssi_audio_run_run_pre(AgsRecall *recall); void ags_play_dssi_audio_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_play_dssi_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_play_dssi_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsPlayDssiAudioRun *play_dssi_audio_run); void ags_play_dssi_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_play_dssi_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); /** * SECTION:ags_play_dssi_audio_run * @short_description: play dssi * @title: AgsPlayDssiAudioRun * @section_id: * @include: ags/audio/recall/ags_play_dssi_audio_run.h * * The #AgsPlayDssiAudioRun class play dssi. */ enum{ PROP_0, PROP_DELAY_AUDIO_RUN, PROP_COUNT_BEATS_AUDIO_RUN, PROP_NOTATION, }; static gpointer ags_play_dssi_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_play_dssi_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_play_dssi_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_play_dssi_audio_run_parent_plugin_interface; GType ags_play_dssi_audio_run_get_type() { static GType ags_type_play_dssi_audio_run = 0; if(!ags_type_play_dssi_audio_run){ static const GTypeInfo ags_play_dssi_audio_run_info = { sizeof (AgsPlayDssiAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_dssi_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayDssiAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_dssi_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_dssi_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_play_dssi_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_play_dssi_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_dssi_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsPlayDssiAudioRun", &ags_play_dssi_audio_run_info, 0); g_type_add_interface_static(ags_type_play_dssi_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_dssi_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_play_dssi_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_play_dssi_audio_run); } void ags_play_dssi_audio_run_class_init(AgsPlayDssiAudioRunClass *play_dssi_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_play_dssi_audio_run_parent_class = g_type_class_peek_parent(play_dssi_audio_run); /* GObjectClass */ gobject = (GObjectClass *) play_dssi_audio_run; gobject->set_property = ags_play_dssi_audio_run_set_property; gobject->get_property = ags_play_dssi_audio_run_get_property; gobject->dispose = ags_play_dssi_audio_run_dispose; gobject->finalize = ags_play_dssi_audio_run_finalize; /* properties */ /** * AgsPlayDssiAudioRun:delay-audio-run: * * The delay audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("delay-audio-run", i18n_pspec("assigned AgsDelayAudioRun"), i18n_pspec("the AgsDelayAudioRun which emits dssi_alloc_input signal"), AGS_TYPE_DELAY_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_AUDIO_RUN, param_spec); /** * AgsPlayDssiAudioRun:count-beats-audio-run: * * The count beats audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("count-beats-audio-run", i18n_pspec("assigned AgsCountBeatsAudioRun"), i18n_pspec("the AgsCountBeatsAudioRun which just counts"), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT_BEATS_AUDIO_RUN, param_spec); /** * AgsPlayDssiAudioRun:notation: * * The notation containing the notes. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("assigned AgsNotation"), i18n_pspec("The AgsNotation containing notes"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) play_dssi_audio_run; recall->resolve_dependencies = ags_play_dssi_audio_run_resolve_dependencies; recall->duplicate = ags_play_dssi_audio_run_duplicate; recall->run_init_pre = ags_play_dssi_audio_run_run_init_pre; recall->run_pre = ags_play_dssi_audio_run_run_pre; } void ags_play_dssi_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_dssi_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_dssi_audio_run_connect; connectable->disconnect = ags_play_dssi_audio_run_disconnect; } void ags_play_dssi_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_play_dssi_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_play_dssi_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_play_dssi_audio_run_disconnect_dynamic; } void ags_play_dssi_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_play_dssi_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_play_dssi_audio_run_read; plugin->write = ags_play_dssi_audio_run_write; } void ags_play_dssi_audio_run_init(AgsPlayDssiAudioRun *play_dssi_audio_run) { AGS_RECALL(play_dssi_audio_run)->name = "ags-play-dssi"; AGS_RECALL(play_dssi_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_dssi_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_dssi_audio_run)->xml_type = "ags-play-dssi-audio-run"; AGS_RECALL(play_dssi_audio_run)->port = NULL; play_dssi_audio_run->audio_channels = 0; play_dssi_audio_run->ladspa_handle = NULL; play_dssi_audio_run->input = NULL; play_dssi_audio_run->output = NULL; play_dssi_audio_run->delta_time = 0; play_dssi_audio_run->event_buffer = (snd_seq_event_t **) malloc(AGS_PLAY_DSSI_AUDIO_DEFAULT_MIDI_LENGHT * sizeof(snd_seq_event_t *)); play_dssi_audio_run->event_buffer[0] = NULL; play_dssi_audio_run->event_count = (unsigned long *) malloc(AGS_PLAY_DSSI_AUDIO_DEFAULT_MIDI_LENGHT * sizeof(unsigned long)); play_dssi_audio_run->event_count[0] = 0; play_dssi_audio_run->key_on = 0; play_dssi_audio_run->delay_audio_run = NULL; play_dssi_audio_run->count_beats_audio_run = NULL; play_dssi_audio_run->destination = NULL; play_dssi_audio_run->notation = NULL; play_dssi_audio_run->offset = NULL; } void ags_play_dssi_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayDssiAudioRun *play_dssi_audio_run; play_dssi_audio_run = AGS_PLAY_DSSI_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { AgsDelayAudioRun *delay_audio_run; gboolean is_template; delay_audio_run = g_value_get_object(value); if(delay_audio_run == play_dssi_audio_run->delay_audio_run){ return; } if(delay_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(delay_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(play_dssi_audio_run->delay_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(play_dssi_audio_run), (AgsRecall *) play_dssi_audio_run->delay_audio_run); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(play_dssi_audio_run)->flags)) != 0){ g_object_disconnect(G_OBJECT(play_dssi_audio_run->delay_audio_run), "any_signal::notation-alloc-input", G_CALLBACK(ags_play_dssi_audio_run_alloc_input_callback), play_dssi_audio_run, NULL); } } g_object_unref(G_OBJECT(play_dssi_audio_run->delay_audio_run)); } if(delay_audio_run != NULL){ g_object_ref(delay_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(play_dssi_audio_run), ags_recall_dependency_new((GObject *) delay_audio_run)); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(play_dssi_audio_run)->flags)) != 0){ g_signal_connect(G_OBJECT(delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_play_dssi_audio_run_alloc_input_callback), play_dssi_audio_run); } } } play_dssi_audio_run->delay_audio_run = delay_audio_run; } break; case PROP_COUNT_BEATS_AUDIO_RUN: { AgsCountBeatsAudioRun *count_beats_audio_run; gboolean is_template; count_beats_audio_run = g_value_get_object(value); if(count_beats_audio_run == play_dssi_audio_run->count_beats_audio_run){ return; } if((AGS_RECALL_TEMPLATE & (AGS_RECALL(play_dssi_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(play_dssi_audio_run->count_beats_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(play_dssi_audio_run), (AgsRecall *) play_dssi_audio_run->count_beats_audio_run); } g_object_unref(G_OBJECT(play_dssi_audio_run->count_beats_audio_run)); } if(count_beats_audio_run != NULL){ g_object_ref(count_beats_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(play_dssi_audio_run), ags_recall_dependency_new((GObject *) count_beats_audio_run)); } } play_dssi_audio_run->count_beats_audio_run = count_beats_audio_run; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(play_dssi_audio_run->notation == notation){ return; } if(play_dssi_audio_run->notation != NULL){ g_object_unref(play_dssi_audio_run->notation); } if(notation != NULL){ g_object_ref(notation); } play_dssi_audio_run->notation = notation; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_play_dssi_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayDssiAudioRun *play_dssi_audio_run; play_dssi_audio_run = AGS_PLAY_DSSI_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(play_dssi_audio_run->delay_audio_run)); } break; case PROP_COUNT_BEATS_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(play_dssi_audio_run->count_beats_audio_run)); } break; case PROP_NOTATION: { g_value_set_object(value, play_dssi_audio_run->notation); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_play_dssi_audio_run_dispose(GObject *gobject) { AgsPlayDssiAudioRun *play_dssi_audio_run; play_dssi_audio_run = AGS_PLAY_DSSI_AUDIO_RUN(gobject); /* delay audio run */ if(play_dssi_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(play_dssi_audio_run->delay_audio_run)); play_dssi_audio_run->delay_audio_run = NULL; } /* count beats audio run */ if(play_dssi_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(play_dssi_audio_run->count_beats_audio_run)); play_dssi_audio_run->count_beats_audio_run = NULL; } /* notation */ if(play_dssi_audio_run->notation != NULL){ g_object_unref(G_OBJECT(play_dssi_audio_run->notation)); play_dssi_audio_run->notation = NULL; } /* call parent */ G_OBJECT_CLASS(ags_play_dssi_audio_run_parent_class)->dispose(gobject); } void ags_play_dssi_audio_run_finalize(GObject *gobject) { AgsPlayDssiAudioRun *play_dssi_audio_run; play_dssi_audio_run = AGS_PLAY_DSSI_AUDIO_RUN(gobject); /* delay audio run */ if(play_dssi_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(play_dssi_audio_run->delay_audio_run)); } /* count beats audio run */ if(play_dssi_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(play_dssi_audio_run->count_beats_audio_run)); } /* notation */ if(play_dssi_audio_run->notation != NULL){ g_object_unref(G_OBJECT(play_dssi_audio_run->notation)); } /* call parent */ G_OBJECT_CLASS(ags_play_dssi_audio_run_parent_class)->finalize(gobject); } void ags_play_dssi_audio_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_play_dssi_audio_run_parent_connectable_interface->connect(connectable); } void ags_play_dssi_audio_run_disconnect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } /* call parent */ ags_play_dssi_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_play_dssi_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsPlayDssiAudioRun *play_dssi_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } play_dssi_audio_run = AGS_PLAY_DSSI_AUDIO_RUN(dynamic_connectable); /* call parent */ ags_play_dssi_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* connect */ g_signal_connect(G_OBJECT(play_dssi_audio_run->delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_play_dssi_audio_run_alloc_input_callback), play_dssi_audio_run); } void ags_play_dssi_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsPlayDssiAudioRun *play_dssi_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) == 0){ return; } /* call parent */ ags_play_dssi_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); play_dssi_audio_run = AGS_PLAY_DSSI_AUDIO_RUN(dynamic_connectable); if(play_dssi_audio_run->delay_audio_run != NULL){ g_object_disconnect(G_OBJECT(play_dssi_audio_run->delay_audio_run), "any_signal::notation-alloc-input", G_CALLBACK(ags_play_dssi_audio_run_alloc_input_callback), play_dssi_audio_run, NULL); } } void ags_play_dssi_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_play_dssi_audio_run_parent_plugin_interface->read(file, node, plugin); /* read depenendency */ iter = node->children; while(iter != NULL){ if(iter->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(iter->name, "ags-dependency-list", 19)){ xmlNode *dependency_node; dependency_node = iter->children; while(dependency_node != NULL){ if(dependency_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(dependency_node->name, "ags-dependency", 15)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_play_dssi_audio_run_read_resolve_dependency), G_OBJECT(plugin)); } } dependency_node = dependency_node->next; } } } iter = iter->next; } } xmlNode* ags_play_dssi_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_play_dssi_audio_run_parent_plugin_interface->write(file, parent, plugin); /* write dependencies */ child = xmlNewNode(NULL, "ags-dependency-list"); xmlNewProp(child, AGS_FILE_ID_PROP, ags_id_generator_create_uuid()); xmlAddChild(node, child); list = AGS_RECALL(plugin)->dependencies; while(list != NULL){ id = ags_id_generator_create_uuid(); dependency_node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(dependency_node, AGS_FILE_ID_PROP, id); xmlAddChild(child, dependency_node); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", list->data, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_play_dssi_audio_run_write_resolve_dependency), G_OBJECT(plugin)); list = list->next; } return(node); } void ags_play_dssi_audio_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallID *recall_id; AgsRecallContainer *recall_container; AgsRecallDependency *recall_dependency; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GList *list; guint i, i_stop; recall_container = AGS_RECALL_CONTAINER(recall->container); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ template = AGS_RECALL(list->data); }else{ g_warning("AgsRecallClass::resolve - missing dependency"); return; } list = template->dependencies; delay_audio_run = NULL; count_beats_audio_run = NULL; i_stop = 2; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_DELAY_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } delay_audio_run = (AgsDelayAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } count_beats_audio_run = (AgsCountBeatsAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "delay-audio-run", delay_audio_run, "count-beats-audio-run", count_beats_audio_run, NULL); } AgsRecall* ags_play_dssi_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPlayDssiAudioRun *copy; copy = AGS_PLAY_DSSI_AUDIO_RUN(AGS_RECALL_CLASS(ags_play_dssi_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } void ags_play_dssi_audio_run_run_init_pre(AgsRecall *recall) { AgsPlayDssiAudio *play_dssi_audio; AgsPlayDssiAudioRun *play_dssi_audio_run; GObject *soundcard; guint samplerate; guint buffer_size; unsigned long i, i_stop; play_dssi_audio_run = AGS_PLAY_DSSI_AUDIO_RUN(recall); play_dssi_audio = AGS_PLAY_DSSI_AUDIO(AGS_RECALL_AUDIO_RUN(play_dssi_audio_run)->recall_audio); /* set up buffer */ soundcard = recall->soundcard; ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, &buffer_size, NULL); if(play_dssi_audio->input_lines > 0){ play_dssi_audio_run->input = (LADSPA_Data *) malloc(play_dssi_audio->input_lines * buffer_size * sizeof(LADSPA_Data)); } play_dssi_audio_run->output = (float *) malloc(play_dssi_audio->output_lines * buffer_size * sizeof(LADSPA_Data)); if(play_dssi_audio->input_lines < play_dssi_audio->output_lines){ i_stop = play_dssi_audio->output_lines; }else{ i_stop = play_dssi_audio->input_lines; } play_dssi_audio_run->audio_channels = i_stop; if(i_stop > 0){ play_dssi_audio_run->ladspa_handle = (LADSPA_Handle *) malloc(i_stop * sizeof(LADSPA_Handle)); }else{ play_dssi_audio_run->ladspa_handle = NULL; } for(i = 0; i < i_stop; i++){ /* instantiate dssi */ play_dssi_audio_run->ladspa_handle[i] = play_dssi_audio->plugin_descriptor->LADSPA_Plugin->instantiate(play_dssi_audio->plugin_descriptor->LADSPA_Plugin, samplerate); #ifdef AGS_DEBUG g_message("instantiate DSSI handle %d %d", play_dssi_audio->bank, play_dssi_audio->program); #endif } ags_play_dssi_audio_run_load_ports(play_dssi_audio_run); for(i = 0; i < i_stop; i++){ if(play_dssi_audio->plugin_descriptor->LADSPA_Plugin->activate != NULL){ play_dssi_audio->plugin_descriptor->LADSPA_Plugin->activate(play_dssi_audio_run->ladspa_handle[i]); } #ifdef AGS_DEBUG g_message("instantiate DSSI handle"); #endif } /* call parent */ AGS_RECALL_CLASS(ags_play_dssi_audio_run_parent_class)->run_init_pre(recall); } void ags_play_dssi_audio_run_run_pre(AgsRecall *recall) { AgsAudio *audio; AgsChannel *channel; AgsChannel *selected_channel; AgsRecycling *recycling; AgsAudioSignal *destination; AgsPlayDssiAudio *play_dssi_audio; AgsPlayDssiAudioRun *play_dssi_audio_run; AgsMutexManager *mutex_manager; GObject *soundcard; snd_seq_event_t *seq_event; snd_seq_event_t **event_buffer; unsigned long *event_count; guint audio_channel; guint samplerate; guint buffer_size; guint copy_mode_in, copy_mode_out; unsigned long i, i_stop; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; play_dssi_audio_run = AGS_PLAY_DSSI_AUDIO_RUN(recall); play_dssi_audio = AGS_PLAY_DSSI_AUDIO(AGS_RECALL_AUDIO_RUN(play_dssi_audio_run)->recall_audio); destination = play_dssi_audio_run->destination; soundcard = recall->soundcard; ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, NULL, &buffer_size, NULL); audio = AGS_RECALL_AUDIO(play_dssi_audio)->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel = (AgsChannel *) AGS_RECYCLING(AGS_RECALL(play_dssi_audio_run)->recall_id->recycling)->channel; channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel = (AgsChannel *) AGS_RECYCLING(AGS_RECALL(play_dssi_audio_run)->recall_id->recycling)->channel; channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio channel */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* get channel */ if((AGS_AUDIO_NOTATION_DEFAULT & (audio->flags)) != 0){ selected_channel = ags_channel_nth(audio->input, audio_channel); }else{ selected_channel = ags_channel_nth(audio->output, audio_channel); } /* recycling */ recycling = selected_channel->first_recycling; recall->flags &= (~AGS_RECALL_PERSISTENT); pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); if(destination == NULL){ AgsRecyclingContext *recycling_context; gdouble delay; guint attack; guint length; /* recycling context */ recycling_context = recall->recall_id->recycling_context; //TODO:JK: unclear attack = 0; delay = 0.0; /* create new audio signal */ play_dssi_audio_run->destination = destination = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) recall->recall_id); //TODO:JK: create property g_object_ref(play_dssi_audio_run->destination); ags_recycling_create_audio_signal_with_defaults(recycling, destination, delay, attack); length = 1; // (guint) (2.0 * soundcard->delay[soundcard->tic_counter]) + 1; ags_audio_signal_stream_resize(destination, length); ags_connectable_connect(AGS_CONNECTABLE(destination)); destination->stream_current = destination->stream_beginning; pthread_mutex_lock(recycling_mutex); ags_recycling_add_audio_signal(recycling, destination); pthread_mutex_unlock(recycling_mutex); #ifdef AGS_DEBUG g_message("play %x to %x", destination, recall_id); g_message("creating destination"); #endif } /* select program */ if(play_dssi_audio->plugin_descriptor->select_program != NULL){ AgsPort *current; GList *list, *port; gchar *specifier; LADSPA_Data *port_data; unsigned long port_count; port = AGS_RECALL(play_dssi_audio)->port; port_count = play_dssi_audio->plugin_descriptor->LADSPA_Plugin->PortCount; port_data = (LADSPA_Data *) malloc(port_count * sizeof(LADSPA_Data)); /* update port */ for(i = 0; i < port_count; i++){ specifier = play_dssi_audio->plugin_descriptor->LADSPA_Plugin->PortNames[i]; list = port; while(list != NULL){ current = list->data; if(!g_strcmp0(specifier, current->specifier)){ break; } list = list->next; } if(list == NULL){ port_data[i] = 0.0; // g_warning("didn't find port"); }else{ port_data[i] = current->port_value.ags_port_ladspa; } } /* select program */ for(i = 0; i < i_stop; i++){ play_dssi_audio->plugin_descriptor->select_program(play_dssi_audio_run->ladspa_handle[i], play_dssi_audio->bank, play_dssi_audio->program); // g_message("b p %u %u", play_dssi_audio->bank, play_dssi_audio->program); } /* reset port data */ for(i = 0; i < port_count; i++){ specifier = play_dssi_audio->plugin_descriptor->LADSPA_Plugin->PortNames[i]; list = port; while(list != NULL){ current = list->data; if(!g_strcmp0(specifier, current->specifier)){ current->port_value.ags_port_ladspa = port_data[i]; // g_message("%s %f", current->specifier, port_data[i]); break; } list = list->next; } } free(port_data); } /* * process data */ /* recycling */ pthread_mutex_lock(channel_mutex); recycling = selected_channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* lookup recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* create audio data */ pthread_mutex_lock(recycling_mutex); buffer_size = destination->buffer_size; ags_audio_buffer_util_clear_buffer(destination->stream_current->data, 1, buffer_size, ags_audio_buffer_util_format_from_soundcard(destination->format)); /* get copy mode and clear buffer */ copy_mode_in = ags_audio_buffer_util_get_copy_mode(AGS_AUDIO_BUFFER_UTIL_FLOAT, ags_audio_buffer_util_format_from_soundcard(destination->format)); copy_mode_out = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(destination->format), AGS_AUDIO_BUFFER_UTIL_FLOAT); if(play_dssi_audio_run->output != NULL){ ags_audio_buffer_util_clear_float(play_dssi_audio_run->output, play_dssi_audio->output_lines, buffer_size); } if(play_dssi_audio_run->input != NULL){ ags_audio_buffer_util_clear_float(play_dssi_audio_run->input, play_dssi_audio->input_lines, buffer_size); } /* copy data */ if(play_dssi_audio_run->input != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(play_dssi_audio_run->input, (guint) play_dssi_audio->input_lines, 0, destination->stream_current->data, 1, 0, (guint) buffer_size, copy_mode_in); } /* process data */ if(play_dssi_audio->plugin_descriptor->run_synth != NULL){ if(play_dssi_audio_run->event_buffer != NULL && play_dssi_audio_run->key_on != 0){ event_buffer = play_dssi_audio_run->event_buffer; event_count = play_dssi_audio_run->event_count; while(*event_buffer != NULL){ seq_event = event_buffer[0]; play_dssi_audio->plugin_descriptor->run_synth(play_dssi_audio_run->ladspa_handle[0], play_dssi_audio->output_lines * buffer_size, seq_event, event_count[0]); event_buffer++; event_count++; } } }else if(play_dssi_audio->plugin_descriptor->LADSPA_Plugin->run != NULL){ play_dssi_audio->plugin_descriptor->LADSPA_Plugin->run(play_dssi_audio_run->ladspa_handle[0], buffer_size); } /* copy data */ if(play_dssi_audio_run->output != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(destination->stream_current->data, 1, 0, play_dssi_audio_run->output, (guint) play_dssi_audio->output_lines, 0, (guint) buffer_size, copy_mode_out); } pthread_mutex_unlock(recycling_mutex); /* call parent */ AGS_RECALL_CLASS(ags_play_dssi_audio_run_parent_class)->run_pre(recall); } void ags_play_dssi_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsPlayDssiAudioRun *play_dssi_audio_run) { GObject *soundcard; AgsAudio *audio; AgsChannel *channel; AgsChannel *selected_channel; AgsNotation *notation; AgsNote *note; AgsPlayDssiAudio *play_dssi_audio; AgsDelayAudio *delay_audio; AgsMutexManager *mutex_manager; snd_seq_event_t *seq_event; snd_seq_event_t **event_buffer; unsigned long *event_count; GList *current_position; GList *list; guint audio_start_mapping; guint midi_start_mapping, midi_end_mapping; guint notation_counter; guint note_x0, note_x1; guint note_y; guint input_pads; guint selected_key; guint audio_channel; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; if(delay != 0.0){ return; } play_dssi_audio = AGS_PLAY_DSSI_AUDIO(AGS_RECALL_AUDIO_RUN(play_dssi_audio_run)->recall_audio); delay_audio = AGS_DELAY_AUDIO(AGS_RECALL_AUDIO_RUN(delay_audio_run)->recall_audio); audio = AGS_RECALL_AUDIO(play_dssi_audio)->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(audio_mutex); soundcard = (GObject *) audio->soundcard; list = audio->notation;//(GList *) g_value_get_pointer(&value); pthread_mutex_unlock(audio_mutex); if(list == NULL){ return; } /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel = (AgsChannel *) AGS_RECYCLING(AGS_RECALL(delay_audio_run)->recall_id->recycling)->channel; channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio channel */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* get channel */ if((AGS_AUDIO_NOTATION_DEFAULT & (audio->flags)) != 0){ selected_channel = ags_channel_nth(audio->input, audio_channel); }else{ selected_channel = ags_channel_nth(audio->output, audio_channel); } /* get notation */ pthread_mutex_lock(audio_mutex); //TODO:JK: make it advanced notation = AGS_NOTATION(g_list_nth(list, audio_channel)->data);//AGS_NOTATION(ags_notation_find_near_timestamp(list, audio_channel, // timestamp_thread->timestamp)->data); current_position = notation->notes; // start_loop notation_counter = play_dssi_audio_run->count_beats_audio_run->notation_counter; input_pads = audio->input_pads; audio_start_mapping = audio->audio_start_mapping; midi_start_mapping = audio->midi_start_mapping; midi_end_mapping = audio->midi_end_mapping; pthread_mutex_unlock(audio_mutex); /* * feed midi */ while(current_position != NULL){ pthread_mutex_lock(audio_mutex); note = AGS_NOTE(current_position->data); note_x0 = note->x[0]; note_x1 = note->x[1]; note_y = note->y; pthread_mutex_unlock(audio_mutex); if(note_x0 == notation_counter){ /* send key-on */ if((AGS_AUDIO_REVERSE_MAPPING & (audio->flags)) != 0){ selected_key = input_pads - note->y - 1; }else{ selected_key = note->y; } /* key on */ seq_event = (snd_seq_event_t *) malloc(sizeof(snd_seq_event_t)); memset(seq_event, 0, sizeof(snd_seq_event_t)); //memset(seq_event, 0, sizeof(snd_seq_event_t)); seq_event->type = SND_SEQ_EVENT_NOTEON; seq_event->data.note.channel = 0; seq_event->data.note.note = 0x7f & (selected_key - audio_start_mapping + midi_start_mapping); seq_event->data.note.velocity = 127; /* find end */ i = 0; if(play_dssi_audio_run->event_buffer != NULL){ event_buffer = play_dssi_audio_run->event_buffer; while(*event_buffer != NULL){ event_buffer++; event_count++; i++; } if(i + 1 < AGS_PLAY_DSSI_AUDIO_DEFAULT_MIDI_LENGHT){ play_dssi_audio_run->event_buffer[i] = seq_event; play_dssi_audio_run->event_buffer[i + 1] = NULL; play_dssi_audio_run->event_count[i] = 1; play_dssi_audio_run->event_count[i + 1] = 0; play_dssi_audio_run->key_on += 1; } } //fixme:jk: remove notes }else if(note_x1 == notation_counter){ gint match_index; /* send key off */ if((AGS_AUDIO_REVERSE_MAPPING & (audio->flags)) != 0){ selected_key = input_pads - note->y - 1; }else{ selected_key = note->y; } /* find end */ i = 0; match_index = -1; if(play_dssi_audio_run->event_buffer != NULL){ event_buffer = play_dssi_audio_run->event_buffer; while(*event_buffer != NULL){ if(event_buffer[0]->data.note.note == (0x7f & (selected_key - audio_start_mapping + midi_start_mapping))){ match_index = i; // free(event_buffer[0]); } event_buffer++; event_count++; i++; } } /* clear note */ if(i > 0 && match_index != -1){ if(match_index + 1 != i){ memmove(&(play_dssi_audio_run->event_buffer[match_index]), &(play_dssi_audio_run->event_buffer[match_index + 1]), i - 1); } play_dssi_audio_run->event_buffer[i - 1] = NULL; play_dssi_audio_run->event_buffer[i] = NULL; if(play_dssi_audio_run->key_on > 0){ play_dssi_audio_run->key_on -= 1; } } }else if(note_x0 > notation_counter){ break; } pthread_mutex_lock(audio_mutex); current_position = current_position->next; pthread_mutex_unlock(audio_mutex); } } void ags_play_dssi_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_RECALL_DEPENDENCY(file_lookup->ref)->dependency); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_play_dssi_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "xpath"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(AGS_IS_DELAY_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "delay-audio-run", id_ref->ref, NULL); }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "count-beats-audio-run", id_ref->ref, NULL); } } /** * ags_play_dssi_audio_run_load_ports: * @play_dssi_audio_run: an #AgsRecallDssiRun * * Set up DSSI ports. * * Since: 1.0.0 */ void ags_play_dssi_audio_run_load_ports(AgsPlayDssiAudioRun *play_dssi_audio_run) { AgsPlayDssiAudio *play_dssi_audio; AgsDssiPlugin *dssi_plugin; AgsPort *current; GList *port; GList *list; gchar *plugin_name; gchar *specifier; gchar *path; unsigned long port_count; unsigned long i, j, j_stop; DSSI_Descriptor *plugin_descriptor; LADSPA_PortDescriptor *port_descriptor; play_dssi_audio = AGS_PLAY_DSSI_AUDIO(AGS_RECALL_AUDIO_RUN(play_dssi_audio_run)->recall_audio); port = AGS_RECALL(play_dssi_audio)->port; plugin_descriptor = play_dssi_audio->plugin_descriptor; port_count = plugin_descriptor->LADSPA_Plugin->PortCount; port_descriptor = plugin_descriptor->LADSPA_Plugin->PortDescriptors; if(play_dssi_audio->input_lines < play_dssi_audio->output_lines){ j_stop = play_dssi_audio->output_lines; }else{ j_stop = play_dssi_audio->input_lines; } for(i = 0; i < port_count; i++){ if(LADSPA_IS_PORT_CONTROL(port_descriptor[i])){ if(LADSPA_IS_PORT_INPUT(port_descriptor[i]) || LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ LADSPA_Data *port_pointer; specifier = plugin_descriptor->LADSPA_Plugin->PortNames[i]; list = port; current = NULL; while(list != NULL){ current = list->data; if(!g_strcmp0(specifier, current->specifier)){ break; } list = list->next; } for(j = 0; j < j_stop; j++){ #ifdef AGS_DEBUG g_message("connecting port[%d]: %d/%d - %f", j, i, port_count, current->port_value.ags_port_ladspa); #endif port_pointer = (LADSPA_Data *) &(current->port_value.ags_port_ladspa); play_dssi_audio->plugin_descriptor->LADSPA_Plugin->connect_port(play_dssi_audio_run->ladspa_handle[j], i, port_pointer); } } } } /* connect audio port */ for(j = 0; j < play_dssi_audio->input_lines; j++){ play_dssi_audio->plugin_descriptor->LADSPA_Plugin->connect_port(play_dssi_audio_run->ladspa_handle[j], play_dssi_audio->input_port[j], &(play_dssi_audio_run->input[j])); } for(j = 0; j < play_dssi_audio->output_lines; j++){ play_dssi_audio->plugin_descriptor->LADSPA_Plugin->connect_port(play_dssi_audio_run->ladspa_handle[j], play_dssi_audio->output_port[j], &(play_dssi_audio_run->output[j])); } } /** * ags_play_dssi_audio_run_new: * * Creates an #AgsPlayDssiAudioRun * * Returns: a new #AgsPlayDssiAudioRun * * Since: 1.0.0 */ AgsPlayDssiAudioRun* ags_play_dssi_audio_run_new() { AgsPlayDssiAudioRun *play_dssi_audio_run; play_dssi_audio_run = (AgsPlayDssiAudioRun *) g_object_new(AGS_TYPE_PLAY_DSSI_AUDIO_RUN, NULL); return(play_dssi_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_peak_audio_signal.h0000644000175000017500000000411113246707333020447 00000000000000/* 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 . */ #ifndef __AGS_PEAK_AUDIO_SIGNAL_H__ #define __AGS_PEAK_AUDIO_SIGNAL_H__ #include #include #include #define AGS_TYPE_PEAK_AUDIO_SIGNAL (ags_peak_audio_signal_get_type()) #define AGS_PEAK_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PEAK_AUDIO_SIGNAL, AgsPeakAudioSignal)) #define AGS_PEAK_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PEAK_AUDIO_SIGNAL, AgsPeakAudioSignalClass)) #define AGS_IS_PEAK_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PEAK_AUDIO_SIGNAL)) #define AGS_IS_PEAK_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PEAK_AUDIO_SIGNAL)) #define AGS_PEAK_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PEAK_AUDIO_SIGNAL, AgsPeakAudioSignalClass)) typedef struct _AgsPeakAudioSignal AgsPeakAudioSignal; typedef struct _AgsPeakAudioSignalClass AgsPeakAudioSignalClass; struct _AgsPeakAudioSignal { AgsRecallAudioSignal recall_audio_signal; gdouble peak; }; struct _AgsPeakAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_peak_audio_signal_get_type(); AgsPeakAudioSignal* ags_peak_audio_signal_new(AgsAudioSignal *audio_signal); #endif /*__AGS_PEAK_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_record_midi_audio_run.c0000644000175000017500000010515113247044247021336 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_record_midi_audio_run_class_init(AgsRecordMidiAudioRunClass *record_midi_audio_run); void ags_record_midi_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_record_midi_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_record_midi_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_record_midi_audio_run_init(AgsRecordMidiAudioRun *record_midi_audio_run); void ags_record_midi_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_record_midi_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_record_midi_audio_run_dispose(GObject *gobject); void ags_record_midi_audio_run_finalize(GObject *gobject); void ags_record_midi_audio_run_connect(AgsConnectable *connectable); void ags_record_midi_audio_run_disconnect(AgsConnectable *connectable); void ags_record_midi_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_record_midi_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_record_midi_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_record_midi_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_record_midi_audio_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_record_midi_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_record_midi_audio_run_run_init_pre(AgsRecall *recall); void ags_record_midi_audio_run_run_pre(AgsRecall *recall); void ags_record_midi_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_record_midi_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); /** * SECTION:ags_record_midi_audio_run * @short_description: record midi * @title: AgsRecordMidiAudioRun * @section_id: * @include: ags/audio/recall/ags_record_midi_audio_run.h * * The #AgsRecordMidiAudioRun does record midi. */ enum{ PROP_0, PROP_DELAY_AUDIO_RUN, PROP_COUNT_BEATS_AUDIO_RUN, }; static gpointer ags_record_midi_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_record_midi_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_record_midi_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_record_midi_audio_run_parent_plugin_interface; GType ags_record_midi_audio_run_get_type() { static GType ags_type_record_midi_audio_run = 0; if(!ags_type_record_midi_audio_run){ static const GTypeInfo ags_record_midi_audio_run_info = { sizeof (AgsRecordMidiAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_record_midi_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecordMidiAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_record_midi_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_record_midi_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_record_midi_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_record_midi_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_record_midi_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsRecordMidiAudioRun", &ags_record_midi_audio_run_info, 0); g_type_add_interface_static(ags_type_record_midi_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_record_midi_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_record_midi_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_record_midi_audio_run); } void ags_record_midi_audio_run_class_init(AgsRecordMidiAudioRunClass *record_midi_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_record_midi_audio_run_parent_class = g_type_class_peek_parent(record_midi_audio_run); /* GObjectClass */ gobject = (GObjectClass *) record_midi_audio_run; gobject->set_property = ags_record_midi_audio_run_set_property; gobject->get_property = ags_record_midi_audio_run_get_property; gobject->dispose = ags_record_midi_audio_run_dispose; gobject->finalize = ags_record_midi_audio_run_finalize; /* properties */ /** * AgsRecordMidiAudioRun:delay-audio-run: * * The delay audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("delay-audio-run", i18n_pspec("assigned AgsDelayAudioRun"), i18n_pspec("the AgsDelayAudioRun which emits midi_alloc_input signal"), AGS_TYPE_DELAY_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_AUDIO_RUN, param_spec); /** * AgsRecordMidiAudioRun:count-beats-audio-run: * * The count beats audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("count-beats-audio-run", i18n_pspec("assigned AgsCountBeatsAudioRun"), i18n_pspec("the AgsCountBeatsAudioRun which just counts"), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT_BEATS_AUDIO_RUN, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) record_midi_audio_run; recall->resolve_dependencies = ags_record_midi_audio_run_resolve_dependencies; recall->duplicate = ags_record_midi_audio_run_duplicate; recall->run_init_pre = ags_record_midi_audio_run_run_init_pre; recall->run_pre = ags_record_midi_audio_run_run_pre; } void ags_record_midi_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_record_midi_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_record_midi_audio_run_connect; connectable->disconnect = ags_record_midi_audio_run_disconnect; } void ags_record_midi_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_record_midi_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_record_midi_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_record_midi_audio_run_disconnect_dynamic; } void ags_record_midi_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_record_midi_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_record_midi_audio_run_read; plugin->write = ags_record_midi_audio_run_write; } void ags_record_midi_audio_run_init(AgsRecordMidiAudioRun *record_midi_audio_run) { AGS_RECALL(record_midi_audio_run)->name = "ags-record-midi"; AGS_RECALL(record_midi_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(record_midi_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(record_midi_audio_run)->xml_type = "ags-record-midi-audio-run"; AGS_RECALL(record_midi_audio_run)->port = NULL; record_midi_audio_run->delay_audio_run = NULL; record_midi_audio_run->count_beats_audio_run = NULL; record_midi_audio_run->note = NULL; record_midi_audio_run->timestamp = ags_timestamp_new(); record_midi_audio_run->timestamp->flags &= (~AGS_TIMESTAMP_UNIX); record_midi_audio_run->timestamp->flags |= AGS_TIMESTAMP_OFFSET; record_midi_audio_run->timestamp->timer.ags_offset.offset = 0; record_midi_audio_run->midi_file = NULL; } void ags_record_midi_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecordMidiAudioRun *record_midi_audio_run; record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { AgsDelayAudioRun *delay_audio_run; gboolean is_template; delay_audio_run = g_value_get_object(value); if(delay_audio_run == record_midi_audio_run->delay_audio_run){ return; } if(delay_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(delay_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(record_midi_audio_run->delay_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(record_midi_audio_run), (AgsRecall *) record_midi_audio_run->delay_audio_run); } g_object_unref(G_OBJECT(record_midi_audio_run->delay_audio_run)); } if(delay_audio_run != NULL){ g_object_ref(delay_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(record_midi_audio_run), ags_recall_dependency_new((GObject *) delay_audio_run)); } } record_midi_audio_run->delay_audio_run = delay_audio_run; } break; case PROP_COUNT_BEATS_AUDIO_RUN: { AgsCountBeatsAudioRun *count_beats_audio_run; gboolean is_template; count_beats_audio_run = g_value_get_object(value); if(count_beats_audio_run == record_midi_audio_run->count_beats_audio_run){ return; } if((AGS_RECALL_TEMPLATE & (AGS_RECALL(record_midi_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(record_midi_audio_run->count_beats_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(record_midi_audio_run), (AgsRecall *) record_midi_audio_run->count_beats_audio_run); } g_object_unref(G_OBJECT(record_midi_audio_run->count_beats_audio_run)); } if(count_beats_audio_run != NULL){ g_object_ref(count_beats_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(record_midi_audio_run), ags_recall_dependency_new((GObject *) count_beats_audio_run)); } } record_midi_audio_run->count_beats_audio_run = count_beats_audio_run; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_record_midi_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecordMidiAudioRun *record_midi_audio_run; record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(record_midi_audio_run->delay_audio_run)); } break; case PROP_COUNT_BEATS_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(record_midi_audio_run->count_beats_audio_run)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_record_midi_audio_run_dispose(GObject *gobject) { AgsRecordMidiAudioRun *record_midi_audio_run; record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(gobject); /* delay audio run */ if(record_midi_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(record_midi_audio_run->delay_audio_run)); record_midi_audio_run->delay_audio_run = NULL; } /* count beats audio run */ if(record_midi_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(record_midi_audio_run->count_beats_audio_run)); record_midi_audio_run->count_beats_audio_run = NULL; } g_list_free_full(record_midi_audio_run->note, g_object_unref); record_midi_audio_run->note = NULL; /* call parent */ G_OBJECT_CLASS(ags_record_midi_audio_run_parent_class)->dispose(gobject); } void ags_record_midi_audio_run_finalize(GObject *gobject) { AgsRecordMidiAudioRun *record_midi_audio_run; record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(gobject); /* delay audio run */ if(record_midi_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(record_midi_audio_run->delay_audio_run)); } /* count beats audio run */ if(record_midi_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(record_midi_audio_run->count_beats_audio_run)); } /* timestamp */ if(record_midi_audio_run->timestamp != NULL){ g_object_unref(G_OBJECT(record_midi_audio_run->timestamp)); } g_list_free_full(record_midi_audio_run->note, g_object_unref); /* call parent */ G_OBJECT_CLASS(ags_record_midi_audio_run_parent_class)->finalize(gobject); } void ags_record_midi_audio_run_connect(AgsConnectable *connectable) { AgsRecordMidiAudioRun *record_midi_audio_run; if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_record_midi_audio_run_parent_connectable_interface->connect(connectable); record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(connectable); } void ags_record_midi_audio_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_record_midi_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_record_midi_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRecordMidiAudioRun *record_midi_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(dynamic_connectable); /* call parent */ ags_record_midi_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_record_midi_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRecordMidiAudioRun *record_midi_audio_run; /* call parent */ ags_record_midi_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(dynamic_connectable); } void ags_record_midi_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_record_midi_audio_run_parent_plugin_interface->read(file, node, plugin); /* read depenendency */ iter = node->children; while(iter != NULL){ if(iter->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(iter->name, "ags-dependency-list", 19)){ xmlNode *dependency_node; dependency_node = iter->children; while(dependency_node != NULL){ if(dependency_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(dependency_node->name, "ags-dependency", 15)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_record_midi_audio_run_read_resolve_dependency), G_OBJECT(plugin)); } } dependency_node = dependency_node->next; } } } iter = iter->next; } } xmlNode* ags_record_midi_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_record_midi_audio_run_parent_plugin_interface->write(file, parent, plugin); /* write dependencies */ child = xmlNewNode(NULL, "ags-dependency-list"); xmlNewProp(child, AGS_FILE_ID_PROP, ags_id_generator_create_uuid()); xmlAddChild(node, child); list = AGS_RECALL(plugin)->dependencies; while(list != NULL){ id = ags_id_generator_create_uuid(); dependency_node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(dependency_node, AGS_FILE_ID_PROP, id); xmlAddChild(child, dependency_node); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", list->data, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_record_midi_audio_run_write_resolve_dependency), G_OBJECT(plugin)); list = list->next; } return(node); } void ags_record_midi_audio_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallContainer *recall_container; AgsRecordMidiAudioRun *record_midi_audio_run; AgsRecallDependency *recall_dependency; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GList *list; AgsRecallID *recall_id; guint i, i_stop; record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(recall); recall_container = AGS_RECALL_CONTAINER(recall->container); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ template = AGS_RECALL(list->data); }else{ g_warning("AgsRecallClass::resolve - missing dependency"); return; } list = template->dependencies; delay_audio_run = NULL; count_beats_audio_run = NULL; i_stop = 2; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_DELAY_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } delay_audio_run = (AgsDelayAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } count_beats_audio_run = (AgsCountBeatsAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "delay-audio-run", delay_audio_run, "count-beats-audio-run", count_beats_audio_run, NULL); } AgsRecall* ags_record_midi_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecordMidiAudioRun *copy; copy = AGS_RECORD_MIDI_AUDIO_RUN(AGS_RECALL_CLASS(ags_record_midi_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } void ags_record_midi_audio_run_run_init_pre(AgsRecall *recall) { AgsAudio *audio; AgsRecordMidiAudio *record_midi_audio; AgsRecordMidiAudioRun *record_midi_audio_run; GObject *sequencer; gchar *filename; gboolean playback, record; GValue value = {0,}; record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(recall); record_midi_audio = AGS_RECORD_MIDI_AUDIO(AGS_RECALL_AUDIO_RUN(recall)->recall_audio); audio = AGS_RECALL_AUDIO(record_midi_audio)->audio; sequencer = audio->sequencer; if(sequencer == NULL){ return; } /* midi file */ if(record_midi_audio_run->midi_file != NULL){ g_object_unref(record_midi_audio_run->midi_file); } /* get filename */ g_value_init(&value, G_TYPE_STRING); ags_port_safe_read(record_midi_audio->filename, &value); /* instantiate midi file and open rw */ filename = g_value_get_string(&value); record_midi_audio_run->midi_file = (GObject *) ags_midi_file_new(filename); ags_midi_file_rw_open(record_midi_audio_run->midi_file); /* call parent */ AGS_RECALL_CLASS(ags_record_midi_audio_run_parent_class)->run_init_pre(recall); } void ags_record_midi_audio_run_run_pre(AgsRecall *recall) { AgsAudio *audio; AgsChannel *channel; AgsNotation *notation; AgsRecordMidiAudio *record_midi_audio; AgsRecordMidiAudioRun *record_midi_audio_run; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; AgsMutexManager *mutex_manager; GObject *sequencer; GList *list; GList *note, *note_next; unsigned char *midi_buffer; glong division, tempo, bpm; guint notation_counter; gboolean reverse_mapping; gboolean pattern_mode; gboolean playback, record; guint midi_channel; guint audio_start_mapping; guint midi_start_mapping, midi_end_mapping; guint input_pads; guint audio_channel; guint buffer_length; guint i; GValue value = {0,}; pthread_mutex_t *application_mutex; pthread_mutex_t *sequencer_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get defaults */ record_midi_audio_run = AGS_RECORD_MIDI_AUDIO_RUN(recall); record_midi_audio = AGS_RECORD_MIDI_AUDIO(AGS_RECALL_AUDIO_RUN(recall)->recall_audio); audio = AGS_RECALL_AUDIO(record_midi_audio)->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, audio); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(audio_mutex); delay_audio_run = record_midi_audio_run->delay_audio_run; count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(record_midi_audio_run->count_beats_audio_run); sequencer = audio->sequencer; pthread_mutex_unlock(audio_mutex); if(sequencer == NULL){ return; } /* get audio fields */ pthread_mutex_lock(audio_mutex); reverse_mapping = ((AGS_AUDIO_REVERSE_MAPPING & (audio->flags)) != 0) ? TRUE: FALSE; pattern_mode = ((AGS_AUDIO_PATTERN_MODE & (audio->flags)) != 0) ? TRUE: FALSE; midi_channel = audio->midi_channel; audio_start_mapping = audio->audio_start_mapping; midi_start_mapping = audio->midi_start_mapping; midi_end_mapping = audio->midi_end_mapping; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); /* lookup sequencer mutex */ pthread_mutex_lock(application_mutex); sequencer_mutex = ags_mutex_manager_lookup(mutex_manager, sequencer); pthread_mutex_unlock(application_mutex); /* get sequencer specific data */ pthread_mutex_lock(sequencer_mutex); bpm = ags_sequencer_get_bpm(AGS_SEQUENCER(sequencer)); pthread_mutex_unlock(sequencer_mutex); /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel = (AgsChannel *) AGS_RECYCLING(AGS_RECALL(delay_audio_run)->recall_id->recycling)->channel; channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio channel */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* get notation */ pthread_mutex_lock(audio_mutex); notation_counter = count_beats_audio_run->notation_counter; record_midi_audio_run->timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(notation_counter / AGS_NOTATION_DEFAULT_OFFSET); list = ags_notation_find_near_timestamp(audio->notation, audio_channel, record_midi_audio_run->timestamp); if(list != NULL){ notation = list->data; }else{ notation = NULL; } pthread_mutex_unlock(audio_mutex); /* get mode */ g_value_init(&value, G_TYPE_BOOLEAN); ags_port_safe_read(record_midi_audio->playback, &value); playback = g_value_get_boolean(&value); g_value_reset(&value); ags_port_safe_read(record_midi_audio->record, &value); record = g_value_get_boolean(&value); /* delta time specific fields */ g_value_unset(&value); g_value_init(&value, G_TYPE_INT64); ags_port_safe_read(record_midi_audio->division, &value); division = g_value_get_int64(&value); g_value_reset(&value); ags_port_safe_read(record_midi_audio->tempo, &value); tempo = g_value_get_int64(&value); g_value_reset(&value); ags_port_safe_read(record_midi_audio->bpm, &value); bpm = g_value_get_int64(&value); /* retrieve buffer */ pthread_mutex_lock(sequencer_mutex); midi_buffer = ags_sequencer_get_buffer(AGS_SEQUENCER(sequencer), &buffer_length); pthread_mutex_unlock(sequencer_mutex); /* playback */ if(midi_buffer != NULL){ if(playback){ unsigned char *midi_iter; /* parse bytes */ midi_iter = midi_buffer; while(midi_iter < midi_buffer + buffer_length){ #ifdef AGS_DEBUG g_message("0x%x", *midi_iter); #endif if(ags_midi_util_is_key_on(midi_iter)){ AgsNote *current_note; /* key on - check within mapping */ if(midi_channel == (0x0f & midi_iter[0])){ if(midi_start_mapping <= (0x7f & midi_iter[1]) && ((reverse_mapping && input_pads - ((0x7f & midi_iter[1]) - midi_start_mapping) - 1 > 0) || (!reverse_mapping && (0x7f & midi_iter[1]) - midi_start_mapping < midi_end_mapping))){ current_note = NULL; note = record_midi_audio_run->note; pthread_mutex_lock(audio_mutex); while(note != NULL){ /* check current notes */ if(reverse_mapping){ if(AGS_NOTE(note->data)->y == input_pads - ((0x7f & midi_iter[1]) - midi_start_mapping) - 1){ current_note = note->data; break; } }else{ if(AGS_NOTE(note->data)->y == (0x7f & midi_iter[1]) - midi_start_mapping){ current_note = note->data; break; } } note = note->next; } pthread_mutex_unlock(audio_mutex); /* add note */ if(current_note == NULL){ if((0x7f & (midi_iter[2])) != 0){ current_note = ags_note_new(); current_note->x[0] = notation_counter; current_note->x[1] = notation_counter + 1; if(reverse_mapping){ current_note->y = input_pads - ((0x7f & midi_iter[1]) - midi_start_mapping) - 1; }else{ current_note->y = (0x7f & midi_iter[1]) - midi_start_mapping; } #ifdef AGS_DEBUG g_message("add %d", current_note->y); #endif if(!pattern_mode){ record_midi_audio_run->note = g_list_prepend(record_midi_audio_run->note, current_note); g_object_ref(current_note); pthread_mutex_lock(audio_mutex); current_note->flags |= AGS_NOTE_FEED; pthread_mutex_unlock(audio_mutex); } pthread_mutex_lock(audio_mutex); if(notation == NULL){ notation = ags_notation_new(audio, audio_channel); notation->timestamp->timer.ags_offset.offset = record_midi_audio_run->timestamp->timer.ags_offset.offset; audio->notation = ags_notation_add(audio->notation, notation); } ags_notation_add_note(notation, current_note, FALSE); pthread_mutex_unlock(audio_mutex); } }else{ if((0x7f & (midi_iter[2])) == 0){ /* note-off */ pthread_mutex_lock(audio_mutex); current_note->flags &= (~AGS_NOTE_FEED); pthread_mutex_unlock(audio_mutex); record_midi_audio_run->note = g_list_remove(record_midi_audio_run->note, current_note); g_object_unref(current_note); }else{ pthread_mutex_lock(audio_mutex); current_note->x[1] = notation_counter + 1; pthread_mutex_unlock(audio_mutex); } } } } midi_iter += 3; }else if(ags_midi_util_is_key_off(midi_iter)){ AgsNote *current_note; if(audio->midi_channel == (0x0f & midi_iter[0])){ /* key off - find matching note */ current_note = NULL; note = record_midi_audio_run->note; pthread_mutex_lock(audio_mutex); while(note != NULL){ /* check current notes */ if(reverse_mapping){ if(AGS_NOTE(note->data)->y == input_pads - ((0x7f & midi_iter[1]) - midi_start_mapping) - 1){ current_note = note->data; break; } }else{ if(AGS_NOTE(note->data)->y == (0x7f & midi_iter[1]) - midi_start_mapping){ current_note = note->data; break; } } note = note->next; } pthread_mutex_unlock(audio_mutex); /* remove current note */ if(current_note != NULL){ pthread_mutex_lock(audio_mutex); current_note->flags &= (~AGS_NOTE_FEED); pthread_mutex_unlock(audio_mutex); record_midi_audio_run->note = g_list_remove(record_midi_audio_run->note, current_note); g_object_unref(current_note); #ifdef AGS_DEBUG g_message("remove %d", current_note->y); #endif } } midi_iter += 3; }else if(ags_midi_util_is_key_pressure(midi_iter)){ AgsNote *current_note; if(audio->midi_channel == (0x0f & midi_iter[0])){ /* key pressure */ current_note = NULL; note = record_midi_audio_run->note; pthread_mutex_lock(audio_mutex); while(note != NULL){ /* check current notes */ if(reverse_mapping){ if(AGS_NOTE(note->data)->y == input_pads - ((0x7f & midi_iter[1]) - midi_start_mapping) - 1){ current_note = note->data; break; } }else{ if(AGS_NOTE(note->data)->y == (0x7f & midi_iter[1]) - midi_start_mapping){ current_note = note->data; break; } } note = note->next; } pthread_mutex_unlock(audio_mutex); /* feed note */ if(current_note != NULL){ current_note->x[1] = notation_counter + 1; } } midi_iter += 3; }else if(ags_midi_util_is_change_parameter(midi_iter)){ /* change parameter */ //TODO:JK: implement me midi_iter += 3; }else if(ags_midi_util_is_pitch_bend(midi_iter)){ /* change parameter */ //TODO:JK: implement me midi_iter += 3; }else if(ags_midi_util_is_change_program(midi_iter)){ /* change program */ //TODO:JK: implement me midi_iter += 2; }else if(ags_midi_util_is_change_pressure(midi_iter)){ /* change pressure */ //TODO:JK: implement me midi_iter += 2; }else if(ags_midi_util_is_sysex(midi_iter)){ guint n; /* sysex */ n = 0; while(midi_iter[n] != 0xf7){ n++; } //TODO:JK: implement me midi_iter += (n + 1); }else if(ags_midi_util_is_song_position(midi_iter)){ /* song position */ //TODO:JK: implement me midi_iter += 3; }else if(ags_midi_util_is_song_select(midi_iter)){ /* song select */ //TODO:JK: implement me midi_iter += 2; }else if(ags_midi_util_is_tune_request(midi_iter)){ /* tune request */ //TODO:JK: implement me midi_iter += 1; }else if(ags_midi_util_is_meta_event(midi_iter)){ /* meta event */ //TODO:JK: implement me midi_iter += (3 + midi_iter[2]); }else{ g_warning("ags_record_midi_audio_run.c - unexpected byte %x", midi_iter[0]); midi_iter++; } } /* feed notes */ pthread_mutex_lock(audio_mutex); note = record_midi_audio_run->note; while(note != NULL){ AgsNote *current_note; current_note = note->data; current_note->x[1] = notation_counter + 1; note = note->next; } pthread_mutex_unlock(audio_mutex); } /* record */ if(record){ unsigned char *smf_buffer; glong delta_time; guint smf_buffer_length; delta_time = ags_midi_util_offset_to_delta_time(division, tempo, bpm, notation_counter); smf_buffer = ags_midi_util_to_smf(midi_buffer, buffer_length, delta_time, &smf_buffer_length); ags_midi_file_write(record_midi_audio_run->midi_file, smf_buffer, smf_buffer_length); } } /* call parent */ AGS_RECALL_CLASS(ags_record_midi_audio_run_parent_class)->run_pre(recall); } void ags_record_midi_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_RECALL_DEPENDENCY(file_lookup->ref)->dependency); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_record_midi_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "xpath"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(AGS_IS_DELAY_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "delay-audio-run", id_ref->ref, NULL); }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "count-beats-audio-run", id_ref->ref, NULL); } } /** * ags_record_midi_audio_run_new: * * Creates an #AgsRecordMidiAudioRun * * Returns: a new #AgsRecordMidiAudioRun * * Since: 1.0.0 */ AgsRecordMidiAudioRun* ags_record_midi_audio_run_new() { AgsRecordMidiAudioRun *record_midi_audio_run; record_midi_audio_run = (AgsRecordMidiAudioRun *) g_object_new(AGS_TYPE_RECORD_MIDI_AUDIO_RUN, NULL); return(record_midi_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_mute_recycling.c0000644000175000017500000001675313246707333020034 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_mute_recycling_class_init(AgsMuteRecyclingClass *mute_recycling); void ags_mute_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mute_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_mute_recycling_init(AgsMuteRecycling *mute_recycling); void ags_mute_recycling_connect(AgsConnectable *connectable); void ags_mute_recycling_disconnect(AgsConnectable *connectable); void ags_mute_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_mute_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_mute_recycling_finalize(GObject *gobject); void ags_mute_recycling_done(AgsRecall *recall); void ags_mute_recycling_cancel(AgsRecall *recall); void ags_mute_recycling_remove(AgsRecall *recall); AgsRecall* ags_mute_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_mute_recycling * @short_description: mutes recycling * @title: AgsMuteRecycling * @section_id: * @include: ags/audio/recall/ags_mute_recycling.h * * The #AgsMuteRecycling class mutes the recycling. */ static gpointer ags_mute_recycling_parent_class = NULL; static AgsConnectableInterface *ags_mute_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_mute_recycling_parent_dynamic_connectable_interface; GType ags_mute_recycling_get_type() { static GType ags_type_mute_recycling = 0; if(!ags_type_mute_recycling){ static const GTypeInfo ags_mute_recycling_info = { sizeof (AgsMuteRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mute_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMuteRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mute_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mute_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsMuteRecycling", &ags_mute_recycling_info, 0); g_type_add_interface_static(ags_type_mute_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_mute_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_mute_recycling); } void ags_mute_recycling_class_init(AgsMuteRecyclingClass *mute_recycling) { GObjectClass *gobject; AgsRecallClass *recall; ags_mute_recycling_parent_class = g_type_class_peek_parent(mute_recycling); /* GObjectClass */ gobject = (GObjectClass *) mute_recycling; gobject->finalize = ags_mute_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) mute_recycling; recall->done = ags_mute_recycling_done; recall->cancel = ags_mute_recycling_cancel; recall->remove = ags_mute_recycling_remove; recall->duplicate = ags_mute_recycling_duplicate; } void ags_mute_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_mute_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_mute_recycling_connect; connectable->disconnect = ags_mute_recycling_disconnect; } void ags_mute_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_mute_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_mute_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_mute_recycling_disconnect_dynamic; } void ags_mute_recycling_init(AgsMuteRecycling *mute_recycling) { AGS_RECALL(mute_recycling)->name = "ags-mute"; AGS_RECALL(mute_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(mute_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(mute_recycling)->xml_type = "ags-mute-recycling"; AGS_RECALL(mute_recycling)->port = NULL; AGS_RECALL(mute_recycling)->child_type = AGS_TYPE_MUTE_AUDIO_SIGNAL; } void ags_mute_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_mute_recycling_parent_class)->finalize(gobject); } void ags_mute_recycling_connect(AgsConnectable *connectable) { ags_mute_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_mute_recycling_disconnect(AgsConnectable *connectable) { ags_mute_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_mute_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_mute_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_mute_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_mute_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_mute_recycling_done(AgsRecall *recall) { AGS_RECALL_CLASS(ags_mute_recycling_parent_class)->done(recall); /* empty */ } void ags_mute_recycling_cancel(AgsRecall *recall) { AGS_RECALL_CLASS(ags_mute_recycling_parent_class)->cancel(recall); /* empty */ } void ags_mute_recycling_remove(AgsRecall *recall) { AGS_RECALL_CLASS(ags_mute_recycling_parent_class)->remove(recall); /* empty */ } AgsRecall* ags_mute_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsMuteRecycling *mute; mute = (AgsMuteRecycling *) AGS_RECALL_CLASS(ags_mute_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) mute); } /** * ags_mute_recycling_new: * @source: the source #AgsRecycling * * Creates an #AgsMuteRecycling * * Returns: a new #AgsMuteRecycling * * Since: 1.0.0 */ AgsMuteRecycling* ags_mute_recycling_new(AgsRecycling *source) { AgsMuteRecycling *mute_recycling; mute_recycling = (AgsMuteRecycling *) g_object_new(AGS_TYPE_MUTE_RECYCLING, "source", source, NULL); return(mute_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_rt_stream_recycling.h0000644000175000017500000000413413247044247021054 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_RT_STREAM_RECYCLING_H__ #define __AGS_RT_STREAM_RECYCLING_H__ #include #include #include #define AGS_TYPE_RT_STREAM_RECYCLING (ags_rt_stream_recycling_get_type()) #define AGS_RT_STREAM_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RT_STREAM_RECYCLING, AgsRtStreamRecycling)) #define AGS_RT_STREAM_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RT_STREAM_RECYCLING, AgsRtStreamRecyclingClass)) #define AGS_IS_RT_STREAM_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RT_STREAM_RECYCLING)) #define AGS_IS_RT_STREAM_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RT_STREAM_RECYCLING)) #define AGS_RT_STREAM_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RT_STREAM_RECYCLING, AgsRtStreamRecyclingClass)) typedef struct _AgsRtStreamRecycling AgsRtStreamRecycling; typedef struct _AgsRtStreamRecyclingClass AgsRtStreamRecyclingClass; struct _AgsRtStreamRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsRtStreamRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_rt_stream_recycling_get_type(); AgsRtStreamRecycling* ags_rt_stream_recycling_new(AgsRecycling *recycling); #endif /*__AGS_RT_STREAM_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_feed_channel_run.h0000644000175000017500000000404313246707333020274 00000000000000/* 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 . */ #ifndef __AGS_FEED_CHANNEL_RUN_H__ #define __AGS_FEED_CHANNEL_RUN_H__ #include #include #include #include #define AGS_TYPE_FEED_CHANNEL_RUN (ags_feed_channel_run_get_type()) #define AGS_FEED_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_FEED_CHANNEL_RUN, AgsFeedChannelRun)) #define AGS_FEED_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_INSTANCE_CAST(class, AGS_TYPE_FEED_CHANNEL_RUN, AgsFeedChannelRunClass)) #define AGS_IS_FEED_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_FEED_CHANNEL_RUN)) #define AGS_IS_FEED_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_FEED_CHANNEL_RUN)) #define AGS_FEED_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_FEED_CHANNEL_RUN, AgsFeedChannelRunClass)) typedef struct _AgsFeedChannelRun AgsFeedChannelRun; typedef struct _AgsFeedChannelRunClass AgsFeedChannelRunClass; struct _AgsFeedChannelRun { AgsRecallChannelRun recall_channel_run; }; struct _AgsFeedChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_feed_channel_run_get_type(); AgsFeedChannelRun* ags_feed_channel_run_new(AgsChannel *channel); #endif /*__AGS_FEED_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_notation_audio_run.c0000644000175000017500000007731213247044247021745 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_play_notation_audio_run_class_init(AgsPlayNotationAudioRunClass *play_notation_audio_run); void ags_play_notation_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_notation_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_play_notation_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_play_notation_audio_run_init(AgsPlayNotationAudioRun *play_notation_audio_run); void ags_play_notation_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_play_notation_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_play_notation_audio_run_dispose(GObject *gobject); void ags_play_notation_audio_run_finalize(GObject *gobject); void ags_play_notation_audio_run_connect(AgsConnectable *connectable); void ags_play_notation_audio_run_disconnect(AgsConnectable *connectable); void ags_play_notation_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_notation_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_notation_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_play_notation_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_play_notation_audio_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_play_notation_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_play_notation_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsPlayNotationAudioRun *play_notation_audio_run); void ags_play_notation_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_play_notation_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); /** * SECTION:ags_play_notation_audio_run * @short_description: play notation * @title: AgsPlayNotationAudioRun * @section_id: * @include: ags/audio/recall/ags_play_notation_audio_run.h * * The #AgsPlayNotationAudioRun class play notation. */ enum{ PROP_0, PROP_DELAY_AUDIO_RUN, PROP_COUNT_BEATS_AUDIO_RUN, PROP_NOTATION, }; static gpointer ags_play_notation_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_play_notation_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_play_notation_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_play_notation_audio_run_parent_plugin_interface; GType ags_play_notation_audio_run_get_type() { static GType ags_type_play_notation_audio_run = 0; if(!ags_type_play_notation_audio_run){ static const GTypeInfo ags_play_notation_audio_run_info = { sizeof (AgsPlayNotationAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_notation_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayNotationAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_notation_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_notation_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_play_notation_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_play_notation_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_notation_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsPlayNotationAudioRun", &ags_play_notation_audio_run_info, 0); g_type_add_interface_static(ags_type_play_notation_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_notation_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_play_notation_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_play_notation_audio_run); } void ags_play_notation_audio_run_class_init(AgsPlayNotationAudioRunClass *play_notation_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_play_notation_audio_run_parent_class = g_type_class_peek_parent(play_notation_audio_run); /* GObjectClass */ gobject = (GObjectClass *) play_notation_audio_run; gobject->set_property = ags_play_notation_audio_run_set_property; gobject->get_property = ags_play_notation_audio_run_get_property; gobject->dispose = ags_play_notation_audio_run_dispose; gobject->finalize = ags_play_notation_audio_run_finalize; /* properties */ /** * AgsPlayNotationAudioRun:delay-audio-run: * * The delay audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("delay-audio-run", i18n_pspec("assigned AgsDelayAudioRun"), i18n_pspec("the AgsDelayAudioRun which emits notation_alloc_input signal"), AGS_TYPE_DELAY_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_AUDIO_RUN, param_spec); /** * AgsPlayNotationAudioRun:count-beats-audio-run: * * The count beats audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("count-beats-audio-run", i18n_pspec("assigned AgsCountBeatsAudioRun"), i18n_pspec("the AgsCountBeatsAudioRun which just counts"), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT_BEATS_AUDIO_RUN, param_spec); /** * AgsPlayNotationAudioRun:notation: * * The notation containing the notes. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("assigned AgsNotation"), i18n_pspec("The AgsNotation containing notes"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) play_notation_audio_run; recall->resolve_dependencies = ags_play_notation_audio_run_resolve_dependencies; recall->duplicate = ags_play_notation_audio_run_duplicate; } void ags_play_notation_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_notation_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_notation_audio_run_connect; connectable->disconnect = ags_play_notation_audio_run_disconnect; } void ags_play_notation_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_play_notation_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_play_notation_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_play_notation_audio_run_disconnect_dynamic; } void ags_play_notation_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_play_notation_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_play_notation_audio_run_read; plugin->write = ags_play_notation_audio_run_write; } void ags_play_notation_audio_run_init(AgsPlayNotationAudioRun *play_notation_audio_run) { AGS_RECALL(play_notation_audio_run)->name = "ags-play-notation"; AGS_RECALL(play_notation_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_notation_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_notation_audio_run)->xml_type = "ags-play-notation-audio-run"; AGS_RECALL(play_notation_audio_run)->port = NULL; play_notation_audio_run->delay_audio_run = NULL; play_notation_audio_run->count_beats_audio_run = NULL; play_notation_audio_run->notation = NULL; play_notation_audio_run->timestamp = ags_timestamp_new(); play_notation_audio_run->timestamp->flags &= (~AGS_TIMESTAMP_UNIX); play_notation_audio_run->timestamp->flags |= AGS_TIMESTAMP_OFFSET; play_notation_audio_run->timestamp->timer.ags_offset.offset = 0; } void ags_play_notation_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayNotationAudioRun *play_notation_audio_run; play_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { AgsDelayAudioRun *delay_audio_run; gboolean is_template; delay_audio_run = g_value_get_object(value); if(delay_audio_run == play_notation_audio_run->delay_audio_run){ return; } if((AGS_RECALL_TEMPLATE & (AGS_RECALL(play_notation_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(play_notation_audio_run->delay_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(play_notation_audio_run), (AgsRecall *) play_notation_audio_run->delay_audio_run); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(play_notation_audio_run)->flags)) != 0){ g_object_disconnect(G_OBJECT(play_notation_audio_run->delay_audio_run), "any_signal::notation-alloc-input", G_CALLBACK(ags_play_notation_audio_run_alloc_input_callback), play_notation_audio_run, NULL); } } g_object_unref(G_OBJECT(play_notation_audio_run->delay_audio_run)); } if(delay_audio_run != NULL){ g_object_ref(delay_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(play_notation_audio_run), ags_recall_dependency_new((GObject *) delay_audio_run)); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(play_notation_audio_run)->flags)) != 0){ g_signal_connect(G_OBJECT(delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_play_notation_audio_run_alloc_input_callback), play_notation_audio_run); } } } play_notation_audio_run->delay_audio_run = delay_audio_run; } break; case PROP_COUNT_BEATS_AUDIO_RUN: { AgsCountBeatsAudioRun *count_beats_audio_run; gboolean is_template; count_beats_audio_run = g_value_get_object(value); if(count_beats_audio_run == play_notation_audio_run->count_beats_audio_run){ return; } if((AGS_RECALL_TEMPLATE & (AGS_RECALL(play_notation_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(play_notation_audio_run->count_beats_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(play_notation_audio_run), (AgsRecall *) play_notation_audio_run->count_beats_audio_run); } g_object_unref(G_OBJECT(play_notation_audio_run->count_beats_audio_run)); } if(count_beats_audio_run != NULL){ g_object_ref(count_beats_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(play_notation_audio_run), ags_recall_dependency_new((GObject *) count_beats_audio_run)); } } play_notation_audio_run->count_beats_audio_run = count_beats_audio_run; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(play_notation_audio_run->notation == notation){ return; } if(play_notation_audio_run->notation != NULL){ g_object_unref(play_notation_audio_run->notation); } if(notation != NULL){ g_object_ref(notation); } play_notation_audio_run->notation = notation; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_play_notation_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayNotationAudioRun *play_notation_audio_run; play_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(play_notation_audio_run->delay_audio_run)); } break; case PROP_COUNT_BEATS_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(play_notation_audio_run->count_beats_audio_run)); } break; case PROP_NOTATION: { g_value_set_object(value, play_notation_audio_run->notation); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_play_notation_audio_run_dispose(GObject *gobject) { AgsPlayNotationAudioRun *play_notation_audio_run; play_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(gobject); /* delay audio run */ if(play_notation_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(play_notation_audio_run->delay_audio_run)); play_notation_audio_run->delay_audio_run = NULL; } /* count beats audio run */ if(play_notation_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(play_notation_audio_run->count_beats_audio_run)); play_notation_audio_run->count_beats_audio_run = NULL; } /* notation */ if(play_notation_audio_run->notation != NULL){ g_object_unref(G_OBJECT(play_notation_audio_run->notation)); play_notation_audio_run->notation = NULL; } /* call parent */ G_OBJECT_CLASS(ags_play_notation_audio_run_parent_class)->dispose(gobject); } void ags_play_notation_audio_run_finalize(GObject *gobject) { AgsPlayNotationAudioRun *play_notation_audio_run; play_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(gobject); /* delay audio run */ if(play_notation_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(play_notation_audio_run->delay_audio_run)); } /* count beats audio run */ if(play_notation_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(play_notation_audio_run->count_beats_audio_run)); } /* notation */ if(play_notation_audio_run->notation != NULL){ g_object_unref(G_OBJECT(play_notation_audio_run->notation)); } /* timestamp */ if(play_notation_audio_run->timestamp != NULL){ g_object_unref(G_OBJECT(play_notation_audio_run->timestamp)); } /* call parent */ G_OBJECT_CLASS(ags_play_notation_audio_run_parent_class)->finalize(gobject); } void ags_play_notation_audio_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_play_notation_audio_run_parent_connectable_interface->connect(connectable); } void ags_play_notation_audio_run_disconnect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } /* call parent */ ags_play_notation_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_play_notation_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsPlayNotationAudioRun *play_notation_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } play_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(dynamic_connectable); /* call parent */ ags_play_notation_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* connect */ g_signal_connect(G_OBJECT(play_notation_audio_run->delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_play_notation_audio_run_alloc_input_callback), play_notation_audio_run); } void ags_play_notation_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsPlayNotationAudioRun *play_notation_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) == 0){ return; } /* call parent */ ags_play_notation_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); play_notation_audio_run = AGS_PLAY_NOTATION_AUDIO_RUN(dynamic_connectable); if(play_notation_audio_run->delay_audio_run != NULL){ g_object_disconnect(G_OBJECT(play_notation_audio_run->delay_audio_run), "any_signal::notation-alloc-input", G_CALLBACK(ags_play_notation_audio_run_alloc_input_callback), play_notation_audio_run, NULL); } } void ags_play_notation_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_play_notation_audio_run_parent_plugin_interface->read(file, node, plugin); /* read depenendency */ iter = node->children; while(iter != NULL){ if(iter->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(iter->name, "ags-dependency-list", 19)){ xmlNode *dependency_node; dependency_node = iter->children; while(dependency_node != NULL){ if(dependency_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(dependency_node->name, "ags-dependency", 15)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_play_notation_audio_run_read_resolve_dependency), G_OBJECT(plugin)); } } dependency_node = dependency_node->next; } } } iter = iter->next; } } xmlNode* ags_play_notation_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_play_notation_audio_run_parent_plugin_interface->write(file, parent, plugin); /* write dependencies */ child = xmlNewNode(NULL, "ags-dependency-list"); xmlNewProp(child, AGS_FILE_ID_PROP, ags_id_generator_create_uuid()); xmlAddChild(node, child); list = AGS_RECALL(plugin)->dependencies; while(list != NULL){ id = ags_id_generator_create_uuid(); dependency_node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(dependency_node, AGS_FILE_ID_PROP, id); xmlAddChild(child, dependency_node); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", list->data, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_play_notation_audio_run_write_resolve_dependency), G_OBJECT(plugin)); list = list->next; } return(node); } void ags_play_notation_audio_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallID *recall_id; AgsRecallContainer *recall_container; AgsRecallDependency *recall_dependency; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GList *list; guint i, i_stop; recall_container = AGS_RECALL_CONTAINER(recall->container); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ template = AGS_RECALL(list->data); }else{ g_warning("AgsRecallClass::resolve - missing dependency"); return; } list = template->dependencies; delay_audio_run = NULL; count_beats_audio_run = NULL; i_stop = 2; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_DELAY_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } delay_audio_run = (AgsDelayAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } count_beats_audio_run = (AgsCountBeatsAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "delay-audio-run", delay_audio_run, "count-beats-audio-run", count_beats_audio_run, NULL); } AgsRecall* ags_play_notation_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPlayNotationAudioRun *copy; copy = AGS_PLAY_NOTATION_AUDIO_RUN(AGS_RECALL_CLASS(ags_play_notation_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } void ags_play_notation_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsPlayNotationAudioRun *play_notation_audio_run) { GObject *soundcard; AgsAudio *audio; AgsChannel *output, *input; AgsChannel *selected_channel, *channel, *next_pad; AgsRecycling *recycling; AgsAudioSignal *audio_signal; AgsNotation *notation; AgsNote *note; AgsPlayNotationAudio *play_notation_audio; AgsDelayAudio *delay_audio; AgsMutexManager *mutex_manager; AgsConfig *config; GList *current_position; GList *list; gchar *str; guint notation_counter; guint input_pads; guint audio_channel; guint samplerate; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *recycling_mutex; auto void ags_play_notation_audio_run_alloc_input_callback_play_notation(AgsNotation *notation); void ags_play_notation_audio_run_alloc_input_callback_play_notation(AgsNotation *notation) { gdouble notation_delay; GValue value = {0,}; /* get notation delay */ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(delay_audio->notation_delay, &value); notation_delay = g_value_get_double(&value); g_value_unset(&value); /* */ pthread_mutex_lock(audio_mutex); current_position = notation->notes; pthread_mutex_unlock(audio_mutex); while(current_position != NULL){ AgsRecallID *child_recall_id; GList *list; guint note_x0; pthread_mutex_lock(audio_mutex); note = AGS_NOTE(current_position->data); note_x0 = note->x[0]; pthread_mutex_unlock(audio_mutex); if(note_x0 == notation_counter){ if((AGS_AUDIO_REVERSE_MAPPING & (audio->flags)) != 0){ selected_channel = ags_channel_pad_nth(channel, input_pads - note->y - 1); }else{ selected_channel = ags_channel_pad_nth(channel, note->y); } if(selected_channel == NULL){ current_position = current_position->next; continue; } /* get child recall id */ child_recall_id = NULL; list = selected_channel->recall_id; while(list != NULL){ if(AGS_RECALL_ID(list->data)->recycling_context->parent == AGS_RECALL(delay_audio_run)->recall_id->recycling_context){ child_recall_id = (AgsRecallID *) list->data; break; } list = list->next; } /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) selected_channel); pthread_mutex_unlock(application_mutex); /* recycling */ pthread_mutex_lock(channel_mutex); recycling = selected_channel->first_recycling; pthread_mutex_unlock(channel_mutex); #ifdef AGS_DEBUG g_message("playing[%u|%u]: %u | %u\n", audio_channel, selected_channel->pad, note->x[0], note->y); #endif note->rt_attack = attack; while(recycling != selected_channel->last_recycling->next){ /* lookup recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); if(!AGS_RECALL(play_notation_audio_run)->rt_safe){ /* create audio signal */ audio_signal = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) child_recall_id); g_object_set(audio_signal, "note", note, NULL); if((AGS_AUDIO_PATTERN_MODE & (audio->flags)) != 0){ ags_recycling_create_audio_signal_with_defaults(recycling, audio_signal, 0.0, 0); }else{ /* create audio signal with frame count */ ags_recycling_create_audio_signal_with_frame_count(recycling, audio_signal, (guint) (((gdouble) samplerate / notation_delay) * (gdouble) (note->x[1] - note->x[0])), 0.0, 0); } ags_connectable_connect(AGS_CONNECTABLE(audio_signal)); audio_signal->stream_current = audio_signal->stream_beginning; /* lock and add */ ags_recycling_add_audio_signal(recycling, audio_signal); // g_object_unref(audio_signal); }else{ GList *list; pthread_mutex_lock(recycling_mutex); audio_signal = NULL; list = ags_audio_signal_get_by_recall_id(recycling->audio_signal, child_recall_id); if(list != NULL){ audio_signal = list->data; g_object_set(audio_signal, "delay", notation_delay, "note", note, NULL); } note->rt_offset = 0; pthread_mutex_unlock(recycling_mutex); } /* iterate */ pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } }else if(note_x0 > notation_counter){ break; } pthread_mutex_lock(audio_mutex); current_position = current_position->next; pthread_mutex_unlock(audio_mutex); } } if(delay != 0.0){ // g_message("d %f", delay); return; } play_notation_audio = AGS_PLAY_NOTATION_AUDIO(AGS_RECALL_AUDIO_RUN(play_notation_audio_run)->recall_audio); delay_audio = AGS_DELAY_AUDIO(AGS_RECALL_AUDIO_RUN(delay_audio_run)->recall_audio); audio = AGS_RECALL_AUDIO(play_notation_audio)->audio; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); /* read config and audio mutex */ pthread_mutex_lock(application_mutex); /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); free(str); }else{ samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } /* */ audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(audio_mutex); soundcard = (GObject *) audio->soundcard; list = audio->notation; pthread_mutex_unlock(audio_mutex); if(list == NULL){ return; } /* lookup channel mutex */ pthread_mutex_lock(application_mutex); channel = (AgsChannel *) AGS_RECYCLING(AGS_RECALL(delay_audio_run)->recall_id->recycling)->channel; channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio channel */ pthread_mutex_lock(channel_mutex); output = audio->output; input = audio->input; audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* get channel */ if((AGS_AUDIO_NOTATION_DEFAULT & (audio->flags)) != 0){ channel = ags_channel_nth(input, audio_channel); }else{ channel = ags_channel_nth(output, audio_channel); } /* play notation */ notation = NULL; pthread_mutex_lock(audio_mutex); notation_counter = play_notation_audio_run->count_beats_audio_run->notation_counter; input_pads = audio->input_pads; play_notation_audio_run->timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(notation_counter / AGS_NOTATION_DEFAULT_OFFSET); list = ags_notation_find_near_timestamp(audio->notation, audio_channel, play_notation_audio_run->timestamp); if(list != NULL){ notation = list->data; } pthread_mutex_unlock(audio_mutex); if(notation != NULL){ ags_play_notation_audio_run_alloc_input_callback_play_notation(notation); } } void ags_play_notation_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_RECALL_DEPENDENCY(file_lookup->ref)->dependency); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_play_notation_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "xpath"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(AGS_IS_DELAY_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "delay-audio-run", id_ref->ref, NULL); }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "count-beats-audio-run", id_ref->ref, NULL); } } /** * ags_play_notation_audio_run_new: * * Creates an #AgsPlayNotationAudioRun * * Returns: a new #AgsPlayNotationAudioRun * * Since: 1.0.0 */ AgsPlayNotationAudioRun* ags_play_notation_audio_run_new() { AgsPlayNotationAudioRun *play_notation_audio_run; play_notation_audio_run = (AgsPlayNotationAudioRun *) g_object_new(AGS_TYPE_PLAY_NOTATION_AUDIO_RUN, NULL); return(play_notation_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_capture_sound_audio_run.c0000644000175000017500000002523313256163135021731 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_capture_sound_audio_run_class_init(AgsCaptureSoundAudioRunClass *capture_sound_audio_run); void ags_capture_sound_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_capture_sound_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_capture_sound_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_capture_sound_audio_run_init(AgsCaptureSoundAudioRun *capture_sound_audio_run); void ags_capture_sound_audio_run_dispose(GObject *gobject); void ags_capture_sound_audio_run_finalize(GObject *gobject); void ags_capture_sound_audio_run_connect(AgsConnectable *connectable); void ags_capture_sound_audio_run_disconnect(AgsConnectable *connectable); void ags_capture_sound_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_capture_sound_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_capture_sound_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_capture_sound_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); AgsRecall* ags_capture_sound_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_capture_sound_audio_run_run_init_pre(AgsRecall *recall); void ags_capture_sound_audio_run_run_pre(AgsRecall *recall); /** * SECTION:ags_capture_sound_audio_run * @short_description: capture sound * @title: AgsCaptureSoundAudioRun * @section_id: * @include: ags/audio/recall/ags_capture_sound_audio_run.h * * The #AgsCaptureSoundAudioRun does capture sound. */ static gpointer ags_capture_sound_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_capture_sound_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_capture_sound_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_capture_sound_audio_run_parent_plugin_interface; GType ags_capture_sound_audio_run_get_type() { static GType ags_type_capture_sound_audio_run = 0; if(!ags_type_capture_sound_audio_run){ static const GTypeInfo ags_capture_sound_audio_run_info = { sizeof (AgsCaptureSoundAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_capture_sound_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCaptureSoundAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_capture_sound_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_capture_sound_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_capture_sound_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_capture_sound_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_capture_sound_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsCaptureSoundAudioRun", &ags_capture_sound_audio_run_info, 0); g_type_add_interface_static(ags_type_capture_sound_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_capture_sound_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_capture_sound_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_capture_sound_audio_run); } void ags_capture_sound_audio_run_class_init(AgsCaptureSoundAudioRunClass *capture_sound_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; ags_capture_sound_audio_run_parent_class = g_type_class_peek_parent(capture_sound_audio_run); /* GObjectClass */ gobject = (GObjectClass *) capture_sound_audio_run; gobject->dispose = ags_capture_sound_audio_run_dispose; gobject->finalize = ags_capture_sound_audio_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) capture_sound_audio_run; recall->duplicate = ags_capture_sound_audio_run_duplicate; recall->run_init_pre = ags_capture_sound_audio_run_run_init_pre; recall->run_pre = ags_capture_sound_audio_run_run_pre; } void ags_capture_sound_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_capture_sound_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_capture_sound_audio_run_connect; connectable->disconnect = ags_capture_sound_audio_run_disconnect; } void ags_capture_sound_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_capture_sound_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_capture_sound_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_capture_sound_audio_run_disconnect_dynamic; } void ags_capture_sound_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_capture_sound_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_capture_sound_audio_run_read; plugin->write = ags_capture_sound_audio_run_write; } void ags_capture_sound_audio_run_init(AgsCaptureSoundAudioRun *capture_sound_audio_run) { AGS_RECALL(capture_sound_audio_run)->name = "ags-capture-sound"; AGS_RECALL(capture_sound_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(capture_sound_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(capture_sound_audio_run)->xml_type = "ags-capture-sound-audio-run"; AGS_RECALL(capture_sound_audio_run)->port = NULL; capture_sound_audio_run->audio_file = NULL; } void ags_capture_sound_audio_run_dispose(GObject *gobject) { AgsCaptureSoundAudioRun *capture_sound_audio_run; capture_sound_audio_run = AGS_CAPTURE_SOUND_AUDIO_RUN(gobject); /* call parent */ G_OBJECT_CLASS(ags_capture_sound_audio_run_parent_class)->dispose(gobject); } void ags_capture_sound_audio_run_finalize(GObject *gobject) { AgsCaptureSoundAudioRun *capture_sound_audio_run; capture_sound_audio_run = AGS_CAPTURE_SOUND_AUDIO_RUN(gobject); /* call parent */ G_OBJECT_CLASS(ags_capture_sound_audio_run_parent_class)->finalize(gobject); } void ags_capture_sound_audio_run_connect(AgsConnectable *connectable) { AgsCaptureSoundAudioRun *capture_sound_audio_run; if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_capture_sound_audio_run_parent_connectable_interface->connect(connectable); capture_sound_audio_run = AGS_CAPTURE_SOUND_AUDIO_RUN(connectable); } void ags_capture_sound_audio_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_capture_sound_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_capture_sound_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsCaptureSoundAudioRun *capture_sound_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } capture_sound_audio_run = AGS_CAPTURE_SOUND_AUDIO_RUN(dynamic_connectable); /* call parent */ ags_capture_sound_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_capture_sound_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsCaptureSoundAudioRun *capture_sound_audio_run; /* call parent */ ags_capture_sound_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); capture_sound_audio_run = AGS_CAPTURE_SOUND_AUDIO_RUN(dynamic_connectable); } void ags_capture_sound_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { /* read parent */ ags_capture_sound_audio_run_parent_plugin_interface->read(file, node, plugin); } xmlNode* ags_capture_sound_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { xmlNode *node; /* write parent */ node = ags_capture_sound_audio_run_parent_plugin_interface->write(file, parent, plugin); return(node); } AgsRecall* ags_capture_sound_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsCaptureSoundAudioRun *copy; copy = AGS_CAPTURE_SOUND_AUDIO_RUN(AGS_RECALL_CLASS(ags_capture_sound_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } void ags_capture_sound_audio_run_run_init_pre(AgsRecall *recall) { //TODO:JK: implement me /* call parent */ AGS_RECALL_CLASS(ags_capture_sound_audio_run_parent_class)->run_init_pre(recall); } void ags_capture_sound_audio_run_run_pre(AgsRecall *recall) { //TODO:JK: implement me /* call parent */ AGS_RECALL_CLASS(ags_capture_sound_audio_run_parent_class)->run_pre(recall); } /** * ags_capture_sound_audio_run_new: * * Creates an #AgsCaptureSoundAudioRun * * Returns: a new #AgsCaptureSoundAudioRun * * Since: 1.4.0 */ AgsCaptureSoundAudioRun* ags_capture_sound_audio_run_new() { AgsCaptureSoundAudioRun *capture_sound_audio_run; capture_sound_audio_run = (AgsCaptureSoundAudioRun *) g_object_new(AGS_TYPE_CAPTURE_SOUND_AUDIO_RUN, NULL); return(capture_sound_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_copy_pattern_audio_run.h0000644000175000017500000000455513246707333021601 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_COPY_PATTERN_AUDIO_RUN_H__ #define __AGS_COPY_PATTERN_AUDIO_RUN_H__ #include #include #include #include #define AGS_TYPE_COPY_PATTERN_AUDIO_RUN (ags_copy_pattern_audio_run_get_type()) #define AGS_COPY_PATTERN_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_PATTERN_AUDIO_RUN, AgsCopyPatternAudioRun)) #define AGS_COPY_PATTERN_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_PATTERN_AUDIO_RUN, AgsCopyPatternAudioRun)) #define AGS_IS_COPY_PATTERN_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COPY_PATTERN_AUDIO_RUN)) #define AGS_IS_COPY_PATTERN_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COPY_PATTERN_AUDIO_RUN)) #define AGS_COPY_PATTERN_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COPY_PATTERN_AUDIO_RUN, AgsCopyPatternAudioRunClass)) typedef struct _AgsCopyPatternAudioRun AgsCopyPatternAudioRun; typedef struct _AgsCopyPatternAudioRunClass AgsCopyPatternAudioRunClass; struct _AgsCopyPatternAudioRun { AgsRecallAudioRun recall_audio_run; guint hide_ref; guint hide_ref_counter; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; }; struct _AgsCopyPatternAudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_copy_pattern_audio_run_get_type(); AgsCopyPatternAudioRun* ags_copy_pattern_audio_run_new(AgsCountBeatsAudioRun *count_beats_audio_run); #endif /*__AGS_COPY_PATTERN_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_copy_notation_audio_run.h0000644000175000017500000000456113246707333021754 00000000000000/* 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 . */ #ifndef __AGS_COPY_NOTATION_AUDIO_RUN_H__ #define __AGS_COPY_NOTATION_AUDIO_RUN_H__ #include #include #include #include #define AGS_TYPE_COPY_NOTATION_AUDIO_RUN (ags_copy_notation_audio_run_get_type()) #define AGS_COPY_NOTATION_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_NOTATION_AUDIO_RUN, AgsCopyNotationAudioRun)) #define AGS_COPY_NOTATION_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_NOTATION_AUDIO_RUN, AgsCopyNotationAudioRun)) #define AGS_IS_COPY_NOTATION_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COPY_NOTATION_AUDIO_RUN)) #define AGS_IS_COPY_NOTATION_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COPY_NOTATION_AUDIO_RUN)) #define AGS_COPY_NOTATION_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COPY_NOTATION_AUDIO_RUN, AgsCopyNotationAudioRunClass)) typedef struct _AgsCopyNotationAudioRun AgsCopyNotationAudioRun; typedef struct _AgsCopyNotationAudioRunClass AgsCopyNotationAudioRunClass; struct _AgsCopyNotationAudioRun { AgsRecallAudioRun recall_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; gulong tic_alloc_input_handler; GList *current_note; }; struct _AgsCopyNotationAudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_copy_notation_audio_run_get_type(); AgsCopyNotationAudioRun* ags_copy_notation_audio_run_new(AgsCountBeatsAudioRun *count_beats_audio_run); #endif /*__AGS_COPY_NOTATION_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_feed_channel_run.c0000644000175000017500000001733013246707333020272 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_feed_channel_run_class_init(AgsFeedChannelRunClass *feed_channel_run); void ags_feed_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_feed_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_feed_channel_run_init(AgsFeedChannelRun *feed_channel_run); void ags_feed_channel_run_connect(AgsConnectable *connectable); void ags_feed_channel_run_disconnect(AgsConnectable *connectable); void ags_feed_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_feed_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_feed_channel_run_finalize(GObject *gobject); AgsRecall* ags_feed_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_feed_channel_run * @short_description: feeds channel * @title: AgsFeedChannelRun * @section_id: * @include: ags/audio/recall/ags_feed_channel_run.h * * The #AgsFeedChannelRun class feeds the channel. */ static gpointer ags_feed_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_feed_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_feed_channel_run_parent_dynamic_connectable_interface; GType ags_feed_channel_run_get_type() { static GType ags_type_feed_channel_run = 0; if(!ags_type_feed_channel_run){ static const GTypeInfo ags_feed_channel_run_info = { sizeof (AgsFeedChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_feed_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFeedChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_feed_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_feed_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_feed_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_feed_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsFeedChannelRun", &ags_feed_channel_run_info, 0); g_type_add_interface_static(ags_type_feed_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_feed_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_feed_channel_run); } void ags_feed_channel_run_class_init(AgsFeedChannelRunClass *feed_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; ags_feed_channel_run_parent_class = g_type_class_peek_parent(feed_channel_run); /* GObjectClass */ gobject = (GObjectClass *) feed_channel_run; gobject->finalize = ags_feed_channel_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) feed_channel_run; recall->duplicate = ags_feed_channel_run_duplicate; } void ags_feed_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_feed_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_feed_channel_run_connect; connectable->disconnect = ags_feed_channel_run_disconnect; } void ags_feed_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_feed_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_feed_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_feed_channel_run_disconnect_dynamic; } void ags_feed_channel_run_init(AgsFeedChannelRun *feed_channel_run) { AGS_RECALL(feed_channel_run)->name = "ags-feed"; AGS_RECALL(feed_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(feed_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(feed_channel_run)->xml_type = "ags-feed-channel-run"; AGS_RECALL(feed_channel_run)->port = NULL; AGS_RECALL(feed_channel_run)->flags |= AGS_RECALL_INPUT_ORIENTATED; AGS_RECALL(feed_channel_run)->child_type = AGS_TYPE_FEED_RECYCLING; } void ags_feed_channel_run_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_feed_channel_run_parent_class)->finalize(gobject); } void ags_feed_channel_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_feed_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_feed_channel_run_disconnect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } /* empty */ /* call parent */ ags_feed_channel_run_parent_connectable_interface->disconnect(connectable); } void ags_feed_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_feed_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_feed_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) == 0){ return; } /* empty */ /* call parent */ ags_feed_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } AgsRecall* ags_feed_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsFeedChannelRun *copy; copy = (AgsFeedChannelRun *) AGS_RECALL_CLASS(ags_feed_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_feed_channel_run_new: * @channel: the assigned #AgsChannel * * Creates an #AgsFeedChannelRun * * Returns: a new #AgsFeedChannelRun * * Since: 1.0.0 */ AgsFeedChannelRun* ags_feed_channel_run_new(AgsChannel *channel) { AgsFeedChannelRun *feed_channel_run; feed_channel_run = (AgsFeedChannelRun *) g_object_new(AGS_TYPE_FEED_CHANNEL_RUN, "source", channel, NULL); return(feed_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_play_channel_run_master.c0000644000175000017500000005721613246707333021716 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_play_channel_run_master_class_init(AgsPlayChannelRunMasterClass *play_channel_run_master); void ags_play_channel_run_master_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_channel_run_master_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_play_channel_run_master_plugin_interface_init(AgsPluginInterface *plugin); void ags_play_channel_run_master_init(AgsPlayChannelRunMaster *play_channel_run_master); void ags_play_channel_run_master_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_play_channel_run_master_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_play_channel_run_master_connect(AgsConnectable *connectable); void ags_play_channel_run_master_disconnect(AgsConnectable *connectable); void ags_play_channel_run_master_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_channel_run_master_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_channel_run_master_dispose(GObject *gobject); void ags_play_channel_run_master_finalize(GObject *gobject); void ags_play_channel_run_master_run_init_pre(AgsRecall *recall); void ags_play_channel_run_master_done(AgsRecall *recall); void ags_play_channel_run_master_remove(AgsRecall *recall); void ags_play_channel_run_master_cancel(AgsRecall *recall); void ags_play_channel_run_master_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_play_channel_run_master_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_play_channel_run_master_remap_child_source(AgsPlayChannelRunMaster *play_channel_run_master, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region); void ags_play_channel_run_master_remap_dependencies(AgsPlayChannelRunMaster *play_channel_run_master, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region); void ags_play_channel_run_master_source_recycling_changed_callback(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region, AgsPlayChannelRunMaster *play_channel_run_master); void ags_play_channel_run_master_stream_channel_done_callback(AgsRecall *recall, AgsPlayChannelRunMasterStreamer *streamer); /** * SECTION:ags_play_channel_run_master * @short_description: plays channel as toplevel * @title: AgsPlayChannelRunMaster * @section_id: * @include: ags/audio/recall/ags_play_channel_master.h * * The #AgsPlayChannelRunMaster class plays the channel within toplevel context. */ enum{ PROP_0, PROP_STREAM_CHANNEL_RUN, }; static gpointer ags_play_channel_run_master_parent_class = NULL; static AgsConnectableInterface *ags_play_channel_run_master_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_play_channel_run_master_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_play_channel_run_master_parent_plugin_interface; GType ags_play_channel_run_master_get_type() { static GType ags_type_play_channel_run_master = 0; if(!ags_type_play_channel_run_master){ static const GTypeInfo ags_play_channel_run_master_info = { sizeof (AgsPlayChannelRunMasterClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_channel_run_master_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayChannelRunMaster), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_channel_run_master_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_channel_run_master_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_play_channel_run_master_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_play_channel_run_master_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_channel_run_master = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsPlayChannelRunMaster", &ags_play_channel_run_master_info, 0); g_type_add_interface_static(ags_type_play_channel_run_master, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_channel_run_master, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_play_channel_run_master, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_play_channel_run_master); } void ags_play_channel_run_master_class_init(AgsPlayChannelRunMasterClass *play_channel_run_master) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_play_channel_run_master_parent_class = g_type_class_peek_parent(play_channel_run_master); /* GObjectClass */ gobject = (GObjectClass *) play_channel_run_master; gobject->set_property = ags_play_channel_run_master_set_property; gobject->get_property = ags_play_channel_run_master_get_property; gobject->dispose = ags_play_channel_run_master_dispose; gobject->finalize = ags_play_channel_run_master_finalize; /* properties */ /** * AgsPlayChannelRunMaster:stream-channel-run: * * The assigned stream channel run. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("stream-channel-run", i18n_pspec("assigned AgsStreamChannelRun"), i18n_pspec("an assigned AgsStreamChannelRun"), AGS_TYPE_STREAM_CHANNEL_RUN, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STREAM_CHANNEL_RUN, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) play_channel_run_master; recall->run_init_pre = ags_play_channel_run_master_run_init_pre; recall->done = ags_play_channel_run_master_done; recall->cancel = ags_play_channel_run_master_cancel; recall->resolve_dependencies = ags_play_channel_run_master_resolve_dependencies; recall->duplicate = ags_play_channel_run_master_duplicate; } void ags_play_channel_run_master_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_channel_run_master_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_channel_run_master_connect; connectable->disconnect = ags_play_channel_run_master_disconnect; } void ags_play_channel_run_master_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_play_channel_run_master_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_play_channel_run_master_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_play_channel_run_master_disconnect_dynamic; } void ags_play_channel_run_master_plugin_interface_init(AgsPluginInterface *plugin) { ags_play_channel_run_master_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_play_channel_run_master_init(AgsPlayChannelRunMaster *play_channel_run_master) { AGS_RECALL(play_channel_run_master)->name = "ags-play"; AGS_RECALL(play_channel_run_master)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_channel_run_master)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_channel_run_master)->xml_type = "ags-play-channel-run-master"; AGS_RECALL(play_channel_run_master)->port = NULL; AGS_RECALL(play_channel_run_master)->flags |= (AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PERSISTENT); AGS_RECALL(play_channel_run_master)->child_type = AGS_TYPE_PLAY_RECYCLING; play_channel_run_master->flags = 0; play_channel_run_master->streamer = NULL; } void ags_play_channel_run_master_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayChannelRunMaster *play_channel_run_master; play_channel_run_master = AGS_PLAY_CHANNEL_RUN_MASTER(gobject); switch(prop_id){ case PROP_STREAM_CHANNEL_RUN: { AgsStreamChannelRun *stream_channel_run; AgsPlayChannelRunMasterStreamer *streamer; gboolean is_template; stream_channel_run = (AgsStreamChannelRun *) g_value_get_object(value); if(g_list_find(play_channel_run_master->streamer, stream_channel_run) != NULL){ return; } streamer = NULL; if(stream_channel_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(stream_channel_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(stream_channel_run != NULL){ g_object_ref(G_OBJECT(stream_channel_run)); streamer = ags_play_channel_run_master_streamer_alloc(play_channel_run_master, stream_channel_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(play_channel_run_master), ags_recall_dependency_new((GObject *) stream_channel_run)); }else{ if((AGS_RECALL_RUN_INITIALIZED & (AGS_RECALL(play_channel_run_master)->flags)) != 0){ streamer->done_handler = g_signal_connect(G_OBJECT(stream_channel_run), "done", G_CALLBACK(ags_play_channel_run_master_stream_channel_done_callback), play_channel_run_master); } } } if(streamer != NULL){ play_channel_run_master->streamer = g_list_prepend(play_channel_run_master->streamer, streamer); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_channel_run_master_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayChannelRunMaster *play_channel_run_master; play_channel_run_master = AGS_PLAY_CHANNEL_RUN_MASTER(gobject); switch(prop_id){ case PROP_STREAM_CHANNEL_RUN: { g_value_set_pointer(value, g_list_copy(play_channel_run_master->streamer)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_channel_run_master_dispose(GObject *gobject) { AgsPlayChannelRunMaster *play_channel_run_master; play_channel_run_master = AGS_PLAY_CHANNEL_RUN_MASTER(gobject); /* streamer */ if(play_channel_run_master->streamer != NULL){ g_list_free_full(play_channel_run_master->streamer, ags_play_channel_run_master_streamer_free); play_channel_run_master->streamer = NULL; } /* call parent */ G_OBJECT_CLASS(ags_play_channel_run_master_parent_class)->dispose(gobject); } void ags_play_channel_run_master_finalize(GObject *gobject) { AgsPlayChannelRunMaster *play_channel_run_master; play_channel_run_master = AGS_PLAY_CHANNEL_RUN_MASTER(gobject); /* streamer */ if(play_channel_run_master->streamer != NULL){ g_list_free_full(play_channel_run_master->streamer, ags_play_channel_run_master_streamer_free); } /* call parent */ G_OBJECT_CLASS(ags_play_channel_run_master_parent_class)->finalize(gobject); } void ags_play_channel_run_master_connect(AgsConnectable *connectable) { AgsPlayChannel *play_channel; AgsPlayChannelRunMaster *play_channel_run_master; GObject *gobject; if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_play_channel_run_master_parent_connectable_interface->connect(connectable); /* AgsPlayChannelRunMaster */ play_channel_run_master = AGS_PLAY_CHANNEL_RUN_MASTER(connectable); /* AgsPlayChannel */ play_channel = AGS_PLAY_CHANNEL(AGS_RECALL_CHANNEL_RUN(play_channel_run_master)->recall_channel); /* source */ gobject = G_OBJECT(AGS_RECALL_CHANNEL(play_channel)->source); play_channel_run_master->source_recycling_changed_handler = g_signal_connect(gobject, "recycling_changed", G_CALLBACK(ags_play_channel_run_master_source_recycling_changed_callback), play_channel_run_master); } void ags_play_channel_run_master_disconnect(AgsConnectable *connectable) { AgsPlayChannel *play_channel; AgsPlayChannelRunMaster *play_channel_run_master; GObject *gobject; ags_play_channel_run_master_parent_connectable_interface->disconnect(connectable); /* AgsPlayChannelRunMaster */ play_channel_run_master = AGS_PLAY_CHANNEL_RUN_MASTER(connectable); /* AgsPlayChannel */ play_channel = AGS_PLAY_CHANNEL(AGS_RECALL_CHANNEL_RUN(play_channel_run_master)->recall_channel); /* source */ gobject = G_OBJECT(AGS_RECALL_CHANNEL(play_channel)->source); g_signal_handler_disconnect(gobject, play_channel_run_master->source_recycling_changed_handler); } void ags_play_channel_run_master_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsPlayChannelRunMaster *play_channel_run_master; GObject *gobject; AgsPlayChannelRunMasterStreamer *streamer; GList *list; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } ags_play_channel_run_master_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* AgsPlayChannelRunMaster */ play_channel_run_master = AGS_PLAY_CHANNEL_RUN_MASTER(dynamic_connectable); /* stream_channel_run */ list = play_channel_run_master->streamer; while(list != NULL){ streamer = (AgsPlayChannelRunMasterStreamer *) list->data; gobject = G_OBJECT(streamer->stream_channel_run); streamer->done_handler = g_signal_connect(gobject, "done", G_CALLBACK(ags_play_channel_run_master_stream_channel_done_callback), streamer); list = list->next; } } void ags_play_channel_run_master_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsPlayChannelRunMaster *play_channel_run_master; GObject *gobject; AgsPlayChannelRunMasterStreamer *streamer; GList *list; ags_play_channel_run_master_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* AgsPlayChannelRunMaster */ play_channel_run_master = AGS_PLAY_CHANNEL_RUN_MASTER(dynamic_connectable); /* stream_channel_run */ list = play_channel_run_master->streamer; while(list != NULL){ streamer = (AgsPlayChannelRunMasterStreamer *) list->data; gobject = G_OBJECT(streamer->stream_channel_run); g_signal_handler_disconnect(gobject, streamer->done_handler); list = list->next; } } void ags_play_channel_run_master_run_init_pre(AgsRecall *recall) { AgsRecallChannelRun *recall_channel_run; AgsPlayChannelRunMaster *play_channel_run_master; AGS_RECALL_CLASS(ags_play_channel_run_master_parent_class)->run_init_pre(recall); play_channel_run_master = AGS_PLAY_CHANNEL_RUN_MASTER(recall); recall_channel_run = AGS_RECALL_CHANNEL_RUN(recall); ags_play_channel_run_master_remap_dependencies(play_channel_run_master, NULL, NULL, recall_channel_run->source->first_recycling, recall_channel_run->source->last_recycling); } void ags_play_channel_run_master_done(AgsRecall *recall) { AGS_RECALL_CLASS(ags_play_channel_run_master_parent_class)->done(recall); /* empty */ } void ags_play_channel_run_master_cancel(AgsRecall *recall) { AGS_RECALL_CLASS(ags_play_channel_run_master_parent_class)->cancel(recall); //TODO:JK: implement me } void ags_play_channel_run_master_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallID *recall_id; AgsRecallDependency *recall_dependency; AgsStreamChannelRun *stream_channel_run; GList *list; guint i, i_stop; template = AGS_RECALL(ags_recall_find_template(AGS_RECALL_CONTAINER(recall->container)->recall_channel_run)->data); list = template->dependencies; recall_id = recall->recall_id; stream_channel_run = NULL; i_stop = 1; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_STREAM_CHANNEL_RUN(recall_dependency->dependency)){ stream_channel_run = (AgsStreamChannelRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); g_object_set(G_OBJECT(recall), "stream-channel-run", stream_channel_run, NULL); i++; } list = list->next; } } AgsRecall* ags_play_channel_run_master_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPlayChannelRunMaster *copy; copy = (AgsPlayChannelRunMaster *) AGS_RECALL_CLASS(ags_play_channel_run_master_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } void ags_play_channel_run_master_remap_dependencies(AgsPlayChannelRunMaster *play_channel_run_master, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region) { AgsRecallContainer *container; AgsPlayChannelRunMaster *current_master; AgsChannel *current; AgsRecycling *recycling; GList *list, *streamer, *master; /* remove old */ if(old_start_region != NULL){ current = NULL; recycling = old_start_region; while(recycling != old_end_region->next){ if(current != AGS_CHANNEL(recycling->channel)){ current = AGS_CHANNEL(recycling->channel); list = ags_recall_get_dependencies(AGS_RECALL(play_channel_run_master)); while((list = ags_recall_dependency_find_dependency_by_provider(list, G_OBJECT(current))) != NULL){ /* remove dependency */ ags_recall_remove_dependency(AGS_RECALL(play_channel_run_master), AGS_RECALL(AGS_RECALL_DEPENDENCY(list->data)->dependency)); /* remove streamer */ streamer = ags_play_channel_run_master_find_streamer(play_channel_run_master->streamer, AGS_STREAM_CHANNEL_RUN(AGS_RECALL_DEPENDENCY(list->data)->dependency)); if(streamer != NULL){ gpointer ptr; ptr = streamer->data; play_channel_run_master->streamer = g_list_remove(play_channel_run_master->streamer, streamer->data); ags_play_channel_run_master_streamer_free(ptr); } list = list->next; } } recycling = recycling->next; } } /* add new */ if(new_start_region != NULL){ current = NULL; recycling = new_start_region; while(recycling != new_end_region->next){ if(current != AGS_CHANNEL(recycling->channel)){ current = AGS_CHANNEL(recycling->channel); list = ags_recall_template_find_type(current->play, AGS_TYPE_STREAM_CHANNEL_RUN); if(list != NULL){ g_object_set(G_OBJECT(play_channel_run_master), "stream-channel-run", AGS_STREAM_CHANNEL_RUN(list->data), NULL); container = AGS_RECALL_CONTAINER(AGS_RECALL(play_channel_run_master)->container); master = container->recall_channel_run; while(master != NULL){ current_master = AGS_PLAY_CHANNEL_RUN_MASTER(master->data); if((AGS_RECALL_TEMPLATE & (AGS_RECALL(current_master)->flags)) == 0){ g_object_set(G_OBJECT(current_master), "stream-channel-run", AGS_STREAM_CHANNEL_RUN(list->data), NULL); } master = master->next; } } } recycling = recycling->next; } } } void ags_play_channel_run_master_source_recycling_changed_callback(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region, AgsPlayChannelRunMaster *play_channel_run_master) { if((AGS_RECALL_TEMPLATE & (play_channel_run_master->flags)) != 0){ ags_play_channel_run_master_remap_dependencies(play_channel_run_master, old_start_changed_region, old_end_changed_region, new_start_changed_region, new_end_changed_region); } } void ags_play_channel_run_master_stream_channel_done_callback(AgsRecall *recall, AgsPlayChannelRunMasterStreamer *streamer) { AgsPlayChannelRunMaster *play_channel_run_master; play_channel_run_master = streamer->play_channel_run_master; play_channel_run_master->streamer = g_list_remove(play_channel_run_master->streamer, streamer); ags_play_channel_run_master_streamer_free(streamer); if(play_channel_run_master->streamer == NULL){ // play_channel_run_master->flags |= AGS_PLAY_CHANNEL_RUN_MASTER_TERMINATING; } } void ags_play_channel_run_master_streamer_free(AgsPlayChannelRunMasterStreamer *streamer) { if(streamer == NULL){ return; } g_object_unref(streamer->play_channel_run_master); g_object_unref(streamer->stream_channel_run); free(streamer); } AgsPlayChannelRunMasterStreamer* ags_play_channel_run_master_streamer_alloc(AgsPlayChannelRunMaster *play_channel_run_master, AgsStreamChannelRun *stream_channel_run) { AgsPlayChannelRunMasterStreamer *streamer; if(play_channel_run_master == NULL || stream_channel_run == NULL){ return(NULL); } streamer = (AgsPlayChannelRunMasterStreamer *) malloc(sizeof(AgsPlayChannelRunMasterStreamer)); streamer->play_channel_run_master = play_channel_run_master; g_object_ref(play_channel_run_master); streamer->stream_channel_run = stream_channel_run; g_object_ref(stream_channel_run); return(streamer); } GList* ags_play_channel_run_master_find_streamer(GList *list, AgsStreamChannelRun *stream_channel_run) { while(list != NULL){ if(AGS_PLAY_CHANNEL_RUN_MASTER_STREAMER(list->data)->stream_channel_run == stream_channel_run) return(list); list = list->next; } return(NULL); } /** * ags_play_channel_master_run_new: * * Creates an #AgsPlayChannelRunMaster * * Returns: a new #AgsPlayChannelRunMaster * * Since: 1.0.0 */ AgsPlayChannelRunMaster* ags_play_channel_run_master_new() { AgsPlayChannelRunMaster *play_channel_run_master; play_channel_run_master = (AgsPlayChannelRunMaster *) g_object_new(AGS_TYPE_PLAY_CHANNEL_RUN_MASTER, NULL); return(play_channel_run_master); } gsequencer-1.4.24/ags/audio/recall/ags_peak_channel_run.h0000644000175000017500000000404313246707333020311 00000000000000/* 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 . */ #ifndef __AGS_PEAK_CHANNEL_RUN_H__ #define __AGS_PEAK_CHANNEL_RUN_H__ #include #include #include #include #define AGS_TYPE_PEAK_CHANNEL_RUN (ags_peak_channel_run_get_type()) #define AGS_PEAK_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_PEAK_CHANNEL_RUN, AgsPeakChannelRun)) #define AGS_PEAK_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_INSTANCE_CAST(class, AGS_TYPE_PEAK_CHANNEL_RUN, AgsPeakChannelRunClass)) #define AGS_IS_PEAK_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PEAK_CHANNEL_RUN)) #define AGS_IS_PEAK_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PEAK_CHANNEL_RUN)) #define AGS_PEAK_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PEAK_CHANNEL_RUN, AgsPeakChannelRunClass)) typedef struct _AgsPeakChannelRun AgsPeakChannelRun; typedef struct _AgsPeakChannelRunClass AgsPeakChannelRunClass; struct _AgsPeakChannelRun { AgsRecallChannelRun recall_channel_run; }; struct _AgsPeakChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_peak_channel_run_get_type(); AgsPeakChannelRun* ags_peak_channel_run_new(AgsChannel *channel); #endif /*__AGS_PEAK_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_route_dssi_audio.h0000644000175000017500000000402313246707333020354 00000000000000/* 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 . */ #ifndef __AGS_ROUTE_DSSI_AUDIO_H__ #define __AGS_ROUTE_DSSI_AUDIO_H__ #include #include #include #define AGS_TYPE_ROUTE_DSSI_AUDIO (ags_route_dssi_audio_get_type()) #define AGS_ROUTE_DSSI_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ROUTE_DSSI_AUDIO, AgsRouteDssiAudio)) #define AGS_ROUTE_DSSI_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ROUTE_DSSI_AUDIO, AgsRouteDssiAudio)) #define AGS_IS_ROUTE_DSSI_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ROUTE_DSSI_AUDIO)) #define AGS_IS_ROUTE_DSSI_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ROUTE_DSSI_AUDIO)) #define AGS_ROUTE_DSSI_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_ROUTE_DSSI_AUDIO, AgsRouteDssiAudioClass)) typedef struct _AgsRouteDssiAudio AgsRouteDssiAudio; typedef struct _AgsRouteDssiAudioClass AgsRouteDssiAudioClass; struct _AgsRouteDssiAudio { AgsRecallAudio recall_audio; AgsPort *notation_input; AgsPort *sequencer_input; }; struct _AgsRouteDssiAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_route_dssi_audio_get_type(); AgsRouteDssiAudio* ags_route_dssi_audio_new(); #endif /*__AGS_ROUTE_DSSI_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_envelope_channel.c0000644000175000017500000005246713246707333020332 00000000000000/* 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 . */ #include #include #include #include void ags_envelope_channel_class_init(AgsEnvelopeChannelClass *envelope_channel); void ags_envelope_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_envelope_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_envelope_channel_init(AgsEnvelopeChannel *envelope_channel); void ags_envelope_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_envelope_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_envelope_channel_connect(AgsConnectable *connectable); void ags_envelope_channel_disconnect(AgsConnectable *connectable); void ags_envelope_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_envelope_channel_dispose(GObject *gobject); void ags_envelope_channel_finalize(GObject *gobject); /** * SECTION:ags_envelope_channel * @short_description: envelopes channel * @title: AgsEnvelopeChannel * @section_id: * @include: ags/audio/recall/ags_envelope_channel.h * * The #AgsEnvelopeChannel class provides ports to the effect processor. */ enum{ PROP_0, PROP_USE_NOTE_LENGTH, PROP_USE_FIXED_LENGTH, PROP_FIXED_LENGTH, PROP_ATTACK, PROP_DECAY, PROP_SUSTAIN, PROP_RELEASE, PROP_RATIO, }; static gpointer ags_envelope_channel_parent_class = NULL; static AgsConnectableInterface *ags_envelope_channel_parent_connectable_interface; GType ags_envelope_channel_get_type() { static GType ags_type_envelope_channel = 0; if(!ags_type_envelope_channel){ static const GTypeInfo ags_envelope_channel_info = { sizeof (AgsEnvelopeChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_envelope_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsEnvelopeChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_envelope_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_envelope_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_envelope_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsEnvelopeChannel", &ags_envelope_channel_info, 0); g_type_add_interface_static(ags_type_envelope_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_envelope_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_envelope_channel); } void ags_envelope_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_envelope_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_envelope_channel_connect; connectable->disconnect = ags_envelope_channel_disconnect; } void ags_envelope_channel_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_envelope_channel_set_ports; } void ags_envelope_channel_class_init(AgsEnvelopeChannelClass *envelope_channel) { GObjectClass *gobject; GParamSpec *param_spec; ags_envelope_channel_parent_class = g_type_class_peek_parent(envelope_channel); /* GObjectClass */ gobject = (GObjectClass *) envelope_channel; gobject->set_property = ags_envelope_channel_set_property; gobject->get_property = ags_envelope_channel_get_property; gobject->dispose = ags_envelope_channel_dispose; gobject->finalize = ags_envelope_channel_finalize; /* properties */ /** * AgsEnvelopeChannel:use-note-length: * * Use note length to compute envelope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("use-note-length", i18n_pspec("use note length"), i18n_pspec("Use note length to compute envelope"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_USE_NOTE_LENGTH, param_spec); /** * AgsEnvelopeChannel:use-fixed-length: * * Use fixed length to compute envelope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("use-fixed-length", i18n_pspec("use fixed length"), i18n_pspec("Use fixed length to compute envelope"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_USE_FIXED_LENGTH, param_spec); /** * AgsEnvelopeChannel:fixed-length: * * The fixed length to compute envelope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("fixed-length", i18n_pspec("fixed length"), i18n_pspec("The fixed length to compute envelope"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIXED_LENGTH, param_spec); /** * AgsEnvelopeChannel:attack: * * The attack of envelope. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("attack", i18n_pspec("attack channel"), i18n_pspec("Attack of the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsEnvelopeChannel:decay: * * The decay of envelope. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("decay", i18n_pspec("decay channel"), i18n_pspec("Decay of the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DECAY, param_spec); /** * AgsEnvelopeChannel:sustain: * * The sustain of envelope. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("sustain", i18n_pspec("sustain channel"), i18n_pspec("Sustain of the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SUSTAIN, param_spec); /** * AgsEnvelopeChannel:release: * * The release of envelope. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("release", i18n_pspec("release channel"), i18n_pspec("Release of the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RELEASE, param_spec); /** * AgsEnvelopeChannel:ratio: * * The ratio of envelope. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("ratio", i18n_pspec("envelope ratio"), i18n_pspec("The ratio of the envelope"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RATIO, param_spec); } void ags_envelope_channel_init(AgsEnvelopeChannel *envelope_channel) { GList *port; AGS_RECALL(envelope_channel)->name = "ags-envelope"; AGS_RECALL(envelope_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(envelope_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(envelope_channel)->xml_type = "ags-envelope-channel"; /* ports */ port = NULL; /* use note length */ envelope_channel->use_note_length = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-envelope", "specifier", "./use-note-length[0]", "control-port", "1/8", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(envelope_channel->use_note_length); envelope_channel->use_note_length->port_value.ags_port_boolean = FALSE; /* use fixed length */ envelope_channel->use_fixed_length = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-envelope", "specifier", "./use-fixed-length[0]", "control-port", "2/8", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(envelope_channel->use_fixed_length); envelope_channel->use_fixed_length->port_value.ags_port_boolean = FALSE; /* fixed length */ envelope_channel->fixed_length = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-envelope", "specifier", "./fixed-length[0]", "control-port", "3/8", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(envelope_channel->fixed_length); envelope_channel->fixed_length->port_value.ags_port_double = 0.0; /* attack */ envelope_channel->attack = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-envelope", "specifier", "./attack[0]", "control-port", "4/8", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(envelope_channel->attack); envelope_channel->attack->port_value.ags_port_double = 1.0; /* add to port */ port = g_list_prepend(port, envelope_channel->attack); g_object_ref(envelope_channel->attack); /* decay */ envelope_channel->decay = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-envelope", "specifier", "./decay[0]", "control-port", "5/8", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(envelope_channel->decay); envelope_channel->decay->port_value.ags_port_double = 1.0; /* add to port */ port = g_list_prepend(port, envelope_channel->decay); g_object_ref(envelope_channel->decay); /* sustain */ envelope_channel->sustain = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-envelope", "specifier", "./sustain[0]", "control-port", "6/8", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(envelope_channel->sustain); envelope_channel->sustain->port_value.ags_port_double = 1.0; /* add to port */ port = g_list_prepend(port, envelope_channel->sustain); g_object_ref(envelope_channel->sustain); /* release */ envelope_channel->release = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-envelope", "specifier", "./release[0]", "control-port", "7/8", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(envelope_channel->release); envelope_channel->release->port_value.ags_port_boolean = 1.0; /* add to port */ port = g_list_prepend(port, envelope_channel->release); g_object_ref(envelope_channel->release); /* ratio */ envelope_channel->ratio = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-envelope", "specifier", "./ratio[0]", "control-port", "8/8", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(envelope_channel->ratio); envelope_channel->ratio->port_value.ags_port_boolean = 1.0; /* add to port */ port = g_list_prepend(port, envelope_channel->ratio); g_object_ref(envelope_channel->ratio); /* set ports */ AGS_RECALL(envelope_channel)->port = port; } void ags_envelope_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsEnvelopeChannel *envelope_channel; envelope_channel = AGS_ENVELOPE_CHANNEL(gobject); switch(prop_id){ case PROP_USE_NOTE_LENGTH: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == envelope_channel->use_note_length){ return; } if(envelope_channel->use_note_length != NULL){ g_object_unref(G_OBJECT(envelope_channel->use_note_length)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } envelope_channel->use_note_length = port; } break; case PROP_USE_FIXED_LENGTH: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == envelope_channel->use_fixed_length){ return; } if(envelope_channel->use_fixed_length != NULL){ g_object_unref(G_OBJECT(envelope_channel->use_fixed_length)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } envelope_channel->use_fixed_length = port; } break; case PROP_FIXED_LENGTH: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == envelope_channel->fixed_length){ return; } if(envelope_channel->fixed_length != NULL){ g_object_unref(G_OBJECT(envelope_channel->fixed_length)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } envelope_channel->fixed_length = port; } break; case PROP_ATTACK: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == envelope_channel->attack){ return; } if(envelope_channel->attack != NULL){ g_object_unref(G_OBJECT(envelope_channel->attack)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } envelope_channel->attack = port; } break; case PROP_DECAY: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == envelope_channel->decay){ return; } if(envelope_channel->decay != NULL){ g_object_unref(G_OBJECT(envelope_channel->decay)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } envelope_channel->decay = port; } break; case PROP_SUSTAIN: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == envelope_channel->sustain){ return; } if(envelope_channel->sustain != NULL){ g_object_unref(G_OBJECT(envelope_channel->sustain)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } envelope_channel->sustain = port; } break; case PROP_RELEASE: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == envelope_channel->release){ return; } if(envelope_channel->release != NULL){ g_object_unref(G_OBJECT(envelope_channel->release)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } envelope_channel->release = port; } break; case PROP_RATIO: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == envelope_channel->ratio){ return; } if(envelope_channel->ratio != NULL){ g_object_unref(G_OBJECT(envelope_channel->ratio)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } envelope_channel->ratio = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_envelope_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsEnvelopeChannel *envelope_channel; envelope_channel = AGS_ENVELOPE_CHANNEL(gobject); switch(prop_id){ case PROP_USE_NOTE_LENGTH: { g_value_set_object(value, envelope_channel->use_note_length); } break; case PROP_USE_FIXED_LENGTH: { g_value_set_object(value, envelope_channel->use_fixed_length); } break; case PROP_FIXED_LENGTH: { g_value_set_object(value, envelope_channel->fixed_length); } break; case PROP_ATTACK: { g_value_set_object(value, envelope_channel->attack); } break; case PROP_DECAY: { g_value_set_object(value, envelope_channel->decay); } break; case PROP_SUSTAIN: { g_value_set_object(value, envelope_channel->sustain); } break; case PROP_RELEASE: { g_value_set_object(value, envelope_channel->release); } break; case PROP_RATIO: { g_value_set_object(value, envelope_channel->ratio); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_envelope_channel_connect(AgsConnectable *connectable) { ags_envelope_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_envelope_channel_disconnect(AgsConnectable *connectable) { ags_envelope_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_envelope_channel_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "attack[0]", 9)){ g_object_set(G_OBJECT(plugin), "attack", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "decay[0]", 9)){ g_object_set(G_OBJECT(plugin), "decay", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "sustain[0]", 9)){ g_object_set(G_OBJECT(plugin), "sustain", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "release[0]", 9)){ g_object_set(G_OBJECT(plugin), "release", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "ratio[0]", 9)){ g_object_set(G_OBJECT(plugin), "ratio", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_envelope_channel_dispose(GObject *gobject) { AgsEnvelopeChannel *envelope_channel; envelope_channel = AGS_ENVELOPE_CHANNEL(gobject); if(envelope_channel->use_note_length != NULL){ g_object_unref(G_OBJECT(envelope_channel->use_note_length)); envelope_channel->use_note_length = NULL; } if(envelope_channel->use_fixed_length != NULL){ g_object_unref(G_OBJECT(envelope_channel->use_fixed_length)); envelope_channel->use_fixed_length = NULL; } if(envelope_channel->fixed_length != NULL){ g_object_unref(G_OBJECT(envelope_channel->fixed_length)); envelope_channel->fixed_length = NULL; } if(envelope_channel->attack != NULL){ g_object_unref(G_OBJECT(envelope_channel->attack)); envelope_channel->attack = NULL; } if(envelope_channel->decay != NULL){ g_object_unref(G_OBJECT(envelope_channel->decay)); envelope_channel->decay = NULL; } if(envelope_channel->sustain != NULL){ g_object_unref(G_OBJECT(envelope_channel->sustain)); envelope_channel->sustain = NULL; } if(envelope_channel->release != NULL){ g_object_unref(G_OBJECT(envelope_channel->release)); envelope_channel->release = NULL; } if(envelope_channel->ratio != NULL){ g_object_unref(G_OBJECT(envelope_channel->ratio)); envelope_channel->ratio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_envelope_channel_parent_class)->dispose(gobject); } void ags_envelope_channel_finalize(GObject *gobject) { AgsEnvelopeChannel *envelope_channel; envelope_channel = AGS_ENVELOPE_CHANNEL(gobject); if(envelope_channel->use_note_length != NULL){ g_object_unref(G_OBJECT(envelope_channel->use_note_length)); } if(envelope_channel->use_fixed_length != NULL){ g_object_unref(G_OBJECT(envelope_channel->use_fixed_length)); } if(envelope_channel->fixed_length != NULL){ g_object_unref(G_OBJECT(envelope_channel->fixed_length)); } if(envelope_channel->attack != NULL){ g_object_unref(G_OBJECT(envelope_channel->attack)); } if(envelope_channel->decay != NULL){ g_object_unref(G_OBJECT(envelope_channel->decay)); } if(envelope_channel->sustain != NULL){ g_object_unref(G_OBJECT(envelope_channel->sustain)); } if(envelope_channel->release != NULL){ g_object_unref(G_OBJECT(envelope_channel->release)); } if(envelope_channel->ratio != NULL){ g_object_unref(G_OBJECT(envelope_channel->ratio)); } /* call parent */ G_OBJECT_CLASS(ags_envelope_channel_parent_class)->finalize(gobject); } /** * ags_envelope_channel_new: * * Creates an #AgsEnvelopeChannel * * Returns: a new #AgsEnvelopeChannel * * Since: 0.6 */ AgsEnvelopeChannel* ags_envelope_channel_new() { AgsEnvelopeChannel *envelope_channel; envelope_channel = (AgsEnvelopeChannel *) g_object_new(AGS_TYPE_ENVELOPE_CHANNEL, NULL); return(envelope_channel); } gsequencer-1.4.24/ags/audio/recall/ags_rt_stream_channel.h0000644000175000017500000000400513247044247020502 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_RT_STREAM_CHANNEL_H__ #define __AGS_RT_STREAM_CHANNEL_H__ #include #include #include #define AGS_TYPE_RT_STREAM_CHANNEL (ags_rt_stream_channel_get_type()) #define AGS_RT_STREAM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RT_STREAM_CHANNEL, AgsRtStreamChannel)) #define AGS_RT_STREAM_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RT_STREAM_CHANNEL, AgsRtStreamChannelClass)) #define AGS_IS_RT_STREAM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RT_STREAM_CHANNEL)) #define AGS_IS_RT_STREAM_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RT_STREAM_CHANNEL)) #define AGS_RT_STREAM_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RT_STREAM_CHANNEL, AgsRtStreamChannelClass)) typedef struct _AgsRtStreamChannel AgsRtStreamChannel; typedef struct _AgsRtStreamChannelClass AgsRtStreamChannelClass; struct _AgsRtStreamChannel { AgsRecallChannel recall_channel; }; struct _AgsRtStreamChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_rt_stream_channel_get_type(); AgsRtStreamChannel* ags_rt_stream_channel_new(); #endif /*__AGS_RT_STREAM_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_mute_audio_signal.h0000644000175000017500000000417613246707333020514 00000000000000/* 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 . */ #ifndef __AGS_MUTE_AUDIO_SIGNAL_H__ #define __AGS_MUTE_AUDIO_SIGNAL_H__ #include #include #include #include #include #define AGS_TYPE_MUTE_AUDIO_SIGNAL (ags_mute_audio_signal_get_type()) #define AGS_MUTE_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTE_AUDIO_SIGNAL, AgsMuteAudioSignal)) #define AGS_MUTE_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MUTE_AUDIO_SIGNAL, AgsMuteAudioSignalClass)) #define AGS_IS_MUTE_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MUTE_AUDIO_SIGNAL)) #define AGS_IS_MUTE_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MUTE_AUDIO_SIGNAL)) #define AGS_MUTE_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_MUTE_AUDIO_SIGNAL, AgsMuteAudioSignalClass)) typedef struct _AgsMuteAudioSignal AgsMuteAudioSignal; typedef struct _AgsMuteAudioSignalClass AgsMuteAudioSignalClass; struct _AgsMuteAudioSignal { AgsRecallAudioSignal recall_audio_signal; }; struct _AgsMuteAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_mute_audio_signal_get_type(); AgsMuteAudioSignal* ags_mute_audio_signal_new(AgsAudioSignal *source); #endif /*__AGS_MUTE_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_stream_audio_signal.h0000644000175000017500000000421213246707333021024 00000000000000/* 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 . */ #ifndef __AGS_STREAM_AUDIO_SIGNAL_H__ #define __AGS_STREAM_AUDIO_SIGNAL_H__ #include #include #include #define AGS_TYPE_STREAM_AUDIO_SIGNAL (ags_stream_audio_signal_get_type()) #define AGS_STREAM_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_STREAM_AUDIO_SIGNAL, AgsStreamAudioSignal)) #define AGS_STREAM_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_STREAM_AUDIO_SIGNAL, AgsStreamAudioSignalClass)) #define AGS_IS_STREAM_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_STREAM_AUDIO_SIGNAL)) #define AGS_IS_STREAM_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_STREAM_AUDIO_SIGNAL)) #define AGS_STREAM_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_STREAM_AUDIO_SIGNAL, AgsStreamAudioSignalClass)) typedef struct _AgsStreamAudioSignal AgsStreamAudioSignal; typedef struct _AgsStreamAudioSignalClass AgsStreamAudioSignalClass; struct _AgsStreamAudioSignal { AgsRecallAudioSignal recall_audio_signal; GObject *dispose_source; }; struct _AgsStreamAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_stream_audio_signal_get_type(); AgsStreamAudioSignal* ags_stream_audio_signal_new(AgsAudioSignal *audio_signal); #endif /*__AGS_STREAM_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_prepare_channel.h0000644000175000017500000000376713246707333020157 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PREPARE_CHANNEL_H__ #define __AGS_PREPARE_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_PREPARE_CHANNEL (ags_prepare_channel_get_type()) #define AGS_PREPARE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PREPARE_CHANNEL, AgsPrepareChannel)) #define AGS_PREPARE_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PREPARE_CHANNEL, AgsPrepareChannel)) #define AGS_IS_PREPARE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PREPARE_CHANNEL)) #define AGS_IS_PREPARE_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PREPARE_CHANNEL)) #define AGS_PREPARE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PREPARE_CHANNEL, AgsPrepareChannelClass)) typedef struct _AgsPrepareChannel AgsPrepareChannel; typedef struct _AgsPrepareChannelClass AgsPrepareChannelClass; struct _AgsPrepareChannel { AgsRecallChannel recall_channel; }; struct _AgsPrepareChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_prepare_channel_get_type(); AgsPrepareChannel* ags_prepare_channel_new(); #endif /*__AGS_PREPARE_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_stream_audio_signal.c0000644000175000017500000002661513247044247021031 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_stream_audio_signal_class_init(AgsStreamAudioSignalClass *stream_audio_signal); void ags_stream_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_stream_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_stream_audio_signal_init(AgsStreamAudioSignal *stream_audio_signal); void ags_stream_audio_signal_connect(AgsConnectable *connectable); void ags_stream_audio_signal_disconnect(AgsConnectable *connectable); void ags_stream_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_stream_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_stream_audio_signal_dispose(GObject *gobject); void ags_stream_audio_signal_finalize(GObject *gobject); void ags_stream_audio_signal_run_init_pre(AgsRecall *recall); void ags_stream_audio_signal_run_post(AgsRecall *recall); AgsRecall* ags_stream_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_stream_audio_signal * @short_description: streams audio signal * @title: AgsStreamAudioSignal * @section_id: * @include: ags/audio/recall/ags_stream_audio_signal.h * * The #AgsStreamAudioSignal class streams the audio signal. */ static gpointer ags_stream_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_stream_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_stream_audio_signal_parent_dynamic_connectable_interface; GType ags_stream_audio_signal_get_type() { static GType ags_type_stream_audio_signal = 0; if(!ags_type_stream_audio_signal){ static const GTypeInfo ags_stream_audio_signal_info = { sizeof (AgsStreamAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_stream_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsStreamAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_stream_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_stream_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_stream_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_stream_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsStreamAudioSignal", &ags_stream_audio_signal_info, 0); g_type_add_interface_static(ags_type_stream_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_stream_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_stream_audio_signal); } void ags_stream_audio_signal_class_init(AgsStreamAudioSignalClass *stream_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_stream_audio_signal_parent_class = g_type_class_peek_parent(stream_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) stream_audio_signal; gobject->dispose = ags_stream_audio_signal_dispose; gobject->finalize = ags_stream_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) stream_audio_signal; recall->run_init_pre = ags_stream_audio_signal_run_init_pre; recall->run_post = ags_stream_audio_signal_run_post; recall->duplicate = ags_stream_audio_signal_duplicate; } void ags_stream_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_stream_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_stream_audio_signal_connect; connectable->disconnect = ags_stream_audio_signal_disconnect; } void ags_stream_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_stream_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_stream_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_stream_audio_signal_disconnect_dynamic; } void ags_stream_audio_signal_init(AgsStreamAudioSignal *stream_audio_signal) { AGS_RECALL(stream_audio_signal)->name = "ags-stream"; AGS_RECALL(stream_audio_signal)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(stream_audio_signal)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(stream_audio_signal)->xml_type = "ags-stream-audio-signal"; AGS_RECALL(stream_audio_signal)->port = NULL; AGS_RECALL(stream_audio_signal)->child_type = G_TYPE_NONE; stream_audio_signal->dispose_source = NULL; } void ags_stream_audio_signal_dispose(GObject *gobject) { AGS_STREAM_AUDIO_SIGNAL(gobject)->dispose_source = AGS_RECALL_AUDIO_SIGNAL(gobject)->source; /* call parent */ G_OBJECT_CLASS(ags_stream_audio_signal_parent_class)->dispose(gobject); } void ags_stream_audio_signal_finalize(GObject *gobject) { AgsAudioSignal *audio_signal; audio_signal = AGS_STREAM_AUDIO_SIGNAL(gobject)->dispose_source; if(audio_signal != NULL){ AgsRecycling *recycling; recycling = audio_signal->recycling; if(recycling != NULL){ ags_recycling_remove_audio_signal(recycling, audio_signal); } g_object_run_dispose(audio_signal); g_object_unref(audio_signal); } /* call parent */ G_OBJECT_CLASS(ags_stream_audio_signal_parent_class)->finalize(gobject); } void ags_stream_audio_signal_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_stream_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_stream_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_stream_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_stream_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_stream_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_stream_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_stream_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_stream_audio_signal_run_init_pre(AgsRecall *recall) { /* call parent */ AGS_RECALL_CLASS(ags_stream_audio_signal_parent_class)->run_init_pre(recall); // g_message("stream"); } void ags_stream_audio_signal_run_post(AgsRecall *recall) { AgsStreamChannel *stream_channel; AgsStreamChannelRun *stream_channel_run; AgsApplicationContext *application_context; if(recall->parent != NULL && recall->parent->parent != NULL){ stream_channel_run = (AgsStreamChannelRun *) recall->parent->parent; stream_channel = (AgsStreamChannel *) AGS_RECALL_CHANNEL_RUN(stream_channel_run)->recall_channel; }else{ stream_channel_run = NULL; stream_channel = NULL; } if(AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current != NULL){ if(stream_channel != NULL && AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current->next == NULL){ GValue value = {0,}; g_value_init(&value, G_TYPE_BOOLEAN); ags_port_safe_read(stream_channel->auto_sense, &value); if(g_value_get_boolean(&value)){ void *buffer; guint buffer_size; guint i; gboolean add_stream; buffer = AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current->data; buffer_size = AGS_RECALL_AUDIO_SIGNAL(recall)->source->buffer_size; add_stream = FALSE; for(i = buffer_size - 1; i > buffer_size / 2 && !add_stream; i--){ switch(AGS_RECALL_AUDIO_SIGNAL(recall)->source->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { if(((signed char *) buffer)[i] != 0){ add_stream = TRUE; } } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { if(((signed short *) buffer)[i] != 0){ add_stream = TRUE; } } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { if(((signed long *) buffer)[i] != 0){ add_stream = TRUE; } } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { if(((signed long *) buffer)[i] != 0){ add_stream = TRUE; } } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { if(((signed long long *) buffer)[i] != 0){ add_stream = TRUE; } } break; default: g_critical("unsupported soundcard format"); } } if(add_stream){ ags_audio_signal_add_stream(AGS_RECALL_AUDIO_SIGNAL(recall)->source); } } g_value_unset(&value); } //g_message("stream %x %x", AGS_RECALL_AUDIO_SIGNAL(recall)->source, AGS_RECALL_ID(AGS_RECALL_AUDIO_SIGNAL(recall)->source->recall_id)->recycling_container); AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current = AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current->next; /* call parent */ AGS_RECALL_CLASS(ags_stream_audio_signal_parent_class)->run_post(recall); }else{ /* call parent */ AGS_RECALL_CLASS(ags_stream_audio_signal_parent_class)->run_post(recall); ags_recall_done(recall); } } AgsRecall* ags_stream_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsStreamAudioSignal *copy; copy = (AgsStreamAudioSignal *) AGS_RECALL_CLASS(ags_stream_audio_signal_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_stream_audio_signal_new: * @audio_signal: an #AgsAudioSignal * * Creates an #AgsStreamAudioSignal * * Returns: a new #AgsStreamAudioSignal * * Since: 1.0.0 */ AgsStreamAudioSignal* ags_stream_audio_signal_new(AgsAudioSignal *audio_signal) { AgsStreamAudioSignal *stream_audio_signal; stream_audio_signal = (AgsStreamAudioSignal *) g_object_new(AGS_TYPE_STREAM_AUDIO_SIGNAL, "source", audio_signal, NULL); return(stream_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_route_dssi_audio_run.c0000644000175000017500000010621313247044247021236 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_route_dssi_audio_run_class_init(AgsRouteDssiAudioRunClass *route_dssi_audio_run); void ags_route_dssi_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_route_dssi_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_route_dssi_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_route_dssi_audio_run_init(AgsRouteDssiAudioRun *route_dssi_audio_run); void ags_route_dssi_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_route_dssi_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_route_dssi_audio_run_dispose(GObject *gobject); void ags_route_dssi_audio_run_finalize(GObject *gobject); void ags_route_dssi_audio_run_connect(AgsConnectable *connectable); void ags_route_dssi_audio_run_disconnect(AgsConnectable *connectable); void ags_route_dssi_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_route_dssi_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_route_dssi_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_route_dssi_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_route_dssi_audio_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_route_dssi_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_route_dssi_audio_run_run_post(AgsRecall *recall); void ags_route_dssi_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsRouteDssiAudioRun *route_dssi_audio_run); void ags_route_dssi_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_route_dssi_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_route_dssi_audio_run_feed_midi(AgsRecall *recall, AgsNote *note); /** * SECTION:ags_route_dssi_audio_run * @short_description: route MIDI * @title: AgsRouteDssiAudioRun * @section_id: * @include: ags/audio/recall/ags_route_dssi_audio_run.h * * The #AgsRouteDssiAudioRun routes MIDI to DSSI recall. */ enum{ PROP_0, PROP_DELAY_AUDIO_RUN, PROP_COUNT_BEATS_AUDIO_RUN, }; static gpointer ags_route_dssi_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_route_dssi_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_route_dssi_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_route_dssi_audio_run_parent_plugin_interface; GType ags_route_dssi_audio_run_get_type() { static GType ags_type_route_dssi_audio_run = 0; if(!ags_type_route_dssi_audio_run){ static const GTypeInfo ags_route_dssi_audio_run_info = { sizeof (AgsRouteDssiAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_route_dssi_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRouteDssiAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_route_dssi_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_route_dssi_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_route_dssi_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_route_dssi_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_route_dssi_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsRouteDssiAudioRun", &ags_route_dssi_audio_run_info, 0); g_type_add_interface_static(ags_type_route_dssi_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_route_dssi_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_route_dssi_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_route_dssi_audio_run); } void ags_route_dssi_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_route_dssi_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_route_dssi_audio_run_connect; connectable->disconnect = ags_route_dssi_audio_run_disconnect; } void ags_route_dssi_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_route_dssi_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_route_dssi_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_route_dssi_audio_run_disconnect_dynamic; } void ags_route_dssi_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_route_dssi_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_route_dssi_audio_run_read; plugin->write = ags_route_dssi_audio_run_write; } void ags_route_dssi_audio_run_class_init(AgsRouteDssiAudioRunClass *route_dssi_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_route_dssi_audio_run_parent_class = g_type_class_peek_parent(route_dssi_audio_run); /* GObjectClass */ gobject = (GObjectClass *) route_dssi_audio_run; gobject->set_property = ags_route_dssi_audio_run_set_property; gobject->get_property = ags_route_dssi_audio_run_get_property; gobject->dispose = ags_route_dssi_audio_run_dispose; gobject->finalize = ags_route_dssi_audio_run_finalize; /* properties */ /** * AgsRouteDssiAudioRun:delay-audio-run: * * The delay audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("delay-audio-run", i18n_pspec("assigned AgsDelayAudioRun"), i18n_pspec("the AgsDelayAudioRun which emits notation_alloc_input signal"), AGS_TYPE_DELAY_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_AUDIO_RUN, param_spec); /** * AgsRouteDssiAudioRun:count-beats-audio-run: * * The count beats audio run dependency. * * Since: 1.0.0 */ param_spec = g_param_spec_object("count-beats-audio-run", i18n_pspec("assigned AgsCountBeatsAudioRun"), i18n_pspec("the AgsCountBeatsAudioRun which just counts"), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT_BEATS_AUDIO_RUN, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) route_dssi_audio_run; recall->resolve_dependencies = ags_route_dssi_audio_run_resolve_dependencies; recall->duplicate = ags_route_dssi_audio_run_duplicate; recall->run_post = ags_route_dssi_audio_run_run_post; } void ags_route_dssi_audio_run_init(AgsRouteDssiAudioRun *route_dssi_audio_run) { AGS_RECALL(route_dssi_audio_run)->name = "ags-route-dssi"; AGS_RECALL(route_dssi_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(route_dssi_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(route_dssi_audio_run)->xml_type = "ags-route-dssi-audio-run"; AGS_RECALL(route_dssi_audio_run)->port = NULL; route_dssi_audio_run->delay_audio_run = NULL; route_dssi_audio_run->count_beats_audio_run = NULL; route_dssi_audio_run->notation = NULL; route_dssi_audio_run->timestamp = ags_timestamp_new(); route_dssi_audio_run->timestamp->flags &= (~AGS_TIMESTAMP_UNIX); route_dssi_audio_run->timestamp->flags |= AGS_TIMESTAMP_OFFSET; route_dssi_audio_run->timestamp->timer.ags_offset.offset = 0; route_dssi_audio_run->sequencer = NULL; route_dssi_audio_run->feed_midi = NULL; } void ags_route_dssi_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRouteDssiAudioRun *route_dssi_audio_run; route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { AgsDelayAudioRun *delay_audio_run; gboolean is_template; delay_audio_run = g_value_get_object(value); if(delay_audio_run == route_dssi_audio_run->delay_audio_run){ return; } if(delay_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(delay_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(route_dssi_audio_run->delay_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(route_dssi_audio_run), (AgsRecall *) route_dssi_audio_run->delay_audio_run); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(route_dssi_audio_run)->flags)) != 0){ g_signal_handler_disconnect(G_OBJECT(route_dssi_audio_run), route_dssi_audio_run->notation_alloc_input_handler); } } g_object_unref(G_OBJECT(route_dssi_audio_run->delay_audio_run)); } if(delay_audio_run != NULL){ g_object_ref(delay_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(route_dssi_audio_run), ags_recall_dependency_new((GObject *) delay_audio_run)); }else{ if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(route_dssi_audio_run)->flags)) != 0){ route_dssi_audio_run->notation_alloc_input_handler = g_signal_connect(G_OBJECT(delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_route_dssi_audio_run_alloc_input_callback), route_dssi_audio_run); } } } route_dssi_audio_run->delay_audio_run = delay_audio_run; } break; case PROP_COUNT_BEATS_AUDIO_RUN: { AgsCountBeatsAudioRun *count_beats_audio_run; gboolean is_template; count_beats_audio_run = g_value_get_object(value); if(count_beats_audio_run == route_dssi_audio_run->count_beats_audio_run){ return; } if((AGS_RECALL_TEMPLATE & (AGS_RECALL(route_dssi_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(route_dssi_audio_run->count_beats_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(route_dssi_audio_run), (AgsRecall *) route_dssi_audio_run->count_beats_audio_run); } g_object_unref(G_OBJECT(route_dssi_audio_run->count_beats_audio_run)); } if(count_beats_audio_run != NULL){ g_object_ref(count_beats_audio_run); if(is_template){ ags_recall_add_dependency(AGS_RECALL(route_dssi_audio_run), ags_recall_dependency_new((GObject *) count_beats_audio_run)); } } route_dssi_audio_run->count_beats_audio_run = count_beats_audio_run; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_route_dssi_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRouteDssiAudioRun *route_dssi_audio_run; route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(route_dssi_audio_run->delay_audio_run)); } break; case PROP_COUNT_BEATS_AUDIO_RUN: { g_value_set_object(value, G_OBJECT(route_dssi_audio_run->count_beats_audio_run)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_route_dssi_audio_run_dispose(GObject *gobject) { AgsRouteDssiAudioRun *route_dssi_audio_run; route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(gobject); /* delay audio run */ if(route_dssi_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(route_dssi_audio_run->delay_audio_run)); route_dssi_audio_run->delay_audio_run = NULL; } /* count beats audio run */ if(route_dssi_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(route_dssi_audio_run->count_beats_audio_run)); route_dssi_audio_run->count_beats_audio_run = NULL; } /* feed midi */ g_list_free_full(route_dssi_audio_run->feed_midi, g_object_unref); route_dssi_audio_run->feed_midi = NULL; /* call parent */ G_OBJECT_CLASS(ags_route_dssi_audio_run_parent_class)->dispose(gobject); } void ags_route_dssi_audio_run_finalize(GObject *gobject) { AgsRouteDssiAudioRun *route_dssi_audio_run; route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(gobject); /* delay audio run */ if(route_dssi_audio_run->delay_audio_run != NULL){ g_object_unref(G_OBJECT(route_dssi_audio_run->delay_audio_run)); } /* count beats audio run */ if(route_dssi_audio_run->count_beats_audio_run != NULL){ g_object_unref(G_OBJECT(route_dssi_audio_run->count_beats_audio_run)); } /* timestamp */ if(route_dssi_audio_run->timestamp != NULL){ g_object_unref(G_OBJECT(route_dssi_audio_run->timestamp)); } g_list_free_full(route_dssi_audio_run->feed_midi, g_object_unref); /* call parent */ G_OBJECT_CLASS(ags_route_dssi_audio_run_parent_class)->finalize(gobject); } void ags_route_dssi_audio_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_route_dssi_audio_run_parent_connectable_interface->connect(connectable); } void ags_route_dssi_audio_run_disconnect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } /* call parent */ ags_route_dssi_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_route_dssi_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRouteDssiAudioRun *route_dssi_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(dynamic_connectable); /* call parent */ ags_route_dssi_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* connect */ route_dssi_audio_run->notation_alloc_input_handler = g_signal_connect(G_OBJECT(route_dssi_audio_run->delay_audio_run), "notation-alloc-input", G_CALLBACK(ags_route_dssi_audio_run_alloc_input_callback), route_dssi_audio_run); } void ags_route_dssi_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRouteDssiAudioRun *route_dssi_audio_run; /* call parent */ ags_route_dssi_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(dynamic_connectable); if(route_dssi_audio_run->delay_audio_run != NULL){ g_signal_handler_disconnect(G_OBJECT(route_dssi_audio_run->delay_audio_run), route_dssi_audio_run->notation_alloc_input_handler); } } void ags_route_dssi_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_route_dssi_audio_run_parent_plugin_interface->read(file, node, plugin); /* read depenendency */ iter = node->children; while(iter != NULL){ if(iter->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(iter->name, "ags-dependency-list", 19)){ xmlNode *dependency_node; dependency_node = iter->children; while(dependency_node != NULL){ if(dependency_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(dependency_node->name, "ags-dependency", 15)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_route_dssi_audio_run_read_resolve_dependency), G_OBJECT(plugin)); } } dependency_node = dependency_node->next; } } } iter = iter->next; } } xmlNode* ags_route_dssi_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_route_dssi_audio_run_parent_plugin_interface->write(file, parent, plugin); /* write dependencies */ child = xmlNewNode(NULL, "ags-dependency-list"); xmlNewProp(child, AGS_FILE_ID_PROP, ags_id_generator_create_uuid()); xmlAddChild(node, child); list = AGS_RECALL(plugin)->dependencies; while(list != NULL){ id = ags_id_generator_create_uuid(); dependency_node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(dependency_node, AGS_FILE_ID_PROP, id); xmlAddChild(child, dependency_node); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", list->data, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_route_dssi_audio_run_write_resolve_dependency), G_OBJECT(plugin)); list = list->next; } return(node); } void ags_route_dssi_audio_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallID *recall_id; AgsRecallContainer *recall_container; AgsRecallDependency *recall_dependency; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GList *list; guint i, i_stop; recall_container = AGS_RECALL_CONTAINER(recall->container); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ template = AGS_RECALL(list->data); }else{ g_warning("AgsRecallClass::resolve - missing dependency"); return; } list = template->dependencies; delay_audio_run = NULL; count_beats_audio_run = NULL; i_stop = 2; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_DELAY_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } delay_audio_run = (AgsDelayAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(recall_dependency->dependency)){ if(((AGS_RECALL_INPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_INPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0) || ((AGS_RECALL_OUTPUT_ORIENTATED & (recall->flags)) != 0 && (AGS_RECALL_OUTPUT_ORIENTATED & (AGS_RECALL(recall_dependency->dependency)->flags)) != 0)){ recall_id = recall->recall_id; }else{ recall_id = (AgsRecallID *) recall->recall_id->recycling_context->parent->recall_id; } count_beats_audio_run = (AgsCountBeatsAudioRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "delay-audio-run", delay_audio_run, "count-beats-audio-run", count_beats_audio_run, NULL); } AgsRecall* ags_route_dssi_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRouteDssiAudioRun *copy, *route_dssi_audio_run; copy = AGS_ROUTE_DSSI_AUDIO_RUN(AGS_RECALL_CLASS(ags_route_dssi_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } void ags_route_dssi_audio_run_feed_midi(AgsRecall *recall, AgsNote *note) { AgsAudio *audio; AgsChannel *channel, *selected_channel; AgsChannel *link; AgsRecallDssiRun *recall_dssi_run; AgsRecallID *child_recall_id; AgsDelayAudioRun *delay_audio_run; AgsRouteDssiAudioRun *route_dssi_audio_run; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *channel_dummy, *recycling_dummy, *dssi; GList *list_recall; GList *list; snd_seq_event_t *seq_event; gchar *str; guint audio_start_mapping; guint midi_start_mapping, midi_end_mapping; guint audio_channel; guint input_pads; guint selected_pad; guint start_frame, end_frame; guint note_y; long seq_length; long velocity, pressure; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *selected_channel_mutex; pthread_mutex_t *link_mutex; route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(recall); delay_audio_run = route_dssi_audio_run->delay_audio_run; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio */ audio = AGS_RECALL_AUDIO_RUN(recall)->recall_audio->audio; /* audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get audio fields */ pthread_mutex_lock(audio_mutex); audio_start_mapping = audio->audio_start_mapping; midi_start_mapping = audio->midi_start_mapping; midi_end_mapping = audio->midi_end_mapping; channel = audio->input; input_pads = audio->input_pads; note_y = note->y; pthread_mutex_unlock(audio_mutex); /* channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio channel */ pthread_mutex_lock(channel_mutex); audio_channel = AGS_CHANNEL(AGS_RECYCLING(recall->recall_id->recycling)->channel)->audio_channel; pthread_mutex_unlock(channel_mutex); /* retrieve channel */ channel = ags_channel_nth(channel, audio_channel); if((AGS_AUDIO_REVERSE_MAPPING & (audio->flags)) != 0){ selected_channel = ags_channel_pad_nth(channel, audio_start_mapping + input_pads - note_y - 1); }else{ selected_channel = ags_channel_pad_nth(channel, audio_start_mapping + note_y); } /* selected channel mutex */ pthread_mutex_lock(application_mutex); selected_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) selected_channel); pthread_mutex_unlock(application_mutex); /* check within mapping */ pthread_mutex_lock(selected_channel_mutex); link = selected_channel->link; selected_pad = selected_channel->pad; pthread_mutex_unlock(selected_channel_mutex); if(selected_pad - audio_start_mapping + midi_start_mapping < midi_start_mapping || selected_pad - audio_start_mapping + midi_start_mapping >= midi_end_mapping){ return; } /* link mutex */ if(link != NULL){ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); }else{ link_mutex = NULL; } /* get recall id */ child_recall_id = NULL; if(selected_channel != NULL){ if(link == NULL){ pthread_mutex_lock(selected_channel_mutex); list = selected_channel->recall_id; while(list != NULL){ if(AGS_RECALL_ID(list->data)->recycling_context->parent == AGS_RECALL(delay_audio_run)->recall_id->recycling_context){ child_recall_id = (AgsRecallID *) list->data; break; } list = list->next; } pthread_mutex_unlock(selected_channel_mutex); }else{ pthread_mutex_lock(link_mutex); list = link->recall_id; while(list != NULL){ if(AGS_RECALL_ID(list->data)->recycling_context->parent->parent == AGS_RECALL(delay_audio_run)->recall_id->recycling_context){ child_recall_id = (AgsRecallID *) list->data; break; } list = list->next; } pthread_mutex_unlock(link_mutex); } /* get dssi run */ if(child_recall_id != NULL){ //FIXME:JK: use filename and effect to identify pthread_mutex_lock(selected_channel_mutex); list_recall = ags_recall_template_find_type(selected_channel->recall, AGS_TYPE_RECALL_DSSI); channel_dummy = NULL; if(list_recall != NULL){ channel_dummy = AGS_RECALL_CONTAINER(AGS_RECALL(list_recall->data)->container)->recall_channel_run; } while(channel_dummy != NULL){ if(AGS_RECALL(channel_dummy->data)->recall_id != NULL && AGS_RECALL(channel_dummy->data)->recall_id->recycling_context == child_recall_id->recycling_context){ recycling_dummy = AGS_RECALL(channel_dummy->data)->children; while(recycling_dummy != NULL){ dssi = AGS_RECALL(recycling_dummy->data)->children; while(dssi != NULL){ recall_dssi_run = AGS_RECALL_DSSI_RUN(dssi->data); if(AGS_RECALL(recall_dssi_run)->rt_safe || recall_dssi_run->event_buffer == NULL){ /* prepend note */ // route_dssi_audio_run->feed_midi = g_list_prepend(route_dssi_audio_run->feed_midi, // note); recall_dssi_run->route_dssi_audio_run = (GObject *) route_dssi_audio_run; /* key on */ seq_event = recall_dssi_run->event_buffer[0]; seq_event->type = SND_SEQ_EVENT_NOTEON; seq_event->data.note.channel = 0; seq_event->data.note.note = 0x7f & (selected_channel->pad - audio_start_mapping + midi_start_mapping); seq_event->data.note.velocity = 127; recall_dssi_run->event_count[0] = 1; AGS_RECALL_AUDIO_SIGNAL(recall_dssi_run)->audio_channel = audio_channel; recall_dssi_run->note = g_list_prepend(recall_dssi_run->note, (GObject *) note); g_object_ref(note); } //fixme:jk: remove notes dssi = dssi->next; } recycling_dummy = recycling_dummy->next; } } channel_dummy = channel_dummy->next; } pthread_mutex_unlock(selected_channel_mutex); } } } void ags_route_dssi_audio_run_alloc_input_callback(AgsDelayAudioRun *delay_audio_run, guint nth_run, gdouble delay, guint attack, AgsRouteDssiAudioRun *route_dssi_audio_run) { GObject *soundcard; AgsAudio *audio; AgsNotation *notation; AgsNote *note; AgsRouteDssiAudio *route_dssi_audio; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; AgsConfig *config; GList *current_position; GList *list; guint notation_counter; guint audio_channel; guint audio_start_mapping, audio_end_mapping; guint note_y; guint note_x0; guint i; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; auto void ags_route_dssi_audio_run_alloc_input_callback_feed_note(AgsNotation *notation); void ags_route_dssi_audio_run_alloc_input_callback_feed_note(AgsNotation *notation){ if(!AGS_IS_NOTATION(notation)){ return; } pthread_mutex_lock(audio_mutex); current_position = notation->notes; // start_loop pthread_mutex_unlock(audio_mutex); while(current_position != NULL){ pthread_mutex_lock(audio_mutex); audio_start_mapping = audio->audio_start_mapping; audio_end_mapping = audio->audio_end_mapping; note = AGS_NOTE(current_position->data); note_y = note->y; note_x0 = note->x[0]; pthread_mutex_unlock(audio_mutex); // g_message("--- %f %f ; %d %d", // note->stream_delay, delay, // note_x0, route_dssi_audio_run->count_beats_audio_run->notation_counter); //FIXME:JK: should consider delay if(note_y >= audio_start_mapping && note_y < audio_end_mapping && note_x0 == notation_counter){ // && floor(note->stream_delay) == floor(delay) // g_object_ref(note); ags_route_dssi_audio_run_feed_midi((AgsRecall *) route_dssi_audio_run, note); }else if(note_x0 > notation_counter){ break; } current_position = current_position->next; } } if((guint) floor(delay) != 0){ // g_message("d %f", delay); return; } route_dssi_audio = AGS_ROUTE_DSSI_AUDIO(AGS_RECALL_AUDIO_RUN(route_dssi_audio_run)->recall_audio); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); audio = AGS_RECALL_AUDIO(route_dssi_audio)->audio; /* audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) AGS_RECYCLING(AGS_RECALL(delay_audio_run)->recall_id->recycling)->channel); pthread_mutex_unlock(application_mutex); /* audio channel */ pthread_mutex_lock(channel_mutex); audio_channel = AGS_CHANNEL(AGS_RECYCLING(AGS_RECALL(delay_audio_run)->recall_id->recycling)->channel)->audio_channel; pthread_mutex_unlock(channel_mutex); /* feed note - first attempt */ notation = NULL; pthread_mutex_lock(audio_mutex); notation_counter = route_dssi_audio_run->count_beats_audio_run->notation_counter; route_dssi_audio_run->timestamp->timer.ags_offset.offset = AGS_NOTATION_DEFAULT_OFFSET * floor(notation_counter / AGS_NOTATION_DEFAULT_OFFSET); list = ags_notation_find_near_timestamp(audio->notation, audio_channel, route_dssi_audio_run->timestamp); if(list != NULL){ notation = list->data; } pthread_mutex_unlock(audio_mutex); ags_route_dssi_audio_run_alloc_input_callback_feed_note(notation); /* feed note - second attempt */ if(route_dssi_audio_run->timestamp->timer.ags_offset.offset != 0){ notation = NULL; route_dssi_audio_run->timestamp->timer.ags_offset.offset -= AGS_NOTATION_DEFAULT_OFFSET; pthread_mutex_lock(audio_mutex); list = ags_notation_find_near_timestamp(audio->notation, audio_channel, route_dssi_audio_run->timestamp); if(list != NULL){ notation = list->data; } pthread_mutex_unlock(audio_mutex); ags_route_dssi_audio_run_alloc_input_callback_feed_note(notation); } } void ags_route_dssi_audio_run_run_post(AgsRecall *recall) { AgsAudio *audio; AgsDelayAudio *delay_audio; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; AgsRouteDssiAudioRun *route_dssi_audio_run; AgsApplicationContext *application_context; AgsConfig *config; GObject *soundcard; AgsMutexManager *mutex_manager; gchar *str; guint buffer_length; gdouble bpm; gdouble notation_delay; gdouble x; pthread_mutex_t *application_mutex; GValue value = {0,}; route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(recall); delay_audio_run = route_dssi_audio_run->delay_audio_run; delay_audio = AGS_DELAY_AUDIO(AGS_RECALL_AUDIO_RUN(delay_audio_run)->recall_audio); count_beats_audio_run = route_dssi_audio_run->count_beats_audio_run; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); audio = AGS_RECALL_AUDIO_RUN(recall)->recall_audio->audio; soundcard = audio->soundcard; /* read config */ config = ags_config_get_instance(); pthread_mutex_lock(application_mutex); bpm = ags_soundcard_get_bpm(AGS_SOUNDCARD(soundcard)); /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ buffer_length = g_ascii_strtoull(str, NULL, 10); free(str); }else{ buffer_length = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; } pthread_mutex_unlock(application_mutex); /* get notation delay */ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(delay_audio->notation_delay, &value); notation_delay = g_value_get_double(&value); g_value_unset(&value); /* */ x = (((count_beats_audio_run->notation_counter * notation_delay) + delay_audio_run->notation_counter) * buffer_length); route_dssi_audio_run->delta_time = x / 16.0 / bpm * 60.0 / ((USEC_PER_SEC * bpm / 4.0) / (4.0 * bpm) / USEC_PER_SEC); } void ags_route_dssi_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_RECALL_DEPENDENCY(file_lookup->ref)->dependency); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_route_dssi_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "xpath"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(AGS_IS_DELAY_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "delay-audio-run", id_ref->ref, NULL); }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "count-beats-audio-run", id_ref->ref, NULL); } } /** * ags_route_dssi_audio_run_new: * * Creates an #AgsRouteDssiAudioRun * * Returns: a new #AgsRouteDssiAudioRun * * Since: 1.0.0 */ AgsRouteDssiAudioRun* ags_route_dssi_audio_run_new() { AgsRouteDssiAudioRun *route_dssi_audio_run; route_dssi_audio_run = (AgsRouteDssiAudioRun *) g_object_new(AGS_TYPE_ROUTE_DSSI_AUDIO_RUN, NULL); return(route_dssi_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_play_lv2_audio.h0000644000175000017500000000627113246707333017733 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PLAY_LV2_AUDIO_H__ #define __AGS_PLAY_LV2_AUDIO_H__ #include #include #include #include #include #include #define AGS_TYPE_PLAY_LV2_AUDIO (ags_play_lv2_audio_get_type()) #define AGS_PLAY_LV2_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_LV2_AUDIO, AgsPlayLv2Audio)) #define AGS_PLAY_LV2_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_LV2_AUDIO, AgsPlayLv2Audio)) #define AGS_IS_PLAY_LV2_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_LV2_AUDIO)) #define AGS_IS_PLAY_LV2_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_LV2_AUDIO)) #define AGS_PLAY_LV2_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_LV2_AUDIO, AgsPlayLv2AudioClass)) typedef struct _AgsPlayLv2Audio AgsPlayLv2Audio; typedef struct _AgsPlayLv2AudioClass AgsPlayLv2AudioClass; /** * AgsPlayLv2AudioFlags: * @AGS_PLAY_LV2_AUDIO_HAS_EVENT_PORT: use lv2 event port * @AGS_PLAY_LV2_AUDIO_HAS_ATOM_PORT: use lv2 atom port * @AGS_PLAY_LV2_AUDIO_HAS_WORKER: provide worker to lv2 plugin * * Enum values to control the behavior or indicate internal state of #AgsPlayLv2Audio by * enable/disable as flags. */ typedef enum{ AGS_PLAY_LV2_AUDIO_HAS_EVENT_PORT = 1, AGS_PLAY_LV2_AUDIO_HAS_ATOM_PORT = 1 << 1, AGS_PLAY_LV2_AUDIO_HAS_WORKER = 1 << 2, }AgsPlayLv2AudioFLags; struct _AgsPlayLv2Audio { AgsRecallAudio recall_audio; guint flags; AgsTurtle *turtle; gchar *filename; gchar *effect; gchar *uri; uint32_t index; AgsLv2Plugin *plugin; LV2_Descriptor *plugin_descriptor; uint32_t *input_port; uint32_t input_lines; uint32_t *output_port; uint32_t output_lines; uint32_t event_port; uint32_t atom_port; guint bank; guint program; }; struct _AgsPlayLv2AudioClass { AgsRecallAudioClass recall_audio; }; GType ags_play_lv2_audio_get_type(); void ags_play_lv2_audio_load(AgsPlayLv2Audio *play_lv2_audio); GList* ags_play_lv2_audio_load_ports(AgsPlayLv2Audio *play_lv2_audio); void ags_play_lv2_audio_load_conversion(AgsPlayLv2Audio *play_lv2_audio, GObject *port, gpointer port_descriptor); GList* ags_play_lv2_audio_find(GList *recall, gchar *filename, gchar *uri); AgsPlayLv2Audio* ags_play_lv2_audio_new(); #endif /*__AGS_PLAY_LV2_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_count_beats_audio.c0000644000175000017500000005715613256163135020511 00000000000000/* 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 . */ #include #include #include #include void ags_count_beats_audio_class_init(AgsCountBeatsAudioClass *count_beats_audio); void ags_count_beats_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_count_beats_audio_tactable_interface_init(AgsTactableInterface *tactable); void ags_count_beats_audio_init(AgsCountBeatsAudio *count_beats_audio); void ags_count_beats_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_count_beats_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_count_beats_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_count_beats_audio_set_ports(AgsPlugin *plugin, GList *port); void ags_count_beats_audio_dispose(GObject *gobject); void ags_count_beats_audio_finalize(GObject *gobject); void ags_count_beats_audio_connect(AgsConnectable *connectable); void ags_count_beats_audio_disconnect(AgsConnectable *connectable); void ags_count_beats_audio_change_sequencer_duration(AgsTactable *tactable, gdouble duration); void ags_count_beats_audio_change_notation_duration(AgsTactable *tactable, gdouble duration); /** * SECTION:ags_count_beats_audio * @short_description: count audio beats * @title: AgsCountBeatsAudio * @section_id: * @include: ags/audio/recall/ags_count_beats_audio.h * * The #AgsCountBeatsAudio class provides ports to the effect processor. */ enum{ PROP_0, PROP_NOTATION_LOOP, PROP_NOTATION_LOOP_START, PROP_NOTATION_LOOP_END, PROP_SEQUENCER_LOOP, PROP_SEQUENCER_LOOP_START, PROP_SEQUENCER_LOOP_END, }; static gpointer ags_count_beats_audio_parent_class = NULL; static AgsConnectableInterface* ags_count_beats_audio_parent_connectable_interface; static const gchar *ags_count_beats_audio_plugin_name = "ags-count-beats"; static const gchar *ags_count_beats_audio_specifier[] = { "./loop[0]", "./sequencer_loop_start[0]", "./notation_loop_start[0]", "./sequencer_loop_end[0]", "./notation_loop_end[0]" }; static const gchar *ags_count_beats_audio_control_port[] = { "1/5", "2/5", "3/5", "4/5", "5/5", }; GType ags_count_beats_audio_get_type() { static GType ags_type_count_beats_audio = 0; if(!ags_type_count_beats_audio){ static const GTypeInfo ags_count_beats_audio_info = { sizeof (AgsCountBeatsAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_count_beats_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCountBeatsAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_count_beats_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_count_beats_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_tactable_interface_info = { (GInterfaceInitFunc) ags_count_beats_audio_tactable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_count_beats_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_count_beats_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsCountBeatsAudio", &ags_count_beats_audio_info, 0); g_type_add_interface_static(ags_type_count_beats_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_count_beats_audio, AGS_TYPE_TACTABLE, &ags_tactable_interface_info); g_type_add_interface_static(ags_type_count_beats_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_count_beats_audio); } void ags_count_beats_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_count_beats_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_count_beats_audio_connect; connectable->disconnect = ags_count_beats_audio_disconnect; } void ags_count_beats_audio_tactable_interface_init(AgsTactableInterface *tactable) { tactable->get_bpm = NULL; tactable->get_tact = NULL; tactable->get_sequencer_duration = NULL; tactable->get_notation_duration = NULL; tactable->change_sequencer_duration = ags_count_beats_audio_change_sequencer_duration; tactable->change_notation_duration = ags_count_beats_audio_change_notation_duration; tactable->change_bpm = NULL; tactable->change_tact = NULL; } void ags_count_beats_audio_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_count_beats_audio_set_ports; } void ags_count_beats_audio_class_init(AgsCountBeatsAudioClass *count_beats_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_count_beats_audio_parent_class = g_type_class_peek_parent(count_beats_audio); gobject = (GObjectClass *) count_beats_audio; gobject->set_property = ags_count_beats_audio_set_property; gobject->get_property = ags_count_beats_audio_get_property; gobject->dispose = ags_count_beats_audio_dispose; gobject->finalize = ags_count_beats_audio_finalize; /* properties */ /** * AgsCountBeatsAudio:notation-loop: * * Count until notation-loop-end and start at notation-loop-start. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation-loop", i18n_pspec("notation-loop playing"), i18n_pspec("Play in a endless notation_loop"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION_LOOP, param_spec); /** * AgsCountBeatsAudio:notation-loop-start: * * The notation's notation-loop-start. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation-loop-start", i18n_pspec("start beat of notation loop"), i18n_pspec("The start beat of the notation loop"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION_LOOP_START, param_spec); /** * AgsCountBeatsAudio:notation-loop-end: * * The notation's loop-end. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation-loop-end", i18n_pspec("end beat of notation loop"), i18n_pspec("The end beat of the notation loop"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION_LOOP_END, param_spec); /** * AgsCountBeatsAudio:sequencer-loop: * * Count until loop-end and start at loop-start. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer-loop", i18n_pspec("sequencer loop playing"), i18n_pspec("Play sequencer in a endless loop"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER_LOOP, param_spec); /** * AgsCountBeatsAudio:sequencer-loop-start: * * The sequencer's loop-start. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer_loop_start", i18n_pspec("start beat of loop"), i18n_pspec("The start beat of the sequencer loop"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER_LOOP_START, param_spec); /** * AgsCountBeatsAudio:sequencer-loop-end: * * The sequencer's loop-end. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer-loop-end", i18n_pspec("end beat of sequencer loop"), i18n_pspec("The end beat of the sequencer loop"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER_LOOP_END, param_spec); } void ags_count_beats_audio_init(AgsCountBeatsAudio *count_beats_audio) { GList *port; AGS_RECALL(count_beats_audio)->name = "ags-count-beats"; AGS_RECALL(count_beats_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(count_beats_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(count_beats_audio)->xml_type = "ags-count-beats-audio"; port = NULL; /* sequencer loop */ count_beats_audio->sequencer_loop = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_count_beats_audio_plugin_name, "specifier", ags_count_beats_audio_specifier[0], "control-port", ags_count_beats_audio_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(count_beats_audio->sequencer_loop); count_beats_audio->sequencer_loop->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, count_beats_audio->sequencer_loop); g_object_ref(count_beats_audio->sequencer_loop); /* notation loop */ count_beats_audio->notation_loop = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_count_beats_audio_plugin_name, "specifier", ags_count_beats_audio_specifier[0], "control-port", ags_count_beats_audio_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(count_beats_audio->notation_loop); count_beats_audio->notation_loop->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, count_beats_audio->notation_loop); g_object_ref(count_beats_audio->notation_loop); /* sequencer-loop-start */ count_beats_audio->sequencer_loop_start = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_count_beats_audio_plugin_name, "specifier", ags_count_beats_audio_specifier[1], "control-port", ags_count_beats_audio_control_port[1], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(count_beats_audio->sequencer_loop_start); count_beats_audio->sequencer_loop_start->port_value.ags_port_double = 0.0; /* add to port */ port = g_list_prepend(port, count_beats_audio->sequencer_loop_start); g_object_ref(count_beats_audio->sequencer_loop_start); /* notation-loop-start */ count_beats_audio->notation_loop_start = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_count_beats_audio_plugin_name, "specifier", ags_count_beats_audio_specifier[2], "control-port", ags_count_beats_audio_control_port[2], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(count_beats_audio->notation_loop_start); count_beats_audio->notation_loop_start->port_value.ags_port_double = 0.0; /* add to port */ port = g_list_prepend(port, count_beats_audio->notation_loop_start); g_object_ref(count_beats_audio->notation_loop_start); /* sequencer-loop-end */ count_beats_audio->sequencer_loop_end = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_count_beats_audio_plugin_name, "specifier", ags_count_beats_audio_specifier[3], "control-port", ags_count_beats_audio_control_port[3], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(count_beats_audio->sequencer_loop_end); count_beats_audio->sequencer_loop_end->port_value.ags_port_double = 16.0; /* add to port */ port = g_list_prepend(port, count_beats_audio->sequencer_loop_end); g_object_ref(count_beats_audio->sequencer_loop_end); /* notation-loop-end */ count_beats_audio->notation_loop_end = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_count_beats_audio_plugin_name, "specifier", ags_count_beats_audio_specifier[4], "control-port", ags_count_beats_audio_control_port[4], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(count_beats_audio->notation_loop_end); count_beats_audio->notation_loop_end->port_value.ags_port_double = 64.0; /* add to port */ port = g_list_prepend(port, count_beats_audio->notation_loop_end); g_object_ref(count_beats_audio->notation_loop_end); /* port */ AGS_RECALL(count_beats_audio)->port = port; } void ags_count_beats_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCountBeatsAudio *count_beats_audio; count_beats_audio = AGS_COUNT_BEATS_AUDIO(gobject); switch(prop_id){ case PROP_NOTATION_LOOP: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == count_beats_audio->notation_loop){ return; } if(count_beats_audio->notation_loop != NULL){ g_object_unref(G_OBJECT(count_beats_audio->notation_loop)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } count_beats_audio->notation_loop = port; } break; case PROP_NOTATION_LOOP_START: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == count_beats_audio->notation_loop_start){ return; } if(count_beats_audio->notation_loop_start != NULL){ g_object_unref(G_OBJECT(count_beats_audio->notation_loop_start)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } count_beats_audio->notation_loop_start = port; } break; case PROP_NOTATION_LOOP_END: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == count_beats_audio->notation_loop_end){ return; } if(count_beats_audio->notation_loop_end != NULL){ g_object_unref(G_OBJECT(count_beats_audio->notation_loop_end)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } count_beats_audio->notation_loop_end = port; } break; case PROP_SEQUENCER_LOOP: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == count_beats_audio->sequencer_loop){ return; } if(count_beats_audio->sequencer_loop != NULL){ g_object_unref(G_OBJECT(count_beats_audio->sequencer_loop)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } count_beats_audio->sequencer_loop = port; } break; case PROP_SEQUENCER_LOOP_START: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == count_beats_audio->sequencer_loop_start){ return; } if(count_beats_audio->sequencer_loop_start != NULL){ g_object_unref(G_OBJECT(count_beats_audio->sequencer_loop_start)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } count_beats_audio->sequencer_loop_start = port; } break; case PROP_SEQUENCER_LOOP_END: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == count_beats_audio->sequencer_loop_end){ return; } if(count_beats_audio->sequencer_loop_end != NULL){ g_object_unref(G_OBJECT(count_beats_audio->sequencer_loop_end)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } count_beats_audio->sequencer_loop_end = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_count_beats_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCountBeatsAudio *count_beats; count_beats = AGS_COUNT_BEATS_AUDIO(gobject); switch(prop_id){ case PROP_NOTATION_LOOP: { g_value_set_object(value, count_beats->notation_loop); } break; case PROP_NOTATION_LOOP_START: { g_value_set_object(value, count_beats->notation_loop_start); } break; case PROP_NOTATION_LOOP_END: { g_value_set_object(value, count_beats->notation_loop_end); } break; case PROP_SEQUENCER_LOOP: { g_value_set_object(value, count_beats->sequencer_loop); } break; case PROP_SEQUENCER_LOOP_START: { g_value_set_object(value, count_beats->sequencer_loop_start); } break; case PROP_SEQUENCER_LOOP_END: { g_value_set_object(value, count_beats->sequencer_loop_end); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_count_beats_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./notation-loop[0]", 18)){ g_object_set(G_OBJECT(plugin), "notation-loop", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./notation-loop-start[0]", 23)){ g_object_set(G_OBJECT(plugin), "notation-loop-start", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./notation-loop-end[0]", 21)){ g_object_set(G_OBJECT(plugin), "notation-loop-end", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./sequencer-loop[0]", 19)){ g_object_set(G_OBJECT(plugin), "sequencer-loop", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./sequencer-loop-start[0]", 24)){ g_object_set(G_OBJECT(plugin), "sequencer-loop-start", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./sequencer-loop-end[0]", 22)){ g_object_set(G_OBJECT(plugin), "sequencer-loop-end", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_count_beats_audio_dispose(GObject *gobject) { AgsCountBeatsAudio *count_beats_audio; count_beats_audio = AGS_COUNT_BEATS_AUDIO(gobject); if(count_beats_audio->notation_loop != NULL){ g_object_unref(G_OBJECT(count_beats_audio->notation_loop)); count_beats_audio->notation_loop = NULL; } if(count_beats_audio->notation_loop_start != NULL){ g_object_unref(G_OBJECT(count_beats_audio->notation_loop_start)); count_beats_audio->notation_loop_start = NULL; } if(count_beats_audio->notation_loop_end != NULL){ g_object_unref(G_OBJECT(count_beats_audio->notation_loop_end)); count_beats_audio->notation_loop_end = NULL; } if(count_beats_audio->sequencer_loop != NULL){ g_object_unref(G_OBJECT(count_beats_audio->sequencer_loop)); count_beats_audio->sequencer_loop = NULL; } if(count_beats_audio->sequencer_loop_start != NULL){ g_object_unref(G_OBJECT(count_beats_audio->sequencer_loop_start)); count_beats_audio->sequencer_loop_start = NULL; } if(count_beats_audio->sequencer_loop_end != NULL){ g_object_unref(G_OBJECT(count_beats_audio->sequencer_loop_end)); count_beats_audio->sequencer_loop_end = NULL; } /* call parent */ G_OBJECT_CLASS(ags_count_beats_audio_parent_class)->dispose(gobject); } void ags_count_beats_audio_finalize(GObject *gobject) { AgsCountBeatsAudio *count_beats_audio; count_beats_audio = AGS_COUNT_BEATS_AUDIO(gobject); if(count_beats_audio->sequencer_loop != NULL){ g_object_unref(G_OBJECT(count_beats_audio->sequencer_loop)); } if(count_beats_audio->notation_loop_start != NULL){ g_object_unref(G_OBJECT(count_beats_audio->notation_loop_start)); } if(count_beats_audio->notation_loop_end != NULL){ g_object_unref(G_OBJECT(count_beats_audio->notation_loop_end)); } if(count_beats_audio->notation_loop != NULL){ g_object_unref(G_OBJECT(count_beats_audio->notation_loop)); } if(count_beats_audio->sequencer_loop_start != NULL){ g_object_unref(G_OBJECT(count_beats_audio->sequencer_loop_start)); } if(count_beats_audio->sequencer_loop_end != NULL){ g_object_unref(G_OBJECT(count_beats_audio->sequencer_loop_end)); } /* call parent */ G_OBJECT_CLASS(ags_count_beats_audio_parent_class)->finalize(gobject); } void ags_count_beats_audio_connect(AgsConnectable *connectable) { AgsCountBeatsAudio *count_beats_audio; guint loop_start, loop_end; gboolean do_loop; GValue loop_start_value = {0,}; GValue loop_end_value = {0,}; GValue do_loop_value = {0,}; count_beats_audio = AGS_COUNT_BEATS_AUDIO(connectable); if((AGS_RECALL_CONNECTED & (AGS_RECALL(count_beats_audio)->flags)) != 0){ return; } /* call parent */ ags_count_beats_audio_parent_connectable_interface->connect(connectable); /* retrieve loop information */ ags_soundcard_get_loop(AGS_SOUNDCARD(AGS_RECALL(count_beats_audio)->soundcard), &loop_start, &loop_end, &do_loop); /* set loop information on ports */ g_value_init(&loop_start_value, G_TYPE_DOUBLE); g_value_init(&loop_end_value, G_TYPE_DOUBLE); g_value_init(&do_loop_value, G_TYPE_BOOLEAN); g_value_set_double(&loop_start_value, (gdouble) loop_start); g_value_set_double(&loop_end_value, (gdouble) loop_end); g_value_set_boolean(&do_loop_value, do_loop); ags_port_safe_write(count_beats_audio->notation_loop_start, &loop_start_value); ags_port_safe_write(count_beats_audio->notation_loop_end, &loop_end_value); ags_port_safe_write(count_beats_audio->notation_loop, &do_loop_value); } void ags_count_beats_audio_disconnect(AgsConnectable *connectable) { /* call parent */ ags_count_beats_audio_parent_connectable_interface->disconnect(connectable); } void ags_count_beats_audio_change_sequencer_duration(AgsTactable *tactable, gdouble duration) { AgsCountBeatsAudio *count_beats_audio; GValue value = {0,}; count_beats_audio = AGS_COUNT_BEATS_AUDIO(tactable); g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, duration); ags_port_safe_write(count_beats_audio->sequencer_loop_end, &value); } void ags_count_beats_audio_change_notation_duration(AgsTactable *tactable, gdouble duration) { AgsCountBeatsAudio *count_beats_audio; GValue value = {0,}; count_beats_audio = AGS_COUNT_BEATS_AUDIO(tactable); g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, duration); ags_port_safe_write(count_beats_audio->notation_loop_end, &value); } /** * ags_count_beats_audio_new: * @loop: set loop port * * Creates an #AgsCountBeatsAudio * * Returns: a new #AgsCountBeatsAudio * * Since: 1.0.0 */ AgsCountBeatsAudio* ags_count_beats_audio_new(gboolean loop) { AgsCountBeatsAudio *count_beats_audio; count_beats_audio = (AgsCountBeatsAudio *) g_object_new(AGS_TYPE_COUNT_BEATS_AUDIO, "loop", loop, NULL); return(count_beats_audio); } gsequencer-1.4.24/ags/audio/recall/ags_copy_audio_signal.c0000644000175000017500000003544713247044247020513 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_copy_audio_signal_class_init(AgsCopyAudioSignalClass *copy_audio_signal); void ags_copy_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_copy_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_copy_audio_signal_init(AgsCopyAudioSignal *copy_audio_signal); void ags_copy_audio_signal_connect(AgsConnectable *connectable); void ags_copy_audio_signal_disconnect(AgsConnectable *connectable); void ags_copy_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_audio_signal_finalize(GObject *gobject); void ags_copy_audio_signal_run_init_pre(AgsRecall *recall); void ags_copy_audio_signal_run_pre(AgsRecall *recall); void ags_copy_audio_signal_run_inter(AgsRecall *recall); AgsRecall* ags_copy_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_copy_audio_signal * @short_description: copys audio signal * @title: AgsCopyAudioSignal * @section_id: * @include: ags/audio/recall/ags_copy_audio_signal.h * * The #AgsCopyAudioSignal class copys the audio signal. */ static gpointer ags_copy_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_copy_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_copy_audio_signal_parent_dynamic_connectable_interface; GType ags_copy_audio_signal_get_type() { static GType ags_type_copy_audio_signal = 0; if(!ags_type_copy_audio_signal){ static const GTypeInfo ags_copy_audio_signal_info = { sizeof (AgsCopyAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_copy_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsCopyAudioSignal", &ags_copy_audio_signal_info, 0); g_type_add_interface_static(ags_type_copy_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_copy_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_copy_audio_signal); } void ags_copy_audio_signal_class_init(AgsCopyAudioSignalClass *copy_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; ags_copy_audio_signal_parent_class = g_type_class_peek_parent(copy_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) copy_audio_signal; gobject->finalize = ags_copy_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) copy_audio_signal; recall->run_init_pre = ags_copy_audio_signal_run_init_pre; recall->run_pre = ags_copy_audio_signal_run_pre; recall->run_inter = ags_copy_audio_signal_run_inter; recall->duplicate = ags_copy_audio_signal_duplicate; } void ags_copy_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_copy_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_copy_audio_signal_connect; connectable->disconnect = ags_copy_audio_signal_disconnect; } void ags_copy_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_copy_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_copy_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_copy_audio_signal_disconnect_dynamic; } void ags_copy_audio_signal_init(AgsCopyAudioSignal *copy_audio_signal) { AGS_RECALL(copy_audio_signal)->name = "ags-copy"; AGS_RECALL(copy_audio_signal)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(copy_audio_signal)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(copy_audio_signal)->xml_type = "ags-copy-audio-signal"; AGS_RECALL(copy_audio_signal)->port = NULL; AGS_RECALL(copy_audio_signal)->child_type = G_TYPE_NONE; } void ags_copy_audio_signal_connect(AgsConnectable *connectable) { /* call parent */ ags_copy_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_copy_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_copy_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_copy_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_copy_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_copy_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_copy_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_copy_audio_signal_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_copy_audio_signal_parent_class)->finalize(gobject); } void ags_copy_audio_signal_run_init_pre(AgsRecall *recall) { GObject *soundcard; AgsRecycling *recycling; AgsAudioSignal *destination; AgsRecallID *parent_recall_id; AgsRecyclingContext *recycling_context; AgsCopyRecycling *copy_recycling; AgsCopyAudioSignal *copy_audio_signal; AgsMutexManager *mutex_manager; GList *stream; gdouble delay; guint attack; guint length; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; copy_audio_signal = AGS_COPY_AUDIO_SIGNAL(recall); copy_recycling = AGS_COPY_RECYCLING(recall->parent); soundcard = recall->soundcard; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* recycling */ recall->flags &= (~AGS_RECALL_PERSISTENT); recycling = AGS_RECALL_RECYCLING(copy_recycling)->destination; pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* recycling context */ recycling_context = recall->recall_id->recycling_context; parent_recall_id = ags_recall_id_find_recycling_context(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->destination->recall_id, recycling_context->parent); //TODO:JK: unclear attack = 0; delay = 0.0; /* create new audio signal */ destination = ags_audio_signal_new((GObject *) soundcard, (GObject *) recycling, (GObject *) parent_recall_id); g_object_set(copy_audio_signal, "destination", destination, NULL); ags_recycling_create_audio_signal_with_defaults(recycling, destination, delay, attack); length = 1; // (guint) (2.0 * soundcard->delay[soundcard->tic_counter]) + 1; ags_audio_signal_stream_resize(destination, length); ags_connectable_connect(AGS_CONNECTABLE(destination)); destination->stream_current = destination->stream_beginning; pthread_mutex_lock(recycling_mutex); ags_recycling_add_audio_signal(recycling, destination); pthread_mutex_unlock(recycling_mutex); #ifdef AGS_DEBUG g_message("copy %x to %x", destination, parent_recall_id); g_message("creating destination"); #endif /* call parent */ AGS_RECALL_CLASS(ags_copy_audio_signal_parent_class)->run_init_pre(recall); } void ags_copy_audio_signal_run_pre(AgsRecall *recall) { AGS_RECALL_CLASS(ags_copy_audio_signal_parent_class)->run_pre(recall); if(AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current != NULL){ void *buffer; guint buffer_size; buffer = (signed short *) AGS_RECALL_AUDIO_SIGNAL(recall)->destination->stream_current->data; buffer_size = AGS_RECALL_AUDIO_SIGNAL(recall)->destination->buffer_size; ags_audio_buffer_util_clear_buffer(buffer, 1, buffer_size, ags_audio_buffer_util_format_from_soundcard(AGS_RECALL_AUDIO_SIGNAL(recall)->destination->format)); } } void ags_copy_audio_signal_run_inter(AgsRecall *recall) { AgsCopyChannel *copy_channel; AgsCopyAudioSignal *copy_audio_signal; AgsAudioSignal *source, *destination; GList *stream_source, *stream_destination; gchar *str; gboolean muted; guint buffer_size; guint copy_mode; GValue value = {0,}; AGS_RECALL_CLASS(ags_copy_audio_signal_parent_class)->run_inter(recall); if(recall->rt_safe && recall->recall_id->recycling_context->parent != NULL && AGS_RECALL_AUDIO_SIGNAL(recall)->source->note == NULL){ return; } copy_audio_signal = AGS_COPY_AUDIO_SIGNAL(recall); source = AGS_RECALL_AUDIO_SIGNAL(copy_audio_signal)->source; stream_source = source->stream_current; destination = AGS_RECALL_AUDIO_SIGNAL(copy_audio_signal)->destination; if(stream_source == NULL){ if(destination != NULL){ ags_recycling_remove_audio_signal(destination->recycling, destination); g_object_run_dispose(destination); g_object_unref(destination); } ags_recall_done(recall); ags_recycling_remove_audio_signal(source->recycling, source); g_object_unref(source); return; } //FIXME:JK: attack probably needs to be removed if(destination == NULL){ g_warning("no destination"); return; } copy_channel = AGS_COPY_CHANNEL(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); g_value_init(&value, G_TYPE_BOOLEAN); ags_port_safe_read(copy_channel->muted, &value); muted = g_value_get_boolean(&value); g_value_unset(&value); if(muted){ return; } stream_destination = destination->stream_current; // attack = AGS_RECALL_AUDIO_SIGNAL(copy_audio_signal)->attack; if(!recall->rt_safe && stream_destination->next == NULL){ ags_audio_signal_add_stream(destination); } stream_destination = destination->stream_current; buffer_size = source->buffer_size; if(stream_destination != NULL){ void *buffer_source; gboolean resample; copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(destination->format), ags_audio_buffer_util_format_from_soundcard(source->format)); if(stream_destination->next == NULL){ ags_audio_signal_add_stream(destination); } resample = FALSE; if(stream_destination->next == NULL){ ags_audio_signal_add_stream(destination); } /* check if resample */ buffer_source = stream_source->data; if(source->samplerate != destination->samplerate){ buffer_source = ags_audio_buffer_util_resample(buffer_source, 1, ags_audio_buffer_util_format_from_soundcard(source->format), source->samplerate, source->length, destination->samplerate); resample = TRUE; } if((AGS_RECALL_INITIAL_RUN & (AGS_RECALL_AUDIO_SIGNAL(recall)->flags)) != 0){ AGS_RECALL_AUDIO_SIGNAL(recall)->flags &= (~AGS_RECALL_INITIAL_RUN); ags_audio_buffer_util_copy_buffer_to_buffer(stream_destination->data, 1, source->attack, buffer_source, 1, 0, buffer_size - source->attack, copy_mode); }else{ if(source->attack != 0 && stream_source->prev != NULL){ void *buffer_source_prev; buffer_source_prev = stream_source->prev->data; if(resample){ buffer_source_prev = ags_audio_buffer_util_resample(buffer_source_prev, 1, ags_audio_buffer_util_format_from_soundcard(source->format), source->samplerate, source->length, destination->samplerate); } ags_audio_buffer_util_copy_buffer_to_buffer(stream_destination->data, 1, 0, buffer_source_prev, 1, buffer_size - source->attack, source->attack, copy_mode); if(resample){ free(buffer_source_prev); } } ags_audio_buffer_util_copy_buffer_to_buffer(stream_destination->data, 1, source->attack, buffer_source, 1, 0, buffer_size - source->attack, copy_mode); } if(resample){ free(buffer_source); } } } AgsRecall* ags_copy_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsCopyAudioSignal *copy; copy = (AgsCopyAudioSignal *) AGS_RECALL_CLASS(ags_copy_audio_signal_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_copy_audio_signal_new: * @destination: the destination #AgsAudioSignal * @source: the source #AgsAudioSignal * @soundcard: the #GObject defaulting to * * Creates an #AgsCopyAudioSignal * * Returns: a new #AgsCopyAudioSignal * * Since: 1.0.0 */ AgsCopyAudioSignal* ags_copy_audio_signal_new(AgsAudioSignal *destination, AgsAudioSignal *source, GObject *soundcard) { AgsCopyAudioSignal *copy_audio_signal; copy_audio_signal = (AgsCopyAudioSignal *) g_object_new(AGS_TYPE_COPY_AUDIO_SIGNAL, "destination", destination, "source", source, "soundcard", soundcard, NULL); return(copy_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_mute_audio_run.c0000644000175000017500000001577113246707333020041 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_mute_audio_run_class_init(AgsMuteAudioRunClass *mute_audio_run); void ags_mute_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mute_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_mute_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_mute_audio_run_init(AgsMuteAudioRun *mute_audio_run); void ags_mute_audio_run_finalize(GObject *gobject); void ags_mute_audio_run_connect(AgsConnectable *connectable); void ags_mute_audio_run_disconnect(AgsConnectable *connectable); void ags_mute_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_mute_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); /** * SECTION:ags_mute_audio_run * @short_description: copy pattern * @title: AgsMuteAudioRun * @section_id: * @include: ags/audio/recall/ags_mute_audio_run.h * * The #AgsMuteAudioRun class copy pattern. */ static gpointer ags_mute_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_mute_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_mute_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_mute_audio_run_parent_plugin_interface; GType ags_mute_audio_run_get_type() { static GType ags_type_mute_audio_run = 0; if(!ags_type_mute_audio_run){ static const GTypeInfo ags_mute_audio_run_info = { sizeof (AgsMuteAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mute_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMuteAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mute_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_mute_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mute_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsMuteAudioRun", &ags_mute_audio_run_info, 0); g_type_add_interface_static(ags_type_mute_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_mute_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_mute_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_mute_audio_run); } void ags_mute_audio_run_class_init(AgsMuteAudioRunClass *mute_audio_run) { GObjectClass *gobject; ags_mute_audio_run_parent_class = g_type_class_peek_parent(mute_audio_run); /* GObjectClass */ gobject = (GObjectClass *) mute_audio_run; gobject->finalize = ags_mute_audio_run_finalize; } void ags_mute_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_mute_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_mute_audio_run_connect; connectable->disconnect = ags_mute_audio_run_disconnect; } void ags_mute_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_mute_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_mute_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_mute_audio_run_disconnect_dynamic; } void ags_mute_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_mute_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_mute_audio_run_init(AgsMuteAudioRun *mute_audio_run) { AGS_RECALL(mute_audio_run)->name = "ags-mute"; AGS_RECALL(mute_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(mute_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(mute_audio_run)->xml_type = "ags-mute-audio-run"; AGS_RECALL(mute_audio_run)->port = NULL; } void ags_mute_audio_run_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_mute_audio_run_parent_class)->finalize(gobject); } void ags_mute_audio_run_connect(AgsConnectable *connectable) { /* call parent */ ags_mute_audio_run_parent_connectable_interface->connect(connectable); } void ags_mute_audio_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_mute_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_mute_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_mute_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_mute_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_mute_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } AgsRecall* ags_mute_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsMuteAudioRun *copy; copy = AGS_MUTE_AUDIO_RUN(AGS_RECALL_CLASS(ags_mute_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } /** * ags_mute_audio_run_new: * * Creates an #AgsMuteAudioRun * * Returns: a new #AgsMuteAudioRun * * Since: 1.0.0 */ AgsMuteAudioRun* ags_mute_audio_run_new() { AgsMuteAudioRun *mute_audio_run; mute_audio_run = (AgsMuteAudioRun *) g_object_new(AGS_TYPE_MUTE_AUDIO_RUN, NULL); return(mute_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_volume_channel.h0000644000175000017500000000372213246707333020017 00000000000000/* 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 . */ #ifndef __AGS_VOLUME_CHANNEL_H__ #define __AGS_VOLUME_CHANNEL_H__ #include #include #include #define AGS_TYPE_VOLUME_CHANNEL (ags_volume_channel_get_type()) #define AGS_VOLUME_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_VOLUME_CHANNEL, AgsVolumeChannel)) #define AGS_VOLUME_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_VOLUME_CHANNEL, AgsVolumeChannelClass)) #define AGS_IS_VOLUME_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_VOLUME_CHANNEL)) #define AGS_IS_VOLUME_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_VOLUME_CHANNEL)) #define AGS_VOLUME_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_VOLUME_CHANNEL, AgsVolumeChannelClass)) typedef struct _AgsVolumeChannel AgsVolumeChannel; typedef struct _AgsVolumeChannelClass AgsVolumeChannelClass; struct _AgsVolumeChannel { AgsRecallChannel recall_channel; AgsPort *volume; }; struct _AgsVolumeChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_volume_channel_get_type(); AgsVolumeChannel* ags_volume_channel_new(); #endif /*__AGS_VOLUME_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_route_dssi_audio.c0000644000175000017500000002433313246707333020355 00000000000000/* 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 . */ #include #include #include #include void ags_route_dssi_audio_class_init(AgsRouteDssiAudioClass *route_dssi_audio); void ags_route_dssi_audio_init(AgsRouteDssiAudio *route_dssi_audio); void ags_route_dssi_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_route_dssi_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_route_dssi_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_route_dssi_audio_set_ports(AgsPlugin *plugin, GList *port); void ags_route_dssi_audio_dispose(GObject *gobject); void ags_route_dssi_audio_finalize(GObject *gobject); /** * SECTION:ags_route_dssi_audio * @short_description: route MIDI to DSSI * @title: AgsRouteDssiAudio * @section_id: * @include: ags/audio/recall/ags_route_dssi_audio.h * * The #AgsRouteDssiAudio class provides ports to the effect processor. */ enum{ PROP_0, PROP_NOTATION_INPUT, PROP_SEQUENCER_INPUT, }; static gpointer ags_route_dssi_audio_parent_class = NULL; static const gchar *ags_route_dssi_audio_plugin_name = "ags-count-beats"; static const gchar *ags_route_dssi_audio_specifier[] = { "./notation-input[0]", "./sequencer-input[0]", }; static const gchar *ags_route_dssi_audio_control_port[] = { "1/2", "2/2", }; GType ags_route_dssi_audio_get_type() { static GType ags_type_route_dssi_audio = 0; if(!ags_type_route_dssi_audio){ static const GTypeInfo ags_route_dssi_audio_info = { sizeof (AgsRouteDssiAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_route_dssi_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRouteDssiAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_route_dssi_audio_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_route_dssi_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_route_dssi_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsRouteDssiAudio", &ags_route_dssi_audio_info, 0); g_type_add_interface_static(ags_type_route_dssi_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_route_dssi_audio); } void ags_route_dssi_audio_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_route_dssi_audio_set_ports; } void ags_route_dssi_audio_class_init(AgsRouteDssiAudioClass *route_dssi_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_route_dssi_audio_parent_class = g_type_class_peek_parent(route_dssi_audio); gobject = (GObjectClass *) route_dssi_audio; gobject->set_property = ags_route_dssi_audio_set_property; gobject->get_property = ags_route_dssi_audio_get_property; gobject->dispose = ags_route_dssi_audio_dispose; gobject->finalize = ags_route_dssi_audio_finalize; /* properties */ /** * AgsRouteDssiAudio:notation-input: * * If enabled input is taken of #AgsNotation. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation-input", i18n_pspec("route notation input"), i18n_pspec("Route notation as input to the DSSI recall."), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION_INPUT, param_spec); /** * AgsRouteDssiAudio:sequencer-input: * * If enabled input is taken of #AgsSequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer-input", i18n_pspec("route sequencer input"), i18n_pspec("Route sequencer as input to the DSSI recall."), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER_INPUT, param_spec); } void ags_route_dssi_audio_init(AgsRouteDssiAudio *route_dssi_audio) { GList *port; AGS_RECALL(route_dssi_audio)->name = "ags-count-beats"; AGS_RECALL(route_dssi_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(route_dssi_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(route_dssi_audio)->xml_type = "ags-count-beats-audio"; port = NULL; /* notation input */ route_dssi_audio->notation_input = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_route_dssi_audio_plugin_name, "specifier", ags_route_dssi_audio_specifier[0], "control-port", ags_route_dssi_audio_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(route_dssi_audio->notation_input); route_dssi_audio->notation_input->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, route_dssi_audio->notation_input); g_object_ref(route_dssi_audio->notation_input); /* sequencer input */ route_dssi_audio->sequencer_input = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_route_dssi_audio_plugin_name, "specifier", ags_route_dssi_audio_specifier[1], "control-port", ags_route_dssi_audio_control_port[1], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(route_dssi_audio->sequencer_input); route_dssi_audio->sequencer_input->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, route_dssi_audio->sequencer_input); g_object_ref(route_dssi_audio->sequencer_input); /* port */ AGS_RECALL(route_dssi_audio)->port = port; } void ags_route_dssi_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRouteDssiAudio *route_dssi_audio; route_dssi_audio = AGS_ROUTE_DSSI_AUDIO(gobject); switch(prop_id){ case PROP_NOTATION_INPUT: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == route_dssi_audio->notation_input){ return; } if(route_dssi_audio->notation_input != NULL){ g_object_unref(G_OBJECT(route_dssi_audio->notation_input)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } route_dssi_audio->notation_input = port; } break; case PROP_SEQUENCER_INPUT: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == route_dssi_audio->sequencer_input){ return; } if(route_dssi_audio->sequencer_input != NULL){ g_object_unref(G_OBJECT(route_dssi_audio->sequencer_input)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } route_dssi_audio->sequencer_input = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_route_dssi_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRouteDssiAudio *route_dssi; route_dssi = AGS_ROUTE_DSSI_AUDIO(gobject); switch(prop_id){ case PROP_NOTATION_INPUT: { g_value_set_object(value, route_dssi->notation_input); } break; case PROP_SEQUENCER_INPUT: { g_value_set_object(value, route_dssi->sequencer_input); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_route_dssi_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./notation-input[0]", 18)){ g_object_set(G_OBJECT(plugin), "notation-input", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./sequencer-input[0]", 18)){ g_object_set(G_OBJECT(plugin), "sequencer-input", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_route_dssi_audio_dispose(GObject *gobject) { AgsRouteDssiAudio *route_dssi_audio; route_dssi_audio = AGS_ROUTE_DSSI_AUDIO(gobject); /* notation input */ if(route_dssi_audio->notation_input != NULL){ g_object_unref(G_OBJECT(route_dssi_audio->notation_input)); route_dssi_audio->notation_input = NULL; } /* sequencer input */ if(route_dssi_audio->sequencer_input != NULL){ g_object_unref(G_OBJECT(route_dssi_audio->sequencer_input)); route_dssi_audio->sequencer_input = NULL; } /* call parent */ G_OBJECT_CLASS(ags_route_dssi_audio_parent_class)->dispose(gobject); } void ags_route_dssi_audio_finalize(GObject *gobject) { AgsRouteDssiAudio *route_dssi_audio; route_dssi_audio = AGS_ROUTE_DSSI_AUDIO(gobject); if(route_dssi_audio->notation_input != NULL){ g_object_unref(G_OBJECT(route_dssi_audio->notation_input)); } if(route_dssi_audio->sequencer_input != NULL){ g_object_unref(G_OBJECT(route_dssi_audio->sequencer_input)); } /* call parent */ G_OBJECT_CLASS(ags_route_dssi_audio_parent_class)->finalize(gobject); } /** * ags_route_dssi_audio_new: * * Creates an #AgsRouteDssiAudio * * Returns: a new #AgsRouteDssiAudio * * Since: 1.0.0 */ AgsRouteDssiAudio* ags_route_dssi_audio_new() { AgsRouteDssiAudio *route_dssi_audio; route_dssi_audio = (AgsRouteDssiAudio *) g_object_new(AGS_TYPE_ROUTE_DSSI_AUDIO, NULL); return(route_dssi_audio); } gsequencer-1.4.24/ags/audio/recall/ags_play_recycling.c0000644000175000017500000001676113246707333020026 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_play_recycling_class_init(AgsPlayRecyclingClass *play_recycling); void ags_play_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_play_recycling_init(AgsPlayRecycling *play_recycling); void ags_play_recycling_connect(AgsConnectable *connectable); void ags_play_recycling_disconnect(AgsConnectable *connectable); void ags_play_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_recycling_finalize(GObject *gobject); void ags_play_recycling_done(AgsRecall *recall); void ags_play_recycling_cancel(AgsRecall *recall); AgsRecall* ags_play_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_play_recycling * @short_description: plays recycling * @title: AgsPlayRecycling * @section_id: * @include: ags/audio/recall/ags_play_recycling.h * * The #AgsPlayRecycling class plays the recycling. */ static gpointer ags_play_recycling_parent_class = NULL; static AgsConnectableInterface *ags_play_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_play_recycling_parent_dynamic_connectable_interface; GType ags_play_recycling_get_type() { static GType ags_type_play_recycling = 0; if(!ags_type_play_recycling){ static const GTypeInfo ags_play_recycling_info = { sizeof (AgsPlayRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_play_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsPlayRecycling", &ags_play_recycling_info, 0); g_type_add_interface_static(ags_type_play_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_play_recycling); } void ags_play_recycling_class_init(AgsPlayRecyclingClass *play_recycling) { GObjectClass *gobject; AgsRecallClass *recall; ags_play_recycling_parent_class = g_type_class_peek_parent(play_recycling); /* GObjectClass */ gobject = (GObjectClass *) play_recycling; gobject->finalize = ags_play_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) play_recycling; recall->done = ags_play_recycling_done; recall->cancel = ags_play_recycling_cancel; recall->duplicate = ags_play_recycling_duplicate; } void ags_play_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_recycling_connect; connectable->disconnect = ags_play_recycling_disconnect; } void ags_play_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_play_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_play_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_play_recycling_disconnect_dynamic; } void ags_play_recycling_init(AgsPlayRecycling *play_recycling) { AGS_RECALL(play_recycling)->child_type = AGS_TYPE_PLAY_AUDIO_SIGNAL; } void ags_play_recycling_connect(AgsConnectable *connectable) { /* call parent */ ags_play_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_play_recycling_disconnect(AgsConnectable *connectable) { /* call parent */ ags_play_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_play_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_play_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_play_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_play_recycling_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_play_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_play_recycling_parent_class)->finalize(gobject); } void ags_play_recycling_done(AgsRecall *recall) { AGS_RECALL_CLASS(ags_play_recycling_parent_class)->done(recall); /* empty */ } void ags_play_recycling_cancel(AgsRecall *recall) { AGS_RECALL_CLASS(ags_play_recycling_parent_class)->cancel(recall); /* empty */ } AgsRecall* ags_play_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPlayRecycling *copy; copy = (AgsPlayRecycling *) AGS_RECALL_CLASS(ags_play_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_play_recycling_new: * @source: the source #AgsRecycling * @soundcard: the #GObject outputting to * @audio_channel: the audio channel to use * * Creates an #AgsPlayRecycling * * Returns: a new #AgsPlayRecycling * * Since: 1.0.0 */ AgsPlayRecycling* ags_play_recycling_new(AgsRecycling *source, GObject *soundcard, guint audio_channel) { AgsPlayRecycling *play_recycling; play_recycling = (AgsPlayRecycling *) g_object_new(AGS_TYPE_PLAY_RECYCLING, "source", source, "soundcard", soundcard, "audio_channel", audio_channel, NULL); return(play_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_peak_channel.h0000644000175000017500000000477313246707333017437 00000000000000/* 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 . */ #ifndef __AGS_PEAK_CHANNEL_H__ #define __AGS_PEAK_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_PEAK_CHANNEL (ags_peak_channel_get_type()) #define AGS_PEAK_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PEAK_CHANNEL, AgsPeakChannel)) #define AGS_PEAK_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PEAK_CHANNEL, AgsPeakChannel)) #define AGS_IS_PEAK_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PEAK_CHANNEL)) #define AGS_IS_PEAK_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PEAK_CHANNEL)) #define AGS_PEAK_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PEAK_CHANNEL, AgsPeakChannelClass)) typedef struct _AgsPeakChannel AgsPeakChannel; typedef struct _AgsPeakChannelClass AgsPeakChannelClass; struct _AgsPeakChannel { AgsRecallChannel recall_channel; pthread_mutexattr_t *buffer_mutexattr; pthread_mutex_t *buffer_mutex; guint samplerate; guint buffer_size; guint format; void *buffer; AgsPort *buffer_cleared; AgsPort *buffer_computed; AgsPort *scale_precision; AgsPort *peak; }; struct _AgsPeakChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_peak_channel_get_type(); G_DEPRECATED void ags_peak_channel_retrieve_peak(AgsPeakChannel *peak_channel, gboolean is_play); void ags_peak_channel_buffer_add(AgsPeakChannel *peak_channel, void *buffer, guint samplerate, guint buffer_size, guint format); void ags_peak_channel_retrieve_peak_internal(AgsPeakChannel *peak_channel); AgsPeakChannel* ags_peak_channel_new(AgsChannel *source); #endif /*__AGS_PEAK_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_mute_audio_signal.c0000644000175000017500000002242113246707333020500 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_mute_audio_signal_class_init(AgsMuteAudioSignalClass *mute_audio_signal); void ags_mute_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mute_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_mute_audio_signal_init(AgsMuteAudioSignal *mute_audio_signal); void ags_mute_audio_signal_connect(AgsConnectable *connectable); void ags_mute_audio_signal_disconnect(AgsConnectable *connectable); void ags_mute_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_mute_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_mute_audio_signal_finalize(GObject *gobject); void ags_mute_audio_signal_run_inter(AgsRecall *recall); AgsRecall* ags_mute_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_mute_audio_signal * @short_description: mutes audio signal * @title: AgsMuteAudioSignal * @section_id: * @include: ags/audio/recall/ags_mute_audio_signal.h * * The #AgsMuteAudioSignal class mutes the audio signal. */ static gpointer ags_mute_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_mute_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_mute_audio_signal_parent_dynamic_connectable_interface; GType ags_mute_audio_signal_get_type() { static GType ags_type_mute_audio_signal = 0; if(!ags_type_mute_audio_signal){ static const GTypeInfo ags_mute_audio_signal_info = { sizeof (AgsMuteAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mute_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMuteAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mute_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mute_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsMuteAudioSignal", &ags_mute_audio_signal_info, 0); g_type_add_interface_static(ags_type_mute_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_mute_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_mute_audio_signal); } void ags_mute_audio_signal_class_init(AgsMuteAudioSignalClass *mute_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; ags_mute_audio_signal_parent_class = g_type_class_peek_parent(mute_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) mute_audio_signal; gobject->finalize = ags_mute_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) mute_audio_signal; recall->run_inter = ags_mute_audio_signal_run_inter; recall->duplicate = ags_mute_audio_signal_duplicate; } void ags_mute_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_mute_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_mute_audio_signal_connect; connectable->disconnect = ags_mute_audio_signal_disconnect; } void ags_mute_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_mute_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_mute_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_mute_audio_signal_disconnect_dynamic; } void ags_mute_audio_signal_init(AgsMuteAudioSignal *mute_audio_signal) { AGS_RECALL(mute_audio_signal)->name = "ags-mute"; AGS_RECALL(mute_audio_signal)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(mute_audio_signal)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(mute_audio_signal)->xml_type = "ags-mute-audio-signal"; AGS_RECALL(mute_audio_signal)->port = NULL; AGS_RECALL(mute_audio_signal)->child_type = G_TYPE_NONE; } void ags_mute_audio_signal_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_mute_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_mute_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_mute_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_mute_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_mute_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_mute_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_mute_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_mute_audio_signal_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_mute_audio_signal_parent_class)->finalize(gobject); } void ags_mute_audio_signal_run_inter(AgsRecall *recall) { AgsMuteAudio *mute_audio; AgsMuteChannel *mute_channel; AgsMuteAudioSignal *mute_audio_signal; AgsAudioSignal *source; GList *stream_source; gboolean audio_muted, channel_muted; guint buffer_size; guint i; GValue audio_value = {0,}; GValue channel_value = {0,}; AGS_RECALL_CLASS(ags_mute_audio_signal_parent_class)->run_inter(recall); mute_audio_signal = AGS_MUTE_AUDIO_SIGNAL(recall); source = AGS_RECALL_AUDIO_SIGNAL(mute_audio_signal)->source; stream_source = source->stream_current; buffer_size = source->buffer_size; if(stream_source == NULL){ ags_recall_done(recall); return; } /* check channel */ mute_channel = AGS_MUTE_CHANNEL(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); g_value_init(&channel_value, G_TYPE_FLOAT); ags_port_safe_read(mute_channel->muted, &channel_value); channel_muted = (gboolean) g_value_get_float(&channel_value); g_value_unset(&channel_value); /* check audio */ mute_audio = AGS_MUTE_AUDIO(AGS_RECALL_CONTAINER(AGS_RECALL(mute_channel)->container)->recall_audio); g_value_init(&audio_value, G_TYPE_FLOAT); ags_port_safe_read(mute_audio->muted, &audio_value); audio_muted = (gboolean) g_value_get_float(&audio_value); g_value_unset(&audio_value); /* if not muted return */ if(!channel_muted && !audio_muted){ return; } /* mute */ memset((signed short *) stream_source->data, 0, buffer_size * sizeof(signed short)); } AgsRecall* ags_mute_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsMuteAudioSignal *mute; mute = (AgsMuteAudioSignal *) AGS_RECALL_CLASS(ags_mute_audio_signal_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) mute); } /** * ags_mute_audio_signal_new: * @source: the source #AgsAudioSignal * * Creates an #AgsMuteAudioSignal * * Returns: a new #AgsMuteAudioSignal * * Since: 1.0.0 */ AgsMuteAudioSignal* ags_mute_audio_signal_new(AgsAudioSignal *source) { AgsMuteAudioSignal *mute_audio_signal; mute_audio_signal = (AgsMuteAudioSignal *) g_object_new(AGS_TYPE_MUTE_AUDIO_SIGNAL, "source", source, NULL); return(mute_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_mute_channel_run.c0000644000175000017500000001514513246707333020343 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_mute_channel_run_class_init(AgsMuteChannelRunClass *mute_channel_run); void ags_mute_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mute_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_mute_channel_run_init(AgsMuteChannelRun *mute_channel_run); void ags_mute_channel_run_connect(AgsConnectable *connectable); void ags_mute_channel_run_disconnect(AgsConnectable *connectable); void ags_mute_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_mute_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_mute_channel_run_finalize(GObject *gobject); AgsRecall* ags_mute_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); static gpointer ags_mute_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_mute_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_mute_channel_run_parent_dynamic_connectable_interface; GType ags_mute_channel_run_get_type() { static GType ags_type_mute_channel_run = 0; if(!ags_type_mute_channel_run){ static const GTypeInfo ags_mute_channel_run_info = { sizeof (AgsMuteChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mute_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMuteChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mute_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mute_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsMuteChannelRun", &ags_mute_channel_run_info, 0); g_type_add_interface_static(ags_type_mute_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_mute_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_mute_channel_run); } void ags_mute_channel_run_class_init(AgsMuteChannelRunClass *mute_channel_run) { GObjectClass *gobject; ags_mute_channel_run_parent_class = g_type_class_peek_parent(mute_channel_run); /* GObjectClass */ gobject = (GObjectClass *) mute_channel_run; gobject->finalize = ags_mute_channel_run_finalize; } void ags_mute_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_mute_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_mute_channel_run_connect; connectable->disconnect = ags_mute_channel_run_disconnect; } void ags_mute_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_mute_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_mute_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_mute_channel_run_disconnect_dynamic; } void ags_mute_channel_run_init(AgsMuteChannelRun *mute_channel_run) { AGS_RECALL(mute_channel_run)->name = "ags-mute"; AGS_RECALL(mute_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(mute_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(mute_channel_run)->xml_type = "ags-mute-channel-run"; AGS_RECALL(mute_channel_run)->port = NULL; AGS_RECALL(mute_channel_run)->flags |= (AGS_RECALL_OUTPUT_ORIENTATED | AGS_RECALL_INPUT_ORIENTATED); AGS_RECALL(mute_channel_run)->child_type = AGS_TYPE_MUTE_RECYCLING; } void ags_mute_channel_run_connect(AgsConnectable *connectable) { ags_mute_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_mute_channel_run_disconnect(AgsConnectable *connectable) { ags_mute_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_mute_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_mute_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_mute_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_mute_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_mute_channel_run_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_mute_channel_run_parent_class)->finalize(gobject); } AgsRecall* ags_mute_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsMuteChannelRun *mute; mute = (AgsMuteChannelRun *) AGS_RECALL_CLASS(ags_mute_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) mute); } AgsMuteChannelRun* ags_mute_channel_run_new(AgsChannel *source) { AgsMuteChannelRun *mute_channel_run; mute_channel_run = (AgsMuteChannelRun *) g_object_new(AGS_TYPE_MUTE_CHANNEL_RUN, "source", source, NULL); return(mute_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_delay_audio_run.c0000644000175000017500000005626013256163135020160 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_delay_audio_run_class_init(AgsDelayAudioRunClass *delay_audio_run); void ags_delay_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_delay_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_delay_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_delay_audio_run_init(AgsDelayAudioRun *delay_audio_run); void ags_delay_audio_run_connect(AgsConnectable *connectable); void ags_delay_audio_run_disconnect(AgsConnectable *connectable); void ags_delay_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_delay_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_delay_audio_run_finalize(GObject *gobject); void ags_delay_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_delay_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_delay_audio_run_run_init_pre(AgsRecall *recall); void ags_delay_audio_run_run_pre(AgsRecall *recall); void ags_delay_audio_run_done(AgsRecall *recall); void ags_delay_audio_run_cancel(AgsRecall *recall); void ags_delay_audio_run_remove(AgsRecall *recall); AgsRecall* ags_delay_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_delay_audio_run_notify_dependency(AgsRecall *recall, guint notify_mode, gint count); /** * SECTION:ags_delay_audio_run * @short_description: delay * @title: AgsDelayAudioRun * @section_id: * @include: ags/audio/recall/ags_delay_audio_run.h * * The #AgsDelayAudioRun class delays. */ enum{ NOTATION_ALLOC_OUTPUT, NOTATION_ALLOC_INPUT, NOTATION_COUNT, SEQUENCER_ALLOC_OUTPUT, SEQUENCER_ALLOC_INPUT, SEQUENCER_COUNT, LAST_SIGNAL, }; static gpointer ags_delay_audio_run_parent_class = NULL; static AgsConnectableInterface *ags_delay_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_delay_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_delay_audio_run_parent_plugin_interface; static guint delay_audio_run_signals[LAST_SIGNAL]; GType ags_delay_audio_run_get_type() { static GType ags_type_delay_audio_run = 0; if(!ags_type_delay_audio_run){ static const GTypeInfo ags_delay_audio_run_info = { sizeof (AgsDelayAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_delay_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsDelayAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_delay_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_delay_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_delay_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_delay_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_delay_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsDelayAudioRun", &ags_delay_audio_run_info, 0); g_type_add_interface_static(ags_type_delay_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_delay_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_delay_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_delay_audio_run); } void ags_delay_audio_run_class_init(AgsDelayAudioRunClass *delay_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; ags_delay_audio_run_parent_class = g_type_class_peek_parent(delay_audio_run); /* GObjectClass */ gobject = (GObjectClass *) delay_audio_run; gobject->finalize = ags_delay_audio_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) delay_audio_run; recall->run_init_pre = ags_delay_audio_run_run_init_pre; recall->run_pre = ags_delay_audio_run_run_pre; recall->done = ags_delay_audio_run_done; recall->cancel = ags_delay_audio_run_cancel; recall->remove = ags_delay_audio_run_remove; recall->duplicate = ags_delay_audio_run_duplicate; recall->notify_dependency = ags_delay_audio_run_notify_dependency; /* AgsDelayAudioRun */ delay_audio_run->notation_alloc_output = NULL; delay_audio_run->notation_alloc_input = NULL; delay_audio_run->notation_count = NULL; delay_audio_run->sequencer_alloc_output = NULL; delay_audio_run->sequencer_alloc_input = NULL; delay_audio_run->sequencer_count = NULL; /* signals */ /** * AgsDelayAudioRun::notation-alloc-output: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * The ::notation-alloc-output signal is emited while allocating * notation output. */ delay_audio_run_signals[NOTATION_ALLOC_OUTPUT] = g_signal_new("notation-alloc-output", G_TYPE_FROM_CLASS(delay_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsDelayAudioRunClass, notation_alloc_output), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_UINT); /** * AgsDelayAudioRun::notation-alloc-input: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * The ::notation-alloc-input signal is emited while allocating * notation input. */ delay_audio_run_signals[NOTATION_ALLOC_INPUT] = g_signal_new("notation-alloc-input", G_TYPE_FROM_CLASS(delay_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsDelayAudioRunClass, notation_alloc_input), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_UINT); /** * AgsDelayAudioRun::notation-count: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * The ::notation-count signal is emited while counting * notation. */ delay_audio_run_signals[NOTATION_COUNT] = g_signal_new("notation-count", G_TYPE_FROM_CLASS(delay_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsDelayAudioRunClass, notation_count), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_UINT); /** * AgsDelayAudioRun::sequencer-alloc-output: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * The ::sequencer-alloc-output signal is emited while allocating * sequencer output. */ delay_audio_run_signals[SEQUENCER_ALLOC_OUTPUT] = g_signal_new("sequencer-alloc-output", G_TYPE_FROM_CLASS(delay_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsDelayAudioRunClass, sequencer_alloc_output), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_UINT); /** * AgsDelayAudioRun::sequencer-alloc-input: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * The ::sequencer-alloc-input signal is emited while allocating * sequencer input. */ delay_audio_run_signals[SEQUENCER_ALLOC_INPUT] = g_signal_new("sequencer-alloc-input", G_TYPE_FROM_CLASS(delay_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsDelayAudioRunClass, sequencer_alloc_input), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_UINT); /** * AgsDelayAudioRun::sequencer-count: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * The ::sequencer-count signal is emited while counting * sequencer. */ delay_audio_run_signals[SEQUENCER_COUNT] = g_signal_new("sequencer-count", G_TYPE_FROM_CLASS(delay_audio_run), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsDelayAudioRunClass, sequencer_count), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_DOUBLE, G_TYPE_UINT); } void ags_delay_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_delay_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_delay_audio_run_connect; connectable->disconnect = ags_delay_audio_run_disconnect; } void ags_delay_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_delay_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_delay_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_delay_audio_run_disconnect_dynamic; } void ags_delay_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_delay_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_delay_audio_run_read; plugin->write = ags_delay_audio_run_write; } void ags_delay_audio_run_init(AgsDelayAudioRun *delay_audio_run) { AGS_RECALL(delay_audio_run)->flags |= AGS_RECALL_PERSISTENT; AGS_RECALL(delay_audio_run)->name = "ags-delay"; AGS_RECALL(delay_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(delay_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(delay_audio_run)->xml_type = "ags-delay-audio-run"; AGS_RECALL(delay_audio_run)->port = NULL; delay_audio_run->dependency_ref = 0; delay_audio_run->hide_ref = 0; delay_audio_run->hide_ref_counter = 0; delay_audio_run->notation_counter = 0; delay_audio_run->sequencer_counter = 0; } void ags_delay_audio_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_delay_audio_run_parent_connectable_interface->connect(connectable); } void ags_delay_audio_run_disconnect(AgsConnectable *connectable) { ags_delay_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_delay_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } ags_delay_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_delay_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) == 0){ return; } ags_delay_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } void ags_delay_audio_run_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_delay_audio_run_parent_class)->finalize(gobject); } void ags_delay_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_delay_audio_run_parent_plugin_interface->read(file, node, plugin); } xmlNode* ags_delay_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_delay_audio_run_parent_plugin_interface->write(file, parent, plugin); return(node); } void ags_delay_audio_run_run_init_pre(AgsRecall *recall) { AgsDelayAudioRun *delay_audio_run; /* call parent class */ AGS_RECALL_CLASS(ags_delay_audio_run_parent_class)->run_init_pre(recall); /* AgsDelayAudioRun */ delay_audio_run = AGS_DELAY_AUDIO_RUN(recall); /* run order */ delay_audio_run->hide_ref_counter = 0; } void ags_delay_audio_run_run_pre(AgsRecall *recall) { AgsDelayAudio *delay_audio; AgsDelayAudioRun *delay_audio_run; AgsMutexManager *mutex_manager; gdouble notation_delay, sequencer_delay; gdouble delay; guint attack; GValue value = { 0, }; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; AGS_RECALL_CLASS(ags_delay_audio_run_parent_class)->run_pre(recall); // g_message("ags_delay_audio_run_run_pre()"); delay_audio_run = AGS_DELAY_AUDIO_RUN(recall); /* check done */ if((AGS_RECALL_PERSISTENT & (recall->flags)) == 0 && delay_audio_run->dependency_ref == 0){ delay_audio_run->notation_counter = 0; delay_audio_run->sequencer_counter = 0; ags_recall_done(recall); return; } delay_audio = AGS_DELAY_AUDIO(AGS_RECALL_AUDIO_RUN(delay_audio_run)->recall_audio); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, recall->soundcard); pthread_mutex_unlock(application_mutex); /* read notation-delay port */ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(delay_audio->notation_delay, &value); notation_delay = g_value_get_double(&value); /* read sequencer-delay port */ g_value_reset(&value); ags_port_safe_read(delay_audio->sequencer_delay, &value); sequencer_delay = g_value_get_double(&value); g_value_unset(&value); if(delay_audio_run->notation_counter + 1 >= (guint) notation_delay){ delay_audio_run->notation_counter = 0; }else{ delay_audio_run->notation_counter += 1; } if(delay_audio_run->sequencer_counter + 1 >= (guint) sequencer_delay){ delay_audio_run->sequencer_counter = 0; }else{ delay_audio_run->sequencer_counter += 1; } /* delay and attack */ pthread_mutex_lock(soundcard_mutex); attack = ags_soundcard_get_attack(AGS_SOUNDCARD(recall->soundcard)); pthread_mutex_unlock(soundcard_mutex); delay = 0.0; /* notation */ if(delay_audio_run->notation_counter == 0){ guint run_order; run_order = 0; //NOTE:JK: old hide_ref style // g_message("ags_delay_audio_run_run_pre@%llu: alloc notation[%u]", // delay_audio_run, // run_order); /* notation speed */ ags_delay_audio_run_notation_alloc_output(delay_audio_run, run_order, delay, attack); ags_delay_audio_run_notation_alloc_input(delay_audio_run, run_order, delay, attack); ags_delay_audio_run_notation_count(delay_audio_run, run_order, delay, attack); }else{ guint run_order; run_order = 0; delay = (gdouble) delay_audio_run->notation_counter; attack = 0; /* notation speed */ ags_delay_audio_run_notation_alloc_output(delay_audio_run, run_order, delay, 0); ags_delay_audio_run_notation_alloc_input(delay_audio_run, run_order, delay, attack); ags_delay_audio_run_notation_count(delay_audio_run, run_order, delay, attack); } /* sequencer */ if(delay_audio_run->sequencer_counter == 0){ guint run_order; run_order = 0; // g_message("ags_delay_audio_run_run_pre@%llu: alloc sequencer[%u]", // delay_audio_run, // run_order); /* sequencer speed */ ags_delay_audio_run_sequencer_alloc_output(delay_audio_run, run_order, delay, 0); ags_delay_audio_run_sequencer_alloc_input(delay_audio_run, run_order, delay, attack); ags_delay_audio_run_sequencer_count(delay_audio_run, run_order, delay, attack); }else{ guint run_order; run_order = 0; delay = (gdouble) delay_audio_run->sequencer_counter; attack = 0; /* sequencer speed */ ags_delay_audio_run_sequencer_alloc_output(delay_audio_run, run_order, delay, attack); ags_delay_audio_run_sequencer_alloc_input(delay_audio_run, run_order, delay, attack); ags_delay_audio_run_sequencer_count(delay_audio_run, run_order, delay, attack); } } void ags_delay_audio_run_done(AgsRecall *recall) { AGS_RECALL_CLASS(ags_delay_audio_run_parent_class)->done(recall); /* empty */ } void ags_delay_audio_run_cancel(AgsRecall *recall) { AGS_RECALL_CLASS(ags_delay_audio_run_parent_class)->cancel(recall); /* empty */ } void ags_delay_audio_run_remove(AgsRecall *recall) { AGS_RECALL_CLASS(ags_delay_audio_run_parent_class)->remove(recall); /* empty */ } AgsRecall* ags_delay_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsDelayAudioRun *delay_audio_run, *copy; delay_audio_run = (AgsDelayAudioRun *) recall; copy = (AgsDelayAudioRun *) AGS_RECALL_CLASS(ags_delay_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); copy->dependency_ref = delay_audio_run->dependency_ref; copy->hide_ref = delay_audio_run->hide_ref; // copy->hide_ref_counter = delay_audio_run->hide_ref_counter; //TODO:JK: may be you want to make a AgsRecallDependency, but a AgsCountable isn't a AgsRecall at all copy->notation_counter = delay_audio_run->notation_counter; copy->sequencer_counter = delay_audio_run->sequencer_counter; return((AgsRecall *) copy); } void ags_delay_audio_run_notify_dependency(AgsRecall *recall, guint notify_mode, gint count) { AgsDelayAudioRun *delay_audio_run; delay_audio_run = AGS_DELAY_AUDIO_RUN(recall); switch(notify_mode){ case AGS_RECALL_NOTIFY_RUN: delay_audio_run->hide_ref += count; // g_message("delay_audio_run->hide_ref: %u\n", delay_audio_run->hide_ref); break; case AGS_RECALL_NOTIFY_AUDIO: break; case AGS_RECALL_NOTIFY_AUDIO_RUN: break; case AGS_RECALL_NOTIFY_CHANNEL: break; case AGS_RECALL_NOTIFY_CHANNEL_RUN: delay_audio_run->dependency_ref += count; break; default: g_message("ags_delay_audio_run.c - ags_delay_audio_run_notify: unknown notify"); } } /** * ags_delay_audio_run_notation_alloc_output: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * Emitted as notation allocs output. * * Since: 1.0.0 */ void ags_delay_audio_run_notation_alloc_output(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack) { g_return_if_fail(AGS_IS_DELAY_AUDIO_RUN(delay_audio_run)); g_object_ref(G_OBJECT(delay_audio_run)); g_signal_emit(G_OBJECT(delay_audio_run), delay_audio_run_signals[NOTATION_ALLOC_OUTPUT], 0, run_order, delay, attack); g_object_unref(G_OBJECT(delay_audio_run)); } /** * ags_delay_audio_run_notation_alloc_input: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * Emitted as notation allocs output. * * Since: 1.0.0 */ void ags_delay_audio_run_notation_alloc_input(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack) { g_return_if_fail(AGS_IS_DELAY_AUDIO_RUN(delay_audio_run)); g_object_ref(G_OBJECT(delay_audio_run)); g_signal_emit(G_OBJECT(delay_audio_run), delay_audio_run_signals[NOTATION_ALLOC_INPUT], 0, run_order, delay, attack); g_object_unref(G_OBJECT(delay_audio_run)); } /** * ags_delay_audio_run_notation_count: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * Emitted as notation counts. * * Since: 1.0.0 */ void ags_delay_audio_run_notation_count(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack) { g_return_if_fail(AGS_IS_DELAY_AUDIO_RUN(delay_audio_run)); g_object_ref(G_OBJECT(delay_audio_run)); g_signal_emit(G_OBJECT(delay_audio_run), delay_audio_run_signals[NOTATION_COUNT], 0, run_order, delay, attack); g_object_unref(G_OBJECT(delay_audio_run)); } /** * ags_delay_audio_run_sequencer_alloc_output: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * Emitted as sequencer allocs output. * * Since: 1.0.0 */ void ags_delay_audio_run_sequencer_alloc_output(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack) { g_return_if_fail(AGS_IS_DELAY_AUDIO_RUN(delay_audio_run)); g_object_ref(G_OBJECT(delay_audio_run)); g_signal_emit(G_OBJECT(delay_audio_run), delay_audio_run_signals[SEQUENCER_ALLOC_OUTPUT], 0, run_order, delay, attack); g_object_unref(G_OBJECT(delay_audio_run)); } /** * ags_delay_audio_run_sequencer_alloc_input: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * Emitted as sequencer allocs output. * * Since: 1.0.0 */ void ags_delay_audio_run_sequencer_alloc_input(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack) { g_return_if_fail(AGS_IS_DELAY_AUDIO_RUN(delay_audio_run)); g_object_ref(G_OBJECT(delay_audio_run)); g_signal_emit(G_OBJECT(delay_audio_run), delay_audio_run_signals[SEQUENCER_ALLOC_INPUT], 0, run_order, delay, attack); g_object_unref(G_OBJECT(delay_audio_run)); } /** * ags_delay_audio_run_sequencer_count: * @delay_audio_run: the #AgsDelayAudioRun * @run_order: the nth run * @delay: the delay * @attack: the attack * * Emitted as sequencer counts. * * Since: 1.0.0 */ void ags_delay_audio_run_sequencer_count(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack) { g_return_if_fail(AGS_IS_DELAY_AUDIO_RUN(delay_audio_run)); g_object_ref(G_OBJECT(delay_audio_run)); g_signal_emit(G_OBJECT(delay_audio_run), delay_audio_run_signals[SEQUENCER_COUNT], 0, run_order, delay, attack); g_object_unref(G_OBJECT(delay_audio_run)); } /** * ags_delay_audio_run_new: * * Creates an #AgsDelayAudioRun * * Returns: a new #AgsDelayAudioRun * * Since: 1.0.0 */ AgsDelayAudioRun* ags_delay_audio_run_new() { AgsDelayAudioRun *delay_audio_run; delay_audio_run = (AgsDelayAudioRun *) g_object_new(AGS_TYPE_DELAY_AUDIO_RUN, NULL); return(delay_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_play_notation_audio.c0000644000175000017500000001107013256163135021044 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_play_notation_audio_class_init(AgsPlayNotationAudioClass *play_notation_audio); void ags_play_notation_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_play_notation_audio_init(AgsPlayNotationAudio *play_notation_audio); void ags_play_notation_audio_finalize(GObject *gobject); void ags_play_notation_audio_set_ports(AgsPlugin *plugin, GList *port); /** * SECTION:ags_play_notation_audio * @short_description: play audio notation * @title: AgsPlayNotationAudio * @section_id: * @include: ags/audio/recall/ags_play_notation_audio.h * * The #AgsPlayNotationAudio class provides ports to the effect processor. */ static gpointer ags_play_notation_audio_parent_class = NULL; static AgsPluginInterface *ags_play_notation_parent_plugin_interface; static const gchar *ags_play_notation_audio_plugin_name = "ags-play-notation"; static const gchar *ags_play_notation_audio_specifier[] = { }; static const gchar *ags_play_notation_audio_control_port[] = { }; GType ags_play_notation_audio_get_type() { static GType ags_type_play_notation_audio = 0; if(!ags_type_play_notation_audio){ static const GTypeInfo ags_play_notation_audio_info = { sizeof (AgsPlayNotationAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_notation_audio_class_init, NULL, /* class_finalize */ NULL, /* class_audio */ sizeof (AgsPlayNotationAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_notation_audio_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_play_notation_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_notation_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsPlayNotationAudio", &ags_play_notation_audio_info, 0); g_type_add_interface_static(ags_type_play_notation_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_play_notation_audio); } void ags_play_notation_audio_class_init(AgsPlayNotationAudioClass *play_notation_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_play_notation_audio_parent_class = g_type_class_peek_parent(play_notation_audio); /* GObjectClass */ gobject = (GObjectClass *) play_notation_audio; gobject->finalize = ags_play_notation_audio_finalize; } void ags_play_notation_audio_plugin_interface_init(AgsPluginInterface *plugin) { ags_play_notation_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->set_ports = ags_play_notation_audio_set_ports; } void ags_play_notation_audio_init(AgsPlayNotationAudio *play_notation_audio) { GList *port; AGS_RECALL(play_notation_audio)->name = "ags-play-notation"; AGS_RECALL(play_notation_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_notation_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_notation_audio)->xml_type = "ags-play-notation-audio"; port = NULL; /* set port */ AGS_RECALL(play_notation_audio)->port = port; } void ags_play_notation_audio_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_play_notation_audio_parent_class)->finalize(gobject); } void ags_play_notation_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ port = port->next; } } /** * ags_play_notation_audio_new: * * Creates an #AgsPlayNotationAudio * * Returns: a new #AgsPlayNotationAudio * * Since: 1.0.0 */ AgsPlayNotationAudio* ags_play_notation_audio_new() { AgsPlayNotationAudio *play_notation_audio; play_notation_audio = (AgsPlayNotationAudio *) g_object_new(AGS_TYPE_PLAY_NOTATION_AUDIO, NULL); return(play_notation_audio); } gsequencer-1.4.24/ags/audio/recall/ags_envelope_channel_run.c0000644000175000017500000001610013246707333021176 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_envelope_channel_run_class_init(AgsEnvelopeChannelRunClass *envelope_channel_run); void ags_envelope_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_envelope_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_envelope_channel_run_init(AgsEnvelopeChannelRun *envelope_channel_run); void ags_envelope_channel_run_connect(AgsConnectable *connectable); void ags_envelope_channel_run_disconnect(AgsConnectable *connectable); void ags_envelope_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_envelope_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_envelope_channel_run_finalize(GObject *gobject); AgsRecall* ags_envelope_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); static gpointer ags_envelope_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_envelope_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_envelope_channel_run_parent_dynamic_connectable_interface; GType ags_envelope_channel_run_get_type() { static GType ags_type_envelope_channel_run = 0; if(!ags_type_envelope_channel_run){ static const GTypeInfo ags_envelope_channel_run_info = { sizeof (AgsEnvelopeChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_envelope_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsEnvelopeChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_envelope_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_envelope_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_envelope_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsEnvelopeChannelRun", &ags_envelope_channel_run_info, 0); g_type_add_interface_static(ags_type_envelope_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_envelope_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_envelope_channel_run); } void ags_envelope_channel_run_class_init(AgsEnvelopeChannelRunClass *envelope_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_envelope_channel_run_parent_class = g_type_class_peek_parent(envelope_channel_run); /* GObjectClass */ gobject = (GObjectClass *) envelope_channel_run; gobject->finalize = ags_envelope_channel_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) envelope_channel_run; } void ags_envelope_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_envelope_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_envelope_channel_run_connect; connectable->disconnect = ags_envelope_channel_run_disconnect; } void ags_envelope_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_envelope_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_envelope_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_envelope_channel_run_disconnect_dynamic; } void ags_envelope_channel_run_init(AgsEnvelopeChannelRun *envelope_channel_run) { AGS_RECALL(envelope_channel_run)->name = "ags-envelope"; AGS_RECALL(envelope_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(envelope_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(envelope_channel_run)->xml_type = "ags-envelope-channel-run"; AGS_RECALL(envelope_channel_run)->port = NULL; AGS_RECALL(envelope_channel_run)->flags |= (AGS_RECALL_OUTPUT_ORIENTATED | AGS_RECALL_INPUT_ORIENTATED); AGS_RECALL(envelope_channel_run)->child_type = AGS_TYPE_ENVELOPE_RECYCLING; } void ags_envelope_channel_run_connect(AgsConnectable *connectable) { ags_envelope_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_envelope_channel_run_disconnect(AgsConnectable *connectable) { ags_envelope_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_envelope_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_envelope_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_envelope_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_envelope_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_envelope_channel_run_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_envelope_channel_run_parent_class)->finalize(gobject); } AgsRecall* ags_envelope_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsEnvelopeChannelRun *envelope; envelope = (AgsEnvelopeChannelRun *) AGS_RECALL_CLASS(ags_envelope_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) envelope); } AgsEnvelopeChannelRun* ags_envelope_channel_run_new(AgsChannel *source) { AgsEnvelopeChannelRun *envelope_channel_run; envelope_channel_run = (AgsEnvelopeChannelRun *) g_object_new(AGS_TYPE_ENVELOPE_CHANNEL_RUN, "source", source, NULL); return(envelope_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_volume_audio_signal.h0000644000175000017500000000415613246707333021047 00000000000000/* 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 . */ #ifndef __AGS_VOLUME_AUDIO_SIGNAL_H__ #define __AGS_VOLUME_AUDIO_SIGNAL_H__ #include #include #include #define AGS_TYPE_VOLUME_AUDIO_SIGNAL (ags_volume_audio_signal_get_type()) #define AGS_VOLUME_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_VOLUME_AUDIO_SIGNAL, AgsVolumeAudioSignal)) #define AGS_VOLUME_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_VOLUME_AUDIO_SIGNAL, AgsVolumeAudioSignalClass)) #define AGS_IS_VOLUME_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_VOLUME_AUDIO_SIGNAL)) #define AGS_IS_VOLUME_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_VOLUME_AUDIO_SIGNAL)) #define AGS_VOLUME_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_VOLUME_AUDIO_SIGNAL, AgsVolumeAudioSignalClass)) typedef struct _AgsVolumeAudioSignal AgsVolumeAudioSignal; typedef struct _AgsVolumeAudioSignalClass AgsVolumeAudioSignalClass; struct _AgsVolumeAudioSignal { AgsRecallAudioSignal recall_audio_signal; }; struct _AgsVolumeAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_volume_audio_signal_get_type(); AgsVolumeAudioSignal* ags_volume_audio_signal_new(AgsAudioSignal *audio_signal); #endif /*__AGS_VOLUME_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_feed_recycling.h0000644000175000017500000000373713246707333017770 00000000000000/* 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 . */ #ifndef __AGS_FEED_RECYCLING_H__ #define __AGS_FEED_RECYCLING_H__ #include #include #include #define AGS_TYPE_FEED_RECYCLING (ags_feed_recycling_get_type()) #define AGS_FEED_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FEED_RECYCLING, AgsFeedRecycling)) #define AGS_FEED_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FEED_RECYCLING, AgsFeedRecyclingClass)) #define AGS_IS_FEED_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FEED_RECYCLING)) #define AGS_IS_FEED_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FEED_RECYCLING)) #define AGS_FEED_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_FEED_RECYCLING, AgsFeedRecyclingClass)) typedef struct _AgsFeedRecycling AgsFeedRecycling; typedef struct _AgsFeedRecyclingClass AgsFeedRecyclingClass; struct _AgsFeedRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsFeedRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_feed_recycling_get_type(); AgsFeedRecycling* ags_feed_recycling_new(AgsRecycling *recycling); #endif /*__AGS_FEED_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_note.c0000644000175000017500000001702013246707333017001 00000000000000/* 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 . */ #include #include #include #include void ags_play_note_class_init(AgsPlayNoteClass *play_note); void ags_play_note_init(AgsPlayNote *play_note); void ags_play_note_finalize(GObject *gobject); void ags_play_note_connect(AgsPlayNote *play_note); void ags_play_note_map_play_audio_signal(AgsRecall *recall, AgsRecallID *recall_id, gpointer data); void ags_play_note(AgsRecall *recall, AgsRecallID *recall_id, gpointer data); void ags_play_note_stop(AgsRecall *recall, AgsRecallID *recall_id, gpointer data); void ags_play_note_cancel(AgsRecall *recall, AgsRecallID *recall_id, gpointer data); void ags_play_note_play_audio_signal_done(AgsRecall *recall, AgsRecallID *recall_id, gpointer data); static gpointer ags_play_note_parent_class = NULL; GType ags_play_note_get_type() { static GType ags_type_play_note = 0; if(!ags_type_play_note){ static const GTypeInfo ags_play_note_info = { sizeof (AgsPlayNoteClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_note_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayNote), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_note_init, }; ags_type_play_note = g_type_register_static(AGS_TYPE_RECALL, "AgsPlayNote", &ags_play_note_info, 0); } return (ags_type_play_note); } void ags_play_note_class_init(AgsPlayNoteClass *play_note) { GObjectClass *gobject; ags_play_note_parent_class = g_type_class_peek_parent(play_note); gobject = (GObjectClass *) play_note; gobject->finalize = ags_play_note_finalize; } void ags_play_note_init(AgsPlayNote *play_note) { play_note->soundcard = NULL; play_note->note = NULL; play_note->channel = NULL; } void ags_play_note_finalize(GObject *gobject) { /* AgsPlayNote *play_note; GList *list, *list_next; play_note = AGS_PLAY_NOTE(gobject); list = play_note->recall.recall; while(list != NULL){ list_next = list->next; g_object_unref(G_OBJECT(list->data)); g_list_free1(list); list = list_next; } */ G_OBJECT_CLASS(ags_play_note_parent_class)->finalize(gobject); } void ags_play_note_connect(AgsPlayNote *play_note) { // ags_recall_connect(AGS_RECALL(play_note)); g_signal_connect((GObject *) play_note, "run_inter", G_CALLBACK(ags_play_note), NULL); g_signal_connect((GObject *) play_note, "stop", G_CALLBACK(ags_play_note_stop), NULL); g_signal_connect((GObject *) play_note, "cancel", G_CALLBACK(ags_play_note_cancel), NULL); } void ags_play_note_map_play_audio_signal(AgsRecall *recall, AgsRecallID *recall_id, gpointer data) { AgsPlayNotationAudioRun *play_notation_audio_run; AgsPlayNote *play_note; AgsChannel *channel; AgsRecycling *recycling; AgsAudioSignal *audio_signal; AgsPlayAudioSignal *play_audio_signal; GList *start_play_audio_signal, *list_play_audio_signal; gboolean first_recall; /* void ags_play_note_map_play_audio_signal_real(){ audio_signal->flags |= AGS_AUDIO_SIGNAL_PLAY; audio_signal->audio_channel = channel->audio_channel; play_audio_signal = ags_play_audio_signal_new(); play_audio_signal->soundcard = play_note->soundcard; play_audio_signal->audio_signal = audio_signal; AGS_RECALL(play_audio_signal)->parent = (GObject *) play_note; ags_play_audio_signal_connect(play_audio_signal); g_signal_connect((GObject *) play_audio_signal, "done", G_CALLBACK(ags_play_note_play_audio_signal_done), NULL); if(first_recall){ start_play_audio_signal = list_play_audio_signal = g_list_alloc(); first_recall = FALSE; }else{ list_play_audio_signal->next = g_list_alloc(); list_play_audio_signal->next->prev = list_play_audio_signal; list_play_audio_signal = list_play_audio_signal->next; } list_play_audio_signal->data = (gpointer) play_audio_signal; } play_notation_audio_run = (AgsPlayNotationAudioRun *) recall->parent; play_note = (AgsPlayNote *) recall; channel = ags_channel_nth_pad(play_notation_audio_run->channel, play_note->note->y); if(channel != NULL){ recycling = channel->first_recycling; first_recall = TRUE; start_play_audio_signal = NULL; if((AGS_NOTE_DEFAULT_LENGTH & play_note->note->flags) != 0){ while(recycling != channel->last_recycling->next){ audio_signal = ags_recycling_add_audio_signal(recycling); ags_play_note_map_play_audio_signal_real(); recycling = recycling->next; } }else{ guint length; length = ((double) (play_note->note->x[1] - play_note->note->x[0]) * ((double) play_note->soundcard->frequence * 60.0 / play_notation_audio_run->bpm[0] / 16.0)); while(recycling != channel->last_recycling->next){ audio_signal = ags_recycling_add_audio_signal_with_length(recycling, length); ags_play_note_map_play_audio_signal_real(); recycling = recycling->next; } } play_note->recall.recall = g_list_concat(play_note->recall.recall, start_play_audio_signal); }else{ g_signal_emit_by_name((GObject *) recall, "done", recall_id); } */ } void ags_play_note(AgsRecall *recall, AgsRecallID *recall_id, gpointer data) { /* GList *list, *list_next; GStaticMutex mutex = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&mutex); if(recall->recall == NULL){ g_signal_emit_by_name((GObject *) recall, "done", recall_id); g_static_mutex_unlock(&mutex); }else{ g_static_mutex_unlock(&mutex); list = recall->recall; while(list != NULL){ list_next = list->next; g_signal_emit_by_name(G_OBJECT(list->data), "run_inter", recall_id); list = list_next; } } */ } void ags_play_note_stop(AgsRecall *recall, AgsRecallID *recall_id, gpointer data) { /* GList *list, *list_next; list = recall->recall; recall->recall = NULL; while(list != NULL){ list_next = list->next; g_object_unref(G_OBJECT(list->data)); g_list_free1(list); list = list_next; } */ } void ags_play_note_cancel(AgsRecall *recall, AgsRecallID *recall_id, gpointer data) { } void ags_play_note_play_audio_signal_done(AgsRecall *recall, AgsRecallID *recall_id, gpointer data) { /* AgsPlayNote *play_note; AgsPlayAudioSignal *play_audio_signal; play_note = AGS_PLAY_NOTE(recall->parent); play_audio_signal = AGS_PLAY_AUDIO_SIGNAL(recall); AGS_RECALL(play_note)->recall = g_list_remove(AGS_RECALL(play_note)->recall, recall); g_object_unref(G_OBJECT(play_audio_signal)); if(play_note->recall.recall == NULL){ g_signal_emit_by_name((GObject *) play_note, "done", recall_id); } */ } AgsPlayNote* ags_play_note_new() { AgsPlayNote *play_note; play_note = (AgsPlayNote *) g_object_new(AGS_TYPE_PLAY_NOTE, NULL); return(play_note); } gsequencer-1.4.24/ags/audio/recall/ags_copy_channel.h0000644000175000017500000000375513246707333017470 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_COPY_CHANNEL_H__ #define __AGS_COPY_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_COPY_CHANNEL (ags_copy_channel_get_type()) #define AGS_COPY_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_CHANNEL, AgsCopyChannel)) #define AGS_COPY_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_CHANNEL, AgsCopyChannel)) #define AGS_IS_COPY_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COPY_CHANNEL)) #define AGS_IS_COPY_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COPY_CHANNEL)) #define AGS_COPY_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COPY_CHANNEL, AgsCopyChannelClass)) typedef struct _AgsCopyChannel AgsCopyChannel; typedef struct _AgsCopyChannelClass AgsCopyChannelClass; struct _AgsCopyChannel { AgsRecallChannel recall_channel; AgsPort *muted; }; struct _AgsCopyChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_copy_channel_get_type(); AgsCopyChannel* ags_copy_channel_new(AgsChannel *destination, AgsChannel *source); #endif /*__AGS_COPY_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_loop_channel.c0000644000175000017500000002201413247044247017446 00000000000000/* 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 . */ #include #include #include void ags_loop_channel_class_init(AgsLoopChannelClass *loop_channel); void ags_loop_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_loop_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_loop_channel_init(AgsLoopChannel *loop_channel); void ags_loop_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_loop_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_loop_channel_connect(AgsConnectable *connectable); void ags_loop_channel_disconnect(AgsConnectable *connectable); void ags_loop_channel_dispose(GObject *gobject); void ags_loop_channel_finalize(GObject *gobject); void ags_loop_channel_sequencer_duration_changed_callback(AgsDelayAudio *delay_audio, AgsLoopChannel *loop_channel); /** * SECTION:ags_loop_channel * @short_description: loops channel * @title: AgsLoopChannel * @section_id: * @include: ags/audio/recall/ags_loop_channel.h * * The #AgsLoopChannel class provides ports to the effect processor. */ static gpointer ags_loop_channel_parent_class = NULL; static AgsConnectableInterface *ags_loop_channel_parent_connectable_interface; static AgsPluginInterface *ags_loop_channel_parent_plugin_interface; enum{ PROP_0, PROP_DELAY_AUDIO, }; GType ags_loop_channel_get_type() { static GType ags_type_loop_channel = 0; if(!ags_type_loop_channel){ static const GTypeInfo ags_loop_channel_info = { sizeof (AgsLoopChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_loop_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLoopChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_loop_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_loop_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_loop_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_loop_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsLoopChannel", &ags_loop_channel_info, 0); g_type_add_interface_static(ags_type_loop_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_loop_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_loop_channel); } void ags_loop_channel_class_init(AgsLoopChannelClass *loop_channel) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_loop_channel_parent_class = g_type_class_peek_parent(loop_channel); /* GObjectClass */ gobject = (GObjectClass *) loop_channel; gobject->set_property = ags_loop_channel_set_property; gobject->get_property = ags_loop_channel_get_property; gobject->dispose = ags_loop_channel_dispose; gobject->finalize = ags_loop_channel_finalize; /* properties */ /** * AgsLoopChannel:delay-audio: * * The assigned #AgsDelayAudio. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("delay-audio", "assigned delay audio", "The delay audio it is assigned with", AGS_TYPE_DELAY_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_AUDIO, param_spec); } void ags_loop_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_loop_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_loop_channel_connect; connectable->disconnect = ags_loop_channel_disconnect; } void ags_loop_channel_plugin_interface_init(AgsPluginInterface *plugin) { ags_loop_channel_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_loop_channel_init(AgsLoopChannel *loop_channel) { AGS_RECALL(loop_channel)->name = "ags-loop"; AGS_RECALL(loop_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(loop_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(loop_channel)->xml_type = "ags-loop-channel"; AGS_RECALL(loop_channel)->port = NULL; loop_channel->delay_audio = NULL; } void ags_loop_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLoopChannel *loop_channel; loop_channel = AGS_LOOP_CHANNEL(gobject); switch(prop_id){ case PROP_DELAY_AUDIO: { AgsDelayAudio *delay_audio; delay_audio = (AgsDelayAudio *) g_value_get_object(value); if(loop_channel->delay_audio == delay_audio){ return; } if(loop_channel->delay_audio != NULL){ g_object_disconnect(G_OBJECT(loop_channel->delay_audio), "any_signal::sequencer-duration-changed", G_CALLBACK(ags_loop_channel_sequencer_duration_changed_callback), loop_channel, NULL); g_object_unref(G_OBJECT(loop_channel->delay_audio)); } if(delay_audio != NULL){ g_object_ref(G_OBJECT(delay_audio)); g_signal_connect(G_OBJECT(delay_audio), "sequencer-duration-changed", G_CALLBACK(ags_loop_channel_sequencer_duration_changed_callback), loop_channel); } loop_channel->delay_audio = delay_audio; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_loop_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLoopChannel *loop_channel; loop_channel = AGS_LOOP_CHANNEL(gobject); switch(prop_id){ case PROP_DELAY_AUDIO: { g_value_set_object(value, loop_channel->delay_audio); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_loop_channel_dispose(GObject *gobject) { AgsLoopChannel *loop_channel; loop_channel = AGS_LOOP_CHANNEL(gobject); /* delay audio */ if(loop_channel->delay_audio != NULL){ g_object_unref(G_OBJECT(loop_channel->delay_audio)); loop_channel->delay_audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_loop_channel_parent_class)->dispose(gobject); } void ags_loop_channel_finalize(GObject *gobject) { AgsLoopChannel *loop_channel; loop_channel = AGS_LOOP_CHANNEL(gobject); /* delay audio */ if(loop_channel->delay_audio != NULL){ g_object_unref(G_OBJECT(loop_channel->delay_audio)); } /* call parent */ G_OBJECT_CLASS(ags_loop_channel_parent_class)->finalize(gobject); } void ags_loop_channel_connect(AgsConnectable *connectable) { AgsLoopChannel *loop_channel; if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_loop_channel_parent_connectable_interface->connect(connectable); /* */ loop_channel = AGS_LOOP_CHANNEL(connectable); if(loop_channel->delay_audio != NULL){ g_signal_connect(G_OBJECT(loop_channel->delay_audio), "sequencer-duration-changed", G_CALLBACK(ags_loop_channel_sequencer_duration_changed_callback), loop_channel); } } void ags_loop_channel_disconnect(AgsConnectable *connectable) { AgsLoopChannel *loop_channel; if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } ags_loop_channel_parent_connectable_interface->disconnect(connectable); /* */ loop_channel = AGS_LOOP_CHANNEL(connectable); if(loop_channel->delay_audio != NULL){ g_object_disconnect(G_OBJECT(loop_channel->delay_audio), "any_signal::sequencer-duration-changed", G_CALLBACK(ags_loop_channel_sequencer_duration_changed_callback), loop_channel, NULL); } } void ags_loop_channel_sequencer_duration_changed_callback(AgsDelayAudio *delay_audio, AgsLoopChannel *loop_channel) { /* empty */ } /** * ags_loop_channel_new: * * Creates an #AgsLoopChannel * * Returns: a new #AgsLoopChannel * * Since: 1.0.0 */ AgsLoopChannel* ags_loop_channel_new() { AgsLoopChannel *loop_channel; loop_channel = (AgsLoopChannel *) g_object_new(AGS_TYPE_LOOP_CHANNEL, NULL); return(loop_channel); } gsequencer-1.4.24/ags/audio/recall/ags_play_lv2_audio.c0000644000175000017500000006115313246707333017726 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_play_lv2_audio_class_init(AgsPlayLv2AudioClass *play_lv2_audio); void ags_play_lv2_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_lv2_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_play_lv2_audio_init(AgsPlayLv2Audio *play_lv2_audio); void ags_play_lv2_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_play_lv2_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_play_lv2_audio_connect(AgsConnectable *connectable); void ags_play_lv2_audio_disconnect(AgsConnectable *connectable); void ags_play_lv2_audio_set_ports(AgsPlugin *plugin, GList *port); void ags_play_lv2_audio_dispose(GObject *gobject); void ags_play_lv2_audio_finalize(GObject *gobject); void ags_play_lv2_audio_set_ports(AgsPlugin *plugin, GList *port); void ags_play_lv2_audio_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_play_lv2_audio_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); /** * SECTION:ags_play_lv2_audio * @short_description: play audio lv2 * @title: AgsPlayLv2Audio * @section_id: * @include: ags/audio/recall/ags_play_lv2_audio.h * * The #AgsPlayLv2Audio class provides ports to the effect processor. */ enum{ PROP_0, PROP_TURTLE, PROP_FILENAME, PROP_EFFECT, PROP_URI, PROP_INDEX, }; static gpointer ags_play_lv2_audio_parent_class = NULL; static AgsConnectableInterface* ags_play_lv2_audio_parent_connectable_interface; static AgsPluginInterface *ags_play_lv2_parent_plugin_interface; static const gchar *ags_play_lv2_audio_plugin_name = "ags-play-lv2"; static const gchar *ags_play_lv2_audio_specifier[] = { }; static const gchar *ags_play_lv2_audio_control_port[] = { }; GType ags_play_lv2_audio_get_type() { static GType ags_type_play_lv2_audio = 0; if(!ags_type_play_lv2_audio){ static const GTypeInfo ags_play_lv2_audio_info = { sizeof (AgsPlayLv2AudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_lv2_audio_class_init, NULL, /* class_finalize */ NULL, /* class_audio */ sizeof (AgsPlayLv2Audio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_lv2_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_lv2_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_play_lv2_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_lv2_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsPlayLv2Audio", &ags_play_lv2_audio_info, 0); g_type_add_interface_static(ags_type_play_lv2_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_lv2_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_play_lv2_audio); } void ags_play_lv2_audio_class_init(AgsPlayLv2AudioClass *play_lv2_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_play_lv2_audio_parent_class = g_type_class_peek_parent(play_lv2_audio); /* GObjectClass */ gobject = (GObjectClass *) play_lv2_audio; gobject->set_property = ags_play_lv2_audio_set_property; gobject->get_property = ags_play_lv2_audio_get_property; gobject->dispose = ags_play_lv2_audio_dispose; gobject->finalize = ags_play_lv2_audio_finalize; /* properties */ /** * AgsPlayLv2Audio:turtle: * * The assigned turtle. * * Since: 1.0.0 */ param_spec = g_param_spec_object("turtle", i18n_pspec("turtle of recall lv2"), i18n_pspec("The turtle which this recall lv2 is described by"), AGS_TYPE_TURTLE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TURTLE, param_spec); /** * AgsPlayLv2Audio:filename: * * The plugins filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the object file"), i18n_pspec("The filename as string of object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsPlayLv2Audio:effect: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsPlayLv2Audio:uri: * * The uri's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("uri", i18n_pspec("the uri"), i18n_pspec("The uri's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_URI, param_spec); /** * AgsPlayLv2Audio:index: * * The uri's index. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("index", i18n_pspec("index of uri"), i18n_pspec("The numerical index of uri"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); } void ags_play_lv2_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_lv2_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_lv2_audio_connect; connectable->disconnect = ags_play_lv2_audio_disconnect; } void ags_play_lv2_audio_plugin_interface_init(AgsPluginInterface *plugin) { ags_play_lv2_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_play_lv2_audio_read; plugin->write = ags_play_lv2_audio_write; plugin->set_ports = ags_play_lv2_audio_set_ports; } void ags_play_lv2_audio_init(AgsPlayLv2Audio *play_lv2_audio) { GList *port; AGS_RECALL(play_lv2_audio)->name = "ags-play-lv2"; AGS_RECALL(play_lv2_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_lv2_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_lv2_audio)->xml_type = "ags-play-lv2-audio"; play_lv2_audio->turtle = NULL; play_lv2_audio->filename = NULL; play_lv2_audio->effect = NULL; play_lv2_audio->uri = NULL; play_lv2_audio->index = 0; play_lv2_audio->plugin = NULL; play_lv2_audio->plugin_descriptor = NULL; play_lv2_audio->input_port = NULL; play_lv2_audio->input_lines = 0; play_lv2_audio->output_port = NULL; play_lv2_audio->output_lines = 0; play_lv2_audio->event_port = 0; play_lv2_audio->atom_port = 0; play_lv2_audio->bank = 0; play_lv2_audio->program = 0; } void ags_play_lv2_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayLv2Audio *play_lv2_audio; play_lv2_audio = AGS_PLAY_LV2_AUDIO(gobject); switch(prop_id){ case PROP_TURTLE: { AgsTurtle *turtle; turtle = (AgsTurtle *) g_value_get_object(value); if(play_lv2_audio->turtle == turtle){ return; } if(play_lv2_audio->turtle != NULL){ g_object_unref(play_lv2_audio->turtle); } if(turtle != NULL){ g_object_ref(turtle); } play_lv2_audio->turtle = turtle; } break; case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(filename == play_lv2_audio->filename){ return; } if(play_lv2_audio->filename != NULL){ g_free(play_lv2_audio->filename); } play_lv2_audio->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == play_lv2_audio->effect){ return; } if(play_lv2_audio->effect != NULL){ g_free(play_lv2_audio->effect); } play_lv2_audio->effect = g_strdup(effect); } break; case PROP_URI: { gchar *uri; uri = g_value_get_string(value); if(uri == play_lv2_audio->uri){ return; } if(play_lv2_audio->uri != NULL){ g_free(play_lv2_audio->uri); } play_lv2_audio->uri = g_strdup(uri); } break; case PROP_INDEX: { uint32_t index; index = g_value_get_ulong(value); if(index == play_lv2_audio->index){ return; } play_lv2_audio->index = index; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_play_lv2_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayLv2Audio *play_lv2_audio; play_lv2_audio = AGS_PLAY_LV2_AUDIO(gobject); switch(prop_id){ case PROP_TURTLE: { g_value_set_object(value, play_lv2_audio->turtle); } break; case PROP_FILENAME: { g_value_set_string(value, play_lv2_audio->filename); } break; case PROP_EFFECT: { g_value_set_string(value, play_lv2_audio->effect); } break; case PROP_URI: { g_value_set_string(value, play_lv2_audio->uri); } break; case PROP_INDEX: { g_value_set_ulong(value, play_lv2_audio->index); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_lv2_audio_connect(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } /* load automation */ ags_recall_load_automation(recall, g_list_copy(recall->port)); /* call parent */ ags_play_lv2_audio_parent_connectable_interface->connect(connectable); } void ags_play_lv2_audio_disconnect(AgsConnectable *connectable) { ags_play_lv2_audio_parent_connectable_interface->disconnect(connectable); } void ags_play_lv2_audio_dispose(GObject *gobject) { AgsPlayLv2Audio *play_lv2_audio; play_lv2_audio = AGS_PLAY_LV2_AUDIO(gobject); /* turtle */ if(play_lv2_audio->turtle != NULL){ g_object_unref(play_lv2_audio->turtle); play_lv2_audio->turtle = NULL; } /* call parent */ G_OBJECT_CLASS(ags_play_lv2_audio_parent_class)->dispose(gobject); } void ags_play_lv2_audio_finalize(GObject *gobject) { AgsPlayLv2Audio *play_lv2_audio; play_lv2_audio = AGS_PLAY_LV2_AUDIO(gobject); /* turtle */ if(play_lv2_audio->turtle != NULL){ g_object_unref(play_lv2_audio->turtle); } /* filename, effect and uri */ g_free(play_lv2_audio->filename); g_free(play_lv2_audio->effect); g_free(play_lv2_audio->uri); /* call parent */ G_OBJECT_CLASS(ags_play_lv2_audio_parent_class)->finalize(gobject); } void ags_play_lv2_audio_set_ports(AgsPlugin *plugin, GList *port) { AgsPlayLv2Audio *play_lv2_audio; AgsPort *current; AgsLv2Plugin *lv2_plugin; GList *list; GList *port_descriptor; unsigned long port_count; unsigned long i; play_lv2_audio = AGS_PLAY_LV2_AUDIO(plugin); lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), play_lv2_audio->filename, play_lv2_audio->effect); port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; if(port_descriptor != NULL){ port_count = g_list_length(port_descriptor); for(i = 0; i < port_count; i++){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ gchar *specifier; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; if(specifier == NULL){ port_descriptor = port_descriptor->next; continue; } list = port; current = NULL; while(list != NULL){ if(!g_strcmp0(specifier, AGS_PORT(list->data)->specifier)){ current = list->data; break; } list = list->next; } if(current != NULL){ current->port_descriptor = port_descriptor->data; ags_play_lv2_audio_load_conversion(play_lv2_audio, (GObject *) current, port_descriptor->data); current->port_value.ags_port_float = (float) ags_conversion_convert(current->conversion, g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value), FALSE); #ifdef AGS_DEBUG g_message("connecting port: %d/%d", i, port_count); #endif } }else if((AGS_PORT_DESCRIPTOR_AUDIO & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(play_lv2_audio->input_port == NULL){ play_lv2_audio->input_port = (uint32_t *) malloc(sizeof(uint32_t)); play_lv2_audio->input_port[0] = i; }else{ play_lv2_audio->input_port = (uint32_t *) realloc(play_lv2_audio->input_port, (play_lv2_audio->input_lines + 1) * sizeof(uint32_t)); play_lv2_audio->input_port[play_lv2_audio->input_lines] = i; } play_lv2_audio->input_lines += 1; }else if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(play_lv2_audio->output_port == NULL){ play_lv2_audio->output_port = (uint32_t *) malloc(sizeof(uint32_t)); play_lv2_audio->output_port[0] = i; }else{ play_lv2_audio->output_port = (uint32_t *) realloc(play_lv2_audio->output_port, (play_lv2_audio->output_lines + 1) * sizeof(uint32_t)); play_lv2_audio->output_port[play_lv2_audio->output_lines] = i; } play_lv2_audio->output_lines += 1; } } port_descriptor = port_descriptor->next; } AGS_RECALL(play_lv2_audio)->port = g_list_reverse(port); } } void ags_play_lv2_audio_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsPlayLv2Audio *gobject; AgsLv2Plugin *lv2_plugin; gchar *filename, *effect, *uri; uint32_t index; gobject = AGS_PLAY_LV2_AUDIO(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); filename = xmlGetProp(node, "filename"); effect = xmlGetProp(node, "effect"); uri = xmlGetProp(node, "uri"); index = g_ascii_strtoull(xmlGetProp(node, "index"), NULL, 10); g_object_set(gobject, "filename", filename, "effect", effect, "uri", uri, "index", index, NULL); ags_play_lv2_audio_load(gobject); } xmlNode* ags_play_lv2_audio_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsPlayLv2Audio *play_lv2_audio; xmlNode *node; GList *list; gchar *id; play_lv2_audio = AGS_PLAY_LV2_AUDIO(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-recall-lv2"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", play_lv2_audio, NULL)); xmlNewProp(node, "filename", g_strdup(play_lv2_audio->filename)); xmlNewProp(node, "effect", g_strdup(play_lv2_audio->effect)); xmlNewProp(node, "uri", g_strdup(play_lv2_audio->uri)); xmlNewProp(node, "index", g_strdup_printf("%d", play_lv2_audio->index)); xmlAddChild(parent, node); return(node); } /** * ags_play_lv2_audio_load: * @play_lv2_audio: an #AgsPlayLv2Audio * * Set up LV2 handle. * * Since: 1.0.0 */ void ags_play_lv2_audio_load(AgsPlayLv2Audio *play_lv2_audio) { AgsLv2Plugin *lv2_plugin; void *plugin_so; LV2_Descriptor_Function lv2_descriptor; LV2_Descriptor *plugin_descriptor; /* */ play_lv2_audio->plugin = lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), play_lv2_audio->filename, play_lv2_audio->effect); plugin_so = AGS_BASE_PLUGIN(lv2_plugin)->plugin_so; if(plugin_so != NULL){ lv2_descriptor = (LV2_Descriptor_Function) dlsym(plugin_so, "lv2_descriptor"); if(dlerror() == NULL && lv2_descriptor){ play_lv2_audio->plugin_descriptor = plugin_descriptor = lv2_descriptor(play_lv2_audio->index); if((AGS_LV2_PLUGIN_NEEDS_WORKER & (lv2_plugin->flags)) != 0){ play_lv2_audio->flags |= AGS_PLAY_LV2_AUDIO_HAS_WORKER; } } } } /** * ags_play_lv2_audio_load_ports: * @play_lv2_audio: an #AgsPlayLv2Audio * * Set up LV2 ports. * * Returns: a #GList containing #AgsPort. * * Since: 1.0.0 */ GList* ags_play_lv2_audio_load_ports(AgsPlayLv2Audio *play_lv2_audio) { AgsPort *current; AgsLv2Plugin *lv2_plugin; GList *port; GList *port_descriptor; uint32_t port_count; uint32_t i; lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), play_lv2_audio->filename, play_lv2_audio->effect); #ifdef AGS_DEBUG g_message("ports from ttl: %s", lv2_plugin->turtle->filename); #endif port = NULL; port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; if(port_descriptor != NULL){ port_count = g_list_length(port_descriptor); for(i = 0; i < port_count; i++){ #ifdef AGS_DEBUG g_message("Lv2 plugin port-index: %d", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index); #endif if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_EVENT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ play_lv2_audio->flags |= AGS_PLAY_LV2_AUDIO_HAS_EVENT_PORT; play_lv2_audio->event_port = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; } if((AGS_PORT_DESCRIPTOR_ATOM & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ play_lv2_audio->flags |= AGS_PLAY_LV2_AUDIO_HAS_ATOM_PORT; play_lv2_audio->atom_port = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; } } if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0 && ((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0 || (AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0)){ gchar *plugin_name; gchar *specifier; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; if(specifier == NULL){ port_descriptor = port_descriptor->next; continue; } plugin_name = g_strdup_printf("lv2-<%s>", lv2_plugin->uri); current = g_object_new(AGS_TYPE_PORT, "plugin-name", plugin_name, "specifier", specifier, "control-port", g_strdup_printf("%u/%u", i, port_count), "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, NULL); g_object_ref(current); if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ AGS_RECALL(play_lv2_audio)->flags |= AGS_RECALL_HAS_OUTPUT_PORT; current->flags |= AGS_PORT_IS_OUTPUT; }else{ if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0 && (AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0 && AGS_PORT_DESCRIPTOR(port_descriptor->data)->scale_steps == -1){ current->flags |= AGS_PORT_INFINITE_RANGE; } } current->port_descriptor = port_descriptor->data; ags_play_lv2_audio_load_conversion(play_lv2_audio, (GObject *) current, port_descriptor->data); current->port_value.ags_port_float = (float) ags_conversion_convert(current->conversion, g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value), FALSE); #ifdef AGS_DEBUG g_message("connecting port: %s %d/%d", specifier, i, port_count); #endif port = g_list_prepend(port, current); }else if((AGS_PORT_DESCRIPTOR_AUDIO & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(play_lv2_audio->input_port == NULL){ play_lv2_audio->input_port = (uint32_t *) malloc(sizeof(uint32_t)); play_lv2_audio->input_port[0] = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; }else{ play_lv2_audio->input_port = (uint32_t *) realloc(play_lv2_audio->input_port, (play_lv2_audio->input_lines + 1) * sizeof(uint32_t)); play_lv2_audio->input_port[play_lv2_audio->input_lines] = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; } play_lv2_audio->input_lines += 1; }else if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(play_lv2_audio->output_port == NULL){ play_lv2_audio->output_port = (uint32_t *) malloc(sizeof(uint32_t)); play_lv2_audio->output_port[0] = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; }else{ play_lv2_audio->output_port = (uint32_t *) realloc(play_lv2_audio->output_port, (play_lv2_audio->output_lines + 1) * sizeof(uint32_t)); play_lv2_audio->output_port[play_lv2_audio->output_lines] = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; } play_lv2_audio->output_lines += 1; } } port_descriptor = port_descriptor->next; } AGS_RECALL(play_lv2_audio)->port = g_list_reverse(port); } return(g_list_copy(AGS_RECALL(play_lv2_audio)->port)); } /** * ags_play_lv2_audio_load_conversion: * @play_lv2_audio: the #AgsPlayLv2Audio * @port: an #AgsPort * @port_descriptor: the #AgsPortDescriptor-struct * * Loads conversion object by using @port_descriptor and sets in on @port. * * Since: 1.0.0 */ void ags_play_lv2_audio_load_conversion(AgsPlayLv2Audio *play_lv2_audio, GObject *port, gpointer port_descriptor) { AgsLv2Conversion *lv2_conversion; if(play_lv2_audio == NULL || port == NULL || port_descriptor == NULL){ return; } lv2_conversion = NULL; if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ lv2_conversion = ags_lv2_conversion_new(); g_object_set(port, "conversion", lv2_conversion, NULL); lv2_conversion->flags |= AGS_LV2_CONVERSION_LOGARITHMIC; } } /** * ags_play_lv2_audio_find: * @recall: a #GList containing #AgsRecall * @filename: plugin filename * @uri: uri's name * * Retrieve LV2 recall. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_play_lv2_audio_find(GList *recall, gchar *filename, gchar *uri) { while(recall != NULL){ if(AGS_IS_PLAY_LV2_AUDIO(recall->data)){ if(!g_strcmp0(AGS_PLAY_LV2_AUDIO(recall->data)->filename, filename) && !g_strcmp0(AGS_PLAY_LV2_AUDIO(recall->data)->uri, uri)){ return(recall); } } recall = recall->next; } return(NULL); } /** * ags_play_lv2_audio_new: * * Creates an #AgsPlayLv2Audio * * Returns: a new #AgsPlayLv2Audio * * Since: 1.0.0 */ AgsPlayLv2Audio* ags_play_lv2_audio_new() { AgsPlayLv2Audio *play_lv2_audio; play_lv2_audio = (AgsPlayLv2Audio *) g_object_new(AGS_TYPE_PLAY_LV2_AUDIO, NULL); return(play_lv2_audio); } gsequencer-1.4.24/ags/audio/recall/ags_feed_audio_signal.c0000644000175000017500000001736413247044247020442 00000000000000/* 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 . */ #include #include #include #include void ags_feed_audio_signal_class_init(AgsFeedAudioSignalClass *feed_audio_signal); void ags_feed_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_feed_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_feed_audio_signal_init(AgsFeedAudioSignal *feed_audio_signal); void ags_feed_audio_signal_connect(AgsConnectable *connectable); void ags_feed_audio_signal_disconnect(AgsConnectable *connectable); void ags_feed_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_feed_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_feed_audio_signal_finalize(GObject *gobject); void ags_feed_audio_signal_run_pre(AgsRecall *recall); AgsRecall* ags_feed_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_feed_audio_signal * @short_description: feeds audio signal * @title: AgsFeedAudioSignal * @section_id: * @include: ags/audio/recall/ags_feed_audio_signal.h * * The #AgsFeedAudioSignal class feeds the audio signal. */ static gpointer ags_feed_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_feed_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_feed_audio_signal_parent_dynamic_connectable_interface; GType ags_feed_audio_signal_get_type() { static GType ags_type_feed_audio_signal = 0; if(!ags_type_feed_audio_signal){ static const GTypeInfo ags_feed_audio_signal_info = { sizeof (AgsFeedAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_feed_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFeedAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_feed_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_feed_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_feed_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_feed_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsFeedAudioSignal", &ags_feed_audio_signal_info, 0); g_type_add_interface_static(ags_type_feed_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_feed_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_feed_audio_signal); } void ags_feed_audio_signal_class_init(AgsFeedAudioSignalClass *feed_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_feed_audio_signal_parent_class = g_type_class_peek_parent(feed_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) feed_audio_signal; gobject->finalize = ags_feed_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) feed_audio_signal; recall->run_pre = ags_feed_audio_signal_run_pre; } void ags_feed_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_feed_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_feed_audio_signal_connect; connectable->disconnect = ags_feed_audio_signal_disconnect; } void ags_feed_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_feed_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_feed_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_feed_audio_signal_disconnect_dynamic; } void ags_feed_audio_signal_init(AgsFeedAudioSignal *feed_audio_signal) { AGS_RECALL(feed_audio_signal)->name = "ags-feed"; AGS_RECALL(feed_audio_signal)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(feed_audio_signal)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(feed_audio_signal)->xml_type = "ags-feed-audio-signal"; AGS_RECALL(feed_audio_signal)->port = NULL; } void ags_feed_audio_signal_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_feed_audio_signal_parent_class)->finalize(gobject); /* empty */ } void ags_feed_audio_signal_connect(AgsConnectable *connectable) { /* call parent */ ags_feed_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_feed_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_feed_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_feed_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_feed_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_feed_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_feed_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_feed_audio_signal_run_pre(AgsRecall *recall) { AgsAudioSignal *template, *audio_signal; AgsNote *note; AGS_RECALL_CLASS(ags_feed_audio_signal_parent_class)->run_pre(recall); if(recall->rt_safe){ return; } audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall)->source; note = audio_signal->note->data; template = NULL; if(AGS_RECALL_AUDIO_SIGNAL(recall)->source->note != NULL && (AGS_NOTE_FEED & (note->flags)) != 0){ gdouble notation_delay; guint frame_count; if(audio_signal->recycling != NULL){ template = ags_audio_signal_get_template(AGS_RECYCLING(audio_signal->recycling)->audio_signal); } /* get notation delay */ notation_delay = ags_soundcard_get_absolute_delay(AGS_SOUNDCARD(recall->soundcard)); /* feed audio signal */ frame_count = (guint) (((gdouble) audio_signal->samplerate / notation_delay) * (gdouble) (note->x[1] - note->x[0])); //FIXME:JK: not thread-safe ags_audio_signal_feed(audio_signal, template, frame_count); }else{ ags_recall_done(recall); } } /** * ags_feed_audio_signal_new: * @audio_signal: an #AgsAudioSignal * * Creates an #AgsFeedAudioSignal * * Returns: a new #AgsFeedAudioSignal * * Since: 1.0.0 */ AgsFeedAudioSignal* ags_feed_audio_signal_new(AgsAudioSignal *audio_signal) { AgsFeedAudioSignal *feed_audio_signal; feed_audio_signal = (AgsFeedAudioSignal *) g_object_new(AGS_TYPE_FEED_AUDIO_SIGNAL, NULL); return(feed_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_copy_pattern_audio_run.c0000644000175000017500000005146213247044247021572 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_copy_pattern_audio_run_class_init(AgsCopyPatternAudioRunClass *copy_pattern_audio_run); void ags_copy_pattern_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_copy_pattern_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_copy_pattern_audio_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_copy_pattern_audio_run_init(AgsCopyPatternAudioRun *copy_pattern_audio_run); void ags_copy_pattern_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_copy_pattern_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_copy_pattern_audio_run_dispose(GObject *gobject); void ags_copy_pattern_audio_run_finalize(GObject *gobject); void ags_copy_pattern_audio_run_connect(AgsConnectable *connectable); void ags_copy_pattern_audio_run_disconnect(AgsConnectable *connectable); void ags_copy_pattern_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_pattern_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_pattern_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_copy_pattern_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_copy_pattern_audio_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_copy_pattern_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_copy_pattern_audio_run_notify_dependency(AgsRecall *recall, guint notify_mode, gint count); void ags_copy_pattern_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); void ags_copy_pattern_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall); /** * SECTION:ags_copy_pattern_audio_run * @short_description: copy pattern * @title: AgsCopyPatternAudioRun * @section_id: * @include: ags/audio/recall/ags_copy_pattern_audio_run.h * * The #AgsCopyPatternAudioRun class copy pattern. */ enum{ PROP_0, PROP_DELAY_AUDIO_RUN, PROP_COUNT_BEATS_AUDIO_RUN, }; static gpointer ags_copy_pattern_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_copy_pattern_audio_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_copy_pattern_audio_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_copy_pattern_audio_run_parent_plugin_interface; GType ags_copy_pattern_audio_run_get_type() { static GType ags_type_copy_pattern_audio_run = 0; if(!ags_type_copy_pattern_audio_run){ static const GTypeInfo ags_copy_pattern_audio_run_info = { sizeof (AgsCopyPatternAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_pattern_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyPatternAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_pattern_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_pattern_audio_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_pattern_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_copy_pattern_audio_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_copy_pattern_audio_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_RUN, "AgsCopyPatternAudioRun", &ags_copy_pattern_audio_run_info, 0); g_type_add_interface_static(ags_type_copy_pattern_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_copy_pattern_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_copy_pattern_audio_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_copy_pattern_audio_run); } void ags_copy_pattern_audio_run_class_init(AgsCopyPatternAudioRunClass *copy_pattern_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_copy_pattern_audio_run_parent_class = g_type_class_peek_parent(copy_pattern_audio_run); /* GObjectClass */ gobject = (GObjectClass *) copy_pattern_audio_run; gobject->set_property = ags_copy_pattern_audio_run_set_property; gobject->get_property = ags_copy_pattern_audio_run_get_property; gobject->dispose = ags_copy_pattern_audio_run_dispose; gobject->finalize = ags_copy_pattern_audio_run_finalize; /* properties */ /** * AgsCopyPatternAudioRun:delay-audio-run: * * The delay audio run dependency. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("delay-audio-run", i18n_pspec("assigned AgsDelayAudioRun"), i18n_pspec("the AgsDelayAudioRun which emits alloc signal"), AGS_TYPE_DELAY_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_AUDIO_RUN, param_spec); /** * AgsCopyPatternAudioRun:count-beats-audio-run: * * The count beats audio run dependency. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("count-beats-audio-run", i18n_pspec("assigned AgsCountBeatsAudioRun"), i18n_pspec("the AgsCountBeatsAudioRun which emits beat signal"), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT_BEATS_AUDIO_RUN, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) copy_pattern_audio_run; recall->resolve_dependencies = ags_copy_pattern_audio_run_resolve_dependencies; recall->duplicate = ags_copy_pattern_audio_run_duplicate; recall->notify_dependency = ags_copy_pattern_audio_run_notify_dependency; } void ags_copy_pattern_audio_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_copy_pattern_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_copy_pattern_audio_run_connect; connectable->disconnect = ags_copy_pattern_audio_run_disconnect; } void ags_copy_pattern_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_copy_pattern_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_copy_pattern_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_copy_pattern_audio_run_disconnect_dynamic; } void ags_copy_pattern_audio_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_copy_pattern_audio_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_copy_pattern_audio_run_read; plugin->write = ags_copy_pattern_audio_run_write; } void ags_copy_pattern_audio_run_init(AgsCopyPatternAudioRun *copy_pattern_audio_run) { AGS_RECALL(copy_pattern_audio_run)->name = "ags-copy-pattern"; AGS_RECALL(copy_pattern_audio_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(copy_pattern_audio_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(copy_pattern_audio_run)->xml_type = "ags-copy-pattern-audio-run"; AGS_RECALL(copy_pattern_audio_run)->port = NULL; copy_pattern_audio_run->hide_ref = 0; copy_pattern_audio_run->hide_ref_counter = 0; copy_pattern_audio_run->delay_audio_run = NULL; copy_pattern_audio_run->count_beats_audio_run = NULL; } void ags_copy_pattern_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCopyPatternAudioRun *copy_pattern_audio_run; copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { AgsDelayAudioRun *delay_audio_run; gboolean is_template; delay_audio_run = (AgsDelayAudioRun *) g_value_get_object(value); if(copy_pattern_audio_run->delay_audio_run == delay_audio_run) return; if(delay_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(delay_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(copy_pattern_audio_run->delay_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(copy_pattern_audio_run), (AgsRecall *) copy_pattern_audio_run->delay_audio_run); } g_object_unref(G_OBJECT(copy_pattern_audio_run->delay_audio_run)); } if(delay_audio_run != NULL){ g_object_ref(G_OBJECT(delay_audio_run)); if(is_template){ ags_recall_add_dependency(AGS_RECALL(copy_pattern_audio_run), ags_recall_dependency_new((GObject *) delay_audio_run)); } } copy_pattern_audio_run->delay_audio_run = delay_audio_run; } break; case PROP_COUNT_BEATS_AUDIO_RUN: { AgsCountBeatsAudioRun *count_beats_audio_run; gboolean is_template; count_beats_audio_run = (AgsCountBeatsAudioRun *) g_value_get_object(value); if(copy_pattern_audio_run->count_beats_audio_run == count_beats_audio_run){ return; } if(count_beats_audio_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(count_beats_audio_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(copy_pattern_audio_run->count_beats_audio_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(copy_pattern_audio_run), (AgsRecall *) copy_pattern_audio_run->count_beats_audio_run); } g_object_unref(G_OBJECT(copy_pattern_audio_run->count_beats_audio_run)); } if(count_beats_audio_run != NULL){ g_object_ref(G_OBJECT(count_beats_audio_run)); if(is_template){ ags_recall_add_dependency(AGS_RECALL(copy_pattern_audio_run), ags_recall_dependency_new((GObject *) count_beats_audio_run)); } } copy_pattern_audio_run->count_beats_audio_run = count_beats_audio_run; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_copy_pattern_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCopyPatternAudioRun *copy_pattern_audio_run; copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(gobject); switch(prop_id){ case PROP_DELAY_AUDIO_RUN: { g_value_set_object(value, copy_pattern_audio_run->delay_audio_run); } break; case PROP_COUNT_BEATS_AUDIO_RUN: { g_value_set_object(value, copy_pattern_audio_run->count_beats_audio_run); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_copy_pattern_audio_run_dispose(GObject *gobject) { AgsCopyPatternAudioRun *copy_pattern_audio_run; copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(gobject); /* delay audio run */ if(copy_pattern_audio_run->delay_audio_run != NULL){ g_object_unref(copy_pattern_audio_run->delay_audio_run); copy_pattern_audio_run->delay_audio_run = NULL; } /* count beats audio run */ if(copy_pattern_audio_run->count_beats_audio_run != NULL){ g_object_unref(copy_pattern_audio_run->count_beats_audio_run); copy_pattern_audio_run->count_beats_audio_run = NULL; } /* call parent */ G_OBJECT_CLASS(ags_copy_pattern_audio_run_parent_class)->dispose(gobject); } void ags_copy_pattern_audio_run_finalize(GObject *gobject) { AgsCopyPatternAudioRun *copy_pattern_audio_run; copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(gobject); /* delay audio run */ if(copy_pattern_audio_run->delay_audio_run != NULL){ g_object_unref(copy_pattern_audio_run->delay_audio_run); } /* count beats audio run */ if(copy_pattern_audio_run->count_beats_audio_run != NULL){ g_object_unref(copy_pattern_audio_run->count_beats_audio_run); } /* call parent */ G_OBJECT_CLASS(ags_copy_pattern_audio_run_parent_class)->finalize(gobject); } void ags_copy_pattern_audio_run_connect(AgsConnectable *connectable) { /* call parent */ ags_copy_pattern_audio_run_parent_connectable_interface->connect(connectable); } void ags_copy_pattern_audio_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_copy_pattern_audio_run_parent_connectable_interface->disconnect(connectable); } void ags_copy_pattern_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_copy_pattern_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_copy_pattern_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_copy_pattern_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_copy_pattern_audio_run_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *iter; /* read parent */ ags_copy_pattern_audio_run_parent_plugin_interface->read(file, node, plugin); /* read depenendency */ iter = node->children; while(iter != NULL){ if(iter->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(iter->name, "ags-dependency-list", 19)){ xmlNode *dependency_node; dependency_node = iter->children; while(dependency_node != NULL){ if(dependency_node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(dependency_node->name, "ags-dependency", 15)){ file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", G_OBJECT(plugin), NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_copy_pattern_audio_run_read_resolve_dependency), AGS_RECALL(plugin)); } } dependency_node = dependency_node->next; } } } iter = iter->next; } } xmlNode* ags_copy_pattern_audio_run_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsFileLookup *file_lookup; xmlNode *node, *child; xmlNode *dependency_node; GList *list; gchar *id; /* write parent */ node = ags_copy_pattern_audio_run_parent_plugin_interface->write(file, parent, plugin); /* write dependencies */ child = xmlNewNode(NULL, "ags-dependency-list"); xmlNewProp(child, AGS_FILE_ID_PROP, ags_id_generator_create_uuid()); xmlAddChild(node, child); list = AGS_RECALL(plugin)->dependencies; while(list != NULL){ id = ags_id_generator_create_uuid(); dependency_node = xmlNewNode(NULL, "ags-dependency"); xmlNewProp(dependency_node, AGS_FILE_ID_PROP, id); xmlAddChild(child, dependency_node); file_lookup = (AgsFileLookup *) g_object_new(AGS_TYPE_FILE_LOOKUP, "file", file, "node", dependency_node, "reference", list->data, NULL); ags_file_add_lookup(file, (GObject *) file_lookup); g_signal_connect(G_OBJECT(file_lookup), "resolve", G_CALLBACK(ags_copy_pattern_audio_run_write_resolve_dependency), AGS_RECALL(plugin)); list = list->next; } return(node); } AgsRecall* ags_copy_pattern_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsCopyPatternAudioRun *copy; copy = AGS_COPY_PATTERN_AUDIO_RUN(AGS_RECALL_CLASS(ags_copy_pattern_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); return((AgsRecall *) copy); } void ags_copy_pattern_audio_run_notify_dependency(AgsRecall *recall, guint notify_mode, gint count) { AgsCopyPatternAudioRun *copy_pattern_audio_run; copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(recall); switch(notify_mode){ case AGS_RECALL_NOTIFY_RUN: break; case AGS_RECALL_NOTIFY_AUDIO: break; case AGS_RECALL_NOTIFY_AUDIO_RUN: break; case AGS_RECALL_NOTIFY_CHANNEL: break; case AGS_RECALL_NOTIFY_CHANNEL_RUN: copy_pattern_audio_run->hide_ref += count; g_message("copy_pattern_audio_run->hide_ref: %u\n", copy_pattern_audio_run->hide_ref); break; default: g_message("ags_copy_pattern_audio_run.c - ags_copy_pattern_audio_run_notify: unknown notify"); } } void ags_copy_pattern_audio_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallContainer *recall_container; AgsRecallID *recall_id; AgsRecallDependency *recall_dependency; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GList *list; guint i, i_stop; recall_container = AGS_RECALL_CONTAINER(recall->container); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ template = AGS_RECALL(list->data); }else{ g_warning("AgsRecallClass::resolve - missing dependency"); return; } list = template->dependencies; delay_audio_run = NULL; count_beats_audio_run = NULL; i_stop = 2; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); recall_id = recall->recall_id; if(AGS_IS_DELAY_AUDIO_RUN(recall_dependency->dependency)){ delay_audio_run = (AgsDelayAudioRun *) ags_recall_dependency_resolve(recall_dependency, (AgsRecallID *) recall_id->recycling_context->parent->recall_id); i++; }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(recall_dependency->dependency)){ count_beats_audio_run = (AgsCountBeatsAudioRun *) ags_recall_dependency_resolve(recall_dependency, (AgsRecallID *) recall_id->recycling_context->parent->recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "delay-audio-run", delay_audio_run, "count-beats-audio-run", count_beats_audio_run, NULL); } void ags_copy_pattern_audio_run_write_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *id; id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_reference(file_lookup->file, AGS_RECALL_DEPENDENCY(file_lookup->ref)->dependency); id = xmlGetProp(id_ref->node, AGS_FILE_ID_PROP); xmlNewProp(file_lookup->node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id)); } void ags_copy_pattern_audio_run_read_resolve_dependency(AgsFileLookup *file_lookup, GObject *recall) { AgsFileIdRef *id_ref; gchar *xpath; xpath = (gchar *) xmlGetProp(file_lookup->node, "xpath"); id_ref = (AgsFileIdRef *) ags_file_find_id_ref_by_xpath(file_lookup->file, xpath); if(AGS_IS_DELAY_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "delay-audio-run", id_ref->ref, NULL); }else if(AGS_IS_COUNT_BEATS_AUDIO_RUN(id_ref->ref)){ g_object_set(G_OBJECT(recall), "count-beats-audio-run", id_ref->ref, NULL); } } /** * ags_copy_pattern_audio_run_new: * @count_beats_audio_run: an #AgsCountBeatsAudioRun as dependency * * Creates an #AgsCopyPatternAudioRun * * Returns: a new #AgsCopyPatternAudioRun * * Since: 1.0.0 */ AgsCopyPatternAudioRun* ags_copy_pattern_audio_run_new(AgsCountBeatsAudioRun *count_beats_audio_run) { AgsCopyPatternAudioRun *copy_pattern_audio_run; copy_pattern_audio_run = (AgsCopyPatternAudioRun *) g_object_new(AGS_TYPE_COPY_PATTERN_AUDIO_RUN, "count-beats-audio-run", count_beats_audio_run, NULL); return(copy_pattern_audio_run); } gsequencer-1.4.24/ags/audio/recall/ags_feed_audio_signal.h0000644000175000017500000000407013246707333020436 00000000000000/* 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 . */ #ifndef __AGS_FEED_AUDIO_SIGNAL_H__ #define __AGS_FEED_AUDIO_SIGNAL_H__ #include #include #include #define AGS_TYPE_FEED_AUDIO_SIGNAL (ags_feed_audio_signal_get_type()) #define AGS_FEED_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FEED_AUDIO_SIGNAL, AgsFeedAudioSignal)) #define AGS_FEED_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FEED_AUDIO_SIGNAL, AgsFeedAudioSignalClass)) #define AGS_IS_FEED_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FEED_AUDIO_SIGNAL)) #define AGS_IS_FEED_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FEED_AUDIO_SIGNAL)) #define AGS_FEED_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_FEED_AUDIO_SIGNAL, AgsFeedAudioSignalClass)) typedef struct _AgsFeedAudioSignal AgsFeedAudioSignal; typedef struct _AgsFeedAudioSignalClass AgsFeedAudioSignalClass; struct _AgsFeedAudioSignal { AgsRecallAudioSignal recall_audio_signal; }; struct _AgsFeedAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_feed_audio_signal_get_type(); AgsFeedAudioSignal* ags_feed_audio_signal_new(AgsAudioSignal *audio_signal); #endif /*__AGS_FEED_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_volume_channel_run.h0000644000175000017500000000413113246707333020676 00000000000000/* 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 . */ #ifndef __AGS_VOLUME_CHANNEL_RUN_H__ #define __AGS_VOLUME_CHANNEL_RUN_H__ #include #include #include #include #define AGS_TYPE_VOLUME_CHANNEL_RUN (ags_volume_channel_run_get_type()) #define AGS_VOLUME_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, AGS_TYPE_VOLUME_CHANNEL_RUN, AgsVolumeChannelRun)) #define AGS_VOLUME_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_INSTANCE_CAST(class, AGS_TYPE_VOLUME_CHANNEL_RUN, AgsVolumeChannelRunClass)) #define AGS_IS_VOLUME_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_VOLUME_CHANNEL_RUN)) #define AGS_IS_VOLUME_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_VOLUME_CHANNEL_RUN)) #define AGS_VOLUME_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_VOLUME_CHANNEL_RUN, AgsVolumeChannelRunClass)) typedef struct _AgsVolumeChannelRun AgsVolumeChannelRun; typedef struct _AgsVolumeChannelRunClass AgsVolumeChannelRunClass; struct _AgsVolumeChannelRun { AgsRecallChannelRun recall_channel_run; }; struct _AgsVolumeChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_volume_channel_run_get_type(); AgsVolumeChannelRun* ags_volume_channel_run_new(AgsChannel *channel); #endif /*__AGS_VOLUME_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_copy_channel_run.h0000644000175000017500000000504713246707333020350 00000000000000/* 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 . */ #ifndef __AGS_COPY_CHANNEL_RUN_H__ #define __AGS_COPY_CHANNEL_RUN_H__ #include #include #include #include #include #define AGS_TYPE_COPY_CHANNEL_RUN (ags_copy_channel_run_get_type()) #define AGS_COPY_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_CHANNEL_RUN, AgsCopyChannelRun)) #define AGS_COPY_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_CHANNEL_RUN, AgsCopyChannelRunClass)) #define AGS_IS_COPY_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_COPY_CHANNEL_RUN)) #define AGS_IS_COPY_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_COPY_CHANNEL_RUN)) #define AGS_COPY_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_COPY_CHANNEL_RUN, AgsCopyChannelRunClass)) typedef struct _AgsCopyChannelRun AgsCopyChannelRun; typedef struct _AgsCopyChannelRunClass AgsCopyChannelRunClass; /** * AgsCopyChannelRunFlags: * @AGS_COPY_CHANNEL_RUN_EXACT_LENGTH: * @AGS_COPY_CHANNEL_RUN_OMIT_FURTHER_ATTACK: * * Enum values to control the behavior or indicate internal state of #AgsCopyChannelRun by * enable/disable as flags. */ typedef enum{ AGS_COPY_CHANNEL_RUN_EXACT_LENGTH = 1, AGS_COPY_CHANNEL_RUN_OMIT_FURTHER_ATTACK = 1 << 1, }AgsCopyChannelRunFlags; struct _AgsCopyChannelRun { AgsRecallChannelRun recall_channel_run; guint flags; }; struct _AgsCopyChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_copy_channel_run_get_type(); AgsCopyChannelRun* ags_copy_channel_run_new(AgsChannel *destination, AgsChannel *source, GObject *soundcard); #endif /*__AGS_COPY_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_stream_channel_run.c0000644000175000017500000001767513247044247020675 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_stream_channel_run_class_init(AgsStreamChannelRunClass *stream_channel_run); void ags_stream_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_stream_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_stream_channel_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_stream_channel_run_init(AgsStreamChannelRun *stream_channel_run); void ags_stream_channel_run_connect(AgsConnectable *connectable); void ags_stream_channel_run_disconnect(AgsConnectable *connectable); void ags_stream_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_stream_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_stream_channel_run_finalize(GObject *gobject); AgsRecall* ags_stream_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_stream_channel_run * @short_description: streams channel * @title: AgsStreamChannelRun * @section_id: * @include: ags/audio/recall/ags_stream_channel_run.h * * The #AgsStreamChannelRun class streams the channel. */ static gpointer ags_stream_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_stream_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_stream_channel_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_stream_channel_run_parent_plugin_interface; GType ags_stream_channel_run_get_type() { static GType ags_type_stream_channel_run = 0; if(!ags_type_stream_channel_run){ static const GTypeInfo ags_stream_channel_run_info = { sizeof (AgsStreamChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_stream_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsStreamChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_stream_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_stream_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_stream_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_stream_channel_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_stream_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsStreamChannelRun", &ags_stream_channel_run_info, 0); g_type_add_interface_static(ags_type_stream_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_stream_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_stream_channel_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_stream_channel_run); } void ags_stream_channel_run_class_init(AgsStreamChannelRunClass *stream_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; ags_stream_channel_run_parent_class = g_type_class_peek_parent(stream_channel_run); /* GObjectClass */ gobject = (GObjectClass *) stream_channel_run; gobject->finalize = ags_stream_channel_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) stream_channel_run; recall->duplicate = ags_stream_channel_run_duplicate; } void ags_stream_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_stream_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_stream_channel_run_connect; connectable->disconnect = ags_stream_channel_run_disconnect; } void ags_stream_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_stream_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_stream_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_stream_channel_run_disconnect_dynamic; } void ags_stream_channel_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_stream_channel_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_stream_channel_run_init(AgsStreamChannelRun *stream_channel_run) { AGS_RECALL(stream_channel_run)->name = "ags-stream"; AGS_RECALL(stream_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(stream_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(stream_channel_run)->xml_type = "ags-stream-channel-run"; AGS_RECALL(stream_channel_run)->port = NULL; AGS_RECALL(stream_channel_run)->flags |= AGS_RECALL_INPUT_ORIENTATED; AGS_RECALL(stream_channel_run)->child_type = AGS_TYPE_STREAM_RECYCLING; } void ags_stream_channel_run_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_stream_channel_run_parent_class)->finalize(gobject); } void ags_stream_channel_run_connect(AgsConnectable *connectable) { /* call parent */ ags_stream_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_stream_channel_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_stream_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_stream_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_stream_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_stream_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsChannel *channel; AgsStreamChannelRun *stream_channel_run; ags_stream_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } AgsRecall* ags_stream_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsStreamChannelRun *copy; copy = (AgsStreamChannelRun *) AGS_RECALL_CLASS(ags_stream_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_stream_channel_run_new: * * Creates an #AgsStreamChannelRun * * Returns: a new #AgsStreamChannelRun * * Since: 1.0.0 */ AgsStreamChannelRun* ags_stream_channel_run_new() { AgsStreamChannelRun *stream_channel_run; stream_channel_run = (AgsStreamChannelRun *) g_object_new(AGS_TYPE_STREAM_CHANNEL_RUN, NULL); return(stream_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_play_channel_run.c0000644000175000017500000004606713247044247020344 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_play_channel_run_class_init(AgsPlayChannelRunClass *play_channel_run); void ags_play_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_play_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_play_channel_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_play_channel_run_init(AgsPlayChannelRun *play_channel_run); void ags_play_channel_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_play_channel_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_play_channel_run_connect(AgsConnectable *connectable); void ags_play_channel_run_disconnect(AgsConnectable *connectable); void ags_play_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_play_channel_run_dispose(GObject *gobject); void ags_play_channel_run_finalize(GObject *gobject); void ags_play_channel_run_run_init_inter(AgsRecall *recall); void ags_play_channel_run_run_pre(AgsRecall *recall); void ags_play_channel_run_run_post(AgsRecall *recall); void ags_play_channel_run_remove(AgsRecall *recall); void ags_play_channel_run_cancel(AgsRecall *recall); void ags_play_channel_run_resolve_dependencies(AgsRecall *recall); AgsRecall* ags_play_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_play_channel_run_stream_audio_signal_done_callback(AgsRecall *recall, AgsPlayChannelRun *play_channel_run); void ags_play_channel_run_stop(AgsPlayChannelRun *play_channel_run); /** * SECTION:ags_play_channel_run * @short_description: plays channel * @title: AgsPlayChannel * @section_id: * @include: ags/audio/recall/ags_play_channel.h * * The #AgsPlayChannel class plays the channel. */ enum{ PROP_0, PROP_STREAM_CHANNEL_RUN, }; static gpointer ags_play_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_play_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_play_channel_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_play_channel_run_parent_plugin_interface; static const gchar *ags_play_channel_run_plugin_name = "ags-play"; GType ags_play_channel_run_get_type() { static GType ags_type_play_channel_run = 0; if(!ags_type_play_channel_run){ static const GTypeInfo ags_play_channel_run_info = { sizeof (AgsPlayChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_play_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_play_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_play_channel_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_play_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsPlayChannelRun", &ags_play_channel_run_info, 0); g_type_add_interface_static(ags_type_play_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_play_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_play_channel_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_play_channel_run); } void ags_play_channel_run_class_init(AgsPlayChannelRunClass *play_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_play_channel_run_parent_class = g_type_class_peek_parent(play_channel_run); /* GObjectClass */ gobject = (GObjectClass *) play_channel_run; gobject->set_property = ags_play_channel_run_set_property; gobject->get_property = ags_play_channel_run_get_property; gobject->dispose = ags_play_channel_run_dispose; gobject->finalize = ags_play_channel_run_finalize; /* properties */ /** * AgsPlayChannelRun:stream-channel-run: * * The stream channel run dependency. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("stream-channel-run", i18n_pspec("assigned AgsStreamChannelRun"), i18n_pspec("the assigned AgsStreamChannelRun"), AGS_TYPE_STREAM_CHANNEL_RUN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STREAM_CHANNEL_RUN, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) play_channel_run; recall->run_init_inter = ags_play_channel_run_run_init_inter; recall->run_pre = ags_play_channel_run_run_pre; recall->run_post = ags_play_channel_run_run_post; recall->remove = ags_play_channel_run_remove; recall->cancel = ags_play_channel_run_cancel; recall->resolve_dependencies = ags_play_channel_run_resolve_dependencies; recall->duplicate = ags_play_channel_run_duplicate; } void ags_play_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_play_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_play_channel_run_connect; connectable->disconnect = ags_play_channel_run_disconnect; } void ags_play_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_play_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_play_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_play_channel_run_disconnect_dynamic; } void ags_play_channel_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_play_channel_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_play_channel_run_init(AgsPlayChannelRun *play_channel_run) { AGS_RECALL(play_channel_run)->name = "ags-play"; AGS_RECALL(play_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_channel_run)->xml_type = "ags-play-channel-run"; AGS_RECALL(play_channel_run)->port = NULL; AGS_RECALL(play_channel_run)->flags |= (AGS_RECALL_INPUT_ORIENTATED); AGS_RECALL(play_channel_run)->child_type = AGS_TYPE_PLAY_RECYCLING; play_channel_run->flags = 0; play_channel_run->stream_channel_run = NULL; } void ags_play_channel_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayChannelRun *play_channel_run; play_channel_run = AGS_PLAY_CHANNEL_RUN(gobject); switch(prop_id){ case PROP_STREAM_CHANNEL_RUN: { AgsStreamChannelRun *stream_channel_run; gboolean is_template; stream_channel_run = (AgsStreamChannelRun *) g_value_get_object(value); if(stream_channel_run == play_channel_run->stream_channel_run) return; if(stream_channel_run != NULL && (AGS_RECALL_TEMPLATE & (AGS_RECALL(stream_channel_run)->flags)) != 0){ is_template = TRUE; }else{ is_template = FALSE; } if(play_channel_run->stream_channel_run != NULL){ if(is_template){ ags_recall_remove_dependency(AGS_RECALL(play_channel_run), (AgsRecall *) play_channel_run->stream_channel_run); } g_object_unref(G_OBJECT(play_channel_run->stream_channel_run)); } if(stream_channel_run != NULL){ g_object_ref(G_OBJECT(stream_channel_run)); if(is_template){ ags_recall_add_dependency(AGS_RECALL(play_channel_run), ags_recall_dependency_new((GObject *) stream_channel_run)); } } play_channel_run->stream_channel_run = stream_channel_run; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_channel_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayChannelRun *play_channel_run; play_channel_run = AGS_PLAY_CHANNEL_RUN(gobject); switch(prop_id){ case PROP_STREAM_CHANNEL_RUN: { g_value_set_object(value, G_OBJECT(play_channel_run->stream_channel_run)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_play_channel_run_dispose(GObject *gobject) { AgsPlayChannelRun *play_channel_run; play_channel_run = AGS_PLAY_CHANNEL_RUN(gobject); /* stream channel run */ if(play_channel_run->stream_channel_run != NULL){ g_object_unref(G_OBJECT(play_channel_run->stream_channel_run)); play_channel_run->stream_channel_run = NULL; } /* call parent */ G_OBJECT_CLASS(ags_play_channel_run_parent_class)->dispose(gobject); } void ags_play_channel_run_finalize(GObject *gobject) { AgsPlayChannelRun *play_channel_run; play_channel_run = AGS_PLAY_CHANNEL_RUN(gobject); ags_play_channel_run_stop((AgsPlayChannelRun *) gobject); /* stream channel run */ if(play_channel_run->stream_channel_run != NULL){ g_object_unref(G_OBJECT(play_channel_run->stream_channel_run)); } /* call parent */ G_OBJECT_CLASS(ags_play_channel_run_parent_class)->finalize(gobject); } void ags_play_channel_run_connect(AgsConnectable *connectable) { /* call parent */ ags_play_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_play_channel_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_play_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_play_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_play_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_play_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_play_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_play_channel_run_run_init_inter(AgsRecall *recall) { AGS_PLAY_CHANNEL_RUN(recall)->flags |= AGS_PLAY_CHANNEL_RUN_INITIAL_RUN; /* call parent */ AGS_RECALL_CLASS(ags_play_channel_run_parent_class)->run_init_inter(recall); } void ags_play_channel_run_run_pre(AgsRecall *recall) { /* empty */ /* call parent */ AGS_RECALL_CLASS(ags_play_channel_run_parent_class)->run_pre(recall); } void ags_play_channel_run_run_post(AgsRecall *recall) { AgsStreamChannelRun *stream_channel_run; AgsRtStreamChannelRun *rt_stream_channel_run; AgsChannel *source; GList *list; GList *recall_recycling_list, *recall_audio_signal_list; gboolean found; AGS_RECALL_CLASS(ags_play_channel_run_parent_class)->run_post(recall); source = AGS_RECALL_CHANNEL_RUN(recall)->source; found = FALSE; if(recall->rt_safe){ /* connect done */ list = source->play; while((list = ags_recall_find_type_with_recycling_context(list, AGS_TYPE_RT_STREAM_CHANNEL_RUN, (GObject *) recall->recall_id->recycling_context)) != NULL){ rt_stream_channel_run = AGS_RT_STREAM_CHANNEL_RUN(list->data); if((AGS_RECALL_TEMPLATE & (AGS_RECALL(rt_stream_channel_run)->flags)) != 0){ list = list->next; continue; } recall_recycling_list = AGS_RECALL(rt_stream_channel_run)->children; while(recall_recycling_list != NULL){ recall_audio_signal_list = AGS_RECALL(recall_recycling_list->data)->children; while(recall_audio_signal_list != NULL && (AGS_RECALL_DONE & (AGS_RECALL(recall_audio_signal_list->data)->flags)) == 0 && (AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_audio_signal_list->data)->flags)) == 0){ found = TRUE; break; recall_audio_signal_list = recall_audio_signal_list->next; } recall_recycling_list = recall_recycling_list->next; } list = list->next; } }else{ /* connect done */ list = source->play; while((list = ags_recall_find_type_with_recycling_context(list, AGS_TYPE_STREAM_CHANNEL_RUN, (GObject *) recall->recall_id->recycling_context)) != NULL){ stream_channel_run = AGS_STREAM_CHANNEL_RUN(list->data); if((AGS_RECALL_TEMPLATE & (AGS_RECALL(stream_channel_run)->flags)) != 0){ list = list->next; continue; } recall_recycling_list = AGS_RECALL(stream_channel_run)->children; while(recall_recycling_list != NULL){ recall_audio_signal_list = AGS_RECALL(recall_recycling_list->data)->children; while(recall_audio_signal_list != NULL && (AGS_RECALL_DONE & (AGS_RECALL(recall_audio_signal_list->data)->flags)) == 0 && (AGS_RECALL_TEMPLATE & (AGS_RECALL(recall_audio_signal_list->data)->flags)) == 0){ found = TRUE; break; recall_audio_signal_list = recall_audio_signal_list->next; } recall_recycling_list = recall_recycling_list->next; } list = list->next; } } if(!found){ ags_play_channel_run_stop((AgsPlayChannelRun *) recall); } } void ags_play_channel_run_remove(AgsRecall *recall) { /* empty */ AGS_RECALL_CLASS(ags_play_channel_run_parent_class)->remove(recall); } void ags_play_channel_run_cancel(AgsRecall *recall) { AGS_RECALL_CLASS(ags_play_channel_run_parent_class)->cancel(recall); /* empty */ } void ags_play_channel_run_resolve_dependencies(AgsRecall *recall) { AgsRecall *template; AgsRecallID *recall_id; AgsRecallDependency *recall_dependency; AgsStreamChannelRun *stream_channel_run; GList *list; guint i, i_stop; template = AGS_RECALL(ags_recall_find_template(AGS_RECALL_CONTAINER(recall->container)->recall_channel_run)->data); list = template->dependencies; recall_id = recall->recall_id; stream_channel_run = NULL; i_stop = 1; for(i = 0; i < i_stop && list != NULL;){ recall_dependency = AGS_RECALL_DEPENDENCY(list->data); if(AGS_IS_STREAM_CHANNEL_RUN(recall_dependency->dependency)){ stream_channel_run = (AgsStreamChannelRun *) ags_recall_dependency_resolve(recall_dependency, recall_id); i++; } list = list->next; } g_object_set(G_OBJECT(recall), "stream_channel_run", stream_channel_run, NULL); } AgsRecall* ags_play_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPlayChannelRun *copy; copy = (AgsPlayChannelRun *) AGS_RECALL_CLASS(ags_play_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } void ags_play_channel_run_stream_audio_signal_done_callback(AgsRecall *recall, AgsPlayChannelRun *play_channel_run) { ags_play_channel_run_stop(play_channel_run); } void ags_play_channel_run_stop(AgsPlayChannelRun *play_channel_run) { GObject *soundcard; AgsChannel *channel; AgsCancelChannel *cancel_channel; AgsMutexManager *mutex_manager; AgsThread *main_loop; AgsThread *async_queue; AgsApplicationContext *application_context; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; channel = AGS_RECALL_CHANNEL_RUN(play_channel_run)->source; if(channel == NULL){ return; } soundcard = AGS_AUDIO(channel->audio)->soundcard; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, soundcard); pthread_mutex_unlock(application_mutex); /* get application_context */ pthread_mutex_lock(soundcard_mutex); application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(soundcard)); pthread_mutex_unlock(soundcard_mutex); /* get main loop */ pthread_mutex_lock(application_mutex); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get async queue */ async_queue = (AgsThread *) ags_thread_find_type(main_loop, AGS_TYPE_TASK_THREAD); /* create append task */ cancel_channel = ags_cancel_channel_new(channel, AGS_PLAYBACK(channel->playback)->recall_id[0], channel->playback); /* append AgsCancelAudio */ ags_task_thread_append_task((AgsTaskThread *) async_queue, (AgsTask *) cancel_channel); } /** * ags_play_channel_run_new: * @stream_channel_run: the #AgsStreamChannelRun as dependency * * Creates an #AgsPlayChannelRun * * Returns: a new #AgsPlayChannelRun * * Since: 1.0.0 */ AgsPlayChannelRun* ags_play_channel_run_new(AgsStreamChannelRun *stream_channel_run) { AgsPlayChannelRun *play_channel_run; play_channel_run = (AgsPlayChannelRun *) g_object_new(AGS_TYPE_PLAY_CHANNEL_RUN, "stream-channel-run", stream_channel_run, NULL); return(play_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_play_channel_run.h0000644000175000017500000000530213246707333020335 00000000000000/* 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 . */ #ifndef __AGS_PLAY_CHANNEL_RUN_H__ #define __AGS_PLAY_CHANNEL_RUN_H__ #include #include #include #include #include #include #define AGS_TYPE_PLAY_CHANNEL_RUN (ags_play_channel_run_get_type()) #define AGS_PLAY_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_CHANNEL_RUN, AgsPlayChannelRun)) #define AGS_PLAY_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_CHANNEL_RUN, AgsPlayChannelRunClass)) #define AGS_IS_PLAY_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PLAY_CHANNEL_RUN)) #define AGS_IS_PLAY_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PLAY_CHANNEL_RUN)) #define AGS_PLAY_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PLAY_CHANNEL_RUN, AgsPlayChannelRunClass)) typedef struct _AgsPlayChannelRun AgsPlayChannelRun; typedef struct _AgsPlayChannelRunClass AgsPlayChannelRunClass; /** * AgsPlayChannelRunFlags: * @AGS_PLAY_CHANNEL_RUN_TERMINATING: recall is terminating * @AGS_PLAY_CHANNEL_RUN_INITIAL_RUN: recall does initial run * * Enum values to control the behavior or indicate internal state of #AgsPlayChannelRun by * enable/disable as flags. */ typedef enum{ AGS_PLAY_CHANNEL_RUN_TERMINATING = 1, AGS_PLAY_CHANNEL_RUN_INITIAL_RUN = 1 << 1, }AgsPlayChannelRunFlags; struct _AgsPlayChannelRun { AgsRecallChannelRun recall_channel_run; guint flags; AgsStreamChannelRun *stream_channel_run; gulong done_handler; gulong source_recycling_changed_handler; }; struct _AgsPlayChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_play_channel_run_get_type(); AgsPlayChannelRun* ags_play_channel_run_new(AgsStreamChannelRun *stream_channel_run); #endif /*__AGS_PLAY_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_route_dssi_audio_run.h0000644000175000017500000000503713247044247021245 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ROUTE_DSSI_AUDIO_RUN_H__ #define __AGS_ROUTE_DSSI_AUDIO_RUN_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_ROUTE_DSSI_AUDIO_RUN (ags_route_dssi_audio_run_get_type()) #define AGS_ROUTE_DSSI_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ROUTE_DSSI_AUDIO_RUN, AgsRouteDssiAudioRun)) #define AGS_ROUTE_DSSI_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ROUTE_DSSI_AUDIO_RUN, AgsRouteDssiAudioRun)) #define AGS_IS_ROUTE_DSSI_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ROUTE_DSSI_AUDIO_RUN)) #define AGS_IS_ROUTE_DSSI_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ROUTE_DSSI_AUDIO_RUN)) #define AGS_ROUTE_DSSI_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_ROUTE_DSSI_AUDIO_RUN, AgsRouteDssiAudioRunClass)) typedef struct _AgsRouteDssiAudioRun AgsRouteDssiAudioRun; typedef struct _AgsRouteDssiAudioRunClass AgsRouteDssiAudioRunClass; struct _AgsRouteDssiAudioRun { AgsRecallAudioRun recall_audio_run; AgsDelayAudioRun *delay_audio_run; gulong notation_alloc_input_handler; AgsCountBeatsAudioRun *count_beats_audio_run; AgsNotation *notation; AgsTimestamp *timestamp; GObject *sequencer; GList *feed_midi; long delta_time; }; struct _AgsRouteDssiAudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_route_dssi_audio_run_get_type(); AgsRouteDssiAudioRun* ags_route_dssi_audio_run_new(); #endif /*__AGS_ROUTE_DSSI_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_mute_audio_run.h0000644000175000017500000000366713246707333020047 00000000000000/* 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 . */ #ifndef __AGS_MUTE_AUDIO_RUN_H__ #define __AGS_MUTE_AUDIO_RUN_H__ #include #include #include #define AGS_TYPE_MUTE_AUDIO_RUN (ags_mute_audio_run_get_type()) #define AGS_MUTE_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTE_AUDIO_RUN, AgsMuteAudioRun)) #define AGS_MUTE_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MUTE_AUDIO_RUN, AgsMuteAudioRun)) #define AGS_IS_MUTE_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MUTE_AUDIO_RUN)) #define AGS_IS_MUTE_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MUTE_AUDIO_RUN)) #define AGS_MUTE_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_MUTE_AUDIO_RUN, AgsMuteAudioRunClass)) typedef struct _AgsMuteAudioRun AgsMuteAudioRun; typedef struct _AgsMuteAudioRunClass AgsMuteAudioRunClass; struct _AgsMuteAudioRun { AgsRecallAudioRun recall_audio_run; }; struct _AgsMuteAudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_mute_audio_run_get_type(); AgsMuteAudioRun* ags_mute_audio_run_new(); #endif /*__AGS_MUTE_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_prepare_channel_run.c0000644000175000017500000002021013246707333021014 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_prepare_channel_run_class_init(AgsPrepareChannelRunClass *prepare_channel_run); void ags_prepare_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_prepare_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_prepare_channel_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_prepare_channel_run_init(AgsPrepareChannelRun *prepare_channel_run); void ags_prepare_channel_run_connect(AgsConnectable *connectable); void ags_prepare_channel_run_disconnect(AgsConnectable *connectable); void ags_prepare_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_prepare_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_prepare_channel_run_finalize(GObject *gobject); AgsRecall* ags_prepare_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_prepare_channel_run * @short_description: prepares channel * @title: AgsPrepareChannelRun * @section_id: * @include: ags/audio/recall/ags_prepare_channel_run.h * * The #AgsPrepareChannelRun class prepares the channel. */ static gpointer ags_prepare_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_prepare_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_prepare_channel_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_prepare_channel_run_parent_plugin_interface; GType ags_prepare_channel_run_get_type() { static GType ags_type_prepare_channel_run = 0; if(!ags_type_prepare_channel_run){ static const GTypeInfo ags_prepare_channel_run_info = { sizeof (AgsPrepareChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_prepare_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPrepareChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_prepare_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_prepare_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_prepare_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_prepare_channel_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_prepare_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsPrepareChannelRun", &ags_prepare_channel_run_info, 0); g_type_add_interface_static(ags_type_prepare_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_prepare_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_prepare_channel_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_prepare_channel_run); } void ags_prepare_channel_run_class_init(AgsPrepareChannelRunClass *prepare_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; ags_prepare_channel_run_parent_class = g_type_class_peek_parent(prepare_channel_run); /* GObjectClass */ gobject = (GObjectClass *) prepare_channel_run; gobject->finalize = ags_prepare_channel_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) prepare_channel_run; recall->duplicate = ags_prepare_channel_run_duplicate; } void ags_prepare_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_prepare_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_prepare_channel_run_connect; connectable->disconnect = ags_prepare_channel_run_disconnect; } void ags_prepare_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_prepare_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_prepare_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_prepare_channel_run_disconnect_dynamic; } void ags_prepare_channel_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_prepare_channel_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_prepare_channel_run_init(AgsPrepareChannelRun *prepare_channel_run) { AGS_RECALL(prepare_channel_run)->name = "ags-prepare"; AGS_RECALL(prepare_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(prepare_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(prepare_channel_run)->xml_type = "ags-prepare-channel-run"; AGS_RECALL(prepare_channel_run)->port = NULL; AGS_RECALL(prepare_channel_run)->flags |= AGS_RECALL_INPUT_ORIENTATED; AGS_RECALL(prepare_channel_run)->child_type = AGS_TYPE_PREPARE_RECYCLING; } void ags_prepare_channel_run_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_prepare_channel_run_parent_class)->finalize(gobject); } void ags_prepare_channel_run_connect(AgsConnectable *connectable) { /* call parent */ ags_prepare_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_prepare_channel_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_prepare_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_prepare_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_prepare_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_prepare_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_prepare_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } AgsRecall* ags_prepare_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsPrepareChannelRun *copy; copy = (AgsPrepareChannelRun *) AGS_RECALL_CLASS(ags_prepare_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_prepare_channel_run_new: * * Creates an #AgsPrepareChannelRun * * Returns: a new #AgsPrepareChannelRun * * Since: 1.0.0.8 */ AgsPrepareChannelRun* ags_prepare_channel_run_new() { AgsPrepareChannelRun *prepare_channel_run; prepare_channel_run = (AgsPrepareChannelRun *) g_object_new(AGS_TYPE_PREPARE_CHANNEL_RUN, NULL); return(prepare_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_copy_pattern_channel.c0000644000175000017500000002233513246707333021213 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_copy_pattern_channel_class_init(AgsCopyPatternChannelClass *copy_pattern_channel); void ags_copy_pattern_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_copy_pattern_channel_init(AgsCopyPatternChannel *copy_pattern_channel); void ags_copy_pattern_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_copy_pattern_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_copy_pattern_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_copy_pattern_channel_dispose(GObject *gobject); void ags_copy_pattern_channel_finalize(GObject *gobject); /** * SECTION:ags_copy_pattern_channel * @short_description: copy patterns channel * @title: AgsCopyPatternChannel * @section_id: * @include: ags/audio/recall/ags_copy_pattern_channel.h * * The #AgsCopyPatternChannel class provides ports to the effect processor. */ enum{ PROP_0, PROP_PATTERN, }; static gpointer ags_copy_pattern_channel_parent_class = NULL; static const gchar *ags_copy_pattern_channel_plugin_name = "ags-copy-pattern"; static const gchar *ags_copy_pattern_channel_specifier[] = { "./pattern[0]" }; static const gchar *ags_copy_pattern_channel_control_port[] = { "1/1" }; GType ags_copy_pattern_channel_get_type() { static GType ags_type_copy_pattern_channel = 0; if(!ags_type_copy_pattern_channel){ static const GTypeInfo ags_copy_pattern_channel_info = { sizeof (AgsCopyPatternChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_pattern_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyPatternChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_pattern_channel_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_copy_pattern_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_copy_pattern_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsCopyPatternChannel", &ags_copy_pattern_channel_info, 0); g_type_add_interface_static(ags_type_copy_pattern_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_copy_pattern_channel); } void ags_copy_pattern_channel_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_copy_pattern_channel_set_ports; } void ags_copy_pattern_channel_class_init(AgsCopyPatternChannelClass *copy_pattern_channel) { GObjectClass *gobject; GParamSpec *param_spec; ags_copy_pattern_channel_parent_class = g_type_class_peek_parent(copy_pattern_channel); /* GObjectClass */ gobject = (GObjectClass *) copy_pattern_channel; gobject->set_property = ags_copy_pattern_channel_set_property; gobject->get_property = ags_copy_pattern_channel_get_property; gobject->dispose = ags_copy_pattern_channel_dispose; gobject->finalize = ags_copy_pattern_channel_finalize; /* properties */ /** * AgsCopyPatternChannel:pattern: * * The pattern port. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("pattern", i18n_pspec("pattern to play"), i18n_pspec("The pattern which has to be played"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PATTERN, param_spec); } void ags_copy_pattern_channel_init(AgsCopyPatternChannel *copy_pattern_channel) { GList *port; AGS_RECALL(copy_pattern_channel)->name = "ags-copy-pattern"; AGS_RECALL(copy_pattern_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(copy_pattern_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(copy_pattern_channel)->xml_type = "ags-copy-pattern-channel"; port = NULL; /* pattern */ copy_pattern_channel->pattern = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_copy_pattern_channel_plugin_name, "specifier", ags_copy_pattern_channel_specifier[0], "control-port", ags_copy_pattern_channel_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_OBJECT, NULL); g_object_ref(copy_pattern_channel->pattern); copy_pattern_channel->pattern->port_value.ags_port_object = NULL; /* add to port */ port = g_list_prepend(port, copy_pattern_channel->pattern); g_object_ref(copy_pattern_channel->pattern); /* set port */ AGS_RECALL(copy_pattern_channel)->port = port; } void ags_copy_pattern_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCopyPatternChannel *copy_pattern_channel; copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(gobject); switch(prop_id){ case PROP_PATTERN: { AgsPort *pattern; pattern = (AgsPort *) g_value_get_object(value); if(copy_pattern_channel->pattern == pattern){ return; } if(copy_pattern_channel->pattern != NULL){ g_object_unref(G_OBJECT(copy_pattern_channel->pattern)); } if(pattern != NULL){ g_object_ref(G_OBJECT(pattern)); } copy_pattern_channel->pattern = pattern; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_copy_pattern_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCopyPatternChannel *copy_pattern_channel; copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(gobject); switch(prop_id){ case PROP_PATTERN: { g_value_set_object(value, copy_pattern_channel->pattern); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_copy_pattern_channel_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./pattern[0]", 11)){ g_object_set(G_OBJECT(plugin), "pattern", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_copy_pattern_channel_dispose(GObject *gobject) { AgsCopyPatternChannel *copy_pattern_channel; copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(gobject); /* pattern */ if(copy_pattern_channel->pattern != NULL){ g_object_unref(copy_pattern_channel->pattern); copy_pattern_channel->pattern = NULL; } /* call parent */ G_OBJECT_CLASS(ags_copy_pattern_channel_parent_class)->dispose(gobject); } void ags_copy_pattern_channel_finalize(GObject *gobject) { AgsCopyPatternChannel *copy_pattern_channel; copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(gobject); /* pattern */ if(copy_pattern_channel->pattern != NULL){ g_object_unref(copy_pattern_channel->pattern); } /* call parent */ G_OBJECT_CLASS(ags_copy_pattern_channel_parent_class)->finalize(gobject); } GList* ags_copy_pattern_channel_template_find_source_and_destination(GList *recall, AgsChannel *destination, AgsChannel *source) { AgsCopyPatternChannel *copy_pattern_channel; while(recall != NULL){ recall = ags_recall_template_find_type(recall, AGS_TYPE_COPY_PATTERN_CHANNEL); if(recall == NULL) break; copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(recall->data); if(AGS_RECALL_CHANNEL(copy_pattern_channel)->destination == destination && AGS_RECALL_CHANNEL(copy_pattern_channel)->source == source) break; recall = recall->next; } return(recall); } /** * ags_copy_pattern_channel_new: * @destination: the destination #AgsChannel * @source: the source #AgsChannel * @pattern: the pattern port * * Creates an #AgsCopyPatternChannel * * Returns: a new #AgsCopyPatternChannel * * Since: 1.0.0 */ AgsCopyPatternChannel* ags_copy_pattern_channel_new(AgsChannel *destination, AgsChannel *source, AgsPort *pattern) { AgsCopyPatternChannel *copy_pattern_channel; copy_pattern_channel = (AgsCopyPatternChannel *) g_object_new(AGS_TYPE_COPY_PATTERN_CHANNEL, "destination", destination, "channel", source, "pattern", pattern, NULL); return(copy_pattern_channel); } gsequencer-1.4.24/ags/audio/recall/ags_play_channel_run_master.h0000644000175000017500000000664113246707333021717 00000000000000/* 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 . */ #ifndef __AGS_PLAY_CHANNEL_RUN_MASTER_H__ #define __AGS_PLAY_CHANNEL_RUN_MASTER_H__ #include #include #include #include #include #include #define AGS_TYPE_PLAY_CHANNEL_RUN_MASTER (ags_play_channel_run_master_get_type()) #define AGS_PLAY_CHANNEL_RUN_MASTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_CHANNEL_RUN_MASTER, AgsPlayChannelRunMaster)) #define AGS_PLAY_CHANNEL_RUN_MASTER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_CHANNEL_RUN_MASTER, AgsPlayChannelRunMasterClass)) #define AGS_IS_PLAY_CHANNEL_RUN_MASTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PLAY_CHANNEL_RUN_MASTER)) #define AGS_IS_PLAY_CHANNEL_RUN_MASTER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PLAY_CHANNEL_RUN_MASTER)) #define AGS_PLAY_CHANNEL_RUN_MASTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PLAY_CHANNEL_RUN_MASTER, AgsPlayChannelRunMasterClass)) #define AGS_PLAY_CHANNEL_RUN_MASTER_STREAMER(strct) ((AgsPlayChannelRunMasterStreamer *)(strct)) typedef struct _AgsPlayChannelRunMaster AgsPlayChannelRunMaster; typedef struct _AgsPlayChannelRunMasterClass AgsPlayChannelRunMasterClass; typedef struct _AgsPlayChannelRunMasterStreamer AgsPlayChannelRunMasterStreamer; /** * AgsPlayChannelRunMasterFlags: * @AGS_PLAY_CHANNEL_RUN_MASTER_TERMINATING: recall is terminating * * Enum values to control the behavior or indicate internal state of #AgsPlayChannelRun by * enable/disable as flags. */ typedef enum{ AGS_PLAY_CHANNEL_RUN_MASTER_TERMINATING = 1, }AgsPlayChannelRunMasterFlags; struct _AgsPlayChannelRunMaster { AgsRecallChannelRun recall_channel_run; guint flags; GList *streamer; gulong source_recycling_changed_handler; }; struct _AgsPlayChannelRunMasterClass { AgsRecallChannelRunClass recall_channel_run; }; struct _AgsPlayChannelRunMasterStreamer { AgsPlayChannelRunMaster *play_channel_run_master; AgsStreamChannelRun *stream_channel_run; gulong done_handler; }; GType ags_play_channel_run_master_get_type(); void ags_play_channel_run_master_streamer_free(AgsPlayChannelRunMasterStreamer *streamer); AgsPlayChannelRunMasterStreamer* ags_play_channel_run_master_streamer_alloc(AgsPlayChannelRunMaster *play_channel_run_master, AgsStreamChannelRun *stream_channel_run); GList* ags_play_channel_run_master_find_streamer(GList *list, AgsStreamChannelRun *stream_channel_run); AgsPlayChannelRunMaster* ags_play_channel_run_master_new(); #endif /*__AGS_PLAY_CHANNEL_RUN_MASTER_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_record_midi_audio_run.h0000644000175000017500000000542413247044247021345 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RECORD_MIDI_AUDIO_RUN_H__ #define __AGS_RECORD_MIDI_AUDIO_RUN_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_RECORD_MIDI_AUDIO_RUN (ags_record_midi_audio_run_get_type()) #define AGS_RECORD_MIDI_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECORD_MIDI_AUDIO_RUN, AgsRecordMidiAudioRun)) #define AGS_RECORD_MIDI_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECORD_MIDI_AUDIO_RUN, AgsRecordMidiAudioRun)) #define AGS_IS_RECORD_MIDI_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECORD_MIDI_AUDIO_RUN)) #define AGS_IS_RECORD_MIDI_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECORD_MIDI_AUDIO_RUN)) #define AGS_RECORD_MIDI_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECORD_MIDI_AUDIO_RUN, AgsRecordMidiAudioRunClass)) typedef struct _AgsRecordMidiAudioRun AgsRecordMidiAudioRun; typedef struct _AgsRecordMidiAudioRunClass AgsRecordMidiAudioRunClass; /** * AgsRecordMidiAudioRunFlags: * @AGS_RECORD_MIDI_AUDIO_RUN_DEFAULT: run default * * Enum values to control the behavior or indicate internal state of #AgsRecordMidiAudioRun by * enable/disable as flags. */ typedef enum{ AGS_RECORD_MIDI_AUDIO_RUN_DEFAULT = 1, }AgsRecordMidiAudioRunFlags; struct _AgsRecordMidiAudioRun { AgsRecallAudioRun recall_audio_run; guint flags; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; GList *note; AgsTimestamp *timestamp; GObject *midi_file; }; struct _AgsRecordMidiAudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_record_midi_audio_run_get_type(); AgsRecordMidiAudioRun* ags_record_midi_audio_run_new(); #endif /*__AGS_RECORD_MIDI_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_peak_recycling.h0000644000175000017500000000373713246707333020005 00000000000000/* 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 . */ #ifndef __AGS_PEAK_RECYCLING_H__ #define __AGS_PEAK_RECYCLING_H__ #include #include #include #define AGS_TYPE_PEAK_RECYCLING (ags_peak_recycling_get_type()) #define AGS_PEAK_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PEAK_RECYCLING, AgsPeakRecycling)) #define AGS_PEAK_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PEAK_RECYCLING, AgsPeakRecyclingClass)) #define AGS_IS_PEAK_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PEAK_RECYCLING)) #define AGS_IS_PEAK_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PEAK_RECYCLING)) #define AGS_PEAK_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PEAK_RECYCLING, AgsPeakRecyclingClass)) typedef struct _AgsPeakRecycling AgsPeakRecycling; typedef struct _AgsPeakRecyclingClass AgsPeakRecyclingClass; struct _AgsPeakRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsPeakRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_peak_recycling_get_type(); AgsPeakRecycling* ags_peak_recycling_new(AgsRecycling *recycling); #endif /*__AGS_PEAK_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_rt_stream_channel.c0000644000175000017500000001360613247044247020504 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #include #include #include void ags_rt_stream_channel_class_init(AgsRtStreamChannelClass *rt_stream_channel); void ags_rt_stream_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_rt_stream_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_rt_stream_channel_init(AgsRtStreamChannel *rt_stream_channel); void ags_rt_stream_channel_connect(AgsConnectable *connectable); void ags_rt_stream_channel_disconnect(AgsConnectable *connectable); void ags_rt_stream_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_rt_stream_channel_dispose(GObject *gobject); void ags_rt_stream_channel_finalize(GObject *gobject); /** * SECTION:ags_rt_stream_channel * @short_description: rt_streams channel * @title: AgsRtStreamChannel * @section_id: * @include: ags/audio/recall/ags_rt_stream_channel.h * * The #AgsRtStreamChannel class provides ports to the effect processor. */ static gpointer ags_rt_stream_channel_parent_class = NULL; static AgsConnectableInterface *ags_rt_stream_channel_parent_connectable_interface; static AgsPluginInterface *ags_rt_stream_channel_parent_plugin_interface; static const gchar *ags_rt_stream_channel_plugin_name = "ags-rt-stream"; GType ags_rt_stream_channel_get_type() { static GType ags_type_rt_stream_channel = 0; if(!ags_type_rt_stream_channel){ static const GTypeInfo ags_rt_stream_channel_info = { sizeof (AgsRtStreamChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_rt_stream_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRtStreamChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_rt_stream_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_rt_stream_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_rt_stream_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_rt_stream_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsRtStreamChannel", &ags_rt_stream_channel_info, 0); g_type_add_interface_static(ags_type_rt_stream_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_rt_stream_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_rt_stream_channel); } void ags_rt_stream_channel_class_init(AgsRtStreamChannelClass *rt_stream_channel) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_rt_stream_channel_parent_class = g_type_class_peek_parent(rt_stream_channel); /* GObjectClass */ gobject = (GObjectClass *) rt_stream_channel; gobject->dispose = ags_rt_stream_channel_dispose; gobject->finalize = ags_rt_stream_channel_finalize; } void ags_rt_stream_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_rt_stream_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_rt_stream_channel_connect; connectable->disconnect = ags_rt_stream_channel_disconnect; } void ags_rt_stream_channel_plugin_interface_init(AgsPluginInterface *plugin) { ags_rt_stream_channel_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_rt_stream_channel_init(AgsRtStreamChannel *rt_stream_channel) { AgsConfig *config; AGS_RECALL(rt_stream_channel)->name = "ags-rt-stream"; AGS_RECALL(rt_stream_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(rt_stream_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(rt_stream_channel)->xml_type = "ags-rt-stream-channel"; } void ags_rt_stream_channel_dispose(GObject *gobject) { AgsRtStreamChannel *rt_stream_channel; rt_stream_channel = AGS_RT_STREAM_CHANNEL(gobject); /* call parent */ G_OBJECT_CLASS(ags_rt_stream_channel_parent_class)->dispose(gobject); } void ags_rt_stream_channel_finalize(GObject *gobject) { AgsRtStreamChannel *rt_stream_channel; rt_stream_channel = AGS_RT_STREAM_CHANNEL(gobject); /* call parent */ G_OBJECT_CLASS(ags_rt_stream_channel_parent_class)->finalize(gobject); } void ags_rt_stream_channel_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_rt_stream_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_rt_stream_channel_disconnect(AgsConnectable *connectable) { ags_rt_stream_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } /** * ags_rt_stream_channel_new: * * Creates an #AgsRtStreamChannel * * Returns: a new #AgsRtStreamChannel * * Since: 1.4.0 */ AgsRtStreamChannel* ags_rt_stream_channel_new() { AgsRtStreamChannel *rt_stream_channel; rt_stream_channel = (AgsRtStreamChannel *) g_object_new(AGS_TYPE_RT_STREAM_CHANNEL, NULL); return(rt_stream_channel); } gsequencer-1.4.24/ags/audio/recall/ags_play_dssi_audio.h0000644000175000017500000000510513246707333020165 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PLAY_DSSI_AUDIO_H__ #define __AGS_PLAY_DSSI_AUDIO_H__ #include #include #include #include #define AGS_TYPE_PLAY_DSSI_AUDIO (ags_play_dssi_audio_get_type()) #define AGS_PLAY_DSSI_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_DSSI_AUDIO, AgsPlayDssiAudio)) #define AGS_PLAY_DSSI_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_DSSI_AUDIO, AgsPlayDssiAudio)) #define AGS_IS_PLAY_DSSI_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_DSSI_AUDIO)) #define AGS_IS_PLAY_DSSI_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_DSSI_AUDIO)) #define AGS_PLAY_DSSI_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_DSSI_AUDIO, AgsPlayDssiAudioClass)) typedef struct _AgsPlayDssiAudio AgsPlayDssiAudio; typedef struct _AgsPlayDssiAudioClass AgsPlayDssiAudioClass; struct _AgsPlayDssiAudio { AgsRecallAudio recall_audio; gchar *filename; gchar *effect; unsigned long index; unsigned long bank; unsigned long program; DSSI_Descriptor *plugin_descriptor; unsigned long *input_port; unsigned long input_lines; unsigned long *output_port; unsigned long output_lines; }; struct _AgsPlayDssiAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_play_dssi_audio_get_type(); void ags_play_dssi_audio_load(AgsPlayDssiAudio *play_dssi_audio); GList* ags_play_dssi_audio_load_ports(AgsPlayDssiAudio *play_dssi_audio); void ags_play_dssi_audio_load_conversion(AgsPlayDssiAudio *play_dssi_audio, GObject *port, gpointer port_descriptor); GList* ags_play_dssi_audio_find(GList *recall, gchar *filename, gchar *effect); AgsPlayDssiAudio* ags_play_dssi_audio_new(); #endif /*__AGS_PLAY_DSSI_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_copy_pattern_channel_run.c0000644000175000017500000005601413247044247022077 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_copy_pattern_channel_run_class_init(AgsCopyPatternChannelRunClass *copy_pattern_channel_run); void ags_copy_pattern_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_copy_pattern_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_copy_pattern_channel_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_copy_pattern_channel_run_init(AgsCopyPatternChannelRun *copy_pattern_channel_run); void ags_copy_pattern_channel_run_connect(AgsConnectable *connectable); void ags_copy_pattern_channel_run_disconnect(AgsConnectable *connectable); void ags_copy_pattern_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_pattern_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_copy_pattern_channel_run_finalize(GObject *gobject); void ags_copy_pattern_channel_run_resolve_dependencies(AgsRecall *recall); void ags_copy_pattern_channel_run_run_init_pre(AgsRecall *recall); void ags_copy_pattern_channel_run_done(AgsRecall *recall); void ags_copy_pattern_channel_run_cancel(AgsRecall *recall); void ags_copy_pattern_channel_run_remove(AgsRecall *recall); AgsRecall* ags_copy_pattern_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_copy_pattern_channel_run_sequencer_alloc_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCopyPatternChannelRun *copy_pattern_channel_run); /** * SECTION:ags_copy_pattern_channel_run * @short_description: copys pattern * @title: AgsCopyPatternChannelRun * @section_id: * @include: ags/audio/recall/ags_copy_pattern_channel_run.h * * The #AgsCopyPatternChannelRun class copys pattern. */ static gpointer ags_copy_pattern_channel_run_parent_class = NULL; static AgsConnectableInterface* ags_copy_pattern_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_copy_pattern_channel_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_copy_pattern_channel_run_parent_plugin_interface; GType ags_copy_pattern_channel_run_get_type() { static GType ags_type_copy_pattern_channel_run = 0; if(!ags_type_copy_pattern_channel_run){ static const GTypeInfo ags_copy_pattern_channel_run_info = { sizeof (AgsCopyPatternChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_pattern_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyPatternChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_pattern_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_pattern_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_pattern_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_copy_pattern_channel_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_copy_pattern_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsCopyPatternChannelRun", &ags_copy_pattern_channel_run_info, 0); g_type_add_interface_static(ags_type_copy_pattern_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_copy_pattern_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_copy_pattern_channel_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_copy_pattern_channel_run); } void ags_copy_pattern_channel_run_class_init(AgsCopyPatternChannelRunClass *copy_pattern_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; AgsRecallChannelRunClass *recall_channel_run; GParamSpec *param_spec; ags_copy_pattern_channel_run_parent_class = g_type_class_peek_parent(copy_pattern_channel_run); /* GObjectClass */ gobject = (GObjectClass *) copy_pattern_channel_run; gobject->finalize = ags_copy_pattern_channel_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) copy_pattern_channel_run; recall->resolve_dependencies = ags_copy_pattern_channel_run_resolve_dependencies; recall->run_init_pre = ags_copy_pattern_channel_run_run_init_pre; recall->done = ags_copy_pattern_channel_run_done; recall->cancel = ags_copy_pattern_channel_run_cancel; recall->remove = ags_copy_pattern_channel_run_remove; recall->duplicate = ags_copy_pattern_channel_run_duplicate; } void ags_copy_pattern_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_copy_pattern_channel_run_connectable_parent_interface; ags_copy_pattern_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_copy_pattern_channel_run_connect; connectable->disconnect = ags_copy_pattern_channel_run_disconnect; } void ags_copy_pattern_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_copy_pattern_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_copy_pattern_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_copy_pattern_channel_run_disconnect_dynamic; } void ags_copy_pattern_channel_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_copy_pattern_channel_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_copy_pattern_channel_run_init(AgsCopyPatternChannelRun *copy_pattern_channel_run) { AGS_RECALL(copy_pattern_channel_run)->name = "ags-copy-pattern"; AGS_RECALL(copy_pattern_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(copy_pattern_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(copy_pattern_channel_run)->xml_type = "ags-copy-pattern-channel-run"; AGS_RECALL(copy_pattern_channel_run)->port = NULL; AGS_RECALL(copy_pattern_channel_run)->child_type = G_TYPE_NONE; copy_pattern_channel_run->note = NULL; } void ags_copy_pattern_channel_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_copy_pattern_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_copy_pattern_channel_run_disconnect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) == 0){ return; } ags_copy_pattern_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_copy_pattern_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsCopyPatternAudioRun *copy_pattern_audio_run; AgsCopyPatternChannelRun *copy_pattern_channel_run; AgsDelayAudioRun *delay_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_copy_pattern_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* AgsCopyPatternChannelRun */ copy_pattern_channel_run = AGS_COPY_PATTERN_CHANNEL_RUN(dynamic_connectable); /* get AgsCopyPatternAudioRun */ copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(AGS_RECALL_CHANNEL_RUN(copy_pattern_channel_run)->recall_audio_run); /* connect sequencer_alloc in AgsDelayAudioRun */ delay_audio_run = copy_pattern_audio_run->delay_audio_run; copy_pattern_channel_run->sequencer_alloc_handler = g_signal_connect(G_OBJECT(delay_audio_run), "sequencer-alloc-input", G_CALLBACK(ags_copy_pattern_channel_run_sequencer_alloc_callback), copy_pattern_channel_run); } void ags_copy_pattern_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsCopyPatternAudioRun *copy_pattern_audio_run; AgsCopyPatternChannelRun *copy_pattern_channel_run; AgsDelayAudioRun *delay_audio_run; if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) == 0){ return; } /* AgsCopyPatternChannelRun */ copy_pattern_channel_run = AGS_COPY_PATTERN_CHANNEL_RUN(dynamic_connectable); /* get AgsCopyPatternAudioRun */ copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(AGS_RECALL_CHANNEL_RUN(copy_pattern_channel_run)->recall_audio_run); /* disconnect sequencer_alloc in AgsDelayAudioRun */ delay_audio_run = copy_pattern_audio_run->delay_audio_run; g_signal_handler_disconnect(G_OBJECT(delay_audio_run), copy_pattern_channel_run->sequencer_alloc_handler); /* call parent */ ags_copy_pattern_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } void ags_copy_pattern_channel_run_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_copy_pattern_channel_run_parent_class)->finalize(gobject); } void ags_copy_pattern_channel_run_resolve_dependencies(AgsRecall *recall) { //TODO:JK: implement me } void ags_copy_pattern_channel_run_run_init_pre(AgsRecall *recall) { AgsChannel *source; AgsPattern *pattern; AgsNote *note; AgsCopyPatternChannel *copy_pattern_channel; AgsCopyPatternChannelRun *copy_pattern_channel_run; AgsMutexManager *mutex_manager; guint pad; guint i, i_stop; GValue pattern_value = { 0, }; pthread_mutex_t *application_mutex; pthread_mutex_t *source_mutex; pthread_mutex_t *pattern_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); AGS_RECALL_CLASS(ags_copy_pattern_channel_run_parent_class)->run_init_pre(recall); /* */ copy_pattern_channel_run = AGS_COPY_PATTERN_CHANNEL_RUN(recall); /* get AgsCopyPatternChannel */ copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(copy_pattern_channel_run->recall_channel_run.recall_channel); /* get source */ source = AGS_RECALL_CHANNEL(copy_pattern_channel)->source; pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* get AgsPattern */ g_value_init(&pattern_value, G_TYPE_POINTER); ags_port_safe_read(copy_pattern_channel->pattern, &pattern_value); pattern = g_value_get_pointer(&pattern_value); pthread_mutex_lock(application_mutex); pattern_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pattern); pthread_mutex_unlock(application_mutex); /* add note */ pthread_mutex_lock(source_mutex); pad = source->pad; pthread_mutex_unlock(source_mutex); /* i stop */ pthread_mutex_lock(pattern_mutex); i_stop = pattern->dim[2]; pthread_mutex_unlock(pattern_mutex); for(i = 0; i < i_stop; i++){ note = ags_note_new(); note->x[0] = i; note->x[1] = i + 1; note->y = pad; copy_pattern_channel_run->note = g_list_prepend(copy_pattern_channel_run->note, note); g_object_ref(note); } copy_pattern_channel_run->note = g_list_reverse(copy_pattern_channel_run->note); } void ags_copy_pattern_channel_run_done(AgsRecall *recall) { AgsCopyPatternChannelRun *copy_pattern_channel_run; AgsCopyPatternAudioRun *copy_pattern_audio_run; copy_pattern_channel_run = AGS_COPY_PATTERN_CHANNEL_RUN(recall); /* get AgsCopyPatternAudioRun */ copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(AGS_RECALL_CHANNEL_RUN(copy_pattern_channel_run)->recall_audio_run); /* denotify dependency */ ags_recall_notify_dependency(AGS_RECALL(copy_pattern_audio_run->count_beats_audio_run), AGS_RECALL_NOTIFY_CHANNEL_RUN, -1); g_list_free_full(copy_pattern_channel_run->note, g_object_unref); copy_pattern_channel_run->note = NULL; /* call parent */ AGS_RECALL_CLASS(ags_copy_pattern_channel_run_parent_class)->done(recall); } void ags_copy_pattern_channel_run_cancel(AgsRecall *recall) { AGS_RECALL_CLASS(ags_copy_pattern_channel_run_parent_class)->cancel(recall); } void ags_copy_pattern_channel_run_remove(AgsRecall *recall) { AGS_RECALL_CLASS(ags_copy_pattern_channel_run_parent_class)->remove(recall); /* empty */ } AgsRecall* ags_copy_pattern_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsCopyPatternChannelRun *copy; copy = AGS_COPY_PATTERN_CHANNEL_RUN(AGS_RECALL_CLASS(ags_copy_pattern_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); /* empty */ return((AgsRecall *) copy); } void ags_copy_pattern_channel_run_sequencer_alloc_callback(AgsDelayAudioRun *delay_audio_run, guint run_order, gdouble delay, guint attack, AgsCopyPatternChannelRun *copy_pattern_channel_run) { AgsAudio *audio; AgsChannel *source; AgsPattern *pattern; AgsCopyPatternAudio *copy_pattern_audio; AgsCopyPatternAudioRun *copy_pattern_audio_run; AgsCopyPatternChannel *copy_pattern_channel; AgsMutexManager *mutex_manager; guint sequencer_counter; gboolean current_bit; GValue pattern_value = { 0, }; GValue i_value = { 0, }; GValue j_value = { 0, }; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *source_mutex; pthread_mutex_t *pattern_mutex; if(delay != 0.0){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get AgsCopyPatternAudio */ copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(AGS_RECALL_CHANNEL_RUN(copy_pattern_channel_run)->recall_audio_run->recall_audio); /* get AgsCopyPatternAudioRun */ copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(AGS_RECALL_CHANNEL_RUN(copy_pattern_channel_run)->recall_audio_run); /* get AgsCopyPatternChannel */ copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(copy_pattern_channel_run->recall_channel_run.recall_channel); g_value_init(&i_value, G_TYPE_UINT64); ags_port_safe_read(copy_pattern_audio->bank_index_0, &i_value); g_value_init(&j_value, G_TYPE_UINT64); ags_port_safe_read(copy_pattern_audio->bank_index_1, &j_value); /* get AgsPattern */ g_value_init(&pattern_value, G_TYPE_POINTER); ags_port_safe_read(copy_pattern_channel->pattern, &pattern_value); pattern = g_value_get_pointer(&pattern_value); pthread_mutex_lock(application_mutex); pattern_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pattern); pthread_mutex_unlock(application_mutex); /* write pattern port - current offset */ ags_port_safe_set_property(copy_pattern_channel->pattern, "first-index", &i_value); g_value_unset(&i_value); ags_port_safe_set_property(copy_pattern_channel->pattern, "second-index", &j_value); g_value_unset(&j_value); /* get sequencer counter */ //FIXME:JK: check thread safety sequencer_counter = copy_pattern_audio_run->count_beats_audio_run->sequencer_counter; /* read pattern port - current bit */ pthread_mutex_lock(pattern_mutex); current_bit = ags_pattern_get_bit(pattern, pattern->i, pattern->j, sequencer_counter); pthread_mutex_unlock(pattern_mutex); g_value_unset(&pattern_value); /* */ if(current_bit){ AgsChannel *link; AgsRecycling *recycling; AgsRecycling *end_recycling; AgsAudioSignal *audio_signal; AgsNote *note; GList *preset; guint pad; guint audio_channel; pthread_mutex_t *link_mutex; // g_message("ags_copy_pattern_channel_run_sequencer_alloc_callback - playing channel: %u; playing pattern: %u", // AGS_RECALL_CHANNEL(copy_pattern_channel)->source->line, // copy_pattern_audio_run->count_beats_audio_run->sequencer_counter); /* get audio */ audio = AGS_RECALL_AUDIO(copy_pattern_audio)->audio; pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get source */ source = AGS_RECALL_CHANNEL(copy_pattern_channel)->source; pthread_mutex_lock(application_mutex); source_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) source); pthread_mutex_unlock(application_mutex); /* source fields */ pthread_mutex_lock(source_mutex); link = source->link; recycling = source->first_recycling; if(recycling != NULL){ end_recycling = source->last_recycling->next; } pad = source->pad; audio_channel = source->audio_channel; pthread_mutex_unlock(source_mutex); /* find preset scope envelope */ pthread_mutex_lock(audio_mutex); preset = audio->preset; while((preset = ags_preset_find_scope(preset, "ags-envelope")) != NULL){ if(audio_channel >= AGS_PRESET(preset->data)->audio_channel_start && audio_channel < AGS_PRESET(preset->data)->audio_channel_end && pad >= AGS_PRESET(preset->data)->pad_start && pad < AGS_PRESET(preset->data)->pad_end && sequencer_counter >= AGS_PRESET(preset->data)->x_start && sequencer_counter < AGS_PRESET(preset->data)->x_end){ break; } preset = preset->next; } pthread_mutex_unlock(audio_mutex); /* link */ if(link != NULL){ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); } /* create audio signals */ if(recycling != NULL){ AgsRecallID *child_recall_id; while(recycling != end_recycling){ child_recall_id = AGS_RECALL(copy_pattern_channel_run)->recall_id; /* apply preset */ note = g_list_nth(copy_pattern_channel_run->note, sequencer_counter)->data; note->rt_attack = attack; if(preset != NULL){ AgsComplex *val; GValue value = {0,}; GError *error; note->flags |= AGS_NOTE_ENVELOPE; /* get attack */ g_value_init(&value, AGS_TYPE_COMPLEX); error = NULL; ags_preset_get_parameter((AgsPreset *) preset->data, "attack", &value, &error); if(error == NULL){ val = (AgsComplex *) g_value_get_boxed(&value); note->attack[0] = val[0][0]; note->attack[1] = val[0][1]; } /* get decay */ g_value_reset(&value); error = NULL; ags_preset_get_parameter((AgsPreset *) preset->data, "decay", &value, &error); if(error == NULL){ val = (AgsComplex *) g_value_get_boxed(&value); note->decay[0] = val[0][0]; note->decay[1] = val[0][1]; } /* get sustain */ g_value_reset(&value); error = NULL; ags_preset_get_parameter((AgsPreset *) preset->data, "sustain", &value, &error); if(error == NULL){ val = (AgsComplex *) g_value_get_boxed(&value); note->sustain[0] = val[0][0]; note->sustain[1] = val[0][1]; } /* get release */ g_value_reset(&value); error = NULL; ags_preset_get_parameter((AgsPreset *) preset->data, "release", &value, &error); if(error == NULL){ val = (AgsComplex *) g_value_get_boxed(&value); note->release[0] = val[0][0]; note->release[1] = val[0][1]; } /* get ratio */ g_value_reset(&value); error = NULL; ags_preset_get_parameter((AgsPreset *) preset->data, "ratio", &value, &error); if(error == NULL){ val = (AgsComplex *) g_value_get_boxed(&value); note->ratio[0] = val[0][0]; note->ratio[1] = val[0][1]; } } if(!AGS_RECALL(copy_pattern_audio)->rt_safe){ /* create audio signal */ audio_signal = ags_audio_signal_new(AGS_RECALL(copy_pattern_audio)->soundcard, (GObject *) recycling, (GObject *) child_recall_id); ags_recycling_create_audio_signal_with_defaults(recycling, audio_signal, 0.0, attack); audio_signal->flags &= (~AGS_AUDIO_SIGNAL_TEMPLATE); audio_signal->stream_current = audio_signal->stream_beginning; ags_connectable_connect(AGS_CONNECTABLE(audio_signal)); audio_signal->recall_id = (GObject *) child_recall_id; ags_recycling_add_audio_signal(recycling, audio_signal); g_object_set(audio_signal, "note", note, NULL); }else{ GList *list; audio_signal = NULL; list = ags_audio_signal_get_by_recall_id(recycling->audio_signal, child_recall_id); if(list != NULL){ audio_signal = list->data; g_object_set(audio_signal, "note", note, NULL); } note->rt_offset = 0; } /* * emit add_audio_signal on AgsRecycling */ #ifdef AGS_DEBUG g_message("play %x", AGS_RECALL(copy_pattern_channel_run)->recall_id); #endif /* * unref AgsAudioSignal because AgsCopyPatternChannelRun has no need for it * if you need a valid reference to audio_signal you have to g_object_ref(audio_signal) */ // g_object_unref(audio_signal); recycling = recycling->next; } } } // g_message("%u\n", copy_pattern->shared_audio_run->bit); // copy_pattern->shared_audio_run->bit++; // } } /** * ags_copy_pattern_channel_run_new: * * Creates an #AgsCopyPatternChannelRun * * Returns: a new #AgsCopyPatternChannelRun * * Since: 1.0.0 */ AgsCopyPatternChannelRun* ags_copy_pattern_channel_run_new() { AgsCopyPatternChannelRun *copy_pattern_channel_run; copy_pattern_channel_run = (AgsCopyPatternChannelRun *) g_object_new(AGS_TYPE_COPY_PATTERN_CHANNEL_RUN, NULL); return(copy_pattern_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_copy_pattern_channel_run.h0000644000175000017500000000437513247044247022107 00000000000000/* 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 . */ #ifndef __AGS_COPY_PATTERN_CHANNEL_RUN_H__ #define __AGS_COPY_PATTERN_CHANNEL_RUN_H__ #include #include #include #define AGS_TYPE_COPY_PATTERN_CHANNEL_RUN (ags_copy_pattern_channel_run_get_type()) #define AGS_COPY_PATTERN_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_PATTERN_CHANNEL_RUN, AgsCopyPatternChannelRun)) #define AGS_COPY_PATTERN_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_PATTERN_CHANNEL_RUN, AgsCopyPatternChannelRunClass)) #define AGS_IS_COPY_PATTERN_CHANNEL_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COPY_PATTERN_CHANNEL_RUN)) #define AGS_IS_COPY_PATTERN_CHANNEL_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COPY_PATTERN_CHANNEL_RUN)) #define AGS_COPY_PATTERN_CHANNEL_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COPY_PATTERN_CHANNEL_RUN, AgsCopyPatternChannelRunClass)) typedef struct _AgsCopyPatternChannelRun AgsCopyPatternChannelRun; typedef struct _AgsCopyPatternChannelRunClass AgsCopyPatternChannelRunClass; struct _AgsCopyPatternChannelRun { AgsRecallChannelRun recall_channel_run; gulong sequencer_alloc_handler; GList *note; }; struct _AgsCopyPatternChannelRunClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_copy_pattern_channel_run_get_type(); AgsCopyPatternChannelRun* ags_copy_pattern_channel_run_new(); #endif /*__AGS_COPY_PATTERN_CHANNEL_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_volume_recycling.c0000644000175000017500000001651413246707333020364 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_volume_recycling_class_init(AgsVolumeRecyclingClass *volume_recycling); void ags_volume_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_volume_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_volume_recycling_init(AgsVolumeRecycling *volume_recycling); void ags_volume_recycling_connect(AgsConnectable *connectable); void ags_volume_recycling_disconnect(AgsConnectable *connectable); void ags_volume_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_volume_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_volume_recycling_finalize(GObject *gobject); AgsRecall* ags_volume_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_volume_recycling * @short_description: volumes recycling * @title: AgsVolumeRecycling * @section_id: * @include: ags/audio/recall/ags_volume_recycling.h * * The #AgsVolumeRecycling class volumes the recycling. */ static gpointer ags_volume_recycling_parent_class = NULL; static AgsConnectableInterface *ags_volume_recycling_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_volume_recycling_parent_dynamic_connectable_interface; GType ags_volume_recycling_get_type() { static GType ags_type_volume_recycling = 0; if(!ags_type_volume_recycling){ static const GTypeInfo ags_volume_recycling_info = { sizeof (AgsVolumeRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_volume_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsVolumeRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_volume_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_volume_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_volume_recycling_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_volume_recycling = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsVolumeRecycling", &ags_volume_recycling_info, 0); g_type_add_interface_static(ags_type_volume_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_volume_recycling, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_volume_recycling); } void ags_volume_recycling_class_init(AgsVolumeRecyclingClass *volume_recycling) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_volume_recycling_parent_class = g_type_class_peek_parent(volume_recycling); /* GObjectClass */ gobject = (GObjectClass *) volume_recycling; gobject->finalize = ags_volume_recycling_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) volume_recycling; recall->duplicate = ags_volume_recycling_duplicate; } void ags_volume_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { ags_volume_recycling_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_volume_recycling_connect; connectable->disconnect = ags_volume_recycling_disconnect; } void ags_volume_recycling_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_volume_recycling_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_volume_recycling_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_volume_recycling_disconnect_dynamic; } void ags_volume_recycling_init(AgsVolumeRecycling *volume_recycling) { AGS_RECALL(volume_recycling)->name = "ags-volume"; AGS_RECALL(volume_recycling)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(volume_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(volume_recycling)->xml_type = "ags-volume-recycling"; AGS_RECALL(volume_recycling)->port = NULL; AGS_RECALL(volume_recycling)->child_type = AGS_TYPE_VOLUME_AUDIO_SIGNAL; AGS_RECALL_RECYCLING(volume_recycling)->flags |= (AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE); } void ags_volume_recycling_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_volume_recycling_parent_class)->finalize(gobject); } void ags_volume_recycling_connect(AgsConnectable *connectable) { /* call parent */ ags_volume_recycling_parent_connectable_interface->connect(connectable); /* empty */ } void ags_volume_recycling_disconnect(AgsConnectable *connectable) { /* call parent */ ags_volume_recycling_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_volume_recycling_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_volume_recycling_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_volume_recycling_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_volume_recycling_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } AgsRecall* ags_volume_recycling_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsVolumeRecycling *copy; copy = (AgsVolumeRecycling *) AGS_RECALL_CLASS(ags_volume_recycling_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_volume_recycling_new: * @recycling: the source #AgsRecycling * * Creates an #AgsVolumeRecycling * * Returns: a new #AgsVolumeRecycling * * Since: 1.0.0 */ AgsVolumeRecycling* ags_volume_recycling_new(AgsRecycling *recycling) { AgsVolumeRecycling *volume_recycling; volume_recycling = (AgsVolumeRecycling *) g_object_new(AGS_TYPE_VOLUME_RECYCLING, "source", recycling, NULL); return(volume_recycling); } gsequencer-1.4.24/ags/audio/recall/ags_rt_stream_audio_signal.h0000644000175000017500000000432113247044247021531 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_RT_STREAM_AUDIO_SIGNAL_H__ #define __AGS_RT_STREAM_AUDIO_SIGNAL_H__ #include #include #include #define AGS_TYPE_RT_STREAM_AUDIO_SIGNAL (ags_rt_stream_audio_signal_get_type()) #define AGS_RT_STREAM_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RT_STREAM_AUDIO_SIGNAL, AgsRtStreamAudioSignal)) #define AGS_RT_STREAM_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RT_STREAM_AUDIO_SIGNAL, AgsRtStreamAudioSignalClass)) #define AGS_IS_RT_STREAM_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RT_STREAM_AUDIO_SIGNAL)) #define AGS_IS_RT_STREAM_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RT_STREAM_AUDIO_SIGNAL)) #define AGS_RT_STREAM_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RT_STREAM_AUDIO_SIGNAL, AgsRtStreamAudioSignalClass)) typedef struct _AgsRtStreamAudioSignal AgsRtStreamAudioSignal; typedef struct _AgsRtStreamAudioSignalClass AgsRtStreamAudioSignalClass; struct _AgsRtStreamAudioSignal { AgsRecallAudioSignal recall_audio_signal; GObject *dispose_source; }; struct _AgsRtStreamAudioSignalClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_rt_stream_audio_signal_get_type(); AgsRtStreamAudioSignal* ags_rt_stream_audio_signal_new(AgsAudioSignal *audio_signal); #endif /*__AGS_RT_STREAM_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_copy_channel.c0000644000175000017500000002353013246707333017454 00000000000000/* 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 . */ #include #include #include #include #include void ags_copy_channel_class_init(AgsCopyChannelClass *copy_channel); void ags_copy_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_copy_channel_mutable_interface_init(AgsMutableInterface *mutable); void ags_copy_channel_plugin_interface_init(AgsPluginInterface *plugin); void ags_copy_channel_init(AgsCopyChannel *copy_channel); void ags_copy_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_copy_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_copy_channel_connect(AgsConnectable *connectable); void ags_copy_channel_disconnect(AgsConnectable *connectable); void ags_copy_channel_set_ports(AgsPlugin *plugin, GList *port); void ags_copy_channel_dispose(GObject *gobject); void ags_copy_channel_finalize(GObject *gobject); void ags_copy_channel_set_muted(AgsMutable *mutable, gboolean muted); /** * SECTION:ags_copy_channel * @short_description: copys channel * @title: AgsCopyChannel * @section_id: * @include: ags/audio/recall/ags_copy_channel.h * * The #AgsCopyChannel class provides ports to the effect processor. */ enum{ PROP_0, PROP_MUTED, }; static gpointer ags_copy_channel_parent_class = NULL; static AgsConnectableInterface *ags_copy_channel_parent_connectable_interface; static AgsMutableInterface *ags_copy_channel_parent_mutable_interface; static AgsPluginInterface *ags_copy_channel_parent_plugin_interface; static const gchar *ags_copy_channel_plugin_name = "ags-copy"; static const gchar *ags_copy_channel_plugin_specifier[] = { "./muted[0]", }; static const gchar *ags_copy_channel_plugin_control_port[] = { "1/1", }; GType ags_copy_channel_get_type() { static GType ags_type_copy_channel = 0; if(!ags_type_copy_channel){ static const GTypeInfo ags_copy_channel_info = { sizeof (AgsCopyChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_copy_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCopyChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_copy_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_copy_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_mutable_interface_info = { (GInterfaceInitFunc) ags_copy_channel_mutable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_copy_channel_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_copy_channel = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsCopyChannel", &ags_copy_channel_info, 0); g_type_add_interface_static(ags_type_copy_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_copy_channel, AGS_TYPE_MUTABLE, &ags_mutable_interface_info); g_type_add_interface_static(ags_type_copy_channel, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_copy_channel); } void ags_copy_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_copy_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_copy_channel_connect; connectable->disconnect = ags_copy_channel_disconnect; } void ags_copy_channel_mutable_interface_init(AgsMutableInterface *mutable) { ags_copy_channel_parent_mutable_interface = g_type_interface_peek_parent(mutable); mutable->set_muted = ags_copy_channel_set_muted; } void ags_copy_channel_plugin_interface_init(AgsPluginInterface *plugin) { ags_copy_channel_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->set_ports = ags_copy_channel_set_ports; } void ags_copy_channel_class_init(AgsCopyChannelClass *copy_channel) { GObjectClass *gobject; GParamSpec *param_spec; ags_copy_channel_parent_class = g_type_class_peek_parent(copy_channel); /* GObjectClass */ gobject = (GObjectClass *) copy_channel; gobject->set_property = ags_copy_channel_set_property; gobject->get_property = ags_copy_channel_get_property; gobject->dispose = ags_copy_channel_dispose; gobject->finalize = ags_copy_channel_finalize; /* properties */ /** * AgsCopyChannel:muted: * * The mute port. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("muted", i18n_pspec("mute channel"), i18n_pspec("Mute the channel"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MUTED, param_spec); } void ags_copy_channel_init(AgsCopyChannel *copy_channel) { GList *port; AGS_RECALL(copy_channel)->name = "ags-copy"; AGS_RECALL(copy_channel)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(copy_channel)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(copy_channel)->xml_type = "ags-copy-channel"; port = NULL; copy_channel->muted = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_copy_channel_plugin_name, "specifier", ags_copy_channel_plugin_specifier[0], "control-port", ags_copy_channel_plugin_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, "port-value-size", sizeof(gboolean), "port-value-length", 1, NULL); g_object_ref(copy_channel->muted); copy_channel->muted->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, copy_channel->muted); g_object_ref(copy_channel->muted); /* set port */ AGS_RECALL(copy_channel)->port = port; } void ags_copy_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCopyChannel *copy_channel; copy_channel = AGS_COPY_CHANNEL(gobject); switch(prop_id){ case PROP_MUTED: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == copy_channel->muted){ return; } if(copy_channel->muted != NULL){ g_object_unref(G_OBJECT(copy_channel->muted)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } copy_channel->muted = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_copy_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCopyChannel *copy_channel; copy_channel = AGS_COPY_CHANNEL(gobject); switch(prop_id){ case PROP_MUTED: { g_value_set_object(value, copy_channel->muted); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_copy_channel_dispose(GObject *gobject) { AgsCopyChannel *copy_channel; copy_channel = AGS_COPY_CHANNEL(gobject); if(copy_channel->muted != NULL){ g_object_unref(G_OBJECT(copy_channel->muted)); copy_channel->muted = NULL; } /* call parent */ G_OBJECT_CLASS(ags_copy_channel_parent_class)->dispose(gobject); } void ags_copy_channel_finalize(GObject *gobject) { AgsCopyChannel *copy_channel; copy_channel = AGS_COPY_CHANNEL(gobject); if(copy_channel->muted != NULL){ g_object_unref(G_OBJECT(copy_channel->muted)); } /* call parent */ G_OBJECT_CLASS(ags_copy_channel_parent_class)->finalize(gobject); } void ags_copy_channel_connect(AgsConnectable *connectable) { ags_copy_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_copy_channel_disconnect(AgsConnectable *connectable) { ags_copy_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_copy_channel_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./muted[0]", 9)){ g_object_set(G_OBJECT(plugin), "muted", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_copy_channel_set_muted(AgsMutable *mutable, gboolean muted) { GValue value = {0,}; g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, muted); ags_port_safe_write(AGS_COPY_CHANNEL(mutable)->muted, &value); } /** * ags_copy_channel_new: * @destination: the destination #AgsChannel * @source: the source #AgsChannel * * Creates an #AgsCopyChannel * * Returns: a new #AgsCopyChannel * * Since: 1.0.0 */ AgsCopyChannel* ags_copy_channel_new(AgsChannel *destination, AgsChannel *source) { AgsCopyChannel *copy_channel; copy_channel = (AgsCopyChannel *) g_object_new(AGS_TYPE_COPY_CHANNEL, "destination", destination, "channel", source, NULL); return(copy_channel); } gsequencer-1.4.24/ags/audio/recall/ags_prepare_recycling.h0000644000175000017500000000406013246707333020511 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PREPARE_RECYCLING_H__ #define __AGS_PREPARE_RECYCLING_H__ #include #include #include #define AGS_TYPE_PREPARE_RECYCLING (ags_prepare_recycling_get_type()) #define AGS_PREPARE_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PREPARE_RECYCLING, AgsPrepareRecycling)) #define AGS_PREPARE_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PREPARE_RECYCLING, AgsPrepareRecyclingClass)) #define AGS_IS_PREPARE_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PREPARE_RECYCLING)) #define AGS_IS_PREPARE_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PREPARE_RECYCLING)) #define AGS_PREPARE_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PREPARE_RECYCLING, AgsPrepareRecyclingClass)) typedef struct _AgsPrepareRecycling AgsPrepareRecycling; typedef struct _AgsPrepareRecyclingClass AgsPrepareRecyclingClass; struct _AgsPrepareRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsPrepareRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_prepare_recycling_get_type(); AgsPrepareRecycling* ags_prepare_recycling_new(AgsRecycling *recycling); #endif /*__AGS_PREPARE_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_copy_pattern_channel.h0000644000175000017500000000463213246707333021220 00000000000000/* 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 . */ #ifndef __AGS_COPY_PATTERN_CHANNEL_H__ #define __AGS_COPY_PATTERN_CHANNEL_H__ #include #include #include #include #include #define AGS_TYPE_COPY_PATTERN_CHANNEL (ags_copy_pattern_channel_get_type()) #define AGS_COPY_PATTERN_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_PATTERN_CHANNEL, AgsCopyPatternChannel)) #define AGS_COPY_PATTERN_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_PATTERN_CHANNEL, AgsCopyPatternChannel)) #define AGS_IS_COPY_PATTERN_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COPY_PATTERN_CHANNEL)) #define AGS_IS_COPY_PATTERN_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COPY_PATTERN_CHANNEL)) #define AGS_COPY_PATTERN_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COPY_PATTERN_CHANNEL, AgsCopyPatternChannelClass)) typedef struct _AgsCopyPatternChannel AgsCopyPatternChannel; typedef struct _AgsCopyPatternChannelClass AgsCopyPatternChannelClass; struct _AgsCopyPatternChannel { AgsRecallChannel recall_channel; AgsPort *pattern; }; struct _AgsCopyPatternChannelClass { AgsRecallChannelClass recall_channel; }; GType ags_copy_pattern_channel_get_type(); GList* ags_copy_pattern_channel_template_find_source_and_destination(GList *recall, AgsChannel *destination, AgsChannel *source); AgsCopyPatternChannel* ags_copy_pattern_channel_new(AgsChannel *destination, AgsChannel *source, AgsPort *pattern); #endif /*__AGS_COPY_PATTERN_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_peak_audio_signal.c0000644000175000017500000002222013246707333020443 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_peak_audio_signal_class_init(AgsPeakAudioSignalClass *peak_audio_signal); void ags_peak_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_peak_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_peak_audio_signal_init(AgsPeakAudioSignal *peak_audio_signal); void ags_peak_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_peak_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_peak_audio_signal_connect(AgsConnectable *connectable); void ags_peak_audio_signal_disconnect(AgsConnectable *connectable); void ags_peak_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_peak_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_peak_audio_signal_finalize(GObject *gobject); void ags_peak_audio_signal_run_inter(AgsRecall *recall); AgsRecall* ags_peak_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_peak_audio_signal * @short_description: peaks audio signal * @title: AgsPeakAudioSignal * @section_id: * @include: ags/audio/recall/ags_peak_audio_signal.h * * The #AgsPeakAudioSignal class peaks the audio signal. */ enum{ PROP_0, PROP_PEAK, }; static gpointer ags_peak_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_peak_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_peak_audio_signal_parent_dynamic_connectable_interface; GType ags_peak_audio_signal_get_type() { static GType ags_type_peak_audio_signal = 0; if(!ags_type_peak_audio_signal){ static const GTypeInfo ags_peak_audio_signal_info = { sizeof (AgsPeakAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_peak_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPeakAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_peak_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_peak_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_peak_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_peak_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsPeakAudioSignal", &ags_peak_audio_signal_info, 0); g_type_add_interface_static(ags_type_peak_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_peak_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_peak_audio_signal); } void ags_peak_audio_signal_class_init(AgsPeakAudioSignalClass *peak_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_peak_audio_signal_parent_class = g_type_class_peek_parent(peak_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) peak_audio_signal; gobject->set_property = ags_peak_audio_signal_set_property; gobject->get_property = ags_peak_audio_signal_get_property; gobject->finalize = ags_peak_audio_signal_finalize; /* properties */ /** * AgsPeakAudioSignal:peak: * * The peak. * * Since: 1.0.0 */ param_spec = g_param_spec_double("peak", i18n_pspec("resulting peak"), i18n_pspec("The peak resulted"), 0.0, 1.0, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PEAK, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) peak_audio_signal; recall->run_inter = ags_peak_audio_signal_run_inter; } void ags_peak_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_peak_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_peak_audio_signal_connect; connectable->disconnect = ags_peak_audio_signal_disconnect; } void ags_peak_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_peak_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_peak_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_peak_audio_signal_disconnect_dynamic; } void ags_peak_audio_signal_init(AgsPeakAudioSignal *peak_audio_signal) { AGS_RECALL(peak_audio_signal)->child_type = G_TYPE_NONE; peak_audio_signal->peak = 0.0; } void ags_peak_audio_signal_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_peak_audio_signal_parent_class)->finalize(gobject); /* empty */ } void ags_peak_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPeakAudioSignal *peak_audio_signal; peak_audio_signal = AGS_PEAK_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_PEAK: { gdouble peak; peak = g_value_get_double(value); peak_audio_signal->peak = peak; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_peak_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPeakAudioSignal *peak_audio_signal; peak_audio_signal = AGS_PEAK_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_PEAK: { g_value_set_double(value, peak_audio_signal->peak); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_peak_audio_signal_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_peak_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_peak_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_peak_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_peak_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_peak_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_peak_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_peak_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_peak_audio_signal_run_inter(AgsRecall *recall) { AGS_RECALL_CLASS(ags_peak_audio_signal_parent_class)->run_inter(recall); if(AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current != NULL){ AgsPeakChannel *peak_channel; AgsAudioSignal *audio_signal; peak_channel = AGS_PEAK_CHANNEL(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall)->source; ags_peak_channel_buffer_add(peak_channel, audio_signal->stream_current->data, audio_signal->samplerate, audio_signal->buffer_size, audio_signal->format); }else{ ags_recall_done(recall); } } /** * ags_peak_audio_signal_new: * @audio_signal: an #AgsAudioSignal * * Creates an #AgsPeakAudioSignal * * Returns: a new #AgsPeakAudioSignal * * Since: 1.0.0 */ AgsPeakAudioSignal* ags_peak_audio_signal_new(AgsAudioSignal *audio_signal) { AgsPeakAudioSignal *peak_audio_signal; peak_audio_signal = (AgsPeakAudioSignal *) g_object_new(AGS_TYPE_PEAK_AUDIO_SIGNAL, NULL); return(peak_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_mute_audio.c0000644000175000017500000002440313247044247017144 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_mute_audio_class_init(AgsMuteAudioClass *mute_audio); void ags_mute_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_mute_audio_mutable_interface_init(AgsMutableInterface *mutable); void ags_mute_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_mute_audio_init(AgsMuteAudio *mute_audio); void ags_mute_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_mute_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_mute_audio_connect(AgsConnectable *connectable); void ags_mute_audio_disconnect(AgsConnectable *connectable); void ags_mute_audio_set_ports(AgsPlugin *plugin, GList *port); void ags_mute_audio_dispose(GObject *gobject); void ags_mute_audio_finalize(GObject *gobject); void ags_mute_audio_set_muted(AgsMutable *mutable, gboolean muted); static AgsPortDescriptor* ags_mute_audio_get_muted_port_descriptor(); /** * SECTION:ags_mute_audio * @short_description: mute audio * @title: AgsMuteAudio * @section_id: * @include: ags/audio/recall/ags_mute_audio.h * * The #AgsMuteAudio class provides ports to the effect processor. */ enum{ PROP_0, PROP_MUTED, }; static gpointer ags_mute_audio_parent_class = NULL; static AgsConnectableInterface *ags_mute_audio_parent_connectable_interface; static AgsMutableInterface *ags_mute_audio_parent_mutable_interface; GType ags_mute_audio_get_type() { static GType ags_type_mute_audio = 0; if(!ags_type_mute_audio){ static const GTypeInfo ags_mute_audio_info = { sizeof (AgsMuteAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_mute_audio_class_init, NULL, /* class_finalize */ NULL, /* class_audio */ sizeof (AgsMuteAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_mute_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_mute_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_mutable_interface_info = { (GInterfaceInitFunc) ags_mute_audio_mutable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_mute_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_mute_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsMuteAudio", &ags_mute_audio_info, 0); g_type_add_interface_static(ags_type_mute_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_mute_audio, AGS_TYPE_MUTABLE, &ags_mutable_interface_info); g_type_add_interface_static(ags_type_mute_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_mute_audio); } void ags_mute_audio_class_init(AgsMuteAudioClass *mute_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_mute_audio_parent_class = g_type_class_peek_parent(mute_audio); /* GObjectClass */ gobject = (GObjectClass *) mute_audio; gobject->set_property = ags_mute_audio_set_property; gobject->get_property = ags_mute_audio_get_property; gobject->dispose = ags_mute_audio_dispose; gobject->finalize = ags_mute_audio_finalize; /* properties */ /** * AgsMuteAudio:muted: * * The mute port. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("muted", i18n_pspec("mute audio"), i18n_pspec("Mute the audio"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MUTED, param_spec); } void ags_mute_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_mute_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_mute_audio_connect; connectable->disconnect = ags_mute_audio_disconnect; } void ags_mute_audio_mutable_interface_init(AgsMutableInterface *mutable) { ags_mute_audio_parent_mutable_interface = g_type_interface_peek_parent(mutable); mutable->set_muted = ags_mute_audio_set_muted; } void ags_mute_audio_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_mute_audio_set_ports; } void ags_mute_audio_init(AgsMuteAudio *mute_audio) { GList *port; AGS_RECALL(mute_audio)->name = "ags-mute"; AGS_RECALL(mute_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(mute_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(mute_audio)->xml_type = "ags-mute-audio"; port = NULL; /* muted */ mute_audio->muted = g_object_new(AGS_TYPE_PORT, "plugin-name", "ags-mute", "specifier", "./muted[0]", "control-port", "1/1", "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, "port-value-size", sizeof(gfloat), "port-value-length", 1, NULL); g_object_ref(mute_audio->muted); mute_audio->muted->port_value.ags_port_float = (float) FALSE; /* port descriptor */ mute_audio->muted->port_descriptor = ags_mute_audio_get_muted_port_descriptor(); /* add to port */ port = g_list_prepend(port, mute_audio->muted); g_object_ref(mute_audio->muted); /* set port */ AGS_RECALL(mute_audio)->port = port; } void ags_mute_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMuteAudio *mute_audio; mute_audio = AGS_MUTE_AUDIO(gobject); switch(prop_id){ case PROP_MUTED: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == mute_audio->muted){ return; } if(mute_audio->muted != NULL){ g_object_unref(G_OBJECT(mute_audio->muted)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } mute_audio->muted = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_mute_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMuteAudio *mute_audio; mute_audio = AGS_MUTE_AUDIO(gobject); switch(prop_id){ case PROP_MUTED: { g_value_set_object(value, mute_audio->muted); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_mute_audio_connect(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } /* load automation */ ags_recall_load_automation(recall, g_list_copy(recall->port)); /* call parent */ ags_mute_audio_parent_connectable_interface->connect(connectable); } void ags_mute_audio_disconnect(AgsConnectable *connectable) { ags_mute_audio_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_mute_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "muted[0]", 9)){ g_object_set(G_OBJECT(plugin), "muted", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_mute_audio_dispose(GObject *gobject) { AgsMuteAudio *mute_audio; mute_audio = AGS_MUTE_AUDIO(gobject); /* muted */ if(mute_audio->muted != NULL){ g_object_unref(G_OBJECT(mute_audio->muted)); mute_audio->muted = NULL; } /* call parent */ G_OBJECT_CLASS(ags_mute_audio_parent_class)->dispose(gobject); } void ags_mute_audio_finalize(GObject *gobject) { AgsMuteAudio *mute_audio; mute_audio = AGS_MUTE_AUDIO(gobject); /* muted */ if(mute_audio->muted != NULL){ g_object_unref(G_OBJECT(mute_audio->muted)); } /* call parent */ G_OBJECT_CLASS(ags_mute_audio_parent_class)->finalize(gobject); } void ags_mute_audio_set_muted(AgsMutable *mutable, gboolean muted) { GValue value = {0,}; g_value_init(&value, G_TYPE_FLOAT); g_value_set_float(&value, (muted ? 1.0: 0.0)); ags_port_safe_write(AGS_MUTE_AUDIO(mutable)->muted, &value); } static AgsPortDescriptor* ags_mute_audio_get_muted_port_descriptor() { static AgsPortDescriptor *port_descriptor = NULL; if(port_descriptor == NULL){ port_descriptor = ags_port_descriptor_alloc(); port_descriptor->flags |= (AGS_PORT_DESCRIPTOR_INPUT | AGS_PORT_DESCRIPTOR_CONTROL | AGS_PORT_DESCRIPTOR_TOGGLED); port_descriptor->port_index = 0; /* range */ g_value_init(port_descriptor->default_value, G_TYPE_FLOAT); g_value_init(port_descriptor->lower_value, G_TYPE_FLOAT); g_value_init(port_descriptor->upper_value, G_TYPE_FLOAT); g_value_set_float(port_descriptor->default_value, 0.0); g_value_set_float(port_descriptor->lower_value, 0.0); g_value_set_float(port_descriptor->upper_value, 1.0); } return(port_descriptor); } /** * ags_mute_audio_new: * * Creates an #AgsMuteAudio * * Returns: a new #AgsMuteAudio * * Since: 1.0.0 */ AgsMuteAudio* ags_mute_audio_new() { AgsMuteAudio *mute_audio; mute_audio = (AgsMuteAudio *) g_object_new(AGS_TYPE_MUTE_AUDIO, NULL); return(mute_audio); } gsequencer-1.4.24/ags/audio/recall/ags_play_notation_audio_run.h0000644000175000017500000000550613256163135021744 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PLAY_NOTATION_AUDIO_RUN_H__ #define __AGS_PLAY_NOTATION_AUDIO_RUN_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_PLAY_NOTATION_AUDIO_RUN (ags_play_notation_audio_run_get_type()) #define AGS_PLAY_NOTATION_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_NOTATION_AUDIO_RUN, AgsPlayNotationAudioRun)) #define AGS_PLAY_NOTATION_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_NOTATION_AUDIO_RUN, AgsPlayNotationAudioRun)) #define AGS_IS_PLAY_NOTATION_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_NOTATION_AUDIO_RUN)) #define AGS_IS_PLAY_NOTATION_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_NOTATION_AUDIO_RUN)) #define AGS_PLAY_NOTATION_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_NOTATION_AUDIO_RUN, AgsPlayNotationAudioRunClass)) typedef struct _AgsPlayNotationAudioRun AgsPlayNotationAudioRun; typedef struct _AgsPlayNotationAudioRunClass AgsPlayNotationAudioRunClass; /** * AgsPlayNotationAudioRunFlags: * @AGS_PLAY_NOTATION_AUDIO_RUN_DEFAULT: not used * * Enum values to control the behavior or indicate internal state of #AgsPlayLv2Audio by * enable/disable as flags. */ typedef enum{ AGS_PLAY_NOTATION_AUDIO_RUN_DEFAULT = 1, }AgsPlayNotationAudioRunFlags; struct _AgsPlayNotationAudioRun { AgsRecallAudioRun recall_audio_run; guint flags; AgsDelayAudioRun *delay_audio_run; AgsCountBeatsAudioRun *count_beats_audio_run; AgsNotation *notation; AgsTimestamp *timestamp; }; struct _AgsPlayNotationAudioRunClass { AgsRecallAudioRunClass recall_audio_run; }; GType ags_play_notation_audio_run_get_type(); AgsPlayNotationAudioRun* ags_play_notation_audio_run_new(); #endif /*__AGS_PLAY_NOTATION_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_record_midi_audio.c0000644000175000017500000004270313247044247020455 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_record_midi_audio_class_init(AgsRecordMidiAudioClass *record_midi_audio); void ags_record_midi_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_record_midi_audio_init(AgsRecordMidiAudio *record_midi_audio); void ags_record_midi_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_record_midi_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_record_midi_audio_dispose(GObject *gobject); void ags_record_midi_audio_finalize(GObject *gobject); void ags_record_midi_audio_set_ports(AgsPlugin *plugin, GList *port); /** * SECTION:ags_record_midi_audio * @short_description: record audio midi * @title: AgsRecordMidiAudio * @section_id: * @include: ags/audio/recall/ags_record_midi_audio.h * * The #AgsRecordMidiAudio class provides ports to the effect processor. */ enum{ PROP_0, PROP_PLAYBACK, PROP_RECORD, PROP_FILENAME, PROP_DIVISION, PROP_TEMPO, PROP_BPM, }; static gpointer ags_record_midi_audio_parent_class = NULL; static AgsPluginInterface *ags_record_midi_parent_plugin_interface; static const gchar *ags_record_midi_audio_plugin_name = "ags-record-midi"; static const gchar *ags_record_midi_audio_specifier[] = { "playback[0]" "record[0]", "filename[0]", "division[0]", "tempo[0]", "bpm[0]", }; static const gchar *ags_record_midi_audio_control_port[] = { "1/6", "2/6", "3/6", "4/6", "5/6", "6/6", }; GType ags_record_midi_audio_get_type() { static GType ags_type_record_midi_audio = 0; if(!ags_type_record_midi_audio){ static const GTypeInfo ags_record_midi_audio_info = { sizeof (AgsRecordMidiAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_record_midi_audio_class_init, NULL, /* class_finalize */ NULL, /* class_audio */ sizeof (AgsRecordMidiAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_record_midi_audio_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_record_midi_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_record_midi_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsRecordMidiAudio", &ags_record_midi_audio_info, 0); g_type_add_interface_static(ags_type_record_midi_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_record_midi_audio); } void ags_record_midi_audio_class_init(AgsRecordMidiAudioClass *record_midi_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_record_midi_audio_parent_class = g_type_class_peek_parent(record_midi_audio); /* GObjectClass */ gobject = (GObjectClass *) record_midi_audio; gobject->set_property = ags_record_midi_audio_set_property; gobject->get_property = ags_record_midi_audio_get_property; gobject->dispose = ags_record_midi_audio_dispose; gobject->finalize = ags_record_midi_audio_finalize; /* properties */ /** * AgsRecordMidiAudio:playback: * * The playback port. * * Since: 1.0.0 */ param_spec = g_param_spec_object("playback", i18n_pspec("if do playback"), i18n_pspec("If playback should be performed"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK, param_spec); /** * AgsRecordMidiAudio:record: * * The record port. * * Since: 1.0.0 */ param_spec = g_param_spec_object("record", i18n_pspec("if do record"), i18n_pspec("If record data for later use should be done"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECORD, param_spec); /** * AgsRecordMidiAudio:filename: * * The filename port. * * Since: 1.0.0 */ param_spec = g_param_spec_object("filename", i18n_pspec("filename of record"), i18n_pspec("The filename of record"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsRecordMidiAudio:division: * * The division port. * * Since: 1.0.0 */ param_spec = g_param_spec_object("division", i18n_pspec("division of record"), i18n_pspec("The division of record"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DIVISION, param_spec); /** * AgsRecordMidiAudio:tempo: * * The tempo port. * * Since: 1.0.0 */ param_spec = g_param_spec_object("tempo", i18n_pspec("tempo of record"), i18n_pspec("The tempo of record"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TEMPO, param_spec); /** * AgsRecordMidiAudio:bpm: * * The bpm port. * * Since: 1.0.0 */ param_spec = g_param_spec_object("bpm", i18n_pspec("bpm of record"), i18n_pspec("The bpm of record"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); } void ags_record_midi_audio_plugin_interface_init(AgsPluginInterface *plugin) { ags_record_midi_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->set_ports = ags_record_midi_audio_set_ports; } void ags_record_midi_audio_init(AgsRecordMidiAudio *record_midi_audio) { GList *port; AGS_RECALL(record_midi_audio)->name = "ags-record-midi"; AGS_RECALL(record_midi_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(record_midi_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(record_midi_audio)->xml_type = "ags-record-midi-audio"; port = NULL; /* playback */ record_midi_audio->playback = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_record_midi_audio_plugin_name, "specifier", ags_record_midi_audio_specifier[0], "control-port", ags_record_midi_audio_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, NULL); g_object_ref(record_midi_audio->playback); record_midi_audio->playback->port_value.ags_port_boolean = TRUE; /* add to port */ port = g_list_prepend(port, record_midi_audio->playback); g_object_ref(record_midi_audio->playback); /* record */ record_midi_audio->record = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_record_midi_audio_plugin_name, "specifier", ags_record_midi_audio_specifier[1], "control-port", ags_record_midi_audio_control_port[1], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, NULL); g_object_ref(record_midi_audio->record); record_midi_audio->record->port_value.ags_port_boolean = FALSE; /* add to port */ port = g_list_prepend(port, record_midi_audio->record); g_object_ref(record_midi_audio->record); /* filename */ record_midi_audio->filename = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_record_midi_audio_plugin_name, "specifier", ags_record_midi_audio_specifier[2], "control-port", ags_record_midi_audio_control_port[2], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_BOOLEAN, NULL); g_object_ref(record_midi_audio->filename); record_midi_audio->filename->port_value.ags_port_boolean = TRUE; /* add to port */ port = g_list_prepend(port, record_midi_audio->filename); g_object_ref(record_midi_audio->filename); /* division */ record_midi_audio->division = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_record_midi_audio_plugin_name, "specifier", ags_record_midi_audio_specifier[2], "control-port", ags_record_midi_audio_control_port[2], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_INT64, NULL); g_object_ref(record_midi_audio->division); record_midi_audio->division->port_value.ags_port_int = 0; /* add to port */ port = g_list_prepend(port, record_midi_audio->division); g_object_ref(record_midi_audio->division); /* tempo */ record_midi_audio->tempo = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_record_midi_audio_plugin_name, "specifier", ags_record_midi_audio_specifier[2], "control-port", ags_record_midi_audio_control_port[2], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_INT64, NULL); g_object_ref(record_midi_audio->tempo); record_midi_audio->tempo->port_value.ags_port_int = 0; /* add to port */ port = g_list_prepend(port, record_midi_audio->tempo); g_object_ref(record_midi_audio->tempo); /* bpm */ record_midi_audio->bpm = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_record_midi_audio_plugin_name, "specifier", ags_record_midi_audio_specifier[2], "control-port", ags_record_midi_audio_control_port[2], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_INT64, NULL); g_object_ref(record_midi_audio->bpm); record_midi_audio->bpm->port_value.ags_port_int = 120; /* add to port */ port = g_list_prepend(port, record_midi_audio->bpm); g_object_ref(record_midi_audio->bpm); /* set port */ AGS_RECALL(record_midi_audio)->port = port; } void ags_record_midi_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecordMidiAudio *record_midi_audio; record_midi_audio = AGS_RECORD_MIDI_AUDIO(gobject); switch(prop_id){ case PROP_PLAYBACK: { AgsPort *playback; playback = (AgsPort *) g_value_get_object(value); if(record_midi_audio->playback == playback){ return; } if(record_midi_audio->playback != NULL){ g_object_unref(G_OBJECT(record_midi_audio->playback)); } if(playback != NULL){ g_object_ref(G_OBJECT(playback)); } record_midi_audio->playback = playback; } break; case PROP_RECORD: { AgsPort *record; record = (AgsPort *) g_value_get_object(value); if(record_midi_audio->record == record){ return; } if(record_midi_audio->record != NULL){ g_object_unref(G_OBJECT(record_midi_audio->record)); } if(record != NULL){ g_object_ref(G_OBJECT(record)); } record_midi_audio->record = record; } break; case PROP_FILENAME: { AgsPort *filename; filename = (AgsPort *) g_value_get_object(value); if(record_midi_audio->filename == filename){ return; } if(record_midi_audio->filename != NULL){ g_object_unref(G_OBJECT(record_midi_audio->filename)); } if(filename != NULL){ g_object_ref(G_OBJECT(filename)); } record_midi_audio->filename = filename; } break; case PROP_DIVISION: { AgsPort *division; division = (AgsPort *) g_value_get_object(value); if(record_midi_audio->division == division){ return; } if(record_midi_audio->division != NULL){ g_object_unref(G_OBJECT(record_midi_audio->division)); } if(division != NULL){ g_object_ref(G_OBJECT(division)); } record_midi_audio->division = division; } break; case PROP_TEMPO: { AgsPort *tempo; tempo = (AgsPort *) g_value_get_object(value); if(record_midi_audio->tempo == tempo){ return; } if(record_midi_audio->tempo != NULL){ g_object_unref(G_OBJECT(record_midi_audio->tempo)); } if(tempo != NULL){ g_object_ref(G_OBJECT(tempo)); } record_midi_audio->tempo = tempo; } break; case PROP_BPM: { AgsPort *bpm; bpm = (AgsPort *) g_value_get_object(value); if(record_midi_audio->bpm == bpm){ return; } if(record_midi_audio->bpm != NULL){ g_object_unref(G_OBJECT(record_midi_audio->bpm)); } if(bpm != NULL){ g_object_ref(G_OBJECT(bpm)); } record_midi_audio->bpm = bpm; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_record_midi_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecordMidiAudio *record_midi_audio; record_midi_audio = AGS_RECORD_MIDI_AUDIO(gobject); switch(prop_id){ case PROP_PLAYBACK: { g_value_set_object(value, record_midi_audio->playback); } break; case PROP_RECORD: { g_value_set_object(value, record_midi_audio->record); } break; case PROP_FILENAME: { g_value_set_object(value, record_midi_audio->filename); } break; case PROP_DIVISION: { g_value_set_object(value, record_midi_audio->division); } break; case PROP_TEMPO: { g_value_set_object(value, record_midi_audio->tempo); } break; case PROP_BPM: { g_value_set_object(value, record_midi_audio->bpm); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_record_midi_audio_dispose(GObject *gobject) { AgsRecordMidiAudio *record_midi_audio; record_midi_audio = AGS_RECORD_MIDI_AUDIO(gobject); /* playback */ if(record_midi_audio->playback != NULL){ g_object_unref(record_midi_audio->playback); record_midi_audio->playback = NULL; } /* record */ if(record_midi_audio->record != NULL){ g_object_unref(record_midi_audio->record); record_midi_audio->record = NULL; } /* filename */ if(record_midi_audio->filename != NULL){ g_object_unref(record_midi_audio->filename); record_midi_audio->filename = NULL; } /* division */ if(record_midi_audio->division != NULL){ g_object_unref(record_midi_audio->division); record_midi_audio->division = NULL; } /* tempo */ if(record_midi_audio->tempo != NULL){ g_object_unref(record_midi_audio->tempo); record_midi_audio->tempo = NULL; } /* bpm */ if(record_midi_audio->bpm != NULL){ g_object_unref(record_midi_audio->bpm); record_midi_audio->bpm = NULL; } /* call parent */ G_OBJECT_CLASS(ags_record_midi_audio_parent_class)->dispose(gobject); } void ags_record_midi_audio_finalize(GObject *gobject) { AgsRecordMidiAudio *record_midi_audio; record_midi_audio = AGS_RECORD_MIDI_AUDIO(gobject); /* playback */ if(record_midi_audio->playback != NULL){ g_object_unref(record_midi_audio->playback); } /* record */ if(record_midi_audio->record != NULL){ g_object_unref(record_midi_audio->record); } /* filename */ if(record_midi_audio->filename != NULL){ g_object_unref(record_midi_audio->filename); } /* division */ if(record_midi_audio->division != NULL){ g_object_unref(record_midi_audio->division); } /* tempo */ if(record_midi_audio->tempo != NULL){ g_object_unref(record_midi_audio->tempo); } /* bpm */ if(record_midi_audio->bpm != NULL){ g_object_unref(record_midi_audio->bpm); } /* call parent */ G_OBJECT_CLASS(ags_record_midi_audio_parent_class)->finalize(gobject); } void ags_record_midi_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./playback[0]", 11)){ g_object_set(G_OBJECT(plugin), "playback", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./record[0]", 11)){ g_object_set(G_OBJECT(plugin), "record", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./filename[0]", 11)){ g_object_set(G_OBJECT(plugin), "filename", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./division[0]", 11)){ g_object_set(G_OBJECT(plugin), "division", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./tempo[0]", 11)){ g_object_set(G_OBJECT(plugin), "tempo", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./bpm[0]", 11)){ g_object_set(G_OBJECT(plugin), "bpm", AGS_PORT(port->data), NULL); } port = port->next; } } /** * ags_record_midi_audio_new: * * Creates an #AgsRecordMidiAudio * * Returns: a new #AgsRecordMidiAudio * * Since: 1.0.0 */ AgsRecordMidiAudio* ags_record_midi_audio_new() { AgsRecordMidiAudio *record_midi_audio; record_midi_audio = (AgsRecordMidiAudio *) g_object_new(AGS_TYPE_RECORD_MIDI_AUDIO, NULL); return(record_midi_audio); } gsequencer-1.4.24/ags/audio/recall/ags_play_audio.c0000644000175000017500000000557213246707333017146 00000000000000/* 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 . */ #include void ags_play_audio_class_init(AgsPlayAudioClass *play_audio); void ags_play_audio_init(AgsPlayAudio *play_audio); void ags_play_audio_finalize(GObject *gobject); /** * SECTION:ags_play_audio * @short_description: play audio * @title: AgsPlayAudio * @section_id: * @include: ags/audio/recall/ags_play_audio.h * * The #AgsPlayAudio class provides ports to the effect processor. */ static gpointer ags_play_audio_parent_class = NULL; GType ags_play_audio_get_type() { static GType ags_type_play_audio = 0; if(!ags_type_play_audio){ static const GTypeInfo ags_play_audio_info = { sizeof (AgsPlayAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_play_audio_class_init, NULL, /* class_finalize */ NULL, /* class_audio */ sizeof (AgsPlayAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_play_audio_init, }; ags_type_play_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsPlayAudio", &ags_play_audio_info, 0); } return(ags_type_play_audio); } void ags_play_audio_class_init(AgsPlayAudioClass *play_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_play_audio_parent_class = g_type_class_peek_parent(play_audio); /* GObjectClass */ gobject = (GObjectClass *) play_audio; gobject->finalize = ags_play_audio_finalize; } void ags_play_audio_init(AgsPlayAudio *play_audio) { AGS_RECALL(play_audio)->name = "ags-play"; AGS_RECALL(play_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(play_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(play_audio)->xml_type = "ags-play-audio"; } void ags_play_audio_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_play_audio_parent_class)->finalize(gobject); } /** * ags_play_audio_new: * * Creates an #AgsPlayAudio * * Returns: a new #AgsPlayAudio * * Since: 1.0.0 */ AgsPlayAudio* ags_play_audio_new() { AgsPlayAudio *play_audio; play_audio = (AgsPlayAudio *) g_object_new(AGS_TYPE_PLAY_AUDIO, NULL); return(play_audio); } gsequencer-1.4.24/ags/audio/recall/ags_volume_audio_signal.c0000644000175000017500000002022713247044247021036 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_volume_audio_signal_class_init(AgsVolumeAudioSignalClass *volume_audio_signal); void ags_volume_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_volume_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_volume_audio_signal_init(AgsVolumeAudioSignal *volume_audio_signal); void ags_volume_audio_signal_connect(AgsConnectable *connectable); void ags_volume_audio_signal_disconnect(AgsConnectable *connectable); void ags_volume_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_volume_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_volume_audio_signal_finalize(GObject *gobject); void ags_volume_audio_signal_run_inter(AgsRecall *recall); AgsRecall* ags_volume_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_volume_audio_signal * @short_description: volumes audio signal * @title: AgsVolumeAudioSignal * @section_id: * @include: ags/audio/recall/ags_volume_audio_signal.h * * The #AgsVolumeAudioSignal class volumes the audio signal. */ static gpointer ags_volume_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_volume_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_volume_audio_signal_parent_dynamic_connectable_interface; GType ags_volume_audio_signal_get_type() { static GType ags_type_volume_audio_signal = 0; if(!ags_type_volume_audio_signal){ static const GTypeInfo ags_volume_audio_signal_info = { sizeof (AgsVolumeAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_volume_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsVolumeAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_volume_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_volume_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_volume_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_volume_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsVolumeAudioSignal", &ags_volume_audio_signal_info, 0); g_type_add_interface_static(ags_type_volume_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_volume_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_volume_audio_signal); } void ags_volume_audio_signal_class_init(AgsVolumeAudioSignalClass *volume_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_volume_audio_signal_parent_class = g_type_class_peek_parent(volume_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) volume_audio_signal; gobject->finalize = ags_volume_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) volume_audio_signal; recall->run_inter = ags_volume_audio_signal_run_inter; } void ags_volume_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_volume_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_volume_audio_signal_connect; connectable->disconnect = ags_volume_audio_signal_disconnect; } void ags_volume_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_volume_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_volume_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_volume_audio_signal_disconnect_dynamic; } void ags_volume_audio_signal_init(AgsVolumeAudioSignal *volume_audio_signal) { AGS_RECALL(volume_audio_signal)->name = "ags-volume"; AGS_RECALL(volume_audio_signal)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(volume_audio_signal)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(volume_audio_signal)->xml_type = "ags-volume-audio-signal"; AGS_RECALL(volume_audio_signal)->port = NULL; } void ags_volume_audio_signal_finalize(GObject *gobject) { /* call parent */ G_OBJECT_CLASS(ags_volume_audio_signal_parent_class)->finalize(gobject); /* empty */ } void ags_volume_audio_signal_connect(AgsConnectable *connectable) { /* call parent */ ags_volume_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_volume_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_volume_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_volume_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_volume_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_volume_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_volume_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_volume_audio_signal_run_inter(AgsRecall *recall) { AGS_RECALL_CLASS(ags_volume_audio_signal_parent_class)->run_inter(recall); if(recall->rt_safe && recall->recall_id->recycling_context->parent != NULL && AGS_RECALL_AUDIO_SIGNAL(recall)->source->note == NULL){ return; } if(AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current != NULL){ AgsVolumeChannel *volume_channel; void *buffer; gdouble volume; guint buffer_size; guint limit; guint i; GValue value = {0,}; volume_channel = AGS_VOLUME_CHANNEL(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); buffer = (signed short *) AGS_RECALL_AUDIO_SIGNAL(recall)->source->stream_current->data; buffer_size = AGS_RECALL_AUDIO_SIGNAL(recall)->source->buffer_size; g_value_init(&value, G_TYPE_FLOAT); ags_port_safe_read(volume_channel->volume, &value); volume = g_value_get_float(&value); g_value_unset(&value); ags_audio_buffer_util_volume(buffer, 1, ags_audio_buffer_util_format_from_soundcard(AGS_RECALL_AUDIO_SIGNAL(recall)->source->format), buffer_size, volume); }else{ ags_recall_done(recall); } } /** * ags_volume_audio_signal_new: * @audio_signal: an #AgsAudioSignal * * Creates an #AgsVolumeAudioSignal * * Returns: a new #AgsVolumeAudioSignal * * Since: 1.0.0 */ AgsVolumeAudioSignal* ags_volume_audio_signal_new(AgsAudioSignal *audio_signal) { AgsVolumeAudioSignal *volume_audio_signal; volume_audio_signal = (AgsVolumeAudioSignal *) g_object_new(AGS_TYPE_VOLUME_AUDIO_SIGNAL, NULL); return(volume_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_buffer_channel_run.c0000644000175000017500000002040013246707333020630 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_buffer_channel_run_class_init(AgsBufferChannelRunClass *buffer_channel_run); void ags_buffer_channel_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_buffer_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_buffer_channel_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_buffer_channel_run_init(AgsBufferChannelRun *buffer_channel_run); void ags_buffer_channel_run_connect(AgsConnectable *connectable); void ags_buffer_channel_run_disconnect(AgsConnectable *connectable); void ags_buffer_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_buffer_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_buffer_channel_run_finalize(GObject *gobject); AgsRecall* ags_buffer_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_buffer_channel_run * @short_description: buffers channel * @title: AgsBufferChannelRun * @section_id: * @include: ags/audio/recall/ags_buffer_channel_run.h * * The #AgsBufferChannelRun class buffers the channel. */ static gpointer ags_buffer_channel_run_parent_class = NULL; static AgsConnectableInterface *ags_buffer_channel_run_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_buffer_channel_run_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_buffer_channel_run_parent_plugin_interface; GType ags_buffer_channel_run_get_type() { static GType ags_type_buffer_channel_run = 0; if(!ags_type_buffer_channel_run){ static const GTypeInfo ags_buffer_channel_run_info = { sizeof (AgsBufferChannelRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_buffer_channel_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsBufferChannelRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_buffer_channel_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_buffer_channel_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_buffer_channel_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_buffer_channel_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_buffer_channel_run = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsBufferChannelRun", &ags_buffer_channel_run_info, 0); g_type_add_interface_static(ags_type_buffer_channel_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_buffer_channel_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_buffer_channel_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_buffer_channel_run); } void ags_buffer_channel_run_class_init(AgsBufferChannelRunClass *buffer_channel_run) { GObjectClass *gobject; AgsRecallClass *recall; ags_buffer_channel_run_parent_class = g_type_class_peek_parent(buffer_channel_run); /* GObjectClass */ gobject = (GObjectClass *) buffer_channel_run; gobject->finalize = ags_buffer_channel_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) buffer_channel_run; recall->duplicate = ags_buffer_channel_run_duplicate; } void ags_buffer_channel_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_buffer_channel_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_buffer_channel_run_connect; connectable->disconnect = ags_buffer_channel_run_disconnect; } void ags_buffer_channel_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_buffer_channel_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_buffer_channel_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_buffer_channel_run_disconnect_dynamic; } void ags_buffer_channel_run_plugin_interface_init(AgsPluginInterface *plugin) { ags_buffer_channel_run_parent_plugin_interface = g_type_interface_peek_parent(plugin); } void ags_buffer_channel_run_init(AgsBufferChannelRun *buffer_channel_run) { AGS_RECALL(buffer_channel_run)->name = "ags-buffer"; AGS_RECALL(buffer_channel_run)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(buffer_channel_run)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(buffer_channel_run)->xml_type = "ags-buffer-channel-run"; AGS_RECALL(buffer_channel_run)->port = NULL; AGS_RECALL(buffer_channel_run)->flags |= AGS_RECALL_INPUT_ORIENTATED; AGS_RECALL(buffer_channel_run)->child_type = AGS_TYPE_BUFFER_RECYCLING; } void ags_buffer_channel_run_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_buffer_channel_run_parent_class)->finalize(gobject); } void ags_buffer_channel_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_buffer_channel_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_buffer_channel_run_disconnect(AgsConnectable *connectable) { /* call parent */ ags_buffer_channel_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_buffer_channel_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_buffer_channel_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_buffer_channel_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsChannel *channel; AgsBufferChannelRun *buffer_channel_run; ags_buffer_channel_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } AgsRecall* ags_buffer_channel_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsBufferChannelRun *copy; copy = (AgsBufferChannelRun *) AGS_RECALL_CLASS(ags_buffer_channel_run_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_buffer_channel_run_new: * * Creates an #AgsBufferChannelRun * * Returns: a new #AgsBufferChannelRun * * Since: 1.0.0 */ AgsBufferChannelRun* ags_buffer_channel_run_new() { AgsBufferChannelRun *buffer_channel_run; buffer_channel_run = (AgsBufferChannelRun *) g_object_new(AGS_TYPE_BUFFER_CHANNEL_RUN, NULL); return(buffer_channel_run); } gsequencer-1.4.24/ags/audio/recall/ags_play_audio.h0000644000175000017500000000352613246707333017150 00000000000000/* 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 . */ #ifndef __AGS_PLAY_AUDIO_H__ #define __AGS_PLAY_AUDIO_H__ #include #include #include #define AGS_TYPE_PLAY_AUDIO (ags_play_audio_get_type()) #define AGS_PLAY_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_AUDIO, AgsPlayAudio)) #define AGS_PLAY_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_AUDIO, AgsPlayAudio)) #define AGS_IS_PLAY_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_AUDIO)) #define AGS_IS_PLAY_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_AUDIO)) #define AGS_PLAY_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_AUDIO, AgsPlayAudioClass)) typedef struct _AgsPlayAudio AgsPlayAudio; typedef struct _AgsPlayAudioClass AgsPlayAudioClass; struct _AgsPlayAudio { AgsRecallAudio recall_audio; AgsPort *muted; }; struct _AgsPlayAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_play_audio_get_type(); AgsPlayAudio* ags_play_audio_new(); #endif /*__AGS_PLAY_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_rt_stream_audio_signal.c0000644000175000017500000004002313247044247021523 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_rt_stream_audio_signal_class_init(AgsRtStreamAudioSignalClass *rt_stream_audio_signal); void ags_rt_stream_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_rt_stream_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_rt_stream_audio_signal_init(AgsRtStreamAudioSignal *rt_stream_audio_signal); void ags_rt_stream_audio_signal_connect(AgsConnectable *connectable); void ags_rt_stream_audio_signal_disconnect(AgsConnectable *connectable); void ags_rt_stream_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_rt_stream_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_rt_stream_audio_signal_dispose(GObject *gobject); void ags_rt_stream_audio_signal_finalize(GObject *gobject); void ags_rt_stream_audio_signal_run_init_pre(AgsRecall *recall); void ags_rt_stream_audio_signal_run_pre(AgsRecall *recall); AgsRecall* ags_rt_stream_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_rt_stream_audio_signal * @short_description: rt_streams audio signal * @title: AgsRtStreamAudioSignal * @section_id: * @include: ags/audio/recall/ags_rt_stream_audio_signal.h * * The #AgsRtStreamAudioSignal class streams the audio signal template. */ static gpointer ags_rt_stream_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_rt_stream_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_rt_stream_audio_signal_parent_dynamic_connectable_interface; GType ags_rt_stream_audio_signal_get_type() { static GType ags_type_rt_stream_audio_signal = 0; if(!ags_type_rt_stream_audio_signal){ static const GTypeInfo ags_rt_stream_audio_signal_info = { sizeof (AgsRtStreamAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_rt_stream_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRtStreamAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_rt_stream_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_rt_stream_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_rt_stream_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_rt_stream_audio_signal = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsRtStreamAudioSignal", &ags_rt_stream_audio_signal_info, 0); g_type_add_interface_static(ags_type_rt_stream_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_rt_stream_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_rt_stream_audio_signal); } void ags_rt_stream_audio_signal_class_init(AgsRtStreamAudioSignalClass *rt_stream_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_rt_stream_audio_signal_parent_class = g_type_class_peek_parent(rt_stream_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) rt_stream_audio_signal; gobject->dispose = ags_rt_stream_audio_signal_dispose; gobject->finalize = ags_rt_stream_audio_signal_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) rt_stream_audio_signal; recall->run_init_pre = ags_rt_stream_audio_signal_run_init_pre; recall->run_pre = ags_rt_stream_audio_signal_run_pre; recall->duplicate = ags_rt_stream_audio_signal_duplicate; } void ags_rt_stream_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_rt_stream_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_rt_stream_audio_signal_connect; connectable->disconnect = ags_rt_stream_audio_signal_disconnect; } void ags_rt_stream_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_rt_stream_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_rt_stream_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_rt_stream_audio_signal_disconnect_dynamic; } void ags_rt_stream_audio_signal_init(AgsRtStreamAudioSignal *rt_stream_audio_signal) { AGS_RECALL(rt_stream_audio_signal)->name = "ags-rt_stream"; AGS_RECALL(rt_stream_audio_signal)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(rt_stream_audio_signal)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(rt_stream_audio_signal)->xml_type = "ags-rt_stream-audio-signal"; AGS_RECALL(rt_stream_audio_signal)->port = NULL; AGS_RECALL(rt_stream_audio_signal)->child_type = G_TYPE_NONE; rt_stream_audio_signal->dispose_source = NULL; } void ags_rt_stream_audio_signal_dispose(GObject *gobject) { AGS_RT_STREAM_AUDIO_SIGNAL(gobject)->dispose_source = AGS_RECALL_AUDIO_SIGNAL(gobject)->source; /* call parent */ G_OBJECT_CLASS(ags_rt_stream_audio_signal_parent_class)->dispose(gobject); } void ags_rt_stream_audio_signal_finalize(GObject *gobject) { AgsAudioSignal *audio_signal; audio_signal = AGS_RT_STREAM_AUDIO_SIGNAL(gobject)->dispose_source; if(audio_signal != NULL){ AgsRecycling *recycling; recycling = audio_signal->recycling; if(recycling != NULL){ ags_recycling_remove_audio_signal(recycling, audio_signal); } g_object_run_dispose(audio_signal); g_object_unref(audio_signal); } /* call parent */ G_OBJECT_CLASS(ags_rt_stream_audio_signal_parent_class)->finalize(gobject); } void ags_rt_stream_audio_signal_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } /* call parent */ ags_rt_stream_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_rt_stream_audio_signal_disconnect(AgsConnectable *connectable) { /* call parent */ ags_rt_stream_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_rt_stream_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } /* call parent */ ags_rt_stream_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_rt_stream_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_rt_stream_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } void ags_rt_stream_audio_signal_run_init_pre(AgsRecall *recall) { /* call parent */ AGS_RECALL_CLASS(ags_rt_stream_audio_signal_parent_class)->run_init_pre(recall); // g_message("rt_stream"); } void ags_rt_stream_audio_signal_run_pre(AgsRecall *recall) { AgsRtStreamAudioSignal *rt_stream_audio_signal; AgsRecycling *recycling; AgsAudioSignal *source; AgsAudioSignal *template; AgsMutexManager *mutex_manager; GList *note; void *buffer; gdouble delay; guint buffer_size; guint copy_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *recycling_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); AGS_RECALL_CLASS(ags_rt_stream_audio_signal_parent_class)->run_inter(recall); rt_stream_audio_signal = AGS_RT_STREAM_AUDIO_SIGNAL(recall); source = AGS_RECALL_AUDIO_SIGNAL(rt_stream_audio_signal)->source; buffer = source->stream_beginning->data; buffer_size = source->buffer_size; delay = source->delay; /* lookup recycling mutex */ recycling = source->recycling; pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* get template */ template = source->rt_template; if(template == NULL){ return; } note = source->note; ags_audio_buffer_util_clear_buffer(buffer, 1, buffer_size, ags_audio_buffer_util_format_from_soundcard(source->format)); copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(source->format), ags_audio_buffer_util_format_from_soundcard(template->format)); while(note != NULL){ AgsNote *current; GList *stream, *template_stream; guint x0, x1; guint rt_attack; guint64 offset; current = note->data; offset = current->rt_offset; pthread_mutex_lock(recycling_mutex); x0 = current->x[0]; x1 = current->x[1]; rt_attack = current->rt_attack; pthread_mutex_unlock(recycling_mutex); if(offset < template->length || offset < delay * x1){ if(template->loop_start < template->loop_end){ guint frame_count; guint loop_length; guint loop_frame_count; guint n_frames; guint copy_n_frames; guint nth_loop; guint j_start; guint i, j, k; frame_count = delay * (x1 - x0) * buffer_size; loop_length = template->loop_end - template->loop_start; loop_frame_count = ((frame_count - template->loop_start) / loop_length) * template->buffer_size; if(offset * buffer_size > template->loop_end){ if(((guint) offset * buffer_size) + buffer_size > frame_count - (template->frame_count - template->loop_end)){ if(offset * buffer_size > frame_count - (template->frame_count - template->loop_end)){ j_start = (frame_count - (offset * buffer_size)) % buffer_size; template_stream = g_list_nth(template->stream_beginning, (frame_count - (offset * buffer_size)) / buffer_size); if(template_stream == NULL){ note = note->next; continue; } }else{ j_start = ((guint) (offset * buffer_size) - template->loop_end) % (template->loop_end - template->loop_start) % buffer_size; template_stream = g_list_nth(template->stream_beginning, (template->loop_start + ((((guint) (offset * buffer_size) - template->loop_end) % (template->loop_end - template->loop_start)) / buffer_size))); if(template_stream == NULL){ note = note->next; continue; } } }else{ j_start = ((guint) (offset * buffer_size) - template->loop_end) % (template->loop_end - template->loop_start) % buffer_size; template_stream = g_list_nth(template->stream_beginning, (template->loop_start + ((((guint) (offset * buffer_size) - template->loop_end) % (template->loop_end - template->loop_start)) / buffer_size))); if(template_stream == NULL){ note = note->next; continue; } } }else{ j_start = ((guint) (offset * buffer_size)) % buffer_size; template_stream = g_list_nth(template->stream_beginning, offset); if(template_stream == NULL){ note = note->next; continue; } } if(offset == 0){ k = rt_attack; }else{ k = 0; } for(i = 0, j = j_start, nth_loop = offset; i < buffer_size;){ /* compute count of frames to copy */ copy_n_frames = buffer_size; /* limit nth loop */ if(i > template->loop_start && i + copy_n_frames > template->loop_start + loop_length && i + copy_n_frames < template->loop_start + loop_frame_count && i + copy_n_frames >= template->loop_start + (nth_loop + 1) * loop_length){ copy_n_frames = (template->loop_start + (nth_loop + 1) * loop_length) - i; } /* check boundaries */ if((k % buffer_size) + copy_n_frames > buffer_size){ copy_n_frames = buffer_size - (k % buffer_size); } if(j + copy_n_frames > buffer_size){ copy_n_frames = buffer_size - j; } if(buffer == NULL || template_stream == NULL){ break; } /* copy */ ags_audio_buffer_util_copy_buffer_to_buffer(buffer, 1, k % buffer_size, template_stream->data, 1, j, copy_n_frames, copy_mode); /* increment and iterate */ if((i + copy_n_frames) % buffer_size == 0){ break; } if(j + copy_n_frames == template->buffer_size){ template_stream = template_stream->next; } if(template_stream == NULL || (i > template->loop_start && i + copy_n_frames > template->loop_start + loop_length && i + copy_n_frames < template->loop_start + loop_frame_count && i + copy_n_frames >= template->loop_start + (nth_loop + 1) * loop_length)){ j = template->loop_start % template->buffer_size; template_stream = g_list_nth(template->stream_beginning, floor(template->loop_start / template->buffer_size)); nth_loop++; }else{ j += copy_n_frames; } i += copy_n_frames; k += copy_n_frames; if(j == template->buffer_size){ j = 0; } } }else{ template_stream = g_list_nth(template->stream_beginning, offset); if(template_stream == NULL){ note = note->next; continue; } if(offset == 0){ ags_audio_buffer_util_copy_buffer_to_buffer(buffer, 1, rt_attack, template_stream->data, 1, 0, buffer_size - rt_attack, copy_mode); }else{ if(rt_attack != 0 && template_stream->prev != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(buffer, 1, 0, template_stream->prev->data, 1, buffer_size - rt_attack, rt_attack, copy_mode); } ags_audio_buffer_util_copy_buffer_to_buffer(buffer, 1, rt_attack, template_stream->data, 1, 0, buffer_size - rt_attack, copy_mode); } } }else{ ags_audio_signal_remove_note(source, current); if(source->note == NULL && recall->recall_id->recycling_context->parent == NULL){ ags_recall_done(recall); } } pthread_mutex_lock(recycling_mutex); current->rt_offset += 1; pthread_mutex_unlock(recycling_mutex); note = note->next; } } AgsRecall* ags_rt_stream_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRtStreamAudioSignal *copy; copy = (AgsRtStreamAudioSignal *) AGS_RECALL_CLASS(ags_rt_stream_audio_signal_parent_class)->duplicate(recall, recall_id, n_params, parameter); return((AgsRecall *) copy); } /** * ags_rt_stream_audio_signal_new: * @audio_signal: an #AgsAudioSignal * * Creates an #AgsRtStreamAudioSignal * * Returns: a new #AgsRtStreamAudioSignal * * Since: 1.4.0 */ AgsRtStreamAudioSignal* ags_rt_stream_audio_signal_new(AgsAudioSignal *audio_signal) { AgsRtStreamAudioSignal *rt_stream_audio_signal; rt_stream_audio_signal = (AgsRtStreamAudioSignal *) g_object_new(AGS_TYPE_RT_STREAM_AUDIO_SIGNAL, "source", audio_signal, NULL); return(rt_stream_audio_signal); } gsequencer-1.4.24/ags/audio/recall/ags_mute_recycling.h0000644000175000017500000000404413246707333020027 00000000000000/* 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 . */ #ifndef __AGS_MUTE_RECYCLING_H__ #define __AGS_MUTE_RECYCLING_H__ #include #include #include #include #include #define AGS_TYPE_MUTE_RECYCLING (ags_mute_recycling_get_type()) #define AGS_MUTE_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MUTE_RECYCLING, AgsMuteRecycling)) #define AGS_MUTE_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MUTE_RECYCLING, AgsMuteRecyclingClass)) #define AGS_IS_MUTE_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MUTE_RECYCLING)) #define AGS_IS_MUTE_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MUTE_RECYCLING)) #define AGS_MUTE_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_MUTE_RECYCLING, AgsMuteRecyclingClass)) typedef struct _AgsMuteRecycling AgsMuteRecycling; typedef struct _AgsMuteRecyclingClass AgsMuteRecyclingClass; struct _AgsMuteRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsMuteRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_mute_recycling_get_type(); AgsMuteRecycling* ags_mute_recycling_new(AgsRecycling *source); #endif /*__AGS_MUTE_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_play_recycling.h0000644000175000017500000000402113246707333020015 00000000000000/* 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 . */ #ifndef __AGS_PLAY_RECYCLING_H__ #define __AGS_PLAY_RECYCLING_H__ #include #include #include #define AGS_TYPE_PLAY_RECYCLING (ags_play_recycling_get_type()) #define AGS_PLAY_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAY_RECYCLING, AgsPlayRecycling)) #define AGS_PLAY_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PLAY_RECYCLING, AgsPlayRecyclingClass)) #define AGS_IS_PLAY_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAY_RECYCLING)) #define AGS_IS_PLAY_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAY_RECYCLING)) #define AGS_PLAY_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_PLAY_RECYCLING, AgsPlayRecyclingClass)) typedef struct _AgsPlayRecycling AgsPlayRecycling; typedef struct _AgsPlayRecyclingClass AgsPlayRecyclingClass; struct _AgsPlayRecycling { AgsRecallRecycling recall_recycling; }; struct _AgsPlayRecyclingClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_play_recycling_get_type(); AgsPlayRecycling* ags_play_recycling_new(AgsRecycling *source, GObject *soundcard, guint audio_channel); #endif /*__AGS_PLAY_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_copy_pattern_audio.h0000644000175000017500000000425013246707333020705 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_COPY_PATTERN_AUDIO_H__ #define __AGS_COPY_PATTERN_AUDIO_H__ #include #include #include #include #define AGS_TYPE_COPY_PATTERN_AUDIO (ags_copy_pattern_audio_get_type()) #define AGS_COPY_PATTERN_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COPY_PATTERN_AUDIO, AgsCopyPatternAudio)) #define AGS_COPY_PATTERN_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COPY_PATTERN_AUDIO, AgsCopyPatternAudio)) #define AGS_IS_COPY_PATTERN_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COPY_PATTERN_AUDIO)) #define AGS_IS_COPY_PATTERN_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COPY_PATTERN_AUDIO)) #define AGS_COPY_PATTERN_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COPY_PATTERN_AUDIO, AgsCopyPatternAudioClass)) typedef struct _AgsCopyPatternAudio AgsCopyPatternAudio; typedef struct _AgsCopyPatternAudioClass AgsCopyPatternAudioClass; struct _AgsCopyPatternAudio { AgsRecallAudio recall_audio; AgsPort *bank_index_0; AgsPort *bank_index_1; }; struct _AgsCopyPatternAudioClass { AgsRecallAudioClass recall_audio; }; GType ags_copy_pattern_audio_get_type(); AgsCopyPatternAudio* ags_copy_pattern_audio_new(GObject *soundcard, gdouble tact, guint i, guint j); #endif /*__AGS_COPY_PATTERN_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/recall/ags_delay_audio.c0000644000175000017500000007524313256163135017276 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_delay_audio_class_init(AgsDelayAudioClass *delay_audio); void ags_delay_audio_tactable_interface_init(AgsTactableInterface *tactable); void ags_delay_audio_plugin_interface_init(AgsPluginInterface *plugin); void ags_delay_audio_init(AgsDelayAudio *delay_audio); void ags_delay_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_delay_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_delay_audio_set_ports(AgsPlugin *plugin, GList *port); void ags_delay_audio_dispose(GObject *gobject); void ags_delay_audio_finalize(GObject *gobject); void ags_delay_audio_notify_audio_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data); void ags_delay_audio_notify_soundcard_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data); void ags_delay_audio_notify_samplerate_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data); void ags_delay_audio_notify_buffer_size_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data); gdouble ags_delay_audio_get_bpm(AgsTactable *tactable); gdouble ags_delay_audio_get_tact(AgsTactable *tactable); gdouble ags_delay_audio_get_sequencer_duration(AgsTactable *tactable); gdouble ags_delay_audio_get_notation_duration(AgsTactable *tactable); void ags_delay_audio_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm); void ags_delay_audio_change_tact(AgsTactable *tactable, gdouble new_tact, gdouble old_bpm); void ags_delay_audio_change_sequencer_duration(AgsTactable *tactable, gdouble duration); void ags_delay_audio_change_notation_duration(AgsTactable *tactable, gdouble duration); void ags_delay_audio_refresh_delay(AgsDelayAudio *delay_audio); /** * SECTION:ags_delay_audio * @short_description: delay audio * @title: AgsDelayAudio * @section_id: * @include: ags/audio/recall/ags_delay_audio.h * * The #AgsDelayAudio class provides ports to the effect processor. */ enum{ NOTATION_DURATION_CHANGED, SEQUENCER_DURATION_CHANGED, LAST_SIGNAL, }; enum{ PROP_0, PROP_NOTATION_DELAY, PROP_SEQUENCER_DELAY, PROP_TACT, PROP_BPM, PROP_SEQUENCER_DURATION, PROP_NOTATION_DURATION, }; static gpointer ags_delay_audio_parent_class = NULL; static guint delay_audio_signals[LAST_SIGNAL]; static const gchar *ags_delay_audio_plugin_name = "ags-delay"; static const gchar *ags_delay_audio_specifier[] = { "./bpm[0]", "./tact[0]", "./sequencer_delay[0]", "./notation_delay[0]", "./sequencer_duration[0]", "./notation_duration[0]" }; static const gchar *ags_delay_audio_control_port[] = { "1/6", "2/6", "3/6", "4/6", "5/6", "6/6", }; GType ags_delay_audio_get_type() { static GType ags_type_delay_audio = 0; if(!ags_type_delay_audio){ static const GTypeInfo ags_delay_audio_info = { sizeof (AgsDelayAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_delay_audio_class_init, NULL, /* class_finalize */ NULL, /* class_audio */ sizeof (AgsDelayAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_delay_audio_init, }; static const GInterfaceInfo ags_tactable_interface_info = { (GInterfaceInitFunc) ags_delay_audio_tactable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_delay_audio_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_delay_audio = g_type_register_static(AGS_TYPE_RECALL_AUDIO, "AgsDelayAudio", &ags_delay_audio_info, 0); g_type_add_interface_static(ags_type_delay_audio, AGS_TYPE_TACTABLE, &ags_tactable_interface_info); g_type_add_interface_static(ags_type_delay_audio, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_delay_audio); } void ags_delay_audio_class_init(AgsDelayAudioClass *delay_audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_delay_audio_parent_class = g_type_class_peek_parent(delay_audio); /* GObjectClass */ gobject = (GObjectClass *) delay_audio; gobject->set_property = ags_delay_audio_set_property; gobject->get_property = ags_delay_audio_get_property; gobject->dispose = ags_delay_audio_dispose; gobject->finalize = ags_delay_audio_finalize; /* properties */ /** * AgsDelayAudio:bpm: * * The beats per minute. * * Since: 1.0.0 */ param_spec = g_param_spec_object("bpm", i18n_pspec("bpm of recall"), i18n_pspec("The recall's bpm"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsDelayAudio:tact: * * The tact segmentation. * * Since: 1.0.0 */ param_spec = g_param_spec_object("tact", i18n_pspec("tact of recall"), i18n_pspec("The recall's tact"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TACT, param_spec); /** * AgsDelayAudio:sequencer-delay: * * The sequencer's delay. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer-delay", i18n_pspec("sequencer-delay of recall"), i18n_pspec("The delay of the sequencer"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER_DELAY, param_spec); /** * AgsDelayAudio:notation-delay: * * The notation's delay. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation-delay", i18n_pspec("notation-delay of recall"), i18n_pspec("The delay of the notation"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION_DELAY, param_spec); /** * AgsDelayAudio:sequencer-duration: * * The sequencer's duration. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer-duration", i18n_pspec("sequencer-duration of recall"), i18n_pspec("The duration of the sequencer"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER_DURATION, param_spec); /** * AgsDelayAudio:notation-duration: * * The notation's duration. * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation-duration", i18n_pspec("notation-duration of recall"), i18n_pspec("The duration of the notation"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION_DURATION, param_spec); /* signals */ /** * AgsDelayAudio::notation-duration-changed: * @delay_audio: the object to resolve * * The ::notation-duration-changed signal notifies about changed duration * of notation. */ delay_audio_signals[NOTATION_DURATION_CHANGED] = g_signal_new("notation-duration-changed", G_TYPE_FROM_CLASS(delay_audio), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsDelayAudioClass, notation_duration_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsDelayAudio::sequencer-duration-changed: * @delay_audio: the object to resolve * * The ::sequencer-duration-changed signal notifies about changed duration * of sequencer. */ delay_audio_signals[SEQUENCER_DURATION_CHANGED] = g_signal_new("sequencer-duration-changed", G_TYPE_FROM_CLASS(delay_audio), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsDelayAudioClass, sequencer_duration_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } void ags_delay_audio_tactable_interface_init(AgsTactableInterface *tactable) { tactable->get_sequencer_duration = ags_delay_audio_get_sequencer_duration; tactable->get_notation_duration = ags_delay_audio_get_notation_duration; tactable->get_bpm = ags_delay_audio_get_bpm; tactable->get_tact = ags_delay_audio_get_tact; tactable->change_sequencer_duration = ags_delay_audio_change_sequencer_duration; tactable->change_notation_duration = ags_delay_audio_change_notation_duration; tactable->change_bpm = ags_delay_audio_change_bpm; tactable->change_tact = ags_delay_audio_change_tact; } void ags_delay_audio_plugin_interface_init(AgsPluginInterface *plugin) { plugin->set_ports = ags_delay_audio_set_ports; } void ags_delay_audio_init(AgsDelayAudio *delay_audio) { GList *port; gdouble bpm; gdouble delay; AGS_RECALL(delay_audio)->name = "ags-delay"; AGS_RECALL(delay_audio)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(delay_audio)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(delay_audio)->xml_type = "ags-delay-audio"; port = NULL; bpm = AGS_SOUNDCARD_DEFAULT_BPM; delay = AGS_SOUNDCARD_DEFAULT_DELAY; /* bpm */ delay_audio->bpm = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_delay_audio_plugin_name, "specifier", ags_delay_audio_specifier[0], "control-port", ags_delay_audio_control_port[0], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(delay_audio->bpm); delay_audio->bpm->port_value.ags_port_double = bpm; /* add port */ port = g_list_prepend(port, delay_audio->bpm); g_object_ref(delay_audio->bpm); /* tact */ delay_audio->tact = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_delay_audio_plugin_name, "specifier", ags_delay_audio_specifier[1], "control-port", ags_delay_audio_control_port[1], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(delay_audio->tact); delay_audio->tact->port_value.ags_port_double = AGS_SOUNDCARD_DEFAULT_TACT; /* add port */ port = g_list_prepend(port, delay_audio->tact); g_object_ref(delay_audio->tact); /* sequencer delay */ delay_audio->sequencer_delay = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_delay_audio_plugin_name, "specifier", ags_delay_audio_specifier[2], "control-port", ags_delay_audio_control_port[2], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(delay_audio->sequencer_delay); delay_audio->sequencer_delay->port_value.ags_port_double = delay; /* add port */ port = g_list_prepend(port, delay_audio->sequencer_delay); g_object_ref(delay_audio->sequencer_delay); /* notation delay */ delay_audio->notation_delay = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_delay_audio_plugin_name, "specifier", ags_delay_audio_specifier[3], "control-port", ags_delay_audio_control_port[3], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(delay_audio->notation_delay); delay_audio->notation_delay->port_value.ags_port_double = delay; /* add port */ port = g_list_prepend(port, delay_audio->notation_delay); g_object_ref(delay_audio->notation_delay); /* sequencer duration */ delay_audio->sequencer_duration = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_delay_audio_plugin_name, "specifier", ags_delay_audio_specifier[4], "control-port", ags_delay_audio_control_port[4], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(delay_audio->sequencer_duration); delay_audio->sequencer_duration->port_value.ags_port_double = ceil(16.0 * delay); /* add port */ port = g_list_prepend(port, delay_audio->sequencer_duration); g_object_ref(delay_audio->sequencer_duration); /* notation duration */ delay_audio->notation_duration = g_object_new(AGS_TYPE_PORT, "plugin-name", ags_delay_audio_plugin_name, "specifier", ags_delay_audio_specifier[5], "control-port", ags_delay_audio_control_port[5], "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_DOUBLE, "port-value-size", sizeof(gdouble), "port-value-length", 1, NULL); g_object_ref(delay_audio->notation_duration); delay_audio->notation_duration->port_value.ags_port_double = ceil(AGS_NOTATION_DEFAULT_DURATION * delay); /* add port */ port = g_list_prepend(port, delay_audio->notation_duration); g_object_ref(delay_audio->notation_duration); /* set port */ AGS_RECALL(delay_audio)->port = port; /* notify some properties to do final configuration */ g_signal_connect_after(delay_audio, "notify::audio", G_CALLBACK(ags_delay_audio_notify_audio_callback), NULL); g_signal_connect_after(delay_audio, "notify::soundcard", G_CALLBACK(ags_delay_audio_notify_soundcard_callback), NULL); } void ags_delay_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsDelayAudio *delay_audio; delay_audio = AGS_DELAY_AUDIO(gobject); switch(prop_id){ case PROP_BPM: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == delay_audio->bpm){ return; } if(delay_audio->bpm != NULL){ g_object_unref(G_OBJECT(delay_audio->bpm)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } delay_audio->bpm = port; } break; case PROP_TACT: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == delay_audio->tact){ return; } if(delay_audio->tact != NULL){ g_object_unref(G_OBJECT(delay_audio->tact)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } delay_audio->tact = port; } break; case PROP_NOTATION_DELAY: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == delay_audio->notation_delay){ return; } if(delay_audio->notation_delay != NULL){ g_object_unref(G_OBJECT(delay_audio->notation_delay)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } delay_audio->notation_delay = port; } break; case PROP_SEQUENCER_DELAY: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == delay_audio->sequencer_delay){ return; } if(delay_audio->sequencer_delay != NULL){ g_object_unref(G_OBJECT(delay_audio->sequencer_delay)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } delay_audio->sequencer_delay = port; } break; case PROP_NOTATION_DURATION: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == delay_audio->notation_duration){ return; } if(delay_audio->notation_duration != NULL){ g_object_unref(G_OBJECT(delay_audio->notation_duration)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } delay_audio->notation_duration = port; } break; case PROP_SEQUENCER_DURATION: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == delay_audio->sequencer_duration){ return; } if(delay_audio->sequencer_duration != NULL){ g_object_unref(G_OBJECT(delay_audio->sequencer_duration)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } delay_audio->sequencer_duration = port; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_delay_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsDelayAudio *delay_audio; delay_audio = AGS_DELAY_AUDIO(gobject); switch(prop_id){ case PROP_BPM: g_value_set_object(value, delay_audio->bpm); break; case PROP_TACT: g_value_set_object(value, delay_audio->tact); break; case PROP_NOTATION_DELAY: g_value_set_object(value, delay_audio->notation_delay); break; case PROP_SEQUENCER_DELAY: g_value_set_object(value, delay_audio->sequencer_delay); break; case PROP_NOTATION_DURATION: g_value_set_object(value, delay_audio->notation_duration); break; case PROP_SEQUENCER_DURATION: g_value_set_object(value, delay_audio->sequencer_duration); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_delay_audio_set_ports(AgsPlugin *plugin, GList *port) { while(port != NULL){ if(!strncmp(AGS_PORT(port->data)->specifier, "./bpm[0]", 8)){ g_object_set(G_OBJECT(plugin), "bpm", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./tact[0]", 9)){ g_object_set(G_OBJECT(plugin), "tact", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./notation-delay[0]", 18)){ g_object_set(G_OBJECT(plugin), "notation-delay", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./sequencer-delay[0]", 19)){ g_object_set(G_OBJECT(plugin), "sequencer-delay", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./notation-duration[0]", 21)){ g_object_set(G_OBJECT(plugin), "notation-duration", AGS_PORT(port->data), NULL); }else if(!strncmp(AGS_PORT(port->data)->specifier, "./sequencer-duration[0]", 22)){ g_object_set(G_OBJECT(plugin), "sequencer-duration", AGS_PORT(port->data), NULL); } port = port->next; } } void ags_delay_audio_dispose(GObject *gobject) { AgsDelayAudio *delay_audio; delay_audio = AGS_DELAY_AUDIO(gobject); /* bpm and tact */ if(delay_audio->bpm != NULL){ g_object_unref(G_OBJECT(delay_audio->bpm)); delay_audio->bpm = NULL; } if(delay_audio->tact != NULL){ g_object_unref(G_OBJECT(delay_audio->tact)); delay_audio->tact = NULL; } /* delay */ if(delay_audio->notation_delay != NULL){ g_object_unref(G_OBJECT(delay_audio->notation_delay)); delay_audio->notation_delay = NULL; } if(delay_audio->sequencer_delay != NULL){ g_object_unref(G_OBJECT(delay_audio->sequencer_delay)); delay_audio->sequencer_delay = NULL; } /* duration */ if(delay_audio->notation_duration != NULL){ g_object_unref(G_OBJECT(delay_audio->notation_duration)); delay_audio->notation_duration = NULL; } if(delay_audio->sequencer_duration != NULL){ g_object_unref(G_OBJECT(delay_audio->sequencer_duration)); delay_audio->sequencer_duration = NULL; } /* call parent */ G_OBJECT_CLASS(ags_delay_audio_parent_class)->dispose(gobject); } void ags_delay_audio_finalize(GObject *gobject) { AgsDelayAudio *delay_audio; delay_audio = AGS_DELAY_AUDIO(gobject); if(delay_audio->bpm != NULL){ g_object_unref(G_OBJECT(delay_audio->bpm)); } if(delay_audio->tact != NULL){ g_object_unref(G_OBJECT(delay_audio->tact)); } if(delay_audio->notation_delay != NULL){ g_object_unref(G_OBJECT(delay_audio->notation_delay)); } if(delay_audio->sequencer_delay != NULL){ g_object_unref(G_OBJECT(delay_audio->sequencer_delay)); } if(delay_audio->notation_duration != NULL){ g_object_unref(G_OBJECT(delay_audio->notation_duration)); } if(delay_audio->sequencer_duration != NULL){ g_object_unref(G_OBJECT(delay_audio->sequencer_duration)); } /* call parent */ G_OBJECT_CLASS(ags_delay_audio_parent_class)->finalize(gobject); } void ags_delay_audio_notify_audio_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data) { AgsDelayAudio *delay_audio; AgsAudio *audio; delay_audio = AGS_DELAY_AUDIO(gobject); audio = AGS_RECALL_AUDIO(delay_audio)->audio; if(audio == NULL){ return; } g_signal_connect_after(audio, "notify::samplerate", G_CALLBACK(ags_delay_audio_notify_samplerate_callback), delay_audio); g_signal_connect_after(audio, "notify::buffer-size", G_CALLBACK(ags_delay_audio_notify_buffer_size_callback), delay_audio); } void ags_delay_audio_notify_soundcard_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data) { AgsDelayAudio *delay_audio; GObject *soundcard; gdouble bpm; gdouble delay; gchar *str; delay_audio = AGS_DELAY_AUDIO(gobject); soundcard = AGS_RECALL(delay_audio)->soundcard; if(soundcard == NULL){ return; } /* */ bpm = ags_soundcard_get_bpm(AGS_SOUNDCARD(soundcard)); delay = ags_soundcard_get_delay(AGS_SOUNDCARD(soundcard)); /* bpm */ delay_audio->bpm->port_value.ags_port_double = bpm; /* tact */ delay_audio->tact->port_value.ags_port_double = AGS_SOUNDCARD_DEFAULT_TACT; /* sequencer delay */ delay_audio->sequencer_delay->port_value.ags_port_double = delay; /* notation delay */ delay_audio->notation_delay->port_value.ags_port_double = delay; /* sequencer duration */ delay_audio->sequencer_duration->port_value.ags_port_double = ceil(16.0 * delay); /* notation duration */ delay_audio->notation_duration->port_value.ags_port_double = ceil(AGS_NOTATION_DEFAULT_DURATION * delay); } void ags_delay_audio_notify_samplerate_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data) { AgsDelayAudio *delay_audio; delay_audio = AGS_DELAY_AUDIO(user_data); ags_delay_audio_refresh_delay(delay_audio); } void ags_delay_audio_notify_buffer_size_callback(GObject *gobject, GParamSpec *pspec, gpointer user_data) { AgsDelayAudio *delay_audio; delay_audio = AGS_DELAY_AUDIO(user_data); ags_delay_audio_refresh_delay(delay_audio); } gdouble ags_delay_audio_get_bpm(AgsTactable *tactable) { AgsDelayAudio *delay_audio; gdouble bpm; GValue value = {0,}; delay_audio = AGS_DELAY_AUDIO(tactable); /* retrieve bpm */ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(delay_audio->bpm, &value); bpm = g_value_get_double(&value); g_value_unset(&value); return(bpm); } gdouble ags_delay_audio_get_tact(AgsTactable *tactable) { AgsDelayAudio *delay_audio; gdouble tact; GValue value = {0,}; delay_audio = AGS_DELAY_AUDIO(tactable); /* retrieve tact */ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(delay_audio->tact, &value); tact = g_value_get_double(&value); g_value_unset(&value); return(tact); } gdouble ags_delay_audio_get_sequencer_duration(AgsTactable *tactable) { AgsDelayAudio *delay_audio; gdouble sequencer_duration; GValue value = {0,}; delay_audio = AGS_DELAY_AUDIO(tactable); /* retrieve sequencer_duration */ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(delay_audio->sequencer_duration, &value); sequencer_duration = g_value_get_double(&value); return(sequencer_duration); } gdouble ags_delay_audio_get_notation_duration(AgsTactable *tactable) { AgsDelayAudio *delay_audio; gdouble notation_duration; GValue value = {0,}; delay_audio = AGS_DELAY_AUDIO(tactable); /* retrieve notation_duration */ g_value_init(&value, G_TYPE_DOUBLE); ags_port_safe_read(delay_audio->notation_duration, &value); notation_duration = g_value_get_double(&value); return(notation_duration); } void ags_delay_audio_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm) { AgsDelayAudio *delay_audio; GObject *soundcard; gdouble delay; GValue value = {0,}; delay_audio = AGS_DELAY_AUDIO(tactable); soundcard = AGS_RECALL(delay_audio)->soundcard; delay = ags_soundcard_get_delay(AGS_SOUNDCARD(soundcard)); g_value_init(&value, G_TYPE_DOUBLE); /* -- start adjust -- */ /* notation-delay */ g_value_set_double(&value, delay); ags_port_safe_write(delay_audio->notation_delay, &value); /* sequencer-delay */ g_value_reset(&value); g_value_set_double(&value, delay); ags_port_safe_write(delay_audio->sequencer_delay, &value); /**/ g_value_reset(&value); g_value_set_double(&value, new_bpm); ags_port_safe_write(delay_audio->bpm, &value); /* notation-duration */ g_value_reset(&value); g_value_set_double(&value, ceil(AGS_NOTATION_DEFAULT_DURATION * delay)); ags_port_safe_write(delay_audio->notation_duration, &value); /* sequencer-duration */ g_value_reset(&value); g_value_set_double(&value, ceil(16.0 * delay)); ags_port_safe_write(delay_audio->sequencer_duration, &value); /* -- finish adjust -- */ /* emit changed */ ags_delay_audio_sequencer_duration_changed(delay_audio); } void ags_delay_audio_change_tact(AgsTactable *tactable, gdouble new_tact, gdouble old_tact) { AgsDelayAudio *delay_audio; GObject *soundcard; gdouble delay; GValue value = {0,}; delay_audio = AGS_DELAY_AUDIO(tactable); soundcard = AGS_RECALL(delay_audio)->soundcard; delay = ags_soundcard_get_delay(AGS_SOUNDCARD(soundcard)); g_value_init(&value, G_TYPE_DOUBLE); /* -- start adjust -- */ /* notation-delay */ g_value_reset(&value); g_value_set_double(&value, delay); ags_port_safe_write(delay_audio->notation_delay, &value); // g_message("notation delay = %f", notation_delay * (old_tact / new_tact)); /* sequencer-delay */ g_value_reset(&value); g_value_set_double(&value, delay); ags_port_safe_write(delay_audio->sequencer_delay, &value); // g_message("sequencer delay = %f", sequencer_delay * (old_tact / new_tact)); /**/ g_value_reset(&value); g_value_set_double(&value, new_tact); ags_port_safe_write(delay_audio->tact, &value); /* notation-duration */ g_value_reset(&value); g_value_set_double(&value, ceil(AGS_NOTATION_DEFAULT_DURATION * delay)); ags_port_safe_write(delay_audio->notation_duration, &value); /* sequencer-duration */ g_value_reset(&value); g_value_set_double(&value, ceil(16.0 * delay)); ags_port_safe_write(delay_audio->sequencer_duration, &value); /* -- finish adjust -- */ /* emit changed */ ags_delay_audio_sequencer_duration_changed(delay_audio); } void ags_delay_audio_refresh_delay(AgsDelayAudio *delay_audio) { GObject *soundcard; gdouble delay; GValue value = {0,}; soundcard = AGS_RECALL(delay_audio)->soundcard; if(soundcard == NULL){ return; } delay = ags_soundcard_get_delay(AGS_SOUNDCARD(soundcard)); g_value_init(&value, G_TYPE_DOUBLE); /* -- start adjust -- */ /* notation-delay */ g_value_reset(&value); g_value_set_double(&value, delay); ags_port_safe_write(delay_audio->notation_delay, &value); // g_message("notation delay = %f", notation_delay * (old_tact / new_tact)); /* sequencer-delay */ g_value_reset(&value); g_value_set_double(&value, delay); ags_port_safe_write(delay_audio->sequencer_delay, &value); // g_message("sequencer delay = %f", sequencer_delay * (old_tact / new_tact)); /* notation-duration */ g_value_reset(&value); g_value_set_double(&value, ceil(AGS_NOTATION_DEFAULT_DURATION * delay)); ags_port_safe_write(delay_audio->notation_duration, &value); /* sequencer-duration */ g_value_reset(&value); g_value_set_double(&value, ceil(16.0 * delay)); ags_port_safe_write(delay_audio->sequencer_duration, &value); /* -- finish adjust -- */ /* emit changed */ ags_delay_audio_sequencer_duration_changed(delay_audio); } void ags_delay_audio_change_sequencer_duration(AgsTactable *tactable, gdouble duration) { AgsDelayAudio *delay_audio; GObject *soundcard; gdouble delay; GValue value = {0,}; delay_audio = AGS_DELAY_AUDIO(tactable); soundcard = AGS_RECALL(delay_audio)->soundcard; delay = ags_soundcard_get_delay(AGS_SOUNDCARD(soundcard)); g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, duration * delay * AGS_SOUNDCARD_DEFAULT_SCALE); ags_port_safe_write(delay_audio->sequencer_duration, &value); } void ags_delay_audio_change_notation_duration(AgsTactable *tactable, gdouble duration) { AgsDelayAudio *delay_audio; GObject *soundcard; gdouble delay; gchar *str; GValue value = {0,}; delay_audio = AGS_DELAY_AUDIO(tactable); soundcard = AGS_RECALL(delay_audio)->soundcard; delay = ags_soundcard_get_delay(AGS_SOUNDCARD(soundcard)); g_value_init(&value, G_TYPE_DOUBLE); g_value_set_double(&value, duration * delay * AGS_SOUNDCARD_DEFAULT_SCALE); ags_port_safe_write(delay_audio->notation_duration, &value); } /** * ags_delay_audio_new: * @delay_audio: the #AgsDelayAudio * * Notation duration changed of #AgsDelayAudio * * Since: 1.0.0 */ void ags_delay_audio_notation_duration_changed(AgsDelayAudio *delay_audio) { g_return_if_fail(AGS_IS_DELAY_AUDIO(delay_audio)); g_object_ref((GObject *) delay_audio); g_signal_emit(G_OBJECT(delay_audio), delay_audio_signals[NOTATION_DURATION_CHANGED], 0); g_object_unref((GObject *) delay_audio); } /** * ags_delay_audio_new: * @delay_audio: the #AgsDelayAudio * * Sequencer duration changed of #AgsDelayAudio * * Since: 1.0.0 */ void ags_delay_audio_sequencer_duration_changed(AgsDelayAudio *delay_audio) { g_return_if_fail(AGS_IS_DELAY_AUDIO(delay_audio)); g_object_ref((GObject *) delay_audio); g_signal_emit(G_OBJECT(delay_audio), delay_audio_signals[SEQUENCER_DURATION_CHANGED], 0); g_object_unref((GObject *) delay_audio); } /** * ags_delay_audio_new: * * Creates an #AgsDelayAudio * * Returns: a new #AgsDelayAudio * * Since: 1.0.0 */ AgsDelayAudio* ags_delay_audio_new() { AgsDelayAudio *delay_audio; delay_audio = (AgsDelayAudio *) g_object_new(AGS_TYPE_DELAY_AUDIO, NULL); return(delay_audio); } gsequencer-1.4.24/ags/audio/jack/0000755000175000017500000000000013256233674013542 500000000000000gsequencer-1.4.24/ags/audio/jack/ags_jack_client.c0000644000175000017500000010310713247044247016724 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef AGS_WITH_JACK #include #include #include #endif #include void ags_jack_client_class_init(AgsJackClientClass *jack_client); void ags_jack_client_connectable_interface_init(AgsConnectableInterface *connectable); void ags_jack_client_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager); void ags_jack_client_init(AgsJackClient *jack_client); void ags_jack_client_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_jack_client_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_jack_client_connect(AgsConnectable *connectable); void ags_jack_client_disconnect(AgsConnectable *connectable); void ags_jack_client_dispose(GObject *gobject); void ags_jack_client_finalize(GObject *gobject); #ifdef AGS_WITH_JACK void ags_jack_client_shutdown(void *arg); int ags_jack_client_process_callback(jack_nframes_t nframes, void *ptr); int ags_jack_client_xrun_callback(void *ptr); #endif /** * SECTION:ags_jack_client * @short_description: JACK connection * @title: AgsJackClient * @section_id: * @include: ags/audio/jack/ags_jack_client.h * * The #AgsJackClient communicates with a JACK instance. */ enum{ PROP_0, PROP_JACK_SERVER, PROP_DEVICE, PROP_PORT, }; static gpointer ags_jack_client_parent_class = NULL; GType ags_jack_client_get_type() { static GType ags_type_jack_client = 0; if(!ags_type_jack_client){ static const GTypeInfo ags_jack_client_info = { sizeof (AgsJackClientClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_jack_client_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsJackClient), 0, /* n_preallocs */ (GInstanceInitFunc) ags_jack_client_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_jack_client_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_jack_client = g_type_register_static(G_TYPE_OBJECT, "AgsJackClient", &ags_jack_client_info, 0); g_type_add_interface_static(ags_type_jack_client, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_jack_client); } void ags_jack_client_class_init(AgsJackClientClass *jack_client) { GObjectClass *gobject; GParamSpec *param_spec; ags_jack_client_parent_class = g_type_class_peek_parent(jack_client); /* GObjectClass */ gobject = (GObjectClass *) jack_client; gobject->set_property = ags_jack_client_set_property; gobject->get_property = ags_jack_client_get_property; gobject->dispose = ags_jack_client_dispose; gobject->finalize = ags_jack_client_finalize; /* properties */ /** * AgsJackClient:jack-server: * * The assigned #AgsJackServer. * * Since: 1.0.0 */ param_spec = g_param_spec_object("jack-server", i18n_pspec("assigned JACK server"), i18n_pspec("The assigned JACK server"), AGS_TYPE_JACK_SERVER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_JACK_SERVER, param_spec); /** * AgsJackClient:device: * * The assigned devices. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("device", i18n_pspec("assigned device"), i18n_pspec("The assigned device"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsJackClient:port: * * The assigned ports. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("port", i18n_pspec("assigned port"), i18n_pspec("The assigned port"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT, param_spec); } void ags_jack_client_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_jack_client_connect; connectable->disconnect = ags_jack_client_disconnect; } void ags_jack_client_init(AgsJackClient *jack_client) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert client mutex */ jack_client->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); jack_client->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) jack_client, mutex); pthread_mutex_unlock(application_mutex); /* flags */ jack_client->flags = 0; /* server */ jack_client->jack_server = NULL; jack_client->uuid = NULL; jack_client->name = NULL; /* client */ jack_client->client = NULL; /* device */ jack_client->device = NULL; jack_client->port = NULL; g_atomic_int_set(&(jack_client->queued), 0); } void ags_jack_client_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsJackClient *jack_client; jack_client = AGS_JACK_CLIENT(gobject); switch(prop_id){ case PROP_JACK_SERVER: { AgsJackServer *jack_server; jack_server = (AgsJackServer *) g_value_get_object(value); if(jack_client->jack_server == (GObject *) jack_server){ return; } if(jack_client->jack_server != NULL){ g_object_unref(jack_client->jack_server); } if(jack_server != NULL){ g_object_ref(jack_server); } jack_client->jack_server = (GObject *) jack_server; } break; case PROP_DEVICE: { GObject *device; device = (GObject *) g_value_get_object(value); if(g_list_find(jack_client->device, device) != NULL){ return; } if(device != NULL){ g_object_ref(device); jack_client->device = g_list_prepend(jack_client->device, device); } } break; case PROP_PORT: { GObject *port; port = (GObject *) g_value_get_object(value); if(g_list_find(jack_client->port, port) != NULL){ return; } if(port != NULL){ g_object_ref(port); jack_client->port = g_list_prepend(jack_client->port, port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_client_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsJackClient *jack_client; jack_client = AGS_JACK_CLIENT(gobject); switch(prop_id){ case PROP_JACK_SERVER: { g_value_set_object(value, jack_client->jack_server); } break; case PROP_DEVICE: { g_value_set_pointer(value, g_list_copy(jack_client->device)); } break; case PROP_PORT: { g_value_set_pointer(value, g_list_copy(jack_client->port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_client_connect(AgsConnectable *connectable) { AgsJackClient *jack_client; GList *list; jack_client = AGS_JACK_CLIENT(connectable); if((AGS_JACK_CLIENT_CONNECTED & (jack_client->flags)) != 0){ return; } jack_client->flags |= AGS_JACK_CLIENT_CONNECTED; /* port */ list = jack_client->port; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_jack_client_disconnect(AgsConnectable *connectable) { AgsJackClient *jack_client; GList *list; jack_client = AGS_JACK_CLIENT(connectable); if((AGS_JACK_CLIENT_CONNECTED & (jack_client->flags)) == 0){ return; } jack_client->flags &= (~AGS_JACK_CLIENT_CONNECTED); /* port */ list = jack_client->port; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_jack_client_dispose(GObject *gobject) { AgsJackClient *jack_client; GList *list; jack_client = AGS_JACK_CLIENT(gobject); /* jack server */ if(jack_client->jack_server != NULL){ g_object_unref(jack_client->jack_server); jack_client->jack_server = NULL; } /* device */ if(jack_client->device != NULL){ list = jack_client->device; while(list != NULL){ g_object_set(G_OBJECT(list->data), "jack-client", NULL, NULL); list = list->next; } g_list_free_full(jack_client->device, g_object_unref); jack_client->device = NULL; } /* port */ if(jack_client->port != NULL){ list = jack_client->port; while(list != NULL){ g_object_run_dispose(G_OBJECT(list->data)); list = list->next; } g_list_free_full(jack_client->port, g_object_unref); jack_client->port = NULL; } /* call parent */ G_OBJECT_CLASS(ags_jack_client_parent_class)->dispose(gobject); } void ags_jack_client_finalize(GObject *gobject) { AgsJackClient *jack_client; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; jack_client = AGS_JACK_CLIENT(gobject); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* remove jack client mutex */ pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); /* jack server */ if(jack_client->jack_server != NULL){ g_object_unref(jack_client->jack_server); } /* device */ if(jack_client->device != NULL){ g_list_free_full(jack_client->device, g_object_unref); } /* port */ if(jack_client->port != NULL){ g_list_free_full(jack_client->port, g_object_unref); } pthread_mutex_destroy(jack_client->mutex); free(jack_client->mutex); pthread_mutexattr_destroy(jack_client->mutexattr); free(jack_client->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_jack_client_parent_class)->finalize(gobject); } /** * ags_jack_client_find_uuid: * @jack_client: a #GList * @client_uuid: the client uuid to find * * Finds next match of @client_uuid in @jack_client. * * Returns: a #GList or %NULL * * Since: 1.0.0 */ GList* ags_jack_client_find_uuid(GList *jack_client, gchar *client_uuid) { #ifdef AGS_WITH_JACK while(jack_client != NULL){ if(AGS_JACK_CLIENT(jack_client->data)->client != NULL && !g_ascii_strcasecmp(jack_get_uuid_for_client_name(AGS_JACK_CLIENT(jack_client->data)->client, jack_get_client_name(AGS_JACK_CLIENT(jack_client->data)->client)), client_uuid)){ return(jack_client); } } #endif return(NULL); } /** * ags_jack_client_find: * @jack_client: a #GList * @client_name: the client name to find * * Finds next match of @client_name in @jack_client. * * Returns: a #GList or %NULL * * Since: 1.0.0 */ GList* ags_jack_client_find(GList *jack_client, gchar *client_name) { #ifdef AGS_WITH_JACK while(jack_client != NULL){ if(AGS_JACK_CLIENT(jack_client->data)->client != NULL && !g_ascii_strcasecmp(jack_get_client_name(AGS_JACK_CLIENT(jack_client->data)->client), client_name)){ return(jack_client); } } #endif return(NULL); } /** * ags_jack_client_open: * @jack_client: the #AgsJackClient * @client_name: the client's name * * Open the JACK client's connection and read uuid. * * Since: 1.0.0 */ void ags_jack_client_open(AgsJackClient *jack_client, gchar *client_name) { if(jack_client == NULL || client_name == NULL){ return; } if(jack_client->client != NULL){ g_message("Advanced Gtk+ Sequencer JACK client already open"); return; } g_message("Advanced Gtk+ Sequencer open JACK client"); jack_client->name = g_strdup(client_name); #ifdef AGS_WITH_JACK jack_client->client = jack_client_open(jack_client->name, 0, NULL, NULL); if(jack_client->client != NULL){ jack_client->uuid = jack_get_uuid_for_client_name(jack_client->client, jack_client->name); jack_on_shutdown(jack_client->client, ags_jack_client_shutdown, jack_client); jack_set_process_callback(jack_client->client, ags_jack_client_process_callback, jack_client); jack_set_xrun_callback(jack_client->client, ags_jack_client_xrun_callback, jack_client); } #endif } /** * ags_jack_client_activate: * @jack_client: the #AgsJackClient * * Activate client. * * Since: 1.0.0 */ void ags_jack_client_activate(AgsJackClient *jack_client) { AgsMutexManager *mutex_manager; GList *port; int ret; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_client); pthread_mutex_unlock(application_mutex); /* */ //TODO:JK: make thread-safe pthread_mutex_lock(mutex); if((AGS_JACK_CLIENT_ACTIVATED & (jack_client->flags)) != 0 || jack_client->client == NULL){ pthread_mutex_unlock(mutex); return; } #ifdef AGS_WITH_JACK ret = jack_activate(jack_client->client); #else ret = -1; #endif if(ret == 0){ jack_client->flags |= AGS_JACK_CLIENT_ACTIVATED; }else{ pthread_mutex_unlock(mutex); return; } port = jack_client->port; while(port != NULL){ ags_jack_port_register(port->data, AGS_JACK_PORT(port->data)->name, (((AGS_JACK_PORT_IS_AUDIO & (AGS_JACK_PORT(port->data)->flags)) != 0) ? TRUE: FALSE), (((AGS_JACK_PORT_IS_MIDI & (AGS_JACK_PORT(port->data)->flags)) != 0) ? TRUE: FALSE), (((AGS_JACK_PORT_IS_OUTPUT & (AGS_JACK_PORT(port->data)->flags)) != 0) ? TRUE: FALSE)); port = port->next; } pthread_mutex_unlock(mutex); } /** * ags_jack_client_deactivate: * @jack_client: the #AgsJackClient * * Deactivate client. * * Since: 1.0.0 */ void ags_jack_client_deactivate(AgsJackClient *jack_client) { if(jack_client->client == NULL){ return; } #ifdef AGS_WITH_JACK jack_deactivate(jack_client->client); jack_client->flags &= (~AGS_JACK_CLIENT_ACTIVATED); #endif } /** * ags_jack_client_add_device: * @jack_client: the #AgsJackClient * @jack_device: an #AgsJackDevout, #AgsJackDevin or #AgsJackMidiin * * Add @jack_device to @jack_client. * * Since: 1.0.0 */ void ags_jack_client_add_device(AgsJackClient *jack_client, GObject *jack_device) { if(!AGS_IS_JACK_CLIENT(jack_client) || (!AGS_IS_JACK_DEVOUT(jack_device) && !AGS_IS_JACK_MIDIIN(jack_device) && !AGS_IS_JACK_DEVIN(jack_device))){ return; } g_object_ref(jack_device); jack_client->device = g_list_prepend(jack_client->device, jack_device); } /** * ags_jack_client_remove_device: * @jack_client: the #AgsJackClient * @jack_device: an #AgsJackDevout, #AgsJackDevin or #AgsJackMidiin * * Remove @jack_device from @jack_client. * * Since: 1.0.0 */ void ags_jack_client_remove_device(AgsJackClient *jack_client, GObject *jack_device) { if(!AGS_IS_JACK_CLIENT(jack_client)){ return; } jack_client->device = g_list_remove(jack_client->device, jack_device); g_object_unref(jack_device); } /** * ags_jack_client_add_port: * @jack_client: the #AgsJackClient * @jack_port: an #AgsJackPort * * Add @jack_port to @jack_client. * * Since: 1.0.0 */ void ags_jack_client_add_port(AgsJackClient *jack_client, GObject *jack_port) { if(!AGS_IS_JACK_CLIENT(jack_client) || !AGS_IS_JACK_PORT(jack_port)){ return; } g_object_ref(jack_port); jack_client->port = g_list_prepend(jack_client->port, jack_port); } /** * ags_jack_client_remove_port: * @jack_client: the #AgsJackClient * @jack_port: an #AgsJackPort * * Remove @jack_port from @jack_client. * * Since: 1.0.0 */ void ags_jack_client_remove_port(AgsJackClient *jack_client, GObject *jack_port) { if(!AGS_IS_JACK_CLIENT(jack_client)){ return; } jack_client->port = g_list_remove(jack_client->port, jack_port); g_object_unref(jack_port); } #ifdef AGS_WITH_JACK void ags_jack_client_shutdown(void *ptr) { AgsJackClient *jack_client; AgsMutexManager *mutex_manager; GList *port; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) ptr); pthread_mutex_unlock(application_mutex); /* */ //TODO:JK: make thread-safe pthread_mutex_lock(mutex); jack_client = ptr; jack_client->flags &= (~AGS_JACK_CLIENT_ACTIVATED); port = jack_client->port; while(port != NULL){ AGS_JACK_PORT(port->data)->flags &= (~AGS_JACK_PORT_REGISTERED); port = port->next; } pthread_mutex_unlock(mutex); } int ags_jack_client_process_callback(jack_nframes_t nframes, void *ptr) { AgsJackClient *jack_client; AgsJackPort *jack_port; AgsJackDevout *jack_devout; AgsJackDevout *jack_devin; AgsJackMidiin *jack_midiin; AgsAudioLoop *audio_loop; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; jack_client_t *client; jack_default_audio_sample_t *out, *in; jack_midi_event_t in_event; GList *device, *device_start, *port; void *port_buf; jack_nframes_t event_count; guint time_spent; guint copy_mode; guint word_size; guint event_size; guint i, j; guint nth_buffer; gboolean no_event; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutex_t *device_mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; if(ptr == NULL){ return(0); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) ptr); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(mutex); jack_client = AGS_JACK_CLIENT(ptr); if(jack_client->jack_server != NULL){ application_context = (AgsApplicationContext *) AGS_JACK_SERVER(jack_client->jack_server)->application_context; }else{ application_context = NULL; } device_start = jack_client->device; pthread_mutex_unlock(mutex); if(g_atomic_int_get(&(jack_client->queued)) > 0){ g_warning("drop JACK callback"); return(0); }else{ g_atomic_int_inc(&(jack_client->queued)); } /* * process audio */ /* */ pthread_mutex_lock(application_mutex); if(application_context != NULL){ audio_loop = (AgsAudioLoop *) application_context->main_loop; task_thread = (AgsTaskThread *) application_context->task_thread; }else{ audio_loop = NULL; task_thread = NULL; } pthread_mutex_unlock(application_mutex); /* interrupt GUI */ if(task_thread != NULL){ pthread_mutex_lock(task_thread->launch_mutex); } if(audio_loop != NULL){ pthread_mutex_lock(audio_loop->timing_mutex); g_atomic_int_set(&(audio_loop->time_spent), audio_loop->time_cycle); pthread_mutex_unlock(audio_loop->timing_mutex); // ags_main_loop_interrupt(AGS_MAIN_LOOP(audio_loop), // AGS_THREAD_SUSPEND_SIG, // 0, &time_spent); } if(task_thread != NULL){ pthread_mutex_unlock(task_thread->launch_mutex); } device = device_start; if(device == NULL){ g_atomic_int_dec_and_test(&(jack_client->queued)); return(0); } g_atomic_int_and(&(AGS_THREAD(audio_loop)->flags), (~(AGS_THREAD_TIMING))); /* * process MIDI input */ /* get device */ device = device_start; while(device != NULL){ /* */ pthread_mutex_lock(application_mutex); device_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) device->data); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(device_mutex); jack_devin = NULL; jack_midiin = NULL; if(AGS_IS_JACK_DEVIN(device->data)){ jack_devin = (AgsJackDevin *) device->data; /* wait callback */ no_event = TRUE; if((AGS_JACK_DEVIN_PASS_THROUGH & (g_atomic_int_get(&(jack_devin->sync_flags)))) == 0){ callback_mutex = jack_devin->callback_mutex; pthread_mutex_unlock(device_mutex); /* give back computing time until ready */ pthread_mutex_lock(callback_mutex); if((AGS_JACK_DEVIN_CALLBACK_DONE & (g_atomic_int_get(&(jack_devin->sync_flags)))) == 0){ g_atomic_int_or(&(jack_devin->sync_flags), AGS_JACK_DEVIN_CALLBACK_WAIT); while((AGS_JACK_DEVIN_CALLBACK_DONE & (g_atomic_int_get(&(jack_devin->sync_flags)))) == 0 && (AGS_JACK_DEVIN_CALLBACK_WAIT & (g_atomic_int_get(&(jack_devin->sync_flags)))) != 0){ pthread_cond_wait(jack_devin->callback_cond, callback_mutex); } } g_atomic_int_and(&(jack_devin->sync_flags), (~(AGS_JACK_DEVIN_CALLBACK_WAIT | AGS_JACK_DEVIN_CALLBACK_DONE))); pthread_mutex_unlock(callback_mutex); no_event = FALSE; pthread_mutex_lock(device_mutex); } }else if(AGS_IS_JACK_MIDIIN(device->data)){ jack_midiin = (AgsJackMidiin *) device->data; /* wait callback */ no_event = TRUE; if((AGS_JACK_MIDIIN_PASS_THROUGH & (g_atomic_int_get(&(jack_midiin->sync_flags)))) == 0){ callback_mutex = jack_midiin->callback_mutex; pthread_mutex_unlock(device_mutex); /* give back computing time until ready */ pthread_mutex_lock(callback_mutex); if((AGS_JACK_MIDIIN_CALLBACK_DONE & (g_atomic_int_get(&(jack_midiin->sync_flags)))) == 0){ g_atomic_int_or(&(jack_midiin->sync_flags), AGS_JACK_MIDIIN_CALLBACK_WAIT); while((AGS_JACK_MIDIIN_CALLBACK_DONE & (g_atomic_int_get(&(jack_midiin->sync_flags)))) == 0 && (AGS_JACK_MIDIIN_CALLBACK_WAIT & (g_atomic_int_get(&(jack_midiin->sync_flags)))) != 0){ pthread_cond_wait(jack_midiin->callback_cond, callback_mutex); } } g_atomic_int_and(&(jack_midiin->sync_flags), (~(AGS_JACK_MIDIIN_CALLBACK_WAIT | AGS_JACK_MIDIIN_CALLBACK_DONE))); pthread_mutex_unlock(callback_mutex); no_event = FALSE; pthread_mutex_lock(device_mutex); } /* audio input */ if(jack_devin != NULL){ /* get buffer */ if((AGS_JACK_DEVIN_BUFFER0 & (jack_devin->flags)) != 0){ nth_buffer = 3; }else if((AGS_JACK_DEVIN_BUFFER1 & (jack_devin->flags)) != 0){ nth_buffer = 0; }else if((AGS_JACK_DEVIN_BUFFER2 & (jack_devin->flags)) != 0){ nth_buffer = 1; }else if((AGS_JACK_DEVIN_BUFFER3 & jack_devin->flags) != 0){ nth_buffer = 2; }else{ /* iterate */ device = device->next; pthread_mutex_unlock(device_mutex); continue; } /* get copy mode */ copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(jack_devin->format), AGS_AUDIO_BUFFER_UTIL_FLOAT); /* check buffer flag */ switch(jack_devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: /* iterate */ device = device->next; pthread_mutex_unlock(device_mutex); continue; } /* retrieve buffer */ port = jack_devin->jack_port; for(i = 0; port != NULL; i++){ jack_port = port->data; in = jack_port_get_buffer(jack_port->port, jack_devin->buffer_size); if(!no_event && in != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(jack_devin->buffer[nth_buffer], jack_devin->pcm_channels, i, in, 1, 0, jack_devin->buffer_size, copy_mode); } port = port->next; } /* clear buffer */ port = jack_devin->jack_port; for(i = 0; port != NULL; i++){ jack_port = port->data; in = jack_port_get_buffer(jack_port->port, jack_devin->buffer_size); if(in != NULL){ ags_audio_buffer_util_clear_float(in, 1, jack_devin->buffer_size); } port = port->next; } if(!no_event){ /* signal finish */ callback_finish_mutex = jack_devin->callback_finish_mutex; pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(jack_devin->sync_flags), AGS_JACK_DEVIN_CALLBACK_FINISH_DONE); if((AGS_JACK_DEVIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(jack_devin->sync_flags)))) != 0){ pthread_cond_signal(jack_devin->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); } } /* MIDI input */ if(jack_midiin != NULL){ if(!no_event){ port = jack_midiin->jack_port; for(i = 0; port != NULL; i++){ jack_port = port->data; port_buf = jack_port_get_buffer(jack_port->port, 4096); event_count = jack_midi_get_event_count(port_buf); for(j = 0; j < event_count; j++){ jack_midi_event_get(&in_event, port_buf, j); if(in_event.size > 0){ if((AGS_JACK_MIDIIN_BUFFER0 & (jack_midiin->flags)) != 0){ nth_buffer = 1; }else if((AGS_JACK_MIDIIN_BUFFER1 & (jack_midiin->flags)) != 0){ nth_buffer = 2; }else if((AGS_JACK_MIDIIN_BUFFER2 & (jack_midiin->flags)) != 0){ nth_buffer = 3; }else if((AGS_JACK_MIDIIN_BUFFER3 & jack_midiin->flags) != 0){ nth_buffer = 0; } if(ceil((jack_midiin->buffer_size[nth_buffer] + in_event.size) / 4096.0) > ceil(jack_midiin->buffer_size[nth_buffer] / 4096.0)){ if(jack_midiin->buffer[nth_buffer] == NULL){ jack_midiin->buffer[nth_buffer] = malloc(4096 * sizeof(char)); }else{ jack_midiin->buffer[nth_buffer] = realloc(jack_midiin->buffer[nth_buffer], (ceil(jack_midiin->buffer_size[nth_buffer] / 4096.0) * 4096 + 4096) * sizeof(char)); } } memcpy(&(jack_midiin->buffer[nth_buffer][jack_midiin->buffer_size[nth_buffer]]), in_event.buffer, in_event.size); jack_midiin->buffer_size[nth_buffer] += in_event.size; } } jack_midi_clear_buffer(port_buf); port = port->next; } /* signal finish */ callback_finish_mutex = jack_midiin->callback_finish_mutex; pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(jack_midiin->sync_flags), AGS_JACK_MIDIIN_CALLBACK_FINISH_DONE); if((AGS_JACK_MIDIIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(jack_midiin->sync_flags)))) != 0){ pthread_cond_signal(jack_midiin->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); } } } pthread_mutex_unlock(device_mutex); /* iterate */ pthread_mutex_lock(mutex); device = device->next; pthread_mutex_unlock(mutex); } /* * process audio output */ /* get device */ device = device_start; while(device != NULL){ /* */ pthread_mutex_lock(application_mutex); device_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) device->data); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(device_mutex); jack_devout = NULL; if(AGS_IS_JACK_DEVOUT(device->data)){ jack_devout = (AgsJackDevout *) device->data; /* wait callback */ no_event = TRUE; if((AGS_JACK_DEVOUT_PASS_THROUGH & (g_atomic_int_get(&(jack_devout->sync_flags)))) == 0){ callback_mutex = jack_devout->callback_mutex; pthread_mutex_unlock(device_mutex); /* give back computing time until ready */ pthread_mutex_lock(callback_mutex); if((AGS_JACK_DEVOUT_CALLBACK_DONE & (g_atomic_int_get(&(jack_devout->sync_flags)))) == 0){ g_atomic_int_or(&(jack_devout->sync_flags), AGS_JACK_DEVOUT_CALLBACK_WAIT); while((AGS_JACK_DEVOUT_CALLBACK_DONE & (g_atomic_int_get(&(jack_devout->sync_flags)))) == 0 && (AGS_JACK_DEVOUT_CALLBACK_WAIT & (g_atomic_int_get(&(jack_devout->sync_flags)))) != 0){ pthread_cond_wait(jack_devout->callback_cond, callback_mutex); } } g_atomic_int_and(&(jack_devout->sync_flags), (~(AGS_JACK_DEVOUT_CALLBACK_WAIT | AGS_JACK_DEVOUT_CALLBACK_DONE))); pthread_mutex_unlock(callback_mutex); no_event = FALSE; pthread_mutex_lock(device_mutex); } /* clear buffer */ port = jack_devout->jack_port; for(i = 0; port != NULL; i++){ jack_port = port->data; out = jack_port_get_buffer(jack_port->port, jack_devout->buffer_size); if(out != NULL){ ags_audio_buffer_util_clear_float(out, 1, jack_devout->buffer_size); } port = port->next; } /* get buffer */ if((AGS_JACK_DEVOUT_BUFFER0 & (jack_devout->flags)) != 0){ nth_buffer = 3; }else if((AGS_JACK_DEVOUT_BUFFER1 & (jack_devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_JACK_DEVOUT_BUFFER2 & (jack_devout->flags)) != 0){ nth_buffer = 1; }else if((AGS_JACK_DEVOUT_BUFFER3 & jack_devout->flags) != 0){ nth_buffer = 2; }else{ /* iterate */ device = device->next; pthread_mutex_unlock(device_mutex); continue; } /* get copy mode */ copy_mode = ags_audio_buffer_util_get_copy_mode(AGS_AUDIO_BUFFER_UTIL_FLOAT, ags_audio_buffer_util_format_from_soundcard(jack_devout->format)); /* check buffer flag */ switch(jack_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: /* iterate */ device = device->next; pthread_mutex_unlock(device_mutex); continue; } /* fill buffer */ port = jack_devout->jack_port; for(i = 0; port != NULL; i++){ jack_port = port->data; out = jack_port_get_buffer(jack_port->port, jack_devout->buffer_size); if(!no_event && out != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(out, 1, 0, jack_devout->buffer[nth_buffer], jack_devout->pcm_channels, i, jack_devout->buffer_size, copy_mode); } port = port->next; } if(!no_event){ /* signal finish */ callback_finish_mutex = jack_devout->callback_finish_mutex; pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(jack_devout->sync_flags), AGS_JACK_DEVOUT_CALLBACK_FINISH_DONE); if((AGS_JACK_DEVOUT_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(jack_devout->sync_flags)))) != 0){ pthread_cond_signal(jack_devout->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); } } pthread_mutex_unlock(device_mutex); /* iterate */ pthread_mutex_lock(mutex); device = device->next; pthread_mutex_unlock(mutex); } g_atomic_int_dec_and_test(&(jack_client->queued)); return(0); } int ags_jack_client_xrun_callback(void *ptr) { AgsJackClient *jack_client; if(ptr == NULL){ return(0); } jack_client = (AgsJackClient *) ptr; return(0); } #endif /** * ags_jack_client_new: * @jack_server: the assigned #AgsJackServer * * Instantiate a new #AgsJackClient. * * Returns: the new #AgsJackClient * * Since: 1.0.0 */ AgsJackClient* ags_jack_client_new(GObject *jack_server) { AgsJackClient *jack_client; jack_client = (AgsJackClient *) g_object_new(AGS_TYPE_JACK_CLIENT, "jack-server", jack_server, NULL); return(jack_client); } gsequencer-1.4.24/ags/audio/jack/ags_jack_midiin.h0000644000175000017500000001303213246707333016722 00000000000000/* 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 . */ #ifndef __AGS_JACK_MIDIIN_H__ #define __AGS_JACK_MIDIIN_H__ #include #include #include #include #define AGS_TYPE_JACK_MIDIIN (ags_jack_midiin_get_type()) #define AGS_JACK_MIDIIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_JACK_MIDIIN, AgsJackMidiin)) #define AGS_JACK_MIDIIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_JACK_MIDIIN, AgsJackMidiin)) #define AGS_IS_JACK_MIDIIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_JACK_MIDIIN)) #define AGS_IS_JACK_MIDIIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_JACK_MIDIIN)) #define AGS_JACK_MIDIIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_JACK_MIDIIN, AgsJackMidiinClass)) #define AGS_JACK_MIDIIN_DEFAULT_BUFFER_SIZE (256) typedef struct _AgsJackMidiin AgsJackMidiin; typedef struct _AgsJackMidiinClass AgsJackMidiinClass; /** * AgsJackMidiinFlags: * @AGS_JACK_MIDIIN_BUFFER0: ring-buffer 0 * @AGS_JACK_MIDIIN_BUFFER1: ring-buffer 1 * @AGS_JACK_MIDIIN_BUFFER2: ring-buffer 2 * @AGS_JACK_MIDIIN_BUFFER3: ring-buffer 3 * @AGS_JACK_MIDIIN_ATTACK_FIRST: use first attack, instead of second one * @AGS_JACK_MIDIIN_RECORD: is recording * @AGS_JACK_MIDIIN_SHUTDOWN: stop recording * @AGS_JACK_MIDIIN_START_RECORD: just started recording * @AGS_JACK_MIDIIN_NONBLOCKING: do non-blocking calls * @AGS_JACK_MIDIIN_INITIALIZED: recording is initialized * * Enum values to control the behavior or indicate internal state of #AgsJackMidiin by * enable/disable as flags. */ typedef enum { AGS_JACK_MIDIIN_BUFFER0 = 1, AGS_JACK_MIDIIN_BUFFER1 = 1 << 1, AGS_JACK_MIDIIN_BUFFER2 = 1 << 2, AGS_JACK_MIDIIN_BUFFER3 = 1 << 3, AGS_JACK_MIDIIN_ATTACK_FIRST = 1 << 4, AGS_JACK_MIDIIN_RECORD = 1 << 5, AGS_JACK_MIDIIN_SHUTDOWN = 1 << 6, AGS_JACK_MIDIIN_START_RECORD = 1 << 7, AGS_JACK_MIDIIN_NONBLOCKING = 1 << 8, AGS_JACK_MIDIIN_INITIALIZED = 1 << 9, AGS_JACK_MIDIIN_DUMMY = 1 << 10, AGS_JACK_MIDIIN_OSS = 1 << 11, AGS_JACK_MIDIIN_ALSA = 1 << 12, AGS_JACK_MIDIIN_FREEBOB = 1 << 13, AGS_JACK_MIDIIN_FIREWIRE = 1 << 14, AGS_JACK_MIDIIN_NET = 1 << 15, AGS_JACK_MIDIIN_SUN = 1 << 16, AGS_JACK_MIDIIN_PORTAUDIO = 1 << 17, }AgsJackMidiinFlags; /** * AgsJackMidiinSyncFlags: * @AGS_JACK_MIDIIN_PASS_THROUGH: do not sync * @AGS_JACK_MIDIIN_INITIAL_CALLBACK: initial callback * @AGS_JACK_MIDIIN_CALLBACK_WAIT: sync wait, sequencer conditional lock * @AGS_JACK_MIDIIN_CALLBACK_DONE: sync done, sequencer conditional lock * @AGS_JACK_MIDIIN_CALLBACK_FINISH_WAIT: sync wait, client conditional lock * @AGS_JACK_MIDIIN_CALLBACK_FINISH_DONE: sync done, client conditional lock * * Enum values to control the synchronization between sequencer and client. */ typedef enum{ AGS_JACK_MIDIIN_PASS_THROUGH = 1, AGS_JACK_MIDIIN_INITIAL_CALLBACK = 1 << 1, AGS_JACK_MIDIIN_CALLBACK_WAIT = 1 << 2, AGS_JACK_MIDIIN_CALLBACK_DONE = 1 << 3, AGS_JACK_MIDIIN_CALLBACK_FINISH_WAIT = 1 << 4, AGS_JACK_MIDIIN_CALLBACK_FINISH_DONE = 1 << 5, }AgsJackMidiinSyncFlags; #define AGS_JACK_MIDIIN_ERROR (ags_jack_midiin_error_quark()) typedef enum{ AGS_JACK_MIDIIN_ERROR_LOCKED_SOUNDCARD, }AgsJackMidiinError; struct _AgsJackMidiin { GObject object; guint flags; volatile guint sync_flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; char **buffer; guint buffer_size[4]; double bpm; // beats per minute gdouble delay; gdouble delay_factor; guint latency; gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint note_offset_absolute; gchar *card_uri; GObject *jack_client; gchar **port_name; GList *jack_port; pthread_mutex_t *callback_mutex; pthread_cond_t *callback_cond; pthread_mutex_t *callback_finish_mutex; pthread_cond_t *callback_finish_cond; GObject *application_context; pthread_mutex_t *application_mutex; GList *audio; }; struct _AgsJackMidiinClass { GObjectClass object; }; GType ags_jack_midiin_get_type(); GQuark ags_jack_midiin_error_quark(); void ags_jack_midiin_switch_buffer_flag(AgsJackMidiin *jack_midiin); AgsJackMidiin* ags_jack_midiin_new(GObject *application_context); #endif /*__AGS_JACK_MIDIIN_H__*/ gsequencer-1.4.24/ags/audio/jack/ags_jack_port.c0000644000175000017500000003073113247044247016434 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_jack_port_class_init(AgsJackPortClass *jack_port); void ags_jack_port_connectable_interface_init(AgsConnectableInterface *connectable); void ags_jack_port_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager); void ags_jack_port_init(AgsJackPort *jack_port); void ags_jack_port_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_jack_port_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_jack_port_connect(AgsConnectable *connectable); void ags_jack_port_disconnect(AgsConnectable *connectable); void ags_jack_port_dispose(GObject *gobject); void ags_jack_port_finalize(GObject *gobject); /** * SECTION:ags_jack_port * @short_description: JACK resource. * @title: AgsJackPort * @section_id: * @include: ags/audio/jack/ags_jack_port.h * * The #AgsJackPort represents either a JACK sequencer or soundcard to communicate * with. */ enum{ PROP_0, PROP_JACK_CLIENT, PROP_PORT_NAME, }; static gpointer ags_jack_port_parent_class = NULL; GType ags_jack_port_get_type() { static GType ags_type_jack_port = 0; if(!ags_type_jack_port){ static const GTypeInfo ags_jack_port_info = { sizeof (AgsJackPortClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_jack_port_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsJackPort), 0, /* n_preallocs */ (GInstanceInitFunc) ags_jack_port_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_jack_port_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_jack_port = g_type_register_static(G_TYPE_OBJECT, "AgsJackPort", &ags_jack_port_info, 0); g_type_add_interface_static(ags_type_jack_port, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_jack_port); } void ags_jack_port_class_init(AgsJackPortClass *jack_port) { GObjectClass *gobject; GParamSpec *param_spec; ags_jack_port_parent_class = g_type_class_peek_parent(jack_port); /* GObjectClass */ gobject = (GObjectClass *) jack_port; gobject->set_property = ags_jack_port_set_property; gobject->get_property = ags_jack_port_get_property; gobject->dispose = ags_jack_port_dispose; gobject->finalize = ags_jack_port_finalize; /* properties */ /** * AgsJackPort:jack-client: * * The assigned #AgsJackClient. * * Since: 1.0.0 */ param_spec = g_param_spec_object("jack-client", i18n_pspec("assigned JACK client"), i18n_pspec("The assigned JACK client"), AGS_TYPE_JACK_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_JACK_CLIENT, param_spec); /** * AgsJackPort:port-name: * * The jack soundcard indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("port-name", i18n_pspec("port name"), i18n_pspec("The port name"), "hw:0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT_NAME, param_spec); } void ags_jack_port_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_jack_port_connect; connectable->disconnect = ags_jack_port_disconnect; } void ags_jack_port_init(AgsJackPort *jack_port) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert port mutex */ jack_port->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); jack_port->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) jack_port, mutex); pthread_mutex_unlock(application_mutex); /* flags */ jack_port->flags = 0; jack_port->jack_client = NULL; jack_port->uuid = NULL; jack_port->name = NULL; jack_port->port = NULL; } void ags_jack_port_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsJackPort *jack_port; jack_port = AGS_JACK_PORT(gobject); switch(prop_id){ case PROP_JACK_CLIENT: { AgsJackClient *jack_client; jack_client = (AgsJackClient *) g_value_get_object(value); if(jack_port->jack_client == (GObject *) jack_client){ return; } if(jack_port->jack_client != NULL){ g_object_unref(jack_port->jack_client); } if(jack_client != NULL){ g_object_ref(jack_client); } jack_port->jack_client = (GObject *) jack_client; } break; case PROP_PORT_NAME: { gchar *port_name; port_name = g_value_get_string(value); if(jack_port->name == port_name || !g_ascii_strcasecmp(jack_port->name, port_name)){ return; } if(jack_port->name != NULL){ g_free(jack_port->name); } jack_port->name = port_name; #ifdef AGS_WITH_JACK if(jack_port->port != NULL){ jack_port_set_name(jack_port->port, port_name); } #endif } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_port_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsJackPort *jack_port; jack_port = AGS_JACK_PORT(gobject); switch(prop_id){ case PROP_JACK_CLIENT: { g_value_set_object(value, jack_port->jack_client); } break; case PROP_PORT_NAME: { g_value_set_string(value, jack_port->name); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_port_connect(AgsConnectable *connectable) { AgsJackPort *jack_port; jack_port = AGS_JACK_PORT(connectable); if((AGS_JACK_PORT_CONNECTED & (jack_port->flags)) != 0){ return; } jack_port->flags |= AGS_JACK_PORT_CONNECTED; } void ags_jack_port_disconnect(AgsConnectable *connectable) { AgsJackPort *jack_port; jack_port = AGS_JACK_PORT(connectable); if((AGS_JACK_PORT_CONNECTED & (jack_port->flags)) == 0){ return; } jack_port->flags &= (~AGS_JACK_PORT_CONNECTED); } void ags_jack_port_dispose(GObject *gobject) { AgsJackPort *jack_port; jack_port = AGS_JACK_PORT(gobject); /* jack client */ if(jack_port->jack_client != NULL){ g_object_unref(jack_port->jack_client); jack_port->jack_client = NULL; } /* name */ g_free(jack_port->name); /* call parent */ G_OBJECT_CLASS(ags_jack_port_parent_class)->dispose(gobject); } void ags_jack_port_finalize(GObject *gobject) { AgsJackPort *jack_port; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; jack_port = AGS_JACK_PORT(gobject); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* remove jack port mutex */ pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); /* jack client */ if(jack_port->jack_client != NULL){ g_object_unref(jack_port->jack_client); } /* name */ g_free(jack_port->name); pthread_mutex_destroy(jack_port->mutex); free(jack_port->mutex); pthread_mutexattr_destroy(jack_port->mutexattr); free(jack_port->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_jack_port_parent_class)->finalize(gobject); } /** * ags_jack_port_find: * @jack_port: a #GList * @port_name: the port name to find * * Finds next match of @port_name in @jack_port. * * Returns: a #GList or %NULL * * Since: 1.0.0 */ GList* ags_jack_port_find(GList *jack_port, gchar *port_name) { #ifdef AGS_WITH_JACK while(jack_port != NULL){ if(!g_ascii_strcasecmp(jack_port_name(AGS_JACK_PORT(jack_port->data)->port), port_name)){ return(jack_port); } } #endif return(NULL); } /** * ags_jack_port_register: * @jack_port: the #AgsJackPort * @port_name: the name as string * @is_audio: if %TRUE interpreted as audio port * @is_midi: if %TRUE interpreted as midi port * @is_output: if %TRUE port is acting as output, otherwise as input * * Register a new JACK port and read uuid. Creates a new AgsSequencer or AgsSoundcard * object. * * Since: 1.0.0 */ void ags_jack_port_register(AgsJackPort *jack_port, gchar *port_name, gboolean is_audio, gboolean is_midi, gboolean is_output) { GList *list; gchar *name, *uuid; if(!AGS_IS_JACK_PORT(jack_port) || port_name == NULL){ return; } if(jack_port->jack_client == NULL){ g_warning("ags_jack_port.c - no assigned AgsJackClient"); return; } if((AGS_JACK_PORT_REGISTERED & (jack_port->flags)) != 0){ return; } /* get jack server and application context */ if(jack_port->jack_client == NULL || AGS_JACK_CLIENT(jack_port->jack_client)->jack_server == NULL){ return; } uuid = jack_port->uuid; name = jack_port->name; if(AGS_JACK_CLIENT(jack_port->jack_client)->client == NULL){ return; } jack_port->name = g_strdup(port_name); /* create sequencer or soundcard */ if(is_output){ jack_port->flags |= AGS_JACK_PORT_IS_OUTPUT; } #ifdef AGS_WITH_JACK if(is_audio){ jack_port->flags |= AGS_JACK_PORT_IS_AUDIO; jack_port->port = jack_port_register(AGS_JACK_CLIENT(jack_port->jack_client)->client, jack_port->name, JACK_DEFAULT_AUDIO_TYPE, (is_output ? JackPortIsOutput: JackPortIsInput), 0); }else if(is_midi){ jack_port->flags |= AGS_JACK_PORT_IS_MIDI; jack_port->port = jack_port_register(AGS_JACK_CLIENT(jack_port->jack_client)->client, jack_port->name, JACK_DEFAULT_MIDI_TYPE, (is_output ? JackPortIsOutput: JackPortIsInput), 0); } if(jack_port->port != NULL){ jack_port->flags |= AGS_JACK_PORT_REGISTERED; } #ifdef HAVE_JACK_PORT_UUID if(jack_port->port != NULL){ jack_port->uuid = jack_port_uuid(jack_port->port); } #endif #endif } void ags_jack_port_unregister(AgsJackPort *jack_port) { if(!AGS_IS_JACK_PORT(jack_port) || AGS_JACK_CLIENT(jack_port->jack_client)->client == NULL){ return; } #ifdef AGS_WITH_JACK if(jack_port->port != NULL){ jack_port_unregister(AGS_JACK_CLIENT(jack_port->jack_client)->client, jack_port->port); } #endif } /** * ags_jack_port_new: * @jack_client: the #AgsJackClient assigned to * * Instantiate a new #AgsJackPort. * * Returns: the new #AgsJackPort * * Since: 1.0.0 */ AgsJackPort* ags_jack_port_new(GObject *jack_client) { AgsJackPort *jack_port; jack_port = (AgsJackPort *) g_object_new(AGS_TYPE_JACK_PORT, "jack-client", jack_client, NULL); return(jack_port); } gsequencer-1.4.24/ags/audio/jack/ags_jack_midiin.c0000644000175000017500000012001213246707333016712 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_jack_midiin_class_init(AgsJackMidiinClass *jack_midiin); void ags_jack_midiin_connectable_interface_init(AgsConnectableInterface *connectable); void ags_jack_midiin_sequencer_interface_init(AgsSequencerInterface *sequencer); void ags_jack_midiin_init(AgsJackMidiin *jack_midiin); void ags_jack_midiin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_jack_midiin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_jack_midiin_disconnect(AgsConnectable *connectable); void ags_jack_midiin_connect(AgsConnectable *connectable); void ags_jack_midiin_dispose(GObject *gobject); void ags_jack_midiin_finalize(GObject *gobject); void ags_jack_midiin_set_application_context(AgsSequencer *sequencer, AgsApplicationContext *application_context); AgsApplicationContext* ags_jack_midiin_get_application_context(AgsSequencer *sequencer); void ags_jack_midiin_set_application_mutex(AgsSequencer *sequencer, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_jack_midiin_get_application_mutex(AgsSequencer *sequencer); void ags_jack_midiin_set_device(AgsSequencer *sequencer, gchar *device); gchar* ags_jack_midiin_get_device(AgsSequencer *sequencer); void ags_jack_midiin_list_cards(AgsSequencer *sequencer, GList **card_id, GList **card_name); gboolean ags_jack_midiin_is_starting(AgsSequencer *sequencer); gboolean ags_jack_midiin_is_recording(AgsSequencer *sequencer); void ags_jack_midiin_port_init(AgsSequencer *sequencer, GError **error); void ags_jack_midiin_port_record(AgsSequencer *sequencer, GError **error); void ags_jack_midiin_port_free(AgsSequencer *sequencer); void ags_jack_midiin_tic(AgsSequencer *sequencer); void ags_jack_midiin_offset_changed(AgsSequencer *sequencer, guint note_offset); void ags_jack_midiin_set_bpm(AgsSequencer *sequencer, gdouble bpm); gdouble ags_jack_midiin_get_bpm(AgsSequencer *sequencer); void ags_jack_midiin_set_delay_factor(AgsSequencer *sequencer, gdouble delay_factor); gdouble ags_jack_midiin_get_delay_factor(AgsSequencer *sequencer); void* ags_jack_midiin_get_buffer(AgsSequencer *sequencer, guint *buffer_length); void* ags_jack_midiin_get_next_buffer(AgsSequencer *sequencer, guint *buffer_length); void ags_jack_midiin_set_note_offset(AgsSequencer *sequencer, guint note_offset); guint ags_jack_midiin_get_note_offset(AgsSequencer *sequencer); void ags_jack_midiin_set_audio(AgsSequencer *sequencer, GList *audio); GList* ags_jack_midiin_get_audio(AgsSequencer *sequencer); /** * SECTION:ags_jack_midiin * @short_description: Input from sequencer * @title: AgsJackMidiin * @section_id: * @include: ags/audio/jack/ags_jack_midiin.h * * #AgsJackMidiin represents a sequencer and supports midi input. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, PROP_JACK_CLIENT, PROP_JACK_PORT, }; enum{ LAST_SIGNAL, }; static gpointer ags_jack_midiin_parent_class = NULL; static guint jack_midiin_signals[LAST_SIGNAL]; GType ags_jack_midiin_get_type (void) { static GType ags_type_jack_midiin = 0; if(!ags_type_jack_midiin){ static const GTypeInfo ags_jack_midiin_info = { sizeof (AgsJackMidiinClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_jack_midiin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsJackMidiin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_jack_midiin_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_jack_midiin_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_sequencer_interface_info = { (GInterfaceInitFunc) ags_jack_midiin_sequencer_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_jack_midiin = g_type_register_static(G_TYPE_OBJECT, "AgsJackMidiin", &ags_jack_midiin_info, 0); g_type_add_interface_static(ags_type_jack_midiin, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_jack_midiin, AGS_TYPE_SEQUENCER, &ags_sequencer_interface_info); } return (ags_type_jack_midiin); } void ags_jack_midiin_class_init(AgsJackMidiinClass *jack_midiin) { GObjectClass *gobject; GParamSpec *param_spec; ags_jack_midiin_parent_class = g_type_class_peek_parent(jack_midiin); /* GObjectClass */ gobject = (GObjectClass *) jack_midiin; gobject->set_property = ags_jack_midiin_set_property; gobject->get_property = ags_jack_midiin_get_property; gobject->dispose = ags_jack_midiin_dispose; gobject->finalize = ags_jack_midiin_finalize; /* properties */ /** * AgsJackMidiin:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsJackMidiin:application-mutex: * * The assigned application mutex * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsJackMidiin:device: * * The JACK sequencer indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "hw:0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsJackMidiin:buffer: * * The buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to record"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsJackMidiin:bpm: * * Beats per minute * * Since: 1.0.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsJackMidiin:delay-factor: * * tact * * Since: 1.0.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsJackMidiin:attack: * * Attack of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsJackMidiin:jack-client: * * The assigned #AgsJackClient * * Since: 1.0.0 */ param_spec = g_param_spec_object("jack-client", i18n_pspec("jack client object"), i18n_pspec("The jack client object"), AGS_TYPE_JACK_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_JACK_CLIENT, param_spec); /** * AgsJackMidiin:jack-port: * * The assigned #AgsJackPort * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("jack-port", i18n_pspec("jack port object"), i18n_pspec("The jack port object"), AGS_TYPE_JACK_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_JACK_PORT, param_spec); /* AgsJackMidiinClass */ } GQuark ags_jack_midiin_error_quark() { return(g_quark_from_static_string("ags-jack_midiin-error-quark")); } void ags_jack_midiin_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_jack_midiin_connect; connectable->disconnect = ags_jack_midiin_disconnect; } void ags_jack_midiin_sequencer_interface_init(AgsSequencerInterface *sequencer) { sequencer->set_application_context = ags_jack_midiin_set_application_context; sequencer->get_application_context = ags_jack_midiin_get_application_context; sequencer->set_application_mutex = ags_jack_midiin_set_application_mutex; sequencer->get_application_mutex = ags_jack_midiin_get_application_mutex; sequencer->set_device = ags_jack_midiin_set_device; sequencer->get_device = ags_jack_midiin_get_device; sequencer->list_cards = ags_jack_midiin_list_cards; sequencer->is_starting = ags_jack_midiin_is_starting; sequencer->is_playing = NULL; sequencer->is_recording = ags_jack_midiin_is_recording; sequencer->play_init = NULL; sequencer->play = NULL; sequencer->record_init = ags_jack_midiin_port_init; sequencer->record = ags_jack_midiin_port_record; sequencer->stop = ags_jack_midiin_port_free; sequencer->tic = ags_jack_midiin_tic; sequencer->offset_changed = ags_jack_midiin_offset_changed; sequencer->set_bpm = ags_jack_midiin_set_bpm; sequencer->get_bpm = ags_jack_midiin_get_bpm; sequencer->set_delay_factor = ags_jack_midiin_set_delay_factor; sequencer->get_delay_factor = ags_jack_midiin_get_delay_factor; sequencer->get_buffer = ags_jack_midiin_get_buffer; sequencer->get_next_buffer = ags_jack_midiin_get_next_buffer; sequencer->set_note_offset = ags_jack_midiin_set_note_offset; sequencer->get_note_offset = ags_jack_midiin_get_note_offset; sequencer->set_audio = ags_jack_midiin_set_audio; sequencer->get_audio = ags_jack_midiin_get_audio; } void ags_jack_midiin_init(AgsJackMidiin *jack_midiin) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert jack midiin mutex */ jack_midiin->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif jack_midiin->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) jack_midiin, mutex); pthread_mutex_unlock(application_mutex); /* flags */ jack_midiin->flags = (AGS_JACK_MIDIIN_ALSA); g_atomic_int_set(&(jack_midiin->sync_flags), AGS_JACK_MIDIIN_PASS_THROUGH); jack_midiin->card_uri = NULL; jack_midiin->jack_client = NULL; jack_midiin->port_name = NULL; jack_midiin->jack_port = NULL; /* buffer */ jack_midiin->buffer = (char **) malloc(4 * sizeof(char*)); jack_midiin->buffer[0] = NULL; jack_midiin->buffer[1] = NULL; jack_midiin->buffer[2] = NULL; jack_midiin->buffer[3] = NULL; jack_midiin->buffer_size[0] = 0; jack_midiin->buffer_size[1] = 0; jack_midiin->buffer_size[2] = 0; jack_midiin->buffer_size[3] = 0; /* bpm */ jack_midiin->bpm = AGS_SEQUENCER_DEFAULT_BPM; /* delay and delay factor */ jack_midiin->delay = AGS_SEQUENCER_DEFAULT_DELAY; jack_midiin->delay_factor = AGS_SEQUENCER_DEFAULT_DELAY_FACTOR; /* counters */ jack_midiin->note_offset = 0; jack_midiin->tact_counter = 0.0; jack_midiin->delay_counter = 0; jack_midiin->tic_counter = 0; /* callback mutex */ jack_midiin->callback_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(jack_midiin->callback_mutex, NULL); jack_midiin->callback_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(jack_midiin->callback_cond, NULL); /* callback finish mutex */ jack_midiin->callback_finish_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(jack_midiin->callback_finish_mutex, NULL); jack_midiin->callback_finish_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(jack_midiin->callback_finish_cond, NULL); /* parent */ jack_midiin->application_context = NULL; jack_midiin->application_mutex = NULL; /* all AgsAudio */ jack_midiin->audio = NULL; } void ags_jack_midiin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(gobject); //TODO:JK: implement set functionality switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = g_value_get_object(value); if(jack_midiin->application_context == (GObject *) application_context){ return; } if(jack_midiin->application_context != NULL){ g_object_unref(G_OBJECT(jack_midiin->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *str; gchar *segmentation; guint discriminante, nominante; g_object_ref(G_OBJECT(application_context)); jack_midiin->application_mutex = application_context->mutex; }else{ jack_midiin->application_mutex = NULL; } jack_midiin->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(jack_midiin->application_mutex == application_mutex){ return; } jack_midiin->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); jack_midiin->card_uri = g_strdup(device); } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); jack_midiin->bpm = bpm; } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); jack_midiin->delay_factor = delay_factor; } break; case PROP_JACK_CLIENT: { AgsJackClient *jack_client; jack_client = g_value_get_object(value); if(jack_midiin->jack_client == (GObject *) jack_client){ return; } if(jack_midiin->jack_client != NULL){ g_object_unref(G_OBJECT(jack_midiin->jack_client)); } if(jack_client != NULL){ g_object_ref(G_OBJECT(jack_client)); } jack_midiin->jack_client = (GObject *) jack_client; } break; case PROP_JACK_PORT: { AgsJackPort *jack_port; jack_port = (AgsJackPort *) g_value_get_object(value); if(g_list_find(jack_midiin->jack_port, jack_port) != NULL){ return; } if(jack_port != NULL){ g_object_ref(jack_port); jack_midiin->jack_port = g_list_append(jack_midiin->jack_port, jack_port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_midiin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, jack_midiin->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, jack_midiin->application_mutex); } break; case PROP_DEVICE: { g_value_set_string(value, jack_midiin->card_uri); } break; case PROP_BUFFER: { g_value_set_pointer(value, jack_midiin->buffer); } break; case PROP_BPM: { g_value_set_double(value, jack_midiin->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, jack_midiin->delay_factor); } break; case PROP_JACK_CLIENT: { g_value_set_object(value, jack_midiin->jack_client); } break; case PROP_JACK_PORT: { g_value_set_pointer(value, g_list_copy(jack_midiin->jack_port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_midiin_dispose(GObject *gobject) { AgsJackMidiin *jack_midiin; GList *list; jack_midiin = AGS_JACK_MIDIIN(gobject); /* audio */ if(jack_midiin->audio != NULL){ list = jack_midiin->audio; while(list != NULL){ g_object_set(list->data, "sequencer", NULL, NULL); list = list->next; } g_list_free_full(jack_midiin->audio, g_object_unref); jack_midiin->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_jack_midiin_parent_class)->dispose(gobject); } void ags_jack_midiin_finalize(GObject *gobject) { AgsJackMidiin *jack_midiin; AgsMutexManager *mutex_manager; GList *list; jack_midiin = AGS_JACK_MIDIIN(gobject); /* remove jack_midiin mutex */ pthread_mutex_lock(jack_midiin->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(jack_midiin->application_mutex); /* free output buffer */ if(jack_midiin->buffer[0] != NULL){ free(jack_midiin->buffer[0]); } if(jack_midiin->buffer[1] != NULL){ free(jack_midiin->buffer[1]); } if(jack_midiin->buffer[2] != NULL){ free(jack_midiin->buffer[2]); } if(jack_midiin->buffer[3] != NULL){ free(jack_midiin->buffer[3]); } /* free buffer array */ free(jack_midiin->buffer); /* audio */ if(jack_midiin->audio != NULL){ list = jack_midiin->audio; while(list != NULL){ g_object_set(list->data, "sequencer", NULL, NULL); list = list->next; } g_list_free_full(jack_midiin->audio, g_object_unref); } pthread_mutex_destroy(jack_midiin->mutex); free(jack_midiin->mutex); pthread_mutexattr_destroy(jack_midiin->mutexattr); free(jack_midiin->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_jack_midiin_parent_class)->finalize(gobject); } void ags_jack_midiin_connect(AgsConnectable *connectable) { AgsJackMidiin *jack_midiin; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *mutex; pthread_mutexattr_t attr; jack_midiin = AGS_JACK_MIDIIN(connectable); /* create jack_midiin mutex */ //FIXME:JK: memory leak pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, &attr); /* insert mutex */ pthread_mutex_lock(jack_midiin->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_insert(mutex_manager, (GObject *) jack_midiin, mutex); pthread_mutex_unlock(jack_midiin->application_mutex); /* */ list = jack_midiin->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_jack_midiin_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_jack_midiin_switch_buffer_flag: * @jack_midiin: an #AgsJackMidiin * * The buffer flag indicates the currently recorded buffer. * * Since: 1.0.0 */ void ags_jack_midiin_switch_buffer_flag(AgsJackMidiin *jack_midiin) { if((AGS_JACK_MIDIIN_BUFFER0 & (jack_midiin->flags)) != 0){ jack_midiin->flags &= (~AGS_JACK_MIDIIN_BUFFER0); jack_midiin->flags |= AGS_JACK_MIDIIN_BUFFER1; /* clear buffer */ if(jack_midiin->buffer[3] != NULL){ free(jack_midiin->buffer[3]); } jack_midiin->buffer[3] = NULL; jack_midiin->buffer_size[3] = 0; }else if((AGS_JACK_MIDIIN_BUFFER1 & (jack_midiin->flags)) != 0){ jack_midiin->flags &= (~AGS_JACK_MIDIIN_BUFFER1); jack_midiin->flags |= AGS_JACK_MIDIIN_BUFFER2; /* clear buffer */ if(jack_midiin->buffer[0] != NULL){ free(jack_midiin->buffer[0]); } jack_midiin->buffer[0] = NULL; jack_midiin->buffer_size[0] = 0; }else if((AGS_JACK_MIDIIN_BUFFER2 & (jack_midiin->flags)) != 0){ jack_midiin->flags &= (~AGS_JACK_MIDIIN_BUFFER2); jack_midiin->flags |= AGS_JACK_MIDIIN_BUFFER3; /* clear buffer */ if(jack_midiin->buffer[1] != NULL){ free(jack_midiin->buffer[1]); } jack_midiin->buffer[1] = NULL; jack_midiin->buffer_size[1] = 0; }else if((AGS_JACK_MIDIIN_BUFFER3 & (jack_midiin->flags)) != 0){ jack_midiin->flags &= (~AGS_JACK_MIDIIN_BUFFER3); jack_midiin->flags |= AGS_JACK_MIDIIN_BUFFER0; /* clear buffer */ if(jack_midiin->buffer[2] != NULL){ free(jack_midiin->buffer[2]); } jack_midiin->buffer[2] = NULL; jack_midiin->buffer_size[2] = 0; } } void ags_jack_midiin_set_application_context(AgsSequencer *sequencer, AgsApplicationContext *application_context) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); jack_midiin->application_context = (GObject *) application_context; } AgsApplicationContext* ags_jack_midiin_get_application_context(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); return((AgsApplicationContext *) jack_midiin->application_context); } void ags_jack_midiin_set_application_mutex(AgsSequencer *sequencer, pthread_mutex_t *application_mutex) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); jack_midiin->application_mutex = application_mutex; } pthread_mutex_t* ags_jack_midiin_get_application_mutex(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); return(jack_midiin->application_mutex); } void ags_jack_midiin_set_device(AgsSequencer *sequencer, gchar *device) { AgsJackMidiin *jack_midiin; GList *jack_port, *jack_port_start; gchar *str; int ret; guint nth_card; guint i; jack_midiin = AGS_JACK_MIDIIN(sequencer); if(jack_midiin->card_uri == device || !g_ascii_strcasecmp(jack_midiin->card_uri, device)){ return; } if(!g_str_has_prefix(device, "ags-jack-midiin-")){ g_warning("invalid JACK device prefix"); return; } ret = sscanf(device, "ags-jack-midiin-%u", &nth_card); if(ret != 1){ g_warning("invalid JACK device specifier"); return; } if(jack_midiin->card_uri != NULL){ g_free(jack_midiin->card_uri); } jack_midiin->card_uri = g_strdup(device); /* apply name to port */ jack_port_start = jack_port = g_list_copy(jack_midiin->jack_port); str = g_strdup_printf("ags-sequencer%d", nth_card); g_object_set(jack_port->data, "port-name", str, NULL); g_free(str); g_list_free(jack_port_start); } gchar* ags_jack_midiin_get_device(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); return(jack_midiin->card_uri); } void ags_jack_midiin_list_cards(AgsSequencer *sequencer, GList **card_id, GList **card_name) { AgsJackMidiin *jack_midiin; AgsApplicationContext *application_context; GList *list, *list_start; pthread_mutex_t *application_mutex; jack_midiin = AGS_JACK_MIDIIN(sequencer); application_context = (AgsApplicationContext *) jack_midiin->application_context; if(application_context == NULL){ return; } application_mutex = jack_midiin->application_mutex; if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } pthread_mutex_lock(application_mutex); list_start = list = ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(AGS_IS_JACK_MIDIIN(list->data)){ if(card_id != NULL){ *card_id = g_list_prepend(*card_id, g_strdup(AGS_JACK_MIDIIN(list->data)->card_uri)); } if(card_name != NULL){ if(AGS_JACK_MIDIIN(list->data)->jack_client != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(AGS_JACK_CLIENT(AGS_JACK_MIDIIN(list->data)->jack_client)->name)); }else{ *card_name = g_list_prepend(*card_name, g_strdup("(null)")); g_warning("ags_jack_midiin_list_cards() - JACK client not connected (null)"); } } } list = list->next; } pthread_mutex_unlock(application_mutex); if(card_id != NULL && *card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL && *card_name != NULL){ *card_name = g_list_reverse(*card_name); } } gboolean ags_jack_midiin_is_starting(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); return(((AGS_JACK_MIDIIN_START_RECORD & (jack_midiin->flags)) != 0) ? TRUE: FALSE); } gboolean ags_jack_midiin_is_recording(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); return(((AGS_JACK_MIDIIN_RECORD & (jack_midiin->flags)) != 0) ? TRUE: FALSE); } void ags_jack_midiin_port_init(AgsSequencer *sequencer, GError **error) { AgsJackMidiin *jack_midiin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *mutex; jack_midiin = AGS_JACK_MIDIIN(sequencer); application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_midiin); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); /* prepare for record */ jack_midiin->flags |= (AGS_JACK_MIDIIN_BUFFER3 | AGS_JACK_MIDIIN_START_RECORD | AGS_JACK_MIDIIN_RECORD | AGS_JACK_MIDIIN_NONBLOCKING); jack_midiin->note_offset = 0; /* port setup */ //TODO:JK: implement me /* */ jack_midiin->tact_counter = 0.0; jack_midiin->delay_counter = 0.0; jack_midiin->tic_counter = 0; jack_midiin->flags |= (AGS_JACK_MIDIIN_INITIALIZED | AGS_JACK_MIDIIN_START_RECORD | AGS_JACK_MIDIIN_RECORD); g_atomic_int_and(&(jack_midiin->sync_flags), (~(AGS_JACK_MIDIIN_PASS_THROUGH))); g_atomic_int_or(&(jack_midiin->sync_flags), AGS_JACK_MIDIIN_INITIAL_CALLBACK); pthread_mutex_unlock(mutex); } void ags_jack_midiin_port_record(AgsSequencer *sequencer, GError **error) { AgsJackClient *jack_client; AgsJackMidiin *jack_midiin; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; gboolean jack_client_activated; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; pthread_mutex_t *client_mutex; jack_midiin = AGS_JACK_MIDIIN(sequencer); /* */ application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); task_thread = (AgsTaskThread *) application_context->task_thread; mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_midiin); pthread_mutex_unlock(application_context->mutex); /* client */ pthread_mutex_lock(mutex); jack_client = (AgsJackClient *) jack_midiin->jack_client; callback_mutex = jack_midiin->callback_mutex; callback_finish_mutex = jack_midiin->callback_finish_mutex; pthread_mutex_unlock(mutex); /* do record */ pthread_mutex_lock(mutex); jack_midiin->flags &= (~AGS_JACK_MIDIIN_START_RECORD); if((AGS_JACK_MIDIIN_INITIALIZED & (jack_midiin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_context->mutex); client_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_client); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(client_mutex); jack_client_activated = ((AGS_JACK_CLIENT_ACTIVATED & (jack_client->flags)) != 0) ? TRUE: FALSE; pthread_mutex_unlock(client_mutex); if(jack_client_activated){ /* signal client */ if((AGS_JACK_MIDIIN_INITIAL_CALLBACK & (g_atomic_int_get(&(jack_midiin->sync_flags)))) == 0){ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(jack_midiin->sync_flags), AGS_JACK_MIDIIN_CALLBACK_DONE); if((AGS_JACK_MIDIIN_CALLBACK_WAIT & (g_atomic_int_get(&(jack_midiin->sync_flags)))) != 0){ pthread_cond_signal(jack_midiin->callback_cond); } pthread_mutex_unlock(callback_mutex); } /* wait callback */ if((AGS_JACK_MIDIIN_INITIAL_CALLBACK & (g_atomic_int_get(&(jack_midiin->sync_flags)))) == 0){ pthread_mutex_lock(callback_finish_mutex); if((AGS_JACK_MIDIIN_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(jack_midiin->sync_flags)))) == 0){ g_atomic_int_or(&(jack_midiin->sync_flags), AGS_JACK_MIDIIN_CALLBACK_FINISH_WAIT); while((AGS_JACK_MIDIIN_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(jack_midiin->sync_flags)))) == 0 && (AGS_JACK_MIDIIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(jack_midiin->sync_flags)))) != 0){ pthread_cond_wait(jack_midiin->callback_finish_cond, callback_finish_mutex); } } g_atomic_int_and(&(jack_midiin->sync_flags), (~(AGS_JACK_MIDIIN_CALLBACK_FINISH_WAIT | AGS_JACK_MIDIIN_CALLBACK_FINISH_DONE))); pthread_mutex_unlock(callback_finish_mutex); }else{ g_atomic_int_and(&(jack_midiin->sync_flags), (~AGS_JACK_MIDIIN_INITIAL_CALLBACK)); } } if(task_thread != NULL){ AgsTicDevice *tic_device; AgsSwitchBufferFlag *switch_buffer_flag; GList *task; task = NULL; /* tic sequencer */ tic_device = ags_tic_device_new((GObject *) jack_midiin); task = g_list_append(task, tic_device); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) jack_midiin); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); }else{ /* tic */ ags_sequencer_tic(AGS_SEQUENCER(jack_midiin)); /* reset - switch buffer flags */ ags_jack_midiin_switch_buffer_flag(jack_midiin); } } void ags_jack_midiin_port_free(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; jack_midiin = AGS_JACK_MIDIIN(sequencer); jack_midiin = AGS_JACK_MIDIIN(sequencer); application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_midiin); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(mutex); if((AGS_JACK_MIDIIN_INITIALIZED & (jack_midiin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } callback_mutex = jack_midiin->callback_mutex; callback_finish_mutex = jack_midiin->callback_finish_mutex; jack_midiin->flags &= (~(AGS_JACK_MIDIIN_BUFFER0 | AGS_JACK_MIDIIN_BUFFER1 | AGS_JACK_MIDIIN_BUFFER2 | AGS_JACK_MIDIIN_BUFFER3 | AGS_JACK_MIDIIN_RECORD)); g_atomic_int_or(&(jack_midiin->sync_flags), AGS_JACK_MIDIIN_PASS_THROUGH); g_atomic_int_and(&(jack_midiin->sync_flags), (~AGS_JACK_MIDIIN_INITIAL_CALLBACK)); pthread_mutex_unlock(mutex); /* signal callback */ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(jack_midiin->sync_flags), AGS_JACK_MIDIIN_CALLBACK_DONE); if((AGS_JACK_MIDIIN_CALLBACK_WAIT & (g_atomic_int_get(&(jack_midiin->sync_flags)))) != 0){ pthread_cond_signal(jack_midiin->callback_cond); } pthread_mutex_unlock(callback_mutex); /* signal thread */ pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(jack_midiin->sync_flags), AGS_JACK_MIDIIN_CALLBACK_FINISH_DONE); if((AGS_JACK_MIDIIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(jack_midiin->sync_flags)))) != 0){ pthread_cond_signal(jack_midiin->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); /* */ pthread_mutex_lock(mutex); if(jack_midiin->buffer[1] != NULL){ free(jack_midiin->buffer[1]); jack_midiin->buffer_size[1] = 0; } if(jack_midiin->buffer[2] != NULL){ free(jack_midiin->buffer[2]); jack_midiin->buffer_size[2] = 0; } if(jack_midiin->buffer[3] != NULL){ free(jack_midiin->buffer[3]); jack_midiin->buffer_size[3] = 0; } if(jack_midiin->buffer[0] != NULL){ free(jack_midiin->buffer[0]); jack_midiin->buffer_size[0] = 0; } pthread_mutex_unlock(mutex); } void ags_jack_midiin_tic(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; gdouble delay; jack_midiin = AGS_JACK_MIDIIN(sequencer); /* determine if attack should be switched */ delay = jack_midiin->delay; if((guint) jack_midiin->delay_counter + 1 >= (guint) delay){ ags_sequencer_set_note_offset(sequencer, jack_midiin->note_offset_absolute + 1); /* delay */ ags_sequencer_offset_changed(sequencer, jack_midiin->note_offset); /* reset - delay counter */ jack_midiin->delay_counter = 0.0; jack_midiin->tact_counter += 1.0; }else{ jack_midiin->delay_counter += 1.0; } } void ags_jack_midiin_offset_changed(AgsSequencer *sequencer, guint note_offset) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); jack_midiin->tic_counter += 1; if(jack_midiin->tic_counter == AGS_SEQUENCER_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ jack_midiin->tic_counter = 0; } } void ags_jack_midiin_set_bpm(AgsSequencer *sequencer, gdouble bpm) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); jack_midiin->bpm = bpm; } gdouble ags_jack_midiin_get_bpm(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); return(jack_midiin->bpm); } void ags_jack_midiin_set_delay_factor(AgsSequencer *sequencer, gdouble delay_factor) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); jack_midiin->delay_factor = delay_factor; } gdouble ags_jack_midiin_get_delay_factor(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); return(jack_midiin->delay_factor); } void* ags_jack_midiin_get_buffer(AgsSequencer *sequencer, guint *buffer_length) { AgsJackMidiin *jack_midiin; char *buffer; jack_midiin = AGS_JACK_MIDIIN(sequencer); /* get buffer */ if((AGS_JACK_MIDIIN_BUFFER0 & (jack_midiin->flags)) != 0){ buffer = jack_midiin->buffer[0]; }else if((AGS_JACK_MIDIIN_BUFFER1 & (jack_midiin->flags)) != 0){ buffer = jack_midiin->buffer[1]; }else if((AGS_JACK_MIDIIN_BUFFER2 & (jack_midiin->flags)) != 0){ buffer = jack_midiin->buffer[2]; }else if((AGS_JACK_MIDIIN_BUFFER3 & (jack_midiin->flags)) != 0){ buffer = jack_midiin->buffer[3]; }else{ buffer = NULL; } /* return the buffer's length */ if(buffer_length != NULL){ if((AGS_JACK_MIDIIN_BUFFER0 & (jack_midiin->flags)) != 0){ *buffer_length = jack_midiin->buffer_size[0]; }else if((AGS_JACK_MIDIIN_BUFFER1 & (jack_midiin->flags)) != 0){ *buffer_length = jack_midiin->buffer_size[1]; }else if((AGS_JACK_MIDIIN_BUFFER2 & (jack_midiin->flags)) != 0){ *buffer_length = jack_midiin->buffer_size[2]; }else if((AGS_JACK_MIDIIN_BUFFER3 & (jack_midiin->flags)) != 0){ *buffer_length = jack_midiin->buffer_size[3]; }else{ *buffer_length = 0; } } return(buffer); } void* ags_jack_midiin_get_next_buffer(AgsSequencer *sequencer, guint *buffer_length) { AgsJackMidiin *jack_midiin; unsigned char *buffer; jack_midiin = AGS_JACK_MIDIIN(sequencer); /* get buffer */ if((AGS_JACK_MIDIIN_BUFFER0 & (jack_midiin->flags)) != 0){ buffer = jack_midiin->buffer[1]; }else if((AGS_JACK_MIDIIN_BUFFER1 & (jack_midiin->flags)) != 0){ buffer = jack_midiin->buffer[2]; }else if((AGS_JACK_MIDIIN_BUFFER2 & (jack_midiin->flags)) != 0){ buffer = jack_midiin->buffer[3]; }else if((AGS_JACK_MIDIIN_BUFFER3 & (jack_midiin->flags)) != 0){ buffer = jack_midiin->buffer[0]; }else{ buffer = NULL; } /* return the buffer's length */ if(buffer_length != NULL){ if((AGS_JACK_MIDIIN_BUFFER0 & (jack_midiin->flags)) != 0){ *buffer_length = jack_midiin->buffer_size[1]; }else if((AGS_JACK_MIDIIN_BUFFER1 & (jack_midiin->flags)) != 0){ *buffer_length = jack_midiin->buffer_size[2]; }else if((AGS_JACK_MIDIIN_BUFFER2 & (jack_midiin->flags)) != 0){ *buffer_length = jack_midiin->buffer_size[3]; }else if((AGS_JACK_MIDIIN_BUFFER3 & (jack_midiin->flags)) != 0){ *buffer_length = jack_midiin->buffer_size[0]; }else{ *buffer_length = 0; } } return(buffer); } void ags_jack_midiin_set_note_offset(AgsSequencer *sequencer, guint note_offset) { AGS_JACK_MIDIIN(sequencer)->note_offset = note_offset; } guint ags_jack_midiin_get_note_offset(AgsSequencer *sequencer) { return(AGS_JACK_MIDIIN(sequencer)->note_offset); } void ags_jack_midiin_set_audio(AgsSequencer *sequencer, GList *audio) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); jack_midiin->audio = audio; } GList* ags_jack_midiin_get_audio(AgsSequencer *sequencer) { AgsJackMidiin *jack_midiin; jack_midiin = AGS_JACK_MIDIIN(sequencer); return(jack_midiin->audio); } /** * ags_jack_midiin_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsJackMidiin, refering to @application_context. * * Returns: a new #AgsJackMidiin * * Since: 1.0.0 */ AgsJackMidiin* ags_jack_midiin_new(GObject *application_context) { AgsJackMidiin *jack_midiin; jack_midiin = (AgsJackMidiin *) g_object_new(AGS_TYPE_JACK_MIDIIN, "application-context", application_context, NULL); return(jack_midiin); } gsequencer-1.4.24/ags/audio/jack/ags_jack_devin.c0000644000175000017500000020220613247044247016553 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_jack_devin_class_init(AgsJackDevinClass *jack_devin); void ags_jack_devin_connectable_interface_init(AgsConnectableInterface *connectable); void ags_jack_devin_soundcard_interface_init(AgsSoundcardInterface *soundcard); void ags_jack_devin_init(AgsJackDevin *jack_devin); void ags_jack_devin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_jack_devin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_jack_devin_disconnect(AgsConnectable *connectable); void ags_jack_devin_connect(AgsConnectable *connectable); void ags_jack_devin_dispose(GObject *gobject); void ags_jack_devin_finalize(GObject *gobject); void ags_jack_devin_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* ags_jack_devin_get_application_context(AgsSoundcard *soundcard); void ags_jack_devin_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_jack_devin_get_application_mutex(AgsSoundcard *soundcard); void ags_jack_devin_set_device(AgsSoundcard *soundcard, gchar *device); gchar* ags_jack_devin_get_device(AgsSoundcard *soundcard); void ags_jack_devin_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void ags_jack_devin_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void ags_jack_devin_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name); void ags_jack_devin_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); gboolean ags_jack_devin_is_starting(AgsSoundcard *soundcard); gboolean ags_jack_devin_is_recording(AgsSoundcard *soundcard); gchar* ags_jack_devin_get_uptime(AgsSoundcard *soundcard); void ags_jack_devin_port_init(AgsSoundcard *soundcard, GError **error); void ags_jack_devin_port_record(AgsSoundcard *soundcard, GError **error); void ags_jack_devin_port_free(AgsSoundcard *soundcard); void ags_jack_devin_tic(AgsSoundcard *soundcard); void ags_jack_devin_offset_changed(AgsSoundcard *soundcard, guint note_offset); void ags_jack_devin_set_bpm(AgsSoundcard *soundcard, gdouble bpm); gdouble ags_jack_devin_get_bpm(AgsSoundcard *soundcard); void ags_jack_devin_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor); gdouble ags_jack_devin_get_delay_factor(AgsSoundcard *soundcard); gdouble ags_jack_devin_get_absolute_delay(AgsSoundcard *soundcard); gdouble ags_jack_devin_get_delay(AgsSoundcard *soundcard); guint ags_jack_devin_get_attack(AgsSoundcard *soundcard); void* ags_jack_devin_get_buffer(AgsSoundcard *soundcard); void* ags_jack_devin_get_next_buffer(AgsSoundcard *soundcard); void* ags_jack_devin_get_prev_buffer(AgsSoundcard *soundcard); guint ags_jack_devin_get_delay_counter(AgsSoundcard *soundcard); void ags_jack_devin_set_note_offset(AgsSoundcard *soundcard, guint note_offset); guint ags_jack_devin_get_note_offset(AgsSoundcard *soundcard); void ags_jack_devin_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset); guint ags_jack_devin_get_note_offset_absolute(AgsSoundcard *soundcard); void ags_jack_devin_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void ags_jack_devin_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint ags_jack_devin_get_loop_offset(AgsSoundcard *soundcard); void ags_jack_devin_set_audio(AgsSoundcard *soundcard, GList *audio); GList* ags_jack_devin_get_audio(AgsSoundcard *soundcard); /** * SECTION:ags_jack_devin * @short_description: Output to soundcard * @title: AgsJackDevin * @section_id: * @include: ags/audio/jack/ags_jack_devin.h * * #AgsJackDevin represents a soundcard and supports output. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_DSP_CHANNELS, PROP_PCM_CHANNELS, PROP_FORMAT, PROP_BUFFER_SIZE, PROP_SAMPLERATE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, PROP_JACK_CLIENT, PROP_JACK_PORT, PROP_CHANNEL, }; enum{ LAST_SIGNAL, }; static gpointer ags_jack_devin_parent_class = NULL; static guint jack_devin_signals[LAST_SIGNAL]; GType ags_jack_devin_get_type (void) { static GType ags_type_jack_devin = 0; if(!ags_type_jack_devin){ static const GTypeInfo ags_jack_devin_info = { sizeof (AgsJackDevinClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_jack_devin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsJackDevin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_jack_devin_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_jack_devin_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_soundcard_interface_info = { (GInterfaceInitFunc) ags_jack_devin_soundcard_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_jack_devin = g_type_register_static(G_TYPE_OBJECT, "AgsJackDevin", &ags_jack_devin_info, 0); g_type_add_interface_static(ags_type_jack_devin, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_jack_devin, AGS_TYPE_SOUNDCARD, &ags_soundcard_interface_info); } return (ags_type_jack_devin); } void ags_jack_devin_class_init(AgsJackDevinClass *jack_devin) { GObjectClass *gobject; GParamSpec *param_spec; ags_jack_devin_parent_class = g_type_class_peek_parent(jack_devin); /* GObjectClass */ gobject = (GObjectClass *) jack_devin; gobject->set_property = ags_jack_devin_set_property; gobject->get_property = ags_jack_devin_get_property; gobject->dispose = ags_jack_devin_dispose; gobject->finalize = ags_jack_devin_finalize; /* properties */ /** * AgsJackDevin:application-context: * * The assigned #AgsApplicationContext * * Since: 1.2.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsJackDevin:application-mutex: * * The assigned application mutex * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsJackDevin:device: * * The jack soundcard indentifier * * Since: 1.2.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "ags-jack-devin-0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsJackDevin:dsp-channels: * * The dsp channel count * * Since: 1.2.0 */ param_spec = g_param_spec_uint("dsp-channels", i18n_pspec("count of DSP channels"), i18n_pspec("The count of DSP channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DSP_CHANNELS, param_spec); /** * AgsJackDevin:pcm-channels: * * The pcm channel count * * Since: 1.2.0 */ param_spec = g_param_spec_uint("pcm-channels", i18n_pspec("count of PCM channels"), i18n_pspec("The count of PCM channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PCM_CHANNELS, param_spec); /** * AgsJackDevin:format: * * The precision of the buffer * * Since: 1.2.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("precision of buffer"), i18n_pspec("The precision to use for a frame"), 1, 64, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsJackDevin:buffer-size: * * The buffer size * * Since: 1.2.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("frame count of a buffer"), i18n_pspec("The count of frames a buffer contains"), 1, 44100, 940, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsJackDevin:samplerate: * * The samplerate * * Since: 1.2.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("frames per second"), i18n_pspec("The frames count recorded during a second"), 8000, 96000, 44100, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsJackDevin:buffer: * * The buffer * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to record"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsJackDevin:bpm: * * Beats per minute * * Since: 1.2.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsJackDevin:delay-factor: * * tact * * Since: 1.2.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsJackDevin:attack: * * Attack of the buffer * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsJackDevin:jack-client: * * The assigned #AgsJackClient * * Since: 1.2.0 */ param_spec = g_param_spec_object("jack-client", i18n_pspec("jack client object"), i18n_pspec("The jack client object"), AGS_TYPE_JACK_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_JACK_CLIENT, param_spec); /** * AgsJackDevin:jack-port: * * The assigned #AgsJackPort * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("jack-port", i18n_pspec("jack port object"), i18n_pspec("The jack port object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_JACK_PORT, param_spec); /** * AgsJackDevin:channel: * * The assigned #AgsChannel * * Since: 1.2.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel"), i18n_pspec("The mapped channel"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); } GQuark ags_jack_devin_error_quark() { return(g_quark_from_static_string("ags-jack_devin-error-quark")); } void ags_jack_devin_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_jack_devin_connect; connectable->disconnect = ags_jack_devin_disconnect; } void ags_jack_devin_soundcard_interface_init(AgsSoundcardInterface *soundcard) { soundcard->set_application_context = ags_jack_devin_set_application_context; soundcard->get_application_context = ags_jack_devin_get_application_context; soundcard->set_application_mutex = ags_jack_devin_set_application_mutex; soundcard->get_application_mutex = ags_jack_devin_get_application_mutex; soundcard->set_device = ags_jack_devin_set_device; soundcard->get_device = ags_jack_devin_get_device; soundcard->set_presets = ags_jack_devin_set_presets; soundcard->get_presets = ags_jack_devin_get_presets; soundcard->list_cards = ags_jack_devin_list_cards; soundcard->pcm_info = ags_jack_devin_pcm_info; soundcard->get_poll_fd = NULL; soundcard->is_available = NULL; soundcard->is_starting = ags_jack_devin_is_starting; soundcard->is_recording = ags_jack_devin_is_recording; soundcard->is_recording = NULL; soundcard->get_uptime = ags_jack_devin_get_uptime; soundcard->record_init = ags_jack_devin_port_init; soundcard->record = ags_jack_devin_port_record; soundcard->record_init = NULL; soundcard->record = NULL; soundcard->stop = ags_jack_devin_port_free; soundcard->tic = ags_jack_devin_tic; soundcard->offset_changed = ags_jack_devin_offset_changed; soundcard->set_bpm = ags_jack_devin_set_bpm; soundcard->get_bpm = ags_jack_devin_get_bpm; soundcard->set_delay_factor = ags_jack_devin_set_delay_factor; soundcard->get_delay_factor = ags_jack_devin_get_delay_factor; soundcard->get_absolute_delay = ags_jack_devin_get_absolute_delay; soundcard->get_delay = ags_jack_devin_get_delay; soundcard->get_attack = ags_jack_devin_get_attack; soundcard->get_buffer = ags_jack_devin_get_buffer; soundcard->get_next_buffer = ags_jack_devin_get_next_buffer; soundcard->get_prev_buffer = ags_jack_devin_get_prev_buffer; soundcard->get_delay_counter = ags_jack_devin_get_delay_counter; soundcard->set_note_offset = ags_jack_devin_set_note_offset; soundcard->get_note_offset = ags_jack_devin_get_note_offset; soundcard->set_note_offset_absolute = ags_jack_devin_set_note_offset_absolute; soundcard->get_note_offset_absolute = ags_jack_devin_get_note_offset_absolute; soundcard->set_loop = ags_jack_devin_set_loop; soundcard->get_loop = ags_jack_devin_get_loop; soundcard->get_loop_offset = ags_jack_devin_get_loop_offset; soundcard->set_audio = ags_jack_devin_set_audio; soundcard->get_audio = ags_jack_devin_get_audio; } void ags_jack_devin_init(AgsJackDevin *jack_devin) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert devin mutex */ jack_devin->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); jack_devin->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) jack_devin, mutex); pthread_mutex_unlock(application_mutex); /* flags */ jack_devin->flags = 0; g_atomic_int_set(&(jack_devin->sync_flags), AGS_JACK_DEVIN_PASS_THROUGH); /* quality */ config = ags_config_get_instance(); jack_devin->dsp_channels = AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS; jack_devin->pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; jack_devin->format = AGS_SOUNDCARD_DEFAULT_FORMAT; jack_devin->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; jack_devin->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; /* read config */ /* dsp channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "dsp-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "dsp-channels"); } if(str != NULL){ jack_devin->dsp_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ jack_devin->pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ jack_devin->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ jack_devin->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ jack_devin->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* */ jack_devin->card_uri = NULL; jack_devin->jack_client = NULL; jack_devin->port_name = NULL; jack_devin->jack_port = NULL; /* buffer */ jack_devin->buffer = (void **) malloc(4 * sizeof(void*)); jack_devin->buffer[0] = (void *) malloc(jack_devin->pcm_channels * jack_devin->buffer_size * sizeof(signed short)); jack_devin->buffer[1] = (void *) malloc(jack_devin->pcm_channels * jack_devin->buffer_size * sizeof(signed short)); jack_devin->buffer[2] = (void *) malloc(jack_devin->pcm_channels * jack_devin->buffer_size * sizeof(signed short)); jack_devin->buffer[3] = (void *) malloc(jack_devin->pcm_channels * jack_devin->buffer_size * sizeof(signed short)); ags_jack_devin_realloc_buffer(jack_devin); /* bpm */ jack_devin->bpm = AGS_SOUNDCARD_DEFAULT_BPM; /* delay factor */ jack_devin->delay_factor = AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR; /* delay and attack */ jack_devin->delay = (gdouble *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(gdouble)); jack_devin->attack = (guint *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(guint)); ags_jack_devin_adjust_delay_and_attack(jack_devin); /* counters */ jack_devin->tact_counter = 0.0; jack_devin->delay_counter = 0; jack_devin->tic_counter = 0; jack_devin->note_offset = 0; jack_devin->note_offset_absolute = 0; jack_devin->loop_left = AGS_SOUNDCARD_DEFAULT_LOOP_LEFT; jack_devin->loop_right = AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT; jack_devin->do_loop = FALSE; jack_devin->loop_offset = 0; /* callback mutex */ jack_devin->callback_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(jack_devin->callback_mutex, NULL); jack_devin->callback_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(jack_devin->callback_cond, NULL); /* callback finish mutex */ jack_devin->callback_finish_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(jack_devin->callback_finish_mutex, NULL); jack_devin->callback_finish_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(jack_devin->callback_finish_cond, NULL); /* parent */ jack_devin->application_context = NULL; jack_devin->application_mutex = NULL; /* */ jack_devin->notify_soundcard = NULL; /* all AgsAudio */ jack_devin->audio = NULL; } void ags_jack_devin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(jack_devin->application_context == (GObject *) application_context){ return; } if(jack_devin->application_context != NULL){ g_object_unref(G_OBJECT(jack_devin->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *segmentation; guint denumerator, numerator; g_object_ref(G_OBJECT(application_context)); jack_devin->application_mutex = application_context->mutex; config = ags_config_get_instance(); /* segmentation */ segmentation = ags_config_get_value(config, AGS_CONFIG_GENERIC, "segmentation"); if(segmentation != NULL){ sscanf(segmentation, "%d/%d", &denumerator, &numerator); jack_devin->delay_factor = 1.0 / numerator * (numerator / denumerator); } ags_jack_devin_adjust_delay_and_attack(jack_devin); ags_jack_devin_realloc_buffer(jack_devin); }else{ jack_devin->application_mutex = NULL; } jack_devin->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(jack_devin->application_mutex == application_mutex){ return; } jack_devin->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); jack_devin->card_uri = g_strdup(device); } break; case PROP_DSP_CHANNELS: { guint dsp_channels; dsp_channels = g_value_get_uint(value); if(dsp_channels == jack_devin->dsp_channels){ return; } jack_devin->dsp_channels = dsp_channels; } break; case PROP_PCM_CHANNELS: { guint pcm_channels; pcm_channels = g_value_get_uint(value); if(pcm_channels == jack_devin->pcm_channels){ return; } jack_devin->pcm_channels = pcm_channels; ags_jack_devin_realloc_buffer(jack_devin); } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); if(format == jack_devin->format){ return; } jack_devin->format = format; ags_jack_devin_realloc_buffer(jack_devin); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); if(buffer_size == jack_devin->buffer_size){ return; } jack_devin->buffer_size = buffer_size; ags_jack_devin_realloc_buffer(jack_devin); ags_jack_devin_adjust_delay_and_attack(jack_devin); } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); if(samplerate == jack_devin->samplerate){ return; } jack_devin->samplerate = samplerate; ags_jack_devin_realloc_buffer(jack_devin); ags_jack_devin_adjust_delay_and_attack(jack_devin); } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); jack_devin->bpm = bpm; ags_jack_devin_adjust_delay_and_attack(jack_devin); } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); jack_devin->delay_factor = delay_factor; ags_jack_devin_adjust_delay_and_attack(jack_devin); } break; case PROP_JACK_CLIENT: { AgsJackClient *jack_client; jack_client = (AgsJackClient *) g_value_get_object(value); if(jack_devin->jack_client == (GObject *) jack_client){ return; } if(jack_devin->jack_client != NULL){ g_object_unref(G_OBJECT(jack_devin->jack_client)); } if(jack_client != NULL){ g_object_ref(jack_client); } jack_devin->jack_client = (GObject *) jack_client; } break; case PROP_JACK_PORT: { AgsJackPort *jack_port; jack_port = (AgsJackPort *) g_value_get_pointer(value); if(!AGS_IS_JACK_PORT(jack_port) || g_list_find(jack_devin->jack_port, jack_port) != NULL){ return; } if(jack_port != NULL){ g_object_ref(jack_port); jack_devin->jack_port = g_list_append(jack_devin->jack_port, jack_port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_devin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, jack_devin->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, jack_devin->application_mutex); } break; case PROP_DEVICE: { g_value_set_string(value, jack_devin->card_uri); } break; case PROP_DSP_CHANNELS: { g_value_set_uint(value, jack_devin->dsp_channels); } break; case PROP_PCM_CHANNELS: { g_value_set_uint(value, jack_devin->pcm_channels); } break; case PROP_FORMAT: { g_value_set_uint(value, jack_devin->format); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, jack_devin->buffer_size); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, jack_devin->samplerate); } break; case PROP_BUFFER: { g_value_set_pointer(value, jack_devin->buffer); } break; case PROP_BPM: { g_value_set_double(value, jack_devin->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, jack_devin->delay_factor); } break; case PROP_ATTACK: { g_value_set_pointer(value, jack_devin->attack); } break; case PROP_JACK_CLIENT: { g_value_set_object(value, jack_devin->jack_client); } break; case PROP_JACK_PORT: { g_value_set_pointer(value, g_list_copy(jack_devin->jack_port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_devin_dispose(GObject *gobject) { AgsJackDevin *jack_devin; GList *list; jack_devin = AGS_JACK_DEVIN(gobject); /* application context */ if(jack_devin->application_context != NULL){ g_object_unref(jack_devin->application_context); jack_devin->application_context = NULL; } /* unref audio */ if(jack_devin->audio != NULL){ list = jack_devin->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(jack_devin->audio, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_jack_devin_parent_class)->dispose(gobject); } void ags_jack_devin_finalize(GObject *gobject) { AgsJackDevin *jack_devin; AgsMutexManager *mutex_manager; GList *list, *list_next; jack_devin = AGS_JACK_DEVIN(gobject); /* remove jack_devin mutex */ pthread_mutex_lock(jack_devin->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(jack_devin->application_mutex); /* free output buffer */ free(jack_devin->buffer[0]); free(jack_devin->buffer[1]); free(jack_devin->buffer[2]); free(jack_devin->buffer[3]); /* free buffer array */ free(jack_devin->buffer); /* free AgsAttack */ free(jack_devin->attack); /* unref notify soundcard */ if(jack_devin->notify_soundcard != NULL){ if(jack_devin->application_context != NULL){ ags_task_thread_remove_cyclic_task(AGS_APPLICATION_CONTEXT(jack_devin->application_context)->task_thread, jack_devin->notify_soundcard); } g_object_unref(jack_devin->notify_soundcard); } /* application context */ if(jack_devin->application_context != NULL){ g_object_unref(jack_devin->application_context); } /* unref audio */ if(jack_devin->audio != NULL){ list = jack_devin->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(jack_devin->audio, g_object_unref); } pthread_mutex_destroy(jack_devin->mutex); free(jack_devin->mutex); pthread_mutexattr_destroy(jack_devin->mutexattr); free(jack_devin->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_jack_devin_parent_class)->finalize(gobject); } void ags_jack_devin_connect(AgsConnectable *connectable) { AgsJackDevin *jack_devin; GList *list; jack_devin = AGS_JACK_DEVIN(connectable); /* */ list = jack_devin->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_jack_devin_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_jack_devin_switch_buffer_flag: * @jack_devin: an #AgsJackDevin * * The buffer flag indicates the currently recorded buffer. * * Since: 1.2.0 */ void ags_jack_devin_switch_buffer_flag(AgsJackDevin *jack_devin) { if((AGS_JACK_DEVIN_BUFFER0 & (jack_devin->flags)) != 0){ jack_devin->flags &= (~AGS_JACK_DEVIN_BUFFER0); jack_devin->flags |= AGS_JACK_DEVIN_BUFFER1; }else if((AGS_JACK_DEVIN_BUFFER1 & (jack_devin->flags)) != 0){ jack_devin->flags &= (~AGS_JACK_DEVIN_BUFFER1); jack_devin->flags |= AGS_JACK_DEVIN_BUFFER2; }else if((AGS_JACK_DEVIN_BUFFER2 & (jack_devin->flags)) != 0){ jack_devin->flags &= (~AGS_JACK_DEVIN_BUFFER2); jack_devin->flags |= AGS_JACK_DEVIN_BUFFER3; }else if((AGS_JACK_DEVIN_BUFFER3 & (jack_devin->flags)) != 0){ jack_devin->flags &= (~AGS_JACK_DEVIN_BUFFER3); jack_devin->flags |= AGS_JACK_DEVIN_BUFFER0; } } void ags_jack_devin_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); jack_devin->application_context = (GObject *) application_context; } AgsApplicationContext* ags_jack_devin_get_application_context(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); return((AgsApplicationContext *) jack_devin->application_context); } void ags_jack_devin_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); jack_devin->application_mutex = application_mutex; } pthread_mutex_t* ags_jack_devin_get_application_mutex(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); return(jack_devin->application_mutex); } void ags_jack_devin_set_device(AgsSoundcard *soundcard, gchar *device) { AgsJackDevin *jack_devin; GList *jack_port, *jack_port_start; gchar *str; int ret; guint nth_card; guint i; jack_devin = AGS_JACK_DEVIN(soundcard); if(jack_devin->card_uri == device || !g_ascii_strcasecmp(jack_devin->card_uri, device)){ return; } if(!g_str_has_prefix(device, "ags-jack-devin-")){ g_warning("invalid JACK device prefix"); return; } ret = sscanf(device, "ags-jack-devin-%u", &nth_card); if(ret != 1){ g_warning("invalid JACK device specifier"); return; } if(jack_devin->card_uri != NULL){ g_free(jack_devin->card_uri); } jack_devin->card_uri = g_strdup(device); /* apply name to port */ jack_port_start = jack_port = g_list_copy(jack_devin->jack_port); for(i = 0; i < jack_devin->pcm_channels; i++){ str = g_strdup_printf("ags-soundcard%d-%04d", nth_card, i); g_object_set(jack_port->data, "port-name", str, NULL); g_free(str); jack_port = jack_port->next; } g_list_free(jack_port_start); } gchar* ags_jack_devin_get_device(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); return(jack_devin->card_uri); } void ags_jack_devin_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); g_object_set(jack_devin, "pcm-channels", channels, "samplerate", rate, "buffer-size", buffer_size, "format", format, NULL); } void ags_jack_devin_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); if(channels != NULL){ *channels = jack_devin->pcm_channels; } if(rate != NULL){ *rate = jack_devin->samplerate; } if(buffer_size != NULL){ *buffer_size = jack_devin->buffer_size; } if(format != NULL){ *format = jack_devin->format; } } /** * ags_jack_devin_list_cards: * @soundcard: the #AgsSoundcard * @card_id: JACK identifier * @card_name: card name * * List available soundcards. * * Since: 1.2.0 */ void ags_jack_devin_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name) { AgsJackDevin *jack_devin; AgsApplicationContext *application_context; GList *list, *list_start; pthread_mutex_t *application_mutex; jack_devin = AGS_JACK_DEVIN(soundcard); application_context = (AgsApplicationContext *) jack_devin->application_context; if(application_context == NULL){ return; } application_mutex = jack_devin->application_mutex; if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(AGS_IS_JACK_DEVIN(list->data)){ if(card_id != NULL){ if(AGS_JACK_DEVIN(list->data)->card_uri != NULL){ *card_id = g_list_prepend(*card_id, g_strdup(AGS_JACK_DEVIN(list->data)->card_uri)); }else{ *card_id = g_list_prepend(*card_id, g_strdup("(null)")); g_warning("ags_jack_devin_list_cards() - card id (null)"); } } if(card_name != NULL){ if(AGS_JACK_DEVIN(list->data)->jack_client != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(AGS_JACK_CLIENT(AGS_JACK_DEVIN(list->data)->jack_client)->name)); }else{ *card_name = g_list_prepend(*card_name, g_strdup("(null)")); g_warning("ags_jack_devin_list_cards() - JACK client not connected (null)"); } } } list = list->next; } pthread_mutex_unlock(application_mutex); if(card_id != NULL && *card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL && *card_name != NULL){ *card_name = g_list_reverse(*card_name); } } void ags_jack_devin_pcm_info(AgsSoundcard *soundcard, char *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error) { if(channels_min != NULL){ *channels_min = 1; } if(channels_max != NULL){ *channels_max = 1024; } if(rate_min != NULL){ *rate_min = 8000; } if(rate_max != NULL){ *rate_max = 192000; } if(buffer_size_min != NULL){ *buffer_size_min = 64; } if(buffer_size_max != NULL){ *buffer_size_max = 8192; } } gboolean ags_jack_devin_is_starting(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); return((((AGS_JACK_DEVIN_START_RECORD & (jack_devin->flags)) != 0) ? TRUE: FALSE)); } gboolean ags_jack_devin_is_recording(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); return((((AGS_JACK_DEVIN_RECORD & (jack_devin->flags)) != 0) ? TRUE: FALSE)); } gchar* ags_jack_devin_get_uptime(AgsSoundcard *soundcard) { gchar *uptime; if(ags_soundcard_is_recording(soundcard)){ guint samplerate; guint buffer_size; guint note_offset; gdouble bpm; gdouble delay_factor; gdouble delay; ags_soundcard_get_presets(soundcard, NULL, &samplerate, &buffer_size, NULL); note_offset = ags_soundcard_get_note_offset_absolute(soundcard); bpm = ags_soundcard_get_bpm(soundcard); delay_factor = ags_soundcard_get_delay_factor(soundcard); /* calculate delays */ delay = ags_soundcard_get_absolute_delay(soundcard); uptime = ags_time_get_uptime_from_offset(note_offset, bpm, delay, delay_factor); }else{ uptime = g_strdup(AGS_TIME_ZERO); } return(uptime); } void ags_jack_devin_port_init(AgsSoundcard *soundcard, GError **error) { AgsJackDevin *jack_devin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint format, word_size; pthread_mutex_t *mutex; jack_devin = AGS_JACK_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_devin); pthread_mutex_unlock(application_context->mutex); /* retrieve word size */ pthread_mutex_lock(mutex); switch(jack_devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_jack_devin_port_init(): unsupported word size"); return; } /* prepare for capture */ jack_devin->flags |= (AGS_JACK_DEVIN_BUFFER3 | AGS_JACK_DEVIN_START_RECORD | AGS_JACK_DEVIN_RECORD | AGS_JACK_DEVIN_NONBLOCKING); memset(jack_devin->buffer[0], 0, jack_devin->pcm_channels * jack_devin->buffer_size * word_size); memset(jack_devin->buffer[1], 0, jack_devin->pcm_channels * jack_devin->buffer_size * word_size); memset(jack_devin->buffer[2], 0, jack_devin->pcm_channels * jack_devin->buffer_size * word_size); memset(jack_devin->buffer[3], 0, jack_devin->pcm_channels * jack_devin->buffer_size * word_size); /* */ jack_devin->tact_counter = 0.0; jack_devin->delay_counter = 0.0; jack_devin->tic_counter = 0; jack_devin->flags |= (AGS_JACK_DEVIN_INITIALIZED | AGS_JACK_DEVIN_START_RECORD | AGS_JACK_DEVIN_RECORD); g_atomic_int_and(&(jack_devin->sync_flags), (~(AGS_JACK_DEVIN_PASS_THROUGH))); g_atomic_int_or(&(jack_devin->sync_flags), AGS_JACK_DEVIN_INITIAL_CALLBACK); pthread_mutex_unlock(mutex); } void ags_jack_devin_port_record(AgsSoundcard *soundcard, GError **error) { AgsJackClient *jack_client; AgsJackDevin *jack_devin; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; guint word_size; gboolean jack_client_activated; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; pthread_mutex_t *client_mutex; jack_devin = AGS_JACK_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* mutices */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); task_thread = (AgsTaskThread *) application_context->task_thread; mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_devin); pthread_mutex_unlock(application_context->mutex); /* client */ pthread_mutex_lock(mutex); jack_client = (AgsJackClient *) jack_devin->jack_client; callback_mutex = jack_devin->callback_mutex; callback_finish_mutex = jack_devin->callback_finish_mutex; pthread_mutex_unlock(mutex); /* do capture */ pthread_mutex_lock(mutex); jack_devin->flags &= (~AGS_JACK_DEVIN_START_RECORD); notify_soundcard = AGS_NOTIFY_SOUNDCARD(jack_devin->notify_soundcard); if((AGS_JACK_DEVIN_INITIALIZED & (jack_devin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } switch(jack_devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_jack_devin_port_record(): unsupported word size"); return; } pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_context->mutex); client_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_client); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(client_mutex); jack_client_activated = ((AGS_JACK_CLIENT_ACTIVATED & (jack_client->flags)) != 0) ? TRUE: FALSE; pthread_mutex_unlock(client_mutex); if(jack_client_activated){ /* signal */ if((AGS_JACK_DEVIN_INITIAL_CALLBACK & (g_atomic_int_get(&(jack_devin->sync_flags)))) == 0){ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(jack_devin->sync_flags), AGS_JACK_DEVIN_CALLBACK_DONE); if((AGS_JACK_DEVIN_CALLBACK_WAIT & (g_atomic_int_get(&(jack_devin->sync_flags)))) != 0){ pthread_cond_signal(jack_devin->callback_cond); } pthread_mutex_unlock(callback_mutex); } /* wait callback */ if((AGS_JACK_DEVIN_INITIAL_CALLBACK & (g_atomic_int_get(&(jack_devin->sync_flags)))) == 0){ pthread_mutex_lock(callback_finish_mutex); if((AGS_JACK_DEVIN_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(jack_devin->sync_flags)))) == 0){ g_atomic_int_or(&(jack_devin->sync_flags), AGS_JACK_DEVIN_CALLBACK_FINISH_WAIT); while((AGS_JACK_DEVIN_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(jack_devin->sync_flags)))) == 0 && (AGS_JACK_DEVIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(jack_devin->sync_flags)))) != 0){ pthread_cond_wait(jack_devin->callback_finish_cond, callback_finish_mutex); } } g_atomic_int_and(&(jack_devin->sync_flags), (~(AGS_JACK_DEVIN_CALLBACK_FINISH_WAIT | AGS_JACK_DEVIN_CALLBACK_FINISH_DONE))); pthread_mutex_unlock(callback_finish_mutex); }else{ g_atomic_int_and(&(jack_devin->sync_flags), (~AGS_JACK_DEVIN_INITIAL_CALLBACK)); } } /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); if(task_thread != NULL){ AgsTicDevice *tic_device; AgsClearBuffer *clear_buffer; AgsSwitchBufferFlag *switch_buffer_flag; GList *task; task = NULL; /* tic soundcard */ tic_device = ags_tic_device_new((GObject *) jack_devin); task = g_list_append(task, tic_device); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) jack_devin); task = g_list_append(task, clear_buffer); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) jack_devin); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); }else{ guint nth_buffer; guint word_size; /* tic */ ags_soundcard_tic(AGS_SOUNDCARD(jack_devin)); switch(jack_devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_jack_devin_port_record(): unsupported word size"); return; } /* reset - clear buffer */ if((AGS_JACK_DEVIN_BUFFER0 & (jack_devin->flags)) != 0){ nth_buffer = 3; }else if((AGS_JACK_DEVIN_BUFFER1 & (jack_devin->flags)) != 0){ nth_buffer = 0; }else if((AGS_JACK_DEVIN_BUFFER2 & (jack_devin->flags)) != 0){ nth_buffer = 1; }else if((AGS_JACK_DEVIN_BUFFER3 & (jack_devin->flags)) != 0){ nth_buffer = 2; } memset(jack_devin->buffer[nth_buffer], 0, (size_t) jack_devin->pcm_channels * jack_devin->buffer_size * word_size); /* reset - switch buffer flags */ ags_jack_devin_switch_buffer_flag(jack_devin); } } void ags_jack_devin_port_free(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint word_size; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; jack_devin = AGS_JACK_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_devin); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); notify_soundcard = AGS_NOTIFY_SOUNDCARD(jack_devin->notify_soundcard); if((AGS_JACK_DEVIN_INITIALIZED & (jack_devin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } g_object_ref(notify_soundcard); // g_atomic_int_or(&(AGS_THREAD(application_context->main_loop)->flags), // AGS_THREAD_TIMING); callback_mutex = jack_devin->callback_mutex; callback_finish_mutex = jack_devin->callback_finish_mutex; jack_devin->flags &= (~(AGS_JACK_DEVIN_BUFFER0 | AGS_JACK_DEVIN_BUFFER1 | AGS_JACK_DEVIN_BUFFER2 | AGS_JACK_DEVIN_BUFFER3 | AGS_JACK_DEVIN_RECORD)); g_atomic_int_or(&(jack_devin->sync_flags), AGS_JACK_DEVIN_PASS_THROUGH); g_atomic_int_and(&(jack_devin->sync_flags), (~AGS_JACK_DEVIN_INITIAL_CALLBACK)); /* signal callback */ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(jack_devin->sync_flags), AGS_JACK_DEVIN_CALLBACK_DONE); if((AGS_JACK_DEVIN_CALLBACK_WAIT & (g_atomic_int_get(&(jack_devin->sync_flags)))) != 0){ pthread_cond_signal(jack_devin->callback_cond); } pthread_mutex_unlock(callback_mutex); /* signal thread */ pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(jack_devin->sync_flags), AGS_JACK_DEVIN_CALLBACK_FINISH_DONE); if((AGS_JACK_DEVIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(jack_devin->sync_flags)))) != 0){ pthread_cond_signal(jack_devin->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); g_object_unref(notify_soundcard); /* */ jack_devin->note_offset = 0; jack_devin->note_offset_absolute = 0; switch(jack_devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: word_size = 0; g_critical("ags_jack_devin_free(): unsupported word size"); } memset(jack_devin->buffer[1], 0, (size_t) jack_devin->pcm_channels * jack_devin->buffer_size * word_size); memset(jack_devin->buffer[2], 0, (size_t) jack_devin->pcm_channels * jack_devin->buffer_size * word_size); memset(jack_devin->buffer[3], 0, (size_t) jack_devin->pcm_channels * jack_devin->buffer_size * word_size); memset(jack_devin->buffer[0], 0, (size_t) jack_devin->pcm_channels * jack_devin->buffer_size * word_size); pthread_mutex_unlock(mutex); } void ags_jack_devin_tic(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; gdouble delay; jack_devin = AGS_JACK_DEVIN(soundcard); /* determine if attack should be switched */ delay = jack_devin->delay[jack_devin->tic_counter]; if((guint) jack_devin->delay_counter + 1 >= (guint) delay){ if(jack_devin->do_loop && jack_devin->note_offset + 1 == jack_devin->loop_right){ ags_soundcard_set_note_offset(soundcard, jack_devin->loop_left); }else{ ags_soundcard_set_note_offset(soundcard, jack_devin->note_offset + 1); } ags_soundcard_set_note_offset_absolute(soundcard, jack_devin->note_offset_absolute + 1); /* delay */ ags_soundcard_offset_changed(soundcard, jack_devin->note_offset); /* reset - delay counter */ jack_devin->delay_counter = 0.0; jack_devin->tact_counter += 1.0; }else{ jack_devin->delay_counter += 1.0; } } void ags_jack_devin_offset_changed(AgsSoundcard *soundcard, guint note_offset) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); jack_devin->tic_counter += 1; if(jack_devin->tic_counter == AGS_SOUNDCARD_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ jack_devin->tic_counter = 0; } } void ags_jack_devin_set_bpm(AgsSoundcard *soundcard, gdouble bpm) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); jack_devin->bpm = bpm; ags_jack_devin_adjust_delay_and_attack(jack_devin); } gdouble ags_jack_devin_get_bpm(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); return(jack_devin->bpm); } void ags_jack_devin_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); jack_devin->delay_factor = delay_factor; ags_jack_devin_adjust_delay_and_attack(jack_devin); } gdouble ags_jack_devin_get_delay_factor(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); return(jack_devin->delay_factor); } gdouble ags_jack_devin_get_absolute_delay(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); return((60.0 * (((gdouble) jack_devin->samplerate / (gdouble) jack_devin->buffer_size) / (gdouble) jack_devin->bpm) * ((1.0 / 16.0) * (1.0 / (gdouble) jack_devin->delay_factor)))); } gdouble ags_jack_devin_get_delay(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; guint index; jack_devin = AGS_JACK_DEVIN(soundcard); index = jack_devin->tic_counter; return(jack_devin->delay[index]); } guint ags_jack_devin_get_attack(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; guint index; jack_devin = AGS_JACK_DEVIN(soundcard); index = jack_devin->tic_counter; return(jack_devin->attack[index]); } void* ags_jack_devin_get_buffer(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; void *buffer; jack_devin = AGS_JACK_DEVIN(soundcard); if((AGS_JACK_DEVIN_BUFFER0 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[0]; }else if((AGS_JACK_DEVIN_BUFFER1 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[1]; }else if((AGS_JACK_DEVIN_BUFFER2 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[2]; }else if((AGS_JACK_DEVIN_BUFFER3 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[3]; }else{ buffer = NULL; } return(buffer); } void* ags_jack_devin_get_next_buffer(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; void *buffer; jack_devin = AGS_JACK_DEVIN(soundcard); if((AGS_JACK_DEVIN_BUFFER0 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[1]; }else if((AGS_JACK_DEVIN_BUFFER1 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[2]; }else if((AGS_JACK_DEVIN_BUFFER2 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[3]; }else if((AGS_JACK_DEVIN_BUFFER3 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[0]; }else{ buffer = NULL; } return(buffer); } void* ags_jack_devin_get_prev_buffer(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; void *buffer; jack_devin = AGS_JACK_DEVIN(soundcard); if((AGS_JACK_DEVIN_BUFFER0 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[3]; }else if((AGS_JACK_DEVIN_BUFFER1 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[0]; }else if((AGS_JACK_DEVIN_BUFFER2 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[1]; }else if((AGS_JACK_DEVIN_BUFFER3 & (jack_devin->flags)) != 0){ buffer = jack_devin->buffer[2]; }else{ buffer = NULL; } return(buffer); } guint ags_jack_devin_get_delay_counter(AgsSoundcard *soundcard) { return(AGS_JACK_DEVIN(soundcard)->delay_counter); } void ags_jack_devin_set_note_offset(AgsSoundcard *soundcard, guint note_offset) { AGS_JACK_DEVIN(soundcard)->note_offset = note_offset; } guint ags_jack_devin_get_note_offset(AgsSoundcard *soundcard) { return(AGS_JACK_DEVIN(soundcard)->note_offset); } void ags_jack_devin_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset) { AGS_JACK_DEVIN(soundcard)->note_offset_absolute = note_offset; } guint ags_jack_devin_get_note_offset_absolute(AgsSoundcard *soundcard) { return(AGS_JACK_DEVIN(soundcard)->note_offset_absolute); } void ags_jack_devin_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop) { AGS_JACK_DEVIN(soundcard)->loop_left = loop_left; AGS_JACK_DEVIN(soundcard)->loop_right = loop_right; AGS_JACK_DEVIN(soundcard)->do_loop = do_loop; if(do_loop){ AGS_JACK_DEVIN(soundcard)->loop_offset = AGS_JACK_DEVIN(soundcard)->note_offset; } } void ags_jack_devin_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop) { if(loop_left != NULL){ *loop_left = AGS_JACK_DEVIN(soundcard)->loop_left; } if(loop_right != NULL){ *loop_right = AGS_JACK_DEVIN(soundcard)->loop_right; } if(do_loop != NULL){ *do_loop = AGS_JACK_DEVIN(soundcard)->do_loop; } } guint ags_jack_devin_get_loop_offset(AgsSoundcard *soundcard) { return(AGS_JACK_DEVIN(soundcard)->loop_offset); } void ags_jack_devin_set_audio(AgsSoundcard *soundcard, GList *audio) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); jack_devin->audio = audio; } GList* ags_jack_devin_get_audio(AgsSoundcard *soundcard) { AgsJackDevin *jack_devin; jack_devin = AGS_JACK_DEVIN(soundcard); return(jack_devin->audio); } /** * ags_jack_devin_adjust_delay_and_attack: * @jack_devin: the #AgsJackDevin * * Calculate delay and attack and reset it. * * Since: 1.2.0 */ void ags_jack_devin_adjust_delay_and_attack(AgsJackDevin *jack_devin) { gdouble delay; guint default_tact_frames; guint delay_tact_frames; guint default_period; gint next_attack; guint i; if(jack_devin == NULL){ return; } delay = ags_jack_devin_get_absolute_delay(AGS_SOUNDCARD(jack_devin)); #ifdef AGS_DEBUG g_message("delay : %f", delay); #endif default_tact_frames = (guint) (delay * jack_devin->buffer_size); delay_tact_frames = (guint) (floor(delay) * jack_devin->buffer_size); default_period = (1.0 / AGS_SOUNDCARD_DEFAULT_PERIOD) * (default_tact_frames); i = 0; jack_devin->attack[0] = (guint) floor(0.25 * jack_devin->buffer_size); next_attack = (((jack_devin->attack[i] + default_tact_frames) / jack_devin->buffer_size) - delay) * jack_devin->buffer_size; if(next_attack >= jack_devin->buffer_size){ next_attack = jack_devin->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ jack_devin->attack[i] = jack_devin->attack[i] - ((gdouble) next_attack / 2.0); if(jack_devin->attack[i] < 0){ jack_devin->attack[i] = 0; } if(jack_devin->attack[i] >= jack_devin->buffer_size){ jack_devin->attack[i] = jack_devin->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= jack_devin->buffer_size){ next_attack = jack_devin->buffer_size - 1; } } for(i = 1; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD; i++){ jack_devin->attack[i] = next_attack; next_attack = (((jack_devin->attack[i] + default_tact_frames) / jack_devin->buffer_size) - delay) * jack_devin->buffer_size; if(next_attack >= jack_devin->buffer_size){ next_attack = jack_devin->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ jack_devin->attack[i] = jack_devin->attack[i] - ((gdouble) next_attack / 2.0); if(jack_devin->attack[i] < 0){ jack_devin->attack[i] = 0; } if(jack_devin->attack[i] >= jack_devin->buffer_size){ jack_devin->attack[i] = jack_devin->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= jack_devin->buffer_size){ next_attack = jack_devin->buffer_size - 1; } } #ifdef AGS_DEBUG g_message("%d", jack_devin->attack[i]); #endif } jack_devin->attack[0] = jack_devin->attack[i - 2]; for(i = 0; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD - 1; i++){ jack_devin->delay[i] = ((gdouble) (default_tact_frames + jack_devin->attack[i] - jack_devin->attack[i + 1])) / (gdouble) jack_devin->buffer_size; #ifdef AGS_DEBUG g_message("%f", jack_devin->delay[i]); #endif } jack_devin->delay[i] = ((gdouble) (default_tact_frames + jack_devin->attack[i] - jack_devin->attack[0])) / (gdouble) jack_devin->buffer_size; } /** * ags_jack_devin_realloc_buffer: * @jack_devin: the #AgsJackDevin * * Reallocate the internal audio buffer. * * Since: 1.2.0 */ void ags_jack_devin_realloc_buffer(AgsJackDevin *jack_devin) { guint word_size; if(jack_devin == NULL){ return; } switch(jack_devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_jack_devin_realloc_buffer(): unsupported word size"); return; } if(g_list_length(jack_devin->jack_port) < jack_devin->pcm_channels){ AgsJackPort *jack_port; gchar *str; guint nth_soundcard; guint i; if(jack_devin->card_uri != NULL){ sscanf(jack_devin->card_uri, "ags-jack-devin-%u", &nth_soundcard); }else{ g_warning("ags_jack_devin_realloc_buffer() - card uri not set"); return; } for(i = g_list_length(jack_devin->jack_port); i < jack_devin->pcm_channels; i++){ str = g_strdup_printf("ags-soundcard%d-%04d", nth_soundcard, i); jack_port = ags_jack_port_new(jack_devin->jack_client); ags_jack_client_add_port((AgsJackClient *) jack_devin->jack_client, (GObject *) jack_port); jack_devin->jack_port = g_list_prepend(jack_devin->jack_port, jack_port); if(jack_devin->port_name == NULL){ jack_devin->port_name = (gchar **) malloc(2 * sizeof(gchar *)); jack_devin->port_name[0] = g_strdup(str); }else{ jack_devin->port_name = (gchar **) realloc(jack_devin->port_name, (i + 2) * sizeof(gchar *)); jack_devin->port_name[i] = g_strdup(str); } ags_jack_port_register(jack_port, str, TRUE, FALSE, TRUE); } jack_devin->port_name[jack_devin->pcm_channels] = NULL; }else if(g_list_length(jack_devin->jack_port) > jack_devin->pcm_channels){ GList *jack_port, *jack_port_next; guint i; jack_port = jack_devin->jack_port; for(i = 0; i < g_list_length(jack_devin->jack_port) - jack_devin->pcm_channels; i++){ jack_port_next = jack_port->next; jack_devin->jack_port = g_list_remove(jack_devin->jack_port, jack_port->data); ags_jack_port_unregister(jack_port->data); g_object_unref(jack_port->data); jack_port = jack_port_next; } jack_devin->port_name = (gchar **) realloc(jack_devin->port_name, (jack_devin->pcm_channels + 1) * sizeof(gchar *)); jack_devin->port_name[jack_devin->pcm_channels] = NULL; } /* AGS_JACK_DEVIN_BUFFER_0 */ if(jack_devin->buffer[0] != NULL){ free(jack_devin->buffer[0]); } jack_devin->buffer[0] = (void *) malloc(jack_devin->pcm_channels * jack_devin->buffer_size * word_size); /* AGS_JACK_DEVIN_BUFFER_1 */ if(jack_devin->buffer[1] != NULL){ free(jack_devin->buffer[1]); } jack_devin->buffer[1] = (void *) malloc(jack_devin->pcm_channels * jack_devin->buffer_size * word_size); /* AGS_JACK_DEVIN_BUFFER_2 */ if(jack_devin->buffer[2] != NULL){ free(jack_devin->buffer[2]); } jack_devin->buffer[2] = (void *) malloc(jack_devin->pcm_channels * jack_devin->buffer_size * word_size); /* AGS_JACK_DEVIN_BUFFER_3 */ if(jack_devin->buffer[3] != NULL){ free(jack_devin->buffer[3]); } jack_devin->buffer[3] = (void *) malloc(jack_devin->pcm_channels * jack_devin->buffer_size * word_size); } /** * ags_jack_devin_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsJackDevin, refering to @application_context. * * Returns: a new #AgsJackDevin * * Since: 1.2.0 */ AgsJackDevin* ags_jack_devin_new(GObject *application_context) { AgsJackDevin *jack_devin; jack_devin = (AgsJackDevin *) g_object_new(AGS_TYPE_JACK_DEVIN, "application-context", application_context, NULL); return(jack_devin); } gsequencer-1.4.24/ags/audio/jack/ags_jack_server.h0000644000175000017500000000635013246707333016764 00000000000000/* 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 . */ #ifndef __AGS_JACK_SERVER_H__ #define __AGS_JACK_SERVER_H__ #include #include #include #ifdef AGS_WITH_JACK #include #include #include #include #endif #define AGS_TYPE_JACK_SERVER (ags_jack_server_get_type()) #define AGS_JACK_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_JACK_SERVER, AgsJackServer)) #define AGS_JACK_SERVER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_JACK_SERVER, AgsJackServer)) #define AGS_IS_JACK_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_JACK_SERVER)) #define AGS_IS_JACK_SERVER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_JACK_SERVER)) #define AGS_JACK_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_JACK_SERVER, AgsJackServerClass)) #define AGS_JACK_SERVER_DEFAULT_PROTOCOL "udp" #define AGS_JACK_SERVER_DEFAULT_HOST "localhost" #define AGS_JACK_SERVER_DEFAULT_PORT (3000) typedef struct _AgsJackServer AgsJackServer; typedef struct _AgsJackServerClass AgsJackServerClass; /** * AgsJackServerFlags: * @AGS_JACK_SERVER_CONNECTED: indicates the server was connected by calling #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsJackPort by * enable/disable as flags. */ typedef enum{ AGS_JACK_SERVER_CONNECTED = 1, }AgsJackServerFlags; struct _AgsJackServer { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; GObject *application_context; gchar *url; // jackctl_server_t *jackctl; guint *port; guint port_count; guint n_soundcards; guint n_sequencers; GObject *default_soundcard; GObject *default_client; GList *client; }; struct _AgsJackServerClass { GObjectClass object; }; GType ags_jack_server_get_type(); GList* ags_jack_server_find_url(GList *jack_server, gchar *url); GObject* ags_jack_server_find_client(AgsJackServer *jack_server, gchar *client_uuid); GObject* ags_jack_server_find_port(AgsJackServer *jack_server, gchar *port_uuid); void ags_jack_server_add_client(AgsJackServer *jack_server, GObject *jack_client); void ags_jack_server_remove_client(AgsJackServer *jack_server, GObject *jack_client); void ags_jack_server_connect_client(AgsJackServer *jack_server); AgsJackServer* ags_jack_server_new(GObject *application_context, gchar *url); #endif /*__AGS_JACK_SERVER_H__*/ gsequencer-1.4.24/ags/audio/jack/ags_jack_server.c0000644000175000017500000010372313247044247016760 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_jack_server_class_init(AgsJackServerClass *jack_server); void ags_jack_server_connectable_interface_init(AgsConnectableInterface *connectable); void ags_jack_server_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager); void ags_jack_server_init(AgsJackServer *jack_server); void ags_jack_server_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_jack_server_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_jack_server_connect(AgsConnectable *connectable); void ags_jack_server_disconnect(AgsConnectable *connectable); void ags_jack_server_dispose(GObject *gobject); void ags_jack_server_finalize(GObject *gobject); void ags_jack_server_set_url(AgsDistributedManager *distributed_manager, gchar *url); gchar* ags_jack_server_get_url(AgsDistributedManager *distributed_manager); void ags_jack_server_set_ports(AgsDistributedManager *distributed_manager, guint *ports, guint port_count); guint* ags_jack_server_get_ports(AgsDistributedManager *distributed_manager, guint *port_count); void ags_jack_server_set_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *soundcard); GList* ags_jack_server_get_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid); void ags_jack_server_set_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *sequencer); GList* ags_jack_server_get_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid); GObject* ags_jack_server_register_soundcard(AgsDistributedManager *distributed_manager, gboolean is_output); void ags_jack_server_unregister_soundcard(AgsDistributedManager *distributed_manager, GObject *soundcard); GObject* ags_jack_server_register_sequencer(AgsDistributedManager *distributed_manager, gboolean is_output); void ags_jack_server_unregister_sequencer(AgsDistributedManager *distributed_manager, GObject *sequencer); /** * SECTION:ags_jack_server * @short_description: JACK instance * @title: AgsJackServer * @section_id: * @include: ags/audio/jack/ags_jack_server.h * * The #AgsJackServer is an object to represent a running JACK instance. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_URL, PROP_DEFAULT_SOUNDCARD, PROP_DEFAULT_JACK_CLIENT, PROP_JACK_CLIENT, }; static gpointer ags_jack_server_parent_class = NULL; GType ags_jack_server_get_type() { static GType ags_type_jack_server = 0; if(!ags_type_jack_server){ static const GTypeInfo ags_jack_server_info = { sizeof (AgsJackServerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_jack_server_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsJackServer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_jack_server_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_jack_server_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_distributed_manager_interface_info = { (GInterfaceInitFunc) ags_jack_server_distributed_manager_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_jack_server = g_type_register_static(G_TYPE_OBJECT, "AgsJackServer", &ags_jack_server_info, 0); g_type_add_interface_static(ags_type_jack_server, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_jack_server, AGS_TYPE_DISTRIBUTED_MANAGER, &ags_distributed_manager_interface_info); } return (ags_type_jack_server); } void ags_jack_server_class_init(AgsJackServerClass *jack_server) { GObjectClass *gobject; GParamSpec *param_spec; ags_jack_server_parent_class = g_type_class_peek_parent(jack_server); /* GObjectClass */ gobject = (GObjectClass *) jack_server; gobject->set_property = ags_jack_server_set_property; gobject->get_property = ags_jack_server_get_property; gobject->dispose = ags_jack_server_dispose; gobject->finalize = ags_jack_server_finalize; /* properties */ /** * AgsJackServer:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsJackServer:url: * * The assigned URL. * * Since: 1.0.0 */ param_spec = g_param_spec_string("url", i18n_pspec("the URL"), i18n_pspec("The URL"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_URL, param_spec); /** * AgsJackServer:default-soundcard: * * The default soundcard. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("default-soundcard", i18n_pspec("default soundcard"), i18n_pspec("The default soundcard"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEFAULT_SOUNDCARD, param_spec); /** * AgsJackServer:default-jack-client: * * The default jack client. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("default-jack-client", i18n_pspec("default jack client"), i18n_pspec("The default jack client"), AGS_TYPE_JACK_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEFAULT_JACK_CLIENT, param_spec); /** * AgsJackServer:jack-client: * * The jack client list. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("jack-client", i18n_pspec("jack client list"), i18n_pspec("The jack client list"), AGS_TYPE_JACK_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_JACK_CLIENT, param_spec); } void ags_jack_server_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_jack_server_connect; connectable->disconnect = ags_jack_server_disconnect; } void ags_jack_server_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager) { distributed_manager->set_url = ags_jack_server_set_url; distributed_manager->get_url = ags_jack_server_get_url; distributed_manager->set_ports = ags_jack_server_set_ports; distributed_manager->get_ports = ags_jack_server_get_ports; distributed_manager->set_soundcard = ags_jack_server_set_soundcard; distributed_manager->get_soundcard = ags_jack_server_get_soundcard; distributed_manager->set_sequencer = ags_jack_server_set_sequencer; distributed_manager->get_sequencer = ags_jack_server_get_sequencer; distributed_manager->register_soundcard = ags_jack_server_register_soundcard; distributed_manager->unregister_soundcard = ags_jack_server_unregister_soundcard; distributed_manager->register_sequencer = ags_jack_server_register_sequencer; distributed_manager->unregister_sequencer = ags_jack_server_unregister_sequencer; } void ags_jack_server_init(AgsJackServer *jack_server) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert server mutex */ jack_server->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); jack_server->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) jack_server, mutex); pthread_mutex_unlock(application_mutex); /* flags */ jack_server->flags = 0; jack_server->application_context = NULL; jack_server->url = g_strdup_printf("%s://%s:%d", AGS_JACK_SERVER_DEFAULT_PROTOCOL, AGS_JACK_SERVER_DEFAULT_HOST, AGS_JACK_SERVER_DEFAULT_PORT); // jack_server->jackctl = jackctl_server_create(NULL, // NULL); jack_server->port = NULL; jack_server->port_count = 0; jack_server->n_soundcards = 0; jack_server->n_sequencers = 0; jack_server->default_soundcard = NULL; jack_server->default_client = NULL; jack_server->client = NULL; } void ags_jack_server_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsJackServer *jack_server; jack_server = AGS_JACK_SERVER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(jack_server->application_context == (GObject *) application_context){ return; } if(jack_server->application_context != NULL){ g_object_unref(G_OBJECT(jack_server->application_context)); } if(application_context != NULL){ g_object_ref(G_OBJECT(application_context)); } jack_server->application_context = (GObject *) application_context; } break; case PROP_URL: { gchar *url; url = g_value_get_string(value); if(jack_server->url == url){ return; } if(jack_server->url != NULL){ g_free(jack_server->url); } jack_server->url = g_strdup(url); } break; case PROP_DEFAULT_SOUNDCARD: { GObject *default_soundcard; default_soundcard = (GObject *) g_value_get_object(value); if(jack_server->default_soundcard == (GObject *) default_soundcard){ return; } if(jack_server->default_soundcard != NULL){ g_object_unref(G_OBJECT(jack_server->default_soundcard)); } if(default_soundcard != NULL){ g_object_ref(G_OBJECT(default_soundcard)); } jack_server->default_soundcard = (GObject *) default_soundcard; } break; case PROP_DEFAULT_JACK_CLIENT: { AgsJackClient *default_client; default_client = (AgsJackClient *) g_value_get_object(value); if(jack_server->default_client == (GObject *) default_client){ return; } if(jack_server->default_client != NULL){ g_object_unref(G_OBJECT(jack_server->default_client)); } if(default_client != NULL){ g_object_ref(G_OBJECT(default_client)); } jack_server->default_client = (GObject *) default_client; } break; case PROP_JACK_CLIENT: { GObject *client; client = (GObject *) g_value_get_object(value); if(g_list_find(jack_server->client, client) != NULL){ return; } if(client != NULL){ g_object_ref(G_OBJECT(client)); jack_server->client = g_list_prepend(jack_server->client, client); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_server_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsJackServer *jack_server; jack_server = AGS_JACK_SERVER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, jack_server->application_context); } break; case PROP_URL: { g_value_set_string(value, jack_server->url); } break; case PROP_DEFAULT_SOUNDCARD: { g_value_set_object(value, jack_server->default_soundcard); } break; case PROP_DEFAULT_JACK_CLIENT: { g_value_set_object(value, jack_server->default_soundcard); } break; case PROP_JACK_CLIENT: { g_value_set_pointer(value, g_list_copy(jack_server->client)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_server_connect(AgsConnectable *connectable) { AgsJackServer *jack_server; GList *list; jack_server = AGS_JACK_SERVER(connectable); if((AGS_JACK_SERVER_CONNECTED & (jack_server->flags)) != 0){ return; } jack_server->flags |= AGS_JACK_SERVER_CONNECTED; list = jack_server->client; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_jack_server_disconnect(AgsConnectable *connectable) { AgsJackServer *jack_server; GList *list; jack_server = AGS_JACK_SERVER(connectable); if((AGS_JACK_SERVER_CONNECTED & (jack_server->flags)) != 0){ return; } jack_server->flags |= AGS_JACK_SERVER_CONNECTED; list = jack_server->client; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_jack_server_dispose(GObject *gobject) { AgsJackServer *jack_server; GList *list; jack_server = AGS_JACK_SERVER(gobject); /* application context */ if(jack_server->application_context != NULL){ g_object_unref(G_OBJECT(jack_server->application_context)); jack_server->application_context = NULL; } /* default soundcard */ if(jack_server->default_soundcard != NULL){ g_object_unref(G_OBJECT(jack_server->default_soundcard)); jack_server->default_soundcard = NULL; } /* default client */ if(jack_server->default_client != NULL){ g_object_unref(G_OBJECT(jack_server->default_client)); jack_server->default_client = NULL; } /* client */ if(jack_server->client != NULL){ list = jack_server->client; while(list != NULL){ g_object_run_dispose(G_OBJECT(list->data)); list = list->next; } g_list_free_full(jack_server->client, g_object_unref); jack_server->client = NULL; } /* call parent */ G_OBJECT_CLASS(ags_jack_server_parent_class)->dispose(gobject); } void ags_jack_server_finalize(GObject *gobject) { AgsJackServer *jack_server; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; jack_server = AGS_JACK_SERVER(gobject); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* remove jack server mutex */ pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); /* application context */ if(jack_server->application_context != NULL){ g_object_unref(G_OBJECT(jack_server->application_context)); } /* url */ g_free(jack_server->url); /* default soundcard */ if(jack_server->default_soundcard != NULL){ g_object_unref(G_OBJECT(jack_server->default_soundcard)); } /* default client */ if(jack_server->default_client != NULL){ g_object_unref(G_OBJECT(jack_server->default_client)); } /* client */ if(jack_server->client != NULL){ g_list_free_full(jack_server->client, g_object_unref); } pthread_mutex_destroy(jack_server->mutex); free(jack_server->mutex); pthread_mutexattr_destroy(jack_server->mutexattr); free(jack_server->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_jack_server_parent_class)->finalize(gobject); } void ags_jack_server_set_url(AgsDistributedManager *distributed_manager, gchar *url) { AGS_JACK_SERVER(distributed_manager)->url = url; } gchar* ags_jack_server_get_url(AgsDistributedManager *distributed_manager) { return(AGS_JACK_SERVER(distributed_manager)->url); } void ags_jack_server_set_ports(AgsDistributedManager *distributed_manager, guint *port, guint port_count) { AGS_JACK_SERVER(distributed_manager)->port = port; AGS_JACK_SERVER(distributed_manager)->port_count = port_count; } guint* ags_jack_server_get_ports(AgsDistributedManager *distributed_manager, guint *port_count) { if(port_count != NULL){ *port_count = AGS_JACK_SERVER(distributed_manager)->port_count; } return(AGS_JACK_SERVER(distributed_manager)->port); } void ags_jack_server_set_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *soundcard) { AgsJackServer *jack_server; AgsJackClient *jack_client; GList *list; jack_server = AGS_JACK_SERVER(distributed_manager); jack_client = (AgsJackClient *) ags_jack_server_find_client(jack_server, client_uuid); //NOTE:JK: soundcard won't removed list = soundcard; while(list != NULL){ ags_jack_client_add_device(jack_client, (GObject *) list->data); list = list->next; } } GList* ags_jack_server_get_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid) { AgsJackServer *jack_server; AgsJackClient *jack_client; GList *list, *device; jack_server = AGS_JACK_SERVER(distributed_manager); jack_client = (AgsJackClient *) ags_jack_server_find_client(jack_server, client_uuid); device = jack_client->device; list = NULL; while(device != NULL){ if(AGS_IS_JACK_DEVOUT(device->data) || AGS_IS_JACK_DEVIN(device->data)){ list = g_list_prepend(list, device->data); } device = device->next; } return(g_list_reverse(list)); } void ags_jack_server_set_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *sequencer) { AgsJackServer *jack_server; AgsJackClient *jack_client; GList *list; jack_server = AGS_JACK_SERVER(distributed_manager); jack_client = (AgsJackClient *) ags_jack_server_find_client(jack_server, client_uuid); //NOTE:JK: sequencer won't removed list = sequencer; while(list != NULL){ ags_jack_client_add_device(jack_client, (GObject *) list->data); list = list->next; } } GList* ags_jack_server_get_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid) { AgsJackServer *jack_server; AgsJackClient *jack_client; GList *list, *device; jack_server = AGS_JACK_SERVER(distributed_manager); jack_client = (AgsJackClient *) ags_jack_server_find_client(jack_server, client_uuid); device = jack_client->device; list = NULL; while(device != NULL){ if(AGS_IS_JACK_MIDIIN(device->data)){ list = g_list_prepend(list, device->data); } device = device->next; } return(g_list_reverse(list)); } GObject* ags_jack_server_register_soundcard(AgsDistributedManager *distributed_manager, gboolean is_output) { AgsJackServer *jack_server; AgsJackClient *default_client; AgsJackPort *jack_port; AgsJackDevout *jack_devout; AgsJackDevin *jack_devin; GObject *soundcard; gchar *str; gboolean initial_set; int rc; guint i; if(!AGS_IS_JACK_SERVER(distributed_manager)){ return(NULL); } jack_server = AGS_JACK_SERVER(distributed_manager); initial_set = FALSE; /* the default client */ if(jack_server->default_client == NULL){ g_object_set(jack_server, "default-jack-client", ags_jack_client_new((GObject *) jack_server), NULL); ags_jack_server_add_client(jack_server, jack_server->default_client); ags_jack_client_open((AgsJackClient *) jack_server->default_client, "ags-default-client"); initial_set = TRUE; if(AGS_JACK_CLIENT(jack_server->default_client)->client == NULL){ g_warning("ags_jack_server.c - can't open JACK client"); } } default_client = (AgsJackClient *) jack_server->default_client; /* the soundcard */ soundcard = NULL; if(is_output){ soundcard = jack_devout = ags_jack_devout_new(jack_server->application_context); str = g_strdup_printf("ags-jack-devout-%d", jack_server->n_soundcards); g_object_set(AGS_JACK_DEVOUT(jack_devout), "jack-client", default_client, "device", str, NULL); g_free(str); g_object_set(default_client, "device", jack_devout, NULL); #ifdef AGS_WITH_JACK if(initial_set && default_client->client != NULL){ rc = jack_set_buffer_size(default_client->client, jack_devout->buffer_size); if(rc != 0){ g_message("%s", strerror(rc)); } } #endif /* register ports */ for(i = 0; i < jack_devout->pcm_channels; i++){ str = g_strdup_printf("ags-soundcard%d-%04d", jack_server->n_soundcards, i); #ifdef AGS_DEBUG g_message("%s", str); #endif jack_port = ags_jack_port_new((GObject *) default_client); ags_jack_client_add_port(default_client, (GObject *) jack_port); g_object_set(jack_devout, "jack-port", jack_port, NULL); if(jack_devout->port_name == NULL){ jack_devout->port_name = (gchar **) malloc(2 * sizeof(gchar *)); jack_devout->port_name[0] = g_strdup(str); }else{ jack_devout->port_name = (gchar **) realloc(jack_devout->port_name, (i + 2) * sizeof(gchar *)); jack_devout->port_name[i] = g_strdup(str); } ags_jack_port_register(jack_port, str, TRUE, FALSE, TRUE); g_free(str); } if(jack_devout->port_name != NULL){ jack_devout->port_name[jack_devout->pcm_channels] = NULL; } ags_jack_devout_realloc_buffer(jack_devout); jack_server->n_soundcards += 1; }else{ soundcard = jack_devin = ags_jack_devin_new(jack_server->application_context); str = g_strdup_printf("ags-jack-devin-%d", jack_server->n_soundcards); g_object_set(AGS_JACK_DEVIN(jack_devin), "jack-client", default_client, "device", str, NULL); g_free(str); g_object_set(default_client, "device", jack_devin, NULL); #ifdef AGS_WITH_JACK if(initial_set && default_client->client != NULL){ rc = jack_set_buffer_size(default_client->client, jack_devin->buffer_size); if(rc != 0){ g_message("%s", strerror(rc)); } } #endif /* register ports */ for(i = 0; i < jack_devin->pcm_channels; i++){ str = g_strdup_printf("ags-soundcard%d-%04d", jack_server->n_soundcards, i); #ifdef AGS_DEBUG g_message("%s", str); #endif jack_port = ags_jack_port_new((GObject *) default_client); ags_jack_client_add_port(default_client, (GObject *) jack_port); g_object_set(jack_devin, "jack-port", jack_port, NULL); if(jack_devin->port_name == NULL){ jack_devin->port_name = (gchar **) malloc(2 * sizeof(gchar *)); jack_devin->port_name[0] = g_strdup(str); }else{ jack_devin->port_name = (gchar **) realloc(jack_devin->port_name, (i + 2) * sizeof(gchar *)); jack_devin->port_name[i] = g_strdup(str); } ags_jack_port_register(jack_port, str, TRUE, FALSE, TRUE); g_free(str); } if(jack_devin->port_name != NULL){ jack_devin->port_name[jack_devin->pcm_channels] = NULL; } ags_jack_devin_realloc_buffer(jack_devin); jack_server->n_soundcards += 1; } return(soundcard); } void ags_jack_server_unregister_soundcard(AgsDistributedManager *distributed_manager, GObject *soundcard) { AgsJackServer *jack_server; AgsJackClient *default_client; GList *list; jack_server = AGS_JACK_SERVER(distributed_manager); /* the default client */ default_client = (AgsJackClient *) jack_server->default_client; if(default_client == NULL){ g_warning("GSequencer - no jack client"); return; } if(AGS_IS_JACK_DEVOUT(soundcard)){ list = AGS_JACK_DEVOUT(soundcard)->jack_port; while(list != NULL){ ags_jack_port_unregister(list->data); ags_jack_client_remove_port(default_client, list->data); list = list->next; } }else if(AGS_IS_JACK_DEVIN(soundcard)){ list = AGS_JACK_DEVIN(soundcard)->jack_port; while(list != NULL){ ags_jack_port_unregister(list->data); ags_jack_client_remove_port(default_client, list->data); list = list->next; } } ags_jack_client_remove_device(default_client, soundcard); if(default_client->port == NULL){ jack_server->n_soundcards = 0; } } GObject* ags_jack_server_register_sequencer(AgsDistributedManager *distributed_manager, gboolean is_output) { AgsJackServer *jack_server; AgsJackClient *default_client; AgsJackPort *jack_port; AgsJackMidiin *jack_midiin; gchar *str; if(is_output){ g_warning("GSequencer - MIDI output not implemented"); return(NULL); } jack_server = AGS_JACK_SERVER(distributed_manager); /* the default client */ if(jack_server->default_client == NULL){ g_object_set(jack_server, "default-jack-client", (GObject *) ags_jack_client_new((GObject *) jack_server), NULL); ags_jack_server_add_client(jack_server, jack_server->default_client); ags_jack_client_open((AgsJackClient *) jack_server->default_client, "ags-default-client"); if(AGS_JACK_CLIENT(jack_server->default_client)->client == NULL){ g_warning("ags_jack_server.c - can't open JACK client"); } } default_client = (AgsJackClient *) jack_server->default_client; str = g_strdup_printf("ags-jack-midiin-%d", jack_server->n_sequencers); jack_midiin = ags_jack_midiin_new(jack_server->application_context); g_object_set(AGS_JACK_MIDIIN(jack_midiin), "jack-client", default_client, "device", str, NULL); g_object_set(default_client, "device", jack_midiin, NULL); /* register sequencer */ str = g_strdup_printf("ags-sequencer%d", jack_server->n_sequencers); #ifdef AGS_DEBUG g_message("%s", str); #endif jack_port = ags_jack_port_new((GObject *) default_client); ags_jack_client_add_port(default_client, (GObject *) jack_port); g_object_set(jack_midiin, "jack-port", jack_port, NULL); ags_jack_port_register(jack_port, str, FALSE, TRUE, FALSE); jack_server->n_sequencers += 1; return((GObject *) jack_midiin); } void ags_jack_server_unregister_sequencer(AgsDistributedManager *distributed_manager, GObject *sequencer) { AgsJackServer *jack_server; AgsJackClient *default_client; GList *list; jack_server = AGS_JACK_SERVER(distributed_manager); /* the default client */ default_client = (AgsJackClient *) jack_server->default_client; if(default_client == NULL){ g_warning("GSequencer - no jack client"); return; } list = AGS_JACK_MIDIIN(sequencer)->jack_port; while(list != NULL){ ags_jack_port_unregister(list->data); ags_jack_client_remove_port(default_client, list->data); list = list->next; } ags_jack_client_remove_device(default_client, sequencer); if(default_client->port == NULL){ jack_server->n_sequencers = 0; } } GObject* ags_jack_server_register_default_soundcard(AgsJackServer *jack_server) { AgsJackClient *default_client; AgsJackDevout *jack_devout; AgsJackPort *jack_port; gchar *str; guint i; int rc; /* the default client */ if(jack_server->default_client == NULL){ g_object_set(jack_server, "default-jack-client", (GObject *) ags_jack_client_new((GObject *) jack_server), NULL); ags_jack_server_add_client(jack_server, jack_server->default_client); ags_jack_client_open((AgsJackClient *) jack_server->default_client, "ags-default-client"); if(AGS_JACK_CLIENT(jack_server->default_client)->client == NULL){ g_warning("ags_jack_server.c - can't open JACK client"); return(NULL); } } default_client = (AgsJackClient *) jack_server->default_client; /* the soundcard */ jack_devout = ags_jack_devout_new(jack_server->application_context); g_object_set(AGS_JACK_DEVOUT(jack_devout), "jack-client", default_client, "device", "ags-default-devout", NULL); g_object_set(default_client, "device", jack_devout, NULL); #ifdef AGS_WITH_JACK if(default_client->client != NULL){ rc = jack_set_buffer_size(default_client->client, jack_devout->buffer_size); if(rc != 0){ g_message("%s", strerror(rc)); } } #endif /* register ports */ for(i = 0; i < jack_devout->pcm_channels; i++){ str = g_strdup_printf("ags-default-soundcard-%04d", i); #ifdef AGS_DEBUG g_message("%s", str); #endif jack_port = ags_jack_port_new((GObject *) default_client); ags_jack_client_add_port(default_client, (GObject *) jack_port); g_object_set(jack_devout, "jack-port", jack_port, NULL); if(jack_devout->port_name == NULL){ jack_devout->port_name = (gchar **) malloc(2 * sizeof(gchar *)); jack_devout->port_name[0] = g_strdup(str); }else{ jack_devout->port_name = (gchar **) realloc(jack_devout->port_name, (i + 2) * sizeof(gchar *)); jack_devout->port_name[i] = g_strdup(str); } ags_jack_port_register(jack_port, str, TRUE, FALSE, TRUE); } if(jack_devout->port_name != NULL){ jack_devout->port_name[jack_devout->pcm_channels] = NULL; } return((GObject *) jack_devout); } /** * ags_jack_server_find_url: * @jack_server: the #AgsJackServer * @url: the url to find * * Find #AgsJackServer by url. * * Returns: the #GList containing a #AgsJackServer matching @url or %NULL * * Since: 1.0.0 */ GList* ags_jack_server_find_url(GList *jack_server, gchar *url) { while(jack_server != NULL){ if(!g_ascii_strcasecmp(AGS_JACK_SERVER(jack_server->data)->url, url)){ return(jack_server); } jack_server = jack_server->next; } return(NULL); } /** * ags_jack_server_find_client: * @jack_server: the #AgsJackServer * @client_uuid: the uuid to find * * Find #AgsJackClient by uuid. * * Returns: the #AgsJackClient found or %NULL * * Since: 1.0.0 */ GObject* ags_jack_server_find_client(AgsJackServer *jack_server, gchar *client_uuid) { GList *list; list = jack_server->client; while(list != NULL){ if(!g_ascii_strcasecmp(AGS_JACK_CLIENT(list->data)->uuid, client_uuid)){ return(list->data); } list = list->next; } return(NULL); } /** * ags_jack_server_find_port: * @jack_server: the #AgsJackServer * @port_uuid: the uuid to find * * Find #AgsJackPort by uuid. * * Returns: the #AgsJackPort found or %NULL * * Since: 1.0.0 */ GObject* ags_jack_server_find_port(AgsJackServer *jack_server, gchar *port_uuid) { GList *client, *port; client = jack_server->client; while(client != NULL){ port = AGS_JACK_CLIENT(client->data)->port; while(port != NULL){ if(!g_ascii_strcasecmp(AGS_JACK_CLIENT(port->data)->uuid, port_uuid)){ return(port->data); } port = port->next; } client = client->next; } return(NULL); } /** * ags_jack_server_add_client: * @jack_server: the #AgsJackServer * @jack_client: the #AgsJackClient to add * * Add @jack_client to @jack_server * * Since: 1.0.0 */ void ags_jack_server_add_client(AgsJackServer *jack_server, GObject *jack_client) { if(!AGS_IS_JACK_SERVER(jack_server) || !AGS_IS_JACK_CLIENT(jack_client)){ return; } g_object_ref(jack_client); jack_server->client = g_list_prepend(jack_server->client, jack_client); } /** * ags_jack_server_remove_client: * @jack_server: the #AgsJackServer * @jack_client: the #AgsJackClient to remove * * Remove @jack_client to @jack_server * * Since: 1.0.0 */ void ags_jack_server_remove_client(AgsJackServer *jack_server, GObject *jack_client) { if(!AGS_IS_JACK_SERVER(jack_server) || !AGS_IS_JACK_CLIENT(jack_client)){ return; } jack_server->client = g_list_remove(jack_server->client, jack_client); g_object_unref(jack_client); } /** * ags_jack_server_connect_client: * @jack_server: the #AgsJackServer * * Connect all clients. * * Since: 1.0.0 */ void ags_jack_server_connect_client(AgsJackServer *jack_server) { GList *client; client = jack_server->client; while(client != NULL){ ags_jack_client_open((AgsJackClient *) client->data, AGS_JACK_CLIENT(client->data)->name); ags_jack_client_activate(client->data); client = client->next; } } /** * ags_jack_server_new: * @application_context: the #AgsApplicationContext * @url: the URL as string * * Instantiate a new #AgsJackServer. * * Returns: the new #AgsJackServer * * Since: 1.0.0 */ AgsJackServer* ags_jack_server_new(GObject *application_context, gchar *url) { AgsJackServer *jack_server; jack_server = (AgsJackServer *) g_object_new(AGS_TYPE_JACK_SERVER, "application-context", application_context, "url", url, NULL); return(jack_server); } gsequencer-1.4.24/ags/audio/jack/ags_jack_port.h0000644000175000017500000000612713246707333016444 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_JACK_PORT_H__ #define __AGS_JACK_PORT_H__ #include #include #include #include #ifdef AGS_WITH_JACK #include #endif #define AGS_TYPE_JACK_PORT (ags_jack_port_get_type()) #define AGS_JACK_PORT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_JACK_PORT, AgsJackPort)) #define AGS_JACK_PORT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_JACK_PORT, AgsJackPort)) #define AGS_IS_JACK_PORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_JACK_PORT)) #define AGS_IS_JACK_PORT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_JACK_PORT)) #define AGS_JACK_PORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_JACK_PORT, AgsJackPortClass)) typedef struct _AgsJackPort AgsJackPort; typedef struct _AgsJackPortClass AgsJackPortClass; /** * AgsJackPortFlags: * @AGS_JACK_PORT_CONNECTED: indicates the port was connected by calling #AgsConnectable::connect() * @AGS_JACK_PORT_REGISTERED: the port was registered * @AGS_JACK_PORT_IS_AUDIO: the port provides audio data * @AGS_JACK_PORT_IS_MIDI: the port provides midi data * @AGS_JACK_PORT_IS_OUTPUT: the port does output * @AGS_JACK_PORT_IS_INPUT: the port does input * * Enum values to control the behavior or indicate internal state of #AgsJackPort by * enable/disable as flags. */ typedef enum{ AGS_JACK_PORT_CONNECTED = 1, AGS_JACK_PORT_REGISTERED = 1 << 1, AGS_JACK_PORT_IS_AUDIO = 1 << 2, AGS_JACK_PORT_IS_MIDI = 1 << 3, AGS_JACK_PORT_IS_OUTPUT = 1 << 4, AGS_JACK_PORT_IS_INPUT = 1 << 5, }AgsJackPortFlags; struct _AgsJackPort { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; GObject *jack_client; gchar *uuid; gchar *name; #ifdef AGS_WITH_JACK jack_port_t *port; #else gpointer port; #endif }; struct _AgsJackPortClass { GObjectClass object; }; GType ags_jack_port_get_type(); GList* ags_jack_port_find(GList *jack_port, gchar *port_name); void ags_jack_port_register(AgsJackPort *jack_port, gchar *port_name, gboolean is_audio, gboolean is_midi, gboolean is_output); void ags_jack_port_unregister(AgsJackPort *jack_port); AgsJackPort* ags_jack_port_new(GObject *jack_client); #endif /*__AGS_JACK_PORT_H__*/ gsequencer-1.4.24/ags/audio/jack/ags_jack_devout.h0000644000175000017500000001363313247044247016765 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_JACK_DEVOUT_H__ #define __AGS_JACK_DEVOUT_H__ #include #include #include #define AGS_TYPE_JACK_DEVOUT (ags_jack_devout_get_type()) #define AGS_JACK_DEVOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_JACK_DEVOUT, AgsJackDevout)) #define AGS_JACK_DEVOUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_JACK_DEVOUT, AgsJackDevout)) #define AGS_IS_JACK_DEVOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_JACK_DEVOUT)) #define AGS_IS_JACK_DEVOUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_JACK_DEVOUT)) #define AGS_JACK_DEVOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_JACK_DEVOUT, AgsJackDevoutClass)) typedef struct _AgsJackDevout AgsJackDevout; typedef struct _AgsJackDevoutClass AgsJackDevoutClass; /** * AgsJackDevoutFlags: * @AGS_JACK_DEVOUT_BUFFER0: ring-buffer 0 * @AGS_JACK_DEVOUT_BUFFER1: ring-buffer 1 * @AGS_JACK_DEVOUT_BUFFER2: ring-buffer 2 * @AGS_JACK_DEVOUT_BUFFER3: ring-buffer 3 * @AGS_JACK_DEVOUT_ATTACK_FIRST: use first attack, instead of second one * @AGS_JACK_DEVOUT_PLAY: do playback * @AGS_JACK_DEVOUT_SHUTDOWN: stop playback * @AGS_JACK_DEVOUT_START_PLAY: playback starting * @AGS_JACK_DEVOUT_NONBLOCKING: do non-blocking calls * @AGS_JACK_DEVOUT_INITIALIZED: the soundcard was initialized * * Enum values to control the behavior or indicate internal state of #AgsJackDevout by * enable/disable as flags. */ typedef enum { AGS_JACK_DEVOUT_BUFFER0 = 1, AGS_JACK_DEVOUT_BUFFER1 = 1 << 1, AGS_JACK_DEVOUT_BUFFER2 = 1 << 2, AGS_JACK_DEVOUT_BUFFER3 = 1 << 3, AGS_JACK_DEVOUT_ATTACK_FIRST = 1 << 4, AGS_JACK_DEVOUT_PLAY = 1 << 5, AGS_JACK_DEVOUT_SHUTDOWN = 1 << 6, AGS_JACK_DEVOUT_START_PLAY = 1 << 7, AGS_JACK_DEVOUT_NONBLOCKING = 1 << 8, AGS_JACK_DEVOUT_INITIALIZED = 1 << 9, AGS_JACK_DEVOUT_DUMMY = 1 << 10, AGS_JACK_DEVOUT_OSS = 1 << 11, AGS_JACK_DEVOUT_ALSA = 1 << 12, AGS_JACK_DEVOUT_FREEBOB = 1 << 13, AGS_JACK_DEVOUT_FIREWIRE = 1 << 14, AGS_JACK_DEVOUT_NET = 1 << 15, AGS_JACK_DEVOUT_SUN = 1 << 16, AGS_JACK_DEVOUT_PORTAUDIO = 1 << 17, }AgsJackDevoutFlags; /** * AgsJackDevoutSyncFlags: * @AGS_JACK_DEVOUT_PASS_THROUGH: do not sync * @AGS_JACK_DEVOUT_INITIAL_CALLBACK: initial callback * @AGS_JACK_DEVOUT_CALLBACK_WAIT: sync wait, soundcard conditional lock * @AGS_JACK_DEVOUT_CALLBACK_DONE: sync done, soundcard conditional lock * @AGS_JACK_DEVOUT_CALLBACK_FINISH_WAIT: sync wait, client conditional lock * @AGS_JACK_DEVOUT_CALLBACK_FINISH_DONE: sync done, client conditional lock * * Enum values to control the synchronization between soundcard and client. */ typedef enum{ AGS_JACK_DEVOUT_PASS_THROUGH = 1, AGS_JACK_DEVOUT_INITIAL_CALLBACK = 1 << 1, AGS_JACK_DEVOUT_CALLBACK_WAIT = 1 << 2, AGS_JACK_DEVOUT_CALLBACK_DONE = 1 << 3, AGS_JACK_DEVOUT_CALLBACK_FINISH_WAIT = 1 << 4, AGS_JACK_DEVOUT_CALLBACK_FINISH_DONE = 1 << 5, }AgsJackDevoutSyncFlags; #define AGS_JACK_DEVOUT_ERROR (ags_jack_devout_error_quark()) typedef enum{ AGS_JACK_DEVOUT_ERROR_LOCKED_SOUNDCARD, }AgsJackDevoutError; struct _AgsJackDevout { GObject object; guint flags; volatile guint sync_flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; guint dsp_channels; guint pcm_channels; guint format; guint buffer_size; guint samplerate; void** buffer; double bpm; // beats per minute gdouble delay_factor; gdouble *delay; // count of tics within buffer size guint *attack; // where currently tic resides in the stream's offset, measured in 1/64 of bpm gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint note_offset_absolute; guint loop_left; guint loop_right; gboolean do_loop; guint loop_offset; gchar *card_uri; GObject *jack_client; gchar **port_name; GList *jack_port; pthread_mutex_t *callback_mutex; pthread_cond_t *callback_cond; pthread_mutex_t *callback_finish_mutex; pthread_cond_t *callback_finish_cond; GObject *application_context; pthread_mutex_t *application_mutex; GObject *notify_soundcard; GObject *channel; GList *audio; }; struct _AgsJackDevoutClass { GObjectClass object; }; GType ags_jack_devout_get_type(); GQuark ags_jack_devout_error_quark(); void ags_jack_devout_switch_buffer_flag(AgsJackDevout *jack_devout); void ags_jack_devout_adjust_delay_and_attack(AgsJackDevout *jack_devout); void ags_jack_devout_realloc_buffer(AgsJackDevout *jack_devout); AgsJackDevout* ags_jack_devout_new(GObject *application_context); #endif /*__AGS_JACK_DEVOUT_H__*/ gsequencer-1.4.24/ags/audio/jack/ags_jack_client.h0000644000175000017500000000640513246707333016735 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_JACK_CLIENT_H__ #define __AGS_JACK_CLIENT_H__ #include #include #include #ifdef AGS_WITH_JACK #include #endif #define AGS_TYPE_JACK_CLIENT (ags_jack_client_get_type()) #define AGS_JACK_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_JACK_CLIENT, AgsJackClient)) #define AGS_JACK_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_JACK_CLIENT, AgsJackClient)) #define AGS_IS_JACK_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_JACK_CLIENT)) #define AGS_IS_JACK_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_JACK_CLIENT)) #define AGS_JACK_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_JACK_CLIENT, AgsJackClientClass)) typedef struct _AgsJackClient AgsJackClient; typedef struct _AgsJackClientClass AgsJackClientClass; /** * AgsJackClientFlags: * @AGS_JACK_CLIENT_CONNECTED: indicates the client was connected by calling #AgsConnectable::connect() * @AGS_JACK_CLIENT_ACTIVATED: the client was activated * * Enum values to control the behavior or indicate internal state of #AgsJackClient by * enable/disable as flags. */ typedef enum{ AGS_JACK_CLIENT_CONNECTED = 1, AGS_JACK_CLIENT_ACTIVATED = 1 << 1, }AgsJackClientFlags; struct _AgsJackClient { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; GObject *jack_server; gchar *uuid; gchar *name; #ifdef AGS_WITH_JACK jack_client_t *client; #else gpointer client; #endif GList *device; GList *port; volatile guint queued; }; struct _AgsJackClientClass { GObjectClass object; }; GType ags_jack_client_get_type(); GList* ags_jack_client_find_uuid(GList *jack_client, gchar *client_uuid); GList* ags_jack_client_find(GList *jack_client, gchar *client_name); void ags_jack_client_open(AgsJackClient *jack_client, gchar *client_name); void ags_jack_client_add_device(AgsJackClient *jack_client, GObject *jack_device); void ags_jack_client_remove_device(AgsJackClient *jack_client, GObject *jack_device); void ags_jack_client_add_port(AgsJackClient *jack_client, GObject *jack_port); void ags_jack_client_remove_port(AgsJackClient *jack_client, GObject *jack_port); void ags_jack_client_activate(AgsJackClient *jack_client); void ags_jack_client_deactivate(AgsJackClient *jack_client); AgsJackClient* ags_jack_client_new(GObject *jack_server); #endif /*__AGS_JACK_CLIENT_H__*/ gsequencer-1.4.24/ags/audio/jack/ags_jack_devin.h0000644000175000017500000001355613247044247016570 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_JACK_DEVIN_H__ #define __AGS_JACK_DEVIN_H__ #include #include #include #define AGS_TYPE_JACK_DEVIN (ags_jack_devin_get_type()) #define AGS_JACK_DEVIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_JACK_DEVIN, AgsJackDevin)) #define AGS_JACK_DEVIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_JACK_DEVIN, AgsJackDevin)) #define AGS_IS_JACK_DEVIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_JACK_DEVIN)) #define AGS_IS_JACK_DEVIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_JACK_DEVIN)) #define AGS_JACK_DEVIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_JACK_DEVIN, AgsJackDevinClass)) typedef struct _AgsJackDevin AgsJackDevin; typedef struct _AgsJackDevinClass AgsJackDevinClass; /** * AgsJackDevinFlags: * @AGS_JACK_DEVIN_BUFFER0: ring-buffer 0 * @AGS_JACK_DEVIN_BUFFER1: ring-buffer 1 * @AGS_JACK_DEVIN_BUFFER2: ring-buffer 2 * @AGS_JACK_DEVIN_BUFFER3: ring-buffer 3 * @AGS_JACK_DEVIN_ATTACK_FIRST: use first attack, instead of second one * @AGS_JACK_DEVIN_RECORD: do capture * @AGS_JACK_DEVIN_SHUTDOWN: stop capture * @AGS_JACK_DEVIN_START_RECORD: capture starting * @AGS_JACK_DEVIN_NONBLOCKING: do non-blocking calls * @AGS_JACK_DEVIN_INITIALIZED: the soundcard was initialized * * Enum values to control the behavior or indicate internal state of #AgsJackDevin by * enable/disable as flags. */ typedef enum { AGS_JACK_DEVIN_BUFFER0 = 1, AGS_JACK_DEVIN_BUFFER1 = 1 << 1, AGS_JACK_DEVIN_BUFFER2 = 1 << 2, AGS_JACK_DEVIN_BUFFER3 = 1 << 3, AGS_JACK_DEVIN_ATTACK_FIRST = 1 << 4, AGS_JACK_DEVIN_RECORD = 1 << 5, AGS_JACK_DEVIN_SHUTDOWN = 1 << 6, AGS_JACK_DEVIN_START_RECORD = 1 << 7, AGS_JACK_DEVIN_NONBLOCKING = 1 << 8, AGS_JACK_DEVIN_INITIALIZED = 1 << 9, AGS_JACK_DEVIN_DUMMY = 1 << 10, AGS_JACK_DEVIN_OSS = 1 << 11, AGS_JACK_DEVIN_ALSA = 1 << 12, AGS_JACK_DEVIN_FREEBOB = 1 << 13, AGS_JACK_DEVIN_FIREWIRE = 1 << 14, AGS_JACK_DEVIN_NET = 1 << 15, AGS_JACK_DEVIN_SUN = 1 << 16, AGS_JACK_DEVIN_PORTAUDIO = 1 << 17, }AgsJackDevinFlags; /** * AgsJackDevinSyncFlags: * @AGS_JACK_DEVIN_PASS_THROUGH: do not sync * @AGS_JACK_DEVIN_INITIAL_CALLBACK: initial callback * @AGS_JACK_DEVIN_CALLBACK_WAIT: sync wait, soundcard conditional lock * @AGS_JACK_DEVIN_CALLBACK_DONE: sync done, soundcard conditional lock * @AGS_JACK_DEVIN_CALLBACK_FINISH_WAIT: sync wait, client conditional lock * @AGS_JACK_DEVIN_CALLBACK_FINISH_DONE: sync done, client conditional lock * * Enum values to control the synchronization between soundcard and client. */ typedef enum{ AGS_JACK_DEVIN_PASS_THROUGH = 1, AGS_JACK_DEVIN_INITIAL_CALLBACK = 1 << 1, AGS_JACK_DEVIN_CALLBACK_WAIT = 1 << 2, AGS_JACK_DEVIN_CALLBACK_DONE = 1 << 3, AGS_JACK_DEVIN_CALLBACK_FINISH_WAIT = 1 << 4, AGS_JACK_DEVIN_CALLBACK_FINISH_DONE = 1 << 5, }AgsJackDevinSyncFlags; #define AGS_JACK_DEVIN_ERROR (ags_jack_devin_error_quark()) typedef enum{ AGS_JACK_DEVIN_ERROR_LOCKED_SOUNDCARD, }AgsJackDevinError; struct _AgsJackDevin { GObject object; guint flags; volatile guint sync_flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; guint dsp_channels; guint pcm_channels; guint format; guint buffer_size; guint samplerate; void** buffer; double bpm; // beats per minute gdouble delay_factor; gdouble *delay; // count of tics within buffer size guint *attack; // where currently tic resides in the stream's offset, measured in 1/64 of bpm gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint note_offset_absolute; guint loop_left; guint loop_right; gboolean do_loop; guint loop_offset; gchar *card_uri; GObject *jack_client; gchar **port_name; GList *jack_port; pthread_mutex_t *callback_mutex; pthread_cond_t *callback_cond; pthread_mutex_t *callback_finish_mutex; pthread_cond_t *callback_finish_cond; GObject *application_context; pthread_mutex_t *application_mutex; GObject *notify_soundcard; GObject *channel; GList *audio; }; struct _AgsJackDevinClass { GObjectClass object; }; GType ags_jack_devin_get_type(); GQuark ags_jack_devin_error_quark(); void ags_jack_devin_switch_buffer_flag(AgsJackDevin *jack_devin); void ags_jack_devin_adjust_delay_and_attack(AgsJackDevin *jack_devin); void ags_jack_devin_realloc_buffer(AgsJackDevin *jack_devin); AgsJackDevin* ags_jack_devin_new(GObject *application_context); #endif /*__AGS_JACK_DEVIN_H__*/ gsequencer-1.4.24/ags/audio/jack/ags_jack_devout.c0000644000175000017500000020401113247044247016750 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_jack_devout_class_init(AgsJackDevoutClass *jack_devout); void ags_jack_devout_connectable_interface_init(AgsConnectableInterface *connectable); void ags_jack_devout_soundcard_interface_init(AgsSoundcardInterface *soundcard); void ags_jack_devout_init(AgsJackDevout *jack_devout); void ags_jack_devout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_jack_devout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_jack_devout_disconnect(AgsConnectable *connectable); void ags_jack_devout_connect(AgsConnectable *connectable); void ags_jack_devout_dispose(GObject *gobject); void ags_jack_devout_finalize(GObject *gobject); void ags_jack_devout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* ags_jack_devout_get_application_context(AgsSoundcard *soundcard); void ags_jack_devout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_jack_devout_get_application_mutex(AgsSoundcard *soundcard); void ags_jack_devout_set_device(AgsSoundcard *soundcard, gchar *device); gchar* ags_jack_devout_get_device(AgsSoundcard *soundcard); void ags_jack_devout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void ags_jack_devout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void ags_jack_devout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name); void ags_jack_devout_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); gboolean ags_jack_devout_is_starting(AgsSoundcard *soundcard); gboolean ags_jack_devout_is_playing(AgsSoundcard *soundcard); gchar* ags_jack_devout_get_uptime(AgsSoundcard *soundcard); void ags_jack_devout_port_init(AgsSoundcard *soundcard, GError **error); void ags_jack_devout_port_play(AgsSoundcard *soundcard, GError **error); void ags_jack_devout_port_free(AgsSoundcard *soundcard); void ags_jack_devout_tic(AgsSoundcard *soundcard); void ags_jack_devout_offset_changed(AgsSoundcard *soundcard, guint note_offset); void ags_jack_devout_set_bpm(AgsSoundcard *soundcard, gdouble bpm); gdouble ags_jack_devout_get_bpm(AgsSoundcard *soundcard); void ags_jack_devout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor); gdouble ags_jack_devout_get_delay_factor(AgsSoundcard *soundcard); gdouble ags_jack_devout_get_absolute_delay(AgsSoundcard *soundcard); gdouble ags_jack_devout_get_delay(AgsSoundcard *soundcard); guint ags_jack_devout_get_attack(AgsSoundcard *soundcard); void* ags_jack_devout_get_buffer(AgsSoundcard *soundcard); void* ags_jack_devout_get_next_buffer(AgsSoundcard *soundcard); void* ags_jack_devout_get_prev_buffer(AgsSoundcard *soundcard); guint ags_jack_devout_get_delay_counter(AgsSoundcard *soundcard); void ags_jack_devout_set_note_offset(AgsSoundcard *soundcard, guint note_offset); guint ags_jack_devout_get_note_offset(AgsSoundcard *soundcard); void ags_jack_devout_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset); guint ags_jack_devout_get_note_offset_absolute(AgsSoundcard *soundcard); void ags_jack_devout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void ags_jack_devout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint ags_jack_devout_get_loop_offset(AgsSoundcard *soundcard); void ags_jack_devout_set_audio(AgsSoundcard *soundcard, GList *audio); GList* ags_jack_devout_get_audio(AgsSoundcard *soundcard); /** * SECTION:ags_jack_devout * @short_description: Output to soundcard * @title: AgsJackDevout * @section_id: * @include: ags/audio/jack/ags_jack_devout.h * * #AgsJackDevout represents a soundcard and supports output. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_DSP_CHANNELS, PROP_PCM_CHANNELS, PROP_FORMAT, PROP_BUFFER_SIZE, PROP_SAMPLERATE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, PROP_JACK_CLIENT, PROP_JACK_PORT, PROP_CHANNEL, }; enum{ LAST_SIGNAL, }; static gpointer ags_jack_devout_parent_class = NULL; static guint jack_devout_signals[LAST_SIGNAL]; GType ags_jack_devout_get_type (void) { static GType ags_type_jack_devout = 0; if(!ags_type_jack_devout){ static const GTypeInfo ags_jack_devout_info = { sizeof (AgsJackDevoutClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_jack_devout_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsJackDevout), 0, /* n_preallocs */ (GInstanceInitFunc) ags_jack_devout_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_jack_devout_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_soundcard_interface_info = { (GInterfaceInitFunc) ags_jack_devout_soundcard_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_jack_devout = g_type_register_static(G_TYPE_OBJECT, "AgsJackDevout", &ags_jack_devout_info, 0); g_type_add_interface_static(ags_type_jack_devout, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_jack_devout, AGS_TYPE_SOUNDCARD, &ags_soundcard_interface_info); } return (ags_type_jack_devout); } void ags_jack_devout_class_init(AgsJackDevoutClass *jack_devout) { GObjectClass *gobject; GParamSpec *param_spec; ags_jack_devout_parent_class = g_type_class_peek_parent(jack_devout); /* GObjectClass */ gobject = (GObjectClass *) jack_devout; gobject->set_property = ags_jack_devout_set_property; gobject->get_property = ags_jack_devout_get_property; gobject->dispose = ags_jack_devout_dispose; gobject->finalize = ags_jack_devout_finalize; /* properties */ /** * AgsJackDevout:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsJackDevout:application-mutex: * * The assigned application mutex * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsJackDevout:device: * * The jack soundcard indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "ags-jack-devout-0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsJackDevout:dsp-channels: * * The dsp channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("dsp-channels", i18n_pspec("count of DSP channels"), i18n_pspec("The count of DSP channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DSP_CHANNELS, param_spec); /** * AgsJackDevout:pcm-channels: * * The pcm channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pcm-channels", i18n_pspec("count of PCM channels"), i18n_pspec("The count of PCM channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PCM_CHANNELS, param_spec); /** * AgsJackDevout:format: * * The precision of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("precision of buffer"), i18n_pspec("The precision to use for a frame"), 1, 64, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsJackDevout:buffer-size: * * The buffer size * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("frame count of a buffer"), i18n_pspec("The count of frames a buffer contains"), 1, 44100, 940, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsJackDevout:samplerate: * * The samplerate * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("frames per second"), i18n_pspec("The frames count played during a second"), 8000, 96000, 44100, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsJackDevout:buffer: * * The buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to play"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsJackDevout:bpm: * * Beats per minute * * Since: 1.0.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsJackDevout:delay-factor: * * tact * * Since: 1.0.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsJackDevout:attack: * * Attack of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsJackDevout:jack-client: * * The assigned #AgsJackClient * * Since: 1.0.0 */ param_spec = g_param_spec_object("jack-client", i18n_pspec("jack client object"), i18n_pspec("The jack client object"), AGS_TYPE_JACK_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_JACK_CLIENT, param_spec); /** * AgsJackDevout:jack-port: * * The assigned #AgsJackPort * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("jack-port", i18n_pspec("jack port object"), i18n_pspec("The jack port object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_JACK_PORT, param_spec); /** * AgsJackDevout:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel"), i18n_pspec("The mapped channel"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); } GQuark ags_jack_devout_error_quark() { return(g_quark_from_static_string("ags-jack_devout-error-quark")); } void ags_jack_devout_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_jack_devout_connect; connectable->disconnect = ags_jack_devout_disconnect; } void ags_jack_devout_soundcard_interface_init(AgsSoundcardInterface *soundcard) { soundcard->set_application_context = ags_jack_devout_set_application_context; soundcard->get_application_context = ags_jack_devout_get_application_context; soundcard->set_application_mutex = ags_jack_devout_set_application_mutex; soundcard->get_application_mutex = ags_jack_devout_get_application_mutex; soundcard->set_device = ags_jack_devout_set_device; soundcard->get_device = ags_jack_devout_get_device; soundcard->set_presets = ags_jack_devout_set_presets; soundcard->get_presets = ags_jack_devout_get_presets; soundcard->list_cards = ags_jack_devout_list_cards; soundcard->pcm_info = ags_jack_devout_pcm_info; soundcard->get_poll_fd = NULL; soundcard->is_available = NULL; soundcard->is_starting = ags_jack_devout_is_starting; soundcard->is_playing = ags_jack_devout_is_playing; soundcard->is_recording = NULL; soundcard->get_uptime = ags_jack_devout_get_uptime; soundcard->play_init = ags_jack_devout_port_init; soundcard->play = ags_jack_devout_port_play; soundcard->record_init = NULL; soundcard->record = NULL; soundcard->stop = ags_jack_devout_port_free; soundcard->tic = ags_jack_devout_tic; soundcard->offset_changed = ags_jack_devout_offset_changed; soundcard->set_bpm = ags_jack_devout_set_bpm; soundcard->get_bpm = ags_jack_devout_get_bpm; soundcard->set_delay_factor = ags_jack_devout_set_delay_factor; soundcard->get_delay_factor = ags_jack_devout_get_delay_factor; soundcard->get_absolute_delay = ags_jack_devout_get_absolute_delay; soundcard->get_delay = ags_jack_devout_get_delay; soundcard->get_attack = ags_jack_devout_get_attack; soundcard->get_buffer = ags_jack_devout_get_buffer; soundcard->get_next_buffer = ags_jack_devout_get_next_buffer; soundcard->get_prev_buffer = ags_jack_devout_get_prev_buffer; soundcard->get_delay_counter = ags_jack_devout_get_delay_counter; soundcard->set_note_offset = ags_jack_devout_set_note_offset; soundcard->get_note_offset = ags_jack_devout_get_note_offset; soundcard->set_note_offset_absolute = ags_jack_devout_set_note_offset_absolute; soundcard->get_note_offset_absolute = ags_jack_devout_get_note_offset_absolute; soundcard->set_loop = ags_jack_devout_set_loop; soundcard->get_loop = ags_jack_devout_get_loop; soundcard->get_loop_offset = ags_jack_devout_get_loop_offset; soundcard->set_audio = ags_jack_devout_set_audio; soundcard->get_audio = ags_jack_devout_get_audio; } void ags_jack_devout_init(AgsJackDevout *jack_devout) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert devout mutex */ jack_devout->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); jack_devout->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) jack_devout, mutex); pthread_mutex_unlock(application_mutex); /* flags */ jack_devout->flags = 0; g_atomic_int_set(&(jack_devout->sync_flags), AGS_JACK_DEVOUT_PASS_THROUGH); /* quality */ config = ags_config_get_instance(); jack_devout->dsp_channels = AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS; jack_devout->pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; jack_devout->format = AGS_SOUNDCARD_DEFAULT_FORMAT; jack_devout->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; jack_devout->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; /* read config */ /* dsp channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "dsp-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "dsp-channels"); } if(str != NULL){ jack_devout->dsp_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ jack_devout->pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ jack_devout->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ jack_devout->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ jack_devout->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* */ jack_devout->card_uri = NULL; jack_devout->jack_client = NULL; jack_devout->port_name = NULL; jack_devout->jack_port = NULL; /* buffer */ jack_devout->buffer = (void **) malloc(4 * sizeof(void*)); jack_devout->buffer[0] = (void *) malloc(jack_devout->pcm_channels * jack_devout->buffer_size * sizeof(signed short)); jack_devout->buffer[1] = (void *) malloc(jack_devout->pcm_channels * jack_devout->buffer_size * sizeof(signed short)); jack_devout->buffer[2] = (void *) malloc(jack_devout->pcm_channels * jack_devout->buffer_size * sizeof(signed short)); jack_devout->buffer[3] = (void *) malloc(jack_devout->pcm_channels * jack_devout->buffer_size * sizeof(signed short)); ags_jack_devout_realloc_buffer(jack_devout); /* bpm */ jack_devout->bpm = AGS_SOUNDCARD_DEFAULT_BPM; /* delay factor */ jack_devout->delay_factor = AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR; /* delay and attack */ jack_devout->delay = (gdouble *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(gdouble)); jack_devout->attack = (guint *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(guint)); ags_jack_devout_adjust_delay_and_attack(jack_devout); /* counters */ jack_devout->tact_counter = 0.0; jack_devout->delay_counter = 0; jack_devout->tic_counter = 0; jack_devout->note_offset = 0; jack_devout->note_offset_absolute = 0; jack_devout->loop_left = AGS_SOUNDCARD_DEFAULT_LOOP_LEFT; jack_devout->loop_right = AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT; jack_devout->do_loop = FALSE; jack_devout->loop_offset = 0; /* callback mutex */ jack_devout->callback_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(jack_devout->callback_mutex, NULL); jack_devout->callback_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(jack_devout->callback_cond, NULL); /* callback finish mutex */ jack_devout->callback_finish_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(jack_devout->callback_finish_mutex, NULL); jack_devout->callback_finish_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(jack_devout->callback_finish_cond, NULL); /* parent */ jack_devout->application_context = NULL; jack_devout->application_mutex = NULL; /* */ jack_devout->notify_soundcard = NULL; /* all AgsAudio */ jack_devout->audio = NULL; } void ags_jack_devout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(jack_devout->application_context == (GObject *) application_context){ return; } if(jack_devout->application_context != NULL){ g_object_unref(G_OBJECT(jack_devout->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *segmentation; guint denumerator, numerator; g_object_ref(G_OBJECT(application_context)); jack_devout->application_mutex = application_context->mutex; config = ags_config_get_instance(); /* segmentation */ segmentation = ags_config_get_value(config, AGS_CONFIG_GENERIC, "segmentation"); if(segmentation != NULL){ sscanf(segmentation, "%d/%d", &denumerator, &numerator); jack_devout->delay_factor = 1.0 / numerator * (numerator / denumerator); } ags_jack_devout_adjust_delay_and_attack(jack_devout); ags_jack_devout_realloc_buffer(jack_devout); }else{ jack_devout->application_mutex = NULL; } jack_devout->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(jack_devout->application_mutex == application_mutex){ return; } jack_devout->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); jack_devout->card_uri = g_strdup(device); } break; case PROP_DSP_CHANNELS: { guint dsp_channels; dsp_channels = g_value_get_uint(value); if(dsp_channels == jack_devout->dsp_channels){ return; } jack_devout->dsp_channels = dsp_channels; } break; case PROP_PCM_CHANNELS: { guint pcm_channels; pcm_channels = g_value_get_uint(value); if(pcm_channels == jack_devout->pcm_channels){ return; } jack_devout->pcm_channels = pcm_channels; ags_jack_devout_realloc_buffer(jack_devout); } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); if(format == jack_devout->format){ return; } jack_devout->format = format; ags_jack_devout_realloc_buffer(jack_devout); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); if(buffer_size == jack_devout->buffer_size){ return; } jack_devout->buffer_size = buffer_size; ags_jack_devout_realloc_buffer(jack_devout); ags_jack_devout_adjust_delay_and_attack(jack_devout); } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); if(samplerate == jack_devout->samplerate){ return; } jack_devout->samplerate = samplerate; ags_jack_devout_realloc_buffer(jack_devout); ags_jack_devout_adjust_delay_and_attack(jack_devout); } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); jack_devout->bpm = bpm; ags_jack_devout_adjust_delay_and_attack(jack_devout); } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); jack_devout->delay_factor = delay_factor; ags_jack_devout_adjust_delay_and_attack(jack_devout); } break; case PROP_JACK_CLIENT: { AgsJackClient *jack_client; jack_client = (AgsJackClient *) g_value_get_object(value); if(jack_devout->jack_client == (GObject *) jack_client){ return; } if(jack_devout->jack_client != NULL){ g_object_unref(G_OBJECT(jack_devout->jack_client)); } if(jack_client != NULL){ g_object_ref(jack_client); } jack_devout->jack_client = (GObject *) jack_client; } break; case PROP_JACK_PORT: { AgsJackPort *jack_port; jack_port = (AgsJackPort *) g_value_get_pointer(value); if(!AGS_IS_JACK_PORT(jack_port) || g_list_find(jack_devout->jack_port, jack_port) != NULL){ return; } if(jack_port != NULL){ g_object_ref(jack_port); jack_devout->jack_port = g_list_append(jack_devout->jack_port, jack_port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_devout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, jack_devout->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, jack_devout->application_mutex); } break; case PROP_DEVICE: { g_value_set_string(value, jack_devout->card_uri); } break; case PROP_DSP_CHANNELS: { g_value_set_uint(value, jack_devout->dsp_channels); } break; case PROP_PCM_CHANNELS: { g_value_set_uint(value, jack_devout->pcm_channels); } break; case PROP_FORMAT: { g_value_set_uint(value, jack_devout->format); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, jack_devout->buffer_size); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, jack_devout->samplerate); } break; case PROP_BUFFER: { g_value_set_pointer(value, jack_devout->buffer); } break; case PROP_BPM: { g_value_set_double(value, jack_devout->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, jack_devout->delay_factor); } break; case PROP_ATTACK: { g_value_set_pointer(value, jack_devout->attack); } break; case PROP_JACK_CLIENT: { g_value_set_object(value, jack_devout->jack_client); } break; case PROP_JACK_PORT: { g_value_set_pointer(value, g_list_copy(jack_devout->jack_port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_jack_devout_dispose(GObject *gobject) { AgsJackDevout *jack_devout; GList *list; jack_devout = AGS_JACK_DEVOUT(gobject); /* application context */ if(jack_devout->application_context != NULL){ g_object_unref(jack_devout->application_context); jack_devout->application_context = NULL; } /* unref audio */ if(jack_devout->audio != NULL){ list = jack_devout->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(jack_devout->audio, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_jack_devout_parent_class)->dispose(gobject); } void ags_jack_devout_finalize(GObject *gobject) { AgsJackDevout *jack_devout; AgsMutexManager *mutex_manager; GList *list, *list_next; jack_devout = AGS_JACK_DEVOUT(gobject); /* remove jack_devout mutex */ pthread_mutex_lock(jack_devout->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(jack_devout->application_mutex); /* free output buffer */ free(jack_devout->buffer[0]); free(jack_devout->buffer[1]); free(jack_devout->buffer[2]); free(jack_devout->buffer[3]); /* free buffer array */ free(jack_devout->buffer); /* free AgsAttack */ free(jack_devout->attack); /* unref notify soundcard */ if(jack_devout->notify_soundcard != NULL){ if(jack_devout->application_context != NULL){ ags_task_thread_remove_cyclic_task(AGS_APPLICATION_CONTEXT(jack_devout->application_context)->task_thread, jack_devout->notify_soundcard); } g_object_unref(jack_devout->notify_soundcard); } /* application context */ if(jack_devout->application_context != NULL){ g_object_unref(jack_devout->application_context); } /* unref audio */ if(jack_devout->audio != NULL){ list = jack_devout->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(jack_devout->audio, g_object_unref); } pthread_mutex_destroy(jack_devout->mutex); free(jack_devout->mutex); pthread_mutexattr_destroy(jack_devout->mutexattr); free(jack_devout->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_jack_devout_parent_class)->finalize(gobject); } void ags_jack_devout_connect(AgsConnectable *connectable) { AgsJackDevout *jack_devout; GList *list; jack_devout = AGS_JACK_DEVOUT(connectable); /* */ list = jack_devout->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_jack_devout_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_jack_devout_switch_buffer_flag: * @jack_devout: an #AgsJackDevout * * The buffer flag indicates the currently played buffer. * * Since: 1.0.0 */ void ags_jack_devout_switch_buffer_flag(AgsJackDevout *jack_devout) { if((AGS_JACK_DEVOUT_BUFFER0 & (jack_devout->flags)) != 0){ jack_devout->flags &= (~AGS_JACK_DEVOUT_BUFFER0); jack_devout->flags |= AGS_JACK_DEVOUT_BUFFER1; }else if((AGS_JACK_DEVOUT_BUFFER1 & (jack_devout->flags)) != 0){ jack_devout->flags &= (~AGS_JACK_DEVOUT_BUFFER1); jack_devout->flags |= AGS_JACK_DEVOUT_BUFFER2; }else if((AGS_JACK_DEVOUT_BUFFER2 & (jack_devout->flags)) != 0){ jack_devout->flags &= (~AGS_JACK_DEVOUT_BUFFER2); jack_devout->flags |= AGS_JACK_DEVOUT_BUFFER3; }else if((AGS_JACK_DEVOUT_BUFFER3 & (jack_devout->flags)) != 0){ jack_devout->flags &= (~AGS_JACK_DEVOUT_BUFFER3); jack_devout->flags |= AGS_JACK_DEVOUT_BUFFER0; } } void ags_jack_devout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); jack_devout->application_context = (GObject *) application_context; } AgsApplicationContext* ags_jack_devout_get_application_context(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); return((AgsApplicationContext *) jack_devout->application_context); } void ags_jack_devout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); jack_devout->application_mutex = application_mutex; } pthread_mutex_t* ags_jack_devout_get_application_mutex(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); return(jack_devout->application_mutex); } void ags_jack_devout_set_device(AgsSoundcard *soundcard, gchar *device) { AgsJackDevout *jack_devout; GList *jack_port, *jack_port_start; gchar *str; int ret; guint nth_card; guint i; jack_devout = AGS_JACK_DEVOUT(soundcard); if(jack_devout->card_uri == device || !g_ascii_strcasecmp(jack_devout->card_uri, device)){ return; } if(!g_str_has_prefix(device, "ags-jack-devout-")){ g_warning("invalid JACK device prefix"); return; } ret = sscanf(device, "ags-jack-devout-%u", &nth_card); if(ret != 1){ g_warning("invalid JACK device specifier"); return; } if(jack_devout->card_uri != NULL){ g_free(jack_devout->card_uri); } jack_devout->card_uri = g_strdup(device); /* apply name to port */ jack_port_start = jack_port = g_list_copy(jack_devout->jack_port); for(i = 0; i < jack_devout->pcm_channels; i++){ str = g_strdup_printf("ags-soundcard%d-%04d", nth_card, i); g_object_set(jack_port->data, "port-name", str, NULL); g_free(str); jack_port = jack_port->next; } g_list_free(jack_port_start); } gchar* ags_jack_devout_get_device(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); return(jack_devout->card_uri); } void ags_jack_devout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); g_object_set(jack_devout, "pcm-channels", channels, "samplerate", rate, "buffer-size", buffer_size, "format", format, NULL); } void ags_jack_devout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); if(channels != NULL){ *channels = jack_devout->pcm_channels; } if(rate != NULL){ *rate = jack_devout->samplerate; } if(buffer_size != NULL){ *buffer_size = jack_devout->buffer_size; } if(format != NULL){ *format = jack_devout->format; } } /** * ags_jack_devout_list_cards: * @soundcard: the #AgsSoundcard * @card_id: JACK identifier * @card_name: card name * * List available soundcards. * * Since: 1.0.0 */ void ags_jack_devout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name) { AgsJackDevout *jack_devout; AgsApplicationContext *application_context; GList *list, *list_start; pthread_mutex_t *application_mutex; jack_devout = AGS_JACK_DEVOUT(soundcard); application_context = (AgsApplicationContext *) jack_devout->application_context; if(application_context == NULL){ return; } application_mutex = jack_devout->application_mutex; if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(AGS_IS_JACK_DEVOUT(list->data)){ if(card_id != NULL){ if(AGS_JACK_DEVOUT(list->data)->card_uri != NULL){ *card_id = g_list_prepend(*card_id, g_strdup(AGS_JACK_DEVOUT(list->data)->card_uri)); }else{ *card_id = g_list_prepend(*card_id, g_strdup("(null)")); g_warning("ags_jack_devout_list_cards() - card id (null)"); } } if(card_name != NULL){ if(AGS_JACK_DEVOUT(list->data)->jack_client != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(AGS_JACK_CLIENT(AGS_JACK_DEVOUT(list->data)->jack_client)->name)); }else{ *card_name = g_list_prepend(*card_name, g_strdup("(null)")); g_warning("ags_jack_devout_list_cards() - JACK client not connected (null)"); } } } list = list->next; } pthread_mutex_unlock(application_mutex); if(card_id != NULL && *card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL && *card_name != NULL){ *card_name = g_list_reverse(*card_name); } } void ags_jack_devout_pcm_info(AgsSoundcard *soundcard, char *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error) { if(channels_min != NULL){ *channels_min = 1; } if(channels_max != NULL){ *channels_max = 1024; } if(rate_min != NULL){ *rate_min = 8000; } if(rate_max != NULL){ *rate_max = 192000; } if(buffer_size_min != NULL){ *buffer_size_min = 64; } if(buffer_size_max != NULL){ *buffer_size_max = 8192; } } gboolean ags_jack_devout_is_starting(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); return((((AGS_JACK_DEVOUT_START_PLAY & (jack_devout->flags)) != 0) ? TRUE: FALSE)); } gboolean ags_jack_devout_is_playing(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); return((((AGS_JACK_DEVOUT_PLAY & (jack_devout->flags)) != 0) ? TRUE: FALSE)); } gchar* ags_jack_devout_get_uptime(AgsSoundcard *soundcard) { gchar *uptime; if(ags_soundcard_is_playing(soundcard)){ guint samplerate; guint buffer_size; guint note_offset; gdouble bpm; gdouble delay_factor; gdouble delay; ags_soundcard_get_presets(soundcard, NULL, &samplerate, &buffer_size, NULL); note_offset = ags_soundcard_get_note_offset_absolute(soundcard); bpm = ags_soundcard_get_bpm(soundcard); delay_factor = ags_soundcard_get_delay_factor(soundcard); /* calculate delays */ delay = ags_soundcard_get_absolute_delay(soundcard); uptime = ags_time_get_uptime_from_offset(note_offset, bpm, delay, delay_factor); }else{ uptime = g_strdup(AGS_TIME_ZERO); } return(uptime); } void ags_jack_devout_port_init(AgsSoundcard *soundcard, GError **error) { AgsJackDevout *jack_devout; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint format, word_size; pthread_mutex_t *mutex; jack_devout = AGS_JACK_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_devout); pthread_mutex_unlock(application_context->mutex); /* retrieve word size */ pthread_mutex_lock(mutex); switch(jack_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_jack_devout_port_init(): unsupported word size"); return; } /* prepare for playback */ jack_devout->flags |= (AGS_JACK_DEVOUT_BUFFER3 | AGS_JACK_DEVOUT_START_PLAY | AGS_JACK_DEVOUT_PLAY | AGS_JACK_DEVOUT_NONBLOCKING); memset(jack_devout->buffer[0], 0, jack_devout->pcm_channels * jack_devout->buffer_size * word_size); memset(jack_devout->buffer[1], 0, jack_devout->pcm_channels * jack_devout->buffer_size * word_size); memset(jack_devout->buffer[2], 0, jack_devout->pcm_channels * jack_devout->buffer_size * word_size); memset(jack_devout->buffer[3], 0, jack_devout->pcm_channels * jack_devout->buffer_size * word_size); /* */ jack_devout->tact_counter = 0.0; jack_devout->delay_counter = 0.0; jack_devout->tic_counter = 0; jack_devout->flags |= (AGS_JACK_DEVOUT_INITIALIZED | AGS_JACK_DEVOUT_START_PLAY | AGS_JACK_DEVOUT_PLAY); g_atomic_int_and(&(jack_devout->sync_flags), (~(AGS_JACK_DEVOUT_PASS_THROUGH))); g_atomic_int_or(&(jack_devout->sync_flags), AGS_JACK_DEVOUT_INITIAL_CALLBACK); pthread_mutex_unlock(mutex); } void ags_jack_devout_port_play(AgsSoundcard *soundcard, GError **error) { AgsJackClient *jack_client; AgsJackDevout *jack_devout; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; guint word_size; gboolean jack_client_activated; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; pthread_mutex_t *client_mutex; jack_devout = AGS_JACK_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* mutices */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); task_thread = (AgsTaskThread *) application_context->task_thread; mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_devout); pthread_mutex_unlock(application_context->mutex); /* client */ pthread_mutex_lock(mutex); jack_client = (AgsJackClient *) jack_devout->jack_client; callback_mutex = jack_devout->callback_mutex; callback_finish_mutex = jack_devout->callback_finish_mutex; pthread_mutex_unlock(mutex); /* do playback */ pthread_mutex_lock(mutex); jack_devout->flags &= (~AGS_JACK_DEVOUT_START_PLAY); notify_soundcard = AGS_NOTIFY_SOUNDCARD(jack_devout->notify_soundcard); if((AGS_JACK_DEVOUT_INITIALIZED & (jack_devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } switch(jack_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_jack_devout_port_play(): unsupported word size"); return; } pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_context->mutex); client_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_client); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(client_mutex); jack_client_activated = ((AGS_JACK_CLIENT_ACTIVATED & (jack_client->flags)) != 0) ? TRUE: FALSE; pthread_mutex_unlock(client_mutex); if(jack_client_activated){ /* signal */ if((AGS_JACK_DEVOUT_INITIAL_CALLBACK & (g_atomic_int_get(&(jack_devout->sync_flags)))) == 0){ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(jack_devout->sync_flags), AGS_JACK_DEVOUT_CALLBACK_DONE); if((AGS_JACK_DEVOUT_CALLBACK_WAIT & (g_atomic_int_get(&(jack_devout->sync_flags)))) != 0){ pthread_cond_signal(jack_devout->callback_cond); } pthread_mutex_unlock(callback_mutex); } /* wait callback */ if((AGS_JACK_DEVOUT_INITIAL_CALLBACK & (g_atomic_int_get(&(jack_devout->sync_flags)))) == 0){ pthread_mutex_lock(callback_finish_mutex); if((AGS_JACK_DEVOUT_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(jack_devout->sync_flags)))) == 0){ g_atomic_int_or(&(jack_devout->sync_flags), AGS_JACK_DEVOUT_CALLBACK_FINISH_WAIT); while((AGS_JACK_DEVOUT_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(jack_devout->sync_flags)))) == 0 && (AGS_JACK_DEVOUT_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(jack_devout->sync_flags)))) != 0){ pthread_cond_wait(jack_devout->callback_finish_cond, callback_finish_mutex); } } g_atomic_int_and(&(jack_devout->sync_flags), (~(AGS_JACK_DEVOUT_CALLBACK_FINISH_WAIT | AGS_JACK_DEVOUT_CALLBACK_FINISH_DONE))); pthread_mutex_unlock(callback_finish_mutex); }else{ g_atomic_int_and(&(jack_devout->sync_flags), (~AGS_JACK_DEVOUT_INITIAL_CALLBACK)); } } /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); if(task_thread != NULL){ AgsTicDevice *tic_device; AgsClearBuffer *clear_buffer; AgsSwitchBufferFlag *switch_buffer_flag; GList *task; task = NULL; /* tic soundcard */ tic_device = ags_tic_device_new((GObject *) jack_devout); task = g_list_append(task, tic_device); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) jack_devout); task = g_list_append(task, clear_buffer); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) jack_devout); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); }else{ guint nth_buffer; guint word_size; /* tic */ ags_soundcard_tic(AGS_SOUNDCARD(jack_devout)); switch(jack_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_jack_devout_port_play(): unsupported word size"); return; } /* reset - clear buffer */ if((AGS_JACK_DEVOUT_BUFFER0 & (jack_devout->flags)) != 0){ nth_buffer = 3; }else if((AGS_JACK_DEVOUT_BUFFER1 & (jack_devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_JACK_DEVOUT_BUFFER2 & (jack_devout->flags)) != 0){ nth_buffer = 1; }else if((AGS_JACK_DEVOUT_BUFFER3 & (jack_devout->flags)) != 0){ nth_buffer = 2; } memset(jack_devout->buffer[nth_buffer], 0, (size_t) jack_devout->pcm_channels * jack_devout->buffer_size * word_size); /* reset - switch buffer flags */ ags_jack_devout_switch_buffer_flag(jack_devout); } } void ags_jack_devout_port_free(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint word_size; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; jack_devout = AGS_JACK_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) jack_devout); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); notify_soundcard = AGS_NOTIFY_SOUNDCARD(jack_devout->notify_soundcard); if((AGS_JACK_DEVOUT_INITIALIZED & (jack_devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } g_object_ref(notify_soundcard); // g_atomic_int_or(&(AGS_THREAD(application_context->main_loop)->flags), // AGS_THREAD_TIMING); callback_mutex = jack_devout->callback_mutex; callback_finish_mutex = jack_devout->callback_finish_mutex; jack_devout->flags &= (~(AGS_JACK_DEVOUT_BUFFER0 | AGS_JACK_DEVOUT_BUFFER1 | AGS_JACK_DEVOUT_BUFFER2 | AGS_JACK_DEVOUT_BUFFER3 | AGS_JACK_DEVOUT_PLAY)); g_atomic_int_or(&(jack_devout->sync_flags), AGS_JACK_DEVOUT_PASS_THROUGH); g_atomic_int_and(&(jack_devout->sync_flags), (~AGS_JACK_DEVOUT_INITIAL_CALLBACK)); /* signal callback */ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(jack_devout->sync_flags), AGS_JACK_DEVOUT_CALLBACK_DONE); if((AGS_JACK_DEVOUT_CALLBACK_WAIT & (g_atomic_int_get(&(jack_devout->sync_flags)))) != 0){ pthread_cond_signal(jack_devout->callback_cond); } pthread_mutex_unlock(callback_mutex); /* signal thread */ pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(jack_devout->sync_flags), AGS_JACK_DEVOUT_CALLBACK_FINISH_DONE); if((AGS_JACK_DEVOUT_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(jack_devout->sync_flags)))) != 0){ pthread_cond_signal(jack_devout->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); g_object_unref(notify_soundcard); /* */ jack_devout->note_offset = 0; jack_devout->note_offset_absolute = 0; switch(jack_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: word_size = 0; g_critical("ags_jack_devout_free(): unsupported word size"); } memset(jack_devout->buffer[1], 0, (size_t) jack_devout->pcm_channels * jack_devout->buffer_size * word_size); memset(jack_devout->buffer[2], 0, (size_t) jack_devout->pcm_channels * jack_devout->buffer_size * word_size); memset(jack_devout->buffer[3], 0, (size_t) jack_devout->pcm_channels * jack_devout->buffer_size * word_size); memset(jack_devout->buffer[0], 0, (size_t) jack_devout->pcm_channels * jack_devout->buffer_size * word_size); pthread_mutex_unlock(mutex); } void ags_jack_devout_tic(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; gdouble delay; jack_devout = AGS_JACK_DEVOUT(soundcard); /* determine if attack should be switched */ delay = jack_devout->delay[jack_devout->tic_counter]; if((guint) jack_devout->delay_counter + 1 >= (guint) delay){ if(jack_devout->do_loop && jack_devout->note_offset + 1 == jack_devout->loop_right){ ags_soundcard_set_note_offset(soundcard, jack_devout->loop_left); }else{ ags_soundcard_set_note_offset(soundcard, jack_devout->note_offset + 1); } ags_soundcard_set_note_offset_absolute(soundcard, jack_devout->note_offset_absolute + 1); /* delay */ ags_soundcard_offset_changed(soundcard, jack_devout->note_offset); /* reset - delay counter */ jack_devout->delay_counter = 0.0; jack_devout->tact_counter += 1.0; }else{ jack_devout->delay_counter += 1.0; } } void ags_jack_devout_offset_changed(AgsSoundcard *soundcard, guint note_offset) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); jack_devout->tic_counter += 1; if(jack_devout->tic_counter == AGS_SOUNDCARD_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ jack_devout->tic_counter = 0; } } void ags_jack_devout_set_bpm(AgsSoundcard *soundcard, gdouble bpm) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); jack_devout->bpm = bpm; ags_jack_devout_adjust_delay_and_attack(jack_devout); } gdouble ags_jack_devout_get_bpm(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); return(jack_devout->bpm); } void ags_jack_devout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); jack_devout->delay_factor = delay_factor; ags_jack_devout_adjust_delay_and_attack(jack_devout); } gdouble ags_jack_devout_get_delay_factor(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); return(jack_devout->delay_factor); } gdouble ags_jack_devout_get_absolute_delay(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); return((60.0 * (((gdouble) jack_devout->samplerate / (gdouble) jack_devout->buffer_size) / (gdouble) jack_devout->bpm) * ((1.0 / 16.0) * (1.0 / (gdouble) jack_devout->delay_factor)))); } gdouble ags_jack_devout_get_delay(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; guint index; jack_devout = AGS_JACK_DEVOUT(soundcard); index = jack_devout->tic_counter; return(jack_devout->delay[index]); } guint ags_jack_devout_get_attack(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; guint index; jack_devout = AGS_JACK_DEVOUT(soundcard); index = jack_devout->tic_counter; return(jack_devout->attack[index]); } void* ags_jack_devout_get_buffer(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; void *buffer; jack_devout = AGS_JACK_DEVOUT(soundcard); if((AGS_JACK_DEVOUT_BUFFER0 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[0]; }else if((AGS_JACK_DEVOUT_BUFFER1 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[1]; }else if((AGS_JACK_DEVOUT_BUFFER2 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[2]; }else if((AGS_JACK_DEVOUT_BUFFER3 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[3]; }else{ buffer = NULL; } return(buffer); } void* ags_jack_devout_get_next_buffer(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; void *buffer; jack_devout = AGS_JACK_DEVOUT(soundcard); if((AGS_JACK_DEVOUT_BUFFER0 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[1]; }else if((AGS_JACK_DEVOUT_BUFFER1 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[2]; }else if((AGS_JACK_DEVOUT_BUFFER2 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[3]; }else if((AGS_JACK_DEVOUT_BUFFER3 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[0]; }else{ buffer = NULL; } return(buffer); } void* ags_jack_devout_get_prev_buffer(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; void *buffer; jack_devout = AGS_JACK_DEVOUT(soundcard); if((AGS_JACK_DEVOUT_BUFFER0 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[3]; }else if((AGS_JACK_DEVOUT_BUFFER1 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[0]; }else if((AGS_JACK_DEVOUT_BUFFER2 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[1]; }else if((AGS_JACK_DEVOUT_BUFFER3 & (jack_devout->flags)) != 0){ buffer = jack_devout->buffer[2]; }else{ buffer = NULL; } return(buffer); } guint ags_jack_devout_get_delay_counter(AgsSoundcard *soundcard) { return(AGS_JACK_DEVOUT(soundcard)->delay_counter); } void ags_jack_devout_set_note_offset(AgsSoundcard *soundcard, guint note_offset) { AGS_JACK_DEVOUT(soundcard)->note_offset = note_offset; } guint ags_jack_devout_get_note_offset(AgsSoundcard *soundcard) { return(AGS_JACK_DEVOUT(soundcard)->note_offset); } void ags_jack_devout_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset) { AGS_JACK_DEVOUT(soundcard)->note_offset_absolute = note_offset; } guint ags_jack_devout_get_note_offset_absolute(AgsSoundcard *soundcard) { return(AGS_JACK_DEVOUT(soundcard)->note_offset_absolute); } void ags_jack_devout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop) { AGS_JACK_DEVOUT(soundcard)->loop_left = loop_left; AGS_JACK_DEVOUT(soundcard)->loop_right = loop_right; AGS_JACK_DEVOUT(soundcard)->do_loop = do_loop; if(do_loop){ AGS_JACK_DEVOUT(soundcard)->loop_offset = AGS_JACK_DEVOUT(soundcard)->note_offset; } } void ags_jack_devout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop) { if(loop_left != NULL){ *loop_left = AGS_JACK_DEVOUT(soundcard)->loop_left; } if(loop_right != NULL){ *loop_right = AGS_JACK_DEVOUT(soundcard)->loop_right; } if(do_loop != NULL){ *do_loop = AGS_JACK_DEVOUT(soundcard)->do_loop; } } guint ags_jack_devout_get_loop_offset(AgsSoundcard *soundcard) { return(AGS_JACK_DEVOUT(soundcard)->loop_offset); } void ags_jack_devout_set_audio(AgsSoundcard *soundcard, GList *audio) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); jack_devout->audio = audio; } GList* ags_jack_devout_get_audio(AgsSoundcard *soundcard) { AgsJackDevout *jack_devout; jack_devout = AGS_JACK_DEVOUT(soundcard); return(jack_devout->audio); } /** * ags_jack_devout_adjust_delay_and_attack: * @jack_devout: the #AgsJackDevout * * Calculate delay and attack and reset it. * * Since: 1.0.0 */ void ags_jack_devout_adjust_delay_and_attack(AgsJackDevout *jack_devout) { gdouble delay; guint default_tact_frames; guint delay_tact_frames; guint default_period; gint next_attack; guint i; if(jack_devout == NULL){ return; } delay = ags_jack_devout_get_absolute_delay(AGS_SOUNDCARD(jack_devout)); #ifdef AGS_DEBUG g_message("delay : %f", delay); #endif default_tact_frames = (guint) (delay * jack_devout->buffer_size); delay_tact_frames = (guint) (floor(delay) * jack_devout->buffer_size); default_period = (1.0 / AGS_SOUNDCARD_DEFAULT_PERIOD) * (default_tact_frames); i = 0; jack_devout->attack[0] = (guint) floor(0.25 * jack_devout->buffer_size); next_attack = (((jack_devout->attack[i] + default_tact_frames) / jack_devout->buffer_size) - delay) * jack_devout->buffer_size; if(next_attack >= jack_devout->buffer_size){ next_attack = jack_devout->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ jack_devout->attack[i] = jack_devout->attack[i] - ((gdouble) next_attack / 2.0); if(jack_devout->attack[i] < 0){ jack_devout->attack[i] = 0; } if(jack_devout->attack[i] >= jack_devout->buffer_size){ jack_devout->attack[i] = jack_devout->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= jack_devout->buffer_size){ next_attack = jack_devout->buffer_size - 1; } } for(i = 1; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD; i++){ jack_devout->attack[i] = next_attack; next_attack = (((jack_devout->attack[i] + default_tact_frames) / jack_devout->buffer_size) - delay) * jack_devout->buffer_size; if(next_attack >= jack_devout->buffer_size){ next_attack = jack_devout->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ jack_devout->attack[i] = jack_devout->attack[i] - ((gdouble) next_attack / 2.0); if(jack_devout->attack[i] < 0){ jack_devout->attack[i] = 0; } if(jack_devout->attack[i] >= jack_devout->buffer_size){ jack_devout->attack[i] = jack_devout->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= jack_devout->buffer_size){ next_attack = jack_devout->buffer_size - 1; } } #ifdef AGS_DEBUG g_message("%d", jack_devout->attack[i]); #endif } jack_devout->attack[0] = jack_devout->attack[i - 2]; for(i = 0; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD - 1; i++){ jack_devout->delay[i] = ((gdouble) (default_tact_frames + jack_devout->attack[i] - jack_devout->attack[i + 1])) / (gdouble) jack_devout->buffer_size; #ifdef AGS_DEBUG g_message("%f", jack_devout->delay[i]); #endif } jack_devout->delay[i] = ((gdouble) (default_tact_frames + jack_devout->attack[i] - jack_devout->attack[0])) / (gdouble) jack_devout->buffer_size; } /** * ags_jack_devout_realloc_buffer: * @jack_devout: the #AgsJackDevout * * Reallocate the internal audio buffer. * * Since: 1.0.0 */ void ags_jack_devout_realloc_buffer(AgsJackDevout *jack_devout) { guint word_size; if(jack_devout == NULL){ return; } switch(jack_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_jack_devout_realloc_buffer(): unsupported word size"); return; } if(g_list_length(jack_devout->jack_port) < jack_devout->pcm_channels){ AgsJackPort *jack_port; gchar *str; guint nth_soundcard; guint i; if(jack_devout->card_uri != NULL){ sscanf(jack_devout->card_uri, "ags-jack-devout-%u", &nth_soundcard); }else{ g_warning("ags_jack_devout_realloc_buffer() - card uri not set"); return; } for(i = g_list_length(jack_devout->jack_port); i < jack_devout->pcm_channels; i++){ str = g_strdup_printf("ags-soundcard%d-%04d", nth_soundcard, i); jack_port = ags_jack_port_new(jack_devout->jack_client); ags_jack_client_add_port((AgsJackClient *) jack_devout->jack_client, (GObject *) jack_port); jack_devout->jack_port = g_list_prepend(jack_devout->jack_port, jack_port); if(jack_devout->port_name == NULL){ jack_devout->port_name = (gchar **) malloc(2 * sizeof(gchar *)); jack_devout->port_name[0] = g_strdup(str); }else{ jack_devout->port_name = (gchar **) realloc(jack_devout->port_name, (i + 2) * sizeof(gchar *)); jack_devout->port_name[i] = g_strdup(str); } ags_jack_port_register(jack_port, str, TRUE, FALSE, TRUE); } jack_devout->port_name[jack_devout->pcm_channels] = NULL; }else if(g_list_length(jack_devout->jack_port) > jack_devout->pcm_channels){ GList *jack_port, *jack_port_next; guint i; jack_port = jack_devout->jack_port; for(i = 0; i < g_list_length(jack_devout->jack_port) - jack_devout->pcm_channels; i++){ jack_port_next = jack_port->next; jack_devout->jack_port = g_list_remove(jack_devout->jack_port, jack_port->data); ags_jack_port_unregister(jack_port->data); g_object_unref(jack_port->data); jack_port = jack_port_next; } jack_devout->port_name = (gchar **) realloc(jack_devout->port_name, (jack_devout->pcm_channels + 1) * sizeof(gchar *)); jack_devout->port_name[jack_devout->pcm_channels] = NULL; } /* AGS_JACK_DEVOUT_BUFFER_0 */ if(jack_devout->buffer[0] != NULL){ free(jack_devout->buffer[0]); } jack_devout->buffer[0] = (void *) malloc(jack_devout->pcm_channels * jack_devout->buffer_size * word_size); /* AGS_JACK_DEVOUT_BUFFER_1 */ if(jack_devout->buffer[1] != NULL){ free(jack_devout->buffer[1]); } jack_devout->buffer[1] = (void *) malloc(jack_devout->pcm_channels * jack_devout->buffer_size * word_size); /* AGS_JACK_DEVOUT_BUFFER_2 */ if(jack_devout->buffer[2] != NULL){ free(jack_devout->buffer[2]); } jack_devout->buffer[2] = (void *) malloc(jack_devout->pcm_channels * jack_devout->buffer_size * word_size); /* AGS_JACK_DEVOUT_BUFFER_3 */ if(jack_devout->buffer[3] != NULL){ free(jack_devout->buffer[3]); } jack_devout->buffer[3] = (void *) malloc(jack_devout->pcm_channels * jack_devout->buffer_size * word_size); } /** * ags_jack_devout_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsJackDevout, refering to @application_context. * * Returns: a new #AgsJackDevout * * Since: 1.0.0 */ AgsJackDevout* ags_jack_devout_new(GObject *application_context) { AgsJackDevout *jack_devout; jack_devout = (AgsJackDevout *) g_object_new(AGS_TYPE_JACK_DEVOUT, "application-context", application_context, NULL); return(jack_devout); } gsequencer-1.4.24/ags/audio/ags_audio_application_context.c0000644000175000017500000011713513246707333021005 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_audio_application_context_class_init(AgsAudioApplicationContextClass *audio_application_context); void ags_audio_application_context_connectable_interface_init(AgsConnectableInterface *connectable); void ags_audio_application_context_concurrency_provider_interface_init(AgsConcurrencyProviderInterface *concurrency_provider); void ags_audio_application_context_sound_provider_interface_init(AgsSoundProviderInterface *sound_provider); void ags_audio_application_context_init(AgsAudioApplicationContext *audio_application_context); void ags_audio_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_audio_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_audio_application_context_connect(AgsConnectable *connectable); void ags_audio_application_context_disconnect(AgsConnectable *connectable); AgsThread* ags_audio_application_context_get_main_loop(AgsConcurrencyProvider *concurrency_provider); AgsThread* ags_audio_application_context_get_task_thread(AgsConcurrencyProvider *concurrency_provider); AgsThreadPool* ags_audio_application_context_get_thread_pool(AgsConcurrencyProvider *concurrency_provider); GList* ags_audio_application_context_get_worker(AgsConcurrencyProvider *concurrency_provider); void ags_audio_application_context_set_worker(AgsConcurrencyProvider *concurrency_provider, GList *worker); GList* ags_audio_application_context_get_soundcard(AgsSoundProvider *sound_provider); GObject* ags_audio_application_context_get_default_soundcard_thread(AgsSoundProvider *sound_provider); void ags_audio_application_context_set_default_soundcard_thread(AgsSoundProvider *sound_provider, GObject *soundcard_thread); void ags_audio_application_context_set_soundcard(AgsSoundProvider *sound_provider, GList *soundcard); GList* ags_audio_application_context_get_sequencer(AgsSoundProvider *sound_provider); void ags_audio_application_context_set_sequencer(AgsSoundProvider *sound_provider, GList *sequencer); GList* ags_audio_application_context_get_distributed_manager(AgsSoundProvider *sound_provider); void ags_audio_application_context_dispose(GObject *gobject); void ags_audio_application_context_finalize(GObject *gobject); void ags_audio_application_context_register_types(AgsApplicationContext *application_context); void ags_audio_application_context_load_config(AgsApplicationContext *application_context); void ags_audio_application_context_read(AgsFile *file, xmlNode *node, GObject **application_context); xmlNode* ags_audio_application_context_write(AgsFile *file, xmlNode *parent, GObject *application_context); void ags_audio_application_context_set_value_callback(AgsConfig *config, gchar *group, gchar *key, gchar *value, AgsAudioApplicationContext *audio_application_context); /** * SECTION:ags_audio_application_context * @short_description: audio application context * @title: AgsAudioApplicationContext * @section_id: * @include: ags/audio/ags_audio_application_context.h * * The #AgsAudioApplicationContext provides you sound processing, output and capturing. */ enum{ PROP_0, PROP_SOUNDCARD, }; static gpointer ags_audio_application_context_parent_class = NULL; static AgsConnectableInterface* ags_audio_application_context_parent_connectable_interface; extern AgsApplicationContext *ags_application_context; GType ags_audio_application_context_get_type() { static GType ags_type_audio_application_context = 0; if(!ags_type_audio_application_context){ static const GTypeInfo ags_audio_application_context_info = { sizeof (AgsAudioApplicationContextClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_application_context_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAudioApplicationContext), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_application_context_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_audio_application_context_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_concurrency_provider_interface_info = { (GInterfaceInitFunc) ags_audio_application_context_concurrency_provider_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_sound_provider_interface_info = { (GInterfaceInitFunc) ags_audio_application_context_sound_provider_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audio_application_context = g_type_register_static(AGS_TYPE_APPLICATION_CONTEXT, "AgsAudioApplicationContext", &ags_audio_application_context_info, 0); g_type_add_interface_static(ags_type_audio_application_context, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_audio_application_context, AGS_TYPE_CONCURRENCY_PROVIDER, &ags_concurrency_provider_interface_info); g_type_add_interface_static(ags_type_audio_application_context, AGS_TYPE_SOUND_PROVIDER, &ags_sound_provider_interface_info); } return (ags_type_audio_application_context); } void ags_audio_application_context_class_init(AgsAudioApplicationContextClass *audio_application_context) { GObjectClass *gobject; AgsApplicationContextClass *application_context; GParamSpec *param_spec; ags_audio_application_context_parent_class = g_type_class_peek_parent(audio_application_context); /* GObjectClass */ gobject = (GObjectClass *) audio_application_context; gobject->set_property = ags_audio_application_context_set_property; gobject->get_property = ags_audio_application_context_get_property; gobject->dispose = ags_audio_application_context_dispose; gobject->finalize = ags_audio_application_context_finalize; /** * AgsAudioApplicationContext:soundcard: * * The assigned soundcard. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of audio application context"), i18n_pspec("The soundcard which this audio application context assigned to"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* AgsAudioApplicationContextClass */ application_context = (AgsApplicationContextClass *) audio_application_context; application_context->load_config = ags_audio_application_context_load_config; application_context->register_types = ags_audio_application_context_register_types; application_context->read = ags_audio_application_context_read; application_context->write = ags_audio_application_context_write; } void ags_audio_application_context_connectable_interface_init(AgsConnectableInterface *connectable) { ags_audio_application_context_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_audio_application_context_connect; connectable->disconnect = ags_audio_application_context_disconnect; } void ags_audio_application_context_concurrency_provider_interface_init(AgsConcurrencyProviderInterface *concurrency_provider) { concurrency_provider->get_main_loop = ags_audio_application_context_get_main_loop; concurrency_provider->get_task_thread = ags_audio_application_context_get_task_thread; concurrency_provider->get_thread_pool = ags_audio_application_context_get_thread_pool; concurrency_provider->get_worker = ags_audio_application_context_get_worker; concurrency_provider->set_worker = ags_audio_application_context_set_worker; } void ags_audio_application_context_sound_provider_interface_init(AgsSoundProviderInterface *sound_provider) { sound_provider->get_soundcard = ags_audio_application_context_get_soundcard; sound_provider->set_soundcard = ags_audio_application_context_set_soundcard; sound_provider->get_default_soundcard_thread = ags_audio_application_context_get_default_soundcard_thread; sound_provider->set_default_soundcard_thread = ags_audio_application_context_set_default_soundcard_thread; sound_provider->get_sequencer = ags_audio_application_context_get_sequencer; sound_provider->set_sequencer = ags_audio_application_context_set_sequencer; sound_provider->get_distributed_manager = ags_audio_application_context_get_distributed_manager; } void ags_audio_application_context_init(AgsAudioApplicationContext *audio_application_context) { AgsServer *server; AgsAudioLoop *audio_loop; GObject *soundcard; GObject *sequencer; AgsJackServer *jack_server; AgsPulseServer *pulse_server; AgsCoreAudioServer *core_audio_server; AgsThread *soundcard_thread; AgsThread *sequencer_thread; AgsThread *export_thread; AgsConfig *config; GList *list; gchar *soundcard_group; gchar *sequencer_group; gchar *str; guint i; gboolean has_core_audio; gboolean has_pulse; gboolean has_jack; if(ags_application_context == NULL){ ags_application_context = audio_application_context; } AGS_APPLICATION_CONTEXT(audio_application_context)->log = NULL; /* set config */ config = ags_config_get_instance(); AGS_APPLICATION_CONTEXT(audio_application_context)->config = config; g_object_ref(config); g_object_set(config, "application-context", audio_application_context, NULL); /* distributed manager */ audio_application_context->distributed_manager = NULL; /* core audio server */ core_audio_server = ags_core_audio_server_new((GObject *) audio_application_context, NULL); audio_application_context->distributed_manager = g_list_append(audio_application_context->distributed_manager, core_audio_server); g_object_ref(G_OBJECT(core_audio_server)); has_core_audio = FALSE; /* pulse server */ pulse_server = ags_pulse_server_new((GObject *) audio_application_context, NULL); audio_application_context->distributed_manager = g_list_append(audio_application_context->distributed_manager, pulse_server); g_object_ref(G_OBJECT(pulse_server)); has_pulse = FALSE; /* jack server */ jack_server = ags_jack_server_new((GObject *) audio_application_context, NULL); audio_application_context->distributed_manager = g_list_append(audio_application_context->distributed_manager, jack_server); g_object_ref(G_OBJECT(jack_server)); has_jack = FALSE; /* soundcard */ audio_application_context->soundcard = NULL; soundcard = NULL; soundcard_group = g_strdup("soundcard"); for(i = 0; ; i++){ guint pcm_channels, buffer_size, samplerate, format; if(!g_key_file_has_group(config->key_file, soundcard_group)){ if(i == 0){ g_free(soundcard_group); soundcard_group = g_strdup_printf("%s-%d", AGS_CONFIG_SOUNDCARD, i); continue; }else{ break; } } str = ags_config_get_value(config, soundcard_group, "backend"); if(str != NULL){ if(!g_ascii_strncasecmp(str, "core-audio", 11)){ soundcard = ags_distributed_manager_register_soundcard(AGS_DISTRIBUTED_MANAGER(core_audio_server), TRUE); has_core_audio = TRUE; }else if(!g_ascii_strncasecmp(str, "pulse", 6)){ soundcard = ags_distributed_manager_register_soundcard(AGS_DISTRIBUTED_MANAGER(pulse_server), TRUE); has_pulse = TRUE; }else if(!g_ascii_strncasecmp(str, "jack", 5)){ soundcard = ags_distributed_manager_register_soundcard(AGS_DISTRIBUTED_MANAGER(jack_server), TRUE); has_jack = TRUE; }else if(!g_ascii_strncasecmp(str, "alsa", 5)){ soundcard = (GObject *) ags_devout_new((GObject *) audio_application_context); AGS_DEVOUT(soundcard)->flags &= (~AGS_DEVOUT_OSS); AGS_DEVOUT(soundcard)->flags |= AGS_DEVOUT_ALSA; }else if(!g_ascii_strncasecmp(str, "oss", 4)){ soundcard = (GObject *) ags_devout_new((GObject *) audio_application_context); AGS_DEVOUT(soundcard)->flags &= (~AGS_DEVOUT_ALSA); AGS_DEVOUT(soundcard)->flags |= AGS_DEVOUT_OSS; }else{ g_warning("unknown soundcard backend"); g_free(soundcard_group); soundcard_group = g_strdup_printf("%s-%d", AGS_CONFIG_SOUNDCARD, i); continue; } }else{ g_warning("unknown soundcard backend"); g_free(soundcard_group); soundcard_group = g_strdup_printf("%s-%d", AGS_CONFIG_SOUNDCARD, i); continue; } audio_application_context->soundcard = g_list_append(audio_application_context->soundcard, soundcard); g_object_ref(soundcard); /* device */ str = ags_config_get_value(config, soundcard_group, "device"); if(str != NULL){ ags_soundcard_set_device(AGS_SOUNDCARD(soundcard), str); g_free(str); } /* presets */ pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; format = AGS_SOUNDCARD_DEFAULT_FORMAT; str = ags_config_get_value(config, soundcard_group, "pcm-channels"); if(str != NULL){ pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } str = ags_config_get_value(config, soundcard_group, "buffer-size"); if(str != NULL){ buffer_size = g_ascii_strtoull(str, NULL, 10); g_free(str); } str = ags_config_get_value(config, soundcard_group, "samplerate"); if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); g_free(str); } str = ags_config_get_value(config, soundcard_group, "format"); if(str != NULL){ format = g_ascii_strtoull(str, NULL, 10); g_free(str); } ags_soundcard_set_presets(AGS_SOUNDCARD(soundcard), pcm_channels, samplerate, buffer_size, format); g_free(soundcard_group); soundcard_group = g_strdup_printf("%s-%d", AGS_CONFIG_SOUNDCARD, i); } if(audio_application_context->soundcard != NULL){ soundcard = audio_application_context->soundcard->data; } g_free(soundcard_group); /* AgsSequencer */ audio_application_context->sequencer = NULL; sequencer = NULL; sequencer_group = g_strdup("sequencer"); for(i = 0; ; i++){ guint pcm_channels, buffer_size, samplerate, format; if(!g_key_file_has_group(config->key_file, sequencer_group)){ if(i == 0){ g_free(sequencer_group); sequencer_group = g_strdup_printf("%s-%d", AGS_CONFIG_SEQUENCER, i); continue; }else{ break; } } str = ags_config_get_value(config, sequencer_group, "backend"); /* change sequencer */ if(str != NULL){ if(!g_ascii_strncasecmp(str, "jack", 5)){ sequencer = ags_distributed_manager_register_sequencer(AGS_DISTRIBUTED_MANAGER(jack_server), FALSE); has_jack = TRUE; }else if(!g_ascii_strncasecmp(str, "alsa", 5)){ sequencer = (GObject *) ags_midiin_new((GObject *) audio_application_context); AGS_MIDIIN(sequencer)->flags &= (~AGS_MIDIIN_OSS); AGS_MIDIIN(sequencer)->flags |= AGS_MIDIIN_ALSA; }else if(!g_ascii_strncasecmp(str, "oss", 4)){ sequencer = (GObject *) ags_midiin_new((GObject *) audio_application_context); AGS_MIDIIN(sequencer)->flags &= (~AGS_MIDIIN_ALSA); AGS_MIDIIN(sequencer)->flags |= AGS_MIDIIN_OSS; }else{ g_warning("unknown sequencer backend"); g_free(sequencer_group); sequencer_group = g_strdup_printf("%s-%d", AGS_CONFIG_SEQUENCER, i); continue; } }else{ g_warning("unknown sequencer backend"); g_free(sequencer_group); sequencer_group = g_strdup_printf("%s-%d", AGS_CONFIG_SEQUENCER, i); continue; } audio_application_context->sequencer = g_list_append(audio_application_context->sequencer, sequencer); g_object_ref(sequencer); /* device */ str = ags_config_get_value(config, sequencer_group, "device"); if(str != NULL){ ags_sequencer_set_device(AGS_SEQUENCER(sequencer), str); g_free(str); } g_free(sequencer_group); sequencer_group = g_strdup_printf("%s-%d", AGS_CONFIG_SEQUENCER, i); } g_free(sequencer_group); //TODO:JK: comment out /* if(jack_enabled){ GObject *tmp; tmp = ags_distributed_manager_register_sequencer(AGS_DISTRIBUTED_MANAGER(jack_server), FALSE); if(tmp != NULL){ sequencer = tmp; audio_application_context->sequencer = g_list_prepend(audio_application_context->sequencer, sequencer); g_object_ref(G_OBJECT(sequencer)); } } */ /* AgsServer */ audio_application_context->server = ags_server_new((GObject *) audio_application_context); /* AgsAudioLoop */ audio_loop = ags_audio_loop_new((GObject *) soundcard, (GObject *) audio_application_context); g_object_set(audio_application_context, "main-loop", audio_loop, NULL); g_object_ref(audio_loop); ags_connectable_connect(AGS_CONNECTABLE(audio_loop)); /* AgsTaskThread */ AGS_APPLICATION_CONTEXT(audio_application_context)->task_thread = (GObject *) ags_task_thread_new(); ags_main_loop_set_async_queue(AGS_MAIN_LOOP(audio_loop), AGS_APPLICATION_CONTEXT(audio_application_context)->task_thread); ags_thread_add_child_extended(AGS_THREAD(audio_loop), AGS_THREAD(AGS_APPLICATION_CONTEXT(audio_application_context)->task_thread), TRUE, TRUE); /* AgsWorkerThread */ audio_application_context->worker = NULL; /* AgsSoundcardThread */ audio_application_context->soundcard_thread = NULL; list = audio_application_context->soundcard; while(list != NULL){ AgsNotifySoundcard *notify_soundcard; soundcard_thread = (AgsThread *) ags_soundcard_thread_new(list->data); ags_thread_add_child_extended(AGS_THREAD(audio_loop), soundcard_thread, TRUE, TRUE); /* notify soundcard */ notify_soundcard = ags_notify_soundcard_new(soundcard_thread); AGS_TASK(notify_soundcard)->task_thread = AGS_APPLICATION_CONTEXT(audio_application_context)->task_thread; if(AGS_IS_DEVOUT(list->data)){ AGS_DEVOUT(list->data)->notify_soundcard = notify_soundcard; }else if(AGS_IS_JACK_DEVOUT(list->data)){ AGS_JACK_DEVOUT(list->data)->notify_soundcard = notify_soundcard; }else if(AGS_IS_PULSE_DEVOUT(list->data)){ AGS_PULSE_DEVOUT(list->data)->notify_soundcard = notify_soundcard; }else if(AGS_IS_CORE_AUDIO_DEVOUT(list->data)){ AGS_CORE_AUDIO_DEVOUT(list->data)->notify_soundcard = notify_soundcard; } ags_task_thread_append_cyclic_task(AGS_APPLICATION_CONTEXT(audio_application_context)->task_thread, notify_soundcard); /* export thread */ export_thread = (AgsThread *) ags_export_thread_new(list->data, NULL); ags_thread_add_child_extended(AGS_THREAD(audio_loop), (AgsThread *) export_thread, TRUE, TRUE); /* default soundcard thread */ if(audio_application_context->soundcard_thread == NULL){ audio_application_context->soundcard_thread = soundcard_thread; } /* default export thread */ if(export_thread != NULL){ audio_application_context->export_thread = export_thread; } /* iterate */ list = list->next; } /* AgsSequencerThread */ list = audio_application_context->sequencer; while(list != NULL){ sequencer_thread = (AgsThread *) ags_sequencer_thread_new(list->data); ags_thread_add_child_extended(AGS_THREAD(audio_loop), (AgsThread *) sequencer_thread, TRUE, TRUE); list = list->next; } /* AgsAutosaveThread */ audio_application_context->autosave_thread = NULL; str = ags_config_get_value(AGS_APPLICATION_CONTEXT(audio_application_context)->config, AGS_CONFIG_GENERIC, "autosave-thread"); if(str != NULL){ if(!g_strcmp0(str, "true")){ g_free(str); str = ags_config_get_value(AGS_APPLICATION_CONTEXT(audio_application_context)->config, AGS_CONFIG_GENERIC, "simple-file"); if(str != NULL){ if(g_strcmp0(str, "false")){ g_free(str); audio_application_context->autosave_thread = (AgsThread *) ags_autosave_thread_new((GObject *) audio_application_context); ags_thread_add_child_extended(AGS_THREAD(audio_loop), audio_application_context->autosave_thread, TRUE, TRUE); }else{ g_free(str); } } }else{ g_free(str); } } /* AgsThreadPool */ audio_application_context->thread_pool = AGS_TASK_THREAD(AGS_APPLICATION_CONTEXT(audio_application_context)->task_thread)->thread_pool; /* launch */ if(has_core_audio){ ags_core_audio_server_connect_client(core_audio_server); } if(has_pulse){ ags_pulse_server_connect_client(pulse_server); ags_pulse_server_start_poll(pulse_server); } if(has_jack){ ags_jack_server_connect_client(jack_server); } } void ags_audio_application_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAudioApplicationContext *audio_application_context; audio_application_context = AGS_AUDIO_APPLICATION_CONTEXT(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(soundcard == NULL){ return; } if(g_list_find(audio_application_context->soundcard, soundcard) == NULL){ g_object_ref(G_OBJECT(soundcard)); audio_application_context->soundcard = g_list_prepend(audio_application_context->soundcard, soundcard); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_application_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAudioApplicationContext *audio_application_context; audio_application_context = AGS_AUDIO_APPLICATION_CONTEXT(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_pointer(value, audio_application_context->soundcard); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_application_context_connect(AgsConnectable *connectable) { AgsAudioApplicationContext *audio_application_context; GList *list; audio_application_context = AGS_AUDIO_APPLICATION_CONTEXT(connectable); if((AGS_APPLICATION_CONTEXT_CONNECTED & (audio_application_context->flags)) != 0){ return; } ags_audio_application_context_parent_connectable_interface->connect(connectable); g_message("connecting audio"); list = audio_application_context->soundcard; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_audio_application_context_disconnect(AgsConnectable *connectable) { AgsAudioApplicationContext *audio_application_context; audio_application_context = AGS_AUDIO_APPLICATION_CONTEXT(connectable); if((AGS_APPLICATION_CONTEXT_CONNECTED & (audio_application_context->flags)) == 0){ return; } ags_audio_application_context_parent_connectable_interface->disconnect(connectable); } AgsThread* ags_audio_application_context_get_main_loop(AgsConcurrencyProvider *concurrency_provider) { return((AgsThread *) AGS_APPLICATION_CONTEXT(concurrency_provider)->main_loop); } AgsThread* ags_audio_application_context_get_task_thread(AgsConcurrencyProvider *concurrency_provider) { return((AgsThread *) AGS_APPLICATION_CONTEXT(concurrency_provider)->task_thread); } AgsThreadPool* ags_audio_application_context_get_thread_pool(AgsConcurrencyProvider *concurrency_provider) { return(AGS_AUDIO_APPLICATION_CONTEXT(concurrency_provider)->thread_pool); } GList* ags_audio_application_context_get_worker(AgsConcurrencyProvider *concurrency_provider) { return(AGS_AUDIO_APPLICATION_CONTEXT(concurrency_provider)->worker); } void ags_audio_application_context_set_worker(AgsConcurrencyProvider *concurrency_provider, GList *worker) { AGS_AUDIO_APPLICATION_CONTEXT(concurrency_provider)->worker = worker; } GList* ags_audio_application_context_get_soundcard(AgsSoundProvider *sound_provider) { return(AGS_AUDIO_APPLICATION_CONTEXT(sound_provider)->soundcard); } void ags_audio_application_context_set_soundcard(AgsSoundProvider *sound_provider, GList *soundcard) { AGS_AUDIO_APPLICATION_CONTEXT(sound_provider)->soundcard = soundcard; } GObject* ags_audio_application_context_get_default_soundcard_thread(AgsSoundProvider *sound_provider) { return((GObject *) AGS_AUDIO_APPLICATION_CONTEXT(sound_provider)->soundcard_thread); } void ags_audio_application_context_set_default_soundcard_thread(AgsSoundProvider *sound_provider, GObject *soundcard_thread) { AGS_AUDIO_APPLICATION_CONTEXT(sound_provider)->soundcard_thread = (AgsThread *) soundcard_thread; } GList* ags_audio_application_context_get_sequencer(AgsSoundProvider *sound_provider) { return(AGS_AUDIO_APPLICATION_CONTEXT(sound_provider)->sequencer); } void ags_audio_application_context_set_sequencer(AgsSoundProvider *sound_provider, GList *sequencer) { AGS_AUDIO_APPLICATION_CONTEXT(sound_provider)->sequencer = sequencer; } GList* ags_audio_application_context_get_distributed_manager(AgsSoundProvider *sound_provider) { return(AGS_AUDIO_APPLICATION_CONTEXT(sound_provider)->distributed_manager); } void ags_audio_application_context_dispose(GObject *gobject) { AgsAudioApplicationContext *audio_application_context; GList *list; audio_application_context = AGS_AUDIO_APPLICATION_CONTEXT(gobject); /* thread pool */ if(audio_application_context->thread_pool != NULL){ g_object_unref(audio_application_context->thread_pool); audio_application_context->thread_pool = NULL; } /* soundcard and export thread */ if(audio_application_context->soundcard_thread != NULL){ g_object_unref(audio_application_context->soundcard_thread); audio_application_context->soundcard_thread = NULL; } if(audio_application_context->export_thread != NULL){ g_object_unref(audio_application_context->export_thread); audio_application_context->export_thread = NULL; } /* server */ if(audio_application_context->server != NULL){ g_object_set(audio_application_context->server, "application-context", NULL, NULL); g_object_unref(audio_application_context->server); audio_application_context->server = NULL; } /* soundcard and sequencer */ if(audio_application_context->soundcard != NULL){ list = audio_application_context->soundcard; while(list != NULL){ g_object_set(list->data, "application-context", NULL, NULL); list = list->next; } g_list_free_full(audio_application_context->soundcard, g_object_unref); audio_application_context->soundcard = NULL; } if(audio_application_context->sequencer != NULL){ list = audio_application_context->sequencer; while(list != NULL){ g_object_set(list->data, "application-context", NULL, NULL); list = list->next; } g_list_free_full(audio_application_context->sequencer, g_object_unref); audio_application_context->sequencer = NULL; } /* distributed manager */ if(audio_application_context->distributed_manager != NULL){ list = audio_application_context->distributed_manager; while(list != NULL){ g_object_set(list->data, "application-context", NULL, NULL); list = list->next; } g_list_free_full(audio_application_context->distributed_manager, g_object_unref); audio_application_context->distributed_manager = NULL; } /* call parent */ G_OBJECT_CLASS(ags_audio_application_context_parent_class)->dispose(gobject); } void ags_audio_application_context_finalize(GObject *gobject) { AgsAudioApplicationContext *audio_application_context; audio_application_context = AGS_AUDIO_APPLICATION_CONTEXT(gobject); if(audio_application_context->thread_pool != NULL){ g_object_unref(audio_application_context->thread_pool); } if(audio_application_context->soundcard_thread != NULL){ g_object_unref(audio_application_context->soundcard_thread); } if(audio_application_context->export_thread != NULL){ g_object_unref(audio_application_context->export_thread); } if(audio_application_context->server != NULL){ g_object_unref(audio_application_context->server); } if(audio_application_context->soundcard != NULL){ g_list_free_full(audio_application_context->soundcard, g_object_unref); } if(audio_application_context->sequencer != NULL){ g_list_free_full(audio_application_context->sequencer, g_object_unref); } if(audio_application_context->distributed_manager != NULL){ g_list_free_full(audio_application_context->distributed_manager, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_audio_application_context_parent_class)->finalize(gobject); } void ags_audio_application_context_load_config(AgsApplicationContext *application_context) { /* empty */ } void ags_audio_application_context_set_value_callback(AgsConfig *config, gchar *group, gchar *key, gchar *value, AgsAudioApplicationContext *audio_application_context) { if(!strncmp(group, AGS_CONFIG_SOUNDCARD, 7)){ AgsSoundcard *soundcard; if(audio_application_context == NULL || audio_application_context->soundcard == NULL){ return; } soundcard = audio_application_context->soundcard->data; if(!strncmp(key, "samplerate", 10)){ guint samplerate; samplerate = strtoul(value, NULL, 10); g_object_set(G_OBJECT(soundcard), "frequency", samplerate, NULL); }else if(!strncmp(key, "buffer-size", 11)){ guint buffer_size; buffer_size = strtoul(value, NULL, 10); g_object_set(G_OBJECT(soundcard), "buffer-size", buffer_size, NULL); }else if(!strncmp(key, "pcm-channels", 12)){ guint pcm_channels; pcm_channels = strtoul(value, NULL, 10); g_object_set(G_OBJECT(soundcard), "pcm-channels", pcm_channels, NULL); }else if(!strncmp(key, "dsp-channels", 12)){ guint dsp_channels; dsp_channels = strtoul(value, NULL, 10); g_object_set(G_OBJECT(soundcard), "dsp-channels", dsp_channels, NULL); }else if(!strncmp(key, "alsa-handle", 11)){ gchar *alsa_handle; alsa_handle = value; g_object_set(G_OBJECT(soundcard), "device", alsa_handle, NULL); } } } void ags_audio_application_context_register_types(AgsApplicationContext *application_context) { ags_audio_loop_get_type(); ags_soundcard_thread_get_type(); ags_export_thread_get_type(); ags_record_thread_get_type(); ags_iterator_thread_get_type(); ags_recycling_thread_get_type(); /* register recalls */ ags_play_audio_get_type(); ags_play_channel_get_type(); ags_play_channel_run_get_type(); ags_play_channel_run_master_get_type(); ags_stream_channel_get_type(); ags_stream_channel_run_get_type(); ags_loop_channel_get_type(); ags_loop_channel_run_get_type(); ags_copy_channel_get_type(); ags_copy_channel_run_get_type(); ags_volume_channel_get_type(); ags_volume_channel_run_get_type(); ags_peak_channel_get_type(); ags_peak_channel_run_get_type(); ags_recall_ladspa_get_type(); ags_recall_channel_run_dummy_get_type(); ags_recall_ladspa_run_get_type(); ags_delay_audio_get_type(); ags_delay_audio_run_get_type(); ags_count_beats_audio_get_type(); ags_count_beats_audio_run_get_type(); ags_copy_pattern_audio_get_type(); ags_copy_pattern_audio_run_get_type(); ags_copy_pattern_channel_get_type(); ags_copy_pattern_channel_run_get_type(); ags_buffer_channel_get_type(); ags_buffer_channel_run_get_type(); ags_play_notation_audio_get_type(); ags_play_notation_audio_run_get_type(); } void ags_audio_application_context_read(AgsFile *file, xmlNode *node, GObject **application_context) { AgsAudioApplicationContext *gobject; GList *list; xmlNode *child; if(*application_context == NULL){ gobject = (AgsAudioApplicationContext *) g_object_new(AGS_TYPE_AUDIO_APPLICATION_CONTEXT, NULL); *application_context = (GObject *) gobject; }else{ gobject = (AgsAudioApplicationContext *) *application_context; } file->application_context = (GObject *) gobject; g_object_set(G_OBJECT(file), "application-context", gobject, NULL); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); /* properties */ AGS_APPLICATION_CONTEXT(gobject)->flags = (guint) g_ascii_strtoull(xmlGetProp(node, AGS_FILE_FLAGS_PROP), NULL, 16); AGS_APPLICATION_CONTEXT(gobject)->version = xmlGetProp(node, AGS_FILE_VERSION_PROP); AGS_APPLICATION_CONTEXT(gobject)->build_id = xmlGetProp(node, AGS_FILE_BUILD_ID_PROP); //TODO:JK: check version compatibelity /* child elements */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("ags-devout-list", child->name, 16)){ ags_file_read_soundcard_list(file, child, &(gobject->soundcard)); } } child = child->next; } } xmlNode* ags_audio_application_context_write(AgsFile *file, xmlNode *parent, GObject *application_context) { xmlNode *node, *child; gchar *id; id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-application-context"); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", application_context, NULL)); xmlNewProp(node, AGS_FILE_CONTEXT_PROP, "audio"); xmlNewProp(node, AGS_FILE_ID_PROP, id); xmlNewProp(node, AGS_FILE_FLAGS_PROP, g_strdup_printf("%x", ((~AGS_APPLICATION_CONTEXT_CONNECTED) & (AGS_APPLICATION_CONTEXT(application_context)->flags)))); xmlNewProp(node, AGS_FILE_VERSION_PROP, AGS_APPLICATION_CONTEXT(application_context)->version); xmlNewProp(node, AGS_FILE_BUILD_ID_PROP, AGS_APPLICATION_CONTEXT(application_context)->build_id); /* add to parent */ xmlAddChild(parent, node); ags_file_write_soundcard_list(file, node, AGS_AUDIO_APPLICATION_CONTEXT(application_context)->soundcard); return(node); } AgsAudioApplicationContext* ags_audio_application_context_new() { AgsAudioApplicationContext *audio_application_context; audio_application_context = (AgsAudioApplicationContext *) g_object_new(AGS_TYPE_AUDIO_APPLICATION_CONTEXT, NULL); return(audio_application_context); } gsequencer-1.4.24/ags/audio/ags_audio_buffer_util.c0000644000175000017500000055062013256163135017241 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #include #include #include #include #include #include /** * ags_audio_buffer_util_format_from_soundcard: * @soundcard_format: the soundcard bit mode * * Translate soundcard format to audio buffer util format. * * Returns: the converted format * * Since: 1.0.0 */ guint ags_audio_buffer_util_format_from_soundcard(guint soundcard_format) { switch(soundcard_format){ case AGS_SOUNDCARD_SIGNED_8_BIT: return(AGS_AUDIO_BUFFER_UTIL_S8); case AGS_SOUNDCARD_SIGNED_16_BIT: return(AGS_AUDIO_BUFFER_UTIL_S16); case AGS_SOUNDCARD_SIGNED_24_BIT: return(AGS_AUDIO_BUFFER_UTIL_S24); case AGS_SOUNDCARD_SIGNED_32_BIT: return(AGS_AUDIO_BUFFER_UTIL_S32); case AGS_SOUNDCARD_SIGNED_64_BIT: return(AGS_AUDIO_BUFFER_UTIL_S64); default: { g_warning("ags_audio_buffer_util_format_from_soundcard() - unsupported soundcard format"); return(0); } } } /** * ags_audio_buffer_util_get_copy_mode: * @destination_format: the destination buffer format * @source_format: the source buffer format * * Get copy mode for given destination and source format. * * Returns: the desired copy mode * * Since: 1.0.0 */ guint ags_audio_buffer_util_get_copy_mode(guint destination_format, guint source_format) { switch(source_format){ case AGS_AUDIO_BUFFER_UTIL_S8: { /* signed 8 bit source*/ switch(destination_format){ case AGS_AUDIO_BUFFER_UTIL_S8: return(AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S8); case AGS_AUDIO_BUFFER_UTIL_S16: return(AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S16); case AGS_AUDIO_BUFFER_UTIL_S24: return(AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S24); case AGS_AUDIO_BUFFER_UTIL_S32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S32); case AGS_AUDIO_BUFFER_UTIL_S64: return(AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S64); case AGS_AUDIO_BUFFER_UTIL_FLOAT: return(AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_FLOAT); case AGS_AUDIO_BUFFER_UTIL_DOUBLE: return(AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_DOUBLE); #ifdef __APPLE__ case AGS_AUDIO_BUFFER_UTIL_FLOAT32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_FLOAT32); #endif default: { g_warning("ags_audio_buffer_util_get_copy_mode() - unsupported destination buffer format"); return(0); } } } case AGS_AUDIO_BUFFER_UTIL_S16: { /* signed 16 bit source */ switch(destination_format){ case AGS_AUDIO_BUFFER_UTIL_S8: return(AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S8); case AGS_AUDIO_BUFFER_UTIL_S16: return(AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S16); case AGS_AUDIO_BUFFER_UTIL_S24: return(AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S24); case AGS_AUDIO_BUFFER_UTIL_S32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S32); case AGS_AUDIO_BUFFER_UTIL_S64: return(AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S64); case AGS_AUDIO_BUFFER_UTIL_FLOAT: return(AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_FLOAT); case AGS_AUDIO_BUFFER_UTIL_DOUBLE: return(AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_DOUBLE); #ifdef __APPLE__ case AGS_AUDIO_BUFFER_UTIL_FLOAT32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_FLOAT32); #endif default: { g_warning("ags_audio_buffer_util_get_copy_mode() - unsupported destination buffer format"); return(0); } } } case AGS_AUDIO_BUFFER_UTIL_S24: { /* signed 24 bit source */ switch(destination_format){ case AGS_AUDIO_BUFFER_UTIL_S8: return(AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S8); case AGS_AUDIO_BUFFER_UTIL_S16: return(AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S16); case AGS_AUDIO_BUFFER_UTIL_S24: return(AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S24); case AGS_AUDIO_BUFFER_UTIL_S32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S32); case AGS_AUDIO_BUFFER_UTIL_S64: return(AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S64); case AGS_AUDIO_BUFFER_UTIL_FLOAT: return(AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_FLOAT); case AGS_AUDIO_BUFFER_UTIL_DOUBLE: return(AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_DOUBLE); #ifdef __APPLE__ case AGS_AUDIO_BUFFER_UTIL_FLOAT32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_FLOAT32); #endif default: { g_warning("ags_audio_buffer_util_get_copy_mode() - unsupported destination buffer format"); return(0); } } } case AGS_AUDIO_BUFFER_UTIL_S32: { /* signed 32 bit source */ switch(destination_format){ case AGS_AUDIO_BUFFER_UTIL_S8: return(AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S8); case AGS_AUDIO_BUFFER_UTIL_S16: return(AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S16); case AGS_AUDIO_BUFFER_UTIL_S24: return(AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S24); case AGS_AUDIO_BUFFER_UTIL_S32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S32); case AGS_AUDIO_BUFFER_UTIL_S64: return(AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S64); case AGS_AUDIO_BUFFER_UTIL_FLOAT: return(AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_FLOAT); case AGS_AUDIO_BUFFER_UTIL_DOUBLE: return(AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_DOUBLE); #ifdef __APPLE__ case AGS_AUDIO_BUFFER_UTIL_FLOAT32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_FLOAT32); #endif default: { g_warning("ags_audio_buffer_util_get_copy_mode() - unsupported destination buffer format"); return(0); } } } case AGS_AUDIO_BUFFER_UTIL_S64: { /* signed 64 bit source */ switch(destination_format){ case AGS_AUDIO_BUFFER_UTIL_S8: return(AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S8); case AGS_AUDIO_BUFFER_UTIL_S16: return(AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S16); case AGS_AUDIO_BUFFER_UTIL_S24: return(AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S24); case AGS_AUDIO_BUFFER_UTIL_S32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S32); case AGS_AUDIO_BUFFER_UTIL_S64: return(AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S64); case AGS_AUDIO_BUFFER_UTIL_FLOAT: return(AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_FLOAT); case AGS_AUDIO_BUFFER_UTIL_DOUBLE: return(AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_DOUBLE); #ifdef __APPLE__ case AGS_AUDIO_BUFFER_UTIL_FLOAT32: return(AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_FLOAT32); #endif default: { g_warning("ags_audio_buffer_util_get_copy_mode() - unsupported destination buffer format"); return(0); } } } case AGS_AUDIO_BUFFER_UTIL_FLOAT: { /* float source */ switch(destination_format){ case AGS_AUDIO_BUFFER_UTIL_S8: return(AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S8); case AGS_AUDIO_BUFFER_UTIL_S16: return(AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S16); case AGS_AUDIO_BUFFER_UTIL_S24: return(AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S24); case AGS_AUDIO_BUFFER_UTIL_S32: return(AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S32); case AGS_AUDIO_BUFFER_UTIL_S64: return(AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S64); case AGS_AUDIO_BUFFER_UTIL_FLOAT: return(AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_FLOAT); case AGS_AUDIO_BUFFER_UTIL_DOUBLE: return(AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_DOUBLE); default: { g_warning("ags_audio_buffer_util_get_copy_mode() - unsupported destination buffer format"); return(0); } } } case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { /* double source */ switch(destination_format){ case AGS_AUDIO_BUFFER_UTIL_S8: return(AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S8); case AGS_AUDIO_BUFFER_UTIL_S16: return(AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S16); case AGS_AUDIO_BUFFER_UTIL_S24: return(AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S24); case AGS_AUDIO_BUFFER_UTIL_S32: return(AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S32); case AGS_AUDIO_BUFFER_UTIL_S64: return(AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S64); case AGS_AUDIO_BUFFER_UTIL_FLOAT: return(AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_FLOAT); case AGS_AUDIO_BUFFER_UTIL_DOUBLE: return(AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_DOUBLE); default: { g_warning("ags_audio_buffer_util_get_copy_mode() - unsupported destination buffer format"); return(0); } } } default: { g_warning("ags_audio_buffer_util_get_copy_mode() - unsupported source buffer format"); return(0); } } } /** * ags_audio_buffer_util_clear_float: * @buffer: the buffer to clear * @channels: number of channels * @count: count frames * * Clears a buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_clear_float(float *buffer, guint channels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *buffer = 0.0; buffer[1 * channels] = 0.0; buffer[2 * channels] = 0.0; buffer[3 * channels] = 0.0; buffer[4 * channels] = 0.0; buffer[5 * channels] = 0.0; buffer[6 * channels] = 0.0; buffer[7 * channels] = 0.0; buffer += (8 * channels); } } for(; i < count; i++){ *buffer = 0.0; buffer += channels; } } #ifdef __APPLE__ /** * ags_audio_buffer_util_clear_float32: * @buffer: the buffer to clear * @channels: number of channels * @count: count frames * * Clears a buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_clear_float32(Float32 *buffer, guint channels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *buffer = 0.0; buffer[1 * channels] = (Float32) 0.0; buffer[2 * channels] = (Float32) 0.0; buffer[3 * channels] = (Float32) 0.0; buffer[4 * channels] = (Float32) 0.0; buffer[5 * channels] = (Float32) 0.0; buffer[6 * channels] = (Float32) 0.0; buffer[7 * channels] = (Float32) 0.0; buffer += (8 * channels); } } for(; i < count; i++){ *buffer = (Float32) 0.0; buffer += channels; } } #endif /** * ags_audio_buffer_util_clear_double: * @buffer: the buffer to clear * @channels: number of channels * @count: count frames * * Clears a buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_clear_double(double *buffer, guint channels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *buffer = 0.0; buffer[1 * channels] = 0.0; buffer[2 * channels] = 0.0; buffer[3 * channels] = 0.0; buffer[4 * channels] = 0.0; buffer[5 * channels] = 0.0; buffer[6 * channels] = 0.0; buffer[7 * channels] = 0.0; buffer += (8 * channels); } } for(; i < count; i++){ *buffer = 0.0; buffer += channels; } } /** * ags_audio_buffer_util_clear_buffer: * @buffer: the audio data * @channels: the number of channels * @count: number of frames * @format: the format * * Clears the audio data. * * Since: 1.0.0 */ void ags_audio_buffer_util_clear_buffer(void *buffer, guint channels, guint count, guint format) { switch(format){ case AGS_AUDIO_BUFFER_UTIL_S8: { memset((gint8 *) buffer, 0, channels * count * sizeof(gint8)); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { memset((gint16 *) buffer, 0, channels * count * sizeof(gint16)); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { memset((gint32 *) buffer, 0, channels * count * sizeof(gint32)); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { memset((gint32 *) buffer, 0, channels * count * sizeof(gint32)); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { memset((gint64 *) buffer, 0, channels * count * sizeof(gint64)); } default: g_critical("unsupported audio buffer format"); } } /** * ags_audio_buffer_util_envelope_s8: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @current_volume: current volume * @ratio: the amount to increment * * Envelope buffer at @ratio. * * Returns: the last volume used * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_envelope_s8(gint8 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio) { gdouble start_volume; guint limit; guint i; start_volume = current_volume; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = 0xff & ((gint16) ((*buffer) * current_volume)); buffer[1 * channels] = 0xff & ((gint16) (buffer[1 * channels] * current_volume)); buffer[2 * channels] = 0xff & ((gint16) (buffer[2 * channels] * current_volume)); buffer[3 * channels] = 0xff & ((gint16) (buffer[3 * channels] * current_volume)); buffer[4 * channels] = 0xff & ((gint16) (buffer[4 * channels] * current_volume)); buffer[5 * channels] = 0xff & ((gint16) (buffer[5 * channels] * current_volume)); buffer[6 * channels] = 0xff & ((gint16) (buffer[6 * channels] * current_volume)); buffer[7 * channels] = 0xff & ((gint16) (buffer[7 * channels] * current_volume)); buffer += (8 * channels); current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } } for(; i < buffer_length; i++){ *buffer = 0xff & ((gint16) ((*buffer) * current_volume)); buffer += channels; current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } return(current_volume); } /** * ags_audio_buffer_util_envelope_s16: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @current_volume: current volume * @ratio: the amount to increment * * Envelope buffer at @ratio. * * Returns: the last volume used * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_envelope_s16(gint16 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio) { gdouble start_volume; guint limit; guint i; start_volume = current_volume; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = (gint16) 0xffff & ((gint32) ((*buffer) * current_volume)); buffer[1 * channels] = (gint16) 0xffff & ((gint32) (buffer[1 * channels] * current_volume)); buffer[2 * channels] = (gint16) 0xffff & ((gint32) (buffer[2 * channels] * current_volume)); buffer[3 * channels] = (gint16) 0xffff & ((gint32) (buffer[3 * channels] * current_volume)); buffer[4 * channels] = (gint16) 0xffff & ((gint32) (buffer[4 * channels] * current_volume)); buffer[5 * channels] = (gint16) 0xffff & ((gint32) (buffer[5 * channels] * current_volume)); buffer[6 * channels] = (gint16) 0xffff & ((gint32) (buffer[6 * channels] * current_volume)); buffer[7 * channels] = (gint16) 0xffff & ((gint32) (buffer[7 * channels] * current_volume)); buffer += (8 * channels); current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } } for(; i < buffer_length; i++){ *buffer = (gint16) 0xffff & ((gint32) ((*buffer) * current_volume)); buffer += channels; current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } return(current_volume); } /** * ags_audio_buffer_util_envelope_s24: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @current_volume: current volume * @ratio: the amount to increment * * Envelope buffer at @ratio. * * Returns: the last volume used * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_envelope_s24(gint32 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio) { gdouble start_volume; guint limit; guint i; start_volume = current_volume; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = (gint32) 0xffffff & ((gint32) ((*buffer) * current_volume)); buffer[1 * channels] = (gint32) 0xffffff & ((gint32) (buffer[1 * channels] * current_volume)); buffer[2 * channels] = (gint32) 0xffffff & ((gint32) (buffer[2 * channels] * current_volume)); buffer[3 * channels] = (gint32) 0xffffff & ((gint32) (buffer[3 * channels] * current_volume)); buffer[4 * channels] = (gint32) 0xffffff & ((gint32) (buffer[4 * channels] * current_volume)); buffer[5 * channels] = (gint32) 0xffffff & ((gint32) (buffer[5 * channels] * current_volume)); buffer[6 * channels] = (gint32) 0xffffff & ((gint32) (buffer[6 * channels] * current_volume)); buffer[7 * channels] = (gint32) 0xffffff & ((gint32) (buffer[7 * channels] * current_volume)); buffer += (8 * channels); current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } } for(; i < buffer_length; i++){ *buffer = (gint32) 0xffffff & ((gint32) ((*buffer) * current_volume)); buffer += channels; current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } return(current_volume); } /** * ags_audio_buffer_util_envelope_s32: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @current_volume: current volume * @ratio: the amount to increment * * Envelope buffer at @ratio. * * Returns: the last volume used * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_envelope_s32(gint32 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio) { gdouble start_volume; guint limit; guint i; start_volume = current_volume; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = (gint32) 0xffffffff & ((gint64) ((*buffer) * current_volume)); buffer[1 * channels] = (gint32) 0xffffffff & ((gint64) (buffer[1 * channels] * current_volume)); buffer[2 * channels] = (gint32) 0xffffffff & ((gint64) (buffer[2 * channels] * current_volume)); buffer[3 * channels] = (gint32) 0xffffffff & ((gint64) (buffer[3 * channels] * current_volume)); buffer[4 * channels] = (gint32) 0xffffffff & ((gint64) (buffer[4 * channels] * current_volume)); buffer[5 * channels] = (gint32) 0xffffffff & ((gint64) (buffer[5 * channels] * current_volume)); buffer[6 * channels] = (gint32) 0xffffffff & ((gint64) (buffer[6 * channels] * current_volume)); buffer[7 * channels] = (gint32) 0xffffffff & ((gint64) (buffer[7 * channels] * current_volume)); buffer += (8 * channels); current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } } for(; i < buffer_length; i++){ *buffer = (gint32) 0xffffffff & ((gint64) ((*buffer) * current_volume)); buffer += channels; current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } return(current_volume); } /** * ags_audio_buffer_util_envelope_s64: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @current_volume: current volume * @ratio: the amount to increment * * Envelope buffer at @ratio. * * Returns: the last volume used * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_envelope_s64(gint64 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio) { gdouble start_volume; guint limit; guint i; start_volume = current_volume; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = (gint64) 0xffffffffffffffff & ((gint64) ((*buffer) * current_volume)); buffer[1 * channels] = (gint64) 0xffffffffffffffff & ((gint64) (buffer[1 * channels] * current_volume)); buffer[2 * channels] = (gint64) 0xffffffffffffffff & ((gint64) (buffer[2 * channels] * current_volume)); buffer[3 * channels] = (gint64) 0xffffffffffffffff & ((gint64) (buffer[3 * channels] * current_volume)); buffer[4 * channels] = (gint64) 0xffffffffffffffff & ((gint64) (buffer[4 * channels] * current_volume)); buffer[5 * channels] = (gint64) 0xffffffffffffffff & ((gint64) (buffer[5 * channels] * current_volume)); buffer[6 * channels] = (gint64) 0xffffffffffffffff & ((gint64) (buffer[6 * channels] * current_volume)); buffer[7 * channels] = (gint64) 0xffffffffffffffff & ((gint64) (buffer[7 * channels] * current_volume)); buffer += (8 * channels); current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } } for(; i < buffer_length; i++){ *buffer = (gint64) 0xffffffffffffffff & ((gint64) ((*buffer) * current_volume)); buffer += channels; current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } return(current_volume); } /** * ags_audio_buffer_util_envelope_float: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @current_volume: current volume * @ratio: the amount to increment * * Envelope buffer at @ratio. * * Returns: the last volume used * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_envelope_float(float *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio) { gdouble start_volume; guint limit; guint i; start_volume = current_volume; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = ((double) ((*buffer) * current_volume)); buffer[1 * channels] = ((double) (buffer[1 * channels] * current_volume)); buffer[2 * channels] = ((double) (buffer[2 * channels] * current_volume)); buffer[3 * channels] = ((double) (buffer[3 * channels] * current_volume)); buffer[4 * channels] = ((double) (buffer[4 * channels] * current_volume)); buffer[5 * channels] = ((double) (buffer[5 * channels] * current_volume)); buffer[6 * channels] = ((double) (buffer[6 * channels] * current_volume)); buffer[7 * channels] = ((double) (buffer[7 * channels] * current_volume)); buffer += (8 * channels); current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } } for(; i < buffer_length; i++){ *buffer = ((double) ((*buffer) * current_volume)); buffer += channels; current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } return(current_volume); } /** * ags_audio_buffer_util_envelope_double: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @current_volume: current volume * @ratio: the amount to increment * * Envelope buffer at @ratio. * * Returns: the last volume used * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_envelope_double(double *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio) { gdouble start_volume; guint limit; guint i; start_volume = current_volume; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = ((double) ((*buffer) * current_volume)); buffer[1 * channels] = ((double) (buffer[1 * channels] * current_volume)); buffer[2 * channels] = ((double) (buffer[2 * channels] * current_volume)); buffer[3 * channels] = ((double) (buffer[3 * channels] * current_volume)); buffer[4 * channels] = ((double) (buffer[4 * channels] * current_volume)); buffer[5 * channels] = ((double) (buffer[5 * channels] * current_volume)); buffer[6 * channels] = ((double) (buffer[6 * channels] * current_volume)); buffer[7 * channels] = ((double) (buffer[7 * channels] * current_volume)); buffer += (8 * channels); current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } } for(; i < buffer_length; i++){ *buffer = ((double) ((*buffer) * current_volume)); buffer += channels; current_volume = start_volume + ((double) i / (double) buffer_length) * ratio; } return(current_volume); } /** * ags_audio_buffer_util_envelope: * @buffer: the audio buffer * @channels: number of audio channels * @format: the format to use * @buffer_length: the buffer's length * @current_volume: current volume * @ratio: the amount to increment * * Envelope buffer at @ratio. * * Returns: the last volume used * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_envelope(void *buffer, guint channels, guint format, guint buffer_length, gdouble current_volume, gdouble ratio) { gdouble retval; switch(format){ case AGS_AUDIO_BUFFER_UTIL_S8: { retval = ags_audio_buffer_util_envelope_s8((gint8 *) buffer, channels, buffer_length, current_volume, ratio); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { retval = ags_audio_buffer_util_envelope_s16((gint16 *) buffer, channels, buffer_length, current_volume, ratio); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { retval = ags_audio_buffer_util_envelope_s24((gint32 *) buffer, channels, buffer_length, current_volume, ratio); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { retval = ags_audio_buffer_util_envelope_s32((gint32 *) buffer, channels, buffer_length, current_volume, ratio); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { retval = ags_audio_buffer_util_envelope_s64((gint64 *) buffer, channels, buffer_length, current_volume, ratio); } break; case AGS_AUDIO_BUFFER_UTIL_FLOAT: { retval = ags_audio_buffer_util_envelope_float((float *) buffer, channels, buffer_length, current_volume, ratio); } break; case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { retval = ags_audio_buffer_util_envelope_double((double *) buffer, channels, buffer_length, current_volume, ratio); } break; default: g_warning("ags_audio_buffer_util_envelope() - unknown format"); } return(retval); } /** * ags_audio_buffer_util_volume_s8: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @volume: volume * * Adjust volume of buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_volume_s8(gint8 *buffer, guint channels, guint buffer_length, gdouble volume) { guint limit; guint i; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = 0xff & ((gint16) ((*buffer) * volume)); buffer[1 * channels] = 0xff & ((gint16) (buffer[1 * channels] * volume)); buffer[2 * channels] = 0xff & ((gint16) (buffer[2 * channels] * volume)); buffer[3 * channels] = 0xff & ((gint16) (buffer[3 * channels] * volume)); buffer[4 * channels] = 0xff & ((gint16) (buffer[4 * channels] * volume)); buffer[5 * channels] = 0xff & ((gint16) (buffer[5 * channels] * volume)); buffer[6 * channels] = 0xff & ((gint16) (buffer[6 * channels] * volume)); buffer[7 * channels] = 0xff & ((gint16) (buffer[7 * channels] * volume)); buffer += (8 * channels); } } for(; i < buffer_length; i++){ *buffer = 0xff & ((gint16) ((*buffer) * volume)); buffer += channels; } } /** * ags_audio_buffer_util_volume_s16: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @volume: volume * * Adjust volume of buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_volume_s16(gint16 *buffer, guint channels, guint buffer_length, gdouble volume) { guint limit; guint i; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = (gint16) 0xffff & ((gint32) ((*buffer) * volume)); buffer[1 * channels] = (gint16) 0xffff & ((gint32) (buffer[1 * channels] * volume)); buffer[2 * channels] = (gint16) 0xffff & ((gint32) (buffer[2 * channels] * volume)); buffer[3 * channels] = (gint16) 0xffff & ((gint32) (buffer[3 * channels] * volume)); buffer[4 * channels] = (gint16) 0xffff & ((gint32) (buffer[4 * channels] * volume)); buffer[5 * channels] = (gint16) 0xffff & ((gint32) (buffer[5 * channels] * volume)); buffer[6 * channels] = (gint16) 0xffff & ((gint32) (buffer[6 * channels] * volume)); buffer[7 * channels] = (gint16) 0xffff & ((gint32) (buffer[7 * channels] * volume)); buffer += (8 * channels); } } for(; i < buffer_length; i++){ *buffer = (gint16) 0xffff & ((gint32) ((*buffer) * volume)); buffer += channels; } } /** * ags_audio_buffer_util_volume_s24: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @volume: volume * * Adjust volume of buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_volume_s24(gint32 *buffer, guint channels, guint buffer_length, gdouble volume) { guint limit; guint i; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = 0xffffff & ((gint32) ((*buffer) * volume)); buffer[1 * channels] = 0xffffff & ((gint32) (buffer[1 * channels] * volume)); buffer[2 * channels] = 0xffffff & ((gint32) (buffer[2 * channels] * volume)); buffer[3 * channels] = 0xffffff & ((gint32) (buffer[3 * channels] * volume)); buffer[4 * channels] = 0xffffff & ((gint32) (buffer[4 * channels] * volume)); buffer[5 * channels] = 0xffffff & ((gint32) (buffer[5 * channels] * volume)); buffer[6 * channels] = 0xffffff & ((gint32) (buffer[6 * channels] * volume)); buffer[7 * channels] = 0xffffff & ((gint32) (buffer[7 * channels] * volume)); buffer += (8 * channels); } } for(; i < buffer_length; i++){ *buffer = 0xffffff & ((gint32) ((*buffer) * volume)); buffer += channels; } } /** * ags_audio_buffer_util_volume_s32: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @volume: volume * * Adjust volume of buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_volume_s32(gint32 *buffer, guint channels, guint buffer_length, gdouble volume) { guint limit; guint i; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = 0xffffffff & ((gint64) ((*buffer) * volume)); buffer[1 * channels] = 0xffffffff & ((gint64) (buffer[1 * channels] * volume)); buffer[2 * channels] = 0xffffffff & ((gint64) (buffer[2 * channels] * volume)); buffer[3 * channels] = 0xffffffff & ((gint64) (buffer[3 * channels] * volume)); buffer[4 * channels] = 0xffffffff & ((gint64) (buffer[4 * channels] * volume)); buffer[5 * channels] = 0xffffffff & ((gint64) (buffer[5 * channels] * volume)); buffer[6 * channels] = 0xffffffff & ((gint64) (buffer[6 * channels] * volume)); buffer[7 * channels] = 0xffffffff & ((gint64) (buffer[7 * channels] * volume)); buffer += (8 * channels); } } for(; i < buffer_length; i++){ *buffer = 0xffffffff & ((gint64) ((*buffer) * volume)); buffer += channels; } } /** * ags_audio_buffer_util_volume_s64: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @volume: volume * * Adjust volume of buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_volume_s64(gint64 *buffer, guint channels, guint buffer_length, gdouble volume) { guint limit; guint i; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = 0xffffffffffffffff & ((gint64) ((*buffer) * volume)); buffer[1 * channels] = 0xffffffffffffffff & ((gint64) (buffer[1 * channels] * volume)); buffer[2 * channels] = 0xffffffffffffffff & ((gint64) (buffer[2 * channels] * volume)); buffer[3 * channels] = 0xffffffffffffffff & ((gint64) (buffer[3 * channels] * volume)); buffer[4 * channels] = 0xffffffffffffffff & ((gint64) (buffer[4 * channels] * volume)); buffer[5 * channels] = 0xffffffffffffffff & ((gint64) (buffer[5 * channels] * volume)); buffer[6 * channels] = 0xffffffffffffffff & ((gint64) (buffer[6 * channels] * volume)); buffer[7 * channels] = 0xffffffffffffffff & ((gint64) (buffer[7 * channels] * volume)); buffer += (8 * channels); } } for(; i < buffer_length; i++){ *buffer = 0xffffffffffffffff & ((gint64) ((*buffer) * volume)); buffer += channels; } } /** * ags_audio_buffer_util_volume_float: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @volume: volume * * Adjust volume of buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_volume_float(float *buffer, guint channels, guint buffer_length, gdouble volume) { guint limit; guint i; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = ((double) ((*buffer) * volume)); buffer[1 * channels] = ((double) (buffer[1 * channels] * volume)); buffer[2 * channels] = ((double) (buffer[2 * channels] * volume)); buffer[3 * channels] = ((double) (buffer[3 * channels] * volume)); buffer[4 * channels] = ((double) (buffer[4 * channels] * volume)); buffer[5 * channels] = ((double) (buffer[5 * channels] * volume)); buffer[6 * channels] = ((double) (buffer[6 * channels] * volume)); buffer[7 * channels] = ((double) (buffer[7 * channels] * volume)); buffer += (8 * channels); } } for(; i < buffer_length; i++){ *buffer = ((double) ((*buffer) * volume)); buffer += channels; } } /** * ags_audio_buffer_util_volume_double: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer's length * @volume: volume * * Adjust volume of buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_volume_double(double *buffer, guint channels, guint buffer_length, gdouble volume) { guint limit; guint i; i = 0; /* unrolled function */ if(buffer_length > 8){ limit = buffer_length - 8; for(; i < limit; i += 8){ *buffer = ((double) ((*buffer) * volume)); buffer[1 * channels] = ((double) (buffer[1 * channels] * volume)); buffer[2 * channels] = ((double) (buffer[2 * channels] * volume)); buffer[3 * channels] = ((double) (buffer[3 * channels] * volume)); buffer[4 * channels] = ((double) (buffer[4 * channels] * volume)); buffer[5 * channels] = ((double) (buffer[5 * channels] * volume)); buffer[6 * channels] = ((double) (buffer[6 * channels] * volume)); buffer[7 * channels] = ((double) (buffer[7 * channels] * volume)); buffer += (8 * channels); } } for(; i < buffer_length; i++){ *buffer = ((double) ((*buffer) * volume)); buffer += channels; } } /** * ags_audio_buffer_util_volume: * @buffer: the audio buffer * @channels: number of audio channels * @format: the format to use * @buffer_length: the buffer's length * @volume: volume * * Adjust volume of buffer. * * Since: 1.0.0 */ void ags_audio_buffer_util_volume(void *buffer, guint channels, guint format, guint buffer_length, gdouble volume) { switch(format){ case AGS_AUDIO_BUFFER_UTIL_S8: { ags_audio_buffer_util_volume_s8((gint8 *) buffer, channels, buffer_length, volume); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { ags_audio_buffer_util_volume_s16((gint16 *) buffer, channels, buffer_length, volume); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { ags_audio_buffer_util_volume_s24((gint32 *) buffer, channels, buffer_length, volume); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { ags_audio_buffer_util_volume_s32((gint32 *) buffer, channels, buffer_length, volume); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { ags_audio_buffer_util_volume_s64((gint64 *) buffer, channels, buffer_length, volume); } break; case AGS_AUDIO_BUFFER_UTIL_FLOAT: { ags_audio_buffer_util_volume_float((float *) buffer, channels, buffer_length, volume); } break; case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { ags_audio_buffer_util_volume_double((double *) buffer, channels, buffer_length, volume); } break; default: g_warning("ags_audio_buffer_util_volume() - unknown format"); } } /** * ags_audio_buffer_util_peak_s8: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer length * @harmonic_rate: the harmonic rate * @max_rate: the max rate * @pressure_factor: the pressure factor * * Retrive peak of buffer. * * Returns: the peak as gdouble * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_peak_s8(gint8 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor) { double current_value; guint limit; guint i; /* calculate average value */ current_value = 0.0; i = 0; /* unrolled function */ if(buffer_length > 0){ limit = buffer_length - 8; for(; i < limit; i += 8){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT8 * pressure_factor) * buffer[i])); } if(buffer[i + 1] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT8 * pressure_factor) * buffer[i + 1])); } if(buffer[i + 2] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT8 * pressure_factor) * buffer[i + 2])); } if(buffer[i + 3] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT8 * pressure_factor) * buffer[i + 3])); } if(buffer[i + 4] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT8 * pressure_factor) * buffer[i + 4])); } if(buffer[i + 5] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT8 * pressure_factor) * buffer[i + 5])); } if(buffer[i + 6] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT8 * pressure_factor) * buffer[i + 6])); } if(buffer[i + 7] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT8 * pressure_factor) * buffer[i + 7])); } } } for(; i < buffer_length; i++){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT8 * pressure_factor) * buffer[i])); } } if(current_value != 0.0){ current_value = (atan(1.0 / harmonic_rate) / sin(current_value / max_rate)); } return(current_value); } /** * ags_audio_buffer_util_peak_s16: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer length * @harmonic_rate: the harmonic rate * @max_rate: the max rate * @pressure_factor: the pressure factor * * Retrive peak of buffer. * * Returns: the peak as gdouble * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_peak_s16(gint16 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor) { double current_value; guint limit; guint i; /* calculate average value */ current_value = 0.0; i = 0; /* unrolled function */ if(buffer_length > 0){ limit = buffer_length - 8; for(; i < limit; i += 8){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT16 * pressure_factor) * buffer[i])); } if(buffer[i + 1] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT16 * pressure_factor) * buffer[i + 1])); } if(buffer[i + 2] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT16 * pressure_factor) * buffer[i + 2])); } if(buffer[i + 3] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT16 * pressure_factor) * buffer[i + 3])); } if(buffer[i + 4] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT16 * pressure_factor) * buffer[i + 4])); } if(buffer[i + 5] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT16 * pressure_factor) * buffer[i + 5])); } if(buffer[i + 6] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT16 * pressure_factor) * buffer[i + 6])); } if(buffer[i + 7] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT16 * pressure_factor) * buffer[i + 7])); } } } for(; i < buffer_length; i++){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT16 * pressure_factor) * buffer[i])); } } if(current_value != 0.0){ current_value = (atan(1.0 / harmonic_rate) / sin(current_value / max_rate)); } return(current_value); } /** * ags_audio_buffer_util_peak_s24: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer length * @harmonic_rate: the harmonic rate * @max_rate: the max rate * @pressure_factor: the pressure factor * * Retrive peak of buffer. * * Returns: the peak as gdouble * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_peak_s24(gint32 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor) { double current_value; guint limit; guint i; /* calculate average value */ current_value = 0.0; i = 0; /* unrolled function */ if(buffer_length > 0){ limit = buffer_length - 8; for(; i < limit; i += 8){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) 0xffffff * pressure_factor) * buffer[i])); } if(buffer[i + 1] != 0){ current_value += (1.0 / ((1.0 / (double) 0xffffff * pressure_factor) * buffer[i + 1])); } if(buffer[i + 2] != 0){ current_value += (1.0 / ((1.0 / (double) 0xffffff * pressure_factor) * buffer[i + 2])); } if(buffer[i + 3] != 0){ current_value += (1.0 / ((1.0 / (double) 0xffffff * pressure_factor) * buffer[i + 3])); } if(buffer[i + 4] != 0){ current_value += (1.0 / ((1.0 / (double) 0xffffff * pressure_factor) * buffer[i + 4])); } if(buffer[i + 5] != 0){ current_value += (1.0 / ((1.0 / (double) 0xffffff * pressure_factor) * buffer[i + 5])); } if(buffer[i + 6] != 0){ current_value += (1.0 / ((1.0 / (double) 0xffffff * pressure_factor) * buffer[i + 6])); } if(buffer[i + 7] != 0){ current_value += (1.0 / ((1.0 / (double) 0xffffff * pressure_factor) * buffer[i + 7])); } } } for(; i < buffer_length; i++){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) 0xffffff * pressure_factor) * buffer[i])); } } if(current_value != 0.0){ current_value = (atan(1.0 / harmonic_rate) / sin(current_value / max_rate)); } return(current_value); } /** * ags_audio_buffer_util_peak_32: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer length * @harmonic_rate: the harmonic rate * @max_rate: the max rate * @pressure_factor: the pressure factor * * Retrive peak of buffer. * * Returns: the peak as gdouble * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_peak_s32(gint32 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor) { double current_value; guint limit; guint i; /* calculate average value */ current_value = 0.0; i = 0; /* unrolled function */ if(buffer_length > 0){ limit = buffer_length - 8; for(; i < limit; i += 8){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT32 * pressure_factor) * buffer[i])); } if(buffer[i + 1] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT32 * pressure_factor) * buffer[i + 1])); } if(buffer[i + 2] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT32 * pressure_factor) * buffer[i + 2])); } if(buffer[i + 3] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT32 * pressure_factor) * buffer[i + 3])); } if(buffer[i + 4] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT32 * pressure_factor) * buffer[i + 4])); } if(buffer[i + 5] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT32 * pressure_factor) * buffer[i + 5])); } if(buffer[i + 6] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT32 * pressure_factor) * buffer[i + 6])); } if(buffer[i + 7] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT32 * pressure_factor) * buffer[i + 7])); } } } for(; i < buffer_length; i++){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT32 * pressure_factor) * buffer[i])); } } if(current_value != 0.0){ current_value = (atan(1.0 / harmonic_rate) / sin(current_value / max_rate)); } return(current_value); } /** * ags_audio_buffer_util_peak_64: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer length * @harmonic_rate: the harmonic rate * @max_rate: the max rate * @pressure_factor: the pressure factor * * Retrive peak of buffer. * * Returns: the peak as gdouble * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_peak_s64(gint64 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor) { double current_value; guint limit; guint i; /* calculate average value */ current_value = 0.0; i = 0; /* unrolled function */ if(buffer_length > 0){ limit = buffer_length - 8; for(; i < limit; i += 8){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT64 * pressure_factor) * buffer[i])); } if(buffer[i + 1] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT64 * pressure_factor) * buffer[i + 1])); } if(buffer[i + 2] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT64 * pressure_factor) * buffer[i + 2])); } if(buffer[i + 3] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT64 * pressure_factor) * buffer[i + 3])); } if(buffer[i + 4] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT64 * pressure_factor) * buffer[i + 4])); } if(buffer[i + 5] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT64 * pressure_factor) * buffer[i + 5])); } if(buffer[i + 6] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT64 * pressure_factor) * buffer[i + 6])); } if(buffer[i + 7] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT64 * pressure_factor) * buffer[i + 7])); } } } for(; i < buffer_length; i++){ if(buffer[i] != 0){ current_value += (1.0 / ((1.0 / (double) G_MAXUINT64 * pressure_factor) * buffer[i])); } } if(current_value != 0.0){ current_value = (atan(1.0 / harmonic_rate) / sin(current_value / max_rate)); } return(current_value); } /** * ags_audio_buffer_util_peak_float: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer length * @harmonic_rate: the harmonic rate * @max_rate: the max rate * @pressure_factor: the pressure factor * * Retrive peak of buffer. * * Returns: the peak as gdouble * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_peak_float(float *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor) { double current_value; guint limit; guint i; /* calculate average value */ current_value = 0.0; i = 0; /* unrolled function */ if(buffer_length > 0){ limit = buffer_length - 8; for(; i < limit; i += 8){ if(buffer[i] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i])); } if(buffer[i + 1] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 1])); } if(buffer[i + 2] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 2])); } if(buffer[i + 3] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 3])); } if(buffer[i + 4] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 4])); } if(buffer[i + 5] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 5])); } if(buffer[i + 6] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 6])); } if(buffer[i + 7] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 7])); } } } for(; i < buffer_length; i++){ if(buffer[i] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i])); } } if(current_value != 0.0){ current_value = (atan(1.0 / harmonic_rate) / sin(current_value / max_rate)); } return(current_value); } /** * ags_audio_buffer_util_peak_double: * @buffer: the audio buffer * @channels: number of audio channels * @buffer_length: the buffer length * @harmonic_rate: the harmonic rate * @max_rate: the max rate * @pressure_factor: the pressure factor * * Retrive peak of buffer. * * Returns: the peak as gdouble * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_peak_double(double *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor) { double current_value; guint limit; guint i; /* calculate average value */ current_value = 0.0; i = 0; /* unrolled function */ if(buffer_length > 0){ limit = buffer_length - 8; for(; i < limit; i += 8){ if(buffer[i] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i])); } if(buffer[i + 1] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 1])); } if(buffer[i + 2] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 2])); } if(buffer[i + 3] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 3])); } if(buffer[i + 4] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 4])); } if(buffer[i + 5] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 5])); } if(buffer[i + 6] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 6])); } if(buffer[i + 7] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i + 7])); } } } for(; i < buffer_length; i++){ if(buffer[i] != 0){ current_value += (1.0 / ((0.5 * pressure_factor) * buffer[i])); } } if(current_value != 0.0){ current_value = (atan(1.0 / harmonic_rate) / sin(current_value / max_rate)); } return(current_value); } /** * ags_audio_buffer_util_peak: * @buffer: the audio buffer * @channels: number of audio channels * @format: the format to use * @buffer_length: the buffer length * @harmonic_rate: the harmonic rate * @max_rate: the max rate * @pressure_factor: the pressure factor * * Retrive peak of buffer. * * Returns: the peak as gdouble * * Since: 1.0.0 */ gdouble ags_audio_buffer_util_peak(void *buffer, guint channels, guint format, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor) { gdouble current_value; switch(format){ case AGS_AUDIO_BUFFER_UTIL_S8: { current_value = ags_audio_buffer_util_peak_s8((gint8 *) buffer, channels, buffer_length, harmonic_rate, max_rate, pressure_factor); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { current_value = ags_audio_buffer_util_peak_s16((gint16 *) buffer, channels, buffer_length, harmonic_rate, max_rate, pressure_factor); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { current_value = ags_audio_buffer_util_peak_s24((gint32 *) buffer, channels, buffer_length, harmonic_rate, max_rate, pressure_factor); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { current_value = ags_audio_buffer_util_peak_s32((gint32 *) buffer, channels, buffer_length, harmonic_rate, max_rate, pressure_factor); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { current_value = ags_audio_buffer_util_peak_s64((gint64 *) buffer, channels, buffer_length, harmonic_rate, max_rate, pressure_factor); } break; case AGS_AUDIO_BUFFER_UTIL_FLOAT: { current_value = ags_audio_buffer_util_peak_float((float *) buffer, channels, buffer_length, harmonic_rate, max_rate, pressure_factor); } break; case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { current_value = ags_audio_buffer_util_peak_double((double *) buffer, channels, buffer_length, harmonic_rate, max_rate, pressure_factor); } break; default: g_warning("ags_audio_buffer_util_peak() - unknown format"); } return(current_value); } /** * ags_audio_buffer_util_resample_s8: * @buffer: the audio buffer * @samplerate: the current samplerate * @channels: number of audio channels * @buffer_length: the buffer's length * @target_samplerate: the samplerate to use * * Resamples @buffer from @samplerate to @target_samplerate. * * Returns: the resampled audio buffer * * Since: 1.0.0 */ gint8* ags_audio_buffer_util_resample_s8(gint8 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate) { SRC_DATA secret_rabbit; gint8 *ret_buffer; secret_rabbit.src_ratio = target_samplerate / samplerate; secret_rabbit.input_frames = buffer_length; secret_rabbit.data_in = (float *) malloc(channels * buffer_length * sizeof(float)); ags_audio_buffer_util_clear_float(secret_rabbit.data_in, channels, buffer_length); ags_audio_buffer_util_copy_s8_to_float(secret_rabbit.data_in, channels, buffer, channels, buffer_length); secret_rabbit.output_frames = ceil(secret_rabbit.src_ratio * buffer_length); secret_rabbit.data_out = (float *) malloc(channels * secret_rabbit.output_frames * sizeof(float)); src_simple(&secret_rabbit, SRC_SINC_BEST_QUALITY, channels); ret_buffer = (gint8 *) malloc(channels * secret_rabbit.output_frames * sizeof(gint8)); memset(ret_buffer, 0, channels * secret_rabbit.output_frames * sizeof(gint8)); ags_audio_buffer_util_copy_float_to_s8(ret_buffer, channels, secret_rabbit.data_out, channels, secret_rabbit.output_frames); return(ret_buffer); } /** * ags_audio_buffer_util_resample_s16: * @buffer: the audio buffer * @samplerate: the current samplerate * @channels: number of audio channels * @buffer_length: the buffer's length * @target_samplerate: the samplerate to use * * Resamples @buffer from @samplerate to @target_samplerate. * * Returns: the resampled audio buffer * * Since: 1.0.0 */ gint16* ags_audio_buffer_util_resample_s16(gint16 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate) { SRC_DATA secret_rabbit; gint16 *ret_buffer; secret_rabbit.src_ratio = target_samplerate / samplerate; secret_rabbit.input_frames = buffer_length; secret_rabbit.data_in = (float *) malloc(channels * buffer_length * sizeof(float)); ags_audio_buffer_util_clear_float(secret_rabbit.data_in, channels, buffer_length); ags_audio_buffer_util_copy_s16_to_float(secret_rabbit.data_in, channels, buffer, channels, buffer_length); secret_rabbit.output_frames = ceil(secret_rabbit.src_ratio * buffer_length); secret_rabbit.data_out = (float *) malloc(channels * secret_rabbit.output_frames * sizeof(float)); src_simple(&secret_rabbit, SRC_SINC_BEST_QUALITY, channels); ret_buffer = (gint16 *) malloc(channels * secret_rabbit.output_frames * sizeof(gint16)); memset(ret_buffer, 0, channels * secret_rabbit.output_frames * sizeof(gint16)); ags_audio_buffer_util_copy_float_to_s16(ret_buffer, channels, secret_rabbit.data_out, channels, secret_rabbit.output_frames); return(ret_buffer); } /** * ags_audio_buffer_util_resample_s24: * @buffer: the audio buffer * @samplerate: the current samplerate * @channels: number of audio channels * @buffer_length: the buffer's length * @target_samplerate: the samplerate to use * * Resamples @buffer from @samplerate to @target_samplerate. * * Returns: the resampled audio buffer * * Since: 1.0.0 */ gint32* ags_audio_buffer_util_resample_s24(gint32 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate) { SRC_DATA secret_rabbit; gint32 *ret_buffer; secret_rabbit.src_ratio = target_samplerate / samplerate; secret_rabbit.input_frames = buffer_length; secret_rabbit.data_in = (float *) malloc(channels * buffer_length * sizeof(float)); ags_audio_buffer_util_clear_float(secret_rabbit.data_in, channels, buffer_length); ags_audio_buffer_util_copy_s24_to_float(secret_rabbit.data_in, channels, buffer, channels, buffer_length); secret_rabbit.output_frames = ceil(secret_rabbit.src_ratio * buffer_length); secret_rabbit.data_out = (float *) malloc(channels * secret_rabbit.output_frames * sizeof(float)); src_simple(&secret_rabbit, SRC_SINC_BEST_QUALITY, channels); ret_buffer = (gint32 *) malloc(channels * secret_rabbit.output_frames * sizeof(gint32)); memset(ret_buffer, 0, channels * secret_rabbit.output_frames * sizeof(gint32)); ags_audio_buffer_util_copy_float_to_s24(ret_buffer, channels, secret_rabbit.data_out, channels, secret_rabbit.output_frames); return(ret_buffer); } /** * ags_audio_buffer_util_resample_s32: * @buffer: the audio buffer * @samplerate: the current samplerate * @channels: number of audio channels * @buffer_length: the buffer's length * @target_samplerate: the samplerate to use * * Resamples @buffer from @samplerate to @target_samplerate. * * Returns: the resampled audio buffer * * Since: 1.0.0 */ gint32* ags_audio_buffer_util_resample_s32(gint32 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate) { SRC_DATA secret_rabbit; gint32 *ret_buffer; secret_rabbit.src_ratio = target_samplerate / samplerate; secret_rabbit.input_frames = buffer_length; secret_rabbit.data_in = (float *) malloc(channels * buffer_length * sizeof(float)); ags_audio_buffer_util_clear_float(secret_rabbit.data_in, channels, buffer_length); ags_audio_buffer_util_copy_s32_to_float(secret_rabbit.data_in, channels, buffer, channels, buffer_length); secret_rabbit.output_frames = ceil(secret_rabbit.src_ratio * buffer_length); secret_rabbit.data_out = (float *) malloc(channels * secret_rabbit.output_frames * sizeof(float)); src_simple(&secret_rabbit, SRC_SINC_BEST_QUALITY, channels); ret_buffer = (gint32 *) malloc(channels * secret_rabbit.output_frames * sizeof(gint32)); memset(ret_buffer, 0, channels * secret_rabbit.output_frames * sizeof(gint32)); ags_audio_buffer_util_copy_float_to_s32(ret_buffer, channels, secret_rabbit.data_out, channels, secret_rabbit.output_frames); return(ret_buffer); } /** * ags_audio_buffer_util_resample_s64: * @buffer: the audio buffer * @samplerate: the current samplerate * @channels: number of audio channels * @buffer_length: the buffer's length * @target_samplerate: the samplerate to use * * Resamples @buffer from @samplerate to @target_samplerate. * * Returns: the resampled audio buffer * * Since: 1.0.0 */ gint64* ags_audio_buffer_util_resample_s64(gint64 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate) { SRC_DATA secret_rabbit; gint64 *ret_buffer; secret_rabbit.src_ratio = target_samplerate / samplerate; secret_rabbit.input_frames = buffer_length; secret_rabbit.data_in = (float *) malloc(channels * buffer_length * sizeof(float)); ags_audio_buffer_util_clear_float(secret_rabbit.data_in, channels, buffer_length); ags_audio_buffer_util_copy_s64_to_float(secret_rabbit.data_in, channels, buffer, channels, buffer_length); secret_rabbit.output_frames = ceil(secret_rabbit.src_ratio * buffer_length); secret_rabbit.data_out = (float *) malloc(channels * secret_rabbit.output_frames * sizeof(float)); src_simple(&secret_rabbit, SRC_SINC_BEST_QUALITY, channels); ret_buffer = (gint64 *) malloc(channels * secret_rabbit.output_frames * sizeof(gint64)); memset(ret_buffer, 0, channels * secret_rabbit.output_frames * sizeof(gint64)); ags_audio_buffer_util_copy_float_to_s64(ret_buffer, channels, secret_rabbit.data_out, channels, secret_rabbit.output_frames); return(ret_buffer); } /** * ags_audio_buffer_util_resample_float: * @buffer: the audio buffer * @samplerate: the current samplerate * @channels: number of audio channels * @buffer_length: the buffer's length * @target_samplerate: the samplerate to use * * Resamples @buffer from @samplerate to @target_samplerate. * * Returns: the resampled audio buffer * * Since: 1.0.0 */ float* ags_audio_buffer_util_resample_float(float *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate) { SRC_DATA secret_rabbit; secret_rabbit.src_ratio = target_samplerate / samplerate; secret_rabbit.input_frames = buffer_length; secret_rabbit.data_in = buffer; secret_rabbit.output_frames = ceil(secret_rabbit.src_ratio * buffer_length); secret_rabbit.data_out = (float *) malloc(channels * secret_rabbit.output_frames * sizeof(float)); src_simple(&secret_rabbit, SRC_SINC_BEST_QUALITY, channels); return(secret_rabbit.data_out); } /** * ags_audio_buffer_util_resample_double: * @buffer: the audio buffer * @samplerate: the current samplerate * @channels: number of audio channels * @buffer_length: the buffer's length * @target_samplerate: the samplerate to use * * Resamples @buffer from @samplerate to @target_samplerate. * * Returns: the resampled audio buffer * * Since: 1.0.0 */ double* ags_audio_buffer_util_resample_double(double *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate) { SRC_DATA secret_rabbit; double *ret_buffer; //FIXME:JK: lost precision secret_rabbit.src_ratio = target_samplerate / samplerate; secret_rabbit.input_frames = buffer_length; secret_rabbit.data_in = (float *) malloc(channels * buffer_length * sizeof(float)); ags_audio_buffer_util_clear_float(secret_rabbit.data_in, channels, buffer_length); ags_audio_buffer_util_copy_double_to_float(secret_rabbit.data_in, channels, buffer, channels, buffer_length); secret_rabbit.output_frames = ceil(secret_rabbit.src_ratio * buffer_length); secret_rabbit.data_out = (float *) malloc(channels * secret_rabbit.output_frames * sizeof(float)); src_simple(&secret_rabbit, SRC_SINC_BEST_QUALITY, channels); ret_buffer = (double *) malloc(channels * secret_rabbit.output_frames * sizeof(double)); ags_audio_buffer_util_clear_double(ret_buffer, channels, channels * secret_rabbit.output_frames); ags_audio_buffer_util_copy_float_to_double(ret_buffer, channels, secret_rabbit.data_out, channels, secret_rabbit.output_frames); return(ret_buffer); } void* ags_audio_buffer_util_resample(void *buffer, guint channels, guint format, guint samplerate, guint buffer_length, guint target_samplerate) { void *retval; switch(format){ case AGS_AUDIO_BUFFER_UTIL_S8: { retval = ags_audio_buffer_util_resample_s8((gint8 *) buffer, channels, samplerate, buffer_length, target_samplerate); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { retval = ags_audio_buffer_util_resample_s16((gint16 *) buffer, channels, samplerate, buffer_length, target_samplerate); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { retval = ags_audio_buffer_util_resample_s24((gint32 *) buffer, channels, samplerate, buffer_length, target_samplerate); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { retval = ags_audio_buffer_util_resample_s32((gint32 *) buffer, channels, samplerate, buffer_length, target_samplerate); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { retval = ags_audio_buffer_util_resample_s64((gint64 *) buffer, channels, samplerate, buffer_length, target_samplerate); } break; case AGS_AUDIO_BUFFER_UTIL_FLOAT: { retval = ags_audio_buffer_util_resample_float((float *) buffer, channels, samplerate, buffer_length, target_samplerate); } break; case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { retval = ags_audio_buffer_util_resample_double((double *) buffer, channels, samplerate, buffer_length, target_samplerate); } break; default: g_warning("ags_audio_buffer_util_resample() - unknown format"); } return(retval); } /** * ags_audio_buffer_util_copy_s8_to_s8: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s8_to_s8(gint8 *destination, guint dchannels, gint8 *source, guint schannels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xff & ((gint16) ((*destination) + (*source))); destination[1 * dchannels] = 0xff & ((gint16) (destination[1 * dchannels] + source[1 * schannels])); destination[2 * dchannels] = 0xff & ((gint16) (destination[2 * dchannels] + source[2 * schannels])); destination[3 * dchannels] = 0xff & ((gint16) (destination[3 * dchannels] + source[3 * schannels])); destination[4 * dchannels] = 0xff & ((gint16) (destination[4 * dchannels] + source[4 * schannels])); destination[5 * dchannels] = 0xff & ((gint16) (destination[5 * dchannels] + source[5 * schannels])); destination[6 * dchannels] = 0xff & ((gint16) (destination[6 * dchannels] + source[6 * schannels])); destination[7 * dchannels] = 0xff & ((gint16) (destination[7 * dchannels] + source[7 * schannels])); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xff & ((gint16) ((*destination) + (*source))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s8_to_s16: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s8_to_s16(gint16 *destination, guint dchannels, gint8 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 258.00787401574803149606; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffff & ((gint32) ((*destination) + (gint32) (scale * source[0]))); destination[1 * dchannels] = 0xffff & ((gint32) (destination[1 * dchannels] + (gint32) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffff & ((gint32) (destination[2 * dchannels] + (gint32) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffff & ((gint32) (destination[3 * dchannels] + (gint32) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffff & ((gint32) (destination[4 * dchannels] + (gint32) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffff & ((gint32) (destination[5 * dchannels] + (gint32) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffff & ((gint32) (destination[6 * dchannels] + (gint32) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffff & ((gint32) (destination[7 * dchannels] + (gint32) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffff & ((gint32) ((*destination) + (gint32) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s8_to_s24: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s8_to_s24(gint32 *destination, guint dchannels, gint8 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 66052.03149606299212598425; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffff & ((gint32) ((*destination) + (gint32) (scale * source[0]))); destination[1 * dchannels] = 0xffffff & ((gint32) (destination[1 * dchannels] + (gint32) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffff & ((gint32) (destination[2 * dchannels] + (gint32) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffff & ((gint32) (destination[3 * dchannels] + (gint32) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffff & ((gint32) (destination[4 * dchannels] + (gint32) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffff & ((gint32) (destination[5 * dchannels] + (gint32) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffff & ((gint32) (destination[6 * dchannels] + (gint32) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffff & ((gint32) (destination[7 * dchannels] + (gint32) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffff & ((gint32) ((*destination) + (gint32) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s8_to_s32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s8_to_s32(gint32 *destination, guint dchannels, gint8 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 1690931.99212598425196850393; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffff & ((gint64) ((*destination) + (gint32) (scale * source[0]))); destination[1 * dchannels] = 0xffffffff & ((gint64) (destination[1 * dchannels] + (gint32) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffff & ((gint64) (destination[2 * dchannels] + (gint32) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffff & ((gint64) (destination[3 * dchannels] + (gint32) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffff & ((gint64) (destination[4 * dchannels] + (gint32) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffff & ((gint64) (destination[5 * dchannels] + (gint32) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffff & ((gint64) (destination[6 * dchannels] + (gint32) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffff & ((gint64) (destination[7 * dchannels] + (gint32) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffff & ((gint64) ((*destination) + (gint32) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s8_to_s64: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s8_to_s64(gint64 *destination, guint dchannels, gint8 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 72624976668147841.00000000000000000000; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (gint64) (scale * source[0]))); destination[1 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[1 * dchannels] + (gint64) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[2 * dchannels] + (gint64) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[3 * dchannels] + (gint64) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[4 * dchannels] + (gint64) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[5 * dchannels] + (gint64) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[6 * dchannels] + (gint64) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[7 * dchannels] + (gint64) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (gint64) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s8_to_float: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s8_to_float(float *destination, guint dchannels, gint8 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00787401574803149606; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(7.0)))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(7.0)))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(7.0)))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(7.0)))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(7.0)))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(7.0)))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(7.0)))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(7.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(7.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s8_to_double: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s8_to_double(double *destination, guint dchannels, gint8 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00787401574803149606; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(7.0)))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(7.0)))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(7.0)))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(7.0)))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(7.0)))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(7.0)))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(7.0)))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(7.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(7.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s16_to_s8: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s16_to_s8(gint8 *destination, guint dchannels, gint16 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00387585070345164342; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xff & ((gint16) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xff & ((gint16) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xff & ((gint16) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xff & ((gint16) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xff & ((gint16) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xff & ((gint16) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xff & ((gint16) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xff & ((gint16) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xff & ((gint16) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s16_to_s16: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s16_to_s16(gint16 *destination, guint dchannels, gint16 *source, guint schannels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = (gint16) 0xffff & ((gint32) ((*destination) + (*source))); destination[1 * dchannels] = (gint16) 0xffff & ((gint32) (destination[1 * dchannels] + source[1 * schannels])); destination[2 * dchannels] = (gint16) 0xffff & ((gint32) (destination[2 * dchannels] + source[2 * schannels])); destination[3 * dchannels] = (gint16) 0xffff & ((gint32) (destination[3 * dchannels] + source[3 * schannels])); destination[4 * dchannels] = (gint16) 0xffff & ((gint32) (destination[4 * dchannels] + source[4 * schannels])); destination[5 * dchannels] = (gint16) 0xffff & ((gint32) (destination[5 * dchannels] + source[5 * schannels])); destination[6 * dchannels] = (gint16) 0xffff & ((gint32) (destination[6 * dchannels] + source[6 * schannels])); destination[7 * dchannels] = (gint16) 0xffff & ((gint32) (destination[7 * dchannels] + source[7 * schannels])); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = (gint16) 0xffff & ((gint32) ((*destination) + (*source))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s16_to_s24: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s16_to_s24(gint32 *destination, guint dchannels, gint16 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 256.00778221991637928403; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffff & ((gint32) ((*destination) + (gint32) (scale * source[0]))); destination[1 * dchannels] = 0xffffff & ((gint32) (destination[1 * dchannels] + (gint32) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffff & ((gint32) (destination[2 * dchannels] + (gint32) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffff & ((gint32) (destination[3 * dchannels] + (gint32) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffff & ((gint32) (destination[4 * dchannels] + (gint32) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffff & ((gint32) (destination[5 * dchannels] + (gint32) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffff & ((gint32) (destination[6 * dchannels] + (gint32) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffff & ((gint32) (destination[7 * dchannels] + (gint32) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffff & ((gint32) ((*destination) + (gint32) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s16_to_s32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s16_to_s32(gint32 *destination, guint dchannels, gint16 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 6553.79995117038483840449; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffff & ((gint64) ((*destination) + (gint32) (scale * source[0]))); destination[1 * dchannels] = 0xffffffff & ((gint64) (destination[1 * dchannels] + (gint32) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffff & ((gint64) (destination[2 * dchannels] + (gint32) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffff & ((gint64) (destination[3 * dchannels] + (gint32) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffff & ((gint64) (destination[4 * dchannels] + (gint32) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffff & ((gint64) (destination[5 * dchannels] + (gint32) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffff & ((gint64) (destination[6 * dchannels] + (gint32) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffff & ((gint64) (destination[7 * dchannels] + (gint32) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffff & ((gint64) ((*destination) + (gint32) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s16_to_s64: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s16_to_s64(gint64 *destination, guint dchannels, gint16 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 281483566907400.00021362956633198034; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (gint64) (scale * source[0]))); destination[1 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[1 * dchannels] + (gint64) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[2 * dchannels] + (gint64) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[3 * dchannels] + (gint64) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[4 * dchannels] + (gint64) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[5 * dchannels] + (gint64) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[6 * dchannels] + (gint64) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[7 * dchannels] + (gint64) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (gint64) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s16_to_float: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s16_to_float(float *destination, guint dchannels, gint16 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00003051850947599719; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = (float) ((double) ((*destination) + (double) (source[0] / exp2(15.0)))); destination[1 * dchannels] = (float) ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(15.0)))); destination[2 * dchannels] = (float) ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(15.0)))); destination[3 * dchannels] = (float) ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(15.0)))); destination[4 * dchannels] = (float) ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(15.0)))); destination[5 * dchannels] = (float) ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(15.0)))); destination[6 * dchannels] = (float) ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(15.0)))); destination[7 * dchannels] = (float) ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(15.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = (float) ((double) ((*destination) + (double) (source[0] / exp2(15.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s16_to_double: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s16_to_double(double *destination, guint dchannels, gint16 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00003051850947599719; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(15.0)))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(15.0)))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(15.0)))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(15.0)))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(15.0)))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(15.0)))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(15.0)))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(15.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(15.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s24_to_s8: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s24_to_s8(gint8 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00001513958157772798; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xff & ((gint16) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xff & ((gint16) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xff & ((gint16) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xff & ((gint16) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xff & ((gint16) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xff & ((gint16) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xff & ((gint16) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xff & ((gint16) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xff & ((gint16) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s24_to_s16: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s24_to_s16(gint16 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00390613125635758118; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffff & ((gint32) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xffff & ((gint32) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffff & ((gint32) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffff & ((gint32) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffff & ((gint32) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffff & ((gint32) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffff & ((gint32) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffff & ((gint32) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffff & ((gint32) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s24_to_s24: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s24_to_s24(gint32 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffff & ((gint32) ((*destination) + (*source))); destination[1 * dchannels] = 0xffffff & ((gint32) (destination[1 * dchannels] + source[1 * schannels])); destination[2 * dchannels] = 0xffffff & ((gint32) (destination[2 * dchannels] + source[2 * schannels])); destination[3 * dchannels] = 0xffffff & ((gint32) (destination[3 * dchannels] + source[3 * schannels])); destination[4 * dchannels] = 0xffffff & ((gint32) (destination[4 * dchannels] + source[4 * schannels])); destination[5 * dchannels] = 0xffffff & ((gint32) (destination[5 * dchannels] + source[5 * schannels])); destination[6 * dchannels] = 0xffffff & ((gint32) (destination[6 * dchannels] + source[6 * schannels])); destination[7 * dchannels] = 0xffffff & ((gint32) (destination[7 * dchannels] + source[7 * schannels])); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffff & ((gint32) ((*destination) + (*source))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s24_to_s32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s24_to_s32(gint32 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 25.60000283718142952697; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffff & ((gint64) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xffffffff & ((gint64) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffff & ((gint64) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffff & ((gint64) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffff & ((gint64) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffff & ((gint64) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffff & ((gint64) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffff & ((gint64) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffff & ((gint64) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s24_to_s64: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s24_to_s64(gint64 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 1099511758848.01562488265334160963; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s24_to_float: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s24_to_float(float *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00000011920930376163; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(23.0)))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(23.0)))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(23.0)))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(23.0)))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(23.0)))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(23.0)))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(23.0)))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(23.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(23.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s24_to_double: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s24_to_double(double *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00000011920930376163; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(23.0)))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(23.0)))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(23.0)))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(23.0)))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(23.0)))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(23.0)))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(23.0)))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(23.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(23.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s32_to_s8: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s32_to_s8(gint8 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00000059138983983780; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xff & ((gint16) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xff & ((gint16) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xff & ((gint16) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xff & ((gint16) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xff & ((gint16) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xff & ((gint16) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xff & ((gint16) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xff & ((gint16) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xff & ((gint16) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s32_to_s16: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s32_to_s16(gint16 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00015258323529106482; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffff & ((gint32) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xffff & ((gint32) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffff & ((gint32) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffff & ((gint32) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffff & ((gint32) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffff & ((gint32) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffff & ((gint32) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffff & ((gint32) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffff & ((gint32) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s32_to_s24: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s32_to_s24(gint32 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.03906249548890626240; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffff & ((gint32) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xffffff & ((gint32) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffff & ((gint32) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffff & ((gint32) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffff & ((gint32) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffff & ((gint32) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffff & ((gint32) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffff & ((gint32) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffff & ((gint32) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s32_to_s32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s32_to_s32(gint32 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffff & ((gint64) ((*destination) + (*source))); destination[1 * dchannels] = 0xffffffff & ((gint64) (destination[1 * dchannels] + source[1 * schannels])); destination[2 * dchannels] = 0xffffffff & ((gint64) (destination[2 * dchannels] + source[2 * schannels])); destination[3 * dchannels] = 0xffffffff & ((gint64) (destination[3 * dchannels] + source[3 * schannels])); destination[4 * dchannels] = 0xffffffff & ((gint64) (destination[4 * dchannels] + source[4 * schannels])); destination[5 * dchannels] = 0xffffffff & ((gint64) (destination[5 * dchannels] + source[5 * schannels])); destination[6 * dchannels] = 0xffffffff & ((gint64) (destination[6 * dchannels] + source[6 * schannels])); destination[7 * dchannels] = 0xffffffff & ((gint64) (destination[7 * dchannels] + source[7 * schannels])); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffff & ((gint64) ((*destination) + (*source))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s32_to_s64: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s32_to_s64(gint64 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00000000002328306417; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s32_to_float: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s32_to_float(float *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00000000465661291210; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(31.0)))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(31.0)))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(31.0)))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(31.0)))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(31.0)))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(31.0)))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(31.0)))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(31.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(31.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s32_to_double: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s32_to_double(double *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00000000465661291210; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(31.0)))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(31.0)))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(31.0)))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(31.0)))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(31.0)))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(31.0)))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(31.0)))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(31.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(31.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s64_to_s8: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s64_to_s8(gint8 *destination, guint dchannels, gint64 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00000000000000001376; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xff & ((gint16) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xff & ((gint16) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xff & ((gint16) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xff & ((gint16) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xff & ((gint16) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xff & ((gint16) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xff & ((gint16) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xff & ((gint16) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xff & ((gint16) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s64_to_s16: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s64_to_s16(gint16 *destination, guint dchannels, gint64 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00000000000000355260; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffff & ((gint32) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xffff & ((gint32) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffff & ((gint32) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffff & ((gint32) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffff & ((gint32) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffff & ((gint32) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffff & ((gint32) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffff & ((gint32) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffff & ((gint32) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s64_to_s24: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s64_to_s24(gint32 *destination, guint dchannels, gint64 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00000000000090949459; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffff & ((gint32) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xffffff & ((gint32) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffff & ((gint32) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffff & ((gint32) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffff & ((gint32) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffff & ((gint32) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffff & ((gint32) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffff & ((gint32) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffff & ((gint32) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s64_to_s32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s64_to_s32(gint32 *destination, guint dchannels, gint64 *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_destination / 2.0 - 1.0) / (2^bits_source / 2.0 - 1.0) static const gdouble scale = 0.00000000002328306417; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffff & ((gint64) ((*destination) + (scale * source[0]))); destination[1 * dchannels] = 0xffffff & ((gint64) (destination[1 * dchannels] + (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffff & ((gint64) (destination[2 * dchannels] + (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffff & ((gint64) (destination[3 * dchannels] + (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffff & ((gint64) (destination[4 * dchannels] + (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffff & ((gint64) (destination[5 * dchannels] + (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffff & ((gint64) (destination[6 * dchannels] + (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffff & ((gint64) (destination[7 * dchannels] + (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffff & ((gint64) ((*destination) + (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s64_to_s64: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s64_to_s64(gint64 *destination, guint dchannels, gint64 *source, guint schannels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (*source))); destination[1 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[1 * dchannels] + source[1 * schannels])); destination[2 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[2 * dchannels] + source[2 * schannels])); destination[3 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[3 * dchannels] + source[3 * schannels])); destination[4 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[4 * dchannels] + source[4 * schannels])); destination[5 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[5 * dchannels] + source[5 * schannels])); destination[6 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[6 * dchannels] + source[6 * schannels])); destination[7 * dchannels] = 0xffffffffffffffff & ((gint64) (destination[7 * dchannels] + source[7 * schannels])); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffffffffffff & ((gint64) ((*destination) + (*source))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s64_to_float: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s64_to_float(float *destination, guint dchannels, gint64 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00000000000000000010; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(63.0)))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(63.0)))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(63.0)))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(63.0)))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(63.0)))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(63.0)))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(63.0)))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(63.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(63.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s64_to_double: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s64_to_double(double *destination, guint dchannels, gint64 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const gdouble scale = 0.00000000000000000010; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(63.0)))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels] / exp2(63.0)))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels] / exp2(63.0)))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels] / exp2(63.0)))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels] / exp2(63.0)))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels] / exp2(63.0)))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels] / exp2(63.0)))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels] / exp2(63.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0] / exp2(63.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_float_to_s8: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_float_to_s8(gint8 *destination, guint dchannels, float *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 127.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xff & (gint8) ((double) ((*destination) + (double) (scale * source[0]))); destination[1 * dchannels] = 0xff & (gint8) ((double) (destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xff & (gint8) ((double) (destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xff & (gint8) ((double) (destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xff & (gint8) ((double) (destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xff & (gint8) ((double) (destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xff & (gint8) ((double) (destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xff & (gint8) ((double) (destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xff & (gint8) ((double) ((*destination) + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_float_to_s16: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_float_to_s16(gint16 *destination, guint dchannels, float *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 32767.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffff & (gint16) ((double) ((*destination) + (double) (scale * source[0]))); destination[1 * dchannels] = 0xffff & (gint16) ((double) (destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffff & (gint16) ((double) (destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffff & (gint16) ((double) (destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffff & (gint16) ((double) (destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffff & (gint16) ((double) (destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffff & (gint16) ((double) (destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffff & (gint16) ((double) (destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffff & (gint16) ((double) ((*destination) + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_float_to_s24: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_float_to_s24(gint32 *destination, guint dchannels, float *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 8388607.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffff & (gint32) ((double) ((*destination) + (double) (scale * source[0]))); destination[1 * dchannels] = 0xffffff & (gint32) ((double) (destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffff & (gint32) ((double) (destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffff & (gint32) ((double) (destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffff & (gint32) ((double) (destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffff & (gint32) ((double) (destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffff & (gint32) ((double) (destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffff & (gint32) ((double) (destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffff & (gint32) ((double) ((*destination) + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_float_to_s32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_float_to_s32(gint32 *destination, guint dchannels, float *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 214748363.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffff & (gint32) ((double) ((*destination) + (double) (scale * source[0]))); destination[1 * dchannels] = 0xffffffff & (gint32) ((double) (destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffff & (gint32) ((double) (destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffff & (gint32) ((double) (destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffff & (gint32) ((double) (destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffff & (gint32) ((double) (destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffff & (gint32) ((double) (destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffff & (gint32) ((double) (destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffff & (gint32) ((double) ((*destination) + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_float_to_s64: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_float_to_s64(gint64 *destination, guint dchannels, float *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 9223372036854775807.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffffffffffff & (gint64) ((double) ((*destination) + (double) (scale * source[0]))); destination[1 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffffffffffff & (gint64) ((double) ((*destination) + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_float_to_float: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_float_to_float(float *destination, guint dchannels, float *source, guint schannels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = (float) ((double) ((*destination) + (double) (source[0]))); destination[1 * dchannels] = (float) ((double) (destination[1 * dchannels] + (double) (source[1 * schannels]))); destination[2 * dchannels] = (float) ((double) (destination[2 * dchannels] + (double) (source[2 * schannels]))); destination[3 * dchannels] = (float) ((double) (destination[3 * dchannels] + (double) (source[3 * schannels]))); destination[4 * dchannels] = (float) ((double) (destination[4 * dchannels] + (double) (source[4 * schannels]))); destination[5 * dchannels] = (float) ((double) (destination[5 * dchannels] + (double) (source[5 * schannels]))); destination[6 * dchannels] = (float) ((double) (destination[6 * dchannels] + (double) (source[6 * schannels]))); destination[7 * dchannels] = (float) ((double) (destination[7 * dchannels] + (double) (source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = (float) ((double) ((*destination) + (double) (source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_float_to_double: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_float_to_double(double *destination, guint dchannels, float *source, guint schannels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0]))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels]))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels]))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels]))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels]))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels]))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels]))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_double_to_s8: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_double_to_s8(gint8 *destination, guint dchannels, double *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 127.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xff & (gint8) ((double) ((*destination) + (double) (scale * source[0]))); destination[1 * dchannels] = 0xff & (gint8) ((double) (destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xff & (gint8) ((double) (destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xff & (gint8) ((double) (destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xff & (gint8) ((double) (destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xff & (gint8) ((double) (destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xff & (gint8) ((double) (destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xff & (gint8) ((double) (destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xff & (gint8) ((double) ((*destination) + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_double_to_s16: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_double_to_s16(gint16 *destination, guint dchannels, double *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 32767.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffff & (gint16) ((double) ((*destination) + (double) (scale * source[0]))); destination[1 * dchannels] = 0xffff & (gint16) ((double) (destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffff & (gint16) ((double) (destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffff & (gint16) ((double) (destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffff & (gint16) ((double) (destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffff & (gint16) ((double) (destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffff & (gint16) ((double) (destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffff & (gint16) ((double) (destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffff & (gint16) ((double) ((*destination) + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_double_to_s24: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_double_to_s24(gint32 *destination, guint dchannels, double *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 8388607.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffff & (gint32) ((double) ((*destination) + (double) (scale * source[0]))); destination[1 * dchannels] = 0xffffff & (gint32) ((double) (destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffff & (gint32) ((double) (destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffff & (gint32) ((double) (destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffff & (gint32) ((double) (destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffff & (gint32) ((double) (destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffff & (gint32) ((double) (destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffff & (gint32) ((double) (destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffff & (gint32) ((double) ((*destination) + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_double_to_s32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_double_to_s32(gint32 *destination, guint dchannels, double *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 214748363.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffff & (gint32) (((double) destination[0] + (double) (scale * source[0]))); destination[1 * dchannels] = 0xffffffff & (gint32) (((double) destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffff & (gint32) (((double) destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffff & (gint32) (((double) destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffff & (gint32) (((double) destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffff & (gint32) (((double) destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffff & (gint32) (((double) destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffff & (gint32) (((double) destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffff & (gint32) (((double) destination[0] + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_double_to_s64: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_double_to_s64(gint64 *destination, guint dchannels, double *source, guint schannels, guint count) { //NOTE:JK: scale = (2^bits_source / 2.0 - 1.0) static const gdouble scale = 9223372036854775807.0; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = 0xffffffffffffffff & (gint64) ((double) ((*destination) + (double) (scale * source[0]))); destination[1 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[1 * dchannels] + (double) (scale * source[1 * schannels]))); destination[2 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[2 * dchannels] + (double) (scale * source[2 * schannels]))); destination[3 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[3 * dchannels] + (double) (scale * source[3 * schannels]))); destination[4 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[4 * dchannels] + (double) (scale * source[4 * schannels]))); destination[5 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[5 * dchannels] + (double) (scale * source[5 * schannels]))); destination[6 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[6 * dchannels] + (double) (scale * source[6 * schannels]))); destination[7 * dchannels] = 0xffffffffffffffff & (gint64) ((double) (destination[7 * dchannels] + (double) (scale * source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = 0xffffffffffffffff & (gint64) ((double) ((*destination) + (double) (scale * source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_double_to_float: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_double_to_float(float *destination, guint dchannels, double *source, guint schannels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = (float) ((double) ((*destination) + (double) (source[0]))); destination[1 * dchannels] = (float) ((double) (destination[1 * dchannels] + (double) (source[1 * schannels]))); destination[2 * dchannels] = (float) ((double) (destination[2 * dchannels] + (double) (source[2 * schannels]))); destination[3 * dchannels] = (float) ((double) (destination[3 * dchannels] + (double) (source[3 * schannels]))); destination[4 * dchannels] = (float) ((double) (destination[4 * dchannels] + (double) (source[4 * schannels]))); destination[5 * dchannels] = (float) ((double) (destination[5 * dchannels] + (double) (source[5 * schannels]))); destination[6 * dchannels] = (float) ((double) (destination[6 * dchannels] + (double) (source[6 * schannels]))); destination[7 * dchannels] = (float) ((double) (destination[7 * dchannels] + (double) (source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = (float) ((double) ((*destination) + (double) (source[0]))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_double_to_double: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_double_to_double(double *destination, guint dchannels, double *source, guint schannels, guint count) { guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((double) ((*destination) + (double) (source[0]))); destination[1 * dchannels] = ((double) (destination[1 * dchannels] + (double) (source[1 * schannels]))); destination[2 * dchannels] = ((double) (destination[2 * dchannels] + (double) (source[2 * schannels]))); destination[3 * dchannels] = ((double) (destination[3 * dchannels] + (double) (source[3 * schannels]))); destination[4 * dchannels] = ((double) (destination[4 * dchannels] + (double) (source[4 * schannels]))); destination[5 * dchannels] = ((double) (destination[5 * dchannels] + (double) (source[5 * schannels]))); destination[6 * dchannels] = ((double) (destination[6 * dchannels] + (double) (source[6 * schannels]))); destination[7 * dchannels] = ((double) (destination[7 * dchannels] + (double) (source[7 * schannels]))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((double) ((*destination) + (double) (source[0]))); destination += dchannels; source += schannels; } } #ifdef __APPLE__ /** * ags_audio_buffer_util_copy_s8_to_float32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s8_to_float32(Float32 *destination, guint dchannels, gint8 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const Float64 scale = 0.0078740157480314960629854564334861866115034L; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((Float64) ((*destination) + (Float64) (source[0] / exp2(7.0)))); destination[1 * dchannels] = ((Float64) (destination[1 * dchannels] + (Float64) (source[1 * schannels] / exp2(7.0)))); destination[2 * dchannels] = ((Float64) (destination[2 * dchannels] + (Float64) (source[2 * schannels] / exp2(7.0)))); destination[3 * dchannels] = ((Float64) (destination[3 * dchannels] + (Float64) (source[3 * schannels] / exp2(7.0)))); destination[4 * dchannels] = ((Float64) (destination[4 * dchannels] + (Float64) (source[4 * schannels] / exp2(7.0)))); destination[5 * dchannels] = ((Float64) (destination[5 * dchannels] + (Float64) (source[5 * schannels] / exp2(7.0)))); destination[6 * dchannels] = ((Float64) (destination[6 * dchannels] + (Float64) (source[6 * schannels] / exp2(7.0)))); destination[7 * dchannels] = ((Float64) (destination[7 * dchannels] + (Float64) (source[7 * schannels] / exp2(7.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((Float64) ((*destination) + (Float64) (source[0] / exp2(7.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s16_to_float32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s16_to_float32(Float32 *destination, guint dchannels, gint16 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const Float64 scale = 0.0000305185094759971922971274004400890622613L; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = (Float32) (((*destination) + (Float64) (source[0] / exp2(15.0)))); destination[1 * dchannels] = (Float32) ((destination[1 * dchannels] + (Float64) (source[1 * schannels] / exp2(15.0)))); destination[2 * dchannels] = (Float32) ((destination[2 * dchannels] + (Float64) (source[2 * schannels] / exp2(15.0)))); destination[3 * dchannels] = (Float32) ((destination[3 * dchannels] + (Float64) (source[3 * schannels] / exp2(15.0)))); destination[4 * dchannels] = (Float32) ((destination[4 * dchannels] + (Float64) (source[4 * schannels] / exp2(15.0)))); destination[5 * dchannels] = (Float32) ((destination[5 * dchannels] + (Float64) (source[5 * schannels] / exp2(15.0)))); destination[6 * dchannels] = (Float32) ((destination[6 * dchannels] + (Float64) (source[6 * schannels] / exp2(15.0)))); destination[7 * dchannels] = (Float32) ((destination[7 * dchannels] + (Float64) (source[7 * schannels] / exp2(15.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = (Float32) (((*destination) + (Float64) (source[0] / exp2(15.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s24_to_float32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s24_to_float32(Float32 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const Float64 scale = 0.0000001192093037616376592678982260231634882L; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((Float64) ((*destination) + (Float64) (source[0] / exp2(23.0)))); destination[1 * dchannels] = ((Float64) (destination[1 * dchannels] + (Float64) (source[1 * schannels] / exp2(23.0)))); destination[2 * dchannels] = ((Float64) (destination[2 * dchannels] + (Float64) (source[2 * schannels] / exp2(23.0)))); destination[3 * dchannels] = ((Float64) (destination[3 * dchannels] + (Float64) (source[3 * schannels] / exp2(23.0)))); destination[4 * dchannels] = ((Float64) (destination[4 * dchannels] + (Float64) (source[4 * schannels] / exp2(23.0)))); destination[5 * dchannels] = ((Float64) (destination[5 * dchannels] + (Float64) (source[5 * schannels] / exp2(23.0)))); destination[6 * dchannels] = ((Float64) (destination[6 * dchannels] + (Float64) (source[6 * schannels] / exp2(23.0)))); destination[7 * dchannels] = ((Float64) (destination[7 * dchannels] + (Float64) (source[7 * schannels] / exp2(23.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((Float64) ((*destination) + (Float64) (source[0] / exp2(23.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s32_to_float32: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s32_to_float32(Float32 *destination, guint dchannels, gint32 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const Float64 scale = 0.0000000004656612875245796924105750826697801L; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((Float64) ((*destination) + (Float64) (source[0] / exp2(31.0)))); destination[1 * dchannels] = ((Float64) (destination[1 * dchannels] + (Float64) (source[1 * schannels] / exp2(31.0)))); destination[2 * dchannels] = ((Float64) (destination[2 * dchannels] + (Float64) (source[2 * schannels] / exp2(31.0)))); destination[3 * dchannels] = ((Float64) (destination[3 * dchannels] + (Float64) (source[3 * schannels] / exp2(31.0)))); destination[4 * dchannels] = ((Float64) (destination[4 * dchannels] + (Float64) (source[4 * schannels] / exp2(31.0)))); destination[5 * dchannels] = ((Float64) (destination[5 * dchannels] + (Float64) (source[5 * schannels] / exp2(31.0)))); destination[6 * dchannels] = ((Float64) (destination[6 * dchannels] + (Float64) (source[6 * schannels] / exp2(31.0)))); destination[7 * dchannels] = ((Float64) (destination[7 * dchannels] + (Float64) (source[7 * schannels] / exp2(31.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((Float64) ((*destination) + (Float64) (source[0] / exp2(31.0)))); destination += dchannels; source += schannels; } } /** * ags_audio_buffer_util_copy_s64_to_float32o: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @source: source buffer * @schannels: source buffer's count of channels * @count: number of frames to copy * * Copy audio data using additive strategy. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_s64_to_float32(Float32 *destination, guint dchannels, gint64 *source, guint schannels, guint count) { //NOTE:JK: scale = 1.0 / (2^bits_source / 2.0 - 1.0) // static const Float64 scale = 0.0000000000000000000722801448323667726912712L; guint limit; guint i; i = 0; /* unrolled function */ if(count > 8){ limit = count - 8; for(; i < limit; i += 8){ *destination = ((Float64) ((*destination) + (Float64) (source[0] / exp2(63.0)))); destination[1 * dchannels] = ((Float64) (destination[1 * dchannels] + (Float64) (source[1 * schannels] / exp2(63.0)))); destination[2 * dchannels] = ((Float64) (destination[2 * dchannels] + (Float64) (source[2 * schannels] / exp2(63.0)))); destination[3 * dchannels] = ((Float64) (destination[3 * dchannels] + (Float64) (source[3 * schannels] / exp2(63.0)))); destination[4 * dchannels] = ((Float64) (destination[4 * dchannels] + (Float64) (source[4 * schannels] / exp2(63.0)))); destination[5 * dchannels] = ((Float64) (destination[5 * dchannels] + (Float64) (source[5 * schannels] / exp2(63.0)))); destination[6 * dchannels] = ((Float64) (destination[6 * dchannels] + (Float64) (source[6 * schannels] / exp2(63.0)))); destination[7 * dchannels] = ((Float64) (destination[7 * dchannels] + (Float64) (source[7 * schannels] / exp2(63.0)))); destination += (8 * dchannels); source += (8 * schannels); } } for(; i < count; i++){ *destination = ((Float64) ((*destination) + (Float64) (source[0] / exp2(63.0)))); destination += dchannels; source += schannels; } } #endif /** * ags_audio_buffer_util_copy_buffer_to_buffer: * @destination: destination buffer * @dchannels: destination buffer's count of channels * @doffset: start frame of destination * @source: source buffer * @schannels: source buffer's count of channels * @soffset: start frame of source * @count: number of frames to copy * @mode: specified type conversion as described * * Wrapper function to copy functions. Doing type conversion. * * Since: 1.0.0 */ void ags_audio_buffer_util_copy_buffer_to_buffer(void *destination, guint dchannels, guint doffset, void *source, guint schannels, guint soffset, guint count, guint mode) { switch(mode){ case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S8: { ags_audio_buffer_util_copy_s8_to_s8((gint8 *) destination + doffset, dchannels, (gint8 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S16: { ags_audio_buffer_util_copy_s8_to_s16((gint16 *) destination + doffset, dchannels, (gint8 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S24: { ags_audio_buffer_util_copy_s8_to_s24((gint32 *) destination + doffset, dchannels, (gint8 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S32: { ags_audio_buffer_util_copy_s8_to_s32((gint32 *) destination + doffset, dchannels, (gint8 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S64: { ags_audio_buffer_util_copy_s8_to_s64((gint64 *) destination + doffset, dchannels, (gint8 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_FLOAT: { ags_audio_buffer_util_copy_s8_to_float((float *) destination + doffset, dchannels, (gint8 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_DOUBLE: { ags_audio_buffer_util_copy_s8_to_double((double *) destination + doffset, dchannels, (gint8 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S8: { ags_audio_buffer_util_copy_s16_to_s8((gint8 *) destination + doffset, dchannels, (gint16 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S16: { ags_audio_buffer_util_copy_s16_to_s16(((gint16 *) destination) + doffset, dchannels, ((gint16 *) source) + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S24: { ags_audio_buffer_util_copy_s16_to_s24((gint32 *) destination + doffset, dchannels, (gint16 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S32: { ags_audio_buffer_util_copy_s16_to_s32((gint32 *) destination + doffset, dchannels, (gint16 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S64: { ags_audio_buffer_util_copy_s16_to_s64((gint64 *) destination + doffset, dchannels, (gint16 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_FLOAT: { ags_audio_buffer_util_copy_s16_to_float((float *) destination + doffset, dchannels, (gint16 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_DOUBLE: { ags_audio_buffer_util_copy_s16_to_double((double *) destination + doffset, dchannels, (gint16 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S8: { ags_audio_buffer_util_copy_s24_to_s8((gint8 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S16: { ags_audio_buffer_util_copy_s24_to_s16((gint16 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S24: { ags_audio_buffer_util_copy_s24_to_s24((gint32 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S32: { ags_audio_buffer_util_copy_s24_to_s32((gint32 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S64: { ags_audio_buffer_util_copy_s24_to_s64((gint64 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_FLOAT: { ags_audio_buffer_util_copy_s24_to_float((float *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_DOUBLE: { ags_audio_buffer_util_copy_s24_to_double((double *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S8: { ags_audio_buffer_util_copy_s32_to_s8((gint8 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S16: { ags_audio_buffer_util_copy_s32_to_s16((gint16 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S24: { ags_audio_buffer_util_copy_s32_to_s24((gint32 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S32: { ags_audio_buffer_util_copy_s32_to_s32((gint32 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S64: { ags_audio_buffer_util_copy_s32_to_s64((gint64 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_FLOAT: { ags_audio_buffer_util_copy_s32_to_s8((gint8 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_DOUBLE: { ags_audio_buffer_util_copy_s32_to_double((double *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S8: { ags_audio_buffer_util_copy_s64_to_s8((gint8 *) destination + doffset, dchannels, (gint64 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S16: { ags_audio_buffer_util_copy_s64_to_s16((gint16 *) destination + doffset, dchannels, (gint64 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S24: { ags_audio_buffer_util_copy_s64_to_s24((gint32 *) destination + doffset, dchannels, (gint64 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S32: { ags_audio_buffer_util_copy_s64_to_s32((gint32 *) destination + doffset, dchannels, (gint64 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S64: { ags_audio_buffer_util_copy_s64_to_s64((gint64 *) destination + doffset, dchannels, (gint64 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_FLOAT: { ags_audio_buffer_util_copy_s64_to_float((float *) destination + doffset, dchannels, (gint64 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_DOUBLE: { ags_audio_buffer_util_copy_s64_to_double((double *) destination + doffset, dchannels, (gint64 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S8: { ags_audio_buffer_util_copy_float_to_s8((gint8 *) destination + doffset, dchannels, (float *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S16: { ags_audio_buffer_util_copy_float_to_s16((gint16 *) destination + doffset, dchannels, (float *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S24: { ags_audio_buffer_util_copy_float_to_s24((gint32 *) destination + doffset, dchannels, (float *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S32: { ags_audio_buffer_util_copy_float_to_s32((gint32 *) destination + doffset, dchannels, (float *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S64: { ags_audio_buffer_util_copy_float_to_s64((gint64 *) destination + doffset, dchannels, (float *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_FLOAT: { ags_audio_buffer_util_copy_float_to_float((float *) destination + doffset, dchannels, (float *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_DOUBLE: { ags_audio_buffer_util_copy_float_to_double((double *) destination + doffset, dchannels, (float *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S8: { ags_audio_buffer_util_copy_double_to_s8((gint8 *) destination + doffset, dchannels, (double *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S16: { ags_audio_buffer_util_copy_double_to_s16((gint16 *) destination + doffset, dchannels, (double *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S24: { ags_audio_buffer_util_copy_double_to_s24((gint32 *) destination + doffset, dchannels, (double *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S32: { ags_audio_buffer_util_copy_double_to_s32((gint32 *) destination + doffset, dchannels, (double *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S64: { ags_audio_buffer_util_copy_double_to_s64((gint64 *) destination + doffset, dchannels, (double *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_FLOAT: { ags_audio_buffer_util_copy_double_to_float((float *) destination + doffset, dchannels, (double *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_DOUBLE: { ags_audio_buffer_util_copy_double_to_double((double *) destination + doffset, dchannels, (double *) source + soffset, schannels, count); } break; #ifdef __APPLE__ case AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_FLOAT32: { ags_audio_buffer_util_copy_s8_to_float32((Float32 *) destination + doffset, dchannels, (gint8 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_FLOAT32: { ags_audio_buffer_util_copy_s16_to_float32((Float32 *) destination + doffset, dchannels, ((gint16 *) source) + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_FLOAT32: { ags_audio_buffer_util_copy_s24_to_float32((Float32 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_FLOAT32: { ags_audio_buffer_util_copy_s32_to_float32((Float32 *) destination + doffset, dchannels, (gint32 *) source + soffset, schannels, count); } break; case AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_FLOAT32: { ags_audio_buffer_util_copy_s64_to_float32((Float32 *) destination + doffset, dchannels, (gint64 *) source + soffset, schannels, count); } break; #endif default: { g_warning("ags_audio_buffer_util.c - unknown copy mode"); } } } gsequencer-1.4.24/ags/audio/ags_audio_signal.h0000644000175000017500000001273313256163135016213 00000000000000/* 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 . */ #ifndef __AGS_AUDIO_SIGNAL_H__ #define __AGS_AUDIO_SIGNAL_H__ #include #include #define AGS_TYPE_AUDIO_SIGNAL (ags_audio_signal_get_type()) #define AGS_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_SIGNAL, AgsAudioSignal)) #define AGS_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUDIO_SIGNAL, AgsAudioSignalClass)) #define AGS_IS_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUDIO_SIGNAL)) #define AGS_IS_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUDIO_SIGNAL)) #define AGS_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_AUDIO_SIGNAL, AgsAudioSignalClass)) typedef struct _AgsAudioSignal AgsAudioSignal; typedef struct _AgsAudioSignalClass AgsAudioSignalClass; /** * AgsAudioSignalFlags: * @AGS_AUDIO_SIGNAL_CONNECTED: indicates the audio signal was connected by calling #AgsConnectable::connect() * @AGS_AUDIO_SIGNAL_TEMPLATE: the audio signal acts as a template * @AGS_AUDIO_SIGNAL_PLAY_DONE: playback done * @AGS_AUDIO_SIGNAL_STANDALONE: standalone * * Enum values to control the behavior or indicate internal state of #AgsAudioSignal by * enable/disable as flags. */ typedef enum{ AGS_AUDIO_SIGNAL_CONNECTED = 1, AGS_AUDIO_SIGNAL_TEMPLATE = 1 << 1, AGS_AUDIO_SIGNAL_PLAY_DONE = 1 << 2, AGS_AUDIO_SIGNAL_STANDALONE = 1 << 3, AGS_AUDIO_SIGNAL_RT_TEMPLATE = 1 << 4, }AgsAudioSignalFlags; struct _AgsAudioSignal { GObject object; guint flags; GObject *soundcard; GObject *recycling; GObject *recall_id; // AGS_TYPE_RECALL_ID to identify the AgsAudioSignal guint samplerate; guint buffer_size; guint format; guint word_size; guint length; guint first_frame; guint last_frame; // the last frame at stream_end guint frame_count; // initial size guint loop_start; guint loop_end; gdouble delay; guint attack; GList *stream_beginning; GList *stream_current; GList *stream_end; GList *note; GObject *rt_template; }; struct _AgsAudioSignalClass { GObjectClass object; void (*reset_format)(AgsAudioSignal *audio_signal, guint format); void (*realloc_buffer_size)(AgsAudioSignal *audio_signal, guint buffer_size); void (*add_note)(AgsAudioSignal *audio_signal, GObject *note); void (*remove_note)(AgsAudioSignal *audio_signal, GObject *note); }; GType ags_audio_signal_get_type(); void* ags_stream_alloc(guint buffer_size, guint format); void ags_stream_free(signed short *buffer); void ags_audio_signal_set_samplerate(AgsAudioSignal *audio_signal, guint samplerate); void ags_audio_signal_set_buffer_size(AgsAudioSignal *audio_signal, guint buffer_size); void ags_audio_signal_set_format(AgsAudioSignal *audio_signal, guint format); guint ags_audio_signal_get_length_till_current(AgsAudioSignal *audio_signal); void ags_audio_signal_add_stream(AgsAudioSignal *audio_signal); void ags_audio_signal_stream_resize(AgsAudioSignal *audio_signal, guint length); void ags_audio_signal_stream_safe_resize(AgsAudioSignal *audio_signal, guint length); void ags_audio_signal_realloc_buffer_size(AgsAudioSignal *audio_signal, guint buffer_size); void ags_audio_signal_duplicate_stream(AgsAudioSignal *audio_signal, AgsAudioSignal *template); void ags_audio_signal_add_note(AgsAudioSignal *audio_signal, GObject *note); void ags_audio_signal_remove_note(AgsAudioSignal *audio_signal, GObject *note); //TODO:JK: rename these functions name it rather find than get AgsAudioSignal* ags_audio_signal_get_template(GList *audio_signal); GList* ags_audio_signal_get_stream_current(GList *audio_signal, GObject *recall_id); GList* ags_audio_signal_get_by_recall_id(GList *audio_signal, GObject *recall_id); void ags_audio_signal_tile(AgsAudioSignal *audio_signal, AgsAudioSignal *template, guint frame_count); void ags_audio_signal_scale(AgsAudioSignal *audio_signal, AgsAudioSignal *template, guint length); void ags_audio_signal_feed(AgsAudioSignal *audio_signal, AgsAudioSignal *template, guint frame_count); void ags_audio_signal_envelope(AgsAudioSignal *audio_signal, gdouble attack, gdouble decay, gdouble sustain, gdouble release, gdouble ratio); gboolean ags_audio_signal_is_active(GList *audio_signal, GObject *recall_id); AgsAudioSignal* ags_audio_signal_new(GObject *soundcard, GObject *recycling, GObject *recall_id); AgsAudioSignal* ags_audio_signal_new_with_length(GObject *soundcard, GObject *recycling, GObject *recall_id, guint length); #endif /*__AGS_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_audio.h0000644000175000017500000000500113246707333016171 00000000000000/* 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 . */ #ifndef __AGS_RECALL_AUDIO_H__ #define __AGS_RECALL_AUDIO_H__ #include #include #include #include #define AGS_TYPE_RECALL_AUDIO (ags_recall_audio_get_type()) #define AGS_RECALL_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_AUDIO, AgsRecallAudio)) #define AGS_RECALL_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_AUDIO, AgsRecallAudioClass)) #define AGS_IS_RECALL_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_AUDIO)) #define AGS_IS_RECALL_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_AUDIO)) #define AGS_RECALL_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_AUDIO, AgsRecallAudioClass)) typedef struct _AgsRecallAudio AgsRecallAudio; typedef struct _AgsRecallAudioClass AgsRecallAudioClass; typedef enum{ AGS_RECALL_AUDIO_INTERNAL_PRESETS = 1, AGS_RECALL_AUDIO_INTERLEAVED = 1 << 1, AGS_RECALL_AUDIO_STEREO = 1 << 2, AGS_RECALL_AUDIO_TWO_POINT_ONE = 1 << 3, AGS_RECALL_AUDIO_THREE_POINT_ONE = 1 << 4, AGS_RECALL_AUDIO_FOUR_POINT_ONE = 1 << 5, AGS_RECALL_AUDIO_FIVE_POINT_ONE = 1 << 6, AGS_RECALL_AUDIO_SIX_POINT_ONE = 1 << 7, AGS_RECALL_AUDIO_SEVEN_POINT_ONE = 1 << 8, }AgsRecallAudioFlags; struct _AgsRecallAudio { AgsRecall recall; guint flags; guint samplerate; guint buffer_size; guint audio_buffer_util_format; guint n_channels; guint *mapping; AgsAudio *audio; }; struct _AgsRecallAudioClass { AgsRecallClass recall; }; GType ags_recall_audio_get_type(); AgsRecallAudio* ags_recall_audio_new(AgsAudio *audio); #endif /*__AGS_RECALL_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_audio_signal.h0000644000175000017500000000512413246707333017534 00000000000000/* 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 . */ #ifndef __AGS_RECALL_AUDIO_SIGNAL_H__ #define __AGS_RECALL_AUDIO_SIGNAL_H__ #include #include #include #include #include #define AGS_TYPE_RECALL_AUDIO_SIGNAL (ags_recall_audio_signal_get_type()) #define AGS_RECALL_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_AUDIO_SIGNAL, AgsRecallAudioSignal)) #define AGS_RECALL_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_AUDIO_SIGNAL, AgsRecallAudioSignalClass)) #define AGS_IS_RECALL_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_AUDIO_SIGNAL)) #define AGS_IS_RECALL_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_AUDIO_SIGNAL)) #define AGS_RECALL_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_AUDIO_SIGNAL, AgsRecallAudioSignalClass)) typedef struct _AgsRecallAudioSignal AgsRecallAudioSignal; typedef struct _AgsRecallAudioSignalClass AgsRecallAudioSignalClass; /** * AgsRecallAudioSignalFlags: * @AGS_RECALL_AUDIO_SIGNAL_INITIAL_RUN: initial run * * Enum values to control the behavior or indicate internal state of #AgsRecallAudioSignal by * enable/disable as flags. */ typedef enum{ AGS_RECALL_AUDIO_SIGNAL_INITIAL_RUN = 1, }AgsRecallAudioSignalFlags; struct _AgsRecallAudioSignal { AgsRecall recall; guint flags; guint audio_channel; AgsAudioSignal *destination; AgsAudioSignal *source; }; struct _AgsRecallAudioSignalClass { AgsRecallClass recall; }; GType ags_recall_audio_signal_get_type(); AgsRecallAudioSignal* ags_recall_audio_signal_new(AgsAudioSignal *destination, AgsAudioSignal *source, GObject *soundcard); #endif /*__AGS_RECALL_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_container.c0000644000175000017500000004136113247044247017055 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_recall_container_class_init(AgsRecallContainerClass *recall_class); void ags_recall_container_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_container_init(AgsRecallContainer *recall); void ags_recall_container_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_container_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_container_connect(AgsConnectable *connectable); void ags_recall_container_disconnect(AgsConnectable *connectable); void ags_recall_container_finalize(GObject *recall); /** * SECTION:ags_recall_container * @short_description: Container to group recalls * @title: AgsRecallContainer * @section_id: * @include: ags/audio/ags_recall_container.h * * #AgsRecallContainer groups recalls of different context. */ enum{ PROP_0, PROP_RECALL_AUDIO_TYPE, PROP_RECALL_AUDIO, PROP_RECALL_AUDIO_RUN_TYPE, PROP_RECALL_AUDIO_RUN, PROP_RECALL_CHANNEL_TYPE, PROP_RECALL_CHANNEL, PROP_RECALL_CHANNEL_RUN_TYPE, PROP_RECALL_CHANNEL_RUN, }; static gpointer ags_recall_container_parent_class = NULL; GType ags_recall_container_get_type (void) { static GType ags_type_recall_container = 0; if(!ags_type_recall_container){ static const GTypeInfo ags_recall_container_info = { sizeof (AgsRecallContainerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_container_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallContainer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_container_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_container_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_container = g_type_register_static(G_TYPE_OBJECT, "AgsRecallContainer", &ags_recall_container_info, 0); g_type_add_interface_static(ags_type_recall_container, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_recall_container); } void ags_recall_container_class_init(AgsRecallContainerClass *recall_container) { GObjectClass *gobject; GParamSpec *param_spec; ags_recall_container_parent_class = g_type_class_peek_parent(recall_container); /* GObjectClass */ gobject = (GObjectClass *) recall_container; gobject->finalize = ags_recall_container_finalize; gobject->set_property = ags_recall_container_set_property; gobject->get_property = ags_recall_container_get_property; /* properties */ /** * AgsRecallContainer:recall-audio-type: * * The associated recall type within audio context. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("recall-audio-type", i18n_pspec("audio level recall type"), i18n_pspec("The recall type which this recall container has on audio level"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO_TYPE, param_spec); /** * AgsRecallContainer:recall-audio: * * The associated recall within audio context. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-audio", i18n_pspec("audio level recall"), i18n_pspec("The recall which this recall container has on audio level"), AGS_TYPE_RECALL_AUDIO, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO, param_spec); /** * AgsRecallContainer:recall-audio-run-type: * * The associated recall type within dynamic audio context. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("recall-audio-run-type", i18n_pspec("audio runlevel recall type"), i18n_pspec("The recall type which this recall container has on audio level during a run"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO_RUN_TYPE, param_spec); /** * AgsRecallContainer:recall-audio-run: * * The associated recall within dynamic audio context. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-audio-run", i18n_pspec("audio runlevel recall"), i18n_pspec("The recall which this recall container has on audio level during a run"), AGS_TYPE_RECALL_AUDIO_RUN, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO_RUN, param_spec); /** * AgsRecallContainer:recall-channel-type: * * The associated recall type within channel context. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("recall-channel-type", i18n_pspec("channel level recall type"), i18n_pspec("The recall type which this recall container has on channel level"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CHANNEL_TYPE, param_spec); /** * AgsRecallContainer:recall-channel: * * The associated recall within channel context. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-channel", i18n_pspec("channel level recall"), i18n_pspec("The recall which this recall container has on channel level"), AGS_TYPE_RECALL_CHANNEL, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CHANNEL, param_spec); /** * AgsRecallContainer:recall-channel-run-type: * * The associated recall type within dynamic channel context. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("recall-channel-run-type", i18n_pspec("channel runlevel recall type"), i18n_pspec("The recall type which this recall container has on audio level during a run"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CHANNEL_RUN_TYPE, param_spec); /** * AgsRecallContainer:recall-channel-run: * * The associated recall within dynamic channel context. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-channel-run", i18n_pspec("channel runlevel recall"), i18n_pspec("The recall which this recall container has on audio level during a run"), AGS_TYPE_RECALL_CHANNEL_RUN, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CHANNEL_RUN, param_spec); } void ags_recall_container_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_recall_container_connect; connectable->disconnect = ags_recall_container_disconnect; } void ags_recall_container_init(AgsRecallContainer *recall_container) { recall_container->flags = 0; recall_container->recall_audio = NULL; recall_container->recall_audio_run = NULL; recall_container->recall_channel = NULL; recall_container->recall_channel_run = NULL; } void ags_recall_container_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallContainer *recall_container; recall_container = AGS_RECALL_CONTAINER(gobject); switch(prop_id){ case PROP_RECALL_AUDIO_TYPE: { GType recall_audio_type; recall_audio_type = (GType) g_value_get_gtype(value); recall_container->recall_audio_type = recall_audio_type; } break; case PROP_RECALL_AUDIO: { AgsRecallAudio *recall_audio; recall_audio = (AgsRecallAudio *) g_value_get_object(value); if(recall_container->recall_audio == (AgsRecall *) recall_audio) return; if(recall_container->recall_audio != NULL){ g_object_unref(G_OBJECT(recall_container->recall_audio)); } if(recall_audio != NULL){ g_object_ref(G_OBJECT(recall_audio)); } recall_container->recall_audio = (AgsRecall *) recall_audio; } break; case PROP_RECALL_AUDIO_RUN_TYPE: { GType recall_audio_run_type; recall_audio_run_type = g_value_get_gtype(value); recall_container->recall_audio_run_type = recall_audio_run_type; } break; case PROP_RECALL_AUDIO_RUN: { AgsRecallAudioRun *recall_audio_run; recall_audio_run = (AgsRecallAudioRun *) g_value_get_object(value); if(recall_audio_run == NULL || g_list_find(recall_container->recall_audio_run, recall_audio_run) != NULL){ return; } if(recall_audio_run != NULL){ g_object_ref(G_OBJECT(recall_audio_run)); } recall_container->recall_audio_run = g_list_prepend(recall_container->recall_audio_run, recall_audio_run); } break; case PROP_RECALL_CHANNEL_TYPE: { GType recall_channel_type; recall_channel_type = (GType) g_value_get_gtype(value); recall_container->recall_channel_type = recall_channel_type; } break; case PROP_RECALL_CHANNEL: { AgsRecallChannel *recall_channel; recall_channel = (AgsRecallChannel *) g_value_get_object(value); if(recall_channel == NULL || g_list_find(recall_container->recall_channel, recall_channel) != NULL){ return; } g_object_ref(G_OBJECT(recall_channel)); recall_container->recall_channel = g_list_prepend(recall_container->recall_channel, recall_channel); } break; case PROP_RECALL_CHANNEL_RUN_TYPE: { GType recall_channel_run_type; recall_channel_run_type = (GType) g_value_get_gtype(value); recall_container->recall_channel_run_type = recall_channel_run_type; } break; case PROP_RECALL_CHANNEL_RUN: { AgsRecallChannelRun *recall_channel_run; recall_channel_run = (AgsRecallChannelRun *) g_value_get_object(value); if(recall_channel_run == NULL || g_list_find(recall_container->recall_channel_run, recall_channel_run) != NULL){ return; } g_object_ref(G_OBJECT(recall_channel_run)); recall_container->recall_channel_run = g_list_prepend(recall_container->recall_channel_run, recall_channel_run); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_container_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallContainer *recall_container; recall_container = AGS_RECALL_CONTAINER(gobject); switch(prop_id){ case PROP_RECALL_AUDIO_TYPE: g_value_set_gtype(value, recall_container->recall_audio_type); break; case PROP_RECALL_AUDIO_RUN_TYPE: g_value_set_gtype(value, recall_container->recall_audio_run_type); break; case PROP_RECALL_CHANNEL_TYPE: g_value_set_gtype(value, recall_container->recall_channel_type); break; case PROP_RECALL_CHANNEL_RUN_TYPE: g_value_set_gtype(value, recall_container->recall_channel_run_type); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_container_connect(AgsConnectable *connectable) { /* empty */ } void ags_recall_container_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_recall_container_finalize(GObject *gobject) { AgsRecallContainer *container; GList *list, *list_next; container = AGS_RECALL_CONTAINER(gobject); ags_packable_unpack(AGS_PACKABLE(container->recall_audio)); list = container->recall_audio_run; while(list != NULL){ list_next = list->next; ags_packable_unpack(AGS_PACKABLE(container->recall_audio_run)); list = list_next; } list = container->recall_channel; while(list != NULL){ list_next = list->next; ags_packable_unpack(AGS_PACKABLE(container->recall_channel)); list = list_next; } list = container->recall_channel_run; while(list != NULL){ list_next = list->next; ags_packable_unpack(AGS_PACKABLE(container->recall_channel_run)); list = list_next; } /* call parent */ G_OBJECT_CLASS(ags_recall_container_parent_class)->finalize(gobject); } /** * ags_recall_container_get_recall_audio: * @container: the #AgsRecallContainer * * Retrieve recall audio of container. * * Returns: the #AgsRecallAudio * * Since: 1.0.0 */ AgsRecall* ags_recall_container_get_recall_audio(AgsRecallContainer *container) { return(container->recall_audio); } /** * ags_recall_container_get_recall_audio_run: * @container: the #AgsRecallContainer * * Retrieve recall audio run of container. * * Returns: the #AgsRecallAudioRun as list * * Since: 1.0.0 */ GList* ags_recall_container_get_recall_audio_run(AgsRecallContainer *container) { return(container->recall_audio_run); } /** * ags_recall_container_get_recall_channel: * @container: the #AgsRecallContainer * * Retrieve the recall channel of container. * * Returns: the #AgsRecallChannel * * Since: 1.0.0 */ GList* ags_recall_container_get_recall_channel(AgsRecallContainer *container) { return(container->recall_channel); } /** * ags_recall_container_get_recall_channel_run: * @container: the #AgsRecallContainer * * Retrieve the recall channel run of container. * * Returns: the #AgsRecall * * Since: 1.0.0 */ GList* ags_recall_container_get_recall_channel_run(AgsRecallContainer *container) { return(container->recall_channel_run); } /** * ags_recall_container_find: * @recall_container: the #AgsRecallContainer * @type: recall type * @find_flags: search mask * @recall_id: an #AgsRecallID * * Finds #AgsRecall for appropriate search criteria. * * Returns: the matching recalls * * Since: 1.0.0 */ GList* ags_recall_container_find(GList *recall_container, GType gtype, guint find_flags, AgsRecallID *recall_id) { AgsRecallContainer *current; AgsRecall *recall; guint mode; if(g_type_is_a(gtype, AGS_TYPE_RECALL_AUDIO)){ mode = 0; }else if(g_type_is_a(gtype, AGS_TYPE_RECALL_AUDIO_RUN)){ mode = 1; }else if(g_type_is_a(gtype, AGS_TYPE_RECALL_CHANNEL)){ mode = 2; }else if(g_type_is_a(gtype, AGS_TYPE_RECALL_CHANNEL_RUN)){ mode = 3; }else{ g_message("ags_recall_container_find: invalid type\n"); return(NULL); } g_message("mode = %d", mode); while(recall_container != NULL){ current = AGS_RECALL_CONTAINER(recall_container->data); if(mode == 0){ recall = ags_recall_container_get_recall_audio(current); }else if(mode == 1){ GList *list; list = ags_recall_container_get_recall_audio_run(current); if(list == NULL) recall = NULL; else recall = AGS_RECALL(list->data); }else if(mode == 2){ GList *list; list = ags_recall_container_get_recall_channel(current); if(list == NULL) recall = NULL; else recall = AGS_RECALL(list->data); }else if(mode == 3){ GList *list; list = ags_recall_container_get_recall_channel_run(current); if(list == NULL) recall = NULL; else recall = AGS_RECALL(list->data); } if(recall != NULL){ if((AGS_RECALL_CONTAINER_FIND_TYPE & find_flags) != 0 && G_OBJECT_TYPE(recall) == gtype){ break; } if((AGS_RECALL_CONTAINER_FIND_TEMPLATE & find_flags) != 0 && (AGS_RECALL_TEMPLATE & (recall->flags)) != 0){ break; } if((AGS_RECALL_CONTAINER_FIND_RECALL_ID & find_flags) != 0 && (recall->recall_id != NULL && recall->recall_id == recall_id)){ break; } } recall_container = recall_container->next; } return(recall_container); } /** * ags_recall_container_new: * * Creates an #AgsRecallContainer * * Returns: a new #AgsRecallContainer * * Since: 1.0.0 */ AgsRecallContainer* ags_recall_container_new() { AgsRecallContainer *recall_container; recall_container = (AgsRecallContainer *) g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); return(recall_container); } gsequencer-1.4.24/ags/audio/ags_playable.c0000644000175000017500000004532013256163135015337 00000000000000/* 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 . */ #include #include #include #include #include void ags_playable_base_init(AgsPlayableInterface *interface); /** * SECTION:ags_playable * @short_description: read/write audio * @title: AgsPlayable * @section_id: * @include: ags/audio/ags_playable.h * * The #AgsPlayable interface gives you a unique access to file related * IO operations. */ GType ags_playable_get_type() { static GType ags_type_playable = 0; if(!ags_type_playable){ static const GTypeInfo ags_playable_info = { sizeof(AgsPlayableInterface), (GBaseInitFunc) ags_playable_base_init, NULL, /* base_finalize */ }; ags_type_playable = g_type_register_static(G_TYPE_INTERFACE, "AgsPlayable", &ags_playable_info, 0); } return(ags_type_playable); } GQuark ags_playable_error_quark() { return(g_quark_from_static_string("ags-playable-error-quark")); } void ags_playable_base_init(AgsPlayableInterface *interface) { /* empty */ } /** * ags_playable_open: * @playable: the #AgsPlayable * @name: the filename * * Opens a file in read-only mode. * * Returns: %TRUE on success * * Since: 1.0.0 */ gboolean ags_playable_open(AgsPlayable *playable, gchar *name) { AgsPlayableInterface *playable_interface; gboolean ret_val; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), FALSE); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->open, FALSE); ret_val = playable_interface->open(playable, name); return(ret_val); } /** * ags_playable_rw_open: * @playable: the #AgsPlayable * @name: the filename * @create: if %TRUE file is created * @samplerate: the samplerate of the file * @channels: the count of audio channels * @frames: the count of frames * @format: the audio file's format * * Opens a file in read/write mode. * * Returns: %TRUE on success. * * Since: 1.0.0 */ gboolean ags_playable_rw_open(AgsPlayable *playable, gchar *name, gboolean create, guint samplerate, guint channels, guint frames, guint format) { AgsPlayableInterface *playable_interface; gboolean ret_val; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), FALSE); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->open, FALSE); ret_val = playable_interface->rw_open(playable, name, create, samplerate, channels, frames, format); return(ret_val); } /** * ags_playable_level_count: * @playable: the #AgsPlayable * * Retrieve the count of levels. * * Returns: level count * * Since: 1.0.0 */ guint ags_playable_level_count(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; guint ret_val; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), 0); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->level_count, 0); ret_val = playable_interface->level_count(playable); return(ret_val); } /** * ags_playable_nth_level: * @playable: the #AgsPlayable * * Retrieve the selected level. * * Returns: nth level * * Since: 1.0.0 */ guint ags_playable_nth_level(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; guint ret_val; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), 0); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->nth_level, 0); ret_val = playable_interface->nth_level(playable); return(ret_val); } /** * ags_playable_selected_level: * @playable: the #AgsPlayable * * Retrieve the selected level's name. * * Returns: nth level name * * Since: 1.0.0 */ gchar* ags_playable_selected_level(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; gchar *ret_val; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), 0); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->selected_level, 0); ret_val = playable_interface->selected_level(playable); return(ret_val); } /** * ags_playable_sublevel_names: * @playable: the #AgsPlayable * * Retrieve the all sub-level's name. * * Returns: sub-level names * * Since: 1.0.0 */ gchar** ags_playable_sublevel_names(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; gchar **ret_val; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), NULL); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->sublevel_names, NULL); ret_val = playable_interface->sublevel_names(playable); return(ret_val); } /** * ags_playable_level_select: * @playable: an #AgsPlayable * @nth_level: of type guint * @sublevel_name: a gchar pointer * @error: an error that may occure * * Select a level in an monolythic file where @nth_level and @sublevel_name are equivalent. * If @sublevel_name is NULL @nth_level will be chosen. * * Since: 1.0.0 */ void ags_playable_level_select(AgsPlayable *playable, guint nth_level, gchar *sublevel_name, GError **error) { AgsPlayableInterface *playable_interface; g_return_if_fail(AGS_IS_PLAYABLE(playable)); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_if_fail(playable_interface->level_select); playable_interface->level_select(playable, nth_level, sublevel_name, error); } /** * ags_playable_level_up: * @playable: an #AgsPlayable * @levels: n-levels up * @error: returned error * * Move up in hierarchy. * * Since: 1.0.0 */ void ags_playable_level_up(AgsPlayable *playable, guint levels, GError **error) { AgsPlayableInterface *playable_interface; g_return_if_fail(AGS_IS_PLAYABLE(playable)); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_if_fail(playable_interface->level_up); playable_interface->level_up(playable, levels, error); } /** * ags_playable_iter_start: * @playable: an #AgsPlayable * * Start iterating current level. * * Since: 1.0.0 */ void ags_playable_iter_start(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; g_return_if_fail(AGS_IS_PLAYABLE(playable)); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_if_fail(playable_interface->iter_start); playable_interface->iter_start(playable); } /** * ags_playable_iter_next: * @playable: an #AgsPlayable * * Iterating next on current level. * * Returns: %TRUE if has more, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_playable_iter_next(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; gboolean ret_val; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), FALSE); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->iter_next, FALSE); ret_val = playable_interface->iter_next(playable); return(ret_val); } /** * ags_playable_info: * @playable: an #AgsPlayable * @channels: channels * @frames: frames * @loop_start: loop start * @loop_end: loop end * @error: returned error * * Retrieve information about selected audio data. * * Since: 1.0.0 */ void ags_playable_info(AgsPlayable *playable, guint *channels, guint *frames, guint *loop_start, guint *loop_end, GError **error) { AgsPlayableInterface *playable_interface; g_return_if_fail(AGS_IS_PLAYABLE(playable)); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_if_fail(playable_interface->info); playable_interface->info(playable, channels, frames, loop_start, loop_end, error); } /** * ags_playable_get_samplerate: * @playable: the #AgsPlayable * * Get samplerate. * * Returns: the samplerate * * Since: 1.0.0 */ guint ags_playable_get_samplerate(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), 0); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->get_samplerate, 0); return(playable_interface->get_samplerate(playable)); } /** * ags_playable_get_format: * @playable: the #AgsPlayable * * Get format. * * Returns: the format * * Since: 1.0.0 */ guint ags_playable_get_format(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), 0); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->get_format, 0); return(playable_interface->get_format(playable)); } /** * ags_playable_read: * @playable: an #AgsPlayable * @channel: nth channel * @error: returned error * * Read audio buffer of playable audio data. * * Returns: audio buffer * * Since: 1.0.0 */ double* ags_playable_read(AgsPlayable *playable, guint channel, GError **error) { AgsPlayableInterface *playable_interface; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), NULL); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->read, NULL); return(playable_interface->read(playable, channel, error)); } /** * ags_playable_read_int: * @playable: an #AgsPlayable * @channel: nth channel * @error: returned error * * Read audio buffer of playable audio data. * * Returns: audio buffer * * Since: 1.4.23 */ int* ags_playable_read_int(AgsPlayable *playable, guint channel, GError **error) { AgsPlayableInterface *playable_interface; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), NULL); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_val_if_fail(playable_interface->read_int, NULL); return(playable_interface->read_int(playable, channel, error)); } /** * ags_playable_write: * @playable: an #AgsPlayable * @buffer: audio data * @buffer_length: frame count * * Write @buffer_length of @buffer audio data. * * Since: 1.0.0 */ void ags_playable_write(AgsPlayable *playable, double *buffer, guint buffer_length) { AgsPlayableInterface *playable_interface; g_return_if_fail(AGS_IS_PLAYABLE(playable)); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_if_fail(playable_interface->write); playable_interface->write(playable, buffer, buffer_length); } /** * ags_playable_write_int: * @playable: an #AgsPlayable * @buffer: audio data * @buffer_length: frame count * * Write @buffer_length of @buffer audio data. * * Since: 1.0.0 */ void ags_playable_write_int(AgsPlayable *playable, int *buffer, guint buffer_length) { AgsPlayableInterface *playable_interface; g_return_if_fail(AGS_IS_PLAYABLE(playable)); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_if_fail(playable_interface->write_int); playable_interface->write_int(playable, buffer, buffer_length); } /** * ags_playable_flush: * @playable: an #AgsPlayable * * Flush internal audio buffer. * * Since: 1.0.0 */ void ags_playable_flush(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; g_return_if_fail(AGS_IS_PLAYABLE(playable)); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_if_fail(playable_interface->flush); playable_interface->flush(playable); } /** * ags_playable_seek: * @playable: an #AgsPlayable * @frames: n-frames to seek * @whence: SEEK_SET, SEEK_CUR, or SEEK_END * * Seek @playable to address. * * Since: 1.0.0 */ void ags_playable_seek(AgsPlayable *playable, guint frames, gint whence) { AgsPlayableInterface *playable_interface; g_return_if_fail(AGS_IS_PLAYABLE(playable)); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_if_fail(playable_interface->seek); playable_interface->seek(playable, frames, whence); } /** * ags_playable_close: * @playable: an #AgsPlayable * * Close audio file. * * Since: 1.0.0 */ void ags_playable_close(AgsPlayable *playable) { AgsPlayableInterface *playable_interface; g_return_if_fail(AGS_IS_PLAYABLE(playable)); playable_interface = AGS_PLAYABLE_GET_INTERFACE(playable); g_return_if_fail(playable_interface->close); playable_interface->close(playable); } /** * ags_playable_read_audio_signal: * @playable: an #AgsPlayable * @soundcard: the #AgsSoundcard defaulting to * @start_channel: read from channel * @channels_to_read: n-times * * Read the audio signal of @AgsPlayable. * * Returns: a #GList of #AgsAudioSignal * * Since: 1.0.0 */ GList* ags_playable_read_audio_signal(AgsPlayable *playable, GObject *soundcard, guint start_channel, guint channels_to_read) { AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GList *stream, *list, *list_beginning; gchar *str; int *buffer; guint copy_mode; guint channels; guint frames; guint resampled_frames; guint loop_start; guint loop_end; guint length; guint samplerate; guint buffer_size; guint format; guint target_samplerate; guint i, j, k, i_stop, j_stop; gboolean resample; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; g_return_val_if_fail(AGS_IS_PLAYABLE(playable), NULL); error = NULL; ags_playable_info(playable, &channels, &frames, &loop_start, &loop_end, &error); if(soundcard == NULL){ AgsConfig *config; gchar *str; config = ags_config_get_instance(); /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ target_samplerate = g_ascii_strtoull(str, NULL, 10); g_free(str); }else{ target_samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } /* buffer-size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ buffer_size = g_ascii_strtoull(str, NULL, 10); g_free(str); }else{ buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ format = g_ascii_strtoull(str, NULL, 10); g_free(str); }else{ format = AGS_SOUNDCARD_DEFAULT_FORMAT; } }else{ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, soundcard); pthread_mutex_unlock(application_mutex); /* get presets */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &target_samplerate, &buffer_size, &format); pthread_mutex_unlock(soundcard_mutex); } if(sizeof(int) == 8){ copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(format), AGS_AUDIO_BUFFER_UTIL_S64); }else{ copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(format), AGS_AUDIO_BUFFER_UTIL_S32); } samplerate = ags_playable_get_samplerate(playable); if(target_samplerate != samplerate){ resampled_frames = (target_samplerate / samplerate) * frames; resample = TRUE; }else{ resampled_frames = frames; } length = (guint) ceil((double)(resampled_frames) / (double)(buffer_size)); #ifdef AGS_DEBUG g_message("%d-%d %d %d", samplerate, target_samplerate, buffer_size, format); g_message("ags_playable_read_audio_signal:\n frames = %u\n buffer_size = %u\n length = %u\n", frames, buffer_size, length); #endif list = NULL; i = start_channel; i_stop = start_channel + channels_to_read; for(; i < i_stop; i++){ audio_signal = ags_audio_signal_new(soundcard, NULL, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; g_object_set(audio_signal, "samplerate", target_samplerate, "buffer-size", buffer_size, "format", format, "frame-count", resampled_frames, NULL); list = g_list_prepend(list, audio_signal); ags_connectable_connect(AGS_CONNECTABLE(audio_signal)); } list_beginning = list; j_stop = (guint) floor((double)(resampled_frames) / (double)(buffer_size)); for(i = start_channel; list != NULL; i++){ audio_signal = AGS_AUDIO_SIGNAL(list->data); ags_audio_signal_stream_resize(audio_signal, length); audio_signal->loop_start = loop_start; audio_signal->loop_end = loop_end; //TODO:JK: read resolution of file // audio_signal->format = AGS_SOUNDCARD_SIGNED_16_BIT; error = NULL; buffer = ags_playable_read_int(playable, i, &error); if(error != NULL){ g_error("%s", error->message); } if(buffer != NULL){ if(resample){ int *tmp; tmp = buffer; if(sizeof(int) == 8){ buffer = ags_audio_buffer_util_resample(buffer, 1, AGS_AUDIO_BUFFER_UTIL_S64, samplerate, frames, target_samplerate); }else{ buffer = ags_audio_buffer_util_resample(buffer, 1, AGS_AUDIO_BUFFER_UTIL_S32, samplerate, frames, target_samplerate); } free(tmp); } stream = audio_signal->stream_beginning; for(j = 0; j < j_stop && stream != NULL; j++){ ags_audio_buffer_util_copy_buffer_to_buffer(stream->data, 1, 0, buffer, 1, j * buffer_size, buffer_size, copy_mode); stream = stream->next; } if(resampled_frames % buffer_size != 0){ ags_audio_buffer_util_copy_buffer_to_buffer(stream->data, 1, 0, buffer, 1, j * buffer_size, resampled_frames % buffer_size, copy_mode); } free(buffer); } list = list->next; } return(list_beginning); } gsequencer-1.4.24/ags/audio/pulse/0000755000175000017500000000000013256233674013762 500000000000000gsequencer-1.4.24/ags/audio/pulse/ags_pulse_devout.h0000644000175000017500000001363013247044247017422 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PULSE_DEVOUT_H__ #define __AGS_PULSE_DEVOUT_H__ #include #include #include #define AGS_TYPE_PULSE_DEVOUT (ags_pulse_devout_get_type()) #define AGS_PULSE_DEVOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PULSE_DEVOUT, AgsPulseDevout)) #define AGS_PULSE_DEVOUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PULSE_DEVOUT, AgsPulseDevout)) #define AGS_IS_PULSE_DEVOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PULSE_DEVOUT)) #define AGS_IS_PULSE_DEVOUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PULSE_DEVOUT)) #define AGS_PULSE_DEVOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_PULSE_DEVOUT, AgsPulseDevoutClass)) typedef struct _AgsPulseDevout AgsPulseDevout; typedef struct _AgsPulseDevoutClass AgsPulseDevoutClass; /** * AgsPulseDevoutFlags: * @AGS_PULSE_DEVOUT_BUFFER0: ring-buffer 0 * @AGS_PULSE_DEVOUT_BUFFER1: ring-buffer 1 * @AGS_PULSE_DEVOUT_BUFFER2: ring-buffer 2 * @AGS_PULSE_DEVOUT_BUFFER3: ring-buffer 3 * @AGS_PULSE_DEVOUT_BUFFER4: ring-buffer 4 * @AGS_PULSE_DEVOUT_BUFFER5: ring-buffer 5 * @AGS_PULSE_DEVOUT_BUFFER6: ring-buffer 6 * @AGS_PULSE_DEVOUT_BUFFER7: ring-buffer 7 * @AGS_PULSE_DEVOUT_ATTACK_FIRST: use first attack, instead of second one * @AGS_PULSE_DEVOUT_PLAY: do playback * @AGS_PULSE_DEVOUT_SHUTDOWN: stop playback * @AGS_PULSE_DEVOUT_START_PLAY: playback starting * @AGS_PULSE_DEVOUT_NONBLOCKING: do non-blocking calls * @AGS_PULSE_DEVOUT_INITIALIZED: the soundcard was initialized * * Enum values to control the behavior or indicate internal state of #AgsPulseDevout by * enable/disable as flags. */ typedef enum { AGS_PULSE_DEVOUT_BUFFER0 = 1, AGS_PULSE_DEVOUT_BUFFER1 = 1 << 1, AGS_PULSE_DEVOUT_BUFFER2 = 1 << 2, AGS_PULSE_DEVOUT_BUFFER3 = 1 << 3, AGS_PULSE_DEVOUT_BUFFER4 = 1 << 4, AGS_PULSE_DEVOUT_BUFFER5 = 1 << 5, AGS_PULSE_DEVOUT_BUFFER6 = 1 << 6, AGS_PULSE_DEVOUT_BUFFER7 = 1 << 7, AGS_PULSE_DEVOUT_ATTACK_FIRST = 1 << 8, AGS_PULSE_DEVOUT_PLAY = 1 << 9, AGS_PULSE_DEVOUT_SHUTDOWN = 1 << 10, AGS_PULSE_DEVOUT_START_PLAY = 1 << 11, AGS_PULSE_DEVOUT_NONBLOCKING = 1 << 12, AGS_PULSE_DEVOUT_INITIALIZED = 1 << 13, }AgsPulseDevoutFlags; /** * AgsPulseDevoutSyncFlags: * @AGS_PULSE_DEVOUT_PASS_THROUGH: do not sync * @AGS_PULSE_DEVOUT_INITIAL_CALLBACK: initial callback * @AGS_PULSE_DEVOUT_CALLBACK_WAIT: sync wait, soundcard conditional lock * @AGS_PULSE_DEVOUT_CALLBACK_DONE: sync done, soundcard conditional lock * @AGS_PULSE_DEVOUT_CALLBACK_FINISH_WAIT: sync wait, client conditional lock * @AGS_PULSE_DEVOUT_CALLBACK_FINISH_DONE: sync done, client conditional lock * * Enum values to control the synchronization between soundcard and client. */ typedef enum{ AGS_PULSE_DEVOUT_PASS_THROUGH = 1, AGS_PULSE_DEVOUT_INITIAL_CALLBACK = 1 << 1, AGS_PULSE_DEVOUT_CALLBACK_WAIT = 1 << 2, AGS_PULSE_DEVOUT_CALLBACK_DONE = 1 << 3, AGS_PULSE_DEVOUT_CALLBACK_FINISH_WAIT = 1 << 4, AGS_PULSE_DEVOUT_CALLBACK_FINISH_DONE = 1 << 5, }AgsPulseDevoutSyncFlags; #define AGS_PULSE_DEVOUT_ERROR (ags_pulse_devout_error_quark()) typedef enum{ AGS_PULSE_DEVOUT_ERROR_LOCKED_SOUNDCARD, }AgsPulseDevoutError; struct _AgsPulseDevout { GObject object; guint flags; volatile guint sync_flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; guint dsp_channels; guint pcm_channels; guint format; guint buffer_size; guint samplerate; void** buffer; double bpm; // beats per minute gdouble delay_factor; gdouble *delay; // count of tics within buffer size guint *attack; // where currently tic resides in the stream's offset, measured in 1/64 of bpm gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint note_offset_absolute; guint loop_left; guint loop_right; gboolean do_loop; guint loop_offset; gchar *card_uri; GObject *pulse_client; gchar **port_name; GList *pulse_port; pthread_mutex_t *callback_mutex; pthread_cond_t *callback_cond; pthread_mutex_t *callback_finish_mutex; pthread_cond_t *callback_finish_cond; GObject *application_context; pthread_mutex_t *application_mutex; GObject *notify_soundcard; GList *audio; }; struct _AgsPulseDevoutClass { GObjectClass object; }; GType ags_pulse_devout_get_type(); GQuark ags_pulse_devout_error_quark(); void ags_pulse_devout_switch_buffer_flag(AgsPulseDevout *pulse_devout); void ags_pulse_devout_adjust_delay_and_attack(AgsPulseDevout *pulse_devout); void ags_pulse_devout_realloc_buffer(AgsPulseDevout *pulse_devout); AgsPulseDevout* ags_pulse_devout_new(GObject *application_context); #endif /*__AGS_PULSE_DEVOUT_H__*/ gsequencer-1.4.24/ags/audio/pulse/ags_pulse_devin.c0000644000175000017500000021147413256163135017220 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_pulse_devin_class_init(AgsPulseDevinClass *pulse_devin); void ags_pulse_devin_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pulse_devin_soundcard_interface_init(AgsSoundcardInterface *soundcard); void ags_pulse_devin_init(AgsPulseDevin *pulse_devin); void ags_pulse_devin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_pulse_devin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_pulse_devin_disconnect(AgsConnectable *connectable); void ags_pulse_devin_connect(AgsConnectable *connectable); void ags_pulse_devin_dispose(GObject *gobject); void ags_pulse_devin_finalize(GObject *gobject); void ags_pulse_devin_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* ags_pulse_devin_get_application_context(AgsSoundcard *soundcard); void ags_pulse_devin_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_pulse_devin_get_application_mutex(AgsSoundcard *soundcard); void ags_pulse_devin_set_device(AgsSoundcard *soundcard, gchar *device); gchar* ags_pulse_devin_get_device(AgsSoundcard *soundcard); void ags_pulse_devin_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void ags_pulse_devin_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void ags_pulse_devin_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name); void ags_pulse_devin_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); gboolean ags_pulse_devin_is_starting(AgsSoundcard *soundcard); gboolean ags_pulse_devin_is_recording(AgsSoundcard *soundcard); gchar* ags_pulse_devin_get_uptime(AgsSoundcard *soundcard); void ags_pulse_devin_port_init(AgsSoundcard *soundcard, GError **error); void ags_pulse_devin_port_record(AgsSoundcard *soundcard, GError **error); void ags_pulse_devin_port_free(AgsSoundcard *soundcard); void ags_pulse_devin_tic(AgsSoundcard *soundcard); void ags_pulse_devin_offset_changed(AgsSoundcard *soundcard, guint note_offset); void ags_pulse_devin_set_bpm(AgsSoundcard *soundcard, gdouble bpm); gdouble ags_pulse_devin_get_bpm(AgsSoundcard *soundcard); void ags_pulse_devin_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor); gdouble ags_pulse_devin_get_delay_factor(AgsSoundcard *soundcard); gdouble ags_pulse_devin_get_absolute_delay(AgsSoundcard *soundcard); gdouble ags_pulse_devin_get_delay(AgsSoundcard *soundcard); guint ags_pulse_devin_get_attack(AgsSoundcard *soundcard); void* ags_pulse_devin_get_buffer(AgsSoundcard *soundcard); void* ags_pulse_devin_get_next_buffer(AgsSoundcard *soundcard); void* ags_pulse_devin_get_prev_buffer(AgsSoundcard *soundcard); guint ags_pulse_devin_get_delay_counter(AgsSoundcard *soundcard); void ags_pulse_devin_set_note_offset(AgsSoundcard *soundcard, guint note_offset); guint ags_pulse_devin_get_note_offset(AgsSoundcard *soundcard); void ags_pulse_devin_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset); guint ags_pulse_devin_get_note_offset_absolute(AgsSoundcard *soundcard); void ags_pulse_devin_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void ags_pulse_devin_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint ags_pulse_devin_get_loop_offset(AgsSoundcard *soundcard); void ags_pulse_devin_set_audio(AgsSoundcard *soundcard, GList *audio); GList* ags_pulse_devin_get_audio(AgsSoundcard *soundcard); /** * SECTION:ags_pulse_devin * @short_description: Output to soundcard * @title: AgsPulseDevin * @section_id: * @include: ags/audio/pulse/ags_pulse_devin.h * * #AgsPulseDevin represents a soundcard and supports output. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_DSP_CHANNELS, PROP_PCM_CHANNELS, PROP_FORMAT, PROP_BUFFER_SIZE, PROP_SAMPLERATE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, PROP_PULSE_CLIENT, PROP_PULSE_PORT, PROP_CHANNEL, }; enum{ LAST_SIGNAL, }; static gpointer ags_pulse_devin_parent_class = NULL; static guint pulse_devin_signals[LAST_SIGNAL]; GType ags_pulse_devin_get_type(void) { static GType ags_type_pulse_devin = 0; if(!ags_type_pulse_devin){ static const GTypeInfo ags_pulse_devin_info = { sizeof (AgsPulseDevinClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pulse_devin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPulseDevin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pulse_devin_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pulse_devin_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_soundcard_interface_info = { (GInterfaceInitFunc) ags_pulse_devin_soundcard_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pulse_devin = g_type_register_static(G_TYPE_OBJECT, "AgsPulseDevin", &ags_pulse_devin_info, 0); g_type_add_interface_static(ags_type_pulse_devin, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_pulse_devin, AGS_TYPE_SOUNDCARD, &ags_soundcard_interface_info); } return (ags_type_pulse_devin); } void ags_pulse_devin_class_init(AgsPulseDevinClass *pulse_devin) { GObjectClass *gobject; GParamSpec *param_spec; ags_pulse_devin_parent_class = g_type_class_peek_parent(pulse_devin); /* GObjectClass */ gobject = (GObjectClass *) pulse_devin; gobject->set_property = ags_pulse_devin_set_property; gobject->get_property = ags_pulse_devin_get_property; gobject->dispose = ags_pulse_devin_dispose; gobject->finalize = ags_pulse_devin_finalize; /* properties */ /** * AgsPulseDevin:application-context: * * The assigned #AgsApplicationContext * * Since: 1.2.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsPulseDevin:application-mutex: * * The assigned application mutex * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsPulseDevin:device: * * The pulse soundcard indentifier * * Since: 1.2.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "ags-pulse-devin-0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsPulseDevin:dsp-channels: * * The dsp channel count * * Since: 1.2.0 */ param_spec = g_param_spec_uint("dsp-channels", i18n_pspec("count of DSP channels"), i18n_pspec("The count of DSP channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DSP_CHANNELS, param_spec); /** * AgsPulseDevin:pcm-channels: * * The pcm channel count * * Since: 1.2.0 */ param_spec = g_param_spec_uint("pcm-channels", i18n_pspec("count of PCM channels"), i18n_pspec("The count of PCM channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PCM_CHANNELS, param_spec); /** * AgsPulseDevin:format: * * The precision of the buffer * * Since: 1.2.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("precision of buffer"), i18n_pspec("The precision to use for a frame"), 1, 64, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsPulseDevin:buffer-size: * * The buffer size * * Since: 1.2.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("frame count of a buffer"), i18n_pspec("The count of frames a buffer contains"), 1, 44100, 940, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsPulseDevin:samplerate: * * The samplerate * * Since: 1.2.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("frames per second"), i18n_pspec("The frames count recorded during a second"), 8000, 96000, 44100, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsPulseDevin:buffer: * * The buffer * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to record"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsPulseDevin:bpm: * * Beats per minute * * Since: 1.2.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsPulseDevin:delay-factor: * * tact * * Since: 1.2.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsPulseDevin:attack: * * Attack of the buffer * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsPulseDevin:pulse-client: * * The assigned #AgsPulseClient * * Since: 1.2.0 */ param_spec = g_param_spec_object("pulse-client", i18n_pspec("pulse client object"), i18n_pspec("The pulse client object"), AGS_TYPE_PULSE_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PULSE_CLIENT, param_spec); /** * AgsPulseDevin:pulse-port: * * The assigned #AgsPulsePort * * Since: 1.2.0 */ param_spec = g_param_spec_pointer("pulse-port", i18n_pspec("pulse port object"), i18n_pspec("The pulse port object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PULSE_PORT, param_spec); /** * AgsPulseDevin:channel: * * The assigned #AgsChannel * * Since: 1.2.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel"), i18n_pspec("The mapped channel"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); } GQuark ags_pulse_devin_error_quark() { return(g_quark_from_static_string("ags-pulse_devin-error-quark")); } void ags_pulse_devin_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_pulse_devin_connect; connectable->disconnect = ags_pulse_devin_disconnect; } void ags_pulse_devin_soundcard_interface_init(AgsSoundcardInterface *soundcard) { soundcard->set_application_context = ags_pulse_devin_set_application_context; soundcard->get_application_context = ags_pulse_devin_get_application_context; soundcard->set_application_mutex = ags_pulse_devin_set_application_mutex; soundcard->get_application_mutex = ags_pulse_devin_get_application_mutex; soundcard->set_device = ags_pulse_devin_set_device; soundcard->get_device = ags_pulse_devin_get_device; soundcard->set_presets = ags_pulse_devin_set_presets; soundcard->get_presets = ags_pulse_devin_get_presets; soundcard->list_cards = ags_pulse_devin_list_cards; soundcard->pcm_info = ags_pulse_devin_pcm_info; soundcard->get_poll_fd = NULL; soundcard->is_available = NULL; soundcard->is_starting = ags_pulse_devin_is_starting; soundcard->is_recording = ags_pulse_devin_is_recording; soundcard->is_recording = NULL; soundcard->get_uptime = ags_pulse_devin_get_uptime; soundcard->record_init = ags_pulse_devin_port_init; soundcard->record = ags_pulse_devin_port_record; soundcard->record_init = NULL; soundcard->record = NULL; soundcard->stop = ags_pulse_devin_port_free; soundcard->tic = ags_pulse_devin_tic; soundcard->offset_changed = ags_pulse_devin_offset_changed; soundcard->set_bpm = ags_pulse_devin_set_bpm; soundcard->get_bpm = ags_pulse_devin_get_bpm; soundcard->set_delay_factor = ags_pulse_devin_set_delay_factor; soundcard->get_delay_factor = ags_pulse_devin_get_delay_factor; soundcard->get_absolute_delay = ags_pulse_devin_get_absolute_delay; soundcard->get_delay = ags_pulse_devin_get_delay; soundcard->get_attack = ags_pulse_devin_get_attack; soundcard->get_buffer = ags_pulse_devin_get_buffer; soundcard->get_next_buffer = ags_pulse_devin_get_next_buffer; soundcard->get_prev_buffer = ags_pulse_devin_get_prev_buffer; soundcard->get_delay_counter = ags_pulse_devin_get_delay_counter; soundcard->set_note_offset = ags_pulse_devin_set_note_offset; soundcard->get_note_offset = ags_pulse_devin_get_note_offset; soundcard->set_note_offset_absolute = ags_pulse_devin_set_note_offset_absolute; soundcard->get_note_offset_absolute = ags_pulse_devin_get_note_offset_absolute; soundcard->set_loop = ags_pulse_devin_set_loop; soundcard->get_loop = ags_pulse_devin_get_loop; soundcard->get_loop_offset = ags_pulse_devin_get_loop_offset; soundcard->set_audio = ags_pulse_devin_set_audio; soundcard->get_audio = ags_pulse_devin_get_audio; } void ags_pulse_devin_init(AgsPulseDevin *pulse_devin) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert devin mutex */ pulse_devin->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); pulse_devin->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) pulse_devin, mutex); pthread_mutex_unlock(application_mutex); /* flags */ pulse_devin->flags = 0; g_atomic_int_set(&(pulse_devin->sync_flags), AGS_PULSE_DEVIN_PASS_THROUGH); /* quality */ config = ags_config_get_instance(); pulse_devin->dsp_channels = AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS; pulse_devin->pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; pulse_devin->format = AGS_SOUNDCARD_DEFAULT_FORMAT; pulse_devin->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; pulse_devin->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; /* read config */ /* dsp channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "dsp-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "dsp-channels"); } if(str != NULL){ pulse_devin->dsp_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ pulse_devin->pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ pulse_devin->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ pulse_devin->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ pulse_devin->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* */ pulse_devin->card_uri = NULL; pulse_devin->pulse_client = NULL; pulse_devin->port_name = NULL; pulse_devin->pulse_port = NULL; /* buffer */ pulse_devin->buffer = (void **) malloc(8 * sizeof(void*)); pulse_devin->buffer[0] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * sizeof(signed short)); pulse_devin->buffer[1] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * sizeof(signed short)); pulse_devin->buffer[2] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * sizeof(signed short)); pulse_devin->buffer[3] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * sizeof(signed short)); pulse_devin->buffer[4] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * sizeof(signed short)); pulse_devin->buffer[5] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * sizeof(signed short)); pulse_devin->buffer[6] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * sizeof(signed short)); pulse_devin->buffer[7] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * sizeof(signed short)); ags_pulse_devin_realloc_buffer(pulse_devin); /* bpm */ pulse_devin->bpm = AGS_SOUNDCARD_DEFAULT_BPM; /* delay factor */ pulse_devin->delay_factor = AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR; /* delay and attack */ pulse_devin->delay = (gdouble *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(gdouble)); pulse_devin->attack = (guint *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(guint)); ags_pulse_devin_adjust_delay_and_attack(pulse_devin); /* counters */ pulse_devin->tact_counter = 0.0; pulse_devin->delay_counter = 0; pulse_devin->tic_counter = 0; pulse_devin->note_offset = 0; pulse_devin->note_offset_absolute = 0; pulse_devin->loop_left = AGS_SOUNDCARD_DEFAULT_LOOP_LEFT; pulse_devin->loop_right = AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT; pulse_devin->do_loop = FALSE; pulse_devin->loop_offset = 0; /* callback mutex */ pulse_devin->callback_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(pulse_devin->callback_mutex, NULL); pulse_devin->callback_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(pulse_devin->callback_cond, NULL); /* callback finish mutex */ pulse_devin->callback_finish_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(pulse_devin->callback_finish_mutex, NULL); pulse_devin->callback_finish_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(pulse_devin->callback_finish_cond, NULL); /* parent */ pulse_devin->application_context = NULL; pulse_devin->application_mutex = NULL; /* */ pulse_devin->notify_soundcard = NULL; /* all AgsAudio */ pulse_devin->audio = NULL; } void ags_pulse_devin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(pulse_devin->application_context == (GObject *) application_context){ return; } if(pulse_devin->application_context != NULL){ g_object_unref(G_OBJECT(pulse_devin->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *segmentation; guint discriminante, nominante; g_object_ref(G_OBJECT(application_context)); pulse_devin->application_mutex = application_context->mutex; config = ags_config_get_instance(); /* segmentation */ segmentation = ags_config_get_value(config, AGS_CONFIG_GENERIC, "segmentation"); if(segmentation != NULL){ sscanf(segmentation, "%d/%d", &discriminante, &nominante); pulse_devin->delay_factor = 1.0 / nominante * (nominante / discriminante); } ags_pulse_devin_adjust_delay_and_attack(pulse_devin); ags_pulse_devin_realloc_buffer(pulse_devin); }else{ pulse_devin->application_mutex = NULL; } pulse_devin->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(pulse_devin->application_mutex == application_mutex){ return; } pulse_devin->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); pulse_devin->card_uri = g_strdup(device); } break; case PROP_DSP_CHANNELS: { guint dsp_channels; dsp_channels = g_value_get_uint(value); if(dsp_channels == pulse_devin->dsp_channels){ return; } pulse_devin->dsp_channels = dsp_channels; } break; case PROP_PCM_CHANNELS: { guint pcm_channels; pcm_channels = g_value_get_uint(value); if(pcm_channels == pulse_devin->pcm_channels){ return; } pulse_devin->pcm_channels = pcm_channels; ags_pulse_devin_realloc_buffer(pulse_devin); if(pulse_devin->pulse_port != NULL){ ags_pulse_port_set_pcm_channels(pulse_devin->pulse_port->data, pcm_channels); } } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); if(format == pulse_devin->format){ return; } pulse_devin->format = format; ags_pulse_devin_realloc_buffer(pulse_devin); if(pulse_devin->pulse_port != NULL){ ags_pulse_port_set_format(pulse_devin->pulse_port->data, format); } } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); if(buffer_size == pulse_devin->buffer_size){ return; } pulse_devin->buffer_size = buffer_size; ags_pulse_devin_realloc_buffer(pulse_devin); ags_pulse_devin_adjust_delay_and_attack(pulse_devin); if(pulse_devin->pulse_port != NULL){ ags_pulse_port_set_buffer_size(pulse_devin->pulse_port->data, buffer_size); } } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); if(samplerate == pulse_devin->samplerate){ return; } pulse_devin->samplerate = samplerate; ags_pulse_devin_realloc_buffer(pulse_devin); ags_pulse_devin_adjust_delay_and_attack(pulse_devin); if(pulse_devin->pulse_port != NULL){ ags_pulse_port_set_samplerate(pulse_devin->pulse_port->data, samplerate); } } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); pulse_devin->bpm = bpm; ags_pulse_devin_adjust_delay_and_attack(pulse_devin); } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); pulse_devin->delay_factor = delay_factor; ags_pulse_devin_adjust_delay_and_attack(pulse_devin); } break; case PROP_PULSE_CLIENT: { AgsPulseClient *pulse_client; pulse_client = (AgsPulseClient *) g_value_get_object(value); if(pulse_devin->pulse_client == (GObject *) pulse_client){ return; } if(pulse_devin->pulse_client != NULL){ g_object_unref(G_OBJECT(pulse_devin->pulse_client)); } if(pulse_client != NULL){ g_object_ref(pulse_client); } pulse_devin->pulse_client = (GObject *) pulse_client; } break; case PROP_PULSE_PORT: { AgsPulsePort *pulse_port; pulse_port = (AgsPulsePort *) g_value_get_pointer(value); if(!AGS_IS_PULSE_PORT(pulse_port) || g_list_find(pulse_devin->pulse_port, pulse_port) != NULL){ return; } if(pulse_port != NULL){ g_object_ref(pulse_port); pulse_devin->pulse_port = g_list_append(pulse_devin->pulse_port, pulse_port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_devin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, pulse_devin->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, pulse_devin->application_mutex); } break; case PROP_DEVICE: { g_value_set_string(value, pulse_devin->card_uri); } break; case PROP_DSP_CHANNELS: { g_value_set_uint(value, pulse_devin->dsp_channels); } break; case PROP_PCM_CHANNELS: { g_value_set_uint(value, pulse_devin->pcm_channels); } break; case PROP_FORMAT: { g_value_set_uint(value, pulse_devin->format); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, pulse_devin->buffer_size); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, pulse_devin->samplerate); } break; case PROP_BUFFER: { g_value_set_pointer(value, pulse_devin->buffer); } break; case PROP_BPM: { g_value_set_double(value, pulse_devin->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, pulse_devin->delay_factor); } break; case PROP_ATTACK: { g_value_set_pointer(value, pulse_devin->attack); } break; case PROP_PULSE_CLIENT: { g_value_set_object(value, pulse_devin->pulse_client); } break; case PROP_PULSE_PORT: { g_value_set_pointer(value, g_list_copy(pulse_devin->pulse_port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_devin_dispose(GObject *gobject) { AgsPulseDevin *pulse_devin; GList *list; pulse_devin = AGS_PULSE_DEVIN(gobject); /* application context */ if(pulse_devin->application_context != NULL){ g_object_unref(pulse_devin->application_context); pulse_devin->application_context = NULL; } /* unref audio */ if(pulse_devin->audio != NULL){ list = pulse_devin->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(pulse_devin->audio, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_pulse_devin_parent_class)->dispose(gobject); } void ags_pulse_devin_finalize(GObject *gobject) { AgsPulseDevin *pulse_devin; AgsMutexManager *mutex_manager; GList *list, *list_next; pulse_devin = AGS_PULSE_DEVIN(gobject); /* remove pulse_devin mutex */ pthread_mutex_lock(pulse_devin->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(pulse_devin->application_mutex); /* free output buffer */ free(pulse_devin->buffer[0]); free(pulse_devin->buffer[1]); free(pulse_devin->buffer[2]); free(pulse_devin->buffer[3]); free(pulse_devin->buffer[4]); free(pulse_devin->buffer[5]); free(pulse_devin->buffer[6]); free(pulse_devin->buffer[7]); /* free buffer array */ free(pulse_devin->buffer); /* free AgsAttack */ free(pulse_devin->attack); /* unref notify soundcard */ if(pulse_devin->notify_soundcard != NULL){ if(pulse_devin->application_context != NULL){ ags_task_thread_remove_cyclic_task(AGS_APPLICATION_CONTEXT(pulse_devin->application_context)->task_thread, pulse_devin->notify_soundcard); } g_object_unref(pulse_devin->notify_soundcard); } /* application context */ if(pulse_devin->application_context != NULL){ g_object_unref(pulse_devin->application_context); } /* unref audio */ if(pulse_devin->audio != NULL){ list = pulse_devin->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(pulse_devin->audio, g_object_unref); } pthread_mutex_destroy(pulse_devin->mutex); free(pulse_devin->mutex); pthread_mutexattr_destroy(pulse_devin->mutexattr); free(pulse_devin->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_pulse_devin_parent_class)->finalize(gobject); } void ags_pulse_devin_connect(AgsConnectable *connectable) { AgsPulseDevin *pulse_devin; GList *list; pulse_devin = AGS_PULSE_DEVIN(connectable); /* */ list = pulse_devin->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_pulse_devin_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_pulse_devin_switch_buffer_flag: * @pulse_devin: an #AgsPulseDevin * * The buffer flag indicates the currently recorded buffer. * * Since: 1.2.0 */ void ags_pulse_devin_switch_buffer_flag(AgsPulseDevin *pulse_devin) { if((AGS_PULSE_DEVIN_BUFFER0 & (pulse_devin->flags)) != 0){ pulse_devin->flags &= (~AGS_PULSE_DEVIN_BUFFER0); pulse_devin->flags |= AGS_PULSE_DEVIN_BUFFER1; }else if((AGS_PULSE_DEVIN_BUFFER1 & (pulse_devin->flags)) != 0){ pulse_devin->flags &= (~AGS_PULSE_DEVIN_BUFFER1); pulse_devin->flags |= AGS_PULSE_DEVIN_BUFFER2; }else if((AGS_PULSE_DEVIN_BUFFER2 & (pulse_devin->flags)) != 0){ pulse_devin->flags &= (~AGS_PULSE_DEVIN_BUFFER2); pulse_devin->flags |= AGS_PULSE_DEVIN_BUFFER3; }else if((AGS_PULSE_DEVIN_BUFFER3 & (pulse_devin->flags)) != 0){ pulse_devin->flags &= (~AGS_PULSE_DEVIN_BUFFER3); pulse_devin->flags |= AGS_PULSE_DEVIN_BUFFER4; }else if((AGS_PULSE_DEVIN_BUFFER4 & (pulse_devin->flags)) != 0){ pulse_devin->flags &= (~AGS_PULSE_DEVIN_BUFFER4); pulse_devin->flags |= AGS_PULSE_DEVIN_BUFFER5; }else if((AGS_PULSE_DEVIN_BUFFER5 & (pulse_devin->flags)) != 0){ pulse_devin->flags &= (~AGS_PULSE_DEVIN_BUFFER5); pulse_devin->flags |= AGS_PULSE_DEVIN_BUFFER6; }else if((AGS_PULSE_DEVIN_BUFFER6 & (pulse_devin->flags)) != 0){ pulse_devin->flags &= (~AGS_PULSE_DEVIN_BUFFER6); pulse_devin->flags |= AGS_PULSE_DEVIN_BUFFER7; }else if((AGS_PULSE_DEVIN_BUFFER7 & (pulse_devin->flags)) != 0){ pulse_devin->flags &= (~AGS_PULSE_DEVIN_BUFFER7); pulse_devin->flags |= AGS_PULSE_DEVIN_BUFFER0; } } void ags_pulse_devin_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); pulse_devin->application_context = (GObject *) application_context; } AgsApplicationContext* ags_pulse_devin_get_application_context(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); return((AgsApplicationContext *) pulse_devin->application_context); } void ags_pulse_devin_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); pulse_devin->application_mutex = application_mutex; } pthread_mutex_t* ags_pulse_devin_get_application_mutex(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); return(pulse_devin->application_mutex); } void ags_pulse_devin_set_device(AgsSoundcard *soundcard, gchar *device) { AgsPulseDevin *pulse_devin; GList *pulse_port, *pulse_port_start; gchar *str; int ret; guint nth_card; guint i; pulse_devin = AGS_PULSE_DEVIN(soundcard); if(pulse_devin->card_uri == device || !g_ascii_strcasecmp(pulse_devin->card_uri, device)){ return; } if(!g_str_has_prefix(device, "ags-pulse-devin-")){ g_warning("invalid pulseaudio device prefix"); return; } ret = sscanf(device, "ags-pulse-devin-%u", &nth_card); if(ret != 1){ g_warning("invalid pulseaudio device specifier"); return; } if(pulse_devin->card_uri != NULL){ g_free(pulse_devin->card_uri); } pulse_devin->card_uri = g_strdup(device); /* apply name to port */ pulse_port_start = pulse_port = g_list_copy(pulse_devin->pulse_port); str = g_strdup_printf("ags-soundcard%d", nth_card); g_object_set(pulse_port->data, "port-name", str, NULL); g_free(str); g_list_free(pulse_port_start); } gchar* ags_pulse_devin_get_device(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); return(pulse_devin->card_uri); } void ags_pulse_devin_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); g_object_set(pulse_devin, "pcm-channels", channels, "samplerate", rate, "buffer-size", buffer_size, "format", format, NULL); } void ags_pulse_devin_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); if(channels != NULL){ *channels = pulse_devin->pcm_channels; } if(rate != NULL){ *rate = pulse_devin->samplerate; } if(buffer_size != NULL){ *buffer_size = pulse_devin->buffer_size; } if(format != NULL){ *format = pulse_devin->format; } } /** * ags_pulse_devin_list_cards: * @soundcard: the #AgsSoundcard * @card_id: pulseaudio identifier * @card_name: card name * * List available soundcards. * * Since: 1.2.0 */ void ags_pulse_devin_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name) { AgsPulseDevin *pulse_devin; AgsApplicationContext *application_context; GList *list, *list_start; pthread_mutex_t *application_mutex; pulse_devin = AGS_PULSE_DEVIN(soundcard); application_context = (AgsApplicationContext *) pulse_devin->application_context; if(application_context == NULL){ return; } application_mutex = pulse_devin->application_mutex; if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(AGS_IS_PULSE_DEVIN(list->data)){ if(card_id != NULL){ if(AGS_PULSE_DEVIN(list->data)->card_uri != NULL){ *card_id = g_list_prepend(*card_id, g_strdup(AGS_PULSE_DEVIN(list->data)->card_uri)); }else{ *card_id = g_list_prepend(*card_id, g_strdup("(null)")); g_warning("ags_pulse_devin_list_cards() - card id (null)"); } } if(card_name != NULL){ if(AGS_PULSE_DEVIN(list->data)->pulse_client != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(AGS_PULSE_CLIENT(AGS_PULSE_DEVIN(list->data)->pulse_client)->name)); }else{ *card_name = g_list_prepend(*card_name, g_strdup("(null)")); g_warning("ags_pulse_devin_list_cards() - pulseaudio client not connected (null)"); } } } list = list->next; } pthread_mutex_unlock(application_mutex); if(card_id != NULL && *card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL && *card_name != NULL){ *card_name = g_list_reverse(*card_name); } } void ags_pulse_devin_pcm_info(AgsSoundcard *soundcard, char *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error) { if(channels_min != NULL){ *channels_min = 1; } if(channels_max != NULL){ *channels_max = 1024; } if(rate_min != NULL){ *rate_min = 8000; } if(rate_max != NULL){ *rate_max = 192000; } if(buffer_size_min != NULL){ *buffer_size_min = 64; } if(buffer_size_max != NULL){ *buffer_size_max = 8192; } } gboolean ags_pulse_devin_is_starting(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); return((((AGS_PULSE_DEVIN_START_RECORD & (pulse_devin->flags)) != 0) ? TRUE: FALSE)); } gboolean ags_pulse_devin_is_recording(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); return((((AGS_PULSE_DEVIN_RECORD & (pulse_devin->flags)) != 0) ? TRUE: FALSE)); } gchar* ags_pulse_devin_get_uptime(AgsSoundcard *soundcard) { gchar *uptime; if(ags_soundcard_is_recording(soundcard)){ guint samplerate; guint buffer_size; guint note_offset; gdouble bpm; gdouble delay_factor; gdouble delay; ags_soundcard_get_presets(soundcard, NULL, &samplerate, &buffer_size, NULL); note_offset = ags_soundcard_get_note_offset_absolute(soundcard); bpm = ags_soundcard_get_bpm(soundcard); delay_factor = ags_soundcard_get_delay_factor(soundcard); /* calculate delays */ delay = ags_soundcard_get_absolute_delay(soundcard); uptime = ags_time_get_uptime_from_offset(note_offset, bpm, delay, delay_factor); }else{ uptime = g_strdup(AGS_TIME_ZERO); } return(uptime); } void ags_pulse_devin_port_init(AgsSoundcard *soundcard, GError **error) { AgsPulseDevin *pulse_devin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint format, word_size; pthread_mutex_t *mutex; pulse_devin = AGS_PULSE_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_devin); pthread_mutex_unlock(application_context->mutex); /* retrieve word size */ pthread_mutex_lock(mutex); switch(pulse_devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_pulse_devin_port_init(): unsupported word size"); return; } /* prepare for capture */ pulse_devin->flags |= (AGS_PULSE_DEVIN_BUFFER7 | AGS_PULSE_DEVIN_START_RECORD | AGS_PULSE_DEVIN_RECORD | AGS_PULSE_DEVIN_NONBLOCKING); memset(pulse_devin->buffer[0], 0, pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[1], 0, pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[2], 0, pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[3], 0, pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[4], 0, pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[5], 0, pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[6], 0, pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[7], 0, pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); /* */ pulse_devin->tact_counter = 0.0; pulse_devin->delay_counter = 0.0; pulse_devin->tic_counter = 0; pulse_devin->flags |= (AGS_PULSE_DEVIN_INITIALIZED | AGS_PULSE_DEVIN_START_RECORD | AGS_PULSE_DEVIN_RECORD); g_atomic_int_and(&(pulse_devin->sync_flags), (~(AGS_PULSE_DEVIN_PASS_THROUGH))); g_atomic_int_or(&(pulse_devin->sync_flags), AGS_PULSE_DEVIN_INITIAL_CALLBACK); pthread_mutex_unlock(mutex); } void ags_pulse_devin_port_record(AgsSoundcard *soundcard, GError **error) { AgsPulseClient *pulse_client; AgsPulseDevin *pulse_devin; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; guint word_size; gboolean pulse_client_activated; pthread_mutex_t *mutex; pthread_mutex_t *client_mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; pulse_devin = AGS_PULSE_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* mutices */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); task_thread = (AgsTaskThread *) application_context->task_thread; mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_devin); pthread_mutex_unlock(application_context->mutex); /* client */ pthread_mutex_lock(mutex); pulse_client = (AgsPulseClient *) pulse_devin->pulse_client; callback_mutex = pulse_devin->callback_mutex; callback_finish_mutex = pulse_devin->callback_finish_mutex; /* do capture */ pulse_devin->flags &= (~AGS_PULSE_DEVIN_START_RECORD); notify_soundcard = AGS_NOTIFY_SOUNDCARD(pulse_devin->notify_soundcard); if((AGS_PULSE_DEVIN_INITIALIZED & (pulse_devin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } switch(pulse_devin->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_pulse_devin_port_record(): unsupported word size"); return; } pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_context->mutex); client_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_client); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(client_mutex); pulse_client_activated = ((AGS_PULSE_CLIENT_ACTIVATED & (pulse_client->flags)) != 0) ? TRUE: FALSE; pthread_mutex_unlock(client_mutex); if(pulse_client_activated){ /* signal */ if((AGS_PULSE_DEVIN_INITIAL_CALLBACK & (g_atomic_int_get(&(pulse_devin->sync_flags)))) == 0){ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(pulse_devin->sync_flags), AGS_PULSE_DEVIN_CALLBACK_DONE); if((AGS_PULSE_DEVIN_CALLBACK_WAIT & (g_atomic_int_get(&(pulse_devin->sync_flags)))) != 0){ pthread_cond_signal(pulse_devin->callback_cond); } pthread_mutex_unlock(callback_mutex); } /* wait callback */ if((AGS_PULSE_DEVIN_INITIAL_CALLBACK & (g_atomic_int_get(&(pulse_devin->sync_flags)))) == 0){ pthread_mutex_lock(callback_finish_mutex); if((AGS_PULSE_DEVIN_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(pulse_devin->sync_flags)))) == 0){ g_atomic_int_or(&(pulse_devin->sync_flags), AGS_PULSE_DEVIN_CALLBACK_FINISH_WAIT); while((AGS_PULSE_DEVIN_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(pulse_devin->sync_flags)))) == 0 && (AGS_PULSE_DEVIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(pulse_devin->sync_flags)))) != 0){ pthread_cond_wait(pulse_devin->callback_finish_cond, callback_finish_mutex); } } g_atomic_int_and(&(pulse_devin->sync_flags), (~(AGS_PULSE_DEVIN_CALLBACK_FINISH_WAIT | AGS_PULSE_DEVIN_CALLBACK_FINISH_DONE))); pthread_mutex_unlock(callback_finish_mutex); }else{ g_atomic_int_and(&(pulse_devin->sync_flags), (~AGS_PULSE_DEVIN_INITIAL_CALLBACK)); } } /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); if(task_thread != NULL){ AgsTicDevice *tic_device; AgsClearBuffer *clear_buffer; AgsSwitchBufferFlag *switch_buffer_flag; GList *task; task = NULL; /* tic soundcard */ tic_device = ags_tic_device_new((GObject *) pulse_devin); task = g_list_append(task, tic_device); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) pulse_devin); task = g_list_append(task, clear_buffer); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) pulse_devin); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); }else{ guint nth_buffer; /* get buffer */ if((AGS_PULSE_DEVIN_BUFFER0 & (pulse_devin->flags)) != 0){ nth_buffer = 7; }else if((AGS_PULSE_DEVIN_BUFFER1 & (pulse_devin->flags)) != 0){ nth_buffer = 0; }else if((AGS_PULSE_DEVIN_BUFFER2 & (pulse_devin->flags)) != 0){ nth_buffer = 1; }else if((AGS_PULSE_DEVIN_BUFFER3 & (pulse_devin->flags)) != 0){ nth_buffer = 2; }else if((AGS_PULSE_DEVIN_BUFFER4 & (pulse_devin->flags)) != 0){ nth_buffer = 3; }else if((AGS_PULSE_DEVIN_BUFFER5 & (pulse_devin->flags)) != 0){ nth_buffer = 4; }else if((AGS_PULSE_DEVIN_BUFFER6 & (pulse_devin->flags)) != 0){ nth_buffer = 5; }else if((AGS_PULSE_DEVIN_BUFFER7 & (pulse_devin->flags)) != 0){ nth_buffer = 6; } /* tic */ ags_soundcard_tic(AGS_SOUNDCARD(pulse_devin)); switch(pulse_devin->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: g_warning("ags_pulse_devin_port_record(): unsupported word size"); return; } memset(pulse_devin->buffer[nth_buffer], 0, (size_t) pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); /* reset - switch buffer flags */ ags_pulse_devin_switch_buffer_flag(pulse_devin); } } void ags_pulse_devin_port_free(AgsSoundcard *soundcard) { AgsPulsePort *pulse_port; AgsPulseDevin *pulse_devin; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint word_size; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; pulse_devin = AGS_PULSE_DEVIN(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_devin); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); notify_soundcard = AGS_NOTIFY_SOUNDCARD(pulse_devin->notify_soundcard); if((AGS_PULSE_DEVIN_INITIALIZED & (pulse_devin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } g_object_ref(notify_soundcard); callback_mutex = pulse_devin->callback_mutex; callback_finish_mutex = pulse_devin->callback_finish_mutex; // g_atomic_int_or(&(AGS_THREAD(application_context->main_loop)->flags), // AGS_THREAD_TIMING); pulse_devin->flags &= (~(AGS_PULSE_DEVIN_BUFFER0 | AGS_PULSE_DEVIN_BUFFER1 | AGS_PULSE_DEVIN_BUFFER2 | AGS_PULSE_DEVIN_BUFFER3 | AGS_PULSE_DEVIN_BUFFER4 | AGS_PULSE_DEVIN_BUFFER5 | AGS_PULSE_DEVIN_BUFFER6 | AGS_PULSE_DEVIN_BUFFER7 | AGS_PULSE_DEVIN_RECORD)); g_atomic_int_or(&(pulse_devin->sync_flags), AGS_PULSE_DEVIN_PASS_THROUGH); g_atomic_int_and(&(pulse_devin->sync_flags), (~AGS_PULSE_DEVIN_INITIAL_CALLBACK)); /* signal callback */ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(pulse_devin->sync_flags), AGS_PULSE_DEVIN_CALLBACK_DONE); if((AGS_PULSE_DEVIN_CALLBACK_WAIT & (g_atomic_int_get(&(pulse_devin->sync_flags)))) != 0){ pthread_cond_signal(pulse_devin->callback_cond); } pthread_mutex_unlock(callback_mutex); /* signal thread */ pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(pulse_devin->sync_flags), AGS_PULSE_DEVIN_CALLBACK_FINISH_DONE); if((AGS_PULSE_DEVIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(pulse_devin->sync_flags)))) != 0){ pthread_cond_signal(pulse_devin->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); g_object_unref(notify_soundcard); /* */ pulse_devin->note_offset = 0; pulse_devin->note_offset_absolute = 0; switch(pulse_devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: word_size = 0; g_critical("ags_pulse_devin_free(): unsupported word size"); } pthread_mutex_unlock(mutex); if(pulse_devin->pulse_port != NULL){ pulse_port = pulse_devin->pulse_port->data; while(!g_atomic_int_get(&(pulse_port->is_empty))) usleep(500000); } pthread_mutex_lock(mutex); memset(pulse_devin->buffer[0], 0, (size_t) pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[1], 0, (size_t) pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[2], 0, (size_t) pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[3], 0, (size_t) pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[4], 0, (size_t) pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[5], 0, (size_t) pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[6], 0, (size_t) pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); memset(pulse_devin->buffer[7], 0, (size_t) pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); pthread_mutex_unlock(mutex); } void ags_pulse_devin_tic(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; gdouble delay; pulse_devin = AGS_PULSE_DEVIN(soundcard); /* determine if attack should be switched */ delay = pulse_devin->delay[pulse_devin->tic_counter]; if((guint) pulse_devin->delay_counter + 1 >= (guint) delay){ if(pulse_devin->do_loop && pulse_devin->note_offset + 1 == pulse_devin->loop_right){ ags_soundcard_set_note_offset(soundcard, pulse_devin->loop_left); }else{ ags_soundcard_set_note_offset(soundcard, pulse_devin->note_offset + 1); } ags_soundcard_set_note_offset_absolute(soundcard, pulse_devin->note_offset_absolute + 1); /* delay */ ags_soundcard_offset_changed(soundcard, pulse_devin->note_offset); /* reset - delay counter */ pulse_devin->delay_counter = 0.0; pulse_devin->tact_counter += 1.0; }else{ pulse_devin->delay_counter += 1.0; } } void ags_pulse_devin_offset_changed(AgsSoundcard *soundcard, guint note_offset) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); pulse_devin->tic_counter += 1; if(pulse_devin->tic_counter == AGS_SOUNDCARD_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ pulse_devin->tic_counter = 0; } } void ags_pulse_devin_set_bpm(AgsSoundcard *soundcard, gdouble bpm) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); pulse_devin->bpm = bpm; ags_pulse_devin_adjust_delay_and_attack(pulse_devin); } gdouble ags_pulse_devin_get_bpm(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); return(pulse_devin->bpm); } void ags_pulse_devin_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); pulse_devin->delay_factor = delay_factor; ags_pulse_devin_adjust_delay_and_attack(pulse_devin); } gdouble ags_pulse_devin_get_delay_factor(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); return(pulse_devin->delay_factor); } gdouble ags_pulse_devin_get_absolute_delay(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); return((60.0 * (((gdouble) pulse_devin->samplerate / (gdouble) pulse_devin->buffer_size) / (gdouble) pulse_devin->bpm) * ((1.0 / 16.0) * (1.0 / (gdouble) pulse_devin->delay_factor)))); } gdouble ags_pulse_devin_get_delay(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; guint index; pulse_devin = AGS_PULSE_DEVIN(soundcard); index = pulse_devin->tic_counter; return(pulse_devin->delay[index]); } guint ags_pulse_devin_get_attack(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; guint index; pulse_devin = AGS_PULSE_DEVIN(soundcard); index = pulse_devin->tic_counter; return(pulse_devin->attack[index]); } void* ags_pulse_devin_get_buffer(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; void *buffer; pulse_devin = AGS_PULSE_DEVIN(soundcard); if((AGS_PULSE_DEVIN_BUFFER0 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[0]; }else if((AGS_PULSE_DEVIN_BUFFER1 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[1]; }else if((AGS_PULSE_DEVIN_BUFFER2 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[2]; }else if((AGS_PULSE_DEVIN_BUFFER3 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[3]; }else if((AGS_PULSE_DEVIN_BUFFER4 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[4]; }else if((AGS_PULSE_DEVIN_BUFFER5 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[5]; }else if((AGS_PULSE_DEVIN_BUFFER6 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[6]; }else if((AGS_PULSE_DEVIN_BUFFER7 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[7]; }else{ buffer = NULL; } return(buffer); } void* ags_pulse_devin_get_next_buffer(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; void *buffer; pulse_devin = AGS_PULSE_DEVIN(soundcard); if((AGS_PULSE_DEVIN_BUFFER0 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[1]; }else if((AGS_PULSE_DEVIN_BUFFER1 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[2]; }else if((AGS_PULSE_DEVIN_BUFFER2 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[3]; }else if((AGS_PULSE_DEVIN_BUFFER3 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[4]; }else if((AGS_PULSE_DEVIN_BUFFER4 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[5]; }else if((AGS_PULSE_DEVIN_BUFFER5 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[6]; }else if((AGS_PULSE_DEVIN_BUFFER6 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[7]; }else if((AGS_PULSE_DEVIN_BUFFER7 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[0]; }else{ buffer = NULL; } return(buffer); } void* ags_pulse_devin_get_prev_buffer(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; void *buffer; pulse_devin = AGS_PULSE_DEVIN(soundcard); if((AGS_PULSE_DEVIN_BUFFER0 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[7]; }else if((AGS_PULSE_DEVIN_BUFFER1 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[0]; }else if((AGS_PULSE_DEVIN_BUFFER2 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[1]; }else if((AGS_PULSE_DEVIN_BUFFER3 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[2]; }else if((AGS_PULSE_DEVIN_BUFFER4 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[3]; }else if((AGS_PULSE_DEVIN_BUFFER5 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[4]; }else if((AGS_PULSE_DEVIN_BUFFER6 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[5]; }else if((AGS_PULSE_DEVIN_BUFFER7 & (pulse_devin->flags)) != 0){ buffer = pulse_devin->buffer[6]; }else{ buffer = NULL; } return(buffer); } guint ags_pulse_devin_get_delay_counter(AgsSoundcard *soundcard) { return(AGS_PULSE_DEVIN(soundcard)->delay_counter); } void ags_pulse_devin_set_note_offset(AgsSoundcard *soundcard, guint note_offset) { AGS_PULSE_DEVIN(soundcard)->note_offset = note_offset; } guint ags_pulse_devin_get_note_offset(AgsSoundcard *soundcard) { return(AGS_PULSE_DEVIN(soundcard)->note_offset); } void ags_pulse_devin_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset) { AGS_PULSE_DEVIN(soundcard)->note_offset_absolute = note_offset; } guint ags_pulse_devin_get_note_offset_absolute(AgsSoundcard *soundcard) { return(AGS_PULSE_DEVIN(soundcard)->note_offset_absolute); } void ags_pulse_devin_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop) { AGS_PULSE_DEVIN(soundcard)->loop_left = loop_left; AGS_PULSE_DEVIN(soundcard)->loop_right = loop_right; AGS_PULSE_DEVIN(soundcard)->do_loop = do_loop; if(do_loop){ AGS_PULSE_DEVIN(soundcard)->loop_offset = AGS_PULSE_DEVIN(soundcard)->note_offset; } } void ags_pulse_devin_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop) { if(loop_left != NULL){ *loop_left = AGS_PULSE_DEVIN(soundcard)->loop_left; } if(loop_right != NULL){ *loop_right = AGS_PULSE_DEVIN(soundcard)->loop_right; } if(do_loop != NULL){ *do_loop = AGS_PULSE_DEVIN(soundcard)->do_loop; } } guint ags_pulse_devin_get_loop_offset(AgsSoundcard *soundcard) { return(AGS_PULSE_DEVIN(soundcard)->loop_offset); } void ags_pulse_devin_set_audio(AgsSoundcard *soundcard, GList *audio) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); pulse_devin->audio = audio; } GList* ags_pulse_devin_get_audio(AgsSoundcard *soundcard) { AgsPulseDevin *pulse_devin; pulse_devin = AGS_PULSE_DEVIN(soundcard); return(pulse_devin->audio); } /** * ags_pulse_devin_adjust_delay_and_attack: * @pulse_devin: the #AgsPulseDevin * * Calculate delay and attack and reset it. * * Since: 1.2.0 */ void ags_pulse_devin_adjust_delay_and_attack(AgsPulseDevin *pulse_devin) { gdouble delay; guint default_tact_frames; guint delay_tact_frames; guint default_period; gint next_attack; guint i; if(pulse_devin == NULL){ return; } delay = ags_pulse_devin_get_absolute_delay(AGS_SOUNDCARD(pulse_devin)); #ifdef AGS_DEBUG g_message("delay : %f", delay); #endif default_tact_frames = (guint) (delay * pulse_devin->buffer_size); delay_tact_frames = (guint) (floor(delay) * pulse_devin->buffer_size); default_period = (1.0 / AGS_SOUNDCARD_DEFAULT_PERIOD) * (default_tact_frames); i = 0; pulse_devin->attack[0] = (guint) floor(0.25 * pulse_devin->buffer_size); next_attack = (((pulse_devin->attack[i] + default_tact_frames) / pulse_devin->buffer_size) - delay) * pulse_devin->buffer_size; if(next_attack < 0){ next_attack = 0; } if(next_attack >= pulse_devin->buffer_size){ next_attack = pulse_devin->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ pulse_devin->attack[i] = pulse_devin->attack[i] - ((gdouble) next_attack / 2.0); if(pulse_devin->attack[i] < 0){ pulse_devin->attack[i] = 0; } if(pulse_devin->attack[i] >= pulse_devin->buffer_size){ pulse_devin->attack[i] = pulse_devin->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= pulse_devin->buffer_size){ next_attack = pulse_devin->buffer_size - 1; } } for(i = 1; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD; i++){ pulse_devin->attack[i] = next_attack; next_attack = (((pulse_devin->attack[i] + default_tact_frames) / pulse_devin->buffer_size) - delay) * pulse_devin->buffer_size; if(next_attack >= pulse_devin->buffer_size){ next_attack = pulse_devin->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ pulse_devin->attack[i] = pulse_devin->attack[i] - ((gdouble) next_attack / 2.0); if(pulse_devin->attack[i] < 0){ pulse_devin->attack[i] = 0; } if(pulse_devin->attack[i] >= pulse_devin->buffer_size){ pulse_devin->attack[i] = pulse_devin->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= pulse_devin->buffer_size){ next_attack = pulse_devin->buffer_size - 1; } } #ifdef AGS_DEBUG g_message("%d", pulse_devin->attack[i]); #endif } pulse_devin->attack[0] = pulse_devin->attack[i - 2]; for(i = 0; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD - 1; i++){ pulse_devin->delay[i] = ((gdouble) (default_tact_frames + pulse_devin->attack[i] - pulse_devin->attack[i + 1])) / (gdouble) pulse_devin->buffer_size; #ifdef AGS_DEBUG g_message("%f", pulse_devin->delay[i]); #endif } pulse_devin->delay[i] = ((gdouble) (default_tact_frames + pulse_devin->attack[i] - pulse_devin->attack[0])) / (gdouble) pulse_devin->buffer_size; } /** * ags_pulse_devin_realloc_buffer: * @pulse_devin: the #AgsPulseDevin * * Reallocate the internal audio buffer. * * Since: 1.2.0 */ void ags_pulse_devin_realloc_buffer(AgsPulseDevin *pulse_devin) { guint word_size; if(pulse_devin == NULL){ return; } switch(pulse_devin->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: g_warning("ags_pulse_devin_realloc_buffer(): unsupported word size"); return; } /* AGS_PULSE_DEVIN_BUFFER_0 */ if(pulse_devin->buffer[0] != NULL){ free(pulse_devin->buffer[0]); } pulse_devin->buffer[0] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); /* AGS_PULSE_DEVIN_BUFFER_1 */ if(pulse_devin->buffer[1] != NULL){ free(pulse_devin->buffer[1]); } pulse_devin->buffer[1] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); /* AGS_PULSE_DEVIN_BUFFER_2 */ if(pulse_devin->buffer[2] != NULL){ free(pulse_devin->buffer[2]); } pulse_devin->buffer[2] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); /* AGS_PULSE_DEVIN_BUFFER_3 */ if(pulse_devin->buffer[3] != NULL){ free(pulse_devin->buffer[3]); } pulse_devin->buffer[3] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); /* AGS_PULSE_DEVIN_BUFFER_4 */ if(pulse_devin->buffer[4] != NULL){ free(pulse_devin->buffer[4]); } pulse_devin->buffer[4] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); /* AGS_PULSE_DEVIN_BUFFER_5 */ if(pulse_devin->buffer[5] != NULL){ free(pulse_devin->buffer[5]); } pulse_devin->buffer[5] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); /* AGS_PULSE_DEVIN_BUFFER_6 */ if(pulse_devin->buffer[6] != NULL){ free(pulse_devin->buffer[6]); } pulse_devin->buffer[6] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); /* AGS_PULSE_DEVIN_BUFFER_7 */ if(pulse_devin->buffer[7] != NULL){ free(pulse_devin->buffer[7]); } pulse_devin->buffer[7] = (void *) malloc(pulse_devin->pcm_channels * pulse_devin->buffer_size * word_size); } /** * ags_pulse_devin_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsPulseDevin, refering to @application_context. * * Returns: a new #AgsPulseDevin * * Since: 1.2.0 */ AgsPulseDevin* ags_pulse_devin_new(GObject *application_context) { AgsPulseDevin *pulse_devin; pulse_devin = (AgsPulseDevin *) g_object_new(AGS_TYPE_PULSE_DEVIN, "application-context", application_context, NULL); return(pulse_devin); } gsequencer-1.4.24/ags/audio/pulse/ags_pulse_server.h0000644000175000017500000000620213250011010017367 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PULSE_SERVER_H__ #define __AGS_PULSE_SERVER_H__ #include #include #include #ifdef AGS_WITH_PULSE #include #include #include #endif #include #define AGS_TYPE_PULSE_SERVER (ags_pulse_server_get_type()) #define AGS_PULSE_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PULSE_SERVER, AgsPulseServer)) #define AGS_PULSE_SERVER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PULSE_SERVER, AgsPulseServer)) #define AGS_IS_PULSE_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PULSE_SERVER)) #define AGS_IS_PULSE_SERVER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PULSE_SERVER)) #define AGS_PULSE_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_PULSE_SERVER, AgsPulseServerClass)) typedef struct _AgsPulseServer AgsPulseServer; typedef struct _AgsPulseServerClass AgsPulseServerClass; typedef enum{ AGS_PULSE_SERVER_CONNECTED = 1, }AgsPulseServerFlags; struct _AgsPulseServer { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; volatile gboolean running; pthread_t *thread; GObject *application_context; #ifdef AGS_WITH_PULSE pa_mainloop *main_loop; pa_mainloop_api *main_loop_api; #else gpointer main_loop; gpointer main_loop_api; #endif gchar *url; guint *port; guint port_count; guint n_soundcards; guint n_sequencers; GObject *default_soundcard; GObject *default_client; GList *client; }; struct _AgsPulseServerClass { GObjectClass object; }; GType ags_pulse_server_get_type(); GList* ags_pulse_server_find_url(GList *pulse_server, gchar *url); GObject* ags_pulse_server_find_client(AgsPulseServer *pulse_server, gchar *client_uuid); GObject* ags_pulse_server_find_port(AgsPulseServer *pulse_server, gchar *port_uuid); void ags_pulse_server_add_client(AgsPulseServer *pulse_server, GObject *pulse_client); void ags_pulse_server_remove_client(AgsPulseServer *pulse_server, GObject *pulse_client); void ags_pulse_server_connect_client(AgsPulseServer *pulse_server); void ags_pulse_server_start_poll(AgsPulseServer *pulse_server); AgsPulseServer* ags_pulse_server_new(GObject *application_context, gchar *url); #endif /*__AGS_PULSE_SERVER_H__*/ gsequencer-1.4.24/ags/audio/pulse/ags_pulse_client.c0000644000175000017500000004733013256163135017367 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_pulse_client_class_init(AgsPulseClientClass *pulse_client); void ags_pulse_client_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pulse_client_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager); void ags_pulse_client_init(AgsPulseClient *pulse_client); void ags_pulse_client_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_pulse_client_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_pulse_client_connect(AgsConnectable *connectable); void ags_pulse_client_disconnect(AgsConnectable *connectable); void ags_pulse_client_dispose(GObject *gobject); void ags_pulse_client_finalize(GObject *gobject); #ifdef AGS_WITH_PULSE void ags_pulse_client_state_callback(pa_context *c, AgsPulseClient *pulse_client); #endif /** * SECTION:ags_pulse_client * @short_description: pulseaudio connection * @title: AgsPulseClient * @section_id: * @include: ags/audio/pulse/ags_pulse_client.h * * The #AgsPulseClient communicates with a pulseaudio instance. */ enum{ PROP_0, PROP_PULSE_SERVER, PROP_DEVICE, PROP_PORT, }; static gpointer ags_pulse_client_parent_class = NULL; GType ags_pulse_client_get_type() { static GType ags_type_pulse_client = 0; if(!ags_type_pulse_client){ static const GTypeInfo ags_pulse_client_info = { sizeof (AgsPulseClientClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pulse_client_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPulseClient), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pulse_client_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pulse_client_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pulse_client = g_type_register_static(G_TYPE_OBJECT, "AgsPulseClient", &ags_pulse_client_info, 0); g_type_add_interface_static(ags_type_pulse_client, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_pulse_client); } void ags_pulse_client_class_init(AgsPulseClientClass *pulse_client) { GObjectClass *gobject; GParamSpec *param_spec; ags_pulse_client_parent_class = g_type_class_peek_parent(pulse_client); /* GObjectClass */ gobject = (GObjectClass *) pulse_client; gobject->set_property = ags_pulse_client_set_property; gobject->get_property = ags_pulse_client_get_property; gobject->dispose = ags_pulse_client_dispose; gobject->finalize = ags_pulse_client_finalize; /* properties */ /** * AgsPulseClient:pulse-server: * * The assigned #AgsPulseServer. * * Since: 1.0.0 */ param_spec = g_param_spec_object("pulse-server", i18n_pspec("assigned pulseaudio server"), i18n_pspec("The assigned pulseaudio server"), AGS_TYPE_PULSE_SERVER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PULSE_SERVER, param_spec); /** * AgsPulseClient:device: * * The assigned devices. * * Since: 1.0.0 */ param_spec = g_param_spec_object("device", i18n_pspec("assigned device"), i18n_pspec("The assigned device"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsPulseClient:port: * * The assigned ports. * * Since: 1.0.0 */ param_spec = g_param_spec_object("port", i18n_pspec("assigned port"), i18n_pspec("The assigned port"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT, param_spec); } void ags_pulse_client_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_pulse_client_connect; connectable->disconnect = ags_pulse_client_disconnect; } void ags_pulse_client_init(AgsPulseClient *pulse_client) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert client mutex */ pulse_client->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); pulse_client->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) pulse_client, mutex); pthread_mutex_unlock(application_mutex); /* flags */ pulse_client->flags = 0; /* server */ pulse_client->pulse_server = NULL; pulse_client->uuid = ags_id_generator_create_uuid(); pulse_client->name = NULL; /* client */ pulse_client->context = NULL; /* device */ pulse_client->device = NULL; pulse_client->port = NULL; } void ags_pulse_client_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPulseClient *pulse_client; pulse_client = AGS_PULSE_CLIENT(gobject); switch(prop_id){ case PROP_PULSE_SERVER: { AgsPulseServer *pulse_server; pulse_server = (AgsPulseServer *) g_value_get_object(value); if(pulse_client->pulse_server == (GObject *) pulse_server){ return; } if(pulse_client->pulse_server != NULL){ g_object_unref(pulse_client->pulse_server); } if(pulse_server != NULL){ g_object_ref(pulse_server); } pulse_client->pulse_server = (GObject *) pulse_server; } break; case PROP_DEVICE: { GObject *device; device = (GObject *) g_value_get_object(value); if(g_list_find(pulse_client->device, device) != NULL){ return; } if(device != NULL){ g_object_ref(device); pulse_client->device = g_list_prepend(pulse_client->device, device); } } break; case PROP_PORT: { GObject *port; port = (GObject *) g_value_get_object(value); if(g_list_find(pulse_client->port, port) != NULL){ return; } if(port != NULL){ g_object_ref(port); pulse_client->port = g_list_prepend(pulse_client->port, port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_client_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPulseClient *pulse_client; pulse_client = AGS_PULSE_CLIENT(gobject); switch(prop_id){ case PROP_PULSE_SERVER: { g_value_set_object(value, pulse_client->pulse_server); } break; case PROP_DEVICE: { g_value_set_pointer(value, g_list_copy(pulse_client->device)); } break; case PROP_PORT: { g_value_set_pointer(value, g_list_copy(pulse_client->port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_client_connect(AgsConnectable *connectable) { AgsPulseClient *pulse_client; GList *list; pulse_client = AGS_PULSE_CLIENT(connectable); if((AGS_PULSE_CLIENT_CONNECTED & (pulse_client->flags)) != 0){ return; } pulse_client->flags |= AGS_PULSE_CLIENT_CONNECTED; /* port */ list = pulse_client->port; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_pulse_client_disconnect(AgsConnectable *connectable) { AgsPulseClient *pulse_client; GList *list; pulse_client = AGS_PULSE_CLIENT(connectable); if((AGS_PULSE_CLIENT_CONNECTED & (pulse_client->flags)) == 0){ return; } pulse_client->flags &= (~AGS_PULSE_CLIENT_CONNECTED); /* port */ list = pulse_client->port; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_pulse_client_dispose(GObject *gobject) { AgsPulseClient *pulse_client; GList *list; pulse_client = AGS_PULSE_CLIENT(gobject); /* pulse server */ if(pulse_client->pulse_server != NULL){ g_object_unref(pulse_client->pulse_server); pulse_client->pulse_server = NULL; } /* device */ if(pulse_client->device != NULL){ list = pulse_client->device; while(list != NULL){ g_object_set(G_OBJECT(list->data), "pulse-client", NULL, NULL); list = list->next; } g_list_free_full(pulse_client->device, g_object_unref); pulse_client->device = NULL; } /* port */ if(pulse_client->port != NULL){ list = pulse_client->port; while(list != NULL){ g_object_run_dispose(G_OBJECT(list->data)); list = list->next; } g_list_free_full(pulse_client->port, g_object_unref); pulse_client->port = NULL; } /* call parent */ G_OBJECT_CLASS(ags_pulse_client_parent_class)->dispose(gobject); } void ags_pulse_client_finalize(GObject *gobject) { AgsPulseClient *pulse_client; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pulse_client = AGS_PULSE_CLIENT(gobject); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* remove pulse server mutex */ pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); /* pulse server */ if(pulse_client->pulse_server != NULL){ g_object_unref(pulse_client->pulse_server); } /* device */ if(pulse_client->device != NULL){ g_list_free_full(pulse_client->device, g_object_unref); } /* port */ if(pulse_client->port != NULL){ g_list_free_full(pulse_client->port, g_object_unref); } pthread_mutex_destroy(pulse_client->mutex); free(pulse_client->mutex); pthread_mutexattr_destroy(pulse_client->mutexattr); free(pulse_client->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_pulse_client_parent_class)->finalize(gobject); } /** * ags_pulse_client_find_uuid: * @pulse_client: a #GList * @client_uuid: the client uuid to find * * Finds next match of @client_uuid in @pulse_client. * * Returns: a #GList or %NULL * * Since: 1.0.0 */ GList* ags_pulse_client_find_uuid(GList *pulse_client, gchar *client_uuid) { while(pulse_client != NULL){ if(AGS_PULSE_CLIENT(pulse_client->data)->context != NULL && !g_ascii_strcasecmp(AGS_PULSE_CLIENT(pulse_client->data)->uuid, client_uuid)){ return(pulse_client); } } return(NULL); } /** * ags_pulse_client_find: * @pulse_client: a #GList * @client_name: the client name to find * * Finds next match of @client_name in @pulse_client. * * Returns: a #GList or %NULL * * Since: 1.0.0 */ GList* ags_pulse_client_find(GList *pulse_client, gchar *client_name) { while(pulse_client != NULL){ if(AGS_PULSE_CLIENT(pulse_client->data)->context != NULL && !g_ascii_strcasecmp(AGS_PULSE_CLIENT(pulse_client->data)->name, client_name)){ return(pulse_client); } } return(NULL); } #ifdef AGS_WITH_PULSE void ags_pulse_client_state_callback(pa_context *c, AgsPulseClient *pulse_client) { AgsMutexManager *mutex_manager; pa_context_state_t state; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); state = pa_context_get_state(c); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_client); pthread_mutex_unlock(application_mutex); switch(state){ case PA_CONTEXT_UNCONNECTED: case PA_CONTEXT_CONNECTING: case PA_CONTEXT_AUTHORIZING: case PA_CONTEXT_SETTING_NAME: break; case PA_CONTEXT_FAILED: case PA_CONTEXT_TERMINATED: g_warning("pulseaudio not running"); break; case PA_CONTEXT_READY: pthread_mutex_lock(mutex); pulse_client->flags |= AGS_PULSE_CLIENT_READY; pthread_mutex_unlock(mutex); break; } } #endif /** * ags_pulse_client_open: * @pulse_client: the #AgsPulseClient * @client_name: the client's name * * Open the pulseaudio client's connection and read uuid. * * Since: 1.0.0 */ void ags_pulse_client_open(AgsPulseClient *pulse_client, gchar *client_name) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; gboolean ready; if(pulse_client == NULL || client_name == NULL){ return; } if(pulse_client->context != NULL){ g_message("Advanced Gtk+ Sequencer pulseaudio client already open"); return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_client); pthread_mutex_unlock(application_mutex); /* */ g_message("Advanced Gtk+ Sequencer open pulseaudio client"); pulse_client->name = g_strdup(client_name); #ifdef AGS_WITH_PULSE pulse_client->context = pa_context_new(AGS_PULSE_SERVER(pulse_client->pulse_server)->main_loop_api, client_name); #else pulse_client->context = NULL; #endif if(pulse_client->context != NULL){ #ifdef AGS_WITH_PULSE pa_context_connect(pulse_client->context, NULL, 0, NULL); pa_context_set_state_callback(pulse_client->context, ags_pulse_client_state_callback, pulse_client); ready = FALSE; while(!ready){ pthread_mutex_lock(mutex); ready = (((AGS_PULSE_CLIENT_READY & (pulse_client->flags)) != 0) ? TRUE: FALSE); pthread_mutex_unlock(mutex); if(!ready){ pa_mainloop_iterate(AGS_PULSE_SERVER(pulse_client->pulse_server)->main_loop, TRUE, NULL); } } #endif } } /** * ags_pulse_client_activate: * @pulse_client: the #AgsPulseClient * * Activate client. * * Since: 1.0.0 */ void ags_pulse_client_activate(AgsPulseClient *pulse_client) { AgsMutexManager *mutex_manager; GList *port; int ret; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_client); pthread_mutex_unlock(application_mutex); /* */ //TODO:JK: make thread-safe pthread_mutex_lock(mutex); if((AGS_PULSE_CLIENT_ACTIVATED & (pulse_client->flags)) != 0 || pulse_client->context == NULL){ pthread_mutex_unlock(mutex); return; } port = pulse_client->port; while(port != NULL){ ags_pulse_port_register(port->data, AGS_PULSE_PORT(port->data)->name, (((AGS_PULSE_PORT_IS_AUDIO & (AGS_PULSE_PORT(port->data)->flags)) != 0) ? TRUE: FALSE), (((AGS_PULSE_PORT_IS_MIDI & (AGS_PULSE_PORT(port->data)->flags)) != 0) ? TRUE: FALSE), (((AGS_PULSE_PORT_IS_OUTPUT & (AGS_PULSE_PORT(port->data)->flags)) != 0) ? TRUE: FALSE)); port = port->next; } pulse_client->flags |= AGS_PULSE_CLIENT_ACTIVATED; pthread_mutex_unlock(mutex); } /** * ags_pulse_client_deactivate: * @pulse_client: the #AgsPulseClient * * Deactivate client. * * Since: 1.0.0 */ void ags_pulse_client_deactivate(AgsPulseClient *pulse_client) { if(pulse_client->context == NULL){ return; } pa_context_disconnect(pulse_client->context); pulse_client->flags &= (~AGS_PULSE_CLIENT_ACTIVATED); } /** * ags_pulse_client_add_device: * @pulse_client: the #AgsPulseClient * @pulse_device: an #AgsPulseDevout or #AgsPulseDevin * * Add @pulse_device to @pulse_client. * * Since: 1.0.0 */ void ags_pulse_client_add_device(AgsPulseClient *pulse_client, GObject *pulse_device) { if(!AGS_IS_PULSE_CLIENT(pulse_client) || (!AGS_IS_PULSE_DEVOUT(pulse_device) && !AGS_IS_PULSE_DEVIN(pulse_device))){ return; } g_object_ref(pulse_device); pulse_client->device = g_list_prepend(pulse_client->device, pulse_device); } /** * ags_pulse_client_remove_device: * @pulse_client: the #AgsPulseClient * @pulse_device: an #AgsPulseDevout or #AgsPulseDevin * * Remove @pulse_device from @pulse_client. * * Since: 1.0.0 */ void ags_pulse_client_remove_device(AgsPulseClient *pulse_client, GObject *pulse_device) { if(!AGS_IS_PULSE_CLIENT(pulse_client)){ return; } pulse_client->device = g_list_remove(pulse_client->device, pulse_device); g_object_unref(pulse_device); } /** * ags_pulse_client_add_port: * @pulse_client: the #AgsPulseClient * @pulse_port: an #AgsPulsePort * * Add @pulse_port to @pulse_client. * * Since: 1.0.0 */ void ags_pulse_client_add_port(AgsPulseClient *pulse_client, GObject *pulse_port) { if(!AGS_IS_PULSE_CLIENT(pulse_client) || !AGS_IS_PULSE_PORT(pulse_port)){ return; } g_object_ref(pulse_port); pulse_client->port = g_list_prepend(pulse_client->port, pulse_port); } /** * ags_pulse_client_remove_port: * @pulse_client: the #AgsPulseClient * @pulse_port: an #AgsPulsePort * * Remove @pulse_port from @pulse_client. * * Since: 1.0.0 */ void ags_pulse_client_remove_port(AgsPulseClient *pulse_client, GObject *pulse_port) { if(!AGS_IS_PULSE_CLIENT(pulse_client)){ return; } pulse_client->port = g_list_remove(pulse_client->port, pulse_port); g_object_unref(pulse_port); } /** * ags_pulse_client_new: * @pulse_server: the assigned #AgsPulseServer * * Instantiate a new #AgsPulseClient. * * Returns: the new #AgsPulseClient * * Since: 1.0.0 */ AgsPulseClient* ags_pulse_client_new(GObject *pulse_server) { AgsPulseClient *pulse_client; pulse_client = (AgsPulseClient *) g_object_new(AGS_TYPE_PULSE_CLIENT, "pulse-server", pulse_server, NULL); return(pulse_client); } gsequencer-1.4.24/ags/audio/pulse/ags_pulse_devout.c0000644000175000017500000021301113247044247017410 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_pulse_devout_class_init(AgsPulseDevoutClass *pulse_devout); void ags_pulse_devout_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pulse_devout_soundcard_interface_init(AgsSoundcardInterface *soundcard); void ags_pulse_devout_init(AgsPulseDevout *pulse_devout); void ags_pulse_devout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_pulse_devout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_pulse_devout_disconnect(AgsConnectable *connectable); void ags_pulse_devout_connect(AgsConnectable *connectable); void ags_pulse_devout_dispose(GObject *gobject); void ags_pulse_devout_finalize(GObject *gobject); void ags_pulse_devout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* ags_pulse_devout_get_application_context(AgsSoundcard *soundcard); void ags_pulse_devout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_pulse_devout_get_application_mutex(AgsSoundcard *soundcard); void ags_pulse_devout_set_device(AgsSoundcard *soundcard, gchar *device); gchar* ags_pulse_devout_get_device(AgsSoundcard *soundcard); void ags_pulse_devout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void ags_pulse_devout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void ags_pulse_devout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name); void ags_pulse_devout_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); gboolean ags_pulse_devout_is_starting(AgsSoundcard *soundcard); gboolean ags_pulse_devout_is_playing(AgsSoundcard *soundcard); gchar* ags_pulse_devout_get_uptime(AgsSoundcard *soundcard); void ags_pulse_devout_port_init(AgsSoundcard *soundcard, GError **error); void ags_pulse_devout_port_play(AgsSoundcard *soundcard, GError **error); void ags_pulse_devout_port_free(AgsSoundcard *soundcard); void ags_pulse_devout_tic(AgsSoundcard *soundcard); void ags_pulse_devout_offset_changed(AgsSoundcard *soundcard, guint note_offset); void ags_pulse_devout_set_bpm(AgsSoundcard *soundcard, gdouble bpm); gdouble ags_pulse_devout_get_bpm(AgsSoundcard *soundcard); void ags_pulse_devout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor); gdouble ags_pulse_devout_get_delay_factor(AgsSoundcard *soundcard); gdouble ags_pulse_devout_get_absolute_delay(AgsSoundcard *soundcard); gdouble ags_pulse_devout_get_delay(AgsSoundcard *soundcard); guint ags_pulse_devout_get_attack(AgsSoundcard *soundcard); void* ags_pulse_devout_get_buffer(AgsSoundcard *soundcard); void* ags_pulse_devout_get_next_buffer(AgsSoundcard *soundcard); void* ags_pulse_devout_get_prev_buffer(AgsSoundcard *soundcard); guint ags_pulse_devout_get_delay_counter(AgsSoundcard *soundcard); void ags_pulse_devout_set_note_offset(AgsSoundcard *soundcard, guint note_offset); guint ags_pulse_devout_get_note_offset(AgsSoundcard *soundcard); void ags_pulse_devout_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset); guint ags_pulse_devout_get_note_offset_absolute(AgsSoundcard *soundcard); void ags_pulse_devout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void ags_pulse_devout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint ags_pulse_devout_get_loop_offset(AgsSoundcard *soundcard); void ags_pulse_devout_set_audio(AgsSoundcard *soundcard, GList *audio); GList* ags_pulse_devout_get_audio(AgsSoundcard *soundcard); /** * SECTION:ags_pulse_devout * @short_description: Output to soundcard * @title: AgsPulseDevout * @section_id: * @include: ags/audio/pulse/ags_pulse_devout.h * * #AgsPulseDevout represents a soundcard and supports output. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_DSP_CHANNELS, PROP_PCM_CHANNELS, PROP_FORMAT, PROP_BUFFER_SIZE, PROP_SAMPLERATE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, PROP_PULSE_CLIENT, PROP_PULSE_PORT, PROP_CHANNEL, }; enum{ LAST_SIGNAL, }; static gpointer ags_pulse_devout_parent_class = NULL; static guint pulse_devout_signals[LAST_SIGNAL]; GType ags_pulse_devout_get_type (void) { static GType ags_type_pulse_devout = 0; if(!ags_type_pulse_devout){ static const GTypeInfo ags_pulse_devout_info = { sizeof (AgsPulseDevoutClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pulse_devout_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPulseDevout), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pulse_devout_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pulse_devout_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_soundcard_interface_info = { (GInterfaceInitFunc) ags_pulse_devout_soundcard_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pulse_devout = g_type_register_static(G_TYPE_OBJECT, "AgsPulseDevout", &ags_pulse_devout_info, 0); g_type_add_interface_static(ags_type_pulse_devout, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_pulse_devout, AGS_TYPE_SOUNDCARD, &ags_soundcard_interface_info); } return (ags_type_pulse_devout); } void ags_pulse_devout_class_init(AgsPulseDevoutClass *pulse_devout) { GObjectClass *gobject; GParamSpec *param_spec; ags_pulse_devout_parent_class = g_type_class_peek_parent(pulse_devout); /* GObjectClass */ gobject = (GObjectClass *) pulse_devout; gobject->set_property = ags_pulse_devout_set_property; gobject->get_property = ags_pulse_devout_get_property; gobject->dispose = ags_pulse_devout_dispose; gobject->finalize = ags_pulse_devout_finalize; /* properties */ /** * AgsPulseDevout:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsPulseDevout:application-mutex: * * The assigned application mutex * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsPulseDevout:device: * * The pulse soundcard indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "ags-pulse-devout-0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsPulseDevout:dsp-channels: * * The dsp channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("dsp-channels", i18n_pspec("count of DSP channels"), i18n_pspec("The count of DSP channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DSP_CHANNELS, param_spec); /** * AgsPulseDevout:pcm-channels: * * The pcm channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pcm-channels", i18n_pspec("count of PCM channels"), i18n_pspec("The count of PCM channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PCM_CHANNELS, param_spec); /** * AgsPulseDevout:format: * * The precision of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("precision of buffer"), i18n_pspec("The precision to use for a frame"), 1, 64, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsPulseDevout:buffer-size: * * The buffer size * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("frame count of a buffer"), i18n_pspec("The count of frames a buffer contains"), 1, 44100, 940, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsPulseDevout:samplerate: * * The samplerate * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("frames per second"), i18n_pspec("The frames count played during a second"), 8000, 96000, 44100, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsPulseDevout:buffer: * * The buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to play"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsPulseDevout:bpm: * * Beats per minute * * Since: 1.0.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsPulseDevout:delay-factor: * * tact * * Since: 1.0.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsPulseDevout:attack: * * Attack of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsPulseDevout:pulse-client: * * The assigned #AgsPulseClient * * Since: 1.0.0 */ param_spec = g_param_spec_object("pulse-client", i18n_pspec("pulse client object"), i18n_pspec("The pulse client object"), AGS_TYPE_PULSE_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PULSE_CLIENT, param_spec); /** * AgsPulseDevout:pulse-port: * * The assigned #AgsPulsePort * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("pulse-port", i18n_pspec("pulse port object"), i18n_pspec("The pulse port object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PULSE_PORT, param_spec); /** * AgsPulseDevout:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel"), i18n_pspec("The mapped channel"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); } GQuark ags_pulse_devout_error_quark() { return(g_quark_from_static_string("ags-pulse_devout-error-quark")); } void ags_pulse_devout_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_pulse_devout_connect; connectable->disconnect = ags_pulse_devout_disconnect; } void ags_pulse_devout_soundcard_interface_init(AgsSoundcardInterface *soundcard) { soundcard->set_application_context = ags_pulse_devout_set_application_context; soundcard->get_application_context = ags_pulse_devout_get_application_context; soundcard->set_application_mutex = ags_pulse_devout_set_application_mutex; soundcard->get_application_mutex = ags_pulse_devout_get_application_mutex; soundcard->set_device = ags_pulse_devout_set_device; soundcard->get_device = ags_pulse_devout_get_device; soundcard->set_presets = ags_pulse_devout_set_presets; soundcard->get_presets = ags_pulse_devout_get_presets; soundcard->list_cards = ags_pulse_devout_list_cards; soundcard->pcm_info = ags_pulse_devout_pcm_info; soundcard->get_poll_fd = NULL; soundcard->is_available = NULL; soundcard->is_starting = ags_pulse_devout_is_starting; soundcard->is_playing = ags_pulse_devout_is_playing; soundcard->is_recording = NULL; soundcard->get_uptime = ags_pulse_devout_get_uptime; soundcard->play_init = ags_pulse_devout_port_init; soundcard->play = ags_pulse_devout_port_play; soundcard->record_init = NULL; soundcard->record = NULL; soundcard->stop = ags_pulse_devout_port_free; soundcard->tic = ags_pulse_devout_tic; soundcard->offset_changed = ags_pulse_devout_offset_changed; soundcard->set_bpm = ags_pulse_devout_set_bpm; soundcard->get_bpm = ags_pulse_devout_get_bpm; soundcard->set_delay_factor = ags_pulse_devout_set_delay_factor; soundcard->get_delay_factor = ags_pulse_devout_get_delay_factor; soundcard->get_absolute_delay = ags_pulse_devout_get_absolute_delay; soundcard->get_delay = ags_pulse_devout_get_delay; soundcard->get_attack = ags_pulse_devout_get_attack; soundcard->get_buffer = ags_pulse_devout_get_buffer; soundcard->get_next_buffer = ags_pulse_devout_get_next_buffer; soundcard->get_prev_buffer = ags_pulse_devout_get_prev_buffer; soundcard->get_delay_counter = ags_pulse_devout_get_delay_counter; soundcard->set_note_offset = ags_pulse_devout_set_note_offset; soundcard->get_note_offset = ags_pulse_devout_get_note_offset; soundcard->set_note_offset_absolute = ags_pulse_devout_set_note_offset_absolute; soundcard->get_note_offset_absolute = ags_pulse_devout_get_note_offset_absolute; soundcard->set_loop = ags_pulse_devout_set_loop; soundcard->get_loop = ags_pulse_devout_get_loop; soundcard->get_loop_offset = ags_pulse_devout_get_loop_offset; soundcard->set_audio = ags_pulse_devout_set_audio; soundcard->get_audio = ags_pulse_devout_get_audio; } void ags_pulse_devout_init(AgsPulseDevout *pulse_devout) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert devout mutex */ pulse_devout->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); pulse_devout->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) pulse_devout, mutex); pthread_mutex_unlock(application_mutex); /* flags */ pulse_devout->flags = 0; g_atomic_int_set(&(pulse_devout->sync_flags), AGS_PULSE_DEVOUT_PASS_THROUGH); /* quality */ config = ags_config_get_instance(); pulse_devout->dsp_channels = AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS; pulse_devout->pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; pulse_devout->format = AGS_SOUNDCARD_DEFAULT_FORMAT; pulse_devout->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; pulse_devout->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; /* read config */ /* dsp channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "dsp-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "dsp-channels"); } if(str != NULL){ pulse_devout->dsp_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ pulse_devout->pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ pulse_devout->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ pulse_devout->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ pulse_devout->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* */ pulse_devout->card_uri = NULL; pulse_devout->pulse_client = NULL; pulse_devout->port_name = NULL; pulse_devout->pulse_port = NULL; /* buffer */ pulse_devout->buffer = (void **) malloc(8 * sizeof(void*)); pulse_devout->buffer[0] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * sizeof(signed short)); pulse_devout->buffer[1] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * sizeof(signed short)); pulse_devout->buffer[2] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * sizeof(signed short)); pulse_devout->buffer[3] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * sizeof(signed short)); pulse_devout->buffer[4] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * sizeof(signed short)); pulse_devout->buffer[5] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * sizeof(signed short)); pulse_devout->buffer[6] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * sizeof(signed short)); pulse_devout->buffer[7] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * sizeof(signed short)); ags_pulse_devout_realloc_buffer(pulse_devout); /* bpm */ pulse_devout->bpm = AGS_SOUNDCARD_DEFAULT_BPM; /* delay factor */ pulse_devout->delay_factor = AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR; /* delay and attack */ pulse_devout->delay = (gdouble *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(gdouble)); pulse_devout->attack = (guint *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(guint)); ags_pulse_devout_adjust_delay_and_attack(pulse_devout); /* counters */ pulse_devout->tact_counter = 0.0; pulse_devout->delay_counter = 0; pulse_devout->tic_counter = 0; pulse_devout->note_offset = 0; pulse_devout->note_offset_absolute = 0; pulse_devout->loop_left = AGS_SOUNDCARD_DEFAULT_LOOP_LEFT; pulse_devout->loop_right = AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT; pulse_devout->do_loop = FALSE; pulse_devout->loop_offset = 0; /* callback mutex */ pulse_devout->callback_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(pulse_devout->callback_mutex, NULL); pulse_devout->callback_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(pulse_devout->callback_cond, NULL); /* callback finish mutex */ pulse_devout->callback_finish_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(pulse_devout->callback_finish_mutex, NULL); pulse_devout->callback_finish_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(pulse_devout->callback_finish_cond, NULL); /* parent */ pulse_devout->application_context = NULL; pulse_devout->application_mutex = NULL; /* */ pulse_devout->notify_soundcard = NULL; /* all AgsAudio */ pulse_devout->audio = NULL; } void ags_pulse_devout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(pulse_devout->application_context == (GObject *) application_context){ return; } if(pulse_devout->application_context != NULL){ g_object_unref(G_OBJECT(pulse_devout->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *segmentation; guint discriminante, nominante; g_object_ref(G_OBJECT(application_context)); pulse_devout->application_mutex = application_context->mutex; config = ags_config_get_instance(); /* segmentation */ segmentation = ags_config_get_value(config, AGS_CONFIG_GENERIC, "segmentation"); if(segmentation != NULL){ sscanf(segmentation, "%d/%d", &discriminante, &nominante); pulse_devout->delay_factor = 1.0 / nominante * (nominante / discriminante); } ags_pulse_devout_adjust_delay_and_attack(pulse_devout); ags_pulse_devout_realloc_buffer(pulse_devout); }else{ pulse_devout->application_mutex = NULL; } pulse_devout->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(pulse_devout->application_mutex == application_mutex){ return; } pulse_devout->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); pulse_devout->card_uri = g_strdup(device); } break; case PROP_DSP_CHANNELS: { guint dsp_channels; dsp_channels = g_value_get_uint(value); if(dsp_channels == pulse_devout->dsp_channels){ return; } pulse_devout->dsp_channels = dsp_channels; } break; case PROP_PCM_CHANNELS: { guint pcm_channels; pcm_channels = g_value_get_uint(value); if(pcm_channels == pulse_devout->pcm_channels){ return; } pulse_devout->pcm_channels = pcm_channels; ags_pulse_devout_realloc_buffer(pulse_devout); if(pulse_devout->pulse_port != NULL){ ags_pulse_port_set_pcm_channels(pulse_devout->pulse_port->data, pcm_channels); } } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); if(format == pulse_devout->format){ return; } pulse_devout->format = format; ags_pulse_devout_realloc_buffer(pulse_devout); if(pulse_devout->pulse_port != NULL){ ags_pulse_port_set_format(pulse_devout->pulse_port->data, format); } } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); if(buffer_size == pulse_devout->buffer_size){ return; } pulse_devout->buffer_size = buffer_size; ags_pulse_devout_realloc_buffer(pulse_devout); ags_pulse_devout_adjust_delay_and_attack(pulse_devout); if(pulse_devout->pulse_port != NULL){ ags_pulse_port_set_buffer_size(pulse_devout->pulse_port->data, buffer_size); } } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); if(samplerate == pulse_devout->samplerate){ return; } pulse_devout->samplerate = samplerate; ags_pulse_devout_realloc_buffer(pulse_devout); ags_pulse_devout_adjust_delay_and_attack(pulse_devout); if(pulse_devout->pulse_port != NULL){ ags_pulse_port_set_samplerate(pulse_devout->pulse_port->data, samplerate); } } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); pulse_devout->bpm = bpm; ags_pulse_devout_adjust_delay_and_attack(pulse_devout); } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); pulse_devout->delay_factor = delay_factor; ags_pulse_devout_adjust_delay_and_attack(pulse_devout); } break; case PROP_PULSE_CLIENT: { AgsPulseClient *pulse_client; pulse_client = (AgsPulseClient *) g_value_get_object(value); if(pulse_devout->pulse_client == (GObject *) pulse_client){ return; } if(pulse_devout->pulse_client != NULL){ g_object_unref(G_OBJECT(pulse_devout->pulse_client)); } if(pulse_client != NULL){ g_object_ref(pulse_client); } pulse_devout->pulse_client = (GObject *) pulse_client; } break; case PROP_PULSE_PORT: { AgsPulsePort *pulse_port; pulse_port = (AgsPulsePort *) g_value_get_pointer(value); if(!AGS_IS_PULSE_PORT(pulse_port) || g_list_find(pulse_devout->pulse_port, pulse_port) != NULL){ return; } if(pulse_port != NULL){ g_object_ref(pulse_port); pulse_devout->pulse_port = g_list_append(pulse_devout->pulse_port, pulse_port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_devout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, pulse_devout->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, pulse_devout->application_mutex); } break; case PROP_DEVICE: { g_value_set_string(value, pulse_devout->card_uri); } break; case PROP_DSP_CHANNELS: { g_value_set_uint(value, pulse_devout->dsp_channels); } break; case PROP_PCM_CHANNELS: { g_value_set_uint(value, pulse_devout->pcm_channels); } break; case PROP_FORMAT: { g_value_set_uint(value, pulse_devout->format); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, pulse_devout->buffer_size); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, pulse_devout->samplerate); } break; case PROP_BUFFER: { g_value_set_pointer(value, pulse_devout->buffer); } break; case PROP_BPM: { g_value_set_double(value, pulse_devout->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, pulse_devout->delay_factor); } break; case PROP_ATTACK: { g_value_set_pointer(value, pulse_devout->attack); } break; case PROP_PULSE_CLIENT: { g_value_set_object(value, pulse_devout->pulse_client); } break; case PROP_PULSE_PORT: { g_value_set_pointer(value, g_list_copy(pulse_devout->pulse_port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_devout_dispose(GObject *gobject) { AgsPulseDevout *pulse_devout; GList *list; pulse_devout = AGS_PULSE_DEVOUT(gobject); /* application context */ if(pulse_devout->application_context != NULL){ g_object_unref(pulse_devout->application_context); pulse_devout->application_context = NULL; } /* unref audio */ if(pulse_devout->audio != NULL){ list = pulse_devout->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(pulse_devout->audio, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_pulse_devout_parent_class)->dispose(gobject); } void ags_pulse_devout_finalize(GObject *gobject) { AgsPulseDevout *pulse_devout; AgsMutexManager *mutex_manager; GList *list, *list_next; pulse_devout = AGS_PULSE_DEVOUT(gobject); /* remove pulse_devout mutex */ pthread_mutex_lock(pulse_devout->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(pulse_devout->application_mutex); /* free output buffer */ free(pulse_devout->buffer[0]); free(pulse_devout->buffer[1]); free(pulse_devout->buffer[2]); free(pulse_devout->buffer[3]); free(pulse_devout->buffer[4]); free(pulse_devout->buffer[5]); free(pulse_devout->buffer[6]); free(pulse_devout->buffer[7]); /* free buffer array */ free(pulse_devout->buffer); /* free AgsAttack */ free(pulse_devout->attack); /* unref notify soundcard */ if(pulse_devout->notify_soundcard != NULL){ if(pulse_devout->application_context != NULL){ ags_task_thread_remove_cyclic_task(AGS_APPLICATION_CONTEXT(pulse_devout->application_context)->task_thread, pulse_devout->notify_soundcard); } g_object_unref(pulse_devout->notify_soundcard); } /* application context */ if(pulse_devout->application_context != NULL){ g_object_unref(pulse_devout->application_context); } /* unref audio */ if(pulse_devout->audio != NULL){ list = pulse_devout->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(pulse_devout->audio, g_object_unref); } pthread_mutex_destroy(pulse_devout->mutex); free(pulse_devout->mutex); pthread_mutexattr_destroy(pulse_devout->mutexattr); free(pulse_devout->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_pulse_devout_parent_class)->finalize(gobject); } void ags_pulse_devout_connect(AgsConnectable *connectable) { AgsPulseDevout *pulse_devout; GList *list; pulse_devout = AGS_PULSE_DEVOUT(connectable); /* */ list = pulse_devout->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_pulse_devout_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_pulse_devout_switch_buffer_flag: * @pulse_devout: an #AgsPulseDevout * * The buffer flag indicates the currently played buffer. * * Since: 1.0.0 */ void ags_pulse_devout_switch_buffer_flag(AgsPulseDevout *pulse_devout) { if((AGS_PULSE_DEVOUT_BUFFER0 & (pulse_devout->flags)) != 0){ pulse_devout->flags &= (~AGS_PULSE_DEVOUT_BUFFER0); pulse_devout->flags |= AGS_PULSE_DEVOUT_BUFFER1; }else if((AGS_PULSE_DEVOUT_BUFFER1 & (pulse_devout->flags)) != 0){ pulse_devout->flags &= (~AGS_PULSE_DEVOUT_BUFFER1); pulse_devout->flags |= AGS_PULSE_DEVOUT_BUFFER2; }else if((AGS_PULSE_DEVOUT_BUFFER2 & (pulse_devout->flags)) != 0){ pulse_devout->flags &= (~AGS_PULSE_DEVOUT_BUFFER2); pulse_devout->flags |= AGS_PULSE_DEVOUT_BUFFER3; }else if((AGS_PULSE_DEVOUT_BUFFER3 & (pulse_devout->flags)) != 0){ pulse_devout->flags &= (~AGS_PULSE_DEVOUT_BUFFER3); pulse_devout->flags |= AGS_PULSE_DEVOUT_BUFFER4; }else if((AGS_PULSE_DEVOUT_BUFFER4 & (pulse_devout->flags)) != 0){ pulse_devout->flags &= (~AGS_PULSE_DEVOUT_BUFFER4); pulse_devout->flags |= AGS_PULSE_DEVOUT_BUFFER5; }else if((AGS_PULSE_DEVOUT_BUFFER5 & (pulse_devout->flags)) != 0){ pulse_devout->flags &= (~AGS_PULSE_DEVOUT_BUFFER5); pulse_devout->flags |= AGS_PULSE_DEVOUT_BUFFER6; }else if((AGS_PULSE_DEVOUT_BUFFER6 & (pulse_devout->flags)) != 0){ pulse_devout->flags &= (~AGS_PULSE_DEVOUT_BUFFER6); pulse_devout->flags |= AGS_PULSE_DEVOUT_BUFFER7; }else if((AGS_PULSE_DEVOUT_BUFFER7 & (pulse_devout->flags)) != 0){ pulse_devout->flags &= (~AGS_PULSE_DEVOUT_BUFFER7); pulse_devout->flags |= AGS_PULSE_DEVOUT_BUFFER0; } } void ags_pulse_devout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); pulse_devout->application_context = (GObject *) application_context; } AgsApplicationContext* ags_pulse_devout_get_application_context(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); return((AgsApplicationContext *) pulse_devout->application_context); } void ags_pulse_devout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); pulse_devout->application_mutex = application_mutex; } pthread_mutex_t* ags_pulse_devout_get_application_mutex(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); return(pulse_devout->application_mutex); } void ags_pulse_devout_set_device(AgsSoundcard *soundcard, gchar *device) { AgsPulseDevout *pulse_devout; GList *pulse_port, *pulse_port_start; gchar *str; int ret; guint nth_card; guint i; pulse_devout = AGS_PULSE_DEVOUT(soundcard); if(pulse_devout->card_uri == device || !g_ascii_strcasecmp(pulse_devout->card_uri, device)){ return; } if(!g_str_has_prefix(device, "ags-pulse-devout-")){ g_warning("invalid pulseaudio device prefix"); return; } ret = sscanf(device, "ags-pulse-devout-%u", &nth_card); if(ret != 1){ g_warning("invalid pulseaudio device specifier"); return; } if(pulse_devout->card_uri != NULL){ g_free(pulse_devout->card_uri); } pulse_devout->card_uri = g_strdup(device); /* apply name to port */ pulse_port_start = pulse_port = g_list_copy(pulse_devout->pulse_port); str = g_strdup_printf("ags-soundcard%d", nth_card); g_object_set(pulse_port->data, "port-name", str, NULL); g_free(str); g_list_free(pulse_port_start); } gchar* ags_pulse_devout_get_device(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); return(pulse_devout->card_uri); } void ags_pulse_devout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); g_object_set(pulse_devout, "pcm-channels", channels, "samplerate", rate, "buffer-size", buffer_size, "format", format, NULL); } void ags_pulse_devout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); if(channels != NULL){ *channels = pulse_devout->pcm_channels; } if(rate != NULL){ *rate = pulse_devout->samplerate; } if(buffer_size != NULL){ *buffer_size = pulse_devout->buffer_size; } if(format != NULL){ *format = pulse_devout->format; } } /** * ags_pulse_devout_list_cards: * @soundcard: the #AgsSoundcard * @card_id: pulseaudio identifier * @card_name: card name * * List available soundcards. * * Since: 1.0.0 */ void ags_pulse_devout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name) { AgsPulseDevout *pulse_devout; AgsApplicationContext *application_context; GList *list, *list_start; pthread_mutex_t *application_mutex; pulse_devout = AGS_PULSE_DEVOUT(soundcard); application_context = (AgsApplicationContext *) pulse_devout->application_context; if(application_context == NULL){ return; } application_mutex = pulse_devout->application_mutex; if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(AGS_IS_PULSE_DEVOUT(list->data)){ if(card_id != NULL){ if(AGS_PULSE_DEVOUT(list->data)->card_uri != NULL){ *card_id = g_list_prepend(*card_id, g_strdup(AGS_PULSE_DEVOUT(list->data)->card_uri)); }else{ *card_id = g_list_prepend(*card_id, g_strdup("(null)")); g_warning("ags_pulse_devout_list_cards() - card id (null)"); } } if(card_name != NULL){ if(AGS_PULSE_DEVOUT(list->data)->pulse_client != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(AGS_PULSE_CLIENT(AGS_PULSE_DEVOUT(list->data)->pulse_client)->name)); }else{ *card_name = g_list_prepend(*card_name, g_strdup("(null)")); g_warning("ags_pulse_devout_list_cards() - pulseaudio client not connected (null)"); } } } list = list->next; } pthread_mutex_unlock(application_mutex); if(card_id != NULL && *card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL && *card_name != NULL){ *card_name = g_list_reverse(*card_name); } } void ags_pulse_devout_pcm_info(AgsSoundcard *soundcard, char *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error) { if(channels_min != NULL){ *channels_min = 1; } if(channels_max != NULL){ *channels_max = 1024; } if(rate_min != NULL){ *rate_min = 8000; } if(rate_max != NULL){ *rate_max = 192000; } if(buffer_size_min != NULL){ *buffer_size_min = 64; } if(buffer_size_max != NULL){ *buffer_size_max = 8192; } } gboolean ags_pulse_devout_is_starting(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); return((((AGS_PULSE_DEVOUT_START_PLAY & (pulse_devout->flags)) != 0) ? TRUE: FALSE)); } gboolean ags_pulse_devout_is_playing(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); return((((AGS_PULSE_DEVOUT_PLAY & (pulse_devout->flags)) != 0) ? TRUE: FALSE)); } gchar* ags_pulse_devout_get_uptime(AgsSoundcard *soundcard) { gchar *uptime; if(ags_soundcard_is_playing(soundcard)){ guint samplerate; guint buffer_size; guint note_offset; gdouble bpm; gdouble delay_factor; gdouble delay; ags_soundcard_get_presets(soundcard, NULL, &samplerate, &buffer_size, NULL); note_offset = ags_soundcard_get_note_offset_absolute(soundcard); bpm = ags_soundcard_get_bpm(soundcard); delay_factor = ags_soundcard_get_delay_factor(soundcard); /* calculate delays */ delay = ags_soundcard_get_absolute_delay(soundcard); uptime = ags_time_get_uptime_from_offset(note_offset, bpm, delay, delay_factor); }else{ uptime = g_strdup(AGS_TIME_ZERO); } return(uptime); } void ags_pulse_devout_port_init(AgsSoundcard *soundcard, GError **error) { AgsPulseDevout *pulse_devout; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint format, word_size; pthread_mutex_t *mutex; pulse_devout = AGS_PULSE_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_devout); pthread_mutex_unlock(application_context->mutex); /* retrieve word size */ pthread_mutex_lock(mutex); switch(pulse_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_pulse_devout_port_init(): unsupported word size"); return; } /* prepare for playback */ pulse_devout->flags |= (AGS_PULSE_DEVOUT_BUFFER7 | AGS_PULSE_DEVOUT_START_PLAY | AGS_PULSE_DEVOUT_PLAY | AGS_PULSE_DEVOUT_NONBLOCKING); memset(pulse_devout->buffer[0], 0, pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[1], 0, pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[2], 0, pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[3], 0, pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[4], 0, pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[5], 0, pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[6], 0, pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[7], 0, pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); /* */ pulse_devout->tact_counter = 0.0; pulse_devout->delay_counter = 0.0; pulse_devout->tic_counter = 0; pulse_devout->flags |= (AGS_PULSE_DEVOUT_INITIALIZED | AGS_PULSE_DEVOUT_START_PLAY | AGS_PULSE_DEVOUT_PLAY); g_atomic_int_and(&(pulse_devout->sync_flags), (~(AGS_PULSE_DEVOUT_PASS_THROUGH))); g_atomic_int_or(&(pulse_devout->sync_flags), AGS_PULSE_DEVOUT_INITIAL_CALLBACK); pthread_mutex_unlock(mutex); } void ags_pulse_devout_port_play(AgsSoundcard *soundcard, GError **error) { AgsPulseClient *pulse_client; AgsPulseDevout *pulse_devout; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; guint word_size; gboolean pulse_client_activated; pthread_mutex_t *mutex; pthread_mutex_t *client_mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; pulse_devout = AGS_PULSE_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* mutices */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); task_thread = (AgsTaskThread *) application_context->task_thread; mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_devout); pthread_mutex_unlock(application_context->mutex); /* client */ pthread_mutex_lock(mutex); pulse_client = (AgsPulseClient *) pulse_devout->pulse_client; callback_mutex = pulse_devout->callback_mutex; callback_finish_mutex = pulse_devout->callback_finish_mutex; /* do playback */ pulse_devout->flags &= (~AGS_PULSE_DEVOUT_START_PLAY); notify_soundcard = AGS_NOTIFY_SOUNDCARD(pulse_devout->notify_soundcard); if((AGS_PULSE_DEVOUT_INITIALIZED & (pulse_devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } switch(pulse_devout->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_pulse_devout_port_play(): unsupported word size"); return; } pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_context->mutex); client_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_client); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(client_mutex); pulse_client_activated = ((AGS_PULSE_CLIENT_ACTIVATED & (pulse_client->flags)) != 0) ? TRUE: FALSE; pthread_mutex_unlock(client_mutex); if(pulse_client_activated){ /* signal */ if((AGS_PULSE_DEVOUT_INITIAL_CALLBACK & (g_atomic_int_get(&(pulse_devout->sync_flags)))) == 0){ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(pulse_devout->sync_flags), AGS_PULSE_DEVOUT_CALLBACK_DONE); if((AGS_PULSE_DEVOUT_CALLBACK_WAIT & (g_atomic_int_get(&(pulse_devout->sync_flags)))) != 0){ pthread_cond_signal(pulse_devout->callback_cond); } pthread_mutex_unlock(callback_mutex); } /* wait callback */ if((AGS_PULSE_DEVOUT_INITIAL_CALLBACK & (g_atomic_int_get(&(pulse_devout->sync_flags)))) == 0){ pthread_mutex_lock(callback_finish_mutex); if((AGS_PULSE_DEVOUT_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(pulse_devout->sync_flags)))) == 0){ g_atomic_int_or(&(pulse_devout->sync_flags), AGS_PULSE_DEVOUT_CALLBACK_FINISH_WAIT); while((AGS_PULSE_DEVOUT_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(pulse_devout->sync_flags)))) == 0 && (AGS_PULSE_DEVOUT_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(pulse_devout->sync_flags)))) != 0){ pthread_cond_wait(pulse_devout->callback_finish_cond, callback_finish_mutex); } } g_atomic_int_and(&(pulse_devout->sync_flags), (~(AGS_PULSE_DEVOUT_CALLBACK_FINISH_WAIT | AGS_PULSE_DEVOUT_CALLBACK_FINISH_DONE))); pthread_mutex_unlock(callback_finish_mutex); }else{ g_atomic_int_and(&(pulse_devout->sync_flags), (~AGS_PULSE_DEVOUT_INITIAL_CALLBACK)); } } /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); if(task_thread != NULL){ AgsTicDevice *tic_device; AgsClearBuffer *clear_buffer; AgsSwitchBufferFlag *switch_buffer_flag; GList *task; task = NULL; /* tic soundcard */ tic_device = ags_tic_device_new((GObject *) pulse_devout); task = g_list_append(task, tic_device); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) pulse_devout); task = g_list_append(task, clear_buffer); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) pulse_devout); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); }else{ guint nth_buffer; /* get buffer */ if((AGS_PULSE_DEVOUT_BUFFER0 & (pulse_devout->flags)) != 0){ nth_buffer = 7; }else if((AGS_PULSE_DEVOUT_BUFFER1 & (pulse_devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_PULSE_DEVOUT_BUFFER2 & (pulse_devout->flags)) != 0){ nth_buffer = 1; }else if((AGS_PULSE_DEVOUT_BUFFER3 & (pulse_devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_PULSE_DEVOUT_BUFFER4 & (pulse_devout->flags)) != 0){ nth_buffer = 3; }else if((AGS_PULSE_DEVOUT_BUFFER5 & (pulse_devout->flags)) != 0){ nth_buffer = 4; }else if((AGS_PULSE_DEVOUT_BUFFER6 & (pulse_devout->flags)) != 0){ nth_buffer = 5; }else if((AGS_PULSE_DEVOUT_BUFFER7 & (pulse_devout->flags)) != 0){ nth_buffer = 6; } /* tic */ ags_soundcard_tic(AGS_SOUNDCARD(pulse_devout)); switch(pulse_devout->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: g_warning("ags_pulse_devout_port_play(): unsupported word size"); return; } memset(pulse_devout->buffer[nth_buffer], 0, (size_t) pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); /* reset - switch buffer flags */ ags_pulse_devout_switch_buffer_flag(pulse_devout); } } void ags_pulse_devout_port_free(AgsSoundcard *soundcard) { AgsPulsePort *pulse_port; AgsPulseDevout *pulse_devout; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint word_size; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; pulse_devout = AGS_PULSE_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_devout); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); notify_soundcard = AGS_NOTIFY_SOUNDCARD(pulse_devout->notify_soundcard); if((AGS_PULSE_DEVOUT_INITIALIZED & (pulse_devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } g_object_ref(notify_soundcard); callback_mutex = pulse_devout->callback_mutex; callback_finish_mutex = pulse_devout->callback_finish_mutex; // g_atomic_int_or(&(AGS_THREAD(application_context->main_loop)->flags), // AGS_THREAD_TIMING); pulse_devout->flags &= (~(AGS_PULSE_DEVOUT_BUFFER0 | AGS_PULSE_DEVOUT_BUFFER1 | AGS_PULSE_DEVOUT_BUFFER2 | AGS_PULSE_DEVOUT_BUFFER3 | AGS_PULSE_DEVOUT_BUFFER4 | AGS_PULSE_DEVOUT_BUFFER5 | AGS_PULSE_DEVOUT_BUFFER6 | AGS_PULSE_DEVOUT_BUFFER7 | AGS_PULSE_DEVOUT_PLAY)); g_atomic_int_or(&(pulse_devout->sync_flags), AGS_PULSE_DEVOUT_PASS_THROUGH); g_atomic_int_and(&(pulse_devout->sync_flags), (~AGS_PULSE_DEVOUT_INITIAL_CALLBACK)); /* signal callback */ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(pulse_devout->sync_flags), AGS_PULSE_DEVOUT_CALLBACK_DONE); if((AGS_PULSE_DEVOUT_CALLBACK_WAIT & (g_atomic_int_get(&(pulse_devout->sync_flags)))) != 0){ pthread_cond_signal(pulse_devout->callback_cond); } pthread_mutex_unlock(callback_mutex); /* signal thread */ pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(pulse_devout->sync_flags), AGS_PULSE_DEVOUT_CALLBACK_FINISH_DONE); if((AGS_PULSE_DEVOUT_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(pulse_devout->sync_flags)))) != 0){ pthread_cond_signal(pulse_devout->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); g_object_unref(notify_soundcard); /* */ pulse_devout->note_offset = 0; pulse_devout->note_offset_absolute = 0; switch(pulse_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: word_size = 0; g_critical("ags_pulse_devout_free(): unsupported word size"); } pthread_mutex_unlock(mutex); if(pulse_devout->pulse_port != NULL){ pulse_port = pulse_devout->pulse_port->data; while(!g_atomic_int_get(&(pulse_port->is_empty))) usleep(500000); } pthread_mutex_lock(mutex); memset(pulse_devout->buffer[0], 0, (size_t) pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[1], 0, (size_t) pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[2], 0, (size_t) pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[3], 0, (size_t) pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[4], 0, (size_t) pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[5], 0, (size_t) pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[6], 0, (size_t) pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); memset(pulse_devout->buffer[7], 0, (size_t) pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); pthread_mutex_unlock(mutex); } void ags_pulse_devout_tic(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; gdouble delay; pulse_devout = AGS_PULSE_DEVOUT(soundcard); /* determine if attack should be switched */ delay = pulse_devout->delay[pulse_devout->tic_counter]; if((guint) pulse_devout->delay_counter + 1 >= (guint) delay){ if(pulse_devout->do_loop && pulse_devout->note_offset + 1 == pulse_devout->loop_right){ ags_soundcard_set_note_offset(soundcard, pulse_devout->loop_left); }else{ ags_soundcard_set_note_offset(soundcard, pulse_devout->note_offset + 1); } ags_soundcard_set_note_offset_absolute(soundcard, pulse_devout->note_offset_absolute + 1); /* delay */ ags_soundcard_offset_changed(soundcard, pulse_devout->note_offset); /* reset - delay counter */ pulse_devout->delay_counter = 0.0; pulse_devout->tact_counter += 1.0; }else{ pulse_devout->delay_counter += 1.0; } } void ags_pulse_devout_offset_changed(AgsSoundcard *soundcard, guint note_offset) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); pulse_devout->tic_counter += 1; if(pulse_devout->tic_counter == AGS_SOUNDCARD_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ pulse_devout->tic_counter = 0; } } void ags_pulse_devout_set_bpm(AgsSoundcard *soundcard, gdouble bpm) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); pulse_devout->bpm = bpm; ags_pulse_devout_adjust_delay_and_attack(pulse_devout); } gdouble ags_pulse_devout_get_bpm(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); return(pulse_devout->bpm); } void ags_pulse_devout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); pulse_devout->delay_factor = delay_factor; ags_pulse_devout_adjust_delay_and_attack(pulse_devout); } gdouble ags_pulse_devout_get_delay_factor(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); return(pulse_devout->delay_factor); } gdouble ags_pulse_devout_get_absolute_delay(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); return((60.0 * (((gdouble) pulse_devout->samplerate / (gdouble) pulse_devout->buffer_size) / (gdouble) pulse_devout->bpm) * ((1.0 / 16.0) * (1.0 / (gdouble) pulse_devout->delay_factor)))); } gdouble ags_pulse_devout_get_delay(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; guint index; pulse_devout = AGS_PULSE_DEVOUT(soundcard); index = pulse_devout->tic_counter; return(pulse_devout->delay[index]); } guint ags_pulse_devout_get_attack(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; guint index; pulse_devout = AGS_PULSE_DEVOUT(soundcard); index = pulse_devout->tic_counter; return(pulse_devout->attack[index]); } void* ags_pulse_devout_get_buffer(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; void *buffer; pulse_devout = AGS_PULSE_DEVOUT(soundcard); if((AGS_PULSE_DEVOUT_BUFFER0 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[0]; }else if((AGS_PULSE_DEVOUT_BUFFER1 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[1]; }else if((AGS_PULSE_DEVOUT_BUFFER2 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[2]; }else if((AGS_PULSE_DEVOUT_BUFFER3 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[3]; }else if((AGS_PULSE_DEVOUT_BUFFER4 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[4]; }else if((AGS_PULSE_DEVOUT_BUFFER5 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[5]; }else if((AGS_PULSE_DEVOUT_BUFFER6 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[6]; }else if((AGS_PULSE_DEVOUT_BUFFER7 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[7]; }else{ buffer = NULL; } return(buffer); } void* ags_pulse_devout_get_next_buffer(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; void *buffer; pulse_devout = AGS_PULSE_DEVOUT(soundcard); if((AGS_PULSE_DEVOUT_BUFFER0 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[1]; }else if((AGS_PULSE_DEVOUT_BUFFER1 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[2]; }else if((AGS_PULSE_DEVOUT_BUFFER2 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[3]; }else if((AGS_PULSE_DEVOUT_BUFFER3 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[4]; }else if((AGS_PULSE_DEVOUT_BUFFER4 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[5]; }else if((AGS_PULSE_DEVOUT_BUFFER5 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[6]; }else if((AGS_PULSE_DEVOUT_BUFFER6 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[7]; }else if((AGS_PULSE_DEVOUT_BUFFER7 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[0]; }else{ buffer = NULL; } return(buffer); } void* ags_pulse_devout_get_prev_buffer(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; void *buffer; pulse_devout = AGS_PULSE_DEVOUT(soundcard); if((AGS_PULSE_DEVOUT_BUFFER0 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[7]; }else if((AGS_PULSE_DEVOUT_BUFFER1 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[0]; }else if((AGS_PULSE_DEVOUT_BUFFER2 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[1]; }else if((AGS_PULSE_DEVOUT_BUFFER3 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[2]; }else if((AGS_PULSE_DEVOUT_BUFFER4 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[3]; }else if((AGS_PULSE_DEVOUT_BUFFER5 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[4]; }else if((AGS_PULSE_DEVOUT_BUFFER6 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[5]; }else if((AGS_PULSE_DEVOUT_BUFFER7 & (pulse_devout->flags)) != 0){ buffer = pulse_devout->buffer[6]; }else{ buffer = NULL; } return(buffer); } guint ags_pulse_devout_get_delay_counter(AgsSoundcard *soundcard) { return(AGS_PULSE_DEVOUT(soundcard)->delay_counter); } void ags_pulse_devout_set_note_offset(AgsSoundcard *soundcard, guint note_offset) { AGS_PULSE_DEVOUT(soundcard)->note_offset = note_offset; } guint ags_pulse_devout_get_note_offset(AgsSoundcard *soundcard) { return(AGS_PULSE_DEVOUT(soundcard)->note_offset); } void ags_pulse_devout_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset) { AGS_PULSE_DEVOUT(soundcard)->note_offset_absolute = note_offset; } guint ags_pulse_devout_get_note_offset_absolute(AgsSoundcard *soundcard) { return(AGS_PULSE_DEVOUT(soundcard)->note_offset_absolute); } void ags_pulse_devout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop) { AGS_PULSE_DEVOUT(soundcard)->loop_left = loop_left; AGS_PULSE_DEVOUT(soundcard)->loop_right = loop_right; AGS_PULSE_DEVOUT(soundcard)->do_loop = do_loop; if(do_loop){ AGS_PULSE_DEVOUT(soundcard)->loop_offset = AGS_PULSE_DEVOUT(soundcard)->note_offset; } } void ags_pulse_devout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop) { if(loop_left != NULL){ *loop_left = AGS_PULSE_DEVOUT(soundcard)->loop_left; } if(loop_right != NULL){ *loop_right = AGS_PULSE_DEVOUT(soundcard)->loop_right; } if(do_loop != NULL){ *do_loop = AGS_PULSE_DEVOUT(soundcard)->do_loop; } } guint ags_pulse_devout_get_loop_offset(AgsSoundcard *soundcard) { return(AGS_PULSE_DEVOUT(soundcard)->loop_offset); } void ags_pulse_devout_set_audio(AgsSoundcard *soundcard, GList *audio) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); pulse_devout->audio = audio; } GList* ags_pulse_devout_get_audio(AgsSoundcard *soundcard) { AgsPulseDevout *pulse_devout; pulse_devout = AGS_PULSE_DEVOUT(soundcard); return(pulse_devout->audio); } /** * ags_pulse_devout_adjust_delay_and_attack: * @pulse_devout: the #AgsPulseDevout * * Calculate delay and attack and reset it. * * Since: 1.0.0 */ void ags_pulse_devout_adjust_delay_and_attack(AgsPulseDevout *pulse_devout) { gdouble delay; guint default_tact_frames; guint delay_tact_frames; guint default_period; gint next_attack; guint i; if(pulse_devout == NULL){ return; } delay = ags_pulse_devout_get_absolute_delay(AGS_SOUNDCARD(pulse_devout)); #ifdef AGS_DEBUG g_message("delay : %f", delay); #endif default_tact_frames = (guint) (delay * pulse_devout->buffer_size); delay_tact_frames = (guint) (floor(delay) * pulse_devout->buffer_size); default_period = (1.0 / AGS_SOUNDCARD_DEFAULT_PERIOD) * (default_tact_frames); i = 0; pulse_devout->attack[0] = (guint) floor(0.25 * pulse_devout->buffer_size); next_attack = (((pulse_devout->attack[i] + default_tact_frames) / pulse_devout->buffer_size) - delay) * pulse_devout->buffer_size; if(next_attack < 0){ next_attack = 0; } if(next_attack >= pulse_devout->buffer_size){ next_attack = pulse_devout->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ pulse_devout->attack[i] = pulse_devout->attack[i] - ((gdouble) next_attack / 2.0); if(pulse_devout->attack[i] < 0){ pulse_devout->attack[i] = 0; } if(pulse_devout->attack[i] >= pulse_devout->buffer_size){ pulse_devout->attack[i] = pulse_devout->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= pulse_devout->buffer_size){ next_attack = pulse_devout->buffer_size - 1; } } for(i = 1; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD; i++){ pulse_devout->attack[i] = next_attack; next_attack = (((pulse_devout->attack[i] + default_tact_frames) / pulse_devout->buffer_size) - delay) * pulse_devout->buffer_size; if(next_attack >= pulse_devout->buffer_size){ next_attack = pulse_devout->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ pulse_devout->attack[i] = pulse_devout->attack[i] - ((gdouble) next_attack / 2.0); if(pulse_devout->attack[i] < 0){ pulse_devout->attack[i] = 0; } if(pulse_devout->attack[i] >= pulse_devout->buffer_size){ pulse_devout->attack[i] = pulse_devout->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= pulse_devout->buffer_size){ next_attack = pulse_devout->buffer_size - 1; } } #ifdef AGS_DEBUG g_message("%d", pulse_devout->attack[i]); #endif } pulse_devout->attack[0] = pulse_devout->attack[i - 2]; for(i = 0; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD - 1; i++){ pulse_devout->delay[i] = ((gdouble) (default_tact_frames + pulse_devout->attack[i] - pulse_devout->attack[i + 1])) / (gdouble) pulse_devout->buffer_size; #ifdef AGS_DEBUG g_message("%f", pulse_devout->delay[i]); #endif } pulse_devout->delay[i] = ((gdouble) (default_tact_frames + pulse_devout->attack[i] - pulse_devout->attack[0])) / (gdouble) pulse_devout->buffer_size; } /** * ags_pulse_devout_realloc_buffer: * @pulse_devout: the #AgsPulseDevout * * Reallocate the internal audio buffer. * * Since: 1.0.0 */ void ags_pulse_devout_realloc_buffer(AgsPulseDevout *pulse_devout) { guint word_size; if(pulse_devout == NULL){ return; } switch(pulse_devout->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: g_warning("ags_pulse_devout_realloc_buffer(): unsupported word size"); return; } /* AGS_PULSE_DEVOUT_BUFFER_0 */ if(pulse_devout->buffer[0] != NULL){ free(pulse_devout->buffer[0]); } pulse_devout->buffer[0] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); /* AGS_PULSE_DEVOUT_BUFFER_1 */ if(pulse_devout->buffer[1] != NULL){ free(pulse_devout->buffer[1]); } pulse_devout->buffer[1] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); /* AGS_PULSE_DEVOUT_BUFFER_2 */ if(pulse_devout->buffer[2] != NULL){ free(pulse_devout->buffer[2]); } pulse_devout->buffer[2] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); /* AGS_PULSE_DEVOUT_BUFFER_3 */ if(pulse_devout->buffer[3] != NULL){ free(pulse_devout->buffer[3]); } pulse_devout->buffer[3] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); /* AGS_PULSE_DEVOUT_BUFFER_4 */ if(pulse_devout->buffer[4] != NULL){ free(pulse_devout->buffer[4]); } pulse_devout->buffer[4] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); /* AGS_PULSE_DEVOUT_BUFFER_5 */ if(pulse_devout->buffer[5] != NULL){ free(pulse_devout->buffer[5]); } pulse_devout->buffer[5] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); /* AGS_PULSE_DEVOUT_BUFFER_6 */ if(pulse_devout->buffer[6] != NULL){ free(pulse_devout->buffer[6]); } pulse_devout->buffer[6] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); /* AGS_PULSE_DEVOUT_BUFFER_7 */ if(pulse_devout->buffer[7] != NULL){ free(pulse_devout->buffer[7]); } pulse_devout->buffer[7] = (void *) malloc(pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size); } /** * ags_pulse_devout_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsPulseDevout, refering to @application_context. * * Returns: a new #AgsPulseDevout * * Since: 1.0.0 */ AgsPulseDevout* ags_pulse_devout_new(GObject *application_context) { AgsPulseDevout *pulse_devout; pulse_devout = (AgsPulseDevout *) g_object_new(AGS_TYPE_PULSE_DEVOUT, "application-context", application_context, NULL); return(pulse_devout); } gsequencer-1.4.24/ags/audio/pulse/ags_pulse_client.h0000644000175000017500000000671013246707333017374 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PULSE_CLIENT_H__ #define __AGS_PULSE_CLIENT_H__ #include #include #include #ifdef AGS_WITH_PULSE #include #include #include #endif #define AGS_TYPE_PULSE_CLIENT (ags_pulse_client_get_type()) #define AGS_PULSE_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PULSE_CLIENT, AgsPulseClient)) #define AGS_PULSE_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PULSE_CLIENT, AgsPulseClient)) #define AGS_IS_PULSE_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PULSE_CLIENT)) #define AGS_IS_PULSE_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PULSE_CLIENT)) #define AGS_PULSE_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_PULSE_CLIENT, AgsPulseClientClass)) typedef struct _AgsPulseClient AgsPulseClient; typedef struct _AgsPulseClientClass AgsPulseClientClass; /** * AgsPulseClientFlags: * @AGS_PULSE_CLIENT_CONNECTED: indicates the client was connected by calling #AgsConnectable::connect() * @AGS_PULSE_CLIENT_ACTIVATED: the client was activated * @AGS_PULSE_CLIENT_READY: the client is ready * * Enum values to control the behavior or indicate internal state of #AgsPulseClient by * enable/disable as flags. */ typedef enum{ AGS_PULSE_CLIENT_CONNECTED = 1, AGS_PULSE_CLIENT_ACTIVATED = 1 << 1, AGS_PULSE_CLIENT_READY = 1 << 2, }AgsPulseClientFlags; struct _AgsPulseClient { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; GObject *pulse_server; gchar *uuid; gchar *name; #ifdef AGS_WITH_PULSE pa_context *context; #else gpointer context; #endif GList *device; GList *port; }; struct _AgsPulseClientClass { GObjectClass object; }; GType ags_pulse_client_get_type(); GList* ags_pulse_client_find_uuid(GList *pulse_client, gchar *client_uuid); GList* ags_pulse_client_find(GList *pulse_client, gchar *client_name); void ags_pulse_client_open(AgsPulseClient *pulse_client, gchar *client_name); void ags_pulse_client_add_device(AgsPulseClient *pulse_client, GObject *pulse_device); void ags_pulse_client_remove_device(AgsPulseClient *pulse_client, GObject *pulse_device); void ags_pulse_client_add_port(AgsPulseClient *pulse_client, GObject *pulse_port); void ags_pulse_client_remove_port(AgsPulseClient *pulse_client, GObject *pulse_port); void ags_pulse_client_activate(AgsPulseClient *pulse_client); void ags_pulse_client_deactivate(AgsPulseClient *pulse_client); AgsPulseClient* ags_pulse_client_new(GObject *pulse_server); #endif /*__AGS_PULSE_CLIENT_H__*/ gsequencer-1.4.24/ags/audio/pulse/ags_pulse_port.c0000644000175000017500000012512513256223112017064 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_pulse_port_class_init(AgsPulsePortClass *pulse_port); void ags_pulse_port_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pulse_port_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager); void ags_pulse_port_init(AgsPulsePort *pulse_port); void ags_pulse_port_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_pulse_port_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_pulse_port_connect(AgsConnectable *connectable); void ags_pulse_port_disconnect(AgsConnectable *connectable); void ags_pulse_port_dispose(GObject *gobject); void ags_pulse_port_finalize(GObject *gobject); #ifdef AGS_WITH_PULSE void ags_pulse_port_stream_request_callback(pa_stream *stream, size_t length, AgsPulsePort *pulse_port); void ags_pulse_port_stream_underflow_callback(pa_stream *stream, AgsPulsePort *pulse_port); #endif /** * SECTION:ags_pulse_port * @short_description: pulseaudio resource. * @title: AgsPulsePort * @section_id: * @include: ags/audio/pulse/ags_pulse_port.h * * The #AgsPulsePort represents either a pulseaudio sequencer or soundcard to communicate * with. */ enum{ PROP_0, PROP_PULSE_CLIENT, PROP_PULSE_DEVOUT, PROP_PULSE_DEVIN, PROP_PORT_NAME, }; static gpointer ags_pulse_port_parent_class = NULL; const int ags_pulse_port_endian_i = 1; #define is_bigendian() ( (*(char*)&ags_pulse_port_endian_i) == 0 ) GType ags_pulse_port_get_type() { static GType ags_type_pulse_port = 0; if(!ags_type_pulse_port){ static const GTypeInfo ags_pulse_port_info = { sizeof (AgsPulsePortClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pulse_port_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPulsePort), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pulse_port_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pulse_port_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pulse_port = g_type_register_static(G_TYPE_OBJECT, "AgsPulsePort", &ags_pulse_port_info, 0); g_type_add_interface_static(ags_type_pulse_port, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_pulse_port); } void ags_pulse_port_class_init(AgsPulsePortClass *pulse_port) { GObjectClass *gobject; GParamSpec *param_spec; ags_pulse_port_parent_class = g_type_class_peek_parent(pulse_port); /* GObjectClass */ gobject = (GObjectClass *) pulse_port; gobject->set_property = ags_pulse_port_set_property; gobject->get_property = ags_pulse_port_get_property; gobject->dispose = ags_pulse_port_dispose; gobject->finalize = ags_pulse_port_finalize; /* properties */ /** * AgsPulsePort:pulse-client: * * The assigned #AgsPulseClient. * * Since: 1.0.0 */ param_spec = g_param_spec_object("pulse-client", i18n_pspec("assigned pulseaudio client"), i18n_pspec("The assigned pulseaudio client"), AGS_TYPE_PULSE_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PULSE_CLIENT, param_spec); /** * AgsPulsePort:pulse-devout: * * The assigned #AgsPulseDevout. * * Since: 1.0.0 */ param_spec = g_param_spec_object("pulse-devout", i18n_pspec("assigned pulseaudio devout"), i18n_pspec("The assigned pulseaudio devout"), AGS_TYPE_PULSE_DEVOUT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PULSE_DEVOUT, param_spec); /** * AgsPulsePort:pulse-devin: * * The assigned #AgsPulseDevout. * * Since: 1.2.0 */ param_spec = g_param_spec_object("pulse-devin", i18n_pspec("assigned pulseaudio devin"), i18n_pspec("The assigned pulseaudio devin"), AGS_TYPE_PULSE_DEVIN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PULSE_DEVIN, param_spec); /** * AgsPulsePort:port-name: * * The pulse soundcard indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("port-name", i18n_pspec("port name"), i18n_pspec("The port name"), "hw:0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT_NAME, param_spec); } void ags_pulse_port_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_pulse_port_connect; connectable->disconnect = ags_pulse_port_disconnect; } void ags_pulse_port_init(AgsPulsePort *pulse_port) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; guint samplerate; guint pcm_channels; guint buffer_size; guint format; guint word_size; guint fixed_size; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert port mutex */ pulse_port->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); pulse_port->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) pulse_port, mutex); pthread_mutex_unlock(application_mutex); /* flags */ pulse_port->flags = 0; /* */ pulse_port->pulse_client = NULL; pulse_port->pulse_devout = NULL; pulse_port->pulse_devin = NULL; pulse_port->uuid = ags_id_generator_create_uuid(); pulse_port->name = NULL; pulse_port->stream = NULL; /* read config */ config = ags_config_get_instance(); samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; format = AGS_SOUNDCARD_DEFAULT_FORMAT; /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ format = g_ascii_strtoull(str, NULL, 10); free(str); } pulse_port->buffer_size = buffer_size; pulse_port->format = format; pulse_port->pcm_channels = pcm_channels; #ifdef AGS_WITH_PULSE pulse_port->sample_spec = (pa_sample_spec *) malloc(sizeof(pa_sample_spec)); pulse_port->sample_spec->rate = samplerate; pulse_port->sample_spec->channels = pcm_channels; #else pulse_port->sample_spec = NULL; #endif switch(format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { #ifdef AGS_WITH_PULSE if(is_bigendian()){ pulse_port->sample_spec->format = PA_SAMPLE_S16BE; }else{ pulse_port->sample_spec->format = PA_SAMPLE_S16LE; } #endif word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { #ifdef AGS_WITH_PULSE if(is_bigendian()){ pulse_port->sample_spec->format = PA_SAMPLE_S24_32BE; }else{ pulse_port->sample_spec->format = PA_SAMPLE_S24_32LE; } #endif word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { #ifdef AGS_WITH_PULSE if(is_bigendian()){ pulse_port->sample_spec->format = PA_SAMPLE_S32BE; }else{ pulse_port->sample_spec->format = PA_SAMPLE_S32LE; } #endif word_size = sizeof(signed long); } break; default: g_warning("pulse devout/devin - unsupported format"); } fixed_size = pcm_channels * buffer_size * word_size; #ifdef AGS_WITH_PULSE pulse_port->buffer_attr = (pa_buffer_attr *) malloc(sizeof(pa_buffer_attr)); pulse_port->buffer_attr->fragsize = (uint32_t) -1; pulse_port->buffer_attr->maxlength = (uint32_t) -1; pulse_port->buffer_attr->minreq = (uint32_t) fixed_size; pulse_port->buffer_attr->prebuf = (uint32_t) 0; pulse_port->buffer_attr->tlength = (uint32_t) fixed_size; #else pulse_port->buffer_attr = NULL; #endif pulse_port->empty_buffer = ags_stream_alloc(8 * pcm_channels * buffer_size, AGS_SOUNDCARD_DEFAULT_FORMAT); g_atomic_int_set(&(pulse_port->is_empty), TRUE); g_atomic_int_set(&(pulse_port->underflow), 0); g_atomic_int_set(&(pulse_port->restart), FALSE); pulse_port->nth_empty_buffer = 0; g_atomic_int_set(&(pulse_port->queued), 0); } void ags_pulse_port_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPulsePort *pulse_port; pulse_port = AGS_PULSE_PORT(gobject); switch(prop_id){ case PROP_PULSE_CLIENT: { AgsPulseClient *pulse_client; pulse_client = (AgsPulseClient *) g_value_get_object(value); if(pulse_port->pulse_client == (GObject *) pulse_client){ return; } if(pulse_port->pulse_client != NULL){ g_object_unref(pulse_port->pulse_client); } if(pulse_client != NULL){ g_object_ref(pulse_client); } pulse_port->pulse_client = (GObject *) pulse_client; } break; case PROP_PULSE_DEVOUT: { AgsPulseDevout *pulse_devout; pulse_devout = (AgsPulseDevout *) g_value_get_object(value); if(pulse_port->pulse_devout == (GObject *) pulse_devout){ return; } if(pulse_port->pulse_devout != NULL){ g_object_unref(pulse_port->pulse_devout); } if(pulse_devout != NULL){ g_object_ref(pulse_devout); } pulse_port->pulse_devout = (GObject *) pulse_devout; } break; case PROP_PULSE_DEVIN: { AgsPulseDevin *pulse_devin; pulse_devin = (AgsPulseDevin *) g_value_get_object(value); if(pulse_port->pulse_devin == (GObject *) pulse_devin){ return; } if(pulse_port->pulse_devin != NULL){ g_object_unref(pulse_port->pulse_devin); } if(pulse_devin != NULL){ g_object_ref(pulse_devin); } pulse_port->pulse_devin = (GObject *) pulse_devin; } break; case PROP_PORT_NAME: { gchar *port_name; port_name = g_value_get_string(value); if(pulse_port->name == port_name || !g_ascii_strcasecmp(pulse_port->name, port_name)){ return; } if(pulse_port->name != NULL){ g_free(pulse_port->name); } pulse_port->name = port_name; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_port_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPulsePort *pulse_port; pulse_port = AGS_PULSE_PORT(gobject); switch(prop_id){ case PROP_PULSE_CLIENT: { g_value_set_object(value, pulse_port->pulse_client); } break; case PROP_PULSE_DEVOUT: { g_value_set_object(value, pulse_port->pulse_devout); } break; case PROP_PULSE_DEVIN: { g_value_set_object(value, pulse_port->pulse_devin); } break; case PROP_PORT_NAME: { g_value_set_string(value, pulse_port->name); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_port_connect(AgsConnectable *connectable) { AgsPulsePort *pulse_port; pulse_port = AGS_PULSE_PORT(connectable); if((AGS_PULSE_PORT_CONNECTED & (pulse_port->flags)) != 0){ return; } pulse_port->flags |= AGS_PULSE_PORT_CONNECTED; } void ags_pulse_port_disconnect(AgsConnectable *connectable) { AgsPulsePort *pulse_port; pulse_port = AGS_PULSE_PORT(connectable); if((AGS_PULSE_PORT_CONNECTED & (pulse_port->flags)) == 0){ return; } pulse_port->flags &= (~AGS_PULSE_PORT_CONNECTED); } void ags_pulse_port_dispose(GObject *gobject) { AgsPulsePort *pulse_port; pulse_port = AGS_PULSE_PORT(gobject); /* pulse client */ if(pulse_port->pulse_client != NULL){ g_object_unref(pulse_port->pulse_client); pulse_port->pulse_client = NULL; } /* pulse devout */ if(pulse_port->pulse_devout != NULL){ g_object_unref(pulse_port->pulse_devout); pulse_port->pulse_devout = NULL; } /* pulse devin */ if(pulse_port->pulse_devin != NULL){ g_object_unref(pulse_port->pulse_devin); pulse_port->pulse_devin = NULL; } /* name */ g_free(pulse_port->name); /* call parent */ G_OBJECT_CLASS(ags_pulse_port_parent_class)->dispose(gobject); } void ags_pulse_port_finalize(GObject *gobject) { AgsPulsePort *pulse_port; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pulse_port = AGS_PULSE_PORT(gobject); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* pulse client */ if(pulse_port->pulse_client != NULL){ g_object_unref(pulse_port->pulse_client); } /* pulse devout */ if(pulse_port->pulse_devout != NULL){ g_object_unref(pulse_port->pulse_devout); } /* pulse devin */ if(pulse_port->pulse_devin != NULL){ g_object_unref(pulse_port->pulse_devin); } /* name */ g_free(pulse_port->name); if(pulse_port->sample_spec != NULL){ free(pulse_port->sample_spec); } if(pulse_port->buffer_attr != NULL){ free(pulse_port->buffer_attr); } pthread_mutex_destroy(pulse_port->mutex); free(pulse_port->mutex); pthread_mutexattr_destroy(pulse_port->mutexattr); free(pulse_port->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_pulse_port_parent_class)->finalize(gobject); } /** * ags_pulse_port_find: * @pulse_port: a #GList * @port_name: the port name to find * * Finds next match of @port_name in @pulse_port. * * Returns: a #GList or %NULL * * Since: 1.0.0 */ GList* ags_pulse_port_find(GList *pulse_port, gchar *port_name) { while(pulse_port != NULL){ if(!g_ascii_strcasecmp(AGS_PULSE_PORT(pulse_port->data)->name, port_name)){ return(pulse_port); } } return(NULL); } /** * ags_pulse_port_register: * @pulse_port: the #AgsPulsePort * @port_name: the name as string * @is_audio: if %TRUE interpreted as audio port * @is_midi: if %TRUE interpreted as midi port * @is_output: if %TRUE port is acting as output, otherwise as input * * Register a new pulseaudio port and read uuid. Creates a new AgsSequencer or AgsSoundcard * object. * * Since: 1.0.0 */ void ags_pulse_port_register(AgsPulsePort *pulse_port, gchar *port_name, gboolean is_audio, gboolean is_midi, gboolean is_output) { GList *list; gchar *name, *uuid; int r; if(!AGS_IS_PULSE_PORT(pulse_port) || port_name == NULL){ return; } if(pulse_port->pulse_client == NULL){ g_warning("ags_pulse_port.c - no assigned AgsPulseClient"); return; } if((AGS_PULSE_PORT_REGISTERED & (pulse_port->flags)) != 0){ return; } /* get pulse server and application context */ if(pulse_port->pulse_client == NULL || AGS_PULSE_CLIENT(pulse_port->pulse_client)->pulse_server == NULL){ return; } uuid = pulse_port->uuid; name = pulse_port->name; if(AGS_PULSE_CLIENT(pulse_port->pulse_client)->context == NULL){ return; } pulse_port->name = g_strdup(port_name); /* create sequencer or soundcard */ if(is_output){ pulse_port->flags |= AGS_PULSE_PORT_IS_OUTPUT; } #ifdef AGS_WITH_PULSE pulse_port->stream = pa_stream_new(AGS_PULSE_CLIENT(pulse_port->pulse_client)->context, "Playback", pulse_port->sample_spec, NULL); #else pulse_port->stream = NULL; #endif if(pulse_port->stream == NULL){ return; } #ifdef AGS_WITH_PULSE if(is_audio){ pulse_port->flags |= AGS_PULSE_PORT_IS_AUDIO; pa_stream_set_write_callback(pulse_port->stream, ags_pulse_port_stream_request_callback, pulse_port); pa_stream_set_underflow_callback(pulse_port->stream, ags_pulse_port_stream_underflow_callback, pulse_port); r = pa_stream_connect_playback(pulse_port->stream, NULL, pulse_port->buffer_attr, (PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE), NULL, NULL); if(r < 0){ // Old pulse audio servers don't like the ADJUST_LATENCY flag, so retry without that r = pa_stream_connect_playback(pulse_port->stream, NULL, pulse_port->buffer_attr, (PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE), NULL, NULL); } if(r < 0){ return; } }else if(is_midi){ pulse_port->flags |= AGS_PULSE_PORT_IS_MIDI; //NOTE:JK: not implemented } if(pulse_port->stream != NULL){ pulse_port->flags |= AGS_PULSE_PORT_REGISTERED; } #endif } void ags_pulse_port_unregister(AgsPulsePort *pulse_port) { if(!AGS_IS_PULSE_PORT(pulse_port)){ return; } #ifdef AGS_WITH_PULSE if(pulse_port->stream != NULL){ pa_stream_disconnect(pulse_port->stream); } #endif } #ifdef AGS_WITH_PULSE void ags_pulse_port_stream_request_callback(pa_stream *stream, size_t length, AgsPulsePort *pulse_port) { AgsPulseDevout *pulse_devout; AgsPulseDevin *pulse_devin; AgsAudioLoop *audio_loop; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; GObject *soundcard; guint word_size; size_t count; guint nth_buffer; guint nth_empty_buffer, next_nth_empty_buffer; size_t n_bytes; gint remaining; guint i; gboolean no_event; gboolean empty_run; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutex_t *device_mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; if(pulse_port == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); application_context = ags_application_context_get_instance(); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_port); pthread_mutex_unlock(application_mutex); if(g_atomic_int_get(&(pulse_port->queued)) > 0){ g_warning("drop pulseaudio callback"); return; }else{ g_atomic_int_inc(&(pulse_port->queued)); } /* * process audio */ /* */ pthread_mutex_lock(application_mutex); if(application_context != NULL){ audio_loop = (AgsAudioLoop *) application_context->main_loop; task_thread = (AgsTaskThread *) application_context->task_thread; }else{ audio_loop = NULL; task_thread = NULL; } pthread_mutex_unlock(application_mutex); /* interrupt GUI */ if(task_thread != NULL){ pthread_mutex_lock(task_thread->launch_mutex); } if(audio_loop != NULL){ pthread_mutex_lock(audio_loop->timing_mutex); g_atomic_int_set(&(audio_loop->time_spent), audio_loop->time_cycle); pthread_mutex_unlock(audio_loop->timing_mutex); // ags_main_loop_interrupt(AGS_MAIN_LOOP(audio_loop), // AGS_THREAD_SUSPEND_SIG, // 0, &time_spent); } if(task_thread != NULL){ pthread_mutex_unlock(task_thread->launch_mutex); } g_atomic_int_and(&(AGS_THREAD(audio_loop)->flags), (~(AGS_THREAD_TIMING))); /* */ pthread_mutex_lock(mutex); pulse_devout = pulse_port->pulse_devout; pulse_devin = pulse_port->pulse_devin; soundcard = NULL; if(pulse_devout != NULL){ soundcard = pulse_devout; }else if(pulse_devin != NULL){ soundcard = pulse_devin; } stream = pulse_port->stream; nth_empty_buffer = pulse_port->nth_empty_buffer; if(nth_empty_buffer >= 7){ next_nth_empty_buffer = 0; }else{ next_nth_empty_buffer = nth_empty_buffer + 1; } pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_mutex); device_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(device_mutex); empty_run = FALSE; if((pulse_devout == NULL || !ags_soundcard_is_playing(AGS_SOUNDCARD(pulse_devout))) && (pulse_devin == NULL || !ags_soundcard_is_recording(AGS_SOUNDCARD(pulse_devin)))){ empty_run = TRUE; } pthread_mutex_unlock(device_mutex); /* check buffer flag */ pthread_mutex_lock(mutex); switch(pulse_port->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; } count = pulse_port->sample_spec->channels * pulse_port->buffer_size * word_size; pthread_mutex_unlock(mutex); remaining = length; if(empty_run){ void *empty_buffer; void *next_empty_buffer; n_bytes = 0; empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[nth_empty_buffer * count]); pa_stream_begin_write(stream, &empty_buffer, &n_bytes); // remaining = n_bytes; remaining = length; /* iterate */ for(i = 0; remaining > 0; i++){ pthread_mutex_lock(mutex); empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[nth_empty_buffer * count]); next_empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[next_nth_empty_buffer * count]); nth_empty_buffer = next_nth_empty_buffer; if(nth_empty_buffer >= 7){ next_nth_empty_buffer = 0; }else{ next_nth_empty_buffer = nth_empty_buffer + 1; } pulse_port->nth_empty_buffer = nth_empty_buffer; pa_stream_write(stream, empty_buffer, count, NULL, 0, PA_SEEK_RELATIVE); pthread_mutex_unlock(mutex); memset(next_empty_buffer, 0, count * sizeof(unsigned char)); remaining -= count; } g_atomic_int_set(&(pulse_port->is_empty), TRUE); } pthread_mutex_lock(device_mutex); /* wait callback */ no_event = TRUE; if(pulse_devout != NULL){ if((AGS_PULSE_DEVOUT_PASS_THROUGH & (g_atomic_int_get(&(pulse_devout->sync_flags)))) == 0){ callback_mutex = pulse_devout->callback_mutex; pthread_mutex_unlock(device_mutex); /* give back computing time until ready */ pthread_mutex_lock(callback_mutex); if((AGS_PULSE_DEVOUT_CALLBACK_DONE & (g_atomic_int_get(&(pulse_devout->sync_flags)))) == 0){ struct timespec timeout = { 0, 0, }; guint latency; g_atomic_int_or(&(pulse_devout->sync_flags), AGS_PULSE_DEVOUT_CALLBACK_WAIT); pthread_mutex_lock(mutex); latency = ags_pulse_port_get_latency(pulse_port); pthread_mutex_unlock(mutex); latency /= 8; if(timeout.tv_nsec + latency < NSEC_PER_SEC){ timeout.tv_nsec += latency; }else{ timeout.tv_sec += 1; timeout.tv_nsec = timeout.tv_nsec + latency - NSEC_PER_SEC; } while((AGS_PULSE_DEVOUT_CALLBACK_DONE & (g_atomic_int_get(&(pulse_devout->sync_flags)))) == 0 && (AGS_PULSE_DEVOUT_CALLBACK_WAIT & (g_atomic_int_get(&(pulse_devout->sync_flags)))) != 0){ void *empty_buffer; void *next_empty_buffer; pthread_cond_timedwait(pulse_devout->callback_cond, callback_mutex, &timeout); pthread_mutex_unlock(callback_mutex); if(g_atomic_int_get(&(pulse_port->underflow)) > 0){ n_bytes = 0; empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[nth_empty_buffer * count]); pa_stream_begin_write(stream, &empty_buffer, &n_bytes); remaining = length; } /* feed */ for(i = 0; g_atomic_int_get(&(pulse_port->underflow)) > 0 || remaining > 0; i++){ pthread_mutex_lock(mutex); empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[nth_empty_buffer * count]); next_empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[next_nth_empty_buffer * count]); nth_empty_buffer = next_nth_empty_buffer; if(nth_empty_buffer >= 7){ next_nth_empty_buffer = 0; }else{ next_nth_empty_buffer = nth_empty_buffer + 1; } pulse_port->nth_empty_buffer = nth_empty_buffer; pa_stream_write(stream, empty_buffer, count, NULL, 0, PA_SEEK_RELATIVE); pthread_mutex_unlock(mutex); memset(next_empty_buffer, 0, count * sizeof(unsigned char)); if(g_atomic_int_get(&(pulse_port->underflow)) > 0){ g_atomic_int_dec_and_test(&(pulse_port->underflow)); } remaining -= count; } pthread_mutex_lock(mutex); latency = ags_pulse_port_get_latency(pulse_port); pthread_mutex_unlock(mutex); latency /= 8; clock_gettime(CLOCK_MONOTONIC, &timeout); if(timeout.tv_nsec + latency < NSEC_PER_SEC){ timeout.tv_nsec += latency; }else{ timeout.tv_sec += 1; timeout.tv_nsec = timeout.tv_nsec + latency - NSEC_PER_SEC; } pthread_mutex_lock(callback_mutex); } } g_atomic_int_and(&(pulse_devout->sync_flags), (~(AGS_PULSE_DEVOUT_CALLBACK_WAIT | AGS_PULSE_DEVOUT_CALLBACK_DONE))); pthread_mutex_unlock(callback_mutex); no_event = FALSE; pthread_mutex_lock(device_mutex); } /* get buffer */ if((AGS_PULSE_DEVOUT_BUFFER0 & (pulse_devout->flags)) != 0){ nth_buffer = 7; }else if((AGS_PULSE_DEVOUT_BUFFER1 & (pulse_devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_PULSE_DEVOUT_BUFFER2 & (pulse_devout->flags)) != 0){ nth_buffer = 1; }else if((AGS_PULSE_DEVOUT_BUFFER3 & (pulse_devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_PULSE_DEVOUT_BUFFER4 & (pulse_devout->flags)) != 0){ nth_buffer = 3; }else if((AGS_PULSE_DEVOUT_BUFFER5 & (pulse_devout->flags)) != 0){ nth_buffer = 4; }else if((AGS_PULSE_DEVOUT_BUFFER6 & (pulse_devout->flags)) != 0){ nth_buffer = 5; }else if((AGS_PULSE_DEVOUT_BUFFER7 & (pulse_devout->flags)) != 0){ nth_buffer = 6; }else{ empty_run = TRUE; } }else if(pulse_devin != NULL){ if((AGS_PULSE_DEVIN_PASS_THROUGH & (g_atomic_int_get(&(pulse_devin->sync_flags)))) == 0){ callback_mutex = pulse_devin->callback_mutex; pthread_mutex_unlock(device_mutex); /* give back computing time until ready */ pthread_mutex_lock(callback_mutex); if((AGS_PULSE_DEVIN_CALLBACK_DONE & (g_atomic_int_get(&(pulse_devin->sync_flags)))) == 0){ g_atomic_int_or(&(pulse_devin->sync_flags), AGS_PULSE_DEVIN_CALLBACK_WAIT); while((AGS_PULSE_DEVIN_CALLBACK_DONE & (g_atomic_int_get(&(pulse_devin->sync_flags)))) == 0 && (AGS_PULSE_DEVIN_CALLBACK_WAIT & (g_atomic_int_get(&(pulse_devin->sync_flags)))) != 0){ pthread_cond_wait(pulse_devin->callback_cond, callback_mutex); } g_atomic_int_and(&(pulse_devin->sync_flags), (~(AGS_PULSE_DEVIN_CALLBACK_WAIT | AGS_PULSE_DEVIN_CALLBACK_DONE))); pthread_mutex_unlock(callback_mutex); no_event = FALSE; pthread_mutex_lock(device_mutex); } } /* get buffer */ if((AGS_PULSE_DEVIN_BUFFER0 & (pulse_devin->flags)) != 0){ nth_buffer = 7; }else if((AGS_PULSE_DEVIN_BUFFER1 & (pulse_devin->flags)) != 0){ nth_buffer = 0; }else if((AGS_PULSE_DEVIN_BUFFER2 & (pulse_devin->flags)) != 0){ nth_buffer = 1; }else if((AGS_PULSE_DEVIN_BUFFER3 & (pulse_devin->flags)) != 0){ nth_buffer = 2; }else if((AGS_PULSE_DEVIN_BUFFER4 & (pulse_devin->flags)) != 0){ nth_buffer = 3; }else if((AGS_PULSE_DEVIN_BUFFER5 & (pulse_devin->flags)) != 0){ nth_buffer = 4; }else if((AGS_PULSE_DEVIN_BUFFER6 & (pulse_devin->flags)) != 0){ nth_buffer = 5; }else if((AGS_PULSE_DEVIN_BUFFER7 & (pulse_devin->flags)) != 0){ nth_buffer = 6; }else{ empty_run = TRUE; } } switch(pulse_port->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: empty_run = TRUE; } /* write */ count = pulse_devout->pcm_channels * pulse_devout->buffer_size * word_size; if(pulse_devout != NULL){ if(!empty_run){ n_bytes = 0; pa_stream_begin_write(stream, &(pulse_devout->buffer[nth_buffer]), &n_bytes); // g_message("%d", ags_synth_util_get_xcross_count_s16(pulse_devout->buffer[nth_buffer], // pulse_devout->pcm_channels * pulse_devout->buffer_size)); pa_stream_write(stream, pulse_devout->buffer[nth_buffer], count, NULL, 0, PA_SEEK_RELATIVE); g_atomic_int_set(&(pulse_port->is_empty), FALSE); } /* signal finish */ if(!no_event){ callback_finish_mutex = pulse_devout->callback_finish_mutex; pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(pulse_devout->sync_flags), AGS_PULSE_DEVOUT_CALLBACK_FINISH_DONE); if((AGS_PULSE_DEVOUT_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(pulse_devout->sync_flags)))) != 0){ pthread_cond_signal(pulse_devout->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); } pthread_mutex_unlock(device_mutex); if(empty_run){ void *empty_buffer; void *next_empty_buffer; empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[nth_empty_buffer * count]); n_bytes = 0; pa_stream_begin_write(stream, &empty_buffer, &n_bytes); remaining = length; for(i = 0; remaining > 0; i++){ /* feed */ pthread_mutex_lock(mutex); empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[nth_empty_buffer * count]); next_empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[next_nth_empty_buffer * count]); nth_empty_buffer = next_nth_empty_buffer; if(nth_empty_buffer >= 7){ next_nth_empty_buffer = 0; }else{ next_nth_empty_buffer = nth_empty_buffer + 1; } pulse_port->nth_empty_buffer = nth_empty_buffer; pa_stream_write(stream, empty_buffer, count, NULL, 0, PA_SEEK_RELATIVE); pthread_mutex_unlock(mutex); memset(next_empty_buffer, 0, count * sizeof(unsigned char)); remaining -= count; } } }else if(pulse_devin != NULL){ if(!empty_run){ pa_stream_read(stream, pulse_devout->buffer[nth_buffer], count, NULL, 0, PA_SEEK_RELATIVE); g_atomic_int_set(&(pulse_port->is_empty), FALSE); } /* signal finish */ if(!no_event){ callback_finish_mutex = pulse_devin->callback_finish_mutex; pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(pulse_devin->sync_flags), AGS_PULSE_DEVIN_CALLBACK_FINISH_DONE); if((AGS_PULSE_DEVIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(pulse_devin->sync_flags)))) != 0){ pthread_cond_signal(pulse_devin->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); } pthread_mutex_unlock(device_mutex); if(empty_run){ void *empty_buffer; void *next_empty_buffer; remaining = pa_stream_readable_size(stream); for(i = 0; remaining > 0; i++){ /* feed */ pthread_mutex_lock(mutex); empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[nth_empty_buffer * count]); next_empty_buffer = &(((unsigned char *) pulse_port->empty_buffer)[next_nth_empty_buffer * count]); nth_empty_buffer = next_nth_empty_buffer; if(nth_empty_buffer >= 7){ next_nth_empty_buffer = 0; }else{ next_nth_empty_buffer = nth_empty_buffer + 1; } pulse_port->nth_empty_buffer = nth_empty_buffer; pa_stream_read(stream, empty_buffer, count, NULL, 0, PA_SEEK_RELATIVE); pthread_mutex_unlock(mutex); memset(next_empty_buffer, 0, count * sizeof(unsigned char)); remaining -= count; } } } g_atomic_int_dec_and_test(&(pulse_port->queued)); } void ags_pulse_port_stream_underflow_callback(pa_stream *stream, AgsPulsePort *pulse_port) { AgsAudioLoop *audio_loop; AgsPollingThread *polling_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint time_spent; pthread_mutex_t *application_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); application_context = ags_application_context_get_instance(); pthread_mutex_lock(application_mutex); audio_loop = (AgsAudioLoop *) application_context->main_loop; pthread_mutex_unlock(application_mutex); polling_thread = ags_thread_find_type(audio_loop, AGS_TYPE_POLLING_THREAD); pthread_mutex_lock(audio_loop->timing_mutex); g_atomic_int_set(&(audio_loop->time_spent), audio_loop->time_cycle); pthread_mutex_unlock(audio_loop->timing_mutex); g_atomic_int_add(&(pulse_port->underflow), 1); if(polling_thread != NULL){ g_atomic_int_or(&(polling_thread->flags), AGS_POLLING_THREAD_OMIT); /* just omit three times since we don't poll pulse */ g_atomic_int_add(&(polling_thread->omit_count), 4); } } #endif guint ags_pulse_port_get_fixed_size(AgsPulsePort *pulse_port) { AgsPulseDevout *pulse_devout; AgsMutexManager *mutex_manager; guint pcm_channels; guint buffer_size; guint format; guint word_size; guint fixed_size; pthread_mutex_t *application_mutex; pthread_mutex_t *devout_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lock pulse port */ pthread_mutex_lock(application_mutex); pulse_devout = pulse_port->pulse_devout; devout_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_devout); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(devout_mutex); pcm_channels = pulse_devout->pcm_channels; buffer_size = pulse_devout->buffer_size; format = pulse_devout->format; pthread_mutex_unlock(devout_mutex); switch(format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: g_warning("pulse devout - unsupported format"); return(0); } fixed_size = pcm_channels * buffer_size * word_size; return(fixed_size); } void ags_pulse_port_set_samplerate(AgsPulsePort *pulse_port, guint samplerate) { AgsMutexManager *mutex_manager; guint fixed_size; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); fixed_size = ags_pulse_port_get_fixed_size(pulse_port); /* lock pulse port */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_port); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); #ifdef AGS_WITH_PULSE pulse_port->sample_spec->rate = samplerate; pulse_port->buffer_attr->fragsize = -1; pulse_port->buffer_attr->maxlength = -1; pulse_port->buffer_attr->minreq = fixed_size; pulse_port->buffer_attr->tlength = fixed_size; #endif pthread_mutex_unlock(mutex); } void ags_pulse_port_set_buffer_size(AgsPulsePort *pulse_port, guint buffer_size) { AgsMutexManager *mutex_manager; guint fixed_size; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); fixed_size = ags_pulse_port_get_fixed_size(pulse_port); /* lock pulse port */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_port); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); #ifdef AGS_WITH_PULSE pulse_port->buffer_attr->fragsize = -1; pulse_port->buffer_attr->maxlength = -1; pulse_port->buffer_attr->minreq = fixed_size; pulse_port->buffer_attr->tlength = fixed_size; #endif pulse_port->buffer_size = buffer_size; if(pulse_port->empty_buffer != NULL){ free(pulse_port->empty_buffer); } pulse_port->empty_buffer = ags_stream_alloc(pulse_port->pcm_channels * buffer_size, pulse_port->format); pthread_mutex_unlock(mutex); } void ags_pulse_port_set_pcm_channels(AgsPulsePort *pulse_port, guint pcm_channels) { AgsMutexManager *mutex_manager; guint fixed_size; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); fixed_size = ags_pulse_port_get_fixed_size(pulse_port); /* lock pulse port */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_port); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); pulse_port->pcm_channels = pcm_channels; #ifdef AGS_WITH_PULSE pulse_port->sample_spec->channels = pcm_channels; pulse_port->buffer_attr->fragsize = -1; pulse_port->buffer_attr->maxlength = -1; pulse_port->buffer_attr->minreq = fixed_size; pulse_port->buffer_attr->tlength = fixed_size; #endif if(pulse_port->empty_buffer != NULL){ free(pulse_port->empty_buffer); } pulse_port->empty_buffer = ags_stream_alloc(pcm_channels * pulse_port->buffer_size, pulse_port->format); pthread_mutex_unlock(mutex); } void ags_pulse_port_set_format(AgsPulsePort *pulse_port, guint format) { AgsMutexManager *mutex_manager; guint fixed_size; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); fixed_size = ags_pulse_port_get_fixed_size(pulse_port); /* lock pulse port */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) pulse_port); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); #ifdef AGS_WITH_PULSE switch(format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { if(is_bigendian()){ pulse_port->sample_spec->format = PA_SAMPLE_S16BE; }else{ pulse_port->sample_spec->format = PA_SAMPLE_S16LE; } } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { if(is_bigendian()){ pulse_port->sample_spec->format = PA_SAMPLE_S24_32BE; }else{ pulse_port->sample_spec->format = PA_SAMPLE_S24_32LE; } } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { if(is_bigendian()){ pulse_port->sample_spec->format = PA_SAMPLE_S32BE; }else{ pulse_port->sample_spec->format = PA_SAMPLE_S32LE; } } break; default: g_warning("pulse devout - unsupported format"); } pulse_port->buffer_attr->fragsize = -1; pulse_port->buffer_attr->maxlength = -1; pulse_port->buffer_attr->minreq = fixed_size; pulse_port->buffer_attr->tlength = fixed_size; #endif pulse_port->format = format; if(pulse_port->empty_buffer != NULL){ free(pulse_port->empty_buffer); } pulse_port->empty_buffer = ags_stream_alloc(pulse_port->pcm_channels * pulse_port->buffer_size, format); pthread_mutex_unlock(mutex); } /** * ags_pulse_port_get_latency: * @pulse_port: the #AgsPulsePort * * Gets latency. * * Since: 1.0.0 */ guint ags_pulse_port_get_latency(AgsPulsePort *pulse_port) { guint latency; #ifdef AGS_WITH_PULSE latency = (guint) floor((gdouble) NSEC_PER_SEC / (gdouble) pulse_port->sample_spec->rate * (gdouble) pulse_port->buffer_size); #endif return(latency); } /** * ags_pulse_port_new: * @pulse_client: the #AgsPulseClient assigned to * * Instantiate a new #AgsPulsePort. * * Returns: the new #AgsPulsePort * * Since: 1.0.0 */ AgsPulsePort* ags_pulse_port_new(GObject *pulse_client) { AgsPulsePort *pulse_port; pulse_port = (AgsPulsePort *) g_object_new(AGS_TYPE_PULSE_PORT, "pulse-client", pulse_client, NULL); return(pulse_port); } gsequencer-1.4.24/ags/audio/pulse/ags_pulse_devin.h0000644000175000017500000001354213247044247017223 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PULSE_DEVIN_H__ #define __AGS_PULSE_DEVIN_H__ #include #include #include #define AGS_TYPE_PULSE_DEVIN (ags_pulse_devin_get_type()) #define AGS_PULSE_DEVIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PULSE_DEVIN, AgsPulseDevin)) #define AGS_PULSE_DEVIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PULSE_DEVIN, AgsPulseDevin)) #define AGS_IS_PULSE_DEVIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PULSE_DEVIN)) #define AGS_IS_PULSE_DEVIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PULSE_DEVIN)) #define AGS_PULSE_DEVIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_PULSE_DEVIN, AgsPulseDevinClass)) typedef struct _AgsPulseDevin AgsPulseDevin; typedef struct _AgsPulseDevinClass AgsPulseDevinClass; /** * AgsPulseDevinFlags: * @AGS_PULSE_DEVIN_BUFFER0: ring-buffer 0 * @AGS_PULSE_DEVIN_BUFFER1: ring-buffer 1 * @AGS_PULSE_DEVIN_BUFFER2: ring-buffer 2 * @AGS_PULSE_DEVIN_BUFFER3: ring-buffer 3 * @AGS_PULSE_DEVIN_BUFFER4: ring-buffer 4 * @AGS_PULSE_DEVIN_BUFFER5: ring-buffer 5 * @AGS_PULSE_DEVIN_BUFFER6: ring-buffer 6 * @AGS_PULSE_DEVIN_BUFFER7: ring-buffer 7 * @AGS_PULSE_DEVIN_ATTACK_FIRST: use first attack, instead of second one * @AGS_PULSE_DEVIN_RECORD: do capture * @AGS_PULSE_DEVIN_SHUTDOWN: stop capture * @AGS_PULSE_DEVIN_START_RECORD: capture starting * @AGS_PULSE_DEVIN_NONBLOCKING: do non-blocking calls * @AGS_PULSE_DEVIN_INITIALIZED: the soundcard was initialized * * Enum values to control the behavior or indicate internal state of #AgsPulseDevin by * enable/disable as flags. */ typedef enum { AGS_PULSE_DEVIN_BUFFER0 = 1, AGS_PULSE_DEVIN_BUFFER1 = 1 << 1, AGS_PULSE_DEVIN_BUFFER2 = 1 << 2, AGS_PULSE_DEVIN_BUFFER3 = 1 << 3, AGS_PULSE_DEVIN_BUFFER4 = 1 << 4, AGS_PULSE_DEVIN_BUFFER5 = 1 << 5, AGS_PULSE_DEVIN_BUFFER6 = 1 << 6, AGS_PULSE_DEVIN_BUFFER7 = 1 << 7, AGS_PULSE_DEVIN_ATTACK_FIRST = 1 << 8, AGS_PULSE_DEVIN_RECORD = 1 << 9, AGS_PULSE_DEVIN_SHUTDOWN = 1 << 10, AGS_PULSE_DEVIN_START_RECORD = 1 << 11, AGS_PULSE_DEVIN_NONBLOCKING = 1 << 12, AGS_PULSE_DEVIN_INITIALIZED = 1 << 13, }AgsPulseDevinFlags; /** * AgsPulseDevinSyncFlags: * @AGS_PULSE_DEVIN_PASS_THROUGH: do not sync * @AGS_PULSE_DEVIN_INITIAL_CALLBACK: initial callback * @AGS_PULSE_DEVIN_CALLBACK_WAIT: sync wait, soundcard conditional lock * @AGS_PULSE_DEVIN_CALLBACK_DONE: sync done, soundcard conditional lock * @AGS_PULSE_DEVIN_CALLBACK_FINISH_WAIT: sync wait, client conditional lock * @AGS_PULSE_DEVIN_CALLBACK_FINISH_DONE: sync done, client conditional lock * * Enum values to control the synchronization between soundcard and client. */ typedef enum{ AGS_PULSE_DEVIN_PASS_THROUGH = 1, AGS_PULSE_DEVIN_INITIAL_CALLBACK = 1 << 1, AGS_PULSE_DEVIN_CALLBACK_WAIT = 1 << 2, AGS_PULSE_DEVIN_CALLBACK_DONE = 1 << 3, AGS_PULSE_DEVIN_CALLBACK_FINISH_WAIT = 1 << 4, AGS_PULSE_DEVIN_CALLBACK_FINISH_DONE = 1 << 5, }AgsPulseDevinSyncFlags; #define AGS_PULSE_DEVIN_ERROR (ags_pulse_devin_error_quark()) typedef enum{ AGS_PULSE_DEVIN_ERROR_LOCKED_SOUNDCARD, }AgsPulseDevinError; struct _AgsPulseDevin { GObject object; guint flags; volatile guint sync_flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; guint dsp_channels; guint pcm_channels; guint format; guint buffer_size; guint samplerate; void** buffer; double bpm; // beats per minute gdouble delay_factor; gdouble *delay; // count of tics within buffer size guint *attack; // where currently tic resides in the stream's offset, measured in 1/64 of bpm gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint note_offset_absolute; guint loop_left; guint loop_right; gboolean do_loop; guint loop_offset; gchar *card_uri; GObject *pulse_client; gchar **port_name; GList *pulse_port; pthread_mutex_t *callback_mutex; pthread_cond_t *callback_cond; pthread_mutex_t *callback_finish_mutex; pthread_cond_t *callback_finish_cond; GObject *application_context; pthread_mutex_t *application_mutex; GObject *notify_soundcard; GList *audio; }; struct _AgsPulseDevinClass { GObjectClass object; }; GType ags_pulse_devin_get_type(); GQuark ags_pulse_devin_error_quark(); void ags_pulse_devin_switch_buffer_flag(AgsPulseDevin *pulse_devin); void ags_pulse_devin_adjust_delay_and_attack(AgsPulseDevin *pulse_devin); void ags_pulse_devin_realloc_buffer(AgsPulseDevin *pulse_devin); AgsPulseDevin* ags_pulse_devin_new(GObject *application_context); #endif /*__AGS_PULSE_DEVIN_H__*/ gsequencer-1.4.24/ags/audio/pulse/ags_pulse_server.c0000644000175000017500000007667213256163135017432 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_pulse_server_class_init(AgsPulseServerClass *pulse_server); void ags_pulse_server_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pulse_server_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager); void ags_pulse_server_init(AgsPulseServer *pulse_server); void ags_pulse_server_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_pulse_server_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_pulse_server_connect(AgsConnectable *connectable); void ags_pulse_server_disconnect(AgsConnectable *connectable); void ags_pulse_server_dispose(GObject *gobject); void ags_pulse_server_finalize(GObject *gobject); void ags_pulse_server_set_url(AgsDistributedManager *distributed_manager, gchar *url); gchar* ags_pulse_server_get_url(AgsDistributedManager *distributed_manager); void ags_pulse_server_set_ports(AgsDistributedManager *distributed_manager, guint *ports, guint port_count); guint* ags_pulse_server_get_ports(AgsDistributedManager *distributed_manager, guint *port_count); void ags_pulse_server_set_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *soundcard); GList* ags_pulse_server_get_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid); void ags_pulse_server_set_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *sequencer); GList* ags_pulse_server_get_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid); GObject* ags_pulse_server_register_soundcard(AgsDistributedManager *distributed_manager, gboolean is_output); void ags_pulse_server_unregister_soundcard(AgsDistributedManager *distributed_manager, GObject *soundcard); GObject* ags_pulse_server_register_sequencer(AgsDistributedManager *distributed_manager, gboolean is_output); void ags_pulse_server_unregister_sequencer(AgsDistributedManager *distributed_manager, GObject *sequencer); void* ags_pulse_server_do_poll_loop(void *ptr); /** * SECTION:ags_pulse_server * @short_description: pulseaudio instance * @title: AgsPulseServer * @section_id: * @include: ags/audio/pulse/ags_pulse_server.h * * The #AgsPulseServer is an object to represent a running pulseaudio instance. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_URL, PROP_DEFAULT_SOUNDCARD, PROP_DEFAULT_PULSE_CLIENT, PROP_PULSE_CLIENT, }; static gpointer ags_pulse_server_parent_class = NULL; GType ags_pulse_server_get_type() { static GType ags_type_pulse_server = 0; if(!ags_type_pulse_server){ static const GTypeInfo ags_pulse_server_info = { sizeof (AgsPulseServerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pulse_server_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPulseServer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pulse_server_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pulse_server_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_distributed_manager_interface_info = { (GInterfaceInitFunc) ags_pulse_server_distributed_manager_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pulse_server = g_type_register_static(G_TYPE_OBJECT, "AgsPulseServer", &ags_pulse_server_info, 0); g_type_add_interface_static(ags_type_pulse_server, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_pulse_server, AGS_TYPE_DISTRIBUTED_MANAGER, &ags_distributed_manager_interface_info); } return (ags_type_pulse_server); } void ags_pulse_server_class_init(AgsPulseServerClass *pulse_server) { GObjectClass *gobject; GParamSpec *param_spec; ags_pulse_server_parent_class = g_type_class_peek_parent(pulse_server); /* GObjectClass */ gobject = (GObjectClass *) pulse_server; gobject->set_property = ags_pulse_server_set_property; gobject->get_property = ags_pulse_server_get_property; gobject->dispose = ags_pulse_server_dispose; gobject->finalize = ags_pulse_server_finalize; /* properties */ /** * AgsPulseServer:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsPulseServer:url: * * The assigned URL. * * Since: 1.0.0 */ param_spec = g_param_spec_string("url", i18n_pspec("the URL"), i18n_pspec("The URL"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_URL, param_spec); /** * AgsPulseServer:default-soundcard: * * The default soundcard. * * Since: 1.0.0 */ param_spec = g_param_spec_object("default-soundcard", i18n_pspec("default soundcard"), i18n_pspec("The default soundcard"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEFAULT_SOUNDCARD, param_spec); /** * AgsPulseServer:default-pulse-client: * * The default pulse client. * * Since: 1.0.0 */ param_spec = g_param_spec_object("default-pulse-client", i18n_pspec("default pulse client"), i18n_pspec("The default pulse client"), AGS_TYPE_PULSE_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEFAULT_PULSE_CLIENT, param_spec); /** * AgsPulseServer:pulse-client: * * The pulse client list. * * Since: 1.0.0 */ param_spec = g_param_spec_object("pulse-client", i18n_pspec("pulse client list"), i18n_pspec("The pulse client list"), AGS_TYPE_PULSE_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PULSE_CLIENT, param_spec); } void ags_pulse_server_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_pulse_server_connect; connectable->disconnect = ags_pulse_server_disconnect; } void ags_pulse_server_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager) { distributed_manager->set_url = ags_pulse_server_set_url; distributed_manager->get_url = ags_pulse_server_get_url; distributed_manager->set_ports = ags_pulse_server_set_ports; distributed_manager->get_ports = ags_pulse_server_get_ports; distributed_manager->set_soundcard = ags_pulse_server_set_soundcard; distributed_manager->get_soundcard = ags_pulse_server_get_soundcard; distributed_manager->set_sequencer = ags_pulse_server_set_sequencer; distributed_manager->get_sequencer = ags_pulse_server_get_sequencer; distributed_manager->register_soundcard = ags_pulse_server_register_soundcard; distributed_manager->unregister_soundcard = ags_pulse_server_unregister_soundcard; distributed_manager->register_sequencer = ags_pulse_server_register_sequencer; distributed_manager->unregister_sequencer = ags_pulse_server_unregister_sequencer; } void ags_pulse_server_init(AgsPulseServer *pulse_server) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert server mutex */ pulse_server->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); pulse_server->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) pulse_server, mutex); pthread_mutex_unlock(application_mutex); /* flags */ pulse_server->flags = 0; g_atomic_int_set(&(pulse_server->running), TRUE); pulse_server->thread = (pthread_t *) malloc(sizeof(pthread_t)); pulse_server->application_context = NULL; #ifdef AGS_WITH_PULSE pulse_server->main_loop = pa_mainloop_new(); pulse_server->main_loop_api = pa_mainloop_get_api(pulse_server->main_loop); #else pulse_server->main_loop = NULL; pulse_server->main_loop_api = NULL; #endif pulse_server->url = NULL; pulse_server->port = NULL; pulse_server->port_count = 0; pulse_server->n_soundcards = 0; pulse_server->n_sequencers = 0; pulse_server->default_soundcard = NULL; pulse_server->default_client = NULL; pulse_server->client = NULL; } void ags_pulse_server_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPulseServer *pulse_server; pulse_server = AGS_PULSE_SERVER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(pulse_server->application_context == (GObject *) application_context){ return; } if(pulse_server->application_context != NULL){ g_object_unref(G_OBJECT(pulse_server->application_context)); } if(application_context != NULL){ g_object_ref(G_OBJECT(application_context)); } pulse_server->application_context = (GObject *) application_context; } break; case PROP_URL: { gchar *url; url = g_value_get_string(value); if(pulse_server->url == url){ return; } if(pulse_server->url != NULL){ g_free(pulse_server->url); } pulse_server->url = g_strdup(url); } break; case PROP_DEFAULT_SOUNDCARD: { GObject *default_soundcard; default_soundcard = (GObject *) g_value_get_object(value); if(pulse_server->default_soundcard == (GObject *) default_soundcard){ return; } if(pulse_server->default_soundcard != NULL){ g_object_unref(G_OBJECT(pulse_server->default_soundcard)); } if(default_soundcard != NULL){ g_object_ref(G_OBJECT(default_soundcard)); } pulse_server->default_soundcard = (GObject *) default_soundcard; } break; case PROP_DEFAULT_PULSE_CLIENT: { AgsPulseClient *default_client; default_client = (AgsPulseClient *) g_value_get_object(value); if(pulse_server->default_client == (GObject *) default_client){ return; } if(pulse_server->default_client != NULL){ g_object_unref(G_OBJECT(pulse_server->default_client)); } if(default_client != NULL){ g_object_ref(G_OBJECT(default_client)); } pulse_server->default_client = (GObject *) default_client; } break; case PROP_PULSE_CLIENT: { GObject *client; client = (GObject *) g_value_get_object(value); if(g_list_find(pulse_server->client, client) != NULL){ return; } if(client != NULL){ g_object_ref(G_OBJECT(client)); pulse_server->client = g_list_prepend(pulse_server->client, client); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_server_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPulseServer *pulse_server; pulse_server = AGS_PULSE_SERVER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, pulse_server->application_context); } break; case PROP_URL: { g_value_set_string(value, pulse_server->url); } break; case PROP_DEFAULT_SOUNDCARD: { g_value_set_object(value, pulse_server->default_soundcard); } break; case PROP_DEFAULT_PULSE_CLIENT: { g_value_set_object(value, pulse_server->default_soundcard); } break; case PROP_PULSE_CLIENT: { g_value_set_pointer(value, g_list_copy(pulse_server->client)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pulse_server_connect(AgsConnectable *connectable) { AgsPulseServer *pulse_server; GList *list; pulse_server = AGS_PULSE_SERVER(connectable); if((AGS_PULSE_SERVER_CONNECTED & (pulse_server->flags)) != 0){ return; } pulse_server->flags |= AGS_PULSE_SERVER_CONNECTED; list = pulse_server->client; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_pulse_server_disconnect(AgsConnectable *connectable) { AgsPulseServer *pulse_server; GList *list; pulse_server = AGS_PULSE_SERVER(connectable); if((AGS_PULSE_SERVER_CONNECTED & (pulse_server->flags)) != 0){ return; } pulse_server->flags |= AGS_PULSE_SERVER_CONNECTED; list = pulse_server->client; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_pulse_server_dispose(GObject *gobject) { AgsPulseServer *pulse_server; GList *list; pulse_server = AGS_PULSE_SERVER(gobject); /* application context */ if(pulse_server->application_context != NULL){ g_object_unref(G_OBJECT(pulse_server->application_context)); pulse_server->application_context = NULL; } /* default soundcard */ if(pulse_server->default_soundcard != NULL){ g_object_unref(G_OBJECT(pulse_server->default_soundcard)); pulse_server->default_soundcard = NULL; } /* default client */ if(pulse_server->default_client != NULL){ g_object_unref(G_OBJECT(pulse_server->default_client)); pulse_server->default_client = NULL; } /* client */ if(pulse_server->client != NULL){ list = pulse_server->client; while(list != NULL){ g_object_run_dispose(G_OBJECT(list->data)); list = list->next; } g_list_free_full(pulse_server->client, g_object_unref); pulse_server->client = NULL; } /* call parent */ G_OBJECT_CLASS(ags_pulse_server_parent_class)->dispose(gobject); } void ags_pulse_server_finalize(GObject *gobject) { AgsPulseServer *pulse_server; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pulse_server = AGS_PULSE_SERVER(gobject); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* remove pulse server mutex */ pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); /* application context */ if(pulse_server->application_context != NULL){ g_object_unref(G_OBJECT(pulse_server->application_context)); } /* url */ g_free(pulse_server->url); /* default soundcard */ if(pulse_server->default_soundcard != NULL){ g_object_unref(G_OBJECT(pulse_server->default_soundcard)); } /* default client */ if(pulse_server->default_client != NULL){ g_object_unref(G_OBJECT(pulse_server->default_client)); } /* client */ if(pulse_server->client != NULL){ g_list_free_full(pulse_server->client, g_object_unref); } pthread_mutex_destroy(pulse_server->mutex); free(pulse_server->mutex); pthread_mutexattr_destroy(pulse_server->mutexattr); free(pulse_server->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_pulse_server_parent_class)->finalize(gobject); } void ags_pulse_server_set_url(AgsDistributedManager *distributed_manager, gchar *url) { AGS_PULSE_SERVER(distributed_manager)->url = url; } gchar* ags_pulse_server_get_url(AgsDistributedManager *distributed_manager) { return(AGS_PULSE_SERVER(distributed_manager)->url); } void ags_pulse_server_set_ports(AgsDistributedManager *distributed_manager, guint *port, guint port_count) { AGS_PULSE_SERVER(distributed_manager)->port = port; AGS_PULSE_SERVER(distributed_manager)->port_count = port_count; } guint* ags_pulse_server_get_ports(AgsDistributedManager *distributed_manager, guint *port_count) { if(port_count != NULL){ *port_count = AGS_PULSE_SERVER(distributed_manager)->port_count; } return(AGS_PULSE_SERVER(distributed_manager)->port); } void ags_pulse_server_set_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *soundcard) { AgsPulseServer *pulse_server; AgsPulseClient *pulse_client; GList *list; pulse_server = AGS_PULSE_SERVER(distributed_manager); pulse_client = (AgsPulseClient *) ags_pulse_server_find_client(pulse_server, client_uuid); //NOTE:JK: soundcard won't removed list = soundcard; while(list != NULL){ ags_pulse_client_add_device(pulse_client, (GObject *) list->data); list = list->next; } } GList* ags_pulse_server_get_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid) { AgsPulseServer *pulse_server; AgsPulseClient *pulse_client; GList *list, *device; pulse_server = AGS_PULSE_SERVER(distributed_manager); pulse_client = (AgsPulseClient *) ags_pulse_server_find_client(pulse_server, client_uuid); device = pulse_client->device; list = NULL; while(device != NULL){ if(AGS_IS_PULSE_DEVOUT(device->data) || AGS_IS_PULSE_DEVIN(device->data)){ list = g_list_prepend(list, device->data); } device = device->next; } return(g_list_reverse(list)); } void ags_pulse_server_set_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *sequencer) { AgsPulseServer *pulse_server; AgsPulseClient *pulse_client; GList *list; pulse_server = AGS_PULSE_SERVER(distributed_manager); pulse_client = (AgsPulseClient *) ags_pulse_server_find_client(pulse_server, client_uuid); //NOTE:JK: sequencer won't removed list = sequencer; while(list != NULL){ ags_pulse_client_add_device(pulse_client, (GObject *) list->data); list = list->next; } } GList* ags_pulse_server_get_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid) { AgsPulseServer *pulse_server; AgsPulseClient *pulse_client; GList *list, *device; pulse_server = AGS_PULSE_SERVER(distributed_manager); pulse_client = (AgsPulseClient *) ags_pulse_server_find_client(pulse_server, client_uuid); device = pulse_client->device; list = NULL; while(device != NULL){ // if(AGS_IS_PULSE_MIDIIN(device->data)){ // list = g_list_prepend(list, // device->data); // } device = device->next; } return(g_list_reverse(list)); } GObject* ags_pulse_server_register_soundcard(AgsDistributedManager *distributed_manager, gboolean is_output) { AgsPulseServer *pulse_server; AgsPulseClient *default_client; AgsPulsePort *pulse_port; AgsPulseDevout *pulse_devout; AgsPulseDevin *pulse_devin; GObject *soundcard; gchar *str; gboolean initial_set; guint i; pulse_server = AGS_PULSE_SERVER(distributed_manager); initial_set = FALSE; /* the default client */ if(pulse_server->default_client == NULL){ g_object_set(pulse_server, "default-pulse-client", ags_pulse_client_new((GObject *) pulse_server), NULL); ags_pulse_server_add_client(pulse_server, pulse_server->default_client); ags_pulse_client_open((AgsPulseClient *) pulse_server->default_client, "ags-default-client"); initial_set = TRUE; if(AGS_PULSE_CLIENT(pulse_server->default_client)->context == NULL){ g_warning("ags_pulse_server.c - can't open pulseaudio client"); } } default_client = (AgsPulseClient *) pulse_server->default_client; soundcard = NULL; /* the soundcard */ if(is_output){ soundcard = pulse_devout = ags_pulse_devout_new(pulse_server->application_context); str = g_strdup_printf("ags-pulse-devout-%d", pulse_server->n_soundcards); g_object_set(AGS_PULSE_DEVOUT(pulse_devout), "pulse-client", default_client, "device", str, NULL); g_free(str); g_object_set(default_client, "device", pulse_devout, NULL); /* register ports */ str = g_strdup_printf("ags-soundcard%d", pulse_server->n_soundcards); #ifdef AGS_DEBUG g_message("%s", str); #endif pulse_port = ags_pulse_port_new((GObject *) default_client); g_object_set(pulse_port, "pulse-devout", pulse_devout, NULL); ags_pulse_client_add_port(default_client, (GObject *) pulse_port); g_object_set(pulse_devout, "pulse-port", pulse_port, NULL); pulse_devout->port_name = (gchar **) malloc(2 * sizeof(gchar *)); pulse_devout->port_name[0] = g_strdup(str); pulse_devout->port_name[1] = NULL; ags_pulse_port_register(pulse_port, str, TRUE, FALSE, TRUE); ags_pulse_devout_realloc_buffer(pulse_devout); pulse_server->n_soundcards += 1; }else{ soundcard = pulse_devin = ags_pulse_devin_new(pulse_server->application_context); str = g_strdup_printf("ags-pulse-devin-%d", pulse_server->n_soundcards); g_object_set(AGS_PULSE_DEVIN(pulse_devin), "pulse-client", default_client, "device", str, NULL); g_free(str); g_object_set(default_client, "device", pulse_devin, NULL); /* register ports */ str = g_strdup_printf("ags-soundcard%d", pulse_server->n_soundcards); #ifdef AGS_DEBUG g_message("%s", str); #endif pulse_port = ags_pulse_port_new((GObject *) default_client); g_object_set(pulse_port, "pulse-devin", pulse_devin, NULL); ags_pulse_client_add_port(default_client, (GObject *) pulse_port); g_object_set(pulse_devin, "pulse-port", pulse_port, NULL); pulse_devin->port_name = (gchar **) malloc(2 * sizeof(gchar *)); pulse_devin->port_name[0] = g_strdup(str); pulse_devin->port_name[1] = NULL; ags_pulse_port_register(pulse_port, str, TRUE, FALSE, TRUE); ags_pulse_devin_realloc_buffer(pulse_devin); pulse_server->n_soundcards += 1; } return((GObject *) soundcard); } void ags_pulse_server_unregister_soundcard(AgsDistributedManager *distributed_manager, GObject *soundcard) { AgsPulseServer *pulse_server; AgsPulseClient *default_client; GList *list; pulse_server = AGS_PULSE_SERVER(distributed_manager); /* the default client */ default_client = (AgsPulseClient *) pulse_server->default_client; if(default_client == NULL){ g_warning("GSequencer - no pulse client"); return; } if(AGS_IS_PULSE_DEVOUT(soundcard)){ list = AGS_PULSE_DEVOUT(soundcard)->pulse_port; while(list != NULL){ ags_pulse_port_unregister(list->data); ags_pulse_client_remove_port(default_client, list->data); list = list->next; } }else if(AGS_IS_PULSE_DEVIN(soundcard)){ list = AGS_PULSE_DEVIN(soundcard)->pulse_port; while(list != NULL){ ags_pulse_port_unregister(list->data); ags_pulse_client_remove_port(default_client, list->data); list = list->next; } } ags_pulse_client_remove_device(default_client, soundcard); if(default_client->port == NULL){ pulse_server->n_soundcards = 0; } } GObject* ags_pulse_server_register_sequencer(AgsDistributedManager *distributed_manager, gboolean is_output) { g_message("GSequencer - can't register pulseaudio sequencer"); return(NULL); } void ags_pulse_server_unregister_sequencer(AgsDistributedManager *distributed_manager, GObject *sequencer) { g_message("GSequencer - can't unregister pulseaudio sequencer"); } GObject* ags_pulse_server_register_default_soundcard(AgsPulseServer *pulse_server) { AgsPulseClient *default_client; AgsPulseDevout *pulse_devout; AgsPulsePort *pulse_port; gchar *str; guint i; /* the default client */ if(pulse_server->default_client == NULL){ g_object_set(pulse_server, "default-pulse-client", (GObject *) ags_pulse_client_new((GObject *) pulse_server), NULL); ags_pulse_server_add_client(pulse_server, pulse_server->default_client); ags_pulse_client_open((AgsPulseClient *) pulse_server->default_client, "ags-default-client"); if(AGS_PULSE_CLIENT(pulse_server->default_client)->context == NULL){ g_warning("ags_pulse_server.c - can't open pulseaudio client"); return(NULL); } } default_client = (AgsPulseClient *) pulse_server->default_client; /* the soundcard */ pulse_devout = ags_pulse_devout_new(pulse_server->application_context); g_object_set(AGS_PULSE_DEVOUT(pulse_devout), "pulse-client", default_client, "device", "ags-default-devout", NULL); g_object_set(default_client, "device", pulse_devout, NULL); /* register ports */ str = g_strdup_printf("ags-default-soundcard"); #ifdef AGS_DEBUG g_message("%s", str); #endif pulse_port = ags_pulse_port_new((GObject *) default_client); g_object_set(pulse_port, "pulse-devout", pulse_devout, NULL); ags_pulse_client_add_port(default_client, (GObject *) pulse_port); g_object_set(pulse_devout, "pulse-port", pulse_port, NULL); pulse_devout->port_name = (gchar **) malloc(2 * sizeof(gchar *)); pulse_devout->port_name[0] = g_strdup(str); pulse_devout->port_name[1] = NULL; ags_pulse_port_register(pulse_port, str, TRUE, FALSE, TRUE); g_free(str); return((GObject *) pulse_devout); } /** * ags_pulse_server_find_url: * @pulse_server: the #AgsPulseServer * @url: the url to find * * Find #AgsPulseServer by url. * * Returns: the #GList containing a #AgsPulseServer matching @url or %NULL * * Since: 1.0.0 */ GList* ags_pulse_server_find_url(GList *pulse_server, gchar *url) { while(pulse_server != NULL){ if(!g_ascii_strcasecmp(AGS_PULSE_SERVER(pulse_server->data)->url, url)){ return(pulse_server); } pulse_server = pulse_server->next; } return(NULL); } /** * ags_pulse_server_find_client: * @pulse_server: the #AgsPulseServer * @client_uuid: the uuid to find * * Find #AgsPulseClient by uuid. * * Returns: the #AgsPulseClient found or %NULL * * Since: 1.0.0 */ GObject* ags_pulse_server_find_client(AgsPulseServer *pulse_server, gchar *client_uuid) { GList *list; list = pulse_server->client; while(list != NULL){ if(!g_ascii_strcasecmp(AGS_PULSE_CLIENT(list->data)->uuid, client_uuid)){ return(list->data); } list = list->next; } return(NULL); } /** * ags_pulse_server_find_port: * @pulse_server: the #AgsPulseServer * @port_uuid: the uuid to find * * Find #AgsPulsePort by uuid. * * Returns: the #AgsPulsePort found or %NULL * * Since: 1.0.0 */ GObject* ags_pulse_server_find_port(AgsPulseServer *pulse_server, gchar *port_uuid) { GList *client, *port; client = pulse_server->client; while(client != NULL){ port = AGS_PULSE_CLIENT(client->data)->port; while(port != NULL){ if(!g_ascii_strcasecmp(AGS_PULSE_CLIENT(port->data)->uuid, port_uuid)){ return(port->data); } port = port->next; } client = client->next; } return(NULL); } /** * ags_pulse_server_add_client: * @pulse_server: the #AgsPulseServer * @pulse_client: the #AgsPulseClient to add * * Add @pulse_client to @pulse_server * * Since: 1.0.0 */ void ags_pulse_server_add_client(AgsPulseServer *pulse_server, GObject *pulse_client) { if(!AGS_IS_PULSE_SERVER(pulse_server) || !AGS_IS_PULSE_CLIENT(pulse_client)){ return; } g_object_ref(pulse_client); pulse_server->client = g_list_prepend(pulse_server->client, pulse_client); } /** * ags_pulse_server_remove_client: * @pulse_server: the #AgsPulseServer * @pulse_client: the #AgsPulseClient to remove * * Remove @pulse_client to @pulse_server * * Since: 1.0.0 */ void ags_pulse_server_remove_client(AgsPulseServer *pulse_server, GObject *pulse_client) { if(!AGS_IS_PULSE_SERVER(pulse_server) || !AGS_IS_PULSE_CLIENT(pulse_client)){ return; } pulse_server->client = g_list_remove(pulse_server->client, pulse_client); g_object_unref(pulse_client); } /** * ags_pulse_server_connect_client: * @pulse_server: the #AgsPulseServer * * Connect all clients. * * Since: 1.0.0 */ void ags_pulse_server_connect_client(AgsPulseServer *pulse_server) { GList *client; client = pulse_server->client; while(client != NULL){ ags_pulse_client_open((AgsPulseClient *) client->data, AGS_PULSE_CLIENT(client->data)->name); ags_pulse_client_activate(client->data); client = client->next; } } void* ags_pulse_server_do_poll_loop(void *ptr) { AgsPulseServer *pulse_server; #ifndef __APPLE__ struct sched_param param; #endif pulse_server = (AgsPulseServer *) ptr; /* Declare ourself as a real time task */ #ifndef __APPLE__ param.sched_priority = AGS_RT_PRIORITY; if(sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) { perror("sched_setscheduler failed"); } #endif #ifdef AGS_WITH_PULSE pa_mainloop_run(pulse_server->main_loop, NULL); #endif pthread_exit(NULL); } void ags_pulse_server_start_poll(AgsPulseServer *pulse_server) { pthread_create(pulse_server->thread, NULL, ags_pulse_server_do_poll_loop, pulse_server); } /** * ags_pulse_server_new: * @application_context: the #AgsApplicationContext * @url: the URL as string * * Instantiate a new #AgsPulseServer. * * Returns: the new #AgsPulseServer * * Since: 1.0.0 */ AgsPulseServer* ags_pulse_server_new(GObject *application_context, gchar *url) { AgsPulseServer *pulse_server; pulse_server = (AgsPulseServer *) g_object_new(AGS_TYPE_PULSE_SERVER, "application-context", application_context, "url", url, NULL); return(pulse_server); } gsequencer-1.4.24/ags/audio/pulse/ags_pulse_port.h0000644000175000017500000000774413247051201017075 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PULSE_PORT_H__ #define __AGS_PULSE_PORT_H__ #include #include #include #ifdef AGS_WITH_PULSE #include #endif #define AGS_TYPE_PULSE_PORT (ags_pulse_port_get_type()) #define AGS_PULSE_PORT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PULSE_PORT, AgsPulsePort)) #define AGS_PULSE_PORT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PULSE_PORT, AgsPulsePort)) #define AGS_IS_PULSE_PORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PULSE_PORT)) #define AGS_IS_PULSE_PORT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PULSE_PORT)) #define AGS_PULSE_PORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_PULSE_PORT, AgsPulsePortClass)) typedef struct _AgsPulsePort AgsPulsePort; typedef struct _AgsPulsePortClass AgsPulsePortClass; /** * AgsPulsePortFlags: * @AGS_PULSE_PORT_CONNECTED: indicates the port was connected by calling #AgsConnectable::connect() * @AGS_PULSE_PORT_REGISTERED: the port was registered * @AGS_PULSE_PORT_IS_AUDIO: the port provides audio data * @AGS_PULSE_PORT_IS_MIDI: the port provides midi data * @AGS_PULSE_PORT_IS_OUTPUT: the port does output * @AGS_PULSE_PORT_IS_INPUT: the port does input * * Enum values to control the behavior or indicate internal state of #AgsPulsePort by * enable/disable as flags. */ typedef enum{ AGS_PULSE_PORT_CONNECTED = 1, AGS_PULSE_PORT_REGISTERED = 1 << 1, AGS_PULSE_PORT_IS_AUDIO = 1 << 2, AGS_PULSE_PORT_IS_MIDI = 1 << 3, AGS_PULSE_PORT_IS_OUTPUT = 1 << 4, AGS_PULSE_PORT_IS_INPUT = 1 << 5, }AgsPulsePortFlags; struct _AgsPulsePort { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; GObject *pulse_client; GObject *pulse_devout; GObject *pulse_devin; gchar *uuid; gchar *name; guint format; guint buffer_size; guint pcm_channels; #ifdef AGS_WITH_PULSE pa_stream *stream; pa_sample_spec *sample_spec; pa_buffer_attr *buffer_attr; #else gpointer stream; gpointer sample_spec; gpointer buffer_attr; #endif void *empty_buffer; volatile gboolean is_empty; volatile gint underflow; volatile gboolean restart; guint nth_empty_buffer; volatile guint queued; }; struct _AgsPulsePortClass { GObjectClass object; }; GType ags_pulse_port_get_type(); GList* ags_pulse_port_find(GList *pulse_port, gchar *port_name); void ags_pulse_port_register(AgsPulsePort *pulse_port, gchar *port_name, gboolean is_audio, gboolean is_midi, gboolean is_output); void ags_pulse_port_unregister(AgsPulsePort *pulse_port); guint ags_pulse_port_get_fixed_size(AgsPulsePort *pulse_port); void ags_pulse_port_set_samplerate(AgsPulsePort *pulse_port, guint samplerate); void ags_pulse_port_set_pcm_channels(AgsPulsePort *pulse_port, guint pcm_channels); void ags_pulse_port_set_buffer_size(AgsPulsePort *pulse_port, guint buffer_size); void ags_pulse_port_set_format(AgsPulsePort *pulse_port, guint format); guint ags_pulse_port_get_latency(AgsPulsePort *pulse_port); AgsPulsePort* ags_pulse_port_new(GObject *pulse_client); #endif /*__AGS_PULSE_PORT_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_lv2.h0000644000175000017500000000631613246707333015605 00000000000000/* 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 . */ #ifndef __AGS_RECALL_LV2_H__ #define __AGS_RECALL_LV2_H__ #include #include #include #include #include #include #include #include #define AGS_TYPE_RECALL_LV2 (ags_recall_lv2_get_type()) #define AGS_RECALL_LV2(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_LV2, AgsRecallLv2)) #define AGS_RECALL_LV2_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_LV2, AgsRecallLv2Class)) #define AGS_IS_RECALL_LV2(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RECALL_LV2)) #define AGS_IS_RECALL_LV2_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RECALL_LV2)) #define AGS_RECALL_LV2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RECALL_LV2, AgsRecallLv2Class)) typedef struct _AgsRecallLv2 AgsRecallLv2; typedef struct _AgsRecallLv2Class AgsRecallLv2Class; /** * AgsRecallLv2FLags: * @AGS_RECALL_LV2_HAS_EVENT_PORT: has event port * @AGS_RECALL_LV2_HAS_ATOM_PORT: has atom port * @AGS_RECALL_LV2_HAS_WORKER: has worker * * Enum values to control the behavior or indicate internal state of #AgsRecallLv2 by * enable/disable as flags. */ typedef enum{ AGS_RECALL_LV2_HAS_EVENT_PORT = 1, AGS_RECALL_LV2_HAS_ATOM_PORT = 1 << 1, AGS_RECALL_LV2_HAS_WORKER = 1 << 2, }AgsRecallLv2FLags; struct _AgsRecallLv2 { AgsRecallChannel recall_channel; guint flags; AgsTurtle *turtle; gchar *filename; gchar *effect; gchar *uri; uint32_t index; AgsLv2Plugin *plugin; LV2_Descriptor *plugin_descriptor; uint32_t *input_port; uint32_t input_lines; uint32_t *output_port; uint32_t output_lines; uint32_t event_port; uint32_t atom_port; uint32_t bank; uint32_t program; }; struct _AgsRecallLv2Class { AgsRecallChannelClass recall_channel; }; GType ags_recall_lv2_get_type(); void ags_recall_lv2_load(AgsRecallLv2 *recall_lv2); GList* ags_recall_lv2_load_ports(AgsRecallLv2 *recall_lv2); void ags_recall_lv2_load_conversion(AgsRecallLv2 *recall_lv2, GObject *port, gpointer port_descriptor); GList* ags_recall_lv2_find(GList *recall, gchar *filename, gchar *uri); AgsRecallLv2* ags_recall_lv2_new(AgsChannel *source, AgsTurtle *turtle, gchar *filename, gchar *effect, gchar *uri, uint32_t index); #endif /*__AGS_RECALL_LV2_H__*/ gsequencer-1.4.24/ags/audio/ags_playback_domain.h0000644000175000017500000000745013256163135016672 00000000000000/* 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 . */ #ifndef __AGS_PLAYBACK_DOMAIN_H__ #define __AGS_PLAYBACK_DOMAIN_H__ #include #include #include #define AGS_TYPE_PLAYBACK_DOMAIN (ags_playback_domain_get_type()) #define AGS_PLAYBACK_DOMAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAYBACK_DOMAIN, AgsPlaybackDomain)) #define AGS_PLAYBACK_DOMAIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PLAYBACK_DOMAIN, AgsPlaybackDomain)) #define AGS_IS_PLAYBACK_DOMAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAYBACK_DOMAIN)) #define AGS_IS_PLAYBACK_DOMAIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAYBACK_DOMAIN)) #define AGS_PLAYBACK_DOMAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_PLAYBACK_DOMAIN, AgsPlaybackDomainClass)) typedef struct _AgsPlaybackDomain AgsPlaybackDomain; typedef struct _AgsPlaybackDomainClass AgsPlaybackDomainClass; /** * AgsPlaybackDomainFlags: * @AGS_PLAYBACK_DOMAIN_CONNECTED: indicates the playback domain was connected by calling #AgsConnectable::connect() * @AGS_PLAYBACK_DOMAIN_PLAYBACK: do playback * @AGS_PLAYBACK_DOMAIN_SEQUENCER: do sequencer * @AGS_PLAYBACK_DOMAIN_NOTATION: do notation * @AGS_PLAYBACK_DOMAIN_SINGLE_THREADED: single threaded * @AGS_PLAYBACK_DOMAIN_SUPER_THREADED_AUDIO: super threaded audio * * Enum values to control the behavior or indicate internal state of #AgsPlaybackDomain by * enable/disable as flags. */ typedef enum{ AGS_PLAYBACK_DOMAIN_CONNECTED = 1, AGS_PLAYBACK_DOMAIN_PLAYBACK = 1 << 1, AGS_PLAYBACK_DOMAIN_SEQUENCER = 1 << 2, AGS_PLAYBACK_DOMAIN_NOTATION = 1 << 3, AGS_PLAYBACK_DOMAIN_SINGLE_THREADED = 1 << 4, AGS_PLAYBACK_DOMAIN_SUPER_THREADED_AUDIO = 1 << 5, }AgsPlaybackDomainFlags; /** * AgsPlaybackDomainScope: * @AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK: scope playback * @AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER: scope sequencer * @AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION: scope notation * * Enum values to specify playback domain scope. */ typedef enum{ AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK, AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER, AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION, }AgsPlaybackDomainScope; struct _AgsPlaybackDomain { GObject gobject; volatile guint flags; GObject *domain; AgsThread **audio_thread; GList *playback; }; struct _AgsPlaybackDomainClass { GObjectClass gobject; }; GType ags_playback_domain_get_type(); /* get and set */ void ags_playback_domain_set_audio_thread(AgsPlaybackDomain *playback_domain, AgsThread *thread, guint scope); AgsThread* ags_playback_domain_get_audio_thread(AgsPlaybackDomain *playback_domain, guint scope); /* add and remove */ void ags_playback_domain_add_playback(AgsPlaybackDomain *playback_domain, GObject *playback); void ags_playback_domain_remove_playback(AgsPlaybackDomain *playback_domain, GObject *playback); /* instance */ AgsPlaybackDomain* ags_playback_domain_new(); #endif /*__AGS_PLAYBACK_DOMAIN_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_recycling_dummy.c0000644000175000017500000001765313256163135020272 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_recall_recycling_dummy_class_init(AgsRecallRecyclingDummyClass *recall_recycling_dummy); void ags_recall_recycling_dummy_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_recycling_dummy_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_recall_recycling_dummy_init(AgsRecallRecyclingDummy *recall_recycling_dummy); void ags_recall_recycling_dummy_connect(AgsConnectable *connectable); void ags_recall_recycling_dummy_disconnect(AgsConnectable *connectable); void ags_recall_recycling_dummy_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_recycling_dummy_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_recycling_dummy_finalize(GObject *gobject); AgsRecall* ags_recall_recycling_dummy_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_recall_recycling_dummy * @short_description: recycling dummy dynamic context of recall * @title: AgsRecallRecyclingDummy * @section_id: * @include: ags/audio/ags_recall_recycling_dummy.h * * #AgsRecallRecyclingDummy acts as recycling dummy dynamic recall. */ static gpointer ags_recall_recycling_dummy_parent_class = NULL; static AgsConnectableInterface *ags_recall_recycling_dummy_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_recall_recycling_dummy_parent_dynamic_connectable_interface; GType ags_recall_recycling_dummy_get_type() { static GType ags_type_recall_recycling_dummy = 0; if(!ags_type_recall_recycling_dummy){ static const GTypeInfo ags_recall_recycling_dummy_info = { sizeof (AgsRecallRecyclingDummyClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_recycling_dummy_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallRecyclingDummy), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_recycling_dummy_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_recycling_dummy_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_recycling_dummy_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_recycling_dummy = g_type_register_static(AGS_TYPE_RECALL_RECYCLING, "AgsRecallRecyclingDummy", &ags_recall_recycling_dummy_info, 0); g_type_add_interface_static(ags_type_recall_recycling_dummy, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_recycling_dummy, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return (ags_type_recall_recycling_dummy); } void ags_recall_recycling_dummy_class_init(AgsRecallRecyclingDummyClass *recall_recycling_dummy) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_recycling_dummy_parent_class = g_type_class_peek_parent(recall_recycling_dummy); /* GObjectClass */ gobject = (GObjectClass *) recall_recycling_dummy; gobject->finalize = ags_recall_recycling_dummy_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) recall_recycling_dummy; recall->duplicate = ags_recall_recycling_dummy_duplicate; } void ags_recall_recycling_dummy_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_recycling_dummy_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_recycling_dummy_connect; connectable->disconnect = ags_recall_recycling_dummy_disconnect; } void ags_recall_recycling_dummy_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_recall_recycling_dummy_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_recall_recycling_dummy_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_recall_recycling_dummy_disconnect_dynamic; } void ags_recall_recycling_dummy_init(AgsRecallRecyclingDummy *recall_recycling_dummy) { AGS_RECALL(recall_recycling_dummy)->name = "ags-recall"; AGS_RECALL(recall_recycling_dummy)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(recall_recycling_dummy)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(recall_recycling_dummy)->xml_type = "ags-recall-recycling-dummy"; AGS_RECALL(recall_recycling_dummy)->port = NULL; AGS_RECALL(recall_recycling_dummy)->flags |= AGS_RECALL_PERSISTENT; AGS_RECALL(recall_recycling_dummy)->child_type = G_TYPE_NONE; } void ags_recall_recycling_dummy_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_recall_recycling_dummy_parent_class)->finalize(gobject); } void ags_recall_recycling_dummy_connect(AgsConnectable *connectable) { ags_recall_recycling_dummy_parent_connectable_interface->connect(connectable); /* empty */ } void ags_recall_recycling_dummy_disconnect(AgsConnectable *connectable) { ags_recall_recycling_dummy_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_recall_recycling_dummy_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsRecallRecyclingDummy *recall_recycling_dummy; ags_recall_recycling_dummy_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_recall_recycling_dummy_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_recall_recycling_dummy_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } AgsRecall* ags_recall_recycling_dummy_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecallRecyclingDummy *copy; copy = (AgsRecallRecyclingDummy *) AGS_RECALL_CLASS(ags_recall_recycling_dummy_parent_class)->duplicate(recall, recall_id, n_params, parameter); AGS_RECALL(copy)->child_type = recall->child_type; return((AgsRecall *) copy); } /** * ags_recall_recycling_dummy_new: * @recycling: the source #AgsRecycling * @child_type: child type * * Creates an #AgsRecallRecyclingDummy. * * Returns: a new #AgsRecallRecyclingDummy. * * Since: 1.0.0 */ AgsRecallRecyclingDummy* ags_recall_recycling_dummy_new(AgsRecycling *recycling, GType child_type) { AgsRecallRecyclingDummy *recall_recycling_dummy; recall_recycling_dummy = (AgsRecallRecyclingDummy *) g_object_new(AGS_TYPE_RECALL_RECYCLING_DUMMY, "source", recycling, NULL); AGS_RECALL(recall_recycling_dummy)->child_type = child_type; return(recall_recycling_dummy); } gsequencer-1.4.24/ags/audio/ags_output.h0000644000175000017500000000375613246707333015125 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OUTPUT_H__ #define __AGS_OUTPUT_H__ #include #include #include #include #define AGS_TYPE_OUTPUT (ags_output_get_type()) #define AGS_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_OUTPUT, AgsOutput)) #define AGS_OUTPUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_OUTPUT, AgsOutputClass)) #define AGS_IS_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_OUTPUT)) #define AGS_IS_OUTPUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_OUTPUT)) #define AGS_OUTPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_OUTPUT, AgsOutputClass)) typedef struct _AgsOutput AgsOutput; typedef struct _AgsOutputClass AgsOutputClass; struct _AgsOutput { AgsChannel channel; }; struct _AgsOutputClass { AgsChannelClass channel; }; GType ags_output_get_type(); G_DEPRECATED GList* ags_output_map_audio_signal(AgsOutput *output, AgsRecallID *recall_id); AgsRecycling* ags_output_find_first_input_recycling(AgsOutput *output); AgsRecycling* ags_output_find_last_input_recycling(AgsOutput *output); AgsOutput* ags_output_new(GObject *audio); #endif /*__AGS_OUTPUT_H__*/ gsequencer-1.4.24/ags/audio/ags_recycling.h0000644000175000017500000000711613256163135015533 00000000000000/* 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 . */ #ifndef __AGS_RECYCLING_H__ #define __AGS_RECYCLING_H__ #include #include #define AGS_TYPE_RECYCLING (ags_recycling_get_type()) #define AGS_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECYCLING, AgsRecycling)) #define AGS_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECYCLING, AgsRecyclingClass)) #define AGS_IS_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECYCLING)) #define AGS_IS_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECYCLING)) #define AGS_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECYCLING, AgsRecyclingClass)) typedef struct _AgsRecycling AgsRecycling; typedef struct _AgsRecyclingClass AgsRecyclingClass; /** * AgsRecyclingFlags: * @AGS_RECYCLING_CONNECTED: indicates the port was connected by calling #AgsConnectable::connect() * @AGS_RECYCLING_MUTED: recycling is muted * * Enum values to control the behavior or indicate internal state of #AgsRecycling by * enable/disable as flags. */ typedef enum{ AGS_RECYCLING_CONNECTED = 1, AGS_RECYCLING_MUTED = 1 << 1, }AgsRecyclingFlags; struct _AgsRecycling { GObject object; guint flags; pthread_mutex_t *obj_mutex; pthread_mutexattr_t *obj_mutexattr; gboolean parent_locked; GObject *channel; GObject *soundcard; AgsRecycling *parent; AgsRecycling *next; AgsRecycling *prev; GList *audio_signal; }; struct _AgsRecyclingClass { GObjectClass object; void (*add_audio_signal)(AgsRecycling *recycling, AgsAudioSignal *audio_signal); void (*remove_audio_signal)(AgsRecycling *recycling, AgsAudioSignal *audio_signal); }; GType ags_recycling_get_type(void); void ags_recycling_set_soundcard(AgsRecycling *recycling, GObject *soundcard); void ags_recycling_add_audio_signal(AgsRecycling *recycling, AgsAudioSignal *audio_signal); void ags_recycling_remove_audio_signal(AgsRecycling *recycling, AgsAudioSignal *audio_signal); void ags_recycling_create_audio_signal_with_defaults(AgsRecycling *recycling, AgsAudioSignal *audio_signal, gdouble delay, guint attack); void ags_recycling_create_audio_signal_with_frame_count(AgsRecycling *recycling, AgsAudioSignal *audio_signal, guint frame_count, gdouble delay, guint attack); gint ags_recycling_position(AgsRecycling *start_region, AgsRecycling *end_region, AgsRecycling *recycling); AgsRecycling* ags_recycling_find_next_channel(AgsRecycling *start_region, AgsRecycling *end_region, GObject *prev_channel); gboolean ags_recycling_is_active(AgsRecycling *start_region, AgsRecycling *end_region, GObject *recall_id); AgsRecycling* ags_recycling_new(GObject *soundcard); #endif /*__AGS_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_id.h0000644000175000017500000000575113256163135015475 00000000000000/* 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 . */ #ifndef __AGS_RECALL_ID_H__ #define __AGS_RECALL_ID_H__ #include #include #include #include #define AGS_TYPE_RECALL_ID (ags_recall_id_get_type ()) #define AGS_RECALL_ID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AGS_TYPE_RECALL_ID, AgsRecallID)) #define AGS_RECALL_ID_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), AGS_TYPE_RECALL_ID, AgsRecallIDClass)) #define AGS_IS_RECALL_ID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_ID)) #define AGS_IS_RECALL_ID_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_ID)) #define AGS_RECALL_ID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_ID, AgsRecallIDClass)) typedef struct _AgsRecallID AgsRecallID; typedef struct _AgsRecallIDClass AgsRecallIDClass; typedef enum{ AGS_RECALL_ID_CONNECTED = 1, AGS_RECALL_ID_PLAYBACK = 1 << 1, AGS_RECALL_ID_SEQUENCER = 1 << 2, AGS_RECALL_ID_NOTATION = 1 << 3, AGS_RECALL_ID_DUPLICATE = 1 << 4, AGS_RECALL_ID_RESOLVE = 1 << 5, AGS_RECALL_ID_INIT_PRE = 1 << 6, AGS_RECALL_ID_INIT_INTER = 1 << 7, AGS_RECALL_ID_INIT_POST = 1 << 8, AGS_RECALL_ID_PRE = 1 << 9, AGS_RECALL_ID_INTER = 1 << 10, AGS_RECALL_ID_POST = 1 << 11, AGS_RECALL_ID_CANCEL = 1 << 12, }AgsRecallIDFlags; struct _AgsRecallID { GObject object; guint flags; GObject *recycling; AgsRecyclingContext *recycling_context; }; struct _AgsRecallIDClass { GObjectClass object; }; GType ags_recall_id_get_type(void); gboolean ags_recall_id_get_run_stage(AgsRecallID *id, gint stage); void ags_recall_id_set_run_stage(AgsRecallID *recall_id, gint stage); void ags_recall_id_unset_run_stage(AgsRecallID *recall_id, gint stage); AgsRecallID* ags_recall_id_find_recycling_context(GList *recall_id_list, AgsRecyclingContext *recycling_context); AgsRecallID* ags_recall_id_find_parent_recycling_context(GList *recall_id_list, AgsRecyclingContext *parent_recycling_context); AgsRecallID* ags_recall_id_new(AgsRecycling *recycling); #endif /*__AGS_RECALL_ID_H__*/ gsequencer-1.4.24/ags/audio/ags_acceleration.c0000644000175000017500000001735213247044247016205 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include void ags_acceleration_class_init(AgsAccelerationClass *acceleration); void ags_acceleration_connectable_interface_init(AgsConnectableInterface *connectable); void ags_acceleration_init(AgsAcceleration *acceleration); void ags_acceleration_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_acceleration_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_acceleration_connect(AgsConnectable *connectable); void ags_acceleration_disconnect(AgsConnectable *connectable); void ags_acceleration_finalize(GObject *gobject); /** * SECTION:ags_acceleration * @short_description: Acceleration class. * @title: AgsAcceleration * @section_id: * @include: ags/audio/ags_acceleration.h * * #AgsAcceleration represents a downhill-grade. */ static gpointer ags_acceleration_parent_class = NULL; enum{ PROP_0, PROP_X, PROP_Y, PROP_ACCELERATION_NAME, }; GType ags_acceleration_get_type() { static GType ags_type_acceleration = 0; if(!ags_type_acceleration){ static const GTypeInfo ags_acceleration_info = { sizeof(AgsAccelerationClass), NULL, NULL, (GClassInitFunc) ags_acceleration_class_init, NULL, NULL, sizeof(AgsAcceleration), 0, (GInstanceInitFunc) ags_acceleration_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_acceleration_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_acceleration = g_type_register_static(G_TYPE_OBJECT, "AgsAcceleration", &ags_acceleration_info, 0); g_type_add_interface_static(ags_type_acceleration, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_acceleration); } void ags_acceleration_class_init(AgsAccelerationClass *acceleration) { GObjectClass *gobject; GParamSpec *param_spec; ags_acceleration_parent_class = g_type_class_peek_parent(acceleration); gobject = (GObjectClass *) acceleration; gobject->set_property = ags_acceleration_set_property; gobject->get_property = ags_acceleration_get_property; gobject->finalize = ags_acceleration_finalize; /* properties */ /** * AgsAcceleration:x: * * Acceleration offset x. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x", i18n_pspec("offset x"), i18n_pspec("The x offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X, param_spec); /** * AgsAcceleration:y: * * Acceleration offset y. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("y", i18n_pspec("offset y"), i18n_pspec("The y offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y, param_spec); /** * AgsAcceleration:acceleration-name: * * The acceleration's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("acceleration-name", i18n_pspec("acceleration name"), i18n_pspec("The acceleration's name"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ACCELERATION_NAME, param_spec); } void ags_acceleration_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_acceleration_connect; connectable->disconnect = ags_acceleration_disconnect; } void ags_acceleration_init(AgsAcceleration *acceleration) { acceleration->flags = 0; acceleration->x = 0; acceleration->y = 0; acceleration->acceleration_name = NULL; } void ags_acceleration_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAcceleration *acceleration; acceleration = AGS_ACCELERATION(gobject); switch(prop_id){ case PROP_X: { acceleration->x = g_value_get_uint(value); } break; case PROP_Y: { acceleration->y = g_value_get_uint(value); } break; case PROP_ACCELERATION_NAME: { gchar *acceleration_name; acceleration_name = g_value_get_string(value); if(acceleration_name == acceleration->acceleration_name){ return; } if(acceleration->acceleration_name != NULL){ g_free(acceleration->acceleration_name); } acceleration->acceleration_name = g_strdup(acceleration_name); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_acceleration_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAcceleration *acceleration; acceleration = AGS_ACCELERATION(gobject); switch(prop_id){ case PROP_X: { g_value_set_uint(value, acceleration->x); } break; case PROP_Y: { g_value_set_uint(value, acceleration->y); } break; case PROP_ACCELERATION_NAME: { g_value_set_string(value, acceleration->acceleration_name); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_acceleration_connect(AgsConnectable *connectable) { AgsAcceleration *acceleration; acceleration = AGS_ACCELERATION(connectable); if((AGS_ACCELERATION_CONNECTED & (acceleration->flags)) != 0){ return; } acceleration->flags |= AGS_ACCELERATION_CONNECTED; } void ags_acceleration_disconnect(AgsConnectable *connectable) { AgsAcceleration *acceleration; acceleration = AGS_ACCELERATION(connectable); if((AGS_ACCELERATION_CONNECTED & (acceleration->flags)) == 0){ return; } acceleration->flags &= (~AGS_ACCELERATION_CONNECTED); } void ags_acceleration_finalize(GObject *gobject) { AgsAcceleration *acceleration; acceleration = AGS_ACCELERATION(gobject); if(acceleration->acceleration_name != NULL){ free(acceleration->acceleration_name); } /* call parent */ G_OBJECT_CLASS(ags_acceleration_parent_class)->finalize(gobject); } /** * ags_acceleration_duplicate: * @acceleration: an #AgsAcceleration * * Duplicate a acceleration. * * Returns: the duplicated #AgsAcceleration. * * Since: 1.0.0 */ AgsAcceleration* ags_acceleration_duplicate(AgsAcceleration *acceleration) { AgsAcceleration *copy; copy = ags_acceleration_new(); copy->flags = 0; copy->x = acceleration->x; copy->y = acceleration->y; copy->acceleration_name = g_strdup(acceleration->acceleration_name); return(copy); } /** * ags_acceleration_new: * * Creates an #AgsAcceleration * * Returns: a new #AgsAcceleration * * Since: 1.0.0 */ AgsAcceleration* ags_acceleration_new() { AgsAcceleration *acceleration; acceleration = (AgsAcceleration *) g_object_new(AGS_TYPE_ACCELERATION, NULL); return(acceleration); } gsequencer-1.4.24/ags/audio/ags_recall_channel.c0000644000175000017500000004303613247044247016504 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_recall_channel_class_init(AgsRecallChannelClass *recall_channel); void ags_recall_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_channel_packable_interface_init(AgsPackableInterface *packable); void ags_recall_channel_init(AgsRecallChannel *recall_channel); void ags_recall_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_channel_connect(AgsConnectable *connectable); void ags_recall_channel_disconnect(AgsConnectable *connectable); gboolean ags_recall_channel_pack(AgsPackable *packable, GObject *container); gboolean ags_recall_channel_unpack(AgsPackable *packable); void ags_recall_channel_dispose(GObject *gobject); void ags_recall_channel_finalize(GObject *gobject); void ags_recall_channel_load_automation(AgsRecall *recall, GList *automation_port); void ags_recall_channel_unload_automation(AgsRecall *recall); void ags_recall_channel_automate(AgsRecall *recall); AgsRecall* ags_recall_channel_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_recall_channel * @short_description: channel context of recall * @title: AgsRecallChannel * @section_id: * @include: ags/audio/ags_recall_channel.h * * #AgsRecallChannel acts as channel recall. */ enum{ PROP_0, PROP_DESTINATION, PROP_SOURCE, }; static gpointer ags_recall_channel_parent_class = NULL; static AgsConnectableInterface* ags_recall_channel_parent_connectable_interface; static AgsPackableInterface* ags_recall_channel_parent_packable_interface; GType ags_recall_channel_get_type() { static GType ags_type_recall_channel = 0; if(!ags_type_recall_channel){ static const GTypeInfo ags_recall_channel_info = { sizeof (AgsRecallChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_packable_interface_info = { (GInterfaceInitFunc) ags_recall_channel_packable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_channel = g_type_register_static(AGS_TYPE_RECALL, "AgsRecallChannel", &ags_recall_channel_info, 0); g_type_add_interface_static(ags_type_recall_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_channel, AGS_TYPE_PACKABLE, &ags_packable_interface_info); } return(ags_type_recall_channel); } void ags_recall_channel_class_init(AgsRecallChannelClass *recall_channel) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_channel_parent_class = g_type_class_peek_parent(recall_channel); /* GObjectClass */ gobject = (GObjectClass *) recall_channel; gobject->set_property = ags_recall_channel_set_property; gobject->get_property = ags_recall_channel_get_property; gobject->dispose = ags_recall_channel_dispose; gobject->finalize = ags_recall_channel_finalize; /* properties */ /** * AgsRecallChannel:destination: * * The assigned destination channel. * * Since: 1.0.0 */ param_spec = g_param_spec_object("destination", i18n_pspec("assigned destination channel"), i18n_pspec("The destination channel object it is assigned to"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DESTINATION, param_spec); /** * AgsRecallChannel:source: * * The assigned source channel. * * Since: 1.0.0 */ param_spec = g_param_spec_object("source", i18n_pspec("assigned source channel"), i18n_pspec("The source channel object it is assigned to"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOURCE, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) recall_channel; recall->load_automation = ags_recall_channel_load_automation; recall->unload_automation = ags_recall_channel_unload_automation; recall->automate = ags_recall_channel_automate; recall->duplicate = ags_recall_channel_duplicate; } void ags_recall_channel_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_recall_channel_connectable_parent_interface; ags_recall_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_channel_connect; connectable->disconnect = ags_recall_channel_disconnect; } void ags_recall_channel_packable_interface_init(AgsPackableInterface *packable) { ags_recall_channel_parent_packable_interface = g_type_interface_peek_parent(packable); packable->pack = ags_recall_channel_pack; packable->unpack = ags_recall_channel_unpack; } void ags_recall_channel_init(AgsRecallChannel *recall_channel) { recall_channel->destination = NULL; recall_channel->source = NULL; } void ags_recall_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallChannel *recall_channel; recall_channel = AGS_RECALL_CHANNEL(gobject); switch(prop_id){ case PROP_DESTINATION: { AgsChannel *destination; destination = (AgsChannel *) g_value_get_object(value); if(recall_channel->destination == destination){ return; } if(recall_channel->destination != NULL){ g_object_unref(recall_channel->destination); } if(destination != NULL){ g_object_ref(destination); } recall_channel->destination = destination; } break; case PROP_SOURCE: { AgsChannel *source; source = (AgsChannel *) g_value_get_object(value); if(recall_channel->source == source){ return; } if(recall_channel->source != NULL){ g_object_unref(recall_channel->source); } if(source != NULL){ g_object_ref(source); } recall_channel->source = source; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallChannel *recall_channel; recall_channel = AGS_RECALL_CHANNEL(gobject); switch(prop_id){ case PROP_DESTINATION: { g_value_set_object(value, recall_channel->destination); } break; case PROP_SOURCE: { g_value_set_object(value, recall_channel->source); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_channel_dispose(GObject *gobject) { AgsRecallChannel *recall_channel; recall_channel = AGS_RECALL_CHANNEL(gobject); /* unpack */ ags_packable_unpack(AGS_PACKABLE(recall_channel)); /* source */ if(recall_channel->source != NULL){ g_object_unref(recall_channel->source); recall_channel->source = NULL; } /* destination */ if(recall_channel->destination != NULL){ g_object_unref(G_OBJECT(recall_channel->destination)); recall_channel->destination = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_channel_parent_class)->dispose(gobject); } void ags_recall_channel_finalize(GObject *gobject) { AgsRecallChannel *recall_channel; recall_channel = AGS_RECALL_CHANNEL(gobject); /* source */ if(recall_channel->source != NULL){ g_object_unref(recall_channel->source); } /* destination */ if(recall_channel->destination != NULL){ g_object_unref(G_OBJECT(recall_channel->destination)); } /* call parent */ G_OBJECT_CLASS(ags_recall_channel_parent_class)->finalize(gobject); } void ags_recall_channel_connect(AgsConnectable *connectable) { ags_recall_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_recall_channel_disconnect(AgsConnectable *connectable) { ags_recall_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } gboolean ags_recall_channel_pack(AgsPackable *packable, GObject *container) { AgsRecallContainer *recall_container; AgsRecallChannel *recall_channel; GList *list; if(ags_recall_channel_parent_packable_interface->pack(packable, container)){ return(TRUE); } recall_container = AGS_RECALL_CONTAINER(container); recall_channel = AGS_RECALL_CHANNEL(packable); g_object_set(container, "recall_channel", recall_channel, NULL); /* set in AgsRecallChannelRun */ list = recall_container->recall_channel_run; while((list = ags_recall_find_provider(list, G_OBJECT(recall_channel->source))) != NULL){ g_object_set(G_OBJECT(list->data), "recall_channel", recall_channel, NULL); list = list->next; } return(FALSE); } gboolean ags_recall_channel_unpack(AgsPackable *packable) { AgsRecall *recall; AgsRecallContainer *recall_container; GList *list; recall = AGS_RECALL(packable); if(recall == NULL){ return(TRUE); } recall_container = AGS_RECALL_CONTAINER(recall->container); if(recall_container == NULL){ return(TRUE); } /* ref */ g_object_ref(recall); g_object_ref(recall_container); /* unset in AgsRecallChannelRun */ list = recall_container->recall_channel_run; while((list = ags_recall_find_provider(list, G_OBJECT(AGS_RECALL_CHANNEL(packable)->source))) != NULL){ g_object_set(G_OBJECT(list->data), "recall_channel", NULL, NULL); list = list->next; } /* call parent */ if(ags_recall_channel_parent_packable_interface->unpack(packable)){ g_object_unref(recall); g_object_unref(recall_container); return(TRUE); } /* remove from list */ recall_container->recall_channel = g_list_remove(recall_container->recall_channel, recall); /* unref */ g_object_unref(recall); g_object_unref(recall_container); return(FALSE); } void ags_recall_channel_load_automation(AgsRecall *recall, GList *automation_port) { AgsChannel *channel; AgsAudio *audio; GList *automation; GType channel_type; channel = AGS_RECALL_CHANNEL(recall)->source; audio = AGS_AUDIO(channel->audio); if(AGS_IS_OUTPUT(channel)){ channel_type = AGS_TYPE_OUTPUT; }else{ channel_type = AGS_TYPE_INPUT; } while(automation_port != NULL){ if((AGS_PORT_IS_OUTPUT & (AGS_PORT(automation_port->data)->flags)) != 0){ automation_port = automation_port->next; continue; } if((automation = ags_automation_find_port(audio->automation, automation_port->data)) == NULL){ AgsAutomation *current; current = ags_automation_new(channel->audio, channel->line, channel_type, AGS_PORT(automation_port->data)->specifier); g_object_set(current, "port", automation_port->data, NULL); ags_audio_add_automation((AgsAudio *) channel->audio, (GObject *) current); //TODO:JK: property AGS_PORT(automation_port->data)->automation = ags_automation_add(AGS_PORT(automation_port->data)->automation, current); }else{ //TODO:JK: property if(g_list_find(AGS_PORT(automation_port->data)->automation, automation->data) == NULL){ AGS_PORT(automation_port->data)->automation = ags_automation_add(AGS_PORT(automation_port->data)->automation, automation->data); } } automation_port = automation_port->next; } if(recall->automation_port == NULL){ recall->automation_port = automation_port; }else{ recall->automation_port = g_list_concat(recall->automation_port, automation_port); } } void ags_recall_channel_unload_automation(AgsRecall *recall) { AgsAudio *audio; AgsChannel *channel; AgsAutomation *current; GList *automation; GList *automation_port; channel = AGS_RECALL_CHANNEL(recall)->source; audio = AGS_AUDIO(channel->audio); automation_port = recall->automation_port; while(automation_port != NULL){ while((automation = ags_automation_find_port(audio->automation, automation_port->data)) != NULL){ current = automation->data; ags_audio_remove_automation(audio, (GObject *) current); automation = automation->next; } automation_port = automation_port->next; } g_list_free(recall->automation_port); recall->automation_port = NULL; } void ags_recall_channel_automate(AgsRecall *recall) { GObject *soundcard; AgsAudio *audio; AgsAutomation *current; GList *automation; GList *port; gdouble delay; guint note_offset, delay_counter; guint loop_left, loop_right; gboolean do_loop; double x, step; guint ret_x; gboolean return_prev_on_failure; audio = (AgsAudio *) AGS_CHANNEL(AGS_RECALL_CHANNEL(recall)->source)->audio; soundcard = audio->soundcard; /* retrieve position */ port = recall->port; note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(soundcard)); delay = ags_soundcard_get_delay(AGS_SOUNDCARD(soundcard)); delay_counter = ags_soundcard_get_delay_counter(AGS_SOUNDCARD(soundcard)); /* retrieve loop information */ ags_soundcard_get_loop(AGS_SOUNDCARD(soundcard), &loop_left, &loop_right, &do_loop); return_prev_on_failure = TRUE; if(do_loop && loop_left <= note_offset){ if(note_offset == loop_left){ return_prev_on_failure = TRUE; } } /* */ x = ((double) note_offset + (delay_counter / delay)) * ((1.0 / AGS_AUTOMATION_MINIMUM_ACCELERATION_LENGTH) * AGS_NOTATION_MINIMUM_NOTE_LENGTH); step = ((1.0 / AGS_AUTOMATION_MINIMUM_ACCELERATION_LENGTH) * AGS_NOTATION_MINIMUM_NOTE_LENGTH); while(port != NULL){ automation = (AgsAutomation *) AGS_PORT(port->data)->automation; while(automation != NULL){ current = automation->data; if(current->timestamp->timer.ags_offset.offset + AGS_AUTOMATION_DEFAULT_OFFSET < x){ automation = automation->next; continue; } if((AGS_AUTOMATION_BYPASS & (current->flags)) == 0){ GValue value = {0,}; ret_x = ags_automation_get_value(current, floor(x), ceil(x + step), return_prev_on_failure, &value); if(ret_x != G_MAXUINT){ ags_port_safe_write(port->data, &value); } } if(current->timestamp->timer.ags_offset.offset > ceil(x + step)){ break; } automation = automation->next; } port = port->next; } } AgsRecall* ags_recall_channel_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecallChannel *recall_channel, *copy; recall_channel = AGS_RECALL_CHANNEL(recall); parameter = ags_parameter_grow(G_OBJECT_TYPE(recall), parameter, n_params, "source", recall_channel->source, "destination", recall_channel->destination, NULL); copy = AGS_RECALL_CHANNEL(AGS_RECALL_CLASS(ags_recall_channel_parent_class)->duplicate(recall, recall_id, n_params, parameter)); g_message("ags warning - ags_recall_channel_duplicate: you shouldn't do this %s", G_OBJECT_TYPE_NAME(recall)); return((AgsRecall *) copy); } /** * ags_recall_channel_find_channel: * @recall_channel_i: a #GList containing #AgsRecallChannel * @source: the #AgsChannel to find * * Retrieve next recall assigned to channel. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_recall_channel_find_channel(GList *recall_channel_i, AgsChannel *source) { AgsRecallChannel *recall_channel; while(recall_channel_i != NULL){ recall_channel = AGS_RECALL_CHANNEL(recall_channel_i->data); if(recall_channel->source == source){ return(recall_channel_i); } recall_channel_i = recall_channel_i->next; } return(NULL); } /** * ags_recall_channel_new: * * Creates an #AgsRecallChannel. * * Returns: a new #AgsRecallChannel. * * Since: 1.0.0 */ AgsRecallChannel* ags_recall_channel_new() { AgsRecallChannel *recall_channel; recall_channel = (AgsRecallChannel *) g_object_new(AGS_TYPE_RECALL_CHANNEL, NULL); return(recall_channel); } gsequencer-1.4.24/ags/audio/ags_recall_audio_run.h0000644000175000017500000000410513246707333017061 00000000000000/* 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 . */ #ifndef __AGS_RECALL_AUDIO_RUN_H__ #define __AGS_RECALL_AUDIO_RUN_H__ #include #include #include #include #include #define AGS_TYPE_RECALL_AUDIO_RUN (ags_recall_audio_run_get_type()) #define AGS_RECALL_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_AUDIO_RUN, AgsRecallAudioRun)) #define AGS_RECALL_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_AUDIO_RUN, AgsRecallAudioRunClass)) #define AGS_IS_RECALL_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_AUDIO_RUN)) #define AGS_IS_RECALL_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_AUDIO_RUN)) #define AGS_RECALL_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_AUDIO_RUN, AgsRecallAudioRunClass)) typedef struct _AgsRecallAudioRun AgsRecallAudioRun; typedef struct _AgsRecallAudioRunClass AgsRecallAudioRunClass; struct _AgsRecallAudioRun { AgsRecall recall; AgsAudio *audio; AgsRecallAudio *recall_audio; }; struct _AgsRecallAudioRunClass { AgsRecallClass recall; }; GType ags_recall_audio_run_get_type(); AgsRecallAudioRun* ags_recall_audio_run_new(); #endif /*__AGS_RECALL_AUDIO_RUN_H__*/ gsequencer-1.4.24/ags/audio/ags_channel.c0000644000175000017500000105171413256163135015163 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /** * SECTION:ags_channel * @short_description: Acts as entry point to the audio tree. * @title: AgsChannel * @section_id: * @include: ags/audio/ags_channel.h * * #AgsChannel is the entry point to the entire audio tree and its nested * recycling tree. * * Every channel has its own #AgsRecallID. As modifying link a new #AgsRecyclingContext * is indicated, since it acts as a kind of recall id tree context. */ void ags_channel_class_init(AgsChannelClass *channel_class); void ags_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_channel_init(AgsChannel *channel); void ags_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_channel_add_to_registry(AgsConnectable *connectable); void ags_channel_remove_from_registry(AgsConnectable *connectable); void ags_channel_connect(AgsConnectable *connectable); void ags_channel_disconnect(AgsConnectable *connectable); void ags_channel_dispose(GObject *gobject); void ags_channel_finalize(GObject *gobject); GList* ags_channel_add_ladspa_effect(AgsChannel *channel, gchar *filename, gchar *effect); GList* ags_channel_add_dssi_effect(AgsChannel *channel, gchar *filename, gchar *effect); GList* ags_channel_add_lv2_effect(AgsChannel *channel, gchar *filename, gchar *effect); GList* ags_channel_real_add_effect(AgsChannel *channel, gchar *filename, gchar *effect); void ags_channel_real_remove_effect(AgsChannel *channel, guint nth); void ags_channel_real_done(AgsChannel *channel, AgsRecallID *recall_id); enum{ ADD_EFFECT, REMOVE_EFFECT, RECYCLING_CHANGED, DONE, LAST_SIGNAL, }; enum{ PROP_0, PROP_AUDIO, PROP_SOUNDCARD, PROP_SAMPLERATE, PROP_BUFFER_SIZE, PROP_FORMAT, PROP_PAD, PROP_AUDIO_CHANNEL, PROP_LINE, PROP_NOTE, PROP_REMOTE_CHANNEL, PROP_PLAYBACK, PROP_RECALL_ID, PROP_RECALL_CONTAINER, PROP_RECALL, PROP_PLAY, PROP_LINK, PROP_FIRST_RECYCLING, PROP_LAST_RECYCLING, PROP_PATTERN, }; static gpointer ags_channel_parent_class = NULL; static guint channel_signals[LAST_SIGNAL]; GType ags_channel_get_type (void) { static GType ags_type_channel = 0; if(!ags_type_channel){ static const GTypeInfo ags_channel_info = { sizeof (AgsChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_channel = g_type_register_static(G_TYPE_OBJECT, "AgsChannel", &ags_channel_info, 0); g_type_add_interface_static(ags_type_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_channel); } void ags_channel_class_init(AgsChannelClass *channel) { GObjectClass *gobject; GParamSpec *param_spec; ags_channel_parent_class = g_type_class_peek_parent(channel); /* GObjectClass */ gobject = (GObjectClass *) channel; gobject->set_property = ags_channel_set_property; gobject->get_property = ags_channel_get_property; gobject->dispose = ags_channel_dispose; gobject->finalize = ags_channel_finalize; /* properties */ /** * AgsChannel:audio: * * The assigned #AgsAudio aligning channels. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("assigned audio"), i18n_pspec("The audio it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsChannel:soundcard: * * The assigned #AgsSoundcard acting as default sink. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsAudio:samplerate: * * The samplerate. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("samplerate"), i18n_pspec("The samplerate"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsAudio:buffer-size: * * The buffer size. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("buffer size"), i18n_pspec("The buffer size"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsAudio:format: * * The format. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("format"), i18n_pspec("The format"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsAudio:audio-channel: * * The nth audio channel. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("nth audio channel"), i18n_pspec("The nth audio channel"), 0, 65535, 0, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsAudio:pad: * * The nth pad. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pad", i18n_pspec("nth pad"), i18n_pspec("The nth pad"), 0, 65535, 0, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsAudio:line: * * The nth line. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("line", i18n_pspec("nth line"), i18n_pspec("The nth line"), 0, 65535, 0, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsChannel:note: * * The assigned #AgsNote representing this channel. * * Since: 1.0.0 */ param_spec = g_param_spec_string("note", i18n_pspec("assigned note"), i18n_pspec("The note it is assigned with"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTE, param_spec); /** * AgsChannel:playback: * * The assigned #AgsPlayback. * * Since: 1.0.0 */ param_spec = g_param_spec_object("playback", i18n_pspec("assigned playback"), i18n_pspec("The playback it is assigned with"), AGS_TYPE_PLAYBACK, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK, param_spec); /** * AgsChannel:recall-id: * * The assigned #AgsRecallID. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("recall-id", i18n_pspec("assigned recall id"), i18n_pspec("The recall id it is assigned with"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_ID, param_spec); /** * AgsChannel:recall-container: * * The containing #AgsRecallContainer. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("recall-container", i18n_pspec("containing recall-container"), i18n_pspec("The recall container it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CONTAINER, param_spec); /** * AgsChannel:recall: * * The containing #AgsRecall in recall-context. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("recall", i18n_pspec("containing recall"), i18n_pspec("The recall it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL, param_spec); /** * AgsChannel:play: * * The containing #AgsRecall in play-context. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("play", i18n_pspec("containing play"), i18n_pspec("The play it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAY, param_spec); /** * AgsChannel:link: * * The assigned link as #AgsChannel. * * Since: 1.0.0 */ param_spec = g_param_spec_object("link", i18n_pspec("assigned link"), i18n_pspec("The link it is assigned with"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LINK, param_spec); /** * AgsChannel:first-recycling: * * The containing #AgsRecycling it takes it #AgsAudioSignal from. * * Since: 1.0.0 */ param_spec = g_param_spec_object("first-recycling", i18n_pspec("containing first recycling"), i18n_pspec("The first recycling it contains"), AGS_TYPE_RECYCLING, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_FIRST_RECYCLING, param_spec); /** * AgsChannel:last-recycling: * * The containing #AgsRecycling it takes it #AgsAudioSignal from. * * Since: 1.0.0 */ param_spec = g_param_spec_object("last-recycling", i18n_pspec("containing last recycling"), i18n_pspec("The last recycling it contains"), AGS_TYPE_RECYCLING, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_LAST_RECYCLING, param_spec); /** * AgsChannel:pattern: * * The containing #AgsPattern. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("pattern", i18n_pspec("containing pattern"), i18n_pspec("The pattern it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PATTERN, param_spec); /* AgsChannelClass */ channel->add_effect = ags_channel_real_add_effect; channel->remove_effect = ags_channel_real_remove_effect; channel->recycling_changed = NULL; channel->done = ags_channel_real_done; /* signals */ /** * AgsChannel::add-effect: * @channel: the #AgsChannel to modify * @effect: the effect's name * * The ::add-effect signal notifies about added effect. */ channel_signals[ADD_EFFECT] = g_signal_new("add-effect", G_TYPE_FROM_CLASS(channel), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsChannelClass, add_effect), NULL, NULL, g_cclosure_user_marshal_POINTER__STRING_STRING, G_TYPE_POINTER, 2, G_TYPE_STRING, G_TYPE_STRING); /** * AgsChannel::remove-effect: * @channel: the #AgsChannel to modify * @nth: the nth effect * * The ::remove-effect signal notifies about removed effect. */ channel_signals[REMOVE_EFFECT] = g_signal_new("remove-effect", G_TYPE_FROM_CLASS(channel), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsChannelClass, remove_effect), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsChannel::recycling-changed: * @channel the object recycling changed * @old_start_region: first recycling * @old_end_region: last recycling * @new_start_region: new first recycling * @new_end_region: new last recycling * @old_start_changed_region: modified link recycling start * @old_end_changed_region: modified link recyclig end * @new_start_changed_region: replacing link recycling start * @new_end_changed_region: replacing link recycling end * * The ::recycling-changed signal is invoked to notify modified recycling tree. */ channel_signals[RECYCLING_CHANGED] = g_signal_new("recycling-changed", G_TYPE_FROM_CLASS (channel), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsChannelClass, recycling_changed), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT, G_TYPE_NONE, 8, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT, G_TYPE_OBJECT); /** * AgsChannel::done: * @channel: the object done playing. * @recall_id: the appropriate #AgsRecallID * * The ::done signal is invoked during termination of playback. */ channel_signals[DONE] = g_signal_new("done", G_TYPE_FROM_CLASS (channel), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsChannelClass, done), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_channel_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = ags_channel_add_to_registry; connectable->remove_from_registry = ags_channel_remove_from_registry; connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_channel_connect; connectable->disconnect = ags_channel_disconnect; } GQuark ags_channel_error_quark() { return(g_quark_from_static_string("ags-channel-error-quark")); } void ags_channel_init(AgsChannel *channel) { AgsConfig *config; AgsMutexManager *mutex_manager; gchar *str; gchar *str0, *str1; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* create mutex */ channel->obj_mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif channel->obj_mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); /* insert mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) channel, mutex); pthread_mutex_unlock(application_mutex); /* config */ config = ags_config_get_instance(); /* base init */ channel->flags = 0; channel->audio = NULL; channel->soundcard = NULL; channel->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; channel->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; channel->format = AGS_SOUNDCARD_DEFAULT_FORMAT; /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ channel->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); }else{ channel->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ channel->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); }else{ channel->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ channel->format = g_ascii_strtoull(str, NULL, 10); free(str); }else{ channel->format = AGS_SOUNDCARD_DEFAULT_FORMAT; } /* inter-connected channels */ channel->prev = NULL; channel->prev_pad = NULL; channel->next = NULL; channel->next_pad = NULL; /* allocation info */ channel->pad = 0; channel->audio_channel = 0; channel->line = 0; channel->note = NULL; /* playback */ channel->playback = (GObject *) ags_playback_new(); g_object_ref(channel->playback); g_object_set(channel->playback, "source", channel, NULL); channel->recall_id = NULL; /* recall */ channel->recall_mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); channel->recall_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(channel->recall_mutex, attr); channel->play_mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); channel->play_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(channel->play_mutex, attr); channel->container = NULL; channel->recall = NULL; channel->play = NULL; /* link and recycling */ channel->link = NULL; channel->first_recycling = NULL; channel->last_recycling = NULL; /* pattern */ channel->pattern = NULL; /* data */ channel->line_widget = NULL; channel->file_data = NULL; } void ags_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsChannel *channel; channel = AGS_CHANNEL(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if((AgsAudio *) channel->audio == audio){ return; } if(channel->audio != NULL){ g_object_unref(G_OBJECT(channel->audio)); } if(audio != NULL){ g_object_ref(G_OBJECT(audio)); } channel->audio = (GObject *) audio; } break; case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); ags_channel_set_soundcard(channel, (GObject *) soundcard); } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); ags_channel_set_samplerate(channel, samplerate); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); ags_channel_set_buffer_size(channel, buffer_size); } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); ags_channel_set_format(channel, format); } break; case PROP_NOTE: { gchar *note; note = g_value_get_string(value); if(channel->note == note){ return; } if(channel->note != NULL){ g_free(channel->note); } channel->note = g_strdup(channel->note); } break; case PROP_PLAYBACK: { AgsPlayback *playback; playback = (AgsPlayback *) g_value_get_object(value); if(channel->playback == (GObject *) playback){ return; } if(channel->playback != NULL){ g_object_unref(channel->playback); } if(playback != NULL){ g_object_ref(playback); } channel->playback = (GObject *) playback; } break; case PROP_REMOTE_CHANNEL: { AgsRemoteChannel *remote_channel; remote_channel = (AgsRemoteChannel *) g_value_get_object(value); if(remote_channel == NULL || g_list_find(channel->remote_channel, remote_channel) != NULL){ return; } ags_channel_add_remote_channel(channel, (GObject *) remote_channel); } break; case PROP_RECALL_ID: { AgsRecallID *recall_id; recall_id = (AgsRecallID *) g_value_get_pointer(value); if(recall_id == NULL || g_list_find(channel->recall_id, recall_id) != NULL){ return; } ags_channel_add_recall_id(channel, recall_id); } break; case PROP_RECALL_CONTAINER: { AgsRecallContainer *recall_container; recall_container = (AgsRecallContainer *) g_value_get_pointer(value); if(recall_container == NULL || g_list_find(channel->container, recall_container) != NULL){ return; } ags_channel_add_recall_container(channel, (GObject *) recall_container); } break; case PROP_RECALL: { AgsRecall *recall; gboolean recall_added; recall = (AgsRecall *) g_value_get_pointer(value); pthread_mutex_lock(channel->recall_mutex); recall_added = (g_list_find(channel->recall, recall) != NULL) ? TRUE: FALSE; pthread_mutex_unlock(channel->recall_mutex); if(recall == NULL || recall_added){ return; } ags_channel_add_recall(channel, (GObject *) recall, FALSE); } break; case PROP_PLAY: { AgsRecall *play; gboolean play_added; play = (AgsRecall *) g_value_get_pointer(value); pthread_mutex_lock(channel->play_mutex); play_added = (g_list_find(channel->play, play) != NULL) ? TRUE: FALSE; pthread_mutex_unlock(channel->play_mutex); if(play == NULL || play_added){ return; } ags_channel_add_recall(channel, (GObject *) play, TRUE); } break; case PROP_LINK: { AgsChannel *link; link = (AgsChannel *) g_value_get_object(value); if(channel->link == link){ return; } ags_channel_set_link(channel, link, NULL); } break; case PROP_PATTERN: { AgsPattern *pattern; pattern = (AgsPattern *) g_value_get_pointer(value); if(pattern == NULL || g_list_find(channel->pattern, pattern) != NULL){ return; } ags_channel_add_pattern(channel, (GObject *) pattern); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsChannel *channel; channel = AGS_CHANNEL(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, channel->audio); } break; case PROP_SOUNDCARD: { g_value_set_object(value, channel->soundcard); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, channel->samplerate); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, channel->buffer_size); } break; case PROP_FORMAT: { g_value_set_uint(value, channel->format); } break; case PROP_PAD: { g_value_set_uint(value, channel->pad); } break; case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, channel->audio_channel); } break; case PROP_LINE: { g_value_set_uint(value, channel->line); } break; case PROP_NOTE: { g_value_set_string(value, channel->note); } break; case PROP_REMOTE_CHANNEL: { g_value_set_pointer(value, g_list_copy(channel->remote_channel)); } break; case PROP_PLAYBACK: { g_value_set_object(value, channel->playback); } break; case PROP_RECALL_ID: { g_value_set_pointer(value, g_list_copy(channel->recall_id)); } break; case PROP_RECALL_CONTAINER: { g_value_set_pointer(value, g_list_copy(channel->container)); } break; case PROP_RECALL: { pthread_mutex_lock(channel->recall_mutex); g_value_set_pointer(value, g_list_copy(channel->recall)); pthread_mutex_unlock(channel->recall_mutex); } break; case PROP_PLAY: { pthread_mutex_lock(channel->play_mutex); g_value_set_pointer(value, g_list_copy(channel->play)); pthread_mutex_unlock(channel->play_mutex); } break; case PROP_LINK: { g_value_set_object(value, channel->link); } break; case PROP_FIRST_RECYCLING: { g_value_set_object(value, channel->first_recycling); } break; case PROP_LAST_RECYCLING: { g_value_set_object(value, channel->last_recycling); } break; case PROP_PATTERN: { g_value_set_pointer(value, g_list_copy(channel->pattern)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_channel_add_to_registry(AgsConnectable *connectable) { AgsChannel *channel; AgsRegistry *registry; AgsRegistryEntry *entry; AgsApplicationContext *application_context; GList *list; channel = AGS_CHANNEL(connectable); application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(channel->soundcard)); registry = ags_service_provider_get_registry(AGS_SERVICE_PROVIDER(application_context)); if(registry != NULL){ entry = ags_registry_entry_alloc(registry); g_value_set_object(&(entry->entry), (gpointer) channel); ags_registry_add_entry(registry, entry); } /* add play */ list = channel->play; while(list != NULL){ ags_connectable_add_to_registry(AGS_CONNECTABLE(list->data)); list = list->next; } /* add recall */ list = channel->recall; while(list != NULL){ ags_connectable_add_to_registry(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_channel_remove_from_registry(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_channel_connect(AgsConnectable *connectable) { AgsChannel *channel; AgsRecycling *recycling; GList *list; channel = AGS_CHANNEL(connectable); if((AGS_CHANNEL_CONNECTED & (channel->flags)) != 0){ return; } channel->flags |= AGS_CHANNEL_CONNECTED; #ifdef AGS_DEBUG g_message("connecting channel"); #endif // ags_connectable_add_to_registry(connectable); /* connect recall ids */ list = channel->recall_id; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recall containers */ list = channel->container; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recalls */ list = channel->recall; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } list = channel->play; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recycling */ recycling = channel->first_recycling; if(recycling != NULL){ while(recycling != channel->last_recycling->next){ ags_connectable_connect(AGS_CONNECTABLE(recycling)); recycling = recycling->next; } } /* connect pattern and notation */ list = channel->pattern; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_channel_disconnect(AgsConnectable *connectable) { AgsChannel *channel; AgsRecycling *recycling; GList *list; channel = AGS_CHANNEL(connectable); if((AGS_CHANNEL_CONNECTED & (channel->flags)) == 0){ return; } channel->flags &= (~AGS_CHANNEL_CONNECTED); #ifdef AGS_DEBUG g_message("disconnecting channel"); #endif // ags_connectable_add_to_registry(connectable); /* connect recall ids */ list = channel->recall_id; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recall containers */ list = channel->container; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recalls */ list = channel->recall; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } list = channel->play; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recycling */ recycling = channel->first_recycling; if(recycling != NULL){ while(recycling != channel->last_recycling->next){ ags_connectable_disconnect(AGS_CONNECTABLE(recycling)); recycling = recycling->next; } } /* connect pattern and notation */ list = channel->pattern; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_channel_dispose(GObject *gobject) { AgsChannel *channel; AgsRecycling *recycling, *recycling_next; AgsRecycling *end_region; GList *list, *list_next; gboolean dispose_recycling; channel = AGS_CHANNEL(gobject); /* audio */ dispose_recycling = FALSE; if(channel->audio != NULL){ if(((AGS_AUDIO_INPUT_HAS_RECYCLING & (AGS_AUDIO(channel->audio)->flags)) != 0 && AGS_IS_INPUT(channel) && channel->link == NULL) || ((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (AGS_AUDIO(channel->audio)->flags)) != 0 && AGS_IS_OUTPUT(channel))){ dispose_recycling = TRUE; } g_object_unref(channel->audio); channel->audio = NULL; } /* soundcard */ if(channel->soundcard != NULL){ g_object_unref(channel->soundcard); channel->soundcard = NULL; } /* recycling */ recycling = channel->first_recycling; if(recycling != NULL){ end_region = channel->last_recycling->next; while(recycling != end_region){ recycling_next = recycling->next; if(dispose_recycling){ g_object_run_dispose(recycling); g_object_unref((GObject *) recycling); } recycling = recycling_next; } channel->first_recycling = NULL; channel->last_recycling = NULL; } /* remote channel */ if(channel->remote_channel != NULL){ list = channel->remote_channel; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(channel->remote_channel, g_object_unref); channel->remote_channel = NULL; } /* playback */ if(channel->playback != NULL){ AgsPlayback *playback; playback = channel->playback; if(playback->channel_thread != NULL){ if(playback->channel_thread[0] != NULL){ ags_thread_stop(playback->channel_thread[0]); } if(playback->channel_thread[1] != NULL){ ags_thread_stop(playback->channel_thread[1]); } if(playback->channel_thread[2] != NULL){ ags_thread_stop(playback->channel_thread[2]); } } g_object_set(playback, "source", NULL, NULL); // g_object_run_dispose(playback); g_object_unref(playback); channel->playback = NULL; } /* recall id */ if(channel->recall_id != NULL){ list = channel->recall_id; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(channel->recall_id, g_object_unref); channel->recall_id = NULL; } /* recall container */ if(channel->container != NULL){ list = channel->container; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(channel->container, g_object_unref); channel->container = NULL; } /* recall */ if(channel->recall != NULL){ pthread_mutex_lock(channel->recall_mutex); list = channel->recall; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(channel->recall, g_object_unref); channel->recall = NULL; pthread_mutex_unlock(channel->recall_mutex); } /* play */ if(channel->play != NULL){ pthread_mutex_lock(channel->play_mutex); list = channel->play; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(channel->play, g_object_unref); channel->play = NULL; pthread_mutex_unlock(channel->play_mutex); } /* pattern */ if(channel->remote_channel != NULL){ list = channel->pattern; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(channel->pattern, g_object_unref); channel->pattern = NULL; } /* call parent */ G_OBJECT_CLASS(ags_channel_parent_class)->dispose(gobject); } void ags_channel_finalize(GObject *gobject) { AgsChannel *channel; AgsRecycling *recycling, *recycling_next; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); channel = AGS_CHANNEL(gobject); pthread_mutexattr_destroy(channel->obj_mutexattr); free(channel->obj_mutexattr); /* audio */ if(channel->audio != NULL){ g_object_unref(channel->audio); } /* soundcard */ if(channel->soundcard != NULL){ g_object_unref(channel->soundcard); } /* recycling */ recycling = channel->first_recycling; if(recycling != NULL){ while(recycling != channel->last_recycling->next){ recycling_next = recycling->next; g_object_unref((GObject *) recycling); recycling = recycling_next; } } /* key string */ if(channel->note != NULL){ free(channel->note); } /* remote channel */ if(channel->remote_channel != NULL){ g_list_free_full(channel->remote_channel, g_object_unref); } /* playback */ if(channel->playback != NULL){ g_object_unref(channel->playback); } /* recall id */ g_list_free_full(channel->recall_id, g_object_unref); /* recall */ g_list_free_full(channel->container, g_object_unref); g_list_free_full(channel->recall, g_object_unref); g_list_free_full(channel->play, g_object_unref); pthread_mutex_destroy(channel->recall_mutex); free(channel->recall_mutex); pthread_mutexattr_destroy(channel->recall_mutexattr); free(channel->recall_mutexattr); pthread_mutex_destroy(channel->play_mutex); free(channel->play_mutex); pthread_mutexattr_destroy(channel->play_mutexattr); free(channel->play_mutexattr); free(channel->play_mutex); /* pattern */ g_list_free_full(channel->pattern, g_object_unref); /* call parent class */ G_OBJECT_CLASS(ags_channel_parent_class)->finalize(gobject); } AgsRecall* ags_channel_find_recall(AgsChannel *channel, char *effect, char *name) { AgsRecall *recall; GList *list; //TODO:JK: implement me /* */ return(NULL); } /** * ags_channel_first: * @channel: an #AgsChannel * * Iterates until the first #AgsChannel was found. * * Returns: the first #AgsChannel * * Since: 1.0.0 */ AgsChannel* ags_channel_first(AgsChannel *channel) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return(NULL); } /* first */ channel = ags_channel_pad_first(channel); /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* iterate */ while(channel != NULL){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(channel->prev == NULL){ pthread_mutex_unlock(mutex); break; }else{ channel = channel->prev; pthread_mutex_unlock(mutex); } } return(channel); } /** * ags_channel_last: * @channel: an #AgsChannel * * Iterates until the last #AgsChannel was found. * * Returns: the last #AgsChannel * * Since: 1.0.0 */ AgsChannel* ags_channel_last(AgsChannel *channel) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return(NULL); } /* last */ channel = ags_channel_pad_last(channel); /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* iterate */ while(channel != NULL){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(channel->next == NULL){ pthread_mutex_unlock(mutex); break; }else{ channel = channel->next; pthread_mutex_unlock(mutex); } } return(channel); } /** * ags_channel_nth: * @channel: an #AgsChannel * @nth: the count to iterate * * Iterates @nth times forward. * * Returns: the nth #AgsChannel * * Since: 1.0.0 */ AgsChannel* ags_channel_nth(AgsChannel *channel, guint nth) { AgsMutexManager *mutex_manager; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return(NULL); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* nth */ for(i = 0; i < nth && channel != NULL; i++){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); channel = channel->next; pthread_mutex_unlock(mutex); } #ifdef AGS_DEBUG if((nth != 0 && i != nth) || channel == NULL){ g_message("ags_channel_nth:\n nth channel does not exist\n `- stopped @: i = %u; nth = %u\n", i, nth); } #endif return(channel); } /** * ags_channel_pad_first: * @channel: an #AgsChannel * * Iterates until the first pad has been reached. * * Returns: the first #AgsChannel with the same audio_channel as @channel * * Since: 1.0.0 */ AgsChannel* ags_channel_pad_first(AgsChannel *channel) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return(NULL); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); pthread_mutex_unlock(application_mutex); /* pad first */ while(channel != NULL){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(channel->prev_pad == NULL){ pthread_mutex_unlock(mutex); break; } channel = channel->prev_pad; pthread_mutex_unlock(mutex); } return(channel); } /** * ags_channel_pad_last: * @channel: an #AgsChannel * * Iterates until the last pad has been reached. * * Returns: the last #AgsChannel with the same audio_channel as @channel * * Since: 1.0.0 */ AgsChannel* ags_channel_pad_last(AgsChannel *channel) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return(NULL); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); while(channel != NULL){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(channel->next_pad == NULL){ pthread_mutex_unlock(mutex); break; }else{ channel = channel->next_pad; pthread_mutex_unlock(mutex); } } return(channel); } /** * ags_channel_pad_nth: * @channel: an #AgsChannel * @nth: the count of pads to step * * Iterates nth times. * * Returns: the nth pad * * Since: 1.0.0 */ AgsChannel* ags_channel_pad_nth(AgsChannel *channel, guint nth) { AgsMutexManager *mutex_manager; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* pad nth */ for(i = 0; i < nth && channel != NULL; i++){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); channel = channel->next_pad; pthread_mutex_unlock(mutex); } #ifdef AGS_DEBUG if(channel == NULL){ g_message("ags_channel_nth_pad:\n nth pad does not exist\n `- stopped @: i = %u; nth = %u", i, nth); } #endif return(channel); } /** * ags_channel_first_with_recycling: * @channel: an #AgsChannel * * Iterates over pads forwards as long as there is no #AgsRecycling on the #AgsChannel. * * Returns: the first channel with an #AgsRecycling * * Since: 1.0.0 */ AgsChannel* ags_channel_first_with_recycling(AgsChannel *channel) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return(NULL); } channel = ags_channel_pad_first(channel); /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* first with recycling */ while(channel != NULL){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(channel->first_recycling != NULL){ pthread_mutex_unlock(mutex); break; } channel = channel->next_pad; pthread_mutex_unlock(mutex); } return(channel); } /** * ags_channel_last_with_recycling: * @channel: an #AgsChannel * * Iterates over pads backwards as long as there is no #AgsRecycling on the #AgsChannel. * * Returns: the last channel with an #AgsRecycling * * Since: 1.0.0 */ AgsChannel* ags_channel_last_with_recycling(AgsChannel *channel) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return(NULL); } channel = ags_channel_pad_last(channel); /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* last with recycling */ while(channel != NULL){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(channel->last_recycling != NULL){ pthread_mutex_unlock(mutex); break; } channel = channel->prev_pad; pthread_mutex_unlock(mutex); } return(channel); } AgsChannel* ags_channel_prev_with_recycling(AgsChannel *channel) { AgsChannel *current; AgsRecycling *recycling; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return(NULL); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* prev with recycling */ pthread_mutex_lock(mutex); current = channel->prev_pad; pthread_mutex_unlock(mutex); while(current != NULL && current != channel){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); recycling = current->last_recycling; pthread_mutex_unlock(mutex); if(recycling != NULL){ break; } pthread_mutex_lock(mutex); current = current->prev_pad; pthread_mutex_unlock(mutex); } if(current == channel){ return(NULL); }else{ return(current); } } AgsChannel* ags_channel_next_with_recycling(AgsChannel *channel) { AgsChannel *current; AgsRecycling *recycling; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return(NULL); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* next with recycling */ pthread_mutex_lock(mutex); current = channel->next_pad; pthread_mutex_unlock(mutex); while(current != NULL && current != channel){ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); recycling = current->first_recycling; pthread_mutex_unlock(mutex); if(recycling != NULL){ break; } pthread_mutex_lock(mutex); current = current->next_pad; pthread_mutex_unlock(mutex); } if(current == channel){ return(NULL); }else{ return(current); } } /** * ags_channel_set_soundcard: * @channel: an #AgsChannel * @soundcard: an #GObject * * Sets soundcard. * * Since: 1.0.0 */ void ags_channel_set_soundcard(AgsChannel *channel, GObject *soundcard) { AgsMutexManager *mutex_manager; GList *list; guint samplerate; guint buffer_size; guint format; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL){ return; } /* channel */ if(channel->soundcard == soundcard){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply new soundcard */ pthread_mutex_lock(mutex); if(channel->soundcard != NULL){ g_object_unref(channel->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } channel->soundcard = (GObject *) soundcard; ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, &buffer_size, &format); g_object_set(channel, "samplerate", samplerate, "buffer-size", buffer_size, "format", format, NULL); /* playback */ if(AGS_PLAYBACK(channel->playback)->channel_thread[0] != NULL){ g_object_set(AGS_PLAYBACK(channel->playback)->channel_thread[0], "soundcard", soundcard, NULL); } if(AGS_PLAYBACK(channel->playback)->channel_thread[1] != NULL){ g_object_set(AGS_PLAYBACK(channel->playback)->channel_thread[1], "soundcard", soundcard, NULL); } if(AGS_PLAYBACK(channel->playback)->channel_thread[2] != NULL){ g_object_set(AGS_PLAYBACK(channel->playback)->channel_thread[2], "soundcard", soundcard, NULL); } /* recall */ list = channel->play; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", soundcard, NULL); list = list->next; } list = channel->recall; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", soundcard, NULL); list = list->next; } /* AgsRecycling */ if((AGS_IS_OUTPUT(channel) && (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (AGS_AUDIO(channel->audio)->flags)) != 0) || ((AGS_IS_INPUT(channel) && (AGS_AUDIO_INPUT_HAS_RECYCLING & (AGS_AUDIO(channel->audio)->flags)) != 0))){ AgsRecycling *recycling; recycling = channel->first_recycling; if(recycling != NULL){ while(recycling != channel->last_recycling->next){ g_object_set(G_OBJECT(recycling), "soundcard", soundcard, NULL); recycling = recycling->next; } } } pthread_mutex_unlock(mutex); } /** * ags_audio_set_samplerate: * @audio: the #AgsAudio * @samplerate: the samplerate * * Sets buffer length. * * Since: 1.0.0 */ void ags_channel_set_samplerate(AgsChannel *channel, guint samplerate) { AgsAudio *audio; AgsConfig *config; gchar *str0, *str1; gdouble freq; auto void ags_channel_set_samplerate_audio_signal(GList *audio_signal, guint samplerate); void ags_channel_set_samplerate_audio_signal(GList *audio_signal, guint samplerate){ AgsAudioSignal *template; template = ags_audio_signal_get_template(audio_signal); if(template != NULL){ ags_audio_signal_set_samplerate(template, samplerate); } } audio = (AgsAudio *) channel->audio; channel->samplerate = samplerate; /* reset threads */ config = ags_config_get_instance(); freq = ceil((gdouble) audio->samplerate / (gdouble) audio->buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; str0 = ags_config_get_value(config, AGS_CONFIG_THREAD, "model"); str1 = ags_config_get_value(config, AGS_CONFIG_THREAD, "super-threaded-scope"); if(str0 != NULL && str1 != NULL){ if(!g_ascii_strncasecmp(str0, "super-threaded", 15)){ if(!g_ascii_strncasecmp(str1, "channel", 8) || !g_ascii_strncasecmp(str1, "recycling", 10)){ g_object_set(AGS_PLAYBACK(channel->playback)->channel_thread[0], "frequency", freq, NULL); g_object_set(AGS_PLAYBACK(channel->playback)->channel_thread[1], "frequency", freq, NULL); g_object_set(AGS_PLAYBACK(channel->playback)->channel_thread[2], "frequency", freq, NULL); } } } g_free(str0); g_free(str1); /* reset recycling */ if(audio != NULL){ AgsRecycling *recycling; GList *audio_signal; if(AGS_IS_OUTPUT(channel) && (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){ recycling = channel->first_recycling; if(recycling != NULL){ ags_channel_set_samplerate_audio_signal(recycling->audio_signal, samplerate); } } if(AGS_IS_INPUT(channel) && channel->link == NULL && (AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ recycling = channel->first_recycling; if(AGS_INPUT(channel)->file_link == NULL){ if(recycling != NULL){ ags_channel_set_samplerate_audio_signal(recycling->audio_signal, samplerate); } }else{ AgsFileLink *file_link; file_link = (AgsFileLink *) AGS_INPUT(channel)->file_link; ags_input_open_file(AGS_INPUT(channel), file_link->filename, AGS_AUDIO_FILE_LINK(file_link)->preset, AGS_AUDIO_FILE_LINK(file_link)->instrument, AGS_AUDIO_FILE_LINK(file_link)->sample, AGS_AUDIO_FILE_LINK(file_link)->audio_channel); } } } } /** * ags_audio_set_buffer_size: * @audio: the #AgsAudio * @buffer_size: the buffer_size * * Sets buffer length. * * Since: 1.0.0 */ void ags_channel_set_buffer_size(AgsChannel *channel, guint buffer_size) { AgsAudio *audio; AgsConfig *config; gchar *str0, *str1; gdouble freq; auto void ags_channel_set_buffer_size_audio_signal(GList *audio_signal, guint buffer_size); void ags_channel_set_buffer_size_audio_signal(GList *audio_signal, guint buffer_size){ AgsAudioSignal *template; template = ags_audio_signal_get_template(audio_signal); if(template != NULL){ ags_audio_signal_set_buffer_size(template, buffer_size); } } audio = (AgsAudio *) channel->audio; channel->buffer_size = buffer_size; /* reset threads */ config = ags_config_get_instance(); freq = ceil((gdouble) audio->samplerate / (gdouble) audio->buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; str0 = ags_config_get_value(config, AGS_CONFIG_THREAD, "model"); str1 = ags_config_get_value(config, AGS_CONFIG_THREAD, "super-threaded-scope"); if(str0 != NULL && str1 != NULL){ if(!g_ascii_strncasecmp(str0, "super-threaded", 15)){ if(!g_ascii_strncasecmp(str1, "channel", 8) || !g_ascii_strncasecmp(str1, "recycling", 10)){ g_object_set(AGS_PLAYBACK(channel->playback)->channel_thread[0], "frequency", freq, NULL); g_object_set(AGS_PLAYBACK(channel->playback)->channel_thread[1], "frequency", freq, NULL); g_object_set(AGS_PLAYBACK(channel->playback)->channel_thread[2], "frequency", freq, NULL); } } } g_free(str0); g_free(str1); /* reset recycling */ if(audio != NULL){ AgsRecycling *recycling; GList *audio_signal; if(AGS_IS_OUTPUT(channel) && (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){ recycling = channel->first_recycling; if(recycling != NULL){ ags_channel_set_buffer_size_audio_signal(recycling->audio_signal, buffer_size); } } if(AGS_IS_INPUT(channel) && channel->link == NULL && (AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ recycling = channel->first_recycling; if(AGS_INPUT(channel)->file_link == NULL){ if(recycling != NULL){ ags_channel_set_buffer_size_audio_signal(recycling->audio_signal, buffer_size); } }else{ AgsFileLink *file_link; file_link = (AgsFileLink *) AGS_INPUT(channel)->file_link; ags_input_open_file(AGS_INPUT(channel), file_link->filename, AGS_AUDIO_FILE_LINK(file_link)->preset, AGS_AUDIO_FILE_LINK(file_link)->instrument, AGS_AUDIO_FILE_LINK(file_link)->sample, AGS_AUDIO_FILE_LINK(file_link)->audio_channel); } } } } /** * ags_audio_set_format: * @audio: the #AgsAudio * @format: the format * * Sets buffer length. * * Since: 1.0.0 */ void ags_channel_set_format(AgsChannel *channel, guint format) { AgsAudio *audio; auto void ags_channel_set_format_audio_signal(GList *audio_signal, guint format); void ags_channel_set_format_audio_signal(GList *audio_signal, guint format){ AgsAudioSignal *template; template = ags_audio_signal_get_template(audio_signal); if(template != NULL){ ags_audio_signal_set_format(template, format); } } audio = (AgsAudio *) channel->audio; channel->format = format; if(audio != NULL){ AgsRecycling *recycling; GList *audio_signal; if(AGS_IS_OUTPUT(channel) && (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){ recycling = channel->first_recycling; if(recycling != NULL){ ags_channel_set_format_audio_signal(recycling->audio_signal, format); } } if(AGS_IS_INPUT(channel) && channel->link == NULL && (AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ recycling = channel->first_recycling; if(AGS_INPUT(channel)->file_link == NULL){ if(recycling != NULL){ ags_channel_set_format_audio_signal(recycling->audio_signal, format); } }else{ AgsFileLink *file_link; file_link = (AgsFileLink *) AGS_INPUT(channel)->file_link; ags_input_open_file(AGS_INPUT(channel), file_link->filename, AGS_AUDIO_FILE_LINK(file_link)->preset, AGS_AUDIO_FILE_LINK(file_link)->instrument, AGS_AUDIO_FILE_LINK(file_link)->sample, AGS_AUDIO_FILE_LINK(file_link)->audio_channel); ags_channel_set_format_audio_signal(recycling->audio_signal, format); } } } } /** * ags_channel_add_remote_channel: * @channel: an #AgsChannel * @remote_channel: the #AgsRemoteChannel * * Adds a remote channel. * * Since: 1.0.0 */ void ags_channel_add_remote_channel(AgsChannel *channel, GObject *remote_channel) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || remote_channel == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall id */ pthread_mutex_lock(mutex); g_object_ref(G_OBJECT(remote_channel)); channel->remote_channel = g_list_prepend(channel->remote_channel, remote_channel); pthread_mutex_unlock(mutex); } /** * ags_channel_remove_remote_channel: * @channel: an #AgsChannel * @remote_channel: the #AgsRemoteChannel * * Removes a remote channel. * * Since: 1.0.0 */ void ags_channel_remove_remote_channel(AgsChannel *channel, GObject *remote_channel) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || remote_channel == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* remove recall id */ pthread_mutex_lock(mutex); channel->remote_channel = g_list_remove(channel->remote_channel, remote_channel); g_object_unref(G_OBJECT(remote_channel)); pthread_mutex_unlock(mutex); } /** * ags_channel_add_recall_id: * @channel: an #AgsChannel * @recall_id: the #AgsRecallID * * Adds a recall id. * * Since: 1.0.0 */ void ags_channel_add_recall_id(AgsChannel *channel, AgsRecallID *recall_id) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall id */ pthread_mutex_lock(mutex); g_object_ref(G_OBJECT(recall_id)); channel->recall_id = g_list_prepend(channel->recall_id, recall_id); pthread_mutex_unlock(mutex); } /** * ags_channel_remove_recall_id: * @channel: an #AgsChannel * @recall_id: the #AgsRecallID * * Removes a recall id. * * Since: 1.0.0 */ void ags_channel_remove_recall_id(AgsChannel *channel, AgsRecallID *recall_id) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* remove recall id */ pthread_mutex_lock(mutex); channel->recall_id = g_list_remove(channel->recall_id, recall_id); g_object_unref(G_OBJECT(recall_id)); pthread_mutex_unlock(mutex); } /** * ags_channel_add_recall_container: * @channel: an #AgsChannel * @recall_container: the #AgsRecallContainer * * Adds a recall container. * * Since: 1.0.0 */ void ags_channel_add_recall_container(AgsChannel *channel, GObject *recall_container) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_container == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ pthread_mutex_lock(mutex); g_object_ref(G_OBJECT(recall_container)); channel->container = g_list_prepend(channel->container, recall_container); pthread_mutex_unlock(mutex); } /** * ags_channel_remove_recall_container: * @channel: an #AgsChannel * @recall_container: the #AgsRecallContainer * * Removes a recall container. * * Since: 1.0.0 */ void ags_channel_remove_recall_container(AgsChannel *channel, GObject *recall_container) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_container == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* remove recall container */ pthread_mutex_lock(mutex); channel->container = g_list_remove(channel->container, recall_container); g_object_unref(G_OBJECT(recall_container)); pthread_mutex_unlock(mutex); } /** * ags_channel_add_recall: * @channel: an #AgsChannel * @recall: the #AgsRecall * @play: %TRUE if simple playback. * * Adds a recall. * * Since: 1.0.0 */ void ags_channel_add_recall(AgsChannel *channel, GObject *recall, gboolean play) { if(channel == NULL || recall == NULL){ return; } /* add recall */ g_object_ref(recall); if(play){ pthread_mutex_lock(channel->play_mutex); channel->play = g_list_prepend(channel->play, recall); pthread_mutex_unlock(channel->play_mutex); }else{ pthread_mutex_lock(channel->recall_mutex); channel->recall = g_list_prepend(channel->recall, recall); pthread_mutex_unlock(channel->recall_mutex); } } /** * ags_channel_remove_recall: * @channel: an #AgsChannel * @recall: the #AgsRecall * @play: %TRUE if simple playback. * * Removes a recall. * * Since: 1.0.0 */ void ags_channel_remove_recall(AgsChannel *channel, GObject *recall, gboolean play) { if(channel == NULL || recall == NULL){ return; } /* remove recall */ if(play){ pthread_mutex_lock(channel->play_mutex); channel->play = g_list_remove(channel->play, recall); pthread_mutex_unlock(channel->play_mutex); }else{ pthread_mutex_lock(channel->recall_mutex); channel->recall = g_list_remove(channel->recall, recall); pthread_mutex_unlock(channel->recall_mutex); } g_object_unref(G_OBJECT(recall)); } /** * ags_channel_remove_pattern: * @channel: an #AgsChannel * @pattern: the #AgsPattern * * Removes a pattern. * * Since: 1.0.0 */ void ags_channel_add_pattern(AgsChannel *channel, GObject *pattern) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || pattern == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* pattern */ pthread_mutex_lock(mutex); g_object_ref(pattern); channel->pattern = g_list_prepend(channel->pattern, pattern); pthread_mutex_unlock(mutex); } /** * ags_channel_remove_pattern: * @channel: an #AgsChannel * @pattern: the #AgsPattern * * Removes a pattern. * * Since: 1.0.0 */ void ags_channel_remove_pattern(AgsChannel *channel, GObject *pattern) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || pattern == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* remove pattern */ pthread_mutex_lock(mutex); channel->pattern = g_list_remove(channel->pattern, pattern); g_object_unref(G_OBJECT(pattern)); pthread_mutex_unlock(mutex); } GList* ags_channel_get_recall_by_effect(AgsChannel *channel, gchar *filename, gchar *effect) { AgsRecall *recall; GList *list, *tmp; list = ags_recall_get_by_effect(channel->play, filename, effect); tmp = ags_recall_get_by_effect(channel->play, filename, effect); if(tmp != NULL){ if(list != NULL){ list = g_list_concat(list, tmp); }else{ list = tmp; } } return(list); } GList* ags_channel_add_ladspa_effect(AgsChannel *channel, gchar *filename, gchar *effect) { GObject *soundcard; AgsAudio *audio; AgsRecallContainer *recall_container; AgsRecallChannelRunDummy *recall_channel_run_dummy; AgsRecallLadspa *recall_ladspa; AgsLadspaManager *ladspa_manager; AgsLadspaPlugin *ladspa_plugin; AgsMutexManager *mutex_manager; GList *port; void *plugin_so; LADSPA_Descriptor_Function ladspa_descriptor; LADSPA_Descriptor *plugin_descriptor; unsigned long effect_index; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; audio = (AgsAudio *) channel->audio; pthread_mutex_unlock(channel_mutex); /* load plugin */ ladspa_manager = ags_ladspa_manager_get_instance(); ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ladspa_manager, filename, effect); effect_index = AGS_BASE_PLUGIN(ladspa_plugin)->effect_index; /* ladspa play */ recall_container = ags_recall_container_new(); ags_channel_add_recall_container(channel, (GObject *) recall_container); recall_ladspa = ags_recall_ladspa_new(channel, filename, effect, effect_index); g_object_set(G_OBJECT(recall_ladspa), "soundcard", soundcard, "recall-container", recall_container, NULL); AGS_RECALL(recall_ladspa)->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, (GObject *) recall_ladspa, TRUE); /* load */ ags_recall_ladspa_load(recall_ladspa); port = ags_recall_ladspa_load_ports(recall_ladspa); /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LADSPA_RUN); AGS_RECALL(recall_channel_run_dummy)->flags |= AGS_RECALL_TEMPLATE; g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "recall-container", recall_container, "recall-channel", recall_ladspa, NULL); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, TRUE); /* check if connected or running */ pthread_mutex_lock(channel_mutex); if((AGS_CHANNEL_CONNECTED & (channel->flags)) != 0){ AgsRecall *current; GList *recall_id; ags_connectable_connect(AGS_CONNECTABLE(recall_container)); ags_connectable_connect(AGS_CONNECTABLE(recall_ladspa)); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); recall_id = channel->recall_id; while(recall_id != NULL){ if(AGS_RECALL_ID(recall_id->data)->recycling_context->parent == NULL){ current = ags_recall_duplicate((AgsRecall *) recall_channel_run_dummy, (AgsRecallID *) recall_id->data); /* set appropriate flag */ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_PLAYBACK); }else if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_SEQUENCER); }else if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_NOTATION); } /* append to AgsAudio */ channel->play = g_list_append(channel->play, current); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(current)); /* notify run */ ags_recall_notify_dependency(current, AGS_RECALL_NOTIFY_RUN, 1); /* resolve */ ags_recall_resolve_dependencies(current); /* init */ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(current)); current->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(current); current->flags &= (~AGS_RECALL_REMOVE); ags_recall_run_init_inter(current); ags_recall_run_init_post(current); ags_recall_check_rt_stream(current); } /* iterate */ recall_id = recall_id->next; } } pthread_mutex_unlock(channel_mutex); /* ladspa recall */ recall_container = ags_recall_container_new(); ags_channel_add_recall_container(channel, (GObject *) recall_container); recall_ladspa = ags_recall_ladspa_new(channel, filename, effect, effect_index); g_object_set(G_OBJECT(recall_ladspa), "soundcard", soundcard, "recall-container", recall_container, NULL); ags_channel_add_recall(channel, (GObject *) recall_ladspa, FALSE); AGS_RECALL(recall_ladspa)->flags |= AGS_RECALL_TEMPLATE; ags_recall_ladspa_load(recall_ladspa); if(port != NULL){ port = g_list_concat(port, ags_recall_ladspa_load_ports(recall_ladspa)); } /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LADSPA_RUN); AGS_RECALL(recall_channel_run_dummy)->flags |= AGS_RECALL_TEMPLATE; g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "recall-container", recall_container, "recall-channel", recall_ladspa, NULL); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, FALSE); pthread_mutex_lock(channel_mutex); if((AGS_CHANNEL_CONNECTED & (channel->flags)) != 0){ AgsRecall *current; GList *recall_id; ags_connectable_connect(AGS_CONNECTABLE(recall_container)); ags_connectable_connect(AGS_CONNECTABLE(recall_ladspa)); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); recall_id = channel->recall_id; while(recall_id != NULL){ if(AGS_RECALL_ID(recall_id->data)->recycling_context->parent != NULL){ current = ags_recall_duplicate((AgsRecall *) recall_channel_run_dummy, (AgsRecallID *) recall_id->data); /* set appropriate flag */ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_PLAYBACK); }else if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_SEQUENCER); }else if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_NOTATION); } /* append to AgsAudio */ channel->recall = g_list_append(channel->recall, current); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(current)); /* notify run */ ags_recall_notify_dependency(current, AGS_RECALL_NOTIFY_RUN, 1); /* resolve */ ags_recall_resolve_dependencies(current); /* init */ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(current)); current->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(current); current->flags &= (~AGS_RECALL_REMOVE); ags_recall_run_init_inter(current); ags_recall_run_init_post(current); ags_recall_check_rt_stream(current); } /* iterate */ recall_id = recall_id->next; } } pthread_mutex_unlock(channel_mutex); return(port); } GList* ags_channel_add_dssi_effect(AgsChannel *channel, gchar *filename, gchar *effect) { GObject *soundcard; AgsAudio *audio; AgsRecallContainer *recall_container; AgsRecallChannelRunDummy *recall_channel_run_dummy; AgsRecallDssi *recall_dssi; AgsDssiManager *dssi_manager; AgsDssiPlugin *dssi_plugin; AgsMutexManager *mutex_manager; GList *port; void *plugin_so; DSSI_Descriptor_Function dssi_descriptor; DSSI_Descriptor *plugin_descriptor; unsigned long effect_index; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; audio = (AgsAudio *) channel->audio; pthread_mutex_unlock(channel_mutex); /* load plugin */ dssi_manager = ags_dssi_manager_get_instance(); dssi_plugin = ags_dssi_manager_find_dssi_plugin(dssi_manager, filename, effect); effect_index = AGS_BASE_PLUGIN(dssi_plugin)->effect_index; /* dssi play */ recall_container = ags_recall_container_new(); ags_channel_add_recall_container(channel, (GObject *) recall_container); recall_dssi = ags_recall_dssi_new(channel, filename, effect, effect_index); g_object_set(G_OBJECT(recall_dssi), "soundcard", soundcard, "recall-container", recall_container, NULL); AGS_RECALL(recall_dssi)->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, (GObject *) recall_dssi, TRUE); /* load */ ags_recall_dssi_load(recall_dssi); port = ags_recall_dssi_load_ports(recall_dssi); /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_DSSI_RUN); AGS_RECALL(recall_channel_run_dummy)->flags |= AGS_RECALL_TEMPLATE; g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "recall-container", recall_container, "recall-channel", recall_dssi, NULL); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, TRUE); /* check if connected or running */ pthread_mutex_lock(channel_mutex); if((AGS_CHANNEL_CONNECTED & (channel->flags)) != 0){ AgsRecall *current; GList *recall_id; ags_connectable_connect(AGS_CONNECTABLE(recall_container)); ags_connectable_connect(AGS_CONNECTABLE(recall_dssi)); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); recall_id = channel->recall_id; while(recall_id != NULL){ if(AGS_RECALL_ID(recall_id->data)->recycling_context->parent == NULL){ current = ags_recall_duplicate((AgsRecall *) recall_channel_run_dummy, (AgsRecallID *) recall_id->data); /* set appropriate flag */ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_PLAYBACK); }else if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_SEQUENCER); }else if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_NOTATION); } /* append to AgsAudio */ channel->play = g_list_append(channel->play, current); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(current)); /* notify run */ ags_recall_notify_dependency(current, AGS_RECALL_NOTIFY_RUN, 1); /* resolve */ ags_recall_resolve_dependencies(current); /* init */ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(current)); current->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(current); current->flags &= (~AGS_RECALL_REMOVE); ags_recall_run_init_inter(current); ags_recall_run_init_post(current); ags_recall_check_rt_stream(current); } /* iterate */ recall_id = recall_id->next; } } pthread_mutex_unlock(channel_mutex); /* dssi recall */ recall_container = ags_recall_container_new(); ags_channel_add_recall_container(channel, (GObject *) recall_container); recall_dssi = ags_recall_dssi_new(channel, filename, effect, effect_index); g_object_set(G_OBJECT(recall_dssi), "soundcard", soundcard, "recall-container", recall_container, NULL); ags_channel_add_recall(channel, (GObject *) recall_dssi, FALSE); AGS_RECALL(recall_dssi)->flags |= AGS_RECALL_TEMPLATE; ags_recall_dssi_load(recall_dssi); if(port != NULL){ port = g_list_concat(port, ags_recall_dssi_load_ports(recall_dssi)); } /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_DSSI_RUN); AGS_RECALL(recall_channel_run_dummy)->flags |= AGS_RECALL_TEMPLATE; g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "recall-container", recall_container, "recall-channel", recall_dssi, NULL); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, FALSE); pthread_mutex_lock(channel_mutex); if((AGS_CHANNEL_CONNECTED & (channel->flags)) != 0){ AgsRecall *current; GList *recall_id; ags_connectable_connect(AGS_CONNECTABLE(recall_container)); ags_connectable_connect(AGS_CONNECTABLE(recall_dssi)); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); recall_id = channel->recall_id; while(recall_id != NULL){ if(AGS_RECALL_ID(recall_id->data)->recycling_context->parent != NULL){ current = ags_recall_duplicate((AgsRecall *) recall_channel_run_dummy, (AgsRecallID *) recall_id->data); /* set appropriate flag */ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_PLAYBACK); }else if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_SEQUENCER); }else if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_NOTATION); } /* append to AgsAudio */ channel->recall = g_list_append(channel->recall, current); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(current)); /* notify run */ ags_recall_notify_dependency(current, AGS_RECALL_NOTIFY_RUN, 1); /* resolve */ ags_recall_resolve_dependencies(current); /* init */ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(current)); current->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(current); current->flags &= (~AGS_RECALL_REMOVE); ags_recall_run_init_inter(current); ags_recall_run_init_post(current); ags_recall_check_rt_stream(current); } /* iterate */ recall_id = recall_id->next; } } pthread_mutex_unlock(channel_mutex); return(port); } GList* ags_channel_add_lv2_effect(AgsChannel *channel, gchar *filename, gchar *effect) { GObject *soundcard; AgsAudio *audio; AgsRecallContainer *recall_container; AgsRecallChannelRunDummy *recall_channel_run_dummy; AgsRecallLv2 *recall_lv2; AgsLv2Manager *lv2_manager; AgsLv2Plugin *lv2_plugin; AgsMutexManager *mutex_manager; GList *uri_node; GList *port; gchar *uri; gchar *str; void *plugin_so; LV2_Descriptor_Function lv2_descriptor; LV2_Descriptor *plugin_descriptor; uint32_t effect_index; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; audio = (AgsAudio *) channel->audio; pthread_mutex_unlock(channel_mutex); /* find plugin */ lv2_manager = ags_lv2_manager_get_instance(); lv2_plugin = ags_lv2_manager_find_lv2_plugin(lv2_manager, filename, effect); effect_index = AGS_BASE_PLUGIN(lv2_plugin)->effect_index; uri = lv2_plugin->uri; /* lv2 play */ recall_container = ags_recall_container_new(); ags_channel_add_recall_container(channel, (GObject *) recall_container); recall_lv2 = ags_recall_lv2_new(channel, lv2_plugin->turtle, filename, effect, uri, effect_index); g_object_set(G_OBJECT(recall_lv2), "soundcard", AGS_AUDIO(channel->audio)->soundcard, "recall-container", recall_container, NULL); AGS_RECALL(recall_lv2)->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, (GObject *) recall_lv2, TRUE); /* load */ ags_recall_lv2_load(recall_lv2); port = ags_recall_lv2_load_ports(recall_lv2); /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LV2_RUN); AGS_RECALL(recall_channel_run_dummy)->flags |= AGS_RECALL_TEMPLATE; g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "recall-container", recall_container, "recall-channel", recall_lv2, NULL); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, TRUE); /* check if connected or running */ pthread_mutex_lock(channel_mutex); if((AGS_CHANNEL_CONNECTED & (channel->flags)) != 0){ AgsRecall *current; GList *recall_id; ags_connectable_connect(AGS_CONNECTABLE(recall_container)); ags_connectable_connect(AGS_CONNECTABLE(recall_lv2)); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); recall_id = channel->recall_id; while(recall_id != NULL){ if(AGS_RECALL_ID(recall_id->data)->recycling_context->parent == NULL){ current = ags_recall_duplicate((AgsRecall *) recall_channel_run_dummy, (AgsRecallID *) recall_id->data); /* set appropriate flag */ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_PLAYBACK); }else if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_SEQUENCER); }else if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_NOTATION); } /* append to AgsAudio */ channel->play = g_list_append(channel->play, current); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(current)); /* notify run */ ags_recall_notify_dependency(current, AGS_RECALL_NOTIFY_RUN, 1); /* resolve */ ags_recall_resolve_dependencies(current); /* init */ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(current)); current->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(current); current->flags &= (~AGS_RECALL_REMOVE); ags_recall_run_init_inter(current); ags_recall_run_init_post(current); ags_recall_check_rt_stream(current); } /* iterate */ recall_id = recall_id->next; } } pthread_mutex_unlock(channel_mutex); /* lv2 recall */ recall_container = ags_recall_container_new(); ags_channel_add_recall_container(channel, (GObject *) recall_container); recall_lv2 = ags_recall_lv2_new(channel, lv2_plugin->turtle, filename, effect, uri, effect_index); g_object_set(G_OBJECT(recall_lv2), "soundcard", soundcard, "recall-container", recall_container, NULL); AGS_RECALL(recall_lv2)->flags |= AGS_RECALL_TEMPLATE; ags_channel_add_recall(channel, (GObject *) recall_lv2, FALSE); /* load */ ags_recall_lv2_load(recall_lv2); port = ags_recall_lv2_load_ports(recall_lv2); if(port != NULL){ port = g_list_concat(port, ags_recall_lv2_load_ports(recall_lv2)); } /* dummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LV2_RUN); AGS_RECALL(recall_channel_run_dummy)->flags |= AGS_RECALL_TEMPLATE; g_object_set(G_OBJECT(recall_channel_run_dummy), "soundcard", soundcard, "recall-container", recall_container, "recall-channel", recall_lv2, NULL); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, FALSE); /* check if connected or running */ pthread_mutex_lock(channel_mutex); if((AGS_CHANNEL_CONNECTED & (channel->flags)) != 0){ AgsRecall *current; GList *recall_id; ags_connectable_connect(AGS_CONNECTABLE(recall_container)); ags_connectable_connect(AGS_CONNECTABLE(recall_lv2)); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); recall_id = channel->recall_id; while(recall_id != NULL){ if(AGS_RECALL_ID(recall_id->data)->recycling_context->parent != NULL){ current = ags_recall_duplicate((AgsRecall *) recall_channel_run_dummy, (AgsRecallID *) recall_id->data); /* set appropriate flag */ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_PLAYBACK); }else if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_SEQUENCER); }else if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_NOTATION); } /* append to AgsAudio */ channel->recall = g_list_append(channel->recall, current); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(current)); /* notify run */ ags_recall_notify_dependency(current, AGS_RECALL_NOTIFY_RUN, 1); /* resolve */ ags_recall_resolve_dependencies(current); /* init */ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(current)); current->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(current); current->flags &= (~AGS_RECALL_REMOVE); ags_recall_run_init_inter(current); ags_recall_run_init_post(current); ags_recall_check_rt_stream(current); } /* iterate */ recall_id = recall_id->next; } } pthread_mutex_unlock(channel_mutex); return(port); } GList* ags_channel_real_add_effect(AgsChannel *channel, gchar *filename, gchar *effect) { AgsLadspaPlugin *ladspa_plugin; AgsDssiPlugin *dssi_plugin; AgsLv2Plugin *lv2_plugin; AgsMessageDelivery *message_delivery; AgsMessageQueue *message_queue; GList *port; /* load plugin */ ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), filename, effect); port = NULL; if(ladspa_plugin != NULL){ port = ags_channel_add_ladspa_effect(channel, filename, effect); } if(ladspa_plugin == NULL){ dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), filename, effect); if(dssi_plugin != NULL){ port = ags_channel_add_dssi_effect(channel, filename, effect); } } if(ladspa_plugin == NULL && dssi_plugin == NULL){ lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), filename, effect); if(lv2_plugin != NULL){ port = ags_channel_add_lv2_effect(channel, filename, effect); } } /* emit message */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_delivery_find_namespace(message_delivery, "libags-audio"); if(message_queue != NULL){ AgsMessageEnvelope *message; xmlDoc *doc; xmlNode *root_node; /* specify message body */ doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags-command"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "method", "AgsChannel::add-effect"); /* add message */ message = ags_message_envelope_alloc(channel, NULL, doc); /* set parameter */ message->parameter = g_new0(GParameter, 2); message->n_params = 2; message->parameter[0].name = "filename"; g_value_init(&(message->parameter[0].value), G_TYPE_STRING); g_value_set_string(&(message->parameter[0].value), filename); message->parameter[1].name = "effect"; g_value_init(&(message->parameter[1].value), G_TYPE_STRING); g_value_set_string(&(message->parameter[1].value), effect); /* add message */ ags_message_delivery_add_message(message_delivery, "libags-audio", message); } return(port); } GList* ags_channel_add_effect(AgsChannel *channel, gchar *filename, gchar *effect) { GList *port; //FIXME:JK: make it thread-safe g_return_val_if_fail(AGS_IS_CHANNEL(channel), NULL); g_object_ref((GObject *) channel); g_signal_emit(G_OBJECT(channel), channel_signals[ADD_EFFECT], 0, filename, effect, &port); g_object_unref((GObject *) channel); return(port); } void ags_channel_real_remove_effect(AgsChannel *channel, guint nth) { AgsAudio *audio; AgsRecall *recall_channel, *recall_channel_run; AgsRecallContainer *recall_container; AgsMutexManager *mutex_manager; AgsMessageDelivery *message_delivery; AgsMessageQueue *message_queue; GList *automation, *automation_next; GList *port; GList *list, *list_next; GList *play, *recall; GList *task; gchar *specifier; guint nth_effect; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(channel_mutex); audio = (AgsAudio *) channel->audio; pthread_mutex_unlock(channel_mutex); /* */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* play */ pthread_mutex_lock(channel_mutex); play = channel->play; nth_effect = 0; while((play = ags_recall_template_find_all_type(play, AGS_TYPE_RECALL_LADSPA, AGS_TYPE_RECALL_LV2, G_TYPE_NONE)) != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(play->data)->flags)) != 0){ nth_effect++; } if(nth_effect == nth + 1){ break; } play = play->next; } pthread_mutex_unlock(channel_mutex); /* recall */ pthread_mutex_lock(channel_mutex); recall = channel->recall; nth_effect = 0; while((recall = ags_recall_template_find_all_type(recall, AGS_TYPE_RECALL_LADSPA, AGS_TYPE_RECALL_LV2, G_TYPE_NONE)) != NULL){ if((AGS_RECALL_TEMPLATE & (AGS_RECALL(recall->data)->flags)) != 0){ nth_effect++; } if(nth_effect == nth + 1){ break; } recall = recall->next; } pthread_mutex_unlock(channel_mutex); /* play context */ /* automation */ pthread_mutex_lock(channel_mutex); port = AGS_RECALL(play->data)->port; pthread_mutex_unlock(channel_mutex); while(port != NULL){ pthread_mutex_lock(channel_mutex); specifier = AGS_PORT(port->data)->specifier; pthread_mutex_unlock(channel_mutex); /* find specifier and remove */ pthread_mutex_lock(audio_mutex); automation = audio->automation; while((automation = ags_automation_find_specifier(automation, specifier)) != NULL){ automation_next = automation->next; ags_audio_remove_automation(audio, automation->data); automation = automation_next; } pthread_mutex_unlock(audio_mutex); /* iterate */ pthread_mutex_lock(channel_mutex); port = port->next; pthread_mutex_unlock(channel_mutex); } /* remove recall */ pthread_mutex_lock(channel_mutex); recall_container = (AgsRecallContainer *) AGS_RECALL(play->data)->container; recall_channel = (AgsRecall *) play->data; recall_channel_run = (AgsRecall *) ags_recall_find_template(recall_container->recall_channel_run)->data; list = recall_container->recall_channel_run; while(list != NULL){ list_next = list->next; ags_channel_remove_recall(channel, (GObject *) list->data, TRUE); list = list_next; } ags_channel_remove_recall(channel, (GObject *) recall_channel, TRUE); pthread_mutex_unlock(channel_mutex); ags_channel_remove_recall_container(channel, (GObject *) recall_container); /* recall context */ /* automation */ pthread_mutex_lock(channel_mutex); port = AGS_RECALL(recall->data)->port; pthread_mutex_unlock(channel_mutex); while(port != NULL){ pthread_mutex_lock(channel_mutex); specifier = AGS_PORT(port->data)->specifier; pthread_mutex_unlock(channel_mutex); /* find specifier and remove */ pthread_mutex_lock(audio_mutex); automation = audio->automation; while((automation = ags_automation_find_specifier(automation, specifier)) != NULL){ automation_next = automation->next; ags_audio_remove_automation(audio, automation->data); automation = automation_next; } pthread_mutex_unlock(audio_mutex); /* iterate */ pthread_mutex_lock(channel_mutex); port = port->next; pthread_mutex_unlock(channel_mutex); } /* remove recall */ pthread_mutex_lock(channel_mutex); recall_container = (AgsRecallContainer *) AGS_RECALL(recall->data)->container; recall_channel = (AgsRecall *) recall->data; recall_channel_run = (AgsRecall *) ags_recall_find_template(recall_container->recall_channel_run)->data; list = recall_container->recall_channel_run; while(list != NULL){ list_next = list->next; ags_channel_remove_recall(channel, (GObject *) list->data, FALSE); list = list_next; } ags_channel_remove_recall(channel, (GObject *) recall_channel, FALSE); pthread_mutex_unlock(channel_mutex); ags_channel_remove_recall_container(channel, (GObject *) recall_container); /* emit message */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_delivery_find_namespace(message_delivery, "libags-audio"); if(message_queue != NULL){ AgsMessageEnvelope *message; xmlDoc *doc; xmlNode *root_node; /* specify message body */ doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags-command"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "method", "AgsChannel::remove-effect"); /* add message */ message = ags_message_envelope_alloc(channel, NULL, doc); /* set parameter */ message->parameter = g_new0(GParameter, 1); message->n_params = 1; message->parameter[0].name = "nth"; g_value_init(&(message->parameter[0].value), G_TYPE_UINT); g_value_set_uint(&(message->parameter[0].value), nth); /* add message */ ags_message_delivery_add_message(message_delivery, "libags-audio", message); } } void ags_channel_remove_effect(AgsChannel *channel, guint nth) { //FIXME:JK: make it thread-safe g_return_if_fail(AGS_IS_CHANNEL(channel)); g_object_ref((GObject *) channel); g_signal_emit(G_OBJECT(channel), channel_signals[REMOVE_EFFECT], 0, nth); g_object_unref((GObject *) channel); } /** * ags_channel_safe_resize_audio_signal: * @channel: an #AgsChannel * @length: new frame count length * * Resize audio data. * * Since: 1.0.0 */ void ags_channel_safe_resize_audio_signal(AgsChannel *channel, guint length) { AgsRecycling *last_recycling; AgsRecycling *recycling, *end_recycling; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GList *list; guint new_length; gdouble factor; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutex_t *recycling_mutex; if(channel == NULL || channel->first_recycling == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get recycling and last recycling */ pthread_mutex_lock(mutex); recycling = channel->first_recycling; last_recycling = channel->last_recycling; pthread_mutex_unlock(mutex); /* lookup mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* get end recycling */ pthread_mutex_lock(recycling_mutex); end_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); /* safe resize */ while(recycling != end_recycling){ /* lookup mutex */ pthread_mutex_lock(application_mutex); mutex_manager = ags_mutex_manager_get_instance(); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* get audio signal */ pthread_mutex_lock(recycling_mutex); list = recycling->audio_signal; while(list != NULL){ audio_signal = AGS_AUDIO_SIGNAL(list->data); /* safe shrink or grow */ if(audio_signal->stream_current != NULL){ if(length < audio_signal->length){ factor = audio_signal->length / length; new_length = length + (factor * g_list_position(audio_signal->stream_beginning, audio_signal->stream_current)); }else{ factor = length / audio_signal->length; new_length = length - (factor * g_list_position(audio_signal->stream_beginning, audio_signal->stream_current)); } }else{ new_length = length; } /* do it so */ ags_audio_signal_stream_safe_resize(audio_signal, new_length); /* iterate audio signal */ list = list->next; } /* iterate recycling */ recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } } /** * ags_channel_duplicate_recall: * @channel: an #AgsChannel that contains the #AgsRecall templates * @recall_id: the #AgsRecallID the newly allocated #AgsRecall objects belongs to * * Duplicate #AgsRecall templates for use with ags_channel_recursive_play(), * but ags_channel_recursive_play_init() may call this function for you. * * Since: 1.0.0 */ void ags_channel_duplicate_recall(AgsChannel *channel, AgsRecallID *recall_id) { AgsAudio *audio; AgsRecall *recall, *copy; GList *list_recall, *list_recall_start; gboolean do_playback, do_sequencer, do_notation; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_id == NULL){ return; } #ifdef AGS_DEBUG g_message("duplicate channel %d", channel->line); #endif /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* playback mode */ pthread_mutex_lock(mutex); audio = AGS_AUDIO(channel->audio); do_playback = FALSE; do_sequencer = FALSE; do_notation = FALSE; if((AGS_RECALL_ID_PLAYBACK & (recall_id->flags)) != 0){ do_playback = TRUE; } if((AGS_RECALL_ID_SEQUENCER & (recall_id->flags)) != 0){ do_sequencer = TRUE; } if((AGS_RECALL_ID_NOTATION & (recall_id->flags)) != 0){ do_notation = TRUE; } /* recall or play */ if(recall_id->recycling_context->parent == NULL){ list_recall = g_list_copy(channel->play); list_recall_start = list_recall = g_list_reverse(list_recall); }else{ list_recall = g_list_copy(channel->recall); list_recall_start = list_recall = g_list_reverse(list_recall); } /* duplicate */ while(list_recall != NULL){ recall = AGS_RECALL(list_recall->data); /* ignore initialized or non-runnable AgsRecalls */ if((AGS_RECALL_TEMPLATE & (recall->flags)) == 0 || AGS_IS_RECALL_AUDIO(recall) || AGS_IS_RECALL_CHANNEL(recall) || recall->recall_id != NULL){ list_recall = list_recall->next; continue; } if((do_playback && (AGS_RECALL_PLAYBACK & (recall->flags)) == 0) || (do_sequencer && (AGS_RECALL_SEQUENCER & (recall->flags)) == 0) || (do_notation && (AGS_RECALL_NOTATION & (recall->flags)) == 0)){ list_recall = list_recall->next; // g_message("%x - %x", recall->flags, recall_id->flags); continue; } /* duplicate the recall */ copy = ags_recall_duplicate(recall, recall_id); if(copy == NULL){ /* iterate */ list_recall = list_recall->next; continue; } #ifdef AGS_DEBUG g_message("recall duplicated: %s", G_OBJECT_TYPE_NAME(copy)); #endif /* set appropriate flag */ if(do_playback){ ags_recall_set_flags(copy, AGS_RECALL_PLAYBACK); }else if(do_sequencer){ ags_recall_set_flags(copy, AGS_RECALL_SEQUENCER); }else if(do_notation){ ags_recall_set_flags(copy, AGS_RECALL_NOTATION); } /* append to AgsAudio */ ags_channel_add_recall(channel, (GObject *) copy, ((recall_id->recycling_context->parent == NULL) ? TRUE: FALSE)); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(copy)); /* notify run */ ags_recall_notify_dependency(copy, AGS_RECALL_NOTIFY_RUN, 1); /* iterate */ list_recall = list_recall->next; } g_list_free(list_recall_start); pthread_mutex_unlock(mutex); } /** * ags_channel_resolve_recall: * @channel: an #AgsChannel * @recall_id: appropriate #AgsRecallID * * Resolve step of initialization. * * Since: 1.0.0 */ void ags_channel_resolve_recall(AgsChannel *channel, AgsRecallID *recall_id) { AgsRecall *recall; GList *list_recall; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get the appropriate lists */ pthread_mutex_lock(mutex); #ifdef AGS_DEBUG g_message("resolve channel %d", channel->line); #endif if(recall_id->recycling_context->parent == NULL){ list_recall = channel->play; }else{ list_recall = channel->recall; } /* resolve dependencies */ // g_message("res b"); while((list_recall = ags_recall_find_recycling_context(list_recall, G_OBJECT(recall_id->recycling_context))) != NULL){ recall = AGS_RECALL(list_recall->data); ags_recall_resolve_dependencies(recall); list_recall = list_recall->next; } pthread_mutex_unlock(mutex); } /** * ags_channel_init_recall: * @channel: an #AgsChannel that contains the recalls * @stage: the stage to init * @recall_id: the #AgsRecallID this recall belongs to * * Prepare #AgsRecall objects to become runnning, ags_channel_recursive_play_init() * may call this function for you. * * Since: 1.0.0 */ void ags_channel_init_recall(AgsChannel *channel, gint stage, AgsRecallID *recall_id) { AgsRecall *recall; GList *list_recall; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* recall or play */ pthread_mutex_lock(mutex); #ifdef AGS_DEBUG g_message("ags_channel_init_recall@%d - channel: %llu %llu\n", stage, (long long unsigned int) channel->audio_channel, (long long unsigned int) channel->pad); #endif if(recall_id->recycling_context->parent == NULL){ list_recall = channel->play; }else{ list_recall = channel->recall; } /* init recall */ while(list_recall != NULL){ recall = AGS_RECALL(list_recall->data); if(recall->recall_id == NULL || recall->recall_id->recycling_context == NULL || AGS_IS_RECALL_CHANNEL(recall)){ list_recall = list_recall->next; continue; } if(recall->recall_id->recycling_context != recall_id->recycling_context){ if(AGS_IS_INPUT(channel) && recall->recall_id->recycling_context->parent == NULL){ AgsRecyclingContext *parent_container; parent_container = (AgsRecyclingContext *) ags_recall_id_find_parent_recycling_context(AGS_AUDIO(channel->audio)->recall_id, recall->recall_id->recycling_context); if(recall_id->recycling_context->parent != parent_container){ list_recall = list_recall->next; continue; } }else{ list_recall = list_recall->next; continue; } } if((AGS_RECALL_TEMPLATE & (recall->flags)) == 0){ #ifdef AGS_DEBUG g_message("recall run init@%d: %s - %x", stage, G_OBJECT_TYPE_NAME(recall), recall->flags); #endif if(stage == 0){ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(recall)); recall->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(recall); recall->flags &= (~AGS_RECALL_REMOVE); }else if(stage == 1){ ags_recall_run_init_inter(recall); }else if(stage == 2){ ags_recall_run_init_post(recall); }else{ ags_recall_check_rt_stream(recall); } } list_recall = list_recall->next; } pthread_mutex_unlock(mutex); } /** * ags_channel_play: * @channel: an #AgsChannel * @recall_id: appropriate #AgsRecallID * @stage: run_pre, run_inter or run_post * * Play one single run of @stage step. * * Since: 1.0.0 */ void ags_channel_play(AgsChannel *channel, AgsRecallID *recall_id, gint stage) { AgsRecall *recall; AgsMutexManager *mutex_manager; GList *list_start, *list, *list_next; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_id == NULL || recall_id->recycling_context == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* play or recall */ pthread_mutex_lock(mutex); if(recall_id->recycling_context->parent != NULL){ g_object_get(channel, "recall", &list_start, NULL); }else{ g_object_get(channel, "play", &list_start, NULL); } pthread_mutex_unlock(mutex); /* run - automate */ list = list_start; while(list != NULL){ guint recall_flags; list_next = list->next; recall = AGS_RECALL(list->data); if(recall == NULL || !AGS_IS_RECALL(recall)){ list = list_next; continue; } if(AGS_IS_RECALL_CHANNEL(recall)){ /* run automation*/ if(stage == 0){ ags_recall_automate(recall); } } list = list_next; } /* run - first */ list = list_start; while(list != NULL){ guint recall_flags; list_next = list->next; recall = AGS_RECALL(list->data); if(recall == NULL || !AGS_IS_RECALL(recall)){ list = list_next; continue; } if(AGS_IS_RECALL_CHANNEL(recall)){ list = list_next; continue; } if(recall->recall_id == NULL || recall->recall_id->recycling_context != recall_id->recycling_context){ list = list_next; continue; } g_object_ref(recall); recall_flags = recall->flags; if((AGS_RECALL_TEMPLATE & (recall_flags)) == 0 && (AGS_RECALL_RUN_FIRST & (recall_flags)) != 0){ #ifdef AGS_DEBUG g_message("%s play first channel %x:%d @%x -> %x", G_OBJECT_TYPE_NAME(recall), channel, channel->line, recall, recall->recall_id); #endif if((AGS_RECALL_HIDE & (recall_flags)) == 0){ g_object_ref(recall); if(stage == 0){ AGS_RECALL_GET_CLASS(recall)->run_pre(recall); }else if(stage == 1){ AGS_RECALL_GET_CLASS(recall)->run_inter(recall); }else{ AGS_RECALL_GET_CLASS(recall)->run_post(recall); } g_object_unref(recall); } } list = list_next; } /* run */ list = list_start; while(list != NULL){ guint recall_flags; list_next = list->next; recall = AGS_RECALL(list->data); if(recall == NULL || !AGS_IS_RECALL(recall)){ list = list_next; continue; } if(AGS_IS_RECALL_CHANNEL(recall)){ list = list_next; continue; } if(recall->recall_id == NULL || recall->recall_id->recycling_context != recall_id->recycling_context){ list = list_next; continue; } recall_flags = recall->flags; if((AGS_RECALL_TEMPLATE & (recall_flags)) == 0 && (AGS_RECALL_RUN_FIRST & (recall_flags)) == 0 && (AGS_RECALL_RUN_LAST & (recall_flags)) == 0){ #ifdef AGS_DEBUG g_message("%s play channel %x:%d @%x -> %x", G_OBJECT_TYPE_NAME(recall), channel, channel->line, recall, recall->recall_id); #endif if((AGS_RECALL_HIDE & (recall_flags)) == 0){ g_object_ref(recall); if(stage == 0){ AGS_RECALL_GET_CLASS(recall)->run_pre(recall); }else if(stage == 1){ AGS_RECALL_GET_CLASS(recall)->run_inter(recall); }else{ AGS_RECALL_GET_CLASS(recall)->run_post(recall); } g_object_unref(recall); } } list = list_next; } /* run - last */ list = list_start; while(list != NULL){ guint recall_flags; list_next = list->next; recall = AGS_RECALL(list->data); if(recall == NULL || !AGS_IS_RECALL(recall)){ list = list_next; continue; } if(AGS_IS_RECALL_CHANNEL(recall)){ list = list_next; continue; } if(recall->recall_id == NULL || recall->recall_id->recycling_context != recall_id->recycling_context){ list = list_next; continue; } recall_flags = recall->flags; if((AGS_RECALL_TEMPLATE & (recall_flags)) == 0 && (AGS_RECALL_RUN_LAST & (recall_flags)) != 0){ #ifdef AGS_DEBUG g_message("%s play last channel %x:%d @%x -> %x", G_OBJECT_TYPE_NAME(recall), channel, channel->line, recall, recall->recall_id); #endif if((AGS_RECALL_HIDE & (recall_flags)) == 0){ g_object_ref(recall); if(stage == 0){ AGS_RECALL_GET_CLASS(recall)->run_pre(recall); }else if(stage == 1){ AGS_RECALL_GET_CLASS(recall)->run_inter(recall); }else{ AGS_RECALL_GET_CLASS(recall)->run_post(recall); } g_object_unref(recall); } } g_object_unref(recall); list = list_next; } g_list_free(list_start); } void ags_channel_real_done(AgsChannel *channel, AgsRecallID *recall_id) { AgsRecall *recall; AgsMutexManager *mutex_manager; AgsMessageDelivery *message_delivery; AgsMessageQueue *message_queue; GList *list, *list_next; gboolean is_toplevel; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get context */ pthread_mutex_lock(mutex); if(recall_id->recycling_context->parent == NULL){ list = channel->play; is_toplevel = TRUE; }else{ list = channel->recall; is_toplevel = FALSE; } /* remove recall, run dispose and unref */ while(list != NULL){ list_next = list->next; recall = AGS_RECALL(list->data); if(recall->recall_id != NULL && recall->recall_id->recycling_context == recall_id->recycling_context){ g_object_run_dispose(recall); ags_channel_remove_recall(channel, recall, is_toplevel); g_object_unref(recall); } list = list_next; } pthread_mutex_unlock(mutex); /* emit message */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_delivery_find_namespace(message_delivery, "libags-audio"); if(message_queue != NULL){ AgsMessageEnvelope *message; xmlDoc *doc; xmlNode *root_node; /* specify message body */ doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags-command"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "method", "AgsChannel::done"); /* add message */ message = ags_message_envelope_alloc(channel, NULL, doc); /* set parameter */ message->parameter = g_new0(GParameter, 1); message->n_params = 1; message->parameter[0].name = "recall-id"; g_value_init(&(message->parameter[0].value), G_TYPE_OBJECT); g_value_set_object(&(message->parameter[0].value), recall_id); /* add message */ ags_message_delivery_add_message(message_delivery, "libags-audio", message); } } /** * ags_channel_done: * @channel: an #AgsChannel * @recall_id: the current #AgsRecallID * * Is emitted as playing channel is done. * * Since: 1.0.0 */ void ags_channel_done(AgsChannel *channel, AgsRecallID *recall_id) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_id == NULL || recall_id->recycling_context == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* verify type */ pthread_mutex_lock(mutex); if(!(AGS_IS_CHANNEL(channel) || AGS_IS_RECALL_ID(recall_id))){ pthread_mutex_unlock(mutex); return; } /* emit */ g_object_ref(G_OBJECT(channel)); g_signal_emit(G_OBJECT(channel), channel_signals[DONE], 0, recall_id); g_object_unref(G_OBJECT(channel)); pthread_mutex_unlock(mutex); } /** * ags_channel_cancel: * @channel: an #AgsChannel * @recall_id: and #AgsRecallID * * Calls for every matching @recall_id ags_recall_cancel() * * Since: 1.0.0 */ void ags_channel_cancel(AgsChannel *channel, AgsRecallID *recall_id) { AgsRecall *recall; AgsMutexManager *mutex_manager; GList *list, *list_next; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* recall or play */ pthread_mutex_lock(mutex); g_object_ref(recall_id); if(recall_id->recycling_context->parent == NULL){ list = channel->play; }else{ list = channel->recall; } while(list != NULL){ list_next = list->next; recall = AGS_RECALL(list->data); if((AGS_RECALL_TEMPLATE & (recall->flags)) != 0 || recall->recall_id == NULL || recall->recall_id->recycling_context != recall_id->recycling_context){ list = list_next; continue; } // g_object_ref(recall_id); // g_object_ref(recall); ags_recall_cancel(recall); list = list_next; } pthread_mutex_unlock(mutex); } /** * ags_channel_remove: * @channel: an #AgsChannel * @recall_id: and #AgsRecallID * * Calls for every matching @recall_id ags_recall_remove() * * Since: 1.0.0 */ void ags_channel_remove(AgsChannel *channel, AgsRecallID *recall_id) { AgsRecall *recall; AgsMutexManager *mutex_manager; GList *list, *list_next; gboolean play; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(channel == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* recall or play */ pthread_mutex_lock(mutex); if(recall_id->recycling_context->parent == NULL){ list = channel->play; play = TRUE; }else{ list = channel->recall; play = FALSE; } while(list != NULL){ list_next = list->next; recall = AGS_RECALL(list->data); if((AGS_RECALL_TEMPLATE & (recall->flags)) != 0 || recall->recall_id->recycling_context != recall_id->recycling_context){ list = list_next; continue; } ags_recall_remove(recall); ags_channel_remove_recall(channel, (GObject *) recall, play); g_object_unref(recall_id); list = list_next; } channel->recall_id = g_list_remove(channel->recall_id, recall_id); g_object_unref(recall_id); pthread_mutex_unlock(mutex); } void ags_channel_recall_id_set(AgsChannel *output, AgsRecallID *default_recall_id, gboolean ommit_own_channel, guint mode, ...) { AgsAudio *audio; AgsChannel *current; AgsRecallID *recall_id; AgsRecyclingContext *recycling_context; AgsMutexManager *mutex_manager; char *key; guint flags; guint stage; gboolean async_recall; va_list va_list; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *current_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* read variadict arguments */ va_start(va_list, mode); switch(mode){ case AGS_CHANNEL_RECALL_ID_RUN_STAGE: key = va_arg(va_list, char*); stage = va_arg(va_list, guint); break; } va_end(va_list); /* get audio */ pthread_mutex_lock(mutex); audio = (AgsAudio *) output->audio; pthread_mutex_unlock(mutex); /* lookup mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get recycling container and flags */ pthread_mutex_lock(audio_mutex); recycling_context = default_recall_id->recycling_context; flags = audio->flags; pthread_mutex_unlock(audio_mutex); /* */ if((AGS_AUDIO_ASYNC & (flags)) != 0){ async_recall = TRUE; }else{ async_recall = FALSE; } switch(async_recall){ case TRUE: { /* iterate next */ pthread_mutex_lock(mutex); current = output->next_pad; pthread_mutex_unlock(mutex); while(current != NULL){ /* lookup mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* set run stage */ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_parent_recycling_context(current->recall_id, recycling_context->parent); pthread_mutex_unlock(current_mutex); if(recall_id == NULL){ return; } switch(mode){ case AGS_CHANNEL_RECALL_ID_RUN_STAGE: { pthread_mutex_lock(audio_mutex); ags_recall_id_set_run_stage(default_recall_id, stage); pthread_mutex_unlock(audio_mutex); } break; case AGS_CHANNEL_RECALL_ID_CANCEL: { pthread_mutex_lock(current_mutex); recall_id->flags |= AGS_RECALL_ID_CANCEL; pthread_mutex_unlock(current_mutex); } break; } pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); } /* iterate prev */ pthread_mutex_lock(mutex); current = output->prev_pad; pthread_mutex_unlock(mutex); while(current != NULL){ /* lookup mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* set run stage */ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_parent_recycling_context(current->recall_id, recycling_context->parent); pthread_mutex_unlock(current_mutex); switch(mode){ case AGS_CHANNEL_RECALL_ID_RUN_STAGE: { pthread_mutex_lock(audio_mutex); ags_recall_id_set_run_stage(default_recall_id, stage); pthread_mutex_unlock(audio_mutex); } break; case AGS_CHANNEL_RECALL_ID_CANCEL: { pthread_mutex_lock(current_mutex); recall_id->flags |= AGS_RECALL_ID_CANCEL; pthread_mutex_unlock(current_mutex); } break; } pthread_mutex_lock(current_mutex); current = current->prev_pad; pthread_mutex_unlock(current_mutex); } } case FALSE: { if(ommit_own_channel){ break; } pthread_mutex_lock(mutex); recall_id = ags_recall_id_find_parent_recycling_context(output->recall_id, recycling_context->parent); pthread_mutex_unlock(mutex); if(recall_id == NULL){ return; } switch(mode){ case AGS_CHANNEL_RECALL_ID_RUN_STAGE: { pthread_mutex_lock(audio_mutex); ags_recall_id_set_run_stage(default_recall_id, stage); pthread_mutex_unlock(audio_mutex); } break; case AGS_CHANNEL_RECALL_ID_CANCEL: { pthread_mutex_lock(mutex); recall_id->flags |= AGS_RECALL_ID_CANCEL; pthread_mutex_unlock(mutex); } break; } } } } /** * ags_channel_find_port: * @channel: an #AgsChannel * * Retrieve all ports of #AgsChannel * * Returns: a #GList containing #AgsPort * * Since: 1.0.0 */ GList* ags_channel_find_port(AgsChannel *channel) { AgsMutexManager *mutex_manager; GList *recall; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(!AGS_IS_CHANNEL(channel)){ return(NULL); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* collect port of playing recall */ pthread_mutex_lock(mutex); recall = channel->play; list = NULL; while(recall != NULL){ if(AGS_RECALL(recall->data)->port != NULL){ if(list == NULL){ list = g_list_copy(AGS_RECALL(recall->data)->port); }else{ if(AGS_RECALL(recall->data)->port != NULL){ list = g_list_concat(list, g_list_copy(AGS_RECALL(recall->data)->port)); } } } recall = recall->next; } /* the same for true recall */ recall = channel->recall; while(recall != NULL){ if(AGS_RECALL(recall->data)->port != NULL){ if(list == NULL){ list = g_list_copy(AGS_RECALL(recall->data)->port); }else{ if(AGS_RECALL(recall->data)->port != NULL){ list = g_list_concat(list, g_list_copy(AGS_RECALL(recall->data)->port)); } } } recall = recall->next; } /* */ pthread_mutex_unlock(mutex); list = g_list_reverse(list); return(list); } /** * ags_channel_find_port_by_specifier_and_scope: * @channel: an #AgsChannel * @specifier: the port's name * @scope: either %TRUE for play or %FALSE for recall * * Retrieve specified port of #AgsChannel * * Returns: an #AgsPort if found otherwise %NULL * * Since: 1.3.0 */ GObject* ags_channel_find_port_by_specifier_and_scope(AgsChannel *channel, gchar *specifier, gboolean play) { AgsMutexManager *mutex_manager; GList *recall, *port; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(!AGS_IS_CHANNEL(channel)){ return(NULL); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* collect port of playing recall */ pthread_mutex_lock(mutex); if(play){ recall = channel->play; }else{ recall = channel->recall; } while(recall != NULL){ port = AGS_RECALL(recall->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, specifier)){ pthread_mutex_unlock(mutex); return(port->data); } port = port->next; } recall = recall->next; } pthread_mutex_unlock(mutex); return(NULL); } /** * ags_channel_set_link: * @channel: an #AgsChannel to link * @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. 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. Invoke only by a task. * * Since: 1.0.0 */ void ags_channel_set_link(AgsChannel *channel, AgsChannel *link, GError **error) { AgsChannel *old_channel_link, *old_link_link; AgsRecycling *first_recycling, *last_recycling; AgsMutexManager *mutex_manager; GError *this_error; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *link_mutex; if(channel == NULL && link == NULL){ return; } if(channel != NULL && !AGS_IS_CHANNEL(channel)){ g_warning("ags_channel_set_link() - unsupported type"); return; } if(link != NULL && !AGS_IS_CHANNEL(link)){ g_warning("ags_channel_set_link() - unsupported type"); return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel and link mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); if(channel != NULL){ /* get some fields */ pthread_mutex_lock(channel_mutex); old_channel_link = channel->link; pthread_mutex_unlock(channel_mutex); /* check no change */ if(old_channel_link == link){ return; } }else{ /* get some fields */ pthread_mutex_lock(link_mutex); old_link_link = link->link; pthread_mutex_unlock(link_mutex); if(old_link_link == NULL){ return; } old_channel_link = NULL; } if(link != NULL){ /* get some fields */ pthread_mutex_lock(link_mutex); old_link_link = link->link; pthread_mutex_unlock(link_mutex); }else{ old_link_link = NULL; } #ifdef AGS_DEBUG g_message("set link %x %x", channel, link); #endif if(link != NULL){ old_link_link = link->link; }else{ old_link_link = NULL; } /* check for a loop */ if(channel != NULL && link != NULL){ AgsAudio *audio, *current_audio; AgsChannel *output, *input; AgsChannel *current_channel; GObject *soundcard; guint audio_flags; guint current_audio_channel, current_line; pthread_mutex_t *audio_mutex; pthread_mutex_t *current_audio_mutex; pthread_mutex_t *current_channel_mutex; if(AGS_IS_OUTPUT(channel)){ /* get audio */ pthread_mutex_lock(link_mutex); audio = AGS_AUDIO(link->audio); current_line = link->line; current_audio_channel = link->audio_channel; pthread_mutex_unlock(link_mutex); /* set current */ current_channel = link; }else{ /* get audio */ pthread_mutex_lock(channel_mutex); audio = AGS_AUDIO(channel->audio); current_line = channel->line; current_audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); /* set current */ current_channel = channel; } /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; audio_flags = audio->flags; pthread_mutex_unlock(audio_mutex); /* */ if((AGS_AUDIO_ASYNC & (audio_flags)) != 0){ current_channel = ags_channel_nth(output, current_audio_channel); }else{ current_channel = ags_channel_nth(output, current_line); } if(current_channel != NULL){ current_channel = current_channel->link; } if(current_channel != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current_channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_channel_mutex); current_audio = AGS_AUDIO(current_channel->audio); pthread_mutex_unlock(current_channel_mutex); while(current_channel != NULL){ /* check audio */ if(current_audio == audio){ if(error != NULL){ g_set_error(error, AGS_CHANNEL_ERROR, AGS_CHANNEL_ERROR_LOOP_IN_LINK, "failed to link channel"); } return; } /* get current audio mutex */ pthread_mutex_lock(application_mutex); current_audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current_audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_audio_mutex); output = current_audio->output; audio_flags = current_audio->flags; pthread_mutex_unlock(current_audio_mutex); /* get current channel mutex */ pthread_mutex_lock(application_mutex); current_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current_channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_channel_mutex); current_audio_channel = current_channel->audio_channel; current_line = current_channel->line; pthread_mutex_unlock(current_channel_mutex); if((AGS_AUDIO_ASYNC & (audio_flags)) != 0){ current_channel = ags_channel_nth(output, current_audio_channel); }else{ current_channel = ags_channel_nth(output, current_line); } if(current_channel != NULL){ /* get current channel mutex */ pthread_mutex_lock(application_mutex); current_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current_channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_channel_mutex); current_channel = current_channel->link; pthread_mutex_unlock(current_channel_mutex); } if(current_channel != NULL){ /* get current channel mutex */ pthread_mutex_lock(application_mutex); current_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current_channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_channel_mutex); current_audio = AGS_AUDIO(current_channel->audio); pthread_mutex_unlock(current_channel_mutex); } } } } /* set link */ if(channel != NULL){ pthread_mutex_lock(channel_mutex); channel->link = link; pthread_mutex_unlock(channel_mutex); if(link != NULL){ g_object_ref(channel); g_object_ref(link); }else{ g_object_unref(channel); } } if(link != NULL){ pthread_mutex_lock(link_mutex); link->link = channel; pthread_mutex_unlock(link_mutex); if(channel != NULL){ /* notify */ ags_channel_set_link(link, channel, &this_error); }else{ g_object_unref(link); } } /* set old input/output to NULL */ if(old_link_link != NULL){ pthread_mutex_t *old_link_link_mutex; /* get old link link mutex */ pthread_mutex_lock(application_mutex); old_link_link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) old_link_link); pthread_mutex_unlock(application_mutex); /* unset link */ pthread_mutex_lock(old_link_link_mutex); old_link_link->link = NULL; pthread_mutex_unlock(old_link_link_mutex); g_object_unref(old_link_link); this_error = NULL; /* notify */ //NOTE:JK: this doesn't for recursive recycling ags_channel_set_link(old_link_link, NULL, &this_error); } /* set old input/output to NULL */ if(old_channel_link != NULL){ pthread_mutex_t *old_channel_link_mutex; /* get old channel link mutex */ pthread_mutex_lock(application_mutex); old_channel_link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) old_channel_link); pthread_mutex_unlock(application_mutex); /* unset link */ pthread_mutex_lock(old_channel_link_mutex); old_channel_link->link = NULL; pthread_mutex_unlock(old_channel_link_mutex); g_object_unref(old_channel_link); this_error = NULL; /* notify */ //NOTE:JK: this doesn't for recursive recycling ags_channel_set_link(old_channel_link, NULL, &this_error); } /* set recycling */ if(channel != NULL){ if(AGS_IS_OUTPUT(channel)){ pthread_mutex_lock(channel_mutex); first_recycling = channel->first_recycling; last_recycling = channel->last_recycling; pthread_mutex_unlock(channel_mutex); if(link != NULL){ ags_channel_set_recycling(link, first_recycling, last_recycling, TRUE, TRUE); } if(AGS_IS_INPUT(old_channel_link)){ AgsAudio *old_audio; GObject *soundcard; GObject *old_soundcard; guint old_audio_flags; pthread_mutex_t *old_audio_mutex; pthread_mutex_t *old_channel_link_mutex; /* get old channel link mutex */ pthread_mutex_lock(application_mutex); old_channel_link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) old_channel_link); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(old_channel_link_mutex); old_audio = old_channel_link->audio; old_soundcard = old_channel_link->soundcard; pthread_mutex_unlock(old_channel_link_mutex); /* get old audio mutex */ pthread_mutex_lock(application_mutex); old_audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) old_audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(old_audio_mutex); old_audio_flags = old_audio->flags; pthread_mutex_unlock(old_audio_mutex); /* */ if((AGS_AUDIO_INPUT_HAS_RECYCLING & (old_audio_flags)) != 0){ soundcard = old_channel_link->soundcard; first_recycling = g_object_new(AGS_TYPE_RECYCLING, "channel", old_channel_link, "soundcard", old_soundcard, NULL); g_object_ref(first_recycling); last_recycling = first_recycling; ags_channel_set_recycling(old_channel_link, first_recycling, last_recycling, TRUE, TRUE); }else{ ags_channel_set_recycling(old_channel_link, NULL, NULL, TRUE, TRUE); } } // ags_channel_set_recycling(old_link_link, // NULL, NULL, // TRUE, TRUE); }else{ if(link != NULL){ pthread_mutex_lock(link_mutex); first_recycling = link->first_recycling; last_recycling = link->last_recycling; pthread_mutex_unlock(link_mutex); ags_channel_set_recycling(channel, first_recycling, last_recycling, TRUE, TRUE); // ags_channel_set_recycling(old_channel_link, // NULL, NULL, // TRUE, TRUE); ags_channel_set_recycling(old_link_link, NULL, NULL, TRUE, TRUE); }else{ if((AGS_AUDIO_INPUT_HAS_RECYCLING & (AGS_AUDIO(channel->audio)->flags)) != 0){ first_recycling = g_object_new(AGS_TYPE_RECYCLING, "channel", channel, "soundcard", channel->soundcard, NULL); g_object_ref(first_recycling); last_recycling = first_recycling; ags_channel_set_recycling(channel, first_recycling, last_recycling, TRUE, TRUE); // ags_channel_set_recycling(old_channel_link, // NULL, NULL, // TRUE, TRUE); }else{ ags_channel_set_recycling(channel, NULL, NULL, TRUE, TRUE); // ags_channel_set_recycling(old_channel_link, // NULL, NULL, // TRUE, TRUE); } } } }else{ if(AGS_IS_INPUT(link)){ AgsAudio *audio; GObject *soundcard; guint audio_flags; pthread_mutex_t *audio_mutex; pthread_mutex_t *link_mutex; /* get old link link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(link_mutex); audio = link->audio; soundcard = link->soundcard; pthread_mutex_unlock(link_mutex); /* get old audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio_flags)) != 0){ first_recycling = g_object_new(AGS_TYPE_RECYCLING, "channel", link, "soundcard", soundcard, NULL); g_object_ref(first_recycling); last_recycling = first_recycling; ags_channel_set_recycling(link, first_recycling, last_recycling, TRUE, TRUE); ags_channel_set_recycling(old_link_link, NULL, NULL, TRUE, TRUE); }else{ ags_channel_set_recycling(link, NULL, NULL, TRUE, TRUE); // ags_channel_set_recycling(old_link_link, // NULL, NULL, // TRUE, TRUE); } } } /* reset soundcard */ if(AGS_IS_OUTPUT(channel) && AGS_IS_INPUT(link)){ GParameter *parameter; parameter = g_new0(GParameter, 1); parameter[0].name = "soundcard"; g_value_init(&(parameter[0].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[0].value), link->soundcard); ags_channel_recursive_set_property(channel, parameter, 1); } /* reset recall id */ ags_channel_recursive_reset_recall_ids(channel, link, old_channel_link, old_link_link); } /** * ags_channel_set_recycling: * @channel: the channel to reset * @first_recycling: the recycling to set for channel->first_recycling * @last_recycling: the recycling to set for channel->last_recycling * @update: reset allthough the AgsRecyclings are still the same * @destroy_old: destroy old AgsRecyclings * * Called by ags_channel_set_link() to handle outdated #AgsRecycling references. * Invoke only by a task. * * Since: 1.0.0 */ void ags_channel_set_recycling(AgsChannel *channel, AgsRecycling *first_recycling, AgsRecycling *last_recycling, gboolean update, gboolean destroy_old) { AgsAudio *audio; AgsAudio *found_prev, *found_next; AgsChannel *prev_channel, *next_channel, *current; AgsRecycling *parent; 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; AgsRecycling *nth_recycling, *next_recycling, *stop_recycling; AgsRecycling *next_first_recycling, *prev_last_recycling; AgsRecyclingContext *recycling_context, *old_recycling_context; AgsRecallID *current_recall_id; AgsMutexManager *mutex_manager; GList *recall_id; guint audio_flags; guint flags; guint complete_level_first, complete_level_last; gboolean is_output; gboolean replace_first, replace_last; gboolean find_prev, find_next; gboolean change_old_last, change_old_first; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *current_mutex; pthread_mutex_t *nth_channel_mutex; pthread_mutex_t *recycling_mutex; pthread_mutex_t *nth_recycling_mutex; 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 void ags_channel_set_recycling_emit_changed(AgsChannel *input); gboolean ags_channel_set_recycling_recursive_input(AgsChannel *input){ AgsAudio *audio; AgsChannel *nth_channel_prev, *nth_channel_next; guint audio_flags; pthread_mutex_t *audio_mutex; pthread_mutex_t *input_mutex; pthread_mutex_t *next_channel_mutex; pthread_mutex_t *prev_channel_mutex; /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* check done */ pthread_mutex_lock(input_mutex); if(input == NULL || (input->first_recycling == replace_with_first_recycling && input->last_recycling == replace_with_last_recycling)){ pthread_mutex_unlock(input_mutex); return(TRUE); } /* set recycling */ if(replace_first){ input->first_recycling = replace_with_first_recycling; } if(replace_last){ input->last_recycling = replace_with_last_recycling; } /* search for neighboor recyclings */ audio = input->audio; pthread_mutex_unlock(input_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* audio flags */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_ASYNC & (audio_flags)) != 0){ if(find_prev){ nth_channel_prev = ags_channel_prev_with_recycling(input); if(nth_channel_prev != NULL){ #ifdef AGS_DEBUG g_message("found prev"); #endif find_prev = FALSE; replace_first = FALSE; if(complete_level_first == 0){ found_prev = audio; prev_channel = nth_channel_prev; complete_level_first = 1; } } }else{ if(nth_channel_prev == NULL){ nth_channel_prev = ags_channel_prev_with_recycling(input); } } if(find_next){ nth_channel_next = ags_channel_next_with_recycling(input); if(nth_channel_next != NULL){ #ifdef AGS_DEBUG g_message("found next"); #endif find_next = FALSE; replace_last = FALSE; if(complete_level_last == 0){ found_next = audio; next_channel = nth_channel_next; complete_level_last = 1; } } }else{ if(nth_channel_next == NULL){ nth_channel_next = ags_channel_next_with_recycling(input); } } if(prev_channel != NULL){ if(next_channel == NULL){ if(replace_with_last_recycling == NULL){ /* get prev channel mutex */ pthread_mutex_lock(application_mutex); prev_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) prev_channel); pthread_mutex_unlock(application_mutex); /* prev channel */ pthread_mutex_lock(prev_channel_mutex); replace_with_last_recycling = prev_channel->last_recycling; pthread_mutex_unlock(prev_channel_mutex); /* continues flag */ find_next = FALSE; } }else{ /* get prev and next channel mutex */ pthread_mutex_lock(application_mutex); prev_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) prev_channel); next_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) next_channel); pthread_mutex_unlock(application_mutex); /* prev channel */ pthread_mutex_lock(prev_channel_mutex); replace_with_last_recycling = prev_channel->last_recycling; pthread_mutex_unlock(prev_channel_mutex); /* next channel */ pthread_mutex_lock(next_channel_mutex); replace_with_first_recycling = next_channel->first_recycling; pthread_mutex_unlock(next_channel_mutex); } }else{ if(next_channel != NULL){ if(replace_with_first_recycling == NULL){ /* get prev and next channel mutex */ pthread_mutex_lock(application_mutex); next_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) next_channel); pthread_mutex_unlock(application_mutex); /* next channel */ pthread_mutex_lock(next_channel_mutex); replace_with_first_recycling = next_channel->first_recycling; pthread_mutex_unlock(next_channel_mutex); /* continues flag */ find_prev = FALSE; } } } } if(replace_first || replace_last){ return(FALSE); }else{ return(TRUE); } } void ags_channel_set_recycling_recursive_output(AgsChannel *output){ AgsAudio *audio; AgsChannel *input; AgsChannel *link; AgsChannel *nth_channel_prev, *nth_channel_next; AgsRecycling *first_recycling, *last_recycling; guint flags; guint audio_channel; pthread_mutex_t *audio_mutex; pthread_mutex_t *output_mutex; if(output == NULL){ return; } /* get output mutex */ pthread_mutex_lock(application_mutex); output_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* get audio and audio channel */ pthread_mutex_lock(output_mutex); audio = AGS_AUDIO(output->audio); audio_channel = output->audio_channel; pthread_mutex_unlock(output_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get input and flags */ pthread_mutex_lock(audio_mutex); input = audio->input; flags = audio->flags; pthread_mutex_unlock(audio_mutex); /* update input AgsRecallIDs */ //TODO:JK: check for compliance // ags_recall_id_reset_recycling(output->recall_id, // output->first_recycling, // replace_with_first_recycling, replace_with_last_recycling); if(replace_last){ /* do it so */ pthread_mutex_lock(output_mutex); output->last_recycling = replace_with_last_recycling; pthread_mutex_unlock(output_mutex); } /* last recycling */ if(replace_first){ /* do it so */ pthread_mutex_lock(output_mutex); output->first_recycling = replace_with_first_recycling; pthread_mutex_unlock(output_mutex); } /* deeper level */ pthread_mutex_lock(output_mutex); link = output->link; pthread_mutex_unlock(output_mutex); if(link != NULL){ ags_channel_set_recycling_recursive(link); } } void ags_channel_set_recycling_recursive(AgsChannel *input){ AgsAudio *audio; AgsChannel *output; guint flags; guint audio_channel, line; gboolean completed; pthread_mutex_t *audio_mutex; pthread_mutex_t *input_mutex; if(input == NULL){ return; } /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get audio and audio channel */ pthread_mutex_lock(input_mutex); audio = AGS_AUDIO(input->audio); audio_channel = input->audio_channel; line = input->line; pthread_mutex_unlock(input_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get output */ pthread_mutex_lock(audio_mutex); output = audio->output; flags = audio->flags; pthread_mutex_unlock(audio_mutex); /* AgsInput */ completed = ags_channel_set_recycling_recursive_input(input); if(completed){ return; } /* AgsOutput */ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (flags)) == 0){ if((AGS_AUDIO_ASYNC & (flags)) != 0){ output = ags_channel_nth(output, audio_channel); }else{ output = ags_channel_nth(output, line); } ags_channel_set_recycling_recursive_output(output); } } void ags_channel_set_recycling_emit_changed_input(AgsChannel *input){ AgsRecycling *input_first_recycling, *input_last_recycling; pthread_mutex_t *input_mutex; if(input == NULL){ return; } /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get current recycling */ pthread_mutex_lock(input_mutex); input_first_recycling = input->first_recycling; input_last_recycling = input->last_recycling; pthread_mutex_unlock(input_mutex); /* emit changed */ if(input != channel){ ags_channel_recycling_changed(input, changed_old_first_recycling, changed_old_last_recycling, input_first_recycling, input_last_recycling, old_first_recycling, old_last_recycling, first_recycling, last_recycling); } } void ags_channel_set_recycling_emit_changed_output(AgsChannel *output){ AgsChannel *link; AgsRecycling *output_first_recycling, *output_last_recycling; pthread_mutex_t *output_mutex; if(output == NULL){ return; } /* get output mutex */ pthread_mutex_lock(application_mutex); output_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* get current recycling */ pthread_mutex_lock(output_mutex); link = output->link; output_first_recycling = output->first_recycling; output_last_recycling = output->last_recycling; pthread_mutex_unlock(output_mutex); /* emit changed */ if(output != channel){ ags_channel_recycling_changed(output, changed_old_first_recycling, changed_old_last_recycling, output_first_recycling, output_last_recycling, old_first_recycling, old_last_recycling, first_recycling, last_recycling); } if(link != NULL){ ags_channel_set_recycling_emit_changed(link); } } void ags_channel_set_recycling_emit_changed(AgsChannel *input){ AgsAudio *audio; AgsChannel *output; guint flags; guint audio_channel, line; pthread_mutex_t *input_mutex; if(input == NULL){ return; } /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get audio and audio channel */ pthread_mutex_lock(input_mutex); audio = AGS_AUDIO(input->audio); audio_channel = input->audio_channel; line = input->line; pthread_mutex_unlock(input_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get output */ pthread_mutex_lock(audio_mutex); output = audio->output; flags = audio->flags; pthread_mutex_unlock(audio_mutex); /* AgsInput */ ags_channel_set_recycling_emit_changed_input(input); /* higher level */ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (flags)) == 0){ if((AGS_AUDIO_ASYNC & (flags)) != 0){ output = ags_channel_nth(output, audio_channel); }else{ output = ags_channel_nth(output, line); } ags_channel_set_recycling_emit_changed_output(output); } return; } /* entry point */ if(channel == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(channel_mutex); audio = AGS_AUDIO(channel->audio); pthread_mutex_unlock(channel_mutex); /* 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){ 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; parent = NULL; prev_channel = NULL; next_channel = NULL; replace_with_first_recycling = first_recycling; replace_with_last_recycling = last_recycling; changed_old_first_recycling = NULL; changed_old_last_recycling = NULL; complete_level_first = 0; complete_level_last = 0; replace_first = TRUE; replace_last = TRUE; find_next = TRUE; find_prev = TRUE; change_old_first = TRUE; change_old_last = TRUE; if((old_first_recycling == first_recycling)){ if(!update){ if(old_last_recycling == last_recycling){ return; } replace_first = FALSE; } } if((old_last_recycling == last_recycling)){ if(!update){ replace_last = FALSE; } } /* set recycling - update AgsChannel */ if(AGS_IS_INPUT(channel)){ ags_channel_set_recycling_recursive(channel); }else{ ags_channel_set_recycling_recursive_output(channel); } pthread_mutex_lock(channel_mutex); channel->first_recycling = first_recycling; channel->last_recycling = last_recycling; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* audio flags */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; pthread_mutex_unlock(audio_mutex); /* join now the retrieved recyclings */ next_first_recycling = NULL; prev_last_recycling = NULL; if(!(AGS_IS_INPUT(channel) && (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio_flags)) != 0)){ if(first_recycling != NULL){ if(prev_channel != NULL){ /* get prev channel mutex */ pthread_mutex_lock(application_mutex); nth_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) prev_channel); pthread_mutex_unlock(application_mutex); /* get prev channel last recycling */ pthread_mutex_lock(nth_channel_mutex); prev_last_recycling = prev_channel->last_recycling; pthread_mutex_unlock(nth_channel_mutex); if(prev_last_recycling != NULL){ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) prev_last_recycling); pthread_mutex_unlock(application_mutex); /* prev channel last recycling next */ pthread_mutex_lock(nth_recycling_mutex); prev_last_recycling->next = first_recycling; pthread_mutex_unlock(nth_recycling_mutex); /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_recycling); pthread_mutex_unlock(application_mutex); /* first recycling prev */ pthread_mutex_lock(nth_recycling_mutex); first_recycling->prev = prev_last_recycling; pthread_mutex_unlock(nth_recycling_mutex); }else{ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_recycling); pthread_mutex_unlock(application_mutex); /* first recycling prev */ pthread_mutex_lock(nth_recycling_mutex); first_recycling->prev = NULL; pthread_mutex_unlock(nth_recycling_mutex); } }else{ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_recycling); pthread_mutex_unlock(application_mutex); /* first recycling prev */ pthread_mutex_lock(nth_recycling_mutex); first_recycling->prev = NULL; pthread_mutex_unlock(nth_recycling_mutex); } if(next_channel != NULL){ /* get next channel mutex */ pthread_mutex_lock(application_mutex); nth_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) next_channel); pthread_mutex_unlock(application_mutex); /* get prev channel last recycling */ pthread_mutex_lock(nth_channel_mutex); next_first_recycling = next_channel->first_recycling; pthread_mutex_unlock(nth_channel_mutex); if(next_first_recycling != NULL){ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) next_first_recycling); pthread_mutex_unlock(application_mutex); /* next channel first recycling next */ pthread_mutex_lock(nth_recycling_mutex); next_first_recycling->prev = last_recycling; pthread_mutex_unlock(nth_recycling_mutex); /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* last recycling next */ pthread_mutex_lock(nth_recycling_mutex); last_recycling->next = next_first_recycling; pthread_mutex_unlock(nth_recycling_mutex); }else{ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* last recycling next */ pthread_mutex_lock(nth_recycling_mutex); last_recycling->next = NULL; pthread_mutex_unlock(nth_recycling_mutex); } }else{ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* last recycling next */ pthread_mutex_lock(nth_recycling_mutex); last_recycling->next = NULL; pthread_mutex_unlock(nth_recycling_mutex); } }else{ gboolean link_next, link_prev; if(prev_channel != NULL){ /* get prev channel mutex */ pthread_mutex_lock(application_mutex); nth_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) prev_channel); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(nth_channel_mutex); prev_last_recycling = prev_channel->last_recycling; pthread_mutex_unlock(nth_channel_mutex); if(prev_last_recycling != NULL){ link_next = TRUE; }else{ link_next = FALSE; } }else{ link_next = FALSE; } if(next_channel != NULL){ /* get prev channel mutex */ pthread_mutex_lock(application_mutex); nth_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) next_channel); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(nth_channel_mutex); next_first_recycling = next_channel->first_recycling; pthread_mutex_unlock(nth_channel_mutex); if(next_first_recycling != NULL){ link_prev = TRUE; }else{ link_prev = FALSE; } }else{ link_prev = FALSE; } if(link_next){ if(link_prev){ AgsRecycling *first_recycling, *last_recycling; /* get first recycling mutex */ pthread_mutex_lock(application_mutex); nth_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) next_channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(nth_channel_mutex); first_recycling = next_channel->first_recycling; pthread_mutex_unlock(nth_channel_mutex); /* get last recycling mutex */ pthread_mutex_lock(application_mutex); nth_channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) prev_channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(nth_channel_mutex); last_recycling = prev_channel->last_recycling; pthread_mutex_unlock(nth_channel_mutex); /* * */ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) next_first_recycling); pthread_mutex_unlock(application_mutex); /* next channel first recycling next */ pthread_mutex_lock(nth_recycling_mutex); next_first_recycling->prev = last_recycling; pthread_mutex_unlock(nth_recycling_mutex); /* * */ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) prev_last_recycling); pthread_mutex_unlock(application_mutex); /* prev channel last recycling next */ pthread_mutex_lock(nth_recycling_mutex); prev_last_recycling->next = first_recycling; pthread_mutex_unlock(nth_recycling_mutex); }else{ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) prev_last_recycling); pthread_mutex_unlock(application_mutex); /* prev channel last recycling next */ pthread_mutex_lock(nth_recycling_mutex); prev_last_recycling->next = NULL; pthread_mutex_unlock(nth_recycling_mutex); } }else if(link_prev){ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) next_first_recycling); pthread_mutex_unlock(application_mutex); /* next channel first recycling next */ pthread_mutex_lock(nth_recycling_mutex); next_first_recycling->prev = NULL; pthread_mutex_unlock(nth_recycling_mutex); } } } /* find and set parent */ if(first_recycling != NULL){ AgsAudio *audio; AgsChannel *output; guint audio_channel, line; pthread_mutex_t *audio_mutex; /* find parent */ parent = NULL; if(AGS_IS_OUTPUT(channel)){ pthread_mutex_lock(channel_mutex); current = channel->link; pthread_mutex_unlock(channel_mutex); }else{ current = channel; } while(current != NULL && parent == NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get audio */ pthread_mutex_lock(current_mutex); audio = (AgsAudio *) current->audio; audio_channel = current->audio_channel; line = current->line; pthread_mutex_unlock(current_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get nth */ pthread_mutex_lock(audio_mutex); output = audio->output; audio_flags = audio->flags; pthread_mutex_unlock(audio_mutex); /* get current */ if((AGS_AUDIO_ASYNC & (audio_flags)) != 0){ current = ags_channel_nth(output, audio_channel); }else{ current = ags_channel_nth(output, line); } /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* check if parent found */ if(current != NULL){ pthread_mutex_lock(current_mutex); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio_flags)) != 0){ /* set parent */ parent = current->first_recycling; } current = current->link; pthread_mutex_unlock(current_mutex); }else{ break; } } /* apply parent */ if(update){ nth_recycling = first_recycling; /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(recycling_mutex); stop_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); }else{ if(first_recycling == old_first_recycling){ nth_recycling = old_last_recycling; /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(recycling_mutex); stop_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); }else{ nth_recycling = first_recycling; if(old_first_recycling != NULL){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(recycling_mutex); stop_recycling = old_first_recycling->next; pthread_mutex_unlock(recycling_mutex); }else{ stop_recycling = NULL; } } } /* parent - do it so */ while(nth_recycling != stop_recycling){ /* get nth recycling mutex */ pthread_mutex_lock(application_mutex); nth_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) nth_recycling); pthread_mutex_unlock(application_mutex); /* set parent and iterate */ pthread_mutex_lock(nth_recycling_mutex); nth_recycling->parent = parent; nth_recycling = nth_recycling->next; pthread_mutex_unlock(nth_recycling_mutex); } } /* update recycling container */ pthread_mutex_lock(channel_mutex); recall_id = channel->recall_id; pthread_mutex_unlock(channel_mutex); while(recall_id != NULL){ AgsRecyclingContext *parent; /* check recycling context */ pthread_mutex_lock(audio_mutex); old_recycling_context = (AgsRecyclingContext *) AGS_RECALL_ID(recall_id->data)->recycling_context; pthread_mutex_unlock(audio_mutex); /* reset recycling context */ recycling_context = ags_recycling_context_reset_recycling(old_recycling_context, old_first_recycling, old_last_recycling, first_recycling, last_recycling); /* add child */ pthread_mutex_lock(old_recycling_context->mutex); parent = old_recycling_context->parent; pthread_mutex_unlock(old_recycling_context->mutex); ags_recycling_context_add_child(parent, recycling_context); /* reset recycling context */ ags_channel_recursive_reset_recycling_context(channel, old_recycling_context, recycling_context); /* iterate */ pthread_mutex_lock(channel_mutex); recall_id = recall_id->next; pthread_mutex_unlock(channel_mutex); } /* emit changed */ changed_old_first_recycling = NULL; changed_old_last_recycling = NULL; is_output = AGS_IS_OUTPUT(channel); if(!is_output){ AgsChannel *output; if(old_first_recycling != NULL){ changed_old_first_recycling = old_first_recycling; changed_old_last_recycling = old_last_recycling; } ags_channel_set_recycling_emit_changed_input(channel); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio_flags)) == 0){ output = audio->output; /* get matching output */ if((AGS_AUDIO_ASYNC & (flags)) != 0){ guint audio_channel; pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); output = ags_channel_nth(output, audio_channel); }else{ guint line; pthread_mutex_lock(channel_mutex); line = channel->line; pthread_mutex_unlock(channel_mutex); output = ags_channel_nth(output, line); } /* emit */ ags_channel_set_recycling_emit_changed_output(output); } }else{ ags_channel_set_recycling_emit_changed_output(channel); } } /** * ags_channel_recursive_reset_recycling_context: * @channel: the channel to reset * @old_recycling_context: the old recycling container context * @recycling_context: the new recycling container context * * Resets the recycling container context and update recycling field of recall ids if * needed. Invoke only by a task. * * Since: 1.0.0 */ void ags_channel_recursive_reset_recycling_context(AgsChannel *channel, AgsRecyclingContext *old_recycling_context, AgsRecyclingContext *recycling_context) { AgsAudio *audio; AgsChannel *link; AgsMutexManager *mutex_manager; gboolean is_output; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; auto void ags_channel_reset_recycling_context(GList *recall_id, AgsRecycling *recycling); auto void ags_channel_recursive_reset_recycling_context_up(AgsChannel *channel); auto void ags_channel_recursive_reset_recycling_context_down_input(AgsChannel *channel); auto void ags_channel_recursive_reset_recycling_context_down_output(AgsChannel *channel); void ags_channel_reset_recycling_context(GList *recall_id, AgsRecycling *recycling){ while(recall_id != NULL){ if(AGS_RECALL_ID(recall_id->data)->recycling_context == old_recycling_context){ g_object_set(recall_id->data, "recycling", recycling, "recycling-context", recycling_context, NULL); } recall_id = recall_id->next; } } void ags_channel_recursive_reset_recycling_context_up(AgsChannel *channel){ AgsAudio *audio; AgsChannel *current, *output; GList *recall_id; guint flags; guint audio_channel, line; gboolean is_output; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *current_mutex; if(channel == NULL){ return; } current = channel; /* get channel mutex */ pthread_mutex_lock(application_mutex); current_mutex = channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; line = channel->line; audio = (AgsAudio *) channel->audio; pthread_mutex_unlock(channel_mutex); /* */ is_output = AGS_IS_OUTPUT(channel); if(is_output){ /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* prepare jump and reset recycling context */ pthread_mutex_lock(audio_mutex); flags = audio->flags; ags_channel_reset_recycling_context(audio->recall_id, channel->first_recycling); pthread_mutex_unlock(audio_mutex); goto ags_channel_recursive_reset_recycling_context_up_OUTPUT; } /* reset current channel */ while(current != NULL){ /* get some fields and reset recycling context */ pthread_mutex_lock(current_mutex); audio = (AgsAudio *) current->audio; audio_channel = current->audio_channel; line = current->line; ags_channel_reset_recycling_context(current->recall_id, current->first_recycling); pthread_mutex_unlock(current_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* reset recycling container */ pthread_mutex_lock(audio_mutex); flags = audio->flags; output = audio->output; ags_channel_reset_recycling_context(audio->recall_id, current->first_recycling); pthread_mutex_unlock(audio_mutex); /* check break */ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (flags)) != 0){ break; } /* get current */ current = ags_channel_nth(output, ((AGS_AUDIO_ASYNC & (flags)) ? audio_channel: line)); ags_channel_recursive_reset_recycling_context_up_OUTPUT: /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* reset recycling container */ pthread_mutex_lock(current_mutex); ags_channel_reset_recycling_context(current->recall_id, current->first_recycling); /* iterate */ current = current->link; pthread_mutex_unlock(current_mutex); } /* update all in recycling context */ if(AGS_IS_INPUT(current) && (AGS_AUDIO_ASYNC & (flags)) != 0){ AgsChannel *input, *link; pthread_mutex_t *audio_mutex; pthread_mutex_t *input_mutex; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input = audio->input; pthread_mutex_unlock(audio_mutex); /* get input */ input = ags_channel_nth(input, audio_channel); while(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); if(input != current){ pthread_mutex_lock(input_mutex); link = input->link; ags_channel_reset_recycling_context(input->recall_id, input->first_recycling); pthread_mutex_unlock(input_mutex); /* traverse the tree */ ags_channel_recursive_reset_recycling_context_down_output(link); } /* iterate */ pthread_mutex_lock(input_mutex); input = input->next_pad; pthread_mutex_unlock(input_mutex); } } } void ags_channel_recursive_reset_recycling_context_down_input(AgsChannel *output){ AgsAudio *audio; AgsChannel *input; AgsChannel *link; guint flags; guint audio_channel, line; pthread_mutex_t *audio_mutex; pthread_mutex_t *output_mutex; pthread_mutex_t *input_mutex; if(output == NULL){ return; } /* get output mutex */ pthread_mutex_lock(application_mutex); output_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* get audio and defaults */ pthread_mutex_lock(output_mutex); audio = (AgsAudio *) output->audio; audio_channel = output->audio_channel; line = output->line; pthread_mutex_unlock(output_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* reset recycling container */ pthread_mutex_lock(audio_mutex); input = audio->input; flags = audio->flags; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_ASYNC & (flags)) != 0){ input = ags_channel_nth(input, audio_channel); while(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* reset recycling container */ pthread_mutex_lock(input_mutex); link = input->link; ags_channel_reset_recycling_context(input->recall_id, input->first_recycling); pthread_mutex_unlock(input_mutex); ags_channel_recursive_reset_recycling_context_down_output(link); /* iterate */ pthread_mutex_lock(input_mutex); input = input->next_pad; pthread_mutex_unlock(input_mutex); } }else{ input = ags_channel_nth(input, line); /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* reset recycling container */ pthread_mutex_lock(input_mutex); link = input->link; ags_channel_reset_recycling_context(input->recall_id, input->first_recycling); pthread_mutex_unlock(input_mutex); ags_channel_recursive_reset_recycling_context_down_output(link); } } void ags_channel_recursive_reset_recycling_context_down_output(AgsChannel *output){ AgsAudio *audio; guint flags; pthread_mutex_t *audio_mutex; pthread_mutex_t *output_mutex; if(output == NULL){ return; } /* get output mutex */ pthread_mutex_lock(application_mutex); output_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); /* get audio and defaults */ pthread_mutex_lock(output_mutex); audio = (AgsAudio *) output->audio; pthread_mutex_unlock(output_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* check if still reset recycling container */ pthread_mutex_lock(audio_mutex); flags = audio->flags; pthread_mutex_unlock(audio_mutex); if(output != channel && (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (flags)) != 0){ return; } /* reset recycling container - output */ pthread_mutex_lock(output_mutex); ags_channel_reset_recycling_context(output->recall_id, output->first_recycling); pthread_mutex_unlock(output_mutex); /* reset recycling container - audio */ pthread_mutex_lock(audio_mutex); ags_channel_reset_recycling_context(audio->recall_id, output->first_recycling); pthread_mutex_unlock(audio_mutex); /* traverse the tree */ ags_channel_recursive_reset_recycling_context_down_input(output); } /* entry point */ if(!AGS_IS_CHANNEL(channel)){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* traverse the tree */ is_output = AGS_IS_OUTPUT(channel); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; link = channel->link; pthread_mutex_unlock(channel_mutex); /* recursive reset */ if(!is_output){ ags_channel_recursive_reset_recycling_context_down_output(link); ags_channel_recursive_reset_recycling_context_up(channel); }else{ ags_channel_recursive_reset_recycling_context_down_output(channel); ags_channel_recursive_reset_recycling_context_up(link); } ags_audio_add_recycling_context(audio, (GObject *) recycling_context); ags_audio_remove_recycling_context(audio, (GObject *) old_recycling_context); } /** * ags_channel_recycling_changed: * @channel: the object recycling changed * @old_start_region: first recycling * @old_end_region: last recycling * @new_start_region: new first recycling * @new_end_region: new last recycling * @old_start_changed_region: modified link recycling start * @old_end_changed_region: modified link recyclig end * @new_start_changed_region: replacing link recycling start * @new_end_changed_region: replacing link recycling end * * Modify recycling. Asynchronously only. * * Since: 1.0.0 */ void ags_channel_recycling_changed(AgsChannel *channel, AgsRecycling *old_start_region, AgsRecycling *old_end_region, AgsRecycling *new_start_region, AgsRecycling *new_end_region, AgsRecycling *old_start_changed_region, AgsRecycling *old_end_changed_region, AgsRecycling *new_start_changed_region, AgsRecycling *new_end_changed_region) { if(channel == NULL){ return; } /* verify type */ if(!(AGS_IS_CHANNEL(channel))){ return; } /* emit */ g_object_ref(G_OBJECT(channel)); g_signal_emit(G_OBJECT(channel), channel_signals[RECYCLING_CHANGED], 0, old_start_region, old_end_region, new_start_region, new_end_region, old_start_changed_region, old_end_changed_region, new_start_changed_region, new_end_changed_region); g_object_unref(G_OBJECT(channel)); } /** * ags_channel_recursive_set_property: * @channel: the #AgsChannel * @parameter: the #GParameter-struct array containing properties * @n_params: the length of @parameter array * * Recursive set property for #AgsChannel. * * Since: 1.0.0 */ void ags_channel_recursive_set_property(AgsChannel *channel, GParameter *parameter, gint n_params) { AgsChannel *link; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *link_mutex; auto void ags_channel_set_property(AgsChannel *channel, GParameter *parameter, gint n_params); auto void ags_channel_recursive_set_property_down(AgsChannel *channel, GParameter *parameter, gint n_params); auto void ags_channel_recursive_set_property_down_input(AgsChannel *channel, GParameter *parameter, gint n_params); void ags_channel_set_property(AgsChannel *channel, GParameter *parameter, gint n_params){ guint i; for(i = 0; i < n_params; i++){ g_object_set_property((GObject *) channel, parameter[i].name, &(parameter[i].value)); } } void ags_channel_recursive_set_property_down(AgsChannel *channel, GParameter *parameter, gint n_params){ if(channel == NULL){ return; } ags_channel_set_property(channel, parameter, n_params); ags_channel_recursive_set_property_down_input(channel, parameter, n_params); } void ags_channel_recursive_set_property_down_input(AgsChannel *channel, GParameter *parameter, gint n_params){ AgsAudio *audio; AgsChannel *input; AgsChannel *link; guint audio_channel; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *input_mutex; if(channel == NULL){ return; } /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = (AgsAudio *) channel->audio; audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); if(audio == NULL){ return; } /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); input = audio->input; pthread_mutex_unlock(channel_mutex); /* */ input = ags_channel_nth(input, audio_channel); while(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(input_mutex); link = input->link; pthread_mutex_unlock(input_mutex); /* set property */ ags_channel_set_property(input, parameter, n_params); ags_channel_recursive_set_property_down(link, parameter, n_params); /* iterate */ pthread_mutex_lock(input_mutex); input = input->next_pad; pthread_mutex_unlock(input_mutex); } } if(channel == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); link = channel->link; pthread_mutex_unlock(channel_mutex); if(AGS_IS_INPUT(channel)){ ags_channel_set_property(channel, parameter, n_params); ags_channel_recursive_set_property_down(link, parameter, n_params); }else{ ags_channel_recursive_set_property_down(channel, parameter, n_params); } } /** * ags_channel_recursive_play_init: * @channel: the #AgsChannel to prepare * @stage: valid values for @stage are: -1 for running all three stages, or the stages 0 through 2 to run * just the specified stage. With stage is meant the #AgsRecall run_init_pre, #AgsRecall run_init_inter * and #AgsRecall run_init_post stages. * @arrange_recall_id: %TRUE if new #AgsRecallID objects should be created * @duplicate_templates: %TRUE if the #AgsRecall templates should be duplicated * @do_playback: %TRUE if the purpose is a simple playback of the tree, this option is used to omit the * duplication of #AgsRecall templates which haven't set %AGS_RECALL_PLAYBACK flag * @do_sequencer: %TRUE if the purpose is playing the tree for a sequencer, this option is used to omit the * duplication of #AgsRecall templates which haven't set the %AGS_RECALL_SEQUENCER flag * @do_notation: %TRUE if the purpose is playing the tree for a notation, this option is used to omit the * duplication of #AgsRecall templates which haven't set the %AGS_RECALL_NOTATION flag * @resolve_dependencies: %TRUE if the * @recall_id: the initial recall id or %NULL * * Make the tree ready for a new #AgsPlayback. Only for asynchronous use, take a look at #AgsInitChannel or * #AgsInitAudio task. * * Returns: a new #AgsRecallID * * Since: 1.0.0 */ AgsRecallID* ags_channel_recursive_play_init(AgsChannel *channel, gint stage, gboolean arrange_recall_id, gboolean duplicate_templates, gboolean do_playback, gboolean do_sequencer, gboolean do_notation, gboolean resolve_dependencies, AgsRecallID *recall_id) { AgsRecyclingContext *recycling_context; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; if(!AGS_IS_CHANNEL(channel)){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); if(recall_id == NULL){ recall_id = ags_recall_id_new(channel->first_recycling); if(do_playback){ recall_id->flags |= AGS_RECALL_ID_PLAYBACK; }else if(do_sequencer){ recall_id->flags |= AGS_RECALL_ID_SEQUENCER; }else if(do_notation){ recall_id->flags |= AGS_RECALL_ID_NOTATION; } } if(arrange_recall_id){ ags_channel_recursive_reset_recall_id(channel, recall_id, TRUE, TRUE, NULL, FALSE, FALSE); } if(duplicate_templates){ ags_channel_recursive_init(channel, recall_id, 0, 4, TRUE, TRUE); } if(resolve_dependencies){ ags_channel_recursive_init(channel, recall_id, 1, 4, TRUE, TRUE); } if(stage == -1 || (stage >= 0 && stage < 4)){ ags_channel_recursive_init(channel, recall_id, 2, stage, TRUE, TRUE); } if(stage == -1 || stage == 0){ if(do_playback){ AGS_PLAYBACK(channel->playback)->recall_id[0] = recall_id; g_atomic_int_or(&(AGS_PLAYBACK(channel->playback)->flags), AGS_PLAYBACK_PLAYBACK); }else if(do_sequencer){ AGS_PLAYBACK(channel->playback)->recall_id[1] = recall_id; g_atomic_int_or(&(AGS_PLAYBACK(channel->playback)->flags), AGS_PLAYBACK_SEQUENCER); }else if(do_notation){ AGS_PLAYBACK(channel->playback)->recall_id[2] = recall_id; g_atomic_int_or(&(AGS_PLAYBACK(channel->playback)->flags), AGS_PLAYBACK_NOTATION); } } return(recall_id); } /** * ags_channel_recursive_play_threaded: * @channel: an #AgsChannel * @recall_id: appropriate #AgsRecallID * @stage: run_pre, run_inter or run_post * * Super-threaded version of ags_channel_recursive_play() one single run of @stage step. This * function expects to be called by #AgsIteratorThread and having a functional #AgsRecyclingThread * setup. * * Since: 1.0.0 */ void ags_channel_recursive_play_threaded(AgsChannel *channel, AgsRecallID *recall_id, gint stage) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; if(!AGS_IS_CHANNEL(channel) || !AGS_IS_RECALL_ID(recall_id)){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); ags_channel_recursive_run(channel, recall_id, stage, TRUE, TRUE, TRUE); } /** * ags_channel_recursive_play: * @channel: an #AgsChannel * @recall_id: appropriate #AgsRecallID * @stage: run_pre, run_inter or run_post * * Call recursively ags_channel_play() and ags_audio_play(). This tree iterator * function isn't capable of doing parallel computing tree. * * Since: 1.0.0 */ void ags_channel_recursive_play(AgsChannel *channel, AgsRecallID *recall_id, gint stage) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; if(!AGS_IS_CHANNEL(channel) || !AGS_IS_RECALL_ID(recall_id)){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); ags_channel_recursive_run(channel, recall_id, stage, TRUE, TRUE, FALSE); } /** * ags_channel_tillrecycling_cancel: * @channel: an #AgsChannel * @recall_id: an #AgsRecallID * * Traverses the tree down and up and calls ags_channel_cancel() for matchin * @recall_id. * * Since: 1.0.0 */ void ags_channel_tillrecycling_cancel(AgsChannel *channel, AgsRecallID *recall_id) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; if(!AGS_IS_CHANNEL(channel) || !AGS_IS_RECALL_ID(recall_id)){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); ags_channel_recursive_cancel(channel, recall_id, TRUE, TRUE); } /** * ags_channel_recursive_reset_recall_ids: * @channel: an #AgsChannel that was linked with @link * @link: an #AgsChannel that was linked with @channel * @old_channel_link: the old link of @channel * @old_link_link: the old link of @link * * Called by ags_channel_set_link() to handle running #AgsAudio objects correctly. * This function destroys #AgsRecall objects which were uneeded because they became * invalid due to unlinking. By the way it destroys the uneeded #AgsRecallID objects, too. * Additionally it creates #AgsRecall and #AgsRecallID objects to prepare becoming a * running object (#AgsAudio or #AgsChannel). * By the clean up the invalid #AgsRecall objects will be removed. * Once the clean up has done ags_channel_recursive_play_init() will be called for every * playing instance that was found. * * Since: 1.0.0 */ void ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link, AgsChannel *old_channel_link, AgsChannel *old_link_link) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; auto void ags_channel_recursive_reset_recall_ids_unset(AgsChannel *channel, AgsChannel *old_channel_link); void ags_channel_recursive_reset_recall_ids_unset(AgsChannel *channel, AgsChannel *old_channel_link) { if(AGS_IS_OUTPUT(channel)){ GList *start_channel_recall_id, *channel_recall_id; pthread_mutex_t *channel_mutex; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* copy recall id */ pthread_mutex_lock(channel_mutex); channel_recall_id = start_channel_recall_id = g_list_copy(channel->recall_id); pthread_mutex_unlock(channel_mutex); while(channel_recall_id != NULL){ ags_channel_recursive_cancel(old_channel_link, channel_recall_id->data, TRUE, FALSE); ags_channel_recursive_reset_recall_id(old_channel_link, NULL, FALSE, FALSE, channel_recall_id->data, TRUE, FALSE); channel_recall_id = channel_recall_id->next; } g_list_free(start_channel_recall_id); }else{ GList *start_old_channel_link_recall_id, *old_channel_link_recall_id; pthread_mutex_t *old_channel_link_mutex; /* get old channel link mutex */ pthread_mutex_lock(application_mutex); old_channel_link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) old_channel_link); pthread_mutex_unlock(application_mutex); /* copy recall id */ pthread_mutex_lock(old_channel_link_mutex); old_channel_link_recall_id = start_old_channel_link_recall_id = g_list_copy(old_channel_link->recall_id); pthread_mutex_unlock(old_channel_link_mutex); while(old_channel_link_recall_id != NULL){ ags_channel_recursive_cancel(channel, old_channel_link_recall_id->data, TRUE, FALSE); ags_channel_recursive_reset_recall_id(channel, NULL, FALSE, FALSE, old_channel_link_recall_id->data, TRUE, FALSE); old_channel_link_recall_id = old_channel_link_recall_id->next; } g_list_free(start_old_channel_link_recall_id); } } if(!AGS_IS_CHANNEL(channel) && !AGS_IS_CHANNEL(link)){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* first - unset */ if(old_channel_link != NULL){ if(channel != NULL){ ags_channel_recursive_reset_recall_ids_unset(channel, old_channel_link); }else{ g_critical("channel == NULL && old_channel_link != NULL"); } } if(old_link_link != NULL){ if(link != NULL){ ags_channel_recursive_reset_recall_ids_unset(link, old_link_link); }else{ g_critical("link == NULL && old_link_link != NULL"); } } /* next - set */ if(channel != NULL){ if(link != NULL){ if(AGS_IS_OUTPUT(channel)){ GList *start_channel_recall_id, *channel_recall_id; pthread_mutex_t *channel_mutex; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* copy recall id */ pthread_mutex_lock(channel_mutex); channel_recall_id = start_channel_recall_id = g_list_copy(channel->recall_id); pthread_mutex_unlock(channel_mutex); while(channel_recall_id != NULL){ ags_channel_recursive_reset_recall_id(link, channel_recall_id->data, TRUE, FALSE, NULL, FALSE, FALSE); ags_channel_recursive_init(link, channel_recall_id->data, -1, -1, TRUE, FALSE); channel_recall_id = channel_recall_id->next; } g_list_free(start_channel_recall_id); }else{ GList *start_link_recall_id, *link_recall_id; pthread_mutex_t *link_mutex; /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* copy recall id */ pthread_mutex_lock(link_mutex); link_recall_id = start_link_recall_id = g_list_copy(link->recall_id); pthread_mutex_unlock(link_mutex); while(link_recall_id != NULL){ ags_channel_recursive_reset_recall_id(channel, link_recall_id->data, TRUE, FALSE, NULL, FALSE, FALSE); ags_channel_recursive_init(channel, link_recall_id->data, -1, -1, TRUE, FALSE); link_recall_id = link_recall_id->next; } g_list_free(start_link_recall_id); } } } } /** * ags_channel_get_level: * @channel: the #AgsChannel * * Get level. * * Returns: the level of @channel as #AgsChannel or %NULL if no parent recycling. * * Since: 1.2.7 */ AgsChannel* ags_channel_get_level(AgsChannel *channel) { AgsAudio *audio; AgsChannel *output; AgsChannel *level; AgsMutexManager *mutex_manager; guint audio_flags; guint audio_channel; guint input_line; pthread_mutex_t *audio_mutex; pthread_mutex_t *application_mutex; pthread_mutex_t *level_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* check above recycling */ level = channel; if(AGS_IS_OUTPUT(channel)){ goto ags_channel_get_level_ITERATE; } while(level != NULL){ /* get level mutex */ pthread_mutex_lock(application_mutex); level_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) level); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(level_mutex); audio = level->audio; audio_channel = level->audio_channel; input_line = level->line; pthread_mutex_unlock(level_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; output = audio->output; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ break; } if((AGS_AUDIO_ASYNC & audio_flags) != 0){ level = ags_channel_nth(output, audio_channel); }else{ level = ags_channel_nth(output, input_line); } if(level == NULL){ break; } ags_channel_get_level_ITERATE: /* get level mutex */ pthread_mutex_lock(application_mutex); level_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) level); pthread_mutex_unlock(application_mutex); /* iterate */ pthread_mutex_lock(level_mutex); level = level->link; pthread_mutex_unlock(level_mutex); } return(level); } /** * ags_channel_recursive_reset_recall_id: * @channel: the #AgsChannel * @valid_recall_id: set #AgsRecallID * @valid_set_up: if %TRUE valid set going up, else not * @valid_set_down: if %TRUE valid set going down, else not * @invalid_recall_id: unset #AgsRecallID * @invalid_unset_up: if %TRUE invalid unset going up, else not * @invalid_unset_down: if %TRUE invalid unset going down, else not * * Recursive reset recall id. Either set @valid_recall_id or unset @invalid_recall_id by specified * directions up/down. * * Since: 1.2.7 */ void ags_channel_recursive_reset_recall_id(AgsChannel *channel, AgsRecallID *valid_recall_id, gboolean valid_set_up, gboolean valid_set_down, AgsRecallID *invalid_recall_id, gboolean invalid_unset_up, gboolean invalid_unset_down) { AgsMutexManager *mutex_manager; guint recall_id_flags; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; auto void ags_channel_recursive_reset_recall_id_set_down(AgsChannel *channel, AgsRecallID *recall_id); auto void ags_channel_recursive_reset_recall_id_unset_down(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_recursive_reset_recall_id_set_down(AgsChannel *channel, AgsRecallID *recall_id) { AgsAudio *audio; AgsRecallID *audio_recall_id; AgsRecyclingContext *recycling_context; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(channel == NULL || recall_id == NULL){ return; } if(recall_id->recycling_context == NULL){ g_critical("recall id without recycling_context"); return; } /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; recycling_context = recall_id->recycling_context; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* special case */ if(AGS_IS_INPUT(channel)){ AgsChannel *link; AgsRecycling *first_recycling; AgsRecallID *next_recall_id; pthread_mutex_t *link_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); link = channel->link; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); if(link != NULL){ AgsRecycling *link_first_recycling; /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(link_mutex); link_first_recycling = link->first_recycling; pthread_mutex_unlock(link_mutex); /* instantiate link recall id */ next_recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", link_first_recycling, "recycling-context", recycling_context, NULL); next_recall_id->flags |= recall_id_flags; /* traverse */ ags_channel_recursive_reset_recall_id_set_down(link, next_recall_id); } /* add recall id - input */ ags_channel_add_recall_id(channel, recall_id); /* instantiate audio recall id */ audio_recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", recycling_context, NULL); audio_recall_id->flags |= recall_id_flags; /* add recall id - audio */ ags_audio_add_recall_id(audio, audio_recall_id); }else{ AgsChannel *input; AgsChannel *link; AgsRecycling *first_recycling; AgsRecallID *input_recall_id; AgsRecallID *next_recall_id; AgsRecyclingContext *next_recycling_context; guint audio_flags; guint audio_channel; guint output_line; pthread_mutex_t *input_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; output_line = channel->line; first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; input = audio->input; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_ASYNC & audio_flags) != 0){ input = ags_channel_nth(input, audio_channel); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecycling *first_recycling, *last_recycling; AgsRecycling *recycling, *end_recycling; guint64 length; guint64 i; pthread_mutex_t *recycling_mutex; first_recycling = NULL; last_recycling = NULL; if(input != NULL){ AgsChannel *first_with_recycling, *last_with_recycling; pthread_mutex_t *current_input_mutex; first_with_recycling = ags_channel_first_with_recycling(input); last_with_recycling = ags_channel_last_with_recycling(input); if(first_with_recycling != NULL){ /* get current input mutex */ pthread_mutex_lock(application_mutex); current_input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_with_recycling); pthread_mutex_unlock(application_mutex); /* get first recycling */ pthread_mutex_lock(current_input_mutex); first_recycling = first_with_recycling->first_recycling; pthread_mutex_unlock(current_input_mutex); /* get current input mutex */ pthread_mutex_lock(application_mutex); current_input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_with_recycling); pthread_mutex_unlock(application_mutex); /* get last recycling */ pthread_mutex_lock(current_input_mutex); last_recycling = last_with_recycling->last_recycling; pthread_mutex_unlock(current_input_mutex); } } /* get recycling mutex */ if(last_recycling != NULL){ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* get end recycling */ pthread_mutex_lock(recycling_mutex); end_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); /* recall - recycling context */ length = ags_recycling_position(first_recycling, end_recycling, last_recycling); next_recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "length", length, "parent", recycling_context, NULL); ags_audio_add_recycling_context(audio, next_recycling_context); /* insert recycling */ recycling = first_recycling; for(i = 0; i < length; i++){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* insert */ ags_recycling_context_replace(next_recycling_context, recycling, i); /* iterate */ pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } }else{ /* recall - empty recycling context */ next_recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "length", 0, "parent", recycling_context, NULL); ags_audio_add_recycling_context(audio, next_recycling_context); } }else{ next_recycling_context = recycling_context; } while(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* instantiate input recall id */ input_recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", next_recycling_context, NULL); input_recall_id->flags |= recall_id_flags; /* get link */ pthread_mutex_lock(input_mutex); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* instantiate link recall id */ next_recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", next_recycling_context, NULL); next_recall_id->flags |= recall_id_flags; /* traverse */ ags_channel_recursive_reset_recall_id_set_down(link, next_recall_id); } /* add recall id - input */ ags_channel_add_recall_id(input, input_recall_id); if(recycling_context != next_recycling_context){ /* instantiate audio recall id */ audio_recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", next_recycling_context, NULL); audio_recall_id->flags |= recall_id_flags; /* add recall id - audio */ ags_audio_add_recall_id(audio, audio_recall_id); } /* iterate */ pthread_mutex_lock(input_mutex); input = input->next; pthread_mutex_unlock(input_mutex); } }else{ input = ags_channel_nth(input, output_line); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecycling *first_recycling, *last_recycling; AgsRecycling *recycling, *end_recycling; guint64 length; guint64 i; pthread_mutex_t *recycling_mutex; AgsChannel *first_with_recycling, *last_with_recycling; pthread_mutex_t *current_input_mutex; first_recycling = NULL; last_recycling = NULL; if(input != NULL){ /* get current input mutex */ pthread_mutex_lock(application_mutex); current_input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* first/last with recycling */ pthread_mutex_lock(current_input_mutex); first_recycling = input->first_recycling; last_recycling = input->last_recycling; pthread_mutex_unlock(current_input_mutex); } /* get recycling mutex */ if(last_recycling != NULL){ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* get end recycling */ pthread_mutex_lock(recycling_mutex); end_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); /* recall - recycling context */ length = ags_recycling_position(first_recycling, end_recycling, last_recycling); next_recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "length", length, "parent", recycling_context, NULL); ags_audio_add_recycling_context(audio, next_recycling_context); /* insert recycling */ recycling = first_recycling; for(i = 0; i < length; i++){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* insert */ ags_recycling_context_replace(next_recycling_context, recycling, i); /* iterate */ pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } }else{ /* recall - empty recycling context */ next_recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "length", 0, "parent", recycling_context, NULL); ags_audio_add_recycling_context(audio, next_recycling_context); } }else{ next_recycling_context = recycling_context; } if(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* instantiate input recall id */ input_recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", next_recycling_context, NULL); input_recall_id->flags |= recall_id_flags; /* get link */ pthread_mutex_lock(input_mutex); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* instantiate link recall id */ next_recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", next_recycling_context, NULL); next_recall_id->flags |= recall_id_flags; /* traverse */ ags_channel_recursive_reset_recall_id_set_down(link, next_recall_id); } /* add recall id - input */ ags_channel_add_recall_id(input, input_recall_id); } } if(recycling_context != next_recycling_context){ /* instantiate audio recall id */ audio_recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", next_recycling_context, NULL); audio_recall_id->flags |= recall_id_flags; g_object_set(next_recycling_context, "recall-id", audio_recall_id, NULL); /* add recall id - audio */ ags_audio_add_recall_id(audio, audio_recall_id); } /* instantiate audio recall id */ audio_recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", recycling_context, NULL); audio_recall_id->flags |= recall_id_flags; /* add recall id - audio */ ags_audio_add_recall_id(audio, audio_recall_id); /* add recall id - output */ ags_channel_add_recall_id(channel, recall_id); } } void ags_channel_recursive_reset_recall_id_unset_down(AgsChannel *channel, AgsRecallID *recall_id) { AgsAudio *audio; AgsRecallID *audio_recall_id; AgsRecyclingContext *recycling_context; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(channel == NULL || recall_id == NULL){ return; } /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; recycling_context = recall_id->recycling_context; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* special case */ if(AGS_IS_INPUT(channel)){ AgsChannel *link; AgsRecallID *next_recall_id; pthread_mutex_t *link_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); link = channel->link; pthread_mutex_unlock(channel_mutex); if(link != NULL){ /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_reset_recall_id_unset_down(link, next_recall_id); } /* remove recall id - input */ ags_channel_remove_recall_id(channel, recall_id); /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); /* remove recall id - audio */ ags_audio_remove_recall_id(audio, audio_recall_id); }else{ AgsChannel *input; AgsChannel *link; AgsRecallID *input_recall_id; AgsRecallID *next_recall_id; AgsRecyclingContext *next_recycling_context; guint audio_flags; guint audio_channel; guint output_line; pthread_mutex_t *input_mutex; pthread_mutex_t *link_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; output_line = channel->line; pthread_mutex_unlock(channel_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; input = audio->input; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_ASYNC & audio_flags) != 0){ input = ags_channel_nth(input, audio_channel); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecallID *default_recall_id; /* find parent recycling context */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_parent_recycling_context(audio->recall_id, recycling_context); next_recycling_context = default_recall_id->recycling_context; pthread_mutex_unlock(audio_mutex); }else{ next_recycling_context = recycling_context; } while(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get input recall id and link */ pthread_mutex_lock(input_mutex); input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, next_recycling_context); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, next_recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_reset_recall_id_unset_down(link, next_recall_id); } /* remove recall id - input */ ags_channel_remove_recall_id(input, input_recall_id); /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, next_recycling_context); pthread_mutex_unlock(audio_mutex); /* remove recall id - audio */ ags_audio_remove_recall_id(audio, audio_recall_id); /* iterate */ pthread_mutex_lock(input_mutex); input = input->next; pthread_mutex_unlock(input_mutex); } }else{ input = ags_channel_nth(input, output_line); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecallID *default_recall_id; /* find parent recycling context */ pthread_mutex_lock(audio_mutex); default_recall_id = ags_recall_id_find_parent_recycling_context(audio->recall_id, recycling_context); next_recycling_context = default_recall_id->recycling_context; pthread_mutex_unlock(audio_mutex); }else{ next_recycling_context = recycling_context; } if(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get input recall id and link */ pthread_mutex_lock(input_mutex); input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, next_recycling_context); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, next_recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_reset_recall_id_unset_down(link, next_recall_id); } /* remove recall id - input */ ags_channel_remove_recall_id(input, input_recall_id); /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, next_recycling_context); pthread_mutex_unlock(audio_mutex); /* remove recall id - audio */ ags_audio_remove_recall_id(audio, audio_recall_id); } } /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); /* remove recall id - audio */ ags_audio_remove_recall_id(audio, audio_recall_id); /* remove recall id - output */ ags_channel_remove_recall_id(channel, recall_id); } } if(!AGS_IS_CHANNEL(channel)){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* remove recall id */ if(invalid_recall_id != NULL){ if(invalid_recall_id->recycling_context == NULL){ g_critical("unable to handle invalid recall id without recycling context"); }else{ g_object_ref(invalid_recall_id); g_object_ref(invalid_recall_id->recycling_context); if(invalid_unset_down){ ags_channel_recursive_reset_recall_id_unset_down(channel, invalid_recall_id); } if(invalid_unset_up){ AgsAudio *audio; AgsChannel *output; AgsChannel *current; AgsRecallID *recall_id; AgsRecyclingContext *recycling_context; guint audio_flags; guint audio_channel; guint input_line; pthread_mutex_t *audio_mutex; pthread_mutex_t *current_mutex; current = channel; /* get recycling context */ pthread_mutex_lock(channel_mutex); recycling_context = invalid_recall_id->recycling_context; pthread_mutex_unlock(channel_mutex); if(AGS_IS_OUTPUT(channel)){ /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove of audio */ pthread_mutex_lock(audio_mutex); recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); ags_audio_remove_recall_id(audio, recall_id); /* jump into loop */ goto ags_channel_recursive_reset_recall_id_INVALID_GO_UP; } /* go up */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_mutex); audio = current->audio; audio_channel = current->audio_channel; input_line = current->line; pthread_mutex_unlock(current_mutex); /* remove of input */ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); ags_channel_remove_recall_id(current, recall_id); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove of audio */ pthread_mutex_lock(audio_mutex); recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); ags_audio_remove_recall_id(audio, recall_id); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; output = audio->output; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ break; } if((AGS_AUDIO_ASYNC & audio_flags) != 0){ current = ags_channel_nth(output, audio_channel); }else{ current = ags_channel_nth(output, input_line); } if(current == NULL){ break; } ags_channel_recursive_reset_recall_id_INVALID_GO_UP: /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* remove of output */ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); ags_channel_remove_recall_id(current, recall_id); /* iterate */ pthread_mutex_lock(current_mutex); current = current->link; pthread_mutex_unlock(current_mutex); } } g_object_unref(invalid_recall_id->recycling_context); g_object_unref(invalid_recall_id); } } /* add recall id */ if(valid_recall_id != NULL){ AgsChannel *level; AgsRecycling *first_recycling; AgsRecyclingContext *recycling_context; pthread_mutex_lock(channel_mutex); first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); recycling_context = valid_recall_id->recycling_context; recall_id_flags = (valid_recall_id->flags) & (AGS_RECALL_ID_PLAYBACK | AGS_RECALL_ID_SEQUENCER | AGS_RECALL_ID_NOTATION); if(recycling_context == NULL){ level = ags_channel_get_level(channel); if(level == NULL){ /* play - recycling context */ recycling_context = ags_recycling_context_new(1); ags_recycling_context_replace(recycling_context, first_recycling, 0); }else{ AgsRecycling *first_recycling, *last_recycling; AgsRecycling *recycling, *end_recycling; guint64 length; guint64 i; pthread_mutex_t *level_mutex; pthread_mutex_t *recycling_mutex; /* get current mutex */ pthread_mutex_lock(application_mutex); level_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) level); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(level_mutex); first_recycling = level->first_recycling; last_recycling = level->last_recycling; pthread_mutex_unlock(level_mutex); /* get recycling mutex */ if(last_recycling != NULL){ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) last_recycling); pthread_mutex_unlock(application_mutex); /* get end recycling */ pthread_mutex_lock(recycling_mutex); end_recycling = last_recycling->next; pthread_mutex_unlock(recycling_mutex); /* recall - recycling context */ length = ags_recycling_position(first_recycling, end_recycling, last_recycling); recycling_context = ags_recycling_context_new(length); /* insert recycling */ recycling = first_recycling; for(i = 0; i < length; i++){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* insert */ ags_recycling_context_replace(recycling_context, recycling, i); /* iterate */ pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } }else{ /* recall - empty recycling context */ recycling_context = ags_recycling_context_new(0); } } } g_object_set(recycling_context, "recall-id", valid_recall_id, NULL); g_object_set(valid_recall_id, "recycling", first_recycling, "recycling-context", recycling_context, NULL); if(valid_set_down){ ags_channel_recursive_reset_recall_id_set_down(channel, valid_recall_id); } if(valid_set_up){ AgsAudio *audio; AgsChannel *output; AgsChannel *current; AgsRecycling *first_recycling; AgsRecallID *recall_id; guint audio_flags; guint audio_channel; guint input_line; gboolean use_current_recycling; pthread_mutex_t *audio_mutex; pthread_mutex_t *current_mutex; current = channel; /* get first recycling */ use_current_recycling = TRUE; if(level == NULL){ use_current_recycling = FALSE; pthread_mutex_lock(channel_mutex); first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); } if(AGS_IS_OUTPUT(channel)){ /* jump into loop */ recall_id = valid_recall_id; goto ags_channel_recursive_reset_recall_id_VALID_GO_UP; } /* go up */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_mutex); audio = current->audio; audio_channel = current->audio_channel; input_line = current->line; if(use_current_recycling){ first_recycling = current->first_recycling; } pthread_mutex_unlock(current_mutex); /* create input recall id */ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", recycling_context, NULL); recall_id->flags |= recall_id_flags; /* add to input */ ags_channel_add_recall_id(current, recall_id); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* create audio recall id */ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", recycling_context, NULL); recall_id->flags |= recall_id_flags; /* add to audio */ ags_audio_add_recall_id(audio, recall_id); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; output = audio->output; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ break; } if((AGS_AUDIO_ASYNC & audio_flags) != 0){ current = ags_channel_nth(output, audio_channel); }else{ current = ags_channel_nth(output, input_line); } if(current == NULL){ break; } ags_channel_recursive_reset_recall_id_VALID_GO_UP: /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_mutex); if(use_current_recycling){ first_recycling = current->first_recycling; } pthread_mutex_unlock(current_mutex); if(valid_recall_id == recall_id){ if(!valid_set_down){ /* add provided recall id */ ags_channel_add_recall_id(current, recall_id); /* create audio recall id */ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", recycling_context, NULL); recall_id->flags |= recall_id_flags; ags_audio_add_recall_id(audio, recall_id); } }else{ /* create output recall id */ recall_id = g_object_new(AGS_TYPE_RECALL_ID, "recycling", first_recycling, "recycling-context", recycling_context, NULL); recall_id->flags |= recall_id_flags; ags_channel_add_recall_id(current, recall_id); } /* iterate */ pthread_mutex_lock(current_mutex); current = current->link; pthread_mutex_unlock(current_mutex); } } } } /** * ags_channel_recursive_init: * @channel: the #AgsChannel * @recall_id: the #AgsRecallID * @init_up: if %TRUE init going up, else not * @init_down: if %TRUE init going down, else not * * Recursive initialize the recall id. This means any recall is going to be * duplicated, resolved and initialized for @recall_id. * * Since: 1.2.7 */ void ags_channel_recursive_init(AgsChannel *channel, AgsRecallID *recall_id, gint stage, gint init_stage, gboolean init_up, gboolean init_down) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; auto void ags_channel_recursive_init_down(AgsChannel *channel, AgsRecallID *recall_id); auto void ags_channel_recursive_init_up(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_recursive_init_down(AgsChannel *channel, AgsRecallID *recall_id) { AgsAudio *audio; AgsRecallID *audio_recall_id; AgsRecyclingContext *recycling_context; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; recycling_context = recall_id->recycling_context; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* special case */ if(AGS_IS_INPUT(channel)){ AgsChannel *link; AgsRecallID *next_recall_id; pthread_mutex_t *link_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); link = channel->link; pthread_mutex_unlock(channel_mutex); if(link != NULL){ AgsRecycling *link_first_recycling; /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_init_down(link, next_recall_id); } /* init recall - input */ switch(stage){ case 0: { ags_channel_duplicate_recall(channel, recall_id); } break; case 1: { ags_channel_resolve_recall(channel, recall_id); } break; case 2: { ags_channel_init_recall(channel, init_stage, recall_id); } break; } /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); /* init recall - audio */ switch(stage){ case 0: { ags_audio_duplicate_recall(audio, audio_recall_id); } break; case 1: { ags_audio_resolve_recall(audio, audio_recall_id); } break; case 2: { ags_audio_init_recall(audio, init_stage, audio_recall_id); } break; } }else{ AgsChannel *input; AgsChannel *link; AgsRecallID *input_recall_id; AgsRecallID *next_recall_id; AgsRecyclingContext *next_recycling_context; guint audio_flags; guint audio_channel; guint output_line; pthread_mutex_t *input_mutex; pthread_mutex_t *link_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; output_line = channel->line; pthread_mutex_unlock(channel_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; input = audio->input; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_ASYNC & audio_flags) != 0){ input = ags_channel_nth(input, audio_channel); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecallID *default_recall_id; /* find parent recycling context */ pthread_mutex_lock(audio_mutex); default_recall_id = ags_recall_id_find_parent_recycling_context(audio->recall_id, recycling_context); next_recycling_context = default_recall_id->recycling_context; pthread_mutex_unlock(audio_mutex); }else{ next_recycling_context = recycling_context; } while(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get input recall id and link */ pthread_mutex_lock(input_mutex); input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, next_recycling_context); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, next_recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_init_down(link, next_recall_id); } /* init recall - input */ switch(stage){ case 0: { ags_channel_duplicate_recall(input, input_recall_id); } break; case 1: { ags_channel_resolve_recall(input, input_recall_id); } break; case 2: { ags_channel_init_recall(input, init_stage, input_recall_id); } break; } /* iterate */ pthread_mutex_lock(input_mutex); input = input->next; pthread_mutex_unlock(input_mutex); } }else{ input = ags_channel_nth(input, output_line); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecallID *default_recall_id; /* find parent recycling context */ pthread_mutex_lock(audio_mutex); default_recall_id = ags_recall_id_find_parent_recycling_context(audio->recall_id, recycling_context); next_recycling_context = default_recall_id->recycling_context; pthread_mutex_unlock(audio_mutex); }else{ next_recycling_context = recycling_context; } if(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get input recall id and link */ pthread_mutex_lock(input_mutex); input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, next_recycling_context); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, next_recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_init_down(link, next_recall_id); } /* init recall - input */ switch(stage){ case 0: { ags_channel_duplicate_recall(input, input_recall_id); } break; case 1: { ags_channel_resolve_recall(input, input_recall_id); } break; case 2: { ags_channel_init_recall(input, init_stage, input_recall_id); } break; } } } /* get audio recall id */ if(recycling_context != next_recycling_context){ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, next_recycling_context); pthread_mutex_unlock(audio_mutex); /* init recall - audio */ switch(stage){ case 0: { ags_audio_duplicate_recall(audio, audio_recall_id); } break; case 1: { ags_audio_resolve_recall(audio, audio_recall_id); } break; case 2: { ags_audio_init_recall(audio, init_stage, audio_recall_id); } break; } } /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); /* init recall - audio */ switch(stage){ case 0: { ags_audio_duplicate_recall(audio, audio_recall_id); } break; case 1: { ags_audio_resolve_recall(audio, audio_recall_id); } break; case 2: { ags_audio_init_recall(audio, init_stage, audio_recall_id); } break; } /* init recall - output */ switch(stage){ case 0: { ags_channel_duplicate_recall(channel, recall_id); } break; case 1: { ags_channel_resolve_recall(channel, recall_id); } break; case 2: { ags_channel_init_recall(channel, init_stage, recall_id); } break; } } } void ags_channel_recursive_init_up(AgsChannel *channel, AgsRecallID *recall_id) { AgsAudio *audio; AgsChannel *output; AgsChannel *current; AgsRecyclingContext *recycling_context; guint audio_flags; guint audio_channel; guint input_line; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *current_mutex; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); current = channel; /* get recycling context */ pthread_mutex_lock(channel_mutex); recycling_context = recall_id->recycling_context; pthread_mutex_unlock(channel_mutex); if(AGS_IS_OUTPUT(channel)){ if(!init_down){ /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* init of audio */ pthread_mutex_lock(audio_mutex); recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); switch(stage){ case 0: { ags_audio_duplicate_recall(audio, recall_id); } break; case 1: { ags_audio_resolve_recall(audio, recall_id); } break; case 2: { ags_audio_init_recall(audio, init_stage, recall_id); } break; } } /* jump into loop */ goto ags_channel_recursive_init_GO_UP; } /* go up */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_mutex); audio = current->audio; audio_channel = current->audio_channel; input_line = current->line; pthread_mutex_unlock(current_mutex); /* init of input */ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); if(current != channel || !init_down){ switch(stage){ case 0: { ags_channel_duplicate_recall(current, recall_id); } break; case 1: { ags_channel_resolve_recall(current, recall_id); } break; case 2: { ags_channel_init_recall(current, init_stage, recall_id); } break; } } /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* init of audio */ pthread_mutex_lock(audio_mutex); recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); if(current != channel || !init_down){ switch(stage){ case 0: { ags_audio_duplicate_recall(audio, recall_id); } break; case 1: { ags_audio_resolve_recall(audio, recall_id); } break; case 2: { ags_audio_init_recall(audio, init_stage, recall_id); } break; } } /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; output = audio->output; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ break; } if((AGS_AUDIO_ASYNC & audio_flags) != 0){ current = ags_channel_nth(output, audio_channel); }else{ current = ags_channel_nth(output, input_line); } if(current == NULL){ break; } ags_channel_recursive_init_GO_UP: /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* init of output */ if(current == channel){ if(!init_down){ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); switch(stage){ case 0: { ags_channel_duplicate_recall(current, recall_id); } break; case 1: { ags_channel_resolve_recall(current, recall_id); } break; case 2: { ags_channel_init_recall(current, init_stage, recall_id); } break; } } }else{ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); switch(stage){ case 0: { ags_channel_duplicate_recall(current, recall_id); } break; case 1: { ags_channel_resolve_recall(current, recall_id); } break; case 2: { ags_channel_init_recall(current, init_stage, recall_id); } break; } } /* iterate */ pthread_mutex_lock(current_mutex); current = current->link; pthread_mutex_unlock(current_mutex); } } if(!AGS_IS_CHANNEL(channel) || !AGS_IS_RECALL_ID(recall_id)){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* check recycling context */ if(recall_id->recycling_context == NULL){ g_critical("recall id without recycling context"); } if(stage == -1){ for(stage = 0; stage < 3; stage++){ if(stage < 2){ /* duplicate and resolve */ if(init_down){ ags_channel_recursive_init_down(channel, recall_id); } if(init_up){ ags_channel_recursive_init_up(channel, recall_id); } }else if(stage == 2){ if(init_stage == -1){ for(init_stage = 0; init_stage < 4; init_stage++){ /* init */ if(init_down){ ags_channel_recursive_init_down(channel, recall_id); } if(init_up){ ags_channel_recursive_init_up(channel, recall_id); } } }else if(init_stage >= 0 && init_stage < 4){ /* init */ if(init_down){ ags_channel_recursive_init_down(channel, recall_id); } if(init_up){ ags_channel_recursive_init_up(channel, recall_id); } } } } }else{ if(stage < 2){ /* duplicate or resolve */ if(init_down){ ags_channel_recursive_init_down(channel, recall_id); } if(init_up){ ags_channel_recursive_init_up(channel, recall_id); } }else if(stage == 2){ if(init_stage == -1){ for(init_stage = 0; init_stage < 4; init_stage++){ /* init */ if(init_down){ ags_channel_recursive_init_down(channel, recall_id); } if(init_up){ ags_channel_recursive_init_up(channel, recall_id); } } }else if(init_stage >= 0 && init_stage < 4){ /* init */ if(init_down){ ags_channel_recursive_init_down(channel, recall_id); } if(init_up){ ags_channel_recursive_init_up(channel, recall_id); } } } } } /** * ags_channel_recursive_run: * @channel: the #AgsChannel * @recall_id: the #AgsRecallID * @run_up: if %TRUE run going up, else not * @run_down: if %TRUE run going down, else not * @current_level_only: if %TRUE run only current level, else full recursion * * Recursive run the recall id. This means any recall matching @recall_id is * going to be ran. * * Since: 1.2.7 */ void ags_channel_recursive_run(AgsChannel *channel, AgsRecallID *recall_id, gint run_stage, gboolean run_up, gboolean run_down, gboolean current_level_only) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; auto void ags_channel_recursive_run_down(AgsChannel *channel, AgsRecallID *recall_id); auto void ags_channel_recursive_run_up(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_recursive_run_down(AgsChannel *channel, AgsRecallID *recall_id) { AgsAudio *audio; AgsRecallID *audio_recall_id; AgsRecyclingContext *recycling_context; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(recall_id == NULL){ return; } /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; recycling_context = recall_id->recycling_context; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* special case */ if(AGS_IS_INPUT(channel)){ AgsChannel *link; AgsRecallID *next_recall_id; pthread_mutex_t *link_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); link = channel->link; pthread_mutex_unlock(channel_mutex); if(link != NULL){ AgsRecycling *link_first_recycling; /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_run_down(link, next_recall_id); } /* run recall - input */ ags_channel_play(channel, recall_id, run_stage); /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); /* run recall - audio */ ags_audio_play(audio, audio_recall_id, run_stage); }else{ AgsChannel *input; AgsChannel *link; AgsRecallID *input_recall_id; AgsRecallID *next_recall_id; AgsRecyclingContext *next_recycling_context; guint audio_flags; guint audio_channel; guint output_line; pthread_mutex_t *input_mutex; pthread_mutex_t *link_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; output_line = channel->line; pthread_mutex_unlock(channel_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; input = audio->input; pthread_mutex_unlock(audio_mutex); if((current_level_only && (AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) == 0) || (!current_level_only)){ if((AGS_AUDIO_ASYNC & audio_flags) != 0){ input = ags_channel_nth(input, audio_channel); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecallID *default_recall_id; /* find parent recycling context */ pthread_mutex_lock(audio_mutex); default_recall_id = ags_recall_id_find_parent_recycling_context(audio->recall_id, recycling_context); next_recycling_context = default_recall_id->recycling_context; pthread_mutex_unlock(audio_mutex); }else{ next_recycling_context = recycling_context; } while(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get input recall id and link */ pthread_mutex_lock(input_mutex); input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, next_recycling_context); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, next_recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_run_down(link, next_recall_id); } /* run recall - input */ ags_channel_play(input, input_recall_id, run_stage); /* iterate */ pthread_mutex_lock(input_mutex); input = input->next; pthread_mutex_unlock(input_mutex); } }else{ input = ags_channel_nth(input, output_line); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecallID *default_recall_id; /* find parent recycling context */ pthread_mutex_lock(audio_mutex); default_recall_id = ags_recall_id_find_parent_recycling_context(audio->recall_id, recycling_context); next_recycling_context = default_recall_id->recycling_context; pthread_mutex_unlock(audio_mutex); }else{ next_recycling_context = recycling_context; } if(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get input recall id and link */ pthread_mutex_lock(input_mutex); input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, next_recycling_context); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, next_recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_run_down(link, next_recall_id); } /* run recall - input */ ags_channel_play(input, input_recall_id, run_stage); } } if(next_recycling_context != recycling_context){ /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, next_recycling_context); pthread_mutex_unlock(audio_mutex); /* run recall - audio */ ags_audio_play(audio, audio_recall_id, run_stage); } } /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); /* run recall - audio */ ags_audio_play(audio, audio_recall_id, run_stage); /* run recall - output */ ags_channel_play(channel, recall_id, run_stage); } } void ags_channel_recursive_run_up(AgsChannel *channel, AgsRecallID *recall_id) { AgsAudio *audio; AgsChannel *output; AgsChannel *current; AgsRecyclingContext *recycling_context; guint audio_flags; guint audio_channel; guint input_line; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *current_mutex; if(recall_id == NULL){ return; } /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); current = channel; /* get recycling context */ pthread_mutex_lock(channel_mutex); recycling_context = recall_id->recycling_context; pthread_mutex_unlock(channel_mutex); if(AGS_IS_OUTPUT(channel)){ if(!run_down){ /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* run of audio */ pthread_mutex_lock(audio_mutex); recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); ags_audio_play(audio, recall_id, run_stage); } /* jump into loop */ goto ags_channel_recursive_run_GO_UP; } /* go up */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_mutex); audio = current->audio; audio_channel = current->audio_channel; input_line = current->line; pthread_mutex_unlock(current_mutex); /* run of input */ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); if(current != channel || !run_down){ ags_channel_play(current, recall_id, run_stage); } /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* run of audio */ pthread_mutex_lock(audio_mutex); recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); if(current != channel || !run_down){ ags_audio_play(audio, recall_id, run_stage); } /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; output = audio->output; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ break; } if((AGS_AUDIO_ASYNC & audio_flags) != 0){ current = ags_channel_nth(output, audio_channel); }else{ current = ags_channel_nth(output, input_line); } if(current == NULL){ break; } ags_channel_recursive_run_GO_UP: /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* run of output */ if(current == channel){ if(!run_down){ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); ags_channel_play(current, recall_id, run_stage); } }else{ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); ags_channel_play(current, recall_id, run_stage); } /* iterate */ pthread_mutex_lock(current_mutex); current = current->link; pthread_mutex_unlock(current_mutex); } } if(!AGS_IS_CHANNEL(channel) || !AGS_IS_RECALL_ID(recall_id)){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* check recycling context */ if(recall_id->recycling_context == NULL){ g_critical("recall id without recycling context"); } if(run_stage == -1){ for(run_stage = 0; run_stage < 3; run_stage++){ /* run */ if(run_down){ ags_channel_recursive_run_down(channel, recall_id); } if(run_up){ ags_channel_recursive_run_up(channel, recall_id); } } }else{ /* run */ if(run_down){ ags_channel_recursive_run_down(channel, recall_id); } if(run_up){ ags_channel_recursive_run_up(channel, recall_id); } } } /** * ags_channel_recursive_cancel: * @channel: the #AgsChannel * @recall_id: the #AgsRecallID * @cancel_up: if %TRUE cancel going up, else not * @cancel_down: if %TRUE cancel going down, else not * * Recursive cancel the recall id. This means any recall matching @recall_id is * going to be canceled. * * Since: 1.2.7 */ void ags_channel_recursive_cancel(AgsChannel *channel, AgsRecallID *recall_id, gboolean cancel_up, gboolean cancel_down) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; auto void ags_channel_recursive_cancel_down(AgsChannel *channel, AgsRecallID *recall_id); auto void ags_channel_recursive_cancel_up(AgsChannel *channel, AgsRecallID *recall_id); void ags_channel_recursive_cancel_down(AgsChannel *channel, AgsRecallID *recall_id) { AgsAudio *audio; AgsRecallID *audio_recall_id; AgsRecyclingContext *recycling_context; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(recall_id == NULL){ return; } /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; recycling_context = recall_id->recycling_context; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* special case */ if(AGS_IS_INPUT(channel)){ AgsChannel *link; AgsRecallID *next_recall_id; pthread_mutex_t *link_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); link = channel->link; pthread_mutex_unlock(channel_mutex); if(link != NULL){ AgsRecycling *link_first_recycling; /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_cancel_down(link, next_recall_id); } /* cancel recall - input */ ags_channel_cancel(channel, recall_id); /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); /* cancel recall - audio */ ags_audio_cancel(audio, audio_recall_id); }else{ AgsChannel *input; AgsChannel *link; AgsRecallID *input_recall_id; AgsRecallID *next_recall_id; AgsRecyclingContext *next_recycling_context; guint audio_flags; guint audio_channel; guint output_line; pthread_mutex_t *input_mutex; pthread_mutex_t *link_mutex; /* get some fields */ pthread_mutex_lock(channel_mutex); audio_channel = channel->audio_channel; output_line = channel->line; pthread_mutex_unlock(channel_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; input = audio->input; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_ASYNC & audio_flags) != 0){ input = ags_channel_nth(input, audio_channel); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecallID *default_recall_id; /* find parent recycling context */ pthread_mutex_lock(audio_mutex); default_recall_id = ags_recall_id_find_parent_recycling_context(audio->recall_id, recycling_context); next_recycling_context = default_recall_id->recycling_context; pthread_mutex_unlock(audio_mutex); }else{ next_recycling_context = recycling_context; } while(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get input recall id and link */ pthread_mutex_lock(input_mutex); input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, next_recycling_context); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, next_recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_cancel_down(link, next_recall_id); } /* cancel recall - input */ ags_channel_cancel(input, input_recall_id); /* iterate */ pthread_mutex_lock(input_mutex); input = input->next; pthread_mutex_unlock(input_mutex); } }else{ input = ags_channel_nth(input, output_line); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ AgsRecallID *default_recall_id; /* find parent recycling context */ pthread_mutex_lock(audio_mutex); default_recall_id = ags_recall_id_find_parent_recycling_context(audio->recall_id, recycling_context); next_recycling_context = default_recall_id->recycling_context; pthread_mutex_unlock(audio_mutex); }else{ next_recycling_context = recycling_context; } if(input != NULL){ /* get input mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get input recall id and link */ pthread_mutex_lock(input_mutex); input_recall_id = ags_recall_id_find_recycling_context(input->recall_id, next_recycling_context); link = input->link; pthread_mutex_unlock(input_mutex); if(link != NULL){ /* get link mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* get link recall id */ pthread_mutex_lock(link_mutex); next_recall_id = ags_recall_id_find_recycling_context(link->recall_id, next_recycling_context); pthread_mutex_unlock(link_mutex); /* traverse */ ags_channel_recursive_cancel_down(link, next_recall_id); } /* cancel recall - input */ ags_channel_cancel(input, input_recall_id); } } if(next_recycling_context != recycling_context){ /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, next_recycling_context); pthread_mutex_unlock(audio_mutex); /* cancel recall - audio */ ags_audio_cancel(audio, audio_recall_id); } /* get audio recall id */ pthread_mutex_lock(audio_mutex); audio_recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); /* cancel recall - audio */ ags_audio_cancel(audio, audio_recall_id); /* cancel recall - output */ ags_channel_cancel(channel, recall_id); } } void ags_channel_recursive_cancel_up(AgsChannel *channel, AgsRecallID *recall_id) { AgsAudio *audio; AgsChannel *output; AgsChannel *current; AgsRecyclingContext *recycling_context; guint audio_flags; guint audio_channel; guint input_line; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *current_mutex; if(recall_id == NULL){ return; } /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); current = channel; /* get recycling context */ pthread_mutex_lock(channel_mutex); recycling_context = recall_id->recycling_context; pthread_mutex_unlock(channel_mutex); if(AGS_IS_OUTPUT(channel)){ if(!cancel_down){ /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* cancel of audio */ pthread_mutex_lock(audio_mutex); recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); ags_audio_cancel(audio, recall_id); } /* jump into loop */ goto ags_channel_recursive_cancel_GO_UP; } /* go up */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_mutex); audio = current->audio; audio_channel = current->audio_channel; input_line = current->line; pthread_mutex_unlock(current_mutex); /* cancel of input */ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); ags_channel_cancel(current, recall_id); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* cancel of audio */ pthread_mutex_lock(audio_mutex); recall_id = ags_recall_id_find_recycling_context(audio->recall_id, recycling_context); pthread_mutex_unlock(audio_mutex); ags_audio_cancel(audio, recall_id); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; output = audio->output; pthread_mutex_unlock(audio_mutex); if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & audio_flags) != 0){ break; } if((AGS_AUDIO_ASYNC & audio_flags) != 0){ current = ags_channel_nth(output, audio_channel); }else{ current = ags_channel_nth(output, input_line); } if(current == NULL){ break; } ags_channel_recursive_cancel_GO_UP: /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* cancel of output */ if(current == channel){ if(!cancel_down){ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); ags_channel_cancel(current, recall_id); } }else{ pthread_mutex_lock(current_mutex); recall_id = ags_recall_id_find_recycling_context(current->recall_id, recycling_context); pthread_mutex_unlock(current_mutex); ags_channel_cancel(current, recall_id); } /* iterate */ pthread_mutex_lock(current_mutex); current = current->link; pthread_mutex_unlock(current_mutex); } } if(!AGS_IS_CHANNEL(channel) || !AGS_IS_RECALL_ID(recall_id)){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* check recycling context */ if(recall_id->recycling_context == NULL){ g_critical("recall id without recycling context"); } if(cancel_down){ ags_channel_recursive_cancel_down(channel, recall_id); } if(cancel_up){ ags_channel_recursive_cancel_up(channel, recall_id); } } /** * ags_channel_new: * @audio: the #AgsAudio * * Creates a #AgsChannel, linking tree to @audio. * * Returns: a new #AgsChannel * * Since: 1.0.0 */ AgsChannel* ags_channel_new(GObject *audio) { AgsChannel *channel; channel = (AgsChannel *) g_object_new(AGS_TYPE_CHANNEL, "audio", audio, NULL); return(channel); } gsequencer-1.4.24/ags/audio/ags_preset.c0000644000175000017500000003435213256163135015053 00000000000000/* 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 . */ #include #include #include #include void ags_preset_class_init(AgsPresetClass *preset); void ags_preset_init (AgsPreset *preset); void ags_preset_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_preset_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_preset_finalize(GObject *gobject); /** * SECTION:ags_preset * @short_description: presets * @title: AgsPreset * @section_id: * @include: ags/audio/ags_preset.h * * The #AgsPreset stores presets. */ static gpointer ags_preset_parent_class = NULL; enum{ PROP_0, PROP_AUDIO, PROP_SCOPE, PROP_PRESET_NAME, PROP_AUDIO_CHANNEL_START, PROP_AUDIO_CHANNEL_END, PROP_PAD_START, PROP_PAD_END, PROP_X_START, PROP_X_END, }; GType ags_preset_get_type (void) { static GType ags_type_preset = 0; if(!ags_type_preset){ static const GTypeInfo ags_preset_info = { sizeof (AgsPresetClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_preset_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPreset), 0, /* n_preallocs */ (GInstanceInitFunc) ags_preset_init, }; ags_type_preset = g_type_register_static(G_TYPE_OBJECT, "AgsPreset", &ags_preset_info, 0); } return (ags_type_preset); } void ags_preset_class_init(AgsPresetClass *preset) { GObjectClass *gobject; GParamSpec *param_spec; ags_preset_parent_class = g_type_class_peek_parent(preset); /* GObjectClass */ gobject = (GObjectClass *) preset; gobject->set_property = ags_preset_set_property; gobject->get_property = ags_preset_get_property; gobject->finalize = ags_preset_finalize; /* properties */ /** * AgsPreset:audio: * * The #AgsAudio belonging to. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio"), i18n_pspec("The audio belonging to"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsPreset:scope: * * The preset's scope. * * Since: 1.0.0 */ param_spec = g_param_spec_string("scope", i18n_pspec("scope"), i18n_pspec("The preset's scope"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCOPE, param_spec); /** * AgsPreset:preset-name: * * The preset name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("preset-name", i18n_pspec("preset-name"), i18n_pspec("The preset name"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PRESET_NAME, param_spec); /** * AgsPreset:audio-channel-start: * * The start audio channel to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel-start", i18n_pspec("audio-channel-start"), i18n_pspec("The start audio channel to apply"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL_START, param_spec); /** * AgsPreset:audio-channel-end: * * The end audio channel to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel-end", i18n_pspec("audio-channel-end"), i18n_pspec("The end audio channel to apply"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL_END, param_spec); /** * AgsPreset:pad-start: * * The start pad to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pad-start", i18n_pspec("pad-start"), i18n_pspec("The start pad to apply"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PAD_START, param_spec); /** * AgsPreset:pad-end: * * The end pad to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pad-end", i18n_pspec("pad-end"), i18n_pspec("The end pad to apply"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PAD_END, param_spec); /** * AgsPreset:x-start: * * The start x to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x-start", i18n_pspec("x-start"), i18n_pspec("The start x to apply"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_START, param_spec); /** * AgsPreset:x-end: * * The end x to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x-end", i18n_pspec("x-end"), i18n_pspec("The end x to apply"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_END, param_spec); } GQuark ags_preset_error_quark() { return(g_quark_from_static_string("ags-preset-error-quark")); } void ags_preset_init(AgsPreset *preset) { preset->flags = 0; preset->audio = NULL; preset->scope = NULL; preset->preset_name = NULL; preset->audio_channel_start = 0; preset->audio_channel_end = 0; preset->audio_channel_start = 0; preset->audio_channel_end = 0; preset->pad_start = 0; preset->pad_end = 0; preset->x_start = 0; preset->x_end = 0; preset->parameter = NULL; preset->n_params = 0; } void ags_preset_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPreset *preset; preset = AGS_PRESET(gobject); switch(prop_id){ case PROP_AUDIO: { GObject *audio; audio = (GObject *) g_value_get_object(value); if(preset->audio == audio){ return; } if(preset->audio != NULL){ g_object_unref(preset->audio); } if(audio != NULL){ g_object_ref(audio); } preset->audio = audio; } break; case PROP_SCOPE: { gchar *scope; scope = g_value_get_string(value); if(preset->scope != NULL){ g_free(preset->scope); } preset->scope = g_strdup(scope); } break; case PROP_PRESET_NAME: { gchar *preset_name; preset_name = g_value_get_string(value); if(preset->preset_name != NULL){ g_free(preset->preset_name); } preset->preset_name = g_strdup(preset_name); } break; case PROP_AUDIO_CHANNEL_START: { preset->audio_channel_start = g_value_get_uint(value); } break; case PROP_AUDIO_CHANNEL_END: { preset->audio_channel_end = g_value_get_uint(value); } break; case PROP_PAD_START: { preset->pad_start = g_value_get_uint(value); } break; case PROP_PAD_END: { preset->pad_end = g_value_get_uint(value); } break; case PROP_X_START: { preset->x_start = g_value_get_uint(value); } break; case PROP_X_END: { preset->x_end = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); } } void ags_preset_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPreset *preset; preset = AGS_PRESET(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, preset->audio); } break; case PROP_SCOPE: { g_value_set_string(value, preset->scope); } break; case PROP_PRESET_NAME: { g_value_set_string(value, preset->preset_name); } break; case PROP_AUDIO_CHANNEL_START: { g_value_set_uint(value, preset->audio_channel_start); } break; case PROP_AUDIO_CHANNEL_END: { g_value_set_uint(value, preset->audio_channel_end); } break; case PROP_PAD_START: { g_value_set_uint(value, preset->pad_start); } break; case PROP_PAD_END: { g_value_set_uint(value, preset->pad_end); } break; case PROP_X_START: { g_value_set_uint(value, preset->x_start); } break; case PROP_X_END: { g_value_set_uint(value, preset->x_end); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); } } void ags_preset_finalize(GObject *gobject) { AgsPreset *preset; preset = AGS_PRESET(gobject); if(preset->audio != NULL){ g_object_unref(preset->audio); } g_free(preset->scope); g_free(preset->preset_name); /* call parent */ G_OBJECT_CLASS(ags_preset_parent_class)->finalize(gobject); } /** * ags_preset_find_scope: * @preset: the #GList-struct containing #AgsPreset * @scope: the preset's scope * * Find preset's scope in @preset. * * Returns: the next matching #AgsPreset * * Since: 1.0.0 */ GList* ags_preset_find_scope(GList *preset, gchar *scope) { while(preset != NULL){ if(!g_strcmp0(AGS_PRESET(preset->data)->scope, scope)){ return(preset); } preset = preset->next; } return(NULL); } /** * ags_preset_find_name: * @preset: the #GList-struct containing #AgsPreset * @preset_name: the preset's name * * Find preset name in @preset. * * Returns: the next matching #AgsPreset * * Since: 1.0.0 */ GList* ags_preset_find_name(GList *preset, gchar *preset_name) { while(preset != NULL){ if(!g_strcmp0(AGS_PRESET(preset->data)->preset_name, preset_name)){ return(preset); } preset = preset->next; } return(NULL); } /** * ags_preset_add_parameter: * @preset: the #AgsPreset * @param_name: the parameter name * @value: the value to add * * Add parameter to @preset. * * Since: 1.0.0 */ gboolean ags_preset_add_parameter(AgsPreset *preset, gchar *param_name, GValue *value) { guint nth; guint i; gboolean found; if(!AGS_IS_PRESET(preset)){ return(FALSE); } /* match or allocate */ found = FALSE; if(preset->parameter == NULL){ preset->parameter = (GParameter *) malloc(sizeof(GParameter)); preset->parameter[0].name = NULL; memset(&(preset->parameter[0].value), 0, sizeof(GValue)); g_value_init(&(preset->parameter[0].value), G_VALUE_TYPE(value)); preset->n_params += 1; nth = 0; }else{ for(i = 0; i < preset->n_params; i++){ if(!g_strcmp0(preset->parameter[i].name, param_name)){ nth = i; found = TRUE; break; } } if(!found){ preset->parameter = (GParameter *) realloc(preset->parameter, (preset->n_params + 1) * sizeof(GParameter)); preset->parameter[preset->n_params].name = NULL; memset(&(preset->parameter[preset->n_params].value), 0, sizeof(GValue)); g_value_init(&(preset->parameter[preset->n_params].value), G_VALUE_TYPE(value)); preset->n_params += 1; nth = i; } } /* set value */ if(preset->parameter[nth].name != NULL){ g_free(preset->parameter[nth].name); } preset->parameter[nth].name = g_strdup(param_name); g_value_copy(value, &(preset->parameter[nth].value)); return(!found); } /** * ags_preset_remove_parameter: * @preset: the #AgsPreset * @nth: the nth parameter to remove * * Remove parameter of @preset. * * Since: 1.0.0 */ void ags_preset_remove_parameter(AgsPreset *preset, guint nth) { GParameter *parameter; if(!AGS_IS_PRESET(preset) || preset->n_params == 0 || nth >= preset->n_params){ return; } parameter = preset->parameter; if(preset->n_params == 1){ preset->parameter = NULL; preset->n_params = 0; }else{ preset->parameter = (GParameter *) malloc((preset->n_params - 1) * sizeof(GParameter)); if(nth > 0){ memcpy(preset->parameter, parameter, nth * sizeof(GParameter)); } if(nth + 1 < preset->n_params){ memcpy(&(preset->parameter[nth]), &(parameter[nth + 1]), (preset->n_params - (nth + 1)) * sizeof(GParameter)); } preset->n_params -= 1; } free(parameter); } /** * ags_preset_get_parameter: * @preset: the #AgsPreset * @param_name: the parameter name * @value: the return location of value * @error: the #GError-struct * * Get parameter specified by @param_name. If parameter not available * the @error is set to indicate the failure. * * Since: 1.0.0 */ void ags_preset_get_parameter(AgsPreset *preset, gchar *param_name, GValue *value, GError **error) { guint i; if(!AGS_IS_PRESET(preset)){ return; } if(preset->parameter == NULL){ if(error != NULL){ g_set_error(error, AGS_PRESET_ERROR, AGS_PRESET_ERROR_NO_SUCH_PARAMETER, "unable to find parameter: %s", param_name); } return; } for(i = 0; i < preset->n_params; i++){ if(!g_strcmp0(preset->parameter[i].name, param_name)){ g_value_copy(&(preset->parameter[i].value), value); return; } } if(error != NULL){ g_set_error(error, AGS_PRESET_ERROR, AGS_PRESET_ERROR_NO_SUCH_PARAMETER, "unable to find parameter: %s", param_name); } } /** * ags_preset_new: * * Creates an #AgsPreset * * Returns: a new #AgsPreset * * Since: 1.0.0 */ AgsPreset* ags_preset_new() { AgsPreset *preset; preset = (AgsPreset *) g_object_new(AGS_TYPE_PRESET, NULL); return(preset); } gsequencer-1.4.24/ags/audio/ags_input.c0000644000175000017500000004611313256163135014706 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_input_class_init (AgsInputClass *input_class); void ags_input_connectable_interface_init(AgsConnectableInterface *connectable); void ags_input_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_input_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_input_init (AgsInput *input); void ags_input_dispose(GObject *gobject); void ags_input_finalize(GObject *gobject); void ags_input_connect(AgsConnectable *connectable); void ags_input_disconnect(AgsConnectable *connectable); /** * SECTION:ags_input * @short_description: Input of #AgsAudio * @title: AgsInput * @section_id: * @include: ags/audio/ags_input.h * * #AgsInput represents an input channel of #AgsAudio. */ static gpointer ags_input_parent_class = NULL; static AgsConnectableInterface *ags_input_parent_connectable_interface; enum{ PROP_0, PROP_FILE_LINK, PROP_SYNTH_GENERATOR, }; GType ags_input_get_type (void) { static GType ags_type_input = 0; if(!ags_type_input){ static const GTypeInfo ags_input_info = { sizeof (AgsInputClass), (GBaseInitFunc) NULL, /* base_init */ (GBaseFinalizeFunc) NULL, /* base_finalize */ (GClassInitFunc) ags_input_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsInput), 0, /* n_preallocs */ (GInstanceInitFunc) ags_input_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_input_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_input = g_type_register_static(AGS_TYPE_CHANNEL, "AgsInput", &ags_input_info, 0); g_type_add_interface_static(ags_type_input, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_input); } void ags_input_class_init(AgsInputClass *input) { GObjectClass *gobject; GParamSpec *param_spec; ags_input_parent_class = g_type_class_peek_parent(input); gobject = (GObjectClass *) input; gobject->set_property = ags_input_set_property; gobject->get_property = ags_input_get_property; gobject->dispose = ags_input_dispose; gobject->finalize = ags_input_finalize; /* properties */ /** * AgsInput:file-link: * * The file containing audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_object("file-link", i18n_pspec("file link assigned to"), i18n_pspec("The file link to read from"), AGS_TYPE_FILE_LINK, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILE_LINK, param_spec); /** * AgsInput:synth-generator: * * An optional synth generator that might be used. * * Since: 1.0.0 */ param_spec = g_param_spec_object("synth-generator", i18n_pspec("the synth generator"), i18n_pspec("The synth generator to be used"), AGS_TYPE_SYNTH_GENERATOR, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SYNTH_GENERATOR, param_spec); } void ags_input_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_input_connectable_parent_interface; ags_input_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_input_connect; connectable->disconnect = ags_input_disconnect; } void ags_input_init(AgsInput *input) { input->file_link = NULL; input->synth_generator = NULL; } void ags_input_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsInput *input; input = AGS_INPUT(gobject); switch(prop_id){ case PROP_FILE_LINK: { AgsFileLink *file_link; file_link = (AgsFileLink *) g_value_get_object(value); if(input->file_link == (GObject *) file_link){ return; } if(input->file_link != NULL){ g_object_unref(G_OBJECT(input->file_link)); } if(file_link != NULL){ g_object_ref(G_OBJECT(file_link)); } input->file_link = (GObject *) file_link; } break; case PROP_SYNTH_GENERATOR: { AgsFileLink *synth_generator; synth_generator = (AgsFileLink *) g_value_get_object(value); if(input->synth_generator == (GObject *) synth_generator){ return; } if(input->synth_generator != NULL){ g_object_unref(G_OBJECT(input->synth_generator)); } if(synth_generator != NULL){ g_object_ref(G_OBJECT(synth_generator)); } input->synth_generator = (GObject *) synth_generator; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_input_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsInput *input; input = AGS_INPUT(gobject); switch(prop_id){ case PROP_FILE_LINK: { g_value_set_object(value, input->file_link); } break; case PROP_SYNTH_GENERATOR: { g_value_set_object(value, input->synth_generator); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_input_dispose(GObject *gobject) { AgsInput *input; input = AGS_INPUT(gobject); /* file link */ if(input->file_link != NULL){ g_object_run_dispose(G_OBJECT(input->file_link)); g_object_unref(G_OBJECT(input->file_link)); input->file_link = NULL; } /* synth generator */ if(input->synth_generator != NULL){ g_object_run_dispose(G_OBJECT(input->synth_generator)); g_object_unref(G_OBJECT(input->synth_generator)); input->synth_generator = NULL; } /* finalize */ G_OBJECT_CLASS(ags_input_parent_class)->dispose(gobject); } void ags_input_finalize(GObject *gobject) { AgsInput *input; input = AGS_INPUT(gobject); /* file link */ if(input->file_link != NULL){ g_object_unref(G_OBJECT(input->file_link)); } /* synth generator */ if(input->synth_generator != NULL){ g_object_unref(G_OBJECT(input->synth_generator)); } /* finalize */ G_OBJECT_CLASS(ags_input_parent_class)->finalize(gobject); } void ags_input_connect(AgsConnectable *connectable) { ags_input_parent_connectable_interface->connect(connectable); } void ags_input_disconnect(AgsConnectable *connectable) { ags_input_parent_connectable_interface->disconnect(connectable); } /** * ags_input_open_file: * @input: the #AgsInput * @filename: the filename as string * @preset: the preset to open * @instrument: the instrument to open * @sample: the sample to open * @audio_channel: the audio channel to read * * Open @filename and assign @audio_channel's data as AGS_AUDIO_SIGNAL_TEMPLATE * audio signal to @input's own recycling. * * Returns: %TRUE if open was successful, else %FALSE * * Since: 1.0.0 */ gboolean ags_input_open_file(AgsInput *input, gchar *filename, gchar *preset, gchar *instrument, gchar *sample, guint audio_channel) { AgsFileLink *file_link; GList *audio_signal; gboolean success; if(!AGS_IS_INPUT(input)){ return(FALSE); } audio_signal = NULL; success = FALSE; if(ags_audio_file_check_suffix(filename)){ AgsAudioFile *audio_file; success = TRUE; preset = NULL; instrument = NULL; /* open audio file and read audio signal */ audio_file = ags_audio_file_new(filename, AGS_CHANNEL(input)->soundcard, audio_channel, 1); ags_audio_file_open(audio_file); ags_audio_file_read_audio_signal(audio_file); audio_signal = audio_file->audio_signal; // g_object_unref(audio_file); }else if(ags_ipatch_check_suffix(filename)){ AgsIpatch *ipatch; AgsPlayable *playable; GError *error; success = TRUE; ipatch = g_object_new(AGS_TYPE_IPATCH, "soundcard", AGS_CHANNEL(input)->soundcard, "mode", AGS_IPATCH_READ, "filename", filename, NULL); playable = AGS_PLAYABLE(ipatch); error = NULL; ags_playable_level_select(playable, 0, filename, &error); /* select first - preset */ ipatch->nth_level = 1; error = NULL; ags_playable_level_select(playable, 1, preset, &error); if(error != NULL){ g_object_unref(ipatch); return(FALSE); } /* select second - instrument */ ipatch->nth_level = 2; error = NULL; ags_playable_level_select(playable, 2, instrument, &error); if(error != NULL){ g_object_unref(ipatch); return(FALSE); } /* select third - sample */ ipatch->nth_level = 3; error = NULL; ags_playable_level_select(playable, 3, sample, &error); if(error != NULL){ g_object_unref(ipatch); return(FALSE); } /* read audio signal */ audio_signal = ags_playable_read_audio_signal(playable, AGS_CHANNEL(input)->soundcard, audio_channel, 1); } if(success){ if(audio_signal != NULL){ file_link = g_object_new(AGS_TYPE_AUDIO_FILE_LINK, "filename", filename, "preset", preset, "instrument", instrument, "sample", sample, "audio-channel", audio_channel, NULL); g_object_set(input, "file-link", file_link, NULL); /* mark as template */ AGS_AUDIO_SIGNAL(audio_signal->data)->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; /* add as template */ ags_recycling_add_audio_signal(AGS_CHANNEL(input)->first_recycling, AGS_AUDIO_SIGNAL(audio_signal->data)); }else{ success = FALSE; } } return(success); } /** * ags_input_apply_synth: * @input: the #AgsInput * @oscillator: the oscillator to use * @frequency: the frequency to use * @phase: the phase to use * @volume: the volume to use * @n_frames: compute n_frames count of frames * * Apply synth using specified parameters to input. * * Returns: %TRUE if successful applied, else %FALSE * * Since: 1.0.0 */ gboolean ags_input_apply_synth(AgsInput *input, guint oscillator, gdouble frequency, gdouble phase, gdouble volume, guint n_frames) { return(ags_input_apply_synth_extended(input, oscillator, frequency, phase, volume, n_frames, 0, AGS_INPUT_SYNTH_BASE_NOTE, NULL, NULL, AGS_SYNTH_GENERATOR_COMPUTE_FIXED_LENGTH)); } /** * ags_input_apply_synth_extended: * @input: the #AgsInput * @oscillator: the oscillator to use * @frequency: the frequency to use * @phase: the phase to use * @volume: the volume to use * @n_frames: compute n_frames count of frames * @attack: the attack to use * @base_note: the base note to ramp up from * @sync_start: safe to be %NULL * @sync_end: safe to be %NULL * @compute_flags: the flags to use to compute the synth * * Apply synth using specified parameters to input. * * Returns: %TRUE if successful applied, else %FALSE * * Since: 1.0.0 */ gboolean ags_input_apply_synth_extended(AgsInput *input, guint oscillator, gdouble frequency, gdouble phase, gdouble volume, guint n_frames, guint attack, gdouble base_note, AgsComplex *sync_start, AgsComplex *sync_end, guint compute_flags) { AgsAudioSignal *audio_signal; if(!AGS_IS_INPUT(input)){ return(FALSE); } audio_signal = ags_audio_signal_get_template(AGS_CHANNEL(input)->first_recycling->audio_signal); if(audio_signal == NULL){ audio_signal = g_object_new(AGS_TYPE_AUDIO_SIGNAL, "soundcard", AGS_CHANNEL(input)->soundcard, NULL); /* mark as template */ audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_audio_signal_stream_resize(audio_signal, (guint) ceil((attack + n_frames) / audio_signal->buffer_size)); /* add as template */ ags_recycling_add_audio_signal(AGS_CHANNEL(input)->first_recycling, audio_signal); } /* creat synth generator if needed */ if(input->synth_generator == NULL){ input->synth_generator = (GObject *) ags_synth_generator_new(); g_object_set(input->synth_generator, "samplerate", audio_signal->samplerate, "buffer-size", audio_signal->buffer_size, "format", audio_signal->format, NULL); } /* set properties */ g_object_set(input->synth_generator, "n-frames", n_frames, "attack", attack, "oscillator", oscillator, "frequency", frequency, "phase", phase, "volume", volume, NULL); /* compute audio signal */ ags_synth_generator_compute_with_audio_signal(input->synth_generator, audio_signal, base_note, sync_start, sync_end, compute_flags); return(TRUE); } /** * ags_input_is_active: * @input: the #AgsInput * @recycling_context: the #AgsRecyclingContext to check * * Check if @input is active and needs processing. * * Returns: %TRUE if has a need to be processed, else %FALSE * * Since: 1.0.0 */ gboolean ags_input_is_active(AgsInput *input, GObject *recycling_context) { AgsChannel *channel; AgsRecycling *recycling, *end_region; AgsAudioSignal *audio_signal; AgsRecyclingContext *active_context; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *input_mutex; pthread_mutex_t *recycling_mutex; channel = input; if(input == NULL || channel->first_recycling == NULL || recycling_context == NULL){ return(FALSE); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lookup mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get recycling */ pthread_mutex_lock(input_mutex); recycling = channel->first_recycling; end_region = channel->last_recycling->next; if(channel->link == NULL){ active_context = AGS_RECYCLING_CONTEXT(recycling_context)->parent; }else{ active_context = recycling_context; } pthread_mutex_unlock(input_mutex); /* check if active */ while(recycling != end_region){ /* lookup mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(recycling_mutex); list = recycling->audio_signal; while(list != NULL){ audio_signal = list->data; if(audio_signal->recall_id != NULL && AGS_RECALL_ID(audio_signal->recall_id)->recycling_context != NULL && AGS_RECYCLING_CONTEXT(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context)->parent == active_context){ pthread_mutex_unlock(recycling_mutex); return(TRUE); } list = list->next; } /* iterate */ recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } return(FALSE); } /** * ags_input_next_active: * @input: the #AgsInput * @recycling_context: the #AgsRecyclingContext to check * * Find next #AgsInput needed to be processed. * * Returns: next active #AgsInput, else %NULL if non available * * Since: 1.0.0 */ AgsInput* ags_input_next_active(AgsInput *input, GObject *recycling_context) { AgsChannel *channel; AgsRecycling *recycling, *end_region; AgsAudioSignal *audio_signal; AgsRecyclingContext *active_context; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *input_mutex; pthread_mutex_t *recycling_mutex; channel = input; if(input == NULL || recycling_context == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* check if active */ while(channel != NULL){ /* lookup mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get recycling */ pthread_mutex_lock(input_mutex); recycling = channel->first_recycling; end_region = channel->last_recycling->next; if(channel->link == NULL){ active_context = AGS_RECYCLING_CONTEXT(recycling_context)->parent; }else{ active_context = recycling_context; } pthread_mutex_unlock(input_mutex); /* check recycling */ while(recycling != end_region){ /* lookup mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* check audio signal */ pthread_mutex_lock(recycling_mutex); list = recycling->audio_signal; while(list != NULL){ audio_signal = list->data; if(audio_signal->recall_id != NULL && AGS_RECALL_ID(audio_signal->recall_id)->recycling_context != NULL && AGS_RECYCLING_CONTEXT(AGS_RECALL_ID(audio_signal->recall_id)->recycling_context)->parent == active_context){ pthread_mutex_unlock(recycling_mutex); return(channel); } list = list->next; } /* iterate */ recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } /* iterate */ pthread_mutex_lock(input_mutex); channel = channel->next_pad; pthread_mutex_unlock(input_mutex); } return(NULL); } /** * ags_input_new: * @audio: the #AgsAudio * * Creates a #AgsInput, linking tree to @audio. * * Returns: a new #AgsInput * * Since: 1.0.0 */ AgsInput* ags_input_new(GObject *audio) { AgsInput *input; input = (AgsInput *) g_object_new(AGS_TYPE_INPUT, "audio", audio, NULL); return(input); } gsequencer-1.4.24/ags/audio/ags_buffer.c0000644000175000017500000002774513256163135015032 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #include #include #include #include #include #include void ags_buffer_class_init(AgsBufferClass *buffer); void ags_buffer_connectable_interface_init(AgsConnectableInterface *connectable); void ags_buffer_init(AgsBuffer *buffer); void ags_buffer_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_buffer_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_buffer_connect(AgsConnectable *connectable); void ags_buffer_disconnect(AgsConnectable *connectable); void ags_buffer_finalize(GObject *gobject); /** * SECTION:ags_buffer * @short_description: Buffer class. * @title: AgsBuffer * @section_id: * @include: ags/audio/ags_buffer.h * * #AgsBuffer represents a tone. */ static gpointer ags_buffer_parent_class = NULL; enum{ PROP_0, PROP_X, PROP_SELECTION_X0, PROP_SELECTION_X1, PROP_SAMPLERATE, PROP_BUFFER_SIZE, PROP_FORMAT, PROP_DATA, }; GType ags_buffer_get_type() { static GType ags_type_buffer = 0; if(!ags_type_buffer){ static const GTypeInfo ags_buffer_info = { sizeof(AgsBufferClass), NULL, NULL, (GClassInitFunc) ags_buffer_class_init, NULL, NULL, sizeof(AgsBuffer), 0, (GInstanceInitFunc) ags_buffer_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_buffer_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_buffer = g_type_register_static(G_TYPE_OBJECT, "AgsBuffer", &ags_buffer_info, 0); g_type_add_interface_static(ags_type_buffer, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_buffer); } void ags_buffer_class_init(AgsBufferClass *buffer) { GObjectClass *gobject; GParamSpec *param_spec; ags_buffer_parent_class = g_type_class_peek_parent(buffer); gobject = (GObjectClass *) buffer; gobject->set_property = ags_buffer_set_property; gobject->get_property = ags_buffer_get_property; gobject->finalize = ags_buffer_finalize; /* properties */ /** * AgsBuffer:x: * * Buffer's x offset. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("x", i18n_pspec("offset x"), i18n_pspec("The x offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X, param_spec); /** * AgsBuffer:selection-x0: * * Buffer's selection x0 offset. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("selection-x0", i18n_pspec("selection offset x0"), i18n_pspec("The selection's x0 offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SELECTION_X0, param_spec); /** * AgsBuffer:selection-x1: * * Buffer's selection x1 offset. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("selection-x1", i18n_pspec("selection offset x1"), i18n_pspec("The selection's x1 offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SELECTION_X1, param_spec); /** * AgsBuffer:samplerate: * * Buffer's audio data samplerate. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("audio data samplerate"), i18n_pspec("The samplerate of audio data"), 0, G_MAXUINT, AGS_SOUNDCARD_DEFAULT_SAMPLERATE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsBuffer:buffer-size: * * Buffer's audio data buffer size. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("audio data's buffer size"), i18n_pspec("The buffer size of audio data"), 0, G_MAXUINT, AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsBuffer:format: * * Buffer's audio data format. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("audio data format"), i18n_pspec("The format of audio data"), 0, G_MAXUINT, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsBuffer:data: * * Buffer's audio data. * * Since: 1.4.0 */ param_spec = g_param_spec_pointer("data", i18n_pspec("audio data"), i18n_pspec("The audio data"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DATA, param_spec); } void ags_buffer_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_buffer_connect; connectable->disconnect = ags_buffer_disconnect; } void ags_buffer_init(AgsBuffer *buffer) { buffer->flags = 0; buffer->x = 0; buffer->selection_x0 = 0; buffer->selection_x1 = 0; buffer->format = AGS_SOUNDCARD_DEFAULT_FORMAT; buffer->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; buffer->data = ags_stream_alloc(buffer->buffer_size, buffer->format); } void ags_buffer_connect(AgsConnectable *connectable) { AgsBuffer *buffer; buffer = AGS_BUFFER(connectable); if((AGS_BUFFER_CONNECTED & (buffer->flags)) != 0){ return; } buffer->flags |= AGS_BUFFER_CONNECTED; } void ags_buffer_disconnect(AgsConnectable *connectable) { AgsBuffer *buffer; buffer = AGS_BUFFER(connectable); if((AGS_BUFFER_CONNECTED & (buffer->flags)) == 0){ return; } buffer->flags &= (~AGS_BUFFER_CONNECTED); } void ags_buffer_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsBuffer *buffer; buffer = AGS_BUFFER(gobject); switch(prop_id){ case PROP_X: { buffer->x = g_value_get_uint(value); } break; case PROP_SELECTION_X0: { buffer->selection_x0 = g_value_get_uint(value); } break; case PROP_SELECTION_X1: { buffer->selection_x1 = g_value_get_uint(value); } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); ags_buffer_set_samplerate(buffer, samplerate); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); ags_buffer_set_buffer_size(buffer, buffer_size); } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); ags_buffer_set_format(buffer, format); } break; case PROP_DATA: { buffer->data = g_value_get_pointer(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_buffer_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsBuffer *buffer; buffer = AGS_BUFFER(gobject); switch(prop_id){ case PROP_X: { g_value_set_uint(value, buffer->x); } break; case PROP_SELECTION_X0: { g_value_set_uint(value, buffer->selection_x0); } break; case PROP_SELECTION_X1: { g_value_set_uint(value, buffer->selection_x1); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, buffer->samplerate); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, buffer->buffer_size); } break; case PROP_FORMAT: { g_value_set_uint(value, buffer->format); } break; case PROP_DATA: { g_value_set_pointer(value, buffer->data); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_buffer_finalize(GObject *gobject) { AgsBuffer *buffer; buffer = AGS_BUFFER(gobject); if(buffer->data != NULL){ free(buffer->data); } /* call parent */ G_OBJECT_CLASS(ags_buffer_parent_class)->finalize(gobject); } void ags_buffer_set_samplerate(AgsBuffer *buffer, guint samplerate) { buffer->samplerate = samplerate; } void ags_buffer_set_buffer_size(AgsBuffer *buffer, guint buffer_size) { guint old_buffer_size; guint word_size; old_buffer_size = buffer->buffer_size; buffer->buffer_size = buffer_size; switch(buffer->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { buffer->data = (signed char *) realloc(buffer->data, buffer_size * sizeof(signed char)); word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { buffer->data = (signed short *) realloc(buffer->data, buffer_size * sizeof(signed short)); word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { buffer->data = (signed long *) realloc(buffer->data, buffer_size * sizeof(signed long)); //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { buffer->data = (signed long *) realloc(buffer->data, buffer_size * sizeof(signed long)); word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { buffer->data = (signed long long *) realloc(buffer->data, buffer_size * sizeof(signed long long)); word_size = sizeof(signed long long); } break; default: g_warning("ags_buffer_set_buffer_size(): unsupported word size"); return(NULL); } if(old_buffer_size < buffer_size){ memset(buffer->data + old_buffer_size, 0, (buffer_size - old_buffer_size) * word_size); } } void ags_buffer_set_format(AgsBuffer *buffer, guint format) { void *data; guint copy_mode; data = ags_stream_alloc(buffer->buffer_size, format); copy_mode = ags_audio_buffer_util_get_copy_mode(format, buffer->format); ags_audio_buffer_util_copy_buffer_to_buffer(data, 1, 0, buffer->data, 1, 0, buffer->buffer_size, copy_mode); free(buffer->data); buffer->data = data; buffer->format = format; } /** * ags_buffer_sort_func: * @a: an #AgsBuffer * @b: an #AgsBuffer * * Sort buffers. * * Returns: 0 if equal, -1 if smaller and 1 if bigger offset * * Since: 1.4.0 */ gint ags_buffer_sort_func(gconstpointer a, gconstpointer b) { if(a == NULL || b == NULL){ return(0); } if(AGS_BUFFER(a)->x == AGS_BUFFER(b)->x){ return(0); } if(AGS_BUFFER(a)->x < AGS_BUFFER(b)->x){ return(-1); }else{ return(1); } } AgsBuffer* ags_buffer_duplicate(AgsBuffer *buffer) { //TODO:JK: implement me return(NULL); } /** * ags_buffer_new: * * Creates an #AgsBuffer * * Returns: a new #AgsBuffer * * Since: 1.4.0 */ AgsBuffer* ags_buffer_new() { AgsBuffer *buffer; buffer = (AgsBuffer *) g_object_new(AGS_TYPE_BUFFER, NULL); return(buffer); } gsequencer-1.4.24/ags/audio/ags_synth_util.c0000644000175000017500000011457013246707333015757 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #include #include #include /** * ags_synth_util_get_xcross_count_s8: * @buffer: the buffer containing audio data * @buffer_size: the buffer size * * Get zero-cross count. * * Returns: the count of zero-crossings * * Since: 1.0.0 */ guint ags_synth_util_get_xcross_count_s8(signed char *buffer, guint buffer_size) { guint count; guint i; gboolean negative; count = 0; if(buffer[0] > 0){ negative = FALSE; }else{ negative = TRUE; } for(i = 1; i < buffer_size; i++){ if(negative && buffer[i] > 0){ count++; negative = FALSE; }else if(!negative && buffer[i] < 0){ count++; negative = TRUE; } } return(count); } /** * ags_synth_util_get_xcross_count_s16: * @buffer: the buffer containing audio data * @buffer_size: the buffer size * * Get zero-cross count. * * Returns: the count of zero-crossings * * Since: 1.0.0 */ guint ags_synth_util_get_xcross_count_s16(signed short *buffer, guint buffer_size) { guint count; guint i; gboolean negative; count = 0; if(buffer[0] > 0){ negative = FALSE; }else{ negative = TRUE; } for(i = 1; i < buffer_size; i++){ if(negative && buffer[i] > 0){ count++; negative = FALSE; }else if(!negative && buffer[i] < 0){ count++; negative = TRUE; } } return(count); } /** * ags_synth_util_get_xcross_count_s24: * @buffer: the buffer containing audio data * @buffer_size: the buffer size * * Get zero-cross count. * * Returns: the count of zero-crossings * * Since: 1.0.0 */ guint ags_synth_util_get_xcross_count_s24(signed long *buffer, guint buffer_size) { guint count; guint i; gboolean negative; count = 0; if(buffer[0] > 0){ negative = FALSE; }else{ negative = TRUE; } for(i = 1; i < buffer_size; i++){ if(negative && buffer[i] > 0){ count++; negative = FALSE; }else if(!negative && buffer[i] < 0){ count++; negative = TRUE; } } return(count); } /** * ags_synth_util_get_xcross_count_s32: * @buffer: the buffer containing audio data * @buffer_size: the buffer size * * Get zero-cross count. * * Returns: the count of zero-crossings * * Since: 1.0.0 */ guint ags_synth_util_get_xcross_count_s32(signed long *buffer, guint buffer_size) { guint count; guint i; gboolean negative; count = 0; if(buffer[0] > 0){ negative = FALSE; }else{ negative = TRUE; } for(i = 1; i < buffer_size; i++){ if(negative && buffer[i] > 0){ count++; negative = FALSE; }else if(!negative && buffer[i] < 0){ count++; negative = TRUE; } } return(count); } /** * ags_synth_util_get_xcross_count_s64: * @buffer: the buffer containing audio data * @buffer_size: the buffer size * * Get zero-cross count. * * Returns: the count of zero-crossings * * Since: 1.0.0 */ guint ags_synth_util_get_xcross_count_s64(signed long long *buffer, guint buffer_size) { guint count; guint i; gboolean negative; count = 0; if(buffer[0] > 0){ negative = FALSE; }else{ negative = TRUE; } for(i = 1; i < buffer_size; i++){ if(negative && buffer[i] > 0){ count++; negative = FALSE; }else if(!negative && buffer[i] < 0){ count++; negative = TRUE; } } return(count); } /** * ags_synth_util_get_xcross_count_float: * @buffer: the buffer containing audio data * @buffer_size: the buffer size * * Get zero-cross count. * * Returns: the count of zero-crossings * * Since: 1.0.0 */ guint ags_synth_util_get_xcross_count_float(float *buffer, guint buffer_size) { guint count; guint i; gboolean negative; count = 0; if(buffer[0] > 0.0){ negative = FALSE; }else{ negative = TRUE; } for(i = 1; i < buffer_size; i++){ if(negative && buffer[i] > 0.0){ count++; negative = FALSE; }else if(!negative && buffer[i] < 0.0){ count++; negative = TRUE; } } return(count); } /** * ags_synth_util_get_xcross_count_double: * @buffer: the buffer containing audio data * @buffer_size: the buffer size * * Get zero-cross count. * * Returns: the count of zero-crossings * * Since: 1.0.0 */ guint ags_synth_util_get_xcross_count_double(double *buffer, guint buffer_size) { guint count; guint i; gboolean negative; count = 0; if(buffer[0] > 0){ negative = FALSE; }else{ negative = TRUE; } for(i = 1; i < buffer_size; i++){ if(negative && buffer[i] > 0.0){ count++; negative = FALSE; }else if(!negative && buffer[i] < 0.0){ count++; negative = TRUE; } } return(count); } /** * ags_synth_util_get_xcross_count: * @buffer: the buffer containing audio data * @audio_buffer_util_format: the audio buffer util format * @buffer_size: the buffer size * * Get zero-cross count. * * Returns: the count of zero-crossings * * Since: 1.0.0 */ guint ags_synth_util_get_xcross_count(void *buffer, guint audio_buffer_util_format, guint buffer_size) { guint count; count = 0; switch(audio_buffer_util_format){ case AGS_AUDIO_BUFFER_UTIL_S8: { ags_synth_util_get_xcross_count_s8((signed char *) buffer, buffer_size); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { ags_synth_util_get_xcross_count_s16((signed short *) buffer, buffer_size); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { ags_synth_util_get_xcross_count_s24((signed long *) buffer, buffer_size); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { ags_synth_util_get_xcross_count_s32((signed long *) buffer, buffer_size); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { ags_synth_util_get_xcross_count_s64((signed long long *) buffer, buffer_size); } break; case AGS_AUDIO_BUFFER_UTIL_FLOAT: { ags_synth_util_get_xcross_count_float((float *) buffer, buffer_size); } break; case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { ags_synth_util_get_xcross_count_double((double *) buffer, buffer_size); } break; default: { g_warning("ags_synth_util_get_xcross_count() - unsupported format"); } } return(count); } /** * ags_synth_util_sin_s8: * @buffer: the audio buffer * @freq: the frequency of the sin wave * @phase: the phase of the sin wave * @volume: the volume of the sin wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sinus wave. * * Since: 1.0.0 */ void ags_synth_util_sin_s8(signed char *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 127.0; guint i; for (i = offset; i < offset + n_frames; i++){ buffer[i] = (signed char) (0xff & ((signed short) buffer[i] + (signed short) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume))); } } /** * ags_synth_util_sin_s16: * @buffer: the audio buffer * @freq: the frequency of the sin wave * @phase: the phase of the sin wave * @volume: the volume of the sin wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sinus wave. * * Since: 1.0.0 */ void ags_synth_util_sin_s16(signed short *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 32767.0; guint i; for (i = offset; i < offset + n_frames; i++){ buffer[i] = (signed short) (0xffff & ((signed long) buffer[i] + (signed long) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume))); } } /** * ags_synth_util_sin_s24: * @buffer: the audio buffer * @freq: the frequency of the sin wave * @phase: the phase of the sin wave * @volume: the volume of the sin wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sinus wave. * * Since: 1.0.0 */ void ags_synth_util_sin_s24(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 8388607.0; guint i; for (i = offset; i < offset + n_frames; i++){ buffer[i] = (signed long) (0xffffff & ((signed long) buffer[i] + (signed long) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume))); } } /** * ags_synth_util_sin_s32: * @buffer: the audio buffer * @freq: the frequency of the sin wave * @phase: the phase of the sin wave * @volume: the volume of the sin wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sinus wave. * * Since: 1.0.0 */ void ags_synth_util_sin_s32(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 214748363.0; guint i; for (i = offset; i < offset + n_frames; i++){ buffer[i] = (signed long) (0xffffffff & ((signed long long) buffer[i] + (signed long long) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume))); } } /** * ags_synth_util_sin_s64: * @buffer: the audio buffer * @freq: the frequency of the sin wave * @phase: the phase of the sin wave * @volume: the volume of the sin wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sinus wave. * * Since: 1.0.0 */ void ags_synth_util_sin_s64(signed long long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 9223372036854775807.0; guint i; for (i = offset; i < offset + n_frames; i++){ buffer[i] = (signed long long) (0xffffffffffff & ((signed long long) buffer[i] + (signed long long) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * scale * volume))); } } /** * ags_synth_util_sin_float: * @buffer: the audio buffer * @freq: the frequency of the sin wave * @phase: the phase of the sin wave * @volume: the volume of the sin wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sinus wave. * * Since: 1.0.0 */ void ags_synth_util_sin_float(float *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { guint i; for (i = offset; i < offset + n_frames; i++){ buffer[i] = (float) ((gdouble) buffer[i] + (gdouble) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * volume)); } } /** * ags_synth_util_sin_double: * @buffer: the audio buffer * @freq: the frequency of the sin wave * @phase: the phase of the sin wave * @volume: the volume of the sin wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sinus wave. * * Since: 1.0.0 */ void ags_synth_util_sin_double(double *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { guint i; for (i = offset; i < offset + n_frames; i++){ buffer[i] = (double) ((gdouble) buffer[i] + (gdouble) (sin((gdouble) (i + phase) * 2.0 * M_PI * freq / (gdouble) samplerate) * volume)); } } /** * ags_synth_util_sawtooth_s8: * @buffer: the audio buffer * @freq: the frequency of the sawtooth wave * @phase: the phase of the sawtooth wave * @volume: the volume of the sawtooth wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sawtooth wave. * * Since: 1.0.0 */ void ags_synth_util_sawtooth_s8(signed char *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 127.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed char) (0xff & ((signed short) buffer[i] + (signed short) (((((int) (i + phase) % (int) (samplerate / freq)) * 2.0 * freq / samplerate) - 1.0) * scale * volume))); } } /** * ags_synth_util_sawtooth_s16: * @buffer: the audio buffer * @freq: the frequency of the sawtooth wave * @phase: the phase of the sawtooth wave * @volume: the volume of the sawtooth wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sawtooth wave. * * Since: 1.0.0 */ void ags_synth_util_sawtooth_s16(signed short *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 32767.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed short) (0xffff & ((signed long) buffer[i] + (signed long) (((((int) (i + phase) % (int) (samplerate / freq)) * 2.0 * freq / samplerate) - 1.0) * scale * volume))); } } /** * ags_synth_util_sawtooth_s24: * @buffer: the audio buffer * @freq: the frequency of the sawtooth wave * @phase: the phase of the sawtooth wave * @volume: the volume of the sawtooth wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sawtooth wave. * * Since: 1.0.0 */ void ags_synth_util_sawtooth_s24(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 8388607.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed long) (0xffffff & ((signed long) buffer[i] + (signed long) (((((int) (i + phase) % (int) (samplerate / freq)) * 2.0 * freq / samplerate) - 1.0) * scale * volume))); } } /** * ags_synth_util_sawtooth_s32: * @buffer: the audio buffer * @freq: the frequency of the sawtooth wave * @phase: the phase of the sawtooth wave * @volume: the volume of the sawtooth wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sawtooth wave. * * Since: 1.0.0 */ void ags_synth_util_sawtooth_s32(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 214748363.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed long) (0xffffffff & ((signed long long) buffer[i] + (signed long long) (((((int) (i + phase) % (int) (samplerate / freq)) * 2.0 * freq / samplerate) - 1.0) * scale * volume))); } } /** * ags_synth_util_sawtooth_s64: * @buffer: the audio buffer * @freq: the frequency of the sawtooth wave * @phase: the phase of the sawtooth wave * @volume: the volume of the sawtooth wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sawtooth wave. * * Since: 1.0.0 */ void ags_synth_util_sawtooth_s64(signed long long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 9223372036854775807.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed long long) (0xffffffffffffffff & ((signed long long) buffer[i] + (signed long long) (((((int) (i + phase) % (int) (samplerate / freq)) * 2.0 * freq / samplerate) - 1.0) * scale * volume))); } } /** * ags_synth_util_sawtooth_float: * @buffer: the audio buffer * @freq: the frequency of the sawtooth wave * @phase: the phase of the sawtooth wave * @volume: the volume of the sawtooth wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sawtooth wave. * * Since: 1.0.0 */ void ags_synth_util_sawtooth_float(float *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = ((double) buffer[i] + (double) (((((int) (i + phase) % (int) (samplerate / freq)) * 2.0 * freq / samplerate) - 1.0) * volume)); } } /** * ags_synth_util_sawtooth_double: * @buffer: the audio buffer * @freq: the frequency of the sawtooth wave * @phase: the phase of the sawtooth wave * @volume: the volume of the sawtooth wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate sawtooth wave. * * Since: 1.0.0 */ void ags_synth_util_sawtooth_double(double *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = ((double) buffer[i] + (double) (((((int) (i + phase) % (int) (samplerate / freq)) * 2.0 * freq / samplerate) - 1.0) * volume)); } } /** * ags_synth_util_triangle_s8: * @buffer: the audio buffer * @freq: the frequency of the triangle wave * @phase: the phase of the triangle wave * @volume: the volume of the triangle wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate triangle wave. * * Since: 1.0.0 */ void ags_synth_util_triangle_s8(signed char *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 127.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed char) (0xff & ((signed short) buffer[i] + (signed short) ((((phase + i) * freq / samplerate * 2.0) - ((int) ((double) ((int) ((phase + i) * freq / samplerate)) / 2.0) * 2) - 1.0) * scale * volume))); } } /** * ags_synth_util_triangle_s16: * @buffer: the audio buffer * @freq: the frequency of the triangle wave * @phase: the phase of the triangle wave * @volume: the volume of the triangle wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate triangle wave. * * Since: 1.0.0 */ void ags_synth_util_triangle_s16(signed short *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 32767.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed short) (0xffff & ((signed long) buffer[i] + (signed long) ((((phase + i) * freq / samplerate * 2.0) - ((int) ((double) ((int) ((phase + i) * freq / samplerate)) / 2.0) * 2) - 1.0) * scale * volume))); } } /** * ags_synth_util_triangle_s24: * @buffer: the audio buffer * @freq: the frequency of the triangle wave * @phase: the phase of the triangle wave * @volume: the volume of the triangle wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate triangle wave. * * Since: 1.0.0 */ void ags_synth_util_triangle_s24(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 8388607.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed long) (0xffffff & ((signed long) buffer[i] + (signed long) ((((phase + i) * freq / samplerate * 2.0) - ((int) ((double) ((int) ((phase + i) * freq / samplerate)) / 2.0) * 2) - 1.0) * scale * volume))); } } /** * ags_synth_util_triangle_s32: * @buffer: the audio buffer * @freq: the frequency of the triangle wave * @phase: the phase of the triangle wave * @volume: the volume of the triangle wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate triangle wave. * * Since: 1.0.0 */ void ags_synth_util_triangle_s32(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 214748363.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed long) (0xffffffff & ((signed long long) buffer[i] + (signed long long) ((((phase + i) * freq / samplerate * 2.0) - ((int) ((double) ((int) ((phase + i) * freq / samplerate)) / 2.0) * 2) - 1.0) * scale * volume))); } } /** * ags_synth_util_triangle_s64: * @buffer: the audio buffer * @freq: the frequency of the triangle wave * @phase: the phase of the triangle wave * @volume: the volume of the triangle wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate triangle wave. * * Since: 1.0.0 */ void ags_synth_util_triangle_s64(signed long long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 9223372036854775807.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = (signed long long) (0xffffffffffffffff & ((signed long long) buffer[i] + (signed long long) ((((phase + i) * freq / samplerate * 2.0) - ((int) ((double) ((int) ((phase + i) * freq / samplerate)) / 2.0) * 2) - 1.0) * scale * volume))); } } /** * ags_synth_util_triangle_float: * @buffer: the audio buffer * @freq: the frequency of the triangle wave * @phase: the phase of the triangle wave * @volume: the volume of the triangle wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate triangle wave. * * Since: 1.0.0 */ void ags_synth_util_triangle_float(float *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = ((double) buffer[i] + (double) ((((phase + i) * freq / samplerate * 2.0) - ((int) ((double) ((int) ((phase + i) * freq / samplerate)) / 2.0) * 2) - 1.0) * volume)); } } /** * ags_synth_util_triangle_double: * @buffer: the audio buffer * @freq: the frequency of the triangle wave * @phase: the phase of the triangle wave * @volume: the volume of the triangle wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate triangle wave. * * Since: 1.0.0 */ void ags_synth_util_triangle_double(double *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ buffer[i] = ((double) buffer[i] + (double) ((((phase + i) * freq / samplerate * 2.0) - ((int) ((double) ((int) ((phase + i) * freq / samplerate)) / 2.0) * 2) - 1.0) * volume)); } } /** * ags_synth_util_square_s8: * @buffer: the audio buffer * @freq: the frequency of the square wave * @phase: the phase of the square wave * @volume: the volume of the square wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate square wave. * * Since: 1.0.0 */ void ags_synth_util_square_s8(signed char *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 127.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ if (sin(i + phase) >= 0.0){ buffer[i] = (signed char) (0xff & ((signed short) buffer[i] + (signed short) (1.0 * scale * volume))); }else{ buffer[i] = (signed char) (0xff & ((signed short) buffer[i] + (signed short) (-1.0 * scale * volume))); } } } /** * ags_synth_util_square_s16: * @buffer: the audio buffer * @freq: the frequency of the square wave * @phase: the phase of the square wave * @volume: the volume of the square wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate square wave. * * Since: 1.0.0 */ void ags_synth_util_square_s16(signed short *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 32767.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ if (sin(i + phase) >= 0.0){ buffer[i] = (signed short) (0xffff & ((signed long) buffer[i] + (signed long) (1.0 * scale * volume))); }else{ buffer[i] = (signed short) (0xffff & ((signed long) buffer[i] + (signed long) (-1.0 * scale * volume))); } } } /** * ags_synth_util_square_s24: * @buffer: the audio buffer * @freq: the frequency of the square wave * @phase: the phase of the square wave * @volume: the volume of the square wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate square wave. * * Since: 1.0.0 */ void ags_synth_util_square_s24(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 8388607.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ if (sin(i + phase) >= 0.0){ buffer[i] = (signed long) (0xffffff & ((signed long) buffer[i] + (signed long) (1.0 * scale * volume))); }else{ buffer[i] = (signed long) (0xffffff & ((signed long) buffer[i] + (signed long) (-1.0 * scale * volume))); } } } /** * ags_synth_util_square_s32: * @buffer: the audio buffer * @freq: the frequency of the square wave * @phase: the phase of the square wave * @volume: the volume of the square wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate square wave. * * Since: 1.0.0 */ void ags_synth_util_square_s32(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 214748363.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ if (sin(i + phase) >= 0.0){ buffer[i] = (signed long) (0xffffffff & ((signed long long) buffer[i] + (signed long long) (1.0 * scale * volume))); }else{ buffer[i] = (signed long) (0xffffffff & ((signed long long) buffer[i] + (signed long long) (-1.0 * scale * volume))); } } } /** * ags_synth_util_square_s64: * @buffer: the audio buffer * @freq: the frequency of the square wave * @phase: the phase of the square wave * @volume: the volume of the square wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate square wave. * * Since: 1.0.0 */ void ags_synth_util_square_s64(signed long long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { static const gdouble scale = 9223372036854775807.0; guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ if (sin(i + phase) >= 0.0){ buffer[i] = (signed long long) (0xffffffffffffffff & ((signed long long) buffer[i] + (signed long long) (1.0 * scale * volume))); }else{ buffer[i] = (signed long long) (0xffffffffffffffff & ((signed long long) buffer[i] + (signed long long) (-1.0 * scale * volume))); } } } /** * ags_synth_util_square_float: * @buffer: the audio buffer * @freq: the frequency of the square wave * @phase: the phase of the square wave * @volume: the volume of the square wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate square wave. * * Since: 1.0.0 */ void ags_synth_util_square_float(float *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ if (sin(i + phase) >= 0.0){ buffer[i] = (buffer[i] + (1.0 * volume)); }else{ buffer[i] = (buffer[i] + (-1.0 * volume)); } } } /** * ags_synth_util_square_double: * @buffer: the audio buffer * @freq: the frequency of the square wave * @phase: the phase of the square wave * @volume: the volume of the square wave * @samplerate: the samplerate * @offset: start frame * @n_frames: generate n frames * * Generate square wave. * * Since: 1.0.0 */ void ags_synth_util_square_double(double *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames) { guint i; phase = (int) (phase) % (int) (freq); phase = (phase / freq) * (samplerate / freq); for (i = offset; i < n_frames; i++){ if (sin(i + phase) >= 0.0){ buffer[i] = (buffer[i] + (1.0 * volume)); }else{ buffer[i] = (buffer[i] + (-1.0 * volume)); } } } /** * ags_synth_util_sin: * @buffer: the audio buffer * @freq: the frequency of the sin wave * @phase: the phase of the sin wave * @volume: the volume of the sin wave * @samplerate: the samplerate * @audio_buffer_util_format: the audio data format * @offset: start frame * @n_frames: generate n frames * * Generate sin wave. * * Since: 1.0.0 */ void ags_synth_util_sin(void *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint audio_buffer_util_format, guint offset, guint n_frames) { switch(audio_buffer_util_format){ case AGS_AUDIO_BUFFER_UTIL_S8: { ags_synth_util_sin_s8((signed char *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { ags_synth_util_sin_s16((signed short *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { ags_synth_util_sin_s24((signed long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { ags_synth_util_sin_s32((signed long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { ags_synth_util_sin_s64((signed long long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_FLOAT: { ags_synth_util_sin_float((float *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { ags_synth_util_sin_double((double *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; default: { g_warning("ags_synth_util_sin() - unsupported format"); } } } /** * ags_synth_util_sawtooth: * @buffer: the audio buffer * @freq: the frequency of the sawtooth wave * @phase: the phase of the sawtooth wave * @volume: the volume of the sawtooth wave * @samplerate: the samplerate * @audio_buffer_util_format: the audio data format * @offset: start frame * @n_frames: generate n frames * * Generate sawtooth wave. * * Since: 1.0.0 */ void ags_synth_util_sawtooth(void *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint audio_buffer_util_format, guint offset, guint n_frames) { switch(audio_buffer_util_format){ case AGS_AUDIO_BUFFER_UTIL_S8: { ags_synth_util_sawtooth_s8((signed char *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { ags_synth_util_sawtooth_s16((signed short *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { ags_synth_util_sawtooth_s24((signed long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { ags_synth_util_sawtooth_s32((signed long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { ags_synth_util_sawtooth_s64((signed long long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_FLOAT: { ags_synth_util_sawtooth_float((float *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { ags_synth_util_sawtooth_double((double *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; default: { g_warning("ags_synth_util_sawtooth() - unsupported format"); } } } /** * ags_synth_util_triangle: * @buffer: the audio buffer * @freq: the frequency of the triangle wave * @phase: the phase of the triangle wave * @volume: the volume of the triangle wave * @samplerate: the samplerate * @audio_buffer_util_format: the audio data format * @offset: start frame * @n_frames: generate n frames * * Generate triangle wave. * * Since: 1.0.0 */ void ags_synth_util_triangle(void *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint audio_buffer_util_format, guint offset, guint n_frames) { switch(audio_buffer_util_format){ case AGS_AUDIO_BUFFER_UTIL_S8: { ags_synth_util_triangle_s8((signed char *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { ags_synth_util_triangle_s16((signed short *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { ags_synth_util_triangle_s24((signed long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { ags_synth_util_triangle_s32((signed long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { ags_synth_util_triangle_s64((signed long long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_FLOAT: { ags_synth_util_triangle_float((float *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { ags_synth_util_triangle_double((double *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; default: { g_warning("ags_synth_util_triangle() - unsupported format"); } } } /** * ags_synth_util_square: * @buffer: the audio buffer * @freq: the frequency of the square wave * @phase: the phase of the square wave * @volume: the volume of the square wave * @samplerate: the samplerate * @audio_buffer_util_format: the audio data format * @offset: start frame * @n_frames: generate n frames * * Generate square wave. * * Since: 1.0.0 */ void ags_synth_util_square(void *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint audio_buffer_util_format, guint offset, guint n_frames) { switch(audio_buffer_util_format){ case AGS_AUDIO_BUFFER_UTIL_S8: { ags_synth_util_square_s8((signed char *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S16: { ags_synth_util_square_s16((signed short *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S24: { ags_synth_util_square_s24((signed long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S32: { ags_synth_util_square_s32((signed long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_S64: { ags_synth_util_square_s64((signed long long *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_FLOAT: { ags_synth_util_square_float((float *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; case AGS_AUDIO_BUFFER_UTIL_DOUBLE: { ags_synth_util_square_double((double *) buffer, freq, phase, volume, samplerate, offset, n_frames); } break; default: { g_warning("ags_synth_util_square() - unsupported format"); } } } gsequencer-1.4.24/ags/audio/ags_synth_generator.h0000644000175000017500000001027513256163135016767 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SYNTH_GENERATOR_H__ #define __AGS_SYNTH_GENERATOR_H__ #include #include #include #define AGS_TYPE_SYNTH_GENERATOR (ags_synth_generator_get_type()) #define AGS_SYNTH_GENERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SYNTH_GENERATOR, AgsSynthGenerator)) #define AGS_SYNTH_GENERATOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SYNTH_GENERATOR, AgsSynthGeneratorClass)) #define AGS_IS_SYNTH_GENERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SYNTH_GENERATOR)) #define AGS_IS_SYNTH_GENERATOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SYNTH_GENERATOR)) #define AGS_SYNTH_GENERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SYNTH_GENERATOR, AgsSynthGeneratorClass)) typedef struct _AgsSynthGenerator AgsSynthGenerator; typedef struct _AgsSynthGeneratorClass AgsSynthGeneratorClass; /** * AgsSynthGeneratorOscillator: * @AGS_SYNTH_GENERATOR_OSCILLATOR_SIN: sinus * @AGS_SYNTH_GENERATOR_OSCILLATOR_SAWTOOTH: sawtooth * @AGS_SYNTH_GENERATOR_OSCILLATOR_TRIANGLE: triangle * @AGS_SYNTH_GENERATOR_OSCILLATOR_SQUARE: square * * Enum values to specify oscillator. */ typedef enum{ AGS_SYNTH_GENERATOR_OSCILLATOR_SIN, AGS_SYNTH_GENERATOR_OSCILLATOR_SAWTOOTH, AGS_SYNTH_GENERATOR_OSCILLATOR_TRIANGLE, AGS_SYNTH_GENERATOR_OSCILLATOR_SQUARE, }AgsSynthGeneratorOscillator; /** * AgsSynthGeneratorComputeFlags: * @AGS_SYNTH_GENERATOR_COMPUTE_FIXED_LENGTH: fixed length * @AGS_SYNTH_GENERATOR_COMPUTE_SYNC: sync * @AGS_SYNTH_GENERATOR_COMPUTE_16HZ: 16 Hz * @AGS_SYNTH_GENERATOR_COMPUTE_440HZ: 440 Hz * @AGS_SYNTH_GENERATOR_COMPUTE_22000HZ: 22000 Hz * @AGS_SYNTH_GENERATOR_COMPUTE_LIMIT: limit * @AGS_SYNTH_GENERATOR_COMPUTE_NOHZ: no Hertz * @AGS_SYNTH_GENERATOR_COMPUTE_FREQUENCY: frequency * @AGS_SYNTH_GENERATOR_COMPUTE_NOTE: note * * Enum values to specify compute flags. */ typedef enum{ AGS_SYNTH_GENERATOR_COMPUTE_FIXED_LENGTH = 1, AGS_SYNTH_GENERATOR_COMPUTE_SYNC = 1 << 1, AGS_SYNTH_GENERATOR_COMPUTE_16HZ = 1 << 2, AGS_SYNTH_GENERATOR_COMPUTE_440HZ = 1 << 3, AGS_SYNTH_GENERATOR_COMPUTE_22000HZ = 1 << 4, AGS_SYNTH_GENERATOR_COMPUTE_LIMIT = 1 << 5, AGS_SYNTH_GENERATOR_COMPUTE_NOHZ = 1 << 6, AGS_SYNTH_GENERATOR_COMPUTE_FREQUENCY = 1 << 7, AGS_SYNTH_GENERATOR_COMPUTE_NOTE = 1 << 8, }AgsSynthGeneratorComputeFlags; struct _AgsSynthGenerator { AgsFunction function; guint flags; guint samplerate; guint buffer_size; guint format; guint frame_count; gdouble delay; guint attack; guint oscillator; gdouble frequency; gdouble phase; gdouble volume; GObject *timestamp; }; struct _AgsSynthGeneratorClass { AgsFunctionClass function; }; GType ags_synth_generator_get_type(); GObject* ags_synth_generator_compute(AgsSynthGenerator *synth_generator, gdouble note); void ags_synth_generator_compute_with_audio_signal(AgsSynthGenerator *synth_generator, GObject *audio_signal, gdouble note, AgsComplex *sync_start, AgsComplex *sync_end, guint compute_flags); void ags_synth_generator_compute_extended(AgsSynthGenerator *synth_generator, GObject *audio_signal, gdouble note, AgsComplex **sync_point, guint sync_point_count); AgsSynthGenerator* ags_synth_generator_new(); #endif /*__AGS_SYNTH_GENERATOR_H__*/ gsequencer-1.4.24/ags/audio/ags_audio_buffer_util.h0000644000175000017500000006202713256163135017245 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_AUDIO_BUFFER_UTIL_H__ #define __AGS_AUDIO_BUFFER_UTIL_H__ #include #include #include #ifdef __APPLE__ #include #endif #define AGS_AUDIO_BUFFER_S8(ptr) ((gint8 *)(ptr)) #define AGS_AUDIO_BUFFER_S16(ptr) ((gint16 *)(ptr)) #define AGS_AUDIO_BUFFER_S24(ptr) ((gint32 *)(ptr)) #define AGS_AUDIO_BUFFER_S32(ptr) ((gint32 *)(ptr)) #define AGS_AUDIO_BUFFER_S64(ptr) ((gint64 *)(ptr)) #define AGS_AUDIO_BUFFER_FLOAT(ptr) ((float *)(ptr)) #define AGS_AUDIO_BUFFER_DOUBLE(ptr) ((double *)(ptr)) /** * AgsAudioBufferUtilFormat: * @AGS_AUDIO_BUFFER_UTIL_S8: signed 8 bit raw pcm * @AGS_AUDIO_BUFFER_UTIL_S16: signed 16 bit raw pcm * @AGS_AUDIO_BUFFER_UTIL_S24: signed 24 bit raw pcm * @AGS_AUDIO_BUFFER_UTIL_S32: signed 32 bit raw pcm * @AGS_AUDIO_BUFFER_UTIL_S64: signed 64 bit raw pcm * @AGS_AUDIO_BUFFER_UTIL_FLOAT: signed float raw pcm * @AGS_AUDIO_BUFFER_UTIL_DOUBLE: signed double raw pcm * @AGS_AUDIO_BUFFER_UTIL_FLOAT32: signed float32 raw pcm * * #AgsAudioBufferUtilFormat specifies the audio data representation. */ typedef enum{ AGS_AUDIO_BUFFER_UTIL_S8, AGS_AUDIO_BUFFER_UTIL_S16, AGS_AUDIO_BUFFER_UTIL_S24, AGS_AUDIO_BUFFER_UTIL_S32, AGS_AUDIO_BUFFER_UTIL_S64, AGS_AUDIO_BUFFER_UTIL_FLOAT, AGS_AUDIO_BUFFER_UTIL_DOUBLE, AGS_AUDIO_BUFFER_UTIL_FLOAT32, }AgsAudioBufferUtilFormat; /** * AgsAudioBufferUtilSamplerate: * @AGS_AUDIO_BUFFER_UTIL_8000HZ: 8000 Hz * @AGS_AUDIO_BUFFER_UTIL_44100HZ: 44100 Hz * @AGS_AUDIO_BUFFER_UTIL_48000HZ: 48000 Hz * @AGS_AUDIO_BUFFER_UTIL_96000HZ: 96000 Hz * @AGS_AUDIO_BUFFER_UTIL_176400HZ: 176400 Hz * @AGS_AUDIO_BUFFER_UTIL_192000HZ: 192000 Hz * @AGS_AUDIO_BUFFER_UTIL_352800HZ: 352800 Hz * @AGS_AUDIO_BUFFER_UTIL_2822400HZ: 2822400 Hz * @AGS_AUDIO_BUFFER_UTIL_5644800HZ: 5644800 Hz * * Some common samplerates in Hertz. */ typedef enum{ AGS_AUDIO_BUFFER_UTIL_8000HZ, AGS_AUDIO_BUFFER_UTIL_44100HZ, AGS_AUDIO_BUFFER_UTIL_48000HZ, AGS_AUDIO_BUFFER_UTIL_96000HZ, AGS_AUDIO_BUFFER_UTIL_176400HZ, AGS_AUDIO_BUFFER_UTIL_192000HZ, AGS_AUDIO_BUFFER_UTIL_352800HZ, AGS_AUDIO_BUFFER_UTIL_2822400HZ, AGS_AUDIO_BUFFER_UTIL_5644800HZ, }AgsAudioBufferUtilSamplerate; /** * AgsAudioBufferUtilCopyMode: * @AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S8: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_S8 * @AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S16: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_S16 * @AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S24: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_S24 * @AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S32: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_S32 * @AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S64: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_S64 * @AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_FLOAT: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_FLOAT * @AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_DOUBLE: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_DOUBLE * @AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S8: copy AGS_AUDIO_BUFFER_UTIL_S16 to AGS_AUDIO_BUFFER_UTIL_S8 * @AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S16: copy AGS_AUDIO_BUFFER_UTIL_S16 to AGS_AUDIO_BUFFER_UTIL_S16 * @AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S24: copy AGS_AUDIO_BUFFER_UTIL_S16 to AGS_AUDIO_BUFFER_UTIL_S24 * @AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S32: copy AGS_AUDIO_BUFFER_UTIL_S16 to AGS_AUDIO_BUFFER_UTIL_S32 * @AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S64: copy AGS_AUDIO_BUFFER_UTIL_S16 to AGS_AUDIO_BUFFER_UTIL_S64 * @AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_FLOAT: copy AGS_AUDIO_BUFFER_UTIL_S16 to AGS_AUDIO_BUFFER_UTIL_FLOAT * @AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_DOUBLE: copy AGS_AUDIO_BUFFER_UTIL_S16 to AGS_AUDIO_BUFFER_UTIL_DOUBLE * @AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S8: copy AGS_AUDIO_BUFFER_UTIL_S24 to AGS_AUDIO_BUFFER_UTIL_S8 * @AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S16: copy AGS_AUDIO_BUFFER_UTIL_S24 to AGS_AUDIO_BUFFER_UTIL_S16 * @AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S24: copy AGS_AUDIO_BUFFER_UTIL_S24 to AGS_AUDIO_BUFFER_UTIL_S24 * @AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S32: copy AGS_AUDIO_BUFFER_UTIL_S24 to AGS_AUDIO_BUFFER_UTIL_S32 * @AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S64: copy AGS_AUDIO_BUFFER_UTIL_S24 to AGS_AUDIO_BUFFER_UTIL_S64 * @AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_FLOAT: copy AGS_AUDIO_BUFFER_UTIL_S24 to AGS_AUDIO_BUFFER_UTIL_FLOAT * @AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_DOUBLE: copy AGS_AUDIO_BUFFER_UTIL_S24 to AGS_AUDIO_BUFFER_UTIL_DOUBLE * @AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S8: copy AGS_AUDIO_BUFFER_UTIL_S32 to AGS_AUDIO_BUFFER_UTIL_S8 * @AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S16: copy AGS_AUDIO_BUFFER_UTIL_S32 to AGS_AUDIO_BUFFER_UTIL_S16 * @AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S24: copy AGS_AUDIO_BUFFER_UTIL_S32 to AGS_AUDIO_BUFFER_UTIL_S24 * @AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S32: copy AGS_AUDIO_BUFFER_UTIL_S32 to AGS_AUDIO_BUFFER_UTIL_S32 * @AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S64: copy AGS_AUDIO_BUFFER_UTIL_S32 to AGS_AUDIO_BUFFER_UTIL_S64 * @AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_FLOAT: copy AGS_AUDIO_BUFFER_UTIL_S32 to AGS_AUDIO_BUFFER_UTIL_FLOAT * @AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_DOUBLE: copy AGS_AUDIO_BUFFER_UTIL_S32 to AGS_AUDIO_BUFFER_UTIL_DOUBLE * @AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S8: copy AGS_AUDIO_BUFFER_UTIL_S64 to AGS_AUDIO_BUFFER_UTIL_S8 * @AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S16: copy AGS_AUDIO_BUFFER_UTIL_S64 to AGS_AUDIO_BUFFER_UTIL_S16 * @AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S24: copy AGS_AUDIO_BUFFER_UTIL_S64 to AGS_AUDIO_BUFFER_UTIL_S24 * @AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S32: copy AGS_AUDIO_BUFFER_UTIL_S64 to AGS_AUDIO_BUFFER_UTIL_S32 * @AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S64: copy AGS_AUDIO_BUFFER_UTIL_S64 to AGS_AUDIO_BUFFER_UTIL_S64 * @AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_FLOAT: copy AGS_AUDIO_BUFFER_UTIL_S64 to AGS_AUDIO_BUFFER_UTIL_FLOAT * @AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_DOUBLE: copy AGS_AUDIO_BUFFER_UTIL_S64 to AGS_AUDIO_BUFFER_UTIL_DOUBLE * @AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S8: copy AGS_AUDIO_BUFFER_UTIL_FLOAT to AGS_AUDIO_BUFFER_UTIL_S8 * @AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S16: copy AGS_AUDIO_BUFFER_UTIL_FLOAT to AGS_AUDIO_BUFFER_UTIL_S16 * @AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S24: copy AGS_AUDIO_BUFFER_UTIL_FLOAT to AGS_AUDIO_BUFFER_UTIL_S24 * @AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S32: copy AGS_AUDIO_BUFFER_UTIL_FLOAT to AGS_AUDIO_BUFFER_UTIL_S32 * @AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S64: copy AGS_AUDIO_BUFFER_UTIL_FLOAT to AGS_AUDIO_BUFFER_UTIL_S64 * @AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_FLOAT: copy AGS_AUDIO_BUFFER_UTIL_FLOAT to AGS_AUDIO_BUFFER_UTIL_FLOAT * @AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_DOUBLE: copy AGS_AUDIO_BUFFER_UTIL_FLOAT to AGS_AUDIO_BUFFER_UTIL_DOUBLE * @AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S8: copy AGS_AUDIO_BUFFER_UTIL_DOUBLE to AGS_AUDIO_BUFFER_UTIL_S8 * @AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S16: copy AGS_AUDIO_BUFFER_UTIL_DOUBLE to AGS_AUDIO_BUFFER_UTIL_S16 * @AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S24: copy AGS_AUDIO_BUFFER_UTIL_DOUBLE to AGS_AUDIO_BUFFER_UTIL_S24 * @AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S32: copy AGS_AUDIO_BUFFER_UTIL_DOUBLE to AGS_AUDIO_BUFFER_UTIL_S32 * @AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S64: copy AGS_AUDIO_BUFFER_UTIL_DOUBLE to AGS_AUDIO_BUFFER_UTIL_S64 * @AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_FLOAT: copy AGS_AUDIO_BUFFER_UTIL_DOUBLE to AGS_AUDIO_BUFFER_UTIL_FLOAT * @AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_DOUBLE: copy AGS_AUDIO_BUFFER_UTIL_DOUBLE to AGS_AUDIO_BUFFER_UTIL_DOUBLE * @AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_FLOAT32: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_FLOAT32 * @AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_FLOAT32: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_FLOAT32 * @AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_FLOAT32: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_FLOAT32 * @AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_FLOAT32: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_FLOAT32 * @AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_FLOAT32: copy AGS_AUDIO_BUFFER_UTIL_S8 to AGS_AUDIO_BUFFER_UTIL_FLOAT32 * * Copy modes. */ typedef enum{ /* signed 8 bit source*/ AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S8, AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S16, AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S24, AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S32, AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_S64, AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_FLOAT, AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_DOUBLE, /* signed 16 bit source */ AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S8, AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S16, AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S24, AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S32, AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_S64, AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_FLOAT, AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_DOUBLE, /* signed 24 bit source */ AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S8, AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S16, AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S24, AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S32, AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_S64, AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_FLOAT, AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_DOUBLE, /* signed 32 bit source */ AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S8, AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S16, AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S24, AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S32, AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_S64, AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_FLOAT, AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_DOUBLE, /* signed 64 bit source */ AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S8, AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S16, AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S24, AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S32, AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_S64, AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_FLOAT, AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_DOUBLE, /* float source */ AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S8, AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S16, AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S24, AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S32, AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_S64, AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_FLOAT, AGS_AUDIO_BUFFER_UTIL_COPY_FLOAT_TO_DOUBLE, /* double source */ AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S8, AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S16, AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S24, AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S32, AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_S64, AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_FLOAT, AGS_AUDIO_BUFFER_UTIL_COPY_DOUBLE_TO_DOUBLE, AGS_AUDIO_BUFFER_UTIL_COPY_S8_TO_FLOAT32, AGS_AUDIO_BUFFER_UTIL_COPY_S16_TO_FLOAT32, AGS_AUDIO_BUFFER_UTIL_COPY_S24_TO_FLOAT32, AGS_AUDIO_BUFFER_UTIL_COPY_S32_TO_FLOAT32, AGS_AUDIO_BUFFER_UTIL_COPY_S64_TO_FLOAT32, }AgsAudioBufferUtilCopyMode; typedef gint16 v8s16 __attribute__ ((vector_size(8 * sizeof(gint16)))); guint ags_audio_buffer_util_format_from_soundcard(guint soundcard_format); guint ags_audio_buffer_util_get_copy_mode(guint destination_format, guint source_format); /* clear */ void ags_audio_buffer_util_clear_float(float *buffer, guint channels, guint count); #ifdef __APPLE__ void ags_audio_buffer_util_clear_float32(Float32 *buffer, guint channels, guint count); #endif void ags_audio_buffer_util_clear_double(double *buffer, guint channels, guint count); void ags_audio_buffer_util_clear_buffer(void *buffer, guint channels, guint count, guint format); /* envelope */ gdouble ags_audio_buffer_util_envelope_s8(gint8 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio); gdouble ags_audio_buffer_util_envelope_s16(gint16 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio); gdouble ags_audio_buffer_util_envelope_s24(gint32 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio); gdouble ags_audio_buffer_util_envelope_s32(gint32 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio); gdouble ags_audio_buffer_util_envelope_s64(gint64 *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio); gdouble ags_audio_buffer_util_envelope_float(float *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio); gdouble ags_audio_buffer_util_envelope_double(double *buffer, guint channels, guint buffer_length, gdouble current_volume, gdouble ratio); gdouble ags_audio_buffer_util_envelope(void *buffer, guint channels, guint format, guint buffer_length, gdouble current_volume, gdouble ratio); /* volume */ void ags_audio_buffer_util_volume_s8(gint8 *buffer, guint channels, guint buffer_length, gdouble volume); void ags_audio_buffer_util_volume_s16(gint16 *buffer, guint channels, guint buffer_length, gdouble volume); void ags_audio_buffer_util_volume_s24(gint32 *buffer, guint channels, guint buffer_length, gdouble volume); void ags_audio_buffer_util_volume_s32(gint32 *buffer, guint channels, guint buffer_length, gdouble volume); void ags_audio_buffer_util_volume_s64(gint64 *buffer, guint channels, guint buffer_length, gdouble volume); void ags_audio_buffer_util_volume_float(float *buffer, guint channels, guint buffer_length, gdouble volume); void ags_audio_buffer_util_volume_double(double *buffer, guint channels, guint buffer_length, gdouble volume); void ags_audio_buffer_util_volume(void *buffer, guint channels, guint format, guint buffer_length, gdouble volume); /* resample */ gint8* ags_audio_buffer_util_resample_s8(gint8 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate); gint16* ags_audio_buffer_util_resample_s16(gint16 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate); gint32* ags_audio_buffer_util_resample_s24(gint32 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate); gint32* ags_audio_buffer_util_resample_s32(gint32 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate); gint64* ags_audio_buffer_util_resample_s64(gint64 *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate); float* ags_audio_buffer_util_resample_float(float *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate); double* ags_audio_buffer_util_resample_double(double *buffer, guint channels, guint samplerate, guint buffer_length, guint target_samplerate); void* ags_audio_buffer_util_resample(void *buffer, guint channels, guint format, guint samplerate, guint buffer_length, guint target_samplerate); /* peak */ gdouble ags_audio_buffer_util_peak_s8(gint8 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor); gdouble ags_audio_buffer_util_peak_s16(gint16 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor); gdouble ags_audio_buffer_util_peak_s24(gint32 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor); gdouble ags_audio_buffer_util_peak_s32(gint32 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor); gdouble ags_audio_buffer_util_peak_s64(gint64 *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor); gdouble ags_audio_buffer_util_peak_float(float *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor); gdouble ags_audio_buffer_util_peak_double(double *buffer, guint channels, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor); gdouble ags_audio_buffer_util_peak(void *buffer, guint channels, guint format, guint buffer_length, gdouble harmonic_rate, gdouble max_rate, gdouble pressure_factor); /* copy 8 bit */ void ags_audio_buffer_util_copy_s8_to_s8(gint8 *destination, guint dchannels, gint8 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s8_to_s16(gint16 *destination, guint dchannels, gint8 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s8_to_s24(gint32 *destination, guint dchannels, gint8 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s8_to_s32(gint32 *destination, guint dchannels, gint8 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s8_to_s64(gint64 *destination, guint dchannels, gint8 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s8_to_float(float *destination, guint dchannels, gint8 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s8_to_double(double *destination, guint dchannels, gint8 *source, guint schannels, guint count); /* copy 16 bit */ void ags_audio_buffer_util_copy_s16_to_s8(gint8 *destination, guint dchannels, gint16 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s16_to_s16(gint16 *destination, guint dchannels, gint16 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s16_to_s24(gint32 *destination, guint dchannels, gint16 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s16_to_s32(gint32 *destination, guint dchannels, gint16 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s16_to_s64(gint64 *destination, guint dchannels, gint16 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s16_to_float(float *destination, guint dchannels, gint16 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s16_to_double(double *destination, guint dchannels, gint16 *source, guint schannels, guint count); /* copy 24 bit */ void ags_audio_buffer_util_copy_s24_to_s8(gint8 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s24_to_s16(gint16 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s24_to_s24(gint32 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s24_to_s32(gint32 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s24_to_s64(gint64 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s24_to_float(float *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s24_to_double(double *destination, guint dchannels, gint32 *source, guint schannels, guint count); /* copy 32 bit */ void ags_audio_buffer_util_copy_s32_to_s8(gint8 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s32_to_s16(gint16 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s32_to_s24(gint32 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s32_to_s32(gint32 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s32_to_s64(gint64 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s32_to_float(float *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s32_to_double(double *destination, guint dchannels, gint32 *source, guint schannels, guint count); /* copy 64 bit */ void ags_audio_buffer_util_copy_s64_to_s8(gint8 *destination, guint dchannels, gint64 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s64_to_s16(gint16 *destination, guint dchannels, gint64 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s64_to_s24(gint32 *destination, guint dchannels, gint64 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s64_to_s32(gint32 *destination, guint dchannels, gint64 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s64_to_s64(gint64 *destination, guint dchannels, gint64 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s64_to_float(float *destination, guint dchannels, gint64 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s64_to_double(double *destination, guint dchannels, gint64 *source, guint schannels, guint count); /* copy float */ void ags_audio_buffer_util_copy_float_to_s8(gint8 *destination, guint dchannels, float *source, guint schannels, guint count); void ags_audio_buffer_util_copy_float_to_s16(gint16 *destination, guint dchannels, float *source, guint schannels, guint count); void ags_audio_buffer_util_copy_float_to_s24(gint32 *destination, guint dchannels, float *source, guint schannels, guint count); void ags_audio_buffer_util_copy_float_to_s32(gint32 *destination, guint dchannels, float *source, guint schannels, guint count); void ags_audio_buffer_util_copy_float_to_s64(gint64 *destination, guint dchannels, float *source, guint schannels, guint count); void ags_audio_buffer_util_copy_float_to_float(float *destination, guint dchannels, float *source, guint schannels, guint count); void ags_audio_buffer_util_copy_float_to_double(double *destination, guint dchannels, float *source, guint schannels, guint count); /* copy double */ void ags_audio_buffer_util_copy_double_to_s8(gint8 *destination, guint dchannels, double *source, guint schannels, guint count); void ags_audio_buffer_util_copy_double_to_s16(gint16 *destination, guint dchannels, double *source, guint schannels, guint count); void ags_audio_buffer_util_copy_double_to_s24(gint32 *destination, guint dchannels, double *source, guint schannels, guint count); void ags_audio_buffer_util_copy_double_to_s32(gint32 *destination, guint dchannels, double *source, guint schannels, guint count); void ags_audio_buffer_util_copy_double_to_s64(gint64 *destination, guint dchannels, double *source, guint schannels, guint count); void ags_audio_buffer_util_copy_double_to_float(float *destination, guint dchannels, double *source, guint schannels, guint count); void ags_audio_buffer_util_copy_double_to_double(double *destination, guint dchannels, double *source, guint schannels, guint count); #ifdef __APPLE__ void ags_audio_buffer_util_copy_s8_to_float32(Float32 *destination, guint dchannels, gint8 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s16_to_float32(Float32 *destination, guint dchannels, gint16 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s24_to_float32(Float32 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s32_to_float32(Float32 *destination, guint dchannels, gint32 *source, guint schannels, guint count); void ags_audio_buffer_util_copy_s64_to_float32(Float32 *destination, guint dchannels, gint64 *source, guint schannels, guint count); #endif /* copy */ void ags_audio_buffer_util_copy_buffer_to_buffer(void *destination, guint dchannels, guint doffset, void *source, guint schannels, guint soffset, guint count, guint mode); #endif /*__AGS_AUDIO_BUFFER_UTIL_H__*/ gsequencer-1.4.24/ags/audio/ags_devout.h0000644000175000017500000001250213256163135015055 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_DEVOUT_H__ #define __AGS_DEVOUT_H__ #include #include #include #include #include #include #ifdef AGS_WITH_ALSA #include #endif #define AGS_TYPE_DEVOUT (ags_devout_get_type()) #define AGS_DEVOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DEVOUT, AgsDevout)) #define AGS_DEVOUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_DEVOUT, AgsDevout)) #define AGS_IS_DEVOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_DEVOUT)) #define AGS_IS_DEVOUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_DEVOUT)) #define AGS_DEVOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_DEVOUT, AgsDevoutClass)) #define AGS_DEVOUT_DEFAULT_ALSA_DEVICE "hw:0,0\0" #define AGS_DEVOUT_DEFAULT_OSS_DEVICE "/dev/dsp\0" #define AGS_DEVOUT_DEFAULT_RING_BUFFER_SIZE (8) typedef struct _AgsDevout AgsDevout; typedef struct _AgsDevoutClass AgsDevoutClass; /** * AgsDevoutFlags: * @AGS_DEVOUT_BUFFER0: ring-buffer 0 * @AGS_DEVOUT_BUFFER1: ring-buffer 1 * @AGS_DEVOUT_BUFFER2: ring-buffer 2 * @AGS_DEVOUT_BUFFER3: ring-buffer 3 * @AGS_DEVOUT_ATTACK_FIRST: use first attack, instead of second one * @AGS_DEVOUT_PLAY: devout is running * @AGS_DEVOUT_OSS: use OSS4 backend * @AGS_DEVOUT_ALSA: use ALSA backend * @AGS_DEVOUT_SHUTDOWN: stop playback * @AGS_DEVOUT_START_PLAY: playback starting * @AGS_DEVOUT_NONBLOCKING: do non-blocking calls * @AGS_DEVOUT_INITIALIZED: the soundcard was initialized * * Enum values to control the behavior or indicate internal state of #AgsDevout by * enable/disable as flags. */ typedef enum { AGS_DEVOUT_BUFFER0 = 1, AGS_DEVOUT_BUFFER1 = 1 << 1, AGS_DEVOUT_BUFFER2 = 1 << 2, AGS_DEVOUT_BUFFER3 = 1 << 3, AGS_DEVOUT_ATTACK_FIRST = 1 << 4, AGS_DEVOUT_PLAY = 1 << 5, AGS_DEVOUT_OSS = 1 << 6, AGS_DEVOUT_ALSA = 1 << 7, AGS_DEVOUT_SHUTDOWN = 1 << 8, AGS_DEVOUT_START_PLAY = 1 << 9, AGS_DEVOUT_NONBLOCKING = 1 << 10, AGS_DEVOUT_INITIALIZED = 1 << 11, }AgsDevoutFlags; #define AGS_DEVOUT_ERROR (ags_devout_error_quark()) typedef enum{ AGS_DEVOUT_ERROR_LOCKED_SOUNDCARD, AGS_DEVOUT_ERROR_BROKEN_CONFIGURATION, AGS_DEVOUT_ERROR_ACCESS_TYPE_NOT_AVAILABLE, AGS_DEVOUT_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE, AGS_DEVOUT_ERROR_CHANNELS_NOT_AVAILABLE, AGS_DEVOUT_ERROR_SAMPLERATE_NOT_AVAILABLE, AGS_DEVOUT_ERROR_BUFFER_SIZE_NOT_AVAILABLE, AGS_DEVOUT_ERROR_HW_PARAMETERS_NOT_AVAILABLE, }AgsDevoutError; struct _AgsDevout { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; guint dsp_channels; guint pcm_channels; guint format; guint buffer_size; guint samplerate; // sample_rate void** buffer; volatile gboolean available; guint ring_buffer_size; guint nth_ring_buffer; unsigned char **ring_buffer; double bpm; // beats per minute gdouble delay_factor; gdouble *delay; // count of tics within buffer size guint *attack; // where currently tic resides in the stream's offset, measured in 1/64 of bpm gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint note_offset_absolute; guint loop_left; guint loop_right; gboolean do_loop; guint loop_offset; union{ struct _AgsOssOut{ int device_fd; char *device; }oss; #ifdef AGS_WITH_ALSA struct _AgsAlsaOut{ char *device; int rc; snd_pcm_t *handle; snd_async_handler_t *ahandler; snd_pcm_hw_params_t *params; }alsa; #else struct _AgsAlsaDummyOut{ char *device; int rc; void *handle; void *ahandler; void *params; }alsa; #endif }out; GObject *application_context; pthread_mutex_t *application_mutex; GList *poll_fd; GObject *notify_soundcard; GList *audio; }; struct _AgsDevoutClass { GObjectClass object; }; GType ags_devout_get_type(); GQuark ags_devout_error_quark(); void ags_devout_switch_buffer_flag(AgsDevout *devout); void ags_devout_adjust_delay_and_attack(AgsDevout *devout); void ags_devout_realloc_buffer(AgsDevout *devout); AgsDevout* ags_devout_new(GObject *application_context); #endif /*__AGS_DEVOUT_H__*/ gsequencer-1.4.24/ags/audio/ags_notation.c0000644000175000017500000013034713256163135015405 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_notation_class_init(AgsNotationClass *notation); void ags_notation_connectable_interface_init(AgsConnectableInterface *connectable); void ags_notation_tactable_interface_init(AgsTactableInterface *tactable); void ags_notation_portlet_interface_init(AgsPortletInterface *portlet); void ags_notation_init(AgsNotation *notation); void ags_notation_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_notation_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_notation_connect(AgsConnectable *connectable); void ags_notation_disconnect(AgsConnectable *connectable); void ags_notation_dispose(GObject *gobject); void ags_notation_finalize(GObject *gobject); void ags_notation_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm); void ags_notation_set_port(AgsPortlet *portlet, GObject *port); GObject* ags_notation_get_port(AgsPortlet *portlet); GList* ags_notation_list_safe_properties(AgsPortlet *portlet); void ags_notation_safe_set_property(AgsPortlet *portlet, gchar *property_name, GValue *value); void ags_notation_safe_get_property(AgsPortlet *portlet, gchar *property_name, GValue *value); void ags_notation_insert_native_piano_from_clipboard(AgsNotation *notation, xmlNode *root_node, char *version, char *base_frequency, char *x_boundary, char *y_boundary, gboolean from_x_offset, guint x_offset, gboolean from_y_offset, guint y_offset, gboolean match_channel, gboolean no_duplicates); /** * SECTION:ags_notation * @short_description: Notation class supporting selection and clipboard. * @title: AgsNotation * @section_id: * @include: ags/audio/ags_notation.h * * #AgsNotation acts as a container of #AgsNote. */ enum{ PROP_0, PROP_AUDIO, PROP_AUDIO_CHANNEL, PROP_PORT, PROP_NOTE, PROP_CURRENT_NOTES, PROP_NEXT_NOTES, PROP_TIMESTAMP, }; static gpointer ags_notation_parent_class = NULL; GType ags_notation_get_type() { static GType ags_type_notation = 0; if(!ags_type_notation){ static const GTypeInfo ags_notation_info = { sizeof(AgsNotationClass), NULL, NULL, (GClassInitFunc) ags_notation_class_init, NULL, NULL, sizeof(AgsNotation), 0, (GInstanceInitFunc) ags_notation_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_notation_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_tactable_interface_info = { (GInterfaceInitFunc) ags_notation_tactable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_portlet_interface_info = { (GInterfaceInitFunc) ags_notation_portlet_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_notation = g_type_register_static(G_TYPE_OBJECT, "AgsNotation", &ags_notation_info, 0); g_type_add_interface_static(ags_type_notation, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_notation, AGS_TYPE_TACTABLE, &ags_tactable_interface_info); g_type_add_interface_static(ags_type_notation, AGS_TYPE_PORTLET, &ags_portlet_interface_info); } return(ags_type_notation); } void ags_notation_class_init(AgsNotationClass *notation) { GObjectClass *gobject; GParamSpec *param_spec; ags_notation_parent_class = g_type_class_peek_parent(notation); gobject = (GObjectClass *) notation; gobject->set_property = ags_notation_set_property; gobject->get_property = ags_notation_get_property; gobject->dispose = ags_notation_dispose; gobject->finalize = ags_notation_finalize; /* properties */ /** * AgsNotation:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of notation"), i18n_pspec("The audio of notation"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsNotation:audio-channel: * * The effect's audio-channel. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("audio-channel of effect"), i18n_pspec("The numerical audio-channel of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsNotation:port: * * The assigned #AgsPort * * Since: 1.0.0 */ param_spec = g_param_spec_object("port", i18n_pspec("port of notation"), i18n_pspec("The port of notation"), AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT, param_spec); /** * AgsNotation:note: * * The assigned #AgsNote * * Since: 1.0.0 */ param_spec = g_param_spec_object("note", i18n_pspec("note of notation"), i18n_pspec("The note of notation"), AGS_TYPE_NOTE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTE, param_spec); /** * AgsNotation:current-notes: * * Offset of current position. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("current-notes", i18n_pspec("current notes for offset"), i18n_pspec("The current notes for offset"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CURRENT_NOTES, param_spec); /** * AgsNotation:next-notes: * * Offset of next position. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("next-notes", i18n_pspec("next notes for offset"), i18n_pspec("The next notes for offset"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NEXT_NOTES, param_spec); /** * AgsPattern:timestamp: * * The pattern's timestamp. * * Since: 1.0.0 */ param_spec = g_param_spec_object("timestamp", i18n_pspec("timestamp of pattern"), i18n_pspec("The timestamp of pattern"), AGS_TYPE_TIMESTAMP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TIMESTAMP, param_spec); } void ags_notation_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_notation_connect; connectable->disconnect = ags_notation_disconnect; } void ags_notation_tactable_interface_init(AgsTactableInterface *tactable) { tactable->change_bpm = ags_notation_change_bpm; } void ags_notation_portlet_interface_init(AgsPortletInterface *portlet) { portlet->set_port = ags_notation_set_port; portlet->get_port = ags_notation_get_port; portlet->list_safe_properties = ags_notation_list_safe_properties; portlet->safe_set_property = ags_notation_safe_set_property; portlet->safe_get_property = ags_notation_safe_get_property; } void ags_notation_init(AgsNotation *notation) { notation->flags = 0; notation->timestamp = ags_timestamp_new(); notation->timestamp->flags &= (~AGS_TIMESTAMP_UNIX); notation->timestamp->flags |= AGS_TIMESTAMP_OFFSET; notation->timestamp->timer.ags_offset.offset = 0; g_object_ref(notation->timestamp); notation->audio_channel = 0; notation->audio = NULL; notation->key = g_strdup("violine"); notation->base_note = g_strdup("A"); notation->base_frequency = 440.0; notation->tact = AGS_NOTATION_MINIMUM_NOTE_LENGTH; notation->bpm = 120.0; notation->maximum_note_length = AGS_NOTATION_MAXIMUM_NOTE_LENGTH; notation->notes = NULL; notation->loop_start = 0.0; notation->loop_end = 0.0; notation->offset = 0.0; notation->selection = NULL; notation->port = NULL; notation->current_notes = NULL; notation->next_notes = NULL; } void ags_notation_connect(AgsConnectable *connectable) { AgsNotation *notation; GList *list; notation = AGS_NOTATION(connectable); if((AGS_NOTATION_CONNECTED & (notation->flags)) != 0){ return; } notation->flags |= AGS_NOTATION_CONNECTED; /* note */ list = notation->notes; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_notation_disconnect(AgsConnectable *connectable) { AgsNotation *notation; GList *list; notation = AGS_NOTATION(connectable); if((AGS_NOTATION_CONNECTED & (notation->flags)) == 0){ return; } notation->flags &= (~AGS_NOTATION_CONNECTED); /* note */ list = notation->notes; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_notation_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsNotation *notation; notation = AGS_NOTATION(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(notation->audio == (GObject *) audio){ return; } if(notation->audio != NULL){ g_object_unref(notation->audio); } if(audio != NULL){ g_object_ref(audio); } notation->audio = (GObject *) audio; } break; case PROP_AUDIO_CHANNEL: { guint audio_channel; audio_channel = g_value_get_uint(value); notation->audio_channel = audio_channel; } break; case PROP_PORT: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == (AgsPort *) notation->port){ return; } if(notation->port != NULL){ g_object_unref(G_OBJECT(notation->port)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } notation->port = (GObject *) port; } break; case PROP_NOTE: { AgsNote *note; note = (AgsNote *) g_value_get_object(value); if(note == NULL || g_list_find(notation->notes, note) != NULL){ return; } ags_notation_add_note(notation, note, FALSE); } break; case PROP_CURRENT_NOTES: { AgsPort *port; GList *current_notes, *list; current_notes = (GList *) g_value_get_pointer(value); port = AGS_PORT(notation->port); pthread_mutex_lock(port->mutex); if(notation->current_notes != NULL){ g_list_free_full(notation->current_notes, g_object_unref); } if(current_notes != NULL){ list = current_notes; while(list != NULL){ g_object_ref(G_OBJECT(list->data)); list = list->next; } } notation->current_notes = current_notes; pthread_mutex_unlock(port->mutex); } break; case PROP_NEXT_NOTES: { AgsPort *port; GList *next_notes, *list; next_notes = (GList *) g_value_get_pointer(value); port = AGS_PORT(notation->port); pthread_mutex_lock(port->mutex); if(notation->next_notes != NULL){ g_list_free_full(notation->next_notes, g_object_unref); } if(next_notes != NULL){ list = next_notes; while(list != NULL){ g_object_ref(G_OBJECT(list->data)); list = list->next; } } notation->next_notes = next_notes; pthread_mutex_unlock(port->mutex); } break; case PROP_TIMESTAMP: { AgsTimestamp *timestamp; timestamp = (AgsTimestamp *) g_value_get_object(value); if(timestamp == (AgsTimestamp *) notation->timestamp){ return; } if(notation->timestamp != NULL){ g_object_unref(G_OBJECT(notation->timestamp)); } if(timestamp != NULL){ g_object_ref(G_OBJECT(timestamp)); } notation->timestamp = (GObject *) timestamp; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notation_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsNotation *notation; notation = AGS_NOTATION(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, notation->audio); } break; case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, notation->audio_channel); } break; case PROP_PORT: { g_value_set_object(value, notation->port); } break; case PROP_NOTE: { AgsPort *port; port = AGS_PORT(notation->port); pthread_mutex_lock(port->mutex); g_value_set_pointer(value, g_list_copy(notation->notes)); pthread_mutex_unlock(port->mutex); } break; case PROP_CURRENT_NOTES: { AgsPort *port; GList *start, *list; port = AGS_PORT(notation->port); pthread_mutex_lock(port->mutex); start = list = g_list_copy(notation->current_notes); while(list != NULL){ g_object_ref(G_OBJECT(list->data)); list = list->next; } pthread_mutex_unlock(port->mutex); g_value_set_pointer(value, (gpointer) start); } break; case PROP_NEXT_NOTES: { AgsPort *port; GList *start, *list; port = AGS_PORT(notation->port); pthread_mutex_lock(port->mutex); start = list = g_list_copy(notation->next_notes); while(list != NULL){ g_object_ref(G_OBJECT(list->data)); list = list->next; } pthread_mutex_unlock(port->mutex); g_value_set_pointer(value, (gpointer) start); } break; case PROP_TIMESTAMP: { g_value_set_object(value, notation->timestamp); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notation_dispose(GObject *gobject) { AgsNotation *notation; GList *list; notation = AGS_NOTATION(gobject); /* timestamp */ if(notation->timestamp != NULL){ g_object_unref(notation->timestamp); notation->timestamp = NULL; } /* audio */ if(notation->audio != NULL){ g_object_unref(notation->audio); notation->audio = NULL; } /* key and base note */ if(notation->key != NULL){ free(notation->key); notation->key = NULL; } if(notation->base_note != NULL){ free(notation->base_note); notation->base_note = NULL; } /* note and selection */ list = notation->notes; while(list != NULL){ g_object_run_dispose(G_OBJECT(list->data)); list = list->next; } g_list_free_full(notation->notes, g_object_unref); g_list_free(notation->selection); notation->notes = NULL; notation->selection = NULL; /* port */ if(notation->port != NULL){ g_object_unref(notation->port); notation->port = NULL; } /* call parent */ G_OBJECT_CLASS(ags_notation_parent_class)->dispose(gobject); } void ags_notation_finalize(GObject *gobject) { AgsNotation *notation; notation = AGS_NOTATION(gobject); /* timestamp */ if(notation->timestamp != NULL){ g_object_unref(notation->timestamp); } /* audio */ if(notation->audio != NULL){ g_object_unref(notation->audio); } /* key and base note */ if(notation->key != NULL){ free(notation->key); } if(notation->base_note != NULL){ free(notation->base_note); } /* note and selection */ g_list_free_full(notation->notes, g_object_unref); g_list_free(notation->selection); /* port */ if(notation->port != NULL){ g_object_unref(notation->port); } /* call parent */ G_OBJECT_CLASS(ags_notation_parent_class)->finalize(gobject); } void ags_notation_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm) { //TODO:JK: implement me } void ags_notation_set_port(AgsPortlet *portlet, GObject *port) { g_object_set(G_OBJECT(portlet), "port", port, NULL); } GObject* ags_notation_get_port(AgsPortlet *portlet) { AgsPort *port; g_object_get(G_OBJECT(portlet), "port", &port, NULL); return((GObject *) port); } GList* ags_notation_list_safe_properties(AgsPortlet *portlet) { static GList *list = NULL; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(list == NULL){ list = g_list_prepend(list, "current-notes"); list = g_list_prepend(list, "next-notes"); } pthread_mutex_unlock(&mutex); return(list); } void ags_notation_safe_set_property(AgsPortlet *portlet, gchar *property_name, GValue *value) { //TODO:JK: add check for safe property g_object_set_property(G_OBJECT(portlet), property_name, value); } void ags_notation_safe_get_property(AgsPortlet *portlet, gchar *property_name, GValue *value) { //TODO:JK: add check for safe property g_object_get_property(G_OBJECT(portlet), property_name, value); } /** * ags_notation_find_near_timestamp: * @notation: a #GList containing #AgsNotation * @audio_channel: the matching audio channel * @timestamp: (allow-none): the matching timestamp, or %NULL to match any timestamp * * Retrieve appropriate notation for timestamp. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_notation_find_near_timestamp(GList *notation, guint audio_channel, AgsTimestamp *timestamp) { AgsTimestamp *current_timestamp; while(notation != NULL){ if(AGS_NOTATION(notation->data)->audio_channel != audio_channel){ notation = notation->next; continue; } if(timestamp == NULL){ return(notation); } current_timestamp = (AgsTimestamp *) AGS_NOTATION(notation->data)->timestamp; if(current_timestamp != NULL){ if((AGS_TIMESTAMP_UNIX & (timestamp->flags)) != 0 && (AGS_TIMESTAMP_UNIX & (current_timestamp->flags)) != 0){ if(current_timestamp->timer.unix_time.time_val >= timestamp->timer.unix_time.time_val && current_timestamp->timer.unix_time.time_val < timestamp->timer.unix_time.time_val + AGS_NOTATION_DEFAULT_DURATION){ return(notation); } }else if((AGS_TIMESTAMP_OFFSET & (timestamp->flags)) != 0 && (AGS_TIMESTAMP_OFFSET & (current_timestamp->flags)) != 0){ if(current_timestamp->timer.ags_offset.offset >= timestamp->timer.ags_offset.offset && current_timestamp->timer.ags_offset.offset < timestamp->timer.ags_offset.offset + AGS_NOTATION_DEFAULT_OFFSET){ return(notation); } } } notation = notation->next; } return(NULL); } /** * ags_notation_add: * @notation: the #GList-struct containing #AgsNotation * @new_notation: the notation to add * * Add @new_notation sorted to @notation * * Returns: the new beginning of @notation * * Since: 1.2.0 */ GList* ags_notation_add(GList *notation, AgsNotation *new_notation) { auto gint ags_notation_add_compare(gconstpointer a, gconstpointer b); gint ags_notation_add_compare(gconstpointer a, gconstpointer b) { if(AGS_NOTATION(a)->timestamp->timer.ags_offset.offset == AGS_NOTATION(b)->timestamp->timer.ags_offset.offset){ return(0); }else if(AGS_NOTATION(a)->timestamp->timer.ags_offset.offset < AGS_NOTATION(b)->timestamp->timer.ags_offset.offset){ return(-1); }else if(AGS_NOTATION(a)->timestamp->timer.ags_offset.offset > AGS_NOTATION(b)->timestamp->timer.ags_offset.offset){ return(1); } return(0); } if(!AGS_IS_NOTATION(new_notation) || !AGS_IS_TIMESTAMP(new_notation->timestamp)){ return(notation); } notation = g_list_insert_sorted(notation, new_notation, ags_notation_add_compare); return(notation); } /** * ags_notation_add_note: * @notation: an #AgsNotation * @note: the #AgsNote to add * @use_selection_list: if %TRUE add to selection, else to default notation * * Adds a note to notation. * * Since: 1.0.0 */ void ags_notation_add_note(AgsNotation *notation, AgsNote *note, gboolean use_selection_list) { if(!AGS_IS_NOTATION(notation) || !AGS_IS_NOTE(note)){ return; } g_object_ref(note); if(use_selection_list){ notation->selection = g_list_insert_sorted(notation->selection, note, (GCompareFunc) ags_note_sort_func); }else{ notation->notes = g_list_insert_sorted(notation->notes, note, (GCompareFunc) ags_note_sort_func); } } /** * ags_notation_remove_note: * @notation: an #AgsNotation * @note: the #AgsNote to remove * @use_selection_list: if %TRUE remove from selection, else from default notation * * Removes a note from notation. * * Since: 1.0.0 */ void ags_notation_remove_note(AgsNotation *notation, AgsNote *note, gboolean use_selection_list) { if(!AGS_IS_NOTATION(notation) || !AGS_IS_NOTE(note)){ return; } if(!use_selection_list){ notation->notes = g_list_remove(notation->notes, note); }else{ notation->selection = g_list_remove(notation->selection, note); } } /** * ags_notation_remove_note_at_position: * @notation: an #AgsNotation * @x: offset * @y: note * * Removes one #AgsNote of notation. * * Returns: %TRUE if successfully removed note. * * Since: 1.0.0 */ gboolean ags_notation_remove_note_at_position(AgsNotation *notation, guint x, guint y) { AgsNote *note; GList *notes, *notes_next, *notes_prev; GList *notes_end_region, *reverse_start; guint x_start, i; notes = notation->notes; if(notes == NULL){ return(FALSE); } /* get entry point */ while(notes->next != NULL && (note = AGS_NOTE(notes->data))->x[0] < x){ notes = notes->next; } notes_end_region = notes; /* search in y region for appropriate note */ if(notes != NULL && (note = AGS_NOTE(notes->data))->x[0] == x){ do{ notes_next = notes->next; if(note->y == y){ #ifdef AGS_DEBUG g_message("remove"); #endif //TODO:JK: work-around // notation->notes = g_list_delete_link(notation->notes, notes); if(notes->prev != NULL){ notes->prev->next = notes->next; } if(notes->next != NULL){ notes->next->prev = notes->prev; } if(notation->notes == notes){ notation->notes = notes->next; } notes->prev = NULL; notes->next = NULL; g_list_free_1(notes); g_object_unref(note); return(TRUE); } notes = notes_next; }while(notes != NULL && (note = AGS_NOTE(notes->data))->x[0] == x && note->y <= y); notes = notes_end_region->prev; }else{ notes = notes_end_region; } /* search backward until x_start */ while(notes != NULL && (note = AGS_NOTE(notes->data))->x[0] >= x - (notation->maximum_note_length / notation->tact)){ if(note->y == y){ if(note->x[0] < x){ #ifdef AGS_DEBUG g_message("remove"); #endif //TODO:JK: work-around // notation->notes = g_list_delete_link(notation->notes, notes); if(notes->prev != NULL){ notes->prev->next = notes->next; } if(notes->next != NULL){ notes->next->prev = notes->prev; } if(notation->notes == notes){ notation->notes = notes->next; } notes->prev = NULL; notes->next = NULL; g_list_free_1(notes); g_object_unref(note); return(TRUE); } } notes = notes->prev; } return(FALSE); } /** * ags_notation_get_selection: * @notation: the #AgsNotation * * Retrieve selection. * * Returns: the selection. * * Since: 1.0.0 */ GList* ags_notation_get_selection(AgsNotation *notation) { return(notation->selection); } /** * ags_notation_is_note_selected: * @notation: the #AgsNotation * @note: the #AgsNote to check for * * Check selection for note. * * Returns: %TRUE if selected * * Since: 1.0.0 */ gboolean ags_notation_is_note_selected(AgsNotation *notation, AgsNote *note) { GList *selection; selection = notation->selection; while(selection != NULL && AGS_NOTE(selection->data)->x[0] <= note->x[0]){ if(selection->data == note){ return(TRUE); } selection = selection->next; } return(FALSE); } /** * ags_notation_find_point: * @notation: an #AgsNotation * @x: offset * @y: note * @use_selection_list: if %TRUE selection is searched * * Find note by offset and tone. * * Returns: the matching note. * * Since: 1.0.0 */ AgsNote* ags_notation_find_point(AgsNotation *notation, guint x, guint y, gboolean use_selection_list) { AgsNote *note, *prev_note; GList *notes; if(use_selection_list){ notes = notation->selection; }else{ notes = notation->notes; } while(notes != NULL && AGS_NOTE(notes->data)->x[0] < x){ notes = notes->next; } if(notes == NULL) return(NULL); prev_note = NULL; while(notes != NULL && (note = AGS_NOTE(notes->data))->x[0] == x){ if(note->y == y){ /* find last match for point */ do{ prev_note = note; notes = notes->next; }while(notes != NULL && (note = AGS_NOTE(notes->data))->x[0] == x && note->y == y); break; } notes = notes->next; } return(prev_note); } /** * ags_notation_find_region: * @notation: an #AgsNotation * @x0: start offset * @y0: start tone * @x1: end offset * @y1: end tone * @use_selection_list: if %TRUE selection is searched * * Find notes by offset and tone region. * * Returns: the matching notes as #GList. * * Since: 1.0.0 */ GList* ags_notation_find_region(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1, gboolean use_selection_list) { AgsNote *note; GList *notes; GList *region; if(x0 > x1){ guint tmp; tmp = x1; x1 = x0; x0 = x1; } if(y0 > y1){ guint tmp; tmp = y1; y1 = y0; y0 = y1; } if(use_selection_list){ notes = notation->selection; }else{ notes = notation->notes; } while(notes != NULL && AGS_NOTE(notes->data)->x[0] < x0){ notes = notes->next; } region = NULL; while(notes != NULL && (note = AGS_NOTE(notes->data))->x[0] < x1){ if(note->y >= y0 && note->y < y1){ region = g_list_prepend(region, note); } notes = notes->next; } region = g_list_reverse(region); return(region); } /** * ags_notation_free_selection: * @notation: an #AgsNotation * * Clear selection. * * Since: 1.0.0 */ void ags_notation_free_selection(AgsNotation *notation) { g_list_free_full(notation->selection, g_object_unref); notation->selection = NULL; } /** * ags_notation_add_all_to_selection: * @notation: an #AgsNotation * * Select all. * * Since: 1.0.0 */ void ags_notation_add_all_to_selection(AgsNotation *notation) { AgsNote *note; GList *region, *list; ags_notation_free_selection(notation); list = notation->notes; while(list != NULL){ AGS_NOTE(list->data)->flags |= AGS_NOTE_IS_SELECTED; g_object_ref(G_OBJECT(list->data)); list = list->next; } notation->selection = g_list_copy(notation->notes); } /** * ags_notation_add_point_to_selection: * @notation: an #AgsNotation * @x: offset * @y: tone * @replace_current_selection: if %TRUE selection is replaced * * Select notes at position. * * Since: 1.0.0 */ void ags_notation_add_point_to_selection(AgsNotation *notation, guint x, guint y, gboolean replace_current_selection) { AgsNote *note; note = ags_notation_find_point(notation, x, y, FALSE); if(note == NULL){ /* there is nothing to be selected */ if(replace_current_selection){ ags_notation_free_selection(notation); } }else{ /* add to or replace selection */ note->flags |= AGS_NOTE_IS_SELECTED; g_object_ref(note); if(replace_current_selection){ GList *list; list = g_list_alloc(); list->data = note; ags_notation_free_selection(notation); notation->selection = list; }else{ if(!ags_notation_is_note_selected(notation, note)){ ags_notation_add_note(notation, note, TRUE); } } } } /** * ags_notation_remove_point_from_selection: * @notation: an #AgsNotation * @x: offset * @y: tone * * Remove notes at position of selection. * * Since: 1.0.0 */ void ags_notation_remove_point_from_selection(AgsNotation *notation, guint x, guint y) { AgsNote *note; note = ags_notation_find_point(notation, x, y, TRUE); if(note != NULL){ note->flags &= (~AGS_NOTE_IS_SELECTED); /* remove note from selection */ notation->selection = g_list_remove(notation->selection, note); g_object_unref(note); } } /** * ags_notation_add_region_to_selection: * @notation: an #AgsNotation * @x0: start offset * @y0: start tone * @x1: end offset * @y1: end tone * @replace_current_selection: if %TRUE selection is replaced * * Select notes within region. * * Since: 1.0.0 */ void ags_notation_add_region_to_selection(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1, gboolean replace_current_selection) { AgsNote *note; GList *region, *list; region = ags_notation_find_region(notation, x0, y0, x1, y1, FALSE); if(replace_current_selection){ ags_notation_free_selection(notation); list = region; while(list != NULL){ AGS_NOTE(list->data)->flags |= AGS_NOTE_IS_SELECTED; g_object_ref(G_OBJECT(list->data)); list = list->next; } notation->selection = region; }else{ while(region != NULL){ note = AGS_NOTE(region->data); if(!ags_notation_is_note_selected(notation, note)){ note->flags |= AGS_NOTE_IS_SELECTED; g_object_ref(G_OBJECT(note)); ags_notation_add_note(notation, note, TRUE); } region = region->next; } g_list_free(region); } } /** * ags_notation_remove_region_from_selection: * @notation: an #AgsNotation * @x0: start offset * @y0: start tone * @x1: end offset * @y1: end tone * * Remove notes within region of selection. * * Since: 1.0.0 */ void ags_notation_remove_region_from_selection(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1) { AgsNote *note; GList *region; region = ags_notation_find_region(notation, x0, y0, x1, y1, TRUE); while(region != NULL){ note = AGS_NOTE(region->data); note->flags &= (~AGS_NOTE_IS_SELECTED); notation->selection = g_list_remove(notation->selection, note); g_object_unref(G_OBJECT(note)); region = region->next; } g_list_free(region); } /** * ags_notation_copy_selection: * @notation: an #AgsNotation * * Copy selection to clipboard. * * Returns: the selection as XML. * * Since: 1.0.0 */ xmlNode* ags_notation_copy_selection(AgsNotation *notation) { AgsNote *note; xmlNode *notation_node, *current_note; xmlNode *timestamp_node; GList *selection; guint x_boundary, y_boundary; selection = notation->selection; /* create root node */ notation_node = xmlNewNode(NULL, BAD_CAST "notation"); xmlNewProp(notation_node, BAD_CAST "program", BAD_CAST "ags"); xmlNewProp(notation_node, BAD_CAST "type", BAD_CAST (AGS_NOTATION_CLIPBOARD_TYPE)); xmlNewProp(notation_node, BAD_CAST "version", BAD_CAST (AGS_NOTATION_CLIPBOARD_VERSION)); xmlNewProp(notation_node, BAD_CAST "format", BAD_CAST (AGS_NOTATION_CLIPBOARD_FORMAT)); xmlNewProp(notation_node, BAD_CAST "base_frequency", BAD_CAST (g_strdup_printf("%f", notation->base_frequency))); xmlNewProp(notation_node, BAD_CAST "audio-channel", BAD_CAST (g_strdup_printf("%u", notation->audio_channel))); /* timestamp */ if(notation->timestamp != NULL){ timestamp_node = xmlNewNode(NULL, BAD_CAST "timestamp"); xmlAddChild(notation_node, timestamp_node); xmlNewProp(timestamp_node, BAD_CAST "offset", BAD_CAST (g_strdup_printf("%u", AGS_TIMESTAMP(notation->timestamp)->timer.ags_offset.offset))); } /* selection */ selection = notation->selection; if(selection != NULL){ x_boundary = AGS_NOTE(selection->data)->x[0]; y_boundary = G_MAXUINT; }else{ x_boundary = 0; y_boundary = 0; } while(selection != NULL){ note = AGS_NOTE(selection->data); current_note = xmlNewChild(notation_node, NULL, BAD_CAST "note", NULL); xmlNewProp(current_note, BAD_CAST "x", BAD_CAST (g_strdup_printf("%u", note->x[0]))); xmlNewProp(current_note, BAD_CAST "x1", BAD_CAST (g_strdup_printf("%u", note->x[1]))); xmlNewProp(current_note, BAD_CAST "y", BAD_CAST (g_strdup_printf("%u", note->y))); if(y_boundary > note->y){ y_boundary = note->y; } selection = selection->next; } xmlNewProp(notation_node, BAD_CAST "x_boundary", BAD_CAST (g_strdup_printf("%u", x_boundary))); xmlNewProp(notation_node, BAD_CAST "y_boundary", BAD_CAST (g_strdup_printf("%u", y_boundary))); return(notation_node); } /** * ags_notation_cut_selection: * @notation: an #AgsNotation * * Cut selection to clipboard. * * Returns: the selection as XML. * * Since: 1.0.0 */ xmlNode* ags_notation_cut_selection(AgsNotation *notation) { xmlNode* notation_node; GList *selection; notation_node = ags_notation_copy_selection(notation); selection = notation->selection; while(selection != NULL){ notation->notes = g_list_remove(notation->notes, selection->data); AGS_NOTE(selection->data)->flags &= (~AGS_NOTE_IS_SELECTED); g_object_unref(selection->data); selection = selection->next; } ags_notation_free_selection(notation); return(notation_node); } /** * ags_notation_insert_native_piano_from_clipboard: * @notation: an #AgsNotation * @notation_node: the clipboard XML data * @version: clipboard version * @base_frequency: lowest frequency of notation * @x_boundary: region start offset * @y_boundary: region start tone * @reset_x_offset: if %TRUE @x_offset used as cursor * @x_offset: region start cursor offset * @reset_y_offset: if %TRUE @y_offset used as cursor * @y_offset: region start cursor tone * @match_channel: only paste if channel matches * @no_duplicates: only paste if current note doesn't exist * * Paste previously copied notes. * * Since: 1.0.0 */ void ags_notation_insert_native_piano_from_clipboard(AgsNotation *notation, xmlNode *root_node, char *version, char *base_frequency, char *x_boundary, char *y_boundary, gboolean reset_x_offset, guint x_offset, gboolean reset_y_offset, guint y_offset, gboolean match_channel, gboolean no_duplicates) { gboolean match_timestamp; auto void ags_notation_insert_native_piano_from_clipboard_version_0_3_12(); void ags_notation_insert_native_piano_from_clipboard_version_0_3_12() { AgsNote *note; xmlNode *node; char *x0, *x1, *y; gchar *offset; char *endptr; guint x_boundary_val, y_boundary_val; guint x0_val, x1_val, y_val; guint base_x_difference, base_y_difference; guint64 offset_val; gboolean subtract_x, subtract_y; node = root_node->children; /* retrieve x values for resetting */ if(reset_x_offset){ if(x_boundary != NULL){ errno = 0; x_boundary_val = strtoul(x_boundary, &endptr, 10); if(errno == ERANGE){ goto dont_reset_x_offset; } if(x_boundary == endptr){ goto dont_reset_x_offset; } if(x_boundary_val < x_offset){ base_x_difference = x_offset - x_boundary_val; subtract_x = FALSE; }else{ base_x_difference = x_boundary_val - x_offset; subtract_x = TRUE; } }else{ dont_reset_x_offset: reset_x_offset = FALSE; } } /* retrieve y values for resetting */ if(reset_y_offset){ if(y_boundary != NULL){ errno = 0; y_boundary_val = strtoul(y_boundary, &endptr, 10); if(errno == ERANGE){ goto dont_reset_y_offset; } if(y_boundary == endptr){ goto dont_reset_y_offset; } if(y_boundary_val < y_offset){ base_y_difference = y_offset - y_boundary_val; subtract_y = FALSE; }else{ base_y_difference = y_boundary_val - y_offset; subtract_y = TRUE; } }else{ dont_reset_y_offset: reset_y_offset = FALSE; } } /* parse */ for(; node != NULL; ){ if(node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("note", node->name, 5)){ /* retrieve x0 offset */ x0 = xmlGetProp(node, "x"); if(x0 == NULL){ node = node->next; continue; } errno = 0; x0_val = strtoul(x0, &endptr, 10); if(errno == ERANGE){ node = node->next; continue; } if(x0 == endptr){ node = node->next; continue; } /* retrieve x1 offset */ x1 = xmlGetProp(node, "x1"); if(x1 == NULL){ node = node->next; continue; } errno = 0; x1_val = strtoul(x1, &endptr, 10); if(errno == ERANGE){ node = node->next; continue; } if(x1 == endptr){ node = node->next; continue; } /* retrieve y offset */ y = xmlGetProp(node, "y"); if(y == NULL){ node = node->next; continue; } errno = 0; y_val = strtoul(y, &endptr, 10); if(errno == ERANGE){ node = node->next; continue; } if(y == endptr){ node = node->next; continue; } /* switch x values if necessary */ if(x0_val > x1_val){ guint tmp; tmp = x0_val; x0_val = x1_val; x1_val = tmp; } /* calculate new offset */ if(reset_x_offset){ errno = 0; if(subtract_x){ x0_val -= base_x_difference; if(errno != 0){ node = node->next; continue; } x1_val -= base_x_difference; }else{ x0_val += base_x_difference; x1_val += base_x_difference; if(errno != 0){ node = node->next; continue; } } } if(reset_y_offset){ errno = 0; if(subtract_y){ y_val -= base_y_difference; }else{ y_val += base_y_difference; } if(errno != 0){ node = node->next; continue; } } /* check if max length wasn't exceeded */ if(x1_val - x0_val > notation->maximum_note_length){ node = node->next; continue; } /* check duplicate */ if(no_duplicates && ags_notation_find_point(notation, x0_val, y_val, FALSE) != NULL){ node = node->next; continue; } /* add note */ if(!match_timestamp || x0_val < notation->timestamp->timer.ags_offset.offset + AGS_NOTATION_DEFAULT_OFFSET){ note = ags_note_new(); note->x[0] = x0_val; note->x[1] = x1_val; note->y = y_val; #ifdef AGS_DEBUG g_message("adding note at: [%u,%u|%u]\n", x0_val, x1_val, y_val); #endif ags_notation_add_note(notation, note, FALSE); } } } node = node->next; } } if(!AGS_IS_NOTATION(notation)){ return; } match_timestamp = TRUE; if(!xmlStrncmp("0.3.12", version, 7)){ ags_notation_insert_native_piano_from_clipboard_version_0_3_12(); }else if(!xmlStrncmp("0.4.2", version, 6)){ /* changes contain only for UI relevant new informations */ ags_notation_insert_native_piano_from_clipboard_version_0_3_12(); }else if(!xmlStrncmp("1.2.0", version, 6)){ /* changes contain only optional informations */ match_timestamp = TRUE; if(match_channel && notation->audio_channel != g_ascii_strtoull(xmlGetProp(root_node, "audio-channel"), NULL, 10)){ return; } ags_notation_insert_native_piano_from_clipboard_version_0_3_12(); } } /** * ags_notation_insert_from_clipboard: * @notation: an #AgsNotation * @notation_node: the clipboard XML data * @reset_x_offset: if %TRUE @x_offset used as cursor * @x_offset: region start cursor offset * @reset_y_offset: if %TRUE @y_offset used as cursor * @y_offset: region start cursor tone * * Paste previously copied notes. * * Since: 1.0.0 */ void ags_notation_insert_from_clipboard(AgsNotation *notation, xmlNode *notation_node, gboolean reset_x_offset, guint x_offset, gboolean reset_y_offset, guint y_offset) { ags_notation_insert_from_clipboard_extended(notation, notation_node, reset_x_offset, x_offset, reset_y_offset, y_offset, FALSE, FALSE); } /** * ags_notation_insert_from_clipboard_extended: * @notation: an #AgsNotation * @notation_node: the clipboard XML data * @reset_x_offset: if %TRUE @x_offset used as cursor * @x_offset: region start cursor offset * @reset_y_offset: if %TRUE @y_offset used as cursor * @y_offset: region start cursor tone * @match_channel: only paste if channel matches * @no_duplicates: only paste if current note doesn't exist * * Paste previously copied notes. * * Since: 1.3.0 */ void ags_notation_insert_from_clipboard_extended(AgsNotation *notation, xmlNode *notation_node, gboolean reset_x_offset, guint x_offset, gboolean reset_y_offset, guint y_offset, gboolean match_channel, gboolean no_duplicates) { char *program, *version, *type, *format; char *base_frequency; char *x_boundary, *y_boundary; while(notation_node != NULL){ if(notation_node->type == XML_ELEMENT_NODE && !xmlStrncmp("notation", notation_node->name, 9)){ break; } notation_node = notation_node->next; } if(notation_node != NULL){ program = xmlGetProp(notation_node, "program"); if(!xmlStrncmp("ags", program, 4)){ version = xmlGetProp(notation_node, "version"); type = xmlGetProp(notation_node, "type"); format = xmlGetProp(notation_node, "format"); if(!xmlStrcmp(AGS_NOTATION_CLIPBOARD_FORMAT, format)){ base_frequency = xmlGetProp(notation_node, "base_frequency"); x_boundary = xmlGetProp(notation_node, "x_boundary"); y_boundary = xmlGetProp(notation_node, "y_boundary"); ags_notation_insert_native_piano_from_clipboard(notation, notation_node, version, base_frequency, x_boundary, y_boundary, reset_x_offset, x_offset, reset_y_offset, y_offset, match_channel, no_duplicates); } } } } GList* ags_notation_get_current(AgsNotation *notation) { GList *list; list = NULL; //TODO:JK: get current return(list); } /** * ags_notation_to_raw_midi: * @notation: the #AgsNotation * @bpm: the source bpm * @delay_factor: the source delay factor * @nn: numerator * @dd: denominator * @cc: clocks * @bb: beats * @tempo: tempo * @buffer_length: the return location of buffer length * * Convert @notation to raw-midi. * * Returns: the raw-midi buffer * * Since: 1.0.0 */ unsigned char* ags_notation_to_raw_midi(AgsNotation *notation, gdouble bpm, gdouble delay_factor, glong nn, glong dd, glong cc, glong bb, glong tempo, guint *buffer_length) { //TODO:JK: implement me return(NULL); } /** * ags_notation_from_raw_midi: * @raw_midi: the data array * @nn: numerator * @dd: denominator * @cc: clocks * @bb: beats * @tempo: tempo * @bpm: the bpm to use * @delay_factor: the segmentation delay factor * @buffer_length: the buffer length * * Parse @raw_midi data and convert to #AgsNotation. * * Returns: the #AgsNotation * * Since: 1.0.0 */ AgsNotation* ags_notation_from_raw_midi(unsigned char *raw_midi, glong nn, glong dd, glong cc, glong bb, glong tempo, gdouble bpm, gdouble delay_factor, guint buffer_length) { //TODO:JK: implement me return(NULL); } /** * ags_notation_new: * @audio: the assigned #AgsAudio * @audio_channel: the audio channel to be used * * Creates a #AgsNotation, assigned to @audio_channel. * * Returns: a new #AgsNotation * * Since: 1.0.0 */ AgsNotation* ags_notation_new(GObject *audio, guint audio_channel) { AgsNotation *notation; notation = (AgsNotation *) g_object_new(AGS_TYPE_NOTATION, "audio", audio, "audio-channel", audio_channel, NULL); return(notation); } gsequencer-1.4.24/ags/audio/ags_audio_connection.c0000644000175000017500000002462313256163135017071 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_audio_connection_class_init(AgsAudioConnectionClass *audio_connection); void ags_audio_connection_init (AgsAudioConnection *audio_connection); void ags_audio_connection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_audio_connection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_audio_connection_finalize(GObject *gobject); /** * SECTION:ags_audio_connection * @short_description: audio connections * @title: AgsAudioConnection * @section_id: * @include: ags/audio/ags_audio_connection.h * * The #AgsAudioConnection specifies your audio connections. */ static gpointer ags_audio_connection_parent_class = NULL; enum{ PROP_0, PROP_AUDIO, PROP_CHANNEL_TYPE, PROP_PAD, PROP_AUDIO_CHANNEL, PROP_LINE, PROP_MAPPED_LINE, }; GType ags_audio_connection_get_type (void) { static GType ags_type_audio_connection = 0; if(!ags_type_audio_connection){ static const GTypeInfo ags_audio_connection_info = { sizeof (AgsAudioConnectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_connection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAudioConnection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_connection_init, }; ags_type_audio_connection = g_type_register_static(AGS_TYPE_CONNECTION, "AgsAudioConnection", &ags_audio_connection_info, 0); } return (ags_type_audio_connection); } void ags_audio_connection_class_init(AgsAudioConnectionClass *audio_connection) { GObjectClass *gobject; GParamSpec *param_spec; ags_audio_connection_parent_class = g_type_class_peek_parent(audio_connection); /* GObjectClass */ gobject = (GObjectClass *) audio_connection; gobject->set_property = ags_audio_connection_set_property; gobject->get_property = ags_audio_connection_get_property; gobject->finalize = ags_audio_connection_finalize; /* properties */ /** * AgsAudioConnection:audio: * * The #AgsAudio belonging to. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio"), i18n_pspec("The audio belonging to"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsAudioConnection:channel-type: * * The #GType of #AgsChannel belonging to. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("channel-type", i18n_pspec("channel type"), i18n_pspec("The channel type belonging to"), 0, G_MAXULONG, G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL_TYPE, param_spec); /** * AgsAudioConnection:pad: * * The nth pad assigned with. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pad", i18n_pspec("pad"), i18n_pspec("The pad assigned with"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PAD, param_spec); /** * AgsAudioConnection:audio-channel: * * The nth audio channel assigned with. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("audio-channel"), i18n_pspec("The audio channel assigned with"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsAudioConnection:line: * * The nth line assigned with. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("line", i18n_pspec("line"), i18n_pspec("The line assigned with"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LINE, param_spec); /** * AgsAudioConnection:mapped-line: * * The nth mapped line assigned with. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("mapped-line", i18n_pspec("mapped line"), i18n_pspec("The mapped line of data object"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAPPED_LINE, param_spec); } void ags_audio_connection_init(AgsAudioConnection *audio_connection) { audio_connection->flags = 0; audio_connection->audio = NULL; audio_connection->channel_type = G_TYPE_NONE; audio_connection->pad = 0; audio_connection->audio_channel = 0; audio_connection->line = 0; audio_connection->mapped_line = 0; } void ags_audio_connection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAudioConnection *audio_connection; audio_connection = AGS_AUDIO_CONNECTION(gobject); switch(prop_id){ case PROP_AUDIO: { GObject *audio; audio = (GObject *) g_value_get_object(value); if(audio_connection->audio == audio){ return; } if(audio_connection->audio != NULL){ g_object_unref(audio_connection->audio); } if(audio != NULL){ g_object_ref(audio); } audio_connection->audio = audio; } break; case PROP_CHANNEL_TYPE: { GType channel_type; audio_connection->channel_type = g_value_get_ulong(value); } break; case PROP_PAD: { audio_connection->pad = g_value_get_uint(value); } break; case PROP_AUDIO_CHANNEL: { audio_connection->audio_channel = g_value_get_uint(value); } break; case PROP_LINE: { audio_connection->line = g_value_get_uint(value); } break; case PROP_MAPPED_LINE: { AgsMessageDelivery *message_delivery; AgsMessageQueue *message_queue; audio_connection->mapped_line = g_value_get_uint(value); /* emit message */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_delivery_find_namespace(message_delivery, "libags-audio"); if(message_queue != NULL){ AgsMessageEnvelope *message; xmlDoc *doc; xmlNode *root_node; /* specify message body */ doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags-command"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "method", "GObject::notify::mapped-line"); /* add message */ message = ags_message_envelope_alloc(audio_connection, NULL, doc); /* set parameter */ message->parameter = g_new0(GParameter, 1); message->n_params = 1; message->parameter[0].name = "mapped-line"; g_value_init(&(message->parameter[0].value), G_TYPE_UINT); g_value_set_uint(&(message->parameter[0].value), audio_connection->mapped_line); /* add message */ ags_message_delivery_add_message(message_delivery, "libags-audio", message); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); } } void ags_audio_connection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAudioConnection *audio_connection; audio_connection = AGS_AUDIO_CONNECTION(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, audio_connection->audio); } break; case PROP_CHANNEL_TYPE: { g_value_set_ulong(value, audio_connection->channel_type); } break; case PROP_PAD: { g_value_set_uint(value, audio_connection->pad); } break; case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, audio_connection->audio_channel); } break; case PROP_LINE: { g_value_set_uint(value, audio_connection->line); } break; case PROP_MAPPED_LINE: { g_value_set_uint(value, audio_connection->mapped_line); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); } } void ags_audio_connection_finalize(GObject *gobject) { AgsAudioConnection *audio_connection; audio_connection = AGS_AUDIO_CONNECTION(gobject); if(audio_connection->audio != NULL){ g_object_unref(audio_connection->audio); } } /** * ags_audio_connection_find: * @list: the #GList-struct containing #AgsAudioConnection * @channel_type: the channel type to match * @pad: the pad to match * @audio_channel: the audio channel to match * * Find the specified audio connection matching @channel_type, @pad and @audio_channel. * * Returns: the first matched #GList-struct, else %NULL if no match * * Since: 1.0.0 */ GList* ags_audio_connection_find(GList *list, GType channel_type, guint pad, guint audio_channel) { while(list != NULL){ pthread_mutex_lock(AGS_CONNECTION(list->data)->mutex); if(AGS_AUDIO_CONNECTION(list->data)->channel_type == channel_type && AGS_AUDIO_CONNECTION(list->data)->pad == pad && AGS_AUDIO_CONNECTION(list->data)->audio_channel == audio_channel){ pthread_mutex_unlock(AGS_CONNECTION(list->data)->mutex); return(list); } pthread_mutex_unlock(AGS_CONNECTION(list->data)->mutex); list = list->next; } return(NULL); } /** * ags_audio_connection_new: * * Creates an #AgsAudioConnection * * Returns: a new #AgsAudioConnection * * Since: 1.0.0 */ AgsAudioConnection* ags_audio_connection_new() { AgsAudioConnection *audio_connection; audio_connection = (AgsAudioConnection *) g_object_new(AGS_TYPE_AUDIO_CONNECTION, NULL); return(audio_connection); } gsequencer-1.4.24/ags/audio/ags_recall_ladspa_run.c0000644000175000017500000003214213247044247017220 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_ladspa_run_class_init(AgsRecallLadspaRunClass *recall_ladspa_run_class); void ags_recall_ladspa_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_ladspa_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_recall_ladspa_run_init(AgsRecallLadspaRun *recall_ladspa_run); void ags_recall_ladspa_run_connect(AgsConnectable *connectable); void ags_recall_ladspa_run_disconnect(AgsConnectable *connectable); void ags_recall_ladspa_run_finalize(GObject *gobject); void ags_recall_ladspa_run_run_init_pre(AgsRecall *recall); void ags_recall_ladspa_run_run_pre(AgsRecall *recall); void ags_recall_ladspa_run_run_inter(AgsRecall *recall); void ags_recall_ladspa_run_load_ports(AgsRecallLadspaRun *recall_ladspa_run); /** * SECTION:ags_recall_ladspa_run * @Short_description: The object interfacing with LADSPA * @Title: AgsRecallLadspaRun * * #AgsRecallLadspaRun provides LADSPA support. */ static gpointer ags_recall_ladspa_run_parent_class = NULL; static AgsConnectableInterface* ags_recall_ladspa_run_parent_connectable_interface; GType ags_recall_ladspa_run_get_type (void) { static GType ags_type_recall_ladspa_run = 0; if(!ags_type_recall_ladspa_run){ static const GTypeInfo ags_recall_ladspa_run_info = { sizeof (AgsRecallLadspaRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_ladspa_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallLadspaRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_ladspa_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_ladspa_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_recall_ladspa_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_ladspa_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsRecallLadspaRun", &ags_recall_ladspa_run_info, 0); g_type_add_interface_static(ags_type_recall_ladspa_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_ladspa_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_recall_ladspa_run); } void ags_recall_ladspa_run_class_init(AgsRecallLadspaRunClass *recall_ladspa_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_ladspa_run_parent_class = g_type_class_peek_parent(recall_ladspa_run); /* GObjectClass */ gobject = (GObjectClass *) recall_ladspa_run; gobject->finalize = ags_recall_ladspa_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) recall_ladspa_run; recall->run_init_pre = ags_recall_ladspa_run_run_init_pre; recall->run_pre = ags_recall_ladspa_run_run_pre; recall->run_inter = ags_recall_ladspa_run_run_inter; } void ags_recall_ladspa_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_ladspa_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_ladspa_run_connect; connectable->disconnect = ags_recall_ladspa_run_disconnect; } void ags_recall_ladspa_run_plugin_interface_init(AgsPluginInterface *plugin) { //TODO:JK: implement me } void ags_recall_ladspa_run_init(AgsRecallLadspaRun *recall_ladspa_run) { recall_ladspa_run->audio_channels = 0; recall_ladspa_run->input = NULL; recall_ladspa_run->output = NULL; } void ags_recall_ladspa_run_connect(AgsConnectable *connectable) { ags_recall_ladspa_run_parent_connectable_interface->connect(connectable); } void ags_recall_ladspa_run_disconnect(AgsConnectable *connectable) { ags_recall_ladspa_run_parent_connectable_interface->disconnect(connectable); } void ags_recall_ladspa_run_finalize(GObject *gobject) { AgsRecallLadspa *recall_ladspa; AgsRecallLadspaRun *recall_ladspa_run; unsigned long i; recall_ladspa_run = AGS_RECALL_LADSPA_RUN(gobject); free(recall_ladspa_run->ladspa_handle); free(recall_ladspa_run->output); free(recall_ladspa_run->input); /* call parent */ G_OBJECT_CLASS(ags_recall_ladspa_run_parent_class)->finalize(gobject); } void ags_recall_ladspa_run_run_init_pre(AgsRecall *recall) { AgsRecallLadspa *recall_ladspa; AgsRecallLadspaRun *recall_ladspa_run; AgsAudioSignal *audio_signal; unsigned long samplerate; unsigned long buffer_size; unsigned long i, i_stop; /* call parent */ AGS_RECALL_CLASS(ags_recall_ladspa_run_parent_class)->run_init_pre(recall); recall_ladspa_run = AGS_RECALL_LADSPA_RUN(recall); recall_ladspa = AGS_RECALL_LADSPA(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); /* set up buffer */ audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall_ladspa_run)->source; /* set up buffer */ samplerate = audio_signal->samplerate; buffer_size = audio_signal->buffer_size; recall_ladspa_run->input = (LADSPA_Data *) malloc(recall_ladspa->input_lines * buffer_size * sizeof(LADSPA_Data)); recall_ladspa_run->output = (LADSPA_Data *) malloc(recall_ladspa->output_lines * buffer_size * sizeof(LADSPA_Data)); recall_ladspa_run->ladspa_handle = (LADSPA_Handle *) malloc(recall_ladspa->input_lines * sizeof(LADSPA_Handle)); if(recall_ladspa->input_lines < recall_ladspa->output_lines){ i_stop = recall_ladspa->output_lines; }else{ i_stop = recall_ladspa->input_lines; } recall_ladspa_run->audio_channels = i_stop; for(i = 0; i < i_stop; i++){ /* instantiate ladspa */ recall_ladspa_run->ladspa_handle[i] = (LADSPA_Handle *) recall_ladspa->plugin_descriptor->instantiate(recall_ladspa->plugin_descriptor, samplerate); #ifdef AGS_DEBUG g_message("instantiate LADSPA handle"); #endif } ags_recall_ladspa_run_load_ports(recall_ladspa_run); /* can't be done in ags_recall_ladspa_run_run_init_inter since possebility of overlapping buffers */ /* connect audio port */ for(i = 0; i < recall_ladspa->input_lines; i++){ recall_ladspa->plugin_descriptor->connect_port(recall_ladspa_run->ladspa_handle[i], recall_ladspa->input_port[i], &(recall_ladspa_run->input[i])); } for(i = 0; i < recall_ladspa->output_lines; i++){ recall_ladspa->plugin_descriptor->connect_port(recall_ladspa_run->ladspa_handle[i], recall_ladspa->output_port[i], &(recall_ladspa_run->output[i])); } for(i = 0; i < i_stop; i++){ if(recall_ladspa->plugin_descriptor->activate != NULL){ recall_ladspa->plugin_descriptor->activate(recall_ladspa_run->ladspa_handle[i]); } #ifdef AGS_DEBUG g_message("instantiate LADSPA handle"); #endif } } void ags_recall_ladspa_run_run_pre(AgsRecall *recall) { //empty } void ags_recall_ladspa_run_run_inter(AgsRecall *recall) { AgsAudioSignal *audio_signal; AgsRecallLadspa *recall_ladspa; AgsRecallLadspaRun *recall_ladspa_run; guint copy_mode_in, copy_mode_out; unsigned long buffer_size; unsigned long i; /* call parent */ AGS_RECALL_CLASS(ags_recall_ladspa_run_parent_class)->run_inter(recall); if(recall->rt_safe && recall->recall_id->recycling_context->parent != NULL && AGS_RECALL_AUDIO_SIGNAL(recall)->source->note == NULL){ return; } recall_ladspa = AGS_RECALL_LADSPA(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); recall_ladspa_run = AGS_RECALL_LADSPA_RUN(recall); audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall)->source; buffer_size = audio_signal->buffer_size; if(audio_signal->stream_current == NULL){ for(i = 0; i < recall_ladspa->input_lines; i++){ /* deactivate */ //TODO:JK: fix-me if(recall_ladspa->plugin_descriptor->deactivate != NULL){ recall_ladspa->plugin_descriptor->deactivate(recall_ladspa_run->ladspa_handle[i]); } recall_ladspa->plugin_descriptor->cleanup(recall_ladspa_run->ladspa_handle[i]); } ags_recall_done(recall); return; } /* get copy mode and clear buffer */ copy_mode_in = ags_audio_buffer_util_get_copy_mode(AGS_AUDIO_BUFFER_UTIL_FLOAT, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); copy_mode_out = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(audio_signal->format), AGS_AUDIO_BUFFER_UTIL_FLOAT); if(recall_ladspa_run->output != NULL){ ags_audio_buffer_util_clear_float(recall_ladspa_run->output, recall_ladspa->output_lines, buffer_size); } if(recall_ladspa_run->input != NULL){ ags_audio_buffer_util_clear_float(recall_ladspa_run->input, recall_ladspa->input_lines, buffer_size); } /* copy data */ if(recall_ladspa_run->input != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(recall_ladspa_run->input, (guint) recall_ladspa->input_lines, 0, audio_signal->stream_current->data, 1, 0, (guint) audio_signal->buffer_size, copy_mode_in); } /* process data */ recall_ladspa->plugin_descriptor->run(recall_ladspa_run->ladspa_handle[0], buffer_size); /* copy data */ if(recall_ladspa_run->output != NULL){ ags_audio_buffer_util_clear_buffer(audio_signal->stream_current->data, 1, buffer_size, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal->stream_current->data, 1, 0, recall_ladspa_run->output, (guint) recall_ladspa->output_lines, 0, (guint) audio_signal->buffer_size, copy_mode_out); } } /** * ags_recall_ladspa_run_load_ports: * @recall_ladspa_run: an #AgsRecallLadspaRun * * Set up LADSPA ports. * * Since: 1.0.0 */ void ags_recall_ladspa_run_load_ports(AgsRecallLadspaRun *recall_ladspa_run) { AgsRecallLadspa *recall_ladspa; AgsLadspaPlugin *ladspa_plugin; AgsPort *current; GList *port; gchar *path; unsigned long port_count; unsigned long i, j, j_stop; LADSPA_Descriptor *plugin_descriptor; LADSPA_PortDescriptor *port_descriptor; recall_ladspa = AGS_RECALL_LADSPA(AGS_RECALL_CHANNEL_RUN(AGS_RECALL(recall_ladspa_run)->parent->parent)->recall_channel); port = AGS_RECALL(recall_ladspa)->port; plugin_descriptor = recall_ladspa->plugin_descriptor; port_count = plugin_descriptor->PortCount; port_descriptor = plugin_descriptor->PortDescriptors; if(recall_ladspa->input_lines < recall_ladspa->output_lines){ j_stop = recall_ladspa->output_lines; }else{ j_stop = recall_ladspa->input_lines; } for(i = 0; i < port_count; i++){ if(LADSPA_IS_PORT_CONTROL(port_descriptor[i])){ if(LADSPA_IS_PORT_INPUT(port_descriptor[i]) || LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ GList *list; LADSPA_Data *port_data; gchar *plugin_name; gchar *specifier; specifier = plugin_descriptor->PortNames[i]; current = NULL; list = port; while(list != NULL){ current = AGS_PORT(port->data); if(!g_strcmp0(specifier, current->specifier)){ break; } list = list->next; } if(current != NULL){ for(j = 0; j < j_stop; j++){ port_data = (LADSPA_Data *) &(current->port_value.ags_port_ladspa); recall_ladspa->plugin_descriptor->connect_port(recall_ladspa_run->ladspa_handle[j], i, port_data); #ifdef AGS_DEBUG g_message("connecting port[%lu]: %lu/%lu", j, i, port_count); #endif } } }else{ g_critical("LADSPA port not found"); } } } } /** * ags_recall_ladspa_run_new: * @audio_signal: the source * * Creates a #AgsRecallLadspaRun * * Returns: a new #AgsRecallLadspaRun * * Since: 1.0.0 */ AgsRecallLadspaRun* ags_recall_ladspa_run_new(AgsAudioSignal *audio_signal) { AgsRecallLadspaRun *recall_ladspa_run; recall_ladspa_run = (AgsRecallLadspaRun *) g_object_new(AGS_TYPE_RECALL_LADSPA_RUN, "source", audio_signal, NULL); return(recall_ladspa_run); } gsequencer-1.4.24/ags/audio/ags_output.c0000644000175000017500000001514013246707333015106 00000000000000/* 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 . */ #include #include #include #include void ags_output_class_init(AgsOutputClass *output_class); void ags_output_connectable_interface_init(AgsConnectableInterface *connectable); void ags_output_init(AgsOutput *output); void ags_output_finalize(GObject *gobject); void ags_output_connect(AgsConnectable *connectable); void ags_output_disconnect(AgsConnectable *connectable); /** * SECTION:ags_output * @short_description: Output of #AgsAudio * @title: AgsOutput * @section_id: * @include: ags/audio/ags_output.h * * #AgsOutput represents an output channel of #AgsAudio. */ static gpointer ags_output_parent_class = NULL; static AgsConnectableInterface *ags_output_parent_connectable_interface; GType ags_output_get_type (void) { static GType ags_type_output = 0; if(!ags_type_output){ static const GTypeInfo ags_output_info = { sizeof (AgsOutputClass), (GBaseInitFunc) NULL, /* base_init */ (GBaseFinalizeFunc) NULL, /* base_finalize */ (GClassInitFunc) ags_output_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsOutput), 0, /* n_preallocs */ (GInstanceInitFunc) ags_output_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_output_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_output = g_type_register_static(AGS_TYPE_CHANNEL, "AgsOutput", &ags_output_info, 0); g_type_add_interface_static(ags_type_output, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_output); } void ags_output_class_init(AgsOutputClass *output) { GObjectClass *gobject; ags_output_parent_class = g_type_class_peek_parent(output); /* GObjectClass */ gobject = (GObjectClass *) output; gobject->finalize = ags_output_finalize; } void ags_output_connectable_interface_init(AgsConnectableInterface *connectable) { AgsConnectableInterface *ags_output_connectable_parent_interface; ags_output_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_output_connect; connectable->disconnect = ags_output_disconnect; } void ags_output_init(AgsOutput *output) { /* empty */ } void ags_output_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_output_parent_class)->finalize(gobject); } void ags_output_connect(AgsConnectable *connectable) { ags_output_parent_connectable_interface->connect(connectable); } void ags_output_disconnect(AgsConnectable *connectable) { ags_output_parent_connectable_interface->disconnect(connectable); } /** * ags_output_map_audio_signal: * @output: an #AgsOutput * @recall_id: the assigned #AgsRecallID * * Maps audio signal and assigning it to recall id. * * Returns: a new #GList containing #AgsAudioSignal * * Since: 1.0.0 */ GList* ags_output_map_audio_signal(AgsOutput *output, AgsRecallID *recall_id) { AgsAudioSignal *audio_signal; GObject *soundcard; GList *list_destination; if(output != NULL){ soundcard = AGS_CHANNEL(output)->soundcard; list_destination = g_list_alloc(); goto ags_copy_pattern_map_destination0; }else{ return(NULL); } while(output != NULL){ list_destination->next = g_list_alloc(); list_destination->next->prev = list_destination; list_destination = list_destination->next; ags_copy_pattern_map_destination0: g_message("ags_output_map_audio_signal\n"); audio_signal = ags_audio_signal_new((GObject *) soundcard, (GObject *) output->channel.first_recycling, (GObject *) recall_id); ags_connectable_connect(AGS_CONNECTABLE(audio_signal)); ags_recycling_add_audio_signal(output->channel.first_recycling, audio_signal); audio_signal->stream_current = audio_signal->stream_beginning; list_destination->data = (gpointer) audio_signal; output = (AgsOutput *) output->channel.next_pad; } return(list_destination); } /** * ags_output_find_first_input_recycling: * @output: an #AgsOutput * * Retrieve first input recycling. * * Returns: the first #AgsRecycling of #AgsAudio * * Since: 1.0.0 */ AgsRecycling* ags_output_find_first_input_recycling(AgsOutput *output) { AgsAudio *audio; AgsChannel *input; if(output == NULL) return(NULL); audio = AGS_AUDIO(AGS_CHANNEL(output)->audio); if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){ input = ags_channel_nth(audio->input, AGS_CHANNEL(output)->audio_channel); input = ags_channel_first_with_recycling(input); }else{ input = ags_channel_nth(audio->input, AGS_CHANNEL(output)->line); } if(input != NULL){ return(input->first_recycling); }else{ return(NULL); } } /** * ags_output_find_last_input_recycling: * @output: an #AgsOutput * * Retrieve last input recycling. * * Returns: the last #AgsRecycling of #AgsAudio * * Since: 1.0.0 */ AgsRecycling* ags_output_find_last_input_recycling(AgsOutput *output) { AgsAudio *audio; AgsChannel *input; if(output == NULL) return(NULL); audio = AGS_AUDIO(AGS_CHANNEL(output)->audio); if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){ input = ags_channel_nth(audio->input, AGS_CHANNEL(output)->audio_channel); input = ags_channel_last_with_recycling(input); }else{ input = ags_channel_nth(audio->input, AGS_CHANNEL(output)->line); } if(input != NULL){ return(input->last_recycling); }else{ return(NULL); } } /** * ags_output_new: * @audio: the #AgsAudio * * Creates an #AgsOutput, linking tree to @audio. * * Returns: a new #AgsOutput * * Since: 1.0.0 */ AgsOutput* ags_output_new(GObject *audio) { AgsOutput *output; output = (AgsOutput *) g_object_new(AGS_TYPE_OUTPUT, "audio", audio, NULL); return(output); } gsequencer-1.4.24/ags/audio/ags_playback.h0000644000175000017500000001070313256163135015336 00000000000000/* 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 . */ #ifndef __AGS_PLAYBACK_H__ #define __AGS_PLAYBACK_H__ #include #include #include #include #define AGS_TYPE_PLAYBACK (ags_playback_get_type()) #define AGS_PLAYBACK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAYBACK, AgsPlayback)) #define AGS_PLAYBACK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_PLAYBACK, AgsPlayback)) #define AGS_IS_PLAYBACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_PLAYBACK)) #define AGS_IS_PLAYBACK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_PLAYBACK)) #define AGS_PLAYBACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_PLAYBACK, AgsPlaybackClass)) typedef struct _AgsPlayback AgsPlayback; typedef struct _AgsPlaybackClass AgsPlaybackClass; /** * AgsPlaybackFlags: * @AGS_PLAYBACK_CONNECTED: indicates the playback was connected by calling #AgsConnectable::connect() * @AGS_PLAYBACK_DONE: done doing playback * @AGS_PLAYBACK_REMOVE: does remove playback * @AGS_PLAYBACK_CHANNEL: play channel * @AGS_PLAYBACK_PAD: play pad * @AGS_PLAYBACK_AUDIO: play audio * @AGS_PLAYBACK_PLAYBACK: do playback * @AGS_PLAYBACK_SEQUENCER: do sequencer * @AGS_PLAYBACK_NOTATION: do notation * @AGS_PLAYBACK_SINGLE_THREADED: single threaded * @AGS_PLAYBACK_SUPER_THREADED_CHANNEL: super threaded channel * @AGS_PLAYBACK_SUPER_THREADED_RECYCLING: super threaded recycling * * Enum values to control the behavior or indicate internal state of #AgsPlayback by * enable/disable as flags. */ typedef enum{ AGS_PLAYBACK_CONNECTED = 1, AGS_PLAYBACK_DONE = 1 << 1, AGS_PLAYBACK_REMOVE = 1 << 2, AGS_PLAYBACK_CHANNEL = 1 << 3, AGS_PLAYBACK_PAD = 1 << 4, AGS_PLAYBACK_AUDIO = 1 << 5, AGS_PLAYBACK_PLAYBACK = 1 << 6, AGS_PLAYBACK_SEQUENCER = 1 << 7, AGS_PLAYBACK_NOTATION = 1 << 8, AGS_PLAYBACK_SINGLE_THREADED = 1 << 9, AGS_PLAYBACK_SUPER_THREADED_CHANNEL = 1 << 10, AGS_PLAYBACK_SUPER_THREADED_RECYCLING = 1 << 11, }AgsPlaybackFlags; typedef enum{ AGS_PLAYBACK_SCOPE_PLAYBACK, AGS_PLAYBACK_SCOPE_SEQUENCER, AGS_PLAYBACK_SCOPE_NOTATION, }AgsPlaybackScope; struct _AgsPlayback { GObject gobject; volatile guint flags; GObject *playback_domain; GObject *source; guint audio_channel; GObject *play_note; AgsThread **channel_thread; AgsThread **iterator_thread; AgsThread **recycling_thread; AgsRecallID **recall_id; }; struct _AgsPlaybackClass { GObjectClass gobject; }; GType ags_playback_get_type(); /* get and set */ void ags_playback_set_channel_thread(AgsPlayback *playback, AgsThread *thread, guint scope); AgsThread* ags_playback_get_channel_thread(AgsPlayback *playback, guint scope); void ags_playback_set_iterator_thread(AgsPlayback *playback, AgsThread *thread, guint scope); AgsThread* ags_playback_get_iterator_thread(AgsPlayback *playback, guint scope); void ags_playback_set_recycling_thread(AgsPlayback *playback, AgsThread *thread, guint scope); AgsThread* ags_playback_get_recycling_thread(AgsPlayback *playback, guint scope); void ags_playback_set_recall_id(AgsPlayback *playback, AgsRecallID *recall_id, guint scope); AgsRecallID* ags_playback_get_recall_id(AgsPlayback *playback, guint scope); /* find */ AgsPlayback* ags_playback_find_source(GList *playback, GObject *source); /* instance */ AgsPlayback* ags_playback_new(); #endif /*__AGS_PLAYBACK_H__*/ gsequencer-1.4.24/ags/audio/ags_fifoout.c0000644000175000017500000012251713246707333015230 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_fifoout_class_init(AgsFifooutClass *fifoout); void ags_fifoout_connectable_interface_init(AgsConnectableInterface *connectable); void ags_fifoout_soundcard_interface_init(AgsSoundcardInterface *soundcard); void ags_fifoout_concurrent_tree_interface_init(AgsConcurrentTreeInterface *concurrent_tree); void ags_fifoout_init(AgsFifoout *fifoout); void ags_fifoout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_fifoout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_fifoout_disconnect(AgsConnectable *connectable); void ags_fifoout_connect(AgsConnectable *connectable); pthread_mutex_t* ags_fifoout_get_lock(AgsConcurrentTree *concurrent_tree); pthread_mutex_t* ags_fifoout_get_parent_lock(AgsConcurrentTree *concurrent_tree); void ags_fifoout_finalize(GObject *gobject); void ags_fifoout_switch_buffer_flag(AgsFifoout *fifoout); void ags_fifoout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* ags_fifoout_get_application_context(AgsSoundcard *soundcard); void ags_fifoout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_fifoout_get_application_mutex(AgsSoundcard *soundcard); void ags_fifoout_set_device(AgsSoundcard *soundcard, gchar *device); gchar* ags_fifoout_get_device(AgsSoundcard *soundcard); void ags_fifoout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void ags_fifoout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void ags_fifoout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name); void ags_fifoout_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); GList* ags_fifoout_get_poll_fd(AgsSoundcard *soundcard); gboolean ags_fifoout_is_available(AgsSoundcard *soundcard); gboolean ags_fifoout_is_starting(AgsSoundcard *soundcard); gboolean ags_fifoout_is_playing(AgsSoundcard *soundcard); gchar* ags_fifoout_get_uptime(AgsSoundcard *soundcard); void ags_fifoout_fifo_init(AgsSoundcard *soundcard, GError **error); void ags_fifoout_fifo_play(AgsSoundcard *soundcard, GError **error); void ags_fifoout_fifo_free(AgsSoundcard *soundcard); void ags_fifoout_tic(AgsSoundcard *soundcard); void ags_fifoout_offset_changed(AgsSoundcard *soundcard, guint note_offset); void ags_fifoout_set_bpm(AgsSoundcard *soundcard, gdouble bpm); gdouble ags_fifoout_get_bpm(AgsSoundcard *soundcard); void ags_fifoout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor); gdouble ags_fifoout_get_delay_factor(AgsSoundcard *soundcard); gdouble ags_fifoout_get_delay(AgsSoundcard *soundcard); guint ags_fifoout_get_attack(AgsSoundcard *soundcard); void* ags_fifoout_get_buffer(AgsSoundcard *soundcard); void* ags_fifoout_get_next_buffer(AgsSoundcard *soundcard); guint ags_fifoout_get_delay_counter(AgsSoundcard *soundcard); void ags_fifoout_set_note_offset(AgsSoundcard *soundcard, guint note_offset); guint ags_fifoout_get_note_offset(AgsSoundcard *soundcard); void ags_fifoout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void ags_fifoout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint ags_fifoout_get_loop_offset(AgsSoundcard *soundcard); void ags_fifoout_set_audio(AgsSoundcard *soundcard, GList *audio); GList* ags_fifoout_get_audio(AgsSoundcard *soundcard); /** * SECTION:ags_fifoout * @short_description: Output to soundcard * @title: AgsFifoout * @section_id: * @include: ags/audio/ags_fifoout.h * * #AgsFifoout represents a soundcard and supports output. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_DSP_CHANNELS, PROP_PCM_CHANNELS, PROP_FORMAT, PROP_BUFFER_SIZE, PROP_SAMPLERATE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, }; enum{ LAST_SIGNAL, }; static gpointer ags_fifoout_parent_class = NULL; static guint fifoout_signals[LAST_SIGNAL]; GType ags_fifoout_get_type (void) { static GType ags_type_fifoout = 0; if(!ags_type_fifoout){ static const GTypeInfo ags_fifoout_info = { sizeof (AgsFifooutClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_fifoout_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFifoout), 0, /* n_preallocs */ (GInstanceInitFunc) ags_fifoout_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_fifoout_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_soundcard_interface_info = { (GInterfaceInitFunc) ags_fifoout_soundcard_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_concurrent_tree_interface_info = { (GInterfaceInitFunc) ags_fifoout_concurrent_tree_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_fifoout = g_type_register_static(G_TYPE_OBJECT, "AgsFifoout", &ags_fifoout_info, 0); g_type_add_interface_static(ags_type_fifoout, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_fifoout, AGS_TYPE_SOUNDCARD, &ags_soundcard_interface_info); g_type_add_interface_static(ags_type_fifoout, AGS_TYPE_CONCURRENT_TREE, &ags_concurrent_tree_interface_info); } return (ags_type_fifoout); } void ags_fifoout_class_init(AgsFifooutClass *fifoout) { GObjectClass *gobject; GParamSpec *param_spec; ags_fifoout_parent_class = g_type_class_peek_parent(fifoout); /* GObjectClass */ gobject = (GObjectClass *) fifoout; gobject->set_property = ags_fifoout_set_property; gobject->get_property = ags_fifoout_get_property; gobject->finalize = ags_fifoout_finalize; /* properties */ /** * AgsFifoout:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsFifoout:application-mutex: * * The assigned application mutex * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsFifoout:device: * * The fifo soundcard indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "hw:0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsFifoout:dsp-channels: * * The dsp channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("dsp-channels", i18n_pspec("count of DSP channels"), i18n_pspec("The count of DSP channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DSP_CHANNELS, param_spec); /** * AgsFifoout:pcm-channels: * * The pcm channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pcm-channels", i18n_pspec("count of PCM channels"), i18n_pspec("The count of PCM channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PCM_CHANNELS, param_spec); /* * TODO:JK: add support for other quality than 16 bit */ /** * AgsFifoout:format: * * The precision of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("precision of buffer"), i18n_pspec("The precision to use for a frame"), 1, 64, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsFifoout:buffer-size: * * The buffer size * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("frame count of a buffer"), i18n_pspec("The count of frames a buffer contains"), 1, 44100, AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsFifoout:samplerate: * * The samplerate * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("frames per second"), i18n_pspec("The frames count played during a second"), 8000, 96000, 44100, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsFifoout:buffer: * * The buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to play"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsFifoout:bpm: * * Beats per minute * * Since: 1.0.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsFifoout:delay-factor: * * tact * * Since: 1.0.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsFifoout:attack: * * Attack of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /* AgsFifooutClass */ } GQuark ags_fifoout_error_quark() { return(g_quark_from_static_string("ags-fifoout-error-quark")); } void ags_fifoout_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_fifoout_connect; connectable->disconnect = ags_fifoout_disconnect; } void ags_fifoout_concurrent_tree_interface_init(AgsConcurrentTreeInterface *concurrent_tree) { concurrent_tree->get_lock = ags_fifoout_get_lock; concurrent_tree->get_parent_lock = ags_fifoout_get_parent_lock; } void ags_fifoout_soundcard_interface_init(AgsSoundcardInterface *soundcard) { soundcard->set_application_context = ags_fifoout_set_application_context; soundcard->get_application_context = ags_fifoout_get_application_context; soundcard->set_application_mutex = ags_fifoout_set_application_mutex; soundcard->get_application_mutex = ags_fifoout_get_application_mutex; soundcard->set_device = ags_fifoout_set_device; soundcard->get_device = ags_fifoout_get_device; soundcard->set_presets = ags_fifoout_set_presets; soundcard->get_presets = ags_fifoout_get_presets; soundcard->list_cards = ags_fifoout_list_cards; soundcard->pcm_info = ags_fifoout_pcm_info; soundcard->get_poll_fd = ags_fifoout_get_poll_fd; soundcard->is_available = ags_fifoout_is_available; soundcard->is_starting = ags_fifoout_is_starting; soundcard->is_playing = ags_fifoout_is_playing; soundcard->is_recording = NULL; soundcard->get_uptime = ags_fifoout_get_uptime; soundcard->play_init = ags_fifoout_fifo_init; soundcard->play = ags_fifoout_fifo_play; soundcard->record_init = NULL; soundcard->record = NULL; soundcard->stop = ags_fifoout_fifo_free; soundcard->tic = ags_fifoout_tic; soundcard->offset_changed = ags_fifoout_offset_changed; soundcard->set_bpm = ags_fifoout_set_bpm; soundcard->get_bpm = ags_fifoout_get_bpm; soundcard->set_delay_factor = ags_fifoout_set_delay_factor; soundcard->get_delay_factor = ags_fifoout_get_delay_factor; soundcard->get_delay = ags_fifoout_get_delay; soundcard->get_attack = ags_fifoout_get_attack; soundcard->get_buffer = ags_fifoout_get_buffer; soundcard->get_next_buffer = ags_fifoout_get_next_buffer; soundcard->get_delay_counter = ags_fifoout_get_delay_counter; soundcard->set_note_offset = ags_fifoout_set_note_offset; soundcard->get_note_offset = ags_fifoout_get_note_offset; soundcard->set_loop = ags_fifoout_set_loop; soundcard->get_loop = ags_fifoout_get_loop; soundcard->get_loop_offset = ags_fifoout_get_loop_offset; soundcard->set_audio = ags_fifoout_set_audio; soundcard->get_audio = ags_fifoout_get_audio; } void ags_fifoout_init(AgsFifoout *fifoout) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert fifoout mutex */ //FIXME:JK: memory leak attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) fifoout, mutex); pthread_mutex_unlock(application_mutex); /* flags */ config = ags_config_get_instance(); /* quality */ fifoout->dsp_channels = AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS; fifoout->pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; fifoout->format = AGS_SOUNDCARD_SIGNED_16_BIT; fifoout->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; fifoout->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; /* read config */ /* dsp channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "dsp-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "dsp-channels"); } if(str != NULL){ fifoout->dsp_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ fifoout->pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ fifoout->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ fifoout->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ fifoout->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* */ fifoout->device = NULL; fifoout->fifo_fd = -1; /* buffer */ fifoout->buffer = (void **) malloc(4 * sizeof(void*)); fifoout->buffer[0] = NULL; fifoout->buffer[1] = NULL; fifoout->buffer[2] = NULL; fifoout->buffer[3] = NULL; fifoout->ring_buffer = NULL; ags_fifoout_realloc_buffer(fifoout); /* bpm */ fifoout->bpm = AGS_SOUNDCARD_DEFAULT_BPM; /* delay factor */ fifoout->delay_factor = AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR; /* delay and attack */ fifoout->delay = (gdouble *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(gdouble)); fifoout->attack = (guint *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(guint)); ags_fifoout_adjust_delay_and_attack(fifoout); /* counters */ fifoout->tact_counter = 0.0; fifoout->delay_counter = 0; fifoout->tic_counter = 0; fifoout->note_offset = 0; fifoout->loop_left = AGS_SOUNDCARD_DEFAULT_LOOP_LEFT; fifoout->loop_right = AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT; fifoout->do_loop = FALSE; fifoout->loop_offset = 0; /* parent */ fifoout->application_context = NULL; fifoout->application_mutex = NULL; fifoout->poll_fd = NULL; /* all AgsAudio */ fifoout->audio = NULL; } void ags_fifoout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = g_value_get_object(value); if(fifoout->application_context == (GObject *) application_context){ return; } if(fifoout->application_context != NULL){ g_object_unref(G_OBJECT(fifoout->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *str; gchar *segmentation; guint discriminante, nominante; g_object_ref(G_OBJECT(application_context)); fifoout->application_mutex = application_context->mutex; config = ags_config_get_instance(); /* segmentation */ segmentation = ags_config_get_value(config, AGS_CONFIG_GENERIC, "segmentation"); if(segmentation != NULL){ sscanf(segmentation, "%d/%d", &discriminante, &nominante); fifoout->delay_factor = 1.0 / nominante * (nominante / discriminante); g_free(segmentation); } ags_fifoout_adjust_delay_and_attack(fifoout); ags_fifoout_realloc_buffer(fifoout); }else{ fifoout->application_mutex = NULL; } fifoout->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(fifoout->application_mutex == application_mutex){ return; } fifoout->application_mutex = application_mutex; } case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); fifoout->device = g_strdup(device); } break; case PROP_DSP_CHANNELS: { guint dsp_channels; dsp_channels = g_value_get_uint(value); if(dsp_channels == fifoout->dsp_channels){ return; } fifoout->dsp_channels = dsp_channels; } break; case PROP_PCM_CHANNELS: { guint pcm_channels; pcm_channels = g_value_get_uint(value); if(pcm_channels == fifoout->pcm_channels){ return; } fifoout->pcm_channels = pcm_channels; ags_fifoout_realloc_buffer(fifoout); } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); if(format == fifoout->format){ return; } fifoout->format = format; ags_fifoout_realloc_buffer(fifoout); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); if(buffer_size == fifoout->buffer_size){ return; } fifoout->buffer_size = buffer_size; ags_fifoout_realloc_buffer(fifoout); ags_fifoout_adjust_delay_and_attack(fifoout); } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); if(samplerate == fifoout->samplerate){ return; } fifoout->samplerate = samplerate; ags_fifoout_adjust_delay_and_attack(fifoout); } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); fifoout->bpm = bpm; ags_fifoout_adjust_delay_and_attack(fifoout); } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); fifoout->delay_factor = delay_factor; ags_fifoout_adjust_delay_and_attack(fifoout); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_fifoout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, fifoout->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, fifoout->application_mutex); } break; case PROP_DEVICE: { g_value_set_string(value, fifoout->device); } break; case PROP_DSP_CHANNELS: { g_value_set_uint(value, fifoout->dsp_channels); } break; case PROP_PCM_CHANNELS: { g_value_set_uint(value, fifoout->pcm_channels); } break; case PROP_FORMAT: { g_value_set_uint(value, fifoout->format); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, fifoout->buffer_size); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, fifoout->samplerate); } break; case PROP_BUFFER: { g_value_set_pointer(value, fifoout->buffer); } break; case PROP_BPM: { g_value_set_double(value, fifoout->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, fifoout->delay_factor); } break; case PROP_ATTACK: { g_value_set_pointer(value, fifoout->attack); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } pthread_mutex_t* ags_fifoout_get_lock(AgsConcurrentTree *concurrent_tree) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *fifoout_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); fifoout_mutex = ags_mutex_manager_lookup(mutex_manager, G_OBJECT(concurrent_tree)); pthread_mutex_unlock(application_mutex); return(fifoout_mutex); } pthread_mutex_t* ags_fifoout_get_parent_lock(AgsConcurrentTree *concurrent_tree) { return(NULL); } void ags_fifoout_finalize(GObject *gobject) { AgsFifoout *fifoout; AgsMutexManager *mutex_manager; GList *list, *list_next; fifoout = AGS_FIFOOUT(gobject); /* remove fifoout mutex */ pthread_mutex_lock(fifoout->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(fifoout->application_mutex); /* free output buffer */ free(fifoout->buffer[0]); free(fifoout->buffer[1]); free(fifoout->buffer[2]); free(fifoout->buffer[3]); /* free buffer array */ free(fifoout->buffer); /* free AgsAttack */ free(fifoout->attack); if(fifoout->audio != NULL){ g_list_free_full(fifoout->audio, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_fifoout_parent_class)->finalize(gobject); } void ags_fifoout_connect(AgsConnectable *connectable) { AgsFifoout *fifoout; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *mutex; pthread_mutexattr_t attr; fifoout = AGS_FIFOOUT(connectable); /* create fifoout mutex */ //FIXME:JK: memory leak pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, &attr); /* insert mutex */ pthread_mutex_lock(fifoout->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_insert(mutex_manager, (GObject *) fifoout, mutex); pthread_mutex_unlock(fifoout->application_mutex); /* */ list = fifoout->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_fifoout_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_fifoout_switch_buffer_flag: * @fifoout: an #AgsFifoout * * The buffer flag indicates the currently played buffer. * * Since: 1.0.0 */ void ags_fifoout_switch_buffer_flag(AgsFifoout *fifoout) { AgsApplicationContext *application_context; AgsMutexManager *mutex_manager; pthread_mutex_t *mutex; application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(fifoout)); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) fifoout); pthread_mutex_unlock(application_context->mutex); // g_message("switch - 0x%0x", ((AGS_FIFOOUT_BUFFER0 | // AGS_FIFOOUT_BUFFER1 | // AGS_FIFOOUT_BUFFER2 | // AGS_FIFOOUT_BUFFER3) & (fifoout->flags))); /* switch buffer flag */ pthread_mutex_lock(mutex); if((AGS_FIFOOUT_BUFFER0 & (fifoout->flags)) != 0){ fifoout->flags &= (~AGS_FIFOOUT_BUFFER0); fifoout->flags |= AGS_FIFOOUT_BUFFER1; }else if((AGS_FIFOOUT_BUFFER1 & (fifoout->flags)) != 0){ fifoout->flags &= (~AGS_FIFOOUT_BUFFER1); fifoout->flags |= AGS_FIFOOUT_BUFFER2; }else if((AGS_FIFOOUT_BUFFER2 & (fifoout->flags)) != 0){ fifoout->flags &= (~AGS_FIFOOUT_BUFFER2); fifoout->flags |= AGS_FIFOOUT_BUFFER3; }else if((AGS_FIFOOUT_BUFFER3 & (fifoout->flags)) != 0){ fifoout->flags &= (~AGS_FIFOOUT_BUFFER3); fifoout->flags |= AGS_FIFOOUT_BUFFER0; } pthread_mutex_unlock(mutex); } void ags_fifoout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); fifoout->application_context = (GObject *) application_context; } AgsApplicationContext* ags_fifoout_get_application_context(AgsSoundcard *soundcard) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); return((AgsApplicationContext *) fifoout->application_context); } void ags_fifoout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); fifoout->application_mutex = application_mutex; } pthread_mutex_t* ags_fifoout_get_application_mutex(AgsSoundcard *soundcard) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); return(fifoout->application_mutex); } void ags_fifoout_set_device(AgsSoundcard *soundcard, gchar *device) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); fifoout->device = g_strdup(device); } gchar* ags_fifoout_get_device(AgsSoundcard *soundcard) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); return(fifoout->device); } void ags_fifoout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); g_object_set(fifoout, "pcm-channels", channels, "samplerate", rate, "buffer-size", buffer_size, "format", format, NULL); } void ags_fifoout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); if(channels != NULL){ *channels = fifoout->pcm_channels; } if(rate != NULL){ *rate = fifoout->samplerate; } if(buffer_size != NULL){ *buffer_size = fifoout->buffer_size; } if(format != NULL){ *format = fifoout->format; } } /** * ags_fifoout_list_cards: * @soundcard: the #AgsSoundcard * @card_id: identifier * @card_name: card name * * List available soundcards. * * Since: 1.0.0 */ void ags_fifoout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } //TODO:JK: implement me if(card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL){ *card_name = g_list_reverse(*card_name); } } void ags_fifoout_pcm_info(AgsSoundcard *soundcard, char *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); //TODO:JK: implement me } GList* ags_fifoout_get_poll_fd(AgsSoundcard *soundcard) { AgsFifoout *fifoout; GList *list; fifoout = AGS_FIFOOUT(soundcard); list = NULL; //TODO:JK: implement me return(list); } gboolean ags_fifoout_is_available(AgsSoundcard *soundcard) { AgsFifoout *fifoout; //TODO:JK: implement me return(TRUE); } gboolean ags_fifoout_is_starting(AgsSoundcard *soundcard) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); return(((AGS_FIFOOUT_START_PLAY & (fifoout->flags)) != 0) ? TRUE: FALSE); } gboolean ags_fifoout_is_playing(AgsSoundcard *soundcard) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); return(((AGS_FIFOOUT_PLAY & (fifoout->flags)) != 0) ? TRUE: FALSE); } gchar* ags_fifoout_get_uptime(AgsSoundcard *soundcard) { gchar *uptime; if(ags_soundcard_is_playing(soundcard)){ guint samplerate; guint buffer_size; guint note_offset; gdouble bpm; gdouble delay_factor; gdouble delay; ags_soundcard_get_presets(soundcard, NULL, &samplerate, &buffer_size, NULL); note_offset = ags_soundcard_get_note_offset(soundcard); bpm = ags_soundcard_get_bpm(soundcard); delay_factor = ags_soundcard_get_delay_factor(soundcard); /* calculate delays */ delay = ((gdouble) samplerate / (gdouble) buffer_size) * (gdouble)(60.0 / bpm) * delay_factor; uptime = ags_time_get_uptime_from_offset(note_offset, bpm, delay, delay_factor); }else{ uptime = g_strdup(AGS_TIME_ZERO); } return(uptime); } void ags_fifoout_fifo_init(AgsSoundcard *soundcard, GError **error) { //TODO:JK: implement me } void ags_fifoout_fifo_play(AgsSoundcard *soundcard, GError **error) { //TODO:JK: implement me } void ags_fifoout_fifo_free(AgsSoundcard *soundcard) { //TODO:JK: implement me } void ags_fifoout_tic(AgsSoundcard *soundcard) { AgsFifoout *fifoout; gdouble delay; fifoout = AGS_FIFOOUT(soundcard); /* determine if attack should be switched */ delay = fifoout->delay[fifoout->tic_counter]; fifoout->delay_counter += 1.0; if(fifoout->delay_counter >= delay){ ags_soundcard_set_note_offset(soundcard, fifoout->note_offset + 1); /* delay */ ags_soundcard_offset_changed(soundcard, fifoout->note_offset); /* reset - delay counter */ fifoout->delay_counter = 0.0; fifoout->tact_counter += 1.0; } } void ags_fifoout_offset_changed(AgsSoundcard *soundcard, guint note_offset) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); fifoout->tic_counter += 1; if(fifoout->tic_counter == AGS_SOUNDCARD_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ fifoout->tic_counter = 0; } } void ags_fifoout_set_bpm(AgsSoundcard *soundcard, gdouble bpm) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); fifoout->bpm = bpm; ags_fifoout_adjust_delay_and_attack(fifoout); } gdouble ags_fifoout_get_bpm(AgsSoundcard *soundcard) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); return(fifoout->bpm); } void ags_fifoout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); fifoout->delay_factor = delay_factor; ags_fifoout_adjust_delay_and_attack(fifoout); } gdouble ags_fifoout_get_delay_factor(AgsSoundcard *soundcard) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); return(fifoout->delay_factor); } gdouble ags_fifoout_get_delay(AgsSoundcard *soundcard) { AgsFifoout *fifoout; guint index; fifoout = AGS_FIFOOUT(soundcard); index = fifoout->tic_counter; return(fifoout->delay[index]); } guint ags_fifoout_get_attack(AgsSoundcard *soundcard) { AgsFifoout *fifoout; guint index; fifoout = AGS_FIFOOUT(soundcard); index = fifoout->tic_counter; return(fifoout->attack[index]); } void* ags_fifoout_get_buffer(AgsSoundcard *soundcard) { AgsFifoout *fifoout; signed short *buffer; fifoout = AGS_FIFOOUT(soundcard); if((AGS_FIFOOUT_BUFFER0 & (fifoout->flags)) != 0){ buffer = fifoout->buffer[0]; }else if((AGS_FIFOOUT_BUFFER1 & (fifoout->flags)) != 0){ buffer = fifoout->buffer[1]; }else if((AGS_FIFOOUT_BUFFER2 & (fifoout->flags)) != 0){ buffer = fifoout->buffer[2]; }else if((AGS_FIFOOUT_BUFFER3 & (fifoout->flags)) != 0){ buffer = fifoout->buffer[3]; }else{ buffer = NULL; } return(buffer); } void* ags_fifoout_get_next_buffer(AgsSoundcard *soundcard) { AgsFifoout *fifoout; signed short *buffer; fifoout = AGS_FIFOOUT(soundcard); // g_message("next - 0x%0x", ((AGS_FIFOOUT_BUFFER0 | // AGS_FIFOOUT_BUFFER1 | // AGS_FIFOOUT_BUFFER2 | // AGS_FIFOOUT_BUFFER3) & (fifoout->flags))); if((AGS_FIFOOUT_BUFFER0 & (fifoout->flags)) != 0){ buffer = fifoout->buffer[1]; }else if((AGS_FIFOOUT_BUFFER1 & (fifoout->flags)) != 0){ buffer = fifoout->buffer[2]; }else if((AGS_FIFOOUT_BUFFER2 & (fifoout->flags)) != 0){ buffer = fifoout->buffer[3]; }else if((AGS_FIFOOUT_BUFFER3 & (fifoout->flags)) != 0){ buffer = fifoout->buffer[0]; }else{ buffer = NULL; } return(buffer); } guint ags_fifoout_get_delay_counter(AgsSoundcard *soundcard) { return(AGS_FIFOOUT(soundcard)->delay_counter); } void ags_fifoout_set_note_offset(AgsSoundcard *soundcard, guint note_offset) { AGS_FIFOOUT(soundcard)->note_offset = note_offset; } guint ags_fifoout_get_note_offset(AgsSoundcard *soundcard) { return(AGS_FIFOOUT(soundcard)->note_offset); } void ags_fifoout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop) { AGS_FIFOOUT(soundcard)->loop_left = loop_left; AGS_FIFOOUT(soundcard)->loop_right = loop_right; AGS_FIFOOUT(soundcard)->do_loop = do_loop; if(do_loop){ AGS_FIFOOUT(soundcard)->loop_offset = AGS_FIFOOUT(soundcard)->note_offset; } } void ags_fifoout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop) { if(loop_left != NULL){ *loop_left = AGS_FIFOOUT(soundcard)->loop_left; } if(loop_right != NULL){ *loop_right = AGS_FIFOOUT(soundcard)->loop_right; } if(do_loop != NULL){ *do_loop = AGS_FIFOOUT(soundcard)->do_loop; } } guint ags_fifoout_get_loop_offset(AgsSoundcard *soundcard) { return(AGS_FIFOOUT(soundcard)->loop_offset); } void ags_fifoout_set_audio(AgsSoundcard *soundcard, GList *audio) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); fifoout->audio = audio; } GList* ags_fifoout_get_audio(AgsSoundcard *soundcard) { AgsFifoout *fifoout; fifoout = AGS_FIFOOUT(soundcard); return(fifoout->audio); } /** * ags_fifoout_adjust_delay_and_attack: * @fifoout: the #AgsFifoout * * Calculate delay and attack and reset it. * * Since: 1.0.0 */ void ags_fifoout_adjust_delay_and_attack(AgsFifoout *fifoout) { gdouble delay; guint default_tact_frames; guint default_period; guint i; if(fifoout == NULL){ return; } delay = (60.0 * (((gdouble) fifoout->samplerate / (gdouble) fifoout->buffer_size) / (gdouble) fifoout->bpm) * ((1.0 / 16.0) * (1.0 / (gdouble) fifoout->delay_factor))); #ifdef AGS_DEBUG g_message("delay : %f", delay); #endif default_tact_frames = (guint) (delay * fifoout->buffer_size); default_period = (1.0 / AGS_SOUNDCARD_DEFAULT_PERIOD) * (default_tact_frames); fifoout->attack[0] = 0; fifoout->delay[0] = delay; for(i = 1; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD; i++){ fifoout->attack[i] = (guint) ((i * default_tact_frames + fifoout->attack[i - 1]) / (AGS_SOUNDCARD_DEFAULT_PERIOD / (delay * i))) % (guint) (fifoout->buffer_size); #ifdef AGS_DEBUG g_message("%d", fifoout->attack[i]); #endif } for(i = 1; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD; i++){ fifoout->delay[i] = ((gdouble) (default_tact_frames + fifoout->attack[i])) / (gdouble) fifoout->buffer_size; #ifdef AGS_DEBUG g_message("%f", fifoout->delay[i]); #endif } } /** * ags_fifoout_realloc_buffer: * @fifoout: the #AgsFifoout * * Reallocate the internal audio buffer. * * Since: 1.0.0 */ void ags_fifoout_realloc_buffer(AgsFifoout *fifoout) { guint word_size; if(fifoout == NULL){ return; } switch(fifoout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_fifoout_realloc_buffer(): unsupported word size"); return; } /* AGS_FIFOOUT_BUFFER_0 */ if(fifoout->buffer[0] != NULL){ free(fifoout->buffer[0]); } fifoout->buffer[0] = (void *) malloc(fifoout->pcm_channels * fifoout->buffer_size * word_size); /* AGS_FIFOOUT_BUFFER_1 */ if(fifoout->buffer[1] != NULL){ free(fifoout->buffer[1]); } fifoout->buffer[1] = (void *) malloc(fifoout->pcm_channels * fifoout->buffer_size * word_size); /* AGS_FIFOOUT_BUFFER_2 */ if(fifoout->buffer[2] != NULL){ free(fifoout->buffer[2]); } fifoout->buffer[2] = (void *) malloc(fifoout->pcm_channels * fifoout->buffer_size * word_size); /* AGS_FIFOOUT_BUFFER_3 */ if(fifoout->buffer[3] != NULL){ free(fifoout->buffer[3]); } fifoout->buffer[3] = (void *) malloc(fifoout->pcm_channels * fifoout->buffer_size * word_size); } /** * ags_fifoout_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsFifoout, refering to @application_context. * * Returns: a new #AgsFifoout * * Since: 1.0.0 */ AgsFifoout* ags_fifoout_new(GObject *application_context) { AgsFifoout *fifoout; fifoout = (AgsFifoout *) g_object_new(AGS_TYPE_FIFOOUT, "application-context", application_context, NULL); return(fifoout); } gsequencer-1.4.24/ags/audio/ags_recall_channel_run_dummy.h0000644000175000017500000000462613256163135020610 00000000000000/* 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 . */ #ifndef __AGS_RECALL_CHANNEL_RUN_DUMMY_H__ #define __AGS_RECALL_CHANNEL_RUN_DUMMY_H__ #include #include #include #include #include #define AGS_TYPE_RECALL_CHANNEL_RUN_DUMMY (ags_recall_channel_run_dummy_get_type()) #define AGS_RECALL_CHANNEL_RUN_DUMMY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_CHANNEL_RUN_DUMMY, AgsRecallChannelRunDummy)) #define AGS_RECALL_CHANNEL_RUN_DUMMY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_CHANNEL_RUN_DUMMY, AgsRecallChannelRunDummyClass)) #define AGS_IS_RECALL_CHANNEL_RUN_DUMMY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_CHANNEL_RUN_DUMMY)) #define AGS_IS_RECALL_CHANNEL_RUN_DUMMY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_CHANNEL_RUN_DUMMY)) #define AGS_RECALL_CHANNEL_RUN_DUMMY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_CHANNEL_RUN_DUMMY, AgsRecallChannelRunDummyClass)) typedef struct _AgsRecallChannelRunDummy AgsRecallChannelRunDummy; typedef struct _AgsRecallChannelRunDummyClass AgsRecallChannelRunDummyClass; struct _AgsRecallChannelRunDummy { AgsRecallChannelRun recall_channel_run; GType recycling_dummy_child_type; }; struct _AgsRecallChannelRunDummyClass { AgsRecallChannelRunClass recall_channel_run; }; GType ags_recall_channel_run_dummy_get_type(); AgsRecallChannelRunDummy* ags_recall_channel_run_dummy_new(AgsChannel *source, GType child_type, GType recycling_dummy_child_type); #endif /*__AGS_RECALL_CHANNEL_RUN_DUMMY_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_lv2_run.h0000644000175000017500000000453113247044247016465 00000000000000/* 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 . */ #ifndef __AGS_RECALL_LV2_RUN_H__ #define __AGS_RECALL_LV2_RUN_H__ #include #include #include #include #include #define AGS_TYPE_RECALL_LV2_RUN (ags_recall_lv2_run_get_type()) #define AGS_RECALL_LV2_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_LV2_RUN, AgsRecallLv2Run)) #define AGS_RECALL_LV2_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_LV2_RUN, AgsRecallLv2RunClass)) #define AGS_IS_RECALL_LV2_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RECALL_LV2_RUN)) #define AGS_IS_RECALL_LV2_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RECALL_LV2_RUN)) #define AGS_RECALL_LV2_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RECALL_LV2_RUN, AgsRecallLv2RunClass)) #define AGS_RECALL_LV2_DEFAULT_MIDI_LENGHT (8 * 256) typedef struct _AgsRecallLv2Run AgsRecallLv2Run; typedef struct _AgsRecallLv2RunClass AgsRecallLv2RunClass; struct _AgsRecallLv2Run { AgsRecallAudioSignal recall_audio_signal; LV2_Handle *lv2_handle; float *input; float *output; void *event_port; void *atom_port; long delta_time; snd_seq_event_t **event_buffer; unsigned long *event_count; GObject *route_lv2_audio_run; GList *note; GObject *worker_handle; }; struct _AgsRecallLv2RunClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_recall_lv2_run_get_type(); AgsRecallLv2Run* ags_recall_lv2_run_new(AgsAudioSignal *audio_signal); #endif /*__AGS_RECALL_LV2_RUN_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_dependency.c0000644000175000017500000003016213247044247017206 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_recall_dependency_class_init(AgsRecallDependencyClass *recall_dependency); void ags_recall_dependency_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_dependency_init(AgsRecallDependency *recall_dependency); void ags_recall_dependency_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_dependency_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_dependency_connect(AgsConnectable *connectable); void ags_recall_dependency_disconnect(AgsConnectable *connectable); void ags_recall_dependency_dispose(GObject *gobject); void ags_recall_dependency_finalize(GObject *gobject); /** * SECTION:ags_recall_dependency * @short_description: Object specifing dependency * @title: AgsRecallDependency * @section_id: * @include: ags/audio/ags_recall_dependency.h * * #AgsRecallDependency specifies dependencies on other recalls. Dependencies * are resolved during initialization. */ static gpointer ags_recall_dependency_parent_class = NULL; enum{ PROP_0, PROP_DEPENDENCY, }; GType ags_recall_dependency_get_type(void) { static GType ags_type_recall_dependency = 0; if(!ags_type_recall_dependency){ static const GTypeInfo ags_recall_dependency_info = { sizeof (AgsRecallDependencyClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_dependency_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallDependency), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_dependency_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_dependency_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_dependency = g_type_register_static(G_TYPE_OBJECT, "AgsRecallDependency", &ags_recall_dependency_info, 0); g_type_add_interface_static(ags_type_recall_dependency, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_recall_dependency); } void ags_recall_dependency_class_init(AgsRecallDependencyClass *recall_dependency) { GObjectClass *gobject; GParamSpec *param_spec; ags_recall_dependency_parent_class = g_type_class_peek_parent(recall_dependency); gobject = (GObjectClass *) recall_dependency; gobject->set_property = ags_recall_dependency_set_property; gobject->get_property = ags_recall_dependency_get_property; gobject->dispose = ags_recall_dependency_dispose; gobject->finalize = ags_recall_dependency_finalize; /* properties */ /** * AgsRecallDependency:dependency: * * The dependency. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("dependency", i18n_pspec("dependency of recall"), i18n_pspec("A dependency of the recall"), AGS_TYPE_RECALL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEPENDENCY, param_spec); } void ags_recall_dependency_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_recall_dependency_connect; connectable->disconnect = ags_recall_dependency_disconnect; } void ags_recall_dependency_init(AgsRecallDependency *recall_dependency) { recall_dependency->flags = 0; recall_dependency->dependency = NULL; } void ags_recall_dependency_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallDependency *recall_dependency; recall_dependency = AGS_RECALL_DEPENDENCY(gobject); switch(prop_id){ case PROP_DEPENDENCY: { AgsRecall *dependency; dependency = (AgsRecall *) g_value_get_object(value); if(recall_dependency->dependency == dependency){ return; } if(recall_dependency->dependency != NULL){ g_object_unref(G_OBJECT(recall_dependency->dependency)); } if(dependency != NULL){ g_object_ref(G_OBJECT(dependency)); } recall_dependency->dependency = dependency; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_dependency_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallDependency *recall_dependency; recall_dependency = AGS_RECALL_DEPENDENCY(gobject); switch(prop_id){ case PROP_DEPENDENCY: { g_value_set_object(value, recall_dependency->dependency); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_dependency_connect(AgsConnectable *connectable) { AgsRecallDependency *recall_dependency; recall_dependency = AGS_RECALL_DEPENDENCY(connectable); if((AGS_RECALL_DEPENDENCY_CONNECTED & (recall_dependency->flags)) != 0){ return; } recall_dependency->flags |= AGS_RECALL_DEPENDENCY_CONNECTED; } void ags_recall_dependency_disconnect(AgsConnectable *connectable) { AgsRecallDependency *recall_dependency; recall_dependency = AGS_RECALL_DEPENDENCY(connectable); if((AGS_RECALL_DEPENDENCY_CONNECTED & (recall_dependency->flags)) == 0){ return; } recall_dependency->flags &= (~AGS_RECALL_DEPENDENCY_CONNECTED); } void ags_recall_dependency_dispose(GObject *gobject) { AgsRecallDependency *recall_dependency; recall_dependency = AGS_RECALL_DEPENDENCY(gobject); /* dependency */ if(recall_dependency->dependency != NULL){ g_object_unref(recall_dependency->dependency); recall_dependency->dependency = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_dependency_parent_class)->dispose(gobject); } void ags_recall_dependency_finalize(GObject *gobject) { AgsRecallDependency *recall_dependency; recall_dependency = AGS_RECALL_DEPENDENCY(gobject); /* dependency */ if(recall_dependency->dependency != NULL){ g_object_unref(recall_dependency->dependency); } /* call parent */ G_OBJECT_CLASS(ags_recall_dependency_parent_class)->finalize(gobject); } /** * ags_recall_dependency_find_dependency: * @recall_dependencies: a #GList containing #AgsRecallDependency * @dependency: the #AgsRecall depending on * * Retrieve dependency. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_recall_dependency_find_dependency(GList *recall_dependencies, GObject *dependency) { AgsRecallDependency *recall_dependency; while(recall_dependencies != NULL){ recall_dependency = AGS_RECALL_DEPENDENCY(recall_dependencies->data); if(recall_dependency->dependency == dependency){ return(recall_dependencies); } recall_dependencies = recall_dependencies->next; } return(NULL); } /** * ags_recall_dependency_find_dependency_by_provider: * @recall_dependencies: a #GList containing #AgsRecallDependency * @provider: the object providing recall, like #AgsAudio or #AgsChannel * * Retrieve dependency by provider. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_recall_dependency_find_dependency_by_provider(GList *recall_dependencies, GObject *provider) { AgsRecallDependency *recall_dependency; while(recall_dependencies != NULL){ recall_dependency = AGS_RECALL_DEPENDENCY(recall_dependencies->data); if((AGS_IS_CHANNEL(provider) && AGS_IS_RECALL_CHANNEL_RUN(recall_dependency->dependency) && (AGS_RECALL_CHANNEL_RUN(recall_dependency->dependency)->source == AGS_CHANNEL(provider))) || (AGS_IS_AUDIO(provider) && AGS_IS_RECALL_AUDIO_RUN(recall_dependency->dependency) && AGS_RECALL_AUDIO_RUN(recall_dependency->dependency)->recall_audio != NULL && (AGS_RECALL_AUDIO_RUN(recall_dependency->dependency)->recall_audio->audio == AGS_AUDIO(provider)))){ return(recall_dependencies); } recall_dependencies = recall_dependencies->next; } return(NULL); } /** * ags_recall_dependency_resolve: * @recall_dependency: an #AgsRecallDependency * @recall_id: the #AgsRecallID refering to * * Resolve dependency. * * Returns: the #AgsRecall dependency. * * Since: 1.0.0 */ GObject* ags_recall_dependency_resolve(AgsRecallDependency *recall_dependency, AgsRecallID *recall_id) { AgsRecallContainer *recall_container; AgsRecall *dependency; if(recall_dependency->dependency == NULL || AGS_RECALL(recall_dependency->dependency)->container == NULL){ g_message("dependency resolve: container == NULL"); return(NULL); } dependency = AGS_RECALL(recall_dependency->dependency); recall_container = AGS_RECALL_CONTAINER(dependency->container); if(AGS_IS_RECALL_AUDIO(dependency)){ return((GObject *) recall_container->recall_audio); }else if(AGS_IS_RECALL_AUDIO_RUN(dependency)){ GList *recall_list; if(recall_id == NULL){ g_message("dependency resolve: recall_id == NULL"); return(NULL); } recall_list = ags_recall_find_recycling_context(recall_container->recall_audio_run, (GObject *) recall_id->recycling_context); if(recall_list != NULL){ return(G_OBJECT(recall_list->data)); }else if(recall_id->recycling_context->parent != NULL){ recall_list = ags_recall_find_recycling_context(recall_container->recall_audio_run, (GObject *) recall_id->recycling_context->parent); if(recall_list != NULL){ return(G_OBJECT(recall_list->data)); }else{ g_warning("dependency not found!"); } } }else if(AGS_IS_RECALL_CHANNEL(dependency)){ GList *recall_list; recall_list = ags_recall_find_provider(recall_container->recall_channel, (GObject *) AGS_RECALL_CHANNEL(dependency)->source); if(recall_list != NULL){ return(G_OBJECT(recall_list->data)); } }else if(AGS_IS_RECALL_CHANNEL_RUN(dependency)){ GList *recall_list; if(recall_id == NULL){ g_message("dependency resolve: recall_id == NULL"); return(NULL); } recall_list = ags_recall_find_provider_with_recycling_context(recall_container->recall_channel_run, (GObject *) AGS_RECALL_CHANNEL_RUN(dependency)->recall_channel->source, (GObject *) recall_id->recycling_context); if(recall_list != NULL){ return(G_OBJECT(recall_list->data)); }else if(recall_id->recycling_context->parent != NULL){ recall_list = ags_recall_find_provider_with_recycling_context(recall_container->recall_channel_run, (GObject *) AGS_RECALL_CHANNEL_RUN(dependency)->recall_channel->source, (GObject *) recall_id->recycling_context->parent); if(recall_list != NULL){ return(G_OBJECT(recall_list->data)); } } } return(NULL); } /** * ags_recall_dependency_new: * @dependency: the #AgsRecall depending on * * Creates a #AgsRecallDependency * * Returns: a new #AgsRecallDependency * * Since: 1.0.0 */ AgsRecallDependency* ags_recall_dependency_new(GObject *dependency) { AgsRecallDependency *recall_dependency; recall_dependency = (AgsRecallDependency *) g_object_new(AGS_TYPE_RECALL_DEPENDENCY, "dependency", dependency, NULL); return(recall_dependency); } gsequencer-1.4.24/ags/audio/ags_sound_provider.h0000644000175000017500000000634113256163135016615 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SOUND_PROVIDER_H__ #define __AGS_SOUND_PROVIDER_H__ #include #include #define AGS_TYPE_SOUND_PROVIDER (ags_sound_provider_get_type()) #define AGS_SOUND_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SOUND_PROVIDER, AgsSoundProvider)) #define AGS_SOUND_PROVIDER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_SOUND_PROVIDER, AgsSoundProviderInterface)) #define AGS_IS_SOUND_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SOUND_PROVIDER)) #define AGS_IS_SOUND_PROVIDER_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_SOUND_PROVIDER)) #define AGS_SOUND_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_SOUND_PROVIDER, AgsSoundProviderInterface)) typedef struct _AgsSoundProvider AgsSoundProvider; typedef struct _AgsSoundProviderInterface AgsSoundProviderInterface; struct _AgsSoundProviderInterface { GTypeInterface ginterface; void (*set_soundcard)(AgsSoundProvider *sound_provider, GList *soundcard); GList* (*get_soundcard)(AgsSoundProvider *sound_provider); void (*set_default_soundcard_thread)(AgsSoundProvider *sound_provider, GObject *soundcard_thread); GObject* (*get_default_soundcard_thread)(AgsSoundProvider *sound_provider); void (*set_sequencer)(AgsSoundProvider *sound_provider, GList *sequencer); GList* (*get_sequencer)(AgsSoundProvider *sound_provider); void (*set_distributed_manager)(AgsSoundProvider *sound_provider, GList *distributed_manager); GList* (*get_distributed_manager)(AgsSoundProvider *sound_provider); }; GType ags_sound_provider_get_type(); void ags_sound_provider_set_soundcard(AgsSoundProvider *sound_provider, GList *soundcard); GList* ags_sound_provider_get_soundcard(AgsSoundProvider *sound_provider); void ags_sound_provider_set_default_soundcard_thread(AgsSoundProvider *sound_provider, GObject *soundcard_thread); GObject* ags_sound_provider_get_default_soundcard_thread(AgsSoundProvider *sound_provider); void ags_sound_provider_set_sequencer(AgsSoundProvider *sound_provider, GList *sequencer); GList* ags_sound_provider_get_sequencer(AgsSoundProvider *sound_provider); void ags_sound_provider_set_distributed_manager(AgsSoundProvider *sound_provider, GList *distributed_manager); GList* ags_sound_provider_get_distributed_manager(AgsSoundProvider *sound_provider); #endif /*__AGS_SOUND_PROVIDER_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_dssi.h0000644000175000017500000000516713246707333016047 00000000000000/* 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 . */ #ifndef __AGS_RECALL_DSSI_H__ #define __AGS_RECALL_DSSI_H__ #include #include #include #include #include #include #define AGS_TYPE_RECALL_DSSI (ags_recall_dssi_get_type()) #define AGS_RECALL_DSSI(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_DSSI, AgsRecallDssi)) #define AGS_RECALL_DSSI_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_DSSI, AgsRecallDssiClass)) #define AGS_IS_RECALL_DSSI(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RECALL_DSSI)) #define AGS_IS_RECALL_DSSI_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RECALL_DSSI)) #define AGS_RECALL_DSSI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RECALL_DSSI, AgsRecallDssiClass)) typedef struct _AgsRecallDssi AgsRecallDssi; typedef struct _AgsRecallDssiClass AgsRecallDssiClass; struct _AgsRecallDssi { AgsRecallChannel recall_channel; gchar *filename; gchar *effect; unsigned long index; unsigned long bank; unsigned long program; DSSI_Descriptor *plugin_descriptor; unsigned long *input_port; unsigned long input_lines; unsigned long *output_port; unsigned long output_lines; }; struct _AgsRecallDssiClass { AgsRecallChannelClass recall_channel; }; GType ags_recall_dssi_get_type(); void ags_recall_dssi_load(AgsRecallDssi *recall_dssi); GList* ags_recall_dssi_load_ports(AgsRecallDssi *recall_dssi); void ags_recall_dssi_load_conversion(AgsRecallDssi *recall_dssi, GObject *port, gpointer port_descriptor); GList* ags_recall_dssi_find(GList *recall, gchar *filename, gchar *effect); AgsRecallDssi* ags_recall_dssi_new(AgsChannel *source, gchar *filename, gchar *effect, unsigned long index); #endif /*__AGS_RECALL_DSSI_H__*/ gsequencer-1.4.24/ags/audio/ags_preset.h0000644000175000017500000000542013256163135015052 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_PRESET_H__ #define __AGS_PRESET_H__ #include #include #define AGS_TYPE_PRESET (ags_preset_get_type()) #define AGS_PRESET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PRESET, AgsPreset)) #define AGS_PRESET_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PRESET, AgsPresetClass)) #define AGS_IS_PRESET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PRESET)) #define AGS_IS_PRESET_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PRESET)) #define AGS_PRESET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PRESET, AgsPresetClass)) typedef struct _AgsPreset AgsPreset; typedef struct _AgsPresetClass AgsPresetClass; /** * AgsPresetFlags: * @AGS_PRESET_CONNECTED: indicates the playback was connected by calling #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsPreset by * enable/disable as flags. */ typedef enum{ AGS_PRESET_CONNECTED = 1, }AgsPresetFlags; #define AGS_PRESET_ERROR (ags_preset_error_quark()) typedef enum{ AGS_PRESET_ERROR_NO_SUCH_PARAMETER, }AgsPresetError; struct _AgsPreset { GObject gobject; guint flags; GObject *audio; gchar *scope; gchar *preset_name; guint audio_channel_start; guint audio_channel_end; guint pad_start; guint pad_end; guint x_start; guint x_end; GParameter *parameter; guint n_params; }; struct _AgsPresetClass { GObjectClass gobject; }; GType ags_preset_get_type(); GQuark ags_preset_error_quark(); GList* ags_preset_find_scope(GList *preset, gchar *scope); GList* ags_preset_find_name(GList *preset, gchar *preset_name); gboolean ags_preset_add_parameter(AgsPreset *preset, gchar *param_name, GValue *value); void ags_preset_remove_parameter(AgsPreset *preset, guint nth); void ags_preset_get_parameter(AgsPreset *preset, gchar *param_name, GValue *value, GError **error); AgsPreset* ags_preset_new(); #endif /*__AGS_PRESET_H__*/ gsequencer-1.4.24/ags/audio/ags_synth_generator.c0000644000175000017500000006414213247044247016766 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_synth_generator_class_init(AgsSynthGeneratorClass *synth_generator); void ags_synth_generator_plugin_interface_init(AgsPluginInterface *plugin); void ags_synth_generator_init(AgsSynthGenerator *synth_generator); void ags_synth_generator_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_synth_generator_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_synth_generator_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_synth_generator_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); void ags_synth_generator_finalize(GObject *gobject); /** * SECTION:ags_synth_generator * @short_description: generate wave-form * @title: AgsSynthGenerator * @section_id: * @include: ags/file/ags_synth_generator.h * * The #AgsSynthGenerator generates wave-forms with oscillators. */ enum{ PROP_0, PROP_SAMPLERATE, PROP_BUFFER_SIZE, PROP_FORMAT, PROP_DELAY, PROP_ATTACK, PROP_FRAME_COUNT, PROP_OSCILLATOR, PROP_FREQUENCY, PROP_PHASE, PROP_VOLUME, PROP_TIMESTAMP, }; static gpointer ags_synth_generator_parent_class = NULL; static AgsPluginInterface *ags_synth_generator_parent_plugin_interface; static const gchar *ags_synth_generator_plugin_name = "ags-synth-generator"; GType ags_synth_generator_get_type() { static GType ags_type_synth_generator = 0; if(!ags_type_synth_generator){ static const GTypeInfo ags_synth_generator_info = { sizeof (AgsSynthGeneratorClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_synth_generator_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSynthGenerator), 0, /* n_preallocs */ (GInstanceInitFunc) ags_synth_generator_init, }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_synth_generator_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_synth_generator = g_type_register_static(AGS_TYPE_FUNCTION, "AgsSynthGenerator", &ags_synth_generator_info, 0); g_type_add_interface_static(ags_type_synth_generator, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_synth_generator); } void ags_synth_generator_class_init(AgsSynthGeneratorClass *synth_generator) { GObjectClass *gobject; GParamSpec *param_spec; ags_synth_generator_parent_class = g_type_class_peek_parent(synth_generator); /* GObjectClass */ gobject = (GObjectClass *) synth_generator; gobject->set_property = ags_synth_generator_set_property; gobject->get_property = ags_synth_generator_get_property; gobject->finalize = ags_synth_generator_finalize; /* properties */ /** * AgsSynthGenerator:samplerate: * * The samplerate to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("using samplerate"), i18n_pspec("The samplerate to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsSynthGenerator:buffer-size: * * The buffer size to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("using buffer size"), i18n_pspec("The buffer size to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsSynthGenerator:format: * * The format to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("using format"), i18n_pspec("The format to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsSynthGenerator:frame-count: * * The frame count to be used. * * Since: 1.1.0 */ param_spec = g_param_spec_uint("frame-count", i18n_pspec("apply frame count"), i18n_pspec("To apply frame count"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FRAME_COUNT, param_spec); /** * AgsAudioSignal:delay: * * The delay to be used. * * Since: 1.1.0 */ param_spec = g_param_spec_double("delay", i18n_pspec("using delay"), i18n_pspec("The delay to be used"), 0.0, 65535.0, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY, param_spec); /** * AgsSynthGenerator:attack: * * The attack to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("attack", i18n_pspec("apply attack"), i18n_pspec("To apply attack"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsSynthGenerator:oscillator: * * The oscillator to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("oscillator", i18n_pspec("using oscillator"), i18n_pspec("The oscillator to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_OSCILLATOR, param_spec); /** * AgsAudioSignal:frequency: * * The frequency to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_double("frequency", i18n_pspec("using frequency"), i18n_pspec("The frequency to be used"), 0.0, 65535.0, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FREQUENCY, param_spec); /** * AgsAudioSignal:phase: * * The phase to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_double("phase", i18n_pspec("using phase"), i18n_pspec("The phase to be used"), 0.0, 65535.0, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PHASE, param_spec); /** * AgsAudioSignal:volume: * * The volume to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_double("volume", i18n_pspec("using volume"), i18n_pspec("The volume to be used"), 0.0, 65535.0, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_VOLUME, param_spec); /** * AgsSynthGenerator:timestamp: * * The assigned timestamp. * * Since: 1.0.0 */ param_spec = g_param_spec_object("timestamp", i18n_pspec("timestamp"), i18n_pspec("The timestamp"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TIMESTAMP, param_spec); } void ags_synth_generator_plugin_interface_init(AgsPluginInterface *plugin) { ags_synth_generator_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_synth_generator_read; plugin->write = ags_synth_generator_write; } void ags_synth_generator_init(AgsSynthGenerator *synth_generator) { AgsConfig *config; gchar *str; /* config */ config = ags_config_get_instance(); /* base init */ synth_generator->flags = 0; synth_generator->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; synth_generator->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; synth_generator->format = AGS_SOUNDCARD_DEFAULT_FORMAT; /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ synth_generator->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ synth_generator->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ synth_generator->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* more base init */ synth_generator->delay = 0.0; synth_generator->attack = 0; synth_generator->frame_count = 0; synth_generator->oscillator = 0; synth_generator->frequency = 0.0; synth_generator->phase = 0.0; synth_generator->volume = 1.0; /* timestamp */ synth_generator->timestamp = NULL; } void ags_synth_generator_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSynthGenerator *synth_generator; synth_generator = AGS_SYNTH_GENERATOR(gobject); switch(prop_id){ case PROP_SAMPLERATE: { synth_generator->samplerate = g_value_get_uint(value); } break; case PROP_BUFFER_SIZE: { synth_generator->buffer_size = g_value_get_uint(value); } break; case PROP_FORMAT: { synth_generator->format = g_value_get_uint(value); } break; case PROP_DELAY: { synth_generator->delay = g_value_get_double(value); } break; case PROP_ATTACK: { synth_generator->attack = g_value_get_uint(value); } break; case PROP_FRAME_COUNT: { synth_generator->frame_count = g_value_get_uint(value); } break; case PROP_OSCILLATOR: { synth_generator->oscillator = g_value_get_uint(value); } break; case PROP_FREQUENCY: { synth_generator->frequency = g_value_get_double(value); } break; case PROP_PHASE: { synth_generator->phase = g_value_get_double(value); } break; case PROP_VOLUME: { synth_generator->volume = g_value_get_double(value); } break; case PROP_TIMESTAMP: { AgsTimestamp *timestamp; timestamp = (AgsTimestamp *) g_value_get_object(value); if(synth_generator->timestamp == (GObject *) timestamp){ return; } if(synth_generator->timestamp != NULL){ g_object_unref(synth_generator->timestamp); } if(timestamp != NULL){ g_object_ref(timestamp); } synth_generator->timestamp = (GObject *) timestamp; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_synth_generator_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSynthGenerator *synth_generator; synth_generator = AGS_SYNTH_GENERATOR(gobject); switch(prop_id){ case PROP_SAMPLERATE: { g_value_set_uint(value, synth_generator->samplerate); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, synth_generator->buffer_size); } break; case PROP_FORMAT: { g_value_set_uint(value, synth_generator->format); } break; case PROP_DELAY: { g_value_set_uint(value, synth_generator->delay); } break; case PROP_ATTACK: { g_value_set_uint(value, synth_generator->attack); } break; case PROP_FRAME_COUNT: { g_value_set_uint(value, synth_generator->frame_count); } break; case PROP_OSCILLATOR: { g_value_set_uint(value, synth_generator->oscillator); } break; case PROP_FREQUENCY: { g_value_set_uint(value, synth_generator->frequency); } break; case PROP_PHASE: { g_value_set_uint(value, synth_generator->phase); } break; case PROP_VOLUME: { g_value_set_uint(value, synth_generator->volume); } break; case PROP_TIMESTAMP: { g_value_set_object(value, synth_generator->timestamp); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_synth_generator_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { // AgsSynthGenerator *gobject; // xmlChar *str; // gobject = AGS_SYNTH_GENERATOR(plugin); //TODO:JK: implement me } xmlNode* ags_synth_generator_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsSynthGenerator *synth_generator; xmlNode *node; gchar *id; synth_generator = AGS_SYNTH_GENERATOR(plugin); /* allocate new node with uuid */ id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-synth-generator"); xmlNewProp(node, AGS_FILE_ID_PROP, id); /* add reference and node to file object */ ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", synth_generator, NULL)); //TODO:JK: implement me /* write timestamp */ if(synth_generator->timestamp != NULL){ ags_file_write_timestamp(file, node, (AgsTimestamp *) synth_generator->timestamp); } return(node); } void ags_synth_generator_finalize(GObject *gobject) { AgsSynthGenerator *synth_generator; synth_generator = AGS_SYNTH_GENERATOR(gobject); if(synth_generator->timestamp != NULL){ g_object_unref(synth_generator->timestamp); } /* finalize */ G_OBJECT_CLASS(ags_synth_generator_parent_class)->finalize(gobject); } /** * ags_synth_generator_compute: * @synth_generator: the #AgsSynthGenerator * @note: the note to compute * * Compute synth for @note. * * Returns: an #AgsAudioSignal applied specified synth to stream * * Since: 1.0.0 */ GObject* ags_synth_generator_compute(AgsSynthGenerator *synth_generator, gdouble note) { AgsAudioSignal *audio_signal; audio_signal = ags_audio_signal_new(NULL, NULL, NULL); ags_audio_signal_stream_resize(audio_signal, ceil(synth_generator->frame_count / synth_generator->buffer_size)); ags_synth_generator_compute_with_audio_signal(synth_generator, audio_signal, note, NULL, NULL, AGS_SYNTH_GENERATOR_COMPUTE_FIXED_LENGTH); return(audio_signal); } /** * ags_synth_generator_compute_with_audio_signal: * @synth_generator: the #AgsSynthGenerator * @audio_signal: the #AgsAudioSignal * @note: the note to compute * @sync_start: not used for now * @sync_end: not used for now * @compute_flags: computation flags * * Compute synth for @note for @audio_signal. * * Since: 1.0.0 */ void ags_synth_generator_compute_with_audio_signal(AgsSynthGenerator *synth_generator, GObject *audio_signal, gdouble note, AgsComplex *sync_start, AgsComplex *sync_end, guint compute_flags) { GList *stream; gdouble samplerate; gdouble start_frequency, frequency; gdouble current_frequency; gdouble phase, volume; gdouble current_phase; guint format; guint audio_buffer_util_format; guint frame_count, stop_frame; guint buffer_size; guint offset; guint attack, frame_copy_count; gdouble current_rate; gdouble xcross_factor; guint xcross_count; guint i; gboolean initial_run; samplerate = AGS_AUDIO_SIGNAL(audio_signal)->samplerate; start_frequency = 48.0; frequency = synth_generator->frequency; current_frequency = (guint) ((double) frequency * exp2((double)((double) note + 48.0) / 12.0)); phase = synth_generator->phase; volume = synth_generator->volume; format = AGS_AUDIO_SIGNAL(audio_signal)->format; audio_buffer_util_format = ags_audio_buffer_util_format_from_soundcard(format); frame_count = AGS_AUDIO_SIGNAL(audio_signal)->frame_count; buffer_size = AGS_AUDIO_SIGNAL(audio_signal)->buffer_size; /* generate synth */ if((AGS_SYNTH_GENERATOR_COMPUTE_SYNC & compute_flags) != 0){ stream = AGS_AUDIO_SIGNAL(audio_signal)->stream_beginning; xcross_count = 0; while(stream != NULL){ xcross_count += ags_synth_util_get_xcross_count(stream->data, audio_buffer_util_format, buffer_size); stream = stream->next; } } if(xcross_count == 0){ xcross_count = 1; } attack = synth_generator->attack; if((AGS_SYNTH_GENERATOR_COMPUTE_FIXED_LENGTH & compute_flags) != 0){ stop_frame = synth_generator->frame_count; }else{ stop_frame = frame_count; } stream = AGS_AUDIO_SIGNAL(audio_signal)->stream_beginning; stream = g_list_nth(stream, (guint) floor(attack / buffer_size)); attack %= buffer_size; offset = 0; current_phase = phase; if((AGS_SYNTH_GENERATOR_COMPUTE_SYNC & compute_flags) != 0){ if(xcross_count == 0){ current_rate = current_frequency; }else{ current_rate = (frame_count / xcross_count) * (frame_count / samplerate); } if((AGS_SYNTH_GENERATOR_COMPUTE_16HZ & compute_flags) != 0){ xcross_factor = current_rate * (16.0 / samplerate); }else if((AGS_SYNTH_GENERATOR_COMPUTE_440HZ & compute_flags) != 0){ xcross_factor = current_rate * (440.0 / samplerate); }else if((AGS_SYNTH_GENERATOR_COMPUTE_22000HZ & compute_flags) != 0){ xcross_factor = current_rate * (22000.0 / samplerate); }else if((AGS_SYNTH_GENERATOR_COMPUTE_LIMIT & compute_flags) != 0){ xcross_factor = current_rate * samplerate; }else if((AGS_SYNTH_GENERATOR_COMPUTE_NOHZ & compute_flags) != 0){ if(xcross_count != 0){ xcross_factor = (1.0 / xcross_count); }else{ xcross_factor = 1.0; } }else if((AGS_SYNTH_GENERATOR_COMPUTE_FREQUENCY & compute_flags) != 0){ xcross_factor = current_rate * (frequency / samplerate); }else if((AGS_SYNTH_GENERATOR_COMPUTE_NOTE & compute_flags) != 0){ xcross_factor = current_rate * (current_frequency / samplerate); } } i = 0; initial_run = TRUE; while(stream != NULL && offset < stop_frame){ if(initial_run){ if(buffer_size - attack < stop_frame){ frame_copy_count = buffer_size - attack; }else{ frame_copy_count = stop_frame; } }else{ if(offset + buffer_size < stop_frame){ frame_copy_count = buffer_size; }else{ frame_copy_count = stop_frame - offset; } } switch(synth_generator->oscillator){ case AGS_SYNTH_GENERATOR_OSCILLATOR_SIN: { ags_synth_util_sin(stream->data, current_frequency, current_phase, volume, samplerate, audio_buffer_util_format, attack, frame_copy_count); } break; case AGS_SYNTH_GENERATOR_OSCILLATOR_SAWTOOTH: { ags_synth_util_sawtooth(stream->data, current_frequency, current_phase, volume, samplerate, audio_buffer_util_format, attack, frame_copy_count); } break; case AGS_SYNTH_GENERATOR_OSCILLATOR_TRIANGLE: { ags_synth_util_triangle(stream->data, current_frequency, current_phase, volume, samplerate, audio_buffer_util_format, attack, frame_copy_count); } break; case AGS_SYNTH_GENERATOR_OSCILLATOR_SQUARE: { ags_synth_util_square(stream->data, current_frequency, current_phase, volume, samplerate, audio_buffer_util_format, attack, frame_copy_count); } break; default: g_message("unknown oscillator"); } stream = stream->next; offset += frame_copy_count; if((AGS_SYNTH_GENERATOR_COMPUTE_SYNC & compute_flags) == 0 || (xcross_factor * i) > (frame_count / xcross_count)){ current_phase = (guint) (offset - attack + phase) % (guint) floor(samplerate / current_frequency); i = 0; }else{ current_phase = phase; i++; } attack = 0; initial_run = FALSE; } } /** * ags_synth_generator_compute_with_audio_signal: * @synth_generator: the #AgsSynthGenerator * @audio_signal: the #AgsAudioSignal * @note: the note to compute * @sync_point: the frame offset to sync * @sync_point_count: the count of sync points * @frame_count: the amount of frames to produce * @delay: the delay * @attack: the attack * * Compute synth for @note for @audio_signal. * * Since: 1.1.0 */ void ags_synth_generator_compute_extended(AgsSynthGenerator *synth_generator, GObject *audio_signal, gdouble note, AgsComplex **sync_point, guint sync_point_count) { GList *stream_start, *stream; gdouble delay; guint attack; guint frame_count; guint buffer_size; guint current_frame_count, requested_frame_count; gdouble samplerate; gdouble current_frequency; gdouble phase, volume; gdouble current_phase; guint format; guint audio_buffer_util_format; guint current_attack, current_count; guint offset; guint last_sync; guint i, j; gboolean synced; delay = synth_generator->delay; attack = synth_generator->attack; frame_count = synth_generator->frame_count; buffer_size = AGS_AUDIO_SIGNAL(audio_signal)->buffer_size; current_frame_count = AGS_AUDIO_SIGNAL(audio_signal)->length * buffer_size; requested_frame_count = (guint) ceil(((floor(delay) * buffer_size + attack) + frame_count) / buffer_size) * buffer_size; if(current_frame_count < requested_frame_count){ ags_audio_signal_stream_resize(audio_signal, ceil(requested_frame_count / buffer_size)); } /* */ stream = stream_start = g_list_nth(AGS_AUDIO_SIGNAL(audio_signal)->stream_beginning, (guint) floor(delay)); samplerate = AGS_AUDIO_SIGNAL(audio_signal)->samplerate; current_frequency = (guint) ((double) synth_generator->frequency * exp2((double)((double) note + 48.0) / 12.0)); phase = current_phase = synth_generator->phase; volume = synth_generator->volume; format = AGS_AUDIO_SIGNAL(audio_signal)->format; audio_buffer_util_format = ags_audio_buffer_util_format_from_soundcard(format); current_attack = attack; current_count = buffer_size - attack; offset = 0; last_sync = 0; if(sync_point != NULL){ if(sync_point_count > 1 && floor(sync_point[1][0][0]) > 0.0){ if(sync_point[1][0][0] < current_count){ current_count = sync_point[1][0][0]; } }else{ if(sync_point[0][0][0] < current_count && floor(sync_point[0][0][0]) > 0.0){ current_count = sync_point[0][0][0]; } } } synced = FALSE; for(i = attack, j = 0; i < frame_count + attack && stream != NULL;){ switch(synth_generator->oscillator){ case AGS_SYNTH_GENERATOR_OSCILLATOR_SIN: { ags_synth_util_sin(stream->data, current_frequency, current_phase, volume, samplerate, audio_buffer_util_format, current_attack, current_count); } break; case AGS_SYNTH_GENERATOR_OSCILLATOR_SAWTOOTH: { ags_synth_util_sawtooth(stream->data, current_frequency, current_phase, volume, samplerate, audio_buffer_util_format, current_attack, current_count); } break; case AGS_SYNTH_GENERATOR_OSCILLATOR_TRIANGLE: { ags_synth_util_triangle(stream->data, current_frequency, current_phase, volume, samplerate, audio_buffer_util_format, current_attack, current_count); } break; case AGS_SYNTH_GENERATOR_OSCILLATOR_SQUARE: { ags_synth_util_square(stream->data, current_frequency, current_phase, volume, samplerate, audio_buffer_util_format, current_attack, current_count); } break; default: g_message("unknown oscillator"); } current_phase = (guint) ((offset + current_count) + phase) % (guint) floor(samplerate / current_frequency); if(sync_point != NULL){ if(floor(sync_point[j][0][0]) > 0.0 && last_sync + sync_point[j][0][0] < offset + current_count){ current_phase = sync_point[j][0][1]; synced = TRUE; } } offset += current_count; i += current_count; if(buffer_size > (current_attack + current_count)){ current_count = buffer_size - (current_attack + current_count); current_attack = buffer_size - current_count; }else{ current_count = buffer_size; current_attack = 0; } if(sync_point != NULL){ if(j + 1 < sync_point_count && floor(sync_point[j + 1][0][0]) > 0.0){ if(sync_point[j + 1][0][0] < current_count){ current_count = sync_point[j + 1][0][0]; } }else{ if(floor(sync_point[0][0][0]) > 0.0 && sync_point[0][0][0] < current_count){ current_count = sync_point[0][0][0]; } } } if(sync_point != NULL){ if(synced){ last_sync = last_sync + sync_point[j][0][0]; j++; if(j >= sync_point_count || floor(sync_point[j][0][0]) == 0.0){ j = 0; } synced = FALSE; } } if(i != 0 && i % buffer_size == 0){ stream = stream->next; } } } /** * ags_synth_generator_new: * * Creates an #AgsSynthGenerator * * Returns: a new #AgsSynthGenerator * * Since: 1.0.0 */ AgsSynthGenerator* ags_synth_generator_new() { AgsSynthGenerator *synth_generator; synth_generator = (AgsSynthGenerator *) g_object_new(AGS_TYPE_SYNTH_GENERATOR, NULL); return(synth_generator); } gsequencer-1.4.24/ags/audio/ags_recall_dssi.c0000644000175000017500000005220413247044247016033 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_dssi_class_init(AgsRecallDssiClass *recall_dssi_class); void ags_recall_dssi_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_dssi_plugin_interface_init(AgsPluginInterface *plugin); void ags_recall_dssi_init(AgsRecallDssi *recall_dssi); void ags_recall_dssi_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_dssi_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_dssi_connect(AgsConnectable *connectable); void ags_recall_dssi_disconnect(AgsConnectable *connectable); void ags_recall_dssi_set_ports(AgsPlugin *plugin, GList *port); void ags_recall_dssi_finalize(GObject *gobject); void ags_recall_dssi_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_recall_dssi_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); /** * SECTION:ags_recall_dssi * @short_description: The object interfacing with DSSI * @title: AgsRecallDssi * @section_id: * @include: ags/audio/ags_recall_dssi.h * * #AgsRecallDssi provides DSSI support. */ enum{ PROP_0, PROP_FILENAME, PROP_EFFECT, PROP_INDEX, }; static gpointer ags_recall_dssi_parent_class = NULL; static AgsConnectableInterface* ags_recall_dssi_parent_connectable_interface; static AgsPluginInterface* ags_recall_dssi_parent_plugin_interface; GType ags_recall_dssi_get_type (void) { static GType ags_type_recall_dssi = 0; if(!ags_type_recall_dssi){ static const GTypeInfo ags_recall_dssi_info = { sizeof (AgsRecallDssiClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_dssi_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallDssi), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_dssi_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_dssi_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_recall_dssi_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_dssi = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsRecallDssi", &ags_recall_dssi_info, 0); g_type_add_interface_static(ags_type_recall_dssi, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_dssi, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_recall_dssi); } void ags_recall_dssi_class_init(AgsRecallDssiClass *recall_dssi) { GObjectClass *gobject; GParamSpec *param_spec; ags_recall_dssi_parent_class = g_type_class_peek_parent(recall_dssi); /* GObjectClass */ gobject = (GObjectClass *) recall_dssi; gobject->set_property = ags_recall_dssi_set_property; gobject->get_property = ags_recall_dssi_get_property; gobject->finalize = ags_recall_dssi_finalize; /* properties */ /** * AgsRecallDssi:filename: * * The plugins filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the object file"), i18n_pspec("The filename as string of object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsRecallDssi:effect: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsRecallDssi:index: * * The effect's index. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("index", i18n_pspec("index of effect"), i18n_pspec("The numerical index of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); } void ags_recall_dssi_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_dssi_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_dssi_connect; connectable->disconnect = ags_recall_dssi_disconnect; } void ags_recall_dssi_plugin_interface_init(AgsPluginInterface *plugin) { ags_recall_dssi_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_recall_dssi_read; plugin->write = ags_recall_dssi_write; plugin->set_ports = ags_recall_dssi_set_ports; } void ags_recall_dssi_init(AgsRecallDssi *recall_dssi) { AGS_RECALL(recall_dssi)->name = "ags-dssi"; AGS_RECALL(recall_dssi)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(recall_dssi)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(recall_dssi)->xml_type = "ags-recall-dssi"; AGS_RECALL(recall_dssi)->port = NULL; recall_dssi->filename = NULL; recall_dssi->effect = NULL; recall_dssi->index = 0; recall_dssi->bank = 0; recall_dssi->program = 0; recall_dssi->plugin_descriptor = NULL; recall_dssi->input_port = NULL; recall_dssi->input_lines = 0; recall_dssi->output_port = NULL; recall_dssi->output_lines = 0; } void ags_recall_dssi_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallDssi *recall_dssi; recall_dssi = AGS_RECALL_DSSI(gobject); switch(prop_id){ case PROP_FILENAME: { GObject *soundcard; gchar *filename; filename = g_value_get_string(value); if(filename == recall_dssi->filename){ return; } if(recall_dssi->filename != NULL){ g_free(recall_dssi->filename); } recall_dssi->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == recall_dssi->effect){ return; } recall_dssi->effect = g_strdup(effect); } break; case PROP_INDEX: { unsigned long index; index = g_value_get_ulong(value); if(index == recall_dssi->index){ return; } recall_dssi->index = index; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_dssi_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallDssi *recall_dssi; recall_dssi = AGS_RECALL_DSSI(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, recall_dssi->filename); } break; case PROP_EFFECT: { g_value_set_string(value, recall_dssi->effect); } break; case PROP_INDEX: { g_value_set_uint(value, recall_dssi->index); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_dssi_connect(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } ags_recall_load_automation(recall, g_list_copy(recall->port)); ags_recall_dssi_parent_connectable_interface->connect(connectable); } void ags_recall_dssi_disconnect(AgsConnectable *connectable) { ags_recall_dssi_parent_connectable_interface->disconnect(connectable); } void ags_recall_dssi_set_ports(AgsPlugin *plugin, GList *port) { AgsRecallDssi *recall_dssi; AgsPort *current; AgsDssiPlugin *dssi_plugin; GList *list; GList *port_descriptor; unsigned long port_count; unsigned long i; recall_dssi = AGS_RECALL_DSSI(plugin); dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), recall_dssi->filename, recall_dssi->effect); port_descriptor = AGS_BASE_PLUGIN(dssi_plugin)->port; if(port_descriptor != NULL){ port_count = g_list_length(port_descriptor); for(i = 0; i < port_count; i++){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ gchar *specifier; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; list = port; current = NULL; while(list != NULL){ if(!g_strcmp0(specifier, AGS_PORT(list->data)->specifier)){ current = list->data; break; } list = list->next; } if(current != NULL){ current->port_descriptor = port_descriptor->data; ags_recall_dssi_load_conversion(recall_dssi, (GObject *) current, port_descriptor->data); current->port_value.ags_port_float = (LADSPA_Data) g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value); // ags_conversion_convert(current->conversion, // g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value), // FALSE); g_message("connecting port: %lu/%lu", i, port_count); } }else if((AGS_PORT_DESCRIPTOR_AUDIO & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_dssi->input_port == NULL){ recall_dssi->input_port = (unsigned long *) malloc(sizeof(unsigned long)); recall_dssi->input_port[0] = i; }else{ recall_dssi->input_port = (unsigned long *) realloc(recall_dssi->input_port, (recall_dssi->input_lines + 1) * sizeof(unsigned long)); recall_dssi->input_port[recall_dssi->input_lines] = i; } recall_dssi->input_lines += 1; }else if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_dssi->output_port == NULL){ recall_dssi->output_port = (unsigned long *) malloc(sizeof(unsigned long)); recall_dssi->output_port[0] = i; }else{ recall_dssi->output_port = (unsigned long *) realloc(recall_dssi->output_port, (recall_dssi->output_lines + 1) * sizeof(unsigned long)); recall_dssi->output_port[recall_dssi->output_lines] = i; } recall_dssi->output_lines += 1; } } port_descriptor = port_descriptor->next; } AGS_RECALL(recall_dssi)->port = g_list_reverse(port); } } void ags_recall_dssi_finalize(GObject *gobject) { AgsRecallDssi *recall_dssi; recall_dssi = AGS_RECALL_DSSI(gobject); g_free(recall_dssi->filename); g_free(recall_dssi->effect); if(recall_dssi->input_port != NULL){ free(recall_dssi->input_port); } if(recall_dssi->output_port != NULL){ free(recall_dssi->output_port); } /* call parent */ G_OBJECT_CLASS(ags_recall_dssi_parent_class)->finalize(gobject); } void ags_recall_dssi_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsRecallDssi *gobject; AgsDssiPlugin *dssi_plugin; gchar *filename, *effect; unsigned long index; gobject = AGS_RECALL_DSSI(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); filename = xmlGetProp(node, "filename"); effect = xmlGetProp(node, "effect"); index = g_ascii_strtoull(xmlGetProp(node, "index"), NULL, 10); g_object_set(gobject, "filename", filename, "effect", effect, "index", index, NULL); ags_recall_dssi_load(gobject); } xmlNode* ags_recall_dssi_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsRecallDssi *recall_dssi; xmlNode *node; gchar *id; recall_dssi = AGS_RECALL_DSSI(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-recall-dssi"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_dssi, NULL)); xmlNewProp(node, "filename", g_strdup(recall_dssi->filename)); xmlNewProp(node, "effect", g_strdup(recall_dssi->effect)); xmlNewProp(node, "index", g_strdup_printf("%lu", recall_dssi->index)); xmlAddChild(parent, node); return(node); } /** * ags_recall_dssi_load: * @recall_dssi: an #AgsRecallDssi * * Set up DSSI handle. * * Since: 1.0.0 */ void ags_recall_dssi_load(AgsRecallDssi *recall_dssi) { AgsDssiPlugin *dssi_plugin; void *plugin_so; DSSI_Descriptor_Function dssi_descriptor; DSSI_Descriptor *plugin_descriptor; /* */ dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), recall_dssi->filename, recall_dssi->effect); plugin_so = AGS_BASE_PLUGIN(dssi_plugin)->plugin_so; if(plugin_so){ dssi_descriptor = (DSSI_Descriptor_Function) dlsym(plugin_so, "dssi_descriptor"); if(dlerror() == NULL && dssi_descriptor){ recall_dssi->plugin_descriptor = plugin_descriptor = dssi_descriptor(recall_dssi->index); } } } /** * ags_recall_dssi_load_ports: * @recall_dssi: an #AgsRecallDssi * * Set up DSSI ports. * * Returns: a #GList containing #AgsPort. * * Since: 1.0.0 */ GList* ags_recall_dssi_load_ports(AgsRecallDssi *recall_dssi) { AgsDssiPlugin *dssi_plugin; AgsPort *current; GList *port; GList *port_descriptor; unsigned long port_count; unsigned long i; dssi_plugin = ags_dssi_manager_find_dssi_plugin(ags_dssi_manager_get_instance(), recall_dssi->filename, recall_dssi->effect); port = NULL; port_descriptor = AGS_BASE_PLUGIN(dssi_plugin)->port; if(port_descriptor != NULL){ port_count = g_list_length(port_descriptor); for(i = 0; i < port_count; i++){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ gchar *plugin_name; gchar *specifier; plugin_name = g_strdup_printf("dssi-%lu", dssi_plugin->unique_id); specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; current = g_object_new(AGS_TYPE_PORT, "plugin-name", plugin_name, "specifier", specifier, "control-port", g_strdup_printf("%lu/%lu", i, port_count), "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, NULL); g_object_ref(current); current->flags |= AGS_PORT_USE_LADSPA_FLOAT; if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ AGS_RECALL(recall_dssi)->flags |= AGS_RECALL_HAS_OUTPUT_PORT; current->flags |= AGS_PORT_IS_OUTPUT; }else{ if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0 && (AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0){ current->flags |= AGS_PORT_INFINITE_RANGE; } } current->port_descriptor = port_descriptor->data; ags_recall_dssi_load_conversion(recall_dssi, (GObject *) current, port_descriptor->data); current->port_value.ags_port_ladspa = g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value); // g_message("connecting port: %d/%d %f", i, port_count, current->port_value.ags_port_float); port = g_list_prepend(port, current); }else if((AGS_PORT_DESCRIPTOR_AUDIO & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_dssi->input_port == NULL){ recall_dssi->input_port = (unsigned long *) malloc(sizeof(unsigned long)); recall_dssi->input_port[0] = i; }else{ recall_dssi->input_port = (unsigned long *) realloc(recall_dssi->input_port, (recall_dssi->input_lines + 1) * sizeof(unsigned long)); recall_dssi->input_port[recall_dssi->input_lines] = i; } recall_dssi->input_lines += 1; }else if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_dssi->output_port == NULL){ recall_dssi->output_port = (unsigned long *) malloc(sizeof(unsigned long)); recall_dssi->output_port[0] = i; }else{ recall_dssi->output_port = (unsigned long *) realloc(recall_dssi->output_port, (recall_dssi->output_lines + 1) * sizeof(unsigned long)); recall_dssi->output_port[recall_dssi->output_lines] = i; } recall_dssi->output_lines += 1; } } port_descriptor = port_descriptor->next; } AGS_RECALL(recall_dssi)->port = g_list_reverse(port); } // g_message("output lines: %d", recall_dssi->output_lines); return(g_list_copy(AGS_RECALL(recall_dssi)->port)); } /** * ags_recall_dssi_load_conversion: * @recall_dssi: the #AgsRecallDssi * @port: an #AgsPort * @port_descriptor: the #AgsPortDescriptor-struct * * Loads conversion object by using @port_descriptor and sets in on @port. * * Since: 1.0.0 */ void ags_recall_dssi_load_conversion(AgsRecallDssi *recall_dssi, GObject *port, gpointer port_descriptor) { AgsLadspaConversion *ladspa_conversion; if(recall_dssi == NULL || port == NULL || port_descriptor == NULL){ return; } ladspa_conversion = NULL; if((AGS_PORT_DESCRIPTOR_BOUNDED_BELOW & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_BELOW; } if((AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_ABOVE; } if((AGS_PORT_DESCRIPTOR_SAMPLERATE & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_SAMPLERATE; } if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_LOGARITHMIC; } if(ladspa_conversion != NULL){ g_object_set(port, "conversion", ladspa_conversion, NULL); } } /** * ags_recall_dssi_find: * @recall: a #GList containing #AgsRecall * @filename: plugin filename * @effect: effect's name * * Retrieve DSSI recall. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_recall_dssi_find(GList *recall, gchar *filename, gchar *effect) { while(recall != NULL){ if(AGS_IS_RECALL_DSSI(recall->data)){ if(!g_strcmp0(AGS_RECALL_DSSI(recall->data)->filename, filename) && !g_strcmp0(AGS_RECALL_DSSI(recall->data)->effect, effect)){ return(recall); } } recall = recall->next; } return(NULL); } /** * ags_recall_dssi_new: * @source: the source * @filename: the DSSI plugin filename * @effect: effect's name * @index: effect's index * * Creates a #AgsRecallDssi * * Returns: a new #AgsRecallDssi * * Since: 1.0.0 */ AgsRecallDssi* ags_recall_dssi_new(AgsChannel *source, gchar *filename, gchar *effect, unsigned long index) { GObject *soundcard; AgsRecallDssi *recall_dssi; if(source != NULL){ soundcard = (GObject *) source->soundcard; }else{ soundcard = NULL; } recall_dssi = (AgsRecallDssi *) g_object_new(AGS_TYPE_RECALL_DSSI, "soundcard", soundcard, "source", source, "filename", filename, "effect", effect, "index", index, NULL); return(recall_dssi); } gsequencer-1.4.24/ags/audio/ags_audio.c0000644000175000017500000042733013256163135014654 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /** * SECTION:ags_audio * @short_description: A container of channels organizing them as input or output * @title: AgsAudio * @section_id: * @include: ags/audio/ags_audio.h * * #AgsAudio organizes #AgsChannel objects either as input or output and * is responsible of their alignment. The class can contain #AgsRecall objects * in order to perform computation on all channels or in audio context. * Therefor exists #AgsRecyclingContext acting as tree context. * * At least one #AgsRecallID is assigned to it and has one more if * %AGS_AUDIO_OUTPUT_HAS_RECYCLING is set as flag. * * If %AGS_AUDIO_HAS_NOTATION is set as flag one #AgsNotation is allocated per audio * channel. */ void ags_audio_class_init(AgsAudioClass *audio_class); void ags_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_audio_init(AgsAudio *audio); void ags_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_audio_add_to_registry(AgsConnectable *connectable); void ags_audio_remove_from_registry(AgsConnectable *connectable); void ags_audio_connect(AgsConnectable *connectable); void ags_audio_disconnect(AgsConnectable *connectable); void ags_audio_dispose(GObject *gobject); void ags_audio_finalize(GObject *gobject); void ags_audio_real_check_connection(AgsAudio *audio); void ags_audio_real_set_audio_channels(AgsAudio *audio, guint audio_channels, guint audio_channels_old); void ags_audio_real_set_pads(AgsAudio *audio, GType type, guint channels, guint channels_old); void ags_audio_real_done(AgsAudio *audio, AgsRecallID *recall_id); enum{ CHECK_CONNECTION, SET_AUDIO_CHANNELS, SET_PADS, INIT_RUN, TACT, DONE, LAST_SIGNAL, }; enum{ PROP_0, PROP_SOUNDCARD, PROP_SEQUENCER, PROP_MIDI_FILE, PROP_SAMPLERATE, PROP_BUFFER_SIZE, PROP_FORMAT, PROP_SEQUENCE_LENGTH, PROP_AUDIO_CHANNELS, PROP_INPUT_PADS, PROP_INPUT_LINES, PROP_OUTPUT_PADS, PROP_OUTPUT_LINES, PROP_AUDIO_START_MAPPING, PROP_AUDIO_END_MAPPING, PROP_MIDI_START_MAPPING, PROP_MIDI_END_MAPPING, PROP_MIDI_CHANNEL, PROP_AUDIO_CONNECTION, PROP_PRESET, PROP_OUTPUT, PROP_INPUT, PROP_PLAYBACK_DOMAIN, PROP_NOTATION, PROP_AUTOMATION, PROP_WAVE, PROP_RECALL_ID, PROP_RECYCLING_CONTEXT, PROP_RECALL_CONTAINER, PROP_PLAY, PROP_RECALL, }; static gpointer ags_audio_parent_class = NULL; static guint audio_signals[LAST_SIGNAL]; GType ags_audio_get_type (void) { static GType ags_type_audio = 0; if(!ags_type_audio){ static const GTypeInfo ags_audio_info = { sizeof(AgsAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof(AgsAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audio = g_type_register_static(G_TYPE_OBJECT, "AgsAudio", &ags_audio_info, 0); g_type_add_interface_static(ags_type_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_audio); } void ags_audio_class_init(AgsAudioClass *audio) { GObjectClass *gobject; GParamSpec *param_spec; ags_audio_parent_class = g_type_class_peek_parent(audio); /* GObjectClass */ gobject = (GObjectClass *) audio; gobject->set_property = ags_audio_set_property; gobject->get_property = ags_audio_get_property; gobject->dispose = ags_audio_dispose; gobject->finalize = ags_audio_finalize; /* properties */ /** * AgsAudio:soundcard: * * The assigned #AgsSoundcard acting as default sink. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsAudio:sequencer: * * The assigned #AgsSequencer acting as default sink. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer", i18n_pspec("assigned sequencer"), i18n_pspec("The sequencer it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER, param_spec); /** * AgsAudio:midi-file: * * The assigned #AgsMidiFile acting as default sink. * * Since: 1.0.0 */ param_spec = g_param_spec_object("midi-file", i18n_pspec("assigned midi_file"), i18n_pspec("The midi file it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MIDI_FILE, param_spec); /** * AgsAudio:samplerate: * * The samplerate. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("samplerate"), i18n_pspec("The samplerate"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsAudio:buffer-size: * * The buffer length. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("buffer size"), i18n_pspec("The buffer size"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsAudio:format: * * The format. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("format"), i18n_pspec("The format"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsAudio:sequence-length: * * The sequence length. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("sequence-length", i18n_pspec("sequence-length"), i18n_pspec("The sequence length"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCE_LENGTH, param_spec); /** * AgsAudio:audio-channels: * * The audio channels count. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channels", i18n_pspec("audio channels count"), i18n_pspec("The count of audio channels of audio"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNELS, param_spec); /** * AgsAudio:input-pads: * * The input pads count. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("input-pads", i18n_pspec("input pads count"), i18n_pspec("The count of input pads of audio"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INPUT_PADS, param_spec); /** * AgsAudio:input-lines: * * The input lines count. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("input-lines", i18n_pspec("input lines count"), i18n_pspec("The count of input lines of audio"), 0, 65535, 0, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_INPUT_LINES, param_spec); /** * AgsAudio:output-pads: * * The output pads count. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("output-pads", i18n_pspec("output pads count"), i18n_pspec("The count of output pads of audio"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_OUTPUT_PADS, param_spec); /** * AgsAudio:output-lines: * * The output lines count. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("output-lines", i18n_pspec("output lines count"), i18n_pspec("The count of output lines of audio"), 0, 65535, 0, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_OUTPUT_LINES, param_spec); /** * AgsAudio:audio-start-mapping: * * The audio start mapping. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-start-mapping", i18n_pspec("audio start mapping"), i18n_pspec("The audio start mapping"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_START_MAPPING, param_spec); /** * AgsAudio:audio-end-mapping: * * The audio end mapping. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-end-mapping", i18n_pspec("audio end mapping"), i18n_pspec("The audio end mapping"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_END_MAPPING, param_spec); /** * AgsAudio:midi-start-mapping: * * The midi start mapping. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("midi-start-mapping", i18n_pspec("midi start mapping range"), i18n_pspec("The midi mapping range's start"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MIDI_START_MAPPING, param_spec); /** * AgsAudio:midi-end-mapping: * * The midi end mapping. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("midi-end-mapping", i18n_pspec("midi end mapping range"), i18n_pspec("The midi mapping range's start"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MIDI_END_MAPPING, param_spec); /** * AgsAudio:midi-channel: * * The midi channel. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("midi-channel", i18n_pspec("midi channel"), i18n_pspec("The midi channel"), 0, 16, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MIDI_CHANNEL, param_spec); /** * AgsAudio:audio-connection: * * The assigned #GList-struct containing #AgsAudioConnection information. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-connection", i18n_pspec("audio connection"), i18n_pspec("The audio connection information"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CONNECTION, param_spec); /** * AgsAudio:preset: * * The assigned #GList-struct containing #AgsPreset information. * * Since: 1.0.0 */ param_spec = g_param_spec_object("preset", i18n_pspec("preset"), i18n_pspec("The preset"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PRESET, param_spec); /** * AgsAudio:output: * * The #AgsOutput it contains. * * Since: 1.0.0 */ param_spec = g_param_spec_object("output", i18n_pspec("containing output"), i18n_pspec("The output it contains"), AGS_TYPE_OUTPUT, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_OUTPUT, param_spec); /** * AgsAudio:input: * * The #AgsInput it contains. * * Since: 1.0.0 */ param_spec = g_param_spec_object("input", i18n_pspec("containing input"), i18n_pspec("The input it contains"), AGS_TYPE_INPUT, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_INPUT, param_spec); /** * AgsAudio:playback-domain: * * The assigned #AgsPlaybackDomain. * * Since: 1.0.0 */ param_spec = g_param_spec_object("playback-domain", i18n_pspec("assigned playback domain"), i18n_pspec("The assigned playback domain"), AGS_TYPE_PLAYBACK_DOMAIN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK_DOMAIN, param_spec); /** * AgsAudio:notation: * * The #AgsNotation it contains. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("notation", i18n_pspec("containing notation"), i18n_pspec("The notation it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsAudio:automation: * * The #AgsAutomation it contains. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("automation", i18n_pspec("containing automation"), i18n_pspec("The automation it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUTOMATION, param_spec); /** * AgsAudio:wave: * * The #AgsWave it contains. * * Since: 1.4.0 */ param_spec = g_param_spec_pointer("wave", i18n_pspec("containing wave"), i18n_pspec("The wave it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_WAVE, param_spec); /** * AgsAudio:recall-id: * * The assigned #AgsRecallID. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("recall-id", i18n_pspec("assigned recall id"), i18n_pspec("The assigned recall id"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_OUTPUT, param_spec); /** * AgsAudio:recycling-context: * * The assigned #AgsRecyclingContext. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("recycling-context", i18n_pspec("assigned recycling context"), i18n_pspec("The assigned recall id"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_OUTPUT, param_spec); /** * AgsAudio:recall-container: * * The #AgsRecallContainer it contains in container-context. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("recall-container", i18n_pspec("containing recall container"), i18n_pspec("The recall container it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CONTAINER, param_spec); /** * AgsAudio:play: * * The #AgsRecall it contains in play-context. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("play", i18n_pspec("containing play"), i18n_pspec("The play it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAY, param_spec); /** * AgsAudio:recall: * * The #AgsRecall it contains in recall-context. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("recall", i18n_pspec("containing recall"), i18n_pspec("The recall it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL, param_spec); /* AgsAudioClass */ audio->check_connection = ags_audio_real_check_connection; audio->set_audio_channels = ags_audio_real_set_audio_channels; audio->set_pads = ags_audio_real_set_pads; audio->init_run = NULL; audio->tact = NULL; audio->done = ags_audio_real_done; /* signals */ /** * AgsAudio::check-connection: * @audio: the object to init run. * * The ::check-connection checks your audio connections. * * Since: 1.0.0 */ audio_signals[CHECK_CONNECTION] = g_signal_new("check-connection", G_TYPE_FROM_CLASS(audio), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsAudioClass, check_connection), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * AgsAudio::set-audio-channels: * @audio: the object to adjust the channels. * @audio_channels_new: new audio channel count * @audio_channels_old: old audio channel count * * The ::set-audio-channels signal notifies about changes in channel * alignment. */ audio_signals[SET_AUDIO_CHANNELS] = g_signal_new("set-audio-channels", G_TYPE_FROM_CLASS(audio), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsAudioClass, set_audio_channels), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); /** * AgsAudio::set-pads: * @audio: the object to adjust pads. * @channel_type: either #AGS_TYPE_INPUT or #AGS_TYPE_OUTPUT * @pads_new: new pad count * @pads_old: old pad count * * The ::set-pads signal notifies about changes in channel * alignment. */ audio_signals[SET_PADS] = g_signal_new("set-pads", G_TYPE_FROM_CLASS(audio), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsAudioClass, set_pads), NULL, NULL, g_cclosure_user_marshal_VOID__ULONG_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_ULONG, G_TYPE_UINT, G_TYPE_UINT); /** * AgsAudio::init-run: * @audio: the object to init run. * * The ::init-run signal is invoked during dynamic initialization of recalls * of @audio. * * Returns: the current #AgsRecallID */ audio_signals[INIT_RUN] = g_signal_new("init-run", G_TYPE_FROM_CLASS(audio), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsAudioClass, init_run), NULL, NULL, g_cclosure_user_marshal_OBJECT__VOID, G_TYPE_OBJECT, 0); /** * AgsAudio::tact: * @audio: the object playing. * @recall_id: the appropriate #AgsRecallID * * The ::tact signal is invoked during playback of recalls * of @audio. */ audio_signals[TACT] = g_signal_new("tact", G_TYPE_FROM_CLASS(audio), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsAudioClass, tact), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); /** * AgsAudio::done: * @audio: the object done playing. * @recall_id: the appropriate #AgsRecallID * * The ::done signal is invoked while terminating playback * of @audio. */ audio_signals[DONE] = g_signal_new("done", G_TYPE_FROM_CLASS(audio), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsAudioClass, done), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_audio_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = ags_audio_add_to_registry; connectable->remove_from_registry = ags_audio_remove_from_registry; connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_audio_connect; connectable->disconnect = ags_audio_disconnect; } void ags_audio_init(AgsAudio *audio) { AgsConfig *config; AgsMutexManager *mutex_manager; gchar *str; gchar *str0, *str1; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert audio mutex */ audio->obj_mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif audio->obj_mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) audio, mutex); pthread_mutex_unlock(application_mutex); /* config */ config = ags_config_get_instance(); /* base init */ audio->flags = 0; audio->soundcard = NULL; audio->sequencer = NULL; audio->midi_file = NULL; audio->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; audio->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; audio->format = AGS_SOUNDCARD_DEFAULT_FORMAT; audio->sequence_length = 0; /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ audio->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ audio->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ audio->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* channel allocation */ audio->audio_channels = 0; audio->output_pads = 0; audio->output_lines = 0; audio->input_pads = 0; audio->input_lines = 0; /* bank */ audio->bank_dim[0] = 0; audio->bank_dim[1] = 0; audio->bank_dim[2] = 0; /* midi mapping */ audio->audio_start_mapping = 0; audio->audio_end_mapping = 0; audio->midi_start_mapping = 0; audio->midi_end_mapping = 0; audio->midi_channel = 0; /* mapping */ audio->audio_connection = NULL; /* preset */ audio->preset = NULL; /* channels */ audio->output = NULL; audio->input = NULL; /* playback domain */ audio->playback_domain = (GObject *) ags_playback_domain_new(); g_object_ref(audio->playback_domain); g_object_set(audio->playback_domain, "domain", audio, NULL); /* notation, automation and wave */ audio->notation = NULL; audio->automation = NULL; audio->wave = NULL; /* recycling context */ audio->recall_id = NULL; audio->recycling_context = NULL; /* recall */ audio->recall_mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); audio->recall_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(audio->recall_mutex, attr); audio->play_mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); audio->play_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(audio->play_mutex, attr); audio->container = NULL; audio->recall = NULL; audio->play = NULL; audio->recall_remove= NULL; audio->play_remove = NULL; /* data */ audio->machine = NULL; } void ags_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAudio *audio; audio = AGS_AUDIO(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = g_value_get_object(value); ags_audio_set_soundcard(audio, (GObject *) soundcard); } break; case PROP_SEQUENCER: { GObject *sequencer; sequencer = g_value_get_object(value); if(audio->sequencer == sequencer){ return; } if(audio->sequencer != NULL){ g_object_unref(audio->sequencer); } if(sequencer != NULL) { g_object_ref(sequencer); } audio->sequencer = sequencer; } break; case PROP_MIDI_FILE: { GObject *midi_file; midi_file = g_value_get_object(value); if(audio->midi_file == midi_file){ return; } if(audio->midi_file != NULL){ g_object_unref(audio->midi_file); } if(midi_file != NULL) { g_object_ref(midi_file); } audio->midi_file = midi_file; } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); ags_audio_set_samplerate(audio, samplerate); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); ags_audio_set_buffer_size(audio, buffer_size); } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); ags_audio_set_format(audio, format); } break; case PROP_SEQUENCE_LENGTH: { guint sequence_length; sequence_length = g_value_get_uint(value); ags_audio_set_sequence_length(audio, sequence_length); } break; case PROP_AUDIO_CHANNELS: { guint audio_channels; audio_channels = g_value_get_uint(value); ags_audio_set_audio_channels(audio, audio_channels); } break; case PROP_INPUT_PADS: { guint input_pads; input_pads = g_value_get_uint(value); ags_audio_set_pads(audio, AGS_TYPE_INPUT, input_pads); } break; case PROP_OUTPUT_PADS: { guint output_pads; output_pads = g_value_get_uint(value); ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, output_pads); } break; case PROP_AUDIO_START_MAPPING: { guint audio_start_mapping; audio_start_mapping = g_value_get_uint(value); audio->audio_start_mapping = audio_start_mapping; } break; case PROP_AUDIO_END_MAPPING: { guint audio_end_mapping; audio_end_mapping = g_value_get_uint(value); audio->audio_end_mapping = audio_end_mapping; } break; case PROP_MIDI_START_MAPPING: { guint midi_start_mapping; midi_start_mapping = g_value_get_uint(value); audio->midi_start_mapping = midi_start_mapping; } break; case PROP_MIDI_END_MAPPING: { guint midi_end_mapping; midi_end_mapping = g_value_get_uint(value); audio->midi_end_mapping = midi_end_mapping; } break; case PROP_MIDI_CHANNEL: { guint midi_channel; midi_channel = g_value_get_uint(value); audio->midi_channel = midi_channel; } break; case PROP_AUDIO_CONNECTION: { AgsAudioConnection *audio_connection; audio_connection = (AgsAudioConnection *) g_value_get_object(value); if(audio_connection == NULL || g_list_find(audio->audio_connection, audio_connection) != NULL){ return; } ags_audio_add_audio_connection(audio, (GObject *) audio_connection); } break; case PROP_PRESET: { AgsPreset *preset; preset = (AgsPreset *) g_value_get_object(value); if(preset == NULL || g_list_find(audio->preset, preset) != NULL){ return; } ags_audio_add_preset(audio, (GObject *) preset); } break; case PROP_PLAYBACK_DOMAIN: { AgsPlaybackDomain *playback_domain; playback_domain = (AgsPlaybackDomain *) g_value_get_object(value); if(audio->playback_domain == (GObject *) playback_domain){ return; } if(audio->playback_domain != NULL){ g_object_unref(audio->playback_domain); } if(playback_domain != NULL){ g_object_ref(playback_domain); } audio->playback_domain = (GObject *) playback_domain; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_pointer(value); if(notation == NULL || g_list_find(audio->notation, notation) != NULL){ return; } ags_audio_add_notation(audio, (GObject *) notation); } break; case PROP_AUTOMATION: { AgsAutomation *automation; automation = (AgsAutomation *) g_value_get_pointer(value); if(automation == NULL || g_list_find(audio->automation, automation) != NULL){ return; } ags_audio_add_automation(audio, (GObject *) automation); } break; case PROP_WAVE: { AgsWave *wave; wave = (AgsWave *) g_value_get_pointer(value); if(wave == NULL || g_list_find(audio->wave, wave) != NULL){ return; } ags_audio_add_wave(audio, (GObject *) wave); } break; case PROP_RECALL_ID: { AgsRecallID *recall_id; recall_id = (AgsRecallID *) g_value_get_pointer(value); if(recall_id == NULL || g_list_find(audio->recall_id, recall_id) != NULL){ return; } ags_audio_add_recall_id(audio, (GObject *) recall_id); } break; case PROP_RECYCLING_CONTEXT: { AgsRecyclingContext *recycling_context; recycling_context = (AgsRecyclingContext *) g_value_get_pointer(value); if(recycling_context == NULL || g_list_find(audio->recycling_context, recycling_context) != NULL){ return; } ags_audio_add_recycling_context(audio, (GObject *) recycling_context); } break; case PROP_RECALL_CONTAINER: { AgsRecallContainer *recall_container; recall_container = (AgsRecallContainer *) g_value_get_pointer(value); if(recall_container == NULL || g_list_find(audio->container, recall_container) != NULL){ return; } ags_audio_add_recall_container(audio, (GObject *) recall_container); } break; case PROP_PLAY: { AgsRecall *recall; gboolean play_added; recall = (AgsRecall *) g_value_get_pointer(value); pthread_mutex_lock(audio->play_mutex); play_added = (g_list_find(audio->play, recall) != NULL) ? TRUE: FALSE; pthread_mutex_unlock(audio->play_mutex); if(recall == NULL || play_added){ return; } ags_audio_add_recall(audio, (GObject *) recall, TRUE); } break; case PROP_RECALL: { AgsRecall *recall; gboolean recall_added; recall = (AgsRecall *) g_value_get_pointer(value); pthread_mutex_lock(audio->recall_mutex); recall_added = (g_list_find(audio->recall, recall) != NULL) ? TRUE: FALSE; pthread_mutex_unlock(audio->recall_mutex); if(recall == NULL || recall_added){ return; } ags_audio_add_recall(audio, (GObject *) recall, FALSE); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); } } void ags_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAudio *audio; audio = AGS_AUDIO(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, audio->soundcard); } break; case PROP_SEQUENCER: { g_value_set_object(value, audio->sequencer); } break; case PROP_MIDI_FILE: { g_value_set_object(value, audio->midi_file); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, audio->samplerate); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, audio->buffer_size); } break; case PROP_FORMAT: { g_value_set_uint(value, audio->format); } break; case PROP_SEQUENCE_LENGTH: { g_value_set_uint(value, audio->sequence_length); } break; case PROP_AUDIO_CHANNELS: { g_value_set_uint(value, audio->audio_channels); } break; case PROP_INPUT_PADS: { g_value_set_uint(value, audio->input_pads); } break; case PROP_INPUT_LINES: { g_value_set_uint(value, audio->input_lines); } break; case PROP_OUTPUT_PADS: { g_value_set_uint(value, audio->output_pads); } break; case PROP_OUTPUT_LINES: { g_value_set_uint(value, audio->output_lines); } break; case PROP_AUDIO_START_MAPPING: { g_value_set_uint(value, audio->audio_start_mapping); } break; case PROP_AUDIO_END_MAPPING: { g_value_set_uint(value, audio->audio_end_mapping); } break; case PROP_MIDI_START_MAPPING: { g_value_set_uint(value, audio->midi_start_mapping); } break; case PROP_MIDI_END_MAPPING: { g_value_set_uint(value, audio->midi_end_mapping); } break; case PROP_MIDI_CHANNEL: { g_value_set_uint(value, audio->midi_channel); } break; case PROP_OUTPUT: { g_value_set_object(value, audio->output); } break; case PROP_INPUT: { g_value_set_object(value, audio->input); } break; case PROP_PLAYBACK_DOMAIN: { g_value_set_object(value, audio->playback_domain); } break; case PROP_NOTATION: { g_value_set_pointer(value, g_list_copy(audio->notation)); } break; case PROP_AUTOMATION: { g_value_set_pointer(value, g_list_copy(audio->automation)); } break; case PROP_WAVE: { g_value_set_pointer(value, g_list_copy(audio->wave)); } break; case PROP_RECALL_ID: { g_value_set_pointer(value, g_list_copy(audio->recall_id)); } break; case PROP_RECYCLING_CONTEXT: { g_value_set_pointer(value, g_list_copy(audio->recycling_context)); } break; case PROP_RECALL_CONTAINER: { g_value_set_pointer(value, g_list_copy(audio->container)); } break; case PROP_PLAY: { pthread_mutex_lock(audio->play_mutex); g_value_set_pointer(value, g_list_copy(audio->play)); pthread_mutex_unlock(audio->play_mutex); } break; case PROP_RECALL: { pthread_mutex_lock(audio->recall_mutex); g_value_set_pointer(value, g_list_copy(audio->recall)); pthread_mutex_unlock(audio->recall_mutex); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); } } void ags_audio_dispose(GObject *gobject) { AgsAudio *audio; GList *list, *list_next; audio = AGS_AUDIO(gobject); /* soundcard */ if(audio->soundcard != NULL){ g_object_unref(audio->soundcard); audio->soundcard = NULL; } /* sequencer */ if(audio->sequencer != NULL){ g_object_unref(audio->sequencer); audio->sequencer = NULL; } /* midi file */ if(audio->midi_file != NULL){ g_object_unref(audio->midi_file); audio->midi_file = NULL; } /* audio connection */ if(audio->audio_connection != NULL){ list = audio->audio_connection; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->audio_connection, g_object_unref); audio->audio_connection = NULL; } /* preset */ if(audio->preset != NULL){ list = audio->preset; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->preset, g_object_unref); audio->preset = NULL; } /* notation */ if(audio->notation != NULL){ list = audio->notation; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->notation, g_object_unref); audio->notation = NULL; } /* automation */ if(audio->automation != NULL){ list = audio->automation; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->automation, g_object_unref); audio->automation = NULL; } /* wave */ if(audio->wave != NULL){ list = audio->wave; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->wave, g_object_unref); audio->wave = NULL; } /* recall id */ if(audio->recall_id != NULL){ list = audio->recall_id; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->recall_id, g_object_unref); audio->recall_id = NULL; } /* recycling context */ if(audio->recycling_context != NULL){ list = audio->recycling_context; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->recycling_context, g_object_unref); audio->recycling_context = NULL; } /* recall container */ if(audio->container != NULL){ list = audio->container; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->container, g_object_unref); audio->container = NULL; } /* recall */ if(audio->recall != NULL){ pthread_mutex_lock(audio->recall_mutex); list = audio->recall; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->recall, g_object_unref); audio->recall = NULL; pthread_mutex_unlock(audio->recall_mutex); } /* play */ if(audio->play != NULL){ pthread_mutex_lock(audio->play_mutex); list = audio->play; while(list != NULL){ list_next = list->next; g_object_run_dispose(list->data); list = list_next; } g_list_free_full(audio->play, g_object_unref); audio->play = NULL; pthread_mutex_unlock(audio->play_mutex); } /* remove */ if(audio->recall_remove != NULL){ g_list_free_full(audio->recall_remove, g_object_unref); } if(audio->play_remove != NULL){ g_list_free_full(audio->play_remove, g_object_unref); } audio->recall_remove = NULL; audio->play_remove = NULL; /* channels */ ags_audio_set_audio_channels(audio, 0); ags_audio_set_pads(audio, AGS_TYPE_INPUT, 0); ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, 0); /* playback domain */ if(audio->playback_domain != NULL){ AgsPlaybackDomain *playback_domain; playback_domain = audio->playback_domain; if(playback_domain->audio_thread != NULL){ if(playback_domain->audio_thread[0] != NULL){ ags_thread_stop(playback_domain->audio_thread[0]); } if(playback_domain->audio_thread[1] != NULL){ ags_thread_stop(playback_domain->audio_thread[1]); } if(playback_domain->audio_thread[2] != NULL){ ags_thread_stop(playback_domain->audio_thread[2]); } } g_object_run_dispose(audio->playback_domain); audio->playback_domain = NULL; } /* call parent */ G_OBJECT_CLASS(ags_audio_parent_class)->dispose(gobject); } void ags_audio_finalize(GObject *gobject) { AgsAudio *audio; AgsChannel *channel; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); audio = AGS_AUDIO(gobject); pthread_mutexattr_destroy(audio->obj_mutexattr); free(audio->obj_mutexattr); if(audio->soundcard != NULL){ g_object_unref(audio->soundcard); } if(audio->sequencer != NULL){ g_object_unref(audio->sequencer); } if(audio->midi_file != NULL){ g_object_unref(audio->midi_file); } /* audio connection */ if(audio->audio_connection != NULL){ list = audio->audio_connection; while(list != NULL){ g_object_set(list->data, "audio", NULL, NULL); list = list->next; } g_list_free_full(audio->audio_connection, g_object_unref); } /* audio connection */ if(audio->preset != NULL){ list = audio->preset; while(list != NULL){ g_object_set(list->data, "audio", NULL, NULL); list = list->next; } g_list_free_full(audio->preset, g_object_unref); } /* playback domain */ if(audio->playback_domain != NULL){ g_object_unref(audio->playback_domain); } /* notation */ if(audio->notation != NULL){ list = audio->notation; while(list != NULL){ g_object_set(list->data, "audio", NULL, NULL); list = list->next; } g_list_free_full(audio->notation, g_object_unref); } /* automation */ if(audio->automation != NULL){ list = audio->automation; while(list != NULL){ g_object_set(list->data, "audio", NULL, NULL); list = list->next; } g_list_free_full(audio->automation, g_object_unref); } /* wave */ if(audio->wave != NULL){ list = audio->wave; while(list != NULL){ g_object_set(list->data, "audio", NULL, NULL); list = list->next; } g_list_free_full(audio->wave, g_object_unref); } /* recall id */ if(audio->recall_id != NULL){ g_list_free_full(audio->recall_id, g_object_unref); } /* recycling context */ if(audio->recycling_context != NULL){ g_list_free_full(audio->recycling_context, g_object_unref); } /* recall */ if(audio->container != NULL){ g_list_free_full(audio->container, g_object_unref); } if(audio->recall != NULL){ list = audio->recall; while(list != NULL){ if(AGS_IS_RECALL_AUDIO(list->data) || AGS_IS_RECALL_AUDIO_RUN(list->data)){ g_object_set(list->data, "audio", NULL, NULL); } list = list->next; } g_list_free_full(audio->recall, g_object_unref); } if(audio->play != NULL){ list = audio->play; while(list != NULL){ if(AGS_IS_RECALL_AUDIO(list->data) || AGS_IS_RECALL_AUDIO_RUN(list->data)){ g_object_set(list->data, "audio", NULL, NULL); } list = list->next; } g_list_free_full(audio->play, g_object_unref); } pthread_mutex_destroy(audio->recall_mutex); free(audio->recall_mutex); pthread_mutexattr_destroy(audio->recall_mutexattr); free(audio->recall_mutexattr); pthread_mutex_destroy(audio->play_mutex); free(audio->play_mutex); pthread_mutexattr_destroy(audio->play_mutexattr); free(audio->play_mutexattr); /* remove */ if(audio->recall_remove != NULL){ g_list_free_full(audio->recall_remove, g_object_unref); } if(audio->play_remove != NULL){ g_list_free_full(audio->play_remove, g_object_unref); } /* channels */ ags_audio_set_audio_channels(audio, 0); ags_audio_set_pads(audio, AGS_TYPE_INPUT, 0); ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, 0); /* call parent */ G_OBJECT_CLASS(ags_audio_parent_class)->finalize(gobject); } void ags_audio_add_to_registry(AgsConnectable *connectable) { AgsAudio *audio; AgsChannel *channel; AgsRegistry *registry; AgsRegistryEntry *entry; AgsApplicationContext *application_context; GList *list; audio = AGS_AUDIO(connectable); application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(audio->soundcard)); registry = ags_service_provider_get_registry(AGS_SERVICE_PROVIDER(application_context)); if(registry != NULL){ entry = ags_registry_entry_alloc(registry); g_value_set_object(&(entry->entry), (gpointer) audio); ags_registry_add_entry(registry, entry); } /* add play */ list = audio->play; while(list != NULL){ ags_connectable_add_to_registry(AGS_CONNECTABLE(list->data)); list = list->next; } /* add recall */ list = audio->recall; while(list != NULL){ ags_connectable_add_to_registry(AGS_CONNECTABLE(list->data)); list = list->next; } /* add output */ channel = audio->output; while(channel != NULL){ ags_connectable_add_to_registry(AGS_CONNECTABLE(channel)); channel = channel->next; } /* add input */ channel = audio->input; while(channel != NULL){ ags_connectable_add_to_registry(AGS_CONNECTABLE(channel)); channel = channel->next; } } void ags_audio_remove_from_registry(AgsConnectable *connectable) { //TODO:JK: implement me } void ags_audio_connect(AgsConnectable *connectable) { AgsAudio *audio; AgsChannel *channel; GList *list; audio = AGS_AUDIO(connectable); if((AGS_AUDIO_CONNECTED & (audio->flags)) != 0){ return; } audio->flags |= AGS_AUDIO_CONNECTED; #ifdef AGS_DEBUG g_message("connecting audio"); #endif /* connect channels */ channel = audio->output; while(channel != NULL){ ags_connectable_connect(AGS_CONNECTABLE(channel)); channel = channel->next; } channel = audio->input; while(channel != NULL){ ags_connectable_connect(AGS_CONNECTABLE(channel)); channel = channel->next; } /* connect recall ids */ list = audio->recall_id; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recall containers */ list = audio->container; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recalls */ list = audio->recall; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } list = audio->play; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect remove recalls */ list = audio->recall_remove; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } list = audio->play_remove; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect notation */ list = audio->notation; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_audio_disconnect(AgsConnectable *connectable) { AgsAudio *audio; AgsChannel *channel; GList *list; audio = AGS_AUDIO(connectable); if((AGS_AUDIO_CONNECTED & (audio->flags)) == 0){ return; } audio->flags &= (~AGS_AUDIO_CONNECTED); #ifdef AGS_DEBUG g_message("disconnecting audio"); #endif /* connect channels */ channel = audio->output; while(channel != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(channel)); channel = channel->next; } channel = audio->input; while(channel != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(channel)); channel = channel->next; } /* connect recall ids */ list = audio->recall_id; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recall containers */ list = audio->container; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect recalls */ list = audio->recall; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } list = audio->play; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect remove recalls */ list = audio->recall_remove; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } list = audio->play_remove; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } /* connect notation */ list = audio->notation; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } /** * ags_audio_set_soundcard: * @audio: the #AgsAudio * @soundcard: an #AgsSoundcard * * Sets a soundcard object on audio. * * Since: 1.0.0 */ void ags_audio_set_soundcard(AgsAudio *audio, GObject *soundcard) { AgsChannel *channel; AgsMutexManager *mutex_manager; GObject *old_soundcard; GList *list; guint samplerate; guint buffer_size; guint format; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); /* audio */ old_soundcard = audio->soundcard; if(old_soundcard == soundcard){ pthread_mutex_unlock(mutex); return; } if(soundcard != NULL){ g_object_ref(soundcard); } audio->soundcard = (GObject *) soundcard; if(soundcard != NULL){ ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, &buffer_size, &format); g_object_set(audio, "samplerate", samplerate, "buffer-size", buffer_size, "format", format, NULL); } /* playback domain */ if(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1] != NULL){ if(AGS_AUDIO_THREAD(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1])->soundcard == old_soundcard){ g_object_set(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1], "soundcard", soundcard, NULL); } } if(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[2] != NULL){ if(AGS_AUDIO_THREAD(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[2])->soundcard == old_soundcard){ g_object_set(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[2], "soundcard", soundcard, NULL); } } /* recall */ list = audio->play; while(list != NULL){ if(AGS_RECALL(list->data)->soundcard == old_soundcard){ g_object_set(G_OBJECT(list->data), "soundcard", soundcard, NULL); } list = list->next; } list = audio->recall; while(list != NULL){ if(AGS_RECALL(list->data)->soundcard == old_soundcard){ g_object_set(G_OBJECT(list->data), "soundcard", soundcard, NULL); } list = list->next; } /* input */ channel = audio->input; while(channel != NULL){ if(channel->soundcard == old_soundcard){ g_object_set(G_OBJECT(channel), "soundcard", soundcard, NULL); } channel = channel->next; } /* output */ channel = audio->output; while(channel != NULL){ if(channel->soundcard == old_soundcard){ g_object_set(G_OBJECT(channel), "soundcard", soundcard, NULL); } channel = channel->next; } if(old_soundcard != NULL){ g_object_unref(old_soundcard); } pthread_mutex_unlock(mutex); } /** * ags_audio_set_flags: * @audio: an AgsAudio * @flags: see enum AgsAudioFlags * * Enable a feature of AgsAudio. * * Since: 1.0.0 */ void ags_audio_set_flags(AgsAudio *audio, guint flags) { auto GParameter* ags_audio_set_flags_set_recycling_parameter(GType type); auto void ags_audio_set_flags_add_recycling_task(GParameter *parameter); GParameter* ags_audio_set_flags_set_recycling_parameter(GType type){ AgsChannel *channel, *start_channel, *end_channel; AgsRecycling *recycling, *recycling_next, *start_recycling, *end_recycling; GParameter *parameter; int i; parameter = g_new(GParameter, 4 * audio->audio_channels); for(i = 0; i < audio->audio_channels; i++){ start_channel = channel = ags_channel_nth(((g_type_is_a(type, AGS_TYPE_INPUT)) ? audio->input: audio->output), i); end_channel = NULL; start_recycling = recycling = NULL; end_recycling = NULL; if(channel != NULL){ start_recycling = recycling = ags_recycling_new(audio->soundcard); goto ags_audio_set_flags_OUTPUT_RECYCLING; } while(channel != NULL){ recycling->next = ags_recycling_new(audio->soundcard); ags_audio_set_flags_OUTPUT_RECYCLING: recycling->next->prev = recycling; recycling = recycling->next; channel = channel->next_pad; } end_channel = ags_channel_pad_last(start_channel); end_recycling = recycling; /* setting up parameters */ parameter[i].name = "start_channel"; g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), start_channel); parameter[i].name = "end_channel"; g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), end_channel); parameter[i].name = "start_recycling"; g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), start_recycling); parameter[i].name = "end_recycling"; g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), end_recycling); } return(parameter); } void ags_audio_set_flags_add_recycling_task(GParameter *parameter){ //TODO:JK: implement me } if(audio == NULL || !AGS_IS_AUDIO(audio)){ return; } if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags))){ GParameter *parameter; /* check if output has already recyclings */ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){ if(audio->output_pads > 0){ parameter = ags_audio_set_flags_set_recycling_parameter(AGS_TYPE_OUTPUT); ags_audio_set_flags_add_recycling_task(parameter); } audio->flags |= AGS_AUDIO_OUTPUT_HAS_RECYCLING; } /* check if input has already recyclings */ if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ if(audio->input_pads > 0){ parameter = ags_audio_set_flags_set_recycling_parameter(AGS_TYPE_INPUT); ags_audio_set_flags_add_recycling_task(parameter); } audio->flags |= AGS_AUDIO_INPUT_HAS_RECYCLING; } } //TODO:JK: automatization of setting recycling_context root } /** * ags_audio_unset_flags: * @audio: an AgsAudio * @flags: see enum AgsAudioFlags * * Disable a feature of AgsAudio. * * Since: 1.0.0 */ void ags_audio_unset_flags(AgsAudio *audio, guint flags) { auto GParameter* ags_audio_unset_flags_set_recycling_parameter(GType type); auto void ags_audio_unset_flags_add_recycling_task(GParameter *parameter); GParameter* ags_audio_unset_flags_set_recycling_parameter(GType type){ AgsChannel *channel, *start_channel, *end_channel; AgsRecycling *recycling, *recycling_next, *start_recycling, *end_recycling; GParameter *parameter; int i; parameter = g_new(GParameter, 4 * audio->audio_channels); for(i = 0; i < audio->audio_channels; i++){ start_channel = ags_channel_nth(((g_type_is_a(type, AGS_TYPE_INPUT)) ? audio->input: audio->output), i); end_channel = ags_channel_pad_last(start_channel); start_recycling = NULL; end_recycling = NULL; /* setting up parameters */ parameter[i].name = "start_channel"; g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), start_channel); parameter[i].name = "end_channel"; g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), end_channel); parameter[i].name = "start_recycling"; g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), start_recycling); parameter[i].name = "end_recycling"; g_value_init(&(parameter[i].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[i].value), end_recycling); } return(parameter); } void ags_audio_unset_flags_add_recycling_task(GParameter *parameter){ //TODO:JK: implement me } if(audio == NULL || !AGS_IS_AUDIO(audio)){ return; } if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags))){ GParameter *parameter; /* check if input has already no recyclings */ if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ if(audio->input_pads > 0){ parameter = ags_audio_unset_flags_set_recycling_parameter(AGS_TYPE_INPUT); ags_audio_unset_flags_add_recycling_task(parameter); audio->flags &= (~AGS_AUDIO_INPUT_HAS_RECYCLING); } /* check if output has already recyclings */ if(audio->output_pads > 0){ parameter = ags_audio_unset_flags_set_recycling_parameter(AGS_TYPE_OUTPUT); ags_audio_unset_flags_add_recycling_task(parameter); audio->flags &= (~AGS_AUDIO_OUTPUT_HAS_RECYCLING); } } } } void ags_audio_real_check_connection(AgsAudio *audio) { //TODO:JK: implement me } void ags_audio_check_connection(AgsAudio *audio) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* lock */ pthread_mutex_lock(mutex); if(!AGS_IS_AUDIO(audio)){ pthread_mutex_unlock(mutex); return; } /* emit */ g_object_ref((GObject *) audio); g_signal_emit(G_OBJECT(audio), audio_signals[CHECK_CONNECTION], 0); g_object_unref((GObject *) audio); /* unlock */ pthread_mutex_unlock(mutex); } void ags_audio_real_set_audio_channels(AgsAudio *audio, guint audio_channels, guint audio_channels_old) { AgsMutexManager *mutex_manager; AgsMessageDelivery *message_delivery; AgsMessageQueue *message_queue; gboolean alloc_recycling; gboolean link_recycling; // affects AgsInput gboolean set_sync_link, set_async_link; // affects AgsOutput gboolean alloc_pattern; guint bank_dim[3]; pthread_mutex_t *application_mutex; pthread_mutex_t *prev_mutex, *prev_pad_mutex, *current_mutex; auto void ags_audio_set_audio_channels_init_parameters(GType type); auto void ags_audio_set_audio_channels_grow(GType type); auto void ags_audio_set_audio_channels_shrink_zero(); auto void ags_audio_set_audio_channels_shrink(); auto void ags_audio_set_audio_channels_shrink_notation(); auto void ags_audio_set_audio_channels_shrink_automation(); auto void ags_audio_set_audio_channels_shrink_wave(); void ags_audio_set_audio_channels_init_parameters(GType type){ alloc_pattern = FALSE; if(type == AGS_TYPE_OUTPUT){ link_recycling = FALSE; if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){ alloc_recycling = TRUE; }else{ alloc_recycling = FALSE; if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ if((AGS_AUDIO_SYNC & (audio->flags)) != 0 && (AGS_AUDIO_ASYNC & (audio->flags)) == 0){ set_sync_link = FALSE; set_async_link = TRUE; }else if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){ set_async_link = TRUE; set_sync_link = FALSE; }else{ #ifdef AGS_DEBUG g_message("ags_audio_set_audio_channels - warning: AGS_AUDIO_SYNC nor AGS_AUDIO_ASYNC weren't defined"); #endif set_sync_link = FALSE; set_async_link = FALSE; } } } }else{ set_sync_link = FALSE; set_async_link = FALSE; if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ alloc_recycling = TRUE; }else{ alloc_recycling = FALSE; } if((AGS_AUDIO_ASYNC & (audio->flags)) != 0 && alloc_recycling){ link_recycling = TRUE; }else{ link_recycling = FALSE; } if((AGS_AUDIO_HAS_PATTERN & (audio->flags)) != 0){ alloc_pattern = TRUE; bank_dim[0] = audio->bank_dim[0]; bank_dim[1] = audio->bank_dim[1]; bank_dim[2] = audio->bank_dim[2]; } } } void ags_audio_set_audio_channels_grow(GType type){ AgsChannel *channel, *start, *current, *pad_next; AgsRecycling *first_recycling, *last_recycling; guint pads; guint i, j; if(type == AGS_TYPE_OUTPUT){ /* AGS_TYPE_OUTPUT */ pads = audio->output_pads; start = audio->output; }else{ /* AGS_TYPE_INPUT */ pads = audio->input_pads; start = audio->input; } /* grow */ for(j = 0; j < pads; j++){ if(audio_channels_old != 0){ pad_next = ags_channel_nth(start, j * audio_channels)->next_pad; }else{ pad_next = NULL; } for(i = audio_channels_old; i < audio_channels; i++){ channel = (AgsChannel *) g_object_new(type, "audio", (GObject *) audio, "soundcard", audio->soundcard, "samplerate", audio->samplerate, "buffer-size", audio->buffer_size, NULL); g_object_ref(channel); if(alloc_pattern){ channel->pattern = g_list_alloc(); channel->pattern->data = (gpointer) ags_pattern_new(); g_object_ref(channel->pattern->data); ags_pattern_set_dim((AgsPattern *) channel->pattern->data, bank_dim[0], bank_dim[1], bank_dim[2]); } if(start == NULL){ start = channel; if(type == AGS_TYPE_OUTPUT){ audio->output = channel; }else{ audio->input = channel; } } if(j * audio_channels + i != 0){ /* set prev */ channel->prev = ags_channel_nth(start, j * audio_channels + i - 1); pthread_mutex_lock(application_mutex); prev_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel->prev); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(prev_mutex); if(audio_channels_old != 0 && i == audio_channels - 1){ channel->next = pad_next; } channel->prev->next = channel; pthread_mutex_unlock(prev_mutex); } if(j != 0){ /* set prev pad */ channel->prev_pad = ags_channel_pad_nth(ags_channel_nth(start, i), j - 1); pthread_mutex_lock(application_mutex); prev_pad_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel->prev_pad); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(prev_pad_mutex); channel->prev_pad->next_pad = channel; pthread_mutex_unlock(prev_pad_mutex); } /* set indices */ channel->pad = j; channel->audio_channel = i; channel->line = j * audio->audio_channels + i; /* reset nested AgsRecycling tree */ if(alloc_recycling){ first_recycling = last_recycling = ags_recycling_new(audio->soundcard); g_object_ref(first_recycling); g_object_set(first_recycling, "channel", channel, NULL); ags_channel_set_recycling(channel, first_recycling, last_recycling, TRUE, TRUE); }else if(set_sync_link){ AgsChannel *input; input = ags_channel_nth(audio->input, channel->line); /* set sync link */ if(input != NULL){ first_recycling = input->first_recycling; last_recycling = input->last_recycling; ags_channel_set_recycling(channel, first_recycling, last_recycling, TRUE, TRUE); } }else if(set_async_link){ AgsChannel *input, *input_pad_last; input = ags_channel_nth(audio->input, i); /* set async link */ if(input != NULL){ input_pad_last = ags_channel_pad_last(input); first_recycling = input->first_recycling; last_recycling = input_pad_last->last_recycling; ags_channel_set_recycling(channel, first_recycling, last_recycling, TRUE, TRUE); } } } } } void ags_audio_set_audio_channels_shrink_zero(){ AgsChannel *channel, *start, *channel_next; gboolean first_run; GError *error; start = channel = audio->output; first_run = TRUE; error = NULL; ags_audio_set_audio_channel_shrink_zero0: while(channel != NULL){ error = NULL; ags_channel_set_link(channel, NULL, &error); if(error != NULL){ g_error("%s", error->message); } channel = channel->next; } channel = start; while(channel != NULL){ channel_next = channel->next; g_object_run_dispose(channel); g_object_unref((GObject *) channel); channel = channel_next; } if(first_run){ start = channel = audio->input; first_run = FALSE; goto ags_audio_set_audio_channel_shrink_zero0; } audio->output = NULL; audio->input = NULL; } void ags_audio_set_audio_channels_shrink(){ AgsChannel *channel, *start; AgsChannel *channel0, *channel1; AgsRecycling *recycling; guint pads, i, j; gboolean first_run; GError *error; start = channel = audio->output; pads = audio->output_pads; first_run = TRUE; ags_audio_set_audio_channel_shrink0: for(i = 0; i < pads; i++){ channel = ags_channel_nth(channel, audio_channels); for(j = audio_channels; j < audio->audio_channels; j++){ error = NULL; ags_channel_set_link(channel, NULL, &error); if(error != NULL){ g_error("%s", error->message); } channel = channel->next; } } channel = start; if(i < pads){ for(i = 0; ; i++){ for(j = 0; j < audio_channels -1; j++){ channel->pad = i; channel->audio_channel = j; channel->line = i * audio_channels + j; channel = channel->next; } channel->pad = i; channel->audio_channel = j; channel->line = i * audio_channels + j; channel0 = channel->next; for(; j < audio->audio_channels; j++){ channel1 = channel0->next; g_object_run_dispose(channel0); g_object_unref((GObject *) channel0); channel0 = channel1; } channel->next = channel1; if(channel1 != NULL){ channel1->prev = channel; }else{ break; } channel = channel1; } } if(first_run){ first_run = FALSE; start = channel = audio->input; pads = audio->input_pads; goto ags_audio_set_audio_channel_shrink0; } } void ags_audio_set_audio_channels_shrink_notation(){ GList *list_start, *list; list = list_start = g_list_copy(audio->notation); while(list != NULL){ if(AGS_NOTATION(list->data)->audio_channel >= audio_channels){ audio->notation = g_list_remove(audio->notation, list->data); g_object_run_dispose(list->data); g_object_unref(list->data); } list = list->next; } g_list_free(list_start); } void ags_audio_set_audio_channels_shrink_automation(){ GList *list_start, *list; list = list_start = g_list_copy(audio->automation); while(list != NULL){ if(AGS_AUTOMATION(list->data)->line % audio_channels_old >= audio_channels){ audio->automation = g_list_remove(audio->automation, list->data); g_object_run_dispose(list->data); g_object_unref(list->data); } list = list->next; } g_list_free(list_start); } void ags_audio_set_audio_channels_shrink_wave(){ GList *list_start, *list; list = list_start = g_list_copy(audio->wave); while(list != NULL){ if(AGS_WAVE(list->data)->audio_channel >= audio_channels){ audio->wave = g_list_remove(audio->wave, list->data); g_object_run_dispose(list->data); g_object_unref(list->data); } list = list->next; } g_list_free(list_start); } /* entry point */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* grow / shrink */ if(audio_channels > audio_channels_old){ AgsPlaybackDomain *playback_domain; AgsChannel *current; guint i; /* grow audio channels */ if(audio->input_pads > 0 && (AGS_AUDIO_NO_INPUT & (audio->flags)) == 0){ ags_audio_set_audio_channels_init_parameters(AGS_TYPE_INPUT); ags_audio_set_audio_channels_grow(AGS_TYPE_INPUT); } audio->input_lines = audio_channels * audio->input_pads; if(audio->output_pads > 0 && (AGS_AUDIO_NO_OUTPUT & (audio->flags)) == 0){ ags_audio_set_audio_channels_init_parameters(AGS_TYPE_OUTPUT); ags_audio_set_audio_channels_grow(AGS_TYPE_OUTPUT); } audio->output_lines = audio_channels * audio->output_pads; /* grow playback domain */ playback_domain = AGS_PLAYBACK_DOMAIN(audio->playback_domain); current = ags_channel_nth(audio->output, audio->audio_channels); if(current != NULL){ for(i = 0; i < audio_channels - audio_channels_old; i++){ playback_domain->playback = g_list_append(playback_domain->playback, current->playback); current = current->next; } } }else if(audio_channels < audio_channels_old){ AgsPlaybackDomain *playback_domain; AgsPlayback *playback; AgsChannel *current; GList *list; guint i, j; /* shrink audio channels */ ags_audio_set_audio_channels_shrink_automation(); if((AGS_AUDIO_HAS_NOTATION & (audio->flags)) != 0){ ags_audio_set_audio_channels_shrink_notation(); } if((AGS_AUDIO_HAS_WAVE & (audio->flags)) != 0){ ags_audio_set_audio_channels_shrink_wave(); } if(audio_channels == 0){ ags_audio_set_audio_channels_shrink_zero(); }else{ ags_audio_set_audio_channels_shrink(); } audio->input_lines = audio_channels * audio->input_pads; audio->output_lines = audio_channels * audio->output_pads; /* shrink playback domain */ playback_domain = AGS_PLAYBACK_DOMAIN(audio->playback_domain); list = playback_domain->playback; for(j = 0; j < audio->output_pads; j++){ for(i = 0; i < audio->audio_channels - audio_channels; i++){ playback = g_list_nth_prev(g_list_last(list), (audio->output_pads - j - 1) * audio_channels)->data; playback_domain->playback = g_list_remove(playback_domain->playback, playback); g_object_run_dispose(playback); g_object_unref(playback); } } } /* apply new sizes */ audio->audio_channels = audio_channels; // input_lines must be set earlier because set_sync_link needs it /* emit message */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_delivery_find_namespace(message_delivery, "libags-audio"); if(message_queue != NULL){ AgsMessageEnvelope *message; xmlDoc *doc; xmlNode *root_node; /* specify message body */ doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags-command"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "method", "AgsAudio::set-audio-channels"); /* add message */ message = ags_message_envelope_alloc(audio, NULL, doc); /* set parameter */ message->parameter = g_new0(GParameter, 2); message->n_params = 2; message->parameter[0].name = "audio-channels"; g_value_init(&(message->parameter[0].value), G_TYPE_UINT); g_value_set_uint(&(message->parameter[0].value), audio_channels); message->parameter[1].name = "audio-channels-old"; g_value_init(&(message->parameter[1].value), G_TYPE_UINT); g_value_set_uint(&(message->parameter[1].value), audio_channels_old); /* add message */ ags_message_delivery_add_message(message_delivery, "libags-audio", message); } } /** * ags_audio_set_audio_channels: * @audio: the #AgsAudio * @audio_channels: new audio channels * * Resize audio channels AgsInput will be allocated first. * * Since: 1.0.0 */ void ags_audio_set_audio_channels(AgsAudio *audio, guint audio_channels) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* lock */ pthread_mutex_lock(mutex); if(!AGS_IS_AUDIO(audio)){ pthread_mutex_unlock(mutex); return; } /* emit */ g_object_ref((GObject *) audio); g_signal_emit(G_OBJECT(audio), audio_signals[SET_AUDIO_CHANNELS], 0, audio_channels, audio->audio_channels); g_object_unref((GObject *) audio); /* unlock */ pthread_mutex_unlock(mutex); } /* * resize * AgsInput has to be allocated first */ void ags_audio_real_set_pads(AgsAudio *audio, GType channel_type, guint pads, guint pads_old) { AgsChannel *channel; AgsMutexManager *mutex_manager; AgsMessageDelivery *message_delivery; AgsMessageQueue *message_queue; gboolean alloc_recycling, link_recycling, set_sync_link, set_async_link; gboolean alloc_pattern; guint bank_dim[3]; pthread_mutex_t *application_mutex; pthread_mutex_t *prev_mutex, *prev_pad_mutex; auto void ags_audio_set_pads_init_parameters(); auto void ags_audio_set_pads_grow(); auto void ags_audio_set_pads_unlink_all(AgsChannel *channel); auto void ags_audio_set_pads_shrink_zero(AgsChannel *channel); auto void ags_audio_set_pads_shrink(AgsChannel *channel); auto void ags_audio_set_pads_free_notation(); auto void ags_audio_set_pads_remove_notes(); auto void ags_audio_set_pads_shrink_automation(); auto void ags_audio_set_pads_free_wave(); void ags_audio_set_pads_init_parameters(){ alloc_recycling = FALSE; link_recycling = FALSE; set_sync_link = FALSE; set_async_link = FALSE; alloc_pattern = FALSE; if(channel_type == AGS_TYPE_OUTPUT){ if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){ alloc_recycling = TRUE; }else{ if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ if((AGS_AUDIO_SYNC & (audio->flags)) != 0 && (AGS_AUDIO_ASYNC & (audio->flags)) == 0){ set_async_link = TRUE; }else if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){ set_async_link = TRUE; }else{ #ifdef AGS_DEBUG g_message("ags_audio_set_pads - warning: AGS_AUDIO_SYNC nor AGS_AUDIO_ASYNC weren't defined"); #endif } } } }else{ if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){ alloc_recycling = TRUE; } if((AGS_AUDIO_ASYNC & (audio->flags)) != 0 && alloc_recycling){ link_recycling = TRUE; } if((AGS_AUDIO_HAS_PATTERN & (audio->flags)) != 0){ alloc_pattern = TRUE; bank_dim[0] = audio->bank_dim[0]; bank_dim[1] = audio->bank_dim[1]; bank_dim[2] = audio->bank_dim[2]; } } } void ags_audio_set_pads_grow(){ AgsChannel *start, *channel; AgsRecycling *first_recycling, *last_recycling; guint i, j; if(channel_type == AGS_TYPE_OUTPUT){ start = audio->output; }else{ start = audio->input; } for(j = pads_old; j < pads; j++){ for(i = 0; i < audio->audio_channels; i++){ channel = (AgsChannel *) g_object_new(channel_type, "audio", (GObject *) audio, "soundcard", audio->soundcard, "samplerate", audio->samplerate, "buffer-size", audio->buffer_size, NULL); g_object_ref(channel); if(alloc_pattern){ channel->pattern = g_list_alloc(); channel->pattern->data = (gpointer) ags_pattern_new(); g_object_ref(channel->pattern->data); ags_pattern_set_dim((AgsPattern *) channel->pattern->data, bank_dim[0], bank_dim[1], bank_dim[2]); } if(start == NULL){ /* set first channel in AgsAudio */ if(channel_type == AGS_TYPE_OUTPUT){ start = audio->output = channel; }else{ start = audio->input = channel; } } if(j * audio->audio_channels + i != 0){ /* set prev */ channel->prev = ags_channel_nth(start, j * audio->audio_channels + i - 1); pthread_mutex_lock(application_mutex); prev_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel->prev); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(prev_mutex); channel->prev->next = channel; pthread_mutex_unlock(prev_mutex); } if(j != 0){ /* set prev pad */ channel->prev_pad = ags_channel_pad_nth(ags_channel_nth(start, i), j - 1); pthread_mutex_lock(application_mutex); prev_pad_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel->prev_pad); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(prev_pad_mutex); channel->prev_pad->next_pad = channel; pthread_mutex_unlock(prev_pad_mutex); } /* set indices */ channel->pad = j; channel->audio_channel = i; channel->line = j * audio->audio_channels + i; /* reset nested AgsRecycling tree */ if(alloc_recycling){ first_recycling = last_recycling = ags_recycling_new(audio->soundcard); g_object_ref(first_recycling); g_object_set(first_recycling, "channel", channel, NULL); ags_channel_set_recycling(channel, first_recycling, last_recycling, TRUE, TRUE); }else if(set_sync_link){ AgsChannel *input; input = ags_channel_nth(audio->input, channel->line); /* set sync link */ if(input != NULL){ first_recycling = input->first_recycling; last_recycling = input->last_recycling; ags_channel_set_recycling(channel, first_recycling, last_recycling, TRUE, TRUE); } }else if(set_async_link){ AgsChannel *input, *input_pad_last; input = ags_channel_nth(audio->input, i); /* set async link */ if(input != NULL){ input_pad_last = ags_channel_pad_last(input); first_recycling = input->first_recycling; last_recycling = input_pad_last->last_recycling; ags_channel_set_recycling(channel, first_recycling, last_recycling, TRUE, TRUE); } } } } } void ags_audio_set_pads_unlink_all(AgsChannel *channel){ GError *error; while(channel != NULL){ error = NULL; ags_channel_set_link(channel, NULL, &error); if(error != NULL){ g_error("%s", error->message); } channel = channel->next; } } void ags_audio_set_pads_shrink_zero(AgsChannel *channel){ AgsChannel *channel_next; GError *error; while(channel != NULL){ channel_next = channel->next; error = NULL; ags_channel_set_link(channel, NULL, &error); if(error != NULL){ g_error("%s", error->message); } g_object_run_dispose(channel); g_object_unref((GObject *) channel); channel = channel_next; } } void ags_audio_set_pads_shrink(AgsChannel *channel){ AgsChannel *current; guint i; current = channel; if(channel != NULL && channel->prev_pad != NULL){ channel = channel->prev_pad; }else{ channel = NULL; } ags_audio_set_pads_shrink_zero(current); /* remove pads */ if(channel != NULL){ current = channel; for(i = 0; i < audio->audio_channels; i++){ current->next_pad = NULL; /* iterate */ current = current->next; } /* remove channel */ current = ags_channel_nth(channel, audio->audio_channels - 1); current->next = NULL; } } void ags_audio_set_pads_free_notation(){ GList *list_start, *list; list = list_start = g_list_copy(audio->notation); while(list != NULL){ g_object_run_dispose((GObject *) list->data); g_object_unref((GObject *) list->data); list = list->next; } g_list_free(audio->notation); g_list_free(list_start); audio->notation = NULL; } void ags_audio_set_pads_remove_notes(){ GList *notation; GList *note_start, *note; notation = audio->notation; while(notation != NULL){ note = note_start = g_list_copy(AGS_NOTATION(notation->data)->notes); while(note != NULL){ if(AGS_NOTE(note->data)->y >= pads){ AGS_NOTATION(notation->data)->notes = g_list_remove(AGS_NOTATION(notation->data)->notes, note->data); g_object_unref(note->data); } note = note->next; } g_list_free(note_start); notation = notation->next; } } void ags_audio_set_pads_shrink_automation(){ GList *list_start, *list; list = list_start = g_list_copy(audio->automation); while(list != NULL){ if(AGS_AUTOMATION(list->data)->channel_type == channel_type && AGS_AUTOMATION(list->data)->line >= pads * audio->audio_channels){ audio->automation = g_list_remove(audio->automation, list->data); g_object_run_dispose((GObject *) list->data); g_object_unref((GObject *) list->data); } list = list->next; } g_list_free(list_start); } void ags_audio_set_pads_free_wave(){ GList *list_start, *list; list = list_start = g_list_copy(audio->wave); while(list != NULL){ g_object_run_dispose((GObject *) list->data); g_object_unref((GObject *) list->data); list = list->next; } g_list_free(audio->wave); g_list_free(list_start); audio->wave = NULL; } /* entry point */ ags_audio_set_pads_init_parameters(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); if(g_type_is_a(channel_type, AGS_TYPE_OUTPUT)){ /* output */ pads_old = audio->output_pads; if(pads_old == pads){ return; } if(audio->audio_channels == 0){ audio->output_pads = pads; return; } /* grow or shrink */ if(pads > audio->output_pads){ AgsPlaybackDomain *playback_domain; AgsChannel *current; guint i, j; if((AGS_AUDIO_NO_OUTPUT & (audio->flags)) == 0){ /* grow channels */ ags_audio_set_pads_grow(); /* alloc playback domain */ playback_domain = AGS_PLAYBACK_DOMAIN(audio->playback_domain); current = audio->output; current = ags_channel_pad_nth(current, pads_old); for(j = pads_old; j < pads; j++){ for(i = 0; i < audio->audio_channels; i++){ playback_domain->playback = g_list_append(playback_domain->playback, current->playback); current = current->next; } } } }else if(pads == 0){ GList *list; if((AGS_AUDIO_NO_OUTPUT & (audio->flags)) == 0){ ags_audio_set_pads_shrink_automation(); if((AGS_AUDIO_HAS_NOTATION & (audio->flags)) != 0 && audio->notation != NULL){ ags_audio_set_pads_free_notation(); } if((AGS_AUDIO_HAS_WAVE & (audio->flags)) != 0 && audio->wave != NULL){ ags_audio_set_pads_free_wave(); } channel = audio->output; /* unlink and remove */ ags_audio_set_pads_unlink_all(channel); ags_audio_set_pads_shrink_zero(channel); audio->output = NULL; /* remove playback domain */ list = AGS_PLAYBACK_DOMAIN(audio->playback_domain)->playback; while(list != NULL){ g_object_run_dispose(list->data); list = list->next; } g_list_free_full(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->playback, g_object_unref); AGS_PLAYBACK_DOMAIN(audio->playback_domain)->playback = NULL; } }else if(pads < audio->output_pads){ AgsPlaybackDomain *playback_domain; guint i; channel = audio->output; if((AGS_AUDIO_NO_OUTPUT & (audio->flags)) == 0){ ags_audio_set_pads_shrink_automation(); ags_audio_set_pads_remove_notes(); channel = ags_channel_pad_nth(channel, pads); ags_audio_set_pads_unlink_all(channel); ags_audio_set_pads_shrink(channel); playback_domain = AGS_PLAYBACK_DOMAIN(audio->playback_domain); for(i = 0; i < audio->output_pads - pads; i++){ AgsPlayback *playback; GList *list; list = g_list_last(playback_domain->playback); if(list != NULL){ playback = list->data; playback_domain->playback = g_list_remove(playback_domain->playback, playback); g_object_run_dispose(playback); g_object_unref(playback); } } } } /* apply new size */ audio->output_pads = pads; audio->output_lines = pads * audio->audio_channels; if((AGS_AUDIO_SYNC & audio->flags) != 0 && (AGS_AUDIO_ASYNC & audio->flags) == 0){ //TODO:JK: fix me // audio->input_pads = pads; // audio->input_lines = pads * audio->audio_channels; } }else if(g_type_is_a(channel_type, AGS_TYPE_INPUT)){ /* input */ if(pads_old == pads){ return; } if(audio->audio_channels == 0){ audio->input_pads = pads; return; } /* grow or shrink */ if(pads > pads_old){ /* grow channels */ if((AGS_AUDIO_NO_INPUT & (audio->flags)) == 0){ ags_audio_set_pads_grow(); } }else if(pads < pads_old){ channel = audio->input; if((AGS_AUDIO_NO_INPUT & (audio->flags)) == 0){ ags_audio_set_pads_shrink_automation(); if(pads == 0){ /* shrink channels */ ags_audio_set_pads_unlink_all(channel); ags_audio_set_pads_shrink_zero(channel); audio->input = NULL; }else{ channel = ags_channel_pad_nth(channel, pads); /* shrink channels */ ags_audio_set_pads_unlink_all(channel); ags_audio_set_pads_shrink(channel); } } } /* apply new allocation */ audio->input_pads = pads; audio->input_lines = pads * audio->audio_channels; }else{ g_warning("unknown channel type"); } /* emit message */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_delivery_find_namespace(message_delivery, "libags-audio"); if(message_queue != NULL){ AgsMessageEnvelope *message; xmlDoc *doc; xmlNode *root_node; /* specify message body */ doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags-command"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "method", "AgsAudio::set-pads"); /* add message */ message = ags_message_envelope_alloc(audio, NULL, doc); /* set parameter */ message->parameter = g_new0(GParameter, 3); message->n_params = 3; message->parameter[0].name = "channel-type"; g_value_init(&(message->parameter[0].value), G_TYPE_ULONG); g_value_set_ulong(&(message->parameter[0].value), channel_type); message->parameter[1].name = "pads"; g_value_init(&(message->parameter[1].value), G_TYPE_UINT); g_value_set_uint(&(message->parameter[1].value), pads); message->parameter[2].name = "pads-old"; g_value_init(&(message->parameter[2].value), G_TYPE_UINT); g_value_set_uint(&(message->parameter[2].value), pads_old); /* add message */ ags_message_delivery_add_message(message_delivery, "libags-audio", message); } } /** * ags_audio_set_pads: * @audio: the #AgsAudio * @channel_type: AGS_TYPE_INPUT or AGS_TYPE_OUTPUT * @pads: new pad count * * Sets pad count for the apropriate @channel_type * * Since: 1.0.0 */ void ags_audio_set_pads(AgsAudio *audio, GType channel_type, guint pads) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; guint pads_old; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(!AGS_IS_AUDIO(audio)){ pthread_mutex_unlock(mutex); return; } /* emit */ g_object_ref((GObject *) audio); pads_old = ((g_type_is_a(channel_type, AGS_TYPE_OUTPUT)) ? audio->output_pads: audio->input_pads); g_signal_emit(G_OBJECT(audio), audio_signals[SET_PADS], 0, channel_type, pads, pads_old); g_object_unref((GObject *) audio); pthread_mutex_unlock(mutex); } /** * ags_audio_set_samplerate: * @audio: the #AgsAudio * @samplerate: the samplerate * * Sets samplerate. * * Since: 1.0.0 */ void ags_audio_set_samplerate(AgsAudio *audio, guint samplerate) { AgsConfig *config; gchar *str0, *str1; gdouble freq; auto void ags_audio_set_samplerate_channel(AgsChannel *channel); void ags_audio_set_samplerate_channel(AgsChannel *channel){ while(channel != NULL){ ags_channel_set_samplerate(channel, samplerate); channel = channel->next; } } audio->samplerate = samplerate; /* */ config = ags_config_get_instance(); freq = ceil((gdouble) audio->samplerate / (gdouble) audio->buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; str0 = ags_config_get_value(config, AGS_CONFIG_THREAD, "model"); str1 = ags_config_get_value(config, AGS_CONFIG_THREAD, "super-threaded-scope"); if(str0 != NULL && str1 != NULL){ if(!g_ascii_strncasecmp(str0, "super-threaded", 15)){ if(!g_ascii_strncasecmp(str1, "audio", 6) || !g_ascii_strncasecmp(str1, "channel", 8) || !g_ascii_strncasecmp(str1, "recycling", 10)){ g_object_set(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[0], "frequency", freq, NULL); g_object_set(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1], "frequency", freq, NULL); g_object_set(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[2], "frequency", freq, NULL); } } } g_free(str0); g_free(str1); ags_audio_set_samplerate_channel(audio->output); ags_audio_set_samplerate_channel(audio->input); } /** * ags_audio_set_buffer_size: * @audio: the #AgsAudio * @buffer_size: the buffer length * * Sets buffer length. * * Since: 1.0.0 */ void ags_audio_set_buffer_size(AgsAudio *audio, guint buffer_size) { AgsConfig *config; gchar *str0, *str1; gdouble freq; auto void ags_audio_set_buffer_size_channel(AgsChannel *channel); void ags_audio_set_buffer_size_channel(AgsChannel *channel){ while(channel != NULL){ ags_channel_set_buffer_size(channel, buffer_size); channel = channel->next; } } audio->buffer_size = buffer_size; /* */ config = ags_config_get_instance(); freq = ceil((gdouble) audio->samplerate / (gdouble) audio->buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; str0 = ags_config_get_value(config, AGS_CONFIG_THREAD, "model"); str1 = ags_config_get_value(config, AGS_CONFIG_THREAD, "super-threaded-scope"); if(str0 != NULL && str1 != NULL){ if(!g_ascii_strncasecmp(str0, "super-threaded", 15)){ if(!g_ascii_strncasecmp(str1, "audio", 6) || !g_ascii_strncasecmp(str1, "channel", 8) || !g_ascii_strncasecmp(str1, "recycling", 10)){ g_object_set(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[0], "frequency", freq, NULL); g_object_set(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1], "frequency", freq, NULL); g_object_set(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[2], "frequency", freq, NULL); } } } g_free(str0); g_free(str1); ags_audio_set_buffer_size_channel(audio->output); ags_audio_set_buffer_size_channel(audio->input); } /** * ags_audio_set_format: * @audio: the #AgsAudio * @format: the format * * Sets buffer length. * * Since: 1.0.0 */ void ags_audio_set_format(AgsAudio *audio, guint format) { auto void ags_audio_set_format_channel(AgsChannel *channel); void ags_audio_set_format_channel(AgsChannel *channel){ while(channel != NULL){ ags_channel_set_format(channel, format); channel = channel->next; } } audio->format = format; ags_audio_set_format_channel(audio->output); ags_audio_set_format_channel(audio->input); } /** * ags_audio_set_sequence_length: * @audio: the #AgsAudio * @sequence_length: the sequence length * * Sets sequence length. * * Since: 1.0.0 */ void ags_audio_set_sequence_length(AgsAudio *audio, guint sequence_length) { audio->sequence_length = sequence_length; } /** * ags_audio_add_audio_connection: * @audio: the #AgsAudio * @audio_connection: an #AgsAudioConnection * * Adds an audio connection. * * Since: 1.0.0 */ void ags_audio_add_audio_connection(AgsAudio *audio, GObject *audio_connection) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* add audio connection */ pthread_mutex_lock(mutex); g_object_ref(audio_connection); audio->audio_connection = g_list_prepend(audio->audio_connection, audio_connection); pthread_mutex_unlock(mutex); } /** * ags_audio_remove_audio_connection: * @audio: the #AgsAudio * @audio_connection: an #AgsAudioConnection * * Removes an audio connection. * * Since: 1.0.0 */ void ags_audio_remove_audio_connection(AgsAudio *audio, GObject *audio_connection) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove audio connection */ pthread_mutex_lock(mutex); audio->audio_connection = g_list_remove(audio->audio_connection, audio_connection); g_object_unref(audio_connection); pthread_mutex_unlock(mutex); } /** * ags_audio_add_preset: * @audio: the #AgsAudio * @preset: an #AgsPreset * * Adds an preset. * * Since: 1.0.0 */ void ags_audio_add_preset(AgsAudio *audio, GObject *preset) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* add preset */ pthread_mutex_lock(mutex); g_object_ref(preset); audio->preset = g_list_prepend(audio->preset, preset); pthread_mutex_unlock(mutex); } /** * ags_audio_remove_preset: * @audio: the #AgsAudio * @preset: an #AgsPreset * * Removes an preset. * * Since: 1.0.0 */ void ags_audio_remove_preset(AgsAudio *audio, GObject *preset) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove preset */ pthread_mutex_lock(mutex); audio->preset = g_list_remove(audio->preset, preset); g_object_unref(preset); pthread_mutex_unlock(mutex); } /** * ags_audio_add_notation: * @audio: the #AgsAudio * @notation: the #AgsRecallID * * Adds a recall id. * * Since: 1.0.0 */ void ags_audio_add_notation(AgsAudio *audio, GObject *notation) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* add recall id */ pthread_mutex_lock(mutex); g_object_ref(notation); audio->notation = g_list_prepend(audio->notation, notation); pthread_mutex_unlock(mutex); } /** * ags_audio_remove_notation: * @audio: the #AgsAudio * @notation: the #AgsRecallID * * Removes a recall id. * * Since: 1.0.0 */ void ags_audio_remove_notation(AgsAudio *audio, GObject *notation) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove recall id */ pthread_mutex_lock(mutex); audio->notation = g_list_remove(audio->notation, notation); g_object_set(notation, "audio", NULL, NULL); g_object_unref(notation); pthread_mutex_unlock(mutex); } /** * ags_audio_add_automation: * @audio: the #AgsAudio * @automation: the #AgsRecallID * * Adds a recall id. * * Since: 1.0.0 */ void ags_audio_add_automation(AgsAudio *audio, GObject *automation) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* add recall id */ pthread_mutex_lock(mutex); g_object_ref(automation); audio->automation = ags_automation_add(audio->automation, automation); pthread_mutex_unlock(mutex); } /** * ags_audio_remove_automation: * @audio: the #AgsAudio * @automation: the #AgsRecallID * * Removes a recall id. * * Since: 1.0.0 */ void ags_audio_remove_automation(AgsAudio *audio, GObject *automation) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove recall id */ pthread_mutex_lock(mutex); audio->automation = g_list_remove(audio->automation, automation); g_object_unref(automation); pthread_mutex_unlock(mutex); } /** * ags_audio_add_wave: * @audio: the #AgsAudio * @wave: the #AgsRecallID * * Adds a recall id. * * Since: 1.4.0 */ void ags_audio_add_wave(AgsAudio *audio, GObject *wave) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* add recall id */ pthread_mutex_lock(mutex); g_object_ref(wave); audio->wave = g_list_prepend(audio->wave, wave); pthread_mutex_unlock(mutex); } /** * ags_audio_remove_wave: * @audio: the #AgsAudio * @wave: the #AgsRecallID * * Removes a recall id. * * Since: 1.4.0 */ void ags_audio_remove_wave(AgsAudio *audio, GObject *wave) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove recall id */ pthread_mutex_lock(mutex); audio->wave = g_list_remove(audio->wave, wave); g_object_unref(wave); pthread_mutex_unlock(mutex); } /** * ags_audio_add_recall_id: * @audio: the #AgsAudio * @recall_id: the #AgsRecallID * * Adds a recall id. * * Since: 1.0.0 */ void ags_audio_add_recall_id(AgsAudio *audio, GObject *recall_id) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* add recall id */ pthread_mutex_lock(mutex); g_object_ref(recall_id); audio->recall_id = g_list_prepend(audio->recall_id, recall_id); pthread_mutex_unlock(mutex); } /** * ags_audio_remove_recall_id: * @audio: the #AgsAudio * @recall_id: the #AgsRecallID * * Removes a recall id. * * Since: 1.0.0 */ void ags_audio_remove_recall_id(AgsAudio *audio, GObject *recall_id) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove recall id */ pthread_mutex_lock(mutex); audio->recall_id = g_list_remove(audio->recall_id, recall_id); g_object_unref(recall_id); pthread_mutex_unlock(mutex); } /** * ags_audio_add_recycling_context: * @audio: the #AgsAudio * @recycling_context: the #AgsRecyclingContext * * Adds a recycling container. * * Since: 1.0.0 */ void ags_audio_add_recycling_context(AgsAudio *audio, GObject *recycling_context) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* add recycling container */ pthread_mutex_lock(mutex); g_object_ref(recycling_context); audio->recycling_context = g_list_prepend(audio->recycling_context, recycling_context); pthread_mutex_unlock(mutex); } /** * ags_audio_remove_recycling_context: * @audio: the #AgsAudio * @recycling_context: the #AgsRecyclingContext * * Removes a recycling container. * * Since: 1.0.0 */ void ags_audio_remove_recycling_context(AgsAudio *audio, GObject *recycling_context) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove recycling container */ pthread_mutex_lock(mutex); audio->recycling_context = g_list_remove(audio->recycling_context, recycling_context); g_object_unref(recycling_context); pthread_mutex_unlock(mutex); } /** * ags_audio_add_recall_container: * @audio: the #AgsAudio * @recall_container: the #AgsRecallContainer * * Adds a recall container. * * Since: 1.0.0 */ void ags_audio_add_recall_container(AgsAudio *audio, GObject *recall_container) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* add recall container */ pthread_mutex_lock(mutex); g_object_ref(recall_container); audio->container = g_list_prepend(audio->container, recall_container); pthread_mutex_unlock(mutex); } /** * ags_audio_remove_recall_container: * @audio: the #AgsAudio * @recall_container: the #AgsRecallContainer * * Removes a recall container. * * Since: 1.0.0 */ void ags_audio_remove_recall_container(AgsAudio *audio, GObject *recall_container) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove recall container */ pthread_mutex_lock(mutex); audio->container = g_list_remove(audio->container, recall_container); g_object_unref(recall_container); pthread_mutex_unlock(mutex); } /** * ags_audio_add_recall: * @audio: the #AgsAudio * @recall: the #AgsRecall * @play: %TRUE if simple playback. * * Adds a recall. * * Since: 1.0.0 */ void ags_audio_add_recall(AgsAudio *audio, GObject *recall, gboolean play) { if(audio == NULL || recall == NULL){ return; } /* add recall */ g_object_ref(G_OBJECT(recall)); if(play){ pthread_mutex_lock(audio->play_mutex); audio->play = g_list_prepend(audio->play, recall); pthread_mutex_unlock(audio->play_mutex); }else{ pthread_mutex_lock(audio->recall_mutex); audio->recall = g_list_prepend(audio->recall, recall); pthread_mutex_unlock(audio->recall_mutex); } } /** * ags_audio_remove_recall: * @audio: the #AgsAudio * @recall: the #AgsRecall * @play: %TRUE if simple playback. * * Removes a recall. * * Since: 1.0.0 */ void ags_audio_remove_recall(AgsAudio *audio, GObject *recall, gboolean play) { if(audio == NULL || recall == NULL){ return; } /* remove recall */ if(play){ pthread_mutex_lock(audio->play_mutex); audio->play = g_list_remove(audio->play, recall); pthread_mutex_unlock(audio->play_mutex); }else{ pthread_mutex_lock(audio->recall_mutex); audio->recall = g_list_remove(audio->recall, recall); pthread_mutex_unlock(audio->recall_mutex); } g_object_unref(G_OBJECT(recall)); } /** * ags_audio_init_run: * @audio: the #AgsAudio * * Is emitted as audio is initialized. * * Returns: the current #AgsRecallID * * Since: 1.0.0 */ AgsRecallID* ags_audio_init_run(AgsAudio *audio) { AgsRecallID *recall_id; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(!AGS_IS_AUDIO(audio)){ pthread_mutex_unlock(mutex); return(NULL); } /* emit */ g_object_ref((GObject *) audio); g_signal_emit(G_OBJECT(audio), audio_signals[INIT_RUN], 0, &recall_id); g_object_unref((GObject *) audio); pthread_mutex_unlock(mutex); return(recall_id); } /** * ags_audio_duplicate_recall: * @audio: the #AgsAudio * @recall_id: an #AgsRecallID * * Duplicate all #AgsRecall templates of this #AgsAudio. * * Since: 1.0.0 */ void ags_audio_duplicate_recall(AgsAudio *audio, AgsRecallID *recall_id) { AgsRecall *recall, *copy; GList *list_recall_start, *list_recall; gboolean playback, sequencer, notation; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(audio == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* initial checks */ pthread_mutex_lock(mutex); #ifdef AGS_DEBUG g_message("ags_audio_duplicate_recall: %s - audio.lines[%u,%u]\n", G_OBJECT_TYPE_NAME(audio->machine), audio->output_lines, audio->input_lines); #endif playback = FALSE; sequencer = FALSE; notation = FALSE; if((AGS_RECALL_ID_PLAYBACK & (recall_id->flags)) != 0){ playback = TRUE; } if((AGS_RECALL_ID_SEQUENCER & (recall_id->flags)) != 0){ sequencer = TRUE; } if((AGS_RECALL_ID_NOTATION & (recall_id->flags)) != 0){ notation = TRUE; } /* get the appropriate list */ if(recall_id->recycling_context->parent == NULL){ list_recall = g_list_copy(audio->play); list_recall_start = list_recall = g_list_reverse(list_recall); }else{ list_recall = g_list_copy(audio->recall); list_recall_start = list_recall = g_list_reverse(list_recall); } /* notify run */ // ags_recall_notify_dependency(AGS_RECALL(list_recall->data), AGS_RECALL_NOTIFY_RUN, 1); /* return if already played */ if((AGS_RECALL_ID_PRE & (recall_id->flags)) != 0 || (AGS_RECALL_ID_INTER & (recall_id->flags)) != 0 || (AGS_RECALL_ID_POST & (recall_id->flags)) != 0){ pthread_mutex_unlock(mutex); return; } ags_recall_id_set_run_stage(recall_id, 0); ags_recall_id_set_run_stage(recall_id, 1); ags_recall_id_set_run_stage(recall_id, 2); /* duplicate */ while(list_recall != NULL){ recall = AGS_RECALL(list_recall->data); if((AGS_RECALL_RUN_INITIALIZED & (recall->flags)) != 0 || AGS_IS_RECALL_AUDIO(recall) || recall->recall_id != NULL || !((playback && (AGS_RECALL_PLAYBACK & (recall->flags)) != 0) || (sequencer && (AGS_RECALL_SEQUENCER & (recall->flags)) != 0) || (notation && (AGS_RECALL_NOTATION & (recall->flags)) != 0))){ list_recall = list_recall->next; continue; } /* duplicate template only once */ if((AGS_RECALL_TEMPLATE & (recall->flags)) != 0){ /* duplicate the recall */ copy = ags_recall_duplicate(recall, recall_id); if(copy == NULL){ /* iterate */ list_recall = list_recall->next; continue; } /* notify run */ ags_recall_notify_dependency(copy, AGS_RECALL_NOTIFY_RUN, 1); #ifdef AGS_DEBUG g_message("recall duplicated: %s\n", G_OBJECT_TYPE_NAME(copy)); #endif /* set appropriate flag */ if(playback){ ags_recall_set_flags(copy, AGS_RECALL_PLAYBACK); }else if(sequencer){ ags_recall_set_flags(copy, AGS_RECALL_SEQUENCER); }else if(notation){ ags_recall_set_flags(copy, AGS_RECALL_NOTATION); } /* append to AgsAudio */ ags_audio_add_recall(audio, (GObject *) copy, ((recall_id->recycling_context->parent == NULL) ? TRUE: FALSE)); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(copy)); } /* iterate */ list_recall = list_recall->next; } pthread_mutex_unlock(mutex); g_list_free(list_recall_start); } /** * ags_audio_init_recall: * @audio: the #AgsAudio * @stage: stage benning at 0 up to 2, or just -1 * @recall_id: the #AgsRecallID to use or #NULL * * Initializes the recalls of @audio * * Since: 1.0.0 */ void ags_audio_init_recall(AgsAudio *audio, gint stage, AgsRecallID *recall_id) { AgsRecall *recall; GList *list_recall; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(audio == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); /* check for init */ /* return if already initialized */ switch(stage){ case 0: if((AGS_RECALL_ID_INIT_PRE & (recall_id->flags)) != 0){ pthread_mutex_unlock(mutex); return; } break; case 1: if((AGS_RECALL_ID_INIT_INTER & (recall_id->flags)) != 0){ pthread_mutex_unlock(mutex); return; } break; case 2: if((AGS_RECALL_ID_INIT_POST & (recall_id->flags)) != 0){ pthread_mutex_unlock(mutex); return; } break; } /* retrieve appropriate recalls */ if(recall_id->recycling_context->parent == NULL) list_recall = audio->play; else list_recall = audio->recall; /* init */ while(list_recall != NULL){ recall = AGS_RECALL(list_recall->data); if(recall->recall_id == NULL || recall->recall_id->recycling_context != recall_id->recycling_context || AGS_IS_RECALL_AUDIO(recall)){ list_recall = list_recall->next; continue; } if((AGS_RECALL_TEMPLATE & (recall->flags)) == 0){ if(stage == 0){ recall_id->flags |= AGS_RECALL_ID_INIT_PRE; ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(recall)); recall->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(recall); recall->flags &= (~AGS_RECALL_REMOVE); }else if(stage == 1){ recall_id->flags |= AGS_RECALL_ID_INIT_INTER; ags_recall_run_init_inter(recall); }else{ recall_id->flags |= AGS_RECALL_ID_INIT_POST; ags_recall_run_init_post(recall); } } list_recall = list_recall->next; } pthread_mutex_unlock(mutex); } /** * ags_audio_resolve_recall: * @audio: the #AgsAudio * @recall_id: the #AgsRecallID to use * * Performs resolving of recalls. * * Since: 1.0.0 */ void ags_audio_resolve_recall(AgsAudio *audio, AgsRecallID *recall_id) { AgsRecall *recall; GList *list_recall; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(audio == NULL || recall_id == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get mutex */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); /* return if already duplicated */ if((AGS_RECALL_ID_RESOLVE & (recall_id->flags)) != 0){ pthread_mutex_unlock(mutex); return; } /* get the appropriate lists */ if(recall_id->recycling_context->parent == NULL){ list_recall = audio->play; }else{ list_recall = audio->recall; } /* resolve */ // g_message("res a"); while((list_recall = ags_recall_find_recycling_context(list_recall, (GObject *) recall_id->recycling_context)) != NULL){ recall = AGS_RECALL(list_recall->data); ags_recall_resolve_dependencies(recall); list_recall = list_recall->next; } pthread_mutex_unlock(mutex); } /** * ags_audio_is_playing: * @audio: the #AgsAudio * * Determine if #AgsAudio is playing. * * Returns: TRUE if it's playing otherwise FALSE * * Since: 1.0.0 */ gboolean ags_audio_is_playing(AgsAudio *audio) { AgsChannel *output; AgsRecallID *recall_id; AgsPlayback *playback; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* check if playing */ pthread_mutex_lock(mutex); output = audio->output; while(output != NULL){ playback = AGS_PLAYBACK(output->playback); if((AGS_PLAYBACK_PLAYBACK & (g_atomic_int_get(&(playback->flags)))) != 0 || (AGS_PLAYBACK_SEQUENCER & (g_atomic_int_get(&(playback->flags)))) != 0 || (AGS_PLAYBACK_NOTATION & (g_atomic_int_get(&(playback->flags)))) != 0){ pthread_mutex_unlock(mutex); return(TRUE); } output = output->next; } pthread_mutex_unlock(mutex); return(FALSE); } /** * ags_audio_play: * @audio: the #AgsAudio * @recall_id: the #AgsRecallID to apply to * @stage: valid range is from 0 up to 2 * * Performs on single play call of appropriate stage. * * Since: 1.0.0 */ void ags_audio_play(AgsAudio *audio, AgsRecallID *recall_id, gint stage) { AgsRecall *recall; GList *list_start, *list, *list_next; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(audio == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); /* check for status */ if((AGS_RECALL_ID_PRE & (recall_id->flags)) != 0 && (AGS_RECALL_ID_INTER & (recall_id->flags)) != 0 && (AGS_RECALL_ID_POST & (recall_id->flags)) != 0){ recall_id->flags &= (~(AGS_RECALL_ID_PRE | AGS_RECALL_ID_INTER | AGS_RECALL_ID_POST)); } /* return if already played */ switch(stage){ case 0: ags_recall_id_unset_run_stage(recall_id, 1); if((AGS_RECALL_ID_PRE & (recall_id->flags)) != 0){ pthread_mutex_unlock(mutex); return; } break; case 1: ags_recall_id_unset_run_stage(recall_id, 2); if((AGS_RECALL_ID_INTER & (recall_id->flags)) != 0){ pthread_mutex_unlock(mutex); return; } break; case 2: ags_recall_id_unset_run_stage(recall_id, 0); if((AGS_RECALL_ID_POST & (recall_id->flags)) != 0){ pthread_mutex_unlock(mutex); return; } break; } ags_recall_id_set_run_stage(recall_id, stage); /* retrieve appropriate recalls */ if(recall_id->recycling_context->parent == NULL){ g_object_get(audio, "play", &list_start, NULL); }else{ g_object_get(audio, "recall", &list_start, NULL); } pthread_mutex_unlock(mutex); list = list_start; /* play */ while(list != NULL){ guint recall_flags; list_next = list->next; recall = (AgsRecall *) list->data; if(recall == NULL || !AGS_IS_RECALL(recall)){ // if(recall_id->recycling_context->parent != NULL){ // audio->recall = g_list_remove(audio->recall, // recall); // }else{ // audio->play = g_list_remove(audio->play, // recall); // } list = list_next; g_warning("recall == NULL"); continue; } if(AGS_IS_RECALL_AUDIO(recall)){ if(stage == 0){ ags_recall_automate(recall); } list = list_next; continue; } if(recall->recall_id == NULL || (recall->recall_id->recycling_context != recall_id->recycling_context)){ list = list_next; continue; } recall_flags = recall->flags; if((AGS_RECALL_TEMPLATE & (recall_flags)) == 0){ if((AGS_RECALL_HIDE & (recall_flags)) == 0){ g_object_ref(recall); if(stage == 0){ AGS_RECALL_GET_CLASS(recall)->run_pre(recall); }else if(stage == 1){ AGS_RECALL_GET_CLASS(recall)->run_inter(recall); }else{ AGS_RECALL_GET_CLASS(recall)->run_post(recall); } g_object_unref(recall); } } list = list_next; } g_list_free(list_start); } /** * ags_audio_tact: * @audio: the #AgsAudio * @recall_id: the current #AgsRecallID * * Is emitted as audio is played. * * Since: 1.0.0 */ void ags_audio_tact(AgsAudio *audio, AgsRecallID *recall_id) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(!AGS_IS_AUDIO(audio)){ pthread_mutex_unlock(mutex); return; } /* emit */ g_object_ref((GObject *) audio); g_signal_emit(G_OBJECT(audio), audio_signals[TACT], 0, recall_id); g_object_unref((GObject *) audio); pthread_mutex_unlock(mutex); } void ags_audio_real_done(AgsAudio *audio, AgsRecallID *recall_id) { AgsRecall *recall; AgsMutexManager *mutex_manager; AgsMessageDelivery *message_delivery; AgsMessageQueue *message_queue; GList *list, *list_next; gboolean is_toplevel; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get context */ pthread_mutex_lock(mutex); if(recall_id->recycling_context->parent == NULL){ list = audio->play; is_toplevel = TRUE; }else{ list = audio->recall; is_toplevel = FALSE; } /* remove recall, run dispose and unref */ ags_audio_real_done_RECALL0: while(list != NULL){ list_next = list->next; recall = AGS_RECALL(list->data); if(recall->recall_id != NULL && recall->recall_id->recycling_context == recall_id->recycling_context){ g_object_run_dispose(recall); ags_audio_remove_recall(audio, recall, is_toplevel); g_object_unref(recall); } list = list_next; } if(is_toplevel && (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){ list = audio->recall; is_toplevel = FALSE; goto ags_audio_real_done_RECALL0; } pthread_mutex_unlock(mutex); /* emit message */ message_delivery = ags_message_delivery_get_instance(); message_queue = ags_message_delivery_find_namespace(message_delivery, "libags-audio"); if(message_queue != NULL){ AgsMessageEnvelope *message; xmlDoc *doc; xmlNode *root_node; /* specify message body */ doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "ags-command"); xmlDocSetRootElement(doc, root_node); xmlNewProp(root_node, "method", "AgsAudio::done"); /* add message */ message = ags_message_envelope_alloc(audio, NULL, doc); /* set parameter */ message->parameter = g_new0(GParameter, 1); message->n_params = 1; message->parameter[0].name = "recall-id"; g_value_init(&(message->parameter[0].value), G_TYPE_OBJECT); g_value_set_object(&(message->parameter[0].value), recall_id); /* add message */ ags_message_delivery_add_message(message_delivery, "libags-audio", message); } } /** * ags_audio_done: * @audio: the #AgsAudio * @recall_id: the current #AgsRecallID * * Is emitted as playing audio is done. * * Since: 1.0.0 */ void ags_audio_done(AgsAudio *audio, AgsRecallID *recall_id) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(audio == NULL || recall_id == NULL || recall_id->recycling_context == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); if(!(AGS_IS_AUDIO(audio) || AGS_IS_RECALL_ID(recall_id))){ pthread_mutex_unlock(mutex); return; } /* emit */ g_object_ref((GObject *) audio); g_signal_emit(G_OBJECT(audio), audio_signals[DONE], 0, recall_id); g_object_unref((GObject *) audio); pthread_mutex_unlock(mutex); } /** * ags_audio_cancel: * @audio: the #AgsAudio * @recall_id: the #AgsRecallID to apply to * * Cancel processing audio data. * * Since: 1.0.0 */ void ags_audio_cancel(AgsAudio *audio, AgsRecallID *recall_id) { AgsRecall *recall; GList *list_start, *list; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(!AGS_IS_AUDIO(audio) || !AGS_IS_RECALL_ID(recall_id)){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* cancel recalls */ pthread_mutex_lock(mutex); /* retrieve appropriate recalls */ if(recall_id->recycling_context->parent == NULL){ g_object_get(audio, "play", &list_start, NULL); }else{ g_object_get(audio, "recall", &list_start, NULL); } g_object_ref(recall_id); list = list_start; while(list != NULL){ recall = list->data; if(recall == NULL || !AGS_IS_RECALL(recall) || (AGS_RECALL_TEMPLATE & (recall->flags)) || recall->recall_id == NULL || recall->recall_id->recycling_context != recall_id->recycling_context){ list = list->next; continue; } ags_recall_cancel(recall); list = list->next; } g_list_free(list_start); pthread_mutex_unlock(mutex); } /** * ags_audio_remove: * @audio: the #AgsAudio * @recall_id: the #AgsRecallID to apply to * * Remove processing audio data. * * Since: 1.0.0 */ void ags_audio_remove(AgsAudio *audio, AgsRecallID *recall_id) { AgsRecall *recall; GList *list, *list_next; gboolean play; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(audio == NULL || recall_id == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* remove recalls */ pthread_mutex_lock(mutex); if(recall_id->recycling_context->parent == NULL){ list = audio->play; play = TRUE; }else{ list = audio->recall; play = FALSE; } while(list != NULL){ list_next = list->next; recall = AGS_RECALL(list->data); if((AGS_RECALL_TEMPLATE & (recall->flags)) || recall->recall_id == NULL || recall->recall_id->recycling_context != recall_id->recycling_context){ list = list_next; continue; } ags_recall_remove(recall); ags_audio_remove_recall(audio, (GObject *) recall, play); list = list_next; } audio->recall_id = g_list_remove(audio->recall_id, recall_id); g_object_unref(recall_id); pthread_mutex_unlock(mutex); } /** * ags_audio_find_port: * @audio: the #AgsAudio * * Retrieve all ports of #AgsAudio. * * Returns: a new #GList containing #AgsPort * * Since: 1.0.0 */ GList* ags_audio_find_port(AgsAudio *audio) { GList *recall; GList *list; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); list = NULL; /* collect port of playing recall */ recall = audio->play; while(recall != NULL){ if(AGS_RECALL(recall->data)->port != NULL){ if(list == NULL){ list = g_list_copy(AGS_RECALL(recall->data)->port); }else{ if(AGS_RECALL(recall->data)->port != NULL){ list = g_list_concat(list, g_list_copy(AGS_RECALL(recall->data)->port)); } } } recall = recall->next; } /* the same for true recall */ recall = audio->recall; while(recall != NULL){ if(AGS_RECALL(recall->data)->port != NULL){ if(list == NULL){ list = g_list_copy(AGS_RECALL(recall->data)->port); }else{ if(AGS_RECALL(recall->data)->port != NULL){ list = g_list_concat(list, g_list_copy(AGS_RECALL(recall->data)->port)); } } } recall = recall->next; } /* */ list = g_list_reverse(list); pthread_mutex_unlock(mutex); return(list); } /** * ags_audio_find_port_by_specifier_and_scope: * @audio: an #AgsAudio * @specifier: the port's name * @scope: either %TRUE for play or %FALSE for recall * * Retrieve specified port of #AgsAudio * * Returns: an #AgsPort if found otherwise %NULL * * Since: 1.3.0 */ GObject* ags_audio_find_port_by_specifier_and_scope(AgsAudio *audio, gchar *specifier, gboolean play) { AgsMutexManager *mutex_manager; GList *recall, *port; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; if(!AGS_IS_AUDIO(audio)){ return(NULL); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* collect port of playing recall */ pthread_mutex_lock(mutex); if(play){ recall = audio->play; }else{ recall = audio->recall; } while(recall != NULL){ port = AGS_RECALL(recall->data)->port; while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, specifier)){ pthread_mutex_unlock(mutex); return(port->data); } port = port->next; } recall = recall->next; } pthread_mutex_unlock(mutex); return(NULL); } /** * ags_audio_open_files: * @audio: the #AgsAudio * @filenames: the files to open * @overwrite_channels: if existing channels should be assigned * @create_channels: if new channels should be created as not fitting if combined with @overwrite_channels * * Open some files. * * Since: 1.0.0 */ void ags_audio_open_files(AgsAudio *audio, GSList *filenames, gboolean overwrite_channels, gboolean create_channels) { AgsChannel *channel; AgsAudioFile *audio_file; AgsMutexManager *mutex_manager; GObject *soundcard; GList *audio_signal_list; guint input_pads; guint audio_channels; guint i, j; guint list_length; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex, *channel_mutex, *recycling_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get audio fields */ pthread_mutex_lock(mutex); channel = audio->input; soundcard = audio->soundcard; input_pads = audio->input_pads; audio_channels = audio->audio_channels; pthread_mutex_unlock(mutex); /* overwriting existing channels */ if(overwrite_channels){ if(channel != NULL){ for(i = 0; i < input_pads && filenames != NULL; i++){ audio_file = ags_audio_file_new((gchar *) filenames->data, soundcard, 0, audio_channels); if(!ags_audio_file_open(audio_file)){ filenames = filenames->next; continue; } ags_audio_file_read_audio_signal(audio_file); ags_audio_file_close(audio_file); audio_signal_list = audio_file->audio_signal; for(j = 0; j < audio_channels && audio_signal_list != NULL; j++){ AgsRecycling *recycling; /* create task */ error = NULL; ags_channel_set_link(channel, NULL, &error); if(error != NULL){ g_warning("%s", error->message); } /* lock channel and recycling */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get recycling */ pthread_mutex_lock(channel_mutex); recycling = channel->first_recycling; recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(channel_mutex); /* replace template audio signal */ pthread_mutex_lock(recycling_mutex); AGS_AUDIO_SIGNAL(audio_signal_list->data)->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; AGS_AUDIO_SIGNAL(audio_signal_list->data)->recycling = (GObject *) recycling; ags_recycling_add_audio_signal(recycling, audio_signal_list->data); pthread_mutex_unlock(recycling_mutex); /* iterate */ audio_signal_list = audio_signal_list->next; pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } if(audio_file->channels < audio_channels) channel = ags_channel_nth(channel, audio_channels - audio_file->channels); filenames = filenames->next; } } } /* appending to channels */ if(create_channels && filenames != NULL){ list_length = g_slist_length(filenames); ags_audio_set_pads((AgsAudio *) audio, AGS_TYPE_INPUT, list_length + AGS_AUDIO(audio)->input_pads); channel = ags_channel_nth(AGS_AUDIO(audio)->input, (AGS_AUDIO(audio)->input_pads - list_length) * AGS_AUDIO(audio)->audio_channels); while(filenames != NULL){ audio_file = ags_audio_file_new((gchar *) filenames->data, soundcard, 0, audio_channels); if(!ags_audio_file_open(audio_file)){ filenames = filenames->next; continue; } ags_audio_file_read_audio_signal(audio_file); ags_audio_file_close(audio_file); audio_signal_list = audio_file->audio_signal; for(j = 0; j < audio_channels && audio_signal_list != NULL; j++){ AgsRecycling *recycling; /* lock channel and recycling */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get recycling */ pthread_mutex_lock(channel_mutex); recycling = channel->first_recycling; recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(channel_mutex); /* replace template audio signal */ pthread_mutex_lock(recycling_mutex); AGS_AUDIO_SIGNAL(audio_signal_list->data)->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; AGS_AUDIO_SIGNAL(audio_signal_list->data)->recycling = (GObject *) recycling; ags_recycling_add_audio_signal(recycling, audio_signal_list->data); pthread_mutex_unlock(recycling_mutex); /* iterate */ audio_signal_list = audio_signal_list->next; pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } if(audio_channels > audio_file->channels) channel = ags_channel_nth(channel, audio_channels - audio_file->channels); filenames = filenames->next; } } } /** * ags_audio_recursive_set_property: * @audio: the #AgsAudio * @parameter: the #GParameter-struct array containing properties * @n_params: the length of @parameter array * * Recursive set property for #AgsAudio. * * Since: 1.0.0 */ void ags_audio_recursive_set_property(AgsAudio *audio, GParameter *parameter, gint n_params) { AgsChannel *channel; auto void ags_audio_set_property(AgsAudio *audio, GParameter *parameter, gint n_params); auto void ags_audio_recursive_set_property_down(AgsChannel *channel, GParameter *parameter, gint n_params); auto void ags_audio_recursive_set_property_down_input(AgsChannel *channel, GParameter *parameter, gint n_params); void ags_audio_set_property(AgsAudio *audio, GParameter *parameter, gint n_params){ guint i; for(i = 0; i < n_params; i++){ g_object_set_property(G_OBJECT(audio), parameter[i].name, &(parameter[i].value)); } } void ags_audio_recursive_set_property_down(AgsChannel *channel, GParameter *parameter, gint n_params){ if(channel == NULL){ return; } ags_audio_set_property(AGS_AUDIO(channel->audio), parameter, n_params); ags_audio_recursive_set_property_down_input(channel, parameter, n_params); } void ags_audio_recursive_set_property_down_input(AgsChannel *channel, GParameter *parameter, gint n_params){ AgsAudio *audio; AgsChannel *input; if(channel == NULL){ return; } audio = (AgsAudio *) channel->audio; if(audio == NULL){ return; } input = ags_channel_nth(audio->input, channel->audio_channel); while(input != NULL){ ags_audio_recursive_set_property_down(input->link, parameter, n_params); input = input->next; } } if(audio == NULL){ return; } ags_audio_set_property(audio, parameter, n_params); if(audio->input != NULL){ channel = audio->input; while(channel != NULL){ ags_audio_recursive_set_property_down(channel->link, parameter, n_params); channel = channel->next; } } } /** * ags_audio_recursive_play_init: * @audio: the #AgsAudio object * @playback: if doing playback * @sequencer: if doing sequencer * @notation: if doing notation * * Initializes #AgsAudio in order to do playback, sequencer or notation. * * Returns: a list containing all #AgsRecallID * * Since: 1.0.0 */ GList* ags_audio_recursive_play_init(AgsAudio *audio, gboolean playback, gboolean sequencer, gboolean notation) { AgsChannel *channel; AgsRecallID *recall_id; AgsMutexManager *mutex_manager; GList *list, *list_start; gint stage; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex, *channel_mutex; if(!AGS_IS_AUDIO(audio)){ return(NULL); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* recursive init playback */ pthread_mutex_lock(mutex); list = NULL; list_start = NULL; channel = audio->output; list = list_start; while(channel != NULL){ recall_id = ags_channel_recursive_play_init(channel, -1, TRUE, TRUE, playback, sequencer, notation, TRUE, NULL); list_start = g_list_append(list_start, recall_id); /* iterate */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } pthread_mutex_unlock(mutex); return(list_start); } /** * ags_audio_new: * @soundcard: an #AgsSoundcard * * Creates an #AgsAudio, with defaults of @soundcard. * * Returns: a new #AgsAudio * * Since: 1.0.0 */ AgsAudio* ags_audio_new(GObject *soundcard) { AgsAudio *audio; audio = (AgsAudio *) g_object_new(AGS_TYPE_AUDIO, "soundcard", soundcard, NULL); return(audio); } gsequencer-1.4.24/ags/audio/ags_recall_lv2_run.c0000644000175000017500000004766713247044247016501 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_lv2_run_class_init(AgsRecallLv2RunClass *recall_lv2_run_class); void ags_recall_lv2_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_lv2_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_recall_lv2_run_init(AgsRecallLv2Run *recall_lv2_run); void ags_recall_lv2_run_connect(AgsConnectable *connectable); void ags_recall_lv2_run_disconnect(AgsConnectable *connectable); void ags_recall_lv2_run_finalize(GObject *gobject); void ags_recall_lv2_run_run_init_pre(AgsRecall *recall); void ags_recall_lv2_run_run_pre(AgsRecall *recall); void ags_recall_lv2_run_run_inter(AgsRecall *recall); void ags_recall_lv2_run_load_ports(AgsRecallLv2Run *recall_lv2_run); /** * SECTION:ags_recall_lv2_run * @Short_description: The object interfacing with LV2 * @Title: AgsRecallLv2Run * * #AgsRecallLv2Run provides LV2 support. */ static gpointer ags_recall_lv2_run_parent_class = NULL; static AgsConnectableInterface* ags_recall_lv2_run_parent_connectable_interface; GType ags_recall_lv2_run_get_type (void) { static GType ags_type_recall_lv2_run = 0; if(!ags_type_recall_lv2_run){ static const GTypeInfo ags_recall_lv2_run_info = { sizeof (AgsRecallLv2RunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_lv2_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallLv2Run), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_lv2_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_lv2_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_recall_lv2_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_lv2_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsRecallLv2Run", &ags_recall_lv2_run_info, 0); g_type_add_interface_static(ags_type_recall_lv2_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_lv2_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_recall_lv2_run); } void ags_recall_lv2_run_class_init(AgsRecallLv2RunClass *recall_lv2_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_lv2_run_parent_class = g_type_class_peek_parent(recall_lv2_run); /* GObjectClass */ gobject = (GObjectClass *) recall_lv2_run; gobject->finalize = ags_recall_lv2_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) recall_lv2_run; recall->run_init_pre = ags_recall_lv2_run_run_init_pre; recall->run_pre = ags_recall_lv2_run_run_pre; recall->run_inter = ags_recall_lv2_run_run_inter; } void ags_recall_lv2_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_lv2_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_lv2_run_connect; connectable->disconnect = ags_recall_lv2_run_disconnect; } void ags_recall_lv2_run_plugin_interface_init(AgsPluginInterface *plugin) { //TODO:JK: implement me } void ags_recall_lv2_run_init(AgsRecallLv2Run *recall_lv2_run) { recall_lv2_run->input = NULL; recall_lv2_run->output = NULL; recall_lv2_run->event_port = NULL; recall_lv2_run->atom_port = NULL; recall_lv2_run->delta_time = 0; recall_lv2_run->event_buffer = NULL; recall_lv2_run->event_count = NULL; recall_lv2_run->note = NULL; recall_lv2_run->route_lv2_audio_run = NULL; recall_lv2_run->worker_handle = NULL; } void ags_recall_lv2_run_connect(AgsConnectable *connectable) { ags_recall_lv2_run_parent_connectable_interface->connect(connectable); } void ags_recall_lv2_run_disconnect(AgsConnectable *connectable) { ags_recall_lv2_run_parent_connectable_interface->disconnect(connectable); } void ags_recall_lv2_run_finalize(GObject *gobject) { AgsRecallLv2 *recall_lv2; AgsRecallLv2Run *recall_lv2_run; uint32_t i; recall_lv2_run = AGS_RECALL_LV2_RUN(gobject); free(recall_lv2_run->lv2_handle); if(recall_lv2_run->output != NULL){ free(recall_lv2_run->output); } if(recall_lv2_run->input != NULL){ free(recall_lv2_run->input); } g_list_free_full(recall_lv2_run->note, g_object_unref); if(recall_lv2_run->atom_port != NULL){ free(recall_lv2_run->atom_port); } if(recall_lv2_run->event_port != NULL){ free(recall_lv2_run->event_port); } if(recall_lv2_run->event_buffer != NULL){ free(recall_lv2_run->event_buffer); } if(recall_lv2_run->event_count != NULL){ free(recall_lv2_run->event_count); } if(recall_lv2_run->worker_handle != NULL){ if(AGS_LV2_WORKER(recall_lv2_run->worker_handle)->returnable_thread != NULL){ g_atomic_int_and(&(AGS_RETURNABLE_THREAD(AGS_LV2_WORKER(recall_lv2_run->worker_handle)->returnable_thread)->flags), (~AGS_RETURNABLE_THREAD_IN_USE)); ags_thread_stop(AGS_LV2_WORKER(recall_lv2_run->worker_handle)->returnable_thread); } g_object_unref(recall_lv2_run->worker_handle); } /* call parent */ G_OBJECT_CLASS(ags_recall_lv2_run_parent_class)->finalize(gobject); } void ags_recall_lv2_run_run_init_pre(AgsRecall *recall) { AgsRecallLv2 *recall_lv2; AgsRecallLv2Run *recall_lv2_run; AgsAudioSignal *audio_signal; AgsLv2Plugin *lv2_plugin; AgsConfig *config; double samplerate; uint32_t buffer_size; uint32_t i; /* call parent */ AGS_RECALL_CLASS(ags_recall_lv2_run_parent_class)->run_init_pre(recall); recall_lv2_run = AGS_RECALL_LV2_RUN(recall); recall_lv2 = AGS_RECALL_LV2(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); /* set up buffer */ audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall_lv2_run)->source; /* set up buffer */ samplerate = audio_signal->samplerate; buffer_size = audio_signal->buffer_size; recall_lv2_run->input = (float *) malloc(recall_lv2->input_lines * buffer_size * sizeof(float)); recall_lv2_run->output = (float *) malloc(recall_lv2->output_lines * buffer_size * sizeof(float)); /* instantiate lv2 */ lv2_plugin = recall_lv2->plugin; recall_lv2_run->lv2_handle = (LV2_Handle *) ags_base_plugin_instantiate(AGS_BASE_PLUGIN(lv2_plugin), samplerate); #ifdef AGS_DEBUG g_message("instantiate LV2 handle"); #endif ags_recall_lv2_run_load_ports(recall_lv2_run); /* can't be done in ags_recall_lv2_run_run_init_inter since possebility of overlapping buffers */ /* connect audio port */ for(i = 0; i < recall_lv2->input_lines; i++){ #ifdef AGS_DEBUG g_message("connect port: %d", recall_lv2->input_port[i]); #endif recall_lv2->plugin_descriptor->connect_port(recall_lv2_run->lv2_handle[0], recall_lv2->input_port[i], recall_lv2_run->input); } for(i = 0; i < recall_lv2->output_lines; i++){ #ifdef AGS_DEBUG g_message("connect port: %d", recall_lv2->output_port[i]); #endif recall_lv2->plugin_descriptor->connect_port(recall_lv2_run->lv2_handle[0], recall_lv2->output_port[i], recall_lv2_run->output); } /* connect event port */ if((AGS_RECALL_LV2_HAS_EVENT_PORT & (recall_lv2->flags)) != 0){ recall_lv2_run->event_port = ags_lv2_plugin_alloc_event_buffer(AGS_RECALL_LV2_DEFAULT_MIDI_LENGHT); recall_lv2->plugin_descriptor->connect_port(recall_lv2_run->lv2_handle[0], recall_lv2->event_port, recall_lv2_run->event_port); } /* connect atom port */ if((AGS_RECALL_LV2_HAS_ATOM_PORT & (recall_lv2->flags)) != 0){ recall_lv2_run->atom_port = ags_lv2_plugin_alloc_atom_sequence(AGS_RECALL_LV2_DEFAULT_MIDI_LENGHT); recall_lv2->plugin_descriptor->connect_port(recall_lv2_run->lv2_handle[0], recall_lv2->atom_port, recall_lv2_run->atom_port); } /* activate */ if(recall_lv2->plugin_descriptor->activate != NULL){ recall_lv2->plugin_descriptor->activate(recall_lv2_run->lv2_handle[0]); } /* set program */ if((AGS_LV2_PLUGIN_HAS_PROGRAM_INTERFACE & (lv2_plugin->flags)) != 0){ AgsPort *current; GList *list, *port, *port_descriptor; gchar *specifier; float *port_data; guint port_count; port = AGS_RECALL(recall_lv2)->port; port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; port_count = g_list_length(port_descriptor); port_data = (float *) malloc(port_count * sizeof(float)); for(i = 0; i < port_count && port_descriptor != NULL; ){ specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; list = port; while(list != NULL){ current = list->data; if(!g_strcmp0(specifier, current->specifier)){ i++; break; } list = list->next; } if(list != NULL){ port_data[i] = current->port_value.ags_port_float; } port_descriptor = port_descriptor->next; } ags_lv2_plugin_change_program(lv2_plugin, recall_lv2_run->lv2_handle[0], recall_lv2->bank, recall_lv2->program); /* reset port data */ port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; for(i = 0; i < port_count && port_descriptor != NULL;){ specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; list = port; while(list != NULL){ current = list->data; if(!g_strcmp0(specifier, current->specifier)){ current->port_value.ags_port_float = port_data[i]; i++; // g_message("%s %f", current->specifier, port_data[i]); break; } list = list->next; } port_descriptor = port_descriptor->next; } free(port_data); } } void ags_recall_lv2_run_run_pre(AgsRecall *recall) { AgsAudioSignal *audio_signal; AgsRecallLv2 *recall_lv2; AgsRecallLv2Run *recall_lv2_run; AgsCountBeatsAudioRun *count_beats_audio_run; AgsRouteLv2AudioRun *route_lv2_audio_run; GList *note, *note_next; guint copy_mode_in, copy_mode_out; uint32_t buffer_size; uint32_t i; /* call parent */ AGS_RECALL_CLASS(ags_recall_lv2_run_parent_class)->run_pre(recall); if(recall->rt_safe && recall->recall_id->recycling_context->parent != NULL && AGS_RECALL_AUDIO_SIGNAL(recall)->source->note == NULL){ return; } recall_lv2 = AGS_RECALL_LV2(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); recall_lv2_run = AGS_RECALL_LV2_RUN(recall); if((AGS_RECALL_LV2_HAS_EVENT_PORT & (recall_lv2->flags)) == 0 && (AGS_RECALL_LV2_HAS_ATOM_PORT & (recall_lv2->flags)) == 0){ return; } if(recall_lv2_run->route_lv2_audio_run != NULL){ route_lv2_audio_run = AGS_ROUTE_LV2_AUDIO_RUN(recall_lv2_run->route_lv2_audio_run); count_beats_audio_run = route_lv2_audio_run->count_beats_audio_run; }else{ route_lv2_audio_run = NULL; count_beats_audio_run = NULL; } /* set up buffer */ audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall_lv2_run)->source; buffer_size = audio_signal->buffer_size; if(AGS_RECALL(recall_lv2_run)->rt_safe){ note = recall_lv2_run->note; while(note != NULL){ note_next = note->next; if((AGS_NOTE(recall_lv2_run->note->data)->x[1] <= count_beats_audio_run->notation_counter && (AGS_NOTE_FEED & (AGS_NOTE(recall_lv2_run->note->data)->flags)) == 0) || AGS_NOTE(recall_lv2_run->note->data)->x[0] > count_beats_audio_run->notation_counter){ recall_lv2_run->note = g_list_remove(recall_lv2_run->note, note->data); } note = note_next; } }else{ if(audio_signal->stream_current == NULL || (count_beats_audio_run == NULL || ((AGS_NOTE(recall_lv2_run->note->data)->x[1] <= count_beats_audio_run->notation_counter && (AGS_NOTE_FEED & (AGS_NOTE(recall_lv2_run->note->data)->flags)) == 0) || AGS_NOTE(recall_lv2_run->note->data)->x[0] > count_beats_audio_run->notation_counter))){ // g_message("done"); /* deactivate */ if(recall_lv2->plugin_descriptor->deactivate != NULL){ recall_lv2->plugin_descriptor->deactivate(recall_lv2_run->lv2_handle[0]); } /* cleanup */ if(recall_lv2->plugin_descriptor->cleanup != NULL){ recall_lv2->plugin_descriptor->cleanup(recall_lv2_run->lv2_handle[0]); } ags_recall_done(recall); return; } } audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall)->source; /* get copy mode and clear buffer */ buffer_size = audio_signal->buffer_size; copy_mode_in = ags_audio_buffer_util_get_copy_mode(AGS_AUDIO_BUFFER_UTIL_FLOAT, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); copy_mode_out = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(audio_signal->format), AGS_AUDIO_BUFFER_UTIL_FLOAT); if(recall_lv2_run->output != NULL){ ags_audio_buffer_util_clear_float(recall_lv2_run->output, 1, recall_lv2->output_lines * buffer_size); } if(recall_lv2_run->input != NULL){ ags_audio_buffer_util_clear_float(recall_lv2_run->input, 1, recall_lv2->input_lines * buffer_size); } /* copy data */ if(recall_lv2_run->input != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(recall_lv2_run->input, 1, 0, audio_signal->stream_current->data, 1, 0, (guint) buffer_size, copy_mode_in); } /* process data */ note = recall_lv2_run->note; while(note != NULL){ recall_lv2->plugin_descriptor->run(recall_lv2_run->lv2_handle[0], buffer_size); note = note->next; } /* copy data */ if(recall_lv2_run->output != NULL){ ags_audio_buffer_util_clear_buffer(audio_signal->stream_current->data, 1, buffer_size, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal->stream_current->data, 1, 0, recall_lv2_run->output, 1, 0, (guint) buffer_size, copy_mode_out); } } void ags_recall_lv2_run_run_inter(AgsRecall *recall) { AgsAudioSignal *audio_signal; AgsRecallLv2 *recall_lv2; AgsRecallLv2Run *recall_lv2_run; guint copy_mode_in, copy_mode_out; uint32_t buffer_size; uint32_t i; /* call parent */ AGS_RECALL_CLASS(ags_recall_lv2_run_parent_class)->run_inter(recall); if(recall->rt_safe && recall->recall_id->recycling_context->parent != NULL && AGS_RECALL_AUDIO_SIGNAL(recall)->source->note == NULL){ return; } recall_lv2 = AGS_RECALL_LV2(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); recall_lv2_run = AGS_RECALL_LV2_RUN(recall); if((AGS_RECALL_LV2_HAS_EVENT_PORT & (recall_lv2->flags)) != 0 || (AGS_RECALL_LV2_HAS_ATOM_PORT & (recall_lv2->flags)) != 0){ return; } /* set up buffer */ audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall_lv2_run)->source; buffer_size = audio_signal->buffer_size; if(audio_signal->stream_current == NULL){ // g_message("done"); /* deactivate */ if(recall_lv2->plugin_descriptor->deactivate != NULL){ recall_lv2->plugin_descriptor->deactivate(recall_lv2_run->lv2_handle[0]); } /* cleanup */ if(recall_lv2->plugin_descriptor->cleanup != NULL){ recall_lv2->plugin_descriptor->cleanup(recall_lv2_run->lv2_handle[0]); } ags_recall_done(recall); return; } copy_mode_in = ags_audio_buffer_util_get_copy_mode(AGS_AUDIO_BUFFER_UTIL_FLOAT, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); copy_mode_out = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(audio_signal->format), AGS_AUDIO_BUFFER_UTIL_FLOAT); if(recall_lv2_run->output != NULL){ ags_audio_buffer_util_clear_float(recall_lv2_run->output, recall_lv2->output_lines, buffer_size); } if(recall_lv2_run->input != NULL){ ags_audio_buffer_util_clear_float(recall_lv2_run->input, recall_lv2->input_lines, buffer_size); } if(recall_lv2_run->input != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(recall_lv2_run->input, (guint) recall_lv2->input_lines, 0, audio_signal->stream_current->data, 1, 0, (guint) audio_signal->buffer_size, copy_mode_in); } /* process data */ audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall)->source; buffer_size = audio_signal->buffer_size; recall_lv2->plugin_descriptor->run(recall_lv2_run->lv2_handle[0], buffer_size); /* copy data */ if(recall_lv2_run->output != NULL){ ags_audio_buffer_util_clear_buffer(audio_signal->stream_current->data, 1, buffer_size, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal->stream_current->data, 1, 0, recall_lv2_run->output, (guint) recall_lv2->output_lines, 0, (guint) audio_signal->buffer_size, copy_mode_out); } } /** * ags_recall_lv2_run_load_ports: * @recall_lv2_run: an #AgsRecallLv2Run * * Set up LV2 ports. * * Since: 1.0.0 */ void ags_recall_lv2_run_load_ports(AgsRecallLv2Run *recall_lv2_run) { AgsRecallLv2 *recall_lv2; AgsPort *current; AgsLv2Plugin *lv2_plugin; GList *port; GList *port_descriptor; gchar *specifier; uint32_t i, j; recall_lv2 = AGS_RECALL_LV2(AGS_RECALL_CHANNEL_RUN(AGS_RECALL(recall_lv2_run)->parent->parent)->recall_channel); lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), recall_lv2->filename, recall_lv2->effect); if(AGS_BASE_PLUGIN(lv2_plugin)->port != NULL){ port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; for(i = 0; port_descriptor != NULL; i++){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ port = AGS_RECALL(recall_lv2)->port; current = NULL; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; while(port != NULL){ if(!g_strcmp0(specifier, AGS_PORT(port->data)->specifier)){ current = port->data; break; } port = port->next; } #ifdef AGS_DEBUG g_message("connect port: %d", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index); #endif recall_lv2->plugin_descriptor->connect_port(recall_lv2_run->lv2_handle[0], (uint32_t) AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index, (float *) &(current->port_value.ags_port_float)); } port_descriptor = port_descriptor->next; } } } /** * ags_recall_lv2_run_new: * @audio_signal: the source * * Creates a #AgsRecallLv2Run * * Returns: a new #AgsRecallLv2Run * * Since: 1.0.0 */ AgsRecallLv2Run* ags_recall_lv2_run_new(AgsAudioSignal *audio_signal) { AgsRecallLv2Run *recall_lv2_run; recall_lv2_run = (AgsRecallLv2Run *) g_object_new(AGS_TYPE_RECALL_LV2_RUN, "source", audio_signal, NULL); return(recall_lv2_run); } gsequencer-1.4.24/ags/audio/ags_recall_ladspa.c0000644000175000017500000005351613246707333016345 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_ladspa_class_init(AgsRecallLadspaClass *recall_ladspa_class); void ags_recall_ladspa_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_ladspa_plugin_interface_init(AgsPluginInterface *plugin); void ags_recall_ladspa_init(AgsRecallLadspa *recall_ladspa); void ags_recall_ladspa_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_ladspa_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_ladspa_connect(AgsConnectable *connectable); void ags_recall_ladspa_disconnect(AgsConnectable *connectable); void ags_recall_ladspa_set_ports(AgsPlugin *plugin, GList *port); void ags_recall_ladspa_finalize(GObject *gobject); void ags_recall_ladspa_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_recall_ladspa_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); /** * SECTION:ags_recall_ladspa * @short_description: The object interfacing with LADSPA * @title: AgsRecallLadspa * @section_id: * @include: ags/audio/ags_recall_ladspa.h * * #AgsRecallLadspa provides LADSPA support. */ enum{ PROP_0, PROP_FILENAME, PROP_EFFECT, PROP_INDEX, }; static gpointer ags_recall_ladspa_parent_class = NULL; static AgsConnectableInterface* ags_recall_ladspa_parent_connectable_interface; static AgsPluginInterface* ags_recall_ladspa_parent_plugin_interface; GType ags_recall_ladspa_get_type (void) { static GType ags_type_recall_ladspa = 0; if(!ags_type_recall_ladspa){ static const GTypeInfo ags_recall_ladspa_info = { sizeof (AgsRecallLadspaClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_ladspa_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallLadspa), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_ladspa_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_ladspa_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_recall_ladspa_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_ladspa = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsRecallLadspa", &ags_recall_ladspa_info, 0); g_type_add_interface_static(ags_type_recall_ladspa, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_ladspa, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_recall_ladspa); } void ags_recall_ladspa_class_init(AgsRecallLadspaClass *recall_ladspa) { GObjectClass *gobject; GParamSpec *param_spec; ags_recall_ladspa_parent_class = g_type_class_peek_parent(recall_ladspa); /* GObjectClass */ gobject = (GObjectClass *) recall_ladspa; gobject->set_property = ags_recall_ladspa_set_property; gobject->get_property = ags_recall_ladspa_get_property; gobject->finalize = ags_recall_ladspa_finalize; /* properties */ /** * AgsRecallLadspa:filename: * * The plugins filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the object file"), i18n_pspec("The filename as string of object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsRecallLadspa:recycling: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsRecallLadspa:recycling: * * The effect's index. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("index", i18n_pspec("index of effect"), i18n_pspec("The numerical index of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); } void ags_recall_ladspa_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_ladspa_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_ladspa_connect; connectable->disconnect = ags_recall_ladspa_disconnect; } void ags_recall_ladspa_plugin_interface_init(AgsPluginInterface *plugin) { ags_recall_ladspa_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_recall_ladspa_read; plugin->write = ags_recall_ladspa_write; plugin->set_ports = ags_recall_ladspa_set_ports; } void ags_recall_ladspa_init(AgsRecallLadspa *recall_ladspa) { AGS_RECALL(recall_ladspa)->name = "ags-ladspa"; AGS_RECALL(recall_ladspa)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(recall_ladspa)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(recall_ladspa)->xml_type = "ags-recall-ladspa"; AGS_RECALL(recall_ladspa)->port = NULL; recall_ladspa->filename = NULL; recall_ladspa->effect = NULL; recall_ladspa->index = 0; recall_ladspa->plugin_descriptor = NULL; recall_ladspa->input_port = NULL; recall_ladspa->input_lines = 0; recall_ladspa->output_port = NULL; recall_ladspa->output_lines = 0; } void ags_recall_ladspa_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallLadspa *recall_ladspa; recall_ladspa = AGS_RECALL_LADSPA(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(filename == recall_ladspa->filename){ return; } if(recall_ladspa->filename != NULL){ g_free(recall_ladspa->filename); } recall_ladspa->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == recall_ladspa->effect){ return; } if(recall_ladspa->effect != NULL){ g_free(recall_ladspa->effect); } recall_ladspa->effect = g_strdup(effect); } break; case PROP_INDEX: { unsigned long index; index = g_value_get_ulong(value); if(index == recall_ladspa->index){ return; } recall_ladspa->index = index; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_ladspa_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallLadspa *recall_ladspa; recall_ladspa = AGS_RECALL_LADSPA(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, recall_ladspa->filename); } break; case PROP_EFFECT: { g_value_set_string(value, recall_ladspa->effect); } break; case PROP_INDEX: { g_value_set_uint(value, recall_ladspa->index); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_ladspa_connect(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } ags_recall_load_automation(recall, g_list_copy(recall->port)); ags_recall_ladspa_parent_connectable_interface->connect(connectable); } void ags_recall_ladspa_disconnect(AgsConnectable *connectable) { ags_recall_ladspa_parent_connectable_interface->disconnect(connectable); } void ags_recall_ladspa_set_ports(AgsPlugin *plugin, GList *port) { AgsRecallLadspa *recall_ladspa; AgsPort *current; AgsLadspaPlugin *ladspa_plugin; GList *list; GList *port_descriptor; unsigned long port_count; unsigned long i; recall_ladspa = AGS_RECALL_LADSPA(plugin); ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), recall_ladspa->filename, recall_ladspa->effect); port_descriptor = AGS_BASE_PLUGIN(ladspa_plugin)->port; if(port_descriptor != NULL){ port_count = g_list_length(port_descriptor); for(i = 0; i < port_count; i++){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ gchar *specifier; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; list = port; current = NULL; while(list != NULL){ if(!g_strcmp0(specifier, AGS_PORT(list->data)->specifier)){ current = list->data; break; } list = list->next; } if(current != NULL){ current->flags |= AGS_PORT_USE_LADSPA_FLOAT; current->port_descriptor = port_descriptor->data; ags_recall_ladspa_load_conversion(recall_ladspa, (GObject *) current, port_descriptor->data); current->port_value.ags_port_float = (LADSPA_Data) g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value); #ifdef AGS_DEBUG g_message("connecting port: %lu/%lu", i, port_count); #endif } }else if((AGS_PORT_DESCRIPTOR_AUDIO & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_ladspa->input_port == NULL){ recall_ladspa->input_port = (unsigned long *) malloc(sizeof(unsigned long)); recall_ladspa->input_port[0] = i; }else{ recall_ladspa->input_port = (unsigned long *) realloc(recall_ladspa->input_port, (recall_ladspa->input_lines + 1) * sizeof(unsigned long)); recall_ladspa->input_port[recall_ladspa->input_lines] = i; } recall_ladspa->input_lines += 1; }else if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_ladspa->output_port == NULL){ recall_ladspa->output_port = (unsigned long *) malloc(sizeof(unsigned long)); recall_ladspa->output_port[0] = i; }else{ recall_ladspa->output_port = (unsigned long *) realloc(recall_ladspa->output_port, (recall_ladspa->output_lines + 1) * sizeof(unsigned long)); recall_ladspa->output_port[recall_ladspa->output_lines] = i; } recall_ladspa->output_lines += 1; } } port_descriptor = port_descriptor->next; } AGS_RECALL(recall_ladspa)->port = g_list_reverse(port); } } void ags_recall_ladspa_finalize(GObject *gobject) { AgsRecallLadspa *recall_ladspa; recall_ladspa = AGS_RECALL_LADSPA(gobject); g_free(recall_ladspa->filename); g_free(recall_ladspa->effect); if(recall_ladspa->input_port != NULL){ free(recall_ladspa->input_port); } if(recall_ladspa->output_port != NULL){ free(recall_ladspa->output_port); } /* call parent */ G_OBJECT_CLASS(ags_recall_ladspa_parent_class)->finalize(gobject); } void ags_recall_ladspa_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsRecallLadspa *gobject; AgsLadspaPlugin *ladspa_plugin; gchar *filename, *effect; unsigned long index; gobject = AGS_RECALL_LADSPA(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); filename = xmlGetProp(node, "filename"); effect = xmlGetProp(node, "effect"); index = g_ascii_strtoull(xmlGetProp(node, "index"), NULL, 10); g_object_set(gobject, "filename", filename, "effect", effect, "index", index, NULL); ags_recall_ladspa_load(gobject); } xmlNode* ags_recall_ladspa_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsRecallLadspa *recall_ladspa; xmlNode *node; gchar *id; recall_ladspa = AGS_RECALL_LADSPA(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-recall-ladspa"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_ladspa, NULL)); xmlNewProp(node, "filename", g_strdup(recall_ladspa->filename)); xmlNewProp(node, "effect", g_strdup(recall_ladspa->effect)); xmlNewProp(node, "index", g_strdup_printf("%lu", recall_ladspa->index)); xmlAddChild(parent, node); return(node); } /** * ags_recall_ladspa_load: * @recall_ladspa: an #AgsRecallLadspa * * Set up LADSPA handle. * * Since: 1.0.0 */ void ags_recall_ladspa_load(AgsRecallLadspa *recall_ladspa) { AgsLadspaPlugin *ladspa_plugin; void *plugin_so; LADSPA_Descriptor_Function ladspa_descriptor; LADSPA_Descriptor *plugin_descriptor; /* */ ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), recall_ladspa->filename, recall_ladspa->effect); plugin_so = AGS_BASE_PLUGIN(ladspa_plugin)->plugin_so; if(plugin_so){ ladspa_descriptor = (LADSPA_Descriptor_Function) dlsym(plugin_so, "ladspa_descriptor"); if(dlerror() == NULL && ladspa_descriptor){ recall_ladspa->plugin_descriptor = plugin_descriptor = ladspa_descriptor(recall_ladspa->index); } } } /** * ags_recall_ladspa_load_ports: * @recall_ladspa: an #AgsRecallLadspa * * Set up LADSPA ports. * * Returns: a #GList containing #AgsPort. * * Since: 1.0.0 */ GList* ags_recall_ladspa_load_ports(AgsRecallLadspa *recall_ladspa) { AgsLadspaPlugin *ladspa_plugin; AgsPort *current; GList *port; GList *port_descriptor; unsigned long port_count; unsigned long i; ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(), recall_ladspa->filename, recall_ladspa->effect); port = NULL; port_descriptor = AGS_BASE_PLUGIN(ladspa_plugin)->port; if(port_descriptor != NULL){ port_count = g_list_length(port_descriptor); for(i = 0; i < port_count; i++){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ AgsLadspaConversion *ladspa_conversion; gchar *plugin_name; gchar *specifier; plugin_name = g_strdup_printf("ladspa-%u", ladspa_plugin->unique_id); specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; current = g_object_new(AGS_TYPE_PORT, "plugin-name", plugin_name, "specifier", specifier, "control-port", g_strdup_printf("%lu/%lu", i, port_count), "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, NULL); g_object_ref(current); current->flags |= AGS_PORT_USE_LADSPA_FLOAT; if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ AGS_RECALL(recall_ladspa)->flags |= AGS_RECALL_HAS_OUTPUT_PORT; current->flags |= AGS_PORT_IS_OUTPUT; }else{ if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0 && (AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0){ current->flags |= AGS_PORT_INFINITE_RANGE; } } current->port_descriptor = port_descriptor->data; ags_recall_ladspa_load_conversion(recall_ladspa, (GObject *) current, port_descriptor->data); current->port_value.ags_port_ladspa = (LADSPA_Data) g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value); // g_message("connecting port: %d/%d", i, port_count); port = g_list_prepend(port, current); }else if((AGS_PORT_DESCRIPTOR_AUDIO & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_ladspa->input_port == NULL){ recall_ladspa->input_port = (unsigned long *) malloc(sizeof(unsigned long)); recall_ladspa->input_port[0] = i; }else{ recall_ladspa->input_port = (unsigned long *) realloc(recall_ladspa->input_port, (recall_ladspa->input_lines + 1) * sizeof(unsigned long)); recall_ladspa->input_port[recall_ladspa->input_lines] = i; } recall_ladspa->input_lines += 1; }else if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_ladspa->output_port == NULL){ recall_ladspa->output_port = (unsigned long *) malloc(sizeof(unsigned long)); recall_ladspa->output_port[0] = i; }else{ recall_ladspa->output_port = (unsigned long *) realloc(recall_ladspa->output_port, (recall_ladspa->output_lines + 1) * sizeof(unsigned long)); recall_ladspa->output_port[recall_ladspa->output_lines] = i; } recall_ladspa->output_lines += 1; } } port_descriptor = port_descriptor->next; } AGS_RECALL(recall_ladspa)->port = g_list_reverse(port); } return(g_list_copy(AGS_RECALL(recall_ladspa)->port)); } /** * ags_recall_ladspa_load_conversion: * @recall_ladspa: the #AgsRecallLadspa * @port: an #AgsPort * @port_descriptor: the #AgsPortDescriptor-struct * * Loads conversion object by using @port_descriptor and sets in on @port. * * Since: 1.0.0 */ void ags_recall_ladspa_load_conversion(AgsRecallLadspa *recall_ladspa, GObject *port, gpointer port_descriptor) { AgsLadspaConversion *ladspa_conversion; if(recall_ladspa == NULL || port == NULL || port_descriptor == NULL){ return; } ladspa_conversion = NULL; if((AGS_PORT_DESCRIPTOR_BOUNDED_BELOW & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_BELOW; } if((AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_BOUNDED_ABOVE; } if((AGS_PORT_DESCRIPTOR_SAMPLERATE & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_SAMPLERATE; } if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ if(ladspa_conversion == NULL || !AGS_IS_LADSPA_CONVERSION(ladspa_conversion)){ ladspa_conversion = ags_ladspa_conversion_new(); } ladspa_conversion->flags |= AGS_LADSPA_CONVERSION_LOGARITHMIC; } if(ladspa_conversion != NULL){ g_object_set(port, "conversion", ladspa_conversion, NULL); } } /** * ags_recall_ladspa_find: * @recall: a #GList containing #AgsRecall * @filename: plugin filename * @effect: effect's name * * Retrieve LADSPA recall. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_recall_ladspa_find(GList *recall, gchar *filename, gchar *effect) { while(recall != NULL){ if(AGS_IS_RECALL_LADSPA(recall->data)){ if(!g_strcmp0(AGS_RECALL_LADSPA(recall->data)->filename, filename) && !g_strcmp0(AGS_RECALL_LADSPA(recall->data)->effect, effect)){ return(recall); } } recall = recall->next; } return(NULL); } /** * ags_recall_ladspa_new: * @source: the source * @filename: the LADSPA plugin filename * @effect: effect's name * @index: effect's index * * Creates a #AgsRecallLadspa * * Returns: a new #AgsRecallLadspa * * Since: 1.0.0 */ AgsRecallLadspa* ags_recall_ladspa_new(AgsChannel *source, gchar *filename, gchar *effect, unsigned long index) { GObject *soundcard; AgsRecallLadspa *recall_ladspa; if(source != NULL){ soundcard = (GObject *) source->soundcard; }else{ soundcard = NULL; } recall_ladspa = (AgsRecallLadspa *) g_object_new(AGS_TYPE_RECALL_LADSPA, "soundcard", soundcard, "source", source, "filename", filename, "effect", effect, "index", index, NULL); return(recall_ladspa); } gsequencer-1.4.24/ags/audio/ags_message.h0000644000175000017500000000674713256163135015211 00000000000000/* 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 . */ #ifndef __AGS_MESSAGE_H__ #define __AGS_MESSAGE_H__ #include #define AGS_TYPE_MESSAGE (ags_message_get_type()) #define AGS_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MESSAGE, AgsMessage)) #define AGS_MESSAGE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_MESSAGE, AgsMessageInterface)) #define AGS_IS_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MESSAGE)) #define AGS_IS_MESSAGE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_MESSAGE)) #define AGS_MESSAGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_MESSAGE, AgsMessageInterface)) typedef void AgsMessage; typedef struct _AgsMessageInterface AgsMessageInterface; typedef enum{ AGS_MESSAGE_ALL_OFF = 1, AGS_MESSAGE_RESET_ALL = 1 << 1, AGS_MESSAGE_OMNI_MODE = 1 << 2, AGS_MESSAGE_MONO_MODE = 1 << 3, AGS_MESSAGE_POLY_MODE = 1 << 4, }AgsMessageMode; struct _AgsMessageInterface { GTypeInterface interface; void (*key_on)(AgsMessage *message, gchar *note, guint audio_channel, gdouble velocity); void (*key_off)(AgsMessage *message, gchar *note, guint audio_channel, gdouble velocity); void (*key_pressure)(AgsMessage *message, gchar *note, guint audio_channel, gdouble pressure); void (*change_parameter)(AgsMessage *message, gchar *note, guint audio_channel, gchar *control_specifier, gdouble value); void (*change_mode)(AgsMessage *message, guint audio_channel, guint mode, gboolean enabled); void (*pitch_bend)(AgsMessage *message, gdouble pitch, gdouble transmitter); void (*set_bpm)(AgsMessage *message, gdouble bpm); void (*set_delay_factor)(AgsMessage *message, gdouble delay_factor); }; void ags_message_key_on(AgsMessage *message, gchar *note, guint audio_channel, gdouble velocity); void ags_message_key_off(AgsMessage *message, gchar *note, guint audio_channel, gdouble velocity); void ags_message_key_pressure(AgsMessage *message, gchar *note, guint audio_channel, gdouble pressure); void ags_message_change_parameter(AgsMessage *message, gchar *note, guint audio_channel, gchar *control_specifier, gdouble value); void ags_message_change_mode(AgsMessage *message, guint audio_channel, guint mode, gboolean enabled); void ags_message_pitch_bend(AgsMessage *message, gdouble pitch, gdouble transmitter); void ags_message_set_bpm(AgsMessage *message, gdouble bpm); void ags_message_set_delay_factor(AgsMessage *message, gdouble delay_factor); #endif /*__AGS_MESSAGE_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_recycling_dummy.h0000644000175000017500000000434113256163135020265 00000000000000/* 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 . */ #ifndef __AGS_RECALL_RECYCLING_DUMMY_H__ #define __AGS_RECALL_RECYCLING_DUMMY_H__ #include #include #include #include #define AGS_TYPE_RECALL_RECYCLING_DUMMY (ags_recall_recycling_dummy_get_type()) #define AGS_RECALL_RECYCLING_DUMMY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_RECYCLING_DUMMY, AgsRecallRecyclingDummy)) #define AGS_RECALL_RECYCLING_DUMMY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_RECYCLING_DUMMY, AgsRecallRecyclingDummyClass)) #define AGS_IS_RECALL_RECYCLING_DUMMY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_RECYCLING_DUMMY)) #define AGS_IS_RECALL_RECYCLING_DUMMY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_RECYCLING_DUMMY)) #define AGS_RECALL_RECYCLING_DUMMY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_RECYCLING_DUMMY, AgsRecallRecyclingDummyClass)) typedef struct _AgsRecallRecyclingDummy AgsRecallRecyclingDummy; typedef struct _AgsRecallRecyclingDummyClass AgsRecallRecyclingDummyClass; struct _AgsRecallRecyclingDummy { AgsRecallRecycling recall_recycling; }; struct _AgsRecallRecyclingDummyClass { AgsRecallRecyclingClass recall_recycling; }; GType ags_recall_recycling_dummy_get_type(); AgsRecallRecyclingDummy* ags_recall_recycling_dummy_new(AgsRecycling *recycling, GType child_type); #endif /*__AGS_RECALL_RECYCLING_DUMMY_H__*/ gsequencer-1.4.24/ags/audio/ags_recycling.c0000644000175000017500000010667013256163135015533 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_recycling_class_init(AgsRecyclingClass *recycling_class); void ags_recycling_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recycling_concurrent_tree_interface_init(AgsConcurrentTreeInterface *concurrent_tree); void ags_recycling_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recycling_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recycling_init(AgsRecycling *recycling); void ags_recycling_connect(AgsConnectable *connectable); void ags_recycling_disconnect(AgsConnectable *connectable); pthread_mutex_t* ags_recycling_get_lock(AgsConcurrentTree *concurrent_tree); pthread_mutex_t* ags_recycling_get_parent_lock(AgsConcurrentTree *concurrent_tree); void ags_recycling_dispose(GObject *gobject); void ags_recycling_finalize(GObject *gobject); void ags_recycling_real_add_audio_signal(AgsRecycling *recycling, AgsAudioSignal *audio_signal); void ags_recycling_real_remove_audio_signal(AgsRecycling *recycling, AgsAudioSignal *audio_signal); /** * SECTION:ags_recycling * @short_description: A container of audio signals * @title: AgsRecycling * @section_id: * @include: ags/audio/ags_recycling.h * * #AgsRecycling forms the nested tree of AgsChannel. Ever channel * having own audio signal contains therefor an #AgsRecycling */ enum{ PROP_0, PROP_SOUNDCARD, PROP_CHANNEL, PROP_PARENT, PROP_NEXT, PROP_PREV, PROP_AUDIO_SIGNAL, }; enum{ ADD_AUDIO_SIGNAL, REMOVE_AUDIO_SIGNAL, LAST_SIGNAL, }; static gpointer ags_recycling_parent_class = NULL; static guint recycling_signals[LAST_SIGNAL]; GType ags_recycling_get_type(void) { static GType ags_type_recycling = 0; if(!ags_type_recycling){ static const GTypeInfo ags_recycling_info = { sizeof (AgsRecyclingClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recycling_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecycling), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recycling_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recycling_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_concurrent_tree_interface_info = { (GInterfaceInitFunc) ags_recycling_concurrent_tree_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recycling = g_type_register_static(G_TYPE_OBJECT, "AgsRecycling", &ags_recycling_info, 0); g_type_add_interface_static(ags_type_recycling, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recycling, AGS_TYPE_CONCURRENT_TREE, &ags_concurrent_tree_interface_info); } return(ags_type_recycling); } void ags_recycling_class_init(AgsRecyclingClass *recycling) { GObjectClass *gobject; GParamSpec *param_spec; ags_recycling_parent_class = g_type_class_peek_parent(recycling); /* GObjectClass */ gobject = (GObjectClass *) recycling; gobject->set_property = ags_recycling_set_property; gobject->get_property = ags_recycling_get_property; gobject->dispose = ags_recycling_dispose; gobject->finalize = ags_recycling_finalize; /* properties */ /** * AgsRecycling:channel: * * The assigned #AgsChannel. * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", "assigned channel", "The channel it is assigned with", AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /** * AgsRecycling:soundcard: * * The assigned #GObject acting as default sink. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", "assigned soundcard", "The soundcard it is assigned with", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsRecycling:parent: * * The assigned parent #AgsRecycling. * * Since: 1.0.0 */ param_spec = g_param_spec_object("parent", "assigned parent", "The parent it is assigned with", AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PARENT, param_spec); /** * AgsRecycling:prev: * * The assigned prev #AgsRecycling. * * Since: 1.0.0 */ param_spec = g_param_spec_object("prev", "assigned prev", "The prev it is assigned with", AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PREV, param_spec); /** * AgsRecycling:next: * * The assigned next #AgsRecycling. * * Since: 1.0.0 */ param_spec = g_param_spec_object("next", "assigned next", "The next it is assigned with", AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NEXT, param_spec); /** * AgsRecycling:audio-signal: * * The containing #AgsAudioSignal. * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-signal", "containing audio signal", "The audio signal it contains", AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_SIGNAL, param_spec); /* */ recycling->add_audio_signal = ags_recycling_real_add_audio_signal; recycling->remove_audio_signal = ags_recycling_real_remove_audio_signal; /** * AgsRecycling::add-audio-signal * @recycling: an #AgsRecycling * @audio_signal: the #AgsAudioSignal to add * * The ::add-audio-signal signal is emited as adding #AgsAudioSignal */ recycling_signals[ADD_AUDIO_SIGNAL] = g_signal_new("add-audio-signal", G_TYPE_FROM_CLASS (recycling), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecyclingClass, add_audio_signal), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); /** * AgsRecycling::remove-audio-signal: * @recycling: an #AgsRecycling * @audio_signal: the #AgsAudioSignal to remove * * The ::remove-audio-signal signal is emited as removing #AgsAudioSignal */ recycling_signals[REMOVE_AUDIO_SIGNAL] = g_signal_new("remove-audio-signal", G_TYPE_FROM_CLASS (recycling), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsRecyclingClass, remove_audio_signal), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_recycling_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_recycling_connect; connectable->disconnect = ags_recycling_disconnect; } void ags_recycling_concurrent_tree_interface_init(AgsConcurrentTreeInterface *concurrent_tree) { concurrent_tree->get_lock = ags_recycling_get_lock; concurrent_tree->get_parent_lock = ags_recycling_get_parent_lock; } void ags_recycling_init(AgsRecycling *recycling) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; recycling->obj_mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif recycling->obj_mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) recycling, mutex); pthread_mutex_unlock(application_mutex); recycling->flags = 0; recycling->soundcard = NULL; recycling->channel = NULL; recycling->parent = NULL; recycling->next = NULL; recycling->prev = NULL; recycling->audio_signal = NULL; } void ags_recycling_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecycling *recycling; recycling = AGS_RECYCLING(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); ags_recycling_set_soundcard(recycling, (GObject *) soundcard); } break; case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(recycling->channel == (GObject *) channel){ return; } if(recycling->channel != NULL){ g_object_unref(recycling->channel); } if(channel != NULL){ g_object_ref(channel); } recycling->channel = (GObject *) channel; } break; case PROP_PARENT: { AgsRecycling *recycling; recycling = (AgsRecycling *) g_value_get_object(value); if(recycling->parent == recycling){ return; } if(recycling->parent != NULL){ g_object_unref(recycling->parent); } if(recycling != NULL){ g_object_ref(recycling); } recycling->parent = recycling; } break; case PROP_NEXT: { AgsRecycling *recycling; recycling = (AgsRecycling *) g_value_get_object(value); if(recycling->next == recycling){ return; } if(recycling->next != NULL){ g_object_unref(recycling->next); } if(recycling != NULL){ g_object_ref(recycling); } recycling->next = recycling; } break; case PROP_PREV: { AgsRecycling *recycling; recycling = (AgsRecycling *) g_value_get_object(value); if(recycling->prev == recycling){ return; } if(recycling->prev != NULL){ g_object_unref(recycling->prev); } if(recycling != NULL){ g_object_ref(recycling); } recycling->prev = recycling; } break; case PROP_AUDIO_SIGNAL: { AgsAudioSignal *audio_signal; audio_signal = g_value_get_object(value); if(audio_signal == NULL || g_list_find(recycling->audio_signal, audio_signal) != NULL){ return; } ags_recycling_add_audio_signal(recycling, audio_signal); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recycling_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecycling *recycling; recycling = AGS_RECYCLING(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, recycling->soundcard); } break; case PROP_CHANNEL: { g_value_set_object(value, recycling->channel); } break; case PROP_PARENT: { g_value_set_object(value, recycling->parent); } break; case PROP_NEXT: { g_value_set_object(value, recycling->next); } break; case PROP_PREV: { g_value_set_object(value, recycling->prev); } break; case PROP_AUDIO_SIGNAL: { g_value_set_pointer(value, g_list_copy(recycling->audio_signal)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recycling_connect(AgsConnectable *connectable) { AgsRecycling *recycling; GList *list; recycling = AGS_RECYCLING(connectable); if((AGS_RECYCLING_CONNECTED & (recycling->flags)) != 0){ return; } recycling->flags |= AGS_RECYCLING_CONNECTED; /* audio signal */ list = recycling->audio_signal; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_recycling_disconnect(AgsConnectable *connectable) { AgsRecycling *recycling; GList *list; recycling = AGS_RECYCLING(connectable); if((AGS_RECYCLING_CONNECTED & (recycling->flags)) == 0){ return; } recycling->flags &= (~AGS_RECYCLING_CONNECTED); /* audio signal */ list = recycling->audio_signal; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } pthread_mutex_t* ags_recycling_get_lock(AgsConcurrentTree *concurrent_tree) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, G_OBJECT(concurrent_tree)); pthread_mutex_unlock(application_mutex); return(recycling_mutex); } pthread_mutex_t* ags_recycling_get_parent_lock(AgsConcurrentTree *concurrent_tree) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *parent_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); if(AGS_RECYCLING(concurrent_tree)->parent != NULL){ parent_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) AGS_RECYCLING(concurrent_tree)->parent); }else{ parent_mutex = ags_mutex_manager_lookup(mutex_manager, AGS_RECYCLING(concurrent_tree)->soundcard); } pthread_mutex_unlock(application_mutex); return(parent_mutex); } void ags_recycling_dispose(GObject *gobject) { AgsRecycling *recycling; GList *list; recycling = AGS_RECYCLING(gobject); /* channel */ if(recycling->channel != NULL){ g_object_unref(recycling->channel); recycling->channel = NULL; } /* soundcard */ if(recycling->soundcard != NULL){ g_object_unref(recycling->soundcard); recycling->soundcard = NULL; } /* parent */ if(recycling->parent != NULL){ // g_object_unref(recycling->parent); recycling->parent = NULL; } /* next and prev */ if(recycling->next != NULL){ // g_object_unref(recycling->next); recycling->next = NULL; } if(recycling->prev != NULL){ // g_object_unref(recycling->prev); recycling->prev = NULL; } /* AgsAudioSignal */ list = recycling->audio_signal; while(list != NULL){ g_object_run_dispose(list->data); list = list->next; } g_list_free_full(recycling->audio_signal, g_object_unref); recycling->audio_signal = NULL; } void ags_recycling_finalize(GObject *gobject) { AgsRecycling *recycling; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; // g_warning("ags_recycling_finalize"); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); recycling = AGS_RECYCLING(gobject); pthread_mutexattr_destroy(recycling->obj_mutexattr); free(recycling->obj_mutexattr); /* channel */ if(recycling->channel != NULL){ g_object_unref(recycling->channel); } /* soundcard */ if(recycling->soundcard != NULL){ g_object_unref(recycling->soundcard); } /* parent */ if(recycling->parent != NULL){ g_object_unref(recycling->parent); } /* next and prev */ if(recycling->next != NULL){ g_object_unref(recycling->next); } if(recycling->prev != NULL){ g_object_unref(recycling->prev); } /* AgsAudioSignal */ g_list_free_full(recycling->audio_signal, g_object_unref); /* call parent */ G_OBJECT_CLASS(ags_recycling_parent_class)->finalize(gobject); } /** * ags_recycling_set_soundcard: * @recycling: an #AgsRecycling * @soundcard: the #GObject to set * * Sets #GObject to recycling. * * Since: 1.0.0 */ void ags_recycling_set_soundcard(AgsRecycling *recycling, GObject *soundcard) { /* recycling */ if(recycling->soundcard == soundcard){ return; } if(recycling->soundcard != NULL){ g_object_unref(recycling->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } recycling->soundcard = (GObject *) soundcard; } /** * ags_recycling_add_audio_signal: * @recycling: an #AgsRecycling * @audio_signal: the #AgsAudioSignal to add * * Add #AgsAudioSignal to recycling. * * Since: 1.0.0 */ void ags_recycling_add_audio_signal(AgsRecycling *recycling, AgsAudioSignal *audio_signal) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; if(recycling == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(recycling_mutex); if(!AGS_IS_RECYCLING(recycling)){ pthread_mutex_unlock(recycling_mutex); return; } if(!AGS_IS_AUDIO_SIGNAL(audio_signal)){ pthread_mutex_unlock(recycling_mutex); return; } /* emit signal */ g_object_ref(G_OBJECT(recycling)); g_signal_emit(G_OBJECT(recycling), recycling_signals[ADD_AUDIO_SIGNAL], 0, audio_signal); g_object_unref(G_OBJECT(recycling)); /* release lock */ pthread_mutex_unlock(recycling_mutex); } void ags_recycling_real_add_audio_signal(AgsRecycling *recycling, AgsAudioSignal *audio_signal) { if(g_list_find(recycling->audio_signal, audio_signal) == NULL){ if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) != 0){ AgsAudioSignal *old_template; GHashTable *hash_table; GList *list, *list_start; /* old template */ old_template = ags_audio_signal_get_template(recycling->audio_signal); /* remove old template */ ags_recycling_remove_audio_signal(recycling, old_template); /* add new template */ recycling->audio_signal = g_list_prepend(recycling->audio_signal, (gpointer) audio_signal); g_object_ref(audio_signal); /* realtime template */ list_start = list = g_list_copy(recycling->audio_signal); /* add/remove */ hash_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, NULL); while(list != NULL){ if((AGS_AUDIO_SIGNAL_RT_TEMPLATE & (AGS_AUDIO_SIGNAL(list->data)->flags)) != 0){ AgsAudioSignal *rt_template, *old_rt_template; AgsRecallID *recall_id; recall_id = AGS_AUDIO_SIGNAL(list->data)->recall_id; rt_template = ags_audio_signal_new(recycling->soundcard, recycling, recall_id); g_hash_table_insert(hash_table, list->data, rt_template); ags_recycling_remove_audio_signal(recycling, list->data); rt_template->flags |= AGS_AUDIO_SIGNAL_RT_TEMPLATE; ags_recycling_add_audio_signal(recycling, rt_template); } list = list->next; } /* update */ list = list_start; while(list != NULL){ if(AGS_AUDIO_SIGNAL(list->data)->rt_template != NULL){ g_object_set(list->data, "rt-template", g_hash_table_lookup(hash_table, AGS_AUDIO_SIGNAL(list->data)->rt_template), NULL); } list = list->next; } g_hash_table_unref(hash_table); g_list_free(list_start); }else{ recycling->audio_signal = g_list_prepend(recycling->audio_signal, (gpointer) audio_signal); g_object_ref(audio_signal); } } if(audio_signal->recycling != recycling){ audio_signal->recycling = (GObject *) recycling; g_object_ref(recycling); } } /** * ags_recycling_remove_audio_signal: * @recycling: an #AgsRecycling * @audio_signal: the #AgsAudioSignal to remove * * Remove #AgsAudioSignal of recycling. * * Since: 1.0.0 */ void ags_recycling_remove_audio_signal(AgsRecycling *recycling, AgsAudioSignal *audio_signal) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; if(recycling == NULL){ return; } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(recycling_mutex); if(!AGS_IS_RECYCLING(recycling)){ pthread_mutex_unlock(recycling_mutex); return; } if(!AGS_IS_AUDIO_SIGNAL(audio_signal)){ pthread_mutex_unlock(recycling_mutex); return; } /* emit signal */ g_object_ref((GObject *) recycling); g_object_ref((GObject *) audio_signal); g_signal_emit(G_OBJECT(recycling), recycling_signals[REMOVE_AUDIO_SIGNAL], 0, audio_signal); g_object_unref((GObject *) audio_signal); g_object_unref((GObject *) recycling); /* release lock */ pthread_mutex_unlock(recycling_mutex); } void ags_recycling_real_remove_audio_signal(AgsRecycling *recycling, AgsAudioSignal *audio_signal) { if(g_list_find(recycling->audio_signal, (gpointer) audio_signal) == NULL){ return; } recycling->audio_signal = g_list_remove(recycling->audio_signal, (gpointer) audio_signal); audio_signal->recycling = NULL; g_object_unref(audio_signal); g_object_unref(recycling); } /** * ags_recycling_create_audio_signal_with_defaults: * @recycling: an #AgsRecycling * @audio_signal: the #AgsAudioSignal to apply defaults * @delay: the delay * @attack: the attack * * Create audio signal with defaults. * * Since: 1.0.0 */ void ags_recycling_create_audio_signal_with_defaults(AgsRecycling *recycling, AgsAudioSignal *audio_signal, gdouble delay, guint attack) { AgsAudioSignal *template; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(recycling_mutex); if(!AGS_IS_RECYCLING(recycling)){ pthread_mutex_unlock(recycling_mutex); return; } if(!AGS_IS_AUDIO_SIGNAL(audio_signal)){ pthread_mutex_unlock(recycling_mutex); return; } /* create audio signal */ template = ags_audio_signal_get_template(recycling->audio_signal); audio_signal->delay = delay; audio_signal->attack = attack; if(template == NULL){ ags_audio_signal_stream_resize(audio_signal, 0); /* release lock */ pthread_mutex_unlock(recycling_mutex); return; } audio_signal->soundcard = template->soundcard; audio_signal->recycling = (GObject *) recycling; audio_signal->samplerate = template->samplerate; audio_signal->buffer_size = template->buffer_size; audio_signal->format = template->format; audio_signal->last_frame = (((guint)(delay * template->buffer_size) + attack + template->last_frame) % template->buffer_size); audio_signal->loop_start = (((guint) (delay * template->buffer_size) + attack + template->loop_start) % template->buffer_size); audio_signal->loop_end = (((guint)(delay * template->buffer_size) + attack + template->loop_end) % template->buffer_size); ags_audio_signal_stream_resize(audio_signal, template->length); audio_signal->frame_count = template->frame_count; ags_audio_signal_duplicate_stream(audio_signal, template); /* release lock */ pthread_mutex_unlock(recycling_mutex); } /** * ags_recycling_create_audio_signal_with_frame_count: * @recycling: an #AgsRecycling * @audio_signal: the #AgsAudioSignal to apply defaults * @frame_count: the audio data size * @delay: the delay * @attack: the attack * * Create audio signal with frame count. * * Since: 1.0.0 */ void ags_recycling_create_audio_signal_with_frame_count(AgsRecycling *recycling, AgsAudioSignal *audio_signal, guint frame_count, gdouble delay, guint attack) { AgsAudioSignal *template; AgsMutexManager *mutex_manager; GList *stream, *template_stream; guint loop_length; guint loop_frame_count; guint n_frames; guint copy_n_frames; guint nth_loop; guint i, j, k; guint copy_mode; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(recycling_mutex); if(!AGS_IS_RECYCLING(recycling)){ pthread_mutex_unlock(recycling_mutex); return; } if(!AGS_IS_AUDIO_SIGNAL(audio_signal)){ pthread_mutex_unlock(recycling_mutex); return; } /* create audio signal */ template = ags_audio_signal_get_template(recycling->audio_signal); audio_signal->soundcard = template->soundcard; audio_signal->recycling = (GObject *) recycling; audio_signal->samplerate = template->samplerate; audio_signal->buffer_size = template->buffer_size; audio_signal->format = template->format; audio_signal->word_size = template->word_size; audio_signal->last_frame = (((guint)(delay * template->buffer_size) + attack + template->last_frame) % template->buffer_size); audio_signal->loop_start = ((guint) (delay * template->buffer_size) + attack + template->loop_start); audio_signal->loop_end = ((guint)(delay * template->buffer_size) + attack + template->loop_end); /* resize */ if(template->loop_end > template->loop_start){ loop_length = template->loop_end - template->loop_start; loop_frame_count = ((frame_count - template->loop_start) / loop_length) * template->buffer_size; ags_audio_signal_stream_resize(audio_signal, (guint) ceil(frame_count / audio_signal->buffer_size) + 1); }else{ ags_audio_signal_duplicate_stream(audio_signal, template); ags_audio_signal_stream_resize(audio_signal, (guint) ceil(frame_count / audio_signal->buffer_size) + 1); pthread_mutex_unlock(recycling_mutex); return; } audio_signal->last_frame = ((guint) (delay * audio_signal->buffer_size) + frame_count + attack) % audio_signal->buffer_size; if(template->length == 0){ /* release lock */ pthread_mutex_unlock(recycling_mutex); return; } /* generic copying */ stream = g_list_nth(audio_signal->stream_beginning, (guint) ((delay * audio_signal->buffer_size) + attack) / audio_signal->buffer_size); template_stream = template->stream_beginning; /* loop related copying */ copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(audio_signal->format), ags_audio_buffer_util_format_from_soundcard(template->format)); for(i = 0, j = 0, k = attack, nth_loop = 0; i < frame_count;){ /* compute count of frames to copy */ copy_n_frames = audio_signal->buffer_size; /* limit nth loop */ if(i > template->loop_start && i + copy_n_frames > template->loop_start + loop_length && i + copy_n_frames < template->loop_start + loop_frame_count && i + copy_n_frames >= template->loop_start + (nth_loop + 1) * loop_length){ copy_n_frames = (template->loop_start + (nth_loop + 1) * loop_length) - i; } /* check boundaries */ if((k % audio_signal->buffer_size) + copy_n_frames > audio_signal->buffer_size){ copy_n_frames = audio_signal->buffer_size - (k % audio_signal->buffer_size); } if(j + copy_n_frames > audio_signal->buffer_size){ copy_n_frames = audio_signal->buffer_size - j; } if(stream == NULL || template_stream == NULL){ break; } /* copy */ ags_audio_buffer_util_copy_buffer_to_buffer(stream->data, 1, k % audio_signal->buffer_size, template_stream->data, 1, j, copy_n_frames, copy_mode); /* increment and iterate */ if((i + copy_n_frames) % audio_signal->buffer_size == 0){ stream = stream->next; } if(j + copy_n_frames == template->buffer_size){ template_stream = template_stream->next; } if(template_stream == NULL || (i > template->loop_start && i + copy_n_frames > template->loop_start + loop_length && i + copy_n_frames < template->loop_start + loop_frame_count && i + copy_n_frames >= template->loop_start + (nth_loop + 1) * loop_length)){ j = template->loop_start % template->buffer_size; template_stream = g_list_nth(template->stream_beginning, floor(template->loop_start / template->buffer_size)); nth_loop++; }else{ j += copy_n_frames; } i += copy_n_frames; k += copy_n_frames; if(j == template->buffer_size){ j = 0; } } /* release lock */ pthread_mutex_unlock(recycling_mutex); } /** * ags_recycling_find_next_channel: * @start_region: boundary start * @end_region: boundary end * @prev_channel: previous channel * * Retrieve next recycling with different channel. * * Returns: Matching recycling. * * Since: 1.0.0 */ AgsRecycling* ags_recycling_find_next_channel(AgsRecycling *start_region, AgsRecycling *end_region, GObject *prev_channel) { AgsRecycling *recycling; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex, *start_recycling_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); start_recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) start_region); pthread_mutex_unlock(application_mutex); /* verify objects and get pointer for safe access */ pthread_mutex_lock(start_recycling_mutex); if(!AGS_IS_RECYCLING(start_region)){ pthread_mutex_unlock(start_recycling_mutex); return(NULL); } pthread_mutex_lock(start_recycling_mutex); /* find */ recycling = start_region; while(recycling != NULL && recycling != end_region){ /* lock current */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* check if new match */ pthread_mutex_lock(recycling_mutex); if(recycling->channel != prev_channel){ pthread_mutex_unlock(recycling_mutex); return(recycling); } recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } /* no new channel within region */ return(NULL); } /** * ags_recycling_position: * @start_region: boundary start * @end_region: boundary end * @recycling: matching recycling * * Retrieve position of recycling. * * Returns: position within boundary. * * Since: 1.0.0 */ gint ags_recycling_position(AgsRecycling *start_region, AgsRecycling *end_region, AgsRecycling *recycling) { AgsRecycling *current; AgsMutexManager *mutex_manager; gint position; pthread_mutex_t *application_mutex; pthread_mutex_t *current_mutex; if(start_region == NULL){ return(-1); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* determine position */ current = start_region; position = -1; while(current != NULL && current != end_region){ position++; /* lock current */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* check if new match */ if(current == recycling){ return(position); } pthread_mutex_lock(current_mutex); current = current->next; pthread_mutex_unlock(current_mutex); } if(end_region == NULL){ return(position); }else{ return(-1); } } /** * ags_recycling_is_active: * @start_region: boundary start * @end_region: boundary end * @recall_id: the #AgsRecallID * * Check if is active. * * Returns: %TRUE if related audio signal to recall id is available, otherwise %FALSE * * Since: 1.0.0.9 */ gboolean ags_recycling_is_active(AgsRecycling *start_region, AgsRecycling *end_region, GObject *recall_id) { AgsRecycling *current; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *current_mutex; if(recall_id == NULL || AGS_RECALL_ID(recall_id)->recycling_context == NULL){ return(FALSE); } /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); current = start_region; while(current != end_region){ /* lock current */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* is active */ pthread_mutex_lock(current_mutex); if(ags_audio_signal_is_active(current->audio_signal, recall_id)){ pthread_mutex_unlock(current_mutex); return(TRUE); } current = current->next; pthread_mutex_unlock(current_mutex); } return(FALSE); } /** * ags_recycling_new: * @soundcard: the #GObject * * Creates a #AgsRecycling, with defaults of @soundcard. * * Returns: a new #AgsRecycling * * Since: 1.0.0 */ AgsRecycling* ags_recycling_new(GObject *soundcard) { AgsRecycling *recycling; AgsAudioSignal *audio_signal; recycling = (AgsRecycling *) g_object_new(AGS_TYPE_RECYCLING, "soundcard", soundcard, NULL); audio_signal = ags_audio_signal_new(soundcard, (GObject *) recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_connectable_connect(AGS_CONNECTABLE(audio_signal)); recycling->audio_signal = g_list_alloc(); recycling->audio_signal->data = (gpointer) audio_signal; return(recycling); } gsequencer-1.4.24/ags/audio/ags_playback.c0000644000175000017500000005217713256163135015344 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_playback_class_init(AgsPlaybackClass *playback); void ags_playback_connectable_interface_init(AgsConnectableInterface *connectable); void ags_playback_init(AgsPlayback *playback); void ags_playback_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_playback_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_playback_disconnect(AgsConnectable *connectable); void ags_playback_connect(AgsConnectable *connectable); void ags_playback_dispose(GObject *gobject); void ags_playback_finalize(GObject *gobject); /** * SECTION:ags_playback * @short_description: Outputting to soundcard context * @title: AgsPlayback * @section_id: * @include: ags/audio/ags_playback.h * * #AgsPlayback represents a context to output. */ static gpointer ags_playback_parent_class = NULL; enum{ PROP_0, PROP_PLAYBACK_DOMAIN, PROP_SOURCE, PROP_AUDIO_CHANNEL, }; GType ags_playback_get_type (void) { static GType ags_type_playback = 0; if(!ags_type_playback){ static const GTypeInfo ags_playback_info = { sizeof (AgsPlaybackClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_playback_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPlayback), 0, /* n_preallocs */ (GInstanceInitFunc) ags_playback_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_playback_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_playback = g_type_register_static(G_TYPE_OBJECT, "AgsPlayback", &ags_playback_info, 0); g_type_add_interface_static(ags_type_playback, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_playback); } void ags_playback_class_init(AgsPlaybackClass *playback) { GObjectClass *gobject; GParamSpec *param_spec; ags_playback_parent_class = g_type_class_peek_parent(playback); /* GObjectClass */ gobject = (GObjectClass *) playback; gobject->set_property = ags_playback_set_property; gobject->get_property = ags_playback_get_property; gobject->dispose = ags_playback_dispose; gobject->finalize = ags_playback_finalize; /* properties */ /** * AgsPlayback:playback-domain: * * The parent playback domain. * * Since: 1.0.0 */ param_spec = g_param_spec_object("playback-domain", i18n_pspec("parent playback domain"), i18n_pspec("The playback domain it is child of"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK_DOMAIN, param_spec); /** * AgsPlayback:source: * * The assigned source. * * Since: 1.0.0 */ param_spec = g_param_spec_object("source", i18n_pspec("assigned source"), i18n_pspec("The source it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOURCE, param_spec); /** * AgsPlayback:audio-channel: * * The assigned audio channel. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("assigned audio channel"), i18n_pspec("The audio channel it is assigned with"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); } void ags_playback_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_playback_connect; connectable->disconnect = ags_playback_disconnect; } void ags_playback_init(AgsPlayback *playback) { AgsConfig *config; gchar *str, *str0, *str1; gdouble freq; guint samplerate, buffer_size; gboolean super_threaded_channel, super_threaded_recycling; /* config */ config = ags_config_get_instance(); /* thread model */ super_threaded_channel = FALSE; super_threaded_recycling = FALSE; str0 = ags_config_get_value(config, AGS_CONFIG_THREAD, "model"); str1 = ags_config_get_value(config, AGS_CONFIG_THREAD, "super-threaded-scope"); if(str0 != NULL && str1 != NULL){ if(!g_ascii_strncasecmp(str0, "super-threaded", 15)){ if(!g_ascii_strncasecmp(str1, "channel", 8)){ super_threaded_channel = TRUE; }else if(!g_ascii_strncasecmp(str1, "recycling", 10)){ super_threaded_recycling = TRUE; } } } if(str0 != NULL){ free(str0); } if(str1 != NULL){ free(str1); } /* default flags */ if(super_threaded_channel || super_threaded_recycling){ g_atomic_int_set(&(playback->flags), AGS_PLAYBACK_SUPER_THREADED_CHANNEL); if(super_threaded_recycling){ g_atomic_int_or(&(playback->flags), AGS_PLAYBACK_SUPER_THREADED_RECYCLING); } }else{ g_atomic_int_set(&(playback->flags), 0); } /* source */ playback->source = NULL; playback->audio_channel = 0; playback->play_note = ags_note_new(); g_object_ref(playback->play_note); /* samplerate and buffer size */ samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* playback domain */ playback->playback_domain = NULL; /* source and audio channel */ playback->source = NULL; playback->audio_channel = 0; /* thread frequency */ freq = ceil((gdouble) samplerate / (gdouble) buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; /* super threaded channel */ playback->channel_thread = (AgsThread **) malloc(3 * sizeof(AgsThread *)); playback->channel_thread[0] = NULL; playback->channel_thread[1] = NULL; playback->channel_thread[2] = NULL; if(super_threaded_channel || super_threaded_recycling){ playback->channel_thread[0] = (AgsThread *) ags_channel_thread_new(NULL, NULL); playback->channel_thread[0]->freq = freq; playback->channel_thread[1] = (AgsThread *) ags_channel_thread_new(NULL, NULL); playback->channel_thread[1]->freq = freq; playback->channel_thread[2] = (AgsThread *) ags_channel_thread_new(NULL, NULL); playback->channel_thread[2]->freq = freq; } /* iterator thread */ playback->iterator_thread = (AgsIteratorThread **) malloc(3 * sizeof(AgsIteratorThread *)); playback->iterator_thread[0] = NULL; playback->iterator_thread[1] = NULL; playback->iterator_thread[2] = NULL; if(super_threaded_recycling){ playback->iterator_thread[0] = ags_iterator_thread_new(); playback->iterator_thread[1] = ags_iterator_thread_new(); playback->iterator_thread[2] = ags_iterator_thread_new(); } /* super threaded recycling */ playback->recycling_thread = (AgsThread **) malloc(3 * sizeof(AgsThread *)); playback->recycling_thread[0] = NULL; playback->recycling_thread[1] = NULL; playback->recycling_thread[2] = NULL; if(super_threaded_recycling){ playback->recycling_thread[0] = (AgsThread *) ags_recycling_thread_new(NULL, NULL); playback->recycling_thread[0]->freq = freq; playback->recycling_thread[1] = (AgsThread *) ags_recycling_thread_new(NULL, NULL); playback->recycling_thread[1]->freq = freq; playback->recycling_thread[2] = (AgsThread *) ags_recycling_thread_new(NULL, NULL); playback->recycling_thread[2]->freq = freq; } /* recall id */ playback->recall_id = (AgsRecallID **) malloc(3 * sizeof(AgsRecallID *)); playback->recall_id[0] = NULL; playback->recall_id[1] = NULL; playback->recall_id[2] = NULL; } void ags_playback_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPlayback *playback; playback = AGS_PLAYBACK(gobject); switch(prop_id){ case PROP_PLAYBACK_DOMAIN: { GObject *playback_domain; playback_domain = (GObject *) g_value_get_object(value); if((GObject *) playback->playback_domain == playback_domain){ return; } if(playback->playback_domain != NULL){ g_object_unref(G_OBJECT(playback->playback_domain)); } if(playback_domain != NULL){ g_object_ref(G_OBJECT(playback_domain)); } playback->playback_domain = (GObject *) playback_domain; } break; case PROP_SOURCE: { GObject *source; source = (GObject *) g_value_get_object(value); if(source == playback->source){ return; } if(playback->source != NULL){ g_object_unref(G_OBJECT(playback->source)); } if(source != NULL){ g_object_ref(G_OBJECT(source)); AGS_NOTE(playback->play_note)->y = AGS_CHANNEL(source)->pad; if(AGS_IS_CHANNEL(source) && ((AGS_PLAYBACK_SUPER_THREADED_CHANNEL & (g_atomic_int_get(&(playback->flags)))) != 0 || (AGS_PLAYBACK_SUPER_THREADED_RECYCLING & (g_atomic_int_get(&(playback->flags)))) != 0)){ gdouble freq; /* thread frequency */ freq = ceil((gdouble) AGS_CHANNEL(source)->samplerate / (gdouble) AGS_CHANNEL(source)->buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; /* channel thread */ g_object_set(playback->channel_thread[0], "frequency", freq, "channel", source, NULL); g_object_set(playback->channel_thread[1], "frequency", freq, "channel", source, NULL); g_object_set(playback->channel_thread[2], "frequency", freq, "channel", source, NULL); if((AGS_PLAYBACK_SUPER_THREADED_RECYCLING & (g_atomic_int_get(&(playback->flags)))) != 0){ /* recycling thread */ g_object_set(playback->recycling_thread[0], "frequency", freq, NULL); g_object_set(playback->recycling_thread[1], "frequency", freq, NULL); g_object_set(playback->recycling_thread[2], "frequency", freq, NULL); /* iterator thread */ g_object_set(playback->iterator_thread[0], "frequency", freq, NULL); g_object_set(playback->iterator_thread[1], "frequency", freq, NULL); g_object_set(playback->iterator_thread[2], "frequency", freq, NULL); } } } playback->source = (GObject *) source; } break; case PROP_AUDIO_CHANNEL: { playback->audio_channel = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_playback_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPlayback *playback; playback = AGS_PLAYBACK(gobject); switch(prop_id){ case PROP_PLAYBACK_DOMAIN: { g_value_set_object(value, playback->playback_domain); } break; case PROP_SOURCE: { g_value_set_object(value, playback->source); } break; case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, playback->audio_channel); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_playback_dispose(GObject *gobject) { AgsPlayback *playback; guint i; playback = AGS_PLAYBACK(gobject); /* playback domain */ if(playback->playback_domain != NULL){ g_object_unref(playback->playback_domain); playback->playback_domain = NULL; } /* source */ if(playback->source != NULL){ g_object_unref(playback->source); playback->source = NULL; } /* channel thread */ if(playback->channel_thread != NULL){ for(i = 0; i < 3; i++){ if(playback->channel_thread[i] != NULL){ g_object_run_dispose(playback->channel_thread[i]); g_object_unref(playback->channel_thread[i]); playback->channel_thread[i] = NULL; } } } /* recycling thread */ if(playback->recycling_thread != NULL){ for(i = 0; i < 3; i++){ if(playback->recycling_thread[i] != NULL){ g_object_run_dispose(playback->recycling_thread[i]); g_object_unref(playback->recycling_thread[i]); playback->recycling_thread[i] = NULL; } } } /* iterator thread */ if(playback->iterator_thread != NULL){ for(i = 0; i < 3; i++){ if(playback->iterator_thread[i] != NULL){ g_object_run_dispose(playback->iterator_thread[i]); g_object_unref(playback->iterator_thread[i]); playback->iterator_thread[i] = NULL; } } } /* recall id */ if(playback->recall_id != NULL){ for(i = 0; i < 3; i++){ if(playback->recall_id[i] != NULL){ g_object_unref(playback->recall_id[i]); playback->recall_id[i] = NULL; } } } /* call parent */ G_OBJECT_CLASS(ags_playback_parent_class)->dispose(gobject); } void ags_playback_finalize(GObject *gobject) { AgsPlayback *playback; guint i; playback = AGS_PLAYBACK(gobject); /* playback domain */ if(playback->playback_domain != NULL){ g_object_unref(playback->playback_domain); } /* source */ if(playback->source != NULL){ g_object_unref(playback->source); } /* channel thread */ if(playback->channel_thread != NULL){ for(i = 0; i < 3; i++){ if(playback->channel_thread[i] != NULL){ g_object_unref(playback->channel_thread[i]); } } free(playback->channel_thread); } /* recycling thread */ if(playback->recycling_thread != NULL){ for(i = 0; i < 3; i++){ if(playback->recycling_thread[i] != NULL){ g_object_unref(playback->recycling_thread[i]); } } free(playback->recycling_thread); } /* iterator thread */ if(playback->iterator_thread != NULL){ for(i = 0; i < 3; i++){ if(playback->iterator_thread[i] != NULL){ g_object_unref(playback->iterator_thread[i]); } } free(playback->iterator_thread); } /* recall id */ if(playback->recall_id != NULL){ for(i = 0; i < 3; i++){ if(playback->recall_id[i] != NULL){ g_object_unref(playback->recall_id[i]); } } free(playback->recall_id); } /* call parent */ G_OBJECT_CLASS(ags_playback_parent_class)->finalize(gobject); } void ags_playback_connect(AgsConnectable *connectable) { AgsPlayback *playback; playback = AGS_PLAYBACK(connectable); if((AGS_PLAYBACK_CONNECTED & (playback->flags)) != 0){ return; } playback->flags |= AGS_PLAYBACK_CONNECTED; } void ags_playback_disconnect(AgsConnectable *connectable) { AgsPlayback *playback; playback = AGS_PLAYBACK(connectable); if((AGS_PLAYBACK_CONNECTED & (playback->flags)) == 0){ return; } playback->flags &= (~AGS_PLAYBACK_CONNECTED); } /** * ags_playback_set_channel_thread: * @playback: the #AgsPlayback * @thread: the #AgsChannelThread * @scope: the scope of the thread to set * * Set channel thread of appropriate scope. * * Since: 1.0.0 */ void ags_playback_set_channel_thread(AgsPlayback *playback, AgsThread *thread, guint scope) { if(playback == NULL || scope > 2){ return; } if(playback->channel_thread[scope] != NULL){ g_object_unref(playback->channel_thread[scope]); } if(thread != NULL){ g_object_ref(thread); } playback->channel_thread[scope] = thread; } /** * ags_playback_get_channel_thread: * @playback: the #AgsPlayback * @scope: the scope of the thread to get * * Get channel thread of appropriate scope. * * Returns: the matching #AgsThread or %NULL * * Since: 1.0.0 */ AgsThread* ags_playback_get_channel_thread(AgsPlayback *playback, guint scope) { if(playback == NULL || playback->channel_thread == NULL || scope > 2){ return(NULL); } return(playback->channel_thread[scope]); } /** * ags_playback_set_iterator_thread: * @playback: the #AgsPlayback * @thread: the #AgsIteratorThread * @scope: the scope of the thread to set * * Set iterator thread of appropriate scope. * * Since: 1.0.0 */ void ags_playback_set_iterator_thread(AgsPlayback *playback, AgsThread *thread, guint scope) { if(playback == NULL || scope > 2){ return; } if(playback->iterator_thread[scope] != NULL){ g_object_unref(playback->iterator_thread[scope]); } if(thread != NULL){ g_object_ref(thread); } playback->iterator_thread[scope] = thread; } /** * ags_playback_get_iterator_thread: * @playback: the #AgsPlayback * @scope: the scope of the thread to get * * Get iterator thread of appropriate scope. * * Returns: the matching #AgsThread or %NULL * * Since: 1.0.0 */ AgsThread* ags_playback_get_iterator_thread(AgsPlayback *playback, guint scope) { if(playback == NULL || playback->iterator_thread == NULL || scope > 2){ return(NULL); } return(playback->iterator_thread[scope]); } /** * ags_playback_set_recycling_thread: * @playback: the #AgsPlayback * @thread: the #AgsRecyclingThread * @scope: the scope of the thread to set * * Set recycling thread of appropriate scope. * * Since: 1.0.0 */ void ags_playback_set_recycling_thread(AgsPlayback *playback, AgsThread *thread, guint scope) { if(playback == NULL || scope > 2){ return; } if(playback->recycling_thread[scope] != NULL){ g_object_unref(playback->recycling_thread[scope]); } if(thread != NULL){ g_object_ref(thread); } playback->recycling_thread[scope] = thread; } /** * ags_playback_get_recycling_thread: * @playback: the #AgsPlayback * @scope: the scope of the thread to get * * Get recycling thread of appropriate scope. * * Returns: the matching #AgsThread or %NULL * * Since: 1.0.0 */ AgsThread* ags_playback_get_recycling_thread(AgsPlayback *playback, guint scope) { if(playback == NULL || playback->recycling_thread == NULL || scope > 2){ return(NULL); } return(playback->recycling_thread[scope]); } /** * ags_playback_set_recall_id: * @playback: the #AgsPlayback * @recall_id: the #AgsRecallID * @scope: the scope of the recall id to set * * Set recall id of appropriate scope. * * Since: 1.0.0 */ void ags_playback_set_recall_id(AgsPlayback *playback, AgsRecallID *recall_id, guint scope) { if(playback == NULL || scope > 2){ return; } if(playback->recall_id[scope] != NULL){ g_object_unref(playback->recall_id[scope]); } if(recall_id != NULL){ g_object_ref(recall_id); } playback->recall_id[scope] = recall_id; } /** * ags_playback_get_recall_id: * @playback: the #AgsPlayback * @scope: the scope of the recall id to get * * Get recall id of appropriate scope. * * Returns: the matching #AgsRecallID or %NULL * * Since: 1.0.0 */ AgsRecallID* ags_playback_get_recall_id(AgsPlayback *playback, guint scope) { if(playback == NULL || playback->recall_id == NULL || scope > 2){ return(NULL); } return(playback->recall_id[scope]); } /** * ags_playback_play_find_source: * @playback_play: a #GList containing #AgsPlayback * * Find source * * Returns: the matching playback play * * Since: 1.0.0 */ AgsPlayback* ags_playback_find_source(GList *playback, GObject *source) { while(playback != NULL){ if(AGS_PLAYBACK(playback->data)->source == source){ return(playback->data); } playback = playback->next; } return(NULL); } /** * ags_playback_new: * * Creates an #AgsPlayback, refering to @application_context. * * Returns: a new #AgsPlayback * * Since: 1.0.0 */ AgsPlayback* ags_playback_new() { AgsPlayback *playback; playback = (AgsPlayback *) g_object_new(AGS_TYPE_PLAYBACK, NULL); return(playback); } gsequencer-1.4.24/ags/audio/ags_pattern.c0000644000175000017500000005276513246707333015241 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include void ags_pattern_class_init(AgsPatternClass *pattern_class); void ags_pattern_connectable_interface_init(AgsConnectableInterface *connectable); void ags_pattern_tactable_interface_init(AgsTactableInterface *tactable); void ags_pattern_portlet_interface_init(AgsPortletInterface *portlet); void ags_pattern_init(AgsPattern *pattern); void ags_pattern_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_pattern_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_pattern_connect(AgsConnectable *connectable); void ags_pattern_disconnect(AgsConnectable *connectable); void ags_pattern_dispose(GObject *gobject); void ags_pattern_finalize(GObject *gobject); void ags_pattern_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm); void ags_pattern_set_port(AgsPortlet *portlet, GObject *port); GObject* ags_pattern_get_port(AgsPortlet *portlet); GList* ags_pattern_list_safe_properties(AgsPortlet *portlet); void ags_pattern_safe_set_property(AgsPortlet *portlet, gchar *property_name, GValue *value); void ags_pattern_safe_get_property(AgsPortlet *portlet, gchar *property_name, GValue *value); /** * SECTION:ags_pattern * @short_description: Pattern representing tones * @title: AgsPattern * @section_id: * @include: ags/audio/ags_pattern.h * * #AgsPattern represents an audio pattern of tones. */ enum{ PROP_0, PROP_PORT, PROP_FIRST_INDEX, PROP_SECOND_INDEX, PROP_OFFSET, PROP_CURRENT_BIT, PROP_TIMESTAMP, }; static gpointer ags_pattern_parent_class = NULL; GType ags_pattern_get_type (void) { static GType ags_type_pattern = 0; if(!ags_type_pattern){ static const GTypeInfo ags_pattern_info = { sizeof (AgsPatternClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_pattern_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPattern), 0, /* n_preallocs */ (GInstanceInitFunc) ags_pattern_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_pattern_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_tactable_interface_info = { (GInterfaceInitFunc) ags_pattern_tactable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_portlet_interface_info = { (GInterfaceInitFunc) ags_pattern_portlet_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_pattern = g_type_register_static(G_TYPE_OBJECT, "AgsPattern", &ags_pattern_info, 0); g_type_add_interface_static(ags_type_pattern, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_pattern, AGS_TYPE_TACTABLE, &ags_tactable_interface_info); g_type_add_interface_static(ags_type_pattern, AGS_TYPE_PORTLET, &ags_portlet_interface_info); } return (ags_type_pattern); } void ags_pattern_class_init(AgsPatternClass *pattern) { GObjectClass *gobject; GParamSpec *param_spec; ags_pattern_parent_class = g_type_class_peek_parent(pattern); gobject = (GObjectClass *) pattern; gobject->set_property = ags_pattern_set_property; gobject->get_property = ags_pattern_get_property; gobject->dispose = ags_pattern_dispose; gobject->finalize = ags_pattern_finalize; /* properties */ /** * AgsPattern:port: * * The pattern's port. * * Since: 1.0.0 */ param_spec = g_param_spec_object("port", "port of pattern", "The port of pattern", AGS_TYPE_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT, param_spec); /** * AgsPattern:first-index: * * Selected bank 0. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("first-index", "the first index", "The first index to select pattern", 0, 256, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIRST_INDEX, param_spec); /** * AgsPattern:second-index: * * Selected bank 1. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("second-index", "the second index", "The second index to select pattern", 0, 256, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SECOND_INDEX, param_spec); /** * AgsPattern:offset: * * Position of pattern. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("offset", "the offset", "The offset within the pattern", 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_OFFSET, param_spec); /** * AgsPattern:current-bit: * * Offset of current position. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("current-bit", "current bit for offset", "The current bit for offset", FALSE, G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_CURRENT_BIT, param_spec); /** * AgsPattern:timestamp: * * The pattern's timestamp. * * Since: 1.0.0 */ param_spec = g_param_spec_object("timestamp", "timestamp of pattern", "The timestamp of pattern", AGS_TYPE_TIMESTAMP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TIMESTAMP, param_spec); } void ags_pattern_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_pattern_connect; connectable->disconnect = ags_pattern_disconnect; } void ags_pattern_tactable_interface_init(AgsTactableInterface *tactable) { tactable->change_bpm = ags_pattern_change_bpm; } void ags_pattern_portlet_interface_init(AgsPortletInterface *portlet) { portlet->set_port = ags_pattern_set_port; portlet->get_port = ags_pattern_get_port; portlet->list_safe_properties = ags_pattern_list_safe_properties; portlet->safe_set_property = ags_pattern_safe_set_property; portlet->safe_get_property = ags_pattern_safe_get_property; } void ags_pattern_init(AgsPattern *pattern) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t attr; /* create mutex */ //FIXME:JK: memory leak pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, &attr); /* insert mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) pattern, mutex); pthread_mutex_unlock(application_mutex); /* base initialization */ pattern->flags = 0; /* timestamp */ pattern->timestamp = NULL; /* dimension and pattern */ pattern->dim[0] = 0; pattern->dim[1] = 0; pattern->dim[2] = 0; pattern->pattern = NULL; /* port */ pattern->port = NULL; /* indices */ pattern->i = 0; pattern->j = 0; pattern->bit = 0; } void ags_pattern_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPattern *pattern; pattern = AGS_PATTERN(gobject); switch(prop_id){ case PROP_PORT: { AgsPort *port; port = (AgsPort *) g_value_get_object(value); if(port == (AgsPort *) pattern->port){ return; } if(pattern->port != NULL){ g_object_unref(G_OBJECT(pattern->port)); } if(port != NULL){ g_object_ref(G_OBJECT(port)); } pattern->port = (GObject *) port; } break; case PROP_FIRST_INDEX: { AgsPort *port; guint i; i = g_value_get_uint(value); port = (AgsPort *) ags_portlet_get_port(AGS_PORTLET(pattern)); pthread_mutex_lock(port->mutex); pattern->i = i; pthread_mutex_unlock(port->mutex); } break; case PROP_SECOND_INDEX: { AgsPort *port; guint j; j = g_value_get_uint(value); port = (AgsPort *) ags_portlet_get_port(AGS_PORTLET(pattern)); pthread_mutex_lock(port->mutex); pattern->j = j; pthread_mutex_unlock(port->mutex); } break; case PROP_OFFSET: { AgsPort *port; guint bit; bit = g_value_get_uint(value); port = (AgsPort *) ags_portlet_get_port(AGS_PORTLET(pattern)); pthread_mutex_lock(port->mutex); pattern->bit = bit; pthread_mutex_unlock(port->mutex); } break; case PROP_TIMESTAMP: { AgsTimestamp *timestamp; timestamp = (AgsTimestamp *) g_value_get_object(value); if(timestamp == (AgsTimestamp *) pattern->timestamp){ return; } if(pattern->timestamp != NULL){ g_object_unref(G_OBJECT(pattern->timestamp)); } if(timestamp != NULL){ g_object_ref(G_OBJECT(timestamp)); } pattern->timestamp = (GObject *) timestamp; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pattern_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPattern *pattern; pattern = AGS_PATTERN(gobject); switch(prop_id){ case PROP_PORT: g_value_set_object(value, pattern->port); break; case PROP_FIRST_INDEX: { AgsPort *port; port = (AgsPort *) ags_portlet_get_port(AGS_PORTLET(pattern)); pthread_mutex_lock(port->mutex); g_value_set_uint(value, pattern->i); pthread_mutex_unlock(port->mutex); } break; case PROP_SECOND_INDEX: { AgsPort *port; port = (AgsPort *) ags_portlet_get_port(AGS_PORTLET(pattern)); pthread_mutex_lock(port->mutex); g_value_set_uint(value, pattern->j); pthread_mutex_unlock(port->mutex); } break; case PROP_OFFSET: { AgsPort *port; port = (AgsPort *) ags_portlet_get_port(AGS_PORTLET(pattern)); pthread_mutex_lock(port->mutex); g_value_set_uint(value, pattern->bit); pthread_mutex_unlock(port->mutex); } break; case PROP_CURRENT_BIT: { AgsPort *port; port = (AgsPort *) ags_portlet_get_port(AGS_PORTLET(pattern)); pthread_mutex_lock(port->mutex); g_value_set_boolean(value, ags_pattern_get_bit(pattern, pattern->i, pattern->j, pattern->bit)); pthread_mutex_unlock(port->mutex); } break; case PROP_TIMESTAMP: g_value_set_object(value, pattern->timestamp); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_pattern_connect(AgsConnectable *connectable) { AgsPattern *pattern; pattern = AGS_PATTERN(connectable); if((AGS_PATTERN_CONNECTED & (pattern->flags)) != 0){ return; } pattern->flags |= AGS_PATTERN_CONNECTED; } void ags_pattern_disconnect(AgsConnectable *connectable) { AgsPattern *pattern; pattern = AGS_PATTERN(connectable); if((AGS_PATTERN_CONNECTED & (pattern->flags)) == 0){ return; } pattern->flags &= (~AGS_PATTERN_CONNECTED); } void ags_pattern_dispose(GObject *gobject) { AgsPattern *pattern; pattern = AGS_PATTERN(gobject); /* timestamp */ if(pattern->timestamp != NULL){ g_object_run_dispose(G_OBJECT(pattern->timestamp)); g_object_unref(G_OBJECT(pattern->timestamp)); } /* port */ if(pattern->port != NULL){ g_object_unref(G_OBJECT(pattern->port)); pattern->port = NULL; } /* call parent */ G_OBJECT_CLASS(ags_pattern_parent_class)->dispose(gobject); } void ags_pattern_finalize(GObject *gobject) { AgsPattern *pattern; guint i, j; pattern = AGS_PATTERN(gobject); /* timestamp */ if(pattern->timestamp != NULL){ g_object_unref(G_OBJECT(pattern->timestamp)); } /* pattern */ if(pattern->pattern != NULL){ for(i = 0; i < pattern->dim[0]; i++){ if(pattern->pattern[i] != NULL){ for(j = 0; j < pattern->dim[1]; j++){ if(pattern->pattern[i][j] != NULL){ free(pattern->pattern[i][j]); } } free(pattern->pattern[i]); } } free(pattern->pattern); } /* port */ if(pattern->port != NULL){ g_object_unref(G_OBJECT(pattern->port)); } /* call parent */ G_OBJECT_CLASS(ags_pattern_parent_class)->finalize(gobject); } void ags_pattern_change_bpm(AgsTactable *tactable, gdouble new_bpm, gdouble old_bpm) { //TODO:JK: implement me } void ags_pattern_set_port(AgsPortlet *portlet, GObject *port) { g_object_set(G_OBJECT(portlet), "port", port, NULL); } GObject* ags_pattern_get_port(AgsPortlet *portlet) { AgsPort *port; g_object_get(G_OBJECT(portlet), "port", &port, NULL); return((GObject *) port); } GList* ags_pattern_list_safe_properties(AgsPortlet *portlet) { static GList *list = NULL; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(list == NULL){ list = g_list_prepend(list, "first-index"); list = g_list_prepend(list, "second-index"); list = g_list_prepend(list, "offset"); list = g_list_prepend(list, "current-bit"); } pthread_mutex_unlock(&mutex); return(list); } void ags_pattern_safe_set_property(AgsPortlet *portlet, gchar *property_name, GValue *value) { //TODO:JK: add check for safe property g_object_set_property(G_OBJECT(portlet), property_name, value); } void ags_pattern_safe_get_property(AgsPortlet *portlet, gchar *property_name, GValue *value) { //TODO:JK: add check for safe property g_object_get_property(G_OBJECT(portlet), property_name, value); } /** * ags_pattern_find_near_timestamp: * @pattern: a #GList containing #AgsPattern * @timestamp: the matching timestamp * * Retrieve appropriate pattern for timestamp. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_pattern_find_near_timestamp(GList *pattern, GObject *timestamp) { AgsTimestamp *current_timestamp; if(timestamp == NULL){ return(NULL); } while(pattern != NULL){ current_timestamp = (AgsTimestamp *) AGS_PATTERN(pattern->data)->timestamp; if((AGS_TIMESTAMP_UNIX & (AGS_TIMESTAMP(timestamp)->flags)) != 0){ if((AGS_TIMESTAMP_UNIX & (current_timestamp->flags)) != 0){ if(current_timestamp->timer.unix_time.time_val >= AGS_TIMESTAMP(timestamp)->timer.unix_time.time_val && current_timestamp->timer.unix_time.time_val < AGS_TIMESTAMP(timestamp)->timer.unix_time.time_val + AGS_PATTERN_DEFAULT_DURATION){ return(pattern); } } } pattern = pattern->next; } return(NULL); } /** * ags_pattern_set_dim: * @pattern: an #AgsPattern * @dim0: bank 0 size * @dim1: bank 1 size * @length: amount of beats * * Reallocates the pattern's dimensions. * * Since: 1.0.0 */ void ags_pattern_set_dim(AgsPattern *pattern, guint dim0, guint dim1, guint length) { guint ***index0, **index1, *bitmap; guint i, j, k, j_set, k_set; guint bitmap_size; if(dim0 == 0 && pattern->pattern == NULL){ return; } // shrink if(pattern->dim[0] > dim0){ for(i = dim0; i < pattern->dim[0]; i++){ for(j = 0; j < pattern->dim[1]; j++){ free(pattern->pattern[i][j]); } free(pattern->pattern[i]); } if(dim0 == 0){ free(pattern->pattern); pattern->pattern = NULL; pattern->dim[0] = 0; return; }else{ pattern->pattern = (guint ***) realloc(pattern->pattern, (int) dim0 * sizeof(guint **)); pattern->dim[0] = dim0; } } if(pattern->dim[1] > dim1){ if(dim1 == 0){ for(i = 0; i < pattern->dim[0]; i++){ for(j = dim1; j < pattern->dim[1]; j++){ free(pattern->pattern[i][j]); } pattern->pattern[i] = NULL; } pattern->dim[1] = 0; return; }else{ for(i = 0; i < pattern->dim[0]; i++){ for(j = dim1; j < pattern->dim[1]; j++){ free(pattern->pattern[i][j]); } } for(i = 0; pattern->dim[0]; i++){ pattern->pattern[i] = (guint **) realloc(pattern->pattern[i], dim1 * sizeof(guint *)); } pattern->dim[1] = dim1; } } if(pattern->dim[2] > length){ if(length == 0){ for(i = 0; i < pattern->dim[0]; i++){ for(j = 0; j < pattern->dim[1]; j++){ free(pattern->pattern[i][j]); pattern->pattern[i][j] = NULL; } } pattern->dim[2] = 0; }else{ for(i = 0; i < pattern->dim[0]; i++){ for(j = 0; j < pattern->dim[1]; j++){ pattern->pattern[i][j] = (guint *) realloc(pattern->pattern[i][j], (int) ceil((double) length / (double) (sizeof(guint) * 8)) * sizeof(guint)); } } pattern->dim[2] = length; } } // grow bitmap_size = (int) ceil((double) pattern->dim[2] / (double) (sizeof(guint) * 8)) * sizeof(guint); if(pattern->dim[0] < dim0){ if(pattern->pattern == NULL){ pattern->pattern = (guint ***) malloc(dim0 * sizeof(guint **)); }else{ pattern->pattern = (guint ***) realloc(pattern->pattern, dim0 * sizeof(guint **)); } for(i = pattern->dim[0]; i < dim0; i++){ pattern->pattern[i] = (guint **) malloc(pattern->dim[1] * sizeof(guint *)); for(j = 0; j < pattern->dim[1]; j++){ if(bitmap_size == 0){ pattern->pattern[i][j] = NULL; }else{ pattern->pattern[i][j] = (guint *) malloc(bitmap_size); memset(pattern->pattern[i][j], 0, bitmap_size); } } } pattern->dim[0] = dim0; } if(pattern->dim[1] < dim1){ for(i = 0; i < pattern->dim[0]; i++){ if(pattern->pattern[i] == NULL){ pattern->pattern[i] = (guint **) malloc(dim1 * sizeof(guint *)); }else{ pattern->pattern[i] = (guint **) realloc(pattern->pattern[i], dim1 * sizeof(guint *)); } for(j = pattern->dim[1]; j < dim1; j++){ if(bitmap_size == 0){ pattern->pattern[i][j] = NULL; }else{ pattern->pattern[i][j] = (guint *) malloc(bitmap_size); memset(pattern->pattern[i][j], 0, bitmap_size); } } } pattern->dim[1] = dim1; } if(pattern->dim[2] < length){ guint new_bitmap_size; new_bitmap_size = (int) ceil((double) length / (double) (sizeof(guint) * 8)) * sizeof(guint); for(i = 0; i < pattern->dim[0]; i++){ for(j = 0; j < pattern->dim[1]; j++){ if(pattern->pattern[i][j] == NULL){ pattern->pattern[i][j] = (guint *) malloc(new_bitmap_size); memset(pattern->pattern[i][j], 0, new_bitmap_size); }else{ pattern->pattern[i][j] =(guint *) realloc(pattern->pattern[i][j], new_bitmap_size); memset(pattern->pattern[i][j] + bitmap_size, 0, new_bitmap_size - bitmap_size); } } } pattern->dim[2] = length; } } gboolean ags_pattern_is_empty(AgsPattern *pattern, guint i, guint j) { guint bitmap_length; guint n; bitmap_length = (guint) ceil((double) pattern->dim[2] / (double) (sizeof(guint) * 8)); for(n = 0; n < bitmap_length; n++){ if(pattern->pattern[i][j][n] != 0){ return(FALSE); } } return(TRUE); } /** * ags_pattern_get_bit: * @pattern: an #AgsPattern * @i: bank index 0 * @j: bank index 1 * @bit: the tic to check * * Check for tic to be played. * * Returns: %TRUE if tone is enabled. * * Since: 1.0.0 */ gboolean ags_pattern_get_bit(AgsPattern *pattern, guint i, guint j, guint bit) { guint k, value; k = (guint) floor((double) bit / (double) (sizeof(guint) * 8)); value = 1 << (bit % (sizeof(guint) * 8)); //((1 << (bit % (sizeof(guint) *8))) & (pattern->pattern[i][j][(guint) floor((double) bit / (double) (sizeof(guint) * 8))])) != 0 if((value & (pattern->pattern[i][j][k])) != 0) return(TRUE); else return(FALSE); } /** * ags_pattern_toggle_bit: * @pattern: an #AgsPattern * @i: bank index 0 * @j: bank index 1 * @bit: the tic to toggle * * Toggle tone. * * Since: 1.0.0 */ void ags_pattern_toggle_bit(AgsPattern *pattern, guint i, guint j, guint bit) { guint k, value; k = (guint) floor((double) bit / (double) (sizeof(guint) * 8)); value = 1 << (bit % (sizeof(guint) * 8)); if(value & (pattern->pattern[i][j][k])) pattern->pattern[i][j][k] &= (~value); else pattern->pattern[i][j][k] |= value; } /** * ags_pattern_new: * * Creates an #AgsPattern * * Returns: a new #AgsPattern * * Since: 1.0.0 */ AgsPattern* ags_pattern_new() { AgsPattern *pattern; pattern = (AgsPattern *) g_object_new(AGS_TYPE_PATTERN, NULL); return(pattern); } gsequencer-1.4.24/ags/audio/client/0000755000175000017500000000000013256233674014110 500000000000000gsequencer-1.4.24/ags/audio/client/ags_remote_input.h0000644000175000017500000000364113246707333017546 00000000000000/* 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 . */ #ifndef __AGS_REMOTE_INPUT_H__ #define __AGS_REMOTE_INPUT_H__ #include #include #include #define AGS_TYPE_REMOTE_INPUT (ags_remote_input_get_type()) #define AGS_REMOTE_INPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOTE_INPUT, AgsRemoteInput)) #define AGS_REMOTE_INPUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_REMOTE_INPUT, AgsRemoteInput)) #define AGS_IS_REMOTE_INPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_REMOTE_INPUT)) #define AGS_IS_REMOTE_INPUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_REMOTE_INPUT)) #define AGS_REMOTE_INPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_REMOTE_INPUT, AgsRemoteInputClass)) typedef struct _AgsRemoteInput AgsRemoteInput; typedef struct _AgsRemoteInputClass AgsRemoteInputClass; struct _AgsRemoteInput { AgsRemoteChannel remote_channel; }; struct _AgsRemoteInputClass { AgsRemoteChannelClass remote_channel; }; GType ags_remote_input_get_type(); AgsRemoteInput* ags_remote_input_new(GObject *application_context); #endif /*__AGS_REMOTE_INPUT_H__*/ gsequencer-1.4.24/ags/audio/client/ags_remote_output.c0000644000175000017500000000446513246707333017747 00000000000000/* 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 . */ #include #include void ags_remote_output_class_init(AgsRemoteOutputClass *remote_output_class); void ags_remote_output_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remote_output_init(AgsRemoteOutput *remote_output); GType ags_remote_output_get_type (void) { static GType ags_type_remote_output = 0; if(!ags_type_remote_output){ static const GTypeInfo ags_remote_output_info = { sizeof (AgsRemoteOutputClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remote_output_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoteOutput), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remote_output_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remote_output_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remote_output = g_type_register_static(AGS_TYPE_REMOTE_CHANNEL, "AgsRemoteOutput", &ags_remote_output_info, 0); g_type_add_interface_static(ags_type_remote_output, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_remote_output); } void ags_remote_output_class_init(AgsRemoteOutputClass *remote_output_class) { } void ags_remote_output_connectable_interface_init(AgsConnectableInterface *connectable) { } void ags_remote_output_init(AgsRemoteOutput *remote_output) { } gsequencer-1.4.24/ags/audio/client/ags_remote_output.h0000644000175000017500000000367413246707333017755 00000000000000/* 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 . */ #ifndef __AGS_REMOTE_OUTPUT_H__ #define __AGS_REMOTE_OUTPUT_H__ #include #include #include #define AGS_TYPE_REMOTE_OUTPUT (ags_remote_output_get_type()) #define AGS_REMOTE_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOTE_OUTPUT, AgsRemoteOutput)) #define AGS_REMOTE_OUTPUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_REMOTE_OUTPUT, AgsRemoteOutput)) #define AGS_IS_REMOTE_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_REMOTE_OUTPUT)) #define AGS_IS_REMOTE_OUTPUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_REMOTE_OUTPUT)) #define AGS_REMOTE_OUTPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_REMOTE_OUTPUT, AgsRemoteOutputClass)) typedef struct _AgsRemoteOutput AgsRemoteOutput; typedef struct _AgsRemoteOutputClass AgsRemoteOutputClass; struct _AgsRemoteOutput { AgsRemoteChannel remote_channel; }; struct _AgsRemoteOutputClass { AgsRemoteChannelClass remote_channel; }; GType ags_remote_output_get_type(); AgsRemoteOutput* ags_remote_output_new(GObject *application_context); #endif /*__AGS_REMOTE_OUTPUT_H__*/ gsequencer-1.4.24/ags/audio/client/ags_remote_channel.c0000644000175000017500000000451113246707333020007 00000000000000/* 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 . */ #include #include void ags_remote_channel_class_init(AgsRemoteChannelClass *remote_channel_class); void ags_remote_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remote_channel_init(AgsRemoteChannel *remote_channel); GType ags_remote_channel_get_type(void) { static GType ags_type_remote_channel = 0; if(!ags_type_remote_channel){ static const GTypeInfo ags_remote_channel_info = { sizeof (AgsRemoteChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remote_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoteChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remote_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remote_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remote_channel = g_type_register_static(G_TYPE_OBJECT, "AgsRemoteChannel", &ags_remote_channel_info, 0); g_type_add_interface_static(ags_type_remote_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_remote_channel); } void ags_remote_channel_class_init(AgsRemoteChannelClass *remote_channel_class) { } void ags_remote_channel_connectable_interface_init(AgsConnectableInterface *connectable) { } void ags_remote_channel_init(AgsRemoteChannel *remote_channel) { } gsequencer-1.4.24/ags/audio/client/ags_remote_input.c0000644000175000017500000000442613246707333017543 00000000000000/* 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 . */ #include #include void ags_remote_input_class_init(AgsRemoteInputClass *remote_input_class); void ags_remote_input_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remote_input_init(AgsRemoteInput *remote_input); GType ags_remote_input_get_type (void) { static GType ags_type_remote_input = 0; if(!ags_type_remote_input){ static const GTypeInfo ags_remote_input_info = { sizeof (AgsRemoteInputClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remote_input_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoteInput), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remote_input_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remote_input_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remote_input = g_type_register_static(AGS_TYPE_REMOTE_CHANNEL, "AgsRemoteInput", &ags_remote_input_info, 0); g_type_add_interface_static(ags_type_remote_input, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_remote_input); } void ags_remote_input_class_init(AgsRemoteInputClass *remote_input_class) { } void ags_remote_input_connectable_interface_init(AgsConnectableInterface *connectable) { } void ags_remote_input_init(AgsRemoteInput *remote_input) { } gsequencer-1.4.24/ags/audio/client/ags_remote_channel.h0000644000175000017500000000725013246707333020017 00000000000000/* 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 . */ #ifndef __AGS_REMOTE_CHANNEL_H__ #define __AGS_REMOTE_CHANNEL_H__ #include #include #include #define AGS_TYPE_REMOTE_CHANNEL (ags_remote_channel_get_type()) #define AGS_REMOTE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOTE_CHANNEL, AgsRemoteChannel)) #define AGS_REMOTE_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_REMOTE_CHANNEL, AgsRemoteChannel)) #define AGS_IS_REMOTE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_REMOTE_CHANNEL)) #define AGS_IS_REMOTE_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_REMOTE_CHANNEL)) #define AGS_REMOTE_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_REMOTE_CHANNEL, AgsRemoteChannelClass)) typedef struct _AgsRemoteChannel AgsRemoteChannel; typedef struct _AgsRemoteChannelClass AgsRemoteChannelClass; /** * AgsRemoteChannelFlags: * @AGS_REMOTE_CHANNEL_KEEP_ALIVE: TODO:JK: implement me * * Enum values to control the behavior or indicate internal state of #AgsRemoteChannel by * enable/disable as flags. */ typedef enum{ AGS_REMOTE_CHANNEL_KEEP_ALIVE = 1, }AgsRemoteChannelFlags; typedef enum{ AGS_REMOTE_CHANNEL_RPC = 1, AGS_REMOTE_CHANNEL_XMLRPC = 1 << 1, AGS_REMOTE_CHANNEL_REST_HTTP = 1 << 2, }AgsRemoteChannelProtocolFlags; typedef enum{ AGS_REMOTE_CHANNEL_SERVER_TIMEOUT, AGS_REMOTE_CHANNEL_SERVER_DIED, }AgsRemoteChannelError; struct _AgsRemoteChannel { GObject object; guint flags; guint protocol_flags; gchar *data_encoding; gchar *data_compression; gchar *character_encoding; gchar *uuid; gchar *uri; GObject *server; GObject *credentials; GObject *client; GList *data_package; GList *audio_signal; }; struct _AgsRemoteChannelClass { GObjectClass object; GObject* (*connect)(AgsRemoteChannel *remote_channel); guint (*transfer_data)(AgsRemoteChannel *remote_channel, gchar *uuid, char *data, guint buffer_length, GError *error); guint (*recieve_data)(AgsRemoteChannel *remote_channel, gchar *uuid, char *data, guint buffer_length, GError *error); void (*put_package)(AgsRemoteChannel *remote_channel, GObject *data_package); void (*get_package)(AgsRemoteChannel *remote_channel, GObject *data_package); void (*delete_package)(AgsRemoteChannel *remote_channel, GObject *data_package); void (*post_package)(AgsRemoteChannel *remote_channel, GObject *data_package); void (*add_audio_signal)(AgsRemoteChannel *remote_channel, AgsAudioSignal *audio_signal); void (*remove_audio_signal)(AgsRemoteChannel *remote_channel, AgsAudioSignal *audio_signal); }; GType ags_remote_channel_get_type(); GQuark ags_remote_channel_error_quark(); AgsRemoteChannel* ags_remote_channel_new(GObject *application_context); #endif /*__AGS_REMOTE_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/core-audio/0000755000175000017500000000000013256233674014661 500000000000000gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_server.h0000644000175000017500000000706713246707333021312 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CORE_AUDIO_SERVER_H__ #define __AGS_CORE_AUDIO_SERVER_H__ #include #include #include #ifdef AGS_WITH_CORE_AUDIO #include #include #include #include #endif #include #define AGS_TYPE_CORE_AUDIO_SERVER (ags_core_audio_server_get_type()) #define AGS_CORE_AUDIO_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CORE_AUDIO_SERVER, AgsCoreAudioServer)) #define AGS_CORE_AUDIO_SERVER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_CORE_AUDIO_SERVER, AgsCoreAudioServer)) #define AGS_IS_CORE_AUDIO_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CORE_AUDIO_SERVER)) #define AGS_IS_CORE_AUDIO_SERVER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CORE_AUDIO_SERVER)) #define AGS_CORE_AUDIO_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_CORE_AUDIO_SERVER, AgsCoreAudioServerClass)) typedef struct _AgsCoreAudioServer AgsCoreAudioServer; typedef struct _AgsCoreAudioServerClass AgsCoreAudioServerClass; /** * AgsCoreAudioServerFlags: * @AGS_CORE_AUDIO_SERVER_CONNECTED: indicates the server was connected by calling #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsCoreAudioPort by * enable/disable as flags. */ typedef enum{ AGS_CORE_AUDIO_SERVER_CONNECTED = 1, }AgsCoreAudioServerFlags; struct _AgsCoreAudioServer { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; volatile gboolean running; pthread_t *thread; GObject *application_context; gchar *url; guint *port; guint port_count; guint n_soundcards; guint n_sequencers; GObject *default_soundcard; GObject *default_client; GList *client; }; struct _AgsCoreAudioServerClass { GObjectClass object; }; GType ags_core_audio_server_get_type(); GList* ags_core_audio_server_find_url(GList *core_audio_server, gchar *url); GObject* ags_core_audio_server_find_client(AgsCoreAudioServer *core_audio_server, gchar *client_uuid); GObject* ags_core_audio_server_find_port(AgsCoreAudioServer *core_audio_server, gchar *port_uuid); void ags_core_audio_server_add_client(AgsCoreAudioServer *core_audio_server, GObject *core_audio_client); void ags_core_audio_server_remove_client(AgsCoreAudioServer *core_audio_server, GObject *core_audio_client); void ags_core_audio_server_connect_client(AgsCoreAudioServer *core_audio_server); void ags_core_audio_server_start_poll(AgsCoreAudioServer *core_audio_server); AgsCoreAudioServer* ags_core_audio_server_new(GObject *application_context, gchar *url); #endif /*__AGS_CORE_AUDIO_SERVER_H__*/ gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_port.h0000644000175000017500000001073713253760315020763 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CORE_AUDIO_PORT_H__ #define __AGS_CORE_AUDIO_PORT_H__ #include #include #include #ifdef AGS_WITH_CORE_AUDIO #include #include #include #include #include #endif #define AGS_TYPE_CORE_AUDIO_PORT (ags_core_audio_port_get_type()) #define AGS_CORE_AUDIO_PORT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CORE_AUDIO_PORT, AgsCoreAudioPort)) #define AGS_CORE_AUDIO_PORT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_CORE_AUDIO_PORT, AgsCoreAudioPort)) #define AGS_IS_CORE_AUDIO_PORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CORE_AUDIO_PORT)) #define AGS_IS_CORE_AUDIO_PORT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CORE_AUDIO_PORT)) #define AGS_CORE_AUDIO_PORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_CORE_AUDIO_PORT, AgsCoreAudioPortClass)) typedef struct _AgsCoreAudioPort AgsCoreAudioPort; typedef struct _AgsCoreAudioPortClass AgsCoreAudioPortClass; /** * AgsCoreAudioPortFlags: * @AGS_CORE_AUDIO_PORT_CONNECTED: indicates the port was connected by calling #AgsConnectable::connect() * @AGS_CORE_AUDIO_PORT_REGISTERED: the port was registered * @AGS_CORE_AUDIO_PORT_IS_AUDIO: the port provides audio data * @AGS_CORE_AUDIO_PORT_IS_MIDI: the port provides midi data * @AGS_CORE_AUDIO_PORT_IS_OUTPUT: the port does output * @AGS_CORE_AUDIO_PORT_IS_INPUT: the port does input * * Enum values to control the behavior or indicate internal state of #AgsCoreAudioPort by * enable/disable as flags. */ typedef enum{ AGS_CORE_AUDIO_PORT_CONNECTED = 1, AGS_CORE_AUDIO_PORT_REGISTERED = 1 << 1, AGS_CORE_AUDIO_PORT_IS_AUDIO = 1 << 2, AGS_CORE_AUDIO_PORT_IS_MIDI = 1 << 3, AGS_CORE_AUDIO_PORT_IS_OUTPUT = 1 << 4, AGS_CORE_AUDIO_PORT_IS_INPUT = 1 << 5, }AgsCoreAudioPortFlags; struct _AgsCoreAudioPort { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; GObject *core_audio_client; GObject *core_audio_device; gchar *uuid; gchar *name; guint format; guint buffer_size; guint pcm_channels; guint samplerate; #ifdef AGS_WITH_CORE_AUDIO AudioComponentDescription desc; AudioComponent comp; AudioStreamBasicDescription data_format; AURenderCallbackStruct input; AudioUnit au_unit; MIDIClientRef *midi_client; MIDIPortRef *midi_port; #else gpointer comp; gpointer desc; gpointer data_format; gpointer packet_descs; gpointer input; gpointer au_unit; gpointer midi_client; gpointer midi_port; #endif unsigned int midi_port_number; volatile gboolean running; volatile gboolean is_empty; volatile guint queued; }; struct _AgsCoreAudioPortClass { GObjectClass object; }; GType ags_core_audio_port_get_type(); GList* ags_core_audio_port_find(GList *core_audio_port, gchar *port_name); void ags_core_audio_port_register(AgsCoreAudioPort *core_audio_port, gchar *port_name, gboolean is_audio, gboolean is_midi, gboolean is_output); void ags_core_audio_port_unregister(AgsCoreAudioPort *core_audio_port); void ags_core_audio_port_set_format(AgsCoreAudioPort *core_audio_port, guint format); void ags_core_audio_port_set_samplerate(AgsCoreAudioPort *core_audio_port, guint samplerate); void ags_core_audio_port_set_pcm_channels(AgsCoreAudioPort *core_audio_port, guint pcm_channels); void ags_core_audio_port_set_buffer_size(AgsCoreAudioPort *core_audio_port, guint buffer_size); AgsCoreAudioPort* ags_core_audio_port_new(GObject *core_audio_client); #endif /*__AGS_CORE_AUDIO_PORT_H__*/ gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_midiin.c0000644000175000017500000013071013254220314021224 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_core_audio_midiin_class_init(AgsCoreAudioMidiinClass *core_audio_midiin); void ags_core_audio_midiin_connectable_interface_init(AgsConnectableInterface *connectable); void ags_core_audio_midiin_sequencer_interface_init(AgsSequencerInterface *sequencer); void ags_core_audio_midiin_init(AgsCoreAudioMidiin *core_audio_midiin); void ags_core_audio_midiin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_core_audio_midiin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_core_audio_midiin_disconnect(AgsConnectable *connectable); void ags_core_audio_midiin_connect(AgsConnectable *connectable); void ags_core_audio_midiin_dispose(GObject *gobject); void ags_core_audio_midiin_finalize(GObject *gobject); void ags_core_audio_midiin_set_application_context(AgsSequencer *sequencer, AgsApplicationContext *application_context); AgsApplicationContext* ags_core_audio_midiin_get_application_context(AgsSequencer *sequencer); void ags_core_audio_midiin_set_application_mutex(AgsSequencer *sequencer, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_core_audio_midiin_get_application_mutex(AgsSequencer *sequencer); void ags_core_audio_midiin_set_device(AgsSequencer *sequencer, gchar *device); gchar* ags_core_audio_midiin_get_device(AgsSequencer *sequencer); void ags_core_audio_midiin_list_cards(AgsSequencer *sequencer, GList **card_id, GList **card_name); gboolean ags_core_audio_midiin_is_starting(AgsSequencer *sequencer); gboolean ags_core_audio_midiin_is_recording(AgsSequencer *sequencer); void ags_core_audio_midiin_port_init(AgsSequencer *sequencer, GError **error); void ags_core_audio_midiin_port_record(AgsSequencer *sequencer, GError **error); void ags_core_audio_midiin_port_free(AgsSequencer *sequencer); void ags_core_audio_midiin_tic(AgsSequencer *sequencer); void ags_core_audio_midiin_offset_changed(AgsSequencer *sequencer, guint note_offset); void ags_core_audio_midiin_set_bpm(AgsSequencer *sequencer, gdouble bpm); gdouble ags_core_audio_midiin_get_bpm(AgsSequencer *sequencer); void ags_core_audio_midiin_set_delay_factor(AgsSequencer *sequencer, gdouble delay_factor); gdouble ags_core_audio_midiin_get_delay_factor(AgsSequencer *sequencer); void* ags_core_audio_midiin_get_buffer(AgsSequencer *sequencer, guint *buffer_length); void* ags_core_audio_midiin_get_next_buffer(AgsSequencer *sequencer, guint *buffer_length); void ags_core_audio_midiin_set_note_offset(AgsSequencer *sequencer, guint note_offset); guint ags_core_audio_midiin_get_note_offset(AgsSequencer *sequencer); void ags_core_audio_midiin_set_audio(AgsSequencer *sequencer, GList *audio); GList* ags_core_audio_midiin_get_audio(AgsSequencer *sequencer); /** * SECTION:ags_core_audio_midiin * @short_description: Input from sequencer * @title: AgsCoreAudioMidiin * @section_id: * @include: ags/audio/core-audio/ags_core_audio_midiin.h * * #AgsCoreAudioMidiin represents a sequencer and supports midi input. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, PROP_CORE_AUDIO_CLIENT, PROP_CORE_AUDIO_PORT, }; enum{ LAST_SIGNAL, }; static gpointer ags_core_audio_midiin_parent_class = NULL; static guint core_audio_midiin_signals[LAST_SIGNAL]; GType ags_core_audio_midiin_get_type (void) { static GType ags_type_core_audio_midiin = 0; if(!ags_type_core_audio_midiin){ static const GTypeInfo ags_core_audio_midiin_info = { sizeof (AgsCoreAudioMidiinClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_core_audio_midiin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCoreAudioMidiin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_core_audio_midiin_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_core_audio_midiin_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_sequencer_interface_info = { (GInterfaceInitFunc) ags_core_audio_midiin_sequencer_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_core_audio_midiin = g_type_register_static(G_TYPE_OBJECT, "AgsCoreAudioMidiin", &ags_core_audio_midiin_info, 0); g_type_add_interface_static(ags_type_core_audio_midiin, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_core_audio_midiin, AGS_TYPE_SEQUENCER, &ags_sequencer_interface_info); } return (ags_type_core_audio_midiin); } void ags_core_audio_midiin_class_init(AgsCoreAudioMidiinClass *core_audio_midiin) { GObjectClass *gobject; GParamSpec *param_spec; ags_core_audio_midiin_parent_class = g_type_class_peek_parent(core_audio_midiin); /* GObjectClass */ gobject = (GObjectClass *) core_audio_midiin; gobject->set_property = ags_core_audio_midiin_set_property; gobject->get_property = ags_core_audio_midiin_get_property; gobject->dispose = ags_core_audio_midiin_dispose; gobject->finalize = ags_core_audio_midiin_finalize; /* properties */ /** * AgsCoreAudioMidiin:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsCoreAudioMidiin:application-mutex: * * The assigned application mutex * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsCoreAudioMidiin:device: * * The core audio sequencer indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "hw:0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsCoreAudioMidiin:buffer: * * The buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to record"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsCoreAudioMidiin:bpm: * * Beats per minute * * Since: 1.0.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsCoreAudioMidiin:delay-factor: * * tact * * Since: 1.0.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsCoreAudioMidiin:attack: * * Attack of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsCoreAudioMidiin:core-audio-client: * * The assigned #AgsCoreAudioClient * * Since: 1.0.0 */ param_spec = g_param_spec_object("core-audio-client", i18n_pspec("core audio client object"), i18n_pspec("The core audio client object"), AGS_TYPE_CORE_AUDIO_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CORE_AUDIO_CLIENT, param_spec); /** * AgsCoreAudioMidiin:core-audio-port: * * The assigned #AgsCoreAudioPort * * Since: 1.0.0 */ param_spec = g_param_spec_object("core-audio-port", i18n_pspec("core audio port object"), i18n_pspec("The core audio port object"), AGS_TYPE_CORE_AUDIO_PORT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CORE_AUDIO_PORT, param_spec); /* AgsCoreAudioMidiinClass */ } GQuark ags_core_audio_midiin_error_quark() { return(g_quark_from_static_string("ags-core_audio_midiin-error-quark")); } void ags_core_audio_midiin_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_core_audio_midiin_connect; connectable->disconnect = ags_core_audio_midiin_disconnect; } void ags_core_audio_midiin_sequencer_interface_init(AgsSequencerInterface *sequencer) { sequencer->set_application_context = ags_core_audio_midiin_set_application_context; sequencer->get_application_context = ags_core_audio_midiin_get_application_context; sequencer->set_application_mutex = ags_core_audio_midiin_set_application_mutex; sequencer->get_application_mutex = ags_core_audio_midiin_get_application_mutex; sequencer->set_device = ags_core_audio_midiin_set_device; sequencer->get_device = ags_core_audio_midiin_get_device; sequencer->list_cards = ags_core_audio_midiin_list_cards; sequencer->is_starting = ags_core_audio_midiin_is_starting; sequencer->is_playing = NULL; sequencer->is_recording = ags_core_audio_midiin_is_recording; sequencer->play_init = NULL; sequencer->play = NULL; sequencer->record_init = ags_core_audio_midiin_port_init; sequencer->record = ags_core_audio_midiin_port_record; sequencer->stop = ags_core_audio_midiin_port_free; sequencer->tic = ags_core_audio_midiin_tic; sequencer->offset_changed = ags_core_audio_midiin_offset_changed; sequencer->set_bpm = ags_core_audio_midiin_set_bpm; sequencer->get_bpm = ags_core_audio_midiin_get_bpm; sequencer->set_delay_factor = ags_core_audio_midiin_set_delay_factor; sequencer->get_delay_factor = ags_core_audio_midiin_get_delay_factor; sequencer->get_buffer = ags_core_audio_midiin_get_buffer; sequencer->get_next_buffer = ags_core_audio_midiin_get_next_buffer; sequencer->set_note_offset = ags_core_audio_midiin_set_note_offset; sequencer->get_note_offset = ags_core_audio_midiin_get_note_offset; sequencer->set_audio = ags_core_audio_midiin_set_audio; sequencer->get_audio = ags_core_audio_midiin_get_audio; } void ags_core_audio_midiin_init(AgsCoreAudioMidiin *core_audio_midiin) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert jack midiin mutex */ core_audio_midiin->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif core_audio_midiin->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) core_audio_midiin, mutex); pthread_mutex_unlock(application_mutex); /* flags */ core_audio_midiin->flags = 0; g_atomic_int_set(&(core_audio_midiin->sync_flags), AGS_CORE_AUDIO_MIDIIN_PASS_THROUGH); core_audio_midiin->card_uri = NULL; core_audio_midiin->core_audio_client = NULL; core_audio_midiin->port_name = NULL; core_audio_midiin->core_audio_port = NULL; /* buffer */ core_audio_midiin->buffer = (char **) malloc(4 * sizeof(char*)); core_audio_midiin->buffer[0] = NULL; core_audio_midiin->buffer[1] = NULL; core_audio_midiin->buffer[2] = NULL; core_audio_midiin->buffer[3] = NULL; core_audio_midiin->buffer_size[0] = 0; core_audio_midiin->buffer_size[1] = 0; core_audio_midiin->buffer_size[2] = 0; core_audio_midiin->buffer_size[3] = 0; /* bpm */ core_audio_midiin->bpm = AGS_SEQUENCER_DEFAULT_BPM; /* delay and delay factor */ core_audio_midiin->delay = AGS_SEQUENCER_DEFAULT_DELAY; core_audio_midiin->delay_factor = AGS_SEQUENCER_DEFAULT_DELAY_FACTOR; /* counters */ core_audio_midiin->note_offset = 0; core_audio_midiin->tact_counter = 0.0; core_audio_midiin->delay_counter = 0; core_audio_midiin->tic_counter = 0; /* callback mutex */ core_audio_midiin->callback_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(core_audio_midiin->callback_mutex, NULL); core_audio_midiin->callback_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(core_audio_midiin->callback_cond, NULL); /* callback finish mutex */ core_audio_midiin->callback_finish_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(core_audio_midiin->callback_finish_mutex, NULL); core_audio_midiin->callback_finish_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(core_audio_midiin->callback_finish_cond, NULL); /* parent */ core_audio_midiin->application_context = NULL; core_audio_midiin->application_mutex = NULL; /* all AgsAudio */ core_audio_midiin->audio = NULL; } void ags_core_audio_midiin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(gobject); //TODO:JK: implement set functionality switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = g_value_get_object(value); if(core_audio_midiin->application_context == (GObject *) application_context){ return; } if(core_audio_midiin->application_context != NULL){ g_object_unref(G_OBJECT(core_audio_midiin->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *str; gchar *segmentation; guint discriminante, nominante; g_object_ref(G_OBJECT(application_context)); core_audio_midiin->application_mutex = application_context->mutex; }else{ core_audio_midiin->application_mutex = NULL; } core_audio_midiin->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(core_audio_midiin->application_mutex == application_mutex){ return; } core_audio_midiin->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); core_audio_midiin->card_uri = g_strdup(device); } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); core_audio_midiin->bpm = bpm; } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); core_audio_midiin->delay_factor = delay_factor; } break; case PROP_CORE_AUDIO_CLIENT: { AgsCoreAudioClient *core_audio_client; core_audio_client = g_value_get_object(value); if(core_audio_midiin->core_audio_client == (GObject *) core_audio_client){ return; } if(core_audio_midiin->core_audio_client != NULL){ g_object_unref(G_OBJECT(core_audio_midiin->core_audio_client)); } if(core_audio_client != NULL){ g_object_ref(G_OBJECT(core_audio_client)); } core_audio_midiin->core_audio_client = (GObject *) core_audio_client; } break; case PROP_CORE_AUDIO_PORT: { AgsCoreAudioPort *core_audio_port; core_audio_port = (AgsCoreAudioPort *) g_value_get_object(value); if(g_list_find(core_audio_midiin->core_audio_port, core_audio_port) != NULL){ return; } if(core_audio_port != NULL){ g_object_ref(core_audio_port); core_audio_midiin->core_audio_port = g_list_append(core_audio_midiin->core_audio_port, core_audio_port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_midiin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, core_audio_midiin->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, core_audio_midiin->application_mutex); } break; case PROP_DEVICE: { g_value_set_string(value, core_audio_midiin->card_uri); } break; case PROP_BUFFER: { g_value_set_pointer(value, core_audio_midiin->buffer); } break; case PROP_BPM: { g_value_set_double(value, core_audio_midiin->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, core_audio_midiin->delay_factor); } break; case PROP_CORE_AUDIO_CLIENT: { g_value_set_object(value, core_audio_midiin->core_audio_client); } break; case PROP_CORE_AUDIO_PORT: { g_value_set_pointer(value, g_list_copy(core_audio_midiin->core_audio_port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_midiin_dispose(GObject *gobject) { AgsCoreAudioMidiin *core_audio_midiin; GList *list; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(gobject); /* audio */ if(core_audio_midiin->audio != NULL){ list = core_audio_midiin->audio; while(list != NULL){ g_object_set(list->data, "sequencer", NULL, NULL); list = list->next; } g_list_free_full(core_audio_midiin->audio, g_object_unref); core_audio_midiin->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_core_audio_midiin_parent_class)->dispose(gobject); } void ags_core_audio_midiin_finalize(GObject *gobject) { AgsCoreAudioMidiin *core_audio_midiin; AgsMutexManager *mutex_manager; GList *list; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(gobject); /* remove core_audio_midiin mutex */ pthread_mutex_lock(core_audio_midiin->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(core_audio_midiin->application_mutex); /* free output buffer */ if(core_audio_midiin->buffer[0] != NULL){ free(core_audio_midiin->buffer[0]); } if(core_audio_midiin->buffer[1] != NULL){ free(core_audio_midiin->buffer[1]); } if(core_audio_midiin->buffer[2] != NULL){ free(core_audio_midiin->buffer[2]); } if(core_audio_midiin->buffer[3] != NULL){ free(core_audio_midiin->buffer[3]); } /* free buffer array */ free(core_audio_midiin->buffer); /* audio */ if(core_audio_midiin->audio != NULL){ list = core_audio_midiin->audio; while(list != NULL){ g_object_set(list->data, "sequencer", NULL, NULL); list = list->next; } g_list_free_full(core_audio_midiin->audio, g_object_unref); } pthread_mutex_destroy(core_audio_midiin->mutex); free(core_audio_midiin->mutex); pthread_mutexattr_destroy(core_audio_midiin->mutexattr); free(core_audio_midiin->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_core_audio_midiin_parent_class)->finalize(gobject); } void ags_core_audio_midiin_connect(AgsConnectable *connectable) { AgsCoreAudioMidiin *core_audio_midiin; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *mutex; pthread_mutexattr_t attr; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(connectable); /* create core_audio_midiin mutex */ //FIXME:JK: memory leak pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, &attr); /* insert mutex */ pthread_mutex_lock(core_audio_midiin->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_insert(mutex_manager, (GObject *) core_audio_midiin, mutex); pthread_mutex_unlock(core_audio_midiin->application_mutex); /* */ list = core_audio_midiin->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_core_audio_midiin_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_core_audio_midiin_switch_buffer_flag: * @core_audio_midiin: an #AgsCoreAudioMidiin * * The buffer flag indicates the currently recorded buffer. * * Since: 1.0.0 */ void ags_core_audio_midiin_switch_buffer_flag(AgsCoreAudioMidiin *core_audio_midiin) { if((AGS_CORE_AUDIO_MIDIIN_BUFFER0 & (core_audio_midiin->flags)) != 0){ core_audio_midiin->flags &= (~AGS_CORE_AUDIO_MIDIIN_BUFFER0); core_audio_midiin->flags |= AGS_CORE_AUDIO_MIDIIN_BUFFER1; /* clear buffer */ if(core_audio_midiin->buffer[3] != NULL){ free(core_audio_midiin->buffer[3]); } core_audio_midiin->buffer[3] = NULL; core_audio_midiin->buffer_size[3] = 0; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER1 & (core_audio_midiin->flags)) != 0){ core_audio_midiin->flags &= (~AGS_CORE_AUDIO_MIDIIN_BUFFER1); core_audio_midiin->flags |= AGS_CORE_AUDIO_MIDIIN_BUFFER2; /* clear buffer */ if(core_audio_midiin->buffer[0] != NULL){ free(core_audio_midiin->buffer[0]); } core_audio_midiin->buffer[0] = NULL; core_audio_midiin->buffer_size[0] = 0; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER2 & (core_audio_midiin->flags)) != 0){ core_audio_midiin->flags &= (~AGS_CORE_AUDIO_MIDIIN_BUFFER2); core_audio_midiin->flags |= AGS_CORE_AUDIO_MIDIIN_BUFFER3; /* clear buffer */ if(core_audio_midiin->buffer[1] != NULL){ free(core_audio_midiin->buffer[1]); } core_audio_midiin->buffer[1] = NULL; core_audio_midiin->buffer_size[1] = 0; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER3 & (core_audio_midiin->flags)) != 0){ core_audio_midiin->flags &= (~AGS_CORE_AUDIO_MIDIIN_BUFFER3); core_audio_midiin->flags |= AGS_CORE_AUDIO_MIDIIN_BUFFER0; /* clear buffer */ if(core_audio_midiin->buffer[2] != NULL){ free(core_audio_midiin->buffer[2]); } core_audio_midiin->buffer[2] = NULL; core_audio_midiin->buffer_size[2] = 0; } } void ags_core_audio_midiin_set_application_context(AgsSequencer *sequencer, AgsApplicationContext *application_context) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); core_audio_midiin->application_context = (GObject *) application_context; } AgsApplicationContext* ags_core_audio_midiin_get_application_context(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); return((AgsApplicationContext *) core_audio_midiin->application_context); } void ags_core_audio_midiin_set_application_mutex(AgsSequencer *sequencer, pthread_mutex_t *application_mutex) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); core_audio_midiin->application_mutex = application_mutex; } pthread_mutex_t* ags_core_audio_midiin_get_application_mutex(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); return(core_audio_midiin->application_mutex); } void ags_core_audio_midiin_set_device(AgsSequencer *sequencer, gchar *device) { AgsCoreAudioMidiin *core_audio_midiin; GList *core_audio_port, *core_audio_port_start; gchar *str; int ret; guint nth_card; guint i; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); if(core_audio_midiin->card_uri == device || !g_ascii_strcasecmp(core_audio_midiin->card_uri, device)){ return; } if(!g_str_has_prefix(device, "ags-jack-midiin-")){ g_warning("invalid core audio device prefix"); return; } ret = sscanf(device, "ags-jack-midiin-%u", &nth_card); if(ret != 1){ g_warning("invalid core audio device specifier"); return; } if(core_audio_midiin->card_uri != NULL){ g_free(core_audio_midiin->card_uri); } core_audio_midiin->card_uri = g_strdup(device); /* apply name to port */ core_audio_port_start = core_audio_port = g_list_copy(core_audio_midiin->core_audio_port); str = g_strdup_printf("ags-sequencer%d", nth_card); g_object_set(core_audio_port->data, "port-name", str, NULL); g_free(str); g_list_free(core_audio_port_start); } gchar* ags_core_audio_midiin_get_device(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); return(core_audio_midiin->card_uri); } void ags_core_audio_midiin_list_cards(AgsSequencer *sequencer, GList **card_id, GList **card_name) { AgsCoreAudioMidiin *core_audio_midiin; AgsApplicationContext *application_context; GList *list, *list_start; pthread_mutex_t *application_mutex; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); application_context = (AgsApplicationContext *) core_audio_midiin->application_context; if(application_context == NULL){ return; } application_mutex = core_audio_midiin->application_mutex; if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } pthread_mutex_lock(application_mutex); list_start = list = ags_sound_provider_get_sequencer(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(AGS_IS_CORE_AUDIO_MIDIIN(list->data)){ if(card_id != NULL){ *card_id = g_list_prepend(*card_id, g_strdup(AGS_CORE_AUDIO_MIDIIN(list->data)->card_uri)); } if(card_name != NULL){ if(AGS_CORE_AUDIO_MIDIIN(list->data)->core_audio_client != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(AGS_CORE_AUDIO_CLIENT(AGS_CORE_AUDIO_MIDIIN(list->data)->core_audio_client)->name)); }else{ *card_name = g_list_prepend(*card_name, g_strdup("(null)")); g_warning("ags_core_audio_midiin_list_cards() - core audio client not connected (null)"); } } } list = list->next; } pthread_mutex_unlock(application_mutex); if(card_id != NULL && *card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL && *card_name != NULL){ *card_name = g_list_reverse(*card_name); } } gboolean ags_core_audio_midiin_is_starting(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); return(((AGS_CORE_AUDIO_MIDIIN_START_RECORD & (core_audio_midiin->flags)) != 0) ? TRUE: FALSE); } gboolean ags_core_audio_midiin_is_recording(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); return(((AGS_CORE_AUDIO_MIDIIN_RECORD & (core_audio_midiin->flags)) != 0) ? TRUE: FALSE); } void ags_core_audio_midiin_port_init(AgsSequencer *sequencer, GError **error) { AgsCoreAudioMidiin *core_audio_midiin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *mutex; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_midiin); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); /* prepare for record */ core_audio_midiin->flags |= (AGS_CORE_AUDIO_MIDIIN_BUFFER3 | AGS_CORE_AUDIO_MIDIIN_START_RECORD | AGS_CORE_AUDIO_MIDIIN_RECORD | AGS_CORE_AUDIO_MIDIIN_NONBLOCKING); core_audio_midiin->note_offset = 0; /* port setup */ //TODO:JK: implement me /* */ core_audio_midiin->tact_counter = 0.0; core_audio_midiin->delay_counter = 0.0; core_audio_midiin->tic_counter = 0; core_audio_midiin->flags |= (AGS_CORE_AUDIO_MIDIIN_INITIALIZED | AGS_CORE_AUDIO_MIDIIN_START_RECORD | AGS_CORE_AUDIO_MIDIIN_RECORD); g_atomic_int_and(&(core_audio_midiin->sync_flags), (~(AGS_CORE_AUDIO_MIDIIN_PASS_THROUGH))); g_atomic_int_or(&(core_audio_midiin->sync_flags), AGS_CORE_AUDIO_MIDIIN_INITIAL_CALLBACK); pthread_mutex_unlock(mutex); } void ags_core_audio_midiin_port_record(AgsSequencer *sequencer, GError **error) { AgsCoreAudioClient *core_audio_client; AgsCoreAudioPort *core_audio_port; AgsCoreAudioMidiin *core_audio_midiin; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; gboolean core_audio_client_activated; gboolean do_sync; pthread_mutex_t *mutex; pthread_mutex_t *client_mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); /* */ application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); task_thread = (AgsTaskThread *) application_context->task_thread; mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_midiin); pthread_mutex_unlock(application_context->mutex); /* client */ pthread_mutex_lock(mutex); core_audio_client = (AgsCoreAudioClient *) core_audio_midiin->core_audio_client; pthread_mutex_unlock(mutex); /* do record */ pthread_mutex_lock(mutex); core_audio_midiin->flags &= (~AGS_CORE_AUDIO_MIDIIN_START_RECORD); if((AGS_CORE_AUDIO_MIDIIN_INITIALIZED & (core_audio_midiin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } callback_mutex = core_audio_midiin->callback_mutex; callback_finish_mutex = core_audio_midiin->callback_finish_mutex; pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_context->mutex); client_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_client); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(client_mutex); core_audio_client_activated = ((AGS_CORE_AUDIO_CLIENT_ACTIVATED & (core_audio_client->flags)) != 0) ? TRUE: FALSE; pthread_mutex_unlock(client_mutex); do_sync = FALSE; if(core_audio_client_activated){ if((AGS_CORE_AUDIO_MIDIIN_INITIAL_CALLBACK & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) == 0){ if((AGS_CORE_AUDIO_MIDIIN_DO_SYNC & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) != 0){ g_atomic_int_and(&(core_audio_midiin->sync_flags), (~AGS_CORE_AUDIO_MIDIIN_DO_SYNC)); do_sync = TRUE; /* signal client - wait callback */ pthread_mutex_lock(callback_mutex); g_atomic_int_and(&(core_audio_midiin->sync_flags), (~AGS_CORE_AUDIO_MIDIIN_CALLBACK_WAIT)); if((AGS_CORE_AUDIO_MIDIIN_CALLBACK_DONE & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) == 0){ pthread_cond_signal(core_audio_midiin->callback_cond); } pthread_mutex_unlock(callback_mutex); } }else{ g_atomic_int_and(&(core_audio_midiin->sync_flags), (~AGS_CORE_AUDIO_MIDIIN_DO_SYNC)); g_atomic_int_or(&(core_audio_midiin->sync_flags), (AGS_CORE_AUDIO_MIDIIN_CALLBACK_WAIT | AGS_CORE_AUDIO_MIDIIN_CALLBACK_DONE)); g_atomic_int_or(&(core_audio_midiin->sync_flags), (AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_WAIT | AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_DONE)); g_atomic_int_and(&(core_audio_midiin->sync_flags), (~AGS_CORE_AUDIO_MIDIIN_INITIAL_CALLBACK)); } } /* implied wait - callback finish wait */ if(do_sync){ pthread_mutex_lock(callback_finish_mutex); if((AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) != 0){ g_atomic_int_and(&(core_audio_midiin->sync_flags), (~AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_DONE)); while((AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) == 0 && (AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) != 0){ pthread_cond_wait(core_audio_midiin->callback_finish_cond, core_audio_midiin->callback_finish_mutex); } } pthread_mutex_unlock(callback_finish_mutex); g_atomic_int_or(&(core_audio_midiin->sync_flags), (AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_WAIT | AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_DONE)); } if(task_thread != NULL){ AgsTicDevice *tic_device; AgsSwitchBufferFlag *switch_buffer_flag; GList *task; task = NULL; /* tic sequencer */ tic_device = ags_tic_device_new((GObject *) core_audio_midiin); task = g_list_append(task, tic_device); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) core_audio_midiin); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); }else{ /* tic */ ags_sequencer_tic(AGS_SEQUENCER(core_audio_midiin)); /* reset - switch buffer flags */ ags_core_audio_midiin_switch_buffer_flag(core_audio_midiin); } } void ags_core_audio_midiin_port_free(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_midiin); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(mutex); if((AGS_CORE_AUDIO_MIDIIN_INITIALIZED & (core_audio_midiin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } callback_mutex = core_audio_midiin->callback_mutex; callback_finish_mutex = core_audio_midiin->callback_finish_mutex; core_audio_midiin->flags &= (~(AGS_CORE_AUDIO_MIDIIN_BUFFER0 | AGS_CORE_AUDIO_MIDIIN_BUFFER1 | AGS_CORE_AUDIO_MIDIIN_BUFFER2 | AGS_CORE_AUDIO_MIDIIN_BUFFER3 | AGS_CORE_AUDIO_MIDIIN_RECORD)); g_atomic_int_or(&(core_audio_midiin->sync_flags), AGS_CORE_AUDIO_MIDIIN_PASS_THROUGH); g_atomic_int_and(&(core_audio_midiin->sync_flags), (~AGS_CORE_AUDIO_MIDIIN_INITIAL_CALLBACK)); pthread_mutex_unlock(mutex); /* signal callback */ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(core_audio_midiin->sync_flags), AGS_CORE_AUDIO_MIDIIN_CALLBACK_DONE); if((AGS_CORE_AUDIO_MIDIIN_CALLBACK_WAIT & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) != 0){ pthread_cond_signal(core_audio_midiin->callback_cond); } pthread_mutex_unlock(callback_mutex); /* signal thread */ pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(core_audio_midiin->sync_flags), AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_DONE); if((AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) != 0){ pthread_cond_signal(core_audio_midiin->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); /* */ pthread_mutex_lock(mutex); if(core_audio_midiin->buffer[1] != NULL){ free(core_audio_midiin->buffer[1]); core_audio_midiin->buffer_size[1] = 0; } if(core_audio_midiin->buffer[2] != NULL){ free(core_audio_midiin->buffer[2]); core_audio_midiin->buffer_size[2] = 0; } if(core_audio_midiin->buffer[3] != NULL){ free(core_audio_midiin->buffer[3]); core_audio_midiin->buffer_size[3] = 0; } if(core_audio_midiin->buffer[0] != NULL){ free(core_audio_midiin->buffer[0]); core_audio_midiin->buffer_size[0] = 0; } pthread_mutex_unlock(mutex); } void ags_core_audio_midiin_tic(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; gdouble delay; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); /* determine if attack should be switched */ delay = core_audio_midiin->delay; if((guint) core_audio_midiin->delay_counter + 1 >= (guint) delay){ ags_sequencer_set_note_offset(sequencer, core_audio_midiin->note_offset_absolute + 1); /* delay */ ags_sequencer_offset_changed(sequencer, core_audio_midiin->note_offset); /* reset - delay counter */ core_audio_midiin->delay_counter = 0.0; core_audio_midiin->tact_counter += 1.0; }else{ core_audio_midiin->delay_counter += 1.0; } } void ags_core_audio_midiin_offset_changed(AgsSequencer *sequencer, guint note_offset) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); core_audio_midiin->tic_counter += 1; if(core_audio_midiin->tic_counter == AGS_SEQUENCER_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ core_audio_midiin->tic_counter = 0; } } void ags_core_audio_midiin_set_bpm(AgsSequencer *sequencer, gdouble bpm) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); core_audio_midiin->bpm = bpm; } gdouble ags_core_audio_midiin_get_bpm(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); return(core_audio_midiin->bpm); } void ags_core_audio_midiin_set_delay_factor(AgsSequencer *sequencer, gdouble delay_factor) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); core_audio_midiin->delay_factor = delay_factor; } gdouble ags_core_audio_midiin_get_delay_factor(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); return(core_audio_midiin->delay_factor); } void* ags_core_audio_midiin_get_buffer(AgsSequencer *sequencer, guint *buffer_length) { AgsCoreAudioMidiin *core_audio_midiin; char *buffer; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); /* get buffer */ if((AGS_CORE_AUDIO_MIDIIN_BUFFER0 & (core_audio_midiin->flags)) != 0){ buffer = core_audio_midiin->buffer[0]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER1 & (core_audio_midiin->flags)) != 0){ buffer = core_audio_midiin->buffer[1]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER2 & (core_audio_midiin->flags)) != 0){ buffer = core_audio_midiin->buffer[2]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER3 & (core_audio_midiin->flags)) != 0){ buffer = core_audio_midiin->buffer[3]; }else{ buffer = NULL; } /* return the buffer's length */ if(buffer_length != NULL){ if((AGS_CORE_AUDIO_MIDIIN_BUFFER0 & (core_audio_midiin->flags)) != 0){ *buffer_length = core_audio_midiin->buffer_size[0]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER1 & (core_audio_midiin->flags)) != 0){ *buffer_length = core_audio_midiin->buffer_size[1]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER2 & (core_audio_midiin->flags)) != 0){ *buffer_length = core_audio_midiin->buffer_size[2]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER3 & (core_audio_midiin->flags)) != 0){ *buffer_length = core_audio_midiin->buffer_size[3]; }else{ *buffer_length = 0; } } return(buffer); } void* ags_core_audio_midiin_get_next_buffer(AgsSequencer *sequencer, guint *buffer_length) { AgsCoreAudioMidiin *core_audio_midiin; unsigned char *buffer; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); /* get buffer */ if((AGS_CORE_AUDIO_MIDIIN_BUFFER0 & (core_audio_midiin->flags)) != 0){ buffer = core_audio_midiin->buffer[1]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER1 & (core_audio_midiin->flags)) != 0){ buffer = core_audio_midiin->buffer[2]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER2 & (core_audio_midiin->flags)) != 0){ buffer = core_audio_midiin->buffer[3]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER3 & (core_audio_midiin->flags)) != 0){ buffer = core_audio_midiin->buffer[0]; }else{ buffer = NULL; } /* return the buffer's length */ if(buffer_length != NULL){ if((AGS_CORE_AUDIO_MIDIIN_BUFFER0 & (core_audio_midiin->flags)) != 0){ *buffer_length = core_audio_midiin->buffer_size[1]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER1 & (core_audio_midiin->flags)) != 0){ *buffer_length = core_audio_midiin->buffer_size[2]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER2 & (core_audio_midiin->flags)) != 0){ *buffer_length = core_audio_midiin->buffer_size[3]; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER3 & (core_audio_midiin->flags)) != 0){ *buffer_length = core_audio_midiin->buffer_size[0]; }else{ *buffer_length = 0; } } return(buffer); } void ags_core_audio_midiin_set_note_offset(AgsSequencer *sequencer, guint note_offset) { AGS_CORE_AUDIO_MIDIIN(sequencer)->note_offset = note_offset; } guint ags_core_audio_midiin_get_note_offset(AgsSequencer *sequencer) { return(AGS_CORE_AUDIO_MIDIIN(sequencer)->note_offset); } void ags_core_audio_midiin_set_audio(AgsSequencer *sequencer, GList *audio) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); core_audio_midiin->audio = audio; } GList* ags_core_audio_midiin_get_audio(AgsSequencer *sequencer) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = AGS_CORE_AUDIO_MIDIIN(sequencer); return(core_audio_midiin->audio); } /** * ags_core_audio_midiin_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsCoreAudioMidiin, refering to @application_context. * * Returns: a new #AgsCoreAudioMidiin * * Since: 1.0.0 */ AgsCoreAudioMidiin* ags_core_audio_midiin_new(GObject *application_context) { AgsCoreAudioMidiin *core_audio_midiin; core_audio_midiin = (AgsCoreAudioMidiin *) g_object_new(AGS_TYPE_CORE_AUDIO_MIDIIN, "application-context", application_context, NULL); return(core_audio_midiin); } gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_devout.h0000644000175000017500000001447513247044247021312 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CORE_AUDIO_DEVOUT_H__ #define __AGS_CORE_AUDIO_DEVOUT_H__ #include #include #include #define AGS_TYPE_CORE_AUDIO_DEVOUT (ags_core_audio_devout_get_type()) #define AGS_CORE_AUDIO_DEVOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CORE_AUDIO_DEVOUT, AgsCoreAudioDevout)) #define AGS_CORE_AUDIO_DEVOUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_CORE_AUDIO_DEVOUT, AgsCoreAudioDevout)) #define AGS_IS_CORE_AUDIO_DEVOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CORE_AUDIO_DEVOUT)) #define AGS_IS_CORE_AUDIO_DEVOUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CORE_AUDIO_DEVOUT)) #define AGS_CORE_AUDIO_DEVOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_CORE_AUDIO_DEVOUT, AgsCoreAudioDevoutClass)) typedef struct _AgsCoreAudioDevout AgsCoreAudioDevout; typedef struct _AgsCoreAudioDevoutClass AgsCoreAudioDevoutClass; /** * AgsCoreAudioDevoutFlags: * @AGS_CORE_AUDIO_DEVOUT_BUFFER0: ring-buffer 0 * @AGS_CORE_AUDIO_DEVOUT_BUFFER1: ring-buffer 1 * @AGS_CORE_AUDIO_DEVOUT_BUFFER2: ring-buffer 2 * @AGS_CORE_AUDIO_DEVOUT_BUFFER3: ring-buffer 3 * @AGS_CORE_AUDIO_DEVOUT_BUFFER4: ring-buffer 4 * @AGS_CORE_AUDIO_DEVOUT_BUFFER5: ring-buffer 5 * @AGS_CORE_AUDIO_DEVOUT_BUFFER6: ring-buffer 6 * @AGS_CORE_AUDIO_DEVOUT_BUFFER7: ring-buffer 7 * @AGS_CORE_AUDIO_DEVOUT_ATTACK_FIRST: use first attack, instead of second one * @AGS_CORE_AUDIO_DEVOUT_PLAY: do playback * @AGS_CORE_AUDIO_DEVOUT_SHUTDOWN: stop playback * @AGS_CORE_AUDIO_DEVOUT_START_PLAY: playback starting * @AGS_CORE_AUDIO_DEVOUT_NONBLOCKING: do non-blocking calls * @AGS_CORE_AUDIO_DEVOUT_INITIALIZED: the soundcard was initialized * * Enum values to control the behavior or indicate internal state of #AgsCoreAudioDevout by * enable/disable as flags. */ typedef enum { AGS_CORE_AUDIO_DEVOUT_BUFFER0 = 1, AGS_CORE_AUDIO_DEVOUT_BUFFER1 = 1 << 1, AGS_CORE_AUDIO_DEVOUT_BUFFER2 = 1 << 2, AGS_CORE_AUDIO_DEVOUT_BUFFER3 = 1 << 3, AGS_CORE_AUDIO_DEVOUT_BUFFER4 = 1 << 4, AGS_CORE_AUDIO_DEVOUT_BUFFER5 = 1 << 5, AGS_CORE_AUDIO_DEVOUT_BUFFER6 = 1 << 6, AGS_CORE_AUDIO_DEVOUT_BUFFER7 = 1 << 7, AGS_CORE_AUDIO_DEVOUT_ATTACK_FIRST = 1 << 8, AGS_CORE_AUDIO_DEVOUT_PLAY = 1 << 9, AGS_CORE_AUDIO_DEVOUT_SHUTDOWN = 1 << 10, AGS_CORE_AUDIO_DEVOUT_START_PLAY = 1 << 11, AGS_CORE_AUDIO_DEVOUT_NONBLOCKING = 1 << 12, AGS_CORE_AUDIO_DEVOUT_INITIALIZED = 1 << 13, }AgsCoreAudioDevoutFlags; /** * AgsCoreAudioDevoutSyncFlags: * @AGS_CORE_AUDIO_DEVOUT_PASS_THROUGH: do not sync * @AGS_CORE_AUDIO_DEVOUT_INITIAL_CALLBACK: initial callback * @AGS_CORE_AUDIO_DEVOUT_CALLBACK_WAIT: sync wait, soundcard conditional lock * @AGS_CORE_AUDIO_DEVOUT_CALLBACK_DONE: sync done, soundcard conditional lock * @AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_WAIT: sync wait, client conditional lock * @AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_DONE: sync done, client conditional lock * * Enum values to control the synchronization between soundcard and client. */ typedef enum{ AGS_CORE_AUDIO_DEVOUT_PASS_THROUGH = 1, AGS_CORE_AUDIO_DEVOUT_INITIAL_CALLBACK = 1 << 1, AGS_CORE_AUDIO_DEVOUT_CALLBACK_WAIT = 1 << 2, AGS_CORE_AUDIO_DEVOUT_CALLBACK_DONE = 1 << 3, AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_WAIT = 1 << 4, AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_DONE = 1 << 5, }AgsCoreAudioDevoutSyncFlags; #define AGS_CORE_AUDIO_DEVOUT_ERROR (ags_core_audio_devout_error_quark()) typedef enum{ AGS_CORE_AUDIO_DEVOUT_ERROR_LOCKED_SOUNDCARD, }AgsCoreAudioDevoutError; struct _AgsCoreAudioDevout { GObject object; guint flags; volatile guint sync_flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; guint dsp_channels; guint pcm_channels; guint format; guint buffer_size; guint samplerate; void** buffer; double bpm; // beats per minute gdouble delay_factor; gdouble *delay; // count of tics within buffer size guint *attack; // where currently tic resides in the stream's offset, measured in 1/64 of bpm gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint note_offset_absolute; guint loop_left; guint loop_right; gboolean do_loop; guint loop_offset; gchar *card_uri; GObject *core_audio_client; gchar **port_name; GList *core_audio_port; pthread_mutex_t *callback_mutex; pthread_cond_t *callback_cond; pthread_mutex_t *callback_finish_mutex; pthread_cond_t *callback_finish_cond; GObject *application_context; pthread_mutex_t *application_mutex; GObject *notify_soundcard; GList *audio; }; struct _AgsCoreAudioDevoutClass { GObjectClass object; }; GType ags_core_audio_devout_get_type(); GQuark ags_core_audio_devout_error_quark(); void ags_core_audio_devout_switch_buffer_flag(AgsCoreAudioDevout *core_audio_devout); void ags_core_audio_devout_adjust_delay_and_attack(AgsCoreAudioDevout *core_audio_devout); void ags_core_audio_devout_realloc_buffer(AgsCoreAudioDevout *core_audio_devout); AgsCoreAudioDevout* ags_core_audio_devout_new(GObject *application_context); #endif /*__AGS_CORE_AUDIO_DEVOUT_H__*/ gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_midiin.h0000644000175000017500000001302413254220314021227 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CORE_AUDIO_MIDIIN_H__ #define __AGS_CORE_AUDIO_MIDIIN_H__ #include #include #include #define AGS_TYPE_CORE_AUDIO_MIDIIN (ags_core_audio_midiin_get_type()) #define AGS_CORE_AUDIO_MIDIIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CORE_AUDIO_MIDIIN, AgsCoreAudioMidiin)) #define AGS_CORE_AUDIO_MIDIIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_CORE_AUDIO_MIDIIN, AgsCoreAudioMidiin)) #define AGS_IS_CORE_AUDIO_MIDIIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CORE_AUDIO_MIDIIN)) #define AGS_IS_CORE_AUDIO_MIDIIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CORE_AUDIO_MIDIIN)) #define AGS_CORE_AUDIO_MIDIIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_CORE_AUDIO_MIDIIN, AgsCoreAudioMidiinClass)) #define AGS_CORE_AUDIO_MIDIIN_DEFAULT_BUFFER_SIZE (256) typedef struct _AgsCoreAudioMidiin AgsCoreAudioMidiin; typedef struct _AgsCoreAudioMidiinClass AgsCoreAudioMidiinClass; /** * AgsCoreAudioMidiinFlags: * @AGS_CORE_AUDIO_MIDIIN_BUFFER0: ring-buffer 0 * @AGS_CORE_AUDIO_MIDIIN_BUFFER1: ring-buffer 1 * @AGS_CORE_AUDIO_MIDIIN_BUFFER2: ring-buffer 2 * @AGS_CORE_AUDIO_MIDIIN_BUFFER3: ring-buffer 3 * @AGS_CORE_AUDIO_MIDIIN_ATTACK_FIRST: use first attack, instead of second one * @AGS_CORE_AUDIO_MIDIIN_RECORD: is recording * @AGS_CORE_AUDIO_MIDIIN_SHUTDOWN: stop recording * @AGS_CORE_AUDIO_MIDIIN_START_RECORD: just started recording * @AGS_CORE_AUDIO_MIDIIN_NONBLOCKING: do non-blocking calls * @AGS_CORE_AUDIO_MIDIIN_INITIALIZED: recording is initialized * * Enum values to control the behavior or indicate internal state of #AgsCoreAudioMidiin by * enable/disable as flags. */ typedef enum { AGS_CORE_AUDIO_MIDIIN_BUFFER0 = 1, AGS_CORE_AUDIO_MIDIIN_BUFFER1 = 1 << 1, AGS_CORE_AUDIO_MIDIIN_BUFFER2 = 1 << 2, AGS_CORE_AUDIO_MIDIIN_BUFFER3 = 1 << 3, AGS_CORE_AUDIO_MIDIIN_ATTACK_FIRST = 1 << 4, AGS_CORE_AUDIO_MIDIIN_RECORD = 1 << 5, AGS_CORE_AUDIO_MIDIIN_SHUTDOWN = 1 << 6, AGS_CORE_AUDIO_MIDIIN_START_RECORD = 1 << 7, AGS_CORE_AUDIO_MIDIIN_NONBLOCKING = 1 << 8, AGS_CORE_AUDIO_MIDIIN_INITIALIZED = 1 << 9, }AgsCoreAudioMidiinFlags; /** * AgsCoreAudioMidiinSyncFlags: * @AGS_CORE_AUDIO_MIDIIN_PASS_THROUGH: do not sync * @AGS_CORE_AUDIO_MIDIIN_INITIAL_CALLBACK: initial callback * @AGS_CORE_AUDIO_MIDIIN_CALLBACK_WAIT: sync wait, soundcard conditional lock * @AGS_CORE_AUDIO_MIDIIN_CALLBACK_DONE: sync done, soundcard conditional lock * @AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_WAIT: sync wait, client conditional lock * @AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_DONE: sync done, client conditional lock * * Enum values to control the synchronization between soundcard and client. */ typedef enum{ AGS_CORE_AUDIO_MIDIIN_PASS_THROUGH = 1, AGS_CORE_AUDIO_MIDIIN_INITIAL_CALLBACK = 1 << 1, AGS_CORE_AUDIO_MIDIIN_CALLBACK_WAIT = 1 << 2, AGS_CORE_AUDIO_MIDIIN_CALLBACK_DONE = 1 << 3, AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_WAIT = 1 << 4, AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_DONE = 1 << 5, AGS_CORE_AUDIO_MIDIIN_DO_SYNC = 1 << 6, }AgsCoreAudioMidiinSyncFlags; #define AGS_CORE_AUDIO_MIDIIN_ERROR (ags_core_audio_midiin_error_quark()) typedef enum{ AGS_CORE_AUDIO_MIDIIN_ERROR_LOCKED_SOUNDCARD, }AgsCoreAudioMidiinError; struct _AgsCoreAudioMidiin { GObject object; guint flags; volatile guint sync_flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; char **buffer; guint buffer_size[4]; double bpm; // beats per minute gdouble delay; gdouble delay_factor; guint latency; gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint note_offset_absolute; gchar *card_uri; GObject *core_audio_client; gchar **port_name; GList *core_audio_port; pthread_mutex_t *callback_mutex; pthread_cond_t *callback_cond; pthread_mutex_t *callback_finish_mutex; pthread_cond_t *callback_finish_cond; GObject *application_context; pthread_mutex_t *application_mutex; GList *audio; }; struct _AgsCoreAudioMidiinClass { GObjectClass object; }; GType ags_core_audio_midiin_get_type(); GQuark ags_core_audio_midiin_error_quark(); void ags_core_audio_midiin_switch_buffer_flag(AgsCoreAudioMidiin *core_audio_midiin); AgsCoreAudioMidiin* ags_core_audio_midiin_new(GObject *application_context); #endif /*__AGS_CORE_AUDIO_MIDIIN_H__*/ gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_client.h0000644000175000017500000000751513246707333021260 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CORE_AUDIO_CLIENT_H__ #define __AGS_CORE_AUDIO_CLIENT_H__ #include #include #include #ifdef AGS_WITH_CORE_AUDIO #include #include #include #include #endif #define AGS_TYPE_CORE_AUDIO_CLIENT (ags_core_audio_client_get_type()) #define AGS_CORE_AUDIO_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CORE_AUDIO_CLIENT, AgsCoreAudioClient)) #define AGS_CORE_AUDIO_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_CORE_AUDIO_CLIENT, AgsCoreAudioClient)) #define AGS_IS_CORE_AUDIO_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_CORE_AUDIO_CLIENT)) #define AGS_IS_CORE_AUDIO_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_CORE_AUDIO_CLIENT)) #define AGS_CORE_AUDIO_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_CORE_AUDIO_CLIENT, AgsCoreAudioClientClass)) typedef struct _AgsCoreAudioClient AgsCoreAudioClient; typedef struct _AgsCoreAudioClientClass AgsCoreAudioClientClass; /** * AgsCoreAudioClientFlags: * @AGS_CORE_AUDIO_CLIENT_CONNECTED: indicates the client was connected by calling #AgsConnectable::connect() * @AGS_CORE_AUDIO_CLIENT_ACTIVATED: the client was activated * @AGS_CORE_AUDIO_CLIENT_READY: the client is ready * * Enum values to control the behavior or indicate internal state of #AgsCoreAudioClient by * enable/disable as flags. */ typedef enum{ AGS_CORE_AUDIO_CLIENT_CONNECTED = 1, AGS_CORE_AUDIO_CLIENT_ACTIVATED = 1 << 1, AGS_CORE_AUDIO_CLIENT_READY = 1 << 2, }AgsCoreAudioClientFlags; struct _AgsCoreAudioClient { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; GObject *core_audio_server; gchar *uuid; gchar *name; #ifdef AGS_WITH_CORE_AUDIO AUGraph *graph; #else gpointer graph; #endif GList *device; GList *port; }; struct _AgsCoreAudioClientClass { GObjectClass object; }; GType ags_core_audio_client_get_type(); GList* ags_core_audio_client_find_uuid(GList *core_audio_client, gchar *client_uuid); GList* ags_core_audio_client_find(GList *core_audio_client, gchar *client_name); void ags_core_audio_client_open(AgsCoreAudioClient *core_audio_client, gchar *client_name); void ags_core_audio_client_add_device(AgsCoreAudioClient *core_audio_client, GObject *core_audio_device); void ags_core_audio_client_remove_device(AgsCoreAudioClient *core_audio_client, GObject *core_audio_device); void ags_core_audio_client_add_port(AgsCoreAudioClient *core_audio_client, GObject *core_audio_port); void ags_core_audio_client_remove_port(AgsCoreAudioClient *core_audio_client, GObject *core_audio_port); void ags_core_audio_client_activate(AgsCoreAudioClient *core_audio_client); void ags_core_audio_client_deactivate(AgsCoreAudioClient *core_audio_client); AgsCoreAudioClient* ags_core_audio_client_new(GObject *core_audio_server); #endif /*__AGS_CORE_AUDIO_CLIENT_H__*/ gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_port.c0000644000175000017500000012017413254220314020742 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef AGS_WITH_CORE_AUDIO #include #endif #include void ags_core_audio_port_class_init(AgsCoreAudioPortClass *core_audio_port); void ags_core_audio_port_connectable_interface_init(AgsConnectableInterface *connectable); void ags_core_audio_port_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager); void ags_core_audio_port_init(AgsCoreAudioPort *core_audio_port); void ags_core_audio_port_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_core_audio_port_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_core_audio_port_connect(AgsConnectable *connectable); void ags_core_audio_port_disconnect(AgsConnectable *connectable); void ags_core_audio_port_dispose(GObject *gobject); void ags_core_audio_port_finalize(GObject *gobject); #ifdef AGS_WITH_CORE_AUDIO OSStatus SetCurrentIOBufferFrameSize(AudioObjectID inDeviceID, UInt32 inIOBufferFrameSize); void* ags_core_audio_port_output_thread(void **data); OSStatus ags_core_audio_port_output_callback(void *in_user_data, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* in_time_stamp, UInt32 in_bus_number, UInt32 in_number_frames, AudioBufferList* io_data); void ags_core_audio_port_midi_notify_callback(const MIDINotification *message, void *ref_con); void ags_core_audio_port_midi_read_callback(const MIDIPacketList *pkt_list, void *ref_con, void *conn_ref_con); #endif /** * SECTION:ags_core_audio_port * @short_description: core audio resource. * @title: AgsCoreAudioPort * @section_id: * @include: ags/audio/core-audio/ags_core_audio_port.h * * The #AgsCoreAudioPort represents either a core audio sequencer or soundcard to communicate * with. */ enum{ PROP_0, PROP_CORE_AUDIO_CLIENT, PROP_CORE_AUDIO_DEVICE, PROP_PORT_NAME, }; static gpointer ags_core_audio_port_parent_class = NULL; const int ags_core_audio_port_endian_i = 1; #define is_bigendian() ( (*(char*)&ags_core_audio_port_endian_i) == 0 ) GType ags_core_audio_port_get_type() { static GType ags_type_core_audio_port = 0; if(!ags_type_core_audio_port){ static const GTypeInfo ags_core_audio_port_info = { sizeof (AgsCoreAudioPortClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_core_audio_port_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCoreAudioPort), 0, /* n_preallocs */ (GInstanceInitFunc) ags_core_audio_port_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_core_audio_port_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_core_audio_port = g_type_register_static(G_TYPE_OBJECT, "AgsCoreAudioPort", &ags_core_audio_port_info, 0); g_type_add_interface_static(ags_type_core_audio_port, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_core_audio_port); } void ags_core_audio_port_class_init(AgsCoreAudioPortClass *core_audio_port) { GObjectClass *gobject; GParamSpec *param_spec; ags_core_audio_port_parent_class = g_type_class_peek_parent(core_audio_port); /* GObjectClass */ gobject = (GObjectClass *) core_audio_port; gobject->set_property = ags_core_audio_port_set_property; gobject->get_property = ags_core_audio_port_get_property; gobject->dispose = ags_core_audio_port_dispose; gobject->finalize = ags_core_audio_port_finalize; /* properties */ /** * AgsCoreAudioPort:core-audio-client: * * The assigned #AgsCoreAudioClient. * * Since: 1.0.0 */ param_spec = g_param_spec_object("core-audio-client", i18n_pspec("assigned core audio client"), i18n_pspec("The assigned core audio client"), AGS_TYPE_CORE_AUDIO_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CORE_AUDIO_CLIENT, param_spec); /** * AgsCoreAudioPort:core-audio-device: * * The assigned #AgsCoreAudioDevout. * * Since: 1.0.0 */ param_spec = g_param_spec_object("core-audio-device", i18n_pspec("assigned core audio devout"), i18n_pspec("The assigned core audio devout"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CORE_AUDIO_DEVICE, param_spec); /** * AgsCoreAudioPort:port-name: * * The core audio soundcard indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("port-name", i18n_pspec("port name"), i18n_pspec("The port name"), "hw:0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT_NAME, param_spec); } void ags_core_audio_port_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_core_audio_port_connect; connectable->disconnect = ags_core_audio_port_disconnect; } void ags_core_audio_port_init(AgsCoreAudioPort *core_audio_port) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; guint samplerate; guint pcm_channels; guint buffer_size; guint format; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert port mutex */ core_audio_port->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); core_audio_port->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) core_audio_port, mutex); pthread_mutex_unlock(application_mutex); /* flags */ core_audio_port->flags = 0; /* */ core_audio_port->core_audio_client = NULL; core_audio_port->core_audio_device = NULL; core_audio_port->uuid = ags_id_generator_create_uuid(); core_audio_port->name = NULL; /* read config */ config = ags_config_get_instance(); samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; format = AGS_SOUNDCARD_DEFAULT_FORMAT; /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ format = g_ascii_strtoull(str, NULL, 10); free(str); } core_audio_port->buffer_size = buffer_size; core_audio_port->format = format; core_audio_port->pcm_channels = pcm_channels; core_audio_port->samplerate = samplerate; #ifdef AGS_WITH_CORE_AUDIO /* Audio */ core_audio_port->comp = NULL; memset(&(core_audio_port->desc), 0, sizeof(AudioComponentDescription)); memset(&(core_audio_port->data_format), 0, sizeof(AudioStreamBasicDescription)); size_t bytesPerSample = sizeof (AudioUnitSampleType); core_audio_port->data_format.mBitsPerChannel = 8 * bytesPerSample; core_audio_port->data_format.mBytesPerPacket = bytesPerSample; core_audio_port->data_format.mBytesPerFrame = bytesPerSample; core_audio_port->data_format.mFramesPerPacket = 1; core_audio_port->data_format.mChannelsPerFrame = pcm_channels; core_audio_port->data_format.mFormatID = kAudioFormatLinearPCM; core_audio_port->data_format.mFormatFlags = kAudioFormatFlagsAudioUnitCanonical; core_audio_port->data_format.mSampleRate = (float) samplerate; /* MIDI */ core_audio_port->midi_client = (MIDIClientRef *) malloc(sizeof(MIDIClientRef)); memset(core_audio_port->midi_client, 0, sizeof(MIDIClientRef)); core_audio_port->midi_port = (MIDIPortRef *) malloc(sizeof(MIDIPortRef)); memset(core_audio_port->midi_port, 0, sizeof(MIDIPortRef)); #else core_audio_port->comp = NULL; core_audio_port->desc = NULL; core_audio_port->data_format = NULL; core_audio_port->input = NULL; core_audio_port->midi_client = NULL; core_audio_port->midi_port = NULL; #endif core_audio_port->midi_port_number = 0; g_atomic_int_set(&(core_audio_port->is_empty), FALSE); g_atomic_int_set(&(core_audio_port->queued), 0); } void ags_core_audio_port_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCoreAudioPort *core_audio_port; core_audio_port = AGS_CORE_AUDIO_PORT(gobject); switch(prop_id){ case PROP_CORE_AUDIO_CLIENT: { AgsCoreAudioClient *core_audio_client; core_audio_client = (AgsCoreAudioClient *) g_value_get_object(value); if(core_audio_port->core_audio_client == (GObject *) core_audio_client){ return; } if(core_audio_port->core_audio_client != NULL){ g_object_unref(core_audio_port->core_audio_client); } if(core_audio_client != NULL){ g_object_ref(core_audio_client); } core_audio_port->core_audio_client = (GObject *) core_audio_client; } break; case PROP_CORE_AUDIO_DEVICE: { GObject *core_audio_device; core_audio_device = g_value_get_object(value); if(core_audio_port->core_audio_device == core_audio_device){ return; } if(core_audio_port->core_audio_device != NULL){ g_object_unref(core_audio_port->core_audio_device); } if(core_audio_device != NULL){ g_object_ref(core_audio_device); } core_audio_port->core_audio_device = (GObject *) core_audio_device; } break; case PROP_PORT_NAME: { gchar *port_name; port_name = g_value_get_string(value); if(core_audio_port->name == port_name || !g_ascii_strcasecmp(core_audio_port->name, port_name)){ return; } if(core_audio_port->name != NULL){ g_free(core_audio_port->name); } core_audio_port->name = port_name; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_port_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCoreAudioPort *core_audio_port; core_audio_port = AGS_CORE_AUDIO_PORT(gobject); switch(prop_id){ case PROP_CORE_AUDIO_CLIENT: { g_value_set_object(value, core_audio_port->core_audio_client); } break; case PROP_CORE_AUDIO_DEVICE: { g_value_set_object(value, core_audio_port->core_audio_device); } break; case PROP_PORT_NAME: { g_value_set_string(value, core_audio_port->name); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_port_connect(AgsConnectable *connectable) { AgsCoreAudioPort *core_audio_port; core_audio_port = AGS_CORE_AUDIO_PORT(connectable); if((AGS_CORE_AUDIO_PORT_CONNECTED & (core_audio_port->flags)) != 0){ return; } core_audio_port->flags |= AGS_CORE_AUDIO_PORT_CONNECTED; } void ags_core_audio_port_disconnect(AgsConnectable *connectable) { AgsCoreAudioPort *core_audio_port; core_audio_port = AGS_CORE_AUDIO_PORT(connectable); if((AGS_CORE_AUDIO_PORT_CONNECTED & (core_audio_port->flags)) == 0){ return; } core_audio_port->flags &= (~AGS_CORE_AUDIO_PORT_CONNECTED); } void ags_core_audio_port_dispose(GObject *gobject) { AgsCoreAudioPort *core_audio_port; core_audio_port = AGS_CORE_AUDIO_PORT(gobject); /* core audio client */ if(core_audio_port->core_audio_client != NULL){ g_object_unref(core_audio_port->core_audio_client); core_audio_port->core_audio_client = NULL; } /* core audio device */ if(core_audio_port->core_audio_device != NULL){ g_object_unref(core_audio_port->core_audio_device); core_audio_port->core_audio_device = NULL; } /* name */ g_free(core_audio_port->name); /* call parent */ G_OBJECT_CLASS(ags_core_audio_port_parent_class)->dispose(gobject); } void ags_core_audio_port_finalize(GObject *gobject) { AgsCoreAudioPort *core_audio_port; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; core_audio_port = AGS_CORE_AUDIO_PORT(gobject); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* core audio client */ if(core_audio_port->core_audio_client != NULL){ g_object_unref(core_audio_port->core_audio_client); } /* core audio device */ if(core_audio_port->core_audio_device != NULL){ g_object_unref(core_audio_port->core_audio_device); } /* name */ g_free(core_audio_port->name); if(core_audio_port->midi_client != NULL){ free(core_audio_port->midi_client); } if(core_audio_port->midi_port != NULL){ free(core_audio_port->midi_port); } pthread_mutex_destroy(core_audio_port->mutex); free(core_audio_port->mutex); pthread_mutexattr_destroy(core_audio_port->mutexattr); free(core_audio_port->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_core_audio_port_parent_class)->finalize(gobject); } /** * ags_core_audio_port_find: * @core_audio_port: a #GList * @port_name: the port name to find * * Finds next match of @port_name in @core_audio_port. * * Returns: a #GList or %NULL * * Since: 1.0.0 */ GList* ags_core_audio_port_find(GList *core_audio_port, gchar *port_name) { while(core_audio_port != NULL){ if(!g_ascii_strcasecmp(AGS_CORE_AUDIO_PORT(core_audio_port->data)->name, port_name)){ return(core_audio_port); } } return(NULL); } #ifdef AGS_WITH_CORE_AUDIO OSStatus SetCurrentIOBufferFrameSize(AudioObjectID inDeviceID, UInt32 inIOBufferFrameSize) { AudioObjectPropertyAddress theAddress = { kAudioDevicePropertyBufferFrameSize, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster }; return AudioObjectSetPropertyData(inDeviceID, &theAddress, 0, NULL, sizeof(UInt32), &inIOBufferFrameSize); } #endif /** * ags_core_audio_port_register: * @core_audio_port: the #AgsCoreAudioPort * @port_name: the name as string * @is_audio: if %TRUE interpreted as audio port * @is_midi: if %TRUE interpreted as midi port * @is_output: if %TRUE port is acting as output, otherwise as input * * Register a new core audio port and read uuid. Creates a new AgsSequencer or AgsSoundcard * object. * * Since: 1.0.0 */ void ags_core_audio_port_register(AgsCoreAudioPort *core_audio_port, gchar *port_name, gboolean is_audio, gboolean is_midi, gboolean is_output) { GList *list; gchar *name, *uuid; #ifdef AGS_WITH_CORE_AUDIO OSStatus retval; #endif if(!AGS_IS_CORE_AUDIO_PORT(core_audio_port) || port_name == NULL){ return; } if(core_audio_port->core_audio_client == NULL){ g_warning("ags_core_audio_port.c - no assigned AgsCoreAudioClient"); return; } if((AGS_CORE_AUDIO_PORT_REGISTERED & (core_audio_port->flags)) != 0){ return; } /* get core audio server and application context */ if(core_audio_port->core_audio_client == NULL || AGS_CORE_AUDIO_CLIENT(core_audio_port->core_audio_client)->core_audio_server == NULL){ return; } uuid = core_audio_port->uuid; name = core_audio_port->name; if(AGS_CORE_AUDIO_CLIENT(core_audio_port->core_audio_client)->graph == NULL){ return; } core_audio_port->name = g_strdup(port_name); /* create sequencer or soundcard */ if(is_output){ core_audio_port->flags |= AGS_CORE_AUDIO_PORT_IS_OUTPUT; }else{ core_audio_port->flags |= AGS_CORE_AUDIO_PORT_IS_INPUT; } if(is_audio){ core_audio_port->flags |= AGS_CORE_AUDIO_PORT_IS_AUDIO; if(is_output){ pthread_t *thread; void **arr; guint word_size; switch(core_audio_port->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_message("core audio - unsupported word size"); } #ifdef AGS_WITH_CORE_AUDIO core_audio_port->desc.componentType = kAudioUnitType_Output; core_audio_port->desc.componentSubType = kAudioUnitSubType_DefaultOutput; core_audio_port->desc.componentManufacturer = kAudioUnitManufacturer_Apple; core_audio_port->comp = AudioComponentFindNext(NULL, &(core_audio_port->desc)); if(core_audio_port->comp == NULL) { g_message("can't get output unit"); return; } retval = AudioComponentInstanceNew(core_audio_port->comp, &(core_audio_port->au_unit)); if(retval != noErr){ return; } retval = AudioUnitSetParameter(core_audio_port->au_unit, kHALOutputParam_Volume, kAudioUnitScope_Global, 0, 1.0f, 0); if(retval != noErr){ return; } core_audio_port->input.inputProc = ags_core_audio_port_output_callback; core_audio_port->input.inputProcRefCon = core_audio_port; retval = AudioUnitSetProperty(core_audio_port->au_unit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &(core_audio_port->input), sizeof(AURenderCallbackStruct)); if(retval != noErr){ return; } retval = AudioUnitSetProperty(core_audio_port->au_unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &(core_audio_port->data_format), sizeof(AudioStreamBasicDescription)); retval = AudioUnitSetProperty(core_audio_port->au_unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &(core_audio_port->data_format), sizeof(AudioStreamBasicDescription)); if(retval != noErr){ return; } SetCurrentIOBufferFrameSize(core_audio_port->au_unit, core_audio_port->buffer_size); retval = AudioUnitInitialize(core_audio_port->au_unit); if(retval != noErr){ return; } g_message("start audio unit"); AudioOutputUnitStart(core_audio_port->au_unit); #endif }else{ //NOTE:JK: not implemented } }else if(is_midi){ core_audio_port->flags |= AGS_CORE_AUDIO_PORT_IS_MIDI; if(is_output){ //NOTE:JK: not implemented }else{ #ifdef AGS_WITH_CORE_AUDIO MIDIEndpointRef endpoint; retval = MIDIClientCreate(CFSTR("Advanced Gtk+ Sequencer - Core MIDI to System Sounds Demo"), NULL, core_audio_port, core_audio_port->midi_client); if(retval != noErr){ return; } retval = MIDIInputPortCreate(*(core_audio_port->midi_client), CFSTR("Input port"), ags_core_audio_port_midi_read_callback, core_audio_port, core_audio_port->midi_port); if(retval != noErr){ return; } endpoint = MIDIGetSource(core_audio_port->midi_port_number); if(endpoint == 0){ return; } retval = MIDIPortConnectSource(*(core_audio_port->midi_port), endpoint, NULL); if(retval != noErr){ return; } #endif } } core_audio_port->flags |= AGS_CORE_AUDIO_PORT_REGISTERED; } void ags_core_audio_port_unregister(AgsCoreAudioPort *core_audio_port) { if(!AGS_IS_CORE_AUDIO_PORT(core_audio_port)){ return; } if((AGS_CORE_AUDIO_PORT_IS_AUDIO & (core_audio_port->flags)) != 0){ if((AGS_CORE_AUDIO_PORT_IS_OUTPUT & (core_audio_port->flags)) != 0){ //NOTE:JK: not implemented }else if((AGS_CORE_AUDIO_PORT_IS_INPUT & (core_audio_port->flags)) != 0){ } }else if((AGS_CORE_AUDIO_PORT_IS_MIDI & (core_audio_port->flags)) != 0){ if((AGS_CORE_AUDIO_PORT_IS_OUTPUT & (core_audio_port->flags)) != 0){ //NOTE:JK: not implemented }else if((AGS_CORE_AUDIO_PORT_IS_INPUT & (core_audio_port->flags)) != 0){ } } core_audio_port->flags &= (~AGS_CORE_AUDIO_PORT_REGISTERED); } #ifdef AGS_WITH_CORE_AUDIO void* ags_core_audio_port_output_thread(void **data) { AgsCoreAudioPort *core_audio_port; AudioQueueRef in_aq; AudioQueueBufferRef in_complete_aq_buffer; core_audio_port = data[0]; in_aq = data[1]; in_complete_aq_buffer = data[2]; g_atomic_int_set(&(core_audio_port->running), TRUE); while(g_atomic_int_get(&(core_audio_port->running))){ CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.10, TRUE); } pthread_exit(NULL); } OSStatus ags_core_audio_port_output_callback(void *in_user_data, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* in_time_stamp, UInt32 in_bus_number, UInt32 in_number_frames, AudioBufferList* io_data) { AgsCoreAudioPort *core_audio_port; AgsCoreAudioDevout *core_audio_devout; AgsAudioLoop *audio_loop; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; guint word_size; guint nth_buffer; guint copy_mode; guint count; guint i; gboolean no_event; gboolean empty_run; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutex_t *device_mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; core_audio_port = (AgsCoreAudioPort *) in_user_data; if(core_audio_port == NULL){ return(noErr); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); application_context = ags_application_context_get_instance(); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_port); pthread_mutex_unlock(application_mutex); if(g_atomic_int_get(&(core_audio_port->queued)) > 0){ g_warning("drop core audio output callback"); return(noErr); }else{ g_atomic_int_inc(&(core_audio_port->queued)); } /* * process audio */ /* */ pthread_mutex_lock(application_mutex); if(application_context != NULL){ audio_loop = (AgsAudioLoop *) application_context->main_loop; task_thread = (AgsTaskThread *) application_context->task_thread; }else{ audio_loop = NULL; task_thread = NULL; } pthread_mutex_unlock(application_mutex); /* interrupt GUI */ if(task_thread != NULL){ pthread_mutex_lock(task_thread->launch_mutex); } if(audio_loop != NULL){ pthread_mutex_lock(audio_loop->timing_mutex); g_atomic_int_set(&(audio_loop->time_spent), audio_loop->time_cycle); pthread_mutex_unlock(audio_loop->timing_mutex); // ags_main_loop_interrupt(AGS_MAIN_LOOP(audio_loop), // AGS_THREAD_SUSPEND_SIG, // 0, &time_spent); } if(task_thread != NULL){ pthread_mutex_unlock(task_thread->launch_mutex); } for(i = 0; i < core_audio_port->pcm_channels; i++){ ags_audio_buffer_util_clear_float32(io_data->mBuffers[i].mData, 1, core_audio_port->buffer_size); } if(audio_loop == NULL){ g_atomic_int_dec_and_test(&(core_audio_port->queued)); return(noErr); } /* */ pthread_mutex_lock(mutex); core_audio_devout = core_audio_port->core_audio_device; pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_mutex); device_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_devout); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(device_mutex); empty_run = FALSE; if(!ags_soundcard_is_playing(AGS_SOUNDCARD(core_audio_devout))){ empty_run = TRUE; } pthread_mutex_unlock(device_mutex); pthread_mutex_lock(mutex); switch(core_audio_port->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: empty_run = TRUE; } count = core_audio_port->pcm_channels * core_audio_port->buffer_size; pthread_mutex_unlock(mutex); pthread_mutex_lock(device_mutex); /* wait callback */ no_event = TRUE; if((AGS_CORE_AUDIO_DEVOUT_PASS_THROUGH & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) == 0){ callback_mutex = core_audio_devout->callback_mutex; pthread_mutex_unlock(device_mutex); /* give back computing time until ready */ pthread_mutex_lock(callback_mutex); if((AGS_CORE_AUDIO_DEVOUT_CALLBACK_DONE & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) == 0){ g_atomic_int_or(&(core_audio_devout->sync_flags), AGS_CORE_AUDIO_DEVOUT_CALLBACK_WAIT); while((AGS_CORE_AUDIO_DEVOUT_CALLBACK_DONE & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) == 0 && (AGS_CORE_AUDIO_DEVOUT_CALLBACK_WAIT & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) != 0){ pthread_cond_wait(core_audio_devout->callback_cond, callback_mutex); } g_atomic_int_and(&(core_audio_devout->sync_flags), (~(AGS_CORE_AUDIO_DEVOUT_CALLBACK_WAIT | AGS_CORE_AUDIO_DEVOUT_CALLBACK_DONE))); } pthread_mutex_unlock(callback_mutex); no_event = FALSE; pthread_mutex_lock(device_mutex); } /* get buffer */ if((AGS_CORE_AUDIO_DEVOUT_BUFFER0 & (core_audio_devout->flags)) != 0){ nth_buffer = 7; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER1 & (core_audio_devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER2 & (core_audio_devout->flags)) != 0){ nth_buffer = 1; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER3 & (core_audio_devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER4 & (core_audio_devout->flags)) != 0){ nth_buffer = 3; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER5 & (core_audio_devout->flags)) != 0){ nth_buffer = 4; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER6 & (core_audio_devout->flags)) != 0){ nth_buffer = 5; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER7 & (core_audio_devout->flags)) != 0){ nth_buffer = 6; }else{ empty_run = TRUE; } switch(core_audio_port->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: empty_run = TRUE; } /* get copy mode */ if(!empty_run){ g_atomic_int_set(&(core_audio_port->is_empty), FALSE); copy_mode = ags_audio_buffer_util_get_copy_mode(AGS_AUDIO_BUFFER_UTIL_FLOAT32, ags_audio_buffer_util_format_from_soundcard(core_audio_devout->format)); for(i = 0; i < core_audio_port->pcm_channels; i++){ ags_audio_buffer_util_copy_buffer_to_buffer(io_data->mBuffers[i].mData, 1, 0, core_audio_devout->buffer[nth_buffer], core_audio_port->pcm_channels, i, core_audio_port->buffer_size, copy_mode); } } /* signal finish */ if(!no_event){ callback_finish_mutex = core_audio_devout->callback_finish_mutex; pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(core_audio_devout->sync_flags), AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_DONE); if((AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) != 0){ pthread_cond_signal(core_audio_devout->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); } pthread_mutex_unlock(device_mutex); if(empty_run){ g_atomic_int_set(&(core_audio_port->is_empty), TRUE); } g_atomic_int_dec_and_test(&(core_audio_port->queued)); return(noErr); } void ags_core_audio_port_midi_notify_callback(const MIDINotification *message, void *ref_con) { //NOTE:JK: unused } void ags_core_audio_port_midi_read_callback(const MIDIPacketList *pkt_list, void *ref_con, void *conn_ref_con) { AgsCoreAudioPort *core_audio_port; AgsCoreAudioMidiin *core_audio_midiin; AgsAudioLoop *audio_loop; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; MIDIPacket *packet; guint nth_buffer; gint num_packets; gint i; gboolean no_event; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutex_t *device_mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; core_audio_port = (AgsCoreAudioPort *) ref_con; if(core_audio_port == NULL){ return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); application_context = ags_application_context_get_instance(); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_port); pthread_mutex_unlock(application_mutex); /* * process midi */ /* */ pthread_mutex_lock(application_mutex); if(application_context != NULL){ audio_loop = (AgsAudioLoop *) application_context->main_loop; task_thread = (AgsTaskThread *) application_context->task_thread; }else{ audio_loop = NULL; task_thread = NULL; } pthread_mutex_unlock(application_mutex); /* interrupt GUI */ if(task_thread != NULL){ pthread_mutex_lock(task_thread->launch_mutex); } if(audio_loop != NULL){ pthread_mutex_lock(audio_loop->timing_mutex); g_atomic_int_set(&(audio_loop->time_spent), audio_loop->time_cycle); pthread_mutex_unlock(audio_loop->timing_mutex); // ags_main_loop_interrupt(AGS_MAIN_LOOP(audio_loop), // AGS_THREAD_SUSPEND_SIG, // 0, &time_spent); } if(task_thread != NULL){ pthread_mutex_unlock(task_thread->launch_mutex); } /* */ pthread_mutex_lock(mutex); core_audio_midiin = core_audio_port->core_audio_device; pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_mutex); device_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_midiin); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(device_mutex); callback_mutex = core_audio_midiin->callback_mutex; callback_finish_mutex = core_audio_midiin->callback_finish_mutex; /* wait callback */ g_atomic_int_inc(&(core_audio_port->queued)); no_event = TRUE; if((AGS_CORE_AUDIO_MIDIIN_PASS_THROUGH & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) == 0){ pthread_mutex_unlock(device_mutex); /* force wait */ g_atomic_int_or(&(core_audio_midiin->sync_flags), AGS_CORE_AUDIO_MIDIIN_DO_SYNC); /* wait callback */ pthread_mutex_lock(callback_mutex); if((AGS_CORE_AUDIO_MIDIIN_CALLBACK_WAIT & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) != 0){ g_atomic_int_and(&(core_audio_midiin->sync_flags), (~AGS_CORE_AUDIO_MIDIIN_CALLBACK_DONE)); while((AGS_CORE_AUDIO_MIDIIN_CALLBACK_DONE & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) == 0 && (AGS_CORE_AUDIO_MIDIIN_CALLBACK_WAIT & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) != 0){ pthread_cond_wait(core_audio_midiin->callback_cond, core_audio_midiin->callback_mutex); } } pthread_mutex_unlock(callback_mutex); g_atomic_int_or(&(core_audio_midiin->sync_flags), (AGS_CORE_AUDIO_MIDIIN_CALLBACK_WAIT | AGS_CORE_AUDIO_MIDIIN_CALLBACK_DONE)); /* lock device */ pthread_mutex_lock(device_mutex); no_event = FALSE; }else{ g_atomic_int_set(&(core_audio_port->is_empty), TRUE); } /* get buffer */ if((AGS_CORE_AUDIO_MIDIIN_BUFFER0 & (core_audio_midiin->flags)) != 0){ nth_buffer = 1; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER1 & (core_audio_midiin->flags)) != 0){ nth_buffer = 2; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER2 & (core_audio_midiin->flags)) != 0){ nth_buffer = 3; }else if((AGS_CORE_AUDIO_MIDIIN_BUFFER3 & (core_audio_midiin->flags)) != 0){ nth_buffer = 0; } packet = &pkt_list->packet[0]; num_packets = pkt_list->numPackets; for(i = 0; i < num_packets; i++){ guint length; length = packet->length; if(length == 0){ packet = MIDIPacketNext(packet); continue; } if(ceil((core_audio_midiin->buffer_size[nth_buffer] + length) / 4096.0) > ceil(core_audio_midiin->buffer_size[nth_buffer] / 4096.0)){ if(core_audio_midiin->buffer[nth_buffer] == NULL){ core_audio_midiin->buffer[nth_buffer] = malloc(4096 * sizeof(char)); }else{ core_audio_midiin->buffer[nth_buffer] = realloc(core_audio_midiin->buffer[nth_buffer], (ceil(core_audio_midiin->buffer_size[nth_buffer] / 4096.0) * 4096 + 4096) * sizeof(char)); } } memcpy(&(core_audio_midiin->buffer[nth_buffer][core_audio_midiin->buffer_size[nth_buffer]]), packet->data, length); core_audio_midiin->buffer_size[nth_buffer] += length; packet = MIDIPacketNext(packet); } /* signal finish */ if(!no_event){ pthread_mutex_unlock(device_mutex); /* signal client - wait callback finish */ pthread_mutex_lock(callback_finish_mutex); g_atomic_int_and(&(core_audio_midiin->sync_flags), (~AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_WAIT)); if((AGS_CORE_AUDIO_MIDIIN_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(core_audio_midiin->sync_flags)))) == 0){ pthread_cond_signal(core_audio_midiin->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); } g_atomic_int_dec_and_test(&(core_audio_port->queued)); } #endif void ags_core_audio_port_set_format(AgsCoreAudioPort *core_audio_port, guint format) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lock core audio port */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_port); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); core_audio_port->format = format; pthread_mutex_unlock(mutex); } void ags_core_audio_port_set_samplerate(AgsCoreAudioPort *core_audio_port, guint samplerate) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lock core audio port */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_port); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); #ifdef AGS_WITH_CORE_AUDIO core_audio_port->data_format.mSampleRate = (float) samplerate; #endif core_audio_port->samplerate = samplerate; pthread_mutex_unlock(mutex); } void ags_core_audio_port_set_buffer_size(AgsCoreAudioPort *core_audio_port, guint buffer_size) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lock core audio port */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_port); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); #ifdef AGS_WITH_CORE_AUDIO SetCurrentIOBufferFrameSize(core_audio_port->au_unit, buffer_size); #endif core_audio_port->buffer_size = buffer_size; pthread_mutex_unlock(mutex); } void ags_core_audio_port_set_pcm_channels(AgsCoreAudioPort *core_audio_port, guint pcm_channels) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* lock core audio port */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_port); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(mutex); core_audio_port->pcm_channels = pcm_channels; #ifdef AGS_WITH_CORE_AUDIO core_audio_port->data_format.mChannelsPerFrame = pcm_channels; #endif pthread_mutex_unlock(mutex); } /** * ags_core_audio_port_new: * @core_audio_client: the #AgsCoreAudioClient assigned to * * Instantiate a new #AgsCoreAudioPort. * * Returns: the new #AgsCoreAudioPort * * Since: 1.0.0 */ AgsCoreAudioPort* ags_core_audio_port_new(GObject *core_audio_client) { AgsCoreAudioPort *core_audio_port; core_audio_port = (AgsCoreAudioPort *) g_object_new(AGS_TYPE_CORE_AUDIO_PORT, "core-audio-client", core_audio_client, NULL); return(core_audio_port); } gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_devout.c0000644000175000017500000022626113247044247021303 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_core_audio_devout_class_init(AgsCoreAudioDevoutClass *core_audio_devout); void ags_core_audio_devout_connectable_interface_init(AgsConnectableInterface *connectable); void ags_core_audio_devout_soundcard_interface_init(AgsSoundcardInterface *soundcard); void ags_core_audio_devout_init(AgsCoreAudioDevout *core_audio_devout); void ags_core_audio_devout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_core_audio_devout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_core_audio_devout_disconnect(AgsConnectable *connectable); void ags_core_audio_devout_connect(AgsConnectable *connectable); void ags_core_audio_devout_dispose(GObject *gobject); void ags_core_audio_devout_finalize(GObject *gobject); void ags_core_audio_devout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* ags_core_audio_devout_get_application_context(AgsSoundcard *soundcard); void ags_core_audio_devout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_core_audio_devout_get_application_mutex(AgsSoundcard *soundcard); void ags_core_audio_devout_set_device(AgsSoundcard *soundcard, gchar *device); gchar* ags_core_audio_devout_get_device(AgsSoundcard *soundcard); void ags_core_audio_devout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void ags_core_audio_devout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void ags_core_audio_devout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name); void ags_core_audio_devout_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); gboolean ags_core_audio_devout_is_starting(AgsSoundcard *soundcard); gboolean ags_core_audio_devout_is_playing(AgsSoundcard *soundcard); gchar* ags_core_audio_devout_get_uptime(AgsSoundcard *soundcard); void ags_core_audio_devout_port_init(AgsSoundcard *soundcard, GError **error); void ags_core_audio_devout_port_play(AgsSoundcard *soundcard, GError **error); void ags_core_audio_devout_port_free(AgsSoundcard *soundcard); void ags_core_audio_devout_tic(AgsSoundcard *soundcard); void ags_core_audio_devout_offset_changed(AgsSoundcard *soundcard, guint note_offset); void ags_core_audio_devout_set_bpm(AgsSoundcard *soundcard, gdouble bpm); gdouble ags_core_audio_devout_get_bpm(AgsSoundcard *soundcard); void ags_core_audio_devout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor); gdouble ags_core_audio_devout_get_delay_factor(AgsSoundcard *soundcard); gdouble ags_core_audio_devout_get_absolute_delay(AgsSoundcard *soundcard); gdouble ags_core_audio_devout_get_delay(AgsSoundcard *soundcard); guint ags_core_audio_devout_get_attack(AgsSoundcard *soundcard); void* ags_core_audio_devout_get_buffer(AgsSoundcard *soundcard); void* ags_core_audio_devout_get_next_buffer(AgsSoundcard *soundcard); void* ags_core_audio_devout_get_prev_buffer(AgsSoundcard *soundcard); guint ags_core_audio_devout_get_delay_counter(AgsSoundcard *soundcard); void ags_core_audio_devout_set_note_offset(AgsSoundcard *soundcard, guint note_offset); guint ags_core_audio_devout_get_note_offset(AgsSoundcard *soundcard); void ags_core_audio_devout_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset); guint ags_core_audio_devout_get_note_offset_absolute(AgsSoundcard *soundcard); void ags_core_audio_devout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void ags_core_audio_devout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint ags_core_audio_devout_get_loop_offset(AgsSoundcard *soundcard); void ags_core_audio_devout_set_audio(AgsSoundcard *soundcard, GList *audio); GList* ags_core_audio_devout_get_audio(AgsSoundcard *soundcard); /** * SECTION:ags_core_audio_devout * @short_description: Output to soundcard * @title: AgsCoreAudioDevout * @section_id: * @include: ags/audio/core-audio/ags_core_audio_devout.h * * #AgsCoreAudioDevout represents a soundcard and supports output. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_DSP_CHANNELS, PROP_PCM_CHANNELS, PROP_FORMAT, PROP_BUFFER_SIZE, PROP_SAMPLERATE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, PROP_CORE_AUDIO_CLIENT, PROP_CORE_AUDIO_PORT, PROP_CHANNEL, }; enum{ LAST_SIGNAL, }; static gpointer ags_core_audio_devout_parent_class = NULL; static guint core_audio_devout_signals[LAST_SIGNAL]; GType ags_core_audio_devout_get_type (void) { static GType ags_type_core_audio_devout = 0; if(!ags_type_core_audio_devout){ static const GTypeInfo ags_core_audio_devout_info = { sizeof (AgsCoreAudioDevoutClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_core_audio_devout_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCoreAudioDevout), 0, /* n_preallocs */ (GInstanceInitFunc) ags_core_audio_devout_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_core_audio_devout_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_soundcard_interface_info = { (GInterfaceInitFunc) ags_core_audio_devout_soundcard_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_core_audio_devout = g_type_register_static(G_TYPE_OBJECT, "AgsCoreAudioDevout", &ags_core_audio_devout_info, 0); g_type_add_interface_static(ags_type_core_audio_devout, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_core_audio_devout, AGS_TYPE_SOUNDCARD, &ags_soundcard_interface_info); } return (ags_type_core_audio_devout); } void ags_core_audio_devout_class_init(AgsCoreAudioDevoutClass *core_audio_devout) { GObjectClass *gobject; GParamSpec *param_spec; ags_core_audio_devout_parent_class = g_type_class_peek_parent(core_audio_devout); /* GObjectClass */ gobject = (GObjectClass *) core_audio_devout; gobject->set_property = ags_core_audio_devout_set_property; gobject->get_property = ags_core_audio_devout_get_property; gobject->dispose = ags_core_audio_devout_dispose; gobject->finalize = ags_core_audio_devout_finalize; /* properties */ /** * AgsCoreAudioDevout:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsCoreAudioDevout:application-mutex: * * The assigned application mutex * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsCoreAudioDevout:device: * * The core audio soundcard indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "ags-core-audio-devout-0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsCoreAudioDevout:dsp-channels: * * The dsp channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("dsp-channels", i18n_pspec("count of DSP channels"), i18n_pspec("The count of DSP channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DSP_CHANNELS, param_spec); /** * AgsCoreAudioDevout:pcm-channels: * * The pcm channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pcm-channels", i18n_pspec("count of PCM channels"), i18n_pspec("The count of PCM channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PCM_CHANNELS, param_spec); /** * AgsCoreAudioDevout:format: * * The precision of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("precision of buffer"), i18n_pspec("The precision to use for a frame"), 1, 64, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsCoreAudioDevout:buffer-size: * * The buffer size * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("frame count of a buffer"), i18n_pspec("The count of frames a buffer contains"), 1, 44100, 940, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsCoreAudioDevout:samplerate: * * The samplerate * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("frames per second"), i18n_pspec("The frames count played during a second"), 8000, 96000, 44100, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsCoreAudioDevout:buffer: * * The buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to play"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsCoreAudioDevout:bpm: * * Beats per minute * * Since: 1.0.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsCoreAudioDevout:delay-factor: * * tact * * Since: 1.0.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsCoreAudioDevout:attack: * * Attack of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsCoreAudioDevout:core-audio-client: * * The assigned #AgsCoreAudioClient * * Since: 1.0.0 */ param_spec = g_param_spec_object("core-audio-client", i18n_pspec("core audio client object"), i18n_pspec("The core audio client object"), AGS_TYPE_CORE_AUDIO_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CORE_AUDIO_CLIENT, param_spec); /** * AgsCoreAudioDevout:core-audio-port: * * The assigned #AgsCoreAudioPort * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("core-audio-port", i18n_pspec("core audio port object"), i18n_pspec("The core audio port object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CORE_AUDIO_PORT, param_spec); /** * AgsCoreAudioDevout:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel"), i18n_pspec("The mapped channel"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); } GQuark ags_core_audio_devout_error_quark() { return(g_quark_from_static_string("ags-core_audio_devout-error-quark")); } void ags_core_audio_devout_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_core_audio_devout_connect; connectable->disconnect = ags_core_audio_devout_disconnect; } void ags_core_audio_devout_soundcard_interface_init(AgsSoundcardInterface *soundcard) { soundcard->set_application_context = ags_core_audio_devout_set_application_context; soundcard->get_application_context = ags_core_audio_devout_get_application_context; soundcard->set_application_mutex = ags_core_audio_devout_set_application_mutex; soundcard->get_application_mutex = ags_core_audio_devout_get_application_mutex; soundcard->set_device = ags_core_audio_devout_set_device; soundcard->get_device = ags_core_audio_devout_get_device; soundcard->set_presets = ags_core_audio_devout_set_presets; soundcard->get_presets = ags_core_audio_devout_get_presets; soundcard->list_cards = ags_core_audio_devout_list_cards; soundcard->pcm_info = ags_core_audio_devout_pcm_info; soundcard->get_poll_fd = NULL; soundcard->is_available = NULL; soundcard->is_starting = ags_core_audio_devout_is_starting; soundcard->is_playing = ags_core_audio_devout_is_playing; soundcard->is_recording = NULL; soundcard->get_uptime = ags_core_audio_devout_get_uptime; soundcard->play_init = ags_core_audio_devout_port_init; soundcard->play = ags_core_audio_devout_port_play; soundcard->record_init = NULL; soundcard->record = NULL; soundcard->stop = ags_core_audio_devout_port_free; soundcard->tic = ags_core_audio_devout_tic; soundcard->offset_changed = ags_core_audio_devout_offset_changed; soundcard->set_bpm = ags_core_audio_devout_set_bpm; soundcard->get_bpm = ags_core_audio_devout_get_bpm; soundcard->set_delay_factor = ags_core_audio_devout_set_delay_factor; soundcard->get_delay_factor = ags_core_audio_devout_get_delay_factor; soundcard->get_absolute_delay = ags_core_audio_devout_get_absolute_delay; soundcard->get_delay = ags_core_audio_devout_get_delay; soundcard->get_attack = ags_core_audio_devout_get_attack; soundcard->get_buffer = ags_core_audio_devout_get_buffer; soundcard->get_next_buffer = ags_core_audio_devout_get_next_buffer; soundcard->get_prev_buffer = ags_core_audio_devout_get_prev_buffer; soundcard->get_delay_counter = ags_core_audio_devout_get_delay_counter; soundcard->set_note_offset = ags_core_audio_devout_set_note_offset; soundcard->get_note_offset = ags_core_audio_devout_get_note_offset; soundcard->set_note_offset_absolute = ags_core_audio_devout_set_note_offset_absolute; soundcard->get_note_offset_absolute = ags_core_audio_devout_get_note_offset_absolute; soundcard->set_loop = ags_core_audio_devout_set_loop; soundcard->get_loop = ags_core_audio_devout_get_loop; soundcard->get_loop_offset = ags_core_audio_devout_get_loop_offset; soundcard->set_audio = ags_core_audio_devout_set_audio; soundcard->get_audio = ags_core_audio_devout_get_audio; } void ags_core_audio_devout_init(AgsCoreAudioDevout *core_audio_devout) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert devout mutex */ core_audio_devout->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); core_audio_devout->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) core_audio_devout, mutex); pthread_mutex_unlock(application_mutex); /* flags */ core_audio_devout->flags = 0; g_atomic_int_set(&(core_audio_devout->sync_flags), AGS_CORE_AUDIO_DEVOUT_PASS_THROUGH); /* quality */ config = ags_config_get_instance(); core_audio_devout->dsp_channels = AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS; core_audio_devout->pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; core_audio_devout->format = AGS_SOUNDCARD_DEFAULT_FORMAT; core_audio_devout->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; core_audio_devout->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; /* read config */ /* dsp channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "dsp-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "dsp-channels"); } if(str != NULL){ core_audio_devout->dsp_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ core_audio_devout->pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ core_audio_devout->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ core_audio_devout->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ core_audio_devout->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* */ core_audio_devout->card_uri = NULL; core_audio_devout->core_audio_client = NULL; core_audio_devout->port_name = NULL; core_audio_devout->core_audio_port = NULL; /* buffer */ core_audio_devout->buffer = (void **) malloc(8 * sizeof(void*)); core_audio_devout->buffer[0] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * sizeof(signed short)); core_audio_devout->buffer[1] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * sizeof(signed short)); core_audio_devout->buffer[2] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * sizeof(signed short)); core_audio_devout->buffer[3] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * sizeof(signed short)); core_audio_devout->buffer[4] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * sizeof(signed short)); core_audio_devout->buffer[5] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * sizeof(signed short)); core_audio_devout->buffer[6] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * sizeof(signed short)); core_audio_devout->buffer[7] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * sizeof(signed short)); ags_core_audio_devout_realloc_buffer(core_audio_devout); /* bpm */ core_audio_devout->bpm = AGS_SOUNDCARD_DEFAULT_BPM; /* delay factor */ core_audio_devout->delay_factor = AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR; /* delay and attack */ core_audio_devout->delay = (gdouble *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(gdouble)); core_audio_devout->attack = (guint *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(guint)); ags_core_audio_devout_adjust_delay_and_attack(core_audio_devout); /* counters */ core_audio_devout->tact_counter = 0.0; core_audio_devout->delay_counter = 0; core_audio_devout->tic_counter = 0; core_audio_devout->note_offset = 0; core_audio_devout->note_offset_absolute = 0; core_audio_devout->loop_left = AGS_SOUNDCARD_DEFAULT_LOOP_LEFT; core_audio_devout->loop_right = AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT; core_audio_devout->do_loop = FALSE; core_audio_devout->loop_offset = 0; /* callback mutex */ core_audio_devout->callback_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(core_audio_devout->callback_mutex, NULL); core_audio_devout->callback_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(core_audio_devout->callback_cond, NULL); /* callback finish mutex */ core_audio_devout->callback_finish_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(core_audio_devout->callback_finish_mutex, NULL); core_audio_devout->callback_finish_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(core_audio_devout->callback_finish_cond, NULL); /* parent */ core_audio_devout->application_context = NULL; core_audio_devout->application_mutex = NULL; /* */ core_audio_devout->notify_soundcard = NULL; /* all AgsAudio */ core_audio_devout->audio = NULL; } void ags_core_audio_devout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(core_audio_devout->application_context == (GObject *) application_context){ return; } if(core_audio_devout->application_context != NULL){ g_object_unref(G_OBJECT(core_audio_devout->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *segmentation; guint discriminante, nominante; g_object_ref(G_OBJECT(application_context)); core_audio_devout->application_mutex = application_context->mutex; config = ags_config_get_instance(); /* segmentation */ segmentation = ags_config_get_value(config, AGS_CONFIG_GENERIC, "segmentation"); if(segmentation != NULL){ sscanf(segmentation, "%d/%d", &discriminante, &nominante); core_audio_devout->delay_factor = 1.0 / nominante * (nominante / discriminante); } ags_core_audio_devout_adjust_delay_and_attack(core_audio_devout); ags_core_audio_devout_realloc_buffer(core_audio_devout); }else{ core_audio_devout->application_mutex = NULL; } core_audio_devout->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(core_audio_devout->application_mutex == application_mutex){ return; } core_audio_devout->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); core_audio_devout->card_uri = g_strdup(device); } break; case PROP_DSP_CHANNELS: { guint dsp_channels; dsp_channels = g_value_get_uint(value); if(dsp_channels == core_audio_devout->dsp_channels){ return; } core_audio_devout->dsp_channels = dsp_channels; } break; case PROP_PCM_CHANNELS: { guint pcm_channels; pcm_channels = g_value_get_uint(value); if(pcm_channels == core_audio_devout->pcm_channels){ return; } core_audio_devout->pcm_channels = pcm_channels; ags_core_audio_devout_realloc_buffer(core_audio_devout); if(core_audio_devout->core_audio_port != NULL){ ags_core_audio_port_set_pcm_channels(core_audio_devout->core_audio_port->data, pcm_channels); } } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); if(format == core_audio_devout->format){ return; } core_audio_devout->format = format; ags_core_audio_devout_realloc_buffer(core_audio_devout); if(core_audio_devout->core_audio_port != NULL){ ags_core_audio_port_set_format(core_audio_devout->core_audio_port->data, format); } } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); if(buffer_size == core_audio_devout->buffer_size){ return; } core_audio_devout->buffer_size = buffer_size; ags_core_audio_devout_realloc_buffer(core_audio_devout); ags_core_audio_devout_adjust_delay_and_attack(core_audio_devout); if(core_audio_devout->core_audio_port != NULL){ ags_core_audio_port_set_buffer_size(core_audio_devout->core_audio_port->data, buffer_size); } } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); if(samplerate == core_audio_devout->samplerate){ return; } core_audio_devout->samplerate = samplerate; ags_core_audio_devout_realloc_buffer(core_audio_devout); ags_core_audio_devout_adjust_delay_and_attack(core_audio_devout); if(core_audio_devout->core_audio_port != NULL){ ags_core_audio_port_set_samplerate(core_audio_devout->core_audio_port->data, samplerate); } } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); core_audio_devout->bpm = bpm; ags_core_audio_devout_adjust_delay_and_attack(core_audio_devout); } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); core_audio_devout->delay_factor = delay_factor; ags_core_audio_devout_adjust_delay_and_attack(core_audio_devout); } break; case PROP_CORE_AUDIO_CLIENT: { AgsCoreAudioClient *core_audio_client; core_audio_client = (AgsCoreAudioClient *) g_value_get_object(value); if(core_audio_devout->core_audio_client == (GObject *) core_audio_client){ return; } if(core_audio_devout->core_audio_client != NULL){ g_object_unref(G_OBJECT(core_audio_devout->core_audio_client)); } if(core_audio_client != NULL){ g_object_ref(core_audio_client); } core_audio_devout->core_audio_client = (GObject *) core_audio_client; } break; case PROP_CORE_AUDIO_PORT: { AgsCoreAudioPort *core_audio_port; core_audio_port = (AgsCoreAudioPort *) g_value_get_pointer(value); if(!AGS_IS_CORE_AUDIO_PORT(core_audio_port) || g_list_find(core_audio_devout->core_audio_port, core_audio_port) != NULL){ return; } if(core_audio_port != NULL){ g_object_ref(core_audio_port); core_audio_devout->core_audio_port = g_list_append(core_audio_devout->core_audio_port, core_audio_port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_devout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, core_audio_devout->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, core_audio_devout->application_mutex); } break; case PROP_DEVICE: { g_value_set_string(value, core_audio_devout->card_uri); } break; case PROP_DSP_CHANNELS: { g_value_set_uint(value, core_audio_devout->dsp_channels); } break; case PROP_PCM_CHANNELS: { g_value_set_uint(value, core_audio_devout->pcm_channels); } break; case PROP_FORMAT: { g_value_set_uint(value, core_audio_devout->format); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, core_audio_devout->buffer_size); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, core_audio_devout->samplerate); } break; case PROP_BUFFER: { g_value_set_pointer(value, core_audio_devout->buffer); } break; case PROP_BPM: { g_value_set_double(value, core_audio_devout->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, core_audio_devout->delay_factor); } break; case PROP_ATTACK: { g_value_set_pointer(value, core_audio_devout->attack); } break; case PROP_CORE_AUDIO_CLIENT: { g_value_set_object(value, core_audio_devout->core_audio_client); } break; case PROP_CORE_AUDIO_PORT: { g_value_set_pointer(value, g_list_copy(core_audio_devout->core_audio_port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_devout_dispose(GObject *gobject) { AgsCoreAudioDevout *core_audio_devout; GList *list; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(gobject); /* application context */ if(core_audio_devout->application_context != NULL){ g_object_unref(core_audio_devout->application_context); core_audio_devout->application_context = NULL; } /* unref audio */ if(core_audio_devout->audio != NULL){ list = core_audio_devout->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(core_audio_devout->audio, g_object_unref); } /* call parent */ G_OBJECT_CLASS(ags_core_audio_devout_parent_class)->dispose(gobject); } void ags_core_audio_devout_finalize(GObject *gobject) { AgsCoreAudioDevout *core_audio_devout; AgsMutexManager *mutex_manager; GList *list, *list_next; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(gobject); /* remove core_audio_devout mutex */ pthread_mutex_lock(core_audio_devout->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(core_audio_devout->application_mutex); /* free output buffer */ free(core_audio_devout->buffer[0]); free(core_audio_devout->buffer[1]); free(core_audio_devout->buffer[2]); free(core_audio_devout->buffer[3]); free(core_audio_devout->buffer[4]); free(core_audio_devout->buffer[5]); free(core_audio_devout->buffer[6]); free(core_audio_devout->buffer[7]); /* free buffer array */ free(core_audio_devout->buffer); /* free AgsAttack */ free(core_audio_devout->attack); /* unref notify soundcard */ if(core_audio_devout->notify_soundcard != NULL){ if(core_audio_devout->application_context != NULL){ ags_task_thread_remove_cyclic_task(AGS_APPLICATION_CONTEXT(core_audio_devout->application_context)->task_thread, core_audio_devout->notify_soundcard); } g_object_unref(core_audio_devout->notify_soundcard); } /* application context */ if(core_audio_devout->application_context != NULL){ g_object_unref(core_audio_devout->application_context); } /* unref audio */ if(core_audio_devout->audio != NULL){ list = core_audio_devout->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(core_audio_devout->audio, g_object_unref); } pthread_mutex_destroy(core_audio_devout->mutex); free(core_audio_devout->mutex); pthread_mutexattr_destroy(core_audio_devout->mutexattr); free(core_audio_devout->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_core_audio_devout_parent_class)->finalize(gobject); } void ags_core_audio_devout_connect(AgsConnectable *connectable) { AgsCoreAudioDevout *core_audio_devout; GList *list; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(connectable); /* */ list = core_audio_devout->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_core_audio_devout_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_core_audio_devout_switch_buffer_flag: * @core_audio_devout: an #AgsCoreAudioDevout * * The buffer flag indicates the currently played buffer. * * Since: 1.0.0 */ void ags_core_audio_devout_switch_buffer_flag(AgsCoreAudioDevout *core_audio_devout) { if((AGS_CORE_AUDIO_DEVOUT_BUFFER0 & (core_audio_devout->flags)) != 0){ core_audio_devout->flags &= (~AGS_CORE_AUDIO_DEVOUT_BUFFER0); core_audio_devout->flags |= AGS_CORE_AUDIO_DEVOUT_BUFFER1; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER1 & (core_audio_devout->flags)) != 0){ core_audio_devout->flags &= (~AGS_CORE_AUDIO_DEVOUT_BUFFER1); core_audio_devout->flags |= AGS_CORE_AUDIO_DEVOUT_BUFFER2; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER2 & (core_audio_devout->flags)) != 0){ core_audio_devout->flags &= (~AGS_CORE_AUDIO_DEVOUT_BUFFER2); core_audio_devout->flags |= AGS_CORE_AUDIO_DEVOUT_BUFFER3; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER3 & (core_audio_devout->flags)) != 0){ core_audio_devout->flags &= (~AGS_CORE_AUDIO_DEVOUT_BUFFER3); core_audio_devout->flags |= AGS_CORE_AUDIO_DEVOUT_BUFFER4; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER4 & (core_audio_devout->flags)) != 0){ core_audio_devout->flags &= (~AGS_CORE_AUDIO_DEVOUT_BUFFER4); core_audio_devout->flags |= AGS_CORE_AUDIO_DEVOUT_BUFFER5; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER5 & (core_audio_devout->flags)) != 0){ core_audio_devout->flags &= (~AGS_CORE_AUDIO_DEVOUT_BUFFER5); core_audio_devout->flags |= AGS_CORE_AUDIO_DEVOUT_BUFFER6; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER6 & (core_audio_devout->flags)) != 0){ core_audio_devout->flags &= (~AGS_CORE_AUDIO_DEVOUT_BUFFER6); core_audio_devout->flags |= AGS_CORE_AUDIO_DEVOUT_BUFFER7; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER7 & (core_audio_devout->flags)) != 0){ core_audio_devout->flags &= (~AGS_CORE_AUDIO_DEVOUT_BUFFER7); core_audio_devout->flags |= AGS_CORE_AUDIO_DEVOUT_BUFFER0; } } void ags_core_audio_devout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); core_audio_devout->application_context = (GObject *) application_context; } AgsApplicationContext* ags_core_audio_devout_get_application_context(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); return((AgsApplicationContext *) core_audio_devout->application_context); } void ags_core_audio_devout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); core_audio_devout->application_mutex = application_mutex; } pthread_mutex_t* ags_core_audio_devout_get_application_mutex(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); return(core_audio_devout->application_mutex); } void ags_core_audio_devout_set_device(AgsSoundcard *soundcard, gchar *device) { AgsCoreAudioDevout *core_audio_devout; GList *core_audio_port, *core_audio_port_start; gchar *str; int ret; guint nth_card; guint i; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); if(core_audio_devout->card_uri == device || !g_ascii_strcasecmp(core_audio_devout->card_uri, device)){ return; } if(!g_str_has_prefix(device, "ags-core-audio-devout-")){ g_warning("invalid core audio device prefix"); return; } ret = sscanf(device, "ags-core-audio-devout-%u", &nth_card); if(ret != 1){ g_warning("invalid core audio device specifier"); return; } if(core_audio_devout->card_uri != NULL){ g_free(core_audio_devout->card_uri); } core_audio_devout->card_uri = g_strdup(device); /* apply name to port */ core_audio_port_start = core_audio_port = g_list_copy(core_audio_devout->core_audio_port); str = g_strdup_printf("ags-soundcard%d", nth_card); g_object_set(core_audio_port->data, "port-name", str, NULL); g_free(str); g_list_free(core_audio_port_start); } gchar* ags_core_audio_devout_get_device(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); return(core_audio_devout->card_uri); } void ags_core_audio_devout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); g_object_set(core_audio_devout, "pcm-channels", channels, "samplerate", rate, "buffer-size", buffer_size, "format", format, NULL); } void ags_core_audio_devout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); if(channels != NULL){ *channels = core_audio_devout->pcm_channels; } if(rate != NULL){ *rate = core_audio_devout->samplerate; } if(buffer_size != NULL){ *buffer_size = core_audio_devout->buffer_size; } if(format != NULL){ *format = core_audio_devout->format; } } /** * ags_core_audio_devout_list_cards: * @soundcard: the #AgsSoundcard * @card_id: core audio identifier * @card_name: card name * * List available soundcards. * * Since: 1.0.0 */ void ags_core_audio_devout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name) { AgsCoreAudioDevout *core_audio_devout; AgsApplicationContext *application_context; GList *list, *list_start; pthread_mutex_t *application_mutex; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); application_context = (AgsApplicationContext *) core_audio_devout->application_context; if(application_context == NULL){ return; } application_mutex = core_audio_devout->application_mutex; if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } pthread_mutex_lock(application_mutex); list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); while(list != NULL){ if(AGS_IS_CORE_AUDIO_DEVOUT(list->data)){ if(card_id != NULL){ if(AGS_CORE_AUDIO_DEVOUT(list->data)->card_uri != NULL){ *card_id = g_list_prepend(*card_id, g_strdup(AGS_CORE_AUDIO_DEVOUT(list->data)->card_uri)); }else{ *card_id = g_list_prepend(*card_id, g_strdup("(null)")); g_warning("ags_core_audio_devout_list_cards() - card id (null)"); } } if(card_name != NULL){ if(AGS_CORE_AUDIO_DEVOUT(list->data)->core_audio_client != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(AGS_CORE_AUDIO_CLIENT(AGS_CORE_AUDIO_DEVOUT(list->data)->core_audio_client)->name)); }else{ *card_name = g_list_prepend(*card_name, g_strdup("(null)")); g_warning("ags_core_audio_devout_list_cards() - core audio client not connected (null)"); } } } list = list->next; } pthread_mutex_unlock(application_mutex); if(card_id != NULL && *card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL && *card_name != NULL){ *card_name = g_list_reverse(*card_name); } } void ags_core_audio_devout_pcm_info(AgsSoundcard *soundcard, char *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error) { if(channels_min != NULL){ *channels_min = 1; } if(channels_max != NULL){ *channels_max = 1024; } if(rate_min != NULL){ *rate_min = 8000; } if(rate_max != NULL){ *rate_max = 192000; } if(buffer_size_min != NULL){ *buffer_size_min = 64; } if(buffer_size_max != NULL){ *buffer_size_max = 8192; } } gboolean ags_core_audio_devout_is_starting(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); return((((AGS_CORE_AUDIO_DEVOUT_START_PLAY & (core_audio_devout->flags)) != 0) ? TRUE: FALSE)); } gboolean ags_core_audio_devout_is_playing(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); return((((AGS_CORE_AUDIO_DEVOUT_PLAY & (core_audio_devout->flags)) != 0) ? TRUE: FALSE)); } gchar* ags_core_audio_devout_get_uptime(AgsSoundcard *soundcard) { gchar *uptime; if(ags_soundcard_is_playing(soundcard)){ guint samplerate; guint buffer_size; guint note_offset; gdouble bpm; gdouble delay_factor; gdouble delay; ags_soundcard_get_presets(soundcard, NULL, &samplerate, &buffer_size, NULL); note_offset = ags_soundcard_get_note_offset_absolute(soundcard); bpm = ags_soundcard_get_bpm(soundcard); delay_factor = ags_soundcard_get_delay_factor(soundcard); /* calculate delays */ delay = ags_soundcard_get_absolute_delay(soundcard); uptime = ags_time_get_uptime_from_offset(note_offset, bpm, delay, delay_factor); }else{ uptime = g_strdup(AGS_TIME_ZERO); } return(uptime); } void ags_core_audio_devout_port_init(AgsSoundcard *soundcard, GError **error) { AgsCoreAudioDevout *core_audio_devout; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint format, word_size; pthread_mutex_t *mutex; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_devout); pthread_mutex_unlock(application_context->mutex); /* retrieve word size */ pthread_mutex_lock(mutex); switch(core_audio_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_core_audio_devout_port_init(): unsupported word size"); return; } /* prepare for playback */ core_audio_devout->flags |= (AGS_CORE_AUDIO_DEVOUT_BUFFER7 | AGS_CORE_AUDIO_DEVOUT_START_PLAY | AGS_CORE_AUDIO_DEVOUT_PLAY | AGS_CORE_AUDIO_DEVOUT_NONBLOCKING); memset(core_audio_devout->buffer[0], 0, core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[1], 0, core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[2], 0, core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[3], 0, core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[4], 0, core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[5], 0, core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[6], 0, core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[7], 0, core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); /* */ core_audio_devout->tact_counter = 0.0; core_audio_devout->delay_counter = 0.0; core_audio_devout->tic_counter = 0; core_audio_devout->flags |= (AGS_CORE_AUDIO_DEVOUT_INITIALIZED | AGS_CORE_AUDIO_DEVOUT_START_PLAY | AGS_CORE_AUDIO_DEVOUT_PLAY); g_atomic_int_and(&(core_audio_devout->sync_flags), (~(AGS_CORE_AUDIO_DEVOUT_PASS_THROUGH))); g_atomic_int_or(&(core_audio_devout->sync_flags), AGS_CORE_AUDIO_DEVOUT_INITIAL_CALLBACK); pthread_mutex_unlock(mutex); } void ags_core_audio_devout_port_play(AgsSoundcard *soundcard, GError **error) { AgsCoreAudioClient *core_audio_client; AgsCoreAudioDevout *core_audio_devout; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsTaskThread *task_thread; AgsApplicationContext *application_context; guint word_size; gboolean core_audio_client_activated; pthread_mutex_t *mutex; pthread_mutex_t *client_mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* mutices */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); task_thread = (AgsTaskThread *) application_context->task_thread; mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_devout); pthread_mutex_unlock(application_context->mutex); /* client */ pthread_mutex_lock(mutex); core_audio_client = (AgsCoreAudioClient *) core_audio_devout->core_audio_client; callback_mutex = core_audio_devout->callback_mutex; callback_finish_mutex = core_audio_devout->callback_finish_mutex; /* do playback */ core_audio_devout->flags &= (~AGS_CORE_AUDIO_DEVOUT_START_PLAY); notify_soundcard = AGS_NOTIFY_SOUNDCARD(core_audio_devout->notify_soundcard); if((AGS_CORE_AUDIO_DEVOUT_INITIALIZED & (core_audio_devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } switch(core_audio_devout->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_core_audio_devout_port_play(): unsupported word size"); return; } pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(application_context->mutex); client_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_client); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(client_mutex); core_audio_client_activated = ((AGS_CORE_AUDIO_CLIENT_ACTIVATED & (core_audio_client->flags)) != 0) ? TRUE: FALSE; pthread_mutex_unlock(client_mutex); if(core_audio_client_activated){ /* signal */ if((AGS_CORE_AUDIO_DEVOUT_INITIAL_CALLBACK & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) == 0){ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(core_audio_devout->sync_flags), AGS_CORE_AUDIO_DEVOUT_CALLBACK_DONE); if((AGS_CORE_AUDIO_DEVOUT_CALLBACK_WAIT & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) != 0){ pthread_cond_signal(core_audio_devout->callback_cond); } pthread_mutex_unlock(callback_mutex); } /* wait callback */ if((AGS_CORE_AUDIO_DEVOUT_INITIAL_CALLBACK & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) == 0){ pthread_mutex_lock(callback_finish_mutex); if((AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) == 0){ g_atomic_int_or(&(core_audio_devout->sync_flags), AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_WAIT); while((AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_DONE & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) == 0 && (AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) != 0){ pthread_cond_wait(core_audio_devout->callback_finish_cond, callback_finish_mutex); } } g_atomic_int_and(&(core_audio_devout->sync_flags), (~(AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_WAIT | AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_DONE))); pthread_mutex_unlock(callback_finish_mutex); }else{ g_atomic_int_and(&(core_audio_devout->sync_flags), (~AGS_CORE_AUDIO_DEVOUT_INITIAL_CALLBACK)); } } /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); if(task_thread != NULL){ AgsTicDevice *tic_device; AgsClearBuffer *clear_buffer; AgsSwitchBufferFlag *switch_buffer_flag; GList *task; task = NULL; /* tic soundcard */ tic_device = ags_tic_device_new((GObject *) core_audio_devout); task = g_list_append(task, tic_device); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) core_audio_devout); task = g_list_append(task, clear_buffer); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) core_audio_devout); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); }else{ guint nth_buffer; /* get buffer */ if((AGS_CORE_AUDIO_DEVOUT_BUFFER0 & (core_audio_devout->flags)) != 0){ nth_buffer = 7; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER1 & (core_audio_devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER2 & (core_audio_devout->flags)) != 0){ nth_buffer = 1; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER3 & (core_audio_devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER4 & (core_audio_devout->flags)) != 0){ nth_buffer = 3; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER5 & (core_audio_devout->flags)) != 0){ nth_buffer = 4; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER6 & (core_audio_devout->flags)) != 0){ nth_buffer = 5; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER7 & (core_audio_devout->flags)) != 0){ nth_buffer = 6; } /* tic */ ags_soundcard_tic(AGS_SOUNDCARD(core_audio_devout)); switch(core_audio_devout->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: g_warning("ags_core_audio_devout_port_play(): unsupported word size"); return; } memset(core_audio_devout->buffer[nth_buffer], 0, (size_t) core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); /* reset - switch buffer flags */ ags_core_audio_devout_switch_buffer_flag(core_audio_devout); } } void ags_core_audio_devout_port_free(AgsSoundcard *soundcard) { AgsCoreAudioPort *core_audio_port; AgsCoreAudioDevout *core_audio_devout; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; guint word_size; pthread_mutex_t *mutex; pthread_mutex_t *callback_mutex; pthread_mutex_t *callback_finish_mutex; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); /* */ pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_devout); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); notify_soundcard = AGS_NOTIFY_SOUNDCARD(core_audio_devout->notify_soundcard); if((AGS_CORE_AUDIO_DEVOUT_INITIALIZED & (core_audio_devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } g_object_ref(notify_soundcard); callback_mutex = core_audio_devout->callback_mutex; callback_finish_mutex = core_audio_devout->callback_finish_mutex; // g_atomic_int_or(&(AGS_THREAD(application_context->main_loop)->flags), // AGS_THREAD_TIMING); core_audio_devout->flags &= (~(AGS_CORE_AUDIO_DEVOUT_BUFFER0 | AGS_CORE_AUDIO_DEVOUT_BUFFER1 | AGS_CORE_AUDIO_DEVOUT_BUFFER2 | AGS_CORE_AUDIO_DEVOUT_BUFFER3 | AGS_CORE_AUDIO_DEVOUT_BUFFER4 | AGS_CORE_AUDIO_DEVOUT_BUFFER5 | AGS_CORE_AUDIO_DEVOUT_BUFFER6 | AGS_CORE_AUDIO_DEVOUT_BUFFER7 | AGS_CORE_AUDIO_DEVOUT_PLAY)); g_atomic_int_or(&(core_audio_devout->sync_flags), AGS_CORE_AUDIO_DEVOUT_PASS_THROUGH); g_atomic_int_and(&(core_audio_devout->sync_flags), (~AGS_CORE_AUDIO_DEVOUT_INITIAL_CALLBACK)); /* signal callback */ pthread_mutex_lock(callback_mutex); g_atomic_int_or(&(core_audio_devout->sync_flags), AGS_CORE_AUDIO_DEVOUT_CALLBACK_DONE); if((AGS_CORE_AUDIO_DEVOUT_CALLBACK_WAIT & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) != 0){ pthread_cond_signal(core_audio_devout->callback_cond); } pthread_mutex_unlock(callback_mutex); /* signal thread */ pthread_mutex_lock(callback_finish_mutex); g_atomic_int_or(&(core_audio_devout->sync_flags), AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_DONE); if((AGS_CORE_AUDIO_DEVOUT_CALLBACK_FINISH_WAIT & (g_atomic_int_get(&(core_audio_devout->sync_flags)))) != 0){ pthread_cond_signal(core_audio_devout->callback_finish_cond); } pthread_mutex_unlock(callback_finish_mutex); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); g_object_unref(notify_soundcard); /* */ core_audio_devout->note_offset = 0; core_audio_devout->note_offset_absolute = 0; switch(core_audio_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: word_size = 0; g_critical("ags_core_audio_devout_free(): unsupported word size"); } pthread_mutex_unlock(mutex); if(core_audio_devout->core_audio_port != NULL){ core_audio_port = core_audio_devout->core_audio_port->data; while(!g_atomic_int_get(&(core_audio_port->is_empty))) usleep(500000); } pthread_mutex_lock(mutex); memset(core_audio_devout->buffer[0], 0, (size_t) core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[1], 0, (size_t) core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[2], 0, (size_t) core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[3], 0, (size_t) core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[4], 0, (size_t) core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[5], 0, (size_t) core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[6], 0, (size_t) core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); memset(core_audio_devout->buffer[7], 0, (size_t) core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); pthread_mutex_unlock(mutex); } void ags_core_audio_devout_tic(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; gdouble delay; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); /* determine if attack should be switched */ delay = core_audio_devout->delay[core_audio_devout->tic_counter]; if((guint) core_audio_devout->delay_counter + 1 >= (guint) delay){ if(core_audio_devout->do_loop && core_audio_devout->note_offset + 1 == core_audio_devout->loop_right){ ags_soundcard_set_note_offset(soundcard, core_audio_devout->loop_left); }else{ ags_soundcard_set_note_offset(soundcard, core_audio_devout->note_offset + 1); } ags_soundcard_set_note_offset_absolute(soundcard, core_audio_devout->note_offset_absolute + 1); /* delay */ ags_soundcard_offset_changed(soundcard, core_audio_devout->note_offset); /* reset - delay counter */ core_audio_devout->delay_counter = 0.0; core_audio_devout->tact_counter += 1.0; }else{ core_audio_devout->delay_counter += 1.0; } } void ags_core_audio_devout_offset_changed(AgsSoundcard *soundcard, guint note_offset) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); core_audio_devout->tic_counter += 1; if(core_audio_devout->tic_counter == AGS_SOUNDCARD_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ core_audio_devout->tic_counter = 0; } } void ags_core_audio_devout_set_bpm(AgsSoundcard *soundcard, gdouble bpm) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); core_audio_devout->bpm = bpm; ags_core_audio_devout_adjust_delay_and_attack(core_audio_devout); } gdouble ags_core_audio_devout_get_bpm(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); return(core_audio_devout->bpm); } void ags_core_audio_devout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); core_audio_devout->delay_factor = delay_factor; ags_core_audio_devout_adjust_delay_and_attack(core_audio_devout); } gdouble ags_core_audio_devout_get_delay_factor(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); return(core_audio_devout->delay_factor); } gdouble ags_core_audio_devout_get_absolute_delay(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); return((60.0 * (((gdouble) core_audio_devout->samplerate / (gdouble) core_audio_devout->buffer_size) / (gdouble) core_audio_devout->bpm) * ((1.0 / 16.0) * (1.0 / (gdouble) core_audio_devout->delay_factor)))); } gdouble ags_core_audio_devout_get_delay(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; guint index; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); index = core_audio_devout->tic_counter; return(core_audio_devout->delay[index]); } guint ags_core_audio_devout_get_attack(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; guint index; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); index = core_audio_devout->tic_counter; return(core_audio_devout->attack[index]); } void* ags_core_audio_devout_get_buffer(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; void *buffer; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); if((AGS_CORE_AUDIO_DEVOUT_BUFFER0 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[0]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER1 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[1]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER2 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[2]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER3 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[3]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER4 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[4]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER5 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[5]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER6 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[6]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER7 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[7]; }else{ buffer = NULL; } return(buffer); } void* ags_core_audio_devout_get_next_buffer(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; void *buffer; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); if((AGS_CORE_AUDIO_DEVOUT_BUFFER0 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[1]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER1 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[2]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER2 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[3]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER3 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[4]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER4 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[5]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER5 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[6]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER6 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[7]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER7 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[0]; }else{ buffer = NULL; } return(buffer); } void* ags_core_audio_devout_get_prev_buffer(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; void *buffer; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); if((AGS_CORE_AUDIO_DEVOUT_BUFFER0 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[7]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER1 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[0]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER2 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[1]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER3 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[2]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER4 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[3]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER5 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[4]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER6 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[5]; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER7 & (core_audio_devout->flags)) != 0){ buffer = core_audio_devout->buffer[6]; }else{ buffer = NULL; } return(buffer); } guint ags_core_audio_devout_get_delay_counter(AgsSoundcard *soundcard) { return(AGS_CORE_AUDIO_DEVOUT(soundcard)->delay_counter); } void ags_core_audio_devout_set_note_offset(AgsSoundcard *soundcard, guint note_offset) { AGS_CORE_AUDIO_DEVOUT(soundcard)->note_offset = note_offset; } guint ags_core_audio_devout_get_note_offset(AgsSoundcard *soundcard) { return(AGS_CORE_AUDIO_DEVOUT(soundcard)->note_offset); } void ags_core_audio_devout_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset) { AGS_CORE_AUDIO_DEVOUT(soundcard)->note_offset_absolute = note_offset; } guint ags_core_audio_devout_get_note_offset_absolute(AgsSoundcard *soundcard) { return(AGS_CORE_AUDIO_DEVOUT(soundcard)->note_offset_absolute); } void ags_core_audio_devout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop) { AGS_CORE_AUDIO_DEVOUT(soundcard)->loop_left = loop_left; AGS_CORE_AUDIO_DEVOUT(soundcard)->loop_right = loop_right; AGS_CORE_AUDIO_DEVOUT(soundcard)->do_loop = do_loop; if(do_loop){ AGS_CORE_AUDIO_DEVOUT(soundcard)->loop_offset = AGS_CORE_AUDIO_DEVOUT(soundcard)->note_offset; } } void ags_core_audio_devout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop) { if(loop_left != NULL){ *loop_left = AGS_CORE_AUDIO_DEVOUT(soundcard)->loop_left; } if(loop_right != NULL){ *loop_right = AGS_CORE_AUDIO_DEVOUT(soundcard)->loop_right; } if(do_loop != NULL){ *do_loop = AGS_CORE_AUDIO_DEVOUT(soundcard)->do_loop; } } guint ags_core_audio_devout_get_loop_offset(AgsSoundcard *soundcard) { return(AGS_CORE_AUDIO_DEVOUT(soundcard)->loop_offset); } void ags_core_audio_devout_set_audio(AgsSoundcard *soundcard, GList *audio) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); core_audio_devout->audio = audio; } GList* ags_core_audio_devout_get_audio(AgsSoundcard *soundcard) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = AGS_CORE_AUDIO_DEVOUT(soundcard); return(core_audio_devout->audio); } /** * ags_core_audio_devout_adjust_delay_and_attack: * @core_audio_devout: the #AgsCoreAudioDevout * * Calculate delay and attack and reset it. * * Since: 1.0.0 */ void ags_core_audio_devout_adjust_delay_and_attack(AgsCoreAudioDevout *core_audio_devout) { gdouble delay; guint default_tact_frames; guint delay_tact_frames; guint default_period; gint next_attack; guint i; if(core_audio_devout == NULL){ return; } delay = ags_core_audio_devout_get_absolute_delay(AGS_SOUNDCARD(core_audio_devout)); #ifdef AGS_DEBUG g_message("delay : %f", delay); #endif default_tact_frames = (guint) (delay * core_audio_devout->buffer_size); delay_tact_frames = (guint) (floor(delay) * core_audio_devout->buffer_size); default_period = (1.0 / AGS_SOUNDCARD_DEFAULT_PERIOD) * (default_tact_frames); i = 0; core_audio_devout->attack[0] = (guint) floor(0.25 * core_audio_devout->buffer_size); next_attack = (((core_audio_devout->attack[i] + default_tact_frames) / core_audio_devout->buffer_size) - delay) * core_audio_devout->buffer_size; if(next_attack < 0){ next_attack = 0; } if(next_attack >= core_audio_devout->buffer_size){ next_attack = core_audio_devout->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ core_audio_devout->attack[i] = core_audio_devout->attack[i] - ((gdouble) next_attack / 2.0); if(core_audio_devout->attack[i] < 0){ core_audio_devout->attack[i] = 0; } if(core_audio_devout->attack[i] >= core_audio_devout->buffer_size){ core_audio_devout->attack[i] = core_audio_devout->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= core_audio_devout->buffer_size){ next_attack = core_audio_devout->buffer_size - 1; } } for(i = 1; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD; i++){ core_audio_devout->attack[i] = next_attack; next_attack = (((core_audio_devout->attack[i] + default_tact_frames) / core_audio_devout->buffer_size) - delay) * core_audio_devout->buffer_size; if(next_attack >= core_audio_devout->buffer_size){ next_attack = core_audio_devout->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ core_audio_devout->attack[i] = core_audio_devout->attack[i] - ((gdouble) next_attack / 2.0); if(core_audio_devout->attack[i] < 0){ core_audio_devout->attack[i] = 0; } if(core_audio_devout->attack[i] >= core_audio_devout->buffer_size){ core_audio_devout->attack[i] = core_audio_devout->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= core_audio_devout->buffer_size){ next_attack = core_audio_devout->buffer_size - 1; } } #ifdef AGS_DEBUG g_message("%d", core_audio_devout->attack[i]); #endif } core_audio_devout->attack[0] = core_audio_devout->attack[i - 2]; for(i = 0; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD - 1; i++){ core_audio_devout->delay[i] = ((gdouble) (default_tact_frames + core_audio_devout->attack[i] - core_audio_devout->attack[i + 1])) / (gdouble) core_audio_devout->buffer_size; #ifdef AGS_DEBUG g_message("%f", core_audio_devout->delay[i]); #endif } core_audio_devout->delay[i] = ((gdouble) (default_tact_frames + core_audio_devout->attack[i] - core_audio_devout->attack[0])) / (gdouble) core_audio_devout->buffer_size; } /** * ags_core_audio_devout_realloc_buffer: * @core_audio_devout: the #AgsCoreAudioDevout * * Reallocate the internal audio buffer. * * Since: 1.0.0 */ void ags_core_audio_devout_realloc_buffer(AgsCoreAudioDevout *core_audio_devout) { guint word_size; if(core_audio_devout == NULL){ return; } switch(core_audio_devout->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: g_warning("ags_core_audio_devout_realloc_buffer(): unsupported word size"); return; } /* AGS_CORE_AUDIO_DEVOUT_BUFFER_0 */ if(core_audio_devout->buffer[0] != NULL){ free(core_audio_devout->buffer[0]); } core_audio_devout->buffer[0] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); /* AGS_CORE_AUDIO_DEVOUT_BUFFER_1 */ if(core_audio_devout->buffer[1] != NULL){ free(core_audio_devout->buffer[1]); } core_audio_devout->buffer[1] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); /* AGS_CORE_AUDIO_DEVOUT_BUFFER_2 */ if(core_audio_devout->buffer[2] != NULL){ free(core_audio_devout->buffer[2]); } core_audio_devout->buffer[2] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); /* AGS_CORE_AUDIO_DEVOUT_BUFFER_3 */ if(core_audio_devout->buffer[3] != NULL){ free(core_audio_devout->buffer[3]); } core_audio_devout->buffer[3] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); /* AGS_CORE_AUDIO_DEVOUT_BUFFER_4 */ if(core_audio_devout->buffer[4] != NULL){ free(core_audio_devout->buffer[4]); } core_audio_devout->buffer[4] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); /* AGS_CORE_AUDIO_DEVOUT_BUFFER_5 */ if(core_audio_devout->buffer[5] != NULL){ free(core_audio_devout->buffer[5]); } core_audio_devout->buffer[5] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); /* AGS_CORE_AUDIO_DEVOUT_BUFFER_6 */ if(core_audio_devout->buffer[6] != NULL){ free(core_audio_devout->buffer[6]); } core_audio_devout->buffer[6] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); /* AGS_CORE_AUDIO_DEVOUT_BUFFER_7 */ if(core_audio_devout->buffer[7] != NULL){ free(core_audio_devout->buffer[7]); } core_audio_devout->buffer[7] = (void *) malloc(core_audio_devout->pcm_channels * core_audio_devout->buffer_size * word_size); } /** * ags_core_audio_devout_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsCoreAudioDevout, refering to @application_context. * * Returns: a new #AgsCoreAudioDevout * * Since: 1.0.0 */ AgsCoreAudioDevout* ags_core_audio_devout_new(GObject *application_context) { AgsCoreAudioDevout *core_audio_devout; core_audio_devout = (AgsCoreAudioDevout *) g_object_new(AGS_TYPE_CORE_AUDIO_DEVOUT, "application-context", application_context, NULL); return(core_audio_devout); } gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_client.c0000644000175000017500000004762713246707333021263 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_core_audio_client_class_init(AgsCoreAudioClientClass *core_audio_client); void ags_core_audio_client_connectable_interface_init(AgsConnectableInterface *connectable); void ags_core_audio_client_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager); void ags_core_audio_client_init(AgsCoreAudioClient *core_audio_client); void ags_core_audio_client_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_core_audio_client_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_core_audio_client_connect(AgsConnectable *connectable); void ags_core_audio_client_disconnect(AgsConnectable *connectable); void ags_core_audio_client_dispose(GObject *gobject); void ags_core_audio_client_finalize(GObject *gobject); /** * SECTION:ags_core_audio_client * @short_description: core audio connection * @title: AgsCoreAudioClient * @section_id: * @include: ags/audio/core-audio/ags_core_audio_client.h * * The #AgsCoreAudioClient communicates with a core audio instance. */ enum{ PROP_0, PROP_CORE_AUDIO_SERVER, PROP_DEVICE, PROP_PORT, }; static gpointer ags_core_audio_client_parent_class = NULL; GType ags_core_audio_client_get_type() { static GType ags_type_core_audio_client = 0; if(!ags_type_core_audio_client){ static const GTypeInfo ags_core_audio_client_info = { sizeof (AgsCoreAudioClientClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_core_audio_client_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCoreAudioClient), 0, /* n_preallocs */ (GInstanceInitFunc) ags_core_audio_client_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_core_audio_client_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_core_audio_client = g_type_register_static(G_TYPE_OBJECT, "AgsCoreAudioClient", &ags_core_audio_client_info, 0); g_type_add_interface_static(ags_type_core_audio_client, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_core_audio_client); } void ags_core_audio_client_class_init(AgsCoreAudioClientClass *core_audio_client) { GObjectClass *gobject; GParamSpec *param_spec; ags_core_audio_client_parent_class = g_type_class_peek_parent(core_audio_client); /* GObjectClass */ gobject = (GObjectClass *) core_audio_client; gobject->set_property = ags_core_audio_client_set_property; gobject->get_property = ags_core_audio_client_get_property; gobject->dispose = ags_core_audio_client_dispose; gobject->finalize = ags_core_audio_client_finalize; /* properties */ /** * AgsCoreAudioClient:core-audio-server: * * The assigned #AgsCoreAudioServer. * * Since: 1.0.0 */ param_spec = g_param_spec_object("core-audio-server", i18n_pspec("assigned core audio server"), i18n_pspec("The assigned core audio server"), AGS_TYPE_CORE_AUDIO_SERVER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CORE_AUDIO_SERVER, param_spec); /** * AgsCoreAudioClient:device: * * The assigned devices. * * Since: 1.0.0 */ param_spec = g_param_spec_object("device", i18n_pspec("assigned device"), i18n_pspec("The assigned device"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsCoreAudioClient:port: * * The assigned ports. * * Since: 1.0.0 */ param_spec = g_param_spec_object("port", i18n_pspec("assigned port"), i18n_pspec("The assigned port"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT, param_spec); } void ags_core_audio_client_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_core_audio_client_connect; connectable->disconnect = ags_core_audio_client_disconnect; } void ags_core_audio_client_init(AgsCoreAudioClient *core_audio_client) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert client mutex */ core_audio_client->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); core_audio_client->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) core_audio_client, mutex); pthread_mutex_unlock(application_mutex); /* flags */ core_audio_client->flags = 0; /* server */ core_audio_client->core_audio_server = NULL; core_audio_client->uuid = ags_id_generator_create_uuid(); core_audio_client->name = NULL; /* client */ core_audio_client->graph = NULL; /* device */ core_audio_client->device = NULL; core_audio_client->port = NULL; } void ags_core_audio_client_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCoreAudioClient *core_audio_client; core_audio_client = AGS_CORE_AUDIO_CLIENT(gobject); switch(prop_id){ case PROP_CORE_AUDIO_SERVER: { AgsCoreAudioServer *core_audio_server; core_audio_server = (AgsCoreAudioServer *) g_value_get_object(value); if(core_audio_client->core_audio_server == (GObject *) core_audio_server){ return; } if(core_audio_client->core_audio_server != NULL){ g_object_unref(core_audio_client->core_audio_server); } if(core_audio_server != NULL){ g_object_ref(core_audio_server); } core_audio_client->core_audio_server = (GObject *) core_audio_server; } break; case PROP_DEVICE: { GObject *device; device = (GObject *) g_value_get_object(value); if(g_list_find(core_audio_client->device, device) != NULL){ return; } if(device != NULL){ g_object_ref(device); core_audio_client->device = g_list_prepend(core_audio_client->device, device); } } break; case PROP_PORT: { GObject *port; port = (GObject *) g_value_get_object(value); if(g_list_find(core_audio_client->port, port) != NULL){ return; } if(port != NULL){ g_object_ref(port); core_audio_client->port = g_list_prepend(core_audio_client->port, port); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_client_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCoreAudioClient *core_audio_client; core_audio_client = AGS_CORE_AUDIO_CLIENT(gobject); switch(prop_id){ case PROP_CORE_AUDIO_SERVER: { g_value_set_object(value, core_audio_client->core_audio_server); } break; case PROP_DEVICE: { g_value_set_pointer(value, g_list_copy(core_audio_client->device)); } break; case PROP_PORT: { g_value_set_pointer(value, g_list_copy(core_audio_client->port)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_client_connect(AgsConnectable *connectable) { AgsCoreAudioClient *core_audio_client; GList *list; core_audio_client = AGS_CORE_AUDIO_CLIENT(connectable); if((AGS_CORE_AUDIO_CLIENT_CONNECTED & (core_audio_client->flags)) != 0){ return; } core_audio_client->flags |= AGS_CORE_AUDIO_CLIENT_CONNECTED; /* port */ list = core_audio_client->port; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_core_audio_client_disconnect(AgsConnectable *connectable) { AgsCoreAudioClient *core_audio_client; GList *list; core_audio_client = AGS_CORE_AUDIO_CLIENT(connectable); if((AGS_CORE_AUDIO_CLIENT_CONNECTED & (core_audio_client->flags)) == 0){ return; } core_audio_client->flags &= (~AGS_CORE_AUDIO_CLIENT_CONNECTED); /* port */ list = core_audio_client->port; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_core_audio_client_dispose(GObject *gobject) { AgsCoreAudioClient *core_audio_client; GList *list; core_audio_client = AGS_CORE_AUDIO_CLIENT(gobject); /* core audio server */ if(core_audio_client->core_audio_server != NULL){ g_object_unref(core_audio_client->core_audio_server); core_audio_client->core_audio_server = NULL; } /* device */ if(core_audio_client->device != NULL){ list = core_audio_client->device; while(list != NULL){ g_object_set(G_OBJECT(list->data), "core-audio-client", NULL, NULL); list = list->next; } g_list_free_full(core_audio_client->device, g_object_unref); core_audio_client->device = NULL; } /* port */ if(core_audio_client->port != NULL){ list = core_audio_client->port; while(list != NULL){ g_object_run_dispose(G_OBJECT(list->data)); list = list->next; } g_list_free_full(core_audio_client->port, g_object_unref); core_audio_client->port = NULL; } /* call parent */ G_OBJECT_CLASS(ags_core_audio_client_parent_class)->dispose(gobject); } void ags_core_audio_client_finalize(GObject *gobject) { AgsCoreAudioClient *core_audio_client; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; core_audio_client = AGS_CORE_AUDIO_CLIENT(gobject); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* remove core audio server mutex */ pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); /* core audio server */ if(core_audio_client->core_audio_server != NULL){ g_object_unref(core_audio_client->core_audio_server); } /* core audio graph */ if(core_audio_client->graph != NULL){ free(core_audio_client->graph); } /* device */ if(core_audio_client->device != NULL){ g_list_free_full(core_audio_client->device, g_object_unref); } /* port */ if(core_audio_client->port != NULL){ g_list_free_full(core_audio_client->port, g_object_unref); } pthread_mutex_destroy(core_audio_client->mutex); free(core_audio_client->mutex); pthread_mutexattr_destroy(core_audio_client->mutexattr); free(core_audio_client->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_core_audio_client_parent_class)->finalize(gobject); } /** * ags_core_audio_client_find_uuid: * @core_audio_client: a #GList * @client_uuid: the client uuid to find * * Finds next match of @client_uuid in @core_audio_client. * * Returns: a #GList or %NULL * * Since: 1.0.0 */ GList* ags_core_audio_client_find_uuid(GList *core_audio_client, gchar *client_uuid) { while(core_audio_client != NULL){ if(AGS_CORE_AUDIO_CLIENT(core_audio_client->data)->graph != NULL && !g_ascii_strcasecmp(AGS_CORE_AUDIO_CLIENT(core_audio_client->data)->uuid, client_uuid)){ return(core_audio_client); } } return(NULL); } /** * ags_core_audio_client_find: * @core_audio_client: a #GList * @client_name: the client name to find * * Finds next match of @client_name in @core_audio_client. * * Returns: a #GList or %NULL * * Since: 1.0.0 */ GList* ags_core_audio_client_find(GList *core_audio_client, gchar *client_name) { while(core_audio_client != NULL){ if(AGS_CORE_AUDIO_CLIENT(core_audio_client->data)->graph != NULL && !g_ascii_strcasecmp(AGS_CORE_AUDIO_CLIENT(core_audio_client->data)->name, client_name)){ return(core_audio_client); } } return(NULL); } /** * ags_core_audio_client_open: * @core_audio_client: the #AgsCoreAudioClient * @client_name: the client's name * * Open the core audio client's connection and read uuid. * * Since: 1.0.0 */ void ags_core_audio_client_open(AgsCoreAudioClient *core_audio_client, gchar *client_name) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; #ifdef AGS_WITH_CORE_AUDIO OSStatus retval; #endif gboolean ready; if(core_audio_client == NULL || client_name == NULL){ return; } if(core_audio_client->graph != NULL){ g_message("Advanced Gtk+ Sequencer core audio client already open"); return; } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_client); pthread_mutex_unlock(application_mutex); /* */ g_message("Advanced Gtk+ Sequencer open core audio client"); core_audio_client->name = g_strdup(client_name); #ifdef AGS_WITH_CORE_AUDIO core_audio_client->graph = (AUGraph *) malloc(sizeof(AUGraph)); memset(core_audio_client->graph, 0, sizeof(AUGraph)); retval = NewAUGraph(core_audio_client->graph); if(retval != noErr){ free(core_audio_client->graph); core_audio_client->graph = NULL; } #endif } /** * ags_core_audio_client_activate: * @core_audio_client: the #AgsCoreAudioClient * * Activate client. * * Since: 1.0.0 */ void ags_core_audio_client_activate(AgsCoreAudioClient *core_audio_client) { AgsMutexManager *mutex_manager; GList *port; int ret; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) core_audio_client); pthread_mutex_unlock(application_mutex); /* */ //TODO:JK: make thread-safe pthread_mutex_lock(mutex); if((AGS_CORE_AUDIO_CLIENT_ACTIVATED & (core_audio_client->flags)) != 0 || core_audio_client->graph == NULL){ pthread_mutex_unlock(mutex); return; } port = core_audio_client->port; while(port != NULL){ ags_core_audio_port_register(port->data, AGS_CORE_AUDIO_PORT(port->data)->name, (((AGS_CORE_AUDIO_PORT_IS_AUDIO & (AGS_CORE_AUDIO_PORT(port->data)->flags)) != 0) ? TRUE: FALSE), (((AGS_CORE_AUDIO_PORT_IS_MIDI & (AGS_CORE_AUDIO_PORT(port->data)->flags)) != 0) ? TRUE: FALSE), (((AGS_CORE_AUDIO_PORT_IS_OUTPUT & (AGS_CORE_AUDIO_PORT(port->data)->flags)) != 0) ? TRUE: FALSE)); port = port->next; } //AUGraphOpen(core_audio_client->graph); //AUGraphStart(core_audio_client->graph); core_audio_client->flags |= AGS_CORE_AUDIO_CLIENT_ACTIVATED; pthread_mutex_unlock(mutex); } /** * ags_core_audio_client_deactivate: * @core_audio_client: the #AgsCoreAudioClient * * Deactivate client. * * Since: 1.0.0 */ void ags_core_audio_client_deactivate(AgsCoreAudioClient *core_audio_client) { if(core_audio_client->graph == NULL){ return; } //AUGraphStop(core_audio_client->graph); core_audio_client->flags &= (~AGS_CORE_AUDIO_CLIENT_ACTIVATED); } /** * ags_core_audio_client_add_device: * @core_audio_client: the #AgsCoreAudioClient * @core_audio_device: an #AgsCoreAudioDevout or #AgsCoreAudioMidiin * * Add @core_audio_device to @core_audio_client. * * Since: 1.0.0 */ void ags_core_audio_client_add_device(AgsCoreAudioClient *core_audio_client, GObject *core_audio_device) { if(!AGS_IS_CORE_AUDIO_CLIENT(core_audio_client) || (!AGS_IS_CORE_AUDIO_DEVOUT(core_audio_device) && !AGS_IS_CORE_AUDIO_MIDIIN(core_audio_device))){ return; } g_object_ref(core_audio_device); core_audio_client->device = g_list_prepend(core_audio_client->device, core_audio_device); } /** * ags_core_audio_client_remove_device: * @core_audio_client: the #AgsCoreAudioClient * @core_audio_device: an #AgsCoreAudioDevout or #AgsCoreAudioMidiin * * Remove @core_audio_device from @core_audio_client. * * Since: 1.0.0 */ void ags_core_audio_client_remove_device(AgsCoreAudioClient *core_audio_client, GObject *core_audio_device) { if(!AGS_IS_CORE_AUDIO_CLIENT(core_audio_client)){ return; } core_audio_client->device = g_list_remove(core_audio_client->device, core_audio_device); g_object_unref(core_audio_device); } /** * ags_core_audio_client_add_port: * @core_audio_client: the #AgsCoreAudioClient * @core_audio_port: an #AgsCoreAudioPort * * Add @core_audio_port to @core_audio_client. * * Since: 1.0.0 */ void ags_core_audio_client_add_port(AgsCoreAudioClient *core_audio_client, GObject *core_audio_port) { if(!AGS_IS_CORE_AUDIO_CLIENT(core_audio_client) || !AGS_IS_CORE_AUDIO_PORT(core_audio_port)){ return; } g_object_ref(core_audio_port); core_audio_client->port = g_list_prepend(core_audio_client->port, core_audio_port); } /** * ags_core_audio_client_remove_port: * @core_audio_client: the #AgsCoreAudioClient * @core_audio_port: an #AgsCoreAudioPort * * Remove @core_audio_port from @core_audio_client. * * Since: 1.0.0 */ void ags_core_audio_client_remove_port(AgsCoreAudioClient *core_audio_client, GObject *core_audio_port) { if(!AGS_IS_CORE_AUDIO_CLIENT(core_audio_client)){ return; } core_audio_client->port = g_list_remove(core_audio_client->port, core_audio_port); g_object_unref(core_audio_port); } /** * ags_core_audio_client_new: * @core_audio_server: the assigned #AgsCoreAudioServer * * Instantiate a new #AgsCoreAudioClient. * * Returns: the new #AgsCoreAudioClient * * Since: 1.0.0 */ AgsCoreAudioClient* ags_core_audio_client_new(GObject *core_audio_server) { AgsCoreAudioClient *core_audio_client; core_audio_client = (AgsCoreAudioClient *) g_object_new(AGS_TYPE_CORE_AUDIO_CLIENT, "core-audio-server", core_audio_server, NULL); return(core_audio_client); } gsequencer-1.4.24/ags/audio/core-audio/ags_core_audio_server.c0000644000175000017500000010474713254220314021274 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_core_audio_server_class_init(AgsCoreAudioServerClass *core_audio_server); void ags_core_audio_server_connectable_interface_init(AgsConnectableInterface *connectable); void ags_core_audio_server_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager); void ags_core_audio_server_init(AgsCoreAudioServer *core_audio_server); void ags_core_audio_server_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_core_audio_server_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_core_audio_server_connect(AgsConnectable *connectable); void ags_core_audio_server_disconnect(AgsConnectable *connectable); void ags_core_audio_server_dispose(GObject *gobject); void ags_core_audio_server_finalize(GObject *gobject); void ags_core_audio_server_set_url(AgsDistributedManager *distributed_manager, gchar *url); gchar* ags_core_audio_server_get_url(AgsDistributedManager *distributed_manager); void ags_core_audio_server_set_ports(AgsDistributedManager *distributed_manager, guint *ports, guint port_count); guint* ags_core_audio_server_get_ports(AgsDistributedManager *distributed_manager, guint *port_count); void ags_core_audio_server_set_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *soundcard); GList* ags_core_audio_server_get_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid); void ags_core_audio_server_set_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *sequencer); GList* ags_core_audio_server_get_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid); GObject* ags_core_audio_server_register_soundcard(AgsDistributedManager *distributed_manager, gboolean is_output); void ags_core_audio_server_unregister_soundcard(AgsDistributedManager *distributed_manager, GObject *soundcard); GObject* ags_core_audio_server_register_sequencer(AgsDistributedManager *distributed_manager, gboolean is_output); void ags_core_audio_server_unregister_sequencer(AgsDistributedManager *distributed_manager, GObject *sequencer); void* ags_core_audio_server_do_poll_loop(void *ptr); /** * SECTION:ags_core_audio_server * @short_description: core audio instance * @title: AgsCoreAudioServer * @section_id: * @include: ags/audio/core-audio/ags_core_audio_server.h * * The #AgsCoreAudioServer is an object to represent a running core audio instance. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_URL, PROP_DEFAULT_SOUNDCARD, PROP_DEFAULT_CORE_AUDIO_CLIENT, PROP_CORE_AUDIO_CLIENT, }; static gpointer ags_core_audio_server_parent_class = NULL; GType ags_core_audio_server_get_type() { static GType ags_type_core_audio_server = 0; if(!ags_type_core_audio_server){ static const GTypeInfo ags_core_audio_server_info = { sizeof (AgsCoreAudioServerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_core_audio_server_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCoreAudioServer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_core_audio_server_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_core_audio_server_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_distributed_manager_interface_info = { (GInterfaceInitFunc) ags_core_audio_server_distributed_manager_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_core_audio_server = g_type_register_static(G_TYPE_OBJECT, "AgsCoreAudioServer", &ags_core_audio_server_info, 0); g_type_add_interface_static(ags_type_core_audio_server, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_core_audio_server, AGS_TYPE_DISTRIBUTED_MANAGER, &ags_distributed_manager_interface_info); } return (ags_type_core_audio_server); } void ags_core_audio_server_class_init(AgsCoreAudioServerClass *core_audio_server) { GObjectClass *gobject; GParamSpec *param_spec; ags_core_audio_server_parent_class = g_type_class_peek_parent(core_audio_server); /* GObjectClass */ gobject = (GObjectClass *) core_audio_server; gobject->set_property = ags_core_audio_server_set_property; gobject->get_property = ags_core_audio_server_get_property; gobject->dispose = ags_core_audio_server_dispose; gobject->finalize = ags_core_audio_server_finalize; /* properties */ /** * AgsCoreAudioServer:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsCoreAudioServer:url: * * The assigned URL. * * Since: 1.0.0 */ param_spec = g_param_spec_string("url", i18n_pspec("the URL"), i18n_pspec("The URL"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_URL, param_spec); /** * AgsCoreAudioServer:default-soundcard: * * The default soundcard. * * Since: 1.0.0 */ param_spec = g_param_spec_object("default-soundcard", i18n_pspec("default soundcard"), i18n_pspec("The default soundcard"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEFAULT_SOUNDCARD, param_spec); /** * AgsCoreAudioServer:default-core-audio-client: * * The default core audio client. * * Since: 1.0.0 */ param_spec = g_param_spec_object("default-core-audio-client", i18n_pspec("default core audio client"), i18n_pspec("The default core audio client"), AGS_TYPE_CORE_AUDIO_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEFAULT_CORE_AUDIO_CLIENT, param_spec); /** * AgsCoreAudioServer:core-audio-client: * * The core audio client list. * * Since: 1.0.0 */ param_spec = g_param_spec_object("core-audio-client", i18n_pspec("core audio client list"), i18n_pspec("The core audio client list"), AGS_TYPE_CORE_AUDIO_CLIENT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CORE_AUDIO_CLIENT, param_spec); } void ags_core_audio_server_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_core_audio_server_connect; connectable->disconnect = ags_core_audio_server_disconnect; } void ags_core_audio_server_distributed_manager_interface_init(AgsDistributedManagerInterface *distributed_manager) { distributed_manager->set_url = ags_core_audio_server_set_url; distributed_manager->get_url = ags_core_audio_server_get_url; distributed_manager->set_ports = ags_core_audio_server_set_ports; distributed_manager->get_ports = ags_core_audio_server_get_ports; distributed_manager->set_soundcard = ags_core_audio_server_set_soundcard; distributed_manager->get_soundcard = ags_core_audio_server_get_soundcard; distributed_manager->set_sequencer = ags_core_audio_server_set_sequencer; distributed_manager->get_sequencer = ags_core_audio_server_get_sequencer; distributed_manager->register_soundcard = ags_core_audio_server_register_soundcard; distributed_manager->unregister_soundcard = ags_core_audio_server_unregister_soundcard; distributed_manager->register_sequencer = ags_core_audio_server_register_sequencer; distributed_manager->unregister_sequencer = ags_core_audio_server_unregister_sequencer; } void ags_core_audio_server_init(AgsCoreAudioServer *core_audio_server) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert server mutex */ core_audio_server->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); core_audio_server->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) core_audio_server, mutex); pthread_mutex_unlock(application_mutex); /* flags */ core_audio_server->flags = 0; g_atomic_int_set(&(core_audio_server->running), TRUE); core_audio_server->thread = (pthread_t *) malloc(sizeof(pthread_t)); core_audio_server->application_context = NULL; core_audio_server->url = NULL; core_audio_server->port = NULL; core_audio_server->port_count = 0; core_audio_server->n_soundcards = 0; core_audio_server->n_sequencers = 0; core_audio_server->default_soundcard = NULL; core_audio_server->default_client = NULL; core_audio_server->client = NULL; } void ags_core_audio_server_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCoreAudioServer *core_audio_server; core_audio_server = AGS_CORE_AUDIO_SERVER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(core_audio_server->application_context == (GObject *) application_context){ return; } if(core_audio_server->application_context != NULL){ g_object_unref(G_OBJECT(core_audio_server->application_context)); } if(application_context != NULL){ g_object_ref(G_OBJECT(application_context)); } core_audio_server->application_context = (GObject *) application_context; } break; case PROP_URL: { gchar *url; url = g_value_get_string(value); if(core_audio_server->url == url){ return; } if(core_audio_server->url != NULL){ g_free(core_audio_server->url); } core_audio_server->url = g_strdup(url); } break; case PROP_DEFAULT_SOUNDCARD: { GObject *default_soundcard; default_soundcard = (GObject *) g_value_get_object(value); if(core_audio_server->default_soundcard == (GObject *) default_soundcard){ return; } if(core_audio_server->default_soundcard != NULL){ g_object_unref(G_OBJECT(core_audio_server->default_soundcard)); } if(default_soundcard != NULL){ g_object_ref(G_OBJECT(default_soundcard)); } core_audio_server->default_soundcard = (GObject *) default_soundcard; } break; case PROP_DEFAULT_CORE_AUDIO_CLIENT: { AgsCoreAudioClient *default_client; default_client = (AgsCoreAudioClient *) g_value_get_object(value); if(core_audio_server->default_client == (GObject *) default_client){ return; } if(core_audio_server->default_client != NULL){ g_object_unref(G_OBJECT(core_audio_server->default_client)); } if(default_client != NULL){ g_object_ref(G_OBJECT(default_client)); } core_audio_server->default_client = (GObject *) default_client; } break; case PROP_CORE_AUDIO_CLIENT: { GObject *client; client = (GObject *) g_value_get_object(value); if(g_list_find(core_audio_server->client, client) != NULL){ return; } if(client != NULL){ g_object_ref(G_OBJECT(client)); core_audio_server->client = g_list_prepend(core_audio_server->client, client); } } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_server_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCoreAudioServer *core_audio_server; core_audio_server = AGS_CORE_AUDIO_SERVER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, core_audio_server->application_context); } break; case PROP_URL: { g_value_set_string(value, core_audio_server->url); } break; case PROP_DEFAULT_SOUNDCARD: { g_value_set_object(value, core_audio_server->default_soundcard); } break; case PROP_DEFAULT_CORE_AUDIO_CLIENT: { g_value_set_object(value, core_audio_server->default_soundcard); } break; case PROP_CORE_AUDIO_CLIENT: { g_value_set_pointer(value, g_list_copy(core_audio_server->client)); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_core_audio_server_connect(AgsConnectable *connectable) { AgsCoreAudioServer *core_audio_server; GList *list; core_audio_server = AGS_CORE_AUDIO_SERVER(connectable); if((AGS_CORE_AUDIO_SERVER_CONNECTED & (core_audio_server->flags)) != 0){ return; } core_audio_server->flags |= AGS_CORE_AUDIO_SERVER_CONNECTED; list = core_audio_server->client; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_core_audio_server_disconnect(AgsConnectable *connectable) { AgsCoreAudioServer *core_audio_server; GList *list; core_audio_server = AGS_CORE_AUDIO_SERVER(connectable); if((AGS_CORE_AUDIO_SERVER_CONNECTED & (core_audio_server->flags)) != 0){ return; } core_audio_server->flags |= AGS_CORE_AUDIO_SERVER_CONNECTED; list = core_audio_server->client; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_core_audio_server_dispose(GObject *gobject) { AgsCoreAudioServer *core_audio_server; GList *list; core_audio_server = AGS_CORE_AUDIO_SERVER(gobject); /* application context */ if(core_audio_server->application_context != NULL){ g_object_unref(G_OBJECT(core_audio_server->application_context)); core_audio_server->application_context = NULL; } /* default soundcard */ if(core_audio_server->default_soundcard != NULL){ g_object_unref(G_OBJECT(core_audio_server->default_soundcard)); core_audio_server->default_soundcard = NULL; } /* default client */ if(core_audio_server->default_client != NULL){ g_object_unref(G_OBJECT(core_audio_server->default_client)); core_audio_server->default_client = NULL; } /* client */ if(core_audio_server->client != NULL){ list = core_audio_server->client; while(list != NULL){ g_object_run_dispose(G_OBJECT(list->data)); list = list->next; } g_list_free_full(core_audio_server->client, g_object_unref); core_audio_server->client = NULL; } /* call parent */ G_OBJECT_CLASS(ags_core_audio_server_parent_class)->dispose(gobject); } void ags_core_audio_server_finalize(GObject *gobject) { AgsCoreAudioServer *core_audio_server; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; core_audio_server = AGS_CORE_AUDIO_SERVER(gobject); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* remove core audio server mutex */ pthread_mutex_lock(application_mutex); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(application_mutex); /* application context */ if(core_audio_server->application_context != NULL){ g_object_unref(G_OBJECT(core_audio_server->application_context)); } /* url */ g_free(core_audio_server->url); /* default soundcard */ if(core_audio_server->default_soundcard != NULL){ g_object_unref(G_OBJECT(core_audio_server->default_soundcard)); } /* default client */ if(core_audio_server->default_client != NULL){ g_object_unref(G_OBJECT(core_audio_server->default_client)); } /* client */ if(core_audio_server->client != NULL){ g_list_free_full(core_audio_server->client, g_object_unref); } pthread_mutex_destroy(core_audio_server->mutex); free(core_audio_server->mutex); pthread_mutexattr_destroy(core_audio_server->mutexattr); free(core_audio_server->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_core_audio_server_parent_class)->finalize(gobject); } void ags_core_audio_server_set_url(AgsDistributedManager *distributed_manager, gchar *url) { AGS_CORE_AUDIO_SERVER(distributed_manager)->url = url; } gchar* ags_core_audio_server_get_url(AgsDistributedManager *distributed_manager) { return(AGS_CORE_AUDIO_SERVER(distributed_manager)->url); } void ags_core_audio_server_set_ports(AgsDistributedManager *distributed_manager, guint *port, guint port_count) { AGS_CORE_AUDIO_SERVER(distributed_manager)->port = port; AGS_CORE_AUDIO_SERVER(distributed_manager)->port_count = port_count; } guint* ags_core_audio_server_get_ports(AgsDistributedManager *distributed_manager, guint *port_count) { if(port_count != NULL){ *port_count = AGS_CORE_AUDIO_SERVER(distributed_manager)->port_count; } return(AGS_CORE_AUDIO_SERVER(distributed_manager)->port); } void ags_core_audio_server_set_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *soundcard) { AgsCoreAudioServer *core_audio_server; AgsCoreAudioClient *core_audio_client; GList *list; core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager); core_audio_client = (AgsCoreAudioClient *) ags_core_audio_server_find_client(core_audio_server, client_uuid); //NOTE:JK: soundcard won't removed list = soundcard; while(list != NULL){ ags_core_audio_client_add_device(core_audio_client, (GObject *) list->data); list = list->next; } } GList* ags_core_audio_server_get_soundcard(AgsDistributedManager *distributed_manager, gchar *client_uuid) { AgsCoreAudioServer *core_audio_server; AgsCoreAudioClient *core_audio_client; GList *list, *device; core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager); core_audio_client = (AgsCoreAudioClient *) ags_core_audio_server_find_client(core_audio_server, client_uuid); device = core_audio_client->device; list = NULL; while(device != NULL){ if(AGS_IS_CORE_AUDIO_DEVOUT(device->data)){ list = g_list_prepend(list, device->data); } device = device->next; } return(g_list_reverse(list)); } void ags_core_audio_server_set_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid, GList *sequencer) { AgsCoreAudioServer *core_audio_server; AgsCoreAudioClient *core_audio_client; GList *list; core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager); core_audio_client = (AgsCoreAudioClient *) ags_core_audio_server_find_client(core_audio_server, client_uuid); //NOTE:JK: sequencer won't removed list = sequencer; while(list != NULL){ ags_core_audio_client_add_device(core_audio_client, (GObject *) list->data); list = list->next; } } GList* ags_core_audio_server_get_sequencer(AgsDistributedManager *distributed_manager, gchar *client_uuid) { AgsCoreAudioServer *core_audio_server; AgsCoreAudioClient *core_audio_client; GList *list, *device; core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager); core_audio_client = (AgsCoreAudioClient *) ags_core_audio_server_find_client(core_audio_server, client_uuid); device = core_audio_client->device; list = NULL; while(device != NULL){ if(AGS_IS_CORE_AUDIO_MIDIIN(device->data)){ list = g_list_prepend(list, device->data); } device = device->next; } return(g_list_reverse(list)); } GObject* ags_core_audio_server_register_soundcard(AgsDistributedManager *distributed_manager, gboolean is_output) { AgsCoreAudioServer *core_audio_server; AgsCoreAudioClient *default_client; AgsCoreAudioPort *core_audio_port; AgsCoreAudioDevout *core_audio_devout; gchar *str; gboolean initial_set; guint i; if(!is_output){ g_warning("GSequencer - audio input not implemented"); return(NULL); } core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager); initial_set = FALSE; /* the default client */ if(core_audio_server->default_client == NULL){ g_object_set(core_audio_server, "default-core-audio-client", ags_core_audio_client_new((GObject *) core_audio_server), NULL); ags_core_audio_server_add_client(core_audio_server, core_audio_server->default_client); ags_core_audio_client_open((AgsCoreAudioClient *) core_audio_server->default_client, "ags-default-client"); initial_set = TRUE; if(AGS_CORE_AUDIO_CLIENT(core_audio_server->default_client)->graph == NULL){ g_warning("ags_core_audio_server.c - can't open core audio client"); } } default_client = (AgsCoreAudioClient *) core_audio_server->default_client; core_audio_devout = NULL; /* the soundcard */ if(is_output){ core_audio_devout = ags_core_audio_devout_new(core_audio_server->application_context); str = g_strdup_printf("ags-core-audio-devout-%d", core_audio_server->n_soundcards); g_object_set(AGS_CORE_AUDIO_DEVOUT(core_audio_devout), "core-audio-client", default_client, "device", str, NULL); g_free(str); g_object_set(default_client, "device", core_audio_devout, NULL); /* register ports */ str = g_strdup_printf("ags-soundcard%d", core_audio_server->n_soundcards); #ifdef AGS_DEBUG g_message("%s", str); #endif core_audio_port = ags_core_audio_port_new((GObject *) default_client); g_object_set(core_audio_port, "core-audio-device", core_audio_devout, NULL); ags_core_audio_client_add_port(default_client, (GObject *) core_audio_port); g_object_set(core_audio_devout, "core-audio-port", core_audio_port, NULL); core_audio_devout->port_name = (gchar **) malloc(2 * sizeof(gchar *)); core_audio_devout->port_name[0] = g_strdup(str); core_audio_devout->port_name[1] = NULL; ags_core_audio_port_register(core_audio_port, str, TRUE, FALSE, TRUE); ags_core_audio_devout_realloc_buffer(core_audio_devout); core_audio_server->n_soundcards += 1; } return((GObject *) core_audio_devout); } void ags_core_audio_server_unregister_soundcard(AgsDistributedManager *distributed_manager, GObject *soundcard) { AgsCoreAudioServer *core_audio_server; AgsCoreAudioClient *default_client; GList *list; core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager); /* the default client */ default_client = (AgsCoreAudioClient *) core_audio_server->default_client; if(default_client == NULL){ g_warning("GSequencer - no core audio client"); return; } list = AGS_CORE_AUDIO_DEVOUT(soundcard)->core_audio_port; while(list != NULL){ ags_core_audio_port_unregister(list->data); ags_core_audio_client_remove_port(default_client, list->data); list = list->next; } ags_core_audio_client_remove_device(default_client, soundcard); if(default_client->port == NULL){ core_audio_server->n_soundcards = 0; } } GObject* ags_core_audio_server_register_sequencer(AgsDistributedManager *distributed_manager, gboolean is_output) { AgsCoreAudioServer *core_audio_server; AgsCoreAudioClient *default_client; AgsCoreAudioPort *core_audio_port; AgsCoreAudioMidiin *core_audio_midiin; gchar *str; if(is_output){ g_warning("GSequencer - MIDI output not implemented"); return(NULL); } core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager); #ifdef AGS_WITH_CORE_AUDIO if(core_audio_server->n_sequencers >= MIDIGetNumberOfDestinations()){ return(NULL); } #endif /* the default client */ if(core_audio_server->default_client == NULL){ g_object_set(core_audio_server, "default-core-audio-client", (GObject *) ags_core_audio_client_new((GObject *) core_audio_server), NULL); ags_core_audio_server_add_client(core_audio_server, core_audio_server->default_client); ags_core_audio_client_open((AgsCoreAudioClient *) core_audio_server->default_client, "ags-default-client"); if(AGS_CORE_AUDIO_CLIENT(core_audio_server->default_client)->graph == NULL){ g_warning("ags_core_audio_server.c - can't open core audio client"); } } default_client = (AgsCoreAudioClient *) core_audio_server->default_client; str = g_strdup_printf("ags-core-audio-midiin-%d", core_audio_server->n_sequencers); core_audio_midiin = ags_core_audio_midiin_new(core_audio_server->application_context); g_object_set(AGS_CORE_AUDIO_MIDIIN(core_audio_midiin), "core-audio-client", default_client, "device", str, NULL); g_object_set(default_client, "device", core_audio_midiin, NULL); /* register sequencer */ str = g_strdup_printf("ags-sequencer%d", core_audio_server->n_sequencers); #ifdef AGS_DEBUG g_message("%s", str); #endif core_audio_port = ags_core_audio_port_new((GObject *) default_client); core_audio_port->midi_port_number = core_audio_server->n_sequencers; g_object_set(core_audio_port, "core-audio-device", core_audio_midiin, NULL); ags_core_audio_client_add_port(default_client, (GObject *) core_audio_port); g_object_set(core_audio_midiin, "core-audio-port", core_audio_port, NULL); core_audio_midiin->port_name = (gchar **) malloc(2 * sizeof(gchar *)); core_audio_midiin->port_name[0] = g_strdup(str); core_audio_midiin->port_name[1] = NULL; ags_core_audio_port_register(core_audio_port, str, FALSE, TRUE, FALSE); core_audio_server->n_sequencers += 1; return((GObject *) core_audio_midiin); } void ags_core_audio_server_unregister_sequencer(AgsDistributedManager *distributed_manager, GObject *sequencer) { AgsCoreAudioServer *core_audio_server; AgsCoreAudioClient *default_client; GList *list; core_audio_server = AGS_CORE_AUDIO_SERVER(distributed_manager); /* the default client */ default_client = (AgsCoreAudioClient *) core_audio_server->default_client; if(default_client == NULL){ g_warning("GSequencer - no core_audio client"); return; } list = AGS_CORE_AUDIO_MIDIIN(sequencer)->core_audio_port; while(list != NULL){ ags_core_audio_port_unregister(list->data); ags_core_audio_client_remove_port(default_client, list->data); list = list->next; } ags_core_audio_client_remove_device(default_client, sequencer); if(default_client->port == NULL){ core_audio_server->n_sequencers = 0; } } GObject* ags_core_audio_server_register_default_soundcard(AgsCoreAudioServer *core_audio_server) { AgsCoreAudioClient *default_client; AgsCoreAudioDevout *core_audio_devout; AgsCoreAudioPort *core_audio_port; gchar *str; guint i; /* the default client */ if(core_audio_server->default_client == NULL){ g_object_set(core_audio_server, "default-core-audio-client", (GObject *) ags_core_audio_client_new((GObject *) core_audio_server), NULL); ags_core_audio_server_add_client(core_audio_server, core_audio_server->default_client); ags_core_audio_client_open((AgsCoreAudioClient *) core_audio_server->default_client, "ags-default-client"); if(AGS_CORE_AUDIO_CLIENT(core_audio_server->default_client)->graph == NULL){ g_warning("ags_core_audio_server.c - can't open core audio client"); return(NULL); } } default_client = (AgsCoreAudioClient *) core_audio_server->default_client; /* the soundcard */ core_audio_devout = ags_core_audio_devout_new(core_audio_server->application_context); g_object_set(AGS_CORE_AUDIO_DEVOUT(core_audio_devout), "core-audio-client", default_client, "device", "ags-default-devout", NULL); g_object_set(default_client, "device", core_audio_devout, NULL); /* register ports */ str = g_strdup_printf("ags-default-soundcard"); #ifdef AGS_DEBUG g_message("%s", str); #endif core_audio_port = ags_core_audio_port_new((GObject *) default_client); g_object_set(core_audio_port, "core-audio-device", core_audio_devout, NULL); ags_core_audio_client_add_port(default_client, (GObject *) core_audio_port); g_object_set(core_audio_devout, "core-audio-port", core_audio_port, NULL); core_audio_devout->port_name = (gchar **) malloc(2 * sizeof(gchar *)); core_audio_devout->port_name[0] = g_strdup(str); core_audio_devout->port_name[1] = NULL; ags_core_audio_port_register(core_audio_port, str, TRUE, FALSE, TRUE); g_free(str); return((GObject *) core_audio_devout); } /** * ags_core_audio_server_find_url: * @core_audio_server: the #AgsCoreAudioServer * @url: the url to find * * Find #AgsCoreAudioServer by url. * * Returns: the #GList containing a #AgsCoreAudioServer matching @url or %NULL * * Since: 1.0.0 */ GList* ags_core_audio_server_find_url(GList *core_audio_server, gchar *url) { while(core_audio_server != NULL){ if(!g_ascii_strcasecmp(AGS_CORE_AUDIO_SERVER(core_audio_server->data)->url, url)){ return(core_audio_server); } core_audio_server = core_audio_server->next; } return(NULL); } /** * ags_core_audio_server_find_client: * @core_audio_server: the #AgsCoreAudioServer * @client_uuid: the uuid to find * * Find #AgsCoreAudioClient by uuid. * * Returns: the #AgsCoreAudioClient found or %NULL * * Since: 1.0.0 */ GObject* ags_core_audio_server_find_client(AgsCoreAudioServer *core_audio_server, gchar *client_uuid) { GList *list; list = core_audio_server->client; while(list != NULL){ if(!g_ascii_strcasecmp(AGS_CORE_AUDIO_CLIENT(list->data)->uuid, client_uuid)){ return(list->data); } list = list->next; } return(NULL); } /** * ags_core_audio_server_find_port: * @core_audio_server: the #AgsCoreAudioServer * @port_uuid: the uuid to find * * Find #AgsCoreAudioPort by uuid. * * Returns: the #AgsCoreAudioPort found or %NULL * * Since: 1.0.0 */ GObject* ags_core_audio_server_find_port(AgsCoreAudioServer *core_audio_server, gchar *port_uuid) { GList *client, *port; client = core_audio_server->client; while(client != NULL){ port = AGS_CORE_AUDIO_CLIENT(client->data)->port; while(port != NULL){ if(!g_ascii_strcasecmp(AGS_CORE_AUDIO_CLIENT(port->data)->uuid, port_uuid)){ return(port->data); } port = port->next; } client = client->next; } return(NULL); } /** * ags_core_audio_server_add_client: * @core_audio_server: the #AgsCoreAudioServer * @core_audio_client: the #AgsCoreAudioClient to add * * Add @core_audio_client to @core_audio_server * * Since: 1.0.0 */ void ags_core_audio_server_add_client(AgsCoreAudioServer *core_audio_server, GObject *core_audio_client) { if(!AGS_IS_CORE_AUDIO_SERVER(core_audio_server) || !AGS_IS_CORE_AUDIO_CLIENT(core_audio_client)){ return; } g_object_ref(core_audio_client); core_audio_server->client = g_list_prepend(core_audio_server->client, core_audio_client); } /** * ags_core_audio_server_remove_client: * @core_audio_server: the #AgsCoreAudioServer * @core_audio_client: the #AgsCoreAudioClient to remove * * Remove @core_audio_client to @core_audio_server * * Since: 1.0.0 */ void ags_core_audio_server_remove_client(AgsCoreAudioServer *core_audio_server, GObject *core_audio_client) { if(!AGS_IS_CORE_AUDIO_SERVER(core_audio_server) || !AGS_IS_CORE_AUDIO_CLIENT(core_audio_client)){ return; } core_audio_server->client = g_list_remove(core_audio_server->client, core_audio_client); g_object_unref(core_audio_client); } /** * ags_core_audio_server_connect_client: * @core_audio_server: the #AgsCoreAudioServer * * Connect all clients. * * Since: 1.0.0 */ void ags_core_audio_server_connect_client(AgsCoreAudioServer *core_audio_server) { GList *client; client = core_audio_server->client; while(client != NULL){ ags_core_audio_client_open((AgsCoreAudioClient *) client->data, AGS_CORE_AUDIO_CLIENT(client->data)->name); ags_core_audio_client_activate(client->data); client = client->next; } } /** * ags_core_audio_server_new: * @application_context: the #AgsApplicationContext * @url: the URL as string * * Instantiate a new #AgsCoreAudioServer. * * Returns: the new #AgsCoreAudioServer * * Since: 1.0.0 */ AgsCoreAudioServer* ags_core_audio_server_new(GObject *application_context, gchar *url) { AgsCoreAudioServer *core_audio_server; core_audio_server = (AgsCoreAudioServer *) g_object_new(AGS_TYPE_CORE_AUDIO_SERVER, "application-context", application_context, "url", url, NULL); return(core_audio_server); } gsequencer-1.4.24/ags/audio/ags_recall_factory.c0000644000175000017500000057760213247044247016556 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_factory_class_init(AgsRecallFactoryClass *recall_factory_class); void ags_recall_factory_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_factory_init(AgsRecallFactory *recall_factory); GList* ags_recall_factory_create_play(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_play_master(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_prepare(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_copy(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_feed(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_stream(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_rt_stream(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_buffer(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_delay(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_count_beats(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_loop(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_copy_pattern(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_play_dssi(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_play_lv2(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_play_notation(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_peak(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_mute(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_volume(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_envelope(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_ladspa(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_lv2(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_dssi(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_record_midi(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_route_dssi(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); GList* ags_recall_factory_create_route_lv2(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); /** * SECTION:ags_recall_factory * @short_description: Factory pattern * @title: AgsRecallFactory * @section_id: * @include: ags/audio/ags_recall_factory.h * * #AgsRecallFactory instantiates and sets up recalls. */ static gpointer ags_recall_factory_parent_class = NULL; GType ags_recall_factory_get_type (void) { static GType ags_type_recall_factory = 0; if(!ags_type_recall_factory){ static const GTypeInfo ags_recall_factory_info = { sizeof (AgsRecallFactoryClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_factory_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallFactory), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_factory_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_factory_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_factory = g_type_register_static(G_TYPE_OBJECT, "AgsRecallFactory", &ags_recall_factory_info, 0); g_type_add_interface_static(ags_type_recall_factory, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_recall_factory); } void ags_recall_factory_class_init(AgsRecallFactoryClass *recall_factory) { ags_recall_factory_parent_class = g_type_class_peek_parent(recall_factory); } void ags_recall_factory_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = NULL; connectable->remove_from_registry = NULL; connectable->connect = NULL; connectable->disconnect = NULL; } void ags_recall_factory_init(AgsRecallFactory *recall_factory) { } GList* ags_recall_factory_create_play(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsPlayChannel *play_channel; AgsPlayChannelRun *play_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsPlayChannel */ play_channel = (AgsPlayChannel *) g_object_new(AGS_TYPE_PLAY_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK)); play_channel->audio_channel->port_value.ags_port_uint = start_audio_channel + j; ags_channel_add_recall(channel, (GObject *) play_channel, TRUE); recall = g_list_prepend(recall, play_channel); ags_connectable_connect(AGS_CONNECTABLE(play_channel)); /* AgsPlayChannelRun */ play_channel_run = (AgsPlayChannelRun *) g_object_new(AGS_TYPE_PLAY_CHANNEL_RUN, "soundcard", soundcard, "source", channel, "recall_channel", play_channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK)); ags_channel_add_recall(channel, (GObject *) play_channel_run, TRUE); recall = g_list_prepend(recall, play_channel_run); ags_connectable_connect(AGS_CONNECTABLE(play_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsPlayChannel */ play_channel = (AgsPlayChannel *) g_object_new(AGS_TYPE_PLAY_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(play_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK)); play_channel->audio_channel->port_value.ags_port_uint = start_audio_channel + j; ags_channel_add_recall(channel, (GObject *) play_channel, FALSE); recall = g_list_prepend(recall, play_channel); ags_connectable_connect(AGS_CONNECTABLE(play_channel)); /* AgsPlayChannelRun */ play_channel_run = (AgsPlayChannelRun *) g_object_new(AGS_TYPE_PLAY_CHANNEL_RUN, "soundcard", soundcard, "source", channel, "recall_channel", play_channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(play_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK)); ags_channel_add_recall(channel, (GObject *) play_channel_run, FALSE); recall = g_list_prepend(recall, play_channel_run); ags_connectable_connect(AGS_CONNECTABLE(play_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_play_master(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsPlayAudio *play_audio; AgsPlayChannel *play_channel; AgsPlayChannelRunMaster *play_channel_run_master; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if((AGS_RECALL_FACTORY_REMAP & (create_flags)) == 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); /* */ play_audio = (AgsPlayAudio *) g_object_new(AGS_TYPE_PLAY_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); AGS_RECALL(play_audio)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION); ags_audio_add_recall(audio, (GObject *) play_audio, TRUE); recall = g_list_prepend(recall, play_audio); }else{ pthread_mutex_lock(audio_mutex); if(play_container == NULL){ list = ags_recall_find_type(audio->play, AGS_TYPE_PLAY_AUDIO); play_audio = AGS_PLAY_AUDIO(list->data); recall = g_list_prepend(recall, play_audio); play_container = AGS_RECALL_CONTAINER(AGS_RECALL(play_audio)->container); }else{ play_audio = AGS_PLAY_AUDIO(play_container->recall_audio); recall = g_list_prepend(recall, play_audio); } pthread_mutex_unlock(audio_mutex); } for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsPlayChannel */ play_channel = (AgsPlayChannel *) g_object_new(AGS_TYPE_PLAY_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); play_channel->audio_channel->port_value.ags_port_uint = start_audio_channel + j; ags_channel_add_recall(channel, (GObject *) play_channel, TRUE); recall = g_list_prepend(recall, play_channel); ags_connectable_connect(AGS_CONNECTABLE(play_channel)); /* AgsPlayChannelRun */ play_channel_run_master = (AgsPlayChannelRunMaster *) g_object_new(AGS_TYPE_PLAY_CHANNEL_RUN_MASTER, "soundcard", soundcard, "source", channel, "recall_channel", play_channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_channel_run_master), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) play_channel_run_master, TRUE); recall = g_list_prepend(recall, play_channel_run_master); ags_connectable_connect(AGS_CONNECTABLE(play_channel_run_master)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if((AGS_RECALL_FACTORY_REMAP & (create_flags)) == 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); /* */ play_audio = (AgsPlayAudio *) g_object_new(AGS_TYPE_PLAY_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); AGS_RECALL(play_audio)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION); ags_audio_add_recall(audio, (GObject *) play_audio, FALSE); recall = g_list_prepend(recall, play_audio); }else{ pthread_mutex_lock(audio_mutex); if(recall_container == NULL){ list = ags_recall_find_type(audio->recall, AGS_TYPE_PLAY_AUDIO); play_audio = AGS_PLAY_AUDIO(list->data); recall = g_list_prepend(recall, play_audio); recall_container = AGS_RECALL_CONTAINER(AGS_RECALL(play_audio)->container); }else{ play_audio = AGS_PLAY_AUDIO(recall_container->recall_audio); recall = g_list_prepend(recall, play_audio); } pthread_mutex_unlock(audio_mutex); } for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsPlayChannel */ play_channel = (AgsPlayChannel *) g_object_new(AGS_TYPE_PLAY_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(play_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); play_channel->audio_channel->port_value.ags_port_uint = start_audio_channel + j; ags_channel_add_recall(channel, (GObject *) play_channel, FALSE); recall = g_list_prepend(recall, play_channel); ags_connectable_connect(AGS_CONNECTABLE(play_channel)); /* AgsPlayChannelRun */ play_channel_run_master = (AgsPlayChannelRunMaster *) g_object_new(AGS_TYPE_PLAY_CHANNEL_RUN_MASTER, "soundcard", soundcard, "source", channel, "recall_channel", play_channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(play_channel_run_master), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) play_channel_run_master, FALSE); recall = g_list_prepend(recall, play_channel_run_master); ags_connectable_connect(AGS_CONNECTABLE(play_channel_run_master)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_prepare(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsPrepareChannel *prepare_channel; AgsPrepareChannelRun *prepare_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel, *current; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *current_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ gboolean found_prepare; channel = start; for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ current = ags_channel_nth(output, start_audio_channel + j); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check output */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* check output present */ pthread_mutex_lock(channel_mutex); list = channel->recall; found_prepare = FALSE; while((list = ags_recall_template_find_type(list, AGS_TYPE_PREPARE_CHANNEL)) != NULL){ if(AGS_RECALL_CHANNEL(list->data)->destination == current){ found_prepare = TRUE; break; } list = list->next; } pthread_mutex_unlock(channel_mutex); if(found_prepare){ /* iterate - current */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); continue; } if(play_container == NULL){ play_container = ags_recall_container_new(); play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); } ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsPrepareChannel */ prepare_channel = (AgsPrepareChannel *) g_object_new(AGS_TYPE_PREPARE_CHANNEL, "soundcard", soundcard, "source", channel, "destination", current, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(prepare_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(prepare_channel); channel->play = g_list_append(channel->play, prepare_channel); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, prepare_channel); ags_connectable_connect(AGS_CONNECTABLE(prepare_channel)); /* AgsPrepareChannelRun */ prepare_channel_run = (AgsPrepareChannelRun *) g_object_new(AGS_TYPE_PREPARE_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", prepare_channel, "source", channel, "destination", current, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(prepare_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(prepare_channel); channel->play = g_list_append(channel->play, prepare_channel_run); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, prepare_channel_run); ags_connectable_connect(AGS_CONNECTABLE(prepare_channel_run)); /* iterate */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ gboolean found_prepare; channel = start; for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ current = ags_channel_nth(output, start_audio_channel + j); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check output */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* check output present */ pthread_mutex_lock(channel_mutex); list = channel->recall; found_prepare = FALSE; while((list = ags_recall_template_find_type(list, AGS_TYPE_PREPARE_CHANNEL)) != NULL){ if(AGS_RECALL_CHANNEL(list->data)->destination == current){ found_prepare = TRUE; break; } list = list->next; } pthread_mutex_unlock(channel_mutex); if(found_prepare){ /* iterate */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); continue; } if(recall_container == NULL){ recall_container = ags_recall_container_new(); ags_audio_add_recall_container(audio, (GObject *) recall_container); } ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsPrepareChannel */ prepare_channel = (AgsPrepareChannel *) g_object_new(AGS_TYPE_PREPARE_CHANNEL, "soundcard", soundcard, "source", channel, "destination", current, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(prepare_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(prepare_channel); channel->recall = g_list_append(channel->recall, prepare_channel); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, prepare_channel); ags_connectable_connect(AGS_CONNECTABLE(prepare_channel)); /* AgsPrepareChannelRun */ prepare_channel_run = (AgsPrepareChannelRun *) g_object_new(AGS_TYPE_PREPARE_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", prepare_channel, "source", channel, "destination", current, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(prepare_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(prepare_channel); channel->recall = g_list_append(channel->recall, prepare_channel_run); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, prepare_channel_run); ags_connectable_connect(AGS_CONNECTABLE(prepare_channel_run)); /* iterate */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_copy(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsCopyChannel *copy_channel; AgsCopyChannelRun *copy_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel, *current; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *current_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ gboolean found_copy; channel = start; for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ current = ags_channel_nth(output, start_audio_channel + j); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check output */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* check output present */ pthread_mutex_lock(channel_mutex); list = channel->recall; found_copy = FALSE; while((list = ags_recall_template_find_type(list, AGS_TYPE_COPY_CHANNEL)) != NULL){ if(AGS_RECALL_CHANNEL(list->data)->destination == current){ found_copy = TRUE; break; } list = list->next; } pthread_mutex_unlock(channel_mutex); if(found_copy){ /* iterate - current */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); continue; } if(play_container == NULL){ play_container = ags_recall_container_new(); play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); } ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsCopyChannel */ copy_channel = (AgsCopyChannel *) g_object_new(AGS_TYPE_COPY_CHANNEL, "soundcard", soundcard, "source", channel, "destination", current, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(copy_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(copy_channel); channel->play = g_list_append(channel->play, copy_channel); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, copy_channel); ags_connectable_connect(AGS_CONNECTABLE(copy_channel)); /* AgsCopyChannelRun */ copy_channel_run = (AgsCopyChannelRun *) g_object_new(AGS_TYPE_COPY_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", copy_channel, "source", channel, "destination", current, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(copy_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(copy_channel); channel->play = g_list_append(channel->play, copy_channel_run); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, copy_channel_run); ags_connectable_connect(AGS_CONNECTABLE(copy_channel_run)); /* iterate */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ gboolean found_copy; channel = start; for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ current = ags_channel_nth(output, start_audio_channel + j); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check output */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* check output present */ pthread_mutex_lock(channel_mutex); list = channel->recall; found_copy = FALSE; while((list = ags_recall_template_find_type(list, AGS_TYPE_COPY_CHANNEL)) != NULL){ if(AGS_RECALL_CHANNEL(list->data)->destination == current){ found_copy = TRUE; break; } list = list->next; } pthread_mutex_unlock(channel_mutex); if(found_copy){ /* iterate */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); continue; } if(recall_container == NULL){ recall_container = ags_recall_container_new(); ags_audio_add_recall_container(audio, (GObject *) recall_container); } ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsCopyChannel */ copy_channel = (AgsCopyChannel *) g_object_new(AGS_TYPE_COPY_CHANNEL, "soundcard", soundcard, "source", channel, "destination", current, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(copy_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(copy_channel); channel->recall = g_list_append(channel->recall, copy_channel); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, copy_channel); ags_connectable_connect(AGS_CONNECTABLE(copy_channel)); /* AgsCopyChannelRun */ copy_channel_run = (AgsCopyChannelRun *) g_object_new(AGS_TYPE_COPY_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", copy_channel, "source", channel, "destination", current, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(copy_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(copy_channel); channel->recall = g_list_append(channel->recall, copy_channel_run); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, copy_channel_run); ags_connectable_connect(AGS_CONNECTABLE(copy_channel_run)); /* iterate */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_feed(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsFeedChannel *feed_channel; AgsFeedChannelRun *feed_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsFeedChannel */ feed_channel = (AgsFeedChannel *) g_object_new(AGS_TYPE_FEED_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(feed_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) feed_channel, TRUE); recall = g_list_prepend(recall, feed_channel); ags_connectable_connect(AGS_CONNECTABLE(feed_channel)); /* AgsFeedChannelRun */ feed_channel_run = (AgsFeedChannelRun *) g_object_new(AGS_TYPE_FEED_CHANNEL_RUN, "soundcard", soundcard, "recall-channel", feed_channel, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(feed_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) feed_channel_run, TRUE); recall = g_list_prepend(recall, feed_channel_run); ags_connectable_connect(AGS_CONNECTABLE(feed_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsFeedChannel */ feed_channel = (AgsFeedChannel *) g_object_new(AGS_TYPE_FEED_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(feed_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) feed_channel, FALSE); recall = g_list_prepend(recall, feed_channel); ags_connectable_connect(AGS_CONNECTABLE(feed_channel)); /* AgsFeedChannelRun */ feed_channel_run = (AgsFeedChannelRun *) g_object_new(AGS_TYPE_FEED_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", feed_channel, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(feed_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) feed_channel_run, FALSE); recall = g_list_prepend(recall, feed_channel_run); ags_connectable_connect(AGS_CONNECTABLE(feed_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_stream(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsStreamChannel *stream_channel; AgsStreamChannelRun *stream_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsStreamChannel */ stream_channel = (AgsStreamChannel *) g_object_new(AGS_TYPE_STREAM_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(stream_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) stream_channel, TRUE); recall = g_list_prepend(recall, stream_channel); ags_connectable_connect(AGS_CONNECTABLE(stream_channel)); /* AgsStreamChannelRun */ stream_channel_run = (AgsStreamChannelRun *) g_object_new(AGS_TYPE_STREAM_CHANNEL_RUN, "soundcard", soundcard, "recall-channel", stream_channel, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(stream_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) stream_channel_run, TRUE); recall = g_list_prepend(recall, stream_channel_run); ags_connectable_connect(AGS_CONNECTABLE(stream_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsStreamChannel */ stream_channel = (AgsStreamChannel *) g_object_new(AGS_TYPE_STREAM_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(stream_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) stream_channel, FALSE); recall = g_list_prepend(recall, stream_channel); ags_connectable_connect(AGS_CONNECTABLE(stream_channel)); /* AgsStreamChannelRun */ stream_channel_run = (AgsStreamChannelRun *) g_object_new(AGS_TYPE_STREAM_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", stream_channel, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(stream_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) stream_channel_run, FALSE); recall = g_list_prepend(recall, stream_channel_run); ags_connectable_connect(AGS_CONNECTABLE(stream_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_rt_stream(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsRtStreamChannel *rt_stream_channel; AgsRtStreamChannelRun *rt_stream_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsRtStreamChannel */ rt_stream_channel = (AgsRtStreamChannel *) g_object_new(AGS_TYPE_RT_STREAM_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(rt_stream_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) rt_stream_channel, TRUE); recall = g_list_prepend(recall, rt_stream_channel); ags_connectable_connect(AGS_CONNECTABLE(rt_stream_channel)); /* AgsRtStreamChannelRun */ rt_stream_channel_run = (AgsRtStreamChannelRun *) g_object_new(AGS_TYPE_RT_STREAM_CHANNEL_RUN, "soundcard", soundcard, "recall-channel", rt_stream_channel, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(rt_stream_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) rt_stream_channel_run, TRUE); recall = g_list_prepend(recall, rt_stream_channel_run); ags_connectable_connect(AGS_CONNECTABLE(rt_stream_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsRtStreamChannel */ rt_stream_channel = (AgsRtStreamChannel *) g_object_new(AGS_TYPE_RT_STREAM_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(rt_stream_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) rt_stream_channel, FALSE); recall = g_list_prepend(recall, rt_stream_channel); ags_connectable_connect(AGS_CONNECTABLE(rt_stream_channel)); /* AgsRtStreamChannelRun */ rt_stream_channel_run = (AgsRtStreamChannelRun *) g_object_new(AGS_TYPE_RT_STREAM_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", rt_stream_channel, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(rt_stream_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) rt_stream_channel_run, FALSE); recall = g_list_prepend(recall, rt_stream_channel_run); ags_connectable_connect(AGS_CONNECTABLE(rt_stream_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_buffer(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsBufferChannel *buffer_channel; AgsBufferChannelRun *buffer_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel, *current; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *current_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ gboolean found_buffer; channel = start; for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ current = ags_channel_nth(output, start_audio_channel + j); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check output */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* check output present */ pthread_mutex_lock(channel_mutex); list = channel->recall; found_buffer = FALSE; while((list = ags_recall_template_find_type(list, AGS_TYPE_BUFFER_CHANNEL)) != NULL){ if(AGS_RECALL_CHANNEL(list->data)->destination == current){ found_buffer = TRUE; break; } list = list->next; } pthread_mutex_unlock(channel_mutex); if(found_buffer){ /* iterate - current */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); continue; } if(play_container == NULL){ play_container = ags_recall_container_new(); play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); } ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsBufferChannel */ buffer_channel = (AgsBufferChannel *) g_object_new(AGS_TYPE_BUFFER_CHANNEL, "soundcard", soundcard, "source", channel, "destination", current, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(buffer_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(buffer_channel); channel->play = g_list_append(channel->play, buffer_channel); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, buffer_channel); ags_connectable_connect(AGS_CONNECTABLE(buffer_channel)); /* AgsBufferChannelRun */ buffer_channel_run = (AgsBufferChannelRun *) g_object_new(AGS_TYPE_BUFFER_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", buffer_channel, "source", channel, "destination", current, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(buffer_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(buffer_channel); channel->play = g_list_append(channel->play, buffer_channel_run); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, buffer_channel_run); ags_connectable_connect(AGS_CONNECTABLE(buffer_channel_run)); /* iterate - current */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ gboolean found_buffer; channel = start; for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ current = ags_channel_nth(output, start_audio_channel + j); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* check output */ while(current != NULL){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* check output present */ pthread_mutex_lock(channel_mutex); list = channel->recall; found_buffer = FALSE; while((list = ags_recall_template_find_type(list, AGS_TYPE_BUFFER_CHANNEL)) != NULL){ if(AGS_RECALL_CHANNEL(list->data)->destination == current){ found_buffer = TRUE; break; } list = list->next; } pthread_mutex_unlock(channel_mutex); if(found_buffer){ /* iterate - current */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); continue; } if(recall_container == NULL){ recall_container = ags_recall_container_new(); ags_audio_add_recall_container(audio, (GObject *) recall_container); } ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsBufferChannel */ buffer_channel = (AgsBufferChannel *) g_object_new(AGS_TYPE_BUFFER_CHANNEL, "soundcard", soundcard, "source", channel, "destination", current, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(buffer_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(buffer_channel); channel->recall = g_list_append(channel->recall, buffer_channel); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, buffer_channel); ags_connectable_connect(AGS_CONNECTABLE(buffer_channel)); /* AgsBufferChannelRun */ buffer_channel_run = (AgsBufferChannelRun *) g_object_new(AGS_TYPE_BUFFER_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", buffer_channel, "source", channel, "destination", current, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(buffer_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); pthread_mutex_lock(channel_mutex); g_object_ref(buffer_channel); channel->recall = g_list_append(channel->recall, buffer_channel_run); pthread_mutex_unlock(channel_mutex); recall = g_list_prepend(recall, buffer_channel_run); ags_connectable_connect(AGS_CONNECTABLE(buffer_channel_run)); /* iterate - current */ pthread_mutex_lock(current_mutex); current = current->next_pad; pthread_mutex_unlock(current_mutex); } /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_delay(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsDelayAudio *delay_audio; AgsDelayAudioRun *delay_audio_run; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* list */ recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); delay_audio = (AgsDelayAudio *) g_object_new(AGS_TYPE_DELAY_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(delay_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) delay_audio, TRUE); recall = g_list_prepend(recall, delay_audio); ags_connectable_connect(AGS_CONNECTABLE(delay_audio)); delay_audio_run = (AgsDelayAudioRun *) g_object_new(AGS_TYPE_DELAY_AUDIO_RUN, "soundcard", soundcard, "recall_audio", delay_audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(delay_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) delay_audio_run, TRUE); recall = g_list_prepend(recall, delay_audio_run); ags_connectable_connect(AGS_CONNECTABLE(delay_audio_run)); } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); delay_audio = (AgsDelayAudio *) g_object_new(AGS_TYPE_DELAY_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(delay_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) delay_audio, FALSE); recall = g_list_prepend(recall, delay_audio); ags_connectable_connect(AGS_CONNECTABLE(delay_audio)); delay_audio_run = (AgsDelayAudioRun *) g_object_new(AGS_TYPE_DELAY_AUDIO_RUN, "soundcard", soundcard, "recall_audio", delay_audio, "recall_container", recall_container, //TODO:JK: add missing dependency "delay-audio" NULL); ags_recall_set_flags(AGS_RECALL(delay_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) delay_audio_run, FALSE); recall = g_list_prepend(recall, delay_audio_run); ags_connectable_connect(AGS_CONNECTABLE(delay_audio_run)); } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_count_beats(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsCountBeatsAudio *count_beats_audio; AgsCountBeatsAudioRun *count_beats_audio_run; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* list */ recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); count_beats_audio = (AgsCountBeatsAudio *) g_object_new(AGS_TYPE_COUNT_BEATS_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(count_beats_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) count_beats_audio, TRUE); recall = g_list_prepend(recall, count_beats_audio); ags_connectable_connect(AGS_CONNECTABLE(count_beats_audio)); count_beats_audio_run = (AgsCountBeatsAudioRun *) g_object_new(AGS_TYPE_COUNT_BEATS_AUDIO_RUN, "soundcard", soundcard, "recall_audio", count_beats_audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(count_beats_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) count_beats_audio_run, TRUE); recall = g_list_prepend(recall, count_beats_audio_run); ags_connectable_connect(AGS_CONNECTABLE(count_beats_audio_run)); } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); count_beats_audio = (AgsCountBeatsAudio *) g_object_new(AGS_TYPE_COUNT_BEATS_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(count_beats_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) count_beats_audio, FALSE); recall = g_list_prepend(recall, count_beats_audio); ags_connectable_connect(AGS_CONNECTABLE(count_beats_audio)); count_beats_audio_run = (AgsCountBeatsAudioRun *) g_object_new(AGS_TYPE_COUNT_BEATS_AUDIO_RUN, "soundcard", soundcard, "recall_audio", count_beats_audio, "recall_container", recall_container, //TODO:JK: add missing dependency "delay-audio" NULL); ags_recall_set_flags(AGS_RECALL(count_beats_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) count_beats_audio_run, FALSE); recall = g_list_prepend(recall, count_beats_audio_run); ags_connectable_connect(AGS_CONNECTABLE(count_beats_audio_run)); } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_loop(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsLoopChannel *loop_channel; AgsLoopChannelRun *loop_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if((AGS_RECALL_FACTORY_REMAP & (create_flags)) == 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); }else{ //TODO:JK: implement me } for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsLoopChannel */ loop_channel = (AgsLoopChannel *) g_object_new(AGS_TYPE_LOOP_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, //TODO:JK: add missing dependency "delay_audio" NULL); ags_recall_set_flags(AGS_RECALL(loop_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) loop_channel, TRUE); recall = g_list_prepend(recall, loop_channel); ags_connectable_connect(AGS_CONNECTABLE(loop_channel)); /* AgsLoopChannelRun */ loop_channel_run = (AgsLoopChannelRun *) g_object_new(AGS_TYPE_LOOP_CHANNEL_RUN, "soundcard", soundcard, "source", channel, "recall_channel", loop_channel, "recall_container", play_container, //TODO:JK: add missing dependency "count_beats_audio_run" NULL); ags_recall_set_flags(AGS_RECALL(loop_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) loop_channel_run, TRUE); recall = g_list_prepend(recall, loop_channel_run); ags_connectable_connect(AGS_CONNECTABLE(loop_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if((AGS_RECALL_FACTORY_REMAP & (create_flags)) == 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); }else{ //TODO:JK: implement me } for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsLoopChannel */ loop_channel = (AgsLoopChannel *) g_object_new(AGS_TYPE_LOOP_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, //TODO:JK: add missing dependency "delay_audio" NULL); ags_recall_set_flags(AGS_RECALL(loop_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) loop_channel, FALSE); recall = g_list_prepend(recall, loop_channel); ags_connectable_connect(AGS_CONNECTABLE(loop_channel)); /* AgsLoopChannelRun */ loop_channel_run = (AgsLoopChannelRun *) g_object_new(AGS_TYPE_LOOP_CHANNEL_RUN, "soundcard", soundcard, "source", channel, "recall_channel", loop_channel, "recall_container", recall_container, //TODO:JK: add missing dependency "count_beats_audio_run" NULL); ags_recall_set_flags(AGS_RECALL(loop_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) loop_channel_run, FALSE); recall = g_list_prepend(recall, loop_channel_run); ags_connectable_connect(AGS_CONNECTABLE(loop_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_copy_pattern(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsCopyPatternAudio *copy_pattern_audio; AgsCopyPatternAudioRun *copy_pattern_audio_run; AgsCopyPatternChannel *copy_pattern_channel; AgsCopyPatternChannelRun *copy_pattern_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if((AGS_RECALL_FACTORY_REMAP & (create_flags)) == 0 || ags_recall_find_type(audio->play, AGS_TYPE_COPY_PATTERN_AUDIO) == NULL){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); /* AgsCopyPatternAudio */ copy_pattern_audio = (AgsCopyPatternAudio *) g_object_new(AGS_TYPE_COPY_PATTERN_AUDIO, "soundcard", soundcard, "audio", audio, "recall-container", play_container, NULL); AGS_RECALL(copy_pattern_audio)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_SEQUENCER); ags_audio_add_recall(audio, (GObject *) copy_pattern_audio, TRUE); recall = g_list_prepend(recall, copy_pattern_audio); /* AgsCopyPatternAudioRun */ copy_pattern_audio_run = (AgsCopyPatternAudioRun *) g_object_new(AGS_TYPE_COPY_PATTERN_AUDIO_RUN, "soundcard", soundcard, // "recall_audio", copy_pattern_audio, "recall-container", play_container, //TODO:JK: add missing dependency "count_beats_audio_run" NULL); AGS_RECALL(copy_pattern_audio_run)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_SEQUENCER); ags_audio_add_recall(audio, (GObject *) copy_pattern_audio_run, TRUE); recall = g_list_prepend(recall, copy_pattern_audio_run); }else{ pthread_mutex_lock(audio_mutex); if(play_container == NULL){ list = ags_recall_find_type(audio->play, AGS_TYPE_COPY_PATTERN_AUDIO); copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(list->data); recall = g_list_prepend(recall, copy_pattern_audio); play_container = AGS_RECALL_CONTAINER(AGS_RECALL(copy_pattern_audio)->container); list = ags_recall_find_template(play_container->recall_audio_run); copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(list->data); recall = g_list_prepend(recall, copy_pattern_audio_run); }else{ copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(play_container->recall_audio); recall = g_list_prepend(recall, copy_pattern_audio); list = ags_recall_find_template(play_container->recall_audio_run); copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(list->data); recall = g_list_prepend(recall, copy_pattern_audio_run); } pthread_mutex_unlock(audio_mutex); } for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsCopyPatternChannel in channel->recall */ copy_pattern_channel = (AgsCopyPatternChannel *) g_object_new(AGS_TYPE_COPY_PATTERN_CHANNEL, "soundcard", soundcard, "source", channel, // "destination", destination, "recall_container", play_container, // "pattern", channel->pattern->data, NULL); ags_recall_set_flags(AGS_RECALL(copy_pattern_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_SEQUENCER)); ags_channel_add_recall(channel, (GObject *) copy_pattern_channel, TRUE); recall = g_list_prepend(recall, copy_pattern_channel); ags_connectable_connect(AGS_CONNECTABLE(copy_pattern_channel)); /* AgsCopyPatternChannelRun */ copy_pattern_channel_run = (AgsCopyPatternChannelRun *) g_object_new(AGS_TYPE_COPY_PATTERN_CHANNEL_RUN, "soundcard", soundcard, "source", channel, // "destination", destination, // "recall_channel", copy_pattern_channel, // "recall_audio_run", copy_pattern_audio_run, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(copy_pattern_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_SEQUENCER)); ags_channel_add_recall(channel, (GObject *) copy_pattern_channel_run, TRUE); recall = g_list_prepend(recall, copy_pattern_channel_run); ags_connectable_connect(AGS_CONNECTABLE(copy_pattern_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if((AGS_RECALL_FACTORY_REMAP & (create_flags)) == 0 || ags_recall_find_type(audio->recall, AGS_TYPE_COPY_PATTERN_AUDIO) == NULL){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); /* AgsCopyPatternAudio */ copy_pattern_audio = (AgsCopyPatternAudio *) g_object_new(AGS_TYPE_COPY_PATTERN_AUDIO, "soundcard", soundcard, "audio", audio, "recall-container", recall_container, NULL); AGS_RECALL(copy_pattern_audio)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_SEQUENCER); ags_audio_add_recall(audio, (GObject *) copy_pattern_audio, FALSE); recall = g_list_prepend(recall, copy_pattern_audio); /* AgsCopyPatternAudioRun */ copy_pattern_audio_run = (AgsCopyPatternAudioRun *) g_object_new(AGS_TYPE_COPY_PATTERN_AUDIO_RUN, "soundcard", soundcard, // "recall_audio", copy_pattern_audio, "recall-container", recall_container, //TODO:JK: add missing dependency "count_beats_audio_run" NULL); AGS_RECALL(copy_pattern_audio_run)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_SEQUENCER); ags_audio_add_recall(audio, (GObject *) copy_pattern_audio_run, FALSE); recall = g_list_prepend(recall, copy_pattern_audio_run); }else{ pthread_mutex_lock(audio_mutex); if(recall_container == NULL){ list = ags_recall_template_find_type(audio->recall, AGS_TYPE_COPY_PATTERN_AUDIO); if(list != NULL){ copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(list->data); recall = g_list_prepend(recall, copy_pattern_audio); recall_container = AGS_RECALL_CONTAINER(AGS_RECALL(copy_pattern_audio)->container); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(list->data); recall = g_list_prepend(recall, copy_pattern_audio_run); }else{ copy_pattern_audio_run = NULL; g_critical("no AgsCopyPatternAudioRun template"); } } }else{ copy_pattern_audio = AGS_COPY_PATTERN_AUDIO(recall_container->recall_audio); recall = g_list_prepend(recall, copy_pattern_audio); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(list->data); recall = g_list_prepend(recall, copy_pattern_audio_run); }else{ copy_pattern_audio_run = NULL; g_critical("no AgsCopyPatternAudioRun template"); } } pthread_mutex_unlock(audio_mutex); } for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsCopyPatternChannel in channel->recall */ copy_pattern_channel = (AgsCopyPatternChannel *) g_object_new(AGS_TYPE_COPY_PATTERN_CHANNEL, "soundcard", soundcard, "source", channel, // "destination", destination, "recall-container", recall_container, //"pattern", channel->pattern->data, NULL); ags_recall_set_flags(AGS_RECALL(copy_pattern_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_SEQUENCER)); ags_channel_add_recall(channel, (GObject *) copy_pattern_channel, FALSE); recall = g_list_prepend(recall, copy_pattern_channel); ags_connectable_connect(AGS_CONNECTABLE(copy_pattern_channel)); /* AgsCopyPatternChannelRun */ copy_pattern_channel_run = (AgsCopyPatternChannelRun *) g_object_new(AGS_TYPE_COPY_PATTERN_CHANNEL_RUN, "soundcard", soundcard, "source", channel, // "destination", destination, // "recall_channel", copy_pattern_channel, // "recall_audio_run", copy_pattern_audio_run, "recall-container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(copy_pattern_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_SEQUENCER)); ags_channel_add_recall(channel, (GObject *) copy_pattern_channel_run, FALSE); recall = g_list_prepend(recall, copy_pattern_channel_run); ags_connectable_connect(AGS_CONNECTABLE(copy_pattern_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_play_dssi(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsPlayDssiAudio *play_dssi_audio; AgsPlayDssiAudioRun *play_dssi_audio_run; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* list */ recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); play_dssi_audio = (AgsPlayDssiAudio *) g_object_new(AGS_TYPE_PLAY_DSSI_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_dssi_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); if((AGS_RECALL_FACTORY_BULK & create_flags) != 0){ AGS_RECALL(play_dssi_audio)->flags |= AGS_RECALL_BULK_MODE; } ags_audio_add_recall(audio, (GObject *) play_dssi_audio, TRUE); recall = g_list_prepend(recall, play_dssi_audio); ags_connectable_connect(AGS_CONNECTABLE(play_dssi_audio)); play_dssi_audio_run = (AgsPlayDssiAudioRun *) g_object_new(AGS_TYPE_PLAY_DSSI_AUDIO_RUN, "soundcard", soundcard, "recall_audio", play_dssi_audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_dssi_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) play_dssi_audio_run, TRUE); recall = g_list_prepend(recall, play_dssi_audio_run); ags_connectable_connect(AGS_CONNECTABLE(play_dssi_audio_run)); } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); play_dssi_audio = (AgsPlayDssiAudio *) g_object_new(AGS_TYPE_PLAY_DSSI_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(play_dssi_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); if((AGS_RECALL_FACTORY_BULK & create_flags) != 0){ AGS_RECALL(play_dssi_audio)->flags |= AGS_RECALL_BULK_MODE; } ags_audio_add_recall(audio, (GObject *) play_dssi_audio, FALSE); recall = g_list_prepend(recall, play_dssi_audio); ags_connectable_connect(AGS_CONNECTABLE(play_dssi_audio)); play_dssi_audio_run = (AgsPlayDssiAudioRun *) g_object_new(AGS_TYPE_PLAY_DSSI_AUDIO_RUN, "soundcard", soundcard, "recall_audio", play_dssi_audio, "recall_container", recall_container, //TODO:JK: add missing dependency "delay-audio" NULL); ags_recall_set_flags(AGS_RECALL(play_dssi_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) play_dssi_audio_run, FALSE); recall = g_list_prepend(recall, play_dssi_audio_run); ags_connectable_connect(AGS_CONNECTABLE(play_dssi_audio_run)); } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_play_lv2(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsPlayLv2Audio *play_lv2_audio; AgsPlayLv2AudioRun *play_lv2_audio_run; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* list */ recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); play_lv2_audio = (AgsPlayLv2Audio *) g_object_new(AGS_TYPE_PLAY_LV2_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_lv2_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) play_lv2_audio, TRUE); recall = g_list_prepend(recall, play_lv2_audio); ags_connectable_connect(AGS_CONNECTABLE(play_lv2_audio)); play_lv2_audio_run = (AgsPlayLv2AudioRun *) g_object_new(AGS_TYPE_PLAY_LV2_AUDIO_RUN, "soundcard", soundcard, "recall_audio", play_lv2_audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_lv2_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); if((AGS_RECALL_FACTORY_BULK & create_flags) != 0){ AGS_RECALL(play_lv2_audio)->flags |= AGS_RECALL_BULK_MODE; } ags_audio_add_recall(audio, (GObject *) play_lv2_audio_run, TRUE); recall = g_list_prepend(recall, play_lv2_audio_run); ags_connectable_connect(AGS_CONNECTABLE(play_lv2_audio_run)); } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); play_lv2_audio = (AgsPlayLv2Audio *) g_object_new(AGS_TYPE_PLAY_LV2_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(play_lv2_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); if((AGS_RECALL_FACTORY_BULK & create_flags) != 0){ AGS_RECALL(play_lv2_audio)->flags |= AGS_RECALL_BULK_MODE; } ags_audio_add_recall(audio, (GObject *) play_lv2_audio, FALSE); recall = g_list_prepend(recall, play_lv2_audio); ags_connectable_connect(AGS_CONNECTABLE(play_lv2_audio)); play_lv2_audio_run = (AgsPlayLv2AudioRun *) g_object_new(AGS_TYPE_PLAY_LV2_AUDIO_RUN, "soundcard", soundcard, "recall_audio", play_lv2_audio, "recall_container", recall_container, //TODO:JK: add missing dependency "delay-audio" NULL); ags_recall_set_flags(AGS_RECALL(play_lv2_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) play_lv2_audio_run, FALSE); recall = g_list_prepend(recall, play_lv2_audio_run); ags_connectable_connect(AGS_CONNECTABLE(play_lv2_audio_run)); } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_play_notation(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsPlayNotationAudio *play_notation_audio; AgsPlayNotationAudioRun *play_notation_audio_run; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* list */ recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); play_notation_audio = (AgsPlayNotationAudio *) g_object_new(AGS_TYPE_PLAY_NOTATION_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_notation_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) play_notation_audio, TRUE); recall = g_list_prepend(recall, play_notation_audio); ags_connectable_connect(AGS_CONNECTABLE(play_notation_audio)); play_notation_audio_run = (AgsPlayNotationAudioRun *) g_object_new(AGS_TYPE_PLAY_NOTATION_AUDIO_RUN, "soundcard", soundcard, "recall_audio", play_notation_audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(play_notation_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) play_notation_audio_run, TRUE); recall = g_list_prepend(recall, play_notation_audio_run); ags_connectable_connect(AGS_CONNECTABLE(play_notation_audio_run)); } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); play_notation_audio = (AgsPlayNotationAudio *) g_object_new(AGS_TYPE_PLAY_NOTATION_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(play_notation_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) play_notation_audio, FALSE); recall = g_list_prepend(recall, play_notation_audio); ags_connectable_connect(AGS_CONNECTABLE(play_notation_audio)); play_notation_audio_run = (AgsPlayNotationAudioRun *) g_object_new(AGS_TYPE_PLAY_NOTATION_AUDIO_RUN, "soundcard", soundcard, "recall_audio", play_notation_audio, "recall_container", recall_container, //TODO:JK: add missing dependency "delay-audio" NULL); ags_recall_set_flags(AGS_RECALL(play_notation_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) play_notation_audio_run, FALSE); recall = g_list_prepend(recall, play_notation_audio_run); ags_connectable_connect(AGS_CONNECTABLE(play_notation_audio_run)); } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_peak(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsPeakChannel *peak_channel; AgsPeakChannelRun *peak_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsPeakChannel */ peak_channel = (AgsPeakChannel *) g_object_new(AGS_TYPE_PEAK_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(peak_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) peak_channel, TRUE); recall = g_list_prepend(recall, peak_channel); ags_connectable_connect(AGS_CONNECTABLE(peak_channel)); /* AgsPeakChannelRun */ peak_channel_run = (AgsPeakChannelRun *) g_object_new(AGS_TYPE_PEAK_CHANNEL_RUN, "soundcard", soundcard, "recall-channel", peak_channel, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(peak_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) peak_channel_run, TRUE); recall = g_list_prepend(recall, peak_channel_run); ags_connectable_connect(AGS_CONNECTABLE(peak_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsPeakChannel */ peak_channel = (AgsPeakChannel *) g_object_new(AGS_TYPE_PEAK_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(peak_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) peak_channel, FALSE); recall = g_list_prepend(recall, peak_channel); ags_connectable_connect(AGS_CONNECTABLE(peak_channel)); /* AgsPeakChannelRun */ peak_channel_run = (AgsPeakChannelRun *) g_object_new(AGS_TYPE_PEAK_CHANNEL_RUN, "soundcard", soundcard, "recall-channel", peak_channel, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(peak_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) peak_channel_run, FALSE); recall = g_list_prepend(recall, peak_channel_run); ags_connectable_connect(AGS_CONNECTABLE(peak_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_mute(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsMuteAudio *mute_audio; AgsMuteAudioRun *mute_audio_run; AgsMuteChannel *mute_channel; AgsMuteChannelRun *mute_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if((AGS_RECALL_FACTORY_REMAP & (create_flags)) == 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); /* AgsMuteAudio */ mute_audio = (AgsMuteAudio *) g_object_new(AGS_TYPE_MUTE_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); AGS_RECALL(mute_audio)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION); ags_audio_add_recall(audio, (GObject *) mute_audio, TRUE); recall = g_list_prepend(recall, mute_audio); /* AgsMuteAudioRun */ mute_audio_run = (AgsMuteAudioRun *) g_object_new(AGS_TYPE_MUTE_AUDIO_RUN, "soundcard", soundcard, // "recall_audio", mute_audio, "recall_container", play_container, //TODO:JK: add missing dependency "count_beats_audio_run" NULL); AGS_RECALL(mute_audio_run)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION); ags_audio_add_recall(audio, (GObject *) mute_audio_run, TRUE); recall = g_list_prepend(recall, mute_audio_run); }else{ pthread_mutex_lock(audio_mutex); if(play_container == NULL){ list = ags_recall_find_type(audio->play, AGS_TYPE_MUTE_AUDIO); mute_audio = AGS_MUTE_AUDIO(list->data); recall = g_list_prepend(recall, mute_audio); play_container = AGS_RECALL_CONTAINER(AGS_RECALL(mute_audio)->container); list = ags_recall_find_template(play_container->recall_audio_run); if(list != NULL){ mute_audio_run = AGS_MUTE_AUDIO_RUN(list->data); recall = g_list_prepend(recall, mute_audio_run); }else{ mute_audio_run = NULL; g_critical("no AgsMuteAudioRun template"); } }else{ mute_audio = AGS_MUTE_AUDIO(play_container->recall_audio); recall = g_list_prepend(recall, mute_audio); list = ags_recall_find_template(play_container->recall_audio_run); if(list != NULL){ mute_audio_run = AGS_MUTE_AUDIO_RUN(list->data); recall = g_list_prepend(recall, mute_audio_run); }else{ mute_audio_run = NULL; g_critical("no AgsMuteAudioRun template"); } } pthread_mutex_unlock(audio_mutex); } } if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsMuteChannel */ mute_channel = (AgsMuteChannel *) g_object_new(AGS_TYPE_MUTE_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(mute_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) mute_channel, TRUE); recall = g_list_prepend(recall, mute_channel); ags_connectable_connect(AGS_CONNECTABLE(mute_channel)); /* AgsMuteChannelRun */ mute_channel_run = (AgsMuteChannelRun *) g_object_new(AGS_TYPE_MUTE_CHANNEL_RUN, "soundcard", soundcard, "recall-channel", mute_channel, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(mute_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) mute_channel_run, TRUE); recall = g_list_prepend(recall, mute_channel_run); ags_connectable_connect(AGS_CONNECTABLE(mute_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if((AGS_RECALL_FACTORY_REMAP & (create_flags)) == 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); /* AgsMuteAudio */ mute_audio = (AgsMuteAudio *) g_object_new(AGS_TYPE_MUTE_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); AGS_RECALL(mute_audio)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_SEQUENCER); ags_audio_add_recall(audio, (GObject *) mute_audio, FALSE); recall = g_list_prepend(recall, mute_audio); /* AgsMuteAudioRun */ mute_audio_run = (AgsMuteAudioRun *) g_object_new(AGS_TYPE_MUTE_AUDIO_RUN, "soundcard", soundcard, // "recall_audio", mute_audio, "recall_container", recall_container, //TODO:JK: add missing dependency "count_beats_audio_run" NULL); AGS_RECALL(mute_audio_run)->flags |= (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION); ags_audio_add_recall(audio, (GObject *) mute_audio_run, FALSE); recall = g_list_prepend(recall, mute_audio_run); }else{ pthread_mutex_lock(audio_mutex); if(recall_container == NULL){ list = ags_recall_template_find_type(audio->recall, AGS_TYPE_MUTE_AUDIO); if(list != NULL){ mute_audio = AGS_MUTE_AUDIO(list->data); recall_container = AGS_RECALL_CONTAINER(AGS_RECALL(mute_audio)->container); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ mute_audio_run = AGS_MUTE_AUDIO_RUN(list->data); recall = g_list_prepend(recall, mute_audio_run); }else{ mute_audio_run = NULL; g_critical("no AgsMuteAudioRun template"); } } }else{ mute_audio = AGS_MUTE_AUDIO(recall_container->recall_audio); recall = g_list_prepend(recall, mute_audio); list = ags_recall_find_template(recall_container->recall_audio_run); if(list != NULL){ mute_audio_run = AGS_MUTE_AUDIO_RUN(list->data); recall = g_list_prepend(recall, mute_audio_run); }else{ mute_audio_run = NULL; g_critical("no AgsMuteAudioRun template"); } } pthread_mutex_unlock(audio_mutex); } for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsMuteChannel */ mute_channel = (AgsMuteChannel *) g_object_new(AGS_TYPE_MUTE_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(mute_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) mute_channel, FALSE); recall = g_list_prepend(recall, mute_channel); ags_connectable_connect(AGS_CONNECTABLE(mute_channel)); /* AgsMuteChannelRun */ mute_channel_run = (AgsMuteChannelRun *) g_object_new(AGS_TYPE_MUTE_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", mute_channel, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(mute_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) mute_channel_run, FALSE); recall = g_list_prepend(recall, mute_channel_run); ags_connectable_connect(AGS_CONNECTABLE(mute_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_volume(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsVolumeChannel *volume_channel; AgsVolumeChannelRun *volume_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsVolumeChannel */ volume_channel = (AgsVolumeChannel *) g_object_new(AGS_TYPE_VOLUME_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(volume_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) volume_channel, TRUE); recall = g_list_prepend(recall, volume_channel); ags_connectable_connect(AGS_CONNECTABLE(volume_channel)); /* AgsVolumeChannelRun */ volume_channel_run = (AgsVolumeChannelRun *) g_object_new(AGS_TYPE_VOLUME_CHANNEL_RUN, "soundcard", soundcard, "recall-channel", volume_channel, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(volume_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) volume_channel_run, TRUE); recall = g_list_prepend(recall, volume_channel_run); ags_connectable_connect(AGS_CONNECTABLE(volume_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsVolumeChannel */ volume_channel = (AgsVolumeChannel *) g_object_new(AGS_TYPE_VOLUME_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(volume_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) volume_channel, FALSE); recall = g_list_prepend(recall, volume_channel); ags_connectable_connect(AGS_CONNECTABLE(volume_channel)); /* AgsVolumeChannelRun */ volume_channel_run = (AgsVolumeChannelRun *) g_object_new(AGS_TYPE_VOLUME_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", volume_channel, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(volume_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) volume_channel_run, FALSE); recall = g_list_prepend(recall, volume_channel_run); ags_connectable_connect(AGS_CONNECTABLE(volume_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_envelope(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsEnvelopeChannel *envelope_channel; AgsEnvelopeChannelRun *envelope_channel_run; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsEnvelopeChannel */ envelope_channel = (AgsEnvelopeChannel *) g_object_new(AGS_TYPE_ENVELOPE_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(envelope_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) envelope_channel, TRUE); recall = g_list_prepend(recall, envelope_channel); ags_connectable_connect(AGS_CONNECTABLE(envelope_channel)); /* AgsEnvelopeChannelRun */ envelope_channel_run = (AgsEnvelopeChannelRun *) g_object_new(AGS_TYPE_ENVELOPE_CHANNEL_RUN, "soundcard", soundcard, "recall-channel", envelope_channel, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(envelope_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) envelope_channel_run, TRUE); recall = g_list_prepend(recall, envelope_channel_run); ags_connectable_connect(AGS_CONNECTABLE(envelope_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsEnvelopeChannel */ envelope_channel = (AgsEnvelopeChannel *) g_object_new(AGS_TYPE_ENVELOPE_CHANNEL, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(envelope_channel), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) envelope_channel, FALSE); recall = g_list_prepend(recall, envelope_channel); ags_connectable_connect(AGS_CONNECTABLE(envelope_channel)); /* AgsEnvelopeChannelRun */ envelope_channel_run = (AgsEnvelopeChannelRun *) g_object_new(AGS_TYPE_ENVELOPE_CHANNEL_RUN, "soundcard", soundcard, "recall_channel", envelope_channel, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(envelope_channel_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) envelope_channel_run, FALSE); recall = g_list_prepend(recall, envelope_channel_run); ags_connectable_connect(AGS_CONNECTABLE(envelope_channel_run)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_ladspa(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsRecallLadspa *recall_ladspa; AgsRecallChannelRunDummy *recall_channel_run_dummy; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsRecallLadspa */ recall_ladspa = (AgsRecallLadspa *) g_object_new(AGS_TYPE_RECALL_LADSPA, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_ladspa), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_ladspa, TRUE); recall = g_list_prepend(recall, recall_ladspa); ags_connectable_connect(AGS_CONNECTABLE(recall_ladspa)); /* AgsRecallChannelRunDummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LADSPA_RUN); g_object_set(recall_channel_run_dummy, "soundcard", soundcard, // "recall_channel", recall_ladspa, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, TRUE); recall = g_list_prepend(recall, recall_channel_run_dummy); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsRecallLadspa */ recall_ladspa = (AgsRecallLadspa *) g_object_new(AGS_TYPE_RECALL_LADSPA, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_ladspa), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_ladspa, FALSE); recall = g_list_prepend(recall, recall_ladspa); ags_connectable_connect(AGS_CONNECTABLE(recall_ladspa)); /* AgsRecallChannelRunDummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LADSPA_RUN); g_object_set(recall_channel_run_dummy, "soundcard", soundcard, // "recall_channel", recall_ladspa, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, FALSE); recall = g_list_prepend(recall, recall_channel_run_dummy); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_lv2(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsRecallLv2 *recall_lv2; AgsRecallChannelRunDummy *recall_channel_run_dummy; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsRecallLv2 */ recall_lv2 = (AgsRecallLv2 *) g_object_new(AGS_TYPE_RECALL_LV2, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_lv2), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_lv2, TRUE); recall = g_list_prepend(recall, recall_lv2); ags_connectable_connect(AGS_CONNECTABLE(recall_lv2)); /* AgsRecallChannelRunDummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LV2_RUN); g_object_set(recall_channel_run_dummy, "soundcard", soundcard, // "recall_channel", recall_lv2, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, TRUE); recall = g_list_prepend(recall, recall_channel_run_dummy); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsRecallLv2 */ recall_lv2 = (AgsRecallLv2 *) g_object_new(AGS_TYPE_RECALL_LV2, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_lv2), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_lv2, FALSE); recall = g_list_prepend(recall, recall_lv2); ags_connectable_connect(AGS_CONNECTABLE(recall_lv2)); /* AgsRecallChannelRunDummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_LV2_RUN); g_object_set(recall_channel_run_dummy, "soundcard", soundcard, // "recall_channel", recall_lv2, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, FALSE); recall = g_list_prepend(recall, recall_channel_run_dummy); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_dssi(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsRecallDssi *recall_dssi; AgsRecallChannelRunDummy *recall_channel_run_dummy; AgsChannel *output, *input; AgsChannel *start, *channel; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint audio_channels; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if((AGS_RECALL_FACTORY_OUTPUT & (create_flags)) != 0){ start = channel = ags_channel_nth(output, start_pad * audio_channels); }else{ start = channel = ags_channel_nth(input, start_pad * audio_channels); } recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) play_container); /* AgsRecallDssi */ recall_dssi = (AgsRecallDssi *) g_object_new(AGS_TYPE_RECALL_DSSI, "soundcard", soundcard, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_dssi), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_dssi, TRUE); recall = g_list_prepend(recall, recall_dssi); ags_connectable_connect(AGS_CONNECTABLE(recall_dssi)); /* AgsRecallChannelRunDummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_DSSI_RUN); g_object_set(recall_channel_run_dummy, "soundcard", soundcard, // "recall_channel", recall_dssi, "source", channel, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, TRUE); recall = g_list_prepend(recall, recall_channel_run_dummy); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ channel = start; if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); for(i = 0; i < stop_pad - start_pad; i++){ channel = ags_channel_nth(channel, start_audio_channel); for(j = 0; j < stop_audio_channel - start_audio_channel; j++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* add recall container */ ags_channel_add_recall_container(channel, (GObject *) recall_container); /* AgsRecallDssi */ recall_dssi = (AgsRecallDssi *) g_object_new(AGS_TYPE_RECALL_DSSI, "soundcard", soundcard, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_dssi), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_dssi, FALSE); recall = g_list_prepend(recall, recall_dssi); ags_connectable_connect(AGS_CONNECTABLE(recall_dssi)); /* AgsRecallChannelRunDummy */ recall_channel_run_dummy = ags_recall_channel_run_dummy_new(channel, AGS_TYPE_RECALL_RECYCLING_DUMMY, AGS_TYPE_RECALL_DSSI_RUN); g_object_set(recall_channel_run_dummy, "soundcard", soundcard, // "recall_channel", recall_dssi, "source", channel, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(recall_channel_run_dummy), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_channel_add_recall(channel, (GObject *) recall_channel_run_dummy, FALSE); recall = g_list_prepend(recall, recall_channel_run_dummy); ags_connectable_connect(AGS_CONNECTABLE(recall_channel_run_dummy)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = ags_channel_nth(channel, audio_channels - stop_audio_channel); } } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_record_midi(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsRouteDssiAudio *record_midi_audio; AgsRouteDssiAudioRun *record_midi_audio_run; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* list */ recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); record_midi_audio = (AgsRouteDssiAudio *) g_object_new(AGS_TYPE_RECORD_MIDI_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(record_midi_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) record_midi_audio, TRUE); recall = g_list_prepend(recall, record_midi_audio); ags_connectable_connect(AGS_CONNECTABLE(record_midi_audio)); record_midi_audio_run = (AgsRouteDssiAudioRun *) g_object_new(AGS_TYPE_RECORD_MIDI_AUDIO_RUN, "soundcard", soundcard, "recall_audio", record_midi_audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(record_midi_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) record_midi_audio_run, TRUE); recall = g_list_prepend(recall, record_midi_audio_run); ags_connectable_connect(AGS_CONNECTABLE(record_midi_audio_run)); } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); record_midi_audio = (AgsRouteDssiAudio *) g_object_new(AGS_TYPE_RECORD_MIDI_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(record_midi_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) record_midi_audio, FALSE); recall = g_list_prepend(recall, record_midi_audio); ags_connectable_connect(AGS_CONNECTABLE(record_midi_audio)); record_midi_audio_run = (AgsRouteDssiAudioRun *) g_object_new(AGS_TYPE_RECORD_MIDI_AUDIO_RUN, "soundcard", soundcard, "recall_audio", record_midi_audio, "recall_container", recall_container, //TODO:JK: add missing dependency "delay-audio" NULL); ags_recall_set_flags(AGS_RECALL(record_midi_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) record_midi_audio_run, FALSE); recall = g_list_prepend(recall, record_midi_audio_run); ags_connectable_connect(AGS_CONNECTABLE(record_midi_audio_run)); } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_route_dssi(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsRouteDssiAudio *route_dssi_audio; AgsRouteDssiAudioRun *route_dssi_audio_run; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* list */ recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); route_dssi_audio = (AgsRouteDssiAudio *) g_object_new(AGS_TYPE_ROUTE_DSSI_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(route_dssi_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) route_dssi_audio, TRUE); recall = g_list_prepend(recall, route_dssi_audio); ags_connectable_connect(AGS_CONNECTABLE(route_dssi_audio)); route_dssi_audio_run = (AgsRouteDssiAudioRun *) g_object_new(AGS_TYPE_ROUTE_DSSI_AUDIO_RUN, "soundcard", soundcard, "recall_audio", route_dssi_audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(route_dssi_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) route_dssi_audio_run, TRUE); recall = g_list_prepend(recall, route_dssi_audio_run); ags_connectable_connect(AGS_CONNECTABLE(route_dssi_audio_run)); } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); route_dssi_audio = (AgsRouteDssiAudio *) g_object_new(AGS_TYPE_ROUTE_DSSI_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(route_dssi_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) route_dssi_audio, FALSE); recall = g_list_prepend(recall, route_dssi_audio); ags_connectable_connect(AGS_CONNECTABLE(route_dssi_audio)); route_dssi_audio_run = (AgsRouteDssiAudioRun *) g_object_new(AGS_TYPE_ROUTE_DSSI_AUDIO_RUN, "soundcard", soundcard, "recall_audio", route_dssi_audio, "recall_container", recall_container, //TODO:JK: add missing dependency "delay-audio" NULL); ags_recall_set_flags(AGS_RECALL(route_dssi_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) route_dssi_audio_run, FALSE); recall = g_list_prepend(recall, route_dssi_audio_run); ags_connectable_connect(AGS_CONNECTABLE(route_dssi_audio_run)); } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } GList* ags_recall_factory_create_route_lv2(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { AgsRouteLv2Audio *route_lv2_audio; AgsRouteLv2AudioRun *route_lv2_audio_run; AgsPort *port; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; GList *recall; guint i, j; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; if(audio == NULL){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = audio->soundcard; pthread_mutex_unlock(audio_mutex); /* list */ recall = NULL; /* play */ if((AGS_RECALL_FACTORY_PLAY & (create_flags)) != 0){ if(play_container == NULL){ play_container = ags_recall_container_new(); } play_container->flags |= AGS_RECALL_CONTAINER_PLAY; ags_audio_add_recall_container(audio, (GObject *) play_container); route_lv2_audio = (AgsRouteLv2Audio *) g_object_new(AGS_TYPE_ROUTE_LV2_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(route_lv2_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) route_lv2_audio, TRUE); recall = g_list_prepend(recall, route_lv2_audio); ags_connectable_connect(AGS_CONNECTABLE(route_lv2_audio)); route_lv2_audio_run = (AgsRouteLv2AudioRun *) g_object_new(AGS_TYPE_ROUTE_LV2_AUDIO_RUN, "soundcard", soundcard, "recall_audio", route_lv2_audio, "recall_container", play_container, NULL); ags_recall_set_flags(AGS_RECALL(route_lv2_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) route_lv2_audio_run, TRUE); recall = g_list_prepend(recall, route_lv2_audio_run); ags_connectable_connect(AGS_CONNECTABLE(route_lv2_audio_run)); } /* recall */ if((AGS_RECALL_FACTORY_RECALL & (create_flags)) != 0){ if(recall_container == NULL){ recall_container = ags_recall_container_new(); } ags_audio_add_recall_container(audio, (GObject *) recall_container); route_lv2_audio = (AgsRouteLv2Audio *) g_object_new(AGS_TYPE_ROUTE_LV2_AUDIO, "soundcard", soundcard, "audio", audio, "recall_container", recall_container, NULL); ags_recall_set_flags(AGS_RECALL(route_lv2_audio), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) route_lv2_audio, FALSE); recall = g_list_prepend(recall, route_lv2_audio); ags_connectable_connect(AGS_CONNECTABLE(route_lv2_audio)); route_lv2_audio_run = (AgsRouteLv2AudioRun *) g_object_new(AGS_TYPE_ROUTE_LV2_AUDIO_RUN, "soundcard", soundcard, "recall_audio", route_lv2_audio, "recall_container", recall_container, //TODO:JK: add missing dependency "route_lv2-audio" NULL); ags_recall_set_flags(AGS_RECALL(route_lv2_audio_run), (AGS_RECALL_TEMPLATE | (((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION)); ags_audio_add_recall(audio, (GObject *) route_lv2_audio_run, FALSE); recall = g_list_prepend(recall, route_lv2_audio_run); ags_connectable_connect(AGS_CONNECTABLE(route_lv2_audio_run)); } /* return instantiated recall */ recall = g_list_reverse(recall); return(recall); } /** * ags_recall_factory_create: * @audio: an #AgsAudio that should keep the recalls * @play_container: an #AgsRecallContainer to indetify what recall to use * @recall_container: an #AgsRecallContainer to indetify what recall to use * @plugin_name: the plugin identifier to instantiate * @start_audio_channel: the first audio channel to apply * @stop_audio_channel: the last audio channel to apply * @start_pad: the first pad to apply * @stop_pad: the last pad to apply * @create_flags: modify the behaviour of this function * @recall_flags: flags to be set for #AgsRecall * * Instantiate #AgsRecall by this factory. * * Returns: The available AgsPort objects of the plugin to modify. * * Since: 1.0.0 */ GList* ags_recall_factory_create(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags) { GList *recall; recall = NULL; #ifdef AGS_DEBUG g_message("AgsRecallFactory creating: %s[%d,%d]", plugin_name, stop_pad, stop_audio_channel); #endif if(!strncmp(plugin_name, "ags-delay", 10)){ recall = ags_recall_factory_create_delay(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-count-beats", 16)){ recall = ags_recall_factory_create_count_beats(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-stream", 11)){ recall = ags_recall_factory_create_stream(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-rt-stream", 14)){ recall = ags_recall_factory_create_rt_stream(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-loop", 9)){ recall = ags_recall_factory_create_loop(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-play-master", 16)){ recall = ags_recall_factory_create_play_master(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-prepare", 12)){ recall = ags_recall_factory_create_prepare(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-copy", 9)){ recall = ags_recall_factory_create_copy(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-buffer", 11)){ recall = ags_recall_factory_create_buffer(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-play", 9)){ recall = ags_recall_factory_create_play(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-copy-pattern", 17)){ recall = ags_recall_factory_create_copy_pattern(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-play-dssi", 14)){ recall = ags_recall_factory_create_play_dssi(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-play-lv2", 13)){ recall = ags_recall_factory_create_play_lv2(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-play-notation", 18)){ recall = ags_recall_factory_create_play_notation(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-peak", 9)){ recall = ags_recall_factory_create_peak(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-mute", 9)){ recall = ags_recall_factory_create_mute(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-volume", 11)){ recall = ags_recall_factory_create_volume(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-envelope", 11)){ recall = ags_recall_factory_create_envelope(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-ladspa", 11)){ recall = ags_recall_factory_create_ladspa(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-dssi", 9)){ recall = ags_recall_factory_create_dssi(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-lv2", 8)){ recall = ags_recall_factory_create_lv2(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-record-midi", 16)){ recall = ags_recall_factory_create_record_midi(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-route-dssi", 15)){ recall = ags_recall_factory_create_route_dssi(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); }else if(!strncmp(plugin_name, "ags-route-lv2", 14)){ recall = ags_recall_factory_create_route_lv2(audio, play_container, recall_container, plugin_name, start_audio_channel, stop_audio_channel, start_pad, stop_pad, create_flags, recall_flags); } return(recall); } /** * ags_recall_factory_new: * * Creates a #AgsRecallFactory * * Returns: a new #AgsRecallFactory * * Since: 1.0.0 */ AgsRecallFactory* ags_recall_factory_new() { AgsRecallFactory *recall_factory; recall_factory = (AgsRecallFactory *) g_object_new(AGS_TYPE_RECALL_FACTORY, NULL); return(recall_factory); } gsequencer-1.4.24/ags/audio/ags_message.c0000644000175000017500000002333713256163135015176 00000000000000/* 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 . */ #include #include void ags_message_class_init(AgsMessageInterface *interface); GType ags_message_get_type() { static GType ags_type_message = 0; if(!ags_type_message){ ags_type_message = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsMessage", sizeof(AgsMessageInterface), (GClassInitFunc) ags_message_class_init, 0, NULL, 0); } return(ags_type_message); } void ags_message_class_init(AgsMessageInterface *interface) { /** * AgsMessage::key-on: * @message: the object * @note: the note * @audio_channel: the audio channel * @velocity: the velocity * * The ::key-on signal */ g_signal_new("key-on", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMessageInterface, key_on), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_UINT_DOUBLE, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_DOUBLE); /** * AgsMessage::key-off: * @message: the object * @note: the note * @audio_channel: the audio channel * @velocity: the velocity * * The ::key-off signal */ g_signal_new("key-off", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMessageInterface, key_off), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_UINT_DOUBLE, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_DOUBLE); /** * AgsMessage::key-pressure: * @message: the objectw * @note: the note * @audio_channel: the audio channel * @pressure: the pressure * * The ::key-pressure signal */ g_signal_new("key-pressure", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMessageInterface, key_pressure), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_UINT_DOUBLE, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_DOUBLE); /** * AgsMessage::change-parameter: * @message: the object * @note: the note * @audio_channel: the audio channel * @control_specifier: the control specifier * @value: the value * * The ::change-parameter signal */ g_signal_new("change-parameter", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMessageInterface, change_parameter), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_UINT_STRING_DOUBLE, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_DOUBLE); /** * AgsMessage::change-mode: * @message: the object * @audio_channel: the audio channel * @mode: the mode * @enabled: if %TRUE then enable * * The ::change-mode signal */ g_signal_new("change-mode", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMessageInterface, change_mode), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_BOOLEAN, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_BOOLEAN); /** * AgsMessage::pitch-bend: * @message: the object * @pitch: the pitch * @transmitter: the transmitter * * The ::pitch-bend signal */ g_signal_new("pitch-bend", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMessageInterface, pitch_bend), NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE, G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); /** * AgsMessage::set-bpm: * @message: the object * @bpm: the BPM * * The ::set-bpm signal */ g_signal_new("set-bpm", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMessageInterface, set_bpm), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); /** * AgsMessage::set-delay-factor: * @message: the object * @delay_factor: the delay factor * * The ::set-delay-factor signal */ g_signal_new("set-delay-factor", G_TYPE_FROM_INTERFACE(interface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMessageInterface, set_delay_factor), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); } /** * ags_message_key_on: * @message: the #AgsMessage * @note: the note * @audio_channel: the audio channel * @velocity: the velocity * * Notifies about key-on event. * * Since: 1.0.0 */ void ags_message_key_on(AgsMessage *message, gchar *note, guint audio_channel, gdouble velocity) { AgsMessageInterface *message_interface; g_return_if_fail(AGS_IS_MESSAGE(message)); message_interface = AGS_MESSAGE_GET_INTERFACE(message); g_return_if_fail(message_interface->key_on); message_interface->key_on(message, note, audio_channel, velocity); } /** * ags_message_key_on: * @message: the #AgsMessage * @note: the note * @audio_channel: the audio channel * @velocity: the velocity * * Notifies about key-off event. * * Since: 1.0.0 */ void ags_message_key_off(AgsMessage *message, gchar *note, guint audio_channel, gdouble velocity) { AgsMessageInterface *message_interface; g_return_if_fail(AGS_IS_MESSAGE(message)); message_interface = AGS_MESSAGE_GET_INTERFACE(message); g_return_if_fail(message_interface->key_off); message_interface->key_off(message, note, audio_channel, velocity); } /** * ags_message_key_pressure: * @message: the #AgsMessage * @note: the note * @audio_channel: the audio channel * @pressure: the pressure * * Notifies about key pressure event. * * Since: 1.0.0 */ void ags_message_key_pressure(AgsMessage *message, gchar *note, guint audio_channel, gdouble pressure) { AgsMessageInterface *message_interface; g_return_if_fail(AGS_IS_MESSAGE(message)); message_interface = AGS_MESSAGE_GET_INTERFACE(message); g_return_if_fail(message_interface->key_pressure); message_interface->key_pressure(message, note, audio_channel, pressure); } /** * ags_message_change_parameter: * @message: the #AgsMessage * @note: the note * @audio_channel: the audio channel * @control_specifier: the control specifier * @value: the value * * Notifies about changed parameter. * * Since: 1.0.0 */ void ags_message_change_parameter(AgsMessage *message, gchar *note, guint audio_channel, gchar *control_specifier, gdouble value) { AgsMessageInterface *message_interface; g_return_if_fail(AGS_IS_MESSAGE(message)); message_interface = AGS_MESSAGE_GET_INTERFACE(message); g_return_if_fail(message_interface->change_parameter); message_interface->change_parameter(message, note, audio_channel, control_specifier, value); } /** * ags_message_change_mode: * @message: the #AgsMessage * @audio_channel: the audio channel * @mode: the mode * @enabled: %TRUE if enabled, otherwise %FALSE * * Notifies about changed mode. * * Since: 1.0.0 */ void ags_message_change_mode(AgsMessage *message, guint audio_channel, guint mode, gboolean enabled) { AgsMessageInterface *message_interface; g_return_if_fail(AGS_IS_MESSAGE(message)); message_interface = AGS_MESSAGE_GET_INTERFACE(message); g_return_if_fail(message_interface->change_mode); message_interface->change_mode(message, audio_channel, mode, enabled); } /** * ags_message_pitch_bend: * @message: the #AgsMessage * @pitch: the pitch * @transmitter: the transmitter * * Notifies about pitch bend. * * Since: 1.0.0 */ void ags_message_pitch_bend(AgsMessage *message, gdouble pitch, gdouble transmitter) { AgsMessageInterface *message_interface; g_return_if_fail(AGS_IS_MESSAGE(message)); message_interface = AGS_MESSAGE_GET_INTERFACE(message); g_return_if_fail(message_interface->pitch_bend); message_interface->pitch_bend(message, pitch, transmitter); } /** * ags_message_set_bpm: * @message: the #AgsMessage * @bpm: the BPM * * Notifies about modified bpm. * * Since: 1.0.0 */ void ags_message_set_bpm(AgsMessage *message, gdouble bpm) { AgsMessageInterface *message_interface; g_return_if_fail(AGS_IS_MESSAGE(message)); message_interface = AGS_MESSAGE_GET_INTERFACE(message); g_return_if_fail(message_interface->set_bpm); message_interface->set_bpm(message, bpm); } /** * ags_message_set_delay_factor: * @message: the #AgsMessage * @delay_factor: the delay factor * * Notifies about modified bpm. * * Since: 1.0.0 */ void ags_message_set_delay_factor(AgsMessage *message, gdouble delay_factor) { AgsMessageInterface *message_interface; g_return_if_fail(AGS_IS_MESSAGE(message)); message_interface = AGS_MESSAGE_GET_INTERFACE(message); g_return_if_fail(message_interface->set_delay_factor); message_interface->set_delay_factor(message, delay_factor); } gsequencer-1.4.24/ags/audio/ags_recycling_context.h0000644000175000017500000000756213256163135017304 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RECYCLING_CONTEXT_H__ #define __AGS_RECYCLING_CONTEXT_H__ #include #include #include #include #define AGS_TYPE_RECYCLING_CONTEXT (ags_recycling_context_get_type()) #define AGS_RECYCLING_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECYCLING_CONTEXT, AgsRecyclingContext)) #define AGS_RECYCLING_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECYCLING_CONTEXT, AgsRecyclingContextClass)) #define AGS_IS_RECYCLING_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECYCLING_CONTEXT)) #define AGS_IS_RECYCLING_CONTEXT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECYCLING_CONTEXT)) #define AGS_RECYCLING_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECYCLING_CONTEXT, AgsRecyclingContextClass)) typedef struct _AgsRecyclingContext AgsRecyclingContext; typedef struct _AgsRecyclingContextClass AgsRecyclingContextClass; struct _AgsRecyclingContext { GObject object; pthread_mutexattr_t *mutexattr; pthread_mutex_t *mutex; AgsRecyclingContext *parent; GObject *recall_id; AgsRecycling **recycling; guint64 length; GList *children; }; struct _AgsRecyclingContextClass { GObjectClass object; }; GType ags_recycling_context_get_type(); /* replace, add, remove and insert */ void ags_recycling_context_replace(AgsRecyclingContext *recycling_context, AgsRecycling *recycling, gint position); AgsRecyclingContext* ags_recycling_context_add(AgsRecyclingContext *recycling_context, AgsRecycling *recycling); AgsRecyclingContext* ags_recycling_context_remove(AgsRecyclingContext *recycling_context, AgsRecycling *recycling); AgsRecyclingContext* ags_recycling_context_insert(AgsRecyclingContext *recycling_context, AgsRecycling *recycling, gint position); /* tolevel, find, find child and find parent */ AgsRecyclingContext* ags_recycling_context_get_toplevel(AgsRecyclingContext *recycling_context); gint ags_recycling_context_find(AgsRecyclingContext *recycling_context, AgsRecycling *recycling); gint ags_recycling_context_find_child(AgsRecyclingContext *recycling_context, AgsRecycling *recycling); gint ags_recycling_context_find_parent(AgsRecyclingContext *recycling_context, AgsRecycling *recycling); /* add and remove child */ void ags_recycling_context_add_child(AgsRecyclingContext *parent, AgsRecyclingContext *child); void ags_recycling_context_remove_child(AgsRecyclingContext *parent, AgsRecyclingContext *child); /* child recall id */ GList* ags_recycling_context_get_child_recall_id(AgsRecyclingContext *recycling_context); /* instantiate - reset recycling */ AgsRecyclingContext* ags_recycling_context_reset_recycling(AgsRecyclingContext *recycling_context, AgsRecycling *old_first_recycling, AgsRecycling *old_last_recycling, AgsRecycling *new_first_recycling, AgsRecycling *new_last_recycling); /* instantiate */ AgsRecyclingContext* ags_recycling_context_new(guint64 length); #endif /*__AGS_RECYCLING_CONTEXT_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_factory.h0000644000175000017500000000601213246707333016542 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RECALL_FACTORY_H__ #define __AGS_RECALL_FACTORY_H__ #include #include #include #include #define AGS_TYPE_RECALL_FACTORY (ags_recall_factory_get_type()) #define AGS_RECALL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_FACTORY, AgsRecallFactory)) #define AGS_RECALL_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_FACTORY, AgsRecallFactoryClass)) #define AGS_IS_RECALL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RECALL_FACTORY)) #define AGS_IS_RECALL_FACTORY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RECALL_FACTORY)) #define AGS_RECALL_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RECALL_FACTORY, AgsRecallFactoryClass)) typedef struct _AgsRecallFactory AgsRecallFactory; typedef struct _AgsRecallFactoryClass AgsRecallFactoryClass; /** * AgsRecallFactoryCreateFlags: * @AGS_RECALL_FACTORY_OUTPUT: output related * @AGS_RECALL_FACTORY_INPUT: input related * @AGS_RECALL_FACTORY_REMAP: remap * @AGS_RECALL_FACTORY_ADD: do add * @AGS_RECALL_FACTORY_PLAY: bounded to play * @AGS_RECALL_FACTORY_RECALL: bounded to recall * @AGS_RECALL_FACTORY_BULK: operates on bulk mode * * Enum values controlling instantiating the recall implementation. */ typedef enum{ AGS_RECALL_FACTORY_OUTPUT = 1, AGS_RECALL_FACTORY_INPUT = 1 << 1, AGS_RECALL_FACTORY_REMAP = 1 << 2, AGS_RECALL_FACTORY_ADD = 1 << 3, AGS_RECALL_FACTORY_PLAY = 1 << 4, AGS_RECALL_FACTORY_RECALL = 1 << 5, AGS_RECALL_FACTORY_BULK = 1 << 6, }AgsRecallFactoryCreateFlags; struct _AgsRecallFactory { GObject object; }; struct _AgsRecallFactoryClass { GObjectClass object; }; GType ags_recall_factory_get_type(); GList* ags_recall_factory_create(AgsAudio *audio, AgsRecallContainer *play_container, AgsRecallContainer *recall_container, gchar *plugin_name, guint start_audio_channel, guint stop_audio_channel, guint start_pad, guint stop_pad, guint create_flags, guint recall_flags); /* */ AgsRecallFactory* ags_recall_factory_get_instance(); AgsRecallFactory* ags_recall_factory_new(); #endif /*__AGS_RECALL_FACTORY_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_dssi_run.h0000644000175000017500000000450713247044247016727 00000000000000/* 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 . */ #ifndef __AGS_RECALL_DSSI_RUN_H__ #define __AGS_RECALL_DSSI_RUN_H__ #include #include #include #include #include #define AGS_TYPE_RECALL_DSSI_RUN (ags_recall_dssi_run_get_type()) #define AGS_RECALL_DSSI_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_DSSI_RUN, AgsRecallDssiRun)) #define AGS_RECALL_DSSI_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_DSSI_RUN, AgsRecallDssiRunClass)) #define AGS_IS_RECALL_DSSI_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RECALL_DSSI_RUN)) #define AGS_IS_RECALL_DSSI_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RECALL_DSSI_RUN)) #define AGS_RECALL_DSSI_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RECALL_DSSI_RUN, AgsRecallDssiRunClass)) typedef struct _AgsRecallDssiRun AgsRecallDssiRun; typedef struct _AgsRecallDssiRunClass AgsRecallDssiRunClass; struct _AgsRecallDssiRun { AgsRecallAudioSignal recall_audio_signal; LADSPA_Handle *ladspa_handle; unsigned long audio_channels; LADSPA_Data *input; LADSPA_Data *output; LADSPA_Data *port_data; long delta_time; snd_seq_event_t **event_buffer; unsigned long *event_count; GList *note; GObject *route_dssi_audio_run; }; struct _AgsRecallDssiRunClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_recall_dssi_run_get_type(); AgsRecallDssiRun* ags_recall_dssi_run_new(AgsAudioSignal *audio_signal); #endif /*__AGS_RECALL_DSSI_RUN_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_audio_signal.c0000644000175000017500000004454713246707333017543 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_audio_signal_class_init(AgsRecallAudioSignalClass *recall_audio_signal); void ags_recall_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_recall_audio_signal_init(AgsRecallAudioSignal *recall_audio_signal); void ags_recall_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_audio_signal_connect(AgsConnectable *connectable); void ags_recall_audio_signal_disconnect(AgsConnectable *connectable); void ags_recall_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_audio_signal_dispose(GObject *gobject); void ags_recall_audio_signal_finalize(GObject *gobject); void ags_recall_audio_signal_run_init_pre(AgsRecall *recall); void ags_recall_audio_signal_run_init_inter(AgsRecall *recall); void ags_recall_audio_signal_run_init_post(AgsRecall *recall); void ags_recall_audio_signal_run_pre(AgsRecall *recall); void ags_recall_audio_signal_run_inter(AgsRecall *recall); void ags_recall_audio_signal_run_post(AgsRecall *recall); void ags_recall_audio_signal_done(AgsRecall *recall); AgsRecall* ags_recall_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); void ags_recall_audio_signal_notify_soundcard(AgsRecallAudioSignal *recall_audio_signal, GParamSpec *param, gpointer data); void ags_recall_audio_signal_notify_soundcard_after(AgsRecallAudioSignal *recall_audio_signal, GParamSpec *param, gpointer data); /** * SECTION:ags_recall_audio_signal * @Short_description: audio signal context of recall * @Title: AgsRecallAudioSignal * * #AgsRecallAudioSignal acts as audio signal recall. */ enum{ PROP_0, PROP_AUDIO_CHANNEL, PROP_DESTINATION, PROP_SOURCE, }; static gpointer ags_recall_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_recall_audio_signal_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_recall_audio_signal_parent_dynamic_connectable_interface; GType ags_recall_audio_signal_get_type() { static GType ags_type_recall_audio_signal = 0; if(!ags_type_recall_audio_signal){ static const GTypeInfo ags_recall_audio_signal_info = { sizeof (AgsRecallAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_audio_signal_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_audio_signal = g_type_register_static(AGS_TYPE_RECALL, "AgsRecallAudioSignal", &ags_recall_audio_signal_info, 0); g_type_add_interface_static(ags_type_recall_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_audio_signal, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_recall_audio_signal); } void ags_recall_audio_signal_class_init(AgsRecallAudioSignalClass *recall_audio_signal) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_audio_signal_parent_class = g_type_class_peek_parent(recall_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) recall_audio_signal; gobject->set_property = ags_recall_audio_signal_set_property; gobject->get_property = ags_recall_audio_signal_get_property; gobject->dispose = ags_recall_audio_signal_dispose; gobject->finalize = ags_recall_audio_signal_finalize; /* for debugging purpose */ recall = (AgsRecallClass *) recall_audio_signal; recall->run_init_pre = ags_recall_audio_signal_run_init_pre; recall->run_init_inter = ags_recall_audio_signal_run_init_inter; recall->run_init_post = ags_recall_audio_signal_run_init_post; recall->run_pre = ags_recall_audio_signal_run_pre; recall->run_inter = ags_recall_audio_signal_run_inter; recall->run_post = ags_recall_audio_signal_run_post; /* properties */ /** * AgsRecallAudioSignal:audio-channel: * * The audio channel to write use. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("output to audio channel"), i18n_pspec("The audio channel to which it should write"), 0, 65536, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsRecallAudioSignal:destination: * * The destination audio signal * * Since: 1.0.0 */ param_spec = g_param_spec_object("destination", i18n_pspec("destination of output"), i18n_pspec("The destination where this recall will write the audio signal to"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DESTINATION, param_spec); /** * AgsRecallAudioSignal:source: * * The source audio signal * * Since: 1.0.0 */ param_spec = g_param_spec_object("source", i18n_pspec("source of input"), i18n_pspec("The source where this recall will take the audio signal from"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOURCE, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) recall_audio_signal; recall->done = ags_recall_audio_signal_done; recall->duplicate = ags_recall_audio_signal_duplicate; } void ags_recall_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_audio_signal_connect; connectable->disconnect = ags_recall_audio_signal_disconnect; } void ags_recall_audio_signal_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_recall_audio_signal_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_recall_audio_signal_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_recall_audio_signal_disconnect_dynamic; } void ags_recall_audio_signal_init(AgsRecallAudioSignal *recall_audio_signal) { // g_signal_connect(G_OBJECT(recall_audio_signal), "notify::soundcard", // G_CALLBACK(ags_recall_audio_signal_notify_soundcard), NULL); // g_signal_connect_after(G_OBJECT(recall_audio_signal), "notify::soundcard", // G_CALLBACK(ags_recall_audio_signal_notify_soundcard_after), NULL); recall_audio_signal->flags = AGS_RECALL_INITIAL_RUN; recall_audio_signal->audio_channel = 0; recall_audio_signal->source = NULL; recall_audio_signal->destination = NULL; } void ags_recall_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallAudioSignal *recall_audio_signal; recall_audio_signal = AGS_RECALL_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_AUDIO_CHANNEL: { guint audio_channel; audio_channel = (guint) g_value_get_uint(value); recall_audio_signal->audio_channel = audio_channel; } break; case PROP_DESTINATION: { AgsAudioSignal *destination; destination = (AgsAudioSignal *) g_value_get_object(value); if(recall_audio_signal->destination == destination){ return; } if(recall_audio_signal->destination != NULL){ g_object_unref(recall_audio_signal->destination); } if(destination != NULL){ g_object_ref(G_OBJECT(destination)); } recall_audio_signal->destination = destination; } break; case PROP_SOURCE: { AgsAudioSignal *source; source = (AgsAudioSignal *) g_value_get_object(value); if(recall_audio_signal->source == source){ return; } if(recall_audio_signal->source != NULL){ g_object_unref(recall_audio_signal->source); } if(source != NULL){ g_object_ref(G_OBJECT(source)); } recall_audio_signal->source = source; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallAudioSignal *recall_audio_signal; recall_audio_signal = AGS_RECALL_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, recall_audio_signal->audio_channel); } break; case PROP_DESTINATION: { g_value_set_object(value, recall_audio_signal->destination); } break; case PROP_SOURCE: { g_value_set_object(value, recall_audio_signal->source); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_audio_signal_connect(AgsConnectable *connectable) { AgsRecallAudioSignal *recall_audio_signal; ags_recall_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_recall_audio_signal_disconnect(AgsConnectable *connectable) { ags_recall_audio_signal_parent_connectable_interface->disconnect(connectable); } void ags_recall_audio_signal_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_recall_audio_signal_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); } void ags_recall_audio_signal_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_recall_audio_signal_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); } void ags_recall_audio_signal_dispose(GObject *gobject) { AgsRecallAudioSignal *recall_audio_signal; recall_audio_signal = AGS_RECALL_AUDIO_SIGNAL(gobject); /* destination */ if(recall_audio_signal->destination != NULL){ g_object_unref(recall_audio_signal->destination); recall_audio_signal->destination = NULL; } /* source */ if(recall_audio_signal->source != NULL){ g_object_unref(recall_audio_signal->source); recall_audio_signal->source = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_audio_signal_parent_class)->dispose(gobject); } void ags_recall_audio_signal_finalize(GObject *gobject) { AgsRecallAudioSignal *recall_audio_signal; recall_audio_signal = AGS_RECALL_AUDIO_SIGNAL(gobject); /* destination */ if(recall_audio_signal->destination != NULL){ g_object_unref(recall_audio_signal->destination); } /* source */ if(recall_audio_signal->source != NULL){ g_object_unref(recall_audio_signal->source); } /* call parent */ G_OBJECT_CLASS(ags_recall_audio_signal_parent_class)->finalize(gobject); } AgsRecall* ags_recall_audio_signal_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecallAudioSignal *recall_audio_signal, *copy; #if 0 recall_audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall); parameter = ags_parameter_grow(G_OBJECT_TYPE(recall), parameter, n_params, "soundcard", AGS_RECALL(recall_audio_signal)->soundcard, "audio_channel", recall_audio_signal->audio_channel, "destination", recall_audio_signal->destination, "source", recall_audio_signal->source, NULL); copy = (AgsRecallAudioSignal *) AGS_RECALL_CLASS(ags_recall_audio_signal_parent_class)->duplicate(recall, recall_id, n_params, parameter); #endif return((AgsRecall *) NULL); } void ags_recall_audio_signal_run_init_pre(AgsRecall *recall){ AgsAudioSignal *source, *destination; source = AGS_RECALL_AUDIO_SIGNAL(recall)->source; destination = AGS_RECALL_AUDIO_SIGNAL(recall)->destination; AGS_RECALL_CLASS(ags_recall_audio_signal_parent_class)->run_init_pre(recall); if(source != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (source->flags)) != 0) g_warning("AgsRecallAudioSignal@source - AGS_AUDIO_SIGNAL_TEMPLATE: run_init_pre\n"); if(destination != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (destination->flags)) != 0) g_warning("AgsRecallAudioSignal@destination - AGS_AUDIO_SIGNAL_TEMPLATE: run_init_pre\n"); } void ags_recall_audio_signal_run_init_inter(AgsRecall *recall){ AgsAudioSignal *source, *destination; source = AGS_RECALL_AUDIO_SIGNAL(recall)->source; destination = AGS_RECALL_AUDIO_SIGNAL(recall)->destination; AGS_RECALL_CLASS(ags_recall_audio_signal_parent_class)->run_init_inter(recall); if(source != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (source->flags)) != 0) g_warning("AgsRecallAudioSignal@source - AGS_AUDIO_SIGNAL_TEMPLATE: run_init_inter\n"); if(destination != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (destination->flags)) != 0) g_warning("AgsRecallAudioSignal@destination - AGS_AUDIO_SIGNAL_TEMPLATE: run_init_inter\n"); } void ags_recall_audio_signal_run_init_post(AgsRecall *recall){ AgsAudioSignal *source, *destination; source = AGS_RECALL_AUDIO_SIGNAL(recall)->source; destination = AGS_RECALL_AUDIO_SIGNAL(recall)->destination; AGS_RECALL_CLASS(ags_recall_audio_signal_parent_class)->run_init_post(recall); if(source != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (source->flags)) != 0) g_warning("AgsRecallAudioSignal@source - AGS_AUDIO_SIGNAL_TEMPLATE: run_init_post\n"); if(destination != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (destination->flags)) != 0) g_warning("AgsRecallAudioSignal@destination - AGS_AUDIO_SIGNAL_TEMPLATE: run_init_post\n"); } void ags_recall_audio_signal_run_pre(AgsRecall *recall){ AgsAudioSignal *source, *destination; source = AGS_RECALL_AUDIO_SIGNAL(recall)->source; destination = AGS_RECALL_AUDIO_SIGNAL(recall)->destination; AGS_RECALL_CLASS(ags_recall_audio_signal_parent_class)->run_pre(recall); if(source != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (source->flags)) != 0) g_warning("AgsRecallAudioSignal@source - AGS_AUDIO_SIGNAL_TEMPLATE: run_pre\n"); if(destination != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (destination->flags)) != 0) g_warning("AgsRecallAudioSignal@destination - AGS_AUDIO_SIGNAL_TEMPLATE: run_pre\n"); } void ags_recall_audio_signal_run_inter(AgsRecall *recall){ AgsAudioSignal *source, *destination; source = AGS_RECALL_AUDIO_SIGNAL(recall)->source; destination = AGS_RECALL_AUDIO_SIGNAL(recall)->destination; AGS_RECALL_CLASS(ags_recall_audio_signal_parent_class)->run_inter(recall); if(source != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (source->flags)) != 0) g_warning("AgsRecallAudioSignal@source - AGS_AUDIO_SIGNAL_TEMPLATE: run_inter\n"); if(destination != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (destination->flags)) != 0) g_warning("AgsRecallAudioSignal@destination - AGS_AUDIO_SIGNAL_TEMPLATE: run_inter\n"); } void ags_recall_audio_signal_run_post(AgsRecall *recall){ AgsAudioSignal *source, *destination; source = AGS_RECALL_AUDIO_SIGNAL(recall)->source; destination = AGS_RECALL_AUDIO_SIGNAL(recall)->destination; AGS_RECALL_CLASS(ags_recall_audio_signal_parent_class)->run_post(recall); if(source != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (source->flags)) != 0) g_warning("AgsRecallAudioSignal@source - AGS_AUDIO_SIGNAL_TEMPLATE: run_post\n"); if(destination != NULL && (AGS_AUDIO_SIGNAL_TEMPLATE & (destination->flags)) != 0) g_warning("AgsRecallAudioSignal@destination - AGS_AUDIO_SIGNAL_TEMPLATE: run_post\n"); } void ags_recall_audio_signal_done(AgsRecall *recall) { g_object_unref(G_OBJECT(recall)); } void ags_recall_audio_signal_notify_soundcard(AgsRecallAudioSignal *recall_audio_signal, GParamSpec *param, gpointer data) { //TODO:JK: implement me } void ags_recall_audio_signal_notify_soundcard_after(AgsRecallAudioSignal *recall_audio_signal, GParamSpec *param, gpointer data) { //TODO:JK: implement me } /** * ags_recall_audio_signal_new: * @destination: destination #AgsAudioSignal * @source: source #AgsAudioSignal * @soundcard: default sink #AgsSoundcard * * Creates an #AgsRecallAudioSignal. * * Returns: a new #AgsRecallAudioSignal. * * Since: 1.0.0 */ AgsRecallAudioSignal* ags_recall_audio_signal_new(AgsAudioSignal *destination, AgsAudioSignal *source, GObject *soundcard) { AgsRecallAudioSignal *recall_audio_signal; recall_audio_signal = (AgsRecallAudioSignal *) g_object_new(AGS_TYPE_RECALL_AUDIO_SIGNAL, "soundcard", soundcard, "destination", destination, "source", source, NULL); return(recall_audio_signal); } gsequencer-1.4.24/ags/audio/ags_midiin.c0000644000175000017500000013547513246707333015035 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef __APPLE__ #include #endif #include #ifdef AGS_WITH_ALSA #include #endif #include #include #include #include #include #include /** * SECTION:ags_midiin * @short_description: Input from sequencer * @title: AgsMidiin * @section_id: * @include: ags/audio/ags_midiin.h * * #AgsMidiin represents a sequencer and supports midi input. */ void ags_midiin_class_init(AgsMidiinClass *midiin); void ags_midiin_connectable_interface_init(AgsConnectableInterface *connectable); void ags_midiin_sequencer_interface_init(AgsSequencerInterface *sequencer); void ags_midiin_init(AgsMidiin *midiin); void ags_midiin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_midiin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_midiin_disconnect(AgsConnectable *connectable); void ags_midiin_connect(AgsConnectable *connectable); void ags_midiin_dispose(GObject *gobject); void ags_midiin_finalize(GObject *gobject); void ags_midiin_set_application_context(AgsSequencer *sequencer, AgsApplicationContext *application_context); AgsApplicationContext* ags_midiin_get_application_context(AgsSequencer *sequencer); void ags_midiin_set_application_mutex(AgsSequencer *sequencer, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_midiin_get_application_mutex(AgsSequencer *sequencer); void ags_midiin_set_device(AgsSequencer *sequencer, gchar *device); gchar* ags_midiin_get_device(AgsSequencer *sequencer); void ags_midiin_list_cards(AgsSequencer *sequencer, GList **card_id, GList **card_name); gboolean ags_midiin_is_starting(AgsSequencer *sequencer); gboolean ags_midiin_is_recording(AgsSequencer *sequencer); void ags_midiin_delegate_record_init(AgsSequencer *sequencer, GError **error); void ags_midiin_delegate_record(AgsSequencer *sequencer, GError **error); void ags_midiin_delegate_stop(AgsSequencer *sequencer); void ags_midiin_oss_init(AgsSequencer *sequencer, GError **error); void ags_midiin_oss_record(AgsSequencer *sequencer, GError **error); void ags_midiin_oss_free(AgsSequencer *sequencer); void ags_midiin_alsa_init(AgsSequencer *sequencer, GError **error); void ags_midiin_alsa_record(AgsSequencer *sequencer, GError **error); void ags_midiin_alsa_free(AgsSequencer *sequencer); void ags_midiin_tic(AgsSequencer *sequencer); void ags_midiin_offset_changed(AgsSequencer *sequencer, guint note_offset); void ags_midiin_set_bpm(AgsSequencer *sequencer, gdouble bpm); gdouble ags_midiin_get_bpm(AgsSequencer *sequencer); void ags_midiin_set_delay_factor(AgsSequencer *sequencer, gdouble delay_factor); gdouble ags_midiin_get_delay_factor(AgsSequencer *sequencer); void* ags_midiin_get_buffer(AgsSequencer *sequencer, guint *buffer_length); void* ags_midiin_get_next_buffer(AgsSequencer *sequencer, guint *buffer_length); void ags_midiin_set_note_offset(AgsSequencer *sequencer, guint note_offset); guint ags_midiin_get_note_offset(AgsSequencer *sequencer); void ags_midiin_set_audio(AgsSequencer *sequencer, GList *audio); GList* ags_midiin_get_audio(AgsSequencer *sequencer); enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, }; enum{ LAST_SIGNAL, }; static gpointer ags_midiin_parent_class = NULL; static guint midiin_signals[LAST_SIGNAL]; GType ags_midiin_get_type (void) { static GType ags_type_midiin = 0; if(!ags_type_midiin){ static const GTypeInfo ags_midiin_info = { sizeof (AgsMidiinClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_midiin_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMidiin), 0, /* n_preallocs */ (GInstanceInitFunc) ags_midiin_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_midiin_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_sequencer_interface_info = { (GInterfaceInitFunc) ags_midiin_sequencer_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_midiin = g_type_register_static(G_TYPE_OBJECT, "AgsMidiin", &ags_midiin_info, 0); g_type_add_interface_static(ags_type_midiin, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_midiin, AGS_TYPE_SEQUENCER, &ags_sequencer_interface_info); } return (ags_type_midiin); } void ags_midiin_class_init(AgsMidiinClass *midiin) { GObjectClass *gobject; GParamSpec *param_spec; ags_midiin_parent_class = g_type_class_peek_parent(midiin); /* GObjectClass */ gobject = (GObjectClass *) midiin; gobject->set_property = ags_midiin_set_property; gobject->get_property = ags_midiin_get_property; gobject->dispose = ags_midiin_dispose; gobject->finalize = ags_midiin_finalize; /* properties */ /** * AgsMidiin:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsMidiin:application-mutex: * * The assigned application mutex * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsMidiin:device: * * The alsa sequencer indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "hw:0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsMidiin:buffer: * * The buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to record"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsMidiin:bpm: * * Beats per minute * * Since: 1.0.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsMidiin:delay-factor: * * tact * * Since: 1.0.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsMidiin:attack: * * Attack of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /* AgsMidiinClass */ } GQuark ags_midiin_error_quark() { return(g_quark_from_static_string("ags-midiin-error-quark")); } void ags_midiin_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_midiin_connect; connectable->disconnect = ags_midiin_disconnect; } void ags_midiin_sequencer_interface_init(AgsSequencerInterface *sequencer) { sequencer->set_application_context = ags_midiin_set_application_context; sequencer->get_application_context = ags_midiin_get_application_context; sequencer->set_application_mutex = ags_midiin_set_application_mutex; sequencer->get_application_mutex = ags_midiin_get_application_mutex; sequencer->set_device = ags_midiin_set_device; sequencer->get_device = ags_midiin_get_device; sequencer->list_cards = ags_midiin_list_cards; sequencer->is_starting = ags_midiin_is_starting; sequencer->is_playing = NULL; sequencer->is_recording = ags_midiin_is_recording; sequencer->play_init = NULL; sequencer->play = NULL; sequencer->record_init = ags_midiin_delegate_record_init; sequencer->record = ags_midiin_delegate_record; sequencer->stop = ags_midiin_delegate_stop; sequencer->record_init = ags_midiin_alsa_init; sequencer->record = ags_midiin_alsa_record; sequencer->stop = ags_midiin_alsa_free; sequencer->tic = ags_midiin_tic; sequencer->offset_changed = ags_midiin_offset_changed; sequencer->set_bpm = ags_midiin_set_bpm; sequencer->get_bpm = ags_midiin_get_bpm; sequencer->set_delay_factor = ags_midiin_set_delay_factor; sequencer->get_delay_factor = ags_midiin_get_delay_factor; sequencer->get_buffer = ags_midiin_get_buffer; sequencer->get_next_buffer = ags_midiin_get_next_buffer; sequencer->set_note_offset = ags_midiin_set_note_offset; sequencer->get_note_offset = ags_midiin_get_note_offset; sequencer->set_audio = ags_midiin_set_audio; sequencer->get_audio = ags_midiin_get_audio; } void ags_midiin_init(AgsMidiin *midiin) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; gboolean use_alsa; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert midiin mutex */ midiin->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif midiin->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) midiin, mutex); pthread_mutex_unlock(application_mutex); /* flags */ config = ags_config_get_instance(); #ifdef AGS_WITH_ALSA use_alsa = TRUE; #else use_alsa = FALSE; #endif str = ags_config_get_value(config, AGS_CONFIG_SEQUENCER, "backend"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SEQUENCER_0, "backend"); } if(str != NULL && !g_ascii_strncasecmp(str, "oss", 4)){ use_alsa = FALSE; } /* flags */ if(use_alsa){ midiin->flags = (AGS_MIDIIN_ALSA); }else{ midiin->flags = (AGS_MIDIIN_OSS); } /* sync flags */ g_atomic_int_set(&(midiin->sync_flags), (AGS_MIDIIN_PASS_THROUGH)); /* device */ if(use_alsa){ midiin->in.alsa.handle = NULL; midiin->in.alsa.device = AGS_MIDIIN_DEFAULT_ALSA_DEVICE; }else{ midiin->in.oss.device_fd = -1; midiin->in.oss.device = AGS_MIDIIN_DEFAULT_OSS_DEVICE; } /* ring buffer */ midiin->ring_buffer = (char **) malloc(2 * sizeof(char *)); midiin->ring_buffer[0] = NULL; midiin->ring_buffer[1] = NULL; midiin->ring_buffer_size[0] = 0; midiin->ring_buffer_size[1] = 0; /* buffer */ midiin->buffer = (char **) malloc(4 * sizeof(char *)); midiin->buffer[0] = NULL; midiin->buffer[1] = NULL; midiin->buffer[2] = NULL; midiin->buffer[3] = NULL; midiin->buffer_size[0] = 0; midiin->buffer_size[1] = 0; midiin->buffer_size[2] = 0; midiin->buffer_size[3] = 0; /* bpm */ midiin->bpm = AGS_SEQUENCER_DEFAULT_BPM; /* delay and delay factor */ midiin->delay = AGS_SEQUENCER_DEFAULT_DELAY; midiin->delay_factor = AGS_SEQUENCER_DEFAULT_DELAY_FACTOR; midiin->latency = NSEC_PER_SEC / 4000.0; /* counters */ midiin->note_offset = 0; midiin->tact_counter = 0.0; midiin->delay_counter = 0; midiin->tic_counter = 0; /* poll thread */ midiin->poll_thread = (pthread_t *) malloc(sizeof(pthread_t)); /* poll mutex */ midiin->poll_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(midiin->poll_mutex, NULL); midiin->poll_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(midiin->poll_cond, NULL); /* poll finish mutex */ midiin->poll_finish_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(midiin->poll_finish_mutex, NULL); midiin->poll_finish_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(midiin->poll_finish_cond, NULL); /* parent */ midiin->application_context = NULL; midiin->application_mutex = NULL; /* all AgsAudio */ midiin->audio = NULL; } void ags_midiin_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMidiin *midiin; midiin = AGS_MIDIIN(gobject); //TODO:JK: implement set functionality switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = g_value_get_object(value); if(midiin->application_context == (GObject *) application_context){ return; } if(midiin->application_context != NULL){ g_object_unref(G_OBJECT(midiin->application_context)); } if(application_context != NULL){ g_object_ref(G_OBJECT(application_context)); midiin->application_mutex = application_context->mutex; }else{ midiin->application_mutex = NULL; } midiin->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(midiin->application_mutex == application_mutex){ return; } midiin->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); if((AGS_MIDIIN_OSS & (midiin->flags)) != 0){ midiin->in.oss.device = g_strdup(device); }else if((AGS_MIDIIN_ALSA & (midiin->flags)) != 0){ midiin->in.alsa.device = g_strdup(device); } } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); midiin->bpm = bpm; } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); midiin->delay_factor = delay_factor; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midiin_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMidiin *midiin; midiin = AGS_MIDIIN(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, midiin->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, midiin->application_mutex); } break; case PROP_DEVICE: { if((AGS_MIDIIN_OSS & (midiin->flags)) != 0){ g_value_set_string(value, midiin->in.oss.device); }else if((AGS_MIDIIN_ALSA & (midiin->flags)) != 0){ g_value_set_string(value, midiin->in.alsa.device); } } break; case PROP_BUFFER: { g_value_set_pointer(value, midiin->buffer); } break; case PROP_BPM: { g_value_set_double(value, midiin->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, midiin->delay_factor); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midiin_dispose(GObject *gobject) { AgsMidiin *midiin; GList *list; midiin = AGS_MIDIIN(gobject); /* application context */ if(midiin->application_context != NULL){ g_object_unref(midiin->application_context); midiin->application_context = NULL; } /* audio */ if(midiin->audio != NULL){ list = midiin->audio; while(list != NULL){ g_object_set(list->data, "sequencer", NULL, NULL); list = list->next; } g_list_free_full(midiin->audio, g_object_unref); midiin->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_midiin_parent_class)->dispose(gobject); } void ags_midiin_finalize(GObject *gobject) { AgsMidiin *midiin; AgsMutexManager *mutex_manager; GList *list; midiin = AGS_MIDIIN(gobject); /* remove midiin mutex */ pthread_mutex_lock(midiin->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(midiin->application_mutex); /* free input buffer */ if(midiin->buffer[0] != NULL){ free(midiin->buffer[0]); } if(midiin->buffer[1] != NULL){ free(midiin->buffer[1]); } if(midiin->buffer[2] != NULL){ free(midiin->buffer[2]); } if(midiin->buffer[3] != NULL){ free(midiin->buffer[3]); } /* free buffer array */ free(midiin->buffer); /* application context */ if(midiin->application_context != NULL){ g_object_unref(midiin->application_context); } /* audio */ if(midiin->audio != NULL){ list = midiin->audio; while(list != NULL){ g_object_set(list->data, "sequencer", NULL, NULL); list = list->next; } g_list_free_full(midiin->audio, g_object_unref); } pthread_mutex_destroy(midiin->mutex); free(midiin->mutex); pthread_mutexattr_destroy(midiin->mutexattr); free(midiin->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_midiin_parent_class)->finalize(gobject); } void ags_midiin_connect(AgsConnectable *connectable) { AgsMidiin *midiin; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *mutex; pthread_mutexattr_t attr; midiin = AGS_MIDIIN(connectable); /* create midiin mutex */ //FIXME:JK: memory leak pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, &attr); /* insert mutex */ pthread_mutex_lock(midiin->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_insert(mutex_manager, (GObject *) midiin, mutex); pthread_mutex_unlock(midiin->application_mutex); /* */ list = midiin->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_midiin_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_midiin_switch_buffer_flag: * @midiin: an #AgsMidiin * * The buffer flag indicates the currently played buffer. * * Since: 1.0.0 */ void ags_midiin_switch_buffer_flag(AgsMidiin *midiin) { if((AGS_MIDIIN_BUFFER0 & (midiin->flags)) != 0){ midiin->flags &= (~AGS_MIDIIN_BUFFER0); midiin->flags |= AGS_MIDIIN_BUFFER1; }else if((AGS_MIDIIN_BUFFER1 & (midiin->flags)) != 0){ midiin->flags &= (~AGS_MIDIIN_BUFFER1); midiin->flags |= AGS_MIDIIN_BUFFER2; }else if((AGS_MIDIIN_BUFFER2 & (midiin->flags)) != 0){ midiin->flags &= (~AGS_MIDIIN_BUFFER2); midiin->flags |= AGS_MIDIIN_BUFFER3; }else if((AGS_MIDIIN_BUFFER3 & (midiin->flags)) != 0){ midiin->flags &= (~AGS_MIDIIN_BUFFER3); midiin->flags |= AGS_MIDIIN_BUFFER0; } } void ags_midiin_set_application_context(AgsSequencer *sequencer, AgsApplicationContext *application_context) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); midiin->application_context = (GObject *) application_context; } AgsApplicationContext* ags_midiin_get_application_context(AgsSequencer *sequencer) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); return((AgsApplicationContext *) midiin->application_context); } void ags_midiin_set_application_mutex(AgsSequencer *sequencer, pthread_mutex_t *application_mutex) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); midiin->application_mutex = application_mutex; } pthread_mutex_t* ags_midiin_get_application_mutex(AgsSequencer *sequencer) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); return(midiin->application_mutex); } void ags_midiin_set_device(AgsSequencer *sequencer, gchar *device) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); if((AGS_MIDIIN_ALSA & (midiin->flags)) != 0){ midiin->in.alsa.device = g_strdup(device); }else{ midiin->in.oss.device = g_strdup(device); } } gchar* ags_midiin_get_device(AgsSequencer *sequencer) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); if((AGS_MIDIIN_ALSA & (midiin->flags)) != 0){ return(midiin->in.alsa.device); }else{ return(midiin->in.oss.device); } } void ags_midiin_list_cards(AgsSequencer *sequencer, GList **card_id, GList **card_name) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } if((AGS_MIDIIN_ALSA & (midiin->flags)) != 0){ #ifdef AGS_WITH_ALSA snd_ctl_t *card_handle; snd_ctl_card_info_t *card_info; char *name; gchar *str; int card_num; int device; int error; card_num = -1; while(TRUE){ error = snd_card_next(&card_num); if(card_num < 0){ break; } if(error < 0){ continue; } str = g_strdup_printf("hw:%i", card_num); error = snd_ctl_open(&card_handle, str, 0); if(error < 0){ continue; } snd_ctl_card_info_alloca(&card_info); error = snd_ctl_card_info(card_handle, card_info); if(error < 0){ continue; } device = -1; error = snd_ctl_rawmidi_next_device(card_handle, &device); if(error < 0){ continue; } if(card_id != NULL){ *card_id = g_list_prepend(*card_id, str); } if(card_name != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(snd_ctl_card_info_get_name(card_info))); } snd_ctl_close(card_handle); } snd_config_update_free_global(); #endif }else{ #ifdef AGS_WITH_OSS oss_sysinfo sysinfo; oss_midi_info mi; char *mixer_device; int mixerfd = -1; int next, n; int i; if((mixer_device = getenv("OSS_MIXERDEV")) == NULL){ mixer_device = "/dev/mixer"; } if((mixerfd = open(mixer_device, O_RDONLY, 0)) == -1){ int e = errno; switch(e){ case ENXIO: case ENODEV: { g_warning("Open Sound System is not running in your system."); } break; case ENOENT: { g_warning("No %s device available in your system.\nPerhaps Open Sound System is not installed or running.", mixer_device); } break; default: g_warning("%s", strerror(e)); } } if(ioctl(mixerfd, SNDCTL_SYSINFO, &sysinfo) == -1){ if(errno == ENXIO){ g_warning("OSS has not detected any supported sound hardware in your system."); }else{ g_warning("SNDCTL_SYSINFO"); if(errno == EINVAL){ g_warning("Error: OSS version 4.0 or later is required"); } } n = 0; }else{ n = sysinfo.nummidis; } memset(&mi, 0, sizeof(oss_midi_info)); ioctl(mixerfd, SNDCTL_MIDI_INFO, &mi); for(i = 0; i < n; i++){ mi.dev = i; if(ioctl(mixerfd, SNDCTL_ENGINEINFO, &mi) == -1){ int e = errno; g_warning("Can't get device info for /dev/midi%2d (SNDCTL_AUDIOINFO)\nerrno = %d: %s", i, e, strerror(e)); continue; } if((MIDI_CAP_INPUT & (mi.caps)) != 0){ if(card_id != NULL){ *card_id = g_list_prepend(*card_id, g_strdup_printf("/dev/midi2%i", i)); } if(card_name != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(mi.name)); } } if(next <= 0){ break; } } #endif } if(card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL){ *card_name = g_list_reverse(*card_name); } } gboolean ags_midiin_is_starting(AgsSequencer *sequencer) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); return(((AGS_MIDIIN_START_RECORD & (midiin->flags)) != 0) ? TRUE: FALSE); } gboolean ags_midiin_is_recording(AgsSequencer *sequencer) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); return(((AGS_MIDIIN_RECORD & (midiin->flags)) != 0) ? TRUE: FALSE); } void ags_midiin_delegate_record_init(AgsSequencer *sequencer, GError **error) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); if((AGS_MIDIIN_ALSA & (midiin->flags)) != 0){ ags_midiin_alsa_init(sequencer, error); }else if((AGS_MIDIIN_OSS & (midiin->flags)) != 0){ ags_midiin_oss_init(sequencer, error); } } void ags_midiin_delegate_record(AgsSequencer *sequencer, GError **error) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); if((AGS_MIDIIN_ALSA & (midiin->flags)) != 0){ ags_midiin_alsa_record(sequencer, error); }else if((AGS_MIDIIN_OSS & (midiin->flags)) != 0){ ags_midiin_oss_record(sequencer, error); } } void ags_midiin_delegate_stop(AgsSequencer *sequencer) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); if((AGS_MIDIIN_ALSA & (midiin->flags)) != 0){ ags_midiin_alsa_free(sequencer); }else if((AGS_MIDIIN_OSS & (midiin->flags)) != 0){ ags_midiin_oss_free(sequencer); } } void ags_midiin_oss_init(AgsSequencer *sequencer, GError **error) { AgsMidiin *midiin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; gchar *str; guint word_size; int format; int tmp; pthread_mutex_t *mutex; midiin = AGS_MIDIIN(sequencer); application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) midiin); pthread_mutex_unlock(application_context->mutex); /* prepare for playback */ pthread_mutex_lock(mutex); midiin->flags |= (AGS_MIDIIN_BUFFER3 | AGS_MIDIIN_START_RECORD | AGS_MIDIIN_RECORD | AGS_MIDIIN_NONBLOCKING); #ifdef AGS_WITH_OSS /* open device fd */ str = midiin->in.oss.device; midiin->in.oss.device_fd = open(str, O_WRONLY, 0); if(midiin->in.oss.device_fd == -1){ pthread_mutex_unlock(mutex); g_warning("couldn't open device %s", midiin->in.oss.device); if(error != NULL){ g_set_error(error, AGS_MIDIIN_ERROR, AGS_MIDIIN_ERROR_LOCKED_SEQUENCER, "unable to open MIDI device: %s\n", str); } return; } #endif midiin->tact_counter = 0.0; midiin->delay_counter = 0.0; midiin->tic_counter = 0; #ifdef AGS_WITH_OSS midiin->flags |= AGS_MIDIIN_INITIALIZED; #endif midiin->flags |= AGS_MIDIIN_BUFFER0; midiin->flags &= (~(AGS_MIDIIN_BUFFER1 | AGS_MIDIIN_BUFFER2 | AGS_MIDIIN_BUFFER3)); pthread_mutex_unlock(mutex); } void ags_midiin_oss_record(AgsSequencer *sequencer, GError **error) { AgsMidiin *midiin; AgsTicDevice *tic_device; // AgsSwitchBufferFlag *switch_buffer_flag; AgsThread *task_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *task; char **ring_buffer; char buf[128]; gboolean no_event; guint nth_buffer; guint nth_ring_buffer; guint ring_buffer_size; int device_fd; int num_read; pthread_mutex_t *mutex; midiin = AGS_MIDIIN(sequencer); /* */ application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) midiin); pthread_mutex_unlock(application_context->mutex); /* poll MIDI device */ pthread_mutex_lock(mutex); midiin->flags &= (~AGS_MIDIIN_START_RECORD); if((AGS_MIDIIN_INITIALIZED & (midiin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } device_fd = midiin->in.oss.device_fd; /* nth buffer */ if((AGS_MIDIIN_BUFFER0 & (midiin->flags)) != 0){ nth_buffer = 1; nth_ring_buffer = 0; }else if((AGS_MIDIIN_BUFFER1 & (midiin->flags)) != 0){ nth_buffer = 2; nth_ring_buffer = 1; }else if((AGS_MIDIIN_BUFFER2 & (midiin->flags)) != 0){ nth_buffer = 3; nth_ring_buffer = 0; }else if((AGS_MIDIIN_BUFFER3 & (midiin->flags)) != 0){ nth_buffer = 0; nth_ring_buffer = 1; } if(midiin->ring_buffer[nth_ring_buffer] != NULL){ free(midiin->ring_buffer[nth_ring_buffer]); } midiin->ring_buffer[nth_ring_buffer] = NULL; midiin->ring_buffer_size[nth_ring_buffer] = 0; ring_buffer = midiin->ring_buffer; ring_buffer_size = midiin->ring_buffer_size[nth_ring_buffer]; pthread_mutex_unlock(mutex); num_read = 1; while(num_read > 0){ num_read = 0; #ifdef AGS_WITH_OSS num_read = read(device_fd, buf, sizeof(buf)); if((num_read < 0)){ g_warning("Problem reading MIDI input"); } if(num_read > 0){ if(ceil((ring_buffer_size + num_read) / AGS_MIDIIN_DEFAULT_BUFFER_SIZE) > ceil(ring_buffer_size / AGS_MIDIIN_DEFAULT_BUFFER_SIZE)){ if(ring_buffer[nth_ring_buffer] == NULL){ ring_buffer[nth_ring_buffer] = (char *) malloc(AGS_MIDIIN_DEFAULT_BUFFER_SIZE * sizeof(char)); }else{ ring_buffer[nth_ring_buffer] = (char *) realloc(ring_buffer[nth_ring_buffer], (AGS_MIDIIN_DEFAULT_BUFFER_SIZE * ceil(ring_buffer_size / AGS_MIDIIN_DEFAULT_BUFFER_SIZE) + AGS_MIDIIN_DEFAULT_BUFFER_SIZE) * sizeof(char)); } } memcpy(&(ring_buffer[nth_ring_buffer][ring_buffer_size]), buf, num_read); ring_buffer_size += num_read; } #endif } /* switch buffer */ pthread_mutex_lock(mutex); /* update byte array and buffer size */ if(midiin->buffer[nth_buffer] != NULL){ free(midiin->buffer[nth_buffer]); } midiin->buffer[nth_buffer] = NULL; midiin->ring_buffer_size[nth_ring_buffer] = ring_buffer_size; midiin->buffer_size[nth_buffer] = ring_buffer_size; /* fill buffer */ if(ring_buffer_size > 0){ midiin->buffer[nth_buffer] = (char *) malloc(ring_buffer_size * sizeof(char)); memcpy(midiin->buffer[nth_buffer], ring_buffer[nth_ring_buffer], ring_buffer_size * sizeof(char)); } pthread_mutex_unlock(mutex); pthread_mutex_lock(mutex); ags_midiin_switch_buffer_flag(midiin); device_fd = midiin->in.oss.device_fd; /* nth buffer */ if((AGS_MIDIIN_BUFFER0 & (midiin->flags)) != 0){ nth_buffer = 1; nth_ring_buffer = 0; }else if((AGS_MIDIIN_BUFFER1 & (midiin->flags)) != 0){ nth_buffer = 2; nth_ring_buffer = 1; }else if((AGS_MIDIIN_BUFFER2 & (midiin->flags)) != 0){ nth_buffer = 3; nth_ring_buffer = 0; }else if((AGS_MIDIIN_BUFFER3 & (midiin->flags)) != 0){ nth_buffer = 0; nth_ring_buffer = 1; } if(midiin->ring_buffer[nth_ring_buffer] != NULL){ free(midiin->ring_buffer[nth_ring_buffer]); } midiin->ring_buffer[nth_ring_buffer] = NULL; midiin->ring_buffer_size[nth_ring_buffer] = 0; pthread_mutex_unlock(mutex); /* update sequencer */ task_thread = ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_TASK_THREAD); task = NULL; /* tic sequencer */ tic_device = ags_tic_device_new((GObject *) midiin); task = g_list_append(task, tic_device); /* reset - switch buffer flags */ // switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) midiin); // task = g_list_append(task, // switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); } void ags_midiin_oss_free(AgsSequencer *sequencer) { AgsMidiin *midiin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *poll_fd; pthread_mutex_t *mutex; midiin = AGS_MIDIIN(sequencer); application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) midiin); pthread_mutex_unlock(application_context->mutex); pthread_mutex_lock(mutex); if((AGS_MIDIIN_INITIALIZED & (midiin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } midiin->flags &= (~(AGS_MIDIIN_RECORD | AGS_MIDIIN_INITIALIZED)); pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(mutex); close(midiin->in.oss.device_fd); midiin->in.oss.device_fd = -1; midiin->flags &= (~(AGS_MIDIIN_BUFFER0 | AGS_MIDIIN_BUFFER1 | AGS_MIDIIN_BUFFER2 | AGS_MIDIIN_BUFFER3)); g_atomic_int_or(&(midiin->sync_flags), AGS_MIDIIN_PASS_THROUGH); midiin->note_offset = 0; pthread_mutex_unlock(mutex); } void ags_midiin_alsa_init(AgsSequencer *sequencer, GError **error) { AgsMidiin *midiin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; #ifdef AGS_WITH_ALSA int mode = SND_RAWMIDI_NONBLOCK; snd_rawmidi_t* handle = NULL; #endif int err; pthread_mutex_t *mutex; midiin = AGS_MIDIIN(sequencer); application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) midiin); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); /* prepare for record */ midiin->flags |= (AGS_MIDIIN_BUFFER3 | AGS_MIDIIN_START_RECORD | AGS_MIDIIN_RECORD | AGS_MIDIIN_NONBLOCKING); midiin->note_offset = 0; #ifdef AGS_WITH_ALSA mode = SND_RAWMIDI_NONBLOCK; if((err = snd_rawmidi_open(&handle, NULL, midiin->in.alsa.device, mode)) < 0) { pthread_mutex_unlock(mutex); printf("Record midi open error: %s\n", snd_strerror(err)); g_set_error(error, AGS_MIDIIN_ERROR, AGS_MIDIIN_ERROR_LOCKED_SEQUENCER, "unable to open midi device: %s\n", snd_strerror(err)); return; } /* */ midiin->in.alsa.handle = handle; #endif midiin->tact_counter = 0.0; midiin->delay_counter = 0.0; midiin->tic_counter = 0; #ifdef AGS_WITH_ALSA midiin->flags |= AGS_MIDIIN_INITIALIZED; #endif pthread_mutex_unlock(mutex); } void ags_midiin_alsa_record(AgsSequencer *sequencer, GError **error) { AgsMidiin *midiin; AgsTicDevice *tic_device; // AgsSwitchBufferFlag *switch_buffer_flag; AgsThread *task_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *task; #ifdef AGS_WITH_ALSA snd_rawmidi_t *device_handle; #else gpointer device_handle; #endif char **ring_buffer; gboolean no_event; guint nth_buffer; guint nth_ring_buffer; guint ring_buffer_size; int status; unsigned char c; pthread_mutex_t *mutex; midiin = AGS_MIDIIN(sequencer); /* */ application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) midiin); pthread_mutex_unlock(application_context->mutex); /* prepare poll */ pthread_mutex_lock(mutex); midiin->flags &= (~AGS_MIDIIN_START_RECORD); if((AGS_MIDIIN_INITIALIZED & (midiin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } device_handle = midiin->in.alsa.handle; /* nth buffer */ if((AGS_MIDIIN_BUFFER0 & (midiin->flags)) != 0){ nth_buffer = 1; nth_ring_buffer = 0; }else if((AGS_MIDIIN_BUFFER1 & (midiin->flags)) != 0){ nth_buffer = 2; nth_ring_buffer = 1; }else if((AGS_MIDIIN_BUFFER2 & (midiin->flags)) != 0){ nth_buffer = 3; nth_ring_buffer = 0; }else if((AGS_MIDIIN_BUFFER3 & (midiin->flags)) != 0){ nth_buffer = 0; nth_ring_buffer = 1; } if(midiin->ring_buffer[nth_ring_buffer] != NULL){ free(midiin->ring_buffer[nth_ring_buffer]); } midiin->ring_buffer[nth_ring_buffer] = NULL; midiin->ring_buffer_size[nth_ring_buffer] = 0; ring_buffer = midiin->ring_buffer; ring_buffer_size = midiin->ring_buffer_size[nth_ring_buffer]; pthread_mutex_unlock(mutex); /* poll MIDI device */ status = 0; while(status >= 0){ status = -1; #ifdef AGS_WITH_ALSA status = snd_rawmidi_read(device_handle, &c, 1); if((status < 0) && (status != -EBUSY) && (status != -EAGAIN)){ g_warning("Problem reading MIDI input: %s", snd_strerror(status)); } if(status >= 0){ if(ring_buffer_size % AGS_MIDIIN_DEFAULT_BUFFER_SIZE == 0){ if(ring_buffer[nth_ring_buffer] == NULL){ ring_buffer[nth_ring_buffer] = (char *) malloc(AGS_MIDIIN_DEFAULT_BUFFER_SIZE * sizeof(char)); }else{ ring_buffer[nth_ring_buffer] = (char *) realloc(ring_buffer[nth_ring_buffer], (ring_buffer_size + AGS_MIDIIN_DEFAULT_BUFFER_SIZE) * sizeof(char)); } } ring_buffer[nth_ring_buffer][ring_buffer_size] = (unsigned char) c; ring_buffer_size += 1; } #endif } /* switch buffer */ pthread_mutex_lock(mutex); /* update byte array and buffer size */ if(midiin->buffer[nth_buffer] != NULL){ free(midiin->buffer[nth_buffer]); } midiin->buffer[nth_buffer] = NULL; midiin->ring_buffer_size[nth_ring_buffer] = ring_buffer_size; midiin->buffer_size[nth_buffer] = ring_buffer_size; /* fill buffer */ if(ring_buffer_size > 0){ midiin->buffer[nth_buffer] = (char *) malloc(ring_buffer_size * sizeof(char)); memcpy(midiin->buffer[nth_buffer], ring_buffer[nth_ring_buffer], ring_buffer_size * sizeof(char)); } pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(mutex); ags_midiin_switch_buffer_flag(midiin); device_handle = midiin->in.alsa.handle; /* nth buffer */ if((AGS_MIDIIN_BUFFER0 & (midiin->flags)) != 0){ nth_buffer = 1; nth_ring_buffer = 0; }else if((AGS_MIDIIN_BUFFER1 & (midiin->flags)) != 0){ nth_buffer = 2; nth_ring_buffer = 1; }else if((AGS_MIDIIN_BUFFER2 & (midiin->flags)) != 0){ nth_buffer = 3; nth_ring_buffer = 0; }else if((AGS_MIDIIN_BUFFER3 & (midiin->flags)) != 0){ nth_buffer = 0; nth_ring_buffer = 1; } if(midiin->ring_buffer[nth_ring_buffer] != NULL){ free(midiin->ring_buffer[nth_ring_buffer]); } midiin->ring_buffer[nth_ring_buffer] = NULL; midiin->ring_buffer_size[nth_ring_buffer] = 0; pthread_mutex_unlock(mutex); /* update sequencer */ task_thread = ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_TASK_THREAD); task = NULL; /* tic sequencer */ tic_device = ags_tic_device_new((GObject *) midiin); task = g_list_append(task, tic_device); /* reset - switch buffer flags */ // switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) midiin); // task = g_list_append(task, // switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); } void ags_midiin_alsa_free(AgsSequencer *sequencer) { AgsMidiin *midiin; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; pthread_mutex_t *mutex; midiin = AGS_MIDIIN(sequencer); application_context = ags_sequencer_get_application_context(sequencer); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) midiin); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); if((AGS_MIDIIN_INITIALIZED & (midiin->flags)) == 0){ pthread_mutex_unlock(mutex); return; } midiin->flags &= (~(AGS_MIDIIN_RECORD | AGS_MIDIIN_INITIALIZED)); pthread_mutex_unlock(mutex); /* */ pthread_mutex_lock(mutex); #ifdef AGS_WITH_ALSA snd_rawmidi_close(midiin->in.alsa.handle); #endif midiin->in.alsa.handle = NULL; midiin->flags &= (~(AGS_MIDIIN_BUFFER0 | AGS_MIDIIN_BUFFER1 | AGS_MIDIIN_BUFFER2 | AGS_MIDIIN_BUFFER3)); g_atomic_int_or(&(midiin->sync_flags), AGS_MIDIIN_PASS_THROUGH); if(midiin->buffer[1] != NULL){ free(midiin->buffer[1]); midiin->buffer_size[1] = 0; } if(midiin->buffer[2] != NULL){ free(midiin->buffer[2]); midiin->buffer_size[2] = 0; } if(midiin->buffer[3] != NULL){ free(midiin->buffer[3]); midiin->buffer_size[3] = 0; } if(midiin->buffer[0] != NULL){ free(midiin->buffer[0]); midiin->buffer_size[0] = 0; } pthread_mutex_unlock(mutex); } void ags_midiin_tic(AgsSequencer *sequencer) { AgsMidiin *midiin; gdouble delay; midiin = AGS_MIDIIN(sequencer); /* determine if attack should be switched */ delay = midiin->delay; if((guint) midiin->delay_counter + 1 >= (guint) delay){ ags_sequencer_set_note_offset(sequencer, midiin->note_offset + 1); /* delay */ ags_sequencer_offset_changed(sequencer, midiin->note_offset); /* reset - delay counter */ midiin->delay_counter = 0.0; midiin->tact_counter += 1.0; }else{ midiin->delay_counter += 1.0; } } void ags_midiin_offset_changed(AgsSequencer *sequencer, guint note_offset) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); midiin->tic_counter += 1; if(midiin->tic_counter == AGS_SEQUENCER_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ midiin->tic_counter = 0; } } void ags_midiin_set_bpm(AgsSequencer *sequencer, gdouble bpm) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); midiin->bpm = bpm; } gdouble ags_midiin_get_bpm(AgsSequencer *sequencer) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); return(midiin->bpm); } void ags_midiin_set_delay_factor(AgsSequencer *sequencer, gdouble delay_factor) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); midiin->delay_factor = delay_factor; } gdouble ags_midiin_get_delay_factor(AgsSequencer *sequencer) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); return(midiin->delay_factor); } void* ags_midiin_get_buffer(AgsSequencer *sequencer, guint *buffer_length) { AgsMidiin *midiin; char *buffer; midiin = AGS_MIDIIN(sequencer); /* get buffer */ if((AGS_MIDIIN_BUFFER0 & (midiin->flags)) != 0){ buffer = midiin->buffer[0]; }else if((AGS_MIDIIN_BUFFER1 & (midiin->flags)) != 0){ buffer = midiin->buffer[1]; }else if((AGS_MIDIIN_BUFFER2 & (midiin->flags)) != 0){ buffer = midiin->buffer[2]; }else if((AGS_MIDIIN_BUFFER3 & (midiin->flags)) != 0){ buffer = midiin->buffer[3]; }else{ buffer = NULL; } /* return the buffer's length */ if(buffer_length != NULL){ if((AGS_MIDIIN_BUFFER0 & (midiin->flags)) != 0){ *buffer_length = midiin->buffer_size[0]; }else if((AGS_MIDIIN_BUFFER1 & (midiin->flags)) != 0){ *buffer_length = midiin->buffer_size[1]; }else if((AGS_MIDIIN_BUFFER2 & (midiin->flags)) != 0){ *buffer_length = midiin->buffer_size[2]; }else if((AGS_MIDIIN_BUFFER3 & (midiin->flags)) != 0){ *buffer_length = midiin->buffer_size[3]; }else{ *buffer_length = 0; } } return(buffer); } void* ags_midiin_get_next_buffer(AgsSequencer *sequencer, guint *buffer_length) { AgsMidiin *midiin; char *buffer; midiin = AGS_MIDIIN(sequencer); /* get buffer */ if((AGS_MIDIIN_BUFFER0 & (midiin->flags)) != 0){ buffer = midiin->buffer[1]; }else if((AGS_MIDIIN_BUFFER1 & (midiin->flags)) != 0){ buffer = midiin->buffer[2]; }else if((AGS_MIDIIN_BUFFER2 & (midiin->flags)) != 0){ buffer = midiin->buffer[3]; }else if((AGS_MIDIIN_BUFFER3 & (midiin->flags)) != 0){ buffer = midiin->buffer[0]; }else{ buffer = NULL; } /* return the buffer's length */ if(buffer_length != NULL){ if((AGS_MIDIIN_BUFFER0 & (midiin->flags)) != 0){ *buffer_length = midiin->buffer_size[1]; }else if((AGS_MIDIIN_BUFFER1 & (midiin->flags)) != 0){ *buffer_length = midiin->buffer_size[2]; }else if((AGS_MIDIIN_BUFFER2 & (midiin->flags)) != 0){ *buffer_length = midiin->buffer_size[3]; }else if((AGS_MIDIIN_BUFFER3 & (midiin->flags)) != 0){ *buffer_length = midiin->buffer_size[0]; }else{ *buffer_length = 0; } } return(buffer); } void ags_midiin_set_note_offset(AgsSequencer *sequencer, guint note_offset) { AGS_MIDIIN(sequencer)->note_offset = note_offset; } guint ags_midiin_get_note_offset(AgsSequencer *sequencer) { return(AGS_MIDIIN(sequencer)->note_offset); } void ags_midiin_set_audio(AgsSequencer *sequencer, GList *audio) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); midiin->audio = audio; } GList* ags_midiin_get_audio(AgsSequencer *sequencer) { AgsMidiin *midiin; midiin = AGS_MIDIIN(sequencer); return(midiin->audio); } /** * ags_midiin_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsMidiin, refering to @application_context. * * Returns: a new #AgsMidiin * * Since: 1.0.0 */ AgsMidiin* ags_midiin_new(GObject *application_context) { AgsMidiin *midiin; midiin = (AgsMidiin *) g_object_new(AGS_TYPE_MIDIIN, "application-context", application_context, NULL); return(midiin); } gsequencer-1.4.24/ags/audio/ags_midiin.h0000644000175000017500000001242113246707333015023 00000000000000/* 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 . */ #ifndef __AGS_MIDIIN_H__ #define __AGS_MIDIIN_H__ #include #include #include #include #include #ifdef AGS_WITH_ALSA #include #endif #define AGS_TYPE_MIDIIN (ags_midiin_get_type()) #define AGS_MIDIIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIDIIN, AgsMidiin)) #define AGS_MIDIIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_MIDIIN, AgsMidiin)) #define AGS_IS_MIDIIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MIDIIN)) #define AGS_IS_MIDIIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MIDIIN)) #define AGS_MIDIIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_MIDIIN, AgsMidiinClass)) #define AGS_MIDIIN_DEFAULT_ALSA_DEVICE "hw:0,0\0" #define AGS_MIDIIN_DEFAULT_OSS_DEVICE "/dev/midi00\0" #define AGS_MIDIIN_DEFAULT_BUFFER_SIZE (4096) typedef struct _AgsMidiin AgsMidiin; typedef struct _AgsMidiinClass AgsMidiinClass; /** * AgsMidiinFlags: * @AGS_MIDIIN_BUFFER0: ring-buffer 0 * @AGS_MIDIIN_BUFFER1: ring-buffer 1 * @AGS_MIDIIN_BUFFER2: ring-buffer 2 * @AGS_MIDIIN_BUFFER3: ring-buffer 3 * @AGS_MIDIIN_ATTACK_FIRST: use first attack, instead of second one * @AGS_MIDIIN_RECORD: is recording * @AGS_MIDIIN_SHUTDOWN: stop recording * @AGS_MIDIIN_START_RECORD: just started recording * @AGS_MIDIIN_NONBLOCKING: do non-blocking calls * @AGS_MIDIIN_INITIALIZED: recording is initialized * * Enum values to control the behavior or indicate internal state of #AgsMidiin by * enable/disable as flags. */ typedef enum { AGS_MIDIIN_BUFFER0 = 1, AGS_MIDIIN_BUFFER1 = 1 << 1, AGS_MIDIIN_BUFFER2 = 1 << 2, AGS_MIDIIN_BUFFER3 = 1 << 3, AGS_MIDIIN_ATTACK_FIRST = 1 << 4, AGS_MIDIIN_RECORD = 1 << 5, AGS_MIDIIN_OSS = 1 << 6, AGS_MIDIIN_ALSA = 1 << 7, AGS_MIDIIN_SHUTDOWN = 1 << 8, AGS_MIDIIN_START_RECORD = 1 << 9, AGS_MIDIIN_NONBLOCKING = 1 << 10, AGS_MIDIIN_INITIALIZED = 1 << 11, }AgsMidiinFlags; /** * AgsMidiinSyncFlags: * @AGS_MIDIIN_PASS_THROUGH: do not sync * @AGS_MIDIIN_INITIAL_POLL: initial poll * @AGS_MIDIIN_POLL_WAIT: sync wait, sequencer conditional lock * @AGS_MIDIIN_POLL_DONE: sync done, sequencer conditional lock * @AGS_MIDIIN_POLL_FINISH_WAIT: sync wait, client conditional lock * @AGS_MIDIIN_POLL_FINISH_DONE: sync done, client conditional lock * @AGS_MIDIIN_POLL_SWITCH_BUFFER: switch buffer * * Enum values to control the synchronization between sequencer and poll. */ typedef enum{ AGS_MIDIIN_PASS_THROUGH = 1, AGS_MIDIIN_INITIAL_POLL = 1 << 1, AGS_MIDIIN_POLL_WAIT = 1 << 2, AGS_MIDIIN_POLL_DONE = 1 << 3, AGS_MIDIIN_POLL_FINISH_WAIT = 1 << 4, AGS_MIDIIN_POLL_FINISH_DONE = 1 << 5, AGS_MIDIIN_POLL_SWITCH_BUFFER = 1 << 6, }AgsMidiinSyncFlags; #define AGS_MIDIIN_ERROR (ags_midiin_error_quark()) typedef enum{ AGS_MIDIIN_ERROR_LOCKED_SEQUENCER, }AgsMidiinError; struct _AgsMidiin { GObject object; guint flags; volatile guint sync_flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; char **ring_buffer; guint ring_buffer_size[2]; char **buffer; guint buffer_size[4]; double bpm; // beats per minute gdouble delay; gdouble delay_factor; guint latency; gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; union{ struct _AgsOssMidi{ int device_fd; char *device; }oss; struct _AgsAlsaMidi{ char *device; int rc; #ifdef AGS_WITH_ALSA snd_rawmidi_t *handle; #else gpointer handle; #endif }alsa; }in; pthread_t *poll_thread; pthread_mutex_t *poll_mutex; pthread_cond_t *poll_cond; pthread_mutex_t *poll_finish_mutex; pthread_cond_t *poll_finish_cond; GObject *application_context; pthread_mutex_t *application_mutex; GList *audio; }; struct _AgsMidiinClass { GObjectClass object; }; GType ags_midiin_get_type(); GQuark ags_midiin_error_quark(); void ags_midiin_switch_buffer_flag(AgsMidiin *midiin); AgsMidiin* ags_midiin_new(GObject *application_context); #endif /*__AGS_MIDIIN_H__*/ gsequencer-1.4.24/ags/audio/ags_wave.c0000644000175000017500000007416613256163135014522 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #include #include #include #include void ags_wave_class_init(AgsWaveClass *wave); void ags_wave_connectable_interface_init(AgsConnectableInterface *connectable); void ags_wave_init(AgsWave *wave); void ags_wave_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_wave_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_wave_connect(AgsConnectable *connectable); void ags_wave_disconnect(AgsConnectable *connectable); void ags_wave_dispose(GObject *gobject); void ags_wave_finalize(GObject *gobject); void ags_wave_insert_native_level_from_clipboard(AgsWave *wave, xmlNode *root_node, char *version, char *x_boundary, gboolean reset_x_offset, guint x_offset, gdouble delay, guint attack, gboolean match_channel, gboolean do_replace); /** * SECTION:ags_wave * @short_description: Wave class supporting selection and clipboard. * @title: AgsWave * @section_id: * @include: ags/audio/ags_wave.h * * #AgsWave acts as a container of #AgsBuffer. */ enum{ PROP_0, PROP_AUDIO, PROP_AUDIO_CHANNEL, PROP_BUFFER, PROP_TIMESTAMP, PROP_SAMPLERATE, PROP_BUFFER_SIZE, PROP_FORMAT, }; static gpointer ags_wave_parent_class = NULL; GType ags_wave_get_type() { static GType ags_type_wave = 0; if(!ags_type_wave){ static const GTypeInfo ags_wave_info = { sizeof(AgsWaveClass), NULL, NULL, (GClassInitFunc) ags_wave_class_init, NULL, NULL, sizeof(AgsWave), 0, (GInstanceInitFunc) ags_wave_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_wave_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_wave = g_type_register_static(G_TYPE_OBJECT, "AgsWave", &ags_wave_info, 0); g_type_add_interface_static(ags_type_wave, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_wave); } void ags_wave_class_init(AgsWaveClass *wave) { GObjectClass *gobject; GParamSpec *param_spec; ags_wave_parent_class = g_type_class_peek_parent(wave); gobject = (GObjectClass *) wave; gobject->set_property = ags_wave_set_property; gobject->get_property = ags_wave_get_property; gobject->dispose = ags_wave_dispose; gobject->finalize = ags_wave_finalize; /* properties */ /** * AgsWave:audio: * * The assigned #AgsAudio * * Since: 1.4.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of wave"), i18n_pspec("The audio of wave"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsWave:audio-channel: * * The effect's audio-channel. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("audio-channel of effect"), i18n_pspec("The numerical audio-channel of effect"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsWave:buffer: * * The assigned #AgsBuffer * * Since: 1.4.0 */ param_spec = g_param_spec_object("buffer", i18n_pspec("buffer of wave"), i18n_pspec("The buffer of wave"), AGS_TYPE_BUFFER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsPattern:timestamp: * * The pattern's timestamp. * * Since: 1.4.0 */ param_spec = g_param_spec_object("timestamp", i18n_pspec("timestamp of pattern"), i18n_pspec("The timestamp of pattern"), AGS_TYPE_TIMESTAMP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TIMESTAMP, param_spec); /** * AgsWave:samplerate: * * The audio buffer's samplerate. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("samplerate of audio buffer"), i18n_pspec("The samplerate of audio buffer"), 0, G_MAXUINT, AGS_SOUNDCARD_DEFAULT_SAMPLERATE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsWave:buffer-size: * * The audio buffer's buffer size. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("buffer size of audio buffer"), i18n_pspec("The buffer size of audio buffer"), 0, G_MAXUINT, AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsWave:format: * * The audio buffer's format. * * Since: 1.4.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("format of audio buffer"), i18n_pspec("The format of audio buffer"), 0, G_MAXUINT, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); } void ags_wave_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_wave_connect; connectable->disconnect = ags_wave_disconnect; } void ags_wave_init(AgsWave *wave) { wave->flags = 0; wave->timestamp = ags_timestamp_new(); wave->timestamp->flags &= (~AGS_TIMESTAMP_UNIX); wave->timestamp->flags |= AGS_TIMESTAMP_OFFSET; wave->timestamp->timer.ags_offset.offset = 0; g_object_ref(wave->timestamp); wave->audio_channel = 0; wave->audio = NULL; wave->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; wave->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; wave->format = AGS_SOUNDCARD_DEFAULT_FORMAT; wave->buffer = NULL; wave->loop_start = 0.0; wave->loop_end = 0.0; wave->offset = 0.0; wave->selection = NULL; } void ags_wave_connect(AgsConnectable *connectable) { AgsWave *wave; GList *list; wave = AGS_WAVE(connectable); if((AGS_WAVE_CONNECTED & (wave->flags)) != 0){ return; } wave->flags |= AGS_WAVE_CONNECTED; /* buffer */ list = wave->buffer; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_wave_disconnect(AgsConnectable *connectable) { AgsWave *wave; GList *list; wave = AGS_WAVE(connectable); if((AGS_WAVE_CONNECTED & (wave->flags)) == 0){ return; } wave->flags &= (~AGS_WAVE_CONNECTED); /* buffer */ list = wave->buffer; while(list != NULL){ ags_connectable_disconnect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_wave_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsWave *wave; wave = AGS_WAVE(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(wave->audio == (GObject *) audio){ return; } if(wave->audio != NULL){ g_object_unref(wave->audio); } if(audio != NULL){ g_object_ref(audio); } wave->audio = (GObject *) audio; } break; case PROP_AUDIO_CHANNEL: { guint audio_channel; audio_channel = g_value_get_uint(value); wave->audio_channel = audio_channel; } break; case PROP_BUFFER: { AgsBuffer *buffer; buffer = (AgsBuffer *) g_value_get_object(value); if(buffer == NULL || g_list_find(wave->buffer, buffer) != NULL){ return; } ags_wave_add_buffer(wave, buffer, FALSE); } break; case PROP_TIMESTAMP: { AgsTimestamp *timestamp; timestamp = (AgsTimestamp *) g_value_get_object(value); if(timestamp == (AgsTimestamp *) wave->timestamp){ return; } if(wave->timestamp != NULL){ g_object_unref(G_OBJECT(wave->timestamp)); } if(timestamp != NULL){ g_object_ref(G_OBJECT(timestamp)); } wave->timestamp = (GObject *) timestamp; } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); ags_wave_set_samplerate(wave, samplerate); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); ags_wave_set_buffer_size(wave, buffer_size); } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); ags_wave_set_format(wave, format); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_wave_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsWave *wave; wave = AGS_WAVE(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, wave->audio); } break; case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, wave->audio_channel); } break; case PROP_TIMESTAMP: { g_value_set_object(value, wave->timestamp); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, wave->samplerate); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, wave->buffer_size); } break; case PROP_FORMAT: { g_value_set_uint(value, wave->format); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_wave_dispose(GObject *gobject) { AgsWave *wave; GList *list; wave = AGS_WAVE(gobject); /* timestamp */ if(wave->timestamp != NULL){ g_object_unref(wave->timestamp); wave->timestamp = NULL; } /* audio */ if(wave->audio != NULL){ g_object_unref(wave->audio); wave->audio = NULL; } /* buffer and selection */ list = wave->buffer; while(list != NULL){ g_object_run_dispose(G_OBJECT(list->data)); list = list->next; } g_list_free_full(wave->buffer, g_object_unref); g_list_free(wave->selection); wave->buffer = NULL; wave->selection = NULL; /* call parent */ G_OBJECT_CLASS(ags_wave_parent_class)->dispose(gobject); } void ags_wave_finalize(GObject *gobject) { AgsWave *wave; wave = AGS_WAVE(gobject); /* timestamp */ if(wave->timestamp != NULL){ g_object_unref(wave->timestamp); } /* audio */ if(wave->audio != NULL){ g_object_unref(wave->audio); } /* buffer and selection */ g_list_free_full(wave->buffer, g_object_unref); g_list_free(wave->selection); /* call parent */ G_OBJECT_CLASS(ags_wave_parent_class)->finalize(gobject); } /** * ags_wave_set_samplerate: * @wave: the #AgsWave * @samplerate: the samplerate * * Set samplerate. * * Since: 1.4.0 */ void ags_wave_set_samplerate(AgsWave *wave, guint samplerate) { GList *list; wave->samplerate = samplerate; list = wave->buffer; while(list != NULL){ ags_buffer_set_samplerate(list->data, samplerate); list = list->next; } } /** * ags_wave_set_buffer_size: * @wave: the #AgsWave * * Set buffer size. * * Since: 1.4.0 */ void ags_wave_set_buffer_size(AgsWave *wave, guint buffer_size) { GList *list; wave->buffer_size = buffer_size; list = wave->buffer; while(list != NULL){ ags_buffer_set_buffer_size(list->data, buffer_size); list = list->next; } } /** * ags_wave_set_format: * @wave: the #AgsWave * @format: the format * * Set format. * * Since: 1.4.0 */ void ags_wave_set_format(AgsWave *wave, guint format) { GList *list; wave->format = format; list = wave->buffer; while(list != NULL){ ags_buffer_set_format(list->data, format); list = list->next; } } /** * ags_wave_find_near_timestamp: * @wave: a #GList containing #AgsWave * @audio_channel: the matching audio channel * @timestamp: (allow-none): the matching timestamp, or %NULL to match any timestamp * * Retrieve appropriate wave for timestamp. * * Returns: Next match. * * Since: 1.4.0 */ GList* ags_wave_find_near_timestamp(GList *wave, guint audio_channel, AgsTimestamp *timestamp) { AgsTimestamp *current_timestamp; while(wave != NULL){ if(AGS_WAVE(wave->data)->audio_channel != audio_channel){ wave = wave->next; continue; } if(timestamp == NULL){ return(wave); } current_timestamp = (AgsTimestamp *) AGS_WAVE(wave->data)->timestamp; if(current_timestamp != NULL){ if((AGS_TIMESTAMP_UNIX & (timestamp->flags)) != 0 && (AGS_TIMESTAMP_UNIX & (current_timestamp->flags)) != 0){ if(current_timestamp->timer.unix_time.time_val >= timestamp->timer.unix_time.time_val && current_timestamp->timer.unix_time.time_val < timestamp->timer.unix_time.time_val + AGS_WAVE_DEFAULT_DURATION){ return(wave); } }else if((AGS_TIMESTAMP_OFFSET & (timestamp->flags)) != 0 && (AGS_TIMESTAMP_OFFSET & (current_timestamp->flags)) != 0){ if(current_timestamp->timer.ags_offset.offset >= timestamp->timer.ags_offset.offset && current_timestamp->timer.ags_offset.offset < timestamp->timer.ags_offset.offset + AGS_WAVE_DEFAULT_OFFSET){ return(wave); } } } wave = wave->next; } return(NULL); } /** * ags_wave_add: * @wave: the #GList-struct containing #AgsWave * @new_wave: the wave to add * * Add @new_wave sorted to @wave * * Returns: the new beginning of @wave * * Since: 1.4.0 */ GList* ags_wave_add(GList *wave, AgsWave *new_wave) { auto gint ags_wave_add_compare(gconstpointer a, gconstpointer b); gint ags_wave_add_compare(gconstpointer a, gconstpointer b) { if(AGS_WAVE(a)->timestamp->timer.ags_offset.offset == AGS_WAVE(b)->timestamp->timer.ags_offset.offset){ return(0); }else if(AGS_WAVE(a)->timestamp->timer.ags_offset.offset < AGS_WAVE(b)->timestamp->timer.ags_offset.offset){ return(-1); }else if(AGS_WAVE(a)->timestamp->timer.ags_offset.offset > AGS_WAVE(b)->timestamp->timer.ags_offset.offset){ return(1); } return(0); } if(!AGS_IS_WAVE(new_wave) || !AGS_IS_TIMESTAMP(new_wave->timestamp)){ return(wave); } wave = g_list_insert_sorted(wave, new_wave, ags_wave_add_compare); return(wave); } /** * ags_wave_add_buffer: * @wave: an #AgsWave * @buffer: the #AgsBuffer to add * @use_selection_list: if %TRUE add to selection, else to default wave * * Adds a buffer to wave. * * Since: 1.4.0 */ void ags_wave_add_buffer(AgsWave *wave, AgsBuffer *buffer, gboolean use_selection_list) { if(!AGS_IS_WAVE(wave) || !AGS_IS_BUFFER(buffer)){ return; } g_object_ref(buffer); if(use_selection_list){ wave->selection = g_list_insert_sorted(wave->selection, buffer, (GCompareFunc) ags_buffer_sort_func); }else{ wave->buffer = g_list_insert_sorted(wave->buffer, buffer, (GCompareFunc) ags_buffer_sort_func); } } /** * ags_wave_remove_buffer: * @wave: an #AgsWave * @buffer: the #AgsBuffer to remove * @use_selection_list: if %TRUE remove from selection, else from default wave * * Removes a buffer from wave. * * Since: 1.4.0 */ void ags_wave_remove_buffer(AgsWave *wave, AgsBuffer *buffer, gboolean use_selection_list) { if(!AGS_IS_WAVE(wave) || !AGS_IS_BUFFER(buffer)){ return; } if(!use_selection_list){ wave->buffer = g_list_remove(wave->buffer, buffer); }else{ wave->selection = g_list_remove(wave->selection, buffer); } } /** * ags_wave_get_selection: * @wave: the #AgsWave * * Retrieve selection. * * Returns: the selection. * * Since: 1.4.0 */ GList* ags_wave_get_selection(AgsWave *wave) { return(wave->selection); } /** * ags_wave_is_buffer_selected: * @wave: the #AgsWave * @buffer: the #AgsBuffer to check for * * Check selection for buffer. * * Returns: %TRUE if selected * * Since: 1.4.0 */ gboolean ags_wave_is_buffer_selected(AgsWave *wave, AgsBuffer *buffer) { GList *selection; selection = wave->selection; while(selection != NULL && AGS_BUFFER(selection->data)->x <= buffer->x){ if(selection->data == buffer){ return(TRUE); } selection = selection->next; } return(FALSE); } /** * ags_wave_find_region: * @wave: an #AgsWave * @x0: start offset * @x1: end offset * @use_selection_list: if %TRUE selection is searched * * Find buffers by offset and tone region. * * Returns: the matching buffers as #GList. * * Since: 1.4.0 */ GList* ags_wave_find_region(AgsWave *wave, guint x0, guint x1, gboolean use_selection_list) { AgsBuffer *buffer; GList *buffer_list; GList *region; if(x0 > x1){ guint tmp; tmp = x1; x1 = x0; x0 = x1; } if(use_selection_list){ buffer_list = wave->selection; }else{ buffer_list = wave->buffer; } while(buffer_list != NULL && AGS_BUFFER(buffer_list->data)->x < x0){ buffer_list = buffer_list->next; } region = NULL; while(buffer_list != NULL && (buffer = AGS_BUFFER(buffer_list->data))->x < x1){ region = g_list_prepend(region, buffer); buffer_list = buffer_list->next; } region = g_list_reverse(region); return(region); } /** * ags_wave_free_selection: * @wave: an #AgsWave * * Clear selection. * * Since: 1.4.0 */ void ags_wave_free_selection(AgsWave *wave) { g_list_free_full(wave->selection, g_object_unref); wave->selection = NULL; } /** * ags_wave_add_all_to_selection: * @wave: an #AgsWave * * Select all. * * Since: 1.4.0 */ void ags_wave_add_all_to_selection(AgsWave *wave) { AgsBuffer *buffer; GList *region, *list; ags_wave_free_selection(wave); list = wave->buffer; while(list != NULL){ AGS_BUFFER(list->data)->flags |= AGS_BUFFER_IS_SELECTED; g_object_ref(G_OBJECT(list->data)); list = list->next; } wave->selection = g_list_copy(wave->buffer); } /** * ags_wave_add_region_to_selection: * @wave: an #AgsWave * @x0: start offset * @x1: end offset * @replace_current_selection: if %TRUE selection is replaced * * Select buffers within region. * * Since: 1.4.0 */ void ags_wave_add_region_to_selection(AgsWave *wave, guint x0, guint x1, gboolean replace_current_selection) { AgsBuffer *buffer; GList *region, *list; region = ags_wave_find_region(wave, x0, x1, FALSE); if(replace_current_selection){ ags_wave_free_selection(wave); list = region; while(list != NULL){ AGS_BUFFER(list->data)->flags |= AGS_BUFFER_IS_SELECTED; g_object_ref(G_OBJECT(list->data)); list = list->next; } wave->selection = region; }else{ while(region != NULL){ buffer = AGS_BUFFER(region->data); if(!ags_wave_is_buffer_selected(wave, buffer)){ buffer->flags |= AGS_BUFFER_IS_SELECTED; g_object_ref(G_OBJECT(buffer)); ags_wave_add_buffer(wave, buffer, TRUE); } region = region->next; } g_list_free(region); } } /** * ags_wave_remove_region_from_selection: * @wave: an #AgsWave * @x0: start offset * @y0: start tone * @x1: end offset * @y1: end tone * * Remove buffers within region of selection. * * Since: 1.4.0 */ void ags_wave_remove_region_from_selection(AgsWave *wave, guint x0, guint x1) { AgsBuffer *buffer; GList *region; region = ags_wave_find_region(wave, x0, x1, TRUE); while(region != NULL){ buffer = AGS_BUFFER(region->data); buffer->flags &= (~AGS_BUFFER_IS_SELECTED); wave->selection = g_list_remove(wave->selection, buffer); g_object_unref(G_OBJECT(buffer)); region = region->next; } g_list_free(region); } /** * ags_wave_copy_selection: * @wave: an #AgsWave * * Copy selection to clipboard. * * Returns: the selection as XML. * * Since: 1.4.0 */ xmlNode* ags_wave_copy_selection(AgsWave *wave) { AgsBuffer *buffer; xmlNode *wave_node, *current_buffer; xmlNode *timestamp_node; GList *selection; xmlChar *str; guint x_boundary, y_boundary; selection = wave->selection; /* create root node */ wave_node = xmlNewNode(NULL, BAD_CAST "wave"); xmlNewProp(wave_node, BAD_CAST "program", BAD_CAST "ags"); xmlNewProp(wave_node, BAD_CAST "type", BAD_CAST (AGS_WAVE_CLIPBOARD_TYPE)); xmlNewProp(wave_node, BAD_CAST "version", BAD_CAST (AGS_WAVE_CLIPBOARD_VERSION)); xmlNewProp(wave_node, BAD_CAST "format", BAD_CAST (AGS_WAVE_CLIPBOARD_FORMAT)); xmlNewProp(wave_node, BAD_CAST "audio-channel", BAD_CAST (g_strdup_printf("%u", wave->audio_channel))); /* buffer format */ str = NULL; switch(wave->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { str = "s8"; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { str = "s16"; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { str = "s24"; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { str = "s32"; } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { str = "s64"; } break; } xmlNewProp(wave_node, BAD_CAST "buffer-format", BAD_CAST (str)); /* timestamp */ if(wave->timestamp != NULL){ timestamp_node = xmlNewNode(NULL, BAD_CAST "timestamp"); xmlAddChild(wave_node, timestamp_node); xmlNewProp(timestamp_node, BAD_CAST "offset", BAD_CAST (g_strdup_printf("%u", AGS_TIMESTAMP(wave->timestamp)->timer.ags_offset.offset))); } /* selection */ selection = wave->selection; if(selection != NULL){ x_boundary = AGS_BUFFER(selection->data)->x; }else{ x_boundary = 0; } while(selection != NULL){ xmlChar *content; unsigned char *cbuffer; guint buffer_size; buffer = AGS_BUFFER(selection->data); current_buffer = xmlNewChild(wave_node, NULL, BAD_CAST "buffer", NULL); xmlNewProp(current_buffer, BAD_CAST "x", BAD_CAST (g_strdup_printf("%u", buffer->x))); xmlNewProp(current_buffer, BAD_CAST "selection-x0", BAD_CAST (g_strdup_printf("%u", buffer->selection_x0))); xmlNewProp(current_buffer, BAD_CAST "selection-x1", BAD_CAST (g_strdup_printf("%u", buffer->selection_x1))); cbuffer = NULL; buffer_size = 0; switch(buffer->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { cbuffer = ags_buffer_util_s8_to_char_buffer((signed char *) buffer->data, buffer->buffer_size); buffer_size = buffer->buffer_size; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { cbuffer = ags_buffer_util_s16_to_char_buffer((signed short *) buffer->data, buffer->buffer_size); buffer_size = 2 * buffer->buffer_size; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { cbuffer = ags_buffer_util_s24_to_char_buffer((signed long *) buffer->data, buffer->buffer_size); buffer_size = 3 * buffer->buffer_size; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { cbuffer = ags_buffer_util_s32_to_char_buffer((signed long *) buffer->data, buffer->buffer_size); buffer_size = 4 * buffer->buffer_size; } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { cbuffer = ags_buffer_util_s64_to_char_buffer((signed long long *) buffer->data, buffer->buffer_size); buffer_size = 8 * buffer->buffer_size; } break; } xmlNodeSetContent(current_buffer, g_base64_encode(cbuffer, buffer_size)); g_free(cbuffer); selection = selection->next; } xmlNewProp(wave_node, BAD_CAST "x-boundary", BAD_CAST (g_strdup_printf("%u", x_boundary))); return(wave_node); return(NULL); } /** * ags_wave_cut_selection: * @wave: an #AgsWave * * Cut selection to clipboard. * * Returns: the selection as XML. * * Since: 1.4.0 */ xmlNode* ags_wave_cut_selection(AgsWave *wave) { xmlNode* wave_node; GList *selection; wave_node = ags_wave_copy_selection(wave); selection = wave->selection; while(selection != NULL){ wave->buffer = g_list_remove(wave->buffer, selection->data); AGS_BUFFER(selection->data)->flags &= (~AGS_BUFFER_IS_SELECTED); g_object_unref(selection->data); selection = selection->next; } ags_wave_free_selection(wave); return(wave_node); } /** * ags_wave_insert_native_level_from_clipboard: * @wave: an #AgsWave * @wave_node: the clipboard XML data * @version: clipboard version * @x_boundary: region start offset * @reset_x_offset: if %TRUE @x_offset used as cursor * @x_offset: region start cursor offset * @delay: the delay to be used * @attack: the attack to be used * @match_channel: only paste if channel matches * @do_replace: if %TRUE current data is replaced, otherwise additive mixing is performed * * Paste previously copied buffers. * * Since: 1.4.0 */ void ags_wave_insert_native_level_from_clipboard(AgsWave *wave, xmlNode *root_node, char *version, char *x_boundary, gboolean reset_x_offset, guint x_offset, gdouble delay, guint attack, gboolean match_channel, gboolean do_replace) { auto void ags_wave_insert_native_level_from_clipboard_version_1_4_0(); void ags_wave_insert_native_level_from_clipboard_version_1_4_0() { AgsBuffer *buffer; xmlNode *node; char *x; gchar *offset; char *endptr; guint x_boundary_val; guint x_val; guint base_x_difference; guint offset_val; gboolean subtract_x; node = root_node->children; /* retrieve x values for resetting */ if(reset_x_offset){ if(x_boundary != NULL){ errno = 0; x_boundary_val = strtoul(x_boundary, &endptr, 10); if(errno == ERANGE){ goto dont_reset_x_offset; } if(x_boundary == endptr){ goto dont_reset_x_offset; } if(x_boundary_val < x_offset){ base_x_difference = x_offset - x_boundary_val; subtract_x = FALSE; }else{ base_x_difference = x_boundary_val - x_offset; subtract_x = TRUE; } }else{ dont_reset_x_offset: reset_x_offset = FALSE; } } /* parse */ while(node != NULL){ if(node->type == XML_ELEMENT_NODE){ if(!xmlStrncmp("buffer", node->name, 7)){ //TODO:JK: implement me }else if(!xmlStrncmp("timestamp", node->name, 10)){ //TODO:JK: implement me } } node = node->next; } } if(!AGS_IS_WAVE(wave)){ return; } if(!xmlStrncmp("1.4.0", version, 7)){ /* changes contain only optional informations */ if(match_channel && wave->audio_channel != g_ascii_strtoull(xmlGetProp(root_node, "audio-channel"), NULL, 10)){ return; } ags_wave_insert_native_level_from_clipboard_version_1_4_0(); } } /** * ags_wave_insert_from_clipboard: * @wave: an #AgsWave * @wave_node: the clipboard XML data * @reset_x_offset: if %TRUE @x_offset used as cursor * @x_offset: region start cursor offset * @delay: the delay to be used * @attack: the attack to be used * * Paste previously copied buffers. * * Since: 1.4.0 */ void ags_wave_insert_from_clipboard(AgsWave *wave, xmlNode *wave_node, gboolean reset_x_offset, guint x_offset, gdouble delay, guint attack) { ags_wave_insert_from_clipboard_extended(wave, wave_node, reset_x_offset, x_offset, delay, attack, FALSE, FALSE); } /** * ags_wave_insert_from_clipboard_extended: * @wave: an #AgsWave * @wave_node: the clipboard XML data * @reset_x_offset: if %TRUE @x_offset used as cursor * @x_offset: region start cursor offset * @delay: the delay to be used * @attack: the attack to be used * @match_channel: only paste if channel matches * @do_replace: if %TRUE current data is replaced, otherwise additive mixing is performed * * Paste previously copied buffers. * * Since: 1.4.0 */ void ags_wave_insert_from_clipboard_extended(AgsWave *wave, xmlNode *wave_node, gboolean reset_x_offset, guint x_offset, gdouble delay, guint attack, gboolean match_audio_channel, gboolean do_replace) { char *program, *version, *type, *format; char *x_boundary; while(wave_node != NULL){ if(wave_node->type == XML_ELEMENT_NODE && !xmlStrncmp("wave", wave_node->name, 9)){ break; } wave_node = wave_node->next; } if(wave_node != NULL){ program = xmlGetProp(wave_node, "program"); if(!xmlStrncmp("ags", program, 4)){ version = xmlGetProp(wave_node, "version"); type = xmlGetProp(wave_node, "type"); format = xmlGetProp(wave_node, "format"); if(!xmlStrcmp(AGS_WAVE_CLIPBOARD_FORMAT, format)){ x_boundary = xmlGetProp(wave_node, "x_boundary"); ags_wave_insert_native_level_from_clipboard(wave, wave_node, version, x_boundary, reset_x_offset, x_offset, delay, attack, match_audio_channel, do_replace); } } } } /** * ags_wave_new: * @audio: the assigned #AgsAudio * @audio_channel: the audio channel to be used * * Creates a #AgsWave, assigned to @audio_channel. * * Returns: a new #AgsWave * * Since: 1.4.0 */ AgsWave* ags_wave_new(GObject *audio, guint audio_channel) { AgsWave *wave; wave = (AgsWave *) g_object_new(AGS_TYPE_WAVE, "audio", audio, "audio-channel", audio_channel, NULL); return(wave); } gsequencer-1.4.24/ags/audio/ags_recall_ladspa_run.h0000644000175000017500000000433613246707333017232 00000000000000/* 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 . */ #ifndef __AGS_RECALL_LADSPA_RUN_H__ #define __AGS_RECALL_LADSPA_RUN_H__ #include #include #include #include #include #define AGS_TYPE_RECALL_LADSPA_RUN (ags_recall_ladspa_run_get_type()) #define AGS_RECALL_LADSPA_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_LADSPA_RUN, AgsRecallLadspaRun)) #define AGS_RECALL_LADSPA_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_LADSPA_RUN, AgsRecallLadspaRunClass)) #define AGS_IS_RECALL_LADSPA_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RECALL_LADSPA_RUN)) #define AGS_IS_RECALL_LADSPA_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RECALL_LADSPA_RUN)) #define AGS_RECALL_LADSPA_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RECALL_LADSPA_RUN, AgsRecallLadspaRunClass)) typedef struct _AgsRecallLadspaRun AgsRecallLadspaRun; typedef struct _AgsRecallLadspaRunClass AgsRecallLadspaRunClass; struct _AgsRecallLadspaRun { AgsRecallAudioSignal recall_audio_signal; unsigned long audio_channels; LADSPA_Handle *ladspa_handle; LADSPA_Data *input; LADSPA_Data *output; }; struct _AgsRecallLadspaRunClass { AgsRecallAudioSignalClass recall_audio_signal; }; GType ags_recall_ladspa_run_get_type(); AgsRecallLadspaRun* ags_recall_ladspa_run_new(AgsAudioSignal *audio_signal); #endif /*__AGS_RECALL_LADSPA_RUN_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_recycling.h0000644000175000017500000000624013246707333017055 00000000000000/* 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 . */ #ifndef __AGS_RECALL_RECYCLING_H__ #define __AGS_RECALL_RECYCLING_H__ #include #include #include #include #include #include #define AGS_TYPE_RECALL_RECYCLING (ags_recall_recycling_get_type()) #define AGS_RECALL_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_RECYCLING, AgsRecallRecycling)) #define AGS_RECALL_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_RECYCLING, AgsRecallRecyclingClass)) #define AGS_IS_RECALL_RECYCLING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_RECYCLING)) #define AGS_IS_RECALL_RECYCLING_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_RECYCLING)) #define AGS_RECALL_RECYCLING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_RECYCLING, AgsRecallRecyclingClass)) typedef struct _AgsRecallRecycling AgsRecallRecycling; typedef struct _AgsRecallRecyclingClass AgsRecallRecyclingClass; /** * AgsRecallRecyclingFlags: * @AGS_RECALL_RECYCLING_GARBAGE_COLLECTOR: not used * @AGS_RECALL_RECYCLING_MAP_CHILD_DESTINATION: not used * @AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE: not used * @AGS_RECALL_RECYCLING_CREATE_DESTINATION_ON_MAP_SOURCE: not used * * Enum values to control the behavior or indicate internal state of #AgsRecallRecycling by * enable/disable as flags. */ typedef enum{ AGS_RECALL_RECYCLING_GARBAGE_COLLECTOR = 1, AGS_RECALL_RECYCLING_MAP_CHILD_DESTINATION = 1 << 1, AGS_RECALL_RECYCLING_MAP_CHILD_SOURCE = 1 << 2, AGS_RECALL_RECYCLING_CREATE_DESTINATION_ON_MAP_SOURCE = 1 << 3, }AgsRecallRecyclingFlags; struct _AgsRecallRecycling { AgsRecall recall; guint flags; guint audio_channel; AgsRecycling *destination; gulong destination_add_audio_signal_handler; gulong destination_remove_audio_signal_handler; AgsRecycling *source; gulong source_add_audio_signal_handler; gulong source_remove_audio_signal_handler; AgsAudioSignal *child_destination; GList *child_source; }; struct _AgsRecallRecyclingClass { AgsRecallClass recall; }; GType ags_recall_recycling_get_type(); GList* ags_recall_recycling_get_child_source(AgsRecallRecycling *recall_recycling); AgsRecallRecycling* ags_recall_recycling_new(); #endif /*__AGS_RECALL_RECYCLING_H__*/ gsequencer-1.4.24/ags/audio/midi/0000755000175000017500000000000013256233676013556 500000000000000gsequencer-1.4.24/ags/audio/midi/ags_midi_buffer_util.c0000644000175000017500000014565113246707333020013 00000000000000/* 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 . */ #include #include #include #include #include #include /** * SECTION:ags_midi_buffer_util * @short_description: MIDI buffer util * @title: AgsMidiBufferUtil * @section_id: * @include: ags/audio/midi/ags_midi_buffer_util.h * * Utility functions for MIDI buffers. */ /** * ags_midi_buffer_util_get_varlength_size: * @varlength: the variable length * * Retrieve the size needed to store the variable length. * * Returns: the size needed to be allocated * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_varlength_size(glong varlength) { guint current; unsigned char c; guint i; glong mask; /* retrieve new size */ mask = 0x7f; current = 8 * 4 - 4; i = current; for(; current >= 8; ){ if(((mask << (i - 7)) & varlength) != 0){ break; } i -= 7; current -= 8; } return(floor(current / 8.0) + 1); } /** * ags_midi_buffer_util_put_varlength: * @buffer: the character buffer * @varlength: the value to put * * Put the variable lenght value to @buffer. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_varlength(unsigned char *buffer, glong varlength) { guint varlength_size; guint i, j; glong mask; if(buffer == NULL){ return; } varlength_size = ags_midi_buffer_util_get_varlength_size(varlength); /* write to internal buffer */ mask = 0x7f; j = 0; i = 7 * varlength_size; for(; j < varlength_size; ){ buffer[j] = ((mask << (i - 7)) & varlength) >> (i - 7); if(j + 1 < varlength_size){ buffer[j] |= 0x80; } i -= 7; j++; } } /** * ags_midi_buffer_util_get_varlength: * @buffer: the character buffer * @varlength: the return location * * Get the variable lenght value from @buffer. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_varlength(unsigned char *buffer, glong *varlength) { glong value; guint i; char c; if(buffer == NULL){ return(0); } c = buffer[0]; value = c; i = 1; if(c & 0x80){ value &= 0x7F; do{ value = (value << 7) + ((c = buffer[i]) & 0x7F); i++; }while(c & 0x80); } if(varlength != NULL){ *varlength = value; } return(i); } /** * ags_midi_buffer_util_put_int16: * @buffer: the character buffer * @val: the integer * * Put signed 16 bit integer. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_int16(unsigned char *buffer, glong val) { if(buffer == NULL){ return; } buffer[0] = (val & (0xff << 8)) >> 8; buffer[1] = val & 0xff; } /** * ags_midi_buffer_util_get_int16: * @buffer: the character buffer * @val: return location of the integer * * Get signed 32 bit integer. * * Since: 1.0.0 */ void ags_midi_buffer_util_get_int16(unsigned char *buffer, glong *val) { glong tmp; if(buffer == NULL){ return; } tmp = (buffer[0] & 0xff); tmp = (tmp << 8) + (buffer[1] & 0xff); if(val != NULL){ *val = tmp; } } /** * ags_midi_buffer_util_put_int24: * @buffer: the character buffer * @val: the integer * * Put signed 24 bit integer. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_int24(unsigned char *buffer, glong val) { if(buffer == NULL){ return; } buffer[0] = (val & (0xff << 16)) >> 16; buffer[1] = (val & (0xff << 8)) >> 8; buffer[2] = val & 0xff; } /** * ags_midi_buffer_util_get_int24: * @buffer: the character buffer * @val: return location of the integer * * Get signed 24 bit integer. * * Since: 1.0.0 */ void ags_midi_buffer_util_get_int24(unsigned char *buffer, glong *val) { glong tmp; if(buffer == NULL){ return; } tmp = (buffer[0] & 0xff); tmp = (tmp << 8) + (buffer[1] & 0xff); tmp = (tmp << 8) + (buffer[2] & 0xff); if(val != NULL){ *val = tmp; } } /** * ags_midi_buffer_util_put_int32: * @buffer: the character buffer * @val: the integer * * Put signed 32 bit integer. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_int32(unsigned char *buffer, glong val) { if(buffer == NULL){ return; } buffer[0] = (val & (0xff << 24)) >> 24; buffer[1] = (val & (0xff << 16)) >> 16; buffer[2] = (val & (0xff << 8)) >> 8; buffer[3] = val & 0xff; } /** * ags_midi_buffer_util_get_int32: * @buffer: the character buffer * @val: return location of the integer * * Get signed 32 bit integer. * * Since: 1.0.0 */ void ags_midi_buffer_util_get_int32(unsigned char *buffer, glong *val) { glong tmp; if(buffer == NULL){ return; } tmp = (buffer[0] & 0xff); tmp = (tmp << 8) + (buffer[1] & 0xff); tmp = (tmp << 8) + (buffer[2] & 0xff); tmp = (tmp << 8) + (buffer[3] & 0xff); if(val != NULL){ *val = tmp; } } /** * ags_midi_buffer_util_put_header: * @buffer: the character buffer * @offset: start delta-time * @format: either 0, 1 or 2. * @track_count: the number of tracks * @division: timing division * * Puts the midi header. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_header(unsigned char *buffer, glong offset, glong format, glong track_count, glong division) { static gchar header[] = "MThd"; if(buffer == NULL){ return; } /* put MThd */ memcpy(buffer, header, 4 * sizeof(unsigned char)); /* chunk length */ if(offset != 6){ g_warning("invalid chunk length"); } ags_midi_buffer_util_put_int32(buffer + 4, 6); /* format */ ags_midi_buffer_util_put_int16(buffer + 8, format); /* track count */ ags_midi_buffer_util_put_int16(buffer + 10, track_count); /* division */ ags_midi_buffer_util_put_int16(buffer + 12, division); } /** * ags_midi_buffer_util_get_header: * @buffer: the character buffer * @offset: start delta-time * @format: either 0, 1 or 2. * @track_count: the number of tracks * @division: timing division * * Gets the midi header * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_header(unsigned char *buffer, glong *offset, glong *format, glong *track_count, glong *division) { static gchar header[] = "MThd"; if(g_ascii_strncasecmp(buffer, header, 4)){ return(0); } /* offset */ ags_midi_buffer_util_get_int32(buffer + 4, offset); /* format */ ags_midi_buffer_util_get_int16(buffer + 8, format); /* track count */ ags_midi_buffer_util_get_int16(buffer + 10, track_count); /* division */ ags_midi_buffer_util_get_int16(buffer + 12, division); return(14); } /** * ags_midi_buffer_util_put_track: * @buffer: the midi buffer * @offset: start delta-time * * Put track. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_track(unsigned char *buffer, glong offset) { static gchar track[] = "MTrk"; if(buffer == NULL){ return; } /* put MTrk */ memcpy(buffer, track, 4 * sizeof(unsigned char)); /* offset */ ags_midi_buffer_util_put_int32(buffer + 4, offset); } /** * ags_midi_buffer_util_get_track: * @buffer: the midi buffer * @offset: start delta-time * * Get track * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_track(unsigned char *buffer, glong *offset) { static gchar track[] = "MTrk"; if(buffer == NULL){ return(0); } if(g_ascii_strncasecmp(buffer, track, 4)){ return(0); } /* offset */ ags_midi_buffer_util_get_int32(buffer + 4, offset); return(8); } /** * ags_midi_buffer_util_put_key_on: * @buffer: the character buffer * @delta_time: timing information * @channel: valid channels from 0-15 * @key: valid keys to play 0-128 * @velocity: the key dynamics * * Puts the given values to @buffer with appropriate channel message. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_key_on(unsigned char *buffer, glong delta_time, glong channel, glong key, glong velocity) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* key-on channel message */ buffer[delta_time_size] = 0x90 | (channel & 0xf); /* key */ buffer[delta_time_size + 1] = key & 0x7f; /* velocity */ buffer[delta_time_size + 2] = velocity & 0x7f; } /** * ags_midi_buffer_util_get_key_on: * @buffer: the character buffer * @delta_time: the return location of timing information * @channel: the return location of channel * @key: the return location of key * @velocity: the return location of velocity * * Get the key-on message from @buffer. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_key_on(unsigned char *buffer, glong *delta_time, glong *channel, glong *key, glong *velocity) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* channel */ if(channel != NULL){ *channel = (0xf & buffer[delta_time_size]); } /* key */ if(key != NULL){ *key = (0x7f & buffer[delta_time_size + 1]); } /* velocity */ if(velocity != NULL){ *velocity = (0x7f & buffer[delta_time_size + 2]); } return(delta_time_size + 3); } /** * ags_midi_buffer_util_put_key_off: * @buffer: the character buffer * @delta_time: timing information * @channel: valid channels from 0-15 * @key: valid keys to play 0-128 * @velocity: the key dynamics * * Puts the given values to @buffer with appropriate channel message. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_key_off(unsigned char *buffer, glong delta_time, glong channel, glong key, glong velocity) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* key-off channel message */ buffer[delta_time_size] = 0x80; buffer[delta_time_size] |= (channel & 0xf); /* key */ buffer[delta_time_size + 1] = key & 0x7f; /* velocity */ buffer[delta_time_size + 2] = velocity & 0x7f; } /** * ags_midi_buffer_util_get_key_off: * @buffer: the character buffer * @delta_time: the return location of timing information * @channel: the return location of channel * @key: the return location of key * @velocity: the return location of velocity * * Get the key-off message from @buffer. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_key_off(unsigned char *buffer, glong *delta_time, glong *channel, glong *key, glong *velocity) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* channel */ if(channel != NULL){ *channel = (0xf & buffer[delta_time_size]); } /* key */ if(key != NULL){ *key = (0x7f & buffer[delta_time_size + 1]); } /* velocity */ if(velocity != NULL){ *velocity = (0x7f & buffer[delta_time_size + 2]); } return(delta_time_size + 3); } /** * ags_midi_buffer_util_put_key_pressure: * @buffer: the character buffer * @delta_time: timing information * @channel: valid channels from 0-15 * @key: valid keys to play 0-128 * @pressure: the key dynamics * * Puts the given values to @buffer with appropriate channel message. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_key_pressure(unsigned char *buffer, glong delta_time, glong channel, glong key, glong pressure) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* key-pressure channel message */ buffer[delta_time_size] = 0xa0; buffer[delta_time_size] |= (channel & 0xf); /* key */ buffer[delta_time_size + 1] = key & 0x7f; /* pressure */ buffer[delta_time_size + 2] = pressure & 0x7f; } /** * ags_midi_buffer_util_get_key_pressure: * @buffer: the character buffer * @delta_time: the return location of timing information * @channel: the return location of channel * @key: the return location of key * @pressure: the return location of pressure * * Get the key-pressure message from @buffer. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_key_pressure(unsigned char *buffer, glong *delta_time, glong *channel, glong *key, glong *pressure) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* channel */ if(channel != NULL){ *channel = (0xf & buffer[delta_time_size]); } /* key */ if(key != NULL){ *key = (0x7f & buffer[delta_time_size + 1]); } /* pressure */ if(pressure != NULL){ *pressure = (0x7f & buffer[delta_time_size + 2]); } return(delta_time_size + 3); } /** * ags_midi_buffer_util_put_change_parameter: * @buffer: the character buffer * @delta_time: timing information * @channel: channel * @control: the control * @value: the value * * Put change parameter. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_change_parameter(unsigned char *buffer, glong delta_time, glong channel, glong control, glong value) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* change-parameter channel message */ buffer[delta_time_size] = 0xb0; buffer[delta_time_size] |= (channel & 0xf); /* control */ buffer[delta_time_size + 1] = 0x7f & control; /* value */ buffer[delta_time_size + 2] = 0x7f & value; } /** * ags_midi_buffer_util_get_change_parameter: * @buffer: the character buffer * @delta_time: the return location of timing information * @channel: the return location of channel * @control: the return location of the control * @value: the return location the value * * Get change parameter. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_change_parameter(unsigned char *buffer, glong *delta_time, glong *channel, glong *control, glong *value) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* channel */ if(channel != NULL){ *channel = (0xf & buffer[delta_time_size]); } /* control */ if(control != NULL){ *control = 0x7f & buffer[delta_time_size + 1]; } /* value */ if(value != NULL){ *value = 0x7f & buffer[delta_time_size + 2]; } return(delta_time_size + 3); } /** * ags_midi_buffer_util_put_pitch_bend: * @buffer: the character buffer * @delta_time: timing information * @channel: channel * @pitch: the pitch * @transmitter: the transmitter * * Put pitch bend. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_pitch_bend(unsigned char *buffer, glong delta_time, glong channel, glong pitch, glong transmitter) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* pitch-bend channel message */ buffer[delta_time_size] = 0xe0; buffer[delta_time_size] |= (channel & 0xf); /* pitch */ buffer[delta_time_size + 1] = 0x7f & pitch; /* transmitter */ buffer[delta_time_size + 2] = 0x7f & transmitter; } /** * ags_midi_buffer_util_get_pitch_bend: * @buffer: the character buffer * @delta_time: the return location of timing information * @channel: the return location of channel * @pitch: the return location of the pitch * @transmitter: the return location the transmitter * * Get pitch bend. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_pitch_bend(unsigned char *buffer, glong *delta_time, glong *channel, glong *pitch, glong *transmitter) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* channel */ if(channel != NULL){ *channel = (0xf & buffer[delta_time_size]); } /* pitch */ if(pitch != NULL){ *pitch = 0x7f & buffer[delta_time_size + 1]; } /* transmitter */ if(transmitter != NULL){ *transmitter = 0x7f & buffer[delta_time_size + 2]; } return(delta_time_size + 3); } /** * ags_midi_buffer_util_put_change_program: * @buffer: the character buffer * @delta_time: timing information * @channel: channel * @program: the program * * Put change program. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_change_program(unsigned char *buffer, glong delta_time, glong channel, glong program) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* change-parameter channel message */ buffer[delta_time_size] = 0xc0; buffer[delta_time_size] |= (channel & 0xf); /* program */ buffer[delta_time_size + 1] = 0x7f & program; } /** * ags_midi_buffer_util_get_change_program: * @buffer: the character buffer * @delta_time: the return location of timing information * @channel: the return location of channel * @program: the return location of the program * * Get change program. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_change_program(unsigned char *buffer, glong *delta_time, glong *channel, glong *program) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* channel */ if(channel != NULL){ *channel = (0xf & buffer[delta_time_size]); } /* program */ if(program != NULL){ *program = 0x7f & buffer[delta_time_size + 1]; } return(delta_time_size + 2); } /** * ags_midi_buffer_util_put_change_pressure: * @buffer: the character buffer * @delta_time: timing information * @channel: channel * @pressure: the pressure * * Put change pressure. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_change_pressure(unsigned char *buffer, glong delta_time, glong channel, glong pressure) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* change-parameter channel message */ buffer[delta_time_size] = 0xd0; buffer[delta_time_size] |= (channel & 0xf); /* pressure */ buffer[delta_time_size + 1] = 0x7f & pressure; } /** * ags_midi_buffer_util_get_change_pressure: * @buffer: the character buffer * @delta_time: the return location of timing information * @channel: the return location of channel * @pressure: the return location of the pressure * * Get change pressure. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_change_pressure(unsigned char *buffer, glong *delta_time, glong *channel, glong *pressure) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* channel */ if(channel != NULL){ *channel = (0xf & buffer[delta_time_size]); } /* pressure */ if(pressure != NULL){ *pressure = 0x7f & buffer[delta_time_size + 1]; } return(delta_time_size + 2); } /** * ags_midi_buffer_util_put_sysex: * @buffer: the character buffer * @delta_time: timing information * @data: the data * @length: the data's length * * Put sysex. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_sysex(unsigned char *buffer, glong delta_time, unsigned char *data, glong length) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xf0; /* put data */ memcpy(buffer + delta_time_size + 1, data, length * sizeof(unsigned char)); /* EOX end of sysex */ buffer[delta_time_size + length + 1] = 0xf7; } /** * ags_midi_buffer_util_get_sysex: * @buffer: the character buffer * @delta_time: the return location of timing information * @data: the return location of data * @length: the return location of length * * Get sysex. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_sysex(unsigned char *buffer, glong *delta_time, unsigned char **data, glong *length) { unsigned char *tmp_data; glong val; guint delta_time_size; guint i; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } for(i = 0; buffer[delta_time_size + i + 1] != 0xf7; i++); if(data != NULL){ if(i > 0){ tmp_data = (unsigned char *) malloc(i * sizeof(unsigned char)); }else{ tmp_data = NULL; } memcpy(tmp_data, buffer + delta_time_size + 1, i * sizeof(unsigned char)); *data = tmp_data; } if(length != NULL){ *length = i; } return(delta_time_size + i + 2); } /** * ags_midi_buffer_util_put_quarter_frame: * @buffer: the character buffer * @delta_time: timing information * @message_type: the message type * @values: the values * * Put quarter frame. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_quarter_frame(unsigned char *buffer, glong delta_time, glong message_type, glong values) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xf1; /* message type */ buffer[delta_time_size + 1] = 0x70 & message_type; /* values */ buffer[delta_time_size + 1] |= 0x0f & values; } /** * ags_midi_buffer_util_get_quarter_frame: * @buffer: the character buffer * @delta_time: the return location of timing information * @message_type: the return location of the message type * @values: the return location of the values * * Get quarter frame. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_quarter_frame(unsigned char *buffer, glong *delta_time, glong *message_type, glong *values) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } if(message_type != NULL){ *message_type = 0x70 & buffer[delta_time_size + 1]; } if(values != NULL){ *values = 0x0f & buffer[delta_time_size + 1]; } return(delta_time_size + 2); } /** * ags_midi_buffer_util_put_song_position: * @buffer: the character buffer * @delta_time: timing information * @song_position: the song position * * Put song position. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_song_position(unsigned char *buffer, glong delta_time, glong song_position) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xf2; /* song position */ buffer[delta_time_size + 1] = 0x7f & song_position; buffer[delta_time_size + 2] = 0x7f & (song_position >> 7); } /** * ags_midi_buffer_util_get_song_position: * @buffer: the character buffer * @delta_time: the return location of timing information * @song_position: the return location of the song position * * Get song position. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_song_position(unsigned char *buffer, glong *delta_time, glong *song_position) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* song position */ if(song_position != NULL){ *song_position = 0x7f & buffer[delta_time_size + 1]; *song_position |= ((0x7f & buffer[delta_time_size + 2]) << 7); } return(delta_time_size + 3); } /** * ags_midi_buffer_util_put_song_select: * @buffer: the character buffer * @delta_time: timing information * @song_select: the song select * * Put song select. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_song_select(unsigned char *buffer, glong delta_time, glong song_select) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xf3; /* song select */ buffer[delta_time_size + 1] = 0x7f & song_select; } /** * ags_midi_buffer_util_get_song_select: * @buffer: the character buffer * @delta_time: the return location of timing information * @song_select: the return location of the song select * * Get song select. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_song_select(unsigned char *buffer, glong *delta_time, glong *song_select) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } if(song_select != NULL){ *song_select = 0x7f & buffer[delta_time_size + 1]; } return(delta_time_size + 2); } /** * ags_midi_buffer_util_put_tune_request: * @buffer: the character buffer * @delta_time: timing information * * Put tune request * * Since: 1.0.0 */ void ags_midi_buffer_util_put_tune_request(unsigned char *buffer, glong delta_time) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xf6; } /** * ags_midi_buffer_util_get_tune_request: * @buffer: the character buffer * @delta_time: the return location of timing information * * Get tune request. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_tune_request(unsigned char *buffer, glong *delta_time) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } return(delta_time_size + 1); } /** * ags_midi_buffer_util_put_sequence_number: * @buffer: the character buffer * @delta_time: timing information * @sequence: the sequence * * Put sequence number. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_sequence_number(unsigned char *buffer, glong delta_time, glong sequence) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xff; /* type */ buffer[delta_time_size + 1] = 0x00; /* length */ buffer[delta_time_size + 2] = 2; /* data */ buffer[delta_time_size + 3] = ((0xff00 & sequence) >> 8); buffer[delta_time_size + 4] = 0xff & sequence; } /** * ags_midi_buffer_util_get_sequence_number: * @buffer: the character buffer * @delta_time: the return location of timing information * @sequence: the return location of the sequence * * Get sequence number. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_sequence_number(unsigned char *buffer, glong *delta_time, glong *sequence) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* sequence */ if(sequence != NULL){ *sequence = buffer[delta_time_size + 3] << 8; *sequence |= buffer[delta_time_size + 4]; } return(delta_time_size + 5); } /** * ags_midi_buffer_util_put_smtpe: * @buffer: the character buffer * @delta_time: timing information * @rr: frame rate * @hr: hour * @mn: minute * @se: second * @fr: frame number * * Put smtpe timestamp. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_smtpe(unsigned char *buffer, glong delta_time, glong rr, glong hr, glong mn, glong se, glong fr) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xff; /* type */ buffer[delta_time_size + 1] = 0x54; /* length */ buffer[delta_time_size + 2] = 5; /* rr */ buffer[delta_time_size + 3] = rr; /* hr */ buffer[delta_time_size + 3] |= hr; /* mn */ buffer[delta_time_size + 4] = mn; /* se */ buffer[delta_time_size + 5] = se; /* fr */ buffer[delta_time_size + 6] = fr; } /** * ags_midi_buffer_util_get_smtpe: * @buffer: the character buffer * @delta_time: the return location of timing information * @rr: the return location of frame rate * @hr: the return location of hour * @mn: the return location of minute * @se: the return location of second * @fr: the return location of frame number * * Get smtpe timestamp. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_smtpe(unsigned char *buffer, glong *delta_time, glong *rr, glong *hr, glong *mn, glong *se, glong *fr) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* rr */ if(rr != NULL){ *rr = 0xc0 & buffer[delta_time_size + 3]; } /* hr */ if(hr != NULL){ *hr = 0x3f & buffer[delta_time_size + 3]; } /* mn */ if(mn != NULL){ *mn = buffer[delta_time_size + 4]; } /* se */ if(se != NULL){ *se = buffer[delta_time_size + 5]; } /* fr */ if(fr != NULL){ *fr = buffer[delta_time_size + 6]; } return(delta_time_size + 7); } /** * ags_midi_buffer_util_put_tempo: * @buffer: the character buffer * @delta_time: timing information * @tempo: the tempo * * Put tempo. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_tempo(unsigned char *buffer, glong delta_time, glong tempo) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xff; /* type */ buffer[delta_time_size + 1] = 0x51; /* length */ buffer[delta_time_size + 2] = 0x03; /* tempo */ ags_midi_buffer_util_put_int24(buffer + delta_time_size + 3, tempo); } /** * ags_midi_buffer_util_get_tempo: * @buffer: the character buffer * @delta_time: the return location of timing information * @tempo: the tempo * * Get tempo. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_tempo(unsigned char *buffer, glong *delta_time, glong *tempo) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* tempo */ ags_midi_buffer_util_get_int24(buffer + delta_time_size + 3, tempo); return(delta_time_size + 6); } /** * ags_midi_buffer_util_put_time_signature: * @buffer: the character buffer * @delta_time: timing information * @nn: numerator * @dd: denominator * @cc: clocks * @bb: beats * * Put time signature * * Since: 1.0.0 */ void ags_midi_buffer_util_put_time_signature(unsigned char *buffer, glong delta_time, glong nn, glong dd, glong cc, glong bb) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xff; /* type */ buffer[delta_time_size + 1] = 0x58; /* length */ buffer[delta_time_size + 2] = 4; /* nn */ buffer[delta_time_size + 3] = nn; /* dd */ buffer[delta_time_size + 4] = dd; /* cc */ buffer[delta_time_size + 5] = cc; /* bb */ buffer[delta_time_size + 6] = bb; } /** * ags_midi_buffer_util_get_time_signature: * @buffer: the character buffer * @delta_time: the return location of timing information * @nn: the return location of numerator * @dd: the return location of denominator * @cc: the return location of clocks * @bb: the return location of beats * * Get time signature. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_time_signature(unsigned char *buffer, glong *delta_time, glong *nn, glong *dd, glong *cc, glong *bb) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* nn */ if(nn != NULL){ *nn = buffer[delta_time_size + 3]; } /* dd */ if(dd != NULL){ *dd = buffer[delta_time_size + 4]; } /* cc */ if(cc != NULL){ *cc = buffer[delta_time_size + 5]; } /* bb */ if(bb != NULL){ *bb = buffer[delta_time_size + 6]; } return(delta_time_size + 7); } /** * ags_midi_buffer_util_put_key_signature: * @buffer: the character buffer * @delta_time: timing information * @sf: flats or sharps * @mi: 1 equals minor or 0 means major * * Put key signature. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_key_signature(unsigned char *buffer, glong delta_time, glong sf, glong mi) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xff; /* type */ buffer[delta_time_size + 1] = 0x59; /* length */ buffer[delta_time_size + 2] = 2; /* sf */ buffer[delta_time_size + 3] = sf; /* mi */ buffer[delta_time_size + 4] = mi; } /** * ags_midi_buffer_util_get_key_signature: * @buffer: the character buffer * @delta_time: the return location of timing information * @sf: the return location of flats or sharps * @mi: the return location of minor or major * * Get key signature. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_key_signature(unsigned char *buffer, glong *delta_time, glong *sf, glong *mi) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* sf */ if(sf != NULL){ *sf = buffer[delta_time_size + 3]; } /* mi */ if(mi != NULL){ *mi = buffer[delta_time_size + 4]; } return(delta_time_size + 5); } /** * ags_midi_buffer_util_put_sequencer_meta_event: * @buffer: the character buffer * @delta_time: timing information * @len: the length of data * @id: the manufacturer id * @data: the data * * Put sequencer meta event. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_sequencer_meta_event(unsigned char *buffer, glong delta_time, glong len, glong id, glong data) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xff; /* type */ buffer[delta_time_size + 1] = 0x7f; /* length */ buffer[delta_time_size + 2] = 0xff & len; /* id */ buffer[delta_time_size + 3] = 0xff & id; /* data */ switch(len){ case 3: { buffer[delta_time_size + 6] = ((0xff << 16) & data) >> 16; } case 2: { buffer[delta_time_size + 4] = 0xff & data; buffer[delta_time_size + 5] = ((0xff << 8) & data) >> 8; } } } /** * ags_midi_buffer_util_get_sequencer_meta_event: * @buffer: the character buffer * @delta_time: the return location of timing information * @len: the return location of the length of data * @id: the return location of the manufacturer id * @data: the return location of the data * * Get sequencer meta event. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_sequencer_meta_event(unsigned char *buffer, glong *delta_time, glong *len, glong *id, glong *data) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } if(*len != NULL){ *len = buffer[delta_time_size + 2]; } if(id != NULL){ *id = buffer[delta_time_size + 3]; } if(data != NULL){ *data = 0; switch(buffer[delta_time_size + 2]){ case 3: { *data |= (buffer[delta_time_size + 6] << 16); } case 2: { *data |= buffer[delta_time_size + 4]; *data |= (buffer[delta_time_size + 5] << 8); } } } return(delta_time_size + buffer[delta_time_size + 2] + 3); } /** * ags_midi_buffer_util_put_text_event: * @buffer: the character buffer * @delta_time: timing information * @text: the text * @length: the length * * Put text event. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_text_event(unsigned char *buffer, glong delta_time, gchar *text, glong length) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xff; /* type */ buffer[delta_time_size + 1] = 0x01; /* length */ buffer[delta_time_size + 2] = 0xff & length; /* text */ memcpy(buffer + delta_time_size + 3, text, length * sizeof(unsigned char)); } /** * ags_midi_buffer_util_get_text_event: * @buffer: the character buffer * @delta_time: the return location of timing information * @text: the return location of the text * @length: the return location of the length * * Get text event. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_text_event(unsigned char *buffer, glong *delta_time, gchar **text, glong *length) { glong val; guint text_size; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } /* length */ text_size = 0x7f & buffer[delta_time_size + 2]; if(length != NULL){ *length = text_size; } /* text */ if(text != NULL){ *text = (unsigned char *) malloc(text_size * sizeof(unsigned char)); memcpy(*text, buffer + delta_time_size + 3, text_size * sizeof(unsigned char)); } return(delta_time_size + text_size + 3); } /** * ags_midi_buffer_util_put_end_of_track: * @buffer: the character buffer * @delta_time: timing information * * Put end of track. * * Since: 1.0.0 */ void ags_midi_buffer_util_put_end_of_track(unsigned char *buffer, glong delta_time) { guint delta_time_size; if(buffer == NULL){ return; } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); ags_midi_buffer_util_put_varlength(buffer, delta_time); /* status byte */ buffer[delta_time_size] = 0xff; /* type */ buffer[delta_time_size + 1] = 0x2f; /* length */ buffer[delta_time_size + 2] = 0; } /** * ags_midi_buffer_util_get_end_of_track: * @buffer: the character buffer * @delta_time: the return location of timing information * * Get end of track. * * Returns: the number of bytes read. * * Since: 1.0.0 */ guint ags_midi_buffer_util_get_end_of_track(unsigned char *buffer, glong *delta_time) { glong val; guint delta_time_size; if(buffer == NULL){ return(0); } /* delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(buffer, &val); if(delta_time != NULL){ *delta_time = val; } return(delta_time_size + 3); } /** * ags_midi_buffer_util_seek_message: * @buffer: the buffer to seek * @message_count: seek count messages * @delta_time: the return location of current delta time * * Seek MIDI messages from @buffer * * Returns: the buffer at offset at @message_count ahead * * Since: 1.0.0 */ unsigned char* ags_midi_buffer_util_seek_message(unsigned char *buffer, guint message_count, glong *delta_time) { static gchar header[] = "MThd"; static gchar track[] = "MTrk"; unsigned char *offset; glong current_delta_time; glong next_delta_time; guint delta_time_size; unsigned char status, prev_status; unsigned char meta_type; guint n; guint i; gboolean initial_run; if(buffer == NULL){ return(NULL); } offset = buffer; /* check for header */ if(!g_ascii_strncasecmp(offset, header, 4)){ offset += 14; } /* seek message count */ current_delta_time = 0; initial_run = TRUE; for(i = 0; i < message_count; i++){ /* check for track */ if(initial_run){ if(!g_ascii_strncasecmp(offset, track, 4)){ offset += 8; } initial_run = FALSE; } /* read delta time */ delta_time_size = ags_midi_buffer_util_get_varlength(offset, ¤t_delta_time); /* read status byte */ status = offset[delta_time_size]; n = 1; ags_midi_buffer_util_seek_message_REPEAT_STATUS: if((0xf0 & status) != 0xf0){ switch(status & 0xf0){ case 0x80: { n += delta_time_size + 2; prev_status = status; } break; case 0x90: { n += delta_time_size + 2; prev_status = status; } break; case 0xa0: { n += delta_time_size + 2; prev_status = status; } break; case 0xb0: { n += delta_time_size + 2; prev_status = status; } break; case 0xc0: { n += delta_time_size + 1; prev_status = status; } break; case 0xd0: { n += delta_time_size + 1; prev_status = status; } break; case 0xe0: { n += delta_time_size + 2; prev_status = status; } break; default: { #ifdef AGS_DEBUG g_message("repeat status=0x%x", prev_status); #endif status = prev_status; goto ags_midi_buffer_util_seek_message_REPEAT_STATUS; } } offset += n; /* check if status is omitted */ delta_time_size = ags_midi_buffer_util_get_varlength(offset, &next_delta_time); if((0xf0 & offset[delta_time_size]) != 0xf0){ switch(status & 0xf0){ case 0x80: case 0x90: case 0xa0: case 0xb0: case 0xc0: case 0xd0: case 0xe0: break; default: { n = 0; current_delta_time = next_delta_time; goto ags_midi_buffer_util_seek_message_REPEAT_STATUS; } } } }else{ status = offset[delta_time_size]; switch(status){ case 0xf0: { /* start of system exclusive */ n = ags_midi_buffer_util_get_sysex(offset, NULL, NULL, NULL); offset += n; } break; case 0xf1: { /* quarter frame */ n = ags_midi_buffer_util_get_quarter_frame(offset, NULL, NULL, NULL); offset += n; } break; case 0xf2: { /* song position */ n = ags_midi_buffer_util_get_song_position(offset, NULL, NULL); offset += n; } break; case 0xf3: { /* song select */ n = ags_midi_buffer_util_get_song_select(offset, NULL, NULL); offset += n; } break; case 0xf4: case 0xf5: { #ifdef AGS_DEBUG g_message("undefined"); #endif offset += delta_time_size; } break; case 0xf6: { /* tune request */ n = ags_midi_buffer_util_get_tune_request(offset, NULL); offset += n; } break; case 0xf7: { /* sysex continuation or arbitrary stuff */ #ifdef AGS_DEBUG g_message("sysex end"); #endif } break; case 0xff: { guint meta_type; meta_type = offset[delta_time_size + 1]; switch(meta_type){ case 0x00: { int c; // c = offset[delta_time_size + 1]; // if(c == 0x02){ n = ags_midi_buffer_util_get_sequence_number(offset, NULL, NULL); offset += n; // } } break; case 0x01: /* Text event */ case 0x02: /* Copyright notice */ case 0x03: /* Sequence/Track name */ case 0x04: /* Instrument name */ case 0x05: /* Lyric */ case 0x06: /* Marker */ case 0x07: /* Cue point */ case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: { /* These are all text events */ n = ags_midi_buffer_util_get_text_event(offset, NULL, NULL, NULL); offset += n; } break; case 0x2f: { int c; // c = buffer[delta_time_size]; // if(c == 0x0){ /* End of Track */ n = ags_midi_buffer_util_get_end_of_track(offset, NULL); offset = NULL; } break; case 0x51: { int c; // c = offset[delta_time_size]; // if(c == 0x03){ /* Set tempo */ n = ags_midi_buffer_util_get_tempo(offset, NULL, NULL); offset += n; // } } break; case 0x54: { int c; c = offset[delta_time_size]; // if(c == 0x05){ n = ags_midi_buffer_util_get_smtpe(offset, NULL, NULL, NULL, NULL, NULL, NULL); offset += n; // } } break; case 0x58: { int c; // c = ags_midi_parser_midi_getc(midi_parser); n = ags_midi_buffer_util_get_time_signature(offset, NULL, NULL, NULL, NULL, NULL); offset += n; // if(c == 0x04){ // } } break; case 0x59: { int c; // c = offset[delta_time_size]; // if(c == 0x02){ n = ags_midi_buffer_util_get_key_signature(offset, NULL, NULL, NULL); offset += n; // } } break; case 0x7f: { n = ags_midi_buffer_util_get_sequencer_meta_event(NULL, NULL, NULL, NULL, NULL); offset += n; } break; default: offset += 5; } } break; default: g_warning("bad byte"); } } } if(delta_time != NULL){ *delta_time = current_delta_time; } return(offset); } /** * ags_midi_buffer_util_decode: * @buffer: the midi buffer * @event: the ALSA sequencer event * * Decode @event to @buffer * * Returns: the bytes written * * Since: 1.0.0 */ guint ags_midi_buffer_util_decode(unsigned char *buffer, snd_seq_event_t *event) { guint count; if(buffer == NULL || event == NULL){ return(0); } count = 0; switch(event->type){ case SND_SEQ_EVENT_NOTEON: { unsigned char tmp[8]; ags_midi_buffer_util_put_key_on(tmp, 0, event->data.note.channel, event->data.note.note, event->data.note.velocity); count = ags_midi_buffer_util_get_varlength_size(0); memcpy(buffer, tmp + count, 3 * sizeof(unsigned char)); count = 3; } break; case SND_SEQ_EVENT_NOTEOFF: { unsigned char tmp[8]; ags_midi_buffer_util_put_key_off(tmp, 0, event->data.note.channel, event->data.note.note, event->data.note.velocity); count = ags_midi_buffer_util_get_varlength_size(0); memcpy(buffer, tmp + count, 3 * sizeof(unsigned char)); count = 3; } break; default: g_warning("ags_midi_buffer_util_decode() - unsupported MIDI event"); break; } return(count); } gsequencer-1.4.24/ags/audio/midi/ags_midi_buffer_util.h0000644000175000017500000002235513246707333020013 00000000000000/* 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 . */ #ifndef __AGS_MIDI_BUFFER_UTIL_H__ #define __AGS_MIDI_BUFFER_UTIL_H__ #include #include #include typedef enum{ AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_LSB = 0x0, AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_FRAME_NUMBER_MSB = 0x10, AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_LSB = 0x20, AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_SECONDS_MSB = 0x30, AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_LSB = 0x40, AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_MINUTES_MSB = 0x50, AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_LSB = 0x60, AGS_MIDI_BUFFER_UTIL_MTC_QUARTER_FRAME_HOURS_MSB = 0x70, }AgsMidiBufferUtilMtcQuarterFrameMessageType; typedef enum{ AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_24_FPS = 0x0, AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_25_FPS = 0x40, AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS = 0x80, AGS_MIDI_BUFFER_UTIL_SMTPE_FRAME_RATE_30_FPS_DROP_FRAME = 0xc0, }AgsMidiBufferUtilSmtpeFrameRate; /* varlength */ guint ags_midi_buffer_util_get_varlength_size(glong varlength); void ags_midi_buffer_util_put_varlength(unsigned char *buffer, glong varlength); guint ags_midi_buffer_util_get_varlength(unsigned char *buffer, glong *varlength); /* integer - 2 bytes */ void ags_midi_buffer_util_put_int16(unsigned char *buffer, glong val); void ags_midi_buffer_util_get_int16(unsigned char *buffer, glong *val); /* integer - 3 bytes */ void ags_midi_buffer_util_put_int24(unsigned char *buffer, glong val); void ags_midi_buffer_util_get_int24(unsigned char *buffer, glong *val); /* integer - 4 bytes */ void ags_midi_buffer_util_put_int32(unsigned char *buffer, glong val); void ags_midi_buffer_util_get_int32(unsigned char *buffer, glong *val); /* channel message */ /* midi header */ void ags_midi_buffer_util_put_header(unsigned char *buffer, glong offset, glong format, glong track_count, glong division); guint ags_midi_buffer_util_get_header(unsigned char *buffer, glong *offset, glong *format, glong *track_count, glong *division); /* midi track */ void ags_midi_buffer_util_put_track(unsigned char *buffer, glong offset); guint ags_midi_buffer_util_get_track(unsigned char *buffer, glong *offset); /* key on */ void ags_midi_buffer_util_put_key_on(unsigned char *buffer, glong delta_time, glong channel, glong key, glong velocity); guint ags_midi_buffer_util_get_key_on(unsigned char *buffer, glong *delta_time, glong *channel, glong *key, glong *velocity); /* key off */ void ags_midi_buffer_util_put_key_off(unsigned char *buffer, glong delta_time, glong channel, glong key, glong velocity); guint ags_midi_buffer_util_get_key_off(unsigned char *buffer, glong *delta_time, glong *channel, glong *key, glong *velocity); /* key pressure */ void ags_midi_buffer_util_put_key_pressure(unsigned char *buffer, glong delta_time, glong channel, glong key, glong pressure); guint ags_midi_buffer_util_get_key_pressure(unsigned char *buffer, glong *delta_time, glong *channel, glong *key, glong *pressure); /* change parameter */ void ags_midi_buffer_util_put_change_parameter(unsigned char *buffer, glong delta_time, glong channel, glong control, glong value); guint ags_midi_buffer_util_get_change_parameter(unsigned char *buffer, glong *delta_time, glong *channel, glong *control, glong *value); /* pitch bend */ void ags_midi_buffer_util_put_pitch_bend(unsigned char *buffer, glong delta_time, glong channel, glong pitch, glong transmitter); guint ags_midi_buffer_util_get_pitch_bend(unsigned char *buffer, glong *delta_time, glong *channel, glong *pitch, glong *transmitter); /* change program */ void ags_midi_buffer_util_put_change_program(unsigned char *buffer, glong delta_time, glong channel, glong program); guint ags_midi_buffer_util_get_change_program(unsigned char *buffer, glong *delta_time, glong *channel, glong *program); /* change pressure */ void ags_midi_buffer_util_put_change_pressure(unsigned char *buffer, glong delta_time, glong channel, glong pressure); guint ags_midi_buffer_util_get_change_pressure(unsigned char *buffer, glong *delta_time, glong *channel, glong *pressure); /* sysex and system common */ /* sysex */ void ags_midi_buffer_util_put_sysex(unsigned char *buffer, glong delta_time, unsigned char *data, glong length); guint ags_midi_buffer_util_get_sysex(unsigned char *buffer, glong *delta_time, unsigned char **data, glong *length); /* quarter frame */ void ags_midi_buffer_util_put_quarter_frame(unsigned char *buffer, glong delta_time, glong message_type, glong values); guint ags_midi_buffer_util_get_quarter_frame(unsigned char *buffer, glong *delta_time, glong *message_type, glong *values); /* song position */ void ags_midi_buffer_util_put_song_position(unsigned char *buffer, glong delta_time, glong song_position); guint ags_midi_buffer_util_get_song_position(unsigned char *buffer, glong *delta_time, glong *song_position); /* song select */ void ags_midi_buffer_util_put_song_select(unsigned char *buffer, glong delta_time, glong song_select); guint ags_midi_buffer_util_get_song_select(unsigned char *buffer, glong *delta_time, glong *song_select); /* tune request */ void ags_midi_buffer_util_put_tune_request(unsigned char *buffer, glong delta_time); guint ags_midi_buffer_util_get_tune_request(unsigned char *buffer, glong *delta_time); /* meta event */ /* sequence number */ void ags_midi_buffer_util_put_sequence_number(unsigned char *buffer, glong delta_time, glong sequence); guint ags_midi_buffer_util_get_sequence_number(unsigned char *buffer, glong *delta_time, glong *sequence); /* smtpe */ void ags_midi_buffer_util_put_smtpe(unsigned char *buffer, glong delta_time, glong rr, glong hr, glong mn, glong se, glong fr); guint ags_midi_buffer_util_get_smtpe(unsigned char *buffer, glong *delta_time, glong *rr, glong *hr, glong *mn, glong *se, glong *fr); /* tempo */ void ags_midi_buffer_util_put_tempo(unsigned char *buffer, glong delta_time, glong tempo); guint ags_midi_buffer_util_get_tempo(unsigned char *buffer, glong *delta_time, glong *tempo); /* time signature */ void ags_midi_buffer_util_put_time_signature(unsigned char *buffer, glong delta_time, glong nn, glong dd, glong cc, glong bb); guint ags_midi_buffer_util_get_time_signature(unsigned char *buffer, glong *delta_time, glong *nn, glong *dd, glong *cc, glong *bb); /* key signature */ void ags_midi_buffer_util_put_key_signature(unsigned char *buffer, glong delta_time, glong sf, glong mi); guint ags_midi_buffer_util_get_key_signature(unsigned char *buffer, glong *delta_time, glong *sf, glong *mi); /* sequencer meta event */ void ags_midi_buffer_util_put_sequencer_meta_event(unsigned char *buffer, glong delta_time, glong len, glong id, glong data); guint ags_midi_buffer_util_get_sequencer_meta_event(unsigned char *buffer, glong *delta_time, glong *len, glong *id, glong *data); /* text event */ void ags_midi_buffer_util_put_text_event(unsigned char *buffer, glong delta_time, gchar *text, glong length); guint ags_midi_buffer_util_get_text_event(unsigned char *buffer, glong *delta_time, gchar **text, glong *length); /* end of track */ void ags_midi_buffer_util_put_end_of_track(unsigned char *buffer, glong delta_time); guint ags_midi_buffer_util_get_end_of_track(unsigned char *buffer, glong *delta_time); /* seek */ unsigned char* ags_midi_buffer_util_seek_message(unsigned char *buffer, guint message_count, glong *delta_time); /* ALSA sequencer */ /* decode */ guint ags_midi_buffer_util_decode(unsigned char *buffer, snd_seq_event_t *event); #endif /*__AGS_MIDI_BUFFER_UTIL_H__*/ gsequencer-1.4.24/ags/audio/midi/ags_midi_file.h0000644000175000017500000001221313256163135016411 00000000000000/* 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 . */ #ifndef __AGS_MIDI_FILE_H__ #define __AGS_MIDI_FILE_H__ #include #include #include #include #define AGS_TYPE_MIDI_FILE (ags_midi_file_get_type ()) #define AGS_MIDI_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIDI_FILE, AgsMidiFile)) #define AGS_MIDI_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MIDI_FILE, AgsMidiFileClass)) #define AGS_IS_MIDI_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MIDI_FILE)) #define AGS_IS_MIDI_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MIDI_FILE)) #define AGS_MIDI_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_MIDI_FILE, AgsMidiFileClass)) #define AGS_MIDI_FILE_TRACK(ptr) ((AgsMidiFileTrack *)(ptr)) #define AGS_MIDI_FILE_MAX_TEXT_LENGTH (4096) #define AGS_MIDI_FILE_MTHD "MThd\0" #define AGS_MIDI_FILE_MTRK "MTrk\0" #define AGS_MIDI_FILE_DEFAULT_OFFSET (0) #define AGS_MIDI_FILE_DEFAULT_FORMAT (1) #define AGS_MIDI_FILE_DEFAULT_BEATS (120) #define AGS_MIDI_FILE_DEFAULT_FPS (30) #define AGS_MIDI_FILE_DEFAULT_TICKS (384) typedef struct _AgsMidiFile AgsMidiFile; typedef struct _AgsMidiFileClass AgsMidiFileClass; typedef struct _AgsMidiFileTrack AgsMidiFileTrack; typedef enum{ /* channel messages */ AGS_MIDI_FILE_KEY_OFF = 0x80, AGS_MIDI_FILE_KEY_ON = 0x90, AGS_MIDI_FILE_KEY_PRESSURE = 0xa0, AGS_MIDI_FILE_CHANGE_PARAMETER = 0xb0, AGS_MIDI_FILE_CHANGE_PROGRAM = 0xc0, AGS_MIDI_FILE_CHANNEL_PRESSURE = 0xd0, AGS_MIDI_FILE_CHANGE_PITCH_BEND = 0xe0, /* status messages */ AGS_MIDI_FILE_SYSEX = 0xf0, AGS_MIDI_FILE_QUARTER_FRAME = 0xf1, AGS_MIDI_FILE_SONG_POSITION = 0xf2, AGS_MIDI_FILE_SONG_SELECT = 0xf3, AGS_MIDI_FILE_UNDEFINED_0 = 0xf4, AGS_MIDI_FILE_UNDEFINED_1 = 0xf5, AGS_MIDI_FILE_TUNE_REQUEST = 0xf6, AGS_MIDI_FILE_SYSEX_END = 0xf7, AGS_MIDI_FILE_META_EVENT = 0xff, }AgsMidiFileStatus; typedef enum{ AGS_MIDI_FILE_EOF = 1, AGS_MIDI_FILE_SMTPE = 1 << 1, AGS_MIDI_FILE_DROP_FRAME = 1 << 2, }AgsMidiFileFlags; struct _AgsMidiFile { GObject gobject; guint flags; gchar *filename; FILE *file; unsigned char *buffer; guint buffer_length; unsigned char *iter; guint offset; guint format; guint count; guint division; guint times; guint beat; guint clicks; GList *track; AgsMidiFileTrack *current_track; }; struct _AgsMidiFileClass { GObjectClass gobject; }; struct _AgsMidiFileTrack { GObject *sequencer; gchar *track_name; unsigned char *buffer; }; GType ags_midi_file_get_type(void); gboolean ags_midi_file_open(AgsMidiFile *midi_file); gboolean ags_midi_file_open_from_data(AgsMidiFile *midi_file, unsigned char *data, guint buffer_length); gboolean ags_midi_file_rw_open(AgsMidiFile *midi_file); void ags_midi_file_close(AgsMidiFile *midi_file); unsigned char* ags_midi_file_read(AgsMidiFile *midi_file); void ags_midi_file_write(AgsMidiFile *midi_file, unsigned char *data, guint buffer_length); void ags_midi_file_seek(AgsMidiFile *midi_file, guint position, gint whence); void ags_midi_file_flush(AgsMidiFile *midi_file); gint16 ags_midi_file_read_gint16(AgsMidiFile *midi_file); gint32 ags_midi_file_read_gint24(AgsMidiFile *midi_file); gint32 ags_midi_file_read_gint32(AgsMidiFile *midi_file); long ags_midi_file_read_varlength(AgsMidiFile *midi_file); unsigned char* ags_midi_file_read_text(AgsMidiFile *midi_file, gint length); void ags_midi_file_write_gint16(AgsMidiFile *midi_file, gint16 val); void ags_midi_file_write_gint24(AgsMidiFile *midi_file, gint32 val); void ags_midi_file_write_gint32(AgsMidiFile *midi_file, gint32 val); void ags_midi_file_write_varlength(AgsMidiFile *midi_file, long val); void ags_midi_file_write_text(AgsMidiFile *midi_file, gchar *text, guint length); unsigned char* ags_midi_file_read_header(AgsMidiFile *midi_file, guint *buffer_length); void ags_midi_file_write_header(AgsMidiFile *midi_file, unsigned char *buffer, guint buffer_length); unsigned char* ags_midi_file_read_track_data(AgsMidiFile *midi_file, guint *buffer_length); void ags_midi_file_write_track_data(AgsMidiFile *midi_file, unsigned char *buffer, guint buffer_length); AgsMidiFile* ags_midi_file_new(gchar *filename); #endif /*__AGS_MIDI_FILE_H__*/ gsequencer-1.4.24/ags/audio/midi/ags_midi_file.c0000644000175000017500000005636013256163135016417 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_midi_file_class_init(AgsMidiFileClass *midi_file); void ags_midi_file_init(AgsMidiFile *midi_file); void ags_midi_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_midi_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_midi_file_finalize(GObject *gobject); /** * SECTION:ags_midi_file * @short_description: the MIDI file * @title: AgsMidiFile * @section_id: * @include: ags/audio/midi/ags_midi_file.h * * #AgsMidiFile reads or writes your midi files. */ enum{ PROP_0, PROP_FILENAME, }; static gpointer ags_midi_file_parent_class = NULL; GType ags_midi_file_get_type(void) { static GType ags_type_midi_file = 0; if(!ags_type_midi_file){ static const GTypeInfo ags_midi_file_info = { sizeof (AgsMidiFileClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_midi_file_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMidiFile), 0, /* n_preallocs */ (GInstanceInitFunc) ags_midi_file_init, }; ags_type_midi_file = g_type_register_static(G_TYPE_OBJECT, "AgsMidiFile", &ags_midi_file_info, 0); } return(ags_type_midi_file); } void ags_midi_file_class_init(AgsMidiFileClass *midi_file) { GObjectClass *gobject; GParamSpec *param_spec; ags_midi_file_parent_class = g_type_class_peek_parent(midi_file); /* GObjectClass */ gobject = (GObjectClass *) midi_file; gobject->set_property = ags_midi_file_set_property; gobject->get_property = ags_midi_file_get_property; gobject->finalize = ags_midi_file_finalize; /* properties */ /** * AgsMidiFile:filename: * * The assigned filename to perform input/output on. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("assigned filename"), i18n_pspec("The filename to read or write"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); } void ags_midi_file_init(AgsMidiFile *midi_file) { midi_file->flags = 0; midi_file->file = NULL; midi_file->filename = NULL; midi_file->buffer = NULL; midi_file->buffer_length = 0; midi_file->offset = AGS_MIDI_FILE_DEFAULT_OFFSET; midi_file->format = AGS_MIDI_FILE_DEFAULT_FORMAT; midi_file->count = 0; midi_file->division = (60 * USEC_PER_SEC) / AGS_MIDI_FILE_DEFAULT_BEATS; midi_file->times = 0; midi_file->beat = AGS_MIDI_FILE_DEFAULT_BEATS; midi_file->clicks = AGS_MIDI_FILE_DEFAULT_TICKS; midi_file->track = NULL; midi_file->current_track = NULL; } void ags_midi_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMidiFile *midi_file; midi_file = AGS_MIDI_FILE(gobject); switch(prop_id){ case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(filename == midi_file->filename){ return; } if(midi_file->filename != NULL){ g_free(midi_file->filename); } midi_file->filename = g_strdup(filename); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMidiFile *midi_file; midi_file = AGS_MIDI_FILE(gobject); switch(prop_id){ case PROP_FILENAME: { g_value_set_string(value, midi_file->filename); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_file_finalize(GObject *gobject) { AgsMidiFile *midi_file; midi_file = (AgsMidiFile *) gobject; g_free(midi_file->filename); G_OBJECT_CLASS(ags_midi_file_parent_class)->finalize(gobject); } /** * ags_midi_file_open: * @midi_file: the #AgsMidiFile * * Opens a MIDI file read-only. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_file_open(AgsMidiFile *midi_file) { if(midi_file == NULL || midi_file->filename == NULL){ return(FALSE); } midi_file->file = fopen(midi_file->filename, "r"); return(TRUE); } /** * ags_midi_file_open_from_data: * @midi_file: the #AgsMidiFile * @data: the buffer to set * @buffer_length: the length of the buffer * * Opens a virtual MIDI file residing in @data's array. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_file_open_from_data(AgsMidiFile *midi_file, unsigned char *data, guint buffer_length) { if(midi_file == NULL){ return(FALSE); } midi_file->buffer = data; midi_file->buffer_length = buffer_length; return(TRUE); } /** * ags_midi_file_rw_open: * @midi_file: the #AgsMidiFile * * Opens a MIDI file with read-write permission. * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_file_rw_open(AgsMidiFile *midi_file) { if(midi_file == NULL || midi_file->filename == NULL){ return(FALSE); } midi_file->file = fopen(midi_file->filename, "r+"); return(TRUE); } /** * ags_midi_file_close: * @midi_file: the #AgsMidiFile * * Closes the file stream. * * Since: 1.0.0 */ void ags_midi_file_close(AgsMidiFile *midi_file) { if(midi_file == NULL || midi_file->file == NULL){ return; } fclose(midi_file->file); midi_file->file = NULL; } /** * ags_midi_file_read: * @midi_file: the #AgsMidiFile * * Reads all bytes of the file's stream and stores them in the internal buffer. * * Returns: the data array just read * * Since: 1.0.0 */ unsigned char* ags_midi_file_read(AgsMidiFile *midi_file) { struct stat sb; size_t n_read; if(midi_file == NULL || midi_file->filename == NULL || midi_file->file == NULL){ return(NULL); } stat(midi_file->filename, &sb); midi_file->buffer_length = sb.st_size + 1; midi_file->buffer = (unsigned char *) malloc(midi_file->buffer_length * sizeof(unsigned char)); midi_file->buffer[sb.st_size] = EOF; n_read = fread(midi_file->buffer, sizeof(unsigned char), sb.st_size, midi_file->file); if(n_read != sb.st_size){ g_critical("fread() number of bytes read doesn't match buffer size"); } midi_file->iter = midi_file->buffer; return(midi_file->buffer); } /** * ags_midi_file_write: * @midi_file: the #AgsMidiFile * @data: the data array to write * @buffer_length: n-bytes to write * * Writes @data to the file stream and to internal buffer, reallocates it if necessary. * * Since: 1.0.0 */ void ags_midi_file_write(AgsMidiFile *midi_file, unsigned char *data, guint buffer_length) { unsigned char *start; if(midi_file == NULL || midi_file->file == NULL){ return; } if(midi_file->buffer == NULL){ start = midi_file->buffer = (unsigned char *) malloc((buffer_length + 1) * sizeof(unsigned char)); midi_file->buffer_length = buffer_length + 1; }else{ guint old_buffer_length; old_buffer_length = midi_file->buffer_length; midi_file->buffer = realloc(midi_file->buffer, (old_buffer_length + buffer_length) * sizeof(unsigned char)); start = &(midi_file->buffer[old_buffer_length - 1]); } memcpy(start, data, buffer_length * sizeof(unsigned char)); start[buffer_length] = EOF; fwrite(data, sizeof(unsigned char), buffer_length, midi_file->file); } /** * ags_midi_file_seek: * @midi_file: the #AgsMidiFile * @position: the offset * @whence: SEEK_SET, SEEK_END, or SEEK_CUR * * Seeks the file stream's offset. * * Since: 1.0.0 */ void ags_midi_file_seek(AgsMidiFile *midi_file, guint position, gint whence) { if(midi_file == NULL || midi_file->file == NULL){ return; } fseek(midi_file->file, position, whence); } /** * ags_midi_file_flush: * @midi_file: the #AgsMidiFile * * Flushes file stream's data buffer to disc. * * Since: 1.0.0 */ void ags_midi_file_flush(AgsMidiFile *midi_file) { if(midi_file == NULL || midi_file->file == NULL){ return; } fflush(midi_file->file); } /** * ags_midi_file_read_gint16: * @midi_file: the #AgsMidiFile * * Reads a gint16 quantity. * * Returns: the current value at file's iteration pointer * * Since: 1.0.0 */ gint16 ags_midi_file_read_gint16(AgsMidiFile *midi_file) { unsigned char str[2]; gint16 value = 0; str[0] = (midi_file->iter[0]); str[1] = (midi_file->iter[1]); midi_file->iter += 2; value = (str[0] & 0xff); value = (value<<8) + (str[1] & 0xff); return(value); } /** * ags_midi_file_read_gint24: * @midi_file: the #AgsMidiFile * * Reads a 24-bit quantity. * * Returns: the current value at file's iteration pointer * * Since: 1.0.0 */ gint32 ags_midi_file_read_gint24(AgsMidiFile *midi_file) { unsigned char str[4]; gint32 value = 0; str[0] = (unsigned char) 0x00; str[1] = (midi_file->iter[0]); str[2] = (midi_file->iter[1]); str[3] = (midi_file->iter[2]); midi_file->iter += 3; value = (value<<8) + (str[1] & 0xff); value = (value<<8) + (str[2] & 0xff); value = (value<<8) + (str[3] & 0xff); return(value); } /** * ags_midi_file_read_gint32: * @midi_file: the #AgsMidiFile * * Reads a gint32 quantity. * * Returns: the current value at file's iteration pointer * * Since: 1.0.0 */ gint32 ags_midi_file_read_gint32(AgsMidiFile *midi_file) { unsigned char str[4]; gint32 value; str[0] = (midi_file->iter[0]); str[1] = (midi_file->iter[1]); str[2] = (midi_file->iter[2]); str[3] = (midi_file->iter[3]); midi_file->iter += 4; value = (str[0] & 0xff); value = (value<<8) + (str[1] & 0xff); value = (value<<8) + (str[2] & 0xff); value = (value<<8) + (str[3] & 0xff); return(value); } /** * ags_midi_file_read_varlength: * @midi_file: the #AgsMidiFile * * Reads a variable length quantity. * * Returns: the current value at file's iteration pointer * * Since: 1.0.0 */ long ags_midi_file_read_varlength(AgsMidiFile *midi_file) { long value; guint i; unsigned char c; c = midi_file->iter[0]; value = c; i = 1; midi_file->iter += 1; if(c & 0x80){ value &= 0x7F; do{ //TODO:JK: unsafe value = (value << 7) + ((c = (midi_file->iter[0])) & 0x7F); i++; midi_file->iter += 1; }while(c & 0x80); } return(value); } /** * ags_midi_file_read_text: * @midi_file: the #AgsMidiFile * @length: the number of bytes to be read, or as long valid string for -1 * * Reads a string. * * Returns: the string at file's iteration pointer * * Since: 1.0.0 */ unsigned char* ags_midi_file_read_text(AgsMidiFile *midi_file, gint length) { unsigned char *text; gchar c; guint i; text = (unsigned char *) malloc((AGS_MIDI_FILE_MAX_TEXT_LENGTH + 1) * sizeof(unsigned char)); memset(text, 0, AGS_MIDI_FILE_MAX_TEXT_LENGTH * sizeof(unsigned char)); i = 0; while((length <= 0 || i < length) && (c = (midi_file->iter[0])) != EOF){ midi_file->iter += 1; //TODO:JK: unsafe if(c == '\0' || !(g_ascii_isalnum(c) || g_ascii_ispunct(c) || c == ' ')){ break; } text[i] = c; i++; } text[i] = '\0'; return(text); } /** * ags_midi_file_write_gint16: * @midi_file: the #AgsMidiFile * @val: the value to write * * Writes a gint16 quantity to internal buffer. * * Since: 1.0.0 */ void ags_midi_file_write_gint16(AgsMidiFile *midi_file, gint16 val) { if(&(midi_file->iter[2]) >= &(midi_file->buffer[midi_file->buffer_length])){ size_t new_length; new_length = &(midi_file->iter[2]) - &(midi_file->buffer[midi_file->buffer_length]); midi_file->buffer = (unsigned char *) realloc(midi_file->buffer, new_length * sizeof(unsigned char)); midi_file->buffer_length = new_length; } midi_file->iter[0] = 0xff & val; midi_file->iter[1] = (0xff00 & val) >> 8; midi_file->iter += 2; } /** * ags_midi_file_write_gint24: * @midi_file: the #AgsMidiFile * @val: the value to write * * Writes a 24-bit quantity to internal buffer. * * Since: 1.0.0 */ void ags_midi_file_write_gint24(AgsMidiFile *midi_file, gint32 val) { if(&(midi_file->iter[3]) >= &(midi_file->buffer[midi_file->buffer_length])){ size_t new_length; new_length = &(midi_file->iter[3]) - &(midi_file->buffer[midi_file->buffer_length]); midi_file->buffer = (unsigned char *) realloc(midi_file->buffer, new_length * sizeof(unsigned char)); midi_file->buffer_length = new_length; } midi_file->iter[0] = 0xff & val; midi_file->iter[1] = (0xff00 & val) >> 8; midi_file->iter[2] = (0xff0000 & val) >> 16; midi_file->iter += 3; } /** * ags_midi_file_write_gint32: * @midi_file: the #AgsMidiFile * @val: the value to write * * Writes a gint32 quantity to internal buffer. * * Since: 1.0.0 */ void ags_midi_file_write_gint32(AgsMidiFile *midi_file, gint32 val) { if(&(midi_file->iter[4]) >= &(midi_file->buffer[midi_file->buffer_length])){ size_t new_length; new_length = &(midi_file->iter[4]) - &(midi_file->buffer[midi_file->buffer_length]); midi_file->buffer = (unsigned char *) realloc(midi_file->buffer, new_length * sizeof(unsigned char)); midi_file->buffer_length = new_length; } midi_file->iter[0] = 0xff & val; midi_file->iter[1] = (0xff00 & val) >> 8; midi_file->iter[2] = (0xff0000 & val) >> 16; midi_file->iter[3] = (0xff000000 & val) >> 24; midi_file->iter += 4; } /** * ags_midi_file_write_varlenght: * @midi_file: the #AgsMidiFile * @val: the value to write * * Writes a variable length quantity to internal buffer. * * Since: 1.0.0 */ void ags_midi_file_write_varlength(AgsMidiFile *midi_file, long val) { gchar c; long mask; guint i, j; mask = 0xff; /* retrieve new size */ i = 0; do{ c = ((mask << (i * 8)) & val) >> (i * 8); i++; }while(0x80 & c); /* realloc buffer if needed */ if(&(midi_file->iter[i]) >= &(midi_file->buffer[midi_file->buffer_length])){ size_t new_length; new_length = &(midi_file->iter[i]) - &(midi_file->buffer[midi_file->buffer_length]); midi_file->buffer = (unsigned char *) realloc(midi_file->buffer, new_length * sizeof(unsigned char)); midi_file->buffer_length = new_length; } /* write to internal buffer */ for(j = 0; j < i; i++){ midi_file->iter[j] = ((mask << (j * 8)) & val) >> (j * 8); } midi_file->iter += i; } /** * ags_midi_file_write_text: * @midi_file: the #AgsMidiFile * @text: the text * @length: the string's length * * Writes a string to internal buffer up to length bytes. * * Since: 1.0.0 */ void ags_midi_file_write_text(AgsMidiFile *midi_file, gchar *text, guint length) { guint i; if(text == NULL){ return; } if(&(midi_file->iter[length]) >= &(midi_file->buffer[midi_file->buffer_length])){ size_t new_length; new_length = &(midi_file->iter[length]) - &(midi_file->buffer[midi_file->buffer_length]); midi_file->buffer = (unsigned char *) realloc(midi_file->buffer, new_length * sizeof(unsigned char)); midi_file->buffer_length = new_length; } for(i = 0; i < length; i++){ midi_file->iter[i] = text[i]; } midi_file->iter += length; } /** * ags_midi_file_read_header: * @midi_file: the #AgsMidiFile * @buffer_length: pointer to return buffer length or %NULL * * Reads the MIDI file's header and positions internal buffer pointer just behind it. * * Returns: the header's bytes * * Since: 1.0.0 */ unsigned char* ags_midi_file_read_header(AgsMidiFile *midi_file, guint *buffer_length) { static gchar header[] = "MThd"; unsigned char *data; guint length; guint n; gchar c; if(midi_file == NULL){ if(buffer_length != NULL){ *buffer_length = 0; } return(NULL); } data = NULL; length = 0; /* read header */ n = 0; while(n < 4 && (AGS_MIDI_FILE_EOF & (midi_file->flags)) == 0){ c = midi_file->iter[n]; if(c == header[n]){ n++; }else{ n = 0; } } /* position internal iteration pointer */ midi_file->iter += 4; length += 4; /* get some values */ midi_file->offset = (guint) ags_midi_file_read_gint32(midi_file); midi_file->format = (guint) ags_midi_file_read_gint16(midi_file); midi_file->count = (guint) ags_midi_file_read_gint16(midi_file); midi_file->division = (guint) ags_midi_file_read_gint16(midi_file); if((midi_file->division) & 0x8000){ /* SMPTE */ midi_file->times = 0; /* Can't do beats */ } midi_file->beat = midi_file->clicks = midi_file->division; length += 10; /* return values */ if(buffer_length != NULL){ *buffer_length = length; } return(data); } /** * ags_midi_file_write_header: * @midi_file: the #AgsMidiFile * @buffer: the buffer to write * @buffer_length: the length of the buffer * * Write header bytes. * * Since: 1.0.0 */ void ags_midi_file_write_header(AgsMidiFile *midi_file, unsigned char *buffer, guint length) { guint i; if(midi_file == NULL){ return; } if(&(midi_file->iter[length]) >= &(midi_file->buffer[midi_file->buffer_length])){ size_t new_length; new_length = &(midi_file->iter[length]) - &(midi_file->buffer[midi_file->buffer_length]); midi_file->buffer = (unsigned char *) realloc(midi_file->buffer, new_length * sizeof(unsigned char)); midi_file->buffer_length = new_length; } for(i = 0; i < length; i++){ midi_file->iter[i] = buffer[i]; } midi_file->iter += length; } unsigned char* ags_midi_file_read_track_data(AgsMidiFile *midi_file, guint *buffer_length) { gchar *track_name; unsigned char *data, *start; guint length; long delta_time; guint status; guint n; gchar c; gboolean end_of_track; static gchar track[] = "MTrk"; if(midi_file == NULL){ if(buffer_length != NULL){ *buffer_length = 0; } return(NULL); } track_name = NULL; data = NULL; length = 0; /* midi track */ n = 0; while(n < 4 && midi_file->iter < &(midi_file->buffer[midi_file->buffer_length])){ c = midi_file->iter[0]; midi_file->iter += 1; if(c == track[n]){ n++; }else{ n = 0; } } start = midi_file->iter - 4; /* offset */ ags_midi_file_read_gint32(midi_file); end_of_track = FALSE; while(!end_of_track){ delta_time = ags_midi_file_read_varlength(midi_file); status = midi_file->iter[0]; midi_file->iter += 1; if((0xf0 & (0xf0 & status)) != 0xf0){ #ifdef AGS_DEBUG g_message("channel message"); #endif }else{ #ifdef AGS_DEBUG g_message("status message"); #endif switch(status){ case 0xf0: { /* start of system exclusive */ while(midi_file->iter[0] != 0xf7 && midi_file->iter < &(midi_file->buffer[midi_file->buffer_length])){ midi_file->iter += 1; } } case 0xf1: { /* quarter frame */ midi_file->iter += 1; } break; case 0xf2: { /* song position */ midi_file->iter += 2; } break; case 0xf3: { /* song select */ midi_file->iter += 1; } break; case 0xf4: case 0xf5: { /* undefined */ } break; case 0xf6: { /* tune request */ } break; case 0xf7: { /* sysex continuation or arbitrary stuff */ #ifdef AGS_DEBUG g_message("sysex end"); #endif } break; case 0xff: { guint meta_type; /* meta event */ meta_type = midi_file->iter[0]; midi_file->iter += 1; switch(meta_type){ case 0x00: { int c; c = midi_file->iter[0]; midi_file->iter += 1; if(c == 0x02){ midi_file->iter += 2; } } break; case 0x01: /* Text event */ case 0x02: /* Copyright notice */ case 0x03: /* Sequence/Track name */ case 0x04: /* Instrument name */ case 0x05: /* Lyric */ case 0x06: /* Marker */ case 0x07: /* Cue point */ case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: { gchar *text; guint text_length; /* These are all text events */ text_length = ags_midi_file_read_varlength(midi_file); text = ags_midi_file_read_text(midi_file, text_length); g_free(text); } break; case 0x2f: { int c; c = midi_file->iter[0]; midi_file->iter += 1; if(c == 0x0){ /* End of Track */ end_of_track = TRUE; } } break; case 0x51: { int c; c = midi_file->iter[0]; midi_file->iter += 1; if(c == 0x03){ /* Set tempo */ midi_file->iter += 3; } } break; case 0x54: { int c; c = midi_file->iter[0]; midi_file->iter += 1; if(c == 0x05){ midi_file->iter += 5; } } break; case 0x58: { int c; c = midi_file->iter[0]; midi_file->iter += 1; if(c == 0x04){ /* time signature */ midi_file->iter += 4; } } break; case 0x59: { int c; c = midi_file->iter[0]; midi_file->iter += 1; if(c == 0x02){ /* key signature */ midi_file->iter += 2; } } break; case 0x7f: { /* sequencer meta event */ midi_file->iter += 3; } break; default: { /* misc */ } } } break; default: g_warning("bad byte"); break; } } } /* return value */ length = midi_file->iter - start; if(buffer_length != NULL){ *buffer_length = length; } data = malloc(length * sizeof(unsigned char)); memcpy(data, start, length * sizeof(unsigned char)); return(data); } void ags_midi_file_write_track_data(AgsMidiFile *midi_file, unsigned char *buffer, guint length) { guint i; if(midi_file == NULL){ return; } if(&(midi_file->iter[length]) >= &(midi_file->buffer[midi_file->buffer_length])){ size_t new_length; new_length = &(midi_file->iter[length]) - &(midi_file->buffer[midi_file->buffer_length]); midi_file->buffer = (unsigned char *) realloc(midi_file->buffer, new_length * sizeof(unsigned char)); midi_file->buffer_length = new_length; } for(i = 0; i < length; i++){ midi_file->iter[i] = buffer[i]; } midi_file->iter += length; } AgsMidiFile* ags_midi_file_new(gchar *filename) { AgsMidiFile *midi_file; midi_file = (AgsMidiFile *) g_object_new(AGS_TYPE_MIDI_FILE, "filename", filename, NULL); return(midi_file); } gsequencer-1.4.24/ags/audio/midi/ags_midi_builder.h0000644000175000017500000002351413246707333017131 00000000000000/* 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 . */ #ifndef __AGS_MIDI_BUILDER_H__ #define __AGS_MIDI_BUILDER_H__ #include #include #include #include #include #include #define AGS_TYPE_MIDI_BUILDER (ags_midi_builder_get_type ()) #define AGS_MIDI_BUILDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIDI_BUILDER, AgsMidiBuilder)) #define AGS_MIDI_BUILDER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MIDI_BUILDER, AgsMidiBuilderClass)) #define AGS_IS_MIDI_BUILDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MIDI_BUILDER)) #define AGS_IS_MIDI_BUILDER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MIDI_BUILDER)) #define AGS_MIDI_BUILDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_MIDI_BUILDER, AgsMidiBuilderClass)) #define AGS_MIDI_BUILDER_HEADER(ptr) ((AgsMidiBuilderHeader *)(ptr)) #define AGS_MIDI_BUILDER_TRACK(ptr) ((AgsMidiBuilderTrack *)(ptr)) typedef struct _AgsMidiBuilder AgsMidiBuilder; typedef struct _AgsMidiBuilderClass AgsMidiBuilderClass; typedef struct _AgsMidiBuilderHeader AgsMidiBuilderHeader; typedef struct _AgsMidiBuilderTrack AgsMidiBuilderTrack; typedef enum{ AGS_MIDI_BUILDER_EOF = 1, AGS_MIDI_BUILDER_EOT = 1 << 1, }AgsMidiBuilderFlags; struct _AgsMidiBuilder { GObject gobject; guint flags; unsigned char *data; guint length; FILE *file; AgsMidiBuilderHeader *midi_header; GList *midi_track; AgsMidiBuilderTrack *current_midi_track; }; struct _AgsMidiBuilderClass { GObjectClass gobject; void (*midi_putc)(AgsMidiBuilder *midi_builder, gint c); void (*on_error)(AgsMidiBuilder *midi_builder, GError **error); /* channel messages */ void (*append_header)(AgsMidiBuilder *midi_builder, guint offset, guint format, guint track_count, guint division, guint times, guint bpm, guint clicks); void (*append_track)(AgsMidiBuilder *midi_builder, gchar *track_name); void (*append_key_on)(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity); void (*append_key_off)(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity); void (*append_key_pressure)(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint pressure); void (*append_change_parameter)(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint control, guint value); void (*append_change_pitch_bend)(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pitch, guint transmitter); void (*append_change_program)(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint program); void (*append_change_pressure)(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pressure); /* sysex and system common */ void (*append_sysex)(AgsMidiBuilder *midi_builder, guint delta_time, unsigned char *sysex_data, guint length); void (*append_quarter_frame)(AgsMidiBuilder *midi_builder, guint delta_time, guint message_type, guint values); void (*append_song_position)(AgsMidiBuilder *midi_builder, guint delta_time, guint song_position); void (*append_song_select)(AgsMidiBuilder *midi_builder, guint delta_time, guint song_select); void (*append_tune_request)(AgsMidiBuilder *midi_builder, guint delta_time); /* meta events */ void (*append_sequence_number)(AgsMidiBuilder *midi_builder, guint delta_time, guint sequence); void (*append_smtpe)(AgsMidiBuilder *midi_builder, guint delta_time, guint rr, guint hr, guint mn, guint se, guint fr); void (*append_tempo)(AgsMidiBuilder *midi_builder, guint delta_time, guint tempo); void (*append_time_signature)(AgsMidiBuilder *midi_builder, guint delta_time, guint nn, guint dd, guint cc, guint bb); void (*append_key_signature)(AgsMidiBuilder *midi_builder, guint delta_time, guint sf, guint mi); void (*append_sequencer_meta_event)(AgsMidiBuilder *midi_builder, guint delta_time, guint len, guint id, guint data); void (*append_text_event)(AgsMidiBuilder *midi_builder, guint delta_time, gchar *text, guint length); }; struct _AgsMidiBuilderHeader { guint offset; guint format; guint count; guint division; guint times; guint beat; guint clicks; unsigned char *data; guint length; }; struct _AgsMidiBuilderTrack { AgsMidiBuilder *midi_builder; guint offset; gchar *track_name; guint64 absolute_time; unsigned char *data; guint length; }; GType ags_midi_builder_get_type(void); AgsMidiBuilderHeader* ags_midi_builder_header_alloc(); void ags_midi_builder_header_free(AgsMidiBuilderHeader *midi_builder_header); AgsMidiBuilderTrack* ags_midi_builder_track_alloc(); void ags_midi_builder_track_free(AgsMidiBuilderTrack *midi_builder_track); GList* ags_midi_builder_track_find_delta_time_with_track_name(GList *midi_builder_track, guint64 absolute_time, gchar *track_name); void ags_midi_builder_track_insert_midi_message(AgsMidiBuilderTrack *midi_builder_track, unsigned char *buffer, guint length); unsigned char* ags_midi_builder_track_get_delta_time_offset(AgsMidiBuilderTrack *midi_builder_track, guint64 absolute_time); /* low-level IO */ void ags_midi_builder_midi_putc(AgsMidiBuilder *midi_builder, gint c); void ags_midi_builder_on_error(AgsMidiBuilder *midi_builder, GError **error); /* channel messages */ void ags_midi_builder_append_header(AgsMidiBuilder *midi_builder, guint offset, guint format, guint track_count, guint division, guint times, guint bpm, guint clicks); void ags_midi_builder_append_track(AgsMidiBuilder *midi_builder, gchar *track_name); void ags_midi_builder_append_key_on(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity); void ags_midi_builder_append_key_off(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity); void ags_midi_builder_append_key_pressure(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint pressure); void ags_midi_builder_append_change_parameter(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint control, guint value); void ags_midi_builder_append_change_pitch_bend(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pitch, guint transmitter); void ags_midi_builder_append_change_program(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint program); void ags_midi_builder_append_change_pressure(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pressure); /* sysex and system common */ void ags_midi_builder_append_sysex(AgsMidiBuilder *midi_builder, guint delta_time, unsigned char *sysex_data, guint length); void ags_midi_builder_append_quarter_frame(AgsMidiBuilder *midi_builder, guint delta_time, guint message_type, guint values); void ags_midi_builder_append_song_position(AgsMidiBuilder *midi_builder, guint delta_time, guint song_position); void ags_midi_builder_append_song_select(AgsMidiBuilder *midi_builder, guint delta_time, guint song_select); void ags_midi_builder_append_tune_request(AgsMidiBuilder *midi_builder, guint delta_time); /* meta events */ void ags_midi_builder_append_sequence_number(AgsMidiBuilder *midi_builder, guint delta_time, guint sequence); void ags_midi_builder_append_smtpe(AgsMidiBuilder *midi_builder, guint delta_time, guint rr, guint hr, guint mn, guint se, guint fr); void ags_midi_builder_append_tempo(AgsMidiBuilder *midi_builder, guint delta_time, guint tempo); void ags_midi_builder_append_time_signature(AgsMidiBuilder *midi_builder, guint delta_time, guint nn, guint dd, guint cc, guint bb); void ags_midi_builder_append_key_signature(AgsMidiBuilder *midi_builder, guint delta_time, guint sf, guint mi); void ags_midi_builder_append_sequencer_meta_event(AgsMidiBuilder *midi_builder, guint delta_time, guint len, guint id, guint data); void ags_midi_builder_append_text_event(AgsMidiBuilder *midi_builder, guint delta_time, gchar *text, guint length); /* */ void ags_midi_builder_append_xml_node(AgsMidiBuilder *midi_builder, xmlNode *node); void ags_midi_builder_from_xml_doc(AgsMidiBuilder *midi_builder, xmlDoc *doc); /* */ void ags_midi_builder_build(AgsMidiBuilder *midi_builder); /* */ AgsMidiBuilder* ags_midi_builder_new(FILE *file); #endif /*__AGS_MIDI_BUILDER_H__*/ gsequencer-1.4.24/ags/audio/midi/ags_midi_parser.h0000644000175000017500000001542713256163135017000 00000000000000/* 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 . */ #ifndef __AGS_MIDI_PARSER_H__ #define __AGS_MIDI_PARSER_H__ #include #include #include #include #include #include #define AGS_TYPE_MIDI_PARSER (ags_midi_parser_get_type ()) #define AGS_MIDI_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MIDI_PARSER, AgsMidiParser)) #define AGS_MIDI_PARSER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MIDI_PARSER, AgsMidiParserClass)) #define AGS_IS_MIDI_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_MIDI_PARSER)) #define AGS_IS_MIDI_PARSER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_MIDI_PARSER)) #define AGS_MIDI_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_MIDI_PARSER, AgsMidiParserClass)) #define AGS_MIDI_PARSER_MAX_TEXT_LENGTH (4096) #define AGS_MIDI_PARSER_MTHD "MThd\0" #define AGS_MIDI_PARSER_MTCK "MTrk\0" #define AGS_MIDI_EVENT "event\0" typedef struct _AgsMidiParser AgsMidiParser; typedef struct _AgsMidiParserClass AgsMidiParserClass; typedef enum{ AGS_MIDI_PARSER_EOF = 1, AGS_MIDI_PARSER_EOT = 1 << 1, }AgsMidiParserFlags; typedef enum{ AGS_MIDI_CHUNK_HEADER = 1, AGS_MIDI_CHUNK_TRACK = 1 << 1, AGS_MIDI_CHUNK_UNKNOWN = 1 << 2, }AgsMidiChunkFlags; struct _AgsMidiParser { GObject gobject; guint flags; FILE *file; guint nth_chunk; unsigned char *buffer; size_t file_length; size_t offset; guint current_time; unsigned char current_status; xmlDoc *doc; }; struct _AgsMidiParserClass { GObjectClass gobject; int (*midi_getc)(AgsMidiParser *midi_parser); void (*on_error)(AgsMidiParser *midi_parser, GError **error); xmlDoc* (*parse_full)(AgsMidiParser *midi_parser); xmlNode* (*parse_bytes)(AgsMidiParser *midi_parser, unsigned char *midi_buffer, guint buffer_length); xmlNode* (*parse_header)(AgsMidiParser *midi_parser); xmlNode* (*parse_track)(AgsMidiParser *midi_parser); xmlNode* (*key_on)(AgsMidiParser *midi_parser, guint status); xmlNode* (*key_off)(AgsMidiParser *midi_parser, guint status); xmlNode* (*key_pressure)(AgsMidiParser *midi_parser, guint status); xmlNode* (*change_parameter)(AgsMidiParser *midi_parser, guint status); xmlNode* (*change_pitch_bend)(AgsMidiParser *midi_parser, guint status); xmlNode* (*change_program)(AgsMidiParser *midi_parser, guint status); xmlNode* (*change_channel_pressure)(AgsMidiParser *midi_parser, guint status); xmlNode* (*not_defined)(AgsMidiParser *midi_parser, guint status); xmlNode* (*sysex)(AgsMidiParser *midi_parser, guint status); xmlNode* (*system_common)(AgsMidiParser *midi_parser, guint status); xmlNode* (*meta_event)(AgsMidiParser *midi_parser, guint status); xmlNode* (*sequence_number)(AgsMidiParser *midi_parser, guint meta_type); xmlNode* (*end_of_track)(AgsMidiParser *midi_parser, guint meta_type); xmlNode* (*smtpe)(AgsMidiParser *midi_parser, guint meta_type); xmlNode* (*tempo)(AgsMidiParser *midi_parser, guint meta_type); xmlNode* (*time_signature)(AgsMidiParser *midi_parser, guint meta_type); xmlNode* (*key_signature)(AgsMidiParser *midi_parser, guint meta_type); xmlNode* (*sequencer_meta_event)(AgsMidiParser *midi_parser, guint meta_type); xmlNode* (*text_event)(AgsMidiParser *midi_parser, guint meta_type); }; GType ags_midi_parser_get_type(void); gint16 ags_midi_parser_read_gint16(AgsMidiParser *midi_parser); gint32 ags_midi_parser_read_gint24(AgsMidiParser *midi_parser); gint32 ags_midi_parser_read_gint32(AgsMidiParser *midi_parser); long ags_midi_parser_read_varlength(AgsMidiParser *midi_parser); gchar* ags_midi_parser_read_text(AgsMidiParser *midi_parser, gint length); gdouble ags_midi_parser_ticks_to_sec(AgsMidiParser *midi_parser, guint ticks, gint division, guint tempo); int ags_midi_parser_midi_getc(AgsMidiParser *midi_parser); void ags_midi_parser_on_error(AgsMidiParser *midi_parser, GError **error); xmlDoc* ags_midi_parser_parse_full(AgsMidiParser *midi_parser); xmlNode* ags_midi_parser_parse_bytes(AgsMidiParser *midi_parser, unsigned char *midi_buffer, guint buffer_length); xmlNode* ags_midi_parser_parse_header(AgsMidiParser *midi_parser); xmlNode* ags_midi_parser_parse_track(AgsMidiParser *midi_parser); xmlNode* ags_midi_parser_channel_message(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_key_on(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_key_off(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_key_pressure(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_change_parameter(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_change_pitch_bend(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_change_program(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_change_channel_pressure(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_not_defined(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_sysex(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_system_common(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_meta_event(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_sequence_number(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_end_of_track(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_smtpe(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_tempo(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_time_signature(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_key_signature(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_sequencer_meta_event(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_meta_misc(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_text_event(AgsMidiParser *midi_parser, guint meta_type); AgsMidiParser* ags_midi_parser_new(FILE *file); #endif /*__AGS_MIDI_PARSER_H__*/ gsequencer-1.4.24/ags/audio/midi/ags_midi_util.h0000644000175000017500000000636013246707333016460 00000000000000/* 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 . */ #ifndef __AGS_MIDI_UTIL_H__ #define __AGS_MIDI_UTIL_H__ #include #include #include /* real-time channel message utility */ gboolean ags_midi_util_is_key_on(unsigned char *buffer); gboolean ags_midi_util_is_key_off(unsigned char *buffer); gboolean ags_midi_util_is_key_pressure(unsigned char *buffer); gboolean ags_midi_util_is_change_parameter(unsigned char *buffer); gboolean ags_midi_util_is_pitch_bend(unsigned char *buffer); gboolean ags_midi_util_is_change_program(unsigned char *buffer); gboolean ags_midi_util_is_change_pressure(unsigned char *buffer); /* real-time sysex utility */ gboolean ags_midi_util_is_sysex(unsigned char *buffer); /* real-time system common utility */ gboolean ags_midi_util_is_quarter_frame(unsigned char *buffer); gboolean ags_midi_util_is_song_position(unsigned char *buffer); gboolean ags_midi_util_is_song_select(unsigned char *buffer); gboolean ags_midi_util_is_tune_request(unsigned char *buffer); /* real-time meta event utility */ gboolean ags_midi_util_is_meta_event(unsigned char *buffer); /* */ unsigned char* ags_midi_util_to_smf(unsigned char *midi_buffer, guint buffer_length, glong delta_time, guint *smf_buffer_length); /* */ glong ags_midi_util_envelope_to_velocity(AgsComplex *attack, AgsComplex *decay, AgsComplex *sustain, AgsComplex *release, AgsComplex *ratio, guint samplerate, guint start_frame, guint end_frame); void ags_midi_util_velocity_to_envelope(glong delta_time, gboolean is_release, AgsComplex **attack, AgsComplex **decay, AgsComplex **sustain, AgsComplex **release, AgsComplex **ratio, guint *samplerate, guint *start_frame, guint *end_frame); glong ags_midi_util_envelope_to_pressure(AgsComplex *attack, AgsComplex *decay, AgsComplex *sustain, AgsComplex *release, AgsComplex *ratio, guint samplerate, guint start_frame, guint end_frame); void ags_midi_util_pressure_to_envelope(glong delta_time, gboolean is_sustain, AgsComplex **attack, AgsComplex **decay, AgsComplex **sustain, AgsComplex **release, AgsComplex **ratio, guint *samplerate, guint *start_frame, guint *end_frame); guint ags_midi_util_delta_time_to_offset(glong division, glong tempo, glong bpm, glong delta_time); glong ags_midi_util_offset_to_delta_time(glong division, glong tempo, glong bpm, guint x); #endif /*__AGS_MIDI_UTIL_H__*/ gsequencer-1.4.24/ags/audio/midi/ags_midi_parser.c0000644000175000017500000016766613256163135017010 00000000000000/* 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 . */ #include #include #include #include #include #include void ags_midi_parser_class_init(AgsMidiParserClass *midi_parser); void ags_midi_parser_init(AgsMidiParser *midi_parser); void ags_midi_parser_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_midi_parser_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_midi_parser_finalize(GObject *gobject); int ags_midi_parser_real_midi_getc(AgsMidiParser *midi_parser); void ags_midi_parser_real_on_error(AgsMidiParser *midi_parser, GError **error); xmlDoc* ags_midi_parser_real_parse_full(AgsMidiParser *midi_parser); xmlNode* ags_midi_parser_real_parse_header(AgsMidiParser *midi_parser); xmlNode* ags_midi_parser_real_parse_track(AgsMidiParser *midi_parser); xmlNode* ags_midi_parser_real_key_on(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_key_off(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_key_pressure(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_change_parameter(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_change_pitch_bend(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_change_program(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_change_channel_pressure(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_not_defined(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_sysex(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_system_common(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_meta_event(AgsMidiParser *midi_parser, guint status); xmlNode* ags_midi_parser_real_sequence_number(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_real_end_of_track(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_real_smtpe(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_real_tempo(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_real_time_signature(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_real_key_signature(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_real_sequencer_meta_event(AgsMidiParser *midi_parser, guint meta_type); xmlNode* ags_midi_parser_real_text_event(AgsMidiParser *midi_parser, guint meta_type); /** * SECTION:ags_midi_parser * @short_description: the menu bar. * @title: AgsMidiParser * @section_id: * @include: ags/audio/midi/ags_midi_parser.h * * #AgsMidiParser reads your midi parsers. */ enum{ PROP_0, PROP_FILE, }; enum{ MIDI_GETC, ON_ERROR, PARSE_FULL, PARSE_BYTES, PARSE_HEADER, PARSE_TRACK, KEY_ON, KEY_OFF, KEY_PRESSURE, CHANGE_PARAMETER, CHANGE_PITCH_BEND, CHANGE_PROGRAM, CHANGE_CHANNEL_PRESSURE, NOT_DEFINED, SYSEX, SYSTEM_COMMON, META_EVENT, SEQUENCE_NUMBER, END_OF_TRACK, SMTPE, TEMPO, TIME_SIGNATURE, KEY_SIGNATURE, SEQUENCER_META_EVENT, TEXT_EVENT, LAST_SIGNAL, }; static gpointer ags_midi_parser_parent_class = NULL; static guint midi_parser_signals[LAST_SIGNAL]; GType ags_midi_parser_get_type(void) { static GType ags_type_midi_parser = 0; if(!ags_type_midi_parser){ static const GTypeInfo ags_midi_parser_info = { sizeof (AgsMidiParserClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_midi_parser_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMidiParser), 0, /* n_preallocs */ (GInstanceInitFunc) ags_midi_parser_init, }; ags_type_midi_parser = g_type_register_static(G_TYPE_OBJECT, "AgsMidiParser", &ags_midi_parser_info, 0); } return(ags_type_midi_parser); } void ags_midi_parser_class_init(AgsMidiParserClass *midi_parser) { GObjectClass *gobject; GParamSpec *param_spec; ags_midi_parser_parent_class = g_type_class_peek_parent(midi_parser); /* GObjectClass */ gobject = (GObjectClass *) midi_parser; gobject->set_property = ags_midi_parser_set_property; gobject->get_property = ags_midi_parser_get_property; gobject->finalize = ags_midi_parser_finalize; /** * AgsMidiParser:file: * * The file to parse data from. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("file", i18n_pspec("the file stream"), i18n_pspec("The file stream to parse"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILE, param_spec); /* AgsMidiParser */ midi_parser->midi_getc = ags_midi_parser_real_midi_getc; midi_parser->on_error = ags_midi_parser_real_on_error; midi_parser->parse_full = ags_midi_parser_real_parse_full; midi_parser->parse_header = ags_midi_parser_real_parse_header; midi_parser->parse_track = ags_midi_parser_real_parse_track; midi_parser->key_on = ags_midi_parser_real_key_on; midi_parser->key_off = ags_midi_parser_real_key_off; midi_parser->key_pressure = ags_midi_parser_real_key_pressure; midi_parser->change_parameter = ags_midi_parser_real_change_parameter; midi_parser->change_pitch_bend = ags_midi_parser_real_change_pitch_bend; midi_parser->change_program = ags_midi_parser_real_change_program; midi_parser->change_channel_pressure = ags_midi_parser_real_change_channel_pressure; midi_parser->not_defined = ags_midi_parser_real_not_defined; midi_parser->sysex = ags_midi_parser_real_sysex; midi_parser->system_common = ags_midi_parser_real_system_common; midi_parser->meta_event = ags_midi_parser_real_meta_event; midi_parser->sequence_number = ags_midi_parser_real_sequence_number; midi_parser->end_of_track = ags_midi_parser_real_end_of_track; midi_parser->smtpe = ags_midi_parser_real_smtpe; midi_parser->tempo = ags_midi_parser_real_tempo; midi_parser->time_signature = ags_midi_parser_real_time_signature; midi_parser->key_signature = ags_midi_parser_real_key_signature; midi_parser->sequencer_meta_event = ags_midi_parser_real_sequencer_meta_event; midi_parser->text_event = ags_midi_parser_real_text_event; /* signals */ /** * AgsMidiParser::midi-getc: * @midi_parser: the parser * * The ::midi-getc signal is emited during parsing of event. * * Returns: The character read * * Since: 1.0.0 */ midi_parser_signals[MIDI_GETC] = g_signal_new("midi-getc", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, midi_getc), NULL, NULL, g_cclosure_user_marshal_INT__VOID, G_TYPE_INT, 0); /** * AgsMidiParser::on-error: * @midi_parser: the parser * * The ::on-error signal is emited as error occurs. * * Since: 1.0.0 */ midi_parser_signals[ON_ERROR] = g_signal_new("on-error", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, on_error), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsMidiParser::parse-full: * @midi_parser: the parser * * The ::parse-full signal is emited during parsing of midi file. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[PARSE_FULL] = g_signal_new("parse-full", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, parse_full), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); /** * AgsMidiParser::parse-bytes: * @midi_parser: the parser * @buffer: the MIDI data * @buffer_length: the buffer's length * * The ::parse-bytes signal is emited during parsing of bytes. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[PARSE_BYTES] = g_signal_new("parse-bytes", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, parse_bytes), NULL, NULL, g_cclosure_user_marshal_POINTER__POINTER_UINT, G_TYPE_POINTER, 2, G_TYPE_POINTER, G_TYPE_UINT); /** * AgsMidiParser::parse-header: * @midi_parser: the parser * * The ::parse-header signal is emited during parsing of header. * * Returns: The XML node representing the header * * Since: 1.0.0 */ midi_parser_signals[PARSE_HEADER] = g_signal_new("parse-header", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, parse_header), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); /** * AgsMidiParser::parse-track: * @midi_parser: the parser * * The ::parse-track signal is emited during parsing of track. * * Returns: The XML node representing the track * * Since: 1.0.0 */ midi_parser_signals[PARSE_TRACK] = g_signal_new("parse-track", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, parse_track), NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0); /** * AgsMidiParser::key-on: * @midi_parser: the parser * * The ::key-on signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[KEY_ON] = g_signal_new("key-on", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, key_on), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::key-off: * @midi_parser: the parser * * The ::key-off signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[KEY_OFF] = g_signal_new("key-off", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, key_off), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::key-pressure: * @midi_parser: the parser * * The ::key-pressure signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[KEY_PRESSURE] = g_signal_new("key-pressure", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, key_pressure), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::change-parameter: * @midi_parser: the parser * * The ::change-parameter signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[CHANGE_PARAMETER] = g_signal_new("change-parameter", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, change_parameter), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::change-pitch-bend: * @midi_parser: the parser * * The ::change-pitch-bend signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[CHANGE_PITCH_BEND] = g_signal_new("change-pitch-bend", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, change_pitch_bend), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::change-program: * @midi_parser: the parser * * The ::change-program signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[CHANGE_PROGRAM] = g_signal_new("change-program", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, change_program), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::change-channel-pressure: * @midi_parser: the parser * * The ::change-channel-pressure signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[CHANGE_CHANNEL_PRESSURE] = g_signal_new("change-channel-pressure", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, change_channel_pressure), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::not-defined: * @midi_parser: the parser * * The ::not-defined signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[NOT_DEFINED] = g_signal_new("not-defined", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, not_defined), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::sysex: * @midi_parser: the parser * * The ::sysex signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[SYSEX] = g_signal_new("sysex", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, sysex), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::system-common: * @midi_parser: the parser * * The ::system-common signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[SYSTEM_COMMON] = g_signal_new("system-common", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, system_common), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::meta-event: * @midi_parser: the parser * * The ::meta-event signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[META_EVENT] = g_signal_new("meta-event", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, meta_event), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::sequence-number: * @midi_parser: the parser * * The ::sequence-number signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[SEQUENCE_NUMBER] = g_signal_new("sequence-number", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, sequence_number), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::end-of-track: * @midi_parser: the parser * * The ::end-of-track signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[END_OF_TRACK] = g_signal_new("end-of-track", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, end_of_track), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::smtpe: * @midi_parser: the parser * * The ::smtpe signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[SMTPE] = g_signal_new("smtpe", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, smtpe), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::tempo: * @midi_parser: the parser * * The ::tempo signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[TEMPO] = g_signal_new("tempo", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, tempo), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::time-signature: * @midi_parser: the parser * * The ::time-signature signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[TIME_SIGNATURE] = g_signal_new("time-signature", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, time_signature), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::key-signature: * @midi_parser: the parser * * The ::key-signature signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[KEY_SIGNATURE] = g_signal_new("key-signature", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, key_signature), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::sequencer-meta-event: * @midi_parser: the parser * * The ::sequencer-meta-event signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[SEQUENCER_META_EVENT] = g_signal_new("sequencer-meta-event", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, sequencer_meta_event), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); /** * AgsMidiParser::text-event: * @midi_parser: the parser * * The ::text-event signal is emited during parsing of event. * * Returns: The XML node representing the event * * Since: 1.0.0 */ midi_parser_signals[TEXT_EVENT] = g_signal_new("text-event", G_TYPE_FROM_CLASS(midi_parser), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiParserClass, text_event), NULL, NULL, g_cclosure_user_marshal_POINTER__UINT, G_TYPE_POINTER, 1, G_TYPE_UINT); } void ags_midi_parser_init(AgsMidiParser *midi_parser) { midi_parser->flags = 0; midi_parser->file = NULL; midi_parser->nth_chunk = 0; midi_parser->file_length = 0; midi_parser->offset = 0; midi_parser->current_time = 0; midi_parser->current_status = 0x0; midi_parser->doc = NULL; } void ags_midi_parser_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMidiParser *midi_parser; midi_parser = AGS_MIDI_PARSER(gobject); switch(prop_id){ case PROP_FILE: { struct stat sb; midi_parser->file = g_value_get_pointer(value); fstat(fileno(midi_parser->file), &sb); midi_parser->file_length = sb.st_size; midi_parser->buffer = (unsigned char *) malloc(midi_parser->file_length * sizeof(unsigned char)); fread(midi_parser->buffer, sizeof(unsigned char), midi_parser->file_length, midi_parser->file); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_parser_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMidiParser *midi_parser; midi_parser = AGS_MIDI_PARSER(gobject); switch(prop_id){ case PROP_FILE: { g_value_set_pointer(value, midi_parser->file); } default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_parser_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_midi_parser_parent_class)->finalize(gobject); } /** * ags_midi_parser_read_gint16: * @midi_parser: the #AgsMidiParser * * Read gint16. * * Returns: the read gint16 * * Since: 1.0.0 */ gint16 ags_midi_parser_read_gint16(AgsMidiParser *midi_parser) { char str[2]; gint16 value = 0; str[0] = (char) 0xff & ags_midi_parser_midi_getc(midi_parser); str[1] = (char) 0xff & ags_midi_parser_midi_getc(midi_parser); value = (str[0] & 0xff); value = (value<<8) + (str[1] & 0xff); return(value); } /** * ags_midi_parser_read_gint24: * @midi_parser: the #AgsMidiParser * * Read gint32. * * Returns: the read gint32 * * Since: 1.0.0 */ gint32 ags_midi_parser_read_gint24(AgsMidiParser *midi_parser) { char str[4]; gint32 value = 0; str[0] = (char) 0x00; str[1] = (char) 0xff & ags_midi_parser_midi_getc(midi_parser); str[2] = (char) 0xff & ags_midi_parser_midi_getc(midi_parser); str[3] = (char) 0xff & ags_midi_parser_midi_getc(midi_parser); value = (value<<8) + (str[1] & 0xff); value = (value<<8) + (str[2] & 0xff); value = (value<<8) + (str[3] & 0xff); return(value); } /** * ags_midi_parser_read_gint32: * @midi_parser: the #AgsMidiParser * * Read gint32. * * Returns: the read gint32 * * Since: 1.0.0 */ gint32 ags_midi_parser_read_gint32(AgsMidiParser *midi_parser) { char str[4]; gint32 value; str[0] = (char) 0xff & ags_midi_parser_midi_getc(midi_parser); str[1] = (char) 0xff & ags_midi_parser_midi_getc(midi_parser); str[2] = (char) 0xff & ags_midi_parser_midi_getc(midi_parser); str[3] = (char) 0xff & ags_midi_parser_midi_getc(midi_parser); value = (str[0] & 0xff); value = (value<<8) + (str[1] & 0xff); value = (value<<8) + (str[2] & 0xff); value = (value<<8) + (str[3] & 0xff); return(value); } /** * ags_midi_parser_read_varlength: * @midi_parser: the #AgsMidiParser * * Read varlength as long. * * Returns: the read varlength * * Since: 1.0.0 */ long ags_midi_parser_read_varlength(AgsMidiParser *midi_parser) { long value; guint i; unsigned char c; c = ags_midi_parser_midi_getc(midi_parser); value = c; i = 1; if(0x80 & c){ value &= 0x7F; do{ c = ags_midi_parser_midi_getc(midi_parser); value = (value << 7) + (0x7F & (c)); i++; }while(0x80 & c); } return(value); } /** * ags_midi_parser_read_text: * @midi_parser: the #AgsMidiParser * @length: the length * * Read text. * * Returns: the text read as string * * Since: 1.0.0 */ gchar* ags_midi_parser_read_text(AgsMidiParser *midi_parser, gint length) { gchar text[AGS_MIDI_PARSER_MAX_TEXT_LENGTH + 1]; gchar c; guint i; memset(text, 0, AGS_MIDI_PARSER_MAX_TEXT_LENGTH * sizeof(char)); i = 0; while((length <= 0 || i < length) && (AGS_MIDI_PARSER_EOF & (midi_parser->flags)) == 0){ (c = (char) 0xff & (ags_midi_parser_midi_getc(midi_parser))); if(c == '\0' || !(g_ascii_isalnum(c) || g_ascii_ispunct(c) || c == ' ')){ break; } text[i] = c; i++; } text[i] = '\0'; return(g_strdup(text)); } /** * ags_midi_parser_ticks_to_sec: * @midi_parser: the #AgsMidiParser * @ticks: the ticks count * @division: the division * @tempo: the tempo * * Convert ticks to seconds. * * Returns: the seconds read from ticks * * Since: 1.0.0 */ gdouble ags_midi_parser_ticks_to_sec(AgsMidiParser *midi_parser, guint ticks, gint division, guint tempo) { gdouble retval; if(division > 0){ retval = ((gdouble) ticks * tempo) / (gdouble) (division * 1000000.0); return(retval); }else{ gdouble smtpe_format, smtpe_resolution; smtpe_format = (gdouble) ((0xff00 & division) >> 8); smtpe_resolution = (gdouble) (0xff & division); retval = (((gdouble) ticks) / (gdouble) (smtpe_format * smtpe_resolution * 1000000.0)); return(retval); } } int ags_midi_parser_real_midi_getc(AgsMidiParser *midi_parser) { int c; if(midi_parser->file == NULL){ return(-1); } if(midi_parser->offset >= midi_parser->file_length){ midi_parser->flags |= AGS_MIDI_PARSER_EOF; return(-1); } c = (int) midi_parser->buffer[midi_parser->offset]; midi_parser->offset += 1; return(c); } /** * ags_midi_parser_midi_getc: * @midi_parser: the #AgsMidiParser * * Read one byte. * * Returns: the byte read * * Since: 1.0.0 */ int ags_midi_parser_midi_getc(AgsMidiParser *midi_parser) { int c; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), '\0'); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[MIDI_GETC], 0, &c); g_object_unref((GObject *) midi_parser); return(c); } void ags_midi_parser_real_on_error(AgsMidiParser *midi_parser, GError **error) { //TODO:JK: implement me } /** * ags_midi_parser_on_error: * @midi_parser: the #AgsMidiParser * @error: the return location of #GError-struct * * Error reporting. * * Since: 1.0.0 */ void ags_midi_parser_on_error(AgsMidiParser *midi_parser, GError **error) { g_return_if_fail(AGS_IS_MIDI_PARSER(midi_parser)); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[ON_ERROR], 0, error); g_object_unref((GObject *) midi_parser); } xmlDoc* ags_midi_parser_real_parse_full(AgsMidiParser *midi_parser) { xmlDoc *doc; xmlNode *root_node; xmlNode *tracks_node; xmlNode *current; /* create xmlDoc and set root node */ midi_parser->doc = doc = xmlNewDoc("1.0"); root_node = xmlNewNode(NULL, "midi"); xmlDocSetRootElement(doc, root_node); /* create tracks node */ tracks_node = xmlNewNode(NULL, "midi-tracks"); /* parse header */ current = ags_midi_parser_parse_header(midi_parser); xmlAddChild(root_node, current); #ifdef AGS_DEBUG g_message("parsed header"); #endif /* parse tracks */ xmlAddChild(root_node, tracks_node); while(((AGS_MIDI_PARSER_EOF & (midi_parser->flags))) == 0){ current = ags_midi_parser_parse_track(midi_parser); if(current != NULL){ xmlAddChild(tracks_node, current); #ifdef AGS_DEBUG g_message("parsed track"); #endif }else{ g_warning("skipped input"); } } return(doc); } /** * ags_midi_parser_parse_full: * @midi_parser: the #AgsMidiParser * * Parse all data of #AgsMidiParser:file. * * Returns: the xmlDoc representing your MIDI file * * Since: 1.0.0 */ xmlDoc* ags_midi_parser_parse_full(AgsMidiParser *midi_parser) { xmlDoc *doc; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[PARSE_FULL], 0, &doc); g_object_unref((GObject *) midi_parser); return(doc); } xmlNode* ags_midi_parser_parse_bytes(AgsMidiParser *midi_parser, unsigned char *midi_buffer, guint buffer_length) { xmlNode *node; node = NULL; //TODO:JK: implement me return(node); } xmlNode* ags_midi_parser_real_parse_header(AgsMidiParser *midi_parser) { xmlNode *node; static gchar header[] = "MThd"; guint offset; guint format; guint count; guint division; guint beat, clicks; guint n; gchar c; /* read header */ n = 0; while(n < 4 && (AGS_MIDI_PARSER_EOF & (midi_parser->flags)) == 0){ c = ags_midi_parser_midi_getc(midi_parser); if(c == header[n]){ n++; }else{ n = 0; } } node = xmlNewNode(NULL, "midi-header"); /* get some values */ offset = (guint) ags_midi_parser_read_gint32(midi_parser); format = (guint) ags_midi_parser_read_gint16(midi_parser); count = (guint) ags_midi_parser_read_gint16(midi_parser); division = (guint) ags_midi_parser_read_gint16(midi_parser); xmlNewProp(node, "offset", g_strdup_printf("%d", offset)); xmlNewProp(node, "format", g_strdup_printf("%d", format)); if(division & 0x8000){ /* SMTPE */ xmlNewProp(node, "division", g_strdup_printf("%d %d", -((-(division>>8))&0xff), division&0xff)); }else{ xmlNewProp(node, "division", g_strdup_printf("%d", division)); } if(format > 2){ g_warning("Can't deal with format %d files\n", format); return(NULL); } beat = clicks = division; xmlNewProp(node, "beat", g_strdup_printf("%d", beat)); xmlNewProp(node, "track-count", g_strdup_printf("%d", count)); return(node); } /** * ags_midi_parser_parse_header: * @midi_parser: the #AgsMidiParser * * Parse MIDI header * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_parse_header(AgsMidiParser *midi_parser) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[PARSE_HEADER], 0, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_parse_track(AgsMidiParser *midi_parser) { xmlNode *node, *current; static gchar track[] = "MTrk"; gint offset; long delta_time; guint status; guint n; gchar c; n = 0; while(n < 4 && (AGS_MIDI_PARSER_EOF & (midi_parser->flags)) == 0){ c = ags_midi_parser_midi_getc(midi_parser); if(c == track[n]){ n++; }else{ n = 0; } } if((AGS_MIDI_PARSER_EOF & (midi_parser->flags)) != 0){ return(NULL); } node = xmlNewNode(NULL, "midi-track"); offset = ags_midi_parser_read_gint32(midi_parser); #ifdef AGS_DEBUG g_message("n = %d\noffset = %d", n, offset); #endif if(offset < 0){ return(NULL); } midi_parser->current_time = 0; for(; midi_parser->offset < midi_parser->file_length; ){ delta_time = ags_midi_parser_read_varlength(midi_parser); midi_parser->current_time += (guint) delta_time; status = ags_midi_parser_midi_getc(midi_parser); if((0xf0 & status) == 0xf0){ #ifdef AGS_DEBUG g_message("status message"); #endif switch(status){ case 0xf0: { /* start of system exclusive */ ags_midi_parser_sysex(midi_parser, status); } break; case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: { ags_midi_parser_system_common(midi_parser, status); } break; case 0xf7: { /* sysex continuation or arbitrary stuff */ #ifdef AGS_DEBUG g_message("sysex end"); #endif } break; case 0xff: { /* meta event */ current = ags_midi_parser_meta_event(midi_parser, status); if(current != NULL){ xmlChar *str; xmlNewProp(current, "delta-time", g_strdup_printf("%d", midi_parser->current_time)); xmlAddChild(node, current); str = xmlGetProp(current, AGS_MIDI_EVENT); if(str != NULL && !g_ascii_strcasecmp(str, "end-of-track")){ return(node); } } } break; default: g_warning("bad byte"); } }else{ current = ags_midi_parser_channel_message(midi_parser, status); if(current != NULL){ xmlNewProp(current, "delta-time", g_strdup_printf("%u", midi_parser->current_time)); xmlAddChild(node, current); }else{ g_message("unknown channel message 0x%x", status); } #ifdef AGS_DEBUG g_message("channel message"); #endif } } return(node); } /** * ags_midi_parser_parse_track: * @midi_parser: the #AgsMidiParser * * Parse MIDI track. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_parse_track(AgsMidiParser *midi_parser) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[PARSE_TRACK], 0, &node); g_object_unref((GObject *) midi_parser); return(node); } /** * ags_midi_parser_channel_message: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse channel message. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_channel_message(AgsMidiParser *midi_parser, guint status) { xmlNode *node; node = NULL; #ifdef AGS_DEBUG g_message("channel message"); #endif ags_midi_parser_channel_message_CHECK: switch(status & 0xf0){ case 0x80: { node = ags_midi_parser_key_off(midi_parser, status); midi_parser->current_status = status; } break; case 0x90: { node = ags_midi_parser_key_on(midi_parser, status); midi_parser->current_status = status; } break; case 0xa0: { node = ags_midi_parser_key_pressure(midi_parser, status); midi_parser->current_status = status; } break; case 0xb0: { node = ags_midi_parser_change_parameter(midi_parser, status); midi_parser->current_status = status; } break; case 0xc0: { node = ags_midi_parser_change_program(midi_parser, status); midi_parser->current_status = status; } break; case 0xd0: { node = ags_midi_parser_change_channel_pressure(midi_parser, status); midi_parser->current_status = status; } break; case 0xe0: { node = ags_midi_parser_change_pitch_bend(midi_parser, status); midi_parser->current_status = status; } break; default: { if(midi_parser->current_status >= 0x80 && midi_parser->current_status <= 0xef){ #ifdef AGS_DEBUG g_message("repeat status=0x%x", midi_parser->current_status); #endif midi_parser->offset -= 1; status = midi_parser->current_status; goto ags_midi_parser_channel_message_CHECK; } } } return(node); } xmlNode* ags_midi_parser_real_key_on(AgsMidiParser *midi_parser, guint status) { xmlNode *node; int channel, note, velocity; #ifdef AGS_DEBUG g_message("key on"); #endif channel = 0xf & status; note = (0x7f) & ags_midi_parser_midi_getc(midi_parser); velocity = (0x7f) & ags_midi_parser_midi_getc(midi_parser); node = xmlNewNode(NULL, "midi-message"); xmlNewProp(node, AGS_MIDI_EVENT, "note-on"); xmlNewProp(node, "key", g_strdup_printf("%d", channel)); xmlNewProp(node, "note", g_strdup_printf("%d", note)); xmlNewProp(node, "velocity", g_strdup_printf("%d", velocity)); return(node); } /** * ags_midi_parser_key_on: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse key on. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_key_on(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[KEY_ON], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_key_off(AgsMidiParser *midi_parser, guint status) { xmlNode *node; int channel, note, velocity; #ifdef AGS_DEBUG g_message("key off"); #endif channel = 0xf & status; note = (0x7f) & ags_midi_parser_midi_getc(midi_parser); velocity = (0x7f) & ags_midi_parser_midi_getc(midi_parser); node = xmlNewNode(NULL, "midi-message"); xmlNewProp(node, AGS_MIDI_EVENT, "note-off"); xmlNewProp(node, "key", g_strdup_printf("%d", channel)); xmlNewProp(node, "note", g_strdup_printf("%d", note)); xmlNewProp(node, "velocity", g_strdup_printf("%d", velocity)); return(node); } /** * ags_midi_parser_key_off: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse key off. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_key_off(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[KEY_OFF], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_key_pressure(AgsMidiParser *midi_parser, guint status) { xmlNode *node; int channel, note, pressure; #ifdef AGS_DEBUG g_message("key pressure"); #endif channel = 0xf & status; note = 0x7f & ags_midi_parser_midi_getc(midi_parser); pressure = 0x7f & ags_midi_parser_midi_getc(midi_parser); node = xmlNewNode(NULL, "midi-message"); xmlNewProp(node, AGS_MIDI_EVENT, "polyphonic"); xmlNewProp(node, "key", g_strdup_printf("%d", channel)); xmlNewProp(node, "note", g_strdup_printf("%d", note)); xmlNewProp(node, "pressure", g_strdup_printf("%d", pressure)); return(node); } /** * ags_midi_parser_key_pressure: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse key pressure. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_key_pressure(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[KEY_PRESSURE], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_change_parameter(AgsMidiParser *midi_parser, guint status) { xmlNode *node; int channel, control, value; #ifdef AGS_DEBUG g_message("change parameter"); #endif channel = 0xf & status; control = 0x7f & ags_midi_parser_midi_getc(midi_parser); value = 0x7f & ags_midi_parser_midi_getc(midi_parser); node = xmlNewNode(NULL, "midi-message"); if(control < 120){ xmlNewProp(node, AGS_MIDI_EVENT, "change-parameter"); xmlNewProp(node, "channel", g_strdup_printf("%d", channel)); xmlNewProp(node, "control", g_strdup_printf("%d", control)); xmlNewProp(node, "value", g_strdup_printf("%d", value)); }else{ xmlNewProp(node, AGS_MIDI_EVENT, "change-mode"); xmlNewProp(node, "channel", g_strdup_printf("%d", channel)); switch(control){ case 120: { xmlNewProp(node, "mode", "all-sound-off"); } break; case 121: { xmlNewProp(node, "mode", "reset-control-all"); xmlNewProp(node, "value", g_strdup_printf("%d", value)); } break; case 122: { if(value == 0){ xmlNewProp(node, "mode", "local-control-off"); }else{ xmlNewProp(node, "mode", "local-control-on"); } } break; case 123: { xmlNewProp(node, "mode", "all-notes-off"); } break; case 124: { xmlNewProp(node, "mode", "omni-mode-on"); } break; case 125: { xmlNewProp(node, "mode", "omni-mode-off"); } break; case 126: { xmlNewProp(node, "mode", "mono-mode-on"); xmlNewProp(node, "omni-off-channels", g_strdup_printf("%d", value)); } break; case 127: { xmlNewProp(node, "mode", "poly-mode-on"); } break; } } return(node); } /** * ags_midi_parser_change_parameter: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse change parameter. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_change_parameter(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[CHANGE_PARAMETER], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_change_pitch_bend(AgsMidiParser *midi_parser, guint status) { xmlNode *node; int channel, pitch, transmitter; #ifdef AGS_DEBUG g_message("change pitch bend"); #endif channel = 0xf & status; pitch = 0x7f & ags_midi_parser_midi_getc(midi_parser); transmitter = 0x7f & ags_midi_parser_midi_getc(midi_parser); node = xmlNewNode(NULL, "midi-message"); xmlNewProp(node, "channel", g_strdup_printf("%d", channel)); xmlNewProp(node, AGS_MIDI_EVENT, "pitch-bend"); xmlNewProp(node, "pitch", g_strdup_printf("%d", pitch)); xmlNewProp(node, "transmitter", g_strdup_printf("%d", transmitter)); return(node); } /** * ags_midi_parser_change_pitch_bend: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse change pitch bend. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_change_pitch_bend(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[CHANGE_PITCH_BEND], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_change_program(AgsMidiParser *midi_parser, guint status) { xmlNode *node; int channel, program; #ifdef AGS_DEBUG g_message("change program"); #endif channel = 0xf & status; program = 0x7f & ags_midi_parser_midi_getc(midi_parser); node = xmlNewNode(NULL, "midi-message"); xmlNewProp(node, AGS_MIDI_EVENT, "program-change"); xmlNewProp(node, "channel", g_strdup_printf("%d", channel)); xmlNewProp(node, "program", g_strdup_printf("%d", program)); return(node); } /** * ags_midi_parser_change_program: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse change program. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_change_program(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[CHANGE_PROGRAM], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_change_channel_pressure(AgsMidiParser *midi_parser, guint status) { xmlNode *node; int channel, pressure; #ifdef AGS_DEBUG g_message("change channel pressure"); #endif channel = 0xf & status; pressure = 0x7f & ags_midi_parser_midi_getc(midi_parser); node = xmlNewNode(NULL, "midi-message"); xmlNewProp(node, AGS_MIDI_EVENT, "channel-pressure"); xmlNewProp(node, "channel", g_strdup_printf("%d", channel)); xmlNewProp(node, "pressure", g_strdup_printf("%d", pressure)); return(node); } /** * ags_midi_parser_change_channel_pressure: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse change channel pressure. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_change_channel_pressure(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[CHANGE_CHANNEL_PRESSURE], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_not_defined(AgsMidiParser *midi_parser, guint status) { #ifdef AGS_DEBUG g_message("not defined"); #endif return(NULL); } /** * ags_midi_parser_not_defined: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse not defined. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_not_defined(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[NOT_DEFINED], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_sysex(AgsMidiParser *midi_parser, guint status) { xmlNode *node; gchar c; while((c = ags_midi_parser_midi_getc(midi_parser)) != 0xf7 && (AGS_MIDI_PARSER_EOF & (midi_parser->flags)) == 0); #ifdef AGS_DEBUG g_message("discarded sysex"); #endif return(NULL); } /** * ags_midi_parser_sysex: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse sysex. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_sysex(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[SYSEX], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_system_common(AgsMidiParser *midi_parser, guint status) { xmlNode *node; int c; node = NULL; #ifdef AGS_DEBUG g_message("system common"); #endif switch(status){ case 0xf1: { guint quarter_frame; quarter_frame = 0xff & (ags_midi_parser_midi_getc(midi_parser)); node = xmlNewNode(NULL, "midi-system-common"); xmlNewProp(node, "quarter-frame", g_strdup_printf("%d", quarter_frame)); } break; case 0xf2: { guint song_position; song_position = 0x7f & (ags_midi_parser_midi_getc(midi_parser)) << 7; song_position |= 0x7f & (ags_midi_parser_midi_getc(midi_parser)); node = xmlNewNode(NULL, "midi-system-common"); xmlNewProp(node, "song-position", g_strdup_printf("%d", song_position)); } break; case 0xf3: { guint song_select; song_select = 0x7f & (ags_midi_parser_midi_getc(midi_parser)); node = xmlNewNode(NULL, "midi-system-common"); xmlNewProp(node, "song-select", g_strdup_printf("%d", song_select)); } break; case 0xf4: { #ifdef AGS_DEBUG g_message("undefined"); #endif } break; case 0xf5: { #ifdef AGS_DEBUG g_message("undefined"); #endif } break; case 0xf6: { #ifdef AGS_DEBUG g_message("tune request"); #endif } break; } return(node); } /** * ags_midi_parser_system_common: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse system common. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_system_common(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[SYSTEM_COMMON], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_meta_event(AgsMidiParser *midi_parser, guint status) { xmlNode *node; char chunk_meta_length[4]; guint meta_type; #ifdef AGS_DEBUG g_message("meta event"); #endif meta_type = 0xff & (ags_midi_parser_midi_getc(midi_parser)); node = NULL; switch(meta_type){ case 0x00: { int c; c = ags_midi_parser_midi_getc(midi_parser); if(c == 0x02){ node = ags_midi_parser_sequence_number(midi_parser, meta_type); } } break; case 0x01: /* Text event */ case 0x02: /* Copyright notice */ case 0x03: /* Sequence/Track name */ case 0x04: /* Instrument name */ case 0x05: /* Lyric */ case 0x06: /* Marker */ case 0x07: /* Cue point */ case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: { /* These are all text events */ node = ags_midi_parser_text_event(midi_parser, meta_type); } break; case 0x2f: { /* End of Track */ node = ags_midi_parser_end_of_track(midi_parser, meta_type); } break; case 0x51: { /* Set tempo */ node = ags_midi_parser_tempo(midi_parser, meta_type); } break; case 0x54: { node = ags_midi_parser_smtpe(midi_parser, meta_type); } break; case 0x58: { node = ags_midi_parser_time_signature(midi_parser, meta_type); } break; case 0x59: { node = ags_midi_parser_key_signature(midi_parser, meta_type); } break; case 0x7f: { node = ags_midi_parser_sequencer_meta_event(midi_parser, meta_type); } break; default: midi_parser->offset += 5; node = xmlNewNode(NULL, "midi-message"); xmlNewProp(node, AGS_MIDI_EVENT, "misc"); } #ifdef AGS_DEBUG g_message("meta type 0x%x", meta_type); #endif return(node); } /** * ags_midi_parser_meta_event: * @midi_parser: the #AgsMidiParser * @status: the status byte * * Parse meta event. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_meta_event(AgsMidiParser *midi_parser, guint status) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[META_EVENT], 0, status, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_sequence_number(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; guint sequence; #ifdef AGS_DEBUG g_message("sequence number"); #endif node = xmlNewNode(NULL, "midi-message"); sequence = (guint) ags_midi_parser_read_gint16(midi_parser); xmlNewProp(node, AGS_MIDI_EVENT, "sequence-number"); xmlNewProp(node, "sequence", g_strdup_printf("%d", sequence)); return(node); } /** * ags_midi_parser_sequence_number: * @midi_parser: the #AgsMidiParser * @meta_type: the meta type byte * * Parse sequence number. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_sequence_number(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[SEQUENCE_NUMBER], 0, meta_type, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_end_of_track(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; int length; #ifdef AGS_DEBUG g_message("EOT"); #endif node = xmlNewNode(NULL, "midi-message"); length = ags_midi_parser_midi_getc(midi_parser); xmlNewProp(node, AGS_MIDI_EVENT, "end-of-track"); return(node); } /** * ags_midi_parser_end_of_track: * @midi_parser: the #AgsMidiParser * @meta_type: the meta type byte * * Parse end of track. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_end_of_track(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[END_OF_TRACK], 0, meta_type, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_smtpe(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; int length; int rr, hr, mn, se, fr, ff; #ifdef AGS_DEBUG g_message("SMTPE"); #endif node = xmlNewNode(NULL, "midi-message"); length = ags_midi_parser_midi_getc(midi_parser); rr = hr = ags_midi_parser_midi_getc(midi_parser); rr = (0x60 & rr) >> 5; hr = (0x1f & hr); mn = 0xff & ags_midi_parser_midi_getc(midi_parser); se = 0xff & ags_midi_parser_midi_getc(midi_parser); fr = 0xff & ags_midi_parser_midi_getc(midi_parser); ff = 0xff & ags_midi_parser_midi_getc(midi_parser); xmlNewProp(node, AGS_MIDI_EVENT, "smtpe"); xmlNewProp(node, "rate", g_strdup_printf("%d", rr)); xmlNewProp(node, "timestamp", g_strdup_printf("%d %d %d %d", hr, mn, se, fr)); return(node); } /** * ags_midi_parser_smtpe: * @midi_parser: the #AgsMidiParser * @meta_type: the meta type byte * * Parse smtpe. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_smtpe(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[SMTPE], 0, meta_type, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_tempo(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; guint length; gint tempo; #ifdef AGS_DEBUG g_message("tempo"); #endif node = xmlNewNode(NULL, "midi-message"); length = 0xff & ags_midi_parser_midi_getc(midi_parser); tempo = ags_midi_parser_read_gint24(midi_parser); xmlNewProp(node, AGS_MIDI_EVENT, "tempo-number"); xmlNewProp(node, "tempo", g_strdup_printf("%d", tempo)); return(node); } /** * ags_midi_parser_tempo: * @midi_parser: the #AgsMidiParser * @meta_type: the meta type byte * * Parse tempo. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_tempo(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[TEMPO], 0, meta_type, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_time_signature(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; int length; int nn, dd, cc, bb; int denom = 1; #ifdef AGS_DEBUG g_message("time signature"); #endif node = xmlNewNode(NULL, "midi-message"); length = 0xff & ags_midi_parser_midi_getc(midi_parser); nn = 0xff & ags_midi_parser_midi_getc(midi_parser); dd = 0xff & ags_midi_parser_midi_getc(midi_parser); cc = 0xff & ags_midi_parser_midi_getc(midi_parser); bb = 0xff & ags_midi_parser_midi_getc(midi_parser); while(dd > 0){ denom *= 2; dd--; } xmlNewProp(node, AGS_MIDI_EVENT, "time-signature"); xmlNewProp(node, "timesig", g_strdup_printf("%d/%d %d %d", nn, denom, cc, bb)); return(node); } /** * ags_midi_parser_time_signature: * @midi_parser: the #AgsMidiParser * @meta_type: the meta type byte * * Parse time signature. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_time_signature(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[TIME_SIGNATURE], 0, meta_type, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_key_signature(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; int length; int sf, mi; #ifdef AGS_DEBUG g_message("key signature"); #endif node = xmlNewNode(NULL, "midi-message"); xmlNewProp(node, AGS_MIDI_EVENT, "key-signature"); length = ags_midi_parser_midi_getc(midi_parser); sf = ags_midi_parser_midi_getc(midi_parser); mi = ags_midi_parser_midi_getc(midi_parser); xmlNewProp(node, "keysig", g_strdup_printf("%d %s", (sf > 127 ? sf - 256: sf), (mi ? "minor": "major"))); return(node); } /** * ags_midi_parser_key_signature: * @midi_parser: the #AgsMidiParser * @meta_type: the meta type byte * * Parse key signature. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_key_signature(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[KEY_SIGNATURE], 0, meta_type, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_sequencer_meta_event(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; guint len, id, data; #ifdef AGS_DEBUG g_message("sequencer meta event"); #endif node = xmlNewNode(NULL, "midi-meta-event"); len = ags_midi_parser_midi_getc(midi_parser); id = ags_midi_parser_midi_getc(midi_parser); data = ags_midi_parser_midi_getc(midi_parser); xmlNewProp(node, "length", g_strdup_printf("%d", len)); xmlNewProp(node, "id", g_strdup_printf("%d", id)); xmlNewProp(node, "data", g_strdup_printf("%d", data)); return(node); } xmlNode* ags_midi_parser_sequencer_meta_event(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[META_EVENT], 0, meta_type, &node); g_object_unref((GObject *) midi_parser); return(node); } xmlNode* ags_midi_parser_real_text_event(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; gchar *text; guint text_length; #ifdef AGS_DEBUG g_message("text event"); #endif node = xmlNewNode(NULL, "midi-message"); //TODO:JK: verify me text_length = 0x7f & ags_midi_parser_midi_getc(midi_parser); text = ags_midi_parser_read_text(midi_parser, text_length); switch(0x0f & meta_type){ case 0x01: /* Text event */ xmlNewProp(node, "text", text); break; case 0x02: { /* Copyright notice */ xmlNewProp(node, "copyright", text); } break; case 0x03: { /* Sequence/Track name */ xmlNewProp(node, "sequence-name", text); } break; case 0x04: { /* Instrument name */ xmlNewProp(node, "instrument-name", text); } break; case 0x05: /* Lyric */ break; case 0x06: /* Marker */ break; case 0x07: /* Cue point */ break; case 0x08: break; case 0x09: break; case 0x0a: break; case 0x0b: break; case 0x0c: break; case 0x0d: break; case 0x0e: break; case 0x0f: break; default: g_warning("unknown text event"); } return(node); } /** * ags_midi_parser_text_event: * @midi_parser: the #AgsMidiParser * @meta_type: the meta type byte * * Parse text event. * * Returns: the xmlNode containing parsed data * * Since: 1.0.0 */ xmlNode* ags_midi_parser_text_event(AgsMidiParser *midi_parser, guint meta_type) { xmlNode *node; g_return_val_if_fail(AGS_IS_MIDI_PARSER(midi_parser), NULL); g_object_ref((GObject *) midi_parser); g_signal_emit(G_OBJECT(midi_parser), midi_parser_signals[TEXT_EVENT], 0, meta_type, &node); g_object_unref((GObject *) midi_parser); return(node); } AgsMidiParser* ags_midi_parser_new(FILE *file) { AgsMidiParser *midi_parser; struct stat sb; midi_parser = (AgsMidiParser *) g_object_new(AGS_TYPE_MIDI_PARSER, "file", file, NULL); return(midi_parser); } gsequencer-1.4.24/ags/audio/midi/ags_midi_util.c0000644000175000017500000003720113246707333016451 00000000000000/* 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 . */ #include #include #include #include #include /** * SECTION:ags_midi_util * @short_description: MIDI util * @title: AgsMidiUtil * @section_id: * @include: ags/audio/midi/ags_midi_util.h * * Utility functions for MIDI. */ /** * ags_midi_util_is_key_on: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_key_on(unsigned char *buffer) { gboolean retval; retval = ((0xf0 & buffer[0]) == 0x90) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_key_off: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_key_off(unsigned char *buffer) { gboolean retval; retval = ((0xf0 & buffer[0]) == 0x80) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_key_pressure: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_key_pressure(unsigned char *buffer) { gboolean retval; retval = ((0xf0 & buffer[0]) == 0xa0) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_change_parameter: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_change_parameter(unsigned char *buffer) { gboolean retval; retval = ((0xf0 & buffer[0]) == 0xb0) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_pitch_bend: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_pitch_bend(unsigned char *buffer) { gboolean retval; retval = ((0xf0 & buffer[0]) == 0xe0) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_change_program: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_change_program(unsigned char *buffer) { gboolean retval; retval = ((0xf0 & buffer[0]) == 0xc0) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_change_pressure: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_change_pressure(unsigned char *buffer) { gboolean retval; retval = ((0xf0 & buffer[0]) == 0xd0) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_sysex: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_sysex(unsigned char *buffer) { gboolean retval; retval = ((0xff & buffer[0]) == 0xf0) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_quarter_frame: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_quarter_frame(unsigned char *buffer) { gboolean retval; retval = ((0xff & buffer[0]) == 0xf1) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_song_position: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_song_position(unsigned char *buffer) { gboolean retval; retval = ((0xff & buffer[0]) == 0xf2) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_song_select: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_song_select(unsigned char *buffer) { gboolean retval; retval = ((0xff & buffer[0]) == 0xf3) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_tune_request: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_tune_request(unsigned char *buffer) { gboolean retval; retval = ((0xff & buffer[0]) == 0xf6) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_is_meta_event: * @buffer: the midi buffer * * Returns: %TRUE on success, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_midi_util_is_meta_event(unsigned char *buffer) { gboolean retval; retval = ((0xff & buffer[0]) == 0xff) ? TRUE: FALSE; return(retval); } /** * ags_midi_util_to_smf: * @midi_buffer: the midi buffer * @buffer_length: the buffer length * @delta_time: the delta time * @smf_buffer_length: the return location of resulting length * * Convert real-time MIDI to SMF. * * Returns: the SMF buffer * * Since: 1.0.0 */ unsigned char* ags_midi_util_to_smf(unsigned char *midi_buffer, guint buffer_length, glong delta_time, guint *smf_buffer_length) { unsigned char *midi_iter; unsigned char *smf_buffer; guint ret_smf_buffer_length; auto unsigned char* ags_midi_util_to_smf_realloc(unsigned char *smf_buffer, guint smf_buffer_length); unsigned char* ags_midi_util_to_smf_realloc(unsigned char *smf_buffer, guint smf_buffer_length){ if(smf_buffer == NULL){ smf_buffer = (unsigned char *) malloc(smf_buffer_length * sizeof(unsigned char)); }else{ smf_buffer = (unsigned char *) realloc(smf_buffer, smf_buffer_length * sizeof(unsigned char)); } return(smf_buffer); } if(midi_buffer == NULL){ return(NULL); } smf_buffer = NULL; ret_smf_buffer_length = 0; /* parse bytes */ midi_iter = midi_buffer; while(midi_iter < midi_buffer + buffer_length){ if(ags_midi_util_is_key_on(midi_iter)){ /* key on */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_key_on(smf_buffer, delta_time, 0xf & midi_iter[0], 0x7f & midi_iter[1], 0x7f & midi_iter[2]); midi_iter += 3; }else if(ags_midi_util_is_key_off(midi_iter)){ /* key off */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_key_off(smf_buffer, delta_time, 0xf & midi_iter[0], 0x7f & midi_iter[1], 0x7f & midi_iter[2]); midi_iter += 3; }else if(ags_midi_util_is_key_pressure(midi_iter)){ /* key pressure */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_key_pressure(smf_buffer, delta_time, 0xf & midi_iter[0], 0x7f & midi_iter[1], 0x7f & midi_iter[2]); midi_iter += 3; }else if(ags_midi_util_is_change_parameter(midi_iter)){ /* change parameter */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_change_parameter(smf_buffer, delta_time, 0xf & midi_iter[0], 0x7f & midi_iter[1], 0x7f & midi_iter[2]); midi_iter += 3; }else if(ags_midi_util_is_pitch_bend(midi_iter)){ /* pitch bend */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_pitch_bend(smf_buffer, delta_time, 0xf & midi_iter[0], 0x7f & midi_iter[1], 0x7f & midi_iter[2]); midi_iter += 3; }else if(ags_midi_util_is_change_program(midi_iter)){ /* change program */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 2); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_change_program(smf_buffer, delta_time, 0xf & midi_iter[0], 0x7f & midi_iter[1]); midi_iter += 2; }else if(ags_midi_util_is_change_pressure(midi_iter)){ /* change pressure */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 2); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_change_pressure(smf_buffer, delta_time, 0xf & midi_iter[0], 0x7f & midi_iter[1]); midi_iter += 2; }else if(ags_midi_util_is_sysex(midi_iter)){ guint n; /* sysex */ n = 1; while(midi_iter[n] != 0xf7){ n++; } ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_sysex(smf_buffer, delta_time, &(midi_iter[1]), n); midi_iter += (n + 2); }else if(ags_midi_util_is_song_position(midi_iter)){ /* song position */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_song_position(smf_buffer, delta_time, ((0x7f & midi_iter[0]) | ((0x7f & midi_iter[1]) << 7))); midi_iter += 3; }else if(ags_midi_util_is_song_select(midi_iter)){ /* song select */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_change_program(smf_buffer, delta_time, 0xf & midi_iter[0], 0x7f & midi_iter[1]); midi_iter += 2; }else if(ags_midi_util_is_tune_request(midi_iter)){ /* tune request */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); ags_midi_buffer_util_put_tune_request(smf_buffer, delta_time); midi_iter += 1; }else if(ags_midi_util_is_meta_event(midi_iter)){ /* meta event */ ret_smf_buffer_length += (ags_midi_buffer_util_get_varlength_size(delta_time) + 3); smf_buffer = ags_midi_util_to_smf_realloc(smf_buffer, ret_smf_buffer_length); if(midi_iter[1] == 0x01){ ags_midi_buffer_util_put_text_event(smf_buffer, delta_time, midi_iter + 3, 0xff & midi_iter[2]); }else if(midi_iter[1] == 0x7f){ if(midi_iter[2] == 3){ ags_midi_buffer_util_put_sequencer_meta_event(smf_buffer, delta_time, midi_iter[2], midi_iter[3], ((midi_iter[4]) | ((midi_iter[5]) << 8)) | ((midi_iter[5]) << 16)); }else if(midi_iter[2] == 2){ ags_midi_buffer_util_put_sequencer_meta_event(smf_buffer, delta_time, midi_iter[2], midi_iter[3], ((midi_iter[4]) | ((midi_iter[5]) << 8))); } } midi_iter += (3 + midi_iter[2]); }else{ g_warning("ags_midi_util.c - unexpected byte %x", midi_iter[0]); midi_iter++; } } return(smf_buffer); } /** * ags_midi_util_envelope_to_velocity: * @attack: attack * @decay: decay * @sustain: sustain * @release: release * @ratio: ratio * @samplerate: samplerate * @start_frame: start frame * @end_frame: end frame * * Envelope to velocity. * * Returns: the velocity * * Since: 1.0.0 */ glong ags_midi_util_envelope_to_velocity(AgsComplex *attack, AgsComplex *decay, AgsComplex *sustain, AgsComplex *release, AgsComplex *ratio, guint samplerate, guint start_frame, guint end_frame) { glong velocity; velocity = 127; //TODO:JK: implement me return(velocity); } /** * ags_midi_util_velocity_to_envelope: * @delta_time: delta time * @is_release: is release * @attack: attack * @decay: decay * @sustain: sustain * @release: release * @ratio: ratio * @samplerate: samplerate * @start_frame: start frame * @end_frame: end frame * * Velocity to envelope. * * Since: 1.0.0 */ void ags_midi_util_velocity_to_envelope(glong delta_time, gboolean is_release, AgsComplex **attack, AgsComplex **decay, AgsComplex **sustain, AgsComplex **release, AgsComplex **ratio, guint *samplerate, guint *start_frame, guint *end_frame) { //TODO:JK: implement me } /** * ags_midi_util_envelope_to_pressure: * @attack: attack * @decay: decay * @sustain: sustain * @release: release * @ratio: ratio * @samplerate: samplerate * @start_frame: start frame * @end_frame: end frame * * Envelope to pressure. * * Returns: the pressure * * Since: 1.0.0 */ glong ags_midi_util_envelope_to_pressure(AgsComplex *attack, AgsComplex *decay, AgsComplex *sustain, AgsComplex *release, AgsComplex *ratio, guint samplerate, guint start_frame, guint end_frame) { glong pressure; pressure = 127; //TODO:JK: implement me return(pressure); } /** * ags_midi_util_pressure_to_envelope: * @delta_time: delta time * @is_sustain: is sustain * @attack: attack * @decay: decay * @sustain: sustain * @release: release * @ratio: ratio * @samplerate: samplerate * @start_frame: start frame * @end_frame: end frame * * Pressure to envelope. * * Since: 1.0.0 */ void ags_midi_util_pressure_to_envelope(glong delta_time, gboolean is_sustain, AgsComplex **attack, AgsComplex **decay, AgsComplex **sustain, AgsComplex **release, AgsComplex **ratio, guint *samplerate, guint *start_frame, guint *end_frame) { //TODO:JK: implement me } /** * ags_midi_util_delta_time_to_offset: * @division: division * @tempo: tempo * @bpm: bpm * @delta_time: delta time * * Delta time to offset * * Returns: the offset * * Since: 1.0.0 */ guint ags_midi_util_delta_time_to_offset(glong division, glong tempo, glong bpm, glong delta_time) { guint offset; if(((1 << 15) & division) == 0){ /* ticks per quarter note */ offset = (16.0 * bpm / 60.0) * delta_time * (tempo / division / ((gdouble) USEC_PER_SEC)); }else{ /* SMTPE */ offset = (16.0 * bpm / 60.0) * delta_time / (((division * division) / 256.0) / ((gdouble) USEC_PER_SEC)); } return(offset); } /** * ags_midi_util_offset_to_delta_time: * @division: division * @tempo: tempo * @bpm: bpm * @x: note offset * * Offset to delta time * * Returns: the delta time * * Since: 1.0.0 */ glong ags_midi_util_offset_to_delta_time(glong division, glong tempo, glong bpm, guint x) { guint delta_time; if(((1 << 15) & division) == 0){ /* ticks per quarter note */ delta_time = x / (16.0 * bpm / 60.0) / (tempo / division / ((gdouble) USEC_PER_SEC)); }else{ /* SMTPE */ delta_time = x / (16.0 * bpm / 60.0) * (((division * division) / 256.0) / ((gdouble) USEC_PER_SEC)); } return(delta_time); } gsequencer-1.4.24/ags/audio/midi/ags_midi_builder.c0000644000175000017500000022557113256163135017130 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include void ags_midi_builder_class_init(AgsMidiBuilderClass *midi_builder); void ags_midi_builder_init(AgsMidiBuilder *midi_builder); void ags_midi_builder_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_midi_builder_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_midi_builder_finalize(GObject *gobject); void ags_midi_builder_real_midi_putc(AgsMidiBuilder *midi_builder, int c); void ags_midi_builder_real_on_error(AgsMidiBuilder *builder, GError **error); /* channel messages */ void ags_midi_builder_real_append_header(AgsMidiBuilder *midi_builder, guint offset, guint format, guint track_count, guint division, guint times, guint bpm, guint clicks); void ags_midi_builder_real_append_track(AgsMidiBuilder *midi_builder, gchar *track_name); void ags_midi_builder_real_append_key_on(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity); void ags_midi_builder_real_append_key_off(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity); void ags_midi_builder_real_append_key_pressure(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint pressure); void ags_midi_builder_real_append_change_parameter(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint control, guint value); void ags_midi_builder_real_append_change_pitch_bend(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pitch, guint transmitter); void ags_midi_builder_real_append_change_program(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint program); void ags_midi_builder_real_append_change_pressure(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pressure); /* sysex and system common */ void ags_midi_builder_real_append_sysex(AgsMidiBuilder *midi_builder, guint delta_time, unsigned char *sysex_data, guint length); void ags_midi_builder_real_append_quarter_frame(AgsMidiBuilder *midi_builder, guint delta_time, guint message_type, guint values); void ags_midi_builder_real_append_song_position(AgsMidiBuilder *midi_builder, guint delta_time, guint song_position); void ags_midi_builder_real_append_song_select(AgsMidiBuilder *midi_builder, guint delta_time, guint song_select); void ags_midi_builder_real_append_tune_request(AgsMidiBuilder *midi_builder, guint delta_time); /* meta events */ void ags_midi_builder_real_append_sequence_number(AgsMidiBuilder *midi_builder, guint delta_time, guint sequence); void ags_midi_builder_real_append_smtpe(AgsMidiBuilder *midi_builder, guint delta_time, guint rr, guint hr, guint mn, guint se, guint fr); void ags_midi_builder_real_append_tempo(AgsMidiBuilder *midi_builder, guint delta_time, guint tempo); void ags_midi_builder_real_append_time_signature(AgsMidiBuilder *midi_builder, guint delta_time, guint nn, guint dd, guint cc, guint bb); void ags_midi_builder_real_append_key_signature(AgsMidiBuilder *midi_builder, guint delta_time, guint sf, guint mi); void ags_midi_builder_real_append_sequencer_meta_event(AgsMidiBuilder *midi_builder, guint delta_time, guint len, guint id, guint data); void ags_midi_builder_real_append_text_event(AgsMidiBuilder *midi_builder, guint delta_time, gchar *text, guint length); /** * SECTION:ags_midi_builder * @short_description: MIDI buidler * @title: AgsMidiBuilder * @section_id: * @include: ags/audio/midi/ags_midi_builder.h * * The #AgsMidiBuilder lets you create MIDI files using its builder functions. */ enum{ PROP_0, PROP_FILE, }; enum{ MIDI_PUTC, ON_ERROR, APPEND_HEADER, APPEND_TRACK, KEY_ON, KEY_OFF, KEY_PRESSURE, CHANGE_PARAMETER, CHANGE_PITCH_BEND, CHANGE_PROGRAM, CHANGE_PRESSURE, SYSEX, QUARTER_FRAME, SONG_POSITION, SONG_SELECT, TUNE_REQUEST, SEQUENCE_NUMBER, SMTPE, TEMPO, TIME_SIGNATURE, KEY_SIGNATURE, SEQUENCER_META_EVENT, TEXT_EVENT, LAST_SIGNAL, }; static gpointer ags_midi_builder_parent_class = NULL; static guint midi_builder_signals[LAST_SIGNAL]; GType ags_midi_builder_get_type(void) { static GType ags_type_midi_builder = 0; if(!ags_type_midi_builder){ static const GTypeInfo ags_midi_builder_info = { sizeof (AgsMidiBuilderClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_midi_builder_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMidiBuilder), 0, /* n_preallocs */ (GInstanceInitFunc) ags_midi_builder_init, }; ags_type_midi_builder = g_type_register_static(G_TYPE_OBJECT, "AgsMidiBuilder", &ags_midi_builder_info, 0); } return(ags_type_midi_builder); } void ags_midi_builder_class_init(AgsMidiBuilderClass *midi_builder) { GObjectClass *gobject; GParamSpec *param_spec; ags_midi_builder_parent_class = g_type_class_peek_parent(midi_builder); /* GObjectClass */ gobject = (GObjectClass *) midi_builder; gobject->set_property = ags_midi_builder_set_property; gobject->get_property = ags_midi_builder_get_property; gobject->finalize = ags_midi_builder_finalize; /** * AgsMidiBuilder:file: * * The file to parse data from. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("file", i18n_pspec("the file stream"), i18n_pspec("The file stream to parse"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILE, param_spec); /* AgsMidiBuilderClass */ midi_builder->midi_putc = ags_midi_builder_real_midi_putc; midi_builder->on_error = ags_midi_builder_real_on_error; midi_builder->append_header = ags_midi_builder_real_append_header; midi_builder->append_track = ags_midi_builder_real_append_track; midi_builder->append_key_on = ags_midi_builder_real_append_key_on; midi_builder->append_key_off = ags_midi_builder_real_append_key_off; midi_builder->append_key_pressure = ags_midi_builder_real_append_key_pressure; midi_builder->append_change_parameter = ags_midi_builder_real_append_change_parameter; midi_builder->append_change_pitch_bend = ags_midi_builder_real_append_change_pitch_bend; midi_builder->append_change_program = ags_midi_builder_real_append_change_program; midi_builder->append_change_pressure = ags_midi_builder_real_append_change_pressure; midi_builder->append_sysex = ags_midi_builder_real_append_sysex; midi_builder->append_quarter_frame = ags_midi_builder_real_append_quarter_frame; midi_builder->append_song_position = ags_midi_builder_real_append_song_position; midi_builder->append_song_select = ags_midi_builder_real_append_song_select; midi_builder->append_tune_request = ags_midi_builder_real_append_tune_request; midi_builder->append_sequence_number = ags_midi_builder_real_append_sequence_number; midi_builder->append_smtpe = ags_midi_builder_real_append_smtpe; midi_builder->append_tempo = ags_midi_builder_real_append_tempo; midi_builder->append_time_signature = ags_midi_builder_real_append_time_signature; midi_builder->append_key_signature = ags_midi_builder_real_append_key_signature; midi_builder->append_sequencer_meta_event = ags_midi_builder_real_append_sequencer_meta_event; midi_builder->append_text_event = ags_midi_builder_real_append_text_event; /* signals */ /** * AgsMidiBuilder::midi-putc: * @midi_builder: the builder * @error: the #GError * * The ::midi-putc signal is emited during putting char to file. * * Since: 1.0.0 */ midi_builder_signals[MIDI_PUTC] = g_signal_new("midi-putc", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, midi_putc), NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); /** * AgsMidiBuilder::on-error: * @midi_builder: the builder * @error: the #GError * * The ::on-error signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[ON_ERROR] = g_signal_new("on-error", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, on_error), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsMidiBuilder::append-header: * @midi_builder: the builder * @offset: start delta-time * @format: format 0, 1 or 2 * @track_count: the number of tracks * @division: timing division * @times: pulses per quarter note * @bpm: beats per minute * @clicks: timing clicks * * The ::append-header signal is emited during building of header. * * Since: 1.0.0 */ midi_builder_signals[APPEND_HEADER] = g_signal_new("append-header", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_header), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT_UINT, G_TYPE_NONE, 7, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::append-track: * @midi_builder: the builder * @track_name: the trach name * * Returns: The XML node representing the track * * The ::append-track signal is emited during building of track. * * Since: 1.0.0 */ midi_builder_signals[APPEND_TRACK] = g_signal_new("append-track", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_track), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); /** * AgsMidiBuilder::key-on: * @midi_builder: the builder * @delta_time: delta-time * @audio_channel: the audio channel * @note: the note to play from 0 to 128 * @velocity: key dynamics * * The ::key-on signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[KEY_ON] = g_signal_new("key-on", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_key_on), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT, G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::key-off: * @midi_builder: the builders * @delta_time: delta-time * @audio_channel: the audio channel * @note: the note to stop play from 0 to 128 * @velocity: key dynamics * * The ::key-off signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[KEY_OFF] = g_signal_new("key-off", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_key_off), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT, G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::key-pressure: * @midi_builder: the builder * @delta_time: delta-time * @audio_channel: the audio channel * @note: the note to press from 0 to 128 * @pressure: the amount of the pressure * * The ::key-pressure signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[KEY_PRESSURE] = g_signal_new("key-pressure", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_key_pressure), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT, G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::change-parameter: * @midi_builder: the builder * @delta_time: delta-time * @channel: the audio channel * @control: the control * @value: and its value * * The ::change-parameter signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[CHANGE_PARAMETER] = g_signal_new("change-parameter", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_change_parameter), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT, G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::change-pitch-bend: * @midi_builder: the builder * @delta_time: delta-time * @channel: the audio channel * @pitch: amount of pitch as 14 bit quantifier, 0, 0x2000 to 0x3fff * @transmitter: sensitivy of the wheel * * The ::change-pitch-bend signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[CHANGE_PITCH_BEND] = g_signal_new("change-pitch-bend", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_change_pitch_bend), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT, G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::change-program: * @midi_builder: the builder * @delta_time: delta-time * @channel: the audio channel * @program: the new programm * * The ::change-program signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[CHANGE_PROGRAM] = g_signal_new("change-program", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_change_program), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::change-channel-pressure: * @midi_builder: the builder * @delta_time: delta-time * @channel: the audio channel * @pressure: the new pressure, aftertouch * * The ::change-channel-pressure signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[CHANGE_PRESSURE] = g_signal_new("change-channel-pressure", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_change_pressure), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::sysex: * @midi_builder: the builder * @delta_time: delta-time * @sysex_data: the data array * @length: the length of the array * * The ::sysex signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[SYSEX] = g_signal_new("sysex", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_sysex), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_POINTER_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_POINTER, G_TYPE_UINT); /** * AgsMidiBuilder::quarter-frame: * @midi_builder: the builder * @delta_time: the delta time * @message_type: the message type * @values: the values * * The ::quarter-frame signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[QUARTER_FRAME] = g_signal_new("quarter-frame", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_quarter_frame), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::song-position: * @midi_builder: the builder * @delta_time: delta-time * @song_position: the current position from 0x0 to 0x3fff * * The ::song-position signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[SONG_POSITION] = g_signal_new("song-position", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_song_position), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::song-select: * @midi_builder: the builder * @delta_time: delta-time * @song_select: the song or sequence * * The ::song-select signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[SONG_SELECT] = g_signal_new("song-select", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_song_select), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::tune-request: * @midi_builder: the builder * @delta_time: delta-time * * The ::tune-request signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[TUNE_REQUEST] = g_signal_new("tune-request", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_tune_request), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsMidiBuilder::sequence-number: * @midi_builder: the builder * @delta_time: delta-time * @sequence: the nth sequence * * The ::sequence-number signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[SEQUENCE_NUMBER] = g_signal_new("sequence-number", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_sequence_number), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::smtpe: * @midi_builder: the builder * @delta_time: delta-time * @hr: hours * @mn: minutes * @se: seconds * @fr: frame number * @ff: frequency * * The ::smtpe signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[SMTPE] = g_signal_new("smtpe", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_smtpe), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT, G_TYPE_NONE, 6, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::tempo: * @midi_builder: the builder * @delta_time: delta-time * @tempo: the tempo number as 24-bit quantifier * * The ::tempo signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[TEMPO] = g_signal_new("tempo", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_tempo), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::time-signature: * @midi_builder: the builder * @delta_time: delta time * @nn: numerator * @dd: denominator * @cc: ticks per metronome click * @bb: 32nd per quarter note * * The ::time-signature signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[TIME_SIGNATURE] = g_signal_new("time-signature", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_time_signature), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT, G_TYPE_NONE, 5, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::key-signature: * @midi_builder: the builder * @delta_time: delta-time * @sf: signature frame * @mi: if %TRUE minor else major * * The ::key-signature signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[KEY_SIGNATURE] = g_signal_new("key-signature", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_key_signature), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_BOOLEAN, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_BOOLEAN); /** * AgsMidiBuilder::sequencer-meta-event: * @midi_builder: the builder * @delta_time: delta-time * @len: length * @id: identifier * @data: buffer * * The ::sequencer-meta-event signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[SEQUENCER_META_EVENT] = g_signal_new("sequencer-meta-event", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_sequencer_meta_event), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT, G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); /** * AgsMidiBuilder::text-event: * @midi_builder: the builder * @delta_time: delta-time * @text: the text * @length: length * * The ::text-event signal is emited during building of event. * * Since: 1.0.0 */ midi_builder_signals[TEXT_EVENT] = g_signal_new("text-event", G_TYPE_FROM_CLASS(midi_builder), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsMidiBuilderClass, append_text_event), NULL, NULL, g_cclosure_user_marshal_VOID__UINT_STRING_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_UINT); } void ags_midi_builder_init(AgsMidiBuilder *midi_builder) { midi_builder->flags = 0; midi_builder->data = NULL; midi_builder->length = 0; midi_builder->file = NULL; midi_builder->midi_header = NULL; midi_builder->midi_track = NULL; midi_builder->current_midi_track = NULL; } void ags_midi_builder_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMidiBuilder *midi_builder; midi_builder = AGS_MIDI_BUILDER(gobject); switch(prop_id){ case PROP_FILE: { midi_builder->file = g_value_get_pointer(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_builder_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMidiBuilder *midi_builder; midi_builder = AGS_MIDI_BUILDER(gobject); switch(prop_id){ case PROP_FILE: { g_value_set_pointer(value, midi_builder->file); } default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_midi_builder_finalize(GObject *gobject) { G_OBJECT_CLASS(ags_midi_builder_parent_class)->finalize(gobject); } /** * ags_midi_builder_header_alloc: * * Allocate MIDI builder header. * * Returns: the newly allocated #AgsMidiBuilderHeader-struct * * Since: 1.0.0 */ AgsMidiBuilderHeader* ags_midi_builder_header_alloc() { AgsMidiBuilderHeader *midi_builder_header; midi_builder_header = (AgsMidiBuilderHeader *) malloc(sizeof(AgsMidiBuilderHeader)); midi_builder_header->offset = 0; midi_builder_header->format = 1; midi_builder_header->count = 0; midi_builder_header->division = 0; midi_builder_header->times = 0; midi_builder_header->beat = 0; midi_builder_header->clicks = 0; midi_builder_header->data = NULL; midi_builder_header->length = 0; return(midi_builder_header); } /** * ags_midi_builder_header_free: * @midi_builder_header: the #AgsMidiBuilderHeader-struct * * Free MIDI builder header. * * Since: 1.0.0 */ void ags_midi_builder_header_free(AgsMidiBuilderHeader *midi_builder_header) { if(midi_builder_header == NULL){ return; } free(midi_builder_header); } /** * ags_midi_builder_track_alloc: * * Allocate MIDI builder track. * * Returns: the newly allocated #AgsMidiBuilderTrack-struct * * Since: 1.0.0 */ AgsMidiBuilderTrack* ags_midi_builder_track_alloc() { AgsMidiBuilderTrack *midi_builder_track; midi_builder_track = (AgsMidiBuilderTrack *) malloc(sizeof(AgsMidiBuilderTrack)); midi_builder_track->offset = 0; midi_builder_track->track_name = NULL; midi_builder_track->absolute_time = 0; midi_builder_track->data = NULL; midi_builder_track->length = 0; return(midi_builder_track); } /** * ags_midi_builder_track_free: * @midi_builder_track: the #AgsMidiBuilderTrack-struct * * Free MIDI builder track. * * Since: 1.0.0 */ void ags_midi_builder_track_free(AgsMidiBuilderTrack *midi_builder_track) { if(midi_builder_track == NULL){ return; } if(midi_builder_track->track_name != NULL){ free(midi_builder_track->track_name); } if(midi_builder_track->data != NULL){ free(midi_builder_track->data); } free(midi_builder_track); } /** * ags_midi_builder_track_find_track_name_with_delta_time: * @midi_builder_track: the #AgsMidiBuilderTrack * @absolute_time: the absolute time * @track_name: the track's string representation * * Finds matching #AgsMidiBuilderTrack-struct within @midi_builder_track #GList-struct. * * Returns: the matching #GList-struct * * Since: 1.0.0 */ GList* ags_midi_builder_track_find_delta_time_with_track_name(GList *midi_builder_track, guint64 absolute_time, gchar *track_name) { while(midi_builder_track != NULL){ if(AGS_MIDI_BUILDER_TRACK(midi_builder_track->data)->absolute_time == absolute_time && !g_ascii_strcasecmp(AGS_MIDI_BUILDER_TRACK(midi_builder_track->data)->track_name, track_name)){ break; } midi_builder_track = midi_builder_track->next; } return(midi_builder_track); } /** * ags_midi_builder_track_insert_midi_message: * @midi_builder_track: the #AgsMidiBuilderTrack-struct * @buffer: the MIDI message * @length: the buffer length * * Insert MIDI message. * * Since: 1.0.0 */ void ags_midi_builder_track_insert_midi_message(AgsMidiBuilderTrack *midi_builder_track, unsigned char *buffer, guint length) { unsigned char *current; gint prefix_length, suffix_length; guint64 absolute_time; glong delta_time; if(midi_builder_track == NULL || buffer == NULL || length == 0){ return; } /* read delta-time */ ags_midi_buffer_util_get_varlength(buffer, &delta_time); midi_builder_track->absolute_time += delta_time; /* get offset */ midi_builder_track->data = (unsigned char *) realloc(midi_builder_track->data, (midi_builder_track->length + length) * sizeof(unsigned char)); current = midi_builder_track->data + midi_builder_track->length; if(current == NULL){ prefix_length = 0; suffix_length = 0; }else{ /* prefix */ if(current <= midi_builder_track->data + midi_builder_track->length){ prefix_length = current - midi_builder_track->data; }else{ prefix_length = 0; } /* suffix */ if(midi_builder_track->length > prefix_length){ suffix_length = midi_builder_track->length - prefix_length; memmove(midi_builder_track->data + prefix_length + length, midi_builder_track->data + prefix_length, suffix_length); } } memcpy(midi_builder_track->data + prefix_length, buffer, length); /* set data */ midi_builder_track->length += length; ags_midi_buffer_util_put_int32(midi_builder_track->data + 4, midi_builder_track->length); } /** * ags_midi_builder_track_get_delta_time_offset: * @midi_builder_track: the #AgsMidiBuilderTrack-struct * @absolute_time: the absolute time * * Get offset by delta time. * * Returns: the buffer position before @delta_time * * Since: 1.0.0 */ unsigned char* ags_midi_builder_track_get_delta_time_offset(AgsMidiBuilderTrack *midi_builder_track, guint64 absolute_time) { unsigned char *prev, *current; guint64 time_counter; glong current_delta_time; if(midi_builder_track == NULL || midi_builder_track->data == NULL){ return(NULL); } current = midi_builder_track->data; prev = NULL; time_counter = 0; while(current != NULL){ current = ags_midi_buffer_util_seek_message(current, 1, ¤t_delta_time); time_counter += current_delta_time; if(time_counter > absolute_time){ break; } if(current >= midi_builder_track->data + midi_builder_track->length){ break; } prev = current; } if(current == NULL){ current = midi_builder_track->data + midi_builder_track->length; } return(current); } void ags_midi_builder_real_midi_putc(AgsMidiBuilder *midi_builder, gint c) { if(midi_builder->file == NULL){ return; } fputc(c, midi_builder->file); } /** * ags_midi_builder_midi_putc: * @midi_builder: the #AgsMidiBuilder * @c: the character to put * * Put char in MIDI file. * * Since: 1.0.0 */ void ags_midi_builder_midi_putc(AgsMidiBuilder *midi_builder, gint c) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[MIDI_PUTC], 0, c); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_on_error(AgsMidiBuilder *midi_builder, GError **error) { if(error != NULL && *error != NULL){ g_warning("%s", (*error)->message); } } /** * ags_midi_builder_on_error: * @midi_builder: the #AgsMidiBuilder * @error: the error * * Triggered as an error occurs. * * Since: 1.0.0 */ void ags_midi_builder_on_error(AgsMidiBuilder *midi_builder, GError **error) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[ON_ERROR], 0, error); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_header(AgsMidiBuilder *midi_builder, guint offset, guint format, guint track_count, guint division, guint times, guint bpm, guint clicks) { AgsMidiBuilderHeader *midi_builder_header; if(midi_builder->midi_header == NULL){ midi_builder_header = midi_builder->midi_header = ags_midi_builder_header_alloc(); }else{ midi_builder_header = midi_builder->midi_header; } if(midi_builder_header->data == NULL){ midi_builder_header->data = (unsigned char *) malloc(14 * sizeof(unsigned char)); midi_builder_header->length = 14; } midi_builder_header->offset = offset; midi_builder_header->format = format; midi_builder_header->count = track_count; midi_builder_header->division = division; midi_builder_header->times = times; midi_builder_header->beat = bpm; midi_builder_header->clicks = clicks; ags_midi_buffer_util_put_header(midi_builder_header->data, offset, format, track_count, division); } /** * ags_midi_builder_append_header: * @midi_builder: the #AgsMidiBuilder * @offset: start delta-time * @format: either 0, 1 or 2. * @track_count: the number of tracks * @division: timing division * @times: pulse per quarter note * @bpm: beats per minute * @clicks: timing clicks * * Appends MIDI header to @midi_builder. * * Since: 1.0.0 */ void ags_midi_builder_append_header(AgsMidiBuilder *midi_builder, guint offset, guint format, guint track_count, guint division, guint times, guint bpm, guint clicks) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[APPEND_HEADER], 0, offset, format, track_count, division, times, bpm, clicks); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_track(AgsMidiBuilder *midi_builder, gchar *track_name) { AgsMidiBuilderTrack *midi_builder_track; guint delta_time_size; guint length; /* allocate struct */ midi_builder_track = ags_midi_builder_track_alloc(); midi_builder_track->track_name = g_strdup(track_name); /* fill buffer */ delta_time_size = ags_midi_buffer_util_get_varlength_size(0); if(track_name != NULL){ length = strlen(track_name); }else{ length = 0; } midi_builder_track->data = (unsigned char *) malloc((8 + delta_time_size + length + 3) * sizeof(unsigned char)); midi_builder_track->length = (4 + 4) + delta_time_size + length + 3; ags_midi_buffer_util_put_track(midi_builder_track->data, 0); if(track_name != NULL){ ags_midi_buffer_util_put_text_event(midi_builder_track->data + 8, 0, track_name, length); } /* append track */ midi_builder->current_midi_track = midi_builder_track; midi_builder->midi_track = g_list_append(midi_builder->midi_track, midi_builder_track); } /** * ags_midi_builder_append_track: * @midi_builder: the #AgsMidiBuilder * @track_name: the track name * * Append a track called @track_name to @midi_builder. * * Since: 1.0.0 */ void ags_midi_builder_append_track(AgsMidiBuilder *midi_builder, gchar *track_name) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[APPEND_TRACK], 0, track_name); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_key_on(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 3) * sizeof(unsigned char)); ags_midi_buffer_util_put_key_on(buffer, delta_time, audio_channel, note, velocity); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 3); } /** * ags_midi_builder_append_key_on: * @midi_builder: the #AgsMidiBuilder * @delta_time: delta-time * @audio_channel: the audio channel * @note: the note to play from 0 to 128 * @velocity: key dynamics * * Append key-on for @note to @midi_builder with key dynamics @velocity, at @delta_time. * * Since: 1.0.0 */ void ags_midi_builder_append_key_on(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[KEY_ON], 0, delta_time, audio_channel, note, velocity); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_key_off(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 3) * sizeof(unsigned char)); ags_midi_buffer_util_put_key_off(buffer, delta_time, audio_channel, note, velocity); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 3); } /** * ags_midi_builder_append_key_off: * @midi_builder: the #AgsMidiBuilder * @delta_time: delta-time * @audio_channel: the audio channel * @note: the note to play from 0 to 128 * @velocity: key dynamics * * Append key-off for @note to @midi_builder with key dynamics @velocity, at @delta_time. * * Since: 1.0.0 */ void ags_midi_builder_append_key_off(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint velocity) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[KEY_OFF], 0, delta_time, audio_channel, note, velocity); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_key_pressure(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint pressure) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 3) * sizeof(unsigned char)); ags_midi_buffer_util_put_key_pressure(buffer, delta_time, audio_channel, note, pressure); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 3); } /** * ags_midi_builder_append_key_pressure: * @midi_builder: the #AgsMidiBuilder * @delta_time: delta-time * @audio_channel: the audio channel * @note: the note to play from 0 to 128 * @pressure: key dynamics * * Append key-pressure for @note to @midi_builder with key dynamics @pressure, at @delta_time. * * Since: 1.0.0 */ void ags_midi_builder_append_key_pressure(AgsMidiBuilder *midi_builder, guint delta_time, guint audio_channel, guint note, guint pressure) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[KEY_PRESSURE], 0, delta_time, audio_channel, note, pressure); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_change_parameter(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint control, guint value) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 3) * sizeof(unsigned char)); ags_midi_buffer_util_put_change_parameter(buffer, delta_time, channel, control, value); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 3); } /** * ags_midi_builder_append_change_parameter: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @channel: the channel * @control: the control * @value: the value * * Appends change parameter. * * Since: 1.0.0 */ void ags_midi_builder_append_change_parameter(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint control, guint value) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[CHANGE_PARAMETER], 0, delta_time, channel, control, value); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_change_pitch_bend(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pitch, guint transmitter) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 3) * sizeof(unsigned char)); ags_midi_buffer_util_put_pitch_bend(buffer, delta_time, channel, pitch, transmitter); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 3); } /** * ags_midi_builder_append_change_pitch_bend: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @channel: the channel * @pitch: the pitch * @transmitter: the transmitter * * Change pitch bend. * * Since: 1.0.0 */ void ags_midi_builder_append_change_pitch_bend(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pitch, guint transmitter) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[CHANGE_PITCH_BEND], 0, delta_time, channel, pitch, transmitter); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_change_program(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint program) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 2) * sizeof(unsigned char)); ags_midi_buffer_util_put_change_program(buffer, delta_time, channel, program); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 2); } /** * ags_midi_builder_append_change_program: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @channel: the channel * @program: the program * * Appends change program. * * Since: 1.0.0 */ void ags_midi_builder_append_change_program(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint program) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[CHANGE_PROGRAM], 0, delta_time, channel, program); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_change_pressure(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pressure) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 2) * sizeof(unsigned char)); ags_midi_buffer_util_put_change_pressure(buffer, delta_time, channel, pressure); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 2); } /** * ags_midi_builder_append_change_pressure: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @channel: the channel * @pressure: the pressure * * Appends change pressure. * * Since: 1.0.0 */ void ags_midi_builder_append_change_pressure(AgsMidiBuilder *midi_builder, guint delta_time, guint channel, guint pressure) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[CHANGE_PRESSURE], 0, delta_time, channel, pressure); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_sysex(AgsMidiBuilder *midi_builder, guint delta_time, unsigned char *sysex_data, guint length) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + length) * sizeof(unsigned char)); ags_midi_buffer_util_put_sysex(buffer, delta_time, sysex_data, length); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + length); } /** * ags_midi_builder_append_sysex: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @sysex_data: the sysex data * @length: length * * Appends sysex data. * * Since: 1.0.0 */ void ags_midi_builder_append_sysex(AgsMidiBuilder *midi_builder, guint delta_time, unsigned char *sysex_data, guint length) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[SYSEX], 0, delta_time, sysex_data, length); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_quarter_frame(AgsMidiBuilder *midi_builder, guint delta_time, guint message_type, guint values) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 2) * sizeof(unsigned char)); ags_midi_buffer_util_put_quarter_frame(buffer, delta_time, message_type, values); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 2); } /** * ags_midi_builder_append_quarter_frame: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @message_type: the message type * @values: values * * Appends quarter frame. * * Since: 1.0.0 */ void ags_midi_builder_append_quarter_frame(AgsMidiBuilder *midi_builder, guint delta_time, guint message_type, guint values) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[QUARTER_FRAME], 0, delta_time, message_type, values); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_song_position(AgsMidiBuilder *midi_builder, guint delta_time, guint song_position) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 3) * sizeof(unsigned char)); ags_midi_buffer_util_put_song_position(buffer, delta_time, song_position); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 3); } /** * ags_midi_builder_append_song_position: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @song_position: the song position * * Appends song position. * * Since: 1.0.0 */ void ags_midi_builder_append_song_position(AgsMidiBuilder *midi_builder, guint delta_time, guint song_position) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[SONG_POSITION], 0, delta_time, song_position); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_song_select(AgsMidiBuilder *midi_builder, guint delta_time, guint song_select) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 2) * sizeof(unsigned char)); ags_midi_buffer_util_put_song_select(buffer, delta_time, song_select); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 2); } /** * ags_midi_builder_append_song_select: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @song_select: the song select * * Appends song select. * * Since: 1.0.0 */ void ags_midi_builder_append_song_select(AgsMidiBuilder *midi_builder, guint delta_time, guint song_select) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[SONG_SELECT], 0, delta_time, song_select); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_tune_request(AgsMidiBuilder *midi_builder, guint delta_time) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 1) * sizeof(unsigned char)); ags_midi_buffer_util_put_tune_request(buffer, delta_time); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 1); } /** * ags_midi_builder_append_tune_request: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * * Appends tune request. * * Since: 1.0.0 */ void ags_midi_builder_append_tune_request(AgsMidiBuilder *midi_builder, guint delta_time) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[TUNE_REQUEST], 0, delta_time); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_sequence_number(AgsMidiBuilder *midi_builder, guint delta_time, guint sequence) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 5) * sizeof(unsigned char)); ags_midi_buffer_util_put_sequence_number(buffer, delta_time, sequence); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 5); } /** * ags_midi_builder_append_sequence_number: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @sequence: the sequence number * * Appends sequence number. * * Since: 1.0.0 */ void ags_midi_builder_append_sequence_number(AgsMidiBuilder *midi_builder, guint delta_time, guint sequence) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[SEQUENCE_NUMBER], 0, delta_time, sequence); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_smtpe(AgsMidiBuilder *midi_builder, guint delta_time, guint rr, guint hr, guint mn, guint se, guint fr) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 8) * sizeof(unsigned char)); ags_midi_buffer_util_put_smtpe(buffer, delta_time, rr, hr, mn, se, fr); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 8); } /** * ags_midi_builder_append_smtpe: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @rr: rate * @hr: hours * @mn: minutes * @se: seconds * @fr: fraction * * Appends smtpe. * * Since: 1.0.0 */ void ags_midi_builder_append_smtpe(AgsMidiBuilder *midi_builder, guint delta_time, guint rr, guint hr, guint mn, guint se, guint fr) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[SMTPE], 0, delta_time, rr, hr, mn, se, fr); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_tempo(AgsMidiBuilder *midi_builder, guint delta_time, guint tempo) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 6) * sizeof(unsigned char)); ags_midi_buffer_util_put_tempo(buffer, delta_time, tempo); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 6); } /** * ags_midi_builder_append_tempo: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @tempo: the tempo * * Appends tempo. * * Since: 1.0.0 */ void ags_midi_builder_append_tempo(AgsMidiBuilder *midi_builder, guint delta_time, guint tempo) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[TEMPO], 0, delta_time, tempo); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_time_signature(AgsMidiBuilder *midi_builder, guint delta_time, guint nn, guint dd, guint cc, guint bb) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 7) * sizeof(unsigned char)); ags_midi_buffer_util_put_time_signature(buffer, delta_time, nn, dd, cc, bb); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 7); } /** * ags_midi_builder_append_time_signature: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @nn: numerator * @dd: denominator * @cc: ticks per metronome click * @bb: 32nd per quarter note * * Appends time signature. * * Since: 1.0.0 */ void ags_midi_builder_append_time_signature(AgsMidiBuilder *midi_builder, guint delta_time, guint nn, guint dd, guint cc, guint bb) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[TIME_SIGNATURE], 0, delta_time, nn, dd, cc, bb); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_key_signature(AgsMidiBuilder *midi_builder, guint delta_time, guint sf, guint mi) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + 5) * sizeof(unsigned char)); ags_midi_buffer_util_put_key_signature(buffer, delta_time, sf, mi); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + 5); } /** * ags_midi_builder_append_key_signature: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @sf: key * @mi: mode * * Appends key signature. * * Since: 1.0.0 */ void ags_midi_builder_append_key_signature(AgsMidiBuilder *midi_builder, guint delta_time, guint sf, guint mi) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[KEY_SIGNATURE], 0, delta_time, sf, mi); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_sequencer_meta_event(AgsMidiBuilder *midi_builder, guint delta_time, guint len, guint id, guint data) { unsigned char *buffer; guint delta_time_size; delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + len + 3) * sizeof(unsigned char)); ags_midi_buffer_util_put_sequencer_meta_event(buffer, delta_time, len, id, data); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + len + 3); } /** * ags_midi_builder_append_sequencer_meta_event: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @len: the length * @id: the id * @data: the data * * Appends sequencer meta event. * * Since: 1.0.0 */ void ags_midi_builder_append_sequencer_meta_event(AgsMidiBuilder *midi_builder, guint delta_time, guint len, guint id, guint data) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[SEQUENCER_META_EVENT], 0, delta_time, len, id, data); g_object_unref((GObject *) midi_builder); } void ags_midi_builder_real_append_text_event(AgsMidiBuilder *midi_builder, guint delta_time, gchar *text, guint length) { unsigned char *buffer; guint delta_time_size; if(length > 0){ if(text[length - 1] == '\0'){ length--; } } delta_time_size = ags_midi_buffer_util_get_varlength_size(delta_time); buffer = (unsigned char *) malloc((delta_time_size + length + 3) * sizeof(unsigned char)); ags_midi_buffer_util_put_text_event(buffer, delta_time, text, length); ags_midi_builder_track_insert_midi_message(midi_builder->current_midi_track, buffer, delta_time_size + length + 3); } /** * ags_midi_builder_append_text_event: * @midi_builder: the #AgsMidiBuilder * @delta_time: the delta time * @text: the string * @length: the string length * * Appends text event. * * Since: 1.0.0 */ void ags_midi_builder_append_text_event(AgsMidiBuilder *midi_builder, guint delta_time, gchar *text, guint length) { g_return_if_fail(AGS_IS_MIDI_BUILDER(midi_builder)); g_object_ref((GObject *) midi_builder); g_signal_emit(G_OBJECT(midi_builder), midi_builder_signals[TEXT_EVENT], 0, delta_time, text, length); g_object_unref((GObject *) midi_builder); } /** * ags_midi_builder_append_xml_node: * @midi_builder: the #AgsMidiBuilder * @node: the xmlNode * * Append from XML node @node. * * Since: 1.0.0 */ void ags_midi_builder_append_xml_node(AgsMidiBuilder *midi_builder, xmlNode *node) { auto void ags_midi_builder_append_xml_node_header(AgsMidiBuilder *midi_builder, xmlNode *node); auto void ags_midi_builder_append_xml_node_tracks(AgsMidiBuilder *midi_builder, xmlNode *node); auto void ags_midi_builder_append_xml_node_track(AgsMidiBuilder *midi_builder, xmlNode *node); auto void ags_midi_builder_append_xml_node_message(AgsMidiBuilder *midi_builder, xmlNode *node); auto void ags_midi_builder_append_xml_node_system_common(AgsMidiBuilder *midi_builder, xmlNode *node); auto void ags_midi_builder_append_xml_node_meta_event(AgsMidiBuilder *midi_builder, xmlNode *node); void ags_midi_builder_append_xml_node_header(AgsMidiBuilder *midi_builder, xmlNode *node){ xmlChar *str; guint offset; guint format; guint track_count; guint division; /* offset */ str = xmlGetProp(node, "offset"); offset = 0; if(str != NULL){ offset = g_ascii_strtoull(str, NULL, 10); } /* format */ str = xmlGetProp(node, "format"); format = 0; if(str != NULL){ format = g_ascii_strtoull(str, NULL, 10); } /* track-count */ str = xmlGetProp(node, "track-count"); track_count = 0; if(str != NULL){ track_count = g_ascii_strtoull(str, NULL, 10); } /* division */ str = xmlGetProp(node, "division"); division = 0; if(str != NULL){ division = g_ascii_strtoull(str, NULL, 10); } /* append header */ ags_midi_builder_append_header(midi_builder, offset, format, track_count, division, 0, 0, 0); } void ags_midi_builder_append_xml_node_tracks(AgsMidiBuilder *midi_builder, xmlNode *node){ xmlNode *child; child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "midi-track", 11)){ ags_midi_builder_append_xml_node_track(midi_builder, child); } } child = child->next; } } void ags_midi_builder_append_xml_node_track(AgsMidiBuilder *midi_builder, xmlNode *node){ xmlNode *child; xmlChar *str; guint offset; /* offset */ str = xmlGetProp(node, "offset"); offset = 0; if(str != NULL){ offset = g_ascii_strtoull(str, NULL, 10); } ags_midi_builder_append_track(midi_builder, NULL); midi_builder->current_midi_track->offset = offset; ags_midi_buffer_util_put_track(midi_builder->current_midi_track->data, 0); /* child nodes */ child = node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "midi-message", 13)){ ags_midi_builder_append_xml_node_message(midi_builder, child); }else if(!xmlStrncmp(child->name, (xmlChar *) "midi-system-common", 19)){ ags_midi_builder_append_xml_node_system_common(midi_builder, child); }else if(!xmlStrncmp(child->name, (xmlChar *) "meta-event", 11)){ ags_midi_builder_append_xml_node_meta_event(midi_builder, child); } } child = child->next; } } void ags_midi_builder_append_xml_node_message(AgsMidiBuilder *midi_builder, xmlNode *node){ xmlChar *event; xmlChar *str; guint delta_time; /* get event */ event = xmlGetProp(node, "event"); if(event == NULL){ return; } /* get event */ delta_time = 0; str = xmlGetProp(node, "delta-time"); if(str != NULL){ delta_time = g_ascii_strtoull(str, NULL, 10); } /* compute event */ if(!xmlStrncmp(event, "note-on", 8)){ guint key, note, velocity; /* key */ key = 0; str = xmlGetProp(node, "key"); if(str != NULL){ key = g_ascii_strtoull(str, NULL, 10); } /* note */ note = 0; str = xmlGetProp(node, "note"); if(str != NULL){ note = g_ascii_strtoull(str, NULL, 10); } /* velocity */ velocity = 0; str = xmlGetProp(node, "velocity"); if(str != NULL){ velocity = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_key_on(midi_builder, delta_time, key, note, velocity); }else if(!xmlStrncmp(event, "note-off", 9)){ guint key, note, velocity; /* key */ key = 0; str = xmlGetProp(node, "key"); if(str != NULL){ key = g_ascii_strtoull(str, NULL, 10); } /* note */ note = 0; str = xmlGetProp(node, "note"); if(str != NULL){ note = g_ascii_strtoull(str, NULL, 10); } /* velocity */ velocity = 0; str = xmlGetProp(node, "velocity"); if(str != NULL){ velocity = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_key_off(midi_builder, delta_time, key, note, velocity); }else if(!xmlStrncmp(event, "polyphonic", 11)){ guint key, note, pressure; /* key */ key = 0; str = xmlGetProp(node, "key"); if(str != NULL){ key = g_ascii_strtoull(str, NULL, 10); } /* note */ note = 0; str = xmlGetProp(node, "note"); if(str != NULL){ note = g_ascii_strtoull(str, NULL, 10); } /* pressure */ pressure = 0; str = xmlGetProp(node, "pressure"); if(str != NULL){ pressure = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_key_pressure(midi_builder, delta_time, key, note, pressure); }else if(!xmlStrncmp(event, "change-parameter", 11)){ guint channel, control, value; /* channel */ channel = 0; str = xmlGetProp(node, "channel"); if(str != NULL){ channel = g_ascii_strtoull(str, NULL, 10); } /* control */ control = 0; str = xmlGetProp(node, "control"); if(str != NULL){ control = g_ascii_strtoull(str, NULL, 10); } /* value */ value = 0; str = xmlGetProp(node, "value"); if(str != NULL){ value = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_change_parameter(midi_builder, delta_time, channel, control, value); }else if(!xmlStrncmp(event, "pitch-bend", 11)){ guint channel, pitch, transmitter; /* channel */ channel = 0; str = xmlGetProp(node, "channel"); if(str != NULL){ channel = g_ascii_strtoull(str, NULL, 10); } /* pitch */ pitch = 0; str = xmlGetProp(node, "pitch-bend"); if(str != NULL){ pitch = g_ascii_strtoull(str, NULL, 10); } /* transmitter */ transmitter = 0; str = xmlGetProp(node, "transmitter"); if(str != NULL){ transmitter = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_change_pitch_bend(midi_builder, delta_time, channel, pitch, transmitter); }else if(!xmlStrncmp(event, "program-change", 15)){ guint channel, program; /* channel */ channel = 0; str = xmlGetProp(node, "channel"); if(str != NULL){ channel = g_ascii_strtoull(str, NULL, 10); } /* program */ program = 0; str = xmlGetProp(node, "program"); if(str != NULL){ program = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_change_program(midi_builder, delta_time, channel, program); }else if(!xmlStrncmp(event, "channel-pressure", 17)){ guint channel, pressure; /* channel */ channel = 0; str = xmlGetProp(node, "channel"); if(str != NULL){ channel = g_ascii_strtoull(str, NULL, 10); } /* pressure */ pressure = 0; str = xmlGetProp(node, "pressure"); if(str != NULL){ pressure = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_change_pressure(midi_builder, delta_time, channel, pressure); }else if(!xmlStrncmp(event, "misc", 5)){ g_warning("not supported MIDI message misc"); }else if(!xmlStrncmp(event, "sequence-number", 16)){ guint sequence; /* sequence */ sequence = 0; str = xmlGetProp(node, "sequence"); if(str != NULL){ sequence = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_sequence_number(midi_builder, delta_time, sequence); }else if(!xmlStrncmp(event, "end-of-track", 13)){ g_warning("not supported MIDI message end-of-track"); }else if(!xmlStrncmp(event, "smtpe", 6)){ guint rr, hr, mn, se, fr; /* timestamp */ rr = 0; hr = 0; mn = 0; se = 0; fr = 0; str = xmlGetProp(node, "rate"); if(str != NULL){ sscanf(str, "%d", &rr); } str = xmlGetProp(node, "timestamp"); if(str != NULL){ sscanf(str, "%d %d %d %d", &hr, &mn, &se, &fr); } /* append */ ags_midi_builder_append_smtpe(midi_builder, delta_time, rr, hr, mn, se, fr); }else if(!xmlStrncmp(event, "tempo-number", 13)){ gint tempo; /* tempo */ tempo = 0; str = xmlGetProp(node, "tempo"); if(str != NULL){ tempo = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_tempo(midi_builder, delta_time, tempo); }else if(!xmlStrncmp(event, "time-signature", 16)){ guint nn, dd, cc, bb; guint denom = 1; /* timesig */ nn = 0; dd = 0; cc = 0; bb = 0; str = xmlGetProp(node, "timesign"); if(str != NULL){ sscanf(str, "%d/%d %d %d", &nn, &denom, &cc, &bb); } while(denom != 1){ dd++; denom /= 2; } /* append */ ags_midi_builder_append_time_signature(midi_builder, delta_time, nn, dd, cc, bb); }else if(!xmlStrncmp(event, "key-signature", 14)){ xmlChar *minor; gint sf; guint mi; /* keysig */ minor = NULL; sf = 0; mi = 1; str = xmlGetProp(node, "timesign"); if(str != NULL){ sscanf(str, "%d %s", &sf, &minor); } /* sharp flats */ if(sf < 0){ sf += 256; } /* minor */ if(!g_ascii_strncasecmp(minor, "minor", 6)){ mi = 1; }else{ mi = 0; } /* append */ ags_midi_builder_append_key_signature(midi_builder, delta_time, sf, mi); } } void ags_midi_builder_append_xml_node_system_common(AgsMidiBuilder *midi_builder, xmlNode *node){ xmlChar *str; guint delta_time; /* get delta-time */ delta_time = 0; str = xmlGetProp(node, "delta-time"); if(str != NULL){ delta_time = g_ascii_strtoull(str, NULL, 10); } /* parse node */ if((str = xmlGetProp(node, "quarter-frame")) != NULL){ guint quarter_frame; guint message_type, values; /* get quarter frame */ quarter_frame = 0; str = xmlGetProp(node, "quarter-frame"); if(str != NULL){ quarter_frame = g_ascii_strtoull(str, NULL, 10); } message_type = 0x70 & quarter_frame; values = 0x0f & quarter_frame; /* append */ ags_midi_builder_append_quarter_frame(midi_builder, delta_time, message_type, values); }else if((str = xmlGetProp(node, "song-position")) != NULL){ guint song_position; /* get song position */ song_position = 0; str = xmlGetProp(node, "song-position"); if(str != NULL){ song_position = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_song_position(midi_builder, delta_time, song_position); }else if((str = xmlGetProp(node, "song-select")) != NULL){ guint song_select; /* get song select */ song_select = 0; str = xmlGetProp(node, "song-select"); if(str != NULL){ song_select = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_song_select(midi_builder, delta_time, song_select); } } void ags_midi_builder_append_xml_node_meta_event(AgsMidiBuilder *midi_builder, xmlNode *node){ xmlChar *str; guint delta_time; guint len, id, data; /* get delta-time */ delta_time = 0; str = xmlGetProp(node, "delta-time"); if(str != NULL){ delta_time = g_ascii_strtoull(str, NULL, 10); } /* length */ len = 0; str = xmlGetProp(node, "length"); if(str != NULL){ len = g_ascii_strtoull(str, NULL, 10); } /* id */ id = 0; str = xmlGetProp(node, "id"); if(str != NULL){ id = g_ascii_strtoull(str, NULL, 10); } /* data */ data = 0; str = xmlGetProp(node, "data"); if(str != NULL){ data = g_ascii_strtoull(str, NULL, 10); } /* append */ ags_midi_builder_append_sequencer_meta_event(midi_builder, delta_time, len, id, data); } if(!xmlStrncmp(node->name, "midi-header", 12)){ ags_midi_builder_append_xml_node_header(midi_builder, node); }else if(!xmlStrncmp(node->name, "midi-tracks", 12)){ ags_midi_builder_append_xml_node_tracks(midi_builder, node); }else if(!xmlStrncmp(node->name, "midi-track", 12)){ ags_midi_builder_append_xml_node_track(midi_builder, node); }else if(!xmlStrncmp(node->name, "midi-message", 12)){ ags_midi_builder_append_xml_node_message(midi_builder, node); }else if(!xmlStrncmp(node->name, "midi-system-common", 12)){ ags_midi_builder_append_xml_node_system_common(midi_builder, node); }else if(!xmlStrncmp(node->name, "meta-event", 12)){ ags_midi_builder_append_xml_node_meta_event(midi_builder, node); } } /** * ags_midi_builder_from_xml_doc: * @midi_builder: the #AgsMidiBuilder * @doc: the xmlDocument * * Builds from XML document @doc. * * Since: 1.0.0 */ void ags_midi_builder_from_xml_doc(AgsMidiBuilder *midi_builder, xmlDoc *doc) { xmlNode *root_node; xmlNode *child; if(midi_builder == NULL || doc == NULL){ return; } root_node = xmlDocGetRootElement(doc); child = root_node->children; while(child != NULL){ if(child->type == XML_ELEMENT_NODE){ if(!xmlStrncmp(child->name, (xmlChar *) "midi-header", 13)){ ags_midi_builder_append_xml_node(midi_builder, child); }else if(!xmlStrncmp(child->name, (xmlChar *) "midi-tracks", 13)){ ags_midi_builder_append_xml_node(midi_builder, child); } } child = child->next; } } /** * ags_midi_builder_build: * @midi_builder: the #AgsMidiBuilder * * Build the MIDI data. * * Since: 1.0.0 */ void ags_midi_builder_build(AgsMidiBuilder *midi_builder) { GList *midi_track; unsigned char *offset; guint length; if(midi_builder == NULL){ return; } /* compute length */ length = 0; if(midi_builder->midi_header != NULL){ length += midi_builder->midi_header->length; } midi_track = midi_builder->midi_track; while(midi_track != NULL){ length += AGS_MIDI_BUILDER_TRACK(midi_track->data)->length; length += 4; //NOTE:JK: EOT midi_track = midi_track->next; } /* allocate buffer */ if(midi_builder->data != NULL){ free(midi_builder->data); } if(length > 0){ midi_builder->data = (unsigned char *) malloc(length * sizeof(unsigned char)); midi_builder->length = length; }else{ midi_builder->data = NULL; midi_builder->length = 0; return; } /* fill */ offset = midi_builder->data; if(midi_builder->midi_header != NULL & midi_builder->midi_header->data != NULL){ memcpy(offset, midi_builder->midi_header->data, midi_builder->midi_header->length * sizeof(unsigned char)); offset += midi_builder->midi_header->length; } midi_track = midi_builder->midi_track; while(midi_track != NULL){ if(AGS_MIDI_BUILDER_TRACK(midi_track->data)->data != NULL){ memcpy(offset, AGS_MIDI_BUILDER_TRACK(midi_track->data)->data, AGS_MIDI_BUILDER_TRACK(midi_track->data)->length * sizeof(unsigned char)); offset += AGS_MIDI_BUILDER_TRACK(midi_track->data)->length; ags_midi_buffer_util_put_end_of_track(offset, 0); offset += 4; } midi_track = midi_track->next; } } /** * ags_midi_builder_new: * @file: the FILE handle * * Creates a new #AgsMidiBuilder * * Returns: an #AgsMidiBuilder * * Since: 1.0.0 */ AgsMidiBuilder* ags_midi_builder_new(FILE *file) { AgsMidiBuilder *midi_builder; midi_builder = (AgsMidiBuilder *) g_object_new(AGS_TYPE_MIDI_BUILDER, "file", file, NULL); return(midi_builder); } gsequencer-1.4.24/ags/audio/midi/ags_midi_file.dtd0000644000175000017500000000416613246707333016750 00000000000000 gsequencer-1.4.24/ags/audio/ags_port.h0000644000175000017500000000757513256163135014551 00000000000000/* 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 . */ #ifndef __AGS_PORT_H__ #define __AGS_PORT_H__ #include #include #include #include #include #include #define AGS_TYPE_PORT (ags_port_get_type()) #define AGS_PORT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PORT, AgsPort)) #define AGS_PORT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PORT, AgsPortClass)) #define AGS_IS_PORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PORT)) #define AGS_IS_PORT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PORT)) #define AGS_PORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PORT, AgsPortClass)) typedef struct _AgsPort AgsPort; typedef struct _AgsPortClass AgsPortClass; /** * AgsPortFlags: * @AGS_PORT_ADDED_TO_REGISTRY: add to registry * @AGS_PORT_CONNECTED: indicates the port was connected by calling #AgsConnectable::connect() * @AGS_PORT_CONVERT_ALWAYS: convert always * @AGS_PORT_USE_LADSPA_FLOAT: use ladspa float * @AGS_PORT_IS_OUTPUT: is output * @AGS_PORT_INFINITE_RANGE: infinite range * * Enum values to control the behavior or indicate internal state of #AgsPort by * enable/disable as flags. */ typedef enum{ AGS_PORT_ADDED_TO_REGISTRY = 1, AGS_PORT_CONNECTED = 1 << 1, AGS_PORT_CONVERT_ALWAYS = 1 << 2, AGS_PORT_USE_LADSPA_FLOAT = 1 << 3, AGS_PORT_IS_OUTPUT = 1 << 4, AGS_PORT_INFINITE_RANGE = 1 << 5, }AgsPortFlags; struct _AgsPort { GObject object; guint flags; gchar *plugin_name; gchar *specifier; gchar *control_port; gboolean port_value_is_pointer; GType port_value_type; guint port_value_size; guint port_value_length; pthread_mutex_t *mutex; gpointer port_descriptor; AgsConversion *conversion; GList *automation; union _AgsPortValue{ gboolean ags_port_boolean; gint64 ags_port_int; guint64 ags_port_uint; gfloat ags_port_float; LADSPA_Data ags_port_ladspa; gdouble ags_port_double; AgsComplex ags_port_complex; gboolean *ags_port_boolean_ptr; gint64 *ags_port_int_ptr; guint64 *ags_port_uint_ptr; gfloat *ags_port_float_ptr; gdouble *ags_port_double_ptr; AgsComplex *ags_port_complex_ptr; gpointer ags_port_pointer; GObject *ags_port_object; }port_value; }; struct _AgsPortClass { GObjectClass object; void (*safe_read)(AgsPort *port, GValue *value); void (*safe_write)(AgsPort *port, GValue *value); void (*safe_get_property)(AgsPort *port, gchar *property_name, GValue *value); void (*safe_set_property)(AgsPort *port, gchar *property_name, GValue *value); }; GType ags_port_get_type(); void ags_port_safe_read(AgsPort *port, GValue *value); void ags_port_safe_write(AgsPort *port, GValue *value); void ags_port_safe_write_raw(AgsPort *port, GValue *value); void ags_port_safe_get_property(AgsPort *port, gchar *property_name, GValue *value); void ags_port_safe_set_property(AgsPort *port, gchar *property_name, GValue *value); GList* ags_port_find_specifier(GList *port, gchar *specifier); AgsPort* ags_port_new(); #endif /*__AGS_PORT_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_id.c0000644000175000017500000002654613256163135015475 00000000000000/* 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 . */ #include #include #include #include #include void ags_recall_id_class_init(AgsRecallIDClass *recall_id); void ags_recall_id_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_id_init(AgsRecallID *recall_id); void ags_recall_id_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_id_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_id_connect(AgsConnectable *connectable); void ags_recall_id_disconnect(AgsConnectable *connectable); void ags_recall_id_dispose(GObject *gobject); void ags_recall_id_finalize(GObject *gobject); /** * SECTION:ags_recall_id * @short_description: The object specifies run context. * @title: AgsRecallID * @section_id: * @include: ags/audio/ags_recall_id.h * * #AgsRecallID acts as dynamic context identifier. */ enum{ PROP_0, PROP_RECYCLING, PROP_RECYCLING_CONTEXT, }; static gpointer ags_recall_id_parent_class = NULL; GType ags_recall_id_get_type(void) { static GType ags_type_recall_id = 0; if(!ags_type_recall_id){ static const GTypeInfo ags_recall_id_info = { sizeof (AgsRecallIDClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_id_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallID), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_id_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_id_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_id = g_type_register_static(G_TYPE_OBJECT, "AgsRecallID", &ags_recall_id_info, 0); g_type_add_interface_static(ags_type_recall_id, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_recall_id); } void ags_recall_id_class_init(AgsRecallIDClass *recall_id) { GObjectClass *gobject; GParamSpec *param_spec; ags_recall_id_parent_class = g_type_class_peek_parent(recall_id); /* GObjectClass */ gobject = (GObjectClass *) recall_id; gobject->set_property = ags_recall_id_set_property; gobject->get_property = ags_recall_id_get_property; gobject->dispose = ags_recall_id_dispose; gobject->finalize = ags_recall_id_finalize; /* properties */ /** * AgsRecallID:recycling: * * The assigned #AgsRecycling. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recycling", i18n_pspec("assigned recycling"), i18n_pspec("The recycling it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECYCLING, param_spec); /** * AgsRecallID:recycling-context: * * The dynamic run context belonging to. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recycling-context", i18n_pspec("assigned recycling context"), i18n_pspec("The recycling context it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECYCLING_CONTEXT, param_spec); } void ags_recall_id_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_recall_id_connect; connectable->disconnect = ags_recall_id_disconnect; } void ags_recall_id_init(AgsRecallID *recall_id) { recall_id->flags = 0; recall_id->recycling = NULL; recall_id->recycling_context = NULL; } void ags_recall_id_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallID *recall_id; recall_id = AGS_RECALL_ID(gobject); switch(prop_id){ case PROP_RECYCLING: { AgsRecycling *recycling; recycling = g_value_get_object(value); if(recall_id->recycling == (GObject *) recycling){ return; } if(recall_id->recycling != NULL){ g_object_unref(recall_id->recycling); } if(recycling != NULL){ g_object_ref(recycling); } recall_id->recycling = (GObject *) recycling; } break; case PROP_RECYCLING_CONTEXT: { AgsRecyclingContext *recycling_context; recycling_context = g_value_get_object(value); if(recall_id->recycling_context == recycling_context){ return; } if(recall_id->recycling_context != NULL){ g_object_unref(recall_id->recycling_context); } if(recycling_context != NULL){ g_object_ref(recycling_context); } recall_id->recycling_context = recycling_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_id_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallID *recall_id; recall_id = AGS_RECALL_ID(gobject); switch(prop_id){ case PROP_RECYCLING: { g_value_set_object(value, recall_id->recycling); } break; case PROP_RECYCLING_CONTEXT: { g_value_set_object(value, recall_id->recycling_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_id_connect(AgsConnectable *connectable) { AgsRecallID *recall_id; recall_id = AGS_RECALL_ID(connectable); if((AGS_RECALL_ID_CONNECTED & (recall_id->flags)) != 0){ return; } recall_id->flags |= AGS_RECALL_ID_CONNECTED; } void ags_recall_id_disconnect(AgsConnectable *connectable) { AgsRecallID *recall_id; recall_id = AGS_RECALL_ID(connectable); if((AGS_RECALL_ID_CONNECTED & (recall_id->flags)) == 0){ return; } recall_id->flags &= (~AGS_RECALL_ID_CONNECTED); } void ags_recall_id_dispose(GObject *gobject) { AgsRecallID *recall_id; recall_id = AGS_RECALL_ID(gobject); if(recall_id->recycling != NULL){ g_object_unref(recall_id->recycling); recall_id->recycling = NULL; } if(recall_id->recycling_context != NULL){ g_object_unref(recall_id->recycling_context); recall_id->recycling_context = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_id_parent_class)->dispose(gobject); } void ags_recall_id_finalize(GObject *gobject) { AgsRecallID *recall_id; recall_id = AGS_RECALL_ID(gobject); if(recall_id->recycling != NULL){ g_object_unref(recall_id->recycling); } if(recall_id->recycling_context != NULL){ g_object_unref(recall_id->recycling_context); } /* call parent */ G_OBJECT_CLASS(ags_recall_id_parent_class)->finalize(gobject); } /** * ags_recall_id_get_run_stage: * @id: the #AgsRecallID to check * @stage: the current run stage to check against * * Check if a run stage already has been passed for current run. This * function is intended to handle AGS_AUDIO_ASYNC correctly. * * Returns: %TRUE if the stage isn't run yet otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_recall_id_get_run_stage(AgsRecallID *id, gint stage) { switch(stage){ case 0: { if((AGS_RECALL_ID_PRE & (id->flags)) == 0){ return(TRUE); } } break; case 1: { if((AGS_RECALL_ID_INTER & (id->flags)) == 0){ return(TRUE); } } break; case 2: { if((AGS_RECALL_ID_POST & (id->flags)) == 0){ return(TRUE); } } break; } return(FALSE); } /** * ags_recall_id_set_run_stage: * @recall_id: the #AgsRecallID which has been passed * @stage: the run stage the networked channels are in * * Marks the run stage to be passed for audio channel. * * Since: 1.0.0 */ void ags_recall_id_set_run_stage(AgsRecallID *recall_id, gint stage) { guint i; if(stage == 0){ recall_id->flags |= AGS_RECALL_ID_PRE; }else if(stage == 1){ recall_id->flags |= AGS_RECALL_ID_INTER; }else{ recall_id->flags |= AGS_RECALL_ID_POST; } } /** * ags_recall_id_unset_run_stage: * @recall_id: the #AgsRecallID which has been passed * @stage: the run stage the networked channels are in * * Unmarks the run stage to be passed for audio channel. * * Since: 1.0.0 */ void ags_recall_id_unset_run_stage(AgsRecallID *recall_id, gint stage) { if(stage == 0){ recall_id->flags &= (~AGS_RECALL_ID_PRE); }else if(stage == 1){ recall_id->flags &= (~AGS_RECALL_ID_INTER); }else{ recall_id->flags &= (~AGS_RECALL_ID_POST); } } /** * ags_recall_id_add: * @recall_id_list: the #GList the new #AgsRecallID should be added * @recall_id: the #AgsRecallID to add * * Adds an #AgsRecallID with given properties to the passed #GList. * * Returns: the newly allocated #GList which is the new start of the #GList, too. * * Since: 1.0.0 */ GList* ags_recall_id_add(GList *recall_id_list, AgsRecallID *recall_id) { GList *list; list = g_list_prepend(recall_id_list, (gpointer) recall_id); return(list); } /** * ags_recall_id_find_recycling_context: * @recall_id_list: a #GList containing #AgsRecallID * @recycling_context: the #AgsRecyclingContext to match * * Retrieve recall id by recycling context. * * Returns: Matching recall id. * * Since: 1.0.0 */ AgsRecallID* ags_recall_id_find_recycling_context(GList *recall_id_list, AgsRecyclingContext *recycling_context) { AgsRecallID *recall_id; while(recall_id_list != NULL){ recall_id = AGS_RECALL_ID(recall_id_list->data); if(recall_id->recycling_context == recycling_context){ return(recall_id); } recall_id_list = recall_id_list->next; } return(NULL); } /** * ags_recall_id_find_parent_recycling_context: * @recall_id_list: a #GList containing #AgsRecallID * @parent_recycling_context: the #AgsRecyclingContext to match * * Retrieve recall id by recycling context. * * Returns: Matching recall id. * * Since: 1.0.0 */ AgsRecallID* ags_recall_id_find_parent_recycling_context(GList *recall_id_list, AgsRecyclingContext *parent_recycling_context) { AgsRecallID *recall_id; while(recall_id_list != NULL){ recall_id = AGS_RECALL_ID(recall_id_list->data); if(recall_id->recycling_context != NULL && recall_id->recycling_context->parent == parent_recycling_context){ return(recall_id); } recall_id_list = recall_id_list->next; } return(NULL); } /** * ags_recall_id_new: * @recycling: the assigned #AgsRecycling * * Creates a #AgsRecallID, assigned to @recycling * * Returns: a new #AgsRecallID * * Since: 1.0.0 */ AgsRecallID* ags_recall_id_new(AgsRecycling *recycling) { AgsRecallID *recall_id; recall_id = (AgsRecallID *) g_object_new(AGS_TYPE_RECALL_ID, NULL); return(recall_id); } gsequencer-1.4.24/ags/audio/ags_sound_provider.c0000644000175000017500000001530413256163135016607 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include void ags_sound_provider_class_init(AgsSoundProviderInterface *interface); /** * SECTION:ags_sound_provider * @short_description: provide accoustics * @title: AgsSoundProvider * @section_id: AgsSoundProvider * @include: ags/audio/ags_sound_provider.h * * The #AgsSoundProvider provides you the advanced audio capabilities. */ GType ags_sound_provider_get_type() { static GType ags_type_sound_provider = 0; if(!ags_type_sound_provider){ ags_type_sound_provider = g_type_register_static_simple(G_TYPE_INTERFACE, "AgsSoundProvider", sizeof(AgsSoundProviderInterface), (GClassInitFunc) ags_sound_provider_class_init, 0, NULL, 0); } return(ags_type_sound_provider); } void ags_sound_provider_class_init(AgsSoundProviderInterface *interface) { /* empty */ } /** * ags_sound_provider_set_soundcard: * @sound_provider: the #AgsSoundProvider * @soundcard: a #GList-struct containing #AgsSoundcard * * Set soundcards. * * Since: 1.0.0 */ void ags_sound_provider_set_soundcard(AgsSoundProvider *sound_provider, GList *soundcard) { AgsSoundProviderInterface *sound_provider_interface; g_return_if_fail(AGS_IS_SOUND_PROVIDER(sound_provider)); sound_provider_interface = AGS_SOUND_PROVIDER_GET_INTERFACE(sound_provider); g_return_if_fail(sound_provider_interface->set_soundcard); sound_provider_interface->set_soundcard(sound_provider, soundcard); } /** * ags_sound_provider_get_soundcard: * @sound_provider: the #AgsSoundProvider * * Get soundcards. * * Returns: a #GList-struct containing #AgsSoundcard * * Since: 1.0.0 */ GList* ags_sound_provider_get_soundcard(AgsSoundProvider *sound_provider) { AgsSoundProviderInterface *sound_provider_interface; g_return_val_if_fail(AGS_IS_SOUND_PROVIDER(sound_provider), NULL); sound_provider_interface = AGS_SOUND_PROVIDER_GET_INTERFACE(sound_provider); g_return_val_if_fail(sound_provider_interface->get_soundcard, NULL); return(sound_provider_interface->get_soundcard(sound_provider)); } /** * ags_sound_provider_set_default_soundcard_thread: * @sound_provider: the #AgsSoundProvider * @soundcard_thread: the default #AgsThread * * set default soundcard thread. * * Returns: the #AgsThread * * Since: 1.0.0 */ void ags_sound_provider_set_default_soundcard_thread(AgsSoundProvider *sound_provider, GObject *soundcard_thread) { AgsSoundProviderInterface *sound_provider_interface; g_return_if_fail(AGS_IS_SOUND_PROVIDER(sound_provider)); sound_provider_interface = AGS_SOUND_PROVIDER_GET_INTERFACE(sound_provider); g_return_if_fail(sound_provider_interface->set_default_soundcard_thread); sound_provider_interface->set_default_soundcard_thread(sound_provider, soundcard_thread); } /** * ags_sound_provider_get_default_soundcard_thread: * @sound_provider: the #AgsSoundProvider * * Get default soundcard thread. * * Returns: the #AgsThread * * Since: 1.0.0 */ GObject* ags_sound_provider_get_default_soundcard_thread(AgsSoundProvider *sound_provider) { AgsSoundProviderInterface *sound_provider_interface; g_return_val_if_fail(AGS_IS_SOUND_PROVIDER(sound_provider), NULL); sound_provider_interface = AGS_SOUND_PROVIDER_GET_INTERFACE(sound_provider); g_return_val_if_fail(sound_provider_interface->get_default_soundcard_thread, NULL); return(sound_provider_interface->get_default_soundcard_thread(sound_provider)); } /** * ags_sound_provider_set_sequencer: * @sound_provider: the #AgsSoundProvider * @sequencer: a #GList-struct containing #AgsSequencer * * Set sequencers. * * Since: 1.0.0 */ void ags_sound_provider_set_sequencer(AgsSoundProvider *sound_provider, GList *sequencer) { AgsSoundProviderInterface *sound_provider_interface; g_return_if_fail(AGS_IS_SOUND_PROVIDER(sound_provider)); sound_provider_interface = AGS_SOUND_PROVIDER_GET_INTERFACE(sound_provider); g_return_if_fail(sound_provider_interface->set_sequencer); sound_provider_interface->set_sequencer(sound_provider, sequencer); } /** * ags_sound_provider_get_sequencer: * @sound_provider: the #AgsSoundProvider * * Get sequencers. * * Returns: a #GList-struct containing #AgsSequencer * * Since: 1.0.0 */ GList* ags_sound_provider_get_sequencer(AgsSoundProvider *sound_provider) { AgsSoundProviderInterface *sound_provider_interface; g_return_val_if_fail(AGS_IS_SOUND_PROVIDER(sound_provider), NULL); sound_provider_interface = AGS_SOUND_PROVIDER_GET_INTERFACE(sound_provider); g_return_val_if_fail(sound_provider_interface->get_sequencer, NULL); return(sound_provider_interface->get_sequencer(sound_provider)); } /** * ags_sound_provider_set_distributed_manager: * @sound_provider: the #AgsSoundProvider * @distributed_manager: a #GList-struct containing #AgsDistributedManager * * Set distributed manager. * * Since: 1.0.0 */ void ags_sound_provider_set_distributed_manager(AgsSoundProvider *sound_provider, GList *distributed_manager) { AgsSoundProviderInterface *sound_provider_interface; g_return_if_fail(AGS_IS_SOUND_PROVIDER(sound_provider)); sound_provider_interface = AGS_SOUND_PROVIDER_GET_INTERFACE(sound_provider); g_return_if_fail(sound_provider_interface->set_distributed_manager); sound_provider_interface->set_distributed_manager(sound_provider, distributed_manager); } /** * ags_sound_provider_get_distributed_manager: * @sound_provider: the #AgsSoundProvider * * Set distributed manager. * * Returns: a #GList-struct containing #AgsDistributedManager * * Since: 1.0.0 */ GList* ags_sound_provider_get_distributed_manager(AgsSoundProvider *sound_provider) { AgsSoundProviderInterface *sound_provider_interface; g_return_val_if_fail(AGS_IS_SOUND_PROVIDER(sound_provider), NULL); sound_provider_interface = AGS_SOUND_PROVIDER_GET_INTERFACE(sound_provider); g_return_val_if_fail(sound_provider_interface->get_distributed_manager, NULL); return(sound_provider_interface->get_distributed_manager(sound_provider)); } gsequencer-1.4.24/ags/audio/ags_channel_iter.c0000644000175000017500000001170413247044247016202 00000000000000/* 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 . */ #include #include #include AgsChannelIter* ags_channel_iter_alloc(AgsChannel *start) { AgsChannelIter *iter; iter = (AgsChannelIter *) malloc(sizeof(AgsChannelIter)); iter->flags = 0; iter->flags_mask = 0; iter->current_start = start; iter->parent = NULL; iter->children = NULL; iter->current_iter = iter; iter->current = NULL; return(iter); } void ags_channel_iter_free(AgsChannelIter *iter) { } AgsChannel* ags_channel_iter_prev(AgsChannelIter *iter, guint mode) { //TODO:JK: implement me return(NULL); } AgsChannel* ags_channel_iter_next(AgsChannelIter *iter, guint mode) { AgsAudio *audio; AgsChannel *channel; AgsChannel *input, *output; AgsChannel *next_pad; AgsChannel *link; AgsChannelIter *current_iter, *next_iter, *new_iter; guint audio_flags; guint audio_channel; guint output_line; gboolean success; if(iter->current_start == NULL || iter->flags_mask == 0x1f){ return(NULL); } audio = NULL; input = NULL; output = NULL; current_iter = NULL; next_iter = NULL; success = FALSE; if((AGS_CHANNEL_ITER_DIRECTION_AXIS_TO_LEAFES & (iter->flags_mask)) == 0){ if(iter->current_iter == NULL){ current_iter = iter; }else{ current_iter = iter->current_iter; } next_iter = current_iter; channel = next_iter->current; if((AGS_CHANNEL_ITER_LEVEL_STRICT & (iter->flags)) != 0){ if(AGS_IS_OUTPUT(channel)){ if((AGS_CHANNEL_ITER_DIRECTION_AXIS_TO_LEAFES & (next_iter->flags_mask)) == 0){ output = channel; /* go down */ audio = output->audio; audio_channel = output->audio_channel; output_line = output->line; input = audio->input; audio_flags = audio->flags; if((AGS_AUDIO_ASYNC & (audio_flags)) != 0){ channel = ags_channel_nth(input, audio_channel); }else{ channel = ags_channel_nth(input, output_line); } if(channel != NULL){ /* allocate new iter */ new_iter = ags_channel_iter_alloc(channel); new_iter->current = channel; next_iter->children = g_list_append(next_iter->children, new_iter); new_iter->parent = next_iter; /* mark and replace next */ next_iter->flags_mask |= AGS_CHANNEL_ITER_DIRECTION_AXIS_TO_LEAFES; next_iter = new_iter; }else{ /* go up and select next */ } }else{ /* go up and select next */ } }else{ if((AGS_CHANNEL_ITER_DIRECTION_AXIS_TO_LEAFES & (next_iter->flags_mask)) == 0){ input = channel; if((AGS_AUDIO_ASYNC & (audio_flags)) != 0){ next_pad = input->next_pad; if(next_pad != NULL){ channel = next_pad; /* allocate new iter */ new_iter = ags_channel_iter_alloc(channel); new_iter->current = channel; next_iter->children = g_list_append(next_iter->children, new_iter); new_iter->parent = next_iter; }else{ /* go down/up and select next */ } }else{ link = input->link; if(link != NULL){ channel = link; /* allocate new iter */ new_iter = ags_channel_iter_alloc(channel); new_iter->current = channel; next_iter->children = g_list_append(next_iter->children, new_iter); new_iter->parent = next_iter; /* mark and replace next */ next_iter->flags_mask |= AGS_CHANNEL_ITER_DIRECTION_AXIS_TO_LEAFES; next_iter = new_iter; }else{ /* go up and select next */ } } }else{ /* go up and select next */ } } }else{ while(channel != NULL && !success){ while(channel != NULL && !success){ if(mode == AGS_CHANNEL_ITER_UNTIL_NEXT_LEVEL){ } } } } /* set return value */ iter->current_iter = next_iter; iter->current = next_iter->current; }else if((AGS_CHANNEL_ITER_DIRECTION_AXIS_TO_ROOT & (iter->flags_mask)) == 0){ }else if((AGS_CHANNEL_ITER_DIRECTION_LEAFES_TO_ROOT & (iter->flags_mask)) == 0){ }else if((AGS_CHANNEL_ITER_DIRECTION_ROOT_TO_LEAFES & (iter->flags_mask)) == 0){ } return(NULL); } void ags_channel_iter_init(AgsChannelIter *iter, guint flags) { iter->flags = flags; iter->flags_mask = (0x1f) & (~flags); } gsequencer-1.4.24/ags/audio/ags_recycling_context.c0000644000175000017500000006774013256163135017303 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include void ags_recycling_context_class_init(AgsRecyclingContextClass *recycling_context_class); void ags_recycling_context_init(AgsRecyclingContext *recycling_context); void ags_recycling_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recycling_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recycling_context_dispose(GObject *gobject); void ags_recycling_context_finalize(GObject *gobject); /** * SECTION:ags_recycling_context * @short_description: A context of recycling acting as dynamic context. * @title: AgsRecyclingContext * @section_id: * @include: ags/audio/ags_recycling_context.h * * #AgsRecyclingContext organizes #AgsRecycling objects as dynamic context * within nested tree. */ enum{ PROP_0, PROP_PARENT, PROP_LENGTH, PROP_RECALL_ID, }; static gpointer ags_recycling_context_parent_class = NULL; GType ags_recycling_context_get_type (void) { static GType ags_type_recycling_context = 0; if(!ags_type_recycling_context){ static const GTypeInfo ags_recycling_context_info = { sizeof (AgsRecyclingContextClass), (GBaseInitFunc) NULL, /* base_init */ (GBaseFinalizeFunc) NULL, /* base_finalize */ (GClassInitFunc) ags_recycling_context_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecyclingContext), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recycling_context_init, }; ags_type_recycling_context = g_type_register_static(G_TYPE_OBJECT, "AgsRecyclingContext", &ags_recycling_context_info, 0); } return (ags_type_recycling_context); } void ags_recycling_context_class_init(AgsRecyclingContextClass *recycling_context) { GObjectClass *gobject; GParamSpec *param_spec; ags_recycling_context_parent_class = g_type_class_peek_parent(recycling_context); gobject = (GObjectClass *) recycling_context; gobject->set_property = ags_recycling_context_set_property; gobject->get_property = ags_recycling_context_get_property; gobject->dispose = ags_recycling_context_dispose; gobject->finalize = ags_recycling_context_finalize; /* properties */ /** * AgsRecyclingContext:parent: * * The parent recycling context within tree. * * Since: 1.0.0 */ param_spec = g_param_spec_object("parent", i18n_pspec("parent context"), i18n_pspec("The context this one is packed into"), AGS_TYPE_RECYCLING_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PARENT, param_spec); /** * AgsRecyclingContext:length: * * Boundary length. * * Since: 1.0.0 */ param_spec = g_param_spec_uint64("length", i18n_pspec("length of the array of assigned recycling"), i18n_pspec("The recycling array length"), 0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LENGTH, param_spec); /** * AgsRecyclingContext:recall-id: * * The assigned #AgsRecallID. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-id", i18n_pspec("the default recall id"), i18n_pspec("The recall id located in audio object as destiny"), AGS_TYPE_RECALL_ID, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_ID, param_spec); } void ags_recycling_context_init(AgsRecyclingContext *recycling_context) { recycling_context->mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(recycling_context->mutexattr); pthread_mutexattr_settype(recycling_context->mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(recycling_context->mutexattr, PTHREAD_PRIO_INHERIT); #endif recycling_context->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(recycling_context->mutex, recycling_context->mutexattr); recycling_context->recall_id = NULL; recycling_context->recycling = NULL; recycling_context->length = 0; recycling_context->parent = NULL; recycling_context->children = NULL; } void ags_recycling_context_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecyclingContext *recycling_context; recycling_context = AGS_RECYCLING_CONTEXT(gobject); switch(prop_id){ case PROP_PARENT: { AgsRecyclingContext *parent; parent = (AgsRecyclingContext *) g_value_get_object(value); if(recycling_context->parent == parent){ return; } if(recycling_context->parent != NULL){ ags_recycling_context_remove_child(recycling_context->parent, recycling_context); } if(parent != NULL){ ags_recycling_context_add_child(parent, recycling_context); } recycling_context->parent = parent; } break; case PROP_LENGTH: { guint64 length; guint64 i; length = g_value_get_uint64(value); recycling_context->recycling = (AgsRecycling **) malloc(length * sizeof(AgsRecycling *)); recycling_context->length = length; for(i = 0; i < length; i++){ recycling_context->recycling[i] = NULL; } } break; case PROP_RECALL_ID: { AgsRecallID *recall_id; recall_id = (AgsRecallID *) g_value_get_object(value); if(recycling_context->recall_id == (GObject *) recall_id){ return; } if(recycling_context->recall_id != NULL){ g_object_unref(G_OBJECT(recycling_context->recall_id)); } if(recall_id != NULL){ g_object_ref(G_OBJECT(recall_id)); } recycling_context->recall_id = (GObject *) recall_id; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recycling_context_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecyclingContext *recycling_context; recycling_context = AGS_RECYCLING_CONTEXT(gobject); switch(prop_id){ case PROP_PARENT: { g_value_set_object(value, recycling_context->parent); } break; case PROP_LENGTH: { g_value_set_uint64(value, recycling_context->length); } break; case PROP_RECALL_ID: { g_value_set_object(value, recycling_context->recall_id); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recycling_context_dispose(GObject *gobject) { AgsRecyclingContext *recycling_context; GList *list, *list_next; guint i; recycling_context = AGS_RECYCLING_CONTEXT(gobject); /* parent */ if(recycling_context->parent != NULL){ g_object_unref(recycling_context->parent); } /* recall id */ if(recycling_context->recall_id != NULL){ g_object_unref(recycling_context->recall_id); } /* recycling */ if(recycling_context->recycling != NULL){ for(i = 0; i < recycling_context->length; i++){ g_object_unref(recycling_context->recycling[i]); } free(recycling_context->recycling); recycling_context->recycling = NULL; recycling_context->length = 0; } /* children */ list = recycling_context->children; while(list != NULL){ list_next = list->next; ags_recycling_context_remove_child(recycling_context, list->data); list = list_next; } /* call parent */ G_OBJECT_CLASS(ags_recycling_context_parent_class)->dispose(gobject); } void ags_recycling_context_finalize(GObject *gobject) { AgsRecyclingContext *recycling_context; GList *list; guint i; recycling_context = AGS_RECYCLING_CONTEXT(gobject); /* parent */ if(recycling_context->parent != NULL){ g_object_unref(recycling_context->parent); } /* recall id */ if(recycling_context->recall_id != NULL){ g_object_unref(recycling_context->recall_id); } /* recycling */ if(recycling_context->recycling != NULL){ for(i = 0; i < recycling_context->length; i++){ g_object_unref(recycling_context->recycling[i]); } free(recycling_context->recycling); } /* children */ g_list_free(recycling_context->children); /* call parent */ G_OBJECT_CLASS(ags_recycling_context_parent_class)->finalize(gobject); } /** * ags_recycling_context_replace: * @recycling_context: the #AgsRecyclingContext * @recycling: the #AgsRecycling to add * @position: the index of @recycling * * Replaces one recycling entry in a context. * * Since: 1.0.0 */ void ags_recycling_context_replace(AgsRecyclingContext *recycling_context, AgsRecycling *recycling, gint position) { if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return; } pthread_mutex_lock(recycling_context->mutex); if(position >= recycling_context->length){ pthread_mutex_unlock(recycling_context->mutex); return; } recycling_context->recycling[position] = recycling; pthread_mutex_unlock(recycling_context->mutex); } /** * ags_recycling_context_add: * @recycling_context: the #AgsRecyclingContext * @recycling: the #AgsRecycling to add * * Adds a recycling to a context. * * Returns: the new recycling context * * Since: 1.0.0 */ AgsRecyclingContext* ags_recycling_context_add(AgsRecyclingContext *recycling_context, AgsRecycling *recycling) { AgsRecyclingContext *new_recycling_context; gint new_length; guint i; if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(NULL); } pthread_mutex_lock(recycling_context->mutex); new_length = recycling_context->length + 1; new_recycling_context = (AgsRecyclingContext *) g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "length", new_length, NULL); memcpy(new_recycling_context->recycling, recycling_context->recycling, new_length * sizeof(AgsRecycling *)); new_recycling_context->recycling[new_length] = recycling; /* ref count */ for(i = 0; i < new_recycling_context->length; i++){ g_object_ref(new_recycling_context->recycling[i]); } pthread_mutex_unlock(recycling_context->mutex); return(new_recycling_context); } /** * ags_recycling_context_remove: * @recycling_context: the #AgsRecyclingContext * @recycling: the #AgsRecycling to remove * * Removes a recycling in a context. * * Returns: the new recycling context * * Since: 1.0.0 */ AgsRecyclingContext* ags_recycling_context_remove(AgsRecyclingContext *recycling_context, AgsRecycling *recycling) { AgsRecyclingContext *new_recycling_context; gint new_length; gint position; guint i; if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(NULL); } pthread_mutex_lock(recycling_context->mutex); new_recycling_context = (AgsRecyclingContext *) g_object_new(AGS_TYPE_RECYCLING_CONTEXT, NULL); new_length = recycling_context->length - 1; new_recycling_context->recycling = (AgsRecycling **) malloc(new_length * sizeof(AgsRecycling *)); for(position = 0; recycling_context->recycling[position] != recycling; position++); memcpy(new_recycling_context->recycling, recycling_context->recycling, (new_length - position) * sizeof(AgsRecycling *)); memcpy(&(new_recycling_context->recycling[position + 1]), recycling_context->recycling, (-1 * (position - new_length)) * sizeof(AgsRecycling *)); /* ref count */ for(i = 0; i < new_recycling_context->length; i++){ g_object_ref(new_recycling_context->recycling[i]); } pthread_mutex_unlock(recycling_context->mutex); return(new_recycling_context); } /** * ags_recycling_context_insert: * @recycling_context: the #AgsRecyclingContext * @recycling: the #AgsRecycling to insert * @position: the index to insert at * * Inserts a recycling to a context. * * Returns: the new recycling context * * Since: 1.0.0 */ AgsRecyclingContext* ags_recycling_context_insert(AgsRecyclingContext *recycling_context, AgsRecycling *recycling, gint position) { AgsRecyclingContext *new_recycling_context; gint new_length; guint i; if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(NULL); } pthread_mutex_lock(recycling_context->mutex); new_recycling_context = (AgsRecyclingContext *) g_object_new(AGS_TYPE_RECYCLING_CONTEXT, NULL); new_length = recycling_context->length + 1; new_recycling_context->recycling = (AgsRecycling **) malloc(new_length * sizeof(AgsRecycling *)); memcpy(new_recycling_context->recycling, recycling_context->recycling, (new_length - position) * sizeof(AgsRecycling *)); new_recycling_context->recycling[position] = recycling; memcpy(&(new_recycling_context->recycling[position + 1]), recycling_context->recycling, (-1 * (position - new_length)) * sizeof(AgsRecycling *)); /* ref count */ for(i = 0; i < new_recycling_context->length; i++){ g_object_ref(new_recycling_context->recycling[i]); } pthread_mutex_unlock(recycling_context->mutex); return(new_recycling_context); } /** * ags_recycling_context_get_toplevel: * @recycling_context: the #AgsRecyclingContext * * Iterates the tree up to highest level. * * Returns: the topmost recycling context * * Since: 1.0.0 */ AgsRecyclingContext* ags_recycling_context_get_toplevel(AgsRecyclingContext *recycling_context) { if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(NULL); } pthread_mutex_lock(recycling_context->mutex); while(recycling_context->parent != NULL){ recycling_context = recycling_context->parent; pthread_mutex_unlock(recycling_context->mutex); pthread_mutex_lock(recycling_context->mutex); } pthread_mutex_unlock(recycling_context->mutex); return(recycling_context); } /** * ags_recycling_context_find: * @recycling_context: the #AgsRecyclingContext * @recycling: the #AgsRecycling to look up * * Find position of recycling within array. * * Returns: recycling array index * * Since: 1.0.0 */ gint ags_recycling_context_find(AgsRecyclingContext *recycling_context, AgsRecycling *recycling) { gint i; if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(-1); } pthread_mutex_lock(recycling_context->mutex); for(i = 0; i < recycling_context->length; i++){ if(recycling_context->recycling[i] == recycling){ pthread_mutex_unlock(recycling_context->mutex); return(i); } } pthread_mutex_unlock(recycling_context->mutex); return(-1); } /** * ags_recycling_context_find_child: * @recycling_context: the #AgsRecyclingContext * @recycling: the #AgsRecycling to look up * * Find position of recycling within arrays. * * Returns: recycling array index * * Since: 1.0.0 */ gint ags_recycling_context_find_child(AgsRecyclingContext *recycling_context, AgsRecycling *recycling) { GList *child_start, *child; gint i; if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(-1); } pthread_mutex_lock(recycling_context->mutex); child = child_start = g_list_copy(recycling_context->children); pthread_mutex_unlock(recycling_context->mutex); for(i = 0; child != NULL; i++){ if(ags_recycling_context_find(AGS_RECYCLING_CONTEXT(child->data), recycling) != -1){ g_list_free(child_start); return(i); } child = child->next; } g_list_free(child_start); return(-1); } /** * ags_recycling_context_find_parent: * @recycling_context: the #AgsRecyclingContext * @recycling: the #AgsRecycling to look up * * Find position of recycling within array. * * Returns: recycling array index * * Since: 1.0.0 */ gint ags_recycling_context_find_parent(AgsRecyclingContext *recycling_context, AgsRecycling *recycling) { AgsRecyclingContext *parent; gint i; if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(-1); } pthread_mutex_lock(recycling_context->mutex); parent = recycling_context->parent; pthread_mutex_unlock(recycling_context->mutex); pthread_mutex_lock(parent->mutex); for(i = 0; i < parent->length; i++){ if(parent->recycling[i] == recycling){ pthread_mutex_unlock(parent->mutex); return(i); } } pthread_mutex_unlock(parent->mutex); return(-1); } /** * ags_recycling_context_add_child: * @parent: the parental #AgsRecyclingContext * @child: the child * * Adds a recycling context as child. * * Since: 1.0.0 */ void ags_recycling_context_add_child(AgsRecyclingContext *parent, AgsRecyclingContext *child) { if(!AGS_IS_RECYCLING_CONTEXT(parent) || !AGS_IS_RECYCLING_CONTEXT(child)){ return; } g_object_ref(G_OBJECT(parent)); g_object_ref(G_OBJECT(child)); /* set parent */ pthread_mutex_lock(child->mutex); child->parent = parent; pthread_mutex_unlock(child->mutex); /* add child */ pthread_mutex_lock(parent->mutex); parent->children = g_list_append(parent->children, child); pthread_mutex_unlock(parent->mutex); } /** * ags_recycling_context_remove_child: * @parent: the #AgsRecyclingContext * @child: the child to remove * * Removes a recycling context of its parent. * * Since: 1.0.0 */ void ags_recycling_context_remove_child(AgsRecyclingContext *parent, AgsRecyclingContext *child) { if(!AGS_IS_RECYCLING_CONTEXT(parent) || !AGS_IS_RECYCLING_CONTEXT(child)){ return; } /* unset parent */ pthread_mutex_lock(child->mutex); child->parent = NULL; pthread_mutex_unlock(child->mutex); /* remove child */ pthread_mutex_lock(parent->mutex); parent->children = g_list_remove(parent->children, child); pthread_mutex_unlock(parent->mutex); g_object_unref(G_OBJECT(parent)); g_object_unref(G_OBJECT(child)); } /** * ags_recycling_context_get_child_recall_id: * @recycling_context: the #AgsRecyclingContext * * Retrieve all child recall ids. * * Returns: the #AgsRecallID as #GList * * Since: 1.0.0 */ GList* ags_recycling_context_get_child_recall_id(AgsRecyclingContext *recycling_context) { GList *child_start, *child; GList *recall_id_list; if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(NULL); } pthread_mutex_lock(recycling_context->mutex); child = child_start = g_list_copy(recycling_context->children); pthread_mutex_unlock(recycling_context->mutex); recall_id_list = NULL; while(child != NULL){ pthread_mutex_lock(AGS_RECYCLING_CONTEXT(child->data)->mutex); if(AGS_RECYCLING_CONTEXT(child->data)->recall_id != NULL){ recall_id_list = g_list_append(recall_id_list, AGS_RECYCLING_CONTEXT(child->data)->recall_id); } pthread_mutex_unlock(AGS_RECYCLING_CONTEXT(child->data)->mutex); child = child->next; } g_list_free(child_start); return(recall_id_list); } /** * ags_recycling_context_reset_recycling: * @recycling_context: the #AgsRecyclingContext * @old_first_recycling: the first recycling to replace * @old_last_recycling: the last recycling to replace * @new_first_recycling: the first recycling to insert * @new_last_recycling: the last recycling to insert * * Modify recycling of context. * * Returns: the new #AgsRecyclingContext * * Since: 1.0.0 */ AgsRecyclingContext* ags_recycling_context_reset_recycling(AgsRecyclingContext *recycling_context, AgsRecycling *old_first_recycling, AgsRecycling *old_last_recycling, AgsRecycling *new_first_recycling, AgsRecycling *new_last_recycling) { AgsRecyclingContext *new_recycling_context, *parent; AgsRecycling *recycling; AgsRecycling *next, *prev; AgsMutexManager *mutex_manager; gint new_length; gint first_index, last_index; guint i; gboolean new_context; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; if(!AGS_IS_RECYCLING_CONTEXT(recycling_context)){ return(NULL); } mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); if(old_first_recycling != NULL){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) old_last_recycling); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(recycling_mutex); next = old_last_recycling->next; pthread_mutex_unlock(recycling_mutex); if(ags_recycling_position(old_first_recycling, next, new_first_recycling) == -1){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) old_first_recycling); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(recycling_mutex); prev = old_first_recycling->prev; next = old_first_recycling->next; pthread_mutex_unlock(recycling_mutex); if(prev == new_last_recycling){ new_context = FALSE; }else if(next == new_first_recycling){ new_context = FALSE; }else{ new_context = TRUE; } }else{ new_context = FALSE; } }else{ new_context = FALSE; } /* retrieve new length of recycling array */ if(new_first_recycling != NULL){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) new_last_recycling); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(recycling_mutex); next = new_last_recycling->next; pthread_mutex_unlock(recycling_mutex); if(new_first_recycling != NULL){ new_length = ags_recycling_position(new_first_recycling, next, new_last_recycling); new_length++; }else{ new_length = 0; } }else{ new_recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "length", 0, NULL); return(new_recycling_context); } /* retrieve indices to replace */ if(new_context){ first_index = 0; last_index = 0; }else if(old_first_recycling != NULL){ first_index = ags_recycling_context_find(recycling_context, old_first_recycling); last_index = ags_recycling_context_find(recycling_context, old_last_recycling); }else{ AgsRecycling **recycling; AgsRecycling *start_recycling; guint64 length; pthread_mutex_lock(recycling_context->mutex); recycling = recycling_context->recycling; if(recycling != NULL){ start_recycling = recycling[0]; }else{ start_recycling = NULL; } length = recycling_context->length; pthread_mutex_unlock(recycling_context->mutex); if(start_recycling != NULL){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) start_recycling); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(recycling_mutex); prev = start_recycling->prev; pthread_mutex_unlock(recycling_mutex); }else{ prev = NULL; } if(recycling == NULL || length == 0 || prev == new_first_recycling){ first_index = 0; last_index = 0; }else{ AgsRecycling *end_recycling; pthread_mutex_lock(recycling_context->mutex); end_recycling = recycling[length - 1]; pthread_mutex_unlock(recycling_context->mutex); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) end_recycling); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(recycling_mutex); next = end_recycling->next; pthread_mutex_unlock(recycling_mutex); first_index = ags_recycling_position(start_recycling, next, new_first_recycling); last_index = first_index; } } /* instantiate */ if(new_context){ new_recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "length", new_length, NULL); }else{ guint64 length; pthread_mutex_lock(recycling_context->mutex); length = recycling_context->length; pthread_mutex_unlock(recycling_context->mutex); new_recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "length", (length - (last_index - first_index + 1) + new_length), NULL); } pthread_mutex_lock(recycling_context->mutex); parent = recycling_context->parent; pthread_mutex_unlock(recycling_context->mutex); //FIXME:JK: critical part - may be move at end if(parent != NULL){ GList *list; pthread_mutex_lock(parent->mutex); list = g_list_find(parent->children, recycling_context); list->data = new_recycling_context; pthread_mutex_unlock(parent->mutex); g_object_ref(new_recycling_context); pthread_mutex_lock(recycling_context->mutex); new_recycling_context->parent = recycling_context->parent; g_object_ref(new_recycling_context->parent); new_recycling_context->recall_id = recycling_context->recall_id; g_object_ref(recycling_context->recall_id); pthread_mutex_unlock(recycling_context->mutex); } pthread_mutex_lock(recycling_context->mutex); new_recycling_context->children = g_list_copy(recycling_context->children); pthread_mutex_unlock(recycling_context->mutex); /* copy heading */ pthread_mutex_lock(recycling_context->mutex); if(!new_context){ if(first_index > 0){ memcpy(new_recycling_context->recycling, recycling_context->recycling, first_index * sizeof(AgsRecycling *)); } } pthread_mutex_unlock(recycling_context->mutex); /* insert new */ recycling = new_first_recycling; for(i = 0; i < new_length; i++){ /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* insert */ ags_recycling_context_replace(new_recycling_context, recycling, first_index + i); /* iterate */ pthread_mutex_lock(recycling_mutex); recycling = recycling->next; pthread_mutex_unlock(recycling_mutex); } /* copy trailing */ pthread_mutex_lock(recycling_context->mutex); if(!new_context){ if(new_recycling_context->length - first_index > 0){ memcpy(&(new_recycling_context->recycling[first_index + new_length]), &(recycling_context->recycling[first_index]), (new_recycling_context->length - first_index - new_length) * sizeof(AgsRecycling *)); } } pthread_mutex_unlock(recycling_context->mutex); /* ref count */ for(i = 0; i < new_recycling_context->length; i++){ g_object_ref(new_recycling_context->recycling[i]); } return(new_recycling_context); } /** * ags_recycling_context_new: * @length: array dimension of context * * Creates a #AgsRecyclingContext, boundaries are specified by @length * * Returns: a new #AgsRecyclingContext * * Since: 1.0.0 */ AgsRecyclingContext* ags_recycling_context_new(guint64 length) { AgsRecyclingContext *recycling_context; recycling_context = g_object_new(AGS_TYPE_RECYCLING_CONTEXT, "length", length, NULL); return(recycling_context); } gsequencer-1.4.24/ags/audio/ags_devin.h0000644000175000017500000001241013247044247014654 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_DEVIN_H__ #define __AGS_DEVIN_H__ #include #include #include #include #include #include #ifdef AGS_WITH_ALSA #include #endif #define AGS_TYPE_DEVIN (ags_devin_get_type()) #define AGS_DEVIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DEVIN, AgsDevin)) #define AGS_DEVIN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_DEVIN, AgsDevin)) #define AGS_IS_DEVIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_DEVIN)) #define AGS_IS_DEVIN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_DEVIN)) #define AGS_DEVIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_DEVIN, AgsDevinClass)) #define AGS_DEVIN_DEFAULT_ALSA_DEVICE "hw:0,0\0" #define AGS_DEVIN_DEFAULT_OSS_DEVICE "/dev/dsp\0" #define AGS_DEVIN_DEFAULT_RING_BUFFER_SIZE (8) typedef struct _AgsDevin AgsDevin; typedef struct _AgsDevinClass AgsDevinClass; /** * AgsDevinFlags: * @AGS_DEVIN_BUFFER0: ring-buffer 0 * @AGS_DEVIN_BUFFER1: ring-buffer 1 * @AGS_DEVIN_BUFFER2: ring-buffer 2 * @AGS_DEVIN_BUFFER3: ring-buffer 3 * @AGS_DEVIN_ATTACK_FIRST: use first attack, instead of second one * @AGS_DEVIN_RECORD: do capture * @AGS_DEVIN_OSS: use OSS4 backend * @AGS_DEVIN_ALSA: use ALSA backend * @AGS_DEVIN_SHUTDOWN: stop capture * @AGS_DEVIN_START_RECORD: capture starting * @AGS_DEVIN_NONBLOCKING: do non-blocking calls * @AGS_DEVIN_INITIALIZED: the soundcard was initialized * * Enum values to control the behavior or indicate internal state of #AgsDevin by * enable/disable as flags. */ typedef enum { AGS_DEVIN_BUFFER0 = 1, AGS_DEVIN_BUFFER1 = 1 << 1, AGS_DEVIN_BUFFER2 = 1 << 2, AGS_DEVIN_BUFFER3 = 1 << 3, AGS_DEVIN_ATTACK_FIRST = 1 << 4, AGS_DEVIN_RECORD = 1 << 5, AGS_DEVIN_OSS = 1 << 6, AGS_DEVIN_ALSA = 1 << 7, AGS_DEVIN_SHUTDOWN = 1 << 8, AGS_DEVIN_START_RECORD = 1 << 9, AGS_DEVIN_NONBLOCKING = 1 << 10, AGS_DEVIN_INITIALIZED = 1 << 11, }AgsDevinFlags; #define AGS_DEVIN_ERROR (ags_devin_error_quark()) typedef enum{ AGS_DEVIN_ERROR_LOCKED_SOUNDCARD, AGS_DEVIN_ERROR_BROKEN_CONFIGURATION, AGS_DEVIN_ERROR_ACCESS_TYPE_NOT_AVAILABLE, AGS_DEVIN_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE, AGS_DEVIN_ERROR_CHANNELS_NOT_AVAILABLE, AGS_DEVIN_ERROR_SAMPLERATE_NOT_AVAILABLE, AGS_DEVIN_ERROR_BUFFER_SIZE_NOT_AVAILABLE, AGS_DEVIN_ERROR_HW_PARAMETERS_NOT_AVAILABLE, }AgsDevinError; struct _AgsDevin { GObject object; guint flags; pthread_mutex_t *mutex; pthread_mutexattr_t *mutexattr; guint dsp_channels; guint pcm_channels; guint format; guint buffer_size; guint samplerate; // sample_rate void** buffer; volatile gboolean available; guint ring_buffer_size; guint nth_ring_buffer; unsigned char **ring_buffer; double bpm; // beats per minute gdouble delay_factor; gdouble *delay; // count of tics within buffer size guint *attack; // where currently tic resides in the stream's offset, measured in 1/64 of bpm gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint note_offset_absolute; guint loop_left; guint loop_right; gboolean do_loop; guint loop_offset; union{ struct _AgsOssIn{ int device_fd; char *device; }oss; #ifdef AGS_WITH_ALSA struct _AgsAlsaIn{ char *device; int rc; snd_pcm_t *handle; snd_async_handler_t *ahandler; snd_pcm_hw_params_t *params; }alsa; #else struct _AgsAlsaDummyIn{ char *device; int rc; void *handle; void *ahandler; void *params; }alsa; #endif }out; GObject *application_context; pthread_mutex_t *application_mutex; GList *poll_fd; GObject *notify_soundcard; GList *audio; }; struct _AgsDevinClass { GObjectClass object; }; GType ags_devin_get_type(); GQuark ags_devin_error_quark(); void ags_devin_switch_buffer_flag(AgsDevin *devin); void ags_devin_adjust_delay_and_attack(AgsDevin *devin); void ags_devin_realloc_buffer(AgsDevin *devin); AgsDevin* ags_devin_new(GObject *application_context); #endif /*__AGS_DEVIN_H__*/ gsequencer-1.4.24/ags/audio/ags_note.h0000644000175000017500000001151713256163135014521 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTE_H__ #define __AGS_NOTE_H__ #include #include #include #include #include #define AGS_TYPE_NOTE (ags_note_get_type()) #define AGS_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_NOTE, AgsNote)) #define AGS_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NOTE, AgsNoteClass)) #define AGS_IS_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_NOTE)) #define AGS_IS_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_NOTE)) #define AGS_NOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_NOTE, AgsNoteClass)) #define AGS_NOTE_DEFAULT_TICKS_PER_QUARTER_NOTE (16.0) typedef struct _AgsNote AgsNote; typedef struct _AgsNoteClass AgsNoteClass; /** * AgsNoteFlags: * @AGS_NOTE_CONNECTED: indicates the note was connected by calling #AgsConnectable::connect() * @AGS_NOTE_GUI: gui format * @AGS_NOTE_RUNTIME: runtime format * @AGS_NOTE_HUMAN_READABLE: human readable format * @AGS_NOTE_DEFAULT_LENGTH: default length * @AGS_NOTE_IS_SELECTED: is selected * @AGS_NOTE_FEED: feed note * @AGS_NOTE_ENVELOPE: do envelope * * Enum values to control the behavior or indicate internal state of #AgsNote by * enable/disable as flags. */ typedef enum{ AGS_NOTE_CONNECTED = 1, AGS_NOTE_GUI = 1 << 1, AGS_NOTE_RUNTIME = 1 << 2, AGS_NOTE_HUMAN_READABLE = 1 << 3, AGS_NOTE_DEFAULT_LENGTH = 1 << 4, AGS_NOTE_IS_SELECTED = 1 << 5, AGS_NOTE_FEED = 1 << 6, AGS_NOTE_ENVELOPE = 1 << 7, }AgsNoteFlags; struct _AgsNote { GObject object; guint flags; // gui format, convert easy to visualization guint x[2]; guint y; guint64 rt_offset; guint rt_attack; gdouble stream_delay; gdouble stream_attack; AgsComplex attack; AgsComplex decay; AgsComplex sustain; AgsComplex release; AgsComplex ratio; gchar *note_name; gdouble frequency; }; struct _AgsNoteClass { GObjectClass object; }; GType ags_note_get_type(); gint ags_note_sort_func(gconstpointer a, gconstpointer b); GList* ags_note_find_prev(GList *note, guint x0, guint y); GList* ags_note_find_next(GList *note, guint x0, guint y); glong ags_note_length_to_smf_delta_time(guint note_length, gdouble bpm, gdouble delay_factor, glong nn, glong dd, glong cc, glong bb, glong tempo); guint ags_note_smf_delta_time_to_length(glong delta_time, glong nn, glong dd, glong cc, glong bb, glong tempo, gdouble bpm, gdouble delay_factor); unsigned char* ags_note_to_raw_midi(AgsNote *note, gdouble bpm, gdouble delay_factor, guint *buffer_length); unsigned char* ags_note_to_raw_midi_extended(AgsNote *note, gdouble bpm, gdouble delay_factor, glong nn, glong dd, glong cc, glong bb, glong tempo, guint *buffer_length); snd_seq_event_t* ags_note_to_seq_event(AgsNote *note, gdouble bpm, gdouble delay_factor, guint *n_events); snd_seq_event_t* ags_note_to_seq_event_extended(AgsNote *note, gdouble bpm, gdouble delay_factor, glong nn, glong dd, glong cc, glong bb, glong tempo, guint *n_events); GList* ags_note_from_raw_midi(unsigned char *raw_midi, gdouble bpm, gdouble delay_factor, guint length); GList* ags_note_from_raw_midi_extended(unsigned char *raw_midi, glong nn, glong dd, glong cc, glong bb, glong tempo, gdouble bpm, gdouble delay_factor, guint length); GList* ags_note_from_seq_event(snd_seq_event_t *event, gdouble bpm, gdouble delay_factor, guint n_events); GList* ags_note_from_seq_event_extended(snd_seq_event_t *event, glong nn, glong dd, glong cc, glong bb, glong tempo, gdouble bpm, gdouble delay_factor, guint n_events); AgsNote* ags_note_duplicate(AgsNote *note); AgsNote* ags_note_new(); AgsNote* ags_note_new_with_offset(guint x0, guint x1, guint y, gdouble stream_delay, guint stream_attack); #endif /*__AGS_NOTE_H__*/ gsequencer-1.4.24/ags/audio/ags_note.c0000644000175000017500000006044213247044247014517 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_note_class_init(AgsNoteClass *note); void ags_note_connectable_interface_init(AgsConnectableInterface *connectable); void ags_note_init(AgsNote *note); void ags_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_note_connect(AgsConnectable *connectable); void ags_note_disconnect(AgsConnectable *connectable); void ags_note_finalize(GObject *gobject); /** * SECTION:ags_note * @short_description: Note class. * @title: AgsNote * @section_id: * @include: ags/audio/ags_note.h * * #AgsNote represents a tone. */ static gpointer ags_note_parent_class = NULL; enum{ PROP_0, PROP_X0, PROP_X1, PROP_Y, PROP_STREAM_DELAY, PROP_STREAM_ATTACK, PROP_ATTACK, PROP_DECAY, PROP_SUSTAIN, PROP_RELEASE, PROP_RATIO, PROP_NOTE_NAME, }; GType ags_note_get_type() { static GType ags_type_note = 0; if(!ags_type_note){ static const GTypeInfo ags_note_info = { sizeof(AgsNoteClass), NULL, NULL, (GClassInitFunc) ags_note_class_init, NULL, NULL, sizeof(AgsNote), 0, (GInstanceInitFunc) ags_note_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_note_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_note = g_type_register_static(G_TYPE_OBJECT, "AgsNote", &ags_note_info, 0); g_type_add_interface_static(ags_type_note, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_note); } void ags_note_class_init(AgsNoteClass *note) { GObjectClass *gobject; GParamSpec *param_spec; ags_note_parent_class = g_type_class_peek_parent(note); gobject = (GObjectClass *) note; gobject->set_property = ags_note_set_property; gobject->get_property = ags_note_get_property; gobject->finalize = ags_note_finalize; /* properties */ /** * AgsNote:x0: * * Note offset x0. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x0", i18n_pspec("offset x0"), i18n_pspec("The first x offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X0, param_spec); /** * AgsNote:x1: * * Note offset x1. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x1", i18n_pspec("offset x1"), i18n_pspec("The last x offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X1, param_spec); /** * AgsNote:y: * * Note offset y. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("y", i18n_pspec("offset y"), i18n_pspec("The y offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y, param_spec); /** * AgsNote:stream-delay: * * The stream's delay. * * Since: 1.0.0 */ param_spec = g_param_spec_double("stream-delay", i18n_pspec("delay of stream"), i18n_pspec("The delay of the stream"), 0.0, 65535.0, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STREAM_DELAY, param_spec); /** * AgsNote:stream-attack: * * The stream's attack. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("stream-attack", i18n_pspec("offset stream-attack"), i18n_pspec("The first x offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STREAM_ATTACK, param_spec); /** * AgsNote:attack: * * Envelope attack. * * Since: 1.0.0 */ param_spec = g_param_spec_boxed("attack", i18n_pspec("envelope's attack"), i18n_pspec("The envelope's attack"), AGS_TYPE_COMPLEX, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsNote:decay: * * Envelope decay. * * Since: 1.0.0 */ param_spec = g_param_spec_boxed("decay", i18n_pspec("envelope's decay"), i18n_pspec("The envelope's decay"), AGS_TYPE_COMPLEX, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DECAY, param_spec); /** * AgsNote:sustain: * * Envelope sustain. * * Since: 1.0.0 */ param_spec = g_param_spec_boxed("sustain", i18n_pspec("envelope's sustain"), i18n_pspec("The envelope's sustain"), AGS_TYPE_COMPLEX, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SUSTAIN, param_spec); /** * AgsNote:release: * * Envelope release. * * Since: 1.0.0 */ param_spec = g_param_spec_boxed("release", i18n_pspec("envelope's release"), i18n_pspec("The envelope's release"), AGS_TYPE_COMPLEX, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RELEASE, param_spec); /** * AgsNote:ratio: * * Envelope ratio. * * Since: 1.0.0 */ param_spec = g_param_spec_boxed("ratio", i18n_pspec("envelope's ratio"), i18n_pspec("The envelope's ratio"), AGS_TYPE_COMPLEX, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RATIO, param_spec); /** * AgsNote:note-name: * * The note's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("note-name", i18n_pspec("note name"), i18n_pspec("The note's name"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTE_NAME, param_spec); } void ags_note_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->connect = ags_note_connect; connectable->disconnect = ags_note_disconnect; } void ags_note_init(AgsNote *note) { complex z; note->flags = 0; note->x[0] = 0; note->x[1] = 1; note->y = 0; note->rt_offset = 0; note->rt_attack = 0; note->stream_delay = 0.0; note->stream_attack = 0; z = 0.25 + I * 1.0; ags_complex_set(&(note->attack), z); z = 0.25 + I * 1.0; ags_complex_set(&(note->decay), z); z = 0.25 + I * 1.0; ags_complex_set(&(note->sustain), z); z = 0.25 + I * 1.0; ags_complex_set(&(note->release), z); z = I * 1.0; ags_complex_set(&(note->ratio), z); note->note_name = NULL; note->frequency = 440.0; } void ags_note_connect(AgsConnectable *connectable) { AgsNote *note; note = AGS_NOTE(connectable); if((AGS_NOTE_CONNECTED & (note->flags)) != 0){ return; } note->flags |= AGS_NOTE_CONNECTED; } void ags_note_disconnect(AgsConnectable *connectable) { AgsNote *note; note = AGS_NOTE(connectable); if((AGS_NOTE_CONNECTED & (note->flags)) == 0){ return; } note->flags &= (~AGS_NOTE_CONNECTED); } void ags_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsNote *note; note = AGS_NOTE(gobject); switch(prop_id){ case PROP_X0: { note->x[0] = g_value_get_uint(value); } break; case PROP_X1: { note->x[1] = g_value_get_uint(value); } break; case PROP_Y: { note->y = g_value_get_uint(value); } break; case PROP_STREAM_DELAY: { note->stream_delay = g_value_get_double(value); } break; case PROP_STREAM_ATTACK: { note->stream_attack = g_value_get_uint(value); } break; case PROP_ATTACK: { AgsComplex *attack; attack = (AgsComplex *) g_value_get_boxed(value); ags_complex_set(&(note->attack), ags_complex_get(attack)); } break; case PROP_SUSTAIN: { AgsComplex *sustain; sustain = (AgsComplex *) g_value_get_boxed(value); ags_complex_set(&(note->sustain), ags_complex_get(sustain)); } break; case PROP_DECAY: { AgsComplex *decay; decay = (AgsComplex *) g_value_get_boxed(value); ags_complex_set(&(note->decay), ags_complex_get(decay)); } break; case PROP_RELEASE: { AgsComplex *release; release = (AgsComplex *) g_value_get_boxed(value); ags_complex_set(&(note->release), ags_complex_get(release)); } break; case PROP_RATIO: { AgsComplex *ratio; ratio = (AgsComplex *) g_value_get_boxed(value); ags_complex_set(&(note->ratio), ags_complex_get(ratio)); } break; case PROP_NOTE_NAME: { gchar *note_name; note_name = g_value_get_string(value); if(note_name == note->note_name){ return; } if(note->note_name != NULL){ g_free(note->note_name); } note->note_name = g_strdup(note_name); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsNote *note; note = AGS_NOTE(gobject); switch(prop_id){ case PROP_X0: { g_value_set_uint(value, note->x[0]); } break; case PROP_X1: { g_value_set_uint(value, note->x[1]); } break; case PROP_Y: { g_value_set_uint(value, note->y); } break; case PROP_STREAM_DELAY: { g_value_set_double(value, note->stream_delay); } break; case PROP_STREAM_ATTACK: { g_value_set_uint(value, note->stream_attack); } break; case PROP_ATTACK: { g_value_set_boxed(value, note->attack); } break; case PROP_SUSTAIN: { g_value_set_boxed(value, note->sustain); } break; case PROP_DECAY: { g_value_set_boxed(value, note->decay); } break; case PROP_RELEASE: { g_value_set_boxed(value, note->release); } break; case PROP_RATIO: { g_value_set_boxed(value, note->ratio); } break; case PROP_NOTE_NAME: { g_value_set_string(value, note->note_name); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_note_finalize(GObject *gobject) { AgsNote *note; note = AGS_NOTE(gobject); /* note name */ if(note->note_name != NULL){ free(note->note_name); } /* call parent */ G_OBJECT_CLASS(ags_note_parent_class)->finalize(gobject); } /** * ags_note_sort_func: * @a: an #AgsNote * @b: an #AgsNote * * Sort notes. * * Returns: 0 if equal, -1 if smaller and 1 if bigger offset * * Since: 1.0.0 */ gint ags_note_sort_func(gconstpointer a, gconstpointer b) { if(a == NULL || b == NULL){ return(0); } if(AGS_NOTE(a)->x[0] == AGS_NOTE(b)->x[0]){ if(AGS_NOTE(a)->y == AGS_NOTE(b)->y){ return(0); } if(AGS_NOTE(a)->y < AGS_NOTE(b)->y){ return(-1); }else{ return(1); } } if(AGS_NOTE(a)->x[0] < AGS_NOTE(b)->x[0]){ return(-1); }else{ return(1); } } /** * ags_note_find_prev: * @note: a #GList containing #AgsNote * @x0: x offset * @y: y offset * * Find prev note having the same y offset. * * Returns: the matching entry as #GList if first entry's x offset bigger than @x0, else %NULL * * Since: 1.0.0 */ GList* ags_note_find_prev(GList *note, guint x0, guint y) { GList *current_match; if(note == NULL || AGS_NOTE(note->data)->x[0] > x0){ return(NULL); } current_match = NULL; while(note != NULL){ if(AGS_NOTE(note->data)->y == y){ current_match = note; note = note->next; continue; } if(AGS_NOTE(note->data)->x[0] > x0){ return(current_match); } note = note->next; } return(current_match); } /** * ags_note_find_next: * @note: a #GList containing #AgsNote * @x0: x offset * @y: y offset * * Find next note having the same y offset. * * Returns: the matching entry as #GList if last entry's x offset smaller than @x0, else %NULL * * Since: 1.0.0 */ GList* ags_note_find_next(GList *note, guint x0, guint y) { GList *current_match; note = g_list_last(note); if(note == NULL || AGS_NOTE(note->data)->x[0] < x0){ return(NULL); } current_match = NULL; while(note != NULL){ if(AGS_NOTE(note->data)->y == y){ current_match = note; note = note->prev; continue; } if(AGS_NOTE(note->data)->x[0] < x0){ return(current_match); } note = note->prev; } return(current_match); } /** * ags_note_length_to_smf_delta_time: * @note_length: the note length to convert * @bpm: the source bpm * @delay_factor: the source delay factor * @nn: numerator * @dd: denominator * @cc: clocks * @bb: beats * @tempo: tempo * * Convert note length to SMF delta-time. * * Returns: the delta-time * * Since: 1.0.0 */ glong ags_note_length_to_smf_delta_time(guint note_length, gdouble bpm, gdouble delay_factor, glong nn, glong dd, glong cc, glong bb, glong tempo) { //TODO:JK: implement me return(0); } /** * ags_note_smf_delta_time_to_length: * @delta_time: delta-time * @nn: numerator * @dd: denominator * @cc: clocks * @bb: beats * @tempo: tempo * @bpm: the target bpm * @delay_factor: the target delay factor * * Convert SMF delta-time to note length. * * Returns: the note length * * Since: 1.0.0 */ guint ags_note_smf_delta_time_to_length(glong delta_time, glong nn, glong dd, glong cc, glong bb, glong tempo, gdouble bpm, gdouble delay_factor) { //TODO:JK: implement me return(0); } /** * ags_note_to_seq_event: * @note: the #AgsNote * @bpm: the bpm to use * @delay_factor: the segmentation delay factor * @buffer_length: the length of the returned buffer * * Convert @note to raw MIDI and set the buffer length of returned bytes * in the array as @buffer_length. * * Returns: The sequencer raw midi as array. * * Since: 1.0.0 */ unsigned char* ags_note_to_raw_midi(AgsNote *note, gdouble bpm, gdouble delay_factor, guint *buffer_length) { unsigned char *raw_midi; guint length; guint current_length; long delta_time; guint delta_time_length; unsigned char status; int channel; int key; int velocity; int pressure; gdouble ticks_per_beat; guint i, i_stop; guint j; guint k; if(note == NULL){ if(buffer_length != NULL){ *buffer_length = 0; } return(NULL); } length = 0; /* key-on */ k = 0; /* delta-time */ delta_time = note->x[0] / 16.0 / bpm * 60.0 / ((USEC_PER_SEC * bpm / 4.0) / (4.0 * bpm) / USEC_PER_SEC); delta_time_length = current_length = ags_midi_buffer_util_get_varlength_size(delta_time); /* status and channel */ channel = 0; status = (0x90 | (0x7f & channel)); current_length++; /* note / key */ key = (0x7f & (note->y)); current_length++; /* velocity */ velocity = (0x7f & (unsigned char) (128 * (ags_complex_get(&(note->attack))))); current_length++; /* prepare buffer */ raw_midi = (unsigned char *) malloc(current_length * sizeof(unsigned char)); length += current_length; ags_midi_buffer_util_put_varlength(raw_midi, delta_time); k += delta_time_length; raw_midi[k] = status; raw_midi[k + 1] = key; raw_midi[k + 2] = velocity; k += 3; /* key-pressure */ ticks_per_beat = AGS_NOTE_DEFAULT_TICKS_PER_QUARTER_NOTE / 4.0 / delay_factor; if(ticks_per_beat > 2.0){ i_stop = (note->x[1] - note->x[0]) * (ticks_per_beat - 2.0); for(i = 1; i <= i_stop; i++){ /* delta-time */ delta_time = (note->x[0] + i + 1) / 16.0 / bpm * 60.0 / ((USEC_PER_SEC * bpm / 4.0) / (4.0 * bpm) / USEC_PER_SEC); delta_time_length = current_length = ags_midi_buffer_util_get_varlength_size(delta_time); /* status and channel */ channel = 0; status = (0x90 | (0x7f & channel)); current_length++; /* note / key */ key = (0x7f & (note->y)); current_length++; /* pressure */ //TODO:JK: verify pressure = (0x7f & (unsigned char) (128 * (((ags_complex_get(&(note->decay)) / i) - (i * ags_complex_get(&(note->sustain))))))); current_length++; /* prepare buffer */ raw_midi = (unsigned char *) realloc(raw_midi, current_length * sizeof(unsigned char)); length += current_length; ags_midi_buffer_util_put_varlength(raw_midi, delta_time); k += delta_time_length; raw_midi[k] = status; raw_midi[k + 1] = key; raw_midi[k + 2] = pressure; k += 3; } } /* key-off */ /* delta-time */ delta_time = note->x[1] / 16.0 / bpm * 60.0 / ((USEC_PER_SEC * bpm / 4.0) / (4.0 * bpm) / USEC_PER_SEC); delta_time_length = current_length = ags_midi_buffer_util_get_varlength_size(delta_time); /* status and channel */ channel = 0; status = (0x90 | (0x7f & channel)); current_length++; /* note / key */ key = (0x7f & (note->y)); current_length++; /* velocity */ velocity = (0x7f & (unsigned char) (128 * (ags_complex_get(&(note->attack))))); current_length++; /* prepare buffer */ raw_midi = (unsigned char *) realloc(raw_midi, current_length * sizeof(unsigned char)); length += current_length; ags_midi_buffer_util_put_varlength(raw_midi, delta_time); k += delta_time_length; raw_midi[k] = status; raw_midi[k + 1] = key; raw_midi[k + 2] = velocity; /* return value */ if(buffer_length != NULL){ *buffer_length = length; } return(raw_midi); } /** * ags_note_to_raw_midi_extended: * @note: the #AgsNote * @bpm: the source bpm * @delay_factor: the source delay factor * @nn: numerator * @dd: denominator * @cc: clocks * @bb: beats * @tempo: tempo * @buffer_length: the return location of buffer length * * Convert @note to raw-midi. * * Returns: the raw-midi buffer * * Since: 1.0.0 */ unsigned char* ags_note_to_raw_midi_extended(AgsNote *note, gdouble bpm, gdouble delay_factor, glong nn, glong dd, glong cc, glong bb, glong tempo, guint *buffer_length) { //TODO:JK: implement me return(NULL); } /** * ags_note_to_seq_event: * @note: the #AgsNote * @bpm: the bpm to use * @delay_factor: the segmentation delay factor * @n_events: the count of events * * Convert @note to ALSA sequencer events and set the number of events * in the array as @n_events. * * Returns: The sequencer events as array. * * Since: 1.0.0 */ snd_seq_event_t* ags_note_to_seq_event(AgsNote *note, gdouble bpm, gdouble delay_factor, guint *n_events) { snd_seq_event_t *event; event = NULL; //TODO:JK: implement me return(event); } /** * ags_note_to_seq_event_extended: * @note: the #AgsNote * @bpm: the source bpm * @delay_factor: the source delay factor * @nn: numerator * @dd: denominator * @cc: clocks * @bb: beats * @tempo: tempo * @n_events: the return location of event count * * Convert @note to raw-midi. * * Returns: an array of snd_seq_event_t structs * * Since: 1.0.0 */ snd_seq_event_t* ags_note_to_seq_event_extended(AgsNote *note, gdouble bpm, gdouble delay_factor, glong nn, glong dd, glong cc, glong bb, glong tempo, guint *n_events) { snd_seq_event_t *event; event = NULL; //TODO:JK: implement me return(event); } /** * ags_note_from_raw_midi: * @raw_midi: the data array * @bpm: the bpm to use * @delay_factor: the segmentation delay factor * @length: the length of the array * * Parse @raw_midi data and convert to #AgsNote. * * Returns: a #GList containing the notes * * Since: 1.0.0 */ GList* ags_note_from_raw_midi(unsigned char *raw_midi, gdouble bpm, gdouble delay_factor, guint length) { GList *list; list = NULL; //TODO:JK: implement me return(list); } /** * ags_note_from_raw_midi_extended: * @raw_midi: the data array * @nn: numerator * @dd: denominator * @cc: clocks * @bb: beats * @tempo: tempo * @bpm: the bpm to use * @delay_factor: the segmentation delay factor * @length: the length of the array * * Parse @raw_midi data and convert to #AgsNote. * * Returns: a #GList containing the notes * * Since: 1.0.0 */ GList* ags_note_from_raw_midi_extended(unsigned char *raw_midi, glong nn, glong dd, glong cc, glong bb, glong tempo, gdouble bpm, gdouble delay_factor, guint length) { GList *list; list = NULL; //TODO:JK: implement me return(list); } /** * ags_note_from_seq_event: * @event: ALSA sequencer events as array * @bpm: the bpm to use * @delay_factor: the segmentation delay factor * @n_events: the arrays length * * Convert ALSA sequencer data @event to #AgsNote. * * Returns: a #GList containing the notes * * Since: 1.0.0 */ GList* ags_note_from_seq_event(snd_seq_event_t *event, gdouble bpm, gdouble delay_factor, guint n_events) { GList *list; list = NULL; //TODO:JK: implement me return(list); } /** * ags_note_from_seq_event_extended: * @event: the snd_seq_event_t struct array * @nn: numerator * @dd: denominator * @cc: clocks * @bb: beats * @tempo: tempo * @bpm: the bpm to use * @delay_factor: the segmentation delay factor * @n_events: the count snd_seq_event_t structs * * Parse @raw_midi data and convert to #AgsNote. * * Returns: a #GList containing the notes * * Since: 1.0.0 */ GList* ags_note_from_seq_event_extended(snd_seq_event_t *event, glong nn, glong dd, glong cc, glong bb, glong tempo, gdouble bpm, gdouble delay_factor, guint n_events) { GList *list; list = NULL; //TODO:JK: implement me return(list); } /** * ags_note_duplicate: * @note: an #AgsNote * * Duplicate a note. * * Returns: the duplicated #AgsNote. * * Since: 1.0.0 */ AgsNote* ags_note_duplicate(AgsNote *note) { AgsNote *copy; if(note->x[0] == note->x[1]){ return(NULL); } copy = ags_note_new(); copy->flags = 0; copy->note_name = g_strdup(note->note_name); if(note->x[0] < note->x[1]){ copy->x[0] = note->x[0]; copy->x[1] = note->x[1]; }else{ copy->x[0] = note->x[1]; copy->x[1] = note->x[0]; } copy->y = note->y; copy->stream_delay = note->stream_delay; copy->stream_attack = note->stream_attack; copy->attack[0] = note->attack[0]; copy->attack[1] = note->attack[1]; copy->decay[0] = note->decay[0]; copy->decay[1] = note->decay[1]; copy->sustain[0] = note->sustain[0]; copy->sustain[1] = note->sustain[1]; copy->release[0] = note->release[0]; copy->release[1] = note->release[1]; copy->ratio[0] = note->ratio[0]; copy->ratio[1] = note->ratio[1]; return(copy); } /** * ags_note_new: * * Creates an #AgsNote * * Returns: a new #AgsNote * * Since: 1.0.0 */ AgsNote* ags_note_new() { AgsNote *note; note = (AgsNote *) g_object_new(AGS_TYPE_NOTE, NULL); return(note); } /** * ags_note_new_with_offset: * @x0: x0 * @x1: x1 * @y: y * @stream_delay: delay * @stream_attack: attack * * Creates an #AgsNote * * Returns: a new #AgsNote * * Since: 1.0.0 */ AgsNote* ags_note_new_with_offset(guint x0, guint x1, guint y, gdouble stream_delay, guint stream_attack) { AgsNote *note; note = (AgsNote *) g_object_new(AGS_TYPE_NOTE, "x0", x0, "x1", x1, "y", y, "stream-delay", stream_delay, "stream-attack", stream_attack, NULL); return(note); } gsequencer-1.4.24/ags/audio/ags_recall_dssi_run.c0000644000175000017500000004404713247044247016725 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_dssi_run_class_init(AgsRecallDssiRunClass *recall_dssi_run_class); void ags_recall_dssi_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_dssi_run_plugin_interface_init(AgsPluginInterface *plugin); void ags_recall_dssi_run_init(AgsRecallDssiRun *recall_dssi_run); void ags_recall_dssi_run_connect(AgsConnectable *connectable); void ags_recall_dssi_run_disconnect(AgsConnectable *connectable); void ags_recall_dssi_run_finalize(GObject *gobject); void ags_recall_dssi_run_run_init_pre(AgsRecall *recall); void ags_recall_dssi_run_run_pre(AgsRecall *recall); void ags_recall_dssi_run_load_ports(AgsRecallDssiRun *recall_dssi_run); /** * SECTION:ags_recall_dssi_run * @Short_description: The object interfacing with DSSI * @Title: AgsRecallDssiRun * * #AgsRecallDssiRun provides DSSI support. */ static gpointer ags_recall_dssi_run_parent_class = NULL; static AgsConnectableInterface* ags_recall_dssi_run_parent_connectable_interface; GType ags_recall_dssi_run_get_type (void) { static GType ags_type_recall_dssi_run = 0; if(!ags_type_recall_dssi_run){ static const GTypeInfo ags_recall_dssi_run_info = { sizeof (AgsRecallDssiRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_dssi_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallDssiRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_dssi_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_dssi_run_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_recall_dssi_run_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_dssi_run = g_type_register_static(AGS_TYPE_RECALL_AUDIO_SIGNAL, "AgsRecallDssiRun", &ags_recall_dssi_run_info, 0); g_type_add_interface_static(ags_type_recall_dssi_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_dssi_run, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_recall_dssi_run); } void ags_recall_dssi_run_class_init(AgsRecallDssiRunClass *recall_dssi_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_dssi_run_parent_class = g_type_class_peek_parent(recall_dssi_run); /* GObjectClass */ gobject = (GObjectClass *) recall_dssi_run; gobject->finalize = ags_recall_dssi_run_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) recall_dssi_run; recall->run_init_pre = ags_recall_dssi_run_run_init_pre; recall->run_pre = ags_recall_dssi_run_run_pre; } void ags_recall_dssi_run_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_dssi_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_dssi_run_connect; connectable->disconnect = ags_recall_dssi_run_disconnect; } void ags_recall_dssi_run_plugin_interface_init(AgsPluginInterface *plugin) { //TODO:JK: implement me } void ags_recall_dssi_run_init(AgsRecallDssiRun *recall_dssi_run) { recall_dssi_run->audio_channels = 0; recall_dssi_run->ladspa_handle = NULL; recall_dssi_run->input = NULL; recall_dssi_run->output = NULL; recall_dssi_run->port_data = NULL; recall_dssi_run->delta_time = 0; recall_dssi_run->event_buffer = (snd_seq_event_t **) malloc(2 * sizeof(snd_seq_event_t *)); recall_dssi_run->event_buffer[0] = (snd_seq_event_t *) malloc(sizeof(snd_seq_event_t)); memset(recall_dssi_run->event_buffer[0], 0, sizeof(snd_seq_event_t)); recall_dssi_run->event_buffer[1] = NULL; recall_dssi_run->event_count = (unsigned long *) malloc(2 * sizeof(unsigned long)); recall_dssi_run->event_count[0] = 0; recall_dssi_run->event_count[1] = 0; recall_dssi_run->note = NULL; recall_dssi_run->route_dssi_audio_run = NULL; } void ags_recall_dssi_run_connect(AgsConnectable *connectable) { ags_recall_dssi_run_parent_connectable_interface->connect(connectable); } void ags_recall_dssi_run_disconnect(AgsConnectable *connectable) { ags_recall_dssi_run_parent_connectable_interface->disconnect(connectable); } void ags_recall_dssi_run_finalize(GObject *gobject) { AgsRecallDssi *recall_dssi; AgsRecallDssiRun *recall_dssi_run; unsigned long i; recall_dssi_run = AGS_RECALL_DSSI_RUN(gobject); free(recall_dssi_run->output); free(recall_dssi_run->input); if(recall_dssi_run->port_data != NULL){ free(recall_dssi_run->port_data); } if(recall_dssi_run->event_buffer != NULL){ if(recall_dssi_run->event_buffer[0] != NULL){ free(recall_dssi_run->event_buffer[0]); } free(recall_dssi_run->event_buffer); } if(recall_dssi_run->event_count != NULL){ free(recall_dssi_run->event_count); } free(recall_dssi_run->ladspa_handle); g_list_free_full(recall_dssi_run->note, g_object_unref); /* call parent */ G_OBJECT_CLASS(ags_recall_dssi_run_parent_class)->finalize(gobject); } void ags_recall_dssi_run_run_init_pre(AgsRecall *recall) { AgsRecallDssi *recall_dssi; AgsRecallDssiRun *recall_dssi_run; AgsAudioSignal *audio_signal; unsigned long port_count; unsigned long samplerate; unsigned long buffer_size; unsigned long i, i_stop; /* call parent */ AGS_RECALL_CLASS(ags_recall_dssi_run_parent_class)->run_init_pre(recall); recall_dssi_run = AGS_RECALL_DSSI_RUN(recall); recall_dssi = AGS_RECALL_DSSI(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); /* set up buffer */ audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall_dssi_run)->source; /* set up buffer */ samplerate = audio_signal->samplerate; buffer_size = audio_signal->buffer_size; if(recall_dssi->input_lines > 0){ recall_dssi_run->input = (LADSPA_Data *) malloc(recall_dssi->input_lines * buffer_size * sizeof(LADSPA_Data)); } recall_dssi_run->output = (LADSPA_Data *) malloc(recall_dssi->output_lines * buffer_size * sizeof(LADSPA_Data)); if(recall_dssi->input_lines < recall_dssi->output_lines){ i_stop = recall_dssi->output_lines; }else{ i_stop = recall_dssi->input_lines; } recall_dssi_run->audio_channels = i_stop; if(i_stop > 0){ recall_dssi_run->ladspa_handle = (LADSPA_Handle *) malloc(i_stop * sizeof(LADSPA_Handle)); }else{ recall_dssi_run->ladspa_handle = NULL; } for(i = 0; i < i_stop; i++){ /* instantiate dssi */ recall_dssi_run->ladspa_handle[i] = recall_dssi->plugin_descriptor->LADSPA_Plugin->instantiate(recall_dssi->plugin_descriptor->LADSPA_Plugin, samplerate); #ifdef AGS_DEBUG g_message("instantiate DSSI handle %d %d", recall_dssi->bank, recall_dssi->program); #endif } ags_recall_dssi_run_load_ports(recall_dssi_run); port_count = recall_dssi->plugin_descriptor->LADSPA_Plugin->PortCount; if(port_count > 0){ AgsPort *current; GList *list; gchar *specifier; recall_dssi_run->port_data = (LADSPA_Data *) malloc(port_count * sizeof(LADSPA_Data)); } for(i = 0; i < i_stop; i++){ if(recall_dssi->plugin_descriptor->LADSPA_Plugin->activate != NULL){ recall_dssi->plugin_descriptor->LADSPA_Plugin->activate(recall_dssi_run->ladspa_handle[i]); } #ifdef AGS_DEBUG g_message("instantiate DSSI handle"); #endif } } void ags_recall_dssi_run_run_pre(AgsRecall *recall) { AgsRecallDssi *recall_dssi; AgsRecallDssiRun *recall_dssi_run; AgsAudioSignal *audio_signal; AgsPort *current; AgsCountBeatsAudioRun *count_beats_audio_run; AgsRouteDssiAudioRun *route_dssi_audio_run; GList *list, *port; GList *note, *note_next; snd_seq_event_t **event_buffer; unsigned long *event_count; gchar *specifier; LADSPA_Data port_data; unsigned long port_count; guint copy_mode_in, copy_mode_out; unsigned long buffer_size; unsigned long i, i_stop; /* call parent */ AGS_RECALL_CLASS(ags_recall_dssi_run_parent_class)->run_pre(recall); if(recall->rt_safe && recall->recall_id->recycling_context->parent != NULL && AGS_RECALL_AUDIO_SIGNAL(recall)->source->note == NULL){ return; } recall_dssi = AGS_RECALL_DSSI(AGS_RECALL_CHANNEL_RUN(recall->parent->parent)->recall_channel); recall_dssi_run = AGS_RECALL_DSSI_RUN(recall); route_dssi_audio_run = AGS_ROUTE_DSSI_AUDIO_RUN(recall_dssi_run->route_dssi_audio_run); if(route_dssi_audio_run == NULL){ return; } count_beats_audio_run = route_dssi_audio_run->count_beats_audio_run; audio_signal = AGS_RECALL_AUDIO_SIGNAL(recall)->source; buffer_size = audio_signal->buffer_size; if(recall_dssi->input_lines < recall_dssi->output_lines){ i_stop = recall_dssi->output_lines; }else{ i_stop = recall_dssi->input_lines; } if(AGS_RECALL(recall_dssi_run)->rt_safe){ note = recall_dssi_run->note; while(note != NULL){ note_next = note->next; if((AGS_NOTE(note->data)->x[1] <= count_beats_audio_run->notation_counter && (AGS_NOTE_FEED & (AGS_NOTE(note->data)->flags)) == 0) || AGS_NOTE(note->data)->x[0] > count_beats_audio_run->notation_counter){ recall_dssi_run->note = g_list_remove(recall_dssi_run->note, note->data); } note = note_next; } if(recall_dssi_run->note == NULL){ memset(recall_dssi_run->event_buffer[0], 0, sizeof(snd_seq_event_t)); } }else{ if(audio_signal->stream_current == NULL || (AGS_NOTE(recall_dssi_run->note->data)->x[1] <= count_beats_audio_run->notation_counter && (AGS_NOTE_FEED & (AGS_NOTE(recall_dssi_run->note->data)->flags)) == 0) || AGS_NOTE(recall_dssi_run->note->data)->x[0] > count_beats_audio_run->notation_counter){ // g_message("done"); for(i = 0; i < i_stop; i++){ /* deactivate */ //TODO:JK: fix-me if(recall_dssi->plugin_descriptor->LADSPA_Plugin->deactivate != NULL){ recall_dssi->plugin_descriptor->LADSPA_Plugin->deactivate(recall_dssi_run->ladspa_handle[i]); } recall_dssi->plugin_descriptor->LADSPA_Plugin->cleanup(recall_dssi_run->ladspa_handle[i]); } ags_recall_done(recall); return; } } /* get copy mode and clear buffer */ copy_mode_in = ags_audio_buffer_util_get_copy_mode(AGS_AUDIO_BUFFER_UTIL_FLOAT, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); copy_mode_out = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(audio_signal->format), AGS_AUDIO_BUFFER_UTIL_FLOAT); if(recall_dssi_run->output != NULL){ ags_audio_buffer_util_clear_float(recall_dssi_run->output, recall_dssi->output_lines, buffer_size); } if(recall_dssi_run->input != NULL){ ags_audio_buffer_util_clear_float(recall_dssi_run->input, recall_dssi->input_lines, buffer_size); } /* copy data */ if(recall_dssi_run->input != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(recall_dssi_run->input, (guint) recall_dssi->input_lines, 0, audio_signal->stream_current->data, 1, 0, (guint) buffer_size, copy_mode_in); } /* select program */ port_count = recall_dssi->plugin_descriptor->LADSPA_Plugin->PortCount; /* cache port data */ for(i = 0; i < port_count; i++){ specifier = recall_dssi->plugin_descriptor->LADSPA_Plugin->PortNames[i]; list = AGS_RECALL(recall_dssi)->port; while(list != NULL){ current = list->data; if(!g_strcmp0(specifier, current->specifier)){ GValue value = {0,}; g_value_init(&value, G_TYPE_FLOAT); ags_port_safe_read(current, &value); recall_dssi_run->port_data[i] = g_value_get_float(&value); break; } list = list->next; } } if(recall_dssi->plugin_descriptor->select_program != NULL){ for(i = 0; i < i_stop; i++){ recall_dssi->plugin_descriptor->select_program(recall_dssi_run->ladspa_handle[i], recall_dssi->bank, recall_dssi->program); // g_message("b p %u %u", recall_dssi->bank, recall_dssi->program); } } /* reset port data */ for(i = 0; i < port_count; i++){ current = NULL; specifier = recall_dssi->plugin_descriptor->LADSPA_Plugin->PortNames[i]; list = AGS_RECALL(recall_dssi)->port; while(list != NULL){ current = list->data; if(!g_strcmp0(specifier, current->specifier)){ break; } list = list->next; } if(list != NULL){ GValue value = {0,}; g_value_init(&value, G_TYPE_FLOAT); port_data = recall_dssi_run->port_data[i]; g_value_set_float(&value, port_data); ags_port_safe_write(current, &value); } } /* process data */ note = recall_dssi_run->note; while(note != NULL){ if(recall_dssi->plugin_descriptor->run_synth != NULL){ if(recall_dssi_run->event_buffer != NULL){ event_buffer = recall_dssi_run->event_buffer; event_count = recall_dssi_run->event_count; while(*event_buffer != NULL){ if(event_buffer[0]->type == SND_SEQ_EVENT_NOTEON){ recall_dssi->plugin_descriptor->run_synth(recall_dssi_run->ladspa_handle[0], recall_dssi->output_lines * buffer_size, event_buffer[0], event_count[0]); } event_buffer++; event_count++; } } }else if(recall_dssi->plugin_descriptor->LADSPA_Plugin->run != NULL){ recall_dssi->plugin_descriptor->LADSPA_Plugin->run(recall_dssi_run->ladspa_handle[0], buffer_size); } note = note->next; } /* copy data */ if(recall_dssi_run->output != NULL){ ags_audio_buffer_util_clear_buffer(audio_signal->stream_current->data, 1, buffer_size, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal->stream_current->data, 1, 0, recall_dssi_run->output, (guint) recall_dssi->output_lines, 0, (guint) buffer_size, copy_mode_out); } } /** * ags_recall_dssi_run_load_ports: * @recall_dssi_run: an #AgsRecallDssiRun * * Set up DSSI ports. * * Since: 1.0.0 */ void ags_recall_dssi_run_load_ports(AgsRecallDssiRun *recall_dssi_run) { AgsRecallDssi *recall_dssi; AgsDssiPlugin *dssi_plugin; AgsPort *current; GList *port; GList *list; gchar *plugin_name; gchar *specifier; gchar *path; unsigned long port_count; unsigned long i, j, j_stop; DSSI_Descriptor *plugin_descriptor; LADSPA_PortDescriptor *port_descriptor; recall_dssi = AGS_RECALL_DSSI(AGS_RECALL_CHANNEL_RUN(AGS_RECALL(recall_dssi_run)->parent->parent)->recall_channel); port = AGS_RECALL(recall_dssi)->port; plugin_descriptor = recall_dssi->plugin_descriptor; port_count = plugin_descriptor->LADSPA_Plugin->PortCount; port_descriptor = plugin_descriptor->LADSPA_Plugin->PortDescriptors; if(recall_dssi->input_lines < recall_dssi->output_lines){ j_stop = recall_dssi->output_lines; }else{ j_stop = recall_dssi->input_lines; } for(i = 0; i < port_count; i++){ if(LADSPA_IS_PORT_CONTROL(port_descriptor[i])){ if(LADSPA_IS_PORT_INPUT(port_descriptor[i]) || LADSPA_IS_PORT_OUTPUT(port_descriptor[i])){ LADSPA_Data *port_pointer; specifier = plugin_descriptor->LADSPA_Plugin->PortNames[i]; list = port; current = NULL; while(list != NULL){ current = list->data; if(!g_strcmp0(specifier, current->specifier)){ break; } list = list->next; } for(j = 0; j < j_stop; j++){ #ifdef AGS_DEBUG g_message("connecting port[%d]: %d/%d - %f", j, i, port_count, current->port_value.ags_port_ladspa); #endif port_pointer = (LADSPA_Data *) &(current->port_value.ags_port_ladspa); recall_dssi->plugin_descriptor->LADSPA_Plugin->connect_port(recall_dssi_run->ladspa_handle[j], i, port_pointer); } } } } /* connect audio port */ for(j = 0; j < recall_dssi->input_lines; j++){ recall_dssi->plugin_descriptor->LADSPA_Plugin->connect_port(recall_dssi_run->ladspa_handle[j], recall_dssi->input_port[j], &(recall_dssi_run->input[j])); } for(j = 0; j < recall_dssi->output_lines; j++){ recall_dssi->plugin_descriptor->LADSPA_Plugin->connect_port(recall_dssi_run->ladspa_handle[j], recall_dssi->output_port[j], &(recall_dssi_run->output[j])); } } /** * ags_recall_dssi_run_new: * @audio_signal: the source * * Creates a #AgsRecallDssiRun * * Returns: a new #AgsRecallDssiRun * * Since: 1.0.0 */ AgsRecallDssiRun* ags_recall_dssi_run_new(AgsAudioSignal *audio_signal) { AgsRecallDssiRun *recall_dssi_run; recall_dssi_run = (AgsRecallDssiRun *) g_object_new(AGS_TYPE_RECALL_DSSI_RUN, "source", audio_signal, NULL); return(recall_dssi_run); } gsequencer-1.4.24/ags/audio/ags_synth_util.h0000644000175000017500000001605213246707333015760 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2016 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 . */ #ifndef __AGS_SYNTH_UTIL_H__ #define __AGS_SYNTH_UTIL_H__ #include #include /* zero-crossing */ guint ags_synth_util_get_xcross_count_s8(signed char *buffer, guint buffer_size); guint ags_synth_util_get_xcross_count_s16(signed short *buffer, guint buffer_size); guint ags_synth_util_get_xcross_count_s24(signed long *buffer, guint buffer_size); guint ags_synth_util_get_xcross_count_s32(signed long *buffer, guint buffer_size); guint ags_synth_util_get_xcross_count_s64(signed long long *buffer, guint buffer_size); guint ags_synth_util_get_xcross_count_float(float *buffer, guint buffer_size); guint ags_synth_util_get_xcross_count_double(double *buffer, guint buffer_size); guint ags_synth_util_get_xcross_count(void *buffer, guint audio_buffer_util_format, guint buffer_size); /* sin oscillator */ void ags_synth_util_sin_s8(signed char *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sin_s16(signed short *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sin_s24(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sin_s32(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sin_s64(signed long long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sin_float(float *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sin_double(double *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); /* sawtooth oscillator */ void ags_synth_util_sawtooth_s8(signed char *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sawtooth_s16(signed short *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sawtooth_s24(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sawtooth_s32(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sawtooth_s64(signed long long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sawtooth_float(float *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_sawtooth_double(double *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); /* triangle oscillator */ void ags_synth_util_triangle_s8(signed char *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_triangle_s16(signed short *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_triangle_s24(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_triangle_s32(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_triangle_s64(signed long long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_triangle_float(float *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_triangle_double(double *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); /* square oscillator */ void ags_synth_util_square_s8(signed char *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_square_s16(signed short *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_square_s24(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_square_s32(signed long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_square_s64(signed long long *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_square_float(float *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); void ags_synth_util_square_double(double *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint offset, guint n_frames); /* oscillators */ void ags_synth_util_sin(void *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint audio_buffer_util_format, guint offset, guint n_frames); void ags_synth_util_sawtooth(void *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint audio_buffer_util_format, guint offset, guint n_frames); void ags_synth_util_triangle(void *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint audio_buffer_util_format, guint offset, guint n_frames); void ags_synth_util_square(void *buffer, gdouble freq, gdouble phase, gdouble volume, guint samplerate, guint audio_buffer_util_format, guint offset, guint n_frames); #endif /*__AGS_SYNTH_UTIL_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_lv2.c0000644000175000017500000005755513247044247015612 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_lv2_class_init(AgsRecallLv2Class *recall_lv2_class); void ags_recall_lv2_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_lv2_plugin_interface_init(AgsPluginInterface *plugin); void ags_recall_lv2_init(AgsRecallLv2 *recall_lv2); void ags_recall_lv2_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_lv2_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_lv2_connect(AgsConnectable *connectable); void ags_recall_lv2_disconnect(AgsConnectable *connectable); void ags_recall_lv2_set_ports(AgsPlugin *plugin, GList *port); void ags_recall_lv2_dispose(GObject *gobject); void ags_recall_lv2_finalize(GObject *gobject); void ags_recall_lv2_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_recall_lv2_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); /** * SECTION:ags_recall_lv2 * @short_description: The object interfacing with LV2 * @title: AgsRecallLv2 * @section_id: * @include: ags/audio/ags_recall_lv2.h * * #AgsRecallLv2 provides LV2 support. */ enum{ PROP_0, PROP_TURTLE, PROP_FILENAME, PROP_EFFECT, PROP_URI, PROP_INDEX, }; static gpointer ags_recall_lv2_parent_class = NULL; static AgsConnectableInterface* ags_recall_lv2_parent_connectable_interface; static AgsPluginInterface* ags_recall_lv2_parent_plugin_interface; GType ags_recall_lv2_get_type (void) { static GType ags_type_recall_lv2 = 0; if(!ags_type_recall_lv2){ static const GTypeInfo ags_recall_lv2_info = { sizeof (AgsRecallLv2Class), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_lv2_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallLv2), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_lv2_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_lv2_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_recall_lv2_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_lv2 = g_type_register_static(AGS_TYPE_RECALL_CHANNEL, "AgsRecallLv2", &ags_recall_lv2_info, 0); g_type_add_interface_static(ags_type_recall_lv2, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_lv2, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return(ags_type_recall_lv2); } void ags_recall_lv2_class_init(AgsRecallLv2Class *recall_lv2) { GObjectClass *gobject; GParamSpec *param_spec; ags_recall_lv2_parent_class = g_type_class_peek_parent(recall_lv2); /* GObjectClass */ gobject = (GObjectClass *) recall_lv2; gobject->set_property = ags_recall_lv2_set_property; gobject->get_property = ags_recall_lv2_get_property; gobject->dispose = ags_recall_lv2_dispose; gobject->finalize = ags_recall_lv2_finalize; /* properties */ /** * AgsRecallLv2:turtle: * * The assigned turtle. * * Since: 1.0.0 */ param_spec = g_param_spec_object("turtle", i18n_pspec("turtle of recall lv2"), i18n_pspec("The turtle which this recall lv2 is described by"), AGS_TYPE_TURTLE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TURTLE, param_spec); /** * AgsRecallLv2:filename: * * The plugins filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the object file"), i18n_pspec("The filename as string of object file"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsRecallLv2:effect: * * The effect's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /** * AgsRecallLv2:uri: * * The uri's name. * * Since: 1.0.0 */ param_spec = g_param_spec_string("uri", i18n_pspec("the uri"), i18n_pspec("The uri's string representation"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_URI, param_spec); /** * AgsRecallLv2:index: * * The uri's index. * * Since: 1.0.0 */ param_spec = g_param_spec_ulong("index", i18n_pspec("index of uri"), i18n_pspec("The numerical index of uri"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX, param_spec); } void ags_recall_lv2_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_lv2_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_lv2_connect; connectable->disconnect = ags_recall_lv2_disconnect; } void ags_recall_lv2_plugin_interface_init(AgsPluginInterface *plugin) { ags_recall_lv2_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_recall_lv2_read; plugin->write = ags_recall_lv2_write; plugin->set_ports = ags_recall_lv2_set_ports; } void ags_recall_lv2_init(AgsRecallLv2 *recall_lv2) { AGS_RECALL(recall_lv2)->name = "ags-lv2"; AGS_RECALL(recall_lv2)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(recall_lv2)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(recall_lv2)->xml_type = "ags-recall-lv2"; AGS_RECALL(recall_lv2)->port = NULL; recall_lv2->flags = 0; recall_lv2->turtle = NULL; recall_lv2->filename = NULL; recall_lv2->effect = NULL; recall_lv2->uri = NULL; recall_lv2->index = 0; recall_lv2->plugin = NULL; recall_lv2->plugin_descriptor = NULL; recall_lv2->input_port = NULL; recall_lv2->input_lines = 0; recall_lv2->output_port = NULL; recall_lv2->output_lines = 0; recall_lv2->event_port = 0; recall_lv2->atom_port = 0; recall_lv2->bank = 0; recall_lv2->program = 0; } void ags_recall_lv2_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallLv2 *recall_lv2; recall_lv2 = AGS_RECALL_LV2(gobject); switch(prop_id){ case PROP_TURTLE: { AgsTurtle *turtle; turtle = (AgsTurtle *) g_value_get_object(value); if(recall_lv2->turtle == turtle){ return; } if(recall_lv2->turtle != NULL){ g_object_unref(recall_lv2->turtle); } if(turtle != NULL){ g_object_ref(turtle); } recall_lv2->turtle = turtle; } break; case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(filename == recall_lv2->filename){ return; } if(recall_lv2->filename != NULL){ g_free(recall_lv2->filename); } recall_lv2->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(effect == recall_lv2->effect){ return; } if(recall_lv2->effect != NULL){ g_free(recall_lv2->effect); } recall_lv2->effect = g_strdup(effect); } break; case PROP_URI: { gchar *uri; uri = g_value_get_string(value); if(uri == recall_lv2->uri){ return; } if(recall_lv2->uri != NULL){ g_free(recall_lv2->uri); } recall_lv2->uri = g_strdup(uri); } break; case PROP_INDEX: { uint32_t index; index = g_value_get_ulong(value); if(index == recall_lv2->index){ return; } recall_lv2->index = index; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_lv2_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallLv2 *recall_lv2; recall_lv2 = AGS_RECALL_LV2(gobject); switch(prop_id){ case PROP_TURTLE: { g_value_set_object(value, recall_lv2->turtle); } break; case PROP_FILENAME: { g_value_set_string(value, recall_lv2->filename); } break; case PROP_EFFECT: { g_value_set_string(value, recall_lv2->effect); } break; case PROP_URI: { g_value_set_string(value, recall_lv2->uri); } break; case PROP_INDEX: { g_value_set_ulong(value, recall_lv2->index); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_recall_lv2_connect(AgsConnectable *connectable) { AgsRecall *recall; recall = AGS_RECALL(connectable); if((AGS_RECALL_CONNECTED & (recall->flags)) != 0){ return; } /* load automation */ ags_recall_load_automation(recall, g_list_copy(recall->port)); /* call parent */ ags_recall_lv2_parent_connectable_interface->connect(connectable); } void ags_recall_lv2_disconnect(AgsConnectable *connectable) { ags_recall_lv2_parent_connectable_interface->disconnect(connectable); } void ags_recall_lv2_dispose(GObject *gobject) { AgsRecallLv2 *recall_lv2; recall_lv2 = AGS_RECALL_LV2(gobject); /* turtle */ if(recall_lv2->turtle != NULL){ g_object_unref(recall_lv2->turtle); recall_lv2->turtle = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_lv2_parent_class)->dispose(gobject); } void ags_recall_lv2_finalize(GObject *gobject) { AgsRecallLv2 *recall_lv2; recall_lv2 = AGS_RECALL_LV2(gobject); /* turtle */ if(recall_lv2->turtle != NULL){ g_object_unref(recall_lv2->turtle); } /* filename, effect and uri */ g_free(recall_lv2->filename); g_free(recall_lv2->effect); g_free(recall_lv2->uri); /* call parent */ G_OBJECT_CLASS(ags_recall_lv2_parent_class)->finalize(gobject); } void ags_recall_lv2_set_ports(AgsPlugin *plugin, GList *port) { AgsRecallLv2 *recall_lv2; AgsPort *current; AgsLv2Plugin *lv2_plugin; GList *list; GList *port_descriptor; unsigned long port_count; unsigned long i; recall_lv2 = AGS_RECALL_LV2(plugin); lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), recall_lv2->filename, recall_lv2->effect); port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; if(port_descriptor != NULL){ port_count = g_list_length(port_descriptor); for(i = 0; i < port_count; i++){ if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ gchar *specifier; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; if(specifier == NULL){ port_descriptor = port_descriptor->next; continue; } list = port; current = NULL; while(list != NULL){ if(!g_strcmp0(specifier, AGS_PORT(list->data)->specifier)){ current = list->data; break; } list = list->next; } if(current != NULL){ current->port_descriptor = port_descriptor->data; ags_recall_lv2_load_conversion(recall_lv2, (GObject *) current, port_descriptor->data); current->port_value.ags_port_float = (float) ags_conversion_convert(current->conversion, g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value), FALSE); #ifdef AGS_DEBUG g_message("connecting port: %d/%d", i, port_count); #endif } }else if((AGS_PORT_DESCRIPTOR_AUDIO & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_lv2->input_port == NULL){ recall_lv2->input_port = (uint32_t *) malloc(sizeof(uint32_t)); recall_lv2->input_port[0] = i; }else{ recall_lv2->input_port = (uint32_t *) realloc(recall_lv2->input_port, (recall_lv2->input_lines + 1) * sizeof(uint32_t)); recall_lv2->input_port[recall_lv2->input_lines] = i; } recall_lv2->input_lines += 1; }else if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_lv2->output_port == NULL){ recall_lv2->output_port = (uint32_t *) malloc(sizeof(uint32_t)); recall_lv2->output_port[0] = i; }else{ recall_lv2->output_port = (uint32_t *) realloc(recall_lv2->output_port, (recall_lv2->output_lines + 1) * sizeof(uint32_t)); recall_lv2->output_port[recall_lv2->output_lines] = i; } recall_lv2->output_lines += 1; } } port_descriptor = port_descriptor->next; } AGS_RECALL(recall_lv2)->port = g_list_reverse(port); } } void ags_recall_lv2_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsRecallLv2 *gobject; AgsLv2Plugin *lv2_plugin; gchar *filename, *effect, *uri; uint32_t index; gobject = AGS_RECALL_LV2(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); filename = xmlGetProp(node, "filename"); effect = xmlGetProp(node, "effect"); uri = xmlGetProp(node, "uri"); index = g_ascii_strtoull(xmlGetProp(node, "index"), NULL, 10); g_object_set(gobject, "filename", filename, "effect", effect, "uri", uri, "index", index, NULL); ags_recall_lv2_load(gobject); } xmlNode* ags_recall_lv2_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsRecallLv2 *recall_lv2; xmlNode *node; GList *list; gchar *id; recall_lv2 = AGS_RECALL_LV2(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-recall-lv2"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_lv2, NULL)); xmlNewProp(node, "filename", g_strdup(recall_lv2->filename)); xmlNewProp(node, "effect", g_strdup(recall_lv2->effect)); xmlNewProp(node, "uri", g_strdup(recall_lv2->uri)); xmlNewProp(node, "index", g_strdup_printf("%d", recall_lv2->index)); xmlAddChild(parent, node); return(node); } /** * ags_recall_lv2_load: * @recall_lv2: an #AgsRecallLv2 * * Set up LV2 handle. * * Since: 1.0.0 */ void ags_recall_lv2_load(AgsRecallLv2 *recall_lv2) { AgsLv2Plugin *lv2_plugin; void *plugin_so; LV2_Descriptor_Function lv2_descriptor; LV2_Descriptor *plugin_descriptor; if(recall_lv2 == NULL || !AGS_RECALL_LV2(recall_lv2)){ return; } /* */ recall_lv2->plugin = lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), recall_lv2->filename, recall_lv2->effect); plugin_so = AGS_BASE_PLUGIN(lv2_plugin)->plugin_so; if(plugin_so != NULL){ lv2_descriptor = (LV2_Descriptor_Function) dlsym(plugin_so, "lv2_descriptor"); if(dlerror() == NULL && lv2_descriptor){ recall_lv2->plugin_descriptor = plugin_descriptor = lv2_descriptor(recall_lv2->index); if((AGS_LV2_PLUGIN_NEEDS_WORKER & (lv2_plugin->flags)) != 0){ recall_lv2->flags |= AGS_RECALL_LV2_HAS_WORKER; } } } } /** * ags_recall_lv2_load_ports: * @recall_lv2: an #AgsRecallLv2 * * Set up LV2 ports. * * Returns: a #GList containing #AgsPort. * * Since: 1.0.0 */ GList* ags_recall_lv2_load_ports(AgsRecallLv2 *recall_lv2) { AgsPort *current; AgsLv2Plugin *lv2_plugin; GList *port; GList *port_descriptor; uint32_t port_count; uint32_t i; lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(), recall_lv2->filename, recall_lv2->effect); #ifdef AGS_DEBUG g_message("ports from ttl: %s", lv2_plugin->turtle->filename); #endif port = NULL; port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port; if(port_descriptor != NULL){ port_count = g_list_length(port_descriptor); for(i = 0; i < port_count; i++){ #ifdef AGS_DEBUG g_message("Lv2 plugin port-index: %d", AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index); #endif if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_EVENT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ recall_lv2->flags |= AGS_RECALL_LV2_HAS_EVENT_PORT; recall_lv2->event_port = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; } if((AGS_PORT_DESCRIPTOR_ATOM & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ recall_lv2->flags |= AGS_RECALL_LV2_HAS_ATOM_PORT; recall_lv2->atom_port = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; } } if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0 && ((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0 || (AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0)){ gchar *plugin_name; gchar *specifier; specifier = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_name; if(specifier == NULL){ port_descriptor = port_descriptor->next; continue; } plugin_name = g_strdup_printf("lv2-<%s>", lv2_plugin->uri); current = g_object_new(AGS_TYPE_PORT, "plugin-name", plugin_name, "specifier", specifier, "control-port", g_strdup_printf("%u/%u", i, port_count), "port-value-is-pointer", FALSE, "port-value-type", G_TYPE_FLOAT, NULL); g_object_ref(current); if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ AGS_RECALL(recall_lv2)->flags |= AGS_RECALL_HAS_OUTPUT_PORT; current->flags |= AGS_PORT_IS_OUTPUT; }else{ if((AGS_PORT_DESCRIPTOR_INTEGER & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0 && (AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) == 0 && AGS_PORT_DESCRIPTOR(port_descriptor->data)->scale_steps == -1){ current->flags |= AGS_PORT_INFINITE_RANGE; } } current->port_descriptor = port_descriptor->data; ags_recall_lv2_load_conversion(recall_lv2, (GObject *) current, port_descriptor->data); current->port_value.ags_port_float = (float) ags_conversion_convert(current->conversion, g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value), FALSE); #ifdef AGS_DEBUG g_message("connecting port: %s %d/%d", specifier, i, port_count); #endif port = g_list_prepend(port, current); }else if((AGS_PORT_DESCRIPTOR_AUDIO & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if((AGS_PORT_DESCRIPTOR_INPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_lv2->input_port == NULL){ recall_lv2->input_port = (uint32_t *) malloc(sizeof(uint32_t)); recall_lv2->input_port[0] = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; }else{ recall_lv2->input_port = (uint32_t *) realloc(recall_lv2->input_port, (recall_lv2->input_lines + 1) * sizeof(uint32_t)); recall_lv2->input_port[recall_lv2->input_lines] = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; } recall_lv2->input_lines += 1; }else if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){ if(recall_lv2->output_port == NULL){ recall_lv2->output_port = (uint32_t *) malloc(sizeof(uint32_t)); recall_lv2->output_port[0] = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; }else{ recall_lv2->output_port = (uint32_t *) realloc(recall_lv2->output_port, (recall_lv2->output_lines + 1) * sizeof(uint32_t)); recall_lv2->output_port[recall_lv2->output_lines] = AGS_PORT_DESCRIPTOR(port_descriptor->data)->port_index; } recall_lv2->output_lines += 1; } } port_descriptor = port_descriptor->next; } AGS_RECALL(recall_lv2)->port = g_list_reverse(port); } return(g_list_copy(AGS_RECALL(recall_lv2)->port)); } /** * ags_recall_lv2_load_conversion: * @recall_lv2: the #AgsRecallLv2 * @port: an #AgsPort * @port_descriptor: the #AgsPortDescriptor-struct * * Loads conversion object by using @port_descriptor and sets in on @port. * * Since: 1.0.0 */ void ags_recall_lv2_load_conversion(AgsRecallLv2 *recall_lv2, GObject *port, gpointer port_descriptor) { AgsLv2Conversion *lv2_conversion; if(recall_lv2 == NULL || port == NULL || port_descriptor == NULL){ return; } lv2_conversion = NULL; if((AGS_PORT_DESCRIPTOR_LOGARITHMIC & (AGS_PORT_DESCRIPTOR(port_descriptor)->flags)) != 0){ lv2_conversion = ags_lv2_conversion_new(); g_object_set(port, "conversion", lv2_conversion, NULL); lv2_conversion->flags |= AGS_LV2_CONVERSION_LOGARITHMIC; } } /** * ags_recall_lv2_find: * @recall: a #GList containing #AgsRecall * @filename: plugin filename * @uri: uri's name * * Retrieve LV2 recall. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_recall_lv2_find(GList *recall, gchar *filename, gchar *uri) { while(recall != NULL){ if(AGS_IS_RECALL_LV2(recall->data)){ if(!g_strcmp0(AGS_RECALL_LV2(recall->data)->filename, filename) && !g_strcmp0(AGS_RECALL_LV2(recall->data)->uri, uri)){ return(recall); } } recall = recall->next; } return(NULL); } /** * ags_recall_lv2_new: * @source: the source * @turtle: the .ttl file * @filename: the LV2 plugin filename * @effect: the LV2 plugin effect * @uri: uri's name * @index: uri's index * * Creates a #AgsRecallLv2 * * Returns: a new #AgsRecallLv2 * * Since: 1.0.0 */ AgsRecallLv2* ags_recall_lv2_new(AgsChannel *source, AgsTurtle *turtle, gchar *filename, gchar *effect, gchar *uri, uint32_t index) { GObject *soundcard; AgsRecallLv2 *recall_lv2; if(source != NULL){ soundcard = AGS_AUDIO(source->audio)->soundcard; }else{ soundcard = NULL; } recall_lv2 = (AgsRecallLv2 *) g_object_new(AGS_TYPE_RECALL_LV2, "soundcard", soundcard, "turtle", turtle, "source", source, "filename", filename, "effect", effect, "uri", uri, "index", index, NULL); return(recall_lv2); } gsequencer-1.4.24/ags/audio/ags_port.c0000644000175000017500000005757013256163135014544 00000000000000/* 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 . */ #include #include #include #include void ags_port_class_init(AgsPortClass *port_class); void ags_port_connectable_interface_init(AgsConnectableInterface *connectable); void ags_port_init(AgsPort *port); void ags_port_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_port_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_port_connect(AgsConnectable *connectable); void ags_port_disconnect(AgsConnectable *connectable); void ags_port_real_safe_read(AgsPort *port, GValue *value); void ags_port_real_safe_write(AgsPort *port, GValue *value); void ags_port_real_safe_get_property(AgsPort *port, gchar *property_name, GValue *value); void ags_port_real_safe_set_property(AgsPort *port, gchar *property_name, GValue *value); /** * SECTION:ags_port * @short_description: Perform thread-safe operations * @title: AgsPort * @section_id: * @include: ags/audio/ags_port.h * * #AgsPort provides a thread-safe way to access or change values or properties. */ enum{ SAFE_READ, SAFE_WRITE, SAFE_GET_PROPERTY, SAFE_SET_PROPERTY, LAST_SIGNAL, }; enum{ PROP_0, PROP_PLUGIN_NAME, PROP_SPECIFIER, PROP_CONTROL_PORT, PROP_PORT_VALUE_IS_POINTER, PROP_PORT_VALUE_TYPE, PROP_PORT_VALUE_SIZE, PROP_PORT_VALUE_LENGTH, PROP_CONVERSION, PROP_PORT_VALUE, }; static gpointer ags_port_parent_class = NULL; static guint port_signals[LAST_SIGNAL]; #include #include GType ags_port_get_type (void) { static GType ags_type_port = 0; if(!ags_type_port){ static const GTypeInfo ags_port_info = { sizeof (AgsPortClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_port_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsPort), 0, /* n_preallocs */ (GInstanceInitFunc) ags_port_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_port_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_port = g_type_register_static(G_TYPE_OBJECT, "AgsPort", &ags_port_info, 0); g_type_add_interface_static(ags_type_port, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_port); } void ags_port_class_init(AgsPortClass *port) { GObjectClass *gobject; GParamSpec *param_spec; ags_port_parent_class = g_type_class_peek_parent(port); /* GObjectClass */ gobject = (GObjectClass *) port; gobject->set_property = ags_port_set_property; gobject->get_property = ags_port_get_property; /* properties */ /** * AgsPort:plugin-name: * * The assigned plugin. * * Since: 1.0.0 */ param_spec = g_param_spec_string("plugin-name", i18n_pspec("plugin-name of port"), i18n_pspec("The plugin-name this port belongs to"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLUGIN_NAME, param_spec); /** * AgsPort:specifier: * * The assigned plugin identifier. * * Since: 1.0.0 */ param_spec = g_param_spec_string("specifier", i18n_pspec("specifier of port"), i18n_pspec("The specifier this port is identified by"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SPECIFIER, param_spec); /** * AgsPort:control-port: * * The assigned plugin control port. * * Since: 1.0.0 */ param_spec = g_param_spec_string("control-port", i18n_pspec("control-port of port"), i18n_pspec("The control-port this port is numbered"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTROL_PORT, param_spec); /** * AgsPort:port-value-is-pointer: * * Specify port data as pointer. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("port-value-is-pointer", i18n_pspec("port-value-is-pointer indicates if value is a pointer"), i18n_pspec("The port-value-is-pointer indicates if value is a pointer"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT_VALUE_IS_POINTER, param_spec); /** * AgsPort:port-value-type: * * The port's data type. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("port-value-type", i18n_pspec("port-value-type tells you the type of the values"), i18n_pspec("The port-value-type tells you the type of the values"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT_VALUE_TYPE, param_spec); /** * AgsPort:port-value-size: * * The port's data type size. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("port-value-size", i18n_pspec("port-value-size is the size of a single entry"), i18n_pspec("The port-value-size is the size of a single entry"), 1, 8, sizeof(gdouble), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT_VALUE_SIZE, param_spec); /** * AgsPort:port-value-length: * * The port's data array length. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("port-value-length", i18n_pspec("port-value-length is the array size"), i18n_pspec("The port-value-length is the array size"), 0, 65535, 1, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PORT_VALUE_LENGTH, param_spec); /** * AgsPort:conversion: * * The port's conversion object. * * Since: 1.0.0 */ param_spec = g_param_spec_object("conversion", i18n_pspec("conversion converts values"), i18n_pspec("The conversion is able to translate values"), AGS_TYPE_CONVERSION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONVERSION, param_spec); /* AgsPortClass */ port->safe_read = ags_port_real_safe_read; port->safe_write = ags_port_real_safe_write; port->safe_get_property = ags_port_real_safe_get_property; port->safe_set_property = ags_port_real_safe_set_property; /* signals */ /** * AgsPort::safe-read: * @port: the object providing safe read * * The ::safe-read signal is emited while doing safe read operation. */ port_signals[SAFE_READ] = g_signal_new("safe-read", G_TYPE_FROM_CLASS (port), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsPortClass, safe_read), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsPort::safe-write: * @port: the object providing safe write * * The ::safe-write signal is emited while doing safe write operation. */ port_signals[SAFE_WRITE] = g_signal_new("safe-write", G_TYPE_FROM_CLASS (port), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsPortClass, safe_write), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); /** * AgsPort::safe-get-property: * @port: the object providing safe get property * * The ::safe-get-property signal is emited while safe get property. */ port_signals[SAFE_GET_PROPERTY] = g_signal_new("safe-get-property", G_TYPE_FROM_CLASS (port), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsPortClass, safe_get_property), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_POINTER, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_POINTER); /** * AgsPort::safe-set-property: * @port: the object providing safe set property * * The ::safe-set-property signal is emited while safe set property. */ port_signals[SAFE_SET_PROPERTY] = g_signal_new("safe-set-property", G_TYPE_FROM_CLASS (port), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsPortClass, safe_set_property), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_POINTER, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_POINTER); } void ags_port_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->add_to_registry = NULL; connectable->remove_from_registry = NULL; connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_port_connect; connectable->disconnect = ags_port_disconnect; } void ags_port_init(AgsPort *port) { pthread_mutexattr_t mutexattr; port->flags = 0; // AGS_PORT_CONVERT_ALWAYS; port->plugin_name = NULL; port->specifier = NULL; port->control_port = NULL; port->port_value_is_pointer = FALSE; port->port_value_type = G_TYPE_DOUBLE; port->port_value_size = sizeof(gdouble); port->port_value_length = 1; port->port_value.ags_port_double = 0.0; pthread_mutexattr_init(&mutexattr); pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE); port->mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(port->mutex, &mutexattr); port->port_descriptor = NULL; port->conversion = ags_conversion_new(); g_object_ref(port->conversion); port->automation = NULL; } void ags_port_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsPort *port; port = AGS_PORT(gobject); switch(prop_id){ case PROP_PLUGIN_NAME: { gchar *plugin_name; plugin_name = (gchar *) g_value_get_string(value); if(port->plugin_name == plugin_name){ return; } if(port->plugin_name != NULL){ g_free(port->plugin_name); } port->plugin_name = g_strdup(plugin_name); } break; case PROP_SPECIFIER: { gchar *specifier; specifier = (gchar *) g_value_get_string(value); if(port->specifier == specifier){ return; } if(port->specifier != NULL){ g_free(port->specifier); } port->specifier = g_strdup(specifier); } break; case PROP_CONTROL_PORT: { gchar *control_port; control_port = (gchar *) g_value_get_string(value); if(port->control_port == control_port){ return; } if(port->control_port != NULL){ g_free(port->control_port); } port->control_port = g_strdup(control_port); } break; case PROP_PORT_VALUE_IS_POINTER: { port->port_value_is_pointer = g_value_get_boolean(value); } break; case PROP_PORT_VALUE_TYPE: { port->port_value_type = g_value_get_gtype(value); } break; case PROP_PORT_VALUE_SIZE: { port->port_value_size = g_value_get_uint(value); } break; case PROP_PORT_VALUE_LENGTH: { port->port_value_length = g_value_get_uint(value); } break; case PROP_CONVERSION: { AgsConversion *conversion; conversion = g_value_get_object(value); if(conversion == port->conversion){ return; } if(port->conversion != NULL){ g_object_unref(port->conversion); } if(conversion != NULL){ g_object_ref(conversion); } port->conversion = conversion; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_port_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsPort *port; port = AGS_PORT(gobject); switch(prop_id){ case PROP_PLUGIN_NAME: { g_value_set_string(value, port->plugin_name); } break; case PROP_SPECIFIER: { g_value_set_string(value, port->specifier); } break; case PROP_CONTROL_PORT: { g_value_set_string(value, port->control_port); } break; case PROP_PORT_VALUE_IS_POINTER: { g_value_set_boolean(value, port->port_value_is_pointer); } break; case PROP_PORT_VALUE_TYPE: { g_value_set_gtype(value, port->port_value_type); } break; case PROP_PORT_VALUE_SIZE: { g_value_set_uint(value, port->port_value_size); } break; case PROP_PORT_VALUE_LENGTH: { g_value_set_uint(value, port->port_value_length); } break; case PROP_CONVERSION: { g_value_set_object(value, port->conversion); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_port_connect(AgsConnectable *connectable) { /* empty */ } void ags_port_disconnect(AgsConnectable *connectable) { /* empty */ } void ags_port_real_safe_read(AgsPort *port, GValue *value) { guint overall_size; gpointer data; pthread_mutex_lock(port->mutex); overall_size = port->port_value_length * port->port_value_size; if(!port->port_value_is_pointer){ if(port->port_value_type == G_TYPE_BOOLEAN){ g_value_set_boolean(value, port->port_value.ags_port_boolean); }else if(port->port_value_type == G_TYPE_INT64){ g_value_set_int64(value, port->port_value.ags_port_int); }else if(port->port_value_type == G_TYPE_UINT64){ g_value_set_uint64(value, port->port_value.ags_port_uint); }else if(port->port_value_type == G_TYPE_FLOAT){ gfloat new_value; if((AGS_PORT_CONVERT_ALWAYS & (port->flags)) != 0){ new_value = (gfloat) ags_conversion_convert(port->conversion, (double) port->port_value.ags_port_float, TRUE); }else{ new_value = port->port_value.ags_port_float; } g_value_set_float(value, new_value); }else if(port->port_value_type == G_TYPE_DOUBLE){ gdouble new_value; if((AGS_PORT_CONVERT_ALWAYS & (port->flags)) != 0){ new_value = ags_conversion_convert(port->conversion, port->port_value.ags_port_double, TRUE); }else{ new_value = port->port_value.ags_port_double; } g_value_set_double(value, new_value); }else{ data = NULL; if(port->port_value_type == G_TYPE_POINTER){ data = port->port_value.ags_port_pointer; }else if(port->port_value_type == G_TYPE_OBJECT){ data = port->port_value.ags_port_object; } g_value_set_pointer(value, data); } }else{ data = NULL; if(port->port_value_type == G_TYPE_POINTER){ data = port->port_value.ags_port_pointer; }else if(port->port_value_type == G_TYPE_OBJECT){ data = port->port_value.ags_port_object; }else{ data = (gpointer) malloc(overall_size); if(port->port_value_type == G_TYPE_BOOLEAN){ memcpy(data, port->port_value.ags_port_boolean_ptr, overall_size); }else if(port->port_value_type == G_TYPE_INT64){ memcpy(data, port->port_value.ags_port_int_ptr, overall_size); }else if(port->port_value_type == G_TYPE_UINT64){ memcpy(data, port->port_value.ags_port_uint_ptr, overall_size); }else if(port->port_value_type == G_TYPE_FLOAT){ guint i; for(i = 0; i < port->port_value_length; i++){ ((gfloat *) data)[i] = port->port_value.ags_port_float_ptr[i]; } }else if(port->port_value_type == G_TYPE_DOUBLE){ guint i; for(i = 0; i < port->port_value_length; i++){ ((gdouble *) data)[i] = port->port_value.ags_port_double_ptr[i]; } } } g_value_set_pointer(value, data); } pthread_mutex_unlock(port->mutex); } /** * ags_port_safe_read: * @port: an #AgsPort * @value: the #GValue to store result * * Perform safe read. * * Since: 1.0.0 */ void ags_port_safe_read(AgsPort *port, GValue *value) { g_return_if_fail(AGS_IS_PORT(port)); g_object_ref(G_OBJECT(port)); g_signal_emit(G_OBJECT(port), port_signals[SAFE_READ], 0, value); g_object_unref(G_OBJECT(port)); } void ags_port_real_safe_write(AgsPort *port, GValue *value) { guint overall_size; gpointer data; if(port == NULL){ return; } overall_size = port->port_value_length * port->port_value_size; pthread_mutex_lock(port->mutex); if(!port->port_value_is_pointer){ if(port->port_value_type == G_TYPE_BOOLEAN){ port->port_value.ags_port_boolean = g_value_get_boolean(value); }else if(port->port_value_type == G_TYPE_INT64){ port->port_value.ags_port_int = g_value_get_int64(value); }else if(port->port_value_type == G_TYPE_UINT64){ port->port_value.ags_port_uint = g_value_get_uint64(value); }else if(port->port_value_type == G_TYPE_FLOAT){ if((AGS_PORT_CONVERT_ALWAYS & (port->flags)) != 0 && port->conversion != NULL){ if((AGS_PORT_USE_LADSPA_FLOAT & (port->flags)) == 0){ port->port_value.ags_port_float = (gfloat) ags_conversion_convert(port->conversion, (double) g_value_get_float(value), FALSE); }else{ LADSPA_Data val; val = g_value_get_float(value); port->port_value.ags_port_ladspa = (LADSPA_Data) ags_conversion_convert(port->conversion, (double) val, FALSE); } }else{ if((AGS_PORT_USE_LADSPA_FLOAT & (port->flags)) == 0){ port->port_value.ags_port_float = (gfloat) g_value_get_float(value); }else{ port->port_value.ags_port_ladspa = (LADSPA_Data) g_value_get_float(value); } } }else if(port->port_value_type == G_TYPE_DOUBLE){ if((AGS_PORT_CONVERT_ALWAYS & (port->flags)) != 0 && port->conversion != NULL){ port->port_value.ags_port_double = ags_conversion_convert(port->conversion, g_value_get_double(value), FALSE); }else{ port->port_value.ags_port_double = g_value_get_double(value); } }else if(port->port_value_type == G_TYPE_POINTER){ port->port_value.ags_port_pointer = g_value_get_pointer(value); }else if(port->port_value_type == G_TYPE_OBJECT){ port->port_value.ags_port_object = g_value_get_object(value); }else{ g_warning("ags_port.c: unknown type"); } }else{ data = g_value_get_pointer(value); if(port->port_value_type == G_TYPE_BOOLEAN){ memcpy(port->port_value.ags_port_boolean_ptr, data, overall_size); }else if(port->port_value_type == G_TYPE_INT64){ memcpy(port->port_value.ags_port_int_ptr, data, overall_size); }else if(port->port_value_type == G_TYPE_UINT64){ memcpy(port->port_value.ags_port_uint_ptr, data, overall_size); }else if(port->port_value_type == G_TYPE_DOUBLE){ memcpy(port->port_value.ags_port_double_ptr, data, overall_size); }else if(port->port_value_type == G_TYPE_POINTER){ port->port_value.ags_port_pointer = data; }else{ data = g_value_get_object(value); if(port->port_value_type == G_TYPE_OBJECT){ port->port_value.ags_port_object = data; }else{ g_warning("ags_port.c: unknown type"); } } } pthread_mutex_unlock(port->mutex); } /** * ags_port_safe_write: * @port: an #AgsPort * @value: the #GValue containing data * * Perform safe write. * * Since: 1.0.0 */ void ags_port_safe_write(AgsPort *port, GValue *value) { g_return_if_fail(AGS_IS_PORT(port)); g_object_ref(G_OBJECT(port)); g_signal_emit(G_OBJECT(port), port_signals[SAFE_WRITE], 0, value); g_object_unref(G_OBJECT(port)); } void ags_port_safe_write_raw(AgsPort *port, GValue *value) { guint overall_size; gpointer data; if(port == NULL){ return; } overall_size = port->port_value_length * port->port_value_size; pthread_mutex_lock(port->mutex); if(!port->port_value_is_pointer){ if(port->port_value_type == G_TYPE_BOOLEAN){ port->port_value.ags_port_boolean = g_value_get_boolean(value); }else if(port->port_value_type == G_TYPE_INT64){ port->port_value.ags_port_int = g_value_get_int64(value); }else if(port->port_value_type == G_TYPE_UINT64){ port->port_value.ags_port_uint = g_value_get_uint64(value); }else if(port->port_value_type == G_TYPE_FLOAT){ if((AGS_PORT_USE_LADSPA_FLOAT & (port->flags)) == 0){ port->port_value.ags_port_float = (gfloat) g_value_get_float(value); }else{ port->port_value.ags_port_ladspa = (LADSPA_Data) g_value_get_float(value); } }else if(port->port_value_type == G_TYPE_DOUBLE){ port->port_value.ags_port_double = g_value_get_double(value); }else if(port->port_value_type == G_TYPE_POINTER){ port->port_value.ags_port_pointer = g_value_get_pointer(value); }else if(port->port_value_type == G_TYPE_OBJECT){ port->port_value.ags_port_object = g_value_get_object(value); }else{ g_warning("ags_port.c: unknown type"); } }else{ data = g_value_get_pointer(value); if(port->port_value_type == G_TYPE_BOOLEAN){ memcpy(port->port_value.ags_port_boolean_ptr, data, overall_size); }else if(port->port_value_type == G_TYPE_INT64){ memcpy(port->port_value.ags_port_int_ptr, data, overall_size); }else if(port->port_value_type == G_TYPE_UINT64){ memcpy(port->port_value.ags_port_uint_ptr, data, overall_size); }else if(port->port_value_type == G_TYPE_DOUBLE){ memcpy(port->port_value.ags_port_double_ptr, data, overall_size); }else if(port->port_value_type == G_TYPE_POINTER){ port->port_value.ags_port_pointer = data; }else{ data = g_value_get_object(value); if(port->port_value_type == G_TYPE_OBJECT){ port->port_value.ags_port_object = data; }else{ g_warning("ags_port.c: unknown type"); } } } pthread_mutex_unlock(port->mutex); } void ags_port_real_safe_get_property(AgsPort *port, gchar *property_name, GValue *value) { pthread_mutex_lock(port->mutex); g_object_get_property(port->port_value.ags_port_object, property_name, value); pthread_mutex_unlock(port->mutex); } /** * ags_port_safe_get_property: * @port: an #AgsPort * @property_name: the property's name * @value: the #GValue to store the result * * Perform safe get property. * * Since: 1.0.0 */ void ags_port_safe_get_property(AgsPort *port, gchar *property_name, GValue *value) { g_return_if_fail(AGS_IS_PORT(port)); g_object_ref(G_OBJECT(port)); g_signal_emit(G_OBJECT(port), port_signals[SAFE_GET_PROPERTY], 0, property_name, value); g_object_unref(G_OBJECT(port)); } void ags_port_real_safe_set_property(AgsPort *port, gchar *property_name, GValue *value) { pthread_mutex_lock(port->mutex); g_object_set_property(port->port_value.ags_port_object, property_name, value); pthread_mutex_unlock(port->mutex); } /** * ags_port_safe_set_property: * @port: an #AgsPort * @property_name: the property's name * @value: the #GValue containing data * * Perform safe set property. * * Since: 1.0.0 */ void ags_port_safe_set_property(AgsPort *port, gchar *property_name, GValue *value) { g_return_if_fail(AGS_IS_PORT(port)); g_object_ref(G_OBJECT(port)); g_signal_emit(G_OBJECT(port), port_signals[SAFE_SET_PROPERTY], 0, property_name, value); g_object_unref(G_OBJECT(port)); } /** * ags_port_find_specifier: * @port: a #GList containing #AgsPort * @specifier: the recall specifier to match * * Retrieve port by specifier. * * Returns: Next match. * * Since: 1.0.0 */ GList* ags_port_find_specifier(GList *port, gchar *specifier) { while(port != NULL){ if(!g_strcmp0(AGS_PORT(port->data)->specifier, specifier)){ return(port); } port = port->next; } return(NULL); } /** * ags_port_new: * * Creates an #AgsPort. * * Returns: a new #AgsPort. * * Since: 1.0.0 */ AgsPort* ags_port_new() { AgsPort *port; port = (AgsPort *) g_object_new(AGS_TYPE_PORT, NULL); return(port); } gsequencer-1.4.24/ags/audio/ags_playable.h0000644000175000017500000001210413256163135015336 00000000000000/* 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 . */ #ifndef __AGS_PLAYABLE_H__ #define __AGS_PLAYABLE_H__ #include #include #define AGS_TYPE_PLAYABLE (ags_playable_get_type()) #define AGS_PLAYABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PLAYABLE, AgsPlayable)) #define AGS_PLAYABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_PLAYABLE, AgsPlayableInterface)) #define AGS_IS_PLAYABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PLAYABLE)) #define AGS_IS_PLAYABLE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_PLAYABLE)) #define AGS_PLAYABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_PLAYABLE, AgsPlayableInterface)) typedef struct _AgsPlayable AgsPlayable; typedef struct _AgsPlayableInterface AgsPlayableInterface; #define AGS_PLAYABLE_ERROR (ags_playable_error_quark()) typedef enum{ AGS_PLAYABLE_ERROR_NO_SUCH_LEVEL, AGS_PLAYABLE_ERROR_NO_SAMPLE, }AgsPlayableError; struct _AgsPlayableInterface { GTypeInterface ginterface; gboolean (*open)(AgsPlayable *playable, gchar *name); gboolean (*rw_open)(AgsPlayable *playable, gchar *name, gboolean create, guint samplerate, guint channels, guint frames, guint format); /* these functions are especially for soundfonts */ guint (*level_count)(AgsPlayable *playable); guint (*nth_level)(AgsPlayable *playable); gchar* (*selected_level)(AgsPlayable *playable); gchar** (*sublevel_names)(AgsPlayable *playable); void (*level_select)(AgsPlayable *playable, guint nth_level, gchar *sublevel_name, GError **error); void (*level_up)(AgsPlayable *playable, guint levels, GError **error); void (*iter_start)(AgsPlayable *playable); gboolean (*iter_next)(AgsPlayable *playable); /* read sample data */ void (*info)(AgsPlayable *playable, guint *channels, guint *frames, guint *loop_start, guint *loop_end, GError **error); guint (*get_samplerate)(AgsPlayable *playable); guint (*get_format)(AgsPlayable *playable); double* (*read)(AgsPlayable *playable, guint channel, GError **error); int* (*read_int)(AgsPlayable *playable, guint channel, GError **error); /* write sample data */ void (*write)(AgsPlayable *playable, double *buffer, guint buffer_length); void (*write_int)(AgsPlayable *playable, int *buffer, guint buffer_length); void (*flush)(AgsPlayable *playable); /* position */ void (*seek)(AgsPlayable *playable, guint frames, gint whence); /* close */ void (*close)(AgsPlayable *playable); }; GType ags_playable_get_type(); GQuark ags_playable_error_quark(); gboolean ags_playable_open(AgsPlayable *playable, gchar *name); gboolean ags_playable_rw_open(AgsPlayable *playable, gchar *name, gboolean create, guint samplerate, guint channels, guint frames, guint format); guint ags_playable_level_count(AgsPlayable *playable); guint ags_playable_nth_level(AgsPlayable *playable); gchar* ags_playable_selected_level(AgsPlayable *playable); gchar** ags_playable_sublevel_names(AgsPlayable *playable); void ags_playable_level_select(AgsPlayable *playable, guint nth_level, gchar *sublevel_name, GError **error); void ags_playable_level_up(AgsPlayable *playable, guint levels, GError **error); void ags_playable_iter_start(AgsPlayable *playable); gboolean ags_playable_iter_next(AgsPlayable *playable); void ags_playable_info(AgsPlayable *playable, guint *channels, guint *frames, guint *loop_start, guint *loop_end, GError **error); guint ags_playable_get_samplerate(AgsPlayable *playable); guint ags_playable_get_format(AgsPlayable *playable); double* ags_playable_read(AgsPlayable *playable, guint channel, GError **error); int* ags_playable_read_int(AgsPlayable *playable, guint channel, GError **error); void ags_playable_write(AgsPlayable *playable, double *buffer, guint buffer_length); void ags_playable_flush(AgsPlayable *playable); void ags_playable_seek(AgsPlayable *playable, guint frames, gint whence); void ags_playable_close(AgsPlayable *playable); GList* ags_playable_read_audio_signal(AgsPlayable *playable, GObject *soundcard, guint start_channel, guint channels_to_read); #endif /*__AGS_PLAYABLE_H__*/ gsequencer-1.4.24/ags/audio/ags_audio.h0000644000175000017500000002131213256163135014647 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2018 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 . */ #ifndef __AGS_AUDIO_H__ #define __AGS_AUDIO_H__ #include #include #include #include #include #define AGS_TYPE_AUDIO (ags_audio_get_type ()) #define AGS_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO, AgsAudio)) #define AGS_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUDIO, AgsAudioClass)) #define AGS_IS_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_AUDIO)) #define AGS_IS_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_AUDIO)) #define AGS_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_AUDIO, AgsAudioClass)) typedef struct _AgsAudio AgsAudio; typedef struct _AgsAudioClass AgsAudioClass; /** * AgsAudioFlags: * @AGS_AUDIO_SYNC: input/output is mapped synchronously * @AGS_AUDIO_ASYNC: input/output is mapped asynchronously * @AGS_AUDIO_OUTPUT_HAS_RECYCLING: output has recycling * @AGS_AUDIO_INPUT_HAS_RECYCLING: input has recycling * @AGS_AUDIO_INPUT_TAKES_FILE: input takes file * @AGS_AUDIO_INPUT_TAKES_SYNTH: input takes synth * @AGS_AUDIO_REVERSE_MAPPING: interpret notation reverse * @AGS_AUDIO_HAS_NOTATION: has notation * @AGS_AUDIO_NOTATION_DEFAULT: notation default mapped on input channels * @AGS_AUDIO_PATTERN_MODE: notation only contains fixed size notes * @AGS_AUDIO_RUNNING: it is running * @AGS_AUDIO_PLAYING: it is playing * @AGS_AUDIO_CONNECTED: the audio was connected by #AgsConnectable::connect() * @AGS_AUDIO_CAN_NEXT_ACTIVE: can determine next active input * @AGS_AUDIO_NO_OUTPUT: no output provided * @AGS_AUDIO_NO_INPUT: no input provided * @AGS_AUDIO_SKIP_OUTPUT: skip output as processing audio data * @AGS_AUDIO_SKIP_INPUT: skip input as processing audio data * @AGS_AUDIO_HAS_WAVE: has wave * @AGS_AUDIO_WAVE_DEFAULT: wave default mapped on input channels * * Enum values to control the behavior or indicate internal state of #AgsAudio by * enable/disable as flags. */ typedef enum{ AGS_AUDIO_SYNC = 1, // can be combined with below AGS_AUDIO_ASYNC = 1 << 1, AGS_AUDIO_OUTPUT_HAS_RECYCLING = 1 << 2, AGS_AUDIO_INPUT_HAS_RECYCLING = 1 << 3, AGS_AUDIO_INPUT_TAKES_FILE = 1 << 4, AGS_AUDIO_INPUT_TAKES_SYNTH = 1 << 5, AGS_AUDIO_REVERSE_MAPPING = 1 << 6, AGS_AUDIO_HAS_NOTATION = 1 << 7, AGS_AUDIO_NOTATION_DEFAULT = 1 << 8, AGS_AUDIO_PATTERN_MODE = 1 << 9, AGS_AUDIO_RUNNING = 1 << 10, AGS_AUDIO_PLAYING = 1 << 11, AGS_AUDIO_CONNECTED = 1 << 12, AGS_AUDIO_CAN_NEXT_ACTIVE = 1 << 13, AGS_AUDIO_NO_OUTPUT = 1 << 14, AGS_AUDIO_NO_INPUT = 1 << 15, AGS_AUDIO_SKIP_OUTPUT = 1 << 16, AGS_AUDIO_SKIP_INPUT = 1 << 17, AGS_AUDIO_HAS_WAVE = 1 << 18, AGS_AUDIO_WAVE_DEFAULT = 1 << 19, AGS_AUDIO_HAS_PATTERN = 1 << 20, }AgsAudioFlags; struct _AgsAudio { GObject object; guint flags; pthread_mutex_t *obj_mutex; pthread_mutexattr_t *obj_mutexattr; GObject *soundcard; guint level; GObject *sequencer; GObject *midi_file; guint samplerate; guint buffer_size; guint format; guint sequence_length; guint bank_dim[3]; guint audio_channels; guint output_pads; guint output_lines; guint input_pads; guint input_lines; guint audio_start_mapping; guint audio_end_mapping; guint midi_start_mapping; guint midi_end_mapping; guint midi_channel; GList *audio_connection; GList *preset; AgsChannel *output; AgsChannel *input; GObject *playback_domain; GList *notation; GList *automation; GList *wave; GList *recall_id; GList *recycling_context; pthread_mutexattr_t *recall_mutexattr; pthread_mutex_t *recall_mutex; pthread_mutexattr_t *play_mutexattr; pthread_mutex_t *play_mutex; GList *container; GList *recall; GList *play; GList *recall_remove; //TODO:JK: verify deprecation GList *play_remove; //TODO:JK: verify deprecation GObject *machine; }; struct _AgsAudioClass { GObjectClass object; void (*check_connection)(AgsAudio *audio); void (*set_audio_channels)(AgsAudio *audio, guint audio_channels, guint audio_channels_old); void (*set_pads)(AgsAudio *audio, GType channel_type, guint pads, guint pads_old); AgsRecallID* (*init_run)(AgsAudio *audio); void (*tact)(AgsAudio *audio, AgsRecallID *recall_id); void (*done)(AgsAudio *audio, AgsRecallID *recall_id); }; GType ags_audio_get_type(); void ags_audio_set_soundcard(AgsAudio *audio, GObject *soundcard); void ags_audio_set_flags(AgsAudio *audio, guint flags); void ags_audio_unset_flags(AgsAudio *audio, guint flags); void ags_audio_check_connection(AgsAudio *audio); void ags_audio_set_audio_channels(AgsAudio *audio, guint audio_channels); void ags_audio_set_pads(AgsAudio *audio, GType channel_type, guint pads); void ags_audio_set_samplerate(AgsAudio *audio, guint samplerate); void ags_audio_set_buffer_size(AgsAudio *audio, guint buffer_size); void ags_audio_set_format(AgsAudio *audio, guint format); void ags_audio_set_sequence_length(AgsAudio *audio, guint sequence_length); void ags_audio_add_audio_connection(AgsAudio *audio, GObject *audio_connection); void ags_audio_remove_audio_connection(AgsAudio *audio, GObject *audio_connection); void ags_audio_add_preset(AgsAudio *audio, GObject *preset); void ags_audio_remove_preset(AgsAudio *audio, GObject *preset); void ags_audio_add_notation(AgsAudio *audio, GObject *notation); void ags_audio_remove_notation(AgsAudio *audio, GObject *notation); void ags_audio_add_automation(AgsAudio *audio, GObject *automation); void ags_audio_remove_automation(AgsAudio *audio, GObject *automation); void ags_audio_add_wave(AgsAudio *audio, GObject *wave); void ags_audio_remove_wave(AgsAudio *audio, GObject *wave); void ags_audio_add_recall_id(AgsAudio *audio, GObject *recall_id); void ags_audio_remove_recall_id(AgsAudio *audio, GObject *recall_id); void ags_audio_add_recycling_context(AgsAudio *audio, GObject *recycling_context); void ags_audio_remove_recycling_context(AgsAudio *audio, GObject *recycling_context); void ags_audio_add_recall_container(AgsAudio *audio, GObject *recall_container); void ags_audio_remove_recall_container(AgsAudio *audio, GObject *recall_container); void ags_audio_add_recall(AgsAudio *audio, GObject *recall, gboolean play); void ags_audio_remove_recall(AgsAudio *audio, GObject *recall, gboolean play); AgsRecallID* ags_audio_init_run(AgsAudio *audio); void ags_audio_duplicate_recall(AgsAudio *audio, AgsRecallID *recall_id); void ags_audio_init_recall(AgsAudio *audio, gint stage, AgsRecallID *recall_id); void ags_audio_resolve_recall(AgsAudio *audio, AgsRecallID *recall_id); gboolean ags_audio_is_playing(AgsAudio *audio); void ags_audio_play(AgsAudio *audio, AgsRecallID *recall_id, gint stage); void ags_audio_tact(AgsAudio *audio, AgsRecallID *recall_id); void ags_audio_done(AgsAudio *audio, AgsRecallID *recall_id); void ags_audio_cancel(AgsAudio *audio, AgsRecallID *recall_id); void ags_audio_remove(AgsAudio *audio, AgsRecallID *recall_id); GList* ags_audio_find_port(AgsAudio *audio); GObject* ags_audio_find_port_by_specifier_and_scope(AgsAudio *audio, gchar *specifier, gboolean play); void ags_audio_open_files(AgsAudio *audio, GSList *filenames, gboolean overwrite_channels, gboolean create_channels); void ags_audio_recursive_set_property(AgsAudio *audio, GParameter *parameter, gint n_params); GList* ags_audio_recursive_play_init(AgsAudio *audio, gboolean playback, gboolean sequencer, gboolean notation); AgsAudio* ags_audio_new(GObject *soundcard); #endif /*__AGS_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/ags_audio_connection.h0000644000175000017500000000713313256163135017073 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUDIO_CONNECTION_H__ #define __AGS_AUDIO_CONNECTION_H__ #include #include #include #define AGS_TYPE_AUDIO_CONNECTION (ags_audio_connection_get_type()) #define AGS_AUDIO_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_CONNECTION, AgsAudioConnection)) #define AGS_AUDIO_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_AUDIO_CONNECTION, AgsAudioConnection)) #define AGS_IS_AUDIO_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUDIO_CONNECTION)) #define AGS_IS_AUDIO_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUDIO_CONNECTION)) #define AGS_AUDIO_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_AUDIO_CONNECTION, AgsAudioConnectionClass)) typedef struct _AgsAudioConnection AgsAudioConnection; typedef struct _AgsAudioConnectionClass AgsAudioConnectionClass; /** * AgsAudioConnectionFlags: * @AGS_AUDIO_CONNECTION_IS_AUDIO: the connection is related to audio * @AGS_AUDIO_CONNECTION_IS_OUTPUT: the connection is related to output * @AGS_AUDIO_CONNECTION_IS_INPUT: the connection is related to input * @AGS_AUDIO_CONNECTION_IS_REMOTE: the connection is related to remote * @AGS_AUDIO_CONNECTION_IS_SOUNDCARD_DATA: the connection is related to soundcard data * @AGS_AUDIO_CONNECTION_IS_SEQUENCER_DATA: the connection is related to sequencer data * @AGS_AUDIO_CONNECTION_SCOPE_AUDIO: it applies to audio scope * @AGS_AUDIO_CONNECTION_SCOPE_CHANNEL: it applies to audio scope * @AGS_AUDIO_CONNECTION_SCOPE_PAD: it applies to audio scope * @AGS_AUDIO_CONNECTION_SCOPE_LINE: it applies to audio scope * * Enum values to control the behavior or indicate internal state of #AgsAudioConnection by * enable/disable as flags. */ typedef enum{ AGS_AUDIO_CONNECTION_IS_AUDIO = 1, AGS_AUDIO_CONNECTION_IS_OUTPUT = 1, AGS_AUDIO_CONNECTION_IS_INPUT = 1 << 1, AGS_AUDIO_CONNECTION_IS_REMOTE = 1 << 3, AGS_AUDIO_CONNECTION_IS_SOUNDCARD_DATA = 1 << 4, AGS_AUDIO_CONNECTION_IS_SEQUENCER_DATA = 1 << 5, AGS_AUDIO_CONNECTION_SCOPE_AUDIO = 1 << 6, AGS_AUDIO_CONNECTION_SCOPE_CHANNEL = 1 << 7, AGS_AUDIO_CONNECTION_SCOPE_PAD = 1 << 8, AGS_AUDIO_CONNECTION_SCOPE_LINE = 1 << 9, }AgsAudioConnectionFlags; struct _AgsAudioConnection { AgsConnection connection; guint flags; GObject *audio; GType channel_type; guint pad; guint audio_channel; guint line; guint mapped_line; }; struct _AgsAudioConnectionClass { AgsConnectionClass connection; }; GType ags_audio_connection_get_type(); GList* ags_audio_connection_find(GList *list, GType channel_type, guint pad, guint audio_channel); AgsAudioConnection* ags_audio_connection_new(); #endif /*__AGS_AUDIO_CONNECTION_H__*/ gsequencer-1.4.24/ags/audio/ags_automation.h0000644000175000017500000001573013247044247015737 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_AUTOMATION_H__ #define __AGS_AUTOMATION_H__ #include #include #include #include #include #define AGS_TYPE_AUTOMATION (ags_automation_get_type()) #define AGS_AUTOMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTOMATION, AgsAutomation)) #define AGS_AUTOMATION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUTOMATION, AgsAutomationClass)) #define AGS_IS_AUTOMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUTOMATION)) #define AGS_IS_AUTOMATION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUTOMATION)) #define AGS_AUTOMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_AUTOMATION, AgsAutomationClass)) #define AGS_AUTOMATION_DEFAULT_BPM (120.0) #define AGS_AUTOMATION_TICS_PER_BEAT (1.0) #define AGS_AUTOMATION_MINIMUM_ACCELERATION_LENGTH (1.0 / 16.0 / 64.0) #define AGS_AUTOMATION_MAXIMUM_ACCELERATION_LENGTH (16.0) #define AGS_AUTOMATION_DEFAULT_LENGTH (64 * 16 * 1200 / AGS_AUTOMATION_TICS_PER_BEAT) #define AGS_AUTOMATION_DEFAULT_JIFFIE (60.0 / AGS_AUTOMATION_DEFAULT_BPM / AGS_AUTOMATION_TICS_PER_BEAT) #define AGS_AUTOMATION_DEFAULT_DURATION (AGS_AUTOMATION_DEFAULT_LENGTH * AGS_AUTOMATION_DEFAULT_JIFFIE * AGS_MICROSECONDS_PER_SECOND) #define AGS_AUTOMATION_DEFAULT_OFFSET (64 * (1 / AGS_AUTOMATION_MINIMUM_ACCELERATION_LENGTH)) #define AGS_AUTOMATION_DEFAULT_PRECISION (8) #define AGS_AUTOMATION_MAXIMUM_STEPS (128) #define AGS_AUTOMATION_CLIPBOARD_VERSION "1.3.0" #define AGS_AUTOMATION_CLIPBOARD_TYPE "AgsAutomationClipboardXml" #define AGS_AUTOMATION_CLIPBOARD_FORMAT "AgsAutomationNativeScale" #define AGS_AUTOMATION_CLIPBOARD_LEGACY_FORMAT "AgsAutomationNativePiano" typedef struct _AgsAutomation AgsAutomation; typedef struct _AgsAutomationClass AgsAutomationClass; /** * AgsAutomationFlags: * @AGS_AUTOMATION_CONNECTED: indicates the automation was connected by calling #AgsConnectable::connect() * @AGS_AUTOMATION_BYPASS: ignore any automation data * * Enum values to control the behavior or indicate internal state of #AgsAutomation by * enable/disable as flags. */ typedef enum{ AGS_AUTOMATION_CONNECTED = 1, AGS_AUTOMATION_BYPASS = 1 << 1, }AgsAutomationFlags; struct _AgsAutomation { GObject gobject; guint flags; AgsTimestamp *timestamp; GObject *audio; guint line; GType channel_type; gchar *control_name; guint steps; gdouble upper; gdouble lower; gdouble default_value; AgsFunction *source_function; GList *acceleration; gdouble loop_start; gdouble loop_end; gdouble offset; GList *selection; GObject *port; GList *current_accelerations; GList *next_accelerations; }; struct _AgsAutomationClass { GObjectClass gobject; }; GType ags_automation_get_type(void); GList* ags_automation_find_port(GList *automation, GObject *port); GList* ags_automation_find_near_timestamp(GList *automation, guint line, AgsTimestamp *timestamp); GList* ags_automation_find_near_timestamp_extended(GList *automation, guint line, GType channel_type, gchar *control_name, AgsTimestamp *timestamp); GList* ags_automation_add(GList *automation, AgsAutomation *new_automation); void ags_automation_add_acceleration(AgsAutomation *automation, AgsAcceleration *acceleration, gboolean use_selection_list); gboolean ags_automation_remove_acceleration_at_position(AgsAutomation *automation, guint x, gdouble y); GList* ags_automation_get_selection(AgsAutomation *automation); gboolean ags_automation_is_acceleration_selected(AgsAutomation *automation, AgsAcceleration *acceleration); AgsAcceleration* ags_automation_find_point(AgsAutomation *automation, guint x, gdouble y, gboolean use_selection_list); GList* ags_automation_find_region(AgsAutomation *automation, guint x0, gdouble y0, guint x1, gdouble y1, gboolean use_selection_list); void ags_automation_free_selection(AgsAutomation *automation); void ags_automation_add_point_to_selection(AgsAutomation *automation, guint x, gdouble y, gboolean replace_current_selection); void ags_automation_remove_point_from_selection(AgsAutomation *automation, guint x, gdouble y); void ags_automation_add_region_to_selection(AgsAutomation *automation, guint x0, gdouble y0, guint x1, gdouble y1, gboolean replace_current_selection); void ags_automation_remove_region_from_selection(AgsAutomation *automation, guint x0, gdouble y0, guint x1, gdouble y1); void ags_automation_add_all_to_selection(AgsAutomation *automation); xmlNode* ags_automation_copy_selection(AgsAutomation *automation); xmlNode* ags_automation_cut_selection(AgsAutomation *automation); void ags_automation_merge_clipboard(xmlNode *audio_node, xmlNode *automation_node); void ags_automation_insert_from_clipboard(AgsAutomation *automation, xmlNode *automation_node, gboolean reset_x_offset, guint x_offset, gboolean reset_y_offset, gdouble y_offset); void ags_automation_insert_from_clipboard_extended(AgsAutomation *automation, xmlNode *automation_node, gboolean reset_x_offset, guint x_offset, gboolean reset_y_offset, gdouble y_offset, gboolean match_line, gboolean no_duplicates); GList* ags_automation_get_current(AgsAutomation *automation); gchar** ags_automation_get_specifier_unique(GList *automation); gchar** ags_automation_get_specifier_unique_with_channel_type(GList *automation, GType channel_type); GList* ags_automation_find_specifier(GList *automation, gchar *specifier); GList* ags_automation_find_channel_type_with_control_name(GList *automation, GType channel_type, gchar *specifier); GList* ags_automation_find_specifier_with_type_and_line(GList *automation, gchar *specifier, GType channel_type, guint line); guint ags_automation_get_value(AgsAutomation *automation, guint x, guint x_end, gboolean use_prev_on_failure, GValue *value); AgsAutomation* ags_automation_new(GObject *audio, guint line, GType channel_type, gchar *control_name); #endif /*__AGS_AUTOMATION_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_audio_run.c0000644000175000017500000004100213247044247017050 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_recall_audio_run_class_init(AgsRecallAudioRunClass *recall_audio_run); void ags_recall_audio_run_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_audio_run_packable_interface_init(AgsPackableInterface *packable); void ags_recall_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_recall_audio_run_init(AgsRecallAudioRun *recall_audio_run); void ags_recall_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_recall_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_recall_audio_run_connect(AgsConnectable *connectable); void ags_recall_audio_run_disconnect(AgsConnectable *connectable); gboolean ags_recall_audio_run_pack(AgsPackable *packable, GObject *container); gboolean ags_recall_audio_run_unpack(AgsPackable *packable); void ags_recall_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_audio_run_dispose(GObject *gobject); void ags_recall_audio_run_finalize(GObject *gobject); void ags_recall_audio_run_remove(AgsRecall *recall); AgsRecall* ags_recall_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_recall_audio_run * @Short_description: audio context of dynamic recall * @Title: AgsRecallAudioRun * * #AgsRecallAudioRun acts as dynamic audio recall. */ enum{ LAST_SIGNAL, }; enum{ PROP_0, PROP_AUDIO, PROP_RECALL_AUDIO, }; static gpointer ags_recall_audio_run_parent_class = NULL; static AgsConnectableInterface* ags_recall_audio_run_parent_connectable_interface; static AgsPackableInterface* ags_recall_audio_run_parent_packable_interface; static AgsDynamicConnectableInterface *ags_recall_audio_run_parent_dynamic_connectable_interface; static guint recall_audio_run_signals[LAST_SIGNAL]; GType ags_recall_audio_run_get_type() { static GType ags_type_recall_audio_run = 0; if(!ags_type_recall_audio_run){ static const GTypeInfo ags_recall_audio_run_info = { sizeof (AgsRecallAudioRunClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_audio_run_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallAudioRun), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_audio_run_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_packable_interface_info = { (GInterfaceInitFunc) ags_recall_audio_run_packable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_audio_run_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_audio_run = g_type_register_static(AGS_TYPE_RECALL, "AgsRecallAudioRun", &ags_recall_audio_run_info, 0); g_type_add_interface_static(ags_type_recall_audio_run, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_audio_run, AGS_TYPE_PACKABLE, &ags_packable_interface_info); g_type_add_interface_static(ags_type_recall_audio_run, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); } return(ags_type_recall_audio_run); } void ags_recall_audio_run_class_init(AgsRecallAudioRunClass *recall_audio_run) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_recall_audio_run_parent_class = g_type_class_peek_parent(recall_audio_run); /* GObjectClass */ gobject = (GObjectClass *) recall_audio_run; gobject->set_property = ags_recall_audio_run_set_property; gobject->get_property = ags_recall_audio_run_get_property; gobject->dispose = ags_recall_audio_run_dispose; gobject->finalize = ags_recall_audio_run_finalize; /* properties */ /** * AgsRecallAudioRun:audio: * * The assigned audio. * * Since: 1.0.0.7 */ param_spec = g_param_spec_object("audio", i18n_pspec("assigned audio"), i18n_pspec("The audio object it is assigned to"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsRecallAudioRun:recall-audio: * * The recall audio belonging to. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-audio", i18n_pspec("AgsRecallAudio of this recall"), i18n_pspec("The AgsRecallAudio which this recall needs"), AGS_TYPE_RECALL_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO, param_spec); /* AgsRecallClass */ recall = (AgsRecallClass *) recall_audio_run; recall->remove = ags_recall_audio_run_remove; recall->duplicate = ags_recall_audio_run_duplicate; /* AgsRecallAudioRunClass */ } void ags_recall_audio_runconnectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_audio_run_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_audio_run_connect; connectable->disconnect = ags_recall_audio_run_disconnect; } void ags_recall_audio_run_packable_interface_init(AgsPackableInterface *packable) { ags_recall_audio_run_parent_packable_interface = g_type_interface_peek_parent(packable); packable->pack = ags_recall_audio_run_pack; packable->unpack = ags_recall_audio_run_unpack; } void ags_recall_audio_run_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_recall_audio_run_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_recall_audio_run_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_recall_audio_run_disconnect_dynamic; } void ags_recall_audio_run_init(AgsRecallAudioRun *recall_audio_run) { recall_audio_run->audio = NULL; recall_audio_run->recall_audio = NULL; } void ags_recall_audio_run_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRecallAudioRun *recall_audio_run; recall_audio_run = AGS_RECALL_AUDIO_RUN(gobject); switch(prop_id){ case PROP_AUDIO: { AgsRecallAudio *audio; audio = (AgsRecallAudio *) g_value_get_object(value); if(recall_audio_run->audio == audio){ return; } if(recall_audio_run->audio != NULL){ g_object_unref(G_OBJECT(recall_audio_run->audio)); } if(audio != NULL){ g_object_ref(G_OBJECT(audio)); } recall_audio_run->audio = audio; } break; case PROP_RECALL_AUDIO: { AgsRecallAudio *recall_audio; recall_audio = (AgsRecallAudio *) g_value_get_object(value); if(recall_audio_run->recall_audio == recall_audio){ return; } if(recall_audio_run->recall_audio != NULL){ g_object_unref(G_OBJECT(recall_audio_run->recall_audio)); } if(recall_audio != NULL){ g_object_ref(G_OBJECT(recall_audio)); } recall_audio_run->recall_audio = recall_audio; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_audio_run_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRecallAudioRun *recall_audio_run; recall_audio_run = AGS_RECALL_AUDIO_RUN(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, recall_audio_run->audio); } break; case PROP_RECALL_AUDIO: { g_value_set_object(value, recall_audio_run->recall_audio); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; }; } void ags_recall_audio_run_dispose(GObject *gobject) { AgsRecallAudioRun *recall_audio_run; recall_audio_run = AGS_RECALL_AUDIO_RUN(gobject); /* unpack */ ags_packable_unpack(AGS_PACKABLE(recall_audio_run)); if(AGS_RECALL(gobject)->container != NULL){ AgsRecallContainer *recall_container; recall_container = AGS_RECALL(gobject)->container; recall_container->recall_audio_run = g_list_remove(recall_container->recall_audio_run, gobject); g_object_unref(gobject); g_object_unref(AGS_RECALL(gobject)->container); AGS_RECALL(gobject)->container = NULL; } /* audio */ if(recall_audio_run->audio != NULL){ g_object_unref(G_OBJECT(recall_audio_run->audio)); recall_audio_run->audio = NULL; } /* recall audio */ if(recall_audio_run->recall_audio != NULL){ g_object_unref(G_OBJECT(recall_audio_run->recall_audio)); recall_audio_run->recall_audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_recall_audio_run_parent_class)->dispose(gobject); } void ags_recall_audio_run_finalize(GObject *gobject) { AgsRecallAudioRun *recall_audio_run; recall_audio_run = AGS_RECALL_AUDIO_RUN(gobject); if(AGS_RECALL(gobject)->container != NULL){ AgsRecallContainer *recall_container; recall_container = AGS_RECALL(gobject)->container; recall_container->recall_audio_run = g_list_remove(recall_container->recall_audio_run, gobject); g_object_unref(AGS_RECALL(gobject)->container); } /* audio */ if(recall_audio_run->audio != NULL){ g_object_unref(G_OBJECT(recall_audio_run->audio)); } /* recall audio */ if(recall_audio_run->recall_audio != NULL){ g_object_unref(G_OBJECT(recall_audio_run->recall_audio)); } /* call parent */ G_OBJECT_CLASS(ags_recall_audio_run_parent_class)->finalize(gobject); } void ags_recall_audio_run_connect(AgsConnectable *connectable) { if((AGS_RECALL_CONNECTED & (AGS_RECALL(connectable)->flags)) != 0){ return; } ags_recall_audio_run_parent_connectable_interface->connect(connectable); /* empty */ } void ags_recall_audio_run_disconnect(AgsConnectable *connectable) { ags_recall_audio_run_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_recall_audio_run_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { if((AGS_RECALL_DYNAMIC_CONNECTED & (AGS_RECALL(dynamic_connectable)->flags)) != 0){ return; } ags_recall_audio_run_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_recall_audio_run_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { ags_recall_audio_run_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } gboolean ags_recall_audio_run_pack(AgsPackable *packable, GObject *container) { AgsRecallAudioRun *recall_audio_run; AgsRecallContainer *recall_container; GList *list; AgsRecallID *recall_id; if(ags_recall_audio_run_parent_packable_interface->pack(packable, container)){ return(TRUE); } // g_message("pack a %d", (AGS_IS_COPY_PATTERN_AUDIO_RUN(packable) ? TRUE: FALSE)); recall_audio_run = AGS_RECALL_AUDIO_RUN(packable); recall_container = AGS_RECALL_CONTAINER(container); /* set AgsRecallAudio */ g_object_set(G_OBJECT(recall_audio_run), "recall-audio", recall_container->recall_audio, NULL); /* set in AgsRecallChannelRun */ list = recall_container->recall_channel_run; if(AGS_RECALL(packable)->recall_id != NULL){ recall_id = AGS_RECALL(packable)->recall_id; while((list = ags_recall_find_recycling_context(list, (GObject *) recall_id->recycling_context)) != NULL){ g_object_set(G_OBJECT(list->data), "recall-audio-run", AGS_RECALL_AUDIO_RUN(packable), NULL); list= list->next; } }else if((AGS_RECALL_TEMPLATE & (AGS_RECALL(packable)->flags)) != 0){ while((list = ags_recall_find_template(list)) != NULL){ g_object_set(G_OBJECT(list->data), "recall-audio-run", AGS_RECALL_AUDIO_RUN(packable), NULL); list= list->next; } } g_object_set(G_OBJECT(recall_container), "recall-audio-run", AGS_RECALL(packable), NULL); return(FALSE); } gboolean ags_recall_audio_run_unpack(AgsPackable *packable) { AgsRecallAudioRun *recall_audio_run; AgsRecall *recall; AgsRecallContainer *recall_container; GList *list; AgsRecallID *recall_id; recall = AGS_RECALL(packable); if(recall == NULL) return(TRUE); recall_container = AGS_RECALL_CONTAINER(recall->container); if(recall_container == NULL) return(TRUE); /* ref */ g_object_ref(recall); g_object_ref(recall_container); recall_audio_run = AGS_RECALL_AUDIO_RUN(packable); /* unset AgsRecallAudio */ g_object_set(G_OBJECT(recall_audio_run), "recall_audio", NULL, NULL); /* unset in AgsRecallChannelRun */ list = recall_container->recall_channel_run; if(AGS_RECALL(packable)->recall_id != NULL){ recall_id = AGS_RECALL(packable)->recall_id; while((list = ags_recall_find_recycling_context(list, (GObject *) recall_id->recycling_context)) != NULL){ g_object_set(G_OBJECT(list->data), "recall_audio_run", NULL, NULL); list= list->next; } }else if((AGS_RECALL_TEMPLATE & (AGS_RECALL(packable)->flags)) != 0){ while((list = ags_recall_find_template(list)) != NULL){ g_object_set(G_OBJECT(list->data), "recall_audio_run", NULL, NULL); list= list->next; } } /* call parent */ if(ags_recall_audio_run_parent_packable_interface->unpack(packable)){ g_object_unref(recall); g_object_unref(recall_container); return(TRUE); } /* remove from list */ recall_container->recall_audio_run = g_list_remove(recall_container->recall_audio_run, recall); /* unref */ g_object_unref(recall); g_object_unref(recall_container); return(FALSE); } void ags_recall_audio_run_remove(AgsRecall *recall) { if(AGS_RECALL_AUDIO_RUN(recall)->recall_audio != NULL && AGS_RECALL_AUDIO_RUN(recall)->recall_audio->audio != NULL){ ags_audio_remove_recall(AGS_RECALL_AUDIO_RUN(recall)->recall_audio->audio, (GObject *) recall, ((recall->recall_id->recycling_context->parent) ? TRUE: FALSE)); } AGS_RECALL_CLASS(ags_recall_audio_run_parent_class)->remove(recall); } AgsRecall* ags_recall_audio_run_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecallAudioRun *recall_audio_run, *copy; recall_audio_run = AGS_RECALL_AUDIO_RUN(recall); copy = AGS_RECALL_AUDIO_RUN(AGS_RECALL_CLASS(ags_recall_audio_run_parent_class)->duplicate(recall, recall_id, n_params, parameter)); g_object_set(G_OBJECT(copy), "recall_audio", recall_audio_run->recall_audio, NULL); return((AgsRecall *) copy); } /** * ags_recall_audio_run_new: * * Creates an #AgsRecallAudioRun. * * Returns: a new #AgsRecallAudioRun. * * Since: 1.0.0 */ AgsRecallAudioRun* ags_recall_audio_run_new() { AgsRecallAudioRun *recall_audio_run; recall_audio_run = (AgsRecallAudioRun *) g_object_new(AGS_TYPE_RECALL_AUDIO_RUN, NULL); return(recall_audio_run); } gsequencer-1.4.24/ags/audio/ags_devout.c0000644000175000017500000026774113256223420015063 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef __APPLE__ #include #endif #include #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include void ags_devout_class_init(AgsDevoutClass *devout); void ags_devout_connectable_interface_init(AgsConnectableInterface *connectable); void ags_devout_soundcard_interface_init(AgsSoundcardInterface *soundcard); void ags_devout_concurrent_tree_interface_init(AgsConcurrentTreeInterface *concurrent_tree); void ags_devout_init(AgsDevout *devout); void ags_devout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_devout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_devout_disconnect(AgsConnectable *connectable); void ags_devout_connect(AgsConnectable *connectable); pthread_mutex_t* ags_devout_get_lock(AgsConcurrentTree *concurrent_tree); pthread_mutex_t* ags_devout_get_parent_lock(AgsConcurrentTree *concurrent_tree); void ags_devout_dispose(GObject *gobject); void ags_devout_finalize(GObject *gobject); void ags_devout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context); AgsApplicationContext* ags_devout_get_application_context(AgsSoundcard *soundcard); void ags_devout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex); pthread_mutex_t* ags_devout_get_application_mutex(AgsSoundcard *soundcard); void ags_devout_set_device(AgsSoundcard *soundcard, gchar *device); gchar* ags_devout_get_device(AgsSoundcard *soundcard); void ags_devout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format); void ags_devout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format); void ags_devout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name); void ags_devout_pcm_info(AgsSoundcard *soundcard, gchar *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error); GList* ags_devout_get_poll_fd(AgsSoundcard *soundcard); gboolean ags_devout_is_available(AgsSoundcard *soundcard); gboolean ags_devout_is_starting(AgsSoundcard *soundcard); gboolean ags_devout_is_playing(AgsSoundcard *soundcard); gchar* ags_devout_get_uptime(AgsSoundcard *soundcard); void ags_devout_delegate_play_init(AgsSoundcard *soundcard, GError **error); void ags_devout_delegate_play(AgsSoundcard *soundcard, GError **error); void ags_devout_delegate_stop(AgsSoundcard *soundcard); void ags_devout_oss_init(AgsSoundcard *soundcard, GError **error); void ags_devout_oss_play(AgsSoundcard *soundcard, GError **error); void ags_devout_oss_free(AgsSoundcard *soundcard); void ags_devout_alsa_init(AgsSoundcard *soundcard, GError **error); void ags_devout_alsa_play(AgsSoundcard *soundcard, GError **error); void ags_devout_alsa_free(AgsSoundcard *soundcard); void ags_devout_tic(AgsSoundcard *soundcard); void ags_devout_offset_changed(AgsSoundcard *soundcard, guint note_offset); void ags_devout_set_bpm(AgsSoundcard *soundcard, gdouble bpm); gdouble ags_devout_get_bpm(AgsSoundcard *soundcard); void ags_devout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor); gdouble ags_devout_get_delay_factor(AgsSoundcard *soundcard); gdouble ags_devout_get_absolute_delay(AgsSoundcard *soundcard); gdouble ags_devout_get_delay(AgsSoundcard *soundcard); guint ags_devout_get_attack(AgsSoundcard *soundcard); void* ags_devout_get_buffer(AgsSoundcard *soundcard); void* ags_devout_get_next_buffer(AgsSoundcard *soundcard); void* ags_devout_get_prev_buffer(AgsSoundcard *soundcard); guint ags_devout_get_delay_counter(AgsSoundcard *soundcard); void ags_devout_set_note_offset(AgsSoundcard *soundcard, guint note_offset); guint ags_devout_get_note_offset(AgsSoundcard *soundcard); void ags_devout_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset); guint ags_devout_get_note_offset_absolute(AgsSoundcard *soundcard); void ags_devout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop); void ags_devout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop); guint ags_devout_get_loop_offset(AgsSoundcard *soundcard); void ags_devout_set_audio(AgsSoundcard *soundcard, GList *audio); GList* ags_devout_get_audio(AgsSoundcard *soundcard); /** * SECTION:ags_devout * @short_description: Output to soundcard * @title: AgsDevout * @section_id: * @include: ags/audio/ags_devout.h * * #AgsDevout represents a soundcard and supports output. */ enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_APPLICATION_MUTEX, PROP_DEVICE, PROP_DSP_CHANNELS, PROP_PCM_CHANNELS, PROP_FORMAT, PROP_BUFFER_SIZE, PROP_SAMPLERATE, PROP_BUFFER, PROP_BPM, PROP_DELAY_FACTOR, PROP_ATTACK, }; enum{ LAST_SIGNAL, }; static gpointer ags_devout_parent_class = NULL; static guint devout_signals[LAST_SIGNAL]; const int ags_devout_endian_i = 1; #define is_bigendian() ( (*(char*)&ags_devout_endian_i) == 0 ) GType ags_devout_get_type (void) { static GType ags_type_devout = 0; if(!ags_type_devout){ static const GTypeInfo ags_devout_info = { sizeof (AgsDevoutClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_devout_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsDevout), 0, /* n_preallocs */ (GInstanceInitFunc) ags_devout_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_devout_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_soundcard_interface_info = { (GInterfaceInitFunc) ags_devout_soundcard_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_concurrent_tree_interface_info = { (GInterfaceInitFunc) ags_devout_concurrent_tree_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_devout = g_type_register_static(G_TYPE_OBJECT, "AgsDevout", &ags_devout_info, 0); g_type_add_interface_static(ags_type_devout, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_devout, AGS_TYPE_SOUNDCARD, &ags_soundcard_interface_info); g_type_add_interface_static(ags_type_devout, AGS_TYPE_CONCURRENT_TREE, &ags_concurrent_tree_interface_info); } return (ags_type_devout); } void ags_devout_class_init(AgsDevoutClass *devout) { GObjectClass *gobject; GParamSpec *param_spec; ags_devout_parent_class = g_type_class_peek_parent(devout); /* GObjectClass */ gobject = (GObjectClass *) devout; gobject->set_property = ags_devout_set_property; gobject->get_property = ags_devout_get_property; gobject->dispose = ags_devout_dispose; gobject->finalize = ags_devout_finalize; /* properties */ /** * AgsDevout:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("the application context object"), i18n_pspec("The application context object"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsDevout:application-mutex: * * The assigned application mutex * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("application-mutex", i18n_pspec("the application mutex object"), i18n_pspec("The application mutex object"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_MUTEX, param_spec); /** * AgsDevout:device: * * The alsa soundcard indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("the device identifier"), i18n_pspec("The device to perform output to"), "hw:0", G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /** * AgsDevout:dsp-channels: * * The dsp channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("dsp-channels", i18n_pspec("count of DSP channels"), i18n_pspec("The count of DSP channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DSP_CHANNELS, param_spec); /** * AgsDevout:pcm-channels: * * The pcm channel count * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pcm-channels", i18n_pspec("count of PCM channels"), i18n_pspec("The count of PCM channels to use"), 1, 64, 2, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PCM_CHANNELS, param_spec); /* * TODO:JK: add support for other quality than 16 bit */ /** * AgsDevout:format: * * The precision of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("precision of buffer"), i18n_pspec("The precision to use for a frame"), 1, 64, AGS_SOUNDCARD_DEFAULT_FORMAT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsDevout:buffer-size: * * The buffer size * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("frame count of a buffer"), i18n_pspec("The count of frames a buffer contains"), 1, 44100, AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsDevout:samplerate: * * The samplerate * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("frames per second"), i18n_pspec("The frames count played during a second"), 8000, 96000, 44100, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsDevout:buffer: * * The buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("buffer", i18n_pspec("the buffer"), i18n_pspec("The buffer to play"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_BUFFER, param_spec); /** * AgsDevout:bpm: * * Beats per minute * * Since: 1.0.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("beats per minute"), i18n_pspec("Beats per minute to use"), 1.0, 240.0, 120.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /** * AgsDevout:delay-factor: * * tact * * Since: 1.0.0 */ param_spec = g_param_spec_double("delay-factor", i18n_pspec("delay factor"), i18n_pspec("The delay factor"), 0.0, 16.0, 1.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY_FACTOR, param_spec); /** * AgsDevout:attack: * * Attack of the buffer * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("attack", i18n_pspec("attack of buffer"), i18n_pspec("The attack to use for the buffer"), G_PARAM_READABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /* AgsDevoutClass */ } GQuark ags_devout_error_quark() { return(g_quark_from_static_string("ags-devout-error-quark")); } void ags_devout_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_devout_connect; connectable->disconnect = ags_devout_disconnect; } void ags_devout_concurrent_tree_interface_init(AgsConcurrentTreeInterface *concurrent_tree) { concurrent_tree->get_lock = ags_devout_get_lock; concurrent_tree->get_parent_lock = ags_devout_get_parent_lock; } void ags_devout_soundcard_interface_init(AgsSoundcardInterface *soundcard) { soundcard->set_application_context = ags_devout_set_application_context; soundcard->get_application_context = ags_devout_get_application_context; soundcard->set_application_mutex = ags_devout_set_application_mutex; soundcard->get_application_mutex = ags_devout_get_application_mutex; soundcard->set_device = ags_devout_set_device; soundcard->get_device = ags_devout_get_device; soundcard->set_presets = ags_devout_set_presets; soundcard->get_presets = ags_devout_get_presets; soundcard->list_cards = ags_devout_list_cards; soundcard->pcm_info = ags_devout_pcm_info; soundcard->get_poll_fd = ags_devout_get_poll_fd; soundcard->is_available = ags_devout_is_available; soundcard->is_starting = ags_devout_is_starting; soundcard->is_playing = ags_devout_is_playing; soundcard->is_recording = NULL; soundcard->get_uptime = ags_devout_get_uptime; soundcard->play_init = ags_devout_delegate_play_init; soundcard->play = ags_devout_delegate_play; soundcard->record_init = NULL; soundcard->record = NULL; soundcard->stop = ags_devout_delegate_stop; soundcard->tic = ags_devout_tic; soundcard->offset_changed = ags_devout_offset_changed; soundcard->set_bpm = ags_devout_set_bpm; soundcard->get_bpm = ags_devout_get_bpm; soundcard->set_delay_factor = ags_devout_set_delay_factor; soundcard->get_delay_factor = ags_devout_get_delay_factor; soundcard->get_absolute_delay = ags_devout_get_absolute_delay; soundcard->get_delay = ags_devout_get_delay; soundcard->get_attack = ags_devout_get_attack; soundcard->get_buffer = ags_devout_get_buffer; soundcard->get_next_buffer = ags_devout_get_next_buffer; soundcard->get_prev_buffer = ags_devout_get_prev_buffer; soundcard->get_delay_counter = ags_devout_get_delay_counter; soundcard->set_note_offset = ags_devout_set_note_offset; soundcard->get_note_offset = ags_devout_get_note_offset; soundcard->set_note_offset_absolute = ags_devout_set_note_offset_absolute; soundcard->get_note_offset_absolute = ags_devout_get_note_offset_absolute; soundcard->set_loop = ags_devout_set_loop; soundcard->get_loop = ags_devout_get_loop; soundcard->get_loop_offset = ags_devout_get_loop_offset; soundcard->set_audio = ags_devout_set_audio; soundcard->get_audio = ags_devout_get_audio; } void ags_devout_init(AgsDevout *devout) { AgsMutexManager *mutex_manager; AgsConfig *config; gchar *str; gboolean use_alsa; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; pthread_mutexattr_t *attr; /* insert devout mutex */ devout->mutexattr = attr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(attr); pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(attr, PTHREAD_PRIO_INHERIT); #endif devout->mutex = mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(mutex, attr); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); ags_mutex_manager_insert(mutex_manager, (GObject *) devout, mutex); pthread_mutex_unlock(application_mutex); /* flags */ config = ags_config_get_instance(); #ifdef AGS_WITH_ALSA use_alsa = TRUE; #else use_alsa = FALSE; #endif str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "backend"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "backend"); } if(str != NULL && !g_ascii_strncasecmp(str, "oss", 4)){ use_alsa = FALSE; } if(use_alsa){ devout->flags = (AGS_DEVOUT_ALSA); }else{ devout->flags = (AGS_DEVOUT_OSS); } /* quality */ devout->dsp_channels = AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS; devout->pcm_channels = AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS; devout->format = AGS_SOUNDCARD_SIGNED_16_BIT; devout->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; devout->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; /* read config */ /* dsp channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "dsp-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "dsp-channels"); } if(str != NULL){ devout->dsp_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* pcm channels */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "pcm-channels"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "pcm-channels"); } if(str != NULL){ devout->pcm_channels = g_ascii_strtoull(str, NULL, 10); g_free(str); } /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ devout->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); } /* buffer size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ devout->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ devout->format = g_ascii_strtoull(str, NULL, 10); free(str); } /* device */ if(use_alsa){ devout->out.alsa.handle = NULL; devout->out.alsa.device = AGS_DEVOUT_DEFAULT_ALSA_DEVICE; }else{ devout->out.oss.device_fd = -1; devout->out.oss.device = AGS_DEVOUT_DEFAULT_OSS_DEVICE; } /* buffer */ devout->buffer = (void **) malloc(4 * sizeof(void*)); devout->buffer[0] = NULL; devout->buffer[1] = NULL; devout->buffer[2] = NULL; devout->buffer[3] = NULL; g_atomic_int_set(&(devout->available), FALSE); devout->ring_buffer_size = AGS_DEVOUT_DEFAULT_RING_BUFFER_SIZE; devout->nth_ring_buffer = 0; devout->ring_buffer = NULL; ags_devout_realloc_buffer(devout); /* bpm */ devout->bpm = AGS_SOUNDCARD_DEFAULT_BPM; /* delay factor */ devout->delay_factor = AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR; /* delay and attack */ devout->delay = (gdouble *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(gdouble)); devout->attack = (guint *) malloc((int) 2 * AGS_SOUNDCARD_DEFAULT_PERIOD * sizeof(guint)); ags_devout_adjust_delay_and_attack(devout); /* counters */ devout->tact_counter = 0.0; devout->delay_counter = 0; devout->tic_counter = 0; devout->note_offset = 0; devout->note_offset_absolute = 0; devout->loop_left = AGS_SOUNDCARD_DEFAULT_LOOP_LEFT; devout->loop_right = AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT; devout->do_loop = FALSE; devout->loop_offset = 0; /* parent */ devout->application_context = NULL; devout->application_mutex = NULL; devout->poll_fd = NULL; devout->notify_soundcard = NULL; /* all AgsAudio */ devout->audio = NULL; } void ags_devout_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsDevout *devout; devout = AGS_DEVOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(devout->application_context == (GObject *) application_context){ return; } if(devout->application_context != NULL){ g_object_unref(G_OBJECT(devout->application_context)); } if(application_context != NULL){ AgsConfig *config; gchar *segmentation; guint denumerator, numerator; g_object_ref(G_OBJECT(application_context)); devout->application_mutex = application_context->mutex; config = ags_config_get_instance(); /* segmentation */ segmentation = ags_config_get_value(config, AGS_CONFIG_GENERIC, "segmentation"); if(segmentation != NULL){ sscanf(segmentation, "%d/%d", &denumerator, &numerator); devout->delay_factor = 1.0 / numerator * (numerator / denumerator); g_free(segmentation); } ags_devout_adjust_delay_and_attack(devout); ags_devout_realloc_buffer(devout); }else{ devout->application_mutex = NULL; } devout->application_context = (GObject *) application_context; } break; case PROP_APPLICATION_MUTEX: { pthread_mutex_t *application_mutex; application_mutex = (pthread_mutex_t *) g_value_get_pointer(value); if(devout->application_mutex == application_mutex){ return; } devout->application_mutex = application_mutex; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); if((AGS_DEVOUT_OSS & (devout->flags)) != 0){ devout->out.oss.device = g_strdup(device); }else if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ devout->out.alsa.device = g_strdup(device); } } break; case PROP_DSP_CHANNELS: { guint dsp_channels; dsp_channels = g_value_get_uint(value); if(dsp_channels == devout->dsp_channels){ return; } devout->dsp_channels = dsp_channels; } break; case PROP_PCM_CHANNELS: { guint pcm_channels; pcm_channels = g_value_get_uint(value); if(pcm_channels == devout->pcm_channels){ return; } devout->pcm_channels = pcm_channels; ags_devout_realloc_buffer(devout); } break; case PROP_FORMAT: { guint format; format = g_value_get_uint(value); if(format == devout->format){ return; } devout->format = format; ags_devout_realloc_buffer(devout); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); if(buffer_size == devout->buffer_size){ return; } devout->buffer_size = buffer_size; ags_devout_realloc_buffer(devout); ags_devout_adjust_delay_and_attack(devout); } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); if(samplerate == devout->samplerate){ return; } devout->samplerate = samplerate; ags_devout_adjust_delay_and_attack(devout); } break; case PROP_BUFFER: { //TODO:JK: implement me } break; case PROP_BPM: { gdouble bpm; bpm = g_value_get_double(value); devout->bpm = bpm; ags_devout_adjust_delay_and_attack(devout); } break; case PROP_DELAY_FACTOR: { gdouble delay_factor; delay_factor = g_value_get_double(value); devout->delay_factor = delay_factor; ags_devout_adjust_delay_and_attack(devout); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_devout_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsDevout *devout; devout = AGS_DEVOUT(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, devout->application_context); } break; case PROP_APPLICATION_MUTEX: { g_value_set_pointer(value, devout->application_mutex); } break; case PROP_DEVICE: { if((AGS_DEVOUT_OSS & (devout->flags)) != 0){ g_value_set_string(value, devout->out.oss.device); }else if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ g_value_set_string(value, devout->out.alsa.device); } } break; case PROP_DSP_CHANNELS: { g_value_set_uint(value, devout->dsp_channels); } break; case PROP_PCM_CHANNELS: { g_value_set_uint(value, devout->pcm_channels); } break; case PROP_FORMAT: { g_value_set_uint(value, devout->format); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, devout->buffer_size); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, devout->samplerate); } break; case PROP_BUFFER: { g_value_set_pointer(value, devout->buffer); } break; case PROP_BPM: { g_value_set_double(value, devout->bpm); } break; case PROP_DELAY_FACTOR: { g_value_set_double(value, devout->delay_factor); } break; case PROP_ATTACK: { g_value_set_pointer(value, devout->attack); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } pthread_mutex_t* ags_devout_get_lock(AgsConcurrentTree *concurrent_tree) { AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *devout_mutex; /* lookup mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); devout_mutex = ags_mutex_manager_lookup(mutex_manager, G_OBJECT(concurrent_tree)); pthread_mutex_unlock(application_mutex); return(devout_mutex); } pthread_mutex_t* ags_devout_get_parent_lock(AgsConcurrentTree *concurrent_tree) { return(NULL); } void ags_devout_dispose(GObject *gobject) { AgsDevout *devout; GList *list; devout = AGS_DEVOUT(gobject); /* application context */ if(devout->application_context != NULL){ g_object_unref(devout->application_context); devout->application_context = NULL; } /* unref audio */ if(devout->audio != NULL){ list = devout->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(devout->audio, g_object_unref); devout->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_devout_parent_class)->dispose(gobject); } void ags_devout_finalize(GObject *gobject) { AgsDevout *devout; AgsMutexManager *mutex_manager; GList *list; devout = AGS_DEVOUT(gobject); /* remove devout mutex */ pthread_mutex_lock(devout->application_mutex); mutex_manager = ags_mutex_manager_get_instance(); ags_mutex_manager_remove(mutex_manager, gobject); pthread_mutex_unlock(devout->application_mutex); /* free output buffer */ free(devout->buffer[0]); free(devout->buffer[1]); free(devout->buffer[2]); free(devout->buffer[3]); /* free buffer array */ free(devout->buffer); /* free AgsAttack */ free(devout->attack); /* notify soundcard */ if(devout->notify_soundcard != NULL){ if(devout->application_context != NULL){ ags_task_thread_remove_cyclic_task(AGS_APPLICATION_CONTEXT(devout->application_context)->task_thread, devout->notify_soundcard); } g_object_unref(devout->notify_soundcard); } /* application context */ if(devout->application_context != NULL){ g_object_unref(devout->application_context); } /* unref audio */ if(devout->audio != NULL){ list = devout->audio; while(list != NULL){ g_object_set(G_OBJECT(list->data), "soundcard", NULL, NULL); list = list->next; } g_list_free_full(devout->audio, g_object_unref); } pthread_mutex_destroy(devout->mutex); free(devout->mutex); pthread_mutexattr_destroy(devout->mutexattr); free(devout->mutexattr); /* call parent */ G_OBJECT_CLASS(ags_devout_parent_class)->finalize(gobject); } void ags_devout_connect(AgsConnectable *connectable) { AgsDevout *devout; GList *list; devout = AGS_DEVOUT(connectable); /* */ list = devout->audio; while(list != NULL){ ags_connectable_connect(AGS_CONNECTABLE(list->data)); list = list->next; } } void ags_devout_disconnect(AgsConnectable *connectable) { //TODO:JK: implement me } /** * ags_devout_switch_buffer_flag: * @devout: an #AgsDevout * * The buffer flag indicates the currently played buffer. * * Since: 1.0.0 */ void ags_devout_switch_buffer_flag(AgsDevout *devout) { AgsApplicationContext *application_context; AgsMutexManager *mutex_manager; pthread_mutex_t *mutex; application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(devout)); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devout); pthread_mutex_unlock(application_context->mutex); // g_message("switch - 0x%0x", ((AGS_DEVOUT_BUFFER0 | // AGS_DEVOUT_BUFFER1 | // AGS_DEVOUT_BUFFER2 | // AGS_DEVOUT_BUFFER3) & (devout->flags))); /* switch buffer flag */ pthread_mutex_lock(mutex); if((AGS_DEVOUT_BUFFER0 & (devout->flags)) != 0){ devout->flags &= (~AGS_DEVOUT_BUFFER0); devout->flags |= AGS_DEVOUT_BUFFER1; }else if((AGS_DEVOUT_BUFFER1 & (devout->flags)) != 0){ devout->flags &= (~AGS_DEVOUT_BUFFER1); devout->flags |= AGS_DEVOUT_BUFFER2; }else if((AGS_DEVOUT_BUFFER2 & (devout->flags)) != 0){ devout->flags &= (~AGS_DEVOUT_BUFFER2); devout->flags |= AGS_DEVOUT_BUFFER3; }else if((AGS_DEVOUT_BUFFER3 & (devout->flags)) != 0){ devout->flags &= (~AGS_DEVOUT_BUFFER3); devout->flags |= AGS_DEVOUT_BUFFER0; } pthread_mutex_unlock(mutex); } void ags_devout_set_application_context(AgsSoundcard *soundcard, AgsApplicationContext *application_context) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); devout->application_context = (GObject *) application_context; } AgsApplicationContext* ags_devout_get_application_context(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); return((AgsApplicationContext *) devout->application_context); } void ags_devout_set_application_mutex(AgsSoundcard *soundcard, pthread_mutex_t *application_mutex) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); devout->application_mutex = application_mutex; } pthread_mutex_t* ags_devout_get_application_mutex(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); return(devout->application_mutex); } void ags_devout_set_device(AgsSoundcard *soundcard, gchar *device) { AgsDevout *devout; GList *card_id, *card_id_start, *card_name, *card_name_start; devout = AGS_DEVOUT(soundcard); card_id = NULL; card_name = NULL; ags_soundcard_list_cards(soundcard, &card_id, &card_name); card_id_start = card_id; card_name_start = card_name; while(card_id != NULL){ if(!g_ascii_strncasecmp(card_id->data, device, strlen(card_id->data))){ if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ devout->out.alsa.device = g_strdup(device); }else{ devout->out.oss.device = g_strdup(device); } break; } card_id = card_id->next; } g_list_free_full(card_id_start, g_free); g_list_free_full(card_name_start, g_free); } gchar* ags_devout_get_device(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ return(devout->out.alsa.device); }else{ return(devout->out.oss.device); } } void ags_devout_set_presets(AgsSoundcard *soundcard, guint channels, guint rate, guint buffer_size, guint format) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); g_object_set(devout, "pcm-channels", channels, "samplerate", rate, "buffer-size", buffer_size, "format", format, NULL); } void ags_devout_get_presets(AgsSoundcard *soundcard, guint *channels, guint *rate, guint *buffer_size, guint *format) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); if(channels != NULL){ *channels = devout->pcm_channels; } if(rate != NULL){ *rate = devout->samplerate; } if(buffer_size != NULL){ *buffer_size = devout->buffer_size; } if(format != NULL){ *format = devout->format; } } /** * ags_devout_list_cards: * @soundcard: the #AgsSoundcard * @card_id: alsa identifier * @card_name: card name * * List available soundcards. * * Since: 1.0.0 */ void ags_devout_list_cards(AgsSoundcard *soundcard, GList **card_id, GList **card_name) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); if(card_id != NULL){ *card_id = NULL; } if(card_name != NULL){ *card_name = NULL; } if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ #ifdef AGS_WITH_ALSA snd_ctl_t *card_handle; snd_ctl_card_info_t *card_info; char *name; gchar *str; gchar *str_err; int card_num; int device; int error; /* the default device */ str = g_strdup("default"); error = snd_ctl_open(&card_handle, str, 0); if(error < 0){ g_free(str); goto ags_devout_list_cards_NO_DEFAULT_0; } snd_ctl_card_info_alloca(&card_info); error = snd_ctl_card_info(card_handle, card_info); if(error < 0){ g_free(str); goto ags_devout_list_cards_NO_DEFAULT_0; } if(card_id != NULL){ *card_id = g_list_prepend(*card_id, str); } if(card_name != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(snd_ctl_card_info_get_name(card_info))); } snd_ctl_close(card_handle); ags_devout_list_cards_NO_DEFAULT_0: /* enumerated devices */ card_num = -1; while(TRUE){ error = snd_card_next(&card_num); if(card_num < 0 || error < 0){ str_err = snd_strerror(error); g_message("Can't get the next card number: %s", str_err); //free(str_err); break; } str = g_strdup_printf("hw:%d", card_num); #ifdef AGS_DEBUG g_message("found soundcard - %s", str); #endif error = snd_ctl_open(&card_handle, str, 0); if(error < 0){ g_free(str); continue; } snd_ctl_card_info_alloca(&card_info); error = snd_ctl_card_info(card_handle, card_info); if(error < 0){ g_free(str); continue; } device = -1; error = snd_ctl_pcm_next_device(card_handle, &device); if(error < 0){ g_free(str); continue; } if(card_id != NULL){ *card_id = g_list_prepend(*card_id, str); } if(card_name != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(snd_ctl_card_info_get_name(card_info))); } snd_ctl_close(card_handle); } snd_config_update_free_global(); #endif }else{ #ifdef AGS_WITH_OSS oss_sysinfo sysinfo; oss_audioinfo ai; char *mixer_device; int mixerfd = -1; int next, n; int i; if((mixer_device = getenv("OSS_MIXERDEV")) == NULL){ mixer_device = "/dev/mixer"; } if((mixerfd = open(mixer_device, O_RDONLY, 0)) == -1){ int e = errno; switch(e){ case ENXIO: case ENODEV: { g_warning("Open Sound System is not running in your system."); } break; case ENOENT: { g_warning("No %s device available in your system.\nPerhaps Open Sound System is not installed or running.", mixer_device); } break; default: g_warning("%s", strerror(e)); } } if(ioctl(mixerfd, SNDCTL_SYSINFO, &sysinfo) == -1){ if(errno == ENXIO){ g_warning("OSS has not detected any supported sound hardware in your system."); }else{ g_warning("SNDCTL_SYSINFO"); if(errno == EINVAL){ g_warning("Error: OSS version 4.0 or later is required"); } } n = 0; }else{ n = sysinfo.numaudios; } memset(&ai, 0, sizeof(oss_audioinfo)); ioctl(mixerfd, SNDCTL_AUDIOINFO_EX, &ai); for(i = 0; i < n; i++){ ai.dev = i; if(ioctl(mixerfd, SNDCTL_ENGINEINFO, &ai) == -1){ int e = errno; g_warning("Can't get device info for /dev/dsp%d (SNDCTL_AUDIOINFO)\nerrno = %d: %s", i, e, strerror(e)); continue; } if((DSP_CAP_OUTPUT & (ai.caps)) != 0){ if(card_id != NULL){ *card_id = g_list_prepend(*card_id, g_strdup_printf("/dev/dsp%i", i)); } if(card_name != NULL){ *card_name = g_list_prepend(*card_name, g_strdup(ai.name)); } } next = ai.next_play_engine; if(next <= 0){ break; } } #endif } if(card_id != NULL){ *card_id = g_list_reverse(*card_id); } if(card_name != NULL){ *card_name = g_list_reverse(*card_name); } } void ags_devout_pcm_info(AgsSoundcard *soundcard, char *card_id, guint *channels_min, guint *channels_max, guint *rate_min, guint *rate_max, guint *buffer_size_min, guint *buffer_size_max, GError **error) { AgsDevout *devout; if(card_id == NULL){ return; } devout = AGS_DEVOUT(soundcard); if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ #ifdef AGS_WITH_ALSA snd_pcm_t *handle; snd_pcm_hw_params_t *params; gchar *str; unsigned int val; int dir; snd_pcm_uframes_t frames; int rc; int err; /* Open PCM device for playback. */ handle = NULL; rc = snd_pcm_open(&handle, card_id, SND_PCM_STREAM_PLAYBACK, 0); if(rc < 0){ str = snd_strerror(rc); g_message("unable to open pcm device (attempting fixup): %s", str); if(index(card_id, ',') != NULL){ gchar *device_fixup; device_fixup = g_strndup(card_id, index(card_id, ',') - card_id); handle = NULL; rc = snd_pcm_open(&handle, device_fixup, SND_PCM_STREAM_PLAYBACK, 0); if(rc < 0){ if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_LOCKED_SOUNDCARD, "unable to open pcm device: %s\n", str); } // free(str); return; } }else{ if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_LOCKED_SOUNDCARD, "unable to open pcm device: %s\n", str); } return; } } /* Allocate a hardware parameters object. */ snd_pcm_hw_params_alloca(¶ms); /* Fill it in with default values. */ snd_pcm_hw_params_any(handle, params); /* channels */ snd_pcm_hw_params_get_channels_min(params, &val); *channels_min = val; snd_pcm_hw_params_get_channels_max(params, &val); *channels_max = val; /* samplerate */ dir = 0; snd_pcm_hw_params_get_rate_min(params, &val, &dir); *rate_min = val; dir = 0; snd_pcm_hw_params_get_rate_max(params, &val, &dir); *rate_max = val; /* buffer size */ dir = 0; snd_pcm_hw_params_get_buffer_size_min(params, &frames); *buffer_size_min = frames; dir = 0; snd_pcm_hw_params_get_buffer_size_max(params, &frames); *buffer_size_max = frames; snd_pcm_close(handle); #endif }else{ #ifdef AGS_WITH_OSS oss_audioinfo ainfo; gchar *str; int mixerfd; int acc; unsigned int cmd; mixerfd = open(card_id, O_RDWR, 0); if(mixerfd == -1){ int e = errno; str = strerror(e); g_message("unable to open pcm device: %s\n", str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_LOCKED_SOUNDCARD, "unable to open pcm device: %s\n", str); } return; } memset(&ainfo, 0, sizeof (ainfo)); cmd = SNDCTL_AUDIOINFO; if(card_id != NULL && !g_ascii_strncasecmp(card_id, "/dev/dsp", 8)){ if(strlen(card_id) > 8){ sscanf(card_id, "/dev/dsp%d", &(ainfo.dev)); }else{ ainfo.dev = 0; } }else{ return; } if(ioctl(mixerfd, cmd, &ainfo) == -1){ int e = errno; str = strerror(e); g_message("unable to retrieve audio info: %s\n", str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_LOCKED_SOUNDCARD, "unable to retrieve audio info: %s\n", str); } return; } *channels_min = ainfo.min_channels; *channels_max = ainfo.max_channels; *rate_min = ainfo.min_rate; *rate_max = ainfo.max_rate; *buffer_size_min = 64; *buffer_size_max = 8192; #endif } } GList* ags_devout_get_poll_fd(AgsSoundcard *soundcard) { AgsDevout *devout; AgsPollFd *poll_fd; GList *list; struct pollfd *fds; gint count; guint i; devout = AGS_DEVOUT(soundcard); if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ if(devout->out.alsa.handle == NULL){ return(NULL); } }else{ if(devout->out.oss.device_fd == -1){ return(NULL); } } if(devout->poll_fd == NULL){ count = 0; if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ #ifdef AGS_WITH_ALSA /* get poll fds of ALSA */ count = snd_pcm_poll_descriptors_count(devout->out.alsa.handle); if(count > 0){ fds = (struct pollfd *) malloc(count * sizeof(struct pollfd)); snd_pcm_poll_descriptors(devout->out.alsa.handle, fds, count); } #endif }else{ if(devout->out.oss.device_fd != -1){ count = 1; fds = (struct pollfd *) malloc(sizeof(struct pollfd)); fds->fd = devout->out.oss.device_fd; } } /* map fds */ list = NULL; for(i = 0; i < count; i++){ poll_fd = ags_poll_fd_new(); poll_fd->fd = fds[i].fd; poll_fd->poll_fd = &(fds[i]); list = g_list_prepend(list, poll_fd); } devout->poll_fd = list; }else{ list = devout->poll_fd; } return(list); } gboolean ags_devout_is_available(AgsSoundcard *soundcard) { AgsDevout *devout; GList *list; devout = AGS_DEVOUT(soundcard); list = devout->poll_fd; while(list != NULL){ gint16 revents; if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ revents = 0; #ifdef AGS_WITH_ALSA snd_pcm_poll_descriptors_revents(devout->out.alsa.handle, AGS_POLL_FD(list->data)->poll_fd, 1, &revents); #endif if((POLLOUT & revents) != 0){ g_atomic_int_set(&(devout->available), TRUE); AGS_POLL_FD(list->data)->poll_fd->revents = 0; return(TRUE); } }else{ #ifdef AGS_WITH_OSS fd_set writefds; FD_ZERO(&writefds); FD_SET(AGS_POLL_FD(list->data)->poll_fd->fd, &writefds); if(FD_ISSET(AGS_POLL_FD(list->data)->poll_fd->fd, &writefds)){ g_atomic_int_set(&(devout->available), TRUE); AGS_POLL_FD(list->data)->poll_fd->revents = 0; return(TRUE); } #endif } list = list->next; } return(FALSE); } gboolean ags_devout_is_starting(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); return(((AGS_DEVOUT_START_PLAY & (devout->flags)) != 0) ? TRUE: FALSE); } gboolean ags_devout_is_playing(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); return(((AGS_DEVOUT_PLAY & (devout->flags)) != 0) ? TRUE: FALSE); } gchar* ags_devout_get_uptime(AgsSoundcard *soundcard) { gchar *uptime; if(ags_soundcard_is_playing(soundcard)){ guint samplerate; guint buffer_size; guint note_offset; gdouble bpm; gdouble delay_factor; gdouble delay; ags_soundcard_get_presets(soundcard, NULL, &samplerate, &buffer_size, NULL); note_offset = ags_soundcard_get_note_offset_absolute(soundcard); bpm = ags_soundcard_get_bpm(soundcard); delay_factor = ags_soundcard_get_delay_factor(soundcard); /* calculate delays */ delay = ags_soundcard_get_absolute_delay(soundcard); uptime = ags_time_get_uptime_from_offset(note_offset, bpm, delay, delay_factor); }else{ uptime = g_strdup(AGS_TIME_ZERO); } return(uptime); } void ags_devout_delegate_play_init(AgsSoundcard *soundcard, GError **error) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ ags_devout_alsa_init(soundcard, error); }else if((AGS_DEVOUT_OSS & (devout->flags)) != 0){ ags_devout_oss_init(soundcard, error); } } void ags_devout_delegate_play(AgsSoundcard *soundcard, GError **error) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ ags_devout_alsa_play(soundcard, error); }else if((AGS_DEVOUT_OSS & (devout->flags)) != 0){ ags_devout_oss_play(soundcard, error); } } void ags_devout_delegate_stop(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); if((AGS_DEVOUT_ALSA & (devout->flags)) != 0){ ags_devout_alsa_free(soundcard); }else if((AGS_DEVOUT_OSS & (devout->flags)) != 0){ ags_devout_oss_free(soundcard); } } void ags_devout_oss_init(AgsSoundcard *soundcard, GError **error) { AgsDevout *devout; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; gchar *str; guint word_size; int format; int tmp; guint i; pthread_mutex_t *mutex; devout = AGS_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devout); pthread_mutex_unlock(application_context->mutex); /* retrieve word size */ pthread_mutex_lock(mutex); switch(devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { #ifdef AGS_WITH_OSS format = AFMT_U8; #endif word_size = sizeof(gint8); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { #ifdef AGS_WITH_OSS format = AFMT_S16_NE; #endif word_size = sizeof(gint16); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { #ifdef AGS_WITH_OSS format = AFMT_S24_NE; #endif word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { #ifdef AGS_WITH_OSS format = AFMT_S32_NE; #endif word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(gint64); } default: g_warning("ags_devout_oss_init(): unsupported word size"); return; } /* prepare for playback */ devout->flags |= (AGS_DEVOUT_BUFFER3 | AGS_DEVOUT_START_PLAY | AGS_DEVOUT_PLAY | AGS_DEVOUT_NONBLOCKING); memset(devout->buffer[0], 0, devout->pcm_channels * devout->buffer_size * word_size); memset(devout->buffer[1], 0, devout->pcm_channels * devout->buffer_size * word_size); memset(devout->buffer[2], 0, devout->pcm_channels * devout->buffer_size * word_size); memset(devout->buffer[3], 0, devout->pcm_channels * devout->buffer_size * word_size); /* allocate ring buffer */ g_atomic_int_set(&(devout->available), FALSE); devout->ring_buffer = (unsigned char **) malloc(devout->ring_buffer_size * sizeof(unsigned char *)); for(i = 0; i < devout->ring_buffer_size; i++){ devout->ring_buffer[i] = (unsigned char *) malloc(devout->pcm_channels * devout->buffer_size * word_size * sizeof(unsigned char)); } #ifdef AGS_WITH_OSS /* open device fd */ str = devout->out.oss.device; devout->out.oss.device_fd = open(str, O_WRONLY, 0); if(devout->out.oss.device_fd == -1){ pthread_mutex_unlock(mutex); g_warning("couldn't open device %s", devout->out.oss.device); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_LOCKED_SOUNDCARD, "unable to open dsp device: %s\n", str); } return; } //NOTE:JK: unsupported on kfreebsd 9.0 // tmp = APF_NORMAL; // ioctl(devout->out.oss.device_fd, SNDCTL_DSP_PROFILE, &tmp); tmp = format; if(ioctl(devout->out.oss.device_fd, SNDCTL_DSP_SETFMT, &tmp) == -1){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("failed to select bits/sample"); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE, "unable to open dsp device: %s", str); } devout->out.oss.device_fd = -1; return; } if(tmp != format){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("failed to select bits/sample"); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE, "unable to open dsp device: %s", str); } devout->out.oss.device_fd = -1; return; } tmp = devout->dsp_channels; if(ioctl(devout->out.oss.device_fd, SNDCTL_DSP_CHANNELS, &tmp) == -1){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("Channels count (%i) not available for playbacks: %s", devout->dsp_channels, str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_CHANNELS_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.oss.device_fd = -1; return; } if(tmp != devout->dsp_channels){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("Channels count (%i) not available for playbacks: %s", devout->dsp_channels, str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_CHANNELS_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.oss.device_fd = -1; return; } tmp = devout->samplerate; if(ioctl(devout->out.oss.device_fd, SNDCTL_DSP_SPEED, &tmp) == -1){ pthread_mutex_unlock(mutex); str = strerror(errno); g_warning("Rate %iHz not available for playback: %s", devout->samplerate, str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_SAMPLERATE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.oss.device_fd = -1; return; } if(tmp != devout->samplerate){ g_warning("Warning: Playback using %d Hz (file %d Hz)", tmp, devout->samplerate); } #endif devout->tact_counter = 0.0; devout->delay_counter = 0.0; devout->tic_counter = 0; devout->nth_ring_buffer = 0; ags_soundcard_get_poll_fd(soundcard); #ifdef AGS_WITH_OSS devout->flags |= AGS_DEVOUT_INITIALIZED; #endif devout->flags |= AGS_DEVOUT_BUFFER0; devout->flags &= (~(AGS_DEVOUT_BUFFER1 | AGS_DEVOUT_BUFFER2 | AGS_DEVOUT_BUFFER3)); pthread_mutex_unlock(mutex); } void ags_devout_oss_play(AgsSoundcard *soundcard, GError **error) { AgsDevout *devout; AgsNotifySoundcard *notify_soundcard; AgsTicDevice *tic_device; AgsClearBuffer *clear_buffer; AgsSwitchBufferFlag *switch_buffer_flag; AgsThread *task_thread; AgsPollFd *poll_fd; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *task; GList *list; gchar *str; guint word_size; guint nth_buffer; int n_write; pthread_mutex_t *mutex; static const struct timespec poll_interval = { 0, 250, }; auto void ags_devout_oss_play_fill_ring_buffer(void *buffer, guint ags_format, unsigned char *ring_buffer, guint channels, guint buffer_size); void ags_devout_oss_play_fill_ring_buffer(void *buffer, guint ags_format, unsigned char *ring_buffer, guint channels, guint buffer_size){ int format_bits; guint word_size; int bps; int res; guint chn; guint count, i; switch(ags_format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(char); bps = 1; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(short); bps = 2; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(long); bps = 3; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(long); bps = 4; } break; default: g_warning("ags_devout_oss_play(): unsupported word size"); return; } /* fill the channel areas */ for(count = 0; count < buffer_size; count++){ for(chn = 0; chn < channels; chn++){ switch(ags_format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { res = (int) ((gint8 *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { res = (int) ((gint16 *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { res = (int) ((gint32 *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { res = (int) ((gint32 *) buffer)[count * channels + chn]; } break; } /* Generate data in native endian format */ if(is_bigendian()){ for(i = 0; i < bps; i++){ *(ring_buffer + chn * bps + word_size - 1 - i) = (res >> i * 8) & 0xff; } }else{ for(i = 0; i < bps; i++){ *(ring_buffer + chn * bps + i) = (res >> i * 8) & 0xff; } } } ring_buffer += channels * bps; } } devout = AGS_DEVOUT(soundcard); /* retrieve mutex */ application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devout); pthread_mutex_unlock(application_context->mutex); /* lock */ pthread_mutex_lock(mutex); notify_soundcard = AGS_NOTIFY_SOUNDCARD(devout->notify_soundcard); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); /* retrieve word size */ switch(devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(gint8); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(gint16); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(gint64); } //NOTE:JK: not available break; default: g_warning("ags_devout_oss_play(): unsupported word size"); return; } /* do playback */ devout->flags &= (~AGS_DEVOUT_START_PLAY); if((AGS_DEVOUT_INITIALIZED & (devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } /* check buffer flag */ if((AGS_DEVOUT_BUFFER0 & (devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_DEVOUT_BUFFER1 & (devout->flags)) != 0){ nth_buffer = 1; }else if((AGS_DEVOUT_BUFFER2 & (devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_DEVOUT_BUFFER3 & (devout->flags)) != 0){ nth_buffer = 3; } #ifdef AGS_WITH_OSS /* fill ring buffer */ ags_devout_oss_play_fill_ring_buffer(devout->buffer[nth_buffer], devout->format, devout->ring_buffer[devout->nth_ring_buffer], devout->pcm_channels, devout->buffer_size); /* wait until available */ list = ags_soundcard_get_poll_fd(soundcard); if(!ags_soundcard_is_available(soundcard) && !g_atomic_int_get(&(devout->available)) && list != NULL){ poll_fd = list->data; poll_fd->poll_fd->events = POLLOUT; while(!ags_soundcard_is_available(soundcard) && !g_atomic_int_get(&(devout->available))){ ppoll(poll_fd->poll_fd, 1, &poll_interval, NULL); } } /* write ring buffer */ n_write = write(devout->out.oss.device_fd, devout->ring_buffer[devout->nth_ring_buffer], devout->pcm_channels * devout->buffer_size * word_size * sizeof (char)); g_atomic_int_set(&(devout->available), FALSE); if(n_write != devout->pcm_channels * devout->buffer_size * word_size * sizeof (char)){ g_critical("write() return doesn't match written bytes"); } #endif /* increment nth ring-buffer */ if(devout->nth_ring_buffer + 1 >= devout->ring_buffer_size){ devout->nth_ring_buffer = 0; }else{ devout->nth_ring_buffer += 1; } pthread_mutex_unlock(mutex); /* update soundcard */ task_thread = ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_TASK_THREAD); task = NULL; /* tic soundcard */ tic_device = ags_tic_device_new((GObject *) devout); task = g_list_append(task, tic_device); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) devout); task = g_list_append(task, clear_buffer); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) devout); task = g_list_append(task, clear_buffer); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) devout); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); } void ags_devout_oss_free(AgsSoundcard *soundcard) { AgsDevout *devout; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *poll_fd; guint i; pthread_mutex_t *mutex; devout = AGS_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devout); pthread_mutex_unlock(application_context->mutex); /* */ pthread_mutex_lock(mutex); #ifdef AGS_WITH_OSS /* remove poll fd */ poll_fd = devout->poll_fd; while(poll_fd != NULL){ ags_polling_thread_remove_poll_fd(AGS_POLL_FD(poll_fd->data)->polling_thread, poll_fd->data); g_object_unref(poll_fd->data); poll_fd = poll_fd->next; } g_list_free(poll_fd); devout->poll_fd = NULL; #endif notify_soundcard = AGS_NOTIFY_SOUNDCARD(devout->notify_soundcard); if((AGS_DEVOUT_INITIALIZED & (devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } close(devout->out.oss.device_fd); devout->out.oss.device_fd = -1; /* free ring-buffer */ g_atomic_int_set(&(devout->available), FALSE); for(i = 0; i < devout->ring_buffer_size; i++){ free(devout->ring_buffer[i]); } free(devout->ring_buffer); devout->ring_buffer = NULL; /* reset flags */ devout->flags &= (~(AGS_DEVOUT_BUFFER0 | AGS_DEVOUT_BUFFER1 | AGS_DEVOUT_BUFFER2 | AGS_DEVOUT_BUFFER3 | AGS_DEVOUT_PLAY | AGS_DEVOUT_INITIALIZED)); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); devout->note_offset = 0; devout->note_offset_absolute = 0; pthread_mutex_unlock(mutex); } void ags_devout_alsa_init(AgsSoundcard *soundcard, GError **error) { AgsDevout *devout; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; #ifdef AGS_WITH_ALSA snd_pcm_t *handle; snd_pcm_hw_params_t *hwparams; snd_pcm_sw_params_t *swparams; gchar *str; int rc; unsigned int val; snd_pcm_uframes_t frames; unsigned int rate; unsigned int rrate; unsigned int channels; snd_pcm_uframes_t size; snd_pcm_sframes_t buffer_size; snd_pcm_sframes_t period_size; snd_pcm_format_t format; int period_event; int err, dir; #endif guint word_size; guint i; pthread_mutex_t *mutex; static unsigned int period_time = 100000; static unsigned int buffer_time = 100000; devout = AGS_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devout); pthread_mutex_unlock(application_context->mutex); /* retrieve word size */ pthread_mutex_lock(mutex); if(devout->out.alsa.device == NULL){ pthread_mutex_unlock(mutex); return; } switch(devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { #ifdef AGS_WITH_ALSA format = SND_PCM_FORMAT_S8; #endif word_size = sizeof(gint8); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { #ifdef AGS_WITH_ALSA format = SND_PCM_FORMAT_S16; #endif word_size = sizeof(gint16); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { #ifdef AGS_WITH_ALSA format = SND_PCM_FORMAT_S24; #endif //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { #ifdef AGS_WITH_ALSA format = SND_PCM_FORMAT_S32; #endif word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(gint64); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_devout_alsa_init(): unsupported word size"); return; } /* prepare for playback */ devout->flags |= (AGS_DEVOUT_BUFFER3 | AGS_DEVOUT_START_PLAY | AGS_DEVOUT_PLAY | AGS_DEVOUT_NONBLOCKING); memset(devout->buffer[0], 0, devout->pcm_channels * devout->buffer_size * word_size); memset(devout->buffer[1], 0, devout->pcm_channels * devout->buffer_size * word_size); memset(devout->buffer[2], 0, devout->pcm_channels * devout->buffer_size * word_size); memset(devout->buffer[3], 0, devout->pcm_channels * devout->buffer_size * word_size); /* allocate ring buffer */ #ifdef AGS_WITH_ALSA g_atomic_int_set(&(devout->available), FALSE); devout->ring_buffer = (unsigned char **) malloc(devout->ring_buffer_size * sizeof(unsigned char *)); for(i = 0; i < devout->ring_buffer_size; i++){ devout->ring_buffer[i] = (unsigned char *) malloc(devout->pcm_channels * devout->buffer_size * (snd_pcm_format_physical_width(format) / 8) * sizeof(unsigned char)); } /* */ period_event = 0; /* Open PCM device for playback. */ handle = NULL; if((err = snd_pcm_open(&handle, devout->out.alsa.device, SND_PCM_STREAM_PLAYBACK, 0)) < 0){ gchar *device_fixup; str = snd_strerror(err); g_warning("Playback open error (attempting fixup): %s", str); device_fixup = g_strdup_printf("%s,0", devout->out.alsa.device); handle = NULL; if((err = snd_pcm_open(&handle, device_fixup, SND_PCM_STREAM_PLAYBACK, 0)) < 0){ pthread_mutex_unlock(mutex); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_LOCKED_SOUNDCARD, "unable to open pcm device: %s", str); } return; } } snd_pcm_hw_params_alloca(&hwparams); snd_pcm_sw_params_alloca(&swparams); /* choose all parameters */ err = snd_pcm_hw_params_any(handle, hwparams); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Broken configuration for playback: no configurations available: %s", str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_BROKEN_CONFIGURATION, "unable to open pcm device: %s", str); } devout->out.alsa.handle = NULL; // free(str); return; } /* set hardware resampling * / err = snd_pcm_hw_params_set_rate_resample(handle, hwparams, 0); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Resampling setup failed for playback: %s\n", str); // free(str); return; } */ /* set the interleaved read/write format */ err = snd_pcm_hw_params_set_access(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Access type not available for playback: %s", str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_ACCESS_TYPE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.alsa.handle = NULL; // free(str); return; } /* set the sample format */ err = snd_pcm_hw_params_set_format(handle, hwparams, format); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Sample format not available for playback: %s", str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.alsa.handle = NULL; // free(str); return; } /* set the count of channels */ channels = devout->pcm_channels; err = snd_pcm_hw_params_set_channels(handle, hwparams, channels); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Channels count (%i) not available for playbacks: %s", channels, str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_CHANNELS_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.alsa.handle = NULL; // free(str); return; } /* set the stream rate */ rate = devout->samplerate; rrate = rate; err = snd_pcm_hw_params_set_rate_near(handle, hwparams, &rrate, 0); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Rate %iHz not available for playback: %s", rate, str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_SAMPLERATE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.alsa.handle = NULL; // free(str); return; } if (rrate != rate) { pthread_mutex_unlock(mutex); g_warning("Rate doesn't match (requested %iHz, get %iHz)", rate, err); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_SAMPLERATE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.alsa.handle = NULL; return; } /* set the buffer size */ size = 2 * devout->buffer_size; err = snd_pcm_hw_params_set_buffer_size(handle, hwparams, size); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set buffer size %lu for playback: %s", size, str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_BUFFER_SIZE_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.alsa.handle = NULL; // free(str); return; } /* set the period size * / period_size = devout->buffer_size; err = snd_pcm_hw_params_set_period_size_near(handle, hwparams, period_size, dir); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to get period size for playback: %s\n", str); // free(str); return; } */ /* write the parameters to device */ err = snd_pcm_hw_params(handle, hwparams); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set hw params for playback: %s", str); if(error != NULL){ g_set_error(error, AGS_DEVOUT_ERROR, AGS_DEVOUT_ERROR_HW_PARAMETERS_NOT_AVAILABLE, "unable to open pcm device: %s", str); } devout->out.alsa.handle = NULL; // free(str); return; } /* get the current swparams * / err = snd_pcm_sw_params_current(handle, swparams); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to determine current swparams for playback: %s\n", str); // free(str); return; } */ /* start the transfer when the buffer is almost full: */ /* (buffer_size / avail_min) * avail_min * / err = snd_pcm_sw_params_set_start_threshold(handle, swparams, (buffer_size / period_size) * period_size); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set start threshold mode for playback: %s\n", str); // free(str); return; } */ /* allow the transfer when at least period_size samples can be processed */ /* or disable this mechanism when period event is enabled (aka interrupt like style processing) * / err = snd_pcm_sw_params_set_avail_min(handle, swparams, period_event ? buffer_size : period_size); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set avail min for playback: %s\n", str); // free(str); return; } /* write the parameters to the playback device * / err = snd_pcm_sw_params(handle, swparams); if (err < 0) { pthread_mutex_unlock(mutex); str = snd_strerror(err); g_warning("Unable to set sw params for playback: %s\n", str); // free(str); return; } */ /* */ devout->out.alsa.handle = handle; #endif devout->tact_counter = 0.0; devout->delay_counter = 0.0; devout->tic_counter = 0; devout->nth_ring_buffer = 0; ags_soundcard_get_poll_fd(soundcard); #ifdef AGS_WITH_ALSA devout->flags |= AGS_DEVOUT_INITIALIZED; #endif devout->flags |= AGS_DEVOUT_BUFFER0; devout->flags &= (~(AGS_DEVOUT_BUFFER1 | AGS_DEVOUT_BUFFER2 | AGS_DEVOUT_BUFFER3)); pthread_mutex_unlock(mutex); } void ags_devout_alsa_play(AgsSoundcard *soundcard, GError **error) { AgsDevout *devout; AgsNotifySoundcard *notify_soundcard; AgsTicDevice *tic_device; AgsClearBuffer *clear_buffer; AgsSwitchBufferFlag *switch_buffer_flag; AgsThread *task_thread; AgsPollFd *poll_fd; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *task; GList *list; gchar *str; guint word_size; guint nth_buffer; pthread_mutex_t *mutex; static const struct timespec poll_interval = { 0, 250, }; #ifdef AGS_WITH_ALSA auto void ags_devout_alsa_play_fill_ring_buffer(void *buffer, guint ags_format, unsigned char *ring_buffer, guint channels, guint buffer_size); void ags_devout_alsa_play_fill_ring_buffer(void *buffer, guint ags_format, unsigned char *ring_buffer, guint channels, guint buffer_size){ snd_pcm_format_t format; int format_bits; unsigned int max_val; int bps; /* bytes per sample */ int phys_bps; int big_endian; int to_unsigned; int res; gint count; guint i, chn; switch(ags_format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { format = SND_PCM_FORMAT_S8; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { format = SND_PCM_FORMAT_S16; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { format = SND_PCM_FORMAT_S24; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { format = SND_PCM_FORMAT_S32; } break; default: g_warning("ags_devout_alsa_play(): unsupported word size"); return; } count = buffer_size; format_bits = snd_pcm_format_width(format); max_val = (1 << (format_bits - 1)) - 1; bps = format_bits / 8; phys_bps = snd_pcm_format_physical_width(format) / 8; big_endian = snd_pcm_format_big_endian(format) == 1; to_unsigned = snd_pcm_format_unsigned(format) == 1; /* fill the channel areas */ for(count = 0; count < buffer_size; count++){ for(chn = 0; chn < channels; chn++){ switch(ags_format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { res = (int) ((gint8 *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { res = (int) ((gint16 *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { res = (int) ((gint32 *) buffer)[count * channels + chn]; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { res = (int) ((gint32 *) buffer)[count * channels + chn]; } break; } if(to_unsigned){ res ^= 1U << (format_bits - 1); } /* Generate data in native endian format */ if (big_endian) { for (i = 0; i < bps; i++) *(ring_buffer + chn * bps + phys_bps - 1 - i) = (res >> i * 8) & 0xff; } else { for (i = 0; i < bps; i++) *(ring_buffer + chn * bps + i) = (res >> i * 8) & 0xff; } } ring_buffer += channels * bps; } } #endif devout = AGS_DEVOUT(soundcard); /* */ application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devout); pthread_mutex_unlock(application_context->mutex); /* lock */ pthread_mutex_lock(mutex); notify_soundcard = AGS_NOTIFY_SOUNDCARD(devout->notify_soundcard); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); /* retrieve word size */ switch(devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(gint8); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(gint16); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(gint64); } break; default: pthread_mutex_unlock(mutex); g_warning("ags_devout_alsa_play(): unsupported word size"); return; } /* do playback */ devout->flags &= (~AGS_DEVOUT_START_PLAY); if((AGS_DEVOUT_INITIALIZED & (devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } // g_message("play - 0x%0x", ((AGS_DEVOUT_BUFFER0 | // AGS_DEVOUT_BUFFER1 | // AGS_DEVOUT_BUFFER2 | // AGS_DEVOUT_BUFFER3) & (devout->flags))); /* check buffer flag */ if((AGS_DEVOUT_BUFFER0 & (devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_DEVOUT_BUFFER1 & (devout->flags)) != 0){ nth_buffer = 1; }else if((AGS_DEVOUT_BUFFER2 & (devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_DEVOUT_BUFFER3 & (devout->flags)) != 0){ nth_buffer = 3; } #ifdef AGS_WITH_ALSA /* fill ring buffer */ ags_devout_alsa_play_fill_ring_buffer(devout->buffer[nth_buffer], devout->format, devout->ring_buffer[devout->nth_ring_buffer], devout->pcm_channels, devout->buffer_size); /* wait until available */ list = ags_soundcard_get_poll_fd(soundcard); if(!ags_soundcard_is_available(soundcard) && !g_atomic_int_get(&(devout->available)) && list != NULL){ poll_fd = list->data; poll_fd->poll_fd->events = POLLOUT; while(!ags_soundcard_is_available(soundcard) && !g_atomic_int_get(&(devout->available))){ ppoll(poll_fd->poll_fd, 1, &poll_interval, NULL); } } /* write ring buffer */ devout->out.alsa.rc = snd_pcm_writei(devout->out.alsa.handle, devout->ring_buffer[devout->nth_ring_buffer], (snd_pcm_uframes_t) (devout->buffer_size)); g_atomic_int_set(&(devout->available), FALSE); /* check error flag */ if((AGS_DEVOUT_NONBLOCKING & (devout->flags)) == 0){ if(devout->out.alsa.rc == -EPIPE){ /* EPIPE means underrun */ snd_pcm_prepare(devout->out.alsa.handle); #ifdef AGS_DEBUG g_message("underrun occurred"); #endif }else if(devout->out.alsa.rc == -ESTRPIPE){ static const struct timespec idle = { 0, 4000, }; int err; while((err = snd_pcm_resume(devout->out.alsa.handle)) < 0){ // == -EAGAIN nanosleep(&idle, NULL); /* wait until the suspend flag is released */ } if(err < 0){ err = snd_pcm_prepare(devout->out.alsa.handle); } }else if(devout->out.alsa.rc < 0){ str = snd_strerror(devout->out.alsa.rc); g_message("error from writei: %s", str); }else if(devout->out.alsa.rc != (int) devout->buffer_size) { g_message("short write, write %d frames", devout->out.alsa.rc); } } #endif /* increment nth ring-buffer */ g_atomic_int_set(&(devout->available), FALSE); if(devout->nth_ring_buffer + 1 >= devout->ring_buffer_size){ devout->nth_ring_buffer = 0; }else{ devout->nth_ring_buffer += 1; } pthread_mutex_unlock(mutex); /* update soundcard */ task_thread = ags_thread_find_type((AgsThread *) application_context->main_loop, AGS_TYPE_TASK_THREAD); task = NULL; /* tic soundcard */ tic_device = ags_tic_device_new((GObject *) devout); task = g_list_append(task, tic_device); /* reset - clear buffer */ clear_buffer = ags_clear_buffer_new((GObject *) devout); task = g_list_append(task, clear_buffer); /* reset - switch buffer flags */ switch_buffer_flag = ags_switch_buffer_flag_new((GObject *) devout); task = g_list_append(task, switch_buffer_flag); /* append tasks */ ags_task_thread_append_tasks((AgsTaskThread *) task_thread, task); #ifdef AGS_WITH_ALSA snd_pcm_prepare(devout->out.alsa.handle); #endif } void ags_devout_alsa_free(AgsSoundcard *soundcard) { AgsDevout *devout; AgsNotifySoundcard *notify_soundcard; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *poll_fd; guint i; pthread_mutex_t *mutex; devout = AGS_DEVOUT(soundcard); application_context = ags_soundcard_get_application_context(soundcard); pthread_mutex_lock(application_context->mutex); mutex_manager = ags_mutex_manager_get_instance(); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) devout); pthread_mutex_unlock(application_context->mutex); /* lock */ pthread_mutex_lock(mutex); #ifdef AGS_WITH_ALSA /* remove poll fd */ poll_fd = devout->poll_fd; while(poll_fd != NULL){ ags_polling_thread_remove_poll_fd(AGS_POLL_FD(poll_fd->data)->polling_thread, poll_fd->data); g_object_unref(poll_fd->data); poll_fd = poll_fd->next; } g_list_free(poll_fd); devout->poll_fd = NULL; #endif notify_soundcard = AGS_NOTIFY_SOUNDCARD(devout->notify_soundcard); if((AGS_DEVOUT_INITIALIZED & (devout->flags)) == 0){ pthread_mutex_unlock(mutex); return; } #ifdef AGS_WITH_ALSA snd_pcm_drain(devout->out.alsa.handle); snd_pcm_close(devout->out.alsa.handle); devout->out.alsa.handle = NULL; #endif /* free ring-buffer */ for(i = 0; i < devout->ring_buffer_size; i++){ free(devout->ring_buffer[i]); } free(devout->ring_buffer); devout->ring_buffer = NULL; /* reset flags */ devout->flags &= (~(AGS_DEVOUT_BUFFER0 | AGS_DEVOUT_BUFFER1 | AGS_DEVOUT_BUFFER2 | AGS_DEVOUT_BUFFER3 | AGS_DEVOUT_PLAY | AGS_DEVOUT_INITIALIZED)); /* notify cyclic task */ pthread_mutex_lock(notify_soundcard->return_mutex); g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_DONE_RETURN); if((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0){ pthread_cond_signal(notify_soundcard->return_cond); } pthread_mutex_unlock(notify_soundcard->return_mutex); devout->note_offset = 0; devout->note_offset_absolute = 0; pthread_mutex_unlock(mutex); } void ags_devout_tic(AgsSoundcard *soundcard) { AgsDevout *devout; gdouble delay; devout = AGS_DEVOUT(soundcard); /* determine if attack should be switched */ delay = devout->delay[devout->tic_counter]; if((guint) devout->delay_counter + 1 >= (guint) delay){ if(devout->do_loop && devout->note_offset + 1 == devout->loop_right){ ags_soundcard_set_note_offset(soundcard, devout->loop_left); }else{ ags_soundcard_set_note_offset(soundcard, devout->note_offset + 1); } ags_soundcard_set_note_offset_absolute(soundcard, devout->note_offset_absolute + 1); /* delay */ ags_soundcard_offset_changed(soundcard, devout->note_offset); /* reset - delay counter */ devout->delay_counter = 0.0; devout->tact_counter += 1.0; }else{ devout->delay_counter += 1.0; } } void ags_devout_offset_changed(AgsSoundcard *soundcard, guint note_offset) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); devout->tic_counter += 1; if(devout->tic_counter == AGS_SOUNDCARD_DEFAULT_PERIOD){ /* reset - tic counter i.e. modified delay index within period */ devout->tic_counter = 0; } } void ags_devout_set_bpm(AgsSoundcard *soundcard, gdouble bpm) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); devout->bpm = bpm; ags_devout_adjust_delay_and_attack(devout); } gdouble ags_devout_get_bpm(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); return(devout->bpm); } void ags_devout_set_delay_factor(AgsSoundcard *soundcard, gdouble delay_factor) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); devout->delay_factor = delay_factor; ags_devout_adjust_delay_and_attack(devout); } gdouble ags_devout_get_delay_factor(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); return(devout->delay_factor); } gdouble ags_devout_get_delay(AgsSoundcard *soundcard) { AgsDevout *devout; guint index; devout = AGS_DEVOUT(soundcard); index = devout->tic_counter; return(devout->delay[index]); } gdouble ags_devout_get_absolute_delay(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); return((60.0 * (((gdouble) devout->samplerate / (gdouble) devout->buffer_size) / (gdouble) devout->bpm) * ((1.0 / 16.0) * (1.0 / (gdouble) devout->delay_factor)))); } guint ags_devout_get_attack(AgsSoundcard *soundcard) { AgsDevout *devout; guint index; devout = AGS_DEVOUT(soundcard); index = devout->tic_counter; return(devout->attack[index]); } void* ags_devout_get_buffer(AgsSoundcard *soundcard) { AgsDevout *devout; void *buffer; devout = AGS_DEVOUT(soundcard); if((AGS_DEVOUT_BUFFER0 & (devout->flags)) != 0){ buffer = devout->buffer[0]; }else if((AGS_DEVOUT_BUFFER1 & (devout->flags)) != 0){ buffer = devout->buffer[1]; }else if((AGS_DEVOUT_BUFFER2 & (devout->flags)) != 0){ buffer = devout->buffer[2]; }else if((AGS_DEVOUT_BUFFER3 & (devout->flags)) != 0){ buffer = devout->buffer[3]; }else{ buffer = NULL; } return(buffer); } void* ags_devout_get_next_buffer(AgsSoundcard *soundcard) { AgsDevout *devout; void *buffer; devout = AGS_DEVOUT(soundcard); // g_message("next - 0x%0x", ((AGS_DEVOUT_BUFFER0 | // AGS_DEVOUT_BUFFER1 | // AGS_DEVOUT_BUFFER2 | // AGS_DEVOUT_BUFFER3) & (devout->flags))); if((AGS_DEVOUT_BUFFER0 & (devout->flags)) != 0){ buffer = devout->buffer[1]; }else if((AGS_DEVOUT_BUFFER1 & (devout->flags)) != 0){ buffer = devout->buffer[2]; }else if((AGS_DEVOUT_BUFFER2 & (devout->flags)) != 0){ buffer = devout->buffer[3]; }else if((AGS_DEVOUT_BUFFER3 & (devout->flags)) != 0){ buffer = devout->buffer[0]; }else{ buffer = NULL; } return(buffer); } void* ags_devout_get_prev_buffer(AgsSoundcard *soundcard) { AgsDevout *devout; void *buffer; devout = AGS_DEVOUT(soundcard); if((AGS_DEVOUT_BUFFER0 & (devout->flags)) != 0){ buffer = devout->buffer[3]; }else if((AGS_DEVOUT_BUFFER1 & (devout->flags)) != 0){ buffer = devout->buffer[0]; }else if((AGS_DEVOUT_BUFFER2 & (devout->flags)) != 0){ buffer = devout->buffer[1]; }else if((AGS_DEVOUT_BUFFER3 & (devout->flags)) != 0){ buffer = devout->buffer[2]; }else{ buffer = NULL; } return(buffer); } guint ags_devout_get_delay_counter(AgsSoundcard *soundcard) { return(AGS_DEVOUT(soundcard)->delay_counter); } void ags_devout_set_note_offset(AgsSoundcard *soundcard, guint note_offset) { AGS_DEVOUT(soundcard)->note_offset = note_offset; } guint ags_devout_get_note_offset(AgsSoundcard *soundcard) { return(AGS_DEVOUT(soundcard)->note_offset); } void ags_devout_set_note_offset_absolute(AgsSoundcard *soundcard, guint note_offset) { AGS_DEVOUT(soundcard)->note_offset_absolute = note_offset; } guint ags_devout_get_note_offset_absolute(AgsSoundcard *soundcard) { return(AGS_DEVOUT(soundcard)->note_offset_absolute); } void ags_devout_set_loop(AgsSoundcard *soundcard, guint loop_left, guint loop_right, gboolean do_loop) { AGS_DEVOUT(soundcard)->loop_left = loop_left; AGS_DEVOUT(soundcard)->loop_right = loop_right; AGS_DEVOUT(soundcard)->do_loop = do_loop; if(do_loop){ AGS_DEVOUT(soundcard)->loop_offset = AGS_DEVOUT(soundcard)->note_offset; } } void ags_devout_get_loop(AgsSoundcard *soundcard, guint *loop_left, guint *loop_right, gboolean *do_loop) { if(loop_left != NULL){ *loop_left = AGS_DEVOUT(soundcard)->loop_left; } if(loop_right != NULL){ *loop_right = AGS_DEVOUT(soundcard)->loop_right; } if(do_loop != NULL){ *do_loop = AGS_DEVOUT(soundcard)->do_loop; } } guint ags_devout_get_loop_offset(AgsSoundcard *soundcard) { return(AGS_DEVOUT(soundcard)->loop_offset); } void ags_devout_set_audio(AgsSoundcard *soundcard, GList *audio) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); devout->audio = audio; } GList* ags_devout_get_audio(AgsSoundcard *soundcard) { AgsDevout *devout; devout = AGS_DEVOUT(soundcard); return(devout->audio); } /** * ags_devout_adjust_delay_and_attack: * @devout: the #AgsDevout * * Calculate delay and attack and reset it. * * Since: 1.0.0 */ void ags_devout_adjust_delay_and_attack(AgsDevout *devout) { gdouble delay; guint default_tact_frames; guint delay_tact_frames; guint default_period; gint next_attack; guint i; if(!AGS_IS_DEVOUT(devout)){ return; } delay = ags_devout_get_absolute_delay(AGS_SOUNDCARD(devout)); #ifdef AGS_DEBUG g_message("delay : %f", delay); #endif default_tact_frames = (guint) (delay * devout->buffer_size); delay_tact_frames = (guint) (floor(delay) * devout->buffer_size); default_period = (1.0 / AGS_SOUNDCARD_DEFAULT_PERIOD) * (default_tact_frames); i = 0; devout->attack[0] = (guint) floor(0.25 * devout->buffer_size); next_attack = (((devout->attack[i] + default_tact_frames) / devout->buffer_size) - delay) * devout->buffer_size; if(next_attack >= devout->buffer_size){ next_attack = devout->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ devout->attack[i] = devout->attack[i] - ((gdouble) next_attack / 2.0); if(devout->attack[i] < 0){ devout->attack[i] = 0; } if(devout->attack[i] >= devout->buffer_size){ devout->attack[i] = devout->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= devout->buffer_size){ next_attack = devout->buffer_size - 1; } } for(i = 1; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD; i++){ devout->attack[i] = next_attack; next_attack = (((devout->attack[i] + default_tact_frames) / devout->buffer_size) - delay) * devout->buffer_size; if(next_attack >= devout->buffer_size){ next_attack = devout->buffer_size - 1; } /* check if delay drops for next attack */ if(next_attack < 0){ devout->attack[i] = devout->attack[i] - ((gdouble) next_attack / 2.0); if(devout->attack[i] < 0){ devout->attack[i] = 0; } if(devout->attack[i] >= devout->buffer_size){ devout->attack[i] = devout->buffer_size - 1; } next_attack = next_attack + (next_attack / 2.0); if(next_attack < 0){ next_attack = 0; } if(next_attack >= devout->buffer_size){ next_attack = devout->buffer_size - 1; } } #ifdef AGS_DEBUG g_message("%d", devout->attack[i]); #endif } devout->attack[0] = devout->attack[i - 2]; for(i = 0; i < (int) 2.0 * AGS_SOUNDCARD_DEFAULT_PERIOD - 1; i++){ devout->delay[i] = ((gdouble) (default_tact_frames + devout->attack[i] - devout->attack[i + 1])) / (gdouble) devout->buffer_size; #ifdef AGS_DEBUG g_message("%f", devout->delay[i]); #endif } devout->delay[i] = ((gdouble) (default_tact_frames + devout->attack[i] - devout->attack[0])) / (gdouble) devout->buffer_size; } /** * ags_devout_realloc_buffer: * @devout: the #AgsDevout * * Reallocate the internal audio buffer. * * Since: 1.0.0 */ void ags_devout_realloc_buffer(AgsDevout *devout) { guint word_size; if(devout == NULL){ return; } switch(devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(gint8); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(gint16); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(gint32); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(gint64); } break; default: g_warning("ags_devout_realloc_buffer(): unsupported word size"); return; } /* AGS_DEVOUT_BUFFER_0 */ if(devout->buffer[0] != NULL){ free(devout->buffer[0]); } devout->buffer[0] = (void *) malloc(devout->pcm_channels * devout->buffer_size * word_size); /* AGS_DEVOUT_BUFFER_1 */ if(devout->buffer[1] != NULL){ free(devout->buffer[1]); } devout->buffer[1] = (void *) malloc(devout->pcm_channels * devout->buffer_size * word_size); /* AGS_DEVOUT_BUFFER_2 */ if(devout->buffer[2] != NULL){ free(devout->buffer[2]); } devout->buffer[2] = (void *) malloc(devout->pcm_channels * devout->buffer_size * word_size); /* AGS_DEVOUT_BUFFER_3 */ if(devout->buffer[3] != NULL){ free(devout->buffer[3]); } devout->buffer[3] = (void *) malloc(devout->pcm_channels * devout->buffer_size * word_size); } /** * ags_devout_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsDevout, refering to @application_context. * * Returns: a new #AgsDevout * * Since: 1.0.0 */ AgsDevout* ags_devout_new(GObject *application_context) { AgsDevout *devout; devout = (AgsDevout *) g_object_new(AGS_TYPE_DEVOUT, "application-context", application_context, NULL); return(devout); } gsequencer-1.4.24/ags/audio/ags_fifoout.h0000644000175000017500000001020713246707333015225 00000000000000/* 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 . */ #ifndef __AGS_FIFOOUT_H__ #define __AGS_FIFOOUT_H__ #include #include #include #include #include #define AGS_TYPE_FIFOOUT (ags_fifoout_get_type()) #define AGS_FIFOOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FIFOOUT, AgsFifoout)) #define AGS_FIFOOUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_FIFOOUT, AgsFifoout)) #define AGS_IS_FIFOOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_FIFOOUT)) #define AGS_IS_FIFOOUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_FIFOOUT)) #define AGS_FIFOOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_FIFOOUT, AgsFifooutClass)) #define AGS_FIFOOUT_DEFAULT_ALSA_DEVICE "hw:0,0\0" #define AGS_FIFOOUT_DEFAULT_OSS_DEVICE "/dev/dsp\0" typedef struct _AgsFifoout AgsFifoout; typedef struct _AgsFifooutClass AgsFifooutClass; /** * AgsFifooutFlags: * @AGS_FIFOOUT_BUFFER0: ring-buffer 0 * @AGS_FIFOOUT_BUFFER1: ring-buffer 1 * @AGS_FIFOOUT_BUFFER2: ring-buffer 2 * @AGS_FIFOOUT_BUFFER3: ring-buffer 3 * @AGS_FIFOOUT_ATTACK_FIRST: use first attack, instead of second one * @AGS_FIFOOUT_PLAY: use first attack, instead of second one * @AGS_FIFOOUT_SHUTDOWN: stop playback * @AGS_FIFOOUT_START_PLAY: playback starting * @AGS_FIFOOUT_NONBLOCKING: do non-blocking calls * @AGS_FIFOOUT_INITIALIZED: the soundcard was initialized * * Enum values to control the behavior or indicate internal state of #AgsFifoout by * enable/disable as flags. */ typedef enum { AGS_FIFOOUT_BUFFER0 = 1, AGS_FIFOOUT_BUFFER1 = 1 << 1, AGS_FIFOOUT_BUFFER2 = 1 << 2, AGS_FIFOOUT_BUFFER3 = 1 << 3, AGS_FIFOOUT_ATTACK_FIRST = 1 << 4, AGS_FIFOOUT_PLAY = 1 << 5, AGS_FIFOOUT_SHUTDOWN = 1 << 6, AGS_FIFOOUT_START_PLAY = 1 << 7, AGS_FIFOOUT_NONBLOCKING = 1 << 8, AGS_FIFOOUT_INITIALIZED = 1 << 9, }AgsFifooutFlags; #define AGS_FIFOOUT_ERROR (ags_fifoout_error_quark()) typedef enum{ AGS_FIFOOUT_ERROR_LOCKED_SOUNDCARD, }AgsFifooutError; struct _AgsFifoout { GObject object; guint flags; guint dsp_channels; guint pcm_channels; guint format; guint buffer_size; guint samplerate; // sample_rate void** buffer; unsigned char **ring_buffer; double bpm; // beats per minute gdouble delay_factor; gdouble *delay; // count of tics within buffer size guint *attack; // where currently tic resides in the stream's offset, measured in 1/64 of bpm gdouble tact_counter; gdouble delay_counter; // next time attack changeing when delay_counter == delay guint tic_counter; // in the range of default period guint note_offset; guint loop_left; guint loop_right; gboolean do_loop; guint loop_offset; gchar *device; int fifo_fd; GObject *application_context; pthread_mutex_t *application_mutex; GList *poll_fd; GList *audio; }; struct _AgsFifooutClass { GObjectClass object; }; GType ags_fifoout_get_type(); GQuark ags_fifoout_error_quark(); void ags_fifoout_adjust_delay_and_attack(AgsFifoout *fifoout); void ags_fifoout_realloc_buffer(AgsFifoout *fifoout); AgsFifoout* ags_fifoout_new(GObject *application_context); #endif /*__AGS_FIFOOUT_H__*/ gsequencer-1.4.24/ags/audio/task/0000755000175000017500000000000013256233674013574 500000000000000gsequencer-1.4.24/ags/audio/task/ags_export_output.h0000644000175000017500000000513313247044247017456 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_EXPORT_OUTPUT_H__ #define __AGS_EXPORT_OUTPUT_H__ #include #include #include #include #define AGS_TYPE_EXPORT_OUTPUT (ags_export_output_get_type()) #define AGS_EXPORT_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_EXPORT_OUTPUT, AgsExportOutput)) #define AGS_EXPORT_OUTPUT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_EXPORT_OUTPUT, AgsExportOutputClass)) #define AGS_IS_EXPORT_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_EXPORT_OUTPUT)) #define AGS_IS_EXPORT_OUTPUT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_EXPORT_OUTPUT)) #define AGS_EXPORT_OUTPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_EXPORT_OUTPUT, AgsExportOutputClass)) typedef struct _AgsExportOutput AgsExportOutput; typedef struct _AgsExportOutputClass AgsExportOutputClass; /** * AgsExportOutputFormat: * @AGS_EXPORT_OUTPUT_FORMAT_WAV: use WAV format * @AGS_EXPORT_OUTPUT_FORMAT_OGG: use OGG format * @AGS_EXPORT_OUTPUT_FORMAT_FLAC: use FLAC format * * Enum values to control output format of #AgsExportOutput. */ typedef enum{ AGS_EXPORT_OUTPUT_FORMAT_WAV = 1, AGS_EXPORT_OUTPUT_FORMAT_OGG = 1 << 1, AGS_EXPORT_OUTPUT_FORMAT_FLAC = 1 << 2, }AgsExportOutputFormat; struct _AgsExportOutput { AgsTask task; AgsExportThread *export_thread; GObject *soundcard; gchar *filename; guint format; guint tic; gboolean live_performance; }; struct _AgsExportOutputClass { AgsTaskClass task; }; GType ags_export_output_get_type(); AgsExportOutput* ags_export_output_new(AgsExportThread *export_thread, GObject *soundcard, gchar *filename, guint tic, gboolean live_performance); #endif /*__AGS_EXPORT_OUTPUT_H__*/ gsequencer-1.4.24/ags/audio/task/ags_resize_audio.h0000644000175000017500000000403013247044247017172 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RESIZE_AUDIO_H__ #define __AGS_RESIZE_AUDIO_H__ #include #include #include #define AGS_TYPE_RESIZE_AUDIO (ags_resize_audio_get_type()) #define AGS_RESIZE_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RESIZE_AUDIO, AgsResizeAudio)) #define AGS_RESIZE_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RESIZE_AUDIO, AgsResizeAudioClass)) #define AGS_IS_RESIZE_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RESIZE_AUDIO)) #define AGS_IS_RESIZE_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RESIZE_AUDIO)) #define AGS_RESIZE_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RESIZE_AUDIO, AgsResizeAudioClass)) typedef struct _AgsResizeAudio AgsResizeAudio; typedef struct _AgsResizeAudioClass AgsResizeAudioClass; struct _AgsResizeAudio { AgsTask task; AgsAudio *audio; guint output_pads; guint input_pads; guint audio_channels; }; struct _AgsResizeAudioClass { AgsTaskClass task; }; GType ags_resize_audio_get_type(); AgsResizeAudio* ags_resize_audio_new(AgsAudio *audio, guint output_pads, guint input_pads, guint audio_channels); #endif /*__AGS_RESIZE_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/task/ags_start_sequencer.h0000644000175000017500000000405113247044247017722 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_START_SEQUENCER_H__ #define __AGS_START_SEQUENCER_H__ #include #include #include #include #define AGS_TYPE_START_SEQUENCER (ags_start_sequencer_get_type()) #define AGS_START_SEQUENCER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_START_SEQUENCER, AgsStartSequencer)) #define AGS_START_SEQUENCER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_START_SEQUENCER, AgsStartSequencerClass)) #define AGS_IS_START_SEQUENCER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_START_SEQUENCER)) #define AGS_IS_START_SEQUENCER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_START_SEQUENCER)) #define AGS_START_SEQUENCER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_START_SEQUENCER, AgsStartSequencerClass)) typedef struct _AgsStartSequencer AgsStartSequencer; typedef struct _AgsStartSequencerClass AgsStartSequencerClass; struct _AgsStartSequencer { AgsTask task; AgsApplicationContext *application_context; }; struct _AgsStartSequencerClass { AgsTaskClass task; }; GType ags_start_sequencer_get_type(); AgsStartSequencer* ags_start_sequencer_new(AgsApplicationContext *application_context); #endif /*__AGS_START_SEQUENCER_H__*/ gsequencer-1.4.24/ags/audio/task/ags_move_note.c0000644000175000017500000003763613247044247016520 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_move_note_class_init(AgsMoveNoteClass *move_note); void ags_move_note_connectable_interface_init(AgsConnectableInterface *connectable); void ags_move_note_init(AgsMoveNote *move_note); void ags_move_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_move_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_move_note_connect(AgsConnectable *connectable); void ags_move_note_disconnect(AgsConnectable *connectable); void ags_move_note_dispose(GObject *gobject); void ags_move_note_finalize(GObject *gobject); void ags_move_note_launch(AgsTask *task); /** * SECTION:ags_move_note * @short_description: move notation * @title: AgsMoveNote * @section_id: * @include: ags/audio/task/ags_move_note.h * * The #AgsMoveNote task moves #AgsNotation. */ static gpointer ags_move_note_parent_class = NULL; static AgsConnectableInterface *ags_move_note_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_NOTATION, PROP_SELECTION, PROP_FIRST_X, PROP_FIRST_Y, PROP_MOVE_X, PROP_MOVE_Y, PROP_RELATIVE, PROP_ABSOLUTE, }; GType ags_move_note_get_type() { static GType ags_type_move_note = 0; if(!ags_type_move_note){ static const GTypeInfo ags_move_note_info = { sizeof (AgsMoveNoteClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_move_note_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsMoveNote), 0, /* n_preallocs */ (GInstanceInitFunc) ags_move_note_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_move_note_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_move_note = g_type_register_static(AGS_TYPE_TASK, "AgsMoveNote", &ags_move_note_info, 0); g_type_add_interface_static(ags_type_move_note, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_move_note); } void ags_move_note_class_init(AgsMoveNoteClass *move_note) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_move_note_parent_class = g_type_class_peek_parent(move_note); /* gobject */ gobject = (GObjectClass *) move_note; gobject->set_property = ags_move_note_set_property; gobject->get_property = ags_move_note_get_property; gobject->dispose = ags_move_note_dispose; gobject->finalize = ags_move_note_finalize; /* properties */ /** * AgsMoveNote:audio: * * The assigned #AgsAudio * * Since: 1.2.2 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of move note"), i18n_pspec("The audio of move note task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsMoveNote:notation: * * The assigned #AgsNotation * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("notation of move note"), i18n_pspec("The notation of move note task"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsMoveNote:selection: * * The assigned #AgsNote * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("selection", i18n_pspec("selection to move"), i18n_pspec("The selection to move"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SELECTION, param_spec); /** * AgsMoveNote:first-x: * * Move notation from x offset. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("first-x", i18n_pspec("move from x offset"), i18n_pspec("Move the notation from x offset"), 0, AGS_MOVE_NOTE_DEFAULT_X_LENGTH, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIRST_X, param_spec); /** * AgsMoveNote:first-y: * * Move notation with x padding. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("first-y", i18n_pspec("move with x padding"), i18n_pspec("Move the notation with x padding"), 0, AGS_MOVE_NOTE_DEFAULT_X_LENGTH, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIRST_Y, param_spec); /** * AgsMoveNote:move-x: * * Move notation by move-x amount. * * Since: 1.0.0 */ param_spec = g_param_spec_int("move-x", i18n_pspec("move with move-x amount"), i18n_pspec("Move the notation by move-x amount"), -1 * AGS_MOVE_NOTE_DEFAULT_X_LENGTH, AGS_MOVE_NOTE_DEFAULT_X_LENGTH, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MOVE_X, param_spec); /** * AgsMoveNote:move-y: * * Move notation by move-y amount. * * Since: 1.0.0 */ param_spec = g_param_spec_int("move-y", i18n_pspec("move with move-y amount"), i18n_pspec("Move the notation by move-y amount"), -1 * AGS_MOVE_NOTE_DEFAULT_Y_LENGTH, AGS_MOVE_NOTE_DEFAULT_Y_LENGTH, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MOVE_Y, param_spec); /** * AgsMoveNote:relative: * * Move notation by relative position. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("relative", i18n_pspec("move relative"), i18n_pspec("Move the notation by relative position"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RELATIVE, param_spec); /** * AgsMoveNote:absolute: * * Move notation by absolute position. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("absolute", i18n_pspec("move absolute"), i18n_pspec("Move the notation by absolute position"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ABSOLUTE, param_spec); /* task */ task = (AgsTaskClass *) move_note; task->launch = ags_move_note_launch; } void ags_move_note_connectable_interface_init(AgsConnectableInterface *connectable) { ags_move_note_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_move_note_connect; connectable->disconnect = ags_move_note_disconnect; } void ags_move_note_init(AgsMoveNote *move_note) { move_note->audio = NULL; move_note->notation = NULL; move_note->selection = NULL; move_note->first_x = 0; move_note->first_y = 0; move_note->move_x = 0; move_note->move_y = 0; move_note->relative = FALSE; move_note->absolute = FALSE; } void ags_move_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsMoveNote *move_note; move_note = AGS_MOVE_NOTE(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(move_note->audio == (GObject *) audio){ return; } if(move_note->audio != NULL){ g_object_unref(move_note->audio); } if(audio != NULL){ g_object_ref(audio); } move_note->audio = (GObject *) audio; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(move_note->notation == (GObject *) notation){ return; } if(move_note->notation != NULL){ g_object_unref(move_note->notation); } if(notation != NULL){ g_object_ref(notation); } move_note->notation = (GObject *) notation; } break; case PROP_SELECTION: { GList *selection; selection = (GList *) g_value_get_pointer(value); if(move_note->selection == selection){ return; } if(move_note->selection != NULL){ g_list_free(move_note->selection); } move_note->selection = g_list_copy(selection); } break; case PROP_FIRST_X: { move_note->first_x = g_value_get_uint(value); } break; case PROP_FIRST_Y: { move_note->first_y = g_value_get_uint(value); } break; case PROP_MOVE_X: { move_note->move_x = g_value_get_int(value); } break; case PROP_MOVE_Y: { move_note->move_y = g_value_get_int(value); } break; case PROP_RELATIVE: { move_note->relative = g_value_get_boolean(value); } break; case PROP_ABSOLUTE: { move_note->absolute = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_move_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsMoveNote *move_note; move_note = AGS_MOVE_NOTE(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, move_note->audio); } break; case PROP_NOTATION: { g_value_set_object(value, move_note->notation); } break; case PROP_SELECTION: { g_value_set_pointer(value, g_list_copy(move_note->selection)); } break; case PROP_FIRST_X: { g_value_set_int(value, move_note->first_x); } break; case PROP_FIRST_Y: { g_value_set_uint(value, move_note->first_y); } break; case PROP_MOVE_X: { g_value_set_uint(value, move_note->move_x); } break; case PROP_MOVE_Y: { g_value_set_uint(value, move_note->move_y); } break; case PROP_RELATIVE: { g_value_set_boolean(value, move_note->relative); } break; case PROP_ABSOLUTE: { g_value_set_boolean(value, move_note->absolute); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_move_note_connect(AgsConnectable *connectable) { ags_move_note_parent_connectable_interface->connect(connectable); /* empty */ } void ags_move_note_disconnect(AgsConnectable *connectable) { ags_move_note_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_move_note_dispose(GObject *gobject) { AgsMoveNote *move_note; move_note = AGS_MOVE_NOTE(gobject); if(move_note->audio != NULL){ g_object_unref(move_note->audio); move_note->audio = NULL; } if(move_note->notation != NULL){ g_object_unref(move_note->notation); move_note->notation = NULL; } if(move_note->selection != NULL){ g_list_free(move_note->selection); move_note->selection = NULL; } /* call parent */ G_OBJECT_CLASS(ags_move_note_parent_class)->dispose(gobject); } void ags_move_note_finalize(GObject *gobject) { AgsMoveNote *move_note; move_note = AGS_MOVE_NOTE(gobject); if(move_note->audio != NULL){ g_object_unref(move_note->audio); } if(move_note->notation != NULL){ g_object_unref(move_note->notation); } if(move_note->selection != NULL){ g_list_free(move_note->selection); } /* call parent */ G_OBJECT_CLASS(ags_move_note_parent_class)->finalize(gobject); } void ags_move_note_launch(AgsTask *task) { AgsAudio *audio; AgsNotation *notation, *current_notation; AgsNote *note; AgsMoveNote *move_note; AgsMutexManager *mutex_manager; GList *selection; guint first_x; guint first_y; gint move_x; gint move_y; gboolean relative; gboolean absolute; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); move_note = AGS_MOVE_NOTE(task); /* get some properties */ audio = move_note->audio; notation = current_notation = move_note->notation; selection = move_note->selection; first_x = move_note->first_x; first_y = move_note->first_y; move_x = move_note->move_x; move_y = move_note->move_y; relative = move_note->relative; absolute = move_note->absolute; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* move */ pthread_mutex_lock(audio_mutex); while(selection != NULL){ note = ags_note_duplicate(AGS_NOTE(selection->data)); if(relative){ note->x[0] = note->x[0] + move_x; note->x[1] = note->x[1] + move_x; note->y = note->y + move_y; }else if(absolute){ note->x[0] = move_x + (note->x[0] - first_x); note->x[1] = move_x + (note->x[1] - first_x); note->y = move_y + (note->y + first_y); } if(note->x[0] >= current_notation->timestamp->timer.ags_offset.offset + AGS_NOTATION_DEFAULT_OFFSET){ AgsTimestamp *timestamp; timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = (guint64) (AGS_NOTATION_DEFAULT_OFFSET * floor(note->x[0] / AGS_NOTATION_DEFAULT_OFFSET)); if((current_notation = ags_notation_find_near_timestamp(move_note->audio->notation, notation->audio_channel, timestamp)) == NULL){ current_notation = ags_notation_new(notation->audio, notation->audio_channel); current_notation->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; move_note->audio->notation = ags_notation_add(move_note->audio->notation, current_notation); } g_object_unref(timestamp); } /* remove old note */ ags_notation_remove_note(notation, selection->data, TRUE); ags_notation_remove_note(notation, selection->data, FALSE); /* add new note */ ags_notation_add_note(current_notation, note, FALSE); selection = selection->next; } pthread_mutex_unlock(audio_mutex); } /** * ags_move_note_new: * @notation: the #AgsNotation * @selection: the selection as #GList-struct * @first_x: the x offset to move from * @first_y: the x padding to use * @move_x: the amout to move in x direction * @move_y: the amout to move in y direction * @relative: if %TRUE move relative position * @absolute: if %TRUE move absolute position * * WARNING you need to provide #AgsAudio as a property. * Creates an #AgsMoveNote task. Note either @relative or @absolute shall * be %TRUE else it won't have any effect. * * Returns: a new #AgsMoveNote * * Since: 1.0.0 */ AgsMoveNote* ags_move_note_new(AgsNotation *notation, GList *selection, guint first_x, guint first_y, gint move_x, gint move_y, gboolean relative, gboolean absolute) { AgsMoveNote *move_note; move_note = (AgsMoveNote *) g_object_new(AGS_TYPE_MOVE_NOTE, "notation", notation, "selection", selection, "first-x", first_x, "first-y", first_y, "move-x", move_x, "move-y", move_y, "relative", relative, "absolute", absolute, NULL); return(move_note); } gsequencer-1.4.24/ags/audio/task/ags_set_buffer_size.c0000644000175000017500000004113113247044247017664 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_set_buffer_size_class_init(AgsSetBufferSizeClass *set_buffer_size); void ags_set_buffer_size_connectable_interface_init(AgsConnectableInterface *connectable); void ags_set_buffer_size_init(AgsSetBufferSize *set_buffer_size); void ags_set_buffer_size_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_set_buffer_size_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_set_buffer_size_connect(AgsConnectable *connectable); void ags_set_buffer_size_disconnect(AgsConnectable *connectable); void ags_set_buffer_size_dispose(GObject *gobject); void ags_set_buffer_size_finalize(GObject *gobject); void ags_set_buffer_size_launch(AgsTask *task); void ags_set_buffer_size_audio_signal(AgsSetBufferSize *set_buffer_size, AgsAudioSignal *audio_signal); void ags_set_buffer_size_recycling(AgsSetBufferSize *set_buffer_size, AgsRecycling *recycling); void ags_set_buffer_size_channel(AgsSetBufferSize *set_buffer_size, AgsChannel *channel); void ags_set_buffer_size_audio(AgsSetBufferSize *set_buffer_size, AgsAudio *audio); void ags_set_buffer_size_soundcard(AgsSetBufferSize *set_buffer_size, GObject *soundcard); /** * SECTION:ags_set_buffer_size * @short_description: resizes buffer size * @title: AgsSetBufferSize * @section_id: * @include: ags/audio/task/ags_set_buffer_size.h * * The #AgsSetBufferSize task resizes buffer size of scope. */ enum{ PROP_0, PROP_SCOPE, PROP_BUFFER_SIZE, }; static gpointer ags_set_buffer_size_parent_class = NULL; static AgsConnectableInterface *ags_set_buffer_size_parent_connectable_interface; GType ags_set_buffer_size_get_type() { static GType ags_type_set_buffer_size = 0; if(!ags_type_set_buffer_size){ static const GTypeInfo ags_set_buffer_size_info = { sizeof (AgsSetBufferSizeClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_set_buffer_size_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSetBufferSize), 0, /* n_preallocs */ (GInstanceInitFunc) ags_set_buffer_size_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_set_buffer_size_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_set_buffer_size = g_type_register_static(AGS_TYPE_TASK, "AgsSetBufferSize", &ags_set_buffer_size_info, 0); g_type_add_interface_static(ags_type_set_buffer_size, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_set_buffer_size); } void ags_set_buffer_size_class_init(AgsSetBufferSizeClass *set_buffer_size) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_set_buffer_size_parent_class = g_type_class_peek_parent(set_buffer_size); /* gobject */ gobject = (GObjectClass *) set_buffer_size; gobject->set_property = ags_set_buffer_size_set_property; gobject->get_property = ags_set_buffer_size_get_property; gobject->dispose = ags_set_buffer_size_dispose; gobject->finalize = ags_set_buffer_size_finalize; /* properties */ /** * AgsSetBufferSize:scope: * * The assigned #GObject as scope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("scope", i18n_pspec("scope of set buffer size"), i18n_pspec("The scope of set buffer size"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCOPE, param_spec); /** * AgsSetBufferSize:buffer-size: * * The buffer size to apply to scope. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("buffer size"), i18n_pspec("The buffer size to apply"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /* task */ task = (AgsTaskClass *) set_buffer_size; task->launch = ags_set_buffer_size_launch; } void ags_set_buffer_size_connectable_interface_init(AgsConnectableInterface *connectable) { ags_set_buffer_size_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_set_buffer_size_connect; connectable->disconnect = ags_set_buffer_size_disconnect; } void ags_set_buffer_size_init(AgsSetBufferSize *set_buffer_size) { set_buffer_size->scope = NULL; set_buffer_size->buffer_size = 128; } void ags_set_buffer_size_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSetBufferSize *set_buffer_size; set_buffer_size = AGS_SET_BUFFER_SIZE(gobject); switch(prop_id){ case PROP_SCOPE: { GObject *scope; scope = (GObject *) g_value_get_object(value); if(set_buffer_size->scope == (GObject *) scope){ return; } if(set_buffer_size->scope != NULL){ g_object_unref(set_buffer_size->scope); } if(scope != NULL){ g_object_ref(scope); } set_buffer_size->scope = (GObject *) scope; } break; case PROP_BUFFER_SIZE: { set_buffer_size->buffer_size = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_buffer_size_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSetBufferSize *set_buffer_size; set_buffer_size = AGS_SET_BUFFER_SIZE(gobject); switch(prop_id){ case PROP_SCOPE: { g_value_set_object(value, set_buffer_size->scope); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, set_buffer_size->buffer_size); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_buffer_size_connect(AgsConnectable *connectable) { ags_set_buffer_size_parent_connectable_interface->connect(connectable); /* empty */ } void ags_set_buffer_size_disconnect(AgsConnectable *connectable) { ags_set_buffer_size_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_set_buffer_size_dispose(GObject *gobject) { AgsSetBufferSize *set_buffer_size; set_buffer_size = AGS_SET_BUFFER_SIZE(gobject); if(set_buffer_size->scope != NULL){ g_object_unref(set_buffer_size->scope); set_buffer_size->scope = NULL; } /* call parent */ G_OBJECT_CLASS(ags_set_buffer_size_parent_class)->dispose(gobject); } void ags_set_buffer_size_finalize(GObject *gobject) { AgsSetBufferSize *set_buffer_size; set_buffer_size = AGS_SET_BUFFER_SIZE(gobject); if(set_buffer_size->scope != NULL){ g_object_unref(set_buffer_size->scope); } /* call parent */ G_OBJECT_CLASS(ags_set_buffer_size_parent_class)->finalize(gobject); } void ags_set_buffer_size_launch(AgsTask *task) { AgsSetBufferSize *set_buffer_size; GObject *scope; set_buffer_size = AGS_SET_BUFFER_SIZE(task); scope = set_buffer_size->scope; if(AGS_IS_SOUNDCARD(scope)){ ags_set_buffer_size_soundcard(set_buffer_size, scope); }else if(AGS_IS_AUDIO(scope)){ ags_set_buffer_size_audio(set_buffer_size, AGS_AUDIO(scope)); }else if(AGS_IS_CHANNEL(scope)){ ags_set_buffer_size_channel(set_buffer_size, AGS_CHANNEL(scope)); }else if(AGS_IS_RECYCLING(scope)){ ags_set_buffer_size_recycling(set_buffer_size, AGS_RECYCLING(scope)); }else if(AGS_IS_AUDIO_SIGNAL(scope)){ ags_set_buffer_size_audio_signal(set_buffer_size, AGS_AUDIO_SIGNAL(scope)); } } void ags_set_buffer_size_audio_signal(AgsSetBufferSize *set_buffer_size, AgsAudioSignal *audio_signal) { ags_audio_signal_realloc_buffer_size(audio_signal, set_buffer_size->buffer_size); } void ags_set_buffer_size_recycling(AgsSetBufferSize *set_buffer_size, AgsRecycling *recycling) { AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* set buffer size audio signal */ pthread_mutex_lock(recycling_mutex); list = recycling->audio_signal; while(list != NULL){ ags_set_buffer_size_audio_signal(set_buffer_size, AGS_AUDIO_SIGNAL(list->data)); list = list->next; } pthread_mutex_unlock(recycling_mutex); } void ags_set_buffer_size_channel(AgsSetBufferSize *set_buffer_size, AgsChannel *channel) { GObject *soundcard; AgsMutexManager *mutex_manager; guint samplerate, buffer_size; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; pthread_mutex_unlock(channel_mutex); /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* get presets */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, &buffer_size, NULL); pthread_mutex_unlock(soundcard_mutex); /* set buffer size and samplerate */ pthread_mutex_lock(channel_mutex); g_object_set(channel, "samplerate", samplerate, "buffer-size", buffer_size, NULL); pthread_mutex_unlock(channel_mutex); } void ags_set_buffer_size_audio(AgsSetBufferSize *set_buffer_size, AgsAudio *audio) { AgsChannel *input, *output; AgsChannel *channel; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; pthread_mutex_unlock(audio_mutex); /* AgsOutput */ channel = output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* set buffer size */ ags_set_buffer_size_channel(set_buffer_size, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* AgsInput */ channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* set buffer size */ ags_set_buffer_size_channel(set_buffer_size, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } void ags_set_buffer_size_soundcard(AgsSetBufferSize *set_buffer_size, GObject *soundcard) { AgsThread *main_loop; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *list_start, *list; gdouble thread_frequency; guint channels; guint samplerate; guint buffer_size; guint format; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(soundcard)); /* get main loop and soundcard mutex */ pthread_mutex_lock(application_mutex); main_loop = application_context->main_loop; soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* set buffer size */ pthread_mutex_lock(soundcard); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), &channels, &samplerate, &buffer_size, &format); pthread_mutex_unlock(soundcard); /* reset soundcards */ pthread_mutex_lock(application_mutex); list = list_start = g_list_copy(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context))); pthread_mutex_unlock(application_mutex); if(soundcard == list->data){ /* reset soundcards if applied to first soundcard */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_set_presets(AGS_SOUNDCARD(soundcard), channels, samplerate, set_buffer_size->buffer_size, format); pthread_mutex_unlock(soundcard_mutex); while(list != NULL){ if(list->data != soundcard){ guint target_channels; guint target_samplerate; guint target_buffer_size; guint target_format; /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) list->data); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(soundcard_mutex); ags_soundcard_get_presets(AGS_SOUNDCARD(list->data), &target_channels, &target_samplerate, &target_buffer_size, &target_format); ags_soundcard_set_presets(AGS_SOUNDCARD(soundcard), target_channels, target_samplerate, set_buffer_size->buffer_size * (target_samplerate / samplerate), target_format); pthread_mutex_unlock(soundcard_mutex); } list = list->next; } /* reset thread frequency */ thread_frequency = samplerate / set_buffer_size->buffer_size + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; ags_main_loop_change_frequency(AGS_MAIN_LOOP(main_loop), thread_frequency); }else{ g_warning("buffer size can only adjusted of your very first soundcard"); } g_list_free(list_start); /* AgsAudio */ pthread_mutex_lock(application_mutex); list_start = list = g_list_copy(ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard))); pthread_mutex_unlock(application_mutex); while(list != NULL){ ags_set_buffer_size_audio(set_buffer_size, AGS_AUDIO(list->data)); list = list->next; } g_list_free(list_start); } /** * ags_set_buffer_size_new: * @scope: the #GObject to reset * @buffer_size: the new buffer size * * Creates an #AgsSetBufferSize. * * Returns: an new #AgsSetBufferSize. * * Since: 1.0.0 */ AgsSetBufferSize* ags_set_buffer_size_new(GObject *scope, guint buffer_size) { AgsSetBufferSize *set_buffer_size; set_buffer_size = (AgsSetBufferSize *) g_object_new(AGS_TYPE_SET_BUFFER_SIZE, "scope", scope, "buffer-size", buffer_size, NULL); return(set_buffer_size); } gsequencer-1.4.24/ags/audio/task/ags_add_region_to_selection.c0000644000175000017500000003342013247044247021352 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_add_region_to_selection_class_init(AgsAddRegionToSelectionClass *add_region_to_selection); void ags_add_region_to_selection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_region_to_selection_init(AgsAddRegionToSelection *add_region_to_selection); void ags_add_region_to_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_add_region_to_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_add_region_to_selection_connect(AgsConnectable *connectable); void ags_add_region_to_selection_disconnect(AgsConnectable *connectable); void ags_add_region_to_selection_dispose(GObject *gobject); void ags_add_region_to_selection_finalize(GObject *gobject); void ags_add_region_to_selection_launch(AgsTask *task); enum{ PROP_0, PROP_AUDIO, PROP_NOTATION, PROP_X0, PROP_X1, PROP_Y0, PROP_Y1, PROP_REPLACE_CURRENT_SELECTION, }; /** * SECTION:ags_add_region_to_selection * @short_description: add region to notation selection * @title: AgsAddRegionToSelection * @section_id: * @include: ags/audio/task/ags_add_region_to_selection.h * * The #AgsAddRegionToSelection task adds the specified #AgsNote to selection of #AgsNotation. */ static gpointer ags_add_region_to_selection_parent_class = NULL; static AgsConnectableInterface *ags_add_region_to_selection_parent_connectable_interface; GType ags_add_region_to_selection_get_type() { static GType ags_type_add_region_to_selection = 0; if(!ags_type_add_region_to_selection){ static const GTypeInfo ags_add_region_to_selection_info = { sizeof (AgsAddRegionToSelectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_region_to_selection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddRegionToSelection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_region_to_selection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_region_to_selection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_region_to_selection = g_type_register_static(AGS_TYPE_TASK, "AgsAddRegionToSelection", &ags_add_region_to_selection_info, 0); g_type_add_interface_static(ags_type_add_region_to_selection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_region_to_selection); } void ags_add_region_to_selection_class_init(AgsAddRegionToSelectionClass *add_region_to_selection) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_add_region_to_selection_parent_class = g_type_class_peek_parent(add_region_to_selection); /* gobject */ gobject = (GObjectClass *) add_region_to_selection; gobject->set_property = ags_add_region_to_selection_set_property; gobject->get_property = ags_add_region_to_selection_get_property; gobject->dispose = ags_add_region_to_selection_dispose; gobject->finalize = ags_add_region_to_selection_finalize; /* properties */ /** * AgsAddRegionToSelection:audio: * * The assigned #AgsAudio * * Since: 1.2.2 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of notation"), i18n_pspec("The audio of notation"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsAddRegionToSelection:notation: * * The assigned #AgsNotation * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("notation of add note"), i18n_pspec("The notation of add note task"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsAddRegionToSelection:x0: * * Note offset x0. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x0", i18n_pspec("offset x0"), i18n_pspec("The x0 offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X0, param_spec); /** * AgsAddRegionToSelection:x1: * * Note offset x1. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x1", i18n_pspec("offset x1"), i18n_pspec("The x1 offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X1, param_spec); /** * AgsAddRegionToSelection:y0: * * Note offset y0. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("y0", i18n_pspec("offset y0"), i18n_pspec("The y0 offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y0, param_spec); /** * AgsAddRegionToSelection:y1: * * Note offset y1. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("y1", i18n_pspec("offset y1"), i18n_pspec("The y1 offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y1, param_spec); /** * AgsAddRegionToSelection:replace-current-selection: * * The notation's replace-current-selection. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("replace-current-selection", i18n_pspec("replace current selection"), i18n_pspec("Replace current selection of notation"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_REPLACE_CURRENT_SELECTION, param_spec); /* task */ task = (AgsTaskClass *) add_region_to_selection; task->launch = ags_add_region_to_selection_launch; } void ags_add_region_to_selection_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_region_to_selection_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_region_to_selection_connect; connectable->disconnect = ags_add_region_to_selection_disconnect; } void ags_add_region_to_selection_init(AgsAddRegionToSelection *add_region_to_selection) { add_region_to_selection->audio = NULL; add_region_to_selection->notation = NULL; add_region_to_selection->x0 = 0; add_region_to_selection->y0 = 0; add_region_to_selection->x1 = 0; add_region_to_selection->y1 = 0; add_region_to_selection->replace_current_selection = TRUE; } void ags_add_region_to_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAddRegionToSelection *add_region_to_selection; add_region_to_selection = AGS_ADD_REGION_TO_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(add_region_to_selection->audio == (GObject *) audio){ return; } if(add_region_to_selection->audio != NULL){ g_object_unref(add_region_to_selection->audio); } if(audio != NULL){ g_object_ref(audio); } add_region_to_selection->audio = (GObject *) audio; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(add_region_to_selection->notation == (GObject *) notation){ return; } if(add_region_to_selection->notation != NULL){ g_object_unref(add_region_to_selection->notation); } if(notation != NULL){ g_object_ref(notation); } add_region_to_selection->notation = (GObject *) notation; } break; case PROP_X0: { add_region_to_selection->x0 = g_value_get_uint(value); } break; case PROP_X1: { add_region_to_selection->x1 = g_value_get_uint(value); } break; case PROP_Y0: { add_region_to_selection->y0 = g_value_get_uint(value); } break; case PROP_Y1: { add_region_to_selection->y1 = g_value_get_uint(value); } break; case PROP_REPLACE_CURRENT_SELECTION: { add_region_to_selection->replace_current_selection = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_region_to_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAddRegionToSelection *add_region_to_selection; add_region_to_selection = AGS_ADD_REGION_TO_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, add_region_to_selection->audio); } break; case PROP_NOTATION: { g_value_set_object(value, add_region_to_selection->notation); } break; case PROP_X0: { g_value_set_uint(value, add_region_to_selection->x0); } break; case PROP_X1: { g_value_set_uint(value, add_region_to_selection->x1); } break; case PROP_Y0: { g_value_set_uint(value, add_region_to_selection->y0); } break; case PROP_Y1: { g_value_set_uint(value, add_region_to_selection->y1); } break; case PROP_REPLACE_CURRENT_SELECTION: { g_value_set_boolean(value, add_region_to_selection->replace_current_selection); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_region_to_selection_connect(AgsConnectable *connectable) { ags_add_region_to_selection_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_region_to_selection_disconnect(AgsConnectable *connectable) { ags_add_region_to_selection_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_region_to_selection_dispose(GObject *gobject) { AgsAddRegionToSelection *add_region_to_selection; add_region_to_selection = AGS_ADD_REGION_TO_SELECTION(gobject); if(add_region_to_selection->audio != NULL){ g_object_unref(add_region_to_selection->audio); add_region_to_selection->audio = NULL; } if(add_region_to_selection->notation != NULL){ g_object_unref(add_region_to_selection->notation); add_region_to_selection->notation = NULL; } /* call parent */ G_OBJECT_CLASS(ags_add_region_to_selection_parent_class)->dispose(gobject); } void ags_add_region_to_selection_finalize(GObject *gobject) { AgsAddRegionToSelection *add_region_to_selection; add_region_to_selection = AGS_ADD_REGION_TO_SELECTION(gobject); if(add_region_to_selection->audio != NULL){ g_object_unref(add_region_to_selection->audio); } if(add_region_to_selection->notation != NULL){ g_object_unref(add_region_to_selection->notation); } /* call parent */ G_OBJECT_CLASS(ags_add_region_to_selection_parent_class)->finalize(gobject); } void ags_add_region_to_selection_launch(AgsTask *task) { AgsAddRegionToSelection *add_region_to_selection; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); add_region_to_selection = AGS_ADD_REGION_TO_SELECTION(task); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) add_region_to_selection->audio); pthread_mutex_unlock(application_mutex); /* add region to selection */ pthread_mutex_lock(audio_mutex); ags_notation_add_region_to_selection(add_region_to_selection->notation, add_region_to_selection->x0, add_region_to_selection->y0, add_region_to_selection->x1, add_region_to_selection->y1, add_region_to_selection->replace_current_selection); pthread_mutex_unlock(audio_mutex); } /** * ags_add_region_to_selection_new: * @notation: the #AgsNotation providing the selection * @x0: start x coordinate * @y0: start y coordinate * @x1: end x coordinate * @y1: end y coordinate * @replace_current_selection: if %TRUE new selection is created, otherwise added to current * * Creates an #AgsAddRegionToSelection. * * Returns: an new #AgsAddRegionToSelection. * * Since: 1.0.0 */ AgsAddRegionToSelection* ags_add_region_to_selection_new(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1, gboolean replace_current_selection) { AgsAddRegionToSelection *add_region_to_selection; add_region_to_selection = (AgsAddRegionToSelection *) g_object_new(AGS_TYPE_ADD_REGION_TO_SELECTION, "notation", notation, "x0", x0, "y0", y0, "x1", x1, "y1", y1, "replace-current-selection", replace_current_selection, NULL); return(add_region_to_selection); } gsequencer-1.4.24/ags/audio/task/ags_cancel_audio.h0000644000175000017500000000405013247044247017120 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CANCEL_AUDIO_H__ #define __AGS_CANCEL_AUDIO_H__ #include #include #include #include #define AGS_TYPE_CANCEL_AUDIO (ags_cancel_audio_get_type()) #define AGS_CANCEL_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CANCEL_AUDIO, AgsCancelAudio)) #define AGS_CANCEL_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CANCEL_AUDIO, AgsCancelAudioClass)) #define AGS_IS_CANCEL_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CANCEL_AUDIO)) #define AGS_IS_CANCEL_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CANCEL_AUDIO)) #define AGS_CANCEL_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CANCEL_AUDIO, AgsCancelAudioClass)) typedef struct _AgsCancelAudio AgsCancelAudio; typedef struct _AgsCancelAudioClass AgsCancelAudioClass; struct _AgsCancelAudio { AgsTask task; AgsAudio *audio; gboolean do_playback; gboolean do_sequencer; gboolean do_notation; }; struct _AgsCancelAudioClass { AgsTaskClass task; }; GType ags_cancel_audio_get_type(); AgsCancelAudio* ags_cancel_audio_new(AgsAudio *audio, gboolean do_playback, gboolean do_sequencer, gboolean do_notation); #endif /*__AGS_CANCEL_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/task/ags_add_soundcard.h0000644000175000017500000000405013247044247017304 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_SOUNDCARD_H__ #define __AGS_ADD_SOUNDCARD_H__ #include #include #include #include #define AGS_TYPE_ADD_SOUNDCARD (ags_add_soundcard_get_type()) #define AGS_ADD_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_SOUNDCARD, AgsAddSoundcard)) #define AGS_ADD_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_SOUNDCARD, AgsAddSoundcardClass)) #define AGS_IS_ADD_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_SOUNDCARD)) #define AGS_IS_ADD_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_SOUNDCARD)) #define AGS_ADD_SOUNDCARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_SOUNDCARD, AgsAddSoundcardClass)) typedef struct _AgsAddSoundcard AgsAddSoundcard; typedef struct _AgsAddSoundcardClass AgsAddSoundcardClass; struct _AgsAddSoundcard { AgsTask task; AgsApplicationContext *application_context; GObject *soundcard; }; struct _AgsAddSoundcardClass { AgsTaskClass task; }; GType ags_add_soundcard_get_type(); AgsAddSoundcard* ags_add_soundcard_new(AgsApplicationContext *application_context, GObject *soundcard); #endif /*__AGS_ADD_SOUNDCARD_H__*/ gsequencer-1.4.24/ags/audio/task/ags_free_selection.h0000644000175000017500000000401313247044247017477 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_FREE_SELECTION_H__ #define __AGS_FREE_SELECTION_H__ #include #include #include #include #include #define AGS_TYPE_FREE_SELECTION (ags_free_selection_get_type()) #define AGS_FREE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_FREE_SELECTION, AgsFreeSelection)) #define AGS_FREE_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_FREE_SELECTION, AgsFreeSelectionClass)) #define AGS_IS_FREE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_FREE_SELECTION)) #define AGS_IS_FREE_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_FREE_SELECTION)) #define AGS_FREE_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_FREE_SELECTION, AgsFreeSelectionClass)) typedef struct _AgsFreeSelection AgsFreeSelection; typedef struct _AgsFreeSelectionClass AgsFreeSelectionClass; struct _AgsFreeSelection { AgsTask task; AgsAudio *audio; AgsNotation *notation; }; struct _AgsFreeSelectionClass { AgsTaskClass task; }; GType ags_free_selection_get_type(); AgsFreeSelection* ags_free_selection_new(AgsNotation *notation); #endif /*__AGS_FREE_SELECTION_H__*/ gsequencer-1.4.24/ags/audio/task/ags_set_input_device.c0000644000175000017500000002307013247044247020041 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_set_input_device_class_init(AgsSetInputDeviceClass *set_input_device); void ags_set_input_device_connectable_interface_init(AgsConnectableInterface *connectable); void ags_set_input_device_init(AgsSetInputDevice *set_input_device); void ags_set_input_device_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_set_input_device_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_set_input_device_connect(AgsConnectable *connectable); void ags_set_input_device_disconnect(AgsConnectable *connectable); void ags_set_input_device_dispose(GObject *gobject); void ags_set_input_device_finalize(GObject *gobject); void ags_set_input_device_launch(AgsTask *task); /** * SECTION:ags_set_input_device * @short_description: resets sequencer * @title: AgsSetInputDevice * @section_id: * @include: ags/audio/task/ags_set_input_device.h * * The #AgsSetInputDevice task resets sequencer of #AgsSequencer. */ static gpointer ags_set_input_device_parent_class = NULL; static AgsConnectableInterface *ags_set_input_device_parent_connectable_interface; enum{ PROP_0, PROP_SEQUENCER, PROP_DEVICE, }; GType ags_set_input_device_get_type() { static GType ags_type_set_input_device = 0; if(!ags_type_set_input_device){ static const GTypeInfo ags_set_input_device_info = { sizeof (AgsSetInputDeviceClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_set_input_device_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSetInputDevice), 0, /* n_preallocs */ (GInstanceInitFunc) ags_set_input_device_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_set_input_device_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_set_input_device = g_type_register_static(AGS_TYPE_TASK, "AgsSetInputDevice", &ags_set_input_device_info, 0); g_type_add_interface_static(ags_type_set_input_device, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_set_input_device); } void ags_set_input_device_class_init(AgsSetInputDeviceClass *set_input_device) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_set_input_device_parent_class = g_type_class_peek_parent(set_input_device); /* gobject */ gobject = (GObjectClass *) set_input_device; gobject->set_property = ags_set_input_device_set_property; gobject->get_property = ags_set_input_device_get_property; gobject->dispose = ags_set_input_device_dispose; gobject->finalize = ags_set_input_device_finalize; /* properties */ /** * AgsSetInputDevice:sequencer: * * The assigned #AgsSequencer instance. * * Since: 1.0.0 */ param_spec = g_param_spec_object("sequencer", i18n_pspec("sequencer of set audio channels"), i18n_pspec("The sequencer of set audio channels"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER, param_spec); /** * AgsSetInputDevice:device: * * The sequencer indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("device identifier"), i18n_pspec("The device identifier to set"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /* task */ task = (AgsTaskClass *) set_input_device; task->launch = ags_set_input_device_launch; } void ags_set_input_device_connectable_interface_init(AgsConnectableInterface *connectable) { ags_set_input_device_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_set_input_device_connect; connectable->disconnect = ags_set_input_device_disconnect; } void ags_set_input_device_init(AgsSetInputDevice *set_input_device) { set_input_device->sequencer = NULL; set_input_device->device = NULL; } void ags_set_input_device_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSetInputDevice *set_input_device; set_input_device = AGS_SET_INPUT_DEVICE(gobject); switch(prop_id){ case PROP_SEQUENCER: { GObject *sequencer; sequencer = (GObject *) g_value_get_object(value); if(set_input_device->sequencer == (GObject *) sequencer){ return; } if(set_input_device->sequencer != NULL){ g_object_unref(set_input_device->sequencer); } if(sequencer != NULL){ g_object_ref(sequencer); } set_input_device->sequencer = (GObject *) sequencer; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); if(device == set_input_device->device){ return; } if(set_input_device->device != NULL){ g_free(set_input_device->device); } set_input_device->device = g_strdup(device); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_input_device_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSetInputDevice *set_input_device; set_input_device = AGS_SET_INPUT_DEVICE(gobject); switch(prop_id){ case PROP_SEQUENCER: { g_value_set_object(value, set_input_device->sequencer); } break; case PROP_DEVICE: { g_value_set_string(value, set_input_device->device); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_input_device_connect(AgsConnectable *connectable) { ags_set_input_device_parent_connectable_interface->connect(connectable); /* empty */ } void ags_set_input_device_disconnect(AgsConnectable *connectable) { ags_set_input_device_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_set_input_device_dispose(GObject *gobject) { AgsSetInputDevice *set_input_device; set_input_device = AGS_SET_INPUT_DEVICE(gobject); if(set_input_device->sequencer != NULL){ g_object_unref(set_input_device->sequencer); set_input_device->sequencer = NULL; } if(set_input_device->device != NULL){ g_free(set_input_device->device); set_input_device->device = NULL; } /* call parent */ G_OBJECT_CLASS(ags_set_input_device_parent_class)->dispose(gobject); } void ags_set_input_device_finalize(GObject *gobject) { AgsSetInputDevice *set_input_device; set_input_device = AGS_SET_INPUT_DEVICE(gobject); if(set_input_device->sequencer != NULL){ g_object_unref(set_input_device->sequencer); } if(set_input_device->device != NULL){ g_free(set_input_device->device); } /* call parent */ G_OBJECT_CLASS(ags_set_input_device_parent_class)->finalize(gobject); } void ags_set_input_device_launch(AgsTask *task) { AgsSetInputDevice *set_input_device; AgsMutexManager *mutex_manager; GObject *sequencer; char *device; pthread_mutex_t *application_mutex; pthread_mutex_t *sequencer_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); set_input_device = AGS_SET_INPUT_DEVICE(task); sequencer = set_input_device->sequencer; device = set_input_device->device; /* get sequencer mutex */ pthread_mutex_lock(application_mutex); sequencer_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) sequencer); pthread_mutex_unlock(application_mutex); /* set device */ pthread_mutex_lock(sequencer_mutex); if(AGS_IS_MIDIIN(sequencer) && (AGS_MIDIIN_ALSA & (AGS_MIDIIN(sequencer)->flags)) != 0){ if(index(device, ',') == NULL){ gchar *tmp; tmp = g_strdup_printf("%s,0", device); g_free(device); device = tmp; } } /* perform task */ ags_sequencer_set_device(AGS_SEQUENCER(sequencer), device); pthread_mutex_unlock(sequencer_mutex); } /** * ags_set_input_device_new: * @sequencer: the #AgsSequencer to reset * @device: the new sequencer * * Creates an #AgsSetInputDevice. * * Returns: an new #AgsSetInputDevice. * * Since: 1.0.0 */ AgsSetInputDevice* ags_set_input_device_new(GObject *sequencer, char *device) { AgsSetInputDevice *set_input_device; set_input_device = (AgsSetInputDevice *) g_object_new(AGS_TYPE_SET_INPUT_DEVICE, "sequencer", sequencer, "device", device, NULL); return(set_input_device); } gsequencer-1.4.24/ags/audio/task/ags_set_samplerate.c0000644000175000017500000004100213247044247017513 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_set_samplerate_class_init(AgsSetSamplerateClass *set_samplerate); void ags_set_samplerate_connectable_interface_init(AgsConnectableInterface *connectable); void ags_set_samplerate_init(AgsSetSamplerate *set_samplerate); void ags_set_samplerate_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_set_samplerate_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_set_samplerate_connect(AgsConnectable *connectable); void ags_set_samplerate_disconnect(AgsConnectable *connectable); void ags_set_samplerate_dispose(GObject *gobject); void ags_set_samplerate_finalize(GObject *gobject); void ags_set_samplerate_launch(AgsTask *task); void ags_set_samplerate_audio_signal(AgsSetSamplerate *set_samplerate, AgsAudioSignal *audio_signal); void ags_set_samplerate_recycling(AgsSetSamplerate *set_samplerate, AgsRecycling *recycling); void ags_set_samplerate_channel(AgsSetSamplerate *set_samplerate, AgsChannel *channel); void ags_set_samplerate_audio(AgsSetSamplerate *set_samplerate, AgsAudio *audio); void ags_set_samplerate_soundcard(AgsSetSamplerate *set_samplerate, GObject *soundcard); /** * SECTION:ags_set_samplerate * @short_description: modifies samplerate * @title: AgsSetSamplerate * @section_id: * @include: ags/audio/task/ags_set_samplerate.h * * The #AgsSetSamplerate task modifies samplerate of #AgsSoundcard. */ static gpointer ags_set_samplerate_parent_class = NULL; static AgsConnectableInterface *ags_set_samplerate_parent_connectable_interface; enum{ PROP_0, PROP_SCOPE, PROP_SAMPLERATE, }; GType ags_set_samplerate_get_type() { static GType ags_type_set_samplerate = 0; if(!ags_type_set_samplerate){ static const GTypeInfo ags_set_samplerate_info = { sizeof (AgsSetSamplerateClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_set_samplerate_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSetSamplerate), 0, /* n_preallocs */ (GInstanceInitFunc) ags_set_samplerate_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_set_samplerate_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_set_samplerate = g_type_register_static(AGS_TYPE_TASK, "AgsSetSamplerate", &ags_set_samplerate_info, 0); g_type_add_interface_static(ags_type_set_samplerate, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_set_samplerate); } void ags_set_samplerate_class_init(AgsSetSamplerateClass *set_samplerate) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_set_samplerate_parent_class = g_type_class_peek_parent(set_samplerate); /* gobject */ gobject = (GObjectClass *) set_samplerate; gobject->set_property = ags_set_samplerate_set_property; gobject->get_property = ags_set_samplerate_get_property; gobject->dispose = ags_set_samplerate_dispose; gobject->finalize = ags_set_samplerate_finalize; /* properties */ /** * AgsSetSamplerate:scope: * * The assigned #GObject as scope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("scope", i18n_pspec("scope of set samplerate"), i18n_pspec("The scope of set samplerate"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCOPE, param_spec); /** * AgsSetSamplerate:samplerate: * * The samplerate to apply to scope. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("samplerate"), i18n_pspec("The samplerate to apply"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /* task */ task = (AgsTaskClass *) set_samplerate; task->launch = ags_set_samplerate_launch; } void ags_set_samplerate_connectable_interface_init(AgsConnectableInterface *connectable) { ags_set_samplerate_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_set_samplerate_connect; connectable->disconnect = ags_set_samplerate_disconnect; } void ags_set_samplerate_init(AgsSetSamplerate *set_samplerate) { set_samplerate->scope = NULL; set_samplerate->samplerate = 44100; } void ags_set_samplerate_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSetSamplerate *set_samplerate; set_samplerate = AGS_SET_SAMPLERATE(gobject); switch(prop_id){ case PROP_SCOPE: { GObject *scope; scope = (GObject *) g_value_get_object(value); if(set_samplerate->scope == (GObject *) scope){ return; } if(set_samplerate->scope != NULL){ g_object_unref(set_samplerate->scope); } if(scope != NULL){ g_object_ref(scope); } set_samplerate->scope = (GObject *) scope; } break; case PROP_SAMPLERATE: { set_samplerate->samplerate = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_samplerate_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSetSamplerate *set_samplerate; set_samplerate = AGS_SET_SAMPLERATE(gobject); switch(prop_id){ case PROP_SCOPE: { g_value_set_object(value, set_samplerate->scope); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, set_samplerate->samplerate); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_samplerate_connect(AgsConnectable *connectable) { ags_set_samplerate_parent_connectable_interface->connect(connectable); /* empty */ } void ags_set_samplerate_disconnect(AgsConnectable *connectable) { ags_set_samplerate_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_set_samplerate_dispose(GObject *gobject) { AgsSetSamplerate *set_samplerate; set_samplerate = AGS_SET_SAMPLERATE(gobject); if(set_samplerate->scope != NULL){ g_object_unref(set_samplerate->scope); set_samplerate->scope = NULL; } /* call parent */ G_OBJECT_CLASS(ags_set_samplerate_parent_class)->dispose(gobject); } void ags_set_samplerate_finalize(GObject *gobject) { AgsSetSamplerate *set_samplerate; set_samplerate = AGS_SET_SAMPLERATE(gobject); if(set_samplerate->scope != NULL){ g_object_unref(set_samplerate->scope); } /* call parent */ G_OBJECT_CLASS(ags_set_samplerate_parent_class)->finalize(gobject); } void ags_set_samplerate_launch(AgsTask *task) { AgsSetSamplerate *set_samplerate; GObject *scope; set_samplerate = AGS_SET_SAMPLERATE(task); scope = set_samplerate->scope; if(AGS_IS_SOUNDCARD(scope)){ ags_set_samplerate_soundcard(set_samplerate, scope); }else if(AGS_IS_AUDIO(scope)){ ags_set_samplerate_audio(set_samplerate, AGS_AUDIO(scope)); }else if(AGS_IS_CHANNEL(scope)){ ags_set_samplerate_channel(set_samplerate, AGS_CHANNEL(scope)); }else if(AGS_IS_RECYCLING(scope)){ ags_set_samplerate_recycling(set_samplerate, AGS_RECYCLING(scope)); }else if(AGS_IS_AUDIO_SIGNAL(scope)){ ags_set_samplerate_audio_signal(set_samplerate, AGS_AUDIO_SIGNAL(scope)); } } void ags_set_samplerate_audio_signal(AgsSetSamplerate *set_samplerate, AgsAudioSignal *audio_signal) { ags_audio_signal_set_samplerate(audio_signal, set_samplerate->samplerate); } void ags_set_samplerate_recycling(AgsSetSamplerate *set_samplerate, AgsRecycling *recycling) { AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* set buffer size audio signal */ pthread_mutex_lock(recycling_mutex); list = recycling->audio_signal; while(list != NULL){ ags_set_samplerate_audio_signal(set_samplerate, AGS_AUDIO_SIGNAL(list->data)); list = list->next; } pthread_mutex_unlock(recycling_mutex); } void ags_set_samplerate_channel(AgsSetSamplerate *set_samplerate, AgsChannel *channel) { GObject *soundcard; AgsMutexManager *mutex_manager; guint samplerate, buffer_size; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; pthread_mutex_unlock(channel_mutex); /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* get presets */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, &buffer_size, NULL); pthread_mutex_unlock(soundcard_mutex); /* set buffer size and samplerate */ pthread_mutex_lock(channel_mutex); g_object_set(channel, "samplerate", samplerate, "buffer-size", buffer_size, NULL); pthread_mutex_unlock(channel_mutex); } void ags_set_samplerate_audio(AgsSetSamplerate *set_samplerate, AgsAudio *audio) { AgsChannel *input, *output; AgsChannel *channel; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; pthread_mutex_unlock(audio_mutex); /* AgsOutput */ channel = output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* set samplerate */ ags_set_samplerate_channel(set_samplerate, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* AgsInput */ channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* set samplerate */ ags_set_samplerate_channel(set_samplerate, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } void ags_set_samplerate_soundcard(AgsSetSamplerate *set_samplerate, GObject *soundcard) { AgsThread *main_loop; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *list_start, *list; gdouble thread_frequency; guint channels; guint samplerate; guint buffer_size; guint format; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(soundcard)); /* get main loop and soundcard mutex */ pthread_mutex_lock(application_mutex); main_loop = application_context->main_loop; soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* set samplerate */ pthread_mutex_lock(soundcard); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), &channels, &samplerate, &buffer_size, &format); pthread_mutex_unlock(soundcard); /* reset soundcards */ pthread_mutex_lock(application_mutex); list = list_start = g_list_copy(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context))); pthread_mutex_unlock(application_mutex); if(soundcard == list->data){ /* reset soundcards if applied to first soundcard */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_set_presets(AGS_SOUNDCARD(soundcard), channels, set_samplerate->samplerate, buffer_size, format); pthread_mutex_unlock(soundcard_mutex); /* reset depending soundcards */ while(list != NULL){ if(list->data != soundcard){ guint target_channels; guint target_samplerate; guint target_buffer_size; guint target_format; /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) list->data); pthread_mutex_unlock(application_mutex); pthread_mutex_lock(soundcard_mutex); ags_soundcard_get_presets(AGS_SOUNDCARD(list->data), &target_channels, &target_samplerate, &target_buffer_size, &target_format); ags_soundcard_set_presets(AGS_SOUNDCARD(soundcard), target_channels, target_samplerate, buffer_size * (target_samplerate / set_samplerate->samplerate), target_format); pthread_mutex_unlock(soundcard_mutex); } list = list->next; } /* reset thread frequency */ thread_frequency = set_samplerate->samplerate / buffer_size + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; ags_main_loop_change_frequency(main_loop, thread_frequency); }else{ /* it is not first soundcard */ ags_soundcard_set_presets(AGS_SOUNDCARD(soundcard), channels, set_samplerate->samplerate, buffer_size * (samplerate / set_samplerate->samplerate), format); } g_list_free(list_start); /* AgsAudio */ list = list_start = g_list_copy(ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard))); while(list != NULL){ ags_set_samplerate_audio(set_samplerate, AGS_AUDIO(list->data)); list = list->next; } g_list_free(list_start); } /** * ags_set_samplerate_new: * @scope: the #AgsSoundcard to reset * @samplerate: the new samplerate * * Creates an #AgsSetSamplerate. * * Returns: an new #AgsSetSamplerate. * * Since: 1.0.0 */ AgsSetSamplerate* ags_set_samplerate_new(GObject *scope, guint samplerate) { AgsSetSamplerate *set_samplerate; set_samplerate = (AgsSetSamplerate *) g_object_new(AGS_TYPE_SET_SAMPLERATE, "scope", scope, "samplerate", samplerate, NULL); return(set_samplerate); } gsequencer-1.4.24/ags/audio/task/ags_add_effect.c0000644000175000017500000002145513256163135016557 00000000000000/* 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 . */ #include #include void ags_add_effect_class_init(AgsAddEffectClass *add_effect); void ags_add_effect_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_effect_init(AgsAddEffect *add_effect); void ags_add_effect_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_add_effect_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_add_effect_connect(AgsConnectable *connectable); void ags_add_effect_disconnect(AgsConnectable *connectable); void ags_add_effect_dispose(GObject *gobject); void ags_add_effect_finalize(GObject *gobject); void ags_add_effect_launch(AgsTask *task); /** * SECTION:ags_add_effect * @short_description: add effect object to context * @title: AgsAddEffect * @section_id: * @include: ags/audio/task/ags_add_effect.h * * The #AgsAddEffect task adds the specified effect to #AgsChannel. */ static gpointer ags_add_effect_parent_class = NULL; static AgsConnectableInterface *ags_add_effect_parent_connectable_interface; enum{ PROP_0, PROP_CHANNEL, PROP_FILENAME, PROP_EFFECT, }; GType ags_add_effect_get_type() { static GType ags_type_add_effect = 0; if(!ags_type_add_effect){ static const GTypeInfo ags_add_effect_info = { sizeof (AgsAddEffectClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_effect_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddEffect), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_effect_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_effect_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_effect = g_type_register_static(AGS_TYPE_TASK, "AgsAddEffect", &ags_add_effect_info, 0); g_type_add_interface_static(ags_type_add_effect, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_effect); } void ags_add_effect_class_init(AgsAddEffectClass *add_effect) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_add_effect_parent_class = g_type_class_peek_parent(add_effect); /* gobject */ gobject = (GObjectClass *) add_effect; gobject->set_property = ags_add_effect_set_property; gobject->get_property = ags_add_effect_get_property; gobject->dispose = ags_add_effect_dispose; gobject->finalize = ags_add_effect_finalize; /* properties */ /** * AgsAddEffect:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel of add effect"), i18n_pspec("The channel of add effect task"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /** * AgsAddEffect:filename: * * The assigned filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the filename"), i18n_pspec("The filename containing the effect"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsAddEffect:effect: * * The assigned effect. * * Since: 1.0.0 */ param_spec = g_param_spec_string("effect", i18n_pspec("the effect"), i18n_pspec("The effect"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EFFECT, param_spec); /* task */ task = (AgsTaskClass *) add_effect; task->launch = ags_add_effect_launch; } void ags_add_effect_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_effect_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_effect_connect; connectable->disconnect = ags_add_effect_disconnect; } void ags_add_effect_init(AgsAddEffect *add_effect) { add_effect->channel = NULL; add_effect->filename = NULL; add_effect->effect = NULL; } void ags_add_effect_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAddEffect *add_effect; add_effect = AGS_ADD_EFFECT(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(add_effect->channel == (GObject *) channel){ return; } if(add_effect->channel != NULL){ g_object_unref(add_effect->channel); } if(channel != NULL){ g_object_ref(channel); } add_effect->channel = (GObject *) channel; } break; case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(add_effect->filename == filename){ return; } if(add_effect->filename != NULL){ g_free(add_effect->filename); } add_effect->filename = g_strdup(filename); } break; case PROP_EFFECT: { gchar *effect; effect = g_value_get_string(value); if(add_effect->effect == effect){ return; } if(add_effect->effect != NULL){ g_free(add_effect->effect); } add_effect->effect = g_strdup(effect); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_effect_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAddEffect *add_effect; add_effect = AGS_ADD_EFFECT(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, add_effect->channel); } break; case PROP_FILENAME: { g_value_set_string(value, add_effect->filename); } break; case PROP_EFFECT: { g_value_set_string(value, add_effect->effect); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_effect_connect(AgsConnectable *connectable) { ags_add_effect_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_effect_disconnect(AgsConnectable *connectable) { ags_add_effect_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_effect_dispose(GObject *gobject) { AgsAddEffect *add_effect; add_effect = AGS_ADD_EFFECT(gobject); if(add_effect->channel != NULL){ g_object_unref(add_effect->channel); add_effect->channel = NULL; } if(add_effect->filename != NULL){ g_free(add_effect->filename); add_effect->filename = NULL; } if(add_effect->effect != NULL){ g_free(add_effect->effect); add_effect->effect = NULL; } /* call parent */ G_OBJECT_CLASS(ags_add_effect_parent_class)->dispose(gobject); } void ags_add_effect_finalize(GObject *gobject) { AgsAddEffect *add_effect; add_effect = AGS_ADD_EFFECT(gobject); if(add_effect->channel != NULL){ g_object_unref(add_effect->channel); } g_free(add_effect->filename); g_free(add_effect->effect); /* call parent */ G_OBJECT_CLASS(ags_add_effect_parent_class)->finalize(gobject); } void ags_add_effect_launch(AgsTask *task) { AgsAddEffect *add_effect; add_effect = AGS_ADD_EFFECT(task); ags_channel_add_effect(add_effect->channel, add_effect->filename, add_effect->effect); } /** * ags_add_effect_new: * @channel: the #AgsChannel to set up the effect * @filename: the filename including @effect * @effect: the effect's name * * Creates an #AgsAddEffect. * * Returns: an new #AgsAddEffect. * * Since: 1.0.0 */ AgsAddEffect* ags_add_effect_new(AgsChannel *channel, gchar *filename, gchar *effect) { AgsAddEffect *add_effect; add_effect = (AgsAddEffect *) g_object_new(AGS_TYPE_ADD_EFFECT, "channel", channel, "filename", filename, "effect", effect, NULL); return(add_effect); } gsequencer-1.4.24/ags/audio/task/ags_notify_soundcard.h0000644000175000017500000000477213247044247020077 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_NOTIFY_SOUNDCARD_H__ #define __AGS_NOTIFY_SOUNDCARD_H__ #include #include #include #define AGS_TYPE_NOTIFY_SOUNDCARD (ags_notify_soundcard_get_type()) #define AGS_NOTIFY_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_NOTIFY_SOUNDCARD, AgsNotifySoundcard)) #define AGS_NOTIFY_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NOTIFY_SOUNDCARD, AgsNotifySoundcardClass)) #define AGS_IS_NOTIFY_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_NOTIFY_SOUNDCARD)) #define AGS_IS_NOTIFY_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_NOTIFY_SOUNDCARD)) #define AGS_NOTIFY_SOUNDCARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_NOTIFY_SOUNDCARD, AgsNotifySoundcardClass)) typedef struct _AgsNotifySoundcard AgsNotifySoundcard; typedef struct _AgsNotifySoundcardClass AgsNotifySoundcardClass; /** * AgsNotifySoundcardFlags: * @AGS_NOTIFY_SOUNDCARD_WAIT_RETURN: sync wait * @AGS_NOTIFY_SOUNDCARD_DONE_RETURN: sync done * * Enum values to control the behavior or indicate internal state of #AgsNotifySoundcard by * enable/disable as flags. */ typedef enum{ AGS_NOTIFY_SOUNDCARD_WAIT_RETURN = 1, AGS_NOTIFY_SOUNDCARD_DONE_RETURN = 1 << 1, }AgsNotifySoundcardFlags; struct _AgsNotifySoundcard { AgsTask task; volatile guint flags; pthread_mutexattr_t *return_mutexattr; pthread_mutex_t *return_mutex; pthread_cond_t *return_cond; GObject *soundcard_thread; }; struct _AgsNotifySoundcardClass { AgsTaskClass task; }; GType ags_notify_soundcard_get_type(); AgsNotifySoundcard* ags_notify_soundcard_new(GObject *soundcard_thread); #endif /*__AGS_NOTIFYo_SOUNDCARD_H__*/ gsequencer-1.4.24/ags/audio/task/ags_notify_soundcard.c0000644000175000017500000002422113247044247020061 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include void ags_notify_soundcard_class_init(AgsNotifySoundcardClass *notify_soundcard); void ags_notify_soundcard_connectable_interface_init(AgsConnectableInterface *connectable); void ags_notify_soundcard_init(AgsNotifySoundcard *notify_soundcard); void ags_notify_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_notify_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_notify_soundcard_connect(AgsConnectable *connectable); void ags_notify_soundcard_disconnect(AgsConnectable *connectable); void ags_notify_soundcard_dispose(GObject *gobject); void ags_notify_soundcard_finalize(GObject *gobject); void ags_notify_soundcard_launch(AgsTask *task); /** * SECTION:ags_notify_soundcard * @short_description: notify soundcard task * @title: AgsNotifySoundcard * @section_id: * @include: ags/audio/task/ags_notify_soundcard.h * * The #AgsNotifySoundcard task notifys soundcard. */ static gpointer ags_notify_soundcard_parent_class = NULL; static AgsConnectableInterface *ags_notify_soundcard_parent_connectable_interface; enum{ PROP_0, PROP_SOUNDCARD_THREAD, }; GType ags_notify_soundcard_get_type() { static GType ags_type_notify_soundcard = 0; if(!ags_type_notify_soundcard){ static const GTypeInfo ags_notify_soundcard_info = { sizeof (AgsNotifySoundcardClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_notify_soundcard_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsNotifySoundcard), 0, /* n_preallocs */ (GInstanceInitFunc) ags_notify_soundcard_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_notify_soundcard_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_notify_soundcard = g_type_register_static(AGS_TYPE_TASK, "AgsNotifySoundcard", &ags_notify_soundcard_info, 0); g_type_add_interface_static(ags_type_notify_soundcard, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_notify_soundcard); } void ags_notify_soundcard_class_init(AgsNotifySoundcardClass *notify_soundcard) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_notify_soundcard_parent_class = g_type_class_peek_parent(notify_soundcard); /* gobject */ gobject = (GObjectClass *) notify_soundcard; gobject->set_property = ags_notify_soundcard_set_property; gobject->get_property = ags_notify_soundcard_get_property; gobject->dispose = ags_notify_soundcard_dispose; gobject->finalize = ags_notify_soundcard_finalize; /* properties */ /** * AgsNotifySoundcard:soundcard-thread: * * The assigned #AgsSoundcardThread * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard-thread", i18n_pspec("soundcard thread of notify soundcard"), i18n_pspec("The soundcard thread of notify soundcard task"), AGS_TYPE_SOUNDCARD_THREAD, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD_THREAD, param_spec); /* task */ task = (AgsTaskClass *) notify_soundcard; task->launch = ags_notify_soundcard_launch; } void ags_notify_soundcard_connectable_interface_init(AgsConnectableInterface *connectable) { ags_notify_soundcard_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_notify_soundcard_connect; connectable->disconnect = ags_notify_soundcard_disconnect; } void ags_notify_soundcard_init(AgsNotifySoundcard *notify_soundcard) { notify_soundcard->return_mutexattr = (pthread_mutexattr_t *) malloc(sizeof(pthread_mutexattr_t)); pthread_mutexattr_init(notify_soundcard->return_mutexattr); pthread_mutexattr_settype(notify_soundcard->return_mutexattr, PTHREAD_MUTEX_RECURSIVE); #ifdef __linux__ pthread_mutexattr_setprotocol(notify_soundcard->return_mutexattr, PTHREAD_PRIO_INHERIT); #endif notify_soundcard->return_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t)); pthread_mutex_init(notify_soundcard->return_mutex, notify_soundcard->return_mutexattr); notify_soundcard->return_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t)); pthread_cond_init(notify_soundcard->return_cond, NULL); /* soundcard */ notify_soundcard->soundcard_thread = NULL; } void ags_notify_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsNotifySoundcard *notify_soundcard; notify_soundcard = AGS_NOTIFY_SOUNDCARD(gobject); switch(prop_id){ case PROP_SOUNDCARD_THREAD: { AgsSoundcardThread *soundcard_thread; soundcard_thread = (AgsSoundcardThread *) g_value_get_object(value); if(notify_soundcard->soundcard_thread == (GObject *) soundcard_thread){ return; } if(notify_soundcard->soundcard_thread != NULL){ g_object_unref(notify_soundcard->soundcard_thread); } if(soundcard_thread != NULL){ g_object_ref(soundcard_thread); } notify_soundcard->soundcard_thread = (GObject *) soundcard_thread; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notify_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsNotifySoundcard *notify_soundcard; notify_soundcard = AGS_NOTIFY_SOUNDCARD(gobject); switch(prop_id){ case PROP_SOUNDCARD_THREAD: { g_value_set_object(value, notify_soundcard->soundcard_thread); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_notify_soundcard_connect(AgsConnectable *connectable) { ags_notify_soundcard_parent_connectable_interface->connect(connectable); /* empty */ } void ags_notify_soundcard_disconnect(AgsConnectable *connectable) { ags_notify_soundcard_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_notify_soundcard_dispose(GObject *gobject) { AgsNotifySoundcard *notify_soundcard; notify_soundcard = AGS_NOTIFY_SOUNDCARD(gobject); if(notify_soundcard->soundcard_thread != NULL){ g_object_unref(notify_soundcard->soundcard_thread); notify_soundcard->soundcard_thread = NULL; } /* call parent */ G_OBJECT_CLASS(ags_notify_soundcard_parent_class)->dispose(gobject); } void ags_notify_soundcard_finalize(GObject *gobject) { AgsNotifySoundcard *notify_soundcard; notify_soundcard = AGS_NOTIFY_SOUNDCARD(gobject); pthread_mutex_destroy(notify_soundcard->return_mutex); free(notify_soundcard->return_mutex); pthread_cond_destroy(notify_soundcard->return_cond); free(notify_soundcard->return_cond); if(notify_soundcard->soundcard_thread != NULL){ g_object_unref(notify_soundcard->soundcard_thread); } /* call parent */ G_OBJECT_CLASS(ags_notify_soundcard_parent_class)->finalize(gobject); } void ags_notify_soundcard_launch(AgsTask *task) { AgsNotifySoundcard *notify_soundcard; AgsTaskThread *task_thread; AgsThread *soundcard_thread; notify_soundcard = AGS_NOTIFY_SOUNDCARD(task); soundcard_thread = AGS_THREAD(notify_soundcard->soundcard_thread); task_thread = AGS_TASK_THREAD(task->task_thread); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(soundcard_thread->flags)))) == 0 || (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(soundcard_thread->flags)))) != 0 || soundcard_thread->tic_delay != 0){ return; } /* release soundcard thread of async queue */ pthread_mutex_lock(task_thread->run_mutex); g_atomic_int_or(&(soundcard_thread->sync_flags), AGS_THREAD_DONE_ASYNC_QUEUE); if((AGS_THREAD_WAIT_ASYNC_QUEUE & (g_atomic_int_get(&(soundcard_thread->sync_flags)))) != 0){ pthread_cond_broadcast(task_thread->run_cond); } pthread_mutex_unlock(task_thread->run_mutex); /* wait to complete */ pthread_mutex_lock(notify_soundcard->return_mutex); if((AGS_NOTIFY_SOUNDCARD_DONE_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) == 0){ g_atomic_int_or(&(notify_soundcard->flags), AGS_NOTIFY_SOUNDCARD_WAIT_RETURN); while((AGS_NOTIFY_SOUNDCARD_WAIT_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) != 0 && (AGS_NOTIFY_SOUNDCARD_DONE_RETURN & (g_atomic_int_get(&(notify_soundcard->flags)))) == 0){ pthread_cond_wait(notify_soundcard->return_cond, notify_soundcard->return_mutex); } } g_atomic_int_and(&(notify_soundcard->flags), (~(AGS_NOTIFY_SOUNDCARD_WAIT_RETURN | AGS_NOTIFY_SOUNDCARD_DONE_RETURN))); pthread_mutex_unlock(notify_soundcard->return_mutex); } /** * ags_notify_soundcard_new: * @soundcard_thread: the #AgsSoundcardThread * * Creates an #AgsNotifySoundcard. * * Returns: an new #AgsNotifySoundcard. * * Since: 1.0.0 */ AgsNotifySoundcard* ags_notify_soundcard_new(GObject *soundcard_thread) { AgsNotifySoundcard *notify_soundcard; notify_soundcard = (AgsNotifySoundcard *) g_object_new(AGS_TYPE_NOTIFY_SOUNDCARD, "soundcard-thread", soundcard_thread, NULL); return(notify_soundcard); } gsequencer-1.4.24/ags/audio/task/ags_toggle_pattern_bit.h0000644000175000017500000000461513247044247020375 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_TOGGLE_PATTERN_BIT_H__ #define __AGS_TOGGLE_PATTERN_BIT_H__ #include #include #include #include #include #define AGS_TYPE_TOGGLE_PATTERN_BIT (ags_toggle_pattern_bit_get_type()) #define AGS_TOGGLE_PATTERN_BIT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TOGGLE_PATTERN_BIT, AgsTogglePatternBit)) #define AGS_TOGGLE_PATTERN_BIT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TOGGLE_PATTERN_BIT, AgsTogglePatternBitClass)) #define AGS_IS_TOGGLE_PATTERN_BIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_TOGGLE_PATTERN_BIT)) #define AGS_IS_TOGGLE_PATTERN_BIT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_TOGGLE_PATTERN_BIT)) #define AGS_TOGGLE_PATTERN_BIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_TOGGLE_PATTERN_BIT, AgsTogglePatternBitClass)) typedef struct _AgsTogglePatternBit AgsTogglePatternBit; typedef struct _AgsTogglePatternBitClass AgsTogglePatternBitClass; struct _AgsTogglePatternBit { AgsTask task; AgsChannel *channel; AgsPattern *pattern; guint line; guint index_i; guint index_j; guint bit; }; struct _AgsTogglePatternBitClass { AgsTaskClass task; void (*refresh_gui)(AgsTogglePatternBit *toggle_pattern_bit); }; GType ags_toggle_pattern_bit_get_type(); void ags_toggle_pattern_bit_refresh_gui(AgsTogglePatternBit *toggle_pattern_bit); AgsTogglePatternBit* ags_toggle_pattern_bit_new(AgsPattern *pattern, guint line, guint index_i, guint index_j, guint bit); #endif /*__AGS_TOGGLE_PATTERN_BIT_H__*/ gsequencer-1.4.24/ags/audio/task/ags_crop_note.c0000644000175000017500000003740713247044247016511 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_crop_note_class_init(AgsCropNoteClass *crop_note); void ags_crop_note_connectable_interface_init(AgsConnectableInterface *connectable); void ags_crop_note_init(AgsCropNote *crop_note); void ags_crop_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_crop_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_crop_note_connect(AgsConnectable *connectable); void ags_crop_note_disconnect(AgsConnectable *connectable); void ags_crop_note_dispose(GObject *gobject); void ags_crop_note_finalize(GObject *gobject); void ags_crop_note_launch(AgsTask *task); /** * SECTION:ags_crop_note * @short_description: crop notation * @title: AgsCropNote * @section_id: * @include: ags/audio/task/ags_crop_note.h * * The #AgsCropNote task crops #AgsNotation. */ static gpointer ags_crop_note_parent_class = NULL; static AgsConnectableInterface *ags_crop_note_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_NOTATION, PROP_SELECTION, PROP_X_PADDING, PROP_X_CROP, PROP_ABSOLUTE, PROP_IN_PLACE, PROP_DO_RESIZE, }; GType ags_crop_note_get_type() { static GType ags_type_crop_note = 0; if(!ags_type_crop_note){ static const GTypeInfo ags_crop_note_info = { sizeof (AgsCropNoteClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_crop_note_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCropNote), 0, /* n_preallocs */ (GInstanceInitFunc) ags_crop_note_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_crop_note_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_crop_note = g_type_register_static(AGS_TYPE_TASK, "AgsCropNote", &ags_crop_note_info, 0); g_type_add_interface_static(ags_type_crop_note, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_crop_note); } void ags_crop_note_class_init(AgsCropNoteClass *crop_note) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_crop_note_parent_class = g_type_class_peek_parent(crop_note); /* gobject */ gobject = (GObjectClass *) crop_note; gobject->set_property = ags_crop_note_set_property; gobject->get_property = ags_crop_note_get_property; gobject->dispose = ags_crop_note_dispose; gobject->finalize = ags_crop_note_finalize; /* properties */ /** * AgsCropNote:audio: * * The assigned #AgsAudio * * Since: 1.2.2 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of crop note"), i18n_pspec("The audio of crop note task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsCropNote:notation: * * The assigned #AgsNotation * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("notation of crop note"), i18n_pspec("The notation of crop note task"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsCropNote:selection: * * The assigned #AgsNote * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("selection", i18n_pspec("selection to crop"), i18n_pspec("The selection to crop"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SELECTION, param_spec); /** * AgsCropNote:x-padding: * * Crop notation with x padding. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x-padding", i18n_pspec("crop with x padding"), i18n_pspec("Crop the notation with x padding"), 0, AGS_CROP_NOTE_DEFAULT_X_LENGTH, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_PADDING, param_spec); /** * AgsCropNote:x-crop: * * Crop notation by x-crop amount. * * Since: 1.0.0 */ param_spec = g_param_spec_int("x-crop", i18n_pspec("crop with x-crop amount"), i18n_pspec("Crop the notation by x-crop amount"), -1 * AGS_CROP_NOTE_DEFAULT_X_LENGTH, AGS_CROP_NOTE_DEFAULT_X_LENGTH, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X_CROP, param_spec); /** * AgsCropNote:absolute: * * Crop notation by absolute position. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("absolute", i18n_pspec("crop absolute"), i18n_pspec("Crop the notation by absolute position"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ABSOLUTE, param_spec); /** * AgsCropNote:in-place: * * Crop notation in place. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("in-place", i18n_pspec("crop in place"), i18n_pspec("Crop the notation by in place"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_IN_PLACE, param_spec); /** * AgsCropNote:do-resize: * * Crop notation do resize. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-resize", i18n_pspec("crop do resize"), i18n_pspec("Crop the notation by do resize"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_RESIZE, param_spec); /* task */ task = (AgsTaskClass *) crop_note; task->launch = ags_crop_note_launch; } void ags_crop_note_connectable_interface_init(AgsConnectableInterface *connectable) { ags_crop_note_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_crop_note_connect; connectable->disconnect = ags_crop_note_disconnect; } void ags_crop_note_init(AgsCropNote *crop_note) { crop_note->audio = NULL; crop_note->notation = NULL; crop_note->selection = NULL; crop_note->x_padding = 0; crop_note->x_crop = 0; crop_note->absolute = FALSE; crop_note->in_place = FALSE; crop_note->do_resize = FALSE; } void ags_crop_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCropNote *crop_note; crop_note = AGS_CROP_NOTE(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(crop_note->audio == (GObject *) audio){ return; } if(crop_note->audio != NULL){ g_object_unref(crop_note->audio); } if(audio != NULL){ g_object_ref(audio); } crop_note->audio = (GObject *) audio; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(crop_note->notation == (GObject *) notation){ return; } if(crop_note->notation != NULL){ g_object_unref(crop_note->notation); } if(notation != NULL){ g_object_ref(notation); } crop_note->notation = (GObject *) notation; } break; case PROP_SELECTION: { GList *selection; selection = (GList *) g_value_get_pointer(value); if(crop_note->selection == selection){ return; } if(crop_note->selection != NULL){ g_list_free(crop_note->selection); } crop_note->selection = g_list_copy(selection); } break; case PROP_X_PADDING: { crop_note->x_padding = g_value_get_uint(value); } break; case PROP_X_CROP: { crop_note->x_crop = g_value_get_int(value); } break; case PROP_ABSOLUTE: { crop_note->absolute = g_value_get_boolean(value); } break; case PROP_IN_PLACE: { crop_note->in_place = g_value_get_boolean(value); } break; case PROP_DO_RESIZE: { crop_note->do_resize = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_crop_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCropNote *crop_note; crop_note = AGS_CROP_NOTE(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, crop_note->audio); } break; case PROP_NOTATION: { g_value_set_object(value, crop_note->notation); } break; case PROP_SELECTION: { g_value_set_pointer(value, g_list_copy(crop_note->selection)); } break; case PROP_X_PADDING: { g_value_set_uint(value, crop_note->x_padding); } break; case PROP_X_CROP: { g_value_set_int(value, crop_note->x_crop); } break; case PROP_ABSOLUTE: { g_value_set_boolean(value, crop_note->absolute); } break; case PROP_IN_PLACE: { g_value_set_boolean(value, crop_note->in_place); } break; case PROP_DO_RESIZE: { g_value_set_boolean(value, crop_note->do_resize); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_crop_note_connect(AgsConnectable *connectable) { ags_crop_note_parent_connectable_interface->connect(connectable); /* empty */ } void ags_crop_note_disconnect(AgsConnectable *connectable) { ags_crop_note_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_crop_note_dispose(GObject *gobject) { AgsCropNote *crop_note; crop_note = AGS_CROP_NOTE(gobject); if(crop_note->audio != NULL){ g_object_unref(crop_note->audio); crop_note->audio = NULL; } if(crop_note->notation != NULL){ g_object_unref(crop_note->notation); crop_note->notation = NULL; } if(crop_note->selection != NULL){ g_list_free(crop_note->selection); crop_note->selection = NULL; } /* call parent */ G_OBJECT_CLASS(ags_crop_note_parent_class)->dispose(gobject); } void ags_crop_note_finalize(GObject *gobject) { AgsCropNote *crop_note; crop_note = AGS_CROP_NOTE(gobject); if(crop_note->audio != NULL){ g_object_unref(crop_note->audio); } if(crop_note->notation != NULL){ g_object_unref(crop_note->notation); } if(crop_note->selection != NULL){ g_list_free(crop_note->selection); } /* call parent */ G_OBJECT_CLASS(ags_crop_note_parent_class)->finalize(gobject); } void ags_crop_note_launch(AgsTask *task) { AgsAudio *audio; AgsNotation *notation, *current_notation; AgsNote *note; AgsCropNote *crop_note; AgsMutexManager *mutex_manager; GList *selection; guint x_padding; gint x_crop; gint x_offset, x_prev; gboolean absolute; gboolean in_place; gboolean do_resize; gboolean initial_run; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); crop_note = AGS_CROP_NOTE(task); /* get some properties */ audio = crop_note->audio; notation = current_notation = crop_note->notation; selection = crop_note->selection; x_padding = crop_note->x_padding; x_crop = crop_note->x_crop; absolute = crop_note->absolute; in_place = crop_note->in_place; do_resize = crop_note->do_resize; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* crop */ x_offset = 0; x_prev = 0; initial_run = TRUE; pthread_mutex_lock(audio_mutex); while(selection != NULL){ note = ags_note_duplicate(AGS_NOTE(selection->data)); if(absolute){ if(in_place){ note->x[1] = note->x[0] + x_crop; }else if(do_resize){ if(initial_run){ x_offset = 0; x_prev = note->x[0]; initial_run = FALSE; }else{ if(note->x[0] > x_prev){ x_offset += (note->x[0] - x_prev) * x_padding; x_prev = note->x[0]; } } note->x[0] = x_offset + note->x[0]; note->x[1] = x_offset + note->x[0] + x_crop; } }else{ if(in_place){ note->x[1] = note->x[1] + x_crop; }else if(do_resize){ if(initial_run){ x_offset = 0; x_prev = note->x[0]; initial_run = FALSE; }else{ if(note->x[0] > x_prev){ x_offset += (note->x[0] - x_prev) * x_padding; x_prev = note->x[0]; } } note->x[0] = x_offset + note->x[0]; note->x[1] = x_offset + note->x[1] + x_crop; } } if(note->x[0] >= current_notation->timestamp->timer.ags_offset.offset + AGS_NOTATION_DEFAULT_OFFSET){ AgsTimestamp *timestamp; timestamp = ags_timestamp_new(); timestamp->flags &= (~AGS_TIMESTAMP_UNIX); timestamp->flags |= AGS_TIMESTAMP_OFFSET; timestamp->timer.ags_offset.offset = (guint64) (AGS_NOTATION_DEFAULT_OFFSET * floor(note->x[0] / AGS_NOTATION_DEFAULT_OFFSET)); if((current_notation = ags_notation_find_near_timestamp(crop_note->audio->notation, notation->audio_channel, timestamp)) == NULL){ current_notation = ags_notation_new(notation->audio, notation->audio_channel); current_notation->timestamp->timer.ags_offset.offset = timestamp->timer.ags_offset.offset; crop_note->audio->notation = ags_notation_add(crop_note->audio->notation, current_notation); } g_object_unref(timestamp); } /* remove old note */ ags_notation_remove_note(notation, selection->data, TRUE); ags_notation_remove_note(notation, selection->data, FALSE); /* add new note */ ags_notation_add_note(current_notation, note, FALSE); selection = selection->next; } pthread_mutex_unlock(audio_mutex); } /** * ags_crop_note_new: * @notation: the #AgsNotation * @selection: the selection as #GList-struct * @x_padding: the x padding to use * @x_crop: the amout to crop * @absolute: if %TRUE from absolute position, otherwise relative * @in_place: if %TRUE crop in place, otherwise grow relative offset * @do_resize: if %TRUE resize notation, otherwise not * * WARNING you need to provide #AgsAudio as a property. * Creates an #AgsCropNote task. Note either @in_place or @do_resize shall * be %TRUE else it won't have any effect. * * Returns: a new #AgsCropNote * * Since: 1.0.0 */ AgsCropNote* ags_crop_note_new(AgsNotation *notation, GList *selection, guint x_padding, gint x_crop, gboolean absolute, gboolean in_place, gboolean do_resize) { AgsCropNote *crop_note; crop_note = (AgsCropNote *) g_object_new(AGS_TYPE_CROP_NOTE, "notation", notation, "selection", selection, "x-padding", x_padding, "x-crop", x_crop, "absolute", absolute, "in-place", in_place, "do-resize", do_resize, NULL); return(crop_note); } gsequencer-1.4.24/ags/audio/task/ags_add_audio_signal.h0000644000175000017500000000444413247044247017767 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_AUDIO_SIGNAL_H__ #define __AGS_ADD_AUDIO_SIGNAL_H__ #include #include #include #include #include #define AGS_TYPE_ADD_AUDIO_SIGNAL (ags_add_audio_signal_get_type()) #define AGS_ADD_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_AUDIO_SIGNAL, AgsAddAudioSignal)) #define AGS_ADD_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_AUDIO_SIGNAL, AgsAddAudioSignalClass)) #define AGS_IS_ADD_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_AUDIO_SIGNAL)) #define AGS_IS_ADD_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_AUDIO_SIGNAL)) #define AGS_ADD_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_AUDIO_SIGNAL, AgsAddAudioSignalClass)) typedef struct _AgsAddAudioSignal AgsAddAudioSignal; typedef struct _AgsAddAudioSignalClass AgsAddAudioSignalClass; struct _AgsAddAudioSignal { AgsTask task; AgsRecycling *recycling; AgsAudioSignal *audio_signal; GObject *soundcard; AgsRecallID *recall_id; guint audio_signal_flags; }; struct _AgsAddAudioSignalClass { AgsTaskClass task; }; GType ags_add_audio_signal_get_type(); AgsAddAudioSignal* ags_add_audio_signal_new(AgsRecycling *recycling, AgsAudioSignal *audio_signal, GObject *soundcard, AgsRecallID *recall_id, guint audio_signal_flags); #endif /*__AGS_ADD_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_reset_audio_connection.h0000644000175000017500000000457513247044247021250 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RESET_AUDIO_CONNECTION_H__ #define __AGS_RESET_AUDIO_CONNECTION_H__ #include #include #include #include #define AGS_TYPE_RESET_AUDIO_CONNECTION (ags_reset_audio_connection_get_type()) #define AGS_RESET_AUDIO_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RESET_AUDIO_CONNECTION, AgsResetAudioConnection)) #define AGS_RESET_AUDIO_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RESET_AUDIO_CONNECTION, AgsResetAudioConnectionClass)) #define AGS_IS_RESET_AUDIO_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RESET_AUDIO_CONNECTION)) #define AGS_IS_RESET_AUDIO_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RESET_AUDIO_CONNECTION)) #define AGS_RESET_AUDIO_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RESET_AUDIO_CONNECTION, AgsResetAudioConnectionClass)) typedef struct _AgsResetAudioConnection AgsResetAudioConnection; typedef struct _AgsResetAudioConnectionClass AgsResetAudioConnectionClass; struct _AgsResetAudioConnection { AgsTask task; GObject *soundcard; AgsAudio *audio; GType channel_type; guint pad; guint audio_channel; guint mapped_line; }; struct _AgsResetAudioConnectionClass { AgsTaskClass task; }; GType ags_reset_audio_connection_get_type(); AgsResetAudioConnection* ags_reset_audio_connection_new(GObject *soundcard, AgsAudio *audio, GType channel_type, guint pad, guint audio_channel, guint mapped_line); #endif /*__AGS_RESET_AUDIO_CONNECTION_H__*/ gsequencer-1.4.24/ags/audio/task/ags_unref_audio_signal.c0000644000175000017500000001713713246707333020355 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_unref_audio_signal_class_init(AgsUnrefAudioSignalClass *unref_audio_signal); void ags_unref_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_unref_audio_signal_init(AgsUnrefAudioSignal *unref_audio_signal); void ags_unref_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_unref_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_unref_audio_signal_connect(AgsConnectable *connectable); void ags_unref_audio_signal_disconnect(AgsConnectable *connectable); void ags_unref_audio_signal_dispose(GObject *gobject); void ags_unref_audio_signal_finalize(GObject *gobject); void ags_unref_audio_signal_launch(AgsTask *task); /** * SECTION:ags_unref_audio_signal * @short_description: unref audio signal * @title: AgsUnrefAudioSignal * @section_id: * @include: ags/audio/task/ags_unref_audio_signal.h * * The #AgsUnrefAudioSignal task unrefs #AgsAudioSignal. */ enum{ PROP_0, PROP_AUDIO_SIGNAL, }; static gpointer ags_unref_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_unref_audio_signal_parent_connectable_interface; GType ags_unref_audio_signal_get_type() { static GType ags_type_unref_audio_signal = 0; if(!ags_type_unref_audio_signal){ static const GTypeInfo ags_unref_audio_signal_info = { sizeof (AgsUnrefAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_unref_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsUnrefAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_unref_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_unref_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_unref_audio_signal = g_type_register_static(AGS_TYPE_TASK, "AgsUnrefAudioSignal", &ags_unref_audio_signal_info, 0); g_type_add_interface_static(ags_type_unref_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_unref_audio_signal); } void ags_unref_audio_signal_class_init(AgsUnrefAudioSignalClass *unref_audio_signal) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_unref_audio_signal_parent_class = g_type_class_peek_parent(unref_audio_signal); /* gobject */ gobject = (GObjectClass *) unref_audio_signal; gobject->set_property = ags_unref_audio_signal_set_property; gobject->get_property = ags_unref_audio_signal_get_property; gobject->dispose = ags_unref_audio_signal_dispose; gobject->finalize = ags_unref_audio_signal_finalize; /* properties */ /** * AgsUnrefAudioSignal:audio-signal: * * The assigned #AgsAudioSignal * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-signal", i18n_pspec("audio signal of unref audio signal"), i18n_pspec("The audio signal of unref audio signal task"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_SIGNAL, param_spec); /* task */ task = (AgsTaskClass *) unref_audio_signal; task->launch = ags_unref_audio_signal_launch; } void ags_unref_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_unref_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_unref_audio_signal_connect; connectable->disconnect = ags_unref_audio_signal_disconnect; } void ags_unref_audio_signal_init(AgsUnrefAudioSignal *unref_audio_signal) { unref_audio_signal->audio_signal = NULL; } void ags_unref_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsUnrefAudioSignal *unref_audio_signal; unref_audio_signal = AGS_UNREF_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_AUDIO_SIGNAL: { AgsAudioSignal *audio_signal; audio_signal = (AgsAudioSignal *) g_value_get_object(value); if(unref_audio_signal->audio_signal == (GObject *) audio_signal){ return; } if(unref_audio_signal->audio_signal != NULL){ g_object_unref(unref_audio_signal->audio_signal); } if(audio_signal != NULL){ g_object_ref(audio_signal); } unref_audio_signal->audio_signal = (GObject *) audio_signal; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_unref_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsUnrefAudioSignal *unref_audio_signal; unref_audio_signal = AGS_UNREF_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_AUDIO_SIGNAL: { g_value_set_object(value, unref_audio_signal->audio_signal); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_unref_audio_signal_connect(AgsConnectable *connectable) { ags_unref_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_unref_audio_signal_disconnect(AgsConnectable *connectable) { ags_unref_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_unref_audio_signal_dispose(GObject *gobject) { AgsUnrefAudioSignal *unref_audio_signal; unref_audio_signal = AGS_UNREF_AUDIO_SIGNAL(gobject); if(unref_audio_signal->audio_signal != NULL){ g_object_unref(unref_audio_signal->audio_signal); unref_audio_signal->audio_signal = NULL; } /* call parent */ G_OBJECT_CLASS(ags_unref_audio_signal_parent_class)->dispose(gobject); } void ags_unref_audio_signal_finalize(GObject *gobject) { AgsUnrefAudioSignal *unref_audio_signal; unref_audio_signal = AGS_UNREF_AUDIO_SIGNAL(gobject); if(unref_audio_signal->audio_signal != NULL){ g_object_unref(unref_audio_signal->audio_signal); } /* call parent */ G_OBJECT_CLASS(ags_unref_audio_signal_parent_class)->finalize(gobject); } void ags_unref_audio_signal_launch(AgsTask *task) { AgsUnrefAudioSignal *unref_audio_signal; unref_audio_signal = AGS_UNREF_AUDIO_SIGNAL(task); /* cancel AgsRecall */ g_object_unref(unref_audio_signal->audio_signal); } AgsUnrefAudioSignal* ags_unref_audio_signal_new(AgsAudioSignal *audio_signal) { AgsUnrefAudioSignal *unref_audio_signal; unref_audio_signal = (AgsUnrefAudioSignal *) g_object_new(AGS_TYPE_UNREF_AUDIO_SIGNAL, "audio-signal", audio_signal, NULL); return(unref_audio_signal); } gsequencer-1.4.24/ags/audio/task/ags_set_output_device.h0000644000175000017500000000403413247044247020246 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SET_OUTPUT_DEVICE_H__ #define __AGS_SET_OUTPUT_DEVICE_H__ #include #include #include #define AGS_TYPE_SET_OUTPUT_DEVICE (ags_set_output_device_get_type()) #define AGS_SET_OUTPUT_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SET_OUTPUT_DEVICE, AgsSetOutputDevice)) #define AGS_SET_OUTPUT_DEVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SET_OUTPUT_DEVICE, AgsSetOutputDeviceClass)) #define AGS_IS_SET_OUTPUT_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SET_OUTPUT_DEVICE)) #define AGS_IS_SET_OUTPUT_DEVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SET_OUTPUT_DEVICE)) #define AGS_SET_OUTPUT_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SET_OUTPUT_DEVICE, AgsSetOutputDeviceClass)) typedef struct _AgsSetOutputDevice AgsSetOutputDevice; typedef struct _AgsSetOutputDeviceClass AgsSetOutputDeviceClass; struct _AgsSetOutputDevice { AgsTask task; GObject *soundcard; char *device; }; struct _AgsSetOutputDeviceClass { AgsTaskClass task; }; GType ags_set_output_device_get_type(); AgsSetOutputDevice* ags_set_output_device_new(GObject *soundcard, char *device); #endif /*__AGS_SET_OUTPUT_DEVICE_H__*/ gsequencer-1.4.24/ags/audio/task/recall/0000755000175000017500000000000013256233674015036 500000000000000gsequencer-1.4.24/ags/audio/task/recall/ags_apply_tact.h0000644000175000017500000000353413247044247020122 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_APPLY_TACT_H__ #define __AGS_APPLY_TACT_H__ #include #include #include #define AGS_TYPE_APPLY_TACT (ags_apply_tact_get_type()) #define AGS_APPLY_TACT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPLY_TACT, AgsApplyTact)) #define AGS_APPLY_TACT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_APPLY_TACT, AgsApplyTactClass)) #define AGS_IS_APPLY_TACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPLY_TACT)) #define AGS_IS_APPLY_TACT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_APPLY_TACT)) #define AGS_APPLY_TACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_APPLY_TACT, AgsApplyTactClass)) typedef struct _AgsApplyTact AgsApplyTact; typedef struct _AgsApplyTactClass AgsApplyTactClass; struct _AgsApplyTact { AgsTask task; GObject *scope; gdouble tact; }; struct _AgsApplyTactClass { AgsTaskClass task; }; GType ags_apply_tact_get_type(); AgsApplyTact* ags_apply_tact_new(GObject *scope, gdouble tact); #endif /*__AGS_APPLY_TACT_H__*/ gsequencer-1.4.24/ags/audio/task/recall/ags_set_muted.c0000644000175000017500000002611213247044247017743 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_set_muted_class_init(AgsSetMutedClass *set_muted); void ags_set_muted_connectable_interface_init(AgsConnectableInterface *connectable); void ags_set_muted_init(AgsSetMuted *set_muted); void ags_set_muted_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_set_muted_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_set_muted_connect(AgsConnectable *connectable); void ags_set_muted_disconnect(AgsConnectable *connectable); void ags_set_muted_dispose(GObject *gobject); void ags_set_muted_finalize(GObject *gobject); void ags_set_muted_launch(AgsTask *task); void ags_set_muted_recall(AgsSetMuted *set_muted, AgsRecall *recall); void ags_set_muted_channel(AgsSetMuted *set_muted, AgsChannel *channel); void ags_set_muted_audio(AgsSetMuted *set_muted, AgsAudio *audio); /** * SECTION:ags_set_muted * @short_description: set muted to delay audio * @title: AgsSetMuted * @section_id: * @include: ags/audio/task/recall/ags_set_muted.h * * The #AgsSetMuted task sets muted to #AgsMutable. */ enum{ PROP_0, PROP_SCOPE, PROP_MUTED, }; static gpointer ags_set_muted_parent_class = NULL; static AgsConnectableInterface *ags_set_muted_parent_connectable_interface; GType ags_set_muted_get_type() { static GType ags_type_set_muted = 0; if(!ags_type_set_muted){ static const GTypeInfo ags_set_muted_info = { sizeof (AgsSetMutedClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_set_muted_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSetMuted), 0, /* n_preallocs */ (GInstanceInitFunc) ags_set_muted_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_set_muted_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_set_muted = g_type_register_static(AGS_TYPE_TASK, "AgsSetMuted", &ags_set_muted_info, 0); g_type_add_interface_static(ags_type_set_muted, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_set_muted); } void ags_set_muted_class_init(AgsSetMutedClass *set_muted) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_set_muted_parent_class = g_type_class_peek_parent(set_muted); /* GObjectClass */ gobject = (GObjectClass *) set_muted; gobject->set_property = ags_set_muted_set_property; gobject->get_property = ags_set_muted_get_property; gobject->dispose = ags_set_muted_dispose; gobject->finalize = ags_set_muted_finalize; /* properties */ /** * AgsSetMuted:scope: * * The assigned #GObject as scope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("scope", i18n_pspec("scope of set buffer size"), i18n_pspec("The scope of set buffer size"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCOPE, param_spec); /** * AgsSetMuted:muted: * * The muted to set to scope. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("muted", i18n_pspec("muted"), i18n_pspec("The muted to set"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MUTED, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) set_muted; task->launch = ags_set_muted_launch; } void ags_set_muted_connectable_interface_init(AgsConnectableInterface *connectable) { ags_set_muted_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_set_muted_connect; connectable->disconnect = ags_set_muted_disconnect; } void ags_set_muted_init(AgsSetMuted *set_muted) { set_muted->scope = NULL; set_muted->muted = FALSE; } void ags_set_muted_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSetMuted *set_muted; set_muted = AGS_SET_MUTED(gobject); switch(prop_id){ case PROP_SCOPE: { GObject *scope; scope = (GObject *) g_value_get_object(value); if(set_muted->scope == (GObject *) scope){ return; } if(set_muted->scope != NULL){ g_object_unref(set_muted->scope); } if(scope != NULL){ g_object_ref(scope); } set_muted->scope = (GObject *) scope; } break; case PROP_MUTED: { set_muted->muted = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_muted_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSetMuted *set_muted; set_muted = AGS_SET_MUTED(gobject); switch(prop_id){ case PROP_SCOPE: { g_value_set_object(value, set_muted->scope); } break; case PROP_MUTED: { g_value_set_boolean(value, set_muted->muted); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_muted_connect(AgsConnectable *connectable) { ags_set_muted_parent_connectable_interface->connect(connectable); /* empty */ } void ags_set_muted_disconnect(AgsConnectable *connectable) { ags_set_muted_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_set_muted_dispose(GObject *gobject) { AgsSetMuted *set_muted; set_muted = AGS_SET_MUTED(gobject); if(set_muted->scope != NULL){ g_object_unref(set_muted->scope); set_muted->scope = NULL; } /* call parent */ G_OBJECT_CLASS(ags_set_muted_parent_class)->dispose(gobject); } void ags_set_muted_finalize(GObject *gobject) { AgsSetMuted *set_muted; set_muted = AGS_SET_MUTED(gobject); if(set_muted->scope != NULL){ g_object_unref(set_muted->scope); } /* call parent */ G_OBJECT_CLASS(ags_set_muted_parent_class)->finalize(gobject); } void ags_set_muted_launch(AgsTask *task) { AgsSetMuted *set_muted; set_muted = AGS_SET_MUTED(task); if(AGS_IS_AUDIO(set_muted->scope)){ AgsAudio *audio; audio = AGS_AUDIO(set_muted->scope); ags_set_muted_audio(set_muted, audio); }else if(AGS_IS_CHANNEL(set_muted->scope)){ AgsChannel *channel; channel = AGS_CHANNEL(set_muted->scope); ags_set_muted_channel(set_muted, channel); }else if(AGS_IS_RECALL(set_muted->scope)){ AgsRecall *recall; recall = AGS_RECALL(set_muted->scope); ags_set_muted_recall(set_muted, recall); }else{ g_warning("AgsSetMuted: Not supported scope"); } } void ags_set_muted_recall(AgsSetMuted *set_muted, AgsRecall *recall) { if(AGS_IS_MUTABLE(recall)){ ags_mutable_set_muted(AGS_MUTABLE(recall), set_muted->muted); } } void ags_set_muted_channel(AgsSetMuted *set_muted, AgsChannel *channel) { AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply sequencer length */ pthread_mutex_lock(channel_mutex); list = channel->play; while(list != NULL){ ags_set_muted_recall(set_muted, AGS_RECALL(list->data)); list = list->next; } list = channel->recall; while(list != NULL){ ags_set_muted_recall(set_muted, AGS_RECALL(list->data)); list = list->next; } pthread_mutex_unlock(channel_mutex); } void ags_set_muted_audio(AgsSetMuted *set_muted, AgsAudio *audio) { AgsChannel *input, *output; AgsChannel *channel; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; /* AgsRecall */ list = audio->play; while(list != NULL){ ags_set_muted_recall(set_muted, AGS_RECALL(list->data)); list = list->next; } list = audio->recall; while(list != NULL){ ags_set_muted_recall(set_muted, AGS_RECALL(list->data)); list = list->next; } pthread_mutex_unlock(audio_mutex); /* AgsChannel */ channel = output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* muted */ ags_set_muted_channel(set_muted, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* muted */ ags_set_muted_channel(set_muted, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /** * ags_set_muted_new: * @scope: the #GObject * @muted: muted to set * * Creates an #AgsSetMuted. * * Returns: an new #AgsSetMuted. * * Since: 1.0.0 */ AgsSetMuted* ags_set_muted_new(GObject *scope, gboolean muted) { AgsSetMuted *set_muted; set_muted = (AgsSetMuted *) g_object_new(AGS_TYPE_SET_MUTED, "scope", scope, "muted", muted, NULL); return(set_muted); } gsequencer-1.4.24/ags/audio/task/recall/ags_apply_bpm.c0000644000175000017500000003066213247044247017742 00000000000000/* 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 . */ #include #include #include #include #include #include #include void ags_apply_bpm_class_init(AgsApplyBpmClass *apply_bpm); void ags_apply_bpm_connectable_interface_init(AgsConnectableInterface *connectable); void ags_apply_bpm_init(AgsApplyBpm *apply_bpm); void ags_apply_bpm_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_apply_bpm_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_apply_bpm_connect(AgsConnectable *connectable); void ags_apply_bpm_disconnect(AgsConnectable *connectable); void ags_apply_bpm_dispose(GObject *gobject); void ags_apply_bpm_finalize(GObject *gobject); void ags_apply_bpm_launch(AgsTask *task); void ags_apply_bpm_recall(AgsApplyBpm *apply_bpm, AgsRecall *recall); void ags_apply_bpm_channel(AgsApplyBpm *apply_bpm, AgsChannel *channel); void ags_apply_bpm_audio(AgsApplyBpm *apply_bpm, AgsAudio *audio); void ags_apply_bpm_soundcard(AgsApplyBpm *apply_bpm, GObject *soundcard); /** * SECTION:ags_apply_bpm * @short_description: apply bpm to delay audio * @title: AgsApplyBpm * @section_id: * @include: ags/audio/task/recall/ags_apply_bpm.h * * The #AgsApplyBpm task applys bpm to #AgsDelayAudio. */ enum{ PROP_0, PROP_SCOPE, PROP_BPM, }; static gpointer ags_apply_bpm_parent_class = NULL; static AgsConnectableInterface *ags_apply_bpm_parent_connectable_interface; GType ags_apply_bpm_get_type() { static GType ags_type_apply_bpm = 0; if(!ags_type_apply_bpm){ static const GTypeInfo ags_apply_bpm_info = { sizeof (AgsApplyBpmClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_apply_bpm_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsApplyBpm), 0, /* n_preallocs */ (GInstanceInitFunc) ags_apply_bpm_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_apply_bpm_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_apply_bpm = g_type_register_static(AGS_TYPE_TASK, "AgsApplyBpm", &ags_apply_bpm_info, 0); g_type_add_interface_static(ags_type_apply_bpm, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_apply_bpm); } void ags_apply_bpm_class_init(AgsApplyBpmClass *apply_bpm) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_apply_bpm_parent_class = g_type_class_peek_parent(apply_bpm); /* GObjectClass */ gobject = (GObjectClass *) apply_bpm; gobject->set_property = ags_apply_bpm_set_property; gobject->get_property = ags_apply_bpm_get_property; gobject->dispose = ags_apply_bpm_dispose; gobject->finalize = ags_apply_bpm_finalize; /* properties */ /** * AgsApplyBpm:scope: * * The assigned #GObject as scope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("scope", i18n_pspec("scope of set buffer size"), i18n_pspec("The scope of set buffer size"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCOPE, param_spec); /** * AgsApplyBpm:bpm: * * The bpm to apply to scope. * * Since: 1.0.0 */ param_spec = g_param_spec_double("bpm", i18n_pspec("bpm"), i18n_pspec("The bpm to apply"), 0, G_MAXDOUBLE, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BPM, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) apply_bpm; task->launch = ags_apply_bpm_launch; } void ags_apply_bpm_connectable_interface_init(AgsConnectableInterface *connectable) { ags_apply_bpm_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_apply_bpm_connect; connectable->disconnect = ags_apply_bpm_disconnect; } void ags_apply_bpm_init(AgsApplyBpm *apply_bpm) { apply_bpm->scope = NULL; apply_bpm->bpm = 0.0; } void ags_apply_bpm_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsApplyBpm *apply_bpm; apply_bpm = AGS_APPLY_BPM(gobject); switch(prop_id){ case PROP_SCOPE: { GObject *scope; scope = (GObject *) g_value_get_object(value); if(apply_bpm->scope == (GObject *) scope){ return; } if(apply_bpm->scope != NULL){ g_object_unref(apply_bpm->scope); } if(scope != NULL){ g_object_ref(scope); } apply_bpm->scope = (GObject *) scope; } break; case PROP_BPM: { apply_bpm->bpm = g_value_get_double(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_bpm_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsApplyBpm *apply_bpm; apply_bpm = AGS_APPLY_BPM(gobject); switch(prop_id){ case PROP_SCOPE: { g_value_set_object(value, apply_bpm->scope); } break; case PROP_BPM: { g_value_set_double(value, apply_bpm->bpm); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_bpm_connect(AgsConnectable *connectable) { ags_apply_bpm_parent_connectable_interface->connect(connectable); /* empty */ } void ags_apply_bpm_disconnect(AgsConnectable *connectable) { ags_apply_bpm_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_apply_bpm_dispose(GObject *gobject) { AgsApplyBpm *apply_bpm; apply_bpm = AGS_APPLY_BPM(gobject); if(apply_bpm->scope != NULL){ g_object_unref(apply_bpm->scope); apply_bpm->scope = NULL; } /* call parent */ G_OBJECT_CLASS(ags_apply_bpm_parent_class)->dispose(gobject); } void ags_apply_bpm_finalize(GObject *gobject) { AgsApplyBpm *apply_bpm; apply_bpm = AGS_APPLY_BPM(gobject); if(apply_bpm->scope != NULL){ g_object_unref(apply_bpm->scope); } /* call parent */ G_OBJECT_CLASS(ags_apply_bpm_parent_class)->finalize(gobject); } void ags_apply_bpm_launch(AgsTask *task) { AgsApplyBpm *apply_bpm; apply_bpm = AGS_APPLY_BPM(task); if(AGS_IS_SOUNDCARD(apply_bpm->scope)){ GObject *soundcard; soundcard = apply_bpm->scope; ags_apply_bpm_soundcard(apply_bpm, soundcard); }else if(AGS_IS_AUDIO(apply_bpm->scope)){ AgsAudio *audio; audio = AGS_AUDIO(apply_bpm->scope); ags_apply_bpm_audio(apply_bpm, audio); }else if(AGS_IS_CHANNEL(apply_bpm->scope)){ AgsChannel *channel; channel = AGS_CHANNEL(apply_bpm->scope); ags_apply_bpm_channel(apply_bpm, channel); }else if(AGS_IS_RECALL(apply_bpm->scope)){ AgsRecall *recall; recall = AGS_RECALL(apply_bpm->scope); ags_apply_bpm_recall(apply_bpm, recall); }else{ g_warning("AgsApplyBpm: Not supported scope"); } } void ags_apply_bpm_recall(AgsApplyBpm *apply_bpm, AgsRecall *recall) { if(AGS_IS_TACTABLE(recall)){ ags_tactable_change_bpm(AGS_TACTABLE(recall), ags_tactable_get_bpm(AGS_TACTABLE(recall)), apply_bpm->bpm); } } void ags_apply_bpm_channel(AgsApplyBpm *apply_bpm, AgsChannel *channel) { AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply bpm */ pthread_mutex_lock(channel_mutex); list = channel->play; while(list != NULL){ ags_apply_bpm_recall(apply_bpm, AGS_RECALL(list->data)); list = list->next; } list = channel->recall; while(list != NULL){ ags_apply_bpm_recall(apply_bpm, AGS_RECALL(list->data)); list = list->next; } pthread_mutex_unlock(channel_mutex); } void ags_apply_bpm_audio(AgsApplyBpm *apply_bpm, AgsAudio *audio) { AgsChannel *input, *output; AgsChannel *channel; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; /* AgsRecall */ list = audio->play; while(list != NULL){ ags_apply_bpm_recall(apply_bpm, AGS_RECALL(list->data)); list = list->next; } list = audio->recall; while(list != NULL){ ags_apply_bpm_recall(apply_bpm, AGS_RECALL(list->data)); list = list->next; } pthread_mutex_unlock(audio_mutex); /* AgsChannel */ channel = output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply bpm */ ags_apply_bpm_channel(apply_bpm, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply bpm */ ags_apply_bpm_channel(apply_bpm, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } void ags_apply_bpm_soundcard(AgsApplyBpm *apply_bpm, GObject *soundcard) { AgsMutexManager *mutex_manager; GList *list_start, *list; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* set bpm and get audio */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_set_bpm(AGS_SOUNDCARD(soundcard), apply_bpm->bpm); list = list_start = g_list_copy(ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard))); pthread_mutex_unlock(soundcard_mutex); /* AgsAudio */ while(list != NULL){ ags_apply_bpm_audio(apply_bpm, AGS_AUDIO(list->data)); list = list->next; } g_list_free(list_start); } /** * ags_apply_bpm_new: * @scope: the #GObject * @bpm: the bpm to apply * * Creates an #AgsApplyBpm. * * Returns: an new #AgsApplyBpm. * * Since: 1.0.0 */ AgsApplyBpm* ags_apply_bpm_new(GObject *scope, gdouble bpm) { AgsApplyBpm *apply_bpm; apply_bpm = (AgsApplyBpm *) g_object_new(AGS_TYPE_APPLY_BPM, "scope", scope, "bpm", bpm, NULL); return(apply_bpm); } gsequencer-1.4.24/ags/audio/task/recall/ags_apply_sequencer_length.c0000644000175000017500000003250313247044247022513 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_apply_sequencer_length_class_init(AgsApplySequencerLengthClass *apply_sequencer_length); void ags_apply_sequencer_length_connectable_interface_init(AgsConnectableInterface *connectable); void ags_apply_sequencer_length_init(AgsApplySequencerLength *apply_sequencer_length); void ags_apply_sequencer_length_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_apply_sequencer_length_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_apply_sequencer_length_connect(AgsConnectable *connectable); void ags_apply_sequencer_length_disconnect(AgsConnectable *connectable); void ags_apply_sequencer_length_dispose(GObject *gobject); void ags_apply_sequencer_length_finalize(GObject *gobject); void ags_apply_sequencer_length_recall(AgsApplySequencerLength *apply_sequencer_length, AgsRecall *recall); void ags_apply_sequencer_length_channel(AgsApplySequencerLength *apply_sequencer_length, AgsChannel *channel); void ags_apply_sequencer_length_audio(AgsApplySequencerLength *apply_sequencer_length, AgsAudio *audio); void ags_apply_sequencer_length_launch(AgsTask *task); /** * SECTION:ags_apply_sequencer_length * @short_description: apply sequencer length to delay audio * @title: AgsApplySequencerLength * @section_id: * @include: ags/audio/task/recall/ags_apply_sequencer_length.h * * The #AgsApplySequencerLength task applys sequencer length to #AgsDelayAudio. */ enum{ PROP_0, PROP_SCOPE, PROP_SEQUENCER_LENGTH, }; static gpointer ags_apply_sequencer_length_parent_class = NULL; static AgsConnectableInterface *ags_apply_sequencer_length_parent_connectable_interface; GType ags_apply_sequencer_length_get_type() { static GType ags_type_apply_sequencer_length = 0; if(!ags_type_apply_sequencer_length){ static const GTypeInfo ags_apply_sequencer_length_info = { sizeof (AgsApplySequencerLengthClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_apply_sequencer_length_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsApplySequencerLength), 0, /* n_preallocs */ (GInstanceInitFunc) ags_apply_sequencer_length_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_apply_sequencer_length_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_apply_sequencer_length = g_type_register_static(AGS_TYPE_TASK, "AgsApplySequencerLength", &ags_apply_sequencer_length_info, 0); g_type_add_interface_static(ags_type_apply_sequencer_length, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_apply_sequencer_length); } void ags_apply_sequencer_length_class_init(AgsApplySequencerLengthClass *apply_sequencer_length) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_apply_sequencer_length_parent_class = g_type_class_peek_parent(apply_sequencer_length); /* GObjectClass */ gobject = (GObjectClass *) apply_sequencer_length; gobject->set_property = ags_apply_sequencer_length_set_property; gobject->get_property = ags_apply_sequencer_length_get_property; gobject->dispose = ags_apply_sequencer_length_dispose; gobject->finalize = ags_apply_sequencer_length_finalize; /* properties */ /** * AgsApplySequencerLength:scope: * * The assigned #GObject as scope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("scope", i18n_pspec("scope of set buffer size"), i18n_pspec("The scope of set buffer size"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCOPE, param_spec); /** * AgsApplySequencerLength:sequencer-length: * * The sequencer length to apply to scope. * * Since: 1.0.0 */ param_spec = g_param_spec_double("sequencer-length", i18n_pspec("sequencer length"), i18n_pspec("The sequence length to apply"), 0, G_MAXDOUBLE, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SEQUENCER_LENGTH, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) apply_sequencer_length; task->launch = ags_apply_sequencer_length_launch; } void ags_apply_sequencer_length_connectable_interface_init(AgsConnectableInterface *connectable) { ags_apply_sequencer_length_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_apply_sequencer_length_connect; connectable->disconnect = ags_apply_sequencer_length_disconnect; } void ags_apply_sequencer_length_init(AgsApplySequencerLength *apply_sequencer_length) { apply_sequencer_length->scope = NULL; apply_sequencer_length->length = 0.0; } void ags_apply_sequencer_length_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsApplySequencerLength *apply_sequencer_length; apply_sequencer_length = AGS_APPLY_SEQUENCER_LENGTH(gobject); switch(prop_id){ case PROP_SCOPE: { GObject *scope; scope = (GObject *) g_value_get_object(value); if(apply_sequencer_length->scope == (GObject *) scope){ return; } if(apply_sequencer_length->scope != NULL){ g_object_unref(apply_sequencer_length->scope); } if(scope != NULL){ g_object_ref(scope); } apply_sequencer_length->scope = (GObject *) scope; } break; case PROP_SEQUENCER_LENGTH: { apply_sequencer_length->length = g_value_get_double(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_sequencer_length_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsApplySequencerLength *apply_sequencer_length; apply_sequencer_length = AGS_APPLY_SEQUENCER_LENGTH(gobject); switch(prop_id){ case PROP_SCOPE: { g_value_set_object(value, apply_sequencer_length->scope); } break; case PROP_SEQUENCER_LENGTH: { g_value_set_double(value, apply_sequencer_length->length); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_sequencer_length_connect(AgsConnectable *connectable) { ags_apply_sequencer_length_parent_connectable_interface->connect(connectable); /* empty */ } void ags_apply_sequencer_length_disconnect(AgsConnectable *connectable) { ags_apply_sequencer_length_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_apply_sequencer_length_dispose(GObject *gobject) { AgsApplySequencerLength *apply_sequencer_length; apply_sequencer_length = AGS_APPLY_SEQUENCER_LENGTH(gobject); if(apply_sequencer_length->scope != NULL){ g_object_unref(apply_sequencer_length->scope); apply_sequencer_length->scope = NULL; } /* call parent */ G_OBJECT_CLASS(ags_apply_sequencer_length_parent_class)->dispose(gobject); } void ags_apply_sequencer_length_finalize(GObject *gobject) { AgsApplySequencerLength *apply_sequencer_length; apply_sequencer_length = AGS_APPLY_SEQUENCER_LENGTH(gobject); if(apply_sequencer_length->scope != NULL){ g_object_unref(apply_sequencer_length->scope); } /* call parent */ G_OBJECT_CLASS(ags_apply_sequencer_length_parent_class)->finalize(gobject); } void ags_apply_sequencer_length_launch(AgsTask *task) { AgsApplySequencerLength *apply_sequencer_length; apply_sequencer_length = AGS_APPLY_SEQUENCER_LENGTH(task); if(AGS_IS_AUDIO(apply_sequencer_length->scope)){ AgsAudio *audio; audio = AGS_AUDIO(apply_sequencer_length->scope); ags_apply_sequencer_length_audio(apply_sequencer_length, audio); }else if(AGS_IS_CHANNEL(apply_sequencer_length->scope)){ AgsChannel *channel; channel = AGS_CHANNEL(apply_sequencer_length->scope); ags_apply_sequencer_length_channel(apply_sequencer_length, channel); }else if(AGS_IS_RECALL(apply_sequencer_length->scope)){ AgsRecall *recall; recall = AGS_RECALL(apply_sequencer_length->scope); ags_apply_sequencer_length_recall(apply_sequencer_length, recall); }else{ g_warning("AgsApplySequencerLength: Not supported scope"); } } void ags_apply_sequencer_length_recall(AgsApplySequencerLength *apply_sequencer_length, AgsRecall *recall) { if(AGS_IS_TACTABLE(recall)){ ags_tactable_change_sequencer_duration(AGS_TACTABLE(recall), apply_sequencer_length->length); } } void ags_apply_sequencer_length_channel(AgsApplySequencerLength *apply_sequencer_length, AgsChannel *channel) { AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply sequencer length */ pthread_mutex_lock(channel_mutex); list = channel->play; while(list != NULL){ ags_apply_sequencer_length_recall(apply_sequencer_length, AGS_RECALL(list->data)); list = list->next; } list = channel->recall; while(list != NULL){ ags_apply_sequencer_length_recall(apply_sequencer_length, AGS_RECALL(list->data)); list = list->next; } pthread_mutex_unlock(channel_mutex); } void ags_apply_sequencer_length_audio(AgsApplySequencerLength *apply_sequencer_length, AgsAudio *audio) { AgsChannel *input, *output; AgsChannel *channel; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; /* AgsRecall */ list = audio->play; while(list != NULL){ ags_apply_sequencer_length_recall(apply_sequencer_length, AGS_RECALL(list->data)); list = list->next; } list = audio->recall; while(list != NULL){ ags_apply_sequencer_length_recall(apply_sequencer_length, AGS_RECALL(list->data)); list = list->next; } pthread_mutex_unlock(audio_mutex); /* AgsChannel */ channel = output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply sequencer length */ ags_apply_sequencer_length_channel(apply_sequencer_length, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply sequencer length */ ags_apply_sequencer_length_channel(apply_sequencer_length, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } /** * ags_apply_sequencer_length_new: * @scope: the #GObject * @length: the sequencer length to apply * * Creates an #AgsApplySequencerLength. * * Returns: an new #AgsApplySequencerLength. * * Since: 1.0.0 */ AgsApplySequencerLength* ags_apply_sequencer_length_new(GObject *scope, gdouble length) { AgsApplySequencerLength *apply_sequencer_length; apply_sequencer_length = (AgsApplySequencerLength *) g_object_new(AGS_TYPE_APPLY_SEQUENCER_LENGTH, "scope", scope, "sequencer-length", length, NULL); return(apply_sequencer_length); } gsequencer-1.4.24/ags/audio/task/recall/ags_reset_peak.h0000644000175000017500000000407413247044247020104 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RESET_PEAK_H__ #define __AGS_RESET_PEAK_H__ #include #include #include #include #define AGS_TYPE_RESET_PEAK (ags_reset_peak_get_type()) #define AGS_RESET_PEAK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RESET_PEAK, AgsResetPeak)) #define AGS_RESET_PEAK_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RESET_PEAK, AgsResetPeakClass)) #define AGS_IS_RESET_PEAK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RESET_PEAK)) #define AGS_IS_RESET_PEAK_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RESET_PEAK)) #define AGS_RESET_PEAK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RESET_PEAK, AgsResetPeakClass)) typedef struct _AgsResetPeak AgsResetPeak; typedef struct _AgsResetPeakClass AgsResetPeakClass; struct _AgsResetPeak { AgsTask task; GList *peak_channel; }; struct _AgsResetPeakClass { AgsTaskClass task; }; GType ags_reset_peak_get_type(); void ags_reset_peak_add(AgsResetPeak *reset_peak, AgsPeakChannel *peak_channel); void ags_reset_peak_remove(AgsResetPeak *reset_peak, AgsPeakChannel *peak_channel); AgsResetPeak* ags_reset_peak_get_instance(); AgsResetPeak* ags_reset_peak_new(); #endif /*__AGS_RESET_PEAK_H__*/ gsequencer-1.4.24/ags/audio/task/recall/ags_reset_peak.c0000644000175000017500000001726413247044247020104 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_reset_peak_class_init(AgsResetPeakClass *reset_peak); void ags_reset_peak_connectable_interface_init(AgsConnectableInterface *connectable); void ags_reset_peak_init(AgsResetPeak *reset_peak); void ags_reset_peak_connect(AgsConnectable *connectable); void ags_reset_peak_disconnect(AgsConnectable *connectable); void ags_reset_peak_dispose(GObject *gobject); void ags_reset_peak_finalize(GObject *gobject); void ags_reset_peak_launch(AgsTask *task); /** * SECTION:ags_reset_peak * @short_description: reset peak internal * @title: AgsResetPeak * @section_id: * @include: ags/audio/task/recall/ags_reset_peak.h * * The #AgsResetPeak task resets peak to recompute the peak during next run. */ static gpointer ags_reset_peak_parent_class = NULL; static AgsConnectableInterface *ags_reset_peak_parent_connectable_interface; AgsResetPeak *ags_reset_peak = NULL; static pthread_mutex_t peak_channel_mutex = PTHREAD_MUTEX_INITIALIZER; GType ags_reset_peak_get_type() { static GType ags_type_reset_peak = 0; if(!ags_type_reset_peak){ static const GTypeInfo ags_reset_peak_info = { sizeof (AgsResetPeakClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_reset_peak_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsResetPeak), 0, /* n_preallocs */ (GInstanceInitFunc) ags_reset_peak_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_reset_peak_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_reset_peak = g_type_register_static(AGS_TYPE_TASK, "AgsResetPeak", &ags_reset_peak_info, 0); g_type_add_interface_static(ags_type_reset_peak, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_reset_peak); } void ags_reset_peak_class_init(AgsResetPeakClass *reset_peak) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_reset_peak_parent_class = g_type_class_peek_parent(reset_peak); /* GObjectClass */ gobject = (GObjectClass *) reset_peak; gobject->dispose = ags_reset_peak_dispose; gobject->finalize = ags_reset_peak_finalize; /* AgsTaskClass */ task = (AgsTaskClass *) reset_peak; task->launch = ags_reset_peak_launch; } void ags_reset_peak_connectable_interface_init(AgsConnectableInterface *connectable) { ags_reset_peak_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_reset_peak_connect; connectable->disconnect = ags_reset_peak_disconnect; } void ags_reset_peak_init(AgsResetPeak *reset_peak) { AGS_TASK(reset_peak)->flags |= AGS_TASK_CYCLIC; reset_peak->peak_channel = NULL; } void ags_reset_peak_connect(AgsConnectable *connectable) { ags_reset_peak_parent_connectable_interface->connect(connectable); /* empty */ } void ags_reset_peak_disconnect(AgsConnectable *connectable) { ags_reset_peak_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_reset_peak_dispose(GObject *gobject) { AgsResetPeak *reset_peak; reset_peak = AGS_RESET_PEAK(gobject); if(reset_peak->peak_channel != NULL){ g_list_free_full(reset_peak->peak_channel, g_object_unref); reset_peak->peak_channel = NULL; } /* call parent */ G_OBJECT_CLASS(ags_reset_peak_parent_class)->dispose(gobject); } void ags_reset_peak_finalize(GObject *gobject) { AgsResetPeak *reset_peak; reset_peak = AGS_RESET_PEAK(gobject); if(reset_peak->peak_channel != NULL){ g_list_free_full(reset_peak->peak_channel, g_object_unref); } if(reset_peak == ags_reset_peak){ ags_reset_peak = NULL; } /* call parent */ G_OBJECT_CLASS(ags_reset_peak_parent_class)->finalize(gobject); } void ags_reset_peak_launch(AgsTask *task) { AgsResetPeak *reset_peak; GList *peak_channel; GValue value = {0,}; reset_peak = AGS_RESET_PEAK(task); pthread_mutex_lock(&peak_channel_mutex); peak_channel = reset_peak->peak_channel; g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, FALSE); while(peak_channel != NULL){ ags_port_safe_write(AGS_PEAK_CHANNEL(peak_channel->data)->buffer_computed, &value); peak_channel = peak_channel->next; } pthread_mutex_unlock(&peak_channel_mutex); g_value_unset(&value); } /** * ags_reset_peak_add: * @reset_peak: the #AgsResetPeak * @peak_channel: the #AgsPeakChannel * * Add @peak_channel. * * Since: 1.0.0 */ void ags_reset_peak_add(AgsResetPeak *reset_peak, AgsPeakChannel *peak_channel) { pthread_mutex_lock(&peak_channel_mutex); reset_peak->peak_channel = g_list_prepend(reset_peak->peak_channel, peak_channel); g_object_ref(peak_channel); pthread_mutex_unlock(&peak_channel_mutex); } /** * ags_reset_peak_remove: * @reset_peak: the #AgsResetPeak * @peak_channel: the #AgsPeakChannel * * Remove @peak_channel. * * Since: 1.0.0 */ void ags_reset_peak_remove(AgsResetPeak *reset_peak, AgsPeakChannel *peak_channel) { pthread_mutex_lock(&peak_channel_mutex); if(g_list_find(reset_peak->peak_channel, peak_channel) != NULL){ reset_peak->peak_channel = g_list_remove(reset_peak->peak_channel, peak_channel); g_object_unref(peak_channel); } pthread_mutex_unlock(&peak_channel_mutex); } /** * ags_reset_peak_get_instance: * * Get instance. * * Returns: the #AgsResetPeak * * Since: 1.0.0 */ AgsResetPeak* ags_reset_peak_get_instance() { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); if(ags_reset_peak == NULL){ AgsThread *main_loop; AgsTaskThread *task_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; gboolean no_soundcard; pthread_mutex_t *application_mutex; application_context = ags_application_context_get_instance(); mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get main loop */ pthread_mutex_lock(application_mutex); main_loop = application_context->main_loop; pthread_mutex_unlock(application_mutex); /* get task thread */ task_thread = (AgsTaskThread *) ags_thread_find_type(main_loop, AGS_TYPE_TASK_THREAD); ags_reset_peak = ags_reset_peak_new(); pthread_mutex_unlock(&mutex); ags_task_thread_append_cyclic_task(task_thread, ags_reset_peak); }else{ pthread_mutex_unlock(&mutex); } return(ags_reset_peak); } /** * ags_reset_peak_new: * * Creates an #AgsResetPeak. * * Returns: an new #AgsResetPeak. * * Since: 1.0.0 */ AgsResetPeak* ags_reset_peak_new() { AgsResetPeak *reset_peak; reset_peak = (AgsResetPeak *) g_object_new(AGS_TYPE_RESET_PEAK, NULL); return(reset_peak); } gsequencer-1.4.24/ags/audio/task/recall/ags_apply_bpm.h0000644000175000017500000000350413247044247017742 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_APPLY_BPM_H__ #define __AGS_APPLY_BPM_H__ #include #include #include #define AGS_TYPE_APPLY_BPM (ags_apply_bpm_get_type()) #define AGS_APPLY_BPM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPLY_BPM, AgsApplyBpm)) #define AGS_APPLY_BPM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_APPLY_BPM, AgsApplyBpmClass)) #define AGS_IS_APPLY_BPM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPLY_BPM)) #define AGS_IS_APPLY_BPM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_APPLY_BPM)) #define AGS_APPLY_BPM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_APPLY_BPM, AgsApplyBpmClass)) typedef struct _AgsApplyBpm AgsApplyBpm; typedef struct _AgsApplyBpmClass AgsApplyBpmClass; struct _AgsApplyBpm { AgsTask task; GObject *scope; gdouble bpm; }; struct _AgsApplyBpmClass { AgsTaskClass task; }; GType ags_apply_bpm_get_type(); AgsApplyBpm* ags_apply_bpm_new(GObject *scope, gdouble bpm); #endif /*__AGS_APPLY_BPM_H__*/ gsequencer-1.4.24/ags/audio/task/recall/ags_set_muted.h0000644000175000017500000000351213247044247017747 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SET_MUTED_H__ #define __AGS_SET_MUTED_H__ #include #include #include #define AGS_TYPE_SET_MUTED (ags_set_muted_get_type()) #define AGS_SET_MUTED(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SET_MUTED, AgsSetMuted)) #define AGS_SET_MUTED_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SET_MUTED, AgsSetMutedClass)) #define AGS_IS_SET_MUTED(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SET_MUTED)) #define AGS_IS_SET_MUTED_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SET_MUTED)) #define AGS_SET_MUTED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SET_MUTED, AgsSetMutedClass)) typedef struct _AgsSetMuted AgsSetMuted; typedef struct _AgsSetMutedClass AgsSetMutedClass; struct _AgsSetMuted { AgsTask task; GObject *scope; gboolean muted; }; struct _AgsSetMutedClass { AgsTaskClass task; }; GType ags_set_muted_get_type(); AgsSetMuted* ags_set_muted_new(GObject *scope, gboolean muted); #endif /*__AGS_SET_MUTED_H__*/ gsequencer-1.4.24/ags/audio/task/recall/ags_apply_sequencer_length.h0000644000175000017500000000423413247044247022520 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_APPLY_SEQUENCER_LENGTH_H__ #define __AGS_APPLY_SEQUENCER_LENGTH_H__ #include #include #include #define AGS_TYPE_APPLY_SEQUENCER_LENGTH (ags_apply_sequencer_length_get_type()) #define AGS_APPLY_SEQUENCER_LENGTH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPLY_SEQUENCER_LENGTH, AgsApplySequencerLength)) #define AGS_APPLY_SEQUENCER_LENGTH_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_APPLY_SEQUENCER_LENGTH, AgsApplySequencerLengthClass)) #define AGS_IS_APPLY_SEQUENCER_LENGTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPLY_SEQUENCER_LENGTH)) #define AGS_IS_APPLY_SEQUENCER_LENGTH_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_APPLY_SEQUENCER_LENGTH)) #define AGS_APPLY_SEQUENCER_LENGTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_APPLY_SEQUENCER_LENGTH, AgsApplySequencerLengthClass)) typedef struct _AgsApplySequencerLength AgsApplySequencerLength; typedef struct _AgsApplySequencerLengthClass AgsApplySequencerLengthClass; struct _AgsApplySequencerLength { AgsTask task; GObject *scope; gdouble length; }; struct _AgsApplySequencerLengthClass { AgsTaskClass task; }; GType ags_apply_sequencer_length_get_type(); AgsApplySequencerLength* ags_apply_sequencer_length_new(GObject *scope, gdouble length); #endif /*__AGS_APPLY_SEQUENCER_LENGTH_H__*/ gsequencer-1.4.24/ags/audio/task/recall/ags_apply_tact.c0000644000175000017500000003121513247044247020112 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_apply_tact_class_init(AgsApplyTactClass *apply_tact); void ags_apply_tact_connectable_interface_init(AgsConnectableInterface *connectable); void ags_apply_tact_init(AgsApplyTact *apply_tact); void ags_apply_tact_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_apply_tact_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_apply_tact_connect(AgsConnectable *connectable); void ags_apply_tact_disconnect(AgsConnectable *connectable); void ags_apply_tact_dispose(GObject *gobject); void ags_apply_tact_finalize(GObject *gobject); void ags_apply_tact_launch(AgsTask *task); void ags_apply_tact_recall(AgsApplyTact *apply_tact, AgsRecall *recall); void ags_apply_tact_channel(AgsApplyTact *apply_tact, AgsChannel *channel); void ags_apply_tact_audio(AgsApplyTact *apply_tact, AgsAudio *audio); void ags_apply_tact_soundcard(AgsApplyTact *apply_tact, GObject *soundcard); /** * SECTION:ags_apply_tact * @short_description: apply tact to delay audio * @title: AgsApplyTact * @section_id: * @include: ags/audio/task/recall/ags_apply_tact.h * * The #AgsApplyTact task applys tact to #AgsTactable. */ enum{ PROP_0, PROP_SCOPE, PROP_TACT, }; static gpointer ags_apply_tact_parent_class = NULL; static AgsConnectableInterface *ags_apply_tact_parent_connectable_interface; GType ags_apply_tact_get_type() { static GType ags_type_apply_tact = 0; if(!ags_type_apply_tact){ static const GTypeInfo ags_apply_tact_info = { sizeof (AgsApplyTactClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_apply_tact_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsApplyTact), 0, /* n_preallocs */ (GInstanceInitFunc) ags_apply_tact_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_apply_tact_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_apply_tact = g_type_register_static(AGS_TYPE_TASK, "AgsApplyTact", &ags_apply_tact_info, 0); g_type_add_interface_static(ags_type_apply_tact, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_apply_tact); } void ags_apply_tact_class_init(AgsApplyTactClass *apply_tact) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_apply_tact_parent_class = g_type_class_peek_parent(apply_tact); /* GObjectClass */ gobject = (GObjectClass *) apply_tact; gobject->set_property = ags_apply_tact_set_property; gobject->get_property = ags_apply_tact_get_property; gobject->dispose = ags_apply_tact_dispose; gobject->finalize = ags_apply_tact_finalize; /* properties */ /** * AgsApplyTact:scope: * * The assigned #GObject as scope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("scope", i18n_pspec("scope of set buffer size"), i18n_pspec("The scope of set buffer size"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCOPE, param_spec); /** * AgsApplyTact:tact: * * The tact to apply to scope. * * Since: 1.0.0 */ param_spec = g_param_spec_double("tact", i18n_pspec("tact"), i18n_pspec("The tact to apply"), 0, G_MAXDOUBLE, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TACT, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) apply_tact; task->launch = ags_apply_tact_launch; } void ags_apply_tact_connectable_interface_init(AgsConnectableInterface *connectable) { ags_apply_tact_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_apply_tact_connect; connectable->disconnect = ags_apply_tact_disconnect; } void ags_apply_tact_init(AgsApplyTact *apply_tact) { apply_tact->scope = NULL; apply_tact->tact = 0.0; } void ags_apply_tact_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsApplyTact *apply_tact; apply_tact = AGS_APPLY_TACT(gobject); switch(prop_id){ case PROP_SCOPE: { GObject *scope; scope = (GObject *) g_value_get_object(value); if(apply_tact->scope == (GObject *) scope){ return; } if(apply_tact->scope != NULL){ g_object_unref(apply_tact->scope); } if(scope != NULL){ g_object_ref(scope); } apply_tact->scope = (GObject *) scope; } break; case PROP_TACT: { apply_tact->tact = g_value_get_double(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_tact_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsApplyTact *apply_tact; apply_tact = AGS_APPLY_TACT(gobject); switch(prop_id){ case PROP_SCOPE: { g_value_set_object(value, apply_tact->scope); } break; case PROP_TACT: { g_value_set_double(value, apply_tact->tact); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_tact_connect(AgsConnectable *connectable) { ags_apply_tact_parent_connectable_interface->connect(connectable); /* empty */ } void ags_apply_tact_disconnect(AgsConnectable *connectable) { ags_apply_tact_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_apply_tact_dispose(GObject *gobject) { AgsApplyTact *apply_tact; apply_tact = AGS_APPLY_TACT(gobject); if(apply_tact->scope != NULL){ g_object_unref(apply_tact->scope); apply_tact->scope = NULL; } /* call parent */ G_OBJECT_CLASS(ags_apply_tact_parent_class)->dispose(gobject); } void ags_apply_tact_finalize(GObject *gobject) { AgsApplyTact *apply_tact; apply_tact = AGS_APPLY_TACT(gobject); if(apply_tact->scope != NULL){ g_object_unref(apply_tact->scope); } /* call parent */ G_OBJECT_CLASS(ags_apply_tact_parent_class)->finalize(gobject); } void ags_apply_tact_launch(AgsTask *task) { AgsApplyTact *apply_tact; apply_tact = AGS_APPLY_TACT(task); if(AGS_IS_SOUNDCARD(apply_tact->scope)){ GObject *soundcard; soundcard = apply_tact->scope; ags_apply_tact_soundcard(apply_tact, soundcard); }else if(AGS_IS_AUDIO(apply_tact->scope)){ AgsAudio *audio; audio = AGS_AUDIO(apply_tact->scope); ags_apply_tact_audio(apply_tact, audio); }else if(AGS_IS_CHANNEL(apply_tact->scope)){ AgsChannel *channel; channel = AGS_CHANNEL(apply_tact->scope); ags_apply_tact_channel(apply_tact, channel); }else if(AGS_IS_RECALL(apply_tact->scope)){ AgsRecall *recall; recall = AGS_RECALL(apply_tact->scope); ags_apply_tact_recall(apply_tact, recall); }else{ g_warning("AgsApplyTact: Not supported scope"); } } void ags_apply_tact_recall(AgsApplyTact *apply_tact, AgsRecall *recall) { if(AGS_IS_TACTABLE(recall)){ ags_tactable_change_tact(AGS_TACTABLE(recall), ags_tactable_get_tact(AGS_TACTABLE(recall)), apply_tact->tact); } } void ags_apply_tact_channel(AgsApplyTact *apply_tact, AgsChannel *channel) { AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply tact */ pthread_mutex_lock(channel_mutex); list = channel->play; while(list != NULL){ ags_apply_tact_recall(apply_tact, AGS_RECALL(list->data)); list = list->next; } list = channel->recall; while(list != NULL){ ags_apply_tact_recall(apply_tact, AGS_RECALL(list->data)); list = list->next; } pthread_mutex_unlock(channel_mutex); } void ags_apply_tact_audio(AgsApplyTact *apply_tact, AgsAudio *audio) { AgsChannel *input, *output; AgsChannel *channel; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; /* AgsRecall */ list = audio->play; while(list != NULL){ ags_apply_tact_recall(apply_tact, AGS_RECALL(list->data)); list = list->next; } list = audio->recall; while(list != NULL){ ags_apply_tact_recall(apply_tact, AGS_RECALL(list->data)); list = list->next; } pthread_mutex_unlock(audio_mutex); /* AgsChannel */ channel = output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply tact */ ags_apply_tact_channel(apply_tact, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* apply tact */ ags_apply_tact_channel(apply_tact, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } void ags_apply_tact_soundcard(AgsApplyTact *apply_tact, GObject *soundcard) { AgsMutexManager *mutex_manager; GList *list_start, *list; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* set delay factor and get audio */ pthread_mutex_lock(soundcard); ags_soundcard_set_delay_factor(AGS_SOUNDCARD(soundcard), apply_tact->tact); list = list_start = g_list_copy(ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard))); pthread_mutex_unlock(soundcard); /* AgsAudio */ list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); while(list != NULL){ ags_apply_tact_audio(apply_tact, AGS_AUDIO(list->data)); list = list->next; } g_list_free(list_start); } /** * ags_apply_tact_new: * @scope: the #GObject * @tact: the tact to apply * * Creates an #AgsApplyTact. * * Returns: an new #AgsApplyTact. * * Since: 1.0.0 */ AgsApplyTact* ags_apply_tact_new(GObject *scope, gdouble tact) { AgsApplyTact *apply_tact; apply_tact = (AgsApplyTact *) g_object_new(AGS_TYPE_APPLY_TACT, "scope", scope, "tact", tact, NULL); return(apply_tact); } gsequencer-1.4.24/ags/audio/task/ags_clear_audio_signal.h0000644000175000017500000000417113246707333020323 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CLEAR_AUDIO_SIGNAL_H__ #define __AGS_CLEAR_AUDIO_SIGNAL_H__ #include #include #include #include #include #define AGS_TYPE_CLEAR_AUDIO_SIGNAL (ags_clear_audio_signal_get_type()) #define AGS_CLEAR_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CLEAR_AUDIO_SIGNAL, AgsClearAudioSignal)) #define AGS_CLEAR_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CLEAR_AUDIO_SIGNAL, AgsClearAudioSignalClass)) #define AGS_IS_CLEAR_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CLEAR_AUDIO_SIGNAL)) #define AGS_IS_CLEAR_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CLEAR_AUDIO_SIGNAL)) #define AGS_CLEAR_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CLEAR_AUDIO_SIGNAL, AgsClearAudioSignalClass)) typedef struct _AgsClearAudioSignal AgsClearAudioSignal; typedef struct _AgsClearAudioSignalClass AgsClearAudioSignalClass; struct _AgsClearAudioSignal { AgsTask task; AgsAudioSignal *audio_signal; }; struct _AgsClearAudioSignalClass { AgsTaskClass task; }; GType ags_clear_audio_signal_get_type(); AgsClearAudioSignal* ags_clear_audio_signal_new(AgsAudioSignal *audio_signal); #endif /*__AGS_CLEAR_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_seek_soundcard.c0000644000175000017500000002634313247044247017507 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_seek_soundcard_class_init(AgsSeekSoundcardClass *seek_soundcard); void ags_seek_soundcard_connectable_interface_init(AgsConnectableInterface *connectable); void ags_seek_soundcard_init(AgsSeekSoundcard *seek_soundcard); void ags_seek_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_seek_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_seek_soundcard_connect(AgsConnectable *connectable); void ags_seek_soundcard_disconnect(AgsConnectable *connectable); void ags_seek_soundcard_dispose(GObject *gobject); void ags_seek_soundcard_finalize(GObject *gobject); void ags_seek_soundcard_launch(AgsTask *task); /** * SECTION:ags_seek_soundcard * @short_description: seek soundcard object * @title: AgsSeekSoundcard * @section_id: * @include: ags/audio/task/ags_seek_soundcard.h * * The #AgsSeekSoundcard task seeks #AgsSoundcard. */ static gpointer ags_seek_soundcard_parent_class = NULL; static AgsConnectableInterface *ags_seek_soundcard_parent_connectable_interface; enum{ PROP_0, PROP_SOUNDCARD, PROP_STEPS, PROP_MOVE_FORWARD, }; GType ags_seek_soundcard_get_type() { static GType ags_type_seek_soundcard = 0; if(!ags_type_seek_soundcard){ static const GTypeInfo ags_seek_soundcard_info = { sizeof (AgsSeekSoundcardClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_seek_soundcard_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSeekSoundcard), 0, /* n_preallocs */ (GInstanceInitFunc) ags_seek_soundcard_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_seek_soundcard_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_seek_soundcard = g_type_register_static(AGS_TYPE_TASK, "AgsSeekSoundcard", &ags_seek_soundcard_info, 0); g_type_add_interface_static(ags_type_seek_soundcard, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_seek_soundcard); } void ags_seek_soundcard_class_init(AgsSeekSoundcardClass *seek_soundcard) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_seek_soundcard_parent_class = g_type_class_peek_parent(seek_soundcard); /* gobject */ gobject = (GObjectClass *) seek_soundcard; gobject->set_property = ags_seek_soundcard_set_property; gobject->get_property = ags_seek_soundcard_get_property; gobject->dispose = ags_seek_soundcard_dispose; gobject->finalize = ags_seek_soundcard_finalize; /* properties */ /** * AgsSeekSoundcard:soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of seek soundcard"), i18n_pspec("The soundcard of seek soundcard"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsSeekSoundcard:steps: * * The amount of steps to seek. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("steps", i18n_pspec("steps"), i18n_pspec("The amount of steps"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STEPS, param_spec); /** * AgsSeekSoundcard:move-forward: * * The notation's move-forward. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("move-forward", i18n_pspec("move forward"), i18n_pspec("Do moving forward"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MOVE_FORWARD, param_spec); /* task */ task = (AgsTaskClass *) seek_soundcard; task->launch = ags_seek_soundcard_launch; } void ags_seek_soundcard_connectable_interface_init(AgsConnectableInterface *connectable) { ags_seek_soundcard_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_seek_soundcard_connect; connectable->disconnect = ags_seek_soundcard_disconnect; } void ags_seek_soundcard_init(AgsSeekSoundcard *seek_soundcard) { seek_soundcard->soundcard = NULL; seek_soundcard->steps = 0; seek_soundcard->move_forward = FALSE; } void ags_seek_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSeekSoundcard *seek_soundcard; seek_soundcard = AGS_SEEK_SOUNDCARD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(seek_soundcard->soundcard == (GObject *) soundcard){ return; } if(seek_soundcard->soundcard != NULL){ g_object_unref(seek_soundcard->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } seek_soundcard->soundcard = (GObject *) soundcard; } break; case PROP_STEPS: { seek_soundcard->steps = g_value_get_uint(value); } break; case PROP_MOVE_FORWARD: { seek_soundcard->move_forward = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_seek_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSeekSoundcard *seek_soundcard; seek_soundcard = AGS_SEEK_SOUNDCARD(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, seek_soundcard->soundcard); } break; case PROP_STEPS: { g_value_set_uint(value, seek_soundcard->steps); } break; case PROP_MOVE_FORWARD: { g_value_set_boolean(value, seek_soundcard->move_forward); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_seek_soundcard_connect(AgsConnectable *connectable) { ags_seek_soundcard_parent_connectable_interface->connect(connectable); /* empty */ } void ags_seek_soundcard_disconnect(AgsConnectable *connectable) { ags_seek_soundcard_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_seek_soundcard_dispose(GObject *gobject) { AgsSeekSoundcard *seek_soundcard; seek_soundcard = AGS_SEEK_SOUNDCARD(gobject); if(seek_soundcard->soundcard != NULL){ g_object_unref(seek_soundcard->soundcard); seek_soundcard->soundcard = NULL; } /* call parent */ G_OBJECT_CLASS(ags_seek_soundcard_parent_class)->dispose(gobject); } void ags_seek_soundcard_finalize(GObject *gobject) { AgsSeekSoundcard *seek_soundcard; seek_soundcard = AGS_SEEK_SOUNDCARD(gobject); if(seek_soundcard->soundcard != NULL){ g_object_unref(seek_soundcard->soundcard); } /* call parent */ G_OBJECT_CLASS(ags_seek_soundcard_parent_class)->finalize(gobject); } void ags_seek_soundcard_launch(AgsTask *task) { AgsSeekSoundcard *seek_soundcard; AgsMutexManager *mutex_manager; GObject *soundcard; GList *audio_start, *audio; GList *recall; guint note_offset; guint note_offset_absolute; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *audio_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); seek_soundcard = AGS_SEEK_SOUNDCARD(task); soundcard = seek_soundcard->soundcard; /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* seek audio */ pthread_mutex_lock(soundcard); audio = audio_start = g_list_copy(ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard))); pthread_mutex_unlock(soundcard); while(audio != NULL){ /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio->data); pthread_mutex_unlock(application_mutex); /* seek recall */ pthread_mutex_lock(audio_mutex); recall = AGS_AUDIO(audio->data)->play; while(recall != NULL){ if(AGS_IS_SEEKABLE(recall->data)){ ags_seekable_seek(AGS_SEEKABLE(recall->data), seek_soundcard->steps, seek_soundcard->move_forward); } recall = recall->next; } pthread_mutex_unlock(audio_mutex); audio = audio->next; } g_list_free(audio_start); /* seek soundcard */ pthread_mutex_lock(soundcard); note_offset = ags_soundcard_get_note_offset(AGS_SOUNDCARD(seek_soundcard->soundcard)); note_offset_absolute = ags_soundcard_get_note_offset_absolute(AGS_SOUNDCARD(seek_soundcard->soundcard)); if(seek_soundcard->move_forward){ ags_soundcard_set_note_offset(AGS_SOUNDCARD(seek_soundcard->soundcard), note_offset + seek_soundcard->steps); ags_soundcard_set_note_offset_absolute(AGS_SOUNDCARD(seek_soundcard->soundcard), note_offset_absolute + seek_soundcard->steps); }else{ if(note_offset > seek_soundcard->steps){ ags_soundcard_set_note_offset(AGS_SOUNDCARD(seek_soundcard->soundcard), note_offset - seek_soundcard->steps); ags_soundcard_set_note_offset_absolute(AGS_SOUNDCARD(seek_soundcard->soundcard), note_offset_absolute - seek_soundcard->steps); }else{ ags_soundcard_set_note_offset(AGS_SOUNDCARD(seek_soundcard->soundcard), 0.0); ags_soundcard_set_note_offset_absolute(AGS_SOUNDCARD(seek_soundcard->soundcard), 0.0); } } pthread_mutex_unlock(soundcard); } /** * ags_seek_soundcard_new: * @soundcard: the #AgsSoundcard to seek * @steps: steps * @move_forward: moves forward if %TRUE, otherwise backward * * Creates an #AgsSeekSoundcard. * * Returns: an new #AgsSeekSoundcard. * * Since: 1.0.0 */ AgsSeekSoundcard* ags_seek_soundcard_new(GObject *soundcard, guint steps, gboolean move_forward) { AgsSeekSoundcard *seek_soundcard; seek_soundcard = (AgsSeekSoundcard *) g_object_new(AGS_TYPE_SEEK_SOUNDCARD, "soundcard", soundcard, "steps", steps, "move-forward", move_forward, NULL); return(seek_soundcard); } gsequencer-1.4.24/ags/audio/task/ags_link_channel.h0000644000175000017500000000372413247044247017146 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_LINK_CHANNEL_H__ #define __AGS_LINK_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_LINK_CHANNEL (ags_link_channel_get_type()) #define AGS_LINK_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_LINK_CHANNEL, AgsLinkChannel)) #define AGS_LINK_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_LINK_CHANNEL, AgsLinkChannelClass)) #define AGS_IS_LINK_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_LINK_CHANNEL)) #define AGS_IS_LINK_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_LINK_CHANNEL)) #define AGS_LINK_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_LINK_CHANNEL, AgsLinkChannelClass)) typedef struct _AgsLinkChannel AgsLinkChannel; typedef struct _AgsLinkChannelClass AgsLinkChannelClass; struct _AgsLinkChannel { AgsTask task; AgsChannel *channel; AgsChannel *link; GError *error; }; struct _AgsLinkChannelClass { AgsTaskClass task; }; GType ags_link_channel_get_type(); AgsLinkChannel* ags_link_channel_new(AgsChannel *channel, AgsChannel *link); #endif /*__AGS_LINK_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_apply_presets.h0000644000175000017500000000425013247044247017406 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_APPLY_PRESETS_H__ #define __AGS_APPLY_PRESETS_H__ #include #include #include #define AGS_TYPE_APPLY_PRESETS (ags_apply_presets_get_type()) #define AGS_APPLY_PRESETS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPLY_PRESETS, AgsApplyPresets)) #define AGS_APPLY_PRESETS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_APPLY_PRESETS, AgsApplyPresetsClass)) #define AGS_IS_APPLY_PRESETS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPLY_PRESETS)) #define AGS_IS_APPLY_PRESETS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_APPLY_PRESETS)) #define AGS_APPLY_PRESETS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_APPLY_PRESETS, AgsApplyPresetsClass)) typedef struct _AgsApplyPresets AgsApplyPresets; typedef struct _AgsApplyPresetsClass AgsApplyPresetsClass; struct _AgsApplyPresets { AgsTask task; GObject *scope; guint pcm_channels; guint samplerate; guint buffer_size; guint format; }; struct _AgsApplyPresetsClass { AgsTaskClass task; }; GType ags_apply_presets_get_type(); void ags_apply_presets_soundcard(AgsApplyPresets *apply_presets, GObject *soundcard); AgsApplyPresets* ags_apply_presets_new(GObject *scope, guint pcm_channels, guint samplerate, guint buffer_size, guint format); #endif /*__AGS_APPLY_PRESETS_H__*/ gsequencer-1.4.24/ags/audio/task/ags_append_audio_threaded.h0000644000175000017500000000422513247044247021006 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_APPEND_AUDIO_THREADED_H__ #define __AGS_APPEND_AUDIO_THREADED_H__ #include #include #include #define AGS_TYPE_APPEND_AUDIO_THREADED (ags_append_audio_threaded_get_type()) #define AGS_APPEND_AUDIO_THREADED(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPEND_AUDIO_THREADED, AgsAppendAudioThreaded)) #define AGS_APPEND_AUDIO_THREADED_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_APPEND_AUDIO_THREADED, AgsAppendAudioThreadedClass)) #define AGS_IS_APPEND_AUDIO_THREADED(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPEND_AUDIO_THREADED)) #define AGS_IS_APPEND_AUDIO_THREADED_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_APPEND_AUDIO_THREADED)) #define AGS_APPEND_AUDIO_THREADED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_APPEND_AUDIO_THREADED, AgsAppendAudioThreadedClass)) typedef struct _AgsAppendAudioThreaded AgsAppendAudioThreaded; typedef struct _AgsAppendAudioThreadedClass AgsAppendAudioThreadedClass; struct _AgsAppendAudioThreaded { AgsTask task; GObject *audio_loop; GObject *playback; }; struct _AgsAppendAudioThreadedClass { AgsTaskClass task; }; GType ags_append_audio_threaded_get_type(); AgsAppendAudioThreaded* ags_append_audio_threaded_new(GObject *audio_loop, GObject *playback); #endif /*__AGS_APPEND_AUDIO_THREADED_H__*/ gsequencer-1.4.24/ags/audio/task/ags_set_format.c0000644000175000017500000003067413247044247016663 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_set_format_class_init(AgsSetFormatClass *set_format); void ags_set_format_connectable_interface_init(AgsConnectableInterface *connectable); void ags_set_format_init(AgsSetFormat *set_format); void ags_set_format_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_set_format_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_set_format_connect(AgsConnectable *connectable); void ags_set_format_disconnect(AgsConnectable *connectable); void ags_set_format_dispose(GObject *gobject); void ags_set_format_finalize(GObject *gobject); void ags_set_format_launch(AgsTask *task); void ags_set_format_audio_signal(AgsSetFormat *set_format, AgsAudioSignal *audio_signal); void ags_set_format_recycling(AgsSetFormat *set_format, AgsRecycling *recycling); void ags_set_format_channel(AgsSetFormat *set_format, AgsChannel *channel); void ags_set_format_audio(AgsSetFormat *set_format, AgsAudio *audio); void ags_set_format_soundcard(AgsSetFormat *set_format, GObject *soundcard); /** * SECTION:ags_set_format * @short_description: resets format * @title: AgsSetFormat * @section_id: * @include: ags/audio/task/ags_set_format.h * * The #AgsSetFormat task resets format of scope. */ static gpointer ags_set_format_parent_class = NULL; static AgsConnectableInterface *ags_set_format_parent_connectable_interface; enum{ PROP_0, PROP_SCOPE, PROP_FORMAT, }; GType ags_set_format_get_type() { static GType ags_type_set_format = 0; if(!ags_type_set_format){ static const GTypeInfo ags_set_format_info = { sizeof (AgsSetFormatClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_set_format_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSetFormat), 0, /* n_preallocs */ (GInstanceInitFunc) ags_set_format_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_set_format_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_set_format = g_type_register_static(AGS_TYPE_TASK, "AgsSetFormat", &ags_set_format_info, 0); g_type_add_interface_static(ags_type_set_format, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_set_format); } void ags_set_format_class_init(AgsSetFormatClass *set_format) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_set_format_parent_class = g_type_class_peek_parent(set_format); /* gobject */ gobject = (GObjectClass *) set_format; gobject->set_property = ags_set_format_set_property; gobject->get_property = ags_set_format_get_property; gobject->dispose = ags_set_format_dispose; gobject->finalize = ags_set_format_finalize; /* properties */ /** * AgsSetFormat:scope: * * The assigned #GObject as scope. * * Since: 1.0.0 */ param_spec = g_param_spec_object("scope", i18n_pspec("scope of set format"), i18n_pspec("The scope of set format"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCOPE, param_spec); /** * AgsSetFormat:format: * * The format to apply to scope. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("format"), i18n_pspec("The format to apply"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /* task */ task = (AgsTaskClass *) set_format; task->launch = ags_set_format_launch; } void ags_set_format_connectable_interface_init(AgsConnectableInterface *connectable) { ags_set_format_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_set_format_connect; connectable->disconnect = ags_set_format_disconnect; } void ags_set_format_init(AgsSetFormat *set_format) { set_format->scope = NULL; set_format->format = 16; } void ags_set_format_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSetFormat *set_format; set_format = AGS_SET_FORMAT(gobject); switch(prop_id){ case PROP_SCOPE: { GObject *scope; scope = (GObject *) g_value_get_object(value); if(set_format->scope == (GObject *) scope){ return; } if(set_format->scope != NULL){ g_object_unref(set_format->scope); } if(scope != NULL){ g_object_ref(scope); } set_format->scope = (GObject *) scope; } break; case PROP_FORMAT: { set_format->format = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_format_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSetFormat *set_format; set_format = AGS_SET_FORMAT(gobject); switch(prop_id){ case PROP_SCOPE: { g_value_set_object(value, set_format->scope); } break; case PROP_FORMAT: { g_value_set_uint(value, set_format->format); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_format_connect(AgsConnectable *connectable) { ags_set_format_parent_connectable_interface->connect(connectable); /* empty */ } void ags_set_format_disconnect(AgsConnectable *connectable) { ags_set_format_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_set_format_dispose(GObject *gobject) { AgsSetFormat *set_format; set_format = AGS_SET_FORMAT(gobject); if(set_format->scope != NULL){ g_object_unref(set_format->scope); set_format->scope = NULL; } /* call parent */ G_OBJECT_CLASS(ags_set_format_parent_class)->dispose(gobject); } void ags_set_format_finalize(GObject *gobject) { AgsSetFormat *set_format; set_format = AGS_SET_FORMAT(gobject); if(set_format->scope != NULL){ g_object_unref(set_format->scope); } /* call parent */ G_OBJECT_CLASS(ags_set_format_parent_class)->finalize(gobject); } void ags_set_format_launch(AgsTask *task) { AgsSetFormat *set_format; GObject *scope; set_format = AGS_SET_FORMAT(task); scope = set_format->scope; if(AGS_IS_SOUNDCARD(scope)){ ags_set_format_soundcard(set_format, scope); }else if(AGS_IS_AUDIO(scope)){ ags_set_format_audio(set_format, AGS_AUDIO(scope)); }else if(AGS_IS_CHANNEL(scope)){ ags_set_format_channel(set_format, AGS_CHANNEL(scope)); }else if(AGS_IS_RECYCLING(scope)){ ags_set_format_recycling(set_format, AGS_RECYCLING(scope)); }else if(AGS_IS_AUDIO_SIGNAL(scope)){ ags_set_format_audio_signal(set_format, AGS_AUDIO_SIGNAL(scope)); } } void ags_set_format_audio_signal(AgsSetFormat *set_format, AgsAudioSignal *audio_signal) { g_object_set(audio_signal, "format", set_format->format, NULL); } void ags_set_format_recycling(AgsSetFormat *set_format, AgsRecycling *recycling) { AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) recycling); pthread_mutex_unlock(application_mutex); /* set format audio signal */ pthread_mutex_lock(recycling_mutex); list = recycling->audio_signal; while(list != NULL){ ags_set_format_audio_signal(set_format, AGS_AUDIO_SIGNAL(list->data)); list = list->next; } pthread_mutex_unlock(recycling_mutex); } void ags_set_format_channel(AgsSetFormat *set_format, AgsChannel *channel) { g_object_set(channel, "format", set_format->format, NULL); } void ags_set_format_audio(AgsSetFormat *set_format, AgsAudio *audio) { AgsChannel *input, *output; AgsChannel *channel; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; pthread_mutex_unlock(audio_mutex); /* AgsOutput */ channel = output; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* set format */ ags_set_format_channel(set_format, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* AgsInput */ channel = input; while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* set format */ ags_set_format_channel(set_format, channel); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } void ags_set_format_soundcard(AgsSetFormat *set_format, GObject *soundcard) { AgsMutexManager *mutex_manager; GList *list_start, *list; guint channels; guint samplerate; guint buffer_size; guint format; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), &channels, &samplerate, &buffer_size, &format); ags_soundcard_set_presets(AGS_SOUNDCARD(soundcard), channels, samplerate, buffer_size, set_format->format); pthread_mutex_unlock(soundcard_mutex); /* AgsAudio */ list = list_start = g_list_copy(ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard))); while(list != NULL){ ags_set_format_audio(set_format, AGS_AUDIO(list->data)); list = list->next; } g_list_free(list_start); } /** * ags_set_format_new: * @scope: the #GObject to reset * @format: the new format * * Creates an #AgsSetFormat. * * Returns: an new #AgsSetFormat. * * Since: 1.0.0 */ AgsSetFormat* ags_set_format_new(GObject *scope, guint format) { AgsSetFormat *set_format; set_format = (AgsSetFormat *) g_object_new(AGS_TYPE_SET_FORMAT, "scope", scope, "format", format, NULL); return(set_format); } gsequencer-1.4.24/ags/audio/task/ags_open_file.h0000644000175000017500000000375113247044247016461 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OPEN_FILE_H__ #define __AGS_OPEN_FILE_H__ #include #include #include #define AGS_TYPE_OPEN_FILE (ags_open_file_get_type()) #define AGS_OPEN_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_OPEN_FILE, AgsOpenFile)) #define AGS_OPEN_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_OPEN_FILE, AgsOpenFileClass)) #define AGS_IS_OPEN_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_OPEN_FILE)) #define AGS_IS_OPEN_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_OPEN_FILE)) #define AGS_OPEN_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_OPEN_FILE, AgsOpenFileClass)) typedef struct _AgsOpenFile AgsOpenFile; typedef struct _AgsOpenFileClass AgsOpenFileClass; struct _AgsOpenFile { AgsTask task; AgsAudio *audio; GSList *filenames; gboolean overwrite_channels; gboolean create_channels; }; struct _AgsOpenFileClass { AgsTaskClass task; }; GType ags_open_file_get_type(); AgsOpenFile* ags_open_file_new(AgsAudio *audio, GSList *filenames, gboolean overwrite_channels, gboolean create_channels); #endif /*__AGS_OPEN_FILE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_apply_presets.c0000644000175000017500000003702013247044247017402 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_apply_presets_class_init(AgsApplyPresetsClass *apply_presets); void ags_apply_presets_connectable_interface_init(AgsConnectableInterface *connectable); void ags_apply_presets_init(AgsApplyPresets *apply_presets); void ags_apply_presets_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_apply_presets_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_apply_presets_connect(AgsConnectable *connectable); void ags_apply_presets_disconnect(AgsConnectable *connectable); void ags_apply_presets_dispose(GObject *gobject); void ags_apply_presets_finalize(GObject *gobject); void ags_apply_presets_launch(AgsTask *task); void ags_apply_presets_audio(AgsApplyPresets *apply_presets, AgsAudio *audio); void ags_apply_presets_channel(AgsApplyPresets *apply_presets, AgsChannel *channel); void ags_apply_presets_audio_signal(AgsApplyPresets *apply_presets, AgsAudioSignal *audio_signal); /** * SECTION:ags_apply_presets * @short_description: apply presets * @title: AgsApplyPresets * @section_id: * @include: ags/audio/task/ags_apply_presets.h * * The #AgsApplyPresets task apply the specified presets. */ enum{ PROP_0, PROP_SCOPE, PROP_PCM_CHANNELS, PROP_SAMPLERATE, PROP_BUFFER_SIZE, PROP_FORMAT, }; static gpointer ags_apply_presets_parent_class = NULL; static AgsConnectableInterface *ags_apply_presets_parent_connectable_interface; GType ags_apply_presets_get_type() { static GType ags_type_apply_presets = 0; if(!ags_type_apply_presets){ static const GTypeInfo ags_apply_presets_info = { sizeof (AgsApplyPresetsClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_apply_presets_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsApplyPresets), 0, /* n_preallocs */ (GInstanceInitFunc) ags_apply_presets_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_apply_presets_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_apply_presets = g_type_register_static(AGS_TYPE_TASK, "AgsApplyPresets", &ags_apply_presets_info, 0); g_type_add_interface_static(ags_type_apply_presets, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_apply_presets); } void ags_apply_presets_class_init(AgsApplyPresetsClass *apply_presets) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_apply_presets_parent_class = g_type_class_peek_parent(apply_presets); /* GObjectClass */ gobject = (GObjectClass *) apply_presets; gobject->set_property = ags_apply_presets_set_property; gobject->get_property = ags_apply_presets_get_property; gobject->dispose = ags_apply_presets_dispose; gobject->finalize = ags_apply_presets_finalize; /* properties */ /** * AgsApplyPresets:scope: * * The assigned #GObject * * Since: 1.0.0 */ param_spec = g_param_spec_object("scope", i18n_pspec("scope of apply presets"), i18n_pspec("The scope of apply presets task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SCOPE, param_spec); /** * AgsApplyPresets:pcm-channels: * * The count of pcm-channels to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pcm-channels", i18n_pspec("pcm channel count"), i18n_pspec("The count of pcm channels"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PCM_CHANNELS, param_spec); /** * AgsApplyPresets:samplerate: * * The count of samplerate to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("samplerate"), i18n_pspec("The samplerate to apply"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsApplyPresets:buffer-size: * * The count of buffer-size to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("buffer size"), i18n_pspec("The buffer size to apply"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsApplyPresets:format: * * The count of format to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("format"), i18n_pspec("The format to apply"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) apply_presets; task->launch = ags_apply_presets_launch; } void ags_apply_presets_connectable_interface_init(AgsConnectableInterface *connectable) { ags_apply_presets_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_apply_presets_connect; connectable->disconnect = ags_apply_presets_disconnect; } void ags_apply_presets_init(AgsApplyPresets *apply_presets) { apply_presets->scope = NULL; apply_presets->pcm_channels = 0; apply_presets->samplerate = 0; apply_presets->buffer_size = 0; apply_presets->format = 0; } void ags_apply_presets_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsApplyPresets *apply_presets; apply_presets = AGS_APPLY_PRESETS(gobject); switch(prop_id){ case PROP_SCOPE: { GObject *scope; scope = (GObject *) g_value_get_object(value); if(apply_presets->scope == (GObject *) scope){ return; } if(apply_presets->scope != NULL){ g_object_unref(apply_presets->scope); } if(scope != NULL){ g_object_ref(scope); } apply_presets->scope = (GObject *) scope; } break; case PROP_PCM_CHANNELS: { apply_presets->pcm_channels = g_value_get_uint(value); } break; case PROP_SAMPLERATE: { apply_presets->samplerate = g_value_get_uint(value); } break; case PROP_BUFFER_SIZE: { apply_presets->buffer_size = g_value_get_uint(value); } break; case PROP_FORMAT: { apply_presets->format = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_presets_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsApplyPresets *apply_presets; apply_presets = AGS_APPLY_PRESETS(gobject); switch(prop_id){ case PROP_SCOPE: { g_value_set_object(value, apply_presets->scope); } break; case PROP_PCM_CHANNELS: { g_value_set_uint(value, apply_presets->pcm_channels); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, apply_presets->samplerate); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, apply_presets->buffer_size); } break; case PROP_FORMAT: { g_value_set_uint(value, apply_presets->format); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_presets_connect(AgsConnectable *connectable) { ags_apply_presets_parent_connectable_interface->connect(connectable); /* empty */ } void ags_apply_presets_disconnect(AgsConnectable *connectable) { ags_apply_presets_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_apply_presets_dispose(GObject *gobject) { AgsApplyPresets *apply_presets; apply_presets = AGS_APPLY_PRESETS(gobject); if(apply_presets->scope != NULL){ g_object_unref(apply_presets->scope); apply_presets->scope = NULL; } /* call parent */ G_OBJECT_CLASS(ags_apply_presets_parent_class)->dispose(gobject); } void ags_apply_presets_finalize(GObject *gobject) { AgsApplyPresets *apply_presets; apply_presets = AGS_APPLY_PRESETS(gobject); if(apply_presets->scope != NULL){ g_object_unref(apply_presets->scope); } /* call parent */ G_OBJECT_CLASS(ags_apply_presets_parent_class)->finalize(gobject); } void ags_apply_presets_launch(AgsTask *task) { AgsApplyPresets *apply_presets; apply_presets = AGS_APPLY_PRESETS(task); if(AGS_IS_SOUNDCARD(apply_presets->scope)){ ags_apply_presets_soundcard(apply_presets, apply_presets->scope); }else if(AGS_IS_AUDIO(apply_presets->scope)){ ags_apply_presets_audio(apply_presets, (AgsAudio *) apply_presets->scope); }else if(AGS_IS_CHANNEL(apply_presets->scope)){ ags_apply_presets_channel(apply_presets, (AgsChannel *) apply_presets->scope); }else if(AGS_IS_AUDIO_SIGNAL(apply_presets->scope)){ ags_apply_presets_audio_signal(apply_presets, (AgsAudioSignal *) apply_presets->scope); }else{ if(apply_presets->scope != NULL){ g_warning("ags_apply_presets_launch() - unsupported scope %s", G_OBJECT_TYPE_NAME(apply_presets->scope)); }else{ g_warning("ags_apply_presets_launch() - unsupported scope (null)0"); } } } void ags_apply_presets_soundcard(AgsApplyPresets *apply_presets, GObject *soundcard) { AgsAudio *audio; AgsThread *main_loop; AgsThread *export_thread; AgsThread *soundcard_thread; AgsThread *audio_thread; AgsThread *channel_thread; AgsMutexManager *mutex_manager; AgsApplicationContext *application_context; GList *list; gdouble freq; guint channels; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* get some fields */ pthread_mutex_lock(application_mutex); application_context = ags_soundcard_get_application_context(AGS_SOUNDCARD(soundcard)); main_loop = (AgsThread *) application_context->main_loop; pthread_mutex_unlock(application_mutex); /* calculate thread frequency */ freq = ceil((gdouble) apply_presets->samplerate / (gdouble) apply_presets->buffer_size) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK; /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) apply_presets->scope); pthread_mutex_unlock(application_mutex); /* reset soundcard */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_set_presets(AGS_SOUNDCARD(soundcard), apply_presets->pcm_channels, apply_presets->samplerate, apply_presets->buffer_size, apply_presets->format); pthread_mutex_unlock(soundcard_mutex); /* reset audio loop frequency */ g_object_set(G_OBJECT(main_loop), "frequency", freq, NULL); /* reset export thread frequency */ export_thread = main_loop; while((export_thread = ags_thread_find_type(export_thread, AGS_TYPE_EXPORT_THREAD)) != NULL){ g_object_set(export_thread, "frequency", freq, NULL); /* iterate */ export_thread = g_atomic_pointer_get(&(export_thread->next)); } /* reset soundcard thread frequency */ soundcard_thread = main_loop; while((soundcard_thread = ags_thread_find_type(soundcard_thread, AGS_TYPE_SOUNDCARD_THREAD)) != NULL){ g_object_set(soundcard_thread, "frequency", freq, NULL); /* iterate */ soundcard_thread = g_atomic_pointer_get(&(soundcard_thread->next)); } /* reset playback on soundcard */ if(ags_soundcard_is_playing(AGS_SOUNDCARD(soundcard))){ ags_soundcard_stop(AGS_SOUNDCARD(soundcard)); ags_soundcard_play_init(AGS_SOUNDCARD(soundcard), &(AGS_SOUNDCARD_THREAD(soundcard_thread)->error)); } /* descend children */ pthread_mutex_lock(soundcard_mutex); list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); pthread_mutex_unlock(soundcard_mutex); while(audio != NULL){ /* get some fields */ pthread_mutex_lock(soundcard_mutex); audio = AGS_AUDIO(list->data); pthread_mutex_unlock(soundcard_mutex); /* apply presets to audio */ ags_apply_presets_audio(apply_presets, audio); /* iterate */ pthread_mutex_lock(soundcard_mutex); list = list->next; pthread_mutex_unlock(soundcard_mutex); } } void ags_apply_presets_audio(AgsApplyPresets *apply_presets, AgsAudio *audio) { g_object_set(audio, "samplerate", apply_presets->samplerate, "buffer-size", apply_presets->buffer_size, "format", apply_presets->format, NULL); } void ags_apply_presets_channel(AgsApplyPresets *apply_presets, AgsChannel *channel) { g_object_set(channel, "samplerate", apply_presets->samplerate, "buffer-size", apply_presets->buffer_size, "format", apply_presets->format, NULL); } void ags_apply_presets_audio_signal(AgsApplyPresets *apply_presets, AgsAudioSignal *audio_signal) { g_object_set(audio_signal, "samplerate", apply_presets->samplerate, "buffer-size", apply_presets->buffer_size, "format", apply_presets->format, NULL); } /** * ags_apply_presets_new: * @scope: a #GObject * @pcm_channels: pcm channels * @samplerate: samplerate * @buffer_size: buffer size * @format: format * * Creates an #AgsApplyPresets. * * Returns: an new #AgsApplyPresets. * * Since: 1.0.0 */ AgsApplyPresets* ags_apply_presets_new(GObject *scope, guint pcm_channels, guint samplerate, guint buffer_size, guint format) { AgsApplyPresets *apply_presets; apply_presets = (AgsApplyPresets *) g_object_new(AGS_TYPE_APPLY_PRESETS, "scope", scope, "pcm-channels", pcm_channels, "samplerate", samplerate, "buffer-size", buffer_size, "format", format, NULL); return(apply_presets); } gsequencer-1.4.24/ags/audio/task/ags_add_note.c0000644000175000017500000002423013247044247016264 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_add_note_class_init(AgsAddNoteClass *add_note); void ags_add_note_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_note_init(AgsAddNote *add_note); void ags_add_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_add_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_add_note_connect(AgsConnectable *connectable); void ags_add_note_disconnect(AgsConnectable *connectable); void ags_add_note_dispose(GObject *gobject); void ags_add_note_finalize(GObject *gobject); void ags_add_note_launch(AgsTask *task); /** * SECTION:ags_add_note * @short_description: add note object to notation * @title: AgsAddNote * @section_id: * @include: ags/audio/task/ags_add_note.h * * The #AgsAddNote task adds #AgsNote to #AgsNotation. */ static gpointer ags_add_note_parent_class = NULL; static AgsConnectableInterface *ags_add_note_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_NOTATION, PROP_NOTE, PROP_USE_SELECTION_LIST, }; GType ags_add_note_get_type() { static GType ags_type_add_note = 0; if(!ags_type_add_note){ static const GTypeInfo ags_add_note_info = { sizeof (AgsAddNoteClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_note_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddNote), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_note_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_note_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_note = g_type_register_static(AGS_TYPE_TASK, "AgsAddNote", &ags_add_note_info, 0); g_type_add_interface_static(ags_type_add_note, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_note); } void ags_add_note_class_init(AgsAddNoteClass *add_note) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_add_note_parent_class = g_type_class_peek_parent(add_note); /* gobject */ gobject = (GObjectClass *) add_note; gobject->set_property = ags_add_note_set_property; gobject->get_property = ags_add_note_get_property; gobject->dispose = ags_add_note_dispose; gobject->finalize = ags_add_note_finalize; /* properties */ /** * AgsAddNote:audio: * * The assigned #AgsAudio * * Since: 1.2.2 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of notation"), i18n_pspec("The audio of notation"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsAddNote:notation: * * The assigned #AgsNotation * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("notation of add note"), i18n_pspec("The notation of add note task"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsAddNote:note: * * The assigned #AgsNote * * Since: 1.0.0 */ param_spec = g_param_spec_object("note", i18n_pspec("note of add note"), i18n_pspec("The note of add note task"), AGS_TYPE_NOTE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTE, param_spec); /** * AgsAddNote:use-selection-list: * * The notation's use-selection-list. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("use-selection-list", i18n_pspec("use selection list"), i18n_pspec("Use selection list of notation"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_USE_SELECTION_LIST, param_spec); /* task */ task = (AgsTaskClass *) add_note; task->launch = ags_add_note_launch; } void ags_add_note_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_note_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_note_connect; connectable->disconnect = ags_add_note_disconnect; } void ags_add_note_init(AgsAddNote *add_note) { add_note->audio = NULL; add_note->notation = NULL; add_note->note = NULL; add_note->use_selection_list = FALSE; } void ags_add_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAddNote *add_note; add_note = AGS_ADD_NOTE(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(add_note->audio == (GObject *) audio){ return; } if(add_note->audio != NULL){ g_object_unref(add_note->audio); } if(audio != NULL){ g_object_ref(audio); } add_note->audio = (GObject *) audio; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(add_note->notation == (GObject *) notation){ return; } if(add_note->notation != NULL){ g_object_unref(add_note->notation); } if(notation != NULL){ g_object_ref(notation); } add_note->notation = (GObject *) notation; } break; case PROP_NOTE: { AgsNote *note; note = (AgsNote *) g_value_get_object(value); if(add_note->note == (GObject *) note){ return; } if(add_note->note != NULL){ g_object_unref(add_note->note); } if(note != NULL){ g_object_ref(note); } add_note->note = (GObject *) note; } break; case PROP_USE_SELECTION_LIST: { add_note->use_selection_list = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAddNote *add_note; add_note = AGS_ADD_NOTE(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, add_note->audio); } break; case PROP_NOTATION: { g_value_set_object(value, add_note->notation); } break; case PROP_NOTE: { g_value_set_object(value, add_note->note); } break; case PROP_USE_SELECTION_LIST: { g_value_set_boolean(value, add_note->use_selection_list); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_note_connect(AgsConnectable *connectable) { ags_add_note_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_note_disconnect(AgsConnectable *connectable) { ags_add_note_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_note_dispose(GObject *gobject) { AgsAddNote *add_note; add_note = AGS_ADD_NOTE(gobject); if(add_note->audio != NULL){ g_object_unref(add_note->audio); add_note->audio = NULL; } if(add_note->notation != NULL){ g_object_unref(add_note->notation); add_note->notation = NULL; } if(add_note->note != NULL){ g_object_unref(add_note->note); add_note->note = NULL; } /* call parent */ G_OBJECT_CLASS(ags_add_note_parent_class)->dispose(gobject); } void ags_add_note_finalize(GObject *gobject) { AgsAddNote *add_note; add_note = AGS_ADD_NOTE(gobject); if(add_note->audio != NULL){ g_object_unref(add_note->audio); } if(add_note->notation != NULL){ g_object_unref(add_note->notation); } if(add_note->note != NULL){ g_object_unref(add_note->note); } /* call parent */ G_OBJECT_CLASS(ags_add_note_parent_class)->finalize(gobject); } void ags_add_note_launch(AgsTask *task) { AgsAddNote *add_note; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); add_note = AGS_ADD_NOTE(task); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) add_note->audio); pthread_mutex_unlock(application_mutex); /* add note */ pthread_mutex_lock(audio_mutex); ags_notation_add_note(add_note->notation, add_note->note, add_note->use_selection_list); pthread_mutex_unlock(audio_mutex); } /** * ags_add_note_new: * @notation: the #AgsNotation * @note: the #AgsNote to add * @use_selection_list: if %TRUE added to selection, otherwise to notation * * WARNING you should provide the #AgsAddNote:audio property. * Creates an #AgsAddNote. * * Returns: an new #AgsAddNote. * * Since: 1.0.0 */ AgsAddNote* ags_add_note_new(AgsNotation *notation, AgsNote *note, gboolean use_selection_list) { AgsAddNote *add_note; add_note = (AgsAddNote *) g_object_new(AGS_TYPE_ADD_NOTE, "notation", notation, "note", note, "use-selection-list", use_selection_list, NULL); return(add_note); } gsequencer-1.4.24/ags/audio/task/ags_remove_point_from_selection.c0000644000175000017500000003000113247044247022276 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_remove_point_from_selection_class_init(AgsRemovePointFromSelectionClass *remove_point_from_selection); void ags_remove_point_from_selection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_point_from_selection_init(AgsRemovePointFromSelection *remove_point_from_selection); void ags_remove_point_from_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_remove_point_from_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_remove_point_from_selection_connect(AgsConnectable *connectable); void ags_remove_point_from_selection_disconnect(AgsConnectable *connectable); void ags_remove_point_from_selection_dispose(GObject *gobject); void ags_remove_point_from_selection_finalize(GObject *gobject); void ags_remove_point_from_selection_launch(AgsTask *task); /** * SECTION:ags_remove_point_from_selection * @short_description: remove point from notation selection * @title: AgsRemovePointFromSelection * @section_id: * @include: ags/audio/task/ags_remove_point_from_selection.h * * The #AgsRemovePointFromSelection task removes the specified #AgsNote from selection of #AgsNotation. */ static gpointer ags_remove_point_from_selection_parent_class = NULL; static AgsConnectableInterface *ags_remove_point_from_selection_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_NOTATION, PROP_X, PROP_Y, }; GType ags_remove_point_from_selection_get_type() { static GType ags_type_remove_point_from_selection = 0; if(!ags_type_remove_point_from_selection){ static const GTypeInfo ags_remove_point_from_selection_info = { sizeof (AgsRemovePointFromSelectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_point_from_selection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemovePointFromSelection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_point_from_selection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_point_from_selection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_point_from_selection = g_type_register_static(AGS_TYPE_TASK, "AgsRemovePointFromSelection", &ags_remove_point_from_selection_info, 0); g_type_add_interface_static(ags_type_remove_point_from_selection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_point_from_selection); } void ags_remove_point_from_selection_class_init(AgsRemovePointFromSelectionClass *remove_point_from_selection) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_remove_point_from_selection_parent_class = g_type_class_peek_parent(remove_point_from_selection); /* gobject */ gobject = (GObjectClass *) remove_point_from_selection; gobject->set_property = ags_remove_point_from_selection_set_property; gobject->get_property = ags_remove_point_from_selection_get_property; gobject->dispose = ags_remove_point_from_selection_dispose; gobject->finalize = ags_remove_point_from_selection_finalize; /* properties */ /** * AgsRemovePointFromSelection:audio: * * The assigned #AgsAudio * * Since: 1.2.2 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of remove point from selection"), i18n_pspec("The audio of remove point from selection task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsRemovePointFromSelection:notation: * * The assigned #AgsNotation * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("notation of remove point from selection"), i18n_pspec("The notation of remove point from selection task"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsRemovePointFromSelection:x: * * Note offset x. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x", i18n_pspec("offset x"), i18n_pspec("The x offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X, param_spec); /** * AgsRemovePointFromSelection:y: * * Note offset y. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("y", i18n_pspec("offset y"), i18n_pspec("The y offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y, param_spec); /* task */ task = (AgsTaskClass *) remove_point_from_selection; task->launch = ags_remove_point_from_selection_launch; } void ags_remove_point_from_selection_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_point_from_selection_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_point_from_selection_connect; connectable->disconnect = ags_remove_point_from_selection_disconnect; } void ags_remove_point_from_selection_init(AgsRemovePointFromSelection *remove_point_from_selection) { remove_point_from_selection->audio = NULL; remove_point_from_selection->notation = NULL; remove_point_from_selection->x = 0; remove_point_from_selection->y = 0; } void ags_remove_point_from_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRemovePointFromSelection *remove_point_from_selection; remove_point_from_selection = AGS_REMOVE_POINT_FROM_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(remove_point_from_selection->audio == (GObject *) audio){ return; } if(remove_point_from_selection->audio != NULL){ g_object_unref(remove_point_from_selection->audio); } if(audio != NULL){ g_object_ref(audio); } remove_point_from_selection->audio = (GObject *) audio; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(remove_point_from_selection->notation == (GObject *) notation){ return; } if(remove_point_from_selection->notation != NULL){ g_object_unref(remove_point_from_selection->notation); } if(notation != NULL){ g_object_ref(notation); } remove_point_from_selection->notation = (GObject *) notation; } break; case PROP_X: { remove_point_from_selection->x = g_value_get_uint(value); } break; case PROP_Y: { remove_point_from_selection->y = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_point_from_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRemovePointFromSelection *remove_point_from_selection; remove_point_from_selection = AGS_REMOVE_POINT_FROM_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, remove_point_from_selection->audio); } break; case PROP_NOTATION: { g_value_set_object(value, remove_point_from_selection->notation); } break; case PROP_X: { g_value_set_uint(value, remove_point_from_selection->x); } break; case PROP_Y: { g_value_set_uint(value, remove_point_from_selection->y); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_point_from_selection_connect(AgsConnectable *connectable) { ags_remove_point_from_selection_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_point_from_selection_disconnect(AgsConnectable *connectable) { ags_remove_point_from_selection_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_point_from_selection_dispose(GObject *gobject) { AgsRemovePointFromSelection *remove_point_from_selection; remove_point_from_selection = AGS_REMOVE_POINT_FROM_SELECTION(gobject); if(remove_point_from_selection->audio != NULL){ g_object_unref(remove_point_from_selection->audio); remove_point_from_selection->audio = NULL; } if(remove_point_from_selection->notation != NULL){ g_object_unref(remove_point_from_selection->notation); remove_point_from_selection->notation = NULL; } /* Call parent */ G_OBJECT_CLASS(ags_remove_point_from_selection_parent_class)->dispose(gobject); } void ags_remove_point_from_selection_finalize(GObject *gobject) { AgsRemovePointFromSelection *remove_point_from_selection; remove_point_from_selection = AGS_REMOVE_POINT_FROM_SELECTION(gobject); if(remove_point_from_selection->audio != NULL){ g_object_unref(remove_point_from_selection->audio); } if(remove_point_from_selection->notation != NULL){ g_object_unref(remove_point_from_selection->notation); } /* call parent */ G_OBJECT_CLASS(ags_remove_point_from_selection_parent_class)->finalize(gobject); } void ags_remove_point_from_selection_launch(AgsTask *task) { AgsRemovePointFromSelection *remove_point_from_selection; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); remove_point_from_selection = AGS_REMOVE_POINT_FROM_SELECTION(task); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) remove_point_from_selection->audio); pthread_mutex_unlock(application_mutex); /* remove note */ pthread_mutex_lock(audio_mutex); ags_notation_remove_point_from_selection(remove_point_from_selection->notation, remove_point_from_selection->x, remove_point_from_selection->y); pthread_mutex_unlock(audio_mutex); } /** * ags_remove_point_from_selection_new: * @notation: the #AgsNotation providing the selection * @x: x coordinate * @y: y coordinate * * WARNING you should provide the #AgsRemovePointFromSelection:audio property. * Creates an #AgsRemovePointFromSelection. * * Returns: an new #AgsRemovePointFromSelection. * * Since: 1.0.0 */ AgsRemovePointFromSelection* ags_remove_point_from_selection_new(AgsNotation *notation, guint x, guint y) { AgsRemovePointFromSelection *remove_point_from_selection; remove_point_from_selection = (AgsRemovePointFromSelection *) g_object_new(AGS_TYPE_REMOVE_POINT_FROM_SELECTION, "notation", notation, "x", x, "y", y, NULL); return(remove_point_from_selection); } gsequencer-1.4.24/ags/audio/task/ags_start_soundcard.c0000644000175000017500000002430113247044247017705 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include void ags_start_soundcard_class_init(AgsStartSoundcardClass *start_soundcard); void ags_start_soundcard_connectable_interface_init(AgsConnectableInterface *connectable); void ags_start_soundcard_init(AgsStartSoundcard *start_soundcard); void ags_start_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_start_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_start_soundcard_connect(AgsConnectable *connectable); void ags_start_soundcard_disconnect(AgsConnectable *connectable); void ags_start_soundcard_dispose(GObject *gobject); void ags_start_soundcard_finalize(GObject *gobject); void ags_start_soundcard_launch(AgsTask *task); /** * SECTION:ags_start_soundcard * @short_description: start soundcard object * @title: AgsStartSoundcard * @section_id: * @include: ags/audio/task/ags_start_soundcard.h * * The #AgsStartSoundcard task starts soundcard. */ static gpointer ags_start_soundcard_parent_class = NULL; static AgsConnectableInterface *ags_start_soundcard_parent_connectable_interface; enum{ PROP_0, PROP_APPLICATION_CONTEXT, }; GType ags_start_soundcard_get_type() { static GType ags_type_start_soundcard = 0; if(!ags_type_start_soundcard){ static const GTypeInfo ags_start_soundcard_info = { sizeof (AgsStartSoundcardClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_start_soundcard_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsStartSoundcard), 0, /* n_preallocs */ (GInstanceInitFunc) ags_start_soundcard_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_start_soundcard_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_start_soundcard = g_type_register_static(AGS_TYPE_TASK, "AgsStartSoundcard", &ags_start_soundcard_info, 0); g_type_add_interface_static(ags_type_start_soundcard, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_start_soundcard); } void ags_start_soundcard_class_init(AgsStartSoundcardClass *start_soundcard) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_start_soundcard_parent_class = g_type_class_peek_parent(start_soundcard); /* gobject */ gobject = (GObjectClass *) start_soundcard; gobject->set_property = ags_start_soundcard_set_property; gobject->get_property = ags_start_soundcard_get_property; gobject->dispose = ags_start_soundcard_dispose; gobject->finalize = ags_start_soundcard_finalize; /* properties */ /** * AgsStartSoundcard:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context of start soundcard"), i18n_pspec("The application context of start soundcard task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* task */ task = (AgsTaskClass *) start_soundcard; task->launch = ags_start_soundcard_launch; } void ags_start_soundcard_connectable_interface_init(AgsConnectableInterface *connectable) { ags_start_soundcard_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_start_soundcard_connect; connectable->disconnect = ags_start_soundcard_disconnect; } void ags_start_soundcard_init(AgsStartSoundcard *start_soundcard) { start_soundcard->application_context = NULL; } void ags_start_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsStartSoundcard *start_soundcard; start_soundcard = AGS_START_SOUNDCARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { GObject *application_context; application_context = (GObject *) g_value_get_object(value); if(start_soundcard->application_context == (GObject *) application_context){ return; } if(start_soundcard->application_context != NULL){ g_object_unref(start_soundcard->application_context); } if(application_context != NULL){ g_object_ref(application_context); } start_soundcard->application_context = (GObject *) application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_start_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsStartSoundcard *start_soundcard; start_soundcard = AGS_START_SOUNDCARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, start_soundcard->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_start_soundcard_connect(AgsConnectable *connectable) { ags_start_soundcard_parent_connectable_interface->connect(connectable); /* empty */ } void ags_start_soundcard_disconnect(AgsConnectable *connectable) { ags_start_soundcard_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_start_soundcard_dispose(GObject *gobject) { AgsStartSoundcard *start_soundcard; start_soundcard = AGS_START_SOUNDCARD(gobject); if(start_soundcard->application_context != NULL){ g_object_unref(start_soundcard->application_context); start_soundcard->application_context = NULL; } /* call parent */ G_OBJECT_CLASS(ags_start_soundcard_parent_class)->dispose(gobject); } void ags_start_soundcard_finalize(GObject *gobject) { AgsAudioLoop *audio_loop; AgsSoundcardThread *soundcard_thread; AgsApplicationContext *application_context; AgsSoundcard *soundcard; application_context = AGS_START_SOUNDCARD(gobject)->application_context; if(application_context != NULL){ //FIXME:JK: wrong location of code audio_loop = AGS_AUDIO_LOOP(application_context->main_loop); soundcard_thread = (AgsSoundcardThread *) ags_thread_find_type((AgsThread *) audio_loop, AGS_TYPE_SOUNDCARD_THREAD); if(soundcard_thread->error != NULL){ g_error_free(soundcard_thread->error); soundcard_thread->error = NULL; } g_object_unref(application_context); } /* call parent */ G_OBJECT_CLASS(ags_start_soundcard_parent_class)->finalize(gobject); } void ags_start_soundcard_launch(AgsTask *task) { AgsStartSoundcard *start_soundcard; AgsMutexManager *mutex_manager; AgsThread *soundcard_thread; AgsThread *main_loop; AgsApplicationContext *application_context; GObject *soundcard; GList *start_queue; pthread_mutex_t *application_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); start_soundcard = AGS_START_SOUNDCARD(task); application_context = start_soundcard->application_context; /* get main loop and soundcard mutex */ pthread_mutex_lock(application_mutex); main_loop = application_context->main_loop; pthread_mutex_unlock(application_mutex); AGS_AUDIO_LOOP(main_loop)->flags |= (AGS_AUDIO_LOOP_PLAY_AUDIO | AGS_AUDIO_LOOP_PLAY_CHANNEL | AGS_AUDIO_LOOP_PLAY_RECALL); /* if(ags_soundcard_is_starting(soundcard) || ags_soundcard_is_playing(soundcard)){ return; } */ soundcard_thread = main_loop; while((soundcard_thread = ags_thread_find_type(soundcard_thread, AGS_TYPE_SOUNDCARD_THREAD)) != NULL){ if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(soundcard_thread->flags)))) == 0){ soundcard = AGS_SOUNDCARD_THREAD(soundcard_thread)->soundcard; /* append to AgsSoundcard */ if(!ags_soundcard_is_playing(AGS_SOUNDCARD(soundcard)) && ags_soundcard_get_buffer(AGS_SOUNDCARD(soundcard)) == NULL){ AGS_SOUNDCARD_THREAD(soundcard_thread)->error = NULL; g_message("start soundcard"); ags_soundcard_play_init(AGS_SOUNDCARD(soundcard), &(AGS_SOUNDCARD_THREAD(soundcard_thread)->error)); start_queue = NULL; start_queue = g_list_prepend(start_queue, soundcard_thread); if(start_queue != NULL){ if(g_atomic_pointer_get(&(AGS_THREAD(main_loop)->start_queue)) != NULL){ g_atomic_pointer_set(&(AGS_THREAD(main_loop)->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(AGS_THREAD(main_loop)->start_queue)))); }else{ g_atomic_pointer_set(&(AGS_THREAD(main_loop)->start_queue), start_queue); } } } } soundcard_thread = g_atomic_pointer_get(&(soundcard_thread->next)); } } /** * ags_start_soundcard_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsStartSoundcard. * * Returns: an new #AgsStartSoundcard. * * Since: 1.0.0 */ AgsStartSoundcard* ags_start_soundcard_new(AgsApplicationContext *application_context) { AgsStartSoundcard *start_soundcard; start_soundcard = (AgsStartSoundcard *) g_object_new(AGS_TYPE_START_SOUNDCARD, "application-context", application_context, NULL); return(start_soundcard); } gsequencer-1.4.24/ags/audio/task/ags_cancel_channel.h0000644000175000017500000000406313247044247017433 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CANCEL_CHANNEL_H__ #define __AGS_CANCEL_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_CANCEL_CHANNEL (ags_cancel_channel_get_type()) #define AGS_CANCEL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CANCEL_CHANNEL, AgsCancelChannel)) #define AGS_CANCEL_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CANCEL_CHANNEL, AgsCancelChannelClass)) #define AGS_IS_CANCEL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CANCEL_CHANNEL)) #define AGS_IS_CANCEL_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CANCEL_CHANNEL)) #define AGS_CANCEL_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CANCEL_CHANNEL, AgsCancelChannelClass)) typedef struct _AgsCancelChannel AgsCancelChannel; typedef struct _AgsCancelChannelClass AgsCancelChannelClass; struct _AgsCancelChannel { AgsTask task; AgsChannel *channel; AgsRecallID *recall_id; GObject *playback; }; struct _AgsCancelChannelClass { AgsTaskClass task; }; GType ags_cancel_channel_get_type(); AgsCancelChannel* ags_cancel_channel_new(AgsChannel *channel, AgsRecallID *recall_id, GObject *playback); #endif /*__AGS_CANCEL_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_cancel_audio.c0000644000175000017500000004027213247044247017121 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_cancel_audio_class_init(AgsCancelAudioClass *cancel_audio); void ags_cancel_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_cancel_audio_init(AgsCancelAudio *cancel_audio); void ags_cancel_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_cancel_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_cancel_audio_connect(AgsConnectable *connectable); void ags_cancel_audio_disconnect(AgsConnectable *connectable); void ags_cancel_audio_dispose(GObject *gobject); void ags_cancel_audio_finalize(GObject *gobject); void ags_cancel_audio_launch(AgsTask *task); /** * SECTION:ags_cancel_audio * @short_description: cancel audio task * @title: AgsCancelAudio * @section_id: * @include: ags/audio/task/ags_cancel_audio.h * * The #AgsCancelAudio task cancels #AgsAudio playback. */ static gpointer ags_cancel_audio_parent_class = NULL; static AgsConnectableInterface *ags_cancel_audio_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_DO_PLAYBACK, PROP_DO_SEQUENCER, PROP_DO_NOTATION, }; GType ags_cancel_audio_get_type() { static GType ags_type_cancel_audio = 0; if(!ags_type_cancel_audio){ static const GTypeInfo ags_cancel_audio_info = { sizeof (AgsCancelAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_cancel_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCancelAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_cancel_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_cancel_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_cancel_audio = g_type_register_static(AGS_TYPE_TASK, "AgsCancelAudio", &ags_cancel_audio_info, 0); g_type_add_interface_static(ags_type_cancel_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_cancel_audio); } void ags_cancel_audio_class_init(AgsCancelAudioClass *cancel_audio) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_cancel_audio_parent_class = g_type_class_peek_parent(cancel_audio); /* gobject */ gobject = (GObjectClass *) cancel_audio; gobject->set_property = ags_cancel_audio_set_property; gobject->get_property = ags_cancel_audio_get_property; gobject->dispose = ags_cancel_audio_dispose; gobject->finalize = ags_cancel_audio_finalize; /* properties */ /** * AgsCancelAudio:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of cancel audio"), i18n_pspec("The audio of cancel audio task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsCancelAudio:do-playback: * * The effects do-playback. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-playback", i18n_pspec("do playback"), i18n_pspec("Do playback of audio"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_PLAYBACK, param_spec); /** * AgsCancelAudio:do-sequencer: * * The effects do-sequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-sequencer", i18n_pspec("do sequencer"), i18n_pspec("Do sequencer of audio"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_SEQUENCER, param_spec); /** * AgsCancelAudio:do-notation: * * The effects do-notation. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-notation", i18n_pspec("do notation"), i18n_pspec("Do notation of audio"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_NOTATION, param_spec); /* task */ task = (AgsTaskClass *) cancel_audio; task->launch = ags_cancel_audio_launch; } void ags_cancel_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_cancel_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_cancel_audio_connect; connectable->disconnect = ags_cancel_audio_disconnect; } void ags_cancel_audio_init(AgsCancelAudio *cancel_audio) { cancel_audio->audio = NULL; cancel_audio->do_playback = FALSE; cancel_audio->do_sequencer = FALSE; cancel_audio->do_notation = FALSE; } void ags_cancel_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCancelAudio *cancel_audio; cancel_audio = AGS_CANCEL_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(cancel_audio->audio == (GObject *) audio){ return; } if(cancel_audio->audio != NULL){ g_object_unref(cancel_audio->audio); } if(audio != NULL){ g_object_ref(audio); } cancel_audio->audio = (GObject *) audio; } break; case PROP_DO_PLAYBACK: { guint do_playback; do_playback = g_value_get_boolean(value); cancel_audio->do_playback = do_playback; } break; case PROP_DO_SEQUENCER: { guint do_sequencer; do_sequencer = g_value_get_boolean(value); cancel_audio->do_sequencer = do_sequencer; } break; case PROP_DO_NOTATION: { guint do_notation; do_notation = g_value_get_boolean(value); cancel_audio->do_notation = do_notation; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_cancel_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCancelAudio *cancel_audio; cancel_audio = AGS_CANCEL_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, cancel_audio->audio); } break; case PROP_DO_PLAYBACK: { g_value_set_boolean(value, cancel_audio->do_playback); } break; case PROP_DO_SEQUENCER: { g_value_set_boolean(value, cancel_audio->do_sequencer); } break; case PROP_DO_NOTATION: { g_value_set_boolean(value, cancel_audio->do_notation); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_cancel_audio_connect(AgsConnectable *connectable) { ags_cancel_audio_parent_connectable_interface->connect(connectable); /* empty */ } void ags_cancel_audio_disconnect(AgsConnectable *connectable) { ags_cancel_audio_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_cancel_audio_dispose(GObject *gobject) { AgsCancelAudio *cancel_audio; cancel_audio = AGS_CANCEL_AUDIO(gobject); if(cancel_audio->audio != NULL){ g_object_unref(cancel_audio->audio); cancel_audio->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_cancel_audio_parent_class)->dispose(gobject); } void ags_cancel_audio_finalize(GObject *gobject) { AgsCancelAudio *cancel_audio; cancel_audio = AGS_CANCEL_AUDIO(gobject); if(cancel_audio->audio != NULL){ g_object_unref(cancel_audio->audio); } /* call parent */ G_OBJECT_CLASS(ags_cancel_audio_parent_class)->finalize(gobject); } void ags_cancel_audio_launch(AgsTask *task) { AgsPlaybackDomain *playback_domain; AgsPlayback *playback; AgsAudio *audio; AgsChannel *channel; AgsRecallID *recall_id; AgsCancelAudio *cancel_audio; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); cancel_audio = AGS_CANCEL_AUDIO(task); audio = cancel_audio->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); playback_domain = AGS_PLAYBACK_DOMAIN(audio->playback_domain); pthread_mutex_unlock(audio_mutex); /* cancel playback */ if(cancel_audio->do_playback){ g_atomic_int_and(&(playback_domain->flags), (~AGS_PLAYBACK_DOMAIN_PLAYBACK)); /* get some fields */ pthread_mutex_lock(audio_mutex); channel = audio->output; pthread_mutex_unlock(audio_mutex); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); playback = AGS_PLAYBACK(channel->playback); recall_id = playback->recall_id[AGS_PLAYBACK_SCOPE_PLAYBACK]; pthread_mutex_unlock(channel_mutex); if(recall_id == NULL){ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); continue; } /* cancel */ g_object_ref(recall_id); ags_channel_tillrecycling_cancel(channel, recall_id); /* set recall id to NULL and iterate */ pthread_mutex_lock(channel_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_PLAYBACK] = NULL; channel = channel->next; pthread_mutex_unlock(channel_mutex); } if((AGS_PLAYBACK_DOMAIN_SUPER_THREADED_AUDIO & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ AgsAudioThread *audio_thread; /* get some fields */ pthread_mutex_lock(audio_mutex); audio_thread = (AgsAudioThread *) playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK]; pthread_mutex_unlock(audio_mutex); if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(AGS_THREAD(audio_thread)->flags)))) != 0){ ags_thread_stop(audio_thread); /* ensure synced */ pthread_mutex_lock(audio_thread->wakeup_mutex); g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_WAIT)); if((AGS_AUDIO_THREAD_DONE & (g_atomic_int_get(&(audio_thread->flags)))) == 0){ pthread_cond_signal(audio_thread->wakeup_cond); } pthread_mutex_unlock(audio_thread->wakeup_mutex); } } } /* cancel sequencer */ if(cancel_audio->do_sequencer){ g_atomic_int_and(&(playback_domain->flags), (~AGS_PLAYBACK_DOMAIN_SEQUENCER)); /* get some fields */ pthread_mutex_lock(audio_mutex); channel = audio->output; pthread_mutex_unlock(audio_mutex); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); playback = AGS_PLAYBACK(channel->playback); recall_id = playback->recall_id[AGS_PLAYBACK_SCOPE_SEQUENCER]; pthread_mutex_unlock(channel_mutex); if(recall_id == NULL){ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); continue; } g_object_ref(recall_id); ags_channel_tillrecycling_cancel(channel, recall_id); /* set recall id to NULL and iterate */ pthread_mutex_lock(channel_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_SEQUENCER] = NULL; channel = channel->next; pthread_mutex_unlock(channel_mutex); } if((AGS_PLAYBACK_DOMAIN_SUPER_THREADED_AUDIO & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ AgsAudioThread *audio_thread; audio_thread = (AgsAudioThread *) playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER]; if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(AGS_THREAD(audio_thread)->flags)))) != 0){ ags_thread_stop(audio_thread); /* ensure synced */ pthread_mutex_lock(audio_thread->wakeup_mutex); g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_WAIT)); if((AGS_AUDIO_THREAD_DONE & (g_atomic_int_get(&(audio_thread->flags)))) == 0){ pthread_cond_signal(audio_thread->wakeup_cond); } pthread_mutex_unlock(audio_thread->wakeup_mutex); } } } /* cancel notation */ if(cancel_audio->do_notation){ g_atomic_int_and(&(playback_domain->flags), (~AGS_PLAYBACK_DOMAIN_NOTATION)); /* get some fields */ pthread_mutex_lock(audio_mutex); channel = audio->output; pthread_mutex_unlock(audio_mutex); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); playback = AGS_PLAYBACK(channel->playback); recall_id = playback->recall_id[AGS_PLAYBACK_SCOPE_NOTATION]; pthread_mutex_unlock(channel_mutex); if(recall_id == NULL){ channel = channel->next; continue; } g_object_ref(recall_id); ags_channel_tillrecycling_cancel(channel, recall_id); /* set recall id to NULL and iterate */ pthread_mutex_lock(channel_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_NOTATION] = NULL; channel = channel->next; pthread_mutex_unlock(channel_mutex); } if((AGS_PLAYBACK_DOMAIN_SUPER_THREADED_AUDIO & (g_atomic_int_get(&(playback_domain->flags)))) != 0){ AgsAudioThread *audio_thread; audio_thread = (AgsAudioThread *) playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION]; if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(AGS_THREAD(audio_thread)->flags)))) != 0){ ags_thread_stop(audio_thread); /* ensure synced */ pthread_mutex_lock(audio_thread->wakeup_mutex); g_atomic_int_and(&(audio_thread->flags), (~AGS_AUDIO_THREAD_WAIT)); if((AGS_AUDIO_THREAD_DONE & (g_atomic_int_get(&(audio_thread->flags)))) == 0){ pthread_cond_signal(audio_thread->wakeup_cond); } pthread_mutex_unlock(audio_thread->wakeup_mutex); } } } } /** * ags_cancel_audio_new: * @audio: the #AgsAudio to cancel * @do_playback: if %TRUE playback is canceld * @do_sequencer: if %TRUE sequencer is canceld * @do_notation: if %TRUE notation is canceld * * Creates an #AgsCancelAudio. * * Returns: an new #AgsCancelAudio. * * Since: 1.0.0 */ AgsCancelAudio* ags_cancel_audio_new(AgsAudio *audio, gboolean do_playback, gboolean do_sequencer, gboolean do_notation) { AgsCancelAudio *cancel_audio; cancel_audio = (AgsCancelAudio *) g_object_new(AGS_TYPE_CANCEL_AUDIO, "audio", audio, "do-playback", do_playback, "do-sequencer", do_sequencer, "do-notation", do_notation, NULL); return(cancel_audio); } gsequencer-1.4.24/ags/audio/task/ags_append_audio_threaded.c0000644000175000017500000002274413247044247021007 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_append_audio_threaded_class_init(AgsAppendAudioThreadedClass *append_audio_threaded); void ags_append_audio_threaded_connectable_interface_init(AgsConnectableInterface *connectable); void ags_append_audio_threaded_init(AgsAppendAudioThreaded *append_audio_threaded); void ags_append_audio_threaded_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_append_audio_threaded_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_append_audio_threaded_connect(AgsConnectable *connectable); void ags_append_audio_threaded_disconnect(AgsConnectable *connectable); void ags_append_audio_threaded_dispose(GObject *gobject); void ags_append_audio_threaded_finalize(GObject *gobject); void ags_append_audio_threaded_launch(AgsTask *task); enum{ PROP_0, PROP_AUDIO_LOOP, PROP_PLAYBACK, }; /** * SECTION:ags_append_audio_threaded * @short_description: append audio object to audio loop * @title: AgsAppendAudio * @section_id: * @include: ags/audio/task/ags_append_audio_threaded.h * * The #AgsAppendAudio task appends #AgsAudio to #AgsAudioLoop doing super-threaded * audio processing. */ static gpointer ags_append_audio_threaded_parent_class = NULL; static AgsConnectableInterface *ags_append_audio_threaded_parent_connectable_interface; GType ags_append_audio_threaded_get_type() { static GType ags_type_append_audio_threaded = 0; if(!ags_type_append_audio_threaded){ static const GTypeInfo ags_append_audio_threaded_info = { sizeof (AgsAppendAudioThreadedClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_append_audio_threaded_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAppendAudioThreaded), 0, /* n_preallocs */ (GInstanceInitFunc) ags_append_audio_threaded_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_append_audio_threaded_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_append_audio_threaded = g_type_register_static(AGS_TYPE_TASK, "AgsAppendAudioThreaded", &ags_append_audio_threaded_info, 0); g_type_add_interface_static(ags_type_append_audio_threaded, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_append_audio_threaded); } void ags_append_audio_threaded_class_init(AgsAppendAudioThreadedClass *append_audio_threaded) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_append_audio_threaded_parent_class = g_type_class_peek_parent(append_audio_threaded); /* gobject */ gobject = (GObjectClass *) append_audio_threaded; gobject->set_property = ags_append_audio_threaded_set_property; gobject->get_property = ags_append_audio_threaded_get_property; gobject->dispose = ags_append_audio_threaded_dispose; gobject->finalize = ags_append_audio_threaded_finalize; /* properties */ /** * AgsAppendAudioThreaded:audio-loop: * * The assigned #AgsAudioLoop * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-loop", i18n_pspec("audio loop of append audio"), i18n_pspec("The audio loop of append audio threaded task"), AGS_TYPE_AUDIO_LOOP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_LOOP, param_spec); /** * AgsAppendAudioThreaded:playback: * * The assigned #AgsPlayback * * Since: 1.0.0 */ param_spec = g_param_spec_object("playback", i18n_pspec("playback of append recall"), i18n_pspec("The playback of append audio threaded task"), AGS_TYPE_PLAYBACK, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK, param_spec); /* task */ task = (AgsTaskClass *) append_audio_threaded; task->launch = ags_append_audio_threaded_launch; } void ags_append_audio_threaded_connectable_interface_init(AgsConnectableInterface *connectable) { ags_append_audio_threaded_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_append_audio_threaded_connect; connectable->disconnect = ags_append_audio_threaded_disconnect; } void ags_append_audio_threaded_init(AgsAppendAudioThreaded *append_audio_threaded) { append_audio_threaded->audio_loop = NULL; append_audio_threaded->playback = NULL; } void ags_append_audio_threaded_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAppendAudioThreaded *append_audio_threaded; append_audio_threaded = AGS_APPEND_AUDIO_THREADED(gobject); switch(prop_id){ case PROP_AUDIO_LOOP: { AgsAudioLoop *audio_loop; audio_loop = (AgsAudioLoop *) g_value_get_object(value); if(append_audio_threaded->audio_loop == (GObject *) audio_loop){ return; } if(append_audio_threaded->audio_loop != NULL){ g_object_unref(append_audio_threaded->audio_loop); } if(audio_loop != NULL){ g_object_ref(audio_loop); } append_audio_threaded->audio_loop = (GObject *) audio_loop; } break; case PROP_PLAYBACK: { AgsPlayback *playback; playback = (AgsPlayback *) g_value_get_object(value); if(append_audio_threaded->playback == (GObject *) playback){ return; } if(append_audio_threaded->playback != NULL){ g_object_unref(append_audio_threaded->playback); } if(playback != NULL){ g_object_ref(playback); } append_audio_threaded->playback = (GObject *) playback; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_append_audio_threaded_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAppendAudioThreaded *append_audio_threaded; append_audio_threaded = AGS_APPEND_AUDIO_THREADED(gobject); switch(prop_id){ case PROP_AUDIO_LOOP: { g_value_set_object(value, append_audio_threaded->audio_loop); } break; case PROP_PLAYBACK: { g_value_set_object(value, append_audio_threaded->playback); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_append_audio_threaded_connect(AgsConnectable *connectable) { ags_append_audio_threaded_parent_connectable_interface->connect(connectable); /* empty */ } void ags_append_audio_threaded_disconnect(AgsConnectable *connectable) { ags_append_audio_threaded_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_append_audio_threaded_dispose(GObject *gobject) { AgsAppendAudioThreaded *append_audio_threaded; append_audio_threaded = AGS_APPEND_AUDIO_THREADED(gobject); if(append_audio_threaded->audio_loop != NULL){ g_object_unref(append_audio_threaded->audio_loop); append_audio_threaded->audio_loop = NULL; } if(append_audio_threaded->playback != NULL){ g_object_unref(append_audio_threaded->playback); append_audio_threaded->playback = NULL; } /* call parent */ G_OBJECT_CLASS(ags_append_audio_threaded_parent_class)->dispose(gobject); } void ags_append_audio_threaded_finalize(GObject *gobject) { AgsAppendAudioThreaded *append_audio_threaded; append_audio_threaded = AGS_APPEND_AUDIO_THREADED(gobject); if(append_audio_threaded->audio_loop != NULL){ g_object_unref(append_audio_threaded->audio_loop); } if(append_audio_threaded->playback != NULL){ g_object_unref(append_audio_threaded->playback); } /* call parent */ G_OBJECT_CLASS(ags_append_audio_threaded_parent_class)->finalize(gobject); } void ags_append_audio_threaded_launch(AgsTask *task) { AgsAppendAudioThreaded *append_audio_threaded; AgsAudioLoop *audio_loop; append_audio_threaded = AGS_APPEND_AUDIO_THREADED(task); audio_loop = AGS_AUDIO_LOOP(append_audio_threaded->audio_loop); /* append to AgsDevout */ //TODO:JK: implement me } AgsAppendAudioThreaded* ags_append_audio_threaded_new(GObject *audio_loop, GObject *playback) { AgsAppendAudioThreaded *append_audio_threaded; append_audio_threaded = (AgsAppendAudioThreaded *) g_object_new(AGS_TYPE_APPEND_AUDIO_THREADED, "audio-loop", audio_loop, "playback", playback, NULL); return(append_audio_threaded); } gsequencer-1.4.24/ags/audio/task/ags_clear_buffer.h0000644000175000017500000000356013247044247017136 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CLEAR_BUFFER_H__ #define __AGS_CLEAR_BUFFER_H__ #include #include #include #define AGS_TYPE_CLEAR_BUFFER (ags_clear_buffer_get_type()) #define AGS_CLEAR_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CLEAR_BUFFER, AgsClearBuffer)) #define AGS_CLEAR_BUFFER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CLEAR_BUFFER, AgsClearBufferClass)) #define AGS_IS_CLEAR_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CLEAR_BUFFER)) #define AGS_IS_CLEAR_BUFFER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CLEAR_BUFFER)) #define AGS_CLEAR_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CLEAR_BUFFER, AgsClearBufferClass)) typedef struct _AgsClearBuffer AgsClearBuffer; typedef struct _AgsClearBufferClass AgsClearBufferClass; struct _AgsClearBuffer { AgsTask task; GObject *device; }; struct _AgsClearBufferClass { AgsTaskClass task; }; GType ags_clear_buffer_get_type(); AgsClearBuffer* ags_clear_buffer_new(GObject *device); #endif /*__AGS_CLEAR_BUFFER_H__*/ gsequencer-1.4.24/ags/audio/task/ags_set_output_device.c0000644000175000017500000002314113247044247020241 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_set_output_device_class_init(AgsSetOutputDeviceClass *set_output_device); void ags_set_output_device_connectable_interface_init(AgsConnectableInterface *connectable); void ags_set_output_device_init(AgsSetOutputDevice *set_output_device); void ags_set_output_device_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_set_output_device_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_set_output_device_connect(AgsConnectable *connectable); void ags_set_output_device_disconnect(AgsConnectable *connectable); void ags_set_output_device_dispose(GObject *gobject); void ags_set_output_device_finalize(GObject *gobject); void ags_set_output_device_launch(AgsTask *task); /** * SECTION:ags_set_output_device * @short_description: resets soundcard * @title: AgsSetOutputDevice * @section_id: * @include: ags/audio/task/ags_set_output_device.h * * The #AgsSetOutputDevice task resets soundcard of #AgsSoundcard. */ static gpointer ags_set_output_device_parent_class = NULL; static AgsConnectableInterface *ags_set_output_device_parent_connectable_interface; enum{ PROP_0, PROP_SOUNDCARD, PROP_DEVICE, }; GType ags_set_output_device_get_type() { static GType ags_type_set_output_device = 0; if(!ags_type_set_output_device){ static const GTypeInfo ags_set_output_device_info = { sizeof (AgsSetOutputDeviceClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_set_output_device_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSetOutputDevice), 0, /* n_preallocs */ (GInstanceInitFunc) ags_set_output_device_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_set_output_device_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_set_output_device = g_type_register_static(AGS_TYPE_TASK, "AgsSetOutputDevice", &ags_set_output_device_info, 0); g_type_add_interface_static(ags_type_set_output_device, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_set_output_device); } void ags_set_output_device_class_init(AgsSetOutputDeviceClass *set_output_device) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_set_output_device_parent_class = g_type_class_peek_parent(set_output_device); /* gobject */ gobject = (GObjectClass *) set_output_device; gobject->set_property = ags_set_output_device_set_property; gobject->get_property = ags_set_output_device_get_property; gobject->dispose = ags_set_output_device_dispose; gobject->finalize = ags_set_output_device_finalize; /* properties */ /** * AgsSetOutputDevice:soundcard: * * The assigned #AgsSoundcard instance. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of set audio channels"), i18n_pspec("The soundcard of set audio channels"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsSetOutputDevice:device: * * The soundcard indentifier * * Since: 1.0.0 */ param_spec = g_param_spec_string("device", i18n_pspec("device identifier"), i18n_pspec("The device identifier to set"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /* task */ task = (AgsTaskClass *) set_output_device; task->launch = ags_set_output_device_launch; } void ags_set_output_device_connectable_interface_init(AgsConnectableInterface *connectable) { ags_set_output_device_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_set_output_device_connect; connectable->disconnect = ags_set_output_device_disconnect; } void ags_set_output_device_init(AgsSetOutputDevice *set_output_device) { set_output_device->soundcard = NULL; set_output_device->device = NULL; } void ags_set_output_device_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSetOutputDevice *set_output_device; set_output_device = AGS_SET_OUTPUT_DEVICE(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(set_output_device->soundcard == (GObject *) soundcard){ return; } if(set_output_device->soundcard != NULL){ g_object_unref(set_output_device->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } set_output_device->soundcard = (GObject *) soundcard; } break; case PROP_DEVICE: { char *device; device = (char *) g_value_get_string(value); if(device == set_output_device->device){ return; } if(set_output_device->device != NULL){ g_free(set_output_device->device); } set_output_device->device = g_strdup(device); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_output_device_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSetOutputDevice *set_output_device; set_output_device = AGS_SET_OUTPUT_DEVICE(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, set_output_device->soundcard); } break; case PROP_DEVICE: { g_value_set_string(value, set_output_device->device); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_output_device_connect(AgsConnectable *connectable) { ags_set_output_device_parent_connectable_interface->connect(connectable); /* empty */ } void ags_set_output_device_disconnect(AgsConnectable *connectable) { ags_set_output_device_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_set_output_device_dispose(GObject *gobject) { AgsSetOutputDevice *set_output_device; set_output_device = AGS_SET_OUTPUT_DEVICE(gobject); if(set_output_device->soundcard != NULL){ g_object_unref(set_output_device->soundcard); set_output_device->soundcard = NULL; } /* call parent */ G_OBJECT_CLASS(ags_set_output_device_parent_class)->dispose(gobject); } void ags_set_output_device_finalize(GObject *gobject) { AgsSetOutputDevice *set_output_device; set_output_device = AGS_SET_OUTPUT_DEVICE(gobject); if(set_output_device->soundcard != NULL){ g_object_unref(set_output_device->soundcard); } g_free(set_output_device->device); /* call parent */ G_OBJECT_CLASS(ags_set_output_device_parent_class)->finalize(gobject); } void ags_set_output_device_launch(AgsTask *task) { AgsSetOutputDevice *set_output_device; AgsMutexManager *mutex_manager; GObject *soundcard; char *device; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); set_output_device = AGS_SET_OUTPUT_DEVICE(task); soundcard = set_output_device->soundcard; device = set_output_device->device; /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* set device */ pthread_mutex_lock(soundcard_mutex); if(AGS_IS_DEVOUT(soundcard) && (AGS_DEVOUT_ALSA & (AGS_DEVOUT(soundcard)->flags)) != 0){ if(device != NULL && !g_str_has_prefix(device, "hw:") && index(device, ',') == NULL){ gchar *tmp; tmp = g_strdup_printf("%s,0", device); device = tmp; g_object_set(set_output_device, "device", device, NULL); } } /* perform task */ ags_soundcard_set_device(AGS_SOUNDCARD(soundcard), g_strdup(device)); pthread_mutex_unlock(soundcard_mutex); } /** * ags_set_output_device_new: * @soundcard: the #AgsSoundcard to reset * @device: the new soundcard * * Creates an #AgsSetOutputDevice. * * Returns: an new #AgsSetOutputDevice. * * Since: 1.0.0 */ AgsSetOutputDevice* ags_set_output_device_new(GObject *soundcard, char *device) { AgsSetOutputDevice *set_output_device; set_output_device = (AgsSetOutputDevice *) g_object_new(AGS_TYPE_SET_OUTPUT_DEVICE, "soundcard", soundcard, "device", device, NULL); return(set_output_device); } gsequencer-1.4.24/ags/audio/task/ags_switch_buffer_flag.c0000644000175000017500000002342113247044247020333 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_switch_buffer_flag_class_init(AgsSwitchBufferFlagClass *switch_buffer_flag); void ags_switch_buffer_flag_connectable_interface_init(AgsConnectableInterface *connectable); void ags_switch_buffer_flag_init(AgsSwitchBufferFlag *switch_buffer_flag); void ags_switch_buffer_flag_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_switch_buffer_flag_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_switch_buffer_flag_connect(AgsConnectable *connectable); void ags_switch_buffer_flag_disconnect(AgsConnectable *connectable); void ags_switch_buffer_flag_dispose(GObject *gobject); void ags_switch_buffer_flag_finalize(GObject *gobject); void ags_switch_buffer_flag_launch(AgsTask *task); /** * SECTION:ags_switch_buffer_flag * @short_description: switch buffer flag of device * @title: AgsSwitchBufferFlag * @section_id: * @include: ags/audio/task/ags_switch_buffer_flag.h * * The #AgsSwitchBufferFlag task switches the buffer flag of device. */ static gpointer ags_switch_buffer_flag_parent_class = NULL; static AgsConnectableInterface *ags_switch_buffer_flag_parent_connectable_interface; enum{ PROP_0, PROP_DEVICE, }; GType ags_switch_buffer_flag_get_type() { static GType ags_type_switch_buffer_flag = 0; if(!ags_type_switch_buffer_flag){ static const GTypeInfo ags_switch_buffer_flag_info = { sizeof (AgsSwitchBufferFlagClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_switch_buffer_flag_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSwitchBufferFlag), 0, /* n_preallocs */ (GInstanceInitFunc) ags_switch_buffer_flag_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_switch_buffer_flag_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_switch_buffer_flag = g_type_register_static(AGS_TYPE_TASK, "AgsSwitchBufferFlag", &ags_switch_buffer_flag_info, 0); g_type_add_interface_static(ags_type_switch_buffer_flag, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_switch_buffer_flag); } void ags_switch_buffer_flag_class_init(AgsSwitchBufferFlagClass *switch_buffer_flag) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_switch_buffer_flag_parent_class = g_type_class_peek_parent(switch_buffer_flag); /* gobject */ gobject = (GObjectClass *) switch_buffer_flag; gobject->set_property = ags_switch_buffer_flag_set_property; gobject->get_property = ags_switch_buffer_flag_get_property; gobject->dispose = ags_switch_buffer_flag_dispose; gobject->finalize = ags_switch_buffer_flag_finalize; /* properties */ /** * AgsSwitchBufferFlag:device: * * The assigned #AgsSoundcard or #AgsSequencer * * Since: 1.0.0 */ param_spec = g_param_spec_object("device", i18n_pspec("device of change device"), i18n_pspec("The device of change device task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /* task */ task = (AgsTaskClass *) switch_buffer_flag; task->launch = ags_switch_buffer_flag_launch; } void ags_switch_buffer_flag_connectable_interface_init(AgsConnectableInterface *connectable) { ags_switch_buffer_flag_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_switch_buffer_flag_connect; connectable->disconnect = ags_switch_buffer_flag_disconnect; } void ags_switch_buffer_flag_init(AgsSwitchBufferFlag *switch_buffer_flag) { switch_buffer_flag->device = NULL; } void ags_switch_buffer_flag_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSwitchBufferFlag *switch_buffer_flag; switch_buffer_flag = AGS_SWITCH_BUFFER_FLAG(gobject); switch(prop_id){ case PROP_DEVICE: { GObject *device; device = (GObject *) g_value_get_object(value); if(switch_buffer_flag->device == (GObject *) device){ return; } if(switch_buffer_flag->device != NULL){ g_object_unref(switch_buffer_flag->device); } if(device != NULL){ g_object_ref(device); } switch_buffer_flag->device = (GObject *) device; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_switch_buffer_flag_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSwitchBufferFlag *switch_buffer_flag; switch_buffer_flag = AGS_SWITCH_BUFFER_FLAG(gobject); switch(prop_id){ case PROP_DEVICE: { g_value_set_object(value, switch_buffer_flag->device); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_switch_buffer_flag_connect(AgsConnectable *connectable) { ags_switch_buffer_flag_parent_connectable_interface->connect(connectable); /* empty */ } void ags_switch_buffer_flag_disconnect(AgsConnectable *connectable) { ags_switch_buffer_flag_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_switch_buffer_flag_dispose(GObject *gobject) { AgsSwitchBufferFlag *switch_buffer_flag; switch_buffer_flag = AGS_SWITCH_BUFFER_FLAG(gobject); if(switch_buffer_flag->device != NULL){ g_object_unref(switch_buffer_flag->device); switch_buffer_flag->device = NULL; } /* call parent*/ G_OBJECT_CLASS(ags_switch_buffer_flag_parent_class)->dispose(gobject); } void ags_switch_buffer_flag_finalize(GObject *gobject) { AgsSwitchBufferFlag *switch_buffer_flag; switch_buffer_flag = AGS_SWITCH_BUFFER_FLAG(gobject); if(switch_buffer_flag->device != NULL){ g_object_unref(switch_buffer_flag->device); } /* call parent*/ G_OBJECT_CLASS(ags_switch_buffer_flag_parent_class)->finalize(gobject); } void ags_switch_buffer_flag_launch(AgsTask *task) { AgsSwitchBufferFlag *switch_buffer_flag; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *device_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); switch_buffer_flag = AGS_SWITCH_BUFFER_FLAG(task); /* get main loop and soundcard mutex */ pthread_mutex_lock(application_mutex); device_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) switch_buffer_flag->device); pthread_mutex_unlock(application_mutex); /* switch buffer flag */ pthread_mutex_lock(device_mutex); if(AGS_IS_DEVOUT(switch_buffer_flag->device)){ ags_devout_switch_buffer_flag(switch_buffer_flag->device); }else if(AGS_IS_DEVIN(switch_buffer_flag->device)){ ags_devin_switch_buffer_flag(switch_buffer_flag->device); }else if(AGS_IS_JACK_DEVOUT(switch_buffer_flag->device)){ ags_jack_devout_switch_buffer_flag(switch_buffer_flag->device); }else if(AGS_IS_JACK_DEVIN(switch_buffer_flag->device)){ ags_jack_devin_switch_buffer_flag(switch_buffer_flag->device); }else if(AGS_IS_PULSE_DEVOUT(switch_buffer_flag->device)){ ags_pulse_devout_switch_buffer_flag(switch_buffer_flag->device); }else if(AGS_IS_PULSE_DEVIN(switch_buffer_flag->device)){ ags_pulse_devin_switch_buffer_flag(switch_buffer_flag->device); }else if(AGS_IS_CORE_AUDIO_DEVOUT(switch_buffer_flag->device)){ ags_core_audio_devout_switch_buffer_flag(switch_buffer_flag->device); }else if(AGS_IS_MIDIIN(switch_buffer_flag->device)){ ags_midiin_switch_buffer_flag(switch_buffer_flag->device); }else if(AGS_IS_JACK_MIDIIN(switch_buffer_flag->device)){ ags_jack_midiin_switch_buffer_flag(switch_buffer_flag->device); }else if(AGS_IS_CORE_AUDIO_MIDIIN(switch_buffer_flag->device)){ ags_core_audio_midiin_switch_buffer_flag(switch_buffer_flag->device); } pthread_mutex_unlock(device_mutex); } /** * ags_switch_buffer_flag_new: * @device: the #AgsSoundcard or #AgsSequencer * * Creates an #AgsSwitchBufferFlag. * * Returns: an new #AgsSwitchBufferFlag. * * Since: 1.0.0 */ AgsSwitchBufferFlag* ags_switch_buffer_flag_new(GObject *device) { AgsSwitchBufferFlag *switch_buffer_flag; switch_buffer_flag = (AgsSwitchBufferFlag *) g_object_new(AGS_TYPE_SWITCH_BUFFER_FLAG, "device", device, NULL); return(switch_buffer_flag); } gsequencer-1.4.24/ags/audio/task/ags_add_soundcard.c0000644000175000017500000002243713247044247017310 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_add_soundcard_class_init(AgsAddSoundcardClass *add_soundcard); void ags_add_soundcard_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_soundcard_init(AgsAddSoundcard *add_soundcard); void ags_add_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_add_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_add_soundcard_connect(AgsConnectable *connectable); void ags_add_soundcard_disconnect(AgsConnectable *connectable); void ags_add_soundcard_dispose(GObject *gobject); void ags_add_soundcard_finalize(GObject *gobject); void ags_add_soundcard_launch(AgsTask *task); enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_SOUNDCARD, }; /** * SECTION:ags_add_soundcard * @short_description: add soundcard object to context * @title: AgsAddSoundcard * @section_id: * @include: ags/audio/task/ags_add_soundcard.h * * The #AgsAddSoundcard task adds #AgsSoundcard to context. */ static gpointer ags_add_soundcard_parent_class = NULL; static AgsConnectableInterface *ags_add_soundcard_parent_connectable_interface; GType ags_add_soundcard_get_type() { static GType ags_type_add_soundcard = 0; if(!ags_type_add_soundcard){ static const GTypeInfo ags_add_soundcard_info = { sizeof (AgsAddSoundcardClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_soundcard_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddSoundcard), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_soundcard_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_soundcard_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_soundcard = g_type_register_static(AGS_TYPE_TASK, "AgsAddSoundcard", &ags_add_soundcard_info, 0); g_type_add_interface_static(ags_type_add_soundcard, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_soundcard); } void ags_add_soundcard_class_init(AgsAddSoundcardClass *add_soundcard) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_add_soundcard_parent_class = g_type_class_peek_parent(add_soundcard); /* gobject */ gobject = (GObjectClass *) add_soundcard; gobject->set_property = ags_add_soundcard_set_property; gobject->get_property = ags_add_soundcard_get_property; gobject->dispose = ags_add_soundcard_dispose; gobject->finalize = ags_add_soundcard_finalize; /** * AgsAddSoundcard:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context of add soundcard"), i18n_pspec("The application context of add soundcard task"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsAddSoundcard:soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of add soundcard"), i18n_pspec("The soundcard of add soundcard task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* task */ task = (AgsTaskClass *) add_soundcard; task->launch = ags_add_soundcard_launch; } void ags_add_soundcard_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_soundcard_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_soundcard_connect; connectable->disconnect = ags_add_soundcard_disconnect; } void ags_add_soundcard_init(AgsAddSoundcard *add_soundcard) { add_soundcard->application_context = NULL; add_soundcard->soundcard = NULL; } void ags_add_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAddSoundcard *add_soundcard; add_soundcard = AGS_ADD_SOUNDCARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(add_soundcard->application_context == (GObject *) application_context){ return; } if(add_soundcard->application_context != NULL){ g_object_unref(add_soundcard->application_context); } if(application_context != NULL){ g_object_ref(application_context); } add_soundcard->application_context = (GObject *) application_context; } break; case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(add_soundcard->soundcard == (GObject *) soundcard){ return; } if(add_soundcard->soundcard != NULL){ g_object_unref(add_soundcard->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } add_soundcard->soundcard = (GObject *) soundcard; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAddSoundcard *add_soundcard; add_soundcard = AGS_ADD_SOUNDCARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, add_soundcard->application_context); } break; case PROP_SOUNDCARD: { g_value_set_object(value, add_soundcard->soundcard); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_soundcard_connect(AgsConnectable *connectable) { ags_add_soundcard_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_soundcard_disconnect(AgsConnectable *connectable) { ags_add_soundcard_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_soundcard_dispose(GObject *gobject) { AgsAddSoundcard *add_soundcard; add_soundcard = AGS_ADD_SOUNDCARD(gobject); if(add_soundcard->application_context != NULL){ g_object_unref(add_soundcard->application_context); add_soundcard->application_context = NULL; } if(add_soundcard->soundcard != NULL){ g_object_unref(add_soundcard->soundcard); add_soundcard->soundcard = NULL; } /* call parent */ G_OBJECT_CLASS(ags_add_soundcard_parent_class)->dispose(gobject); } void ags_add_soundcard_finalize(GObject *gobject) { AgsAddSoundcard *add_soundcard; add_soundcard = AGS_ADD_SOUNDCARD(gobject); if(add_soundcard->application_context != NULL){ g_object_unref(add_soundcard->application_context); } if(add_soundcard->soundcard != NULL){ g_object_unref(add_soundcard->soundcard); } /* call parent */ G_OBJECT_CLASS(ags_add_soundcard_parent_class)->finalize(gobject); } void ags_add_soundcard_launch(AgsTask *task) { AgsAddSoundcard *add_soundcard; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); add_soundcard = AGS_ADD_SOUNDCARD(task); /* add soundcard */ pthread_mutex_lock(application_mutex); ags_sound_provider_set_soundcard(AGS_SOUND_PROVIDER(add_soundcard->application_context), g_list_append(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(add_soundcard->application_context)), add_soundcard->soundcard)); pthread_mutex_unlock(application_mutex); } /** * ags_add_soundcard_new: * @application_context: the #AgsApplicationContext * @soundcard: the #AgsSoundcard to add * * Creates an #AgsAddSoundcard. * * Returns: an new #AgsAddSoundcard. * * Since: 1.0.0 */ AgsAddSoundcard* ags_add_soundcard_new(AgsApplicationContext *application_context, GObject *soundcard) { AgsAddSoundcard *add_soundcard; add_soundcard = (AgsAddSoundcard *) g_object_new(AGS_TYPE_ADD_SOUNDCARD, "application-context", application_context, "soundcard", soundcard, NULL); return(add_soundcard); } gsequencer-1.4.24/ags/audio/task/ags_add_point_to_selection.c0000644000175000017500000003053213247044247021221 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_add_point_to_selection_class_init(AgsAddPointToSelectionClass *add_point_to_selection); void ags_add_point_to_selection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_point_to_selection_init(AgsAddPointToSelection *add_point_to_selection); void ags_add_point_to_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_add_point_to_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_add_point_to_selection_connect(AgsConnectable *connectable); void ags_add_point_to_selection_disconnect(AgsConnectable *connectable); void ags_add_point_to_selection_dispose(GObject *gobject); void ags_add_point_to_selection_finalize(GObject *gobject); void ags_add_point_to_selection_launch(AgsTask *task); /** * SECTION:ags_add_point_to_selection * @short_description: add point to notation selection * @title: AgsAddPointToSelection * @section_id: * @include: ags/audio/task/ags_add_point_to_selection.h * * The #AgsAddPointToSelection task adds the specified #AgsNote to selection of #AgsNotation. */ static gpointer ags_add_point_to_selection_parent_class = NULL; static AgsConnectableInterface *ags_add_point_to_selection_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_NOTATION, PROP_X, PROP_Y, PROP_REPLACE_CURRENT_SELECTION, }; GType ags_add_point_to_selection_get_type() { static GType ags_type_add_point_to_selection = 0; if(!ags_type_add_point_to_selection){ static const GTypeInfo ags_add_point_to_selection_info = { sizeof (AgsAddPointToSelectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_point_to_selection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddPointToSelection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_point_to_selection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_point_to_selection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_point_to_selection = g_type_register_static(AGS_TYPE_TASK, "AgsAddPointToSelection", &ags_add_point_to_selection_info, 0); g_type_add_interface_static(ags_type_add_point_to_selection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_point_to_selection); } void ags_add_point_to_selection_class_init(AgsAddPointToSelectionClass *add_point_to_selection) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_add_point_to_selection_parent_class = g_type_class_peek_parent(add_point_to_selection); /* gobject */ gobject = (GObjectClass *) add_point_to_selection; gobject->set_property = ags_add_point_to_selection_set_property; gobject->get_property = ags_add_point_to_selection_get_property; gobject->dispose = ags_add_point_to_selection_dispose; gobject->finalize = ags_add_point_to_selection_finalize; /* properties */ /** * AgsAddPointToSelection:audio: * * The assigned #AgsAudio * * Since: 1.2.2 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of notation"), i18n_pspec("The audio of notation"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsAddPointToSelection:notation: * * The assigned #AgsNotation * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("notation of add point to selection"), i18n_pspec("The notation of add point to selection task"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsAddPointToSelection:x: * * Note offset x. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x", i18n_pspec("offset x"), i18n_pspec("The x offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X, param_spec); /** * AgsAddPointToSelection:y: * * Note offset y. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("y", i18n_pspec("offset y"), i18n_pspec("The y offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y, param_spec); /** * AgsAddPointToSelection:replace-current-selection: * * The notation's replace-current-selection. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("replace-current-selection", i18n_pspec("replace current selection"), i18n_pspec("Replace current selection of notation"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_REPLACE_CURRENT_SELECTION, param_spec); /* task */ task = (AgsTaskClass *) add_point_to_selection; task->launch = ags_add_point_to_selection_launch; } void ags_add_point_to_selection_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_point_to_selection_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_point_to_selection_connect; connectable->disconnect = ags_add_point_to_selection_disconnect; } void ags_add_point_to_selection_init(AgsAddPointToSelection *add_point_to_selection) { add_point_to_selection->audio = NULL; add_point_to_selection->notation = NULL; add_point_to_selection->x = 0; add_point_to_selection->y = 0; add_point_to_selection->replace_current_selection = TRUE; } void ags_add_point_to_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAddPointToSelection *add_point_to_selection; add_point_to_selection = AGS_ADD_POINT_TO_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(add_point_to_selection->audio == (GObject *) audio){ return; } if(add_point_to_selection->audio != NULL){ g_object_unref(add_point_to_selection->audio); } if(audio != NULL){ g_object_ref(audio); } add_point_to_selection->audio = (GObject *) audio; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(add_point_to_selection->notation == (GObject *) notation){ return; } if(add_point_to_selection->notation != NULL){ g_object_unref(add_point_to_selection->notation); } if(notation != NULL){ g_object_ref(notation); } add_point_to_selection->notation = (GObject *) notation; } break; case PROP_X: { add_point_to_selection->x = g_value_get_uint(value); } break; case PROP_Y: { add_point_to_selection->y = g_value_get_uint(value); } break; case PROP_REPLACE_CURRENT_SELECTION: { add_point_to_selection->replace_current_selection = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_point_to_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAddPointToSelection *add_point_to_selection; add_point_to_selection = AGS_ADD_POINT_TO_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, add_point_to_selection->audio); } break; case PROP_NOTATION: { g_value_set_object(value, add_point_to_selection->notation); } break; case PROP_X: { g_value_set_uint(value, add_point_to_selection->x); } break; case PROP_Y: { g_value_set_uint(value, add_point_to_selection->y); } break; case PROP_REPLACE_CURRENT_SELECTION: { g_value_set_boolean(value, add_point_to_selection->replace_current_selection); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_point_to_selection_connect(AgsConnectable *connectable) { ags_add_point_to_selection_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_point_to_selection_disconnect(AgsConnectable *connectable) { ags_add_point_to_selection_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_point_to_selection_dispose(GObject *gobject) { AgsAddPointToSelection *add_point_to_selection; add_point_to_selection = AGS_ADD_POINT_TO_SELECTION(gobject); if(add_point_to_selection->audio != NULL){ g_object_unref(add_point_to_selection->audio); add_point_to_selection->audio = NULL; } if(add_point_to_selection->notation != NULL){ g_object_unref(add_point_to_selection->notation); add_point_to_selection->notation = NULL; } /* call parent */ G_OBJECT_CLASS(ags_add_point_to_selection_parent_class)->dispose(gobject); } void ags_add_point_to_selection_finalize(GObject *gobject) { AgsAddPointToSelection *add_point_to_selection; add_point_to_selection = AGS_ADD_POINT_TO_SELECTION(gobject); if(add_point_to_selection->audio != NULL){ g_object_unref(add_point_to_selection->audio); } if(add_point_to_selection->notation != NULL){ g_object_unref(add_point_to_selection->notation); } /* call parent */ G_OBJECT_CLASS(ags_add_point_to_selection_parent_class)->finalize(gobject); } void ags_add_point_to_selection_launch(AgsTask *task) { AgsAddPointToSelection *add_point_to_selection; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); add_point_to_selection = AGS_ADD_POINT_TO_SELECTION(task); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) add_point_to_selection->audio); pthread_mutex_unlock(application_mutex); /* add point to selection */ pthread_mutex_lock(audio_mutex); ags_notation_add_point_to_selection(add_point_to_selection->notation, add_point_to_selection->x, add_point_to_selection->y, add_point_to_selection->replace_current_selection); pthread_mutex_unlock(audio_mutex); } /** * ags_add_point_to_selection_new: * @notation: the #AgsNotation providing the selection * @x: x coordinate * @y: y coordinate * @replace_current_selection: if %TRUE new selection is created, otherwise added to current * * WARNING you should provide the #AgsAddPointToSelection:audio property. * Creates an #AgsAddPointToSelection. * * Returns: an new #AgsAddPointToSelection. * * Since: 1.0.0 */ AgsAddPointToSelection* ags_add_point_to_selection_new(AgsNotation *notation, guint x, guint y, gboolean replace_current_selection) { AgsAddPointToSelection *add_point_to_selection; add_point_to_selection = (AgsAddPointToSelection *) g_object_new(AGS_TYPE_ADD_POINT_TO_SELECTION, "notation", notation, "x", x, "y", y, "replace-current-selection", replace_current_selection, NULL); return(add_point_to_selection); } gsequencer-1.4.24/ags/audio/task/ags_set_input_device.h0000644000175000017500000000377713247044247020062 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SET_INPUT_DEVICE_H__ #define __AGS_SET_INPUT_DEVICE_H__ #include #include #include #define AGS_TYPE_SET_INPUT_DEVICE (ags_set_input_device_get_type()) #define AGS_SET_INPUT_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SET_INPUT_DEVICE, AgsSetInputDevice)) #define AGS_SET_INPUT_DEVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SET_INPUT_DEVICE, AgsSetInputDeviceClass)) #define AGS_IS_SET_INPUT_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SET_INPUT_DEVICE)) #define AGS_IS_SET_INPUT_DEVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SET_INPUT_DEVICE)) #define AGS_SET_INPUT_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SET_INPUT_DEVICE, AgsSetInputDeviceClass)) typedef struct _AgsSetInputDevice AgsSetInputDevice; typedef struct _AgsSetInputDeviceClass AgsSetInputDeviceClass; struct _AgsSetInputDevice { AgsTask task; GObject *sequencer; char *device; }; struct _AgsSetInputDeviceClass { AgsTaskClass task; }; GType ags_set_input_device_get_type(); AgsSetInputDevice* ags_set_input_device_new(GObject *sequencer, char *device); #endif /*__AGS_SET_INPUT_DEVICE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_add_audio_signal.c0000644000175000017500000003523513247044247017764 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_add_audio_signal_class_init(AgsAddAudioSignalClass *add_audio_signal); void ags_add_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_audio_signal_init(AgsAddAudioSignal *add_audio_signal); void ags_add_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_add_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_add_audio_signal_connect(AgsConnectable *connectable); void ags_add_audio_signal_disconnect(AgsConnectable *connectable); void ags_add_audio_signal_dispose(GObject *gobject); void ags_add_audio_signal_finalize(GObject *gobject); void ags_add_audio_signal_launch(AgsTask *task); /** * SECTION:ags_add_audio_signal * @short_description: add audio signal object to recycling * @title: AgsAddAudioSignal * @section_id: * @include: ags/audio/task/ags_add_audio_signal.h * * The #AgsAddAudioSignal task adds #AgsAudioSignal to #AgsRecycling. */ static gpointer ags_add_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_add_audio_signal_parent_connectable_interface; enum{ PROP_0, PROP_RECYCLING, PROP_AUDIO_SIGNAL, PROP_SOUNDCARD, PROP_RECALL_ID, PROP_AUDIO_SIGNAL_FLAGS, }; GType ags_add_audio_signal_get_type() { static GType ags_type_add_audio_signal = 0; if(!ags_type_add_audio_signal){ static const GTypeInfo ags_add_audio_signal_info = { sizeof (AgsAddAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_audio_signal = g_type_register_static(AGS_TYPE_TASK, "AgsAddAudioSignal", &ags_add_audio_signal_info, 0); g_type_add_interface_static(ags_type_add_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_audio_signal); } void ags_add_audio_signal_class_init(AgsAddAudioSignalClass *add_audio_signal) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_add_audio_signal_parent_class = g_type_class_peek_parent(add_audio_signal); /* gobject */ gobject = (GObjectClass *) add_audio_signal; gobject->set_property = ags_add_audio_signal_set_property; gobject->get_property = ags_add_audio_signal_get_property; gobject->dispose = ags_add_audio_signal_dispose; gobject->finalize = ags_add_audio_signal_finalize; /* properties */ /** * AgsAddAudioSignal:recycling: * * The assigned #AgsRecycling * * Since: 1.0.0 */ param_spec = g_param_spec_object("recycling", i18n_pspec("recycling of add audio signal"), i18n_pspec("The recycling of add audio signal task"), AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECYCLING, param_spec); /** * AgsAddAudioSignal:audio-signal: * * The assigned #AgsAudioSignal * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-signal", i18n_pspec("audio signal of add audio signal"), i18n_pspec("The audio signal of add audio signal task"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_SIGNAL, param_spec); /** * AgsAddAudioSignal:soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of add audio signal"), i18n_pspec("The soundcard of add audio signal task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsAddAudioSignal:recall-id: * * The assigned #AgsRecallID * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-id", i18n_pspec("audio signal of add audio signal"), i18n_pspec("The audio signal of add audio signal task"), AGS_TYPE_RECALL_ID, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_ID, param_spec); /** * AgsAddAudioSignal:audio-signal-flags: * * The audio signal's flags. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-signal-flags", i18n_pspec("audio signal flags of effect"), i18n_pspec("The audio signal's flags to apply"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_SIGNAL_FLAGS, param_spec); /* task */ task = (AgsTaskClass *) add_audio_signal; task->launch = ags_add_audio_signal_launch; } void ags_add_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_audio_signal_connect; connectable->disconnect = ags_add_audio_signal_disconnect; } void ags_add_audio_signal_init(AgsAddAudioSignal *add_audio_signal) { add_audio_signal->recycling = NULL; add_audio_signal->audio_signal = NULL; add_audio_signal->soundcard = NULL; add_audio_signal->recall_id = NULL; add_audio_signal->audio_signal_flags = 0; } void ags_add_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAddAudioSignal *add_audio_signal; add_audio_signal = AGS_ADD_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_RECYCLING: { AgsRecycling *recycling; recycling = (AgsRecycling *) g_value_get_object(value); if(add_audio_signal->recycling == (GObject *) recycling){ return; } if(add_audio_signal->recycling != NULL){ g_object_unref(add_audio_signal->recycling); } if(recycling != NULL){ g_object_ref(recycling); } add_audio_signal->recycling = (GObject *) recycling; } break; case PROP_AUDIO_SIGNAL: { AgsAudioSignal *audio_signal; audio_signal = (AgsAudioSignal *) g_value_get_object(value); if(add_audio_signal->audio_signal == (GObject *) audio_signal){ return; } if(add_audio_signal->audio_signal != NULL){ g_object_unref(add_audio_signal->audio_signal); } if(audio_signal != NULL){ g_object_ref(audio_signal); } add_audio_signal->audio_signal = (GObject *) audio_signal; } break; case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(add_audio_signal->soundcard == (GObject *) soundcard){ return; } if(add_audio_signal->soundcard != NULL){ g_object_unref(add_audio_signal->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } add_audio_signal->soundcard = (GObject *) soundcard; } break; case PROP_RECALL_ID: { AgsRecallID *recall_id; recall_id = (AgsRecallID *) g_value_get_object(value); if(add_audio_signal->recall_id == (GObject *) recall_id){ return; } if(add_audio_signal->recall_id != NULL){ g_object_unref(add_audio_signal->recall_id); } if(recall_id != NULL){ g_object_ref(recall_id); } add_audio_signal->recall_id = (GObject *) recall_id; } break; case PROP_AUDIO_SIGNAL_FLAGS: { guint audio_signal_flags; audio_signal_flags = g_value_get_uint(value); add_audio_signal->audio_signal_flags = audio_signal_flags; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAddAudioSignal *add_audio_signal; add_audio_signal = AGS_ADD_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_RECYCLING: { g_value_set_object(value, add_audio_signal->recycling); } break; case PROP_AUDIO_SIGNAL: { g_value_set_object(value, add_audio_signal->audio_signal); } break; case PROP_SOUNDCARD: { g_value_set_object(value, add_audio_signal->soundcard); } break; case PROP_AUDIO_SIGNAL_FLAGS: { g_value_set_uint(value, add_audio_signal->audio_signal_flags); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_audio_signal_connect(AgsConnectable *connectable) { ags_add_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_audio_signal_disconnect(AgsConnectable *connectable) { ags_add_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_audio_signal_dispose(GObject *gobject) { AgsAddAudioSignal *add_audio_signal; add_audio_signal = AGS_ADD_AUDIO_SIGNAL(gobject); if(add_audio_signal->recycling != NULL){ g_object_unref(add_audio_signal->recycling); add_audio_signal->recycling = NULL; } if(add_audio_signal->audio_signal != NULL){ g_object_unref(add_audio_signal->audio_signal); add_audio_signal->audio_signal = NULL; } if(add_audio_signal->soundcard != NULL){ g_object_unref(add_audio_signal->soundcard); add_audio_signal->soundcard = NULL; } if(add_audio_signal->recall_id != NULL){ g_object_unref(add_audio_signal->recall_id); add_audio_signal->recall_id = NULL; } /* call parent */ G_OBJECT_CLASS(ags_add_audio_signal_parent_class)->dispose(gobject); } void ags_add_audio_signal_finalize(GObject *gobject) { AgsAddAudioSignal *add_audio_signal; add_audio_signal = AGS_ADD_AUDIO_SIGNAL(gobject); if(add_audio_signal->recycling != NULL){ g_object_unref(add_audio_signal->recycling); } if(add_audio_signal->audio_signal != NULL){ g_object_unref(add_audio_signal->audio_signal); } if(add_audio_signal->soundcard != NULL){ g_object_unref(add_audio_signal->soundcard); } if(add_audio_signal->recall_id != NULL){ g_object_unref(add_audio_signal->recall_id); } /* call parent */ G_OBJECT_CLASS(ags_add_audio_signal_parent_class)->finalize(gobject); } void ags_add_audio_signal_launch(AgsTask *task) { AgsAddAudioSignal *add_audio_signal; AgsAudioSignal *audio_signal, *old_template; AgsRecallID *recall_id; AgsMutexManager *mutex_manager; GObject *soundcard; gdouble delay; guint attack; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); add_audio_signal = AGS_ADD_AUDIO_SIGNAL(task); soundcard = add_audio_signal->soundcard; /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) add_audio_signal->recycling); pthread_mutex_unlock(application_mutex); /* check for template to remove */ if((AGS_AUDIO_SIGNAL_TEMPLATE & (add_audio_signal->audio_signal_flags)) != 0){ pthread_mutex_lock(recycling_mutex); old_template = ags_audio_signal_get_template(add_audio_signal->recycling->audio_signal); pthread_mutex_unlock(recycling_mutex); }else{ old_template = NULL; } recall_id = add_audio_signal->recall_id; /* create audio signal */ if(add_audio_signal->audio_signal == NULL){ add_audio_signal->audio_signal = audio_signal = ags_audio_signal_new((GObject *) soundcard, (GObject *) add_audio_signal->recycling, (GObject *) recall_id); audio_signal->flags = add_audio_signal->audio_signal_flags; }else{ audio_signal = add_audio_signal->audio_signal; } /* delay and attack */ //TODO:JK: unclear attack = 0; //soundcard->attack[((tic_counter_incr == AGS_NOTATION_TICS_PER_BEAT) ? // 0: // tic_counter_incr)]; delay = 0.0; //soundcard->delay[((tic_counter_incr == AGS_NOTATION_TICS_PER_BEAT) ? // 0: // tic_counter_incr)]; /* add audio signal */ ags_recycling_create_audio_signal_with_defaults(add_audio_signal->recycling, audio_signal, delay, attack); audio_signal->stream_current = audio_signal->stream_beginning; ags_connectable_connect(AGS_CONNECTABLE(audio_signal)); /* * emit add_audio_signal on AgsRecycling */ ags_recycling_add_audio_signal(add_audio_signal->recycling, audio_signal); /* remove template */ if(old_template != NULL){ ags_recycling_remove_audio_signal(add_audio_signal->recycling, old_template); } } /** * ags_add_audio_signal_new: * @recycling: the #AgsRecycling * @audio_signal: the #AgsAudioSignal to add * @soundcard: the #GObject defaulting to * @recall_id: the #AgsRecallID, may be %NULL if %AGS_AUDIO_SIGNAL_TEMPLATE set * @audio_signal_flags: the flags to set * * Creates an #AgsAddAudioSignal. * * Returns: an new #AgsAddAudioSignal. * * Since: 1.0.0 */ AgsAddAudioSignal* ags_add_audio_signal_new(AgsRecycling *recycling, AgsAudioSignal *audio_signal, GObject *soundcard, AgsRecallID *recall_id, guint audio_signal_flags) { AgsAddAudioSignal *add_audio_signal; add_audio_signal = (AgsAddAudioSignal *) g_object_new(AGS_TYPE_ADD_AUDIO_SIGNAL, "recycling", recycling, "audio-signal", audio_signal, "soundcard", soundcard, "recall-id", recall_id, "audio-signal-flags", audio_signal_flags, NULL); return(add_audio_signal); } gsequencer-1.4.24/ags/audio/task/ags_set_audio_channels.c0000644000175000017500000002263713247044247020347 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_set_audio_channels_class_init(AgsSetAudioChannelsClass *set_audio_channels); void ags_set_audio_channels_connectable_interface_init(AgsConnectableInterface *connectable); void ags_set_audio_channels_init(AgsSetAudioChannels *set_audio_channels); void ags_set_audio_channels_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_set_audio_channels_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_set_audio_channels_connect(AgsConnectable *connectable); void ags_set_audio_channels_disconnect(AgsConnectable *connectable); void ags_set_audio_channels_dispose(GObject *gobject); void ags_set_audio_channels_finalize(GObject *gobject); void ags_set_audio_channels_launch(AgsTask *task); /** * SECTION:ags_set_audio_channels * @short_description: resizes audio channels * @title: AgsSetAudioChannels * @section_id: * @include: ags/audio/task/ags_set_audio_channels.h * * The #AgsSetAudioChannels task resizes audio channels of #AgsSoundcard. */ static gpointer ags_set_audio_channels_parent_class = NULL; static AgsConnectableInterface *ags_set_audio_channels_parent_connectable_interface; enum{ PROP_0, PROP_SOUNDCARD, PROP_AUDIO_CHANNELS, }; GType ags_set_audio_channels_get_type() { static GType ags_type_set_audio_channels = 0; if(!ags_type_set_audio_channels){ static const GTypeInfo ags_set_audio_channels_info = { sizeof (AgsSetAudioChannelsClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_set_audio_channels_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSetAudioChannels), 0, /* n_preallocs */ (GInstanceInitFunc) ags_set_audio_channels_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_set_audio_channels_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_set_audio_channels = g_type_register_static(AGS_TYPE_TASK, "AgsSetAudioChannels", &ags_set_audio_channels_info, 0); g_type_add_interface_static(ags_type_set_audio_channels, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_set_audio_channels); } void ags_set_audio_channels_class_init(AgsSetAudioChannelsClass *set_audio_channels) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_set_audio_channels_parent_class = g_type_class_peek_parent(set_audio_channels); /* gobject */ gobject = (GObjectClass *) set_audio_channels; gobject->set_property = ags_set_audio_channels_set_property; gobject->get_property = ags_set_audio_channels_get_property; gobject->dispose = ags_set_audio_channels_dispose; gobject->finalize = ags_set_audio_channels_finalize; /* properties */ /** * AgsSetAudioChannels:soundcard: * * The assigned #AgsSoundcard instance. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of set audio channels"), i18n_pspec("The soundcard of set audio channels"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsSetAudioChannels:audio-channels: * * The count of audio channels to apply to audio. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channels", i18n_pspec("audio channels"), i18n_pspec("The count of audio channels"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNELS, param_spec); /* task */ task = (AgsTaskClass *) set_audio_channels; task->launch = ags_set_audio_channels_launch; } void ags_set_audio_channels_connectable_interface_init(AgsConnectableInterface *connectable) { ags_set_audio_channels_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_set_audio_channels_connect; connectable->disconnect = ags_set_audio_channels_disconnect; } void ags_set_audio_channels_init(AgsSetAudioChannels *set_audio_channels) { set_audio_channels->soundcard = NULL; set_audio_channels->audio_channels = 0; } void ags_set_audio_channels_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSetAudioChannels *set_audio_channels; set_audio_channels = AGS_SET_AUDIO_CHANNELS(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(set_audio_channels->soundcard == (GObject *) soundcard){ return; } if(set_audio_channels->soundcard != NULL){ g_object_unref(set_audio_channels->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } set_audio_channels->soundcard = (GObject *) soundcard; } break; case PROP_AUDIO_CHANNELS: { set_audio_channels->audio_channels = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_audio_channels_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSetAudioChannels *set_audio_channels; set_audio_channels = AGS_SET_AUDIO_CHANNELS(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, set_audio_channels->soundcard); } break; case PROP_AUDIO_CHANNELS: { g_value_set_uint(value, set_audio_channels->audio_channels); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_set_audio_channels_connect(AgsConnectable *connectable) { ags_set_audio_channels_parent_connectable_interface->connect(connectable); /* empty */ } void ags_set_audio_channels_disconnect(AgsConnectable *connectable) { ags_set_audio_channels_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_set_audio_channels_dispose(GObject *gobject) { AgsSetAudioChannels *set_audio_channels; set_audio_channels = AGS_SET_AUDIO_CHANNELS(gobject); if(set_audio_channels->soundcard != NULL){ g_object_unref(set_audio_channels->soundcard); set_audio_channels->soundcard = NULL; } /* call parent */ G_OBJECT_CLASS(ags_set_audio_channels_parent_class)->dispose(gobject); } void ags_set_audio_channels_finalize(GObject *gobject) { AgsSetAudioChannels *set_audio_channels; set_audio_channels = AGS_SET_AUDIO_CHANNELS(gobject); if(set_audio_channels->soundcard != NULL){ g_object_unref(set_audio_channels->soundcard); } /* call parent */ G_OBJECT_CLASS(ags_set_audio_channels_parent_class)->finalize(gobject); } void ags_set_audio_channels_launch(AgsTask *task) { AgsSetAudioChannels *set_audio_channels; AgsMutexManager *mutex_manager; guint channels; guint samplerate; guint buffer_size; guint format; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); set_audio_channels = AGS_SET_AUDIO_CHANNELS(task); /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) set_audio_channels->soundcard); pthread_mutex_unlock(application_mutex); /* set audio channels */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_get_presets(AGS_SOUNDCARD(set_audio_channels->soundcard), &channels, &samplerate, &buffer_size, &format); ags_soundcard_set_presets(AGS_SOUNDCARD(set_audio_channels->soundcard), set_audio_channels->audio_channels, samplerate, buffer_size, format); pthread_mutex_unlock(soundcard_mutex); } /** * ags_set_audio_channels_new: * @soundcard: the #AgsSoundcard to reset * @audio_channels: the new count of audio channels * * Creates an #AgsSetAudioChannels. * * Returns: an new #AgsSetAudioChannels. * * Since: 1.0.0 */ AgsSetAudioChannels* ags_set_audio_channels_new(GObject *soundcard, guint audio_channels) { AgsSetAudioChannels *set_audio_channels; set_audio_channels = (AgsSetAudioChannels *) g_object_new(AGS_TYPE_SET_AUDIO_CHANNELS, "soundcard", soundcard, "audio-channels", audio_channels, NULL); return(set_audio_channels); } gsequencer-1.4.24/ags/audio/task/ags_open_single_file.c0000644000175000017500000003402213247044247020010 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_open_single_file_class_init(AgsOpenSingleFileClass *open_single_file); void ags_open_single_file_connectable_interface_init(AgsConnectableInterface *connectable); void ags_open_single_file_init(AgsOpenSingleFile *open_single_file); void ags_open_single_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_open_single_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_open_single_file_connect(AgsConnectable *connectable); void ags_open_single_file_disconnect(AgsConnectable *connectable); void ags_open_single_file_dispose(GObject *gobject); void ags_open_single_file_finalize(GObject *gobject); void ags_open_single_file_launch(AgsTask *task); /** * SECTION:ags_open_single_file * @short_description: open single file task * @title: AgsOpenSingleFile * @section_id: * @include: ags/audio/task/ags_open_single_file.h * * The #AgsOpenFile task opens one single file. */ static gpointer ags_open_single_file_parent_class = NULL; static AgsConnectableInterface *ags_open_single_file_parent_connectable_interface; enum{ PROP_0, PROP_CHANNEL, PROP_SOUNDCARD, PROP_FILENAME, PROP_START_CHANNEL, PROP_AUDIO_CHANNELS, }; GType ags_open_single_file_get_type() { static GType ags_type_open_single_file = 0; if(!ags_type_open_single_file){ static const GTypeInfo ags_open_single_file_info = { sizeof (AgsOpenSingleFileClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_open_single_file_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsOpenSingleFile), 0, /* n_preallocs */ (GInstanceInitFunc) ags_open_single_file_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_open_single_file_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_open_single_file = g_type_register_static(AGS_TYPE_TASK, "AgsOpenSingleFile", &ags_open_single_file_info, 0); g_type_add_interface_static(ags_type_open_single_file, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_open_single_file); } void ags_open_single_file_class_init(AgsOpenSingleFileClass *open_single_file) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_open_single_file_parent_class = g_type_class_peek_parent(open_single_file); /* GObject */ gobject = (GObjectClass *) open_single_file; gobject->set_property = ags_open_single_file_set_property; gobject->get_property = ags_open_single_file_get_property; gobject->dispose = ags_open_single_file_dispose; gobject->finalize = ags_open_single_file_finalize; /* properties */ /** * AgsOpenSingleFile:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel of open file"), i18n_pspec("The channel of open file task"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /** * AgsOpenSingleFile:soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of open file"), i18n_pspec("The soundcard of open file task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsOpenSingleFile:filename: * * The assigned filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the filename"), i18n_pspec("The filename containing the output"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsOpenSingleFile:start-channel: * * The start channel of within pad @channel. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("start-channel", i18n_pspec("start channel"), i18n_pspec("The start channel"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_START_CHANNEL, param_spec); /** * AgsOpenSingleFile:audio-channels: * * The audio channels count to read. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channels", i18n_pspec("audio channels"), i18n_pspec("The audio channels to read"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNELS, param_spec); /* AgsTask */ task = (AgsTaskClass *) open_single_file; task->launch = ags_open_single_file_launch; } void ags_open_single_file_connectable_interface_init(AgsConnectableInterface *connectable) { ags_open_single_file_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_open_single_file_connect; connectable->disconnect = ags_open_single_file_disconnect; } void ags_open_single_file_init(AgsOpenSingleFile *open_single_file) { open_single_file->channel = NULL; open_single_file->soundcard = NULL; open_single_file->filename = NULL; open_single_file->start_channel = 0; open_single_file->audio_channels = 0; } void ags_open_single_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsOpenSingleFile *open_single_file; open_single_file = AGS_OPEN_SINGLE_FILE(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(open_single_file->channel == (GObject *) channel){ return; } if(open_single_file->channel != NULL){ g_object_unref(open_single_file->channel); } if(channel != NULL){ g_object_ref(channel); } open_single_file->channel = (GObject *) channel; } break; case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(open_single_file->soundcard == (GObject *) soundcard){ return; } if(open_single_file->soundcard != NULL){ g_object_unref(open_single_file->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } open_single_file->soundcard = (GObject *) soundcard; } break; case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(open_single_file->filename == filename){ return; } if(open_single_file->filename != NULL){ g_free(open_single_file->filename); } open_single_file->filename = g_strdup(filename); } break; case PROP_START_CHANNEL: { open_single_file->start_channel = g_value_get_uint(value); } break; case PROP_AUDIO_CHANNELS: { open_single_file->audio_channels = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_open_single_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsOpenSingleFile *open_single_file; open_single_file = AGS_OPEN_SINGLE_FILE(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, open_single_file->channel); } break; case PROP_SOUNDCARD: { g_value_set_object(value, open_single_file->soundcard); } break; case PROP_FILENAME: { g_value_set_string(value, open_single_file->filename); } break; case PROP_START_CHANNEL: { g_value_set_uint(value, open_single_file->start_channel); } break; case PROP_AUDIO_CHANNELS: { g_value_set_uint(value, open_single_file->audio_channels); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_open_single_file_connect(AgsConnectable *connectable) { ags_open_single_file_parent_connectable_interface->connect(connectable); /* empty */ } void ags_open_single_file_disconnect(AgsConnectable *connectable) { ags_open_single_file_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_open_single_file_dispose(GObject *gobject) { AgsOpenSingleFile *open_single_file; open_single_file = AGS_OPEN_SINGLE_FILE(gobject); if(open_single_file->channel != NULL){ g_object_unref(open_single_file->channel); open_single_file->channel = NULL; } if(open_single_file->soundcard != NULL){ g_object_unref(open_single_file->soundcard); open_single_file->soundcard = NULL; } if(open_single_file->filename != NULL){ g_free(open_single_file->filename); open_single_file->filename = NULL; } /* call parent */ G_OBJECT_CLASS(ags_open_single_file_parent_class)->dispose(gobject); } void ags_open_single_file_finalize(GObject *gobject) { AgsOpenSingleFile *open_single_file; open_single_file = AGS_OPEN_SINGLE_FILE(gobject); if(open_single_file->channel != NULL){ g_object_unref(open_single_file->channel); } if(open_single_file->soundcard != NULL){ g_object_unref(open_single_file->soundcard); } if(open_single_file->filename != NULL){ g_free(open_single_file->filename); } /* call parent */ G_OBJECT_CLASS(ags_open_single_file_parent_class)->finalize(gobject); } void ags_open_single_file_launch(AgsTask *task) { AgsOpenSingleFile *open_single_file; AgsChannel *channel; AgsChannel *link; AgsRecycling *first_recycling; AgsAudioFile *audio_file; AgsFileLink *file_link; AgsMutexManager *mutex_manager; GList *audio_signal; guint i; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); open_single_file = AGS_OPEN_SINGLE_FILE(task); channel = open_single_file->channel; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* open audio file and read audio signal */ audio_file = ags_audio_file_new(open_single_file->filename, open_single_file->soundcard, open_single_file->start_channel, open_single_file->audio_channels); if(!ags_audio_file_open(audio_file)){ g_message("unable to open file - %s", open_single_file->filename); return; } ags_audio_file_read_audio_signal(audio_file); /* iterate channels */ audio_signal = audio_file->audio_signal; for(i = 0; i < open_single_file->audio_channels && audio_signal != NULL; i++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* set link */ pthread_mutex_lock(channel_mutex); link = channel->link; pthread_mutex_unlock(channel_mutex); if(link != NULL){ error = NULL; ags_channel_set_link(channel, NULL, &error); if(error != NULL){ g_warning("%s", error->message); } } /* file link */ if(AGS_IS_INPUT(channel)){ pthread_mutex_lock(channel_mutex); file_link = AGS_INPUT(channel)->file_link; if(file_link == NULL){ file_link = g_object_new(AGS_TYPE_AUDIO_FILE_LINK, NULL); g_object_set(channel, "file-link", file_link, NULL); } g_object_set(file_link, "filename", open_single_file->filename, "preset", NULL, "instrument", NULL, "sample", NULL, "audio-channel", open_single_file->start_channel + i, NULL); pthread_mutex_unlock(channel_mutex); } /* add as template */ pthread_mutex_lock(channel_mutex); first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); AGS_AUDIO_SIGNAL(audio_signal->data)->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, AGS_AUDIO_SIGNAL(audio_signal->data)); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); audio_signal = audio_signal->next; } g_object_unref(audio_file); } AgsOpenSingleFile* ags_open_single_file_new(AgsChannel *channel, GObject *soundcard, gchar *filename, guint start_channel, guint audio_channels) { AgsOpenSingleFile *open_single_file; open_single_file = (AgsOpenSingleFile *) g_object_new(AGS_TYPE_OPEN_SINGLE_FILE, "channel", channel, "soundcard", soundcard, "filename", filename, "start-channel", start_channel, "audio-channels", audio_channels, NULL); return(open_single_file); } gsequencer-1.4.24/ags/audio/task/ags_add_audio.c0000644000175000017500000002143213247044247016421 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_add_audio_class_init(AgsAddAudioClass *add_audio); void ags_add_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_audio_init(AgsAddAudio *add_audio); void ags_add_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_add_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_add_audio_connect(AgsConnectable *connectable); void ags_add_audio_disconnect(AgsConnectable *connectable); void ags_add_audio_dispose(GObject *gobject); void ags_add_audio_finalize(GObject *gobject); void ags_add_audio_launch(AgsTask *task); enum{ PROP_0, PROP_SOUNDCARD, PROP_AUDIO, }; /** * SECTION:ags_add_audio * @short_description: add audio object to soundcard * @title: AgsAddAudio * @section_id: * @include: ags/audio/task/ags_add_audio.h * * The #AgsAddAudio task adds #AgsAudio to #AgsSoundcard. */ static gpointer ags_add_audio_parent_class = NULL; static AgsConnectableInterface *ags_add_audio_parent_connectable_interface; GType ags_add_audio_get_type() { static GType ags_type_add_audio = 0; if(!ags_type_add_audio){ static const GTypeInfo ags_add_audio_info = { sizeof (AgsAddAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_audio = g_type_register_static(AGS_TYPE_TASK, "AgsAddAudio", &ags_add_audio_info, 0); g_type_add_interface_static(ags_type_add_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_audio); } void ags_add_audio_class_init(AgsAddAudioClass *add_audio) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_add_audio_parent_class = g_type_class_peek_parent(add_audio); /* gobject */ gobject = (GObjectClass *) add_audio; gobject->set_property = ags_add_audio_set_property; gobject->get_property = ags_add_audio_get_property; gobject->dispose = ags_add_audio_dispose; gobject->finalize = ags_add_audio_finalize; /* properties */ /** * AgsAddAudio:soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of add audio"), i18n_pspec("The soundcard of add audio task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsAddAudio:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of add audio"), i18n_pspec("The audio of add audio task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /* task */ task = (AgsTaskClass *) add_audio; task->launch = ags_add_audio_launch; } void ags_add_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_audio_connect; connectable->disconnect = ags_add_audio_disconnect; } void ags_add_audio_init(AgsAddAudio *add_audio) { add_audio->soundcard = NULL; add_audio->audio = NULL; } void ags_add_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAddAudio *add_audio; add_audio = AGS_ADD_AUDIO(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(add_audio->soundcard == (GObject *) soundcard){ return; } if(add_audio->soundcard != NULL){ g_object_unref(add_audio->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } add_audio->soundcard = (GObject *) soundcard; } break; case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(add_audio->audio == (GObject *) audio){ return; } if(add_audio->audio != NULL){ g_object_unref(add_audio->audio); } if(audio != NULL){ g_object_ref(audio); } add_audio->audio = (GObject *) audio; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAddAudio *add_audio; add_audio = AGS_ADD_AUDIO(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, add_audio->soundcard); } break; case PROP_AUDIO: { g_value_set_object(value, add_audio->audio); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_audio_connect(AgsConnectable *connectable) { ags_add_audio_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_audio_disconnect(AgsConnectable *connectable) { ags_add_audio_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_audio_dispose(GObject *gobject) { AgsAddAudio *add_audio; add_audio = AGS_ADD_AUDIO(gobject); if(add_audio->soundcard != NULL){ g_object_unref(add_audio->soundcard); add_audio->soundcard = NULL; } if(add_audio->audio != NULL){ g_object_unref(add_audio->audio); add_audio->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_add_audio_parent_class)->dispose(gobject); } void ags_add_audio_finalize(GObject *gobject) { AgsAddAudio *add_audio; add_audio = AGS_ADD_AUDIO(gobject); if(add_audio->soundcard != NULL){ g_object_unref(add_audio->soundcard); } if(add_audio->audio != NULL){ g_object_unref(add_audio->audio); } /* call parent */ G_OBJECT_CLASS(ags_add_audio_parent_class)->finalize(gobject); } void ags_add_audio_launch(AgsTask *task) { AgsAddAudio *add_audio; AgsMutexManager *mutex_manager; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); add_audio = AGS_ADD_AUDIO(task); //TODO:JK: use AgsSoundcard /* add audio */ if(add_audio->soundcard != NULL){ /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) add_audio->soundcard); pthread_mutex_unlock(application_mutex); /* ref audio */ g_object_ref(G_OBJECT(add_audio->audio)); /* add to soundcard */ pthread_mutex_lock(soundcard_mutex); list = ags_soundcard_get_audio(AGS_SOUNDCARD(add_audio->soundcard)); list = g_list_prepend(list, add_audio->audio); ags_soundcard_set_audio(AGS_SOUNDCARD(add_audio->soundcard), list); pthread_mutex_unlock(soundcard_mutex); } /* AgsAudio */ ags_connectable_connect(AGS_CONNECTABLE(add_audio->audio)); } /** * ags_add_audio_new: * @soundcard: the #AgsSoundcard * @audio: the #AgsAudio to add * * Creates an #AgsAddAudio. * * Returns: an new #AgsAddAudio. * * Since: 1.0.0 */ AgsAddAudio* ags_add_audio_new(GObject *soundcard, AgsAudio *audio) { AgsAddAudio *add_audio; add_audio = (AgsAddAudio *) g_object_new(AGS_TYPE_ADD_AUDIO, "soundcard", soundcard, "audio", audio, NULL); return(add_audio); } gsequencer-1.4.24/ags/audio/task/ags_set_format.h0000644000175000017500000000353613247044247016665 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SET_FORMAT_H__ #define __AGS_SET_FORMAT_H__ #include #include #include #define AGS_TYPE_SET_FORMAT (ags_set_format_get_type()) #define AGS_SET_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SET_FORMAT, AgsSetFormat)) #define AGS_SET_FORMAT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SET_FORMAT, AgsSetFormatClass)) #define AGS_IS_SET_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SET_FORMAT)) #define AGS_IS_SET_FORMAT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SET_FORMAT)) #define AGS_SET_FORMAT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SET_FORMAT, AgsSetFormatClass)) typedef struct _AgsSetFormat AgsSetFormat; typedef struct _AgsSetFormatClass AgsSetFormatClass; struct _AgsSetFormat { AgsTask task; GObject *scope; guint format; }; struct _AgsSetFormatClass { AgsTaskClass task; }; GType ags_set_format_get_type(); AgsSetFormat* ags_set_format_new(GObject *scope, guint format); #endif /*__AGS_SET_FORMAT_H__*/ gsequencer-1.4.24/ags/audio/task/ags_add_recall_container.h0000644000175000017500000000430213247044247020626 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_RECALL_CONTAINER_H__ #define __AGS_ADD_RECALL_CONTAINER_H__ #include #include #include #include #define AGS_TYPE_ADD_RECALL_CONTAINER (ags_add_recall_container_get_type()) #define AGS_ADD_RECALL_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_RECALL_CONTAINER, AgsAddRecallContainer)) #define AGS_ADD_RECALL_CONTAINER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_RECALL_CONTAINER, AgsAddRecallContainerClass)) #define AGS_IS_ADD_RECALL_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_RECALL_CONTAINER)) #define AGS_IS_ADD_RECALL_CONTAINER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_RECALL_CONTAINER)) #define AGS_ADD_RECALL_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_RECALL_CONTAINER, AgsAddRecallContainerClass)) typedef struct _AgsAddRecallContainer AgsAddRecallContainer; typedef struct _AgsAddRecallContainerClass AgsAddRecallContainerClass; struct _AgsAddRecallContainer { AgsTask task; GObject *audio; AgsRecallContainer *recall_container; }; struct _AgsAddRecallContainerClass { AgsTaskClass task; }; GType ags_add_recall_container_get_type(); AgsAddRecallContainer* ags_add_recall_container_new(GObject *audio, AgsRecallContainer *recall_container); #endif /*__AGS_ADD_RECALL_CONTAINER_H__*/ gsequencer-1.4.24/ags/audio/task/ags_set_samplerate.h0000644000175000017500000000372113247044247017526 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SET_SAMPLERATE_H__ #define __AGS_SET_SAMPLERATE_H__ #include #include #include #define AGS_TYPE_SET_SAMPLERATE (ags_set_samplerate_get_type()) #define AGS_SET_SAMPLERATE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SET_SAMPLERATE, AgsSetSamplerate)) #define AGS_SET_SAMPLERATE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SET_SAMPLERATE, AgsSetSamplerateClass)) #define AGS_IS_SET_SAMPLERATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SET_SAMPLERATE)) #define AGS_IS_SET_SAMPLERATE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SET_SAMPLERATE)) #define AGS_SET_SAMPLERATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SET_SAMPLERATE, AgsSetSamplerateClass)) typedef struct _AgsSetSamplerate AgsSetSamplerate; typedef struct _AgsSetSamplerateClass AgsSetSamplerateClass; struct _AgsSetSamplerate { AgsTask task; GObject *scope; guint samplerate; }; struct _AgsSetSamplerateClass { AgsTaskClass task; }; GType ags_set_samplerate_get_type(); AgsSetSamplerate* ags_set_samplerate_new(GObject *scope, guint samplerate); #endif /*__AGS_SET_SAMPLERATE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_change_soundcard.h0000644000175000017500000000425713247044247020012 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CHANGE_SOUNDCARD_H__ #define __AGS_CHANGE_SOUNDCARD_H__ #include #include #include #include #define AGS_TYPE_CHANGE_SOUNDCARD (ags_change_soundcard_get_type()) #define AGS_CHANGE_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CHANGE_SOUNDCARD, AgsChangeSoundcard)) #define AGS_CHANGE_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CHANGE_SOUNDCARD, AgsChangeSoundcardClass)) #define AGS_IS_CHANGE_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CHANGE_SOUNDCARD)) #define AGS_IS_CHANGE_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CHANGE_SOUNDCARD)) #define AGS_CHANGE_SOUNDCARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CHANGE_SOUNDCARD, AgsChangeSoundcardClass)) typedef struct _AgsChangeSoundcard AgsChangeSoundcard; typedef struct _AgsChangeSoundcardClass AgsChangeSoundcardClass; struct _AgsChangeSoundcard { AgsTask task; AgsApplicationContext *application_context; GObject *new_soundcard; GObject *old_soundcard; }; struct _AgsChangeSoundcardClass { AgsTaskClass task; }; GType ags_change_soundcard_get_type(); AgsChangeSoundcard* ags_change_soundcard_new(AgsApplicationContext *application_context, GObject *new_soundcard, GObject *old_soundcard); #endif /*__AGS_CHANGE_SOUNDCARD_H__*/ gsequencer-1.4.24/ags/audio/task/ags_toggle_pattern_bit.c0000644000175000017500000003204113247044247020362 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_toggle_pattern_bit_class_init(AgsTogglePatternBitClass *toggle_pattern_bit); void ags_toggle_pattern_bit_connectable_interface_init(AgsConnectableInterface *connectable); void ags_toggle_pattern_bit_init(AgsTogglePatternBit *toggle_pattern_bit); void ags_toggle_pattern_bit_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_toggle_pattern_bit_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_toggle_pattern_bit_connect(AgsConnectable *connectable); void ags_toggle_pattern_bit_disconnect(AgsConnectable *connectable); void ags_toggle_pattern_bit_dispose(GObject *gobject); void ags_toggle_pattern_bit_finalize(GObject *gobject); void ags_toggle_pattern_bit_launch(AgsTask *task); /** * SECTION:ags_toggle_pattern_bit * @short_description: toggles the pattern * @title: AgsTogglePatternBit * @section_id: * @include: ags/audio/task/ags_toggle_pattern_bit.h * * The #AgsTogglePatternBit task toggles the specified #AgsPattern. */ enum{ PROP_0, PROP_CHANNEL, PROP_PATTERN, PROP_LINE, PROP_INDEX_I, PROP_INDEX_J, PROP_BIT, }; enum{ REFRESH_GUI, LAST_SIGNAL, }; static gpointer ags_toggle_pattern_bit_parent_class = NULL; static AgsConnectableInterface *ags_toggle_pattern_bit_parent_connectable_interface; static guint toggle_pattern_bit_signals[LAST_SIGNAL]; GType ags_toggle_pattern_bit_get_type() { static GType ags_type_toggle_pattern_bit = 0; if(!ags_type_toggle_pattern_bit){ static const GTypeInfo ags_toggle_pattern_bit_info = { sizeof (AgsTogglePatternBitClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_toggle_pattern_bit_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTogglePatternBit), 0, /* n_preallocs */ (GInstanceInitFunc) ags_toggle_pattern_bit_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_toggle_pattern_bit_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_toggle_pattern_bit = g_type_register_static(AGS_TYPE_TASK, "AgsTogglePatternBit", &ags_toggle_pattern_bit_info, 0); g_type_add_interface_static(ags_type_toggle_pattern_bit, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_toggle_pattern_bit); } void ags_toggle_pattern_bit_class_init(AgsTogglePatternBitClass *toggle_pattern_bit) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_toggle_pattern_bit_parent_class = g_type_class_peek_parent(toggle_pattern_bit); /* gobject */ gobject = (GObjectClass *) toggle_pattern_bit; gobject->set_property = ags_toggle_pattern_bit_set_property; gobject->get_property = ags_toggle_pattern_bit_get_property; gobject->dispose = ags_toggle_pattern_bit_dispose; gobject->finalize = ags_toggle_pattern_bit_finalize; /* properties */ /** * AgsTogglePatternBit:channel: * * The assigned #AgsChannel * * Since: 1.2.2 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel of toggle pattern bit"), i18n_pspec("The channel of toggle pattern bit task"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /** * AgsTogglePatternBit:pattern: * * The assigned #AgsPattern * * Since: 1.0.0 */ param_spec = g_param_spec_object("pattern", i18n_pspec("pattern of toggle pattern bit"), i18n_pspec("The pattern of toggle pattern bit task"), AGS_TYPE_PATTERN, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PATTERN, param_spec); /** * AgsTogglePatternBit:line: * * The line. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("line", i18n_pspec("line"), i18n_pspec("The line"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LINE, param_spec); /** * AgsTogglePatternBit:index-i: * * The index-i. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("index-i", i18n_pspec("index-i"), i18n_pspec("The index-i"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX_I, param_spec); /** * AgsTogglePatternBit:index-j: * * The index-j. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("index-j", i18n_pspec("index-j"), i18n_pspec("The index-j"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INDEX_J, param_spec); /** * AgsTogglePatternBit:bit: * * The bit. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("bit", i18n_pspec("bit"), i18n_pspec("The bit"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BIT, param_spec); /* signals */ toggle_pattern_bit_signals[REFRESH_GUI] = g_signal_new("refresh-gui", G_TYPE_FROM_CLASS (toggle_pattern_bit), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsTogglePatternBitClass, refresh_gui), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /* task */ task = (AgsTaskClass *) toggle_pattern_bit; task->launch = ags_toggle_pattern_bit_launch; /* toggle pattern bit */ toggle_pattern_bit->refresh_gui = NULL; } void ags_toggle_pattern_bit_connectable_interface_init(AgsConnectableInterface *connectable) { ags_toggle_pattern_bit_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_toggle_pattern_bit_connect; connectable->disconnect = ags_toggle_pattern_bit_disconnect; } void ags_toggle_pattern_bit_init(AgsTogglePatternBit *toggle_pattern_bit) { toggle_pattern_bit->channel = NULL; toggle_pattern_bit->pattern = NULL; toggle_pattern_bit->line = 0; toggle_pattern_bit->index_i = 0; toggle_pattern_bit->index_j = 0; toggle_pattern_bit->bit = 0; } void ags_toggle_pattern_bit_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsTogglePatternBit *toggle_pattern_bit; toggle_pattern_bit = AGS_TOGGLE_PATTERN_BIT(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(toggle_pattern_bit->channel == (GObject *) channel){ return; } if(toggle_pattern_bit->channel != NULL){ g_object_unref(toggle_pattern_bit->channel); } if(channel != NULL){ g_object_ref(channel); } toggle_pattern_bit->channel = (GObject *) channel; } break; case PROP_PATTERN: { AgsPattern *pattern; pattern = (AgsPattern *) g_value_get_object(value); if(toggle_pattern_bit->pattern == (GObject *) pattern){ return; } if(toggle_pattern_bit->pattern != NULL){ g_object_unref(toggle_pattern_bit->pattern); } if(pattern != NULL){ g_object_ref(pattern); } toggle_pattern_bit->pattern = (GObject *) pattern; } break; case PROP_LINE: { toggle_pattern_bit->line = g_value_get_uint(value); } break; case PROP_INDEX_I: { toggle_pattern_bit->index_i = g_value_get_uint(value); } break; case PROP_INDEX_J: { toggle_pattern_bit->index_j = g_value_get_uint(value); } break; case PROP_BIT: { toggle_pattern_bit->bit = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_toggle_pattern_bit_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsTogglePatternBit *toggle_pattern_bit; toggle_pattern_bit = AGS_TOGGLE_PATTERN_BIT(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, toggle_pattern_bit->channel); } break; case PROP_PATTERN: { g_value_set_object(value, toggle_pattern_bit->pattern); } break; case PROP_LINE: { g_value_set_uint(value, toggle_pattern_bit->line); } break; case PROP_INDEX_I: { g_value_set_uint(value, toggle_pattern_bit->index_i); } break; case PROP_INDEX_J: { g_value_set_uint(value, toggle_pattern_bit->index_j); } break; case PROP_BIT: { g_value_set_uint(value, toggle_pattern_bit->bit); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_toggle_pattern_bit_connect(AgsConnectable *connectable) { ags_toggle_pattern_bit_parent_connectable_interface->connect(connectable); /* empty */ } void ags_toggle_pattern_bit_disconnect(AgsConnectable *connectable) { ags_toggle_pattern_bit_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_toggle_pattern_bit_dispose(GObject *gobject) { AgsTogglePatternBit *toggle_pattern_bit; toggle_pattern_bit = AGS_TOGGLE_PATTERN_BIT(gobject); if(toggle_pattern_bit->channel != NULL){ g_object_unref(toggle_pattern_bit->channel); toggle_pattern_bit->channel = NULL; } if(toggle_pattern_bit->pattern != NULL){ g_object_unref(toggle_pattern_bit->pattern); toggle_pattern_bit->pattern = NULL; } /* call parent */ G_OBJECT_CLASS(ags_toggle_pattern_bit_parent_class)->dispose(gobject); } void ags_toggle_pattern_bit_finalize(GObject *gobject) { AgsTogglePatternBit *toggle_pattern_bit; toggle_pattern_bit = AGS_TOGGLE_PATTERN_BIT(gobject); if(toggle_pattern_bit->channel != NULL){ g_object_unref(toggle_pattern_bit->channel); } if(toggle_pattern_bit->pattern != NULL){ g_object_unref(toggle_pattern_bit->pattern); } /* call parent */ G_OBJECT_CLASS(ags_toggle_pattern_bit_parent_class)->finalize(gobject); } void ags_toggle_pattern_bit_launch(AgsTask *task) { AgsTogglePatternBit *toggle_pattern_bit; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); toggle_pattern_bit = AGS_TOGGLE_PATTERN_BIT(task); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) toggle_pattern_bit->channel); pthread_mutex_unlock(application_mutex); /* toggle */ pthread_mutex_lock(channel_mutex); #ifdef AGS_DEBUG g_message("toggle pattern"); #endif ags_pattern_toggle_bit((AgsPattern *) toggle_pattern_bit->pattern, toggle_pattern_bit->index_i, toggle_pattern_bit->index_j, toggle_pattern_bit->bit); pthread_mutex_unlock(channel_mutex); //TODO:JK: remove below // ags_toggle_pattern_bit_refresh_gui(toggle_pattern_bit); } void ags_toggle_pattern_bit_refresh_gui(AgsTogglePatternBit *toggle_pattern_bit) { g_return_if_fail(AGS_IS_TOGGLE_PATTERN_BIT(toggle_pattern_bit)); g_object_ref(G_OBJECT(toggle_pattern_bit)); g_signal_emit(G_OBJECT(toggle_pattern_bit), toggle_pattern_bit_signals[REFRESH_GUI], 0); g_object_unref(G_OBJECT(toggle_pattern_bit)); } /** * ags_toggle_pattern_bit_new: * @pattern: the #AgsPattern to toggle * @line: the affected line * @index_i: bank 0 * @index_j: bank 1 * @bit: the index within pattern * * WARNING you should provide the #AgsTogglePatternBit:channel property. * Creates an #AgsTogglePatternBit. * * Returns: an new #AgsTogglePatternBit. * * Since: 1.0.0 */ AgsTogglePatternBit* ags_toggle_pattern_bit_new(AgsPattern *pattern, guint line, guint index_i, guint index_j, guint bit) { AgsTogglePatternBit *toggle_pattern_bit; toggle_pattern_bit = (AgsTogglePatternBit *) g_object_new(AGS_TYPE_TOGGLE_PATTERN_BIT, "pattern", pattern, "line", line, "index-i", index_i, "index-j", index_j, "bit", bit, NULL); return(toggle_pattern_bit); } gsequencer-1.4.24/ags/audio/task/ags_link_channel.c0000644000175000017500000002414713247044247017143 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_link_channel_class_init(AgsLinkChannelClass *link_channel); void ags_link_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_link_channel_init(AgsLinkChannel *link_channel); void ags_link_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_link_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_link_channel_connect(AgsConnectable *connectable); void ags_link_channel_disconnect(AgsConnectable *connectable); void ags_link_channel_dispose(GObject *gobject); void ags_link_channel_finalize(GObject *gobject); void ags_link_channel_launch(AgsTask *task); /** * SECTION:ags_link_channel * @short_description: link channel task * @title: AgsLinkChannel * @section_id: * @include: ags/audio/task/ags_link_channel.h * * The #AgsLinkChannel task links #AgsChannel. */ static gpointer ags_link_channel_parent_class = NULL; static AgsConnectableInterface *ags_link_channel_parent_connectable_interface; enum{ PROP_0, PROP_CHANNEL, PROP_LINK, PROP_ERROR, }; GType ags_link_channel_get_type() { static GType ags_type_link_channel = 0; if(!ags_type_link_channel){ static const GTypeInfo ags_link_channel_info = { sizeof (AgsLinkChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_link_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsLinkChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_link_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_link_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_link_channel = g_type_register_static(AGS_TYPE_TASK, "AgsLinkChannel", &ags_link_channel_info, 0); g_type_add_interface_static(ags_type_link_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_link_channel); } void ags_link_channel_class_init(AgsLinkChannelClass *link_channel) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_link_channel_parent_class = g_type_class_peek_parent(link_channel); /* GObject */ gobject = (GObjectClass *) link_channel; gobject->set_property = ags_link_channel_set_property; gobject->get_property = ags_link_channel_get_property; gobject->dispose = ags_link_channel_dispose; gobject->finalize = ags_link_channel_finalize; /* properties */ /** * AgsLinkChannel:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel of link channel"), i18n_pspec("The channel of link channel task"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /** * AgsLinkChannel:link: * * The assigned #AgsChannel link * * Since: 1.0.0 */ param_spec = g_param_spec_object("link", i18n_pspec("link of link channel"), i18n_pspec("The link of link channel task"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LINK, param_spec); /** * AgsLinkChannel:error: * * The assigned #GError-struct * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("error", i18n_pspec("error of link channel"), i18n_pspec("The error of link channel task"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ERROR, param_spec); /* AgsTask */ task = (AgsTaskClass *) link_channel; task->launch = ags_link_channel_launch; } void ags_link_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_link_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_link_channel_connect; connectable->disconnect = ags_link_channel_disconnect; } void ags_link_channel_init(AgsLinkChannel *link_channel) { link_channel->channel = NULL; link_channel->link = NULL; link_channel->error = NULL; } void ags_link_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsLinkChannel *link_channel; link_channel = AGS_LINK_CHANNEL(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(link_channel->channel == (GObject *) channel){ return; } if(link_channel->channel != NULL){ g_object_unref(link_channel->channel); } if(channel != NULL){ g_object_ref(channel); } link_channel->channel = (GObject *) channel; } break; case PROP_LINK: { AgsChannel *link; link = (AgsChannel *) g_value_get_object(value); if(link_channel->link == (GObject *) link){ return; } if(link_channel->link != NULL){ g_object_unref(link_channel->link); } if(link != NULL){ g_object_ref(link); } link_channel->link = (GObject *) link; } break; case PROP_ERROR: { GError *error; error = g_value_get_pointer(value); link_channel->error = error; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_link_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsLinkChannel *link_channel; link_channel = AGS_LINK_CHANNEL(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, link_channel->channel); } break; case PROP_LINK: { g_value_set_object(value, link_channel->link); } break; case PROP_ERROR: { g_value_set_pointer(value, link_channel->error); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_link_channel_connect(AgsConnectable *connectable) { ags_link_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_link_channel_disconnect(AgsConnectable *connectable) { ags_link_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_link_channel_dispose(GObject *gobject) { AgsLinkChannel *link_channel; link_channel = AGS_LINK_CHANNEL(gobject); if(link_channel->channel != NULL){ g_object_unref(link_channel->channel); link_channel->channel = NULL; } if(link_channel->link != NULL){ g_object_unref(link_channel->link); link_channel->link = NULL; } /* call parent */ G_OBJECT_CLASS(ags_link_channel_parent_class)->dispose(gobject); } void ags_link_channel_finalize(GObject *gobject) { AgsLinkChannel *link_channel; link_channel = AGS_LINK_CHANNEL(gobject); if(link_channel->channel != NULL){ g_object_unref(link_channel->channel); } if(link_channel->link != NULL){ g_object_unref(link_channel->link); } /* call parent */ G_OBJECT_CLASS(ags_link_channel_parent_class)->finalize(gobject); } void ags_link_channel_launch(AgsTask *task) { AgsChannel *channel, *link; AgsLinkChannel *link_channel; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *link_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); link_channel = AGS_LINK_CHANNEL(task); channel = link_channel->channel; link = link_channel->link; if(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* unset file-link */ if(AGS_IS_INPUT(channel)){ pthread_mutex_lock(channel_mutex); g_object_set(channel, "file-link", NULL, NULL); pthread_mutex_unlock(channel_mutex); } } if(link != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); link_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) link); pthread_mutex_unlock(application_mutex); /* unset file-link */ if(AGS_IS_INPUT(link)){ pthread_mutex_lock(link_mutex); g_object_set(link, "file-link", NULL, NULL); pthread_mutex_unlock(link_mutex); } } /* link channel */ ags_channel_set_link(channel, link, &(link_channel->error)); if(link_channel->error != NULL){ g_message("%s", link_channel->error->message); } } /** * ags_link_channel_new: * @channel: the #AgsChannel * @link: the #AgsChannel to be linked, may be %NULL * * Creates an #AgsLinkChannel. * * Returns: an new #AgsLinkChannel. * * Since: 1.0.0 */ AgsLinkChannel* ags_link_channel_new(AgsChannel *channel, AgsChannel *link) { AgsLinkChannel *link_channel; link_channel = (AgsLinkChannel *) g_object_new(AGS_TYPE_LINK_CHANNEL, "channel", channel, "link", link, NULL); return(link_channel); } gsequencer-1.4.24/ags/audio/task/ags_append_audio.h0000644000175000017500000000407113247044247017145 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_APPEND_AUDIO_H__ #define __AGS_APPEND_AUDIO_H__ #include #include #include #define AGS_TYPE_APPEND_AUDIO (ags_append_audio_get_type()) #define AGS_APPEND_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPEND_AUDIO, AgsAppendAudio)) #define AGS_APPEND_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_APPEND_AUDIO, AgsAppendAudioClass)) #define AGS_IS_APPEND_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPEND_AUDIO)) #define AGS_IS_APPEND_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_APPEND_AUDIO)) #define AGS_APPEND_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_APPEND_AUDIO, AgsAppendAudioClass)) typedef struct _AgsAppendAudio AgsAppendAudio; typedef struct _AgsAppendAudioClass AgsAppendAudioClass; struct _AgsAppendAudio { AgsTask task; GObject *audio_loop; GObject *audio; gboolean do_playback; gboolean do_sequencer; gboolean do_notation; }; struct _AgsAppendAudioClass { AgsTaskClass task; }; GType ags_append_audio_get_type(); AgsAppendAudio* ags_append_audio_new(GObject *audio_loop, GObject *audio, gboolean do_playback, gboolean do_sequencer, gboolean do_notation); #endif /*__AGS_APPEND_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/task/ags_append_recall.h0000644000175000017500000000370613247044247017312 00000000000000/* 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 . */ #ifndef __AGS_APPEND_RECALL_H__ #define __AGS_APPEND_RECALL_H__ #include #include #include #define AGS_TYPE_APPEND_RECALL (ags_append_recall_get_type()) #define AGS_APPEND_RECALL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPEND_RECALL, AgsAppendRecall)) #define AGS_APPEND_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_APPEND_RECALL, AgsAppendRecallClass)) #define AGS_IS_APPEND_RECALL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPEND_RECALL)) #define AGS_IS_APPEND_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_APPEND_RECALL)) #define AGS_APPEND_RECALL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_APPEND_RECALL, AgsAppendRecallClass)) typedef struct _AgsAppendRecall AgsAppendRecall; typedef struct _AgsAppendRecallClass AgsAppendRecallClass; struct _AgsAppendRecall { AgsTask task; GObject *audio_loop; GObject *playback; }; struct _AgsAppendRecallClass { AgsTaskClass task; }; GType ags_append_recall_get_type(); AgsAppendRecall* ags_append_recall_new(GObject *audio_loop, GObject *playback); #endif /*__AGS_APPEND_RECALL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_set_audio_channels.h0000644000175000017500000000407413247044247020347 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SET_AUDIO_CHANNELS_H__ #define __AGS_SET_AUDIO_CHANNELS_H__ #include #include #include #define AGS_TYPE_SET_AUDIO_CHANNELS (ags_set_audio_channels_get_type()) #define AGS_SET_AUDIO_CHANNELS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SET_AUDIO_CHANNELS, AgsSetAudioChannels)) #define AGS_SET_AUDIO_CHANNELS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SET_AUDIO_CHANNELS, AgsSetAudioChannelsClass)) #define AGS_IS_SET_AUDIO_CHANNELS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SET_AUDIO_CHANNELS)) #define AGS_IS_SET_AUDIO_CHANNELS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SET_AUDIO_CHANNELS)) #define AGS_SET_AUDIO_CHANNELS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SET_AUDIO_CHANNELS, AgsSetAudioChannelsClass)) typedef struct _AgsSetAudioChannels AgsSetAudioChannels; typedef struct _AgsSetAudioChannelsClass AgsSetAudioChannelsClass; struct _AgsSetAudioChannels { AgsTask task; GObject *soundcard; guint audio_channels; }; struct _AgsSetAudioChannelsClass { AgsTaskClass task; }; GType ags_set_audio_channels_get_type(); AgsSetAudioChannels* ags_set_audio_channels_new(GObject *soundcard, guint audio_channels); #endif /*__AGS_SET_AUDIO_CHANNELS_H__*/ gsequencer-1.4.24/ags/audio/task/ags_add_audio.h0000644000175000017500000000356513247044247016435 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_AUDIO_H__ #define __AGS_ADD_AUDIO_H__ #include #include #include #include #define AGS_TYPE_ADD_AUDIO (ags_add_audio_get_type()) #define AGS_ADD_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_AUDIO, AgsAddAudio)) #define AGS_ADD_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_AUDIO, AgsAddAudioClass)) #define AGS_IS_ADD_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_AUDIO)) #define AGS_IS_ADD_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_AUDIO)) #define AGS_ADD_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_AUDIO, AgsAddAudioClass)) typedef struct _AgsAddAudio AgsAddAudio; typedef struct _AgsAddAudioClass AgsAddAudioClass; struct _AgsAddAudio { AgsTask task; GObject *soundcard; AgsAudio *audio; }; struct _AgsAddAudioClass { AgsTaskClass task; }; GType ags_add_audio_get_type(); AgsAddAudio* ags_add_audio_new(GObject *soundcard, AgsAudio *audio); #endif /*__AGS_ADD_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/task/ags_init_audio.h0000644000175000017500000000375613247044247016652 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_INIT_AUDIO_H__ #define __AGS_INIT_AUDIO_H__ #include #include #include #include #define AGS_TYPE_INIT_AUDIO (ags_init_audio_get_type()) #define AGS_INIT_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_INIT_AUDIO, AgsInitAudio)) #define AGS_INIT_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_INIT_AUDIO, AgsInitAudioClass)) #define AGS_IS_INIT_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_INIT_AUDIO)) #define AGS_IS_INIT_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_INIT_AUDIO)) #define AGS_INIT_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_INIT_AUDIO, AgsInitAudioClass)) typedef struct _AgsInitAudio AgsInitAudio; typedef struct _AgsInitAudioClass AgsInitAudioClass; struct _AgsInitAudio { AgsTask task; AgsAudio *audio; gboolean do_playback; gboolean do_sequencer; gboolean do_notation; }; struct _AgsInitAudioClass { AgsTaskClass task; }; GType ags_init_audio_get_type(); AgsInitAudio* ags_init_audio_new(AgsAudio *audio, gboolean do_playback, gboolean do_sequencer, gboolean do_notation); #endif /*__AGS_INIT_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/task/ags_append_audio.c0000644000175000017500000004767313247044247017157 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_append_audio_class_init(AgsAppendAudioClass *append_audio); void ags_append_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_append_audio_init(AgsAppendAudio *append_audio); void ags_append_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_append_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_append_audio_connect(AgsConnectable *connectable); void ags_append_audio_disconnect(AgsConnectable *connectable); void ags_append_audio_dispose(GObject *gobject); void ags_append_audio_finalize(GObject *gobject); void ags_append_audio_launch(AgsTask *task); /** * SECTION:ags_append_audio * @short_description: append audio object to audio loop * @title: AgsAppendAudio * @section_id: * @include: ags/audio/task/ags_append_audio.h * * The #AgsAppendAudio task appends #AgsAudio to #AgsAudioLoop. */ static gpointer ags_append_audio_parent_class = NULL; static AgsConnectableInterface *ags_append_audio_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO_LOOP, PROP_AUDIO, PROP_DO_PLAYBACK, PROP_DO_SEQUENCER, PROP_DO_NOTATION, }; GType ags_append_audio_get_type() { static GType ags_type_append_audio = 0; if(!ags_type_append_audio){ static const GTypeInfo ags_append_audio_info = { sizeof (AgsAppendAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_append_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAppendAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_append_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_append_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_append_audio = g_type_register_static(AGS_TYPE_TASK, "AgsAppendAudio", &ags_append_audio_info, 0); g_type_add_interface_static(ags_type_append_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_append_audio); } void ags_append_audio_class_init(AgsAppendAudioClass *append_audio) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_append_audio_parent_class = g_type_class_peek_parent(append_audio); /* gobject */ gobject = (GObjectClass *) append_audio; gobject->set_property = ags_append_audio_set_property; gobject->get_property = ags_append_audio_get_property; gobject->dispose = ags_append_audio_dispose; gobject->finalize = ags_append_audio_finalize; /* properties */ /** * AgsAppendAudio:audio-loop: * * The assigned #AgsAudioLoop * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-loop", i18n_pspec("audio loop of append audio"), i18n_pspec("The audio loop of append audio task"), AGS_TYPE_AUDIO_LOOP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_LOOP, param_spec); /** * AgsAppendAudio:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of append audio"), i18n_pspec("The audio of append audio task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsAppendAudio:do-playback: * * The effects do-playback. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-playback", i18n_pspec("do playback"), i18n_pspec("Do playback of audio"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_PLAYBACK, param_spec); /** * AgsAppendAudio:do-sequencer: * * The effects do-sequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-sequencer", i18n_pspec("do sequencer"), i18n_pspec("Do sequencer of audio"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_SEQUENCER, param_spec); /** * AgsAppendAudio:do-notation: * * The effects do-notation. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-notation", i18n_pspec("do notation"), i18n_pspec("Do notation of audio"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_NOTATION, param_spec); /* task */ task = (AgsTaskClass *) append_audio; task->launch = ags_append_audio_launch; } void ags_append_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_append_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_append_audio_connect; connectable->disconnect = ags_append_audio_disconnect; } void ags_append_audio_init(AgsAppendAudio *append_audio) { append_audio->audio_loop = NULL; append_audio->audio = NULL; append_audio->do_playback = FALSE; append_audio->do_sequencer = FALSE; append_audio->do_notation = FALSE; } void ags_append_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAppendAudio *append_audio; append_audio = AGS_APPEND_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO_LOOP: { AgsAudioLoop *audio_loop; audio_loop = (AgsAudioLoop *) g_value_get_object(value); if(append_audio->audio_loop == (GObject *) audio_loop){ return; } if(append_audio->audio_loop != NULL){ g_object_unref(append_audio->audio_loop); } if(audio_loop != NULL){ g_object_ref(audio_loop); } append_audio->audio_loop = (GObject *) audio_loop; } break; case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(append_audio->audio == (GObject *) audio){ return; } if(append_audio->audio != NULL){ g_object_unref(append_audio->audio); } if(audio != NULL){ g_object_ref(audio); } append_audio->audio = (GObject *) audio; } break; case PROP_DO_PLAYBACK: { gboolean do_playback; do_playback = g_value_get_boolean(value); append_audio->do_playback = do_playback; } break; case PROP_DO_SEQUENCER: { gboolean do_sequencer; do_sequencer = g_value_get_boolean(value); append_audio->do_sequencer = do_sequencer; } break; case PROP_DO_NOTATION: { gboolean do_notation; do_notation = g_value_get_boolean(value); append_audio->do_notation = do_notation; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_append_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAppendAudio *append_audio; append_audio = AGS_APPEND_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO_LOOP: { g_value_set_object(value, append_audio->audio_loop); } break; case PROP_AUDIO: { g_value_set_object(value, append_audio->audio); } break; case PROP_DO_PLAYBACK: { g_value_set_boolean(value, append_audio->do_playback); } break; case PROP_DO_SEQUENCER: { g_value_set_boolean(value, append_audio->do_sequencer); } break; case PROP_DO_NOTATION: { g_value_set_boolean(value, append_audio->do_notation); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_append_audio_connect(AgsConnectable *connectable) { ags_append_audio_parent_connectable_interface->connect(connectable); /* empty */ } void ags_append_audio_disconnect(AgsConnectable *connectable) { ags_append_audio_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_append_audio_dispose(GObject *gobject) { AgsAppendAudio *append_audio; append_audio = AGS_APPEND_AUDIO(gobject); if(append_audio->audio_loop != NULL){ g_object_unref(append_audio->audio_loop); append_audio->audio_loop = NULL; } if(append_audio->audio != NULL){ g_object_unref(append_audio->audio); append_audio->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_append_audio_parent_class)->dispose(gobject); } void ags_append_audio_finalize(GObject *gobject) { AgsAppendAudio *append_audio; append_audio = AGS_APPEND_AUDIO(gobject); if(append_audio->audio_loop != NULL){ g_object_unref(append_audio->audio_loop); } if(append_audio->audio != NULL){ g_object_unref(append_audio->audio); } /* call parent */ G_OBJECT_CLASS(ags_append_audio_parent_class)->finalize(gobject); } void ags_append_audio_launch(AgsTask *task) { AgsAudio *audio; AgsChannel *output; AgsPlaybackDomain *playback_domain; AgsPlayback *playback; AgsAppendAudio *append_audio; AgsAudioLoop *audio_loop; AgsAudioThread *audio_thread; AgsChannelThread *channel_thread; AgsServer *server; AgsMutexManager *mutex_manager; AgsConfig *config; GList *start_queue; gchar *str0, *str1; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *audio_loop_mutex; pthread_mutex_t *audio_thread_mutex; pthread_mutex_t *channel_thread_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); append_audio = AGS_APPEND_AUDIO(task); audio = AGS_AUDIO(append_audio->audio); audio_loop = AGS_AUDIO_LOOP(append_audio->audio_loop); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get audio loop mutex */ pthread_mutex_lock(application_mutex); audio_loop_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio_loop); pthread_mutex_unlock(application_mutex); /* append to AgsAudioLoop */ ags_audio_loop_add_audio(audio_loop, (GObject *) audio); /* read config */ str0 = ags_config_get_value(config, AGS_CONFIG_THREAD, "model"); str1 = ags_config_get_value(config, AGS_CONFIG_THREAD, "super-threaded-scope"); /* check config */ if(!g_ascii_strncasecmp(str0, "super-threaded", 15)){ if(!g_ascii_strncasecmp(str1, "audio", 6) || !g_ascii_strncasecmp(str1, "channel", 8)){ /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; playback_domain = AGS_PLAYBACK_DOMAIN(audio->playback_domain); audio_thread = playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER]; pthread_mutex_unlock(audio_mutex); /* parent mutex */ pthread_mutex_lock(application_mutex); audio_thread_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio_thread); pthread_mutex_unlock(application_mutex); /* super threaded setup - channel */ if(!g_ascii_strncasecmp(str1, "channel", 8)){ /* sequencer */ start_queue = NULL; while(output != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); if(append_audio->do_sequencer){ /* get some fields */ pthread_mutex_lock(channel_mutex); playback = AGS_PLAYBACK(output->playback); channel_thread = AGS_CHANNEL_THREAD(playback->channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER]); pthread_mutex_unlock(channel_mutex); /* start queue */ //FIXME:JK: check running g_atomic_int_or(&(channel_thread->flags), (AGS_CHANNEL_THREAD_WAIT | AGS_CHANNEL_THREAD_DONE | AGS_CHANNEL_THREAD_WAIT_SYNC | AGS_CHANNEL_THREAD_DONE_SYNC)); start_queue = g_list_prepend(start_queue, channel_thread); /* add if needed */ if(g_atomic_pointer_get(&(AGS_THREAD(channel_thread)->parent)) == NULL){ ags_thread_add_child_extended(audio_thread, channel_thread, TRUE, TRUE); ags_connectable_connect(AGS_CONNECTABLE(channel_thread)); } } /* iterate */ pthread_mutex_lock(channel_mutex); output = output->next; pthread_mutex_unlock(channel_mutex); } /* start queue */ start_queue = g_list_reverse(start_queue); pthread_mutex_lock(audio_thread_mutex); if(start_queue != NULL){ if(g_atomic_pointer_get(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]->start_queue)) != NULL){ g_atomic_pointer_set(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]->start_queue)))); }else{ g_atomic_pointer_set(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]->start_queue), start_queue); } } pthread_mutex_unlock(audio_thread_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; audio_thread = playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION]; pthread_mutex_unlock(audio_mutex); /* parent mutex */ pthread_mutex_lock(application_mutex); audio_thread_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio_thread); pthread_mutex_unlock(application_mutex); /* notation */ start_queue = NULL; while(output != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) output); pthread_mutex_unlock(application_mutex); if(append_audio->do_notation){ /* get some fields */ pthread_mutex_lock(channel_mutex); playback = AGS_PLAYBACK(output->playback); channel_thread = AGS_CHANNEL_THREAD(playback->channel_thread[AGS_PLAYBACK_SCOPE_NOTATION]); pthread_mutex_unlock(channel_mutex); /* start queue */ //FIXME:JK: check running g_atomic_int_or(&(channel_thread->flags), (AGS_CHANNEL_THREAD_WAIT | AGS_CHANNEL_THREAD_DONE | AGS_CHANNEL_THREAD_WAIT_SYNC | AGS_CHANNEL_THREAD_DONE_SYNC)); start_queue = g_list_prepend(start_queue, channel_thread); /* add if needed */ if(g_atomic_pointer_get(&(AGS_THREAD(channel_thread)->parent)) == NULL){ ags_thread_add_child_extended(audio_thread, channel_thread, TRUE, TRUE); ags_connectable_connect(AGS_CONNECTABLE(channel_thread)); } } /* iterate */ pthread_mutex_lock(channel_mutex); output = output->next; pthread_mutex_unlock(channel_mutex); } /* start queue */ start_queue = g_list_reverse(start_queue); pthread_mutex_lock(audio_thread_mutex); if(start_queue != NULL){ if(g_atomic_pointer_get(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[2]->start_queue)) != NULL){ g_atomic_pointer_set(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[2]->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[2]->start_queue)))); }else{ g_atomic_pointer_set(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[2]->start_queue), start_queue); } } pthread_mutex_unlock(audio_thread_mutex); } /* super threaded setup - audio */ start_queue = NULL; if(append_audio->do_sequencer){ /* get some fields */ pthread_mutex_lock(audio_mutex); audio_thread = playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER]; pthread_mutex_unlock(audio_mutex); /* start queue */ g_atomic_int_or(&(audio_thread->flags), (AGS_AUDIO_THREAD_WAIT | AGS_AUDIO_THREAD_DONE | AGS_AUDIO_THREAD_WAIT_SYNC | AGS_AUDIO_THREAD_DONE_SYNC)); start_queue = g_list_prepend(start_queue, audio_thread); /* add if needed */ if(g_atomic_pointer_get(&(AGS_THREAD(audio_thread)->parent)) == NULL){ ags_thread_add_child_extended((AgsThread *) audio_loop, audio_thread, TRUE, TRUE); ags_connectable_connect(AGS_CONNECTABLE(audio_thread)); } } if(append_audio->do_notation){ /* get some fields */ pthread_mutex_lock(audio_mutex); audio_thread = playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION]; pthread_mutex_unlock(audio_mutex); /* start queue */ g_atomic_int_or(&(audio_thread->flags), (AGS_AUDIO_THREAD_WAIT | AGS_AUDIO_THREAD_DONE | AGS_AUDIO_THREAD_WAIT_SYNC | AGS_AUDIO_THREAD_DONE_SYNC)); start_queue = g_list_prepend(start_queue, audio_thread); /* add if needed */ if(g_atomic_pointer_get(&(AGS_THREAD(audio_thread)->parent)) == NULL){ ags_thread_add_child_extended((AgsThread *) audio_loop, audio_thread, TRUE, TRUE); ags_connectable_connect(AGS_CONNECTABLE(audio_thread)); } } /* start queue */ start_queue = g_list_reverse(start_queue); pthread_mutex_lock(audio_loop_mutex); if(start_queue != NULL){ if(g_atomic_pointer_get(&(AGS_THREAD(audio_loop)->start_queue)) != NULL){ g_atomic_pointer_set(&(AGS_THREAD(audio_loop)->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(AGS_THREAD(audio_loop)->start_queue)))); }else{ g_atomic_pointer_set(&(AGS_THREAD(audio_loop)->start_queue), start_queue); } } pthread_mutex_unlock(audio_loop_mutex); } } g_free(str0); g_free(str1); /* add to server registry */ // server = ags_service_provider_get_server(AGS_SERVICE_PROVIDER(audio_loop->application_context)); // if(server != NULL && (AGS_SERVER_RUNNING & (server->flags)) != 0){ // ags_connectable_add_to_registry(AGS_CONNECTABLE(append_audio->audio)); // } } /** * ags_append_audio_new: * @audio_loop: the #AgsAudioLoop * @audio: the #AgsAudio to append * @do_playback: playback scope * @do_sequencer: sequencer scope * @do_notation: notation scope * * Creates an #AgsAppendAudio. * * Returns: an new #AgsAppendAudio. * * Since: 1.0.0 */ AgsAppendAudio* ags_append_audio_new(GObject *audio_loop, GObject *audio, gboolean do_playback, gboolean do_sequencer, gboolean do_notation) { AgsAppendAudio *append_audio; append_audio = (AgsAppendAudio *) g_object_new(AGS_TYPE_APPEND_AUDIO, "audio-loop", audio_loop, "audio", audio, "do-playback", do_playback, "do-sequencer", do_sequencer, "do-notation", do_notation, NULL); return(append_audio); } gsequencer-1.4.24/ags/audio/task/ags_append_channel.c0000644000175000017500000003027113247044247017450 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_append_channel_class_init(AgsAppendChannelClass *append_channel); void ags_append_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_append_channel_init(AgsAppendChannel *append_channel); void ags_append_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_append_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_append_channel_connect(AgsConnectable *connectable); void ags_append_channel_disconnect(AgsConnectable *connectable); void ags_append_channel_dispose(GObject *gobject); void ags_append_channel_finalize(GObject *gobject); void ags_append_channel_launch(AgsTask *task); /** * SECTION:ags_append_channel * @short_description: append channel object to audio loop * @title: AgsAppendChannel * @section_id: * @include: ags/audio/task/ags_append_channel.h * * The #AgsAppendChannel task appends #AgsChannel to #AgsAudioLoop. */ static gpointer ags_append_channel_parent_class = NULL; static AgsConnectableInterface *ags_append_channel_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO_LOOP, PROP_CHANNEL, }; GType ags_append_channel_get_type() { static GType ags_type_append_channel = 0; if(!ags_type_append_channel){ static const GTypeInfo ags_append_channel_info = { sizeof (AgsAppendChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_append_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAppendChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_append_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_append_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_append_channel = g_type_register_static(AGS_TYPE_TASK, "AgsAppendChannel", &ags_append_channel_info, 0); g_type_add_interface_static(ags_type_append_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_append_channel); } void ags_append_channel_class_init(AgsAppendChannelClass *append_channel) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_append_channel_parent_class = g_type_class_peek_parent(append_channel); /* GObjectClass */ gobject = (GObjectClass *) append_channel; gobject->set_property = ags_append_channel_set_property; gobject->get_property = ags_append_channel_get_property; gobject->dispose = ags_append_channel_dispose; gobject->finalize = ags_append_channel_finalize; /* properties */ /** * AgsAppendChannel:audio-loop: * * The assigned #AgsAudioLoop * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-loop", i18n_pspec("audio loop of append channel"), i18n_pspec("The audio loop of append channel task"), AGS_TYPE_AUDIO_LOOP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_LOOP, param_spec); /** * AgsAppendChannel:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel of append channel"), i18n_pspec("The channel of append channel task"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) append_channel; task->launch = ags_append_channel_launch; } void ags_append_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_append_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_append_channel_connect; connectable->disconnect = ags_append_channel_disconnect; } void ags_append_channel_init(AgsAppendChannel *append_channel) { append_channel->audio_loop = NULL; append_channel->channel = NULL; } void ags_append_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAppendChannel *append_channel; append_channel = AGS_APPEND_CHANNEL(gobject); switch(prop_id){ case PROP_AUDIO_LOOP: { AgsAudioLoop *audio_loop; audio_loop = (AgsAudioLoop *) g_value_get_object(value); if(append_channel->audio_loop == (GObject *) audio_loop){ return; } if(append_channel->audio_loop != NULL){ g_object_unref(append_channel->audio_loop); } if(audio_loop != NULL){ g_object_ref(audio_loop); } append_channel->audio_loop = (GObject *) audio_loop; } break; case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(append_channel->channel == (GObject *) channel){ return; } if(append_channel->channel != NULL){ g_object_unref(append_channel->channel); } if(channel != NULL){ g_object_ref(channel); } append_channel->channel = (GObject *) channel; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_append_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAppendChannel *append_channel; append_channel = AGS_APPEND_CHANNEL(gobject); switch(prop_id){ case PROP_AUDIO_LOOP: { g_value_set_object(value, append_channel->audio_loop); } break; case PROP_CHANNEL: { g_value_set_object(value, append_channel->channel); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_append_channel_connect(AgsConnectable *connectable) { ags_append_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_append_channel_disconnect(AgsConnectable *connectable) { ags_append_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_append_channel_dispose(GObject *gobject) { AgsAppendChannel *append_channel; append_channel = AGS_APPEND_CHANNEL(gobject); if(append_channel->audio_loop != NULL){ g_object_unref(append_channel->audio_loop); append_channel->audio_loop = NULL; } if(append_channel->channel != NULL){ g_object_unref(append_channel->channel); append_channel->channel = NULL; } /* call parent */ G_OBJECT_CLASS(ags_append_channel_parent_class)->dispose(gobject); } void ags_append_channel_finalize(GObject *gobject) { AgsAppendChannel *append_channel; append_channel = AGS_APPEND_CHANNEL(gobject); if(append_channel->audio_loop != NULL){ g_object_unref(append_channel->audio_loop); } if(append_channel->channel != NULL){ g_object_unref(append_channel->channel); } /* call parent */ G_OBJECT_CLASS(ags_append_channel_parent_class)->finalize(gobject); } void ags_append_channel_launch(AgsTask *task) { AgsChannel *channel; AgsPlayback *playback; AgsAppendChannel *append_channel; AgsAudioLoop *audio_loop; AgsChannelThread *channel_thread; AgsServer *server; AgsMutexManager *mutex_manager; AgsConfig *config; GList *start_queue; gchar *str0, *str1; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *audio_loop_mutex; pthread_mutex_t *channel_thread_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); config = ags_config_get_instance(); append_channel = AGS_APPEND_CHANNEL(task); channel = (AgsChannel *) append_channel->channel; audio_loop = AGS_AUDIO_LOOP(append_channel->audio_loop); /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get audio loop mutex */ pthread_mutex_lock(application_mutex); audio_loop_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio_loop); pthread_mutex_unlock(application_mutex); /* append to AgsDevout */ ags_audio_loop_add_channel(audio_loop, (GObject *) channel); /* read config */ str0 = ags_config_get_value(config, AGS_CONFIG_THREAD, "model"); str1 = ags_config_get_value(config, AGS_CONFIG_THREAD, "super-threaded-scope"); /* check config */ if(!g_ascii_strncasecmp(str0, "super-threaded", 15)){ /* super threaded setup */ if(!g_ascii_strncasecmp(str1, "channel", 8)){ start_queue = NULL; /* get some fields */ pthread_mutex_lock(channel_mutex); playback = AGS_PLAYBACK(channel->playback); channel_thread = AGS_CHANNEL_THREAD(playback->channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK]); pthread_mutex_unlock(channel_mutex); if((AGS_PLAYBACK_PLAYBACK & (g_atomic_int_get(&(playback->flags)))) != 0 && (AGS_THREAD_RUNNING & (g_atomic_int_get(&(AGS_THREAD(channel_thread)->flags)))) == 0){ /* start queue */ g_atomic_int_or(&(channel_thread->flags), (AGS_CHANNEL_THREAD_WAIT | AGS_CHANNEL_THREAD_DONE | AGS_CHANNEL_THREAD_WAIT_SYNC | AGS_CHANNEL_THREAD_DONE_SYNC)); start_queue = g_list_prepend(start_queue, channel_thread); /* add if needed */ if(g_atomic_pointer_get(&(AGS_THREAD(channel_thread)->parent)) == NULL){ ags_thread_add_child_extended((AgsThread *) audio_loop, channel_thread, TRUE, TRUE); ags_connectable_connect(AGS_CONNECTABLE(channel_thread)); } } /* start queue */ pthread_mutex_lock(audio_loop_mutex); if(start_queue != NULL){ start_queue = g_list_reverse(start_queue); if(g_atomic_pointer_get(&(AGS_THREAD(audio_loop)->start_queue)) != NULL){ g_atomic_pointer_set(&(AGS_THREAD(audio_loop)->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(AGS_THREAD(audio_loop)->start_queue)))); }else{ g_atomic_pointer_set(&(AGS_THREAD(audio_loop)->start_queue), start_queue); } } pthread_mutex_unlock(audio_loop_mutex); } } g_free(str0); g_free(str1); /* add to server registry */ // server = ags_service_provider_get_server(AGS_SERVICE_PROVIDER(audio_loop->application_context)); // if(server != NULL && (AGS_SERVER_RUNNING & (server->flags)) != 0){ // ags_connectable_add_to_registry(AGS_CONNECTABLE(append_channel->channel)); // } } /** * ags_append_channel_new: * @audio_loop: the #AgsAudioLoop * @channel: the #AgsChannel to append * * Creates an #AgsAppendChannel. * * Returns: an new #AgsAppendChannel. * * Since: 1.0.0 */ AgsAppendChannel* ags_append_channel_new(GObject *audio_loop, GObject *channel) { AgsAppendChannel *append_channel; append_channel = (AgsAppendChannel *) g_object_new(AGS_TYPE_APPEND_CHANNEL, "audio-loop", audio_loop, "channel", channel, NULL); return(append_channel); } gsequencer-1.4.24/ags/audio/task/ags_start_sequencer.c0000644000175000017500000002361313247044247017722 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include void ags_start_sequencer_class_init(AgsStartSequencerClass *start_sequencer); void ags_start_sequencer_connectable_interface_init(AgsConnectableInterface *connectable); void ags_start_sequencer_init(AgsStartSequencer *start_sequencer); void ags_start_sequencer_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_start_sequencer_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_start_sequencer_connect(AgsConnectable *connectable); void ags_start_sequencer_disconnect(AgsConnectable *connectable); void ags_start_sequencer_dispose(GObject *gobject); void ags_start_sequencer_finalize(GObject *gobject); void ags_start_sequencer_launch(AgsTask *task); /** * SECTION:ags_start_sequencer * @short_description: start sequencer object * @title: AgsStartSequencer * @section_id: * @include: ags/audio/task/ags_start_sequencer.h * * The #AgsStartSequencer task starts sequencer. */ static gpointer ags_start_sequencer_parent_class = NULL; static AgsConnectableInterface *ags_start_sequencer_parent_connectable_interface; enum{ PROP_0, PROP_APPLICATION_CONTEXT, }; GType ags_start_sequencer_get_type() { static GType ags_type_start_sequencer = 0; if(!ags_type_start_sequencer){ static const GTypeInfo ags_start_sequencer_info = { sizeof (AgsStartSequencerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_start_sequencer_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsStartSequencer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_start_sequencer_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_start_sequencer_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_start_sequencer = g_type_register_static(AGS_TYPE_TASK, "AgsStartSequencer", &ags_start_sequencer_info, 0); g_type_add_interface_static(ags_type_start_sequencer, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_start_sequencer); } void ags_start_sequencer_class_init(AgsStartSequencerClass *start_sequencer) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_start_sequencer_parent_class = g_type_class_peek_parent(start_sequencer); /* gobject */ gobject = (GObjectClass *) start_sequencer; gobject->set_property = ags_start_sequencer_set_property; gobject->get_property = ags_start_sequencer_get_property; gobject->dispose = ags_start_sequencer_dispose; gobject->finalize = ags_start_sequencer_finalize; /* properties */ /** * AgsStartSequencer:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context of start sequencer"), i18n_pspec("The application context of start sequencer task"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /* task */ task = (AgsTaskClass *) start_sequencer; task->launch = ags_start_sequencer_launch; } void ags_start_sequencer_connectable_interface_init(AgsConnectableInterface *connectable) { ags_start_sequencer_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_start_sequencer_connect; connectable->disconnect = ags_start_sequencer_disconnect; } void ags_start_sequencer_init(AgsStartSequencer *start_sequencer) { start_sequencer->application_context = NULL; } void ags_start_sequencer_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsStartSequencer *start_sequencer; start_sequencer = AGS_START_SEQUENCER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { GObject *application_context; application_context = (GObject *) g_value_get_object(value); if(start_sequencer->application_context == (GObject *) application_context){ return; } if(start_sequencer->application_context != NULL){ g_object_unref(start_sequencer->application_context); } if(application_context != NULL){ g_object_ref(application_context); } start_sequencer->application_context = (GObject *) application_context; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_start_sequencer_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsStartSequencer *start_sequencer; start_sequencer = AGS_START_SEQUENCER(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, start_sequencer->application_context); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_start_sequencer_connect(AgsConnectable *connectable) { ags_start_sequencer_parent_connectable_interface->connect(connectable); /* empty */ } void ags_start_sequencer_disconnect(AgsConnectable *connectable) { ags_start_sequencer_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_start_sequencer_dispose(GObject *gobject) { AgsStartSequencer *start_sequencer; start_sequencer = AGS_START_SEQUENCER(gobject); if(start_sequencer->application_context != NULL){ g_object_unref(start_sequencer->application_context); start_sequencer->application_context = NULL; } /* call parent */ G_OBJECT_CLASS(ags_start_sequencer_parent_class)->dispose(gobject); } void ags_start_sequencer_finalize(GObject *gobject) { AgsAudioLoop *audio_loop; AgsThread *sequencer_thread; AgsApplicationContext *application_context; AgsSequencer *sequencer; application_context = AGS_START_SEQUENCER(gobject)->application_context; if(application_context != NULL){ //FIXME:JK: wrong location of code audio_loop = AGS_AUDIO_LOOP(application_context->main_loop); sequencer_thread = ags_thread_find_type((AgsThread *) audio_loop, AGS_TYPE_SEQUENCER_THREAD); while((sequencer_thread = ags_thread_find_type(sequencer_thread, AGS_TYPE_SEQUENCER_THREAD)) != NULL){ if(AGS_SEQUENCER_THREAD(sequencer_thread)->error != NULL){ g_error_free(AGS_SEQUENCER_THREAD(sequencer_thread)->error); AGS_SEQUENCER_THREAD(sequencer_thread)->error = NULL; } sequencer_thread = g_atomic_pointer_get(&(sequencer_thread->next)); } g_object_unref(application_context); } /* call parent */ G_OBJECT_CLASS(ags_start_sequencer_parent_class)->finalize(gobject); } void ags_start_sequencer_launch(AgsTask *task) { AgsStartSequencer *start_sequencer; AgsMutexManager *mutex_manager; AgsThread *sequencer_thread; AgsThread *main_loop; AgsApplicationContext *application_context; GList *start_queue; pthread_mutex_t *application_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); start_sequencer = AGS_START_SEQUENCER(task); application_context = start_sequencer->application_context; /* get main loop and soundcard mutex */ pthread_mutex_lock(application_mutex); main_loop = application_context->main_loop; pthread_mutex_unlock(application_mutex); /* if(ags_sequencer_is_starting(sequencer) || ags_sequencer_is_playing(sequencer)){ return; } */ sequencer_thread = main_loop; while((sequencer_thread = ags_thread_find_type(sequencer_thread, AGS_TYPE_SEQUENCER_THREAD)) != NULL){ /* append to AgsSequencer */ AGS_SEQUENCER_THREAD(sequencer_thread)->error = NULL; g_message("start sequencer"); start_queue = NULL; start_queue = g_list_prepend(start_queue, sequencer_thread); if(start_queue != NULL){ if(g_atomic_pointer_get(&(AGS_THREAD(main_loop)->start_queue)) != NULL){ g_atomic_pointer_set(&(AGS_THREAD(main_loop)->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(AGS_THREAD(main_loop)->start_queue)))); }else{ g_atomic_pointer_set(&(AGS_THREAD(main_loop)->start_queue), start_queue); } } sequencer_thread = g_atomic_pointer_get(&(sequencer_thread->next)); } } /** * ags_start_sequencer_new: * @application_context: the #AgsApplicationContext * * Creates an #AgsStartSequencer. * * Returns: an new #AgsStartSequencer. * * Since: 1.0.0 */ AgsStartSequencer* ags_start_sequencer_new(AgsApplicationContext *application_context) { AgsStartSequencer *start_sequencer; start_sequencer = (AgsStartSequencer *) g_object_new(AGS_TYPE_START_SEQUENCER, "application-context", application_context, NULL); return(start_sequencer); } gsequencer-1.4.24/ags/audio/task/ags_open_sf2_sample.c0000644000175000017500000003616013247044247017570 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #ifdef AGS_WITH_LIBINSTPATCH #include #endif #include void ags_open_sf2_sample_class_init(AgsOpenSf2SampleClass *open_sf2_sample); void ags_open_sf2_sample_connectable_interface_init(AgsConnectableInterface *connectable); void ags_open_sf2_sample_init(AgsOpenSf2Sample *open_sf2_sample); void ags_open_sf2_sample_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_open_sf2_sample_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_open_sf2_sample_connect(AgsConnectable *connectable); void ags_open_sf2_sample_disconnect(AgsConnectable *connectable); void ags_open_sf2_sample_dispose(GObject *gobject); void ags_open_sf2_sample_finalize(GObject *gobject); void ags_open_sf2_sample_launch(AgsTask *task); /** * SECTION:ags_open_sf2_sample * @short_description: open SF2 sample object * @title: AgsOpenSf2Sample * @section_id: * @include: ags/audio/task/ags_open_sf2_sample.h * * The #AgsOpenSf2Sample task opens Soundfont2 samples. */ static gpointer ags_open_sf2_sample_parent_class = NULL; static AgsConnectableInterface *ags_open_sf2_sample_parent_connectable_interface; enum{ PROP_0, PROP_CHANNEL, PROP_FILENAME, PROP_PRESET, PROP_INSTRUMENT, PROP_SAMPLE, }; GType ags_open_sf2_sample_get_type() { static GType ags_type_open_sf2_sample = 0; if(!ags_type_open_sf2_sample){ static const GTypeInfo ags_open_sf2_sample_info = { sizeof (AgsOpenSf2SampleClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_open_sf2_sample_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsOpenSf2Sample), 0, /* n_preallocs */ (GInstanceInitFunc) ags_open_sf2_sample_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_open_sf2_sample_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_open_sf2_sample = g_type_register_static(AGS_TYPE_TASK, "AgsOpenSf2Sample", &ags_open_sf2_sample_info, 0); g_type_add_interface_static(ags_type_open_sf2_sample, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_open_sf2_sample); } void ags_open_sf2_sample_class_init(AgsOpenSf2SampleClass *open_sf2_sample) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_open_sf2_sample_parent_class = g_type_class_peek_parent(open_sf2_sample); /* GObject */ gobject = (GObjectClass *) open_sf2_sample; gobject->set_property = ags_open_sf2_sample_set_property; gobject->get_property = ags_open_sf2_sample_get_property; gobject->dispose = ags_open_sf2_sample_dispose; gobject->finalize = ags_open_sf2_sample_finalize; /* properties */ /** * AgsOpenSf2Sample:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel of open sf2 sample"), i18n_pspec("The channel of open sf2 sample task"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /** * AgsOpenSf2Sample:filename: * * The assigned filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the filename"), i18n_pspec("The filename containing the sf2 sample"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsOpenSf2Sample:preset: * * The assigned preset. * * Since: 1.0.0 */ param_spec = g_param_spec_string("preset", i18n_pspec("the preset"), i18n_pspec("The preset containing the sf2 sample"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PRESET, param_spec); /** * AgsOpenSf2Sample:instrument: * * The assigned instrument. * * Since: 1.0.0 */ param_spec = g_param_spec_string("instrument", i18n_pspec("the instrument"), i18n_pspec("The instrument containing the sf2 sample"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INSTRUMENT, param_spec); /** * AgsOpenSf2Sample:sample: * * The assigned sample. * * Since: 1.0.0 */ param_spec = g_param_spec_string("sample", i18n_pspec("the sample"), i18n_pspec("The sf2 sample"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLE, param_spec); /* AgsTask */ task = (AgsTaskClass *) open_sf2_sample; task->launch = ags_open_sf2_sample_launch; } void ags_open_sf2_sample_connectable_interface_init(AgsConnectableInterface *connectable) { ags_open_sf2_sample_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_open_sf2_sample_connect; connectable->disconnect = ags_open_sf2_sample_disconnect; } void ags_open_sf2_sample_init(AgsOpenSf2Sample *open_sf2_sample) { open_sf2_sample->channel = NULL; open_sf2_sample->filename = NULL; open_sf2_sample->preset = NULL; open_sf2_sample->instrument = NULL; open_sf2_sample->sample = NULL; } void ags_open_sf2_sample_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsOpenSf2Sample *open_sf2_sample; open_sf2_sample = AGS_OPEN_SF2_SAMPLE(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(open_sf2_sample->channel == (GObject *) channel){ return; } if(open_sf2_sample->channel != NULL){ g_object_unref(open_sf2_sample->channel); } if(channel != NULL){ g_object_ref(channel); } open_sf2_sample->channel = (GObject *) channel; } break; case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(open_sf2_sample->filename == filename){ return; } if(open_sf2_sample->filename != NULL){ g_free(open_sf2_sample->filename); } open_sf2_sample->filename = g_strdup(filename); } break; case PROP_PRESET: { gchar *preset; preset = g_value_get_string(value); if(open_sf2_sample->preset == preset){ return; } if(open_sf2_sample->preset != NULL){ g_free(open_sf2_sample->preset); } open_sf2_sample->preset = g_strdup(preset); } break; case PROP_INSTRUMENT: { gchar *instrument; instrument = g_value_get_string(value); if(open_sf2_sample->instrument == instrument){ return; } if(open_sf2_sample->instrument != NULL){ g_free(open_sf2_sample->instrument); } open_sf2_sample->instrument = g_strdup(instrument); } break; case PROP_SAMPLE: { gchar *sample; sample = g_value_get_string(value); if(open_sf2_sample->sample == sample){ return; } if(open_sf2_sample->sample != NULL){ g_free(open_sf2_sample->sample); } open_sf2_sample->sample = g_strdup(sample); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_open_sf2_sample_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsOpenSf2Sample *open_sf2_sample; open_sf2_sample = AGS_OPEN_SF2_SAMPLE(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, open_sf2_sample->channel); } break; case PROP_FILENAME: { g_value_set_string(value, open_sf2_sample->filename); } break; case PROP_PRESET: { g_value_set_string(value, open_sf2_sample->preset); } break; case PROP_INSTRUMENT: { g_value_set_string(value, open_sf2_sample->instrument); } break; case PROP_SAMPLE: { g_value_set_string(value, open_sf2_sample->sample); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_open_sf2_sample_connect(AgsConnectable *connectable) { ags_open_sf2_sample_parent_connectable_interface->connect(connectable); /* empty */ } void ags_open_sf2_sample_disconnect(AgsConnectable *connectable) { ags_open_sf2_sample_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_open_sf2_sample_dispose(GObject *gobject) { AgsOpenSf2Sample *open_sf2_sample; open_sf2_sample = AGS_OPEN_SF2_SAMPLE(gobject); if(open_sf2_sample->channel != NULL){ g_object_unref(open_sf2_sample->channel); } if(open_sf2_sample->filename != NULL){ g_free(open_sf2_sample->filename); open_sf2_sample->filename = NULL; } if(open_sf2_sample->preset != NULL){ g_free(open_sf2_sample->preset); open_sf2_sample->preset = NULL; } if(open_sf2_sample->instrument != NULL){ g_free(open_sf2_sample->instrument); open_sf2_sample->instrument = NULL; } if(open_sf2_sample->sample != NULL){ g_free(open_sf2_sample->sample); open_sf2_sample->sample = NULL; } /* call parent */ G_OBJECT_CLASS(ags_open_sf2_sample_parent_class)->dispose(gobject); } void ags_open_sf2_sample_finalize(GObject *gobject) { AgsOpenSf2Sample *open_sf2_sample; open_sf2_sample = AGS_OPEN_SF2_SAMPLE(gobject); if(open_sf2_sample->channel != NULL){ g_object_unref(open_sf2_sample->channel); } g_free(open_sf2_sample->filename); g_free(open_sf2_sample->preset); g_free(open_sf2_sample->instrument); g_free(open_sf2_sample->sample); /* call parent */ G_OBJECT_CLASS(ags_open_sf2_sample_parent_class)->finalize(gobject); } void ags_open_sf2_sample_launch(AgsTask *task) { AgsChannel *channel; AgsChannel *link; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsPlayable *playable; #ifdef AGS_WITH_LIBINSTPATCH AgsIpatch *ipatch; #endif AgsOpenSf2Sample *open_sf2_sample; AgsFileLink *file_link; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; guint audio_channel; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); open_sf2_sample = AGS_OPEN_SF2_SAMPLE(task); #ifdef AGS_WITH_LIBINSTPATCH #ifdef AGS_DEBUG g_message("Open Soundfont2 [%s] - %s %s %s", open_sf2_sample->filename, open_sf2_sample->preset, open_sf2_sample->instrument, open_sf2_sample->sample); #endif channel = open_sf2_sample->channel; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* file link */ if(AGS_IS_INPUT(channel)){ pthread_mutex_lock(channel_mutex); file_link = AGS_INPUT(channel)->file_link; if(file_link == NULL){ file_link = (GObject *) ags_audio_file_link_new(); g_object_set(channel, "file-link", file_link, NULL); } g_object_set(file_link, "filename", open_sf2_sample->filename, "preset", open_sf2_sample->preset, "instrument", open_sf2_sample->instrument, "sample", open_sf2_sample->sample, "audio-channel", channel->audio_channel, NULL); pthread_mutex_unlock(channel_mutex); } ipatch = g_object_new(AGS_TYPE_IPATCH, "soundcard", channel->soundcard, "mode", AGS_IPATCH_READ, "filename", open_sf2_sample->filename, NULL); playable = AGS_PLAYABLE(ipatch); error = NULL; ags_playable_level_select(playable, 0, open_sf2_sample->filename, &error); /* select first - preset */ ipatch->nth_level = 1; error = NULL; ags_playable_level_select(playable, 1, open_sf2_sample->preset, &error); if(error != NULL){ return; } /* select second - instrument */ ipatch->nth_level = 2; error = NULL; ags_playable_level_select(playable, 2, open_sf2_sample->instrument, &error); if(error != NULL){ return; } /* select third - sample */ ipatch->nth_level = 3; error = NULL; ags_playable_level_select(playable, 3, open_sf2_sample->sample, &error); if(error != NULL){ return; } /* set link */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; link = channel->link; audio_channel = channel->audio_channel; pthread_mutex_unlock(channel_mutex); if(link != NULL){ error = NULL; ags_channel_set_link(channel, NULL, &error); if(error != NULL){ g_warning("%s", error->message); } } /* read audio signal */ list = ags_playable_read_audio_signal(playable, soundcard, audio_channel, 1); audio_signal = list->data; /* replace template audio signal */ pthread_mutex_lock(channel_mutex); first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, audio_signal); g_static_rec_mutex_unlock_full(((IpatchItem *) (ipatch->base))->mutex); #endif } /** * ags_open_sf2_sample_new: * @channel: the #AgsChannel * @filename: the Soundfont2 file * @preset: the preset * @instrument: the instrument * @sample: the sample * * Creates an #AgsOpenSf2Sample. * * Returns: an new #AgsOpenSf2Sample. * * Since: 1.0.0 */ AgsOpenSf2Sample* ags_open_sf2_sample_new(AgsChannel *channel, gchar *filename, gchar *preset, gchar *instrument, gchar *sample) { AgsOpenSf2Sample *open_sf2_sample; open_sf2_sample = (AgsOpenSf2Sample *) g_object_new(AGS_TYPE_OPEN_SF2_SAMPLE, "channel", channel, "filename", filename, "preset", preset, "instrument", instrument, "sample", sample, NULL); return(open_sf2_sample); } gsequencer-1.4.24/ags/audio/task/ags_clear_buffer.c0000644000175000017500000004636213256223112017126 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include void ags_clear_buffer_class_init(AgsClearBufferClass *clear_buffer); void ags_clear_buffer_connectable_interface_init(AgsConnectableInterface *connectable); void ags_clear_buffer_init(AgsClearBuffer *clear_buffer); void ags_clear_buffer_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_clear_buffer_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_clear_buffer_connect(AgsConnectable *connectable); void ags_clear_buffer_disconnect(AgsConnectable *connectable); void ags_clear_buffer_dispose(GObject *gobject); void ags_clear_buffer_finalize(GObject *gobject); void ags_clear_buffer_launch(AgsTask *task); /** * SECTION:ags_clear_buffer * @short_description: switch buffer flag of device * @title: AgsClearBuffer * @section_id: * @include: ags/audio/task/ags_clear_buffer.h * * The #AgsClearBuffer task switches the buffer flag of device. */ static gpointer ags_clear_buffer_parent_class = NULL; static AgsConnectableInterface *ags_clear_buffer_parent_connectable_interface; enum{ PROP_0, PROP_DEVICE, }; GType ags_clear_buffer_get_type() { static GType ags_type_clear_buffer = 0; if(!ags_type_clear_buffer){ static const GTypeInfo ags_clear_buffer_info = { sizeof (AgsClearBufferClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_clear_buffer_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsClearBuffer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_clear_buffer_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_clear_buffer_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_clear_buffer = g_type_register_static(AGS_TYPE_TASK, "AgsClearBuffer", &ags_clear_buffer_info, 0); g_type_add_interface_static(ags_type_clear_buffer, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_clear_buffer); } void ags_clear_buffer_class_init(AgsClearBufferClass *clear_buffer) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_clear_buffer_parent_class = g_type_class_peek_parent(clear_buffer); /* gobject */ gobject = (GObjectClass *) clear_buffer; gobject->set_property = ags_clear_buffer_set_property; gobject->get_property = ags_clear_buffer_get_property; gobject->dispose = ags_clear_buffer_dispose; gobject->finalize = ags_clear_buffer_finalize; /* properties */ /** * AgsClearBuffer:device: * * The assigned #AgsSoundcard or #AgsSequencer * * Since: 1.0.0 */ param_spec = g_param_spec_object("device", i18n_pspec("device of change device"), i18n_pspec("The device of change device task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); /* task */ task = (AgsTaskClass *) clear_buffer; task->launch = ags_clear_buffer_launch; } void ags_clear_buffer_connectable_interface_init(AgsConnectableInterface *connectable) { ags_clear_buffer_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_clear_buffer_connect; connectable->disconnect = ags_clear_buffer_disconnect; } void ags_clear_buffer_init(AgsClearBuffer *clear_buffer) { clear_buffer->device = NULL; } void ags_clear_buffer_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsClearBuffer *clear_buffer; clear_buffer = AGS_CLEAR_BUFFER(gobject); switch(prop_id){ case PROP_DEVICE: { GObject *device; device = (GObject *) g_value_get_object(value); if(clear_buffer->device == (GObject *) device){ return; } if(clear_buffer->device != NULL){ g_object_unref(clear_buffer->device); } if(device != NULL){ g_object_ref(device); } clear_buffer->device = (GObject *) device; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_clear_buffer_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsClearBuffer *clear_buffer; clear_buffer = AGS_CLEAR_BUFFER(gobject); switch(prop_id){ case PROP_DEVICE: { g_value_set_object(value, clear_buffer->device); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_clear_buffer_connect(AgsConnectable *connectable) { ags_clear_buffer_parent_connectable_interface->connect(connectable); /* empty */ } void ags_clear_buffer_disconnect(AgsConnectable *connectable) { ags_clear_buffer_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_clear_buffer_dispose(GObject *gobject) { AgsClearBuffer *clear_buffer; clear_buffer = AGS_CLEAR_BUFFER(gobject); if(clear_buffer->device != NULL){ g_object_unref(clear_buffer->device); clear_buffer->device = NULL; } /* call parent */ G_OBJECT_CLASS(ags_clear_buffer_parent_class)->dispose(gobject); } void ags_clear_buffer_finalize(GObject *gobject) { AgsClearBuffer *clear_buffer; clear_buffer = AGS_CLEAR_BUFFER(gobject); if(clear_buffer->device != NULL){ g_object_unref(clear_buffer->device); } /* call parent */ G_OBJECT_CLASS(ags_clear_buffer_parent_class)->finalize(gobject); } void ags_clear_buffer_launch(AgsTask *task) { AgsClearBuffer *clear_buffer; AgsMutexManager *mutex_manager; guint buffer_size; guint pcm_channels; guint nth_buffer; guint word_size; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); clear_buffer = AGS_CLEAR_BUFFER(task); /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) clear_buffer->device); pthread_mutex_unlock(application_mutex); if(AGS_IS_DEVOUT(clear_buffer->device)){ AgsDevout *devout; devout = clear_buffer->device; /* retrieve presets */ pthread_mutex_lock(soundcard_mutex); buffer_size = devout->buffer_size; pcm_channels = devout->pcm_channels; switch(devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_clear_buffer_launch(): unsupported word size"); pthread_mutex_unlock(soundcard_mutex); return; } if((AGS_DEVOUT_BUFFER0 & (devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_DEVOUT_BUFFER1 & (devout->flags)) != 0){ nth_buffer = 1; }else if((AGS_DEVOUT_BUFFER2 & (devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_DEVOUT_BUFFER3 & (devout->flags)) != 0){ nth_buffer = 3; } pthread_mutex_unlock(soundcard_mutex); memset(devout->buffer[nth_buffer], 0, (size_t) pcm_channels * buffer_size * word_size); }else if(AGS_IS_DEVIN(clear_buffer->device)){ AgsDevin *devin; devin = clear_buffer->device; /* retrieve word size */ pthread_mutex_lock(soundcard_mutex); buffer_size = devin->buffer_size; pcm_channels = devin->pcm_channels; switch(devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_clear_buffer_launch(): unsupported word size"); pthread_mutex_unlock(soundcard_mutex); return; } if((AGS_DEVIN_BUFFER0 & (devin->flags)) != 0){ nth_buffer = 0; }else if((AGS_DEVIN_BUFFER1 & (devin->flags)) != 0){ nth_buffer = 1; }else if((AGS_DEVIN_BUFFER2 & (devin->flags)) != 0){ nth_buffer = 2; }else if((AGS_DEVIN_BUFFER3 & (devin->flags)) != 0){ nth_buffer = 3; } pthread_mutex_unlock(soundcard_mutex); memset(devin->buffer[nth_buffer], 0, (size_t) pcm_channels * buffer_size * word_size); }else if(AGS_IS_JACK_DEVOUT(clear_buffer->device)){ AgsJackDevout *jack_devout; jack_devout = clear_buffer->device; pthread_mutex_lock(soundcard_mutex); buffer_size = jack_devout->buffer_size; pcm_channels = jack_devout->pcm_channels; switch(jack_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_clear_buffer_launch(): unsupported word size"); pthread_mutex_unlock(soundcard_mutex); return; } if((AGS_JACK_DEVOUT_BUFFER0 & (jack_devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_JACK_DEVOUT_BUFFER1 & (jack_devout->flags)) != 0){ nth_buffer = 3; }else if((AGS_JACK_DEVOUT_BUFFER2 & (jack_devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_JACK_DEVOUT_BUFFER3 & (jack_devout->flags)) != 0){ nth_buffer = 1; } pthread_mutex_unlock(soundcard_mutex); memset(jack_devout->buffer[nth_buffer], 0, (size_t) pcm_channels * buffer_size * word_size); }else if(AGS_IS_JACK_DEVIN(clear_buffer->device)){ AgsJackDevin *jack_devin; jack_devin = clear_buffer->device; pthread_mutex_lock(soundcard_mutex); buffer_size = jack_devin->buffer_size; pcm_channels = jack_devin->pcm_channels; switch(jack_devin->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_clear_buffer_launch(): unsupported word size"); pthread_mutex_unlock(soundcard_mutex); return; } if((AGS_JACK_DEVIN_BUFFER0 & (jack_devin->flags)) != 0){ nth_buffer = 2; }else if((AGS_JACK_DEVIN_BUFFER1 & (jack_devin->flags)) != 0){ nth_buffer = 3; }else if((AGS_JACK_DEVIN_BUFFER2 & (jack_devin->flags)) != 0){ nth_buffer = 0; }else if((AGS_JACK_DEVIN_BUFFER3 & (jack_devin->flags)) != 0){ nth_buffer = 1; } pthread_mutex_unlock(soundcard_mutex); memset(jack_devin->buffer[nth_buffer], 0, (size_t) pcm_channels * buffer_size * word_size); }else if(AGS_IS_PULSE_DEVOUT(clear_buffer->device)){ AgsPulseDevout *pulse_devout; pulse_devout = clear_buffer->device; pthread_mutex_lock(soundcard_mutex); buffer_size = pulse_devout->buffer_size; pcm_channels = pulse_devout->pcm_channels; switch(pulse_devout->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: g_warning("ags_clear_buffer_launch(): unsupported word size"); pthread_mutex_unlock(soundcard_mutex); return; } if((AGS_PULSE_DEVOUT_BUFFER0 & (pulse_devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_PULSE_DEVOUT_BUFFER1 & (pulse_devout->flags)) != 0){ nth_buffer = 3; }else if((AGS_PULSE_DEVOUT_BUFFER2 & (pulse_devout->flags)) != 0){ nth_buffer = 4; }else if((AGS_PULSE_DEVOUT_BUFFER3 & (pulse_devout->flags)) != 0){ nth_buffer = 5; }else if((AGS_PULSE_DEVOUT_BUFFER4 & (pulse_devout->flags)) != 0){ nth_buffer = 6; }else if((AGS_PULSE_DEVOUT_BUFFER5 & (pulse_devout->flags)) != 0){ nth_buffer = 7; }else if((AGS_PULSE_DEVOUT_BUFFER6 & (pulse_devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_PULSE_DEVOUT_BUFFER7 & (pulse_devout->flags)) != 0){ nth_buffer = 1; } pthread_mutex_unlock(soundcard_mutex); memset(pulse_devout->buffer[nth_buffer], 0, (size_t) pcm_channels * buffer_size * word_size); }else if(AGS_IS_PULSE_DEVIN(clear_buffer->device)){ AgsPulseDevin *pulse_devin; pulse_devin = clear_buffer->device; pthread_mutex_lock(soundcard_mutex); buffer_size = pulse_devin->buffer_size; pcm_channels = pulse_devin->pcm_channels; switch(pulse_devin->format){ case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; default: g_warning("ags_clear_buffer_launch(): unsupported word size"); pthread_mutex_unlock(soundcard_mutex); return; } if((AGS_PULSE_DEVIN_BUFFER0 & (pulse_devin->flags)) != 0){ nth_buffer = 2; }else if((AGS_PULSE_DEVIN_BUFFER1 & (pulse_devin->flags)) != 0){ nth_buffer = 3; }else if((AGS_PULSE_DEVIN_BUFFER2 & (pulse_devin->flags)) != 0){ nth_buffer = 4; }else if((AGS_PULSE_DEVIN_BUFFER3 & (pulse_devin->flags)) != 0){ nth_buffer = 5; }else if((AGS_PULSE_DEVIN_BUFFER4 & (pulse_devin->flags)) != 0){ nth_buffer = 6; }else if((AGS_PULSE_DEVIN_BUFFER5 & (pulse_devin->flags)) != 0){ nth_buffer = 7; }else if((AGS_PULSE_DEVIN_BUFFER6 & (pulse_devin->flags)) != 0){ nth_buffer = 0; }else if((AGS_PULSE_DEVIN_BUFFER7 & (pulse_devin->flags)) != 0){ nth_buffer = 1; } pthread_mutex_unlock(soundcard_mutex); memset(pulse_devin->buffer[nth_buffer], 0, (size_t) pcm_channels * buffer_size * word_size); }else if(AGS_IS_CORE_AUDIO_DEVOUT(clear_buffer->device)){ AgsCoreAudioDevout *core_audio_devout; core_audio_devout = clear_buffer->device; pthread_mutex_lock(soundcard_mutex); buffer_size = core_audio_devout->buffer_size; pcm_channels = core_audio_devout->pcm_channels; switch(core_audio_devout->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_clear_buffer_launch(): unsupported word size"); pthread_mutex_unlock(soundcard_mutex); return; } if((AGS_CORE_AUDIO_DEVOUT_BUFFER0 & (core_audio_devout->flags)) != 0){ nth_buffer = 2; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER1 & (core_audio_devout->flags)) != 0){ nth_buffer = 3; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER2 & (core_audio_devout->flags)) != 0){ nth_buffer = 4; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER3 & (core_audio_devout->flags)) != 0){ nth_buffer = 5; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER4 & (core_audio_devout->flags)) != 0){ nth_buffer = 6; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER5 & (core_audio_devout->flags)) != 0){ nth_buffer = 7; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER6 & (core_audio_devout->flags)) != 0){ nth_buffer = 0; }else if((AGS_CORE_AUDIO_DEVOUT_BUFFER7 & (core_audio_devout->flags)) != 0){ nth_buffer = 1; } pthread_mutex_unlock(soundcard_mutex); memset(core_audio_devout->buffer[nth_buffer], 0, (size_t) pcm_channels * buffer_size * word_size); }else if(AGS_IS_MIDIIN(clear_buffer->device)){ //TODO:JK: implement me }else if(AGS_IS_JACK_MIDIIN(clear_buffer->device)){ //TODO:JK: implement me }else if(AGS_IS_CORE_AUDIO_MIDIIN(clear_buffer->device)){ //TODO:JK: implement me } } /** * ags_clear_buffer_new: * @device: the #AgsSoundcard or #AgsSequencer * * Creates an #AgsClearBuffer. * * Returns: an new #AgsClearBuffer. * * Since: 1.0.0 */ AgsClearBuffer* ags_clear_buffer_new(GObject *device) { AgsClearBuffer *clear_buffer; clear_buffer = (AgsClearBuffer *) g_object_new(AGS_TYPE_CLEAR_BUFFER, "device", device, NULL); return(clear_buffer); } gsequencer-1.4.24/ags/audio/task/ags_tic_device.h0000644000175000017500000000347213247044247016617 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_TIC_DEVICE_H__ #define __AGS_TIC_DEVICE_H__ #include #include #include #define AGS_TYPE_TIC_DEVICE (ags_tic_device_get_type()) #define AGS_TIC_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_TIC_DEVICE, AgsTicDevice)) #define AGS_TIC_DEVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_TIC_DEVICE, AgsTicDeviceClass)) #define AGS_IS_TIC_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_TIC_DEVICE)) #define AGS_IS_TIC_DEVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_TIC_DEVICE)) #define AGS_TIC_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_TIC_DEVICE, AgsTicDeviceClass)) typedef struct _AgsTicDevice AgsTicDevice; typedef struct _AgsTicDeviceClass AgsTicDeviceClass; struct _AgsTicDevice { AgsTask task; GObject *device; }; struct _AgsTicDeviceClass { AgsTaskClass task; }; GType ags_tic_device_get_type(); AgsTicDevice* ags_tic_device_new(GObject *device); #endif /*__AGS_TIC_DEVICE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_remove_recall_container.c0000644000175000017500000002370013247044247021371 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include void ags_remove_recall_container_class_init(AgsRemoveRecallContainerClass *remove_recall_container); void ags_remove_recall_container_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_recall_container_init(AgsRemoveRecallContainer *remove_recall_container); void ags_remove_recall_container_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_remove_recall_container_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_remove_recall_container_connect(AgsConnectable *connectable); void ags_remove_recall_container_disconnect(AgsConnectable *connectable); void ags_remove_recall_container_dispose(GObject *gobject); void ags_remove_recall_container_finalize(GObject *gobject); void ags_remove_recall_container_launch(AgsTask *task); /** * SECTION:ags_remove_recall_container * @short_description: remove recall object to context * @title: AgsRemoveRecallContainer * @section_id: * @include: ags/audio/task/ags_remove_recall_container.h * * The #AgsRemoveRecallContainer task removes #AgsRecallContainer of audio. */ static gpointer ags_remove_recall_container_parent_class = NULL; static AgsConnectableInterface *ags_remove_recall_container_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_RECALL_CONTAINER, }; GType ags_remove_recall_container_get_type() { static GType ags_type_remove_recall_container = 0; if(!ags_type_remove_recall_container){ static const GTypeInfo ags_remove_recall_container_info = { sizeof (AgsRemoveRecallContainerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_recall_container_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoveRecallContainer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_recall_container_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_recall_container_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_recall_container = g_type_register_static(AGS_TYPE_TASK, "AgsRemoveRecallContainer", &ags_remove_recall_container_info, 0); g_type_add_interface_static(ags_type_remove_recall_container, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_recall_container); } void ags_remove_recall_container_class_init(AgsRemoveRecallContainerClass *remove_recall_container) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_remove_recall_container_parent_class = g_type_class_peek_parent(remove_recall_container); /* GObjectClass */ gobject = (GObjectClass *) remove_recall_container; gobject->set_property = ags_remove_recall_container_set_property; gobject->get_property = ags_remove_recall_container_get_property; gobject->dispose = ags_remove_recall_container_dispose; gobject->finalize = ags_remove_recall_container_finalize; /* properties */ /** * AgsRemoveRecallContainer:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of remove recall container"), i18n_pspec("The audio of remove recall container task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsRemoveRecallContainer:recall_container: * * The assigned #AgsRecall_Container * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-container", i18n_pspec("recall container of remove recall container"), i18n_pspec("The recall container of remove recall container task"), AGS_TYPE_RECALL_CONTAINER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CONTAINER, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) remove_recall_container; task->launch = ags_remove_recall_container_launch; } void ags_remove_recall_container_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_recall_container_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_recall_container_connect; connectable->disconnect = ags_remove_recall_container_disconnect; } void ags_remove_recall_container_init(AgsRemoveRecallContainer *remove_recall_container) { remove_recall_container->audio = NULL; remove_recall_container->recall_container = NULL; } void ags_remove_recall_container_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRemoveRecallContainer *remove_recall_container; remove_recall_container = AGS_REMOVE_RECALL_CONTAINER(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(remove_recall_container->audio == (GObject *) audio){ return; } if(remove_recall_container->audio != NULL){ g_object_unref(remove_recall_container->audio); } if(audio != NULL){ g_object_ref(audio); } remove_recall_container->audio = (GObject *) audio; } break; case PROP_RECALL_CONTAINER: { AgsRecallContainer *recall_container; recall_container = (AgsRecallContainer *) g_value_get_object(value); if(remove_recall_container->recall_container == (GObject *) recall_container){ return; } if(remove_recall_container->recall_container != NULL){ g_object_unref(remove_recall_container->recall_container); } if(recall_container != NULL){ g_object_ref(recall_container); } remove_recall_container->recall_container = (GObject *) recall_container; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_recall_container_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRemoveRecallContainer *remove_recall_container; remove_recall_container = AGS_REMOVE_RECALL_CONTAINER(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, remove_recall_container->audio); } break; case PROP_RECALL_CONTAINER: { g_value_set_object(value, remove_recall_container->recall_container); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_recall_container_connect(AgsConnectable *connectable) { ags_remove_recall_container_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_recall_container_disconnect(AgsConnectable *connectable) { ags_remove_recall_container_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_recall_container_dispose(GObject *gobject) { AgsRemoveRecallContainer *remove_recall_container; remove_recall_container = AGS_REMOVE_RECALL_CONTAINER(gobject); if(remove_recall_container->audio != NULL){ g_object_unref(remove_recall_container->audio); remove_recall_container->audio = NULL; } if(remove_recall_container->recall_container != NULL){ g_object_unref(remove_recall_container->recall_container); remove_recall_container->recall_container = NULL; } /* call parent */ G_OBJECT_CLASS(ags_remove_recall_container_parent_class)->dispose(gobject); } void ags_remove_recall_container_finalize(GObject *gobject) { AgsRemoveRecallContainer *remove_recall_container; remove_recall_container = AGS_REMOVE_RECALL_CONTAINER(gobject); if(remove_recall_container->audio != NULL){ g_object_unref(remove_recall_container->audio); } if(remove_recall_container->recall_container != NULL){ g_object_unref(remove_recall_container->recall_container); } /* call parent */ G_OBJECT_CLASS(ags_remove_recall_container_parent_class)->finalize(gobject); } void ags_remove_recall_container_launch(AgsTask *task) { AgsRemoveRecallContainer *remove_recall_container; remove_recall_container = AGS_REMOVE_RECALL_CONTAINER(task); ags_audio_remove_recall_container((AgsAudio *) remove_recall_container->audio, (GObject *) remove_recall_container->recall_container); } /** * ags_remove_recall_container_new: * @audio: the #AgsAudio * @recall_container: the #AgsRecallContainer to remove * * Creates an #AgsRemoveRecallContainer. * * Returns: an new #AgsRemoveRecallContainer. * * Since: 1.0.0 */ AgsRemoveRecallContainer* ags_remove_recall_container_new(GObject *audio, AgsRecallContainer *recall_container) { AgsRemoveRecallContainer *remove_recall_container; remove_recall_container = (AgsRemoveRecallContainer *) g_object_new(AGS_TYPE_REMOVE_RECALL_CONTAINER, "audio", audio, "recall-container", recall_container, NULL); return(remove_recall_container); } gsequencer-1.4.24/ags/audio/task/ags_open_sf2_sample.h0000644000175000017500000000421513247044247017571 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OPEN_SF2_SAMPLE_H__ #define __AGS_OPEN_SF2_SAMPLE_H__ #include #include #include #include #define AGS_TYPE_OPEN_SF2_SAMPLE (ags_open_sf2_sample_get_type()) #define AGS_OPEN_SF2_SAMPLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_OPEN_SF2_SAMPLE, AgsOpenSf2Sample)) #define AGS_OPEN_SF2_SAMPLE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_OPEN_SF2_SAMPLE, AgsOpenSf2SampleClass)) #define AGS_IS_OPEN_SF2_SAMPLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_OPEN_SF2_SAMPLE)) #define AGS_IS_OPEN_SF2_SAMPLE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_OPEN_SF2_SAMPLE)) #define AGS_OPEN_SF2_SAMPLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_OPEN_SF2_SAMPLE, AgsOpenSf2SampleClass)) typedef struct _AgsOpenSf2Sample AgsOpenSf2Sample; typedef struct _AgsOpenSf2SampleClass AgsOpenSf2SampleClass; struct _AgsOpenSf2Sample { AgsTask task; AgsChannel *channel; gchar *filename; gchar *preset; gchar *instrument; gchar *sample; }; struct _AgsOpenSf2SampleClass { AgsTaskClass task; }; GType ags_open_sf2_sample_get_type(); AgsOpenSf2Sample* ags_open_sf2_sample_new(AgsChannel *channel, gchar *filename, gchar *preset, gchar *instrument, gchar *sample); #endif /*__AGS_OPEN_SF2_SAMPLE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_remove_audio_signal.h0000644000175000017500000000430713247044247020532 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REMOVE_AUDIO_SIGNAL_H__ #define __AGS_REMOVE_AUDIO_SIGNAL_H__ #include #include #include #include #include #define AGS_TYPE_REMOVE_AUDIO_SIGNAL (ags_remove_audio_signal_get_type()) #define AGS_REMOVE_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_AUDIO_SIGNAL, AgsRemoveAudioSignal)) #define AGS_REMOVE_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_AUDIO_SIGNAL, AgsRemoveAudioSignalClass)) #define AGS_IS_REMOVE_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_AUDIO_SIGNAL)) #define AGS_IS_REMOVE_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_AUDIO_SIGNAL)) #define AGS_REMOVE_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_AUDIO_SIGNAL, AgsRemoveAudioSignalClass)) typedef struct _AgsRemoveAudioSignal AgsRemoveAudioSignal; typedef struct _AgsRemoveAudioSignalClass AgsRemoveAudioSignalClass; struct _AgsRemoveAudioSignal { AgsTask task; AgsRecycling *recycling; AgsAudioSignal *audio_signal; }; struct _AgsRemoveAudioSignalClass { AgsTaskClass task; }; GType ags_remove_audio_signal_get_type(); AgsRemoveAudioSignal* ags_remove_audio_signal_new(AgsRecycling *recycling, AgsAudioSignal *audio_signal); #endif /*__AGS_REMOVE_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_append_channel.h0000644000175000017500000000400113247044247017445 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_APPEND_CHANNEL_H__ #define __AGS_APPEND_CHANNEL_H__ #include #include #include #include #define AGS_TYPE_APPEND_CHANNEL (ags_append_channel_get_type()) #define AGS_APPEND_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPEND_CHANNEL, AgsAppendChannel)) #define AGS_APPEND_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_APPEND_CHANNEL, AgsAppendChannelClass)) #define AGS_IS_APPEND_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPEND_CHANNEL)) #define AGS_IS_APPEND_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_APPEND_CHANNEL)) #define AGS_APPEND_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_APPEND_CHANNEL, AgsAppendChannelClass)) typedef struct _AgsAppendChannel AgsAppendChannel; typedef struct _AgsAppendChannelClass AgsAppendChannelClass; struct _AgsAppendChannel { AgsTask task; GObject *audio_loop; GObject *channel; }; struct _AgsAppendChannelClass { AgsTaskClass task; }; GType ags_append_channel_get_type(); AgsAppendChannel* ags_append_channel_new(GObject *audio_loop, GObject *channel); #endif /*__AGS_APPEND_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_remove_recall_container.h0000644000175000017500000000442213247044247021376 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REMOVE_RECALL_CONTAINER_H__ #define __AGS_REMOVE_RECALL_CONTAINER_H__ #include #include #include #include #define AGS_TYPE_REMOVE_RECALL_CONTAINER (ags_remove_recall_container_get_type()) #define AGS_REMOVE_RECALL_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_RECALL_CONTAINER, AgsRemoveRecallContainer)) #define AGS_REMOVE_RECALL_CONTAINER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_RECALL_CONTAINER, AgsRemoveRecallContainerClass)) #define AGS_IS_REMOVE_RECALL_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_RECALL_CONTAINER)) #define AGS_IS_REMOVE_RECALL_CONTAINER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_RECALL_CONTAINER)) #define AGS_REMOVE_RECALL_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_RECALL_CONTAINER, AgsRemoveRecallContainerClass)) typedef struct _AgsRemoveRecallContainer AgsRemoveRecallContainer; typedef struct _AgsRemoveRecallContainerClass AgsRemoveRecallContainerClass; struct _AgsRemoveRecallContainer { AgsTask task; GObject *audio; AgsRecallContainer *recall_container; }; struct _AgsRemoveRecallContainerClass { AgsTaskClass task; }; GType ags_remove_recall_container_get_type(); AgsRemoveRecallContainer* ags_remove_recall_container_new(GObject *audio, AgsRecallContainer *recall_container); #endif /*__AGS_REMOVE_RECALL_CONTAINER_H__*/ gsequencer-1.4.24/ags/audio/task/ags_seek_soundcard.h0000644000175000017500000000400513247044247017503 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SEEK_SOUNDCARD_H__ #define __AGS_SEEK_SOUNDCARD_H__ #include #include #include #define AGS_TYPE_SEEK_SOUNDCARD (ags_seek_soundcard_get_type()) #define AGS_SEEK_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SEEK_SOUNDCARD, AgsSeekSoundcard)) #define AGS_SEEK_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SEEK_SOUNDCARD, AgsSeekSoundcardClass)) #define AGS_IS_SEEK_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SEEK_SOUNDCARD)) #define AGS_IS_SEEK_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SEEK_SOUNDCARD)) #define AGS_SEEK_SOUNDCARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SEEK_SOUNDCARD, AgsSeekSoundcardClass)) typedef struct _AgsSeekSoundcard AgsSeekSoundcard; typedef struct _AgsSeekSoundcardClass AgsSeekSoundcardClass; struct _AgsSeekSoundcard { AgsTask task; GObject *soundcard; guint steps; gboolean move_forward; }; struct _AgsSeekSoundcardClass { AgsTaskClass task; }; GType ags_seek_soundcard_get_type(); AgsSeekSoundcard* ags_seek_soundcard_new(GObject *soundcard, guint steps, gboolean move_forward); #endif /*__AGS_SEEK_SOUNDCARD_H__*/ gsequencer-1.4.24/ags/audio/task/ags_remove_recall.h0000644000175000017500000000411513247044247017333 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REMOVE_RECALL_H__ #define __AGS_REMOVE_RECALL_H__ #include #include #include #include #define AGS_TYPE_REMOVE_RECALL (ags_remove_recall_get_type()) #define AGS_REMOVE_RECALL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_RECALL, AgsRemoveRecall)) #define AGS_REMOVE_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_RECALL, AgsRemoveRecallClass)) #define AGS_IS_REMOVE_RECALL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_RECALL)) #define AGS_IS_REMOVE_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_RECALL)) #define AGS_REMOVE_RECALL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_RECALL, AgsRemoveRecallClass)) typedef struct _AgsRemoveRecall AgsRemoveRecall; typedef struct _AgsRemoveRecallClass AgsRemoveRecallClass; struct _AgsRemoveRecall { AgsTask task; GObject *context; AgsRecall *recall; gboolean is_play; gboolean remove_all; }; struct _AgsRemoveRecallClass { AgsTaskClass task; }; GType ags_remove_recall_get_type(); AgsRemoveRecall* ags_remove_recall_new(GObject *context, AgsRecall *recall, gboolean is_play, gboolean remove_all); #endif /*__AGS_REMOVE_RECALL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_unref_audio_signal.h0000644000175000017500000000412413246707333020352 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_UNREF_AUDIO_SIGNAL_H__ #define __AGS_UNREF_AUDIO_SIGNAL_H__ #include #include #include #include #define AGS_TYPE_UNREF_AUDIO_SIGNAL (ags_unref_audio_signal_get_type()) #define AGS_UNREF_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_UNREF_AUDIO_SIGNAL, AgsUnrefAudioSignal)) #define AGS_UNREF_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_UNREF_AUDIO_SIGNAL, AgsUnrefAudioSignalClass)) #define AGS_IS_UNREF_AUDIO_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_UNREF_AUDIO_SIGNAL)) #define AGS_IS_UNREF_AUDIO_SIGNAL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_UNREF_AUDIO_SIGNAL)) #define AGS_UNREF_AUDIO_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_UNREF_AUDIO_SIGNAL, AgsUnrefAudioSignalClass)) typedef struct _AgsUnrefAudioSignal AgsUnrefAudioSignal; typedef struct _AgsUnrefAudioSignalClass AgsUnrefAudioSignalClass; struct _AgsUnrefAudioSignal { AgsTask task; AgsAudioSignal *audio_signal; }; struct _AgsUnrefAudioSignalClass { AgsTaskClass task; }; GType ags_unref_audio_signal_get_type(); AgsUnrefAudioSignal* ags_unref_audio_signal_new(AgsAudioSignal *audio_signal); #endif /*__AGS_UNREF_AUDIO_SIGNAL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_add_recall_container.c0000644000175000017500000002312713247044247020627 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include void ags_add_recall_container_class_init(AgsAddRecallContainerClass *add_recall_container); void ags_add_recall_container_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_recall_container_init(AgsAddRecallContainer *add_recall_container); void ags_add_recall_container_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_add_recall_container_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_add_recall_container_connect(AgsConnectable *connectable); void ags_add_recall_container_disconnect(AgsConnectable *connectable); void ags_add_recall_container_dispose(GObject *gobject); void ags_add_recall_container_finalize(GObject *gobject); void ags_add_recall_container_launch(AgsTask *task); /** * SECTION:ags_add_recall_container * @short_description: add recall object to context * @title: AgsAddRecallContainer * @section_id: * @include: ags/audio/task/ags_add_recall_container.h * * The #AgsAddRecallContainer task adds #AgsRecallContainer of audio. */ static gpointer ags_add_recall_container_parent_class = NULL; static AgsConnectableInterface *ags_add_recall_container_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_RECALL_CONTAINER, }; GType ags_add_recall_container_get_type() { static GType ags_type_add_recall_container = 0; if(!ags_type_add_recall_container){ static const GTypeInfo ags_add_recall_container_info = { sizeof (AgsAddRecallContainerClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_recall_container_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddRecallContainer), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_recall_container_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_recall_container_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_recall_container = g_type_register_static(AGS_TYPE_TASK, "AgsAddRecallContainer", &ags_add_recall_container_info, 0); g_type_add_interface_static(ags_type_add_recall_container, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_recall_container); } void ags_add_recall_container_class_init(AgsAddRecallContainerClass *add_recall_container) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_add_recall_container_parent_class = g_type_class_peek_parent(add_recall_container); /* GObjectClass */ gobject = (GObjectClass *) add_recall_container; gobject->set_property = ags_add_recall_container_set_property; gobject->get_property = ags_add_recall_container_get_property; gobject->finalize = ags_add_recall_container_finalize; /* properties */ /** * AgsAddRecallContainer:audio: * * The assigned #AgsAudio * <<<<<<< HEAD * Since: 1.0.0 ======= * Since: 1.0.0 >>>>>>> master */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of add recall container"), i18n_pspec("The audio of add recall container task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsAddRecallContainer:recall_container: * * The assigned #AgsRecall_Container * <<<<<<< HEAD * Since: 1.0.0 ======= * Since: 1.0.0 >>>>>>> master */ param_spec = g_param_spec_object("recall-container", i18n_pspec("recall container of add recall container"), i18n_pspec("The recall container of add recall container task"), AGS_TYPE_RECALL_CONTAINER, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CONTAINER, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) add_recall_container; task->launch = ags_add_recall_container_launch; } void ags_add_recall_container_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_recall_container_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_recall_container_connect; connectable->disconnect = ags_add_recall_container_disconnect; } void ags_add_recall_container_init(AgsAddRecallContainer *add_recall_container) { add_recall_container->audio = NULL; add_recall_container->recall_container = NULL; } void ags_add_recall_container_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAddRecallContainer *add_recall_container; add_recall_container = AGS_ADD_RECALL_CONTAINER(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(add_recall_container->audio == (GObject *) audio){ return; } if(add_recall_container->audio != NULL){ g_object_unref(add_recall_container->audio); } if(audio != NULL){ g_object_ref(audio); } add_recall_container->audio = (GObject *) audio; } break; case PROP_RECALL_CONTAINER: { AgsRecallContainer *recall_container; recall_container = (AgsRecallContainer *) g_value_get_object(value); if(add_recall_container->recall_container == (GObject *) recall_container){ return; } if(add_recall_container->recall_container != NULL){ g_object_unref(add_recall_container->recall_container); } if(recall_container != NULL){ g_object_ref(recall_container); } add_recall_container->recall_container = (GObject *) recall_container; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_recall_container_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAddRecallContainer *add_recall_container; add_recall_container = AGS_ADD_RECALL_CONTAINER(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, add_recall_container->audio); } break; case PROP_RECALL_CONTAINER: { g_value_set_object(value, add_recall_container->recall_container); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_recall_container_connect(AgsConnectable *connectable) { ags_add_recall_container_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_recall_container_disconnect(AgsConnectable *connectable) { ags_add_recall_container_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_recall_container_dispose(GObject *gobject) { AgsAddRecallContainer *add_recall_container; add_recall_container = AGS_ADD_RECALL_CONTAINER(gobject); if(add_recall_container->audio != NULL){ g_object_unref(add_recall_container->audio); add_recall_container->audio = NULL; } if(add_recall_container->recall_container != NULL){ g_object_unref(add_recall_container->recall_container); add_recall_container->recall_container = NULL; } /* call parent */ G_OBJECT_CLASS(ags_add_recall_container_parent_class)->dispose(gobject); } void ags_add_recall_container_finalize(GObject *gobject) { AgsAddRecallContainer *add_recall_container; add_recall_container = AGS_ADD_RECALL_CONTAINER(gobject); if(add_recall_container->audio != NULL){ g_object_unref(add_recall_container->audio); } if(add_recall_container->recall_container != NULL){ g_object_unref(add_recall_container->recall_container); } /* call parent */ G_OBJECT_CLASS(ags_add_recall_container_parent_class)->finalize(gobject); } void ags_add_recall_container_launch(AgsTask *task) { AgsAddRecallContainer *add_recall_container; add_recall_container = AGS_ADD_RECALL_CONTAINER(task); ags_audio_add_recall_container((AgsAudio *) add_recall_container->audio, (GObject *) add_recall_container->recall_container); } /** * ags_add_recall_container_new: * @audio: the #AgsAudio * @recall_container: the #AgsRecallContainer to add * * Creates an #AgsAddRecallContainer. * * Returns: an new #AgsAddRecallContainer. * * Since: 1.0.0 */ AgsAddRecallContainer* ags_add_recall_container_new(GObject *audio, AgsRecallContainer *recall_container) { AgsAddRecallContainer *add_recall_container; add_recall_container = (AgsAddRecallContainer *) g_object_new(AGS_TYPE_ADD_RECALL_CONTAINER, "audio", audio, "recall-container", recall_container, NULL); return(add_recall_container); } gsequencer-1.4.24/ags/audio/task/ags_remove_recall.c0000644000175000017500000003060313247044247017327 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_remove_recall_class_init(AgsRemoveRecallClass *remove_recall); void ags_remove_recall_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_recall_init(AgsRemoveRecall *remove_recall); void ags_remove_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_remove_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_remove_recall_connect(AgsConnectable *connectable); void ags_remove_recall_disconnect(AgsConnectable *connectable); void ags_remove_recall_dispose(GObject *gobject); void ags_remove_recall_finalize(GObject *gobject); void ags_remove_recall_launch(AgsTask *task); /** * SECTION:ags_remove_recall * @short_description: remove recall object from context * @title: AgsRemoveRecall * @section_id: * @include: ags/audio/task/ags_remove_recall.h * * The #AgsRemoveRecall task removes #AgsRecall from context. */ static gpointer ags_remove_recall_parent_class = NULL; static AgsConnectableInterface *ags_remove_recall_parent_connectable_interface; enum{ PROP_0, PROP_CONTEXT, PROP_RECALL, PROP_IS_PLAY, PROP_REMOVE_ALL, }; GType ags_remove_recall_get_type() { static GType ags_type_remove_recall = 0; if(!ags_type_remove_recall){ static const GTypeInfo ags_remove_recall_info = { sizeof (AgsRemoveRecallClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_recall_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoveRecall), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_recall_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_recall_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_recall = g_type_register_static(AGS_TYPE_TASK, "AgsRemoveRecall", &ags_remove_recall_info, 0); g_type_add_interface_static(ags_type_remove_recall, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_recall); } void ags_remove_recall_class_init(AgsRemoveRecallClass *remove_recall) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_remove_recall_parent_class = g_type_class_peek_parent(remove_recall); /* GObjectClass */ gobject = (GObjectClass *) remove_recall; gobject->set_property = ags_remove_recall_set_property; gobject->get_property = ags_remove_recall_get_property; gobject->finalize = ags_remove_recall_finalize; /** * AgsRemoveRecall:context: * * The assigned #AgsContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("context", i18n_pspec("context of remove recall"), i18n_pspec("The context of remove recall task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTEXT, param_spec); /** * AgsRemoveRecall:recall: * * The assigned #AgsRecall * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall", i18n_pspec("recall of remove recall"), i18n_pspec("The recall of remove recall task"), AGS_TYPE_RECALL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL, param_spec); /** * AgsRemoveRecall:is-play: * * The recall's context is-play. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("is-play", i18n_pspec("is play context"), i18n_pspec("Remove recall to play context"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_IS_PLAY, param_spec); /** * AgsRemoveRecall:remove-all: * * Do remove-all related recalls. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("remove-all", i18n_pspec("remove all"), i18n_pspec("Remove all related recall"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_REMOVE_ALL, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) remove_recall; task->launch = ags_remove_recall_launch; } void ags_remove_recall_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_recall_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_recall_connect; connectable->disconnect = ags_remove_recall_disconnect; } void ags_remove_recall_init(AgsRemoveRecall *remove_recall) { remove_recall->context = NULL; remove_recall->recall = NULL; remove_recall->is_play = FALSE; remove_recall->remove_all = FALSE; } void ags_remove_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRemoveRecall *remove_recall; remove_recall = AGS_REMOVE_RECALL(gobject); switch(prop_id){ case PROP_CONTEXT: { GObject *context; context = (GObject *) g_value_get_object(value); if(remove_recall->context == (GObject *) context){ return; } if(remove_recall->context != NULL){ g_object_unref(remove_recall->context); } if(context != NULL){ g_object_ref(context); } remove_recall->context = (GObject *) context; } break; case PROP_RECALL: { AgsRecall *recall; recall = (AgsRecall *) g_value_get_object(value); if(remove_recall->recall == (GObject *) recall){ return; } if(remove_recall->recall != NULL){ g_object_unref(remove_recall->recall); } if(recall != NULL){ g_object_ref(recall); } remove_recall->recall = (GObject *) recall; } break; case PROP_IS_PLAY: { remove_recall->is_play = g_value_get_boolean(value); } break; case PROP_REMOVE_ALL: { remove_recall->remove_all = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRemoveRecall *remove_recall; remove_recall = AGS_REMOVE_RECALL(gobject); switch(prop_id){ case PROP_CONTEXT: { g_value_set_object(value, remove_recall->context); } break; case PROP_RECALL: { g_value_set_object(value, remove_recall->recall); } break; case PROP_IS_PLAY: { g_value_set_boolean(value, remove_recall->is_play); } break; case PROP_REMOVE_ALL: { g_value_set_boolean(value, remove_recall->remove_all); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_recall_connect(AgsConnectable *connectable) { ags_remove_recall_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_recall_disconnect(AgsConnectable *connectable) { ags_remove_recall_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_recall_dispose(GObject *gobject) { AgsRemoveRecall *remove_recall; remove_recall = AGS_REMOVE_RECALL(gobject); if(remove_recall->context != NULL){ g_object_unref(remove_recall->context); remove_recall->context = NULL; } if(remove_recall->recall != NULL){ g_object_unref(remove_recall->recall); remove_recall->recall = NULL; } /* call parent */ G_OBJECT_CLASS(ags_remove_recall_parent_class)->dispose(gobject); } void ags_remove_recall_finalize(GObject *gobject) { AgsRemoveRecall *remove_recall; remove_recall = AGS_REMOVE_RECALL(gobject); if(remove_recall->context != NULL){ g_object_unref(remove_recall->context); } if(remove_recall->recall != NULL){ g_object_unref(remove_recall->recall); } /* call parent */ G_OBJECT_CLASS(ags_remove_recall_parent_class)->finalize(gobject); } void ags_remove_recall_launch(AgsTask *task) { AgsRemoveRecall *remove_recall; AgsRecallContainer *recall_container; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); remove_recall = AGS_REMOVE_RECALL(task); if(AGS_IS_AUDIO(remove_recall->context)){ if(remove_recall->remove_all){ GList *list_start, *list; if(AGS_IS_RECALL_AUDIO_RUN(remove_recall->recall)){ /* get audio mutex */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) remove_recall->context); pthread_mutex_unlock(application_mutex); /* remove recall */ pthread_mutex_lock(mutex); recall_container = remove_recall->recall->container; list_start = list = g_list_copy(recall_container->recall_audio_run); pthread_mutex_unlock(mutex); while(list != NULL){ if(list->data != remove_recall->recall){ ags_audio_remove_recall(AGS_AUDIO(remove_recall->context), (GObject *) list->data, remove_recall->is_play); } list = list->next; } g_list_free(list_start); } } ags_audio_remove_recall(AGS_AUDIO(remove_recall->context), (GObject *) remove_recall->recall, remove_recall->is_play); }else if(AGS_IS_CHANNEL(remove_recall->context)){ if(remove_recall->remove_all){ GList *list_start, *list; if(AGS_IS_RECALL_CHANNEL_RUN(remove_recall->recall)){ /* get channel mutex */ pthread_mutex_lock(application_mutex); mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) remove_recall->context); pthread_mutex_unlock(application_mutex); /* remove recall */ pthread_mutex_lock(mutex); recall_container = remove_recall->recall->container; list_start = list = g_list_copy(recall_container->recall_channel_run); pthread_mutex_unlock(mutex); while(list != NULL){ if(list->data != remove_recall->recall){ ags_channel_remove_recall(AGS_CHANNEL(remove_recall->context), (GObject *) list->data, remove_recall->is_play); } list = list->next; } g_list_free(list_start); } } ags_channel_remove_recall(AGS_CHANNEL(remove_recall->context), (GObject *) remove_recall->recall, remove_recall->is_play); }else if(AGS_IS_RECALL(remove_recall->context)){ ags_recall_remove_child(AGS_RECALL(remove_recall->context), remove_recall->recall); }else{ ags_recall_remove(remove_recall->recall); } } /** * ags_remove_recall_new: * @context: may be #AgsAudio, #AgsChannel or #AgsRecall * @recall: the #AgsRecall to remove * @is_play: if %TRUE non-complex recall * @remove_all: if %TRUE all related will be removed * * Creates an #AgsRemoveRecall. * * Returns: an new #AgsRemoveRecall. * * Since: 1.0.0 */ AgsRemoveRecall* ags_remove_recall_new(GObject *context, AgsRecall *recall, gboolean is_play, gboolean remove_all) { AgsRemoveRecall *remove_recall; remove_recall = (AgsRemoveRecall *) g_object_new(AGS_TYPE_REMOVE_RECALL, "context", context, "recall", recall, "is-play", is_play, "remove-all", remove_all, NULL); return(remove_recall); } gsequencer-1.4.24/ags/audio/task/ags_init_channel.h0000644000175000017500000000420113247044247017143 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_INIT_CHANNEL_H__ #define __AGS_INIT_CHANNEL_H__ #include #include #include #include #include #define AGS_TYPE_INIT_CHANNEL (ags_init_channel_get_type()) #define AGS_INIT_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_INIT_CHANNEL, AgsInitChannel)) #define AGS_INIT_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_INIT_CHANNEL, AgsInitChannelClass)) #define AGS_IS_INIT_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_INIT_CHANNEL)) #define AGS_IS_INIT_CHANNEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_INIT_CHANNEL)) #define AGS_INIT_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_INIT_CHANNEL, AgsInitChannelClass)) typedef struct _AgsInitChannel AgsInitChannel; typedef struct _AgsInitChannelClass AgsInitChannelClass; struct _AgsInitChannel { AgsTask task; AgsChannel *channel; gboolean play_pad; gboolean do_playback; gboolean do_sequencer; gboolean do_notation; }; struct _AgsInitChannelClass { AgsTaskClass task; }; GType ags_init_channel_get_type(); AgsInitChannel* ags_init_channel_new(AgsChannel *channel, gboolean play_pad, gboolean do_playback, gboolean do_sequencer, gboolean do_notation); #endif /*__AGS_INIT_CHANNEL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_remove_region_from_selection.c0000644000175000017500000003270613247044247022446 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_remove_region_from_selection_class_init(AgsRemoveRegionFromSelectionClass *remove_region_from_selection); void ags_remove_region_from_selection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_region_from_selection_init(AgsRemoveRegionFromSelection *remove_region_from_selection); void ags_remove_region_from_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_remove_region_from_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_remove_region_from_selection_connect(AgsConnectable *connectable); void ags_remove_region_from_selection_disconnect(AgsConnectable *connectable); void ags_remove_region_from_selection_dispose(GObject *gobject); void ags_remove_region_from_selection_finalize(GObject *gobject); void ags_remove_region_from_selection_launch(AgsTask *task); /** * SECTION:ags_remove_region_from_selection * @short_description: remove region from notation selection * @title: AgsRemoveRegionFromSelection * @section_id: * @include: ags/audio/task/ags_remove_region_from_selection.h * * The #AgsRemoveRegionFromSelection task removes the specified #AgsNote from selection of #AgsNotation. */ static gpointer ags_remove_region_from_selection_parent_class = NULL; static AgsConnectableInterface *ags_remove_region_from_selection_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_NOTATION, PROP_X0, PROP_X1, PROP_Y0, PROP_Y1, }; GType ags_remove_region_from_selection_get_type() { static GType ags_type_remove_region_from_selection = 0; if(!ags_type_remove_region_from_selection){ static const GTypeInfo ags_remove_region_from_selection_info = { sizeof (AgsRemoveRegionFromSelectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_region_from_selection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoveRegionFromSelection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_region_from_selection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_region_from_selection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_region_from_selection = g_type_register_static(AGS_TYPE_TASK, "AgsRemoveRegionFromSelection", &ags_remove_region_from_selection_info, 0); g_type_add_interface_static(ags_type_remove_region_from_selection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_region_from_selection); } void ags_remove_region_from_selection_class_init(AgsRemoveRegionFromSelectionClass *remove_region_from_selection) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_remove_region_from_selection_parent_class = g_type_class_peek_parent(remove_region_from_selection); /* gobject */ gobject = (GObjectClass *) remove_region_from_selection; gobject->set_property = ags_remove_region_from_selection_set_property; gobject->get_property = ags_remove_region_from_selection_get_property; gobject->dispose = ags_remove_region_from_selection_dispose; gobject->finalize = ags_remove_region_from_selection_finalize; /* properties */ /** * AgsRemoveRegionFromSelection:audio: * * The assigned #AgsAudio * * Since: 1.2.2 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of remove note"), i18n_pspec("The audio of remove note task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsRemoveRegionFromSelection:notation: * * The assigned #AgsNotation * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("notation of remove note"), i18n_pspec("The notation of remove note task"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsRemoveRegionFromSelection:x0: * * Note offset x0. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x0", i18n_pspec("offset x0"), i18n_pspec("The x0 offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X0, param_spec); /** * AgsRemoveRegionFromSelection:x1: * * Note offset x1. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x1", i18n_pspec("offset x1"), i18n_pspec("The x1 offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X1, param_spec); /** * AgsRemoveRegionFromSelection:y0: * * Note offset y0. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("y0", i18n_pspec("offset y0"), i18n_pspec("The y0 offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y0, param_spec); /** * AgsRemoveRegionFromSelection:y1: * * Note offset y1. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("y1", i18n_pspec("offset y1"), i18n_pspec("The y1 offset"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y1, param_spec); /* task */ task = (AgsTaskClass *) remove_region_from_selection; task->launch = ags_remove_region_from_selection_launch; } void ags_remove_region_from_selection_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_region_from_selection_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_region_from_selection_connect; connectable->disconnect = ags_remove_region_from_selection_disconnect; } void ags_remove_region_from_selection_init(AgsRemoveRegionFromSelection *remove_region_from_selection) { remove_region_from_selection->audio = NULL; remove_region_from_selection->notation = NULL; remove_region_from_selection->x0 = 0; remove_region_from_selection->y0 = 0; remove_region_from_selection->x1 = 0; remove_region_from_selection->y1 = 0; } void ags_remove_region_from_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRemoveRegionFromSelection *remove_region_from_selection; remove_region_from_selection = AGS_REMOVE_REGION_FROM_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(remove_region_from_selection->audio == (GObject *) audio){ return; } if(remove_region_from_selection->audio != NULL){ g_object_unref(remove_region_from_selection->audio); } if(audio != NULL){ g_object_ref(audio); } remove_region_from_selection->audio = (GObject *) audio; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(remove_region_from_selection->notation == (GObject *) notation){ return; } if(remove_region_from_selection->notation != NULL){ g_object_unref(remove_region_from_selection->notation); } if(notation != NULL){ g_object_ref(notation); } remove_region_from_selection->notation = (GObject *) notation; } break; case PROP_X0: { remove_region_from_selection->x0 = g_value_get_uint(value); } break; case PROP_X1: { remove_region_from_selection->x1 = g_value_get_uint(value); } break; case PROP_Y0: { remove_region_from_selection->y0 = g_value_get_uint(value); } break; case PROP_Y1: { remove_region_from_selection->y1 = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_region_from_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRemoveRegionFromSelection *remove_region_from_selection; remove_region_from_selection = AGS_REMOVE_REGION_FROM_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, remove_region_from_selection->audio); } break; case PROP_NOTATION: { g_value_set_object(value, remove_region_from_selection->notation); } break; case PROP_X0: { g_value_set_uint(value, remove_region_from_selection->x0); } break; case PROP_X1: { g_value_set_uint(value, remove_region_from_selection->x1); } break; case PROP_Y0: { g_value_set_uint(value, remove_region_from_selection->y0); } break; case PROP_Y1: { g_value_set_uint(value, remove_region_from_selection->y1); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_region_from_selection_connect(AgsConnectable *connectable) { ags_remove_region_from_selection_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_region_from_selection_disconnect(AgsConnectable *connectable) { ags_remove_region_from_selection_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_region_from_selection_dispose(GObject *gobject) { AgsRemoveRegionFromSelection *remove_region_from_selection; remove_region_from_selection = AGS_REMOVE_REGION_FROM_SELECTION(gobject); if(remove_region_from_selection->audio != NULL){ g_object_unref(remove_region_from_selection->audio); remove_region_from_selection->audio = NULL; } if(remove_region_from_selection->notation != NULL){ g_object_unref(remove_region_from_selection->notation); remove_region_from_selection->notation = NULL; } /* call parent */ G_OBJECT_CLASS(ags_remove_region_from_selection_parent_class)->dispose(gobject); } void ags_remove_region_from_selection_finalize(GObject *gobject) { AgsRemoveRegionFromSelection *remove_region_from_selection; remove_region_from_selection = AGS_REMOVE_REGION_FROM_SELECTION(gobject); if(remove_region_from_selection->audio != NULL){ g_object_unref(remove_region_from_selection->audio); } if(remove_region_from_selection->notation != NULL){ g_object_unref(remove_region_from_selection->notation); } /* call parent */ G_OBJECT_CLASS(ags_remove_region_from_selection_parent_class)->finalize(gobject); } void ags_remove_region_from_selection_launch(AgsTask *task) { AgsRemoveRegionFromSelection *remove_region_from_selection; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); remove_region_from_selection = AGS_REMOVE_REGION_FROM_SELECTION(task); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) remove_region_from_selection->audio); pthread_mutex_unlock(application_mutex); /* remove region */ pthread_mutex_lock(audio_mutex); ags_notation_remove_region_from_selection(remove_region_from_selection->notation, remove_region_from_selection->x0, remove_region_from_selection->y0, remove_region_from_selection->x1, remove_region_from_selection->y1); pthread_mutex_unlock(audio_mutex); } /** * ags_remove_region_from_selection_new: * @notation: the #AgsNotation providing the selection * @x0: start x coordinate * @y0: start y coordinate * @x1: end x coordinate * @y1: end y coordinate * * Creates an #AgsRemoveRegionFromSelection. * * Returns: an new #AgsRemoveRegionFromSelection. * * Since: 1.0.0 */ AgsRemoveRegionFromSelection* ags_remove_region_from_selection_new(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1) { AgsRemoveRegionFromSelection *remove_region_from_selection; remove_region_from_selection = (AgsRemoveRegionFromSelection *) g_object_new(AGS_TYPE_REMOVE_REGION_FROM_SELECTION, "notation", notation, "x0", x0, "y0", y0, "x1", x1, "y1", y1, NULL); return(remove_region_from_selection); } gsequencer-1.4.24/ags/audio/task/ags_tic_device.c0000644000175000017500000001631513247044247016612 00000000000000/* 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 . */ #include #include void ags_tic_device_class_init(AgsTicDeviceClass *tic_device); void ags_tic_device_connectable_interface_init(AgsConnectableInterface *connectable); void ags_tic_device_init(AgsTicDevice *tic_device); void ags_tic_device_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_tic_device_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_tic_device_connect(AgsConnectable *connectable); void ags_tic_device_disconnect(AgsConnectable *connectable); void ags_tic_device_dispose(GObject *gobject); void ags_tic_device_finalize(GObject *gobject); void ags_tic_device_launch(AgsTask *task); /** * SECTION:ags_tic_device * @short_description: tic device object * @title: AgsTicDevice * @section_id: * @include: ags/audio/task/ags_tic_device.h * * The #AgsTicDevice task tics #GObject. */ static gpointer ags_tic_device_parent_class = NULL; static AgsConnectableInterface *ags_tic_device_parent_connectable_interface; enum{ PROP_0, PROP_DEVICE, }; GType ags_tic_device_get_type() { static GType ags_type_tic_device = 0; if(!ags_type_tic_device){ static const GTypeInfo ags_tic_device_info = { sizeof (AgsTicDeviceClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_tic_device_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsTicDevice), 0, /* n_preallocs */ (GInstanceInitFunc) ags_tic_device_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_tic_device_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_tic_device = g_type_register_static(AGS_TYPE_TASK, "AgsTicDevice", &ags_tic_device_info, 0); g_type_add_interface_static(ags_type_tic_device, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_tic_device); } void ags_tic_device_class_init(AgsTicDeviceClass *tic_device) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_tic_device_parent_class = g_type_class_peek_parent(tic_device); /* gobject */ gobject = (GObjectClass *) tic_device; gobject->dispose = ags_tic_device_dispose; gobject->finalize = ags_tic_device_finalize; /* task */ task = (AgsTaskClass *) tic_device; gobject->set_property = ags_tic_device_set_property; gobject->get_property = ags_tic_device_get_property; task->launch = ags_tic_device_launch; /* properties */ /** * AgsTicDevice:device: * * The assigned #GObject as device. * * Since: 1.0.0 */ param_spec = g_param_spec_object("device", i18n_pspec("device to tic"), i18n_pspec("The device to tic"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DEVICE, param_spec); } void ags_tic_device_connectable_interface_init(AgsConnectableInterface *connectable) { ags_tic_device_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_tic_device_connect; connectable->disconnect = ags_tic_device_disconnect; } void ags_tic_device_init(AgsTicDevice *tic_device) { tic_device->device = NULL; } void ags_tic_device_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsTicDevice *tic_device; tic_device = AGS_TIC_DEVICE(gobject); switch(prop_id){ case PROP_DEVICE: { GObject *device; device = (GObject *) g_value_get_object(value); if(tic_device->device == (GObject *) device){ return; } if(tic_device->device != NULL){ g_object_unref(tic_device->device); } if(device != NULL){ g_object_ref(device); } tic_device->device = (GObject *) device; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_tic_device_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsTicDevice *tic_device; tic_device = AGS_TIC_DEVICE(gobject); switch(prop_id){ case PROP_DEVICE: { g_value_set_object(value, tic_device->device); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_tic_device_connect(AgsConnectable *connectable) { ags_tic_device_parent_connectable_interface->connect(connectable); /* empty */ } void ags_tic_device_disconnect(AgsConnectable *connectable) { ags_tic_device_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_tic_device_dispose(GObject *gobject) { AgsTicDevice *tic_device; tic_device = AGS_TIC_DEVICE(gobject); if(tic_device->device != NULL){ g_object_unref(tic_device->device); tic_device->device = NULL; } /* call parent */ G_OBJECT_CLASS(ags_tic_device_parent_class)->dispose(gobject); } void ags_tic_device_finalize(GObject *gobject) { AgsTicDevice *tic_device; tic_device = AGS_TIC_DEVICE(gobject); if(tic_device->device != NULL){ g_object_unref(tic_device->device); } /* call parent */ G_OBJECT_CLASS(ags_tic_device_parent_class)->finalize(gobject); } void ags_tic_device_launch(AgsTask *task) { AgsTicDevice *tic_device; tic_device = AGS_TIC_DEVICE(task); if(AGS_IS_SOUNDCARD(tic_device->device)){ AgsSoundcardInterface *soundcard_interface; soundcard_interface = AGS_SOUNDCARD_GET_INTERFACE(AGS_SOUNDCARD(tic_device->device)); soundcard_interface->tic(AGS_SOUNDCARD(tic_device->device)); // ags_soundcard_tic(AGS_SOUNDCARD(tic_device->device)); }else if(AGS_IS_SEQUENCER(AGS_SEQUENCER(tic_device->device))){ AgsSequencerInterface *sequencer_interface; sequencer_interface = AGS_SEQUENCER_GET_INTERFACE(AGS_SEQUENCER(tic_device->device)); sequencer_interface->tic(AGS_SEQUENCER(tic_device->device)); // ags_sequencer_tic(AGS_SEQUENCER(tic_device->device)); } } /** * ags_tic_device_new: * @device: the #GObject to tic * * Creates an #AgsTicDevice. * * Returns: an new #AgsTicDevice. * * Since: 1.0.0 */ AgsTicDevice* ags_tic_device_new(GObject *device) { AgsTicDevice *tic_device; tic_device = (AgsTicDevice *) g_object_new(AGS_TYPE_TIC_DEVICE, "device", device, NULL); return(tic_device); } gsequencer-1.4.24/ags/audio/task/ags_open_file.c0000644000175000017500000003540213247044247016452 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_open_file_class_init(AgsOpenFileClass *open_file); void ags_open_file_connectable_interface_init(AgsConnectableInterface *connectable); void ags_open_file_init(AgsOpenFile *open_file); void ags_open_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_open_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_open_file_connect(AgsConnectable *connectable); void ags_open_file_disconnect(AgsConnectable *connectable); void ags_open_file_dispose(GObject *gobject); void ags_open_file_finalize(GObject *gobject); void ags_open_file_launch(AgsTask *task); /** * SECTION:ags_open_file * @short_description: open file task * @title: AgsOpenFile * @section_id: * @include: ags/audio/task/ags_open_file.h * * The #AgsOpenFile task opens files. */ static gpointer ags_open_file_parent_class = NULL; static AgsConnectableInterface *ags_open_file_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_FILENAMES, PROP_OVERWRITE_CHANNELS, PROP_CREATE_CHANNELS, }; GType ags_open_file_get_type() { static GType ags_type_open_file = 0; if(!ags_type_open_file){ static const GTypeInfo ags_open_file_info = { sizeof (AgsOpenFileClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_open_file_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsOpenFile), 0, /* n_preallocs */ (GInstanceInitFunc) ags_open_file_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_open_file_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_open_file = g_type_register_static(AGS_TYPE_TASK, "AgsOpenFile", &ags_open_file_info, 0); g_type_add_interface_static(ags_type_open_file, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_open_file); } void ags_open_file_class_init(AgsOpenFileClass *open_file) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_open_file_parent_class = g_type_class_peek_parent(open_file); /* GObject */ gobject = (GObjectClass *) open_file; gobject->set_property = ags_open_file_set_property; gobject->get_property = ags_open_file_get_property; gobject->dispose = ags_open_file_dispose; gobject->finalize = ags_open_file_finalize; /* properties */ /** * AgsOpenFile:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of open file"), i18n_pspec("The audio of open file task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsOpenFile:filenames: * * The assigned #GSList-struct providing filenames as string * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("filenames", i18n_pspec("filenames of open file"), i18n_pspec("The filenames of open file task"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAMES, param_spec); /** * AgsOpenFile:overwrite-channels: * * As open files overwrite #AgsChannel. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("overwrite-channels", i18n_pspec("open file overwriting channels"), i18n_pspec("Do overwrite channels as open files"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_OVERWRITE_CHANNELS, param_spec); /** * AgsOpenFile:create-channels: * * As open files create #AgsChannel. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("create-channels", i18n_pspec("open file creating channels"), i18n_pspec("Do create channels as open files"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CREATE_CHANNELS, param_spec); /* AgsTask */ task = (AgsTaskClass *) open_file; task->launch = ags_open_file_launch; } void ags_open_file_connectable_interface_init(AgsConnectableInterface *connectable) { ags_open_file_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_open_file_connect; connectable->disconnect = ags_open_file_disconnect; } void ags_open_file_init(AgsOpenFile *open_file) { open_file->audio = NULL; open_file->filenames = NULL; open_file->overwrite_channels = FALSE; open_file->create_channels = FALSE; } void ags_open_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsOpenFile *open_file; open_file = AGS_OPEN_FILE(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(open_file->audio == (GObject *) audio){ return; } if(open_file->audio != NULL){ g_object_unref(open_file->audio); } if(audio != NULL){ g_object_ref(audio); } open_file->audio = (GObject *) audio; } break; case PROP_FILENAMES: { GSList *filenames; filenames = g_value_get_pointer(value); if(open_file->filenames == filenames){ return; } if(open_file->filenames != NULL){ g_slist_free(open_file->filenames); } open_file->filenames = g_slist_copy(filenames); } break; case PROP_OVERWRITE_CHANNELS: { open_file->overwrite_channels = g_value_get_boolean(value); } break; case PROP_CREATE_CHANNELS: { open_file->create_channels = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_open_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsOpenFile *open_file; open_file = AGS_OPEN_FILE(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, open_file->audio); } break; case PROP_FILENAMES: { g_value_set_pointer(value, g_slist_copy(open_file->filenames)); } break; case PROP_OVERWRITE_CHANNELS: { g_value_set_boolean(value, open_file->overwrite_channels); } break; case PROP_CREATE_CHANNELS: { g_value_set_boolean(value, open_file->create_channels); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_open_file_connect(AgsConnectable *connectable) { ags_open_file_parent_connectable_interface->connect(connectable); /* empty */ } void ags_open_file_disconnect(AgsConnectable *connectable) { ags_open_file_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_open_file_dispose(GObject *gobject) { AgsOpenFile *open_file; open_file = AGS_OPEN_FILE(gobject); if(open_file->audio != NULL){ g_object_unref(open_file->audio); open_file->audio = NULL; } if(open_file->filenames != NULL){ g_slist_free(open_file->filenames); open_file->filenames = NULL; } /* call parent */ G_OBJECT_CLASS(ags_open_file_parent_class)->dispose(gobject); } void ags_open_file_finalize(GObject *gobject) { AgsOpenFile *open_file; open_file = AGS_OPEN_FILE(gobject); if(open_file->audio != NULL){ g_object_unref(open_file->audio); } if(open_file->filenames != NULL){ g_slist_free(open_file->filenames); } /* call parent */ G_OBJECT_CLASS(ags_open_file_parent_class)->finalize(gobject); } void ags_open_file_launch(AgsTask *task) { AgsAudio *audio; AgsChannel *channel, *iter, *next_pad; AgsChannel *link; AgsRecycling *first_recycling; AgsAudioFile *audio_file; AgsOpenFile *open_file; AgsMutexManager *mutex_manager; AgsFileLink *file_link; GObject *soundcard; GSList *current; GList *audio_signal; gchar *current_filename; guint input_pads, pads_old; guint i, i_stop; guint j; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *iter_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); open_file = AGS_OPEN_FILE(task); audio = open_file->audio; current = open_file->filenames; i_stop = 0; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); input_pads = audio->input_pads; pads_old = audio->input_pads; if(open_file->overwrite_channels){ channel = audio->input; i_stop = audio->input_pads; } pthread_mutex_unlock(audio_mutex); /* */ if(open_file->create_channels){ GList *list; i_stop = g_slist_length(open_file->filenames); if(open_file->overwrite_channels){ if(i_stop > input_pads){ ags_audio_set_pads(audio, AGS_TYPE_INPUT, i_stop); } /* get some fields */ pthread_mutex_lock(audio_mutex); channel = audio->input; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); }else{ ags_audio_set_pads(audio, AGS_TYPE_INPUT, audio->input_pads + i_stop); /* get some fields */ pthread_mutex_lock(audio_mutex); channel = audio->input; input_pads = audio->input_pads; pthread_mutex_unlock(audio_mutex); /* reset channel */ channel = ags_channel_pad_nth(channel, pads_old); } iter = ags_channel_pad_nth(audio->input, pads_old); while(iter != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); iter_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) iter); pthread_mutex_unlock(application_mutex); /* connect */ pthread_mutex_lock(iter_mutex); ags_connectable_connect(AGS_CONNECTABLE(iter)); iter = iter->next; pthread_mutex_unlock(iter_mutex); } } for(i = 0; i < i_stop && current != NULL; i++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); soundcard = channel->soundcard; next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); /* audio file */ current_filename = (gchar *) current->data; audio_file = ags_audio_file_new((gchar *) current_filename, soundcard, 0, open_file->audio->audio_channels); if(!ags_audio_file_open(audio_file)){ g_message("unable to open file - %s", current_filename); current = current->next; continue; } ags_audio_file_read_audio_signal(audio_file); iter = channel; audio_signal = audio_file->audio_signal; j = 0; /* connect */ while(iter != next_pad && audio_signal != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); iter_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) iter); pthread_mutex_unlock(application_mutex); /* set link */ pthread_mutex_lock(iter_mutex); link = iter->link; pthread_mutex_unlock(iter_mutex); if(link != NULL){ error = NULL; ags_channel_set_link(iter, NULL, &error); if(error != NULL){ g_warning("%s", error->message); } } /* file link */ if(AGS_IS_INPUT(iter)){ pthread_mutex_lock(iter_mutex); file_link = AGS_INPUT(iter)->file_link; if(file_link == NULL){ file_link = g_object_new(AGS_TYPE_AUDIO_FILE_LINK, NULL); g_object_set(G_OBJECT(iter), "file-link", file_link, NULL); } g_object_set(file_link, "filename", current_filename, "preset", NULL, "instrument", NULL, "sample", NULL, "audio-channel", j, NULL); pthread_mutex_unlock(iter_mutex); } /* add as template */ pthread_mutex_lock(iter_mutex); first_recycling = iter->first_recycling; pthread_mutex_unlock(iter_mutex); AGS_AUDIO_SIGNAL(audio_signal->data)->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, AGS_AUDIO_SIGNAL(audio_signal->data)); /* iterate - audio channel and audio signal*/ pthread_mutex_lock(iter_mutex); iter = iter->next; pthread_mutex_unlock(iter_mutex); audio_signal = audio_signal->next; j++; } /* iterate - pad and filename */ pthread_mutex_lock(channel_mutex); channel = channel->next_pad; pthread_mutex_unlock(channel_mutex); current = current->next; } } /** * ags_open_file_new: * @audio: the #AgsAudio * @filenames: the filenames to be opened * @overwrite_channels: reset existing #AgsInput * @create_channels: inistantiate new #AgsInput, if @overwrite_channell as needed * else for sure * * Creates an #AgsOpenFile. * * Returns: an new #AgsOpenFile. * * Since: 1.0.0 */ AgsOpenFile* ags_open_file_new(AgsAudio *audio, GSList *filenames, gboolean overwrite_channels, gboolean create_channels) { AgsOpenFile *open_file; open_file = (AgsOpenFile *) g_object_new(AGS_TYPE_OPEN_FILE, "audio", audio, "filenames", filenames, "overwrite-channels", overwrite_channels, "create-channels", create_channels, NULL); return(open_file); } gsequencer-1.4.24/ags/audio/task/ags_add_effect.h0000644000175000017500000000366513247044247016571 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_EFFECT_H__ #define __AGS_ADD_EFFECT_H__ #include #include #include #include #define AGS_TYPE_ADD_EFFECT (ags_add_effect_get_type()) #define AGS_ADD_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_EFFECT, AgsAddEffect)) #define AGS_ADD_EFFECT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_EFFECT, AgsAddEffectClass)) #define AGS_IS_ADD_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_EFFECT)) #define AGS_IS_ADD_EFFECT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_EFFECT)) #define AGS_ADD_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_EFFECT, AgsAddEffectClass)) typedef struct _AgsAddEffect AgsAddEffect; typedef struct _AgsAddEffectClass AgsAddEffectClass; struct _AgsAddEffect { AgsTask task; AgsChannel *channel; gchar *filename; gchar *effect; }; struct _AgsAddEffectClass { AgsTaskClass task; }; GType ags_add_effect_get_type(); AgsAddEffect* ags_add_effect_new(AgsChannel *channel, gchar *filename, gchar *effect); #endif /*__AGS_ADD_EFFECT_H__*/ gsequencer-1.4.24/ags/audio/task/ags_init_channel.c0000644000175000017500000005074613247044247017155 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include void ags_init_channel_class_init(AgsInitChannelClass *init_channel); void ags_init_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_init_channel_init(AgsInitChannel *init_channel); void ags_init_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_init_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_init_channel_connect(AgsConnectable *connectable); void ags_init_channel_disconnect(AgsConnectable *connectable); void ags_init_channel_dispose(GObject *gobject); void ags_init_channel_finalize(GObject *gobject); void ags_init_channel_launch(AgsTask *task); /** * SECTION:ags_init_channel * @short_description: init channel task * @title: AgsInitChannel * @section_id: * @include: ags/audio/task/ags_init_channel.h * * The #AgsInitChannel task inits #AgsChannel. */ static gpointer ags_init_channel_parent_class = NULL; static AgsConnectableInterface *ags_init_channel_parent_connectable_interface; enum{ PROP_0, PROP_CHANNEL, PROP_PLAY_PAD, PROP_DO_PLAYBACK, PROP_DO_SEQUENCER, PROP_DO_NOTATION, }; GType ags_init_channel_get_type() { static GType ags_type_init_channel = 0; if(!ags_type_init_channel){ static const GTypeInfo ags_init_channel_info = { sizeof (AgsInitChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_init_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsInitChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_init_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_init_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_init_channel = g_type_register_static(AGS_TYPE_TASK, "AgsInitChannel", &ags_init_channel_info, 0); g_type_add_interface_static(ags_type_init_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_init_channel); } void ags_init_channel_class_init(AgsInitChannelClass *init_channel) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_init_channel_parent_class = g_type_class_peek_parent(init_channel); /* GObjectClass */ gobject = (GObjectClass *) init_channel; gobject->set_property = ags_init_channel_set_property; gobject->get_property = ags_init_channel_get_property; gobject->dispose = ags_init_channel_dispose; gobject->finalize = ags_init_channel_finalize; /* properties */ /** * AgsInitChannel:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", "channel of init channel", "The channel of init channel task", AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /** * AgsInitChannel:play-pad: * * Do play pad. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("play-pad", "play pad", "play pad of channel", FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAY_PAD, param_spec); /** * AgsInitChannel:do-playback: * * The effects do-playback. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-playback", "do playback", "Do playback of channel", FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_PLAYBACK, param_spec); /** * AgsInitChannel:do-sequencer: * * The effects do-sequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-sequencer", "do sequencer", "Do sequencer of channel", FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_SEQUENCER, param_spec); /** * AgsInitChannel:do-notation: * * The effects do-notation. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-notation", "do notation", "Do notation of channel", FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_NOTATION, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) init_channel; task->launch = ags_init_channel_launch; } void ags_init_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_init_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_init_channel_connect; connectable->disconnect = ags_init_channel_disconnect; } void ags_init_channel_init(AgsInitChannel *init_channel) { init_channel->channel = NULL; init_channel->play_pad = FALSE; init_channel->do_playback = FALSE; init_channel->do_sequencer = FALSE; init_channel->do_notation = FALSE; } void ags_init_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsInitChannel *init_channel; init_channel = AGS_INIT_CHANNEL(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(init_channel->channel == (GObject *) channel){ return; } if(init_channel->channel != NULL){ g_object_unref(init_channel->channel); } if(channel != NULL){ g_object_ref(channel); } init_channel->channel = (GObject *) channel; } break; case PROP_PLAY_PAD: { gboolean play_pad; play_pad = g_value_get_boolean(value); init_channel->play_pad = play_pad; } break; case PROP_DO_PLAYBACK: { gboolean do_playback; do_playback = g_value_get_boolean(value); init_channel->do_playback = do_playback; } break; case PROP_DO_SEQUENCER: { gboolean do_sequencer; do_sequencer = g_value_get_boolean(value); init_channel->do_sequencer = do_sequencer; } break; case PROP_DO_NOTATION: { gboolean do_notation; do_notation = g_value_get_boolean(value); init_channel->do_notation = do_notation; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_init_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsInitChannel *init_channel; init_channel = AGS_INIT_CHANNEL(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, init_channel->channel); } break; case PROP_PLAY_PAD: { g_value_set_boolean(value, init_channel->play_pad); } break; case PROP_DO_PLAYBACK: { g_value_set_boolean(value, init_channel->do_playback); } break; case PROP_DO_SEQUENCER: { g_value_set_boolean(value, init_channel->do_sequencer); } break; case PROP_DO_NOTATION: { g_value_set_boolean(value, init_channel->do_notation); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_init_channel_connect(AgsConnectable *connectable) { ags_init_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_init_channel_disconnect(AgsConnectable *connectable) { ags_init_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_init_channel_dispose(GObject *gobject) { AgsInitChannel *init_channel; init_channel = AGS_INIT_CHANNEL(gobject); if(init_channel->channel != NULL){ g_object_unref(init_channel->channel); init_channel->channel = NULL; } /* call parent */ G_OBJECT_CLASS(ags_init_channel_parent_class)->dispose(gobject); } void ags_init_channel_finalize(GObject *gobject) { AgsInitChannel *init_channel; init_channel = AGS_INIT_CHANNEL(gobject); if(init_channel->channel != NULL){ g_object_unref(init_channel->channel); } /* call parent */ G_OBJECT_CLASS(ags_init_channel_parent_class)->finalize(gobject); } void ags_init_channel_launch(AgsTask *task) { AgsAudio *audio; AgsChannel *channel, *current; AgsPlaybackDomain *playback_domain; AgsPlayback *playback; AgsRecallID *recall_id; AgsInitChannel *init_channel; AgsMutexManager *mutex_manager; GList *list, *list_start; GList *start_queue; gint stage; guint nth_domain; gboolean arrange_recall_id, duplicate_templates, resolve_dependencies; gboolean init_playback, init_sequencer, init_notation; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *current_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); init_channel = AGS_INIT_CHANNEL(task); channel = init_channel->channel; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); playback_domain = (AgsPlaybackDomain *) audio->playback_domain; pthread_mutex_unlock(audio_mutex); list = NULL; list_start = NULL; start_queue = NULL; /* init channel */ init_playback = FALSE; init_sequencer = FALSE; init_notation = FALSE; if(init_channel->play_pad){ AgsChannel *next_pad; /* get some fields */ pthread_mutex_lock(channel_mutex); next_pad = channel->next_pad; pthread_mutex_unlock(channel_mutex); for(stage = 0; stage < 4; stage++){ current = channel; list = list_start; if(stage == 0){ arrange_recall_id = TRUE; duplicate_templates = TRUE; resolve_dependencies = TRUE; }else{ arrange_recall_id = FALSE; duplicate_templates = FALSE; resolve_dependencies = FALSE; if(list == NULL){ break; } } while(current != next_pad){ /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_mutex); playback = current->playback; pthread_mutex_unlock(current_mutex); if(stage == 0){ if(init_channel->do_playback && (AGS_PLAYBACK_PLAYBACK & (g_atomic_int_get(&(playback->flags)))) == 0){ /* recursive play init */ nth_domain = 0; init_playback = TRUE; g_atomic_int_or(&(playback->flags), AGS_PLAYBACK_PLAYBACK); recall_id = ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, TRUE, FALSE, FALSE, resolve_dependencies, NULL); list_start = g_list_append(list_start, recall_id); /* start queue */ pthread_mutex_lock(current_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_PLAYBACK] = recall_id; start_queue = g_list_prepend(start_queue, playback->channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK]); pthread_mutex_unlock(current_mutex); } if(init_channel->do_sequencer && (AGS_PLAYBACK_SEQUENCER & (g_atomic_int_get(&(playback->flags)))) == 0){ /* recursive play init */ nth_domain = 1; init_sequencer = TRUE; g_atomic_int_or(&(playback->flags), AGS_PLAYBACK_SEQUENCER); recall_id = ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, FALSE, TRUE, FALSE, resolve_dependencies, NULL); list_start = g_list_append(list_start, recall_id); /* start queue */ pthread_mutex_lock(current_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_SEQUENCER] = recall_id; start_queue = g_list_prepend(start_queue, playback->channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER]); pthread_mutex_unlock(current_mutex); } if(init_channel->do_notation && (AGS_PLAYBACK_NOTATION & (g_atomic_int_get(&(playback->flags)))) == 0){ nth_domain = 2; init_notation = TRUE; g_atomic_int_or(&(playback->flags), AGS_PLAYBACK_NOTATION); recall_id = ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, FALSE, FALSE, TRUE, resolve_dependencies, NULL); list_start = g_list_append(list_start, recall_id); /* start queue */ pthread_mutex_lock(current_mutex); AGS_PLAYBACK(current->playback)->recall_id[AGS_PLAYBACK_SCOPE_NOTATION] = recall_id; start_queue = g_list_prepend(start_queue, playback->channel_thread[AGS_PLAYBACK_SCOPE_NOTATION]); pthread_mutex_unlock(current_mutex); } }else{ if(init_channel->do_playback && init_playback){ nth_domain = 0; ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, TRUE, FALSE, FALSE, resolve_dependencies, AGS_RECALL_ID(list->data)); } if(init_channel->do_sequencer && init_sequencer){ nth_domain = 1; ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, FALSE, TRUE, FALSE, resolve_dependencies, AGS_RECALL_ID(list->data)); } if(init_channel->do_notation && init_notation){ nth_domain = 2; ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, FALSE, FALSE, TRUE, resolve_dependencies, AGS_RECALL_ID(list->data)); } list = list->next; } current = current->next; } } g_list_free(list_start); }else{ AgsRecallID *recall_id; for(stage = 0; stage < 4; stage++){ current = channel; /* get current mutex */ pthread_mutex_lock(application_mutex); current_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) current); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(current_mutex); playback = current->playback; pthread_mutex_unlock(current_mutex); /* set flags */ list = list_start; if(stage == 0){ arrange_recall_id = TRUE; duplicate_templates = TRUE; resolve_dependencies = TRUE; }else{ arrange_recall_id = FALSE; duplicate_templates = FALSE; resolve_dependencies = FALSE; if(list == NULL){ break; } } if(stage == 0){ recall_id = NULL; if(init_channel->do_playback && (AGS_PLAYBACK_PLAYBACK & (g_atomic_int_get(&(playback->flags)))) == 0 && playback->recall_id[0] == NULL){ /* recursive play init */ nth_domain = 0; init_playback = TRUE; g_atomic_int_or(&(playback->flags), AGS_PLAYBACK_PLAYBACK); recall_id = ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, TRUE, FALSE, FALSE, resolve_dependencies, NULL); list_start = g_list_append(list_start, recall_id); /* start queue */ pthread_mutex_lock(current_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_PLAYBACK] = recall_id; start_queue = g_list_prepend(start_queue, playback->channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK]); pthread_mutex_unlock(current_mutex); } if(init_channel->do_sequencer && (AGS_PLAYBACK_SEQUENCER & (g_atomic_int_get(&(playback->flags)))) == 0 && playback->recall_id[1] == NULL){ nth_domain = 1; init_sequencer = TRUE; g_atomic_int_or(&(playback->flags), AGS_PLAYBACK_SEQUENCER); recall_id = ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, FALSE, TRUE, FALSE, resolve_dependencies, NULL); list_start = g_list_append(list_start, recall_id); playback->recall_id[AGS_PLAYBACK_SCOPE_SEQUENCER] = recall_id; start_queue = g_list_prepend(start_queue, playback->channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER]); } if(init_channel->do_notation && (AGS_PLAYBACK_NOTATION & (g_atomic_int_get(&(playback->flags)))) == 0 && AGS_PLAYBACK(current->playback)->recall_id[0] == NULL){ nth_domain = 2; init_notation = TRUE; g_atomic_int_or(&(playback->flags), AGS_PLAYBACK_NOTATION); recall_id = ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, FALSE, FALSE, TRUE, resolve_dependencies, NULL); list_start = g_list_append(list_start, recall_id); /* start queue */ pthread_mutex_lock(current_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_NOTATION] = recall_id; start_queue = g_list_prepend(start_queue, playback->channel_thread[AGS_PLAYBACK_SCOPE_NOTATION]); pthread_mutex_unlock(current_mutex); } }else{ if(init_channel->do_playback && init_playback){ ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, TRUE, FALSE, FALSE, resolve_dependencies, AGS_RECALL_ID(list->data)); list = list->next; } if(init_channel->do_sequencer && init_sequencer){ ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, FALSE, TRUE, FALSE, resolve_dependencies, AGS_RECALL_ID(list->data)); list = list->next; } if(init_channel->do_notation && init_notation){ ags_channel_recursive_play_init(current, stage, arrange_recall_id, duplicate_templates, FALSE, FALSE, TRUE, resolve_dependencies, AGS_RECALL_ID(list->data)); list = list->next; } } } g_list_free(list_start); } /* */ if(start_queue != NULL){ if(g_atomic_pointer_get(&(AGS_THREAD(playback_domain->audio_thread[nth_domain])->start_queue)) != NULL){ g_atomic_pointer_set(&(AGS_THREAD(playback_domain->audio_thread[nth_domain])->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(AGS_THREAD(playback_domain->audio_thread[nth_domain])->start_queue)))); }else{ g_atomic_pointer_set(&(AGS_THREAD(playback_domain->audio_thread[nth_domain])->start_queue), start_queue); } } } /** * ags_init_channel_new: * @channel: the #AgsChannel * @play_pad: %TRUE all channels of accordig pad are initialized * @do_playback: init playback * @do_sequencer: init sequencer * @do_notation: init notation * * Creates an #AgsInitChannel. * * Returns: an new #AgsInitChannel. * * Since: 1.0.0 */ AgsInitChannel* ags_init_channel_new(AgsChannel *channel, gboolean play_pad, gboolean do_playback, gboolean do_sequencer, gboolean do_notation) { AgsInitChannel *init_channel; init_channel = (AgsInitChannel *) g_object_new(AGS_TYPE_INIT_CHANNEL, "channel", channel, "play-pad", play_pad, "do-playback", do_playback, "do-sequencer", do_sequencer, "do-notation", do_notation, NULL); return(init_channel); } gsequencer-1.4.24/ags/audio/task/ags_add_recall.c0000644000175000017500000003431413247044247016565 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_add_recall_class_init(AgsAddRecallClass *add_recall); void ags_add_recall_connectable_interface_init(AgsConnectableInterface *connectable); void ags_add_recall_init(AgsAddRecall *add_recall); void ags_add_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_add_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_add_recall_connect(AgsConnectable *connectable); void ags_add_recall_disconnect(AgsConnectable *connectable); void ags_add_recall_dispose(GObject *gobject); void ags_add_recall_finalize(GObject *gobject); void ags_add_recall_launch(AgsTask *task); enum{ PROP_0, PROP_CONTEXT, PROP_RECALL, PROP_IS_PLAY, }; /** * SECTION:ags_add_recall * @short_description: add recall object to context * @title: AgsAddRecall * @section_id: * @include: ags/audio/task/ags_add_recall.h * * The #AgsAddRecall task adds #AgsRecall to context. */ static gpointer ags_add_recall_parent_class = NULL; static AgsConnectableInterface *ags_add_recall_parent_connectable_interface; GType ags_add_recall_get_type() { static GType ags_type_add_recall = 0; if(!ags_type_add_recall){ static const GTypeInfo ags_add_recall_info = { sizeof (AgsAddRecallClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_add_recall_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAddRecall), 0, /* n_preallocs */ (GInstanceInitFunc) ags_add_recall_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_add_recall_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_add_recall = g_type_register_static(AGS_TYPE_TASK, "AgsAddRecall", &ags_add_recall_info, 0); g_type_add_interface_static(ags_type_add_recall, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_add_recall); } void ags_add_recall_class_init(AgsAddRecallClass *add_recall) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_add_recall_parent_class = g_type_class_peek_parent(add_recall); /* gobject */ gobject = (GObjectClass *) add_recall; gobject->set_property = ags_add_recall_set_property; gobject->get_property = ags_add_recall_get_property; gobject->dispose = ags_add_recall_dispose; gobject->finalize = ags_add_recall_finalize; /** * AgsAddRecall:context: * * The assigned context * * Since: 1.0.0 */ param_spec = g_param_spec_object("context", i18n_pspec("context of add recall"), i18n_pspec("The context of add recall task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CONTEXT, param_spec); /** * AgsAddRecall:recall: * * The assigned #AgsRecall * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall", i18n_pspec("recall of add recall"), i18n_pspec("The recall of add recall task"), AGS_TYPE_RECALL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL, param_spec); /** * AgsAddRecall:is-play: * * The recall's context is-play. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("is-play", i18n_pspec("is play context"), i18n_pspec("Add recall to play context"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_IS_PLAY, param_spec); /* task */ task = (AgsTaskClass *) add_recall; task->launch = ags_add_recall_launch; } void ags_add_recall_connectable_interface_init(AgsConnectableInterface *connectable) { ags_add_recall_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_add_recall_connect; connectable->disconnect = ags_add_recall_disconnect; } void ags_add_recall_init(AgsAddRecall *add_recall) { add_recall->context = NULL; add_recall->recall = NULL; add_recall->is_play = FALSE; } void ags_add_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAddRecall *add_recall; add_recall = AGS_ADD_RECALL(gobject); switch(prop_id){ case PROP_CONTEXT: { GObject *context; context = (GObject *) g_value_get_object(value); if(add_recall->context == (GObject *) context){ return; } if(add_recall->context != NULL){ g_object_unref(add_recall->context); } if(context != NULL){ g_object_ref(context); } add_recall->context = (GObject *) context; } break; case PROP_RECALL: { AgsRecall *recall; recall = (AgsRecall *) g_value_get_object(value); if(add_recall->recall == (GObject *) recall){ return; } if(add_recall->recall != NULL){ g_object_unref(add_recall->recall); } if(recall != NULL){ g_object_ref(recall); } add_recall->recall = (GObject *) recall; } break; case PROP_IS_PLAY: { add_recall->is_play = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAddRecall *add_recall; add_recall = AGS_ADD_RECALL(gobject); switch(prop_id){ case PROP_CONTEXT: { g_value_set_object(value, add_recall->context); } break; case PROP_RECALL: { g_value_set_object(value, add_recall->recall); } break; case PROP_IS_PLAY: { g_value_set_boolean(value, add_recall->is_play); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_add_recall_connect(AgsConnectable *connectable) { ags_add_recall_parent_connectable_interface->connect(connectable); /* empty */ } void ags_add_recall_disconnect(AgsConnectable *connectable) { ags_add_recall_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_add_recall_dispose(GObject *gobject) { AgsAddRecall *add_recall; add_recall = AGS_ADD_RECALL(gobject); if(add_recall->context != NULL){ g_object_unref(add_recall->context); add_recall->context = NULL; } if(add_recall->recall != NULL){ g_object_unref(add_recall->recall); add_recall->recall = NULL; } /* call parent */ G_OBJECT_CLASS(ags_add_recall_parent_class)->dispose(gobject); } void ags_add_recall_finalize(GObject *gobject) { AgsAddRecall *add_recall; add_recall = AGS_ADD_RECALL(gobject); if(add_recall->context != NULL){ g_object_unref(add_recall->context); } if(add_recall->recall != NULL){ g_object_unref(add_recall->recall); } /* call parent */ G_OBJECT_CLASS(ags_add_recall_parent_class)->finalize(gobject); } void ags_add_recall_launch(AgsTask *task) { AgsAddRecall *add_recall; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); add_recall = AGS_ADD_RECALL(task); if(AGS_IS_AUDIO(add_recall->context)){ AgsRecall *current; GList *recall_id; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) add_recall->context); pthread_mutex_unlock(application_mutex); /* check container */ if(g_list_find(AGS_AUDIO(add_recall->context)->container, add_recall->recall->container) == NULL){ ags_audio_add_recall_container(AGS_AUDIO(add_recall->context), add_recall->recall->container); } /* add */ ags_audio_add_recall(AGS_AUDIO(add_recall->context), (GObject *) add_recall->recall, add_recall->is_play); /* set up playback, sequencer or notation */ pthread_mutex_lock(audio_mutex); recall_id = AGS_AUDIO(add_recall->context)->recall_id; if(!AGS_IS_RECALL_AUDIO(add_recall->recall)){ while(recall_id != NULL){ if((!add_recall->is_play && AGS_RECALL_ID(recall_id->data)->recycling_context->parent == NULL) || (add_recall->is_play && AGS_RECALL_ID(recall_id->data)->recycling_context->parent != NULL)){ recall_id = recall_id->next; continue; } current = ags_recall_duplicate(add_recall->recall, recall_id->data); /* set appropriate flag */ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_PLAYBACK); }else if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_SEQUENCER); }else if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_NOTATION); } /* append to AgsAudio */ if(add_recall->is_play) AGS_AUDIO(add_recall->context)->play = g_list_append(AGS_AUDIO(add_recall->context)->play, current); else AGS_AUDIO(add_recall->context)->recall = g_list_append(AGS_AUDIO(add_recall->context)->recall, current); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(current)); /* notify run */ ags_recall_notify_dependency(current, AGS_RECALL_NOTIFY_RUN, 1); /* resolve */ ags_recall_resolve_dependencies(current); /* init */ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(current)); current->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(current); current->flags &= (~AGS_RECALL_REMOVE); ags_recall_run_init_inter(current); ags_recall_run_init_post(current); /* iterate */ recall_id = recall_id->next; } } pthread_mutex_unlock(audio_mutex); }else if(AGS_IS_CHANNEL(add_recall->context)){ AgsRecall *current; GList *recall_id; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) add_recall->context); pthread_mutex_unlock(application_mutex); /* check container */ if(g_list_find(AGS_CHANNEL(add_recall->context)->container, add_recall->recall->container) == NULL){ ags_channel_add_recall_container(AGS_CHANNEL(add_recall->context), add_recall->recall->container); } /* add */ ags_channel_add_recall(AGS_CHANNEL(add_recall->context), (GObject *) add_recall->recall, add_recall->is_play); /* set up playback, sequencer or notation */ pthread_mutex_lock(channel_mutex); recall_id = AGS_CHANNEL(add_recall->context)->recall_id; if(!AGS_IS_RECALL_CHANNEL(add_recall->recall)){ while(recall_id != NULL){ if((!add_recall->is_play && AGS_RECALL_ID(recall_id->data)->recycling_context->parent == NULL) || (add_recall->is_play && AGS_RECALL_ID(recall_id->data)->recycling_context->parent != NULL)){ recall_id = recall_id->next; continue; } current = ags_recall_duplicate(add_recall->recall, recall_id->data); /* set appropriate flag */ if((AGS_RECALL_ID_PLAYBACK & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_PLAYBACK); }else if((AGS_RECALL_ID_SEQUENCER & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_SEQUENCER); }else if((AGS_RECALL_ID_NOTATION & (AGS_RECALL_ID(recall_id->data)->flags)) != 0){ ags_recall_set_flags(current, AGS_RECALL_NOTATION); } /* append to AgsChannel */ if(add_recall->is_play) AGS_CHANNEL(add_recall->context)->play = g_list_append(AGS_CHANNEL(add_recall->context)->play, current); else AGS_CHANNEL(add_recall->context)->recall = g_list_append(AGS_CHANNEL(add_recall->context)->recall, current); /* connect */ ags_connectable_connect(AGS_CONNECTABLE(current)); /* notify run */ ags_recall_notify_dependency(current, AGS_RECALL_NOTIFY_RUN, 1); /* resolve */ ags_recall_resolve_dependencies(current); /* init */ ags_dynamic_connectable_connect_dynamic(AGS_DYNAMIC_CONNECTABLE(current)); current->flags &= (~AGS_RECALL_HIDE); ags_recall_run_init_pre(current); current->flags &= (~AGS_RECALL_REMOVE); ags_recall_run_init_inter(current); ags_recall_run_init_post(current); /* iterate */ recall_id = recall_id->next; } pthread_mutex_unlock(channel_mutex); } }else if(AGS_IS_RECALL(add_recall->context)){ ags_recall_add_child(AGS_RECALL(add_recall->context), add_recall->recall); } ags_connectable_connect(AGS_CONNECTABLE(add_recall->recall)); } /** * ags_add_recall_new: * @context: may be #AgsAudio, #AgsChannel or #AgsRecall * @recall: the #AgsRecall to add * @is_play: if %TRUE non-complex recall * * Creates an #AgsAddRecall. * * Returns: an new #AgsAddRecall. * * Since: 1.0.0 */ AgsAddRecall* ags_add_recall_new(GObject *context, AgsRecall *recall, gboolean is_play) { AgsAddRecall *add_recall; add_recall = (AgsAddRecall *) g_object_new(AGS_TYPE_ADD_RECALL, "context", context, "recall", recall, "is-play", is_play, NULL); return(add_recall); } gsequencer-1.4.24/ags/audio/task/ags_start_soundcard.h0000644000175000017500000000377013247044247017721 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_START_SOUNDCARD_H__ #define __AGS_START_SOUNDCARD_H__ #include #include #include #define AGS_TYPE_START_SOUNDCARD (ags_start_soundcard_get_type()) #define AGS_START_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_START_SOUNDCARD, AgsStartSoundcard)) #define AGS_START_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_START_SOUNDCARD, AgsStartSoundcardClass)) #define AGS_IS_START_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_START_SOUNDCARD)) #define AGS_IS_START_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_START_SOUNDCARD)) #define AGS_START_SOUNDCARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_START_SOUNDCARD, AgsStartSoundcardClass)) typedef struct _AgsStartSoundcard AgsStartSoundcard; typedef struct _AgsStartSoundcardClass AgsStartSoundcardClass; struct _AgsStartSoundcard { AgsTask task; AgsApplicationContext *application_context; }; struct _AgsStartSoundcardClass { AgsTaskClass task; }; GType ags_start_soundcard_get_type(); AgsStartSoundcard* ags_start_soundcard_new(AgsApplicationContext *application_context); #endif /*__AGS_START_SOUNDCARD_H__*/ gsequencer-1.4.24/ags/audio/task/ags_crop_note.h0000644000175000017500000000430213247044247016502 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CROP_NOTE_H__ #define __AGS_CROP_NOTE_H__ #include #include #include #include #include #define AGS_TYPE_CROP_NOTE (ags_crop_note_get_type()) #define AGS_CROP_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CROP_NOTE, AgsCropNote)) #define AGS_CROP_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CROP_NOTE, AgsCropNoteClass)) #define AGS_IS_CROP_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CROP_NOTE)) #define AGS_IS_CROP_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CROP_NOTE)) #define AGS_CROP_NOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CROP_NOTE, AgsCropNoteClass)) #define AGS_CROP_NOTE_DEFAULT_X_LENGTH (16 * 16 * 1200) typedef struct _AgsCropNote AgsCropNote; typedef struct _AgsCropNoteClass AgsCropNoteClass; struct _AgsCropNote { AgsTask task; AgsAudio *audio; AgsNotation *notation; GList *selection; guint x_padding; gint x_crop; gboolean absolute; gboolean in_place; gboolean do_resize; }; struct _AgsCropNoteClass { AgsTaskClass task; }; GType ags_crop_note_get_type(); AgsCropNote* ags_crop_note_new(AgsNotation *notation, GList *selection, guint x_padding, gint x_crop, gboolean absolute, gboolean in_place, gboolean do_resize); #endif /*__AGS_CROP_NOTE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_add_region_to_selection.h0000644000175000017500000000464713247044247021370 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_REGION_TO_SELECTION_H__ #define __AGS_ADD_REGION_TO_SELECTION_H__ #include #include #include #include #include #define AGS_TYPE_ADD_REGION_TO_SELECTION (ags_add_region_to_selection_get_type()) #define AGS_ADD_REGION_TO_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_REGION_TO_SELECTION, AgsAddRegionToSelection)) #define AGS_ADD_REGION_TO_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_REGION_TO_SELECTION, AgsAddRegionToSelectionClass)) #define AGS_IS_ADD_REGION_TO_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_REGION_TO_SELECTION)) #define AGS_IS_ADD_REGION_TO_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_REGION_TO_SELECTION)) #define AGS_ADD_REGION_TO_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_REGION_TO_SELECTION, AgsAddRegionToSelectionClass)) typedef struct _AgsAddRegionToSelection AgsAddRegionToSelection; typedef struct _AgsAddRegionToSelectionClass AgsAddRegionToSelectionClass; struct _AgsAddRegionToSelection { AgsTask task; AgsAudio *audio; AgsNotation *notation; guint x0; guint y0; guint x1; guint y1; gboolean replace_current_selection; }; struct _AgsAddRegionToSelectionClass { AgsTaskClass task; }; GType ags_add_region_to_selection_get_type(); AgsAddRegionToSelection* ags_add_region_to_selection_new(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1, gboolean replace_current_selection); #endif /*__AGS_ADD_REGION_TO_SELECTION_H__*/ gsequencer-1.4.24/ags/audio/task/ags_cancel_recall.c0000644000175000017500000002103713247044247017260 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_cancel_recall_class_init(AgsCancelRecallClass *cancel_recall); void ags_cancel_recall_connectable_interface_init(AgsConnectableInterface *connectable); void ags_cancel_recall_init(AgsCancelRecall *cancel_recall); void ags_cancel_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_cancel_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_cancel_recall_connect(AgsConnectable *connectable); void ags_cancel_recall_disconnect(AgsConnectable *connectable); void ags_cancel_recall_dispose(GObject *gobject); void ags_cancel_recall_finalize(GObject *gobject); void ags_cancel_recall_launch(AgsTask *task); /** * SECTION:ags_cancel_recall * @short_description: cancel recall object * @title: AgsCancelRecall * @section_id: * @include: ags/audio/task/ags_cancel_recall.h * * The #AgsCancelRecall task cancels #AgsRecall playback. */ static gpointer ags_cancel_recall_parent_class = NULL; static AgsConnectableInterface *ags_cancel_recall_parent_connectable_interface; enum{ PROP_0, PROP_RECALL, PROP_PLAYBACK, }; GType ags_cancel_recall_get_type() { static GType ags_type_cancel_recall = 0; if(!ags_type_cancel_recall){ static const GTypeInfo ags_cancel_recall_info = { sizeof (AgsCancelRecallClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_cancel_recall_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCancelRecall), 0, /* n_preallocs */ (GInstanceInitFunc) ags_cancel_recall_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_cancel_recall_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_cancel_recall = g_type_register_static(AGS_TYPE_TASK, "AgsCancelRecall", &ags_cancel_recall_info, 0); g_type_add_interface_static(ags_type_cancel_recall, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_cancel_recall); } void ags_cancel_recall_class_init(AgsCancelRecallClass *cancel_recall) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_cancel_recall_parent_class = g_type_class_peek_parent(cancel_recall); /* gobject */ gobject = (GObjectClass *) cancel_recall; gobject->set_property = ags_cancel_recall_set_property; gobject->get_property = ags_cancel_recall_get_property; gobject->dispose = ags_cancel_recall_dispose; gobject->finalize = ags_cancel_recall_finalize; /* properties */ /** * AgsCancelRecall:recall: * * The assigned #AgsRecall * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall", i18n_pspec("recall of cancel recall"), i18n_pspec("The recall of cancel recall task"), AGS_TYPE_RECALL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL, param_spec); /** * AgsCancelRecall:playback: * * The assigned #AgsPlayback * * Since: 1.0.0 */ param_spec = g_param_spec_object("playback", i18n_pspec("playback of cancel recall"), i18n_pspec("The playback of cancel recall task"), AGS_TYPE_PLAYBACK, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK, param_spec); /* task */ task = (AgsTaskClass *) cancel_recall; task->launch = ags_cancel_recall_launch; } void ags_cancel_recall_connectable_interface_init(AgsConnectableInterface *connectable) { ags_cancel_recall_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_cancel_recall_connect; connectable->disconnect = ags_cancel_recall_disconnect; } void ags_cancel_recall_init(AgsCancelRecall *cancel_recall) { cancel_recall->recall = NULL; cancel_recall->playback = NULL; } void ags_cancel_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCancelRecall *cancel_recall; cancel_recall = AGS_CANCEL_RECALL(gobject); switch(prop_id){ case PROP_RECALL: { AgsRecall *recall; recall = (AgsRecall *) g_value_get_object(value); if(cancel_recall->recall == (GObject *) recall){ return; } if(cancel_recall->recall != NULL){ g_object_unref(cancel_recall->recall); } if(recall != NULL){ g_object_ref(recall); } cancel_recall->recall = (GObject *) recall; } break; case PROP_PLAYBACK: { AgsPlayback *playback; playback = (AgsPlayback *) g_value_get_object(value); if(cancel_recall->playback == (GObject *) playback){ return; } if(cancel_recall->playback != NULL){ g_object_unref(cancel_recall->playback); } if(playback != NULL){ g_object_ref(playback); } cancel_recall->playback = (GObject *) playback; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_cancel_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCancelRecall *cancel_recall; cancel_recall = AGS_CANCEL_RECALL(gobject); switch(prop_id){ case PROP_RECALL: { g_value_set_object(value, cancel_recall->recall); } break; case PROP_PLAYBACK: { g_value_set_object(value, cancel_recall->playback); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_cancel_recall_connect(AgsConnectable *connectable) { ags_cancel_recall_parent_connectable_interface->connect(connectable); /* empty */ } void ags_cancel_recall_disconnect(AgsConnectable *connectable) { ags_cancel_recall_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_cancel_recall_dispose(GObject *gobject) { AgsCancelRecall *cancel_recall; cancel_recall = AGS_CANCEL_RECALL(gobject); if(cancel_recall->recall != NULL){ g_object_unref(cancel_recall->recall); cancel_recall->recall = NULL; } if(cancel_recall->playback != NULL){ g_object_unref(cancel_recall->playback); cancel_recall->playback = NULL; } /* call parent */ G_OBJECT_CLASS(ags_cancel_recall_parent_class)->dispose(gobject); } void ags_cancel_recall_finalize(GObject *gobject) { AgsCancelRecall *cancel_recall; cancel_recall = AGS_CANCEL_RECALL(gobject); if(cancel_recall->recall != NULL){ g_object_unref(cancel_recall->recall); } if(cancel_recall->playback != NULL){ g_object_unref(cancel_recall->playback); } /* call parent */ G_OBJECT_CLASS(ags_cancel_recall_parent_class)->finalize(gobject); } void ags_cancel_recall_launch(AgsTask *task) { AgsRecall *recall; AgsCancelRecall *cancel_recall; cancel_recall = AGS_CANCEL_RECALL(task); recall = cancel_recall->recall; recall->flags |= AGS_RECALL_REMOVE; /* cancel AgsRecall */ ags_recall_cancel(recall); /* set remove flag */ if(cancel_recall->playback != NULL){ g_atomic_int_or(&(cancel_recall->playback->flags), AGS_PLAYBACK_REMOVE); } } /** * ags_cancel_recall_new: * @recall: the #AgsRecall to cancel * @playback: the #AgsPlayback * * Creates an #AgsCancelRecall. * * Returns: an new #AgsCancelRecall. * * Since: 1.0.0 */ AgsCancelRecall* ags_cancel_recall_new(AgsRecall *recall, AgsPlayback *playback) { AgsCancelRecall *cancel_recall; cancel_recall = (AgsCancelRecall *) g_object_new(AGS_TYPE_CANCEL_RECALL, "recall", recall, "playback", playback, NULL); return(cancel_recall); } gsequencer-1.4.24/ags/audio/task/ags_remove_soundcard.h0000644000175000017500000000417013247044247020054 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REMOVE_SOUNDCARD_H__ #define __AGS_REMOVE_SOUNDCARD_H__ #include #include #include #include #define AGS_TYPE_REMOVE_SOUNDCARD (ags_remove_soundcard_get_type()) #define AGS_REMOVE_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_SOUNDCARD, AgsRemoveSoundcard)) #define AGS_REMOVE_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_SOUNDCARD, AgsRemoveSoundcardClass)) #define AGS_IS_REMOVE_SOUNDCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_SOUNDCARD)) #define AGS_IS_REMOVE_SOUNDCARD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_SOUNDCARD)) #define AGS_REMOVE_SOUNDCARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_SOUNDCARD, AgsRemoveSoundcardClass)) typedef struct _AgsRemoveSoundcard AgsRemoveSoundcard; typedef struct _AgsRemoveSoundcardClass AgsRemoveSoundcardClass; struct _AgsRemoveSoundcard { AgsTask task; AgsApplicationContext *application_context; GObject *soundcard; }; struct _AgsRemoveSoundcardClass { AgsTaskClass task; }; GType ags_remove_soundcard_get_type(); AgsRemoveSoundcard* ags_remove_soundcard_new(AgsApplicationContext *application_context, GObject *soundcard); #endif /*__AGS_REMOVE_SOUNDCARD_H__*/ gsequencer-1.4.24/ags/audio/task/ags_change_soundcard.c0000644000175000017500000003354713247044247020011 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include void ags_change_soundcard_class_init(AgsChangeSoundcardClass *change_soundcard); void ags_change_soundcard_connectable_interface_init(AgsConnectableInterface *connectable); void ags_change_soundcard_init(AgsChangeSoundcard *change_soundcard); void ags_change_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_change_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_change_soundcard_connect(AgsConnectable *connectable); void ags_change_soundcard_disconnect(AgsConnectable *connectable); void ags_change_soundcard_dispose(GObject *gobject); void ags_change_soundcard_finalize(GObject *gobject); void ags_change_soundcard_launch(AgsTask *task); /** * SECTION:ags_change_soundcard * @short_description: change soundcard * @title: AgsChangeSoundcard * @section_id: * @include: ags/audio/task/ags_change_soundcard.h * * The #AgsChangeSoundcard task change the specified soundcard. */ static gpointer ags_change_soundcard_parent_class = NULL; static AgsConnectableInterface *ags_change_soundcard_parent_connectable_interface; enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_NEW_SOUNDCARD, PROP_OLD_SOUNDCARD, }; GType ags_change_soundcard_get_type() { static GType ags_type_change_soundcard = 0; if(!ags_type_change_soundcard){ static const GTypeInfo ags_change_soundcard_info = { sizeof (AgsChangeSoundcardClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_change_soundcard_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsChangeSoundcard), 0, /* n_preallocs */ (GInstanceInitFunc) ags_change_soundcard_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_change_soundcard_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_change_soundcard = g_type_register_static(AGS_TYPE_TASK, "AgsChangeSoundcard", &ags_change_soundcard_info, 0); g_type_add_interface_static(ags_type_change_soundcard, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_change_soundcard); } void ags_change_soundcard_class_init(AgsChangeSoundcardClass *change_soundcard) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_change_soundcard_parent_class = g_type_class_peek_parent(change_soundcard); /* GObjectClass */ gobject = (GObjectClass *) change_soundcard; gobject->set_property = ags_change_soundcard_set_property; gobject->get_property = ags_change_soundcard_get_property; gobject->dispose = ags_change_soundcard_dispose; gobject->finalize = ags_change_soundcard_finalize; /* properties */ /** * AgsChangeSoundcard:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context of change soundcard"), i18n_pspec("The application context of change soundcard task"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsChangeSoundcard:new-soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("new-soundcard", i18n_pspec("new soundcard of change soundcard"), i18n_pspec("The new soundcard of change soundcard task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NEW_SOUNDCARD, param_spec); /** * AgsChangeSoundcard:old-soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("old-soundcard", i18n_pspec("old soundcard of change soundcard"), i18n_pspec("The old soundcard of change soundcard task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_OLD_SOUNDCARD, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) change_soundcard; task->launch = ags_change_soundcard_launch; } void ags_change_soundcard_connectable_interface_init(AgsConnectableInterface *connectable) { ags_change_soundcard_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_change_soundcard_connect; connectable->disconnect = ags_change_soundcard_disconnect; } void ags_change_soundcard_init(AgsChangeSoundcard *change_soundcard) { change_soundcard->application_context = NULL; change_soundcard->new_soundcard = NULL; change_soundcard->old_soundcard = NULL; } void ags_change_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsChangeSoundcard *change_soundcard; change_soundcard = AGS_CHANGE_SOUNDCARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(change_soundcard->application_context == (GObject *) application_context){ return; } if(change_soundcard->application_context != NULL){ g_object_unref(change_soundcard->application_context); } if(application_context != NULL){ g_object_ref(application_context); } change_soundcard->application_context = (GObject *) application_context; } break; case PROP_NEW_SOUNDCARD: { GObject *new_soundcard; new_soundcard = (GObject *) g_value_get_object(value); if(change_soundcard->new_soundcard == (GObject *) new_soundcard){ return; } if(change_soundcard->new_soundcard != NULL){ g_object_unref(change_soundcard->new_soundcard); } if(new_soundcard != NULL){ g_object_ref(new_soundcard); } change_soundcard->new_soundcard = (GObject *) new_soundcard; } break; case PROP_OLD_SOUNDCARD: { GObject *old_soundcard; old_soundcard = (GObject *) g_value_get_object(value); if(change_soundcard->old_soundcard == (GObject *) old_soundcard){ return; } if(change_soundcard->old_soundcard != NULL){ g_object_unref(change_soundcard->old_soundcard); } if(old_soundcard != NULL){ g_object_ref(old_soundcard); } change_soundcard->old_soundcard = (GObject *) old_soundcard; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_change_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsChangeSoundcard *change_soundcard; change_soundcard = AGS_CHANGE_SOUNDCARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, change_soundcard->application_context); } break; case PROP_NEW_SOUNDCARD: { g_value_set_object(value, change_soundcard->new_soundcard); } break; case PROP_OLD_SOUNDCARD: { g_value_set_object(value, change_soundcard->old_soundcard); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_change_soundcard_connect(AgsConnectable *connectable) { ags_change_soundcard_parent_connectable_interface->connect(connectable); /* empty */ } void ags_change_soundcard_disconnect(AgsConnectable *connectable) { ags_change_soundcard_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_change_soundcard_dispose(GObject *gobject) { AgsChangeSoundcard *change_soundcard; change_soundcard = AGS_CHANGE_SOUNDCARD(gobject); if(change_soundcard->application_context != NULL){ g_object_unref(change_soundcard->application_context); change_soundcard->application_context = NULL; } if(change_soundcard->new_soundcard != NULL){ g_object_unref(change_soundcard->new_soundcard); change_soundcard->new_soundcard = NULL; } if(change_soundcard->old_soundcard != NULL){ g_object_unref(change_soundcard->old_soundcard); change_soundcard->old_soundcard = NULL; } /* call parent */ G_OBJECT_CLASS(ags_change_soundcard_parent_class)->dispose(gobject); } void ags_change_soundcard_finalize(GObject *gobject) { AgsChangeSoundcard *change_soundcard; change_soundcard = AGS_CHANGE_SOUNDCARD(gobject); if(change_soundcard->application_context != NULL){ g_object_unref(change_soundcard->application_context); } if(change_soundcard->new_soundcard != NULL){ g_object_unref(change_soundcard->new_soundcard); } if(change_soundcard->old_soundcard != NULL){ g_object_unref(change_soundcard->old_soundcard); } /* call parent */ G_OBJECT_CLASS(ags_change_soundcard_parent_class)->finalize(gobject); } void ags_change_soundcard_launch(AgsTask *task) { AgsChangeSoundcard *change_soundcard; AgsAudioConnection *audio_connection; AgsMutexManager *mutex_manager; AgsConnectionManager *connection_manager; GObject *new_soundcard, *old_soundcard; GType soundcard_type; GParameter *parameter; GList *old_audio, *new_audio; GList *list_start, *list; pthread_mutex_t *application_mutex; pthread_mutex_t *new_soundcard_mutex; pthread_mutex_t *old_soundcard_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); change_soundcard = AGS_CHANGE_SOUNDCARD(task); connection_manager = ags_connection_manager_get_instance(); new_soundcard = change_soundcard->new_soundcard; old_soundcard = change_soundcard->old_soundcard; /* get new/old soundcard mutex */ pthread_mutex_lock(application_mutex); new_soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) new_soundcard); old_soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) old_soundcard); pthread_mutex_unlock(application_mutex); /* get connection */ list_start = list = ags_connection_manager_get_connection(connection_manager); soundcard_type = G_OBJECT_TYPE(old_soundcard); /* get new audio */ pthread_mutex_lock(new_soundcard_mutex); new_audio = ags_soundcard_get_audio(AGS_SOUNDCARD(new_soundcard)); pthread_mutex_unlock(new_soundcard_mutex); /* get old audio */ pthread_mutex_lock(old_soundcard_mutex); old_audio = ags_soundcard_get_audio(AGS_SOUNDCARD(old_soundcard)); pthread_mutex_unlock(old_soundcard_mutex); /* set old NULL */ pthread_mutex_lock(old_soundcard_mutex); ags_soundcard_set_audio(AGS_SOUNDCARD(old_soundcard), NULL); pthread_mutex_unlock(old_soundcard_mutex); /* concat new */ if(old_audio != NULL){ pthread_mutex_lock(new_soundcard_mutex); if(new_audio != NULL){ ags_soundcard_set_audio(AGS_SOUNDCARD(new_soundcard), g_list_concat(old_audio, new_audio)); }else{ ags_soundcard_set_audio(AGS_SOUNDCARD(new_soundcard), old_audio); } pthread_mutex_lock(new_soundcard_mutex); } /* reset soundcard */ parameter = (GParameter *) g_new0(GParameter, 1); parameter[0].name = "soundcard"; g_value_init(&(parameter[0].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[0].value), new_soundcard); while(old_audio != NULL){ ags_audio_recursive_set_property(old_audio->data, parameter, 1); old_audio = old_audio->next; } /* reset audio connection */ while((list = ags_connection_find_type_and_data_object_type(list, AGS_TYPE_AUDIO_CONNECTION, soundcard_type)) != NULL){ GObject *data_object; audio_connection = AGS_AUDIO_CONNECTION(list->data); pthread_mutex_lock(AGS_CONNECTION(audio_connection)->mutex); g_object_get(G_OBJECT(audio_connection), "data-object", &data_object, NULL); if(AGS_IS_SOUNDCARD(data_object) && data_object == old_soundcard){ g_object_set(audio_connection, "data-object", new_soundcard, NULL); } pthread_mutex_unlock(AGS_CONNECTION(audio_connection)->mutex); list = list->next; } g_list_free(list_start); } /** * ags_change_soundcard_new: * @application_context: the #AgsApplicationContext * @new_soundcard: the #AgsSoundcard to set * @old_soundcard: the #AgsSoundcard to unset * * Creates an #AgsChangeSoundcard. * * Returns: an new #AgsChangeSoundcard. * * Since: 1.0.0 */ AgsChangeSoundcard* ags_change_soundcard_new(AgsApplicationContext *application_context, GObject *new_soundcard, GObject *old_soundcard) { AgsChangeSoundcard *change_soundcard; change_soundcard = (AgsChangeSoundcard *) g_object_new(AGS_TYPE_CHANGE_SOUNDCARD, "application-context", application_context, "new-soundcard", new_soundcard, "old-soundcard", old_soundcard, NULL); return(change_soundcard); } gsequencer-1.4.24/ags/audio/task/ags_apply_synth.h0000644000175000017500000000554713247044247017100 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_APPLY_SYNTH_H__ #define __AGS_APPLY_SYNTH_H__ #include #include #include #include #define AGS_TYPE_APPLY_SYNTH (ags_apply_synth_get_type()) #define AGS_APPLY_SYNTH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_APPLY_SYNTH, AgsApplySynth)) #define AGS_APPLY_SYNTH_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_APPLY_SYNTH, AgsApplySynthClass)) #define AGS_IS_APPLY_SYNTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_APPLY_SYNTH)) #define AGS_IS_APPLY_SYNTH_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_APPLY_SYNTH)) #define AGS_APPLY_SYNTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_APPLY_SYNTH, AgsApplySynthClass)) typedef struct _AgsApplySynth AgsApplySynth; typedef struct _AgsApplySynthClass AgsApplySynthClass; /** * AgsApplySynthWave: * @AGS_APPLY_SYNTH_INVALID: invalid * @AGS_APPLY_SYNTH_SIN: sin wave * @AGS_APPLY_SYNTH_SAW: sawtooth wave * @AGS_APPLY_SYNTH_SQUARE: square * @AGS_APPLY_SYNTH_TRIANGLE: triangle wave * * Specify the wave of the synth to apply */ typedef enum{ AGS_APPLY_SYNTH_INVALID, AGS_APPLY_SYNTH_SIN, AGS_APPLY_SYNTH_SAW, AGS_APPLY_SYNTH_SQUARE, AGS_APPLY_SYNTH_TRIANGLE, }AgsApplySynthWave; struct _AgsApplySynth { AgsTask task; AgsChannel *start_channel; guint count; gboolean fixed_length; guint wave; gdouble base_note; gdouble frequency; gdouble volume; gdouble phase; gdouble start_frequency; gdouble delay; guint attack; guint frame_count; guint loop_start; guint loop_end; gboolean do_sync; guint sync_mode; AgsComplex **sync_point; guint sync_point_count; }; struct _AgsApplySynthClass { AgsTaskClass task; }; GType ags_apply_synth_get_type(); AgsApplySynth* ags_apply_synth_new(AgsChannel *start_channel, guint count, guint wave, guint attack, guint frame_count, gdouble frequency, gdouble phase, gdouble start_frequency, gdouble volume, guint loop_start, guint loop_end); #endif /*__AGS_APPLY_SYNTH_H__*/ gsequencer-1.4.24/ags/audio/task/ags_cancel_channel.c0000644000175000017500000003164013247044247017427 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include void ags_cancel_channel_class_init(AgsCancelChannelClass *cancel_channel); void ags_cancel_channel_connectable_interface_init(AgsConnectableInterface *connectable); void ags_cancel_channel_init(AgsCancelChannel *cancel_channel); void ags_cancel_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_cancel_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_cancel_channel_connect(AgsConnectable *connectable); void ags_cancel_channel_disconnect(AgsConnectable *connectable); void ags_cancel_channel_dispose(GObject *gobject); void ags_cancel_channel_finalize(GObject *gobject); void ags_cancel_channel_launch(AgsTask *task); /** * SECTION:ags_cancel_channel * @short_description: cancel channel task * @title: AgsCancelChannel * @section_id: * @include: ags/audio/task/ags_cancel_channel.h * * The #AgsCancelChannel task cancels #AgsChannel playback. */ static gpointer ags_cancel_channel_parent_class = NULL; static AgsConnectableInterface *ags_cancel_channel_parent_connectable_interface; enum{ PROP_0, PROP_CHANNEL, PROP_RECALL_ID, PROP_PLAYBACK, }; GType ags_cancel_channel_get_type() { static GType ags_type_cancel_channel = 0; if(!ags_type_cancel_channel){ static const GTypeInfo ags_cancel_channel_info = { sizeof (AgsCancelChannelClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_cancel_channel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsCancelChannel), 0, /* n_preallocs */ (GInstanceInitFunc) ags_cancel_channel_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_cancel_channel_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_cancel_channel = g_type_register_static(AGS_TYPE_TASK, "AgsCancelChannel", &ags_cancel_channel_info, 0); g_type_add_interface_static(ags_type_cancel_channel, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_cancel_channel); } void ags_cancel_channel_class_init(AgsCancelChannelClass *cancel_channel) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_cancel_channel_parent_class = g_type_class_peek_parent(cancel_channel); /* gobject */ gobject = (GObjectClass *) cancel_channel; gobject->set_property = ags_cancel_channel_set_property; gobject->get_property = ags_cancel_channel_get_property; gobject->dispose = ags_cancel_channel_dispose; gobject->finalize = ags_cancel_channel_finalize; /* properties */ /** * AgsCancelChannel:channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("channel", i18n_pspec("channel of cancel channel"), i18n_pspec("The channel of cancel channel task"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL, param_spec); /** * AgsCancelChannel:recall-id: * * The assigned #AgsRecallID * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall-id", i18n_pspec("recall id of cancel channel"), i18n_pspec("The recall id of cancel channel task"), AGS_TYPE_RECALL_ID, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_ID, param_spec); /** * AgsCancelChannel:playback: * * The assigned #AgsPlayback * * Since: 1.0.0 */ param_spec = g_param_spec_object("playback", i18n_pspec("playback of cancel channel"), i18n_pspec("The playback of cancel channel task"), AGS_TYPE_PLAYBACK, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK, param_spec); /* task */ task = (AgsTaskClass *) cancel_channel; task->launch = ags_cancel_channel_launch; } void ags_cancel_channel_connectable_interface_init(AgsConnectableInterface *connectable) { ags_cancel_channel_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_cancel_channel_connect; connectable->disconnect = ags_cancel_channel_disconnect; } void ags_cancel_channel_init(AgsCancelChannel *cancel_channel) { cancel_channel->channel = NULL; cancel_channel->recall_id = NULL; cancel_channel->playback = NULL; } void ags_cancel_channel_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsCancelChannel *cancel_channel; cancel_channel = AGS_CANCEL_CHANNEL(gobject); switch(prop_id){ case PROP_CHANNEL: { AgsChannel *channel; channel = (AgsChannel *) g_value_get_object(value); if(cancel_channel->channel == (GObject *) channel){ return; } if(cancel_channel->channel != NULL){ g_object_unref(cancel_channel->channel); } if(channel != NULL){ g_object_ref(channel); } cancel_channel->channel = (GObject *) channel; } break; case PROP_RECALL_ID: { AgsRecallID *recall_id; recall_id = (AgsRecallID *) g_value_get_object(value); if(cancel_channel->recall_id == (GObject *) recall_id){ return; } if(cancel_channel->recall_id != NULL){ g_object_unref(cancel_channel->recall_id); } if(recall_id != NULL){ g_object_ref(recall_id); } cancel_channel->recall_id = (GObject *) recall_id; } break; case PROP_PLAYBACK: { AgsPlayback *playback; playback = (AgsPlayback *) g_value_get_object(value); if(cancel_channel->playback == (GObject *) playback){ return; } if(cancel_channel->playback != NULL){ g_object_unref(cancel_channel->playback); } if(playback != NULL){ g_object_ref(playback); } cancel_channel->playback = (GObject *) playback; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_cancel_channel_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsCancelChannel *cancel_channel; cancel_channel = AGS_CANCEL_CHANNEL(gobject); switch(prop_id){ case PROP_CHANNEL: { g_value_set_object(value, cancel_channel->channel); } break; case PROP_RECALL_ID: { g_value_set_object(value, cancel_channel->recall_id); } break; case PROP_PLAYBACK: { g_value_set_object(value, cancel_channel->playback); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_cancel_channel_connect(AgsConnectable *connectable) { ags_cancel_channel_parent_connectable_interface->connect(connectable); /* empty */ } void ags_cancel_channel_disconnect(AgsConnectable *connectable) { ags_cancel_channel_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_cancel_channel_dispose(GObject *gobject) { AgsCancelChannel *cancel_channel; cancel_channel = AGS_CANCEL_CHANNEL(gobject); if(cancel_channel->channel != NULL){ g_object_unref(cancel_channel->channel); cancel_channel->channel = NULL; } if(cancel_channel->recall_id != NULL){ g_object_unref(cancel_channel->recall_id); cancel_channel->recall_id = NULL; } if(cancel_channel->playback != NULL){ g_object_unref(cancel_channel->playback); cancel_channel->playback = NULL; } /* call parent */ G_OBJECT_CLASS(ags_cancel_channel_parent_class)->dispose(gobject); } void ags_cancel_channel_finalize(GObject *gobject) { AgsCancelChannel *cancel_channel; cancel_channel = AGS_CANCEL_CHANNEL(gobject); if(cancel_channel->channel != NULL){ g_object_unref(cancel_channel->channel); } if(cancel_channel->recall_id != NULL){ g_object_unref(cancel_channel->recall_id); } if(cancel_channel->playback != NULL){ g_object_unref(cancel_channel->playback); } /* call parent */ G_OBJECT_CLASS(ags_cancel_channel_parent_class)->finalize(gobject); } void ags_cancel_channel_launch(AgsTask *task) { AgsPlayback *playback; AgsChannel *channel; AgsRecallID *recall_id; AgsCancelChannel *cancel_channel; AgsChannelThread *channel_thread; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); cancel_channel = AGS_CANCEL_CHANNEL(task); channel = cancel_channel->channel; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); playback = AGS_PLAYBACK(channel->playback); recall_id = playback->recall_id[AGS_PLAYBACK_SCOPE_PLAYBACK]; channel_thread = playback->channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK]; pthread_mutex_unlock(channel_mutex); /* cancel playback */ if(cancel_channel->recall_id != NULL && cancel_channel->recall_id == recall_id){ g_atomic_int_and(&(playback->flags), (~AGS_PLAYBACK_PLAYBACK)); g_object_ref(recall_id); ags_channel_tillrecycling_cancel(channel, recall_id); pthread_mutex_lock(channel_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_PLAYBACK] = NULL; pthread_mutex_unlock(channel_mutex); if((AGS_PLAYBACK_SUPER_THREADED_CHANNEL & (g_atomic_int_get(&(playback->flags)))) != 0){ ags_thread_stop(channel_thread); } } /* cancel sequencer */ pthread_mutex_lock(channel_mutex); recall_id = playback->recall_id[AGS_PLAYBACK_SCOPE_SEQUENCER]; channel_thread = playback->channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER]; pthread_mutex_unlock(channel_mutex); if(cancel_channel->recall_id != NULL && cancel_channel->recall_id == recall_id){ g_atomic_int_and(&(playback->flags), (~AGS_PLAYBACK_SEQUENCER)); g_object_ref(recall_id); ags_channel_tillrecycling_cancel(channel, recall_id); pthread_mutex_lock(channel_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_SEQUENCER] = NULL; pthread_mutex_unlock(channel_mutex); if((AGS_PLAYBACK_SUPER_THREADED_CHANNEL & (g_atomic_int_get(&(playback->flags)))) != 0){ ags_thread_stop(channel_thread); } } /* cancel notation */ pthread_mutex_lock(channel_mutex); recall_id = playback->recall_id[AGS_PLAYBACK_SCOPE_NOTATION]; channel_thread = playback->channel_thread[AGS_PLAYBACK_SCOPE_NOTATION]; pthread_mutex_unlock(channel_mutex); if(cancel_channel->recall_id != NULL && cancel_channel->recall_id == recall_id){ g_atomic_int_and(&(playback->flags), (~AGS_PLAYBACK_NOTATION)); g_object_ref(recall_id); ags_channel_tillrecycling_cancel(channel, recall_id); pthread_mutex_lock(channel_mutex); playback->recall_id[AGS_PLAYBACK_SCOPE_NOTATION] = NULL; pthread_mutex_unlock(channel_mutex); if((AGS_PLAYBACK_SUPER_THREADED_CHANNEL & (g_atomic_int_get(&(playback->flags)))) != 0){ ags_thread_stop(channel_thread); } } ags_channel_done(channel, cancel_channel->recall_id); } /** * ags_cancel_channel_new: * @channel: the #AgsChannel to cancel * @recall_id: the #AgsRecallID to cancel * @playback: the #AgsPlayback * * Creates an #AgsCancelChannel. * * Returns: an new #AgsCancelChannel. * * Since: 1.0.0 */ AgsCancelChannel* ags_cancel_channel_new(AgsChannel *channel, AgsRecallID *recall_id, GObject *playback) { AgsCancelChannel *cancel_channel; cancel_channel = (AgsCancelChannel *) g_object_new(AGS_TYPE_CANCEL_CHANNEL, "channel", channel, "recall-id", recall_id, "playback", playback, NULL); return(cancel_channel); } gsequencer-1.4.24/ags/audio/task/ags_reset_audio_connection.c0000644000175000017500000003734113247044247021240 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include void ags_reset_audio_connection_class_init(AgsResetAudioConnectionClass *reset_audio_connection); void ags_reset_audio_connection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_reset_audio_connection_init(AgsResetAudioConnection *reset_audio_connection); void ags_reset_audio_connection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_reset_audio_connection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_reset_audio_connection_connect(AgsConnectable *connectable); void ags_reset_audio_connection_disconnect(AgsConnectable *connectable); void ags_reset_audio_connection_dispose(GObject *gobject); void ags_reset_audio_connection_finalize(GObject *gobject); void ags_reset_audio_connection_launch(AgsTask *task); /** * SECTION:ags_reset_audio_connection * @short_description: reset audio connection task * @title: AgsResetAudioConnection * @section_id: * @include: ags/audio/task/ags_reset_audio_connection.h * * The #AgsResetAudioConnection resets audio connection. */ static gpointer ags_reset_audio_connection_parent_class = NULL; static AgsConnectableInterface *ags_reset_audio_connection_parent_connectable_interface; enum{ PROP_0, PROP_SOUNDCARD, PROP_AUDIO, PROP_CHANNEL_TYPE, PROP_PAD, PROP_AUDIO_CHANNEL, PROP_MAPPED_LINE, }; GType ags_reset_audio_connection_get_type() { static GType ags_type_reset_audio_connection = 0; if(!ags_type_reset_audio_connection){ static const GTypeInfo ags_reset_audio_connection_info = { sizeof (AgsResetAudioConnectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_reset_audio_connection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsResetAudioConnection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_reset_audio_connection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_reset_audio_connection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_reset_audio_connection = g_type_register_static(AGS_TYPE_TASK, "AgsResetAudioConnection", &ags_reset_audio_connection_info, 0); g_type_add_interface_static(ags_type_reset_audio_connection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_reset_audio_connection); } void ags_reset_audio_connection_class_init(AgsResetAudioConnectionClass *reset_audio_connection) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_reset_audio_connection_parent_class = g_type_class_peek_parent(reset_audio_connection); /* gobject */ gobject = (GObjectClass *) reset_audio_connection; gobject->set_property = ags_reset_audio_connection_set_property; gobject->get_property = ags_reset_audio_connection_get_property; gobject->dispose = ags_reset_audio_connection_dispose; gobject->finalize = ags_reset_audio_connection_finalize; /* properties */ /** * AgsResetAudioConnection:soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of reset audio connection"), i18n_pspec("The soundcard of reset audio connection task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsResetAudioConnection:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of reset audio connection"), i18n_pspec("The audio of reset audio connection task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsResetAudioConnection:channel-type: * * The connection's channel type. * * Since: 1.0.0 */ param_spec = g_param_spec_gtype("channel-type", i18n_pspec("channel type"), i18n_pspec("The channel type of connection"), G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL_TYPE, param_spec); /** * AgsResetAudioConnection:pad: * * The nth pad of audio. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("pad", i18n_pspec("nth pad"), i18n_pspec("The nth pad of audio"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PAD, param_spec); /** * AgsResetAudioConnection:audio-channel: * * The nth audio channel of audio. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channel", i18n_pspec("nth audio channel"), i18n_pspec("The nth audio channel of audio"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNEL, param_spec); /** * AgsResetAudioConnection:mapped-line: * * The nth mapped line of connection. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("mapped-line", i18n_pspec("nth mapped line"), i18n_pspec("The nth mapped line of connection"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_MAPPED_LINE, param_spec); /* task */ task = (AgsTaskClass *) reset_audio_connection; task->launch = ags_reset_audio_connection_launch; } void ags_reset_audio_connection_connectable_interface_init(AgsConnectableInterface *connectable) { ags_reset_audio_connection_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_reset_audio_connection_connect; connectable->disconnect = ags_reset_audio_connection_disconnect; } void ags_reset_audio_connection_init(AgsResetAudioConnection *reset_audio_connection) { reset_audio_connection->soundcard = NULL; reset_audio_connection->audio = NULL; reset_audio_connection->channel_type = G_TYPE_NONE; reset_audio_connection->pad = 0; reset_audio_connection->audio_channel = 0; reset_audio_connection->mapped_line = 0; } void ags_reset_audio_connection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsResetAudioConnection *reset_audio_connection; reset_audio_connection = AGS_RESET_AUDIO_CONNECTION(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(reset_audio_connection->soundcard == (GObject *) soundcard){ return; } if(reset_audio_connection->soundcard != NULL){ g_object_unref(reset_audio_connection->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } reset_audio_connection->soundcard = (GObject *) soundcard; } break; case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(reset_audio_connection->audio == (GObject *) audio){ return; } if(reset_audio_connection->audio != NULL){ g_object_unref(reset_audio_connection->audio); } if(audio != NULL){ g_object_ref(audio); } reset_audio_connection->audio = (GObject *) audio; } break; case PROP_CHANNEL_TYPE: { reset_audio_connection->channel_type = g_value_get_gtype(value); } break; case PROP_PAD: { reset_audio_connection->pad = g_value_get_uint(value); } break; case PROP_AUDIO_CHANNEL: { reset_audio_connection->audio_channel = g_value_get_uint(value); } break; case PROP_MAPPED_LINE: { reset_audio_connection->mapped_line = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_reset_audio_connection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsResetAudioConnection *reset_audio_connection; reset_audio_connection = AGS_RESET_AUDIO_CONNECTION(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, reset_audio_connection->soundcard); } break; case PROP_AUDIO: { g_value_set_object(value, reset_audio_connection->audio); } break; case PROP_CHANNEL_TYPE: { g_value_set_gtype(value, reset_audio_connection->channel_type); } break; case PROP_PAD: { g_value_set_uint(value, reset_audio_connection->pad); } break; case PROP_AUDIO_CHANNEL: { g_value_set_uint(value, reset_audio_connection->audio_channel); } break; case PROP_MAPPED_LINE: { g_value_set_uint(value, reset_audio_connection->mapped_line); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_reset_audio_connection_connect(AgsConnectable *connectable) { ags_reset_audio_connection_parent_connectable_interface->connect(connectable); /* empty */ } void ags_reset_audio_connection_disconnect(AgsConnectable *connectable) { ags_reset_audio_connection_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_reset_audio_connection_dispose(GObject *gobject) { AgsResetAudioConnection *reset_audio_connection; reset_audio_connection = AGS_RESET_AUDIO_CONNECTION(gobject); if(reset_audio_connection->soundcard != NULL){ g_object_unref(reset_audio_connection->soundcard); reset_audio_connection->soundcard = NULL; } if(reset_audio_connection->audio != NULL){ g_object_unref(reset_audio_connection->audio); reset_audio_connection->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_reset_audio_connection_parent_class)->dispose(gobject); } void ags_reset_audio_connection_finalize(GObject *gobject) { AgsResetAudioConnection *reset_audio_connection; reset_audio_connection = AGS_RESET_AUDIO_CONNECTION(gobject); if(reset_audio_connection->soundcard != NULL){ g_object_unref(reset_audio_connection->soundcard); } if(reset_audio_connection->audio != NULL){ g_object_unref(reset_audio_connection->audio); } /* call parent */ G_OBJECT_CLASS(ags_reset_audio_connection_parent_class)->finalize(gobject); } void ags_reset_audio_connection_launch(AgsTask *task) { AgsAudio *audio; AgsAudioConnection *audio_connection; AgsChannel *input, *output; AgsChannel *channel; AgsResetAudioConnection *reset_audio_connection; AgsMutexManager *mutex_manager; AgsConnectionManager *connection_manager; GParameter *parameter; GList *list_start, *list; guint audio_channels; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); reset_audio_connection = AGS_RESET_AUDIO_CONNECTION(task); audio = reset_audio_connection->audio; connection_manager = ags_connection_manager_get_instance(); /* find audio connection */ audio_connection = NULL; list_start = list = g_list_copy(audio->audio_connection); while((list = ags_audio_connection_find(list, AGS_TYPE_INPUT, reset_audio_connection->pad, reset_audio_connection->audio_channel)) != NULL){ GObject *data_object; pthread_mutex_lock(AGS_CONNECTION(list->data)->mutex); g_object_get(G_OBJECT(list->data), "data-object", &data_object, NULL); pthread_mutex_unlock(AGS_CONNECTION(list->data)->mutex); if(AGS_IS_SOUNDCARD(data_object)){ audio_connection = list->data; break; } list = list->next; } g_list_free(list_start); /* create audio connection if needed */ if(audio_connection == NULL){ audio_connection = g_object_new(AGS_TYPE_AUDIO_CONNECTION, NULL); ags_audio_add_audio_connection(audio, (GObject *) audio_connection); ags_connection_manager_add_connection(connection_manager, (AgsConnection *) audio_connection); } /* reset audio connection */ pthread_mutex_lock(AGS_CONNECTION(list->data)->mutex); g_object_set(audio_connection, "data-object", reset_audio_connection->soundcard, "audio", audio, "channel-type", reset_audio_connection->channel_type, "pad", reset_audio_connection->pad, "audio-channel", reset_audio_connection->audio_channel, "mapped-line", reset_audio_connection->mapped_line, NULL); pthread_mutex_unlock(AGS_CONNECTION(list->data)->mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); output = audio->output; input = audio->input; audio_channels = audio->audio_channels; pthread_mutex_unlock(audio_mutex); /* get channel */ if(g_type_is_a(reset_audio_connection->channel_type, AGS_TYPE_INPUT)){ channel = ags_channel_nth(input, reset_audio_connection->pad * audio_channels + reset_audio_connection->audio_channel); }else{ channel = ags_channel_nth(output, reset_audio_connection->pad * audio_channels + reset_audio_connection->audio_channel); } parameter = g_new0(GParameter, 1); parameter[0].name = "soundcard"; g_value_init(&(parameter[0].value), G_TYPE_OBJECT); g_value_set_object(&(parameter[0].value), reset_audio_connection->soundcard); if(channel != NULL){ ags_channel_recursive_set_property(channel, parameter, 1); } } /** * ags_reset_audio_connection_new: * @soundcard: the data-object * @audio: the #AgsAudio * @channel_type: the #GType * @pad: the pad * @audio_channel: the channel * @mapped_line: the mapped-line * * Creates an #AgsResetAudioConnection. * * Returns: an new #AgsResetAudioConnection. * * Since: 1.0.0 */ AgsResetAudioConnection* ags_reset_audio_connection_new(GObject *soundcard, AgsAudio *audio, GType channel_type, guint pad, guint audio_channel, guint mapped_line) { AgsResetAudioConnection *reset_audio_connection; reset_audio_connection = (AgsResetAudioConnection *) g_object_new(AGS_TYPE_RESET_AUDIO_CONNECTION, "soundcard", soundcard, "audio", audio, "channel_type", channel_type, "pad", pad, "audio_channel", audio_channel, "mapped_line", mapped_line, NULL); return(reset_audio_connection); } gsequencer-1.4.24/ags/audio/task/ags_save_file.c0000644000175000017500000001514013247044247016444 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_save_file_class_init(AgsSaveFileClass *save_file); void ags_save_file_connectable_interface_init(AgsConnectableInterface *connectable); void ags_save_file_init(AgsSaveFile *save_file); void ags_save_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_save_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_save_file_connect(AgsConnectable *connectable); void ags_save_file_disconnect(AgsConnectable *connectable); void ags_save_file_dispose(GObject *gobject); void ags_save_file_finalize(GObject *gobject); void ags_save_file_launch(AgsTask *task); /** * SECTION:ags_save_file * @short_description: save file task * @title: AgsSaveFile * @section_id: * @include: ags/audio/task/ags_save_file.h * * The #AgsSaveFile task saves files. */ static gpointer ags_save_file_parent_class = NULL; static AgsConnectableInterface *ags_save_file_parent_connectable_interface; enum{ PROP_0, PROP_FILE, }; GType ags_save_file_get_type() { static GType ags_type_save_file = 0; if(!ags_type_save_file){ static const GTypeInfo ags_save_file_info = { sizeof (AgsSaveFileClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_save_file_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsSaveFile), 0, /* n_preallocs */ (GInstanceInitFunc) ags_save_file_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_save_file_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_save_file = g_type_register_static(AGS_TYPE_TASK, "AgsSaveFile", &ags_save_file_info, 0); g_type_add_interface_static(ags_type_save_file, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_save_file); } void ags_save_file_class_init(AgsSaveFileClass *save_file) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_save_file_parent_class = g_type_class_peek_parent(save_file); /* gobject */ gobject = (GObjectClass *) save_file; gobject->set_property = ags_save_file_set_property; gobject->get_property = ags_save_file_get_property; gobject->dispose = ags_save_file_dispose; gobject->finalize = ags_save_file_finalize; /* properties */ /** * AgsSaveFile:file: * * The assigned #AgsFile * * Since: 1.0.0 */ param_spec = g_param_spec_object("file", i18n_pspec("file of save file"), i18n_pspec("The file of save file task"), AGS_TYPE_FILE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILE, param_spec); /* task */ task = (AgsTaskClass *) save_file; task->launch = ags_save_file_launch; } void ags_save_file_connectable_interface_init(AgsConnectableInterface *connectable) { ags_save_file_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_save_file_connect; connectable->disconnect = ags_save_file_disconnect; } void ags_save_file_init(AgsSaveFile *save_file) { save_file->file = NULL; } void ags_save_file_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsSaveFile *save_file; save_file = AGS_SAVE_FILE(gobject); switch(prop_id){ case PROP_FILE: { AgsFile *file; file = (AgsFile *) g_value_get_object(value); if(save_file->file == (GObject *) file){ return; } if(save_file->file != NULL){ g_object_unref(save_file->file); } if(file != NULL){ g_object_ref(file); } save_file->file = (GObject *) file; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_save_file_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsSaveFile *save_file; save_file = AGS_SAVE_FILE(gobject); switch(prop_id){ case PROP_FILE: { g_value_set_object(value, save_file->file); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_save_file_connect(AgsConnectable *connectable) { ags_save_file_parent_connectable_interface->connect(connectable); /* empty */ } void ags_save_file_disconnect(AgsConnectable *connectable) { ags_save_file_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_save_file_dispose(GObject *gobject) { AgsSaveFile *save_file; save_file = AGS_SAVE_FILE(gobject); if(save_file->file != NULL){ g_object_unref(save_file->file); save_file->file = NULL; } /* call parent */ G_OBJECT_CLASS(ags_save_file_parent_class)->dispose(gobject); } void ags_save_file_finalize(GObject *gobject) { AgsSaveFile *save_file; save_file = AGS_SAVE_FILE(gobject); if(save_file->file != NULL){ g_object_unref(save_file->file); } /* call parent */ G_OBJECT_CLASS(ags_save_file_parent_class)->finalize(gobject); } void ags_save_file_launch(AgsTask *task) { AgsSaveFile *save_file; GError *error; save_file = AGS_SAVE_FILE(task); g_message("Saving to: %s", save_file->file->filename); error = NULL; ags_file_rw_open(save_file->file, TRUE, &error); ags_file_write(save_file->file); ags_file_close(save_file->file); } /** * ags_save_file_new: * @file: the #AgsFile * * Creates an #AgsSaveFile. * * Returns: an new #AgsSaveFile. * * Since: 1.0.0 */ AgsSaveFile* ags_save_file_new(AgsFile *file) { AgsSaveFile *save_file; save_file = (AgsSaveFile *) g_object_new(AGS_TYPE_SAVE_FILE, "file", file, NULL); return(save_file); } gsequencer-1.4.24/ags/audio/task/ags_open_single_file.h0000644000175000017500000000436113247044247020020 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_OPEN_SINGLE_FILE_H__ #define __AGS_OPEN_SINGLE_FILE_H__ #include #include #include #include #include #define AGS_TYPE_OPEN_SINGLE_FILE (ags_open_single_file_get_type()) #define AGS_OPEN_SINGLE_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_OPEN_SINGLE_FILE, AgsOpenSingleFile)) #define AGS_OPEN_SINGLE_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_OPEN_SINGLE_FILE, AgsOpenSingleFileClass)) #define AGS_IS_OPEN_SINGLE_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_OPEN_SINGLE_FILE)) #define AGS_IS_OPEN_SINGLE_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_OPEN_SINGLE_FILE)) #define AGS_OPEN_SINGLE_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_OPEN_SINGLE_FILE, AgsOpenSingleFileClass)) typedef struct _AgsOpenSingleFile AgsOpenSingleFile; typedef struct _AgsOpenSingleFileClass AgsOpenSingleFileClass; struct _AgsOpenSingleFile { AgsTask task; AgsChannel *channel; GObject *soundcard; gchar *filename; guint start_channel; guint audio_channels; }; struct _AgsOpenSingleFileClass { AgsTaskClass task; }; GType ags_open_single_file_get_type(); AgsOpenSingleFile* ags_open_single_file_new(AgsChannel *channel, GObject *soundcard, gchar *filename, guint start_channel, guint audio_channels); #endif /*__AGS_OPEN_SINGLE_FILE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_free_selection.c0000644000175000017500000002171313247044247017500 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_free_selection_class_init(AgsFreeSelectionClass *free_selection); void ags_free_selection_connectable_interface_init(AgsConnectableInterface *connectable); void ags_free_selection_init(AgsFreeSelection *free_selection); void ags_free_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_free_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_free_selection_connect(AgsConnectable *connectable); void ags_free_selection_disconnect(AgsConnectable *connectable); void ags_free_selection_dispose(GObject *gobject); void ags_free_selection_finalize(GObject *gobject); void ags_free_selection_launch(AgsTask *task); /** * SECTION:ags_free_selection * @short_description: free selection object * @title: AgsFreeSelection * @section_id: * @include: ags/audio/task/ags_free_selection.h * * The #AgsFreeSelection task frees selection of #AgsNotation. */ static gpointer ags_free_selection_parent_class = NULL; static AgsConnectableInterface *ags_free_selection_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_NOTATION, }; GType ags_free_selection_get_type() { static GType ags_type_free_selection = 0; if(!ags_type_free_selection){ static const GTypeInfo ags_free_selection_info = { sizeof (AgsFreeSelectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_free_selection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsFreeSelection), 0, /* n_preallocs */ (GInstanceInitFunc) ags_free_selection_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_free_selection_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_free_selection = g_type_register_static(AGS_TYPE_TASK, "AgsFreeSelection", &ags_free_selection_info, 0); g_type_add_interface_static(ags_type_free_selection, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_free_selection); } void ags_free_selection_class_init(AgsFreeSelectionClass *free_selection) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_free_selection_parent_class = g_type_class_peek_parent(free_selection); /* gobject */ gobject = (GObjectClass *) free_selection; gobject->set_property = ags_free_selection_set_property; gobject->get_property = ags_free_selection_get_property; gobject->dispose = ags_free_selection_dispose; gobject->finalize = ags_free_selection_finalize; /* properties */ /** * AgsFreeSelection:audio: * * The assigned #AgsAudio * * Since: 1.2.2 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of free selection"), i18n_pspec("The audio of free selection task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsFreeSelection:notation: * * The assigned #AgsNotation * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("notation of free selection"), i18n_pspec("The notation of free selection task"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /* task */ task = (AgsTaskClass *) free_selection; task->launch = ags_free_selection_launch; } void ags_free_selection_connectable_interface_init(AgsConnectableInterface *connectable) { ags_free_selection_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_free_selection_connect; connectable->disconnect = ags_free_selection_disconnect; } void ags_free_selection_init(AgsFreeSelection *free_selection) { free_selection->audio = NULL; free_selection->notation = NULL; } void ags_free_selection_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsFreeSelection *free_selection; free_selection = AGS_FREE_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(free_selection->audio == (GObject *) audio){ return; } if(free_selection->audio != NULL){ g_object_unref(free_selection->audio); } if(audio != NULL){ g_object_ref(audio); } free_selection->audio = (GObject *) audio; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(free_selection->notation == (GObject *) notation){ return; } if(free_selection->notation != NULL){ g_object_unref(free_selection->notation); } if(notation != NULL){ g_object_ref(notation); } free_selection->notation = (GObject *) notation; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_free_selection_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsFreeSelection *free_selection; free_selection = AGS_FREE_SELECTION(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, free_selection->audio); } break; case PROP_NOTATION: { g_value_set_object(value, free_selection->notation); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_free_selection_connect(AgsConnectable *connectable) { ags_free_selection_parent_connectable_interface->connect(connectable); /* empty */ } void ags_free_selection_disconnect(AgsConnectable *connectable) { ags_free_selection_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_free_selection_dispose(GObject *gobject) { AgsFreeSelection *free_selection; free_selection = AGS_FREE_SELECTION(gobject); if(free_selection->audio != NULL){ g_object_unref(free_selection->audio); free_selection->audio = NULL; } if(free_selection->notation != NULL){ g_object_unref(free_selection->notation); free_selection->notation = NULL; } /* call parent */ G_OBJECT_CLASS(ags_free_selection_parent_class)->dispose(gobject); } void ags_free_selection_finalize(GObject *gobject) { AgsFreeSelection *free_selection; free_selection = AGS_FREE_SELECTION(gobject); if(free_selection->audio != NULL){ g_object_unref(free_selection->audio); } if(free_selection->notation != NULL){ g_object_unref(free_selection->notation); } /* call parent */ G_OBJECT_CLASS(ags_free_selection_parent_class)->finalize(gobject); } void ags_free_selection_launch(AgsTask *task) { AgsAudio *audio; AgsNotation *notation; AgsFreeSelection *free_selection; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); free_selection = AGS_FREE_SELECTION(task); audio = free_selection->audio; notation = free_selection->notation; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* free selection */ pthread_mutex_lock(audio_mutex); ags_notation_free_selection(notation); pthread_mutex_unlock(audio_mutex); } /** * ags_free_selection_new: * @notation: the #AgsNotation * * WARNING you need to provide #AgsAudio as a property. * Creates an #AgsFreeSelection. * * Returns: an new #AgsFreeSelection. * * Since: 1.0.0 */ AgsFreeSelection* ags_free_selection_new(AgsNotation *notation) { AgsFreeSelection *free_selection; free_selection = (AgsFreeSelection *) g_object_new(AGS_TYPE_FREE_SELECTION, "notation", notation, NULL); return(free_selection); } gsequencer-1.4.24/ags/audio/task/ags_export_output.c0000644000175000017500000003554213247044247017460 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include void ags_export_output_class_init(AgsExportOutputClass *export_output); void ags_export_output_connectable_interface_init(AgsConnectableInterface *connectable); void ags_export_output_init(AgsExportOutput *export_output); void ags_export_output_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_export_output_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_export_output_connect(AgsConnectable *connectable); void ags_export_output_disconnect(AgsConnectable *connectable); void ags_export_output_dispose(GObject *gobject); void ags_export_output_finalize(GObject *gobject); void ags_export_output_launch(AgsTask *task); /** * SECTION:ags_export_output * @short_description: export output task * @title: AgsExportOutput * @section_id: * @include: ags/audio/task/ags_export_output.h * * The #AgsExportOutput task exports #GObject to file. */ static gpointer ags_export_output_parent_class = NULL; static AgsConnectableInterface *ags_export_output_parent_connectable_interface; enum{ PROP_0, PROP_EXPORT_THREAD, PROP_SOUNDCARD, PROP_FILENAME, PROP_FORMAT, PROP_TIC, PROP_LIVE_PERFORMANCE, }; GType ags_export_output_get_type() { static GType ags_type_export_output = 0; if(!ags_type_export_output){ static const GTypeInfo ags_export_output_info = { sizeof (AgsExportOutputClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_export_output_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsExportOutput), 0, /* n_preallocs */ (GInstanceInitFunc) ags_export_output_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_export_output_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_export_output = g_type_register_static(AGS_TYPE_TASK, "AgsExportOutput", &ags_export_output_info, 0); g_type_add_interface_static(ags_type_export_output, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_export_output); } void ags_export_output_class_init(AgsExportOutputClass *export_output) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_export_output_parent_class = g_type_class_peek_parent(export_output); /* gobject */ gobject = (GObjectClass *) export_output; gobject->set_property = ags_export_output_set_property; gobject->get_property = ags_export_output_get_property; gobject->dispose = ags_export_output_dispose; gobject->finalize = ags_export_output_finalize; /* properties */ /** * AgsExportOutput:export-thread: * * The assigned #AgsExportThread * * Since: 1.0.0 */ param_spec = g_param_spec_object("export-thread", i18n_pspec("export thread of export output"), i18n_pspec("The export thread of export output task"), AGS_TYPE_EXPORT_THREAD, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_EXPORT_THREAD, param_spec); /** * AgsExportOutput:soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of export output"), i18n_pspec("The soundcard of export output task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsExportOutput:filename: * * The assigned filename. * * Since: 1.0.0 */ param_spec = g_param_spec_string("filename", i18n_pspec("the filename"), i18n_pspec("The filename containing the output"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FILENAME, param_spec); /** * AgsExportOutput:format: * * Format to use. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("audio format"), i18n_pspec("The audio format to use"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsExportOutput:tic: * * Tic offset of output as end tic of it. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("tic", i18n_pspec("tic offset"), i18n_pspec("The tic offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_TIC, param_spec); /** * AgsExportOutput:live-performance: * * Do output the audio export live. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("live-performance", i18n_pspec("export output live"), i18n_pspec("Do export output live"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LIVE_PERFORMANCE, param_spec); /* task */ task = (AgsTaskClass *) export_output; task->launch = ags_export_output_launch; } void ags_export_output_connectable_interface_init(AgsConnectableInterface *connectable) { ags_export_output_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_export_output_connect; connectable->disconnect = ags_export_output_disconnect; } void ags_export_output_init(AgsExportOutput *export_output) { export_output->export_thread = NULL; export_output->soundcard = NULL; export_output->filename = NULL; export_output->format = 0; export_output->tic = 0; export_output->live_performance = TRUE; } void ags_export_output_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsExportOutput *export_output; export_output = AGS_EXPORT_OUTPUT(gobject); switch(prop_id){ case PROP_EXPORT_THREAD: { AgsExportThread *export_thread; export_thread = (AgsExportThread *) g_value_get_object(value); if(export_output->export_thread == (GObject *) export_thread){ return; } if(export_output->export_thread != NULL){ g_object_unref(export_output->export_thread); } if(export_thread != NULL){ g_object_ref(export_thread); } export_output->export_thread = (GObject *) export_thread; } break; case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(export_output->soundcard == (GObject *) soundcard){ return; } if(export_output->soundcard != NULL){ g_object_unref(export_output->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } export_output->soundcard = (GObject *) soundcard; } break; case PROP_FILENAME: { gchar *filename; filename = g_value_get_string(value); if(export_output->filename == filename){ return; } if(export_output->filename != NULL){ g_free(export_output->filename); } export_output->filename = g_strdup(filename); } break; case PROP_FORMAT: { export_output->format = g_value_get_uint(value); } break; case PROP_TIC: { export_output->tic = g_value_get_uint(value); } break; case PROP_LIVE_PERFORMANCE: { export_output->live_performance = g_value_get_boolean(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_export_output_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsExportOutput *export_output; export_output = AGS_EXPORT_OUTPUT(gobject); switch(prop_id){ case PROP_EXPORT_THREAD: { g_value_set_object(value, export_output->export_thread); } break; case PROP_SOUNDCARD: { g_value_set_object(value, export_output->soundcard); } break; case PROP_FILENAME: { g_value_set_string(value, export_output->filename); } break; case PROP_FORMAT: { g_value_set_uint(value, export_output->format); } case PROP_TIC: { g_value_set_uint(value, export_output->tic); } break; case PROP_LIVE_PERFORMANCE: { g_value_set_boolean(value, export_output->live_performance); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_export_output_connect(AgsConnectable *connectable) { ags_export_output_parent_connectable_interface->connect(connectable); /* empty */ } void ags_export_output_disconnect(AgsConnectable *connectable) { ags_export_output_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_export_output_dispose(GObject *gobject) { AgsExportOutput *export_output; export_output = AGS_EXPORT_OUTPUT(gobject); if(export_output->export_thread != NULL){ g_object_unref(export_output->export_thread); export_output->export_thread = NULL; } if(export_output->soundcard != NULL){ g_object_unref(export_output->soundcard); export_output->soundcard = NULL; } if(export_output->filename != NULL){ g_free(export_output->filename); export_output->filename = NULL; } /* call parent */ G_OBJECT_CLASS(ags_export_output_parent_class)->dispose(gobject); } void ags_export_output_finalize(GObject *gobject) { AgsExportOutput *export_output; export_output = AGS_EXPORT_OUTPUT(gobject); if(export_output->export_thread != NULL){ g_object_unref(export_output->export_thread); } if(export_output->soundcard != NULL){ g_object_unref(export_output->soundcard); } if(export_output->filename != NULL){ g_free(export_output->filename); } /* call parent */ G_OBJECT_CLASS(ags_export_output_parent_class)->finalize(gobject); } void ags_export_output_launch(AgsTask *task) { AgsAudioFile *audio_file; AgsExportOutput *export_output; AgsExportThread *export_thread; AgsMutexManager *mutex_manager; GObject *soundcard; gchar *filename; guint pcm_channels; guint samplerate; guint format; guint tic; guint val; guint major_format; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *thread_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); export_output = AGS_EXPORT_OUTPUT(task); soundcard = export_output->soundcard; export_thread = export_output->export_thread; filename = export_output->filename; tic = export_output->tic; /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* get presets */ pthread_mutex_lock(soundcard_mutex); ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), &pcm_channels, &samplerate, NULL, &format); pthread_mutex_unlock(soundcard_mutex); /* open read/write audio file */ audio_file = ags_audio_file_new(filename, soundcard, 0, pcm_channels); #ifdef AGS_DEBUG g_message("pcm - %d", pcm_channels); #endif audio_file->samplerate = (int) samplerate; audio_file->channels = pcm_channels; //TODO:JK: more formats if((AGS_EXPORT_OUTPUT_FORMAT_WAV & (export_output->format)) != 0){ major_format = SF_FORMAT_WAV; audio_file->format = major_format | SF_FORMAT_PCM_16; }else if((AGS_EXPORT_OUTPUT_FORMAT_FLAC & (export_output->format)) != 0){ major_format = SF_FORMAT_FLAC; audio_file->format = major_format | SF_FORMAT_PCM_24; }else if((AGS_EXPORT_OUTPUT_FORMAT_OGG & (export_output->format)) != 0){ major_format = SF_FORMAT_OGG; audio_file->format = major_format | SF_FORMAT_VORBIS; }else{ major_format = SF_FORMAT_WAV; audio_file->format = major_format | SF_FORMAT_PCM_16; } ags_audio_file_rw_open(audio_file, TRUE); #ifdef AGS_DEBUG g_message("export output"); #endif /* get thread mutex */ pthread_mutex_lock(application_mutex); thread_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) export_thread); pthread_mutex_unlock(application_mutex); /* start export thread */ pthread_mutex_lock(thread_mutex); export_thread->tic = tic; g_object_set(G_OBJECT(export_thread), "soundcard", soundcard, "audio-file", audio_file, NULL); pthread_mutex_unlock(thread_mutex); if((AGS_THREAD_SINGLE_LOOP & (g_atomic_int_get(&(AGS_THREAD(export_thread)->flags)))) == 0){ AgsThread *parent; GList *start_queue; parent = g_atomic_pointer_get(&(AGS_THREAD(export_thread)->parent)); pthread_mutex_lock(parent->start_mutex); start_queue = g_atomic_pointer_get(&(parent->start_queue)); g_atomic_pointer_set(&(parent->start_queue), g_list_prepend(start_queue, export_thread)); pthread_mutex_unlock(parent->start_mutex); }else{ g_atomic_int_or(&(AGS_THREAD(export_thread)->flags), AGS_THREAD_RUNNING); } } /** * ags_export_output_new: * @export_thread: the #AgsExportThread to start * @soundcard: the #GObject to export * @filename: the filename to save * @tic: stream duration in tact * @live_performance: if %TRUE export is done during real-time * * Creates an #AgsExportOutput. * * Returns: an new #AgsExportOutput. * * Since: 1.0.0 */ AgsExportOutput* ags_export_output_new(AgsExportThread *export_thread, GObject *soundcard, gchar *filename, guint tic, gboolean live_performance) { AgsExportOutput *export_output; export_output = (AgsExportOutput *) g_object_new(AGS_TYPE_EXPORT_OUTPUT, "export-thread", export_thread, "soundcard", soundcard, "filename", filename, "tic", tic, "live-performance", live_performance, NULL); return(export_output); } gsequencer-1.4.24/ags/audio/task/ags_remove_region_from_selection.h0000644000175000017500000000474013247044247022450 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REMOVE_REGION_FROM_SELECTION_H__ #define __AGS_REMOVE_REGION_FROM_SELECTION_H__ #include #include #include #include #include #define AGS_TYPE_REMOVE_REGION_FROM_SELECTION (ags_remove_region_from_selection_get_type()) #define AGS_REMOVE_REGION_FROM_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_REGION_FROM_SELECTION, AgsRemoveRegionFromSelection)) #define AGS_REMOVE_REGION_FROM_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_REGION_FROM_SELECTION, AgsRemoveRegionFromSelectionClass)) #define AGS_IS_REMOVE_REGION_FROM_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_REGION_FROM_SELECTION)) #define AGS_IS_REMOVE_REGION_FROM_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_REGION_FROM_SELECTION)) #define AGS_REMOVE_REGION_FROM_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_REGION_FROM_SELECTION, AgsRemoveRegionFromSelectionClass)) typedef struct _AgsRemoveRegionFromSelection AgsRemoveRegionFromSelection; typedef struct _AgsRemoveRegionFromSelectionClass AgsRemoveRegionFromSelectionClass; struct _AgsRemoveRegionFromSelection { AgsTask task; AgsAudio *audio; AgsNotation *notation; guint x0; guint y0; guint x1; guint y1; }; struct _AgsRemoveRegionFromSelectionClass { AgsTaskClass task; }; GType ags_remove_region_from_selection_get_type(); AgsRemoveRegionFromSelection* ags_remove_region_from_selection_new(AgsNotation *notation, guint x0, guint y0, guint x1, guint y1); #endif /*__AGS_REMOVE_REGION_FROM_SELECTION_H__*/ gsequencer-1.4.24/ags/audio/task/ags_resize_audio.c0000644000175000017500000002566013247044247017201 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include void ags_resize_audio_class_init(AgsResizeAudioClass *resize_audio); void ags_resize_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_resize_audio_init(AgsResizeAudio *resize_audio); void ags_resize_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_resize_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_resize_audio_connect(AgsConnectable *connectable); void ags_resize_audio_disconnect(AgsConnectable *connectable); void ags_resize_audio_dispose(GObject *gobject); void ags_resize_audio_finalize(GObject *gobject); void ags_resize_audio_launch(AgsTask *task); /** * SECTION:ags_resize_audio * @short_description: resize audio task * @title: AgsResizeAudio * @section_id: * @include: ags/audio/task/ags_resize_audio.h * * The #AgsResizeAudio task resizes #AgsAudio. */ static gpointer ags_resize_audio_parent_class = NULL; static AgsConnectableInterface *ags_resize_audio_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_OUTPUT_PADS, PROP_INPUT_PADS, PROP_AUDIO_CHANNELS, }; GType ags_resize_audio_get_type() { static GType ags_type_resize_audio = 0; if(!ags_type_resize_audio){ static const GTypeInfo ags_resize_audio_info = { sizeof (AgsResizeAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_resize_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsResizeAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_resize_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_resize_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_resize_audio = g_type_register_static(AGS_TYPE_TASK, "AgsResizeAudio", &ags_resize_audio_info, 0); g_type_add_interface_static(ags_type_resize_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_resize_audio); } void ags_resize_audio_class_init(AgsResizeAudioClass *resize_audio) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_resize_audio_parent_class = g_type_class_peek_parent(resize_audio); /* gobject */ gobject = (GObjectClass *) resize_audio; gobject->set_property = ags_resize_audio_set_property; gobject->get_property = ags_resize_audio_get_property; gobject->dispose = ags_resize_audio_dispose; gobject->finalize = ags_resize_audio_finalize; /* properties */ /** * AgsResizeAudio:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of resize audio"), i18n_pspec("The audio of resize audio task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsResizeAudio:output-pads: * * The count of output pads to apply to audio. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("output-pads", i18n_pspec("output pads"), i18n_pspec("The count of output pads"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_OUTPUT_PADS, param_spec); /** * AgsResizeAudio:input-pads: * * The count of input pads to apply to audio. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("input-pads", i18n_pspec("input pads"), i18n_pspec("The count of input pads"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_INPUT_PADS, param_spec); /** * AgsResizeAudio:audio-channels: * * The count of audio channels to apply to audio. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("audio-channels", i18n_pspec("audio channels"), i18n_pspec("The count of audio channels"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_CHANNELS, param_spec); /* task */ task = (AgsTaskClass *) resize_audio; task->launch = ags_resize_audio_launch; } void ags_resize_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_resize_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_resize_audio_connect; connectable->disconnect = ags_resize_audio_disconnect; } void ags_resize_audio_init(AgsResizeAudio *resize_audio) { resize_audio->audio = NULL; resize_audio->output_pads = 0; resize_audio->input_pads = 0; resize_audio->audio_channels = 0; } void ags_resize_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsResizeAudio *resize_audio; resize_audio = AGS_RESIZE_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(resize_audio->audio == (GObject *) audio){ return; } if(resize_audio->audio != NULL){ g_object_unref(resize_audio->audio); } if(audio != NULL){ g_object_ref(audio); } resize_audio->audio = (GObject *) audio; } break; case PROP_OUTPUT_PADS: { resize_audio->output_pads = g_value_get_uint(value); } break; case PROP_INPUT_PADS: { resize_audio->input_pads = g_value_get_uint(value); } break; case PROP_AUDIO_CHANNELS: { resize_audio->audio_channels = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_resize_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsResizeAudio *resize_audio; resize_audio = AGS_RESIZE_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, resize_audio->audio); } break; case PROP_OUTPUT_PADS: { g_value_set_uint(value, resize_audio->output_pads); } break; case PROP_INPUT_PADS: { g_value_set_uint(value, resize_audio->input_pads); } break; case PROP_AUDIO_CHANNELS: { g_value_set_uint(value, resize_audio->audio_channels); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_resize_audio_connect(AgsConnectable *connectable) { ags_resize_audio_parent_connectable_interface->connect(connectable); /* empty */ } void ags_resize_audio_disconnect(AgsConnectable *connectable) { ags_resize_audio_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_resize_audio_dispose(GObject *gobject) { AgsResizeAudio *resize_audio; resize_audio = AGS_RESIZE_AUDIO(gobject); if(resize_audio->audio != NULL){ g_object_unref(resize_audio->audio); resize_audio->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_resize_audio_parent_class)->dispose(gobject); } void ags_resize_audio_finalize(GObject *gobject) { AgsResizeAudio *resize_audio; resize_audio = AGS_RESIZE_AUDIO(gobject); if(resize_audio->audio != NULL){ g_object_unref(resize_audio->audio); } /* call parent */ G_OBJECT_CLASS(ags_resize_audio_parent_class)->finalize(gobject); } void ags_resize_audio_launch(AgsTask *task) { AgsAudio *audio; AgsChannel *iter; AgsResizeAudio *resize_audio; AgsMutexManager *mutex_manager; guint audio_channels; guint input_pads_old, output_pads_old; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); resize_audio = AGS_RESIZE_AUDIO(task); audio = resize_audio->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_channels = audio->audio_channels; output_pads_old = audio->output_pads; input_pads_old = audio->input_pads; pthread_mutex_unlock(audio_mutex); /* resize audio */ if(audio->output_pads != resize_audio->output_pads){ ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, resize_audio->output_pads); if(output_pads_old < audio->output_pads){ iter = ags_channel_pad_nth(audio->input, output_pads_old); while(iter != NULL){ ags_connectable_connect(AGS_CONNECTABLE(iter)); iter = iter->next; } } } if(audio->input_pads != resize_audio->input_pads){ ags_audio_set_pads(audio, AGS_TYPE_INPUT, resize_audio->input_pads); if(input_pads_old < audio->output_pads){ iter = ags_channel_pad_nth(audio->input, input_pads_old); while(iter != NULL){ ags_connectable_connect(AGS_CONNECTABLE(iter)); iter = iter->next; } } } if(audio_channels != resize_audio->audio_channels){ ags_audio_set_audio_channels(audio, resize_audio->audio_channels); } } /** * ags_resize_audio_new: * @audio: the #AgsAudio to resize * @output_pads: output pads * @input_pads: input pads * @audio_channels: audio channels * * Creates an #AgsResizeAudio. * * Returns: an new #AgsResizeAudio. * * Since: 1.0.0 */ AgsResizeAudio* ags_resize_audio_new(AgsAudio *audio, guint output_pads, guint input_pads, guint audio_channels) { AgsResizeAudio *resize_audio; resize_audio = (AgsResizeAudio *) g_object_new(AGS_TYPE_RESIZE_AUDIO, "audio", audio, "output-pads", output_pads, "input-pads", input_pads, "audio-channels", audio_channels, NULL); return(resize_audio); } gsequencer-1.4.24/ags/audio/task/ags_remove_audio.c0000644000175000017500000003235513247044247017174 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include void ags_remove_audio_class_init(AgsRemoveAudioClass *remove_audio); void ags_remove_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_audio_init(AgsRemoveAudio *remove_audio); void ags_remove_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_remove_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_remove_audio_connect(AgsConnectable *connectable); void ags_remove_audio_disconnect(AgsConnectable *connectable); void ags_remove_audio_dispose(GObject *gobject); void ags_remove_audio_finalize(GObject *gobject); void ags_remove_audio_launch(AgsTask *task); /** * SECTION:ags_remove_audio * @short_description: remove audio of soundcard task * @title: AgsRemoveAudio * @section_id: * @include: ags/audio/task/ags_remove_audio.h * * The #AgsRemoveAudio task removes #AgsAudio of #AgsSoundcard. */ static gpointer ags_remove_audio_parent_class = NULL; static AgsConnectableInterface *ags_remove_audio_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_SOUNDCARD, }; GType ags_remove_audio_get_type() { static GType ags_type_remove_audio = 0; if(!ags_type_remove_audio){ static const GTypeInfo ags_remove_audio_info = { sizeof (AgsRemoveAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoveAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_audio = g_type_register_static(AGS_TYPE_TASK, "AgsRemoveAudio", &ags_remove_audio_info, 0); g_type_add_interface_static(ags_type_remove_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_audio); } void ags_remove_audio_class_init(AgsRemoveAudioClass *remove_audio) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_remove_audio_parent_class = g_type_class_peek_parent(remove_audio); /* gobject */ gobject = (GObjectClass *) remove_audio; gobject->set_property = ags_remove_audio_set_property; gobject->get_property = ags_remove_audio_get_property; gobject->dispose = ags_remove_audio_dispose; gobject->finalize = ags_remove_audio_finalize; /* properties */ /** * AgsRemoveAudio:soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of remove audio"), i18n_pspec("The soundcard of remove audio task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsRemoveAudio:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of remove audio"), i18n_pspec("The audio of remove audio task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /* task */ task = (AgsTaskClass *) remove_audio; task->launch = ags_remove_audio_launch; } void ags_remove_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_audio_connect; connectable->disconnect = ags_remove_audio_disconnect; } void ags_remove_audio_init(AgsRemoveAudio *remove_audio) { remove_audio->soundcard = NULL; remove_audio->audio = NULL; } void ags_remove_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRemoveAudio *remove_audio; remove_audio = AGS_REMOVE_AUDIO(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(remove_audio->soundcard == (GObject *) soundcard){ return; } if(remove_audio->soundcard != NULL){ g_object_unref(remove_audio->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } remove_audio->soundcard = (GObject *) soundcard; } break; case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(remove_audio->audio == (GObject *) audio){ return; } if(remove_audio->audio != NULL){ g_object_unref(remove_audio->audio); } if(audio != NULL){ g_object_ref(audio); } remove_audio->audio = (GObject *) audio; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRemoveAudio *remove_audio; remove_audio = AGS_REMOVE_AUDIO(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, remove_audio->soundcard); } break; case PROP_AUDIO: { g_value_set_object(value, remove_audio->audio); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_audio_connect(AgsConnectable *connectable) { ags_remove_audio_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_audio_disconnect(AgsConnectable *connectable) { ags_remove_audio_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_audio_dispose(GObject *gobject) { AgsRemoveAudio *remove_audio; remove_audio = AGS_REMOVE_AUDIO(gobject); if(remove_audio->soundcard != NULL){ g_object_unref(remove_audio->soundcard); remove_audio->soundcard = NULL; } if(remove_audio->audio != NULL){ g_object_unref(remove_audio->audio); remove_audio->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_remove_audio_parent_class)->dispose(gobject); } void ags_remove_audio_finalize(GObject *gobject) { AgsRemoveAudio *remove_audio; remove_audio = AGS_REMOVE_AUDIO(gobject); if(remove_audio->soundcard != NULL){ g_object_unref(remove_audio->soundcard); } if(remove_audio->audio != NULL){ g_object_unref(remove_audio->audio); } /* call parent */ G_OBJECT_CLASS(ags_remove_audio_parent_class)->finalize(gobject); } void ags_remove_audio_launch(AgsTask *task) { AgsAudio *audio; AgsChannel *channel; AgsPlaybackDomain *playback_domain; AgsPlayback *playback; AgsRemoveAudio *remove_audio; AgsAudioLoop *audio_loop; AgsAudioThread* audio_thread[3]; AgsChannelThread* channel_thread[3]; AgsMutexManager *mutex_manager; GObject *soundcard; GList *list; pthread_mutex_t *application_mutex; pthread_mutex_t *soundcard_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); remove_audio = AGS_REMOVE_AUDIO(task); audio = remove_audio->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); soundcard = remove_audio->soundcard; playback_domain = audio->playback_domain; audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK] = playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK]; audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER] = playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER]; audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION] = playback_domain->audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION]; pthread_mutex_unlock(audio_mutex); /* audio loop remove */ audio_loop = ags_thread_get_toplevel(task->task_thread); ags_audio_loop_remove_audio(audio_loop, audio); /* playback domain */ if(playback_domain != NULL){ ags_thread_stop(audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_PLAYBACK]); ags_thread_stop(audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_SEQUENCER]); ags_thread_stop(audio_thread[AGS_PLAYBACK_DOMAIN_SCOPE_NOTATION]); } /* output */ pthread_mutex_lock(audio_mutex); channel = audio->output; pthread_mutex_unlock(audio_mutex); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); playback = channel->playback; channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK] = playback->channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK]; channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER] = playback->channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER]; channel_thread[AGS_PLAYBACK_SCOPE_NOTATION] = playback->channel_thread[AGS_PLAYBACK_SCOPE_NOTATION]; pthread_mutex_unlock(channel_mutex); /* stop channel thread */ if(playback != NULL){ ags_thread_stop(channel_thread[0]); ags_thread_stop(channel_thread[1]); ags_thread_stop(channel_thread[2]); } /* set link */ ags_channel_set_link(channel, NULL, NULL); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* input */ pthread_mutex_lock(audio_mutex); channel = audio->input; pthread_mutex_unlock(audio_mutex); while(channel != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); playback = channel->playback; channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK] = playback->channel_thread[AGS_PLAYBACK_SCOPE_PLAYBACK]; channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER] = playback->channel_thread[AGS_PLAYBACK_SCOPE_SEQUENCER]; channel_thread[AGS_PLAYBACK_SCOPE_NOTATION] = playback->channel_thread[AGS_PLAYBACK_SCOPE_NOTATION]; pthread_mutex_unlock(channel_mutex); /* stop channel thread */ if(playback != NULL){ ags_thread_stop(channel_thread[0]); ags_thread_stop(channel_thread[1]); ags_thread_stop(channel_thread[2]); } /* set link */ ags_channel_set_link(channel, NULL, NULL); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* remove audio */ if(soundcard != NULL){ /* get soundcard mutex */ pthread_mutex_lock(application_mutex); soundcard_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) soundcard); pthread_mutex_unlock(application_mutex); /* unset soundcard */ pthread_mutex_lock(audio_mutex); audio->soundcard = NULL; pthread_mutex_unlock(audio_mutex); /* remove */ pthread_mutex_lock(soundcard_mutex); list = ags_soundcard_get_audio(AGS_SOUNDCARD(soundcard)); list = g_list_remove(list, audio); ags_soundcard_set_audio(AGS_SOUNDCARD(soundcard), list); pthread_mutex_unlock(soundcard_mutex); /* unref */ g_object_unref(soundcard); } g_object_run_dispose(audio); if(soundcard != NULL){ g_object_unref(audio); } } /** * ags_remove_audio_new: * @soundcard: the #GObject implementing #AgsSoundcard * @audio: the #AgsAudio to remove * * Creates an #AgsRemoveAudio. * * Returns: an new #AgsRemoveAudio. * * Since: 1.0.0 */ AgsRemoveAudio* ags_remove_audio_new(GObject *soundcard, AgsAudio *audio) { AgsRemoveAudio *remove_audio; remove_audio = (AgsRemoveAudio *) g_object_new(AGS_TYPE_REMOVE_AUDIO, "soundcard", soundcard, "audio", audio, NULL); return(remove_audio); } gsequencer-1.4.24/ags/audio/task/ags_set_buffer_size.h0000644000175000017500000000374413247044247017701 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SET_BUFFER_SIZE_H__ #define __AGS_SET_BUFFER_SIZE_H__ #include #include #include #define AGS_TYPE_SET_BUFFER_SIZE (ags_set_buffer_size_get_type()) #define AGS_SET_BUFFER_SIZE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SET_BUFFER_SIZE, AgsSetBufferSize)) #define AGS_SET_BUFFER_SIZE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SET_BUFFER_SIZE, AgsSetBufferSizeClass)) #define AGS_IS_SET_BUFFER_SIZE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SET_BUFFER_SIZE)) #define AGS_IS_SET_BUFFER_SIZE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SET_BUFFER_SIZE)) #define AGS_SET_BUFFER_SIZE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SET_BUFFER_SIZE, AgsSetBufferSizeClass)) typedef struct _AgsSetBufferSize AgsSetBufferSize; typedef struct _AgsSetBufferSizeClass AgsSetBufferSizeClass; struct _AgsSetBufferSize { AgsTask task; GObject *scope; guint buffer_size; }; struct _AgsSetBufferSizeClass { AgsTaskClass task; }; GType ags_set_buffer_size_get_type(); AgsSetBufferSize* ags_set_buffer_size_new(GObject *scope, guint buffer_size); #endif /*__AGS_SET_BUFFER_SIZE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_append_recall.c0000644000175000017500000002123413247044247017301 00000000000000/* 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 . */ #include #include #include #include #include void ags_append_recall_class_init(AgsAppendRecallClass *append_recall); void ags_append_recall_connectable_interface_init(AgsConnectableInterface *connectable); void ags_append_recall_init(AgsAppendRecall *append_recall); void ags_append_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_append_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_append_recall_connect(AgsConnectable *connectable); void ags_append_recall_disconnect(AgsConnectable *connectable); void ags_append_recall_dispose(GObject *gobject); void ags_append_recall_finalize(GObject *gobject); void ags_append_recall_launch(AgsTask *task); /** * SECTION:ags_append_recall * @short_description: append recall object to audio loop * @title: AgsAppendRecall * @section_id: * @include: ags/audio/task/ags_append_recall.h * * The #AgsAppendRecall task appends #AgsRecall to #AgsAudioLoop. */ static gpointer ags_append_recall_parent_class = NULL; static AgsConnectableInterface *ags_append_recall_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO_LOOP, PROP_PLAYBACK, }; GType ags_append_recall_get_type() { static GType ags_type_append_recall = 0; if(!ags_type_append_recall){ static const GTypeInfo ags_append_recall_info = { sizeof (AgsAppendRecallClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_append_recall_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAppendRecall), 0, /* n_preallocs */ (GInstanceInitFunc) ags_append_recall_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_append_recall_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_append_recall = g_type_register_static(AGS_TYPE_TASK, "AgsAppendRecall", &ags_append_recall_info, 0); g_type_add_interface_static(ags_type_append_recall, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_append_recall); } void ags_append_recall_class_init(AgsAppendRecallClass *append_recall) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_append_recall_parent_class = g_type_class_peek_parent(append_recall); /* GObjectClass */ gobject = (GObjectClass *) append_recall; gobject->set_property = ags_append_recall_set_property; gobject->get_property = ags_append_recall_get_property; gobject->dispose = ags_append_recall_dispose; gobject->finalize = ags_append_recall_finalize; /* properties */ /** * AgsAppendRecall:audio-loop: * * The assigned #AgsAudioLoop * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-loop", i18n_pspec("audio loop of append recall"), i18n_pspec("The audio loop of append recall task"), AGS_TYPE_AUDIO_LOOP, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_LOOP, param_spec); /** * AgsAppendRecall:playback: * * The assigned #AgsPlayback * * Since: 1.0.0 */ param_spec = g_param_spec_object("playback", i18n_pspec("playback of append recall"), i18n_pspec("The playback of append recall task"), AGS_TYPE_PLAYBACK, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PLAYBACK, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) append_recall; task->launch = ags_append_recall_launch; } void ags_append_recall_connectable_interface_init(AgsConnectableInterface *connectable) { ags_append_recall_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_append_recall_connect; connectable->disconnect = ags_append_recall_disconnect; } void ags_append_recall_init(AgsAppendRecall *append_recall) { append_recall->audio_loop = NULL; append_recall->playback = NULL; } void ags_append_recall_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAppendRecall *append_recall; append_recall = AGS_APPEND_RECALL(gobject); switch(prop_id){ case PROP_AUDIO_LOOP: { AgsAudioLoop *audio_loop; audio_loop = (AgsAudioLoop *) g_value_get_object(value); if(append_recall->audio_loop == (GObject *) audio_loop){ return; } if(append_recall->audio_loop != NULL){ g_object_unref(append_recall->audio_loop); } if(audio_loop != NULL){ g_object_ref(audio_loop); } append_recall->audio_loop = (GObject *) audio_loop; } break; case PROP_PLAYBACK: { AgsPlayback *playback; playback = (AgsPlayback *) g_value_get_object(value); if(append_recall->playback == (GObject *) playback){ return; } if(append_recall->playback != NULL){ g_object_unref(append_recall->playback); } if(playback != NULL){ g_object_ref(playback); } append_recall->playback = (GObject *) playback; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_append_recall_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAppendRecall *append_recall; append_recall = AGS_APPEND_RECALL(gobject); switch(prop_id){ case PROP_AUDIO_LOOP: { g_value_set_object(value, append_recall->audio_loop); } break; case PROP_PLAYBACK: { g_value_set_object(value, append_recall->playback); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_append_recall_connect(AgsConnectable *connectable) { ags_append_recall_parent_connectable_interface->connect(connectable); /* empty */ } void ags_append_recall_disconnect(AgsConnectable *connectable) { ags_append_recall_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_append_recall_dispose(GObject *gobject) { AgsAppendRecall *append_recall; append_recall = AGS_APPEND_RECALL(gobject); if(append_recall->audio_loop != NULL){ g_object_unref(append_recall->audio_loop); append_recall->audio_loop = NULL; } if(append_recall->playback != NULL){ g_object_unref(append_recall->playback); append_recall->playback = NULL; } /* call parent */ G_OBJECT_CLASS(ags_append_recall_parent_class)->dispose(gobject); } void ags_append_recall_finalize(GObject *gobject) { AgsAppendRecall *append_recall; append_recall = AGS_APPEND_RECALL(gobject); if(append_recall->audio_loop != NULL){ g_object_unref(append_recall->audio_loop); } if(append_recall->playback != NULL){ g_object_unref(append_recall->playback); } /* call parent */ G_OBJECT_CLASS(ags_append_recall_parent_class)->finalize(gobject); } void ags_append_recall_launch(AgsTask *task) { AgsAppendRecall *append_recall; AgsAudioLoop *audio_loop; append_recall = AGS_APPEND_RECALL(task); audio_loop = AGS_AUDIO_LOOP(append_recall->audio_loop); ags_audio_loop_add_recall(audio_loop, append_recall->playback); } /** * ags_append_recall_new: * @audio_loop: the #AgsAudioLoop * @playback: the #AgsRecall to append * * Creates an #AgsAppendRecall. * * Returns: an new #AgsAppendRecall. * * Since: 1.0.0 */ AgsAppendRecall* ags_append_recall_new(GObject *audio_loop, GObject *playback) { AgsAppendRecall *append_recall; append_recall = (AgsAppendRecall *) g_object_new(AGS_TYPE_APPEND_RECALL, "audio-loop", audio_loop, "playback", playback, NULL); return(append_recall); } gsequencer-1.4.24/ags/audio/task/ags_init_audio.c0000644000175000017500000003002413247044247016631 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include void ags_init_audio_class_init(AgsInitAudioClass *init_audio); void ags_init_audio_connectable_interface_init(AgsConnectableInterface *connectable); void ags_init_audio_init(AgsInitAudio *init_audio); void ags_init_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_init_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_init_audio_connect(AgsConnectable *connectable); void ags_init_audio_disconnect(AgsConnectable *connectable); void ags_init_audio_dispose(GObject *gobject); void ags_init_audio_finalize(GObject *gobject); void ags_init_audio_launch(AgsTask *task); /** * SECTION:ags_init_audio * @short_description: init audio task * @title: AgsInitAudio * @section_id: * @include: ags/audio/task/ags_init_audio.h * * The #AgsInitAudio task inits #AgsAudio. */ static gpointer ags_init_audio_parent_class = NULL; static AgsConnectableInterface *ags_init_audio_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_DO_PLAYBACK, PROP_DO_SEQUENCER, PROP_DO_NOTATION, }; GType ags_init_audio_get_type() { static GType ags_type_init_audio = 0; if(!ags_type_init_audio){ static const GTypeInfo ags_init_audio_info = { sizeof (AgsInitAudioClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_init_audio_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsInitAudio), 0, /* n_preallocs */ (GInstanceInitFunc) ags_init_audio_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_init_audio_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_init_audio = g_type_register_static(AGS_TYPE_TASK, "AgsInitAudio", &ags_init_audio_info, 0); g_type_add_interface_static(ags_type_init_audio, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_init_audio); } void ags_init_audio_class_init(AgsInitAudioClass *init_audio) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_init_audio_parent_class = g_type_class_peek_parent(init_audio); /* gobject */ gobject = (GObjectClass *) init_audio; gobject->set_property = ags_init_audio_set_property; gobject->get_property = ags_init_audio_get_property; gobject->dispose = ags_init_audio_dispose; gobject->finalize = ags_init_audio_finalize; /* properties */ /** * AgsInitAudio:audio: * * The assigned #AgsAudio * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of init audio"), i18n_pspec("The audio of init audio task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsInitAudio:do-playback: * * The effects do-playback. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-playback", i18n_pspec("do playback"), i18n_pspec("Do playback of audio"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_PLAYBACK, param_spec); /** * AgsInitAudio:do-sequencer: * * The effects do-sequencer. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-sequencer", i18n_pspec("do sequencer"), i18n_pspec("Do sequencer of audio"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_SEQUENCER, param_spec); /** * AgsInitAudio:do-notation: * * The effects do-notation. * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-notation", i18n_pspec("do notation"), i18n_pspec("Do notation of audio"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_NOTATION, param_spec); /* task */ task = (AgsTaskClass *) init_audio; task->launch = ags_init_audio_launch; } void ags_init_audio_connectable_interface_init(AgsConnectableInterface *connectable) { ags_init_audio_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_init_audio_connect; connectable->disconnect = ags_init_audio_disconnect; } void ags_init_audio_init(AgsInitAudio *init_audio) { init_audio->audio = NULL; init_audio->do_playback = FALSE; init_audio->do_sequencer = FALSE; init_audio->do_notation = FALSE; } void ags_init_audio_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsInitAudio *init_audio; init_audio = AGS_INIT_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(init_audio->audio == (GObject *) audio){ return; } if(init_audio->audio != NULL){ g_object_unref(init_audio->audio); } if(audio != NULL){ g_object_ref(audio); } init_audio->audio = (GObject *) audio; } break; case PROP_DO_PLAYBACK: { gboolean do_playback; do_playback = g_value_get_boolean(value); init_audio->do_playback = do_playback; } break; case PROP_DO_SEQUENCER: { gboolean do_sequencer; do_sequencer = g_value_get_boolean(value); init_audio->do_sequencer = do_sequencer; } break; case PROP_DO_NOTATION: { gboolean do_notation; do_notation = g_value_get_boolean(value); init_audio->do_notation = do_notation; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_init_audio_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsInitAudio *init_audio; init_audio = AGS_INIT_AUDIO(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, init_audio->audio); } break; case PROP_DO_PLAYBACK: { g_value_set_boolean(value, init_audio->do_playback); } break; case PROP_DO_SEQUENCER: { g_value_set_boolean(value, init_audio->do_sequencer); } break; case PROP_DO_NOTATION: { g_value_set_boolean(value, init_audio->do_notation); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_init_audio_connect(AgsConnectable *connectable) { ags_init_audio_parent_connectable_interface->connect(connectable); /* empty */ } void ags_init_audio_disconnect(AgsConnectable *connectable) { ags_init_audio_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_init_audio_dispose(GObject *gobject) { AgsInitAudio *init_audio; init_audio = AGS_INIT_AUDIO(gobject); if(init_audio->audio != NULL){ g_object_unref(init_audio->audio); init_audio->audio = NULL; } /* call parent */ G_OBJECT_CLASS(ags_init_audio_parent_class)->dispose(gobject); } void ags_init_audio_finalize(GObject *gobject) { AgsInitAudio *init_audio; init_audio = AGS_INIT_AUDIO(gobject); if(init_audio->audio != NULL){ g_object_unref(init_audio->audio); } /* call parent */ G_OBJECT_CLASS(ags_init_audio_parent_class)->finalize(gobject); } void ags_init_audio_launch(AgsTask *task) { AgsAudio *audio; AgsPlaybackDomain *playback_domain; AgsRecallID *recall_id; AgsInitAudio *init_audio; AgsMutexManager *mutex_manager; GList *playback_start, *playback; GList *list, *list_start; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); init_audio = AGS_INIT_AUDIO(task); audio = init_audio->audio; /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); playback_domain = AGS_PLAYBACK_DOMAIN(audio->playback_domain); pthread_mutex_unlock(audio_mutex); /* init audio */ if(init_audio->do_playback){ g_atomic_int_or(&(playback_domain->flags), AGS_PLAYBACK_DOMAIN_PLAYBACK); g_object_get(playback_domain, "playback", &playback_start, NULL); list_start = list = ags_audio_recursive_play_init(audio, TRUE, FALSE, FALSE); playback = playback_start; while(playback != NULL){ // AGS_PLAYBACK(playback->data)->recall_id[0] = list->data; g_atomic_int_or(&(AGS_PLAYBACK(playback->data)->flags), AGS_PLAYBACK_PLAYBACK); playback = playback->next; } g_list_free(playback_start); g_list_free(list_start); } if(init_audio->do_sequencer && (AGS_PLAYBACK_DOMAIN_SEQUENCER & (g_atomic_int_get(&(playback_domain->flags)))) == 0){ g_atomic_int_or(&(playback_domain->flags), AGS_PLAYBACK_DOMAIN_SEQUENCER); g_object_get(playback_domain, "playback", &playback_start, NULL); list_start = list = ags_audio_recursive_play_init(audio, FALSE, TRUE, FALSE); playback = playback_start; while(playback != NULL){ // AGS_PLAYBACK(playback->data)->recall_id[1] = list->data; g_atomic_int_or(&(AGS_PLAYBACK(playback->data)->flags), AGS_PLAYBACK_SEQUENCER); playback = playback->next; } g_list_free(playback_start); g_list_free(list_start); } if(init_audio->do_notation && (AGS_PLAYBACK_DOMAIN_NOTATION & (g_atomic_int_get(&(playback_domain->flags)))) == 0){ g_atomic_int_or(&(playback_domain->flags), AGS_PLAYBACK_DOMAIN_NOTATION); g_object_get(playback_domain, "playback", &playback_start, NULL); list_start = list = ags_audio_recursive_play_init(audio, FALSE, FALSE, TRUE); playback = playback_start; while(playback != NULL){ // AGS_PLAYBACK(playback->data)->recall_id[2] = list->data; g_atomic_int_or(&(AGS_PLAYBACK(playback->data)->flags), AGS_PLAYBACK_NOTATION); playback = playback->next; } g_list_free(playback_start); g_list_free(list_start); } } /** * ags_init_audio_new: * @audio: the #AgsAudio * @do_playback: init playback * @do_sequencer: init sequencer * @do_notation: init notation * * Creates an #AgsInitAudio. * * Returns: an new #AgsInitAudio. * * Since: 1.0.0 */ AgsInitAudio* ags_init_audio_new(AgsAudio *audio, gboolean do_playback, gboolean do_sequencer, gboolean do_notation) { AgsInitAudio *init_audio; init_audio = (AgsInitAudio *) g_object_new(AGS_TYPE_INIT_AUDIO, "audio", audio, "do-playback", do_playback, "do-sequencer", do_sequencer, "do-notation", do_notation, NULL); return(init_audio); } gsequencer-1.4.24/ags/audio/task/ags_save_file.h0000644000175000017500000000347313247044247016457 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SAVE_FILE_H__ #define __AGS_SAVE_FILE_H__ #include #include #include #include #define AGS_TYPE_SAVE_FILE (ags_save_file_get_type()) #define AGS_SAVE_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SAVE_FILE, AgsSaveFile)) #define AGS_SAVE_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SAVE_FILE, AgsSaveFileClass)) #define AGS_IS_SAVE_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SAVE_FILE)) #define AGS_IS_SAVE_FILE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SAVE_FILE)) #define AGS_SAVE_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SAVE_FILE, AgsSaveFileClass)) typedef struct _AgsSaveFile AgsSaveFile; typedef struct _AgsSaveFileClass AgsSaveFileClass; struct _AgsSaveFile { AgsTask task; AgsFile *file; }; struct _AgsSaveFileClass { AgsTaskClass task; }; GType ags_save_file_get_type(); AgsSaveFile* ags_save_file_new(AgsFile *file); #endif /*__AGS_SAVE_FILE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_add_note.h0000644000175000017500000000376613247044247016304 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_NOTE_H__ #define __AGS_ADD_NOTE_H__ #include #include #include #include #include #include #define AGS_TYPE_ADD_NOTE (ags_add_note_get_type()) #define AGS_ADD_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_NOTE, AgsAddNote)) #define AGS_ADD_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_NOTE, AgsAddNoteClass)) #define AGS_IS_ADD_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_NOTE)) #define AGS_IS_ADD_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_NOTE)) #define AGS_ADD_NOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_NOTE, AgsAddNoteClass)) typedef struct _AgsAddNote AgsAddNote; typedef struct _AgsAddNoteClass AgsAddNoteClass; struct _AgsAddNote { AgsTask task; AgsAudio *audio; AgsNotation *notation; AgsNote *note; gboolean use_selection_list; }; struct _AgsAddNoteClass { AgsTaskClass task; }; GType ags_add_note_get_type(); AgsAddNote* ags_add_note_new(AgsNotation *notation, AgsNote *note, gboolean use_selection_list); #endif /*__AGS_ADD_NOTE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_add_point_to_selection.h0000644000175000017500000000453513247044247021232 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_POINT_TO_SELECTION_H__ #define __AGS_ADD_POINT_TO_SELECTION_H__ #include #include #include #include #include #define AGS_TYPE_ADD_POINT_TO_SELECTION (ags_add_point_to_selection_get_type()) #define AGS_ADD_POINT_TO_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_POINT_TO_SELECTION, AgsAddPointToSelection)) #define AGS_ADD_POINT_TO_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_POINT_TO_SELECTION, AgsAddPointToSelectionClass)) #define AGS_IS_ADD_POINT_TO_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_POINT_TO_SELECTION)) #define AGS_IS_ADD_POINT_TO_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_POINT_TO_SELECTION)) #define AGS_ADD_POINT_TO_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_POINT_TO_SELECTION, AgsAddPointToSelectionClass)) typedef struct _AgsAddPointToSelection AgsAddPointToSelection; typedef struct _AgsAddPointToSelectionClass AgsAddPointToSelectionClass; struct _AgsAddPointToSelection { AgsTask task; AgsAudio *audio; AgsNotation *notation; guint x; guint y; gboolean replace_current_selection; }; struct _AgsAddPointToSelectionClass { AgsTaskClass task; }; GType ags_add_point_to_selection_get_type(); AgsAddPointToSelection* ags_add_point_to_selection_new(AgsNotation *notation, guint x, guint y, gboolean replace_current_selection); #endif /*__AGS_ADD_POINT_TO_SELECTION_H__*/ gsequencer-1.4.24/ags/audio/task/ags_switch_buffer_flag.h0000644000175000017500000000401113247044247020332 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_SWITCH_BUFFER_FLAG_H__ #define __AGS_SWITCH_BUFFER_FLAG_H__ #include #include #include #define AGS_TYPE_SWITCH_BUFFER_FLAG (ags_switch_buffer_flag_get_type()) #define AGS_SWITCH_BUFFER_FLAG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SWITCH_BUFFER_FLAG, AgsSwitchBufferFlag)) #define AGS_SWITCH_BUFFER_FLAG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SWITCH_BUFFER_FLAG, AgsSwitchBufferFlagClass)) #define AGS_IS_SWITCH_BUFFER_FLAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SWITCH_BUFFER_FLAG)) #define AGS_IS_SWITCH_BUFFER_FLAG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_SWITCH_BUFFER_FLAG)) #define AGS_SWITCH_BUFFER_FLAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_SWITCH_BUFFER_FLAG, AgsSwitchBufferFlagClass)) typedef struct _AgsSwitchBufferFlag AgsSwitchBufferFlag; typedef struct _AgsSwitchBufferFlagClass AgsSwitchBufferFlagClass; struct _AgsSwitchBufferFlag { AgsTask task; GObject *device; }; struct _AgsSwitchBufferFlagClass { AgsTaskClass task; }; GType ags_switch_buffer_flag_get_type(); AgsSwitchBufferFlag* ags_switch_buffer_flag_new(GObject *device); #endif /*__AGS_SWITCH_BUFFER_FLAG_H__*/ gsequencer-1.4.24/ags/audio/task/ags_remove_point_from_selection.h0000644000175000017500000000461013247044247022312 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REMOVE_POINT_FROM_SELECTION_H__ #define __AGS_REMOVE_POINT_FROM_SELECTION_H__ #include #include #include #include #include #define AGS_TYPE_REMOVE_POINT_FROM_SELECTION (ags_remove_point_from_selection_get_type()) #define AGS_REMOVE_POINT_FROM_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_POINT_FROM_SELECTION, AgsRemovePointFromSelection)) #define AGS_REMOVE_POINT_FROM_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_POINT_FROM_SELECTION, AgsRemovePointFromSelectionClass)) #define AGS_IS_REMOVE_POINT_FROM_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_POINT_FROM_SELECTION)) #define AGS_IS_REMOVE_POINT_FROM_SELECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_POINT_FROM_SELECTION)) #define AGS_REMOVE_POINT_FROM_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_POINT_FROM_SELECTION, AgsRemovePointFromSelectionClass)) typedef struct _AgsRemovePointFromSelection AgsRemovePointFromSelection; typedef struct _AgsRemovePointFromSelectionClass AgsRemovePointFromSelectionClass; struct _AgsRemovePointFromSelection { AgsTask task; AgsAudio *audio; AgsNotation *notation; guint x; guint y; }; struct _AgsRemovePointFromSelectionClass { AgsTaskClass task; }; GType ags_remove_point_from_selection_get_type(); AgsRemovePointFromSelection* ags_remove_point_from_selection_new(AgsNotation *notation, guint x, guint y); #endif /*__AGS_REMOVE_POINT_FROM_SELECTION_H__*/ gsequencer-1.4.24/ags/audio/task/ags_remove_note.c0000644000175000017500000002345713247044247017043 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include void ags_remove_note_class_init(AgsRemoveNoteClass *remove_note); void ags_remove_note_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_note_init(AgsRemoveNote *remove_note); void ags_remove_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_remove_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_remove_note_connect(AgsConnectable *connectable); void ags_remove_note_disconnect(AgsConnectable *connectable); void ags_remove_note_dispose(GObject *gobject); void ags_remove_note_finalize(GObject *gobject); void ags_remove_note_launch(AgsTask *task); /** * SECTION:ags_remove_note * @short_description: remove note object from notation * @title: AgsRemoveNote * @section_id: * @include: ags/audio/task/ags_remove_note.h * * The #AgsRemoveNote task removes #AgsNote from #AgsNotation. */ static gpointer ags_remove_note_parent_class = NULL; static AgsConnectableInterface *ags_remove_note_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO, PROP_NOTATION, PROP_X, PROP_Y, }; GType ags_remove_note_get_type() { static GType ags_type_remove_note = 0; if(!ags_type_remove_note){ static const GTypeInfo ags_remove_note_info = { sizeof (AgsRemoveNoteClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_note_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoveNote), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_note_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_note_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_note = g_type_register_static(AGS_TYPE_TASK, "AgsRemoveNote", &ags_remove_note_info, 0); g_type_add_interface_static(ags_type_remove_note, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_note); } void ags_remove_note_class_init(AgsRemoveNoteClass *remove_note) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_remove_note_parent_class = g_type_class_peek_parent(remove_note); /* gobject */ gobject = (GObjectClass *) remove_note; gobject->set_property = ags_remove_note_set_property; gobject->get_property = ags_remove_note_get_property; gobject->dispose = ags_remove_note_dispose; gobject->finalize = ags_remove_note_finalize; /* properties */ /** * AgsRemoveNote:audio: * * The assigned #AgsAudio * * Since: 1.2.2 */ param_spec = g_param_spec_object("audio", i18n_pspec("audio of add note"), i18n_pspec("The audio of add note task"), AGS_TYPE_AUDIO, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO, param_spec); /** * AgsRemoveNote:notation: * * The assigned #AgsNotation * * Since: 1.0.0 */ param_spec = g_param_spec_object("notation", i18n_pspec("notation of add note"), i18n_pspec("The notation of add note task"), AGS_TYPE_NOTATION, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTATION, param_spec); /** * AgsRemoveNote:x: * * Note offset x. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("x", i18n_pspec("offset x"), i18n_pspec("The x offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_X, param_spec); /** * AgsRemoveNote:y: * * Note offset y. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("y", i18n_pspec("offset y"), i18n_pspec("The y offset"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_Y, param_spec); /* task */ task = (AgsTaskClass *) remove_note; task->launch = ags_remove_note_launch; } void ags_remove_note_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_note_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_note_connect; connectable->disconnect = ags_remove_note_disconnect; } void ags_remove_note_init(AgsRemoveNote *remove_note) { remove_note->audio = NULL; remove_note->notation = NULL; remove_note->x = 0; remove_note->y = 0; } void ags_remove_note_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRemoveNote *remove_note; remove_note = AGS_REMOVE_NOTE(gobject); switch(prop_id){ case PROP_AUDIO: { AgsAudio *audio; audio = (AgsAudio *) g_value_get_object(value); if(remove_note->audio == (GObject *) audio){ return; } if(remove_note->audio != NULL){ g_object_unref(remove_note->audio); } if(audio != NULL){ g_object_ref(audio); } remove_note->audio = (GObject *) audio; } break; case PROP_NOTATION: { AgsNotation *notation; notation = (AgsNotation *) g_value_get_object(value); if(remove_note->notation == (GObject *) notation){ return; } if(remove_note->notation != NULL){ g_object_unref(remove_note->notation); } if(notation != NULL){ g_object_ref(notation); } remove_note->notation = (GObject *) notation; } break; case PROP_X: { remove_note->x = g_value_get_uint(value); } break; case PROP_Y: { remove_note->y = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_note_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRemoveNote *remove_note; remove_note = AGS_REMOVE_NOTE(gobject); switch(prop_id){ case PROP_AUDIO: { g_value_set_object(value, remove_note->audio); } break; case PROP_NOTATION: { g_value_set_object(value, remove_note->notation); } break; case PROP_X: { g_value_set_uint(value, remove_note->x); } break; case PROP_Y: { g_value_set_uint(value, remove_note->y); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_note_connect(AgsConnectable *connectable) { ags_remove_note_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_note_disconnect(AgsConnectable *connectable) { ags_remove_note_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_note_dispose(GObject *gobject) { AgsRemoveNote *remove_note; remove_note = AGS_REMOVE_NOTE(gobject); if(remove_note->audio != NULL){ g_object_unref(remove_note->audio); remove_note->audio = NULL; } if(remove_note->notation != NULL){ g_object_unref(remove_note->notation); remove_note->notation = NULL; } /* call parent */ G_OBJECT_CLASS(ags_remove_note_parent_class)->dispose(gobject); } void ags_remove_note_finalize(GObject *gobject) { AgsRemoveNote *remove_note; remove_note = AGS_REMOVE_NOTE(gobject); if(remove_note->audio != NULL){ g_object_unref(remove_note->audio); } if(remove_note->notation != NULL){ g_object_unref(remove_note->notation); } /* call parent */ G_OBJECT_CLASS(ags_remove_note_parent_class)->finalize(gobject); } void ags_remove_note_launch(AgsTask *task) { AgsRemoveNote *remove_note; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); remove_note = AGS_REMOVE_NOTE(task); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) remove_note->audio); pthread_mutex_unlock(application_mutex); /* remove note */ pthread_mutex_lock(audio_mutex); ags_notation_remove_note_at_position(remove_note->notation, remove_note->x, remove_note->y); pthread_mutex_unlock(audio_mutex); } /** * ags_remove_note_new: * @notation: the #AgsNotation * @x: the x coordinate of #AgsNote * @y: the y coordinate of #AgsNote * * WARNING you should provide the #AgsRemoveNote:audio property. * Creates an #AgsRemoveNote. * * Returns: an new #AgsRemoveNote. * * Since: 1.0.0 */ AgsRemoveNote* ags_remove_note_new(AgsNotation *notation, guint x, guint y) { AgsRemoveNote *remove_note; remove_note = (AgsRemoveNote *) g_object_new(AGS_TYPE_REMOVE_NOTE, "notation", notation, "x", x, "y", y, NULL); return(remove_note); } gsequencer-1.4.24/ags/audio/task/ags_remove_audio_signal.c0000644000175000017500000002255413247044247020531 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_remove_audio_signal_class_init(AgsRemoveAudioSignalClass *remove_audio_signal); void ags_remove_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_audio_signal_init(AgsRemoveAudioSignal *remove_audio_signal); void ags_remove_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_remove_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_remove_audio_signal_connect(AgsConnectable *connectable); void ags_remove_audio_signal_disconnect(AgsConnectable *connectable); void ags_remove_audio_signal_dispose(GObject *gobject); void ags_remove_audio_signal_finalize(GObject *gobject); void ags_remove_audio_signal_launch(AgsTask *task); /** * SECTION:ags_remove_audio_signal * @short_description: remove audio_signal object from recycling * @title: AgsRemoveAudioSignal * @section_id: * @include: ags/audio/task/ags_remove_audio_signal.h * * The #AgsRemoveAudioSignal task removes #AgsAudioSignal from #AgsRecycling. */ static gpointer ags_remove_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_remove_audio_signal_parent_connectable_interface; enum{ PROP_0, PROP_RECYCLING, PROP_AUDIO_SIGNAL, }; GType ags_remove_audio_signal_get_type() { static GType ags_type_remove_audio_signal = 0; if(!ags_type_remove_audio_signal){ static const GTypeInfo ags_remove_audio_signal_info = { sizeof (AgsRemoveAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoveAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_audio_signal = g_type_register_static(AGS_TYPE_TASK, "AgsRemoveAudioSignal", &ags_remove_audio_signal_info, 0); g_type_add_interface_static(ags_type_remove_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_audio_signal); } void ags_remove_audio_signal_class_init(AgsRemoveAudioSignalClass *remove_audio_signal) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_remove_audio_signal_parent_class = g_type_class_peek_parent(remove_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) remove_audio_signal; gobject->set_property = ags_remove_audio_signal_set_property; gobject->get_property = ags_remove_audio_signal_get_property; gobject->dispose = ags_remove_audio_signal_dispose; gobject->finalize = ags_remove_audio_signal_finalize; /* properties */ /** * AgsRemoveAudioSignal:recycling: * * The assigned #AgsRecycling * * Since: 1.0.0 */ param_spec = g_param_spec_object("recycling", i18n_pspec("recycling of remove audio signal"), i18n_pspec("The recycling of remove audio signal task"), AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECYCLING, param_spec); /** * AgsRemoveAudioSignal:audio-signal: * * The assigned #AgsAudioSignal * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-signal", i18n_pspec("audio signal of remove audio signal"), i18n_pspec("The audio signal of remove audio signal task"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_SIGNAL, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) remove_audio_signal; task->launch = ags_remove_audio_signal_launch; } void ags_remove_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_audio_signal_connect; connectable->disconnect = ags_remove_audio_signal_disconnect; } void ags_remove_audio_signal_init(AgsRemoveAudioSignal *remove_audio_signal) { remove_audio_signal->recycling = NULL; remove_audio_signal->audio_signal = NULL; } void ags_remove_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRemoveAudioSignal *remove_audio_signal; remove_audio_signal = AGS_REMOVE_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_RECYCLING: { AgsRecycling *recycling; recycling = (AgsRecycling *) g_value_get_object(value); if(remove_audio_signal->recycling == (GObject *) recycling){ return; } if(remove_audio_signal->recycling != NULL){ g_object_unref(remove_audio_signal->recycling); } if(recycling != NULL){ g_object_ref(recycling); } remove_audio_signal->recycling = (GObject *) recycling; } break; case PROP_AUDIO_SIGNAL: { AgsAudioSignal *audio_signal; audio_signal = (AgsAudioSignal *) g_value_get_object(value); if(remove_audio_signal->audio_signal == (GObject *) audio_signal){ return; } if(remove_audio_signal->audio_signal != NULL){ g_object_unref(remove_audio_signal->audio_signal); } if(audio_signal != NULL){ g_object_ref(audio_signal); } remove_audio_signal->audio_signal = (GObject *) audio_signal; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRemoveAudioSignal *remove_audio_signal; remove_audio_signal = AGS_REMOVE_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_RECYCLING: { g_value_set_object(value, remove_audio_signal->recycling); } break; case PROP_AUDIO_SIGNAL: { g_value_set_object(value, remove_audio_signal->audio_signal); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_audio_signal_connect(AgsConnectable *connectable) { ags_remove_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_audio_signal_disconnect(AgsConnectable *connectable) { ags_remove_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_audio_signal_dispose(GObject *gobject) { AgsRemoveAudioSignal *remove_audio_signal; remove_audio_signal = AGS_REMOVE_AUDIO_SIGNAL(gobject); if(remove_audio_signal->recycling != NULL){ g_object_unref(remove_audio_signal->recycling); remove_audio_signal->recycling = NULL; } if(remove_audio_signal->audio_signal != NULL){ g_object_unref(remove_audio_signal->audio_signal); remove_audio_signal->audio_signal = NULL; } /* call parent */ G_OBJECT_CLASS(ags_remove_audio_signal_parent_class)->dispose(gobject); } void ags_remove_audio_signal_finalize(GObject *gobject) { AgsRemoveAudioSignal *remove_audio_signal; remove_audio_signal = AGS_REMOVE_AUDIO_SIGNAL(gobject); if(remove_audio_signal->recycling != NULL){ g_object_unref(remove_audio_signal->recycling); } if(remove_audio_signal->audio_signal != NULL){ g_object_unref(remove_audio_signal->audio_signal); } /* call parent */ G_OBJECT_CLASS(ags_remove_audio_signal_parent_class)->finalize(gobject); } void ags_remove_audio_signal_launch(AgsTask *task) { AgsRemoveAudioSignal *remove_audio_signal; remove_audio_signal = AGS_REMOVE_AUDIO_SIGNAL(task); ags_recycling_remove_audio_signal(remove_audio_signal->recycling, remove_audio_signal->audio_signal); } /** * ags_remove_audio_signal_new: * @recycling: the #AgsRecycling * @audio_signal: the #AgsAudioSignal to remove * * Creates an #AgsRemoveAudioSignal. * * Returns: an new #AgsRemoveAudioSignal. * * Since: 1.0.0 */ AgsRemoveAudioSignal* ags_remove_audio_signal_new(AgsRecycling *recycling, AgsAudioSignal *audio_signal) { AgsRemoveAudioSignal *remove_audio_signal; remove_audio_signal = (AgsRemoveAudioSignal *) g_object_new(AGS_TYPE_REMOVE_AUDIO_SIGNAL, "recycling", recycling, "audio-signal", audio_signal, NULL); return(remove_audio_signal); } gsequencer-1.4.24/ags/audio/task/ags_remove_audio.h0000644000175000017500000000370513247044247017176 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REMOVE_AUDIO_H__ #define __AGS_REMOVE_AUDIO_H__ #include #include #include #include #define AGS_TYPE_REMOVE_AUDIO (ags_remove_audio_get_type()) #define AGS_REMOVE_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_AUDIO, AgsRemoveAudio)) #define AGS_REMOVE_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_AUDIO, AgsRemoveAudioClass)) #define AGS_IS_REMOVE_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_AUDIO)) #define AGS_IS_REMOVE_AUDIO_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_AUDIO)) #define AGS_REMOVE_AUDIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_AUDIO, AgsRemoveAudioClass)) typedef struct _AgsRemoveAudio AgsRemoveAudio; typedef struct _AgsRemoveAudioClass AgsRemoveAudioClass; struct _AgsRemoveAudio { AgsTask task; GObject *soundcard; AgsAudio *audio; }; struct _AgsRemoveAudioClass { AgsTaskClass task; }; GType ags_remove_audio_get_type(); AgsRemoveAudio* ags_remove_audio_new(GObject *soundcard, AgsAudio *audio); #endif /*__AGS_REMOVE_AUDIO_H__*/ gsequencer-1.4.24/ags/audio/task/ags_clear_audio_signal.c0000644000175000017500000002261613247044247020321 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include void ags_clear_audio_signal_class_init(AgsClearAudioSignalClass *clear_audio_signal); void ags_clear_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_clear_audio_signal_init(AgsClearAudioSignal *clear_audio_signal); void ags_clear_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_clear_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_clear_audio_signal_connect(AgsConnectable *connectable); void ags_clear_audio_signal_disconnect(AgsConnectable *connectable); void ags_clear_audio_signal_dispose(GObject *gobject); void ags_clear_audio_signal_finalize(GObject *gobject); void ags_clear_audio_signal_launch(AgsTask *task); /** * SECTION:ags_clear_audio_signal * @short_description: clear audio_signal object from recycling * @title: AgsClearAudioSignal * @section_id: * @include: ags/audio/task/ags_clear_audio_signal.h * * The #AgsClearAudioSignal task clears #AgsAudioSignal from #AgsRecycling. */ static gpointer ags_clear_audio_signal_parent_class = NULL; static AgsConnectableInterface *ags_clear_audio_signal_parent_connectable_interface; enum{ PROP_0, PROP_AUDIO_SIGNAL, }; GType ags_clear_audio_signal_get_type() { static GType ags_type_clear_audio_signal = 0; if(!ags_type_clear_audio_signal){ static const GTypeInfo ags_clear_audio_signal_info = { sizeof (AgsClearAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_clear_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsClearAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_clear_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_clear_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_clear_audio_signal = g_type_register_static(AGS_TYPE_TASK, "AgsClearAudioSignal", &ags_clear_audio_signal_info, 0); g_type_add_interface_static(ags_type_clear_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_clear_audio_signal); } void ags_clear_audio_signal_class_init(AgsClearAudioSignalClass *clear_audio_signal) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_clear_audio_signal_parent_class = g_type_class_peek_parent(clear_audio_signal); /* GObjectClass */ gobject = (GObjectClass *) clear_audio_signal; gobject->set_property = ags_clear_audio_signal_set_property; gobject->get_property = ags_clear_audio_signal_get_property; gobject->finalize = ags_clear_audio_signal_finalize; /* properties */ /** * AgsClearAudioSignal:audio-signal: * * The assigned #AgsAudioSignal * * Since: 1.0.0 */ param_spec = g_param_spec_object("audio-signal", i18n_pspec("audio signal of clear audio signal"), i18n_pspec("The audio signal of clear audio signal task"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_SIGNAL, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) clear_audio_signal; task->launch = ags_clear_audio_signal_launch; } void ags_clear_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { ags_clear_audio_signal_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_clear_audio_signal_connect; connectable->disconnect = ags_clear_audio_signal_disconnect; } void ags_clear_audio_signal_init(AgsClearAudioSignal *clear_audio_signal) { clear_audio_signal->audio_signal = NULL; } void ags_clear_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsClearAudioSignal *clear_audio_signal; clear_audio_signal = AGS_CLEAR_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_AUDIO_SIGNAL: { AgsAudioSignal *audio_signal; audio_signal = (AgsAudioSignal *) g_value_get_object(value); if(clear_audio_signal->audio_signal == (GObject *) audio_signal){ return; } if(clear_audio_signal->audio_signal != NULL){ g_object_unref(clear_audio_signal->audio_signal); } if(audio_signal != NULL){ g_object_ref(audio_signal); } clear_audio_signal->audio_signal = (GObject *) audio_signal; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_clear_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsClearAudioSignal *clear_audio_signal; clear_audio_signal = AGS_CLEAR_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_AUDIO_SIGNAL: { g_value_set_object(value, clear_audio_signal->audio_signal); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_clear_audio_signal_connect(AgsConnectable *connectable) { ags_clear_audio_signal_parent_connectable_interface->connect(connectable); /* empty */ } void ags_clear_audio_signal_disconnect(AgsConnectable *connectable) { ags_clear_audio_signal_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_clear_audio_signal_dispose(GObject *gobject) { AgsClearAudioSignal *clear_audio_signal; clear_audio_signal = AGS_CLEAR_AUDIO_SIGNAL(gobject); if(clear_audio_signal->audio_signal != NULL){ g_object_unref(clear_audio_signal->audio_signal); clear_audio_signal->audio_signal = NULL; } /* call parent */ G_OBJECT_CLASS(ags_clear_audio_signal_parent_class)->dispose(gobject); } void ags_clear_audio_signal_finalize(GObject *gobject) { AgsClearAudioSignal *clear_audio_signal; clear_audio_signal = AGS_CLEAR_AUDIO_SIGNAL(gobject); if(clear_audio_signal->audio_signal != NULL){ g_object_unref(clear_audio_signal->audio_signal); } /* call parent */ G_OBJECT_CLASS(ags_clear_audio_signal_parent_class)->finalize(gobject); } void ags_clear_audio_signal_launch(AgsTask *task) { AgsClearAudioSignal *clear_audio_signal; AgsAudioSignal *audio_signal; AgsMutexManager *mutex_manager; GList *stream; pthread_mutex_t *application_mutex; pthread_mutex_t *recycling_mutex; clear_audio_signal = AGS_CLEAR_AUDIO_SIGNAL(task); /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* clear */ audio_signal = clear_audio_signal->audio_signal; /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio_signal->recycling); pthread_mutex_unlock(application_mutex); /* clear the stream */ pthread_mutex_lock(recycling_mutex); stream = audio_signal->stream_beginning; while(stream != NULL){ ags_audio_buffer_util_clear_buffer(stream->data, 1, audio_signal->buffer_size, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); stream = stream->next; } if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) != 0){ GList *rt_template; rt_template = AGS_RECYCLING(audio_signal->recycling)->audio_signal; while(rt_template != NULL){ if((AGS_AUDIO_SIGNAL_RT_TEMPLATE & (AGS_AUDIO_SIGNAL(rt_template->data)->flags)) != 0){ /* clear the stream */ stream = AGS_AUDIO_SIGNAL(rt_template->data)->stream_beginning; while(stream != NULL){ ags_audio_buffer_util_clear_buffer(stream->data, 1, audio_signal->buffer_size, ags_audio_buffer_util_format_from_soundcard(audio_signal->format)); stream = stream->next; } } rt_template = rt_template->next; } } pthread_mutex_unlock(recycling_mutex); } /** * ags_clear_audio_signal_new: * @audio_signal: the #AgsAudioSignal to clear * * Creates an #AgsClearAudioSignal. * * Returns: an new #AgsClearAudioSignal. * * Since: 1.0.0 */ AgsClearAudioSignal* ags_clear_audio_signal_new(AgsAudioSignal *audio_signal) { AgsClearAudioSignal *clear_audio_signal; clear_audio_signal = (AgsClearAudioSignal *) g_object_new(AGS_TYPE_CLEAR_AUDIO_SIGNAL, "audio-signal", audio_signal, NULL); return(clear_audio_signal); } gsequencer-1.4.24/ags/audio/task/ags_cancel_recall.h0000644000175000017500000000402213247044247017260 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_CANCEL_RECALL_H__ #define __AGS_CANCEL_RECALL_H__ #include #include #include #include #include #define AGS_TYPE_CANCEL_RECALL (ags_cancel_recall_get_type()) #define AGS_CANCEL_RECALL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CANCEL_RECALL, AgsCancelRecall)) #define AGS_CANCEL_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_CANCEL_RECALL, AgsCancelRecallClass)) #define AGS_IS_CANCEL_RECALL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CANCEL_RECALL)) #define AGS_IS_CANCEL_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_CANCEL_RECALL)) #define AGS_CANCEL_RECALL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_CANCEL_RECALL, AgsCancelRecallClass)) typedef struct _AgsCancelRecall AgsCancelRecall; typedef struct _AgsCancelRecallClass AgsCancelRecallClass; struct _AgsCancelRecall { AgsTask task; AgsRecall *recall; AgsPlayback *playback; }; struct _AgsCancelRecallClass { AgsTaskClass task; }; GType ags_cancel_recall_get_type(); AgsCancelRecall* ags_cancel_recall_new(AgsRecall *recall, AgsPlayback *playback); #endif /*__AGS_CANCEL_RECALL_H__*/ gsequencer-1.4.24/ags/audio/task/ags_apply_synth.c0000644000175000017500000010112313247044247017056 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include #include #include #include #include #include #include #include void ags_apply_synth_class_init(AgsApplySynthClass *apply_synth); void ags_apply_synth_connectable_interface_init(AgsConnectableInterface *connectable); void ags_apply_synth_init(AgsApplySynth *apply_synth); void ags_apply_synth_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_apply_synth_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_apply_synth_connect(AgsConnectable *connectable); void ags_apply_synth_disconnect(AgsConnectable *connectable); void ags_apply_synth_dispose(GObject *gobject); void ags_apply_synth_finalize(GObject *gobject); void ags_apply_synth_launch(AgsTask *task); /** * SECTION:ags_apply_synth * @short_description: apply synth to channel * @title: AgsApplySynth * @section_id: * @include: ags/audio/task/ags_apply_synth.h * * The #AgsApplySynth task apply the specified synth to channel. */ static gpointer ags_apply_synth_parent_class = NULL; static AgsConnectableInterface *ags_apply_synth_parent_connectable_interface; enum{ PROP_0, PROP_START_CHANNEL, PROP_COUNT, PROP_FIXED_LENGTH, PROP_WAVE, PROP_BASE_NOTE, PROP_FREQUENCY, PROP_VOLUME, PROP_PHASE, PROP_START_FREQUENCY, PROP_DELAY, PROP_ATTACK, PROP_FRAME_COUNT, PROP_LOOP_START, PROP_LOOP_END, PROP_DO_SYNC, PROP_SYNC_MODE, PROP_SYNC_POINT, PROP_SYNC_POINT_COUNT, }; GType ags_apply_synth_get_type() { static GType ags_type_apply_synth = 0; if(!ags_type_apply_synth){ static const GTypeInfo ags_apply_synth_info = { sizeof (AgsApplySynthClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_apply_synth_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsApplySynth), 0, /* n_preallocs */ (GInstanceInitFunc) ags_apply_synth_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_apply_synth_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_apply_synth = g_type_register_static(AGS_TYPE_TASK, "AgsApplySynth", &ags_apply_synth_info, 0); g_type_add_interface_static(ags_type_apply_synth, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_apply_synth); } void ags_apply_synth_class_init(AgsApplySynthClass *apply_synth) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_apply_synth_parent_class = g_type_class_peek_parent(apply_synth); /* GObjectClass */ gobject = (GObjectClass *) apply_synth; gobject->set_property = ags_apply_synth_set_property; gobject->get_property = ags_apply_synth_get_property; gobject->dispose = ags_apply_synth_dispose; gobject->finalize = ags_apply_synth_finalize; /* properties */ /** * AgsApplySynth:start-channel: * * The assigned #AgsChannel * * Since: 1.0.0 */ param_spec = g_param_spec_object("start-channel", i18n_pspec("start channel of apply synth"), i18n_pspec("The start channel of apply synth task"), AGS_TYPE_CHANNEL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_START_CHANNEL, param_spec); /** * AgsApplySynth:count: * * The count of channels to apply. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("count", i18n_pspec("count of channels"), i18n_pspec("The count of channels to apply"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_COUNT, param_spec); /** * AgsApplySynth:fixed-length: * * If apply fixed length * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("fixed-length", i18n_pspec("fixed length"), i18n_pspec("Use fixed length to creat audio data"), TRUE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIXED_LENGTH, param_spec); /** * AgsApplySynth:wave: * * The wave of wave. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("wave", i18n_pspec("wave"), i18n_pspec("The wave"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_WAVE, param_spec); /** * AgsApplySynth:base-note: * * The base-note to ramp up from. * * Since: 1.0.0 */ param_spec = g_param_spec_double("base-note", i18n_pspec("base note"), i18n_pspec("The base note to ramp up from"), -78.0, 78.0, -48.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BASE_NOTE, param_spec); /** * AgsApplySynth:frequency: * * The frequency of wave. * * Since: 1.0.0 */ param_spec = g_param_spec_double("frequency", i18n_pspec("frequency of wave"), i18n_pspec("The frequency of wave"), 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FREQUENCY, param_spec); /** * AgsApplySynth:volume: * * The volume of wave. * * Since: 1.0.0 */ param_spec = g_param_spec_double("volume", i18n_pspec("volume of wave"), i18n_pspec("The volume of wave"), 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_VOLUME, param_spec); /** * AgsApplySynth:phase: * * The phase of wave. * * Since: 1.0.0 */ param_spec = g_param_spec_double("phase", i18n_pspec("phase of wave"), i18n_pspec("The phase of wave"), 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_PHASE, param_spec); /** * AgsApplySynth:start-frequency: * * The start frequency as base of wave. * * Since: 1.0.0 */ param_spec = g_param_spec_double("start-frequency", i18n_pspec("start frequency"), i18n_pspec("The start frequency"), -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_START_FREQUENCY, param_spec); /** * AgsApplySynth:delay: * * The delay. * * Since: 1.1.0 */ param_spec = g_param_spec_double("delay", i18n_pspec("delay"), i18n_pspec("The delay"), 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY, param_spec); /** * AgsApplySynth:attack: * * The attack of audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("attack", i18n_pspec("attack of audio data"), i18n_pspec("The attack of audio data"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsApplySynth:frame-count: * * The frame count of audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("frame-count", i18n_pspec("frame count of audio data"), i18n_pspec("The frame count of audio data"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FRAME_COUNT, param_spec); /** * AgsApplySynth:loop-start: * * The loop start of audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("loop-start", i18n_pspec("loop start of audio data"), i18n_pspec("The loop start of audio data"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LOOP_START, param_spec); /** * AgsApplySynth:loop-end: * * The loop end of audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("loop-end", i18n_pspec("loop end of audio data"), i18n_pspec("The loop end of audio data"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LOOP_END, param_spec); /** * AgsApplySynth:do-sync: * * If do sync * * Since: 1.0.0 */ param_spec = g_param_spec_boolean("do-sync", i18n_pspec("do sync"), i18n_pspec("Do sync by zero-cross detection"), TRUE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DO_SYNC, param_spec); /** * AgsApplySynth:sync-mode: * * The sync mode to use. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("sync-mode", i18n_pspec("sync mode"), i18n_pspec("The sync mode to use"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SYNC_MODE, param_spec); /** * AgsApplySynth:sync-point: * * The sync point to use. * * Since: 1.1.0 */ param_spec = g_param_spec_pointer("sync-point", i18n_pspec("sync point"), i18n_pspec("The sync point to use"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SYNC_POINT, param_spec); /** * AgsApplySynth:sync-point-count: * * The sync point count of audio data. * * Since: 1.1.0 */ param_spec = g_param_spec_uint("sync-point-count", i18n_pspec("sync point count of audio data"), i18n_pspec("The sync point count of audio data"), 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SYNC_POINT_COUNT, param_spec); /* AgsTaskClass */ task = (AgsTaskClass *) apply_synth; task->launch = ags_apply_synth_launch; } void ags_apply_synth_connectable_interface_init(AgsConnectableInterface *connectable) { ags_apply_synth_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_apply_synth_connect; connectable->disconnect = ags_apply_synth_disconnect; } void ags_apply_synth_init(AgsApplySynth *apply_synth) { apply_synth->start_channel = NULL; apply_synth->count = 0; apply_synth->fixed_length = TRUE; apply_synth->wave = AGS_APPLY_SYNTH_INVALID; apply_synth->base_note = -48.0; apply_synth->frequency = 0.0; apply_synth->volume = 1.0; apply_synth->phase = 0.0; apply_synth->start_frequency = 0.0; apply_synth->delay = 0.0; apply_synth->attack = 0; apply_synth->frame_count = 0; apply_synth->loop_start = 0; apply_synth->loop_end = 0; apply_synth->do_sync = FALSE; apply_synth->sync_mode = 0; apply_synth->sync_point = NULL; apply_synth->sync_point_count = 0; } void ags_apply_synth_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsApplySynth *apply_synth; apply_synth = AGS_APPLY_SYNTH(gobject); switch(prop_id){ case PROP_START_CHANNEL: { AgsChannel *start_channel; start_channel = (AgsChannel *) g_value_get_object(value); if(apply_synth->start_channel == (GObject *) start_channel){ return; } if(apply_synth->start_channel != NULL){ g_object_unref(apply_synth->start_channel); } if(start_channel != NULL){ g_object_ref(start_channel); } apply_synth->start_channel = (GObject *) start_channel; } break; case PROP_COUNT: { apply_synth->count = g_value_get_uint(value); } break; case PROP_FIXED_LENGTH: { apply_synth->fixed_length = g_value_get_boolean(value); } break; case PROP_WAVE: { apply_synth->wave = g_value_get_uint(value); } break; case PROP_BASE_NOTE: { apply_synth->base_note = g_value_get_double(value); } break; case PROP_FREQUENCY: { apply_synth->frequency = g_value_get_double(value); } break; case PROP_VOLUME: { apply_synth->volume = g_value_get_double(value); } break; case PROP_PHASE: { apply_synth->phase = g_value_get_double(value); } break; case PROP_START_FREQUENCY: { apply_synth->start_frequency = g_value_get_double(value); } break; case PROP_DELAY: { apply_synth->delay = g_value_get_double(value); } break; case PROP_ATTACK: { apply_synth->attack = g_value_get_uint(value); } break; case PROP_FRAME_COUNT: { apply_synth->frame_count = g_value_get_uint(value); } break; case PROP_LOOP_START: { apply_synth->loop_start = g_value_get_uint(value); } break; case PROP_LOOP_END: { apply_synth->loop_end = g_value_get_uint(value); } break; case PROP_DO_SYNC: { apply_synth->do_sync = g_value_get_boolean(value); } break; case PROP_SYNC_MODE: { apply_synth->sync_mode = g_value_get_uint(value); } break; case PROP_SYNC_POINT: { gpointer sync_point; sync_point = g_value_get_pointer(value); if(apply_synth->sync_point != NULL){ guint i; for(i = 0; i < apply_synth->sync_point_count; i++){ ags_complex_free(apply_synth->sync_point[i]); } g_free(apply_synth->sync_point); } apply_synth->sync_point = sync_point; } break; case PROP_SYNC_POINT_COUNT: { apply_synth->sync_point_count = g_value_get_uint(value); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_synth_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsApplySynth *apply_synth; apply_synth = AGS_APPLY_SYNTH(gobject); switch(prop_id){ case PROP_START_CHANNEL: { g_value_set_object(value, apply_synth->start_channel); } break; case PROP_COUNT: { g_value_set_uint(value, apply_synth->count); } break; case PROP_FIXED_LENGTH: { g_value_set_boolean(value, apply_synth->fixed_length); } break; case PROP_WAVE: { g_value_set_uint(value, apply_synth->wave); } break; case PROP_BASE_NOTE: { g_value_set_double(value, apply_synth->base_note); } break; case PROP_FREQUENCY: { g_value_set_double(value, apply_synth->frequency); } break; case PROP_VOLUME: { g_value_set_double(value, apply_synth->volume); } break; case PROP_PHASE: { g_value_set_double(value, apply_synth->phase); } break; case PROP_START_FREQUENCY: { g_value_set_double(value, apply_synth->start_frequency); } break; case PROP_DELAY: { g_value_set_double(value, apply_synth->delay); } break; case PROP_ATTACK: { g_value_set_uint(value, apply_synth->attack); } break; case PROP_FRAME_COUNT: { g_value_set_uint(value, apply_synth->frame_count); } break; case PROP_LOOP_START: { g_value_set_uint(value, apply_synth->loop_start); } break; case PROP_LOOP_END: { g_value_set_uint(value, apply_synth->loop_end); } break; case PROP_DO_SYNC: { g_value_set_boolean(value, apply_synth->do_sync); } break; case PROP_SYNC_MODE: { g_value_set_uint(value, apply_synth->sync_mode); } break; case PROP_SYNC_POINT: { g_value_set_uint(value, apply_synth->sync_point_count); } break; case PROP_SYNC_POINT_COUNT: { g_value_set_pointer(value, apply_synth->sync_point); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_apply_synth_connect(AgsConnectable *connectable) { ags_apply_synth_parent_connectable_interface->connect(connectable); /* empty */ } void ags_apply_synth_disconnect(AgsConnectable *connectable) { ags_apply_synth_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_apply_synth_dispose(GObject *gobject) { AgsApplySynth *apply_synth; apply_synth = AGS_APPLY_SYNTH(gobject); if(apply_synth->start_channel != NULL){ g_object_unref(apply_synth->start_channel); apply_synth->start_channel = NULL; } /* call parent */ G_OBJECT_CLASS(ags_apply_synth_parent_class)->dispose(gobject); } void ags_apply_synth_finalize(GObject *gobject) { AgsApplySynth *apply_synth; apply_synth = AGS_APPLY_SYNTH(gobject); if(apply_synth->start_channel != NULL){ g_object_unref(apply_synth->start_channel); } if(apply_synth->sync_point != NULL){ guint i; for(i = 0; i < apply_synth->sync_point_count; i++){ ags_complex_free(apply_synth->sync_point[i]); } g_free(apply_synth->sync_point); } /* call parent */ G_OBJECT_CLASS(ags_apply_synth_parent_class)->finalize(gobject); } void ags_apply_synth_launch(AgsTask *task) { AgsApplySynth *apply_synth; AgsAudio *audio; AgsChannel *channel, *input; AgsRecycling *first_recycling; AgsAudioSignal *audio_signal; AgsSynthGenerator *synth_generator; AgsMutexManager *mutex_manager; GList *rt_template; GList *stream; gchar *str; gint wave; guint oscillator; guint samplerate; guint format; guint buffer_size; gdouble note; double phase, frequency, volume; gdouble delay; guint attack; guint frame_count; gboolean do_sync; AgsComplex **sync_point; guint sync_point_count; guint audio_flags; guint i; pthread_mutex_t *application_mutex; pthread_mutex_t *audio_mutex; pthread_mutex_t *channel_mutex; pthread_mutex_t *input_mutex; pthread_mutex_t *recycling_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); apply_synth = AGS_APPLY_SYNTH(task); channel = apply_synth->start_channel; /* some settings */ frame_count = apply_synth->frame_count; delay = apply_synth->delay; attack = apply_synth->attack; wave = (gint) apply_synth->wave; switch(wave){ case AGS_APPLY_SYNTH_SIN: oscillator = AGS_SYNTH_GENERATOR_OSCILLATOR_SIN; break; case AGS_APPLY_SYNTH_SAW: oscillator = AGS_SYNTH_GENERATOR_OSCILLATOR_SAWTOOTH; break; case AGS_APPLY_SYNTH_TRIANGLE: oscillator = AGS_SYNTH_GENERATOR_OSCILLATOR_TRIANGLE; break; case AGS_APPLY_SYNTH_SQUARE: oscillator = AGS_SYNTH_GENERATOR_OSCILLATOR_SQUARE; break; default: g_warning("ags_apply_synth_launch_write: warning no wave selected\n"); } #ifdef AGS_DEBUG g_message("wave = %d\n", wave); #endif frequency = apply_synth->frequency; phase = apply_synth->phase; volume = apply_synth->volume; sync_point = apply_synth->sync_point; sync_point_count = apply_synth->sync_point_count; /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); audio = channel->audio; pthread_mutex_unlock(channel_mutex); /* get audio mutex */ pthread_mutex_lock(application_mutex); audio_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) audio); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(audio_mutex); audio_flags = audio->flags; pthread_mutex_unlock(audio_mutex); /* fill */ if(AGS_IS_INPUT(channel)){ if((AGS_AUDIO_HAS_NOTATION & (audio_flags)) != 0){ /* compute */ channel = apply_synth->start_channel; for(i = 0; channel != NULL && i < apply_synth->count; i++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); first_recycling = channel->first_recycling; synth_generator = AGS_INPUT(channel)->synth_generator; pthread_mutex_unlock(channel_mutex); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_recycling); pthread_mutex_unlock(application_mutex); /* creat synth generator if needed */ if(synth_generator == NULL){ guint samplerate; guint buffer_size; guint format; synth_generator = (GObject *) ags_synth_generator_new(); /* get template */ pthread_mutex_lock(recycling_mutex); audio_signal = ags_audio_signal_get_template(first_recycling->audio_signal); if(audio_signal == NULL){ audio_signal = ags_audio_signal_new(first_recycling->soundcard, first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, audio_signal); } samplerate = audio_signal->samplerate; buffer_size = audio_signal->buffer_size; format = audio_signal->format; pthread_mutex_unlock(recycling_mutex); /* set properties */ g_object_set(synth_generator, "samplerate", samplerate, "buffer-size", buffer_size, "format", format, NULL); /* set synth generator */ pthread_mutex_lock(channel_mutex); AGS_INPUT(channel)->synth_generator = synth_generator; pthread_mutex_unlock(channel_mutex); } /* set properties */ pthread_mutex_lock(channel_mutex); g_object_set(synth_generator, "frame-count", frame_count, "delay", delay, "attack", attack, "oscillator", oscillator, "frequency", frequency, "phase", phase, "volume", volume, NULL); pthread_mutex_unlock(channel_mutex); /* get template */ pthread_mutex_lock(recycling_mutex); audio_signal = ags_audio_signal_get_template(first_recycling->audio_signal); if(audio_signal == NULL){ audio_signal = ags_audio_signal_new(first_recycling->soundcard, first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, audio_signal); } /* compute audio signal */ note = (apply_synth->base_note) + (gdouble) i; ags_synth_generator_compute_extended(synth_generator, audio_signal, note, sync_point, sync_point_count); rt_template = first_recycling->audio_signal; while(rt_template != NULL){ if((AGS_AUDIO_SIGNAL_RT_TEMPLATE & (AGS_AUDIO_SIGNAL(rt_template->data)->flags)) != 0){ ags_synth_generator_compute_extended(synth_generator, rt_template->data, note, sync_point, sync_point_count); } rt_template = rt_template->next; } pthread_mutex_unlock(recycling_mutex); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } }else{ /* compute */ channel = apply_synth->start_channel; for(i = 0; channel != NULL && i < apply_synth->count; i++){ /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); first_recycling = channel->first_recycling; synth_generator = AGS_INPUT(channel)->synth_generator; pthread_mutex_unlock(channel_mutex); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_recycling); pthread_mutex_unlock(application_mutex); /* creat synth generator if needed */ if(synth_generator == NULL){ guint samplerate; guint buffer_size; guint format; synth_generator = (GObject *) ags_synth_generator_new(); /* get template */ pthread_mutex_lock(recycling_mutex); audio_signal = ags_audio_signal_get_template(first_recycling->audio_signal); if(audio_signal == NULL){ audio_signal = ags_audio_signal_new(first_recycling->soundcard, first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, audio_signal); } samplerate = audio_signal->samplerate; buffer_size = audio_signal->buffer_size; format = audio_signal->format; pthread_mutex_unlock(recycling_mutex); /* set properties */ g_object_set(synth_generator, "samplerate", samplerate, "buffer-size", buffer_size, "format", format, NULL); /* set synth generator */ pthread_mutex_lock(channel_mutex); AGS_INPUT(channel)->synth_generator = synth_generator; pthread_mutex_unlock(channel_mutex); } /* set properties */ pthread_mutex_lock(channel_mutex); g_object_set(synth_generator, "frame-count", frame_count, "delay", delay, "attack", attack, "oscillator", oscillator, "frequency", frequency, "phase", phase, "volume", volume, NULL); pthread_mutex_unlock(channel_mutex); /* get template */ pthread_mutex_lock(recycling_mutex); audio_signal = ags_audio_signal_get_template(first_recycling->audio_signal); if(audio_signal == NULL){ audio_signal = ags_audio_signal_new(first_recycling->soundcard, first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, audio_signal); } /* compute audio signal */ note = (apply_synth->base_note); ags_synth_generator_compute_extended(AGS_INPUT(channel)->synth_generator, audio_signal, note, sync_point, sync_point_count); rt_template = first_recycling->audio_signal; while(rt_template != NULL){ if((AGS_AUDIO_SIGNAL_RT_TEMPLATE & (AGS_AUDIO_SIGNAL(rt_template->data)->flags)) != 0){ ags_synth_generator_compute_extended(synth_generator, rt_template->data, note, sync_point, sync_point_count); } rt_template = rt_template->next; } pthread_mutex_unlock(recycling_mutex); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } } }else{ if((AGS_AUDIO_HAS_NOTATION & (audio_flags)) == 0){ pthread_mutex_lock(audio_mutex); input = audio->input; pthread_mutex_unlock(audio_mutex); while(input != NULL){ /* get channel mutex */ pthread_mutex_lock(application_mutex); input_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) input); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(input_mutex); first_recycling = input->first_recycling; synth_generator = AGS_INPUT(input)->synth_generator; pthread_mutex_unlock(input_mutex); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_recycling); pthread_mutex_unlock(application_mutex); /* creat synth generator if needed */ if(synth_generator == NULL){ synth_generator = (GObject *) ags_synth_generator_new(); /* get template */ pthread_mutex_lock(recycling_mutex); audio_signal = ags_audio_signal_get_template(first_recycling->audio_signal); if(audio_signal == NULL){ audio_signal = ags_audio_signal_new(first_recycling->soundcard, first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, audio_signal); } samplerate = audio_signal->samplerate; buffer_size = audio_signal->buffer_size; format = audio_signal->format; pthread_mutex_unlock(recycling_mutex); /* set properties */ g_object_set(synth_generator, "samplerate", samplerate, "buffer-size", buffer_size, "format", format, NULL); /* set synth generator */ pthread_mutex_lock(input_mutex); g_object_set(input, "synth-generator", synth_generator, NULL); pthread_mutex_unlock(input_mutex); } /* set properties */ g_object_set(synth_generator, "frame-count", frame_count, "delay", delay, "attack", attack, "oscillator", oscillator, "frequency", frequency, "phase", phase, "volume", volume, NULL); /* compute audio signal */ channel = apply_synth->start_channel; for(i = 0; channel != NULL && i < apply_synth->count; i++){ #ifdef AGS_DEBUG g_message("apply synth %d", i); #endif /* get channel mutex */ pthread_mutex_lock(application_mutex); channel_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) channel); pthread_mutex_unlock(application_mutex); /* get some fields */ pthread_mutex_lock(channel_mutex); first_recycling = channel->first_recycling; pthread_mutex_unlock(channel_mutex); /* get recycling mutex */ pthread_mutex_lock(application_mutex); recycling_mutex = ags_mutex_manager_lookup(mutex_manager, (GObject *) first_recycling); pthread_mutex_unlock(application_mutex); /* get template */ pthread_mutex_lock(recycling_mutex); audio_signal = ags_audio_signal_get_template(first_recycling->audio_signal); if(audio_signal == NULL){ audio_signal = ags_audio_signal_new(first_recycling->soundcard, first_recycling, NULL); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(first_recycling, audio_signal); } /* compute audio signal */ note = (apply_synth->base_note) + (gdouble) i; ags_synth_generator_compute_extended(synth_generator, audio_signal, note, sync_point, sync_point_count); rt_template = first_recycling->audio_signal; while(rt_template != NULL){ if((AGS_AUDIO_SIGNAL_RT_TEMPLATE & (AGS_AUDIO_SIGNAL(rt_template->data)->flags)) != 0){ ags_synth_generator_compute_extended(synth_generator, rt_template->data, note, sync_point, sync_point_count); } rt_template = rt_template->next; } pthread_mutex_unlock(recycling_mutex); /* iterate */ pthread_mutex_lock(channel_mutex); channel = channel->next; pthread_mutex_unlock(channel_mutex); } /* iterate */ pthread_mutex_lock(input_mutex); input = input->next; pthread_mutex_unlock(input_mutex); } } } } /** * ags_apply_synth_new: * @start_channel: the start channel * @count: the count of lines * @wave: the selected wave * @attack: the attack * @frame_count: frame count * @frequency: frequency * @phase: the phase * @start_frequency: base frequency * @volume: volume * @loop_start: loop start * @loop_end: loop end * * Creates an #AgsApplySynth. * * Returns: an new #AgsApplySynth. * * Since: 1.0.0 */ AgsApplySynth* ags_apply_synth_new(AgsChannel *start_channel, guint count, guint wave, guint attack, guint frame_count, gdouble frequency, gdouble phase, gdouble start_frequency, gdouble volume, guint loop_start, guint loop_end) { AgsApplySynth *apply_synth; apply_synth = (AgsApplySynth *) g_object_new(AGS_TYPE_APPLY_SYNTH, "start-channel", start_channel, "count", count, "wave", wave, "attack", attack, "frame-count", frame_count, "frequency", frequency, "phase", phase, "start-frequency", start_frequency, "volume", volume, "loop-start", loop_start, "loop-end", loop_end, NULL); return(apply_synth); } gsequencer-1.4.24/ags/audio/task/ags_move_note.h0000644000175000017500000000441213247044247016507 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_MOVE_NOTE_H__ #define __AGS_MOVE_NOTE_H__ #include #include #include #include #include #define AGS_TYPE_MOVE_NOTE (ags_move_note_get_type()) #define AGS_MOVE_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MOVE_NOTE, AgsMoveNote)) #define AGS_MOVE_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MOVE_NOTE, AgsMoveNoteClass)) #define AGS_IS_MOVE_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MOVE_NOTE)) #define AGS_IS_MOVE_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MOVE_NOTE)) #define AGS_MOVE_NOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MOVE_NOTE, AgsMoveNoteClass)) #define AGS_MOVE_NOTE_DEFAULT_X_LENGTH (16 * 16 * 1200) #define AGS_MOVE_NOTE_DEFAULT_Y_LENGTH (1024) typedef struct _AgsMoveNote AgsMoveNote; typedef struct _AgsMoveNoteClass AgsMoveNoteClass; struct _AgsMoveNote { AgsTask task; AgsAudio *audio; AgsNotation *notation; GList *selection; guint first_x; guint first_y; guint move_x; guint move_y; gboolean relative; gboolean absolute; }; struct _AgsMoveNoteClass { AgsTaskClass task; }; GType ags_move_note_get_type(); AgsMoveNote* ags_move_note_new(AgsNotation *notation, GList *selection, guint first_x, guint first_y, gint move_x, gint move_y, gboolean relative, gboolean absolute); #endif /*__AGS_MOVE_NOTE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_remove_soundcard.c0000644000175000017500000002333313247044247020051 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #include #include #include void ags_remove_soundcard_class_init(AgsRemoveSoundcardClass *remove_soundcard); void ags_remove_soundcard_connectable_interface_init(AgsConnectableInterface *connectable); void ags_remove_soundcard_init(AgsRemoveSoundcard *remove_soundcard); void ags_remove_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_remove_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_remove_soundcard_connect(AgsConnectable *connectable); void ags_remove_soundcard_disconnect(AgsConnectable *connectable); void ags_remove_soundcard_dispose(GObject *gobject); void ags_remove_soundcard_finalize(GObject *gobject); void ags_remove_soundcard_launch(AgsTask *task); /** * SECTION:ags_remove_soundcard * @short_description: remove soundcard object to context * @title: AgsRemoveSoundcard * @section_id: * @include: ags/audio/task/ags_remove_soundcard.h * * The #AgsRemoveSoundcard task removes #AgsSoundcard to context. */ static gpointer ags_remove_soundcard_parent_class = NULL; static AgsConnectableInterface *ags_remove_soundcard_parent_connectable_interface; enum{ PROP_0, PROP_APPLICATION_CONTEXT, PROP_SOUNDCARD, }; GType ags_remove_soundcard_get_type() { static GType ags_type_remove_soundcard = 0; if(!ags_type_remove_soundcard){ static const GTypeInfo ags_remove_soundcard_info = { sizeof (AgsRemoveSoundcardClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_remove_soundcard_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRemoveSoundcard), 0, /* n_preallocs */ (GInstanceInitFunc) ags_remove_soundcard_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_remove_soundcard_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_remove_soundcard = g_type_register_static(AGS_TYPE_TASK, "AgsRemoveSoundcard", &ags_remove_soundcard_info, 0); g_type_add_interface_static(ags_type_remove_soundcard, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return (ags_type_remove_soundcard); } void ags_remove_soundcard_class_init(AgsRemoveSoundcardClass *remove_soundcard) { GObjectClass *gobject; AgsTaskClass *task; GParamSpec *param_spec; ags_remove_soundcard_parent_class = g_type_class_peek_parent(remove_soundcard); /* gobject */ gobject = (GObjectClass *) remove_soundcard; gobject->set_property = ags_remove_soundcard_set_property; gobject->get_property = ags_remove_soundcard_get_property; gobject->dispose = ags_remove_soundcard_dispose; gobject->finalize = ags_remove_soundcard_finalize; /* properties */ /** * AgsRemoveSoundcard:application-context: * * The assigned #AgsApplicationContext * * Since: 1.0.0 */ param_spec = g_param_spec_object("application-context", i18n_pspec("application context of remove soundcard"), i18n_pspec("The application context of remove soundcard task"), AGS_TYPE_APPLICATION_CONTEXT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_APPLICATION_CONTEXT, param_spec); /** * AgsRemoveSoundcard:soundcard: * * The assigned #AgsSoundcard * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("soundcard of remove soundcard"), i18n_pspec("The soundcard of remove soundcard task"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /* task */ task = (AgsTaskClass *) remove_soundcard; task->launch = ags_remove_soundcard_launch; } void ags_remove_soundcard_connectable_interface_init(AgsConnectableInterface *connectable) { ags_remove_soundcard_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_remove_soundcard_connect; connectable->disconnect = ags_remove_soundcard_disconnect; } void ags_remove_soundcard_init(AgsRemoveSoundcard *remove_soundcard) { remove_soundcard->application_context = NULL; remove_soundcard->soundcard = NULL; } void ags_remove_soundcard_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsRemoveSoundcard *remove_soundcard; remove_soundcard = AGS_REMOVE_SOUNDCARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { AgsApplicationContext *application_context; application_context = (AgsApplicationContext *) g_value_get_object(value); if(remove_soundcard->application_context == (GObject *) application_context){ return; } if(remove_soundcard->application_context != NULL){ g_object_unref(remove_soundcard->application_context); } if(application_context != NULL){ g_object_ref(application_context); } remove_soundcard->application_context = (GObject *) application_context; } break; case PROP_SOUNDCARD: { GObject *soundcard; soundcard = (GObject *) g_value_get_object(value); if(remove_soundcard->soundcard == (GObject *) soundcard){ return; } if(remove_soundcard->soundcard != NULL){ g_object_unref(remove_soundcard->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } remove_soundcard->soundcard = (GObject *) soundcard; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_soundcard_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsRemoveSoundcard *remove_soundcard; remove_soundcard = AGS_REMOVE_SOUNDCARD(gobject); switch(prop_id){ case PROP_APPLICATION_CONTEXT: { g_value_set_object(value, remove_soundcard->application_context); } break; case PROP_SOUNDCARD: { g_value_set_object(value, remove_soundcard->soundcard); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_remove_soundcard_connect(AgsConnectable *connectable) { ags_remove_soundcard_parent_connectable_interface->connect(connectable); /* empty */ } void ags_remove_soundcard_disconnect(AgsConnectable *connectable) { ags_remove_soundcard_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_remove_soundcard_dispose(GObject *gobject) { AgsRemoveSoundcard *remove_soundcard; remove_soundcard = AGS_REMOVE_SOUNDCARD(gobject); if(remove_soundcard->application_context != NULL){ g_object_unref(remove_soundcard->application_context); remove_soundcard->application_context = NULL; } if(remove_soundcard->soundcard != NULL){ g_object_unref(remove_soundcard->soundcard); remove_soundcard->soundcard = NULL; } /* call parent */ G_OBJECT_CLASS(ags_remove_soundcard_parent_class)->dispose(gobject); } void ags_remove_soundcard_finalize(GObject *gobject) { AgsRemoveSoundcard *remove_soundcard; remove_soundcard = AGS_REMOVE_SOUNDCARD(gobject); if(remove_soundcard->application_context != NULL){ g_object_unref(remove_soundcard->application_context); } if(remove_soundcard->soundcard != NULL){ g_object_unref(remove_soundcard->soundcard); } /* call parent */ G_OBJECT_CLASS(ags_remove_soundcard_parent_class)->finalize(gobject); } void ags_remove_soundcard_launch(AgsTask *task) { AgsRemoveSoundcard *remove_soundcard; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); remove_soundcard = AGS_REMOVE_SOUNDCARD(task); /* remove soundcard */ pthread_mutex_lock(application_mutex); ags_sound_provider_set_soundcard(AGS_SOUND_PROVIDER(remove_soundcard->application_context), g_list_remove(ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(remove_soundcard->application_context)), remove_soundcard->soundcard)); pthread_mutex_unlock(application_mutex); } /** * ags_remove_soundcard_new: * @application_context: the #AgsApplicationContext * @soundcard: the #AgsSoundcard to remove * * Creates an #AgsRemoveSoundcard. * * Returns: an new #AgsRemoveSoundcard. * * Since: 1.0.0 */ AgsRemoveSoundcard* ags_remove_soundcard_new(AgsApplicationContext *application_context, GObject *soundcard) { AgsRemoveSoundcard *remove_soundcard; remove_soundcard = (AgsRemoveSoundcard *) g_object_new(AGS_TYPE_REMOVE_SOUNDCARD, "application-context", application_context, "soundcard", soundcard, NULL); return(remove_soundcard); } gsequencer-1.4.24/ags/audio/task/ags_remove_note.h0000644000175000017500000000375213247044247017044 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_REMOVE_NOTE_H__ #define __AGS_REMOVE_NOTE_H__ #include #include #include #include #include #define AGS_TYPE_REMOVE_NOTE (ags_remove_note_get_type()) #define AGS_REMOVE_NOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_REMOVE_NOTE, AgsRemoveNote)) #define AGS_REMOVE_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_REMOVE_NOTE, AgsRemoveNoteClass)) #define AGS_IS_REMOVE_NOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_REMOVE_NOTE)) #define AGS_IS_REMOVE_NOTE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_REMOVE_NOTE)) #define AGS_REMOVE_NOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_REMOVE_NOTE, AgsRemoveNoteClass)) typedef struct _AgsRemoveNote AgsRemoveNote; typedef struct _AgsRemoveNoteClass AgsRemoveNoteClass; struct _AgsRemoveNote { AgsTask task; AgsAudio *audio; AgsNotation *notation; guint x; guint y; }; struct _AgsRemoveNoteClass { AgsTaskClass task; }; GType ags_remove_note_get_type(); AgsRemoveNote* ags_remove_note_new(AgsNotation *notation, guint x, guint y); #endif /*__AGS_REMOVE_NOTE_H__*/ gsequencer-1.4.24/ags/audio/task/ags_add_recall.h0000644000175000017500000000367013247044247016573 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_ADD_RECALL_H__ #define __AGS_ADD_RECALL_H__ #include #include #include #include #define AGS_TYPE_ADD_RECALL (ags_add_recall_get_type()) #define AGS_ADD_RECALL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ADD_RECALL, AgsAddRecall)) #define AGS_ADD_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_ADD_RECALL, AgsAddRecallClass)) #define AGS_IS_ADD_RECALL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ADD_RECALL)) #define AGS_IS_ADD_RECALL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_ADD_RECALL)) #define AGS_ADD_RECALL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_ADD_RECALL, AgsAddRecallClass)) typedef struct _AgsAddRecall AgsAddRecall; typedef struct _AgsAddRecallClass AgsAddRecallClass; struct _AgsAddRecall { AgsTask task; GObject *context; AgsRecall *recall; gboolean is_play; }; struct _AgsAddRecallClass { AgsTaskClass task; }; GType ags_add_recall_get_type(); AgsAddRecall* ags_add_recall_new(GObject *context, AgsRecall *recall, gboolean is_play); #endif /*__AGS_ADD_RECALL_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_dependency.h0000644000175000017500000000531613246707333017217 00000000000000/* 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 . */ #ifndef __AGS_RECALL_DEPENDENCY_H__ #define __AGS_RECALL_DEPENDENCY_H__ #include #include #include #define AGS_TYPE_RECALL_DEPENDENCY (ags_recall_dependency_get_type ()) #define AGS_RECALL_DEPENDENCY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AGS_TYPE_RECALL_DEPENDENCY, AgsRecallDependency)) #define AGS_RECALL_DEPENDENCY_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), AGS_TYPE_RECALL_DEPENDENCY, AgsRecallDependencyClass)) #define AGS_IS_RECALL_DEPENDENCY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_RECALL_DEPENDENCY)) #define AGS_IS_RECALL_DEPENDENCY_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_RECALL_DEPENDENCY)) #define AGS_RECALL_DEPENDENCY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_RECALL_DEPENDENCY, AgsRecallDependencyClass)) typedef struct _AgsRecallDependency AgsRecallDependency; typedef struct _AgsRecallDependencyClass AgsRecallDependencyClass; /** * AgsRecallDependencyFlags: * @AGS_RECALL_DEPENDENCY_CONNECTED: indicates the recall dependency was connected by calling #AgsConnectable::connect() * * Enum values to control the behavior or indicate internal state of #AgsPlayback by * enable/disable as flags. */ typedef enum{ AGS_RECALL_DEPENDENCY_CONNECTED = 1, }AgsRecallDependencyFlags; struct _AgsRecallDependency { GObject object; guint flags; GObject *dependency; }; struct _AgsRecallDependencyClass { GObjectClass object; }; GType ags_recall_dependency_get_type(void); GList* ags_recall_dependency_find_dependency(GList *recall_dependencies, GObject *dependency); GList* ags_recall_dependency_find_dependency_by_provider(GList *recall_dependencies, GObject *provider); GObject* ags_recall_dependency_resolve(AgsRecallDependency *recall_dependency, AgsRecallID *recall_id); AgsRecallDependency* ags_recall_dependency_new(GObject *dependency); #endif /*__AGS_RECALL_DEPENDENCY_H__*/ gsequencer-1.4.24/ags/audio/ags_audio_signal.c0000644000175000017500000020731013256163135016203 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include void ags_audio_signal_class_init(AgsAudioSignalClass *audio_signal_class); void ags_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable); void ags_audio_signal_init(AgsAudioSignal *audio_signal); void ags_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec); void ags_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec); void ags_audio_signal_connect(AgsConnectable *connectable); void ags_audio_signal_disconnect(AgsConnectable *connectable); void ags_audio_signal_dispose(GObject *gobject); void ags_audio_signal_finalize(GObject *gobject); void ags_audio_signal_real_realloc_buffer_size(AgsAudioSignal *audio_signal, guint buffer_size); void ags_audio_signal_real_add_note(AgsAudioSignal *audio_signal, GObject *note); void ags_audio_signal_real_remove_note(AgsAudioSignal *audio_signal, GObject *note); /** * SECTION:ags_audio_signal * @short_description: Contains the audio data and its alignment * @title: AgsAudioSignal * @section_id: * @include: ags/audio/ags_audio_signal.h * * #AgsAudioSignal organizes audio data within a #GList whereby data * pointing to the buffer. */ enum{ PROP_0, PROP_SOUNDCARD, PROP_RECYCLING, PROP_RECALL_ID, PROP_SAMPLERATE, PROP_BUFFER_SIZE, PROP_FORMAT, PROP_WORD_SIZE, PROP_LENGTH, PROP_FIRST_FRAME, PROP_LAST_FRAME, PROP_FRAME_COUNT, PROP_LOOP_START, PROP_LOOP_END, PROP_DELAY, PROP_ATTACK, PROP_STREAM, PROP_STREAM_END, PROP_STREAM_CURRENT, PROP_NOTE, PROP_RT_TEMPLATE, }; enum{ REALLOC_BUFFER_SIZE, ADD_NOTE, REMOVE_NOTE, LAST_SIGNAL, }; static gpointer ags_audio_signal_parent_class = NULL; static guint audio_signal_signals[LAST_SIGNAL]; GType ags_audio_signal_get_type(void) { static GType ags_type_audio_signal = 0; if(!ags_type_audio_signal){ static const GTypeInfo ags_audio_signal_info = { sizeof (AgsAudioSignalClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_audio_signal_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsAudioSignal), 0, /* n_preallocs */ (GInstanceInitFunc) ags_audio_signal_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_audio_signal_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_audio_signal = g_type_register_static(G_TYPE_OBJECT, "AgsAudioSignal", &ags_audio_signal_info, 0); g_type_add_interface_static(ags_type_audio_signal, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); } return(ags_type_audio_signal); } void ags_audio_signal_class_init(AgsAudioSignalClass *audio_signal) { GObjectClass *gobject; GParamSpec *param_spec; ags_audio_signal_parent_class = g_type_class_peek_parent(audio_signal); /* GObjectClass */ gobject = (GObjectClass *) audio_signal; gobject->set_property = ags_audio_signal_set_property; gobject->get_property = ags_audio_signal_get_property; gobject->dispose = ags_audio_signal_dispose; gobject->finalize = ags_audio_signal_finalize; /* properties */ /** * AgsAudioSignal:soundcard: * * The assigned #AgsSoundcard providing default settings. * * Since: 1.0.0 */ param_spec = g_param_spec_object("soundcard", i18n_pspec("assigned soundcard"), i18n_pspec("The soundcard it is assigned with"), G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); /** * AgsAudioSignal:recycling: * * The assigned #AgsRecycling linking tree. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recycling", i18n_pspec("assigned recycling"), i18n_pspec("The recycling it is assigned with"), AGS_TYPE_RECYCLING, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECYCLING, param_spec); /** * AgsAudioSignal:recall-id: * * The assigned #AgsRecallID providing context. * * Since: 1.0.0 */ param_spec = g_param_spec_object("recall_id", i18n_pspec("assigned recall id"), i18n_pspec("The recall id it is assigned with"), AGS_TYPE_RECALL_ID, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_ID, param_spec); /** * AgsAudioSignal:samplerate: * * The samplerate to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("samplerate", i18n_pspec("using samplerate"), i18n_pspec("The samplerate to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SAMPLERATE, param_spec); /** * AgsAudioSignal:buffer-size: * * The buffer size to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("buffer-size", i18n_pspec("using buffer size"), i18n_pspec("The buffer size to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_BUFFER_SIZE, param_spec); /** * AgsAudioSignal:format: * * The format to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("format", i18n_pspec("using format"), i18n_pspec("The format to be used"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FORMAT, param_spec); /** * AgsAudioSignal:word-size: * * The word size of frame. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("word-size", i18n_pspec("frame word size"), i18n_pspec("The word size of a frame"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_WORD_SIZE, param_spec); /** * AgsAudioSignal:length: * * The length of the stream. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("length", i18n_pspec("stream length"), i18n_pspec("The length of the stream"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LENGTH, param_spec); /** * AgsAudioSignal:first-frame: * * The first frame of stream. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("first-frame", i18n_pspec("stream's first frame"), i18n_pspec("The first frame of the stream"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FIRST_FRAME, param_spec); /** * AgsAudioSignal:last-frame: * * The last frame of stream. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("last-frame", i18n_pspec("stream's last frame"), i18n_pspec("The last frame of the stream"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LAST_FRAME, param_spec); /** * AgsAudioSignal:frame-count: * * The initial size of audio data. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("frame-count", i18n_pspec("frame count of audio data"), i18n_pspec("The initial frame count of audio data"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_FRAME_COUNT, param_spec); /** * AgsAudioSignal:loop-start: * * The loop start of stream. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("loop-start", i18n_pspec("stream's loop start"), i18n_pspec("The loop start of the stream"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LOOP_START, param_spec); /** * AgsAudioSignal:loop-end: * * The loop end of stream. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("loop-end", i18n_pspec("stream's loop end"), i18n_pspec("The loop end of the stream"), 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_LOOP_END, param_spec); /** * AgsAudioSignal:delay: * * The delay to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_double("delay", i18n_pspec("using delay"), i18n_pspec("The delay to be used"), 0.0, 65535.0, 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_DELAY, param_spec); /** * AgsAudioSignal:attack: * * The attack to be used. * * Since: 1.0.0 */ param_spec = g_param_spec_uint("attack", i18n_pspec("using attack"), i18n_pspec("The attack to be used"), 0, 65535, 0, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_ATTACK, param_spec); /** * AgsAudioSignal:stream: * * The stream it contains. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("stream", i18n_pspec("containing stream"), i18n_pspec("The stream it contains"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STREAM, param_spec); /** * AgsAudioSignal:stream-end: * * The end of stream. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("stream-end", i18n_pspec("end of stream"), i18n_pspec("The stream's end"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STREAM_END, param_spec); /** * AgsAudioSignal:stream-current: * * The current stream. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("stream-current", i18n_pspec("current stream"), i18n_pspec("The current stream"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_STREAM_CURRENT, param_spec); /** * AgsAudioSignal:note: * * The assigned #AgsNote providing default settings. * * Since: 1.0.0 */ param_spec = g_param_spec_pointer("note", i18n_pspec("assigned note"), i18n_pspec("The note it is assigned with"), G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_NOTE, param_spec); /** * AgsAudioSignal:rt-template: * * The assigned #AgsAudioSignal realtime template. * * Since: 1.4.9 */ param_spec = g_param_spec_object("rt-template", i18n_pspec("assigned realtime template"), i18n_pspec("The assigend realtime template"), AGS_TYPE_AUDIO_SIGNAL, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RT_TEMPLATE, param_spec); /* AgsAudioSignalClass */ audio_signal->realloc_buffer_size = ags_audio_signal_real_realloc_buffer_size; audio_signal->add_note = ags_audio_signal_real_add_note; audio_signal->remove_note = ags_audio_signal_real_remove_note; /* signals */ /** * AgsAudioSignal::realloc-buffer-size: * @audio_signal: the object to realloc buffer size * @buffer_size: new buffer size * * The ::reallloc-buffer-size signal is invoked to notify modified buffer size. * * Since: 1.0.0 */ audio_signal_signals[REALLOC_BUFFER_SIZE] = g_signal_new("realloc-buffer-size", G_TYPE_FROM_CLASS (audio_signal), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AgsAudioSignalClass, realloc_buffer_size), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** * AgsAudioSignal::add-note: * @audio_signal: the #AgsAudioSignal * @note: the #AgsNote * * The ::add-note signal notifies about adding @note. * * Since: 1.4.0 */ audio_signal_signals[ADD_NOTE] = g_signal_new("add-note", G_TYPE_FROM_CLASS(audio_signal), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsAudioSignalClass, add_note), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); /** * AgsAudioSignal::remove-note: * @audio_signal: the #AgsAudioSignal * @note: the #AgsNote * * The ::remove-note signal notifies about removing @note. * * Since: 1.4.0 */ audio_signal_signals[REMOVE_NOTE] = g_signal_new("remove-note", G_TYPE_FROM_CLASS(audio_signal), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AgsAudioSignalClass, remove_note), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); } void ags_audio_signal_connectable_interface_init(AgsConnectableInterface *connectable) { connectable->is_ready = NULL; connectable->is_connected = NULL; connectable->connect = ags_audio_signal_connect; connectable->disconnect = ags_audio_signal_disconnect; } void ags_audio_signal_init(AgsAudioSignal *audio_signal) { AgsConfig *config; gchar *str; audio_signal->flags = 0; audio_signal->soundcard = NULL; audio_signal->recycling = NULL; audio_signal->recall_id = NULL; config = ags_config_get_instance(); /* samplerate */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "samplerate"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "samplerate"); } if(str != NULL){ audio_signal->samplerate = g_ascii_strtoull(str, NULL, 10); free(str); }else{ audio_signal->samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATE; } /* buffer-size */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "buffer-size"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "buffer-size"); } if(str != NULL){ audio_signal->buffer_size = g_ascii_strtoull(str, NULL, 10); free(str); }else{ audio_signal->buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE; } /* format */ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD, "format"); if(str == NULL){ str = ags_config_get_value(config, AGS_CONFIG_SOUNDCARD_0, "format"); } if(str != NULL){ audio_signal->format = g_ascii_strtoull(str, NULL, 10); free(str); }else{ audio_signal->format = AGS_SOUNDCARD_SIGNED_16_BIT; } /* */ audio_signal->length = 0; audio_signal->last_frame = 0; audio_signal->frame_count = 0; audio_signal->loop_start = 0; audio_signal->loop_end = 0; audio_signal->delay = 0.0; audio_signal->attack = 0; audio_signal->stream_beginning = NULL; audio_signal->stream_current = NULL; audio_signal->stream_end = NULL; audio_signal->note = NULL; audio_signal->rt_template = NULL; } void ags_audio_signal_set_property(GObject *gobject, guint prop_id, const GValue *value, GParamSpec *param_spec) { AgsAudioSignal *audio_signal; audio_signal = AGS_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_SOUNDCARD: { GObject *soundcard; guint samplerate; guint buffer_size; guint format; soundcard = g_value_get_object(value); if(audio_signal->soundcard == soundcard) return; if(audio_signal->soundcard != NULL){ g_object_unref(audio_signal->soundcard); } if(soundcard != NULL){ g_object_ref(soundcard); } audio_signal->soundcard = soundcard; if(soundcard != NULL){ ags_soundcard_get_presets(AGS_SOUNDCARD(soundcard), NULL, &samplerate, &buffer_size, &format); g_object_set(audio_signal, "samplerate", samplerate, "buffer-size", buffer_size, "format", format, NULL); } } break; case PROP_RECYCLING: { GObject *recycling; recycling = g_value_get_object(value); if(audio_signal->recycling == recycling){ return; } if(audio_signal->recycling != NULL){ g_object_unref(audio_signal->recycling); } if(recycling != NULL){ g_object_ref(recycling); } audio_signal->recycling = recycling; } break; case PROP_RECALL_ID: { GObject *recall_id; recall_id = g_value_get_object(value); if(audio_signal->recall_id == recall_id) return; if(audio_signal->recall_id != NULL) g_object_unref(audio_signal->recall_id); if(recall_id != NULL) g_object_ref(recall_id); audio_signal->recall_id = recall_id; } break; case PROP_SAMPLERATE: { guint samplerate; samplerate = g_value_get_uint(value); ags_audio_signal_set_samplerate(audio_signal, samplerate); } break; case PROP_BUFFER_SIZE: { guint buffer_size; buffer_size = g_value_get_uint(value); ags_audio_signal_set_buffer_size(audio_signal, buffer_size); } case PROP_FORMAT: { guint format; format = g_value_get_uint(value); ags_audio_signal_set_format(audio_signal, format); } break; case PROP_WORD_SIZE: { //TODO:JK: implement me } break; case PROP_LENGTH: { guint length; length = g_value_get_uint(value); audio_signal->length = length; } break; case PROP_FIRST_FRAME: { guint first_frame; first_frame = g_value_get_uint(value); audio_signal->first_frame = first_frame; } break; case PROP_LAST_FRAME: { guint last_frame; last_frame = g_value_get_uint(value); audio_signal->last_frame = last_frame; } break; case PROP_FRAME_COUNT: { guint frame_count; frame_count = g_value_get_uint(value); audio_signal->frame_count = frame_count; } break; case PROP_LOOP_START: { guint loop_start; loop_start = g_value_get_uint(value); audio_signal->loop_start = loop_start; } break; case PROP_LOOP_END: { guint loop_end; loop_end = g_value_get_uint(value); audio_signal->loop_end = loop_end; } break; case PROP_DELAY: { gdouble delay; delay = g_value_get_double(value); audio_signal->delay = delay; } break; case PROP_ATTACK: { guint attack; attack = g_value_get_uint(value); audio_signal->attack = attack; } break; case PROP_STREAM: { gpointer data; data = g_value_get_pointer(value); if(data == NULL || g_list_find(audio_signal->stream_beginning, data) != NULL){ } audio_signal->stream_beginning = g_list_append(audio_signal->stream_beginning, data); audio_signal->stream_end = g_list_last(audio_signal->stream_beginning); } break; case PROP_STREAM_CURRENT: { GList *current; current = g_value_get_pointer(value); audio_signal->stream_current = current; } break; case PROP_NOTE: { GObject *note; note = g_value_get_pointer(value); if(g_list_find(audio_signal->note, note) != NULL){ return; } ags_audio_signal_add_note(audio_signal, note); } break; case PROP_RT_TEMPLATE: { GObject *rt_template; rt_template = g_value_get_object(value); if(audio_signal->rt_template == rt_template){ return; } if(audio_signal->rt_template != NULL){ g_object_unref(audio_signal->rt_template); } if(rt_template != NULL){ g_object_ref(rt_template); } audio_signal->rt_template = rt_template; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_signal_get_property(GObject *gobject, guint prop_id, GValue *value, GParamSpec *param_spec) { AgsAudioSignal *audio_signal; audio_signal = AGS_AUDIO_SIGNAL(gobject); switch(prop_id){ case PROP_SOUNDCARD: { g_value_set_object(value, audio_signal->soundcard); } break; case PROP_RECYCLING: { g_value_set_object(value, audio_signal->recycling); } break; case PROP_RECALL_ID: { g_value_set_object(value, audio_signal->recall_id); } break; case PROP_SAMPLERATE: { g_value_set_uint(value, audio_signal->samplerate); } break; case PROP_BUFFER_SIZE: { g_value_set_uint(value, audio_signal->buffer_size); } case PROP_FORMAT: { g_value_set_uint(value, audio_signal->format); } break; case PROP_WORD_SIZE: { //TODO:JK: implement me } break; case PROP_LENGTH: { g_value_set_uint(value, audio_signal->length); } break; case PROP_FIRST_FRAME: { g_value_set_uint(value, audio_signal->first_frame); } break; case PROP_LAST_FRAME: { g_value_set_uint(value, audio_signal->last_frame); } break; case PROP_FRAME_COUNT: { g_value_set_uint(value, audio_signal->frame_count); } break; case PROP_LOOP_START: { g_value_set_uint(value, audio_signal->loop_start); } break; case PROP_LOOP_END: { g_value_set_uint(value, audio_signal->loop_end); } break; case PROP_DELAY: { g_value_set_double(value, audio_signal->delay); } break; case PROP_ATTACK: { g_value_set_uint(value, audio_signal->attack); } break; case PROP_STREAM: { g_value_set_pointer(value, g_list_copy(audio_signal->stream_beginning)); } break; case PROP_STREAM_END: { g_value_set_pointer(value, audio_signal->stream_end); } break; case PROP_STREAM_CURRENT: { g_value_set_pointer(value, audio_signal->stream_current); } break; case PROP_NOTE: { g_value_set_pointer(value, g_list_copy(audio_signal->note)); } break; case PROP_RT_TEMPLATE: { g_value_set_object(value, audio_signal->rt_template); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, param_spec); break; } } void ags_audio_signal_connect(AgsConnectable *connectable) { AgsAudioSignal *audio_signal; audio_signal = AGS_AUDIO_SIGNAL(connectable); if((AGS_AUDIO_SIGNAL_CONNECTED & (audio_signal->flags)) != 0){ return; } audio_signal->flags |= AGS_AUDIO_SIGNAL_CONNECTED; } void ags_audio_signal_disconnect(AgsConnectable *connectable) { AgsAudioSignal *audio_signal; audio_signal = AGS_AUDIO_SIGNAL(connectable); if((AGS_AUDIO_SIGNAL_CONNECTED & (audio_signal->flags)) == 0){ return; } audio_signal->flags &= (~AGS_AUDIO_SIGNAL_CONNECTED); } void ags_audio_signal_dispose(GObject *gobject) { AgsAudioSignal *audio_signal; audio_signal = AGS_AUDIO_SIGNAL(gobject); /* soundcard */ if(audio_signal->soundcard != NULL){ g_object_unref(audio_signal->soundcard); audio_signal->soundcard = NULL; } /* recycling */ if(audio_signal->recycling != NULL){ g_object_unref(audio_signal->recycling); audio_signal->recycling = NULL; } /* recall id */ if(audio_signal->recall_id != NULL){ g_object_unref(audio_signal->recall_id); audio_signal->recall_id = NULL; } /* note */ if(audio_signal->note != NULL){ g_object_unref(audio_signal->note); audio_signal->note = NULL; } /* rt-template */ if(audio_signal->rt_template != NULL){ g_object_unref(audio_signal->rt_template); audio_signal->rt_template = NULL; } /* call parent */ G_OBJECT_CLASS(ags_audio_signal_parent_class)->dispose(gobject); } void ags_audio_signal_finalize(GObject *gobject) { AgsAudioSignal *audio_signal; guint *ids; guint i, n_ids; audio_signal = AGS_AUDIO_SIGNAL(gobject); #ifdef AGS_DEBUG g_message("finalize AgsAudioSignal"); if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) != 0){ g_warning("AGS_AUDIO_SIGNAL_TEMPLATE: destroying\n"); } #endif /* disconnect */ ids = g_signal_list_ids(AGS_TYPE_AUDIO_SIGNAL, &n_ids); for(i = 0; i < n_ids; i++){ g_signal_handlers_disconnect_matched(gobject, G_SIGNAL_MATCH_ID, ids[i], 0, NULL, NULL, NULL); } g_free(ids); /* soundcard */ if(audio_signal->soundcard != NULL){ g_object_unref(audio_signal->soundcard); } /* recycling */ if(audio_signal->recycling != NULL){ g_object_unref(audio_signal->recycling); } /* recall id */ if(audio_signal->recall_id != NULL){ g_object_unref(audio_signal->recall_id); } /* audio data */ if(audio_signal->stream_beginning != NULL){ g_list_free_full(audio_signal->stream_beginning, (GDestroyNotify) ags_stream_free); } /* note */ if(audio_signal->note != NULL){ g_object_unref(audio_signal->note); } /* rt-template */ if(audio_signal->rt_template != NULL){ g_object_unref(audio_signal->rt_template); } /* call parent */ G_OBJECT_CLASS(ags_audio_signal_parent_class)->finalize(gobject); } /** * ags_stream_alloc: * @buffer_size: the buffer size * @format: the format * * Allocs an audio buffer. * * Returns: the audio data array * * Since: 1.0.0 */ void* ags_stream_alloc(guint buffer_size, guint format) { void *buffer; guint word_size; switch(format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { buffer = (signed char *) malloc(buffer_size * sizeof(signed char)); word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { buffer = (signed short *) malloc(buffer_size * sizeof(signed short)); word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { buffer = (signed long *) malloc(buffer_size * sizeof(signed long)); //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { buffer = (signed long *) malloc(buffer_size * sizeof(signed long)); word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { buffer = (signed long long *) malloc(buffer_size * sizeof(signed long long)); word_size = sizeof(signed long long); } break; default: g_warning("ags_stream_alloc(): unsupported word size"); return(NULL); } memset(buffer, 0, buffer_size * word_size); return(buffer); } /** * ags_stream_free: * @buffer_size: the buffer size * @format: the format * * Frees an audio buffer. * * Returns: the audio data array * * Since: 1.0.0 */ void ags_stream_free(signed short *buffer) { free(buffer); } /** * ags_audio_signal_set_samplerate: * @audio_signal: the #AgsAudioSignal * @samplerate: the samplerate * * Set samplerate. * * Since: 1.0.0 */ void ags_audio_signal_set_samplerate(AgsAudioSignal *audio_signal, guint samplerate) { audio_signal->samplerate = samplerate; } /** * ags_audio_signal_set_buffer_size: * @audio_signal: the #AgsAudioSignal * @buffer_size: the buffer size * * Set buffer size. * * Since: 1.0.0 */ void ags_audio_signal_set_buffer_size(AgsAudioSignal *audio_signal, guint buffer_size) { GList *stream; guint old_buffer_size; guint word_size; old_buffer_size = audio_signal->buffer_size; audio_signal->buffer_size = buffer_size; stream = audio_signal->stream_beginning; while(stream != NULL){ switch(audio_signal->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { stream->data = (signed char *) realloc(stream->data, buffer_size * sizeof(signed char)); word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { stream->data = (signed short *) realloc(stream->data, buffer_size * sizeof(signed short)); word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { stream->data = (signed long *) realloc(stream->data, buffer_size * sizeof(signed long)); word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { stream->data = (signed long *) realloc(stream->data, buffer_size * sizeof(signed long)); word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { stream->data = (signed long long *) realloc(stream->data, buffer_size * sizeof(signed long long)); word_size = sizeof(signed long long); } break; default: g_warning("ags_audio_signal_set_buffer_size() - unsupported format"); } if(old_buffer_size < buffer_size){ memset(stream->data + old_buffer_size, 0, (buffer_size - old_buffer_size) * word_size); } stream = stream->next; } } /** * ags_audio_signal_set_format: * @audio_signal: the #AgsAudioSignal * @format: the format * * Set format. * * Since: 1.0.0 */ void ags_audio_signal_set_format(AgsAudioSignal *audio_signal, guint format) { GList *stream; void *data; guint copy_mode; stream = audio_signal->stream_beginning; while(stream != NULL){ data = ags_stream_alloc(audio_signal->buffer_size, format); copy_mode = ags_audio_buffer_util_get_copy_mode(format, audio_signal->format); ags_audio_buffer_util_copy_buffer_to_buffer(data, 1, 0, stream->data, 1, 0, audio_signal->buffer_size, copy_mode); free(stream->data); stream->data = data; stream = stream->next; } audio_signal->format = format; } /** * ags_audio_signal_get_length_till_current: * @audio_signal: an #AgsAudioSignal * * Counts the buffers from stream_beginning upto stream_current. * * Returns: the counted length. * * Since: 1.0.0 */ guint ags_audio_signal_get_length_till_current(AgsAudioSignal *audio_signal) { GList *list, *stop; guint length; if(audio_signal == NULL){ return(0); } list = audio_signal->stream_beginning; length = 0; if(audio_signal->stream_current != NULL){ stop = audio_signal->stream_current->next; }else{ return(0); } while(list != stop){ length++; list = list->next; } return(length); } /** * ags_audio_signal_add_stream: * @audio_signal: an #AgsAudioSignal * * Adds a buffer at the end of the stream. * * Since: 1.0.0 */ void ags_audio_signal_add_stream(AgsAudioSignal *audio_signal) { GList *stream, *end_old; signed short *buffer; stream = g_list_alloc(); buffer = ags_stream_alloc(audio_signal->buffer_size, audio_signal->format); stream->data = buffer; if(audio_signal->stream_end != NULL){ end_old = audio_signal->stream_end; stream->prev = end_old; end_old->next = stream; }else{ audio_signal->stream_beginning = stream; audio_signal->stream_current = stream; } audio_signal->stream_end = stream; audio_signal->length += 1; } /** * ags_audio_signal_stream_resize: * @audio_signal: an #AgsAudioSignal to resize. * @length: a guint as the new length. * * Resizes an #AgsAudioSignal's stream but be carefull with shrinking. * This function may crash the application. * * Since: 1.0.0 */ void ags_audio_signal_stream_resize(AgsAudioSignal *audio_signal, guint length) { guint i; if(audio_signal->length < length){ GList *stream, *end_old; signed short *buffer; stream = NULL; for(i = audio_signal->length; i < length; i++){ buffer = ags_stream_alloc(audio_signal->buffer_size, audio_signal->format); stream = g_list_prepend(stream, buffer); } stream = g_list_reverse(stream); if(audio_signal->stream_end != NULL){ end_old = audio_signal->stream_end; audio_signal->stream_end = g_list_last(stream); stream->prev = end_old; end_old->next = stream; }else{ audio_signal->stream_beginning = stream; audio_signal->stream_end = g_list_last(stream); audio_signal->stream_current = stream; } }else if(audio_signal->length > length){ GList *stream, *stream_end, *stream_next; gboolean check_current; stream = audio_signal->stream_beginning; check_current = TRUE; for(i = 0; i < length; i++){ if(check_current && stream == audio_signal->stream_current){ audio_signal->stream_current = NULL; check_current = FALSE; } stream = stream->next; } if(length != 0){ stream_end = stream->prev; stream_end->next = NULL; audio_signal->stream_end = stream_end; }else{ audio_signal->stream_beginning = NULL; audio_signal->stream_current = NULL; audio_signal->stream_end = NULL; } stream->prev = NULL; g_list_free_full(stream, g_free); } audio_signal->length = length; } /** * ags_audio_signal_stream_safe_resize: * @audio_signal: an #AgsAudioSignal * @length: a guint * * Resizes an #AgsAudioSignal's stream but doesn't shrink more than the * current stream position. * * Since: 1.0.0 */ void ags_audio_signal_stream_safe_resize(AgsAudioSignal *audio_signal, guint length) { guint length_till_current; length_till_current = ags_audio_signal_get_length_till_current(audio_signal); if(length_till_current < length){ ags_audio_signal_stream_resize(audio_signal, length); }else{ ags_audio_signal_stream_resize(audio_signal, length_till_current); } } void ags_audio_signal_real_realloc_buffer_size(AgsAudioSignal *audio_signal, guint buffer_size) { GList *current, *old; guint old_buffer_size; guint counter; guint i_old, i_current; old = audio_signal->stream_beginning; old_buffer_size = audio_signal->buffer_size; current = NULL; current = g_list_prepend(current, ags_stream_alloc(buffer_size, audio_signal->format)); counter = 0; i_old = 0; i_current = 0; while(old != NULL){ ((signed short *) current->data)[i_current] = ((signed short *) old->data)[i_old]; if(i_current == buffer_size){ current = g_list_prepend(current, ags_stream_alloc(buffer_size, audio_signal->format)); i_current = 0; counter++; } if(i_old == old_buffer_size){ old = old->next; i_old = 0; } i_current++; i_old++; } memset(((signed short *) current->data), 0, (buffer_size - i_current) * sizeof(signed short)); /* */ audio_signal->length = counter; audio_signal->last_frame = i_current; audio_signal->stream_end = current; audio_signal->stream_beginning = g_list_reverse(current); } /** * ags_audio_signal_realloc_buffer_size: * @audio_signal: an #AgsAudioSignal * @buffer_size: the buffer size * * Realloc the stream to the new buffer size. * * Since: 1.0.0 */ void ags_audio_signal_realloc_buffer_size(AgsAudioSignal *audio_signal, guint buffer_size) { g_return_if_fail(AGS_IS_AUDIO_SIGNAL(audio_signal)); g_object_ref(G_OBJECT(audio_signal)); g_signal_emit(G_OBJECT(audio_signal), audio_signal_signals[REALLOC_BUFFER_SIZE], 0, buffer_size); g_object_unref(G_OBJECT(audio_signal)); } /** * ags_audio_signal_copy_double_buffer_to_buffer: * @destination: destination buffer * @dchannels: destination audio channels * @source: source buffer * @schannels: source audio channels * @size: frame count to copy * * Copy a buffer to an other buffer. * * Since: 1.0.0 */ void ags_audio_signal_copy_double_buffer_to_buffer(signed short *destination, guint dchannels, double *source, guint schannels, guint size) { for(; 0stream_beginning == NULL){ ags_audio_signal_stream_resize(audio_signal, 0); }else{ GList *template_stream, *stream; guint word_size; guint copy_mode; audio_signal->buffer_size = template->buffer_size; ags_audio_signal_stream_resize(audio_signal, template->length); stream = audio_signal->stream_beginning; template_stream = template->stream_beginning; copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(audio_signal->format), ags_audio_buffer_util_format_from_soundcard(template->format)); switch(audio_signal->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { word_size = sizeof(signed char); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { word_size = sizeof(signed short); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { //NOTE:JK: The 24-bit linear samples use 32-bit physical space word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { word_size = sizeof(signed long); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { word_size = sizeof(signed long long); } break; default: g_warning("ags_audio_signal_duplicate(): unsupported word size"); return; } while(template_stream != NULL){ ags_audio_buffer_util_copy_buffer_to_buffer(stream->data, 1, 0, template_stream->data, 1, 0, template->buffer_size, copy_mode); stream = stream->next; template_stream = template_stream->next; } } } void ags_audio_signal_real_add_note(AgsAudioSignal *audio_signal, GObject *note) { if(!(AGS_IS_NOTE(note))){ return; } g_object_ref(note); audio_signal->note = g_list_prepend(audio_signal->note, note); } /** * ags_audio_signal_add_note: * @audio_signal: the #AgsAudioSignal * @note: the #AgsNote * * Add note to @audio_signal. * * Since: 1.4.0 */ void ags_audio_signal_add_note(AgsAudioSignal *audio_signal, GObject *note) { g_return_if_fail(AGS_IS_AUDIO_SIGNAL(audio_signal)); g_object_ref(G_OBJECT(audio_signal)); g_signal_emit(G_OBJECT(audio_signal), audio_signal_signals[ADD_NOTE], 0, note); g_object_unref(G_OBJECT(audio_signal)); } void ags_audio_signal_real_remove_note(AgsAudioSignal *audio_signal, GObject *note) { if(!(AGS_IS_NOTE(note))){ return; } if(g_list_find(audio_signal->note, note) != NULL){ audio_signal->note = g_list_remove(audio_signal->note, note); g_object_unref(note); } } /** * ags_audio_signal_remove_note: * @audio_signal: the #AgsAudioSignal * @note: the #AgsNote * * Remove note from @audio_signal. * * Since: 1.4.0 */ void ags_audio_signal_remove_note(AgsAudioSignal *audio_signal, GObject *note) { g_return_if_fail(AGS_IS_AUDIO_SIGNAL(audio_signal)); g_object_ref(G_OBJECT(audio_signal)); g_signal_emit(G_OBJECT(audio_signal), audio_signal_signals[REMOVE_NOTE], 0, note); g_object_unref(G_OBJECT(audio_signal)); } /** * ags_audio_signal_get_template: * @audio_signal: a #GList containing #AgsAudioSignal * * Retrieve the template audio signal. * * Returns: the template #AgsAudioSignal * * Since: 1.0.0 */ AgsAudioSignal* ags_audio_signal_get_template(GList *audio_signal) { GList *list; list = audio_signal; while(list != NULL){ if((AGS_AUDIO_SIGNAL_TEMPLATE & (AGS_AUDIO_SIGNAL(list->data)->flags)) != 0) return((AgsAudioSignal *) list->data); list = list->next; } return(NULL); } /** * ags_audio_signal_get_stream_current: * @audio_signal: a #GList containing #AgsAudioSignal * @recall_id: the matching #AgsRecallID * * Retrieve next current stream of #AgsAudioSignal list. * * Returns: next #GList matching #AgsRecallID * * Since: 1.0.0 */ GList* ags_audio_signal_get_stream_current(GList *list_audio_signal, GObject *recall_id) { AgsAudioSignal *audio_signal; GList *list; list = list_audio_signal; while(list != NULL){ audio_signal = AGS_AUDIO_SIGNAL(list->data); if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) != 0){ list = list->next; continue; } if(audio_signal->stream_current != NULL && audio_signal->recall_id == recall_id) return(list); list = list->next; } return(NULL); } /** * ags_audio_signal_get_by_recall_id: * @audio_signal: a #GList containing #AgsAudioSignal * @recall_id: matching #AgsRecallID * * Retrieve next audio signal refering to @recall_id * * Returns: matching #AgsAudioSignal * * Since: 1.0.0 */ GList* ags_audio_signal_get_by_recall_id(GList *list_audio_signal, GObject *recall_id) { AgsAudioSignal *audio_signal; GList *list; list = list_audio_signal; while(list != NULL){ audio_signal = AGS_AUDIO_SIGNAL(list->data); if((AGS_AUDIO_SIGNAL_TEMPLATE & (audio_signal->flags)) != 0){ list = list->next; continue; } if(audio_signal->recall_id == recall_id){ return(list); } list = list->next; } return(NULL); } /** * ags_audio_signal_tile: * @audio_signal: an #AgsAudioSignal * @template: the source #AgsAudioSignal * @frame_count: new frame count * * Tile audio signal data. * * Since: 1.0.0 */ void ags_audio_signal_tile(AgsAudioSignal *audio_signal, AgsAudioSignal *template, guint frame_count) { GObject *soundcard; GList *template_stream, *audio_signal_stream, *audio_signal_stream_end; signed short *template_buffer, *audio_signal_buffer; guint template_size; guint remaining_size; guint i, j, j_offcut; guint k, k_end; guint copy_mode; gboolean alloc_buffer; soundcard = audio_signal->soundcard; audio_signal_stream = NULL; template_stream = template->stream_beginning; if(template_stream == NULL){ return; } template_size = (guint) (template->delay * template->buffer_size) + template->length * template->buffer_size + template->last_frame; copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(audio_signal->format), ags_audio_buffer_util_format_from_soundcard(template->format)); j = 0; k = 0; if(template->buffer_size > audio_signal->buffer_size){ k_end = audio_signal->buffer_size; }else if(template->buffer_size == audio_signal->buffer_size){ k_end = audio_signal->buffer_size; }else{ k_end = template->buffer_size; } j_offcut = 0; alloc_buffer = TRUE; /* write buffers */ for(i = 0; i < frame_count - template->buffer_size; i += audio_signal->buffer_size){ /* alloc buffer and prepend */ if(alloc_buffer){ audio_signal_buffer = ags_stream_alloc(audio_signal->buffer_size, audio_signal->format); audio_signal_stream = g_list_prepend(audio_signal_stream, audio_signal_buffer); } /* get template buffer */ template_buffer = (signed short *) template_stream->data; /* allocate and copy buffer */ if(template_size < audio_signal->buffer_size){ /* copy buffer */ //FIXME:JK: ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal_buffer, 1, 0, template_buffer, 1, j_offcut, template_size - j_offcut, copy_mode); // ags_audio_signal_copy_buffer_to_buffer(audio_signal_buffer, 1, // &(template_buffer[j_offcut]), 1, template_size - j_offcut); for(j = template_size - j_offcut; j < audio_signal->buffer_size - template_size; j += template_size){ //FIXME:JK: ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal_buffer, 1, 0, template_buffer, 1, 0, template_size, copy_mode); // ags_audio_signal_copy_buffer_to_buffer(&(audio_signal_buffer[j]), 1, // template_buffer, 1, template_size); } j_offcut = audio_signal->buffer_size - j; //FIXME:JK: ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal_buffer, 1, j, template_buffer, 1, j_offcut, k_end - j_offcut, copy_mode); // ags_audio_signal_copy_buffer_to_buffer(&(audio_signal_buffer[j]), 1, // template_buffer, 1, j_offcut); }else{ /* deep copy */ //FIXME:JK: ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal_buffer, 1, j, template_buffer, 1, j_offcut, k_end - j_offcut, copy_mode); // ags_audio_signal_copy_buffer_to_buffer(&(audio_signal_buffer[j]), 1, // &(template_buffer[j_offcut]), 1, k_end - j_offcut); k += (k_end - j_offcut); /* iterate template stream */ if(k_end + j_offcut == template->buffer_size){ if(template_stream->next != NULL){ template_stream = template_stream->next; }else{ template_stream = template->stream_beginning; } } /* copy parameters */ j = k % audio_signal->buffer_size; if(template->buffer_size < audio_signal->buffer_size){ j_offcut = k % template->buffer_size; }else if(template->buffer_size == audio_signal->buffer_size){ j_offcut = k % audio_signal->buffer_size; }else{ j_offcut = k % audio_signal->buffer_size; } k_end = template->buffer_size - j_offcut; /* alloc audio signal */ if(j == 0){ alloc_buffer = TRUE; }else{ alloc_buffer = FALSE; } } } /* write remaining buffer */ remaining_size = frame_count - (i * audio_signal->buffer_size); if(remaining_size > k_end - j_offcut){ ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal_buffer, 1, j, template_buffer, 1, j_offcut, k_end - j_offcut, copy_mode); // ags_audio_signal_copy_buffer_to_buffer(&(audio_signal_buffer[j]), 1, // &(template_buffer[j_offcut]), 1, k_end - j_offcut); if(k_end + j_offcut == template->buffer_size){ if(template_stream->next != NULL){ template_stream = template_stream->next; }else{ template_stream = template->stream_beginning; } } //FIXME:JK: ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal_buffer, 1, j, template_buffer, 1, j_offcut, remaining_size - (k_end - j_offcut), copy_mode); // ags_audio_signal_copy_buffer_to_buffer(&(audio_signal_buffer[j]), 1, // &(template_buffer[j_offcut]), 1, remaining_size - (k_end - j_offcut)); }else{ //FIXME:JK: ags_audio_buffer_util_copy_buffer_to_buffer(audio_signal_buffer, 1, j, template_buffer, 1, j_offcut, remaining_size, copy_mode); // ags_audio_signal_copy_buffer_to_buffer(&(audio_signal_buffer[j]), 1, // &(template_buffer[j_offcut]), 1, remaining_size); } /* reverse list */ audio_signal_stream_end = audio_signal_stream; audio_signal_stream = g_list_reverse(audio_signal_stream); if(audio_signal->stream_beginning != NULL){ g_list_free_full(audio_signal->stream_beginning, g_free); } audio_signal->stream_beginning = audio_signal_stream; // audio_signal->stream_current = audio_signal_stream; audio_signal->stream_end = audio_signal_stream_end; } /** * ags_audio_signal_scale: * @audio_signal: an #AgsAudioSignal * @template: the source #AgsAudioSignal * @length: new frame count * * Scale audio signal data. * * Since: 1.0.0 */ void ags_audio_signal_scale(AgsAudioSignal *audio_signal, AgsAudioSignal *template, guint length) { GList *source, *destination, *stream_template; gpointer data; double scale_factor, morph_factor; guint offset; double step; guint i, j, j_stop; guint k, template_k; gboolean expand; auto void ags_audio_signal_scale_copy_8_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution); auto void ags_audio_signal_scale_copy_16_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution); auto void ags_audio_signal_scale_copy_24_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution); auto void ags_audio_signal_scale_copy_32_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution); auto void ags_audio_signal_scale_copy_64_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution); void ags_audio_signal_scale_copy_8_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution){ gint8 *sbuffer; sbuffer = (gint8 *) source->data; switch(dresolution){ case AGS_SOUNDCARD_SIGNED_8_BIT: { gint8 *dbuffer; gdouble scale; dbuffer = (gint8 *) destination->data; scale = 1.0; dbuffer[doffset] = scale * sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { gint16 *dbuffer; gdouble scale; dbuffer = (gint16 *) destination->data; scale = exp2(8.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { unsigned char *dbuffer; gint16 value; gdouble scale; gint16 mask; dbuffer = (unsigned char *) destination->data; scale = exp2(16.0); value = scale * sbuffer[soffset]; mask = 0xff; dbuffer[doffset * 3] = mask & value; dbuffer[doffset * 3 + 1] = (mask << 8) & value; if(sbuffer[soffset] < 0){ dbuffer[doffset * 3 + 1] &= (~0x80); dbuffer[doffset * 3 + 2] = 0x80; }else{ dbuffer[doffset * 3 + 2] = 0; } } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { gint32 *dbuffer; gdouble scale; dbuffer = (gint32 *) destination->data; scale = exp2(24.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { gint64 *dbuffer; gdouble scale; dbuffer = (gint64 *) destination->data; scale = exp2(56.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; } } void ags_audio_signal_scale_copy_16_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution){ gint16 *sbuffer; sbuffer = (gint16 *) source->data; switch(dresolution){ case AGS_SOUNDCARD_SIGNED_8_BIT: { gint8 *dbuffer; gdouble scale; dbuffer = (gint8 *) destination->data; scale = exp2(1.0 / 8.0); dbuffer[doffset] = (gint8) floor(scale * sbuffer[soffset]); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { gint16 *dbuffer; dbuffer = (gint16 *) destination->data; dbuffer[doffset] = sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { unsigned char *dbuffer; gint32 value; gdouble scale; gint32 mask; dbuffer = (unsigned char *) destination->data; scale = exp2(8.0); mask = 0xff; value = scale * sbuffer[soffset]; dbuffer[doffset * 3] = mask & value; dbuffer[doffset * 3 + 1] = (mask << 8) & value; dbuffer[doffset * 3 + 2] = (mask << 16) & value; if(sbuffer[soffset] < 0){ dbuffer[doffset * 3 + 2] |= 0x80; } } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { gint32 *dbuffer; gdouble scale; dbuffer = (gint32 *) destination->data; scale = exp2(16.0); dbuffer[doffset] = sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { gint64 *dbuffer; gdouble scale; dbuffer = (gint64 *) destination->data; scale = exp2(48.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; } } void ags_audio_signal_scale_copy_24_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution){ unsigned char *sbuffer; sbuffer = (char *) source->data; switch(dresolution){ case AGS_SOUNDCARD_SIGNED_8_BIT: { gint8 *dbuffer; gdouble scale; gint16 *mask; dbuffer = (gint8 *) destination->data; scale = exp2(1.0 / 16.0); dbuffer[doffset] = (gint8) round(scale * (double) sbuffer[soffset]); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { gint16 *dbuffer; gdouble scale; dbuffer = (gint16 *) destination->data; scale = exp2(1.0 / 8.0); dbuffer[doffset] = (gint16) round(scale * (double) sbuffer[soffset]); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { unsigned char *dbuffer; gint16 mask; dbuffer = (unsigned char *) destination->data; dbuffer[doffset * 3] = sbuffer[soffset * 3]; dbuffer[doffset * 3 + 1] = sbuffer[soffset * 3 + 1]; dbuffer[doffset * 3 + 2] = sbuffer[soffset * 3 + 2]; } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { gint32 *dbuffer; gdouble scale; dbuffer = (gint32 *) destination->data; scale = exp2(8.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { gint64 *dbuffer; gdouble scale; dbuffer = (gint64 *) destination->data; scale = exp2(40.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; } } void ags_audio_signal_scale_copy_32_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution){ gint32 *sbuffer; sbuffer = (gint32 *) source->data; switch(dresolution){ case AGS_SOUNDCARD_SIGNED_8_BIT: { gint8 *dbuffer; gdouble scale; dbuffer = (gint8 *) destination->data; scale = exp2(1.0 / 24.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { gint16 *dbuffer; gdouble scale; dbuffer = (gint16 *) destination->data; scale = exp2(1.0 / 16.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { unsigned char *dbuffer; gint32 value; gdouble scale; gint32 mask; dbuffer = (unsigned char *) destination->data; scale = exp2(1.0 / 8.0); mask = 0xff; value = scale * sbuffer[soffset]; dbuffer[doffset * 3] = mask & value; dbuffer[doffset * 3 + 1] = (mask << 8) & value; dbuffer[doffset * 3 + 2] = (mask << 16) & value; if(sbuffer[soffset] < 0){ dbuffer[doffset * 3 + 2] |= 0x80; } } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { gint32 *dbuffer; dbuffer = (gint32 *) destination->data; dbuffer[doffset] = sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { gint64 *dbuffer; gdouble scale; dbuffer = (gint64 *) destination->data; scale = exp2(32.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; } } void ags_audio_signal_scale_copy_64_bit(GList *source, GList *destination, guint soffset, guint doffset, guint dresolution){ gint64 *sbuffer; sbuffer = (gint64 *) source->data; switch(dresolution){ case AGS_SOUNDCARD_SIGNED_8_BIT: { gint8 *dbuffer; gdouble scale; dbuffer = (gint8 *) destination->data; scale = exp2(1 / 56.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { gint16 *dbuffer; gdouble scale; dbuffer = (gint16 *) destination->data; scale = exp2(1 / 48.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { unsigned char *dbuffer; gint32 value; gdouble scale; gint32 mask; dbuffer = (unsigned char *) destination->data; scale = exp2(1.0 / 40.0); mask = 0xff; value = scale * sbuffer[soffset]; dbuffer[doffset * 3] = mask & value; dbuffer[doffset * 3 + 1] = (mask << 8) & value; dbuffer[doffset * 3 + 2] = (mask << 16) & value; if(sbuffer[soffset] < 0){ dbuffer[doffset * 3 + 2] |= 0x80; } } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { gint32 *dbuffer; gdouble scale; dbuffer = (gint32 *) destination->data; scale = exp2(1 / 32.0); dbuffer[doffset] = scale * sbuffer[soffset]; } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { gint64 *dbuffer; dbuffer = (gint64 *) destination->data; dbuffer[doffset] = sbuffer[soffset]; } break; } } source = template->stream_beginning; if(template->samplerate < audio_signal->samplerate){ expand = TRUE; }else{ expand = FALSE; } scale_factor = 1.0 / template->length * length; morph_factor = 1.0 / template->format * audio_signal->format; /* prepare destination */ ags_audio_signal_stream_resize(audio_signal, length); /* create audio data */ //TODO:JK: fix me j_stop = audio_signal->format; // lcm(audio_signal->format, template->format); stream_template = NULL; offset = 0; step = 0.0; for(i = 0; i < template->length; i++){ for(; j < j_stop; j++){ if(offset == audio_signal->buffer_size && step >= morph_factor){ break; } if(offset == 0){ if(expand){ data = (gpointer) malloc(sizeof(audio_signal->buffer_size * morph_factor)); }else{ data = (gpointer) malloc(sizeof(audio_signal->buffer_size / morph_factor)); } stream_template = g_list_prepend(stream_template, data); destination = stream_template; } switch(template->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { ags_audio_signal_scale_copy_8_bit(destination, source, j, offset, audio_signal->format); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { ags_audio_signal_scale_copy_16_bit(destination, source, j, offset, audio_signal->format); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { ags_audio_signal_scale_copy_24_bit(destination, source, j, offset, audio_signal->format); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { ags_audio_signal_scale_copy_32_bit(destination, source, j, offset, audio_signal->format); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { ags_audio_signal_scale_copy_64_bit(destination, source, j, offset, audio_signal->format); } break; } step += (1 / morph_factor); if(step >= morph_factor){ step = 0.0; offset++; } } if(j == j_stop){ j = 0; } if(offset == template->buffer_size && step == 0.0){ offset = 0; source = source->next; } } stream_template = g_list_reverse(stream_template); /* morph */ //TODO:JK: implement me /* scale */ source = stream_template; destination = audio_signal->stream_beginning; offset = 0; k = 0; template_k = 0; while(destination != NULL){ for(i = 0; i < audio_signal->buffer_size && k < audio_signal->buffer_size && template_k < template->buffer_size; i++, k++, template_k++){ switch(audio_signal->format){ case AGS_SOUNDCARD_SIGNED_8_BIT: { ags_audio_signal_scale_copy_8_bit(destination, source, i, offset, audio_signal->format); } break; case AGS_SOUNDCARD_SIGNED_16_BIT: { ags_audio_signal_scale_copy_16_bit(destination, source, i, offset, audio_signal->format); } break; case AGS_SOUNDCARD_SIGNED_24_BIT: { ags_audio_signal_scale_copy_24_bit(destination, source, i, offset, audio_signal->format); } break; case AGS_SOUNDCARD_SIGNED_32_BIT: { ags_audio_signal_scale_copy_32_bit(destination, source, i, offset, audio_signal->format); } break; case AGS_SOUNDCARD_SIGNED_64_BIT: { ags_audio_signal_scale_copy_64_bit(destination, source, i, offset, audio_signal->format); } break; } offset = (guint) floor(morph_factor * (double) i); } if(k == audio_signal->buffer_size){ destination = destination->next; } if(template_k == template->buffer_size){ source = source->next; } } } /** * ags_audio_signal_feed: * @audio_signal: the #AgsAudioSignal * @template: the template #AgsAudioSignal * @frame_count: the new frame count * * Feed audio signal to grow upto frame count. * * Since: 1.0.0 */ void ags_audio_signal_feed(AgsAudioSignal *audio_signal, AgsAudioSignal *template, guint frame_count) { GList *stream, *template_stream; guint old_length; guint old_last_frame; guint old_frame_count; gdouble delay; guint attack; guint loop_length; guint loop_frame_count; guint n_frames; guint copy_n_frames; guint nth_loop; guint i, j, k; guint copy_mode; if(audio_signal == NULL || template == NULL){ return; } old_length = audio_signal->length; old_last_frame = audio_signal->last_frame; old_frame_count = old_last_frame + (old_length * audio_signal->buffer_size) - audio_signal->first_frame; /* resize */ if(template->loop_end > template->loop_start){ loop_length = template->loop_end - template->loop_start; loop_frame_count = ((frame_count - template->loop_start) / loop_length) * template->buffer_size; ags_audio_signal_stream_resize(audio_signal, (guint) ceil(frame_count / audio_signal->buffer_size) + 1); }else{ ags_audio_signal_stream_resize(audio_signal, (guint) ceil(frame_count / audio_signal->buffer_size) + 1); return; } audio_signal->last_frame = ((guint) (delay * audio_signal->buffer_size) + frame_count + attack) % audio_signal->buffer_size; if(template->length == 0){ return; } delay = audio_signal->delay; attack = audio_signal->attack; /* generic copying */ stream = g_list_nth(audio_signal->stream_beginning, (guint) ((delay * audio_signal->buffer_size) + attack) / audio_signal->buffer_size); template_stream = template->stream_beginning; /* loop related copying */ copy_mode = ags_audio_buffer_util_get_copy_mode(ags_audio_buffer_util_format_from_soundcard(audio_signal->format), ags_audio_buffer_util_format_from_soundcard(template->format)); for(i = 0, j = 0, k = attack, nth_loop = 0; i < frame_count;){ /* compute count of frames to copy */ copy_n_frames = audio_signal->buffer_size; /* limit nth loop */ if(i > template->loop_start && i + copy_n_frames > template->loop_start + loop_length && i + copy_n_frames < template->loop_start + loop_frame_count && i + copy_n_frames >= template->loop_start + (nth_loop + 1) * loop_length){ copy_n_frames = (template->loop_start + (nth_loop + 1) * loop_length) - i; } /* check boundaries */ if((k % audio_signal->buffer_size) + copy_n_frames > audio_signal->buffer_size){ copy_n_frames = audio_signal->buffer_size - (k % audio_signal->buffer_size); } if(j + copy_n_frames > audio_signal->buffer_size){ copy_n_frames = audio_signal->buffer_size - j; } if(stream == NULL || template_stream == NULL){ break; } /* copy */ ags_audio_buffer_util_copy_buffer_to_buffer(stream->data, 1, k % audio_signal->buffer_size, template_stream->data, 1, j, copy_n_frames, copy_mode); /* increment and iterate */ if((i + copy_n_frames) % audio_signal->buffer_size == 0){ stream = stream->next; } if(j + copy_n_frames == template->buffer_size){ template_stream = template_stream->next; } if(template_stream == NULL || (i > template->loop_start && i + copy_n_frames > template->loop_start + loop_length && i + copy_n_frames < template->loop_start + loop_frame_count && i + copy_n_frames >= template->loop_start + (nth_loop + 1) * loop_length)){ j = template->loop_start % template->buffer_size; template_stream = g_list_nth(template->stream_beginning, floor(template->loop_start / template->buffer_size)); nth_loop++; }else{ j += copy_n_frames; } i += copy_n_frames; k += copy_n_frames; if(j == template->buffer_size){ j = 0; } } } /** * ags_audio_signal_envelope: * @audio_signal: the #AgsAudioSignal * @attack: the attack * @decay: the decay * @sustain: the sustain * @release: the release * @ratio: the ratio * * Envelope audio signal. * * Since: 1.0.0 */ void ags_audio_signal_envelope(AgsAudioSignal *audio_signal, gdouble attack, gdouble decay, gdouble sustain, gdouble release, gdouble ratio) { GList *stream; signed short *buffer; gdouble volume; guint frame_count, current_frame_count; guint i, j, k; if(ratio == 0.0){ return; } stream = audio_signal->stream_beginning; buffer = stream->data; frame_count = audio_signal->buffer_size * audio_signal->length - (audio_signal->buffer_size - audio_signal->last_frame); for(j = 0, k = 0; j < 4; j++){ for(i = 0; ratio * (k + i) < (1.0 / ratio) * (frame_count / 4.0); i++, k++){ if(k != 0 && k % audio_signal->buffer_size == 0){ stream = stream->next; buffer = stream->data; } switch(j){ case 0: { volume = (1.0 / (k - i)) / (attack / (k - i)); } break; case 1: { volume = (1.0 / (k - i)) / (decay / (k - i)); } break; case 2: { volume = (1.0 / (k - i)) / (sustain / (k - i)); } break; case 3: { volume = (1.0 / (k - i)) / (release / (k - i)); } break; } *buffer = (signed short) (volume * buffer[0]); buffer++; } } } /** * ags_audio_signal_is_active: * @audio_signal: the #GList-struct containing #AgsAudioSignal * @recall_id: the #AgsRecallID * * Check if is active. * * Returns: %TRUE if related audio signal to recall id is available, otherwise %FALSE * * Since: 1.0.0 */ gboolean ags_audio_signal_is_active(GList *audio_signal, GObject *recall_id) { AgsAudioSignal *current; AgsRecyclingContext *recycling_context; if(recall_id == NULL || AGS_RECALL_ID(recall_id)->recycling_context == NULL){ return(FALSE); } recycling_context = AGS_RECALL_ID(recall_id)->recycling_context; while(audio_signal != NULL){ current = AGS_AUDIO_SIGNAL(audio_signal->data); if(current->recall_id != NULL && AGS_RECALL_ID(current->recall_id)->recycling_context == recycling_context){ return(TRUE); } audio_signal = audio_signal->next; } return(FALSE); } /** * ags_audio_signal_new: * @soundcard: the assigned #AgsSoundcard * @recycling: the #AgsRecycling * @recall_id: the #AgsRecallID, it can be NULL if %AGS_AUDIO_SIGNAL_TEMPLATE is set * * Creates a #AgsAudioSignal, with defaults of @soundcard, linking @recycling tree * and refering to @recall_id. * * Returns: a new #AgsAudioSignal * * Since: 1.0.0 */ AgsAudioSignal* ags_audio_signal_new(GObject *soundcard, GObject *recycling, GObject *recall_id) { AgsAudioSignal *audio_signal; audio_signal = (AgsAudioSignal *) g_object_new(AGS_TYPE_AUDIO_SIGNAL, "soundcard", soundcard, "recycling", recycling, "recall-id", recall_id, NULL); return(audio_signal); } /** * ags_audio_signal_new_with_length: * @soundcard: the assigned #AgsSoundcard * @recycling: the #AgsRecycling * @recall_id: the #AgsRecallID, it can be NULL if %AGS_AUDIO_SIGNAL_TEMPLATE is set * @length: audio data frame count * * Creates a #AgsAudioSignal, with defaults of @soundcard, linking @recycling tree * and refering to @recall_id. * The audio data is tiled to @length frame count. * * Returns: a new #AgsAudioSignal * * Since: 1.0.0 */ AgsAudioSignal* ags_audio_signal_new_with_length(GObject *soundcard, GObject *recycling, GObject *recall_id, guint length) { AgsAudioSignal *audio_signal, *template; audio_signal = (AgsAudioSignal *) g_object_new(AGS_TYPE_AUDIO_SIGNAL, "soundcard", soundcard, "recycling", recycling, "recall-id", recall_id, NULL); template = ags_audio_signal_get_template(AGS_RECYCLING(recycling)->audio_signal); if(template != NULL){ ags_audio_signal_tile(audio_signal, template, length); } return(audio_signal); } gsequencer-1.4.24/ags/audio/ags_recall_container.h0000644000175000017500000000657213247044247017067 00000000000000/* GSequencer - Advanced GTK Sequencer * Copyright (C) 2005-2017 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 . */ #ifndef __AGS_RECALL_CONTAINER_H__ #define __AGS_RECALL_CONTAINER_H__ #include #include #include #include #define AGS_TYPE_RECALL_CONTAINER (ags_recall_container_get_type()) #define AGS_RECALL_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_RECALL_CONTAINER, AgsRecallContainer)) #define AGS_RECALL_CONTAINER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_RECALL_CONTAINER, AgsRecallContainerClass)) #define AGS_IS_RECALL_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_RECALL_CONTAINER)) #define AGS_IS_RECALL_CONTAINER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_RECALL_CONTAINER)) #define AGS_RECALL_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_RECALL_CONTAINER, AgsRecallContainerClass)) typedef struct _AgsRecallContainer AgsRecallContainer; typedef struct _AgsRecallContainerClass AgsRecallContainerClass; /** * AgsRecallContainerFlags: * @AGS_RECALL_CONTAINER_PLAY: bound to play context * * Enum values to control the behavior or indicate internal state of #AgsRecallContainer by * enable/disable as flags. */ typedef enum{ AGS_RECALL_CONTAINER_PLAY = 1, }AgsRecallContainerFlags; /** * AgsRecallContainerFindFlags: * @AGS_RECALL_CONTAINER_FIND_TYPE: find type * @AGS_RECALL_CONTAINER_FIND_TEMPLATE: find template * @AGS_RECALL_CONTAINER_FIND_RECALL_ID: find recall id * * Enum values to specify find criteria. */ typedef enum{ AGS_RECALL_CONTAINER_FIND_TYPE = 1, AGS_RECALL_CONTAINER_FIND_TEMPLATE = 1 << 1, AGS_RECALL_CONTAINER_FIND_RECALL_ID = 1 << 2, }AgsRecallContainerFindFlags; struct _AgsRecallContainer { GObject object; guint flags; GType recall_audio_type; AgsRecall *recall_audio; GType recall_audio_run_type; GList *recall_audio_run; GType recall_channel_type; GList *recall_channel; GType recall_channel_run_type; GList *recall_channel_run; }; struct _AgsRecallContainerClass { GObjectClass object; }; GType ags_recall_container_get_type(); AgsRecall* ags_recall_container_get_recall_audio(AgsRecallContainer *container); GList* ags_recall_container_get_recall_audio_run(AgsRecallContainer *container); GList* ags_recall_container_get_recall_channel(AgsRecallContainer *container); GList* ags_recall_container_get_recall_channel_run(AgsRecallContainer *container); GList* ags_recall_container_find(GList *recall_container, GType type, guint find_flags, AgsRecallID *recall_id); AgsRecallContainer* ags_recall_container_new(); #endif /*__AGS_RECALL_CONTAINER_H__*/ gsequencer-1.4.24/ags/audio/ags_recall_channel_run_dummy.c0000644000175000017500000002720013256163135020574 00000000000000/* 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void ags_recall_channel_run_dummy_class_init(AgsRecallChannelRunDummyClass *recall_channel_run_dummy); void ags_recall_channel_run_dummy_connectable_interface_init(AgsConnectableInterface *connectable); void ags_recall_channel_run_dummy_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable); void ags_recall_channel_run_dummy_plugin_interface_init(AgsPluginInterface *plugin); void ags_recall_channel_run_dummy_init(AgsRecallChannelRunDummy *recall_channel_run_dummy); void ags_recall_channel_run_dummy_connect(AgsConnectable *connectable); void ags_recall_channel_run_dummy_disconnect(AgsConnectable *connectable); void ags_recall_channel_run_dummy_connect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_channel_run_dummy_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable); void ags_recall_channel_run_dummy_finalize(GObject *gobject); void ags_recall_channel_run_dummy_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin); xmlNode* ags_recall_channel_run_dummy_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin); AgsRecall* ags_recall_channel_run_dummy_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter); /** * SECTION:ags_recall_channel_run_dummy * @short_description: channel dummy dynamic context of recall * @title: AgsRecallChannelRunDummy * @section_id: * @include: ags/audio/ags_recall_channel_run_dummy.h * * #AgsRecallChannelRunDummy acts as channel dummy dynamic recall. */ static gpointer ags_recall_channel_run_dummy_parent_class = NULL; static AgsConnectableInterface *ags_recall_channel_run_dummy_parent_connectable_interface; static AgsDynamicConnectableInterface *ags_recall_channel_run_dummy_parent_dynamic_connectable_interface; static AgsPluginInterface *ags_recall_channel_run_dummy_parent_plugin_interface; GType ags_recall_channel_run_dummy_get_type() { static GType ags_type_recall_channel_run_dummy = 0; if(!ags_type_recall_channel_run_dummy){ static const GTypeInfo ags_recall_channel_run_dummy_info = { sizeof (AgsRecallChannelRunDummyClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) ags_recall_channel_run_dummy_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AgsRecallChannelRunDummy), 0, /* n_preallocs */ (GInstanceInitFunc) ags_recall_channel_run_dummy_init, }; static const GInterfaceInfo ags_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_channel_run_dummy_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_dynamic_connectable_interface_info = { (GInterfaceInitFunc) ags_recall_channel_run_dummy_dynamic_connectable_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; static const GInterfaceInfo ags_plugin_interface_info = { (GInterfaceInitFunc) ags_recall_channel_run_dummy_plugin_interface_init, NULL, /* interface_finalize */ NULL, /* interface_data */ }; ags_type_recall_channel_run_dummy = g_type_register_static(AGS_TYPE_RECALL_CHANNEL_RUN, "AgsRecallChannelRunDummy", &ags_recall_channel_run_dummy_info, 0); g_type_add_interface_static(ags_type_recall_channel_run_dummy, AGS_TYPE_CONNECTABLE, &ags_connectable_interface_info); g_type_add_interface_static(ags_type_recall_channel_run_dummy, AGS_TYPE_DYNAMIC_CONNECTABLE, &ags_dynamic_connectable_interface_info); g_type_add_interface_static(ags_type_recall_channel_run_dummy, AGS_TYPE_PLUGIN, &ags_plugin_interface_info); } return (ags_type_recall_channel_run_dummy); } void ags_recall_channel_run_dummy_class_init(AgsRecallChannelRunDummyClass *recall_channel_run_dummy) { GObjectClass *gobject; AgsRecallClass *recall; ags_recall_channel_run_dummy_parent_class = g_type_class_peek_parent(recall_channel_run_dummy); /* GObjectClass */ gobject = (GObjectClass *) recall_channel_run_dummy; gobject->finalize = ags_recall_channel_run_dummy_finalize; /* AgsRecallClass */ recall = (AgsRecallClass *) recall_channel_run_dummy; recall->duplicate = ags_recall_channel_run_dummy_duplicate; } void ags_recall_channel_run_dummy_connectable_interface_init(AgsConnectableInterface *connectable) { ags_recall_channel_run_dummy_parent_connectable_interface = g_type_interface_peek_parent(connectable); connectable->connect = ags_recall_channel_run_dummy_connect; connectable->disconnect = ags_recall_channel_run_dummy_disconnect; } void ags_recall_channel_run_dummy_dynamic_connectable_interface_init(AgsDynamicConnectableInterface *dynamic_connectable) { ags_recall_channel_run_dummy_parent_dynamic_connectable_interface = g_type_interface_peek_parent(dynamic_connectable); dynamic_connectable->connect_dynamic = ags_recall_channel_run_dummy_connect_dynamic; dynamic_connectable->disconnect_dynamic = ags_recall_channel_run_dummy_disconnect_dynamic; } void ags_recall_channel_run_dummy_plugin_interface_init(AgsPluginInterface *plugin) { ags_recall_channel_run_dummy_parent_plugin_interface = g_type_interface_peek_parent(plugin); plugin->read = ags_recall_channel_run_dummy_read; plugin->write = ags_recall_channel_run_dummy_write; } void ags_recall_channel_run_dummy_init(AgsRecallChannelRunDummy *recall_channel_run_dummy) { AGS_RECALL(recall_channel_run_dummy)->name = "ags-dummy"; AGS_RECALL(recall_channel_run_dummy)->version = AGS_RECALL_DEFAULT_VERSION; AGS_RECALL(recall_channel_run_dummy)->build_id = AGS_RECALL_DEFAULT_BUILD_ID; AGS_RECALL(recall_channel_run_dummy)->xml_type = "ags-recall-channel-run-dummy"; AGS_RECALL(recall_channel_run_dummy)->port = NULL; AGS_RECALL(recall_channel_run_dummy)->flags |= (AGS_RECALL_INPUT_ORIENTATED | AGS_RECALL_PLAYBACK | AGS_RECALL_SEQUENCER | AGS_RECALL_NOTATION); AGS_RECALL(recall_channel_run_dummy)->child_type = AGS_TYPE_RECALL_RECYCLING_DUMMY; } void ags_recall_channel_run_dummy_finalize(GObject *gobject) { /* empty */ /* call parent */ G_OBJECT_CLASS(ags_recall_channel_run_dummy_parent_class)->finalize(gobject); } void ags_recall_channel_run_dummy_connect(AgsConnectable *connectable) { AgsRecallChannelRun *recall_channel_run; GObject *gobject; /* call parent */ ags_recall_channel_run_dummy_parent_connectable_interface->connect(connectable); /* empty */ } void ags_recall_channel_run_dummy_disconnect(AgsConnectable *connectable) { /* call parent */ ags_recall_channel_run_dummy_parent_connectable_interface->disconnect(connectable); /* empty */ } void ags_recall_channel_run_dummy_connect_dynamic(AgsDynamicConnectable *dynamic_connectable) { /* call parent */ ags_recall_channel_run_dummy_parent_dynamic_connectable_interface->connect_dynamic(dynamic_connectable); /* empty */ } void ags_recall_channel_run_dummy_disconnect_dynamic(AgsDynamicConnectable *dynamic_connectable) { AgsChannel *channel; AgsRecallChannelRunDummy *recall_channel_run_dummy; ags_recall_channel_run_dummy_parent_dynamic_connectable_interface->disconnect_dynamic(dynamic_connectable); /* empty */ } AgsRecall* ags_recall_channel_run_dummy_duplicate(AgsRecall *recall, AgsRecallID *recall_id, guint *n_params, GParameter *parameter) { AgsRecallChannelRunDummy *recall_channel_run_dummy, *copy; GList *recycling_dummy; recall_channel_run_dummy = (AgsRecallChannelRunDummy *) recall; copy = (AgsRecallChannelRunDummy *) AGS_RECALL_CLASS(ags_recall_channel_run_dummy_parent_class)->duplicate(recall, recall_id, n_params, parameter); AGS_RECALL(copy)->child_type = recall->child_type; copy->recycling_dummy_child_type = recall_channel_run_dummy->recycling_dummy_child_type; recycling_dummy = AGS_RECALL(copy)->children; while(recycling_dummy != NULL){ AGS_RECALL(recycling_dummy->data)->child_type = recall_channel_run_dummy->recycling_dummy_child_type; recycling_dummy = recycling_dummy->next; } return((AgsRecall *) copy); } void ags_recall_channel_run_dummy_read(AgsFile *file, xmlNode *node, AgsPlugin *plugin) { AgsRecallChannelRunDummy *gobject; gobject = AGS_RECALL_CHANNEL_RUN_DUMMY(plugin); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", xmlGetProp(node, AGS_FILE_ID_PROP)), "reference", gobject, NULL)); gobject->recycling_dummy_child_type = g_type_from_name(xmlGetProp(node, "recycling-child-type")); } xmlNode* ags_recall_channel_run_dummy_write(AgsFile *file, xmlNode *parent, AgsPlugin *plugin) { AgsRecallChannelRunDummy *recall_channel_run_dummy; xmlNode *node; gchar *id; recall_channel_run_dummy = AGS_RECALL_CHANNEL_RUN_DUMMY(plugin); id = ags_id_generator_create_uuid(); node = xmlNewNode(NULL, "ags-recall-channel-run-dummy"); xmlNewProp(node, AGS_FILE_ID_PROP, id); ags_file_add_id_ref(file, g_object_new(AGS_TYPE_FILE_ID_REF, "application-context", file->application_context, "file", file, "node", node, "xpath", g_strdup_printf("xpath=//*[@id='%s']", id), "reference", recall_channel_run_dummy, NULL)); xmlNewProp(node, "recycling-child-type", g_strdup(g_type_name(recall_channel_run_dummy->recycling_dummy_child_type))); xmlAddChild(parent, node); return(node); } /** * ags_recall_channel_run_dummy_new: * @source: the source #AgsChannel * @child_type: child type * @recycling_dummy_child_type: recycling child type * * Creates an #AgsRecallChannelRunDummy. * * Returns: a new #AgsRecallChannelRunDummy. * * Since: 1.0.0 */ AgsRecallChannelRunDummy* ags_recall_channel_run_dummy_new(AgsChannel *source, GType child_type, GType recycling_dummy_child_type) { AgsRecallChannelRunDummy *recall_channel_run_dummy; recall_channel_run_dummy = (AgsRecallChannelRunDummy *) g_object_new(AGS_TYPE_RECALL_CHANNEL_RUN_DUMMY, "source", source, NULL); AGS_RECALL(recall_channel_run_dummy)->child_type = child_type; recall_channel_run_dummy->recycling_dummy_child_type = recycling_dummy_child_type; return(recall_channel_run_dummy); } gsequencer-1.4.24/ags/config.h.in0000644000175000017500000002223213256226514013470 00000000000000/* ags/config.h.in. Generated from configure.ac by autoheader. */ /* ALSA enabled */ #undef AGS_WITH_ALSA /* core-audio enabled */ #undef AGS_WITH_CORE_AUDIO /* JACK enabled */ #undef AGS_WITH_JACK /* Disable if you don't want libinstpatch */ #undef AGS_WITH_LIBINSTPATCH /* OSS enabled */ #undef AGS_WITH_OSS /* PULSE enabled */ #undef AGS_WITH_PULSE /* quartz enabled */ #undef AGS_WITH_QUARTZ /* rt enabled */ #undef AGS_WITH_RT /* Disable if you don't want xmlrpc-c */ #undef AGS_WITH_XMLRPC_C /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* ALSA sequencer event available */ #undef HAVE_ALSA_SEQ_EVENT_H /* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT /* Atk 2.12 available */ #undef HAVE_ATK_2_12 /* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* GLib 2.44 available */ #undef HAVE_GLIB_2_44 /* GLib 2.6 available */ #undef HAVE_GLIB_2_6 /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Jack port uuid available */ #undef HAVE_JACK_PORT_UUID /* Define to 1 if you have the header file. */ #undef HAVE_LADSPA_H /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the `X11' library (-lX11). */ #undef HAVE_LIBX11 /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the `localeconv' function. */ #undef HAVE_LOCALECONV /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_LV2_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the `mblen' function. */ #undef HAVE_MBLEN /* Define to 1 if you have the `mbrlen' function. */ #undef HAVE_MBRLEN /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* Define to 1 if the system has the type `ptrdiff_t'. */ #undef HAVE_PTRDIFF_T /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `stpcpy' function. */ #undef HAVE_STPCPY /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcspn' function. */ #undef HAVE_STRCSPN /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to 1 if you have the `__argz_count' function. */ #undef HAVE___ARGZ_COUNT /* Define to 1 if you have the `__argz_next' function. */ #undef HAVE___ARGZ_NEXT /* Define to 1 if you have the `__argz_stringify' function. */ #undef HAVE___ARGZ_STRINGIFY /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint8_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT8_T /* Define to `int' if doesn't define. */ #undef gid_t /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `int' if does not define. */ #undef pid_t /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if doesn't define. */ #undef uid_t /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef uint16_t /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef uint8_t gsequencer-1.4.24/ags/libags-audio.h0000644000175000017500000002756013256163135014166 00000000000000/* 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 . */ #ifndef __LIBAGS_AUDIO_H__ #define __LIBAGS_AUDIO_H__ /* plugin */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* audio */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* audio thread */ #include #include #include #include #include #include #include #include #include #include /* audio file */ #include #include #include #include #include #include #include /* audio midi */ #include #include #include #include #include /* audio core-audio */ #include #include #include #include #include /* audio pulse */ #include #include #include #include /* audio jack */ #include #include #include #include #include /* audio recall */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* audio task */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* audio recall task */ #include #include #include #include #endif /*__LIBAGS_AUDIO_H__*/ gsequencer-1.4.24/ags/i18n.h0000644000175000017500000000014613246707333012377 00000000000000#include "config.h" #include "gettext.h" #define i18n(x) gettext(x) #define i18n_pspec(x) gettext(x) gsequencer-1.4.24/ags/midi2xml_main.c0000644000175000017500000000432213246707333014344 00000000000000/* 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 . */ #include #include #include #include #include #include int main(int argc, char **argv) { AgsMidiParser *midi_parser; FILE *out; FILE *file; xmlChar *buffer; gchar *filename; size_t length; if(argc == 2){ if(!g_ascii_strncasecmp(argv[1], "--help\0", 7)){ printf("midi2xml converts MIDI to XML\n\n\0"); printf("Usage:\n\t%s\n\t%s\n\t%s\n\t%s\n\n", "Report bugs to \n\0", "--help display this help and exit\0", "--version output version information and exit\0", " the file to be processed\0"); exit(0); }else if(!g_ascii_strncasecmp(argv[1], "--version\0", 10)){ printf("midi2xml 1.0.0\n\n\0"); printf("%s\n%s\n%s\n\n\0", "Copyright (C) 2015 Joël Krähemann\0", "This is free software; see the source for copying conditions. There is NO\0", "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0"); printf("Written by Joël Krähemann\n\0"); exit(0); }else{ filename = argv[1]; } }else{ return(-1); } file = fopen(filename, "r\0"); fseek(file, 0, SEEK_SET); midi_parser = ags_midi_parser_new(file); ags_midi_parser_parse_full(midi_parser); xmlSaveFormatFileEnc("-", midi_parser->doc, "UTF-8", 1); return(0); } gsequencer-1.4.24/ags/gsequencer_main.h0000644000175000017500000000250313246707333014764 00000000000000/* 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 . */ #ifndef __GSEQUENCER_MAIN_H__ #define __GSEQUENCER_MAIN_H__ #include #include #include #include #include #include #include #include #include #include #include //#include #include #include #include #define ALSA_PCM_NEW_HW_PARAMS_API #define AGS_DEFAULT_DIRECTORY ".gsequencer\0" #define AGS_DEFAULT_CONFIG "ags.conf\0" #define GSEQUENCER_RT_PRIORITY (95) #endif /*__GSEQUENCER_MAIN_H__*/ gsequencer-1.4.24/ags/gettext.h0000644000175000017500000002366413246707333013316 00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 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 the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program 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 this program. If not, see . */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # undef gettext # define gettext(Msgid) ((const char *) (Msgid)) # undef dgettext # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # undef dcgettext # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) # undef textdomain # define textdomain(Domainname) ((const char *) (Domainname)) # undef bindtextdomain # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # undef bind_textdomain_codeset # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* Prefer gnulib's setlocale override over libintl's setlocale override. */ #ifdef GNULIB_defined_setlocale # undef setlocale # define setlocale rpl_setlocale #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 #else # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 #endif #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { int found_translation; memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); found_translation = (translation != msg_ctxt_id); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (found_translation) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { int found_translation; memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (found_translation) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ gsequencer-1.4.24/Makefile.in0000644000175000017500000616324613256226517012764 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gsequencer$(EXEEXT) midi2xml$(EXEEXT) check_PROGRAMS = ags_application_context_test$(EXEEXT) \ ags_config_test$(EXEEXT) ags_connection_manager_test$(EXEEXT) \ ags_condition_manager_test$(EXEEXT) \ ags_destroy_worker_test$(EXEEXT) \ ags_mutex_manager_test$(EXEEXT) ags_poll_fd_test$(EXEEXT) \ ags_polling_thread_test$(EXEEXT) \ ags_returnable_thread_test$(EXEEXT) ags_task_test$(EXEEXT) \ ags_task_thread_test$(EXEEXT) ags_thread_test$(EXEEXT) \ ags_thread_pool_test$(EXEEXT) ags_worker_thread_test$(EXEEXT) \ ags_thread_file_xml_test$(EXEEXT) ags_file_test$(EXEEXT) \ ags_file_id_ref_test$(EXEEXT) ags_file_launch_test$(EXEEXT) \ ags_file_lookup_test$(EXEEXT) ags_complex_test$(EXEEXT) \ ags_log_test$(EXEEXT) ags_turtle_test$(EXEEXT) \ ags_turtle_manager_test$(EXEEXT) ags_base_plugin_test$(EXEEXT) \ ags_dssi_manager_test$(EXEEXT) ags_dssi_plugin_test$(EXEEXT) \ ags_ladspa_manager_test$(EXEEXT) ags_lv2_manager_test$(EXEEXT) \ ags_lv2_option_manager_test$(EXEEXT) \ ags_lv2_plugin_test$(EXEEXT) ags_lv2_preset_test$(EXEEXT) \ ags_lv2_uri_map_manager_test$(EXEEXT) \ ags_lv2_urid_manager_test$(EXEEXT) \ ags_lv2_worker_manager_test$(EXEEXT) \ ags_lv2ui_manager_test$(EXEEXT) ags_lv2ui_plugin_test$(EXEEXT) \ ags_audio_application_context_test$(EXEEXT) \ ags_devout_test$(EXEEXT) ags_midiin_test$(EXEEXT) \ ags_audio_test$(EXEEXT) ags_audio_connection_test$(EXEEXT) \ ags_playback_domain_test$(EXEEXT) ags_playback_test$(EXEEXT) \ ags_preset_test$(EXEEXT) ags_channel_test$(EXEEXT) \ ags_input_test$(EXEEXT) ags_output_test$(EXEEXT) \ ags_recycling_test$(EXEEXT) ags_audio_signal_test$(EXEEXT) \ ags_recall_test$(EXEEXT) ags_recall_channel_test$(EXEEXT) \ ags_recall_channel_run_test$(EXEEXT) \ ags_recall_container_test$(EXEEXT) \ ags_recall_dependency_test$(EXEEXT) ags_port_test$(EXEEXT) \ ags_pattern_test$(EXEEXT) ags_notation_test$(EXEEXT) \ ags_note_test$(EXEEXT) ags_automation_test$(EXEEXT) \ ags_acceleration_test$(EXEEXT) \ ags_midi_buffer_util_test$(EXEEXT) \ ags_midi_builder_test$(EXEEXT) \ ags_xorg_application_context_test$(EXEEXT) \ ags_functional_audio_test$(EXEEXT) \ ags_functional_machine_add_and_destroy_test$(EXEEXT) \ ags_functional_machine_link_test$(EXEEXT) \ ags_functional_line_member_add_and_destroy_test$(EXEEXT) \ ags_functional_editor_workflow_test$(EXEEXT) \ ags_functional_panel_test$(EXEEXT) \ ags_functional_mixer_test$(EXEEXT) \ ags_functional_drum_test$(EXEEXT) \ ags_functional_matrix_test$(EXEEXT) \ ags_functional_synth_test$(EXEEXT) \ ags_functional_ffplayer_test$(EXEEXT) \ ags_functional_notation_edit_test$(EXEEXT) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(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) $(nobase_include_HEADERS) \ $(noinst_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ags/config.h CONFIG_CLEAN_FILES = libags.pc libags_audio.pc libags_gui.pc \ libgsequencer.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libgsequencerdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdatadir)" \ "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(libgsequencer_LTLIBRARIES) am__DEPENDENCIES_1 = libags_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__objects_1 = am__dirstamp = $(am__leading_dot)dirstamp am__objects_2 = $(am__objects_1) ags/lib/libags_la-ags_buffer_util.lo \ ags/lib/libags_la-ags_complex.lo \ ags/lib/libags_la-ags_conversion.lo \ ags/lib/libags_la-ags_endian.lo \ ags/lib/libags_la-ags_function.lo ags/lib/libags_la-ags_log.lo \ ags/lib/libags_la-ags_parameter.lo \ ags/lib/libags_la-ags_regex.lo \ ags/lib/libags_la-ags_string_util.lo \ ags/lib/libags_la-ags_time.lo ags/lib/libags_la-ags_turtle.lo \ ags/lib/libags_la-ags_turtle_manager.lo am__objects_3 = $(am__objects_1) \ ags/util/libags_la-ags_destroy_util.lo \ ags/util/libags_la-ags_id_generator.lo \ ags/util/libags_la-ags_list_util.lo am__objects_4 = $(am__objects_1) \ ags/object/libags_la-ags_applicable.lo \ ags/object/libags_la-ags_application_context.lo \ ags/object/libags_la-ags_async_queue.lo \ ags/object/libags_la-ags_config.lo \ ags/object/libags_la-ags_connectable.lo \ ags/object/libags_la-ags_connection.lo \ ags/object/libags_la-ags_connection_manager.lo \ ags/object/libags_la-ags_countable.lo \ ags/object/libags_la-ags_concurrent_tree.lo \ ags/object/libags_la-ags_distributed_manager.lo \ ags/object/libags_la-ags_dynamic_connectable.lo \ ags/object/libags_la-ags_main_loop.lo \ ags/object/libags_la-ags_marshal.lo \ ags/object/libags_la-ags_mutable.lo \ ags/object/libags_la-ags_packable.lo \ ags/object/libags_la-ags_plugin.lo \ ags/object/libags_la-ags_portlet.lo \ ags/object/libags_la-ags_seekable.lo \ ags/object/libags_la-ags_sequencer.lo \ ags/object/libags_la-ags_soundcard.lo \ ags/object/libags_la-ags_tactable.lo \ ags/object/libags_la-ags_tree_iterator.lo am__objects_5 = $(am__objects_1) ags/file/libags_la-ags_file.lo \ ags/file/libags_la-ags_file_id_ref.lo \ ags/file/libags_la-ags_file_launch.lo \ ags/file/libags_la-ags_file_link.lo \ ags/file/libags_la-ags_file_lookup.lo \ ags/file/libags_la-ags_file_util.lo \ ags/file/libags_la-ags_xml_serialization_factory.lo am_libags_la_OBJECTS = $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) libags_la_OBJECTS = $(am_libags_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libags_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libags_la_CFLAGS) \ $(CFLAGS) $(libags_la_LDFLAGS) $(LDFLAGS) -o $@ libags_audio_la_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am__objects_6 = $(am__objects_1) \ ags/audio/libags_audio_la-ags_acceleration.lo \ ags/audio/libags_audio_la-ags_audio.lo \ ags/audio/libags_audio_la-ags_audio_application_context.lo \ ags/audio/libags_audio_la-ags_audio_buffer_util.lo \ ags/audio/libags_audio_la-ags_audio_connection.lo \ ags/audio/libags_audio_la-ags_audio_signal.lo \ ags/audio/libags_audio_la-ags_automation.lo \ ags/audio/libags_audio_la-ags_buffer.lo \ ags/audio/libags_audio_la-ags_channel.lo \ ags/audio/libags_audio_la-ags_channel_iter.lo \ ags/audio/libags_audio_la-ags_devout.lo \ ags/audio/libags_audio_la-ags_devin.lo \ ags/audio/libags_audio_la-ags_input.lo \ ags/audio/libags_audio_la-ags_fifoout.lo \ ags/audio/libags_audio_la-ags_message.lo \ ags/audio/libags_audio_la-ags_midiin.lo \ ags/audio/libags_audio_la-ags_notation.lo \ ags/audio/libags_audio_la-ags_note.lo \ ags/audio/libags_audio_la-ags_output.lo \ ags/audio/libags_audio_la-ags_pattern.lo \ ags/audio/libags_audio_la-ags_playable.lo \ ags/audio/libags_audio_la-ags_playback.lo \ ags/audio/libags_audio_la-ags_playback_domain.lo \ ags/audio/libags_audio_la-ags_port.lo \ ags/audio/libags_audio_la-ags_preset.lo \ ags/audio/libags_audio_la-ags_recall_audio.lo \ ags/audio/libags_audio_la-ags_recall_audio_run.lo \ ags/audio/libags_audio_la-ags_recall_audio_signal.lo \ ags/audio/libags_audio_la-ags_recall.lo \ ags/audio/libags_audio_la-ags_recall_channel.lo \ ags/audio/libags_audio_la-ags_recall_channel_run.lo \ ags/audio/libags_audio_la-ags_recall_channel_run_dummy.lo \ ags/audio/libags_audio_la-ags_recall_container.lo \ ags/audio/libags_audio_la-ags_recall_dependency.lo \ ags/audio/libags_audio_la-ags_recall_factory.lo \ ags/audio/libags_audio_la-ags_recall_dssi.lo \ ags/audio/libags_audio_la-ags_recall_dssi_run.lo \ ags/audio/libags_audio_la-ags_recall_id.lo \ ags/audio/libags_audio_la-ags_recall_ladspa.lo \ ags/audio/libags_audio_la-ags_recall_ladspa_run.lo \ ags/audio/libags_audio_la-ags_recall_lv2.lo \ ags/audio/libags_audio_la-ags_recall_lv2_run.lo \ ags/audio/libags_audio_la-ags_recall_adaptor_run.lo \ ags/audio/libags_audio_la-ags_recall_recycling.lo \ ags/audio/libags_audio_la-ags_recall_recycling_dummy.lo \ ags/audio/libags_audio_la-ags_recycling.lo \ ags/audio/libags_audio_la-ags_recycling_context.lo \ ags/audio/libags_audio_la-ags_sound_provider.lo \ ags/audio/libags_audio_la-ags_synth_generator.lo \ ags/audio/libags_audio_la-ags_synth_util.lo \ ags/audio/libags_audio_la-ags_wave.lo am__objects_7 = $(am__objects_1) \ ags/audio/client/libags_audio_la-ags_remote_channel.lo \ ags/audio/client/libags_audio_la-ags_remote_input.lo \ ags/audio/client/libags_audio_la-ags_remote_output.lo am__objects_8 = $(am__objects_1) \ ags/audio/thread/libags_audio_la-ags_audio_loop.lo \ ags/audio/thread/libags_audio_la-ags_audio_thread.lo \ ags/audio/thread/libags_audio_la-ags_channel_thread.lo \ ags/audio/thread/libags_audio_la-ags_sequencer_thread.lo \ ags/audio/thread/libags_audio_la-ags_soundcard_thread.lo \ ags/audio/thread/libags_audio_la-ags_export_thread.lo \ ags/audio/thread/libags_audio_la-ags_iterator_thread.lo \ ags/audio/thread/libags_audio_la-ags_record_thread.lo \ ags/audio/thread/libags_audio_la-ags_recycling_thread.lo \ ags/audio/thread/libags_audio_la-ags_recycling_thread_callbacks.lo am__objects_9 = $(am__objects_1) \ ags/audio/file/libags_audio_la-ags_audio_file.lo \ ags/audio/file/libags_audio_la-ags_audio_file_link.lo \ ags/audio/file/libags_audio_la-ags_audio_file_xml.lo \ ags/audio/file/libags_audio_la-ags_audio_xml_serialization_factory.lo \ ags/audio/file/libags_audio_la-ags_ipatch.lo \ ags/audio/file/libags_audio_la-ags_ipatch_dls2_reader.lo \ ags/audio/file/libags_audio_la-ags_ipatch_sf2_reader.lo \ ags/audio/file/libags_audio_la-ags_sndfile.lo am__objects_10 = $(am__objects_1) \ ags/audio/midi/libags_audio_la-ags_midi_buffer_util.lo \ ags/audio/midi/libags_audio_la-ags_midi_util.lo \ ags/audio/midi/libags_audio_la-ags_midi_builder.lo \ ags/audio/midi/libags_audio_la-ags_midi_file.lo \ ags/audio/midi/libags_audio_la-ags_midi_parser.lo am__objects_11 = $(am__objects_1) \ ags/audio/jack/libags_audio_la-ags_jack_client.lo \ ags/audio/jack/libags_audio_la-ags_jack_midiin.lo \ ags/audio/jack/libags_audio_la-ags_jack_devout.lo \ ags/audio/jack/libags_audio_la-ags_jack_devin.lo \ ags/audio/jack/libags_audio_la-ags_jack_port.lo \ ags/audio/jack/libags_audio_la-ags_jack_server.lo am__objects_12 = $(am__objects_1) \ ags/audio/pulse/libags_audio_la-ags_pulse_client.lo \ ags/audio/pulse/libags_audio_la-ags_pulse_devout.lo \ ags/audio/pulse/libags_audio_la-ags_pulse_devin.lo \ ags/audio/pulse/libags_audio_la-ags_pulse_port.lo \ ags/audio/pulse/libags_audio_la-ags_pulse_server.lo am__objects_13 = $(am__objects_1) \ ags/audio/core-audio/libags_audio_la-ags_core_audio_client.lo \ ags/audio/core-audio/libags_audio_la-ags_core_audio_midiin.lo \ ags/audio/core-audio/libags_audio_la-ags_core_audio_devout.lo \ ags/audio/core-audio/libags_audio_la-ags_core_audio_port.lo \ ags/audio/core-audio/libags_audio_la-ags_core_audio_server.lo am__objects_14 = $(am__objects_1) \ ags/audio/task/libags_audio_la-ags_add_audio.lo \ ags/audio/task/libags_audio_la-ags_add_audio_signal.lo \ ags/audio/task/libags_audio_la-ags_add_effect.lo \ ags/audio/task/libags_audio_la-ags_add_note.lo \ ags/audio/task/libags_audio_la-ags_add_point_to_selection.lo \ ags/audio/task/libags_audio_la-ags_add_recall.lo \ ags/audio/task/libags_audio_la-ags_add_recall_container.lo \ ags/audio/task/libags_audio_la-ags_add_region_to_selection.lo \ ags/audio/task/libags_audio_la-ags_add_soundcard.lo \ ags/audio/task/libags_audio_la-ags_append_audio.lo \ ags/audio/task/libags_audio_la-ags_append_audio_threaded.lo \ ags/audio/task/libags_audio_la-ags_append_channel.lo \ ags/audio/task/libags_audio_la-ags_append_recall.lo \ ags/audio/task/libags_audio_la-ags_apply_presets.lo \ ags/audio/task/libags_audio_la-ags_apply_synth.lo \ ags/audio/task/libags_audio_la-ags_cancel_audio.lo \ ags/audio/task/libags_audio_la-ags_cancel_channel.lo \ ags/audio/task/libags_audio_la-ags_cancel_recall.lo \ ags/audio/task/libags_audio_la-ags_change_soundcard.lo \ ags/audio/task/libags_audio_la-ags_clear_audio_signal.lo \ ags/audio/task/libags_audio_la-ags_clear_buffer.lo \ ags/audio/task/libags_audio_la-ags_crop_note.lo \ ags/audio/task/libags_audio_la-ags_export_output.lo \ ags/audio/task/libags_audio_la-ags_free_selection.lo \ ags/audio/task/libags_audio_la-ags_init_audio.lo \ ags/audio/task/libags_audio_la-ags_init_channel.lo \ ags/audio/task/libags_audio_la-ags_link_channel.lo \ ags/audio/task/libags_audio_la-ags_move_note.lo \ ags/audio/task/libags_audio_la-ags_notify_soundcard.lo \ ags/audio/task/libags_audio_la-ags_open_file.lo \ ags/audio/task/libags_audio_la-ags_open_sf2_sample.lo \ ags/audio/task/libags_audio_la-ags_open_single_file.lo \ ags/audio/task/libags_audio_la-ags_remove_audio.lo \ ags/audio/task/libags_audio_la-ags_remove_audio_signal.lo \ ags/audio/task/libags_audio_la-ags_remove_note.lo \ ags/audio/task/libags_audio_la-ags_remove_point_from_selection.lo \ ags/audio/task/libags_audio_la-ags_remove_recall.lo \ ags/audio/task/libags_audio_la-ags_remove_recall_container.lo \ ags/audio/task/libags_audio_la-ags_remove_region_from_selection.lo \ ags/audio/task/libags_audio_la-ags_remove_soundcard.lo \ ags/audio/task/libags_audio_la-ags_reset_audio_connection.lo \ ags/audio/task/libags_audio_la-ags_resize_audio.lo \ ags/audio/task/libags_audio_la-ags_save_file.lo \ ags/audio/task/libags_audio_la-ags_seek_soundcard.lo \ ags/audio/task/libags_audio_la-ags_set_audio_channels.lo \ ags/audio/task/libags_audio_la-ags_set_buffer_size.lo \ ags/audio/task/libags_audio_la-ags_set_format.lo \ ags/audio/task/libags_audio_la-ags_set_input_device.lo \ ags/audio/task/libags_audio_la-ags_set_output_device.lo \ ags/audio/task/libags_audio_la-ags_set_samplerate.lo \ ags/audio/task/libags_audio_la-ags_start_sequencer.lo \ ags/audio/task/libags_audio_la-ags_start_soundcard.lo \ ags/audio/task/libags_audio_la-ags_switch_buffer_flag.lo \ ags/audio/task/libags_audio_la-ags_tic_device.lo \ ags/audio/task/libags_audio_la-ags_toggle_pattern_bit.lo \ ags/audio/task/libags_audio_la-ags_unref_audio_signal.lo \ ags/audio/task/recall/libags_audio_la-ags_apply_bpm.lo \ ags/audio/task/recall/libags_audio_la-ags_apply_sequencer_length.lo \ ags/audio/task/recall/libags_audio_la-ags_apply_tact.lo \ ags/audio/task/recall/libags_audio_la-ags_reset_peak.lo \ ags/audio/task/recall/libags_audio_la-ags_set_muted.lo am__objects_15 = $(am__objects_1) \ ags/audio/recall/libags_audio_la-ags_buffer_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_buffer_channel.lo \ ags/audio/recall/libags_audio_la-ags_buffer_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_buffer_recycling.lo \ ags/audio/recall/libags_audio_la-ags_capture_sound_audio.lo \ ags/audio/recall/libags_audio_la-ags_capture_sound_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_copy_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_copy_channel.lo \ ags/audio/recall/libags_audio_la-ags_copy_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_copy_notation_audio.lo \ ags/audio/recall/libags_audio_la-ags_copy_notation_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_copy_pattern_audio.lo \ ags/audio/recall/libags_audio_la-ags_copy_pattern_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_copy_pattern_channel.lo \ ags/audio/recall/libags_audio_la-ags_copy_pattern_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_copy_recycling.lo \ ags/audio/recall/libags_audio_la-ags_count_beats_audio.lo \ ags/audio/recall/libags_audio_la-ags_count_beats_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_delay_audio.lo \ ags/audio/recall/libags_audio_la-ags_delay_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_envelope_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_envelope_channel.lo \ ags/audio/recall/libags_audio_la-ags_envelope_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_envelope_recycling.lo \ ags/audio/recall/libags_audio_la-ags_feed_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_feed_channel.lo \ ags/audio/recall/libags_audio_la-ags_feed_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_feed_recycling.lo \ ags/audio/recall/libags_audio_la-ags_loop_channel.lo \ ags/audio/recall/libags_audio_la-ags_loop_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_mute_audio.lo \ ags/audio/recall/libags_audio_la-ags_mute_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_mute_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_mute_channel.lo \ ags/audio/recall/libags_audio_la-ags_mute_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_mute_recycling.lo \ ags/audio/recall/libags_audio_la-ags_peak_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_peak_channel.lo \ ags/audio/recall/libags_audio_la-ags_peak_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_peak_recycling.lo \ ags/audio/recall/libags_audio_la-ags_play_audio.lo \ ags/audio/recall/libags_audio_la-ags_play_audio_file.lo \ ags/audio/recall/libags_audio_la-ags_play_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_play_channel.lo \ ags/audio/recall/libags_audio_la-ags_play_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_play_channel_run_master.lo \ ags/audio/recall/libags_audio_la-ags_play_dssi_audio.lo \ ags/audio/recall/libags_audio_la-ags_play_dssi_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_play_lv2_audio.lo \ ags/audio/recall/libags_audio_la-ags_play_lv2_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_play_notation_audio.lo \ ags/audio/recall/libags_audio_la-ags_play_notation_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_play_note.lo \ ags/audio/recall/libags_audio_la-ags_play_recycling.lo \ ags/audio/recall/libags_audio_la-ags_prepare_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_prepare_channel.lo \ ags/audio/recall/libags_audio_la-ags_prepare_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_prepare_recycling.lo \ ags/audio/recall/libags_audio_la-ags_record_midi_audio.lo \ ags/audio/recall/libags_audio_la-ags_record_midi_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_route_dssi_audio.lo \ ags/audio/recall/libags_audio_la-ags_route_dssi_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_route_lv2_audio.lo \ ags/audio/recall/libags_audio_la-ags_route_lv2_audio_run.lo \ ags/audio/recall/libags_audio_la-ags_rt_stream_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_rt_stream_channel.lo \ ags/audio/recall/libags_audio_la-ags_rt_stream_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_rt_stream_recycling.lo \ ags/audio/recall/libags_audio_la-ags_stream_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_stream_channel.lo \ ags/audio/recall/libags_audio_la-ags_stream_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_stream_recycling.lo \ ags/audio/recall/libags_audio_la-ags_volume_audio_signal.lo \ ags/audio/recall/libags_audio_la-ags_volume_channel.lo \ ags/audio/recall/libags_audio_la-ags_volume_channel_run.lo \ ags/audio/recall/libags_audio_la-ags_volume_recycling.lo am__objects_16 = $(am__objects_1) \ ags/plugin/libags_audio_la-ags_base_plugin.lo \ ags/plugin/libags_audio_la-ags_dssi_manager.lo \ ags/plugin/libags_audio_la-ags_dssi_plugin.lo \ ags/plugin/libags_audio_la-ags_ladspa_conversion.lo \ ags/plugin/libags_audio_la-ags_ladspa_manager.lo \ ags/plugin/libags_audio_la-ags_ladspa_plugin.lo \ ags/plugin/libags_audio_la-ags_lv2_conversion.lo \ ags/plugin/libags_audio_la-ags_lv2_manager.lo \ ags/plugin/libags_audio_la-ags_lv2_plugin.lo \ ags/plugin/libags_audio_la-ags_lv2_preset.lo \ ags/plugin/libags_audio_la-ags_lv2_log_manager.lo \ ags/plugin/libags_audio_la-ags_lv2_event_manager.lo \ ags/plugin/libags_audio_la-ags_lv2_option_manager.lo \ ags/plugin/libags_audio_la-ags_lv2_uri_map_manager.lo \ ags/plugin/libags_audio_la-ags_lv2_urid_manager.lo \ ags/plugin/libags_audio_la-ags_lv2_worker_manager.lo \ ags/plugin/libags_audio_la-ags_lv2_worker.lo \ ags/plugin/libags_audio_la-ags_lv2ui_manager.lo \ ags/plugin/libags_audio_la-ags_lv2ui_plugin.lo \ ags/plugin/libags_audio_la-ags_plugin_factory.lo am_libags_audio_la_OBJECTS = $(am__objects_6) $(am__objects_7) \ $(am__objects_8) $(am__objects_9) $(am__objects_10) \ $(am__objects_11) $(am__objects_12) $(am__objects_13) \ $(am__objects_14) $(am__objects_15) $(am__objects_16) libags_audio_la_OBJECTS = $(am_libags_audio_la_OBJECTS) libags_audio_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libags_audio_la_CFLAGS) $(CFLAGS) $(libags_audio_la_LDFLAGS) \ $(LDFLAGS) -o $@ libags_gui_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am__objects_17 = $(am__objects_1) \ ags/widget/libags_gui_la-ags_cartesian.lo \ ags/widget/libags_gui_la-ags_dial.lo \ ags/widget/libags_gui_la-ags_expander.lo \ ags/widget/libags_gui_la-ags_expander_set.lo \ ags/widget/libags_gui_la-ags_hindicator.lo \ ags/widget/libags_gui_la-ags_hled_array.lo \ ags/widget/libags_gui_la-ags_htimebar.lo \ ags/widget/libags_gui_la-ags_indicator.lo \ ags/widget/libags_gui_la-ags_led.lo \ ags/widget/libags_gui_la-ags_led_array.lo \ ags/widget/libags_gui_la-ags_level.lo \ ags/widget/libags_gui_la-ags_level_box.lo \ ags/widget/libags_gui_la-ags_hlevel_box.lo \ ags/widget/libags_gui_la-ags_vlevel_box.lo \ ags/widget/libags_gui_la-ags_notebook.lo \ ags/widget/libags_gui_la-ags_piano.lo \ ags/widget/libags_gui_la-ags_scrolled_piano.lo \ ags/widget/libags_gui_la-ags_scale.lo \ ags/widget/libags_gui_la-ags_scale_box.lo \ ags/widget/libags_gui_la-ags_vscale_box.lo \ ags/widget/libags_gui_la-ags_hscale_box.lo \ ags/widget/libags_gui_la-ags_scrolled_scale_box.lo \ ags/widget/libags_gui_la-ags_scrolled_level_box.lo \ ags/widget/libags_gui_la-ags_ruler.lo \ ags/widget/libags_gui_la-ags_table.lo \ ags/widget/libags_gui_la-ags_timebar.lo \ ags/widget/libags_gui_la-ags_vindicator.lo \ ags/widget/libags_gui_la-ags_vled_array.lo \ ags/widget/libags_gui_la-ags_waveform.lo \ ags/widget/libags_gui_la-ags_widget_marshal.lo \ ags/widget/libags_gui_la-ags_container.lo am_libags_gui_la_OBJECTS = $(am__objects_17) libags_gui_la_OBJECTS = $(am_libags_gui_la_OBJECTS) libags_gui_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libags_gui_la_CFLAGS) \ $(CFLAGS) $(libags_gui_la_LDFLAGS) $(LDFLAGS) -o $@ libags_server_la_DEPENDENCIES = libags_thread.la libags.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__objects_18 = $(am__objects_1) \ ags/server/libags_server_la-ags_registry.lo \ ags/server/libags_server_la-ags_server.lo \ ags/server/libags_server_la-ags_server_application_context.lo \ ags/server/libags_server_la-ags_server_status.lo \ ags/server/libags_server_la-ags_service_provider.lo am__objects_19 = $(am__objects_1) \ ags/server/security/libags_server_la-ags_authentication.lo \ ags/server/security/libags_server_la-ags_authentication_manager.lo \ ags/server/security/libags_server_la-ags_business_group.lo \ ags/server/security/libags_server_la-ags_certificate.lo \ ags/server/security/libags_server_la-ags_certificate_manager.lo \ ags/server/security/libags_server_la-ags_password_store.lo \ ags/server/security/libags_server_la-ags_password_store_manager.lo \ ags/server/security/libags_server_la-ags_security_context.lo \ ags/server/security/libags_server_la-ags_xml_authentication.lo \ ags/server/security/libags_server_la-ags_xml_certificate.lo \ ags/server/security/libags_server_la-ags_xml_password_store.lo am__objects_20 = $(am__objects_1) \ ags/server/controller/libags_server_la-ags_controller.lo \ ags/server/controller/libags_server_la-ags_front_controller.lo \ ags/server/controller/libags_server_la-ags_local_factory_controller.lo \ ags/server/controller/libags_server_la-ags_local_registry_controller.lo \ ags/server/controller/libags_server_la-ags_local_serialization_controller.lo \ ags/server/controller/libags_server_la-ags_local_task_controller.lo am__objects_21 = $(am__objects_1) \ ags/server/thread/libags_server_la-ags_remote_task.lo \ ags/server/thread/libags_server_la-ags_remote_task_thread.lo am_libags_server_la_OBJECTS = $(am__objects_18) $(am__objects_19) \ $(am__objects_20) $(am__objects_21) libags_server_la_OBJECTS = $(am_libags_server_la_OBJECTS) libags_server_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libags_server_la_CFLAGS) $(CFLAGS) \ $(libags_server_la_LDFLAGS) $(LDFLAGS) -o $@ libags_thread_la_DEPENDENCIES = libags.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am__objects_22 = $(am__objects_1) \ ags/thread/libags_thread_la-ags_autosave_thread.lo \ ags/thread/libags_thread_la-ags_concurrency_provider.lo \ ags/thread/libags_thread_la-ags_condition_manager.lo \ ags/thread/libags_thread_la-ags_destroy_worker.lo \ ags/thread/libags_thread_la-ags_generic_main_loop.lo \ ags/thread/libags_thread_la-ags_history.lo \ ags/thread/libags_thread_la-ags_message_delivery.lo \ ags/thread/libags_thread_la-ags_message_queue.lo \ ags/thread/libags_thread_la-ags_mutex_manager.lo \ ags/thread/libags_thread_la-ags_poll_fd.lo \ ags/thread/libags_thread_la-ags_polling_thread.lo \ ags/thread/libags_thread_la-ags_returnable_thread.lo \ ags/thread/libags_thread_la-ags_single_thread.lo \ ags/thread/libags_thread_la-ags_task_completion.lo \ ags/thread/libags_thread_la-ags_task.lo \ ags/thread/libags_thread_la-ags_task_thread.lo \ ags/thread/libags_thread_la-ags_thread_application_context.lo \ ags/thread/libags_thread_la-ags_thread_pool.lo \ ags/thread/libags_thread_la-ags_thread-posix.lo \ ags/thread/libags_thread_la-ags_timestamp_factory.lo \ ags/thread/libags_thread_la-ags_timestamp_thread.lo \ ags/thread/libags_thread_la-ags_timestamp.lo \ ags/thread/libags_thread_la-ags_worker_thread.lo am__objects_23 = $(am__objects_1) \ ags/thread/file/libags_thread_la-ags_thread_file_xml.lo \ ags/thread/file/libags_thread_la-ags_thread_xml_serialization_factory.lo am_libags_thread_la_OBJECTS = $(am__objects_22) $(am__objects_23) libags_thread_la_OBJECTS = $(am_libags_thread_la_OBJECTS) libags_thread_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libags_thread_la_CFLAGS) $(CFLAGS) \ $(libags_thread_la_LDFLAGS) $(LDFLAGS) -o $@ libgsequencer_la_DEPENDENCIES = libags_audio.la libags_server.la \ libags_gui.la libags_thread.la libags.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am__objects_24 = $(am__objects_1) am__objects_25 = $(am__objects_24) $(am__objects_24) $(am__objects_24) \ $(am__objects_24) $(am__objects_24) $(am__objects_24) \ $(am__objects_24) $(am__objects_24) am__objects_26 = $(am__objects_1) \ ags/X/libgsequencer_la-ags_automation_editor.lo \ ags/X/libgsequencer_la-ags_automation_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_automation_window.lo \ ags/X/libgsequencer_la-ags_automation_window_callbacks.lo \ ags/X/libgsequencer_la-ags_audio_preferences.lo \ ags/X/libgsequencer_la-ags_audio_preferences_callbacks.lo \ ags/X/libgsequencer_la-ags_bulk_member.lo \ ags/X/libgsequencer_la-ags_bulk_member_callbacks.lo \ ags/X/libgsequencer_la-ags_connection_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_connection_editor.lo \ ags/X/libgsequencer_la-ags_context_menu.lo \ ags/X/libgsequencer_la-ags_dssi_browser_callbacks.lo \ ags/X/libgsequencer_la-ags_dssi_browser.lo \ ags/X/libgsequencer_la-ags_effect_bridge.lo \ ags/X/libgsequencer_la-ags_effect_bridge_callbacks.lo \ ags/X/libgsequencer_la-ags_effect_bulk.lo \ ags/X/libgsequencer_la-ags_effect_bulk_callbacks.lo \ ags/X/libgsequencer_la-ags_effect_line.lo \ ags/X/libgsequencer_la-ags_effect_line_callbacks.lo \ ags/X/libgsequencer_la-ags_effect_pad.lo \ ags/X/libgsequencer_la-ags_effect_pad_callbacks.lo \ ags/X/libgsequencer_la-ags_effect_separator.lo \ ags/X/libgsequencer_la-ags_export_soundcard.lo \ ags/X/libgsequencer_la-ags_export_soundcard_callbacks.lo \ ags/X/libgsequencer_la-ags_export_window.lo \ ags/X/libgsequencer_la-ags_export_window_callbacks.lo \ ags/X/libgsequencer_la-ags_generic_preferences.lo \ ags/X/libgsequencer_la-ags_generic_preferences_callbacks.lo \ ags/X/libgsequencer_la-ags_history_browser.lo \ ags/X/libgsequencer_la-ags_history_browser_callbacks.lo \ ags/X/libgsequencer_la-ags_ladspa_browser.lo \ ags/X/libgsequencer_la-ags_ladspa_browser_callbacks.lo \ ags/X/libgsequencer_la-ags_lv2_browser.lo \ ags/X/libgsequencer_la-ags_lv2_browser_callbacks.lo \ ags/X/libgsequencer_la-ags_line.lo \ ags/X/libgsequencer_la-ags_line_callbacks.lo \ ags/X/libgsequencer_la-ags_line_editor.lo \ ags/X/libgsequencer_la-ags_line_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_line_member.lo \ ags/X/libgsequencer_la-ags_line_member_callbacks.lo \ ags/X/libgsequencer_la-ags_line_member_editor.lo \ ags/X/libgsequencer_la-ags_line_member_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_link_collection_editor.lo \ ags/X/libgsequencer_la-ags_link_collection_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_link_editor.lo \ ags/X/libgsequencer_la-ags_link_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_listing_editor.lo \ ags/X/libgsequencer_la-ags_listing_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_machine.lo \ ags/X/libgsequencer_la-ags_machine_callbacks.lo \ ags/X/libgsequencer_la-ags_machine_editor.lo \ ags/X/libgsequencer_la-ags_machine_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_menu_action_callbacks.lo \ ags/X/libgsequencer_la-ags_menu_bar.lo \ ags/X/libgsequencer_la-ags_midi_dialog.lo \ ags/X/libgsequencer_la-ags_midi_dialog_callbacks.lo \ ags/X/libgsequencer_la-ags_midi_preferences.lo \ ags/X/libgsequencer_la-ags_midi_preferences_callbacks.lo \ ags/X/libgsequencer_la-ags_navigation.lo \ ags/X/libgsequencer_la-ags_navigation_callbacks.lo \ ags/X/libgsequencer_la-ags_notation_editor.lo \ ags/X/libgsequencer_la-ags_notation_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_output_collection_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_output_collection_editor.lo \ ags/X/libgsequencer_la-ags_output_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_output_editor.lo \ ags/X/libgsequencer_la-ags_output_listing_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_output_listing_editor.lo \ ags/X/libgsequencer_la-ags_pad.lo \ ags/X/libgsequencer_la-ags_pad_callbacks.lo \ ags/X/libgsequencer_la-ags_pad_editor.lo \ ags/X/libgsequencer_la-ags_pad_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_performance_preferences.lo \ ags/X/libgsequencer_la-ags_performance_preferences_callbacks.lo \ ags/X/libgsequencer_la-ags_playback_window.lo \ ags/X/libgsequencer_la-ags_playback_window_callbacks.lo \ ags/X/libgsequencer_la-ags_plugin_browser.lo \ ags/X/libgsequencer_la-ags_plugin_browser_callbacks.lo \ ags/X/libgsequencer_la-ags_plugin_preferences.lo \ ags/X/libgsequencer_la-ags_plugin_preferences_callbacks.lo \ ags/X/libgsequencer_la-ags_preferences.lo \ ags/X/libgsequencer_la-ags_preferences_callbacks.lo \ ags/X/libgsequencer_la-ags_property_collection_editor.lo \ ags/X/libgsequencer_la-ags_property_collection_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_property_editor.lo \ ags/X/libgsequencer_la-ags_property_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_property_listing_editor.lo \ ags/X/libgsequencer_la-ags_resize_editor.lo \ ags/X/libgsequencer_la-ags_sequencer_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_sequencer_editor.lo \ ags/X/libgsequencer_la-ags_server_preferences.lo \ ags/X/libgsequencer_la-ags_server_preferences_callbacks.lo \ ags/X/libgsequencer_la-ags_ui_provider.lo \ ags/X/libgsequencer_la-ags_wave_window_callbacks.lo \ ags/X/libgsequencer_la-ags_wave_window.lo \ ags/X/libgsequencer_la-ags_wave_editor.lo \ ags/X/libgsequencer_la-ags_wave_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_window.lo \ ags/X/libgsequencer_la-ags_soundcard_editor_callbacks.lo \ ags/X/libgsequencer_la-ags_soundcard_editor.lo \ ags/X/libgsequencer_la-ags_window_callbacks.lo \ ags/X/libgsequencer_la-ags_xorg_application_context.lo am__objects_27 = $(am__objects_1) \ ags/X/file/libgsequencer_la-ags_gui_file_xml.lo \ ags/X/file/libgsequencer_la-ags_simple_file.lo am__objects_28 = $(am__objects_1) \ ags/X/thread/libgsequencer_la-ags_gui_thread.lo \ ags/X/thread/libgsequencer_la-ags_simple_autosave_thread.lo am__objects_29 = $(am__objects_1) \ ags/X/task/libgsequencer_la-ags_add_bulk_member.lo \ ags/X/task/libgsequencer_la-ags_add_line_member.lo \ ags/X/task/libgsequencer_la-ags_add_sequencer_editor_jack.lo \ ags/X/task/libgsequencer_la-ags_add_soundcard_editor_sink.lo \ ags/X/task/libgsequencer_la-ags_blink_cell_pattern_cursor.lo \ ags/X/task/libgsequencer_la-ags_change_indicator.lo \ ags/X/task/libgsequencer_la-ags_change_tact.lo \ ags/X/task/libgsequencer_la-ags_display_tact.lo \ ags/X/task/libgsequencer_la-ags_remove_sequencer_editor_jack.lo \ ags/X/task/libgsequencer_la-ags_remove_soundcard_editor_sink.lo \ ags/X/task/libgsequencer_la-ags_simple_file_read.lo \ ags/X/task/libgsequencer_la-ags_simple_file_write.lo \ ags/X/task/libgsequencer_la-ags_toggle_led.lo \ ags/X/task/libgsequencer_la-ags_update_bulk_member.lo am__objects_30 = $(am__objects_1) \ ags/X/import/libgsequencer_la-ags_midi_import_wizard.lo \ ags/X/import/libgsequencer_la-ags_midi_import_wizard_callbacks.lo \ ags/X/import/libgsequencer_la-ags_track_collection.lo \ ags/X/import/libgsequencer_la-ags_track_collection_callbacks.lo \ ags/X/import/libgsequencer_la-ags_track_collection_mapper.lo \ ags/X/import/libgsequencer_la-ags_track_collection_mapper_callbacks.lo am__objects_31 = $(am__objects_1) \ ags/X/export/libgsequencer_la-ags_midi_export_wizard.lo \ ags/X/export/libgsequencer_la-ags_midi_export_wizard_callbacks.lo \ ags/X/export/libgsequencer_la-ags_machine_collection.lo \ ags/X/export/libgsequencer_la-ags_machine_collection_callbacks.lo \ ags/X/export/libgsequencer_la-ags_machine_collection_entry.lo \ ags/X/export/libgsequencer_la-ags_machine_collection_entry_callbacks.lo am__objects_32 = $(am__objects_1) \ ags/X/machine/libgsequencer_la-ags_audiorec.lo \ ags/X/machine/libgsequencer_la-ags_audiorec_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_cell_pattern.lo \ ags/X/machine/libgsequencer_la-ags_cell_pattern_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_drum.lo \ ags/X/machine/libgsequencer_la-ags_drum_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_drum_input_line.lo \ ags/X/machine/libgsequencer_la-ags_drum_input_line_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_drum_input_pad.lo \ ags/X/machine/libgsequencer_la-ags_drum_input_pad_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_drum_output_line.lo \ ags/X/machine/libgsequencer_la-ags_drum_output_line_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_drum_output_pad.lo \ ags/X/machine/libgsequencer_la-ags_drum_output_pad_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_dssi_bridge.lo \ ags/X/machine/libgsequencer_la-ags_dssi_bridge_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer_bridge.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer_bridge_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer_input_line.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer_input_line_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad.lo \ ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_ladspa_bridge.lo \ ags/X/machine/libgsequencer_la-ags_ladspa_bridge_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_live_dssi_bridge.lo \ ags/X/machine/libgsequencer_la-ags_live_dssi_bridge_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_live_lv2_bridge.lo \ ags/X/machine/libgsequencer_la-ags_live_lv2_bridge_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_lv2_bridge.lo \ ags/X/machine/libgsequencer_la-ags_lv2_bridge_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_matrix.lo \ ags/X/machine/libgsequencer_la-ags_matrix_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_matrix_bridge.lo \ ags/X/machine/libgsequencer_la-ags_matrix_bridge_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_matrix_bulk_input.lo \ ags/X/machine/libgsequencer_la-ags_matrix_bulk_input_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_mixer.lo \ ags/X/machine/libgsequencer_la-ags_mixer_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_mixer_input_line.lo \ ags/X/machine/libgsequencer_la-ags_mixer_input_pad.lo \ ags/X/machine/libgsequencer_la-ags_oscillator.lo \ ags/X/machine/libgsequencer_la-ags_oscillator_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_panel.lo \ ags/X/machine/libgsequencer_la-ags_panel_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_panel_input_line.lo \ ags/X/machine/libgsequencer_la-ags_panel_input_line_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_panel_input_pad.lo \ ags/X/machine/libgsequencer_la-ags_pattern_box_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_pattern_box.lo \ ags/X/machine/libgsequencer_la-ags_syncsynth.lo \ ags/X/machine/libgsequencer_la-ags_syncsynth_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_synth.lo \ ags/X/machine/libgsequencer_la-ags_synth_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_synth_input_line.lo \ ags/X/machine/libgsequencer_la-ags_synth_input_line_callbacks.lo \ ags/X/machine/libgsequencer_la-ags_synth_input_pad.lo am__objects_33 = $(am__objects_1) \ ags/X/editor/libgsequencer_la-ags_automation_edit.lo \ ags/X/editor/libgsequencer_la-ags_automation_edit_box.lo \ ags/X/editor/libgsequencer_la-ags_automation_edit_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_automation_toolbar.lo \ ags/X/editor/libgsequencer_la-ags_automation_toolbar_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_crop_note_dialog_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_crop_note_dialog.lo \ ags/X/editor/libgsequencer_la-ags_envelope_dialog_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_envelope_dialog.lo \ ags/X/editor/libgsequencer_la-ags_envelope_editor_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_envelope_editor.lo \ ags/X/editor/libgsequencer_la-ags_envelope_info_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_envelope_info.lo \ ags/X/editor/libgsequencer_la-ags_file_selection_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_file_selection.lo \ ags/X/editor/libgsequencer_la-ags_inline_player.lo \ ags/X/editor/libgsequencer_la-ags_inline_player_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_machine_radio_button.lo \ ags/X/editor/libgsequencer_la-ags_machine_radio_button_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_machine_selection.lo \ ags/X/editor/libgsequencer_la-ags_machine_selector.lo \ ags/X/editor/libgsequencer_la-ags_machine_selector_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_move_note_dialog_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_move_note_dialog.lo \ ags/X/editor/libgsequencer_la-ags_notation_edit.lo \ ags/X/editor/libgsequencer_la-ags_notation_edit_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_notation_toolbar.lo \ ags/X/editor/libgsequencer_la-ags_notation_toolbar_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_pattern_envelope_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_pattern_envelope.lo \ ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog.lo \ ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog.lo \ ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog.lo \ ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_scrolled_automation_edit_box.lo \ ags/X/editor/libgsequencer_la-ags_scrolled_wave_edit_box.lo \ ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog.lo \ ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_select_note_dialog.lo \ ags/X/editor/libgsequencer_la-ags_select_note_dialog_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_sf2_chooser.lo \ ags/X/editor/libgsequencer_la-ags_sf2_chooser_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_vautomation_edit_box.lo \ ags/X/editor/libgsequencer_la-ags_vwave_edit_box.lo \ ags/X/editor/libgsequencer_la-ags_wave_edit.lo \ ags/X/editor/libgsequencer_la-ags_wave_edit_box.lo \ ags/X/editor/libgsequencer_la-ags_wave_edit_callbacks.lo \ ags/X/editor/libgsequencer_la-ags_wave_toolbar.lo \ ags/X/editor/libgsequencer_la-ags_wave_toolbar_callbacks.lo am_libgsequencer_la_OBJECTS = $(am__objects_25) $(am__objects_26) \ $(am__objects_27) $(am__objects_28) $(am__objects_29) \ $(am__objects_30) $(am__objects_31) $(am__objects_32) \ $(am__objects_33) libgsequencer_la_OBJECTS = $(am_libgsequencer_la_OBJECTS) libgsequencer_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libgsequencer_la_CFLAGS) $(CFLAGS) \ $(libgsequencer_la_LDFLAGS) $(LDFLAGS) -o $@ am__DEPENDENCIES_2 = libgsequencer.la libags_gui.la libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) libgsequencer_test_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_libgsequencer_test_la_OBJECTS = \ ags/test/X/libgsequencer_test_la-gsequencer_setup_util.lo \ ags/test/X/libgsequencer_test_la-ags_functional_test_util.lo libgsequencer_test_la_OBJECTS = $(am_libgsequencer_test_la_OBJECTS) libgsequencer_test_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libgsequencer_test_la_CFLAGS) $(CFLAGS) \ $(libgsequencer_test_la_LDFLAGS) $(LDFLAGS) -o $@ PROGRAMS = $(bin_PROGRAMS) am_ags_acceleration_test_OBJECTS = ags/test/audio/ags_acceleration_test-ags_acceleration_test.$(OBJEXT) ags_acceleration_test_OBJECTS = $(am_ags_acceleration_test_OBJECTS) ags_acceleration_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_acceleration_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_acceleration_test_CFLAGS) $(CFLAGS) \ $(ags_acceleration_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_application_context_test_OBJECTS = ags/test/object/ags_application_context_test-ags_application_context_test.$(OBJEXT) ags_application_context_test_OBJECTS = \ $(am_ags_application_context_test_OBJECTS) ags_application_context_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_application_context_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_application_context_test_CFLAGS) $(CFLAGS) \ $(ags_application_context_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_audio_application_context_test_OBJECTS = ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.$(OBJEXT) ags_audio_application_context_test_OBJECTS = \ $(am_ags_audio_application_context_test_OBJECTS) ags_audio_application_context_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_audio_application_context_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_audio_application_context_test_CFLAGS) $(CFLAGS) \ $(ags_audio_application_context_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_audio_connection_test_OBJECTS = ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.$(OBJEXT) ags_audio_connection_test_OBJECTS = \ $(am_ags_audio_connection_test_OBJECTS) ags_audio_connection_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_audio_connection_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_audio_connection_test_CFLAGS) $(CFLAGS) \ $(ags_audio_connection_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_audio_signal_test_OBJECTS = ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.$(OBJEXT) ags_audio_signal_test_OBJECTS = $(am_ags_audio_signal_test_OBJECTS) ags_audio_signal_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_audio_signal_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_audio_signal_test_CFLAGS) $(CFLAGS) \ $(ags_audio_signal_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_audio_test_OBJECTS = \ ags/test/audio/ags_audio_test-ags_audio_test.$(OBJEXT) ags_audio_test_OBJECTS = $(am_ags_audio_test_OBJECTS) ags_audio_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_audio_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_audio_test_CFLAGS) $(CFLAGS) $(ags_audio_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_automation_test_OBJECTS = ags/test/audio/ags_automation_test-ags_automation_test.$(OBJEXT) ags_automation_test_OBJECTS = $(am_ags_automation_test_OBJECTS) ags_automation_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_automation_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_automation_test_CFLAGS) $(CFLAGS) \ $(ags_automation_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_base_plugin_test_OBJECTS = ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.$(OBJEXT) ags_base_plugin_test_OBJECTS = $(am_ags_base_plugin_test_OBJECTS) ags_base_plugin_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_base_plugin_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_base_plugin_test_CFLAGS) $(CFLAGS) \ $(ags_base_plugin_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_channel_test_OBJECTS = \ ags/test/audio/ags_channel_test-ags_channel_test.$(OBJEXT) ags_channel_test_OBJECTS = $(am_ags_channel_test_OBJECTS) ags_channel_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_channel_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_channel_test_CFLAGS) $(CFLAGS) \ $(ags_channel_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_complex_test_OBJECTS = \ ags/test/lib/ags_complex_test-ags_complex_test.$(OBJEXT) ags_complex_test_OBJECTS = $(am_ags_complex_test_OBJECTS) ags_complex_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_complex_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_complex_test_CFLAGS) $(CFLAGS) \ $(ags_complex_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_condition_manager_test_OBJECTS = ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.$(OBJEXT) ags_condition_manager_test_OBJECTS = \ $(am_ags_condition_manager_test_OBJECTS) ags_condition_manager_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_condition_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_condition_manager_test_CFLAGS) $(CFLAGS) \ $(ags_condition_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_config_test_OBJECTS = \ ags/test/object/ags_config_test-ags_config_test.$(OBJEXT) ags_config_test_OBJECTS = $(am_ags_config_test_OBJECTS) ags_config_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_config_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_config_test_CFLAGS) $(CFLAGS) $(ags_config_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_connection_manager_test_OBJECTS = ags/test/object/ags_connection_manager_test-ags_connection_manager_test.$(OBJEXT) ags_connection_manager_test_OBJECTS = \ $(am_ags_connection_manager_test_OBJECTS) ags_connection_manager_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_connection_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_connection_manager_test_CFLAGS) $(CFLAGS) \ $(ags_connection_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_destroy_worker_test_OBJECTS = ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.$(OBJEXT) ags_destroy_worker_test_OBJECTS = \ $(am_ags_destroy_worker_test_OBJECTS) ags_destroy_worker_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_destroy_worker_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_destroy_worker_test_CFLAGS) $(CFLAGS) \ $(ags_destroy_worker_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_devout_test_OBJECTS = \ ags/test/audio/ags_devout_test-ags_devout_test.$(OBJEXT) ags_devout_test_OBJECTS = $(am_ags_devout_test_OBJECTS) ags_devout_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_devout_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_devout_test_CFLAGS) $(CFLAGS) $(ags_devout_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_dssi_manager_test_OBJECTS = ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.$(OBJEXT) ags_dssi_manager_test_OBJECTS = $(am_ags_dssi_manager_test_OBJECTS) ags_dssi_manager_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_dssi_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_dssi_manager_test_CFLAGS) $(CFLAGS) \ $(ags_dssi_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_dssi_plugin_test_OBJECTS = ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.$(OBJEXT) ags_dssi_plugin_test_OBJECTS = $(am_ags_dssi_plugin_test_OBJECTS) ags_dssi_plugin_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_dssi_plugin_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_dssi_plugin_test_CFLAGS) $(CFLAGS) \ $(ags_dssi_plugin_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_file_id_ref_test_OBJECTS = ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.$(OBJEXT) ags_file_id_ref_test_OBJECTS = $(am_ags_file_id_ref_test_OBJECTS) ags_file_id_ref_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_file_id_ref_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_file_id_ref_test_CFLAGS) $(CFLAGS) \ $(ags_file_id_ref_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_file_launch_test_OBJECTS = ags/test/file/ags_file_launch_test-ags_file_launch_test.$(OBJEXT) ags_file_launch_test_OBJECTS = $(am_ags_file_launch_test_OBJECTS) ags_file_launch_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_file_launch_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_file_launch_test_CFLAGS) $(CFLAGS) \ $(ags_file_launch_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_file_lookup_test_OBJECTS = ags/test/file/ags_file_lookup_test-ags_file_lookup_test.$(OBJEXT) ags_file_lookup_test_OBJECTS = $(am_ags_file_lookup_test_OBJECTS) ags_file_lookup_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_file_lookup_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_file_lookup_test_CFLAGS) $(CFLAGS) \ $(ags_file_lookup_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_file_test_OBJECTS = \ ags/test/file/ags_file_test-ags_file_test.$(OBJEXT) ags_file_test_OBJECTS = $(am_ags_file_test_OBJECTS) ags_file_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_file_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ags_file_test_CFLAGS) \ $(CFLAGS) $(ags_file_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_functional_audio_test_OBJECTS = ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.$(OBJEXT) ags_functional_audio_test_OBJECTS = \ $(am_ags_functional_audio_test_OBJECTS) am__DEPENDENCIES_3 = libgsequencer.la libags_gui.la libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ libgsequencer_test.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_functional_audio_test_DEPENDENCIES = $(am__DEPENDENCIES_3) ags_functional_audio_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_functional_audio_test_CFLAGS) $(CFLAGS) \ $(ags_functional_audio_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_functional_drum_test_OBJECTS = ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.$(OBJEXT) ags_functional_drum_test_OBJECTS = \ $(am_ags_functional_drum_test_OBJECTS) ags_functional_drum_test_DEPENDENCIES = $(am__DEPENDENCIES_3) ags_functional_drum_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_functional_drum_test_CFLAGS) $(CFLAGS) \ $(ags_functional_drum_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_functional_editor_workflow_test_OBJECTS = ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.$(OBJEXT) ags_functional_editor_workflow_test_OBJECTS = \ $(am_ags_functional_editor_workflow_test_OBJECTS) ags_functional_editor_workflow_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_functional_editor_workflow_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_functional_editor_workflow_test_CFLAGS) \ $(CFLAGS) $(ags_functional_editor_workflow_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_functional_ffplayer_test_OBJECTS = ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.$(OBJEXT) ags_functional_ffplayer_test_OBJECTS = \ $(am_ags_functional_ffplayer_test_OBJECTS) ags_functional_ffplayer_test_DEPENDENCIES = $(am__DEPENDENCIES_3) ags_functional_ffplayer_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_functional_ffplayer_test_CFLAGS) $(CFLAGS) \ $(ags_functional_ffplayer_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_functional_line_member_add_and_destroy_test_OBJECTS = ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.$(OBJEXT) ags_functional_line_member_add_and_destroy_test_OBJECTS = \ $(am_ags_functional_line_member_add_and_destroy_test_OBJECTS) ags_functional_line_member_add_and_destroy_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_functional_line_member_add_and_destroy_test_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) \ $(ags_functional_line_member_add_and_destroy_test_CFLAGS) \ $(CFLAGS) \ $(ags_functional_line_member_add_and_destroy_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_functional_machine_add_and_destroy_test_OBJECTS = ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.$(OBJEXT) ags_functional_machine_add_and_destroy_test_OBJECTS = \ $(am_ags_functional_machine_add_and_destroy_test_OBJECTS) ags_functional_machine_add_and_destroy_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_functional_machine_add_and_destroy_test_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) \ $(ags_functional_machine_add_and_destroy_test_CFLAGS) \ $(CFLAGS) \ $(ags_functional_machine_add_and_destroy_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_functional_machine_link_test_OBJECTS = ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.$(OBJEXT) ags_functional_machine_link_test_OBJECTS = \ $(am_ags_functional_machine_link_test_OBJECTS) ags_functional_machine_link_test_DEPENDENCIES = $(am__DEPENDENCIES_3) ags_functional_machine_link_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_functional_machine_link_test_CFLAGS) $(CFLAGS) \ $(ags_functional_machine_link_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_functional_matrix_test_OBJECTS = ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.$(OBJEXT) ags_functional_matrix_test_OBJECTS = \ $(am_ags_functional_matrix_test_OBJECTS) ags_functional_matrix_test_DEPENDENCIES = $(am__DEPENDENCIES_3) ags_functional_matrix_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_functional_matrix_test_CFLAGS) $(CFLAGS) \ $(ags_functional_matrix_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_functional_mixer_test_OBJECTS = ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.$(OBJEXT) ags_functional_mixer_test_OBJECTS = \ $(am_ags_functional_mixer_test_OBJECTS) ags_functional_mixer_test_DEPENDENCIES = $(am__DEPENDENCIES_3) ags_functional_mixer_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_functional_mixer_test_CFLAGS) $(CFLAGS) \ $(ags_functional_mixer_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_functional_notation_edit_test_OBJECTS = ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.$(OBJEXT) ags_functional_notation_edit_test_OBJECTS = \ $(am_ags_functional_notation_edit_test_OBJECTS) ags_functional_notation_edit_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_functional_notation_edit_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_functional_notation_edit_test_CFLAGS) $(CFLAGS) \ $(ags_functional_notation_edit_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_functional_panel_test_OBJECTS = ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.$(OBJEXT) ags_functional_panel_test_OBJECTS = \ $(am_ags_functional_panel_test_OBJECTS) ags_functional_panel_test_DEPENDENCIES = $(am__DEPENDENCIES_3) ags_functional_panel_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_functional_panel_test_CFLAGS) $(CFLAGS) \ $(ags_functional_panel_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_functional_synth_test_OBJECTS = ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.$(OBJEXT) ags_functional_synth_test_OBJECTS = \ $(am_ags_functional_synth_test_OBJECTS) ags_functional_synth_test_DEPENDENCIES = $(am__DEPENDENCIES_3) ags_functional_synth_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_functional_synth_test_CFLAGS) $(CFLAGS) \ $(ags_functional_synth_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_input_test_OBJECTS = \ ags/test/audio/ags_input_test-ags_input_test.$(OBJEXT) ags_input_test_OBJECTS = $(am_ags_input_test_OBJECTS) ags_input_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_input_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_input_test_CFLAGS) $(CFLAGS) $(ags_input_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_ladspa_manager_test_OBJECTS = ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.$(OBJEXT) ags_ladspa_manager_test_OBJECTS = \ $(am_ags_ladspa_manager_test_OBJECTS) ags_ladspa_manager_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_ladspa_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_ladspa_manager_test_CFLAGS) $(CFLAGS) \ $(ags_ladspa_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_log_test_OBJECTS = \ ags/test/lib/ags_log_test-ags_log_test.$(OBJEXT) ags_log_test_OBJECTS = $(am_ags_log_test_OBJECTS) ags_log_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_log_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ags_log_test_CFLAGS) \ $(CFLAGS) $(ags_log_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_lv2_manager_test_OBJECTS = ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.$(OBJEXT) ags_lv2_manager_test_OBJECTS = $(am_ags_lv2_manager_test_OBJECTS) ags_lv2_manager_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_lv2_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_lv2_manager_test_CFLAGS) $(CFLAGS) \ $(ags_lv2_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_lv2_option_manager_test_OBJECTS = ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.$(OBJEXT) ags_lv2_option_manager_test_OBJECTS = \ $(am_ags_lv2_option_manager_test_OBJECTS) ags_lv2_option_manager_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_lv2_option_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_lv2_option_manager_test_CFLAGS) $(CFLAGS) \ $(ags_lv2_option_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_lv2_plugin_test_OBJECTS = ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.$(OBJEXT) ags_lv2_plugin_test_OBJECTS = $(am_ags_lv2_plugin_test_OBJECTS) ags_lv2_plugin_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_lv2_plugin_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_lv2_plugin_test_CFLAGS) $(CFLAGS) \ $(ags_lv2_plugin_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_lv2_preset_test_OBJECTS = ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.$(OBJEXT) ags_lv2_preset_test_OBJECTS = $(am_ags_lv2_preset_test_OBJECTS) ags_lv2_preset_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_lv2_preset_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_lv2_preset_test_CFLAGS) $(CFLAGS) \ $(ags_lv2_preset_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_lv2_uri_map_manager_test_OBJECTS = ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.$(OBJEXT) ags_lv2_uri_map_manager_test_OBJECTS = \ $(am_ags_lv2_uri_map_manager_test_OBJECTS) ags_lv2_uri_map_manager_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_lv2_uri_map_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_lv2_uri_map_manager_test_CFLAGS) $(CFLAGS) \ $(ags_lv2_uri_map_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_lv2_urid_manager_test_OBJECTS = ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.$(OBJEXT) ags_lv2_urid_manager_test_OBJECTS = \ $(am_ags_lv2_urid_manager_test_OBJECTS) ags_lv2_urid_manager_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_lv2_urid_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_lv2_urid_manager_test_CFLAGS) $(CFLAGS) \ $(ags_lv2_urid_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_lv2_worker_manager_test_OBJECTS = ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.$(OBJEXT) ags_lv2_worker_manager_test_OBJECTS = \ $(am_ags_lv2_worker_manager_test_OBJECTS) ags_lv2_worker_manager_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_lv2_worker_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_lv2_worker_manager_test_CFLAGS) $(CFLAGS) \ $(ags_lv2_worker_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_lv2ui_manager_test_OBJECTS = ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.$(OBJEXT) ags_lv2ui_manager_test_OBJECTS = $(am_ags_lv2ui_manager_test_OBJECTS) ags_lv2ui_manager_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_lv2ui_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_lv2ui_manager_test_CFLAGS) $(CFLAGS) \ $(ags_lv2ui_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_lv2ui_plugin_test_OBJECTS = ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.$(OBJEXT) ags_lv2ui_plugin_test_OBJECTS = $(am_ags_lv2ui_plugin_test_OBJECTS) ags_lv2ui_plugin_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_lv2ui_plugin_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_lv2ui_plugin_test_CFLAGS) $(CFLAGS) \ $(ags_lv2ui_plugin_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_midi_buffer_util_test_OBJECTS = ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.$(OBJEXT) ags_midi_buffer_util_test_OBJECTS = \ $(am_ags_midi_buffer_util_test_OBJECTS) ags_midi_buffer_util_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_midi_buffer_util_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_midi_buffer_util_test_CFLAGS) $(CFLAGS) \ $(ags_midi_buffer_util_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_midi_builder_test_OBJECTS = ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.$(OBJEXT) ags_midi_builder_test_OBJECTS = $(am_ags_midi_builder_test_OBJECTS) ags_midi_builder_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_midi_builder_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_midi_builder_test_CFLAGS) $(CFLAGS) \ $(ags_midi_builder_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_midiin_test_OBJECTS = \ ags/test/audio/ags_midiin_test-ags_midiin_test.$(OBJEXT) ags_midiin_test_OBJECTS = $(am_ags_midiin_test_OBJECTS) ags_midiin_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_midiin_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_midiin_test_CFLAGS) $(CFLAGS) $(ags_midiin_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_mutex_manager_test_OBJECTS = ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.$(OBJEXT) ags_mutex_manager_test_OBJECTS = $(am_ags_mutex_manager_test_OBJECTS) ags_mutex_manager_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_mutex_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_mutex_manager_test_CFLAGS) $(CFLAGS) \ $(ags_mutex_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_notation_test_OBJECTS = \ ags/test/audio/ags_notation_test-ags_notation_test.$(OBJEXT) ags_notation_test_OBJECTS = $(am_ags_notation_test_OBJECTS) ags_notation_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_notation_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_notation_test_CFLAGS) $(CFLAGS) \ $(ags_notation_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_note_test_OBJECTS = \ ags/test/audio/ags_note_test-ags_note_test.$(OBJEXT) ags_note_test_OBJECTS = $(am_ags_note_test_OBJECTS) ags_note_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_note_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ags_note_test_CFLAGS) \ $(CFLAGS) $(ags_note_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_output_test_OBJECTS = \ ags/test/audio/ags_output_test-ags_output_test.$(OBJEXT) ags_output_test_OBJECTS = $(am_ags_output_test_OBJECTS) ags_output_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_output_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_output_test_CFLAGS) $(CFLAGS) $(ags_output_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_pattern_test_OBJECTS = \ ags/test/audio/ags_pattern_test-ags_pattern_test.$(OBJEXT) ags_pattern_test_OBJECTS = $(am_ags_pattern_test_OBJECTS) ags_pattern_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_pattern_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_pattern_test_CFLAGS) $(CFLAGS) \ $(ags_pattern_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_playback_domain_test_OBJECTS = ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.$(OBJEXT) ags_playback_domain_test_OBJECTS = \ $(am_ags_playback_domain_test_OBJECTS) ags_playback_domain_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_playback_domain_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_playback_domain_test_CFLAGS) $(CFLAGS) \ $(ags_playback_domain_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_playback_test_OBJECTS = \ ags/test/audio/ags_playback_test-ags_playback_test.$(OBJEXT) ags_playback_test_OBJECTS = $(am_ags_playback_test_OBJECTS) ags_playback_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_playback_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_playback_test_CFLAGS) $(CFLAGS) \ $(ags_playback_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_poll_fd_test_OBJECTS = \ ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.$(OBJEXT) ags_poll_fd_test_OBJECTS = $(am_ags_poll_fd_test_OBJECTS) ags_poll_fd_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_poll_fd_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_poll_fd_test_CFLAGS) $(CFLAGS) \ $(ags_poll_fd_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_polling_thread_test_OBJECTS = ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.$(OBJEXT) ags_polling_thread_test_OBJECTS = \ $(am_ags_polling_thread_test_OBJECTS) ags_polling_thread_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_polling_thread_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_polling_thread_test_CFLAGS) $(CFLAGS) \ $(ags_polling_thread_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_port_test_OBJECTS = \ ags/test/audio/ags_port_test-ags_port_test.$(OBJEXT) ags_port_test_OBJECTS = $(am_ags_port_test_OBJECTS) ags_port_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_port_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ags_port_test_CFLAGS) \ $(CFLAGS) $(ags_port_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_preset_test_OBJECTS = \ ags/test/audio/ags_preset_test-ags_preset_test.$(OBJEXT) ags_preset_test_OBJECTS = $(am_ags_preset_test_OBJECTS) ags_preset_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_preset_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_preset_test_CFLAGS) $(CFLAGS) $(ags_preset_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_recall_channel_run_test_OBJECTS = ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.$(OBJEXT) ags_recall_channel_run_test_OBJECTS = \ $(am_ags_recall_channel_run_test_OBJECTS) ags_recall_channel_run_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_recall_channel_run_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_recall_channel_run_test_CFLAGS) $(CFLAGS) \ $(ags_recall_channel_run_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_recall_channel_test_OBJECTS = ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.$(OBJEXT) ags_recall_channel_test_OBJECTS = \ $(am_ags_recall_channel_test_OBJECTS) ags_recall_channel_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_recall_channel_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_recall_channel_test_CFLAGS) $(CFLAGS) \ $(ags_recall_channel_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_recall_container_test_OBJECTS = ags/test/audio/ags_recall_container_test-ags_recall_container_test.$(OBJEXT) ags_recall_container_test_OBJECTS = \ $(am_ags_recall_container_test_OBJECTS) ags_recall_container_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_recall_container_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_recall_container_test_CFLAGS) $(CFLAGS) \ $(ags_recall_container_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_recall_dependency_test_OBJECTS = ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.$(OBJEXT) ags_recall_dependency_test_OBJECTS = \ $(am_ags_recall_dependency_test_OBJECTS) ags_recall_dependency_test_DEPENDENCIES = libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_recall_dependency_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_recall_dependency_test_CFLAGS) $(CFLAGS) \ $(ags_recall_dependency_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_recall_test_OBJECTS = \ ags/test/audio/ags_recall_test-ags_recall_test.$(OBJEXT) ags_recall_test_OBJECTS = $(am_ags_recall_test_OBJECTS) ags_recall_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_recall_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_recall_test_CFLAGS) $(CFLAGS) $(ags_recall_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_recycling_test_OBJECTS = ags/test/audio/ags_recycling_test-ags_recycling_test.$(OBJEXT) ags_recycling_test_OBJECTS = $(am_ags_recycling_test_OBJECTS) ags_recycling_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_recycling_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_recycling_test_CFLAGS) $(CFLAGS) \ $(ags_recycling_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_returnable_thread_test_OBJECTS = ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.$(OBJEXT) ags_returnable_thread_test_OBJECTS = \ $(am_ags_returnable_thread_test_OBJECTS) ags_returnable_thread_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_returnable_thread_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_returnable_thread_test_CFLAGS) $(CFLAGS) \ $(ags_returnable_thread_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_task_test_OBJECTS = \ ags/test/thread/ags_task_test-ags_task_test.$(OBJEXT) ags_task_test_OBJECTS = $(am_ags_task_test_OBJECTS) ags_task_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_task_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ags_task_test_CFLAGS) \ $(CFLAGS) $(ags_task_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_task_thread_test_OBJECTS = ags/test/thread/ags_task_thread_test-ags_task_thread_test.$(OBJEXT) ags_task_thread_test_OBJECTS = $(am_ags_task_thread_test_OBJECTS) ags_task_thread_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_task_thread_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_task_thread_test_CFLAGS) $(CFLAGS) \ $(ags_task_thread_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_thread_file_xml_test_OBJECTS = ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.$(OBJEXT) ags_thread_file_xml_test_OBJECTS = \ $(am_ags_thread_file_xml_test_OBJECTS) ags_thread_file_xml_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_thread_file_xml_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_thread_file_xml_test_CFLAGS) $(CFLAGS) \ $(ags_thread_file_xml_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_thread_pool_test_OBJECTS = ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.$(OBJEXT) ags_thread_pool_test_OBJECTS = $(am_ags_thread_pool_test_OBJECTS) ags_thread_pool_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_thread_pool_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_thread_pool_test_CFLAGS) $(CFLAGS) \ $(ags_thread_pool_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_thread_test_OBJECTS = \ ags/test/thread/ags_thread_test-ags_thread_test.$(OBJEXT) ags_thread_test_OBJECTS = $(am_ags_thread_test_OBJECTS) ags_thread_test_DEPENDENCIES = libags_server.la libags_thread.la \ libags.la libags_thread.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ags_thread_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_thread_test_CFLAGS) $(CFLAGS) $(ags_thread_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_turtle_manager_test_OBJECTS = ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.$(OBJEXT) ags_turtle_manager_test_OBJECTS = \ $(am_ags_turtle_manager_test_OBJECTS) ags_turtle_manager_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_turtle_manager_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_turtle_manager_test_CFLAGS) $(CFLAGS) \ $(ags_turtle_manager_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_turtle_test_OBJECTS = \ ags/test/lib/ags_turtle_test-ags_turtle_test.$(OBJEXT) ags_turtle_test_OBJECTS = $(am_ags_turtle_test_OBJECTS) ags_turtle_test_DEPENDENCIES = libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_turtle_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_turtle_test_CFLAGS) $(CFLAGS) $(ags_turtle_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_worker_thread_test_OBJECTS = ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.$(OBJEXT) ags_worker_thread_test_OBJECTS = $(am_ags_worker_thread_test_OBJECTS) ags_worker_thread_test_DEPENDENCIES = libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_worker_thread_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_worker_thread_test_CFLAGS) $(CFLAGS) \ $(ags_worker_thread_test_LDFLAGS) $(LDFLAGS) -o $@ am_ags_xorg_application_context_test_OBJECTS = ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.$(OBJEXT) ags_xorg_application_context_test_OBJECTS = \ $(am_ags_xorg_application_context_test_OBJECTS) ags_xorg_application_context_test_DEPENDENCIES = libgsequencer.la \ libags_gui.la libags_audio.la libags_server.la \ libags_thread.la libags.la libags_thread.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_xorg_application_context_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_xorg_application_context_test_CFLAGS) $(CFLAGS) \ $(ags_xorg_application_context_test_LDFLAGS) $(LDFLAGS) -o $@ am__objects_34 = ags/gsequencer-gsequencer_main.$(OBJEXT) am_gsequencer_OBJECTS = $(am__objects_34) $(am__objects_1) gsequencer_OBJECTS = $(am_gsequencer_OBJECTS) gsequencer_DEPENDENCIES = libgsequencer.la libags_audio.la \ libags_server.la libags_gui.la libags_thread.la libags.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) gsequencer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(gsequencer_CFLAGS) \ $(CFLAGS) $(gsequencer_LDFLAGS) $(LDFLAGS) -o $@ am_midi2xml_OBJECTS = ags/midi2xml-midi2xml_main.$(OBJEXT) midi2xml_OBJECTS = $(am_midi2xml_OBJECTS) midi2xml_DEPENDENCIES = libags_audio.la libags_server.la libags_gui.la \ libags_thread.la libags.la midi2xml_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(midi2xml_CFLAGS) \ $(CFLAGS) $(midi2xml_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/ags depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libags_la_SOURCES) $(libags_audio_la_SOURCES) \ $(libags_gui_la_SOURCES) $(libags_server_la_SOURCES) \ $(libags_thread_la_SOURCES) $(libgsequencer_la_SOURCES) \ $(libgsequencer_test_la_SOURCES) \ $(ags_acceleration_test_SOURCES) \ $(ags_application_context_test_SOURCES) \ $(ags_audio_application_context_test_SOURCES) \ $(ags_audio_connection_test_SOURCES) \ $(ags_audio_signal_test_SOURCES) $(ags_audio_test_SOURCES) \ $(ags_automation_test_SOURCES) $(ags_base_plugin_test_SOURCES) \ $(ags_channel_test_SOURCES) $(ags_complex_test_SOURCES) \ $(ags_condition_manager_test_SOURCES) \ $(ags_config_test_SOURCES) \ $(ags_connection_manager_test_SOURCES) \ $(ags_destroy_worker_test_SOURCES) $(ags_devout_test_SOURCES) \ $(ags_dssi_manager_test_SOURCES) \ $(ags_dssi_plugin_test_SOURCES) \ $(ags_file_id_ref_test_SOURCES) \ $(ags_file_launch_test_SOURCES) \ $(ags_file_lookup_test_SOURCES) $(ags_file_test_SOURCES) \ $(ags_functional_audio_test_SOURCES) \ $(ags_functional_drum_test_SOURCES) \ $(ags_functional_editor_workflow_test_SOURCES) \ $(ags_functional_ffplayer_test_SOURCES) \ $(ags_functional_line_member_add_and_destroy_test_SOURCES) \ $(ags_functional_machine_add_and_destroy_test_SOURCES) \ $(ags_functional_machine_link_test_SOURCES) \ $(ags_functional_matrix_test_SOURCES) \ $(ags_functional_mixer_test_SOURCES) \ $(ags_functional_notation_edit_test_SOURCES) \ $(ags_functional_panel_test_SOURCES) \ $(ags_functional_synth_test_SOURCES) $(ags_input_test_SOURCES) \ $(ags_ladspa_manager_test_SOURCES) $(ags_log_test_SOURCES) \ $(ags_lv2_manager_test_SOURCES) \ $(ags_lv2_option_manager_test_SOURCES) \ $(ags_lv2_plugin_test_SOURCES) $(ags_lv2_preset_test_SOURCES) \ $(ags_lv2_uri_map_manager_test_SOURCES) \ $(ags_lv2_urid_manager_test_SOURCES) \ $(ags_lv2_worker_manager_test_SOURCES) \ $(ags_lv2ui_manager_test_SOURCES) \ $(ags_lv2ui_plugin_test_SOURCES) \ $(ags_midi_buffer_util_test_SOURCES) \ $(ags_midi_builder_test_SOURCES) $(ags_midiin_test_SOURCES) \ $(ags_mutex_manager_test_SOURCES) $(ags_notation_test_SOURCES) \ $(ags_note_test_SOURCES) $(ags_output_test_SOURCES) \ $(ags_pattern_test_SOURCES) \ $(ags_playback_domain_test_SOURCES) \ $(ags_playback_test_SOURCES) $(ags_poll_fd_test_SOURCES) \ $(ags_polling_thread_test_SOURCES) $(ags_port_test_SOURCES) \ $(ags_preset_test_SOURCES) \ $(ags_recall_channel_run_test_SOURCES) \ $(ags_recall_channel_test_SOURCES) \ $(ags_recall_container_test_SOURCES) \ $(ags_recall_dependency_test_SOURCES) \ $(ags_recall_test_SOURCES) $(ags_recycling_test_SOURCES) \ $(ags_returnable_thread_test_SOURCES) $(ags_task_test_SOURCES) \ $(ags_task_thread_test_SOURCES) \ $(ags_thread_file_xml_test_SOURCES) \ $(ags_thread_pool_test_SOURCES) $(ags_thread_test_SOURCES) \ $(ags_turtle_manager_test_SOURCES) $(ags_turtle_test_SOURCES) \ $(ags_worker_thread_test_SOURCES) \ $(ags_xorg_application_context_test_SOURCES) \ $(gsequencer_SOURCES) $(midi2xml_SOURCES) DIST_SOURCES = $(libags_la_SOURCES) $(libags_audio_la_SOURCES) \ $(libags_gui_la_SOURCES) $(libags_server_la_SOURCES) \ $(libags_thread_la_SOURCES) $(libgsequencer_la_SOURCES) \ $(libgsequencer_test_la_SOURCES) \ $(ags_acceleration_test_SOURCES) \ $(ags_application_context_test_SOURCES) \ $(ags_audio_application_context_test_SOURCES) \ $(ags_audio_connection_test_SOURCES) \ $(ags_audio_signal_test_SOURCES) $(ags_audio_test_SOURCES) \ $(ags_automation_test_SOURCES) $(ags_base_plugin_test_SOURCES) \ $(ags_channel_test_SOURCES) $(ags_complex_test_SOURCES) \ $(ags_condition_manager_test_SOURCES) \ $(ags_config_test_SOURCES) \ $(ags_connection_manager_test_SOURCES) \ $(ags_destroy_worker_test_SOURCES) $(ags_devout_test_SOURCES) \ $(ags_dssi_manager_test_SOURCES) \ $(ags_dssi_plugin_test_SOURCES) \ $(ags_file_id_ref_test_SOURCES) \ $(ags_file_launch_test_SOURCES) \ $(ags_file_lookup_test_SOURCES) $(ags_file_test_SOURCES) \ $(ags_functional_audio_test_SOURCES) \ $(ags_functional_drum_test_SOURCES) \ $(ags_functional_editor_workflow_test_SOURCES) \ $(ags_functional_ffplayer_test_SOURCES) \ $(ags_functional_line_member_add_and_destroy_test_SOURCES) \ $(ags_functional_machine_add_and_destroy_test_SOURCES) \ $(ags_functional_machine_link_test_SOURCES) \ $(ags_functional_matrix_test_SOURCES) \ $(ags_functional_mixer_test_SOURCES) \ $(ags_functional_notation_edit_test_SOURCES) \ $(ags_functional_panel_test_SOURCES) \ $(ags_functional_synth_test_SOURCES) $(ags_input_test_SOURCES) \ $(ags_ladspa_manager_test_SOURCES) $(ags_log_test_SOURCES) \ $(ags_lv2_manager_test_SOURCES) \ $(ags_lv2_option_manager_test_SOURCES) \ $(ags_lv2_plugin_test_SOURCES) $(ags_lv2_preset_test_SOURCES) \ $(ags_lv2_uri_map_manager_test_SOURCES) \ $(ags_lv2_urid_manager_test_SOURCES) \ $(ags_lv2_worker_manager_test_SOURCES) \ $(ags_lv2ui_manager_test_SOURCES) \ $(ags_lv2ui_plugin_test_SOURCES) \ $(ags_midi_buffer_util_test_SOURCES) \ $(ags_midi_builder_test_SOURCES) $(ags_midiin_test_SOURCES) \ $(ags_mutex_manager_test_SOURCES) $(ags_notation_test_SOURCES) \ $(ags_note_test_SOURCES) $(ags_output_test_SOURCES) \ $(ags_pattern_test_SOURCES) \ $(ags_playback_domain_test_SOURCES) \ $(ags_playback_test_SOURCES) $(ags_poll_fd_test_SOURCES) \ $(ags_polling_thread_test_SOURCES) $(ags_port_test_SOURCES) \ $(ags_preset_test_SOURCES) \ $(ags_recall_channel_run_test_SOURCES) \ $(ags_recall_channel_test_SOURCES) \ $(ags_recall_container_test_SOURCES) \ $(ags_recall_dependency_test_SOURCES) \ $(ags_recall_test_SOURCES) $(ags_recycling_test_SOURCES) \ $(ags_returnable_thread_test_SOURCES) $(ags_task_test_SOURCES) \ $(ags_task_thread_test_SOURCES) \ $(ags_thread_file_xml_test_SOURCES) \ $(ags_thread_pool_test_SOURCES) $(ags_thread_test_SOURCES) \ $(ags_turtle_manager_test_SOURCES) $(ags_turtle_test_SOURCES) \ $(ags_worker_thread_test_SOURCES) \ $(ags_xorg_application_context_test_SOURCES) \ $(gsequencer_SOURCES) $(midi2xml_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man1_MANS) DATA = $(appdata_DATA) $(doc_DATA) $(pkgconfig_DATA) HEADERS = $(nobase_include_HEADERS) $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope check recheck distdir dist dist-all distcheck am__extra_recursive_targets = ags-docs-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libags.pc.in \ $(srcdir)/libags_audio.pc.in $(srcdir)/libags_gui.pc.in \ $(srcdir)/libgsequencer.pc.in $(top_srcdir)/ags/config.h.in \ $(top_srcdir)/functional-tests.mk $(top_srcdir)/unit-tests.mk \ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \ compile config.guess config.rpath config.sub depcomp \ install-sh ltmain.sh missing mkinstalldirs test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ # -msse2 -O3 -ftree-vectorize -ftree-slp-vectorize -ffast-math -ftree-vectorizer-verbose=2 # what flags you want to pass to the C compiler & linker CFLAGS = @CFLAGS@ CORE_AUDIO_CFLAGS = @CORE_AUDIO_CFLAGS@ CORE_AUDIO_LIBS = @CORE_AUDIO_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ GOBJECT_LIBS = @GOBJECT_LIBS@ GREP = @GREP@ GSEQUENCER_CFLAGS = @GSEQUENCER_CFLAGS@ GSEQUENCER_FUNCTIONAL_TEST_LDADD = @GSEQUENCER_FUNCTIONAL_TEST_LDADD@ GSEQUENCER_LDFLAGS = @GSEQUENCER_LDFLAGS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@ GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ $(LTLIBINTL) LIBASOUND2_CFLAGS = @LIBASOUND2_CFLAGS@ LIBASOUND2_LIBS = @LIBASOUND2_LIBS@ LIBGSEQUENCER_TEST_LIBADD = @LIBGSEQUENCER_TEST_LIBADD@ LIBICONV = @LIBICONV@ LIBINSTPATCH_CFLAGS = @LIBINSTPATCH_CFLAGS@ LIBINSTPATCH_LIBS = @LIBINSTPATCH_LIBS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MIDI2XML_CFLAGS = @MIDI2XML_CFLAGS@ MIDI2XML_LDFLAGS = @MIDI2XML_LDFLAGS@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE_CFLAGS = @PCRE_CFLAGS@ PCRE_LIBS = @PCRE_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PULSE_CFLAGS = @PULSE_CFLAGS@ PULSE_LIBS = @PULSE_LIBS@ RANLIB = @RANLIB@ SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@ SAMPLERATE_LIBS = @SAMPLERATE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ SNDFILE_LIBS = @SNDFILE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ XMLRPC_CLIENT_CFLAGS = @XMLRPC_CLIENT_CFLAGS@ XMLRPC_CLIENT_LIBS = @XMLRPC_CLIENT_LIBS@ XMLRPC_C_CONFIG = @XMLRPC_C_CONFIG@ XMLRPC_SERVER_ABYSS_CFLAGS = @XMLRPC_SERVER_ABYSS_CFLAGS@ XMLRPC_SERVER_ABYSS_LIBS = @XMLRPC_SERVER_ABYSS_LIBS@ XMLRPC_SERVER_CGI_CFLAGS = @XMLRPC_SERVER_CGI_CFLAGS@ XMLRPC_SERVER_CGI_LIBS = @XMLRPC_SERVER_CGI_LIBS@ XMLRPC_UTIL_CFLAGS = @XMLRPC_UTIL_CFLAGS@ XMLRPC_UTIL_LIBS = @XMLRPC_UTIL_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ # # TARGETS = gsequencer localedir = $(datadir)/locale localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. AUTOMAKE_OPTIONS = foreign SUBDIRS = po ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -std=gnu99 -include /usr/include/errno.h -I$(top_srcdir) -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"$(DESTDIR)$(datadir)\" -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -DAGS_LIBRARY_SUFFIX=\".so\" -DAGS_RT_PRIORITY=99 -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security gsequencer_CFLAGS = @GSEQUENCER_CFLAGS@ $(LIBASOUND2_CFLAGS) \ $(LIBAO_CFLAGS) $(LIBXML2_CFLAGS) $(OPENSSL_CFLAGS) \ $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) \ $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) \ $(XMLRPC_SERVER_CFLAGS) $(SNDFILE_CFLAGS) $(JACK_CFLAGS) \ $(PULSE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) \ $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) \ $(GTK_CFLAGS) $(GTK_MAC_INTEGRATION_CFLAGS) gsequencer_LDFLAGS = @GSEQUENCER_LDFLAGS@ -pthread midi2xml_CFLAGS = @GSEQUENCER_CFLAGS@ -I./ -I/usr/include \ $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) $(GIO_CFLAGS) \ $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) \ $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) \ $(XMLRPC_SERVER_CFLAGS) midi2xml_LDFLAGS = @GSEQUENCER_LDFLAGS@ -ldl $(LIBXML2_LIBS) \ $(GOBJECT_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) \ $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) \ $(XMLRPC_SERVER_LIBS) # this lists the binaries to produce, the (non-PHONY, binary) targets in # the previous manual Makefile lib_LTLIBRARIES = libags.la libags_thread.la libags_server.la libags_audio.la libags_gui.la libgsequencerdir = $(libdir)/gsequencer libgsequencer_LTLIBRARIES = libgsequencer.la # pkgconfig_DATA += libgsequencer.pc # extra EXTRA_DIST = config.rpath COPYING.server COPYING.docs ags/config.h.in \ gtk-doc.make gsequencer.share acsite.m4 aclocal.m4 \ gsequencer.1 README ags_example.xml midi2xml.1 \ ags_functional_notation_edit_test.xml mkinstalldirs \ m4/Makefile.am m4/Makefile.in ags/i18n.h ags/gettext.h \ functional-system-tests.mk.am functional-system-tests.mk.in \ docs/reference/libags/libags-sections.txt \ docs/reference/libags/libags.types \ docs/reference/libags/libags.interfaces \ docs/reference/libags-audio/libags_audio-sections.txt \ docs/reference/libags-audio/libags_audio.types \ docs/reference/libags-audio/libags_audio.interfaces \ docs/reference/libags-gui/libags_gui-sections.txt \ docs/reference/libags-gui/libags_gui.types \ docs/reference/libags-gui/libags_gui.interfaces \ docs/reference/libgsequencer/libgsequencer-sections.txt \ docs/reference/libgsequencer/libgsequencer.types \ docs/reference/libgsequencer/libgsequencer.interfaces \ clean-gtk-doc.sh lv2/lv2plug.in/ns/lv2ext/lv2_programs.h \ lv2.lib/mda/EPiano-presets.ttl apple_script.sh \ gsequencer-mac-os-x.patch libags.pc.in libags_audio.pc.in \ libags_gui.pc.in libgsequencer.pc.in gsequencer.desktop.in \ libags.sym libags_thread.sym libags_server.sym \ libags_audio.sym libags_gui.sym docs/reference/libags/git.mk \ docs/reference/libags/gtk-doc.make \ docs/reference/libags/Makefile.am \ docs/reference/libags/Makefile.in \ docs/reference/libags/libags-overrides.txt \ docs/reference/libags/libags-sections.txt \ docs/reference/libags/libags.types \ docs/reference/libags/libags.xml \ docs/reference/libags-audio/git.mk \ docs/reference/libags-audio/gtk-doc.make \ docs/reference/libags-audio/Makefile.am \ docs/reference/libags-audio/Makefile.in \ docs/reference/libags-audio/libags_audio-overrides.txt \ docs/reference/libags-audio/libags_audio-sections.txt \ docs/reference/libags-audio/libags_audio.types \ docs/reference/libags-audio/libags_audio.xml \ docs/reference/libags-gui/git.mk \ docs/reference/libags-gui/gtk-doc.make \ docs/reference/libags-gui/Makefile.am \ docs/reference/libags-gui/Makefile.in \ docs/reference/libags-gui/libags_gui-overrides.txt \ docs/reference/libags-gui/libags_gui-sections.txt \ docs/reference/libags-gui/libags_gui.types \ docs/reference/libags-gui/libags_gui.xml \ docs/reference/libgsequencer/git.mk \ docs/reference/libgsequencer/gtk-doc.make \ docs/reference/libgsequencer/Makefile.am \ docs/reference/libgsequencer/Makefile.in \ docs/reference/libgsequencer/libgsequencer-overrides.txt \ docs/reference/libgsequencer/libgsequencer.xml $(manpages) \ $(userdoc) $(userdocimages) $(devdoc) $(devdocimages) \ $(devdoclistings) \ $(top_srcdir)/ags/server/security/ags_authentication.dtd \ $(top_srcdir)/ags/server/security/ags_certificate.dtd \ $(top_srcdir)/ags/server/security/ags_password_store.dtd \ $(top_srcdir)/ags/audio/midi/ags_midi_file.dtd \ $(top_srcdir)/ags/file/ags_file.dtd \ $(top_srcdir)/ags/X/file/ags_simple_file.dtd \ $(top_srcdir)/ags.xsl $(top_srcdir)/ags-simple.xsl \ $(top_srcdir)/ags/object/ags_marshallers.list man1_MANS = gsequencer.1 midi2xml.1 # clean CLEANFILES = functional-system-tests.mk m4/Makefile $(appdata_DATA) \ $(pkgconfig_DATA) # pkg-config pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libags.pc libags_audio.pc libags_gui.pc # EXTRA_DIST += libgsequencer.pc.in # desktop file appdatadir = $(datadir)/applications appdata_DATA = gsequencer.desktop # EXTRA_DIST += docs/reference/libgsequencer # include otherincludedir = $(includedir)/ags nobase_include_HEADERS = $(libags_la_HEADERS_0) $(libags_thread_la_HEADERS_0) $(libags_server_la_HEADERS_0) $(libags_audio_la_HEADERS_0) $(libags_gui_la_HEADERS_0) # nobase_include_HEADERS += $(libgsequencer_la_HEADERS_0) # doc # docdir = $(datadir)/doc/gsequencer doc_DATA = README ags_example.xml # documentation manpages = \ gsequencer.1.xml \ midi2xml.1.xml userdoc = \ docs/usersBook.xml \ docs/appa.xml \ docs/usersBook/appb.xml \ docs/usersBook/chap1.xml \ docs/usersBook/chap2.xml \ docs/usersBook/chap3.xml \ docs/usersBook/chap4.xml \ docs/usersBook/chap5.xml \ docs/usersBook/preface.xml devdoc = \ docs/developersBook.xml \ docs/developersBook/preface.xml \ docs/developersBook/chap1.xml \ docs/developersBook/chap2.xml \ docs/developersBook/chap3.xml \ docs/developersBook/chap4.xml \ docs/developersBook/chap5.xml \ docs/developersBook/chap6.xml \ docs/developersBook/chap7.xml \ docs/developersBook/chap8.xml \ docs/developersBook/chap9.xml \ docs/developersBook/chap10.xml \ docs/developersBook/chap11.xml \ docs/developersBook/chap12.xml \ docs/developersBook/appb.xml devdoclistings = \ docs/listings/add_pattern.c \ docs/listings/application_mutex.c \ docs/listings/audio_application_context.c \ docs/listings/audio.c \ docs/listings/complete_example.c \ docs/listings/config.c \ docs/listings/effects_echo_audio.c \ docs/listings/effects_echo_audio_run.c \ docs/listings/effects_echo_channel.c \ docs/listings/effects_echo_channel_run.c \ docs/listings/effects_recall_container.c \ docs/listings/file_property.c \ docs/listings/file_read.c \ docs/listings/file_write.c \ docs/listings/linking_prerequisites.c \ docs/listings/linking_safe.c \ docs/listings/linking_unsafe.c \ docs/listings/pcm_info.c \ docs/listings/pull_thread.c \ docs/listings/recycling.c \ docs/listings/start_thread.c \ docs/listings/thread_application_context.c devdocimages = \ $(top_srcdir)/docs/images/AGS_iterator.png \ $(top_srcdir)/docs/images/AGS_recall_lifecycle.png \ $(top_srcdir)/docs/images/AGS_super-threaded.png \ $(top_srcdir)/docs/images/AGS_linking.png userdocimages = \ $(top_srcdir)/docs/images/ags-automation-toolbar.png \ $(top_srcdir)/docs/images/ags_automation_window_drum.png \ $(top_srcdir)/docs/images/ags_export_window.png \ $(top_srcdir)/docs/images/ags_machine_properties-input.png \ $(top_srcdir)/docs/images/ags_machine_properties-resize_channels.png \ $(top_srcdir)/docs/images/ags_navigation.png \ $(top_srcdir)/docs/images/ags_synth.png \ $(top_srcdir)/docs/images/ags_syncsynth.png \ $(top_srcdir)/docs/images/ags_audio_preferences.png \ $(top_srcdir)/docs/images/ags_audio_connection_output_bulk.png \ $(top_srcdir)/docs/images/ags_audio_connection_output_line.png \ $(top_srcdir)/docs/images/ags_midi_dialog.png \ $(top_srcdir)/docs/images/ags_midi_export_wizard_no1.png \ $(top_srcdir)/docs/images/ags_midi_export_wizard_no2.png \ $(top_srcdir)/docs/images/ags_midi_import_wizard_no1.png \ $(top_srcdir)/docs/images/ags_midi_import_wizard_no2.png \ $(top_srcdir)/docs/images/ags_midi_preferences.png \ $(top_srcdir)/docs/images/ags_ffplayer.png \ $(top_srcdir)/docs/images/ags_ladspa_browser.png \ $(top_srcdir)/docs/images/ags_machine_properties-link_input.png \ $(top_srcdir)/docs/images/ags_matrix.png \ $(top_srcdir)/docs/images/ags_panel.png \ $(top_srcdir)/docs/images/ags-toolbar.png \ $(top_srcdir)/docs/images/ags_drum.png \ $(top_srcdir)/docs/images/ags_generic_preferences.png \ $(top_srcdir)/docs/images/ags_machine_properties-output.png \ $(top_srcdir)/docs/images/ags_mixer.png \ $(top_srcdir)/docs/images/ags_performance_preferences.png \ $(top_srcdir)/docs/images/ags_server_preferences.png \ $(top_srcdir)/docs/images/ags_machine_envelope_editor.png \ $(top_srcdir)/docs/images/ags_machine_envelope_info.png \ $(top_srcdir)/docs/images/ags_machine_envelope_pattern.png \ $(top_srcdir)/docs/images/ags_move_notes_dialog.png \ $(top_srcdir)/docs/images/ags_crop_notes_dialog.png \ $(top_srcdir)/docs/images/ags_position_notation_cursor_dialog.png \ $(top_srcdir)/docs/images/ags_position_automation_cursor_dialog.png \ $(top_srcdir)/docs/images/ags_select_notes_dialog.png \ $(top_srcdir)/docs/images/ags_select_accelerations_dialog.png \ $(top_srcdir)/docs/images/ags_ramp_accelerations_dialog.png # libraries and gsequencer libags_la_SOURCES = $(libags_c_sources) $(libags_util_c_sources) $(libags_object_c_sources) $(libags_file_c_sources) $(libags_file_task_c_sources) libags_la_HEADERS_0 = ags/libags.h $(libags_h_sources) $(libags_util_h_sources) $(libags_object_h_sources) $(libags_file_h_sources) $(libags_file_task_h_sources) libags_thread_la_SOURCES = $(libags_thread_c_sources) $(libags_thread_file_c_sources) $(libags_thread_task_c_sources) libags_thread_la_HEADERS_0 = $(libags_thread_h_sources) $(libags_thread_file_h_sources) $(libags_thread_task_h_sources) libags_server_la_SOURCES = $(libags_server_c_sources) $(libags_server_security_c_sources) $(libags_server_controller_c_sources) $(libags_server_thread_c_sources) libags_server_la_HEADERS_0 = $(libags_server_h_sources) $(libags_server_security_h_sources) $(libags_server_controller_h_sources) $(libags_server_thread_h_sources) libags_audio_la_SOURCES = $(libags_audio_c_sources) $(libags_audio_client_c_sources) $(libags_audio_thread_c_sources) $(libags_audio_file_c_sources) $(libags_audio_midi_c_sources) $(libags_audio_jack_c_sources) $(libags_audio_pulse_c_sources) $(libags_audio_core_audio_c_sources) $(libags_audio_task_c_sources) $(libags_audio_task_recall_c_sources) $(libags_audio_recall_c_sources) $(libags_plugin_c_sources) libags_audio_la_HEADERS_0 = ags/libags-audio.h $(libags_audio_h_sources) $(libags_audio_client_h_sources) $(libags_audio_thread_h_sources) $(libags_audio_file_h_sources) $(libags_audio_midi_h_sources) $(libags_audio_jack_h_sources) $(libags_audio_pulse_h_sources) $(libags_audio_core_audio_h_sources) $(libags_audio_task_h_sources) $(libags_audio_task_recall_h_sources) $(libags_audio_recall_h_sources) $(libags_plugin_h_sources) libags_gui_la_SOURCES = $(libags_gui_c_sources) libags_gui_la_HEADERS_0 = ags/libags-gui.h $(libags_gui_h_sources) libgsequencer_la_HEADERS_0 = $(libgsequencer_h_sources) $(libgsequencer_file_h_sources) $(libgsequencer_thread_h_sources) $(libgsequencer_task_h_sources) $(libgsequencer_import_h_sources) $(libgsequencer_export_h_sources) $(libgsequencer_machine_h_sources) $(libgsequencer_editor_h_sources) libgsequencer_la_SOURCES = $(libgsequencer_la_HEADERS_0) $(libgsequencer_c_sources) $(libgsequencer_file_c_sources) $(libgsequencer_thread_c_sources) $(libgsequencer_task_c_sources) $(libgsequencer_import_c_sources) $(libgsequencer_export_c_sources) $(libgsequencer_machine_c_sources) $(libgsequencer_editor_c_sources) # library libags libags_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(UUID_CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) $(GIO_CFLAGS) libags_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags.sym -version-info 1:0:0 -shared -fPIC -Wl,-soname,libags.so -pthread libags_la_LIBADD = -ldl -lm $(UUID_LIBS) $(LIBXML2_LIBS) $(GOBJECT_LIBS) $(GIO_LIBS) # library libags-thread libags_thread_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) libags_thread_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_thread.sym -version-info 1:0:0 -shared -fPIC -Wl,-soname,libags_thread.so -pthread libags_thread_la_LIBADD = libags.la -ldl -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # library libags-server libags_server_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) libags_server_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_server.sym -version-info 1:0:0 -shared -fPIC -Wl,-soname,libags_server.so -pthread libags_server_la_LIBADD = libags_thread.la libags.la -ldl -lm -lcrypt $(LIBXML2_LIBS) $(GOBJECT_LIBS) # library libags-audio libags_audio_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(CORE_AUDIO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SAMPLERATE_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(PULSE_CFLAGS) libags_audio_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_audio.sym -version-info 1:0:0 -shared -fPIC -soname,libags_audio.so -pthread libags_audio_la_LIBADD = libags_server.la libags_thread.la libags.la -ldl -lm $(CORE_AUDIO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SAMPLERATE_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(PULSE_LIBS) # library libags-gui libags_gui_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(GOBJECT_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) libags_gui_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_gui.sym -version-info 1:0:0 -shared -fPIC -Wl,-soname,libags_gui.so -pthread libags_gui_la_LIBADD = -ldl -lm $(GOBJECT_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) # library libgsequencer libgsequencer_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(CORE_AUDIO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(JACK_CFLAGS) $(PULSE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) $(GTK_MAC_INTEGRATION_CFLAGS) libgsequencer_la_LDFLAGS = $(LDFLAGS) -version-info 0:1:0 -shared -fPIC -Wl,-soname,libgsequencer.so -pthread libgsequencer_la_LIBADD = libags_audio.la libags_server.la libags_gui.la libags_thread.la libags.la -ldl -lm $(CORE_AUDIO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(JACK_LIBS) $(PULSE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) $(GTK_MAC_INTEGRATION_LIBS) # gsequencer gsequencer_SOURCES = $(gsequencer_c_sources) $(gsequencerheaders) gsequencer_LDADD = libgsequencer.la libags_audio.la libags_server.la libags_gui.la libags_thread.la libags.la -ldl -lm $(RT_LIBS) $(X11_LIBS) $(CORE_AUDIO_CFLAGS) $(LIBASOUND2_LIBS) $(LIBAO_LIBS) $(LIBXML2_LIBS) $(OPENSSL_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) $(XMLRPC_SERVER_LIBS) $(SNDFILE_LIBS) $(JACK_LIBS) $(PULSE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) $(GTK_MAC_INTEGRATION_LIBS) # application context unit test ags_application_context_test_SOURCES = ags/test/object/ags_application_context_test.c ags_application_context_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_application_context_test_LDFLAGS = -pthread $(LDFLAGS) ags_application_context_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # config unit test ags_config_test_SOURCES = ags/test/object/ags_config_test.c ags_config_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_config_test_LDFLAGS = -pthread $(LDFLAGS) ags_config_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # connection manager unit test ags_connection_manager_test_SOURCES = ags/test/object/ags_connection_manager_test.c ags_connection_manager_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_connection_manager_test_LDFLAGS = -pthread $(LDFLAGS) ags_connection_manager_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # condition manager unit test ags_condition_manager_test_SOURCES = ags/test/thread/ags_condition_manager_test.c ags_condition_manager_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_condition_manager_test_LDFLAGS = -pthread $(LDFLAGS) ags_condition_manager_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # destroy worker unit test ags_destroy_worker_test_SOURCES = ags/test/thread/ags_destroy_worker_test.c ags_destroy_worker_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_destroy_worker_test_LDFLAGS = -pthread $(LDFLAGS) ags_destroy_worker_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # mutex manager unit test ags_mutex_manager_test_SOURCES = ags/test/thread/ags_mutex_manager_test.c ags_mutex_manager_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_mutex_manager_test_LDFLAGS = -pthread $(LDFLAGS) ags_mutex_manager_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # poll fd unit test ags_poll_fd_test_SOURCES = ags/test/thread/ags_poll_fd_test.c ags_poll_fd_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_poll_fd_test_LDFLAGS = -pthread $(LDFLAGS) ags_poll_fd_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # polling thread unit test ags_polling_thread_test_SOURCES = ags/test/thread/ags_polling_thread_test.c ags_polling_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_polling_thread_test_LDFLAGS = -pthread $(LDFLAGS) ags_polling_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # returnable thread unit test ags_returnable_thread_test_SOURCES = ags/test/thread/ags_returnable_thread_test.c ags_returnable_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_returnable_thread_test_LDFLAGS = -pthread $(LDFLAGS) ags_returnable_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # task unit test ags_task_test_SOURCES = ags/test/thread/ags_task_test.c ags_task_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_task_test_LDFLAGS = -lcunit -lm -pthread -lrt $(LDFLAGS) $(LIBXML2_LIBS) $(GOBJECT_LIBS) ags_task_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # task thread unit test ags_task_thread_test_SOURCES = ags/test/thread/ags_task_thread_test.c ags_task_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_task_thread_test_LDFLAGS = -pthread $(LDFLAGS) ags_task_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # thread unit test ags_thread_test_SOURCES = ags/test/thread/ags_thread_test.c ags_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_thread_test_LDFLAGS = -lcunit -lm -pthread -lrt $(LDFLAGS) $(LIBXML2_LIBS) $(GOBJECT_LIBS) ags_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # thread pool unit test ags_thread_pool_test_SOURCES = ags/test/thread/ags_thread_pool_test.c ags_thread_pool_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_thread_pool_test_LDFLAGS = -pthread $(LDFLAGS) ags_thread_pool_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # worker thread unit test ags_worker_thread_test_SOURCES = ags/test/thread/ags_worker_thread_test.c ags_worker_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_worker_thread_test_LDFLAGS = -pthread $(LDFLAGS) ags_worker_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # thread file xml unit test ags_thread_file_xml_test_SOURCES = ags/test/thread/file/ags_thread_file_xml_test.c ags_thread_file_xml_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_thread_file_xml_test_LDFLAGS = -pthread $(LDFLAGS) ags_thread_file_xml_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # file unit test ags_file_test_SOURCES = ags/test/file/ags_file_test.c ags_file_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_file_test_LDFLAGS = -pthread $(LDFLAGS) ags_file_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # file id ref unit test ags_file_id_ref_test_SOURCES = ags/test/file/ags_file_id_ref_test.c ags_file_id_ref_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_file_id_ref_test_LDFLAGS = -pthread $(LDFLAGS) ags_file_id_ref_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # file launch unit test ags_file_launch_test_SOURCES = ags/test/file/ags_file_launch_test.c ags_file_launch_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_file_launch_test_LDFLAGS = -pthread $(LDFLAGS) ags_file_launch_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # file lookup unit test ags_file_lookup_test_SOURCES = ags/test/file/ags_file_lookup_test.c ags_file_lookup_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_file_lookup_test_LDFLAGS = -pthread $(LDFLAGS) ags_file_lookup_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # complex unit test ags_complex_test_SOURCES = ags/test/lib/ags_complex_test.c ags_complex_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_complex_test_LDFLAGS = -pthread $(LDFLAGS) ags_complex_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # log unit test ags_log_test_SOURCES = ags/test/lib/ags_log_test.c ags_log_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_log_test_LDFLAGS = -pthread $(LDFLAGS) ags_log_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # turtle unit test ags_turtle_test_SOURCES = ags/test/lib/ags_turtle_test.c ags_turtle_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_turtle_test_LDFLAGS = -pthread $(LDFLAGS) ags_turtle_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # turtle manager unit test ags_turtle_manager_test_SOURCES = ags/test/lib/ags_turtle_manager_test.c ags_turtle_manager_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_turtle_manager_test_LDFLAGS = -pthread $(LDFLAGS) ags_turtle_manager_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # base plugin unit test ags_base_plugin_test_SOURCES = ags/test/plugin/ags_base_plugin_test.c ags_base_plugin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_base_plugin_test_LDFLAGS = $(LDFLAGS) -pthread ags_base_plugin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # dssi manager unit test ags_dssi_manager_test_SOURCES = ags/test/plugin/ags_dssi_manager_test.c ags_dssi_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_dssi_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_dssi_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # dssi plugin unit test ags_dssi_plugin_test_SOURCES = ags/test/plugin/ags_dssi_plugin_test.c ags_dssi_plugin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_dssi_plugin_test_LDFLAGS = $(LDFLAGS) -pthread ags_dssi_plugin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # ladspa manager unit test ags_ladspa_manager_test_SOURCES = ags/test/plugin/ags_ladspa_manager_test.c ags_ladspa_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_ladspa_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_ladspa_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 manager unit test ags_lv2_manager_test_SOURCES = ags/test/plugin/ags_lv2_manager_test.c ags_lv2_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 option manager unit test ags_lv2_option_manager_test_SOURCES = ags/test/plugin/ags_lv2_option_manager_test.c ags_lv2_option_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_option_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_option_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 plugin unit test ags_lv2_plugin_test_SOURCES = ags/test/plugin/ags_lv2_plugin_test.c ags_lv2_plugin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_plugin_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_plugin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 preset unit test ags_lv2_preset_test_SOURCES = ags/test/plugin/ags_lv2_preset_test.c ags_lv2_preset_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_preset_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_preset_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 uri map manager unit test ags_lv2_uri_map_manager_test_SOURCES = ags/test/plugin/ags_lv2_uri_map_manager_test.c ags_lv2_uri_map_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_uri_map_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_uri_map_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 urid manager unit test ags_lv2_urid_manager_test_SOURCES = ags/test/plugin/ags_lv2_urid_manager_test.c ags_lv2_urid_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_urid_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_urid_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 worker manager unit test ags_lv2_worker_manager_test_SOURCES = ags/test/plugin/ags_lv2_worker_manager_test.c ags_lv2_worker_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_worker_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_worker_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2ui manager unit test ags_lv2ui_manager_test_SOURCES = ags/test/plugin/ags_lv2ui_manager_test.c ags_lv2ui_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2ui_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2ui_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2ui plugin unit test ags_lv2ui_plugin_test_SOURCES = ags/test/plugin/ags_lv2ui_plugin_test.c ags_lv2ui_plugin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2ui_plugin_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2ui_plugin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # audio application context unit test ags_audio_application_context_test_SOURCES = ags/test/audio/ags_audio_application_context_test.c ags_audio_application_context_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_audio_application_context_test_LDFLAGS = $(LDFLAGS) -pthread ags_audio_application_context_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # devout unit test ags_devout_test_SOURCES = ags/test/audio/ags_devout_test.c ags_devout_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_devout_test_LDFLAGS = -pthread $(LDFLAGS) ags_devout_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # midiin unit test ags_midiin_test_SOURCES = ags/test/audio/ags_midiin_test.c ags_midiin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_midiin_test_LDFLAGS = -pthread $(LDFLAGS) ags_midiin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # audio unit test ags_audio_test_SOURCES = ags/test/audio/ags_audio_test.c ags_audio_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_audio_test_LDFLAGS = -pthread $(LDFLAGS) ags_audio_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # audio connection unit test ags_audio_connection_test_SOURCES = ags/test/audio/ags_audio_connection_test.c ags_audio_connection_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_audio_connection_test_LDFLAGS = -pthread $(LDFLAGS) ags_audio_connection_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # playback domain unit test ags_playback_domain_test_SOURCES = ags/test/audio/ags_playback_domain_test.c ags_playback_domain_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_playback_domain_test_LDFLAGS = -pthread $(LDFLAGS) ags_playback_domain_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # playback unit test ags_playback_test_SOURCES = ags/test/audio/ags_playback_test.c ags_playback_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_playback_test_LDFLAGS = -pthread $(LDFLAGS) ags_playback_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # preset unit test ags_preset_test_SOURCES = ags/test/audio/ags_preset_test.c ags_preset_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_preset_test_LDFLAGS = -pthread $(LDFLAGS) ags_preset_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # channel unit test ags_channel_test_SOURCES = ags/test/audio/ags_channel_test.c ags_channel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_channel_test_LDFLAGS = -pthread $(LDFLAGS) ags_channel_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # input unit test ags_input_test_SOURCES = ags/test/audio/ags_input_test.c ags_input_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_input_test_LDFLAGS = -pthread $(LDFLAGS) ags_input_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # output unit test ags_output_test_SOURCES = ags/test/audio/ags_output_test.c ags_output_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_output_test_LDFLAGS = -pthread $(LDFLAGS) ags_output_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recycling unit test ags_recycling_test_SOURCES = ags/test/audio/ags_recycling_test.c ags_recycling_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recycling_test_LDFLAGS = -pthread $(LDFLAGS) ags_recycling_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # audio signal unit test ags_audio_signal_test_SOURCES = ags/test/audio/ags_audio_signal_test.c ags_audio_signal_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_audio_signal_test_LDFLAGS = -pthread $(LDFLAGS) ags_audio_signal_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall unit test ags_recall_test_SOURCES = ags/test/audio/ags_recall_test.c ags_recall_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall channel unit test ags_recall_channel_test_SOURCES = ags/test/audio/ags_recall_channel_test.c ags_recall_channel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_channel_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_channel_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall channel run unit test ags_recall_channel_run_test_SOURCES = ags/test/audio/ags_recall_channel_run_test.c ags_recall_channel_run_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_channel_run_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_channel_run_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall container unit test ags_recall_container_test_SOURCES = ags/test/audio/ags_recall_container_test.c ags_recall_container_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_container_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_container_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall dependency unit test ags_recall_dependency_test_SOURCES = ags/test/audio/ags_recall_dependency_test.c ags_recall_dependency_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_dependency_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_dependency_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # port unit test ags_port_test_SOURCES = ags/test/audio/ags_port_test.c ags_port_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_port_test_LDFLAGS = -pthread $(LDFLAGS) ags_port_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # pattern unit test ags_pattern_test_SOURCES = ags/test/audio/ags_pattern_test.c ags_pattern_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_pattern_test_LDFLAGS = -pthread $(LDFLAGS) ags_pattern_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # notation unit test ags_notation_test_SOURCES = ags/test/audio/ags_notation_test.c ags_notation_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_notation_test_LDFLAGS = -pthread $(LDFLAGS) ags_notation_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # note unit test ags_note_test_SOURCES = ags/test/audio/ags_note_test.c ags_note_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_note_test_LDFLAGS = -pthread $(LDFLAGS) ags_note_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # automation unit test ags_automation_test_SOURCES = ags/test/audio/ags_automation_test.c ags_automation_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_automation_test_LDFLAGS = -pthread $(LDFLAGS) ags_automation_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # acceleration unit test ags_acceleration_test_SOURCES = ags/test/audio/ags_acceleration_test.c ags_acceleration_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_acceleration_test_LDFLAGS = -pthread $(LDFLAGS) ags_acceleration_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # midi buffer util unit test ags_midi_buffer_util_test_SOURCES = ags/test/audio/midi/ags_midi_buffer_util_test.c ags_midi_buffer_util_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_midi_buffer_util_test_LDFLAGS = -pthread $(LDFLAGS) ags_midi_buffer_util_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # midi builder unit test ags_midi_builder_test_SOURCES = ags/test/audio/midi/ags_midi_builder_test.c ags_midi_builder_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_midi_builder_test_LDFLAGS = -pthread $(LDFLAGS) ags_midi_builder_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # xorg application context unit test ags_xorg_application_context_test_SOURCES = ags/test/X/ags_xorg_application_context_test.c ags_xorg_application_context_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_xorg_application_context_test_LDFLAGS = -pthread $(LDFLAGS) ags_xorg_application_context_test_LDADD = libgsequencer.la libags_gui.la libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) # libadd and ldadd libgsequencer_test_LIBADD = @LIBGSEQUENCER_TEST_LIBADD@ \ libgsequencer.la libags_gui.la libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) \ $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) \ $(GOBJECT_LIBS) $(JACK_LIBS) $(FONTCONFIG_LIBS) \ $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) gsequencer_functional_test_LDADD = @GSEQUENCER_FUNCTIONAL_TEST_LDADD@ \ libgsequencer.la libags_gui.la libags_audio.la \ libags_server.la libags_thread.la libags.la libags_thread.la \ libgsequencer_test.la -lcunit -lrt -lm $(LIBAO_LIBS) \ $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) \ $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) \ $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) check_LTLIBRARIES = libgsequencer_test.la # functional test util library libgsequencer_test_la_SOURCES = ags/test/X/gsequencer_setup_util.c ags/test/X/gsequencer_setup_util.h ags/test/X/ags_functional_test_util.c ags/test/X/ags_functional_test_util.h ags/test/X/libgsequencer.h libgsequencer_test_la_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) libgsequencer_test_la_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" libgsequencer_test_la_LDFLAGS = -pthread $(LDFLAGS) libgsequencer_test_la_LIBADD = $(libgsequencer_test_LIBADD) # functional audio test ags_functional_audio_test_SOURCES = ags/test/audio/ags_functional_audio_test.c ags_functional_audio_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_functional_audio_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_audio_test_LDADD = $(gsequencer_functional_test_LDADD) # functional machine add and destroy test ags_functional_machine_add_and_destroy_test_SOURCES = ags/test/X/ags_functional_machine_add_and_destroy_test.c ags_functional_machine_add_and_destroy_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_machine_add_and_destroy_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_machine_add_and_destroy_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_machine_add_and_destroy_test_LDADD = $(gsequencer_functional_test_LDADD) # functional machine link test ags_functional_machine_link_test_SOURCES = ags/test/X/ags_functional_machine_link_test.c ags_functional_machine_link_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_machine_link_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_machine_link_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_machine_link_test_LDADD = $(gsequencer_functional_test_LDADD) # functional line member add and destroy test ags_functional_line_member_add_and_destroy_test_SOURCES = ags/test/X/ags_functional_line_member_add_and_destroy_test.c ags_functional_line_member_add_and_destroy_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_line_member_add_and_destroy_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_line_member_add_and_destroy_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_line_member_add_and_destroy_test_LDADD = $(gsequencer_functional_test_LDADD) # functional editor workflow test ags_functional_editor_workflow_test_SOURCES = ags/test/X/ags_functional_editor_workflow_test.c ags_functional_editor_workflow_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_editor_workflow_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_editor_workflow_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_editor_workflow_test_LDADD = $(gsequencer_functional_test_LDADD) # functional panel test ags_functional_panel_test_SOURCES = ags/test/X/machine/ags_functional_panel_test.c ags_functional_panel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_panel_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_panel_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_panel_test_LDADD = $(gsequencer_functional_test_LDADD) # functional mixer test ags_functional_mixer_test_SOURCES = ags/test/X/machine/ags_functional_mixer_test.c ags_functional_mixer_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_mixer_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_mixer_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_mixer_test_LDADD = $(gsequencer_functional_test_LDADD) # functional drum test ags_functional_drum_test_SOURCES = ags/test/X/machine/ags_functional_drum_test.c ags_functional_drum_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_drum_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_drum_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_drum_test_LDADD = $(gsequencer_functional_test_LDADD) # functional matrix test ags_functional_matrix_test_SOURCES = ags/test/X/machine/ags_functional_matrix_test.c ags_functional_matrix_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_matrix_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_matrix_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_matrix_test_LDADD = $(gsequencer_functional_test_LDADD) # functional synth test ags_functional_synth_test_SOURCES = ags/test/X/machine/ags_functional_synth_test.c ags_functional_synth_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_synth_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_synth_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_synth_test_LDADD = $(gsequencer_functional_test_LDADD) # functional ffplayer test ags_functional_ffplayer_test_SOURCES = ags/test/X/machine/ags_functional_ffplayer_test.c ags_functional_ffplayer_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_ffplayer_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_ffplayer_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_ffplayer_test_LDADD = $(gsequencer_functional_test_LDADD) # functional note edit test ags_functional_notation_edit_test_SOURCES = ags/test/X/ags_functional_notation_edit_test.c ags_functional_notation_edit_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_notation_edit_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_notation_edit_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_notation_edit_test_LDADD = $(gsequencer_functional_test_LDADD) TESTS = $(check_PROGRAMS) # internationalization noinst_HEADERS = ags/i18n.h # libags all files deprecated_libags_h_sources = libags_h_sources = \ $(deprecated_libags_h_sources) \ ags/lib/ags_buffer_util.h \ ags/lib/ags_complex.h \ ags/lib/ags_conversion.h \ ags/lib/ags_endian.h \ ags/lib/ags_function.h \ ags/lib/ags_log.h \ ags/lib/ags_parameter.h \ ags/lib/ags_regex.h \ ags/lib/ags_string_util.h \ ags/lib/ags_time.h \ ags/lib/ags_turtle.h \ ags/lib/ags_turtle_manager.h deprecated_libags_c_sources = libags_c_sources = \ $(deprecated_libags_c_sources) \ ags/lib/ags_buffer_util.c \ ags/lib/ags_complex.c \ ags/lib/ags_conversion.c \ ags/lib/ags_endian.c \ ags/lib/ags_function.c \ ags/lib/ags_log.c \ ags/lib/ags_parameter.c \ ags/lib/ags_regex.c \ ags/lib/ags_string_util.c \ ags/lib/ags_time.c \ ags/lib/ags_turtle.c \ ags/lib/ags_turtle_manager.c deprecated_libags_util_h_sources = # libags - util libags_util_h_sources = \ $(deprecated_libags_util_h_sources) \ ags/util/ags_destroy_util.h \ ags/util/ags_id_generator.h \ ags/util/ags_list_util.h deprecated_libags_util_c_sources = libags_util_c_sources = \ $(deprecated_libags_util_c_sources) \ ags/util/ags_destroy_util.c \ ags/util/ags_id_generator.c \ ags/util/ags_list_util.c deprecated_libags_object_h_sources = # libags - object libags_object_h_sources = \ $(deprecated_libags_object_h_sources) \ ags/object/ags_applicable.h \ ags/object/ags_application_context.h \ ags/object/ags_async_queue.h \ ags/object/ags_config.h \ ags/object/ags_connectable.h \ ags/object/ags_connection.h \ ags/object/ags_connection_manager.h \ ags/object/ags_countable.h \ ags/object/ags_concurrent_tree.h \ ags/object/ags_distributed_manager.h \ ags/object/ags_dynamic_connectable.h \ ags/object/ags_macros.h \ ags/object/ags_main_loop.h \ ags/object/ags_marshal.h \ ags/object/ags_mutable.h \ ags/object/ags_packable.h \ ags/object/ags_plugin.h \ ags/object/ags_portlet.h \ ags/object/ags_seekable.h \ ags/object/ags_sequencer.h \ ags/object/ags_soundcard.h \ ags/object/ags_tactable.h \ ags/object/ags_tree_iterator.h deprecated_libags_object_c_sources = libags_object_c_sources = \ $(deprecated_libags_object_c_sources) \ ags/object/ags_applicable.c \ ags/object/ags_application_context.c \ ags/object/ags_async_queue.c \ ags/object/ags_config.c \ ags/object/ags_connectable.c \ ags/object/ags_connection.c \ ags/object/ags_connection_manager.c \ ags/object/ags_countable.c \ ags/object/ags_concurrent_tree.c \ ags/object/ags_distributed_manager.c \ ags/object/ags_dynamic_connectable.c \ ags/object/ags_main_loop.c \ ags/object/ags_marshal.c \ ags/object/ags_mutable.c \ ags/object/ags_packable.c \ ags/object/ags_plugin.c \ ags/object/ags_portlet.c \ ags/object/ags_seekable.c \ ags/object/ags_sequencer.c \ ags/object/ags_soundcard.c \ ags/object/ags_tactable.c \ ags/object/ags_tree_iterator.c deprecated_libags_file_h_sources = # libags - file libags_file_h_sources = \ $(deprecated_libags_file_h_sources) \ ags/file/ags_file.h \ ags/file/ags_file_id_ref.h \ ags/file/ags_file_launch.h \ ags/file/ags_file_link.h \ ags/file/ags_file_lookup.h \ ags/file/ags_file_stock.h \ ags/file/ags_file_util.h \ ags/file/ags_xml_serialization_factory.h deprecated_libags_file_c_sources = libags_file_c_sources = \ $(deprecated_libags_file_c_sources) \ ags/file/ags_file.c \ ags/file/ags_file_id_ref.c \ ags/file/ags_file_launch.c \ ags/file/ags_file_link.c \ ags/file/ags_file_lookup.c \ ags/file/ags_file_util.c \ ags/file/ags_xml_serialization_factory.c # libags-thread all files deprecated_libags_thread_h_sources = libags_thread_h_sources = \ $(deprecated_libags_thread_h_sources) \ ags/thread/ags_autosave_thread.h \ ags/thread/ags_concurrency_provider.h \ ags/thread/ags_condition_manager.h \ ags/thread/ags_destroy_worker.h \ ags/thread/ags_generic_main_loop.h \ ags/thread/ags_history.h \ ags/thread/ags_message_delivery.h \ ags/thread/ags_message_queue.h \ ags/thread/ags_mutex_manager.h \ ags/thread/ags_poll_fd.h \ ags/thread/ags_polling_thread.h \ ags/thread/ags_returnable_thread.h \ ags/thread/ags_single_thread.h \ ags/thread/ags_task_completion.h \ ags/thread/ags_task.h \ ags/thread/ags_task_thread.h \ ags/thread/ags_thread_application_context.h \ ags/thread/ags_thread_pool.h \ ags/thread/ags_thread-posix.h \ ags/thread/ags_timestamp_factory.h \ ags/thread/ags_timestamp_thread.h \ ags/thread/ags_timestamp.h \ ags/thread/ags_worker_thread.h deprecated_libags_thread_c_sources = libags_thread_c_sources = \ $(deprecated_libags_thread_c_sources) \ ags/thread/ags_autosave_thread.c \ ags/thread/ags_concurrency_provider.c \ ags/thread/ags_condition_manager.c \ ags/thread/ags_destroy_worker.c \ ags/thread/ags_generic_main_loop.c \ ags/thread/ags_history.c \ ags/thread/ags_message_delivery.c \ ags/thread/ags_message_queue.c \ ags/thread/ags_mutex_manager.c \ ags/thread/ags_poll_fd.c \ ags/thread/ags_polling_thread.c \ ags/thread/ags_returnable_thread.c \ ags/thread/ags_single_thread.c \ ags/thread/ags_task_completion.c \ ags/thread/ags_task.c \ ags/thread/ags_task_thread.c \ ags/thread/ags_thread_application_context.c \ ags/thread/ags_thread_pool.c \ ags/thread/ags_thread-posix.c \ ags/thread/ags_timestamp_factory.c \ ags/thread/ags_timestamp_thread.c \ ags/thread/ags_timestamp.c \ ags/thread/ags_worker_thread.c # libags-thread - file deprecated_libags_thread_file_h_sources = libags_thread_file_h_sources = \ $(deprecated_libags_thread_file_h_sources) \ ags/thread/file/ags_thread_file_xml.h \ ags/thread/file/ags_thread_xml_serialization_factory.h deprecated_libags_thread_file_c_sources = libags_thread_file_c_sources = \ $(deprecated_libags_thread_file_c_sources) \ ags/thread/file/ags_thread_file_xml.c \ ags/thread/file/ags_thread_xml_serialization_factory.c # libags-server all files deprecated_libags_server_h_sources = libags_server_h_sources = \ $(deprecated_libags_server_h_sources) \ ags/server/ags_registry.h \ ags/server/ags_server.h \ ags/server/ags_server_application_context.h \ ags/server/ags_server_status.h \ ags/server/ags_service_provider.h deprecated_libags_server_c_sources = libags_server_c_sources = \ $(deprecated_libags_server_c_sources) \ ags/server/ags_registry.c \ ags/server/ags_server.c \ ags/server/ags_server_application_context.c \ ags/server/ags_server_status.c \ ags/server/ags_service_provider.c # libags-server - security deprecated_libags_server_security_h_sources = libags_server_security_h_sources = \ $(deprecated_libags_server_security_h_sources) \ ags/server/security/ags_authentication.h \ ags/server/security/ags_authentication_manager.h \ ags/server/security/ags_business_group.h \ ags/server/security/ags_certificate.h \ ags/server/security/ags_certificate_manager.h \ ags/server/security/ags_password_store.h \ ags/server/security/ags_password_store_manager.h \ ags/server/security/ags_security_context.h \ ags/server/security/ags_xml_authentication.h \ ags/server/security/ags_xml_certificate.h \ ags/server/security/ags_xml_password_store.h deprecated_libags_server_security_c_sources = libags_server_security_c_sources = \ $(deprecated_libags_server_security_c_sources) \ ags/server/security/ags_authentication.c \ ags/server/security/ags_authentication_manager.c \ ags/server/security/ags_business_group.c \ ags/server/security/ags_certificate.c \ ags/server/security/ags_certificate_manager.c \ ags/server/security/ags_password_store.c \ ags/server/security/ags_password_store_manager.c \ ags/server/security/ags_security_context.c \ ags/server/security/ags_xml_authentication.c \ ags/server/security/ags_xml_certificate.c \ ags/server/security/ags_xml_password_store.c # libags-server - controller deprecated_libags_server_controller_h_sources = libags_server_controller_h_sources = \ $(deprecated_libags_server_controller_h_sources) \ ags/server/controller/ags_controller.h \ ags/server/controller/ags_front_controller.h \ ags/server/controller/ags_local_factory_controller.h \ ags/server/controller/ags_local_registry_controller.h \ ags/server/controller/ags_local_serialization_controller.h \ ags/server/controller/ags_local_task_controller.h deprecated_libags_server_controller_c_sources = libags_server_controller_c_sources = \ $(deprecated_libags_server_controller_c_sources) \ ags/server/controller/ags_controller.c \ ags/server/controller/ags_front_controller.c \ ags/server/controller/ags_local_factory_controller.c \ ags/server/controller/ags_local_registry_controller.c \ ags/server/controller/ags_local_serialization_controller.c \ ags/server/controller/ags_local_task_controller.c # libags-server - file deprecated_libags_server_file_h_sources = libags_server_file_h_sources = \ $(deprecated_libags_server_file_h_sources) deprecated_libags_server_file_c_sources = libags_server_file_c_sources = \ $(deprecated_libags_server_file_c_sources) # libags-server - thread deprecated_libags_server_thread_h_sources = libags_server_thread_h_sources = \ $(deprecated_libags_server_thread_h_sources) \ ags/server/thread/ags_remote_task.h \ ags/server/thread/ags_remote_task_thread.h deprecated_libags_server_thread_c_sources = libags_server_thread_c_sources = \ $(deprecated_libags_server_thread_c_sources) \ ags/server/thread/ags_remote_task.c \ ags/server/thread/ags_remote_task_thread.c # libags-audio all files deprecated_libags_audio_h_sources = libags_audio_h_sources = \ $(deprecated_libags_audio_h_sources) \ ags/audio/ags_acceleration.h \ ags/audio/ags_audio.h \ ags/audio/ags_audio_application_context.h \ ags/audio/ags_audio_buffer_util.h \ ags/audio/ags_audio_connection.h \ ags/audio/ags_audio_signal.h \ ags/audio/ags_automation.h \ ags/audio/ags_buffer.h \ ags/audio/ags_channel.h \ ags/audio/ags_channel_iter.h \ ags/audio/ags_devout.h \ ags/audio/ags_devin.h \ ags/audio/ags_effect.h \ ags/audio/ags_fifoout.h \ ags/audio/ags_input.h \ ags/audio/ags_message.h \ ags/audio/ags_midiin.h \ ags/audio/ags_notation.h \ ags/audio/ags_note.h \ ags/audio/ags_output.h \ ags/audio/ags_pattern.h \ ags/audio/ags_playable.h \ ags/audio/ags_playback.h \ ags/audio/ags_playback_domain.h \ ags/audio/ags_port.h \ ags/audio/ags_preset.h \ ags/audio/ags_recall_audio.h \ ags/audio/ags_recall_audio_run.h \ ags/audio/ags_recall_audio_signal.h \ ags/audio/ags_recall_channel.h \ ags/audio/ags_recall_channel_run_dummy.h \ ags/audio/ags_recall_channel_run.h \ ags/audio/ags_recall_container.h \ ags/audio/ags_recall_dependency.h \ ags/audio/ags_recall_factory.h \ ags/audio/ags_recall.h \ ags/audio/ags_recall_dssi.h \ ags/audio/ags_recall_dssi_run.h \ ags/audio/ags_recall_id.h \ ags/audio/ags_recall_ladspa.h \ ags/audio/ags_recall_ladspa_run.h \ ags/audio/ags_recall_lv2.h \ ags/audio/ags_recall_lv2_run.h \ ags/audio/ags_recall_adaptor_run.h \ ags/audio/ags_recall_recycling_dummy.h \ ags/audio/ags_recall_recycling.h \ ags/audio/ags_recycling_context.h \ ags/audio/ags_recycling.h \ ags/audio/ags_sound_provider.h \ ags/audio/ags_synth_generator.h \ ags/audio/ags_synth_util.h \ ags/audio/ags_wave.h deprecated_libags_audio_c_sources = libags_audio_c_sources = \ $(deprecated_libags_audio_c_sources) \ ags/audio/ags_acceleration.c \ ags/audio/ags_audio.c \ ags/audio/ags_audio_application_context.c \ ags/audio/ags_audio_buffer_util.c \ ags/audio/ags_audio_connection.c \ ags/audio/ags_audio_signal.c \ ags/audio/ags_automation.c \ ags/audio/ags_buffer.c \ ags/audio/ags_channel.c \ ags/audio/ags_channel_iter.c \ ags/audio/ags_devout.c \ ags/audio/ags_devin.c \ ags/audio/ags_input.c \ ags/audio/ags_fifoout.c \ ags/audio/ags_message.c \ ags/audio/ags_midiin.c \ ags/audio/ags_notation.c \ ags/audio/ags_note.c \ ags/audio/ags_output.c \ ags/audio/ags_pattern.c \ ags/audio/ags_playable.c \ ags/audio/ags_playback.c \ ags/audio/ags_playback_domain.c \ ags/audio/ags_port.c \ ags/audio/ags_preset.c \ ags/audio/ags_recall_audio.c \ ags/audio/ags_recall_audio_run.c \ ags/audio/ags_recall_audio_signal.c \ ags/audio/ags_recall.c \ ags/audio/ags_recall_channel.c \ ags/audio/ags_recall_channel_run.c \ ags/audio/ags_recall_channel_run_dummy.c \ ags/audio/ags_recall_container.c \ ags/audio/ags_recall_dependency.c \ ags/audio/ags_recall_factory.c \ ags/audio/ags_recall_dssi.c \ ags/audio/ags_recall_dssi_run.c \ ags/audio/ags_recall_id.c \ ags/audio/ags_recall_ladspa.c \ ags/audio/ags_recall_ladspa_run.c \ ags/audio/ags_recall_lv2.c \ ags/audio/ags_recall_lv2_run.c \ ags/audio/ags_recall_adaptor_run.c \ ags/audio/ags_recall_recycling.c \ ags/audio/ags_recall_recycling_dummy.c \ ags/audio/ags_recycling.c \ ags/audio/ags_recycling_context.c \ ags/audio/ags_sound_provider.c \ ags/audio/ags_synth_generator.c \ ags/audio/ags_synth_util.c \ ags/audio/ags_wave.c # libags-audio - client deprecated_libags_audio_client_h_sources = libags_audio_client_h_sources = \ $(deprecated_libags_audio_client_h_sources) \ ags/audio/client/ags_remote_channel.h \ ags/audio/client/ags_remote_input.h \ ags/audio/client/ags_remote_output.h deprecated_libags_audio_client_c_sources = libags_audio_client_c_sources = \ $(deprecated_libags_audio_client_c_sources) \ ags/audio/client/ags_remote_channel.c \ ags/audio/client/ags_remote_input.c \ ags/audio/client/ags_remote_output.c # libags-audio - thread deprecated_libags_audio_thread_h_sources = libags_audio_thread_h_sources = \ $(deprecated_libags_audio_thread_h_sources) \ ags/audio/thread/ags_audio_loop.h \ ags/audio/thread/ags_audio_thread.h \ ags/audio/thread/ags_channel_thread.h \ ags/audio/thread/ags_sequencer_thread.h \ ags/audio/thread/ags_soundcard_thread.h \ ags/audio/thread/ags_export_thread.h \ ags/audio/thread/ags_iterator_thread.h \ ags/audio/thread/ags_record_thread.h \ ags/audio/thread/ags_recycling_thread_callbacks.h \ ags/audio/thread/ags_recycling_thread.h deprecated_libags_audio_thread_c_sources = libags_audio_thread_c_sources = \ $(deprecated_libags_audio_thread_c_sources) \ ags/audio/thread/ags_audio_loop.c \ ags/audio/thread/ags_audio_thread.c \ ags/audio/thread/ags_channel_thread.c \ ags/audio/thread/ags_sequencer_thread.c \ ags/audio/thread/ags_soundcard_thread.c \ ags/audio/thread/ags_export_thread.c \ ags/audio/thread/ags_iterator_thread.c \ ags/audio/thread/ags_record_thread.c \ ags/audio/thread/ags_recycling_thread.c \ ags/audio/thread/ags_recycling_thread_callbacks.c # libags-audio - plugin deprecated_libags_plugin_h_sources = libags_plugin_h_sources = \ $(deprecated_libags_plugin_h_sources) \ ags/plugin/ags_base_plugin.h \ ags/plugin/ags_dssi_manager.h \ ags/plugin/ags_dssi_plugin.h \ ags/plugin/ags_ladspa_conversion.h \ ags/plugin/ags_ladspa_manager.h \ ags/plugin/ags_ladspa_plugin.h \ ags/plugin/ags_plugin_factory.h \ ags/plugin/ags_lv2_conversion.h \ ags/plugin/ags_lv2_manager.h \ ags/plugin/ags_lv2_plugin.h \ ags/plugin/ags_lv2_preset.h \ ags/plugin/ags_lv2_event_manager.h \ ags/plugin/ags_lv2_log_manager.h \ ags/plugin/ags_lv2_option_manager.h \ ags/plugin/ags_lv2_uri_map_manager.h \ ags/plugin/ags_lv2_urid_manager.h \ ags/plugin/ags_lv2_worker_manager.h \ ags/plugin/ags_lv2_worker.h \ ags/plugin/ags_lv2ui_manager.h \ ags/plugin/ags_lv2ui_plugin.h \ ags/plugin/ags_plugin_stock.h deprecated_libags_plugin_c_sources = libags_plugin_c_sources = \ $(deprecated_libags_plugin_c_sources) \ ags/plugin/ags_base_plugin.c \ ags/plugin/ags_dssi_manager.c \ ags/plugin/ags_dssi_plugin.c \ ags/plugin/ags_ladspa_conversion.c \ ags/plugin/ags_ladspa_manager.c \ ags/plugin/ags_ladspa_plugin.c \ ags/plugin/ags_lv2_conversion.c \ ags/plugin/ags_lv2_manager.c \ ags/plugin/ags_lv2_plugin.c \ ags/plugin/ags_lv2_preset.c \ ags/plugin/ags_lv2_log_manager.c \ ags/plugin/ags_lv2_event_manager.c \ ags/plugin/ags_lv2_option_manager.c \ ags/plugin/ags_lv2_uri_map_manager.c \ ags/plugin/ags_lv2_urid_manager.c \ ags/plugin/ags_lv2_worker_manager.c \ ags/plugin/ags_lv2_worker.c \ ags/plugin/ags_lv2ui_manager.c \ ags/plugin/ags_lv2ui_plugin.c \ ags/plugin/ags_plugin_factory.c # libags-audio - file deprecated_libags_audio_file_h_sources = libags_audio_file_h_sources = \ $(deprecated_libags_audio_file_h_sources) \ ags/audio/file/ags_audio_file.h \ ags/audio/file/ags_audio_file_link.h \ ags/audio/file/ags_audio_file_xml.h \ ags/audio/file/ags_audio_xml_serialization_factory.h \ ags/audio/file/ags_ipatch.h \ ags/audio/file/ags_ipatch_dls2_reader.h \ ags/audio/file/ags_ipatch_sf2_reader.h \ ags/audio/file/ags_sndfile.h deprecated_libags_audio_file_c_sources = libags_audio_file_c_sources = \ $(deprecated_libags_audio_file_c_sources) \ ags/audio/file/ags_audio_file.c \ ags/audio/file/ags_audio_file_link.c \ ags/audio/file/ags_audio_file_xml.c \ ags/audio/file/ags_audio_xml_serialization_factory.c \ ags/audio/file/ags_ipatch.c \ ags/audio/file/ags_ipatch_dls2_reader.c \ ags/audio/file/ags_ipatch_sf2_reader.c \ ags/audio/file/ags_sndfile.c # libags-audio - midi deprecated_libags_audio_midi_h_sources = libags_audio_midi_h_sources = \ $(deprecated_libags_audio_midi_h_sources) \ ags/audio/midi/ags_midi_buffer_util.h \ ags/audio/midi/ags_midi_util.h \ ags/audio/midi/ags_midi_builder.h \ ags/audio/midi/ags_midi_file.h \ ags/audio/midi/ags_midi_parser.h deprecated_libags_audio_midi_c_sources = libags_audio_midi_c_sources = \ $(deprecated_libags_audio_midi_c_sources) \ ags/audio/midi/ags_midi_buffer_util.c \ ags/audio/midi/ags_midi_util.c \ ags/audio/midi/ags_midi_builder.c \ ags/audio/midi/ags_midi_file.c \ ags/audio/midi/ags_midi_parser.c # libags-audio - jack deprecated_libags_audio_jack_h_sources = libags_audio_jack_h_sources = \ $(deprecated_libags_audio_jack_h_sources) \ ags/audio/jack/ags_jack_client.h \ ags/audio/jack/ags_jack_midiin.h \ ags/audio/jack/ags_jack_devout.h \ ags/audio/jack/ags_jack_devin.h \ ags/audio/jack/ags_jack_port.h \ ags/audio/jack/ags_jack_server.h deprecated_libags_audio_jack_c_sources = libags_audio_jack_c_sources = \ $(deprecated_libags_audio_jack_c_sources) \ ags/audio/jack/ags_jack_client.c \ ags/audio/jack/ags_jack_midiin.c \ ags/audio/jack/ags_jack_devout.c \ ags/audio/jack/ags_jack_devin.c \ ags/audio/jack/ags_jack_port.c \ ags/audio/jack/ags_jack_server.c # libags-audio - pulse deprecated_libags_audio_pulse_h_sources = libags_audio_pulse_h_sources = \ $(deprecated_libags_audio_pulse_h_sources) \ ags/audio/pulse/ags_pulse_client.h \ ags/audio/pulse/ags_pulse_devout.h \ ags/audio/pulse/ags_pulse_devin.h \ ags/audio/pulse/ags_pulse_port.h \ ags/audio/pulse/ags_pulse_server.h deprecated_libags_audio_pulse_c_sources = libags_audio_pulse_c_sources = \ $(deprecated_libags_audio_pulse_c_sources) \ ags/audio/pulse/ags_pulse_client.c \ ags/audio/pulse/ags_pulse_devout.c \ ags/audio/pulse/ags_pulse_devin.c \ ags/audio/pulse/ags_pulse_port.c \ ags/audio/pulse/ags_pulse_server.c # libags-audio - core-audio deprecated_libags_audio_core_audio_h_sources = libags_audio_core_audio_h_sources = \ $(deprecated_libags_audio_core_audio_h_sources) \ ags/audio/core-audio/ags_core_audio_client.h \ ags/audio/core-audio/ags_core_audio_midiin.h \ ags/audio/core-audio/ags_core_audio_devout.h \ ags/audio/core-audio/ags_core_audio_port.h \ ags/audio/core-audio/ags_core_audio_server.h deprecated_libags_audio_core_audio_c_sources = libags_audio_core_audio_c_sources = \ $(deprecated_libags_audio_core_audio_c_sources) \ ags/audio/core-audio/ags_core_audio_client.c \ ags/audio/core-audio/ags_core_audio_midiin.c \ ags/audio/core-audio/ags_core_audio_devout.c \ ags/audio/core-audio/ags_core_audio_port.c \ ags/audio/core-audio/ags_core_audio_server.c # libags-audio - recall deprecated_libags_audio_recall_h_sources = libags_audio_recall_h_sources = \ $(deprecated_libags_audio_recall_h_sources) \ ags/audio/recall/ags_buffer_audio_signal.h \ ags/audio/recall/ags_buffer_channel.h \ ags/audio/recall/ags_buffer_channel_run.h \ ags/audio/recall/ags_buffer_recycling.h \ ags/audio/recall/ags_capture_sound_audio.h \ ags/audio/recall/ags_capture_sound_audio_run.h \ ags/audio/recall/ags_copy_audio_signal.h \ ags/audio/recall/ags_copy_channel.h \ ags/audio/recall/ags_copy_channel_run.h \ ags/audio/recall/ags_copy_notation_audio.h \ ags/audio/recall/ags_copy_notation_audio_run.h \ ags/audio/recall/ags_copy_pattern_audio.h \ ags/audio/recall/ags_copy_pattern_audio_run.h \ ags/audio/recall/ags_copy_pattern_channel.h \ ags/audio/recall/ags_copy_pattern_channel_run.h \ ags/audio/recall/ags_copy_recycling.h \ ags/audio/recall/ags_count_beats_audio.h \ ags/audio/recall/ags_count_beats_audio_run.h \ ags/audio/recall/ags_delay_audio.h \ ags/audio/recall/ags_delay_audio_run.h \ ags/audio/recall/ags_envelope_audio_signal.h \ ags/audio/recall/ags_envelope_channel.h \ ags/audio/recall/ags_envelope_channel_run.h \ ags/audio/recall/ags_envelope_recycling.h \ ags/audio/recall/ags_feed_audio_signal.h \ ags/audio/recall/ags_feed_channel.h \ ags/audio/recall/ags_feed_channel_run.h \ ags/audio/recall/ags_feed_recycling.h \ ags/audio/recall/ags_loop_channel.h \ ags/audio/recall/ags_loop_channel_run.h \ ags/audio/recall/ags_mute_audio.h \ ags/audio/recall/ags_mute_audio_run.h \ ags/audio/recall/ags_mute_audio_signal.h \ ags/audio/recall/ags_mute_channel.h \ ags/audio/recall/ags_mute_channel_run.h \ ags/audio/recall/ags_mute_recycling.h \ ags/audio/recall/ags_peak_audio_signal.h \ ags/audio/recall/ags_peak_channel.h \ ags/audio/recall/ags_peak_channel_run.h \ ags/audio/recall/ags_peak_recycling.h \ ags/audio/recall/ags_play_audio_file.h \ ags/audio/recall/ags_play_audio.h \ ags/audio/recall/ags_play_audio_signal.h \ ags/audio/recall/ags_play_channel.h \ ags/audio/recall/ags_play_channel_run.h \ ags/audio/recall/ags_play_channel_run_master.h \ ags/audio/recall/ags_play_dssi_audio.h \ ags/audio/recall/ags_play_dssi_audio_run.h \ ags/audio/recall/ags_play_lv2_audio.h \ ags/audio/recall/ags_play_lv2_audio_run.h \ ags/audio/recall/ags_play_notation_audio.h \ ags/audio/recall/ags_play_notation_audio_run.h \ ags/audio/recall/ags_play_note.h \ ags/audio/recall/ags_play_recycling.h \ ags/audio/recall/ags_prepare_audio_signal.h \ ags/audio/recall/ags_prepare_channel.h \ ags/audio/recall/ags_prepare_channel_run.h \ ags/audio/recall/ags_prepare_recycling.h \ ags/audio/recall/ags_record_midi_audio.h \ ags/audio/recall/ags_record_midi_audio_run.h \ ags/audio/recall/ags_route_dssi_audio.h \ ags/audio/recall/ags_route_dssi_audio_run.h \ ags/audio/recall/ags_route_lv2_audio.h \ ags/audio/recall/ags_route_lv2_audio_run.h \ ags/audio/recall/ags_rt_stream_audio_signal.h \ ags/audio/recall/ags_rt_stream_channel.h \ ags/audio/recall/ags_rt_stream_channel_run.h \ ags/audio/recall/ags_rt_stream_recycling.h \ ags/audio/recall/ags_stream_audio_signal.h \ ags/audio/recall/ags_stream_channel.h \ ags/audio/recall/ags_stream_channel_run.h \ ags/audio/recall/ags_stream_recycling.h \ ags/audio/recall/ags_volume_audio_signal.h \ ags/audio/recall/ags_volume_channel.h \ ags/audio/recall/ags_volume_channel_run.h \ ags/audio/recall/ags_volume_recycling.h deprecated_libags_audio_recall_c_sources = libags_audio_recall_c_sources = \ $(deprecated_libags_audio_recall_c_sources) \ ags/audio/recall/ags_buffer_audio_signal.c \ ags/audio/recall/ags_buffer_channel.c \ ags/audio/recall/ags_buffer_channel_run.c \ ags/audio/recall/ags_buffer_recycling.c \ ags/audio/recall/ags_capture_sound_audio.c \ ags/audio/recall/ags_capture_sound_audio_run.c \ ags/audio/recall/ags_copy_audio_signal.c \ ags/audio/recall/ags_copy_channel.c \ ags/audio/recall/ags_copy_channel_run.c \ ags/audio/recall/ags_copy_notation_audio.c \ ags/audio/recall/ags_copy_notation_audio_run.c \ ags/audio/recall/ags_copy_pattern_audio.c \ ags/audio/recall/ags_copy_pattern_audio_run.c \ ags/audio/recall/ags_copy_pattern_channel.c \ ags/audio/recall/ags_copy_pattern_channel_run.c \ ags/audio/recall/ags_copy_recycling.c \ ags/audio/recall/ags_count_beats_audio.c \ ags/audio/recall/ags_count_beats_audio_run.c \ ags/audio/recall/ags_delay_audio.c \ ags/audio/recall/ags_delay_audio_run.c \ ags/audio/recall/ags_envelope_audio_signal.c \ ags/audio/recall/ags_envelope_channel.c \ ags/audio/recall/ags_envelope_channel_run.c \ ags/audio/recall/ags_envelope_recycling.c \ ags/audio/recall/ags_feed_audio_signal.c \ ags/audio/recall/ags_feed_channel.c \ ags/audio/recall/ags_feed_channel_run.c \ ags/audio/recall/ags_feed_recycling.c \ ags/audio/recall/ags_loop_channel.c \ ags/audio/recall/ags_loop_channel_run.c \ ags/audio/recall/ags_mute_audio.c \ ags/audio/recall/ags_mute_audio_run.c \ ags/audio/recall/ags_mute_audio_signal.c \ ags/audio/recall/ags_mute_channel.c \ ags/audio/recall/ags_mute_channel_run.c \ ags/audio/recall/ags_mute_recycling.c \ ags/audio/recall/ags_peak_audio_signal.c \ ags/audio/recall/ags_peak_channel.c \ ags/audio/recall/ags_peak_channel_run.c \ ags/audio/recall/ags_peak_recycling.c \ ags/audio/recall/ags_play_audio.c \ ags/audio/recall/ags_play_audio_file.c \ ags/audio/recall/ags_play_audio_signal.c \ ags/audio/recall/ags_play_channel.c \ ags/audio/recall/ags_play_channel_run.c \ ags/audio/recall/ags_play_channel_run_master.c \ ags/audio/recall/ags_play_dssi_audio.c \ ags/audio/recall/ags_play_dssi_audio_run.c \ ags/audio/recall/ags_play_lv2_audio.c \ ags/audio/recall/ags_play_lv2_audio_run.c \ ags/audio/recall/ags_play_notation_audio.c \ ags/audio/recall/ags_play_notation_audio_run.c \ ags/audio/recall/ags_play_note.c \ ags/audio/recall/ags_play_recycling.c \ ags/audio/recall/ags_prepare_audio_signal.c \ ags/audio/recall/ags_prepare_channel.c \ ags/audio/recall/ags_prepare_channel_run.c \ ags/audio/recall/ags_prepare_recycling.c \ ags/audio/recall/ags_record_midi_audio.c \ ags/audio/recall/ags_record_midi_audio_run.c \ ags/audio/recall/ags_route_dssi_audio.c \ ags/audio/recall/ags_route_dssi_audio_run.c \ ags/audio/recall/ags_route_lv2_audio.c \ ags/audio/recall/ags_route_lv2_audio_run.c \ ags/audio/recall/ags_rt_stream_audio_signal.c \ ags/audio/recall/ags_rt_stream_channel.c \ ags/audio/recall/ags_rt_stream_channel_run.c \ ags/audio/recall/ags_rt_stream_recycling.c \ ags/audio/recall/ags_stream_audio_signal.c \ ags/audio/recall/ags_stream_channel.c \ ags/audio/recall/ags_stream_channel_run.c \ ags/audio/recall/ags_stream_recycling.c \ ags/audio/recall/ags_volume_audio_signal.c \ ags/audio/recall/ags_volume_channel.c \ ags/audio/recall/ags_volume_channel_run.c \ ags/audio/recall/ags_volume_recycling.c # libags-audio - task deprecated_libags_audio_task_h_sources = libags_audio_task_h_sources = \ $(deprecated_libags_audio_task_h_sources) \ ags/audio/task/ags_add_audio.h \ ags/audio/task/ags_add_audio_signal.h \ ags/audio/task/ags_add_effect.h \ ags/audio/task/ags_add_note.h \ ags/audio/task/ags_add_point_to_selection.h \ ags/audio/task/ags_add_recall_container.h \ ags/audio/task/ags_add_recall.h \ ags/audio/task/ags_add_region_to_selection.h \ ags/audio/task/ags_add_soundcard.h \ ags/audio/task/ags_append_audio.h \ ags/audio/task/ags_append_audio_threaded.h \ ags/audio/task/ags_append_channel.h \ ags/audio/task/ags_append_recall.h \ ags/audio/task/ags_apply_presets.h \ ags/audio/task/ags_apply_synth.h \ ags/audio/task/ags_cancel_audio.h \ ags/audio/task/ags_cancel_channel.h \ ags/audio/task/ags_cancel_recall.h \ ags/audio/task/ags_change_soundcard.h \ ags/audio/task/ags_clear_audio_signal.h \ ags/audio/task/ags_clear_buffer.h \ ags/audio/task/ags_crop_note.h \ ags/audio/task/ags_export_output.h \ ags/audio/task/ags_free_selection.h \ ags/audio/task/ags_init_audio.h \ ags/audio/task/ags_init_channel.h \ ags/audio/task/ags_link_channel.h \ ags/audio/task/ags_move_note.h \ ags/audio/task/ags_notify_soundcard.h \ ags/audio/task/ags_open_file.h \ ags/audio/task/ags_open_sf2_sample.h \ ags/audio/task/ags_open_single_file.h \ ags/audio/task/ags_remove_audio.h \ ags/audio/task/ags_remove_audio_signal.h \ ags/audio/task/ags_remove_note.h \ ags/audio/task/ags_remove_point_from_selection.h \ ags/audio/task/ags_remove_recall_container.h \ ags/audio/task/ags_remove_recall.h \ ags/audio/task/ags_remove_region_from_selection.h \ ags/audio/task/ags_remove_soundcard.h \ ags/audio/task/ags_reset_audio_connection.h \ ags/audio/task/ags_resize_audio.h \ ags/audio/task/ags_save_file.h \ ags/audio/task/ags_seek_soundcard.h \ ags/audio/task/ags_set_audio_channels.h \ ags/audio/task/ags_set_buffer_size.h \ ags/audio/task/ags_set_format.h \ ags/audio/task/ags_set_input_device.h \ ags/audio/task/ags_set_output_device.h \ ags/audio/task/ags_set_samplerate.h \ ags/audio/task/ags_start_sequencer.h \ ags/audio/task/ags_start_soundcard.h \ ags/audio/task/ags_switch_buffer_flag.h \ ags/audio/task/ags_tic_device.h \ ags/audio/task/ags_toggle_pattern_bit.h \ ags/audio/task/ags_unref_audio_signal.h \ ags/audio/task/recall/ags_apply_bpm.h \ ags/audio/task/recall/ags_apply_sequencer_length.h \ ags/audio/task/recall/ags_apply_tact.h \ ags/audio/task/recall/ags_reset_peak.h \ ags/audio/task/recall/ags_set_muted.h deprecated_libags_audio_task_c_sources = libags_audio_task_c_sources = \ $(deprecated_libags_audio_task_c_sources) \ ags/audio/task/ags_add_audio.c \ ags/audio/task/ags_add_audio_signal.c \ ags/audio/task/ags_add_effect.c \ ags/audio/task/ags_add_note.c \ ags/audio/task/ags_add_point_to_selection.c \ ags/audio/task/ags_add_recall.c \ ags/audio/task/ags_add_recall_container.c \ ags/audio/task/ags_add_region_to_selection.c \ ags/audio/task/ags_add_soundcard.c \ ags/audio/task/ags_append_audio.c \ ags/audio/task/ags_append_audio_threaded.c \ ags/audio/task/ags_append_channel.c \ ags/audio/task/ags_append_recall.c \ ags/audio/task/ags_apply_presets.c \ ags/audio/task/ags_apply_synth.c \ ags/audio/task/ags_cancel_audio.c \ ags/audio/task/ags_cancel_channel.c \ ags/audio/task/ags_cancel_recall.c \ ags/audio/task/ags_change_soundcard.c \ ags/audio/task/ags_clear_audio_signal.c \ ags/audio/task/ags_clear_buffer.c \ ags/audio/task/ags_crop_note.c \ ags/audio/task/ags_export_output.c \ ags/audio/task/ags_free_selection.c \ ags/audio/task/ags_init_audio.c \ ags/audio/task/ags_init_channel.c \ ags/audio/task/ags_link_channel.c \ ags/audio/task/ags_move_note.c \ ags/audio/task/ags_notify_soundcard.c \ ags/audio/task/ags_open_file.c \ ags/audio/task/ags_open_sf2_sample.c \ ags/audio/task/ags_open_single_file.c \ ags/audio/task/ags_remove_audio.c \ ags/audio/task/ags_remove_audio_signal.c \ ags/audio/task/ags_remove_note.c \ ags/audio/task/ags_remove_point_from_selection.c \ ags/audio/task/ags_remove_recall.c \ ags/audio/task/ags_remove_recall_container.c \ ags/audio/task/ags_remove_region_from_selection.c \ ags/audio/task/ags_remove_soundcard.c \ ags/audio/task/ags_reset_audio_connection.c \ ags/audio/task/ags_resize_audio.c \ ags/audio/task/ags_save_file.c \ ags/audio/task/ags_seek_soundcard.c \ ags/audio/task/ags_set_audio_channels.c \ ags/audio/task/ags_set_buffer_size.c \ ags/audio/task/ags_set_format.c \ ags/audio/task/ags_set_input_device.c \ ags/audio/task/ags_set_output_device.c \ ags/audio/task/ags_set_samplerate.c \ ags/audio/task/ags_start_sequencer.c \ ags/audio/task/ags_start_soundcard.c \ ags/audio/task/ags_switch_buffer_flag.c \ ags/audio/task/ags_tic_device.c \ ags/audio/task/ags_toggle_pattern_bit.c \ ags/audio/task/ags_unref_audio_signal.c \ ags/audio/task/recall/ags_apply_bpm.c \ ags/audio/task/recall/ags_apply_sequencer_length.c \ ags/audio/task/recall/ags_apply_tact.c \ ags/audio/task/recall/ags_reset_peak.c \ ags/audio/task/recall/ags_set_muted.c # libags-gui all files deprecated_libags_gui_h_sources = libags_gui_h_sources = \ $(deprecated_libags_gui_h_sources) \ ags/widget/ags_cartesian.h \ ags/widget/ags_dial.h \ ags/widget/ags_expander.h \ ags/widget/ags_expander_set.h \ ags/widget/ags_hindicator.h \ ags/widget/ags_hled_array.h \ ags/widget/ags_htimebar.h \ ags/widget/ags_indicator.h \ ags/widget/ags_led.h \ ags/widget/ags_led_array.h \ ags/widget/ags_level.h \ ags/widget/ags_level_box.h \ ags/widget/ags_hlevel_box.h \ ags/widget/ags_vlevel_box.h \ ags/widget/ags_notebook.h \ ags/widget/ags_piano_keys.h \ ags/widget/ags_piano.h \ ags/widget/ags_scrolled_piano.h \ ags/widget/ags_scale.h \ ags/widget/ags_scale_box.h \ ags/widget/ags_vscale_box.h \ ags/widget/ags_hscale_box.h \ ags/widget/ags_scrolled_level_box.h \ ags/widget/ags_scrolled_scale_box.h \ ags/widget/ags_ruler.h \ ags/widget/ags_table.h \ ags/widget/ags_timebar.h \ ags/widget/ags_vindicator.h \ ags/widget/ags_vled_array.h \ ags/widget/ags_waveform.h \ ags/widget/ags_widget_marshal.h \ ags/widget/ags_container.h deprecated_libags_gui_c_sources = libags_gui_c_sources = \ $(deprecated_libags_gui_c_sources) \ ags/widget/ags_cartesian.c \ ags/widget/ags_dial.c \ ags/widget/ags_expander.c \ ags/widget/ags_expander_set.c \ ags/widget/ags_hindicator.c \ ags/widget/ags_hled_array.c \ ags/widget/ags_htimebar.c \ ags/widget/ags_indicator.c \ ags/widget/ags_led.c \ ags/widget/ags_led_array.c \ ags/widget/ags_level.c \ ags/widget/ags_level_box.c \ ags/widget/ags_hlevel_box.c \ ags/widget/ags_vlevel_box.c \ ags/widget/ags_notebook.c \ ags/widget/ags_piano.c \ ags/widget/ags_scrolled_piano.c \ ags/widget/ags_scale.c \ ags/widget/ags_scale_box.c \ ags/widget/ags_vscale_box.c \ ags/widget/ags_hscale_box.c \ ags/widget/ags_scrolled_scale_box.c \ ags/widget/ags_scrolled_level_box.c \ ags/widget/ags_ruler.c \ ags/widget/ags_table.c \ ags/widget/ags_timebar.c \ ags/widget/ags_vindicator.c \ ags/widget/ags_vled_array.c \ ags/widget/ags_waveform.c \ ags/widget/ags_widget_marshal.c \ ags/widget/ags_container.c # libgsequencer all files deprecated_libgsequencer_h_sources = libgsequencer_h_sources = \ $(deprecated_libgsequencer_h_sources) \ ags/X/ags_automation_editor_callbacks.h \ ags/X/ags_automation_editor.h \ ags/X/ags_automation_window_callbacks.h \ ags/X/ags_automation_window.h \ ags/X/ags_audio_preferences_callbacks.h \ ags/X/ags_audio_preferences.h \ ags/X/ags_bulk_member_callbacks.h \ ags/X/ags_bulk_member.h \ ags/X/ags_connection_editor_callbacks.h \ ags/X/ags_connection_editor.h \ ags/X/ags_context_menu.h \ ags/X/ags_dssi_browser_callbacks.h \ ags/X/ags_dssi_browser.h \ ags/X/ags_effect_bridge_callbacks.h \ ags/X/ags_effect_bridge.h \ ags/X/ags_effect_bulk_callbacks.h \ ags/X/ags_effect_bulk.h \ ags/X/ags_effect_line_callbacks.h \ ags/X/ags_effect_line.h \ ags/X/ags_effect_pad_callbacks.h \ ags/X/ags_effect_pad.h \ ags/X/ags_effect_separator.h \ ags/X/ags_export_soundcard_callbacks.h \ ags/X/ags_export_soundcard.h \ ags/X/ags_export_window_callbacks.h \ ags/X/ags_export_window.h \ ags/X/ags_generic_preferences_callbacks.h \ ags/X/ags_generic_preferences.h \ ags/X/ags_history_browser_callbacks.h \ ags/X/ags_history_browser.h \ ags/X/ags_ladspa_browser_callbacks.h \ ags/X/ags_ladspa_browser.h \ ags/X/ags_lv2_browser_callbacks.h \ ags/X/ags_lv2_browser.h \ ags/X/ags_line_callbacks.h \ ags/X/ags_line_editor_callbacks.h \ ags/X/ags_line_editor.h \ ags/X/ags_line.h \ ags/X/ags_line_member_callbacks.h \ ags/X/ags_line_member_editor_callbacks.h \ ags/X/ags_line_member_editor.h \ ags/X/ags_line_member.h \ ags/X/ags_link_collection_editor_callbacks.h \ ags/X/ags_link_collection_editor.h \ ags/X/ags_link_editor_callbacks.h \ ags/X/ags_link_editor.h \ ags/X/ags_listing_editor_callbacks.h \ ags/X/ags_listing_editor.h \ ags/X/ags_machine_callbacks.h \ ags/X/ags_machine_editor_callbacks.h \ ags/X/ags_machine_editor.h \ ags/X/ags_machine.h \ ags/X/ags_menu_action_callbacks.h \ ags/X/ags_menu_bar.h \ ags/X/ags_midi_dialog_callbacks.h \ ags/X/ags_midi_dialog.h \ ags/X/ags_midi_preferences.h \ ags/X/ags_midi_preferences_callbacks.h \ ags/X/ags_navigation_callbacks.h \ ags/X/ags_navigation.h \ ags/X/ags_notation_editor_callbacks.h \ ags/X/ags_notation_editor.h \ ags/X/ags_output_collection_editor_callbacks.h \ ags/X/ags_output_collection_editor.h \ ags/X/ags_output_editor_callbacks.h \ ags/X/ags_output_editor.h \ ags/X/ags_output_listing_editor_callbacks.h \ ags/X/ags_output_listing_editor.h \ ags/X/ags_pad_callbacks.h \ ags/X/ags_pad_editor_callbacks.h \ ags/X/ags_pad_editor.h \ ags/X/ags_pad.h \ ags/X/ags_performance_preferences_callbacks.h \ ags/X/ags_performance_preferences.h \ ags/X/ags_playback_window_callbacks.h \ ags/X/ags_playback_window.h \ ags/X/ags_plugin_browser_callbacks.h \ ags/X/ags_plugin_browser.h \ ags/X/ags_plugin_preferences_callbacks.h \ ags/X/ags_plugin_preferences.h \ ags/X/ags_preferences_callbacks.h \ ags/X/ags_preferences.h \ ags/X/ags_property_collection_editor_callbacks.h \ ags/X/ags_property_collection_editor.h \ ags/X/ags_property_editor_callbacks.h \ ags/X/ags_property_editor.h \ ags/X/ags_property_listing_editor.h \ ags/X/ags_resize_editor.h \ ags/X/ags_sequencer_editor_callbacks.h \ ags/X/ags_sequencer_editor.h \ ags/X/ags_server_preferences_callbacks.h \ ags/X/ags_server_preferences.h \ ags/X/ags_soundcard_editor_callbacks.h \ ags/X/ags_soundcard_editor.h \ ags/X/ags_ui_provider.h \ ags/X/ags_wave_window_callbacks.h \ ags/X/ags_wave_window.h \ ags/X/ags_wave_editor_callbacks.h \ ags/X/ags_wave_editor.h \ ags/X/ags_window.h \ ags/X/ags_window_callbacks.h \ ags/X/ags_xorg_application_context.h deprecated_libgsequencer_c_sources = libgsequencer_c_sources = \ $(deprecated_libgsequencer_c_sources) \ ags/X/ags_automation_editor.c \ ags/X/ags_automation_editor_callbacks.c \ ags/X/ags_automation_window.c \ ags/X/ags_automation_window_callbacks.c \ ags/X/ags_audio_preferences.c \ ags/X/ags_audio_preferences_callbacks.c \ ags/X/ags_bulk_member.c \ ags/X/ags_bulk_member_callbacks.c \ ags/X/ags_connection_editor_callbacks.c \ ags/X/ags_connection_editor.c \ ags/X/ags_context_menu.c \ ags/X/ags_dssi_browser_callbacks.c \ ags/X/ags_dssi_browser.c \ ags/X/ags_effect_bridge.c \ ags/X/ags_effect_bridge_callbacks.c \ ags/X/ags_effect_bulk.c \ ags/X/ags_effect_bulk_callbacks.c \ ags/X/ags_effect_line.c \ ags/X/ags_effect_line_callbacks.c \ ags/X/ags_effect_pad.c \ ags/X/ags_effect_pad_callbacks.c \ ags/X/ags_effect_separator.c \ ags/X/ags_export_soundcard.c \ ags/X/ags_export_soundcard_callbacks.c \ ags/X/ags_export_window.c \ ags/X/ags_export_window_callbacks.c \ ags/X/ags_generic_preferences.c \ ags/X/ags_generic_preferences_callbacks.c \ ags/X/ags_history_browser.c \ ags/X/ags_history_browser_callbacks.c \ ags/X/ags_ladspa_browser.c \ ags/X/ags_ladspa_browser_callbacks.c \ ags/X/ags_lv2_browser.c \ ags/X/ags_lv2_browser_callbacks.c \ ags/X/ags_line.c \ ags/X/ags_line_callbacks.c \ ags/X/ags_line_editor.c \ ags/X/ags_line_editor_callbacks.c \ ags/X/ags_line_member.c \ ags/X/ags_line_member_callbacks.c \ ags/X/ags_line_member_editor.c \ ags/X/ags_line_member_editor_callbacks.c \ ags/X/ags_link_collection_editor.c \ ags/X/ags_link_collection_editor_callbacks.c \ ags/X/ags_link_editor.c \ ags/X/ags_link_editor_callbacks.c \ ags/X/ags_listing_editor.c \ ags/X/ags_listing_editor_callbacks.c \ ags/X/ags_machine.c \ ags/X/ags_machine_callbacks.c \ ags/X/ags_machine_editor.c \ ags/X/ags_machine_editor_callbacks.c \ ags/X/ags_menu_action_callbacks.c \ ags/X/ags_menu_bar.c \ ags/X/ags_midi_dialog.c \ ags/X/ags_midi_dialog_callbacks.c \ ags/X/ags_midi_preferences.c \ ags/X/ags_midi_preferences_callbacks.c \ ags/X/ags_navigation.c \ ags/X/ags_navigation_callbacks.c \ ags/X/ags_notation_editor.c \ ags/X/ags_notation_editor_callbacks.c \ ags/X/ags_output_collection_editor_callbacks.c \ ags/X/ags_output_collection_editor.c \ ags/X/ags_output_editor_callbacks.c \ ags/X/ags_output_editor.c \ ags/X/ags_output_listing_editor_callbacks.c \ ags/X/ags_output_listing_editor.c \ ags/X/ags_pad.c \ ags/X/ags_pad_callbacks.c \ ags/X/ags_pad_editor.c \ ags/X/ags_pad_editor_callbacks.c \ ags/X/ags_performance_preferences.c \ ags/X/ags_performance_preferences_callbacks.c \ ags/X/ags_playback_window.c \ ags/X/ags_playback_window_callbacks.c \ ags/X/ags_plugin_browser.c \ ags/X/ags_plugin_browser_callbacks.c \ ags/X/ags_plugin_preferences.c \ ags/X/ags_plugin_preferences_callbacks.c \ ags/X/ags_preferences.c \ ags/X/ags_preferences_callbacks.c \ ags/X/ags_property_collection_editor.c \ ags/X/ags_property_collection_editor_callbacks.c \ ags/X/ags_property_editor.c \ ags/X/ags_property_editor_callbacks.c \ ags/X/ags_property_listing_editor.c \ ags/X/ags_resize_editor.c \ ags/X/ags_sequencer_editor_callbacks.c \ ags/X/ags_sequencer_editor.c \ ags/X/ags_server_preferences.c \ ags/X/ags_server_preferences_callbacks.c \ ags/X/ags_ui_provider.c \ ags/X/ags_wave_window_callbacks.c \ ags/X/ags_wave_window.c \ ags/X/ags_wave_editor.c \ ags/X/ags_wave_editor_callbacks.c \ ags/X/ags_window.c \ ags/X/ags_soundcard_editor_callbacks.c \ ags/X/ags_soundcard_editor.c \ ags/X/ags_window_callbacks.c \ ags/X/ags_xorg_application_context.c # libgsequencer - file deprecated_libgsequencer_file_h_sources = libgsequencer_file_h_sources = \ $(deprecated_libgsequencer_file_h_sources) \ ags/X/file/ags_gui_file_xml.h \ ags/X/file/ags_simple_file.h deprecated_libgsequencer_file_c_sources = libgsequencer_file_c_sources = \ $(deprecated_libgsequencer_file_c_sources) \ ags/X/file/ags_gui_file_xml.c \ ags/X/file/ags_simple_file.c # libgsequencer-thread - thread deprecated_libgsequencer_thread_h_sources = libgsequencer_thread_h_sources = \ $(deprecated_libgsequencer_thread_h_sources) \ ags/X/thread/ags_gui_thread.h \ ags/X/thread/ags_simple_autosave_thread.h deprecated_libgsequencer_thread_c_sources = libgsequencer_thread_c_sources = \ $(deprecated_libgsequencer_thread_c_sources) \ ags/X/thread/ags_gui_thread.c \ ags/X/thread/ags_simple_autosave_thread.c # libgsequencer - task deprecated_libgsequencer_task_h_sources = libgsequencer_task_h_sources = \ $(deprecated_libgsequencer_task_h_sources) \ ags/X/task/ags_add_bulk_member.h \ ags/X/task/ags_add_line_member.h \ ags/X/task/ags_add_sequencer_editor_jack.h \ ags/X/task/ags_add_soundcard_editor_sink.h \ ags/X/task/ags_blink_cell_pattern_cursor.h \ ags/X/task/ags_change_indicator.h \ ags/X/task/ags_change_tact.h \ ags/X/task/ags_display_tact.h \ ags/X/task/ags_remove_sequencer_editor_jack.h \ ags/X/task/ags_remove_soundcard_editor_sink.h \ ags/X/task/ags_simple_file_read.h \ ags/X/task/ags_simple_file_write.h \ ags/X/task/ags_toggle_led.h \ ags/X/task/ags_update_bulk_member.h deprecated_libgsequencer_task_c_sources = libgsequencer_task_c_sources = \ $(deprecated_libgsequencer_task_c_sources) \ ags/X/task/ags_add_bulk_member.c \ ags/X/task/ags_add_line_member.c \ ags/X/task/ags_add_sequencer_editor_jack.c \ ags/X/task/ags_add_soundcard_editor_sink.c \ ags/X/task/ags_blink_cell_pattern_cursor.c \ ags/X/task/ags_change_indicator.c \ ags/X/task/ags_change_tact.c \ ags/X/task/ags_display_tact.c \ ags/X/task/ags_remove_sequencer_editor_jack.c \ ags/X/task/ags_remove_soundcard_editor_sink.c \ ags/X/task/ags_simple_file_read.c \ ags/X/task/ags_simple_file_write.c \ ags/X/task/ags_toggle_led.c \ ags/X/task/ags_update_bulk_member.c # libgsequencer - import deprecated_libgsequencer_import_h_sources = libgsequencer_import_h_sources = \ $(deprecated_libgsequencer_import_h_sources) \ ags/X/import/ags_midi_import_wizard.h \ ags/X/import/ags_midi_import_wizard_callbacks.h \ ags/X/import/ags_track_collection.h \ ags/X/import/ags_track_collection_callbacks.h \ ags/X/import/ags_track_collection_mapper.h \ ags/X/import/ags_track_collection_mapper_callbacks.h deprecated_libgsequencer_import_c_sources = libgsequencer_import_c_sources = \ $(deprecated_libgsequencer_import_c_sources) \ ags/X/import/ags_midi_import_wizard.c \ ags/X/import/ags_midi_import_wizard_callbacks.c \ ags/X/import/ags_track_collection.c \ ags/X/import/ags_track_collection_callbacks.c \ ags/X/import/ags_track_collection_mapper.c \ ags/X/import/ags_track_collection_mapper_callbacks.c # libgsequencer - export deprecated_libgsequencer_export_h_sources = libgsequencer_export_h_sources = \ $(deprecated_libgsequencer_export_h_sources) \ ags/X/export/ags_midi_export_wizard.h \ ags/X/export/ags_midi_export_wizard_callbacks.h \ ags/X/export/ags_machine_collection.h \ ags/X/export/ags_machine_collection_callbacks.h \ ags/X/export/ags_machine_collection_entry.h \ ags/X/export/ags_machine_collection_entry_callbacks.h deprecated_libgsequencer_export_c_sources = libgsequencer_export_c_sources = \ $(deprecated_libgsequencer_export_c_sources) \ ags/X/export/ags_midi_export_wizard.c \ ags/X/export/ags_midi_export_wizard_callbacks.c \ ags/X/export/ags_machine_collection.c \ ags/X/export/ags_machine_collection_callbacks.c \ ags/X/export/ags_machine_collection_entry.c \ ags/X/export/ags_machine_collection_entry_callbacks.c # libgsequencer - machine deprecated_libgsequencer_machine_h_sources = libgsequencer_machine_h_sources = \ $(deprecated_libgsequencer_machine_h_sources) \ ags/X/machine/ags_audiorec.h \ ags/X/machine/ags_audiorec_callbacks.h \ ags/X/machine/ags_cell_pattern_callbacks.h \ ags/X/machine/ags_cell_pattern.h \ ags/X/machine/ags_drum_callbacks.h \ ags/X/machine/ags_drum.h \ ags/X/machine/ags_drum_input_line_callbacks.h \ ags/X/machine/ags_drum_input_line.h \ ags/X/machine/ags_drum_input_pad_callbacks.h \ ags/X/machine/ags_drum_input_pad.h \ ags/X/machine/ags_drum_output_line_callbacks.h \ ags/X/machine/ags_drum_output_line.h \ ags/X/machine/ags_drum_output_pad_callbacks.h \ ags/X/machine/ags_drum_output_pad.h \ ags/X/machine/ags_dssi_bridge_callbacks.h \ ags/X/machine/ags_dssi_bridge.h \ ags/X/machine/ags_ffplayer_callbacks.h \ ags/X/machine/ags_ffplayer.h \ ags/X/machine/ags_ffplayer_bridge_callbacks.h \ ags/X/machine/ags_ffplayer_bridge.h \ ags/X/machine/ags_ffplayer_bulk_input_callbacks.h \ ags/X/machine/ags_ffplayer_bulk_input.h \ ags/X/machine/ags_ffplayer_input_line_callbacks.h \ ags/X/machine/ags_ffplayer_input_line.h \ ags/X/machine/ags_ffplayer_input_pad_callbacks.h \ ags/X/machine/ags_ffplayer_input_pad.h \ ags/X/machine/ags_ladspa_bridge_callbacks.h \ ags/X/machine/ags_ladspa_bridge.h \ ags/X/machine/ags_live_dssi_bridge_callbacks.h \ ags/X/machine/ags_live_dssi_bridge.h \ ags/X/machine/ags_live_lv2_bridge_callbacks.h \ ags/X/machine/ags_live_lv2_bridge.h \ ags/X/machine/ags_lv2_bridge_callbacks.h \ ags/X/machine/ags_lv2_bridge.h \ ags/X/machine/ags_matrix_callbacks.h \ ags/X/machine/ags_matrix.h \ ags/X/machine/ags_matrix_bridge_callbacks.h \ ags/X/machine/ags_matrix_bridge.h \ ags/X/machine/ags_matrix_bulk_input_callbacks.h \ ags/X/machine/ags_matrix_bulk_input.h \ ags/X/machine/ags_mixer_callbacks.h \ ags/X/machine/ags_mixer.h \ ags/X/machine/ags_mixer_input_line.h \ ags/X/machine/ags_mixer_input_pad.h \ ags/X/machine/ags_oscillator_callbacks.h \ ags/X/machine/ags_oscillator.h \ ags/X/machine/ags_panel_callbacks.h \ ags/X/machine/ags_panel.h \ ags/X/machine/ags_panel_input_line.h \ ags/X/machine/ags_panel_input_line_callbacks.h \ ags/X/machine/ags_panel_input_pad.h \ ags/X/machine/ags_pattern_box_callbacks.h \ ags/X/machine/ags_pattern_box.h \ ags/X/machine/ags_synth_callbacks.h \ ags/X/machine/ags_syncsynth.h \ ags/X/machine/ags_syncsynth_callbacks.h \ ags/X/machine/ags_synth.h \ ags/X/machine/ags_synth_input_line.h \ ags/X/machine/ags_synth_input_line_callbacks.h \ ags/X/machine/ags_synth_input_pad.h deprecated_libgsequencer_machine_c_sources = libgsequencer_machine_c_sources = \ $(deprecated_libgsequencer_machine_c_sources) \ ags/X/machine/ags_audiorec.c \ ags/X/machine/ags_audiorec_callbacks.c \ ags/X/machine/ags_cell_pattern.c \ ags/X/machine/ags_cell_pattern_callbacks.c \ ags/X/machine/ags_drum.c \ ags/X/machine/ags_drum_callbacks.c \ ags/X/machine/ags_drum_input_line.c \ ags/X/machine/ags_drum_input_line_callbacks.c \ ags/X/machine/ags_drum_input_pad.c \ ags/X/machine/ags_drum_input_pad_callbacks.c \ ags/X/machine/ags_drum_output_line.c \ ags/X/machine/ags_drum_output_line_callbacks.c \ ags/X/machine/ags_drum_output_pad.c \ ags/X/machine/ags_drum_output_pad_callbacks.c \ ags/X/machine/ags_dssi_bridge.c \ ags/X/machine/ags_dssi_bridge_callbacks.c \ ags/X/machine/ags_ffplayer.c \ ags/X/machine/ags_ffplayer_callbacks.c \ ags/X/machine/ags_ffplayer_bridge.c \ ags/X/machine/ags_ffplayer_bridge_callbacks.c \ ags/X/machine/ags_ffplayer_bulk_input.c \ ags/X/machine/ags_ffplayer_bulk_input_callbacks.c \ ags/X/machine/ags_ffplayer_input_line.c \ ags/X/machine/ags_ffplayer_input_line_callbacks.c \ ags/X/machine/ags_ffplayer_input_pad.c \ ags/X/machine/ags_ffplayer_input_pad_callbacks.c \ ags/X/machine/ags_ladspa_bridge.c \ ags/X/machine/ags_ladspa_bridge_callbacks.c \ ags/X/machine/ags_live_dssi_bridge.c \ ags/X/machine/ags_live_dssi_bridge_callbacks.c \ ags/X/machine/ags_live_lv2_bridge.c \ ags/X/machine/ags_live_lv2_bridge_callbacks.c \ ags/X/machine/ags_lv2_bridge.c \ ags/X/machine/ags_lv2_bridge_callbacks.c \ ags/X/machine/ags_matrix.c \ ags/X/machine/ags_matrix_callbacks.c \ ags/X/machine/ags_matrix_bridge.c \ ags/X/machine/ags_matrix_bridge_callbacks.c \ ags/X/machine/ags_matrix_bulk_input.c \ ags/X/machine/ags_matrix_bulk_input_callbacks.c \ ags/X/machine/ags_mixer.c \ ags/X/machine/ags_mixer_callbacks.c \ ags/X/machine/ags_mixer_input_line.c \ ags/X/machine/ags_mixer_input_pad.c \ ags/X/machine/ags_oscillator.c \ ags/X/machine/ags_oscillator_callbacks.c \ ags/X/machine/ags_panel.c \ ags/X/machine/ags_panel_callbacks.c \ ags/X/machine/ags_panel_input_line.c \ ags/X/machine/ags_panel_input_line_callbacks.c \ ags/X/machine/ags_panel_input_pad.c \ ags/X/machine/ags_pattern_box_callbacks.c \ ags/X/machine/ags_pattern_box.c \ ags/X/machine/ags_syncsynth.c \ ags/X/machine/ags_syncsynth_callbacks.c \ ags/X/machine/ags_synth.c \ ags/X/machine/ags_synth_callbacks.c \ ags/X/machine/ags_synth_input_line.c \ ags/X/machine/ags_synth_input_line_callbacks.c \ ags/X/machine/ags_synth_input_pad.c # libgsequencer - editor deprecated_libgsequencer_editor_h_sources = libgsequencer_editor_h_sources = \ $(deprecated_libgsequencer_editor_h_sources) \ ags/X/editor/ags_automation_edit_callbacks.h \ ags/X/editor/ags_automation_edit_box.h \ ags/X/editor/ags_automation_edit.h \ ags/X/editor/ags_automation_toolbar_callbacks.h \ ags/X/editor/ags_automation_toolbar.h \ ags/X/editor/ags_crop_note_dialog_callbacks.h \ ags/X/editor/ags_crop_note_dialog.h \ ags/X/editor/ags_envelope_dialog_callbacks.h \ ags/X/editor/ags_envelope_dialog.h \ ags/X/editor/ags_envelope_editor_callbacks.h \ ags/X/editor/ags_envelope_editor.h \ ags/X/editor/ags_envelope_info_callbacks.h \ ags/X/editor/ags_envelope_info.h \ ags/X/editor/ags_file_selection_callbacks.h \ ags/X/editor/ags_file_selection.h \ ags/X/editor/ags_inline_player_callbacks.h \ ags/X/editor/ags_inline_player.h \ ags/X/editor/ags_machine_radio_button.h \ ags/X/editor/ags_machine_radio_button_callbacks.h \ ags/X/editor/ags_machine_selection.h \ ags/X/editor/ags_machine_selector_callbacks.h \ ags/X/editor/ags_machine_selector.h \ ags/X/editor/ags_move_note_dialog_callbacks.h \ ags/X/editor/ags_move_note_dialog.h \ ags/X/editor/ags_notation_edit_callbacks.h \ ags/X/editor/ags_notation_edit.h \ ags/X/editor/ags_notation_toolbar_callbacks.h \ ags/X/editor/ags_notation_toolbar.h \ ags/X/editor/ags_pattern_envelope_callbacks.h \ ags/X/editor/ags_pattern_envelope.h \ ags/X/editor/ags_position_automation_cursor_dialog.h \ ags/X/editor/ags_position_automation_cursor_dialog_callbacks.h \ ags/X/editor/ags_position_notation_cursor_dialog.h \ ags/X/editor/ags_position_notation_cursor_dialog_callbacks.h \ ags/X/editor/ags_ramp_acceleration_dialog.h \ ags/X/editor/ags_ramp_acceleration_dialog_callbacks.h \ ags/X/editor/ags_scrolled_automation_edit_box.h \ ags/X/editor/ags_scrolled_wave_edit_box.h \ ags/X/editor/ags_sf2_chooser_callbacks.h \ ags/X/editor/ags_sf2_chooser.h \ ags/X/editor/ags_select_acceleration_dialog.h \ ags/X/editor/ags_select_acceleration_dialog_callbacks.h \ ags/X/editor/ags_select_note_dialog.h \ ags/X/editor/ags_select_note_dialog_callbacks.h \ ags/X/editor/ags_vautomation_edit_box.h \ ags/X/editor/ags_vwave_edit_box.h \ ags/X/editor/ags_wave_edit_callbacks.h \ ags/X/editor/ags_wave_edit.h \ ags/X/editor/ags_wave_edit_box.h \ ags/X/editor/ags_wave_toolbar_callbacks.h \ ags/X/editor/ags_wave_toolbar.h deprecated_libgsequencer_editor_c_sources = libgsequencer_editor_c_sources = \ $(deprecated_libgsequencer_editor_c_sources) \ ags/X/editor/ags_automation_edit.c \ ags/X/editor/ags_automation_edit_box.c \ ags/X/editor/ags_automation_edit_callbacks.c \ ags/X/editor/ags_automation_toolbar.c \ ags/X/editor/ags_automation_toolbar_callbacks.c \ ags/X/editor/ags_crop_note_dialog_callbacks.c \ ags/X/editor/ags_crop_note_dialog.c \ ags/X/editor/ags_envelope_dialog_callbacks.c \ ags/X/editor/ags_envelope_dialog.c \ ags/X/editor/ags_envelope_editor_callbacks.c \ ags/X/editor/ags_envelope_editor.c \ ags/X/editor/ags_envelope_info_callbacks.c \ ags/X/editor/ags_envelope_info.c \ ags/X/editor/ags_file_selection_callbacks.c \ ags/X/editor/ags_file_selection.c \ ags/X/editor/ags_inline_player.c \ ags/X/editor/ags_inline_player_callbacks.c \ ags/X/editor/ags_machine_radio_button.c \ ags/X/editor/ags_machine_radio_button_callbacks.c \ ags/X/editor/ags_machine_selection.c \ ags/X/editor/ags_machine_selector.c \ ags/X/editor/ags_machine_selector_callbacks.c \ ags/X/editor/ags_move_note_dialog_callbacks.c \ ags/X/editor/ags_move_note_dialog.c \ ags/X/editor/ags_notation_edit.c \ ags/X/editor/ags_notation_edit_callbacks.c \ ags/X/editor/ags_notation_toolbar.c \ ags/X/editor/ags_notation_toolbar_callbacks.c \ ags/X/editor/ags_pattern_envelope_callbacks.c \ ags/X/editor/ags_pattern_envelope.c \ ags/X/editor/ags_position_automation_cursor_dialog.c \ ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c \ ags/X/editor/ags_position_notation_cursor_dialog.c \ ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c \ ags/X/editor/ags_ramp_acceleration_dialog.c \ ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c \ ags/X/editor/ags_scrolled_automation_edit_box.c \ ags/X/editor/ags_scrolled_wave_edit_box.c \ ags/X/editor/ags_select_acceleration_dialog.c \ ags/X/editor/ags_select_acceleration_dialog_callbacks.c \ ags/X/editor/ags_select_note_dialog.c \ ags/X/editor/ags_select_note_dialog_callbacks.c \ ags/X/editor/ags_sf2_chooser.c \ ags/X/editor/ags_sf2_chooser_callbacks.c \ ags/X/editor/ags_vautomation_edit_box.c \ ags/X/editor/ags_vwave_edit_box.c \ ags/X/editor/ags_wave_edit.c \ ags/X/editor/ags_wave_edit_box.c \ ags/X/editor/ags_wave_edit_callbacks.c \ ags/X/editor/ags_wave_toolbar.c \ ags/X/editor/ags_wave_toolbar_callbacks.c # libgsequencer all files gsequencerheaders = \ ags/gsequencer_main.h gsequencer_c_sources = \ ags/gsequencer_main.c midi2xml_LDADD = libags_audio.la libags_server.la libags_gui.la libags_thread.la libags.la midi2xml_SOURCES = ags/midi2xml_main.c all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/unit-tests.mk $(top_srcdir)/functional-tests.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/unit-tests.mk $(top_srcdir)/functional-tests.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): ags/config.h: ags/stamp-h1 @test -f $@ || rm -f ags/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) ags/stamp-h1 ags/stamp-h1: $(top_srcdir)/ags/config.h.in $(top_builddir)/config.status @rm -f ags/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status ags/config.h $(top_srcdir)/ags/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f ags/stamp-h1 touch $@ distclean-hdr: -rm -f ags/config.h ags/stamp-h1 libags.pc: $(top_builddir)/config.status $(srcdir)/libags.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libags_audio.pc: $(top_builddir)/config.status $(srcdir)/libags_audio.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libags_gui.pc: $(top_builddir)/config.status $(srcdir)/libags_gui.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libgsequencer.pc: $(top_builddir)/config.status $(srcdir)/libgsequencer.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ clean-checkLTLIBRARIES: -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) @list='$(check_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-libgsequencerLTLIBRARIES: $(libgsequencer_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(libgsequencer_LTLIBRARIES)'; test -n "$(libgsequencerdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libgsequencerdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libgsequencerdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libgsequencerdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libgsequencerdir)"; \ } uninstall-libgsequencerLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(libgsequencer_LTLIBRARIES)'; test -n "$(libgsequencerdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libgsequencerdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libgsequencerdir)/$$f"; \ done clean-libgsequencerLTLIBRARIES: -test -z "$(libgsequencer_LTLIBRARIES)" || rm -f $(libgsequencer_LTLIBRARIES) @list='$(libgsequencer_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } ags/lib/$(am__dirstamp): @$(MKDIR_P) ags/lib @: > ags/lib/$(am__dirstamp) ags/lib/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/lib/$(DEPDIR) @: > ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_buffer_util.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_complex.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_conversion.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_endian.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_function.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_log.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_parameter.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_regex.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_string_util.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_time.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_turtle.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/lib/libags_la-ags_turtle_manager.lo: ags/lib/$(am__dirstamp) \ ags/lib/$(DEPDIR)/$(am__dirstamp) ags/util/$(am__dirstamp): @$(MKDIR_P) ags/util @: > ags/util/$(am__dirstamp) ags/util/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/util/$(DEPDIR) @: > ags/util/$(DEPDIR)/$(am__dirstamp) ags/util/libags_la-ags_destroy_util.lo: ags/util/$(am__dirstamp) \ ags/util/$(DEPDIR)/$(am__dirstamp) ags/util/libags_la-ags_id_generator.lo: ags/util/$(am__dirstamp) \ ags/util/$(DEPDIR)/$(am__dirstamp) ags/util/libags_la-ags_list_util.lo: ags/util/$(am__dirstamp) \ ags/util/$(DEPDIR)/$(am__dirstamp) ags/object/$(am__dirstamp): @$(MKDIR_P) ags/object @: > ags/object/$(am__dirstamp) ags/object/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/object/$(DEPDIR) @: > ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_applicable.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_application_context.lo: \ ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_async_queue.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_config.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_connectable.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_connection.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_connection_manager.lo: \ ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_countable.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_concurrent_tree.lo: \ ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_distributed_manager.lo: \ ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_dynamic_connectable.lo: \ ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_main_loop.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_marshal.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_mutable.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_packable.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_plugin.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_portlet.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_seekable.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_sequencer.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_soundcard.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_tactable.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/object/libags_la-ags_tree_iterator.lo: ags/object/$(am__dirstamp) \ ags/object/$(DEPDIR)/$(am__dirstamp) ags/file/$(am__dirstamp): @$(MKDIR_P) ags/file @: > ags/file/$(am__dirstamp) ags/file/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/file/$(DEPDIR) @: > ags/file/$(DEPDIR)/$(am__dirstamp) ags/file/libags_la-ags_file.lo: ags/file/$(am__dirstamp) \ ags/file/$(DEPDIR)/$(am__dirstamp) ags/file/libags_la-ags_file_id_ref.lo: ags/file/$(am__dirstamp) \ ags/file/$(DEPDIR)/$(am__dirstamp) ags/file/libags_la-ags_file_launch.lo: ags/file/$(am__dirstamp) \ ags/file/$(DEPDIR)/$(am__dirstamp) ags/file/libags_la-ags_file_link.lo: ags/file/$(am__dirstamp) \ ags/file/$(DEPDIR)/$(am__dirstamp) ags/file/libags_la-ags_file_lookup.lo: ags/file/$(am__dirstamp) \ ags/file/$(DEPDIR)/$(am__dirstamp) ags/file/libags_la-ags_file_util.lo: ags/file/$(am__dirstamp) \ ags/file/$(DEPDIR)/$(am__dirstamp) ags/file/libags_la-ags_xml_serialization_factory.lo: \ ags/file/$(am__dirstamp) ags/file/$(DEPDIR)/$(am__dirstamp) libags.la: $(libags_la_OBJECTS) $(libags_la_DEPENDENCIES) $(EXTRA_libags_la_DEPENDENCIES) $(AM_V_CCLD)$(libags_la_LINK) -rpath $(libdir) $(libags_la_OBJECTS) $(libags_la_LIBADD) $(LIBS) ags/audio/$(am__dirstamp): @$(MKDIR_P) ags/audio @: > ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/$(DEPDIR) @: > ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_acceleration.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_audio.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_audio_application_context.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_audio_buffer_util.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_audio_connection.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_audio_signal.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_automation.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_buffer.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_channel.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_channel_iter.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_devout.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_devin.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_input.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_fifoout.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_message.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_midiin.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_notation.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_note.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_output.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_pattern.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_playable.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_playback.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_playback_domain.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_port.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_preset.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_audio.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_audio_run.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_audio_signal.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_channel.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_channel_run.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_channel_run_dummy.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_container.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_dependency.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_factory.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_dssi.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_dssi_run.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_id.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_ladspa.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_ladspa_run.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_lv2.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_lv2_run.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_adaptor_run.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_recycling.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recall_recycling_dummy.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recycling.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_recycling_context.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_sound_provider.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_synth_generator.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_synth_util.lo: \ ags/audio/$(am__dirstamp) ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/libags_audio_la-ags_wave.lo: ags/audio/$(am__dirstamp) \ ags/audio/$(DEPDIR)/$(am__dirstamp) ags/audio/client/$(am__dirstamp): @$(MKDIR_P) ags/audio/client @: > ags/audio/client/$(am__dirstamp) ags/audio/client/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/client/$(DEPDIR) @: > ags/audio/client/$(DEPDIR)/$(am__dirstamp) ags/audio/client/libags_audio_la-ags_remote_channel.lo: \ ags/audio/client/$(am__dirstamp) \ ags/audio/client/$(DEPDIR)/$(am__dirstamp) ags/audio/client/libags_audio_la-ags_remote_input.lo: \ ags/audio/client/$(am__dirstamp) \ ags/audio/client/$(DEPDIR)/$(am__dirstamp) ags/audio/client/libags_audio_la-ags_remote_output.lo: \ ags/audio/client/$(am__dirstamp) \ ags/audio/client/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/$(am__dirstamp): @$(MKDIR_P) ags/audio/thread @: > ags/audio/thread/$(am__dirstamp) ags/audio/thread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/thread/$(DEPDIR) @: > ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_audio_loop.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_audio_thread.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_channel_thread.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_sequencer_thread.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_soundcard_thread.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_export_thread.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_iterator_thread.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_record_thread.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_recycling_thread.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/thread/libags_audio_la-ags_recycling_thread_callbacks.lo: \ ags/audio/thread/$(am__dirstamp) \ ags/audio/thread/$(DEPDIR)/$(am__dirstamp) ags/audio/file/$(am__dirstamp): @$(MKDIR_P) ags/audio/file @: > ags/audio/file/$(am__dirstamp) ags/audio/file/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/file/$(DEPDIR) @: > ags/audio/file/$(DEPDIR)/$(am__dirstamp) ags/audio/file/libags_audio_la-ags_audio_file.lo: \ ags/audio/file/$(am__dirstamp) \ ags/audio/file/$(DEPDIR)/$(am__dirstamp) ags/audio/file/libags_audio_la-ags_audio_file_link.lo: \ ags/audio/file/$(am__dirstamp) \ ags/audio/file/$(DEPDIR)/$(am__dirstamp) ags/audio/file/libags_audio_la-ags_audio_file_xml.lo: \ ags/audio/file/$(am__dirstamp) \ ags/audio/file/$(DEPDIR)/$(am__dirstamp) ags/audio/file/libags_audio_la-ags_audio_xml_serialization_factory.lo: \ ags/audio/file/$(am__dirstamp) \ ags/audio/file/$(DEPDIR)/$(am__dirstamp) ags/audio/file/libags_audio_la-ags_ipatch.lo: \ ags/audio/file/$(am__dirstamp) \ ags/audio/file/$(DEPDIR)/$(am__dirstamp) ags/audio/file/libags_audio_la-ags_ipatch_dls2_reader.lo: \ ags/audio/file/$(am__dirstamp) \ ags/audio/file/$(DEPDIR)/$(am__dirstamp) ags/audio/file/libags_audio_la-ags_ipatch_sf2_reader.lo: \ ags/audio/file/$(am__dirstamp) \ ags/audio/file/$(DEPDIR)/$(am__dirstamp) ags/audio/file/libags_audio_la-ags_sndfile.lo: \ ags/audio/file/$(am__dirstamp) \ ags/audio/file/$(DEPDIR)/$(am__dirstamp) ags/audio/midi/$(am__dirstamp): @$(MKDIR_P) ags/audio/midi @: > ags/audio/midi/$(am__dirstamp) ags/audio/midi/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/midi/$(DEPDIR) @: > ags/audio/midi/$(DEPDIR)/$(am__dirstamp) ags/audio/midi/libags_audio_la-ags_midi_buffer_util.lo: \ ags/audio/midi/$(am__dirstamp) \ ags/audio/midi/$(DEPDIR)/$(am__dirstamp) ags/audio/midi/libags_audio_la-ags_midi_util.lo: \ ags/audio/midi/$(am__dirstamp) \ ags/audio/midi/$(DEPDIR)/$(am__dirstamp) ags/audio/midi/libags_audio_la-ags_midi_builder.lo: \ ags/audio/midi/$(am__dirstamp) \ ags/audio/midi/$(DEPDIR)/$(am__dirstamp) ags/audio/midi/libags_audio_la-ags_midi_file.lo: \ ags/audio/midi/$(am__dirstamp) \ ags/audio/midi/$(DEPDIR)/$(am__dirstamp) ags/audio/midi/libags_audio_la-ags_midi_parser.lo: \ ags/audio/midi/$(am__dirstamp) \ ags/audio/midi/$(DEPDIR)/$(am__dirstamp) ags/audio/jack/$(am__dirstamp): @$(MKDIR_P) ags/audio/jack @: > ags/audio/jack/$(am__dirstamp) ags/audio/jack/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/jack/$(DEPDIR) @: > ags/audio/jack/$(DEPDIR)/$(am__dirstamp) ags/audio/jack/libags_audio_la-ags_jack_client.lo: \ ags/audio/jack/$(am__dirstamp) \ ags/audio/jack/$(DEPDIR)/$(am__dirstamp) ags/audio/jack/libags_audio_la-ags_jack_midiin.lo: \ ags/audio/jack/$(am__dirstamp) \ ags/audio/jack/$(DEPDIR)/$(am__dirstamp) ags/audio/jack/libags_audio_la-ags_jack_devout.lo: \ ags/audio/jack/$(am__dirstamp) \ ags/audio/jack/$(DEPDIR)/$(am__dirstamp) ags/audio/jack/libags_audio_la-ags_jack_devin.lo: \ ags/audio/jack/$(am__dirstamp) \ ags/audio/jack/$(DEPDIR)/$(am__dirstamp) ags/audio/jack/libags_audio_la-ags_jack_port.lo: \ ags/audio/jack/$(am__dirstamp) \ ags/audio/jack/$(DEPDIR)/$(am__dirstamp) ags/audio/jack/libags_audio_la-ags_jack_server.lo: \ ags/audio/jack/$(am__dirstamp) \ ags/audio/jack/$(DEPDIR)/$(am__dirstamp) ags/audio/pulse/$(am__dirstamp): @$(MKDIR_P) ags/audio/pulse @: > ags/audio/pulse/$(am__dirstamp) ags/audio/pulse/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/pulse/$(DEPDIR) @: > ags/audio/pulse/$(DEPDIR)/$(am__dirstamp) ags/audio/pulse/libags_audio_la-ags_pulse_client.lo: \ ags/audio/pulse/$(am__dirstamp) \ ags/audio/pulse/$(DEPDIR)/$(am__dirstamp) ags/audio/pulse/libags_audio_la-ags_pulse_devout.lo: \ ags/audio/pulse/$(am__dirstamp) \ ags/audio/pulse/$(DEPDIR)/$(am__dirstamp) ags/audio/pulse/libags_audio_la-ags_pulse_devin.lo: \ ags/audio/pulse/$(am__dirstamp) \ ags/audio/pulse/$(DEPDIR)/$(am__dirstamp) ags/audio/pulse/libags_audio_la-ags_pulse_port.lo: \ ags/audio/pulse/$(am__dirstamp) \ ags/audio/pulse/$(DEPDIR)/$(am__dirstamp) ags/audio/pulse/libags_audio_la-ags_pulse_server.lo: \ ags/audio/pulse/$(am__dirstamp) \ ags/audio/pulse/$(DEPDIR)/$(am__dirstamp) ags/audio/core-audio/$(am__dirstamp): @$(MKDIR_P) ags/audio/core-audio @: > ags/audio/core-audio/$(am__dirstamp) ags/audio/core-audio/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/core-audio/$(DEPDIR) @: > ags/audio/core-audio/$(DEPDIR)/$(am__dirstamp) ags/audio/core-audio/libags_audio_la-ags_core_audio_client.lo: \ ags/audio/core-audio/$(am__dirstamp) \ ags/audio/core-audio/$(DEPDIR)/$(am__dirstamp) ags/audio/core-audio/libags_audio_la-ags_core_audio_midiin.lo: \ ags/audio/core-audio/$(am__dirstamp) \ ags/audio/core-audio/$(DEPDIR)/$(am__dirstamp) ags/audio/core-audio/libags_audio_la-ags_core_audio_devout.lo: \ ags/audio/core-audio/$(am__dirstamp) \ ags/audio/core-audio/$(DEPDIR)/$(am__dirstamp) ags/audio/core-audio/libags_audio_la-ags_core_audio_port.lo: \ ags/audio/core-audio/$(am__dirstamp) \ ags/audio/core-audio/$(DEPDIR)/$(am__dirstamp) ags/audio/core-audio/libags_audio_la-ags_core_audio_server.lo: \ ags/audio/core-audio/$(am__dirstamp) \ ags/audio/core-audio/$(DEPDIR)/$(am__dirstamp) ags/audio/task/$(am__dirstamp): @$(MKDIR_P) ags/audio/task @: > ags/audio/task/$(am__dirstamp) ags/audio/task/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/task/$(DEPDIR) @: > ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_add_audio.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_add_audio_signal.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_add_effect.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_add_note.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_add_point_to_selection.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_add_recall.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_add_recall_container.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_add_region_to_selection.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_add_soundcard.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_append_audio.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_append_audio_threaded.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_append_channel.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_append_recall.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_apply_presets.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_apply_synth.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_cancel_audio.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_cancel_channel.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_cancel_recall.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_change_soundcard.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_clear_audio_signal.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_clear_buffer.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_crop_note.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_export_output.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_free_selection.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_init_audio.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_init_channel.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_link_channel.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_move_note.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_notify_soundcard.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_open_file.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_open_sf2_sample.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_open_single_file.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_remove_audio.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_remove_audio_signal.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_remove_note.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_remove_point_from_selection.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_remove_recall.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_remove_recall_container.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_remove_region_from_selection.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_remove_soundcard.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_reset_audio_connection.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_resize_audio.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_save_file.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_seek_soundcard.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_set_audio_channels.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_set_buffer_size.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_set_format.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_set_input_device.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_set_output_device.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_set_samplerate.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_start_sequencer.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_start_soundcard.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_switch_buffer_flag.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_tic_device.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_toggle_pattern_bit.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/libags_audio_la-ags_unref_audio_signal.lo: \ ags/audio/task/$(am__dirstamp) \ ags/audio/task/$(DEPDIR)/$(am__dirstamp) ags/audio/task/recall/$(am__dirstamp): @$(MKDIR_P) ags/audio/task/recall @: > ags/audio/task/recall/$(am__dirstamp) ags/audio/task/recall/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/task/recall/$(DEPDIR) @: > ags/audio/task/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/task/recall/libags_audio_la-ags_apply_bpm.lo: \ ags/audio/task/recall/$(am__dirstamp) \ ags/audio/task/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/task/recall/libags_audio_la-ags_apply_sequencer_length.lo: \ ags/audio/task/recall/$(am__dirstamp) \ ags/audio/task/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/task/recall/libags_audio_la-ags_apply_tact.lo: \ ags/audio/task/recall/$(am__dirstamp) \ ags/audio/task/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/task/recall/libags_audio_la-ags_reset_peak.lo: \ ags/audio/task/recall/$(am__dirstamp) \ ags/audio/task/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/task/recall/libags_audio_la-ags_set_muted.lo: \ ags/audio/task/recall/$(am__dirstamp) \ ags/audio/task/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/$(am__dirstamp): @$(MKDIR_P) ags/audio/recall @: > ags/audio/recall/$(am__dirstamp) ags/audio/recall/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/audio/recall/$(DEPDIR) @: > ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_buffer_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_buffer_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_buffer_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_buffer_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_capture_sound_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_capture_sound_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_notation_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_notation_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_pattern_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_pattern_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_pattern_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_pattern_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_copy_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_count_beats_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_count_beats_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_delay_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_delay_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_envelope_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_envelope_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_envelope_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_envelope_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_feed_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_feed_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_feed_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_feed_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_loop_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_loop_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_mute_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_mute_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_mute_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_mute_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_mute_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_mute_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_peak_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_peak_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_peak_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_peak_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_audio_file.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_channel_run_master.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_dssi_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_dssi_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_lv2_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_lv2_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_notation_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_notation_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_note.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_play_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_prepare_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_prepare_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_prepare_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_prepare_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_record_midi_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_record_midi_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_route_dssi_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_route_dssi_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_route_lv2_audio.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_route_lv2_audio_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_rt_stream_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_rt_stream_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_rt_stream_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_rt_stream_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_stream_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_stream_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_stream_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_stream_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_volume_audio_signal.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_volume_channel.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_volume_channel_run.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/audio/recall/libags_audio_la-ags_volume_recycling.lo: \ ags/audio/recall/$(am__dirstamp) \ ags/audio/recall/$(DEPDIR)/$(am__dirstamp) ags/plugin/$(am__dirstamp): @$(MKDIR_P) ags/plugin @: > ags/plugin/$(am__dirstamp) ags/plugin/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/plugin/$(DEPDIR) @: > ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_base_plugin.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_dssi_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_dssi_plugin.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_ladspa_conversion.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_ladspa_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_ladspa_plugin.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_conversion.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_plugin.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_preset.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_log_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_event_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_option_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_uri_map_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_urid_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_worker_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2_worker.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2ui_manager.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_lv2ui_plugin.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) ags/plugin/libags_audio_la-ags_plugin_factory.lo: \ ags/plugin/$(am__dirstamp) \ ags/plugin/$(DEPDIR)/$(am__dirstamp) libags_audio.la: $(libags_audio_la_OBJECTS) $(libags_audio_la_DEPENDENCIES) $(EXTRA_libags_audio_la_DEPENDENCIES) $(AM_V_CCLD)$(libags_audio_la_LINK) -rpath $(libdir) $(libags_audio_la_OBJECTS) $(libags_audio_la_LIBADD) $(LIBS) ags/widget/$(am__dirstamp): @$(MKDIR_P) ags/widget @: > ags/widget/$(am__dirstamp) ags/widget/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/widget/$(DEPDIR) @: > ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_cartesian.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_dial.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_expander.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_expander_set.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_hindicator.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_hled_array.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_htimebar.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_indicator.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_led.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_led_array.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_level.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_level_box.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_hlevel_box.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_vlevel_box.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_notebook.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_piano.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_scrolled_piano.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_scale.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_scale_box.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_vscale_box.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_hscale_box.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_scrolled_scale_box.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_scrolled_level_box.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_ruler.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_table.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_timebar.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_vindicator.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_vled_array.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_waveform.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_widget_marshal.lo: \ ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) ags/widget/libags_gui_la-ags_container.lo: ags/widget/$(am__dirstamp) \ ags/widget/$(DEPDIR)/$(am__dirstamp) libags_gui.la: $(libags_gui_la_OBJECTS) $(libags_gui_la_DEPENDENCIES) $(EXTRA_libags_gui_la_DEPENDENCIES) $(AM_V_CCLD)$(libags_gui_la_LINK) -rpath $(libdir) $(libags_gui_la_OBJECTS) $(libags_gui_la_LIBADD) $(LIBS) ags/server/$(am__dirstamp): @$(MKDIR_P) ags/server @: > ags/server/$(am__dirstamp) ags/server/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/server/$(DEPDIR) @: > ags/server/$(DEPDIR)/$(am__dirstamp) ags/server/libags_server_la-ags_registry.lo: \ ags/server/$(am__dirstamp) \ ags/server/$(DEPDIR)/$(am__dirstamp) ags/server/libags_server_la-ags_server.lo: ags/server/$(am__dirstamp) \ ags/server/$(DEPDIR)/$(am__dirstamp) ags/server/libags_server_la-ags_server_application_context.lo: \ ags/server/$(am__dirstamp) \ ags/server/$(DEPDIR)/$(am__dirstamp) ags/server/libags_server_la-ags_server_status.lo: \ ags/server/$(am__dirstamp) \ ags/server/$(DEPDIR)/$(am__dirstamp) ags/server/libags_server_la-ags_service_provider.lo: \ ags/server/$(am__dirstamp) \ ags/server/$(DEPDIR)/$(am__dirstamp) ags/server/security/$(am__dirstamp): @$(MKDIR_P) ags/server/security @: > ags/server/security/$(am__dirstamp) ags/server/security/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/server/security/$(DEPDIR) @: > ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_authentication.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_authentication_manager.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_business_group.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_certificate.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_certificate_manager.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_password_store.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_password_store_manager.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_security_context.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_xml_authentication.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_xml_certificate.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/security/libags_server_la-ags_xml_password_store.lo: \ ags/server/security/$(am__dirstamp) \ ags/server/security/$(DEPDIR)/$(am__dirstamp) ags/server/controller/$(am__dirstamp): @$(MKDIR_P) ags/server/controller @: > ags/server/controller/$(am__dirstamp) ags/server/controller/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/server/controller/$(DEPDIR) @: > ags/server/controller/$(DEPDIR)/$(am__dirstamp) ags/server/controller/libags_server_la-ags_controller.lo: \ ags/server/controller/$(am__dirstamp) \ ags/server/controller/$(DEPDIR)/$(am__dirstamp) ags/server/controller/libags_server_la-ags_front_controller.lo: \ ags/server/controller/$(am__dirstamp) \ ags/server/controller/$(DEPDIR)/$(am__dirstamp) ags/server/controller/libags_server_la-ags_local_factory_controller.lo: \ ags/server/controller/$(am__dirstamp) \ ags/server/controller/$(DEPDIR)/$(am__dirstamp) ags/server/controller/libags_server_la-ags_local_registry_controller.lo: \ ags/server/controller/$(am__dirstamp) \ ags/server/controller/$(DEPDIR)/$(am__dirstamp) ags/server/controller/libags_server_la-ags_local_serialization_controller.lo: \ ags/server/controller/$(am__dirstamp) \ ags/server/controller/$(DEPDIR)/$(am__dirstamp) ags/server/controller/libags_server_la-ags_local_task_controller.lo: \ ags/server/controller/$(am__dirstamp) \ ags/server/controller/$(DEPDIR)/$(am__dirstamp) ags/server/thread/$(am__dirstamp): @$(MKDIR_P) ags/server/thread @: > ags/server/thread/$(am__dirstamp) ags/server/thread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/server/thread/$(DEPDIR) @: > ags/server/thread/$(DEPDIR)/$(am__dirstamp) ags/server/thread/libags_server_la-ags_remote_task.lo: \ ags/server/thread/$(am__dirstamp) \ ags/server/thread/$(DEPDIR)/$(am__dirstamp) ags/server/thread/libags_server_la-ags_remote_task_thread.lo: \ ags/server/thread/$(am__dirstamp) \ ags/server/thread/$(DEPDIR)/$(am__dirstamp) libags_server.la: $(libags_server_la_OBJECTS) $(libags_server_la_DEPENDENCIES) $(EXTRA_libags_server_la_DEPENDENCIES) $(AM_V_CCLD)$(libags_server_la_LINK) -rpath $(libdir) $(libags_server_la_OBJECTS) $(libags_server_la_LIBADD) $(LIBS) ags/thread/$(am__dirstamp): @$(MKDIR_P) ags/thread @: > ags/thread/$(am__dirstamp) ags/thread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/thread/$(DEPDIR) @: > ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_autosave_thread.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_concurrency_provider.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_condition_manager.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_destroy_worker.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_generic_main_loop.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_history.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_message_delivery.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_message_queue.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_mutex_manager.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_poll_fd.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_polling_thread.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_returnable_thread.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_single_thread.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_task_completion.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_task.lo: ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_task_thread.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_thread_application_context.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_thread_pool.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_thread-posix.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_timestamp_factory.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_timestamp_thread.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_timestamp.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/libags_thread_la-ags_worker_thread.lo: \ ags/thread/$(am__dirstamp) \ ags/thread/$(DEPDIR)/$(am__dirstamp) ags/thread/file/$(am__dirstamp): @$(MKDIR_P) ags/thread/file @: > ags/thread/file/$(am__dirstamp) ags/thread/file/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/thread/file/$(DEPDIR) @: > ags/thread/file/$(DEPDIR)/$(am__dirstamp) ags/thread/file/libags_thread_la-ags_thread_file_xml.lo: \ ags/thread/file/$(am__dirstamp) \ ags/thread/file/$(DEPDIR)/$(am__dirstamp) ags/thread/file/libags_thread_la-ags_thread_xml_serialization_factory.lo: \ ags/thread/file/$(am__dirstamp) \ ags/thread/file/$(DEPDIR)/$(am__dirstamp) libags_thread.la: $(libags_thread_la_OBJECTS) $(libags_thread_la_DEPENDENCIES) $(EXTRA_libags_thread_la_DEPENDENCIES) $(AM_V_CCLD)$(libags_thread_la_LINK) -rpath $(libdir) $(libags_thread_la_OBJECTS) $(libags_thread_la_LIBADD) $(LIBS) ags/X/$(am__dirstamp): @$(MKDIR_P) ags/X @: > ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/X/$(DEPDIR) @: > ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_automation_editor.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_automation_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_automation_window.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_automation_window_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_audio_preferences.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_audio_preferences_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_bulk_member.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_bulk_member_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_connection_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_connection_editor.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_context_menu.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_dssi_browser_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_dssi_browser.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_effect_bridge.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_effect_bridge_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_effect_bulk.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_effect_bulk_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_effect_line.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_effect_line_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_effect_pad.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_effect_pad_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_effect_separator.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_export_soundcard.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_export_soundcard_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_export_window.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_export_window_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_generic_preferences.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_generic_preferences_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_history_browser.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_history_browser_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_ladspa_browser.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_ladspa_browser_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_lv2_browser.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_lv2_browser_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_line.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_line_callbacks.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_line_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_line_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_line_member.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_line_member_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_line_member_editor.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_line_member_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_link_collection_editor.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_link_collection_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_link_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_link_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_listing_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_listing_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_machine.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_machine_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_machine_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_machine_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_menu_action_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_menu_bar.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_midi_dialog.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_midi_dialog_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_midi_preferences.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_midi_preferences_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_navigation.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_navigation_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_notation_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_notation_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_output_collection_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_output_collection_editor.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_output_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_output_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_output_listing_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_output_listing_editor.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_pad.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_pad_callbacks.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_pad_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_pad_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_performance_preferences.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_performance_preferences_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_playback_window.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_playback_window_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_plugin_browser.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_plugin_browser_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_plugin_preferences.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_plugin_preferences_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_preferences.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_preferences_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_property_collection_editor.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_property_collection_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_property_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_property_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_property_listing_editor.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_resize_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_sequencer_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_sequencer_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_server_preferences.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_server_preferences_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_ui_provider.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_wave_window_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_wave_window.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_wave_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_wave_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_window.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_soundcard_editor_callbacks.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_soundcard_editor.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_window_callbacks.lo: ags/X/$(am__dirstamp) \ ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/libgsequencer_la-ags_xorg_application_context.lo: \ ags/X/$(am__dirstamp) ags/X/$(DEPDIR)/$(am__dirstamp) ags/X/file/$(am__dirstamp): @$(MKDIR_P) ags/X/file @: > ags/X/file/$(am__dirstamp) ags/X/file/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/X/file/$(DEPDIR) @: > ags/X/file/$(DEPDIR)/$(am__dirstamp) ags/X/file/libgsequencer_la-ags_gui_file_xml.lo: \ ags/X/file/$(am__dirstamp) \ ags/X/file/$(DEPDIR)/$(am__dirstamp) ags/X/file/libgsequencer_la-ags_simple_file.lo: \ ags/X/file/$(am__dirstamp) \ ags/X/file/$(DEPDIR)/$(am__dirstamp) ags/X/thread/$(am__dirstamp): @$(MKDIR_P) ags/X/thread @: > ags/X/thread/$(am__dirstamp) ags/X/thread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/X/thread/$(DEPDIR) @: > ags/X/thread/$(DEPDIR)/$(am__dirstamp) ags/X/thread/libgsequencer_la-ags_gui_thread.lo: \ ags/X/thread/$(am__dirstamp) \ ags/X/thread/$(DEPDIR)/$(am__dirstamp) ags/X/thread/libgsequencer_la-ags_simple_autosave_thread.lo: \ ags/X/thread/$(am__dirstamp) \ ags/X/thread/$(DEPDIR)/$(am__dirstamp) ags/X/task/$(am__dirstamp): @$(MKDIR_P) ags/X/task @: > ags/X/task/$(am__dirstamp) ags/X/task/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/X/task/$(DEPDIR) @: > ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_add_bulk_member.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_add_line_member.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_add_sequencer_editor_jack.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_add_soundcard_editor_sink.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_blink_cell_pattern_cursor.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_change_indicator.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_change_tact.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_display_tact.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_remove_sequencer_editor_jack.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_remove_soundcard_editor_sink.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_simple_file_read.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_simple_file_write.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_toggle_led.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/task/libgsequencer_la-ags_update_bulk_member.lo: \ ags/X/task/$(am__dirstamp) \ ags/X/task/$(DEPDIR)/$(am__dirstamp) ags/X/import/$(am__dirstamp): @$(MKDIR_P) ags/X/import @: > ags/X/import/$(am__dirstamp) ags/X/import/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/X/import/$(DEPDIR) @: > ags/X/import/$(DEPDIR)/$(am__dirstamp) ags/X/import/libgsequencer_la-ags_midi_import_wizard.lo: \ ags/X/import/$(am__dirstamp) \ ags/X/import/$(DEPDIR)/$(am__dirstamp) ags/X/import/libgsequencer_la-ags_midi_import_wizard_callbacks.lo: \ ags/X/import/$(am__dirstamp) \ ags/X/import/$(DEPDIR)/$(am__dirstamp) ags/X/import/libgsequencer_la-ags_track_collection.lo: \ ags/X/import/$(am__dirstamp) \ ags/X/import/$(DEPDIR)/$(am__dirstamp) ags/X/import/libgsequencer_la-ags_track_collection_callbacks.lo: \ ags/X/import/$(am__dirstamp) \ ags/X/import/$(DEPDIR)/$(am__dirstamp) ags/X/import/libgsequencer_la-ags_track_collection_mapper.lo: \ ags/X/import/$(am__dirstamp) \ ags/X/import/$(DEPDIR)/$(am__dirstamp) ags/X/import/libgsequencer_la-ags_track_collection_mapper_callbacks.lo: \ ags/X/import/$(am__dirstamp) \ ags/X/import/$(DEPDIR)/$(am__dirstamp) ags/X/export/$(am__dirstamp): @$(MKDIR_P) ags/X/export @: > ags/X/export/$(am__dirstamp) ags/X/export/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/X/export/$(DEPDIR) @: > ags/X/export/$(DEPDIR)/$(am__dirstamp) ags/X/export/libgsequencer_la-ags_midi_export_wizard.lo: \ ags/X/export/$(am__dirstamp) \ ags/X/export/$(DEPDIR)/$(am__dirstamp) ags/X/export/libgsequencer_la-ags_midi_export_wizard_callbacks.lo: \ ags/X/export/$(am__dirstamp) \ ags/X/export/$(DEPDIR)/$(am__dirstamp) ags/X/export/libgsequencer_la-ags_machine_collection.lo: \ ags/X/export/$(am__dirstamp) \ ags/X/export/$(DEPDIR)/$(am__dirstamp) ags/X/export/libgsequencer_la-ags_machine_collection_callbacks.lo: \ ags/X/export/$(am__dirstamp) \ ags/X/export/$(DEPDIR)/$(am__dirstamp) ags/X/export/libgsequencer_la-ags_machine_collection_entry.lo: \ ags/X/export/$(am__dirstamp) \ ags/X/export/$(DEPDIR)/$(am__dirstamp) ags/X/export/libgsequencer_la-ags_machine_collection_entry_callbacks.lo: \ ags/X/export/$(am__dirstamp) \ ags/X/export/$(DEPDIR)/$(am__dirstamp) ags/X/machine/$(am__dirstamp): @$(MKDIR_P) ags/X/machine @: > ags/X/machine/$(am__dirstamp) ags/X/machine/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/X/machine/$(DEPDIR) @: > ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_audiorec.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_audiorec_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_cell_pattern.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_cell_pattern_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum_input_line.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum_input_line_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum_input_pad.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum_input_pad_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum_output_line.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum_output_line_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum_output_pad.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_drum_output_pad_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_dssi_bridge.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_dssi_bridge_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer_bridge.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer_bridge_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer_input_line.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer_input_line_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ladspa_bridge.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_ladspa_bridge_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_live_dssi_bridge.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_live_dssi_bridge_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_live_lv2_bridge.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_live_lv2_bridge_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_lv2_bridge.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_lv2_bridge_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_matrix.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_matrix_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_matrix_bridge.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_matrix_bridge_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_matrix_bulk_input.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_matrix_bulk_input_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_mixer.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_mixer_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_mixer_input_line.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_mixer_input_pad.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_oscillator.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_oscillator_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_panel.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_panel_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_panel_input_line.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_panel_input_line_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_panel_input_pad.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_pattern_box_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_pattern_box.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_syncsynth.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_syncsynth_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_synth.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_synth_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_synth_input_line.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_synth_input_line_callbacks.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/machine/libgsequencer_la-ags_synth_input_pad.lo: \ ags/X/machine/$(am__dirstamp) \ ags/X/machine/$(DEPDIR)/$(am__dirstamp) ags/X/editor/$(am__dirstamp): @$(MKDIR_P) ags/X/editor @: > ags/X/editor/$(am__dirstamp) ags/X/editor/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/X/editor/$(DEPDIR) @: > ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_automation_edit.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_automation_edit_box.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_automation_edit_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_automation_toolbar.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_automation_toolbar_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_crop_note_dialog_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_crop_note_dialog.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_envelope_dialog_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_envelope_dialog.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_envelope_editor_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_envelope_editor.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_envelope_info_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_envelope_info.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_file_selection_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_file_selection.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_inline_player.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_inline_player_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_machine_radio_button.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_machine_radio_button_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_machine_selection.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_machine_selector.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_machine_selector_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_move_note_dialog_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_move_note_dialog.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_notation_edit.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_notation_edit_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_notation_toolbar.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_notation_toolbar_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_pattern_envelope_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_pattern_envelope.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_scrolled_automation_edit_box.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_scrolled_wave_edit_box.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_select_note_dialog.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_select_note_dialog_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_sf2_chooser.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_sf2_chooser_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_vautomation_edit_box.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_vwave_edit_box.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_wave_edit.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_wave_edit_box.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_wave_edit_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_wave_toolbar.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) ags/X/editor/libgsequencer_la-ags_wave_toolbar_callbacks.lo: \ ags/X/editor/$(am__dirstamp) \ ags/X/editor/$(DEPDIR)/$(am__dirstamp) libgsequencer.la: $(libgsequencer_la_OBJECTS) $(libgsequencer_la_DEPENDENCIES) $(EXTRA_libgsequencer_la_DEPENDENCIES) $(AM_V_CCLD)$(libgsequencer_la_LINK) -rpath $(libgsequencerdir) $(libgsequencer_la_OBJECTS) $(libgsequencer_la_LIBADD) $(LIBS) ags/test/X/$(am__dirstamp): @$(MKDIR_P) ags/test/X @: > ags/test/X/$(am__dirstamp) ags/test/X/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/X/$(DEPDIR) @: > ags/test/X/$(DEPDIR)/$(am__dirstamp) ags/test/X/libgsequencer_test_la-gsequencer_setup_util.lo: \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags/test/X/libgsequencer_test_la-ags_functional_test_util.lo: \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) libgsequencer_test.la: $(libgsequencer_test_la_OBJECTS) $(libgsequencer_test_la_DEPENDENCIES) $(EXTRA_libgsequencer_test_la_DEPENDENCIES) $(AM_V_CCLD)$(libgsequencer_test_la_LINK) $(libgsequencer_test_la_OBJECTS) $(libgsequencer_test_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ags/test/audio/$(am__dirstamp): @$(MKDIR_P) ags/test/audio @: > ags/test/audio/$(am__dirstamp) ags/test/audio/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/audio/$(DEPDIR) @: > ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags/test/audio/ags_acceleration_test-ags_acceleration_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_acceleration_test$(EXEEXT): $(ags_acceleration_test_OBJECTS) $(ags_acceleration_test_DEPENDENCIES) $(EXTRA_ags_acceleration_test_DEPENDENCIES) @rm -f ags_acceleration_test$(EXEEXT) $(AM_V_CCLD)$(ags_acceleration_test_LINK) $(ags_acceleration_test_OBJECTS) $(ags_acceleration_test_LDADD) $(LIBS) ags/test/object/$(am__dirstamp): @$(MKDIR_P) ags/test/object @: > ags/test/object/$(am__dirstamp) ags/test/object/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/object/$(DEPDIR) @: > ags/test/object/$(DEPDIR)/$(am__dirstamp) ags/test/object/ags_application_context_test-ags_application_context_test.$(OBJEXT): \ ags/test/object/$(am__dirstamp) \ ags/test/object/$(DEPDIR)/$(am__dirstamp) ags_application_context_test$(EXEEXT): $(ags_application_context_test_OBJECTS) $(ags_application_context_test_DEPENDENCIES) $(EXTRA_ags_application_context_test_DEPENDENCIES) @rm -f ags_application_context_test$(EXEEXT) $(AM_V_CCLD)$(ags_application_context_test_LINK) $(ags_application_context_test_OBJECTS) $(ags_application_context_test_LDADD) $(LIBS) ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_audio_application_context_test$(EXEEXT): $(ags_audio_application_context_test_OBJECTS) $(ags_audio_application_context_test_DEPENDENCIES) $(EXTRA_ags_audio_application_context_test_DEPENDENCIES) @rm -f ags_audio_application_context_test$(EXEEXT) $(AM_V_CCLD)$(ags_audio_application_context_test_LINK) $(ags_audio_application_context_test_OBJECTS) $(ags_audio_application_context_test_LDADD) $(LIBS) ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_audio_connection_test$(EXEEXT): $(ags_audio_connection_test_OBJECTS) $(ags_audio_connection_test_DEPENDENCIES) $(EXTRA_ags_audio_connection_test_DEPENDENCIES) @rm -f ags_audio_connection_test$(EXEEXT) $(AM_V_CCLD)$(ags_audio_connection_test_LINK) $(ags_audio_connection_test_OBJECTS) $(ags_audio_connection_test_LDADD) $(LIBS) ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_audio_signal_test$(EXEEXT): $(ags_audio_signal_test_OBJECTS) $(ags_audio_signal_test_DEPENDENCIES) $(EXTRA_ags_audio_signal_test_DEPENDENCIES) @rm -f ags_audio_signal_test$(EXEEXT) $(AM_V_CCLD)$(ags_audio_signal_test_LINK) $(ags_audio_signal_test_OBJECTS) $(ags_audio_signal_test_LDADD) $(LIBS) ags/test/audio/ags_audio_test-ags_audio_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_audio_test$(EXEEXT): $(ags_audio_test_OBJECTS) $(ags_audio_test_DEPENDENCIES) $(EXTRA_ags_audio_test_DEPENDENCIES) @rm -f ags_audio_test$(EXEEXT) $(AM_V_CCLD)$(ags_audio_test_LINK) $(ags_audio_test_OBJECTS) $(ags_audio_test_LDADD) $(LIBS) ags/test/audio/ags_automation_test-ags_automation_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_automation_test$(EXEEXT): $(ags_automation_test_OBJECTS) $(ags_automation_test_DEPENDENCIES) $(EXTRA_ags_automation_test_DEPENDENCIES) @rm -f ags_automation_test$(EXEEXT) $(AM_V_CCLD)$(ags_automation_test_LINK) $(ags_automation_test_OBJECTS) $(ags_automation_test_LDADD) $(LIBS) ags/test/plugin/$(am__dirstamp): @$(MKDIR_P) ags/test/plugin @: > ags/test/plugin/$(am__dirstamp) ags/test/plugin/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/plugin/$(DEPDIR) @: > ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_base_plugin_test$(EXEEXT): $(ags_base_plugin_test_OBJECTS) $(ags_base_plugin_test_DEPENDENCIES) $(EXTRA_ags_base_plugin_test_DEPENDENCIES) @rm -f ags_base_plugin_test$(EXEEXT) $(AM_V_CCLD)$(ags_base_plugin_test_LINK) $(ags_base_plugin_test_OBJECTS) $(ags_base_plugin_test_LDADD) $(LIBS) ags/test/audio/ags_channel_test-ags_channel_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_channel_test$(EXEEXT): $(ags_channel_test_OBJECTS) $(ags_channel_test_DEPENDENCIES) $(EXTRA_ags_channel_test_DEPENDENCIES) @rm -f ags_channel_test$(EXEEXT) $(AM_V_CCLD)$(ags_channel_test_LINK) $(ags_channel_test_OBJECTS) $(ags_channel_test_LDADD) $(LIBS) ags/test/lib/$(am__dirstamp): @$(MKDIR_P) ags/test/lib @: > ags/test/lib/$(am__dirstamp) ags/test/lib/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/lib/$(DEPDIR) @: > ags/test/lib/$(DEPDIR)/$(am__dirstamp) ags/test/lib/ags_complex_test-ags_complex_test.$(OBJEXT): \ ags/test/lib/$(am__dirstamp) \ ags/test/lib/$(DEPDIR)/$(am__dirstamp) ags_complex_test$(EXEEXT): $(ags_complex_test_OBJECTS) $(ags_complex_test_DEPENDENCIES) $(EXTRA_ags_complex_test_DEPENDENCIES) @rm -f ags_complex_test$(EXEEXT) $(AM_V_CCLD)$(ags_complex_test_LINK) $(ags_complex_test_OBJECTS) $(ags_complex_test_LDADD) $(LIBS) ags/test/thread/$(am__dirstamp): @$(MKDIR_P) ags/test/thread @: > ags/test/thread/$(am__dirstamp) ags/test/thread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/thread/$(DEPDIR) @: > ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_condition_manager_test$(EXEEXT): $(ags_condition_manager_test_OBJECTS) $(ags_condition_manager_test_DEPENDENCIES) $(EXTRA_ags_condition_manager_test_DEPENDENCIES) @rm -f ags_condition_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_condition_manager_test_LINK) $(ags_condition_manager_test_OBJECTS) $(ags_condition_manager_test_LDADD) $(LIBS) ags/test/object/ags_config_test-ags_config_test.$(OBJEXT): \ ags/test/object/$(am__dirstamp) \ ags/test/object/$(DEPDIR)/$(am__dirstamp) ags_config_test$(EXEEXT): $(ags_config_test_OBJECTS) $(ags_config_test_DEPENDENCIES) $(EXTRA_ags_config_test_DEPENDENCIES) @rm -f ags_config_test$(EXEEXT) $(AM_V_CCLD)$(ags_config_test_LINK) $(ags_config_test_OBJECTS) $(ags_config_test_LDADD) $(LIBS) ags/test/object/ags_connection_manager_test-ags_connection_manager_test.$(OBJEXT): \ ags/test/object/$(am__dirstamp) \ ags/test/object/$(DEPDIR)/$(am__dirstamp) ags_connection_manager_test$(EXEEXT): $(ags_connection_manager_test_OBJECTS) $(ags_connection_manager_test_DEPENDENCIES) $(EXTRA_ags_connection_manager_test_DEPENDENCIES) @rm -f ags_connection_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_connection_manager_test_LINK) $(ags_connection_manager_test_OBJECTS) $(ags_connection_manager_test_LDADD) $(LIBS) ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_destroy_worker_test$(EXEEXT): $(ags_destroy_worker_test_OBJECTS) $(ags_destroy_worker_test_DEPENDENCIES) $(EXTRA_ags_destroy_worker_test_DEPENDENCIES) @rm -f ags_destroy_worker_test$(EXEEXT) $(AM_V_CCLD)$(ags_destroy_worker_test_LINK) $(ags_destroy_worker_test_OBJECTS) $(ags_destroy_worker_test_LDADD) $(LIBS) ags/test/audio/ags_devout_test-ags_devout_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_devout_test$(EXEEXT): $(ags_devout_test_OBJECTS) $(ags_devout_test_DEPENDENCIES) $(EXTRA_ags_devout_test_DEPENDENCIES) @rm -f ags_devout_test$(EXEEXT) $(AM_V_CCLD)$(ags_devout_test_LINK) $(ags_devout_test_OBJECTS) $(ags_devout_test_LDADD) $(LIBS) ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_dssi_manager_test$(EXEEXT): $(ags_dssi_manager_test_OBJECTS) $(ags_dssi_manager_test_DEPENDENCIES) $(EXTRA_ags_dssi_manager_test_DEPENDENCIES) @rm -f ags_dssi_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_dssi_manager_test_LINK) $(ags_dssi_manager_test_OBJECTS) $(ags_dssi_manager_test_LDADD) $(LIBS) ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_dssi_plugin_test$(EXEEXT): $(ags_dssi_plugin_test_OBJECTS) $(ags_dssi_plugin_test_DEPENDENCIES) $(EXTRA_ags_dssi_plugin_test_DEPENDENCIES) @rm -f ags_dssi_plugin_test$(EXEEXT) $(AM_V_CCLD)$(ags_dssi_plugin_test_LINK) $(ags_dssi_plugin_test_OBJECTS) $(ags_dssi_plugin_test_LDADD) $(LIBS) ags/test/file/$(am__dirstamp): @$(MKDIR_P) ags/test/file @: > ags/test/file/$(am__dirstamp) ags/test/file/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/file/$(DEPDIR) @: > ags/test/file/$(DEPDIR)/$(am__dirstamp) ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.$(OBJEXT): \ ags/test/file/$(am__dirstamp) \ ags/test/file/$(DEPDIR)/$(am__dirstamp) ags_file_id_ref_test$(EXEEXT): $(ags_file_id_ref_test_OBJECTS) $(ags_file_id_ref_test_DEPENDENCIES) $(EXTRA_ags_file_id_ref_test_DEPENDENCIES) @rm -f ags_file_id_ref_test$(EXEEXT) $(AM_V_CCLD)$(ags_file_id_ref_test_LINK) $(ags_file_id_ref_test_OBJECTS) $(ags_file_id_ref_test_LDADD) $(LIBS) ags/test/file/ags_file_launch_test-ags_file_launch_test.$(OBJEXT): \ ags/test/file/$(am__dirstamp) \ ags/test/file/$(DEPDIR)/$(am__dirstamp) ags_file_launch_test$(EXEEXT): $(ags_file_launch_test_OBJECTS) $(ags_file_launch_test_DEPENDENCIES) $(EXTRA_ags_file_launch_test_DEPENDENCIES) @rm -f ags_file_launch_test$(EXEEXT) $(AM_V_CCLD)$(ags_file_launch_test_LINK) $(ags_file_launch_test_OBJECTS) $(ags_file_launch_test_LDADD) $(LIBS) ags/test/file/ags_file_lookup_test-ags_file_lookup_test.$(OBJEXT): \ ags/test/file/$(am__dirstamp) \ ags/test/file/$(DEPDIR)/$(am__dirstamp) ags_file_lookup_test$(EXEEXT): $(ags_file_lookup_test_OBJECTS) $(ags_file_lookup_test_DEPENDENCIES) $(EXTRA_ags_file_lookup_test_DEPENDENCIES) @rm -f ags_file_lookup_test$(EXEEXT) $(AM_V_CCLD)$(ags_file_lookup_test_LINK) $(ags_file_lookup_test_OBJECTS) $(ags_file_lookup_test_LDADD) $(LIBS) ags/test/file/ags_file_test-ags_file_test.$(OBJEXT): \ ags/test/file/$(am__dirstamp) \ ags/test/file/$(DEPDIR)/$(am__dirstamp) ags_file_test$(EXEEXT): $(ags_file_test_OBJECTS) $(ags_file_test_DEPENDENCIES) $(EXTRA_ags_file_test_DEPENDENCIES) @rm -f ags_file_test$(EXEEXT) $(AM_V_CCLD)$(ags_file_test_LINK) $(ags_file_test_OBJECTS) $(ags_file_test_LDADD) $(LIBS) ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_functional_audio_test$(EXEEXT): $(ags_functional_audio_test_OBJECTS) $(ags_functional_audio_test_DEPENDENCIES) $(EXTRA_ags_functional_audio_test_DEPENDENCIES) @rm -f ags_functional_audio_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_audio_test_LINK) $(ags_functional_audio_test_OBJECTS) $(ags_functional_audio_test_LDADD) $(LIBS) ags/test/X/machine/$(am__dirstamp): @$(MKDIR_P) ags/test/X/machine @: > ags/test/X/machine/$(am__dirstamp) ags/test/X/machine/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/X/machine/$(DEPDIR) @: > ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_functional_drum_test$(EXEEXT): $(ags_functional_drum_test_OBJECTS) $(ags_functional_drum_test_DEPENDENCIES) $(EXTRA_ags_functional_drum_test_DEPENDENCIES) @rm -f ags_functional_drum_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_drum_test_LINK) $(ags_functional_drum_test_OBJECTS) $(ags_functional_drum_test_LDADD) $(LIBS) ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_functional_editor_workflow_test$(EXEEXT): $(ags_functional_editor_workflow_test_OBJECTS) $(ags_functional_editor_workflow_test_DEPENDENCIES) $(EXTRA_ags_functional_editor_workflow_test_DEPENDENCIES) @rm -f ags_functional_editor_workflow_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_editor_workflow_test_LINK) $(ags_functional_editor_workflow_test_OBJECTS) $(ags_functional_editor_workflow_test_LDADD) $(LIBS) ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_functional_ffplayer_test$(EXEEXT): $(ags_functional_ffplayer_test_OBJECTS) $(ags_functional_ffplayer_test_DEPENDENCIES) $(EXTRA_ags_functional_ffplayer_test_DEPENDENCIES) @rm -f ags_functional_ffplayer_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_ffplayer_test_LINK) $(ags_functional_ffplayer_test_OBJECTS) $(ags_functional_ffplayer_test_LDADD) $(LIBS) ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_functional_line_member_add_and_destroy_test$(EXEEXT): $(ags_functional_line_member_add_and_destroy_test_OBJECTS) $(ags_functional_line_member_add_and_destroy_test_DEPENDENCIES) $(EXTRA_ags_functional_line_member_add_and_destroy_test_DEPENDENCIES) @rm -f ags_functional_line_member_add_and_destroy_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_line_member_add_and_destroy_test_LINK) $(ags_functional_line_member_add_and_destroy_test_OBJECTS) $(ags_functional_line_member_add_and_destroy_test_LDADD) $(LIBS) ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_functional_machine_add_and_destroy_test$(EXEEXT): $(ags_functional_machine_add_and_destroy_test_OBJECTS) $(ags_functional_machine_add_and_destroy_test_DEPENDENCIES) $(EXTRA_ags_functional_machine_add_and_destroy_test_DEPENDENCIES) @rm -f ags_functional_machine_add_and_destroy_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_machine_add_and_destroy_test_LINK) $(ags_functional_machine_add_and_destroy_test_OBJECTS) $(ags_functional_machine_add_and_destroy_test_LDADD) $(LIBS) ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_functional_machine_link_test$(EXEEXT): $(ags_functional_machine_link_test_OBJECTS) $(ags_functional_machine_link_test_DEPENDENCIES) $(EXTRA_ags_functional_machine_link_test_DEPENDENCIES) @rm -f ags_functional_machine_link_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_machine_link_test_LINK) $(ags_functional_machine_link_test_OBJECTS) $(ags_functional_machine_link_test_LDADD) $(LIBS) ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_functional_matrix_test$(EXEEXT): $(ags_functional_matrix_test_OBJECTS) $(ags_functional_matrix_test_DEPENDENCIES) $(EXTRA_ags_functional_matrix_test_DEPENDENCIES) @rm -f ags_functional_matrix_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_matrix_test_LINK) $(ags_functional_matrix_test_OBJECTS) $(ags_functional_matrix_test_LDADD) $(LIBS) ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_functional_mixer_test$(EXEEXT): $(ags_functional_mixer_test_OBJECTS) $(ags_functional_mixer_test_DEPENDENCIES) $(EXTRA_ags_functional_mixer_test_DEPENDENCIES) @rm -f ags_functional_mixer_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_mixer_test_LINK) $(ags_functional_mixer_test_OBJECTS) $(ags_functional_mixer_test_LDADD) $(LIBS) ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_functional_notation_edit_test$(EXEEXT): $(ags_functional_notation_edit_test_OBJECTS) $(ags_functional_notation_edit_test_DEPENDENCIES) $(EXTRA_ags_functional_notation_edit_test_DEPENDENCIES) @rm -f ags_functional_notation_edit_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_notation_edit_test_LINK) $(ags_functional_notation_edit_test_OBJECTS) $(ags_functional_notation_edit_test_LDADD) $(LIBS) ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_functional_panel_test$(EXEEXT): $(ags_functional_panel_test_OBJECTS) $(ags_functional_panel_test_DEPENDENCIES) $(EXTRA_ags_functional_panel_test_DEPENDENCIES) @rm -f ags_functional_panel_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_panel_test_LINK) $(ags_functional_panel_test_OBJECTS) $(ags_functional_panel_test_LDADD) $(LIBS) ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_functional_synth_test$(EXEEXT): $(ags_functional_synth_test_OBJECTS) $(ags_functional_synth_test_DEPENDENCIES) $(EXTRA_ags_functional_synth_test_DEPENDENCIES) @rm -f ags_functional_synth_test$(EXEEXT) $(AM_V_CCLD)$(ags_functional_synth_test_LINK) $(ags_functional_synth_test_OBJECTS) $(ags_functional_synth_test_LDADD) $(LIBS) ags/test/audio/ags_input_test-ags_input_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_input_test$(EXEEXT): $(ags_input_test_OBJECTS) $(ags_input_test_DEPENDENCIES) $(EXTRA_ags_input_test_DEPENDENCIES) @rm -f ags_input_test$(EXEEXT) $(AM_V_CCLD)$(ags_input_test_LINK) $(ags_input_test_OBJECTS) $(ags_input_test_LDADD) $(LIBS) ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_ladspa_manager_test$(EXEEXT): $(ags_ladspa_manager_test_OBJECTS) $(ags_ladspa_manager_test_DEPENDENCIES) $(EXTRA_ags_ladspa_manager_test_DEPENDENCIES) @rm -f ags_ladspa_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_ladspa_manager_test_LINK) $(ags_ladspa_manager_test_OBJECTS) $(ags_ladspa_manager_test_LDADD) $(LIBS) ags/test/lib/ags_log_test-ags_log_test.$(OBJEXT): \ ags/test/lib/$(am__dirstamp) \ ags/test/lib/$(DEPDIR)/$(am__dirstamp) ags_log_test$(EXEEXT): $(ags_log_test_OBJECTS) $(ags_log_test_DEPENDENCIES) $(EXTRA_ags_log_test_DEPENDENCIES) @rm -f ags_log_test$(EXEEXT) $(AM_V_CCLD)$(ags_log_test_LINK) $(ags_log_test_OBJECTS) $(ags_log_test_LDADD) $(LIBS) ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_lv2_manager_test$(EXEEXT): $(ags_lv2_manager_test_OBJECTS) $(ags_lv2_manager_test_DEPENDENCIES) $(EXTRA_ags_lv2_manager_test_DEPENDENCIES) @rm -f ags_lv2_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_lv2_manager_test_LINK) $(ags_lv2_manager_test_OBJECTS) $(ags_lv2_manager_test_LDADD) $(LIBS) ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_lv2_option_manager_test$(EXEEXT): $(ags_lv2_option_manager_test_OBJECTS) $(ags_lv2_option_manager_test_DEPENDENCIES) $(EXTRA_ags_lv2_option_manager_test_DEPENDENCIES) @rm -f ags_lv2_option_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_lv2_option_manager_test_LINK) $(ags_lv2_option_manager_test_OBJECTS) $(ags_lv2_option_manager_test_LDADD) $(LIBS) ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_lv2_plugin_test$(EXEEXT): $(ags_lv2_plugin_test_OBJECTS) $(ags_lv2_plugin_test_DEPENDENCIES) $(EXTRA_ags_lv2_plugin_test_DEPENDENCIES) @rm -f ags_lv2_plugin_test$(EXEEXT) $(AM_V_CCLD)$(ags_lv2_plugin_test_LINK) $(ags_lv2_plugin_test_OBJECTS) $(ags_lv2_plugin_test_LDADD) $(LIBS) ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_lv2_preset_test$(EXEEXT): $(ags_lv2_preset_test_OBJECTS) $(ags_lv2_preset_test_DEPENDENCIES) $(EXTRA_ags_lv2_preset_test_DEPENDENCIES) @rm -f ags_lv2_preset_test$(EXEEXT) $(AM_V_CCLD)$(ags_lv2_preset_test_LINK) $(ags_lv2_preset_test_OBJECTS) $(ags_lv2_preset_test_LDADD) $(LIBS) ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_lv2_uri_map_manager_test$(EXEEXT): $(ags_lv2_uri_map_manager_test_OBJECTS) $(ags_lv2_uri_map_manager_test_DEPENDENCIES) $(EXTRA_ags_lv2_uri_map_manager_test_DEPENDENCIES) @rm -f ags_lv2_uri_map_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_lv2_uri_map_manager_test_LINK) $(ags_lv2_uri_map_manager_test_OBJECTS) $(ags_lv2_uri_map_manager_test_LDADD) $(LIBS) ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_lv2_urid_manager_test$(EXEEXT): $(ags_lv2_urid_manager_test_OBJECTS) $(ags_lv2_urid_manager_test_DEPENDENCIES) $(EXTRA_ags_lv2_urid_manager_test_DEPENDENCIES) @rm -f ags_lv2_urid_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_lv2_urid_manager_test_LINK) $(ags_lv2_urid_manager_test_OBJECTS) $(ags_lv2_urid_manager_test_LDADD) $(LIBS) ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_lv2_worker_manager_test$(EXEEXT): $(ags_lv2_worker_manager_test_OBJECTS) $(ags_lv2_worker_manager_test_DEPENDENCIES) $(EXTRA_ags_lv2_worker_manager_test_DEPENDENCIES) @rm -f ags_lv2_worker_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_lv2_worker_manager_test_LINK) $(ags_lv2_worker_manager_test_OBJECTS) $(ags_lv2_worker_manager_test_LDADD) $(LIBS) ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_lv2ui_manager_test$(EXEEXT): $(ags_lv2ui_manager_test_OBJECTS) $(ags_lv2ui_manager_test_DEPENDENCIES) $(EXTRA_ags_lv2ui_manager_test_DEPENDENCIES) @rm -f ags_lv2ui_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_lv2ui_manager_test_LINK) $(ags_lv2ui_manager_test_OBJECTS) $(ags_lv2ui_manager_test_LDADD) $(LIBS) ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.$(OBJEXT): \ ags/test/plugin/$(am__dirstamp) \ ags/test/plugin/$(DEPDIR)/$(am__dirstamp) ags_lv2ui_plugin_test$(EXEEXT): $(ags_lv2ui_plugin_test_OBJECTS) $(ags_lv2ui_plugin_test_DEPENDENCIES) $(EXTRA_ags_lv2ui_plugin_test_DEPENDENCIES) @rm -f ags_lv2ui_plugin_test$(EXEEXT) $(AM_V_CCLD)$(ags_lv2ui_plugin_test_LINK) $(ags_lv2ui_plugin_test_OBJECTS) $(ags_lv2ui_plugin_test_LDADD) $(LIBS) ags/test/audio/midi/$(am__dirstamp): @$(MKDIR_P) ags/test/audio/midi @: > ags/test/audio/midi/$(am__dirstamp) ags/test/audio/midi/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/audio/midi/$(DEPDIR) @: > ags/test/audio/midi/$(DEPDIR)/$(am__dirstamp) ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.$(OBJEXT): \ ags/test/audio/midi/$(am__dirstamp) \ ags/test/audio/midi/$(DEPDIR)/$(am__dirstamp) ags_midi_buffer_util_test$(EXEEXT): $(ags_midi_buffer_util_test_OBJECTS) $(ags_midi_buffer_util_test_DEPENDENCIES) $(EXTRA_ags_midi_buffer_util_test_DEPENDENCIES) @rm -f ags_midi_buffer_util_test$(EXEEXT) $(AM_V_CCLD)$(ags_midi_buffer_util_test_LINK) $(ags_midi_buffer_util_test_OBJECTS) $(ags_midi_buffer_util_test_LDADD) $(LIBS) ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.$(OBJEXT): \ ags/test/audio/midi/$(am__dirstamp) \ ags/test/audio/midi/$(DEPDIR)/$(am__dirstamp) ags_midi_builder_test$(EXEEXT): $(ags_midi_builder_test_OBJECTS) $(ags_midi_builder_test_DEPENDENCIES) $(EXTRA_ags_midi_builder_test_DEPENDENCIES) @rm -f ags_midi_builder_test$(EXEEXT) $(AM_V_CCLD)$(ags_midi_builder_test_LINK) $(ags_midi_builder_test_OBJECTS) $(ags_midi_builder_test_LDADD) $(LIBS) ags/test/audio/ags_midiin_test-ags_midiin_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_midiin_test$(EXEEXT): $(ags_midiin_test_OBJECTS) $(ags_midiin_test_DEPENDENCIES) $(EXTRA_ags_midiin_test_DEPENDENCIES) @rm -f ags_midiin_test$(EXEEXT) $(AM_V_CCLD)$(ags_midiin_test_LINK) $(ags_midiin_test_OBJECTS) $(ags_midiin_test_LDADD) $(LIBS) ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_mutex_manager_test$(EXEEXT): $(ags_mutex_manager_test_OBJECTS) $(ags_mutex_manager_test_DEPENDENCIES) $(EXTRA_ags_mutex_manager_test_DEPENDENCIES) @rm -f ags_mutex_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_mutex_manager_test_LINK) $(ags_mutex_manager_test_OBJECTS) $(ags_mutex_manager_test_LDADD) $(LIBS) ags/test/audio/ags_notation_test-ags_notation_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_notation_test$(EXEEXT): $(ags_notation_test_OBJECTS) $(ags_notation_test_DEPENDENCIES) $(EXTRA_ags_notation_test_DEPENDENCIES) @rm -f ags_notation_test$(EXEEXT) $(AM_V_CCLD)$(ags_notation_test_LINK) $(ags_notation_test_OBJECTS) $(ags_notation_test_LDADD) $(LIBS) ags/test/audio/ags_note_test-ags_note_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_note_test$(EXEEXT): $(ags_note_test_OBJECTS) $(ags_note_test_DEPENDENCIES) $(EXTRA_ags_note_test_DEPENDENCIES) @rm -f ags_note_test$(EXEEXT) $(AM_V_CCLD)$(ags_note_test_LINK) $(ags_note_test_OBJECTS) $(ags_note_test_LDADD) $(LIBS) ags/test/audio/ags_output_test-ags_output_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_output_test$(EXEEXT): $(ags_output_test_OBJECTS) $(ags_output_test_DEPENDENCIES) $(EXTRA_ags_output_test_DEPENDENCIES) @rm -f ags_output_test$(EXEEXT) $(AM_V_CCLD)$(ags_output_test_LINK) $(ags_output_test_OBJECTS) $(ags_output_test_LDADD) $(LIBS) ags/test/audio/ags_pattern_test-ags_pattern_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_pattern_test$(EXEEXT): $(ags_pattern_test_OBJECTS) $(ags_pattern_test_DEPENDENCIES) $(EXTRA_ags_pattern_test_DEPENDENCIES) @rm -f ags_pattern_test$(EXEEXT) $(AM_V_CCLD)$(ags_pattern_test_LINK) $(ags_pattern_test_OBJECTS) $(ags_pattern_test_LDADD) $(LIBS) ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_playback_domain_test$(EXEEXT): $(ags_playback_domain_test_OBJECTS) $(ags_playback_domain_test_DEPENDENCIES) $(EXTRA_ags_playback_domain_test_DEPENDENCIES) @rm -f ags_playback_domain_test$(EXEEXT) $(AM_V_CCLD)$(ags_playback_domain_test_LINK) $(ags_playback_domain_test_OBJECTS) $(ags_playback_domain_test_LDADD) $(LIBS) ags/test/audio/ags_playback_test-ags_playback_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_playback_test$(EXEEXT): $(ags_playback_test_OBJECTS) $(ags_playback_test_DEPENDENCIES) $(EXTRA_ags_playback_test_DEPENDENCIES) @rm -f ags_playback_test$(EXEEXT) $(AM_V_CCLD)$(ags_playback_test_LINK) $(ags_playback_test_OBJECTS) $(ags_playback_test_LDADD) $(LIBS) ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_poll_fd_test$(EXEEXT): $(ags_poll_fd_test_OBJECTS) $(ags_poll_fd_test_DEPENDENCIES) $(EXTRA_ags_poll_fd_test_DEPENDENCIES) @rm -f ags_poll_fd_test$(EXEEXT) $(AM_V_CCLD)$(ags_poll_fd_test_LINK) $(ags_poll_fd_test_OBJECTS) $(ags_poll_fd_test_LDADD) $(LIBS) ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_polling_thread_test$(EXEEXT): $(ags_polling_thread_test_OBJECTS) $(ags_polling_thread_test_DEPENDENCIES) $(EXTRA_ags_polling_thread_test_DEPENDENCIES) @rm -f ags_polling_thread_test$(EXEEXT) $(AM_V_CCLD)$(ags_polling_thread_test_LINK) $(ags_polling_thread_test_OBJECTS) $(ags_polling_thread_test_LDADD) $(LIBS) ags/test/audio/ags_port_test-ags_port_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_port_test$(EXEEXT): $(ags_port_test_OBJECTS) $(ags_port_test_DEPENDENCIES) $(EXTRA_ags_port_test_DEPENDENCIES) @rm -f ags_port_test$(EXEEXT) $(AM_V_CCLD)$(ags_port_test_LINK) $(ags_port_test_OBJECTS) $(ags_port_test_LDADD) $(LIBS) ags/test/audio/ags_preset_test-ags_preset_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_preset_test$(EXEEXT): $(ags_preset_test_OBJECTS) $(ags_preset_test_DEPENDENCIES) $(EXTRA_ags_preset_test_DEPENDENCIES) @rm -f ags_preset_test$(EXEEXT) $(AM_V_CCLD)$(ags_preset_test_LINK) $(ags_preset_test_OBJECTS) $(ags_preset_test_LDADD) $(LIBS) ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_recall_channel_run_test$(EXEEXT): $(ags_recall_channel_run_test_OBJECTS) $(ags_recall_channel_run_test_DEPENDENCIES) $(EXTRA_ags_recall_channel_run_test_DEPENDENCIES) @rm -f ags_recall_channel_run_test$(EXEEXT) $(AM_V_CCLD)$(ags_recall_channel_run_test_LINK) $(ags_recall_channel_run_test_OBJECTS) $(ags_recall_channel_run_test_LDADD) $(LIBS) ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_recall_channel_test$(EXEEXT): $(ags_recall_channel_test_OBJECTS) $(ags_recall_channel_test_DEPENDENCIES) $(EXTRA_ags_recall_channel_test_DEPENDENCIES) @rm -f ags_recall_channel_test$(EXEEXT) $(AM_V_CCLD)$(ags_recall_channel_test_LINK) $(ags_recall_channel_test_OBJECTS) $(ags_recall_channel_test_LDADD) $(LIBS) ags/test/audio/ags_recall_container_test-ags_recall_container_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_recall_container_test$(EXEEXT): $(ags_recall_container_test_OBJECTS) $(ags_recall_container_test_DEPENDENCIES) $(EXTRA_ags_recall_container_test_DEPENDENCIES) @rm -f ags_recall_container_test$(EXEEXT) $(AM_V_CCLD)$(ags_recall_container_test_LINK) $(ags_recall_container_test_OBJECTS) $(ags_recall_container_test_LDADD) $(LIBS) ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_recall_dependency_test$(EXEEXT): $(ags_recall_dependency_test_OBJECTS) $(ags_recall_dependency_test_DEPENDENCIES) $(EXTRA_ags_recall_dependency_test_DEPENDENCIES) @rm -f ags_recall_dependency_test$(EXEEXT) $(AM_V_CCLD)$(ags_recall_dependency_test_LINK) $(ags_recall_dependency_test_OBJECTS) $(ags_recall_dependency_test_LDADD) $(LIBS) ags/test/audio/ags_recall_test-ags_recall_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_recall_test$(EXEEXT): $(ags_recall_test_OBJECTS) $(ags_recall_test_DEPENDENCIES) $(EXTRA_ags_recall_test_DEPENDENCIES) @rm -f ags_recall_test$(EXEEXT) $(AM_V_CCLD)$(ags_recall_test_LINK) $(ags_recall_test_OBJECTS) $(ags_recall_test_LDADD) $(LIBS) ags/test/audio/ags_recycling_test-ags_recycling_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_recycling_test$(EXEEXT): $(ags_recycling_test_OBJECTS) $(ags_recycling_test_DEPENDENCIES) $(EXTRA_ags_recycling_test_DEPENDENCIES) @rm -f ags_recycling_test$(EXEEXT) $(AM_V_CCLD)$(ags_recycling_test_LINK) $(ags_recycling_test_OBJECTS) $(ags_recycling_test_LDADD) $(LIBS) ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_returnable_thread_test$(EXEEXT): $(ags_returnable_thread_test_OBJECTS) $(ags_returnable_thread_test_DEPENDENCIES) $(EXTRA_ags_returnable_thread_test_DEPENDENCIES) @rm -f ags_returnable_thread_test$(EXEEXT) $(AM_V_CCLD)$(ags_returnable_thread_test_LINK) $(ags_returnable_thread_test_OBJECTS) $(ags_returnable_thread_test_LDADD) $(LIBS) ags/test/thread/ags_task_test-ags_task_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_task_test$(EXEEXT): $(ags_task_test_OBJECTS) $(ags_task_test_DEPENDENCIES) $(EXTRA_ags_task_test_DEPENDENCIES) @rm -f ags_task_test$(EXEEXT) $(AM_V_CCLD)$(ags_task_test_LINK) $(ags_task_test_OBJECTS) $(ags_task_test_LDADD) $(LIBS) ags/test/thread/ags_task_thread_test-ags_task_thread_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_task_thread_test$(EXEEXT): $(ags_task_thread_test_OBJECTS) $(ags_task_thread_test_DEPENDENCIES) $(EXTRA_ags_task_thread_test_DEPENDENCIES) @rm -f ags_task_thread_test$(EXEEXT) $(AM_V_CCLD)$(ags_task_thread_test_LINK) $(ags_task_thread_test_OBJECTS) $(ags_task_thread_test_LDADD) $(LIBS) ags/test/thread/file/$(am__dirstamp): @$(MKDIR_P) ags/test/thread/file @: > ags/test/thread/file/$(am__dirstamp) ags/test/thread/file/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/thread/file/$(DEPDIR) @: > ags/test/thread/file/$(DEPDIR)/$(am__dirstamp) ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.$(OBJEXT): \ ags/test/thread/file/$(am__dirstamp) \ ags/test/thread/file/$(DEPDIR)/$(am__dirstamp) ags_thread_file_xml_test$(EXEEXT): $(ags_thread_file_xml_test_OBJECTS) $(ags_thread_file_xml_test_DEPENDENCIES) $(EXTRA_ags_thread_file_xml_test_DEPENDENCIES) @rm -f ags_thread_file_xml_test$(EXEEXT) $(AM_V_CCLD)$(ags_thread_file_xml_test_LINK) $(ags_thread_file_xml_test_OBJECTS) $(ags_thread_file_xml_test_LDADD) $(LIBS) ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_thread_pool_test$(EXEEXT): $(ags_thread_pool_test_OBJECTS) $(ags_thread_pool_test_DEPENDENCIES) $(EXTRA_ags_thread_pool_test_DEPENDENCIES) @rm -f ags_thread_pool_test$(EXEEXT) $(AM_V_CCLD)$(ags_thread_pool_test_LINK) $(ags_thread_pool_test_OBJECTS) $(ags_thread_pool_test_LDADD) $(LIBS) ags/test/thread/ags_thread_test-ags_thread_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_thread_test$(EXEEXT): $(ags_thread_test_OBJECTS) $(ags_thread_test_DEPENDENCIES) $(EXTRA_ags_thread_test_DEPENDENCIES) @rm -f ags_thread_test$(EXEEXT) $(AM_V_CCLD)$(ags_thread_test_LINK) $(ags_thread_test_OBJECTS) $(ags_thread_test_LDADD) $(LIBS) ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.$(OBJEXT): \ ags/test/lib/$(am__dirstamp) \ ags/test/lib/$(DEPDIR)/$(am__dirstamp) ags_turtle_manager_test$(EXEEXT): $(ags_turtle_manager_test_OBJECTS) $(ags_turtle_manager_test_DEPENDENCIES) $(EXTRA_ags_turtle_manager_test_DEPENDENCIES) @rm -f ags_turtle_manager_test$(EXEEXT) $(AM_V_CCLD)$(ags_turtle_manager_test_LINK) $(ags_turtle_manager_test_OBJECTS) $(ags_turtle_manager_test_LDADD) $(LIBS) ags/test/lib/ags_turtle_test-ags_turtle_test.$(OBJEXT): \ ags/test/lib/$(am__dirstamp) \ ags/test/lib/$(DEPDIR)/$(am__dirstamp) ags_turtle_test$(EXEEXT): $(ags_turtle_test_OBJECTS) $(ags_turtle_test_DEPENDENCIES) $(EXTRA_ags_turtle_test_DEPENDENCIES) @rm -f ags_turtle_test$(EXEEXT) $(AM_V_CCLD)$(ags_turtle_test_LINK) $(ags_turtle_test_OBJECTS) $(ags_turtle_test_LDADD) $(LIBS) ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.$(OBJEXT): \ ags/test/thread/$(am__dirstamp) \ ags/test/thread/$(DEPDIR)/$(am__dirstamp) ags_worker_thread_test$(EXEEXT): $(ags_worker_thread_test_OBJECTS) $(ags_worker_thread_test_DEPENDENCIES) $(EXTRA_ags_worker_thread_test_DEPENDENCIES) @rm -f ags_worker_thread_test$(EXEEXT) $(AM_V_CCLD)$(ags_worker_thread_test_LINK) $(ags_worker_thread_test_OBJECTS) $(ags_worker_thread_test_LDADD) $(LIBS) ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_xorg_application_context_test$(EXEEXT): $(ags_xorg_application_context_test_OBJECTS) $(ags_xorg_application_context_test_DEPENDENCIES) $(EXTRA_ags_xorg_application_context_test_DEPENDENCIES) @rm -f ags_xorg_application_context_test$(EXEEXT) $(AM_V_CCLD)$(ags_xorg_application_context_test_LINK) $(ags_xorg_application_context_test_OBJECTS) $(ags_xorg_application_context_test_LDADD) $(LIBS) ags/$(am__dirstamp): @$(MKDIR_P) ags @: > ags/$(am__dirstamp) ags/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/$(DEPDIR) @: > ags/$(DEPDIR)/$(am__dirstamp) ags/gsequencer-gsequencer_main.$(OBJEXT): ags/$(am__dirstamp) \ ags/$(DEPDIR)/$(am__dirstamp) gsequencer$(EXEEXT): $(gsequencer_OBJECTS) $(gsequencer_DEPENDENCIES) $(EXTRA_gsequencer_DEPENDENCIES) @rm -f gsequencer$(EXEEXT) $(AM_V_CCLD)$(gsequencer_LINK) $(gsequencer_OBJECTS) $(gsequencer_LDADD) $(LIBS) ags/midi2xml-midi2xml_main.$(OBJEXT): ags/$(am__dirstamp) \ ags/$(DEPDIR)/$(am__dirstamp) midi2xml$(EXEEXT): $(midi2xml_OBJECTS) $(midi2xml_DEPENDENCIES) $(EXTRA_midi2xml_DEPENDENCIES) @rm -f midi2xml$(EXEEXT) $(AM_V_CCLD)$(midi2xml_LINK) $(midi2xml_OBJECTS) $(midi2xml_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f ags/*.$(OBJEXT) -rm -f ags/X/*.$(OBJEXT) -rm -f ags/X/*.lo -rm -f ags/X/editor/*.$(OBJEXT) -rm -f ags/X/editor/*.lo -rm -f ags/X/export/*.$(OBJEXT) -rm -f ags/X/export/*.lo -rm -f ags/X/file/*.$(OBJEXT) -rm -f ags/X/file/*.lo -rm -f ags/X/import/*.$(OBJEXT) -rm -f ags/X/import/*.lo -rm -f ags/X/machine/*.$(OBJEXT) -rm -f ags/X/machine/*.lo -rm -f ags/X/task/*.$(OBJEXT) -rm -f ags/X/task/*.lo -rm -f ags/X/thread/*.$(OBJEXT) -rm -f ags/X/thread/*.lo -rm -f ags/audio/*.$(OBJEXT) -rm -f ags/audio/*.lo -rm -f ags/audio/client/*.$(OBJEXT) -rm -f ags/audio/client/*.lo -rm -f ags/audio/core-audio/*.$(OBJEXT) -rm -f ags/audio/core-audio/*.lo -rm -f ags/audio/file/*.$(OBJEXT) -rm -f ags/audio/file/*.lo -rm -f ags/audio/jack/*.$(OBJEXT) -rm -f ags/audio/jack/*.lo -rm -f ags/audio/midi/*.$(OBJEXT) -rm -f ags/audio/midi/*.lo -rm -f ags/audio/pulse/*.$(OBJEXT) -rm -f ags/audio/pulse/*.lo -rm -f ags/audio/recall/*.$(OBJEXT) -rm -f ags/audio/recall/*.lo -rm -f ags/audio/task/*.$(OBJEXT) -rm -f ags/audio/task/*.lo -rm -f ags/audio/task/recall/*.$(OBJEXT) -rm -f ags/audio/task/recall/*.lo -rm -f ags/audio/thread/*.$(OBJEXT) -rm -f ags/audio/thread/*.lo -rm -f ags/file/*.$(OBJEXT) -rm -f ags/file/*.lo -rm -f ags/lib/*.$(OBJEXT) -rm -f ags/lib/*.lo -rm -f ags/object/*.$(OBJEXT) -rm -f ags/object/*.lo -rm -f ags/plugin/*.$(OBJEXT) -rm -f ags/plugin/*.lo -rm -f ags/server/*.$(OBJEXT) -rm -f ags/server/*.lo -rm -f ags/server/controller/*.$(OBJEXT) -rm -f ags/server/controller/*.lo -rm -f ags/server/security/*.$(OBJEXT) -rm -f ags/server/security/*.lo -rm -f ags/server/thread/*.$(OBJEXT) -rm -f ags/server/thread/*.lo -rm -f ags/test/X/*.$(OBJEXT) -rm -f ags/test/X/*.lo -rm -f ags/test/X/machine/*.$(OBJEXT) -rm -f ags/test/audio/*.$(OBJEXT) -rm -f ags/test/audio/midi/*.$(OBJEXT) -rm -f ags/test/file/*.$(OBJEXT) -rm -f ags/test/lib/*.$(OBJEXT) -rm -f ags/test/object/*.$(OBJEXT) -rm -f ags/test/plugin/*.$(OBJEXT) -rm -f ags/test/thread/*.$(OBJEXT) -rm -f ags/test/thread/file/*.$(OBJEXT) -rm -f ags/thread/*.$(OBJEXT) -rm -f ags/thread/*.lo -rm -f ags/thread/file/*.$(OBJEXT) -rm -f ags/thread/file/*.lo -rm -f ags/util/*.$(OBJEXT) -rm -f ags/util/*.lo -rm -f ags/widget/*.$(OBJEXT) -rm -f ags/widget/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@ags/$(DEPDIR)/gsequencer-gsequencer_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/$(DEPDIR)/midi2xml-midi2xml_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_audio_preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_audio_preferences_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_window.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_window_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_bulk_member.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_bulk_member_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_connection_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_connection_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_context_menu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_dssi_browser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_dssi_browser_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bridge_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bulk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bulk_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_line_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_pad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_pad_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_separator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_export_soundcard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_export_soundcard_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_export_window.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_export_window_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_generic_preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_generic_preferences_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_history_browser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_history_browser_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_ladspa_browser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_ladspa_browser_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_line_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_line_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_line_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_link_collection_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_link_collection_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_link_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_link_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_listing_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_listing_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_lv2_browser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_lv2_browser_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_machine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_menu_action_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_menu_bar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_dialog_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_preferences_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_navigation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_navigation_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_notation_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_notation_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_output_collection_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_output_collection_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_output_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_output_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_output_listing_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_output_listing_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_pad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_performance_preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_performance_preferences_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_playback_window.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_playback_window_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_browser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_browser_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_preferences_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_preferences_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_property_collection_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_property_collection_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_property_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_property_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_property_listing_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_resize_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_sequencer_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_sequencer_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_server_preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_server_preferences_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_soundcard_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_soundcard_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_ui_provider.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_window.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_window_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_window.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_window_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/$(DEPDIR)/libgsequencer_la-ags_xorg_application_context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_toolbar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_toolbar_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_crop_note_dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_crop_note_dialog_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_dialog_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_editor_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_info_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_file_selection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_file_selection_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_inline_player.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_inline_player_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_radio_button.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_radio_button_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selector_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_move_note_dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_move_note_dialog_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_edit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_edit_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_toolbar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_toolbar_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_pattern_envelope.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_pattern_envelope_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_automation_cursor_dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_notation_cursor_dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_ramp_acceleration_dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_scrolled_automation_edit_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_scrolled_wave_edit_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_acceleration_dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_acceleration_dialog_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_note_dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_note_dialog_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_sf2_chooser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_sf2_chooser_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_vautomation_edit_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_vwave_edit_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_toolbar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_toolbar_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_entry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_entry_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/export/$(DEPDIR)/libgsequencer_la-ags_midi_export_wizard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/export/$(DEPDIR)/libgsequencer_la-ags_midi_export_wizard_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/file/$(DEPDIR)/libgsequencer_la-ags_gui_file_xml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/file/$(DEPDIR)/libgsequencer_la-ags_simple_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/import/$(DEPDIR)/libgsequencer_la-ags_midi_import_wizard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/import/$(DEPDIR)/libgsequencer_la-ags_midi_import_wizard_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_mapper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_mapper_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_audiorec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_audiorec_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_cell_pattern.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_cell_pattern_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_line_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_pad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_pad_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_line_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_pad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_pad_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_dssi_bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_dssi_bridge_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bridge_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bulk_input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_line_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_pad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_pad_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ladspa_bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ladspa_bridge_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_dssi_bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_dssi_bridge_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_lv2_bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_lv2_bridge_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_lv2_bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_lv2_bridge_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bridge_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bulk_input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bulk_input_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_input_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_input_pad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_oscillator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_oscillator_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_line_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_pad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_pattern_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_pattern_box_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_syncsynth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_syncsynth_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_line_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_pad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_bulk_member.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_line_member.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_sequencer_editor_jack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_soundcard_editor_sink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_blink_cell_pattern_cursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_change_indicator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_change_tact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_display_tact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_remove_sequencer_editor_jack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_remove_soundcard_editor_sink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_simple_file_read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_simple_file_write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_toggle_led.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/task/$(DEPDIR)/libgsequencer_la-ags_update_bulk_member.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/thread/$(DEPDIR)/libgsequencer_la-ags_gui_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/X/thread/$(DEPDIR)/libgsequencer_la-ags_simple_autosave_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_acceleration.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_application_context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_buffer_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_automation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_channel_iter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_devin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_devout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_fifoout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_midiin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_notation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_note.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_output.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_pattern.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_playable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_playback.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_playback_domain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_port.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_preset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_adaptor_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel_run_dummy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_container.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dependency.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dssi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dssi_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_id.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_ladspa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_ladspa_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_lv2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_lv2_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_recycling_dummy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_recycling_context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_sound_provider.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_synth_generator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_synth_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/$(DEPDIR)/libags_audio_la-ags_wave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_output.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_devout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_midiin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_port.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_server.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file_link.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file_xml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_xml_serialization_factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch_dls2_reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch_sf2_reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/file/$(DEPDIR)/libags_audio_la-ags_sndfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_devin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_devout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_midiin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_port.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_server.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_buffer_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_builder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_devin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_devout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_port.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_server.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_capture_sound_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_capture_sound_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_notation_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_notation_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_count_beats_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_count_beats_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_delay_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_delay_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_loop_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_loop_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel_run_master.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_dssi_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_dssi_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_lv2_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_lv2_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_notation_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_notation_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_note.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_record_midi_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_record_midi_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_dssi_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_dssi_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_lv2_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_lv2_audio_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_channel_run.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_recycling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_effect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_note.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_point_to_selection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_recall.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_recall_container.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_region_to_selection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_soundcard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_audio_threaded.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_recall.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_apply_presets.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_apply_synth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_recall.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_change_soundcard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_clear_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_clear_buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_crop_note.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_export_output.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_free_selection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_init_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_init_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_link_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_move_note.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_notify_soundcard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_sf2_sample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_single_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_note.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_point_from_selection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_recall.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_recall_container.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_region_from_selection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_soundcard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_reset_audio_connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_resize_audio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_save_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_seek_soundcard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_audio_channels.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_buffer_size.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_input_device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_output_device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_samplerate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_start_sequencer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_start_soundcard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_switch_buffer_flag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_tic_device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_toggle_pattern_bit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/$(DEPDIR)/libags_audio_la-ags_unref_audio_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_bpm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_sequencer_length.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_tact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_reset_peak.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_set_muted.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_audio_loop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_audio_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_channel_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_export_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_iterator_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_record_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_recycling_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_recycling_thread_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_sequencer_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_soundcard_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/file/$(DEPDIR)/libags_la-ags_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/file/$(DEPDIR)/libags_la-ags_file_id_ref.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/file/$(DEPDIR)/libags_la-ags_file_launch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/file/$(DEPDIR)/libags_la-ags_file_link.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/file/$(DEPDIR)/libags_la-ags_file_lookup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/file/$(DEPDIR)/libags_la-ags_file_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/file/$(DEPDIR)/libags_la-ags_xml_serialization_factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_buffer_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_complex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_conversion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_endian.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_function.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_parameter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_regex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_string_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_turtle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/lib/$(DEPDIR)/libags_la-ags_turtle_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_applicable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_application_context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_async_queue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_concurrent_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_config.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_connectable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_connection_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_countable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_distributed_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_dynamic_connectable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_main_loop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_marshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_mutable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_packable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_portlet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_seekable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_sequencer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_soundcard.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_tactable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/object/$(DEPDIR)/libags_la-ags_tree_iterator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_base_plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_dssi_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_dssi_plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_conversion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_conversion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_event_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_log_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_option_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_preset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_uri_map_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_urid_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_worker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_worker_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2ui_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2ui_plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/plugin/$(DEPDIR)/libags_audio_la-ags_plugin_factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/$(DEPDIR)/libags_server_la-ags_registry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/$(DEPDIR)/libags_server_la-ags_server.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/$(DEPDIR)/libags_server_la-ags_server_application_context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/$(DEPDIR)/libags_server_la-ags_server_status.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/$(DEPDIR)/libags_server_la-ags_service_provider.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/controller/$(DEPDIR)/libags_server_la-ags_controller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/controller/$(DEPDIR)/libags_server_la-ags_front_controller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_factory_controller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_registry_controller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_serialization_controller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_task_controller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_authentication.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_authentication_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_business_group.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_certificate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_certificate_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_password_store.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_password_store_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_security_context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_authentication.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_certificate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_password_store.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/thread/$(DEPDIR)/libags_server_la-ags_remote_task.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/server/thread/$(DEPDIR)/libags_server_la-ags_remote_task_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_functional_machine_link_test-ags_functional_machine_link_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_functional_notation_edit_test-ags_functional_notation_edit_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_xorg_application_context_test-ags_xorg_application_context_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/libgsequencer_test_la-ags_functional_test_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/libgsequencer_test_la-gsequencer_setup_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_functional_drum_test-ags_functional_drum_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_functional_ffplayer_test-ags_functional_ffplayer_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_functional_matrix_test-ags_functional_matrix_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_functional_mixer_test-ags_functional_mixer_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_functional_panel_test-ags_functional_panel_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_functional_synth_test-ags_functional_synth_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_acceleration_test-ags_acceleration_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_audio_application_context_test-ags_audio_application_context_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_audio_connection_test-ags_audio_connection_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_audio_signal_test-ags_audio_signal_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_audio_test-ags_audio_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_automation_test-ags_automation_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_channel_test-ags_channel_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_devout_test-ags_devout_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_functional_audio_test-ags_functional_audio_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_input_test-ags_input_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_midiin_test-ags_midiin_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_notation_test-ags_notation_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_note_test-ags_note_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_output_test-ags_output_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_pattern_test-ags_pattern_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_playback_domain_test-ags_playback_domain_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_playback_test-ags_playback_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_port_test-ags_port_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_preset_test-ags_preset_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_recall_channel_run_test-ags_recall_channel_run_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_recall_channel_test-ags_recall_channel_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_recall_container_test-ags_recall_container_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_recall_dependency_test-ags_recall_dependency_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_recall_test-ags_recall_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_recycling_test-ags_recycling_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/midi/$(DEPDIR)/ags_midi_buffer_util_test-ags_midi_buffer_util_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/midi/$(DEPDIR)/ags_midi_builder_test-ags_midi_builder_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/file/$(DEPDIR)/ags_file_id_ref_test-ags_file_id_ref_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/file/$(DEPDIR)/ags_file_launch_test-ags_file_launch_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/file/$(DEPDIR)/ags_file_lookup_test-ags_file_lookup_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/file/$(DEPDIR)/ags_file_test-ags_file_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/lib/$(DEPDIR)/ags_complex_test-ags_complex_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/lib/$(DEPDIR)/ags_log_test-ags_log_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/lib/$(DEPDIR)/ags_turtle_manager_test-ags_turtle_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/lib/$(DEPDIR)/ags_turtle_test-ags_turtle_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/object/$(DEPDIR)/ags_application_context_test-ags_application_context_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/object/$(DEPDIR)/ags_config_test-ags_config_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/object/$(DEPDIR)/ags_connection_manager_test-ags_connection_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_base_plugin_test-ags_base_plugin_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_dssi_manager_test-ags_dssi_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_dssi_plugin_test-ags_dssi_plugin_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_ladspa_manager_test-ags_ladspa_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_lv2_manager_test-ags_lv2_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_lv2_option_manager_test-ags_lv2_option_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_lv2_plugin_test-ags_lv2_plugin_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_lv2_preset_test-ags_lv2_preset_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_lv2ui_manager_test-ags_lv2ui_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/plugin/$(DEPDIR)/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_condition_manager_test-ags_condition_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_destroy_worker_test-ags_destroy_worker_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_mutex_manager_test-ags_mutex_manager_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_poll_fd_test-ags_poll_fd_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_polling_thread_test-ags_polling_thread_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_returnable_thread_test-ags_returnable_thread_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_task_test-ags_task_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_task_thread_test-ags_task_thread_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_thread_pool_test-ags_thread_pool_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_thread_test-ags_thread_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/$(DEPDIR)/ags_worker_thread_test-ags_worker_thread_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/thread/file/$(DEPDIR)/ags_thread_file_xml_test-ags_thread_file_xml_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_autosave_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_concurrency_provider.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_condition_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_destroy_worker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_generic_main_loop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_history.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_message_delivery.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_message_queue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_mutex_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_poll_fd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_polling_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_returnable_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_single_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_task.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_task_completion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_task_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_thread-posix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_thread_application_context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_thread_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp_factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/$(DEPDIR)/libags_thread_la-ags_worker_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/file/$(DEPDIR)/libags_thread_la-ags_thread_file_xml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/thread/file/$(DEPDIR)/libags_thread_la-ags_thread_xml_serialization_factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/util/$(DEPDIR)/libags_la-ags_destroy_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/util/$(DEPDIR)/libags_la-ags_id_generator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/util/$(DEPDIR)/libags_la-ags_list_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_cartesian.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_container.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_dial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_expander.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_expander_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_hindicator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_hled_array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_hlevel_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_hscale_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_htimebar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_indicator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_led.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_led_array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_level.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_level_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_notebook.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_piano.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_ruler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_scale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_scale_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_level_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_piano.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_scale_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_timebar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_vindicator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_vled_array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_vlevel_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_vscale_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_waveform.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/widget/$(DEPDIR)/libags_gui_la-ags_widget_marshal.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ags/lib/libags_la-ags_buffer_util.lo: ags/lib/ags_buffer_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_buffer_util.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_buffer_util.Tpo -c -o ags/lib/libags_la-ags_buffer_util.lo `test -f 'ags/lib/ags_buffer_util.c' || echo '$(srcdir)/'`ags/lib/ags_buffer_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_buffer_util.Tpo ags/lib/$(DEPDIR)/libags_la-ags_buffer_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_buffer_util.c' object='ags/lib/libags_la-ags_buffer_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_buffer_util.lo `test -f 'ags/lib/ags_buffer_util.c' || echo '$(srcdir)/'`ags/lib/ags_buffer_util.c ags/lib/libags_la-ags_complex.lo: ags/lib/ags_complex.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_complex.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_complex.Tpo -c -o ags/lib/libags_la-ags_complex.lo `test -f 'ags/lib/ags_complex.c' || echo '$(srcdir)/'`ags/lib/ags_complex.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_complex.Tpo ags/lib/$(DEPDIR)/libags_la-ags_complex.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_complex.c' object='ags/lib/libags_la-ags_complex.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_complex.lo `test -f 'ags/lib/ags_complex.c' || echo '$(srcdir)/'`ags/lib/ags_complex.c ags/lib/libags_la-ags_conversion.lo: ags/lib/ags_conversion.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_conversion.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_conversion.Tpo -c -o ags/lib/libags_la-ags_conversion.lo `test -f 'ags/lib/ags_conversion.c' || echo '$(srcdir)/'`ags/lib/ags_conversion.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_conversion.Tpo ags/lib/$(DEPDIR)/libags_la-ags_conversion.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_conversion.c' object='ags/lib/libags_la-ags_conversion.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_conversion.lo `test -f 'ags/lib/ags_conversion.c' || echo '$(srcdir)/'`ags/lib/ags_conversion.c ags/lib/libags_la-ags_endian.lo: ags/lib/ags_endian.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_endian.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_endian.Tpo -c -o ags/lib/libags_la-ags_endian.lo `test -f 'ags/lib/ags_endian.c' || echo '$(srcdir)/'`ags/lib/ags_endian.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_endian.Tpo ags/lib/$(DEPDIR)/libags_la-ags_endian.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_endian.c' object='ags/lib/libags_la-ags_endian.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_endian.lo `test -f 'ags/lib/ags_endian.c' || echo '$(srcdir)/'`ags/lib/ags_endian.c ags/lib/libags_la-ags_function.lo: ags/lib/ags_function.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_function.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_function.Tpo -c -o ags/lib/libags_la-ags_function.lo `test -f 'ags/lib/ags_function.c' || echo '$(srcdir)/'`ags/lib/ags_function.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_function.Tpo ags/lib/$(DEPDIR)/libags_la-ags_function.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_function.c' object='ags/lib/libags_la-ags_function.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_function.lo `test -f 'ags/lib/ags_function.c' || echo '$(srcdir)/'`ags/lib/ags_function.c ags/lib/libags_la-ags_log.lo: ags/lib/ags_log.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_log.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_log.Tpo -c -o ags/lib/libags_la-ags_log.lo `test -f 'ags/lib/ags_log.c' || echo '$(srcdir)/'`ags/lib/ags_log.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_log.Tpo ags/lib/$(DEPDIR)/libags_la-ags_log.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_log.c' object='ags/lib/libags_la-ags_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_log.lo `test -f 'ags/lib/ags_log.c' || echo '$(srcdir)/'`ags/lib/ags_log.c ags/lib/libags_la-ags_parameter.lo: ags/lib/ags_parameter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_parameter.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_parameter.Tpo -c -o ags/lib/libags_la-ags_parameter.lo `test -f 'ags/lib/ags_parameter.c' || echo '$(srcdir)/'`ags/lib/ags_parameter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_parameter.Tpo ags/lib/$(DEPDIR)/libags_la-ags_parameter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_parameter.c' object='ags/lib/libags_la-ags_parameter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_parameter.lo `test -f 'ags/lib/ags_parameter.c' || echo '$(srcdir)/'`ags/lib/ags_parameter.c ags/lib/libags_la-ags_regex.lo: ags/lib/ags_regex.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_regex.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_regex.Tpo -c -o ags/lib/libags_la-ags_regex.lo `test -f 'ags/lib/ags_regex.c' || echo '$(srcdir)/'`ags/lib/ags_regex.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_regex.Tpo ags/lib/$(DEPDIR)/libags_la-ags_regex.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_regex.c' object='ags/lib/libags_la-ags_regex.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_regex.lo `test -f 'ags/lib/ags_regex.c' || echo '$(srcdir)/'`ags/lib/ags_regex.c ags/lib/libags_la-ags_string_util.lo: ags/lib/ags_string_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_string_util.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_string_util.Tpo -c -o ags/lib/libags_la-ags_string_util.lo `test -f 'ags/lib/ags_string_util.c' || echo '$(srcdir)/'`ags/lib/ags_string_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_string_util.Tpo ags/lib/$(DEPDIR)/libags_la-ags_string_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_string_util.c' object='ags/lib/libags_la-ags_string_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_string_util.lo `test -f 'ags/lib/ags_string_util.c' || echo '$(srcdir)/'`ags/lib/ags_string_util.c ags/lib/libags_la-ags_time.lo: ags/lib/ags_time.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_time.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_time.Tpo -c -o ags/lib/libags_la-ags_time.lo `test -f 'ags/lib/ags_time.c' || echo '$(srcdir)/'`ags/lib/ags_time.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_time.Tpo ags/lib/$(DEPDIR)/libags_la-ags_time.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_time.c' object='ags/lib/libags_la-ags_time.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_time.lo `test -f 'ags/lib/ags_time.c' || echo '$(srcdir)/'`ags/lib/ags_time.c ags/lib/libags_la-ags_turtle.lo: ags/lib/ags_turtle.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_turtle.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_turtle.Tpo -c -o ags/lib/libags_la-ags_turtle.lo `test -f 'ags/lib/ags_turtle.c' || echo '$(srcdir)/'`ags/lib/ags_turtle.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_turtle.Tpo ags/lib/$(DEPDIR)/libags_la-ags_turtle.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_turtle.c' object='ags/lib/libags_la-ags_turtle.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_turtle.lo `test -f 'ags/lib/ags_turtle.c' || echo '$(srcdir)/'`ags/lib/ags_turtle.c ags/lib/libags_la-ags_turtle_manager.lo: ags/lib/ags_turtle_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/lib/libags_la-ags_turtle_manager.lo -MD -MP -MF ags/lib/$(DEPDIR)/libags_la-ags_turtle_manager.Tpo -c -o ags/lib/libags_la-ags_turtle_manager.lo `test -f 'ags/lib/ags_turtle_manager.c' || echo '$(srcdir)/'`ags/lib/ags_turtle_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/lib/$(DEPDIR)/libags_la-ags_turtle_manager.Tpo ags/lib/$(DEPDIR)/libags_la-ags_turtle_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/lib/ags_turtle_manager.c' object='ags/lib/libags_la-ags_turtle_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/lib/libags_la-ags_turtle_manager.lo `test -f 'ags/lib/ags_turtle_manager.c' || echo '$(srcdir)/'`ags/lib/ags_turtle_manager.c ags/util/libags_la-ags_destroy_util.lo: ags/util/ags_destroy_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/util/libags_la-ags_destroy_util.lo -MD -MP -MF ags/util/$(DEPDIR)/libags_la-ags_destroy_util.Tpo -c -o ags/util/libags_la-ags_destroy_util.lo `test -f 'ags/util/ags_destroy_util.c' || echo '$(srcdir)/'`ags/util/ags_destroy_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/util/$(DEPDIR)/libags_la-ags_destroy_util.Tpo ags/util/$(DEPDIR)/libags_la-ags_destroy_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/util/ags_destroy_util.c' object='ags/util/libags_la-ags_destroy_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/util/libags_la-ags_destroy_util.lo `test -f 'ags/util/ags_destroy_util.c' || echo '$(srcdir)/'`ags/util/ags_destroy_util.c ags/util/libags_la-ags_id_generator.lo: ags/util/ags_id_generator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/util/libags_la-ags_id_generator.lo -MD -MP -MF ags/util/$(DEPDIR)/libags_la-ags_id_generator.Tpo -c -o ags/util/libags_la-ags_id_generator.lo `test -f 'ags/util/ags_id_generator.c' || echo '$(srcdir)/'`ags/util/ags_id_generator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/util/$(DEPDIR)/libags_la-ags_id_generator.Tpo ags/util/$(DEPDIR)/libags_la-ags_id_generator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/util/ags_id_generator.c' object='ags/util/libags_la-ags_id_generator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/util/libags_la-ags_id_generator.lo `test -f 'ags/util/ags_id_generator.c' || echo '$(srcdir)/'`ags/util/ags_id_generator.c ags/util/libags_la-ags_list_util.lo: ags/util/ags_list_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/util/libags_la-ags_list_util.lo -MD -MP -MF ags/util/$(DEPDIR)/libags_la-ags_list_util.Tpo -c -o ags/util/libags_la-ags_list_util.lo `test -f 'ags/util/ags_list_util.c' || echo '$(srcdir)/'`ags/util/ags_list_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/util/$(DEPDIR)/libags_la-ags_list_util.Tpo ags/util/$(DEPDIR)/libags_la-ags_list_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/util/ags_list_util.c' object='ags/util/libags_la-ags_list_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/util/libags_la-ags_list_util.lo `test -f 'ags/util/ags_list_util.c' || echo '$(srcdir)/'`ags/util/ags_list_util.c ags/object/libags_la-ags_applicable.lo: ags/object/ags_applicable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_applicable.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_applicable.Tpo -c -o ags/object/libags_la-ags_applicable.lo `test -f 'ags/object/ags_applicable.c' || echo '$(srcdir)/'`ags/object/ags_applicable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_applicable.Tpo ags/object/$(DEPDIR)/libags_la-ags_applicable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_applicable.c' object='ags/object/libags_la-ags_applicable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_applicable.lo `test -f 'ags/object/ags_applicable.c' || echo '$(srcdir)/'`ags/object/ags_applicable.c ags/object/libags_la-ags_application_context.lo: ags/object/ags_application_context.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_application_context.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_application_context.Tpo -c -o ags/object/libags_la-ags_application_context.lo `test -f 'ags/object/ags_application_context.c' || echo '$(srcdir)/'`ags/object/ags_application_context.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_application_context.Tpo ags/object/$(DEPDIR)/libags_la-ags_application_context.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_application_context.c' object='ags/object/libags_la-ags_application_context.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_application_context.lo `test -f 'ags/object/ags_application_context.c' || echo '$(srcdir)/'`ags/object/ags_application_context.c ags/object/libags_la-ags_async_queue.lo: ags/object/ags_async_queue.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_async_queue.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_async_queue.Tpo -c -o ags/object/libags_la-ags_async_queue.lo `test -f 'ags/object/ags_async_queue.c' || echo '$(srcdir)/'`ags/object/ags_async_queue.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_async_queue.Tpo ags/object/$(DEPDIR)/libags_la-ags_async_queue.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_async_queue.c' object='ags/object/libags_la-ags_async_queue.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_async_queue.lo `test -f 'ags/object/ags_async_queue.c' || echo '$(srcdir)/'`ags/object/ags_async_queue.c ags/object/libags_la-ags_config.lo: ags/object/ags_config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_config.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_config.Tpo -c -o ags/object/libags_la-ags_config.lo `test -f 'ags/object/ags_config.c' || echo '$(srcdir)/'`ags/object/ags_config.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_config.Tpo ags/object/$(DEPDIR)/libags_la-ags_config.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_config.c' object='ags/object/libags_la-ags_config.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_config.lo `test -f 'ags/object/ags_config.c' || echo '$(srcdir)/'`ags/object/ags_config.c ags/object/libags_la-ags_connectable.lo: ags/object/ags_connectable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_connectable.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_connectable.Tpo -c -o ags/object/libags_la-ags_connectable.lo `test -f 'ags/object/ags_connectable.c' || echo '$(srcdir)/'`ags/object/ags_connectable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_connectable.Tpo ags/object/$(DEPDIR)/libags_la-ags_connectable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_connectable.c' object='ags/object/libags_la-ags_connectable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_connectable.lo `test -f 'ags/object/ags_connectable.c' || echo '$(srcdir)/'`ags/object/ags_connectable.c ags/object/libags_la-ags_connection.lo: ags/object/ags_connection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_connection.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_connection.Tpo -c -o ags/object/libags_la-ags_connection.lo `test -f 'ags/object/ags_connection.c' || echo '$(srcdir)/'`ags/object/ags_connection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_connection.Tpo ags/object/$(DEPDIR)/libags_la-ags_connection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_connection.c' object='ags/object/libags_la-ags_connection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_connection.lo `test -f 'ags/object/ags_connection.c' || echo '$(srcdir)/'`ags/object/ags_connection.c ags/object/libags_la-ags_connection_manager.lo: ags/object/ags_connection_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_connection_manager.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_connection_manager.Tpo -c -o ags/object/libags_la-ags_connection_manager.lo `test -f 'ags/object/ags_connection_manager.c' || echo '$(srcdir)/'`ags/object/ags_connection_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_connection_manager.Tpo ags/object/$(DEPDIR)/libags_la-ags_connection_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_connection_manager.c' object='ags/object/libags_la-ags_connection_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_connection_manager.lo `test -f 'ags/object/ags_connection_manager.c' || echo '$(srcdir)/'`ags/object/ags_connection_manager.c ags/object/libags_la-ags_countable.lo: ags/object/ags_countable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_countable.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_countable.Tpo -c -o ags/object/libags_la-ags_countable.lo `test -f 'ags/object/ags_countable.c' || echo '$(srcdir)/'`ags/object/ags_countable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_countable.Tpo ags/object/$(DEPDIR)/libags_la-ags_countable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_countable.c' object='ags/object/libags_la-ags_countable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_countable.lo `test -f 'ags/object/ags_countable.c' || echo '$(srcdir)/'`ags/object/ags_countable.c ags/object/libags_la-ags_concurrent_tree.lo: ags/object/ags_concurrent_tree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_concurrent_tree.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_concurrent_tree.Tpo -c -o ags/object/libags_la-ags_concurrent_tree.lo `test -f 'ags/object/ags_concurrent_tree.c' || echo '$(srcdir)/'`ags/object/ags_concurrent_tree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_concurrent_tree.Tpo ags/object/$(DEPDIR)/libags_la-ags_concurrent_tree.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_concurrent_tree.c' object='ags/object/libags_la-ags_concurrent_tree.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_concurrent_tree.lo `test -f 'ags/object/ags_concurrent_tree.c' || echo '$(srcdir)/'`ags/object/ags_concurrent_tree.c ags/object/libags_la-ags_distributed_manager.lo: ags/object/ags_distributed_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_distributed_manager.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_distributed_manager.Tpo -c -o ags/object/libags_la-ags_distributed_manager.lo `test -f 'ags/object/ags_distributed_manager.c' || echo '$(srcdir)/'`ags/object/ags_distributed_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_distributed_manager.Tpo ags/object/$(DEPDIR)/libags_la-ags_distributed_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_distributed_manager.c' object='ags/object/libags_la-ags_distributed_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_distributed_manager.lo `test -f 'ags/object/ags_distributed_manager.c' || echo '$(srcdir)/'`ags/object/ags_distributed_manager.c ags/object/libags_la-ags_dynamic_connectable.lo: ags/object/ags_dynamic_connectable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_dynamic_connectable.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_dynamic_connectable.Tpo -c -o ags/object/libags_la-ags_dynamic_connectable.lo `test -f 'ags/object/ags_dynamic_connectable.c' || echo '$(srcdir)/'`ags/object/ags_dynamic_connectable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_dynamic_connectable.Tpo ags/object/$(DEPDIR)/libags_la-ags_dynamic_connectable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_dynamic_connectable.c' object='ags/object/libags_la-ags_dynamic_connectable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_dynamic_connectable.lo `test -f 'ags/object/ags_dynamic_connectable.c' || echo '$(srcdir)/'`ags/object/ags_dynamic_connectable.c ags/object/libags_la-ags_main_loop.lo: ags/object/ags_main_loop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_main_loop.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_main_loop.Tpo -c -o ags/object/libags_la-ags_main_loop.lo `test -f 'ags/object/ags_main_loop.c' || echo '$(srcdir)/'`ags/object/ags_main_loop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_main_loop.Tpo ags/object/$(DEPDIR)/libags_la-ags_main_loop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_main_loop.c' object='ags/object/libags_la-ags_main_loop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_main_loop.lo `test -f 'ags/object/ags_main_loop.c' || echo '$(srcdir)/'`ags/object/ags_main_loop.c ags/object/libags_la-ags_marshal.lo: ags/object/ags_marshal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_marshal.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_marshal.Tpo -c -o ags/object/libags_la-ags_marshal.lo `test -f 'ags/object/ags_marshal.c' || echo '$(srcdir)/'`ags/object/ags_marshal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_marshal.Tpo ags/object/$(DEPDIR)/libags_la-ags_marshal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_marshal.c' object='ags/object/libags_la-ags_marshal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_marshal.lo `test -f 'ags/object/ags_marshal.c' || echo '$(srcdir)/'`ags/object/ags_marshal.c ags/object/libags_la-ags_mutable.lo: ags/object/ags_mutable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_mutable.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_mutable.Tpo -c -o ags/object/libags_la-ags_mutable.lo `test -f 'ags/object/ags_mutable.c' || echo '$(srcdir)/'`ags/object/ags_mutable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_mutable.Tpo ags/object/$(DEPDIR)/libags_la-ags_mutable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_mutable.c' object='ags/object/libags_la-ags_mutable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_mutable.lo `test -f 'ags/object/ags_mutable.c' || echo '$(srcdir)/'`ags/object/ags_mutable.c ags/object/libags_la-ags_packable.lo: ags/object/ags_packable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_packable.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_packable.Tpo -c -o ags/object/libags_la-ags_packable.lo `test -f 'ags/object/ags_packable.c' || echo '$(srcdir)/'`ags/object/ags_packable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_packable.Tpo ags/object/$(DEPDIR)/libags_la-ags_packable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_packable.c' object='ags/object/libags_la-ags_packable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_packable.lo `test -f 'ags/object/ags_packable.c' || echo '$(srcdir)/'`ags/object/ags_packable.c ags/object/libags_la-ags_plugin.lo: ags/object/ags_plugin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_plugin.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_plugin.Tpo -c -o ags/object/libags_la-ags_plugin.lo `test -f 'ags/object/ags_plugin.c' || echo '$(srcdir)/'`ags/object/ags_plugin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_plugin.Tpo ags/object/$(DEPDIR)/libags_la-ags_plugin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_plugin.c' object='ags/object/libags_la-ags_plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_plugin.lo `test -f 'ags/object/ags_plugin.c' || echo '$(srcdir)/'`ags/object/ags_plugin.c ags/object/libags_la-ags_portlet.lo: ags/object/ags_portlet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_portlet.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_portlet.Tpo -c -o ags/object/libags_la-ags_portlet.lo `test -f 'ags/object/ags_portlet.c' || echo '$(srcdir)/'`ags/object/ags_portlet.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_portlet.Tpo ags/object/$(DEPDIR)/libags_la-ags_portlet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_portlet.c' object='ags/object/libags_la-ags_portlet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_portlet.lo `test -f 'ags/object/ags_portlet.c' || echo '$(srcdir)/'`ags/object/ags_portlet.c ags/object/libags_la-ags_seekable.lo: ags/object/ags_seekable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_seekable.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_seekable.Tpo -c -o ags/object/libags_la-ags_seekable.lo `test -f 'ags/object/ags_seekable.c' || echo '$(srcdir)/'`ags/object/ags_seekable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_seekable.Tpo ags/object/$(DEPDIR)/libags_la-ags_seekable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_seekable.c' object='ags/object/libags_la-ags_seekable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_seekable.lo `test -f 'ags/object/ags_seekable.c' || echo '$(srcdir)/'`ags/object/ags_seekable.c ags/object/libags_la-ags_sequencer.lo: ags/object/ags_sequencer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_sequencer.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_sequencer.Tpo -c -o ags/object/libags_la-ags_sequencer.lo `test -f 'ags/object/ags_sequencer.c' || echo '$(srcdir)/'`ags/object/ags_sequencer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_sequencer.Tpo ags/object/$(DEPDIR)/libags_la-ags_sequencer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_sequencer.c' object='ags/object/libags_la-ags_sequencer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_sequencer.lo `test -f 'ags/object/ags_sequencer.c' || echo '$(srcdir)/'`ags/object/ags_sequencer.c ags/object/libags_la-ags_soundcard.lo: ags/object/ags_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_soundcard.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_soundcard.Tpo -c -o ags/object/libags_la-ags_soundcard.lo `test -f 'ags/object/ags_soundcard.c' || echo '$(srcdir)/'`ags/object/ags_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_soundcard.Tpo ags/object/$(DEPDIR)/libags_la-ags_soundcard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_soundcard.c' object='ags/object/libags_la-ags_soundcard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_soundcard.lo `test -f 'ags/object/ags_soundcard.c' || echo '$(srcdir)/'`ags/object/ags_soundcard.c ags/object/libags_la-ags_tactable.lo: ags/object/ags_tactable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_tactable.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_tactable.Tpo -c -o ags/object/libags_la-ags_tactable.lo `test -f 'ags/object/ags_tactable.c' || echo '$(srcdir)/'`ags/object/ags_tactable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_tactable.Tpo ags/object/$(DEPDIR)/libags_la-ags_tactable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_tactable.c' object='ags/object/libags_la-ags_tactable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_tactable.lo `test -f 'ags/object/ags_tactable.c' || echo '$(srcdir)/'`ags/object/ags_tactable.c ags/object/libags_la-ags_tree_iterator.lo: ags/object/ags_tree_iterator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/object/libags_la-ags_tree_iterator.lo -MD -MP -MF ags/object/$(DEPDIR)/libags_la-ags_tree_iterator.Tpo -c -o ags/object/libags_la-ags_tree_iterator.lo `test -f 'ags/object/ags_tree_iterator.c' || echo '$(srcdir)/'`ags/object/ags_tree_iterator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/object/$(DEPDIR)/libags_la-ags_tree_iterator.Tpo ags/object/$(DEPDIR)/libags_la-ags_tree_iterator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/object/ags_tree_iterator.c' object='ags/object/libags_la-ags_tree_iterator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/object/libags_la-ags_tree_iterator.lo `test -f 'ags/object/ags_tree_iterator.c' || echo '$(srcdir)/'`ags/object/ags_tree_iterator.c ags/file/libags_la-ags_file.lo: ags/file/ags_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/file/libags_la-ags_file.lo -MD -MP -MF ags/file/$(DEPDIR)/libags_la-ags_file.Tpo -c -o ags/file/libags_la-ags_file.lo `test -f 'ags/file/ags_file.c' || echo '$(srcdir)/'`ags/file/ags_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/file/$(DEPDIR)/libags_la-ags_file.Tpo ags/file/$(DEPDIR)/libags_la-ags_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/file/ags_file.c' object='ags/file/libags_la-ags_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/file/libags_la-ags_file.lo `test -f 'ags/file/ags_file.c' || echo '$(srcdir)/'`ags/file/ags_file.c ags/file/libags_la-ags_file_id_ref.lo: ags/file/ags_file_id_ref.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/file/libags_la-ags_file_id_ref.lo -MD -MP -MF ags/file/$(DEPDIR)/libags_la-ags_file_id_ref.Tpo -c -o ags/file/libags_la-ags_file_id_ref.lo `test -f 'ags/file/ags_file_id_ref.c' || echo '$(srcdir)/'`ags/file/ags_file_id_ref.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/file/$(DEPDIR)/libags_la-ags_file_id_ref.Tpo ags/file/$(DEPDIR)/libags_la-ags_file_id_ref.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/file/ags_file_id_ref.c' object='ags/file/libags_la-ags_file_id_ref.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/file/libags_la-ags_file_id_ref.lo `test -f 'ags/file/ags_file_id_ref.c' || echo '$(srcdir)/'`ags/file/ags_file_id_ref.c ags/file/libags_la-ags_file_launch.lo: ags/file/ags_file_launch.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/file/libags_la-ags_file_launch.lo -MD -MP -MF ags/file/$(DEPDIR)/libags_la-ags_file_launch.Tpo -c -o ags/file/libags_la-ags_file_launch.lo `test -f 'ags/file/ags_file_launch.c' || echo '$(srcdir)/'`ags/file/ags_file_launch.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/file/$(DEPDIR)/libags_la-ags_file_launch.Tpo ags/file/$(DEPDIR)/libags_la-ags_file_launch.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/file/ags_file_launch.c' object='ags/file/libags_la-ags_file_launch.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/file/libags_la-ags_file_launch.lo `test -f 'ags/file/ags_file_launch.c' || echo '$(srcdir)/'`ags/file/ags_file_launch.c ags/file/libags_la-ags_file_link.lo: ags/file/ags_file_link.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/file/libags_la-ags_file_link.lo -MD -MP -MF ags/file/$(DEPDIR)/libags_la-ags_file_link.Tpo -c -o ags/file/libags_la-ags_file_link.lo `test -f 'ags/file/ags_file_link.c' || echo '$(srcdir)/'`ags/file/ags_file_link.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/file/$(DEPDIR)/libags_la-ags_file_link.Tpo ags/file/$(DEPDIR)/libags_la-ags_file_link.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/file/ags_file_link.c' object='ags/file/libags_la-ags_file_link.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/file/libags_la-ags_file_link.lo `test -f 'ags/file/ags_file_link.c' || echo '$(srcdir)/'`ags/file/ags_file_link.c ags/file/libags_la-ags_file_lookup.lo: ags/file/ags_file_lookup.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/file/libags_la-ags_file_lookup.lo -MD -MP -MF ags/file/$(DEPDIR)/libags_la-ags_file_lookup.Tpo -c -o ags/file/libags_la-ags_file_lookup.lo `test -f 'ags/file/ags_file_lookup.c' || echo '$(srcdir)/'`ags/file/ags_file_lookup.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/file/$(DEPDIR)/libags_la-ags_file_lookup.Tpo ags/file/$(DEPDIR)/libags_la-ags_file_lookup.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/file/ags_file_lookup.c' object='ags/file/libags_la-ags_file_lookup.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/file/libags_la-ags_file_lookup.lo `test -f 'ags/file/ags_file_lookup.c' || echo '$(srcdir)/'`ags/file/ags_file_lookup.c ags/file/libags_la-ags_file_util.lo: ags/file/ags_file_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/file/libags_la-ags_file_util.lo -MD -MP -MF ags/file/$(DEPDIR)/libags_la-ags_file_util.Tpo -c -o ags/file/libags_la-ags_file_util.lo `test -f 'ags/file/ags_file_util.c' || echo '$(srcdir)/'`ags/file/ags_file_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/file/$(DEPDIR)/libags_la-ags_file_util.Tpo ags/file/$(DEPDIR)/libags_la-ags_file_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/file/ags_file_util.c' object='ags/file/libags_la-ags_file_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/file/libags_la-ags_file_util.lo `test -f 'ags/file/ags_file_util.c' || echo '$(srcdir)/'`ags/file/ags_file_util.c ags/file/libags_la-ags_xml_serialization_factory.lo: ags/file/ags_xml_serialization_factory.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -MT ags/file/libags_la-ags_xml_serialization_factory.lo -MD -MP -MF ags/file/$(DEPDIR)/libags_la-ags_xml_serialization_factory.Tpo -c -o ags/file/libags_la-ags_xml_serialization_factory.lo `test -f 'ags/file/ags_xml_serialization_factory.c' || echo '$(srcdir)/'`ags/file/ags_xml_serialization_factory.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/file/$(DEPDIR)/libags_la-ags_xml_serialization_factory.Tpo ags/file/$(DEPDIR)/libags_la-ags_xml_serialization_factory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/file/ags_xml_serialization_factory.c' object='ags/file/libags_la-ags_xml_serialization_factory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_la_CFLAGS) $(CFLAGS) -c -o ags/file/libags_la-ags_xml_serialization_factory.lo `test -f 'ags/file/ags_xml_serialization_factory.c' || echo '$(srcdir)/'`ags/file/ags_xml_serialization_factory.c ags/audio/libags_audio_la-ags_acceleration.lo: ags/audio/ags_acceleration.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_acceleration.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_acceleration.Tpo -c -o ags/audio/libags_audio_la-ags_acceleration.lo `test -f 'ags/audio/ags_acceleration.c' || echo '$(srcdir)/'`ags/audio/ags_acceleration.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_acceleration.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_acceleration.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_acceleration.c' object='ags/audio/libags_audio_la-ags_acceleration.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_acceleration.lo `test -f 'ags/audio/ags_acceleration.c' || echo '$(srcdir)/'`ags/audio/ags_acceleration.c ags/audio/libags_audio_la-ags_audio.lo: ags/audio/ags_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_audio.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_audio.Tpo -c -o ags/audio/libags_audio_la-ags_audio.lo `test -f 'ags/audio/ags_audio.c' || echo '$(srcdir)/'`ags/audio/ags_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_audio.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_audio.c' object='ags/audio/libags_audio_la-ags_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_audio.lo `test -f 'ags/audio/ags_audio.c' || echo '$(srcdir)/'`ags/audio/ags_audio.c ags/audio/libags_audio_la-ags_audio_application_context.lo: ags/audio/ags_audio_application_context.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_audio_application_context.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_application_context.Tpo -c -o ags/audio/libags_audio_la-ags_audio_application_context.lo `test -f 'ags/audio/ags_audio_application_context.c' || echo '$(srcdir)/'`ags/audio/ags_audio_application_context.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_application_context.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_application_context.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_audio_application_context.c' object='ags/audio/libags_audio_la-ags_audio_application_context.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_audio_application_context.lo `test -f 'ags/audio/ags_audio_application_context.c' || echo '$(srcdir)/'`ags/audio/ags_audio_application_context.c ags/audio/libags_audio_la-ags_audio_buffer_util.lo: ags/audio/ags_audio_buffer_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_audio_buffer_util.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_buffer_util.Tpo -c -o ags/audio/libags_audio_la-ags_audio_buffer_util.lo `test -f 'ags/audio/ags_audio_buffer_util.c' || echo '$(srcdir)/'`ags/audio/ags_audio_buffer_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_buffer_util.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_buffer_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_audio_buffer_util.c' object='ags/audio/libags_audio_la-ags_audio_buffer_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_audio_buffer_util.lo `test -f 'ags/audio/ags_audio_buffer_util.c' || echo '$(srcdir)/'`ags/audio/ags_audio_buffer_util.c ags/audio/libags_audio_la-ags_audio_connection.lo: ags/audio/ags_audio_connection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_audio_connection.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_connection.Tpo -c -o ags/audio/libags_audio_la-ags_audio_connection.lo `test -f 'ags/audio/ags_audio_connection.c' || echo '$(srcdir)/'`ags/audio/ags_audio_connection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_connection.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_connection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_audio_connection.c' object='ags/audio/libags_audio_la-ags_audio_connection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_audio_connection.lo `test -f 'ags/audio/ags_audio_connection.c' || echo '$(srcdir)/'`ags/audio/ags_audio_connection.c ags/audio/libags_audio_la-ags_audio_signal.lo: ags/audio/ags_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_audio_signal.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_signal.Tpo -c -o ags/audio/libags_audio_la-ags_audio_signal.lo `test -f 'ags/audio/ags_audio_signal.c' || echo '$(srcdir)/'`ags/audio/ags_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_signal.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_audio_signal.c' object='ags/audio/libags_audio_la-ags_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_audio_signal.lo `test -f 'ags/audio/ags_audio_signal.c' || echo '$(srcdir)/'`ags/audio/ags_audio_signal.c ags/audio/libags_audio_la-ags_automation.lo: ags/audio/ags_automation.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_automation.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_automation.Tpo -c -o ags/audio/libags_audio_la-ags_automation.lo `test -f 'ags/audio/ags_automation.c' || echo '$(srcdir)/'`ags/audio/ags_automation.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_automation.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_automation.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_automation.c' object='ags/audio/libags_audio_la-ags_automation.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_automation.lo `test -f 'ags/audio/ags_automation.c' || echo '$(srcdir)/'`ags/audio/ags_automation.c ags/audio/libags_audio_la-ags_buffer.lo: ags/audio/ags_buffer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_buffer.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_buffer.Tpo -c -o ags/audio/libags_audio_la-ags_buffer.lo `test -f 'ags/audio/ags_buffer.c' || echo '$(srcdir)/'`ags/audio/ags_buffer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_buffer.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_buffer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_buffer.c' object='ags/audio/libags_audio_la-ags_buffer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_buffer.lo `test -f 'ags/audio/ags_buffer.c' || echo '$(srcdir)/'`ags/audio/ags_buffer.c ags/audio/libags_audio_la-ags_channel.lo: ags/audio/ags_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_channel.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_channel.Tpo -c -o ags/audio/libags_audio_la-ags_channel.lo `test -f 'ags/audio/ags_channel.c' || echo '$(srcdir)/'`ags/audio/ags_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_channel.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_channel.c' object='ags/audio/libags_audio_la-ags_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_channel.lo `test -f 'ags/audio/ags_channel.c' || echo '$(srcdir)/'`ags/audio/ags_channel.c ags/audio/libags_audio_la-ags_channel_iter.lo: ags/audio/ags_channel_iter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_channel_iter.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_channel_iter.Tpo -c -o ags/audio/libags_audio_la-ags_channel_iter.lo `test -f 'ags/audio/ags_channel_iter.c' || echo '$(srcdir)/'`ags/audio/ags_channel_iter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_channel_iter.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_channel_iter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_channel_iter.c' object='ags/audio/libags_audio_la-ags_channel_iter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_channel_iter.lo `test -f 'ags/audio/ags_channel_iter.c' || echo '$(srcdir)/'`ags/audio/ags_channel_iter.c ags/audio/libags_audio_la-ags_devout.lo: ags/audio/ags_devout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_devout.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_devout.Tpo -c -o ags/audio/libags_audio_la-ags_devout.lo `test -f 'ags/audio/ags_devout.c' || echo '$(srcdir)/'`ags/audio/ags_devout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_devout.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_devout.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_devout.c' object='ags/audio/libags_audio_la-ags_devout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_devout.lo `test -f 'ags/audio/ags_devout.c' || echo '$(srcdir)/'`ags/audio/ags_devout.c ags/audio/libags_audio_la-ags_devin.lo: ags/audio/ags_devin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_devin.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_devin.Tpo -c -o ags/audio/libags_audio_la-ags_devin.lo `test -f 'ags/audio/ags_devin.c' || echo '$(srcdir)/'`ags/audio/ags_devin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_devin.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_devin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_devin.c' object='ags/audio/libags_audio_la-ags_devin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_devin.lo `test -f 'ags/audio/ags_devin.c' || echo '$(srcdir)/'`ags/audio/ags_devin.c ags/audio/libags_audio_la-ags_input.lo: ags/audio/ags_input.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_input.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_input.Tpo -c -o ags/audio/libags_audio_la-ags_input.lo `test -f 'ags/audio/ags_input.c' || echo '$(srcdir)/'`ags/audio/ags_input.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_input.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_input.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_input.c' object='ags/audio/libags_audio_la-ags_input.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_input.lo `test -f 'ags/audio/ags_input.c' || echo '$(srcdir)/'`ags/audio/ags_input.c ags/audio/libags_audio_la-ags_fifoout.lo: ags/audio/ags_fifoout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_fifoout.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_fifoout.Tpo -c -o ags/audio/libags_audio_la-ags_fifoout.lo `test -f 'ags/audio/ags_fifoout.c' || echo '$(srcdir)/'`ags/audio/ags_fifoout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_fifoout.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_fifoout.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_fifoout.c' object='ags/audio/libags_audio_la-ags_fifoout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_fifoout.lo `test -f 'ags/audio/ags_fifoout.c' || echo '$(srcdir)/'`ags/audio/ags_fifoout.c ags/audio/libags_audio_la-ags_message.lo: ags/audio/ags_message.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_message.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_message.Tpo -c -o ags/audio/libags_audio_la-ags_message.lo `test -f 'ags/audio/ags_message.c' || echo '$(srcdir)/'`ags/audio/ags_message.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_message.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_message.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_message.c' object='ags/audio/libags_audio_la-ags_message.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_message.lo `test -f 'ags/audio/ags_message.c' || echo '$(srcdir)/'`ags/audio/ags_message.c ags/audio/libags_audio_la-ags_midiin.lo: ags/audio/ags_midiin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_midiin.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_midiin.Tpo -c -o ags/audio/libags_audio_la-ags_midiin.lo `test -f 'ags/audio/ags_midiin.c' || echo '$(srcdir)/'`ags/audio/ags_midiin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_midiin.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_midiin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_midiin.c' object='ags/audio/libags_audio_la-ags_midiin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_midiin.lo `test -f 'ags/audio/ags_midiin.c' || echo '$(srcdir)/'`ags/audio/ags_midiin.c ags/audio/libags_audio_la-ags_notation.lo: ags/audio/ags_notation.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_notation.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_notation.Tpo -c -o ags/audio/libags_audio_la-ags_notation.lo `test -f 'ags/audio/ags_notation.c' || echo '$(srcdir)/'`ags/audio/ags_notation.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_notation.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_notation.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_notation.c' object='ags/audio/libags_audio_la-ags_notation.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_notation.lo `test -f 'ags/audio/ags_notation.c' || echo '$(srcdir)/'`ags/audio/ags_notation.c ags/audio/libags_audio_la-ags_note.lo: ags/audio/ags_note.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_note.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_note.Tpo -c -o ags/audio/libags_audio_la-ags_note.lo `test -f 'ags/audio/ags_note.c' || echo '$(srcdir)/'`ags/audio/ags_note.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_note.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_note.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_note.c' object='ags/audio/libags_audio_la-ags_note.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_note.lo `test -f 'ags/audio/ags_note.c' || echo '$(srcdir)/'`ags/audio/ags_note.c ags/audio/libags_audio_la-ags_output.lo: ags/audio/ags_output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_output.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_output.Tpo -c -o ags/audio/libags_audio_la-ags_output.lo `test -f 'ags/audio/ags_output.c' || echo '$(srcdir)/'`ags/audio/ags_output.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_output.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_output.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_output.c' object='ags/audio/libags_audio_la-ags_output.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_output.lo `test -f 'ags/audio/ags_output.c' || echo '$(srcdir)/'`ags/audio/ags_output.c ags/audio/libags_audio_la-ags_pattern.lo: ags/audio/ags_pattern.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_pattern.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_pattern.Tpo -c -o ags/audio/libags_audio_la-ags_pattern.lo `test -f 'ags/audio/ags_pattern.c' || echo '$(srcdir)/'`ags/audio/ags_pattern.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_pattern.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_pattern.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_pattern.c' object='ags/audio/libags_audio_la-ags_pattern.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_pattern.lo `test -f 'ags/audio/ags_pattern.c' || echo '$(srcdir)/'`ags/audio/ags_pattern.c ags/audio/libags_audio_la-ags_playable.lo: ags/audio/ags_playable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_playable.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_playable.Tpo -c -o ags/audio/libags_audio_la-ags_playable.lo `test -f 'ags/audio/ags_playable.c' || echo '$(srcdir)/'`ags/audio/ags_playable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_playable.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_playable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_playable.c' object='ags/audio/libags_audio_la-ags_playable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_playable.lo `test -f 'ags/audio/ags_playable.c' || echo '$(srcdir)/'`ags/audio/ags_playable.c ags/audio/libags_audio_la-ags_playback.lo: ags/audio/ags_playback.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_playback.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_playback.Tpo -c -o ags/audio/libags_audio_la-ags_playback.lo `test -f 'ags/audio/ags_playback.c' || echo '$(srcdir)/'`ags/audio/ags_playback.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_playback.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_playback.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_playback.c' object='ags/audio/libags_audio_la-ags_playback.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_playback.lo `test -f 'ags/audio/ags_playback.c' || echo '$(srcdir)/'`ags/audio/ags_playback.c ags/audio/libags_audio_la-ags_playback_domain.lo: ags/audio/ags_playback_domain.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_playback_domain.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_playback_domain.Tpo -c -o ags/audio/libags_audio_la-ags_playback_domain.lo `test -f 'ags/audio/ags_playback_domain.c' || echo '$(srcdir)/'`ags/audio/ags_playback_domain.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_playback_domain.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_playback_domain.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_playback_domain.c' object='ags/audio/libags_audio_la-ags_playback_domain.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_playback_domain.lo `test -f 'ags/audio/ags_playback_domain.c' || echo '$(srcdir)/'`ags/audio/ags_playback_domain.c ags/audio/libags_audio_la-ags_port.lo: ags/audio/ags_port.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_port.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_port.Tpo -c -o ags/audio/libags_audio_la-ags_port.lo `test -f 'ags/audio/ags_port.c' || echo '$(srcdir)/'`ags/audio/ags_port.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_port.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_port.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_port.c' object='ags/audio/libags_audio_la-ags_port.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_port.lo `test -f 'ags/audio/ags_port.c' || echo '$(srcdir)/'`ags/audio/ags_port.c ags/audio/libags_audio_la-ags_preset.lo: ags/audio/ags_preset.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_preset.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_preset.Tpo -c -o ags/audio/libags_audio_la-ags_preset.lo `test -f 'ags/audio/ags_preset.c' || echo '$(srcdir)/'`ags/audio/ags_preset.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_preset.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_preset.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_preset.c' object='ags/audio/libags_audio_la-ags_preset.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_preset.lo `test -f 'ags/audio/ags_preset.c' || echo '$(srcdir)/'`ags/audio/ags_preset.c ags/audio/libags_audio_la-ags_recall_audio.lo: ags/audio/ags_recall_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_audio.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio.Tpo -c -o ags/audio/libags_audio_la-ags_recall_audio.lo `test -f 'ags/audio/ags_recall_audio.c' || echo '$(srcdir)/'`ags/audio/ags_recall_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_audio.c' object='ags/audio/libags_audio_la-ags_recall_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_audio.lo `test -f 'ags/audio/ags_recall_audio.c' || echo '$(srcdir)/'`ags/audio/ags_recall_audio.c ags/audio/libags_audio_la-ags_recall_audio_run.lo: ags/audio/ags_recall_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_audio_run.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio_run.Tpo -c -o ags/audio/libags_audio_la-ags_recall_audio_run.lo `test -f 'ags/audio/ags_recall_audio_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio_run.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_audio_run.c' object='ags/audio/libags_audio_la-ags_recall_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_audio_run.lo `test -f 'ags/audio/ags_recall_audio_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_audio_run.c ags/audio/libags_audio_la-ags_recall_audio_signal.lo: ags/audio/ags_recall_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_audio_signal.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio_signal.Tpo -c -o ags/audio/libags_audio_la-ags_recall_audio_signal.lo `test -f 'ags/audio/ags_recall_audio_signal.c' || echo '$(srcdir)/'`ags/audio/ags_recall_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio_signal.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_audio_signal.c' object='ags/audio/libags_audio_la-ags_recall_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_audio_signal.lo `test -f 'ags/audio/ags_recall_audio_signal.c' || echo '$(srcdir)/'`ags/audio/ags_recall_audio_signal.c ags/audio/libags_audio_la-ags_recall.lo: ags/audio/ags_recall.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall.Tpo -c -o ags/audio/libags_audio_la-ags_recall.lo `test -f 'ags/audio/ags_recall.c' || echo '$(srcdir)/'`ags/audio/ags_recall.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall.c' object='ags/audio/libags_audio_la-ags_recall.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall.lo `test -f 'ags/audio/ags_recall.c' || echo '$(srcdir)/'`ags/audio/ags_recall.c ags/audio/libags_audio_la-ags_recall_channel.lo: ags/audio/ags_recall_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_channel.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel.Tpo -c -o ags/audio/libags_audio_la-ags_recall_channel.lo `test -f 'ags/audio/ags_recall_channel.c' || echo '$(srcdir)/'`ags/audio/ags_recall_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_channel.c' object='ags/audio/libags_audio_la-ags_recall_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_channel.lo `test -f 'ags/audio/ags_recall_channel.c' || echo '$(srcdir)/'`ags/audio/ags_recall_channel.c ags/audio/libags_audio_la-ags_recall_channel_run.lo: ags/audio/ags_recall_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_channel_run.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel_run.Tpo -c -o ags/audio/libags_audio_la-ags_recall_channel_run.lo `test -f 'ags/audio/ags_recall_channel_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel_run.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_channel_run.c' object='ags/audio/libags_audio_la-ags_recall_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_channel_run.lo `test -f 'ags/audio/ags_recall_channel_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_channel_run.c ags/audio/libags_audio_la-ags_recall_channel_run_dummy.lo: ags/audio/ags_recall_channel_run_dummy.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_channel_run_dummy.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel_run_dummy.Tpo -c -o ags/audio/libags_audio_la-ags_recall_channel_run_dummy.lo `test -f 'ags/audio/ags_recall_channel_run_dummy.c' || echo '$(srcdir)/'`ags/audio/ags_recall_channel_run_dummy.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel_run_dummy.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_channel_run_dummy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_channel_run_dummy.c' object='ags/audio/libags_audio_la-ags_recall_channel_run_dummy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_channel_run_dummy.lo `test -f 'ags/audio/ags_recall_channel_run_dummy.c' || echo '$(srcdir)/'`ags/audio/ags_recall_channel_run_dummy.c ags/audio/libags_audio_la-ags_recall_container.lo: ags/audio/ags_recall_container.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_container.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_container.Tpo -c -o ags/audio/libags_audio_la-ags_recall_container.lo `test -f 'ags/audio/ags_recall_container.c' || echo '$(srcdir)/'`ags/audio/ags_recall_container.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_container.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_container.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_container.c' object='ags/audio/libags_audio_la-ags_recall_container.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_container.lo `test -f 'ags/audio/ags_recall_container.c' || echo '$(srcdir)/'`ags/audio/ags_recall_container.c ags/audio/libags_audio_la-ags_recall_dependency.lo: ags/audio/ags_recall_dependency.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_dependency.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dependency.Tpo -c -o ags/audio/libags_audio_la-ags_recall_dependency.lo `test -f 'ags/audio/ags_recall_dependency.c' || echo '$(srcdir)/'`ags/audio/ags_recall_dependency.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dependency.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dependency.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_dependency.c' object='ags/audio/libags_audio_la-ags_recall_dependency.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_dependency.lo `test -f 'ags/audio/ags_recall_dependency.c' || echo '$(srcdir)/'`ags/audio/ags_recall_dependency.c ags/audio/libags_audio_la-ags_recall_factory.lo: ags/audio/ags_recall_factory.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_factory.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_factory.Tpo -c -o ags/audio/libags_audio_la-ags_recall_factory.lo `test -f 'ags/audio/ags_recall_factory.c' || echo '$(srcdir)/'`ags/audio/ags_recall_factory.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_factory.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_factory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_factory.c' object='ags/audio/libags_audio_la-ags_recall_factory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_factory.lo `test -f 'ags/audio/ags_recall_factory.c' || echo '$(srcdir)/'`ags/audio/ags_recall_factory.c ags/audio/libags_audio_la-ags_recall_dssi.lo: ags/audio/ags_recall_dssi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_dssi.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dssi.Tpo -c -o ags/audio/libags_audio_la-ags_recall_dssi.lo `test -f 'ags/audio/ags_recall_dssi.c' || echo '$(srcdir)/'`ags/audio/ags_recall_dssi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dssi.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dssi.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_dssi.c' object='ags/audio/libags_audio_la-ags_recall_dssi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_dssi.lo `test -f 'ags/audio/ags_recall_dssi.c' || echo '$(srcdir)/'`ags/audio/ags_recall_dssi.c ags/audio/libags_audio_la-ags_recall_dssi_run.lo: ags/audio/ags_recall_dssi_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_dssi_run.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dssi_run.Tpo -c -o ags/audio/libags_audio_la-ags_recall_dssi_run.lo `test -f 'ags/audio/ags_recall_dssi_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_dssi_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dssi_run.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_dssi_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_dssi_run.c' object='ags/audio/libags_audio_la-ags_recall_dssi_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_dssi_run.lo `test -f 'ags/audio/ags_recall_dssi_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_dssi_run.c ags/audio/libags_audio_la-ags_recall_id.lo: ags/audio/ags_recall_id.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_id.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_id.Tpo -c -o ags/audio/libags_audio_la-ags_recall_id.lo `test -f 'ags/audio/ags_recall_id.c' || echo '$(srcdir)/'`ags/audio/ags_recall_id.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_id.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_id.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_id.c' object='ags/audio/libags_audio_la-ags_recall_id.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_id.lo `test -f 'ags/audio/ags_recall_id.c' || echo '$(srcdir)/'`ags/audio/ags_recall_id.c ags/audio/libags_audio_la-ags_recall_ladspa.lo: ags/audio/ags_recall_ladspa.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_ladspa.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_ladspa.Tpo -c -o ags/audio/libags_audio_la-ags_recall_ladspa.lo `test -f 'ags/audio/ags_recall_ladspa.c' || echo '$(srcdir)/'`ags/audio/ags_recall_ladspa.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_ladspa.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_ladspa.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_ladspa.c' object='ags/audio/libags_audio_la-ags_recall_ladspa.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_ladspa.lo `test -f 'ags/audio/ags_recall_ladspa.c' || echo '$(srcdir)/'`ags/audio/ags_recall_ladspa.c ags/audio/libags_audio_la-ags_recall_ladspa_run.lo: ags/audio/ags_recall_ladspa_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_ladspa_run.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_ladspa_run.Tpo -c -o ags/audio/libags_audio_la-ags_recall_ladspa_run.lo `test -f 'ags/audio/ags_recall_ladspa_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_ladspa_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_ladspa_run.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_ladspa_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_ladspa_run.c' object='ags/audio/libags_audio_la-ags_recall_ladspa_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_ladspa_run.lo `test -f 'ags/audio/ags_recall_ladspa_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_ladspa_run.c ags/audio/libags_audio_la-ags_recall_lv2.lo: ags/audio/ags_recall_lv2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_lv2.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_lv2.Tpo -c -o ags/audio/libags_audio_la-ags_recall_lv2.lo `test -f 'ags/audio/ags_recall_lv2.c' || echo '$(srcdir)/'`ags/audio/ags_recall_lv2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_lv2.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_lv2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_lv2.c' object='ags/audio/libags_audio_la-ags_recall_lv2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_lv2.lo `test -f 'ags/audio/ags_recall_lv2.c' || echo '$(srcdir)/'`ags/audio/ags_recall_lv2.c ags/audio/libags_audio_la-ags_recall_lv2_run.lo: ags/audio/ags_recall_lv2_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_lv2_run.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_lv2_run.Tpo -c -o ags/audio/libags_audio_la-ags_recall_lv2_run.lo `test -f 'ags/audio/ags_recall_lv2_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_lv2_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_lv2_run.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_lv2_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_lv2_run.c' object='ags/audio/libags_audio_la-ags_recall_lv2_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_lv2_run.lo `test -f 'ags/audio/ags_recall_lv2_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_lv2_run.c ags/audio/libags_audio_la-ags_recall_adaptor_run.lo: ags/audio/ags_recall_adaptor_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_adaptor_run.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_adaptor_run.Tpo -c -o ags/audio/libags_audio_la-ags_recall_adaptor_run.lo `test -f 'ags/audio/ags_recall_adaptor_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_adaptor_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_adaptor_run.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_adaptor_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_adaptor_run.c' object='ags/audio/libags_audio_la-ags_recall_adaptor_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_adaptor_run.lo `test -f 'ags/audio/ags_recall_adaptor_run.c' || echo '$(srcdir)/'`ags/audio/ags_recall_adaptor_run.c ags/audio/libags_audio_la-ags_recall_recycling.lo: ags/audio/ags_recall_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_recycling.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_recycling.Tpo -c -o ags/audio/libags_audio_la-ags_recall_recycling.lo `test -f 'ags/audio/ags_recall_recycling.c' || echo '$(srcdir)/'`ags/audio/ags_recall_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_recycling.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_recycling.c' object='ags/audio/libags_audio_la-ags_recall_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_recycling.lo `test -f 'ags/audio/ags_recall_recycling.c' || echo '$(srcdir)/'`ags/audio/ags_recall_recycling.c ags/audio/libags_audio_la-ags_recall_recycling_dummy.lo: ags/audio/ags_recall_recycling_dummy.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recall_recycling_dummy.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_recycling_dummy.Tpo -c -o ags/audio/libags_audio_la-ags_recall_recycling_dummy.lo `test -f 'ags/audio/ags_recall_recycling_dummy.c' || echo '$(srcdir)/'`ags/audio/ags_recall_recycling_dummy.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_recycling_dummy.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recall_recycling_dummy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recall_recycling_dummy.c' object='ags/audio/libags_audio_la-ags_recall_recycling_dummy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recall_recycling_dummy.lo `test -f 'ags/audio/ags_recall_recycling_dummy.c' || echo '$(srcdir)/'`ags/audio/ags_recall_recycling_dummy.c ags/audio/libags_audio_la-ags_recycling.lo: ags/audio/ags_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recycling.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recycling.Tpo -c -o ags/audio/libags_audio_la-ags_recycling.lo `test -f 'ags/audio/ags_recycling.c' || echo '$(srcdir)/'`ags/audio/ags_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recycling.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recycling.c' object='ags/audio/libags_audio_la-ags_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recycling.lo `test -f 'ags/audio/ags_recycling.c' || echo '$(srcdir)/'`ags/audio/ags_recycling.c ags/audio/libags_audio_la-ags_recycling_context.lo: ags/audio/ags_recycling_context.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_recycling_context.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_recycling_context.Tpo -c -o ags/audio/libags_audio_la-ags_recycling_context.lo `test -f 'ags/audio/ags_recycling_context.c' || echo '$(srcdir)/'`ags/audio/ags_recycling_context.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_recycling_context.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_recycling_context.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_recycling_context.c' object='ags/audio/libags_audio_la-ags_recycling_context.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_recycling_context.lo `test -f 'ags/audio/ags_recycling_context.c' || echo '$(srcdir)/'`ags/audio/ags_recycling_context.c ags/audio/libags_audio_la-ags_sound_provider.lo: ags/audio/ags_sound_provider.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_sound_provider.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_sound_provider.Tpo -c -o ags/audio/libags_audio_la-ags_sound_provider.lo `test -f 'ags/audio/ags_sound_provider.c' || echo '$(srcdir)/'`ags/audio/ags_sound_provider.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_sound_provider.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_sound_provider.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_sound_provider.c' object='ags/audio/libags_audio_la-ags_sound_provider.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_sound_provider.lo `test -f 'ags/audio/ags_sound_provider.c' || echo '$(srcdir)/'`ags/audio/ags_sound_provider.c ags/audio/libags_audio_la-ags_synth_generator.lo: ags/audio/ags_synth_generator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_synth_generator.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_synth_generator.Tpo -c -o ags/audio/libags_audio_la-ags_synth_generator.lo `test -f 'ags/audio/ags_synth_generator.c' || echo '$(srcdir)/'`ags/audio/ags_synth_generator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_synth_generator.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_synth_generator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_synth_generator.c' object='ags/audio/libags_audio_la-ags_synth_generator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_synth_generator.lo `test -f 'ags/audio/ags_synth_generator.c' || echo '$(srcdir)/'`ags/audio/ags_synth_generator.c ags/audio/libags_audio_la-ags_synth_util.lo: ags/audio/ags_synth_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_synth_util.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_synth_util.Tpo -c -o ags/audio/libags_audio_la-ags_synth_util.lo `test -f 'ags/audio/ags_synth_util.c' || echo '$(srcdir)/'`ags/audio/ags_synth_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_synth_util.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_synth_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_synth_util.c' object='ags/audio/libags_audio_la-ags_synth_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_synth_util.lo `test -f 'ags/audio/ags_synth_util.c' || echo '$(srcdir)/'`ags/audio/ags_synth_util.c ags/audio/libags_audio_la-ags_wave.lo: ags/audio/ags_wave.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/libags_audio_la-ags_wave.lo -MD -MP -MF ags/audio/$(DEPDIR)/libags_audio_la-ags_wave.Tpo -c -o ags/audio/libags_audio_la-ags_wave.lo `test -f 'ags/audio/ags_wave.c' || echo '$(srcdir)/'`ags/audio/ags_wave.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/$(DEPDIR)/libags_audio_la-ags_wave.Tpo ags/audio/$(DEPDIR)/libags_audio_la-ags_wave.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/ags_wave.c' object='ags/audio/libags_audio_la-ags_wave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/libags_audio_la-ags_wave.lo `test -f 'ags/audio/ags_wave.c' || echo '$(srcdir)/'`ags/audio/ags_wave.c ags/audio/client/libags_audio_la-ags_remote_channel.lo: ags/audio/client/ags_remote_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/client/libags_audio_la-ags_remote_channel.lo -MD -MP -MF ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_channel.Tpo -c -o ags/audio/client/libags_audio_la-ags_remote_channel.lo `test -f 'ags/audio/client/ags_remote_channel.c' || echo '$(srcdir)/'`ags/audio/client/ags_remote_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_channel.Tpo ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/client/ags_remote_channel.c' object='ags/audio/client/libags_audio_la-ags_remote_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/client/libags_audio_la-ags_remote_channel.lo `test -f 'ags/audio/client/ags_remote_channel.c' || echo '$(srcdir)/'`ags/audio/client/ags_remote_channel.c ags/audio/client/libags_audio_la-ags_remote_input.lo: ags/audio/client/ags_remote_input.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/client/libags_audio_la-ags_remote_input.lo -MD -MP -MF ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_input.Tpo -c -o ags/audio/client/libags_audio_la-ags_remote_input.lo `test -f 'ags/audio/client/ags_remote_input.c' || echo '$(srcdir)/'`ags/audio/client/ags_remote_input.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_input.Tpo ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_input.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/client/ags_remote_input.c' object='ags/audio/client/libags_audio_la-ags_remote_input.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/client/libags_audio_la-ags_remote_input.lo `test -f 'ags/audio/client/ags_remote_input.c' || echo '$(srcdir)/'`ags/audio/client/ags_remote_input.c ags/audio/client/libags_audio_la-ags_remote_output.lo: ags/audio/client/ags_remote_output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/client/libags_audio_la-ags_remote_output.lo -MD -MP -MF ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_output.Tpo -c -o ags/audio/client/libags_audio_la-ags_remote_output.lo `test -f 'ags/audio/client/ags_remote_output.c' || echo '$(srcdir)/'`ags/audio/client/ags_remote_output.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_output.Tpo ags/audio/client/$(DEPDIR)/libags_audio_la-ags_remote_output.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/client/ags_remote_output.c' object='ags/audio/client/libags_audio_la-ags_remote_output.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/client/libags_audio_la-ags_remote_output.lo `test -f 'ags/audio/client/ags_remote_output.c' || echo '$(srcdir)/'`ags/audio/client/ags_remote_output.c ags/audio/thread/libags_audio_la-ags_audio_loop.lo: ags/audio/thread/ags_audio_loop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_audio_loop.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_audio_loop.Tpo -c -o ags/audio/thread/libags_audio_la-ags_audio_loop.lo `test -f 'ags/audio/thread/ags_audio_loop.c' || echo '$(srcdir)/'`ags/audio/thread/ags_audio_loop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_audio_loop.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_audio_loop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_audio_loop.c' object='ags/audio/thread/libags_audio_la-ags_audio_loop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_audio_loop.lo `test -f 'ags/audio/thread/ags_audio_loop.c' || echo '$(srcdir)/'`ags/audio/thread/ags_audio_loop.c ags/audio/thread/libags_audio_la-ags_audio_thread.lo: ags/audio/thread/ags_audio_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_audio_thread.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_audio_thread.Tpo -c -o ags/audio/thread/libags_audio_la-ags_audio_thread.lo `test -f 'ags/audio/thread/ags_audio_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_audio_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_audio_thread.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_audio_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_audio_thread.c' object='ags/audio/thread/libags_audio_la-ags_audio_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_audio_thread.lo `test -f 'ags/audio/thread/ags_audio_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_audio_thread.c ags/audio/thread/libags_audio_la-ags_channel_thread.lo: ags/audio/thread/ags_channel_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_channel_thread.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_channel_thread.Tpo -c -o ags/audio/thread/libags_audio_la-ags_channel_thread.lo `test -f 'ags/audio/thread/ags_channel_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_channel_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_channel_thread.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_channel_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_channel_thread.c' object='ags/audio/thread/libags_audio_la-ags_channel_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_channel_thread.lo `test -f 'ags/audio/thread/ags_channel_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_channel_thread.c ags/audio/thread/libags_audio_la-ags_sequencer_thread.lo: ags/audio/thread/ags_sequencer_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_sequencer_thread.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_sequencer_thread.Tpo -c -o ags/audio/thread/libags_audio_la-ags_sequencer_thread.lo `test -f 'ags/audio/thread/ags_sequencer_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_sequencer_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_sequencer_thread.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_sequencer_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_sequencer_thread.c' object='ags/audio/thread/libags_audio_la-ags_sequencer_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_sequencer_thread.lo `test -f 'ags/audio/thread/ags_sequencer_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_sequencer_thread.c ags/audio/thread/libags_audio_la-ags_soundcard_thread.lo: ags/audio/thread/ags_soundcard_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_soundcard_thread.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_soundcard_thread.Tpo -c -o ags/audio/thread/libags_audio_la-ags_soundcard_thread.lo `test -f 'ags/audio/thread/ags_soundcard_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_soundcard_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_soundcard_thread.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_soundcard_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_soundcard_thread.c' object='ags/audio/thread/libags_audio_la-ags_soundcard_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_soundcard_thread.lo `test -f 'ags/audio/thread/ags_soundcard_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_soundcard_thread.c ags/audio/thread/libags_audio_la-ags_export_thread.lo: ags/audio/thread/ags_export_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_export_thread.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_export_thread.Tpo -c -o ags/audio/thread/libags_audio_la-ags_export_thread.lo `test -f 'ags/audio/thread/ags_export_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_export_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_export_thread.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_export_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_export_thread.c' object='ags/audio/thread/libags_audio_la-ags_export_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_export_thread.lo `test -f 'ags/audio/thread/ags_export_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_export_thread.c ags/audio/thread/libags_audio_la-ags_iterator_thread.lo: ags/audio/thread/ags_iterator_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_iterator_thread.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_iterator_thread.Tpo -c -o ags/audio/thread/libags_audio_la-ags_iterator_thread.lo `test -f 'ags/audio/thread/ags_iterator_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_iterator_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_iterator_thread.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_iterator_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_iterator_thread.c' object='ags/audio/thread/libags_audio_la-ags_iterator_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_iterator_thread.lo `test -f 'ags/audio/thread/ags_iterator_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_iterator_thread.c ags/audio/thread/libags_audio_la-ags_record_thread.lo: ags/audio/thread/ags_record_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_record_thread.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_record_thread.Tpo -c -o ags/audio/thread/libags_audio_la-ags_record_thread.lo `test -f 'ags/audio/thread/ags_record_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_record_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_record_thread.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_record_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_record_thread.c' object='ags/audio/thread/libags_audio_la-ags_record_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_record_thread.lo `test -f 'ags/audio/thread/ags_record_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_record_thread.c ags/audio/thread/libags_audio_la-ags_recycling_thread.lo: ags/audio/thread/ags_recycling_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_recycling_thread.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_recycling_thread.Tpo -c -o ags/audio/thread/libags_audio_la-ags_recycling_thread.lo `test -f 'ags/audio/thread/ags_recycling_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_recycling_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_recycling_thread.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_recycling_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_recycling_thread.c' object='ags/audio/thread/libags_audio_la-ags_recycling_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_recycling_thread.lo `test -f 'ags/audio/thread/ags_recycling_thread.c' || echo '$(srcdir)/'`ags/audio/thread/ags_recycling_thread.c ags/audio/thread/libags_audio_la-ags_recycling_thread_callbacks.lo: ags/audio/thread/ags_recycling_thread_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/thread/libags_audio_la-ags_recycling_thread_callbacks.lo -MD -MP -MF ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_recycling_thread_callbacks.Tpo -c -o ags/audio/thread/libags_audio_la-ags_recycling_thread_callbacks.lo `test -f 'ags/audio/thread/ags_recycling_thread_callbacks.c' || echo '$(srcdir)/'`ags/audio/thread/ags_recycling_thread_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_recycling_thread_callbacks.Tpo ags/audio/thread/$(DEPDIR)/libags_audio_la-ags_recycling_thread_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/thread/ags_recycling_thread_callbacks.c' object='ags/audio/thread/libags_audio_la-ags_recycling_thread_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/thread/libags_audio_la-ags_recycling_thread_callbacks.lo `test -f 'ags/audio/thread/ags_recycling_thread_callbacks.c' || echo '$(srcdir)/'`ags/audio/thread/ags_recycling_thread_callbacks.c ags/audio/file/libags_audio_la-ags_audio_file.lo: ags/audio/file/ags_audio_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/file/libags_audio_la-ags_audio_file.lo -MD -MP -MF ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file.Tpo -c -o ags/audio/file/libags_audio_la-ags_audio_file.lo `test -f 'ags/audio/file/ags_audio_file.c' || echo '$(srcdir)/'`ags/audio/file/ags_audio_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file.Tpo ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/file/ags_audio_file.c' object='ags/audio/file/libags_audio_la-ags_audio_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/file/libags_audio_la-ags_audio_file.lo `test -f 'ags/audio/file/ags_audio_file.c' || echo '$(srcdir)/'`ags/audio/file/ags_audio_file.c ags/audio/file/libags_audio_la-ags_audio_file_link.lo: ags/audio/file/ags_audio_file_link.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/file/libags_audio_la-ags_audio_file_link.lo -MD -MP -MF ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file_link.Tpo -c -o ags/audio/file/libags_audio_la-ags_audio_file_link.lo `test -f 'ags/audio/file/ags_audio_file_link.c' || echo '$(srcdir)/'`ags/audio/file/ags_audio_file_link.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file_link.Tpo ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file_link.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/file/ags_audio_file_link.c' object='ags/audio/file/libags_audio_la-ags_audio_file_link.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/file/libags_audio_la-ags_audio_file_link.lo `test -f 'ags/audio/file/ags_audio_file_link.c' || echo '$(srcdir)/'`ags/audio/file/ags_audio_file_link.c ags/audio/file/libags_audio_la-ags_audio_file_xml.lo: ags/audio/file/ags_audio_file_xml.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/file/libags_audio_la-ags_audio_file_xml.lo -MD -MP -MF ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file_xml.Tpo -c -o ags/audio/file/libags_audio_la-ags_audio_file_xml.lo `test -f 'ags/audio/file/ags_audio_file_xml.c' || echo '$(srcdir)/'`ags/audio/file/ags_audio_file_xml.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file_xml.Tpo ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_file_xml.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/file/ags_audio_file_xml.c' object='ags/audio/file/libags_audio_la-ags_audio_file_xml.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/file/libags_audio_la-ags_audio_file_xml.lo `test -f 'ags/audio/file/ags_audio_file_xml.c' || echo '$(srcdir)/'`ags/audio/file/ags_audio_file_xml.c ags/audio/file/libags_audio_la-ags_audio_xml_serialization_factory.lo: ags/audio/file/ags_audio_xml_serialization_factory.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/file/libags_audio_la-ags_audio_xml_serialization_factory.lo -MD -MP -MF ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_xml_serialization_factory.Tpo -c -o ags/audio/file/libags_audio_la-ags_audio_xml_serialization_factory.lo `test -f 'ags/audio/file/ags_audio_xml_serialization_factory.c' || echo '$(srcdir)/'`ags/audio/file/ags_audio_xml_serialization_factory.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_xml_serialization_factory.Tpo ags/audio/file/$(DEPDIR)/libags_audio_la-ags_audio_xml_serialization_factory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/file/ags_audio_xml_serialization_factory.c' object='ags/audio/file/libags_audio_la-ags_audio_xml_serialization_factory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/file/libags_audio_la-ags_audio_xml_serialization_factory.lo `test -f 'ags/audio/file/ags_audio_xml_serialization_factory.c' || echo '$(srcdir)/'`ags/audio/file/ags_audio_xml_serialization_factory.c ags/audio/file/libags_audio_la-ags_ipatch.lo: ags/audio/file/ags_ipatch.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/file/libags_audio_la-ags_ipatch.lo -MD -MP -MF ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch.Tpo -c -o ags/audio/file/libags_audio_la-ags_ipatch.lo `test -f 'ags/audio/file/ags_ipatch.c' || echo '$(srcdir)/'`ags/audio/file/ags_ipatch.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch.Tpo ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/file/ags_ipatch.c' object='ags/audio/file/libags_audio_la-ags_ipatch.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/file/libags_audio_la-ags_ipatch.lo `test -f 'ags/audio/file/ags_ipatch.c' || echo '$(srcdir)/'`ags/audio/file/ags_ipatch.c ags/audio/file/libags_audio_la-ags_ipatch_dls2_reader.lo: ags/audio/file/ags_ipatch_dls2_reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/file/libags_audio_la-ags_ipatch_dls2_reader.lo -MD -MP -MF ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch_dls2_reader.Tpo -c -o ags/audio/file/libags_audio_la-ags_ipatch_dls2_reader.lo `test -f 'ags/audio/file/ags_ipatch_dls2_reader.c' || echo '$(srcdir)/'`ags/audio/file/ags_ipatch_dls2_reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch_dls2_reader.Tpo ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch_dls2_reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/file/ags_ipatch_dls2_reader.c' object='ags/audio/file/libags_audio_la-ags_ipatch_dls2_reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/file/libags_audio_la-ags_ipatch_dls2_reader.lo `test -f 'ags/audio/file/ags_ipatch_dls2_reader.c' || echo '$(srcdir)/'`ags/audio/file/ags_ipatch_dls2_reader.c ags/audio/file/libags_audio_la-ags_ipatch_sf2_reader.lo: ags/audio/file/ags_ipatch_sf2_reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/file/libags_audio_la-ags_ipatch_sf2_reader.lo -MD -MP -MF ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch_sf2_reader.Tpo -c -o ags/audio/file/libags_audio_la-ags_ipatch_sf2_reader.lo `test -f 'ags/audio/file/ags_ipatch_sf2_reader.c' || echo '$(srcdir)/'`ags/audio/file/ags_ipatch_sf2_reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch_sf2_reader.Tpo ags/audio/file/$(DEPDIR)/libags_audio_la-ags_ipatch_sf2_reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/file/ags_ipatch_sf2_reader.c' object='ags/audio/file/libags_audio_la-ags_ipatch_sf2_reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/file/libags_audio_la-ags_ipatch_sf2_reader.lo `test -f 'ags/audio/file/ags_ipatch_sf2_reader.c' || echo '$(srcdir)/'`ags/audio/file/ags_ipatch_sf2_reader.c ags/audio/file/libags_audio_la-ags_sndfile.lo: ags/audio/file/ags_sndfile.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/file/libags_audio_la-ags_sndfile.lo -MD -MP -MF ags/audio/file/$(DEPDIR)/libags_audio_la-ags_sndfile.Tpo -c -o ags/audio/file/libags_audio_la-ags_sndfile.lo `test -f 'ags/audio/file/ags_sndfile.c' || echo '$(srcdir)/'`ags/audio/file/ags_sndfile.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/file/$(DEPDIR)/libags_audio_la-ags_sndfile.Tpo ags/audio/file/$(DEPDIR)/libags_audio_la-ags_sndfile.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/file/ags_sndfile.c' object='ags/audio/file/libags_audio_la-ags_sndfile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/file/libags_audio_la-ags_sndfile.lo `test -f 'ags/audio/file/ags_sndfile.c' || echo '$(srcdir)/'`ags/audio/file/ags_sndfile.c ags/audio/midi/libags_audio_la-ags_midi_buffer_util.lo: ags/audio/midi/ags_midi_buffer_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/midi/libags_audio_la-ags_midi_buffer_util.lo -MD -MP -MF ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_buffer_util.Tpo -c -o ags/audio/midi/libags_audio_la-ags_midi_buffer_util.lo `test -f 'ags/audio/midi/ags_midi_buffer_util.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_buffer_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_buffer_util.Tpo ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_buffer_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/midi/ags_midi_buffer_util.c' object='ags/audio/midi/libags_audio_la-ags_midi_buffer_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/midi/libags_audio_la-ags_midi_buffer_util.lo `test -f 'ags/audio/midi/ags_midi_buffer_util.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_buffer_util.c ags/audio/midi/libags_audio_la-ags_midi_util.lo: ags/audio/midi/ags_midi_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/midi/libags_audio_la-ags_midi_util.lo -MD -MP -MF ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_util.Tpo -c -o ags/audio/midi/libags_audio_la-ags_midi_util.lo `test -f 'ags/audio/midi/ags_midi_util.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_util.Tpo ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/midi/ags_midi_util.c' object='ags/audio/midi/libags_audio_la-ags_midi_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/midi/libags_audio_la-ags_midi_util.lo `test -f 'ags/audio/midi/ags_midi_util.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_util.c ags/audio/midi/libags_audio_la-ags_midi_builder.lo: ags/audio/midi/ags_midi_builder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/midi/libags_audio_la-ags_midi_builder.lo -MD -MP -MF ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_builder.Tpo -c -o ags/audio/midi/libags_audio_la-ags_midi_builder.lo `test -f 'ags/audio/midi/ags_midi_builder.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_builder.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_builder.Tpo ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_builder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/midi/ags_midi_builder.c' object='ags/audio/midi/libags_audio_la-ags_midi_builder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/midi/libags_audio_la-ags_midi_builder.lo `test -f 'ags/audio/midi/ags_midi_builder.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_builder.c ags/audio/midi/libags_audio_la-ags_midi_file.lo: ags/audio/midi/ags_midi_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/midi/libags_audio_la-ags_midi_file.lo -MD -MP -MF ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_file.Tpo -c -o ags/audio/midi/libags_audio_la-ags_midi_file.lo `test -f 'ags/audio/midi/ags_midi_file.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_file.Tpo ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/midi/ags_midi_file.c' object='ags/audio/midi/libags_audio_la-ags_midi_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/midi/libags_audio_la-ags_midi_file.lo `test -f 'ags/audio/midi/ags_midi_file.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_file.c ags/audio/midi/libags_audio_la-ags_midi_parser.lo: ags/audio/midi/ags_midi_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/midi/libags_audio_la-ags_midi_parser.lo -MD -MP -MF ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_parser.Tpo -c -o ags/audio/midi/libags_audio_la-ags_midi_parser.lo `test -f 'ags/audio/midi/ags_midi_parser.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_parser.Tpo ags/audio/midi/$(DEPDIR)/libags_audio_la-ags_midi_parser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/midi/ags_midi_parser.c' object='ags/audio/midi/libags_audio_la-ags_midi_parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/midi/libags_audio_la-ags_midi_parser.lo `test -f 'ags/audio/midi/ags_midi_parser.c' || echo '$(srcdir)/'`ags/audio/midi/ags_midi_parser.c ags/audio/jack/libags_audio_la-ags_jack_client.lo: ags/audio/jack/ags_jack_client.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/jack/libags_audio_la-ags_jack_client.lo -MD -MP -MF ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_client.Tpo -c -o ags/audio/jack/libags_audio_la-ags_jack_client.lo `test -f 'ags/audio/jack/ags_jack_client.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_client.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_client.Tpo ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_client.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/jack/ags_jack_client.c' object='ags/audio/jack/libags_audio_la-ags_jack_client.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/jack/libags_audio_la-ags_jack_client.lo `test -f 'ags/audio/jack/ags_jack_client.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_client.c ags/audio/jack/libags_audio_la-ags_jack_midiin.lo: ags/audio/jack/ags_jack_midiin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/jack/libags_audio_la-ags_jack_midiin.lo -MD -MP -MF ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_midiin.Tpo -c -o ags/audio/jack/libags_audio_la-ags_jack_midiin.lo `test -f 'ags/audio/jack/ags_jack_midiin.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_midiin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_midiin.Tpo ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_midiin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/jack/ags_jack_midiin.c' object='ags/audio/jack/libags_audio_la-ags_jack_midiin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/jack/libags_audio_la-ags_jack_midiin.lo `test -f 'ags/audio/jack/ags_jack_midiin.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_midiin.c ags/audio/jack/libags_audio_la-ags_jack_devout.lo: ags/audio/jack/ags_jack_devout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/jack/libags_audio_la-ags_jack_devout.lo -MD -MP -MF ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_devout.Tpo -c -o ags/audio/jack/libags_audio_la-ags_jack_devout.lo `test -f 'ags/audio/jack/ags_jack_devout.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_devout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_devout.Tpo ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_devout.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/jack/ags_jack_devout.c' object='ags/audio/jack/libags_audio_la-ags_jack_devout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/jack/libags_audio_la-ags_jack_devout.lo `test -f 'ags/audio/jack/ags_jack_devout.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_devout.c ags/audio/jack/libags_audio_la-ags_jack_devin.lo: ags/audio/jack/ags_jack_devin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/jack/libags_audio_la-ags_jack_devin.lo -MD -MP -MF ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_devin.Tpo -c -o ags/audio/jack/libags_audio_la-ags_jack_devin.lo `test -f 'ags/audio/jack/ags_jack_devin.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_devin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_devin.Tpo ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_devin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/jack/ags_jack_devin.c' object='ags/audio/jack/libags_audio_la-ags_jack_devin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/jack/libags_audio_la-ags_jack_devin.lo `test -f 'ags/audio/jack/ags_jack_devin.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_devin.c ags/audio/jack/libags_audio_la-ags_jack_port.lo: ags/audio/jack/ags_jack_port.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/jack/libags_audio_la-ags_jack_port.lo -MD -MP -MF ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_port.Tpo -c -o ags/audio/jack/libags_audio_la-ags_jack_port.lo `test -f 'ags/audio/jack/ags_jack_port.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_port.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_port.Tpo ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_port.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/jack/ags_jack_port.c' object='ags/audio/jack/libags_audio_la-ags_jack_port.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/jack/libags_audio_la-ags_jack_port.lo `test -f 'ags/audio/jack/ags_jack_port.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_port.c ags/audio/jack/libags_audio_la-ags_jack_server.lo: ags/audio/jack/ags_jack_server.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/jack/libags_audio_la-ags_jack_server.lo -MD -MP -MF ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_server.Tpo -c -o ags/audio/jack/libags_audio_la-ags_jack_server.lo `test -f 'ags/audio/jack/ags_jack_server.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_server.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_server.Tpo ags/audio/jack/$(DEPDIR)/libags_audio_la-ags_jack_server.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/jack/ags_jack_server.c' object='ags/audio/jack/libags_audio_la-ags_jack_server.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/jack/libags_audio_la-ags_jack_server.lo `test -f 'ags/audio/jack/ags_jack_server.c' || echo '$(srcdir)/'`ags/audio/jack/ags_jack_server.c ags/audio/pulse/libags_audio_la-ags_pulse_client.lo: ags/audio/pulse/ags_pulse_client.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/pulse/libags_audio_la-ags_pulse_client.lo -MD -MP -MF ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_client.Tpo -c -o ags/audio/pulse/libags_audio_la-ags_pulse_client.lo `test -f 'ags/audio/pulse/ags_pulse_client.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_client.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_client.Tpo ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_client.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/pulse/ags_pulse_client.c' object='ags/audio/pulse/libags_audio_la-ags_pulse_client.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/pulse/libags_audio_la-ags_pulse_client.lo `test -f 'ags/audio/pulse/ags_pulse_client.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_client.c ags/audio/pulse/libags_audio_la-ags_pulse_devout.lo: ags/audio/pulse/ags_pulse_devout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/pulse/libags_audio_la-ags_pulse_devout.lo -MD -MP -MF ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_devout.Tpo -c -o ags/audio/pulse/libags_audio_la-ags_pulse_devout.lo `test -f 'ags/audio/pulse/ags_pulse_devout.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_devout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_devout.Tpo ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_devout.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/pulse/ags_pulse_devout.c' object='ags/audio/pulse/libags_audio_la-ags_pulse_devout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/pulse/libags_audio_la-ags_pulse_devout.lo `test -f 'ags/audio/pulse/ags_pulse_devout.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_devout.c ags/audio/pulse/libags_audio_la-ags_pulse_devin.lo: ags/audio/pulse/ags_pulse_devin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/pulse/libags_audio_la-ags_pulse_devin.lo -MD -MP -MF ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_devin.Tpo -c -o ags/audio/pulse/libags_audio_la-ags_pulse_devin.lo `test -f 'ags/audio/pulse/ags_pulse_devin.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_devin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_devin.Tpo ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_devin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/pulse/ags_pulse_devin.c' object='ags/audio/pulse/libags_audio_la-ags_pulse_devin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/pulse/libags_audio_la-ags_pulse_devin.lo `test -f 'ags/audio/pulse/ags_pulse_devin.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_devin.c ags/audio/pulse/libags_audio_la-ags_pulse_port.lo: ags/audio/pulse/ags_pulse_port.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/pulse/libags_audio_la-ags_pulse_port.lo -MD -MP -MF ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_port.Tpo -c -o ags/audio/pulse/libags_audio_la-ags_pulse_port.lo `test -f 'ags/audio/pulse/ags_pulse_port.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_port.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_port.Tpo ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_port.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/pulse/ags_pulse_port.c' object='ags/audio/pulse/libags_audio_la-ags_pulse_port.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/pulse/libags_audio_la-ags_pulse_port.lo `test -f 'ags/audio/pulse/ags_pulse_port.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_port.c ags/audio/pulse/libags_audio_la-ags_pulse_server.lo: ags/audio/pulse/ags_pulse_server.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/pulse/libags_audio_la-ags_pulse_server.lo -MD -MP -MF ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_server.Tpo -c -o ags/audio/pulse/libags_audio_la-ags_pulse_server.lo `test -f 'ags/audio/pulse/ags_pulse_server.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_server.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_server.Tpo ags/audio/pulse/$(DEPDIR)/libags_audio_la-ags_pulse_server.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/pulse/ags_pulse_server.c' object='ags/audio/pulse/libags_audio_la-ags_pulse_server.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/pulse/libags_audio_la-ags_pulse_server.lo `test -f 'ags/audio/pulse/ags_pulse_server.c' || echo '$(srcdir)/'`ags/audio/pulse/ags_pulse_server.c ags/audio/core-audio/libags_audio_la-ags_core_audio_client.lo: ags/audio/core-audio/ags_core_audio_client.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/core-audio/libags_audio_la-ags_core_audio_client.lo -MD -MP -MF ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_client.Tpo -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_client.lo `test -f 'ags/audio/core-audio/ags_core_audio_client.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_client.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_client.Tpo ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_client.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/core-audio/ags_core_audio_client.c' object='ags/audio/core-audio/libags_audio_la-ags_core_audio_client.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_client.lo `test -f 'ags/audio/core-audio/ags_core_audio_client.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_client.c ags/audio/core-audio/libags_audio_la-ags_core_audio_midiin.lo: ags/audio/core-audio/ags_core_audio_midiin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/core-audio/libags_audio_la-ags_core_audio_midiin.lo -MD -MP -MF ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_midiin.Tpo -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_midiin.lo `test -f 'ags/audio/core-audio/ags_core_audio_midiin.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_midiin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_midiin.Tpo ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_midiin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/core-audio/ags_core_audio_midiin.c' object='ags/audio/core-audio/libags_audio_la-ags_core_audio_midiin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_midiin.lo `test -f 'ags/audio/core-audio/ags_core_audio_midiin.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_midiin.c ags/audio/core-audio/libags_audio_la-ags_core_audio_devout.lo: ags/audio/core-audio/ags_core_audio_devout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/core-audio/libags_audio_la-ags_core_audio_devout.lo -MD -MP -MF ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_devout.Tpo -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_devout.lo `test -f 'ags/audio/core-audio/ags_core_audio_devout.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_devout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_devout.Tpo ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_devout.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/core-audio/ags_core_audio_devout.c' object='ags/audio/core-audio/libags_audio_la-ags_core_audio_devout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_devout.lo `test -f 'ags/audio/core-audio/ags_core_audio_devout.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_devout.c ags/audio/core-audio/libags_audio_la-ags_core_audio_port.lo: ags/audio/core-audio/ags_core_audio_port.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/core-audio/libags_audio_la-ags_core_audio_port.lo -MD -MP -MF ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_port.Tpo -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_port.lo `test -f 'ags/audio/core-audio/ags_core_audio_port.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_port.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_port.Tpo ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_port.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/core-audio/ags_core_audio_port.c' object='ags/audio/core-audio/libags_audio_la-ags_core_audio_port.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_port.lo `test -f 'ags/audio/core-audio/ags_core_audio_port.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_port.c ags/audio/core-audio/libags_audio_la-ags_core_audio_server.lo: ags/audio/core-audio/ags_core_audio_server.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/core-audio/libags_audio_la-ags_core_audio_server.lo -MD -MP -MF ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_server.Tpo -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_server.lo `test -f 'ags/audio/core-audio/ags_core_audio_server.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_server.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_server.Tpo ags/audio/core-audio/$(DEPDIR)/libags_audio_la-ags_core_audio_server.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/core-audio/ags_core_audio_server.c' object='ags/audio/core-audio/libags_audio_la-ags_core_audio_server.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/core-audio/libags_audio_la-ags_core_audio_server.lo `test -f 'ags/audio/core-audio/ags_core_audio_server.c' || echo '$(srcdir)/'`ags/audio/core-audio/ags_core_audio_server.c ags/audio/task/libags_audio_la-ags_add_audio.lo: ags/audio/task/ags_add_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_add_audio.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_audio.Tpo -c -o ags/audio/task/libags_audio_la-ags_add_audio.lo `test -f 'ags/audio/task/ags_add_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_audio.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_add_audio.c' object='ags/audio/task/libags_audio_la-ags_add_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_add_audio.lo `test -f 'ags/audio/task/ags_add_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_audio.c ags/audio/task/libags_audio_la-ags_add_audio_signal.lo: ags/audio/task/ags_add_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_add_audio_signal.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_audio_signal.Tpo -c -o ags/audio/task/libags_audio_la-ags_add_audio_signal.lo `test -f 'ags/audio/task/ags_add_audio_signal.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_audio_signal.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_add_audio_signal.c' object='ags/audio/task/libags_audio_la-ags_add_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_add_audio_signal.lo `test -f 'ags/audio/task/ags_add_audio_signal.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_audio_signal.c ags/audio/task/libags_audio_la-ags_add_effect.lo: ags/audio/task/ags_add_effect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_add_effect.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_effect.Tpo -c -o ags/audio/task/libags_audio_la-ags_add_effect.lo `test -f 'ags/audio/task/ags_add_effect.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_effect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_effect.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_effect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_add_effect.c' object='ags/audio/task/libags_audio_la-ags_add_effect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_add_effect.lo `test -f 'ags/audio/task/ags_add_effect.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_effect.c ags/audio/task/libags_audio_la-ags_add_note.lo: ags/audio/task/ags_add_note.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_add_note.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_note.Tpo -c -o ags/audio/task/libags_audio_la-ags_add_note.lo `test -f 'ags/audio/task/ags_add_note.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_note.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_note.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_note.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_add_note.c' object='ags/audio/task/libags_audio_la-ags_add_note.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_add_note.lo `test -f 'ags/audio/task/ags_add_note.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_note.c ags/audio/task/libags_audio_la-ags_add_point_to_selection.lo: ags/audio/task/ags_add_point_to_selection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_add_point_to_selection.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_point_to_selection.Tpo -c -o ags/audio/task/libags_audio_la-ags_add_point_to_selection.lo `test -f 'ags/audio/task/ags_add_point_to_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_point_to_selection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_point_to_selection.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_point_to_selection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_add_point_to_selection.c' object='ags/audio/task/libags_audio_la-ags_add_point_to_selection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_add_point_to_selection.lo `test -f 'ags/audio/task/ags_add_point_to_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_point_to_selection.c ags/audio/task/libags_audio_la-ags_add_recall.lo: ags/audio/task/ags_add_recall.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_add_recall.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_recall.Tpo -c -o ags/audio/task/libags_audio_la-ags_add_recall.lo `test -f 'ags/audio/task/ags_add_recall.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_recall.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_recall.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_recall.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_add_recall.c' object='ags/audio/task/libags_audio_la-ags_add_recall.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_add_recall.lo `test -f 'ags/audio/task/ags_add_recall.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_recall.c ags/audio/task/libags_audio_la-ags_add_recall_container.lo: ags/audio/task/ags_add_recall_container.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_add_recall_container.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_recall_container.Tpo -c -o ags/audio/task/libags_audio_la-ags_add_recall_container.lo `test -f 'ags/audio/task/ags_add_recall_container.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_recall_container.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_recall_container.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_recall_container.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_add_recall_container.c' object='ags/audio/task/libags_audio_la-ags_add_recall_container.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_add_recall_container.lo `test -f 'ags/audio/task/ags_add_recall_container.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_recall_container.c ags/audio/task/libags_audio_la-ags_add_region_to_selection.lo: ags/audio/task/ags_add_region_to_selection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_add_region_to_selection.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_region_to_selection.Tpo -c -o ags/audio/task/libags_audio_la-ags_add_region_to_selection.lo `test -f 'ags/audio/task/ags_add_region_to_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_region_to_selection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_region_to_selection.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_region_to_selection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_add_region_to_selection.c' object='ags/audio/task/libags_audio_la-ags_add_region_to_selection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_add_region_to_selection.lo `test -f 'ags/audio/task/ags_add_region_to_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_region_to_selection.c ags/audio/task/libags_audio_la-ags_add_soundcard.lo: ags/audio/task/ags_add_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_add_soundcard.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_soundcard.Tpo -c -o ags/audio/task/libags_audio_la-ags_add_soundcard.lo `test -f 'ags/audio/task/ags_add_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_soundcard.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_add_soundcard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_add_soundcard.c' object='ags/audio/task/libags_audio_la-ags_add_soundcard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_add_soundcard.lo `test -f 'ags/audio/task/ags_add_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_add_soundcard.c ags/audio/task/libags_audio_la-ags_append_audio.lo: ags/audio/task/ags_append_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_append_audio.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_audio.Tpo -c -o ags/audio/task/libags_audio_la-ags_append_audio.lo `test -f 'ags/audio/task/ags_append_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_append_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_audio.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_append_audio.c' object='ags/audio/task/libags_audio_la-ags_append_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_append_audio.lo `test -f 'ags/audio/task/ags_append_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_append_audio.c ags/audio/task/libags_audio_la-ags_append_audio_threaded.lo: ags/audio/task/ags_append_audio_threaded.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_append_audio_threaded.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_audio_threaded.Tpo -c -o ags/audio/task/libags_audio_la-ags_append_audio_threaded.lo `test -f 'ags/audio/task/ags_append_audio_threaded.c' || echo '$(srcdir)/'`ags/audio/task/ags_append_audio_threaded.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_audio_threaded.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_audio_threaded.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_append_audio_threaded.c' object='ags/audio/task/libags_audio_la-ags_append_audio_threaded.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_append_audio_threaded.lo `test -f 'ags/audio/task/ags_append_audio_threaded.c' || echo '$(srcdir)/'`ags/audio/task/ags_append_audio_threaded.c ags/audio/task/libags_audio_la-ags_append_channel.lo: ags/audio/task/ags_append_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_append_channel.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_channel.Tpo -c -o ags/audio/task/libags_audio_la-ags_append_channel.lo `test -f 'ags/audio/task/ags_append_channel.c' || echo '$(srcdir)/'`ags/audio/task/ags_append_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_channel.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_append_channel.c' object='ags/audio/task/libags_audio_la-ags_append_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_append_channel.lo `test -f 'ags/audio/task/ags_append_channel.c' || echo '$(srcdir)/'`ags/audio/task/ags_append_channel.c ags/audio/task/libags_audio_la-ags_append_recall.lo: ags/audio/task/ags_append_recall.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_append_recall.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_recall.Tpo -c -o ags/audio/task/libags_audio_la-ags_append_recall.lo `test -f 'ags/audio/task/ags_append_recall.c' || echo '$(srcdir)/'`ags/audio/task/ags_append_recall.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_recall.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_append_recall.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_append_recall.c' object='ags/audio/task/libags_audio_la-ags_append_recall.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_append_recall.lo `test -f 'ags/audio/task/ags_append_recall.c' || echo '$(srcdir)/'`ags/audio/task/ags_append_recall.c ags/audio/task/libags_audio_la-ags_apply_presets.lo: ags/audio/task/ags_apply_presets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_apply_presets.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_apply_presets.Tpo -c -o ags/audio/task/libags_audio_la-ags_apply_presets.lo `test -f 'ags/audio/task/ags_apply_presets.c' || echo '$(srcdir)/'`ags/audio/task/ags_apply_presets.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_apply_presets.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_apply_presets.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_apply_presets.c' object='ags/audio/task/libags_audio_la-ags_apply_presets.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_apply_presets.lo `test -f 'ags/audio/task/ags_apply_presets.c' || echo '$(srcdir)/'`ags/audio/task/ags_apply_presets.c ags/audio/task/libags_audio_la-ags_apply_synth.lo: ags/audio/task/ags_apply_synth.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_apply_synth.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_apply_synth.Tpo -c -o ags/audio/task/libags_audio_la-ags_apply_synth.lo `test -f 'ags/audio/task/ags_apply_synth.c' || echo '$(srcdir)/'`ags/audio/task/ags_apply_synth.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_apply_synth.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_apply_synth.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_apply_synth.c' object='ags/audio/task/libags_audio_la-ags_apply_synth.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_apply_synth.lo `test -f 'ags/audio/task/ags_apply_synth.c' || echo '$(srcdir)/'`ags/audio/task/ags_apply_synth.c ags/audio/task/libags_audio_la-ags_cancel_audio.lo: ags/audio/task/ags_cancel_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_cancel_audio.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_audio.Tpo -c -o ags/audio/task/libags_audio_la-ags_cancel_audio.lo `test -f 'ags/audio/task/ags_cancel_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_cancel_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_audio.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_cancel_audio.c' object='ags/audio/task/libags_audio_la-ags_cancel_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_cancel_audio.lo `test -f 'ags/audio/task/ags_cancel_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_cancel_audio.c ags/audio/task/libags_audio_la-ags_cancel_channel.lo: ags/audio/task/ags_cancel_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_cancel_channel.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_channel.Tpo -c -o ags/audio/task/libags_audio_la-ags_cancel_channel.lo `test -f 'ags/audio/task/ags_cancel_channel.c' || echo '$(srcdir)/'`ags/audio/task/ags_cancel_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_channel.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_cancel_channel.c' object='ags/audio/task/libags_audio_la-ags_cancel_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_cancel_channel.lo `test -f 'ags/audio/task/ags_cancel_channel.c' || echo '$(srcdir)/'`ags/audio/task/ags_cancel_channel.c ags/audio/task/libags_audio_la-ags_cancel_recall.lo: ags/audio/task/ags_cancel_recall.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_cancel_recall.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_recall.Tpo -c -o ags/audio/task/libags_audio_la-ags_cancel_recall.lo `test -f 'ags/audio/task/ags_cancel_recall.c' || echo '$(srcdir)/'`ags/audio/task/ags_cancel_recall.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_recall.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_cancel_recall.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_cancel_recall.c' object='ags/audio/task/libags_audio_la-ags_cancel_recall.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_cancel_recall.lo `test -f 'ags/audio/task/ags_cancel_recall.c' || echo '$(srcdir)/'`ags/audio/task/ags_cancel_recall.c ags/audio/task/libags_audio_la-ags_change_soundcard.lo: ags/audio/task/ags_change_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_change_soundcard.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_change_soundcard.Tpo -c -o ags/audio/task/libags_audio_la-ags_change_soundcard.lo `test -f 'ags/audio/task/ags_change_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_change_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_change_soundcard.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_change_soundcard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_change_soundcard.c' object='ags/audio/task/libags_audio_la-ags_change_soundcard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_change_soundcard.lo `test -f 'ags/audio/task/ags_change_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_change_soundcard.c ags/audio/task/libags_audio_la-ags_clear_audio_signal.lo: ags/audio/task/ags_clear_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_clear_audio_signal.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_clear_audio_signal.Tpo -c -o ags/audio/task/libags_audio_la-ags_clear_audio_signal.lo `test -f 'ags/audio/task/ags_clear_audio_signal.c' || echo '$(srcdir)/'`ags/audio/task/ags_clear_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_clear_audio_signal.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_clear_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_clear_audio_signal.c' object='ags/audio/task/libags_audio_la-ags_clear_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_clear_audio_signal.lo `test -f 'ags/audio/task/ags_clear_audio_signal.c' || echo '$(srcdir)/'`ags/audio/task/ags_clear_audio_signal.c ags/audio/task/libags_audio_la-ags_clear_buffer.lo: ags/audio/task/ags_clear_buffer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_clear_buffer.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_clear_buffer.Tpo -c -o ags/audio/task/libags_audio_la-ags_clear_buffer.lo `test -f 'ags/audio/task/ags_clear_buffer.c' || echo '$(srcdir)/'`ags/audio/task/ags_clear_buffer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_clear_buffer.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_clear_buffer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_clear_buffer.c' object='ags/audio/task/libags_audio_la-ags_clear_buffer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_clear_buffer.lo `test -f 'ags/audio/task/ags_clear_buffer.c' || echo '$(srcdir)/'`ags/audio/task/ags_clear_buffer.c ags/audio/task/libags_audio_la-ags_crop_note.lo: ags/audio/task/ags_crop_note.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_crop_note.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_crop_note.Tpo -c -o ags/audio/task/libags_audio_la-ags_crop_note.lo `test -f 'ags/audio/task/ags_crop_note.c' || echo '$(srcdir)/'`ags/audio/task/ags_crop_note.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_crop_note.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_crop_note.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_crop_note.c' object='ags/audio/task/libags_audio_la-ags_crop_note.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_crop_note.lo `test -f 'ags/audio/task/ags_crop_note.c' || echo '$(srcdir)/'`ags/audio/task/ags_crop_note.c ags/audio/task/libags_audio_la-ags_export_output.lo: ags/audio/task/ags_export_output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_export_output.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_export_output.Tpo -c -o ags/audio/task/libags_audio_la-ags_export_output.lo `test -f 'ags/audio/task/ags_export_output.c' || echo '$(srcdir)/'`ags/audio/task/ags_export_output.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_export_output.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_export_output.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_export_output.c' object='ags/audio/task/libags_audio_la-ags_export_output.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_export_output.lo `test -f 'ags/audio/task/ags_export_output.c' || echo '$(srcdir)/'`ags/audio/task/ags_export_output.c ags/audio/task/libags_audio_la-ags_free_selection.lo: ags/audio/task/ags_free_selection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_free_selection.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_free_selection.Tpo -c -o ags/audio/task/libags_audio_la-ags_free_selection.lo `test -f 'ags/audio/task/ags_free_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_free_selection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_free_selection.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_free_selection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_free_selection.c' object='ags/audio/task/libags_audio_la-ags_free_selection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_free_selection.lo `test -f 'ags/audio/task/ags_free_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_free_selection.c ags/audio/task/libags_audio_la-ags_init_audio.lo: ags/audio/task/ags_init_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_init_audio.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_init_audio.Tpo -c -o ags/audio/task/libags_audio_la-ags_init_audio.lo `test -f 'ags/audio/task/ags_init_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_init_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_init_audio.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_init_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_init_audio.c' object='ags/audio/task/libags_audio_la-ags_init_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_init_audio.lo `test -f 'ags/audio/task/ags_init_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_init_audio.c ags/audio/task/libags_audio_la-ags_init_channel.lo: ags/audio/task/ags_init_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_init_channel.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_init_channel.Tpo -c -o ags/audio/task/libags_audio_la-ags_init_channel.lo `test -f 'ags/audio/task/ags_init_channel.c' || echo '$(srcdir)/'`ags/audio/task/ags_init_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_init_channel.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_init_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_init_channel.c' object='ags/audio/task/libags_audio_la-ags_init_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_init_channel.lo `test -f 'ags/audio/task/ags_init_channel.c' || echo '$(srcdir)/'`ags/audio/task/ags_init_channel.c ags/audio/task/libags_audio_la-ags_link_channel.lo: ags/audio/task/ags_link_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_link_channel.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_link_channel.Tpo -c -o ags/audio/task/libags_audio_la-ags_link_channel.lo `test -f 'ags/audio/task/ags_link_channel.c' || echo '$(srcdir)/'`ags/audio/task/ags_link_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_link_channel.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_link_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_link_channel.c' object='ags/audio/task/libags_audio_la-ags_link_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_link_channel.lo `test -f 'ags/audio/task/ags_link_channel.c' || echo '$(srcdir)/'`ags/audio/task/ags_link_channel.c ags/audio/task/libags_audio_la-ags_move_note.lo: ags/audio/task/ags_move_note.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_move_note.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_move_note.Tpo -c -o ags/audio/task/libags_audio_la-ags_move_note.lo `test -f 'ags/audio/task/ags_move_note.c' || echo '$(srcdir)/'`ags/audio/task/ags_move_note.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_move_note.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_move_note.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_move_note.c' object='ags/audio/task/libags_audio_la-ags_move_note.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_move_note.lo `test -f 'ags/audio/task/ags_move_note.c' || echo '$(srcdir)/'`ags/audio/task/ags_move_note.c ags/audio/task/libags_audio_la-ags_notify_soundcard.lo: ags/audio/task/ags_notify_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_notify_soundcard.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_notify_soundcard.Tpo -c -o ags/audio/task/libags_audio_la-ags_notify_soundcard.lo `test -f 'ags/audio/task/ags_notify_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_notify_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_notify_soundcard.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_notify_soundcard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_notify_soundcard.c' object='ags/audio/task/libags_audio_la-ags_notify_soundcard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_notify_soundcard.lo `test -f 'ags/audio/task/ags_notify_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_notify_soundcard.c ags/audio/task/libags_audio_la-ags_open_file.lo: ags/audio/task/ags_open_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_open_file.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_file.Tpo -c -o ags/audio/task/libags_audio_la-ags_open_file.lo `test -f 'ags/audio/task/ags_open_file.c' || echo '$(srcdir)/'`ags/audio/task/ags_open_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_file.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_open_file.c' object='ags/audio/task/libags_audio_la-ags_open_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_open_file.lo `test -f 'ags/audio/task/ags_open_file.c' || echo '$(srcdir)/'`ags/audio/task/ags_open_file.c ags/audio/task/libags_audio_la-ags_open_sf2_sample.lo: ags/audio/task/ags_open_sf2_sample.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_open_sf2_sample.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_sf2_sample.Tpo -c -o ags/audio/task/libags_audio_la-ags_open_sf2_sample.lo `test -f 'ags/audio/task/ags_open_sf2_sample.c' || echo '$(srcdir)/'`ags/audio/task/ags_open_sf2_sample.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_sf2_sample.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_sf2_sample.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_open_sf2_sample.c' object='ags/audio/task/libags_audio_la-ags_open_sf2_sample.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_open_sf2_sample.lo `test -f 'ags/audio/task/ags_open_sf2_sample.c' || echo '$(srcdir)/'`ags/audio/task/ags_open_sf2_sample.c ags/audio/task/libags_audio_la-ags_open_single_file.lo: ags/audio/task/ags_open_single_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_open_single_file.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_single_file.Tpo -c -o ags/audio/task/libags_audio_la-ags_open_single_file.lo `test -f 'ags/audio/task/ags_open_single_file.c' || echo '$(srcdir)/'`ags/audio/task/ags_open_single_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_single_file.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_open_single_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_open_single_file.c' object='ags/audio/task/libags_audio_la-ags_open_single_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_open_single_file.lo `test -f 'ags/audio/task/ags_open_single_file.c' || echo '$(srcdir)/'`ags/audio/task/ags_open_single_file.c ags/audio/task/libags_audio_la-ags_remove_audio.lo: ags/audio/task/ags_remove_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_remove_audio.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_audio.Tpo -c -o ags/audio/task/libags_audio_la-ags_remove_audio.lo `test -f 'ags/audio/task/ags_remove_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_audio.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_remove_audio.c' object='ags/audio/task/libags_audio_la-ags_remove_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_remove_audio.lo `test -f 'ags/audio/task/ags_remove_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_audio.c ags/audio/task/libags_audio_la-ags_remove_audio_signal.lo: ags/audio/task/ags_remove_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_remove_audio_signal.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_audio_signal.Tpo -c -o ags/audio/task/libags_audio_la-ags_remove_audio_signal.lo `test -f 'ags/audio/task/ags_remove_audio_signal.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_audio_signal.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_remove_audio_signal.c' object='ags/audio/task/libags_audio_la-ags_remove_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_remove_audio_signal.lo `test -f 'ags/audio/task/ags_remove_audio_signal.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_audio_signal.c ags/audio/task/libags_audio_la-ags_remove_note.lo: ags/audio/task/ags_remove_note.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_remove_note.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_note.Tpo -c -o ags/audio/task/libags_audio_la-ags_remove_note.lo `test -f 'ags/audio/task/ags_remove_note.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_note.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_note.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_note.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_remove_note.c' object='ags/audio/task/libags_audio_la-ags_remove_note.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_remove_note.lo `test -f 'ags/audio/task/ags_remove_note.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_note.c ags/audio/task/libags_audio_la-ags_remove_point_from_selection.lo: ags/audio/task/ags_remove_point_from_selection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_remove_point_from_selection.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_point_from_selection.Tpo -c -o ags/audio/task/libags_audio_la-ags_remove_point_from_selection.lo `test -f 'ags/audio/task/ags_remove_point_from_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_point_from_selection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_point_from_selection.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_point_from_selection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_remove_point_from_selection.c' object='ags/audio/task/libags_audio_la-ags_remove_point_from_selection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_remove_point_from_selection.lo `test -f 'ags/audio/task/ags_remove_point_from_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_point_from_selection.c ags/audio/task/libags_audio_la-ags_remove_recall.lo: ags/audio/task/ags_remove_recall.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_remove_recall.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_recall.Tpo -c -o ags/audio/task/libags_audio_la-ags_remove_recall.lo `test -f 'ags/audio/task/ags_remove_recall.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_recall.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_recall.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_recall.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_remove_recall.c' object='ags/audio/task/libags_audio_la-ags_remove_recall.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_remove_recall.lo `test -f 'ags/audio/task/ags_remove_recall.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_recall.c ags/audio/task/libags_audio_la-ags_remove_recall_container.lo: ags/audio/task/ags_remove_recall_container.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_remove_recall_container.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_recall_container.Tpo -c -o ags/audio/task/libags_audio_la-ags_remove_recall_container.lo `test -f 'ags/audio/task/ags_remove_recall_container.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_recall_container.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_recall_container.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_recall_container.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_remove_recall_container.c' object='ags/audio/task/libags_audio_la-ags_remove_recall_container.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_remove_recall_container.lo `test -f 'ags/audio/task/ags_remove_recall_container.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_recall_container.c ags/audio/task/libags_audio_la-ags_remove_region_from_selection.lo: ags/audio/task/ags_remove_region_from_selection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_remove_region_from_selection.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_region_from_selection.Tpo -c -o ags/audio/task/libags_audio_la-ags_remove_region_from_selection.lo `test -f 'ags/audio/task/ags_remove_region_from_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_region_from_selection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_region_from_selection.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_region_from_selection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_remove_region_from_selection.c' object='ags/audio/task/libags_audio_la-ags_remove_region_from_selection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_remove_region_from_selection.lo `test -f 'ags/audio/task/ags_remove_region_from_selection.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_region_from_selection.c ags/audio/task/libags_audio_la-ags_remove_soundcard.lo: ags/audio/task/ags_remove_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_remove_soundcard.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_soundcard.Tpo -c -o ags/audio/task/libags_audio_la-ags_remove_soundcard.lo `test -f 'ags/audio/task/ags_remove_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_soundcard.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_remove_soundcard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_remove_soundcard.c' object='ags/audio/task/libags_audio_la-ags_remove_soundcard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_remove_soundcard.lo `test -f 'ags/audio/task/ags_remove_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_remove_soundcard.c ags/audio/task/libags_audio_la-ags_reset_audio_connection.lo: ags/audio/task/ags_reset_audio_connection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_reset_audio_connection.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_reset_audio_connection.Tpo -c -o ags/audio/task/libags_audio_la-ags_reset_audio_connection.lo `test -f 'ags/audio/task/ags_reset_audio_connection.c' || echo '$(srcdir)/'`ags/audio/task/ags_reset_audio_connection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_reset_audio_connection.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_reset_audio_connection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_reset_audio_connection.c' object='ags/audio/task/libags_audio_la-ags_reset_audio_connection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_reset_audio_connection.lo `test -f 'ags/audio/task/ags_reset_audio_connection.c' || echo '$(srcdir)/'`ags/audio/task/ags_reset_audio_connection.c ags/audio/task/libags_audio_la-ags_resize_audio.lo: ags/audio/task/ags_resize_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_resize_audio.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_resize_audio.Tpo -c -o ags/audio/task/libags_audio_la-ags_resize_audio.lo `test -f 'ags/audio/task/ags_resize_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_resize_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_resize_audio.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_resize_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_resize_audio.c' object='ags/audio/task/libags_audio_la-ags_resize_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_resize_audio.lo `test -f 'ags/audio/task/ags_resize_audio.c' || echo '$(srcdir)/'`ags/audio/task/ags_resize_audio.c ags/audio/task/libags_audio_la-ags_save_file.lo: ags/audio/task/ags_save_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_save_file.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_save_file.Tpo -c -o ags/audio/task/libags_audio_la-ags_save_file.lo `test -f 'ags/audio/task/ags_save_file.c' || echo '$(srcdir)/'`ags/audio/task/ags_save_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_save_file.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_save_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_save_file.c' object='ags/audio/task/libags_audio_la-ags_save_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_save_file.lo `test -f 'ags/audio/task/ags_save_file.c' || echo '$(srcdir)/'`ags/audio/task/ags_save_file.c ags/audio/task/libags_audio_la-ags_seek_soundcard.lo: ags/audio/task/ags_seek_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_seek_soundcard.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_seek_soundcard.Tpo -c -o ags/audio/task/libags_audio_la-ags_seek_soundcard.lo `test -f 'ags/audio/task/ags_seek_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_seek_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_seek_soundcard.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_seek_soundcard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_seek_soundcard.c' object='ags/audio/task/libags_audio_la-ags_seek_soundcard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_seek_soundcard.lo `test -f 'ags/audio/task/ags_seek_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_seek_soundcard.c ags/audio/task/libags_audio_la-ags_set_audio_channels.lo: ags/audio/task/ags_set_audio_channels.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_set_audio_channels.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_audio_channels.Tpo -c -o ags/audio/task/libags_audio_la-ags_set_audio_channels.lo `test -f 'ags/audio/task/ags_set_audio_channels.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_audio_channels.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_audio_channels.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_audio_channels.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_set_audio_channels.c' object='ags/audio/task/libags_audio_la-ags_set_audio_channels.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_set_audio_channels.lo `test -f 'ags/audio/task/ags_set_audio_channels.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_audio_channels.c ags/audio/task/libags_audio_la-ags_set_buffer_size.lo: ags/audio/task/ags_set_buffer_size.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_set_buffer_size.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_buffer_size.Tpo -c -o ags/audio/task/libags_audio_la-ags_set_buffer_size.lo `test -f 'ags/audio/task/ags_set_buffer_size.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_buffer_size.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_buffer_size.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_buffer_size.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_set_buffer_size.c' object='ags/audio/task/libags_audio_la-ags_set_buffer_size.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_set_buffer_size.lo `test -f 'ags/audio/task/ags_set_buffer_size.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_buffer_size.c ags/audio/task/libags_audio_la-ags_set_format.lo: ags/audio/task/ags_set_format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_set_format.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_format.Tpo -c -o ags/audio/task/libags_audio_la-ags_set_format.lo `test -f 'ags/audio/task/ags_set_format.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_format.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_set_format.c' object='ags/audio/task/libags_audio_la-ags_set_format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_set_format.lo `test -f 'ags/audio/task/ags_set_format.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_format.c ags/audio/task/libags_audio_la-ags_set_input_device.lo: ags/audio/task/ags_set_input_device.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_set_input_device.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_input_device.Tpo -c -o ags/audio/task/libags_audio_la-ags_set_input_device.lo `test -f 'ags/audio/task/ags_set_input_device.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_input_device.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_input_device.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_input_device.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_set_input_device.c' object='ags/audio/task/libags_audio_la-ags_set_input_device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_set_input_device.lo `test -f 'ags/audio/task/ags_set_input_device.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_input_device.c ags/audio/task/libags_audio_la-ags_set_output_device.lo: ags/audio/task/ags_set_output_device.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_set_output_device.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_output_device.Tpo -c -o ags/audio/task/libags_audio_la-ags_set_output_device.lo `test -f 'ags/audio/task/ags_set_output_device.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_output_device.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_output_device.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_output_device.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_set_output_device.c' object='ags/audio/task/libags_audio_la-ags_set_output_device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_set_output_device.lo `test -f 'ags/audio/task/ags_set_output_device.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_output_device.c ags/audio/task/libags_audio_la-ags_set_samplerate.lo: ags/audio/task/ags_set_samplerate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_set_samplerate.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_samplerate.Tpo -c -o ags/audio/task/libags_audio_la-ags_set_samplerate.lo `test -f 'ags/audio/task/ags_set_samplerate.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_samplerate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_samplerate.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_set_samplerate.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_set_samplerate.c' object='ags/audio/task/libags_audio_la-ags_set_samplerate.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_set_samplerate.lo `test -f 'ags/audio/task/ags_set_samplerate.c' || echo '$(srcdir)/'`ags/audio/task/ags_set_samplerate.c ags/audio/task/libags_audio_la-ags_start_sequencer.lo: ags/audio/task/ags_start_sequencer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_start_sequencer.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_start_sequencer.Tpo -c -o ags/audio/task/libags_audio_la-ags_start_sequencer.lo `test -f 'ags/audio/task/ags_start_sequencer.c' || echo '$(srcdir)/'`ags/audio/task/ags_start_sequencer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_start_sequencer.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_start_sequencer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_start_sequencer.c' object='ags/audio/task/libags_audio_la-ags_start_sequencer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_start_sequencer.lo `test -f 'ags/audio/task/ags_start_sequencer.c' || echo '$(srcdir)/'`ags/audio/task/ags_start_sequencer.c ags/audio/task/libags_audio_la-ags_start_soundcard.lo: ags/audio/task/ags_start_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_start_soundcard.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_start_soundcard.Tpo -c -o ags/audio/task/libags_audio_la-ags_start_soundcard.lo `test -f 'ags/audio/task/ags_start_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_start_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_start_soundcard.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_start_soundcard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_start_soundcard.c' object='ags/audio/task/libags_audio_la-ags_start_soundcard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_start_soundcard.lo `test -f 'ags/audio/task/ags_start_soundcard.c' || echo '$(srcdir)/'`ags/audio/task/ags_start_soundcard.c ags/audio/task/libags_audio_la-ags_switch_buffer_flag.lo: ags/audio/task/ags_switch_buffer_flag.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_switch_buffer_flag.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_switch_buffer_flag.Tpo -c -o ags/audio/task/libags_audio_la-ags_switch_buffer_flag.lo `test -f 'ags/audio/task/ags_switch_buffer_flag.c' || echo '$(srcdir)/'`ags/audio/task/ags_switch_buffer_flag.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_switch_buffer_flag.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_switch_buffer_flag.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_switch_buffer_flag.c' object='ags/audio/task/libags_audio_la-ags_switch_buffer_flag.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_switch_buffer_flag.lo `test -f 'ags/audio/task/ags_switch_buffer_flag.c' || echo '$(srcdir)/'`ags/audio/task/ags_switch_buffer_flag.c ags/audio/task/libags_audio_la-ags_tic_device.lo: ags/audio/task/ags_tic_device.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_tic_device.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_tic_device.Tpo -c -o ags/audio/task/libags_audio_la-ags_tic_device.lo `test -f 'ags/audio/task/ags_tic_device.c' || echo '$(srcdir)/'`ags/audio/task/ags_tic_device.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_tic_device.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_tic_device.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_tic_device.c' object='ags/audio/task/libags_audio_la-ags_tic_device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_tic_device.lo `test -f 'ags/audio/task/ags_tic_device.c' || echo '$(srcdir)/'`ags/audio/task/ags_tic_device.c ags/audio/task/libags_audio_la-ags_toggle_pattern_bit.lo: ags/audio/task/ags_toggle_pattern_bit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_toggle_pattern_bit.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_toggle_pattern_bit.Tpo -c -o ags/audio/task/libags_audio_la-ags_toggle_pattern_bit.lo `test -f 'ags/audio/task/ags_toggle_pattern_bit.c' || echo '$(srcdir)/'`ags/audio/task/ags_toggle_pattern_bit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_toggle_pattern_bit.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_toggle_pattern_bit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_toggle_pattern_bit.c' object='ags/audio/task/libags_audio_la-ags_toggle_pattern_bit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_toggle_pattern_bit.lo `test -f 'ags/audio/task/ags_toggle_pattern_bit.c' || echo '$(srcdir)/'`ags/audio/task/ags_toggle_pattern_bit.c ags/audio/task/libags_audio_la-ags_unref_audio_signal.lo: ags/audio/task/ags_unref_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/libags_audio_la-ags_unref_audio_signal.lo -MD -MP -MF ags/audio/task/$(DEPDIR)/libags_audio_la-ags_unref_audio_signal.Tpo -c -o ags/audio/task/libags_audio_la-ags_unref_audio_signal.lo `test -f 'ags/audio/task/ags_unref_audio_signal.c' || echo '$(srcdir)/'`ags/audio/task/ags_unref_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/$(DEPDIR)/libags_audio_la-ags_unref_audio_signal.Tpo ags/audio/task/$(DEPDIR)/libags_audio_la-ags_unref_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/ags_unref_audio_signal.c' object='ags/audio/task/libags_audio_la-ags_unref_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/libags_audio_la-ags_unref_audio_signal.lo `test -f 'ags/audio/task/ags_unref_audio_signal.c' || echo '$(srcdir)/'`ags/audio/task/ags_unref_audio_signal.c ags/audio/task/recall/libags_audio_la-ags_apply_bpm.lo: ags/audio/task/recall/ags_apply_bpm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/recall/libags_audio_la-ags_apply_bpm.lo -MD -MP -MF ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_bpm.Tpo -c -o ags/audio/task/recall/libags_audio_la-ags_apply_bpm.lo `test -f 'ags/audio/task/recall/ags_apply_bpm.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_apply_bpm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_bpm.Tpo ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_bpm.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/recall/ags_apply_bpm.c' object='ags/audio/task/recall/libags_audio_la-ags_apply_bpm.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/recall/libags_audio_la-ags_apply_bpm.lo `test -f 'ags/audio/task/recall/ags_apply_bpm.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_apply_bpm.c ags/audio/task/recall/libags_audio_la-ags_apply_sequencer_length.lo: ags/audio/task/recall/ags_apply_sequencer_length.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/recall/libags_audio_la-ags_apply_sequencer_length.lo -MD -MP -MF ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_sequencer_length.Tpo -c -o ags/audio/task/recall/libags_audio_la-ags_apply_sequencer_length.lo `test -f 'ags/audio/task/recall/ags_apply_sequencer_length.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_apply_sequencer_length.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_sequencer_length.Tpo ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_sequencer_length.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/recall/ags_apply_sequencer_length.c' object='ags/audio/task/recall/libags_audio_la-ags_apply_sequencer_length.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/recall/libags_audio_la-ags_apply_sequencer_length.lo `test -f 'ags/audio/task/recall/ags_apply_sequencer_length.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_apply_sequencer_length.c ags/audio/task/recall/libags_audio_la-ags_apply_tact.lo: ags/audio/task/recall/ags_apply_tact.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/recall/libags_audio_la-ags_apply_tact.lo -MD -MP -MF ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_tact.Tpo -c -o ags/audio/task/recall/libags_audio_la-ags_apply_tact.lo `test -f 'ags/audio/task/recall/ags_apply_tact.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_apply_tact.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_tact.Tpo ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_apply_tact.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/recall/ags_apply_tact.c' object='ags/audio/task/recall/libags_audio_la-ags_apply_tact.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/recall/libags_audio_la-ags_apply_tact.lo `test -f 'ags/audio/task/recall/ags_apply_tact.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_apply_tact.c ags/audio/task/recall/libags_audio_la-ags_reset_peak.lo: ags/audio/task/recall/ags_reset_peak.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/recall/libags_audio_la-ags_reset_peak.lo -MD -MP -MF ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_reset_peak.Tpo -c -o ags/audio/task/recall/libags_audio_la-ags_reset_peak.lo `test -f 'ags/audio/task/recall/ags_reset_peak.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_reset_peak.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_reset_peak.Tpo ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_reset_peak.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/recall/ags_reset_peak.c' object='ags/audio/task/recall/libags_audio_la-ags_reset_peak.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/recall/libags_audio_la-ags_reset_peak.lo `test -f 'ags/audio/task/recall/ags_reset_peak.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_reset_peak.c ags/audio/task/recall/libags_audio_la-ags_set_muted.lo: ags/audio/task/recall/ags_set_muted.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/task/recall/libags_audio_la-ags_set_muted.lo -MD -MP -MF ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_set_muted.Tpo -c -o ags/audio/task/recall/libags_audio_la-ags_set_muted.lo `test -f 'ags/audio/task/recall/ags_set_muted.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_set_muted.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_set_muted.Tpo ags/audio/task/recall/$(DEPDIR)/libags_audio_la-ags_set_muted.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/task/recall/ags_set_muted.c' object='ags/audio/task/recall/libags_audio_la-ags_set_muted.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/task/recall/libags_audio_la-ags_set_muted.lo `test -f 'ags/audio/task/recall/ags_set_muted.c' || echo '$(srcdir)/'`ags/audio/task/recall/ags_set_muted.c ags/audio/recall/libags_audio_la-ags_buffer_audio_signal.lo: ags/audio/recall/ags_buffer_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_buffer_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_buffer_audio_signal.lo `test -f 'ags/audio/recall/ags_buffer_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_buffer_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_buffer_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_buffer_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_buffer_audio_signal.lo `test -f 'ags/audio/recall/ags_buffer_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_buffer_audio_signal.c ags/audio/recall/libags_audio_la-ags_buffer_channel.lo: ags/audio/recall/ags_buffer_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_buffer_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_buffer_channel.lo `test -f 'ags/audio/recall/ags_buffer_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_buffer_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_buffer_channel.c' object='ags/audio/recall/libags_audio_la-ags_buffer_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_buffer_channel.lo `test -f 'ags/audio/recall/ags_buffer_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_buffer_channel.c ags/audio/recall/libags_audio_la-ags_buffer_channel_run.lo: ags/audio/recall/ags_buffer_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_buffer_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_buffer_channel_run.lo `test -f 'ags/audio/recall/ags_buffer_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_buffer_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_buffer_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_buffer_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_buffer_channel_run.lo `test -f 'ags/audio/recall/ags_buffer_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_buffer_channel_run.c ags/audio/recall/libags_audio_la-ags_buffer_recycling.lo: ags/audio/recall/ags_buffer_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_buffer_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_buffer_recycling.lo `test -f 'ags/audio/recall/ags_buffer_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_buffer_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_buffer_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_buffer_recycling.c' object='ags/audio/recall/libags_audio_la-ags_buffer_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_buffer_recycling.lo `test -f 'ags/audio/recall/ags_buffer_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_buffer_recycling.c ags/audio/recall/libags_audio_la-ags_capture_sound_audio.lo: ags/audio/recall/ags_capture_sound_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_capture_sound_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_capture_sound_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_capture_sound_audio.lo `test -f 'ags/audio/recall/ags_capture_sound_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_capture_sound_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_capture_sound_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_capture_sound_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_capture_sound_audio.c' object='ags/audio/recall/libags_audio_la-ags_capture_sound_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_capture_sound_audio.lo `test -f 'ags/audio/recall/ags_capture_sound_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_capture_sound_audio.c ags/audio/recall/libags_audio_la-ags_capture_sound_audio_run.lo: ags/audio/recall/ags_capture_sound_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_capture_sound_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_capture_sound_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_capture_sound_audio_run.lo `test -f 'ags/audio/recall/ags_capture_sound_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_capture_sound_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_capture_sound_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_capture_sound_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_capture_sound_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_capture_sound_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_capture_sound_audio_run.lo `test -f 'ags/audio/recall/ags_capture_sound_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_capture_sound_audio_run.c ags/audio/recall/libags_audio_la-ags_copy_audio_signal.lo: ags/audio/recall/ags_copy_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_audio_signal.lo `test -f 'ags/audio/recall/ags_copy_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_copy_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_audio_signal.lo `test -f 'ags/audio/recall/ags_copy_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_audio_signal.c ags/audio/recall/libags_audio_la-ags_copy_channel.lo: ags/audio/recall/ags_copy_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_channel.lo `test -f 'ags/audio/recall/ags_copy_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_channel.c' object='ags/audio/recall/libags_audio_la-ags_copy_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_channel.lo `test -f 'ags/audio/recall/ags_copy_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_channel.c ags/audio/recall/libags_audio_la-ags_copy_channel_run.lo: ags/audio/recall/ags_copy_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_channel_run.lo `test -f 'ags/audio/recall/ags_copy_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_copy_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_channel_run.lo `test -f 'ags/audio/recall/ags_copy_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_channel_run.c ags/audio/recall/libags_audio_la-ags_copy_notation_audio.lo: ags/audio/recall/ags_copy_notation_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_notation_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_notation_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_notation_audio.lo `test -f 'ags/audio/recall/ags_copy_notation_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_notation_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_notation_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_notation_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_notation_audio.c' object='ags/audio/recall/libags_audio_la-ags_copy_notation_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_notation_audio.lo `test -f 'ags/audio/recall/ags_copy_notation_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_notation_audio.c ags/audio/recall/libags_audio_la-ags_copy_notation_audio_run.lo: ags/audio/recall/ags_copy_notation_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_notation_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_notation_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_notation_audio_run.lo `test -f 'ags/audio/recall/ags_copy_notation_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_notation_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_notation_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_notation_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_notation_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_copy_notation_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_notation_audio_run.lo `test -f 'ags/audio/recall/ags_copy_notation_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_notation_audio_run.c ags/audio/recall/libags_audio_la-ags_copy_pattern_audio.lo: ags/audio/recall/ags_copy_pattern_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_pattern_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_pattern_audio.lo `test -f 'ags/audio/recall/ags_copy_pattern_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_pattern_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_pattern_audio.c' object='ags/audio/recall/libags_audio_la-ags_copy_pattern_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_pattern_audio.lo `test -f 'ags/audio/recall/ags_copy_pattern_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_pattern_audio.c ags/audio/recall/libags_audio_la-ags_copy_pattern_audio_run.lo: ags/audio/recall/ags_copy_pattern_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_pattern_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_pattern_audio_run.lo `test -f 'ags/audio/recall/ags_copy_pattern_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_pattern_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_pattern_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_copy_pattern_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_pattern_audio_run.lo `test -f 'ags/audio/recall/ags_copy_pattern_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_pattern_audio_run.c ags/audio/recall/libags_audio_la-ags_copy_pattern_channel.lo: ags/audio/recall/ags_copy_pattern_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_pattern_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_pattern_channel.lo `test -f 'ags/audio/recall/ags_copy_pattern_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_pattern_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_pattern_channel.c' object='ags/audio/recall/libags_audio_la-ags_copy_pattern_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_pattern_channel.lo `test -f 'ags/audio/recall/ags_copy_pattern_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_pattern_channel.c ags/audio/recall/libags_audio_la-ags_copy_pattern_channel_run.lo: ags/audio/recall/ags_copy_pattern_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_pattern_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_pattern_channel_run.lo `test -f 'ags/audio/recall/ags_copy_pattern_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_pattern_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_pattern_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_pattern_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_copy_pattern_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_pattern_channel_run.lo `test -f 'ags/audio/recall/ags_copy_pattern_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_pattern_channel_run.c ags/audio/recall/libags_audio_la-ags_copy_recycling.lo: ags/audio/recall/ags_copy_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_copy_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_copy_recycling.lo `test -f 'ags/audio/recall/ags_copy_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_copy_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_copy_recycling.c' object='ags/audio/recall/libags_audio_la-ags_copy_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_copy_recycling.lo `test -f 'ags/audio/recall/ags_copy_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_copy_recycling.c ags/audio/recall/libags_audio_la-ags_count_beats_audio.lo: ags/audio/recall/ags_count_beats_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_count_beats_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_count_beats_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_count_beats_audio.lo `test -f 'ags/audio/recall/ags_count_beats_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_count_beats_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_count_beats_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_count_beats_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_count_beats_audio.c' object='ags/audio/recall/libags_audio_la-ags_count_beats_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_count_beats_audio.lo `test -f 'ags/audio/recall/ags_count_beats_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_count_beats_audio.c ags/audio/recall/libags_audio_la-ags_count_beats_audio_run.lo: ags/audio/recall/ags_count_beats_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_count_beats_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_count_beats_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_count_beats_audio_run.lo `test -f 'ags/audio/recall/ags_count_beats_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_count_beats_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_count_beats_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_count_beats_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_count_beats_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_count_beats_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_count_beats_audio_run.lo `test -f 'ags/audio/recall/ags_count_beats_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_count_beats_audio_run.c ags/audio/recall/libags_audio_la-ags_delay_audio.lo: ags/audio/recall/ags_delay_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_delay_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_delay_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_delay_audio.lo `test -f 'ags/audio/recall/ags_delay_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_delay_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_delay_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_delay_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_delay_audio.c' object='ags/audio/recall/libags_audio_la-ags_delay_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_delay_audio.lo `test -f 'ags/audio/recall/ags_delay_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_delay_audio.c ags/audio/recall/libags_audio_la-ags_delay_audio_run.lo: ags/audio/recall/ags_delay_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_delay_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_delay_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_delay_audio_run.lo `test -f 'ags/audio/recall/ags_delay_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_delay_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_delay_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_delay_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_delay_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_delay_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_delay_audio_run.lo `test -f 'ags/audio/recall/ags_delay_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_delay_audio_run.c ags/audio/recall/libags_audio_la-ags_envelope_audio_signal.lo: ags/audio/recall/ags_envelope_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_envelope_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_envelope_audio_signal.lo `test -f 'ags/audio/recall/ags_envelope_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_envelope_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_envelope_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_envelope_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_envelope_audio_signal.lo `test -f 'ags/audio/recall/ags_envelope_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_envelope_audio_signal.c ags/audio/recall/libags_audio_la-ags_envelope_channel.lo: ags/audio/recall/ags_envelope_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_envelope_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_envelope_channel.lo `test -f 'ags/audio/recall/ags_envelope_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_envelope_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_envelope_channel.c' object='ags/audio/recall/libags_audio_la-ags_envelope_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_envelope_channel.lo `test -f 'ags/audio/recall/ags_envelope_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_envelope_channel.c ags/audio/recall/libags_audio_la-ags_envelope_channel_run.lo: ags/audio/recall/ags_envelope_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_envelope_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_envelope_channel_run.lo `test -f 'ags/audio/recall/ags_envelope_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_envelope_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_envelope_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_envelope_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_envelope_channel_run.lo `test -f 'ags/audio/recall/ags_envelope_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_envelope_channel_run.c ags/audio/recall/libags_audio_la-ags_envelope_recycling.lo: ags/audio/recall/ags_envelope_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_envelope_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_envelope_recycling.lo `test -f 'ags/audio/recall/ags_envelope_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_envelope_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_envelope_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_envelope_recycling.c' object='ags/audio/recall/libags_audio_la-ags_envelope_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_envelope_recycling.lo `test -f 'ags/audio/recall/ags_envelope_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_envelope_recycling.c ags/audio/recall/libags_audio_la-ags_feed_audio_signal.lo: ags/audio/recall/ags_feed_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_feed_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_feed_audio_signal.lo `test -f 'ags/audio/recall/ags_feed_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_feed_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_feed_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_feed_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_feed_audio_signal.lo `test -f 'ags/audio/recall/ags_feed_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_feed_audio_signal.c ags/audio/recall/libags_audio_la-ags_feed_channel.lo: ags/audio/recall/ags_feed_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_feed_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_feed_channel.lo `test -f 'ags/audio/recall/ags_feed_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_feed_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_feed_channel.c' object='ags/audio/recall/libags_audio_la-ags_feed_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_feed_channel.lo `test -f 'ags/audio/recall/ags_feed_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_feed_channel.c ags/audio/recall/libags_audio_la-ags_feed_channel_run.lo: ags/audio/recall/ags_feed_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_feed_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_feed_channel_run.lo `test -f 'ags/audio/recall/ags_feed_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_feed_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_feed_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_feed_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_feed_channel_run.lo `test -f 'ags/audio/recall/ags_feed_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_feed_channel_run.c ags/audio/recall/libags_audio_la-ags_feed_recycling.lo: ags/audio/recall/ags_feed_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_feed_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_feed_recycling.lo `test -f 'ags/audio/recall/ags_feed_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_feed_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_feed_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_feed_recycling.c' object='ags/audio/recall/libags_audio_la-ags_feed_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_feed_recycling.lo `test -f 'ags/audio/recall/ags_feed_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_feed_recycling.c ags/audio/recall/libags_audio_la-ags_loop_channel.lo: ags/audio/recall/ags_loop_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_loop_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_loop_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_loop_channel.lo `test -f 'ags/audio/recall/ags_loop_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_loop_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_loop_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_loop_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_loop_channel.c' object='ags/audio/recall/libags_audio_la-ags_loop_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_loop_channel.lo `test -f 'ags/audio/recall/ags_loop_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_loop_channel.c ags/audio/recall/libags_audio_la-ags_loop_channel_run.lo: ags/audio/recall/ags_loop_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_loop_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_loop_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_loop_channel_run.lo `test -f 'ags/audio/recall/ags_loop_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_loop_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_loop_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_loop_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_loop_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_loop_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_loop_channel_run.lo `test -f 'ags/audio/recall/ags_loop_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_loop_channel_run.c ags/audio/recall/libags_audio_la-ags_mute_audio.lo: ags/audio/recall/ags_mute_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_mute_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_mute_audio.lo `test -f 'ags/audio/recall/ags_mute_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_mute_audio.c' object='ags/audio/recall/libags_audio_la-ags_mute_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_mute_audio.lo `test -f 'ags/audio/recall/ags_mute_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_audio.c ags/audio/recall/libags_audio_la-ags_mute_audio_run.lo: ags/audio/recall/ags_mute_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_mute_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_mute_audio_run.lo `test -f 'ags/audio/recall/ags_mute_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_mute_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_mute_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_mute_audio_run.lo `test -f 'ags/audio/recall/ags_mute_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_audio_run.c ags/audio/recall/libags_audio_la-ags_mute_audio_signal.lo: ags/audio/recall/ags_mute_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_mute_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_mute_audio_signal.lo `test -f 'ags/audio/recall/ags_mute_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_mute_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_mute_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_mute_audio_signal.lo `test -f 'ags/audio/recall/ags_mute_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_audio_signal.c ags/audio/recall/libags_audio_la-ags_mute_channel.lo: ags/audio/recall/ags_mute_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_mute_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_mute_channel.lo `test -f 'ags/audio/recall/ags_mute_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_mute_channel.c' object='ags/audio/recall/libags_audio_la-ags_mute_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_mute_channel.lo `test -f 'ags/audio/recall/ags_mute_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_channel.c ags/audio/recall/libags_audio_la-ags_mute_channel_run.lo: ags/audio/recall/ags_mute_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_mute_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_mute_channel_run.lo `test -f 'ags/audio/recall/ags_mute_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_mute_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_mute_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_mute_channel_run.lo `test -f 'ags/audio/recall/ags_mute_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_channel_run.c ags/audio/recall/libags_audio_la-ags_mute_recycling.lo: ags/audio/recall/ags_mute_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_mute_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_mute_recycling.lo `test -f 'ags/audio/recall/ags_mute_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_mute_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_mute_recycling.c' object='ags/audio/recall/libags_audio_la-ags_mute_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_mute_recycling.lo `test -f 'ags/audio/recall/ags_mute_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_mute_recycling.c ags/audio/recall/libags_audio_la-ags_peak_audio_signal.lo: ags/audio/recall/ags_peak_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_peak_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_peak_audio_signal.lo `test -f 'ags/audio/recall/ags_peak_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_peak_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_peak_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_peak_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_peak_audio_signal.lo `test -f 'ags/audio/recall/ags_peak_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_peak_audio_signal.c ags/audio/recall/libags_audio_la-ags_peak_channel.lo: ags/audio/recall/ags_peak_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_peak_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_peak_channel.lo `test -f 'ags/audio/recall/ags_peak_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_peak_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_peak_channel.c' object='ags/audio/recall/libags_audio_la-ags_peak_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_peak_channel.lo `test -f 'ags/audio/recall/ags_peak_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_peak_channel.c ags/audio/recall/libags_audio_la-ags_peak_channel_run.lo: ags/audio/recall/ags_peak_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_peak_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_peak_channel_run.lo `test -f 'ags/audio/recall/ags_peak_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_peak_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_peak_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_peak_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_peak_channel_run.lo `test -f 'ags/audio/recall/ags_peak_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_peak_channel_run.c ags/audio/recall/libags_audio_la-ags_peak_recycling.lo: ags/audio/recall/ags_peak_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_peak_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_peak_recycling.lo `test -f 'ags/audio/recall/ags_peak_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_peak_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_peak_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_peak_recycling.c' object='ags/audio/recall/libags_audio_la-ags_peak_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_peak_recycling.lo `test -f 'ags/audio/recall/ags_peak_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_peak_recycling.c ags/audio/recall/libags_audio_la-ags_play_audio.lo: ags/audio/recall/ags_play_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_audio.lo `test -f 'ags/audio/recall/ags_play_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_audio.c' object='ags/audio/recall/libags_audio_la-ags_play_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_audio.lo `test -f 'ags/audio/recall/ags_play_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_audio.c ags/audio/recall/libags_audio_la-ags_play_audio_file.lo: ags/audio/recall/ags_play_audio_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_audio_file.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio_file.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_audio_file.lo `test -f 'ags/audio/recall/ags_play_audio_file.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_audio_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio_file.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_audio_file.c' object='ags/audio/recall/libags_audio_la-ags_play_audio_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_audio_file.lo `test -f 'ags/audio/recall/ags_play_audio_file.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_audio_file.c ags/audio/recall/libags_audio_la-ags_play_audio_signal.lo: ags/audio/recall/ags_play_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_audio_signal.lo `test -f 'ags/audio/recall/ags_play_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_play_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_audio_signal.lo `test -f 'ags/audio/recall/ags_play_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_audio_signal.c ags/audio/recall/libags_audio_la-ags_play_channel.lo: ags/audio/recall/ags_play_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_channel.lo `test -f 'ags/audio/recall/ags_play_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_channel.c' object='ags/audio/recall/libags_audio_la-ags_play_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_channel.lo `test -f 'ags/audio/recall/ags_play_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_channel.c ags/audio/recall/libags_audio_la-ags_play_channel_run.lo: ags/audio/recall/ags_play_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_channel_run.lo `test -f 'ags/audio/recall/ags_play_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_play_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_channel_run.lo `test -f 'ags/audio/recall/ags_play_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_channel_run.c ags/audio/recall/libags_audio_la-ags_play_channel_run_master.lo: ags/audio/recall/ags_play_channel_run_master.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_channel_run_master.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel_run_master.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_channel_run_master.lo `test -f 'ags/audio/recall/ags_play_channel_run_master.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_channel_run_master.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel_run_master.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_channel_run_master.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_channel_run_master.c' object='ags/audio/recall/libags_audio_la-ags_play_channel_run_master.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_channel_run_master.lo `test -f 'ags/audio/recall/ags_play_channel_run_master.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_channel_run_master.c ags/audio/recall/libags_audio_la-ags_play_dssi_audio.lo: ags/audio/recall/ags_play_dssi_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_dssi_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_dssi_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_dssi_audio.lo `test -f 'ags/audio/recall/ags_play_dssi_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_dssi_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_dssi_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_dssi_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_dssi_audio.c' object='ags/audio/recall/libags_audio_la-ags_play_dssi_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_dssi_audio.lo `test -f 'ags/audio/recall/ags_play_dssi_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_dssi_audio.c ags/audio/recall/libags_audio_la-ags_play_dssi_audio_run.lo: ags/audio/recall/ags_play_dssi_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_dssi_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_dssi_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_dssi_audio_run.lo `test -f 'ags/audio/recall/ags_play_dssi_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_dssi_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_dssi_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_dssi_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_dssi_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_play_dssi_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_dssi_audio_run.lo `test -f 'ags/audio/recall/ags_play_dssi_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_dssi_audio_run.c ags/audio/recall/libags_audio_la-ags_play_lv2_audio.lo: ags/audio/recall/ags_play_lv2_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_lv2_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_lv2_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_lv2_audio.lo `test -f 'ags/audio/recall/ags_play_lv2_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_lv2_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_lv2_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_lv2_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_lv2_audio.c' object='ags/audio/recall/libags_audio_la-ags_play_lv2_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_lv2_audio.lo `test -f 'ags/audio/recall/ags_play_lv2_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_lv2_audio.c ags/audio/recall/libags_audio_la-ags_play_lv2_audio_run.lo: ags/audio/recall/ags_play_lv2_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_lv2_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_lv2_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_lv2_audio_run.lo `test -f 'ags/audio/recall/ags_play_lv2_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_lv2_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_lv2_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_lv2_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_lv2_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_play_lv2_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_lv2_audio_run.lo `test -f 'ags/audio/recall/ags_play_lv2_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_lv2_audio_run.c ags/audio/recall/libags_audio_la-ags_play_notation_audio.lo: ags/audio/recall/ags_play_notation_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_notation_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_notation_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_notation_audio.lo `test -f 'ags/audio/recall/ags_play_notation_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_notation_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_notation_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_notation_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_notation_audio.c' object='ags/audio/recall/libags_audio_la-ags_play_notation_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_notation_audio.lo `test -f 'ags/audio/recall/ags_play_notation_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_notation_audio.c ags/audio/recall/libags_audio_la-ags_play_notation_audio_run.lo: ags/audio/recall/ags_play_notation_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_notation_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_notation_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_notation_audio_run.lo `test -f 'ags/audio/recall/ags_play_notation_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_notation_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_notation_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_notation_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_notation_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_play_notation_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_notation_audio_run.lo `test -f 'ags/audio/recall/ags_play_notation_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_notation_audio_run.c ags/audio/recall/libags_audio_la-ags_play_note.lo: ags/audio/recall/ags_play_note.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_note.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_note.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_note.lo `test -f 'ags/audio/recall/ags_play_note.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_note.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_note.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_note.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_note.c' object='ags/audio/recall/libags_audio_la-ags_play_note.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_note.lo `test -f 'ags/audio/recall/ags_play_note.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_note.c ags/audio/recall/libags_audio_la-ags_play_recycling.lo: ags/audio/recall/ags_play_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_play_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_play_recycling.lo `test -f 'ags/audio/recall/ags_play_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_play_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_play_recycling.c' object='ags/audio/recall/libags_audio_la-ags_play_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_play_recycling.lo `test -f 'ags/audio/recall/ags_play_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_play_recycling.c ags/audio/recall/libags_audio_la-ags_prepare_audio_signal.lo: ags/audio/recall/ags_prepare_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_prepare_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_prepare_audio_signal.lo `test -f 'ags/audio/recall/ags_prepare_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_prepare_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_prepare_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_prepare_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_prepare_audio_signal.lo `test -f 'ags/audio/recall/ags_prepare_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_prepare_audio_signal.c ags/audio/recall/libags_audio_la-ags_prepare_channel.lo: ags/audio/recall/ags_prepare_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_prepare_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_prepare_channel.lo `test -f 'ags/audio/recall/ags_prepare_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_prepare_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_prepare_channel.c' object='ags/audio/recall/libags_audio_la-ags_prepare_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_prepare_channel.lo `test -f 'ags/audio/recall/ags_prepare_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_prepare_channel.c ags/audio/recall/libags_audio_la-ags_prepare_channel_run.lo: ags/audio/recall/ags_prepare_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_prepare_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_prepare_channel_run.lo `test -f 'ags/audio/recall/ags_prepare_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_prepare_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_prepare_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_prepare_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_prepare_channel_run.lo `test -f 'ags/audio/recall/ags_prepare_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_prepare_channel_run.c ags/audio/recall/libags_audio_la-ags_prepare_recycling.lo: ags/audio/recall/ags_prepare_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_prepare_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_prepare_recycling.lo `test -f 'ags/audio/recall/ags_prepare_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_prepare_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_prepare_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_prepare_recycling.c' object='ags/audio/recall/libags_audio_la-ags_prepare_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_prepare_recycling.lo `test -f 'ags/audio/recall/ags_prepare_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_prepare_recycling.c ags/audio/recall/libags_audio_la-ags_record_midi_audio.lo: ags/audio/recall/ags_record_midi_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_record_midi_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_record_midi_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_record_midi_audio.lo `test -f 'ags/audio/recall/ags_record_midi_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_record_midi_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_record_midi_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_record_midi_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_record_midi_audio.c' object='ags/audio/recall/libags_audio_la-ags_record_midi_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_record_midi_audio.lo `test -f 'ags/audio/recall/ags_record_midi_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_record_midi_audio.c ags/audio/recall/libags_audio_la-ags_record_midi_audio_run.lo: ags/audio/recall/ags_record_midi_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_record_midi_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_record_midi_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_record_midi_audio_run.lo `test -f 'ags/audio/recall/ags_record_midi_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_record_midi_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_record_midi_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_record_midi_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_record_midi_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_record_midi_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_record_midi_audio_run.lo `test -f 'ags/audio/recall/ags_record_midi_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_record_midi_audio_run.c ags/audio/recall/libags_audio_la-ags_route_dssi_audio.lo: ags/audio/recall/ags_route_dssi_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_route_dssi_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_dssi_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_route_dssi_audio.lo `test -f 'ags/audio/recall/ags_route_dssi_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_route_dssi_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_dssi_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_dssi_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_route_dssi_audio.c' object='ags/audio/recall/libags_audio_la-ags_route_dssi_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_route_dssi_audio.lo `test -f 'ags/audio/recall/ags_route_dssi_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_route_dssi_audio.c ags/audio/recall/libags_audio_la-ags_route_dssi_audio_run.lo: ags/audio/recall/ags_route_dssi_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_route_dssi_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_dssi_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_route_dssi_audio_run.lo `test -f 'ags/audio/recall/ags_route_dssi_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_route_dssi_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_dssi_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_dssi_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_route_dssi_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_route_dssi_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_route_dssi_audio_run.lo `test -f 'ags/audio/recall/ags_route_dssi_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_route_dssi_audio_run.c ags/audio/recall/libags_audio_la-ags_route_lv2_audio.lo: ags/audio/recall/ags_route_lv2_audio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_route_lv2_audio.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_lv2_audio.Tpo -c -o ags/audio/recall/libags_audio_la-ags_route_lv2_audio.lo `test -f 'ags/audio/recall/ags_route_lv2_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_route_lv2_audio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_lv2_audio.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_lv2_audio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_route_lv2_audio.c' object='ags/audio/recall/libags_audio_la-ags_route_lv2_audio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_route_lv2_audio.lo `test -f 'ags/audio/recall/ags_route_lv2_audio.c' || echo '$(srcdir)/'`ags/audio/recall/ags_route_lv2_audio.c ags/audio/recall/libags_audio_la-ags_route_lv2_audio_run.lo: ags/audio/recall/ags_route_lv2_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_route_lv2_audio_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_lv2_audio_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_route_lv2_audio_run.lo `test -f 'ags/audio/recall/ags_route_lv2_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_route_lv2_audio_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_lv2_audio_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_route_lv2_audio_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_route_lv2_audio_run.c' object='ags/audio/recall/libags_audio_la-ags_route_lv2_audio_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_route_lv2_audio_run.lo `test -f 'ags/audio/recall/ags_route_lv2_audio_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_route_lv2_audio_run.c ags/audio/recall/libags_audio_la-ags_rt_stream_audio_signal.lo: ags/audio/recall/ags_rt_stream_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_rt_stream_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_rt_stream_audio_signal.lo `test -f 'ags/audio/recall/ags_rt_stream_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_rt_stream_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_rt_stream_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_rt_stream_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_rt_stream_audio_signal.lo `test -f 'ags/audio/recall/ags_rt_stream_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_rt_stream_audio_signal.c ags/audio/recall/libags_audio_la-ags_rt_stream_channel.lo: ags/audio/recall/ags_rt_stream_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_rt_stream_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_rt_stream_channel.lo `test -f 'ags/audio/recall/ags_rt_stream_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_rt_stream_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_rt_stream_channel.c' object='ags/audio/recall/libags_audio_la-ags_rt_stream_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_rt_stream_channel.lo `test -f 'ags/audio/recall/ags_rt_stream_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_rt_stream_channel.c ags/audio/recall/libags_audio_la-ags_rt_stream_channel_run.lo: ags/audio/recall/ags_rt_stream_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_rt_stream_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_rt_stream_channel_run.lo `test -f 'ags/audio/recall/ags_rt_stream_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_rt_stream_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_rt_stream_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_rt_stream_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_rt_stream_channel_run.lo `test -f 'ags/audio/recall/ags_rt_stream_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_rt_stream_channel_run.c ags/audio/recall/libags_audio_la-ags_rt_stream_recycling.lo: ags/audio/recall/ags_rt_stream_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_rt_stream_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_rt_stream_recycling.lo `test -f 'ags/audio/recall/ags_rt_stream_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_rt_stream_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_rt_stream_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_rt_stream_recycling.c' object='ags/audio/recall/libags_audio_la-ags_rt_stream_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_rt_stream_recycling.lo `test -f 'ags/audio/recall/ags_rt_stream_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_rt_stream_recycling.c ags/audio/recall/libags_audio_la-ags_stream_audio_signal.lo: ags/audio/recall/ags_stream_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_stream_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_stream_audio_signal.lo `test -f 'ags/audio/recall/ags_stream_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_stream_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_stream_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_stream_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_stream_audio_signal.lo `test -f 'ags/audio/recall/ags_stream_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_stream_audio_signal.c ags/audio/recall/libags_audio_la-ags_stream_channel.lo: ags/audio/recall/ags_stream_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_stream_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_stream_channel.lo `test -f 'ags/audio/recall/ags_stream_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_stream_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_stream_channel.c' object='ags/audio/recall/libags_audio_la-ags_stream_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_stream_channel.lo `test -f 'ags/audio/recall/ags_stream_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_stream_channel.c ags/audio/recall/libags_audio_la-ags_stream_channel_run.lo: ags/audio/recall/ags_stream_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_stream_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_stream_channel_run.lo `test -f 'ags/audio/recall/ags_stream_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_stream_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_stream_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_stream_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_stream_channel_run.lo `test -f 'ags/audio/recall/ags_stream_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_stream_channel_run.c ags/audio/recall/libags_audio_la-ags_stream_recycling.lo: ags/audio/recall/ags_stream_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_stream_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_stream_recycling.lo `test -f 'ags/audio/recall/ags_stream_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_stream_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_stream_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_stream_recycling.c' object='ags/audio/recall/libags_audio_la-ags_stream_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_stream_recycling.lo `test -f 'ags/audio/recall/ags_stream_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_stream_recycling.c ags/audio/recall/libags_audio_la-ags_volume_audio_signal.lo: ags/audio/recall/ags_volume_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_volume_audio_signal.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_audio_signal.Tpo -c -o ags/audio/recall/libags_audio_la-ags_volume_audio_signal.lo `test -f 'ags/audio/recall/ags_volume_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_volume_audio_signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_audio_signal.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_audio_signal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_volume_audio_signal.c' object='ags/audio/recall/libags_audio_la-ags_volume_audio_signal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_volume_audio_signal.lo `test -f 'ags/audio/recall/ags_volume_audio_signal.c' || echo '$(srcdir)/'`ags/audio/recall/ags_volume_audio_signal.c ags/audio/recall/libags_audio_la-ags_volume_channel.lo: ags/audio/recall/ags_volume_channel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_volume_channel.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_channel.Tpo -c -o ags/audio/recall/libags_audio_la-ags_volume_channel.lo `test -f 'ags/audio/recall/ags_volume_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_volume_channel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_channel.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_channel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_volume_channel.c' object='ags/audio/recall/libags_audio_la-ags_volume_channel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_volume_channel.lo `test -f 'ags/audio/recall/ags_volume_channel.c' || echo '$(srcdir)/'`ags/audio/recall/ags_volume_channel.c ags/audio/recall/libags_audio_la-ags_volume_channel_run.lo: ags/audio/recall/ags_volume_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_volume_channel_run.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_channel_run.Tpo -c -o ags/audio/recall/libags_audio_la-ags_volume_channel_run.lo `test -f 'ags/audio/recall/ags_volume_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_volume_channel_run.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_channel_run.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_channel_run.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_volume_channel_run.c' object='ags/audio/recall/libags_audio_la-ags_volume_channel_run.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_volume_channel_run.lo `test -f 'ags/audio/recall/ags_volume_channel_run.c' || echo '$(srcdir)/'`ags/audio/recall/ags_volume_channel_run.c ags/audio/recall/libags_audio_la-ags_volume_recycling.lo: ags/audio/recall/ags_volume_recycling.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/audio/recall/libags_audio_la-ags_volume_recycling.lo -MD -MP -MF ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_recycling.Tpo -c -o ags/audio/recall/libags_audio_la-ags_volume_recycling.lo `test -f 'ags/audio/recall/ags_volume_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_volume_recycling.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_recycling.Tpo ags/audio/recall/$(DEPDIR)/libags_audio_la-ags_volume_recycling.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/audio/recall/ags_volume_recycling.c' object='ags/audio/recall/libags_audio_la-ags_volume_recycling.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/audio/recall/libags_audio_la-ags_volume_recycling.lo `test -f 'ags/audio/recall/ags_volume_recycling.c' || echo '$(srcdir)/'`ags/audio/recall/ags_volume_recycling.c ags/plugin/libags_audio_la-ags_base_plugin.lo: ags/plugin/ags_base_plugin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_base_plugin.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_base_plugin.Tpo -c -o ags/plugin/libags_audio_la-ags_base_plugin.lo `test -f 'ags/plugin/ags_base_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_base_plugin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_base_plugin.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_base_plugin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_base_plugin.c' object='ags/plugin/libags_audio_la-ags_base_plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_base_plugin.lo `test -f 'ags/plugin/ags_base_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_base_plugin.c ags/plugin/libags_audio_la-ags_dssi_manager.lo: ags/plugin/ags_dssi_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_dssi_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_dssi_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_dssi_manager.lo `test -f 'ags/plugin/ags_dssi_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_dssi_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_dssi_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_dssi_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_dssi_manager.c' object='ags/plugin/libags_audio_la-ags_dssi_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_dssi_manager.lo `test -f 'ags/plugin/ags_dssi_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_dssi_manager.c ags/plugin/libags_audio_la-ags_dssi_plugin.lo: ags/plugin/ags_dssi_plugin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_dssi_plugin.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_dssi_plugin.Tpo -c -o ags/plugin/libags_audio_la-ags_dssi_plugin.lo `test -f 'ags/plugin/ags_dssi_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_dssi_plugin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_dssi_plugin.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_dssi_plugin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_dssi_plugin.c' object='ags/plugin/libags_audio_la-ags_dssi_plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_dssi_plugin.lo `test -f 'ags/plugin/ags_dssi_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_dssi_plugin.c ags/plugin/libags_audio_la-ags_ladspa_conversion.lo: ags/plugin/ags_ladspa_conversion.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_ladspa_conversion.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_conversion.Tpo -c -o ags/plugin/libags_audio_la-ags_ladspa_conversion.lo `test -f 'ags/plugin/ags_ladspa_conversion.c' || echo '$(srcdir)/'`ags/plugin/ags_ladspa_conversion.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_conversion.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_conversion.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_ladspa_conversion.c' object='ags/plugin/libags_audio_la-ags_ladspa_conversion.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_ladspa_conversion.lo `test -f 'ags/plugin/ags_ladspa_conversion.c' || echo '$(srcdir)/'`ags/plugin/ags_ladspa_conversion.c ags/plugin/libags_audio_la-ags_ladspa_manager.lo: ags/plugin/ags_ladspa_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_ladspa_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_ladspa_manager.lo `test -f 'ags/plugin/ags_ladspa_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_ladspa_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_ladspa_manager.c' object='ags/plugin/libags_audio_la-ags_ladspa_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_ladspa_manager.lo `test -f 'ags/plugin/ags_ladspa_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_ladspa_manager.c ags/plugin/libags_audio_la-ags_ladspa_plugin.lo: ags/plugin/ags_ladspa_plugin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_ladspa_plugin.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_plugin.Tpo -c -o ags/plugin/libags_audio_la-ags_ladspa_plugin.lo `test -f 'ags/plugin/ags_ladspa_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_ladspa_plugin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_plugin.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_ladspa_plugin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_ladspa_plugin.c' object='ags/plugin/libags_audio_la-ags_ladspa_plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_ladspa_plugin.lo `test -f 'ags/plugin/ags_ladspa_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_ladspa_plugin.c ags/plugin/libags_audio_la-ags_lv2_conversion.lo: ags/plugin/ags_lv2_conversion.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_conversion.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_conversion.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_conversion.lo `test -f 'ags/plugin/ags_lv2_conversion.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_conversion.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_conversion.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_conversion.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_conversion.c' object='ags/plugin/libags_audio_la-ags_lv2_conversion.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_conversion.lo `test -f 'ags/plugin/ags_lv2_conversion.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_conversion.c ags/plugin/libags_audio_la-ags_lv2_manager.lo: ags/plugin/ags_lv2_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_manager.lo `test -f 'ags/plugin/ags_lv2_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_manager.c' object='ags/plugin/libags_audio_la-ags_lv2_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_manager.lo `test -f 'ags/plugin/ags_lv2_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_manager.c ags/plugin/libags_audio_la-ags_lv2_plugin.lo: ags/plugin/ags_lv2_plugin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_plugin.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_plugin.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_plugin.lo `test -f 'ags/plugin/ags_lv2_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_plugin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_plugin.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_plugin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_plugin.c' object='ags/plugin/libags_audio_la-ags_lv2_plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_plugin.lo `test -f 'ags/plugin/ags_lv2_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_plugin.c ags/plugin/libags_audio_la-ags_lv2_preset.lo: ags/plugin/ags_lv2_preset.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_preset.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_preset.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_preset.lo `test -f 'ags/plugin/ags_lv2_preset.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_preset.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_preset.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_preset.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_preset.c' object='ags/plugin/libags_audio_la-ags_lv2_preset.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_preset.lo `test -f 'ags/plugin/ags_lv2_preset.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_preset.c ags/plugin/libags_audio_la-ags_lv2_log_manager.lo: ags/plugin/ags_lv2_log_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_log_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_log_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_log_manager.lo `test -f 'ags/plugin/ags_lv2_log_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_log_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_log_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_log_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_log_manager.c' object='ags/plugin/libags_audio_la-ags_lv2_log_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_log_manager.lo `test -f 'ags/plugin/ags_lv2_log_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_log_manager.c ags/plugin/libags_audio_la-ags_lv2_event_manager.lo: ags/plugin/ags_lv2_event_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_event_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_event_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_event_manager.lo `test -f 'ags/plugin/ags_lv2_event_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_event_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_event_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_event_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_event_manager.c' object='ags/plugin/libags_audio_la-ags_lv2_event_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_event_manager.lo `test -f 'ags/plugin/ags_lv2_event_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_event_manager.c ags/plugin/libags_audio_la-ags_lv2_option_manager.lo: ags/plugin/ags_lv2_option_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_option_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_option_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_option_manager.lo `test -f 'ags/plugin/ags_lv2_option_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_option_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_option_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_option_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_option_manager.c' object='ags/plugin/libags_audio_la-ags_lv2_option_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_option_manager.lo `test -f 'ags/plugin/ags_lv2_option_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_option_manager.c ags/plugin/libags_audio_la-ags_lv2_uri_map_manager.lo: ags/plugin/ags_lv2_uri_map_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_uri_map_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_uri_map_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_uri_map_manager.lo `test -f 'ags/plugin/ags_lv2_uri_map_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_uri_map_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_uri_map_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_uri_map_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_uri_map_manager.c' object='ags/plugin/libags_audio_la-ags_lv2_uri_map_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_uri_map_manager.lo `test -f 'ags/plugin/ags_lv2_uri_map_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_uri_map_manager.c ags/plugin/libags_audio_la-ags_lv2_urid_manager.lo: ags/plugin/ags_lv2_urid_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_urid_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_urid_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_urid_manager.lo `test -f 'ags/plugin/ags_lv2_urid_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_urid_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_urid_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_urid_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_urid_manager.c' object='ags/plugin/libags_audio_la-ags_lv2_urid_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_urid_manager.lo `test -f 'ags/plugin/ags_lv2_urid_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_urid_manager.c ags/plugin/libags_audio_la-ags_lv2_worker_manager.lo: ags/plugin/ags_lv2_worker_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_worker_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_worker_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_worker_manager.lo `test -f 'ags/plugin/ags_lv2_worker_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_worker_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_worker_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_worker_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_worker_manager.c' object='ags/plugin/libags_audio_la-ags_lv2_worker_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_worker_manager.lo `test -f 'ags/plugin/ags_lv2_worker_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_worker_manager.c ags/plugin/libags_audio_la-ags_lv2_worker.lo: ags/plugin/ags_lv2_worker.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2_worker.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_worker.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2_worker.lo `test -f 'ags/plugin/ags_lv2_worker.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_worker.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_worker.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2_worker.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2_worker.c' object='ags/plugin/libags_audio_la-ags_lv2_worker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2_worker.lo `test -f 'ags/plugin/ags_lv2_worker.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2_worker.c ags/plugin/libags_audio_la-ags_lv2ui_manager.lo: ags/plugin/ags_lv2ui_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2ui_manager.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2ui_manager.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2ui_manager.lo `test -f 'ags/plugin/ags_lv2ui_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2ui_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2ui_manager.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2ui_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2ui_manager.c' object='ags/plugin/libags_audio_la-ags_lv2ui_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2ui_manager.lo `test -f 'ags/plugin/ags_lv2ui_manager.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2ui_manager.c ags/plugin/libags_audio_la-ags_lv2ui_plugin.lo: ags/plugin/ags_lv2ui_plugin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_lv2ui_plugin.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2ui_plugin.Tpo -c -o ags/plugin/libags_audio_la-ags_lv2ui_plugin.lo `test -f 'ags/plugin/ags_lv2ui_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2ui_plugin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2ui_plugin.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_lv2ui_plugin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_lv2ui_plugin.c' object='ags/plugin/libags_audio_la-ags_lv2ui_plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_lv2ui_plugin.lo `test -f 'ags/plugin/ags_lv2ui_plugin.c' || echo '$(srcdir)/'`ags/plugin/ags_lv2ui_plugin.c ags/plugin/libags_audio_la-ags_plugin_factory.lo: ags/plugin/ags_plugin_factory.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -MT ags/plugin/libags_audio_la-ags_plugin_factory.lo -MD -MP -MF ags/plugin/$(DEPDIR)/libags_audio_la-ags_plugin_factory.Tpo -c -o ags/plugin/libags_audio_la-ags_plugin_factory.lo `test -f 'ags/plugin/ags_plugin_factory.c' || echo '$(srcdir)/'`ags/plugin/ags_plugin_factory.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/plugin/$(DEPDIR)/libags_audio_la-ags_plugin_factory.Tpo ags/plugin/$(DEPDIR)/libags_audio_la-ags_plugin_factory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/plugin/ags_plugin_factory.c' object='ags/plugin/libags_audio_la-ags_plugin_factory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_audio_la_CFLAGS) $(CFLAGS) -c -o ags/plugin/libags_audio_la-ags_plugin_factory.lo `test -f 'ags/plugin/ags_plugin_factory.c' || echo '$(srcdir)/'`ags/plugin/ags_plugin_factory.c ags/widget/libags_gui_la-ags_cartesian.lo: ags/widget/ags_cartesian.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_cartesian.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_cartesian.Tpo -c -o ags/widget/libags_gui_la-ags_cartesian.lo `test -f 'ags/widget/ags_cartesian.c' || echo '$(srcdir)/'`ags/widget/ags_cartesian.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_cartesian.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_cartesian.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_cartesian.c' object='ags/widget/libags_gui_la-ags_cartesian.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_cartesian.lo `test -f 'ags/widget/ags_cartesian.c' || echo '$(srcdir)/'`ags/widget/ags_cartesian.c ags/widget/libags_gui_la-ags_dial.lo: ags/widget/ags_dial.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_dial.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_dial.Tpo -c -o ags/widget/libags_gui_la-ags_dial.lo `test -f 'ags/widget/ags_dial.c' || echo '$(srcdir)/'`ags/widget/ags_dial.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_dial.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_dial.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_dial.c' object='ags/widget/libags_gui_la-ags_dial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_dial.lo `test -f 'ags/widget/ags_dial.c' || echo '$(srcdir)/'`ags/widget/ags_dial.c ags/widget/libags_gui_la-ags_expander.lo: ags/widget/ags_expander.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_expander.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_expander.Tpo -c -o ags/widget/libags_gui_la-ags_expander.lo `test -f 'ags/widget/ags_expander.c' || echo '$(srcdir)/'`ags/widget/ags_expander.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_expander.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_expander.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_expander.c' object='ags/widget/libags_gui_la-ags_expander.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_expander.lo `test -f 'ags/widget/ags_expander.c' || echo '$(srcdir)/'`ags/widget/ags_expander.c ags/widget/libags_gui_la-ags_expander_set.lo: ags/widget/ags_expander_set.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_expander_set.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_expander_set.Tpo -c -o ags/widget/libags_gui_la-ags_expander_set.lo `test -f 'ags/widget/ags_expander_set.c' || echo '$(srcdir)/'`ags/widget/ags_expander_set.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_expander_set.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_expander_set.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_expander_set.c' object='ags/widget/libags_gui_la-ags_expander_set.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_expander_set.lo `test -f 'ags/widget/ags_expander_set.c' || echo '$(srcdir)/'`ags/widget/ags_expander_set.c ags/widget/libags_gui_la-ags_hindicator.lo: ags/widget/ags_hindicator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_hindicator.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_hindicator.Tpo -c -o ags/widget/libags_gui_la-ags_hindicator.lo `test -f 'ags/widget/ags_hindicator.c' || echo '$(srcdir)/'`ags/widget/ags_hindicator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_hindicator.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_hindicator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_hindicator.c' object='ags/widget/libags_gui_la-ags_hindicator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_hindicator.lo `test -f 'ags/widget/ags_hindicator.c' || echo '$(srcdir)/'`ags/widget/ags_hindicator.c ags/widget/libags_gui_la-ags_hled_array.lo: ags/widget/ags_hled_array.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_hled_array.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_hled_array.Tpo -c -o ags/widget/libags_gui_la-ags_hled_array.lo `test -f 'ags/widget/ags_hled_array.c' || echo '$(srcdir)/'`ags/widget/ags_hled_array.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_hled_array.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_hled_array.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_hled_array.c' object='ags/widget/libags_gui_la-ags_hled_array.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_hled_array.lo `test -f 'ags/widget/ags_hled_array.c' || echo '$(srcdir)/'`ags/widget/ags_hled_array.c ags/widget/libags_gui_la-ags_htimebar.lo: ags/widget/ags_htimebar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_htimebar.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_htimebar.Tpo -c -o ags/widget/libags_gui_la-ags_htimebar.lo `test -f 'ags/widget/ags_htimebar.c' || echo '$(srcdir)/'`ags/widget/ags_htimebar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_htimebar.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_htimebar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_htimebar.c' object='ags/widget/libags_gui_la-ags_htimebar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_htimebar.lo `test -f 'ags/widget/ags_htimebar.c' || echo '$(srcdir)/'`ags/widget/ags_htimebar.c ags/widget/libags_gui_la-ags_indicator.lo: ags/widget/ags_indicator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_indicator.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_indicator.Tpo -c -o ags/widget/libags_gui_la-ags_indicator.lo `test -f 'ags/widget/ags_indicator.c' || echo '$(srcdir)/'`ags/widget/ags_indicator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_indicator.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_indicator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_indicator.c' object='ags/widget/libags_gui_la-ags_indicator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_indicator.lo `test -f 'ags/widget/ags_indicator.c' || echo '$(srcdir)/'`ags/widget/ags_indicator.c ags/widget/libags_gui_la-ags_led.lo: ags/widget/ags_led.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_led.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_led.Tpo -c -o ags/widget/libags_gui_la-ags_led.lo `test -f 'ags/widget/ags_led.c' || echo '$(srcdir)/'`ags/widget/ags_led.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_led.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_led.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_led.c' object='ags/widget/libags_gui_la-ags_led.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_led.lo `test -f 'ags/widget/ags_led.c' || echo '$(srcdir)/'`ags/widget/ags_led.c ags/widget/libags_gui_la-ags_led_array.lo: ags/widget/ags_led_array.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_led_array.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_led_array.Tpo -c -o ags/widget/libags_gui_la-ags_led_array.lo `test -f 'ags/widget/ags_led_array.c' || echo '$(srcdir)/'`ags/widget/ags_led_array.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_led_array.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_led_array.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_led_array.c' object='ags/widget/libags_gui_la-ags_led_array.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_led_array.lo `test -f 'ags/widget/ags_led_array.c' || echo '$(srcdir)/'`ags/widget/ags_led_array.c ags/widget/libags_gui_la-ags_level.lo: ags/widget/ags_level.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_level.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_level.Tpo -c -o ags/widget/libags_gui_la-ags_level.lo `test -f 'ags/widget/ags_level.c' || echo '$(srcdir)/'`ags/widget/ags_level.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_level.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_level.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_level.c' object='ags/widget/libags_gui_la-ags_level.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_level.lo `test -f 'ags/widget/ags_level.c' || echo '$(srcdir)/'`ags/widget/ags_level.c ags/widget/libags_gui_la-ags_level_box.lo: ags/widget/ags_level_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_level_box.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_level_box.Tpo -c -o ags/widget/libags_gui_la-ags_level_box.lo `test -f 'ags/widget/ags_level_box.c' || echo '$(srcdir)/'`ags/widget/ags_level_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_level_box.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_level_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_level_box.c' object='ags/widget/libags_gui_la-ags_level_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_level_box.lo `test -f 'ags/widget/ags_level_box.c' || echo '$(srcdir)/'`ags/widget/ags_level_box.c ags/widget/libags_gui_la-ags_hlevel_box.lo: ags/widget/ags_hlevel_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_hlevel_box.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_hlevel_box.Tpo -c -o ags/widget/libags_gui_la-ags_hlevel_box.lo `test -f 'ags/widget/ags_hlevel_box.c' || echo '$(srcdir)/'`ags/widget/ags_hlevel_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_hlevel_box.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_hlevel_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_hlevel_box.c' object='ags/widget/libags_gui_la-ags_hlevel_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_hlevel_box.lo `test -f 'ags/widget/ags_hlevel_box.c' || echo '$(srcdir)/'`ags/widget/ags_hlevel_box.c ags/widget/libags_gui_la-ags_vlevel_box.lo: ags/widget/ags_vlevel_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_vlevel_box.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_vlevel_box.Tpo -c -o ags/widget/libags_gui_la-ags_vlevel_box.lo `test -f 'ags/widget/ags_vlevel_box.c' || echo '$(srcdir)/'`ags/widget/ags_vlevel_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_vlevel_box.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_vlevel_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_vlevel_box.c' object='ags/widget/libags_gui_la-ags_vlevel_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_vlevel_box.lo `test -f 'ags/widget/ags_vlevel_box.c' || echo '$(srcdir)/'`ags/widget/ags_vlevel_box.c ags/widget/libags_gui_la-ags_notebook.lo: ags/widget/ags_notebook.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_notebook.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_notebook.Tpo -c -o ags/widget/libags_gui_la-ags_notebook.lo `test -f 'ags/widget/ags_notebook.c' || echo '$(srcdir)/'`ags/widget/ags_notebook.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_notebook.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_notebook.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_notebook.c' object='ags/widget/libags_gui_la-ags_notebook.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_notebook.lo `test -f 'ags/widget/ags_notebook.c' || echo '$(srcdir)/'`ags/widget/ags_notebook.c ags/widget/libags_gui_la-ags_piano.lo: ags/widget/ags_piano.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_piano.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_piano.Tpo -c -o ags/widget/libags_gui_la-ags_piano.lo `test -f 'ags/widget/ags_piano.c' || echo '$(srcdir)/'`ags/widget/ags_piano.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_piano.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_piano.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_piano.c' object='ags/widget/libags_gui_la-ags_piano.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_piano.lo `test -f 'ags/widget/ags_piano.c' || echo '$(srcdir)/'`ags/widget/ags_piano.c ags/widget/libags_gui_la-ags_scrolled_piano.lo: ags/widget/ags_scrolled_piano.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_scrolled_piano.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_piano.Tpo -c -o ags/widget/libags_gui_la-ags_scrolled_piano.lo `test -f 'ags/widget/ags_scrolled_piano.c' || echo '$(srcdir)/'`ags/widget/ags_scrolled_piano.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_piano.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_piano.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_scrolled_piano.c' object='ags/widget/libags_gui_la-ags_scrolled_piano.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_scrolled_piano.lo `test -f 'ags/widget/ags_scrolled_piano.c' || echo '$(srcdir)/'`ags/widget/ags_scrolled_piano.c ags/widget/libags_gui_la-ags_scale.lo: ags/widget/ags_scale.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_scale.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_scale.Tpo -c -o ags/widget/libags_gui_la-ags_scale.lo `test -f 'ags/widget/ags_scale.c' || echo '$(srcdir)/'`ags/widget/ags_scale.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_scale.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_scale.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_scale.c' object='ags/widget/libags_gui_la-ags_scale.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_scale.lo `test -f 'ags/widget/ags_scale.c' || echo '$(srcdir)/'`ags/widget/ags_scale.c ags/widget/libags_gui_la-ags_scale_box.lo: ags/widget/ags_scale_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_scale_box.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_scale_box.Tpo -c -o ags/widget/libags_gui_la-ags_scale_box.lo `test -f 'ags/widget/ags_scale_box.c' || echo '$(srcdir)/'`ags/widget/ags_scale_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_scale_box.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_scale_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_scale_box.c' object='ags/widget/libags_gui_la-ags_scale_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_scale_box.lo `test -f 'ags/widget/ags_scale_box.c' || echo '$(srcdir)/'`ags/widget/ags_scale_box.c ags/widget/libags_gui_la-ags_vscale_box.lo: ags/widget/ags_vscale_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_vscale_box.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_vscale_box.Tpo -c -o ags/widget/libags_gui_la-ags_vscale_box.lo `test -f 'ags/widget/ags_vscale_box.c' || echo '$(srcdir)/'`ags/widget/ags_vscale_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_vscale_box.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_vscale_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_vscale_box.c' object='ags/widget/libags_gui_la-ags_vscale_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_vscale_box.lo `test -f 'ags/widget/ags_vscale_box.c' || echo '$(srcdir)/'`ags/widget/ags_vscale_box.c ags/widget/libags_gui_la-ags_hscale_box.lo: ags/widget/ags_hscale_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_hscale_box.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_hscale_box.Tpo -c -o ags/widget/libags_gui_la-ags_hscale_box.lo `test -f 'ags/widget/ags_hscale_box.c' || echo '$(srcdir)/'`ags/widget/ags_hscale_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_hscale_box.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_hscale_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_hscale_box.c' object='ags/widget/libags_gui_la-ags_hscale_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_hscale_box.lo `test -f 'ags/widget/ags_hscale_box.c' || echo '$(srcdir)/'`ags/widget/ags_hscale_box.c ags/widget/libags_gui_la-ags_scrolled_scale_box.lo: ags/widget/ags_scrolled_scale_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_scrolled_scale_box.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_scale_box.Tpo -c -o ags/widget/libags_gui_la-ags_scrolled_scale_box.lo `test -f 'ags/widget/ags_scrolled_scale_box.c' || echo '$(srcdir)/'`ags/widget/ags_scrolled_scale_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_scale_box.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_scale_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_scrolled_scale_box.c' object='ags/widget/libags_gui_la-ags_scrolled_scale_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_scrolled_scale_box.lo `test -f 'ags/widget/ags_scrolled_scale_box.c' || echo '$(srcdir)/'`ags/widget/ags_scrolled_scale_box.c ags/widget/libags_gui_la-ags_scrolled_level_box.lo: ags/widget/ags_scrolled_level_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_scrolled_level_box.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_level_box.Tpo -c -o ags/widget/libags_gui_la-ags_scrolled_level_box.lo `test -f 'ags/widget/ags_scrolled_level_box.c' || echo '$(srcdir)/'`ags/widget/ags_scrolled_level_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_level_box.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_scrolled_level_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_scrolled_level_box.c' object='ags/widget/libags_gui_la-ags_scrolled_level_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_scrolled_level_box.lo `test -f 'ags/widget/ags_scrolled_level_box.c' || echo '$(srcdir)/'`ags/widget/ags_scrolled_level_box.c ags/widget/libags_gui_la-ags_ruler.lo: ags/widget/ags_ruler.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_ruler.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_ruler.Tpo -c -o ags/widget/libags_gui_la-ags_ruler.lo `test -f 'ags/widget/ags_ruler.c' || echo '$(srcdir)/'`ags/widget/ags_ruler.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_ruler.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_ruler.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_ruler.c' object='ags/widget/libags_gui_la-ags_ruler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_ruler.lo `test -f 'ags/widget/ags_ruler.c' || echo '$(srcdir)/'`ags/widget/ags_ruler.c ags/widget/libags_gui_la-ags_table.lo: ags/widget/ags_table.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_table.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_table.Tpo -c -o ags/widget/libags_gui_la-ags_table.lo `test -f 'ags/widget/ags_table.c' || echo '$(srcdir)/'`ags/widget/ags_table.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_table.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_table.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_table.c' object='ags/widget/libags_gui_la-ags_table.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_table.lo `test -f 'ags/widget/ags_table.c' || echo '$(srcdir)/'`ags/widget/ags_table.c ags/widget/libags_gui_la-ags_timebar.lo: ags/widget/ags_timebar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_timebar.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_timebar.Tpo -c -o ags/widget/libags_gui_la-ags_timebar.lo `test -f 'ags/widget/ags_timebar.c' || echo '$(srcdir)/'`ags/widget/ags_timebar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_timebar.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_timebar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_timebar.c' object='ags/widget/libags_gui_la-ags_timebar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_timebar.lo `test -f 'ags/widget/ags_timebar.c' || echo '$(srcdir)/'`ags/widget/ags_timebar.c ags/widget/libags_gui_la-ags_vindicator.lo: ags/widget/ags_vindicator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_vindicator.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_vindicator.Tpo -c -o ags/widget/libags_gui_la-ags_vindicator.lo `test -f 'ags/widget/ags_vindicator.c' || echo '$(srcdir)/'`ags/widget/ags_vindicator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_vindicator.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_vindicator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_vindicator.c' object='ags/widget/libags_gui_la-ags_vindicator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_vindicator.lo `test -f 'ags/widget/ags_vindicator.c' || echo '$(srcdir)/'`ags/widget/ags_vindicator.c ags/widget/libags_gui_la-ags_vled_array.lo: ags/widget/ags_vled_array.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_vled_array.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_vled_array.Tpo -c -o ags/widget/libags_gui_la-ags_vled_array.lo `test -f 'ags/widget/ags_vled_array.c' || echo '$(srcdir)/'`ags/widget/ags_vled_array.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_vled_array.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_vled_array.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_vled_array.c' object='ags/widget/libags_gui_la-ags_vled_array.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_vled_array.lo `test -f 'ags/widget/ags_vled_array.c' || echo '$(srcdir)/'`ags/widget/ags_vled_array.c ags/widget/libags_gui_la-ags_waveform.lo: ags/widget/ags_waveform.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_waveform.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_waveform.Tpo -c -o ags/widget/libags_gui_la-ags_waveform.lo `test -f 'ags/widget/ags_waveform.c' || echo '$(srcdir)/'`ags/widget/ags_waveform.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_waveform.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_waveform.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_waveform.c' object='ags/widget/libags_gui_la-ags_waveform.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_waveform.lo `test -f 'ags/widget/ags_waveform.c' || echo '$(srcdir)/'`ags/widget/ags_waveform.c ags/widget/libags_gui_la-ags_widget_marshal.lo: ags/widget/ags_widget_marshal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_widget_marshal.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_widget_marshal.Tpo -c -o ags/widget/libags_gui_la-ags_widget_marshal.lo `test -f 'ags/widget/ags_widget_marshal.c' || echo '$(srcdir)/'`ags/widget/ags_widget_marshal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_widget_marshal.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_widget_marshal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_widget_marshal.c' object='ags/widget/libags_gui_la-ags_widget_marshal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_widget_marshal.lo `test -f 'ags/widget/ags_widget_marshal.c' || echo '$(srcdir)/'`ags/widget/ags_widget_marshal.c ags/widget/libags_gui_la-ags_container.lo: ags/widget/ags_container.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -MT ags/widget/libags_gui_la-ags_container.lo -MD -MP -MF ags/widget/$(DEPDIR)/libags_gui_la-ags_container.Tpo -c -o ags/widget/libags_gui_la-ags_container.lo `test -f 'ags/widget/ags_container.c' || echo '$(srcdir)/'`ags/widget/ags_container.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/widget/$(DEPDIR)/libags_gui_la-ags_container.Tpo ags/widget/$(DEPDIR)/libags_gui_la-ags_container.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/widget/ags_container.c' object='ags/widget/libags_gui_la-ags_container.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_gui_la_CFLAGS) $(CFLAGS) -c -o ags/widget/libags_gui_la-ags_container.lo `test -f 'ags/widget/ags_container.c' || echo '$(srcdir)/'`ags/widget/ags_container.c ags/server/libags_server_la-ags_registry.lo: ags/server/ags_registry.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/libags_server_la-ags_registry.lo -MD -MP -MF ags/server/$(DEPDIR)/libags_server_la-ags_registry.Tpo -c -o ags/server/libags_server_la-ags_registry.lo `test -f 'ags/server/ags_registry.c' || echo '$(srcdir)/'`ags/server/ags_registry.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/$(DEPDIR)/libags_server_la-ags_registry.Tpo ags/server/$(DEPDIR)/libags_server_la-ags_registry.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/ags_registry.c' object='ags/server/libags_server_la-ags_registry.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/libags_server_la-ags_registry.lo `test -f 'ags/server/ags_registry.c' || echo '$(srcdir)/'`ags/server/ags_registry.c ags/server/libags_server_la-ags_server.lo: ags/server/ags_server.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/libags_server_la-ags_server.lo -MD -MP -MF ags/server/$(DEPDIR)/libags_server_la-ags_server.Tpo -c -o ags/server/libags_server_la-ags_server.lo `test -f 'ags/server/ags_server.c' || echo '$(srcdir)/'`ags/server/ags_server.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/$(DEPDIR)/libags_server_la-ags_server.Tpo ags/server/$(DEPDIR)/libags_server_la-ags_server.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/ags_server.c' object='ags/server/libags_server_la-ags_server.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/libags_server_la-ags_server.lo `test -f 'ags/server/ags_server.c' || echo '$(srcdir)/'`ags/server/ags_server.c ags/server/libags_server_la-ags_server_application_context.lo: ags/server/ags_server_application_context.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/libags_server_la-ags_server_application_context.lo -MD -MP -MF ags/server/$(DEPDIR)/libags_server_la-ags_server_application_context.Tpo -c -o ags/server/libags_server_la-ags_server_application_context.lo `test -f 'ags/server/ags_server_application_context.c' || echo '$(srcdir)/'`ags/server/ags_server_application_context.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/$(DEPDIR)/libags_server_la-ags_server_application_context.Tpo ags/server/$(DEPDIR)/libags_server_la-ags_server_application_context.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/ags_server_application_context.c' object='ags/server/libags_server_la-ags_server_application_context.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/libags_server_la-ags_server_application_context.lo `test -f 'ags/server/ags_server_application_context.c' || echo '$(srcdir)/'`ags/server/ags_server_application_context.c ags/server/libags_server_la-ags_server_status.lo: ags/server/ags_server_status.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/libags_server_la-ags_server_status.lo -MD -MP -MF ags/server/$(DEPDIR)/libags_server_la-ags_server_status.Tpo -c -o ags/server/libags_server_la-ags_server_status.lo `test -f 'ags/server/ags_server_status.c' || echo '$(srcdir)/'`ags/server/ags_server_status.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/$(DEPDIR)/libags_server_la-ags_server_status.Tpo ags/server/$(DEPDIR)/libags_server_la-ags_server_status.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/ags_server_status.c' object='ags/server/libags_server_la-ags_server_status.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/libags_server_la-ags_server_status.lo `test -f 'ags/server/ags_server_status.c' || echo '$(srcdir)/'`ags/server/ags_server_status.c ags/server/libags_server_la-ags_service_provider.lo: ags/server/ags_service_provider.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/libags_server_la-ags_service_provider.lo -MD -MP -MF ags/server/$(DEPDIR)/libags_server_la-ags_service_provider.Tpo -c -o ags/server/libags_server_la-ags_service_provider.lo `test -f 'ags/server/ags_service_provider.c' || echo '$(srcdir)/'`ags/server/ags_service_provider.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/$(DEPDIR)/libags_server_la-ags_service_provider.Tpo ags/server/$(DEPDIR)/libags_server_la-ags_service_provider.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/ags_service_provider.c' object='ags/server/libags_server_la-ags_service_provider.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/libags_server_la-ags_service_provider.lo `test -f 'ags/server/ags_service_provider.c' || echo '$(srcdir)/'`ags/server/ags_service_provider.c ags/server/security/libags_server_la-ags_authentication.lo: ags/server/security/ags_authentication.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_authentication.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_authentication.Tpo -c -o ags/server/security/libags_server_la-ags_authentication.lo `test -f 'ags/server/security/ags_authentication.c' || echo '$(srcdir)/'`ags/server/security/ags_authentication.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_authentication.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_authentication.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_authentication.c' object='ags/server/security/libags_server_la-ags_authentication.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_authentication.lo `test -f 'ags/server/security/ags_authentication.c' || echo '$(srcdir)/'`ags/server/security/ags_authentication.c ags/server/security/libags_server_la-ags_authentication_manager.lo: ags/server/security/ags_authentication_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_authentication_manager.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_authentication_manager.Tpo -c -o ags/server/security/libags_server_la-ags_authentication_manager.lo `test -f 'ags/server/security/ags_authentication_manager.c' || echo '$(srcdir)/'`ags/server/security/ags_authentication_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_authentication_manager.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_authentication_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_authentication_manager.c' object='ags/server/security/libags_server_la-ags_authentication_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_authentication_manager.lo `test -f 'ags/server/security/ags_authentication_manager.c' || echo '$(srcdir)/'`ags/server/security/ags_authentication_manager.c ags/server/security/libags_server_la-ags_business_group.lo: ags/server/security/ags_business_group.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_business_group.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_business_group.Tpo -c -o ags/server/security/libags_server_la-ags_business_group.lo `test -f 'ags/server/security/ags_business_group.c' || echo '$(srcdir)/'`ags/server/security/ags_business_group.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_business_group.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_business_group.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_business_group.c' object='ags/server/security/libags_server_la-ags_business_group.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_business_group.lo `test -f 'ags/server/security/ags_business_group.c' || echo '$(srcdir)/'`ags/server/security/ags_business_group.c ags/server/security/libags_server_la-ags_certificate.lo: ags/server/security/ags_certificate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_certificate.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_certificate.Tpo -c -o ags/server/security/libags_server_la-ags_certificate.lo `test -f 'ags/server/security/ags_certificate.c' || echo '$(srcdir)/'`ags/server/security/ags_certificate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_certificate.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_certificate.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_certificate.c' object='ags/server/security/libags_server_la-ags_certificate.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_certificate.lo `test -f 'ags/server/security/ags_certificate.c' || echo '$(srcdir)/'`ags/server/security/ags_certificate.c ags/server/security/libags_server_la-ags_certificate_manager.lo: ags/server/security/ags_certificate_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_certificate_manager.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_certificate_manager.Tpo -c -o ags/server/security/libags_server_la-ags_certificate_manager.lo `test -f 'ags/server/security/ags_certificate_manager.c' || echo '$(srcdir)/'`ags/server/security/ags_certificate_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_certificate_manager.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_certificate_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_certificate_manager.c' object='ags/server/security/libags_server_la-ags_certificate_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_certificate_manager.lo `test -f 'ags/server/security/ags_certificate_manager.c' || echo '$(srcdir)/'`ags/server/security/ags_certificate_manager.c ags/server/security/libags_server_la-ags_password_store.lo: ags/server/security/ags_password_store.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_password_store.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_password_store.Tpo -c -o ags/server/security/libags_server_la-ags_password_store.lo `test -f 'ags/server/security/ags_password_store.c' || echo '$(srcdir)/'`ags/server/security/ags_password_store.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_password_store.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_password_store.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_password_store.c' object='ags/server/security/libags_server_la-ags_password_store.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_password_store.lo `test -f 'ags/server/security/ags_password_store.c' || echo '$(srcdir)/'`ags/server/security/ags_password_store.c ags/server/security/libags_server_la-ags_password_store_manager.lo: ags/server/security/ags_password_store_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_password_store_manager.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_password_store_manager.Tpo -c -o ags/server/security/libags_server_la-ags_password_store_manager.lo `test -f 'ags/server/security/ags_password_store_manager.c' || echo '$(srcdir)/'`ags/server/security/ags_password_store_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_password_store_manager.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_password_store_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_password_store_manager.c' object='ags/server/security/libags_server_la-ags_password_store_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_password_store_manager.lo `test -f 'ags/server/security/ags_password_store_manager.c' || echo '$(srcdir)/'`ags/server/security/ags_password_store_manager.c ags/server/security/libags_server_la-ags_security_context.lo: ags/server/security/ags_security_context.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_security_context.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_security_context.Tpo -c -o ags/server/security/libags_server_la-ags_security_context.lo `test -f 'ags/server/security/ags_security_context.c' || echo '$(srcdir)/'`ags/server/security/ags_security_context.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_security_context.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_security_context.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_security_context.c' object='ags/server/security/libags_server_la-ags_security_context.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_security_context.lo `test -f 'ags/server/security/ags_security_context.c' || echo '$(srcdir)/'`ags/server/security/ags_security_context.c ags/server/security/libags_server_la-ags_xml_authentication.lo: ags/server/security/ags_xml_authentication.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_xml_authentication.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_authentication.Tpo -c -o ags/server/security/libags_server_la-ags_xml_authentication.lo `test -f 'ags/server/security/ags_xml_authentication.c' || echo '$(srcdir)/'`ags/server/security/ags_xml_authentication.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_authentication.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_authentication.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_xml_authentication.c' object='ags/server/security/libags_server_la-ags_xml_authentication.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_xml_authentication.lo `test -f 'ags/server/security/ags_xml_authentication.c' || echo '$(srcdir)/'`ags/server/security/ags_xml_authentication.c ags/server/security/libags_server_la-ags_xml_certificate.lo: ags/server/security/ags_xml_certificate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_xml_certificate.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_certificate.Tpo -c -o ags/server/security/libags_server_la-ags_xml_certificate.lo `test -f 'ags/server/security/ags_xml_certificate.c' || echo '$(srcdir)/'`ags/server/security/ags_xml_certificate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_certificate.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_certificate.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_xml_certificate.c' object='ags/server/security/libags_server_la-ags_xml_certificate.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_xml_certificate.lo `test -f 'ags/server/security/ags_xml_certificate.c' || echo '$(srcdir)/'`ags/server/security/ags_xml_certificate.c ags/server/security/libags_server_la-ags_xml_password_store.lo: ags/server/security/ags_xml_password_store.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/security/libags_server_la-ags_xml_password_store.lo -MD -MP -MF ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_password_store.Tpo -c -o ags/server/security/libags_server_la-ags_xml_password_store.lo `test -f 'ags/server/security/ags_xml_password_store.c' || echo '$(srcdir)/'`ags/server/security/ags_xml_password_store.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_password_store.Tpo ags/server/security/$(DEPDIR)/libags_server_la-ags_xml_password_store.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/security/ags_xml_password_store.c' object='ags/server/security/libags_server_la-ags_xml_password_store.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/security/libags_server_la-ags_xml_password_store.lo `test -f 'ags/server/security/ags_xml_password_store.c' || echo '$(srcdir)/'`ags/server/security/ags_xml_password_store.c ags/server/controller/libags_server_la-ags_controller.lo: ags/server/controller/ags_controller.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/controller/libags_server_la-ags_controller.lo -MD -MP -MF ags/server/controller/$(DEPDIR)/libags_server_la-ags_controller.Tpo -c -o ags/server/controller/libags_server_la-ags_controller.lo `test -f 'ags/server/controller/ags_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_controller.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/controller/$(DEPDIR)/libags_server_la-ags_controller.Tpo ags/server/controller/$(DEPDIR)/libags_server_la-ags_controller.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/controller/ags_controller.c' object='ags/server/controller/libags_server_la-ags_controller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/controller/libags_server_la-ags_controller.lo `test -f 'ags/server/controller/ags_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_controller.c ags/server/controller/libags_server_la-ags_front_controller.lo: ags/server/controller/ags_front_controller.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/controller/libags_server_la-ags_front_controller.lo -MD -MP -MF ags/server/controller/$(DEPDIR)/libags_server_la-ags_front_controller.Tpo -c -o ags/server/controller/libags_server_la-ags_front_controller.lo `test -f 'ags/server/controller/ags_front_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_front_controller.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/controller/$(DEPDIR)/libags_server_la-ags_front_controller.Tpo ags/server/controller/$(DEPDIR)/libags_server_la-ags_front_controller.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/controller/ags_front_controller.c' object='ags/server/controller/libags_server_la-ags_front_controller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/controller/libags_server_la-ags_front_controller.lo `test -f 'ags/server/controller/ags_front_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_front_controller.c ags/server/controller/libags_server_la-ags_local_factory_controller.lo: ags/server/controller/ags_local_factory_controller.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/controller/libags_server_la-ags_local_factory_controller.lo -MD -MP -MF ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_factory_controller.Tpo -c -o ags/server/controller/libags_server_la-ags_local_factory_controller.lo `test -f 'ags/server/controller/ags_local_factory_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_local_factory_controller.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_factory_controller.Tpo ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_factory_controller.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/controller/ags_local_factory_controller.c' object='ags/server/controller/libags_server_la-ags_local_factory_controller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/controller/libags_server_la-ags_local_factory_controller.lo `test -f 'ags/server/controller/ags_local_factory_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_local_factory_controller.c ags/server/controller/libags_server_la-ags_local_registry_controller.lo: ags/server/controller/ags_local_registry_controller.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/controller/libags_server_la-ags_local_registry_controller.lo -MD -MP -MF ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_registry_controller.Tpo -c -o ags/server/controller/libags_server_la-ags_local_registry_controller.lo `test -f 'ags/server/controller/ags_local_registry_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_local_registry_controller.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_registry_controller.Tpo ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_registry_controller.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/controller/ags_local_registry_controller.c' object='ags/server/controller/libags_server_la-ags_local_registry_controller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/controller/libags_server_la-ags_local_registry_controller.lo `test -f 'ags/server/controller/ags_local_registry_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_local_registry_controller.c ags/server/controller/libags_server_la-ags_local_serialization_controller.lo: ags/server/controller/ags_local_serialization_controller.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/controller/libags_server_la-ags_local_serialization_controller.lo -MD -MP -MF ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_serialization_controller.Tpo -c -o ags/server/controller/libags_server_la-ags_local_serialization_controller.lo `test -f 'ags/server/controller/ags_local_serialization_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_local_serialization_controller.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_serialization_controller.Tpo ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_serialization_controller.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/controller/ags_local_serialization_controller.c' object='ags/server/controller/libags_server_la-ags_local_serialization_controller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/controller/libags_server_la-ags_local_serialization_controller.lo `test -f 'ags/server/controller/ags_local_serialization_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_local_serialization_controller.c ags/server/controller/libags_server_la-ags_local_task_controller.lo: ags/server/controller/ags_local_task_controller.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/controller/libags_server_la-ags_local_task_controller.lo -MD -MP -MF ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_task_controller.Tpo -c -o ags/server/controller/libags_server_la-ags_local_task_controller.lo `test -f 'ags/server/controller/ags_local_task_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_local_task_controller.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_task_controller.Tpo ags/server/controller/$(DEPDIR)/libags_server_la-ags_local_task_controller.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/controller/ags_local_task_controller.c' object='ags/server/controller/libags_server_la-ags_local_task_controller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/controller/libags_server_la-ags_local_task_controller.lo `test -f 'ags/server/controller/ags_local_task_controller.c' || echo '$(srcdir)/'`ags/server/controller/ags_local_task_controller.c ags/server/thread/libags_server_la-ags_remote_task.lo: ags/server/thread/ags_remote_task.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/thread/libags_server_la-ags_remote_task.lo -MD -MP -MF ags/server/thread/$(DEPDIR)/libags_server_la-ags_remote_task.Tpo -c -o ags/server/thread/libags_server_la-ags_remote_task.lo `test -f 'ags/server/thread/ags_remote_task.c' || echo '$(srcdir)/'`ags/server/thread/ags_remote_task.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/thread/$(DEPDIR)/libags_server_la-ags_remote_task.Tpo ags/server/thread/$(DEPDIR)/libags_server_la-ags_remote_task.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/thread/ags_remote_task.c' object='ags/server/thread/libags_server_la-ags_remote_task.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/thread/libags_server_la-ags_remote_task.lo `test -f 'ags/server/thread/ags_remote_task.c' || echo '$(srcdir)/'`ags/server/thread/ags_remote_task.c ags/server/thread/libags_server_la-ags_remote_task_thread.lo: ags/server/thread/ags_remote_task_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -MT ags/server/thread/libags_server_la-ags_remote_task_thread.lo -MD -MP -MF ags/server/thread/$(DEPDIR)/libags_server_la-ags_remote_task_thread.Tpo -c -o ags/server/thread/libags_server_la-ags_remote_task_thread.lo `test -f 'ags/server/thread/ags_remote_task_thread.c' || echo '$(srcdir)/'`ags/server/thread/ags_remote_task_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/server/thread/$(DEPDIR)/libags_server_la-ags_remote_task_thread.Tpo ags/server/thread/$(DEPDIR)/libags_server_la-ags_remote_task_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/server/thread/ags_remote_task_thread.c' object='ags/server/thread/libags_server_la-ags_remote_task_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_server_la_CFLAGS) $(CFLAGS) -c -o ags/server/thread/libags_server_la-ags_remote_task_thread.lo `test -f 'ags/server/thread/ags_remote_task_thread.c' || echo '$(srcdir)/'`ags/server/thread/ags_remote_task_thread.c ags/thread/libags_thread_la-ags_autosave_thread.lo: ags/thread/ags_autosave_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_autosave_thread.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_autosave_thread.Tpo -c -o ags/thread/libags_thread_la-ags_autosave_thread.lo `test -f 'ags/thread/ags_autosave_thread.c' || echo '$(srcdir)/'`ags/thread/ags_autosave_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_autosave_thread.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_autosave_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_autosave_thread.c' object='ags/thread/libags_thread_la-ags_autosave_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_autosave_thread.lo `test -f 'ags/thread/ags_autosave_thread.c' || echo '$(srcdir)/'`ags/thread/ags_autosave_thread.c ags/thread/libags_thread_la-ags_concurrency_provider.lo: ags/thread/ags_concurrency_provider.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_concurrency_provider.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_concurrency_provider.Tpo -c -o ags/thread/libags_thread_la-ags_concurrency_provider.lo `test -f 'ags/thread/ags_concurrency_provider.c' || echo '$(srcdir)/'`ags/thread/ags_concurrency_provider.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_concurrency_provider.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_concurrency_provider.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_concurrency_provider.c' object='ags/thread/libags_thread_la-ags_concurrency_provider.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_concurrency_provider.lo `test -f 'ags/thread/ags_concurrency_provider.c' || echo '$(srcdir)/'`ags/thread/ags_concurrency_provider.c ags/thread/libags_thread_la-ags_condition_manager.lo: ags/thread/ags_condition_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_condition_manager.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_condition_manager.Tpo -c -o ags/thread/libags_thread_la-ags_condition_manager.lo `test -f 'ags/thread/ags_condition_manager.c' || echo '$(srcdir)/'`ags/thread/ags_condition_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_condition_manager.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_condition_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_condition_manager.c' object='ags/thread/libags_thread_la-ags_condition_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_condition_manager.lo `test -f 'ags/thread/ags_condition_manager.c' || echo '$(srcdir)/'`ags/thread/ags_condition_manager.c ags/thread/libags_thread_la-ags_destroy_worker.lo: ags/thread/ags_destroy_worker.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_destroy_worker.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_destroy_worker.Tpo -c -o ags/thread/libags_thread_la-ags_destroy_worker.lo `test -f 'ags/thread/ags_destroy_worker.c' || echo '$(srcdir)/'`ags/thread/ags_destroy_worker.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_destroy_worker.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_destroy_worker.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_destroy_worker.c' object='ags/thread/libags_thread_la-ags_destroy_worker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_destroy_worker.lo `test -f 'ags/thread/ags_destroy_worker.c' || echo '$(srcdir)/'`ags/thread/ags_destroy_worker.c ags/thread/libags_thread_la-ags_generic_main_loop.lo: ags/thread/ags_generic_main_loop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_generic_main_loop.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_generic_main_loop.Tpo -c -o ags/thread/libags_thread_la-ags_generic_main_loop.lo `test -f 'ags/thread/ags_generic_main_loop.c' || echo '$(srcdir)/'`ags/thread/ags_generic_main_loop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_generic_main_loop.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_generic_main_loop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_generic_main_loop.c' object='ags/thread/libags_thread_la-ags_generic_main_loop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_generic_main_loop.lo `test -f 'ags/thread/ags_generic_main_loop.c' || echo '$(srcdir)/'`ags/thread/ags_generic_main_loop.c ags/thread/libags_thread_la-ags_history.lo: ags/thread/ags_history.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_history.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_history.Tpo -c -o ags/thread/libags_thread_la-ags_history.lo `test -f 'ags/thread/ags_history.c' || echo '$(srcdir)/'`ags/thread/ags_history.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_history.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_history.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_history.c' object='ags/thread/libags_thread_la-ags_history.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_history.lo `test -f 'ags/thread/ags_history.c' || echo '$(srcdir)/'`ags/thread/ags_history.c ags/thread/libags_thread_la-ags_message_delivery.lo: ags/thread/ags_message_delivery.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_message_delivery.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_message_delivery.Tpo -c -o ags/thread/libags_thread_la-ags_message_delivery.lo `test -f 'ags/thread/ags_message_delivery.c' || echo '$(srcdir)/'`ags/thread/ags_message_delivery.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_message_delivery.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_message_delivery.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_message_delivery.c' object='ags/thread/libags_thread_la-ags_message_delivery.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_message_delivery.lo `test -f 'ags/thread/ags_message_delivery.c' || echo '$(srcdir)/'`ags/thread/ags_message_delivery.c ags/thread/libags_thread_la-ags_message_queue.lo: ags/thread/ags_message_queue.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_message_queue.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_message_queue.Tpo -c -o ags/thread/libags_thread_la-ags_message_queue.lo `test -f 'ags/thread/ags_message_queue.c' || echo '$(srcdir)/'`ags/thread/ags_message_queue.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_message_queue.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_message_queue.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_message_queue.c' object='ags/thread/libags_thread_la-ags_message_queue.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_message_queue.lo `test -f 'ags/thread/ags_message_queue.c' || echo '$(srcdir)/'`ags/thread/ags_message_queue.c ags/thread/libags_thread_la-ags_mutex_manager.lo: ags/thread/ags_mutex_manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_mutex_manager.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_mutex_manager.Tpo -c -o ags/thread/libags_thread_la-ags_mutex_manager.lo `test -f 'ags/thread/ags_mutex_manager.c' || echo '$(srcdir)/'`ags/thread/ags_mutex_manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_mutex_manager.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_mutex_manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_mutex_manager.c' object='ags/thread/libags_thread_la-ags_mutex_manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_mutex_manager.lo `test -f 'ags/thread/ags_mutex_manager.c' || echo '$(srcdir)/'`ags/thread/ags_mutex_manager.c ags/thread/libags_thread_la-ags_poll_fd.lo: ags/thread/ags_poll_fd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_poll_fd.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_poll_fd.Tpo -c -o ags/thread/libags_thread_la-ags_poll_fd.lo `test -f 'ags/thread/ags_poll_fd.c' || echo '$(srcdir)/'`ags/thread/ags_poll_fd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_poll_fd.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_poll_fd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_poll_fd.c' object='ags/thread/libags_thread_la-ags_poll_fd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_poll_fd.lo `test -f 'ags/thread/ags_poll_fd.c' || echo '$(srcdir)/'`ags/thread/ags_poll_fd.c ags/thread/libags_thread_la-ags_polling_thread.lo: ags/thread/ags_polling_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_polling_thread.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_polling_thread.Tpo -c -o ags/thread/libags_thread_la-ags_polling_thread.lo `test -f 'ags/thread/ags_polling_thread.c' || echo '$(srcdir)/'`ags/thread/ags_polling_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_polling_thread.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_polling_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_polling_thread.c' object='ags/thread/libags_thread_la-ags_polling_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_polling_thread.lo `test -f 'ags/thread/ags_polling_thread.c' || echo '$(srcdir)/'`ags/thread/ags_polling_thread.c ags/thread/libags_thread_la-ags_returnable_thread.lo: ags/thread/ags_returnable_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_returnable_thread.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_returnable_thread.Tpo -c -o ags/thread/libags_thread_la-ags_returnable_thread.lo `test -f 'ags/thread/ags_returnable_thread.c' || echo '$(srcdir)/'`ags/thread/ags_returnable_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_returnable_thread.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_returnable_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_returnable_thread.c' object='ags/thread/libags_thread_la-ags_returnable_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_returnable_thread.lo `test -f 'ags/thread/ags_returnable_thread.c' || echo '$(srcdir)/'`ags/thread/ags_returnable_thread.c ags/thread/libags_thread_la-ags_single_thread.lo: ags/thread/ags_single_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_single_thread.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_single_thread.Tpo -c -o ags/thread/libags_thread_la-ags_single_thread.lo `test -f 'ags/thread/ags_single_thread.c' || echo '$(srcdir)/'`ags/thread/ags_single_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_single_thread.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_single_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_single_thread.c' object='ags/thread/libags_thread_la-ags_single_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_single_thread.lo `test -f 'ags/thread/ags_single_thread.c' || echo '$(srcdir)/'`ags/thread/ags_single_thread.c ags/thread/libags_thread_la-ags_task_completion.lo: ags/thread/ags_task_completion.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_task_completion.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_task_completion.Tpo -c -o ags/thread/libags_thread_la-ags_task_completion.lo `test -f 'ags/thread/ags_task_completion.c' || echo '$(srcdir)/'`ags/thread/ags_task_completion.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_task_completion.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_task_completion.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_task_completion.c' object='ags/thread/libags_thread_la-ags_task_completion.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_task_completion.lo `test -f 'ags/thread/ags_task_completion.c' || echo '$(srcdir)/'`ags/thread/ags_task_completion.c ags/thread/libags_thread_la-ags_task.lo: ags/thread/ags_task.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_task.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_task.Tpo -c -o ags/thread/libags_thread_la-ags_task.lo `test -f 'ags/thread/ags_task.c' || echo '$(srcdir)/'`ags/thread/ags_task.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_task.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_task.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_task.c' object='ags/thread/libags_thread_la-ags_task.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_task.lo `test -f 'ags/thread/ags_task.c' || echo '$(srcdir)/'`ags/thread/ags_task.c ags/thread/libags_thread_la-ags_task_thread.lo: ags/thread/ags_task_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_task_thread.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_task_thread.Tpo -c -o ags/thread/libags_thread_la-ags_task_thread.lo `test -f 'ags/thread/ags_task_thread.c' || echo '$(srcdir)/'`ags/thread/ags_task_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_task_thread.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_task_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_task_thread.c' object='ags/thread/libags_thread_la-ags_task_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_task_thread.lo `test -f 'ags/thread/ags_task_thread.c' || echo '$(srcdir)/'`ags/thread/ags_task_thread.c ags/thread/libags_thread_la-ags_thread_application_context.lo: ags/thread/ags_thread_application_context.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_thread_application_context.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_thread_application_context.Tpo -c -o ags/thread/libags_thread_la-ags_thread_application_context.lo `test -f 'ags/thread/ags_thread_application_context.c' || echo '$(srcdir)/'`ags/thread/ags_thread_application_context.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_thread_application_context.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_thread_application_context.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_thread_application_context.c' object='ags/thread/libags_thread_la-ags_thread_application_context.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_thread_application_context.lo `test -f 'ags/thread/ags_thread_application_context.c' || echo '$(srcdir)/'`ags/thread/ags_thread_application_context.c ags/thread/libags_thread_la-ags_thread_pool.lo: ags/thread/ags_thread_pool.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_thread_pool.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_thread_pool.Tpo -c -o ags/thread/libags_thread_la-ags_thread_pool.lo `test -f 'ags/thread/ags_thread_pool.c' || echo '$(srcdir)/'`ags/thread/ags_thread_pool.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_thread_pool.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_thread_pool.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_thread_pool.c' object='ags/thread/libags_thread_la-ags_thread_pool.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_thread_pool.lo `test -f 'ags/thread/ags_thread_pool.c' || echo '$(srcdir)/'`ags/thread/ags_thread_pool.c ags/thread/libags_thread_la-ags_thread-posix.lo: ags/thread/ags_thread-posix.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_thread-posix.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_thread-posix.Tpo -c -o ags/thread/libags_thread_la-ags_thread-posix.lo `test -f 'ags/thread/ags_thread-posix.c' || echo '$(srcdir)/'`ags/thread/ags_thread-posix.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_thread-posix.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_thread-posix.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_thread-posix.c' object='ags/thread/libags_thread_la-ags_thread-posix.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_thread-posix.lo `test -f 'ags/thread/ags_thread-posix.c' || echo '$(srcdir)/'`ags/thread/ags_thread-posix.c ags/thread/libags_thread_la-ags_timestamp_factory.lo: ags/thread/ags_timestamp_factory.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_timestamp_factory.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp_factory.Tpo -c -o ags/thread/libags_thread_la-ags_timestamp_factory.lo `test -f 'ags/thread/ags_timestamp_factory.c' || echo '$(srcdir)/'`ags/thread/ags_timestamp_factory.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp_factory.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp_factory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_timestamp_factory.c' object='ags/thread/libags_thread_la-ags_timestamp_factory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_timestamp_factory.lo `test -f 'ags/thread/ags_timestamp_factory.c' || echo '$(srcdir)/'`ags/thread/ags_timestamp_factory.c ags/thread/libags_thread_la-ags_timestamp_thread.lo: ags/thread/ags_timestamp_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_timestamp_thread.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp_thread.Tpo -c -o ags/thread/libags_thread_la-ags_timestamp_thread.lo `test -f 'ags/thread/ags_timestamp_thread.c' || echo '$(srcdir)/'`ags/thread/ags_timestamp_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp_thread.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_timestamp_thread.c' object='ags/thread/libags_thread_la-ags_timestamp_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_timestamp_thread.lo `test -f 'ags/thread/ags_timestamp_thread.c' || echo '$(srcdir)/'`ags/thread/ags_timestamp_thread.c ags/thread/libags_thread_la-ags_timestamp.lo: ags/thread/ags_timestamp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_timestamp.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp.Tpo -c -o ags/thread/libags_thread_la-ags_timestamp.lo `test -f 'ags/thread/ags_timestamp.c' || echo '$(srcdir)/'`ags/thread/ags_timestamp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_timestamp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_timestamp.c' object='ags/thread/libags_thread_la-ags_timestamp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_timestamp.lo `test -f 'ags/thread/ags_timestamp.c' || echo '$(srcdir)/'`ags/thread/ags_timestamp.c ags/thread/libags_thread_la-ags_worker_thread.lo: ags/thread/ags_worker_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/libags_thread_la-ags_worker_thread.lo -MD -MP -MF ags/thread/$(DEPDIR)/libags_thread_la-ags_worker_thread.Tpo -c -o ags/thread/libags_thread_la-ags_worker_thread.lo `test -f 'ags/thread/ags_worker_thread.c' || echo '$(srcdir)/'`ags/thread/ags_worker_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/$(DEPDIR)/libags_thread_la-ags_worker_thread.Tpo ags/thread/$(DEPDIR)/libags_thread_la-ags_worker_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/ags_worker_thread.c' object='ags/thread/libags_thread_la-ags_worker_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/libags_thread_la-ags_worker_thread.lo `test -f 'ags/thread/ags_worker_thread.c' || echo '$(srcdir)/'`ags/thread/ags_worker_thread.c ags/thread/file/libags_thread_la-ags_thread_file_xml.lo: ags/thread/file/ags_thread_file_xml.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/file/libags_thread_la-ags_thread_file_xml.lo -MD -MP -MF ags/thread/file/$(DEPDIR)/libags_thread_la-ags_thread_file_xml.Tpo -c -o ags/thread/file/libags_thread_la-ags_thread_file_xml.lo `test -f 'ags/thread/file/ags_thread_file_xml.c' || echo '$(srcdir)/'`ags/thread/file/ags_thread_file_xml.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/file/$(DEPDIR)/libags_thread_la-ags_thread_file_xml.Tpo ags/thread/file/$(DEPDIR)/libags_thread_la-ags_thread_file_xml.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/file/ags_thread_file_xml.c' object='ags/thread/file/libags_thread_la-ags_thread_file_xml.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/file/libags_thread_la-ags_thread_file_xml.lo `test -f 'ags/thread/file/ags_thread_file_xml.c' || echo '$(srcdir)/'`ags/thread/file/ags_thread_file_xml.c ags/thread/file/libags_thread_la-ags_thread_xml_serialization_factory.lo: ags/thread/file/ags_thread_xml_serialization_factory.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -MT ags/thread/file/libags_thread_la-ags_thread_xml_serialization_factory.lo -MD -MP -MF ags/thread/file/$(DEPDIR)/libags_thread_la-ags_thread_xml_serialization_factory.Tpo -c -o ags/thread/file/libags_thread_la-ags_thread_xml_serialization_factory.lo `test -f 'ags/thread/file/ags_thread_xml_serialization_factory.c' || echo '$(srcdir)/'`ags/thread/file/ags_thread_xml_serialization_factory.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/thread/file/$(DEPDIR)/libags_thread_la-ags_thread_xml_serialization_factory.Tpo ags/thread/file/$(DEPDIR)/libags_thread_la-ags_thread_xml_serialization_factory.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/thread/file/ags_thread_xml_serialization_factory.c' object='ags/thread/file/libags_thread_la-ags_thread_xml_serialization_factory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libags_thread_la_CFLAGS) $(CFLAGS) -c -o ags/thread/file/libags_thread_la-ags_thread_xml_serialization_factory.lo `test -f 'ags/thread/file/ags_thread_xml_serialization_factory.c' || echo '$(srcdir)/'`ags/thread/file/ags_thread_xml_serialization_factory.c ags/X/libgsequencer_la-ags_automation_editor.lo: ags/X/ags_automation_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_automation_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_editor.Tpo -c -o ags/X/libgsequencer_la-ags_automation_editor.lo `test -f 'ags/X/ags_automation_editor.c' || echo '$(srcdir)/'`ags/X/ags_automation_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_automation_editor.c' object='ags/X/libgsequencer_la-ags_automation_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_automation_editor.lo `test -f 'ags/X/ags_automation_editor.c' || echo '$(srcdir)/'`ags/X/ags_automation_editor.c ags/X/libgsequencer_la-ags_automation_editor_callbacks.lo: ags/X/ags_automation_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_automation_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_automation_editor_callbacks.lo `test -f 'ags/X/ags_automation_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_automation_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_automation_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_automation_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_automation_editor_callbacks.lo `test -f 'ags/X/ags_automation_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_automation_editor_callbacks.c ags/X/libgsequencer_la-ags_automation_window.lo: ags/X/ags_automation_window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_automation_window.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_window.Tpo -c -o ags/X/libgsequencer_la-ags_automation_window.lo `test -f 'ags/X/ags_automation_window.c' || echo '$(srcdir)/'`ags/X/ags_automation_window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_window.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_window.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_automation_window.c' object='ags/X/libgsequencer_la-ags_automation_window.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_automation_window.lo `test -f 'ags/X/ags_automation_window.c' || echo '$(srcdir)/'`ags/X/ags_automation_window.c ags/X/libgsequencer_la-ags_automation_window_callbacks.lo: ags/X/ags_automation_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_automation_window_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_window_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_automation_window_callbacks.lo `test -f 'ags/X/ags_automation_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_automation_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_window_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_automation_window_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_automation_window_callbacks.c' object='ags/X/libgsequencer_la-ags_automation_window_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_automation_window_callbacks.lo `test -f 'ags/X/ags_automation_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_automation_window_callbacks.c ags/X/libgsequencer_la-ags_audio_preferences.lo: ags/X/ags_audio_preferences.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_audio_preferences.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_audio_preferences.Tpo -c -o ags/X/libgsequencer_la-ags_audio_preferences.lo `test -f 'ags/X/ags_audio_preferences.c' || echo '$(srcdir)/'`ags/X/ags_audio_preferences.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_audio_preferences.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_audio_preferences.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_audio_preferences.c' object='ags/X/libgsequencer_la-ags_audio_preferences.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_audio_preferences.lo `test -f 'ags/X/ags_audio_preferences.c' || echo '$(srcdir)/'`ags/X/ags_audio_preferences.c ags/X/libgsequencer_la-ags_audio_preferences_callbacks.lo: ags/X/ags_audio_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_audio_preferences_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_audio_preferences_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_audio_preferences_callbacks.lo `test -f 'ags/X/ags_audio_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_audio_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_audio_preferences_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_audio_preferences_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_audio_preferences_callbacks.c' object='ags/X/libgsequencer_la-ags_audio_preferences_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_audio_preferences_callbacks.lo `test -f 'ags/X/ags_audio_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_audio_preferences_callbacks.c ags/X/libgsequencer_la-ags_bulk_member.lo: ags/X/ags_bulk_member.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_bulk_member.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_bulk_member.Tpo -c -o ags/X/libgsequencer_la-ags_bulk_member.lo `test -f 'ags/X/ags_bulk_member.c' || echo '$(srcdir)/'`ags/X/ags_bulk_member.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_bulk_member.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_bulk_member.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_bulk_member.c' object='ags/X/libgsequencer_la-ags_bulk_member.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_bulk_member.lo `test -f 'ags/X/ags_bulk_member.c' || echo '$(srcdir)/'`ags/X/ags_bulk_member.c ags/X/libgsequencer_la-ags_bulk_member_callbacks.lo: ags/X/ags_bulk_member_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_bulk_member_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_bulk_member_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_bulk_member_callbacks.lo `test -f 'ags/X/ags_bulk_member_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_bulk_member_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_bulk_member_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_bulk_member_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_bulk_member_callbacks.c' object='ags/X/libgsequencer_la-ags_bulk_member_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_bulk_member_callbacks.lo `test -f 'ags/X/ags_bulk_member_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_bulk_member_callbacks.c ags/X/libgsequencer_la-ags_connection_editor_callbacks.lo: ags/X/ags_connection_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_connection_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_connection_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_connection_editor_callbacks.lo `test -f 'ags/X/ags_connection_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_connection_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_connection_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_connection_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_connection_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_connection_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_connection_editor_callbacks.lo `test -f 'ags/X/ags_connection_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_connection_editor_callbacks.c ags/X/libgsequencer_la-ags_connection_editor.lo: ags/X/ags_connection_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_connection_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_connection_editor.Tpo -c -o ags/X/libgsequencer_la-ags_connection_editor.lo `test -f 'ags/X/ags_connection_editor.c' || echo '$(srcdir)/'`ags/X/ags_connection_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_connection_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_connection_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_connection_editor.c' object='ags/X/libgsequencer_la-ags_connection_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_connection_editor.lo `test -f 'ags/X/ags_connection_editor.c' || echo '$(srcdir)/'`ags/X/ags_connection_editor.c ags/X/libgsequencer_la-ags_context_menu.lo: ags/X/ags_context_menu.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_context_menu.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_context_menu.Tpo -c -o ags/X/libgsequencer_la-ags_context_menu.lo `test -f 'ags/X/ags_context_menu.c' || echo '$(srcdir)/'`ags/X/ags_context_menu.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_context_menu.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_context_menu.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_context_menu.c' object='ags/X/libgsequencer_la-ags_context_menu.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_context_menu.lo `test -f 'ags/X/ags_context_menu.c' || echo '$(srcdir)/'`ags/X/ags_context_menu.c ags/X/libgsequencer_la-ags_dssi_browser_callbacks.lo: ags/X/ags_dssi_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_dssi_browser_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_dssi_browser_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_dssi_browser_callbacks.lo `test -f 'ags/X/ags_dssi_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_dssi_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_dssi_browser_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_dssi_browser_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_dssi_browser_callbacks.c' object='ags/X/libgsequencer_la-ags_dssi_browser_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_dssi_browser_callbacks.lo `test -f 'ags/X/ags_dssi_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_dssi_browser_callbacks.c ags/X/libgsequencer_la-ags_dssi_browser.lo: ags/X/ags_dssi_browser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_dssi_browser.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_dssi_browser.Tpo -c -o ags/X/libgsequencer_la-ags_dssi_browser.lo `test -f 'ags/X/ags_dssi_browser.c' || echo '$(srcdir)/'`ags/X/ags_dssi_browser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_dssi_browser.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_dssi_browser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_dssi_browser.c' object='ags/X/libgsequencer_la-ags_dssi_browser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_dssi_browser.lo `test -f 'ags/X/ags_dssi_browser.c' || echo '$(srcdir)/'`ags/X/ags_dssi_browser.c ags/X/libgsequencer_la-ags_effect_bridge.lo: ags/X/ags_effect_bridge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_effect_bridge.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bridge.Tpo -c -o ags/X/libgsequencer_la-ags_effect_bridge.lo `test -f 'ags/X/ags_effect_bridge.c' || echo '$(srcdir)/'`ags/X/ags_effect_bridge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bridge.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bridge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_effect_bridge.c' object='ags/X/libgsequencer_la-ags_effect_bridge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_effect_bridge.lo `test -f 'ags/X/ags_effect_bridge.c' || echo '$(srcdir)/'`ags/X/ags_effect_bridge.c ags/X/libgsequencer_la-ags_effect_bridge_callbacks.lo: ags/X/ags_effect_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_effect_bridge_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bridge_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_effect_bridge_callbacks.lo `test -f 'ags/X/ags_effect_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_effect_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bridge_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bridge_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_effect_bridge_callbacks.c' object='ags/X/libgsequencer_la-ags_effect_bridge_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_effect_bridge_callbacks.lo `test -f 'ags/X/ags_effect_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_effect_bridge_callbacks.c ags/X/libgsequencer_la-ags_effect_bulk.lo: ags/X/ags_effect_bulk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_effect_bulk.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bulk.Tpo -c -o ags/X/libgsequencer_la-ags_effect_bulk.lo `test -f 'ags/X/ags_effect_bulk.c' || echo '$(srcdir)/'`ags/X/ags_effect_bulk.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bulk.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bulk.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_effect_bulk.c' object='ags/X/libgsequencer_la-ags_effect_bulk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_effect_bulk.lo `test -f 'ags/X/ags_effect_bulk.c' || echo '$(srcdir)/'`ags/X/ags_effect_bulk.c ags/X/libgsequencer_la-ags_effect_bulk_callbacks.lo: ags/X/ags_effect_bulk_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_effect_bulk_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bulk_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_effect_bulk_callbacks.lo `test -f 'ags/X/ags_effect_bulk_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_effect_bulk_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bulk_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_bulk_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_effect_bulk_callbacks.c' object='ags/X/libgsequencer_la-ags_effect_bulk_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_effect_bulk_callbacks.lo `test -f 'ags/X/ags_effect_bulk_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_effect_bulk_callbacks.c ags/X/libgsequencer_la-ags_effect_line.lo: ags/X/ags_effect_line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_effect_line.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_line.Tpo -c -o ags/X/libgsequencer_la-ags_effect_line.lo `test -f 'ags/X/ags_effect_line.c' || echo '$(srcdir)/'`ags/X/ags_effect_line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_line.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_effect_line.c' object='ags/X/libgsequencer_la-ags_effect_line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_effect_line.lo `test -f 'ags/X/ags_effect_line.c' || echo '$(srcdir)/'`ags/X/ags_effect_line.c ags/X/libgsequencer_la-ags_effect_line_callbacks.lo: ags/X/ags_effect_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_effect_line_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_line_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_effect_line_callbacks.lo `test -f 'ags/X/ags_effect_line_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_effect_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_line_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_line_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_effect_line_callbacks.c' object='ags/X/libgsequencer_la-ags_effect_line_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_effect_line_callbacks.lo `test -f 'ags/X/ags_effect_line_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_effect_line_callbacks.c ags/X/libgsequencer_la-ags_effect_pad.lo: ags/X/ags_effect_pad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_effect_pad.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_pad.Tpo -c -o ags/X/libgsequencer_la-ags_effect_pad.lo `test -f 'ags/X/ags_effect_pad.c' || echo '$(srcdir)/'`ags/X/ags_effect_pad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_pad.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_pad.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_effect_pad.c' object='ags/X/libgsequencer_la-ags_effect_pad.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_effect_pad.lo `test -f 'ags/X/ags_effect_pad.c' || echo '$(srcdir)/'`ags/X/ags_effect_pad.c ags/X/libgsequencer_la-ags_effect_pad_callbacks.lo: ags/X/ags_effect_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_effect_pad_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_pad_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_effect_pad_callbacks.lo `test -f 'ags/X/ags_effect_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_effect_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_pad_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_pad_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_effect_pad_callbacks.c' object='ags/X/libgsequencer_la-ags_effect_pad_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_effect_pad_callbacks.lo `test -f 'ags/X/ags_effect_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_effect_pad_callbacks.c ags/X/libgsequencer_la-ags_effect_separator.lo: ags/X/ags_effect_separator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_effect_separator.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_separator.Tpo -c -o ags/X/libgsequencer_la-ags_effect_separator.lo `test -f 'ags/X/ags_effect_separator.c' || echo '$(srcdir)/'`ags/X/ags_effect_separator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_separator.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_effect_separator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_effect_separator.c' object='ags/X/libgsequencer_la-ags_effect_separator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_effect_separator.lo `test -f 'ags/X/ags_effect_separator.c' || echo '$(srcdir)/'`ags/X/ags_effect_separator.c ags/X/libgsequencer_la-ags_export_soundcard.lo: ags/X/ags_export_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_export_soundcard.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_export_soundcard.Tpo -c -o ags/X/libgsequencer_la-ags_export_soundcard.lo `test -f 'ags/X/ags_export_soundcard.c' || echo '$(srcdir)/'`ags/X/ags_export_soundcard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_export_soundcard.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_export_soundcard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_export_soundcard.c' object='ags/X/libgsequencer_la-ags_export_soundcard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_export_soundcard.lo `test -f 'ags/X/ags_export_soundcard.c' || echo '$(srcdir)/'`ags/X/ags_export_soundcard.c ags/X/libgsequencer_la-ags_export_soundcard_callbacks.lo: ags/X/ags_export_soundcard_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_export_soundcard_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_export_soundcard_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_export_soundcard_callbacks.lo `test -f 'ags/X/ags_export_soundcard_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_export_soundcard_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_export_soundcard_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_export_soundcard_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_export_soundcard_callbacks.c' object='ags/X/libgsequencer_la-ags_export_soundcard_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_export_soundcard_callbacks.lo `test -f 'ags/X/ags_export_soundcard_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_export_soundcard_callbacks.c ags/X/libgsequencer_la-ags_export_window.lo: ags/X/ags_export_window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_export_window.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_export_window.Tpo -c -o ags/X/libgsequencer_la-ags_export_window.lo `test -f 'ags/X/ags_export_window.c' || echo '$(srcdir)/'`ags/X/ags_export_window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_export_window.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_export_window.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_export_window.c' object='ags/X/libgsequencer_la-ags_export_window.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_export_window.lo `test -f 'ags/X/ags_export_window.c' || echo '$(srcdir)/'`ags/X/ags_export_window.c ags/X/libgsequencer_la-ags_export_window_callbacks.lo: ags/X/ags_export_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_export_window_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_export_window_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_export_window_callbacks.lo `test -f 'ags/X/ags_export_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_export_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_export_window_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_export_window_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_export_window_callbacks.c' object='ags/X/libgsequencer_la-ags_export_window_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_export_window_callbacks.lo `test -f 'ags/X/ags_export_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_export_window_callbacks.c ags/X/libgsequencer_la-ags_generic_preferences.lo: ags/X/ags_generic_preferences.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_generic_preferences.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_generic_preferences.Tpo -c -o ags/X/libgsequencer_la-ags_generic_preferences.lo `test -f 'ags/X/ags_generic_preferences.c' || echo '$(srcdir)/'`ags/X/ags_generic_preferences.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_generic_preferences.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_generic_preferences.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_generic_preferences.c' object='ags/X/libgsequencer_la-ags_generic_preferences.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_generic_preferences.lo `test -f 'ags/X/ags_generic_preferences.c' || echo '$(srcdir)/'`ags/X/ags_generic_preferences.c ags/X/libgsequencer_la-ags_generic_preferences_callbacks.lo: ags/X/ags_generic_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_generic_preferences_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_generic_preferences_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_generic_preferences_callbacks.lo `test -f 'ags/X/ags_generic_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_generic_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_generic_preferences_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_generic_preferences_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_generic_preferences_callbacks.c' object='ags/X/libgsequencer_la-ags_generic_preferences_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_generic_preferences_callbacks.lo `test -f 'ags/X/ags_generic_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_generic_preferences_callbacks.c ags/X/libgsequencer_la-ags_history_browser.lo: ags/X/ags_history_browser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_history_browser.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_history_browser.Tpo -c -o ags/X/libgsequencer_la-ags_history_browser.lo `test -f 'ags/X/ags_history_browser.c' || echo '$(srcdir)/'`ags/X/ags_history_browser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_history_browser.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_history_browser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_history_browser.c' object='ags/X/libgsequencer_la-ags_history_browser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_history_browser.lo `test -f 'ags/X/ags_history_browser.c' || echo '$(srcdir)/'`ags/X/ags_history_browser.c ags/X/libgsequencer_la-ags_history_browser_callbacks.lo: ags/X/ags_history_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_history_browser_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_history_browser_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_history_browser_callbacks.lo `test -f 'ags/X/ags_history_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_history_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_history_browser_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_history_browser_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_history_browser_callbacks.c' object='ags/X/libgsequencer_la-ags_history_browser_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_history_browser_callbacks.lo `test -f 'ags/X/ags_history_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_history_browser_callbacks.c ags/X/libgsequencer_la-ags_ladspa_browser.lo: ags/X/ags_ladspa_browser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_ladspa_browser.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_ladspa_browser.Tpo -c -o ags/X/libgsequencer_la-ags_ladspa_browser.lo `test -f 'ags/X/ags_ladspa_browser.c' || echo '$(srcdir)/'`ags/X/ags_ladspa_browser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_ladspa_browser.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_ladspa_browser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_ladspa_browser.c' object='ags/X/libgsequencer_la-ags_ladspa_browser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_ladspa_browser.lo `test -f 'ags/X/ags_ladspa_browser.c' || echo '$(srcdir)/'`ags/X/ags_ladspa_browser.c ags/X/libgsequencer_la-ags_ladspa_browser_callbacks.lo: ags/X/ags_ladspa_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_ladspa_browser_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_ladspa_browser_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_ladspa_browser_callbacks.lo `test -f 'ags/X/ags_ladspa_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_ladspa_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_ladspa_browser_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_ladspa_browser_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_ladspa_browser_callbacks.c' object='ags/X/libgsequencer_la-ags_ladspa_browser_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_ladspa_browser_callbacks.lo `test -f 'ags/X/ags_ladspa_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_ladspa_browser_callbacks.c ags/X/libgsequencer_la-ags_lv2_browser.lo: ags/X/ags_lv2_browser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_lv2_browser.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_lv2_browser.Tpo -c -o ags/X/libgsequencer_la-ags_lv2_browser.lo `test -f 'ags/X/ags_lv2_browser.c' || echo '$(srcdir)/'`ags/X/ags_lv2_browser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_lv2_browser.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_lv2_browser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_lv2_browser.c' object='ags/X/libgsequencer_la-ags_lv2_browser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_lv2_browser.lo `test -f 'ags/X/ags_lv2_browser.c' || echo '$(srcdir)/'`ags/X/ags_lv2_browser.c ags/X/libgsequencer_la-ags_lv2_browser_callbacks.lo: ags/X/ags_lv2_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_lv2_browser_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_lv2_browser_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_lv2_browser_callbacks.lo `test -f 'ags/X/ags_lv2_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_lv2_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_lv2_browser_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_lv2_browser_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_lv2_browser_callbacks.c' object='ags/X/libgsequencer_la-ags_lv2_browser_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_lv2_browser_callbacks.lo `test -f 'ags/X/ags_lv2_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_lv2_browser_callbacks.c ags/X/libgsequencer_la-ags_line.lo: ags/X/ags_line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_line.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_line.Tpo -c -o ags/X/libgsequencer_la-ags_line.lo `test -f 'ags/X/ags_line.c' || echo '$(srcdir)/'`ags/X/ags_line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_line.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_line.c' object='ags/X/libgsequencer_la-ags_line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_line.lo `test -f 'ags/X/ags_line.c' || echo '$(srcdir)/'`ags/X/ags_line.c ags/X/libgsequencer_la-ags_line_callbacks.lo: ags/X/ags_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_line_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_line_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_line_callbacks.lo `test -f 'ags/X/ags_line_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_line_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_line_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_line_callbacks.c' object='ags/X/libgsequencer_la-ags_line_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_line_callbacks.lo `test -f 'ags/X/ags_line_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_line_callbacks.c ags/X/libgsequencer_la-ags_line_editor.lo: ags/X/ags_line_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_line_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_line_editor.Tpo -c -o ags/X/libgsequencer_la-ags_line_editor.lo `test -f 'ags/X/ags_line_editor.c' || echo '$(srcdir)/'`ags/X/ags_line_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_line_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_line_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_line_editor.c' object='ags/X/libgsequencer_la-ags_line_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_line_editor.lo `test -f 'ags/X/ags_line_editor.c' || echo '$(srcdir)/'`ags/X/ags_line_editor.c ags/X/libgsequencer_la-ags_line_editor_callbacks.lo: ags/X/ags_line_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_line_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_line_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_line_editor_callbacks.lo `test -f 'ags/X/ags_line_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_line_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_line_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_line_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_line_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_line_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_line_editor_callbacks.lo `test -f 'ags/X/ags_line_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_line_editor_callbacks.c ags/X/libgsequencer_la-ags_line_member.lo: ags/X/ags_line_member.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_line_member.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member.Tpo -c -o ags/X/libgsequencer_la-ags_line_member.lo `test -f 'ags/X/ags_line_member.c' || echo '$(srcdir)/'`ags/X/ags_line_member.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_line_member.c' object='ags/X/libgsequencer_la-ags_line_member.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_line_member.lo `test -f 'ags/X/ags_line_member.c' || echo '$(srcdir)/'`ags/X/ags_line_member.c ags/X/libgsequencer_la-ags_line_member_callbacks.lo: ags/X/ags_line_member_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_line_member_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_line_member_callbacks.lo `test -f 'ags/X/ags_line_member_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_line_member_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_line_member_callbacks.c' object='ags/X/libgsequencer_la-ags_line_member_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_line_member_callbacks.lo `test -f 'ags/X/ags_line_member_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_line_member_callbacks.c ags/X/libgsequencer_la-ags_line_member_editor.lo: ags/X/ags_line_member_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_line_member_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_editor.Tpo -c -o ags/X/libgsequencer_la-ags_line_member_editor.lo `test -f 'ags/X/ags_line_member_editor.c' || echo '$(srcdir)/'`ags/X/ags_line_member_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_line_member_editor.c' object='ags/X/libgsequencer_la-ags_line_member_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_line_member_editor.lo `test -f 'ags/X/ags_line_member_editor.c' || echo '$(srcdir)/'`ags/X/ags_line_member_editor.c ags/X/libgsequencer_la-ags_line_member_editor_callbacks.lo: ags/X/ags_line_member_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_line_member_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_line_member_editor_callbacks.lo `test -f 'ags/X/ags_line_member_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_line_member_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_line_member_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_line_member_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_line_member_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_line_member_editor_callbacks.lo `test -f 'ags/X/ags_line_member_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_line_member_editor_callbacks.c ags/X/libgsequencer_la-ags_link_collection_editor.lo: ags/X/ags_link_collection_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_link_collection_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_link_collection_editor.Tpo -c -o ags/X/libgsequencer_la-ags_link_collection_editor.lo `test -f 'ags/X/ags_link_collection_editor.c' || echo '$(srcdir)/'`ags/X/ags_link_collection_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_link_collection_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_link_collection_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_link_collection_editor.c' object='ags/X/libgsequencer_la-ags_link_collection_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_link_collection_editor.lo `test -f 'ags/X/ags_link_collection_editor.c' || echo '$(srcdir)/'`ags/X/ags_link_collection_editor.c ags/X/libgsequencer_la-ags_link_collection_editor_callbacks.lo: ags/X/ags_link_collection_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_link_collection_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_link_collection_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_link_collection_editor_callbacks.lo `test -f 'ags/X/ags_link_collection_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_link_collection_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_link_collection_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_link_collection_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_link_collection_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_link_collection_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_link_collection_editor_callbacks.lo `test -f 'ags/X/ags_link_collection_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_link_collection_editor_callbacks.c ags/X/libgsequencer_la-ags_link_editor.lo: ags/X/ags_link_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_link_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_link_editor.Tpo -c -o ags/X/libgsequencer_la-ags_link_editor.lo `test -f 'ags/X/ags_link_editor.c' || echo '$(srcdir)/'`ags/X/ags_link_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_link_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_link_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_link_editor.c' object='ags/X/libgsequencer_la-ags_link_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_link_editor.lo `test -f 'ags/X/ags_link_editor.c' || echo '$(srcdir)/'`ags/X/ags_link_editor.c ags/X/libgsequencer_la-ags_link_editor_callbacks.lo: ags/X/ags_link_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_link_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_link_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_link_editor_callbacks.lo `test -f 'ags/X/ags_link_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_link_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_link_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_link_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_link_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_link_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_link_editor_callbacks.lo `test -f 'ags/X/ags_link_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_link_editor_callbacks.c ags/X/libgsequencer_la-ags_listing_editor.lo: ags/X/ags_listing_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_listing_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_listing_editor.Tpo -c -o ags/X/libgsequencer_la-ags_listing_editor.lo `test -f 'ags/X/ags_listing_editor.c' || echo '$(srcdir)/'`ags/X/ags_listing_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_listing_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_listing_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_listing_editor.c' object='ags/X/libgsequencer_la-ags_listing_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_listing_editor.lo `test -f 'ags/X/ags_listing_editor.c' || echo '$(srcdir)/'`ags/X/ags_listing_editor.c ags/X/libgsequencer_la-ags_listing_editor_callbacks.lo: ags/X/ags_listing_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_listing_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_listing_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_listing_editor_callbacks.lo `test -f 'ags/X/ags_listing_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_listing_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_listing_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_listing_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_listing_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_listing_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_listing_editor_callbacks.lo `test -f 'ags/X/ags_listing_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_listing_editor_callbacks.c ags/X/libgsequencer_la-ags_machine.lo: ags/X/ags_machine.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_machine.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_machine.Tpo -c -o ags/X/libgsequencer_la-ags_machine.lo `test -f 'ags/X/ags_machine.c' || echo '$(srcdir)/'`ags/X/ags_machine.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_machine.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_machine.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_machine.c' object='ags/X/libgsequencer_la-ags_machine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_machine.lo `test -f 'ags/X/ags_machine.c' || echo '$(srcdir)/'`ags/X/ags_machine.c ags/X/libgsequencer_la-ags_machine_callbacks.lo: ags/X/ags_machine_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_machine_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_machine_callbacks.lo `test -f 'ags/X/ags_machine_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_machine_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_machine_callbacks.c' object='ags/X/libgsequencer_la-ags_machine_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_machine_callbacks.lo `test -f 'ags/X/ags_machine_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_machine_callbacks.c ags/X/libgsequencer_la-ags_machine_editor.lo: ags/X/ags_machine_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_machine_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_editor.Tpo -c -o ags/X/libgsequencer_la-ags_machine_editor.lo `test -f 'ags/X/ags_machine_editor.c' || echo '$(srcdir)/'`ags/X/ags_machine_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_machine_editor.c' object='ags/X/libgsequencer_la-ags_machine_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_machine_editor.lo `test -f 'ags/X/ags_machine_editor.c' || echo '$(srcdir)/'`ags/X/ags_machine_editor.c ags/X/libgsequencer_la-ags_machine_editor_callbacks.lo: ags/X/ags_machine_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_machine_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_machine_editor_callbacks.lo `test -f 'ags/X/ags_machine_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_machine_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_machine_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_machine_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_machine_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_machine_editor_callbacks.lo `test -f 'ags/X/ags_machine_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_machine_editor_callbacks.c ags/X/libgsequencer_la-ags_menu_action_callbacks.lo: ags/X/ags_menu_action_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_menu_action_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_menu_action_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_menu_action_callbacks.lo `test -f 'ags/X/ags_menu_action_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_menu_action_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_menu_action_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_menu_action_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_menu_action_callbacks.c' object='ags/X/libgsequencer_la-ags_menu_action_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_menu_action_callbacks.lo `test -f 'ags/X/ags_menu_action_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_menu_action_callbacks.c ags/X/libgsequencer_la-ags_menu_bar.lo: ags/X/ags_menu_bar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_menu_bar.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_menu_bar.Tpo -c -o ags/X/libgsequencer_la-ags_menu_bar.lo `test -f 'ags/X/ags_menu_bar.c' || echo '$(srcdir)/'`ags/X/ags_menu_bar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_menu_bar.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_menu_bar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_menu_bar.c' object='ags/X/libgsequencer_la-ags_menu_bar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_menu_bar.lo `test -f 'ags/X/ags_menu_bar.c' || echo '$(srcdir)/'`ags/X/ags_menu_bar.c ags/X/libgsequencer_la-ags_midi_dialog.lo: ags/X/ags_midi_dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_midi_dialog.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_dialog.Tpo -c -o ags/X/libgsequencer_la-ags_midi_dialog.lo `test -f 'ags/X/ags_midi_dialog.c' || echo '$(srcdir)/'`ags/X/ags_midi_dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_dialog.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_midi_dialog.c' object='ags/X/libgsequencer_la-ags_midi_dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_midi_dialog.lo `test -f 'ags/X/ags_midi_dialog.c' || echo '$(srcdir)/'`ags/X/ags_midi_dialog.c ags/X/libgsequencer_la-ags_midi_dialog_callbacks.lo: ags/X/ags_midi_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_midi_dialog_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_dialog_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_midi_dialog_callbacks.lo `test -f 'ags/X/ags_midi_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_midi_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_dialog_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_dialog_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_midi_dialog_callbacks.c' object='ags/X/libgsequencer_la-ags_midi_dialog_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_midi_dialog_callbacks.lo `test -f 'ags/X/ags_midi_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_midi_dialog_callbacks.c ags/X/libgsequencer_la-ags_midi_preferences.lo: ags/X/ags_midi_preferences.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_midi_preferences.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_preferences.Tpo -c -o ags/X/libgsequencer_la-ags_midi_preferences.lo `test -f 'ags/X/ags_midi_preferences.c' || echo '$(srcdir)/'`ags/X/ags_midi_preferences.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_preferences.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_preferences.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_midi_preferences.c' object='ags/X/libgsequencer_la-ags_midi_preferences.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_midi_preferences.lo `test -f 'ags/X/ags_midi_preferences.c' || echo '$(srcdir)/'`ags/X/ags_midi_preferences.c ags/X/libgsequencer_la-ags_midi_preferences_callbacks.lo: ags/X/ags_midi_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_midi_preferences_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_preferences_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_midi_preferences_callbacks.lo `test -f 'ags/X/ags_midi_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_midi_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_preferences_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_midi_preferences_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_midi_preferences_callbacks.c' object='ags/X/libgsequencer_la-ags_midi_preferences_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_midi_preferences_callbacks.lo `test -f 'ags/X/ags_midi_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_midi_preferences_callbacks.c ags/X/libgsequencer_la-ags_navigation.lo: ags/X/ags_navigation.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_navigation.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_navigation.Tpo -c -o ags/X/libgsequencer_la-ags_navigation.lo `test -f 'ags/X/ags_navigation.c' || echo '$(srcdir)/'`ags/X/ags_navigation.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_navigation.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_navigation.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_navigation.c' object='ags/X/libgsequencer_la-ags_navigation.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_navigation.lo `test -f 'ags/X/ags_navigation.c' || echo '$(srcdir)/'`ags/X/ags_navigation.c ags/X/libgsequencer_la-ags_navigation_callbacks.lo: ags/X/ags_navigation_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_navigation_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_navigation_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_navigation_callbacks.lo `test -f 'ags/X/ags_navigation_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_navigation_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_navigation_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_navigation_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_navigation_callbacks.c' object='ags/X/libgsequencer_la-ags_navigation_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_navigation_callbacks.lo `test -f 'ags/X/ags_navigation_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_navigation_callbacks.c ags/X/libgsequencer_la-ags_notation_editor.lo: ags/X/ags_notation_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_notation_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_notation_editor.Tpo -c -o ags/X/libgsequencer_la-ags_notation_editor.lo `test -f 'ags/X/ags_notation_editor.c' || echo '$(srcdir)/'`ags/X/ags_notation_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_notation_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_notation_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_notation_editor.c' object='ags/X/libgsequencer_la-ags_notation_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_notation_editor.lo `test -f 'ags/X/ags_notation_editor.c' || echo '$(srcdir)/'`ags/X/ags_notation_editor.c ags/X/libgsequencer_la-ags_notation_editor_callbacks.lo: ags/X/ags_notation_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_notation_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_notation_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_notation_editor_callbacks.lo `test -f 'ags/X/ags_notation_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_notation_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_notation_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_notation_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_notation_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_notation_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_notation_editor_callbacks.lo `test -f 'ags/X/ags_notation_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_notation_editor_callbacks.c ags/X/libgsequencer_la-ags_output_collection_editor_callbacks.lo: ags/X/ags_output_collection_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_output_collection_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_output_collection_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_output_collection_editor_callbacks.lo `test -f 'ags/X/ags_output_collection_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_output_collection_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_output_collection_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_output_collection_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_output_collection_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_output_collection_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_output_collection_editor_callbacks.lo `test -f 'ags/X/ags_output_collection_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_output_collection_editor_callbacks.c ags/X/libgsequencer_la-ags_output_collection_editor.lo: ags/X/ags_output_collection_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_output_collection_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_output_collection_editor.Tpo -c -o ags/X/libgsequencer_la-ags_output_collection_editor.lo `test -f 'ags/X/ags_output_collection_editor.c' || echo '$(srcdir)/'`ags/X/ags_output_collection_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_output_collection_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_output_collection_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_output_collection_editor.c' object='ags/X/libgsequencer_la-ags_output_collection_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_output_collection_editor.lo `test -f 'ags/X/ags_output_collection_editor.c' || echo '$(srcdir)/'`ags/X/ags_output_collection_editor.c ags/X/libgsequencer_la-ags_output_editor_callbacks.lo: ags/X/ags_output_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_output_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_output_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_output_editor_callbacks.lo `test -f 'ags/X/ags_output_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_output_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_output_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_output_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_output_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_output_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_output_editor_callbacks.lo `test -f 'ags/X/ags_output_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_output_editor_callbacks.c ags/X/libgsequencer_la-ags_output_editor.lo: ags/X/ags_output_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_output_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_output_editor.Tpo -c -o ags/X/libgsequencer_la-ags_output_editor.lo `test -f 'ags/X/ags_output_editor.c' || echo '$(srcdir)/'`ags/X/ags_output_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_output_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_output_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_output_editor.c' object='ags/X/libgsequencer_la-ags_output_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_output_editor.lo `test -f 'ags/X/ags_output_editor.c' || echo '$(srcdir)/'`ags/X/ags_output_editor.c ags/X/libgsequencer_la-ags_output_listing_editor_callbacks.lo: ags/X/ags_output_listing_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_output_listing_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_output_listing_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_output_listing_editor_callbacks.lo `test -f 'ags/X/ags_output_listing_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_output_listing_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_output_listing_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_output_listing_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_output_listing_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_output_listing_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_output_listing_editor_callbacks.lo `test -f 'ags/X/ags_output_listing_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_output_listing_editor_callbacks.c ags/X/libgsequencer_la-ags_output_listing_editor.lo: ags/X/ags_output_listing_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_output_listing_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_output_listing_editor.Tpo -c -o ags/X/libgsequencer_la-ags_output_listing_editor.lo `test -f 'ags/X/ags_output_listing_editor.c' || echo '$(srcdir)/'`ags/X/ags_output_listing_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_output_listing_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_output_listing_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_output_listing_editor.c' object='ags/X/libgsequencer_la-ags_output_listing_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_output_listing_editor.lo `test -f 'ags/X/ags_output_listing_editor.c' || echo '$(srcdir)/'`ags/X/ags_output_listing_editor.c ags/X/libgsequencer_la-ags_pad.lo: ags/X/ags_pad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_pad.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_pad.Tpo -c -o ags/X/libgsequencer_la-ags_pad.lo `test -f 'ags/X/ags_pad.c' || echo '$(srcdir)/'`ags/X/ags_pad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_pad.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_pad.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_pad.c' object='ags/X/libgsequencer_la-ags_pad.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_pad.lo `test -f 'ags/X/ags_pad.c' || echo '$(srcdir)/'`ags/X/ags_pad.c ags/X/libgsequencer_la-ags_pad_callbacks.lo: ags/X/ags_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_pad_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_pad_callbacks.lo `test -f 'ags/X/ags_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_pad_callbacks.c' object='ags/X/libgsequencer_la-ags_pad_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_pad_callbacks.lo `test -f 'ags/X/ags_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_pad_callbacks.c ags/X/libgsequencer_la-ags_pad_editor.lo: ags/X/ags_pad_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_pad_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_editor.Tpo -c -o ags/X/libgsequencer_la-ags_pad_editor.lo `test -f 'ags/X/ags_pad_editor.c' || echo '$(srcdir)/'`ags/X/ags_pad_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_pad_editor.c' object='ags/X/libgsequencer_la-ags_pad_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_pad_editor.lo `test -f 'ags/X/ags_pad_editor.c' || echo '$(srcdir)/'`ags/X/ags_pad_editor.c ags/X/libgsequencer_la-ags_pad_editor_callbacks.lo: ags/X/ags_pad_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_pad_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_pad_editor_callbacks.lo `test -f 'ags/X/ags_pad_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_pad_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_pad_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_pad_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_pad_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_pad_editor_callbacks.lo `test -f 'ags/X/ags_pad_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_pad_editor_callbacks.c ags/X/libgsequencer_la-ags_performance_preferences.lo: ags/X/ags_performance_preferences.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_performance_preferences.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_performance_preferences.Tpo -c -o ags/X/libgsequencer_la-ags_performance_preferences.lo `test -f 'ags/X/ags_performance_preferences.c' || echo '$(srcdir)/'`ags/X/ags_performance_preferences.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_performance_preferences.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_performance_preferences.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_performance_preferences.c' object='ags/X/libgsequencer_la-ags_performance_preferences.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_performance_preferences.lo `test -f 'ags/X/ags_performance_preferences.c' || echo '$(srcdir)/'`ags/X/ags_performance_preferences.c ags/X/libgsequencer_la-ags_performance_preferences_callbacks.lo: ags/X/ags_performance_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_performance_preferences_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_performance_preferences_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_performance_preferences_callbacks.lo `test -f 'ags/X/ags_performance_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_performance_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_performance_preferences_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_performance_preferences_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_performance_preferences_callbacks.c' object='ags/X/libgsequencer_la-ags_performance_preferences_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_performance_preferences_callbacks.lo `test -f 'ags/X/ags_performance_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_performance_preferences_callbacks.c ags/X/libgsequencer_la-ags_playback_window.lo: ags/X/ags_playback_window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_playback_window.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_playback_window.Tpo -c -o ags/X/libgsequencer_la-ags_playback_window.lo `test -f 'ags/X/ags_playback_window.c' || echo '$(srcdir)/'`ags/X/ags_playback_window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_playback_window.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_playback_window.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_playback_window.c' object='ags/X/libgsequencer_la-ags_playback_window.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_playback_window.lo `test -f 'ags/X/ags_playback_window.c' || echo '$(srcdir)/'`ags/X/ags_playback_window.c ags/X/libgsequencer_la-ags_playback_window_callbacks.lo: ags/X/ags_playback_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_playback_window_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_playback_window_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_playback_window_callbacks.lo `test -f 'ags/X/ags_playback_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_playback_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_playback_window_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_playback_window_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_playback_window_callbacks.c' object='ags/X/libgsequencer_la-ags_playback_window_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_playback_window_callbacks.lo `test -f 'ags/X/ags_playback_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_playback_window_callbacks.c ags/X/libgsequencer_la-ags_plugin_browser.lo: ags/X/ags_plugin_browser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_plugin_browser.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_browser.Tpo -c -o ags/X/libgsequencer_la-ags_plugin_browser.lo `test -f 'ags/X/ags_plugin_browser.c' || echo '$(srcdir)/'`ags/X/ags_plugin_browser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_browser.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_browser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_plugin_browser.c' object='ags/X/libgsequencer_la-ags_plugin_browser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_plugin_browser.lo `test -f 'ags/X/ags_plugin_browser.c' || echo '$(srcdir)/'`ags/X/ags_plugin_browser.c ags/X/libgsequencer_la-ags_plugin_browser_callbacks.lo: ags/X/ags_plugin_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_plugin_browser_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_browser_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_plugin_browser_callbacks.lo `test -f 'ags/X/ags_plugin_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_plugin_browser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_browser_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_browser_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_plugin_browser_callbacks.c' object='ags/X/libgsequencer_la-ags_plugin_browser_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_plugin_browser_callbacks.lo `test -f 'ags/X/ags_plugin_browser_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_plugin_browser_callbacks.c ags/X/libgsequencer_la-ags_plugin_preferences.lo: ags/X/ags_plugin_preferences.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_plugin_preferences.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_preferences.Tpo -c -o ags/X/libgsequencer_la-ags_plugin_preferences.lo `test -f 'ags/X/ags_plugin_preferences.c' || echo '$(srcdir)/'`ags/X/ags_plugin_preferences.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_preferences.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_preferences.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_plugin_preferences.c' object='ags/X/libgsequencer_la-ags_plugin_preferences.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_plugin_preferences.lo `test -f 'ags/X/ags_plugin_preferences.c' || echo '$(srcdir)/'`ags/X/ags_plugin_preferences.c ags/X/libgsequencer_la-ags_plugin_preferences_callbacks.lo: ags/X/ags_plugin_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_plugin_preferences_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_preferences_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_plugin_preferences_callbacks.lo `test -f 'ags/X/ags_plugin_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_plugin_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_preferences_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_plugin_preferences_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_plugin_preferences_callbacks.c' object='ags/X/libgsequencer_la-ags_plugin_preferences_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_plugin_preferences_callbacks.lo `test -f 'ags/X/ags_plugin_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_plugin_preferences_callbacks.c ags/X/libgsequencer_la-ags_preferences.lo: ags/X/ags_preferences.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_preferences.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_preferences.Tpo -c -o ags/X/libgsequencer_la-ags_preferences.lo `test -f 'ags/X/ags_preferences.c' || echo '$(srcdir)/'`ags/X/ags_preferences.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_preferences.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_preferences.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_preferences.c' object='ags/X/libgsequencer_la-ags_preferences.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_preferences.lo `test -f 'ags/X/ags_preferences.c' || echo '$(srcdir)/'`ags/X/ags_preferences.c ags/X/libgsequencer_la-ags_preferences_callbacks.lo: ags/X/ags_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_preferences_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_preferences_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_preferences_callbacks.lo `test -f 'ags/X/ags_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_preferences_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_preferences_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_preferences_callbacks.c' object='ags/X/libgsequencer_la-ags_preferences_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_preferences_callbacks.lo `test -f 'ags/X/ags_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_preferences_callbacks.c ags/X/libgsequencer_la-ags_property_collection_editor.lo: ags/X/ags_property_collection_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_property_collection_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_property_collection_editor.Tpo -c -o ags/X/libgsequencer_la-ags_property_collection_editor.lo `test -f 'ags/X/ags_property_collection_editor.c' || echo '$(srcdir)/'`ags/X/ags_property_collection_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_property_collection_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_property_collection_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_property_collection_editor.c' object='ags/X/libgsequencer_la-ags_property_collection_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_property_collection_editor.lo `test -f 'ags/X/ags_property_collection_editor.c' || echo '$(srcdir)/'`ags/X/ags_property_collection_editor.c ags/X/libgsequencer_la-ags_property_collection_editor_callbacks.lo: ags/X/ags_property_collection_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_property_collection_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_property_collection_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_property_collection_editor_callbacks.lo `test -f 'ags/X/ags_property_collection_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_property_collection_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_property_collection_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_property_collection_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_property_collection_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_property_collection_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_property_collection_editor_callbacks.lo `test -f 'ags/X/ags_property_collection_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_property_collection_editor_callbacks.c ags/X/libgsequencer_la-ags_property_editor.lo: ags/X/ags_property_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_property_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_property_editor.Tpo -c -o ags/X/libgsequencer_la-ags_property_editor.lo `test -f 'ags/X/ags_property_editor.c' || echo '$(srcdir)/'`ags/X/ags_property_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_property_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_property_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_property_editor.c' object='ags/X/libgsequencer_la-ags_property_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_property_editor.lo `test -f 'ags/X/ags_property_editor.c' || echo '$(srcdir)/'`ags/X/ags_property_editor.c ags/X/libgsequencer_la-ags_property_editor_callbacks.lo: ags/X/ags_property_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_property_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_property_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_property_editor_callbacks.lo `test -f 'ags/X/ags_property_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_property_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_property_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_property_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_property_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_property_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_property_editor_callbacks.lo `test -f 'ags/X/ags_property_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_property_editor_callbacks.c ags/X/libgsequencer_la-ags_property_listing_editor.lo: ags/X/ags_property_listing_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_property_listing_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_property_listing_editor.Tpo -c -o ags/X/libgsequencer_la-ags_property_listing_editor.lo `test -f 'ags/X/ags_property_listing_editor.c' || echo '$(srcdir)/'`ags/X/ags_property_listing_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_property_listing_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_property_listing_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_property_listing_editor.c' object='ags/X/libgsequencer_la-ags_property_listing_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_property_listing_editor.lo `test -f 'ags/X/ags_property_listing_editor.c' || echo '$(srcdir)/'`ags/X/ags_property_listing_editor.c ags/X/libgsequencer_la-ags_resize_editor.lo: ags/X/ags_resize_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_resize_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_resize_editor.Tpo -c -o ags/X/libgsequencer_la-ags_resize_editor.lo `test -f 'ags/X/ags_resize_editor.c' || echo '$(srcdir)/'`ags/X/ags_resize_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_resize_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_resize_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_resize_editor.c' object='ags/X/libgsequencer_la-ags_resize_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_resize_editor.lo `test -f 'ags/X/ags_resize_editor.c' || echo '$(srcdir)/'`ags/X/ags_resize_editor.c ags/X/libgsequencer_la-ags_sequencer_editor_callbacks.lo: ags/X/ags_sequencer_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_sequencer_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_sequencer_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_sequencer_editor_callbacks.lo `test -f 'ags/X/ags_sequencer_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_sequencer_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_sequencer_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_sequencer_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_sequencer_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_sequencer_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_sequencer_editor_callbacks.lo `test -f 'ags/X/ags_sequencer_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_sequencer_editor_callbacks.c ags/X/libgsequencer_la-ags_sequencer_editor.lo: ags/X/ags_sequencer_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_sequencer_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_sequencer_editor.Tpo -c -o ags/X/libgsequencer_la-ags_sequencer_editor.lo `test -f 'ags/X/ags_sequencer_editor.c' || echo '$(srcdir)/'`ags/X/ags_sequencer_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_sequencer_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_sequencer_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_sequencer_editor.c' object='ags/X/libgsequencer_la-ags_sequencer_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_sequencer_editor.lo `test -f 'ags/X/ags_sequencer_editor.c' || echo '$(srcdir)/'`ags/X/ags_sequencer_editor.c ags/X/libgsequencer_la-ags_server_preferences.lo: ags/X/ags_server_preferences.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_server_preferences.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_server_preferences.Tpo -c -o ags/X/libgsequencer_la-ags_server_preferences.lo `test -f 'ags/X/ags_server_preferences.c' || echo '$(srcdir)/'`ags/X/ags_server_preferences.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_server_preferences.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_server_preferences.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_server_preferences.c' object='ags/X/libgsequencer_la-ags_server_preferences.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_server_preferences.lo `test -f 'ags/X/ags_server_preferences.c' || echo '$(srcdir)/'`ags/X/ags_server_preferences.c ags/X/libgsequencer_la-ags_server_preferences_callbacks.lo: ags/X/ags_server_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_server_preferences_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_server_preferences_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_server_preferences_callbacks.lo `test -f 'ags/X/ags_server_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_server_preferences_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_server_preferences_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_server_preferences_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_server_preferences_callbacks.c' object='ags/X/libgsequencer_la-ags_server_preferences_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_server_preferences_callbacks.lo `test -f 'ags/X/ags_server_preferences_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_server_preferences_callbacks.c ags/X/libgsequencer_la-ags_ui_provider.lo: ags/X/ags_ui_provider.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_ui_provider.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_ui_provider.Tpo -c -o ags/X/libgsequencer_la-ags_ui_provider.lo `test -f 'ags/X/ags_ui_provider.c' || echo '$(srcdir)/'`ags/X/ags_ui_provider.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_ui_provider.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_ui_provider.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_ui_provider.c' object='ags/X/libgsequencer_la-ags_ui_provider.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_ui_provider.lo `test -f 'ags/X/ags_ui_provider.c' || echo '$(srcdir)/'`ags/X/ags_ui_provider.c ags/X/libgsequencer_la-ags_wave_window_callbacks.lo: ags/X/ags_wave_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_wave_window_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_window_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_wave_window_callbacks.lo `test -f 'ags/X/ags_wave_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_wave_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_window_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_window_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_wave_window_callbacks.c' object='ags/X/libgsequencer_la-ags_wave_window_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_wave_window_callbacks.lo `test -f 'ags/X/ags_wave_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_wave_window_callbacks.c ags/X/libgsequencer_la-ags_wave_window.lo: ags/X/ags_wave_window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_wave_window.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_window.Tpo -c -o ags/X/libgsequencer_la-ags_wave_window.lo `test -f 'ags/X/ags_wave_window.c' || echo '$(srcdir)/'`ags/X/ags_wave_window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_window.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_window.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_wave_window.c' object='ags/X/libgsequencer_la-ags_wave_window.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_wave_window.lo `test -f 'ags/X/ags_wave_window.c' || echo '$(srcdir)/'`ags/X/ags_wave_window.c ags/X/libgsequencer_la-ags_wave_editor.lo: ags/X/ags_wave_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_wave_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_editor.Tpo -c -o ags/X/libgsequencer_la-ags_wave_editor.lo `test -f 'ags/X/ags_wave_editor.c' || echo '$(srcdir)/'`ags/X/ags_wave_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_wave_editor.c' object='ags/X/libgsequencer_la-ags_wave_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_wave_editor.lo `test -f 'ags/X/ags_wave_editor.c' || echo '$(srcdir)/'`ags/X/ags_wave_editor.c ags/X/libgsequencer_la-ags_wave_editor_callbacks.lo: ags/X/ags_wave_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_wave_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_wave_editor_callbacks.lo `test -f 'ags/X/ags_wave_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_wave_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_wave_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_wave_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_wave_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_wave_editor_callbacks.lo `test -f 'ags/X/ags_wave_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_wave_editor_callbacks.c ags/X/libgsequencer_la-ags_window.lo: ags/X/ags_window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_window.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_window.Tpo -c -o ags/X/libgsequencer_la-ags_window.lo `test -f 'ags/X/ags_window.c' || echo '$(srcdir)/'`ags/X/ags_window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_window.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_window.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_window.c' object='ags/X/libgsequencer_la-ags_window.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_window.lo `test -f 'ags/X/ags_window.c' || echo '$(srcdir)/'`ags/X/ags_window.c ags/X/libgsequencer_la-ags_soundcard_editor_callbacks.lo: ags/X/ags_soundcard_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_soundcard_editor_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_soundcard_editor_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_soundcard_editor_callbacks.lo `test -f 'ags/X/ags_soundcard_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_soundcard_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_soundcard_editor_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_soundcard_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_soundcard_editor_callbacks.c' object='ags/X/libgsequencer_la-ags_soundcard_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_soundcard_editor_callbacks.lo `test -f 'ags/X/ags_soundcard_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_soundcard_editor_callbacks.c ags/X/libgsequencer_la-ags_soundcard_editor.lo: ags/X/ags_soundcard_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_soundcard_editor.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_soundcard_editor.Tpo -c -o ags/X/libgsequencer_la-ags_soundcard_editor.lo `test -f 'ags/X/ags_soundcard_editor.c' || echo '$(srcdir)/'`ags/X/ags_soundcard_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_soundcard_editor.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_soundcard_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_soundcard_editor.c' object='ags/X/libgsequencer_la-ags_soundcard_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_soundcard_editor.lo `test -f 'ags/X/ags_soundcard_editor.c' || echo '$(srcdir)/'`ags/X/ags_soundcard_editor.c ags/X/libgsequencer_la-ags_window_callbacks.lo: ags/X/ags_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_window_callbacks.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_window_callbacks.Tpo -c -o ags/X/libgsequencer_la-ags_window_callbacks.lo `test -f 'ags/X/ags_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_window_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_window_callbacks.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_window_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_window_callbacks.c' object='ags/X/libgsequencer_la-ags_window_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_window_callbacks.lo `test -f 'ags/X/ags_window_callbacks.c' || echo '$(srcdir)/'`ags/X/ags_window_callbacks.c ags/X/libgsequencer_la-ags_xorg_application_context.lo: ags/X/ags_xorg_application_context.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/libgsequencer_la-ags_xorg_application_context.lo -MD -MP -MF ags/X/$(DEPDIR)/libgsequencer_la-ags_xorg_application_context.Tpo -c -o ags/X/libgsequencer_la-ags_xorg_application_context.lo `test -f 'ags/X/ags_xorg_application_context.c' || echo '$(srcdir)/'`ags/X/ags_xorg_application_context.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/$(DEPDIR)/libgsequencer_la-ags_xorg_application_context.Tpo ags/X/$(DEPDIR)/libgsequencer_la-ags_xorg_application_context.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/ags_xorg_application_context.c' object='ags/X/libgsequencer_la-ags_xorg_application_context.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/libgsequencer_la-ags_xorg_application_context.lo `test -f 'ags/X/ags_xorg_application_context.c' || echo '$(srcdir)/'`ags/X/ags_xorg_application_context.c ags/X/file/libgsequencer_la-ags_gui_file_xml.lo: ags/X/file/ags_gui_file_xml.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/file/libgsequencer_la-ags_gui_file_xml.lo -MD -MP -MF ags/X/file/$(DEPDIR)/libgsequencer_la-ags_gui_file_xml.Tpo -c -o ags/X/file/libgsequencer_la-ags_gui_file_xml.lo `test -f 'ags/X/file/ags_gui_file_xml.c' || echo '$(srcdir)/'`ags/X/file/ags_gui_file_xml.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/file/$(DEPDIR)/libgsequencer_la-ags_gui_file_xml.Tpo ags/X/file/$(DEPDIR)/libgsequencer_la-ags_gui_file_xml.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/file/ags_gui_file_xml.c' object='ags/X/file/libgsequencer_la-ags_gui_file_xml.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/file/libgsequencer_la-ags_gui_file_xml.lo `test -f 'ags/X/file/ags_gui_file_xml.c' || echo '$(srcdir)/'`ags/X/file/ags_gui_file_xml.c ags/X/file/libgsequencer_la-ags_simple_file.lo: ags/X/file/ags_simple_file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/file/libgsequencer_la-ags_simple_file.lo -MD -MP -MF ags/X/file/$(DEPDIR)/libgsequencer_la-ags_simple_file.Tpo -c -o ags/X/file/libgsequencer_la-ags_simple_file.lo `test -f 'ags/X/file/ags_simple_file.c' || echo '$(srcdir)/'`ags/X/file/ags_simple_file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/file/$(DEPDIR)/libgsequencer_la-ags_simple_file.Tpo ags/X/file/$(DEPDIR)/libgsequencer_la-ags_simple_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/file/ags_simple_file.c' object='ags/X/file/libgsequencer_la-ags_simple_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/file/libgsequencer_la-ags_simple_file.lo `test -f 'ags/X/file/ags_simple_file.c' || echo '$(srcdir)/'`ags/X/file/ags_simple_file.c ags/X/thread/libgsequencer_la-ags_gui_thread.lo: ags/X/thread/ags_gui_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/thread/libgsequencer_la-ags_gui_thread.lo -MD -MP -MF ags/X/thread/$(DEPDIR)/libgsequencer_la-ags_gui_thread.Tpo -c -o ags/X/thread/libgsequencer_la-ags_gui_thread.lo `test -f 'ags/X/thread/ags_gui_thread.c' || echo '$(srcdir)/'`ags/X/thread/ags_gui_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/thread/$(DEPDIR)/libgsequencer_la-ags_gui_thread.Tpo ags/X/thread/$(DEPDIR)/libgsequencer_la-ags_gui_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/thread/ags_gui_thread.c' object='ags/X/thread/libgsequencer_la-ags_gui_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/thread/libgsequencer_la-ags_gui_thread.lo `test -f 'ags/X/thread/ags_gui_thread.c' || echo '$(srcdir)/'`ags/X/thread/ags_gui_thread.c ags/X/thread/libgsequencer_la-ags_simple_autosave_thread.lo: ags/X/thread/ags_simple_autosave_thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/thread/libgsequencer_la-ags_simple_autosave_thread.lo -MD -MP -MF ags/X/thread/$(DEPDIR)/libgsequencer_la-ags_simple_autosave_thread.Tpo -c -o ags/X/thread/libgsequencer_la-ags_simple_autosave_thread.lo `test -f 'ags/X/thread/ags_simple_autosave_thread.c' || echo '$(srcdir)/'`ags/X/thread/ags_simple_autosave_thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/thread/$(DEPDIR)/libgsequencer_la-ags_simple_autosave_thread.Tpo ags/X/thread/$(DEPDIR)/libgsequencer_la-ags_simple_autosave_thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/thread/ags_simple_autosave_thread.c' object='ags/X/thread/libgsequencer_la-ags_simple_autosave_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/thread/libgsequencer_la-ags_simple_autosave_thread.lo `test -f 'ags/X/thread/ags_simple_autosave_thread.c' || echo '$(srcdir)/'`ags/X/thread/ags_simple_autosave_thread.c ags/X/task/libgsequencer_la-ags_add_bulk_member.lo: ags/X/task/ags_add_bulk_member.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_add_bulk_member.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_bulk_member.Tpo -c -o ags/X/task/libgsequencer_la-ags_add_bulk_member.lo `test -f 'ags/X/task/ags_add_bulk_member.c' || echo '$(srcdir)/'`ags/X/task/ags_add_bulk_member.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_bulk_member.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_bulk_member.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_add_bulk_member.c' object='ags/X/task/libgsequencer_la-ags_add_bulk_member.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_add_bulk_member.lo `test -f 'ags/X/task/ags_add_bulk_member.c' || echo '$(srcdir)/'`ags/X/task/ags_add_bulk_member.c ags/X/task/libgsequencer_la-ags_add_line_member.lo: ags/X/task/ags_add_line_member.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_add_line_member.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_line_member.Tpo -c -o ags/X/task/libgsequencer_la-ags_add_line_member.lo `test -f 'ags/X/task/ags_add_line_member.c' || echo '$(srcdir)/'`ags/X/task/ags_add_line_member.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_line_member.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_line_member.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_add_line_member.c' object='ags/X/task/libgsequencer_la-ags_add_line_member.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_add_line_member.lo `test -f 'ags/X/task/ags_add_line_member.c' || echo '$(srcdir)/'`ags/X/task/ags_add_line_member.c ags/X/task/libgsequencer_la-ags_add_sequencer_editor_jack.lo: ags/X/task/ags_add_sequencer_editor_jack.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_add_sequencer_editor_jack.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_sequencer_editor_jack.Tpo -c -o ags/X/task/libgsequencer_la-ags_add_sequencer_editor_jack.lo `test -f 'ags/X/task/ags_add_sequencer_editor_jack.c' || echo '$(srcdir)/'`ags/X/task/ags_add_sequencer_editor_jack.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_sequencer_editor_jack.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_sequencer_editor_jack.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_add_sequencer_editor_jack.c' object='ags/X/task/libgsequencer_la-ags_add_sequencer_editor_jack.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_add_sequencer_editor_jack.lo `test -f 'ags/X/task/ags_add_sequencer_editor_jack.c' || echo '$(srcdir)/'`ags/X/task/ags_add_sequencer_editor_jack.c ags/X/task/libgsequencer_la-ags_add_soundcard_editor_sink.lo: ags/X/task/ags_add_soundcard_editor_sink.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_add_soundcard_editor_sink.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_soundcard_editor_sink.Tpo -c -o ags/X/task/libgsequencer_la-ags_add_soundcard_editor_sink.lo `test -f 'ags/X/task/ags_add_soundcard_editor_sink.c' || echo '$(srcdir)/'`ags/X/task/ags_add_soundcard_editor_sink.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_soundcard_editor_sink.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_add_soundcard_editor_sink.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_add_soundcard_editor_sink.c' object='ags/X/task/libgsequencer_la-ags_add_soundcard_editor_sink.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_add_soundcard_editor_sink.lo `test -f 'ags/X/task/ags_add_soundcard_editor_sink.c' || echo '$(srcdir)/'`ags/X/task/ags_add_soundcard_editor_sink.c ags/X/task/libgsequencer_la-ags_blink_cell_pattern_cursor.lo: ags/X/task/ags_blink_cell_pattern_cursor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_blink_cell_pattern_cursor.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_blink_cell_pattern_cursor.Tpo -c -o ags/X/task/libgsequencer_la-ags_blink_cell_pattern_cursor.lo `test -f 'ags/X/task/ags_blink_cell_pattern_cursor.c' || echo '$(srcdir)/'`ags/X/task/ags_blink_cell_pattern_cursor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_blink_cell_pattern_cursor.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_blink_cell_pattern_cursor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_blink_cell_pattern_cursor.c' object='ags/X/task/libgsequencer_la-ags_blink_cell_pattern_cursor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_blink_cell_pattern_cursor.lo `test -f 'ags/X/task/ags_blink_cell_pattern_cursor.c' || echo '$(srcdir)/'`ags/X/task/ags_blink_cell_pattern_cursor.c ags/X/task/libgsequencer_la-ags_change_indicator.lo: ags/X/task/ags_change_indicator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_change_indicator.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_change_indicator.Tpo -c -o ags/X/task/libgsequencer_la-ags_change_indicator.lo `test -f 'ags/X/task/ags_change_indicator.c' || echo '$(srcdir)/'`ags/X/task/ags_change_indicator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_change_indicator.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_change_indicator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_change_indicator.c' object='ags/X/task/libgsequencer_la-ags_change_indicator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_change_indicator.lo `test -f 'ags/X/task/ags_change_indicator.c' || echo '$(srcdir)/'`ags/X/task/ags_change_indicator.c ags/X/task/libgsequencer_la-ags_change_tact.lo: ags/X/task/ags_change_tact.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_change_tact.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_change_tact.Tpo -c -o ags/X/task/libgsequencer_la-ags_change_tact.lo `test -f 'ags/X/task/ags_change_tact.c' || echo '$(srcdir)/'`ags/X/task/ags_change_tact.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_change_tact.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_change_tact.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_change_tact.c' object='ags/X/task/libgsequencer_la-ags_change_tact.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_change_tact.lo `test -f 'ags/X/task/ags_change_tact.c' || echo '$(srcdir)/'`ags/X/task/ags_change_tact.c ags/X/task/libgsequencer_la-ags_display_tact.lo: ags/X/task/ags_display_tact.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_display_tact.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_display_tact.Tpo -c -o ags/X/task/libgsequencer_la-ags_display_tact.lo `test -f 'ags/X/task/ags_display_tact.c' || echo '$(srcdir)/'`ags/X/task/ags_display_tact.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_display_tact.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_display_tact.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_display_tact.c' object='ags/X/task/libgsequencer_la-ags_display_tact.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_display_tact.lo `test -f 'ags/X/task/ags_display_tact.c' || echo '$(srcdir)/'`ags/X/task/ags_display_tact.c ags/X/task/libgsequencer_la-ags_remove_sequencer_editor_jack.lo: ags/X/task/ags_remove_sequencer_editor_jack.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_remove_sequencer_editor_jack.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_remove_sequencer_editor_jack.Tpo -c -o ags/X/task/libgsequencer_la-ags_remove_sequencer_editor_jack.lo `test -f 'ags/X/task/ags_remove_sequencer_editor_jack.c' || echo '$(srcdir)/'`ags/X/task/ags_remove_sequencer_editor_jack.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_remove_sequencer_editor_jack.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_remove_sequencer_editor_jack.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_remove_sequencer_editor_jack.c' object='ags/X/task/libgsequencer_la-ags_remove_sequencer_editor_jack.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_remove_sequencer_editor_jack.lo `test -f 'ags/X/task/ags_remove_sequencer_editor_jack.c' || echo '$(srcdir)/'`ags/X/task/ags_remove_sequencer_editor_jack.c ags/X/task/libgsequencer_la-ags_remove_soundcard_editor_sink.lo: ags/X/task/ags_remove_soundcard_editor_sink.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_remove_soundcard_editor_sink.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_remove_soundcard_editor_sink.Tpo -c -o ags/X/task/libgsequencer_la-ags_remove_soundcard_editor_sink.lo `test -f 'ags/X/task/ags_remove_soundcard_editor_sink.c' || echo '$(srcdir)/'`ags/X/task/ags_remove_soundcard_editor_sink.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_remove_soundcard_editor_sink.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_remove_soundcard_editor_sink.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_remove_soundcard_editor_sink.c' object='ags/X/task/libgsequencer_la-ags_remove_soundcard_editor_sink.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_remove_soundcard_editor_sink.lo `test -f 'ags/X/task/ags_remove_soundcard_editor_sink.c' || echo '$(srcdir)/'`ags/X/task/ags_remove_soundcard_editor_sink.c ags/X/task/libgsequencer_la-ags_simple_file_read.lo: ags/X/task/ags_simple_file_read.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_simple_file_read.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_simple_file_read.Tpo -c -o ags/X/task/libgsequencer_la-ags_simple_file_read.lo `test -f 'ags/X/task/ags_simple_file_read.c' || echo '$(srcdir)/'`ags/X/task/ags_simple_file_read.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_simple_file_read.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_simple_file_read.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_simple_file_read.c' object='ags/X/task/libgsequencer_la-ags_simple_file_read.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_simple_file_read.lo `test -f 'ags/X/task/ags_simple_file_read.c' || echo '$(srcdir)/'`ags/X/task/ags_simple_file_read.c ags/X/task/libgsequencer_la-ags_simple_file_write.lo: ags/X/task/ags_simple_file_write.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_simple_file_write.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_simple_file_write.Tpo -c -o ags/X/task/libgsequencer_la-ags_simple_file_write.lo `test -f 'ags/X/task/ags_simple_file_write.c' || echo '$(srcdir)/'`ags/X/task/ags_simple_file_write.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_simple_file_write.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_simple_file_write.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_simple_file_write.c' object='ags/X/task/libgsequencer_la-ags_simple_file_write.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_simple_file_write.lo `test -f 'ags/X/task/ags_simple_file_write.c' || echo '$(srcdir)/'`ags/X/task/ags_simple_file_write.c ags/X/task/libgsequencer_la-ags_toggle_led.lo: ags/X/task/ags_toggle_led.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_toggle_led.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_toggle_led.Tpo -c -o ags/X/task/libgsequencer_la-ags_toggle_led.lo `test -f 'ags/X/task/ags_toggle_led.c' || echo '$(srcdir)/'`ags/X/task/ags_toggle_led.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_toggle_led.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_toggle_led.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_toggle_led.c' object='ags/X/task/libgsequencer_la-ags_toggle_led.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_toggle_led.lo `test -f 'ags/X/task/ags_toggle_led.c' || echo '$(srcdir)/'`ags/X/task/ags_toggle_led.c ags/X/task/libgsequencer_la-ags_update_bulk_member.lo: ags/X/task/ags_update_bulk_member.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/task/libgsequencer_la-ags_update_bulk_member.lo -MD -MP -MF ags/X/task/$(DEPDIR)/libgsequencer_la-ags_update_bulk_member.Tpo -c -o ags/X/task/libgsequencer_la-ags_update_bulk_member.lo `test -f 'ags/X/task/ags_update_bulk_member.c' || echo '$(srcdir)/'`ags/X/task/ags_update_bulk_member.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/task/$(DEPDIR)/libgsequencer_la-ags_update_bulk_member.Tpo ags/X/task/$(DEPDIR)/libgsequencer_la-ags_update_bulk_member.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/task/ags_update_bulk_member.c' object='ags/X/task/libgsequencer_la-ags_update_bulk_member.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/task/libgsequencer_la-ags_update_bulk_member.lo `test -f 'ags/X/task/ags_update_bulk_member.c' || echo '$(srcdir)/'`ags/X/task/ags_update_bulk_member.c ags/X/import/libgsequencer_la-ags_midi_import_wizard.lo: ags/X/import/ags_midi_import_wizard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/import/libgsequencer_la-ags_midi_import_wizard.lo -MD -MP -MF ags/X/import/$(DEPDIR)/libgsequencer_la-ags_midi_import_wizard.Tpo -c -o ags/X/import/libgsequencer_la-ags_midi_import_wizard.lo `test -f 'ags/X/import/ags_midi_import_wizard.c' || echo '$(srcdir)/'`ags/X/import/ags_midi_import_wizard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/import/$(DEPDIR)/libgsequencer_la-ags_midi_import_wizard.Tpo ags/X/import/$(DEPDIR)/libgsequencer_la-ags_midi_import_wizard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/import/ags_midi_import_wizard.c' object='ags/X/import/libgsequencer_la-ags_midi_import_wizard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/import/libgsequencer_la-ags_midi_import_wizard.lo `test -f 'ags/X/import/ags_midi_import_wizard.c' || echo '$(srcdir)/'`ags/X/import/ags_midi_import_wizard.c ags/X/import/libgsequencer_la-ags_midi_import_wizard_callbacks.lo: ags/X/import/ags_midi_import_wizard_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/import/libgsequencer_la-ags_midi_import_wizard_callbacks.lo -MD -MP -MF ags/X/import/$(DEPDIR)/libgsequencer_la-ags_midi_import_wizard_callbacks.Tpo -c -o ags/X/import/libgsequencer_la-ags_midi_import_wizard_callbacks.lo `test -f 'ags/X/import/ags_midi_import_wizard_callbacks.c' || echo '$(srcdir)/'`ags/X/import/ags_midi_import_wizard_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/import/$(DEPDIR)/libgsequencer_la-ags_midi_import_wizard_callbacks.Tpo ags/X/import/$(DEPDIR)/libgsequencer_la-ags_midi_import_wizard_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/import/ags_midi_import_wizard_callbacks.c' object='ags/X/import/libgsequencer_la-ags_midi_import_wizard_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/import/libgsequencer_la-ags_midi_import_wizard_callbacks.lo `test -f 'ags/X/import/ags_midi_import_wizard_callbacks.c' || echo '$(srcdir)/'`ags/X/import/ags_midi_import_wizard_callbacks.c ags/X/import/libgsequencer_la-ags_track_collection.lo: ags/X/import/ags_track_collection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/import/libgsequencer_la-ags_track_collection.lo -MD -MP -MF ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection.Tpo -c -o ags/X/import/libgsequencer_la-ags_track_collection.lo `test -f 'ags/X/import/ags_track_collection.c' || echo '$(srcdir)/'`ags/X/import/ags_track_collection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection.Tpo ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/import/ags_track_collection.c' object='ags/X/import/libgsequencer_la-ags_track_collection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/import/libgsequencer_la-ags_track_collection.lo `test -f 'ags/X/import/ags_track_collection.c' || echo '$(srcdir)/'`ags/X/import/ags_track_collection.c ags/X/import/libgsequencer_la-ags_track_collection_callbacks.lo: ags/X/import/ags_track_collection_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/import/libgsequencer_la-ags_track_collection_callbacks.lo -MD -MP -MF ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_callbacks.Tpo -c -o ags/X/import/libgsequencer_la-ags_track_collection_callbacks.lo `test -f 'ags/X/import/ags_track_collection_callbacks.c' || echo '$(srcdir)/'`ags/X/import/ags_track_collection_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_callbacks.Tpo ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/import/ags_track_collection_callbacks.c' object='ags/X/import/libgsequencer_la-ags_track_collection_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/import/libgsequencer_la-ags_track_collection_callbacks.lo `test -f 'ags/X/import/ags_track_collection_callbacks.c' || echo '$(srcdir)/'`ags/X/import/ags_track_collection_callbacks.c ags/X/import/libgsequencer_la-ags_track_collection_mapper.lo: ags/X/import/ags_track_collection_mapper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/import/libgsequencer_la-ags_track_collection_mapper.lo -MD -MP -MF ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_mapper.Tpo -c -o ags/X/import/libgsequencer_la-ags_track_collection_mapper.lo `test -f 'ags/X/import/ags_track_collection_mapper.c' || echo '$(srcdir)/'`ags/X/import/ags_track_collection_mapper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_mapper.Tpo ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_mapper.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/import/ags_track_collection_mapper.c' object='ags/X/import/libgsequencer_la-ags_track_collection_mapper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/import/libgsequencer_la-ags_track_collection_mapper.lo `test -f 'ags/X/import/ags_track_collection_mapper.c' || echo '$(srcdir)/'`ags/X/import/ags_track_collection_mapper.c ags/X/import/libgsequencer_la-ags_track_collection_mapper_callbacks.lo: ags/X/import/ags_track_collection_mapper_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/import/libgsequencer_la-ags_track_collection_mapper_callbacks.lo -MD -MP -MF ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_mapper_callbacks.Tpo -c -o ags/X/import/libgsequencer_la-ags_track_collection_mapper_callbacks.lo `test -f 'ags/X/import/ags_track_collection_mapper_callbacks.c' || echo '$(srcdir)/'`ags/X/import/ags_track_collection_mapper_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_mapper_callbacks.Tpo ags/X/import/$(DEPDIR)/libgsequencer_la-ags_track_collection_mapper_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/import/ags_track_collection_mapper_callbacks.c' object='ags/X/import/libgsequencer_la-ags_track_collection_mapper_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/import/libgsequencer_la-ags_track_collection_mapper_callbacks.lo `test -f 'ags/X/import/ags_track_collection_mapper_callbacks.c' || echo '$(srcdir)/'`ags/X/import/ags_track_collection_mapper_callbacks.c ags/X/export/libgsequencer_la-ags_midi_export_wizard.lo: ags/X/export/ags_midi_export_wizard.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/export/libgsequencer_la-ags_midi_export_wizard.lo -MD -MP -MF ags/X/export/$(DEPDIR)/libgsequencer_la-ags_midi_export_wizard.Tpo -c -o ags/X/export/libgsequencer_la-ags_midi_export_wizard.lo `test -f 'ags/X/export/ags_midi_export_wizard.c' || echo '$(srcdir)/'`ags/X/export/ags_midi_export_wizard.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/export/$(DEPDIR)/libgsequencer_la-ags_midi_export_wizard.Tpo ags/X/export/$(DEPDIR)/libgsequencer_la-ags_midi_export_wizard.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/export/ags_midi_export_wizard.c' object='ags/X/export/libgsequencer_la-ags_midi_export_wizard.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/export/libgsequencer_la-ags_midi_export_wizard.lo `test -f 'ags/X/export/ags_midi_export_wizard.c' || echo '$(srcdir)/'`ags/X/export/ags_midi_export_wizard.c ags/X/export/libgsequencer_la-ags_midi_export_wizard_callbacks.lo: ags/X/export/ags_midi_export_wizard_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/export/libgsequencer_la-ags_midi_export_wizard_callbacks.lo -MD -MP -MF ags/X/export/$(DEPDIR)/libgsequencer_la-ags_midi_export_wizard_callbacks.Tpo -c -o ags/X/export/libgsequencer_la-ags_midi_export_wizard_callbacks.lo `test -f 'ags/X/export/ags_midi_export_wizard_callbacks.c' || echo '$(srcdir)/'`ags/X/export/ags_midi_export_wizard_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/export/$(DEPDIR)/libgsequencer_la-ags_midi_export_wizard_callbacks.Tpo ags/X/export/$(DEPDIR)/libgsequencer_la-ags_midi_export_wizard_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/export/ags_midi_export_wizard_callbacks.c' object='ags/X/export/libgsequencer_la-ags_midi_export_wizard_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/export/libgsequencer_la-ags_midi_export_wizard_callbacks.lo `test -f 'ags/X/export/ags_midi_export_wizard_callbacks.c' || echo '$(srcdir)/'`ags/X/export/ags_midi_export_wizard_callbacks.c ags/X/export/libgsequencer_la-ags_machine_collection.lo: ags/X/export/ags_machine_collection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/export/libgsequencer_la-ags_machine_collection.lo -MD -MP -MF ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection.Tpo -c -o ags/X/export/libgsequencer_la-ags_machine_collection.lo `test -f 'ags/X/export/ags_machine_collection.c' || echo '$(srcdir)/'`ags/X/export/ags_machine_collection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection.Tpo ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/export/ags_machine_collection.c' object='ags/X/export/libgsequencer_la-ags_machine_collection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/export/libgsequencer_la-ags_machine_collection.lo `test -f 'ags/X/export/ags_machine_collection.c' || echo '$(srcdir)/'`ags/X/export/ags_machine_collection.c ags/X/export/libgsequencer_la-ags_machine_collection_callbacks.lo: ags/X/export/ags_machine_collection_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/export/libgsequencer_la-ags_machine_collection_callbacks.lo -MD -MP -MF ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_callbacks.Tpo -c -o ags/X/export/libgsequencer_la-ags_machine_collection_callbacks.lo `test -f 'ags/X/export/ags_machine_collection_callbacks.c' || echo '$(srcdir)/'`ags/X/export/ags_machine_collection_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_callbacks.Tpo ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/export/ags_machine_collection_callbacks.c' object='ags/X/export/libgsequencer_la-ags_machine_collection_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/export/libgsequencer_la-ags_machine_collection_callbacks.lo `test -f 'ags/X/export/ags_machine_collection_callbacks.c' || echo '$(srcdir)/'`ags/X/export/ags_machine_collection_callbacks.c ags/X/export/libgsequencer_la-ags_machine_collection_entry.lo: ags/X/export/ags_machine_collection_entry.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/export/libgsequencer_la-ags_machine_collection_entry.lo -MD -MP -MF ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_entry.Tpo -c -o ags/X/export/libgsequencer_la-ags_machine_collection_entry.lo `test -f 'ags/X/export/ags_machine_collection_entry.c' || echo '$(srcdir)/'`ags/X/export/ags_machine_collection_entry.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_entry.Tpo ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_entry.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/export/ags_machine_collection_entry.c' object='ags/X/export/libgsequencer_la-ags_machine_collection_entry.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/export/libgsequencer_la-ags_machine_collection_entry.lo `test -f 'ags/X/export/ags_machine_collection_entry.c' || echo '$(srcdir)/'`ags/X/export/ags_machine_collection_entry.c ags/X/export/libgsequencer_la-ags_machine_collection_entry_callbacks.lo: ags/X/export/ags_machine_collection_entry_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/export/libgsequencer_la-ags_machine_collection_entry_callbacks.lo -MD -MP -MF ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_entry_callbacks.Tpo -c -o ags/X/export/libgsequencer_la-ags_machine_collection_entry_callbacks.lo `test -f 'ags/X/export/ags_machine_collection_entry_callbacks.c' || echo '$(srcdir)/'`ags/X/export/ags_machine_collection_entry_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_entry_callbacks.Tpo ags/X/export/$(DEPDIR)/libgsequencer_la-ags_machine_collection_entry_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/export/ags_machine_collection_entry_callbacks.c' object='ags/X/export/libgsequencer_la-ags_machine_collection_entry_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/export/libgsequencer_la-ags_machine_collection_entry_callbacks.lo `test -f 'ags/X/export/ags_machine_collection_entry_callbacks.c' || echo '$(srcdir)/'`ags/X/export/ags_machine_collection_entry_callbacks.c ags/X/machine/libgsequencer_la-ags_audiorec.lo: ags/X/machine/ags_audiorec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_audiorec.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_audiorec.Tpo -c -o ags/X/machine/libgsequencer_la-ags_audiorec.lo `test -f 'ags/X/machine/ags_audiorec.c' || echo '$(srcdir)/'`ags/X/machine/ags_audiorec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_audiorec.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_audiorec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_audiorec.c' object='ags/X/machine/libgsequencer_la-ags_audiorec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_audiorec.lo `test -f 'ags/X/machine/ags_audiorec.c' || echo '$(srcdir)/'`ags/X/machine/ags_audiorec.c ags/X/machine/libgsequencer_la-ags_audiorec_callbacks.lo: ags/X/machine/ags_audiorec_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_audiorec_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_audiorec_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_audiorec_callbacks.lo `test -f 'ags/X/machine/ags_audiorec_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_audiorec_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_audiorec_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_audiorec_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_audiorec_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_audiorec_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_audiorec_callbacks.lo `test -f 'ags/X/machine/ags_audiorec_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_audiorec_callbacks.c ags/X/machine/libgsequencer_la-ags_cell_pattern.lo: ags/X/machine/ags_cell_pattern.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_cell_pattern.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_cell_pattern.Tpo -c -o ags/X/machine/libgsequencer_la-ags_cell_pattern.lo `test -f 'ags/X/machine/ags_cell_pattern.c' || echo '$(srcdir)/'`ags/X/machine/ags_cell_pattern.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_cell_pattern.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_cell_pattern.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_cell_pattern.c' object='ags/X/machine/libgsequencer_la-ags_cell_pattern.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_cell_pattern.lo `test -f 'ags/X/machine/ags_cell_pattern.c' || echo '$(srcdir)/'`ags/X/machine/ags_cell_pattern.c ags/X/machine/libgsequencer_la-ags_cell_pattern_callbacks.lo: ags/X/machine/ags_cell_pattern_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_cell_pattern_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_cell_pattern_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_cell_pattern_callbacks.lo `test -f 'ags/X/machine/ags_cell_pattern_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_cell_pattern_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_cell_pattern_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_cell_pattern_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_cell_pattern_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_cell_pattern_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_cell_pattern_callbacks.lo `test -f 'ags/X/machine/ags_cell_pattern_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_cell_pattern_callbacks.c ags/X/machine/libgsequencer_la-ags_drum.lo: ags/X/machine/ags_drum.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum.lo `test -f 'ags/X/machine/ags_drum.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum.c' object='ags/X/machine/libgsequencer_la-ags_drum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum.lo `test -f 'ags/X/machine/ags_drum.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum.c ags/X/machine/libgsequencer_la-ags_drum_callbacks.lo: ags/X/machine/ags_drum_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum_callbacks.lo `test -f 'ags/X/machine/ags_drum_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_drum_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum_callbacks.lo `test -f 'ags/X/machine/ags_drum_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_callbacks.c ags/X/machine/libgsequencer_la-ags_drum_input_line.lo: ags/X/machine/ags_drum_input_line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum_input_line.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_line.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum_input_line.lo `test -f 'ags/X/machine/ags_drum_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_input_line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_line.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum_input_line.c' object='ags/X/machine/libgsequencer_la-ags_drum_input_line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum_input_line.lo `test -f 'ags/X/machine/ags_drum_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_input_line.c ags/X/machine/libgsequencer_la-ags_drum_input_line_callbacks.lo: ags/X/machine/ags_drum_input_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum_input_line_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_line_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum_input_line_callbacks.lo `test -f 'ags/X/machine/ags_drum_input_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_input_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_line_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_line_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum_input_line_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_drum_input_line_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum_input_line_callbacks.lo `test -f 'ags/X/machine/ags_drum_input_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_input_line_callbacks.c ags/X/machine/libgsequencer_la-ags_drum_input_pad.lo: ags/X/machine/ags_drum_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum_input_pad.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_pad.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum_input_pad.lo `test -f 'ags/X/machine/ags_drum_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_pad.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_pad.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum_input_pad.c' object='ags/X/machine/libgsequencer_la-ags_drum_input_pad.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum_input_pad.lo `test -f 'ags/X/machine/ags_drum_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_input_pad.c ags/X/machine/libgsequencer_la-ags_drum_input_pad_callbacks.lo: ags/X/machine/ags_drum_input_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum_input_pad_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_pad_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum_input_pad_callbacks.lo `test -f 'ags/X/machine/ags_drum_input_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_input_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_pad_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_input_pad_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum_input_pad_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_drum_input_pad_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum_input_pad_callbacks.lo `test -f 'ags/X/machine/ags_drum_input_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_input_pad_callbacks.c ags/X/machine/libgsequencer_la-ags_drum_output_line.lo: ags/X/machine/ags_drum_output_line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum_output_line.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_line.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum_output_line.lo `test -f 'ags/X/machine/ags_drum_output_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_output_line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_line.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum_output_line.c' object='ags/X/machine/libgsequencer_la-ags_drum_output_line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum_output_line.lo `test -f 'ags/X/machine/ags_drum_output_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_output_line.c ags/X/machine/libgsequencer_la-ags_drum_output_line_callbacks.lo: ags/X/machine/ags_drum_output_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum_output_line_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_line_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum_output_line_callbacks.lo `test -f 'ags/X/machine/ags_drum_output_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_output_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_line_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_line_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum_output_line_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_drum_output_line_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum_output_line_callbacks.lo `test -f 'ags/X/machine/ags_drum_output_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_output_line_callbacks.c ags/X/machine/libgsequencer_la-ags_drum_output_pad.lo: ags/X/machine/ags_drum_output_pad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum_output_pad.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_pad.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum_output_pad.lo `test -f 'ags/X/machine/ags_drum_output_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_output_pad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_pad.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_pad.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum_output_pad.c' object='ags/X/machine/libgsequencer_la-ags_drum_output_pad.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum_output_pad.lo `test -f 'ags/X/machine/ags_drum_output_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_output_pad.c ags/X/machine/libgsequencer_la-ags_drum_output_pad_callbacks.lo: ags/X/machine/ags_drum_output_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_drum_output_pad_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_pad_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_drum_output_pad_callbacks.lo `test -f 'ags/X/machine/ags_drum_output_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_output_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_pad_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_drum_output_pad_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_drum_output_pad_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_drum_output_pad_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_drum_output_pad_callbacks.lo `test -f 'ags/X/machine/ags_drum_output_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_drum_output_pad_callbacks.c ags/X/machine/libgsequencer_la-ags_dssi_bridge.lo: ags/X/machine/ags_dssi_bridge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_dssi_bridge.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_dssi_bridge.Tpo -c -o ags/X/machine/libgsequencer_la-ags_dssi_bridge.lo `test -f 'ags/X/machine/ags_dssi_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_dssi_bridge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_dssi_bridge.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_dssi_bridge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_dssi_bridge.c' object='ags/X/machine/libgsequencer_la-ags_dssi_bridge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_dssi_bridge.lo `test -f 'ags/X/machine/ags_dssi_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_dssi_bridge.c ags/X/machine/libgsequencer_la-ags_dssi_bridge_callbacks.lo: ags/X/machine/ags_dssi_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_dssi_bridge_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_dssi_bridge_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_dssi_bridge_callbacks.lo `test -f 'ags/X/machine/ags_dssi_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_dssi_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_dssi_bridge_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_dssi_bridge_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_dssi_bridge_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_dssi_bridge_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_dssi_bridge_callbacks.lo `test -f 'ags/X/machine/ags_dssi_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_dssi_bridge_callbacks.c ags/X/machine/libgsequencer_la-ags_ffplayer.lo: ags/X/machine/ags_ffplayer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer.lo `test -f 'ags/X/machine/ags_ffplayer.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer.lo `test -f 'ags/X/machine/ags_ffplayer.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer.c ags/X/machine/libgsequencer_la-ags_ffplayer_callbacks.lo: ags/X/machine/ags_ffplayer_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_callbacks.c ags/X/machine/libgsequencer_la-ags_ffplayer_bridge.lo: ags/X/machine/ags_ffplayer_bridge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer_bridge.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bridge.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_bridge.lo `test -f 'ags/X/machine/ags_ffplayer_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_bridge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bridge.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bridge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer_bridge.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer_bridge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_bridge.lo `test -f 'ags/X/machine/ags_ffplayer_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_bridge.c ags/X/machine/libgsequencer_la-ags_ffplayer_bridge_callbacks.lo: ags/X/machine/ags_ffplayer_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer_bridge_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bridge_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_bridge_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bridge_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bridge_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer_bridge_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer_bridge_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_bridge_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_bridge_callbacks.c ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input.lo: ags/X/machine/ags_ffplayer_bulk_input.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bulk_input.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input.lo `test -f 'ags/X/machine/ags_ffplayer_bulk_input.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_bulk_input.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bulk_input.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bulk_input.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer_bulk_input.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input.lo `test -f 'ags/X/machine/ags_ffplayer_bulk_input.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_bulk_input.c ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.lo: ags/X/machine/ags_ffplayer_bulk_input_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_bulk_input_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_bulk_input_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer_bulk_input_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_bulk_input_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_bulk_input_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_bulk_input_callbacks.c ags/X/machine/libgsequencer_la-ags_ffplayer_input_line.lo: ags/X/machine/ags_ffplayer_input_line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer_input_line.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_line.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_input_line.lo `test -f 'ags/X/machine/ags_ffplayer_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_input_line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_line.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer_input_line.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer_input_line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_input_line.lo `test -f 'ags/X/machine/ags_ffplayer_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_input_line.c ags/X/machine/libgsequencer_la-ags_ffplayer_input_line_callbacks.lo: ags/X/machine/ags_ffplayer_input_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer_input_line_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_line_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_input_line_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_input_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_input_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_line_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_line_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer_input_line_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer_input_line_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_input_line_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_input_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_input_line_callbacks.c ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad.lo: ags/X/machine/ags_ffplayer_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_pad.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad.lo `test -f 'ags/X/machine/ags_ffplayer_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_pad.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_pad.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer_input_pad.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad.lo `test -f 'ags/X/machine/ags_ffplayer_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_input_pad.c ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad_callbacks.lo: ags/X/machine/ags_ffplayer_input_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_pad_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_input_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_input_pad_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_pad_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ffplayer_input_pad_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ffplayer_input_pad_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ffplayer_input_pad_callbacks.lo `test -f 'ags/X/machine/ags_ffplayer_input_pad_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ffplayer_input_pad_callbacks.c ags/X/machine/libgsequencer_la-ags_ladspa_bridge.lo: ags/X/machine/ags_ladspa_bridge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ladspa_bridge.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ladspa_bridge.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ladspa_bridge.lo `test -f 'ags/X/machine/ags_ladspa_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_ladspa_bridge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ladspa_bridge.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ladspa_bridge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ladspa_bridge.c' object='ags/X/machine/libgsequencer_la-ags_ladspa_bridge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ladspa_bridge.lo `test -f 'ags/X/machine/ags_ladspa_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_ladspa_bridge.c ags/X/machine/libgsequencer_la-ags_ladspa_bridge_callbacks.lo: ags/X/machine/ags_ladspa_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_ladspa_bridge_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ladspa_bridge_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_ladspa_bridge_callbacks.lo `test -f 'ags/X/machine/ags_ladspa_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ladspa_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ladspa_bridge_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_ladspa_bridge_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_ladspa_bridge_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_ladspa_bridge_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_ladspa_bridge_callbacks.lo `test -f 'ags/X/machine/ags_ladspa_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_ladspa_bridge_callbacks.c ags/X/machine/libgsequencer_la-ags_live_dssi_bridge.lo: ags/X/machine/ags_live_dssi_bridge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_live_dssi_bridge.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_dssi_bridge.Tpo -c -o ags/X/machine/libgsequencer_la-ags_live_dssi_bridge.lo `test -f 'ags/X/machine/ags_live_dssi_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_live_dssi_bridge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_dssi_bridge.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_dssi_bridge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_live_dssi_bridge.c' object='ags/X/machine/libgsequencer_la-ags_live_dssi_bridge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_live_dssi_bridge.lo `test -f 'ags/X/machine/ags_live_dssi_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_live_dssi_bridge.c ags/X/machine/libgsequencer_la-ags_live_dssi_bridge_callbacks.lo: ags/X/machine/ags_live_dssi_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_live_dssi_bridge_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_dssi_bridge_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_live_dssi_bridge_callbacks.lo `test -f 'ags/X/machine/ags_live_dssi_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_live_dssi_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_dssi_bridge_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_dssi_bridge_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_live_dssi_bridge_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_live_dssi_bridge_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_live_dssi_bridge_callbacks.lo `test -f 'ags/X/machine/ags_live_dssi_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_live_dssi_bridge_callbacks.c ags/X/machine/libgsequencer_la-ags_live_lv2_bridge.lo: ags/X/machine/ags_live_lv2_bridge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_live_lv2_bridge.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_lv2_bridge.Tpo -c -o ags/X/machine/libgsequencer_la-ags_live_lv2_bridge.lo `test -f 'ags/X/machine/ags_live_lv2_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_live_lv2_bridge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_lv2_bridge.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_lv2_bridge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_live_lv2_bridge.c' object='ags/X/machine/libgsequencer_la-ags_live_lv2_bridge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_live_lv2_bridge.lo `test -f 'ags/X/machine/ags_live_lv2_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_live_lv2_bridge.c ags/X/machine/libgsequencer_la-ags_live_lv2_bridge_callbacks.lo: ags/X/machine/ags_live_lv2_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_live_lv2_bridge_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_lv2_bridge_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_live_lv2_bridge_callbacks.lo `test -f 'ags/X/machine/ags_live_lv2_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_live_lv2_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_lv2_bridge_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_live_lv2_bridge_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_live_lv2_bridge_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_live_lv2_bridge_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_live_lv2_bridge_callbacks.lo `test -f 'ags/X/machine/ags_live_lv2_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_live_lv2_bridge_callbacks.c ags/X/machine/libgsequencer_la-ags_lv2_bridge.lo: ags/X/machine/ags_lv2_bridge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_lv2_bridge.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_lv2_bridge.Tpo -c -o ags/X/machine/libgsequencer_la-ags_lv2_bridge.lo `test -f 'ags/X/machine/ags_lv2_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_lv2_bridge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_lv2_bridge.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_lv2_bridge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_lv2_bridge.c' object='ags/X/machine/libgsequencer_la-ags_lv2_bridge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_lv2_bridge.lo `test -f 'ags/X/machine/ags_lv2_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_lv2_bridge.c ags/X/machine/libgsequencer_la-ags_lv2_bridge_callbacks.lo: ags/X/machine/ags_lv2_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_lv2_bridge_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_lv2_bridge_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_lv2_bridge_callbacks.lo `test -f 'ags/X/machine/ags_lv2_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_lv2_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_lv2_bridge_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_lv2_bridge_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_lv2_bridge_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_lv2_bridge_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_lv2_bridge_callbacks.lo `test -f 'ags/X/machine/ags_lv2_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_lv2_bridge_callbacks.c ags/X/machine/libgsequencer_la-ags_matrix.lo: ags/X/machine/ags_matrix.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_matrix.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix.Tpo -c -o ags/X/machine/libgsequencer_la-ags_matrix.lo `test -f 'ags/X/machine/ags_matrix.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_matrix.c' object='ags/X/machine/libgsequencer_la-ags_matrix.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_matrix.lo `test -f 'ags/X/machine/ags_matrix.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix.c ags/X/machine/libgsequencer_la-ags_matrix_callbacks.lo: ags/X/machine/ags_matrix_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_matrix_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_matrix_callbacks.lo `test -f 'ags/X/machine/ags_matrix_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_matrix_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_matrix_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_matrix_callbacks.lo `test -f 'ags/X/machine/ags_matrix_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_callbacks.c ags/X/machine/libgsequencer_la-ags_matrix_bridge.lo: ags/X/machine/ags_matrix_bridge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_matrix_bridge.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bridge.Tpo -c -o ags/X/machine/libgsequencer_la-ags_matrix_bridge.lo `test -f 'ags/X/machine/ags_matrix_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_bridge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bridge.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bridge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_matrix_bridge.c' object='ags/X/machine/libgsequencer_la-ags_matrix_bridge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_matrix_bridge.lo `test -f 'ags/X/machine/ags_matrix_bridge.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_bridge.c ags/X/machine/libgsequencer_la-ags_matrix_bridge_callbacks.lo: ags/X/machine/ags_matrix_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_matrix_bridge_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bridge_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_matrix_bridge_callbacks.lo `test -f 'ags/X/machine/ags_matrix_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_bridge_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bridge_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bridge_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_matrix_bridge_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_matrix_bridge_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_matrix_bridge_callbacks.lo `test -f 'ags/X/machine/ags_matrix_bridge_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_bridge_callbacks.c ags/X/machine/libgsequencer_la-ags_matrix_bulk_input.lo: ags/X/machine/ags_matrix_bulk_input.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_matrix_bulk_input.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bulk_input.Tpo -c -o ags/X/machine/libgsequencer_la-ags_matrix_bulk_input.lo `test -f 'ags/X/machine/ags_matrix_bulk_input.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_bulk_input.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bulk_input.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bulk_input.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_matrix_bulk_input.c' object='ags/X/machine/libgsequencer_la-ags_matrix_bulk_input.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_matrix_bulk_input.lo `test -f 'ags/X/machine/ags_matrix_bulk_input.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_bulk_input.c ags/X/machine/libgsequencer_la-ags_matrix_bulk_input_callbacks.lo: ags/X/machine/ags_matrix_bulk_input_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_matrix_bulk_input_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bulk_input_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_matrix_bulk_input_callbacks.lo `test -f 'ags/X/machine/ags_matrix_bulk_input_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_bulk_input_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bulk_input_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_matrix_bulk_input_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_matrix_bulk_input_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_matrix_bulk_input_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_matrix_bulk_input_callbacks.lo `test -f 'ags/X/machine/ags_matrix_bulk_input_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_matrix_bulk_input_callbacks.c ags/X/machine/libgsequencer_la-ags_mixer.lo: ags/X/machine/ags_mixer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_mixer.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer.Tpo -c -o ags/X/machine/libgsequencer_la-ags_mixer.lo `test -f 'ags/X/machine/ags_mixer.c' || echo '$(srcdir)/'`ags/X/machine/ags_mixer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_mixer.c' object='ags/X/machine/libgsequencer_la-ags_mixer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_mixer.lo `test -f 'ags/X/machine/ags_mixer.c' || echo '$(srcdir)/'`ags/X/machine/ags_mixer.c ags/X/machine/libgsequencer_la-ags_mixer_callbacks.lo: ags/X/machine/ags_mixer_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_mixer_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_mixer_callbacks.lo `test -f 'ags/X/machine/ags_mixer_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_mixer_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_mixer_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_mixer_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_mixer_callbacks.lo `test -f 'ags/X/machine/ags_mixer_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_mixer_callbacks.c ags/X/machine/libgsequencer_la-ags_mixer_input_line.lo: ags/X/machine/ags_mixer_input_line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_mixer_input_line.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_input_line.Tpo -c -o ags/X/machine/libgsequencer_la-ags_mixer_input_line.lo `test -f 'ags/X/machine/ags_mixer_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_mixer_input_line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_input_line.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_input_line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_mixer_input_line.c' object='ags/X/machine/libgsequencer_la-ags_mixer_input_line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_mixer_input_line.lo `test -f 'ags/X/machine/ags_mixer_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_mixer_input_line.c ags/X/machine/libgsequencer_la-ags_mixer_input_pad.lo: ags/X/machine/ags_mixer_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_mixer_input_pad.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_input_pad.Tpo -c -o ags/X/machine/libgsequencer_la-ags_mixer_input_pad.lo `test -f 'ags/X/machine/ags_mixer_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_mixer_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_input_pad.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_mixer_input_pad.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_mixer_input_pad.c' object='ags/X/machine/libgsequencer_la-ags_mixer_input_pad.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_mixer_input_pad.lo `test -f 'ags/X/machine/ags_mixer_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_mixer_input_pad.c ags/X/machine/libgsequencer_la-ags_oscillator.lo: ags/X/machine/ags_oscillator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_oscillator.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_oscillator.Tpo -c -o ags/X/machine/libgsequencer_la-ags_oscillator.lo `test -f 'ags/X/machine/ags_oscillator.c' || echo '$(srcdir)/'`ags/X/machine/ags_oscillator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_oscillator.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_oscillator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_oscillator.c' object='ags/X/machine/libgsequencer_la-ags_oscillator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_oscillator.lo `test -f 'ags/X/machine/ags_oscillator.c' || echo '$(srcdir)/'`ags/X/machine/ags_oscillator.c ags/X/machine/libgsequencer_la-ags_oscillator_callbacks.lo: ags/X/machine/ags_oscillator_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_oscillator_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_oscillator_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_oscillator_callbacks.lo `test -f 'ags/X/machine/ags_oscillator_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_oscillator_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_oscillator_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_oscillator_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_oscillator_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_oscillator_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_oscillator_callbacks.lo `test -f 'ags/X/machine/ags_oscillator_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_oscillator_callbacks.c ags/X/machine/libgsequencer_la-ags_panel.lo: ags/X/machine/ags_panel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_panel.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel.Tpo -c -o ags/X/machine/libgsequencer_la-ags_panel.lo `test -f 'ags/X/machine/ags_panel.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_panel.c' object='ags/X/machine/libgsequencer_la-ags_panel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_panel.lo `test -f 'ags/X/machine/ags_panel.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel.c ags/X/machine/libgsequencer_la-ags_panel_callbacks.lo: ags/X/machine/ags_panel_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_panel_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_panel_callbacks.lo `test -f 'ags/X/machine/ags_panel_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_panel_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_panel_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_panel_callbacks.lo `test -f 'ags/X/machine/ags_panel_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel_callbacks.c ags/X/machine/libgsequencer_la-ags_panel_input_line.lo: ags/X/machine/ags_panel_input_line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_panel_input_line.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_line.Tpo -c -o ags/X/machine/libgsequencer_la-ags_panel_input_line.lo `test -f 'ags/X/machine/ags_panel_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel_input_line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_line.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_panel_input_line.c' object='ags/X/machine/libgsequencer_la-ags_panel_input_line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_panel_input_line.lo `test -f 'ags/X/machine/ags_panel_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel_input_line.c ags/X/machine/libgsequencer_la-ags_panel_input_line_callbacks.lo: ags/X/machine/ags_panel_input_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_panel_input_line_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_line_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_panel_input_line_callbacks.lo `test -f 'ags/X/machine/ags_panel_input_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel_input_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_line_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_line_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_panel_input_line_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_panel_input_line_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_panel_input_line_callbacks.lo `test -f 'ags/X/machine/ags_panel_input_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel_input_line_callbacks.c ags/X/machine/libgsequencer_la-ags_panel_input_pad.lo: ags/X/machine/ags_panel_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_panel_input_pad.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_pad.Tpo -c -o ags/X/machine/libgsequencer_la-ags_panel_input_pad.lo `test -f 'ags/X/machine/ags_panel_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_pad.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_panel_input_pad.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_panel_input_pad.c' object='ags/X/machine/libgsequencer_la-ags_panel_input_pad.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_panel_input_pad.lo `test -f 'ags/X/machine/ags_panel_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_panel_input_pad.c ags/X/machine/libgsequencer_la-ags_pattern_box_callbacks.lo: ags/X/machine/ags_pattern_box_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_pattern_box_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_pattern_box_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_pattern_box_callbacks.lo `test -f 'ags/X/machine/ags_pattern_box_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_pattern_box_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_pattern_box_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_pattern_box_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_pattern_box_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_pattern_box_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_pattern_box_callbacks.lo `test -f 'ags/X/machine/ags_pattern_box_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_pattern_box_callbacks.c ags/X/machine/libgsequencer_la-ags_pattern_box.lo: ags/X/machine/ags_pattern_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_pattern_box.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_pattern_box.Tpo -c -o ags/X/machine/libgsequencer_la-ags_pattern_box.lo `test -f 'ags/X/machine/ags_pattern_box.c' || echo '$(srcdir)/'`ags/X/machine/ags_pattern_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_pattern_box.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_pattern_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_pattern_box.c' object='ags/X/machine/libgsequencer_la-ags_pattern_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_pattern_box.lo `test -f 'ags/X/machine/ags_pattern_box.c' || echo '$(srcdir)/'`ags/X/machine/ags_pattern_box.c ags/X/machine/libgsequencer_la-ags_syncsynth.lo: ags/X/machine/ags_syncsynth.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_syncsynth.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_syncsynth.Tpo -c -o ags/X/machine/libgsequencer_la-ags_syncsynth.lo `test -f 'ags/X/machine/ags_syncsynth.c' || echo '$(srcdir)/'`ags/X/machine/ags_syncsynth.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_syncsynth.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_syncsynth.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_syncsynth.c' object='ags/X/machine/libgsequencer_la-ags_syncsynth.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_syncsynth.lo `test -f 'ags/X/machine/ags_syncsynth.c' || echo '$(srcdir)/'`ags/X/machine/ags_syncsynth.c ags/X/machine/libgsequencer_la-ags_syncsynth_callbacks.lo: ags/X/machine/ags_syncsynth_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_syncsynth_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_syncsynth_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_syncsynth_callbacks.lo `test -f 'ags/X/machine/ags_syncsynth_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_syncsynth_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_syncsynth_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_syncsynth_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_syncsynth_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_syncsynth_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_syncsynth_callbacks.lo `test -f 'ags/X/machine/ags_syncsynth_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_syncsynth_callbacks.c ags/X/machine/libgsequencer_la-ags_synth.lo: ags/X/machine/ags_synth.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_synth.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth.Tpo -c -o ags/X/machine/libgsequencer_la-ags_synth.lo `test -f 'ags/X/machine/ags_synth.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_synth.c' object='ags/X/machine/libgsequencer_la-ags_synth.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_synth.lo `test -f 'ags/X/machine/ags_synth.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth.c ags/X/machine/libgsequencer_la-ags_synth_callbacks.lo: ags/X/machine/ags_synth_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_synth_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_synth_callbacks.lo `test -f 'ags/X/machine/ags_synth_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_synth_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_synth_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_synth_callbacks.lo `test -f 'ags/X/machine/ags_synth_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth_callbacks.c ags/X/machine/libgsequencer_la-ags_synth_input_line.lo: ags/X/machine/ags_synth_input_line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_synth_input_line.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_line.Tpo -c -o ags/X/machine/libgsequencer_la-ags_synth_input_line.lo `test -f 'ags/X/machine/ags_synth_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth_input_line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_line.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_synth_input_line.c' object='ags/X/machine/libgsequencer_la-ags_synth_input_line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_synth_input_line.lo `test -f 'ags/X/machine/ags_synth_input_line.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth_input_line.c ags/X/machine/libgsequencer_la-ags_synth_input_line_callbacks.lo: ags/X/machine/ags_synth_input_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_synth_input_line_callbacks.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_line_callbacks.Tpo -c -o ags/X/machine/libgsequencer_la-ags_synth_input_line_callbacks.lo `test -f 'ags/X/machine/ags_synth_input_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth_input_line_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_line_callbacks.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_line_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_synth_input_line_callbacks.c' object='ags/X/machine/libgsequencer_la-ags_synth_input_line_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_synth_input_line_callbacks.lo `test -f 'ags/X/machine/ags_synth_input_line_callbacks.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth_input_line_callbacks.c ags/X/machine/libgsequencer_la-ags_synth_input_pad.lo: ags/X/machine/ags_synth_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/machine/libgsequencer_la-ags_synth_input_pad.lo -MD -MP -MF ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_pad.Tpo -c -o ags/X/machine/libgsequencer_la-ags_synth_input_pad.lo `test -f 'ags/X/machine/ags_synth_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth_input_pad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_pad.Tpo ags/X/machine/$(DEPDIR)/libgsequencer_la-ags_synth_input_pad.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/machine/ags_synth_input_pad.c' object='ags/X/machine/libgsequencer_la-ags_synth_input_pad.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/machine/libgsequencer_la-ags_synth_input_pad.lo `test -f 'ags/X/machine/ags_synth_input_pad.c' || echo '$(srcdir)/'`ags/X/machine/ags_synth_input_pad.c ags/X/editor/libgsequencer_la-ags_automation_edit.lo: ags/X/editor/ags_automation_edit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_automation_edit.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit.Tpo -c -o ags/X/editor/libgsequencer_la-ags_automation_edit.lo `test -f 'ags/X/editor/ags_automation_edit.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_edit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_automation_edit.c' object='ags/X/editor/libgsequencer_la-ags_automation_edit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_automation_edit.lo `test -f 'ags/X/editor/ags_automation_edit.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_edit.c ags/X/editor/libgsequencer_la-ags_automation_edit_box.lo: ags/X/editor/ags_automation_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_automation_edit_box.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit_box.Tpo -c -o ags/X/editor/libgsequencer_la-ags_automation_edit_box.lo `test -f 'ags/X/editor/ags_automation_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit_box.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_automation_edit_box.c' object='ags/X/editor/libgsequencer_la-ags_automation_edit_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_automation_edit_box.lo `test -f 'ags/X/editor/ags_automation_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_edit_box.c ags/X/editor/libgsequencer_la-ags_automation_edit_callbacks.lo: ags/X/editor/ags_automation_edit_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_automation_edit_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_automation_edit_callbacks.lo `test -f 'ags/X/editor/ags_automation_edit_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_edit_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_edit_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_automation_edit_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_automation_edit_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_automation_edit_callbacks.lo `test -f 'ags/X/editor/ags_automation_edit_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_edit_callbacks.c ags/X/editor/libgsequencer_la-ags_automation_toolbar.lo: ags/X/editor/ags_automation_toolbar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_automation_toolbar.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_toolbar.Tpo -c -o ags/X/editor/libgsequencer_la-ags_automation_toolbar.lo `test -f 'ags/X/editor/ags_automation_toolbar.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_toolbar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_toolbar.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_toolbar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_automation_toolbar.c' object='ags/X/editor/libgsequencer_la-ags_automation_toolbar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_automation_toolbar.lo `test -f 'ags/X/editor/ags_automation_toolbar.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_toolbar.c ags/X/editor/libgsequencer_la-ags_automation_toolbar_callbacks.lo: ags/X/editor/ags_automation_toolbar_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_automation_toolbar_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_toolbar_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_automation_toolbar_callbacks.lo `test -f 'ags/X/editor/ags_automation_toolbar_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_toolbar_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_toolbar_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_automation_toolbar_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_automation_toolbar_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_automation_toolbar_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_automation_toolbar_callbacks.lo `test -f 'ags/X/editor/ags_automation_toolbar_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_automation_toolbar_callbacks.c ags/X/editor/libgsequencer_la-ags_crop_note_dialog_callbacks.lo: ags/X/editor/ags_crop_note_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_crop_note_dialog_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_crop_note_dialog_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_crop_note_dialog_callbacks.lo `test -f 'ags/X/editor/ags_crop_note_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_crop_note_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_crop_note_dialog_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_crop_note_dialog_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_crop_note_dialog_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_crop_note_dialog_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_crop_note_dialog_callbacks.lo `test -f 'ags/X/editor/ags_crop_note_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_crop_note_dialog_callbacks.c ags/X/editor/libgsequencer_la-ags_crop_note_dialog.lo: ags/X/editor/ags_crop_note_dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_crop_note_dialog.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_crop_note_dialog.Tpo -c -o ags/X/editor/libgsequencer_la-ags_crop_note_dialog.lo `test -f 'ags/X/editor/ags_crop_note_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_crop_note_dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_crop_note_dialog.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_crop_note_dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_crop_note_dialog.c' object='ags/X/editor/libgsequencer_la-ags_crop_note_dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_crop_note_dialog.lo `test -f 'ags/X/editor/ags_crop_note_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_crop_note_dialog.c ags/X/editor/libgsequencer_la-ags_envelope_dialog_callbacks.lo: ags/X/editor/ags_envelope_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_envelope_dialog_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_dialog_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_envelope_dialog_callbacks.lo `test -f 'ags/X/editor/ags_envelope_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_dialog_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_dialog_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_envelope_dialog_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_envelope_dialog_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_envelope_dialog_callbacks.lo `test -f 'ags/X/editor/ags_envelope_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_dialog_callbacks.c ags/X/editor/libgsequencer_la-ags_envelope_dialog.lo: ags/X/editor/ags_envelope_dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_envelope_dialog.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_dialog.Tpo -c -o ags/X/editor/libgsequencer_la-ags_envelope_dialog.lo `test -f 'ags/X/editor/ags_envelope_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_dialog.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_envelope_dialog.c' object='ags/X/editor/libgsequencer_la-ags_envelope_dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_envelope_dialog.lo `test -f 'ags/X/editor/ags_envelope_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_dialog.c ags/X/editor/libgsequencer_la-ags_envelope_editor_callbacks.lo: ags/X/editor/ags_envelope_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_envelope_editor_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_editor_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_envelope_editor_callbacks.lo `test -f 'ags/X/editor/ags_envelope_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_editor_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_editor_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_editor_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_envelope_editor_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_envelope_editor_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_envelope_editor_callbacks.lo `test -f 'ags/X/editor/ags_envelope_editor_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_editor_callbacks.c ags/X/editor/libgsequencer_la-ags_envelope_editor.lo: ags/X/editor/ags_envelope_editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_envelope_editor.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_editor.Tpo -c -o ags/X/editor/libgsequencer_la-ags_envelope_editor.lo `test -f 'ags/X/editor/ags_envelope_editor.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_editor.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_envelope_editor.c' object='ags/X/editor/libgsequencer_la-ags_envelope_editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_envelope_editor.lo `test -f 'ags/X/editor/ags_envelope_editor.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_editor.c ags/X/editor/libgsequencer_la-ags_envelope_info_callbacks.lo: ags/X/editor/ags_envelope_info_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_envelope_info_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_info_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_envelope_info_callbacks.lo `test -f 'ags/X/editor/ags_envelope_info_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_info_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_info_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_info_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_envelope_info_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_envelope_info_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_envelope_info_callbacks.lo `test -f 'ags/X/editor/ags_envelope_info_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_info_callbacks.c ags/X/editor/libgsequencer_la-ags_envelope_info.lo: ags/X/editor/ags_envelope_info.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_envelope_info.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_info.Tpo -c -o ags/X/editor/libgsequencer_la-ags_envelope_info.lo `test -f 'ags/X/editor/ags_envelope_info.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_info.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_info.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_envelope_info.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_envelope_info.c' object='ags/X/editor/libgsequencer_la-ags_envelope_info.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_envelope_info.lo `test -f 'ags/X/editor/ags_envelope_info.c' || echo '$(srcdir)/'`ags/X/editor/ags_envelope_info.c ags/X/editor/libgsequencer_la-ags_file_selection_callbacks.lo: ags/X/editor/ags_file_selection_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_file_selection_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_file_selection_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_file_selection_callbacks.lo `test -f 'ags/X/editor/ags_file_selection_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_file_selection_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_file_selection_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_file_selection_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_file_selection_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_file_selection_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_file_selection_callbacks.lo `test -f 'ags/X/editor/ags_file_selection_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_file_selection_callbacks.c ags/X/editor/libgsequencer_la-ags_file_selection.lo: ags/X/editor/ags_file_selection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_file_selection.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_file_selection.Tpo -c -o ags/X/editor/libgsequencer_la-ags_file_selection.lo `test -f 'ags/X/editor/ags_file_selection.c' || echo '$(srcdir)/'`ags/X/editor/ags_file_selection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_file_selection.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_file_selection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_file_selection.c' object='ags/X/editor/libgsequencer_la-ags_file_selection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_file_selection.lo `test -f 'ags/X/editor/ags_file_selection.c' || echo '$(srcdir)/'`ags/X/editor/ags_file_selection.c ags/X/editor/libgsequencer_la-ags_inline_player.lo: ags/X/editor/ags_inline_player.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_inline_player.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_inline_player.Tpo -c -o ags/X/editor/libgsequencer_la-ags_inline_player.lo `test -f 'ags/X/editor/ags_inline_player.c' || echo '$(srcdir)/'`ags/X/editor/ags_inline_player.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_inline_player.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_inline_player.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_inline_player.c' object='ags/X/editor/libgsequencer_la-ags_inline_player.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_inline_player.lo `test -f 'ags/X/editor/ags_inline_player.c' || echo '$(srcdir)/'`ags/X/editor/ags_inline_player.c ags/X/editor/libgsequencer_la-ags_inline_player_callbacks.lo: ags/X/editor/ags_inline_player_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_inline_player_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_inline_player_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_inline_player_callbacks.lo `test -f 'ags/X/editor/ags_inline_player_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_inline_player_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_inline_player_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_inline_player_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_inline_player_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_inline_player_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_inline_player_callbacks.lo `test -f 'ags/X/editor/ags_inline_player_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_inline_player_callbacks.c ags/X/editor/libgsequencer_la-ags_machine_radio_button.lo: ags/X/editor/ags_machine_radio_button.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_machine_radio_button.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_radio_button.Tpo -c -o ags/X/editor/libgsequencer_la-ags_machine_radio_button.lo `test -f 'ags/X/editor/ags_machine_radio_button.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_radio_button.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_radio_button.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_radio_button.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_machine_radio_button.c' object='ags/X/editor/libgsequencer_la-ags_machine_radio_button.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_machine_radio_button.lo `test -f 'ags/X/editor/ags_machine_radio_button.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_radio_button.c ags/X/editor/libgsequencer_la-ags_machine_radio_button_callbacks.lo: ags/X/editor/ags_machine_radio_button_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_machine_radio_button_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_radio_button_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_machine_radio_button_callbacks.lo `test -f 'ags/X/editor/ags_machine_radio_button_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_radio_button_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_radio_button_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_radio_button_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_machine_radio_button_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_machine_radio_button_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_machine_radio_button_callbacks.lo `test -f 'ags/X/editor/ags_machine_radio_button_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_radio_button_callbacks.c ags/X/editor/libgsequencer_la-ags_machine_selection.lo: ags/X/editor/ags_machine_selection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_machine_selection.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selection.Tpo -c -o ags/X/editor/libgsequencer_la-ags_machine_selection.lo `test -f 'ags/X/editor/ags_machine_selection.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_selection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selection.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selection.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_machine_selection.c' object='ags/X/editor/libgsequencer_la-ags_machine_selection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_machine_selection.lo `test -f 'ags/X/editor/ags_machine_selection.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_selection.c ags/X/editor/libgsequencer_la-ags_machine_selector.lo: ags/X/editor/ags_machine_selector.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_machine_selector.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selector.Tpo -c -o ags/X/editor/libgsequencer_la-ags_machine_selector.lo `test -f 'ags/X/editor/ags_machine_selector.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_selector.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selector.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selector.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_machine_selector.c' object='ags/X/editor/libgsequencer_la-ags_machine_selector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_machine_selector.lo `test -f 'ags/X/editor/ags_machine_selector.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_selector.c ags/X/editor/libgsequencer_la-ags_machine_selector_callbacks.lo: ags/X/editor/ags_machine_selector_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_machine_selector_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selector_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_machine_selector_callbacks.lo `test -f 'ags/X/editor/ags_machine_selector_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_selector_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selector_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_machine_selector_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_machine_selector_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_machine_selector_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_machine_selector_callbacks.lo `test -f 'ags/X/editor/ags_machine_selector_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_machine_selector_callbacks.c ags/X/editor/libgsequencer_la-ags_move_note_dialog_callbacks.lo: ags/X/editor/ags_move_note_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_move_note_dialog_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_move_note_dialog_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_move_note_dialog_callbacks.lo `test -f 'ags/X/editor/ags_move_note_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_move_note_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_move_note_dialog_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_move_note_dialog_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_move_note_dialog_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_move_note_dialog_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_move_note_dialog_callbacks.lo `test -f 'ags/X/editor/ags_move_note_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_move_note_dialog_callbacks.c ags/X/editor/libgsequencer_la-ags_move_note_dialog.lo: ags/X/editor/ags_move_note_dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_move_note_dialog.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_move_note_dialog.Tpo -c -o ags/X/editor/libgsequencer_la-ags_move_note_dialog.lo `test -f 'ags/X/editor/ags_move_note_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_move_note_dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_move_note_dialog.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_move_note_dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_move_note_dialog.c' object='ags/X/editor/libgsequencer_la-ags_move_note_dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_move_note_dialog.lo `test -f 'ags/X/editor/ags_move_note_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_move_note_dialog.c ags/X/editor/libgsequencer_la-ags_notation_edit.lo: ags/X/editor/ags_notation_edit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_notation_edit.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_edit.Tpo -c -o ags/X/editor/libgsequencer_la-ags_notation_edit.lo `test -f 'ags/X/editor/ags_notation_edit.c' || echo '$(srcdir)/'`ags/X/editor/ags_notation_edit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_edit.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_edit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_notation_edit.c' object='ags/X/editor/libgsequencer_la-ags_notation_edit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_notation_edit.lo `test -f 'ags/X/editor/ags_notation_edit.c' || echo '$(srcdir)/'`ags/X/editor/ags_notation_edit.c ags/X/editor/libgsequencer_la-ags_notation_edit_callbacks.lo: ags/X/editor/ags_notation_edit_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_notation_edit_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_edit_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_notation_edit_callbacks.lo `test -f 'ags/X/editor/ags_notation_edit_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_notation_edit_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_edit_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_edit_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_notation_edit_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_notation_edit_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_notation_edit_callbacks.lo `test -f 'ags/X/editor/ags_notation_edit_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_notation_edit_callbacks.c ags/X/editor/libgsequencer_la-ags_notation_toolbar.lo: ags/X/editor/ags_notation_toolbar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_notation_toolbar.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_toolbar.Tpo -c -o ags/X/editor/libgsequencer_la-ags_notation_toolbar.lo `test -f 'ags/X/editor/ags_notation_toolbar.c' || echo '$(srcdir)/'`ags/X/editor/ags_notation_toolbar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_toolbar.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_toolbar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_notation_toolbar.c' object='ags/X/editor/libgsequencer_la-ags_notation_toolbar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_notation_toolbar.lo `test -f 'ags/X/editor/ags_notation_toolbar.c' || echo '$(srcdir)/'`ags/X/editor/ags_notation_toolbar.c ags/X/editor/libgsequencer_la-ags_notation_toolbar_callbacks.lo: ags/X/editor/ags_notation_toolbar_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_notation_toolbar_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_toolbar_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_notation_toolbar_callbacks.lo `test -f 'ags/X/editor/ags_notation_toolbar_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_notation_toolbar_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_toolbar_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_notation_toolbar_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_notation_toolbar_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_notation_toolbar_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_notation_toolbar_callbacks.lo `test -f 'ags/X/editor/ags_notation_toolbar_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_notation_toolbar_callbacks.c ags/X/editor/libgsequencer_la-ags_pattern_envelope_callbacks.lo: ags/X/editor/ags_pattern_envelope_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_pattern_envelope_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_pattern_envelope_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_pattern_envelope_callbacks.lo `test -f 'ags/X/editor/ags_pattern_envelope_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_pattern_envelope_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_pattern_envelope_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_pattern_envelope_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_pattern_envelope_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_pattern_envelope_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_pattern_envelope_callbacks.lo `test -f 'ags/X/editor/ags_pattern_envelope_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_pattern_envelope_callbacks.c ags/X/editor/libgsequencer_la-ags_pattern_envelope.lo: ags/X/editor/ags_pattern_envelope.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_pattern_envelope.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_pattern_envelope.Tpo -c -o ags/X/editor/libgsequencer_la-ags_pattern_envelope.lo `test -f 'ags/X/editor/ags_pattern_envelope.c' || echo '$(srcdir)/'`ags/X/editor/ags_pattern_envelope.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_pattern_envelope.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_pattern_envelope.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_pattern_envelope.c' object='ags/X/editor/libgsequencer_la-ags_pattern_envelope.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_pattern_envelope.lo `test -f 'ags/X/editor/ags_pattern_envelope.c' || echo '$(srcdir)/'`ags/X/editor/ags_pattern_envelope.c ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog.lo: ags/X/editor/ags_position_automation_cursor_dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_automation_cursor_dialog.Tpo -c -o ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog.lo `test -f 'ags/X/editor/ags_position_automation_cursor_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_position_automation_cursor_dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_automation_cursor_dialog.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_automation_cursor_dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_position_automation_cursor_dialog.c' object='ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog.lo `test -f 'ags/X/editor/ags_position_automation_cursor_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_position_automation_cursor_dialog.c ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.lo: ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.lo `test -f 'ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_position_automation_cursor_dialog_callbacks.lo `test -f 'ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog.lo: ags/X/editor/ags_position_notation_cursor_dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_notation_cursor_dialog.Tpo -c -o ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog.lo `test -f 'ags/X/editor/ags_position_notation_cursor_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_position_notation_cursor_dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_notation_cursor_dialog.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_notation_cursor_dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_position_notation_cursor_dialog.c' object='ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog.lo `test -f 'ags/X/editor/ags_position_notation_cursor_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_position_notation_cursor_dialog.c ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.lo: ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.lo `test -f 'ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_position_notation_cursor_dialog_callbacks.lo `test -f 'ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog.lo: ags/X/editor/ags_ramp_acceleration_dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_ramp_acceleration_dialog.Tpo -c -o ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog.lo `test -f 'ags/X/editor/ags_ramp_acceleration_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_ramp_acceleration_dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_ramp_acceleration_dialog.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_ramp_acceleration_dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_ramp_acceleration_dialog.c' object='ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog.lo `test -f 'ags/X/editor/ags_ramp_acceleration_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_ramp_acceleration_dialog.c ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.lo: ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.lo `test -f 'ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_ramp_acceleration_dialog_callbacks.lo `test -f 'ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c ags/X/editor/libgsequencer_la-ags_scrolled_automation_edit_box.lo: ags/X/editor/ags_scrolled_automation_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_scrolled_automation_edit_box.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_scrolled_automation_edit_box.Tpo -c -o ags/X/editor/libgsequencer_la-ags_scrolled_automation_edit_box.lo `test -f 'ags/X/editor/ags_scrolled_automation_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_scrolled_automation_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_scrolled_automation_edit_box.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_scrolled_automation_edit_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_scrolled_automation_edit_box.c' object='ags/X/editor/libgsequencer_la-ags_scrolled_automation_edit_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_scrolled_automation_edit_box.lo `test -f 'ags/X/editor/ags_scrolled_automation_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_scrolled_automation_edit_box.c ags/X/editor/libgsequencer_la-ags_scrolled_wave_edit_box.lo: ags/X/editor/ags_scrolled_wave_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_scrolled_wave_edit_box.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_scrolled_wave_edit_box.Tpo -c -o ags/X/editor/libgsequencer_la-ags_scrolled_wave_edit_box.lo `test -f 'ags/X/editor/ags_scrolled_wave_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_scrolled_wave_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_scrolled_wave_edit_box.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_scrolled_wave_edit_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_scrolled_wave_edit_box.c' object='ags/X/editor/libgsequencer_la-ags_scrolled_wave_edit_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_scrolled_wave_edit_box.lo `test -f 'ags/X/editor/ags_scrolled_wave_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_scrolled_wave_edit_box.c ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog.lo: ags/X/editor/ags_select_acceleration_dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_acceleration_dialog.Tpo -c -o ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog.lo `test -f 'ags/X/editor/ags_select_acceleration_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_select_acceleration_dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_acceleration_dialog.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_acceleration_dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_select_acceleration_dialog.c' object='ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog.lo `test -f 'ags/X/editor/ags_select_acceleration_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_select_acceleration_dialog.c ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog_callbacks.lo: ags/X/editor/ags_select_acceleration_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_acceleration_dialog_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog_callbacks.lo `test -f 'ags/X/editor/ags_select_acceleration_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_select_acceleration_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_acceleration_dialog_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_acceleration_dialog_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_select_acceleration_dialog_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_select_acceleration_dialog_callbacks.lo `test -f 'ags/X/editor/ags_select_acceleration_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_select_acceleration_dialog_callbacks.c ags/X/editor/libgsequencer_la-ags_select_note_dialog.lo: ags/X/editor/ags_select_note_dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_select_note_dialog.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_note_dialog.Tpo -c -o ags/X/editor/libgsequencer_la-ags_select_note_dialog.lo `test -f 'ags/X/editor/ags_select_note_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_select_note_dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_note_dialog.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_note_dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_select_note_dialog.c' object='ags/X/editor/libgsequencer_la-ags_select_note_dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_select_note_dialog.lo `test -f 'ags/X/editor/ags_select_note_dialog.c' || echo '$(srcdir)/'`ags/X/editor/ags_select_note_dialog.c ags/X/editor/libgsequencer_la-ags_select_note_dialog_callbacks.lo: ags/X/editor/ags_select_note_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_select_note_dialog_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_note_dialog_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_select_note_dialog_callbacks.lo `test -f 'ags/X/editor/ags_select_note_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_select_note_dialog_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_note_dialog_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_select_note_dialog_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_select_note_dialog_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_select_note_dialog_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_select_note_dialog_callbacks.lo `test -f 'ags/X/editor/ags_select_note_dialog_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_select_note_dialog_callbacks.c ags/X/editor/libgsequencer_la-ags_sf2_chooser.lo: ags/X/editor/ags_sf2_chooser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_sf2_chooser.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_sf2_chooser.Tpo -c -o ags/X/editor/libgsequencer_la-ags_sf2_chooser.lo `test -f 'ags/X/editor/ags_sf2_chooser.c' || echo '$(srcdir)/'`ags/X/editor/ags_sf2_chooser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_sf2_chooser.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_sf2_chooser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_sf2_chooser.c' object='ags/X/editor/libgsequencer_la-ags_sf2_chooser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_sf2_chooser.lo `test -f 'ags/X/editor/ags_sf2_chooser.c' || echo '$(srcdir)/'`ags/X/editor/ags_sf2_chooser.c ags/X/editor/libgsequencer_la-ags_sf2_chooser_callbacks.lo: ags/X/editor/ags_sf2_chooser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_sf2_chooser_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_sf2_chooser_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_sf2_chooser_callbacks.lo `test -f 'ags/X/editor/ags_sf2_chooser_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_sf2_chooser_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_sf2_chooser_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_sf2_chooser_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_sf2_chooser_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_sf2_chooser_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_sf2_chooser_callbacks.lo `test -f 'ags/X/editor/ags_sf2_chooser_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_sf2_chooser_callbacks.c ags/X/editor/libgsequencer_la-ags_vautomation_edit_box.lo: ags/X/editor/ags_vautomation_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_vautomation_edit_box.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_vautomation_edit_box.Tpo -c -o ags/X/editor/libgsequencer_la-ags_vautomation_edit_box.lo `test -f 'ags/X/editor/ags_vautomation_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_vautomation_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_vautomation_edit_box.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_vautomation_edit_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_vautomation_edit_box.c' object='ags/X/editor/libgsequencer_la-ags_vautomation_edit_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_vautomation_edit_box.lo `test -f 'ags/X/editor/ags_vautomation_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_vautomation_edit_box.c ags/X/editor/libgsequencer_la-ags_vwave_edit_box.lo: ags/X/editor/ags_vwave_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_vwave_edit_box.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_vwave_edit_box.Tpo -c -o ags/X/editor/libgsequencer_la-ags_vwave_edit_box.lo `test -f 'ags/X/editor/ags_vwave_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_vwave_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_vwave_edit_box.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_vwave_edit_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_vwave_edit_box.c' object='ags/X/editor/libgsequencer_la-ags_vwave_edit_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_vwave_edit_box.lo `test -f 'ags/X/editor/ags_vwave_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_vwave_edit_box.c ags/X/editor/libgsequencer_la-ags_wave_edit.lo: ags/X/editor/ags_wave_edit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_wave_edit.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit.Tpo -c -o ags/X/editor/libgsequencer_la-ags_wave_edit.lo `test -f 'ags/X/editor/ags_wave_edit.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_edit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_wave_edit.c' object='ags/X/editor/libgsequencer_la-ags_wave_edit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_wave_edit.lo `test -f 'ags/X/editor/ags_wave_edit.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_edit.c ags/X/editor/libgsequencer_la-ags_wave_edit_box.lo: ags/X/editor/ags_wave_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_wave_edit_box.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit_box.Tpo -c -o ags/X/editor/libgsequencer_la-ags_wave_edit_box.lo `test -f 'ags/X/editor/ags_wave_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_edit_box.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit_box.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit_box.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_wave_edit_box.c' object='ags/X/editor/libgsequencer_la-ags_wave_edit_box.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_wave_edit_box.lo `test -f 'ags/X/editor/ags_wave_edit_box.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_edit_box.c ags/X/editor/libgsequencer_la-ags_wave_edit_callbacks.lo: ags/X/editor/ags_wave_edit_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_wave_edit_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_wave_edit_callbacks.lo `test -f 'ags/X/editor/ags_wave_edit_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_edit_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_edit_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_wave_edit_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_wave_edit_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_wave_edit_callbacks.lo `test -f 'ags/X/editor/ags_wave_edit_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_edit_callbacks.c ags/X/editor/libgsequencer_la-ags_wave_toolbar.lo: ags/X/editor/ags_wave_toolbar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_wave_toolbar.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_toolbar.Tpo -c -o ags/X/editor/libgsequencer_la-ags_wave_toolbar.lo `test -f 'ags/X/editor/ags_wave_toolbar.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_toolbar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_toolbar.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_toolbar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_wave_toolbar.c' object='ags/X/editor/libgsequencer_la-ags_wave_toolbar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_wave_toolbar.lo `test -f 'ags/X/editor/ags_wave_toolbar.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_toolbar.c ags/X/editor/libgsequencer_la-ags_wave_toolbar_callbacks.lo: ags/X/editor/ags_wave_toolbar_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -MT ags/X/editor/libgsequencer_la-ags_wave_toolbar_callbacks.lo -MD -MP -MF ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_toolbar_callbacks.Tpo -c -o ags/X/editor/libgsequencer_la-ags_wave_toolbar_callbacks.lo `test -f 'ags/X/editor/ags_wave_toolbar_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_toolbar_callbacks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_toolbar_callbacks.Tpo ags/X/editor/$(DEPDIR)/libgsequencer_la-ags_wave_toolbar_callbacks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/X/editor/ags_wave_toolbar_callbacks.c' object='ags/X/editor/libgsequencer_la-ags_wave_toolbar_callbacks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_la_CFLAGS) $(CFLAGS) -c -o ags/X/editor/libgsequencer_la-ags_wave_toolbar_callbacks.lo `test -f 'ags/X/editor/ags_wave_toolbar_callbacks.c' || echo '$(srcdir)/'`ags/X/editor/ags_wave_toolbar_callbacks.c ags/test/X/libgsequencer_test_la-gsequencer_setup_util.lo: ags/test/X/gsequencer_setup_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsequencer_test_la_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_test_la_CFLAGS) $(CFLAGS) -MT ags/test/X/libgsequencer_test_la-gsequencer_setup_util.lo -MD -MP -MF ags/test/X/$(DEPDIR)/libgsequencer_test_la-gsequencer_setup_util.Tpo -c -o ags/test/X/libgsequencer_test_la-gsequencer_setup_util.lo `test -f 'ags/test/X/gsequencer_setup_util.c' || echo '$(srcdir)/'`ags/test/X/gsequencer_setup_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/libgsequencer_test_la-gsequencer_setup_util.Tpo ags/test/X/$(DEPDIR)/libgsequencer_test_la-gsequencer_setup_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/gsequencer_setup_util.c' object='ags/test/X/libgsequencer_test_la-gsequencer_setup_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsequencer_test_la_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_test_la_CFLAGS) $(CFLAGS) -c -o ags/test/X/libgsequencer_test_la-gsequencer_setup_util.lo `test -f 'ags/test/X/gsequencer_setup_util.c' || echo '$(srcdir)/'`ags/test/X/gsequencer_setup_util.c ags/test/X/libgsequencer_test_la-ags_functional_test_util.lo: ags/test/X/ags_functional_test_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsequencer_test_la_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_test_la_CFLAGS) $(CFLAGS) -MT ags/test/X/libgsequencer_test_la-ags_functional_test_util.lo -MD -MP -MF ags/test/X/$(DEPDIR)/libgsequencer_test_la-ags_functional_test_util.Tpo -c -o ags/test/X/libgsequencer_test_la-ags_functional_test_util.lo `test -f 'ags/test/X/ags_functional_test_util.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_test_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/libgsequencer_test_la-ags_functional_test_util.Tpo ags/test/X/$(DEPDIR)/libgsequencer_test_la-ags_functional_test_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_test_util.c' object='ags/test/X/libgsequencer_test_la-ags_functional_test_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsequencer_test_la_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_test_la_CFLAGS) $(CFLAGS) -c -o ags/test/X/libgsequencer_test_la-ags_functional_test_util.lo `test -f 'ags/test/X/ags_functional_test_util.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_test_util.c ags/test/audio/ags_acceleration_test-ags_acceleration_test.o: ags/test/audio/ags_acceleration_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_acceleration_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_acceleration_test-ags_acceleration_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_acceleration_test-ags_acceleration_test.Tpo -c -o ags/test/audio/ags_acceleration_test-ags_acceleration_test.o `test -f 'ags/test/audio/ags_acceleration_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_acceleration_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_acceleration_test-ags_acceleration_test.Tpo ags/test/audio/$(DEPDIR)/ags_acceleration_test-ags_acceleration_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_acceleration_test.c' object='ags/test/audio/ags_acceleration_test-ags_acceleration_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_acceleration_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_acceleration_test-ags_acceleration_test.o `test -f 'ags/test/audio/ags_acceleration_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_acceleration_test.c ags/test/audio/ags_acceleration_test-ags_acceleration_test.obj: ags/test/audio/ags_acceleration_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_acceleration_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_acceleration_test-ags_acceleration_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_acceleration_test-ags_acceleration_test.Tpo -c -o ags/test/audio/ags_acceleration_test-ags_acceleration_test.obj `if test -f 'ags/test/audio/ags_acceleration_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_acceleration_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_acceleration_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_acceleration_test-ags_acceleration_test.Tpo ags/test/audio/$(DEPDIR)/ags_acceleration_test-ags_acceleration_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_acceleration_test.c' object='ags/test/audio/ags_acceleration_test-ags_acceleration_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_acceleration_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_acceleration_test-ags_acceleration_test.obj `if test -f 'ags/test/audio/ags_acceleration_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_acceleration_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_acceleration_test.c'; fi` ags/test/object/ags_application_context_test-ags_application_context_test.o: ags/test/object/ags_application_context_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_application_context_test_CFLAGS) $(CFLAGS) -MT ags/test/object/ags_application_context_test-ags_application_context_test.o -MD -MP -MF ags/test/object/$(DEPDIR)/ags_application_context_test-ags_application_context_test.Tpo -c -o ags/test/object/ags_application_context_test-ags_application_context_test.o `test -f 'ags/test/object/ags_application_context_test.c' || echo '$(srcdir)/'`ags/test/object/ags_application_context_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/object/$(DEPDIR)/ags_application_context_test-ags_application_context_test.Tpo ags/test/object/$(DEPDIR)/ags_application_context_test-ags_application_context_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/object/ags_application_context_test.c' object='ags/test/object/ags_application_context_test-ags_application_context_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_application_context_test_CFLAGS) $(CFLAGS) -c -o ags/test/object/ags_application_context_test-ags_application_context_test.o `test -f 'ags/test/object/ags_application_context_test.c' || echo '$(srcdir)/'`ags/test/object/ags_application_context_test.c ags/test/object/ags_application_context_test-ags_application_context_test.obj: ags/test/object/ags_application_context_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_application_context_test_CFLAGS) $(CFLAGS) -MT ags/test/object/ags_application_context_test-ags_application_context_test.obj -MD -MP -MF ags/test/object/$(DEPDIR)/ags_application_context_test-ags_application_context_test.Tpo -c -o ags/test/object/ags_application_context_test-ags_application_context_test.obj `if test -f 'ags/test/object/ags_application_context_test.c'; then $(CYGPATH_W) 'ags/test/object/ags_application_context_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/object/ags_application_context_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/object/$(DEPDIR)/ags_application_context_test-ags_application_context_test.Tpo ags/test/object/$(DEPDIR)/ags_application_context_test-ags_application_context_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/object/ags_application_context_test.c' object='ags/test/object/ags_application_context_test-ags_application_context_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_application_context_test_CFLAGS) $(CFLAGS) -c -o ags/test/object/ags_application_context_test-ags_application_context_test.obj `if test -f 'ags/test/object/ags_application_context_test.c'; then $(CYGPATH_W) 'ags/test/object/ags_application_context_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/object/ags_application_context_test.c'; fi` ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.o: ags/test/audio/ags_audio_application_context_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_application_context_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_audio_application_context_test-ags_audio_application_context_test.Tpo -c -o ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.o `test -f 'ags/test/audio/ags_audio_application_context_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_audio_application_context_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_audio_application_context_test-ags_audio_application_context_test.Tpo ags/test/audio/$(DEPDIR)/ags_audio_application_context_test-ags_audio_application_context_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_audio_application_context_test.c' object='ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_application_context_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.o `test -f 'ags/test/audio/ags_audio_application_context_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_audio_application_context_test.c ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.obj: ags/test/audio/ags_audio_application_context_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_application_context_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_audio_application_context_test-ags_audio_application_context_test.Tpo -c -o ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.obj `if test -f 'ags/test/audio/ags_audio_application_context_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_audio_application_context_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_audio_application_context_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_audio_application_context_test-ags_audio_application_context_test.Tpo ags/test/audio/$(DEPDIR)/ags_audio_application_context_test-ags_audio_application_context_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_audio_application_context_test.c' object='ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_application_context_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_audio_application_context_test-ags_audio_application_context_test.obj `if test -f 'ags/test/audio/ags_audio_application_context_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_audio_application_context_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_audio_application_context_test.c'; fi` ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.o: ags/test/audio/ags_audio_connection_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_connection_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_audio_connection_test-ags_audio_connection_test.Tpo -c -o ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.o `test -f 'ags/test/audio/ags_audio_connection_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_audio_connection_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_audio_connection_test-ags_audio_connection_test.Tpo ags/test/audio/$(DEPDIR)/ags_audio_connection_test-ags_audio_connection_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_audio_connection_test.c' object='ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_connection_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.o `test -f 'ags/test/audio/ags_audio_connection_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_audio_connection_test.c ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.obj: ags/test/audio/ags_audio_connection_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_connection_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_audio_connection_test-ags_audio_connection_test.Tpo -c -o ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.obj `if test -f 'ags/test/audio/ags_audio_connection_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_audio_connection_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_audio_connection_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_audio_connection_test-ags_audio_connection_test.Tpo ags/test/audio/$(DEPDIR)/ags_audio_connection_test-ags_audio_connection_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_audio_connection_test.c' object='ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_connection_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_audio_connection_test-ags_audio_connection_test.obj `if test -f 'ags/test/audio/ags_audio_connection_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_audio_connection_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_audio_connection_test.c'; fi` ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.o: ags/test/audio/ags_audio_signal_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_signal_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_audio_signal_test-ags_audio_signal_test.Tpo -c -o ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.o `test -f 'ags/test/audio/ags_audio_signal_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_audio_signal_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_audio_signal_test-ags_audio_signal_test.Tpo ags/test/audio/$(DEPDIR)/ags_audio_signal_test-ags_audio_signal_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_audio_signal_test.c' object='ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_signal_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.o `test -f 'ags/test/audio/ags_audio_signal_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_audio_signal_test.c ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.obj: ags/test/audio/ags_audio_signal_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_signal_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_audio_signal_test-ags_audio_signal_test.Tpo -c -o ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.obj `if test -f 'ags/test/audio/ags_audio_signal_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_audio_signal_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_audio_signal_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_audio_signal_test-ags_audio_signal_test.Tpo ags/test/audio/$(DEPDIR)/ags_audio_signal_test-ags_audio_signal_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_audio_signal_test.c' object='ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_signal_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_audio_signal_test-ags_audio_signal_test.obj `if test -f 'ags/test/audio/ags_audio_signal_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_audio_signal_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_audio_signal_test.c'; fi` ags/test/audio/ags_audio_test-ags_audio_test.o: ags/test/audio/ags_audio_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_audio_test-ags_audio_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_audio_test-ags_audio_test.Tpo -c -o ags/test/audio/ags_audio_test-ags_audio_test.o `test -f 'ags/test/audio/ags_audio_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_audio_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_audio_test-ags_audio_test.Tpo ags/test/audio/$(DEPDIR)/ags_audio_test-ags_audio_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_audio_test.c' object='ags/test/audio/ags_audio_test-ags_audio_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_audio_test-ags_audio_test.o `test -f 'ags/test/audio/ags_audio_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_audio_test.c ags/test/audio/ags_audio_test-ags_audio_test.obj: ags/test/audio/ags_audio_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_audio_test-ags_audio_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_audio_test-ags_audio_test.Tpo -c -o ags/test/audio/ags_audio_test-ags_audio_test.obj `if test -f 'ags/test/audio/ags_audio_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_audio_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_audio_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_audio_test-ags_audio_test.Tpo ags/test/audio/$(DEPDIR)/ags_audio_test-ags_audio_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_audio_test.c' object='ags/test/audio/ags_audio_test-ags_audio_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_audio_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_audio_test-ags_audio_test.obj `if test -f 'ags/test/audio/ags_audio_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_audio_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_audio_test.c'; fi` ags/test/audio/ags_automation_test-ags_automation_test.o: ags/test/audio/ags_automation_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_automation_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_automation_test-ags_automation_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_automation_test-ags_automation_test.Tpo -c -o ags/test/audio/ags_automation_test-ags_automation_test.o `test -f 'ags/test/audio/ags_automation_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_automation_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_automation_test-ags_automation_test.Tpo ags/test/audio/$(DEPDIR)/ags_automation_test-ags_automation_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_automation_test.c' object='ags/test/audio/ags_automation_test-ags_automation_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_automation_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_automation_test-ags_automation_test.o `test -f 'ags/test/audio/ags_automation_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_automation_test.c ags/test/audio/ags_automation_test-ags_automation_test.obj: ags/test/audio/ags_automation_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_automation_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_automation_test-ags_automation_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_automation_test-ags_automation_test.Tpo -c -o ags/test/audio/ags_automation_test-ags_automation_test.obj `if test -f 'ags/test/audio/ags_automation_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_automation_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_automation_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_automation_test-ags_automation_test.Tpo ags/test/audio/$(DEPDIR)/ags_automation_test-ags_automation_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_automation_test.c' object='ags/test/audio/ags_automation_test-ags_automation_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_automation_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_automation_test-ags_automation_test.obj `if test -f 'ags/test/audio/ags_automation_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_automation_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_automation_test.c'; fi` ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.o: ags/test/plugin/ags_base_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_base_plugin_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_base_plugin_test-ags_base_plugin_test.Tpo -c -o ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.o `test -f 'ags/test/plugin/ags_base_plugin_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_base_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_base_plugin_test-ags_base_plugin_test.Tpo ags/test/plugin/$(DEPDIR)/ags_base_plugin_test-ags_base_plugin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_base_plugin_test.c' object='ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_base_plugin_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.o `test -f 'ags/test/plugin/ags_base_plugin_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_base_plugin_test.c ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.obj: ags/test/plugin/ags_base_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_base_plugin_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_base_plugin_test-ags_base_plugin_test.Tpo -c -o ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.obj `if test -f 'ags/test/plugin/ags_base_plugin_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_base_plugin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_base_plugin_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_base_plugin_test-ags_base_plugin_test.Tpo ags/test/plugin/$(DEPDIR)/ags_base_plugin_test-ags_base_plugin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_base_plugin_test.c' object='ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_base_plugin_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_base_plugin_test-ags_base_plugin_test.obj `if test -f 'ags/test/plugin/ags_base_plugin_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_base_plugin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_base_plugin_test.c'; fi` ags/test/audio/ags_channel_test-ags_channel_test.o: ags/test/audio/ags_channel_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_channel_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_channel_test-ags_channel_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_channel_test-ags_channel_test.Tpo -c -o ags/test/audio/ags_channel_test-ags_channel_test.o `test -f 'ags/test/audio/ags_channel_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_channel_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_channel_test-ags_channel_test.Tpo ags/test/audio/$(DEPDIR)/ags_channel_test-ags_channel_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_channel_test.c' object='ags/test/audio/ags_channel_test-ags_channel_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_channel_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_channel_test-ags_channel_test.o `test -f 'ags/test/audio/ags_channel_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_channel_test.c ags/test/audio/ags_channel_test-ags_channel_test.obj: ags/test/audio/ags_channel_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_channel_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_channel_test-ags_channel_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_channel_test-ags_channel_test.Tpo -c -o ags/test/audio/ags_channel_test-ags_channel_test.obj `if test -f 'ags/test/audio/ags_channel_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_channel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_channel_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_channel_test-ags_channel_test.Tpo ags/test/audio/$(DEPDIR)/ags_channel_test-ags_channel_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_channel_test.c' object='ags/test/audio/ags_channel_test-ags_channel_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_channel_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_channel_test-ags_channel_test.obj `if test -f 'ags/test/audio/ags_channel_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_channel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_channel_test.c'; fi` ags/test/lib/ags_complex_test-ags_complex_test.o: ags/test/lib/ags_complex_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_complex_test_CFLAGS) $(CFLAGS) -MT ags/test/lib/ags_complex_test-ags_complex_test.o -MD -MP -MF ags/test/lib/$(DEPDIR)/ags_complex_test-ags_complex_test.Tpo -c -o ags/test/lib/ags_complex_test-ags_complex_test.o `test -f 'ags/test/lib/ags_complex_test.c' || echo '$(srcdir)/'`ags/test/lib/ags_complex_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/lib/$(DEPDIR)/ags_complex_test-ags_complex_test.Tpo ags/test/lib/$(DEPDIR)/ags_complex_test-ags_complex_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/lib/ags_complex_test.c' object='ags/test/lib/ags_complex_test-ags_complex_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_complex_test_CFLAGS) $(CFLAGS) -c -o ags/test/lib/ags_complex_test-ags_complex_test.o `test -f 'ags/test/lib/ags_complex_test.c' || echo '$(srcdir)/'`ags/test/lib/ags_complex_test.c ags/test/lib/ags_complex_test-ags_complex_test.obj: ags/test/lib/ags_complex_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_complex_test_CFLAGS) $(CFLAGS) -MT ags/test/lib/ags_complex_test-ags_complex_test.obj -MD -MP -MF ags/test/lib/$(DEPDIR)/ags_complex_test-ags_complex_test.Tpo -c -o ags/test/lib/ags_complex_test-ags_complex_test.obj `if test -f 'ags/test/lib/ags_complex_test.c'; then $(CYGPATH_W) 'ags/test/lib/ags_complex_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/lib/ags_complex_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/lib/$(DEPDIR)/ags_complex_test-ags_complex_test.Tpo ags/test/lib/$(DEPDIR)/ags_complex_test-ags_complex_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/lib/ags_complex_test.c' object='ags/test/lib/ags_complex_test-ags_complex_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_complex_test_CFLAGS) $(CFLAGS) -c -o ags/test/lib/ags_complex_test-ags_complex_test.obj `if test -f 'ags/test/lib/ags_complex_test.c'; then $(CYGPATH_W) 'ags/test/lib/ags_complex_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/lib/ags_complex_test.c'; fi` ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.o: ags/test/thread/ags_condition_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_condition_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_condition_manager_test-ags_condition_manager_test.Tpo -c -o ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.o `test -f 'ags/test/thread/ags_condition_manager_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_condition_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_condition_manager_test-ags_condition_manager_test.Tpo ags/test/thread/$(DEPDIR)/ags_condition_manager_test-ags_condition_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_condition_manager_test.c' object='ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_condition_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.o `test -f 'ags/test/thread/ags_condition_manager_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_condition_manager_test.c ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.obj: ags/test/thread/ags_condition_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_condition_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_condition_manager_test-ags_condition_manager_test.Tpo -c -o ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.obj `if test -f 'ags/test/thread/ags_condition_manager_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_condition_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_condition_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_condition_manager_test-ags_condition_manager_test.Tpo ags/test/thread/$(DEPDIR)/ags_condition_manager_test-ags_condition_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_condition_manager_test.c' object='ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_condition_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_condition_manager_test-ags_condition_manager_test.obj `if test -f 'ags/test/thread/ags_condition_manager_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_condition_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_condition_manager_test.c'; fi` ags/test/object/ags_config_test-ags_config_test.o: ags/test/object/ags_config_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_config_test_CFLAGS) $(CFLAGS) -MT ags/test/object/ags_config_test-ags_config_test.o -MD -MP -MF ags/test/object/$(DEPDIR)/ags_config_test-ags_config_test.Tpo -c -o ags/test/object/ags_config_test-ags_config_test.o `test -f 'ags/test/object/ags_config_test.c' || echo '$(srcdir)/'`ags/test/object/ags_config_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/object/$(DEPDIR)/ags_config_test-ags_config_test.Tpo ags/test/object/$(DEPDIR)/ags_config_test-ags_config_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/object/ags_config_test.c' object='ags/test/object/ags_config_test-ags_config_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_config_test_CFLAGS) $(CFLAGS) -c -o ags/test/object/ags_config_test-ags_config_test.o `test -f 'ags/test/object/ags_config_test.c' || echo '$(srcdir)/'`ags/test/object/ags_config_test.c ags/test/object/ags_config_test-ags_config_test.obj: ags/test/object/ags_config_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_config_test_CFLAGS) $(CFLAGS) -MT ags/test/object/ags_config_test-ags_config_test.obj -MD -MP -MF ags/test/object/$(DEPDIR)/ags_config_test-ags_config_test.Tpo -c -o ags/test/object/ags_config_test-ags_config_test.obj `if test -f 'ags/test/object/ags_config_test.c'; then $(CYGPATH_W) 'ags/test/object/ags_config_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/object/ags_config_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/object/$(DEPDIR)/ags_config_test-ags_config_test.Tpo ags/test/object/$(DEPDIR)/ags_config_test-ags_config_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/object/ags_config_test.c' object='ags/test/object/ags_config_test-ags_config_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_config_test_CFLAGS) $(CFLAGS) -c -o ags/test/object/ags_config_test-ags_config_test.obj `if test -f 'ags/test/object/ags_config_test.c'; then $(CYGPATH_W) 'ags/test/object/ags_config_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/object/ags_config_test.c'; fi` ags/test/object/ags_connection_manager_test-ags_connection_manager_test.o: ags/test/object/ags_connection_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_connection_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/object/ags_connection_manager_test-ags_connection_manager_test.o -MD -MP -MF ags/test/object/$(DEPDIR)/ags_connection_manager_test-ags_connection_manager_test.Tpo -c -o ags/test/object/ags_connection_manager_test-ags_connection_manager_test.o `test -f 'ags/test/object/ags_connection_manager_test.c' || echo '$(srcdir)/'`ags/test/object/ags_connection_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/object/$(DEPDIR)/ags_connection_manager_test-ags_connection_manager_test.Tpo ags/test/object/$(DEPDIR)/ags_connection_manager_test-ags_connection_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/object/ags_connection_manager_test.c' object='ags/test/object/ags_connection_manager_test-ags_connection_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_connection_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/object/ags_connection_manager_test-ags_connection_manager_test.o `test -f 'ags/test/object/ags_connection_manager_test.c' || echo '$(srcdir)/'`ags/test/object/ags_connection_manager_test.c ags/test/object/ags_connection_manager_test-ags_connection_manager_test.obj: ags/test/object/ags_connection_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_connection_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/object/ags_connection_manager_test-ags_connection_manager_test.obj -MD -MP -MF ags/test/object/$(DEPDIR)/ags_connection_manager_test-ags_connection_manager_test.Tpo -c -o ags/test/object/ags_connection_manager_test-ags_connection_manager_test.obj `if test -f 'ags/test/object/ags_connection_manager_test.c'; then $(CYGPATH_W) 'ags/test/object/ags_connection_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/object/ags_connection_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/object/$(DEPDIR)/ags_connection_manager_test-ags_connection_manager_test.Tpo ags/test/object/$(DEPDIR)/ags_connection_manager_test-ags_connection_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/object/ags_connection_manager_test.c' object='ags/test/object/ags_connection_manager_test-ags_connection_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_connection_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/object/ags_connection_manager_test-ags_connection_manager_test.obj `if test -f 'ags/test/object/ags_connection_manager_test.c'; then $(CYGPATH_W) 'ags/test/object/ags_connection_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/object/ags_connection_manager_test.c'; fi` ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.o: ags/test/thread/ags_destroy_worker_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_destroy_worker_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_destroy_worker_test-ags_destroy_worker_test.Tpo -c -o ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.o `test -f 'ags/test/thread/ags_destroy_worker_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_destroy_worker_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_destroy_worker_test-ags_destroy_worker_test.Tpo ags/test/thread/$(DEPDIR)/ags_destroy_worker_test-ags_destroy_worker_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_destroy_worker_test.c' object='ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_destroy_worker_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.o `test -f 'ags/test/thread/ags_destroy_worker_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_destroy_worker_test.c ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.obj: ags/test/thread/ags_destroy_worker_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_destroy_worker_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_destroy_worker_test-ags_destroy_worker_test.Tpo -c -o ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.obj `if test -f 'ags/test/thread/ags_destroy_worker_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_destroy_worker_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_destroy_worker_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_destroy_worker_test-ags_destroy_worker_test.Tpo ags/test/thread/$(DEPDIR)/ags_destroy_worker_test-ags_destroy_worker_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_destroy_worker_test.c' object='ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_destroy_worker_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_destroy_worker_test-ags_destroy_worker_test.obj `if test -f 'ags/test/thread/ags_destroy_worker_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_destroy_worker_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_destroy_worker_test.c'; fi` ags/test/audio/ags_devout_test-ags_devout_test.o: ags/test/audio/ags_devout_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_devout_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_devout_test-ags_devout_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_devout_test-ags_devout_test.Tpo -c -o ags/test/audio/ags_devout_test-ags_devout_test.o `test -f 'ags/test/audio/ags_devout_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_devout_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_devout_test-ags_devout_test.Tpo ags/test/audio/$(DEPDIR)/ags_devout_test-ags_devout_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_devout_test.c' object='ags/test/audio/ags_devout_test-ags_devout_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_devout_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_devout_test-ags_devout_test.o `test -f 'ags/test/audio/ags_devout_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_devout_test.c ags/test/audio/ags_devout_test-ags_devout_test.obj: ags/test/audio/ags_devout_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_devout_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_devout_test-ags_devout_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_devout_test-ags_devout_test.Tpo -c -o ags/test/audio/ags_devout_test-ags_devout_test.obj `if test -f 'ags/test/audio/ags_devout_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_devout_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_devout_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_devout_test-ags_devout_test.Tpo ags/test/audio/$(DEPDIR)/ags_devout_test-ags_devout_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_devout_test.c' object='ags/test/audio/ags_devout_test-ags_devout_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_devout_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_devout_test-ags_devout_test.obj `if test -f 'ags/test/audio/ags_devout_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_devout_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_devout_test.c'; fi` ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.o: ags/test/plugin/ags_dssi_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_dssi_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_dssi_manager_test-ags_dssi_manager_test.Tpo -c -o ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.o `test -f 'ags/test/plugin/ags_dssi_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_dssi_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_dssi_manager_test-ags_dssi_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_dssi_manager_test-ags_dssi_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_dssi_manager_test.c' object='ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_dssi_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.o `test -f 'ags/test/plugin/ags_dssi_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_dssi_manager_test.c ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.obj: ags/test/plugin/ags_dssi_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_dssi_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_dssi_manager_test-ags_dssi_manager_test.Tpo -c -o ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.obj `if test -f 'ags/test/plugin/ags_dssi_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_dssi_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_dssi_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_dssi_manager_test-ags_dssi_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_dssi_manager_test-ags_dssi_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_dssi_manager_test.c' object='ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_dssi_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_dssi_manager_test-ags_dssi_manager_test.obj `if test -f 'ags/test/plugin/ags_dssi_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_dssi_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_dssi_manager_test.c'; fi` ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.o: ags/test/plugin/ags_dssi_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_dssi_plugin_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_dssi_plugin_test-ags_dssi_plugin_test.Tpo -c -o ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.o `test -f 'ags/test/plugin/ags_dssi_plugin_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_dssi_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_dssi_plugin_test-ags_dssi_plugin_test.Tpo ags/test/plugin/$(DEPDIR)/ags_dssi_plugin_test-ags_dssi_plugin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_dssi_plugin_test.c' object='ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_dssi_plugin_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.o `test -f 'ags/test/plugin/ags_dssi_plugin_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_dssi_plugin_test.c ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.obj: ags/test/plugin/ags_dssi_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_dssi_plugin_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_dssi_plugin_test-ags_dssi_plugin_test.Tpo -c -o ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.obj `if test -f 'ags/test/plugin/ags_dssi_plugin_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_dssi_plugin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_dssi_plugin_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_dssi_plugin_test-ags_dssi_plugin_test.Tpo ags/test/plugin/$(DEPDIR)/ags_dssi_plugin_test-ags_dssi_plugin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_dssi_plugin_test.c' object='ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_dssi_plugin_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_dssi_plugin_test-ags_dssi_plugin_test.obj `if test -f 'ags/test/plugin/ags_dssi_plugin_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_dssi_plugin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_dssi_plugin_test.c'; fi` ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.o: ags/test/file/ags_file_id_ref_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_id_ref_test_CFLAGS) $(CFLAGS) -MT ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.o -MD -MP -MF ags/test/file/$(DEPDIR)/ags_file_id_ref_test-ags_file_id_ref_test.Tpo -c -o ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.o `test -f 'ags/test/file/ags_file_id_ref_test.c' || echo '$(srcdir)/'`ags/test/file/ags_file_id_ref_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/file/$(DEPDIR)/ags_file_id_ref_test-ags_file_id_ref_test.Tpo ags/test/file/$(DEPDIR)/ags_file_id_ref_test-ags_file_id_ref_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/file/ags_file_id_ref_test.c' object='ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_id_ref_test_CFLAGS) $(CFLAGS) -c -o ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.o `test -f 'ags/test/file/ags_file_id_ref_test.c' || echo '$(srcdir)/'`ags/test/file/ags_file_id_ref_test.c ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.obj: ags/test/file/ags_file_id_ref_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_id_ref_test_CFLAGS) $(CFLAGS) -MT ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.obj -MD -MP -MF ags/test/file/$(DEPDIR)/ags_file_id_ref_test-ags_file_id_ref_test.Tpo -c -o ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.obj `if test -f 'ags/test/file/ags_file_id_ref_test.c'; then $(CYGPATH_W) 'ags/test/file/ags_file_id_ref_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/file/ags_file_id_ref_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/file/$(DEPDIR)/ags_file_id_ref_test-ags_file_id_ref_test.Tpo ags/test/file/$(DEPDIR)/ags_file_id_ref_test-ags_file_id_ref_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/file/ags_file_id_ref_test.c' object='ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_id_ref_test_CFLAGS) $(CFLAGS) -c -o ags/test/file/ags_file_id_ref_test-ags_file_id_ref_test.obj `if test -f 'ags/test/file/ags_file_id_ref_test.c'; then $(CYGPATH_W) 'ags/test/file/ags_file_id_ref_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/file/ags_file_id_ref_test.c'; fi` ags/test/file/ags_file_launch_test-ags_file_launch_test.o: ags/test/file/ags_file_launch_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_launch_test_CFLAGS) $(CFLAGS) -MT ags/test/file/ags_file_launch_test-ags_file_launch_test.o -MD -MP -MF ags/test/file/$(DEPDIR)/ags_file_launch_test-ags_file_launch_test.Tpo -c -o ags/test/file/ags_file_launch_test-ags_file_launch_test.o `test -f 'ags/test/file/ags_file_launch_test.c' || echo '$(srcdir)/'`ags/test/file/ags_file_launch_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/file/$(DEPDIR)/ags_file_launch_test-ags_file_launch_test.Tpo ags/test/file/$(DEPDIR)/ags_file_launch_test-ags_file_launch_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/file/ags_file_launch_test.c' object='ags/test/file/ags_file_launch_test-ags_file_launch_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_launch_test_CFLAGS) $(CFLAGS) -c -o ags/test/file/ags_file_launch_test-ags_file_launch_test.o `test -f 'ags/test/file/ags_file_launch_test.c' || echo '$(srcdir)/'`ags/test/file/ags_file_launch_test.c ags/test/file/ags_file_launch_test-ags_file_launch_test.obj: ags/test/file/ags_file_launch_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_launch_test_CFLAGS) $(CFLAGS) -MT ags/test/file/ags_file_launch_test-ags_file_launch_test.obj -MD -MP -MF ags/test/file/$(DEPDIR)/ags_file_launch_test-ags_file_launch_test.Tpo -c -o ags/test/file/ags_file_launch_test-ags_file_launch_test.obj `if test -f 'ags/test/file/ags_file_launch_test.c'; then $(CYGPATH_W) 'ags/test/file/ags_file_launch_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/file/ags_file_launch_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/file/$(DEPDIR)/ags_file_launch_test-ags_file_launch_test.Tpo ags/test/file/$(DEPDIR)/ags_file_launch_test-ags_file_launch_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/file/ags_file_launch_test.c' object='ags/test/file/ags_file_launch_test-ags_file_launch_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_launch_test_CFLAGS) $(CFLAGS) -c -o ags/test/file/ags_file_launch_test-ags_file_launch_test.obj `if test -f 'ags/test/file/ags_file_launch_test.c'; then $(CYGPATH_W) 'ags/test/file/ags_file_launch_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/file/ags_file_launch_test.c'; fi` ags/test/file/ags_file_lookup_test-ags_file_lookup_test.o: ags/test/file/ags_file_lookup_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_lookup_test_CFLAGS) $(CFLAGS) -MT ags/test/file/ags_file_lookup_test-ags_file_lookup_test.o -MD -MP -MF ags/test/file/$(DEPDIR)/ags_file_lookup_test-ags_file_lookup_test.Tpo -c -o ags/test/file/ags_file_lookup_test-ags_file_lookup_test.o `test -f 'ags/test/file/ags_file_lookup_test.c' || echo '$(srcdir)/'`ags/test/file/ags_file_lookup_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/file/$(DEPDIR)/ags_file_lookup_test-ags_file_lookup_test.Tpo ags/test/file/$(DEPDIR)/ags_file_lookup_test-ags_file_lookup_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/file/ags_file_lookup_test.c' object='ags/test/file/ags_file_lookup_test-ags_file_lookup_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_lookup_test_CFLAGS) $(CFLAGS) -c -o ags/test/file/ags_file_lookup_test-ags_file_lookup_test.o `test -f 'ags/test/file/ags_file_lookup_test.c' || echo '$(srcdir)/'`ags/test/file/ags_file_lookup_test.c ags/test/file/ags_file_lookup_test-ags_file_lookup_test.obj: ags/test/file/ags_file_lookup_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_lookup_test_CFLAGS) $(CFLAGS) -MT ags/test/file/ags_file_lookup_test-ags_file_lookup_test.obj -MD -MP -MF ags/test/file/$(DEPDIR)/ags_file_lookup_test-ags_file_lookup_test.Tpo -c -o ags/test/file/ags_file_lookup_test-ags_file_lookup_test.obj `if test -f 'ags/test/file/ags_file_lookup_test.c'; then $(CYGPATH_W) 'ags/test/file/ags_file_lookup_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/file/ags_file_lookup_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/file/$(DEPDIR)/ags_file_lookup_test-ags_file_lookup_test.Tpo ags/test/file/$(DEPDIR)/ags_file_lookup_test-ags_file_lookup_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/file/ags_file_lookup_test.c' object='ags/test/file/ags_file_lookup_test-ags_file_lookup_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_lookup_test_CFLAGS) $(CFLAGS) -c -o ags/test/file/ags_file_lookup_test-ags_file_lookup_test.obj `if test -f 'ags/test/file/ags_file_lookup_test.c'; then $(CYGPATH_W) 'ags/test/file/ags_file_lookup_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/file/ags_file_lookup_test.c'; fi` ags/test/file/ags_file_test-ags_file_test.o: ags/test/file/ags_file_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_test_CFLAGS) $(CFLAGS) -MT ags/test/file/ags_file_test-ags_file_test.o -MD -MP -MF ags/test/file/$(DEPDIR)/ags_file_test-ags_file_test.Tpo -c -o ags/test/file/ags_file_test-ags_file_test.o `test -f 'ags/test/file/ags_file_test.c' || echo '$(srcdir)/'`ags/test/file/ags_file_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/file/$(DEPDIR)/ags_file_test-ags_file_test.Tpo ags/test/file/$(DEPDIR)/ags_file_test-ags_file_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/file/ags_file_test.c' object='ags/test/file/ags_file_test-ags_file_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_test_CFLAGS) $(CFLAGS) -c -o ags/test/file/ags_file_test-ags_file_test.o `test -f 'ags/test/file/ags_file_test.c' || echo '$(srcdir)/'`ags/test/file/ags_file_test.c ags/test/file/ags_file_test-ags_file_test.obj: ags/test/file/ags_file_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_test_CFLAGS) $(CFLAGS) -MT ags/test/file/ags_file_test-ags_file_test.obj -MD -MP -MF ags/test/file/$(DEPDIR)/ags_file_test-ags_file_test.Tpo -c -o ags/test/file/ags_file_test-ags_file_test.obj `if test -f 'ags/test/file/ags_file_test.c'; then $(CYGPATH_W) 'ags/test/file/ags_file_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/file/ags_file_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/file/$(DEPDIR)/ags_file_test-ags_file_test.Tpo ags/test/file/$(DEPDIR)/ags_file_test-ags_file_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/file/ags_file_test.c' object='ags/test/file/ags_file_test-ags_file_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_file_test_CFLAGS) $(CFLAGS) -c -o ags/test/file/ags_file_test-ags_file_test.obj `if test -f 'ags/test/file/ags_file_test.c'; then $(CYGPATH_W) 'ags/test/file/ags_file_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/file/ags_file_test.c'; fi` ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.o: ags/test/audio/ags_functional_audio_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_functional_audio_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_functional_audio_test-ags_functional_audio_test.Tpo -c -o ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.o `test -f 'ags/test/audio/ags_functional_audio_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_functional_audio_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_functional_audio_test-ags_functional_audio_test.Tpo ags/test/audio/$(DEPDIR)/ags_functional_audio_test-ags_functional_audio_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_functional_audio_test.c' object='ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_functional_audio_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.o `test -f 'ags/test/audio/ags_functional_audio_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_functional_audio_test.c ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.obj: ags/test/audio/ags_functional_audio_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_functional_audio_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_functional_audio_test-ags_functional_audio_test.Tpo -c -o ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.obj `if test -f 'ags/test/audio/ags_functional_audio_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_functional_audio_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_functional_audio_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_functional_audio_test-ags_functional_audio_test.Tpo ags/test/audio/$(DEPDIR)/ags_functional_audio_test-ags_functional_audio_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_functional_audio_test.c' object='ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_functional_audio_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_functional_audio_test-ags_functional_audio_test.obj `if test -f 'ags/test/audio/ags_functional_audio_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_functional_audio_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_functional_audio_test.c'; fi` ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.o: ags/test/X/machine/ags_functional_drum_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_drum_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_drum_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_drum_test-ags_functional_drum_test.Tpo -c -o ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.o `test -f 'ags/test/X/machine/ags_functional_drum_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_drum_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_drum_test-ags_functional_drum_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_drum_test-ags_functional_drum_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_drum_test.c' object='ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_drum_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_drum_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.o `test -f 'ags/test/X/machine/ags_functional_drum_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_drum_test.c ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.obj: ags/test/X/machine/ags_functional_drum_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_drum_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_drum_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_drum_test-ags_functional_drum_test.Tpo -c -o ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.obj `if test -f 'ags/test/X/machine/ags_functional_drum_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_drum_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_drum_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_drum_test-ags_functional_drum_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_drum_test-ags_functional_drum_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_drum_test.c' object='ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_drum_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_drum_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_drum_test-ags_functional_drum_test.obj `if test -f 'ags/test/X/machine/ags_functional_drum_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_drum_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_drum_test.c'; fi` ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.o: ags/test/X/ags_functional_editor_workflow_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_editor_workflow_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_editor_workflow_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.Tpo -c -o ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.o `test -f 'ags/test/X/ags_functional_editor_workflow_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_editor_workflow_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_editor_workflow_test.c' object='ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_editor_workflow_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_editor_workflow_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.o `test -f 'ags/test/X/ags_functional_editor_workflow_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_editor_workflow_test.c ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj: ags/test/X/ags_functional_editor_workflow_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_editor_workflow_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_editor_workflow_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.Tpo -c -o ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj `if test -f 'ags/test/X/ags_functional_editor_workflow_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_editor_workflow_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_editor_workflow_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_editor_workflow_test.c' object='ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_editor_workflow_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_editor_workflow_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj `if test -f 'ags/test/X/ags_functional_editor_workflow_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_editor_workflow_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_editor_workflow_test.c'; fi` ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.o: ags/test/X/machine/ags_functional_ffplayer_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_ffplayer_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_ffplayer_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_ffplayer_test-ags_functional_ffplayer_test.Tpo -c -o ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.o `test -f 'ags/test/X/machine/ags_functional_ffplayer_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_ffplayer_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_ffplayer_test-ags_functional_ffplayer_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_ffplayer_test-ags_functional_ffplayer_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_ffplayer_test.c' object='ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_ffplayer_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_ffplayer_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.o `test -f 'ags/test/X/machine/ags_functional_ffplayer_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_ffplayer_test.c ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.obj: ags/test/X/machine/ags_functional_ffplayer_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_ffplayer_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_ffplayer_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_ffplayer_test-ags_functional_ffplayer_test.Tpo -c -o ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.obj `if test -f 'ags/test/X/machine/ags_functional_ffplayer_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_ffplayer_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_ffplayer_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_ffplayer_test-ags_functional_ffplayer_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_ffplayer_test-ags_functional_ffplayer_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_ffplayer_test.c' object='ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_ffplayer_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_ffplayer_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_ffplayer_test-ags_functional_ffplayer_test.obj `if test -f 'ags/test/X/machine/ags_functional_ffplayer_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_ffplayer_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_ffplayer_test.c'; fi` ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o: ags/test/X/ags_functional_line_member_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_line_member_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_line_member_add_and_destroy_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Tpo -c -o ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o `test -f 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_line_member_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_line_member_add_and_destroy_test.c' object='ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_line_member_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_line_member_add_and_destroy_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o `test -f 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_line_member_add_and_destroy_test.c ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj: ags/test/X/ags_functional_line_member_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_line_member_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_line_member_add_and_destroy_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Tpo -c -o ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj `if test -f 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_line_member_add_and_destroy_test.c' object='ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_line_member_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_line_member_add_and_destroy_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj `if test -f 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; fi` ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o: ags/test/X/ags_functional_machine_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_machine_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_machine_add_and_destroy_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Tpo -c -o ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o `test -f 'ags/test/X/ags_functional_machine_add_and_destroy_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_machine_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_machine_add_and_destroy_test.c' object='ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_machine_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_machine_add_and_destroy_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o `test -f 'ags/test/X/ags_functional_machine_add_and_destroy_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_machine_add_and_destroy_test.c ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj: ags/test/X/ags_functional_machine_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_machine_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_machine_add_and_destroy_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Tpo -c -o ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj `if test -f 'ags/test/X/ags_functional_machine_add_and_destroy_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_machine_add_and_destroy_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_machine_add_and_destroy_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_machine_add_and_destroy_test.c' object='ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_machine_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_machine_add_and_destroy_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj `if test -f 'ags/test/X/ags_functional_machine_add_and_destroy_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_machine_add_and_destroy_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_machine_add_and_destroy_test.c'; fi` ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.o: ags/test/X/ags_functional_machine_link_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_machine_link_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_machine_link_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_machine_link_test-ags_functional_machine_link_test.Tpo -c -o ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.o `test -f 'ags/test/X/ags_functional_machine_link_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_machine_link_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_machine_link_test-ags_functional_machine_link_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_machine_link_test-ags_functional_machine_link_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_machine_link_test.c' object='ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_machine_link_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_machine_link_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.o `test -f 'ags/test/X/ags_functional_machine_link_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_machine_link_test.c ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.obj: ags/test/X/ags_functional_machine_link_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_machine_link_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_machine_link_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_machine_link_test-ags_functional_machine_link_test.Tpo -c -o ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.obj `if test -f 'ags/test/X/ags_functional_machine_link_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_machine_link_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_machine_link_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_machine_link_test-ags_functional_machine_link_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_machine_link_test-ags_functional_machine_link_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_machine_link_test.c' object='ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_machine_link_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_machine_link_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_machine_link_test-ags_functional_machine_link_test.obj `if test -f 'ags/test/X/ags_functional_machine_link_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_machine_link_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_machine_link_test.c'; fi` ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.o: ags/test/X/machine/ags_functional_matrix_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_matrix_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_matrix_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_matrix_test-ags_functional_matrix_test.Tpo -c -o ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.o `test -f 'ags/test/X/machine/ags_functional_matrix_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_matrix_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_matrix_test-ags_functional_matrix_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_matrix_test-ags_functional_matrix_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_matrix_test.c' object='ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_matrix_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_matrix_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.o `test -f 'ags/test/X/machine/ags_functional_matrix_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_matrix_test.c ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.obj: ags/test/X/machine/ags_functional_matrix_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_matrix_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_matrix_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_matrix_test-ags_functional_matrix_test.Tpo -c -o ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.obj `if test -f 'ags/test/X/machine/ags_functional_matrix_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_matrix_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_matrix_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_matrix_test-ags_functional_matrix_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_matrix_test-ags_functional_matrix_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_matrix_test.c' object='ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_matrix_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_matrix_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_matrix_test-ags_functional_matrix_test.obj `if test -f 'ags/test/X/machine/ags_functional_matrix_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_matrix_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_matrix_test.c'; fi` ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.o: ags/test/X/machine/ags_functional_mixer_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_mixer_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_mixer_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_mixer_test-ags_functional_mixer_test.Tpo -c -o ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.o `test -f 'ags/test/X/machine/ags_functional_mixer_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_mixer_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_mixer_test-ags_functional_mixer_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_mixer_test-ags_functional_mixer_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_mixer_test.c' object='ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_mixer_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_mixer_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.o `test -f 'ags/test/X/machine/ags_functional_mixer_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_mixer_test.c ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.obj: ags/test/X/machine/ags_functional_mixer_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_mixer_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_mixer_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_mixer_test-ags_functional_mixer_test.Tpo -c -o ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.obj `if test -f 'ags/test/X/machine/ags_functional_mixer_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_mixer_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_mixer_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_mixer_test-ags_functional_mixer_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_mixer_test-ags_functional_mixer_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_mixer_test.c' object='ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_mixer_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_mixer_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_mixer_test-ags_functional_mixer_test.obj `if test -f 'ags/test/X/machine/ags_functional_mixer_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_mixer_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_mixer_test.c'; fi` ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.o: ags/test/X/ags_functional_notation_edit_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_notation_edit_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_notation_edit_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_notation_edit_test-ags_functional_notation_edit_test.Tpo -c -o ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.o `test -f 'ags/test/X/ags_functional_notation_edit_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_notation_edit_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_notation_edit_test-ags_functional_notation_edit_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_notation_edit_test-ags_functional_notation_edit_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_notation_edit_test.c' object='ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_notation_edit_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_notation_edit_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.o `test -f 'ags/test/X/ags_functional_notation_edit_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_notation_edit_test.c ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.obj: ags/test/X/ags_functional_notation_edit_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_notation_edit_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_notation_edit_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_functional_notation_edit_test-ags_functional_notation_edit_test.Tpo -c -o ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.obj `if test -f 'ags/test/X/ags_functional_notation_edit_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_notation_edit_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_notation_edit_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_functional_notation_edit_test-ags_functional_notation_edit_test.Tpo ags/test/X/$(DEPDIR)/ags_functional_notation_edit_test-ags_functional_notation_edit_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_notation_edit_test.c' object='ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_notation_edit_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_notation_edit_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_functional_notation_edit_test-ags_functional_notation_edit_test.obj `if test -f 'ags/test/X/ags_functional_notation_edit_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_notation_edit_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_notation_edit_test.c'; fi` ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.o: ags/test/X/machine/ags_functional_panel_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_panel_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_panel_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_panel_test-ags_functional_panel_test.Tpo -c -o ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.o `test -f 'ags/test/X/machine/ags_functional_panel_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_panel_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_panel_test-ags_functional_panel_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_panel_test-ags_functional_panel_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_panel_test.c' object='ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_panel_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_panel_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.o `test -f 'ags/test/X/machine/ags_functional_panel_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_panel_test.c ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.obj: ags/test/X/machine/ags_functional_panel_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_panel_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_panel_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_panel_test-ags_functional_panel_test.Tpo -c -o ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.obj `if test -f 'ags/test/X/machine/ags_functional_panel_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_panel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_panel_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_panel_test-ags_functional_panel_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_panel_test-ags_functional_panel_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_panel_test.c' object='ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_panel_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_panel_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_panel_test-ags_functional_panel_test.obj `if test -f 'ags/test/X/machine/ags_functional_panel_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_panel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_panel_test.c'; fi` ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.o: ags/test/X/machine/ags_functional_synth_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_synth_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_synth_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_synth_test-ags_functional_synth_test.Tpo -c -o ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.o `test -f 'ags/test/X/machine/ags_functional_synth_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_synth_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_synth_test-ags_functional_synth_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_synth_test-ags_functional_synth_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_synth_test.c' object='ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_synth_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_synth_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.o `test -f 'ags/test/X/machine/ags_functional_synth_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_synth_test.c ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.obj: ags/test/X/machine/ags_functional_synth_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_synth_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_synth_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_functional_synth_test-ags_functional_synth_test.Tpo -c -o ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.obj `if test -f 'ags/test/X/machine/ags_functional_synth_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_synth_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_synth_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_functional_synth_test-ags_functional_synth_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_functional_synth_test-ags_functional_synth_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_synth_test.c' object='ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_functional_synth_test_CPPFLAGS) $(CPPFLAGS) $(ags_functional_synth_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_functional_synth_test-ags_functional_synth_test.obj `if test -f 'ags/test/X/machine/ags_functional_synth_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_synth_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_synth_test.c'; fi` ags/test/audio/ags_input_test-ags_input_test.o: ags/test/audio/ags_input_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_input_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_input_test-ags_input_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_input_test-ags_input_test.Tpo -c -o ags/test/audio/ags_input_test-ags_input_test.o `test -f 'ags/test/audio/ags_input_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_input_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_input_test-ags_input_test.Tpo ags/test/audio/$(DEPDIR)/ags_input_test-ags_input_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_input_test.c' object='ags/test/audio/ags_input_test-ags_input_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_input_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_input_test-ags_input_test.o `test -f 'ags/test/audio/ags_input_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_input_test.c ags/test/audio/ags_input_test-ags_input_test.obj: ags/test/audio/ags_input_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_input_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_input_test-ags_input_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_input_test-ags_input_test.Tpo -c -o ags/test/audio/ags_input_test-ags_input_test.obj `if test -f 'ags/test/audio/ags_input_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_input_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_input_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_input_test-ags_input_test.Tpo ags/test/audio/$(DEPDIR)/ags_input_test-ags_input_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_input_test.c' object='ags/test/audio/ags_input_test-ags_input_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_input_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_input_test-ags_input_test.obj `if test -f 'ags/test/audio/ags_input_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_input_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_input_test.c'; fi` ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.o: ags/test/plugin/ags_ladspa_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_ladspa_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_ladspa_manager_test-ags_ladspa_manager_test.Tpo -c -o ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.o `test -f 'ags/test/plugin/ags_ladspa_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_ladspa_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_ladspa_manager_test-ags_ladspa_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_ladspa_manager_test-ags_ladspa_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_ladspa_manager_test.c' object='ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_ladspa_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.o `test -f 'ags/test/plugin/ags_ladspa_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_ladspa_manager_test.c ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.obj: ags/test/plugin/ags_ladspa_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_ladspa_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_ladspa_manager_test-ags_ladspa_manager_test.Tpo -c -o ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.obj `if test -f 'ags/test/plugin/ags_ladspa_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_ladspa_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_ladspa_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_ladspa_manager_test-ags_ladspa_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_ladspa_manager_test-ags_ladspa_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_ladspa_manager_test.c' object='ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_ladspa_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_ladspa_manager_test-ags_ladspa_manager_test.obj `if test -f 'ags/test/plugin/ags_ladspa_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_ladspa_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_ladspa_manager_test.c'; fi` ags/test/lib/ags_log_test-ags_log_test.o: ags/test/lib/ags_log_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_log_test_CFLAGS) $(CFLAGS) -MT ags/test/lib/ags_log_test-ags_log_test.o -MD -MP -MF ags/test/lib/$(DEPDIR)/ags_log_test-ags_log_test.Tpo -c -o ags/test/lib/ags_log_test-ags_log_test.o `test -f 'ags/test/lib/ags_log_test.c' || echo '$(srcdir)/'`ags/test/lib/ags_log_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/lib/$(DEPDIR)/ags_log_test-ags_log_test.Tpo ags/test/lib/$(DEPDIR)/ags_log_test-ags_log_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/lib/ags_log_test.c' object='ags/test/lib/ags_log_test-ags_log_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_log_test_CFLAGS) $(CFLAGS) -c -o ags/test/lib/ags_log_test-ags_log_test.o `test -f 'ags/test/lib/ags_log_test.c' || echo '$(srcdir)/'`ags/test/lib/ags_log_test.c ags/test/lib/ags_log_test-ags_log_test.obj: ags/test/lib/ags_log_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_log_test_CFLAGS) $(CFLAGS) -MT ags/test/lib/ags_log_test-ags_log_test.obj -MD -MP -MF ags/test/lib/$(DEPDIR)/ags_log_test-ags_log_test.Tpo -c -o ags/test/lib/ags_log_test-ags_log_test.obj `if test -f 'ags/test/lib/ags_log_test.c'; then $(CYGPATH_W) 'ags/test/lib/ags_log_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/lib/ags_log_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/lib/$(DEPDIR)/ags_log_test-ags_log_test.Tpo ags/test/lib/$(DEPDIR)/ags_log_test-ags_log_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/lib/ags_log_test.c' object='ags/test/lib/ags_log_test-ags_log_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_log_test_CFLAGS) $(CFLAGS) -c -o ags/test/lib/ags_log_test-ags_log_test.obj `if test -f 'ags/test/lib/ags_log_test.c'; then $(CYGPATH_W) 'ags/test/lib/ags_log_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/lib/ags_log_test.c'; fi` ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.o: ags/test/plugin/ags_lv2_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_manager_test-ags_lv2_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.o `test -f 'ags/test/plugin/ags_lv2_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_manager_test-ags_lv2_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_manager_test-ags_lv2_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_manager_test.c' object='ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.o `test -f 'ags/test/plugin/ags_lv2_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_manager_test.c ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.obj: ags/test/plugin/ags_lv2_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_manager_test-ags_lv2_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_manager_test-ags_lv2_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_manager_test-ags_lv2_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_manager_test.c' object='ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_manager_test-ags_lv2_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_manager_test.c'; fi` ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.o: ags/test/plugin/ags_lv2_option_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_option_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_option_manager_test-ags_lv2_option_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.o `test -f 'ags/test/plugin/ags_lv2_option_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_option_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_option_manager_test-ags_lv2_option_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_option_manager_test-ags_lv2_option_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_option_manager_test.c' object='ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_option_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.o `test -f 'ags/test/plugin/ags_lv2_option_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_option_manager_test.c ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.obj: ags/test/plugin/ags_lv2_option_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_option_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_option_manager_test-ags_lv2_option_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_option_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_option_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_option_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_option_manager_test-ags_lv2_option_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_option_manager_test-ags_lv2_option_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_option_manager_test.c' object='ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_option_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_option_manager_test-ags_lv2_option_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_option_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_option_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_option_manager_test.c'; fi` ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.o: ags/test/plugin/ags_lv2_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_plugin_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_plugin_test-ags_lv2_plugin_test.Tpo -c -o ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.o `test -f 'ags/test/plugin/ags_lv2_plugin_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_plugin_test-ags_lv2_plugin_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_plugin_test-ags_lv2_plugin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_plugin_test.c' object='ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_plugin_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.o `test -f 'ags/test/plugin/ags_lv2_plugin_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_plugin_test.c ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.obj: ags/test/plugin/ags_lv2_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_plugin_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_plugin_test-ags_lv2_plugin_test.Tpo -c -o ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.obj `if test -f 'ags/test/plugin/ags_lv2_plugin_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_plugin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_plugin_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_plugin_test-ags_lv2_plugin_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_plugin_test-ags_lv2_plugin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_plugin_test.c' object='ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_plugin_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_plugin_test-ags_lv2_plugin_test.obj `if test -f 'ags/test/plugin/ags_lv2_plugin_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_plugin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_plugin_test.c'; fi` ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.o: ags/test/plugin/ags_lv2_preset_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_preset_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_preset_test-ags_lv2_preset_test.Tpo -c -o ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.o `test -f 'ags/test/plugin/ags_lv2_preset_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_preset_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_preset_test-ags_lv2_preset_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_preset_test-ags_lv2_preset_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_preset_test.c' object='ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_preset_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.o `test -f 'ags/test/plugin/ags_lv2_preset_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_preset_test.c ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.obj: ags/test/plugin/ags_lv2_preset_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_preset_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_preset_test-ags_lv2_preset_test.Tpo -c -o ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.obj `if test -f 'ags/test/plugin/ags_lv2_preset_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_preset_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_preset_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_preset_test-ags_lv2_preset_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_preset_test-ags_lv2_preset_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_preset_test.c' object='ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_preset_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_preset_test-ags_lv2_preset_test.obj `if test -f 'ags/test/plugin/ags_lv2_preset_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_preset_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_preset_test.c'; fi` ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.o: ags/test/plugin/ags_lv2_uri_map_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_uri_map_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.o `test -f 'ags/test/plugin/ags_lv2_uri_map_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_uri_map_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_uri_map_manager_test.c' object='ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_uri_map_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.o `test -f 'ags/test/plugin/ags_lv2_uri_map_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_uri_map_manager_test.c ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.obj: ags/test/plugin/ags_lv2_uri_map_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_uri_map_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_uri_map_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_uri_map_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_uri_map_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_uri_map_manager_test.c' object='ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_uri_map_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_uri_map_manager_test-ags_lv2_uri_map_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_uri_map_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_uri_map_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_uri_map_manager_test.c'; fi` ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.o: ags/test/plugin/ags_lv2_urid_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_urid_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.o `test -f 'ags/test/plugin/ags_lv2_urid_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_urid_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_urid_manager_test.c' object='ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_urid_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.o `test -f 'ags/test/plugin/ags_lv2_urid_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_urid_manager_test.c ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.obj: ags/test/plugin/ags_lv2_urid_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_urid_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_urid_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_urid_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_urid_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_urid_manager_test.c' object='ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_urid_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_urid_manager_test-ags_lv2_urid_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_urid_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_urid_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_urid_manager_test.c'; fi` ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.o: ags/test/plugin/ags_lv2_worker_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_worker_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.o `test -f 'ags/test/plugin/ags_lv2_worker_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_worker_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_worker_manager_test.c' object='ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_worker_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.o `test -f 'ags/test/plugin/ags_lv2_worker_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2_worker_manager_test.c ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.obj: ags/test/plugin/ags_lv2_worker_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_worker_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.Tpo -c -o ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_worker_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_worker_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_worker_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2_worker_manager_test.c' object='ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2_worker_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2_worker_manager_test-ags_lv2_worker_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2_worker_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2_worker_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2_worker_manager_test.c'; fi` ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.o: ags/test/plugin/ags_lv2ui_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2ui_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2ui_manager_test-ags_lv2ui_manager_test.Tpo -c -o ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.o `test -f 'ags/test/plugin/ags_lv2ui_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2ui_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2ui_manager_test-ags_lv2ui_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2ui_manager_test-ags_lv2ui_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2ui_manager_test.c' object='ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2ui_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.o `test -f 'ags/test/plugin/ags_lv2ui_manager_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2ui_manager_test.c ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.obj: ags/test/plugin/ags_lv2ui_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2ui_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2ui_manager_test-ags_lv2ui_manager_test.Tpo -c -o ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2ui_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2ui_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2ui_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2ui_manager_test-ags_lv2ui_manager_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2ui_manager_test-ags_lv2ui_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2ui_manager_test.c' object='ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2ui_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2ui_manager_test-ags_lv2ui_manager_test.obj `if test -f 'ags/test/plugin/ags_lv2ui_manager_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2ui_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2ui_manager_test.c'; fi` ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.o: ags/test/plugin/ags_lv2ui_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2ui_plugin_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.o -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.Tpo -c -o ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.o `test -f 'ags/test/plugin/ags_lv2ui_plugin_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2ui_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2ui_plugin_test.c' object='ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2ui_plugin_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.o `test -f 'ags/test/plugin/ags_lv2ui_plugin_test.c' || echo '$(srcdir)/'`ags/test/plugin/ags_lv2ui_plugin_test.c ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.obj: ags/test/plugin/ags_lv2ui_plugin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2ui_plugin_test_CFLAGS) $(CFLAGS) -MT ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.obj -MD -MP -MF ags/test/plugin/$(DEPDIR)/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.Tpo -c -o ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.obj `if test -f 'ags/test/plugin/ags_lv2ui_plugin_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2ui_plugin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2ui_plugin_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/plugin/$(DEPDIR)/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.Tpo ags/test/plugin/$(DEPDIR)/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/plugin/ags_lv2ui_plugin_test.c' object='ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_lv2ui_plugin_test_CFLAGS) $(CFLAGS) -c -o ags/test/plugin/ags_lv2ui_plugin_test-ags_lv2ui_plugin_test.obj `if test -f 'ags/test/plugin/ags_lv2ui_plugin_test.c'; then $(CYGPATH_W) 'ags/test/plugin/ags_lv2ui_plugin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/plugin/ags_lv2ui_plugin_test.c'; fi` ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.o: ags/test/audio/midi/ags_midi_buffer_util_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midi_buffer_util_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.o -MD -MP -MF ags/test/audio/midi/$(DEPDIR)/ags_midi_buffer_util_test-ags_midi_buffer_util_test.Tpo -c -o ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.o `test -f 'ags/test/audio/midi/ags_midi_buffer_util_test.c' || echo '$(srcdir)/'`ags/test/audio/midi/ags_midi_buffer_util_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/midi/$(DEPDIR)/ags_midi_buffer_util_test-ags_midi_buffer_util_test.Tpo ags/test/audio/midi/$(DEPDIR)/ags_midi_buffer_util_test-ags_midi_buffer_util_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/midi/ags_midi_buffer_util_test.c' object='ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midi_buffer_util_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.o `test -f 'ags/test/audio/midi/ags_midi_buffer_util_test.c' || echo '$(srcdir)/'`ags/test/audio/midi/ags_midi_buffer_util_test.c ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.obj: ags/test/audio/midi/ags_midi_buffer_util_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midi_buffer_util_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.obj -MD -MP -MF ags/test/audio/midi/$(DEPDIR)/ags_midi_buffer_util_test-ags_midi_buffer_util_test.Tpo -c -o ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.obj `if test -f 'ags/test/audio/midi/ags_midi_buffer_util_test.c'; then $(CYGPATH_W) 'ags/test/audio/midi/ags_midi_buffer_util_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/midi/ags_midi_buffer_util_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/midi/$(DEPDIR)/ags_midi_buffer_util_test-ags_midi_buffer_util_test.Tpo ags/test/audio/midi/$(DEPDIR)/ags_midi_buffer_util_test-ags_midi_buffer_util_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/midi/ags_midi_buffer_util_test.c' object='ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midi_buffer_util_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/midi/ags_midi_buffer_util_test-ags_midi_buffer_util_test.obj `if test -f 'ags/test/audio/midi/ags_midi_buffer_util_test.c'; then $(CYGPATH_W) 'ags/test/audio/midi/ags_midi_buffer_util_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/midi/ags_midi_buffer_util_test.c'; fi` ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.o: ags/test/audio/midi/ags_midi_builder_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midi_builder_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.o -MD -MP -MF ags/test/audio/midi/$(DEPDIR)/ags_midi_builder_test-ags_midi_builder_test.Tpo -c -o ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.o `test -f 'ags/test/audio/midi/ags_midi_builder_test.c' || echo '$(srcdir)/'`ags/test/audio/midi/ags_midi_builder_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/midi/$(DEPDIR)/ags_midi_builder_test-ags_midi_builder_test.Tpo ags/test/audio/midi/$(DEPDIR)/ags_midi_builder_test-ags_midi_builder_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/midi/ags_midi_builder_test.c' object='ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midi_builder_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.o `test -f 'ags/test/audio/midi/ags_midi_builder_test.c' || echo '$(srcdir)/'`ags/test/audio/midi/ags_midi_builder_test.c ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.obj: ags/test/audio/midi/ags_midi_builder_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midi_builder_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.obj -MD -MP -MF ags/test/audio/midi/$(DEPDIR)/ags_midi_builder_test-ags_midi_builder_test.Tpo -c -o ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.obj `if test -f 'ags/test/audio/midi/ags_midi_builder_test.c'; then $(CYGPATH_W) 'ags/test/audio/midi/ags_midi_builder_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/midi/ags_midi_builder_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/midi/$(DEPDIR)/ags_midi_builder_test-ags_midi_builder_test.Tpo ags/test/audio/midi/$(DEPDIR)/ags_midi_builder_test-ags_midi_builder_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/midi/ags_midi_builder_test.c' object='ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midi_builder_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/midi/ags_midi_builder_test-ags_midi_builder_test.obj `if test -f 'ags/test/audio/midi/ags_midi_builder_test.c'; then $(CYGPATH_W) 'ags/test/audio/midi/ags_midi_builder_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/midi/ags_midi_builder_test.c'; fi` ags/test/audio/ags_midiin_test-ags_midiin_test.o: ags/test/audio/ags_midiin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midiin_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_midiin_test-ags_midiin_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_midiin_test-ags_midiin_test.Tpo -c -o ags/test/audio/ags_midiin_test-ags_midiin_test.o `test -f 'ags/test/audio/ags_midiin_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_midiin_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_midiin_test-ags_midiin_test.Tpo ags/test/audio/$(DEPDIR)/ags_midiin_test-ags_midiin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_midiin_test.c' object='ags/test/audio/ags_midiin_test-ags_midiin_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midiin_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_midiin_test-ags_midiin_test.o `test -f 'ags/test/audio/ags_midiin_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_midiin_test.c ags/test/audio/ags_midiin_test-ags_midiin_test.obj: ags/test/audio/ags_midiin_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midiin_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_midiin_test-ags_midiin_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_midiin_test-ags_midiin_test.Tpo -c -o ags/test/audio/ags_midiin_test-ags_midiin_test.obj `if test -f 'ags/test/audio/ags_midiin_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_midiin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_midiin_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_midiin_test-ags_midiin_test.Tpo ags/test/audio/$(DEPDIR)/ags_midiin_test-ags_midiin_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_midiin_test.c' object='ags/test/audio/ags_midiin_test-ags_midiin_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_midiin_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_midiin_test-ags_midiin_test.obj `if test -f 'ags/test/audio/ags_midiin_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_midiin_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_midiin_test.c'; fi` ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.o: ags/test/thread/ags_mutex_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_mutex_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_mutex_manager_test-ags_mutex_manager_test.Tpo -c -o ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.o `test -f 'ags/test/thread/ags_mutex_manager_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_mutex_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_mutex_manager_test-ags_mutex_manager_test.Tpo ags/test/thread/$(DEPDIR)/ags_mutex_manager_test-ags_mutex_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_mutex_manager_test.c' object='ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_mutex_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.o `test -f 'ags/test/thread/ags_mutex_manager_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_mutex_manager_test.c ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.obj: ags/test/thread/ags_mutex_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_mutex_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_mutex_manager_test-ags_mutex_manager_test.Tpo -c -o ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.obj `if test -f 'ags/test/thread/ags_mutex_manager_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_mutex_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_mutex_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_mutex_manager_test-ags_mutex_manager_test.Tpo ags/test/thread/$(DEPDIR)/ags_mutex_manager_test-ags_mutex_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_mutex_manager_test.c' object='ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_mutex_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_mutex_manager_test-ags_mutex_manager_test.obj `if test -f 'ags/test/thread/ags_mutex_manager_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_mutex_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_mutex_manager_test.c'; fi` ags/test/audio/ags_notation_test-ags_notation_test.o: ags/test/audio/ags_notation_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_notation_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_notation_test-ags_notation_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_notation_test-ags_notation_test.Tpo -c -o ags/test/audio/ags_notation_test-ags_notation_test.o `test -f 'ags/test/audio/ags_notation_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_notation_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_notation_test-ags_notation_test.Tpo ags/test/audio/$(DEPDIR)/ags_notation_test-ags_notation_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_notation_test.c' object='ags/test/audio/ags_notation_test-ags_notation_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_notation_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_notation_test-ags_notation_test.o `test -f 'ags/test/audio/ags_notation_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_notation_test.c ags/test/audio/ags_notation_test-ags_notation_test.obj: ags/test/audio/ags_notation_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_notation_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_notation_test-ags_notation_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_notation_test-ags_notation_test.Tpo -c -o ags/test/audio/ags_notation_test-ags_notation_test.obj `if test -f 'ags/test/audio/ags_notation_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_notation_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_notation_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_notation_test-ags_notation_test.Tpo ags/test/audio/$(DEPDIR)/ags_notation_test-ags_notation_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_notation_test.c' object='ags/test/audio/ags_notation_test-ags_notation_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_notation_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_notation_test-ags_notation_test.obj `if test -f 'ags/test/audio/ags_notation_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_notation_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_notation_test.c'; fi` ags/test/audio/ags_note_test-ags_note_test.o: ags/test/audio/ags_note_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_note_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_note_test-ags_note_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_note_test-ags_note_test.Tpo -c -o ags/test/audio/ags_note_test-ags_note_test.o `test -f 'ags/test/audio/ags_note_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_note_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_note_test-ags_note_test.Tpo ags/test/audio/$(DEPDIR)/ags_note_test-ags_note_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_note_test.c' object='ags/test/audio/ags_note_test-ags_note_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_note_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_note_test-ags_note_test.o `test -f 'ags/test/audio/ags_note_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_note_test.c ags/test/audio/ags_note_test-ags_note_test.obj: ags/test/audio/ags_note_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_note_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_note_test-ags_note_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_note_test-ags_note_test.Tpo -c -o ags/test/audio/ags_note_test-ags_note_test.obj `if test -f 'ags/test/audio/ags_note_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_note_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_note_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_note_test-ags_note_test.Tpo ags/test/audio/$(DEPDIR)/ags_note_test-ags_note_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_note_test.c' object='ags/test/audio/ags_note_test-ags_note_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_note_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_note_test-ags_note_test.obj `if test -f 'ags/test/audio/ags_note_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_note_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_note_test.c'; fi` ags/test/audio/ags_output_test-ags_output_test.o: ags/test/audio/ags_output_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_output_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_output_test-ags_output_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_output_test-ags_output_test.Tpo -c -o ags/test/audio/ags_output_test-ags_output_test.o `test -f 'ags/test/audio/ags_output_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_output_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_output_test-ags_output_test.Tpo ags/test/audio/$(DEPDIR)/ags_output_test-ags_output_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_output_test.c' object='ags/test/audio/ags_output_test-ags_output_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_output_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_output_test-ags_output_test.o `test -f 'ags/test/audio/ags_output_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_output_test.c ags/test/audio/ags_output_test-ags_output_test.obj: ags/test/audio/ags_output_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_output_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_output_test-ags_output_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_output_test-ags_output_test.Tpo -c -o ags/test/audio/ags_output_test-ags_output_test.obj `if test -f 'ags/test/audio/ags_output_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_output_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_output_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_output_test-ags_output_test.Tpo ags/test/audio/$(DEPDIR)/ags_output_test-ags_output_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_output_test.c' object='ags/test/audio/ags_output_test-ags_output_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_output_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_output_test-ags_output_test.obj `if test -f 'ags/test/audio/ags_output_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_output_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_output_test.c'; fi` ags/test/audio/ags_pattern_test-ags_pattern_test.o: ags/test/audio/ags_pattern_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_pattern_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_pattern_test-ags_pattern_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_pattern_test-ags_pattern_test.Tpo -c -o ags/test/audio/ags_pattern_test-ags_pattern_test.o `test -f 'ags/test/audio/ags_pattern_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_pattern_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_pattern_test-ags_pattern_test.Tpo ags/test/audio/$(DEPDIR)/ags_pattern_test-ags_pattern_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_pattern_test.c' object='ags/test/audio/ags_pattern_test-ags_pattern_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_pattern_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_pattern_test-ags_pattern_test.o `test -f 'ags/test/audio/ags_pattern_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_pattern_test.c ags/test/audio/ags_pattern_test-ags_pattern_test.obj: ags/test/audio/ags_pattern_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_pattern_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_pattern_test-ags_pattern_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_pattern_test-ags_pattern_test.Tpo -c -o ags/test/audio/ags_pattern_test-ags_pattern_test.obj `if test -f 'ags/test/audio/ags_pattern_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_pattern_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_pattern_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_pattern_test-ags_pattern_test.Tpo ags/test/audio/$(DEPDIR)/ags_pattern_test-ags_pattern_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_pattern_test.c' object='ags/test/audio/ags_pattern_test-ags_pattern_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_pattern_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_pattern_test-ags_pattern_test.obj `if test -f 'ags/test/audio/ags_pattern_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_pattern_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_pattern_test.c'; fi` ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.o: ags/test/audio/ags_playback_domain_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_playback_domain_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_playback_domain_test-ags_playback_domain_test.Tpo -c -o ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.o `test -f 'ags/test/audio/ags_playback_domain_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_playback_domain_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_playback_domain_test-ags_playback_domain_test.Tpo ags/test/audio/$(DEPDIR)/ags_playback_domain_test-ags_playback_domain_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_playback_domain_test.c' object='ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_playback_domain_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.o `test -f 'ags/test/audio/ags_playback_domain_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_playback_domain_test.c ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.obj: ags/test/audio/ags_playback_domain_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_playback_domain_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_playback_domain_test-ags_playback_domain_test.Tpo -c -o ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.obj `if test -f 'ags/test/audio/ags_playback_domain_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_playback_domain_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_playback_domain_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_playback_domain_test-ags_playback_domain_test.Tpo ags/test/audio/$(DEPDIR)/ags_playback_domain_test-ags_playback_domain_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_playback_domain_test.c' object='ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_playback_domain_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_playback_domain_test-ags_playback_domain_test.obj `if test -f 'ags/test/audio/ags_playback_domain_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_playback_domain_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_playback_domain_test.c'; fi` ags/test/audio/ags_playback_test-ags_playback_test.o: ags/test/audio/ags_playback_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_playback_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_playback_test-ags_playback_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_playback_test-ags_playback_test.Tpo -c -o ags/test/audio/ags_playback_test-ags_playback_test.o `test -f 'ags/test/audio/ags_playback_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_playback_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_playback_test-ags_playback_test.Tpo ags/test/audio/$(DEPDIR)/ags_playback_test-ags_playback_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_playback_test.c' object='ags/test/audio/ags_playback_test-ags_playback_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_playback_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_playback_test-ags_playback_test.o `test -f 'ags/test/audio/ags_playback_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_playback_test.c ags/test/audio/ags_playback_test-ags_playback_test.obj: ags/test/audio/ags_playback_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_playback_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_playback_test-ags_playback_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_playback_test-ags_playback_test.Tpo -c -o ags/test/audio/ags_playback_test-ags_playback_test.obj `if test -f 'ags/test/audio/ags_playback_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_playback_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_playback_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_playback_test-ags_playback_test.Tpo ags/test/audio/$(DEPDIR)/ags_playback_test-ags_playback_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_playback_test.c' object='ags/test/audio/ags_playback_test-ags_playback_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_playback_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_playback_test-ags_playback_test.obj `if test -f 'ags/test/audio/ags_playback_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_playback_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_playback_test.c'; fi` ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.o: ags/test/thread/ags_poll_fd_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_poll_fd_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_poll_fd_test-ags_poll_fd_test.Tpo -c -o ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.o `test -f 'ags/test/thread/ags_poll_fd_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_poll_fd_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_poll_fd_test-ags_poll_fd_test.Tpo ags/test/thread/$(DEPDIR)/ags_poll_fd_test-ags_poll_fd_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_poll_fd_test.c' object='ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_poll_fd_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.o `test -f 'ags/test/thread/ags_poll_fd_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_poll_fd_test.c ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.obj: ags/test/thread/ags_poll_fd_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_poll_fd_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_poll_fd_test-ags_poll_fd_test.Tpo -c -o ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.obj `if test -f 'ags/test/thread/ags_poll_fd_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_poll_fd_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_poll_fd_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_poll_fd_test-ags_poll_fd_test.Tpo ags/test/thread/$(DEPDIR)/ags_poll_fd_test-ags_poll_fd_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_poll_fd_test.c' object='ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_poll_fd_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_poll_fd_test-ags_poll_fd_test.obj `if test -f 'ags/test/thread/ags_poll_fd_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_poll_fd_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_poll_fd_test.c'; fi` ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.o: ags/test/thread/ags_polling_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_polling_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_polling_thread_test-ags_polling_thread_test.Tpo -c -o ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.o `test -f 'ags/test/thread/ags_polling_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_polling_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_polling_thread_test-ags_polling_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_polling_thread_test-ags_polling_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_polling_thread_test.c' object='ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_polling_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.o `test -f 'ags/test/thread/ags_polling_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_polling_thread_test.c ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.obj: ags/test/thread/ags_polling_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_polling_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_polling_thread_test-ags_polling_thread_test.Tpo -c -o ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.obj `if test -f 'ags/test/thread/ags_polling_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_polling_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_polling_thread_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_polling_thread_test-ags_polling_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_polling_thread_test-ags_polling_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_polling_thread_test.c' object='ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_polling_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_polling_thread_test-ags_polling_thread_test.obj `if test -f 'ags/test/thread/ags_polling_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_polling_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_polling_thread_test.c'; fi` ags/test/audio/ags_port_test-ags_port_test.o: ags/test/audio/ags_port_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_port_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_port_test-ags_port_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_port_test-ags_port_test.Tpo -c -o ags/test/audio/ags_port_test-ags_port_test.o `test -f 'ags/test/audio/ags_port_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_port_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_port_test-ags_port_test.Tpo ags/test/audio/$(DEPDIR)/ags_port_test-ags_port_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_port_test.c' object='ags/test/audio/ags_port_test-ags_port_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_port_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_port_test-ags_port_test.o `test -f 'ags/test/audio/ags_port_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_port_test.c ags/test/audio/ags_port_test-ags_port_test.obj: ags/test/audio/ags_port_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_port_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_port_test-ags_port_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_port_test-ags_port_test.Tpo -c -o ags/test/audio/ags_port_test-ags_port_test.obj `if test -f 'ags/test/audio/ags_port_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_port_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_port_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_port_test-ags_port_test.Tpo ags/test/audio/$(DEPDIR)/ags_port_test-ags_port_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_port_test.c' object='ags/test/audio/ags_port_test-ags_port_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_port_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_port_test-ags_port_test.obj `if test -f 'ags/test/audio/ags_port_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_port_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_port_test.c'; fi` ags/test/audio/ags_preset_test-ags_preset_test.o: ags/test/audio/ags_preset_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_preset_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_preset_test-ags_preset_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_preset_test-ags_preset_test.Tpo -c -o ags/test/audio/ags_preset_test-ags_preset_test.o `test -f 'ags/test/audio/ags_preset_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_preset_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_preset_test-ags_preset_test.Tpo ags/test/audio/$(DEPDIR)/ags_preset_test-ags_preset_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_preset_test.c' object='ags/test/audio/ags_preset_test-ags_preset_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_preset_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_preset_test-ags_preset_test.o `test -f 'ags/test/audio/ags_preset_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_preset_test.c ags/test/audio/ags_preset_test-ags_preset_test.obj: ags/test/audio/ags_preset_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_preset_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_preset_test-ags_preset_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_preset_test-ags_preset_test.Tpo -c -o ags/test/audio/ags_preset_test-ags_preset_test.obj `if test -f 'ags/test/audio/ags_preset_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_preset_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_preset_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_preset_test-ags_preset_test.Tpo ags/test/audio/$(DEPDIR)/ags_preset_test-ags_preset_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_preset_test.c' object='ags/test/audio/ags_preset_test-ags_preset_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_preset_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_preset_test-ags_preset_test.obj `if test -f 'ags/test/audio/ags_preset_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_preset_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_preset_test.c'; fi` ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.o: ags/test/audio/ags_recall_channel_run_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_channel_run_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_channel_run_test-ags_recall_channel_run_test.Tpo -c -o ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.o `test -f 'ags/test/audio/ags_recall_channel_run_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_channel_run_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_channel_run_test-ags_recall_channel_run_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_channel_run_test-ags_recall_channel_run_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_channel_run_test.c' object='ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_channel_run_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.o `test -f 'ags/test/audio/ags_recall_channel_run_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_channel_run_test.c ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.obj: ags/test/audio/ags_recall_channel_run_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_channel_run_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_channel_run_test-ags_recall_channel_run_test.Tpo -c -o ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.obj `if test -f 'ags/test/audio/ags_recall_channel_run_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_channel_run_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_channel_run_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_channel_run_test-ags_recall_channel_run_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_channel_run_test-ags_recall_channel_run_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_channel_run_test.c' object='ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_channel_run_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_channel_run_test-ags_recall_channel_run_test.obj `if test -f 'ags/test/audio/ags_recall_channel_run_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_channel_run_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_channel_run_test.c'; fi` ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.o: ags/test/audio/ags_recall_channel_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_channel_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_channel_test-ags_recall_channel_test.Tpo -c -o ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.o `test -f 'ags/test/audio/ags_recall_channel_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_channel_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_channel_test-ags_recall_channel_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_channel_test-ags_recall_channel_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_channel_test.c' object='ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_channel_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.o `test -f 'ags/test/audio/ags_recall_channel_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_channel_test.c ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.obj: ags/test/audio/ags_recall_channel_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_channel_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_channel_test-ags_recall_channel_test.Tpo -c -o ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.obj `if test -f 'ags/test/audio/ags_recall_channel_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_channel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_channel_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_channel_test-ags_recall_channel_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_channel_test-ags_recall_channel_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_channel_test.c' object='ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_channel_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_channel_test-ags_recall_channel_test.obj `if test -f 'ags/test/audio/ags_recall_channel_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_channel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_channel_test.c'; fi` ags/test/audio/ags_recall_container_test-ags_recall_container_test.o: ags/test/audio/ags_recall_container_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_container_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_container_test-ags_recall_container_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_container_test-ags_recall_container_test.Tpo -c -o ags/test/audio/ags_recall_container_test-ags_recall_container_test.o `test -f 'ags/test/audio/ags_recall_container_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_container_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_container_test-ags_recall_container_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_container_test-ags_recall_container_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_container_test.c' object='ags/test/audio/ags_recall_container_test-ags_recall_container_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_container_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_container_test-ags_recall_container_test.o `test -f 'ags/test/audio/ags_recall_container_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_container_test.c ags/test/audio/ags_recall_container_test-ags_recall_container_test.obj: ags/test/audio/ags_recall_container_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_container_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_container_test-ags_recall_container_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_container_test-ags_recall_container_test.Tpo -c -o ags/test/audio/ags_recall_container_test-ags_recall_container_test.obj `if test -f 'ags/test/audio/ags_recall_container_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_container_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_container_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_container_test-ags_recall_container_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_container_test-ags_recall_container_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_container_test.c' object='ags/test/audio/ags_recall_container_test-ags_recall_container_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_container_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_container_test-ags_recall_container_test.obj `if test -f 'ags/test/audio/ags_recall_container_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_container_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_container_test.c'; fi` ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.o: ags/test/audio/ags_recall_dependency_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_dependency_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_dependency_test-ags_recall_dependency_test.Tpo -c -o ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.o `test -f 'ags/test/audio/ags_recall_dependency_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_dependency_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_dependency_test-ags_recall_dependency_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_dependency_test-ags_recall_dependency_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_dependency_test.c' object='ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_dependency_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.o `test -f 'ags/test/audio/ags_recall_dependency_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_dependency_test.c ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.obj: ags/test/audio/ags_recall_dependency_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_dependency_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_dependency_test-ags_recall_dependency_test.Tpo -c -o ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.obj `if test -f 'ags/test/audio/ags_recall_dependency_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_dependency_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_dependency_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_dependency_test-ags_recall_dependency_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_dependency_test-ags_recall_dependency_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_dependency_test.c' object='ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_dependency_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_dependency_test-ags_recall_dependency_test.obj `if test -f 'ags/test/audio/ags_recall_dependency_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_dependency_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_dependency_test.c'; fi` ags/test/audio/ags_recall_test-ags_recall_test.o: ags/test/audio/ags_recall_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_test-ags_recall_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_test-ags_recall_test.Tpo -c -o ags/test/audio/ags_recall_test-ags_recall_test.o `test -f 'ags/test/audio/ags_recall_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_test-ags_recall_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_test-ags_recall_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_test.c' object='ags/test/audio/ags_recall_test-ags_recall_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_test-ags_recall_test.o `test -f 'ags/test/audio/ags_recall_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recall_test.c ags/test/audio/ags_recall_test-ags_recall_test.obj: ags/test/audio/ags_recall_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recall_test-ags_recall_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recall_test-ags_recall_test.Tpo -c -o ags/test/audio/ags_recall_test-ags_recall_test.obj `if test -f 'ags/test/audio/ags_recall_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recall_test-ags_recall_test.Tpo ags/test/audio/$(DEPDIR)/ags_recall_test-ags_recall_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recall_test.c' object='ags/test/audio/ags_recall_test-ags_recall_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recall_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recall_test-ags_recall_test.obj `if test -f 'ags/test/audio/ags_recall_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recall_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recall_test.c'; fi` ags/test/audio/ags_recycling_test-ags_recycling_test.o: ags/test/audio/ags_recycling_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recycling_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recycling_test-ags_recycling_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recycling_test-ags_recycling_test.Tpo -c -o ags/test/audio/ags_recycling_test-ags_recycling_test.o `test -f 'ags/test/audio/ags_recycling_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recycling_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recycling_test-ags_recycling_test.Tpo ags/test/audio/$(DEPDIR)/ags_recycling_test-ags_recycling_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recycling_test.c' object='ags/test/audio/ags_recycling_test-ags_recycling_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recycling_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recycling_test-ags_recycling_test.o `test -f 'ags/test/audio/ags_recycling_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_recycling_test.c ags/test/audio/ags_recycling_test-ags_recycling_test.obj: ags/test/audio/ags_recycling_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recycling_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_recycling_test-ags_recycling_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_recycling_test-ags_recycling_test.Tpo -c -o ags/test/audio/ags_recycling_test-ags_recycling_test.obj `if test -f 'ags/test/audio/ags_recycling_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recycling_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recycling_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_recycling_test-ags_recycling_test.Tpo ags/test/audio/$(DEPDIR)/ags_recycling_test-ags_recycling_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_recycling_test.c' object='ags/test/audio/ags_recycling_test-ags_recycling_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_recycling_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_recycling_test-ags_recycling_test.obj `if test -f 'ags/test/audio/ags_recycling_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_recycling_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_recycling_test.c'; fi` ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.o: ags/test/thread/ags_returnable_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_returnable_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_returnable_thread_test-ags_returnable_thread_test.Tpo -c -o ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.o `test -f 'ags/test/thread/ags_returnable_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_returnable_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_returnable_thread_test-ags_returnable_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_returnable_thread_test-ags_returnable_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_returnable_thread_test.c' object='ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_returnable_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.o `test -f 'ags/test/thread/ags_returnable_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_returnable_thread_test.c ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.obj: ags/test/thread/ags_returnable_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_returnable_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_returnable_thread_test-ags_returnable_thread_test.Tpo -c -o ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.obj `if test -f 'ags/test/thread/ags_returnable_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_returnable_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_returnable_thread_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_returnable_thread_test-ags_returnable_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_returnable_thread_test-ags_returnable_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_returnable_thread_test.c' object='ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_returnable_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_returnable_thread_test-ags_returnable_thread_test.obj `if test -f 'ags/test/thread/ags_returnable_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_returnable_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_returnable_thread_test.c'; fi` ags/test/thread/ags_task_test-ags_task_test.o: ags/test/thread/ags_task_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_task_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_task_test-ags_task_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_task_test-ags_task_test.Tpo -c -o ags/test/thread/ags_task_test-ags_task_test.o `test -f 'ags/test/thread/ags_task_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_task_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_task_test-ags_task_test.Tpo ags/test/thread/$(DEPDIR)/ags_task_test-ags_task_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_task_test.c' object='ags/test/thread/ags_task_test-ags_task_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_task_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_task_test-ags_task_test.o `test -f 'ags/test/thread/ags_task_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_task_test.c ags/test/thread/ags_task_test-ags_task_test.obj: ags/test/thread/ags_task_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_task_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_task_test-ags_task_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_task_test-ags_task_test.Tpo -c -o ags/test/thread/ags_task_test-ags_task_test.obj `if test -f 'ags/test/thread/ags_task_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_task_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_task_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_task_test-ags_task_test.Tpo ags/test/thread/$(DEPDIR)/ags_task_test-ags_task_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_task_test.c' object='ags/test/thread/ags_task_test-ags_task_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_task_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_task_test-ags_task_test.obj `if test -f 'ags/test/thread/ags_task_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_task_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_task_test.c'; fi` ags/test/thread/ags_task_thread_test-ags_task_thread_test.o: ags/test/thread/ags_task_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_task_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_task_thread_test-ags_task_thread_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_task_thread_test-ags_task_thread_test.Tpo -c -o ags/test/thread/ags_task_thread_test-ags_task_thread_test.o `test -f 'ags/test/thread/ags_task_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_task_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_task_thread_test-ags_task_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_task_thread_test-ags_task_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_task_thread_test.c' object='ags/test/thread/ags_task_thread_test-ags_task_thread_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_task_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_task_thread_test-ags_task_thread_test.o `test -f 'ags/test/thread/ags_task_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_task_thread_test.c ags/test/thread/ags_task_thread_test-ags_task_thread_test.obj: ags/test/thread/ags_task_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_task_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_task_thread_test-ags_task_thread_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_task_thread_test-ags_task_thread_test.Tpo -c -o ags/test/thread/ags_task_thread_test-ags_task_thread_test.obj `if test -f 'ags/test/thread/ags_task_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_task_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_task_thread_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_task_thread_test-ags_task_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_task_thread_test-ags_task_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_task_thread_test.c' object='ags/test/thread/ags_task_thread_test-ags_task_thread_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_task_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_task_thread_test-ags_task_thread_test.obj `if test -f 'ags/test/thread/ags_task_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_task_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_task_thread_test.c'; fi` ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.o: ags/test/thread/file/ags_thread_file_xml_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_file_xml_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.o -MD -MP -MF ags/test/thread/file/$(DEPDIR)/ags_thread_file_xml_test-ags_thread_file_xml_test.Tpo -c -o ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.o `test -f 'ags/test/thread/file/ags_thread_file_xml_test.c' || echo '$(srcdir)/'`ags/test/thread/file/ags_thread_file_xml_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/file/$(DEPDIR)/ags_thread_file_xml_test-ags_thread_file_xml_test.Tpo ags/test/thread/file/$(DEPDIR)/ags_thread_file_xml_test-ags_thread_file_xml_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/file/ags_thread_file_xml_test.c' object='ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_file_xml_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.o `test -f 'ags/test/thread/file/ags_thread_file_xml_test.c' || echo '$(srcdir)/'`ags/test/thread/file/ags_thread_file_xml_test.c ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.obj: ags/test/thread/file/ags_thread_file_xml_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_file_xml_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.obj -MD -MP -MF ags/test/thread/file/$(DEPDIR)/ags_thread_file_xml_test-ags_thread_file_xml_test.Tpo -c -o ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.obj `if test -f 'ags/test/thread/file/ags_thread_file_xml_test.c'; then $(CYGPATH_W) 'ags/test/thread/file/ags_thread_file_xml_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/file/ags_thread_file_xml_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/file/$(DEPDIR)/ags_thread_file_xml_test-ags_thread_file_xml_test.Tpo ags/test/thread/file/$(DEPDIR)/ags_thread_file_xml_test-ags_thread_file_xml_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/file/ags_thread_file_xml_test.c' object='ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_file_xml_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/file/ags_thread_file_xml_test-ags_thread_file_xml_test.obj `if test -f 'ags/test/thread/file/ags_thread_file_xml_test.c'; then $(CYGPATH_W) 'ags/test/thread/file/ags_thread_file_xml_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/file/ags_thread_file_xml_test.c'; fi` ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.o: ags/test/thread/ags_thread_pool_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_pool_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_thread_pool_test-ags_thread_pool_test.Tpo -c -o ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.o `test -f 'ags/test/thread/ags_thread_pool_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_thread_pool_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_thread_pool_test-ags_thread_pool_test.Tpo ags/test/thread/$(DEPDIR)/ags_thread_pool_test-ags_thread_pool_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_thread_pool_test.c' object='ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_pool_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.o `test -f 'ags/test/thread/ags_thread_pool_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_thread_pool_test.c ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.obj: ags/test/thread/ags_thread_pool_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_pool_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_thread_pool_test-ags_thread_pool_test.Tpo -c -o ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.obj `if test -f 'ags/test/thread/ags_thread_pool_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_thread_pool_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_thread_pool_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_thread_pool_test-ags_thread_pool_test.Tpo ags/test/thread/$(DEPDIR)/ags_thread_pool_test-ags_thread_pool_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_thread_pool_test.c' object='ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_pool_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_thread_pool_test-ags_thread_pool_test.obj `if test -f 'ags/test/thread/ags_thread_pool_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_thread_pool_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_thread_pool_test.c'; fi` ags/test/thread/ags_thread_test-ags_thread_test.o: ags/test/thread/ags_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_thread_test-ags_thread_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_thread_test-ags_thread_test.Tpo -c -o ags/test/thread/ags_thread_test-ags_thread_test.o `test -f 'ags/test/thread/ags_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_thread_test-ags_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_thread_test-ags_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_thread_test.c' object='ags/test/thread/ags_thread_test-ags_thread_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_thread_test-ags_thread_test.o `test -f 'ags/test/thread/ags_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_thread_test.c ags/test/thread/ags_thread_test-ags_thread_test.obj: ags/test/thread/ags_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_thread_test-ags_thread_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_thread_test-ags_thread_test.Tpo -c -o ags/test/thread/ags_thread_test-ags_thread_test.obj `if test -f 'ags/test/thread/ags_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_thread_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_thread_test-ags_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_thread_test-ags_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_thread_test.c' object='ags/test/thread/ags_thread_test-ags_thread_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_thread_test-ags_thread_test.obj `if test -f 'ags/test/thread/ags_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_thread_test.c'; fi` ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.o: ags/test/lib/ags_turtle_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_turtle_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.o -MD -MP -MF ags/test/lib/$(DEPDIR)/ags_turtle_manager_test-ags_turtle_manager_test.Tpo -c -o ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.o `test -f 'ags/test/lib/ags_turtle_manager_test.c' || echo '$(srcdir)/'`ags/test/lib/ags_turtle_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/lib/$(DEPDIR)/ags_turtle_manager_test-ags_turtle_manager_test.Tpo ags/test/lib/$(DEPDIR)/ags_turtle_manager_test-ags_turtle_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/lib/ags_turtle_manager_test.c' object='ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_turtle_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.o `test -f 'ags/test/lib/ags_turtle_manager_test.c' || echo '$(srcdir)/'`ags/test/lib/ags_turtle_manager_test.c ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.obj: ags/test/lib/ags_turtle_manager_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_turtle_manager_test_CFLAGS) $(CFLAGS) -MT ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.obj -MD -MP -MF ags/test/lib/$(DEPDIR)/ags_turtle_manager_test-ags_turtle_manager_test.Tpo -c -o ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.obj `if test -f 'ags/test/lib/ags_turtle_manager_test.c'; then $(CYGPATH_W) 'ags/test/lib/ags_turtle_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/lib/ags_turtle_manager_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/lib/$(DEPDIR)/ags_turtle_manager_test-ags_turtle_manager_test.Tpo ags/test/lib/$(DEPDIR)/ags_turtle_manager_test-ags_turtle_manager_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/lib/ags_turtle_manager_test.c' object='ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_turtle_manager_test_CFLAGS) $(CFLAGS) -c -o ags/test/lib/ags_turtle_manager_test-ags_turtle_manager_test.obj `if test -f 'ags/test/lib/ags_turtle_manager_test.c'; then $(CYGPATH_W) 'ags/test/lib/ags_turtle_manager_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/lib/ags_turtle_manager_test.c'; fi` ags/test/lib/ags_turtle_test-ags_turtle_test.o: ags/test/lib/ags_turtle_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_turtle_test_CFLAGS) $(CFLAGS) -MT ags/test/lib/ags_turtle_test-ags_turtle_test.o -MD -MP -MF ags/test/lib/$(DEPDIR)/ags_turtle_test-ags_turtle_test.Tpo -c -o ags/test/lib/ags_turtle_test-ags_turtle_test.o `test -f 'ags/test/lib/ags_turtle_test.c' || echo '$(srcdir)/'`ags/test/lib/ags_turtle_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/lib/$(DEPDIR)/ags_turtle_test-ags_turtle_test.Tpo ags/test/lib/$(DEPDIR)/ags_turtle_test-ags_turtle_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/lib/ags_turtle_test.c' object='ags/test/lib/ags_turtle_test-ags_turtle_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_turtle_test_CFLAGS) $(CFLAGS) -c -o ags/test/lib/ags_turtle_test-ags_turtle_test.o `test -f 'ags/test/lib/ags_turtle_test.c' || echo '$(srcdir)/'`ags/test/lib/ags_turtle_test.c ags/test/lib/ags_turtle_test-ags_turtle_test.obj: ags/test/lib/ags_turtle_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_turtle_test_CFLAGS) $(CFLAGS) -MT ags/test/lib/ags_turtle_test-ags_turtle_test.obj -MD -MP -MF ags/test/lib/$(DEPDIR)/ags_turtle_test-ags_turtle_test.Tpo -c -o ags/test/lib/ags_turtle_test-ags_turtle_test.obj `if test -f 'ags/test/lib/ags_turtle_test.c'; then $(CYGPATH_W) 'ags/test/lib/ags_turtle_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/lib/ags_turtle_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/lib/$(DEPDIR)/ags_turtle_test-ags_turtle_test.Tpo ags/test/lib/$(DEPDIR)/ags_turtle_test-ags_turtle_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/lib/ags_turtle_test.c' object='ags/test/lib/ags_turtle_test-ags_turtle_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_turtle_test_CFLAGS) $(CFLAGS) -c -o ags/test/lib/ags_turtle_test-ags_turtle_test.obj `if test -f 'ags/test/lib/ags_turtle_test.c'; then $(CYGPATH_W) 'ags/test/lib/ags_turtle_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/lib/ags_turtle_test.c'; fi` ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.o: ags/test/thread/ags_worker_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_worker_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.o -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_worker_thread_test-ags_worker_thread_test.Tpo -c -o ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.o `test -f 'ags/test/thread/ags_worker_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_worker_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_worker_thread_test-ags_worker_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_worker_thread_test-ags_worker_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_worker_thread_test.c' object='ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_worker_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.o `test -f 'ags/test/thread/ags_worker_thread_test.c' || echo '$(srcdir)/'`ags/test/thread/ags_worker_thread_test.c ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.obj: ags/test/thread/ags_worker_thread_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_worker_thread_test_CFLAGS) $(CFLAGS) -MT ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.obj -MD -MP -MF ags/test/thread/$(DEPDIR)/ags_worker_thread_test-ags_worker_thread_test.Tpo -c -o ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.obj `if test -f 'ags/test/thread/ags_worker_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_worker_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_worker_thread_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/thread/$(DEPDIR)/ags_worker_thread_test-ags_worker_thread_test.Tpo ags/test/thread/$(DEPDIR)/ags_worker_thread_test-ags_worker_thread_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/thread/ags_worker_thread_test.c' object='ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_worker_thread_test_CFLAGS) $(CFLAGS) -c -o ags/test/thread/ags_worker_thread_test-ags_worker_thread_test.obj `if test -f 'ags/test/thread/ags_worker_thread_test.c'; then $(CYGPATH_W) 'ags/test/thread/ags_worker_thread_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/thread/ags_worker_thread_test.c'; fi` ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.o: ags/test/X/ags_xorg_application_context_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_xorg_application_context_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_xorg_application_context_test-ags_xorg_application_context_test.Tpo -c -o ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.o `test -f 'ags/test/X/ags_xorg_application_context_test.c' || echo '$(srcdir)/'`ags/test/X/ags_xorg_application_context_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_xorg_application_context_test-ags_xorg_application_context_test.Tpo ags/test/X/$(DEPDIR)/ags_xorg_application_context_test-ags_xorg_application_context_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_xorg_application_context_test.c' object='ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_xorg_application_context_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.o `test -f 'ags/test/X/ags_xorg_application_context_test.c' || echo '$(srcdir)/'`ags/test/X/ags_xorg_application_context_test.c ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.obj: ags/test/X/ags_xorg_application_context_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_xorg_application_context_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_xorg_application_context_test-ags_xorg_application_context_test.Tpo -c -o ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.obj `if test -f 'ags/test/X/ags_xorg_application_context_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_xorg_application_context_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_xorg_application_context_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_xorg_application_context_test-ags_xorg_application_context_test.Tpo ags/test/X/$(DEPDIR)/ags_xorg_application_context_test-ags_xorg_application_context_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_xorg_application_context_test.c' object='ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_xorg_application_context_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_xorg_application_context_test-ags_xorg_application_context_test.obj `if test -f 'ags/test/X/ags_xorg_application_context_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_xorg_application_context_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_xorg_application_context_test.c'; fi` ags/gsequencer-gsequencer_main.o: ags/gsequencer_main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -MT ags/gsequencer-gsequencer_main.o -MD -MP -MF ags/$(DEPDIR)/gsequencer-gsequencer_main.Tpo -c -o ags/gsequencer-gsequencer_main.o `test -f 'ags/gsequencer_main.c' || echo '$(srcdir)/'`ags/gsequencer_main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/$(DEPDIR)/gsequencer-gsequencer_main.Tpo ags/$(DEPDIR)/gsequencer-gsequencer_main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/gsequencer_main.c' object='ags/gsequencer-gsequencer_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -c -o ags/gsequencer-gsequencer_main.o `test -f 'ags/gsequencer_main.c' || echo '$(srcdir)/'`ags/gsequencer_main.c ags/gsequencer-gsequencer_main.obj: ags/gsequencer_main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -MT ags/gsequencer-gsequencer_main.obj -MD -MP -MF ags/$(DEPDIR)/gsequencer-gsequencer_main.Tpo -c -o ags/gsequencer-gsequencer_main.obj `if test -f 'ags/gsequencer_main.c'; then $(CYGPATH_W) 'ags/gsequencer_main.c'; else $(CYGPATH_W) '$(srcdir)/ags/gsequencer_main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/$(DEPDIR)/gsequencer-gsequencer_main.Tpo ags/$(DEPDIR)/gsequencer-gsequencer_main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/gsequencer_main.c' object='ags/gsequencer-gsequencer_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -c -o ags/gsequencer-gsequencer_main.obj `if test -f 'ags/gsequencer_main.c'; then $(CYGPATH_W) 'ags/gsequencer_main.c'; else $(CYGPATH_W) '$(srcdir)/ags/gsequencer_main.c'; fi` ags/midi2xml-midi2xml_main.o: ags/midi2xml_main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(midi2xml_CFLAGS) $(CFLAGS) -MT ags/midi2xml-midi2xml_main.o -MD -MP -MF ags/$(DEPDIR)/midi2xml-midi2xml_main.Tpo -c -o ags/midi2xml-midi2xml_main.o `test -f 'ags/midi2xml_main.c' || echo '$(srcdir)/'`ags/midi2xml_main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/$(DEPDIR)/midi2xml-midi2xml_main.Tpo ags/$(DEPDIR)/midi2xml-midi2xml_main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/midi2xml_main.c' object='ags/midi2xml-midi2xml_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(midi2xml_CFLAGS) $(CFLAGS) -c -o ags/midi2xml-midi2xml_main.o `test -f 'ags/midi2xml_main.c' || echo '$(srcdir)/'`ags/midi2xml_main.c ags/midi2xml-midi2xml_main.obj: ags/midi2xml_main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(midi2xml_CFLAGS) $(CFLAGS) -MT ags/midi2xml-midi2xml_main.obj -MD -MP -MF ags/$(DEPDIR)/midi2xml-midi2xml_main.Tpo -c -o ags/midi2xml-midi2xml_main.obj `if test -f 'ags/midi2xml_main.c'; then $(CYGPATH_W) 'ags/midi2xml_main.c'; else $(CYGPATH_W) '$(srcdir)/ags/midi2xml_main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/$(DEPDIR)/midi2xml-midi2xml_main.Tpo ags/$(DEPDIR)/midi2xml-midi2xml_main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/midi2xml_main.c' object='ags/midi2xml-midi2xml_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(midi2xml_CFLAGS) $(CFLAGS) -c -o ags/midi2xml-midi2xml_main.obj `if test -f 'ags/midi2xml_main.c'; then $(CYGPATH_W) 'ags/midi2xml_main.c'; else $(CYGPATH_W) '$(srcdir)/ags/midi2xml_main.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf ags/X/.libs ags/X/_libs -rm -rf ags/X/editor/.libs ags/X/editor/_libs -rm -rf ags/X/export/.libs ags/X/export/_libs -rm -rf ags/X/file/.libs ags/X/file/_libs -rm -rf ags/X/import/.libs ags/X/import/_libs -rm -rf ags/X/machine/.libs ags/X/machine/_libs -rm -rf ags/X/task/.libs ags/X/task/_libs -rm -rf ags/X/thread/.libs ags/X/thread/_libs -rm -rf ags/audio/.libs ags/audio/_libs -rm -rf ags/audio/client/.libs ags/audio/client/_libs -rm -rf ags/audio/core-audio/.libs ags/audio/core-audio/_libs -rm -rf ags/audio/file/.libs ags/audio/file/_libs -rm -rf ags/audio/jack/.libs ags/audio/jack/_libs -rm -rf ags/audio/midi/.libs ags/audio/midi/_libs -rm -rf ags/audio/pulse/.libs ags/audio/pulse/_libs -rm -rf ags/audio/recall/.libs ags/audio/recall/_libs -rm -rf ags/audio/task/.libs ags/audio/task/_libs -rm -rf ags/audio/task/recall/.libs ags/audio/task/recall/_libs -rm -rf ags/audio/thread/.libs ags/audio/thread/_libs -rm -rf ags/file/.libs ags/file/_libs -rm -rf ags/lib/.libs ags/lib/_libs -rm -rf ags/object/.libs ags/object/_libs -rm -rf ags/plugin/.libs ags/plugin/_libs -rm -rf ags/server/.libs ags/server/_libs -rm -rf ags/server/controller/.libs ags/server/controller/_libs -rm -rf ags/server/security/.libs ags/server/security/_libs -rm -rf ags/server/thread/.libs ags/server/thread/_libs -rm -rf ags/test/X/.libs ags/test/X/_libs -rm -rf ags/thread/.libs ags/thread/_libs -rm -rf ags/thread/file/.libs ags/thread/file/_libs -rm -rf ags/util/.libs ags/util/_libs -rm -rf ags/widget/.libs ags/widget/_libs distclean-libtool: -rm -f libtool config.lt install-man1: $(man1_MANS) @$(NORMAL_INSTALL) @list1='$(man1_MANS)'; \ list2=''; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-appdataDATA: $(appdata_DATA) @$(NORMAL_INSTALL) @list='$(appdata_DATA)'; test -n "$(appdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appdatadir)" || exit $$?; \ done uninstall-appdataDATA: @$(NORMAL_UNINSTALL) @list='$(appdata_DATA)'; test -n "$(appdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appdatadir)'; $(am__uninstall_files_from_dir) install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ done uninstall-nobase_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ags-docs-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_LTLIBRARIES) $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? ags_application_context_test.log: ags_application_context_test$(EXEEXT) @p='ags_application_context_test$(EXEEXT)'; \ b='ags_application_context_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_config_test.log: ags_config_test$(EXEEXT) @p='ags_config_test$(EXEEXT)'; \ b='ags_config_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_connection_manager_test.log: ags_connection_manager_test$(EXEEXT) @p='ags_connection_manager_test$(EXEEXT)'; \ b='ags_connection_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_condition_manager_test.log: ags_condition_manager_test$(EXEEXT) @p='ags_condition_manager_test$(EXEEXT)'; \ b='ags_condition_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_destroy_worker_test.log: ags_destroy_worker_test$(EXEEXT) @p='ags_destroy_worker_test$(EXEEXT)'; \ b='ags_destroy_worker_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_mutex_manager_test.log: ags_mutex_manager_test$(EXEEXT) @p='ags_mutex_manager_test$(EXEEXT)'; \ b='ags_mutex_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_poll_fd_test.log: ags_poll_fd_test$(EXEEXT) @p='ags_poll_fd_test$(EXEEXT)'; \ b='ags_poll_fd_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_polling_thread_test.log: ags_polling_thread_test$(EXEEXT) @p='ags_polling_thread_test$(EXEEXT)'; \ b='ags_polling_thread_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_returnable_thread_test.log: ags_returnable_thread_test$(EXEEXT) @p='ags_returnable_thread_test$(EXEEXT)'; \ b='ags_returnable_thread_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_task_test.log: ags_task_test$(EXEEXT) @p='ags_task_test$(EXEEXT)'; \ b='ags_task_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_task_thread_test.log: ags_task_thread_test$(EXEEXT) @p='ags_task_thread_test$(EXEEXT)'; \ b='ags_task_thread_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_thread_test.log: ags_thread_test$(EXEEXT) @p='ags_thread_test$(EXEEXT)'; \ b='ags_thread_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_thread_pool_test.log: ags_thread_pool_test$(EXEEXT) @p='ags_thread_pool_test$(EXEEXT)'; \ b='ags_thread_pool_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_worker_thread_test.log: ags_worker_thread_test$(EXEEXT) @p='ags_worker_thread_test$(EXEEXT)'; \ b='ags_worker_thread_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_thread_file_xml_test.log: ags_thread_file_xml_test$(EXEEXT) @p='ags_thread_file_xml_test$(EXEEXT)'; \ b='ags_thread_file_xml_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_file_test.log: ags_file_test$(EXEEXT) @p='ags_file_test$(EXEEXT)'; \ b='ags_file_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_file_id_ref_test.log: ags_file_id_ref_test$(EXEEXT) @p='ags_file_id_ref_test$(EXEEXT)'; \ b='ags_file_id_ref_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_file_launch_test.log: ags_file_launch_test$(EXEEXT) @p='ags_file_launch_test$(EXEEXT)'; \ b='ags_file_launch_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_file_lookup_test.log: ags_file_lookup_test$(EXEEXT) @p='ags_file_lookup_test$(EXEEXT)'; \ b='ags_file_lookup_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_complex_test.log: ags_complex_test$(EXEEXT) @p='ags_complex_test$(EXEEXT)'; \ b='ags_complex_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_log_test.log: ags_log_test$(EXEEXT) @p='ags_log_test$(EXEEXT)'; \ b='ags_log_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_turtle_test.log: ags_turtle_test$(EXEEXT) @p='ags_turtle_test$(EXEEXT)'; \ b='ags_turtle_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_turtle_manager_test.log: ags_turtle_manager_test$(EXEEXT) @p='ags_turtle_manager_test$(EXEEXT)'; \ b='ags_turtle_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_base_plugin_test.log: ags_base_plugin_test$(EXEEXT) @p='ags_base_plugin_test$(EXEEXT)'; \ b='ags_base_plugin_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_dssi_manager_test.log: ags_dssi_manager_test$(EXEEXT) @p='ags_dssi_manager_test$(EXEEXT)'; \ b='ags_dssi_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_dssi_plugin_test.log: ags_dssi_plugin_test$(EXEEXT) @p='ags_dssi_plugin_test$(EXEEXT)'; \ b='ags_dssi_plugin_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_ladspa_manager_test.log: ags_ladspa_manager_test$(EXEEXT) @p='ags_ladspa_manager_test$(EXEEXT)'; \ b='ags_ladspa_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_lv2_manager_test.log: ags_lv2_manager_test$(EXEEXT) @p='ags_lv2_manager_test$(EXEEXT)'; \ b='ags_lv2_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_lv2_option_manager_test.log: ags_lv2_option_manager_test$(EXEEXT) @p='ags_lv2_option_manager_test$(EXEEXT)'; \ b='ags_lv2_option_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_lv2_plugin_test.log: ags_lv2_plugin_test$(EXEEXT) @p='ags_lv2_plugin_test$(EXEEXT)'; \ b='ags_lv2_plugin_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_lv2_preset_test.log: ags_lv2_preset_test$(EXEEXT) @p='ags_lv2_preset_test$(EXEEXT)'; \ b='ags_lv2_preset_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_lv2_uri_map_manager_test.log: ags_lv2_uri_map_manager_test$(EXEEXT) @p='ags_lv2_uri_map_manager_test$(EXEEXT)'; \ b='ags_lv2_uri_map_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_lv2_urid_manager_test.log: ags_lv2_urid_manager_test$(EXEEXT) @p='ags_lv2_urid_manager_test$(EXEEXT)'; \ b='ags_lv2_urid_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_lv2_worker_manager_test.log: ags_lv2_worker_manager_test$(EXEEXT) @p='ags_lv2_worker_manager_test$(EXEEXT)'; \ b='ags_lv2_worker_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_lv2ui_manager_test.log: ags_lv2ui_manager_test$(EXEEXT) @p='ags_lv2ui_manager_test$(EXEEXT)'; \ b='ags_lv2ui_manager_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_lv2ui_plugin_test.log: ags_lv2ui_plugin_test$(EXEEXT) @p='ags_lv2ui_plugin_test$(EXEEXT)'; \ b='ags_lv2ui_plugin_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_audio_application_context_test.log: ags_audio_application_context_test$(EXEEXT) @p='ags_audio_application_context_test$(EXEEXT)'; \ b='ags_audio_application_context_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_devout_test.log: ags_devout_test$(EXEEXT) @p='ags_devout_test$(EXEEXT)'; \ b='ags_devout_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_midiin_test.log: ags_midiin_test$(EXEEXT) @p='ags_midiin_test$(EXEEXT)'; \ b='ags_midiin_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_audio_test.log: ags_audio_test$(EXEEXT) @p='ags_audio_test$(EXEEXT)'; \ b='ags_audio_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_audio_connection_test.log: ags_audio_connection_test$(EXEEXT) @p='ags_audio_connection_test$(EXEEXT)'; \ b='ags_audio_connection_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_playback_domain_test.log: ags_playback_domain_test$(EXEEXT) @p='ags_playback_domain_test$(EXEEXT)'; \ b='ags_playback_domain_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_playback_test.log: ags_playback_test$(EXEEXT) @p='ags_playback_test$(EXEEXT)'; \ b='ags_playback_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_preset_test.log: ags_preset_test$(EXEEXT) @p='ags_preset_test$(EXEEXT)'; \ b='ags_preset_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_channel_test.log: ags_channel_test$(EXEEXT) @p='ags_channel_test$(EXEEXT)'; \ b='ags_channel_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_input_test.log: ags_input_test$(EXEEXT) @p='ags_input_test$(EXEEXT)'; \ b='ags_input_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_output_test.log: ags_output_test$(EXEEXT) @p='ags_output_test$(EXEEXT)'; \ b='ags_output_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_recycling_test.log: ags_recycling_test$(EXEEXT) @p='ags_recycling_test$(EXEEXT)'; \ b='ags_recycling_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_audio_signal_test.log: ags_audio_signal_test$(EXEEXT) @p='ags_audio_signal_test$(EXEEXT)'; \ b='ags_audio_signal_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_recall_test.log: ags_recall_test$(EXEEXT) @p='ags_recall_test$(EXEEXT)'; \ b='ags_recall_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_recall_channel_test.log: ags_recall_channel_test$(EXEEXT) @p='ags_recall_channel_test$(EXEEXT)'; \ b='ags_recall_channel_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_recall_channel_run_test.log: ags_recall_channel_run_test$(EXEEXT) @p='ags_recall_channel_run_test$(EXEEXT)'; \ b='ags_recall_channel_run_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_recall_container_test.log: ags_recall_container_test$(EXEEXT) @p='ags_recall_container_test$(EXEEXT)'; \ b='ags_recall_container_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_recall_dependency_test.log: ags_recall_dependency_test$(EXEEXT) @p='ags_recall_dependency_test$(EXEEXT)'; \ b='ags_recall_dependency_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_port_test.log: ags_port_test$(EXEEXT) @p='ags_port_test$(EXEEXT)'; \ b='ags_port_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_pattern_test.log: ags_pattern_test$(EXEEXT) @p='ags_pattern_test$(EXEEXT)'; \ b='ags_pattern_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_notation_test.log: ags_notation_test$(EXEEXT) @p='ags_notation_test$(EXEEXT)'; \ b='ags_notation_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_note_test.log: ags_note_test$(EXEEXT) @p='ags_note_test$(EXEEXT)'; \ b='ags_note_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_automation_test.log: ags_automation_test$(EXEEXT) @p='ags_automation_test$(EXEEXT)'; \ b='ags_automation_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_acceleration_test.log: ags_acceleration_test$(EXEEXT) @p='ags_acceleration_test$(EXEEXT)'; \ b='ags_acceleration_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_midi_buffer_util_test.log: ags_midi_buffer_util_test$(EXEEXT) @p='ags_midi_buffer_util_test$(EXEEXT)'; \ b='ags_midi_buffer_util_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_midi_builder_test.log: ags_midi_builder_test$(EXEEXT) @p='ags_midi_builder_test$(EXEEXT)'; \ b='ags_midi_builder_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_xorg_application_context_test.log: ags_xorg_application_context_test$(EXEEXT) @p='ags_xorg_application_context_test$(EXEEXT)'; \ b='ags_xorg_application_context_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_audio_test.log: ags_functional_audio_test$(EXEEXT) @p='ags_functional_audio_test$(EXEEXT)'; \ b='ags_functional_audio_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_machine_add_and_destroy_test.log: ags_functional_machine_add_and_destroy_test$(EXEEXT) @p='ags_functional_machine_add_and_destroy_test$(EXEEXT)'; \ b='ags_functional_machine_add_and_destroy_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_machine_link_test.log: ags_functional_machine_link_test$(EXEEXT) @p='ags_functional_machine_link_test$(EXEEXT)'; \ b='ags_functional_machine_link_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_line_member_add_and_destroy_test.log: ags_functional_line_member_add_and_destroy_test$(EXEEXT) @p='ags_functional_line_member_add_and_destroy_test$(EXEEXT)'; \ b='ags_functional_line_member_add_and_destroy_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_editor_workflow_test.log: ags_functional_editor_workflow_test$(EXEEXT) @p='ags_functional_editor_workflow_test$(EXEEXT)'; \ b='ags_functional_editor_workflow_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_panel_test.log: ags_functional_panel_test$(EXEEXT) @p='ags_functional_panel_test$(EXEEXT)'; \ b='ags_functional_panel_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_mixer_test.log: ags_functional_mixer_test$(EXEEXT) @p='ags_functional_mixer_test$(EXEEXT)'; \ b='ags_functional_mixer_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_drum_test.log: ags_functional_drum_test$(EXEEXT) @p='ags_functional_drum_test$(EXEEXT)'; \ b='ags_functional_drum_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_matrix_test.log: ags_functional_matrix_test$(EXEEXT) @p='ags_functional_matrix_test$(EXEEXT)'; \ b='ags_functional_matrix_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_synth_test.log: ags_functional_synth_test$(EXEEXT) @p='ags_functional_synth_test$(EXEEXT)'; \ b='ags_functional_synth_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_ffplayer_test.log: ags_functional_ffplayer_test$(EXEEXT) @p='ags_functional_ffplayer_test$(EXEEXT)'; \ b='ags_functional_ffplayer_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ags_functional_notation_edit_test.log: ags_functional_notation_edit_test$(EXEEXT) @p='ags_functional_notation_edit_test$(EXEEXT)'; \ b='ags_functional_notation_edit_test'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @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 shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) 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/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgsequencerdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdatadir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f ags/$(DEPDIR)/$(am__dirstamp) -rm -f ags/$(am__dirstamp) -rm -f ags/X/$(DEPDIR)/$(am__dirstamp) -rm -f ags/X/$(am__dirstamp) -rm -f ags/X/editor/$(DEPDIR)/$(am__dirstamp) -rm -f ags/X/editor/$(am__dirstamp) -rm -f ags/X/export/$(DEPDIR)/$(am__dirstamp) -rm -f ags/X/export/$(am__dirstamp) -rm -f ags/X/file/$(DEPDIR)/$(am__dirstamp) -rm -f ags/X/file/$(am__dirstamp) -rm -f ags/X/import/$(DEPDIR)/$(am__dirstamp) -rm -f ags/X/import/$(am__dirstamp) -rm -f ags/X/machine/$(DEPDIR)/$(am__dirstamp) -rm -f ags/X/machine/$(am__dirstamp) -rm -f ags/X/task/$(DEPDIR)/$(am__dirstamp) -rm -f ags/X/task/$(am__dirstamp) -rm -f ags/X/thread/$(DEPDIR)/$(am__dirstamp) -rm -f ags/X/thread/$(am__dirstamp) -rm -f ags/audio/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/$(am__dirstamp) -rm -f ags/audio/client/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/client/$(am__dirstamp) -rm -f ags/audio/core-audio/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/core-audio/$(am__dirstamp) -rm -f ags/audio/file/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/file/$(am__dirstamp) -rm -f ags/audio/jack/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/jack/$(am__dirstamp) -rm -f ags/audio/midi/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/midi/$(am__dirstamp) -rm -f ags/audio/pulse/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/pulse/$(am__dirstamp) -rm -f ags/audio/recall/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/recall/$(am__dirstamp) -rm -f ags/audio/task/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/task/$(am__dirstamp) -rm -f ags/audio/task/recall/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/task/recall/$(am__dirstamp) -rm -f ags/audio/thread/$(DEPDIR)/$(am__dirstamp) -rm -f ags/audio/thread/$(am__dirstamp) -rm -f ags/file/$(DEPDIR)/$(am__dirstamp) -rm -f ags/file/$(am__dirstamp) -rm -f ags/lib/$(DEPDIR)/$(am__dirstamp) -rm -f ags/lib/$(am__dirstamp) -rm -f ags/object/$(DEPDIR)/$(am__dirstamp) -rm -f ags/object/$(am__dirstamp) -rm -f ags/plugin/$(DEPDIR)/$(am__dirstamp) -rm -f ags/plugin/$(am__dirstamp) -rm -f ags/server/$(DEPDIR)/$(am__dirstamp) -rm -f ags/server/$(am__dirstamp) -rm -f ags/server/controller/$(DEPDIR)/$(am__dirstamp) -rm -f ags/server/controller/$(am__dirstamp) -rm -f ags/server/security/$(DEPDIR)/$(am__dirstamp) -rm -f ags/server/security/$(am__dirstamp) -rm -f ags/server/thread/$(DEPDIR)/$(am__dirstamp) -rm -f ags/server/thread/$(am__dirstamp) -rm -f ags/test/X/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/X/$(am__dirstamp) -rm -f ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/X/machine/$(am__dirstamp) -rm -f ags/test/audio/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/audio/$(am__dirstamp) -rm -f ags/test/audio/midi/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/audio/midi/$(am__dirstamp) -rm -f ags/test/file/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/file/$(am__dirstamp) -rm -f ags/test/lib/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/lib/$(am__dirstamp) -rm -f ags/test/object/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/object/$(am__dirstamp) -rm -f ags/test/plugin/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/plugin/$(am__dirstamp) -rm -f ags/test/thread/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/thread/$(am__dirstamp) -rm -f ags/test/thread/file/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/thread/file/$(am__dirstamp) -rm -f ags/thread/$(DEPDIR)/$(am__dirstamp) -rm -f ags/thread/$(am__dirstamp) -rm -f ags/thread/file/$(DEPDIR)/$(am__dirstamp) -rm -f ags/thread/file/$(am__dirstamp) -rm -f ags/util/$(DEPDIR)/$(am__dirstamp) -rm -f ags/util/$(am__dirstamp) -rm -f ags/widget/$(DEPDIR)/$(am__dirstamp) -rm -f ags/widget/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." ags-docs: ags-docs-recursive ags-docs-am: ags-docs-local clean: clean-recursive clean-am: clean-binPROGRAMS clean-checkLTLIBRARIES clean-checkPROGRAMS \ clean-generic clean-libLTLIBRARIES \ clean-libgsequencerLTLIBRARIES clean-libtool clean-local \ mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ags/$(DEPDIR) ags/X/$(DEPDIR) ags/X/editor/$(DEPDIR) ags/X/export/$(DEPDIR) ags/X/file/$(DEPDIR) ags/X/import/$(DEPDIR) ags/X/machine/$(DEPDIR) ags/X/task/$(DEPDIR) ags/X/thread/$(DEPDIR) ags/audio/$(DEPDIR) ags/audio/client/$(DEPDIR) ags/audio/core-audio/$(DEPDIR) ags/audio/file/$(DEPDIR) ags/audio/jack/$(DEPDIR) ags/audio/midi/$(DEPDIR) ags/audio/pulse/$(DEPDIR) ags/audio/recall/$(DEPDIR) ags/audio/task/$(DEPDIR) ags/audio/task/recall/$(DEPDIR) ags/audio/thread/$(DEPDIR) ags/file/$(DEPDIR) ags/lib/$(DEPDIR) ags/object/$(DEPDIR) ags/plugin/$(DEPDIR) ags/server/$(DEPDIR) ags/server/controller/$(DEPDIR) ags/server/security/$(DEPDIR) ags/server/thread/$(DEPDIR) ags/test/X/$(DEPDIR) ags/test/X/machine/$(DEPDIR) ags/test/audio/$(DEPDIR) ags/test/audio/midi/$(DEPDIR) ags/test/file/$(DEPDIR) ags/test/lib/$(DEPDIR) ags/test/object/$(DEPDIR) ags/test/plugin/$(DEPDIR) ags/test/thread/$(DEPDIR) ags/test/thread/file/$(DEPDIR) ags/thread/$(DEPDIR) ags/thread/file/$(DEPDIR) ags/util/$(DEPDIR) ags/widget/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html-am: info: info-recursive info-am: install-data-am: install-appdataDATA install-data-local \ install-docDATA install-libgsequencerLTLIBRARIES install-man \ install-nobase_includeHEADERS install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ags/$(DEPDIR) ags/X/$(DEPDIR) ags/X/editor/$(DEPDIR) ags/X/export/$(DEPDIR) ags/X/file/$(DEPDIR) ags/X/import/$(DEPDIR) ags/X/machine/$(DEPDIR) ags/X/task/$(DEPDIR) ags/X/thread/$(DEPDIR) ags/audio/$(DEPDIR) ags/audio/client/$(DEPDIR) ags/audio/core-audio/$(DEPDIR) ags/audio/file/$(DEPDIR) ags/audio/jack/$(DEPDIR) ags/audio/midi/$(DEPDIR) ags/audio/pulse/$(DEPDIR) ags/audio/recall/$(DEPDIR) ags/audio/task/$(DEPDIR) ags/audio/task/recall/$(DEPDIR) ags/audio/thread/$(DEPDIR) ags/file/$(DEPDIR) ags/lib/$(DEPDIR) ags/object/$(DEPDIR) ags/plugin/$(DEPDIR) ags/server/$(DEPDIR) ags/server/controller/$(DEPDIR) ags/server/security/$(DEPDIR) ags/server/thread/$(DEPDIR) ags/test/X/$(DEPDIR) ags/test/X/machine/$(DEPDIR) ags/test/audio/$(DEPDIR) ags/test/audio/midi/$(DEPDIR) ags/test/file/$(DEPDIR) ags/test/lib/$(DEPDIR) ags/test/object/$(DEPDIR) ags/test/plugin/$(DEPDIR) ags/test/thread/$(DEPDIR) ags/test/thread/file/$(DEPDIR) ags/thread/$(DEPDIR) ags/thread/file/$(DEPDIR) ags/util/$(DEPDIR) ags/widget/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-appdataDATA uninstall-binPROGRAMS \ uninstall-docDATA uninstall-libLTLIBRARIES \ uninstall-libgsequencerLTLIBRARIES uninstall-man \ uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 .MAKE: $(am__recursive_targets) check-am install-am install-strip \ uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS ags-docs-am \ ags-docs-local all all-am am--refresh check check-TESTS \ check-am clean clean-binPROGRAMS clean-checkLTLIBRARIES \ clean-checkPROGRAMS clean-cscope clean-generic \ clean-libLTLIBRARIES clean-libgsequencerLTLIBRARIES \ clean-libtool clean-local cscope cscopelist-am ctags ctags-am \ dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-appdataDATA install-binPROGRAMS \ install-data install-data-am install-data-local \ install-docDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES \ install-libgsequencerLTLIBRARIES install-man install-man1 \ install-nobase_includeHEADERS install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am recheck tags tags-am uninstall \ uninstall-am uninstall-appdataDATA uninstall-binPROGRAMS \ uninstall-docDATA uninstall-hook uninstall-libLTLIBRARIES \ uninstall-libgsequencerLTLIBRARIES uninstall-man \ uninstall-man1 uninstall-nobase_includeHEADERS \ uninstall-pkgconfigDATA .PRECIOUS: Makefile ags-integration-test: $(MAKE) -C $(top_srcdir) -f functional-system-tests.mk ags-check-system libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status libtool gsequencer.1: xsltproc --nonet --param make.year.ranges 1 --param make.single.year.ranges 1 --param man.charmap.use.subset 0 -o $(top_srcdir) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl gsequencer.1.xml midi2xml.1: xsltproc --nonet --param make.year.ranges 1 --param make.single.year.ranges 1 --param man.charmap.use.subset 0 -o $(top_srcdir)/ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl midi2xml.1.xml gsequencer.desktop: gsequencer.desktop.in $(AM_V_GEN)sed -e 's,\@datadir\@,$(datadir),g' < "$<" > $@ html: mkdir -p $(top_builddir)/html/ mkdir -p $(top_builddir)/html/{developer-docs,user-docs} xsltproc --output $(top_builddir)/html/user-docs/ --xinclude /usr/share/xml/docbook/stylesheet/docbook-xsl/htmlhelp/htmlhelp.xsl $(top_srcdir)/docs/usersBook.xml xsltproc --output $(top_builddir)/html/developer-docs/ --xinclude /usr/share/xml/docbook/stylesheet/docbook-xsl/htmlhelp/htmlhelp.xsl $(top_srcdir)/docs/developersBook.xml $(MAKE) -C $(top_srcdir)/docs/reference/libags cd $(top_srcdir) $(MAKE) -C $(top_srcdir)/docs/reference/libags-audio cd $(top_srcdir) $(MAKE) -C $(top_srcdir)/docs/reference/libags-gui cd $(top_srcdir) $(MAKE) -C $(top_srcdir)/docs/reference/libgsequencer cd $(top_srcdir) install-data-local: mkdir -p $(DESTDIR)/$(datadir)/doc-base mkdir -p $(DESTDIR)/$(datadir)/gsequencer/icons mkdir -p $(DESTDIR)/$(datadir)/gsequencer/images mkdir -p $(DESTDIR)/$(datadir)/gsequencer/styles mkdir -p $(DESTDIR)/$(datadir)/xml/gsequencer/{schema/dtd/$(PACKAGE_VERSION)/,stylesheet/ags-xsl/midi-xml/} install -c -p -m 644 $(top_srcdir)/gsequencer.share/icons/ags.xpm $(DESTDIR)/$(datadir)/gsequencer/icons/ags.xpm install -c -p -m 644 $(top_srcdir)/gsequencer.share/icons/jumper.png $(DESTDIR)/$(datadir)/gsequencer/icons/jumper.png install -c -p -m 644 $(top_srcdir)/gsequencer.share/icons/ags.png $(DESTDIR)/$(datadir)/gsequencer/icons/ags.png install -c -p -m 644 $(top_srcdir)/gsequencer.share/images/ags.png $(DESTDIR)/$(datadir)/gsequencer/images/ags.png install -c -p -m 644 $(top_srcdir)/gsequencer.share/images/ags_supermoon-800x450.png $(DESTDIR)/$(datadir)/gsequencer/images/ags_supermoon-800x450.png install -c -p -m 644 $(top_srcdir)/gsequencer.share/styles/ags.rc $(DESTDIR)/$(datadir)/gsequencer/styles/ags.rc install -c -p -m 644 $(top_srcdir)/ags/X/file/ags_simple_file.dtd $(DESTDIR)/$(datadir)/xml/gsequencer/schema/dtd/$(PACKAGE_VERSION)/ install -c -p -m 644 $(top_srcdir)/ags/audio/midi/ags_midi_file.dtd $(DESTDIR)/$(datadir)/xml/gsequencer/schema/dtd/$(PACKAGE_VERSION)/ install -c -p -m 644 $(top_srcdir)/ags/file/ags_file.dtd $(DESTDIR)/$(datadir)/xml/gsequencer/schema/dtd/$(PACKAGE_VERSION)/ install -c -p -m 644 $(top_srcdir)/ags.xsl $(DESTDIR)/$(datadir)/xml/gsequencer/stylesheet/ags-xsl/midi-xml/ install -c -p -m 644 $(top_srcdir)/ags-simple.xsl $(DESTDIR)/$(datadir)/xml/gsequencer/stylesheet/ags-xsl/midi-xml/ mkdir -p $(DESTDIR)/$(docdir)/ gzip -9 -c $(top_srcdir)/ChangeLog > $(DESTDIR)/$(docdir)/changelog.gz fix-local-html: html find $(top_srcdir)/docs/reference/libags/libags-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/\/usr\/share\/doc\/libglib2.0-doc\/gobject/g' {} \; find $(top_srcdir)/docs/reference/libags-audio/libags-audio-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/\/usr\/share\/doc\/libglib2.0-doc\/gobject/g' {} \; find $(top_srcdir)/docs/reference/libags-audio/libags-audio-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-html/\/usr\/share\/doc\/libags-doc\/api/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/\/usr\/share\/doc\/libglib2.0-doc\/gobject/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk2/\/usr\/share\/doc\/libgtk2.0-doc\/gtk2/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk3/\/usr\/share\/doc\/libgtk2.0-doc\/gtk2/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/\/usr\/share\/doc\/libglib2.0-doc\/gobject/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk2/\/usr\/share\/doc\/libgtk2.0-doc\/gtk2/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk3/\/usr\/share\/doc\/libgtk2.0-doc\/gtk2/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-html/\/usr\/share\/doc\/libags-doc\/api/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-audio-html/\/usr\/share\/doc\/libags-audio-doc\/api/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-gui-html/\/usr\/share\/doc\/libags-gui-doc\/api/g' {} \; fix-online-html: html find $(top_srcdir)/docs/reference/libags/libags-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/https\:\/\/developer\.gnome\.org\/gobject\/stable/g' {} \; find $(top_srcdir)/docs/reference/libags-audio/libags-audio-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/https\:\/\/developer\.gnome\.org\/gobject\/stable/g' {} \; find $(top_srcdir)/docs/reference/libags-audio/libags-audio-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-html/\.\.\/libags/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/https\:\/\/developer\.gnome\.org\/gobject\/stable/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk2/https\:\/\/developer\.gnome\.org\/gtk2\/stable/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk3/https\:\/\/developer\.gnome\.org\/gtk2\/stable/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/https\:\/\/developer\.gnome\.org\/gobject\/stable/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk2/https\:\/\/developer\.gnome\.org\/gtk2\/stable/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk3/https\:\/\/developer\.gnome\.org\/gtk2\/stable/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-html/\.\.\/libags/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-audio-html/\.\.\/libags-audio/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-gui-html/\.\.\/libags-gui/g' {} \; install-html: fix-local-html mkdir -p $(DESTDIR)/$(docdir)/{images,html}/ mkdir -p $(DESTDIR)/$(datadir)/doc/libags-audio-doc/{images,html}/ install -c -p -m 644 $(userdocimages) $(DESTDIR)/$(docdir)/images/ install -c -p -m 644 $(devdocimages) $(DESTDIR)/$(datadir)/doc/libags-audio-doc/images/ install -c -p -m 644 $(top_builddir)/html/user-docs/* $(DESTDIR)/$(docdir)/html/ install -c -p -m 644 $(top_builddir)/html/developer-docs/* $(DESTDIR)/$(datadir)/doc/libags-audio-doc/html/ mkdir -p $(DESTDIR)/$(datadir)/gtk-doc/html mkdir -p $(DESTDIR)/$(datadir)/doc/libags-doc/api mkdir -p $(DESTDIR)/$(datadir)/doc/libags-audio-doc/api mkdir -p $(DESTDIR)/$(datadir)/doc/libags-gui-doc/api mkdir -p $(DESTDIR)/$(datadir)/doc/libgsequencer-doc/api ln -s ../../../gtk-doc/html/libags $(DESTDIR)/$(datadir)/doc/libags-doc/api ln -s ../../../gtk-doc/html/libags_audio $(DESTDIR)/$(datadir)/doc/libags-audio-doc/api ln -s ../../../gtk-doc/html/libags_gui $(DESTDIR)/$(datadir)/doc/libags-gui-doc/api ln -s ../../../gtk-doc/html/libgsequencer $(DESTDIR)/$(datadir)/doc/libgsequencer-doc/api install -c -p -m 644 $(top_srcdir)/docs/reference/libags/libags-html/* $(DESTDIR)/$(datadir)/doc/libags-doc/api install -c -p -m 644 $(top_srcdir)/docs/reference/libags-audio/libags-audio-html/* $(DESTDIR)/$(datadir)/doc/libags-audio-doc/api install -c -p -m 644 $(top_srcdir)/docs/reference/libags-gui/libags-gui-html/* $(DESTDIR)/$(datadir)/doc/libags-gui-doc/api install -c -p -m 644 $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html/* $(DESTDIR)/$(datadir)/doc/libgsequencer-doc/api uninstall-hook: rm -rf $(DESTDIR)/$(datadir)/gsequencer rm -rf $(DESTDIR)/$(docdir) rm -rf $(DESTDIR)/$(datadir)/xml/gsequencer rm -rf $(DESTDIR)/$(datadir)/doc/libags-doc rm -rf $(DESTDIR)/$(datadir)/doc/libags-audio-doc rm -rf $(DESTDIR)/$(datadir)/doc/libags-gui-doc rm -rf $(DESTDIR)/$(datadir)/doc/libgsequencer-doc rm -rf $(DESTDIR)/$(datadir)/gtk-doc/html/libags rm -rf $(DESTDIR)/$(datadir)/gtk-doc/html/libags_audio rm -rf $(DESTDIR)/$(datadir)/gtk-doc/html/libags_gui rm -rf $(DESTDIR)/$(datadir)/gtk-doc/html/libgsequencer rm -f $(DESTDIR)/$(pkgconfigdir)/libags.pc rm -f $(DESTDIR)/$(pkgconfigdir)/libags_audio.pc rm -f $(DESTDIR)/$(pkgconfigdir)/libags_gui.pc rm -f $(DESTDIR)/$(pkgconfigdir)/libgsequencer.pc clean-local: rm -rf $(top_srcdir)/html rm -rf $(top_srcdir)/docs/reference/libags/xml rm -rf $(top_srcdir)/docs/reference/libags/libags-html rm -rf $(top_srcdir)/docs/reference/libags/tmpl rm -rf $(top_srcdir)/docs/reference/libags-audio/xml rm -rf $(top_srcdir)/docs/reference/libags-audio/libags-audio-html rm -rf $(top_srcdir)/docs/reference/libags-audio/tmpl rm -rf $(top_srcdir)/docs/reference/libags-gui/xml rm -rf $(top_srcdir)/docs/reference/libags-gui/libags-gui-html rm -rf $(top_srcdir)/docs/reference/libags-gui/tmpl rm -rf $(top_srcdir)/docs/reference/libgsequencer/xml rm -rf $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html rm -rf $(top_srcdir)/docs/reference/libgsequencer/tmpl rm -f $(top_builddir)/docs/reference/libags/Makefile rm -f $(top_builddir)/docs/reference/libags-audio/Makefile rm -f $(top_builddir)/docs/reference/libags-gui/Makefile rm -f $(top_builddir)/docs/reference/libgsequencer/Makefile rm -f $(top_builddir)/functional-system-tests.mk gen-symbols-ags: rm -f libags.sym touch libags.sym find ags/util -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags.sym find ags/lib -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags.sym echo "ags_application_context" >> libags.sym find ags/object -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags.sym find ags/object -name "ags_marshal.h" | xargs grep --no-filename -o -P "(g_cclosure_user_marshal_[a-zA-Z0-9_]+)" >> libags.sym find ags/file -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags.sym gen-symbols-ags-thread: rm -f libags_thread.sym touch libags_thread.sym find ags/thread -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_thread.sym gen-symbols-ags-server: rm -f libags_server.sym touch libags_server.sym find ags/server -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_server.sym gen-symbols-ags-audio: rm -f libags_audio.sym touch libags_audio.sym find ags/plugin -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_audio.sym find ags/audio -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_audio.sym gen-symbols-ags-gui: rm -f libags_gui.sym touch libags_gui.sym find ags/widget -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_gui.sym gen-symbols-all: gen-symbols-ags gen-symbols-ags-thread gen-symbols-ags-server gen-symbols-ags-audio gen-symbols-ags-gui echo "Generated all symbols" check-gettext: @if test x$(USE_NLS) != "xyes" ; then echo "Missing gettext. Rerun configure and check for" \ "'checking whether to use NLS... yes'!" ; exit 1 ; fi update-po: check-gettext @find $(srcdir)/ags/{util,lib,object,thread,file,server,plugin,audio,widget,X}/ -name "*.c" -print | sort > $(srcdir)/po/POTFILES.in.2 ; \ if diff $(srcdir)/po/POTFILES.in $(srcdir)/po/POTFILES.in.2 >/dev/null 2>&1 ; then \ rm -f $(srcdir)/po/POTFILES.in.2 ; \ else \ mv $(srcdir)/po/POTFILES.in.2 $(srcdir)/po/POTFILES.in ; \ fi cd po && $(MAKE) $(AM_MAKEFLAGS) update-po update-gmo: check-gettext cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo force-update-gmo: check-gettext touch po/*.po cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo force-update-gmo-%: check-gettext @language=`echo $@ | sed s/force-update-gmo-//` ; \ if test ! -f po/$$language.po ; then echo "file po/$$language.po does not exist" ; exit 1 ; fi ; \ touch po/$$language.po ; \ cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo .PHONY: check-gettext update-po update-gmo force-update-gmo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gsequencer-1.4.24/TODO0000644000175000017500000000251413256163135011363 00000000000000* TODO:JK: implemented AgsWaveWindow, AgsWaveEditor, AgsWaveToolbar and AgsWaveEdit * TODO:JK: implemented AgsSelectBuffer and AgsPositionAudioSignalCursor * TODO:JK: implemented AgsWave and AgsBuffer * TODO:JK: implemented ags-play-wave recall * TODO:JK: implemented ags-capture-sound recall * TODO:JK: implemented AgsAudiorec * TODO:JK: implemented AgsInputCollectionEditor, AgsInputListingEditor and AgsInputEditor * TODO:JK: improved ags-feed recall thread-safety * TODO:JK: improved ags_audio_signal_feed() reduce over-head * TODO:JK: improved AgsApplySynth thread-safety * TODO:JK: implemented AgsFunction * TODO:JK: implemented AgsServer, AgsRegistry and AgsServerStatus * TODO:JK: implemented AgsXmlAuthentication, AgsXmlCertificate and AgsXmlPasswordStore * TODO:JK: implemented AgsFrontController, AgsFactoryController, AgsLocalRegistryController, AgsLocalSerializationController and AgsLocalTaskController * TODO:JK: implemented audio input properties * TODO:JK: refactored AgsAutomationEditor to be more light-weight * TODO:JK: implemented AgsCartesian properties * TODO:JK: implemented AgsConnectable:disconnect() to all implementing objects * TODO:JK: implemented AgsPlaybackDomain properties * TODO:JK: implemented AgsPlayback properties * TODO:JK: implemented AgsScaleArea properties * TODO:JK: implemented AgsApplicationContext properties gsequencer-1.4.24/README0000644000175000017500000002001613256163135011550 00000000000000Advanced Gtk+ Sequencer ==== Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. jkraehemann@gmail.com It is recommended to have a realtime kernel in conjunction with ags in order to do more computing expensive synthesis. Please visit http://rt.wiki.kernel.org for more information. Following site gives you advice in configuring ALSA http://www.alsa-project.org/main/index.php/Low_latency_howto You might want to disable systemd accounting. https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html $ systemd-run -p CPUAccounting=false -p MemoryAccounting=false -p TasksAccounting=false -p IOAccounting=false -p BlockIOAccounting=false --scope gsequencer If you have pulseaudio running you might run `gsequencer` with pasuspender like: $ pasuspender -- gsequencer Purpose ==== The Advanced Gtk+ Sequencer framework is related to audio computation by representing it within a tree structure. It does various abstraction and the base library can serve as fundament of any application. libags provides an application context and a threaded tree. Which is synchronized by hard-realtime fashion. In terms of deterministic dead-line. Each tic of the used threads has to fulfill its work in order to proceed. The file object might be used for light-weight composition or persistency. libags-audio is built upon libags and provides a tree of audio signals. They can be computed in parallel. One key feature is the nested recycling tree. It allows to share audio data across channels. Further it avoids to wedge the parallel tree. There is support for free plugin standards like LADPSA, DSSI and Lv2. So it does give support to read or write MIDI data. libags-gui is a standalone library providing additional Gtk+-2.0 widgets. GSequencer is the main application providing a Gtk+-2.0 GUI. Allowing you to edit or record notation. It is designed to be accessible you should be able to control the entire application by keyboard. Likewise it implements various Atk interfaces. The frontend to AGS requires to add machines by menubar and link them appropriately with properties dialog. It is available of the context menu. Note you can't create any loops within the tree. General Notes on Licensing ==== Following images are used by the documentation and hence are distributed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation. * docs/images/ags_ffplayer.png * docs/images/ags_navigation.png * docs/images/ags_performance_preferences.png * docs/images/ags_midi_preferences.png * docs/images/ags_machine_properties-link_input.png * docs/images/ags_machine_properties-input.png * docs/images/ags_mixer.png * docs/images/ags_select_accelerations_dialog.png * docs/images/ags_machine_properties-resize_channels.png * docs/images/ags_server_preferences.png * docs/images/ags_midi_import_wizard_no2.png * docs/images/ags_machine_envelope_info.png * docs/images/ags_drum.png * docs/images/ags_matrix.png * docs/images/ags_midi_export_wizard_no1.png * docs/images/ags_crop_notes_dialog.png * docs/images/AGS_super-threaded.png * docs/images/ags_midi_import_wizard_no1.png * docs/images/AGS_recall_lifecycle.png * docs/images/AGS_linking.png * docs/images/AGS_iterator.png * docs/images/ags_automation_window_drum.png * docs/images/ags_audio_connection_output_line.png * docs/images/ags_machine_envelope_editor.png * docs/images/ags_select_notes_dialog.png * docs/images/ags_move_notes_dialog.png * docs/images/ags_ladspa_browser.png * docs/images/ags-automation-toolbar.png * docs/images/ags_ramp_accelerations_dialog.png * docs/images/ags_export_window.png * docs/images/ags_midi_export_wizard_no2.png * docs/images/ags_audio_connection_output_bulk.png * docs/images/ags_machine_envelope_pattern.png * docs/images/ags-toolbar.png * docs/images/ags_midi_dialog.png * docs/images/ags_machine_properties-output.png * docs/images/ags_syncsynth.png * docs/images/ags_generic_preferences.png * docs/images/ags_panel.png * docs/images/ags_audio_preferences.png * docs/images/ags_synth.png * docs/images/ags_position_notation_cursor_dialog.png * docs/images/ags_position_automation_cursor_dialog.png Following listings are used by the documentation and hence are distributed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation. * docs/listings/effects_echo_channel.c * docs/listings/file_property.c * docs/listings/effects_echo_audio.c * docs/listings/linking_prerequisites.c * docs/listings/linking_safe.c * docs/listings/effects_echo_audio_run.c * docs/listings/effects_recall_container.c * docs/listings/file_write.c * docs/listings/add_pattern.c * docs/listings/linking_unsafe.c * docs/listings/thread_application_context.c * docs/listings/effects_echo_channel_run.c * docs/listings/audio.c * docs/listings/pull_thread.c * docs/listings/application_mutex.c * docs/listings/audio_application_context.c * docs/listings/recycling.c * docs/listings/config.c * docs/listings/pcm_info.c * docs/listings/start_thread.c * docs/listings/file_read.c * docs/listings/complete_example.c The Advanced Gtk+ Sequencer logo is used by the final binary hence it is applied under 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.share/images/ags.png As well the desktop file: * gsequencer.desktop.in The generated symbol files have the very same license as their origin: * libags.sym (GPLv3+ and AGPLv3+) * libags-audio.sym (GPLv3+) * libags-gui.sym (GPLv3+) And so for the glib-object marshallers file: * ags/object/ags_marshallers.list Third-party files of gtk-doc TODO:JK: add missing information, copyright provided by http://www.gnome.org: * docs/reference/libags/Makefile.am * docs/reference/libags/git.mk * docs/reference/libags/gtk-doc.make * docs/reference/libags-audio/Makefile.am * docs/reference/libags-audio/git.mk * docs/reference/libags-audio/gtk-doc.make * docs/reference/libags-gui/Makefile.am * docs/reference/libags-gui/git.mk * docs/reference/libags-gui/gtk-doc.make * docs/reference/libgsequencer/Makefile.am * docs/reference/libgsequencer/git.mk * docs/reference/libgsequencer/gtk-doc.make * gtk-doc.make * m4/gtk-doc.m4 Third-party files of autotools permissive licensed see specific files for warranty disclaimer and a notice preservation requirement, copyright provided by http://www.fsf.org: * compile * compile.guess * config.h.in * config.rpath * config.sub * configure * depcomp * INSTALL * install-sh * ltmain.sh * Makefile.in * missing * test-driver Derived files of gsequencer licensed under the terms of GNU GPLv3+, copyright provided by http://www.nongnu.org/gsequencer: * po/gsequencer.pot Third-party files of Ulrich Drepper (gettext) without any copyrightable content: * po/ChangeLog * po/POTFILES.in * po/stamp-po Third-party files of Ulrich Drepper (gettext) permissive licensed see specific files for warranty disclaimer and a notice preservation requirement, copyright provided by http://www.fsf.org: * po/Makefile.in.in * po/remove-potcdate.sin Third-party files of Ulrich Drepper (gettext) free software licensed, copyright provided by http://www.fsf.org: * po/Makevars.template * po/Makevars * po/Rules-quot Third-party files of Ulrich Drepper (gettext) all-permissive licensed, copyright provided by http://www.fsf.org: * po/quot.sed * po/boldquot.sed * po/en@quot.header * po/en@boldquot.header * po/insert-header.sin Generated files by glib-genmarshal licensed under the terms of GNU LGPLv2.1+, copyright provided by http://www.gnome.org: ags/object/ags_marshal.c ags/object/ags_marshal.h Third-party files of Filipe Coelho ISC licensed please consider copyright notice, copyright provided by http://www.falktx.com: lv2/lv2plug.in/ns/lv2ext/lv2_programs.h Third-party files of David Robillard licensed under the terms of GNU GPLv3+, copyright provided by http://www.drobilla.net: lv2.lib/mda/EPiano-presets.ttl gsequencer-1.4.24/midi2xml.10000644000175000017500000000401513256163135012500 00000000000000'\" t .\" Title: midi2xml .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 2015-06-15 .\" Manual: midi2xml v0.4.2 .\" Source: midi2xml v0.4.2 .\" Language: English .\" .TH "MIDI2XML" "1" "2015\-06\-15" "midi2xml v0.4.2" "midi2xml v0.4.2" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" midi2xml \- midi2xml converts your MIDI files to XML format .SH "SYNOPSIS" .HP \w'\fB/usr/bin/midi2xml\fR\ 'u \fB/usr/bin/midi2xml\fR [\-\-help] [\-\-version] [file] .SH "DESCRIPTION" .PP midi2xml takes your MIDI file from command line and outputs the resulting XML to stdout\&. .SH "OPTIONS" .PP The program follows the usual GNU command line syntax, with long options starting with two dashes (`\-\*(Aq)\&. A summary of options is included below\&. For a complete description, see the \fBinfo\fR(1) files\&. .PP \fBfile\fR .RS 4 Open file from command line\&. .RE .PP \fB\-\-help\fR .RS 4 Show summary of options\&. .RE .PP \fB\-\-version\fR .RS 4 Show version of program\&. .RE .SH "BUGS" .PP None\&. So far I know\&. .SH "AUTHOR" .PP Joël Krähemann .SH "COPYRIGHT" .br Copyright \(co 2015 Joël Krähemann .br gsequencer-1.4.24/m4/0000755000175000017500000000000013256233676011301 500000000000000gsequencer-1.4.24/m4/gtk-doc.m40000644000175000017500000001066013241120100012761 00000000000000# -*- mode: autoconf -*- # # gtk-doc.m4 - configure macro to check for gtk-doc # Copyright (C) 2003 James Henstridge # 2007-2017 Stefan Sauer # # 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 # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program 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 this program. If not, see . # # As a special exception, the above copyright owner gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf when processing the Macro. You need not # follow the terms of the GNU General Public License when using or # distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # serial 2 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"]) AC_MSG_CHECKING([for gtk-doc]) PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no]) AC_MSG_RESULT($have_gtk_doc) if test "$have_gtk_doc" = "no"; then AC_MSG_WARN([ You will not be able to create source packages with 'make dist' because $gtk_doc_requires is not found.]) fi dnl check for tools we added during development dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that dnl may not be writable by the user. Currently, automake requires that the dnl test name must end in '.test'. dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638 AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test]) AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then AC_MSG_ERROR([ You must have $gtk_doc_requires installed to build documentation for $PACKAGE_NAME. Please install gtk-doc or disable building the documentation by adding '--disable-gtk-doc' to '[$]0'.]) fi dnl don't check for glib if we build glib if test "x$PACKAGE_NAME" != "xglib"; then dnl don't fail if someone does not have glib PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) fi dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], [build documentation in html format [[default=yes]]]),, [enable_gtk_doc_html=yes]) AC_ARG_ENABLE([gtk-doc-pdf], AS_HELP_STRING([--enable-gtk-doc-pdf], [build documentation in pdf format [[default=no]]]),, [enable_gtk_doc_pdf=no]) if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi if test -z "$AM_DEFAULT_VERBOSITY"; then AM_DEFAULT_VERBOSITY=1 fi AC_SUBST([AM_DEFAULT_VERBOSITY]) AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes]) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) ]) gsequencer-1.4.24/m4/libtool.m40000644000175000017500000112617113256226510013125 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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 this program. If not, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS gsequencer-1.4.24/m4/Makefile.in0000644000175000017500000003534213256226517013271 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ags/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = ags-docs-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CORE_AUDIO_CFLAGS = @CORE_AUDIO_CFLAGS@ CORE_AUDIO_LIBS = @CORE_AUDIO_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ GOBJECT_LIBS = @GOBJECT_LIBS@ GREP = @GREP@ GSEQUENCER_CFLAGS = @GSEQUENCER_CFLAGS@ GSEQUENCER_FUNCTIONAL_TEST_LDADD = @GSEQUENCER_FUNCTIONAL_TEST_LDADD@ GSEQUENCER_LDFLAGS = @GSEQUENCER_LDFLAGS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@ GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBASOUND2_CFLAGS = @LIBASOUND2_CFLAGS@ LIBASOUND2_LIBS = @LIBASOUND2_LIBS@ LIBGSEQUENCER_TEST_LIBADD = @LIBGSEQUENCER_TEST_LIBADD@ LIBICONV = @LIBICONV@ LIBINSTPATCH_CFLAGS = @LIBINSTPATCH_CFLAGS@ LIBINSTPATCH_LIBS = @LIBINSTPATCH_LIBS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MIDI2XML_CFLAGS = @MIDI2XML_CFLAGS@ MIDI2XML_LDFLAGS = @MIDI2XML_LDFLAGS@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE_CFLAGS = @PCRE_CFLAGS@ PCRE_LIBS = @PCRE_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PULSE_CFLAGS = @PULSE_CFLAGS@ PULSE_LIBS = @PULSE_LIBS@ RANLIB = @RANLIB@ SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@ SAMPLERATE_LIBS = @SAMPLERATE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ SNDFILE_LIBS = @SNDFILE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ XMLRPC_CLIENT_CFLAGS = @XMLRPC_CLIENT_CFLAGS@ XMLRPC_CLIENT_LIBS = @XMLRPC_CLIENT_LIBS@ XMLRPC_C_CONFIG = @XMLRPC_C_CONFIG@ XMLRPC_SERVER_ABYSS_CFLAGS = @XMLRPC_SERVER_ABYSS_CFLAGS@ XMLRPC_SERVER_ABYSS_LIBS = @XMLRPC_SERVER_ABYSS_LIBS@ XMLRPC_SERVER_CGI_CFLAGS = @XMLRPC_SERVER_CGI_CFLAGS@ XMLRPC_SERVER_CGI_LIBS = @XMLRPC_SERVER_CGI_LIBS@ XMLRPC_UTIL_CFLAGS = @XMLRPC_UTIL_CFLAGS@ XMLRPC_UTIL_LIBS = @XMLRPC_UTIL_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ags-docs-local: tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." ags-docs: ags-docs-am ags-docs-am: ags-docs-local clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: ags-docs-am ags-docs-local all all-am check check-am clean \ clean-generic clean-libtool cscopelist-am ctags-am distclean \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gsequencer-1.4.24/m4/progtest.m40000644000175000017500000000602413246707333013327 00000000000000# progtest.m4 serial 7 (gettext-0.18.2) dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. AC_PREREQ([2.50]) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) fi AC_SUBST([$1])dnl ]) gsequencer-1.4.24/m4/po.m40000644000175000017500000004503113246707333012077 00000000000000# po.m4 serial 24 (gettext-0.19) dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.60]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AC_PROG_SED])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" < Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) gsequencer-1.4.24/m4/lib-ld.m40000644000175000017500000000714313246707333012626 00000000000000# lib-ld.m4 serial 6 dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 = 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) gsequencer-1.4.24/m4/ltversion.m40000644000175000017500000000127313256226510013500 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) gsequencer-1.4.24/m4/gettext.m40000644000175000017500000003676313246707333013161 00000000000000# gettext.m4 serial 68 (gettext-0.19.8) dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value '$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) gsequencer-1.4.24/m4/intlmacosx.m40000644000175000017500000000474513246707333013651 00000000000000# intlmacosx.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on Mac OS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in Mac OS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in Mac OS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFLocaleCopyCurrent();]])], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) gsequencer-1.4.24/m4/lt~obsolete.m40000644000175000017500000001377413256226510014036 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) gsequencer-1.4.24/m4/ltsugar.m40000644000175000017500000001044013256226510013130 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) gsequencer-1.4.24/m4/Makefile.am0000644000175000017500000000000013246707333013236 00000000000000gsequencer-1.4.24/m4/iconv.m40000644000175000017500000002207213246707333012577 00000000000000# iconv.m4 serial 19 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif ]], [[int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; ]])], [am_cv_func_iconv_works=yes], , [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) fi ]) gsequencer-1.4.24/m4/ltoptions.m40000644000175000017500000003426213256226510013512 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) gsequencer-1.4.24/m4/nls.m40000644000175000017500000000230713246707333012254 00000000000000# nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) gsequencer-1.4.24/gsequencer.desktop.in0000644000175000017500000000037413246707333015041 00000000000000[Desktop Entry] Version=1.0 Type=Application Terminal=false Exec=gsequencer Icon=@datadir@/gsequencer/icons/ags.png Name=Advanced Gtk+ Sequencer Categories=AudioVideo;Audio;Sequencer; Keywords=audio;sequencer;notation;editor;midi;synth;mixing;effects; gsequencer-1.4.24/COPYING0000644000175000017500000010451313246707333011733 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . gsequencer-1.4.24/lv2/0000755000175000017500000000000013256233673011461 500000000000000gsequencer-1.4.24/lv2/lv2plug.in/0000755000175000017500000000000013256233673013461 500000000000000gsequencer-1.4.24/lv2/lv2plug.in/ns/0000755000175000017500000000000013256233673014101 500000000000000gsequencer-1.4.24/lv2/lv2plug.in/ns/lv2ext/0000755000175000017500000000000013256233676015330 500000000000000gsequencer-1.4.24/lv2/lv2plug.in/ns/lv2ext/lv2_programs.h0000644000175000017500000001430513246707333020034 00000000000000/* LV2 Programs Extension Copyright 2012 Filipe Coelho Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /** @file lv2_programs.h C header for the LV2 programs extension . */ #ifndef LV2_PROGRAMS_H #define LV2_PROGRAMS_H #include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "lv2/lv2plug.in/ns/extensions/ui/ui.h" #define LV2_PROGRAMS_URI "http://kxstudio.sf.net/ns/lv2ext/programs" #define LV2_PROGRAMS_PREFIX LV2_PROGRAMS_URI "#" #define LV2_PROGRAMS__Host LV2_PROGRAMS_PREFIX "Host" #define LV2_PROGRAMS__Interface LV2_PROGRAMS_PREFIX "Interface" #define LV2_PROGRAMS__UIInterface LV2_PROGRAMS_PREFIX "UIInterface" #ifdef __cplusplus extern "C" { #endif typedef void* LV2_Programs_Handle; typedef struct _LV2_Program_Descriptor { /** Bank number for this program. Note that this extension does not support MIDI-style separation of bank LSB and MSB values. There is no restriction on the set of available banks: the numbers do not need to be contiguous, there does not need to be a bank 0, etc. */ uint32_t bank; /** Program number (unique within its bank) for this program. There is no restriction on the set of available programs: the numbers do not need to be contiguous, there does not need to be a program 0, etc. */ uint32_t program; /** Name of the program. */ const char * name; } LV2_Program_Descriptor; /** Programs extension, plugin data. When the plugin's extension_data is called with argument LV2_PROGRAMS__Interface, the plugin MUST return an LV2_Programs_Instance structure, which remains valid for the lifetime of the plugin. */ typedef struct _LV2_Programs_Interface { /** * get_program() * * This member is a function pointer that provides a description * of a program (named preset sound) available on this plugin. * * The index argument is an index into the plugin's list of * programs, not a program number as represented by the Program * field of the LV2_Program_Descriptor. (This distinction is * needed to support plugins that use non-contiguous program or * bank numbers.) * * This function returns a LV2_Program_Descriptor pointer that is * guaranteed to be valid only until the next call to get_program * or deactivate, on the same plugin instance. This function must * return NULL if passed an index argument out of range, so that * the host can use it to query the number of programs as well as * their properties. */ const LV2_Program_Descriptor *(*get_program)(LV2_Handle handle, uint32_t index); /** * select_program() * * This member is a function pointer that selects a new program * for this plugin. The program change should take effect * immediately at the start of the next run() call. (This * means that a host providing the capability of changing programs * between any two notes on a track must vary the block size so as * to place the program change at the right place. A host that * wanted to avoid this would probably just instantiate a plugin * for each program.) * * Plugins should ignore a select_program() call with an invalid * bank or program. * * A plugin is not required to select any particular default * program on activate(): it's the host's duty to set a program * explicitly. * * A plugin is permitted to re-write the values of its input * control ports when select_program is called. The host should * re-read the input control port values and update its own * records appropriately. (This is the only circumstance in which * a LV2 plugin is allowed to modify its own control-input ports.) */ void (*select_program)(LV2_Handle handle, uint32_t bank, uint32_t program); } LV2_Programs_Interface; /** Programs extension, UI data. When the UI's extension_data is called with argument LV2_PROGRAMS__UIInterface, the UI MUST return an LV2_Programs_UI_Interface structure, which remains valid for the lifetime of the UI. */ typedef struct _LV2_Programs_UI_Interface { /** * select_program() * * This is exactly the same as select_program in LV2_Programs_Instance, * but this struct relates to the UI instead of the plugin. * * When called, UIs should update their state to match the selected program. */ void (*select_program)(LV2UI_Handle handle, uint32_t bank, uint32_t program); } LV2_Programs_UI_Interface; /** Feature data for LV2_PROGRAMS__Host. */ typedef struct _LV2_Programs_Host { /** * Opaque host data. */ LV2_Programs_Handle handle; /** * program_changed() * * Tell the host to reload a plugin's program. * Parameter handle MUST be the 'handle' member of this struct. * Parameter index is program index to change. * When index is -1, host should reload all the programs. * * The plugin MUST NEVER call this function on a RT context or during run(). * * NOTE: This call is to inform the host about a program's bank, program or name change. * It DOES NOT change the current selected program. */ void (*program_changed)(LV2_Programs_Handle handle, int32_t index); } LV2_Programs_Host; #ifdef __cplusplus } /* extern "C" */ #endif #endif /* LV2_PROGRAMS_H */ gsequencer-1.4.24/libags_gui.pc.in0000644000175000017500000000102513246707333013730 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libags-gui Description: Advanced Gtk+ Sequencer audio processing engine URL: http://nongnu.org/gsequencer Version: @PACKAGE_VERSION@ Requires: gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3 gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3 fontconfig >= 2.11.0 gdk-pixbuf-2.0 >= 2.26.1 cairo >= 1.12.0 gtk+-2.0 >= 2.24.10 Libs: -L${libdir} -lags_gui Cflags: -I${includedir} gsequencer-1.4.24/ags-simple.xsl0000644000175000017500000001751313246707333013474 00000000000000 ]> 60.0 1000000.0 floor($division div 256) floor($division div 256) * 256 60.0 1000000.0 floor($division div 256) floor($division div 256) * 256 note- 0 notation- 0 C machine- AgsFFPlayer - &audiochannels; 1 128 gsequencer-1.4.24/libags.pc.in0000644000175000017500000000067013246707333013071 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libags Description: Advanced Gtk+ Sequencer audio processing engine URL: http://nongnu.org/gsequencer Version: @PACKAGE_VERSION@ Requires: uuid >= 1.0.2 libxml-2.0 >= 2.8.0 gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3 gio-2.0 >= 2.32.3 Libs: -L${libdir} -lags -lags_thread -lags_server Cflags: -I${includedir} gsequencer-1.4.24/apple_script.sh0000755000175000017500000000760613256163135013726 00000000000000#!/bin/bash # binary files=`otool -L /Users/joelkraehemann/GSequencer.app/Contents/MacOS/GSequencer | grep /opt/gsequencer/usr/lib | awk '{ print $1 }' ` for f in $files do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/MacOS/gsequencer done files=(libgsequencer.dylib libags_gui.dylib libags_server.dylib libags_thread.dylib libags.dylib) for f in ${files[*]} do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/MacOS/gsequencer done # libgsequencer files=(libags_gui.dylib libags_audio.dylib libags_server.dylib libags_thread.dylib libags.dylib) for f in ${files[*]} do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libgsequencer.dylib done # libags_gui files=(libags_server.dylib libags_audio.dylib libags_thread.dylib libags.dylib) for f in ${files[*]} do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libags_gui.dylib done # libags_audio files=(libags_server.dylib libags_thread.dylib libags.dylib) for f in ${files[*]} do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libags_audio.dylib install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libags_audio.0.dylib done # libags_server files=(libags_server.dylib libags_thread.dylib libags.dylib) for f in ${files[*]} do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libags_server.dylib install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libags_server.0.dylib done # libags_thread files=(libags_server.dylib libags.dylib) for f in ${files[*]} do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libags_thread.dylib install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libags_thread.0.dylib done # libags files=(libags_server.dylib libags_thread.dylib) for f in ${files[*]} do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libags.dylib install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) Contents/Frameworks/libags.0.dylib done # dylib libs=`ls Contents/Frameworks/*.dylib` for l in $libs do echo $l files=`otool -L $l | grep /opt/gsequencer/usr/lib | awk '{ print $1 }' ` for f in $files do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) $l done done # ladspa plugins=`ls Contents/Plugins/ladspa/*.dylib` for p in $plugins do echo $p files=`otool -L $p | grep /opt/gsequencer/usr/lib | awk '{ print $1 }' ` for f in $files do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) $p done done # dssi plugins=`ls Contents/Plugins/dssi/*.dylib` for p in $plugins do echo $p files=`otool -L $p | grep /opt/gsequencer/usr/lib | awk '{ print $1 }' ` for f in $files do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) $p done done # lv2 plugins=`ls Contents/Plugins/lv2/*/*.dylib` for p in $plugins do echo $p files=`otool -L $p | grep /opt/gsequencer/usr/lib | awk '{ print $1 }' ` for f in $files do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) $p done done # gdk-pixbuf loaders=`ls Contents/Frameworks/gdk-pixbuf-2.0/2.10.0/loaders/*.so` for m in $loaders do echo $m files=`otool -L $m | grep /opt/gsequencer/usr/lib | awk '{ print $1 }' ` for f in $files do echo $f install_name_tool -change $f @executable_path/../Frameworks/$(basename $f) $m done done gsequencer-1.4.24/docs/0000755000175000017500000000000013256233676011711 500000000000000gsequencer-1.4.24/docs/images/0000755000175000017500000000000013256233676013156 500000000000000gsequencer-1.4.24/docs/images/ags_machine_properties-resize_channels.png0000644000175000017500000005002013246707333023460 00000000000000PNG  IHDRɷbKGD pHYs+tIME iTXtCommentCreated with GIMPd.e IDATxwxZ !^PTDEGDQTT뱂bWTT@  ] %$' H\g{~Y58~}t0y&"""hg bbb, ^4`-L ([a`A `' (7ݍW_M0^iS+>6Oܴt?M9~Wv\ܴ / 7m*,Jl&3MLʍWn*W8nǫЦxeUz+nx֩x@aS 5ƽXݕqqK?(t(\t0t:(OӔkFq3MIHUr(RmqᥗU esn]zp el]Q~xu(7QE4t^-=ֻl;]r|xu{ѰXSeLB ZН' N¤Np7 \JO:+)pYod2lJr B Z|h9`%*YvPx 6)@wJ|0vfn4] we7a*Y]a1M7""r146֭[x+/-s p`:L;xqn*'Uw.+ 7:*^sV rTJq\4\UR(I'quPt x14jic=x~RlUy%d*%חkN*%\_4qq)Idt{e箂trzUx9ۍ»ӭsDmru`<}u/Eo:E ,K3f0uV2aA"7/Q3g7"T([qBtepZŚF_sSQek+]jtS$W^2lޕ /U=en׬T[п=-`0365͊Μwr gvVUJ*UBtlQIhx?]SIqSp'0+Y,v]I ol✮bb`1,`@hh(yyzӧ=o\7m~=>v.x^494i>G .U,i:џAJB,VY;H$(?//fQP0CJ^RTYdy(Xrr+2^^^X^ Zbq.>O)g9}c,5ij+e)hL'h*J/Sm_Ϝo\~: [.m=47w^]v(fa͏pI\ryß{*}ΨqfRӘri-*Sr^xV)ē WYnī| :׽SLeh1ۨ[na=LcZpXyydp8no4z/yy[v,X\ĤLvʬr},n5ܷmg!GO[,{j<ïCNmi׾=}Յ>:5jC%% ܒJx&ydgeo/P~UrbwzU6̸ɬd w颂ru3],Ֆ2א+;p~̨C:='E-ۛ}NxQk,!fǰ0ſgb{s$6ҷ,vE0C`'ߤgaz,0!Y5}=39su`UKU<*2X1eEzzpbcVxo:&)텛RtsU,f͚Yg͜m^Y'R-|g/YwogϞdffv4MQ/zo.'e# G_GҾw>Y2.D|[5WgJw1c~?˛suvӺC{Zna[isA/>Bҡy\;ӯ{OR5…f>-R23Q0cFk3g( :UJ廂aRTLJF掻Fr*fUڨ$v=;1/f\ĶYrY4*WUf8,WwNάҧFُ].\ M[= >sbil"`YX#}i. oC=CG"dѬO`n ['i[ *(79f̪I[ ̌(Q#h*mdϞ}JΧ7*p@}<U9רd*J^yhֻ)3znB<~T-,p= %CJ; %1oJ=yyyW nj(Y\x ĄJ_a&}]p֯޽J*0*`b'NWˬ kV>7P={Jo ն!Զ۱Zqu4(t<@<9x;00JF3]fV>xߨl T__|}|*tAP` .;tqC1)8Y-~𪓆:V\&b4il6 ;ٜkvWY'lV֔3xVJyVtT t2&njhUIYy](>{DDDNrO gR5YKVCDN;78QON:$Hͩ\="""TC?3%ٌZ<P3+ΖۙhE? Q+ڪZNڣj+[bY^);ˀVjYrFΊL,Q((DDD$""PpTiD0npS<8K(<=~Q(զ%HziUZն[Z|N$=F5ն>W%!r)b١d ٷDn^3i搽|>)3km}6[XzdO4=_~FOk۟%ON#|Gm6:ˣs.ኋ{$AcVEg`C>wph=;sѯ$҈>~@ϭ28,9fÇ0r;B,$Fy[os`ÿ=4z73 NaxX ^؋MX0{1%}:Q͆r^PhʆuqӇUJ Jӗͻ>OæfN"R})6CPoJߪӒsH~gWyu㙧oƲt .DFq-]5W,h4D^Qz㢥isoSngypq*m?ϰ.q, 1nKg\7)';x7Y- 9۷Kc;;wp4gQr*{8[2q^!>ƵS>02y4ok [O)9j4#R܋cy?t K&|T ںTJ ~3EDs@( ~#XV#AD"m,kӚ}#MЈا̺~an-:z<A7]}.^?BOӸaNUZնmF4xrWu#;Ku5_۷d?w`7m{⾹ 'A~ <'#Kjz*wuR&Îd s}yu_N2./l~RS8'k%V"&6~eHHE߳щ6-fnk)ɤ]ſ4CoX'6X҇|B sd$l=S෻ =oS9rZ NrplTn: [R|]Hm,Mh4:[&g;u5_۷.>K7Bߎ3o`]̕\{DlHTZJJO|;q-[z`d9e?2BbaKt8|2-lTJ-0tlф_+kXI 9HKL,Yͱ\w5ܨt]~h?t}P*wҲ=ƎƒT#quև>PȉC ;>b%w܃%;#[v{MjkUE=%;?CYj尗Z9Nb}7agt A!O3po̜)ѹ/wv5Wiz)+7T;f z1{hC\h7G[\2 k.W.F 10 p|'|Uf4z<3V洵mwa%A}hүg:)Zo8bvS@׋pdc)+ç/N'a?:= 0z@nS]hӮN҅%싍'-57Naw*whr.u+y142e5n+&(F+iDtZ4%!E~ 7oys:]ͣm}bW-3}˖e ݑF ZXUWmԫB󈞄X\zj=[٘b/oo,ʗS]YW.g@64lFX\pNJh$- !Q7j&m`?DDZ^;e2 ÑJ\K ra(<39DTHQ> nT}iMbIԟ'jo'03c4?OcK2yua7ȉdo*QT ]77U2n-S=9wqrE]lVXE'.OݜIVr$ל*JSHz<,g.;U_ɴzezG.>oCꛏGfπ|2>K_׳1]!rdߕUZmj+vryo}g;ն>W-G<+&gEדZ:QL'߿%.5폧ywwglD}ȹUX.~zbxɹx{eYJtץlqn,fDDDLWK,-i4Zx9̊EXɜզȋ7oF_^Kcݾ:iJ ""Rc""RSg9phx8jCoզ7"DDDJ""P9ynVψat;p>1߽[|{[½Ģp{-1V{ոYϖ1{>g:PݾI[CD,+Ti\Z,ZdQ+"g-DD-Zaaz4C$"" %9x{r9;Qg߽*/ל %i{,'9ވ[$4zaN#m#Ep,Iv0lؓ7nj@Ԗ9]_ (hqq;6fz];9!ۿCFʼ}*UNYlKoBcI8%훏I(c:9aC1K~Bx^4m%?Hz1yJUh]wp HASIِPBQ0HE+1Ճ"r6zGyc+ƍ;M=;{{cw4G9c$Kn83}yyԹ 5C[k5w+e*{? Kskfz{CҤ}g>f`h޸q`U%Nj(2v۴7Xu73Ar~ *AoHۓ ȶu¯l6[OIƶw )?||JURVDaOد%Ǩj{n2Ivl2ؿ9ؔ͟I""'q_n-|qyϽ =3y> >{3q_X)@k߲ V_+X`pɏك(4 jiosKIn@E"";Iw}J6mW|IztN>Wa‚#C؁=+(F[9⥲t*+ I%'"rvA$F^~Zb><8⦪ ~y;߀mܜ b-5qaioF8bW9$ p|XȎ-H&#%~y7E,hQ|vqB)ϝC潗&[W<:7?NnOChh_Ѥ?W1|8 u«A~Q2VEW ړ̭ 2 >SiUWR·vSp M'7fz>YId2^N2exLʡGHpU9+w""PQ(H.=lg׸6(jΈh}GbAED$'߰a<w޼y0Q(IIJJR' Ӎ""P3֭a3DWOnx{&7{}øM9ݶrs{`05չiZ|͝M:zH-\"+6[[x,MeO F94:!RS{~}a(ZJ=ؚZ>u ;a ?8ӄ9sCisHoG1ÆQ nGs°bÏ+lPp A ~m}.=#2I\_}5iBK" yoͅo\t h6|;qTn\4·O'P~6M_¶u:+.A@ײ⛏Y$}hg}? 3XmʽfcM2)S&"J~ cSNQ0L XN^b`2{9О[f#|D4_ǏoLaOnnlL[%nȞ}|G]hnš|C /M/)Óue6͡^U8}V%3h7y]iMȅd?2}ѓrՃY.26E:صYw6.ͺQ$$w ԃ9л{뾞ɶdcff^v61 mf9jz%絯F`]?_Laq8OnK*DLm˶gmZZ=\7ka 87vڊw?ܨۇ3ز/cV&D 77Xhazx[Wn QwdpbLMbXJF4fk\x:܁o܂İ1&53u7҂h4c26{F )Rt{Y3<\7i%49O?xm oGT.oAfWV.J{="m$*r-[m%%fږu#oۦw@(btÇa)YnZ 3JG28feYrR~Y&FA+]7\Q5-Fz<:YNҨ\QÊ7agt A!O3po̜);k؉;kHZl/6T ƿ8r8v?8&)L8@ь&%1HkZ)97Hzi$U9mթrTn'x#zwH,w,ewD5GV"Pp'ъv]bg%;u^NFZNm_F7B sq6VfFWۦ4;nNŬx[qxtoCFau44*] U,[N3wGڮ7n.hQ1hshۢ)<'!#$';FjoMt s]{Z-"Ge,o~n$+9\Fk6/Ɗ)ð/DF\W8T|r#H$fl U*9yt7Wz^Y$n>K,fOdv]\q\Q$;a7m'n'*N`fh ~ K'n2dT 37>8z9lmV;%Aoa>f8V<{i٩yx,C^U?1zHaG5/x15lnDCS5@J#V^^=q>PܿlOI6Ea&ޑ>1sM ?܆Ϗ<ӷWlivdn9'u82$"⎾OIEVV?:BDD(DDD;9)lQ(jݐ7FҙDD$5CUgNX(jdz'RhED$2]u(SxPgBIN¤IOq~s4)n"RBҘOAM0jxzvW<=zlj[ѡ6烫eOSک||xya8mo0HݗvثySޞ/ %ï-oåuW&oؙbK0ߏ s>oGq]S^|w>c+ o Op<Awph=;sѯ$_cfqd?)ød.|%)&x[D=vxoj"C7'7^7g6-MwY}x.N/ZG[Oct>N#eI\i4F eLMiѶgˡFn(l^Yo"ؐK镳H %~.eg;1&H`9t|=絟ǂ>'{\V2#g| ۞s^Xha󎽤JeSZi7V9-/:VZ[3O͂5s=x5UO騧HR4&0 $u7҂h4CNr!l, U}nV.J{="m$*r-[m%%OǛ^/fpu|אz>$9ETN~1lxp[j(b=ybX=ԛN=G@@:CDNR(Y9C}&Z,L>Ij9P2sI\ʮSԪ}bjt˗eζlLeWz<zՈ~{{ճ;zv&z|UaGx~MO.[xſo`둶 \;ڻE %ߟ&93ΗٔU8|@?z7#۝5q/K7†spqW| Q=H5"nSZ]۰!}Fej6SψYJR|=8~cӦM;L7e,L 3r6w}Y>ꥍ%6Kj 驤3V0zV Cxq*EO Ji%ͱ\}n'9'N!Y>V.J{="m$*r-[m%%Wb9mu'Ȍ牾-z>$9(j(b wbX=ԛN= ~y7Ern= az1K^}SQ8><?Ҹ\(؉} bM_cYl]aNcqaRc"#+6_g[qx]'oGyQ '>ͪ͟84/)ѺiDÓW>ς8SNsyx,C^U?D$#կgu<e2h?=1D*SҡWxkzD:ѬY2ۗ;6/Ӵ0gBCХK&LEx@$""X~?2;/?1b %9 ㏯fM}> ""'Mb"_?*%1T)qA %V<\ZBEDī/fm(y5ny$F[@DD=w56o ""5BIDDj ,cƫDDrZ/yJ\Z.Zd`H aSwni+ǔ)SرZB 1ї>{kkb )縿O)'´iӦ6Hm}?ӦwЗ9ڨ""YM:{Jҏt<:褆~a""5Hu}) [Cɖ3}{DDRwzЪԐPjzFDDN9}(DDDJ""P@*fBuIf3JrR|O}px8.LtNDDj (DDDJ""RcFVt|ЫdZWӆao&& P-]57 :;4 L8Ho> %=c,Yw#հ |.GSp╼x@|68LH϶g?ݡd%C /?eޘ=L %-6|"hܞYgXKFFsgNd7İeXy\ F( )i ֹ+YYl^^t"!i gJRgF;#w ;2 Vlf> 4{ʄdV6l9ڱ/?Rp4 L ȳMm&򱜭V$(y -Ł_`נQ 32)u V&z5'T)Ir7TAѲιMB\J&D@yM4^Zg\wekسcyy JBlR2+//hNt0Av!xc̯Oٻdg$Xf5BJJ@'}~ڴbn%IIc ǎm؏l$+ӊɖ ~`Ӷ(2 lNqɐ[Hu{pG2eMG a;wV3k~@kkW_VU^^>s^HZ|w[fA!#f^ᭃ+Lc3s?փ^g'1l@c ӿ\OkG*Ȭ xY@ҢAɧD?5la1L4M|V:[D??='33s>WOza2Zqr߳or6?3uW$5h`? O7y{vlGHhTl {qhl $x";Aw=o|m*??;s Ҭh`>9܀ZGDoƠ ;m禕) Z ݁'nr_r- eBuEw? 3ORճ|?ŭj3#n &++}}FDm6Lp3MLoà=$vma\IDATnh~aHb4ɸFhёyZtǰ`'~F%;1t X:.`}T<9ޭ# Z_m&Mw bxÖH0.i }RkJRcl4vHYDX}YOnfJ k?tۖ2sVwEaƁ0~2#kۧ|2UƥM=^R2;R|?{GЬ}[(7r)9t} ʐ~tiJT\&=Z'n^V+z[M:$ec;?{*m-t@*껀spn6͐NJߖȶ0z\S+0fga` ap8 4icghzۭ "/?le%TJ|{Cι ik/h] 6,[F^I[g}FOҳn{WZpmqk3vpa9,u|9ӦQ'UO sKz3 ") %m 0d ݞ@zÙ.6An2i/Nb%伋Rro.i#WE^lx9]@Lَ ` vkk;7_ݗ`gpl?ƮCi>FTl*ч}(&=& fkL3ja{]Uuy{~'$! H B DASPՙZ8aL:k3u|WZ)@ PQ yy77I0u={ݓuw~IHH#'0B\q(k6ղ0t=daP{z醁ahZzkÀbd gCyU ss3ΜaȨDM_$uXe+u15f"2zI瓗 e3[HxHXͭG8~U'HIpMдv/]=I0Ke-݄ÑHd*Z:θ31+T5Ĝ+>F^>$0)T s?ՠ7OL^"hP3˜P0WK7T|Nڌaա}k;-m|B:=&]IHH dK `aaY"tI߲Fg*>@D+E,L=$+@#>L@zsFXF7nn2qq}C)TG5WnUC"v ҒZ$9IL=FO%X?m]IMZLl|nDڧo{mڃ̫vμKa`~wkcggT"ܞ6n` h0Q k֥#aN&ɽi 4;6hi;M n9 i$4#G@aBIoܟ?/^xƷU@0XauMB@AnxDJRlQaox{9NEdbǪ?#,fR`wiar!7"$YSwasJȖhkiyqA'YVj]e4kEd{fFGd-aQ**L|{X{?NյSw}>y!TmpYq38zӒw2&c ۋ Ԙ`:]ݴu鸽&Aaaa&6U&"Ǹe4&T93>b;~qD)/vvu]4M 7ui/" $>(}'O#kE4r:ћ*kGZr"HܚFTCݟ/V?v\yBׄ(=rt|hj鲝ei7w&ɑۥq2r2~8dulUTr!1yTߑ9 T>;j4~K񾓴\hf/(K%w8ldH/$fJ2)ò3͚w7f& &'R@Af3&3-=cǸtu4kxU'9ӳJ+#a#/=:Gjijj| o`FKXRB<ɋX^ 4 $ W9% y{)t;`9i+'5^|?L=NG?AT"_ls{ٶ\ɤ|neƧ(9VGKs '>^@p*7;;Pg͍4Co=G;]ׄ1-C<:?Hk5]X覇ɡE<Q0P'eAZN0I}4- ($߶cߛbDd)LV|!$aJo9ợKyhʭ90-x䩷.$ &:*3s1fcI)d;l۴o!qnI%%UxgzZ}CMӼh$I~=߄ }p$Y Ԥx`}"[8N;4FMn{<)И̘_HmeBX| ]C׼;S̺w_ F͢ѭpP9`/cq`\:+@b|K۝ڳV+"aP!JIsڕƓo=.d\w vg;3mY&a:;wS #5NgUx( ˠRQ ,G|-˗*s$#IW {ώ־ŝP{D#J73.<.G !B/$3sfgHEy/ޒ&qH*!BѶmB!B!$B!B!Z;4AzK1*V:W!9#9 ! 2loS&B9qP!$J[PL!BI~[9{-BB!DB!BH+Zyi&t)+)n-C4i!BVegk$_[Ue'HO0$A*JPjh2(Jb+r9뷎e@ s_]iO].}~h񶹿dυv8hǍ/MΖ!hoa,{j^xq[yP?Tq`Uc_殛_|-G7\dV|F©0sh[I߼|:ݔ)/~Lr/j5 dc:cn뇏ٷAZ(Rk=K%Ӊ^E { y07%v jv>&C5:Ʉ쇢ּYPT戥1nIDz0V{=3J+Q\:u.Hy7eOLSP>F_5vSe,gQgck2ԘZs?hۀlCBI~qwŊM:q:hNNnÎi`0cp':J%򭝰Ea h2-޷\5/ZSm ^.;!w%ؗr_nXxtue"j]p:G*#g,}+~;gY(=-w5o=SkrYDj.?a/m'N_N5~Ó)7\@t-\cwG]APӠ,|u%G5oinߩ 8ոF/C.P?یp:~_/bXt/,_1\ԣkI\=<0;r8ϗH3m#-xhwlCBV&]2 P tq;_Yv'Ngh*O4lUO2w]]^n vD7~5:q=Oq9b&<}s㨞 5|ce*ؖ6Q ؊p%0g32l~^wV+ }EŅ8 b1UWYR=&Պa0YLjϐD:ᗽ [n|tsmPpi:_TE^цޘjy<` B3Ƒ{[Qr[]׫l2G!}&I̙51xPNfJ/yf_~u<yg2[9n0\lx ^|6̥w7 +<::8@ULz^20usB|U;ST㷹Poᑿg'+p94riL7םhcק`2wR2;O` 0ֶ h-|mH +$5u;{P17RPxC^ۃNϟ%qlrkVoKvf*;]|[%ߐJpބ5L ̃$P jx4F @bDvaZ1⪻\mXfcTF_U9KQżoXdZ5*٭Pl)dE3$a)2?rL|}>(ZՆޘjVFƉ#Փ+^Lt~ rg+Ƭ#UV$Ӹq@.IvmRҲ(<|Lzm9kkfjpAz&c{ٵgi([@1N}>gt:})bJR\ nt=Ɠ/$:c}w SMA%t b~ȥ(G-z4J-۽yt'vmW*y?j+~蠶m@m!D[^uܕqLݗidM.`jd%86܌d˫V{,Cn)̕I k ?n_2gpM* sx .DŽZ6rCi@F\66b7ɯo#֑Zy,Jy^F%QqDFJH/ C Tr%7ձ߭m:͛ؖv?I{+;"Ϧ7I;/FavG/j#LCT\ܕ u6,CVKz%xٕ88#'JGmx߼Ǫ`F=./ P5n !ڞFM?;ߙ< )j35s[|Ϸ7.rWW12uEYET$efӐ#zf?aН黸a̍QZfh4b6kEUU||L0rk?_Sʓ;ͅ8TZfEӴZNM%܈6TKݻVYgk4`P 8F/6PP0|1̘Lfb;r1,w晴6fZk%&,dnSn_u46t__zGfMW?IA?gJ`RT榼9ll} Y[ZNN?uP]5鵮ep[4W |5>ֲYü&,ZV 4ن$-BߚR[x/b *;z>swulaP.r"}c;nj$2Q2IK'3+(8NO-Zgȫdm@!htc4{~]d|S M3OW|Uߞ71vd !~ e'v|wB;>FWK9tm<8kxk{__A3$Ao߰tW^ZCj5oԩݝΝ~/ISM-5;yYEn<~ٹxa&qKqg+~3N~Md⼛pN*6u!OZ%w7?~цڷZ6 ېQth_zʙAƞt:~VۮזI&Fel-Yv3*|Y%}'oXC͓2mj|^F0C;ٵa gV2n|"}k/?-i|ykt]?c A/rW՗|ۣUx3wqN/PPO`@|53s`uBۓk{=Q}g"jP  ̭ц F];}GH\ڠY3o,/H| eNȈ;{燯oW2[j//k>og+3C_I1?' Tɏ]X~ϱpń(|HwvN接1PDQ4BB&0h>4_~Ia0B!j%o+fX>&VbŇ祣ȶy^^y6> T4rlg/Jw^>?xW8#k 0nrO`4V .8tȰ~[rO9cif+~Z-&(O4fBEB!Z{`c$uVt,kx' ?-!Nnlwzb)-{s(=;}_(ihy}9bih#, ӦMBF_!΂,+  ҭ B!BH+3;C;B B!$z?.GtB6u+rKg !67OFB!9!B6Q.@!rB!(U@!B!$B!B!D+w۞m-i!q!BI~V,ViE8$C!B9QRRQZC!B!DV^ίB!B6O_!B! !B!5>AN!B!o=d~NuX͓3IJH !B!$="OkB!Jr%PN!BWB!B!$+ 9s! @CN!B%gyo=.ml O/ٳ`ڣ3pi  w漿>at/A py{~D̝ oMn 3/Mbάy0]HӰ!W=iw1#t{:Cc ]dcc 79kǿc[j( \ճgCNaͼx,ć廠4z==7"q ^BS !=D`ߒt7?N"(JD^߁%o'?fL'}d.Ҁu1; 4rfO$c*P]9*b Q\-Fkvc:dLc+s.7aݗ]_?MrbB!Tn*$EʂIIYc?u]ꬺ?O)6,dR6veɇGncWNI&;E- g.}g((*P O͍t7Rq)Lnta[= p (~J3/}6. `J6M#λ1cHGfJaA e< w;@_ L,Ŕf8\ZcgbsWEpw $0B:=uwu3e(57Oŷ:5rvn[NូxB!h@GiIR97 !U\Ip^u5cy`b?޻YAie=.gWY+>x7WA Du:[Ox? yʷ8pK=}pq=Jpꐀ<_EhtP ѵ<,!?oEtu ~#8mVx5v`ݽ˶]8m*b)9Z=T+Ԯ6@Õ]-R4F?vncUQg[!B'~\IDAT5}OAUhy"4BeڦF yi_iʛ4K6Yi8If1AOؔ4W0`YWU ݷk!̴&w섻5V.taףpD_gSR׺r11j(h*NN yū1Qi{k\0gzo\5YϽ]]=,Wײ))Ӻ>(X!!`QSgqZXwB :^榼|f *+>5.;ݛKS/}IO՘Rw+`[-M>7i{4CORi]c6O]VǏڻ7./W~R N®wǯOPK&{G w^߃Y h#8}rWDv§r$ϲسO"CH0+ 8 YlYiRK6B!B4 --)Ft/ Kul鶼jF=obpI r=!5Cb~/w>[tM_whg58J%1zQR*vȥaICsEÇ{Եm|GWwm,OD{L'hD (YIS|Q1"|(FBH.#b0? ΐ|eb-%#1+`!Q g+ P+.0HMwBIصC1~8s5uldgA?.Cń^u3ծ ζB!q۳^b-/ 1Z޳%}BݬnU߬$+q o퀡p/?O6dԞҘMdr3}Mn=*O67_> ǎ]W{L*uאi"2aˁ~Mg mNGNb̘k~/_ś/Sa]6 <0nXG="R§؝@V? eX([:{s:ZoX>qy9y{ (ZJ]_.`Y<㝓h?wrssZ)gv4B!6Omm뵜mnl}W匕B!6\͓B!&ƨئ筐B!Bz+!B!m^Օ߰ti !B!m\B!B!ɯB!B?R1I. [IENDB`gsequencer-1.4.24/docs/images/ags_midi_import_wizard_no2.png0000644000175000017500000005762213246707333021117 00000000000000PNG  IHDR} bKGD pHYs+tIME  !ViTXtCommentCreated with GIMPd.e IDATxw|u즇$BG:D@ETD=DA (r"*"6P<)҂B )#R6[@^yKvg33n g/1,V,,4iT+fQr!Cstko8RU5Jkeikc[<˷_U t2>/[%dwz^'d[gulWu\6I6Vaƒq1ul8X厗pmeS,24ߚ%-)ViV|t8oJ/eq~dzSfV3w,l{2V͊ۆ4]cgx>O_ad+,JI_.ʰZ{M@%p,(B*JC;JvFUÍ[AFQ'' }uA-ipyl53 tU $Tr£LaXiijaf9GZBۜYmNiXxC8ʈn֩S/2Y;w4eeMMvlڪ^?'U99[a"uTszxYV=ʭJ_>Nb&c[y Y$Ǖ*o8[7+})8VTS|CqUSfO394W4[R+6]IJ]}O*}:v6'7nCnTEU]OQJRNNwhmbK*unW|ޣ0^dX*T; %+?u3 C>>pU/((מ*9K(* '*KuQJ6*4P}ӽ+Lo8YYFMG;9̙.SszQVsO,r3B 6jmsNCV/lE= nWibb;ǫSu 9菃itU=s=e3MoxMU9apc,sT UXP I (yyy$oo/y{{\+}6$]X,X-ɐ$IGnKuhzQ,ICaߧe.o=XMBSDI%+T}ܠ;@meO߭?~lTϟshryY[yiHH~['}&ߥ+~Kt5OMxĮ3O)n-]M!Iy'^.:XFN6- /-!jFmOYdcSj‚Im#F<͚5n-*Q\Zy"䫠l%bŰ8\8QWJ"A.P}%NʧU@J2\UgTIU5 Ơ,ӓtMo.GVk]!*L7?^G*وѐDŹH@F'oP;K_=l^uo3T'+##oq jM}n}\)\ÞxJ.l:Fq);/8L{ [T>'scˎ={jOj"?Dɪ"eH!{Z\Z1m{6LPG3GIiY*0m dNwgU]W'-uQ2弢f 'WZ3Jk.+ӭjG+yVZJ^k~uei>0Ibg͚#F-0,XNID+WaaaLd,C֒Jq]jk>v~,- 9rKD6P#/C kQSB$kӾ?RV_zw?"Q5k8usC.2 sbGQ%3ϩ{ON_C|dv]=Z@,MjQ6N{\cW)EG)yJQ/vyyYTĦJ1b>d$UF@rT? Td+*xV^>,VUexx_O{pޛArw5Tխyzbʝs>qUd<.tSE[%lORUd7a\躒d6vmцX4Dw+nz;-8lWPӖjb|-3F:/ƪ@ϫe޴FksSR*UϴIvi>Q_)&ӞL`([ݮf*ؠ/Ux~-C!kO"V6]Tܯh9yVso^3/woկy4/O<UUt1V.mTzyN@9R̜Y.T:r|njcǎ*@Gn+<|}}?JP[wΦ lO7ICnE˖qU[Z^#&/O{˴i%3ʜ袩 ,䣥y>$ej++3G:T\+wމj]AALSM(/7OEZ UP`yy; tk]I/$]^``vi۶ҥrrEjۮ_4o z{M|O?<"zRk,їw{Wv'e(. 2d΃viKWvk)ջj&A5MھkmQO\PW}xOoːwxy(Q6fzjq$}vmi)Nk<<ζ'x^*JcW'((T6A#77W3g({KR}3gȑ#:z!ZR{$(,,\;w;GiUڕS+Vr0kS*aţLs~`hK_i9LO+TΎYyxޜ^O7*kt𝔨OTG ?UأhP (Z:/^ЍT|U-fֿ_CWtX"~@J:qE͍y RM} j}jݿoU<*`s<57YfM-{`zR]4+{4>>Efwm.׎G wWA*uzoWPP$QJ_EY׈n׏(s#=Q#ޝlWCaa  ׎SVF֮Y]>q)+}v2MSP|\߿O]^íblѾZUVqrmzn")U97)cx}-lOܭXJ_1Sm)"t^ c@hz7jepvx"Ê{Ǩn F_yu?Feӛ*ap5<@\,[^pPGۜs?ޞ"..4Kn˳Zڻw;@-fX} *Tzz}3o:%pF0"ꇛQ TGu4qE4NqMPjwvkYy<ū<=K7s?J:( /~sw~O6ϬC8% 4lkew p+s!GFF9"4@ɿ9 P 8ʖDFt%PyKk }mp4>K=no )^Ξؤ55@3iמ5oܟa>^r$*qۆ }#JYd2>]K=}ޣ3̒û˅rk:c[+8w.#*tTǎ;z3+{u,Q ~r~C?:x\rN_ >p*lVo۶U7e׆WMufgf ^`T"0.\YAvQ:]rx60]m8Hu΋prNQCuB/*`JDJU۩}Cܱ8{K+':mUq۱rZ)CY -OЄ 4vlڴƍsFT?NQE}D%UHS 2$2ez.%>GMFmuU>otK~\uEa1B8)V eYF@ p*'F |5n;N5ӃoQzJJӕ:=|qgPCeӕǧs+[TG_c"/*LOSQ/Jj˧l_eJұ(kWcj g&OHtTٳg*/1Mߕ1w Go++i~u]ܣA/p`Ԡ|[(Ņ )3E 6P$l'{Wb*o!UJY,dS]8jP4YP+z]'"Fne+<ЁW&9>C5jL+*,(p`dRJ}y8m8KTm;ބ1Yɖ/5eQp՟!8LvLTNi~enD/^CíCU` ~V[t_8 zbd*-d1%TdsPb$S'¢g7|QU霾Ľ{u5W?zQn=䜾#tdB'(覠w+(5f!ٛȯm=> о퇪^ m(+Ʃn}^bs՟/$H  _iLfWO:6wgRM-!-WVuCG+ b(mr~^.AM?~px)+N9OY61EL|E^UԿ˞動2jڼO;s%0n#IRQJmP>H*6Oϰ* dMe>,w=z>0uq+}~Z/rh̭WjG0=/rB_-FTT0:[3[Wpa89}0xt h %VW ycw[ ;zfzyj3f._y5S{G߫$d?޿6WVKblєxmu}>M;m~xXY_)U'49^>jXWIOVN֋Wx{4_W5j*T_DmҽV;7PS4GۧNԫoUiڷ%m\GtV'4N4M}ZTKK^w+SJuwY?StJ]H1Ӵg4/F5ACY&:I74_S?ԞLoE^4JC_yϽYΗkPhh5inErPձ]}L+a7: Ŵm[-ϬN#eiB:N mtkVs|r5~4qJ,P@jd]z5y:`ӈ/|>.SoVzߎE/y[ӵ˗(1]N3b__SlX:TK޵+s\ؕ-Gm/jf)MH~/ɱ1/We}X~mWe#B%';>umdzsxx8%u՚9hkb\ş 7huޗYS|^e'֥Z%UrmϷU򙯇u:gjKb$%*d{(HJIOSz/vw|G>RRN~6t,_~l{QߺFnVz鴽CeiKfCJvGseO\Q-Ņ܎w\Uzm 5e_)(Goouըu5nF-{ޭ1hɫy-1o֚'G@w/Ts|f4viμ*lӳxcҏ=lUVnwr{خ~n\G7]7@D(*5@~ZJ*3>=1޺Z6<~~?|'Eiq<4<ǔ)뙆?4G-QΗa/-Il'?,TLUPq3?E7~ѪoW]z[Z{ʌiuDC2mՐ6}7iT2> IDATqfRlVM[>v{}pU<8F ֽ ┞/FYNpoNx*%nV~>|]NͭQ;f?п$CA <[ԺCPݾ{Vڼâ֗W(Uivf>}r6j[cZ)~~ 5kp ^2)5R(PrVo/ъ87V_շkd[5ܢ݉)ߨXU58Mt^[cnHvQ=[Y kY! ÷saPE+אP\֪#|vâբ.n]Na uA1=EfҾ#twgn-WVH"駛/TfMV {Vu3sn T[FcLF_+oP7ǴcfO+WmofP ;ӅKSvm摹Zk7/S$Hu4@ qH&jѶ#hOx:Vۼj13@~mn UC[7]R;oս'o4ɯwTz{ *ܣѳJ7Q3G銡;[G))n~vP?>].ޕ4ㅃu`uhw7E2}}gGu]*_#_9w(n$-^^|4%yGvhf7Ǵc*~3sNc*/y6~Ԩ]j:13i+ 5Vc^YX[_fr}3򶞺%Gi[j~cr6=׸ ďk`9ayuRauUyXj/ z!JvU[[IJڱBK-PB 41VؠYO.hoʸ:CϿ%ok6%I}FkʜmV wLBKp#<+).uzڴdWZ.e nrf'ښ#hg?)O+s\ؕ-Gm/jf2z%s-߼WI:ulI\m*cz_^oP#EIJ6/K.K|xIGWk_e=47!];R5 vk9q,n;g<-K,RAkvX>PNGvLmILӑߵdRe"_>Gk7+%=M ۅkߩpԞJZJ nYkif2+ʿڽPWۉ"KD꛻fׁxE%ٕr`XB iҦyUh; El 5e_)(n37ƺjԺ7k=֘ՉZ}.cq{3czo]GvhDĨvk;Rc]l/7]7@D(*5@~ZJs0h~}m;5O߀5`1d??r+F$KkOq}Y*i(DCv'%)üB wJ=)# 5kh_/ZV/?xv[ɡhz7o(/v贻6Kinٞ_W]5X.Sznbe=~sL+?SVVvyZwr?3)h3kJ }OL}Tǎ/y\rxh-ԬE@%UmI2"<(UivRXR(%R%+Ҷ)ňVdɗ%"Wkd[5ܢ݉)˿(DbΦgm:@1 T7$Rb(rXiivGVi#j;q]Zn}HFqd8CߞeI8eF͟# Noщ]f p>DU gmj27>nYU+&ǰW}bG^Ԕp@ܵ糷0}83}7)h:Aʼn1@J``^y92!PM)HLFaXO{Oj%@}rIͲ`˶C˃=j}]xWqG#>6,Hsn}eviwm/Ltm;ajVV3=!tGz}~Ymί=Aٞ40|?{=w6/G33~{;酎zK `ecJ>}py&sݛ+&˴sG=u~d:_iߑ-eκL^O%y닋#5oIV!io|W/ /NV# ꯷!>XO(~٫9|=Q߬ў驖=^ E* R'=Wg%CjUZ+z*~z?K(%` Z.ןw&@ZN,lJf.zZ-C(ZLWvR>dҦ7jylY:K2>‰?+txqS̖UQ'Juҕz_k<[wmj6%3#I_k5W]Ii ol~gO'>&~l%|fV^XNkv+W ͺ`{mr I' 8eNx]wJ#+ԶQvôaAe[)XYHڔ5@^TGdmuGeijwM}qJ5:y'O`<_ +W7[iZ86^2@.F\z$HxN,MsxMD}:S!蛉jc꼼0ug*$Jd`(3הO%ۻS _F[9ZUHyW`pNqU0 8zr rn=^QjG3W3Eb' :6w{/:8BQ^8_ɉ'*vy-XGrywR;o㷟thu*F@cM1}oS{觛iŌAy[oƕJTܬ||+;c,}Q5,VK{NOpX,ẹIJؾm:1Rk[|g&~Mž~Xi0{I'Z~2=OMivj/Ih%c]F 77+qGal;))T~4w*i6Yx>1 ;o/uњ~0EYѼ",g8W5+Ydά|>9i5hTԠQS||}!/ZR[?)wגʭ%bukkvr>l }.W.u~P (y*myD~QE SIZbv{zCkp|n/S:LYiTRO~J[S{Ƅ?@d|dW5db={z5vj<- zV&M f1Iw0Bׯ.{gyx~8UsCҾ֔Ap4};}Ѥ5f<􉮵LGc Xv7sF75,;S3 }pf+[} B} B>@>@ B} B}>B} B} @>@>B} B} @>@>@ B} B}>@>@B} B} @>@>} B} B>@>@B} B} @>@>B} B} B>@>@ B} B}>@>@>B} B} @>@>} B} B}>@>@B} B} @>@>} B} B>@>@ B} B} @>@>B} B} @>@>@ B} B}>@>@&IDATB} B} B} B} @>;?:gf2If섐AQP@QP׺V.Z[UQTĭE@oa'ٗ9DŽ#pHx?y0 3g&y3""""'"""" }""""'"""" }"""" }""""'"""" }""""'"""" }""""'"""" }""""'"""'"""" }""""'"""" }""""'"""" }""""'"""" }""""'"""'"""" }""""'"""" }""""'"""" }""""'""""Gr""""gɋDDDDZ20~)􉈈FO999BHssMN~9DDDD }"""" }""""hNYsHNfӦGNh9m))݀X!^zĖ'"""rm>xĮtڕ'|Ti1|POyX2!PiQ**?xq4W^ 55'\!"""ҌW4'"""rHYꇾZMODDD1~3U[DDD !Pf4X*w6׉"""">sQw=ʈ&9W_yC@ֻCNza99mDDDcF|1~6N*ĉ/ȼM /"""ɋ駦9}""""S}:U9d5gdeM$%C5II't7rӳ#ࡇԈ""""'p>c>BDD22%2rZMDDD%.,}?ArrZLDDDdff_ou>/znDDDDN Ax͍b„<4i"תDDDDN@AL8?ws%PZzfއdP[kоQDDDl/> rTdYjDq6ㆾSjDDDD\r:ZG }99)-0 N5?ۑCVˉFvvvS+JUEDDDDZV;*H˧'"""'"""" }"""",8U+og*dmRۨmDmFO,6L8 ǫm6iIms09(􉈈(􉈈B(􉈈Agt UP "!'+Lu`j۱021B#Th+;kƶ_kٽ W"(&d%]}?"`Buq6/˕͆Xg*O*XɅ[6<+}fxӂX yxBl 5~4]$_dJR#t;c9۶YJWRS$HKUW+F 7@G߽U9 {F]]-Q9e`U8{-)DyBY:zE>3j |Hp-#*+;ꭺnYD8,]';Q^FXX8UUBVig{Xusv)-ٹsmSUUAxG_þEj9|÷Z6nW0Kamcೠo 6u >LBPܳGS|bı.Yz "KW6g?]K_:m}4rgr˛風KMx&.kh9pyZJFIGvՂ$N7S%8#bOM{鱣\9ْ!@[o,W^ye5yӦb6xZw! y:I.MhسT*[z۷'4 Mz>4m膕@2[>^R~:k6QZJpѨǺέ~IeW~hpWcGҢC{vi-^œ)I:K|RjHN咍3yy*>ę/f/c2]qU㇑ڸf瓘`9E6a(#C*680}Z7=qӊa>b)//#**+oI7w;<$pԎڮl%>kWt1!dmt(% O6uT/z?LHï1{Boϣ,??s*N~y f_Y9)ٝR֯ nW0"a⋇<> ಾy|%WJX2mnucaZg?}.FY{Y7w,a>-'T˩bۤIl~dGD~?mcYVfؖ0l4E{&[~RL}cIܿ"' .$pbz}t.%u%{#\718GX}[X n} dw\t] 8F'B_ÚϹx |3#1u뾢h vv#<M9U ,@xR'"3 S=+Y[Fdz'|y+Sbp[ż7xt|&N-)Ӹ?1!%]b郉L]і{goe4Tص|JJbW[BCVmqKLk|T.2dJKKΛ''vmOY;ir r/<ϔq$~v̝MF/7'.`^> 6nn)@PV::ۓ#hǚ~\DڰEoĒjfۚϧ`ԠlvHdӮ*zo_ n$0`Oy 4Xʚ&wo | =Gѧ,]Q]p/ahM2#O%quǪo\. BeYXemg! Dx#i8xѮX w^~ إ"9u}<2==F77'6Woe_[2;ix|⋄OND{૫n1O)*Ōs>,o 5kf1k[:]q lbDA ޑ1#ݐ˜sH?ש] O;l$<n[c'$mxN߱k\&U0A-=}݃cHF3r+vacsvt1 Wҧc2m]|a)΃o]~ l̂u>əBrr EŅNHn㯯Ju_§yb၍Tʘy4}߰xEv!@vƒc3 \5HF)mbm=#k6@`s.&3Co|-2lz=;Y~r-^# csa!NXNܦu NR⣃sVK )N>HB$o|ZݒWxљO~-sY9ӶVna݃C@e;<ŠYף@_ض#@vڱ6j ׷#9#e|u*I͝CV{؇4̘5o81DCu|;s5\2Ǝ$uξ{fab+IJiz?w0QM}\f%w즪!T[`oHǚdQ4Y:W?9$P6Q[[Clw%`j~֐@ML<݇㊌UL]}~v ))Y,m>|hg'Wɬ]C|l׮x)glVZNRD,_JHB{K(. * z"Xj9,[AUǛwd=,0S;S:vnIqZ6m3(m[7`~=|p`+4@l_!` ʫ8M0A e6ݷ-Lu(SI|B́r%c̠<P\dښЃJHM3/.}-|۶Xù)x95? >ߡc\2UNp]73~olly\߿֞^k]O3ã=,`gNN'Żx™0OWQJxlM$2k0.MTg_zb/lv=u\vTwk>%hRj;B#=-l\s̅O{.tD] FjV(%g9p??;cٶݼч֘xP^BIsmx^amLl:]FOh3҈'le/"!X B;f{5nU9h/C^]'ڵP{=!.xMUuicǍC<\iNUm{(S`p li 홫蒕~F}b㜙 j|β8K?bj3 'z ַTX-XEhٿ->!k #zA1;Rjjº~ko F6,.|<x;L5sU1οd I#H|!1G} v%vR+9|\*lH-{ rڦ=e#?/t登j{Rf6߮.934vbteY}f#KH%D bE;հH" qCDE@ތ׸;zlٺ O۷qt2FOXL{gWXueK$ oc1&j=I휄NYL6N$<{GvJ}U|Ia3 (:aW UО ޚ #>1vtJϪ-E<a7Z6g +op#ĤWnD wеx7|X?WGÿ ߏw O'Ц-^{U̥ 5s_7)뇬ۈAN#3H"|Ϸ3[û"-C3c^4IFv[k;qĈ, v:_Ƹ;n̨ x/,.d0[?k ?W/UeNpȘITsGyO3뙹m_wމeDEF}v>rYW?HXL)$(n#'r˹kIr1Xtʢ.thC:fd,b_Lb#$?ОGO}嗔w^\4n>kq[' {u²?h׀0 := yO=CZ}=A<頾>gD" >1*}8#Si})Wi~Ho øsKw/HR 83cnFvvvS%ˢRhE);Lf蠁$%&Q^QNLQ>uZɋ~c{MC^|w]x^6m%*2|>>1~*Oms{]0ڛg^'>[DYGWQNS̳_c0z<.\@#\aZW>@k 5=j۶uRT`ѷ  'a$qCC9\\!kq9#H8 DZx]v;_|5;""ذia۱^: nYAJr*[ŎL|:<\ekڪ ο 3p:T-lOӿU{./j| M0 Sa7&,,%f7 6f-C?'n5FI9p֯02j* M_LС#+W $6%xZp mHIIf-̘Io͡ #y~GjJ+|bYib:8NNN ˅# p1_Xס]9y  v W¶| ᫯&$v]P) }"皺Deuvbwr/Ş>WL*tቌV~&wۓ$m_P[Yi:TieaMq[aa4xөw!ѡ%kfy ;;w-l^/39T9"hDN'rDFEt|" ua:ܡCqu(4?cfc3c&ƶ- ^xsL@1ɉ|q Se[X@7q6eM#W+5 }"0pCqCU _mi8@ptVI?>w ~~_C2GO\PaᄄkB40o$aH'g>QfAsD΀ɋTm6'ҒRjQۨm䌴UvvvӗE"""""-DM5ODDD'"""'"""" }""""'"""" }""""rrOC#}"""" }""""]fJ IENDB`gsequencer-1.4.24/docs/images/ags_export_window.png0000644000175000017500000006354013246707333017351 00000000000000PNG  IHDR#bKGD pHYs+tIME #+iTXtCommentCreated with GIMPd.e IDATxwx?{w=.EAA!(`@DJWHhA$$BzOv]Q6'w;n;;ّt ǜT=m%JZFRR<н\W+HRIlI$$B@B*a,fĩr[4R u0'Niqhcf{UtSPPU#IEL)3jS%Mыwq _cn{QRC;N>qLJҿ%/l*\ \Z%V=|*R%ό(X2!JY]SZcUҒ*x>RնTf/QJXJB __a)˿RZUtx&Rʯ3~9 *md>*\bT+S0_R~IV#n0I 6&ğRE%BJ"Kғ)ɐa,D! ?W*eÂ-U*de&}ȸqaͯǤdT=¾"ܻv!ۗ/mW)nt؟Q=i.#laʽV@ųUO/Տ]ݰmm_F%Ū1}leuzɃ0X\Wx`pѼص>uݝpN?1g).XO9iXC;kƇ*?kz~#h0-g%n /yTO5Gn#mcŲL6ܬtYb9V>rŊCK_4ܔ xaQ!EE\ѠVkT*T|"tBTNs!l,~ު3 *3!@}c3>+ʅ^o}g< +#`ߤ]G:{HokdP}m{5Rg߳?I+)=.p=Z7ק@kL=r3.X ^USF 'uHs%)$]8%fsR!g\,%Ҋto>nXLT6~9<qOkY&e؝WݑdPvԲNY<]ZeE:3ϴC$&lMŮ(~65f~1ov5m jkj#n'Æf*eKNΞÇbyXɌb*3at+%(,":mЫԨ*uFVQXP2@=(*,20 /ãsJoD>ߠU_ pl@=5@C^Z;/Uj: GI?g_nrݥL_z2k[}'ΐi?q ]h,/(O]5PxȐ"׆QHmN-ڢvsq%KpZ +aW749k>6)C:QɢRs-U(emIV^@aSۏj(?%S,+dϡ2+xQS>QNc7Nv=fK`Ybd.tUl":juSXTD~~,掕U5l1f.ŕM\UtǮt'9zc@^uh4*%#M&3#6 -Lm)/g,Z  K*)k˪ jX[Z<ͫ'7FAewJUzHH_TT,+Ibb"))dffRTT#h4n;l9PIWIzG $I)*UT(z+z>K(MēKIёsJT+\ɡ3pN6_'ߕkzט'޿m]2Y%Gv&fgWvduD5K*"/=+{+Z*u",L_@X/Yנ10x$nØeL[.:Ĕ^97` Y򤮫% J|W_>Fi48xh[9X< ?|݇k;3~oSZfA!+&s˯_y~3J&pD&v!Sx*'fkO/2R͖.FonfH~kC%&'vF4sk)>'z~ᥫ[|9Æs`TjCUmكު-n3rprss}{RIꁁ&-}J8ң kRɊ]/RtЙ8%+9P:^z Ǔ-@'h'_v(|AғvA-:2O{jtr¹3lw)g{|7tEHd|<7AD"x>7؉?p*I.YSqsׯYetviܜ W(D\][>TC5;g;g-hp_G`aW/ꊐt3C䪜O5Hi}q>ŻcȲe .._TJ E<ͫᶵ5CܽjeeeJYMݠ?>.y %/k+@7.ljF $w7fAo Z7lJ7QK+DU&{2-0ψ5ڭ/UnH7\QnM+ڍx *ё[=2V]ܡEzf,`"I G˿ZuD=sf|g!@ _ kֲMם[#ކ7>bW\h뗯7H==B ܿlKVGC@p7!>[Ӎ4+ _NeF.SX8ȗz YQ GI$'j,zW:|InlĩS*(r&DU ji)GJ_fiۜQ!5R 5|@9r~[yFSe%XYC^g֑xŲi(gPEju1 wc|~y*D9N,v=j^g!N?zzb-/c'I@F|"3b`=p:IX>0ԝjp83l˾=Mwd33hGHN(B+~f 9a7]\Iq8$r)kz\2SI9 Xؖ2ja7]jڌ(Tq|^,7ٮ%?U.͛J‚|N{H ~Bnv53&Bz @ >Ͻ4:6d0i))5_`B/'/&]zۖ]sG@A{p1i8 gQ[Lڱi;t +q ]UN$Ե믭S1Tt I_dnY%$ D@w%Gf\\QR+H_bnWWy1-Cmu]v53m5dIE VB }CpѢ];}~ژw6~JZN:!"2lgN¾ORB.3=.wB!Ɵe;!'\?v(8}h *-KN~Y(*qڵJr t0#F2cX;g(.*WG rr 'KkI^9ŬGF6tQE|1ZKco&-;ZAQPSZ o.5*Z5i˲ym/s 0SI|alX}9$Pax8 RN41,bS֌ $Tv6HtQ}DQa吵Y~ AXza/ߏƵo'Q?W,uáI|:VtJ+ꃕ8@NO>Ķ_/V5zXg}8yb UT2s!ðuC]=tܺ\gYa]o mm!>ODc@JRN%+p2T͆!̏H d"}x0SSJ%4RG4|N ryrן0䇡dyOdĒVZ>QI 7l/ ÷۬e5 bE?ۣ>hl$,KV\sZJanS\g̫WT@&B iTz+g-t{[^p UCS.{4tRX@poc#{@ hJM[$I8m ,abn@ /B@p; ;kM#_ q6/!@ k_ӒTST /|X<NLO /;~ޙOs ]B|cײ8X܉LJ=C3_[rbޒumCm!vi%KϏDF68;b3,|`Ə'O8._?ϕD< (b4xNsڔh,?}lLH5F c5ڻ?vnc?io$)IQ'In7£plgHNxcp,6̫'ص|ޏЦɩm9cRJ85;,$t -d圌I$+=mK؛BFϼOmpKsЏM\ՁgA;7;CiW1OCid֡X2W]2Jn$ lk[wb9[T1|d'>ooTN .ϒPXR+/@|ʡJ#0³߳s7%7_RE>Ӂr+[9uHD!j[ HA(n*YV_)+2\JB*>ºgp$Wȼc&s^ Ļ,|G\ҩ#uT*̲Ӊ>Q~>QsJu}wnzG ~ԭgY!A$j6reRxzTdru$ƐѰ~ *U&cq93&>Pp-RZ:F,D,6a uǰ Sf?ojZxӚE8Na,'zSJ>wgx[l^miů-0k]p&$'_#733').}P|iۖL%-|0HKʞ0b =1 Tm=y&A[3zLmn(_̦drzt~{zLZ@-M.)g\dp2l#^bC(N!v6N5[@>k=قDFW,~ili0}ߜN/|Q;?afs>錝O'?7OZԟg&绝ؑ!aS!ot7X)swtbԤn* )$$ ^hUCMb'/}G؁X6}?@,[_@ /B@ _ B@_lb@ n 7a }w4abE#BB@ _pPIK-E/;H8s\4@p  +_ ;X£ IDATz17ص /w!JRM]/z }@ c֬3os!@pV1]ڵm͌6c?1T{zܚtouz~g&_m;®k\.M߰p,LȺy"Öᯔ|g_y@,e)zlEdv2lG,&LKj̄ c/Hڳ>@B]>5M3翟>Ĉ!teɀvlٝۜxvj6x{xӂ8fwu|uŃ=[.7̙[~̙IGJS7[ߑEzwkEogwlΕK54zl$=:"?%+7ĈݱfMI0_#6wfu.,1׳m0x-WMU-ٹMڭdnb w_ d=|cŀ΋F@k:|[1; N6,Y=4ӈS6%s б y29Πl 8!-+nLIk$=࿛)hlmP6_cccZ0`bޑb#G+Z4-ħ( p=Gm;Gpb:-q᫈+ol Ɇ!<"\P>ՉE&~L uT.ӈ8)r \<!uf/oW=ދ _ԨԶX;HxJ9y!O; ]'2tJz-ŀ]lzv&\.O梮ZߗLWk =,ـfnE}t1$-u7/<;& ^6 og\}Vsp=SD232 RWcHR5Tj 72^|ɮ%K@J}TABca`yf19mMHVKAU^mAġ j dfZNY#'!# j£ iZ~7{$Onod =1 nɏF!!4ndWhZ[cɫׂ&!!4i5(}ؒa@kؖS1y|&ZsIޜ<,@peMC2mǕ}@p[o}`v|a }@ n@ ^ ^=T[o+!;s׾È@ P W:L^Ǹ^ŝ@p̬+ ;oVyK)$.% n~=vx+Wp*Y{kEsyAG~a{1D!<ֽ5~~8[wfoJ[t4ɵ \: FJ7S>ʉX{ŎFO3/17^Cx#&5J"hLϧݪpƠ7GSj~IlKm+YG7 ~ǧJ7\g^}Mˈ ,zEEw\"k?Ckص+waזS{~cѱ29g]{! eV~G$'Ҿ:O\xDɛ7%JoC<*͟7'=Ǐx 0e ujwb(Jf$I Au* ՎZkQ/ksFӨ,Lߏ;v7@PBش7(Nl$7rw~́sq\]Q86h $t -d圌I$+=mK؛BAŮR69zo(T2;GGT7.ƭ<_b`-o3D>tт^?>dyBǽCW_m@`|dR$Pv?(YHJ,(isQm$liFzVJG˕'$2G`H o&\՛UVܚϒ+ٰ8@|BI;_ew(bEj~;&U`f GqAOZ88@nTM5kK?'ʵ[ѫ̚EJR;W`\(6l^{W6sA! E,h0Ht?⣯ Tx%̛c kXo~Ȼr&XK!W7ȎH:ʢ |+{s ו}΢67W/Ҿ [ _ctCv ӰKȢW򯑔p#|Y02I9H8}^}_}x{9c!YS;ߺԲ@ bnZ_xz䉱zp@4:|u߯@`_HԶUČ~W;nA6DJXzNgg _65?/ُy;X5o6܌Ĺ%}JEQĹt98{$?֒r aߏ_𼆼+{bk Aԫ{;@ '8gq@@ 6kh$m;۬m v V4p@ n!~d ?B@ _ w4e/ts;iCӒTdE@X@ /=!}_P\J !o}ˣ=P鎰I GJ)`)y/c??Ir }g.\'jt}0腷ȝ&%HXӈS6%s б y29Πl 8!-+nLj` /_,d!pt8a#0~?fv'˫W?bOgחru) 'twl.zN/($yӛ7i)&c˺0vm^_caD:6"#*13.mBFK\*GDJZ_6VЁΝlg#.v+wrԵ*ɠl|~d߁_1dm {Chܱ8ђ~j_Wԁ1S d%ddu&]Ϸ℄G>z'WVS\=qJ{%glK>%88G5P& ^:8CѫPXw#%"e^tSq%}^z`gFŚة@S yFG0H{՟,tzH^x䣍<q% B@&3%B< mp<|q'C+jnwOԨt?@G}Οו@6qS/tC^b+D )jUtIFC~gHGN //7nٞ#' IgݡoVym,GHr !p(PL!~TBf?MӲ7g^fURֽ>#NWi -@%"#w h(ͨi1ڰRr"aixw d璑 ];YFMݿY܌[JPޙznҸvfF umCm!vi:P5̏pi?-h4m0esntzg>M,"v?4¦aDd@oLau9 -/IN!x9OĆ~,ώ/һ[+x;cU|cuv(*7DGdo}T~9Z6–ۈJe|{E)+w%}{=/ k)d&cyLʯoqj.vwx1 iR4{ t/wn g.^%_Մў~tGäMLa#Vnͬ}.x ο8ӟ$oڏwfJ>7Q1˺xx]P(rB=_eCd;:^Ӧ[&paT>sU ~+wлO;Ԁ96BW%<1i+t*{`@EӡS0|1>gt٨w[P(zl:k:/v ?mkS:Q99?ӫV9P.e?q!d6g1Ww21Ğ=ݫϰo]&Gd.?B7q۸fbJ'>΄A ذ_(S)͐3NwsC9[ԃ~Npfj~;O,#6q]>&_3cE#s)Dp?Lj?o =? ss{b e]61^yt0wG芃ĥh22ȸIޣ 9uV:Z±d2`u{?B> 8ђ~j_Wԁ1S d%ddQC:w៕sDFUɡSPQo4.śğJfAttF(£YSD*$#Q T|$S>R.\#Mx%UC {?I| wq*\GÙݰˑ\Siլ"y5Ƥ_P;wUPV)IGN //7nٞ#'7wޑ>m,{نmiشL[?;+t !Q;+T :dY?,+e=@Xkc>?G[CyeFU c"A6~3Ğj(N('e;Zd&t ;OÃs~]$;dt3JZַb:h(Mi1؊Rr\gbٛst\K$ jA.4g8=uS&:bQ@c"OUilSN6԰RUgI+8|҉O>$4WQ IDAT_nJ_H쏋>ͺѾ;Jz"r=,<둦&o-?gNS\*:*-S|68N#37t9钄"ej#/CIq1Ww`=@Zbߎ#<)hZ_k/6.#)OAɏ\n$SK<Ѝ=[z%s 4Jx6]8 R "/JiIޝШwW,'i߽c.|BBѴie5_傣5G$92k'eaiqo47WX1zLfX >Ja֍f@/jH'IJKLNoϾ@I %V~X Ҧye^4ڌXNo'twgp2l#^bC(N!v6N5[ j4V另YWK>ω 'PmeC ^sM=Ux~g6>8d3v>h`b 3ב1e~~z>:h=MdkCy2;2 0%&Fptb5JFݗqX Gs0&;g.xwy{ŵq3R"DK41WŚDSH4}L45r5QSLƠ1bEAł QD:<,(h{^evΞ3guBhJi'¹w^aVD,{3n 7Smԝ<$pz&SVlSʝqC> >- HݷeFKkTOt8=1rFq@ <pwt1Iޣ]\'/AʦwN^j'| ZH[@P:I'pf͍I>wtscRX5.u: K坺v_J~b&4"g;siB#-VhY NfȻ/PM_!2DIw0/~ɧTUB_!nLnxa!-|BH67&E*A!_U UQR6-'Ӥ?^>Q+CUBځ0B*A\AfaF!/B_!$BTWl:z&g/È4v3_}NWOjH^.7B'?C,;Iopq&vđQImݳ[67pύzmKO`~V}Bw_KC!vpYN'l>eݏ8' lZCza$僙 R;BT%W qLmsS2k'kJyS \T N$DG80y_ܭr9>=MFh͛7P{ #-5Q>>%l"أg`: GOo `Nʁc!_t'Q:M \Dۆe|l{ɱ 5dfþdhm),ɯ@Mzf#a'r~tcj<4`sCdbƸ#qFϡh\]i>FR'u 3r)Vi9`r5YX6u[`_-X뛼Le9MeAnr^Ȍ<<ؑI2VrM_#F[oh=!#GҲwی&=m36|h,Mn8"SÛ1eKե^Ak?m -Kؽ% Ռhb8ӬM}zzIl:X[hܚ͂iir@2_H'|^G Io_z6߰ O:V!%NfE71&F@E,"tIFNnڂUTm~L@1"';]F~JVl !W͛›~58÷ɗ=4seߞNK=~Y3Yl('o2_Ǽoq)d$'I8aƮJu}g\֚d\:ބmP,ҙkqvpEB!@9L5q$qrO?i=XӇ}W42 _Γ}sۉI88@WW^Ol['= it m3i^ j4N'$$8n!aAGhlq'Ma[-7_ldR]Hz3 y2seIa5=5kX%˴y}1'0M;f((EQHXp+ QhY3ۂOx7Z")iF®|:𡚝:+G0.2Gɤx g)] T!R'Cqny22ŃPWOKt288kܫhv RgPPLn}8"_L=ЮlE1կX ޼V&TC&gM5Y. \p 9[Q*Ĩ8ti4ܻixrAmbTLβ/h(&N"vl# e1h9c.a*1_= TL&{VU Ͳ5aN5GջvE22ph5QSِlisixG6GEWwT:<.Mghd6.~Oӱ+k\[~>clX?s3xd7y_ b0l#!=>nɞ裘(gT}SV*ɤҡ;z`~-CK- let61rEwjOF&>9]l>4nտԤ,rtɦiݡ>60gΞXv,T`I^.s8GIᗼ0Z8璓Jtggh,Fyf5[fmޅVQMbg),9El,!̟)G Vl[@B^s Z5B|;w+AnsxGUۣ23uNO$ʞT<v8Sd%oaʺi#dБq؃p?\~cGæ2EgO=`)<3G#'|=c.{UL伧7}@@ţ\'/1;M/6u:F~3y$kͻ:;7&UC%jyT_!H_! :C7G,5!=!B!C2Y B\-er@QH|J1)zTq]8rDL{O 9B( !B!B !Bq scRdF_Q>G*A_!Df!%ʂ2@AYaR #{g>04¶d=߿9IF٥7Ϻտy_Sj9<}V$w;::5fYw7Uc'c&{%F!զ.^X9=]I'Z6A1fq`lmCV} c};h*~yO:Z@BM[(]Ⱦ">NPܔh%D-\eX0Q̱ȉ,Nq.'3;"#"}oN&Ky+˯sp40lSd ?ZNfEZO1_C: 1/‚{xA1PP4IS5_%hP8]Z7ɢkY5grLk@)SP*(5aMW8%5Fi rf[[wJ/=> v|{M9V8(:bgq#x\IH|֍jmN@:xgw<>ۖX|hN/h@ܫa(?Cjb-XKzMz+Sv|Sk>F>|NZIo5`QH _汶 G5&gPfw=y<4r E]xi٤K7.Y˒Rp-ݱ6 4 4MC@je^_} tAWho8=ptMByZv2@XN~X5J%OF; nrU?jm'&AOp}WBqxiwеN=r<.4`)麽+_q O?XC0tYHu,90g˫iC ȴ7o9-6fFW(aw@rj3m枿D~ j>D|qmًf#޽_GÜe}{3烘P,OܜOق\槵j[LWS8,TRw8ij#M-rʌ4I37eO- f/]͛l"[9M/BOϰa>r#%eF;B/_4̗2| c /b&h'ٳt!^h288kxf0:jxx^ U}-jY_w@))вSƧ"+/dd5AƬ#'UH^OoNs{|6)e@ѺbͥQkQɅh@l94efϢR s0R#Q?[R}='ES9Tb޴ЄjQn^@7ʥ-; \ͬK{x<:y'eo5Z<ْ})T0&l#@jX=p"^$Z-'cl'ݟYc<"Z A%&?/]+}N]NBQ4sԛ(3?h9t&#Mqٹ>x`*U Ͳ5aN5"U=m_qa:v[vNo$$iĦ=oN2毸xBJEXVʹÜsٴS_,== ,*91]9vVxbS&K.n|4k[+6;}z;kbnm`G\.A8D!y-'`݇sϱיף4'6D h)&"`ߣX"Nijt6h4+)q7sBgGQTTW-kٖώW҂va2*z1zvS3-ԥCiQ\q!'3ä9^q֩ |x棩WV:]ROmQ.r7WÕ>0Gt4ϬlHW_},]rR4#/ jM7[IەDVG]=p|L{m3 z5 n_pEghot8><:O#q$\r"9o{G17n$/ݷq3&:_]iHVNt/0P7a.")tY̷ >bn|1KDB92oܙyF'ǚ(_NXI̚T[MƢ>u4V.5!mJd^_{#3kױ}ʆ8&_6Hi;:Ѕ3T5N2I'Bf޷09< x.frd?$+X`ָe?|#;Hٜf[.󊩞?v~3+~lDؐ/!ώ }L__n ;mK]sT[[Ĺ^QRsދaf|0v}rǿ4^q$aeu'#>^m/><7潻V71%ZJ@@Ŧ3. żgo(w1)>scRX5.UZi SyG\7( NN_%oyn* !Ľ[U̓EtVy#A! !~zaDI] !=C΄!Bܘ'cB[&դ/Bzf͍IJBU5BUPνGlZ^%U !D0B*H_!$BH !B!/>%S=ضQU hۡA-*1C}1[7{ؘ[./Ϥ( hR)/7fI[0L_7~ !EDq,,1Ǩ߭+I3}AV3[U))-' MPM٭NK8 Gl;͉N|˂F%6mM&4ME4m(,)|A1adhiD#mׄ3ޗ ݞHFXh?әGm 5nfBܾ-k+iT8p yٱ+=i_T²5ۯj2wаji8R h׆ׇAI޼7X./HI5;jW5U5_&q')Je;YcI`Sf5zώ4uG|u@J%}iHOCE`B%gQɖ WP()3QTf`+Bшv2H޶sgʆJr[ m@ѣ|ZC7Z./CH n؅dW1XW@`})**s:Eᡞ+/d7 *͟NKD60]k'3K93'*,B KIPIDAT+BBۄ7? kkk ֖7|a(޻$-A.[V3v=|+lŋSSdդ%6ij7QU|6PM*0,T⋡YXSt(?J;ρd u zCMZ>f ~&_1K|B@m'/B MXVFYI1hn TjkkK V/N 1!e&s zKKt:=zK˫|$>EAӣҙ[ZijEPhayGQ !/v--QF4M37XZ-޾BNCӡW,-4K !:l!$B_!DU cB*onLBT% ;.WJHHx6hνeB NU_x\A''|B_!B !B!$BHMj6,4نBQ_dTe !_psw0fq`lmCV} c}8&oB\Q0v[]~N3L>FR'u 3r)Vi9`rEh%d|GdD#C<1h' f]ʖxi~ϾESGT#'7mkMo3#6}Lϝ̊ xc tOc^/3$鈩4H /vsE(>Zv txf8X͛些h(8}Y7,~-_we`۪?v(LHSEE== q=axe!j ! ztBqW{d2qp|^DGsh8|3$N<5 vʕϭŶWOK8;l|T87<h _B)Q54ք}: hftY`eT&T hETˬT!Sn[]j)9?iZV݀u Hgܕd_&Rr598zx` )O jbo9DNn:VdڴPS{ڵ4`6bw#~%&:-9stSXX4Bqn̩ wȖrpL}s-Ɖ.n8ד퉘?w=u|9?ߢpDzw=p)t30V%S=\u';~3y$kͿeZܘV +wB\~'/9*UBTAwR:7G,u-B!/B_!t՘ܘ!J(rqd! BAB_!DUGgtIENDB`gsequencer-1.4.24/docs/images/ags_machine_properties-link_input.png0000644000175000017500000006351113246707333022471 00000000000000PNG  IHDRԲZbKGD pHYs+tIME  轒iTXtCommentCreated with GIMPd.e IDATxw\Uǟ^6lp{3feVfô4QYZYVnMmijZ6L\)D {~.p/\|<,9y眣,9xDzn ?j`* PLXCQ44Z-A`e0QU ^쮢=(Jn4Cvf/EAQr)Bߊqr(@p&)2?N 61\n(fm2OJݸ( g)pRMe%TNEUE5F*pJpE9\nXpmpl2 ep9ig(& )?Y- W(2ϋl*pf4V6@k碱TP4Z-AY_iPRyJrjo8ES8"U,,E(d-&ˈQ%7Ϋ@ 3cr+vTYMA)zhQX,"GH&y Zd*WoP:FTtΫ=86t Z,fmd6{Hyu\.VBIa;Ԣ.`2}޸ 0F0|ZhR/61%M΅'ZMd~ro1)<*bB8W(ἢ8y..% LA|dPB͔yŬ؊( A0=ѪEEK-2їt^ X(.ZjEDRtB/Is1}޴uX]XU͜7#ƅhnVsdJ^\_TASp~m4P{7Uc+ϛب`yTڦl5͉ #!g~yoPZq&;H-=H@q*C:HJB%3+"ceeVkѠQ{V1q3S .~/h|JVqTIV" ) )2%yNyU y*%cvPJ gp0t]Q"LiS>w|8(\ip-.,U`Ow3! "C#]ϾNfN|wN-ͧ*=yz NMi^S:u9[2pK>ͩxSo.f~wԡP,+̞ԟDB%<ء&UW >xelbkuHY.2L{f+&◔ZZxAf6 G1biKEƳZhUƴwd̓?%*?cA9DO)O23PR%y XT8MUx6?hV+I^Yxgwv Ӣ!4l؟`?ۓQx՟cYtQ?8V=2,d(I?#dYɈO`UEʫ %.ըi`Yq,]pt{UBXa/ gZ 6 Gew \wu3Ė]K5 A )aii96=:4RjP0sK=*e*jY^{SY(+2gtpj@Z1o,%Ui^F=&szT+%W{:jmnN2\}"1K/ MBjbujJ^>k M0)e,rB9}:֭[LRBHPo+{<CxtJ8]>ol'09E- %-I&-pGcA^hsw5UV8JTl^=^ɬ:&߲yUXAΤ7FaՒ**XheU-E>Ų_d)Xw>bNNMrR/Oӫw'͈^ HII.IQpw݃!米#)!#Gz$~Sd:Rj|Oĉf+eK LeDɪ>oZu  goە}Z*JjH,` %%Q'+++E-gSCBbJJJ#ccc](DzJEBUU^f]pe9FXE{'RJ++Q1ݨ%7.Z$">%W8["J%(te۝ ۨ-@q# ̌Y$:x Lަ+jG-%jZz͖_) [bR,%J_/ `yjWMj8_.]"LA%/OէZ[MW{W)gd֭7[5bey; XJYt *5zk-ڍ[[EKj9۝kWKګ$ "o K**zC;rb_DAxJy$T)5" V\"{J B^@J0. ( $xsif+!}tiO=U:=5ell/{rl/QNv]!BU-^}AM[A9LDIADA%AAQRz;[>rUw}:^{eL_%4>T9ֹ֯l-\LaդD\dݙ~΋WM}#JX#M5?rv~uK!t7T1/i+W)Tj7:I$~!b}x9Nw:h]Cm^LH~k}% `ӑW{f2/>Ö/⿨[K?\(ͪb^گr,}fm~/7/v u|<M,})7S9ZP7SrlJ9@9ݷpmږ cFj~FKN:e?=.4\ljSsiB7~a:zY4-bKb9Yˁu4xv};h^lRu;{޾6~[[xVG['[/2}͆L+"5J*?(.H7{v'kG|1e~Lӣt9l:#`ēLz ׯmt'hz2 ƧT94O ƀ*pwt|;1T2 u(d>T'j " ! |ZZs%#k\9TM[Tزָ4v@h_|+_RLL= 5L{G jy/"8^_뉋 |xU6=k\'UաEgӹݮh#(V[Nm&f(P K+Ƨ02-ߩ.6]AI MRХֹ];{Ũ+FP6:7GJSKo.4+N[/Ωv4zٱ-mm~K Z˃3|ZfjpsN>cw\@o"<$ZVANgR[;yIJƽ~+]qtPjR pZsu{|c=W++c~4z(FZ)fWs\V)o;H:8pU95`YR:Q2M6{[aOK5\?}7kK8[ D22oG/7:\tC[c˫2NBdI5k ?)m}7,2FM&Nd?ro[Ȱ6\){"K/7ĤS6f}5_/~è}+ O^㭰^ֽ47Bi1ĥIljp75WHZ|IX Lj@EckE[z>ňFtP&JTQu }#\:<`W:_*cYR|gUeB?Z /@6I> 9:8 C9bLï&NwI3%j%'\dG(1G\9si(]Y|V_IEˀ36g=}[>yqc?WJjiv/x]_j/7Kir#$~"'*j`LʿgL:k~:).!w `T7m4f<[!oDy8ɻy^ȟkRM. Bb%U S{ t'e"4#⮘8"[A ;AADIADAJ-኷ԌpWrWn݃^ƷP uaw-V2A[* %DJ Xy[ꄛNgq67'J@ 7y}#-}&O޽ܳۂܽp*.Zadp0Ikq#$9bҫJC4ٗH]@ܑq} 6\dǒul=q +CslJ7ܢ:JR~MeJK!)G~&$d<Ǐg̘7c4꽉mܘ-m7Fx=bVoRUL=PN&r܋\]K/ 6s>U"\MVx>ӄF-6\ѻpx}ЖǗ>3^#rFHgXP"H*J/KM??2#TsLW u WH߾h[82BQѡ;4]#jk{VBv|]~m*xB']#c"BkԵ>JYqD$8HX7:$Ar㦗"ڕ+Ё!FӯC;Vz8ވK:N  !+\OVO\}m/Z:0ŐfH bQ-=^V/|9TY23^$pEi~]=5X<,O@Q ( %]Onbsg[w}j&jaT妜i#r9b' OWQp/jԩ%Ҧc' zl \HfNŤ IDATQv n)nlEfzXY9yQBiFWl1_-94{/M3l4E(Qk;,雂 gl\1.nRK|2̲Eq{o0}\7zqNJC&\Gg]7@Kf6XVǮXֻL E4{3q[$}eWRzo?&bf2Q#p8gWk:dUZCR n5CAR}JRބbHyX C0$ǐg;͟)}ڋ]y0-a%cg\3ܘ=B is$? gpo kST,8?@)IZfv&=S((ɫAJ!Jw媂 }NAQA%Ab%Up{ ߽I*Ac(B}"%DN"w   ( ]ʃ&( Py2W*AQA%AADɲPtzocTkߥGx!C0t⻟" UakMTˇ_\//:P5łp'=%5ݜL, Ȏa(ǔ׷|ށUev,a 0. ']^t '3¤>lȌ <rcқF3y7Է.o8.-®Lnŗ##rt}AyQJ!t7$W]D~/DK;Y]iMπ}}CCiz/my{^z6R;~圅dFdJnԭ}{wI ?~}:D;," ͉R弜7k>\AU;Ҟiqr䭯kQhjQ1^s8H/BDP\fsgXՙM]7`ţ‰1N,ZB\_:֏f~livY2榧?>άn[Cm6[TAJ  _xx7MS;|{3=zpvd>[NN3e.T٥* Lee~|!'ct 3ћW#껶Ƶ?nͣ@ϱ'z86E M hJ+@uR.q"-T]<֡ &U /`'NLFiϜQd@ת@嵿hƉ?wz? f=k}s.V a\%ȕsq%#r#ᷱ87.*K'I7@\*~Uj٣?:16˓+Mm+8n֋o2)?\_=Uu<Ѡڨ]|Մ?ZaKSuPcD6U<0toaJq뺕R{> xIpyJf%aoh2t$Y]#j47 ɠlR1M H}[,~"$%{,4s\s/ qWIQ?.޸B}pNOshCO\(OѦKA@sv6lyzFdvG }^A..q{;^h{4:|/3.M8̊g#<3HƐ?ρNҲe]}PWt'{b,3[Sj5p#c&+hR nTq3<'NSrxѶC%߶Cyn%A<%0c4422qS'4>b.5s wk/LÓmͼz;}Q/!ViA3~[9Ա@7[Ǜح EqsP<^θӈ8+'ra8.+wУ?:AA?Q'Rvq!ԒR{&[l剣s I ` $*gbg#WSAٟ{RΟ '5]}t/f,TEQxqpb直~^WAD)w.TI!'04kAf8*z#ҹq ёjH Xo#)OciIX4:/.z̰_SD8ԦVϡ9ΣG]NöPi?؟XyiiS=OxF1+nŜ#.5 6ʹu55)RzV]P?d$]=/jοPohHATbHN*ϣ?qv< "L qxCr^m 3k6p֒s`ە֏"o<ǓZޕ4Zv]jpe\vx&QKss,<}.'u5^!=?'U2n$秩Ƈ|صf >Q <܅[4 mlmyiGT @4#llme "Jee<:çѯ\Qi*jz'rY|h?g#D) t;{3iآ-7;{GF,)

r>]Ph5f2cƇh5r"B%NCu aŜO"Q7']>X^ ItnE{vlt3ֵ&76[ЦuKƍ%E =< KF)plxuTM!t7ރC)5cü{օg.uiy*Awƪb! T>QW&1 };k^tfgVym>SOuxbOcҿ|e!O6Ci=s!nK_E}Is;YBq,v U㓓ńG>g_6ʋ^呮r2r0,d<=?̜B΢) 9Iӥ dLIx~#]W0c?C _jEآ[p+'6&kpTFwom-η;oA ݣgL泅T41^9Oހ{ '<#曤MñJ"Kmh,=dv#!.P OAQ*+R393NjgHDy=g5 M$فoW[KNt?՜eۗ|ZpޤJ7/ܴꌊCL,y{&J+AE) T#o?uÜ<D|fyz(bb <-5L{\ף.;Y9{.{$h죬{gGSJ(xxXAO6+#B;J>|bH%n6g-&ĭ;-j4me^HڐF͝*sMi8l6mt}D_I (Z>s@-mi~_ |0=[>E&;~-;AY5π>թj~=uI\|E^b,V K^f [;#=`:]ɺqkg+P@O0sS!nD_;fݱgBBsSWH2bAP. UkE GIWjȫH= .*T rzyFriϞ==%A_"Wм:!i<~q65) mnd'T T:Νoa8qKP( ;&A;wɓ'c0RAP#B2qDASASSAQ;d4 "JߐJAQYCA0ltADAADIA=̽uW+Ҩ (D#_m $TXJ AQ*zAFAADI8::2o42A\7[.x.1b|QAq{ۧߥGx! b~Z3>C̘!Z\PiDIPzycC>q1ӣ=tkMI1ItnEݞ)3/Lr4;~ƣuh7nmZM떌7JF 48{x@SZ+Kj [!vmOvJM0ur]/tJP_-&2BA| jcLbv0vL_׼6i.%F?5&y$~}N;iĞ^Bld{C&nw:AX''Ӌ яv |Ͼl:rbr8d^| -_~Q٥hMgE~HVx9Ht}kqB2fIm}ۇfdcgˤKAQ2&p$<+tR!ޯPR{"lT- ҊU58TV]ds7䶈^Ѩ`~=8`2-Lj 2xT /dKހ{ '<#曤Mñ3thCf=FLH ;G=SADʊ#kL|$j댓E0op#īy"Q~y&\d @‘6~?MsMα%+$K%>Yɫ9~ڍf>[8sloi 7mS|bH%n6g-&ĭ;-j4mO%ѿ'z"QjC5w*sMi8l6mt}D_I (Z>.F6:aT P:#AA9Je $9TUCpL;'ADxur6ԋ:j$u{&>S …HLlѣ8:.GkASYD[m /Ozvܟ 8Ap @3c /3#h+̦ **[[o%%Bb;+/?2tYCzLŁ]]ڿ*kHUbw5׃}fm~/;7v u<6iN/&F?5>H_YȓP}A`ĤwSuQ yaN+R6cW V~4Xz |zYIFVpF_av DJ&J`H+}~¡Zj* (Ui6l }kͬNųrǓ=zpvd>[NN3e.`"Z{owDsUٮ l'i0Ne/'gKhfK%ũݻsbq{HU@qC6z_Ʊ, +p3?B,@5 M$فoW[3Ssh7h(-"2@Fdӏ/WW?mQ|r]<+!J~x+Vg-< D$9SSiddj_a݆5̯Nuw3|ELq{<[KiNΈJ8JTaJm;I@~ZL8e-8r_~+ SįQkoS)/Y phz"Qj=9?}|]Ǧ@N\RjגQI'#C>_'/\l,T hxSTp;#/Ȍbㄣ- j:QQ,}(JLNgK?ܫSC<1+ z6uZ-ƵC! 0[ IDAT muZ=ۗZ C2Iٸo3vdC(}x#\5[Ej^toFF=k^jmK²;5SX #UTҢ>$WMg ȄTJ%6~^:.mZ^絀 ޲`-41ʋX6s[Aa`Qd>U/r&6M0ƿ=~[jA*v6ϟ9.&ǩӣT9WyUj+džvj4|Lڴnɱ'dҞ=%A_"Wм:!i<~q65) mnz)S>2B$PQӤ"Am$ ( 9TI YDJ% t?rhӣ4 "JߐJAQYCA0ltADAADIAQA%AADIADAyNI$P("GDf(ĄYy0\*A  $ "J   ( "J  $ ( ­" B>.cY>{ GH fھ҈}y.f@kGDADIn+{w< <&K92v?AtB:WR p}st˷i='z爷xzWԕ4уW%GԌ0Yʮ!$٬7 ynwL"`_ NBls/eH;G(&iNADI*}'UUQ *BoUE5QCeb$^EneJ:릲>=O9_l p66UD;ύaV\n48^W8, 0&h$W`sd{~wumr/yc>~jmPsv@:M:w:5slrYD97]`okTP'TPs6TRҳضREۻ(ꃏ㟙Gppp `=jKGKO<>>ZEQXQ`p}Br$}^ 73~󛙒O2_ ,\MP%qf<9t`v;7?:Q.h€YdN-%+Cq2[4q˷6} P_cu%m"-\z֒(D.4+hQb"uCg0P@Fw0P!]La4[]_DJ"g)cPw2C m'yDO~`@?0Ǽ-cop{>Iuҧ;4{{n<7O)=;2{ xTtNM=ZYD$r!:88Oi^/abg~1Oi5/~<1X$,60(/bǸg%ϊAu~(WAd׫H~Y6D\˰v*3;\BFjjj֜$dw`u40L%%ՎYceJKpl+EWmx \y-Y;dlg9(τ l})ӭ&'k+j>m-4;8eAc[rwGb(r@4m;6p= =8qHA*XuED2 % Wtj,u\%.: %?뺸i@Ɛ 颍Y9VD^w?Sp]4ܣ~F?2fla/%LJdxF;<։b;n! ( \p]((.egKOJ6V.;BQШG?"dsI#=WGS[7nQt C Z,>[ :8NvEA,00 0U{|Vqsp1?xc??=Ps""rn 8ˡ:Ne8Nh>x~qTi^/ab'.n72d h&-/r}E^[b"Z:+}QED {fϮ>Pr]@@i mBʱqGxX(Ys1MibzG s4>]'zH<{g`՗ ulVLs3{613zyCE cPiP' q0=&e%8bA""rZJi 0 ;Ķ,R3qP 6 4=x|DDDtΡd3 u]N>q4GF?2*ԅgPyޒy}W0?GEp, uC x:i,=ټyO4x}GZF1qDDǫ:͖-IJ:t6l /ݼ.HBQ>S0LS]u""!5>:СCyf6J""re 䓧h۶O=V3f ]J""r^&+7g?NDDΛgJ{"""gJ ""':KPj>`J_DD*U/H(}J_DD*=z u/ȼOJIwh HI?[CEDP(Hq;s].3%t3=u]-I0syūϽg|Uǭ]+ȥV瓎)H/CBSC4qIIsZ""UR3 vϗG׮PEDj={0rվPj~2ED.#&_BiÆ$&h \FRRR&曵,8Y:uR dddϲ~}wQB A?SL"5uH-{(&M<o^Rb*"R[mr/?&SF{7;7Z""YM(RU/m!""ޥty saZ""5ȅE y[3%nNOS ȥ B""RCBa*t?%Q((DDD$""R@֎Y*0S0Ry/V(yvr&Ry/Jw""Rc(DDD$""PKwh1_KZd'WҊe|1tnM#^\hi_f$_ > %=ly_ᳯaԍMQ]dE} /|+ݸ~+^y Uat `mRb^{x5Mc<^<׭^<[_+EEtjב&VQ+nj)Ih8gᨳ.Evgہ=RHԟvhѓZFa!2b- M2ޤu,du:, KW6VڵLZͧ~Ilϖ=8˺ظ+Mؼ([iW.vfݎ};\B6~-?TQCېF1hؤ~Jt.wE3xjM ^Ŷ,*ǑlƶPxxlqw2Ҧh:` =;Ak9tWuUuFFLy [ Kй9u5&`zu¥,\ߏKruqo :G-%(|>Y8 x|O}o0rН41ױaW䗄timoϪ4nڀ=It{jP?ɱQ#߽qL?ᘉC̚[ж+eBZA}gPX` aiV|BǑ\lL2u EXN'?kѝfY6k1] cRhzBw;4"ʁ Oµ~Ggyu?q:ujA?:NζcqʇWS@bXEHSaef?{?@(?7k6q}'Q}{-|s9;_z)h]{q-O~ζnWX>~M~DvqJDŽ4ؔIΑ--Ǻ#~NM?q>^QlZ1_-@>$Բi7вCKޞ9GRXbp)yE˦Ų]lv|^YMmtovSMsp>2,^1쏧c'U>fù1Y,|e8eW^u 7ܶB-Tde}gvs[Ms:ob~8?D 42}K)mbڂ~nBI.nprmD &ҬE2j]{Q)- պt0ѭgK{ cMdrf-ȑ=lE27Gxp I}߶[&rcу7 Oa7c ΍HOiD ަ!][5$EZ7b}L~s!ozvR4ǘd4-Vn=017ɝG` 8e[`=K(oVUIDATMٶEвNـcپ7yWZ=wsM&^p3M-[gk9"3bҿӞ!svÞ5_, Ħ3 #sġطkY;/`tuEݒCZyx{- l(E)s 2Fٿ'=ox=dR>~)H>qHJZkIދׁIPUOI {|1ڴG?ŻopfDžy+3bb"Wi}ѶC˓+&ù?pJ=D6lG':8SAx[ S4y'r.5܂`0hԓ4-+\{܀@.<0=Nj)xo ,!K^YAMhz57o˰;62{v4;{:0h3qD "T >1X$,60(~%DTkGvw@_2zthҋs0q`o. VOca|}^dܐث~|ܕwnL'ci>`)3UV`ƻ$#K.|c1Rw)(-*+c`̊=޳ۈ8uI[M7F#F\Ķ-@yK bXV&Iu^qzx}x><>ۇcϕRpdg_zSbn]żyգU %T:$\א{e╎í8u m绫01MNiűmL0v4x+3eüI?wuulƲ,>b.!^O+BI.Ni5pnm n *H01sr7_~EɝǏ*!ZTsy(]ʊ(+)`| {.wq\vl\_)((V0?" dVF\Pǃ GMY&xx}h#w+(rXhE IXD$ayx%":Vq?DDDJ"""'RY;T*o(Ӊ~*o\׵DDRҵDDFR(BIDDD$"" %ǝTuXZJ""P,IENDB`gsequencer-1.4.24/docs/images/ags_machine_properties-output.png0000644000175000017500000006705213246707333021661 00000000000000PNG  IHDRrMbKGD pHYs+tIME ZiTXtCommentCreated with GIMPd.e IDATxw|UۆMo$$$$zқ|HQ" ?`W!z %dwcS6ɶIx/9<̞gfgO &c<nk6  Lr*u4YQӼ 1'%EQ@QP`VZEټTF[*yqY-[$R5.VeJ~JS`{1vlc8?v9Ze+?NeYt=tto~Y]^ʲmn/cY1*kh[6c.MY JU(MټˏEb.e"~.[X8KEp\bbѶaz_4o:LgE5u 'L&}RO{g罹XVt?J`Qֲ .RFZw~_aOmvlW;;+%.نZ)cVZ)RsVʼnM&A6,QCJy[[쇕Wt?qz[ hVl">'s铃\=vbw2>IQUyD/tBceĖ`1 BSlV Zkf? )V۳?A)& cMhE*hbe,"6h #N EԞQb?+efាE ;6(َnk@Kkk%۱-%#)k>ArsQj>>>EkoΠYfti蚎khޘ|+zXq1XqghDgI1tbZwEܨ#jlQ9Pg'gV_SmKu%s_p]'34Ӵt M17iiR̝q6\6\V%C[;)W;tÜr6\֎>sgO֏QZZ.Nf͛Ѽqbc4M#;+[*AHg>d&]O$E; PUQkVXE͍n!;'UQ9(KR̍(]RYYkrFm4JYRNmYѭ8G6Ԫ[Ɗ)hu{^P앱vَPEWl8Cgܧm̓n%\T-Km3Ƃ@ac>to۔;'?bڶttrM>I =s)&T͓OO獛k.w uGi̗=&g۩F'V`|۴=xaos̭7KGsfsU=uxK9FjoFSm]՗צ ̑"$:֦$Tǟ(v\uKbg:M&5CNbԚcꬋ3ݾc,6ˡ2O1k^bKqG/fSU o^#opW -k/98KsŪi*r_A,dm6O5|}= R⢢GΘ^5PK>s2OGA|3w bMkɹv.EbB0ɓ/2 y/Cb4 ;0]ӲX'?. U6s ;3u /V*T:}>r$ `E>e['fqW/99MF@ !mP *YfaͿikyVqMftݎ_/^iy%Lul8Wkׁb]Ul\g] ׌."Cj"60 &Į]'1ui[d]"U NuۘQ {oAlA3NM׉JHCϞޝW~`ãy6ܙ bvњKNcUv]W*.i'Uf%sĈ|D,Kâ;v9h PiYYd䐙iԨ{>4ʄ P1ؐw4J*=E>b͢tm.m rkg:4G(:҄ν2U ijQ.tdg琑A1z>~.Ϫi|"b*<;pu] -^(65\U.] UB1wp6]lqgZHλ4E*];e$D}ii8>KaXα ίȬJ=[1gf6SJo,OwPD_RUPY-cr䡅3Y_WՇRނR>-P z}29yKǔ|ͫ~/~cod;xV$Yd4ԍDΝʒMNF8|qM&-څ7KD[?M,VZE:ʅ+g=@e8?)v۴Rũ;&vzʼnN}U5F:5@87̏ѫ\ŧ}Q#'sHKK2*֠F` 9)Il߾cNIjKFA3k PiQ/A_4*'2'׮$mrAwU cB\p YU'ݱD41C?ɍPjGn` iɟFc') "  )   TpTb . _IjM6c*݄Zھuxޠg5_e:vY *Iƺ\:|LSè>Z]~=cVU?7 (4zto 7K ְq  ՗ sZhϐ% 7@iy?h+|~v}:i~]םhe9ar͝BgSI_~#R9&97ኜRf_zg5}n` veYq(Q3|qsn,ͬOse:˰\z {q1 5/ux?F[Iu߿y%-nmѿiٛћj/mXzl|>^}/q,R37mx7%)=mgv2[m?}/F{hH=>96:-{vrWi.9LnxJƮt{byH+ێ\kQCWpo jZA}V=uZ@}k-߼o9RXPwS[;cgl<)gb΄}ԕ<\H'%?}XwFq7}ރlЎ߹@k/T=mw`3=K xc4tOtR^u}d{Q$`B ȃOr!6N_RQbwXoUsapn//Rmv[nVڟEH 5+Y>ȶN]'9,w0uQ-v/kyԯi6ȅ{ 1ӗUCߑ:`2 slp' DQ|*Mlo1::F2RPT b9e1Hɇ9Gpc"1 f~a]hd-]I\iSNG_l9ytG}`_&=rH8mcd @X?fʅ3d[ϩ~js Jwni:Su#&>Ծ'/EžS?JrT7{ঝ&e~/}t%*&#Խ3{ܓS=ě'sz!ϝ$mRέ;WCsmd<ĥ?'єc#kqgT9* e?t'RPβ xV4޸7h$ȱ٠JƑ 5p: c$w= J(<\*|nR/Sv7F*߹e"XlAJx4'p1"j;v-$~f2tMx!Iv-:D; EF%)^bwَɹcC t?՛\}pW\ љcd{XR%!BM=4 tn;ݦА:R8{./<=Q5)|wS@MB1T/ ,:VNdu.?KeNAVr&}o,stlwZ߹m0UJ,)ٲӅmPgj[F.{$:⮠ۨk;TRs jE,ƃG#QxzEbǦΫ5jCH e9Gc" c:|,jX L@xeW45أ_ h_}o)OA,m,ˡP)E=} x3#yqZ,ɼ qrY0G ?2+EyGR[Nb[1{8yP:'mmypy{~wKH'%_ɾgxWǵuUbێdXo]BȴiG^1#q~ "J3'8#"3.m+5qAi1znǿI8uo4gK.Y-&dJ.PQP )߈[IYZtDh0G)Lb~~w,s&B%]гmloc{z ǟ/nX^"qrL[Qdɢ69wyyU%Om_@I&rs7he,Z!.~?.o&I_|H{Ovk(gyߦ-g}I9)X/q{e"2ef4Ա_?I~^B ] )6/TٸtGG"qU0΅&T\ŵMMXĚjo:cA*I3s uo,!_x*7:rԆF/)mTT^Œa'BEiݺuyR5禔 ֤942y^jۿ+]._E^x`HdJJ~QOr#\ѱ/>)  \+yֿ6r,A*v3CqF2! ,   h uᆸTPB" #nf=An)>18_҆"qQA*CTh| ~~4h 5x+s{ο;[uUUXD0A*Ѵ p …3HO/݂\,G䚦 B#*C7ym<Ї Wi:bҴضn[cSX %;߽m|7GR W|Bf4{f<`8-45"9;r,wSM_0}?KȆ4 Tk)Hi A9$O>$Ǘָ1Lpg^޿ ǽ lrٓ83\C'@)t=WM#n]׈x*bD79?e q/"'|Aw7pـg6gH9x=jYZ8⫏r[)P0Oi\EÆr)!fa_lR'yLI\=x+;Rcĸw2kd]DZr/%b<7~چUG,ڷK`J9G깤o(J\u$d%bJwaTMAHg[׭ӴؑacqG+zy)a$g? ـR lO\氾}?8 IDATk~FNt}NW ,O³/i[/^B&;,.5P$R\#*ڦ{?ȥn*qfTjC!G BbJ{E4Nn_#';۩} i^uXu'ǨѤ: @ zFo"uђ?[H>.!x1w)Pu?Wic2읷._(,d}7 w:~ϓs`-).%ia#j :0&#ϵxa)&r~_JnI {8邃ɤ/x 0׮&E&" O8_vk#hZ~R<_BR!Rg9ZH)^HCH-iI豢uY"NSԢix?HSAD(ugB  ȳgi "",4AD4 gU- TM֭[ٓTŐ ۿIA)dyULޥɪ|b׶E/ s PYAMAA4҆{>X=\( FznPƭ}Q'"ì<t9 A*4 )HA*Tk}u,4O4ͯ;0P8ܖڡ^Υh g4Lj h!'qxVYi_qqא/ \=lݪfnsON%zwͦ_Yx7?G w1dE%L-9|,>ͬE1*>kp(>8 ^π hr`AKS8zw O>9$M=>I@0t2]H۷ujѾk^1GHȥmxH g:d 席/Rº< TA8|;]sf3b$xǁ`H;Cne~p0Z^| ݀jƒ x!l;[Xۙe,GPAi)fô wU57x'g,ҳp&2Za݄fkh# \;|l`zQx/թYgb iB]loNĝ'%9jWV?ER5\P  T`*]cq{FT<ŎMGM:ON&1=пYA-lMw+B;V ヨc'"+uZ3WŃjSj" c L84Cv{q&tֲF S|dς5#75u۬+{ֵC<6KA=Z[Ͳ}r PaD3Q.%3wE^ݸbccY`͒&yo?gU P6  ) ˵Yγ!| 4AADSA{t2[qyuϴ?&ʵ't/͏/z"'G"G=þS7J O^@jڒ-xOoV K: 'ELk+HeomjoLHy]ڇh."҃i|<Φ&8ףxSU pn,޿9ԟ gK6NG⑷927Q;"zϬx(cM!&Qwv2w̴(#k~,Zm_Yұ.7x+;3Q /qcbD~:ҤgHylݒy}XCwM@=o5|1a&;ah/OyG PѝHQm3m0kG2dR:};RtZ/Y>OfapZt3Sm1Ww-7c('/.ͺ'Mxnypoi4w O}Klӄߴ8-,s}lW<˒ | mJB '䒩v>0qpG:2o6oŒDNwbl3bkŲvruƵ-W JDD2wEk=5p0 |׽ҪYo$X;G1 R, \k4E{e ;. p$?|@;U3i?sxT5֝ZB`QJOo/uhEx^Do }[+8|7(f#]ito  M7Grb.ݛl`>6DH%MyuY4)Ax ۾7J ԱU89xҵԪnqA@B NjJnfv]of[Lu%b.Zb-P=$hVG p D-{Rp{' ,$@Sc5 Q2{C{slNt4~-R2?JĈן_ל9| L#ze2B)?2u(4u\HɁ[\8G'$\2}FoutqѓH%7isGOBQRgP vjRKȣAD$DZBˏIu4?ڒn h/'_F3k$o͘=1x 鿱l$w% =z*s-U zAu ^vVn|]p=mܝ_k]7UCQId\ \]jr(2t3|t)x^  j>]@)5\ T.mH(;sEAnJ?LxsVD<g5MwPLG\`n'0>%̥سZ-iLS)=D6_p0\ =_wzT|jgsa/l{g[ݳZ.;H]\SXDh9c1/<ʏ` D'w1)(^doy_&%U#;_.싦Rc(3ZƌúsC9|c%VMZ΂--' IJjh$ߧٳg©{ԠOXV\άYf\v| \-!ӬֻTcRU΋]=o 包dkwr)>W״HhsMBE0*U4UE.Y vɇ~(*ƵyB[,N_Bn2t#f UUM~zӧi$ED4K{md[򤧧J"N% PP2D9 )<E]lR?BNAOĽ% T.\%V%\4|Q%& AAAES"\;gW9ǂ UR4q=\c9AL4AADSAD4AADSAD4AADSAncn15 Usԥd\AYMc<#/=}amȸeO`>cٶ µv&MCQ` x{[VI0E3Έ*Ea,ڙ((^AQ43[oy BMd"3l4XQ"1[fⷭ%Ah(5ǠepiߏX:}6ވn TE4sIIAu4SDSO@t\3Ǚwut(unO;sYsZ# E`WDT@Bk3'm<~߰T~FhYcoM|gkרǹu=|x7R,zq98Bчfe}4rifoͷ9Xda^=&fQ6{0L躆T$=+i(+N躎@;?7ٓ^ⷬb۹`s  @OfbO u9Ư#]39f]3Fߺi2l Vdrl,=ށ;{\.lsV0O ϸ{\8=}:Wufle[&¾2w==zgo _/R{jbNGhAckh  )f6p3c`ec▮pw3Yz}ю !?lK3OГ7}'AZ@ {iWm]ct1ob27d&]|ZqgԴN#if}~m승Ln mq{&ofK?=:5jӳJvlOքlechk#;iYo!Ď'iG5q hZb5cdfu4]C_˚'Q%9W hM<0JjSص'7ǟ&H:-\5nL-UQsKWەfEkF;v٤X?\KѼY ;kq: J@OoHB8/v7SN̡mԓs:ay7TH_v> -{5˿O UZ4{nG^m3冇O..sroztڇf!+ٵtCE_ۗ,fcvNJ++DkKr zXʗb:v0&䮝7=LZeNtjͣ{8ozwF?M;4cXc#-_USU| "A4KM"L.{ide..R|P;d"݋5ѴMMܲ H =?\}џW vWP= ҩ^p߯}ˬKͯ&Mz۷|PlDR5у -;V݉,zFœz-> TP֭[Ij_ @1!uOX@3&'+d4 f׿ w`<^}TՀ<nb#M9[ʾ}3t#ً!ew0Ġ[=ޓ)Q ST6[ǽTtZ޼ڭ=:-[`r^ḼE:ݏ{gZޓSlߗQ=_n~Lkaߩzֹ}إl<y~G>Nrr[vKTU椂 i,I#0-q좂GOy|~vKcהX%4>͚CN 3( S/,OO na}`e?LI\˯B2s)'q4O?-GAa qaADӊ9͸i,!zgvIYhKf>Y',Ər,~}k0tGO#B]TԨߘ&=hܻ;uќ]:wE2GyMMq6,GN^ѝ嫎:X7s1?o Άl8/U#osƁ7Q;"zϬx(cM!&Qwv2w̴(#k~,Zm_Yұ.7Wl<ӂӈ(zLxɎ(ǽ0𶎄4G/R7v[d^S_d IDATh 2*ZYիWϬYd*F9|DE$vz6пc6#qjl>):ܗ,'30k-H:ʙݩ≫C1skP f&%|6ioZJi{GDp6+eɄ^6A%Ex!{rԠtχiܑN?M[=y:n;ی1<22ə׶ \%+}G UϯK2dAADq4x/2FÑ4OXW_ϤIW >Ϗb͆0,j$;?Plf _>ъ'VpnQF&0Fo\Z5?z7i, ~}@5m^{փK1liRQ/qhI}o\ߗc+ޫprkթU4Q v<Ԕ$2̀+'11QFA,f~˞C4 E?4-.*-ذNCT;B^:4} F8ewO1+'5s%=ӈ{Laʏ̀.J+tx4vr~/&Na= * WLmdvW墧Nپ"MQDFFvm-Ij"i@ޤGK 5 |9SUU:`:^q }]*ϑ+ -?},A;aY nj1.9gy.^2cjp6#^Y0SFNٰ~p4NjR6mL[Lqf.Sێ;>:gfw BP=EDqEϣz睞gE C'(=Ԅݙy$(,v3Pw6}8ဘ.:QMi$4+bˢʏuv#;mTr#@Dn{$A^~DBCᬱd9v4kUFR81C},zr$n!w$;7 Z_Mk6ӦNvɷ71Z;ߏ[s*^H z &k:y{obWW,zn2=z>=Yɏ0=f4jgoWby]$e˗o됃S/' fi رs5!u}r/?%]B*L  ?AOΘcHMj*ml2Զ)$*ugݬ[:ģןfݘ?$QybF_ƪۅ>@r 37֑{!8;OMF'=+Ggy扚uCʾI4FNZݳ3gg1Aэe(6=P4v1py DL_%j3X :7ҟU5)/~GIz^~;;u?i>5Uo}w1,ľU8i*״ C9i-(ql̢m)t/[W ǔ?bFgsԊ MXv(-pŧ*!2$sNvD7׺Z-).?f9-:2xSo㶁8?ˏOtulĮ9)G\E\8xqI+ಟQt"ٽ$ohFBT;vi^-%'3bDFlp:.gpw.Kip$oƱ^?4)}z5H¤3E?lc~t?HDv`ߏme"-Ǎ78׃c۔4ML01vz<$QGrXefeƿWyD!eZ=|e2Cr,']p_Bt nxe~Akٓ^gx#ʏ$Fv mw׼Bk}9GkQ $ƿ{Vg8o> ؖBlmp~jz4;xzLӅa.7A!x_62&#Chس3'V~S4 [_{EDJJU>>Mzp~NOcuUܭgoy ̶(.1\,""?3:WDD(Bu~T9i(""")""h("""(""")""h(""")""")""h(""")""")""h(""")""h)""h(""")""h("""h(""")""h("""h(""")""h("""(""")""h("""(""")""h(""")""")""h(""")""h)""h(""")""h)""h(""")""h("""h(""")""h("""h(""")""h("""(""")""h(""")""")""h(""")""")""h(""")""h)""h(""")""h("""h(""")""h("""h(""")""h("""(""")""h("""(""")""h(""")""")""h(""")""h)""h(""")""h)""h(""")""h("""h(""")""h("""h(""")""h("""("""HrkDD|4&#[904~ӾΤI)""I*w^Ӂ@"""h("""giyio>LSDD̆ ~ʺW^9R4ED8&=BllKZl#<¤I&wݥh fgh֬< ˖3dX)""r|ųddફСӿ $""ݻ79k)""\*{jB#$""QWM&@GNF'M2pGTawݘ4ɨ~(;U7 ""'7&#g既}"""UM&M*]iŤ&>S^zITO2d4nwqǓK۶={у*""Ug x//-ZSpsٷ3WgN`㚵np8~,eÁ܃ǽ5~.9 xNwEF탵h,*)ݹnsF ĂE8%II>veK<,7qhPq٦ Vkؕ6^~Uucͳ"ngŒ"UQ~D&l1 acҢa7%<ȓ4sKYTЕe3Y_x ; 7 Exz4yJ7s ٙ|g$kz[E3ze:q1l؞m;)[sY5a{.gݖνٽ??qJylgSxb좨&ڢůpz[ f q;ߏ~L˲,C)Rf,E:"1k~HߵADGI64vg%Oq%l?2OӏxgR%- (ˁm9<y{|̕dSM^~lg9X6n)-c6B<`Yc;`BνSq2e"j{vڄ!Ž1We 5exNjql,;9VpV f䨙Ga&;ƀߵVgm m,֨8M>+tG!8{0U6<+B+hԲL? j_huo~Jle9Xm)iJ:=ڬ>ȕ_îhR:4;fi0B/{ ɳ~?mc?ox(+,Y#=9>]cP5TЊER|,Q5j`N$blpc{M Y|@ӐބX4v ܚBV/]ѧ,3o]Eën],3ofl_9+vCd:={Dcسw';7~O_#cKվEgEF Iһxi %;6̣o6|Lzvy^$ p82-c6.p@.'`VTK: S^~,W|R>aZŴgi4oM`otkہ_+[""BUi]ѬecW| xۜOзw2a'.&r>dz]ۜ0 &o9K`piЉﰻd#"#g~f/_eߜ;\~5]^excn[W?MQg޵1LDÞd+M I׾ww߳5F[|E߲`ֹ^^;fΝAW b:\_jjn=zWX#%_M30]@Ǩĸ0۽v/l1KJ.K(·3zDԉg`}}%X~_}v Ȇ]Yb BCB{`= [9XXB0k{7 9DP )rb! #I<_).;y4 ."|%Ł/?Dh y LGCi\ ǶS|<:uNMZ .! w?R|_I wӞ1w|BBB<f 0Xk_n753QzOy>M +gۮFodkN:oOAtINQ{ 41].LӅY}z+3#L/?淺WK>/)I}X>~Nöұwrq=\.˃mYx.ׅ6 BZa߲o5wuLAWѿse_.'fPP-_S4ENxWRb;/ v q0]`8ewqC+4LLĮ"4qL15- q0 /_Ը 3^xua)̘3.s6v˲Ln:\tEnq^&n3~̔]R'Ϡ4aFgr7w9o/Y30/fѼ*Cٱq~cc[6Vs,±SE+74LOFES+j#0ctaKq<&p=hS90^/o0o0/+)=x7$P\.eB@\nB# `ڞ$""h]<+1[MS5o׹gEDDNL9)""h("""yiVf4U"Tdz8pHdz1*JZ_Ԥb:65*%а,U=X1gpZc\ 1@ a2Α~zrΗz͗s<[ Mijz-qY7s- 4L-}GSX7oߨI2BG4xSkFi)&IF?hM}8& *NTB ]9m6,jQ|olޱH-QԽKc%l0j+gs4/zW~>J-VyފMzfO֙ *wkqZE}x|d/mJ?QdIqr_e۲UnD9KcҎz\}uݺQ;iDe`QR[S\:8(J+_R1fkwkT ,A￲N'hъ} :Ӵ/ K*;sӯeJUNC#kU}di"gӫG3CE \T|pCvsTT9Wɿ,2~-"wp]7ez^أ,#Nڒz|׌O klhwڶBYVhަQQJYupʾV\wm/4:,VMh#UdGco\%33M3Hg0b:m2uӦ:4ݪ-W1I2,8"CMdcP72tw4eJK ',٩~5Z> T.6G7uC 蝗56{ @CGQOUfS)5߮ѯ4?ikAGL9Z(o[vpU=r@W^1.ֿ^*jVKqG%bz@׌LМ{d[m7Od*-yc,}IYӉP Y(L}B|̪:[M嗖G>%,ۨa&7vSuf:Xo? qR =gݧL4LmH罠LֵO\!gq$Dݮu۩YcI+ZY*PJ zjf]=舖?I_%ELK$=Uǔ ˿U{FBTVjy~P!uyStyLkPfF}ϵC'jʻ̼Yzƣ*8V*jskk)}Ƶ*MW*jX;LԔoWlZeϯ꽠st jZh/g33Nj ,+C :UFw>_{Ts7sIYVɵ%MSISe7ُR;Z-7SyjsX6<ک[ty`j}ʱRx4?TXe81@JUU cpm01@K[]B> LR\F9Nvd';Nvdb7f}'?H4ޮ}X?e~tKKu}.[ȯ2ѷ}<p)ߪ+C~ ~KQ׶̟/8\;AUWYשXe8UBo]~.[t,k6-zYK6xrcޯMц3x}Q &벑>,DKiErR+2o|5H~S;¯]*t*~mϟ8+' (4ȪǏhuJj_WDO 7[yO-y1m[:_A_=w_&7M.іyŇ Z_Gyb>TͷOq|'[7fׁjmV|!>^<M}3~-^o v= q„We7Ӹ,*,6z<}v7UMw4k؅ LܥڗL:khbVڥ߾T֮GR;}X٩˵u =@aSk>ҪL9*~ub%-Sy9{9`_ vtޔ衋.?O"zwzwzwzwzwzwzOS1@M'1vjKJa5omU=*eU5ъU>4~RSt|UGNmw4 UTW6Jmu1i_bs:9o(RC|PWs>KR$ ;;;;;;{T/VnƉ/\ KV Mǿtw(lm.(oݷիfEǪ}b(U o~-bˣK^/B'?W+=w{ L3ZMϖ+-#SGrsV 0Ũk .8i|v0y. ^カP{Lzwzwzwzwzwzwz__ng~X}4U{wRԮH պ/5'S֎B>B5U狞Z+W iTjVmko:$Tm;D)m 5 Rj8[;N;_TҲuRp;;;;;;ӻx1I?]|?tqƒ۵i&I>|Wgp.[1>NuL м[5g4,O%yڿm[(Ϻg'hh5Gk_M&bۻ|ZkzVOo%NYھ]z_vg]Cߔ{ 6@ gd';Nvd';NvObUł•SY:؝}`~R!O^ס#_R}t{iÏߦ:+4˗Z4_weuRR>|~y(oSg{YÝid';Nvd';=%;NU. Qajn?W]O5ԤKLUCMd';Nvd';)ZX_j8 *_U֔rY^vCf;n$;Nvd';NvSѠcF 0S͜UG htcz0sPIm*=|^}2nڪ򊇬uOC";Nvd';NvCnXһ?E} Ud֣nT<;M6R:z+Wpb MX zۧNvd';NvNˌӽ/wd';Nv0ޞzA˝d';NvdK˗-d5^;Nvd';5ܴ9Q}O=7>T4ct]Bv{c+7;+Nvd';NvWqrmbݩeT7mNe]cEE^wNvod';Nv\'uYjcT+$Y 󕟕a pq{eee^{2NvoyVKd';NvdPkKF`֘;w Imc p pߪMUv eYN;۱BgoM۲P_ϡ@.yߺ|d'7e!TZMUݮ*[N ~l d'e,5U94(Icz8tq{Nvo9<,>a}UË utn<@Kth2}{ڐSV盪VYBv{[vSښ;{f>;jC!ս-5'O/ s>PZyE!17!@۲JYeYUlv< 裭۵@jRZNjA=WYDv{[vSinuqFъj]boÁNZ令jwkd'ex-LF 6ё)(0XڞoBFAϻ3۲ی2e:";ٽ-;[9nv(Wfخ5SR'2+Qe쓵Sjoϻ5۲VUjY=ɡ;Qg+U:41?CQ~֜V*ܧ_mԥNojšs8u>TH=oݯ5tj۲jvIB}tWtV~k( $F]n#SΖWjɚ0z./աk΂J+VP_Vgdgf$'(rU.LU,Xee(#9Aq9T[W˯P<z˲2N8}+ދd߫,:>(IsgϬ5E]dR ^Tm.9w9b׻@Ca n÷k]&;0QignJٞďXISO^>BO㲓Gv{[v\11=:ظZ_aypn)ۓ:=䑝ޖWsx sL <6cOmp56gυTޖWT ۨXe]UhHmTE2PcH[p'dSؐ!k";8V`M V)ۓ:ڛEjA<۲jvy#;ٽ-;6g"ծDv{[v\*Tvu۰T ۨtuۋw_4d FUjY=ɡ;cOmp5;pc<䑝ޖWA1@w5^[px PΞYE pHv{[v\)wt4k ";& nb;wXe]UhHN`]/}.";0S'9tc'z#;ٽ-;`@xlǞ<۲jm8<(IsgϬׇ &;ٽ-;dA1@!0Qiv7Аۨtue Л/Mva n÷k]=ɡ;cOmp5;pc<䑝ޖWc n1@I;{f>\H5mpJ;wSn301@Wz^[qn1^[Xed';pKVxltj?qd'e!{ ЯPd{ Lee4gp9/;DX4 C㯨:x{{?u]KNNNNx`ċrz?$iAkޚt6;;;;;;ӻm z743Aw;ueb7Pi~qʙc@M` nAXkƏʘ5[W%P|B#mZOv^Mk0EO09uM$LFSś#Oi0 u]l>)UG}.tW+*p?xNNNNNNYgmb7]Ly_I7>) \Ʊ,ΜWFg$5n?*q =Sxr%-nԦ5]+_Ulb0+]{_,)==w.VU,X/\9 O^БN{įn PoJnPڴZ#G/|Ww2DR&i@նV>=wZuzpGFKݍ{o\צ*#4;ukDZ4Ac=w4ZPVe@qBSd&rPVjbQɱB;;;;;;ӻg4Wnvjă:ttm)C^fͥ}:b-S?Ab_^Xfe?h- 4DQm[[>}w+ݣzb(sz~O-RcRPWĿW}t5jeM[D-QXmb}Ӻ$>m;;;;;;ӻg4֎n*A1\/ W[Jȥ֥s:55=w~Tٺ Y `  cpmV쮚&BN/s;K/sXe8嬅wsL>axTqrNGz<;9ywzw%<6HNP主Uuu/HNPxlg sh}ISOJxV pp}|yIENDB`gsequencer-1.4.24/docs/images/AGS_iterator.png0000644000175000017500000005035613246707333016133 00000000000000PNG  IHDR$HTbKGD IDATxy@'܈E" g[mՂzջGZz_֣_jK jCPQA+ !!m&~evv|2 /^eggVUU2󘘘ps\b]Rӧ/^0z`bboL6-::ZGGpdb~عsgii)B 6,44400Ą0޽{W\ξ~:~Ϙ1CWW0iFffh...;v쨬d:(rNNN\pd{9˗/ǍWW_~E"0Z";裏B!AjjjF_~}{{;=>CEDD0Ml#(.]ԯ_?А!C#766ߟv}rW'GeffɧnWTTwyzz޾}o?yobQcڪ܊ޞZ&ϟ#^T*-**>}/"իWGM{%:ã|k֬OٳO?tOxtttp@ ۸N)J& ~d[YY!jkkX&KG{{;BH__V"fffxPw&$$֊ZEok,tȊhРAtfA"q8H2|g"R)8qӧ"bաxMII Ĥrܹ 9Ν;/Dݹs/ss))) 1118=66v˗/K%qkL.^}UPbbRJKOO0a322rvv^h:ڽ{7<}Aw^9ɓdU꽶z7KKK.Dw^OOOCCCU͝;?ח fBcƌQVd֭C-^@Ǽy٣ogggU! .D}紝NƌJJJJL RSSq,-[ɓ˗?^%wD"IJJB6@r}cM5 !hFvP(C͜9Xӧ# elsMcccЗ_~t,ή]BMMdS/LGƈD RRR>@.r<Ԑ!C>tPjF[[ۡC<==e;vlUUA UR'Sy̙ڳ_Ϩg̘A>vIbA=D"ǿk׮6`gbbbhhl"^xQWWWUUUZZZVVF-[6qD}}}fdܹsɓW\bll; 4pd-" xzFә21dzwssssszLMC}L5&9Ӂ1{(M,Mqpp􌋋kll)L2 3~x{{{؁700 u211YdIuu5d#v4 MLLVXANCtRP($s̑\z5C{Ն[n :T$ɤN>}ڵB?ٵkLf.{…n (ŝwVP hhhM666f1Hٶm[CCCww==777wwtT*%w{yLMM,--k}9-CbffN皙۷[r\.Ȩ7%XXXg*}}}SS`bbB]oߎHٶm֭ LLL{JSShp8xnQfff]7]GGquPD"njj5bĈk׮ɋpΞ=Xhl͍<ˈ#BCCnjl*XII yk"<"޸qGA<XrG$[l)//G3NKKKKK?x*dc4{H$駟6o\QQq Dr\Ol @`HSNݸqctOul4JtxdS!gxdS2$"@)mL,3ٳԹ!8v z6 p8!!!~!5Uoi`]*^zz:u6Up냃ɹhIPLLY=d{ XABH$mCCv@`ddI~_~ߟ<.QW6K.LJ5D")(( ?r~1dH$QF-]tҤI!!!!!!gΜ)..p8dCnM2EfCv%JWZU\\ysM>ŋp??7FGGizٺ[XX9x{]xN_hV}:jԨ ̙!PxQ>?a„W^yX8| _Օ,X@===׮]J6lptt6mիW7olff)ι|#3\(:::uϟS'Rza|}};:vСC|T*ݴiլYȕ\ÇmllLB% BJgϞ=[`y[,{yy{򺺺iӦ-_紷?y@ ={6Aׯ_WtO'O䀮V0m4===D'&&4!Ӡ#r0<6,,… 2r[n999´^_ )hS~~㭭Ϝ9O<)C?3f^ u'OOϿKQDę3g>Ǐ#${EEl0|{f# ,3gNIIP(,,,鱱n] dχyoٲLc/ ׯ?VH${444ILL?A222uuukÆ ~vH aܹp8Çg:!,^! MJ7nׯ]vvv{{;AHD*޼y3++xT$ >|xXXXDD'dS:9,,,(($33H*] {Nyy9<##L rqqܜ~:U<|Thh(u3@ `("@>~ذa9N\#SSSh!T__?hРj"qqqqqqdz 6ϟ D >쳨>|0""bڵ* U4,jj-UVmٲꚔ4dPQQKKK@Wl:# !!!{ %\n}}=>@ xmmm?iabe!DT:njRŃ3b]XXڛfCj0QE'wނf͚#G OqF.ljB@0Qx2UN8u//;v ㋊B'))מ={w%''#VXqmD7BCݲe]LLݻwPq8SI!,… ϟ/**"_ uvv355.ILOO]>j@u.wK.M8J&r''}ݿ_mmmI444looFFF8!$Je6]8!BnPQS0FFF\ !>N a!555ǏљcݺuB쬬̂XҥK;Bz6|||:$SKRIRS3==!D.pcmm}\ǏB7nՕ) !D~I!A,_v-333+++''5x`XlmmݧOXL*Css3~G$H:@(hS߭d۴[.**  6,>>?=ܼy5a a22ٶnjbbh"2ϊ+6Ay{{&L0lԽtR`3i$KKK;eܹ <`:Lbڵ 6wimmtRNNNnn !===__ߨ#F5‚8{:v!*Dr |SSS]...^GDDPWfeknܸ?Wfd'}$'^~~~~~>Du ߎ+Mf=՚ FEcei$ N4U0*Z'YA0*Z-M0* [xEg`ls@a@C: m P) M=ЌT!.^炍1"444::" Mx m`1 S`U1 R%@6扌0a _577ggg m H|~xxxXX/))"Oz'D j;l˗/;::9Bc^^^Wljj:}ʕ+:d?~t… B٘7ˈ~뭷H$7ntrrx3glii9:D@Ƃ B~-$b˫ ݻwGFFM6m8ɓ'Aeeٳ?B IDATo/G߿Iz={7BСCsvvxv:uΩW]]ٳ>|X(<ٵĠHb-l '$$lذYYYp89qbbbFFٳgɹ1I,^GP~~eT" ?@6s8l^ϟ?/g͚}vAf{ٜ9s|/ Xǂ ̙SRR" cbbpzll[<:::666ӦMstt\fMUUYD={ 4.VAd޽>>>84h_FFA" >=='Ő<==ۼzjf^@>@:tHZ^}UE{uuuHgH<|ahF1QQQ&LP7ݻ-!בdS'ݻG..+_C?T3@3 :1|pӧ?~\366޺u+5lڴi(dS3֭[*.._ĄΘ1ܜ(ԌH]TT4yC╵Bg޽xyXȦ~'1'NR߬YBQQQߵ!zvZZZZZ9U":::IXŚoTQ@@kרӧO/֯_e˖_Wѳsrro߮x^O0A___$M6  111a::AQn(fXb> dyiUU"ʪŋ/^ܲe >1E+9"e1B>]GGgРASLuN-[aeWQ^^IIIknn>o޼ 6p\2ᅅ*dc/չiiiΝ>Cֿ9svR@6vH>}VUU}7^zٝk&xiii999W^T }{w܉ͽt;^o"׿JNNV'ٔHuu5 7;Y"e윟O`gg^\H Fm5hx:Bڌ?m[nD|?<ٳ0,Ԧfsss^^n_~æfhhyYLԛS PIj>"mbFSSxcǎE={{ج_+(eȬEX& jkkt++#GFDDڱcB(>>!N:|r IHH(**9ˑߐ/egg?>++͛}\.788ϹD󰡮0vؔK%ޗ#Bt166~7FFK)++{W (++)EEEOnڴ qljرVVVVVV8-++^cۼDϺׯ_ߕGBRdt=R !⹺KRСCԚ !7߼{NDŲ+W ҥKmmm8]GGQFYYY1g'=Φ8p`ҤI aoo?iҤPWfԛ\7o|===lZxqoD"ѵk׶m6n8' \\\Ν{ĉ*'55UVJ%%%:r=k99916"oW|…&r a0ȞuQEղQAK2zσl)- -##d{ gb3fڟZ F%"""33 [7H$oA,;;ܥmQ zy`#FKXX؅ @6%@/--:E#ŨQ/\)MO"ܸqsFݿd'#G dS!.BCCssssrr@6xcǎ8p A"L1ŋ 74^ Q9w\BBB.]tEaÇ_|ҥK PxSSSKx~,'888// K\1NPPЕ+W@65+EGG€`_zʕ+ !333[ZZ]1bDUUUNNLzXXXxxxXXQk5 & ]݁`%00ڵkW^4XfrqqC@@@~~kX=u􂂂B` ;Ȧ9 2D@6V7ߐ~x&lٲe׮]xnLH{-[4SSS` + =vBرcCRtӦMVVVf"kt.taҌtuuefMOOonnBh$[,{yy{򺺺iӦ-_紷?y@ ={v{{JR4333Pcc#dҤI.!tMyN:}iӦ?===o߾>>Ԫ/// b:mz  R499y 6`qq1t ̙3D([nD"ȑ#'L@Ks$ݔ)S gKF4xb~cƍ8z+++O?mۖ%aѢE,\P e%KkDccgD%mKj}vII 4#5 6ȯ8}NLCQ[xx3={6$$dȑ,_X\3 Gm θq$''|K"{.|iFFFq+VMKK 7nܕ+WpʺuZj6C*ߟLILL>>>Pц+B>4gS&%%jN0޽gJNNvrrzٓ'O:i``ԫ\.Ȩg1XZZ0^077zzz䠶bbbڕ...s]?444**ߟlM<!TRRf͚$ۑ ~;<<:j(_ZiC|ԩ]vݻ bd Huu5^RCF>}uQ0ylllm۶t۷8p+JKK+((T G8qbܹ>}7n۶m׮]SӟK,122)**"ӧ'NXdɰaèDEE[.55]Yh֭C[qÇܹs'{YugϞ}Ϟ=dҳp󵠠|W@Ge6lXn뻒=f$M0.}n۶Z*R۷I&Mz HcF]Ϗd-@6UA ZQQADuo|>#QW8Θ1cΞ=Kmnq8fs*&88XMSDw g:j&QWBVVV C`|>?**JSDW355 f5G47A\\m\\@ Pnz<=#YTTGWxI?' - tO>gϞlA?> [d}YTTÇ>|vޟ%'^we3o*cS&d+We]\\vaakB )Ǐkxݕ!TSS6,;;hdd'Ȩ%WWW`tuW67|LwB0''gƌ͇~7ޅ 8x><y줲2!!!,,L]aee[o=z^f)Bm۶LԳZ[[Baw0АZ92,,,<<߿g ÑJ6o_H$бc݋:}4mظظ7 ?B]"rE". _&;)//UÇ>}R>k$Eo:uM>C򼽽E%0"idl\.! V zsU_HEO31f$mmm/H<~/*L#?MTȦ4F=|0u\|3,AGH$8:@P N+8lɉBϿYf:88,Xƍ!'CCCg͚8sLF^ ̙3D([nD"߾}w}O?D \x![o2r:H؆̍H${444ILL?A222p~K?pz4nu466" D]*2F-Fj:::~[ś!;8gt uVOw۷/#Mx۶mIk i&3g !5jdT8w}GD͝;FdX|||.\222z47oĉ2 EOjkϐ%@piyO>e:9-³gϘ:T6̓'OPvvvLZ6i\l:H&@6 hd&@6 hd&@6`1d'blfc|lxcɒ%^33Y[[?nmm]WWfkkD'߼ys>}H3wC:)B;gD&_.YBBD"3wC:/AݚΝ;!BfDflxQ 6mdee!o߾}-..&HWW 2=z4(((((@-A avmРAA\Ǐ?ɉznݚ)JB^^^[o;dgbbH$"W>eʔ\]]݌ E;,A :f$Xb)y?y晙Uq J!a Խt^0rOUݺu !4x`Z~يBC ! * hd&@6 T'*@ 4MPeӺUlfΜtղf:@R~CP8|}}0 iIa&&&ZzYth2!dhht B fގ222b:!MZdɓ'OȔk6X0;>d_SSg555!믿vwwacfԞUVxbӦM{lذiɒ%K.e:RmDK{#5Ck)))555˖-C=zɩYv aj)Ќ4VZEnoդigf&2d4FhM 4jF%00pĉ4lo.uVdMYbLرc###lɌ3?utt6o`<4CCŋ3@6 ffff!72i.sE͛7ŅpmAYQQt*_~&BIDAT&&Ga:+ 6(:CKeoW - j*ˆ:0NNNLG|x9ǚN L<(޲}v5 :H@l@ 4Ml@ 4Ml TqNʔyJ O3fsF7Xu`9 Bh6|ڭ.m޼O>ۅ_yߋ8G9rDQlOge:uM>]5XԔ|c)*+  O$s0R=z!4e{{{.$b;BaK9xQ~'ԩS кix팆iii_t!svBX,VVQtU6m Ml@ ʡv lB 4MhƧO2[ZZZKhls  hl}e: SSSccccQ9fffLT}?tPuLKKɓpdddAAi׮]766d+! ~p4Tz!sssСC>|tD*d!ww[n1s!C ʘG@o?xypppyyyppٳgǎ{77˗//!"w)//Ν;w. tĉbT?6oޜ=`D333",,,gffnݺpT4# Jϟ??j(FΟ?{u///Q>PիW?LcDxcQ P!ХKBBB,,,4 :quumjj|rPP(Bh߾}EibccpBE@͆ZZZlllbqyyp8t[555ƪ>@͆ۃ46֖t,JdCYYY!Vhll=<<Əƹ(..`pPHtt4Bd@ Bw߭=}tCCÝ;wLqF%55^O@*PQQӁ(LJz,//t\.A&Q8[[[[[۸8@@ͼ}}ZYY-Z],SaH;:: ZYYرwKii)Bɉl B[?dxxܹssssDbNټysqqk׮]v-[P IMM-((y;w\œѣGw=̚-[ܽ{͛׮];{l^lӧBHfgMQYBH,s>壏>̽pqq)..ۅ. $jEw!cr񶫫+5-xr===zNG,,,hIĭ[vYSS,ӱrt 5!ikkpf͚5G{tOJy,--5rf$£˚ڳgυ \od~viiu/\fB(55W_}z_`E/ȆB%%%.<<ĉO>DW EPclٲG=zhٲeSNs{)S-]v[n!<<|Stuu\]]x<r=zTVVVZZ*HΟ?Μ9Z8,dR4///111;;;??_(2z```0lذQF?>((U^>G-IENDB`gsequencer-1.4.24/docs/images/ags_ramp_accelerations_dialog.png0000644000175000017500000004112513246707333021606 00000000000000PNG  IHDR(+ZbbKGD pHYs+tIME |iTXtCommentCreated with GIMPd.e IDATxwxUۇdB)ZJ"JS@)6vQQ vDT(*`CPtPCKH$;34p̙93sfo3H^FUdPTYFUbvS[԰~1YG'z,)*H8H !I!I'M56Ky%$:l+(WWutL׵m/7^&m;_UTU̷͟SfoMMR[UQ]rJE.6Kj/rGgȟ**$WU μ7:oU$Ra+!_VM=zmח,ͿXY2C)Ϣe HK^1JX1 6<+<rKXFr=zo?%,[v)8+\cv[-'1YQ Se+Ʀ ȺKvD,ƶSژv6H %^8 XϷYV* i10FB$ e9$!J%-[LH6ZXb#dK6}Mg?@LպU#P+^1FQE\H~>2i*{(fSQEر(;JVZydl"걱$m+aҬ$fXPŭSkV[P@f|1(D|2IkQX8.R{]XV\3rk Wb,Sz"3EfY<%,t_Vj.T@<ꢌ ԓ=zQj4P7Z/Ipptd3X5TܟUr\%bETTbLł`Eq%2FmYu"ˊu6֑]+͠F!,ΥIλ[QB r,+[2lW&d U-vkس.l-Kj" CZ8j)a{1&;ֈd?6jCT-|./Zh4`4恪fQ\qpЕ`A] J'ڵk5FFA#i@ yZ*ޚ33L#90p(܉i9c_| tc0&mWn 7^yk ѮA\ĩ+m$2%Kxpd\\\zw˖ NdrYPZ*L!Zpt:ZIA#iǾ{WdAI6֋dkebQIuQ=BzEYٵlX`\d-xjѪZm_i996[2hj32Ǩ o6yZa"W[2)OAw#̹x{$j4#9eHzec$7i_i=ѹm:3hJSsw0H |-7$-&bHPҸk3B W*{s7 y%Z~9{IM̄$ńEmhdMǶ<+gOp> 4(i9v!t`;3xw8C1i:g\t ~p '6)Or6E]P;3Im߸%ݺ6k %QZc]mBt8r,`Hēs>gV?U{ }.x@X89}:΄h!x⧋d (oؗiʧX058gB w=I>>=_|*.i#ӟ]–TNIc?|kǸ)S߉k@bӏGQR8gmMǩh1MG3ULsN]51܍/d $X'Ĭe[?p0[ts-b`nL>z+q(fZVcyI_qomf6emֿg^d搝#.B+AѠuЕhv 'HJa%6IPdIN"cTlCKuqgݖT:гlNI@Q,O9s]h\|ˌ`g{X܅~0חVXz):,*d%x-1bNY,]XLkҥL<W7WHrۧ^VT^g2]tu%&&'Ӿ}{2IOM4^%#&x Ii=wCS./ۑgI_IIdIRJدs1iއ3%ĂC] !TGu/I'׹^E T.ġOI[ߟszp7`̈́7OV,Tu4!C{q>ù˩|.l\s#;+%q)Sj%K0ed\ ҖbX 㶓 uCL!;;蘳l߱$OΔIG3)VKfRe$U_GAhԂ_{ "'T8OR#bBWd#M |x}C-\¯AR HjqC3&.l@*|%sj>ؑD뼻3%T@ߣ|`0g?Lײ?6Px{'~t/Dº[3ԸO"3, 8wC_x2dW[MӺbo;3xMM p>_3m1 ɲHhwIظY h۫/w4w%?,z~3_;&5goʿne.۹M?`*wsɾ$ԩSqww݃S_ј*ٝZ_u3<1u|S2{Dݺ>89;Dڸfvؼt(]V_zJ[VJ H%yJr=KO~pWc儇ePS*䭳Vi٫`zU^]e.k?2)~LCfnnVez舣$]Me3;`@UUz2Oϫ~ AL9;bcr]--vEB*jNg/iYhTF.aDw5IQeb;j ڑAva+6"WZ&5y{zGGQwwwIŌ6xO>_.|)X-~k_(a@PH~>j@VgRJq*PTREn`?am jsr-Vd˔:î{yǦ^/@ X͠:܉wYvE *l@@qZj׮ZPzUJWE J  حkD[$I43|9htOleՖr KSG_+~M-fP/vB數#xI "wlrZ_Ơ*O@ dXPʨD *JyaA *fZP%<ΗDW+qq0%T83I> "zXPE<5=['Z}Z0ZLMc8^׋_0w'T JMShݫH!G4xyON.&TS J%w:EJ6x/+N3}oGg^kOxS)+[d1cUJ ;ǹUO;qe]Fމ›-=YĤZwX˧?O%K u9CĜI#VFum7ri<|Ǧ[0__řz|q=v6{N<ޡ0)ۓ 8q,JbX䯕KٺnU:NT޿Oޡh=n˱G0Q8Z^s5laGoƃ3U.$b6DǦw>kp궸>:yp2W}6mBhA3dے~>-l7o M^o n[DǞJ]c 3Ǡ#8ũj̒|GкeN3>c u/kt Njj>} k䪒Y>%wжiqjWr-67Cի"m? n{z&?;z ܐQQ-(~ CzyGd?6n|h_ ^4rhq83e\ {Nxo i1/55 G,R1ɹ}$_JZYD4QFCy:Oɍ|c.>Bn'gWym#/uÂRɽ'0 ;"PB]e.(8abi^ kŦZ8xzv):REr{=8e7TFOCh@kze$çĦk|&w7^#Q\An^<?TioO5 I/-V^8wl-DPJ|J˓_t7J]:\zc~#O@Cl]1{w0r} q!iy[·IzupV/';Rx7"퉨h<9HkFDwk0a2Ȼ?D?9;N[^ ,OGa,z 7$ӦpX|8WLe-,TNKЀ{9/gŸ3Wyp.1'=a|CaD m=R7ۏ }5hF0zd=/X 2rTtQj(bX]:жe.a̟b/Zw C{ %P YbsT jm+ WSIܦ kQ==kvFq"Fdo=.tq7[I8u,ֹvp;bQ:^WI߻?B2ar?u-ψtT@rM$+RW퇷6$dW߷XTtrOAƠR.Z" ˀCh⇫^F;qՀSH|fg#_JBnde:TXLBS đSsXL3j>GZT(ytSytkZeW׆U'PS4\F'TZ$WQQQ2j-EBі*zM pR@Gw dFꁛICǗrd.>>:(H/>jXE$%%^! .5Zw=ƿnܥ20B?Fd\H!OзkKnyYYW| b2Qvi_H;<W67ʎgm߸?`%kj2vKg˻o2vnyIzL gHMO%$T~ʬ73;Kxn1MfoX3gs¿InvI~78{`?I7=lzI| StSR5̑#>6p @ IDATfڶmҩPsm|<=ңG? #u6hA&/:_EQDnU:%sDzCjMvv6/hzXPjGrrhժ 2+Ԏ E @U&Z"@Rv~'Y$n5@J(AtQEbM(-EXC 1J DbM(AD$iTu-"@TbZ]Mвĝ5>!}9gS8{=Jx|YF+ЯI$6jPN s$ _Kyw:1ҫjwn rS (Uw9^ -ڢe_ZUF(W_N5c/Ѧ[Y%ww>qDĚ TKܩfrr~OKG8B ̋„9f&5B $&; oJg_BSv)_6q1]XS \<;TĝOph_6M{ k\ݳ]Չ;o\\ THipi62Zoh"YUFA]yĝ,/tEbMpP]wb<}41ݛsuv3ٕF(\@Uĝ( vo#x6&bQ;o\ ų TyN5.m'2nrr4:S;obĚNLܩk9oqJ/z!qH)ĝ:u w`MF\."@Ġ>f;or 5ū%6,'.@ ,I4AB$ĝ"@T-F$@Uσ U`T \ZFmID*6 @ +- @ n)Tb@ % FB`T JKϗW`?Zyy| FK9:MM~1' I/-V^xJjq4qBB҉j3|ƈfNH;$᫗Gݏ2W[cǏu6t~4hGg\=)?JNMeqGNȠiD~80A׉¸Q~;cޗ 8t7l n uAȉf> 7$Ιbt~~b6<õ7PzŶBq"w kA$IIo0yt0ϘX0'.;䧯r>'&=ąal(H ^Ġ]T$fԖTKܩ񨋻zQ1ev9;R)uW<]#Hșؙ؎=c9߾ޝw8sl;zx.̾cI՝ndXġD#ٺd%qSXy)љ(Hݿf4_k*!1he! nUwq;{'9}<Jsc`^HUh#hV|[!ˡآdYji=WL*"HFn3uĠH0*U wbil֙f-|L ҹp^X#!V*}IdvŦ.2V"&xTĝJ6Ws|3gg{&T Bh).j9MiʽM)5QcbJC7p,:M L'1>rs%] Er˱ X! nW; 0tXoBCOpkIzam M.mϠܹ)>uhܙckW3w<=8m]7Vw琎Ch=vo`Y(W=JH%$} mG +H *\Sqk>ecOјb9oT 3ĠH0*^jfڲ:g F׋"wA`TpcP ]h"ƹx+ 'j⓿H0*%g"R`T J  @ ɫeH[D\ !P@@ l$ݺFMB v~;u ODV6KĊv.]x!J !P@@ lx Iغa>C_cñ=;.g7F*Ķ <څPUܓ쮣Up0;NG-qH:BQbPYg8;=@T?\=I5w*0X;ۭf?#i̝F$PU L*FYhR5KUH>BP.dkԵ}^%Yj֒`7 H}ZYP;>IS.nKGbEvtes,xvdC~{:`*/Q$P&dL@ZgeۯyyZ\w<$D~wyw6_jѫg6-yMݫ|`7M8,fӷQ#5dp[QUO #~XCzB]䣄Ij,N_YoGIBeTEAUUTUE\[^YYnђgpXu,{{.Y<5Cy^B;X j%_-,()݇Q3UC4ݽj}R׫m7D^jIwD@H;wxhpq=SɑBh?YvCSVkܜio?HPAaAV2ąѵ^iڅ1[3rV+1s^~?IY6"s+s<(2|Bچ9ڬ‰g㡺 28ՌNyVŹoo L(IUQI" 8ldYѮUb~[ ,$+7'M@A nDHtEL/Y!Ss!h?@'?AKpL9 hwt`M\-wDۄvg0C]$S"'XƝI̔pkЕ;aH@<6nݵQ)CcԳf >SLm$5&nxwԳtQ4@ѥo41B> _/xmЯ^yʋLNhJ"cfn[9AkUs)6"Zh,6ǡӀN+N7=אe0Ver촆Y(Nmz8pi7kUt0]r,/H@Ն>>8HɔEIQYFQH*L&N|zшæf))B&7G̈ oiGضKŒąmhۼ3`ٷ4h r ax0ȑkQ)*CYg+{Oqy:xZeҙypDžORҏp1~%Cڏ':{r"<DzrtkS {Shڵzw᭜ɱ.pG+ZZw8:oUnQGW:ȞLN>c~4Lqo zY(ʉ 霊Kt\:g.qr:R9}1 $$gr55S篠1NtT@;&zkXO{?'NTddweY `)32`4Z?+--쌐>ܺ uǰ]=x{uލѠNA4ם5s7wi/zO>:6B;_$G3nãnAcEza/{oNN8M"tKGi>H-l|A=i G2 Z`~j\tW\ Kƥ,&"Ӽgg,J64G hQ#Oj=)LYy Wspq4BwRH*& 42N!hQg֛rhؑI]6[[JEQ&PAܴ Z%e^DŽ" :ysB"YUF.V  E'}9*s\QӦKbM̑l[VjˁtoՉ ۑţw3kuS[CGˠM[N3m{=7"ߝ%V2eUEQq^@EQm-чD?c+1w0QLcePAAVTLz FAAASUQANz3.q@\ !6r+ n-q`hd⃭OzM퉗& ]:d*z?<@,ũ\d J NImYh~Ϗq#m5z/Qs6wWQTTNtrqRnn֛~ (%49hӨ Ǿ)FLn1t4~/fWIDB>??)fV՘Es)xǩ*Շӡ+wevM@ 0?ဉu]ʑK%=DA$c1dYVOWgo8BM-\ᎴjpzeqZ]e.>#ypx"w{PjЛL(l .tF!l)YS&S1OH*7oAN5LW݊QP^^HI/EsNsxf]gq@hICZcd߉ݴof&mΑ-T;оs(A ?Mľ»rr5k"%2/`tFgP>x]i9FѻGv5h5Ч?=܏Mh؏p-đ~ΙX\Ut'y2+Osr|h+;c@Sq&}L\o~GΑ|aѫѓ>=Z>&)9]=o2r@{"__桻)ٛEIɣH-zv ֹ }C>FiM gv h 8#Ȟ- Қ}2ˋ Mǹ/}jMc?HnZ^PTxaުX]NjӴEh +x$S^ao_H׌o38%6S}LzȷbLצZhh4"Ia!9塷Q6# ''^~I%ϐŴ`vldMG0 dЖCm2]E]M.۶'-#˿'n\Brrq,1j'w8\ٺsZ/Cmvw\Bg kclGJ&nO4t[GOjhz'G4w_=?6bd4 OTfAߠ Zv݃ ~+/s CD8՝,cƠ;ifTw z+cP97`x=e7#/[aV 5~r1̝B6>t35)0fN) FCyײʠKpthN%3%߬SN޵luIBפWM//pN8)Ih X:y qlں ɓz=FJmVuE&Ӷ{x 긵[fgH$VFESb'P3WrkwFբ @M Ɉl4b2 ]C(@VCs@s@Vv@ehZ[ zA.];fwGU+Z:G6m5Go1V|n2Hy܅Xw]#/R***#*-HjUɻY&AѠX4T5IDAT:(FU$ay#t8Y6Wm`ˎm)<5 ,c2ظi3YZwwj^W .Ȫ(IAqDթPE<*OF4t]/wA !!!q xREUU *ɓ'P@Qp+f+@QצzVTWw~WtW>ZjyW$wyV/bB!\]'1_^eTn!zy_~eJ?|PΧ+ .Q)")NrE?*Ik:VtW9rWo^s_Oe8ORr-Ϻ(dyJU='J\~xw?4ձ{܎LG~w9E'o>)cq3#>!(I D׹$wBt'V|Q;A,IHq^Os=W^O*û~ӑ7Iz Xy:(;aZ|Ṙ/wy-E)-}=_!yё&8:+-JHH\q(ccDhhh7ӸI!u ]ٳg?_ǽc[Ex^y[PYPxYP,2|[}M <==} !ݗbSad ?ϡ|E. x|2ѩ0l١:pwy(5XW{[6p~˧#>]3JYGVp[NVLOWX:߯<054INS~躎o~i{.G;(g0o}WHT$.TU LF%Kj-pE@ojzY5n0R̊9xWQT(RxƠJypێB(:nw^ْxμÙGBੁfB9?ri|p E?}Z> oSba(y Fp8bZŭ+ ]5E_*n+n Bm-` d2Jӂ4 |RRR|*AEUTP ..v)Oϛ}5tvxxmayY2&D^Q]\?t؎zвNsB>[`N!<7-jD`%l2WiI5≙:݈1: j3zmFCI\. !r+;yC'_f{`Θbd 3t]=" |.N!o{P=60N$,0gܷ/=ni+Ǐbpp[^dk/Lb%qu)_e{c :êTk_ç~ax/HsQAߩ5g{ټR5g5dW?q_ ۽r.zƗ3g0d0C|b՗_!C: \E$cY< h4b0QTU1־Н`YK,(zqRdi%)ͺeQi2I}ti݄۞%c&xg édtZ5gͼ]4R8q T1:$ͤ(kJ=8{N ɰkT-ʫ,+52{Vҵ[t7c46cUcm{5{2HԊ `ԫן3ϒ=aҷG:nd >)JdChjlx"a ;щ ~|w9O;Mg>bҍQTi^88eʿЯ\kЬ1dP}w0Pϟa*rګӗău-nU1_SĒXpp/rnV{?/?2l؈R3tx9eh^]eYu ජ l:11f9ʂR0ƊTP.is*vYԤǵPؒ9XңSu;9^Q!naoCsí/k@ G7hEG4Mwvˠ@QXy]24[p B'V ~sxuyo:aUk'3vpJ q:Oǒt+W t"Y)eԋ@pw. ՚Ε=:8LEhߧ\=V~Y/LzyGr\L-ߧ:NkJ%*+W -ڹYovfWYjh,[K-nm#5:dB蚊uS- t_+쏾k}-ߒǬY3=&QY(G~VU=u ~,(k.kȾ}{iٲ%yyd˾D*j E7TztʲIAYzz_aQF(<-_E1ǔxiL0a=ʑd&8N=LF3g-\؉GJφ]zza|f_$R#OӴ }on+8NuG6DQ{XnFDTRz%SSG>'gڊ>g =_Ea3[]NF}_,Y])Knh,D#qxϛ,.l!KʰTඩLtt {p,<zz[FJ K{oŬ-EI:V4 o:G@Ba^ Wg'ke> Ԓc3ؓdfפ5ݸA{`KUn;PąhTm،fc62;x6 S5eYTe8ǥGOPaSՋ&D;ou~2<5{f% )~>iJsӻnGm(Tx g6@(;6ݎt_k(usT@5TM,&_Ϸ'5T,v}i.>OeA}g?W<#FFXX8#F(1\S9p>[у~ F S>$//bc8tAdb$&r}'P<+>*>Uؐ'}\CΝ {u+_C9OAS(Rr$x?$yLO FYx,>H^Η׷rJfbsMz+ⓀL EIOKuZmBC˼'Oev Qz I$(Fah%ҝ'2tU"I#+ ?!|ЖA O{JQO2"9#} _p^9 _y\OOA%<MFם?cm['N6,!!B#*_hPMϤV=\e t Ȭ󰴔n(grereߐç{&Ϥv_*!!!qemWHW$r (p¤VZh!ĕkA\R#KBP5g.O%$$!x#Yk1tL>|+2AIH}\tuRct ʩX3r luA$' -౗_alX K"S{sL gb7ϖ`cEoEĵ17Tr<#BԼD">9$䱯m@v}xNNیL l(*ј}R2gCAdcEKĵ-Wc?QDNAmqB؆ɏ >E~e&y 锲-D m˗Iۓ1' Ktd|0k#=ɛ(Qs |p?!.r&'pBdd=k<; bӃ k[$ksasyެpH JBⲺxzjĠ{LK;o,@ R/ -' ~nš l%wLA;w%SNmAH^ְ̝JޱTdϘ-B!#aj2ٻe`ۻ=eAIH\R Aٸz)'OҼ];= kSXH^Cޱ1!QwͻqXTN 6$l](V1,G>ukV8@EH /ĥ%#eGөZ&r|88FPР-AtˋTqS(`BSVc^- ]PQէ@ĥt΍-QQ#:uo /8^W$HdTt@ Lݣ֦y]o_ÁL  ޷ 5b3I7/!h:>)-w?Ɣ4#nR:o =c' ʺ^pʭG8ۿ̢gKC=c:Hs,x]{PM&@v+s@$ K~]l?ȻNPgstbBdo̎4 D䶡es/x{)~9;=ʢ;G OQe\Xޮ]~{ 2h<^b,f/Ux*j[߷2gOeOyBvކ y)|8`HBR |$YhUhӹƈthmTK%;e+g# cD &L$r:kOsQYaub.:m^G}jU7[yw3~ޞS jTE }K]O#-*^SS$$FƩbOL«cF,v."Tv m?Şm޻]wik/SʸrIPii%#)gPd47?MX\_8:4L(wz$BTo}pc;p~[7nN>/ң2fMΑPVpEO)\q:+EegТ1Be@4+Ʀ-ov &ԡQV+ӧ$TQ9'%*d$B>'LpT%vt瞣<׻P nNa=(eװ'B6v EV-,P:Ӷn7AHBR sKDESC\W[<#{=i5p*ߚP%e)80M7w!Ze*DTjTRϒsβ]9" ,te\):w)V 3w< enjXwFAV/Ȼc<3{ R+7Y8M2{=G=5{_fyZ)x C^}w9$S&\k~ӧu'/q \nx_eGک}P]v-wvн;,] ?#';IjժU}PW .0S9IDAT;%QHѩPa:s6}++7Z%"b n_Fu+cPL, >T$$$$.%q###C*ABԿ5jeϽz֔7[BՄ *$K*rM$%!!!! JBBBFV.ںHPw2A|{T*Ƭ Ǥޥޥޥ'!!qA$( IP$$$$.6gΤc恘Mj4}䝺uNV.[&P5FMsK륒 ,m'&Ky9ɉn"uvb 5b`ɦٲ_@dx#y.t]珥kpBhB. '_& EN;nI~G{!}'91%I]-nA:l^b>]Zϔw"55ؘ(UA8%*j lVMGj.kJSX.iҠKw3iҠ1 ȉ/\Q1:9} f*܍C9JΗl`[dq['2{w((B `s%f(&>㗨~ܢbH)KM7jBxNJ}䊲nE.OmOzpkRwGkXNۉu)#vf+jB A9ttp Yپi;'~rj R}]75$&A3hߌ[xɾ_m\?yxutS4i%_|_EXF@s8Bs:ơi:MpTওt̝ɱxت֤ Q8S~c)簚b֪?@4z~b3j'm;R9,[39غ?[E8RTIjBh\{(: C/=/ҡɵD?g*ͬ޵;?|> HopuCjmfߊ3δ)o*-U.Bn~;RSuֽ+G;jrӱ4 }aBSh^?'FMF `3h^rzh[sHɩH!Mк n9DMJG{f=̳tt(p`R4:IIutMCu'I A-/DaC f->Podr*]i繥J]SfP1:V`xy4h-C H^bHS y -}Gff0 ~ZUxiE[f- gg2wq2e[$Ѳ-V0o4:4{)<Ďk3*DΕ.ڄ 6HlYweuܭjǮ p\J@n6_,^;ܙJ19 `r69|*#9|C'3w g2rI;g*T9'*R)އVReԳy[Py#]?F!nq'M46kMCtsZt3uHۦu&*7mOM%]=tȶh`<"w=|tmZ7N15t1fFFqMlߝs'.eۚ޹*?ܕxBk38l݆8ʩ4́ӛ)K-[KZVy U:Ӥ lߕKE槁*UKF%%: e(a4ܖEV8ؾ/fc^_qr3tkW: PPT"rƝ"p(j `4X^zs$STOEh6: WA tY1EBEqӢؓp#&wKy]ӰlXOsD*y6 S5X"3DBll0h.\@=YQfuK|&/KYBnZe Ag /_TGLU:1k6FLus[X=;//+rEҟk9{ e?7׮EU]8/ uOۨ07NmP)g%IQr}8M:`6MǨFŁ L &@Zh6q&#؊Q%<O 뫟Іt `n`А|LiP&tK9%:E$NNE{ؼ,(%&H,6?{ސ3"K>{s"65ajÀw^M~q?{ћ( #Z,KiVOO`AIɰ'Ѯ=,>UV`vf>('Jvgi[#-H;grh&8UYǽFj¡ib;t!*]HhVaA` 43 ɶ8(846Ch@uLF !A^빹­iRWj"/l;C6J5>S yr ;&3W ;躎Њwvᴔɩ4i=K9(CP~NXnԪGt )q$rHc87]siٲ_ΡnPw( b1pGa*9Vٴo=-VI[kD+ZM JQwW:M)ţ~`V$iOaTC9{U:v%|\VM˶UuW[okIIˠA0 BqtmZ΍*ѾAEZ׭HiT3:b/t+ ZD˶ZU,m|8Ӈ8ӣ8f>~![a7[ɻ Hf:B>xT9\V9;m^+XZ3gbilعӧqrJVLO8"$D쩫Xd/U֑k:1{+w%34iޙ]?Mn>Dz$nfp/pIXh}{lgÎѼ{ӄq;uXEJо|X:! ~amh j6:w1Q;_3/2fWvvEQ@5WJx'3(Zʂ0Xh!\Ƣ\;hѓ[nj1\gAysB nL]IZTNQB;pls,SX[A$5a3X6UVG]vfEZ;WߌV.h>z{6x;{ avlȚI-6wrջsC\F)탗uܯM_^G-2sdֆcvORZho%{bg?k7Իrlj!$+'ӳ&yD7$g]wʵk5DPm[Q"/ZU n1 Nm{dhOkйgWzk^˿e#ZW90%,6߯vF864xI'= 8Sh` S; V*8QBNO>Fw`6d0*+z)cP A.ȲOa^u?DZx|(&CIu6+| y9k߈f`4L'\F>/;K9s[۬W=Pu`? ";3U( Ux;f4#D+WTr~x:/Rh^{ɩh h\EEQUTU5o0^ Ty\WVK#E @8l. aGq8Tɍۑ{``4b00ML& ]0Q 4I5A%Z}G?n%m)W ? [\$Bw^ĵ|RBC(Z?#"o2UUUEb*Ek(1`$MNndoH@ڞX:b6sq!t4Mp¨&FlUŨ EJUB8]UN(*Lxd`v=q\@Xo*99-XA"( [XciDJzΝ.ttMG+nBݲ#,v!RÂrZNKȀ r<` &X~a0`411 l `(YFSFS&s `1R$$0.O $$$$AIHHHHbP6 zzU w}(aa $( IP$$$$AIHHHHc$$$$$AIHH\mÄe/IENDB`gsequencer-1.4.24/docs/images/AGS_super-threaded.png0000644000175000017500000005277413246707333017224 00000000000000PNG  IHDRy5bKGD IDATxg\W]zYʪ&E,QbTh,`%5jD&h>{=իM6999S&$$]={*77 d2BCC>}ڃC *&M8iHPx<|.fΜY[[{ڵٳgڵK"%wI\\܄ Q~GGGffEhhl%Æ nCdm#=իW'Ae.g@_ӧl>yaKKK&O|ecQA۝v166OPzkkel}aò{eQTT֒*PQlR[[ &&&PӉ} $$dʕO>}䉅ŦM)))H<֖6vXAp/^۷DFF&'''&&o۶ ޽,;;;33:\SS3iҤe˖McffooCL%xxxHW^mݺS[[nڵr^zeiiIf{1KȯynqNN/^ot;;| ]Kׯ_J"1 U2BՒ.../̟?ʔ)(繿wرc3FfV e˖-_~%:'UUU[l;v,WGG*$&ҵ[[[6zzzeeeaaa I]]]AAȮڃzzz/_dɒYf//)Gï-2x`HOOHi }ʕ+ɯʾ###]vYCC*** y~Er%ࢢ"3**EKK?D---aaa&&&;w1[N< sΕT«eŊsN K.F󏭭4J3f'dvDQL8\B!#..n,p/^(++/N*|-\ 9G2a„>}䓺:QJKKGZZZ)B)B◥ T%*qZ[[:BΝ;t[Dʩ .\hkk(1**]ƐU A?&&&˗/G*6MyŋCCCɠS7nܠ.Q|ᴴQQQ䲣L&HOOO׺˗O@X-2d^^^?Ckk+Γ'Oرch\=RYY䄜I~O~ 6DFFFDDj& Zh6l\kb4$ɂ T:x`Lfxx V>2V)Sk XX-R$""bW^rc}gJkllܿ_~)I1݂ͳcaɒ%{g[n544TWW t Vt,vtt䉓 j?R}uu͛Y,ʰpBٙE:!!̀ cccrb oߎ\"4448 Z"1_Ad2Ͽ ===z[QQ!ad2%OrEjjjB>9RSS^  jjjgɳ**ZZZKz ?VVV>|ѣSXXdwA*122jllA "'Ora0h^a2j׷<@~;igg'hk||<PA\.Wd.Bw2) N]xQ! hlAp8&Y__/$px&wI]]] 7oۻ́eȐaӧ-zܯ_+W7nȐ!)))?CVVRRRFe9^|C-AT,Nutt\Ix6õfCkkkKK ӧOa۶mc-pnBr}g>>>d{ξzj͚5d,/*vvvs=yǏe|F*ΛgΜF555EFF zaȒZ)KA  l6JXxqkkkohhعs'h3gɓ'CBBbrdÛEEb vTsܹslٲJ}}=֮ #''+GfYz"!K B{Μ9믿ꫯxұrd@`` =BzEv++/^HMMOKK'v6,((hȑ~~~JPWX|Ca555777777===>>>!!䧟~;;#GO8QU(XP{* IX9ZD@}d"?`H4,&P2ߢ *`L8ƍgӰ**[ #ӕU!Ǐ_7AF7o {Vp82y8Ծ, RMdܷuuuȷh5""4""7Y9Ղ{d$!CT֭[njm۶^Q/yjӦMբ[8X!CJ!nݺM6$l{{{IJySEjٻw|r#Ap8>>>DmmmAA---R8nUV>nӋ4z455ϟ??c W!%%%=XTTD.LM3:)=ʧ'Te˨A:CCC#""Ξ= 9)A۸q#۷OBߦnQ6(w- zƭ%H1kkp?~V{IM r+O|>}RTTDzzzǎOL槟~:}?y`0-,,Ə_SSsYl`;wnΜ91pذaCNNE*}]ZZ/޻w٬Y e~yĢ/z RSS;::ڶ1}/[fßȿ$(S3_/HUׯ_^Ϟ=E_M-y2>!!RcV 괼u~isqqٵkפI9gϒRRRRRR=zD8:: 0eijjv RGGˀzzzouցP߂PCJj]rm]_[[KgϞ%l<|APXnL wwwI{rFZ8 (R8aJz"*nnnr~B BEtMLfcF%--C+بAiii陙};$z BlBQeG Q,E9(A`Ћ **٠ "n+_N| r$ VH[S rzVHr-T(V%V+Ǽ)o)+D"o*+D(X i * ł.E9X!2CfU3ZP/] %o6VV\}Q_wW9X!r -RAMM'""333ŸIMM*)00pуF xS7005jU%ϟګxEꨩ :tС֭QNaaaaaSB%U)mƍG+Z=zʕ+(HTӧ=zdj徉 TVVJ.bs]kkk:##7ڵ K Lbyp}}}޽֖f/\(BB͙3g DS' LBYQسg;;;<{nX\\޾m6>w-[߾}ݻ YYYP1j@ ~QF[zEQӧ?nkkkll|С˗/tuu*++3gxxx=zʔ)w!3E-7n:t9s{=F(+WG eV;TLAKwa}8::^~ -[˗/Y$??-;;{֬Y(=444//Pxbcckג?D e=}LOC |L&sڴiNNN_>iӦ 8FQQQUUU娩 1rNJ+ゼZBvO5o#f͢4L׼A0b j[`06mD=iYG[[# 4h-`D"x -`ѢEAb51[9Ǐ>|8`#&EJ̙3\b+x ͨرGM9aUEzL>;ϪS=xۗgčU}d)))I~Kyy9ndd?+xm0CB7j(CCÔhx1cƌ=+GP䖊 $)..L700 B-mxX9t!nJUF"Y'L'+Gޡ V4PI!ʑ⎷(oQa0'Nqid0쩊oQe\ޔf?N_ w| s=Z$ iQQQqŰ0s+ ߿Irdzguu:gg|j"hmm055555hmm-DjpttT R>VHr0 FM$b֭AAAcƌٶmD= TKaa,ϟ?TczC cݺu6mIE8Z`8{z+IMM&jkk햖mmmɝ(ҬJ9d:+{!@~w@SS3fȠ,,,pZ"YX!@l2#"444""ٳ*s}ֲ׸X5I~}T[rd~>\ĉĖp'Nd cΝlqqq)((l!iii陙[}r@[n8T-{tF Aqk.kkH9]S9bQQQ#2Аu2x`9ؐdɒLT xԣ?X|?_gee]tiha#1o޼3gL6 (=@|7-X̙3|iO6~ĉ6*^)**BCRRҳgH嘘=:00:::,իW\.??ˢ R:b7o;wNP]m^kk ,YcĄ :t޽/IBvuuEw @tttVVׯ evvv&Smyڵ8::XB͆z?RѣӧOϙ3G[[G^m&(ZZZǏ!V$Ҹ\.zjjjJό^|R\\<~x튭)S0NQ]]MBv\-((r"oٳ+ A(v۷ȨCGGG__fwsCC.;tttAEkΝ ϟxM 6PORWWwȑ6lep|}}}cbb\]]Q vpׯO>W\! IDATk <8::KK?!'O;w. qIbz۶m'X-T^z(y𡯯/ZZXXXXXƢj7o˗Qʾ}К(e͚5ߌ wwwtMx,fBTϺh*H-[n}~IPV777驅JUUիWB9=@~W٣ sNqXׯ|n޽߯:\>IKKKJJ.nnffЋXQ Bt+)GQ> H ȑo dff*r R!<БBF/C=@"$#F# TJ!$9c_XQ9i+GRRQU!ni |9-**##CrF%sd V?[abb"R9zzzÇWe唔7n X_*Bn޼2+wEdML)QM`-QNJJ (+ ĄPIq#H!+!xA(rBI r*++o߾-!VF+D(x155Q9B+! [$l"'!I_9h8X!)YGHR6 +DQh $%%Tz+2V`` :ZOfI q>#rG^r="177={ٳ/aCCC>}ƎDC#s;se˖7/^A9s̙3ghI#G@%5p+???OO .  \.wݶl6{…_FuttlllΜ9eKY*{ɞ={|-w]re]]ŋQ Y -ڡL,_|ɒ%mmmٳfB顡yyy"2cǎY#Gfffŋ; /xV$ g2ӦM+--urrڵkJMVVV6p@ 4hʕ+Z[[SRR:~?eʔ$0][$dSE̚53TvoUTTtYe$e'F"!}000ؿlmmry݂[haΜ9aaaWl j,ڬ駟 IZZ/]$}0o %i -F2m4/F Xf ļٱcG.]ʓ!>>> `ܸqj*4> | ݖ`he[n?͚, ;]þE̙3gԨQtRtƎ;qtj> MbUbdصkפIƍwƍ;wv9[YWWG/ϺDOOOh-TLDMMM===Iqʔd^^ 4HHiӦ:UE[[[d6PKu>RB__РAٍ~k``<17%PijjB$BCC9׋Ъ "Sx+#"re\.7??ҥKgϞNC444YFt|O>,KxV!/3L77777۷?֭^cǎ;v &`􌦦&3֭[>ꫯO4~~;;;&Nhmm-SS>PW !`"B\.JB4h?|WW\!ٳ %%%%%%?`t[ĩ'-~<==㏬*::ɓ'aaaaaa/VN&}b@ ʕ+7oޜ4ivrrӓv oBCC>7:VNo oillȐ7t*޳j"~+7ƾ#H!:::ފA(r ĉoܸA0 io哨x8 gNh Q>~8]ztݢrE5"555Qη~;l0lgٰaï fڿo= Tݭɗ[BArd##'N̝;Ν;<`ٳ'770o޼{Rcvn̗L UΤI$,00p̘1۷o߻w/5_~SF-R(EB444BzAK3F"ٽ{#&OO&VTTtKN*x cH9uԩS@B<3222Dss`QQEoNG%fU*B7*dWWe˖QcFDD={"""BCC{s =-B2)Drė_~~!Ce˖ޘT*޽XtW9cǎEvK`ܼyW[[;*****J"`>L0bcc  A6l0rHjφ ZZZd`Io033HHH+WTVVBĉA|[n%"55ի{9|˗/QvM/((rˋ܅c韓$QWWFy&g@CCl,g6|И>}m䔔<:GF3ŋo޼?}ŵQ;vlܹ/_VSSsqqAQ*)>}deekY"PeOQrOJJJRRRjjj]]~сƂJY1%g&((U{=qbSYYy 6PkzzzAAA۷op84I|}:<< wwwyxܷo/NV!-'O ٿ'OmP T-TZ9҃_Q( UibbV/ ]:%333Q2 >M[5jbĤݎD9 4~x[[[-1n.&&&!!!!!!ʡE UC BgUPSYYym "R!AAA`C g쓘4+R!III555d(BY VN#Gh!-tcVAtW9~~~<_*%X!bx}bBp ʧnXJ[" %bE.Tx"55UH+[(2L"=`<D˃r), +(y@rdR!IIIO>"%o2VV-`"yA gT8 quuUJy[cV}8::^~ lEF0otL>]V>F(YʪШGuu#G.\E:>uG]C-nK˗/Y$??-;;{֬Y(=444//-REj`=z)Sd`0F|J d2MVZZk.N6l?3J=z/B ƾ}dj7F0_a&N]1k,PYf͌3xg̘ړ)i`"U>裁RSwA=~=ނL&?,ZG?9Ϫmm߾^{0]}\nիW xV||rկ_um kի : t>!CmPڵ]v)9t,--X-$[p䁫W޿n+KcU*oALL 'NHCFFF)111111nnn(F~](3"h OOk׮=xѱK{~ߢxxx>}zٲe`\.T `ccӧOVVVyy9AGG(xˮ]&MSξ}OcDX*[Μ9xkvtt@)_>s wڵvŊ+8yE>C.s?䓉'Ο?L/ 7gΜ`~Kk9ÇU/^ OrP2[5(- D.4 <uu={,\0''g޼y R;AH?ܹsxbGGʠk.:MļQطH5kRA{-,,dkFݘU8]233[n:w/;vX,D7VǾEzL>?QDI[DMMmժU<RWn߂/644$;vɓi#6ͰX%Km&?4C`rg}|򉏏`"6  ÑI7fUb"U N|ȑ#GII xIi]cjj|ʉGKcЂIط  9r/V!o`[xB]aDFJ VH~A}}aÆaHqcUoHOOuǏt+DX9Ҧ۱*U W yEjj*V-oP\ +G"` BL__9iiiX9r-ARN^^VN|U!WZZJB-vޑ B#n̪TbB+K[ ĉoܸA!B U9ϟ?OKKRUf?D"`EE*G9<{-[`݂2uuuDajjjjj*NϞ=xbXXO._߿S|#1WWW;(fU8qbܹwٳ'770o޼{رBH_RRBJRLT RQQ!HX_~%ڵK|-[7nݺM6$l{{{o-j([iΪܽ{#&OO&VTT)gϞ񼍨TF2B3_455ϟ??cƌ 2ܼ8--ŋ\.7\;CJ$w_RUlٲpx{ }}}qFѥrPTn#uϟ?733KHHm$X !C:tϏk2[q*_Gcff/^پ};̛7yyy/_lkk*R]vva(%.."..+GsODjjիW XlٟIğl2$_|L ~;yKݻKf?˗ϟcϘAnn.8jG]]z>>>#G97cc#GdeeɕB :422:R :::33O>d ڵk{ n˗%%%݋;]VXSן8q}ܹ#-ׯ_quuE)"!ǩ|AMMMcƌuV```KK Of@E v1bĈ/˟ɉ ׭&33gVU!g>uTAA ZSYYy 6P tuuop${C___7r1`IDATƢ6Cll,JW˚5kK www$b#ڵk/L][Ƚ6s\m߿_n)..>w\XX؀ A"##߿/011ׯUϨ@}[.2*d7o>yL7555jzNh 8Ņѯ_j VUgggY Vj «j+OUUU)))d%CBLLLF- RXX۷oMM j(B 899QKMMM>}趪 xBb9B+B"~C._rWTTTUUYYY8qbҥ\PWWo߾Zk===@qq1WGGzU}8::^~UƦLM;'jӦMK,0<<},,,ިgU%4sii\.7&&̌XYYsrrP}phii=yD'ųg$˗,Y֖=k,L&SSSs@˗ GA}1`GWW⢥ၖ$?Wbb"A---rS?N`0jcȞC R3tttZZZyZik[[jt}}bԧ^xѿ Q dg}Ɵf,9 vkkkKK6 dQIIDR*++< :100 e"֯_" eGS02ֶ[RR'UUUطL>}.]7oތ"-/uB/^cُ==rHuu:DcW^wVww}ݻnCz‡~8d:Am$vکS趢ܸqnz*ިE[UիW߿ORT51ɓv3F<}TB1``0" k^&a0ط`0- F8A#wĤ^@/^411~!]]]6| FQظq͛7 7ෞ}bʓ'O*O/dMMMkTp}ܡa,+++fO8!lpܹOOk׮=xёmt  0mXsΑK X WWט777I`dy颡X,zHHׯ=( P.@!z:!?W̞=[MM 88vY߻gϞÇ|\ĉQQQ~k#@A?x#q/^H )F lٲ_]oPWW]vM4*%}ŵٳgϜ9sԨQ!!! }BB˵a({g$+pwwGBK.eX(kkkS,FllEllOKT&X-" `0bAI F$xV%=o`D} =o`D} =o`D} =o`V #w1D򔔔_t[TUUmLQB8pt[QVR~ذat[rm, AX!P:::444444p+ ܃Nb0 F4ط`0 F4ط`0 F49Xp͛7]q~`0zC&ihh؃XPdyAs/mmmA{X>0x)E:p8k֬AŇ Qd xA H-ׯ_?lmmmii9 ط jjjjllY#cp+N444@r N455@5NZoQZEjnQ,ZdA+O_*fݺu#X-2`ܹ˗(Zkllܹs}qq-b!UTdf͚gϞ1###HFFݖbNʔ~i޼yh[KKf?Ą 5v؄ Ep\OOϜA₂diF|pE0={;d,yE ?6m1nkb4:j(Dgg缼}낑 @@@{ǓqF,9zx𡗗EZZZ܂_f0hРߵkb?طFaa[GGG߾}?~ܳO1prrO <<KE!P~nu֡6mp8tE3J2TyPSS[bEuu5)0+WTSSooo(Zݻgfft$ܹso͡ RKVV:Q*Lj*uѣGH*3gloo%}̙f=zD94$jijjrww`, t#kD-VWW׆mQr`ժUt"katWWW(?>:thGGGZZ6Gv(ìM6qcȆA[nܸn[d1c۷Oc 555IIIt##޷|XPPo>C;V|bcckjj&Ml2w‡޿ƍ=8n< *Z-{6իW[nֶ[v-r5}ӈPj!W~ٳgV^=gꮺLO={6y? ]yoeEՂ?R=ʶm~ׁ7N]]710_~ 2d77-[P 7n͛jtke˖-vvv]GKt]]]} y6S駟`ҤIt"yҥ23FL8~ ʯ߿VEED|-{{h{Cכs8,Ů7_~ۖS\\pR .T@K,vmB;.ioo?r,^n[d«eڴi,**w,Bao@SmXЧ(Z2ZZE ]h1ZhR"P3x}:o~cӅrq{#t:UnK:s lz^>m8qy kIHy_[@v,QC(dY}UU^ 8bE!r@Pptg-!˲t:%Z Ri@O[Bi'-VxUI&CUmAVL&fu]q(.&Nw!dY˲0Eoa*0eYDa[B牢_cuM~}ix;8l B(c0x7p<.]iFR/aqL:y4Nv-|@6m4J\.r7r^x<AAL&? ~Pޖ~ovm;cq_DVZ~ۣ^CIENDB`gsequencer-1.4.24/docs/images/ags_panel.png0000644000175000017500000004450513246707333015540 00000000000000PNG  IHDR#l bKGD pHYs+tIME -*iTXtCommentCreated with GIMPd.e IDATxy\U>AETYQDz_lne]4o<-[6Xy뜖Y74Ep@dyٿ?AE:^Ç{:؟ef&FИ:r̔?;U>q.q߭-WG\sq?T`UeKK8U߾RLC۳Y2^w9ڕcRvE^o`l4?\-N5>ogZ;OӥtΝ/Tz]]UFzvɞFHG*G,6 7>oTym}"7|F|cȩ.}źkP?g4Wf?h`iP$>XGKM^#X6S''X3IPwos&7Dv#Fh;w l#{tluU56hV3_qY8QfP s]MC6oAVZ6OtluDvέʼ}S`gq>U}ִ8GKڶ)UׇOOq)M3,K\rhA#:ןvB]],A ࣘm*VRvlQAvl. %Q $Џ~PF^>4Stt_ru|"7TFuKS ~:vnX1JHWFz}zzW'+뷥x8Wvٔ{uUvVMibmS9x|7ORCU͂2=|W1ff'(E-ewْdS9aU^(7Wijop3ޣ-4wQSA#=\kI7koT\~jei[bEt!%>_=*0= WL6⊠ېg4{$ÐaTo鿻xF]?F]}*]$3NK-dM] Aw VVkOdHoʻ(aJj4$p9jpl6-|e/*0ch/ƂW;ϖxνrQj޿RJTmWr98O]{Qk֨1kKuG#>ԇ+Xy/6%K4) VOR)dխ5eJŐQC+c,> Fj^Yb}uM[} R饦"OO)?&CXEٺmZ:Mׯ-:tf8_mB[hwx,#4檞hS٬ gj}v;P¤57 h2En-;4-zE9Lx^{b25rR>7]vV@=WYG~--QQ~љۏkO>aIv-jNk6¤7u9qEJ֨R^^#kbo&%r6VƴV37CQ-mN=PelןuոyO֟6(ZkP˞Ղ܉=E od%۠՗]]\/.1eKUp}ڶĩ@йʶtt;etM~slYqZEPC-irZHGΈT/-ko{Y=Jy-oXR M031zեKmzղ.Յݤ^질tvz#%-U0eS4wZx7Su׍juEg38Z}n[i%'[ѢkisLk׿To>zz='R5@UYȚ@c!?8RHC  <5< =B8fsz|U忁?CB'/W\ԼA}ڔf4\dg0P-">@9kFUYT̨B#Wr*/ b }qjuOkdvjwH;5ۓeUCQ}6P|J}d'S|G=*uJjW:n=+]yG闥Pw$kih$3|,Mj՞3?*|'\yZy>[Lux 9[3}j 7v5uR#Tz;tswS5{ֿ^}1}ϘJ##fxanٛyTYI:=qjƒZaRӎj׫m搜l߰D#cf6ӣѮߖj\eSV~}獦4tH|IVNfbM bu7ïsOؕq<^?e+Mޮ'gT5 Q׏Q@_y4bu6"ݳ+;-"M,PQ_y?Hnj>N6<:Ů?TIvA2N\ꚇ(`Z>eKw3qƱ[ ;Yڑ_͊TEL>3X}կyՖ/Hb$r3n]Ե'i~9+PU50Ō*TeM[G4wGiֽFi@HsʲWpJr1W>bz>u٬ sݯZ?}T/7S{:]9dTşKw/ԀsҟG#:g?jWoEO<[] .UΒdX6n%(?hOp0qSokT)v!F?4 ]'[im(^Ԝg,7crULPNj 7TNRYN^VM{UV~Ȟ=r$+C!oGd)ik:qชW0jmSYJ}TE'W^IWVYBTxDo,P{աeT|DYѱ=S/ ?4|_@ߟu˴c4iA4> 0 Z ?8vC`?8R.h?I 7|?"vGE?L2Y 2eed@5H_H85r|*85T]K%8GQ~5+6t6==.)nfxMޥ;hWY}9zxx~ʃ.a长md-ڑ/5Hn.fNyJZo-S[5=4*|rNwӉSuT}J%*Suj\MJO(>|ZNNj3X5w:xz4]^s]m7 ?A|G{RA[,t"\aVyW:1wLYVMPڎvltOSwբu:5Jy#rn]۔trbr~@UR,8\>+&/V;uנ=~25h>w?~Y+ ;IF+tÝ}Y-J(0ȽIfJm,NVTrS56hV3_qY8QfP sY]tu:6zwn];Z+|^J:zd.C)B_EKF39]v|M.nф625ST_kZTM3Լy{"4lPW&1Ce޽5)pc\-[C۩npż[$^oԈǵ>Iؗ4w>Q-7htL4랿OV%Xm۔*çާZ&Ry)=n \qJ?U65QLzJ_ 9a\ĥqR̻_-u],g 3fe@ v)tbEXeJٱE}F۩fuiH.g('i~\2/򑧙bi2TǪ_Ke4COHr2ov쨇&WFZZnY"eO)1G쨲(@JU1v!'yV y )VH2U^}ׄ)Su]Kylkg,KQIRo=/WruUy-$`ZUd e)(hP]_^JTm+\Sk?uGݮyZ|/ס“)Pܫbe*g]6Zv+:N1iOL DM:|jC35^iv]*ޣwQ`l&<3U)T=_wث-_בdegeI^-f7(]'T埞bUNr-;P*iľ~f1m[ul'Su~K+!Y]OS^/O ǫ_k| W\[z.׷+?o_gxUSv4aH>zz8br 'qhhdg4UAaR:R|od8\~-5fЎ/V**&lY\"nc5nLk5s3TOwXٲߵ `De*vٳZ;Qǽ͝U}"ӮLC2*NQrl{KmԎiuݿ(v^Ԁfo+yW͜V>\Ieuyb|DGvs2G3)ʮf}YW(mi-d^~+S+?>@}1!d5v_VTiςW|})nwSp~HGfTiT]{Q̃?h{˔`SMaگ@eeek_g6}r&M[cefũ*hǢKT81MZ)*%w򢼚;IVɾ ε?42M031z:rTyrʖ]j#LνԲvU,~7)駴95aW\PY5w4,NubgZ~u~3,7k! ږcPwmAuO]kjk'ꄩ ._Pc9vBe]EgpdB~90+*]B"µ^ \Zϭw/dRR7Zx2ɪql=FkAkuQv=V;QuV, M%I飧cqf8]uVj`Ń.z?ҽi@cr5F4?$~7uXH]#_Þ^ɣZphc+4mLc?1R,>Yʛ|{-b*{ӐdٚUhS7(DM{ڍokޡWן뼛ǽݓM5| 5?U YRbT\L A>M?{S"*+#Iǣ~Ҷ'NX2UX7UjQz]ձUMh{d2ҕ^߬&pz4ڕRm<+lʯt)֖O>՞#ɌWw)5Ta!^^@prr7~E=7ïsOؕq<^?e+Mޮ'gT5 Q׏Q@_y4bu6"ݳ+;-"M,PQ_y?Hnj>N6?K 1}]PƩQ-ӓ3L'K}uCSCb2;uDN38Vy!tV<:K;Iճ5`>ykRpёz3( V`z_kv{:,ɫ܌[us[:KWyP|kS,վWIjӖbQ-|ZuQ!{fܽ}GhU=Sڰ1Goi͓5 Zo.2Kw~9AKIopHC0Ӕ}:2R]ܠ~ODvQr.ݽP"v=J_SEK=elu-T9Kub۸Eǧ+>ƑNO.S-8rn.< **|O "=E{R)HVBhRҬtqQq/Pa|M1j=ڦٳONɿdm+~z LRXۙ4Cv(=c{:^2 hF+4W? iǤy*7U-RChXwhm1WSS'IrViRx~)o,ωS~/JQwXi,}[Ǭ*4nwjW>>TDQkHvj"Jm^Ss+`NM׫}c7so݇N h4eP*JMWty*{|,48{FUYȚB*Sst8>CvVj:Nxv":a+tBHC`?8jW\l!\Юd yg^-A!p$ ћo\~J#iiS"vGᇟRVf_~_~22 R$/bw^_J>|^A*YWz Rޜ;X5 GWSaQ- zi]R|4Xp!.x?!4xp>ZLYH--Oν.s!,ݻFpVj` ;P]ᏻG@ah$ߣ/tIժ(;ktYkk̏t\yPm9wfN x`v31=~w2<At{_I̲b'oQR]LSDE9J Զ'Tii!p]*?ګ߽D1?ig 750XQGqoMʽ;yлtħjq7Vy]ʬro^UnŸfН(b3Z~C>[+k"%ثƹ?jdwےfn.86Q: yLa+@iy1qj-krnUyjUEݣ-]UV+v^ٔ+ ei/ASW~I-VM❧sTޘҹ偪5u,'_nGvݦ_CgTER!٬Ciػ{1kO_9G/RRy%L7w-E;emt٥])OiQڟQv*ugյ]]etWnשy:wnoYx$Y?tWmI ŇWKx v=zXGRπr3kٿTk}ӗg5iRNN'9\VgiQ}U}$.XsnӀ+UݓubgF}s4/ngӶۆk_^O#=ojZ:Vn0}<Uv+XEydxIN&(mGE;|spjU:_Kf< __7I.m^:O91w{z=@yN~X>ׄ+qsܫTWFnr|:nW8Y.'??Gy$@c],A ࣘm*VRvlQAv^Ґ\m]EPNe_#O3EG*+'KY)rNeT;+U_B;_j+h:HCk'jϑdd+yڔ/նꎙyQsO. $:'_S(ރ4o—Sx\"+p.t]l*szws:gS%teĮ7ɭwX*գ`%6_ʔDѥC:j߯/ A׻P/t$nպe?)ԇ jã˵W͕cޱ_! Cۢ wXUZ)NqKśYO1 Puu G,Vwj<,~s?SM|r`/]?%KRt:),P yi-%4Z_gg@m;VZJ,u_kƩaںqէM2Uw˖xe)*I*:JJ:,V˻Jߖl6%Ft. sM\ꚇ(`Z>eKwVibJ-myxϿ3N,Q=UCp~2+3ǚv6gz#S΍e{4j۱>WUZr>{ug4MQk;:0:,*,̢=?{+eBZ2SftP60kN hRў}?kok?*pV:cJINRI UTd{+oZJk(L>gz]6Zv+:N1iOL DM:ۻ*<8\D@P/2--MnaV;vqm˶vӝfml줵vCR)5 t D p8(*)#_3asx;ϙ;;y;)Rg#{R/yc6t^i Z TZR"˨]\v)<*Ta4ju@i?fgJKjԭ@S28_sNT*qF(:\%ق5~Jys3Yz_׈gT3Gcdi`_SX]Βym3qX>)]3(@}6)H!Q T(jwnp/yLUU6sby #!y{yԋF+WoOe[ULf'ٺ=:Q>S7 k3ڬIDAT: R3ʮj|@&)xj=OMk7❷a$C2g S/CڽYm-hA[.g&Q7*#|Je[Us4v#J򷩺@{SIS{Z;25:YZcS5g?*ڢw)rS/f2V? ꪻ enԚsoZ[fi_o[e4X,KՆW{kʌez`q8*jb]ѥVґr-ݫ/^~Jy?Ds٠R=陪)/RMS/b^W(2J?{^}i%]o?)!6f1oA]*YK3uKyNgR(2KrTFU$ɍkU2KKo7:"ϑGoYV꽩*-w m7ܥȩT]4 CEE~ uֿYZd?+M-P*eܾVm!4C%gdXШPհ0Ϣb6 Z` jտ8(o ٜr ˫`JQXrxSFNj 3vkա2ꞪڭXKC5J,xR׭UZFJ^I5zEu6ܚذ*cƣ:=S\ ?E: y]gusg<|U}Sê(S]K%:9J}~65nU窼JRgB8Fv;yXzB=SVDuNb:rMR7[;wƆJq|G-5YYy>+EcOZ¢c 4O]*᢮7MWT1@ UJ~@NIڵ/\!-{r 'tv?37['uf۞';Z{Fksa:"^!3-U9Se_~Cߍ2x Ud\-{f},!6faտs_^CNɊܮݙ)}[""b,)`Bݹͻeg+Ңj8gt3=[!re2H LU)-?N }E,}H]q V*y/Z8RN}z*L$jА$uTDn.P-2KBݣ3hMy.~҉:i;ldb%FD9;Cb|#e[ nj~$DhTEUrD*o+-e|B}y<_1B,6\ݽ3UzOtEm-(V1qNUЌ+&4lk*ٟ!;c<Ǜ?˳x80Y{&ݩIpaXaWtU`)h%KpkQh+1#kTEU=XYlm 3 /@B(_>6PK(^-!VֽoBq1 k;]ycYJwP9󾸹,lrX ` 1IENDB`gsequencer-1.4.24/docs/images/ags_midi_export_wizard_no1.png0000644000175000017500000004652013246707333021120 00000000000000PNG  IHDRTbKGD pHYs+tIME  Ś5iTXtCommentCreated with GIMPd.e IDATxw|u즑I { ('RPÂO,?۝zx@ł4Ez5$ HOv7 |˗y~yU?u\mm˷iyO.}ryO , *[(Ue\._LC,_/]sKb5Ysk|>o^DsnYC,_5xWC,_o/_(ízt^̰6 U{EjSyQ9pQ 0/g|Qe]5ڪ\sU[>U[q|oM[UV{۟cU=k>9iU *'يo_j˗/gU;I>a|ܪ٦u[~f9^qZOvV&-]Us]7ju`Y_;|blv'̤&&tyww"yρ"`ܵ&(kX}pa]7z=q;S[]㭀>w'' @/ڪٞu[BLabr u/]lv{ZذYH#,)hiW+{^ղ0M˴0-4پm'>jp[q}]+F.]<Tf WK2N> ^N չ*z" .]m^~qf}[ soy3ہmyXGZnf!Rzvѝ]\giRTXfժ `/)*; ϏQGQq16jEU[B4 .n ߊaQ{$T hmULk>^GjծVҮڲp1cXuńG$H&sNgiM_uFeZf Ǝɤ?3v[W+f%XŖV`Cz5YYźk̲3PٖvymY{QVPYw=+uwxyuRwVԔwI,xw*WQV`r|yQRRRQ`6/ݰDHceo? cY,vn[AiS &kCK3K{C6XM)mr9-;F94zEc0 03&ϱt}27뜽ry7tb3cD`NʴsSWyȵ $.@G}est)3nyo3L||l8R? 4s`9բꫯ&((OQ**bNGi6>*ގntP~)zë Ǩ><:+~Vȫڿ=kpwCPMl)q|=U_O'&qm;zQE5C\L'ٔs>C_۟_B=$nO&!m:Й\ҒNv\7k4-re]EjQ1 w4NĞb'yL b&!m;U>Gt}9R bV+=8NzqJUe_wu;˻k[nt{ s]]qܫC~s̩vz$/*.4jYXX@Qq1IddeQ/65nD1&1=f1~@unGx^WՏUy+%{v6dA3mkT0*nziU?ꤨljbnjuǼ[IVf.2 _vͼ /..Ʋ4-˧QRw>ÛO}Wו7dǍ:[uj,W13= 03bUN֋%^@q(ܟAYӃ|Ya g/L ˉ-0yz49btHG[|AtcTPvXо'|SL&y|3|`_,>NP~ .'/߂vbc°[9:>FE\/iXUZViV; A_DGƍgEʱ])2*uWUUU}YwE\w[7aUJ=lQzyDun_0:/7sZ`9L<m|QEX;%v5;wЧOrssҰIeކqۿ)gWi ӂ*F;=8"2 *îC&δ|ђKom:vuFfOcަra e_oduHa,kFfnB:ݺV:5/->ϋ&jt2?.p]"]^n.oϙSߓ'O64mwWflU~Oڵk6U+V;y+VvYף3j דFoU0܍q2n< v森fNʽR Iә80 A>z]" Z烳rVnכ@8cEac3(}O{?ٜS8ȼY3 f& ß|Bn6(;ޠ>ɜE\D2 xÀ;^Ӫe.sS39J=-:{~Ρb\)uZOuU6=-˪[l Xq1<ψX>^A17QVh)`Lқmuv<*Ҋj^;)fnIdD$$B@22Yn#wį xS.WyixxoDBV_Af%YiA8gvo7,7wW3uQV[c{|^Dr'nx7 p\Kl J?F܊c[GӏU5>u˲ug$5cSe-5`wj[^ Hi@۰~}Fznq;vZ~7/r#q?zA9ߚozXj,Grd ~˛EvZ^5zqڛrn1Xg-㔺iMgw\?~Ծ BCB}mi8ңǽ&2nܽ,[,G4l\ rY7THC2 n!44Dƍ{s!/ϻw]o/"" Cc;wk|]n kW`܆`E4'©sZ>x줜)ė(NJ[tMG/)oc-AP7nOhXDr= GJid ^DDRR f̘7Y.0mT_]҅_voBJp;9> njT; r&)\ɡ8B ''Hw*)ϼOq)D]ܵ;g[]7sb8WÞ:'h}GlבO\FP ^DD~3ӦaM7H_y4Zmmxz*B0x gIÙqůu$eKYspX|GgZE'w[%ǏH㟬޻?~UfL™J݊Aj_]>^7c8S~$e8 WCNW,'zoi_>)ՖpP5"Yu`c5IY?FѤUsvb 0ݍY>nfPX jY_4C/ y9~kx07hٶ-/?$%u>" JssmѥUj=Зf3o+[3NcHԵ=K IA4>~7 #&uk{-.y!bk(McvEWOH$6#Rv|۴f氭)m#0V׵=GSBwO)My#ŪED,Zd4h{'t >e>3cyk٫^MwӴ_'|#kߏ_VF5]aF!^{i63>Mc 8wazW퀯k{2א-iA5xi@eOVN'ٷ޹ib0Խ""j^FAРkr2>?݋  aLeS}ltIe 7=ws bGCߢ8&^Yrd``dHZWe!"":mО]Ky!-ˁL 叶ج5^;{ma:\{B#"~A(5x W_90P]e7ȻTƋ4ހ7"'n^^B˞wҧ{э rgŞ3>YE.ڵ|Fk ;I/gKC.n]ͮOsݸI8r[pֽӫ$][evO es:㟹ϑulm}ĸqt#߽o~,9&]F@~_~ݹ`&_uns>vTԛ!&ֲXc-W=col$r ?/-c_r?p[GF=s-^ `W~=UGX K_pG̣sFVwH x &"q>IPĤ=獥_j4{5v &lf#{uoϝ 8vuT_NkG6m*VC&l9_]n'nX?|:w.}t:~dY~O93Cwֳ/a7y:2vW++.۶#""o#n'O~tlRV 9y8٩f/zh!a%&ID:R:Hze7䮛Dz8-EĝEw|U"釓o8ٖe/=-O"c7JXrI'05]umtf߿6[qůH}z n[Ǐq<[t-Mz'7 #!7YY@PhniznB)ٞ8}zDY{YRCH-:WnH>o$iZ"ᄐr)iyӝɱC)M0 +Z/ $;lnҞn}ʹ5Bжp \-C~(:7'ߎH_EDO~ G0ųdA_v˘g{Ys?:wM13|R< /cn DAylŻ}`$/\+[!$""27o۪wf5ҳpF|ؚ\Z+c;o#=;cW[kmvpbZ ;V[XTf 5 0BgplP:aÏEWZmgoSPa412NpK36Jws0ŗ~cTzڕ6-r9|HEDNQ65.F6K&-e_埝q}`daΘp[Fۏ YYیуiCXx Z&0ǎUFIQ1-iێֽ3'2*]e[h47)#ho`1 ߍ\w8]6[٫Y"~&}?u:p͌42ִ ;|Fv{v%7k>jY?ܐc@P |~/gc⊈T f|bC#!h?I L }vf(EDD4 IDAT Ɍ ǑI/xZ"""n%˫iT#=E 6*N " ZMݴj7刈xbSN7ZDD/""" xQ 7| Nvy~(q9|x{{pׅHv*cӾ_ Wio=IGftiN7֊06_FxOes_>v:"" ?Ono0So|Eøcz^!oEX;Wcdgxb`'65 ]ɂ <zH=x?^ udݹ_]L 4ۅS9gPo[^c*I3{ldM. kqb[F=>{Jʶt?s%/MDmќul| 9c4MJi޳|.|e5sVѡ6 ғ3|m7wr/gāz|3 {~bmXY}{{q_8OX׆3Iirtgqm}1|s8"s f1m&=7we<ٙcܹybe_w>O;[ψ1sp0=zgse[b67F=Y;䊡Op{DDN h6W3ykxCmB5og“wɇ<}:}`8f>~:'8κAVGeVCr&Oz%ݯ!a&u<}ϭ7)6jkccJ6We󋯱)l0/y|.^NgaS\g"o8m 1M3{{FyOCgRb'іvmk;@`_zw/d󊍔L]ͺpzwȩBKL&3;Cl[&tf߿6[qůH}zb H^y}.;R}h-MVW1lVAƺLVv > [yyo$iZ" #MO9ڳy{Ο?ff|ǯMX0*Df3H(E W#"r Gzw߼K$5Lvv=:ѹG 'hK||e`Zv$ֿ| 5xҜp~Ç=Ӷ}xLS ߬:"u;If+;ݞLZ7`吓c^?6Ĺ4ݯ4#[v0oŐ}&:fm.sDDN倷.>LC a3W|E6]'͹:Mt~8#ގu[$zGw#/Nӊ9ޤ KK^Z~/"ګ-"b13zFAmnG|=om.tއ&q19ᅬ/XXG>7r3iӪf3 P2)eX v qVs/Wp:3fXst$izԹO^k}~&{z)z.?*&i;sN3dN?M})N#5q9`eu4r#?p_ظpc/+kg򺛸q82_#alE:>q'9'"/lhWmEo/_32_Ee9O۞Sp8#&ԎZ<6<}+y7+{.RWX2vw9+ڷaᾗKyar_˘جe[8""';#!!kY)_QӇKyv-pWG"C`hi,[lz;1omY/h[Y+T74> xFw]c6I."" ^DDD""";O7B """ ?VKoV'Qu\T~'YDDNZ/""(EDDD/""" x(EDDD/""" xQ(""" xQ^DDD"""Q^DDD"""^DDD"""(EDDD/""(EDDD/""" x(EDDD/""" xQ^DDD/""" xQ^DDD""" xQ^DDD"""^DDD"""(EDD"""(EDDD/""" x(EDDD/""" xQ(EDDD/""" xQ^DDD""" xQ^DDD"""Q^DDD"""(EDD"""(EDDD/""(EDDD/""" xQ(EDDD/""" xQ^DDD/""" xQ^DDD"""Q^DDD"""^DDD"""(EDDD/""(EDDD/""" x(EDDD/""" xQ^DDD/""" xQ^DDD""" xQ^DDD"""^DDD"""(EDD"""(EDDD/""" x(EDDD/""" xQ(EDDD/""" xQ^DDD""" xQ^DDD"""Q^DDD"""(EDD"""(EDDD/""(EDDD/""" xQ(EDDD/""" xQ^DDD/""" xQ^DDD"""Q^DDD"""^DDD"""(EDDD/""(EDDD/""" x(EDDD/""" xQ^DDD/""" xQ^DDD""" xQ^DDD"""^DDD"""(EDD"""(EDDD/""" x(EDDD/""" xQ(EDDD/""" xQ^DDD""" xQ^DDD"""Q^DDD"""(EDD"""(EDDD/""L|"""'9k*EDD0T46cX~΢E^DDdhƾNDDR(EDDTk"""'%6Z:tII3Tv3=vgO޵9X f]2sL-1}^DDUR_>NNyٲ% TҲ䓧X& .|DDDNbpy*xFHIUb<}qL|KoVo= 2mHHHh1#zYDD4`uH#i\^M]=#""yp0{?V-2,KGNDD=03h7+K7޼=:""xYWgoMEDDx^PωP6[ݻ?D\܇<HMqq2aCE3\ r ƍAHH]gL۶:"""5u3gω<4tEDD\92cGU? Ej0 mS8Ѭ~o߆Pa-#"""Y+oi""" xQG]?a2FFFtlQQ%ѱiLǦ*Mы4B x(EDDD/""" Cw76Ź+' Bc!7ooRa߇-F@[eeaY_ѭgg.\u,-z\KvD/з*lFo?6n:>Ol/[?t233l<[`:1Mo2p`Z7T#Cne=rݖe-qBvdo|=h(k>ڵmOёdq|qq%ǐS̼ u)ȑcXU6aAv[,x߲j^܏ne=t#// rѥ;q!vBnE{ƌ8&Mfs!lMO(oҘަV`Dz,rs ҋ.&sG8sIF9I|hvҪ0 ,L JL(vX8-J%T]zWJ|"w _4䋦4dK/| 6= y?<5J}?dL\玪w_j:^\gOe'4;A-s/M|N`.HmN땟0/nCnn6\y"b1O^O; V-[ğ).T iBfV˶Ӿg…l޹";A-:m֕ [pJOV6?zw4Ft irl-m$zmgt8*cXEo{qH^.G7곅lڞќ|BZҪٜ5f4"|\%Opw GG``pfJvBMv7끏z:spSb %0.gELLlEO2|D9mcS=c3q:[MKtW4W gR%* b'gнMa)sv0rڍą.|RƫNy ͸!E߆F`]oѯY3 2M,²,v4a 7гkwJn@ʏP}1I9QMpfeךE˶7TdQK.u>Aពҕ+=bAMOiw#ز-=sFn!6޽ֻHǔXFok.Ki;pagt>.ʙB#>ho&F/Y/Rk vن"7q%9)?ӁnC tE-lI Sl8{ ̭,2]c{)8?S9hָdf!ܚwLhaO݊ÌUczӓho~4WX> #66GӉ+$~dâq1ac{wgpk8768?>}-ZG.|-$ٳ=`ىs[Ǔ;3}|st|Vb;/>"}_M>g.f&)5m=c}hKp?Dzq:͊kVbӵ#+½| Nk-˜=*or}[|=+o0(am/2_( biN'ie fUR\RBr^϶ :];2+yZ_.Λ34MZw>m^>JEӯMx ׼łٳ |^}?½0­_p ԴTanFٵ5;I,߶>瓳s{%s"6-Kj`4-F`˙tq7C&Pq^ahO_Keh+V Y:,X3JI|>L̸;o{{8j;~ހ{2s+ڞ;ɻXz$ ,Z#66Çh<'O_ݨUW=*OHq 12`&;}oJ6~@sN//dq\Fp9k3쀽yZG]yq={HޞDD[E+g۷c&$z{O|S}Ml\+FIp`vv>ck7Uf ^zzVsb]T8Z=rBeO+\9n6Y>UFiϕOW ?>e;p:q&%5SW>JKM"99|$eh 򉍎!cG.?z&%Il\8wߊf(:|?Bn˙O!3:V{zutw$x'F'{Σh5dD4mFё8ɴ9|G5'z74}F;p:LOLLKvKqUj KӦ,hMjjVY7hM'9}tVw}ECpR6#x۷ oUyB~YLpE&{ 30la0 2(*qScX-mNMjzMJFx4KwYFroU |sN'%'v^aQQC5#2 ,6+-I"Ԙ=홉E^< ǽI'秆@>oa`Li*vФ@FWmCP޷-Tp9jj#!1\8GQ_Ty縵ԟ/dZy`x◬^;f}em OɛWق8(mo  <G3T{}c]),1{Lk?̨Qn,`Gi)5u5N}IZk2 ˲0 cw[\(4`iG{Ii/Ɍ϶9V܊Km_ڮ{|H4O SںZ"Njx<,j_ M$~to ɳ%-"|Ow5p.f[%OdlDZI3@. X`L'=Or4Qw}}W6˖Qi1V|sƕ{n@n?wtDOi(Z/Rv8Hlzqqq;j'|a8Is~׾Imܔ5$CZ>?ɨ΢=4$sBMβoc1!;[h)q-N641.Ň*̽!#;i<6$@Vj<exRI7M藀 )uxs q׼07{EtΌ,}|!Κ)`˲0un 2 o  37Ma ;|NƚWVP}k7×8ӷE?7m>Fc)N}o+3)aJ7sE%{,F$SQUNZj/] k֐~ 1R0Wp\$$C[r7_^cڭs+ W}loWp'f3iD0VW}wU/=CpgΕNUni|jYOSYYɦE wlҗ8"~?%?(-o$k0d懶&3ŞL71y$+{8K;@>LX$k_]×@Ɯs_765flXKSv'eaٰ>_$18}9m)6#n7J#QU{U:1E p:(IE{έCkÜit4ކ+;M[ -6c"Ri=Ӏ'*Mt_;]QFiYm#ijm8Ѝf(aHÝߘJ{,BUUTMGu4݁;4Ӂe8"<BEޝ33RfLF{}s}>/MعΈX2nW /C=?H_ IXͨ"BpteҘܞ6TU= ?,|sUM;W{)젻NB,#6e[Xs;2-g\*qfz#H0tNtI0$o̥i@xEƉ_=gk3c= "#$) !iK0.!WB! !B B!B ɍ-Q!܈++y،Bqm!8)B!x!BHB!x!BHB!^!2B!x!B\Jw#4 IENDB`gsequencer-1.4.24/docs/images/ags-automation-toolbar.png0000644000175000017500000002177213246707333020200 00000000000000PNG  IHDR:$o bKGD pHYs+tIME  *:絶iTXtCommentCreated with GIMPd.e IDATxw|TUϹwzz BWJ TA1 (Xu]GGXY}|ݵZ Ifν?& aɄU_! Nr{o&{9ߣj!B!'zjB!☔R :4H]"B!8Wh&BR͒XSZBI$~=JIũv !M!B!$B!BH"!_CքH!8q^)Ar !F&[ ݗbY郆3lڍ{R!B!$Bu /( ջ}ȝ3\(!BH"!8@)E||<ɩL2@{IJBۅB!N̑ ΋̍? /2_Oj B!$B,gM$`~>ï?x0HLH$6 y<{̃kYB!$`aț<_zSll**~ 3&'Jr܉VHB!?4 % rլ<'jl 'Lpн{Y2x9g|UQ!D~r$iz,Z1 f974,%k^&\O_1N[e4܈^3J;et;33'3uKqƕ6XC5ˎ',3xi:άػ>iqٲ+㈎$>!н{ws!+7;vm'wW`A4MwM!B/Mx7ՕH9a5D6r˲hhǴL,ji<>h opư\VMi~|!=g;IhB蛝[ݏg(GDbS1M;4A co>6l|#e0gB")[y #ӴZW0"?xӴ-Ͽoȯ44lhJNc\/ρsȻGj%o4lڍn\.7o>L{~BBzQjq\(+^=Sf1S!I$U3!-7[ emi6mg gb ?>Y3fѸs'Fb-ތJե6Jbn ,[=fsNoU#/׌i1M3LL3h$W63{S<:} /8ߜ:ڋt+#:2%k0oݦ3r$ew%p}IG ,0ju`0ޒ=TUW2_g-6DR :׃]3{HH'TF9S^^*p:|\z[uXv3JiG%B!ĉ'Ddlxb=P!45yZ ]H(Jyڧ*+^o#nhgI9x5Ƴ&aWԥ۸.rFG-Q[]ߔ 12RF t翵'$`h5Q[[Krb*9Cru NF) -L`ǠA0 =L^=A2Fu Ϥ߾<ҋNO}oHS\o&.6".?pM),_|6JgW17wӴl5[Vm&nO fm=4WumsdM)༈w^z[E! %V4([-E5lzgeSWWMcx~9|f~21P&ӴL cƎi׈DDF3da8^Oț8M)ͺ}D%[{˹-vۡv36mS<$f\I!Lr!/2.qcqy455UhZo)+/Cb|"^~{4N/;zXVlBH}&FShU- !Xbӱ҇sF͕ |{{0H%Q_;iƀgw6~F,%g܈=-o-_:K>Kv/HNIe~<.~?۷m7~;bS#":V5?߱^WHw8yqN-9UWo0ox^1l mBHIv`aq#Jwg[!%m~N̓,7>-Ʋ,Z4`ƴѽX^XΗg ^GFzwٹDJ$`%(jBKψe1~䌊MHLJe|sfh镨]+m$mN<Spp7>9zk)Caț4w!MMbD^1h%m; +4vPES.bR{S_P7uWsNzu#PO$Zir(Z*H) =D"0 7nd#ie@|7* gݳiDEFgvn74nnxK+tnb"'5;#aY Ƚv`fKgb0 ǏSH臯g/rD㉊tG?<Oqyмo^{OWmֈ$iy\0rLJ4hR>6 β5s{mλϿκ^"^Ȍ̢wl$L#y@p] C2/sPK/I`evq_d}UE{]tw Zf%{HX݇CGWVLF%9! oɢ.I$Z{$Ǝ{ү%,|ν:@sVnb./~O]]zRУjvpwkbk|)P(myoKODχ/"}bO6,cY,r~SL0`#Tdp}Ǥu}UUJ|RRR)++匜\:7+FOK=WFbzHN76Z.nomI[oWC_x⟻jY}{&vXʣ~=4Gۮ]I3n'mo?{?8gp:asm&,ѱYol .cekgOܑq?xX0#.![ *[{hn &^&COo閜B8jÔ~֗isl҂B=J㛵El* peAUմ`5/|$`S'nݢ0.Kh)3['&&e(cDkL4 ]uM4m}ֆgęg{RRzέ;:yTm~ț/|ÌurnL9y*_u}Bʙs`eo13f|V@ٙDB#ngaWS_[M%G'G2iu=3"]~׳dy1c&n?kDy9ģ{^8iךM$Y#(ؼ/p&_,:ThO>>\C'eanj*+Vof{FޝL첀FWDf᫱Qה6ԏ3ّ$ h(ٴk4QJg%v'ڀ||+{ŔQ٠uZ i|xIkΔStVյUҰdbӏr$""zi|jٽ{SUY0lJFF9w^Z&[(nG?y2j}3'&1Dlǁx%*Lp=S9v~:6 0+vSAfKcc=zLuVK6!-QEDSHIuh0GF4(1V6`[$wmЦ򐜖@}4U_SӐOMքL"5R_% {7JClD !*v/{DO갉=:B0aAÚ޼,&Cی-d[bʝ pxb8ܤ?w ̾3X\p4;G|z^[cG Gmׂ 4:7u;"næ1- *V ϊٳgOuf;%Nބ ),dq|Wdѧˈz0s$xue\i؝.;\D'4 t rizG\JFjY.#8du/kе{FPMӘu/x߳mSag?Y77x-UTK|L3xBq`up^kBS$tO*++x_nc uW_Ejʥm_/&chUZȨ82]Xu`|VR S+ %pm' Idm;?g_ǐ65?hI$Rl3%h.dCDK8%k-~?g:)a > :2rHk"T:F"urRlvSmˠrc;ywϤgi*IdN?9Bw쮍![1+|9NNJ[L'4'&HŶb4< 0ؽ4ɾ=քN"Ѹo3/J{Uc2%+#22۶EE&/ndg7F>^^UȨQ紕 H2z\OFuu8[z]uDD'a)2 ,* ehluFoKuF' wRO͝Vnv02beqx&gX'g_zqעSY%p\kBS$Ŧqzbbٺ} Y8g[H6o$:: 1(/`PE(ocy;ޟU_~~zco]*:):"!k搑= ofQh 3:Di:X4-/eE쫨;dqn0ع:Rn8v1:e%e{4 .{5aK=>ǡl7l`$gXIk4e2XoYsb :zw\Eu4s)hVZu5ckOֈ i$fϝA7 ütAju|2;vUG62:nIp k__)!33n%cI ٗLj\)zܵ&8ecY&EnlRD~7a6'6&ݻv`R\zG7?6TpnYV25ji؅'}IVdeW!":e D寰R\<DtծgG]Բ,tMk9J)֍\KOT*/8biβ>|=I>O_y@iL:}clIs,z5ehNN;>vo'ϋqĖiG劐seW#<Ȉ9GV]Ke=o0qݓc]7&|퇫t|ȁo CSSBS5pDkYL;nil,*gLF\l;w⽏2xbZ6\ +a2^$),kխ&6x,ˤ| @$( #D<ЛMH'0}A)u`H]79ֶ۹ 4lϛϑė/ ֡E0[y٭4Fq1:y\6gַ_t"a#q)+8,]!.p&k |ߙ4n R\DB|vݏ2$vXww[6~<BS 4Qaj%*3n*l6> NuZ_Lc]!\M6[ZNTzBhmʶ&VɄi6u]"ёҰf薅!kQ{|IxR؈="ߊ%N'eAVӨC7Gb")bK DL)711i8zʢxk1}wIuCY:6-5g%E2Ť81 ;ΈXF3UE$f+L|M^t foؙ Ӵ70ס]5 #e?;RI)_9㊍!,-#p `Y4]2S4VV0xWUpa[ ۱n=Mn=cEG|# MB!q }4 s&7z-瘙4L~vG˻Y-UZ??цw5ibiVj%jQ WW<.W23GDˉ45|M۩A̠Bi*B=zǚA#=92!G}6 RG\a`w9,c{OcQ[Q(>X@h6{}i2WP[˚5k)&"ՁMRr߱VuRIDATϯNzLB!DscAp׫"LEթDUDJۡdB0M|"3:}\˯i4Zim[R g|VЭGX[wҰLbgwg|} FD$uR'G`j6f DTќ̮Y7aOcvt`fTu1)aO"a_WB!␤B~'Q!H!B!$B!BI$B!H!Z^)Ar !&!BS%B5!DxIB!IBt+wH$B!B㧔,!BСCիWB!СCIENDB`gsequencer-1.4.24/docs/images/ags_generic_preferences.png0000644000175000017500000005315213246707333020434 00000000000000PNG  IHDR _! bKGD pHYs+tIME #|iTXtCommentCreated with GIMPd.e IDATxwxnBB -%`DzQDE"Ćr++ZЋ(ŋ4C Ԅ )#!u[(~'3gvgsfv֨0MLL0M0!o` a3J=&X `ϑWaFL p]_0mE˔XNʜ}Jtʔ{L-Sʔ.mSϻlW7uuw^Xɶ(Soԛ2eW]=mrۢe\l2uן1ʔ\_hQLL xt%O4]py.̳KTeJo])|-o-gzRQ )Y#rNNVx FՅG0KOv#4!s8n0v[ zuyX]4}}96i*w) w~ŋ!wU$Yݕ=e)d׹;D|r?}1 *If߅cd$o\&mvӲiyrHo5o^:I Gؽ{&|DNK^n._wFժU_]woF@RO 996 Նa`1E0&77wnz1)KgJe_эr3B鼝#'e+a 9fqn)9[vd/߇??1>?Vig5zvl'k21KLbc13;JiG'!u$ez4IHNLVDL?̮dHnN\M ]|с!A3ػ9}:W?1a%wԢIfD Z:Vj&=s+--)D^FlNUBf/Ћ}۞>{(ˑu0]Mu0< Ӌ:+K>˶Fŷdh0,,=p,_Ͱa (qfHS#7'l6 b1EC.%ˊ9j*#Ư$ n/\µtݵI,_ccd6&}7S{c]_]:|4 T>TY<2M6p1g u_3quզtjQgbi؇1°ͦO0!^Uڨe}N}c/L=MF:U9i `|5m_2l0وBΩK= lXX6k(BɂrZoO1p̜\oQ6n˜Ert-~|^NjȆkm 'mb$£U^^QvHUvb7!nٸ+[۸-vKLwp(7jJC+@3|Z@}"ѹe΁aMgvL RP  esa/p#ݲ1z4ʗsrt?;m`ќyxB^ݵF&z^>-O]֔pvk l+/6 XVtռ;f|bB~\h`gQDteffӊ#嗅ލX,eS4b)s5k___jժ޽{5z$+$f^-_Y> -oFFHy^={@{(niKίb6~vk;peb_MdN/;XŻ"a:F~r6ObUoEYvR n&Ą2w4Mz゚CYvb{8`zs0hL4]EoW0:(=^'ogn[z E 4-*NJ/r!__folzy<7+z oF LoGF*9 n e/B\Zgv}GjyZzO=ցo= ."rQO<‘S> 6ofqnxj;"}jC>͆xa…w' ""c?۞ ,i b)E# f ۗHV.JXoGנJqm~'M\F'Qs|>љzc}nl3^sOrU(l$n_/g+R(n{/Þ$:j^*ʇ/L'Q ?>[-okz#$AƁ5,)+h'0r}ҧcdew6G)V>a_,O/94w\ Zkz5u7Z QqSxC5ySKv5&uk==-ϝowx83fSF=πkwɩKǡs#L8yX;wO@p""b>Vrki1%|ܶni2xFeΔψM! ~^| ɦ[¨z "ig|c:5{>Gqp׫l,x47}OIOoYv6i;l}k/廗_ M~ZlҾHD@}OhEгuq/?u!鎩D׻Ηwz]=ۅ!je-7⚞ n!;1M?m8q֮!Pϡräߜ ln\Άw?eCl./g5:7"<ƦHI3!-^'O [Fz ;Uhܥ mSZ7ztWdт!thSRF&'7|Ü~͎>Ѹ;do;.nuKl־=mG,ٜ՞HD@yOݨA'h1߽H!=nS {{kx|?nžkwKlj)d䶗!O{R5{HeTC߿'*"*V,֪ 89։pé ıb9kc? Do_Ö[I1=';⺫S }Ц_m&E߄ЯL:5o;ОJf?~FG Gm4|ݬA`őQ9=u# :Iga| _g.k ^Ի]Qp`HY5e18䵋uۣ4n`eʗsJ0ѫ?ҭׅ$q,7~udch2GZ B6A~,ߺ]ͺЬU;x1mg5='m  6 !!͍#`#oxug6peDRᰗHgzGg:ADDԍ꘱9R|зK\N?/{9j^/ٳ-_Ƅ1l{n/Jkh lc鏿? (U\8E6'Oc !$Ẍ́C$r agnVA+ԑI%$\QfDwV s˻cfd4/F;txZv6h"4¶#)R!~Y""(OLK>{azfe8ݟ}ծxRiҢ&7$a Mk[aaELjNWGNh`5 #Ԕy5️k [&;3%'2] 㷳ɬw`>3kr-0wwNײ7s3[&n_|.z:*{}CLFa2-a|f vL%Mt, lsמFxm8N哧?#\߷#kP%86]ѓ6Z:+=eurU(l$n_/g+n9MgD2w s暆eDD >=Z6<ޝ=Ԣ׿z6~z༬Qjn֎P-Ȫ 9S>#6Ň+F2GzU6n3 Zw/a3+z.`^ߛI~*OĀ'8zQI'A{c kN잖Z6jл7 8]3懴/L(<]a#šٯ1Hv?wrwge,+PA<姷!&.>Ν3uL=O g/trd -ޖqYX2{~ =\4.k@l!iOA"<ƁHIK!NXOj=?-IK>DOYОmc mYq4u:s1Ie{3wNEiޯݘ>bC?'KFS԰x^fAAʪ,IA>k+X]e>~ڭ$& io^NH#WtO@j&|9ҹ\]zČ= nzVg5D,yQƅѩ{_tޗio%"pH*)#d#).iXu?uYv4,}/bڤg101뉗Xi=ie3R#"&&GP0SV8MWȀG'|q'I9dV|Hpw,E쿦 =5 ?}ē ub+PmTs, C/&O`߮EG6obїDs٬æ{vd2[cQIѰ칹kGGboԤi~/weMO7=H292Iܹ߿g]m#9fFѬuӯh4^[6%=-Ӌ9pR|ڂ$Ԕ^ursM8D"hзxsֈ""(t!61vnShKW˷Rձ+kQzXƋRc%~#7bgRE{)Q?i3&t Yq#1a/լ^>Ľē&Zn?;^~c[> !ukX\C/"# ~Zq3m%KbEZa5BA5Šu[:nZկMP.\}{_jIMɣVvW' #9GC Mk[)$3OVmqȽt FNm`-d2EպĿY-$^ # ENU.?OLTN~eyv B͖jjؘ _q]aS(q] g r>};9d6~"aub_[ܿ.AdV;lϴ<^5|M'nR~Owi<n?kn#d(߲]<l?_<} vVi0Kp,GWy~,?O컙E?.|ZYs0}Y;+nqblUJ.PFDD:N:S=h5GߞMꞃ$Z؊vgzB5Wx40DM$ zQT p~0%lA~OzhY1*mB ".[w9;M8% ш\Lԉ39q^~4ch]N̽<Θec >Yh%}y:foM>cF0{:9U~ߛSSkc%|:MX3>~?﹁Fdh6N7c|sԵ8OV kq??>Ǫpx@\U}'+xl\wYpY8c셇fr }G=3ه y@R;]}tv-ڂW2bVrݷE2kK}q>õHߧ`, ?k;S~\cwP'=vm׏\(ꁗ;ܙs]t_:74,g`j=?-IK>DOYОmAʪ,IA>k+X1stVvM"-n\LۥW)8a:sW$X4ʱڍ#V>Cdi4/kI ݸ ~ʆR6YMm6LcۑY™jxfZ~Oӣ}06x^fq$mkmI4g2#i ׍nX |o٬Zl㳓ЦAMq)}K0rڝ::Bջާkזjq oB$|:Lzl׏Kg/8jaGwwa&f}qz&8 u{ K-NOAԽi:uKAôHe!phs |]G805o5f9k'+#4j2#/nAن/O$, <\[#,0&4~^` rjfq2ǟ~FhuX):9^r .>ή%qp葢#ffc?YP31u"C,bs){8Z@,DP9Xu]UyԌjNuF!M뒶g6q,c;{nLVjF6u{yp'Ͷtl_CP/8q0b>Vj_֬CjצO#B 5!3v~ {vƒF6ɲ[ hP"Wǯj)&$8:Ҷcfzl> cF%++W{E 5ЉJeZh~7 C363~ud=\KXL↿=@<_H>F:f=2+-aR'oQ+iQ~yʹ.o:p8L=5?h&v{atr80}gвTϱ0lf(?b) (WwXMםZU17gqGyjSf]=ř-$_L][lކ?Ţ;\l.O=1E;P3%ddR i26AڎH?OjEցգ4"hDzŭa۔*_RpDѠa FA$ĥH8HQАⷫvBP|7䩃(z(#bY'( [R%u Y묵=v%S{iI8~|(wUvX61kgV^1|V=_3B޴G6Ęҽi~~~ L[ei4DQVaMu}tN3uuݴ_]<ƙǫeɪ 6:ԨۉLݛ[zߨBi{SgUwHf߿ǰtk+: KA6&΢_p>mk˪:<6LzcHߟ}#MGӹٻI%4`6b//5l~qKn&H4GOcͲp?F?2Qm:1ɗ^Z"u߈<M6] hh¯t֋jAyYlϴ<^5|M'nR~Owxl#fݏ?=b A}K lj?q<>ALwg^<–iSc֝'lZxCOd4{tzkl@ \5bYoH¯JZFZ37,՚Լ`\yC_'6ʄ3i=^\/՗kP']FM]큏븞,N1op9qk /T=Eh߾}Q89~,sԟ ^ um!9S(,rgs7H7è.(yDoYd>y%{UzHn<{n1t N¦gDZĥw%s uNeQ eސFη󗡍i{Xk.>6]ko'ṇ8=_'<[%1=Wir]6fpAw-ٻɺS0܊%;1gYGGKNCcss_Lu=η.n ucO!n|zË#9;ɳX"]:="" V\ iF@`DoȅM# """R4"ib"" "G*"r5C-%,!SD {7ҟP"""RI`DDDҷ`DDDDDDDD@DDDD@DDDDDDDD bܽޤ6<*~`Ӳi㈈\΃+* z-G8yZj\*>bi@niQCuY6{4 =; O}j}FS8<%O).ERFֵU${p$ip];b^||' cI5>ɉfFGq'@WN@~II6^"rx/#CƑ#&Sו~5(@3ӈ"_޷{~?zPKqan+Zd㧱>ƍYo8Ԟ9M% f|ڱXL|6ƳۉE?3Iuoy%jL'N-ķư^9hXK;ݬ҉o֤gS㾦խ6 bU׳ud4l /͟ʡMi@>+HnmQ?fsIr$%AH{$`سr/"?u9Kz !d&audn!YdoN9: 84c ]:g'mdn!+.~$f"lWZ'ǡɘqrLr;5Sp /<Ρɉ;@Ɗ[^ȥ4/B';:GQI'+"5iI@ZC2e2 s2&F;9d6~"a-.c'{Oq̔d]&R p o!lY6𩆍yج@~p1L4),W@/|" ^$z:NdCǧLU3\T͛D)U۷zk %m({o'vqf{6[P_aDVLYkQg۳IsP+e=$њN\vm!""rA;m <Li|};6 E궨K|.:yB5/ _Co?k `;I{3 , o1A|&d;D\zV{ׅ"""< Gd]:_h'О| Wb[34Wq  GAǟEs/hBv<5|LahJ}5^SL'y0v($&X d۷/8!9~,ʌܫUZ,itۍb""rO<‘i{5R 5T6tqÃ[qXm'"""I# """"""" """" """r"T5C-%"""@n?Ɖq)!J"""rVQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ(((((((((((((IDAT(((((((((((((((((((((((((((˦&8'Q#TW#TDD䒡k@DDDDDDDD@DDDD@DDD§PEĥ%sga./:W{/V _mpL[V{_]NHSQ9t⏯d!TAǖhXW?MP!I`f|2NXZm0f7dJ ilӌS9f$Vʂ5YIjTo"|T?mla&޽GQ nvs$$! \C 7 +ZEyAQVַ[ikڪTDQ**E P0!䒄@Ivw.+W`̓as~7gs $Bu6odѣZ U݀:/B$ BΡE OdPo?æ;"#B{._q16Tud".:sJH{)++KP,a{[I9Sp$G6VCnLb v`BntCᢴv{x}C 7 sUŋY΁m xF\X"|$ݮct Y#$ٝInKj \AӅ|'"B;#Sun^IRRach.b\ċdybbH0-#GnN>ZBs ,jfw88B àcC/Z Q%sj\ oeĄ;h'w?ddnɢ00NsDAA%4k/^^McT:C3z:ǻ@k7^fa@XB= _+eI_-3?{nz2hNNXGui 9N=T7ISZ{A&?c /a~"O.X]8XBzeX=g9AڧAVkٹqfO]u2,!}BH 4#LrNr/s*OdAd^Jgst?%K$L}ۓJKgxyK4?~&M;{鿠޷{ۧ=M\m6-]񾾘MU1 ]ݛa`:fI7pمhN/%>n EkVADJ{Vo&KDD7d4J3_s95}݇2Yz QUYG;)kmޜ@Q$n܇y3rv^q=+sj$BMHx_" ^b6]<{]?X?dy!b#A~p{'%nޝɯ. r0u˼R,+sӓ$ vq[DZ\i3~ӊ},y㏤Șf?y Q"h:ͥ@´8v$  ,Iho4&k JU94>8_?./5{;,Zf ^>ހK `yRK{o|u$s4v,*'Ӊ{mtpo(6rڹ1oCj MUQ[4 MӚԸքih\1F0!aˎ]#GMg>t $8ݔ-K{B0Nh;ٖQϠ0j@w:t%,v,Cm'- C ůs$}nM9d\7OwfÚqG*a!A-OTsT59rd9RZ^J9a46F' ԰->عPɇpչ\5|1S'IVΆ5N^Jއ<*cn#6簾ރ/ZQ:VSZb6#ZFaԜ.Ɖw]%:u0떥Qx@:v}Џs{i$iLUѺ~i86Pp Sh&zVƿKSj8s3F/K8S_Hl:6 VTs]9tCB抆{އ,IqT<]U1Y'9uIюL*Y-mJY؆BӴ:]0^65KX?NHME#Mah-volJBZ'M_TMCTU@0:K9S5ze1%I?g `Ԣ.!囋aN林~GEf|3j.4éQmW00f Yj7tdZ̔%8ͱ ԱOsTǧVaSBo徙ϯ]34Nڇ#U=%dDV!&F a=c8Q?~'"`cJGO'~u> O.|e;.iU4fg N/,qȕ?!q7;׳{!$[NUUuM՚|js +ES .H~I kPeg jPPsNH5G(BBľz]kٿ'+֦cF[zS TU:F@ 4@u&oOoʥ_l6&NMimL}/&2st:E.An@ KسX 2K2Ajb&:z$WSCF" {޽eKlHٻKGOX0nxcHDQ$^$ ht:$Qߘtٚ4%*TS.$͘Iy%d˧qNOcۿ5Gs(o(̯@\elxoۯIøi/{bofWYKeH?WM.\y)fNj:y<|d2G_dRr_YbܠPF !5&$ fP`bztwdu *~N' 96'x9K_CE).ЖYV2yXzL'%^l `A|}z2q\6Y9ye<or8 `D^s&y;D?S#&!Y8sh@!V'y0*\qįBJH#>bh.˅$I"?H֡i&qNX{ IVp8T@LawP2֭aǻ_օ/7s &<̪ |c:vEe ygB{.w˗6 $L<9y}/W-`[ PkܫOd ݸ)7O";@=/<6yH[~L|cc)a=w/i>lHghh=Ahv<5iS%-3Z!C<VS'?O&KdϘ]:Wj;&Vk%*|FgvXp1!J k3VTrNma$w)mPؾ+ /O/M8ir=-F#pLW[PeK y븜uvm5 hLBm9l_mث+Qgtt5 pM^]oƠ^8U;g)1h׺Fd$YFVdYAn^1}ReU/h!Ϙ,IxGžgf0lPL Fs`6E1a2{֭yc=}puhlp.4 Uuޙ6[u7& dd2(]0{X册H@A6IHs移}0 o!thAinhHd4_ce'LMlH'5e0iʗ_mmךSmYeu-BPHgtMC6 $IjxNM>D"µ2&d4>j\oL:ܫr,Ѵ:q$IrLؽ\|9J_c}cr ׮ܕ blbXl2i$m2{`2{`Xxz酢. H((&3$A랢OC:  "A'.pY˲ xx "#Yų`AA!g ЮD" H@AA  H@AA  wfַ  \+" H@AA?l2x 89IENDB`gsequencer-1.4.24/docs/images/ags_drum.png0000644000175000017500000010525113246707333015404 00000000000000PNG  IHDRIbKGD pHYs+tIME .@iTXtCommentCreated with GIMPd.e IDATxwxTeL*I $i4)YۊXw]{]ԟ*V,+bJ H L d|?2g2ysόcǛe2SU_1W.!}2cdː$9TƇ/s ċ{QIU3Xqfg9T1dA#<3&UDU@I+4 []UKqM*46#ϋ4WKw GC 4u\G^j0cZ X>A ыf+t_4eT_Yij/Tq]c6rd Kֻߧ]E*syWomzc~u%X1co%RD`r}G;zujUN}*6(Q?.7 }EYvV?%;3k*f;>gi^/v0_7%d;u~pO+q]Rz=f Sjnkdn:oѲK{}V}xTIÿj)ફ}ŦCoeTt{U@|͝+\wɚݩظ\9+әkRrAF<2Ki{+ו:pB?Vq&Rb|'i/hu]zUmo$Cs뫗>֮̃tyS?Ny+,إk<\VeseOoSSu1T~kl")1%[{j[g#Q￾KzFr\YRzY4['%T!iykvo*;N.SǗ|h\Z&gSؐjCm/HSR]7u$UШiMC&ߦ d__9<:*[IVhs$#QFW3/C<ت IhEw&c^k(vO7qGCnЄ;POiKW)Wh+*WT9cѦOU9SެI̹)\)] ۞dot.׮;ډyx2ONm:m_Zm~w,y};|jhnN׬W**?J=6Zz)eO}i`svlMӡC:g6-[~w+Wmڷ0K?[sTa:UVZiS%e[o^ת_wZ]!=z+vCwmAC5|XVmLR^.mfWB:.vԮiveTNb}9Hm2ZV|W ϗZEM^o){ 2MO--TowKԙpk$"s6~J g+euHu03&NŞT-{Q?eO}mirJ7aqY.d9ŋtpOѕHfa+i_VW/.ȗ(7bJEtSD@zS=S{6Z~Ґ_(t".=PZV«β;T8zߞPdڕyy*\ 촶93OauLd9նM;]~s(hͷN2ެ_zT>ui̸o5o*3ZwQ2>pHH\gjj\1dXt SL\9w>f͐Qt\h֯:qtVJKTT`((V=y=UR\RWOfTIqᩝo^'sO:vk6uWw(MmN+RΝژvdŌSwu3Beo]K QgvR_Q*do/9*)1*@eJ2f1J>sz RTJZXŒduH{Ȥfݙ>3V#2Bz)&@4hWaa澌ޣsԵA[NPuNE{Ж}+aPGz~4IvYݮr1t~"q7A}q-:t W?jĠ6J}im3kk2jԐ?(|SGbELT'JZzn>uڴ<9D*:!AZV%Rn۫6ˑ-,Q#^fW*WަPe*),9~kX´״zo+q޷H_o-k7}nZQ RL\ڣ,2R| sVG.ЯyyN,-Wh¸Nj`8kֿg?6})UN'&S;oM7ͼBC?a'w;6ɿAc'<>*ޭIZUNf^>&L|YN,P-ZC]b?̥\un׭r~YRq'/੺Ҫ\۾Ӈn.)NofLI>no`m[ٙLIV '.U/-O  %qfg[>djnkL~5XmZ#iuCJe *oߩW]:<[{\XiϝJYG[Z'jNL5?X^UWQ MlGh]2,I3 Cid';Nvd';٣/ uɪy:asVed';Nvd';uo?Mc{q?>+gP м p"cbM?xe[`zF#&(K[P榯 b| ]Bt)2[)kŻ9($]村j]QUs+r0qэ:oD"Bl*ޮ?/Wt97=QWfjOYrɮSu1T~kl")1l{%IyM;QgP@%WɎWR5Z;t`B=:TL&W{`v;#ug+638}vίU_Ej*+kp6ιOz{/]:f?r_a*?ؐdǞM<͜}7he~q(*1Q_=g>>>VɎ(v^-~N={ %d?VR\Z5}5w~qBM CNNNzqC5rD66SI$Irj$"$*Y>Mڬ2I?D)nS(8+ivUXb}ir:K|ܥC>咔ӷʻ_c+Պ=.IR7l Jedwր>: ZU{9|l6\.W \.hˏp"@e*/-#_?6%8齑&»*MSxK9{v4caUE~4q S+?l@kZ٤#\:}lYG_FD7EĪ??Ϫlj#Cds˽p4{yg#WVR"4=uQLT~Yf :cEިb__?F˾%;;;;;;7LU8N0nLG&WoVǵo[SX*^ow=7kXm5Zvd?H ~_2.ȭΊ >|He?K+8w.B.%˔re///{\){YmY(?6zwzwzwzwzwzwzofV56Pk7{)f%-X#,C+uFg`]'ƧM;׮GnpV('砊%I);;O.?gԡCڷoR-<)XiZ4}})WСC}].<υRQQlv`ݐJJJdTYy p*&:F]JްNv=|Z0NNNNNNޘY?q/p+_ѫ+_9g/_Y'\g~P+'V)=ڂKݛ%̭*/ל;IRyY-fsT^^2;t04/(КV?\]eݿձy4WҴKKF}}WR":f;a*(W``ƍ@wKS]ej뵹6WQ!r}g^[jqɑ;_TrW>>>2tdv׮ԥs?0X Q/;;;;;;LT'O2%3MSۻwJJJ%Vwjdɨ#__ 22ҕlB{UHTx;;;;;;7۔{ ZDUso9^ZZm۷j(##UNΟj}$~9YahzU)~*))a~+?_/*;Z-;;;;;;7Zn\SӿXl쏷ɪV-hjF$S$)""@s?>K'O)dV_0M)+Ő*_n> hVܘ* RVTazޛFbn o%ڦm#_^iPw_d2+_!uvڰi&zW)ۚl68|*X)}WڱTm"tT*+7!;;;;;;s[:j_`\#saS``љ_n՟/IvuT8|*Dk+W(~e2J[Λ9QU5YUsҪ~֮FcF'4]2+kB;z.[u fi[?PnM; [ޛ9Q\[:t׺($ЮhI6Q폭V6I\.LӬ )B.K.KkmN]zz]).SC?Cx姝EGo@U͵ϰ99 -O6{-rKQ%.]-MHNNNNNN$SYضlkUnguc7!;;;;;;ms8|ܶ[e6lfdeO;;;;;;{ P!L2|d`maǗf,zAPkGkI v3^;gv_5N?6R]_%P<_mPiykZSm;:JwIV *3e{yz |ͳRȶ:} {u; x,n}Ir|~rt;~ߨwW̻kgRX\ ʛwKW'۴kPDU͉ZQ<ľEJjM;Z^)dhw*0Cg]<~];BQ3nSp\eE E!~")25xߜU̒d';Nvd';R;SUlqǦ}X}]1GW;~Ǟ_a*H;$]P@c+k`WٯiPdot?0,%;Nvd';Nv {-7G-j.2+2=t:n _t|&h 0*S>0S7TH]?C"m.Q9++o[ņJ*TW 9URl*8U~*̮r\q|w-^ר~u.UD!G۾Wƌ*9ʴiS}vdxUtZBvPާUXdJ9MskJtvn졈6ݝ﬜5]l|4gL[; wn#;Nvd';Nv[蠰Ȱ%6~~2[}luhxKʸn\v&(!I>j}6 9K.yPy&}pQ S>}Wȸ&B7mk p"cbM?xe[:v1.mSr@,PZINNNNNNV=t^FQUoh}I'uI(uE]jL>ԇT]9Do.Vtt㑿]n3PQo,:{7%:{^:mQj}* soЋSp;;;;;;ӻ7s/[@Ph2rU4nhkٛSwtE78{X_5]F _AΛ?e%"OՅcKPЮu볹<'5mG#B;\';^9WXK;fkyjN>ҁ IP2['3Y_<\큭tINNNNNN^NT$CgMڬ;(S]쒜ڕ4W?mڮ윃I[/>]3*:@Kzl IDAT˗KN~qVAC5|XVmLR^.mfWB_|Jٍ>: ZBNNNNNN;-p7mL-U\ٳKU8¢?29Jc.0fMspv%fJJo}TcS{6}Y%oι^ 8`$ݻzg1_*޽wK4h럙}f/RTZ`3t!) ;28,N\EN靗kWINNNNNN^;-_e+uG}O3K߱"ZĿؕCDj rd KԸȦe-W+t5ik֦&R 7:a)}1պc7u/W]:ܒ"tui*kUI2Kzwzwzwzwzwzwzދ$k݉++goUgjG5:gt^۴'&w{jėܢ?$%~=97h'42GeyYڻ5I]1'i5ҕݨO>q}f9|:蒿>xE=6Mg;;;;;;ӻW>9=>9N~X912C)ɊRUU'ٙLIV ; ,̣sKͭߏ8NT՜b-̙3,;ac잮AwG섍{6 UozOējM:'Vv?IϵI{;/d';Nvd';ݪ%9s.O*))yrvOVDUUTu.1ݴ $;Nvd';Nv[ InSӦ=h+gd7y&EYyI*]iD{:`AVas|*dI݂d';Nvd';޴lSqf?1f,Y4 Cщ79uxs|5|co]]ӊghyJAmYکzk~iU3<+Mfa>pV>)g{`룔ʎھk>r~9H+GMogd';Nvd';NvϞ>\yэ6ys܌F?>>jԭf?tvMnWtp[H ^Ao oo+5)dRn~MrL;+t֓qmڵtgd';Nvd';Nv/ɞn6ɪVnoڨSpƎVW<~XީsdОEv?u_E͸Msؐϸ["!w*rp>td';Nvd';Nv{KvS&s럹3U ;vy,{_՞el;쥐~Ǟ_a*J;TP@c`WoihMvd';Nvd'd"S*N(yk+_Sdd쇵scE\WFSmd';Nvd';ٽ%;)U蠰Ȱ%6~~2[}lu|܌jje*;`zqַ>.hÐ7hW0UӺk{ ˊϸNvd';Nvdpe]YkǞbJv'픫٧8J+tߍot>R*sUN?~ =xUz^2wxͭn]U:HQ}ߕ֗tRXgdR[ԥϴ꣎O}OCbEWO7V~*fXt6 d';Nvd';ٽ%{ywe*GoSHt*ްL_P;_eQ]9[+EmbW^1p͊5TM_*)jNLuJRE?C}:IVрծşpd';Nvd';ٽk?]Հw(Ч J׺NpdȷHBcY_VSQr$1e6JS 3Ps[Sz(g,Z̲﫦*F*J+>{T -F(eiJ"Sϭ_EaޢJ;lSҢdYu50Z<{Àm Kj@":;*cϧCgtߤ5߽Y*5^W=dX}fǛe2SsNJUMV93νw+halSQsIHcXPzsVe諉]xqӆٙG疪/n߿Nvd';Nv@p?̙3,Ovd';Nv܃pײ_d';Nvd';ܲ/?-aaZkO[ d';Nvd';4[߰IӦ=CxhuxhմijM-Z9{Mh/jd';Nvd';4Pֿ6Տ?ќ^uߩ'|5V^ݐQ;5mڃ*))%;Nvd';NvYx[Z'VQU>&lfΜaDV^Տ>Nvd';Nv4o=>0|zx5dՅNPqINK;Nvd';Nvy/smmNNj* ggMAR#פ*ux+7+gx׿ޚi ƛ:نBϼSw&ӪVsnTO~O'>]6Mԝw]lu)'yIC PQl}yKWSjmҷWǛHuLT՜;ƪ[re@fVm;;vg[%x] 1Wa.Bd; 1 <ɬXGm;9C^Vmw~abRkպ3O/r)lUeU[TҲ}-&Vʇ^kW=r/JuyܣY9;G]jn;Ѫm[4%I>BwSt} ȮWhI1hu)jkZr{\ˤwժM[u:+gp'lקA;A &= \z{8&##Qb4n/ׁiyJqr+.rvw22C)ɊRUU'ٙLIV ;L囗˧0e|rQzO;_구!ST{r?Izk 5ycrvwb5/*46Z,[]jn[jz B꒵/ Ed+Rmi O>q۔{NhI@+gp'lקA;ω6#O[ܲOޚi %\ܥUWQ MNT՜?!@ͭ'[Ue sQtc D ^{֬Nk-BV.4&#:QU}Pk^@>[|ap.plGpuֿJݶAH?kO[uӠAt'܉n'IozP /96 C皍~]v׿0/ϝ*Ee`@ͭ@cuĔl@U5_@>Ra܅n_- D^{ܲ{\ s=VNlGp?Izk 5p!r+gpZWTU_Ej*4#:QUsb>[`<5lUUS]|Ϊ>kb4gUӝD+gp)}yMe rvв:QU}U}VSnҠA$\^7$F=Z9;;e_> D ^{<[I[^84Յ5NTU_Ej*4#z1P?+_4[uDRmi Oh䖭4h{'x rvwu*jJsVeX(+g֬Nka{]v׿ƖnZ$+g]luhLNT՜򔋩r]{a܅n_- D^{ܲ{\ s=VNlGp?Izk 5p!r+gpZWTU_Ej*4#:QUsb>[`<5lU/ E>Rmi Oh䖭4h{'x rvwb<[I[^8 [9;:PsИතыF[ +g▻5_bقXKU5'3Ie sQtkֿչwVyǟ<+gpm;QX cA[NU)9) 59% a(:z?TΩ;{;U]wzwzwzwzwzwzy1>QzEt{D4o~ڒåvT#u՗[1o>zwzwzwzwzwzwzށf91՘Tf2INRԣ)$loX/Ro(6!^ϻRa߸[+EmbF]Jzq©7+:PQv26V~ &;;;;;;{W@MTU_Eը\{5iz3E>UPPu%yė!^#Z Kf~YNGɑjڤ6EzU)V]{җ0;;;;;;{U@i޻X56j_nGAS~PMSdQ/Q!O7B웯[:zwzwzwzwzwzwzށ&Ҭw3wn~c9J]S!Ce K3:Q}<р!;qʿ_3I/|N}X;r=fNNNNNN]:Q՜w3 YߡKizrtMԙ>e6JS Jj]k_QB嬘7yXKvy޽w14?sL{пzUlvc[ QW3?Dzï"ְKo?)iQ<+޽w>~8h:V.3OEqTی@/EڅTV\ O;;;;;;{W@Sk{g뤈GՁ3LEpZǴ *p(dzDK o$Vy{͟QCQ;o}ɡ#;ANNNNNN^;МUUU5';.z]W}RpG?Ng;< B:&u-U駠8q1K\ݻzZۇTȧG)#OHu}^)_9ҙ߭3/7;;;;;;{W@`sԬw4]JlG`<[=XV1g> IDATU zwK/3^zgx@ͭz;aW-wz<;9yw#ӻwhH||]f(3%Y1W~‰)gv2Sչw|96i4'j_!49zAޣ/D83w/}] Ss.dzw;zxlKLgF ]jZE%~ h 4&#t/նAmYҞI}<{祥s&듻'[V zvzAw ?w08R :oe^G͹iѽ)(X{?=A/zANkxqw/js LX ^xb9zAwnQDU*xuhrlśýfx8K$ז ?ZH$v_@,+7s '~W3 @ST~6:r˯Rv3Mז305!14(.("ɿs'wAq WV} K!aGxPKݮ|/v@噙+]is}4ouoL;lږ=e5붺{i\tzU.(."?IfvXsb$M8U]N1šR:s܏'>{;GaYk5JpDjr]u3k]C" .(.8JL;t&l?0k +UA5ܜBҾD-,]q]wQEq]DAQ+H.z}<`;3&{μМQjbt$E>~N335$\8 튻.(.\"UfQIR囨v/x_wM9ޫ,nvJ'? "HW7$38Y ~yc/vN{t(GcYsȆӊSX;{1I@A<[ ݛ≷3I{FffSEq]wQEq?N:wjx~3G,9@HgO >4g_g3Y70rs5;>z7q(.("M41 b#7zۣ& cDpx bKBoFb~&i*(.ӸS!eJAb, ۞R韈 8ODDDDDDDDđ?)T'""""""""eJDDDDDDDDLP韈 NE-,h9e(.(""B+-PdScAq]wQEq]D:71u$}Ǽ:cL=5"""""""R?)J@ڏC](rB2ɰUфS9?%avf<*}~&wWꢣVĘiEDDDDDDf~ERm`uhDDDDDDD_qO+I[_f`D~6$z Dl{'QXza}~lFL"v%//9r# nbӌucv{4ZU_\8qs-$.ljlmQh{0]]|dVMCDy@ih;]3""""""" ԿYd·cٚXp|"<ʼJh&.LͲrzD}f}0DJ 2Y~dLLldƲ4o[+Z:uۢH<~◟ƽuTyFִk˪fkQҒ`2+佬dDZvRLgپtvQUaqP韅#PcGfƱ, {tK ՊZ7Va3k^~Yk A.`8ήxfvEN;nM8e$ƞsö9Ij Ѡ*V)J~p=u#Xp2!d`֔O ꆉ<{'3s=\KO&yd`QYG%6T K~z)Ԯ_-cH`aE1cVIJ,]֏}*BXkcK﵈\"+ν'&n/;HؐWQߓrKԂiD 䑏qn"cO2hҤg=* 1MGjV{11_3ɋЭEDDDDwx]߈\¹ ޛ?Grp韈Ź%e[Y9T'-1K+A_4~jt_dE&ML)I%}e9=zUX\m\QAӎ77thX 9OUp[* Dl{SʁъզxHM|eWP]Xq4&(q%"""""""rçYyxMq)?b}:;fÜ8'F9{0]]|dV3 o]g b#~.MV$mi 1RoE 'hN!`.|t΄K07/xw؏c҈ID+#&"""""""0W=/o){URwfܩ5Zc &řVp^}cn'q<5OXu2儳8~zyDZ4=CC? 'rʣ̫?+銗>i8u?Le{1bײpbR+]\V}5[|YЄF^EZX-8/~o_GU,"""""""R\??*DlwZ&v֞m Vq D>ݩ⏇n;F%mENVj/ARZڏ4wBptVjyQ>~{H8B.\ o5*`8bTvLyVqCqokwV""""""pSL#ӎ~b`gӯ>ӼCvkJ'PuD~㙹PzrXQN=#b>-ᄹ=IDDDDDD"U&J3Ie&$h@'UhN5dڴ?5>=t_Dgx{n$"ww 1 \`XuKV{>CmܖAA*n~.ЂTs:Ļֳ/7~ޥ uZT;sJVtgǗ0gN*"HtBRYTp."8e shܻ;A'ʹ,]F#֢~ ݂-CNٓbA~c3/OLT2!n p ھ=n@̞NjJ>\Kn(e%qvcIWM3sطzǼF.gL`7Ƚa+ʗ)leȇwH̲lo2S[L^Q\_v("ed-eas,/ޙA]ZNm[ycX#<4)1wv4KԂiD# )y>FL"ڦF9w xvr<()o,ۂ^O<@]FҒYl;a)""""""rE]?33%c…?=5uxWZO󳖮\Xm,0 o8ptɋa=6]X}8L߲pp?KgA纟B """"""WU'k'Ƣ^8í2P:̇r;[yJs&9 L˫aēݨ;OZfWX~w?џ+ɱS`gY 7<,| 97CVTPJDDDDDD_)qdN"oo$.8רkie\G0FצǠָ&`LERz-zuٵ{"pR2ݏ`3 qP]甈8\,ѽκ7 #4"8ӷY:@OYPu*+ R"&Rȼ֞YnEF%gx?DRj[e궣3hiN""""""r(ҿLkb4extp'{R+bh~,L""""""rZhJDDDDDDDDъLTE'DDDDDDDDD79ODDDDDDDDđ?(H>,+"""""kӧb#7]#G9 """""WD=Bɑf?oյ5߃ofzۣmjDDDDDqx5Ю=~?vv,7+WS4L&FUIDDDDDrx_^Niwy<=}^]4"7\nq (ZWɦ0 ㊼ҿr[w,7OOԩia7&ݎ<1*??kg]0QwtKgfsd4ɹV<4naQ6> ø`TߏOʳdffj@DDDDD_?[Ǐ @RRibX,T⅟")N%V_n6`|w-/1>];_ufD;q",i"=ߏ`'%/L^C)Z,4h믿sϾgGqx_AA H6%&?`:V]wIw褖=ӾPՁ<2/' Ggc'ecz(Ύqh;$mqc @As'NJ-$Tђw mOSn\G%۹Mn-- mG0qa%&,T7ow*Կ{%z,/}Myyi=6hјO+""rA55UkoeSoVV1Q ,/HII9nju"9XVnz~*L==x$ z,/6Cϰ'I\OӵSƿǾ}?HO>kb1TxzR>N͗Ը"<5mKDJbR ~|{|3-,1Ϗ곊xW ӁӵF2^)(S8|Ҽk έdlv[&wQk3\CCqr'-Ѽ},A?ÂSɏϱ1-PDD Ǘl執|ݯ=raIq$4 r+S421R[fGZ@6E+Xt͋8DZ8O;P ۢ+ڈh3I_7'`O;fɬܛyLAx{Ӽn 4c4 xôo5u7)0ڎWF;1酹'Y桑tjZ׌l8fK XUaD^x䦇rՖ xoOFNVIq}5Nw<&Ӓ{)"z}7bN[slN 8bH+ja}]t Qgy+TϺ U&-6ܣΑ}Xx>AR0q,xWQh7l'svWk?gZOz6xޱ#ƼcnCyaSYVf(*Sg Vɳө~(w{u%87s7o| w+K'A`7 ~% LA=8VSh'P_͋ITn q_/v!/J)o_gap.vFթ6eQX@|\x9KQ;fp:ie0d~jJtnN_y"'fGDE">bkڵe_57ӴYS"yiʼn/)kl_:v y jV9+hƟ|c =ln'Hfu+B|s3YԼ}^1m|K~WAbNGZwqo@zxw6k xADCvf:sƿM.}uЃ.x?3^ H=- H9rEGiAj5}ߑ#G*lcjFú_$4 Ǭ1ޏw+tscQ9}ZA0{G:Zz)$RtM[?5m xfEN;nF@U=3o#JCN!RrE,,Xɚ?cl>Zׯ&l[)söq&`""BLqߝ4Т}{ޝ4;u`{lԕ=@*8y9ֽ7'?=Sy o>G!M)/^wl` [/?ˢ{T* y9{ NퟧK=/)wb޲6$ydDW:8yUcY|9=ZY-/ Rq`F̖h|) z&-LL*ë)R-/n PP IDATo&wǒmƯNOGҺum;sGdsF";k13vjƗܼ+6" nlVǭTY |uuqKw -޵n6HJ/螽d>m/(+ZrEDӧ) GN "N>%e\7ۜm)>Cj }ӷ$ =<l]C{ ;DD]5G&`h tgI4߀[ ӗyoxh4aᄈ;U}/dl|9V* ]Y1#ؼ|st Ժ ?fbYr>.^TߑΞ%咁s dZ1ҎiO!D},ť4YOhn;󋑵i"SDzΥQ;ů{Pjqd4#*zNAew<MىlXH4"vbskP p FD%ܒL]mwqˀ98u5iu{*aHTIMɧrk $=?KO(a>8 &{r|_$G3mt.MfLB{la}t#.CMV^2E}վ/ݾ7< ޙ8F͚m^2M"ju#p~rc Amb,"RUQ]-|RӎQ(e,11 *T<=pt_CSndR&=~{/BK3cˮTkǒf4Ati\GṳlHǯŵ4RӋ[qCB= H{\ӵSw6g5::v#;WELfwaknϞŎN%j4 䑏y7It!6~7D T6Oa~:+i!Z=Apr]<% tojyrtw̝4J/uULDLuniD&_ۼʳvH~%QM6.Or|iڥ>2/K_J'9b%"R9ϰ8ҺŋW^A:{аPv"&v߲;VśnV8}KsKUd$';dylNIK? PQ wևIVZe >nSA Gv?N oɈBDDeۘ6 U{||IOMfέ0gRx~[JfP)cu} u N.\IgYkQ=ԉx =q!{<ǒ/_,ޕȬ};&ӖEN{/((Ĺ;g"""RHb"5""+srrƳ<7%bX:;c:)bR2N uǖz8' X{g슯HY?)WԍՏué߸yI²3`POF/b뺕ŔIZ-t2IT9FzgK%_?+B9r&Oش@y-!~v/l*NKRfU*r4%0 sթu6ٙnΜoӲKR_מu3r/vWjnA]H,jK~:YJR%*rgF.\~.o̔]ԶϧcJg -;_Ji8/>v=,uKn f/{9HY?)O%R\ԶGc.hBҚO-82͉ >xǝ5eFKjz7E;_/Ь)P }1y^2E"""""R*p)ھAdJ4fڃz`)|fYn#!|?|`ߚ8Qtq>QeDDKQ г~VJDDDDkDtmڥQ;6Bniْpv2*a&hq00,'\~=139{SEE&N͢V"""""߲zoK{x]Oon"k^vFעj/ΆUkRo3g1<,}Wj/isѬiBk%q? lK ͆NXj*$z-B%*bDEcZ<*<=q;6%fbsn nsbÓڏGc#?mJĹOf&ynhwg_1rYNcs o\'*zlY8Id2BO2Kz9ыl\<8*ӴK/n}d$7_Vw-L2Vypz/>w>LA)?*iY6kVm&I@㛸2.UR6ϯnPL ɹRM3of[z} J8~ߧ|&>F[RQDDD#Ɯ&n8㣨Kzj2vn 8JDD$*c+_(k&TsI r8Σɤ Ļ^i[39&mA)3>w廨Tzd [M`լzǞs("""YLT$1QqIe;qCԊx$u֎&ﹳɻTgS(5hrnȥA̔l@ӧ 3Bزws3`;NmĽÛܲVۉza:kwZ#z"B S[ϾykV.=OJQ,1b q1,]h0*5_"v̂$~hIfjFff*' ZxzBfZdWſl̈́lҧ?)E*axWrfQ7l/#cC!9>y*=:o+U:(/U?`@""""""z꟔*p"yN(bMT775^oxUQ*ÇFilG]? (fR Z?|dge.{3HɻREpNz]љKqMF.ϡ=8Uh$&"jQ.^aA =?!n78J*Ra /KI|[ [~AC;'v"ߝ,i7NsKY 'ePp4|3#q?o "oʲ'KɮǁntR%/~0FצǠָ&`LEg""""""RT'=jNɟ3Y84<X e,\6{G^f۾`̄Uy'XfS_ҷm ̛"k3w=r;՜J֗J?u5D}NZt{m4]-:EDDjk@ݩOʤgέ7b"5@""r 8O*)%#gFFtyr] /l?Mμ̃1j8^/ӥ ղ= ,û;Tݓ:ܖ⃟rh찶 4r~k5r:ktyDְ)&ϔg#9>_4ڇFsz0'8;zve\ؾU,T,q}IMA0& dKhsmR_7G),p""RVODD.JW'.9fD~Sל*k5;Oux{xT0r2N/O;Sǰǯyv|n0̽lT \/awN/CᅖW#fϾ}=Mkϱ$ήz2B""r:F_4NKRz2zq[׭, 0+gr{M Wga_8dT-xz< ©jxpd $3 v=,uKr/~٬uzs8lsgg,<v ({ɚ-)"RODDDDDS#mX<>CkgoMfo§/}`摕dǩYCjT滳dasޛEǞ5k"O܍=a}Bvl_O)#T'NQOQ?eݾ7%n۴K/vlgXq2 Qz3IL2N泗N ~}ĒmidSgNV,"RO0OGDDDNƀG^b٬P7 }i>pc߀={9 չ]6cdf닺~N">6UN&vG;s㭃؟5TWZCclv@DDIRcO Ɏkyv<>ܫd'OOÎkٻ5ݝ}v9N| f}8)&XJX)q.n>FV|$[|`2D"""""R_I;3zq?G`vŭd52dףX/Fzfw"[?J2M"""""R"Ɯ&n8㣨Kzj2vn ?JDD"ODDDDD.ZLT$1QqKQ г~VJDDDDDDDDDթYTp~JDDDDDDDD,Zqn韈#ODDDDDDDDH?)T'""""""""eSQ O͢*Ъswj5ӷ2)ٷs+H \ 8O*.Չ$aSMz)Gr|Ui޵da265i0bפL]}bWC: 6kRђN_K3m%]oO`$Ocfq>EDl(2QunbJI*qkbԾ_ZS]8<) O)hCg[i5%w_̜џr8ϟ[qٌpI ׅ {t|4]3/O)3Twռψ{ROO bcWDdǽc/k5S/?@hp7n~^t>ԓыغneeFNr7#p*ZӜuWlڛbw杞5[ˍ=Rc>zi'Y.O);T/_''̫?vX5: k5rUrԃ9&;33ә3mZvS|O{竬9DNX| }%@Z0'Zki.tzzMBOSX5{I}HHj7fâ ظx>u4)f +~zǹٗT&=n ݂Gݛ{Pj]K|ݽ77M=h;:8ا*nhq`:7S;uVzK _C_r FT<Ħ^$OJ$m}dԹ'^8J山C0y$oȸT58_7W9q!c>+e֟_h֪% IDATÊSDD ]M o =c·ٗD;sq֛'N:H>ڟG4tXIDDD(#-J$.q[߀ 2S/|R!5*GPrkas1?7[i͹&#o>}{ 3$;JF8Oud?BRIE__/OqCDLS"OkZ5lXLu+b^BFdm31X{2]avk훉|3 [M"j :^wmuj@ & rS=8s6%\r!ED0c"$eh'VRS#Sl 8*DL@.\r1$s!!H {4!vd~y$x*19r֘*Q~]C9mx-˽{X;R3__?bC[kĸ!*+uDx/ Ŭjԟ{QiÚT䐤&-P*4[/NOe2V/^vNe2 ך9*JsȬсՁ ?qI2/djYDؘ3㘄`I:9?a4M}\f#)_fX>W:亯ƺSV"Vit.I?lToL `**VSE 4׵]W%kon?-sfhq;7E Fx~DкuY9#8Tuhoy!S{ڤԣ69i賳awuJ%fL=Λ QL KR-ޣ69Q̄Q7kg*_aSջo,i:@oФam ɡ]il4Vk?}byI.ІC،zKEY*pX9yoFkʫ)J˕q`.)U9=H"#v3=qٿHQ^^Pl|e;-W2ҔZJ뮎#u@ŵΥG4l (C{6V&WS@)7[UY+ҕ ]qHqe-쭶#K'Y{|Mu\q6Ź*6{kPt;ZG]?+kd.)Ge5U'(z/ItiP7|dWb1A^:oFMXtHv4z*VMs;+TsVA]E 7{[RY9URC 6751£}U"S*n[ܤm'T^aS˵;'JCGqY|PFӞ#*?kX-u9GhؠsڿuʮH'xtyZ^? +maӪ\;G-P$Gp? MF[]x#,^WB;ڹvv^0WC]Q+ UGk`6)G66P?G MX!p:e,zMzXƺ75B&%i$ΜѡƼTc7K D"Zv@@-?D"6tqC܏[9RjQUWawלv66P?Xʱ}bmܱڗS">^Z$~bܚkTK [XJ* ҃X%W//М AIENDB`gsequencer-1.4.24/docs/images/ags_machine_envelope_info.png0000644000175000017500000006303413246707333020753 00000000000000PNG  IHDRJbKGD pHYs+tIME  0*,iTXtCommentCreated with GIMPd.e IDATxw|unB  Ԅ.E Mg`ީyl J4OB lvw~'[fCvq@fgg|VR%I! Iy`3JjUrG y$EmJaL yE*v o(Q?Yy/^Qϊ{ݎyۇ-{c-Gyǫt_+?`k9]9+2eJEÐa(.bg6<~[_m*P/ބQWsӨ\W4*Xv#(S?3 +4*,lT ^e Vs2U;:؏1N&[6.k0ڎZ2r.eq4-##cX !Uf[VkV*˘*/f*L.:+lrlnB&/۬/Zs?Ӵ~T]i$[U%_+qj3fɭ,V%Yd S2MDd~Z*|M>1)Jᣈ/H1kCo\x]f+Q5薶S΀ţ/$޾`AjX)|E DJkh?axNoEYe,離JyͦzN2Fed3->4!}r3#obV^ .L-f+i!WiS+@->n1VZ3kM+vQoSNK< jqUotUoka> I6ZlRR0/DNghYXo۳fo)~Aާ^>zL_[ӊX1؎Ycu~ кu1#7@pm3Srp. gHsL K~&xdZ_G.:ZeLo kq7?Tolife _2AЩ&G>|h5ڷxbQQ?5jTT~~$)**JQQQ-nwO|߿kF&&a )99Q(gWLшW(,!Yhɯ>)y%ܮj\CL}Yݯ|E;/o OV)g@=*r:钤ƍ++d;O馒"ֿXBY(rQp8d;dlvF ̒7t9[jU*`Xly+&۱ǐohN`TWoXo8{f?FWe}n4 Vَ5_ט cH5fQxd2MLd:tM(u<\iݷjGFS+YCR4$f3׫]/V${3oR|vo pWx~tp;eqz$cڻ=C wԐO}{k:w~65]Bk6=tJWiX:%R+biZ(n5U{g/s-ʨ`0,۩Ҳh53,UFVfB+5ؾZZ>wl2Kƍ'Izw˯cQ)pu7vl6CX&VV1W-zT8Y }giخͷ=qw=mqI1]GkF-_-{^=L{ ]te_%5owe>}JҸqki]E"*.Xmv6Xlv ggkq_N,6fbVYsf L0|өwتǽz>xJ+~?y&7%[2Jq+}jpezhGjd(a [s~ǵs /{|ENGS;+.It[Jk2vT'-y%$ugnz-,Qm**y[i%WZwk\?; [6݇4*~nq:Kh<-azY˽r[.nRޡe_W1W?2˹yZza 27ꫩS?샛K/5X޴:O37kxX\뽧~Ӛm &@Y ڤ"}kp@叧|-$2~|Y![[-'I[Tx'ŗW^^{f͒,I[nQLdeki~B(A0j's S=__D[߿%>R@[ZFm4w<Ѱν%=gw4G@QgʕzVdKV6Ϥ}>e,ԡ y} % QXޠ´<ųttKIov[kpƷ͖yŋz}L'Y̌ J?'r:=s^]=OS~G2s]+ˈLmf|+.I=4pfaz*mJ6W֮S[;}APa7j'Gs_5_Wኧ2sܣ1C qyYH79FV9AߜWjEmK8;/:%a^HiXDZ{Z8Ιj;Z)/U4t2gBU㇦렝}%Z1Jm<-mO6kjկߔ;<[ԑ.ԶǕ糴C}LJz-uJۦ7ݧC1cWnHoӊ3~Ggh\yR֪M۽m4A}CٿF X.R ۫@ c/!ߣ[o/]jhx?y=vi^+9zA[ ~)mQmv2Q}J~T\M]bϕ CFBp4ƞNo=yiPA K pdkxO )f&g5:M)}Ѧ*}Lnpdڦfw%)-9M -*{VB{[͜eZC}NRߎԤu?wjVms=Z*wK9˓_ +*gn:"5k%y=@:2>R?#Py9鳔x69CFZZZÏY#=Z]R~؆JRwľ2jՒ kk~f_Ed>aLR6 "6| !٭{udy'-u]ugǮB.P~qY-S:TV:a~LNPފ-p*)෈,۔mҽ5^ϣ#둡}kVJ*z~s3{!ee++9jjlnx;E,(buWTT6E,BV^RӦ+5zCjѢ"0< %$l$߿IG?XE,BSSԬJ6n\nn]'֭5yd~{N;Mo)b~U_xa"a P%K 0{Q'륈@1M3e #pK :N[|_/Pi;у/n귘5hµꞹ\ P'ђ<9^P>qBis?o.~5S ~JVoԙq SXZ"SaW r tKENy۫YO)bE,꺶mA{Wͥ(.E5͹KGlANXYhg.0 R j]~%Woլ=ktq{Zg r:E, t }ڽ[lOex$}\6q"XPu?N`6x`cY9OsEː)490)bMS{ 8_th%6Y9o.g_6߯h7𱖑!#R9#Gn_f ?N`al\Ijn.lDD䈔AКO%&Elm?L`TGr(bU;)#9@$@?| 9"j.B 9A¾c9A®c9AeONN~/1 $#t<[\fPԮuWPBV6 $Ee%&mUBmڵi9Ac&Ә$L짨hv/r>9  a,{wmȶ]cW+բ ;--쎑ضxbTwʕW{7VʰQu#҈]ў##XzZ爔Aa3= \ؒmҽJa>a}Ӗԗw,S [mS>)y>r<:v| 9"] 9""ArvE,ArvE,ArvE,Ar,Fb.F"#vj#vy]5#]r0bqˈ]5.; IDATGr#s@Ǯz Pұ WV2b9A®c9A®c9A®c9Aň]HW`.@`./+c+rUF0.bCrD~U X:v X ܊XF"9@t"9@t"9@t"9@#v|tE]E,#v\8v\1Ш'vׄ_FdiI &jW4qzj|8-e/-TT爔A:vByju@]7dO]V&{ԥc\gz }B͜(9jJ,>_A0GrCUy+b..QIÔ5_WWzźj^mٖ3*I-aH90b)֡=hG1 3t03^jN=4P͔mK%G9%3WyI#.6NؓLj]nB3 אIgʁtZm#{5wmtzqٚ %{i$ezaKެj\"-ωr>9p=]V;Uycj$i&j{^R⤬5GIک9oJRSIR|gҲ*lmԡNsD G]<9A"c9Au'0 uci^#FkĘq^?jӾdzX](tUĚfD5}s?]#C.GrGEXň]<9A"c9A®c9A¯­e.r]K.r]K.r]K.r˞X_ b$IF\cx<<Ʃ]뮆2l'I*c*MKLڪD ڴkZsL1IROQvN_9"|#s@)!oAcmF}2EWrD@K.r_ [ˈ] 9"] 9"] 9"] 9#v1b#]`ĮКQW9 ¸eĮ99cW=Gr(bEr+bp+b aWұ aWұ aWұ b.Fb+r0bV0bZ19*#v@Usqň;CV]~nUm(Im^W⥅r>A.@cW=W],$uOv 8ϠŜUsxsD G8 l:v3|qŮm%)&gmhpհjG%eZ)#uhvD+Qt ̌S! `sQ9 "R7؛_I6|kusy+bZˆkȤ3tZ:eNL6:=y蒶N:iyNl戔Ap@]hm/6YUisG\Uh3of?F~zeNjp׿LҬ8IӽN:~稨sD G~'0Oנ:MP4!]:+&JMGI7x9<3s͝.s)µVVGb>c1sXb""˙ju}2#9@ ̬} Pzd][sfN4_bCz>B=GrgN3"vX/ϪP)S-̓OS}tۅ2}hRiU#:=A$Mo<]Q߾h"WYu׃ʦ5'ۯ>>xu+?sUA{ѣSB9do3F׵Qh#M䬲p8r0d{'m=>P}4td_rWl_&\u%zR-ɓ3E XdXZ]1P YSiTuO%2KLᅮ\gʲL*Ylw/0Ͻ8vI{픯>^}8;]`IJs9$y2Mڔk}p>aLWV槩yg(fVϛ{gԂuf'锰@mPns*=3t{i*LR;oջ IvSNM y2b}͕׶E7}S.}O7Ӏ_(ey鎄]JjZ頖s}i&h[/'_Iv] (&*[jF-VX_<ڲJ$9o@R6jy}|}KneͬŽZ6{nvv#rH2OAv%Ƹe|Xχ:hszŭwYCR۸E9RQSjtX7qSҞ#xk)HM7>_2vthE;gyG틿XrWKfr%[J^쭒e q2 h.:Er;]}:s {ӟ-gG*SwL=S}I w|}wy2]ezs2隻r+,۱g#eRױz] ؿVX1fb?|^| j~vkvgs[6|cӛ{^+s~R9f{CLI1 IPrLs(cp:Vr0ʞ+—uje]4ZCmE:z& }{uyꙚ6ul H'2v16!:fdk'StŃ雷^T6,r<A:bUErD~f.N3VG:U X:v X=2Uͣ$Iſzl~YiI[!`PvoZNИ4fb?I*1)*ڮC>Gr~;?zdhϖ{Olb-Tg=#R9B/0.bQc9ADǮz Pұ WV2b9A®c9A®c9A®c9Aň]HW`.@`./+c+rUF0.bCrD~U X:v X ܊XF"9@t"9@t"9@t"9@#v|tE]E,#v\w\1Ш'ӄ_Fd)2):v|ꊁn"-FLYiP*;Z9?Q .²ju@]|*ӏaH9б.JU.w?r*PG9 $5hs+Ž7}6HP;mul/]ezn-爔Ap#vrEku5yZSr;(:FRafK ۩Jm(d*/W5i8åC{-x=)FȭVhƲvWxXKX;_kl.K#'ШN {ťeL:²1:0kcZu#R9B5Suбwj@̼Z6G{6Ԥ+%)Nz_S~ZBegK6/V+^fnYyz戔Ay>rD@K.r?N`66ҼV Gֈ1~6cզ};}x|#Q«5͈kM5F\H9 y>rD@K.r]K.r_ [ˈ] 9"] 9"] 9"] 9=99ҿ$Hlysy@S] +C I[e<*OTUU iOc&3ڝ8sD G0j3SZC`ݻ6d[_ڌlmdx1}֫jцםVvJl[iErб#9@t"9@@Er+bEr+bEr+bEr`9Ny +C͑!SFIAkʐiզY/;rFW)󌥷93!#R9B{jyEl|34 GiyS8mќhB>Gr r-PEe6LӀ?3/ܯZJMF[]B g UƉ5Ze: Ejd.w_1PĆ2Z+U_ryf@<۴z{{^9"AqpNC*ZVxPĆ( pӱE"6i,?@L,(bX"E,@ X"E,@ v.<$v0 Y !sBn*R "V>qjδ;Cf_>' >8E,(bX"Uyh߮Ks+,_ZOYnpm}záy<غ-2WBX2EsխM# z`zENsҖ7/.QQ]fv="<5L3w\'=%/|(b#N#O矞(6\{]r=*'ui}>|Ce";TbKK9Hz }mRӆY:aSk҈~-VfAVxMU985y.:ԣoܡ7%׵`Z52Pg_7IC;ǟdnQڅK}b mu}5.Ll*w+jg#_k/|N r+szqn~>OQ yR#v]RևfhŦ̝`S4R{W#|t7MiCuë_,? B԰%֥ +tk[h^;W6LfӯYd9gj;J=~.c_~a-nM*r7W=_o^ ܮQj׵J/;#R[)#}Z4OiRfͦƃ9eCMJ9JL-m!oQJhN].ZjDUjifφ\W=5uu_oӥ57(mշxx%T`$*>^:~&!LksFo|“.sqouwqou5!)LqE-iP␻4.}>Zq)FՐlU ÃoojGލ2l$INF9"KyG͇sHE]TîלuEl)[~cͱr?)tG""L;CfCi_>' XԄҾ}N @/B"(b@ P(bXPE,(bX"E,@ P"(b@ P(bXPE,(bX"E,@ P"(b@ P(bXPE,(bX"E,@ P"(b@ P(bXPE,@ X"E,@ P"(b@ P(bX"E,@ X"E,@ P"(b@ P(bX"E,@ X"E,@ P"ޝGUVUw:{ I5H7 ::83C3#ʈ($, % YIC0M:4]7VRz뽷  "D,"D,XD,XX b b@ b@@ " "D,"D,XD,XX b b@@  " "D,"D,XD,X b b@ b@@  " "D,"D,XX b b@ b@@  "D,"D,XD,XX b b@ b@@ " "D,"D,XD,XX b b@@  " "D,"D,XD,X b b@ b@@  " "D,"D,XX b b@ b@@  "D,"D,XD,XX b b@ b@@ " "D,"D,XD,XX b b@@  " "D,"D,XD,X b b@ b@@  " "D,"D,XX b b@ b@@  "D,"D,XD,XX b b@ b@@ " "D,"D,XD,XX b b@@  " "D,"D,XD,X b b@ b@@  " "D,"D,XX b b@ b@@  "D,"D,XD,XX b b@ b@@ " "D,"D,XD,XX b b@@  " "D,"D,XD,X b b@ b@@_W!`ChL @Q*6~E,̡o>'~X6x>'vXD,lhas2p_f'<_2qb9' bHuַ ZM[d\yٙo?|`x#aA)^7m}; Gr'!ސ GlՁoz'R# Jz︉K$?EgbM,!b~AM@{;vĖ-9 ty=nР3aihhظ8zR-Ir*`֬r'G/b ;+={>(ly,Y۷Eif &hĈO/~"Wn5Q؄?>sNN`$5 OG9?*~z)̟yW(sCTwb=79䤾\irz=vP6S}%Gq5>Jm؉KoiǥRjm4,*I:FV=k;7?02tzC !@ @`PfN JҫmyE,_?m .o܍~7,'XNÛ3Lӄ45n#}|_-"O}4PUȊXmvfvnt>i/G.O]-N\J>^:IkjR+CVnc ѐQFyYնW62yd,kFZ<1sԥ7Zeܹ{;?󮝝M:=_U*HHIkH[H[ֶ7+\0%CzT5747/˨FfpRz(;a&'Y\[f̝ ej5;?} ۘykM;nSOkkuͯ6bVORjK_q_sʭW\{:Z*8`B9px98+๟ﻞS?G{K2gVc 5;d7CSZҒGqFv_BFGR{i?gdW]y2󗶥lAg>ǠtH3,M2ft=i+Z3޹bg_I}A<=rpjޚkjmm\sf_;xSE{֒+S.m<}.:;o9Ή#"]jwįޔN:-o炇3{)l ~N;=NRZz=EQ(4U*Vo?iGm˻!n&Qե/#Nd^3ߦJv} ȃϏ{Soai՟䐓O{q3jyY嶦6}ȓqzN5o޻5墻vT3n'ٶsI.g-J }SnˣX1:^Μl:~to; O^]94J)*ISc%M tijLM)VY;$Œ cmC[[r}OНF}PG.i~|vcW*%j[٣o4JUۗaµ^^^lQdhi~5[~3mmYwq@4)OX?vT۶[J sΧV-zSϽ2vLXIR,ʹOfuL\{92<5kY"=8?8O<8O>b8O<(O< ͜9 fޢey//(V]`geQ/LjyPoYβ/d:K V90kh(ԪTY[RD[êkVk552d cE>{e{36 7]Ӑx_52 2h\FJ4#Zg%} ^;U~dҚ^%k>K=2lI]c˽y౞ _ ?Z9oEv*T.Ym_[VOʥ"RR%EE) rZڪi?kF+llfl5sһQ"H W-։ugdSMVK[k[k3s<+4׳jJ^[l%Fk:7ȢE ve/yaL=\ޖJbtlnoB{m3:sZ&WܸkxDlA/NC)[5Ky︛_gϭqY\7[ikr>5^H:X_oFQoGɤ_ڱ~ZR$$m"zj,n" "]KXJ򚯋zM`i{mޥ¬ɐ,?}xt^gaeev/\|oerQS/UkO<\uI!ncPUR߁pٻ}֔b??^!~K+zq|;__al}S بԫ+إrѐ32tϜoss+΂ٳױKOf;W>g~/'OL W?C2oSk®/̳O/LρW}/8"c'&=-[=>:س|(6\ukSV}fيZ[2YZOunE"ZZƆrzu뒋F6zQ;gnmxZ5 }3r_+[N<'?=YR_TUkkR.Uϸ÷Vl9Any"O|}^weŲ婾054ʾ=0C H6Kix MdzpѬLV}SyאA쟞_I.c!|{9wd6G*Ru@߹ƍ蟽n;ˮˈmCfjL~q{ZdS![d Y2Nf=i7 <) }>^92:t;ɯϲ8d[[RSUR)+VknǮ$)RUV%U"{\dCS3yI']dlVKO]ZR}}ͤ)OgYMyIq|L?ss2grg^Q}~ < Ӛo;R,Kޒ]&~#o*]^a䱻89C_zBUy`F&ߖw@J٩ݏ?~nʠ=7ٹoĪv&Q/ʂ{lz|r=ecm_"g_L\?╕tSFrЈt{*S_l˅}v~pjN8zrZ֖Ruff~ iiɺ ֋$tA|9r%--/M3W_~vC^ږLC"x.Ms\IDAT9gd:h̸ Ff[vpF&t 7sòR1cK=TNmҩl9|cþ\+=z͈-5ؿmfN:~~!G g&k{~E֖,oΊeK^#aiTt,[`-^ŋ|,oN[kulIRv?rwK.{QwʗtiR/f64d)>2MMMq-YR-=?NydM,e,^];3^}r6kq|V6/mViRrr+ oI< zY{_,;&GsĻjT[WʹVRkkKږ6?g-^zjRihH1 46RkLVKc+MA]*rg=JHV[ҐN[Sl#bCvz:E}ޗ{=^OQ/R/j)EʕTf=EQ6+)˩\NQoSR.J^L"аi:/*y\[n5'MM_風VZoβJlχ(bؘ4;hh'O4*KYQAU*S*o1il꜆NMǢhπ_MY洬hNˊi;"ߝK/$zښvRRԋ4>cISmkMSni̓QчS}FrR11)U*I*44Ե[9MyֺdkWX74vJCc46uNSԥk*&baJCt.{[YNuxoD, oѣGLE6J/~nXD,XXxwu/[+3X? 2ge]IENDB`gsequencer-1.4.24/docs/images/ags_midi_preferences.png0000644000175000017500000006306013246707333017741 00000000000000PNG  IHDR _! bKGD pHYs+tIME 1@[LiTXtCommentCreated with GIMPd.e IDATxw|E߻w@:$IwEDDQTTGbC < "#-R! ~qIHµAzewg3;t @ @Ptz@"H$Z( <}Y;{\ͭ؋/Xd>(bDQPݔ=o>s̏fS&2騊iP6) wOy)9o\mԫu?en-c.*Ǒ2NS!j^/ ~Ez=星UJ_BO%M*)ϊs.r)K[S|A?+w;~씗5?%-PثWKuᐟꀟ Z>^S6ڂr=f׏zuďw8b-! (zE`2З6PbD)'JcQ ERNy9-ϋK#Ba+ܕM;+鶘JYNb%e;me.lM/[}XJ,+Y6:qɝ)̬ BL&EEH$Dr 1L(~ӳҙL"[FBiBhBC4?̬boZC4zW,MV`*T&lJ,Mk[(Y(֔|9T.XMPx,VrbsVI 0bXnF#cIMMK#zZ6lYʞ {CJ Q aǟŸ݂J[p2dw Ƒ/٦XEvrrr[j-#iټm5iY!`B;[\tIyMD"TUlD( kNa}A( N 80! ,<ؾ|(ŢS.?.ޢyG%S`ϰ8g*〻,BžQmJ MNb2:bQ^]0_”6sF[R-k!}:ΆEHQbbZ8<5bRV ^–[AR| ,Ue"E'/7'''lwR0#99bUUEթ `(4gDR@(}4\rprNv|Z{Q]̷G`iDiL2G@ s.!Ћjg'=i֭{֏lҸ+~`TfwG2y:ɇ#:Q%'+{qD^0޴iPlS8WfpT$*Qd0?Ѹ|#Qh(`(/(z=:EUQ]B3+Z+6F?G){EW޺Q)Kr9)-'!lYBp,]ʖe)hR{f1dQ#/y\Dw-F>G+C, „q۳3xx][ёH˺샤TH:!pthwΙ [=,a;_H`f |1N{P? FrNQf*k9v;qԻSfrbF lIN!~i7^qtt~{ [1Z^lAX iPɖH8j9.X4(y[/Xx, a#QP2 ?2zR{Q23+,UV, %PXHQQQizEQPU]D)5+HFy}e bx[;7V?'M34z6 3cs/i#JmDw1Y0Lԍ Ѕmo)ƃ05vq{cڷp3 0:EXHzAAn\_Wbg_ٓ/=)ML"23,bkH Gá,, %`h2ņCSuVN,RJ֊8:Tb`KYXoQQ+6ĘrzMX޴U^8ƚ¦eZBYXTZd㤙L@{csx}Uie%[ hP kL@3v O : s&{ .?v^NLə+x9h^Mate<9&sƱHF#~2Ϟ=b5Sn*:XLس8n0*=R~UMqX:plSm*QQe@:ĊQh(DLtr>Sh0iRGZ@$wRQ*:'9cStF|7[Lğ>l{q kK)}/M;ұYC5nL;ZеO3`\"\wrs5!@r(2񩍗7z)UQ-ɊTLEǖ08|ڵ#'',)$+hL`ѭ*uFRsN^u?j@޺5|FÜw'Icxa-+X 1o@޻#>;cI6֦~^kD|<Ntr&FtR9yVnz"T~A 3v, wY{8fQ oFQUjV3qI~t7nTI6nRaG#T"^oF–YƉrl)vZoU%[0&0X yksyŋPLK6fsz;ѢK\ 9an]CLv!콮kW%cJwy.D4A^*wl~\nC zFӦa%zV $-Eش9!F%³cPZDD,C+lc+l,3^8ؗʆregEQK7fX;n\1O}(w<˸1l\rr- ~qq\\d=:k~JU`Z9+Ub ?:“7>1eܯq:Nıο:~VwN.*ip$BCBQ3.W3N6Sz>-RaB!O>_{=uNH'!lt4všpS,= 𔪖=QTYAXCbyQi0ʗE%&,E%pZ * J,tó~܊MkU%TF(:8*sqqŲ.8.,9xO>M3`s24lF|||H$D"ql<'^l^(Z+ՙ J!o ɵQX  ՜Wn6\YTy3J$D"TM:Vaq%ܔU׫WJ۶mew$H$RnjFY"D"H Δ-׀H$D"9>%K6,D"ST9by"%ND"H5Ӓ^q*K"H$޿^U;r()@n$ H$kN؈.G.[pVR KRP,͗I$Dr=Xqu~;D"H$kHjqVBT+HD"DbŧeHd!H$W'L7GQTS0LiIQC@D"H$ֺK-R? :)@Oϑe!H$E#"b&GHN>С3Ф:2F|Yu`89e"p7_->Gra]5 ;: BŐ*t&!&w"p wҫ {Crfٝ j}B߶Wh<:yNN0mޮ?:M&s(o'l4:գΓ _c>Rߛ̩d+Hk$̉s_k&Nşcf_b$bL]@.q$LKw#??۳|gOǿ'GGm}G-SO|HP=iӆO߁E@D"ܴLrʈg OPLGυF ~﷑֑ wH;n}5}j@`'$@>|"r̿a'$lMEi3NLby]Har%b2Pݿgq?@$-{3>"O|H R}~r8=[Eu]?aT4tx Ky, rs[϶y䧝 f/b$^ vNcs؝R"mȉMd6B ԹDljz$x.;ϡg zHVuecoƪ͉ÄG`$eSc18EM7KQKr0}*a/@H3r #\@d1k4G_[#0&ĐkXP:BnJ/0ru<<"3I Nt,{I|Z{FݛG cTi4 FKd݂1ɀ{p B*6 MmOٟfh4|Cdot"8?4yŞ,sө߻7G{Sd0 GboN-ZF?h~: 4CiS}1pg`t)yN H۷_-7k3wj IZR9,Zi$65ߗ,`_3pw # L"JTxG~k@2!I(QKahzԤ”Lg̒ LSƽt\Y9ΎmÐsWCKX2~ٽ19FbBK-6xiD'gWztc߼>@fz9jPCO11MV^7gYs}\\3QӮ7{7hdn_Sh@?9:Y9ە&X9Uc8zk?Iky$ԃel5/W/o|Q@-n#g9:1~ޙ! >#2X~1`h2ؽ/nwǀaeaI$7퉫kw/>'8ӎg5Y+Tiq(QA )q>{MCpѡqe3*(*2J*AwLc Ce*A rkD//8{B@#+-R`GA]P9? ^m69JRau Acܯ8~$|#" '>R(ZGy[v$ϿEN1b<"5EQ$r8we[̰'9dH$Rq #`TA-J#g?,(=;_bs h3[]@VwY'E]d0G7 UA)Œ`WC(#HLV/'q' ~;>i|>h~xԥOԭ([6͇6A'[UDUUFNwsf{@[1rTUG䆼~G컭7fc )&Y#֦^C_.=)=uߜN:GVf&xVV;MhDx#w$|xK;`ߦ4kUEjiJ=.5/կ>7J5m!!]{  a=huŘs~@N@ c&M'8$ 0L\0,H":$r8wlF4?[&kI2Α5Q: =BE66o-C::u۲[C4:[F-DoH^ǦԨ#=FPv}|-9@Z@j ԶdL@QB|TD(uw>}'1FųƽݓYܘSfҴU{2W7Y( \uW1n)im&Ԩ`k%:Ʉ U?6cO62 ر>w ˉ0Qny R4M6hdo]gWWH6_aA8AN.#H4g;0G&2ٿj{ (;k8yW7;_ҙxkfm<#9iJ-O_}^kZOe*Dn:ؼf l j(><2uYɿm۶Z!.Gd)]F܅HØD4=, +-f8<0ԗ_Ȃq5}dM{?I$acudbGk ݣiH ”CΩ5>oxD/!ɭ%mt=e@7WY Do z7">z&z:v)>!H$71i KI"H$I.eH$d!H$7rD"T/#- D"H9"q8)gD"H"T D"ȿ4L/7 dxY5!X$/j6i*WrG])@w'o ҏˍj2r1(;ooW7S^gJ"idzH$Rނ1MZLC7o?G]k@QG/ .};D Oh7j c?tr2uҘ‹ʿRþpO^h] ?̮Y;t c!nKdhOZ|MC)_qQ"d,SI}k@:}s?NRb%xr.kp_w|Rޥ7 %f1]ª5G#)`n^k5b9O^9 bsjΟS K̷9reZe72 R&}FO IDATvj$7յH$5&@t͇%tذ{w4h8ÆsqqSp@)N{C:3H*HrmEo_VBN4xk"'qnQk&1dDkDKb^|)x['-# wֲk]o6\:/lt#;n 9cM{Y2VD"- U b_mG, I;Ia&,)"8[>-/V0I}I\fϤɘrqBzx9Üz5"y[~]7`,Jۧv q5ɗ: ykk*uwf'Q B3Pp1s{ط79zSx.wzinl+< 7߮$%˕p7vWG1i;DQQUAY^jIw Z@Q,cw4e,w9-yMcoʝMAvK$N@b+gGErC$OAԚYA?!U+-҂t.:0L-_,=I{4:_M^⇿0]ܨ`2j׬zg^}Inl+/Oد3|Wd"ŜB4Ъxh8#h_k'y|hKtZ釖rɛyu.@$GNG6rYOچ,em Ow"s;_ -ٲq$qp2=:ֻbEGZI|z%[%?1K?{2 8E\$Yl5Sy+b C@xǘjU]1v=\f})߉IYd !AnJdlbOiI4D=;f{/{{hV|39m*}0K͉ÄG8?E')4B;r9w {\,pw4?>@Իo~K'Ŭ|e^ģó : k+ "s ^ebtxٱ9 }F{w,-i3uw(t8: `˜;Đ^n7D4 5 @3UM I9s=IhK s >'YZ͈2g{k/!聀8e2#ES9y :to셢c[Os8}g~Q 6bb&t0I#{ ]'2zٟ;FO:*kѦVL1j˲'W$; )@nz wown̺cNm@sDJ$_KBQhF4%nd=!(89mV&ciMuo"-<\,(s ;s/s#o/_fNDZz(Dc0-'/&RfkO<;zq #:u,×=C=53gW e+Q{Zu'9/H۷_-7k3wj IZkwdH/OP[E$߇=™yX!!?k}-òyynZ"RP'= Uv'8X\&Z%Lg^dw4_ :/m =9JQQ}'zKav8;dl۴ɄBjy[PŜ|!pqv⍩#@@~s[gќo~M<R `@(D&xf+Slsv :r XʫyXU2e]HэKpj SK^cilG~|HKD0o{LJI\˾~u|i9 nqOdX*@'8 V%u&,{ynߝek8x? ̭pl GmT[J)@nzHؾ 4X~}houDTծuƯ;3dgD_ 'lS~sgo9G|߶a_H]ήhO:|6M]z62cZj ="2SPNxՆi^:`h2ؽ/nwǀaec wjB`dRh0qGf8Wl)kH鰶#C7?("@dnc~7:>?_wó*.O׫–1 7=B M0i|+el5 vm[jN4mXZ5KPc3=pv=5jwhanx Nf@{bdh-:OT3@9>}9NepnvѯA#trzNO D6iUKZAOGp:" KC? [V QmEQ$r8we[̰'( =Vd`d͎X4i4vW<ǥP+F; SMˋbp WsiNZSٻ?^DSs) vWyRu1X;@s^Ei-ɫn^\N`DNV,&D:'cI?őwB* [ޥ፛. 獻JAHK$bQr4%E|؜m!F~hI )@$űogHwrZ!:i_<-݉Q zvd#B<5NW̮*LCf& 5o$t3ϧqhISkz,8Nֿ80?oBq A{ A[Ql f)mR:EJS6ONW2Uν$>KV xI7ŝFvxv]UUFNwsf{@[1rTU#^㻏R{&P`0g0℻,E`4ؼ nLFL\_&*t EWNU-SRWaX*n(9[=*⣤=+MZ\W COȕd65p_kJ˵|{WzCQοw4XGpq3GE{FC& !u&w, q~/ǒ H;MAx#wv/oA| _7&n"54%If'U)vRN^~!=eu>|l~oXK"Z1w|I/MFmO}^`whԣ~.+#Y{7lCiۢq4Ƿd_ Xx؏JBA~b#)&"Ut\ApuX',["i;كV8i\O]\3i:_g c̤8XntՆwc2..{{[ˍC_NBUn@ bػWs^Ffl`g8~+]/Ѳt UR^KրX[b7GlE+52@eeӾwX$ja$fբnp"Zh[w"4k7~FMF 4IW"RWP 9%M3n~42|8p=^[G0ɜ''܂Pe?;ϑQ:ۓЛGzxٹ}"փPW2RQSےi}[0ZB| #{5V̚N謧 QP_vk-ꈯMk9өcP_g=y^ߌjNAVΈtqIxø3Łt_}ڃO g?q*90KΚb]cڎ{0c&!Qt7`\-kEɄvJD #lD,k%0|2F ٕhg VDAV bKX.'Gm;)K=NhV،#?er/bhe_=GQF5f'׷tf+ޚY=HNj,z2?s1ts!w7 ү-p I7[C2Ekk2MɺLh­Xw/ La@W߫#B@Z /O^J}rW%ԺkJoŽLjwO_=@<}xdvU"4ͼhDӴy4ͤ'a(/UUEQT .rxLxE#ZvA}#)O/<|' u;-,@m^sb^ּa谙W[zޭtiuᙌ?ƌ"nћ^U)w.??|,0Kok6= #Πfe+ÍUs$¶mۖZ!~(ӒH:ݔ۰ŧ+߉XB{/ӭ^%(i6?Њ3~L}i,J뿺}d8Bj&EB h&LLx/[ª?/?PTU 'gTF_*[AEqy^e{3<+Ď[=\V;LDRC(Czj*d+~ZWr9ӧ ߂)y( Lx`4TJa~fBh _F{}'lP\"ѝHDH ~O<)O2Ǩ]Y{d!.ˀn"UQU7B4LEEF6`7E3GT蝜qq@䄪99UjJ⺏nUh7[ⷱnJHĥ 1U;}̔ Iī(Y5cMCQU\=p< S86y*)@$kgH(^KD߮蜜Ќu89ohK@I^%덴I5DRVVVUtz'\wZyzN/!$)@$HxUM]?EUD"u&悾C,`H1X~ LWD QH Kʻ:%הNDa}b OWsmDoǐ쐱%OnDZ789̫ѲUmDVs߂Q9u.p}n[6|1;zrhN?s*GTv&1dW=[kDz.یͱ-Ԍ]"JU閭^{Hu_,7:y<:8˫ 2h.:rMZF?h~: 4Ci#foO"ە̫D 돠`O|"ƽ:3lDnVp2ѕ&X9ɚܬSOK&D" B٤o܋RH9WP*PsX0[ şPTzt(IRH$7r])C ߁L{irD"H$R\-@RKT*MiD"HrHvvi=xuH$dw= &?46`%Q"H$)@,cl*'.זsf(9li6W%D"\}$D"H"H$D D"H$jG/@"H-3w Euݿ1o˝5C(D"H$W OЖ<-g7<@j D"*n̖>hbL}f+x6LӽvMo=bEEg3tvĊ9G {|$Ԋ3F\2o˲'W$S D"T[7gۦM&B 4aDɱߪumD+$Fh8qAϩ%4#w?a>El%sTjH7=C$e_:'eG,[[YZ:r ir?Os<}NȲ5H:8ƶ {i-%M)@iIUEד DlàMps#W(& 5Mo5 -xe+@hgͦ-.t6uc3=pv=\FqW8x Nf@{bdh-:OT3@9>}9NepnvѯA#trzNO D6iUKZAn&"R∏^%KҠ ̈́HȺ]JB 毿͟Wpqa,2 ۥ& @$obҺLSq2S~7tQU&@ŷnAMH`P7=P (DZ"ib>M ulD3_":6u[H!E8_69{i䦳4=S@,kH!4vKEQfa30\h2bvißza 1[̦&NtЭk#5U<E9z`oIV4In>"H$G^mؼ~7&򡕮&DUn{7{ӳbNp ;MbYPBg; Z "8Y\V'Z7] KOD D"XWU] }nslk&{-ۅVC3߻QTa&XՕ.;p׳y Iqq1U֠c(QNSN6)@$DRMCшi']ѡ*^(YJFY hskl(;UōZDy;}ş>EzxAMOn3Khx_5I"D"H,!0  LF4]Çꆓ W>O,p IDATt ]BAsz׻?|ѿ+Sy̋8kC:}cm߫/c|Q& D"*bDXAlJkD W{B?zО q]ʁSH/$H}(޹MC8f蜜*5"Hb[r 4ȡɾIDo PժxD"Hѡ8p'~ lZa0ZH$7A  @O?5MIz R~5ğD|'Jذ(:'gfݙx̦Թ.%7z1Rg? G'6'*}7Sk. D"HnR81^qjM>SдK `G{9G-Bx@hۄ͑il g˔hJf}K'{;?OD|z,ӆ}!pko|}wǩ}M K"v w |tbU:}*iO$^7ܖӈxCq⟎^ _Gi?9TOڴaw f,%@q,$D"AE#1"`İw4$hhK?ùd|gzЧv OHؚFLyˣ@&RfAʁ3D´nA,_~%ȋOK iNOrv !q~;vU`9O^9 bsjΟóv7AnhO dM&1l^Jdp,$D"#'N]Z!;sE5'g Sq6z(!@)NgC؉pL6 KDQz&xxg^Aۻ*9''{  [!A@Vj(hV۪oŵ, [d',!! ! sI̜ggfnW PlӚ{%_R^$+SwrdEeHjsҗ(1ȱ+C9dx C* ijo)fmI\E4qO` ǧغ"11e6D?(/R?=fW+O- S1r%j[em(b;Wމsج|CoA(HERΖLIaF6YLY9d_FF~ϭܢJ#oF)Z.J1aտkgVhT&ZM/)~^{gʌ]dLSU'Rו'Mc{ݷ]vUTMS3dԹMII[_+闔羨 䭗(s̵XgБn+ud]hю$K|VzBuCخ_hÇ{HF<-#Fة7kʱtgOr m}#T;y O`t(s}ZwIyխھ\/̗{~jGӕcR29!3q ER(/Fk;{yRrڿK.\P_WcCnh[1vQ2]HK=V9kuSnp@Ews@yg3v1 @rMBxr8NkI*s~t  / @ @ @ @ @ @ @ @ @@ @ @@ @ @ @ @ @@ @ @@ @  @ @  @ @ @ @ @  P@ @ @ @ @ @@ @ @@ @ \EpqAKջ{4BeoB>& P. /NݻhӦj]rټQ%&oiiiZQ٭uMWo"IjҤ|IMdj@P}sjذ{9X$& (;>-ZTI*: M7# {{u8/`9nG({nR{AM`UKKnOn`f* LEKR%-.iH=&r]U0 }ǃI 6r4[쏶Q;Z]# s@g~QY ?rCjl?/SILD[HA|Yj1͑$=(5ݻ_EA7~Vk)GۻwY@P+!)hM6_:\KAMP 9ҥ^z%[A (3fRRk5j&O{wKp#H~W^yDIIpv6o~D" *9j\eq:^E:~@*s-n8TT h$gqr{ni@i@ő1@pڛ"܈ @.LBe%}DpqIԛzSoz@ph58_s~M7WK   P\r{׬﫬ԦϪN&8++so]dԬYxfM/u%וJRM7ҭ}{@|nsO1!jzT3, [>KJRiʶWna<\5?f[-{ʍO=Hu`Me7Q5Uew]5c=My3i˺ **:֞:@,Gr َt8)Uwfk)УFjzD%-}>L6xwgl:F1TNm+RvNusZE{lQ[wߗVuk[b"%uYKw=CjzJWV͂7y(Uaȱm#u庮{<3ګV&T=L ٵKg5?: _zv ՗_)* &*k~P馎 Et$@n5wr0>7-)hzA|FG(tBamSzg_=6R=.q`8gqTPPVn\וc[廚/{j窿j恪XY9c_U4RO:*,ke [Gp#wku}@3W}7JVSg>7Dk=:;h͞LԪotsj2Z~HoF? RхK/ɺu:4Gv)͍Ѷ1cɧ%$۲_+q3 ՗i3mGIR[h㤚J÷^TV3I}NL;?sO }qO 詄Pvh욠%*WG)w=Vc4m2vVR -UdXZ;Ὶ6o2^=Xit8ߛ١>$/^9{i$1tC6d0גӎC*x'6T8W} (GWQϡԹNh WsWjܕl[5D) |+OϚC*wz5 V<ˏuMctSg|%6kfiKZCÐ,+qql+8qض Ueiq EEF(P*n`n<>Jx!RUtkbEe<ٶS2W$mjFS ֫$|W#VZdz7J>Z=-}:A7?uH0 z,׭6Ѐ4Ws \7v(+P)Z{muK9ea([|!5l"uPRknf9Zh,Irh¥ Ik%%u]y]We*5ömٶ]@l[(8nezƾkԶyUztK*X8/:ܭ.DɔWޠ ڶݖ{dW{SuT)uWqRB͝W>I]Ֆk٪f ϧk-iJ9rWkgi,mܙMk,mܙ;jm^=xD3s}r9"6fkاRE*X_}8R݇BF@IVRA)qGu8M]L(`(6&TVS"/U5 64%~!kvR~QZ~TM^zĚzF%TQ*RLO8nDqZ[M;K[ljh7,#]2Λ9:R GBضEEUckmܞ"[uVskk*jcO#\|erm>h~nվ-Z70\EV6Oȡ,s[W:JߟCih}4\Ydڒ+Wk1U=g,'mij1:z @j U /"[yE">zKw0TdY2iy<|Pc5no"崻Adxd4L\\^\2@ۨq-\k?j'U\W;j5oOQƚˮium˕twND\M+U|,mV=.}麎l'm:6iΣ!t8$Y-˶Tt] :i5׵/&-縱?kFS}WSjy}9X;5-#)`*ymSn`5] ̒]ǕL)ރGTZq&t٥}{E6Why=7?MS r^.-5oRٶ]h;u{T_[´fFKsDLPpZQ_VR]YYZuzuV[U5ڗ(xs`2 \%H2X^Q9V|aL׫|NUvjX&? m_/5eهS^Ujt*K[7MP!9)^B<؅lvz{dfW?WK܀[%qd[v 8_: )M*>Us)#73j_Ok`+?P=7Y]o捻`>|r~zyڶ9O[b,mXsDGr Fnւ9KTJ3r[ߣa2Uremo)&"L[5jmM}9c2ܮjc.od}/N5j]/Zar?KǦkϦgVj\oTz$iWckJS+mOޟZE0jmfZ;D/oCk}tmɝB7GS}ꤧzP I(~{d4QPDOpL'$vQJ͏Mujw@ PF+ѪUX()qEP%{\QaQI# MU ?ׂi⑀5U'zzs3y]A>xD~*Ծ{WmXՍ5ioQr UkVR$]}QoiڸPHtuhUݢ.&iPW}lX[[՗JɩbHQQክ\IZaz'o}Ӭkʿ?SVGi?g8i(]![\)))%{hfLMHgMG UT)0pIDAT/Ƕm_ݮ3T)ܯI#izdLW!aezӢԤf;-:mQ軕'SsVS b]4Ge-?k&xFoO9F|U1 Ժe+ϪV~NwQTҬysuSIrEz.‚"Ky~=R5/4lԐޒT9k籾4hc0?O!٪Z)B*ϓ%WlI}E0k}`:<1i s?PZ+RaAuT1bN[x4"]UaiqK*Fw!?Lga7JaG!>~6Gd[Y"V$J~)p W54 ar~فlRjJ9v0|ԑ"X<>L#w$2zwYV?};q[7կBj Hŗ8yZ,ᣴĩ6?Fe5mU}y }6lֶG1]iy>y|>yl۾O@2B/a4 C|raLW</ !%ɽ*7z+3Wkp]p޿‘yjJQ~h3`5v]Gm˲,M>C9(xs^j{)4ئ)(.ۖy})Kr{ņpb1My <qc8:z^QNqދuh S18¼\0?Oڳe>U]#֒rW*TUGf(?,By>>!K7;:蜏HTӐҌ#SP!/?T>B +PT<*,}' *XBpcNy<^EF+,2b8' +`p("Po M.B ?ςς@ g<Ba@׮/7ФIENDB`gsequencer-1.4.24/docs/images/AGS_linking.png0000644000175000017500000040100313246707333015722 00000000000000PNG  IHDRDbKGD IDATxg@T50CEl(ҋ(&j阛$J1K{& (Q#V)"|? A@ sg畈Y~H*>ʮHp322]=o.ԩh#999ʮ^8;v{ i#666ʮYUXXx֭"333333XFGG߸q#??Դ[nC QUU}r<G$966VU?deeOΝY3bĈɓ'D"Ve˖ή_mmmW_)6""z11ӳ}ϟ׿aÆ7xCѵPVX'Сfnn7¾ۭ[Cٕ~~~IIIlmmzꥥcǎɓ'\RKKK AEгd۶m۶m}^ݻ}Tjժ1cƌ;~J{7 'Ls…SN]v-33sVVVOSvݻ7rȤ=zDEE:u*((hرnnn/|ڵk 6n8a„reLDD/rj*Tzkd\*LIIYzUN<իWkkkرcNNN̙3Ç'Lp%V+#J'Nx5'''O=9F,>}SN j:\NMu ___}}駱cn۶YӧΝ9eʔЧSsa_VTT,Yf'/[wٲe5O7SRRoݺ5gGMulڴk׮]jU_{WZjժk׮mڴImll… ;x{{,IOOٳ쵵כ%y}UUU|g#UTT֬YcaaqQ/o111y~͛7|ʕ/^t$wMKKsuu⒖V91::7466666~k.QUU~Av>Ӑwywihl@tttOSRR ̙3?*..֖)**jΗ䅖5|-[(ddd$''+MW_Д ZXIۗW͛ ''\f _ BBB~!C4>OCkut,--k^l2 _/ 蚚 v钒]]] xɘ1c>xָ+WHAihh4--7oO)ӕFFFnݺ5-[DDD066y]K/W_ݻo52ZiiܚyLLLjܹsf}Bll={tuucbb֬Ycii)iSs++uiii]tWYrJ_}G};w֭[ڵjFFFeeek|R+Д,\KDD8taaazj߾};ֲڮkNNNNNk|W7nܐ0ٱ2111ӣG۷ܽ{~lٲlc:\]]嗬_~EHFŋ={D5kXfݻw޽f//} 񓔔4l0Cy_*}駭ܸٚ[/e Ƀ'Kknƍرc 400^۷oMÇG^vg}`޽8qbܸq}̀3fXXX̞={Μ9vvvO߹sy͛7jƌ5]pA… O1cΝ;wܹvvv>>>-<'RiRRRtzӧO:th͚5:tիMڵk۷|{ET@*A⥗^DO.))i䩩EEE:u"""R4ۖ`eddXZZ>uw̵k>sk%eW AAASL VWW [ڏeFGG;laþ ooo|MBBB^^T*hⲐŋӦMۼysT^gk[o_d j}SԻ5`幹˗/wttTv9/oFvSΞ=xZ)T*ݾ}T*]ti```.\5`ggw/nJ?iӦYO%99y_oU؏D !{~뭷OSSjw͛78p@dҥǏ/;Itt??Z000x7|tRww[WUUk1bDB^SN]|'NxA]]݆FO8ޫsODD@Rzn+jFqquqqunz\zEEEeee^߿7lPyyyy'N`dd֖?9ݻwv GOJk׮-g,++DD8\BlvիWkZkhhԜt޽uHVUU={{dsISN>矿녅^^^G4++kʕzۣG!۷:t˗ gmݺ5***$$~饗fϞgDDDDHhgݺu֭[...Ç׮];vl7ŋkϰo>OOOTjժ:XbРA׮]vڠA~:~W==='zzz{RQήΓ򶩼Fѕ~ mZޱcǓW񛂈ˉmy^#kI `ʕ&&&ε[/X`ذa=״NLLtpp3y\]] 4h wwwٹׯ_koo_PPpŔt]]]??&''yR6q/j}7o }}}}ܦNg%$$\p)Չ}Al GUXXx֭"33333f ~Sr"""""c.'""""R>r"""""c.'""""R>r"""""c.'""""R>r"""""c.'""""R>r"""""c.'""""R>r"""""c.'""""R>r"""""c.'""""R> jЕ+WBCCSSS333baüX=gI_aaa, \@ o$00p…-{?廘 #""gױXi}XX̙3W/;իǎ `666111J. #:+0"""z0|w~|eIOO_~=v]̙o߾?sرYYYmYX7T/Ya=Z*0"""z>0DFFq`UѵCe1Js@X6[n{/&Nx6+l06vvdԱke@ˆ\NBQQQKVv Tpy9B ׌DL駟Ya]٬9 v%%x/;8͢\FDDDT*Uv $Pmpoo=z?^" 111򲳳W/pH#)ė@Xh该5s̘1w ȹĒ˩!))It911qСg 244422OLhbbKfUWg,WToM߈;<8ljY=V0 ':dw lȇW2+Uj Ü8dFDDD$IIIR4))v]zuttӧSRR:f͚WgdAuӛouSXχ1辄KtX[[˥<R|ߣGǏyg怙x]FeJT^y8FDDD/2rj"hʕ]ttpp8h洴]T"u}t23F.5eL5A_]&S"[>2ƒGEN*+)˩%"##9tssJ۷oJK. … pB9]]]{UXTM tTP*K^][F \zWVlZ$"+M~Se\}GbbbjTPP/{m``ѣڟQi VIn'pIU]yZj-!ՅD_|ݻeo0S[:T[ a6sKEjH߈Jh]\N-Ѿ}{ --bk*~D{>}H$ yu^^niKcٕ>ĕV:w8Sn bquɯFxyyWVVN4?b9H,`ߥ:ܫ=Ty'rPev2Ba8vFT5KDDD/"rTz}CCêgv]Jt>}N<){}ԩ>}<9[gyyhjRWw9iDDz={["熖?}ǿD"N'Z}O^wE7V񭡻^b*\ F#gi$O"(11'>?|֬YN%&& *dWJ^ߺΝ\}=R6&%Hy/"(ׂ7HNN߹c*RL4O>)>5o8Cꈜs$"" s9SMGD:Λ7uРA rwwWD" {-{^^T [VZeaak$z+P3 @FXs._1`˗//[_+U}F+T#=zN_F"""z~ h222,--322.cH|{RשmշoWJD~BJ,e ;$Z&;:rf2M!")񛂈{ YQ1 U~ Ī|<>UipA*hkv5xP(HјˉH@bpPC~㗸v};Ŀ1Ki@~q@ L^^֠ ~Cp?KѳIckzw(#eǂ?T Q\qM\cn,F" rc>K! m1IYeߧNy"y{LAQ`.',5w瓂:WHq 4נ 5AZ\pacM}i|6<*{J IDATT HD h4ŕDDDD \NBUU@Eް{cÄ bqޮV5b<w!/^Tc]C\pVGD@\ F~wDDD$ $T[\~eXc3άgv#dMG쁺12c<Px.ǴOFOf~Gwg}.*^(j`$ s9 U7nL1att74iǤ]av#Pc<\"/xee~CLEb[辄9]TXdmV{Kt,I,WW#r045D"ѷborPx%7QN׉HHIlK[W7ٖwN<'w/P HU448ss6Ť<Y.Wӯ=R`X/SH^Y" >/'%Yx;Ƣ<W s9 חצog1[45$zpP3C0T w){$Z!+(y0bB ]틌PŕGDDDM\NBVXjUkǭ3hNQyѸmv^FrL'?x#J mSO#M2Q٣_ch焒{82R"""js9 Re * N[VUU lꮩkάSs9pMa򚶩X9:먅ELz&NѱzWU1) *P!H$;Y9c%*:Tԟ66:]wCۮo|`|7nwGqѝ_#w,,kNkwk l@E[\NT'Q( Aqq:d^P"Rkj!kqr(HswͺC3R(bA<0 r23 ).p_oyDDD$\NT&2] >`:lǵ=K [X}Q ikys'lHFuc&RQbCrO!| .Y3Q0 f}ymڢJzҝ:^Ho#idMri홲GS2b2 ާ}.*K^(j‘DDDd$Hrn] R3s{7r q Q'_1#BXfEEͻ^Up uc܋BX_\,򈈈^p$'a87= AZ)ɫttΉFdF*x<"򈈈^X="7kn ]"۽z̢Y 1Җ"Ԟ\N#g. ~Av|ϫ^]D3w*,|PǦ!1rH(: ڭ݂#׍LؒYDb{WW<""s9 }>|7N|3杬T}yBZs_"].T78|PZY:eה5gִ|.s/PyHIDDDO\N#}O^){e'koɚ=ȌA nk?߷|.uS upsB #=Ixd K>3"ݷDet`lčGb* [?ke>D"Q/^Ъ0ڍ@I&ADDD:zoƻ/ ۻ@ERCvN""s9 x^gitc'Ǜo:u#@#\ca*b\];ۚzL`ml}i5\kmj;f >DDDr!7/=/W׏+0sQ\HxxCZb~^{pqPd'?x3Jy,ôDDD2r2oD ױВh훲oRIy%yܣEɳڌuV,A{FɽON]\`݂֏J$ ;0l@E0-3T ڶIf]X^8f˘=ȭ:$pP3H @Fx'Q :\BN@^ag.@UHo yg9D.$=[T-Zj 'q]J}.lꦭ̱qՈZjZ;ol=4\[Ld&ȳD3ZԁSVGt\hdK+i\Ns}#^? *\/*ʋC,뚇^ =סnr~Z5E4F ,ڻAՂ;9hDWyP#@ . ܣ_>#\O]owL,(-A ܏4`1=rnvb(B9 (îi&CDD$|$0B>W! E,)" wQUs_"j -DȋFU>}dvmEu Qx]Ys\`M{Kٗ9ɹBUM phZ 8l 01yq9.01#˸k^mB'9lͰwNȿHsOx#y'U!""z1xN]xxi̳mqW -!hZ fM`a9#һwnqk/R#!]}pBDDԶIHܼmh?^QG%NjwO*,Ǡ<0eyMZKo)}=(HE(ѱHB܈M0|}y#Ms9-ց&F!kNDֱ_-QlJ+KvK]"5K"ՈC)܈HIHb6v6e7{ioݻz3 #zTD<Z춸RZWJI!T`=^`ЂDDDB\NBu, PF]츰 ~JQN(HoAÃz/DD~ z4TUX}tYQ"""R r?/lwmwoU h#;qckӯ~׋Uǂ{JZ"m9Zsa6H*^DDD \NB~,OhԢnUs!6Sa1qlPQK>w gYu&0<@e1RC73u/"""b.'!/OY.WWnAÃ~H$G \R/vuK􍈰C&^:zlp]5Mg7M>XQEJ1l#w@w#fm"IHdXE2۽wDE"["j ;!8M[2˨1&Z&._2;'f.(B$oGDDj$ =H%?nֱԘwWv׬ hgߛAcQt)YupQ,Ѱ_7"?)vDDD\NQB"R.re+C68c .ڮl3P7Ff mp{Se+>0%RX7V-EV)B< A(.H]2Eޑ$f, 7bTQg64~amh!c{4qДC7toR%NsP7"3mؙ;ƈu#;"U$펼sM\ODD6I0\`Xjc'ffLGq7\B\ۼt{ ODmJ508ȫWfaz焛 /^)>%H]XOVMCf'0![}Qvaʙ|Ra.JSzkIMJW>v%LEJ` NC7)DDDM\NL4/j.IS\`f)UM ߡf{_y湶sʋmGH[r ?&,-KDD0r ci53m# 8zuNWN}ᓊv#Qc<E WrȅU{$-i"50r?B ͝ض/QI0xh۽݂#׏L::5K"ՈoH$Z4j^?x?;*>t8 o+R棪nMDDO$\"-)%R|nwJ$-\O*˦욲ZeVg`ꈒL*khs3hOٻKq>WWѭ\N!Ei +i3H$ v ^춸RZ~JIhw[,-HiKqh;bYG-u-\?MK2O*:N@y>!~Rd"""Eb.'a(χ=H]J\.4<ѿD"?hV'o)۴wFOen6;Q+10| \ 76N(ku$6EL LGe1RCo't1_sXҕ+mZg'?xHd>n^ئыAQ]GM7m+57ڨ aC$zX[{>G^찤o8uJڦujw~܈] WW#?iDD`.'axrmU*%ʿzj73P=wI+ p86u^u!x$p)pX7w! .J_?r>J`jT}J(/$ ~,Y\=,Ysf/f]t\x5eW ) BMvweu>ΏX4 qP}(,Q00|gC9̴͎:!=/9r02G-('Ug3wk,=t־YUJS=F*aq?N esA>ujFDuuӺ6o -!hZ :C:-TWMw&TRQBE>8PG""10|}shKN;8C:k ?a,q QWs+hcM}i|6(^/x@iKaʩY$ __r;v +qCʮ1ups'9qhQK]뱮!EʩS=ݑwCp1=T)$Ũ,&Z./@. VvΠ9cneWTl3 #z->}gw7~2#oVZ&Cu碲 "CDDr/bsۏI lS+Zz#s_" 5ZXVqZt%CCۈD0* оO'""zs9 s\F$}bŕf|geWTK4Gv"֚봗w}ĺdJa TtW*""<w!wqQ][33 7EaCQ{K1}IQM,`P AEAQwrHT83gyHuw׈tCc|cն%ӏLڟd XhY(]/$Y\rmsp9xFv@RAOլ_60k<:a~-`]tryk)I:!yAu9"#gGsc5nF%U8/x} ì _&| ˲fNCq8mG"".'r@ IEeDuͯ]T P{+|=>W.ZqLcMO!棚B>`T9@ A1:_~|ukNY׉^r%_fW™H+kj@5%5뾓OVlawB]dEP/<>u&B!\Z8ucXY%-_nv*q H0;:!Cu9Z7WTZ='Tu u0\ 쌢ddйg^n[*0Ge[#uގBZk"7LT6:`t@OܯBH*ySut{Zq \y!$Qxu&B!-r5ڼ\NאUI&^OIlMZ e{L,,7̽3\CI0ux$<Bk?_. iO\7yyO5H5=*h2Qc:?MĨh; U=q^BZky{[tE?]8 mMh<>>TO{TI :lh3BiT堺 X;[&| qn1ϋE'xGýAp==@WBZu*B!͌r5cu4ΡfsOϲeRVu5π%佾ׄaY9E;F\ZAf\g"Ҝ.'\u)=N TnuvlTu)ivBѱ4AW]uy%KjbI[HB!orµ*cy2ZZnxhbDobQI0U具l5c"9l}iיa$%ȿu&B!MCu9 @Luy3S;3댝]Fan$5ju/x`jV LHL4<(XBr)ߌC\FQg;?-}K\'jz18*6'']Lzx k٣DA SC`rM:@MI{L̯w0ںk{f$ 4y=jC|UXoi"7mLBތr)/& L<01ǜN;u_ӽExvPk㆑7a>b\^jn !+ gu@uy33jrQ:Qc1 3mLHgUJÆuP`wB]dEPO<>u&B!pJ}|y`lpP- ;Ns E׈tEoh6 0vDe΍Ew)! 俏6ciIC7{l' q`%Ȓg s~fpF>r݁C!* f'-eakMsVӗ96JP *=r%?G^27-wH(̽!Ǩ.'Ru% :oTQ!3CvqtHqZ,]j~>b$}(u:/"OD!: wT *QGȡCW&P!:Qcu337y$B]<@5:Z0p;CYYF13Bro.孭k6n>b5م/ 2#;_U8/˹NW?P 1B3BrobAm]uHb;v:^r9ROU/+ܵlĔN'Y Zu$n@#9D!" w'h:1bz%rܨOBSOM6!"*K=fWBbP0WeVqB>,T堺3&&^mSﲿWpDW><\빥ե? + DD"q8׹D! w4H(jvC w̹u3cwJR5Ȭ]>?!OX?FpfD`' ; "K:*:BwU%wi0e +bϏ12F1H\I j83D!? wdu9)v8:EEr{QYufպ븎6&6sk~Su3DzxnF-Jp~ =~:QHZVu,ByOP]N8"AT r|=͗˫OsOs_ _òrttU뵬kv{XuF'# +`%Hav(I:!.'Xu(\M5蔣*>KHFm75/~}j^*5π"# p:vȽL.'&P].Fw2#DS?f)NXQs=i{%P҂> &2"9Nڠ6"x2".'Aup4w~σJ5gFv_5~x^yCQp'y_ *ԁAc'D!r߼rrm@kԝS%%\'j,5%S3tt裷>}#FDi5 ܱQ]]7b`t;!q B8Gu9"IffsI~Yu&c30lMO(ichB91lq Vk)>T3BbpI3V7>;m{ԼT]vwW,w'9,x?v~UCD8<4O VjvdϻH( GjXh?tTtBgut{Xpa׳s fyd+[ycG-K )>G=6x\C5;GBa!T(Dr~rIeَ{q Z yгB\9<h7b\nt4r)W !3T(ҺOkŠe1cVmGύn܃sξʟie ;!#AVȽQQ1 ի})!pr e=4`.W\ lWI&{ݗDMݠ{.z]e,~(@ցpt^XsiكGVqB Յ`jp~2B0>>|i3׉vy1mo~2Z1"zxR$}H7?"iitYXoO80BZ BZPm1 O#qX8jvâ&< p: UdG!"i1[,4&B#u7$ y9iu/?=33xt)qu qh; "Abd",W@R5tC"E!-rڼpaST|, ^*U9Z5%SzN)*r5ʆp},Q8E8y{n(lO i;EB K}˘y1]>}͙ͫߓVlevzU k$n&bx\ [83HK"fCu9b,%Ms$;qkY׆XqdkXyгB\Q@+1,Q| C`p+⼤0;qBZ u_N䀱9g";S3-_?'sj'?ޡz6H H*QjŤMW8Z;^~Hu&BiYT.(P69HU sn7N87\;vg3κuiG_4 !xԊIJ# IDATW ").'\P>/+~jB OK:q"׉a1]\}raq{bd"PcҪJVaCIB`oBy+TV'.5U 1eIxTEGp ụF1s+.;ywϷ=I݌Wf02Ψy"nI!Au9iu \/ x]v-跠tہ\'j6m9;E}WX[,4(g!uRַ.5!7rB)Ds9.@m*IՔJ>u&Q =,)VpG煐T"SD{/bCi:jSBH󠺜:h..a~tqjI#׉@MI{N.,oDHZ^awB]< DPOdn@_ZEPu&Bi '66V,FQ= ꔢ_4!ˍamäppnIO&u&B_Oe0/}lƗHr~]u`OVr煒4Ua=,W י!Q]d-q9{R?U!wR9\G! x@,ur84b>o&AtLߊ;IXTT%O_"fks j\g"Duyr;;;94R(m̵{î\gjYqJlB8g3Eʓ}ԶKZ9_-A;ؘt7*v[*1+N)sccc%2Gqyr!A0u ByT7.{@A70 ӡCbJnFXl681.Q"#WZ]:]v xϲ,]u'拥orT7afff\\\VVV(k}ٳ'qe)2@{O B=--9T|<> f0p;\g" *˖-NQ)**..Wul<#xL~Ւj?O?%7n߿?44ӧeLςױçMfeeuV֞vdo+,5nظqcBBB͠)q/^xڍ<+h#8@^\YwؑX{ɩ#O8~z{[2+jrV}ӦT#gGL>8SLްaõkמ(A7A%K8pW^:u g :B̰Ğ:۵kWvvG,!XF)33388o߾?vtt 9\j-|T}~xeUD#\zxn(h%BTeO8t'NK~s]du9˲QQQ-hŊ5/62[Kqyb'ߣ#+ BD+ f͚ѣu#j7 Weu`ۀ DQ./B줚o!DP]?^XX8b''#F8qBT^^| ,5k֥Kx^5 `jj+Yrԩ-[899~NNNu'[B4kũ7P#pjsVi֓'jgL0AUU566ɶD1b쏺*\Ǽﻱg,1R$}0;bPeC!uo“`3B˨.KgΜٿsO_;]wK.|M``ҥK7^G(VUl򕟟_{>y U7Ǐ j6%:v옦fddΝ;MMMeoz \ں\eYowÃ333RiNTUU+s<83*1LMMSNݤRCZ ~>ڵkW.*jUFaKÎ:*k F=05Aàf܋ f}Z$x$Oqv4./Lo)<<{mڴ}R֨m۶[֎od;,{6<ud塳B~vhҡYg髾{lܸyf.бB=K3~οG11_2`I)>_YY@$bwܱH$ᎎ%BSwNL=y+>ߌ13n޼ٹs皡v]&O ]R6sf |-+YrН3Uza7o=Z 嵞!n6*Ԇ Q.6턪ɛ^C!͏&~xRU8<:ahrW|9 I%u****++uuu+**躶eaaaݻ'ٳg]v-(9믿^nΑ#G_HNY;cv^9rlŷ~+[LRW[{Bx z?b 5_?isˌtfh|].S`1 ~@ /'·vBKHCC@qq1ASPlN,9$bW:Wǎe?'%%uIJYYg΀ei]999Rƍ;w~!C~:thSҒm/~K}'|̙3Ria?X!؜_JVwNHH(--};ڏ_qeY,EEE?Iٻكj?ؓؼƽkYlȚ_,VTu BȇIRrj.{ӦM[rG=zriӦ駟-ZT;֭[u7p@ad[ _s̩y1_'3 ᅴz֬YlٲCZXX|>}}}_;]Q/z aرw߀'Oҥ˭[D nݺ-\ܹs_~U0 V'@u!OE`!c 12tz6Be{H:n) 91\g"|H1P<4_N6`VpA%X-AUQQ|rccccc˗WTTOJJ:Lݲ:9| eC 1b7+ %י!9˛W] |4('0k4Q||pGB?\¡݂( m\a =]醂hKdcdS*5e ,i;Vf\< dAQEBIZP'! iE \@T/'d%pB N!-[0v5l6#+k<4"]QTloSJ`H݌SݐyMV"&/zLB[A##tʳw+1,Q| C l41p;ja E=".'ZQ˩.'Q1F Z eV}we}lˆ0,\^3N׬[;7(Aq "DžYr=x$r$QhdYϩHD.ą3B7TVT*3r@T(w]FG8qv^?#*B" osʧбsT) =P+A>ԭz-_6` E5S֡ba1 <<kd:!Bu9iE _^J&.ّȍ9\֎4 &a-Xi> I j5*[ w.kuI r/6i܂cGTįlo /C;=D&(I+R?lJDdzXs͸jF݄hː5zIp^[g߆ \6wC~yt^piHpF𔐺!6(Ljl-CQ"Ba%=I+RubY]n$Bx< \ٙ@'(pn J5'pBms-\; k: ~+X[,4(g*bPFp%qf0R|@SB|"ZITة:cDB+ׁ%-<>S%OTh FvosF5{<:/Y YPUZ59}B Q gQ tZݸ ^oBc1P p Pzsvv!ţ@DVndkXNCi;DQTTVDJqq2@ 0:P㨚`v!x83y1"PrtuΙM!on:7D٣2Q#0rd8Fބtqyb')|?!DP]NZE˩.аR\~P҄c0trcy 1 1> %w?έ8SYӹ{|Myu7{sӹ\d*H݌С(:y߉P;.^#!DP]NZQe.@},Dް@ :a`ᅱ`GPzfp< fݾuΥϛk% =Nȿ`knjl\^qי! rZeVA QބJ|U PӼ:,fh+{0{y~|Aι^?`> PZq߁z?  ?L@u9i-C\:QH˻R7ahuwVzx#F'"Ơ4pi:(NӹΕ`C ({hXGّLg=,Wr".o24C.Pk֬'TVVf*e' 3yd{WwꜩMMM/\na^Y {!K;udccӽ{ڲRGG rbYgl[:X,/d1׾}ڿ-wޝ?uq &|}}}͆>>> McibxϞ=nnnu qׯ_k7;ec;FJ%}_?ssM:b >^-(**juUQ?܇-{XB6vZȘIlUli`\!˛UVhP 3fHMMeYL[U : ggg^Z(pssn`wm֠9ڷok׮*e7_ڌup`D" UNB0-Ћ{eٓ'Oʪ"KKK__ߺPUUUDD(kxto`Ç4k׮Ig>|chh]vջAoo˗z7X!xR򤰲uz7g^˫`TlTfQfĸ:w cv\& HlreYV,~Ϋ돂? sMۘe' =T;/{P؁͉iTͫ"U;^ŊJD#T7Y+Ɓǭ:`5ZRͲ˗MLL,]J%%%=[>?Weپe٪%K}{{ScYŋjjj0G;+{u؞={o,˲Y1[.T*6YmҮIۯnyբ6;;@׮]^EZ joƋF]bYnL2e2x_#FUdݻw cO}_~2ŧO><׹whGx;ϰ [%|S(qxݻ/WL* Ovcy`k2alT(͆ckYų5){w;{P{܂͎:!D^PyfyNNs#mG'L `={CpB+?״h@J ~0(,cx̙3GLl|FKg {͏|+~}ffmkgcSN ḼcП-SNi4ielӰgO= {լK,Xcǎkm%7Y3DOJKKjaۇo+ sv} V~ۧ-ҥKߺu심W.Z~[lۼSQ2"\P6np8jY8qѣG۴is[[[x|+kP4唩M81&&k׮qqqzzzWhz|?^~V Fֈo,ǃBȇ|k[n-,,4E5%D fC g}Ʋ6n0L^,&>*+HYS%3 i&ĉ&s7oveۖm_ؽ}=NN. [1R˵_B,~~t-$-?G}v^-.+W[tիW erQ:rVȶ~'<ۄTH+EߟZ(///_`Y_Q`~~~<oo;妣xE9C=zTGG',,(`:a <>S=:6hР;wYQo0'Νb̗1XsL{!}EܦaR|:ŷDrѣ&5eG?ÂǏKX|9 --m]O>]QQakkk"skuTx,*200b ,:ᕋυBW^;lٍ79ﲒR_\z5--l|q]}#%$-?-43Tj+e;gϴPG=yd{3{y?(45Cfxym45L 0O3Al} C{|w~YرcuD 6Ai!aci,}qCDA\pE}e8^+!i/qcP_.-hعsܹslذabddd2 8.*(vPXXإ c9ĕ5JÞ|.ocjdS jkD?V76S# ,4-h05V Y2ω3AT j]`3fS.Foӻ1KcO;>!OGn @ u ~dSұ?!\] F|S(r<?jqeA$ʐAxnŨa+kqTPѩעfoPo0YqdkXSIRR9Dm2=x^UʰHII0`N7nhmmmmmq(.N9>~8t\@>]0r;5%*RjooO:EaL8srEH4i~~}=:T0;COm; [lYzuYYǏLfف^#go@J\>WLLnr~(Ptt&lёo~iqqqJJͬY1l$F'Xj(/7~e@d캰 o'"_ -[bo%6꼫2h"CZ؍SD2w(TJXXXx|-'fd0w@ٍ>iކ۸5&Ol]m]X Op{`PLPribbbƍeff~8֮vBy/q*"pMx@W{.| KKKK.^qVD_Z]w~5ݑOrއ4$i {MrZJn`0N>M.'3XX"$&V"I[CsCt@9sȑ#GB-ZDU{$$0t4ިfm~XcaͧLH0Hmn'*駟&MDɓ'Ǔǵ t?3d˫ʍQvAow֣8q"~~lAB<== \9 _ҿk{߿7gX;R8֭[SoB*!EW?rAe w?s$===yw^U U²'zh|i3|0s?B(`gV|v񶷱`H0&)hmmO/ ޽=tzrr|V2߳$x{&D;$&wѝ L H05H%Jq*"23aSoRB;L[vȕ+W /Bd# I0vVRu҂iӦp8oKɫ)|9Lfa$wF":D'm#dQ }تtoM͛WSSCvQ;Ռ7" }vpCt "vBy̙ڵk\K [O{jN^^7_ޏ<|[/˃J4 =vp}ef|냭[mޠbB},?OUMw7Ֆ544DDDx{{3ޠ"tХ2a\[>FN;j'1lBo511՝7o@ P72?Nlvzzz |8BrK}x]9{Q7Bjkk)gŊTPrUf^Mq/}Gu*.L#!~s=yRf_C '4ב赲QoQBEDew儐R>/JcccZ6tЋ/R?_xEȓ"99ah`l{̙|TZZZj5@WWի-}}"*`H0DGG466&''/8 0ܸq2<Q7|NZs Ɯ9sJJJJJJf̘1j[zm ?Ge1 ?ޠD"qppHLLT|l7hoo_QQx˫"'eG+XւJ 09$I?sl?= 9#iF ].0Ϟ=;n8BȮ]͛b;vxxxdfffffzxxٳ ?|6 F2?&MJhz"!1?88۶m#QI0HRѣ=jK3!$&&F`xXGiӠDMnj >3 B9UUU-2+8`M& F>'N,--747{%͟kD~u+ { ~^prrռ [sTڵkWkޠ%CԌe;#G)P ''͛7GGGזIO`;f 6@_28/!6p%q?|$e95?чZmw" W.Dz惸=@Uy5oPT&( ϝZ1cF\\\cccbb+ZDhh萕r@qp`۶mҦ:s\}؀GAv溶~_\F>C_r~ u ǧU< zzz:99ij+z-$4I0HrK`޽ޠ iiSTF+eOoRʋ*g;jy$a`PgRX:;Jq' 'HAըP3QF.nڐ`{gMP\{= JW?JRrs2 ;+!CHbb8//ѣG)))9S$){!LS+R{#^nnn}Qi" 睈 é3+^QamVIMM}~? ɽ ihz#~~~gC}|ϥ\SѱX,[[ۯMMMGd;`YO6}뭷vgE$ _Bi=l$.͛?RWn^t.#\H0Q6I/!mEz59(S*T]H*ZTWWSR? c|dY,r?n1-oܟژo1/H4]x+QcKp.ƄF8Ay8.{ܰڀs|kg]KE@M&W)^Ɇ[6(!L;bێVOC12@W-Y\юk5ty,ZHOC7HR7@MEDZ@h4|*.Kn:`V{PڵYﻼψ`lH$oV@@΋5655Qv<577R\ZFњ,fc_?4UC Ytiez)SXPXPPddddddDDUUUTKK LM8Fu^(T]\DJh(Sg H @ZHa;PْTPC/^xNZ`w^w5"%Iw'5H{bj.E!̵+-S~kB9aP~ʄXC)g{h'N+uJɕ-[ KgkMnS$u o(MTB{#-! q1cIѦuwhcZs&q&5;ЏI:I'OfeP4ggզ&_fSH!Fos3nSIy+ @+[9a|T|i5ihy=2yG߇Icv_RA 5jze?4iR]]]v9EMCnp;6/'[$ fS 4.Fc؆ +T%Ƅඁj;B^.0]~ GW#b (5bnC_ ɨ l 0X{qH|gXC@ UۼعH-qγ5h\ĭ,E1 =hh(쾎juI3B Ω_ʪ;::NE(|[` xne `t?_ :_@/)J#r` ϭvmasw sˆ3:.asQrq҃/FڈH D!v\{ekRB+;ĉ^](֘ut|0oJICI_75,%{˜1:ռ j{ߐ4Mr5T[vfU CZjT !Ձ.yюb_~Lv}͉8 , 2l2pj9ΉΚ5ݘoi˲rK:-&^H6obښbФЬI XݨȴДe5oc_-|_PZBWi.>VL:P^ M2>hֲ2òZZ ffzHi SLӀ=OK6!m;bף t5/vJ#J]?b4XLaYH @H#qUS~&LB{Ǵ@W'Y+6zf!ԀH,٤cVhu>W*WK ͸9Ϧ- ]Z\aq-߶5 `>^Wь32l&{UCVN"JC>deqg&엁KgS}5*:>zO/àe [R^d@.dJ{7 }L?2\yPu22 }ĕ>at\^qQfuI9x#tY>{gʦ/DAnC]Y0vK`ܺ-%Y׷ozpwhGPK3F8F ``~V PIgd<'8A<.Xxel7 %x! /\ VPBEaPMUD( -kʾ$x,-kH #S5fqwXRwQ@*FMGM&Lɫ,?g?Z浰K޴}SbyK6 ,ByJo>L)~۩1R"}Twc_82i;P @H1I3PDd0.iQMjz9rbYCnFnxPy4La6ˡeDu22Cle=;QvQp5YJ@>iA_i K DMF9x!*T<.mJ/g/d Nۂg1qrA,@)03`ɻE9Z=R~4-e#,=GwwE0'9q8]gkiȺq'w_dZ]sTpD mh g| "%86Ʒ3=^ _$| c/Af!$u1-S) xစԇ?,1,`Gkj`v^/`=}f$d PM- +ұʫ/ިʄ:|c9r= --K!C4Gd sBImaJ@%a"B&cQz I<A)m*Txs+QvXfQ}JCMAt (QZa&@ǭCx͵qh=2t3̓3k͸fG>B+2@NP,mx{\q;#"8RP4:Fn ,"EBdBї7 1[lfsg\>xa4`f><½6[1L )Sx.c=F~G# /"l> Aaz4E`!ꋠjPTvy/$m">B '3lR\Sivme /8,K^~z!+ʕ+ЅXmJh2j*Frx+pjF7̒foD)-EImSsd^*e_`uZ ݂.ŕqco|jY')Qo@wp&a{..|g;G@$mYAX: BSC?8Ae}Ǻ0n5ܟbic^X>HB$nmx{H Hix'*[\G £hA^`4JقTP}JԵ3p^'?] [wg6?ه@cvl$~#E+ndTq/ ?Ɂ˷/wD\0هwS99t ABY¡C\[Ms-Xσ0U=Ѣ2Fi5rՈ+WR+R<>`cf\2r@gaXCL_EJPH)=>ΆƕŔ=x,ᘄH\ ]j*|-emi4И`h׷E.ck@Ӂeueii e Sdy=Y-P a"7\ݧΉzܞFU"{aP|wẌ́ XdA\ = ۨ^}h\diSϛhl}$81_Hu+ $oV| l&> I=F-m\Ս_J[;~p\4*U/hRL&/\OLOL~i[ĶlafL0بNB!@ Jґ`HuSSq:Fws>o,'<9C?V:VFKXz ]OT<( Оq!t%tNA5SG]6#4 >__ ݉*wrs /b)y:x@GQʕNNHzǹ:0j+[\T /ҁw H0a[|N>̂*=L٨+wLŋkK}~KwhLmqj2Ը3K /Ewo z!mk;}avi[dă  N_Hۉl| xLT[Ɋt i-D`hq%\Y]AzHdK[|ۛ:pWL .TvyHn;jF\bjQrj mǨY+)ǜU (_^[TD, 1, VŖIJ =wXPxbN09#"g^f7nZ5dUS$WDð|iR1"}7xRjvt;ILwOԞJ<9bȊת&A$3/DHߍ s.jddQM4tR+W//e3سj)H:7Nu4JH珤_AaARj2*WQNw,yuu\gs^l\gR_ `d"}7kT.-y{-ЉT'#+c7jj x,n6|C[AimÂSg 2ٍSctWȓɁ,Qrh䟁\TDGS)7cvf/vFǐ}/FcȚXSɨPhӧ u5t}m|W Y-NLwχƕ56V_"ŀZDhвl?)6Sܛ僗[Xs2w54Lƅ;0a,%7 ce+ O:p@C Ҷcŵ:ƾ0F T% XzT,*PBD kYR+RGZt6pV43 8,%k%%xx0y@w7+Lf* IDATB({0'mgҙ'm.g\,*YQpآ 4\6hdMe!!U7V;8k^A/cۅڢ>50y}GEBe4ׁHaA'bl`!QPa< *];a3+OraJu6pi5R7+ CI |9)״uS, 4{p$09GS]wodH*O:sFХl6 (EM<4(ywrVQAM!/~io1e>@u"jQm/ϡRmx64"-"Y~Җoo*m~g/'?Q `S;N,:Ww+V@xݷֱw&wbxA42@}[ R4#g00%AlX ~(A eP.И9XN4,)>|ڀcO@h4Q7FHL/)~Em]pN|E4fD#3  剰yYQEQ'OǠwW=вA?D)(Z~Ģ[9k;VK+A RxKmgtC uFE8RD]04uQ6-u-KCd ˓#"wD츛wWCMQϱ쑴XqkP|2*#K9 ܐX_0MjZ߫`Ax]Bnho8a,SH Ď&Y) ~3T#( a4DUͨ}Z@1 k;T08`Q }N'.Nحl" ^7 >0.LPp:4h?jIJǁzqI6Q A4.A fxX0<986Ʒ ǽ p.>֨AM&!Yء=ǃ?ұʭMLGbKb|x4Kƾp\rQHmGUqXV#W Yf&hUŔEu&r2psvKET#cMҡ]KNAm6E&]v24{*AR**Tt*""(ԸC 0#GJkK;O7Rv5.Gc8fjt\#"] ]UV;GA5DCuj\?mi5~jE! !]b BW EΑ:l?so?p91|v'uu); ߺ؝h_PQ*rC 9BM,OSee/JJtr4Z e)vSgrCвm à3>o M5ͤLAfhj趇۲Y6|[ 5 Q(@Wv=~9>pXP4Zi}g6B(;( 7*BDeZH Ib͇[9},}Y]M{P 5mn vRjNs~eLO q {zj<(8Cd_-=vW)|wX;"3EG:>j+))յgږD ܞ i#@MZ;? DiA=2lChYw6urԏ 995:'ec}yaNvUbrC!:`FB QϠ6t=zJJ7SC) AAQ[C1`4&o&␱jZ҃JȫPoAeZu;B^*,V-G=16c:tB] S5ڎG;WYlqyTϱ3a4((䝂@Ѽ̽FXq94`Awcw[n<҇4P[Ddbe4?h4z ?UۊgCcG?*?&'T$[VW^AA vKE=T% } ?gAw,:@,@Nހ廠-ep,`3JTx4Ժ1B*BC9l4PCu!!|6f*RH|}- &%}js`Q9j@`)VgҸ#qGF! qEecs*ꚳ]gSqˆiG[FvE8nNDs >J =mld}R}>O _F=_Q#t=4><9$1P졆憾};L?ush!^3Q Lp7._o+HR[I=*"P}`7GRdvEx(Af d踢,=g^_eR߃.͔C݁L imۚ$MM] H3@ Fq9*{({]{e{4qd'  6 Σ&&c44g΢v+wsߵ5 [>3PDdR1T\kגʓ<>`mѱtG>Mհ!{{ƅWU 6X9\ mgųϐ#b!{卐9&J*[Rr5*u6ԌggeOctAv0$9f=M=?o&"52H. C=d CYT'hh ?@J4mzAҹ3l>@u2s 50U $fR vaNjYXZ4ؚ+k~G+U\kEM&NV sg]urVIm9]+FDA( ; SUU-I 0mI?elM*<+H1߀İ/h {7n@xf&K#%3!L20\uy:8uY4 iq+NNJ:uph28umJ|gڔM#%}O} Ah7-rwIؒ5klݲ9#G6]TP9u]s;wO&R_d|ѡ>R4BdCB14Վ$L'+9NTFہmw!v$#[2Qil}7c^59\*Ҫt(v7w4}q=p7dQ&铉ى_XL4}gJ.}^9NVVQOE:[v伇mX"6 Ԝ.-p '6c({49`݁E'}R2|iKˠ@؟ gJ(r& 4}ԏ~iS6ΌQ_q4C, w .7q Y:jŲ)RtҐIfwã4NPCg80H(tIWZ7}DE MTo\94>Y_ J_LKVi>e"yB4ZX:wZKGKfmfrU8_HÈ77LDSݚ=%.[ElA$1C(hS/ `"Ko hѹuէPP!fM3wY_~S 9SvZZ% R008Qxb^켩C^x)k28eAj(/ф}F}Wڮ<}F۠%ߤm'L}hhy-W6Kv(7ɜ,52Ђ{-VH~ ŻhDAapPQ_ڦZ}/Lxϡ3,C̅%#qar, ?YŒ4koޚ\\AS9LUՇ]!hl9r/7zJdx%h-CU:nQLٹBU!  [!r܀!+Lc ]̸w1U˩Cd͘7vW:,?O2iM]3f=#oҦdkWʯ$U&?gid#_$! Zwf%ړGᅠ'Nd/7G'4JnڔxFg]m\W]UPPߜ ͷ֟h4h);@C!^pånϩwȓZSU6Eɢr{F(aޛr@$9aoeRC> Z4˾^vC yȬQI߳;mwSG=wj>=V9 6+դ!^t--يlyvlj=MMjLCZeԩՆ;X{#[EB{/avuLف.:w S)6%sLi̽/ZPZ|0 sU4F`;xͰPZ:sx,;n|.2q%" Ԝk>( C!ɜd 'V&~\\gk## K'O΍CԿT+ҤkFr]u7.+8%2GwGdŌ/~Ϸg!^NFC Ɠ>t>p^z- ^ -Pt 9ncv4w+"kCKI$lɳuuϑ ɦ-s-2+Q%Ssɺ:C}UGƾ*%ґ8S} Eʾmr*13(0>5g}!!65ZlzjӖF4ʋ6~O`;./6[;C6mQ{op/ft8GUq))w) {d̝);܌-u :I}.;rC̙Q^>TufGN?Qp"G#yI> $ bR 9uxF@}x؇=Jl„t錚dqjBWu,Myp;-5؇$I%iOZ?{|mSm"/6cnd"Kg|6e"u96__&a~P%ɤx7]mL}էhi.W}3h)܎&ޯ5cfb}겨9}0su66\zi42MX#[w΄}Ts.&\w>5J@3 VYU,^u}_ʆEB#*FU2G(J}.v=8 _^Q?s T7?ߐnN)/KZč #=iX:a0~rbENPy<% }H\i(xr?x@|r lyvH>(V;{Tŭ KeR(c?ҁh6ԜE~>MX8P{6d;LS᭱@m>C jErgI{ߋ//F3>*4l^#/l-y Ah;b |֔^EWP_ @W^`+.;4dޚ\^E ,AkM]3 s_~SW!plQȋ IDATg}@ykkup gAȭ :5`,_{>/ި9e4c3{{]dߒbuKA?ulCT@ FہȊ1odzXV*M+GЫhIx͈qyw+(%o"+|'ܢ~YS{اFG: ͐Q˭-O>_zlA~GARʏ`IG2tv2NM']#;@[Xlp9u`~qS]\}--sBd/bri,(XPo7.V^ֿv2|ߊu4'Nxaa,yV2o_mIZF"@CKQ~ UyK! e(N(&gbG,.:w90JAN^+KS3f+|P *H/ߖO?ZXcs)؆}ϠNE}Aa% ჆W&b Cc1AkB^6 TCD^\'c3D@0wLצǦƎ+sK!Qv sp)w g"jSKs} 3Ꮬ+9%ڑC*FD2FEslElǬopa8 8ME]D7S~>pb ]1zZyy(Ж-&ykvC-_|}n`yK }tmZW|e~Y]ْlLNsv p gxo)Ehҩ9KH3A1Ȣ9Gy*13-(JWle CLP-p@7'_d/㱽g}6͘僂w;_bMM'k ?֛~q./ŕ ]Z˿]T-ߔ{KMSawGWq0균+C(azkkV\W'2/vqy5Ebܓlu9|2 Ϳ>ᐇ?ݨ]$`ͦ| j0PC'lU`;6--_d|wW]h;]ڮSEbcfv!.!Ǯ^3ni?87yw \\AC!EpEɥ( -NjR3fyY#[;[mUѬ6G"76! &}ՄV@ 8YtPU8wp z6%S 5u*^ "+F 8[rLĊki.Ko1B1 pMqԩy~- ʜdqqi5i{L`<m k(؎ߚ)$xFpTeL$#! ab83- YdddfƦM۩>_d)~D60f3RKiDVm{էns+7dO?Ulܗ 6dC{=#3,?Qx"_?'`ɺުTc.^8!-5>1Gs|s܀;KG##lE@,\Squ> M g4hjuꞴ=Nj?߲hIxs6-EqM&EjZX_ȉMva$=,| 8h2h,÷ʱaW嚈5:Hh>(8ۺc> rmKgahU*OR9q.(-ppl(_h'Vn86v+bcad%{q ;X {𺏚(؆ܗ ,~HꔋeGgDlw*P{qjPTFohk؛W"DG mq?)B$Ã.G-|rFmΔdЩ?M|2hѥpwQ{3Ԟk- ظgJΜ/9_}RI.>IgX/b|^@tj 飅4i#OjQed$V&~t8D/:7ko|v4XwK鶐*¢ãZjka%*T=a‡E"_.!.R|+eq4ڰa<["ACwɚQ~d m"[E*"1̘B45ipa[F5g>V\zGѤxu&j' )iX8 {6jQyB$OyB酸¸[J-9"ba<:/X*SEq, R@,/Z0kYؔؑ#9+)ً=tF}A$9aߜ@gQC> ZtX uґ壖R9Y}&mm:_zy]m\dQ"7K5ʼn]Bk `o/sw&id/QKKq*bzX:!{ T8sw*B|2Wi,mTgO(TBFQ,M3w`zrg[NPqm– Gj/31cD3<]RMi֋Y&*83,gr0WӦ~8<}h0aq6iiG(a!)5 eƾDY]ي+Η x9{+uϱtbΉhwk5|N@eCZ.NzVn.':Y>ڈQ;N8Ԕ~AF4p{d'yyEG{?&MZtd Oq)r, {Tq4D>ď` ʷpYʿX̓s3}`! k fNAS{ H jSi\NΦ sO1 M~W,~[?sGv< *4Pep)4pq 호'q2oKRSVoF!g*珒S?g?g"oMѧ\}lӨNf̘eF6"U-D~&o/4wh!Xy)CsC5 |> {h,%cl})=OA oKX>,hBUἠyf)B f|&J>eS#UM?Qx"G#yI6Ό{GArJa|ON{pڋ\K9KFiX:am96vC(w AkP@c-[ExG.J֐WI߳+mWsGp66RG #P$PG.N]@lR}ڗ%{q= *TE瓰;w b^y uEҦs2cܗ,|6a4,.>-Ϟ7t6wJt40/|T\E^cGG@} FӦ, 0*FŷxEԉVy`o~~HoewBVNCF~8DGgfפ_*4gYstsq9)Hb u/>z=t6a?qzV;Ki6Dn=6[]_b;ܦ}W&K/>GK–Xf떧+RSS+?c° GN~ N2EU{Ҿ?oXsK'dшm976U?1cfaֱ "X̃؇z{30A={%tOM\}*&};hhkp|Q$iˈw9 0kpשiXǻ?-^ ;K1Fs}uDnEnק%g#OW;㙶G&VݘupeW;(;ą9q +)h,JAk3x"w11-^3n͋_tq돪4WPK4ma2Ng,F+C+HEF5j%z mO(T/: 0ѹ*VRȊQ'}t%2c#šƚY\]i'uvw!1tRd?seC7]28Gd5u$VRika,j].NL:ur^Rd؈Ǽ' N$'|}ws"] mF&=g՘UG3j3뭕V=F׿܀@ %>;u4RG&b5$; /, Yޜ^VUW݆6@}@lC].M%T%jHl%0ILS||c]2-Ƈ"& pfUp{ӔO_`ཋ{oǨs~]m8L~ U'A AZWQ/XP3e Օ'F>Iu ZފW|];rR%&~k2c.`"6 d@$}EucE^R2USXsMKH>Sw 7'nnh1P@Qj=P`ʍhP\xmJ< MkUJ/jwhN{UϥpV=,S=Y;iO:up~b}gp0A !h#.ʏ!EQG }q']Bk e7T b;4Y4v+>ۂ/G_)+є\)A"k!3 ǩGNQJ!4_{GǣɠpB \Jll޿$m*n.uy&}Щw#3Q&Pv=5Gdcvu{; /GlmaܡQ\a#C" Ԝk*G",d$ZcMy U2_P}ﰻٺbţGW]8=JQ:}t!$.xF1|iSQ2)?0>H>DBQ[Xtx# E5}%mk>\ %xFp+CHGAdChIN,2j2tۮom q q8K?+O2y2)}qX![EG=KzgT/==DT (8uԩ}JssN6cfbib#Ely.3j15gYxߘ\,%]Ԍ@(~mtN ^(U2~~3w0TšJ(H悚!i;65Jה~igGt:A2M.)Z,Z0c))vOwl#Tڛ=n{i>bWA ^Rc@Xs-HN0eXCoU5{a'%UjJ7^x⪻{c@I&!h-RѤSv\#_ zvUTbqnpE]T|C6\&bkUKGdOaDi 8۔>.Q131僋xiM6f;X9¨T|KY> X:j n\ v g"IQ,uY4X f!5wٌljqA: ~)`Դ];g6ps!Ns7'YPO?QP yvܳYY9#G6]TP9uU$\$8G0} s)G6Zkc^`+2G=gw=Ccq5(z| +~;yλѹ;Uh;@N>fُ̽epb A &kJG+hu/dSwV;MV IDATHz"dmݫWm s,E/r1Q$p+`֑A'O/?GwiLPaѧ\]GG#~LrZ}hukPɖ0`:hd/yPx!h-CE il;s8&1&0 s欍X(t_FԔ~A{h2{~8v~+OԢ""F]1z, oH>M"q5Kӹu"+ƼI[tlU#U'2,AkM]3w/\4r+U&lpZSN1^%SyӜK$/?m*Nh;tfߌL5;ENSI#}VL^ipeb.bf#]՘11 -iS ;6?ymG#P&qnwwB q B~?<7_\#7z Ĩ99Z8ԿA&y]ڮ w>d B&}fo99//h=~⽁N IR@oD ὀ x{Uy]y/6$=[ExGnﴖn=Sl4B>4Yh)d/؇v/^,u֊MɡC11&ysQE=䗨˦M뮞BENGz3`Ώʙ@s0dOB|suNpS3f|С Jֺܺ]il-m xe6FNW* QͻvcVHNR@H}4pj.U<*;VJFLNDܦAB\BZvڌR?J!e(.ɤ(2x{[?GY U%/ [_| 4PGFԩX:ap3㞑ZJ3k3UGrlIڢhRc+`'w `N]6 ETők({Q:kEcP]_~t^B  h2)I)Xէ_!ܦj ƛ P}<ĎN"oX{S}eJ<ގf8fˠ#oW_$"nuV%,m [L٥;P6+]jmaFܯ4?M~',X6뚊"fo %ң$mCfҎwE~ e_%Ñ"hM߃{Ft#?8jac:8G{qJL|{g|H} md#t?vy%k/>5c d`벸$$bB L}N+k/ 4 gO~>9øѤeYڈs,4Px%=/}[1tʣh v:鯣e"SbMf |Ѧb3b;h ¾LPzd9sQvi?A~'燐8bw1kƭ1F|3 0~n5>͢>-np J\E/դY_ʻ^_+wWA@ˌ}_؝x,m5Jx49Qu_&нiHޱBU!`%Z2bo&f+%?*%kTѩĘY;@K걫q+ gZ-E?߿*;)d^"K+[Τmy/si%7g44c5[iU裉ZqZŵ!FdQPdz@@ q~bQ);VpSze<)؎4gFe"}>=jGkeՍ _~e<%wSQ(uF ԜsJĒB9NHNGbl|{Ϧ>="93j27'n톆M !h@l&Bʏ"d?gɳJ5d\EqGB#z /S j0edP6%sochMH:ySt"cc3j(Pye<:Ԍ0僑41ẃbu:. 6J˫J 㦇9^@~ߥ~}{gW7Ft0aMS9o3Q ߀hTeL$cʏ؇Vkh|W^a-Q ٚU$2owHb:i*e"yB4{i/?kCU-*X>.͘1-f`d2/3gf=eQ@~ 97sViVȞ"9lwr9\dKep8<1YCʿK4'[l \\A}>RƾX6%Nt̯M&:o!a 7 fLy^>iƗH {vvo]|KӪ?cRXySxs>ґwhU0U@,>\^_~~FLHWNfC{QSc+qSXyx{,xʿ񧧝걫 UIUI3W6T/T5z6Ķ7 NgxsۃA F{iZv=ިo_W<YS8m*4@Sm5{47Yxko|"v4PHm(ђm/lca9qYا!nS~9b; wRRC>vrUkanaSuPuY}ah(.c?ӷ2->:MˍCx6tdR/ *}qc[pLNPCp^P[QK2j3bSb]̑qb44P-ʱ 4_ze˳ Tqq^DSa3շF4}N&\JQZC/Yp?Ȓg(reۚ6%x_Fs%djR9v5HGq9O}; e"4>hތ~ܗF$NdIR'+T'o˰~/dtK;%487S*J>ɱcff.zlK9̧ʋdE!KXDd+QE8OA@M&T^aLu0,Cv y Ѵ2Gu]~ %UtnjxƖTGzGqؓet.#GS>i?Y]|rk$^ f㿶&M}1'1wIS#ӏ~\R_ZJEzp0p꛶F.?yϤ =][<7qB[#YdRMn hI;g0S;ī@叔uM$py*#x.48O}PS N1̈X uCJi8Odܬ]w }$n<T@W,}u寍}mF?R}8<6@;&.|q7Kk-4Uc1Qb7Y=.5pc>eg͢`>؍xe䔊-,Y:1&[KisHq 兹\u[꭫..~v~jK XYZ̜AY@Y YQȓ1>YOHCN1n//E /k/BvoP6+hDL2@΅&xy"gN"ow 5`@j$1wݻV7Vvo>ߴ50Fhͣ4>O;*)͌- p7CԒe/c0@;U+q\iZ2H]} 1'`Zeҗv#\F}G}[GY Y"Oځ#jUNN9U9Џ~\(ulO0&:Oss,}:Wcо|r lBr<ͅB[7+} aH/SIy8Oy,kO12YI $p v# FtLqr>1K]?7V_5no0fu6c@1)Bhk$-S#/n|QPb G }:7H=!aQiu؆Q4H;`nlȁJ$ACSH5$K}6K# ,/]0R-NϤ& 1<*SANLqʰ))2W tpdj%h&[mɏYײݎUAF۱JhD8DL +j]S_`;MQR{*E*)"Պkբ/y':z 0b%P0 9\U;miUL[,Q!rbb4:xC+ʽl?> Am6cqR[V%Q"o﴾J_758{nHמc 胆R v:  X[dȑlOܮMqr_jø ^6^;lvdbÐqGu4k츾C٬V4~~9$m$_x<]TԿj)7U}˩zI:: P~u{h@1RD D$DH(d^|*Try}{<:&68O&ptr?-;MjǷ\R(/ۋ],{eK:*+ԜX%UE"Z@տk/E3gGv;n nO`Bv >zu&& ^XQv i=i7`g/g8= I̎U_hlm@ PN)G\~"S!FptuH--؊k>H3#3}`MRVq?mD!y%ffO{Ū]Ip`*>̕icͤ=8Oz4sKʓƿ?M޽ 򶓷&)-CfDTm?u%ti*`M/4Gd n+Zf]s.Ug lKM7@cK_ZZGs=d׸i8DkšL..:c'COtѹVĆ~6c^+8슉-mYUYI&Q"wMȯ88.ӈb6[%o m,k'-X,ƹn ͐fįƚ b̓H礿ˍ"0f~iO*sq Xx1i@_w|esչj ܡ.aBITdW]'dyKՍծ?=0dh"^C6Mٻ9~sJE `jdtG{/d d}d?@Cjׇ_1rI7LUII{&L qC,4Bz$ho0senfP5W_ 3I2`5'P }LL?/9=o%ITߠ`F"͜23Mƭ&TdF'GpLn؏t )d*)xوeWKfH3ihi7ài9I&l/6ʋdom-P\6HqY)Tφ~@ v֯ X euET^${KX%@*l-L,2yyDzm\(i ye>b(:u.׬ĈWQS: v 6*>0s uCMuVWL?honlxO2DNj2ѦwOUѯ/dZ\FY@Y YQȓ11s*lZ1S)QHdٖMZ/ p3ӅߨMC_C"TrZSZ"4w"4ibY]92Ul~r:Oj@\8e좭iqW`à/ʉq؍$VY(~&0yj3e8>PHS_hio?Fٯer7Kp\ "n5*c0اE{3.!ow|zUوl>s߃3\zRDNL؉^X}doW`O ikeqLik['nk<=>qo8[}FFY>{P؄ ^MM뚦}*y@8oB}p+PaI[3/ŶFn@[$ܣ%P:Q~kM qLpnwzZ#0yw'ʓ/awXx#[8hK{ɴ '\yS7$h#q ǥPؿ`O(9=2,} EDiYڃm n'@@ЛSwPREG}p} pНր>hSt(iBS&`=nzR\ި+QiiHTSo^S/9y;h0f2M(M75sFBg&3U\HiNw^'RDDІoz^~>)G eVQ9t7cб<M(J,vbbS*R&xM~~"w^<q{q}JRrJS!Sp۔q]ͣ\Z'>MPsz&fN,(=Au:Mk(2=3/=1~cKV`jOiq:,LsONQgj #3 |HZd"O ½]]=_z64]Zō/eBCL9!r-MwU xߨNPZ)OWTSt^r>JTJy},< kP e.1օ!?~+Q#OB[61MT^-:yOkLʋG,mP?T&)ZUIVUs~%i5{#HCz \/d3ۈl_sj)9O̿~ioa>MPqzx>ɴ#aĐeH'3ԯ0T)Gn\Qv,wb%\3zM~u9s K|3Mrfx>ɔΊ2E*/RrQ #_HHI.Oޓu - E:TF܎ <3cšC3O2Ő=$]"9@aݫlYOiO(WJl߬ v U/}d K g}n/*"EQL~Lԕl_{_w12-EJqb=k~{"^H叚aPk] bD;ڨCB9>6~Xි)ڏ"=L2bЗ?$ybQyCG[zHTOp:3Zᄚ~\}AR9\PU"ooUeH1iCfq Z }Q i(zP|/Ѣ&)}ERߟ}m={/TdEqڛ&2m%iiffFG#|L]t#Jbi Nޭ _/;Y HzpJ3/1Vhm :%0 {x;6,|15p7dEeNwItn´#1YoЪre,b <򇝚L`S *]Z;RGsGoWzpÌZSX/jމ_?!z9~`O=Nko0rrH™nr5y2V6\凖*K],]U tNWp㻢'iEb_w4۳D>8@K }|LuIg]YUY_\d 2Vdd7s|SȊ"*1 mB#\YԌ`m5?%x?ä=Ʈ+$n?"Ѐt,;vd|@SHYGKjK;]WS|x," ~v~zd"^r@{NU<Ӫd諌`ɜ)#iDG!x>]zԊ=){USLZ0@B)kBb{qL~LryԽ={i#b%w9+0&en{ ͌ԹjIz6tPPfpg諷cd)4~ScD.)T&&l58<1֊B'㷚JdTKDN؇ Fy*$ ,mff7բsDZMsS;ValAyyIڈk44^ko^^v}رcu]9nx* (?7Z552]=jϩ%C t}>8;kY8=*aE\SȮq#(G, %K,M0k}HsX);I(tکV s {.آج]I.@,O IҝVWw,ؖ[J!N!zR* }+1wU22u2Q4#*`?8G5{!ӑ%R#T\᱾njju錦uCbHۨڐByB'1QSЏ%/@z y~yy'N>1T[<:_L.>zg;J9,YS93fˉخGv3sh{aOr-ax/Ƨ:@Vm;T7e ^6^z=B*Sq{(-/~$._?G_I^G'Ly#g v슍fMFU{+GsGڛ:n/dm6$-5؆vTxX{,\a?;|yQWxTK_^ڟʋ(&ۉ;8E1rU߻:_QAMm H!9lDyj1-V*ҋ`P?((;lVF'G8JA_Sugq}hși,'m3JK/XX7]I m c`E:gfj,'~@8W]x/bxBY,i6Kt \>by͸/(إfΈWQWLu"Ǒ>Xh4vϐoPXkv˔e_&}VB1{=SA/(= `?1Q8^W,‹ }yB{Gn}iFnV#rmp7b}r'0 u#@-DijkN;U5TUa˽̡3N>/_~e-yE WǼsm1 -HЍI'Ug lKv8p~+VԄ2{ B^O5wף82敗G;iVw\H]!`ӯoT\Ao2}lOʟhk0u`vw \u`8cAƠcy0&{3MU }c9?HsсPJ/1tc9%a"6U7hW.ϩ r$tx+tq|਺™(}AgE9`x ApխRS[ӷY+_q7@8o9搷4IA5nKNM~GA4?:|Uӹ<&жtS״7aʄhFk GYUWB}^6^O=ˍ@{ aD7婉÷mzvϰxoi(%f9La=.qv-5OQƊ}e'Q}6Xh p^|*Եkd|3omCRuE:M,M,XnonL|I9?x/d" E:{rgC_~elhZEZvUԽ{RԷև:Ts_,d ~ pQ IDATѶoG]j%FB4Bu r 7J2Dj2):He,}=DRr En;>; }q\2A{+3txg8Ei@Ն˔Ғ@?0Ŕ/H_{lvik$E}\A uNzZbibbip&jj2)إ MMcL&H5o%IHvz,<[x6Cg7es7LX*! 6@1/`j) }xZDN(QQCVN']Q _d+ͯΏɏ>#0 c+(;*u,-svŊbBrͱE&AAݘZ /QMR'Qg${!(Ad/:KJYP#T'#b;bKT,e'q0 a ڛہHټw=y7Md3WB~Ej2U!Q^W]wφ>Cȓ>!KurOhqfd™ycC9?Ik5sQSC*c񘫭z-W*$&8T,?H8^!n81hs,PJ.rR'02sA!t%G=qgdկ}]Ҿ!K wi0sEW:ZQ@F]ʯF4~,Y4sm#ጉibOj%U㘴+ 輥o {>ੁ C]Ƞ\u¼;qtѧg9=Qz_h(LxJ2iSٽklVWEqm#o0f.햖ZEm(7MzP(?3un\MS%WPv 1?u%&<|[?-=DS"U;.Ә NoIL_Ҕ3cw#4~Ӡ@}aTmwy]ckぴgRy*yuEK }doA Z+~Mk{+>i︶"Ǭe.@ cB׹ )o?uCĿBSf.\3`Šcyd(?Mm6ӱ U_Qv#fSLΐ5y;hw7 O䝐($3|g uQk!"qeMs^ʟYgh(9S\Ɩ.G <稾OkFɩʹ^v`AY,R]qNH`vôj-׌^S\{IIs} `%g1/cbMM܅X`~2XhUVWG'GM[R?eލ54ZMATu KֺXdI 11QW˓ݭ "&T]FH'7<[?;`x EȮQ tf҂:gse#: EL#ً2daTbE+-9uMg)9T<:K(q%NLT|i̟|Bs= Pq+?"a5@ꐲ.&h$E{snƝ+<77`h0k[<ymY5-&B ?Fٍ}y8iO2%IWt ͮΆ* }|]-]~x`kSC}1&P`-3yc1c*+sr*Ӿűc@sf*&Nw TߠhRL?hijb SKad^X].{7 eBS,O@\CR<0)Bdy'*ӢtC-[=姑QzYQ.9tWJUJծj:dI #r-BG1r>FY"7+S>7ߤ.yY [mP#3"ܠl͢6^ wրMU(9 [|r  mͅK:)Dʋ8KkƐeT]Er۽TBUߤIJV 8nZ 7 ~u [XhD'b"<UT˩)8<ƼBo_Gsʷ+uY\zLֽ+M\Xȭ`A9 D1~|&6(Q _t| 'N 3靿[7&nS_ 1dI[[x_|_j߬EV@honLك$6LU;ؖ۳o{[ߧXF? Mz]cLqe#/Q{ 9gZM#MqiwwZsy B7^tj%$2! oa`P1 -BmE@T@^u^iΡ:"n5_;z"\{Tוn]S|ԣxhnZ]Ba܈<@~|Ǐio"hr-%j2V T/ӿkW4IFිqv.XPb3_ 740Xd%h0sC'mݛw-ɀAO_?p][mH:L;p'&lKض;yw]KjfԚWǼky٦*R[PaΈm_zg[EMLl!=vKF>9oQuK+ȜQG3@/1XFE 3g 6eNm/E 7P|BvUvW:8O V:[+V.."Gf>H|ǏL/ b2.#O`g'MdSL={<2u_^Gml2L)?CunLD?r Z>byBiBze=6j`P9>6綀;#slV_ڂ - ))چ ׻G~V3j2QdQoO"/_(#u2QSO-Sɠ~n|`%$(>JIJmA qKѹkiǑ6L3C](Q" k/`=5"K0|t ӧ)yc^[ 4'eO: ڡdJ3ճ11" OYmN}fdyE5E%磮D؛ ` :AM@ڇὈK(RLEy"hURK?h WQCu"EQy(Y?}D1/m63O/T:210kCځj#55 ҇% F{"cQokt3 rEJ0f &e rKhof `Ofb3#_Y߮9=1)h&;5it͑5|΍ufA4m nc>;J}Uت7ǿi9J_tl*%ҼK2QcЋ_\:_jsH|KӀ$_xhsPvUv3% ВK2%3?)Khoa4&+ o%c?X)?+"#{̬ME: OȌQ$***>S45saΆ#Ld}"҉}>("ȁ98tl5y6btImg mۡn5(!a$b%ab[M-DNݕF.pXv:[T\Ao2}5 :G S[2EsoeFSו/ Yn?]9k]U@yL&X})$>VDv[?U.ٚٮ [YTs㹲9s>wG̜HSUGwj/ͪڕ;X0p'u'HM& 죵Nh-j=c_G*ҌԊow9֡cK} uLԊRlD6}oiꜪO>U'8#KS&)Γ1qIj%FLo UN3 :DsS;ValAyIH5pb)|GM<:\\HL=)̭ތ7P*.`釛sVO颟\MVH_I"} pi9VFY/7-ZNZq^b%NӦ2?qɼ 3O68B<h IH<ǚQk$rIbi7W=87 nCLm.>-VφfJ3Y?Ζ:M#F"lDGAr?Iu6Hh4yتUKG,4̐fW>%~K@Zk]Cz{FYd&ɤ7I!tAʊ=9dz=k "A"+ H}H$^g~0I23|wLy ٰSY;K*Jd}D'ieѹ@s4^Ϡ68}鼉>ԗ0/J1G6SyDct=ڹ.$Og; |ys[g۫_[*^ۍwRPLn<͝C7 m'!jz~Kh(DHɷ4>p,7usaϝ*u݁t23$CK%! {} Zܦ׆>A':/ځD/(ZߒD_bUS3rUAyyUԣ"e^S4x ,1\*t`pȴS=JG\z;~w4&1/CA&3siGlGW%o[n_eR=V y|t 뀧n&Lh;P(: 2Ѯn`dl/1Xb[2ާ},d<7޴Gq֛Ԧ"Cn!2R٥Ph;ԦR.V@ޗ\z _Ự642ۈm'#7倥;Kiȧ2{iS6͠ipxb e(2^oṿt 責sv4+;Sw?!&@Bl]BDVАw>k["gCGђ͆9 @*6% 97ʜ,(pM؆-,D]'YssTyd|2VVfux@w- o1 j)EsS-ыSy:wDf zp*J`vaHF&S_>0$om g~_PTS1Ӹ+Pkvoz6R3.x=[P4)gؽi]қ^nJ#! v2⟄1fbAa:LC۲k*|fL3 YN}FPyC]z!]j&L4iZL\G4B7P%^om&_?7|+ EF~Ma2!AV gsiSKM[NV(MFF>0L}( N6Xp\reXϱmT~pߌAO >o{"qE;9Z kUV.,Ga䇄1:x̢"Vd-0I$szH=XzPޡewqH*N ]/iKBTѩ'?]*C&X"}j8+V؞} 6PgX' 'N?hQԪԘ!CZ2'ܦYm5Ԧ#O"tfO?d(2fݞ%)C҆sYRKc>kCi8_8l2Ssj\.j((؆鮼-\&8}ZwVm RN:3=K3xΜGJ27M|\Xk&ks"^# zk^)@`Fُ4>]g!'xOq e?8,=Szh;ׇҽ$w=^1!+"k/Qud69!pKitM50 ^zT8FY"1 p*bM`;v}6At!Mz™:M *2f1%8ڛ~7iUkFm en!:L~S{T_d3+{'7Q6 ][-@f);&?vEgΔJD u2.8:mؘ,RlyDCyOYC; z_R"u׎Cnz\=zA.HےzfCfG P|Fc!>p+4fKjmoMs6FU] %juvЦm=x:ѹXJi4m^_D3\'>ʓ!cjPM?&āGg {lyp U?dzϝ -ǢWMv_?ksO;hv>ۈz=<'l& {r>' 1\<`*8#D #Cڔ*:5 ..۟4R(?`7eOZR[_ _*5񐡳/NG\5JJ٤-D,y+-?{tPzTWt~ sm;Sw$|:3U;Dy.Ad&%{Ii~v\ݠ 57wq:a=ڳߓcc2)S_> 9B]6'cW_p-$h:# r~…g+u zITz4ltzW3aۍU88MEg$A `Ww5&Z2'jxqۺfT5V-ڷOޤ1v:ב{48fCוMe^;$jv)iBs&pՍ]il!O?9WrkV"W=QT $  -!x 6.L,O'T}7ݪHud{'w2Uq ̒PĹyלuR/8|WhUb˜M4I2 ::hC_~bbybGXuדK{?\FZ_葚K$mj7d^\6X@}WoOIx1_[#9&8Eͭ [ @s>I,K8]NQϠ"uc u+!e'.W\ޟ$^UbfC$_իkSM û,|vl̆Hj gGikkO?{[Zz0hm nn;E<gRT@@."6%|@Ҫx7b;C2eS{_[,^q_8 m&O r*O`mH>+-zJ=o!mՄ]]i]T'\~1X<$m_@H)*RsjcƧ+ҿNZ"4|DV\Fq/RSmKݗXV.\qPޡtE=51"}Sq>| ؅wpYDyE1 lhU+_&~Vm{z? itU 4w~Jت>s%Ov.?.2]~s0|J6mpqD;N5VJPۣ~$!yF:ph5LI}c5gu &vwk(?ĉYC\*P8cFnD)_O1KnPuN]Ӊ}V>}NB dÙHRTX1th:tOǽEt[jo3gOP%pv ^oxʶmjc{ccЮwpa2M<4S4g+n)O͗7W7W..ˆ/{e+F):K]h<]DXy]6 Am*p7Hm#=rU䪅ZopnjǸouRI܋TgE2?$#1BFԗH5]U6VG/s]ozT]ͷ͙)e' T[nrHsW챦UIdZ~;¦I#33yhi,&E%G7ֿtږ75ʤhbF_x2k޷+%fLǚ1kÎVCq6Rm'\?]xՖ={>J͆OaK%}IClUp;GBp{o+[Jl ׇ gE->4U1t@`FrƬ}[}s y'&ˀD ~| ;w`z ˤ^S*+GII\?Z2܎?BMǙOO)})<D̿T_:Z:ݸCy53ߌ,9(N@/R~ fΊp8D7:sOTkaGluYݠOߴ 鉆n6teJ'+\yP7^¸GXPCvxi2rG l6\"u7*zAs "ev0 k#d9=BػTJBsMt2 { :EQy+ȷ` o L*| 0>x>[(+9sCL3[wT_b]uIK8gkJbJ[Si(Q&mB.w({؆09Q#ߊA:?P/sdfJh2ZH!jpqS/^JSmKަj&L?;v97雹\mPkƮ=&S\!an64%\$@Mb)eB~}m W1|{<Rn}VWO[8B*A? ل$i BWg>܀@ /`VbLeF~0˛M ; ;cT.b|"."*bBܦ0=biCϯ\kfiUi99{3~uֺ00kkknNQnɤYǨ:A[ Ed~xN"k|aO1ǹl!ρJK%0JPVow; Es0T2n}Kd=<йkϾYtGqp7jK%q,S<|?bWMA Vш]{ 3|aՁU;v-r?s겉{kC7:Vpl V[#R&Rk6V`K ~k[ݡ GɕɀP ||o}sTΆjZy8Z62Q`W:Nze _fO?*rT [H-?w7 Eg3Țg\c!_4~#n&L}f+-U,&KBm (4ȕ?SSn<8;4Rlߖ핃4w4tgYp•w^4Q[n/8ԦM%r6xC;/ly?R \lFAkm |zGwдa?Gb t,C46`+U>hSm񿴫 #}Ū3QCdBZUZ ǠI>>lJ;"wm5Jm2#=ʻdP]x? $N-Hqn:&?ze`aa߯}GB.t6^8tRvL~O`i7&~E"͵L}| -UC1'tȕ99/.}Q.q{G4DAs)+/\\:MjEs.^>r\,Vc&lȱ22yK\h7Mt^GW#:pMkbaZ%L}& YoRW~ϝ. o}XQG,ӿTf{S !ts1T ؅35[\C@;d~P}x= $ zNoM'ܦc?s/4OTmƷ4i,-BGl .BQ^Q3gKWooK̍"}<qdCu lnY٘fCGyR4)ى剺N}P]8/_{ȦD؅\2MIlݧL7iɭML$eIԦOcGGD<#ѹ+Kv8CQgq^~ 1RJICY߻X<v/fR'uۑm*}|X]XWRq*OPqGq_hc(cʴX}{2o=j$<ާE: 7$s^??<#`Fł!U<3ts鈥2g=l&d$8D2xUΠ ûO `%Ko-PdkoI٤ v /hTBCVC!~~os%γ[g*3UE(j$$TuxXy&^TU"bè{D(mT6-H+DLLG!ά$BRE/G;v4 KI{TFպE٤,xcS#c_@g3fSq ECA3 &h'wO{VR\?:7_,ENVN۟~?HZ+bn:mLJ9z~W˘VW3E ԷLRR3٬a6P%t4vEx qnO*d^"ͬc4aPn*:ߍ{ۤ]M)X{ a؅#Dۡ[u 5Tu>m>(8F(u%x.^D-zc1ה_~[ߔOԔ?b[w3Kbqts66߯Eqa^nluWJJ0Blx80oDL} y7-=n:+ ]9[-; Յ~~ 2!8GB}Z NNKOd rE~ߕ$E}:_zHcdndL= u5W(IsSS_>ϯv"ߊVK>iG3ٲm2]@_(=;N" -^%3,oUaF,=]:d wٌ룺/@=giUivmg\s!qHj(>|N<62yw((/ۇ͒Ӑo m \ژt cR41XAGUHM&#w2F] EGԑoJVr' IDATI4u48Xg[{SqΖl]PS=NQXzeѿBL}FNilCp[Pd*:2onRuq}U3ZIt]s(>s7 X1$A}Uvj̒OxYsǨ:M)gNb"=&%FLhs26~/6 wҦmZPž;[|6K-y[? 61zXPM]BtvL7j̈́f{7_ެhR8J{yGPRAG#?V}mi, MUdKQgZίKLYeF*Xl\AM6JQX8D5xjS?33|`Ӫ[e0Ebo^KyCT8v׭!s{|A*&%깰l@ߎi.#Sc .BFD<nS AS.(?:dñѧ JlD, N,u?{y<$KV2=Om M%hZ:IԦ`?c9X?AJ$}_izLJ̞=ڎ!.C%| ͸X82!UM;o>tn7e]=eT"| EePJn :BB ]pRZUZLrF3X]nY0jPgJ$ *bKqC̐+FpnmxV?8:)=Hg4b5|BNy6KeR\7"諂ڇtPBG;xwsA/M<n&a6>9i?P ܛ♐gK$}Vkopq%_!ϸLL+q@ajS)څXuuJ;RDd|eT"e?:CK$v]E8NOn< v-g"kԙPM* 1G*NlTf&'lYKfC"ze17k?lyW1hN=*6$l&FCrƼlls7w@NG= \E6?-nyz3;Ere2 MYjNc/Ӣ$y*O1}XݽU\XAŌn y>Xlл_g+t[SЦ"]Lu8F牺nP}e e>vk_;fA.R .@/R&ljzĶ/ѻW& 0ӏ{:>WڸDcR Q]d rgt-$*-2egNUjT3aw! }l,(KW*anwA_󚟽F.*:Z͆J]s4DѴ!#M% Qm i,6m_N^S7cWI_)Nvc/#.:nE"kXT !N|^G7 @5-5vJl d?°>|HT^I(Kw7K{%Lڏ,p&mcC[DvĶ3p(r1N*q/rǬ .YʎɏzPޡ)~S,n } z?R"OQ\mPQ'xOhh1̆9 @糡6BEhsi,By3K,iJ.pa{pTJ]Xw쒋_(:=|,M &\&801Xh4!2:S3Rs馧6b?VJg3oynZֺUVN ,xƯԄ_Юh79R 4iW6Q󭝭?d6~m\I]φ>kׇ֠<8QHA k"ӵ/~^RWH$O?fh>>(_B!8ݵS%C?4_}/7:ÔM-4y<!FCVZW W_^'w^E _-/cƫ^ES~]>~V4 { a@}[V:U>FnF6.FG w!q%]Ow=WM0J${-EѴ㿌J,Oܘq{&SbǼdԗUj)!Z*]Ȉ"4k _%q&c|t;?ºccZ@{U -'D^&0g>QӨ\֨auwFp^LrPDўG{I.V| uP^@C[GN]Xf.@/^D^Fj'4[@^SS> as(ΠNG =G\,s,vSdJ@#"1L# ,=4UHhSGE,9M\O삇cvǼf㖭.+>Utj݅u))v}4(@A $sA&.hȧ&J m@$bɂa VYʬ9ufOz +ڏchtN"i#T6'>$rTBُXzn!_$ý5Ia>F6_{Rfŕ:>\XZn4X@QSNQBߔđ|!q)((=$#?؞}ːT'}s&&XVVWw(PjÙnDWD68G.lA:~H7! EWc͆+i[R~BCd,iHTQ `98mtSKOh8ڛQ4kOX0砅"%O9z4D`}[4i/ѐGJm$y%qw!T_>oP%!؞cAANA Eh.L׊p%Kt֊Yʬ"u7*] ~ut4 Jaܟ]ҧ  "U"E;Ʒk{0M@2ḒM]՗y~`PNw#>0F:4C5m-U8gvzH=R~m{7on~xP |o{F V4a^j[uuWOOeT@yqůS_nXsq};E돹?f }nj.32T/bbx8StƳ9{u?2쯷[j.<™g) 7̘x=u=Ч'ܧa.Y$29*ugNV3gb߆}LH*N`;l~!f>htE\ Bld~m5eJ$wǵ f3 ])OWP[+]62Ϋ[b)1T2ʓ8)è!џ! .kXyܮ5 󬺬^N&gѹ(AyT[qG}S_nTq؇2IPpx6˦`+uY/34FME>DR|:ˏUxYB'a2owo7]ҝi'5ߤY>Zg~" .\]ʦS' O->XcymT 3(\&tӴ;/ ,!C#uGs{~4-&Df؅iUb/kƮ=&KH*+lhKX{V49m!@uJ0IF62Q%y囍MwaՐu+mWc{cs/ίsNz,\_*RrTR:ܟl ~v7~Nc1AaںYv5:{cok̟oq-4209ҝDZ Lc|,fw}͆.`ᰅVbLeF~0˛{sRR\Ig3 \!3#P"y ٠ΠANAr20Ϻ|r4SY.Ǯ.:Wns!Aw ߅x< JZ*<C@]sN]oh_X]7HC`˒G}[*PqBLܰ6]~~Z;/3;uJYG\Fex}HH/@8 )$ŗ["P3MzewDU՝gR: '!_$~T fߛi cWRW)cJBa+>]cLdSw٩Rs=H̨k}OQRG\,摷b6۴x]xĂ &zֱ7WqϢa{ڶM;ʸ4mڻs--е:R7 _.!n߁owgN6EW 6FϣǢ[dU5%5/{hAkHH+QҠh%hvc.n(#w4/-&#*s>:WegH!-{1__̅79w`q4<6y;Y E|;IY=;=(O&(13x("?4^.Wrϡa{(W>DjXx/!?KgϦn;C}g\ȼP믭=ˠ秫At$/XݽE̛X!i! M[?~Kc ڇ}-+2H&,)k}S,rf cbFn6tov#Th(Vwj)柡2+WSG{Ejtr"yx*Gc.$Tr0uX0`,b~_¾mQ {x҈y:2s:Wu 0sm(rwHE[ IDAT$/m:ɍxb_ú kl7aݲgʛ\ї`[Զƺ߻Rb?po'q%gƑ']pK*!p#9%栞9u2/L9Riaal(b^3Ѷҹ6.Dtr /R͟,EǢ87Ξ9yfkʮ/))g y T4LW67|SX_kJjɴg ξBhZ"OvSWȅ79Nw++{絯- *i7z:Đn#^/o = {>w\ߒR2*]&b㍩Gkي~WBp\q\[?inT­]DJ$tuo}!yطvϣ>\v`R|}IN/ƻ:ܑ9.mGfؾmo''M/!n5I? mDE-k#y}|X59 "2_"UE&z;y:?ry%.Φ"% x"ETBlv||JjJV]v"Yt ]<#%k v2 ?B}1Q3nޑڋHneMi#/* >'#>i{!|6)x.~:@Y.FlĢW6se}%`eÛ.zjEZk*##b2htyȵzn!ŗ`trY5$FɎ:v_-صLm>s;j67=?vf$}ORlq*;QG_ŪV\݆$of&lX/ɩ/&؝:9tO<\0 p=IgO@*|ePR[񏌮:zVfruOWe9`y_(z&*? ZP!yT`6;9ko}J(x!6[ڸV[~x@$1rCo@ e]b#]^Hnn@Y7 o[RQ\Y[?J.!w`Q4Zmqe1J=%(r;C+}Av`wYg!~3dӟV 儌(>H 'gkHO+wrO}B {Rz@#py)R @_; ޔ9I@zR_gR\aP )kC6]8ܓ]!oŰ [hnٶky /4zJRև5JqK;Q_nd%˥ ߃^#Xv 㰿g ~Q_r :>e( m [(m~"ӥDmqsۗ[ WaDY SoHgR˯?Z *A\L?i)P@쁥A<[?p{ɇfw K9?X0 M'hGKB`s>uxG_#Qd4/,J2u۩s|?@5`laH`cP j) HӰP98F\ӆ|]!ʴ˥+n^k U|跐? wmoCc};K VvKNL !"i|AҤl2;NH{Stk4c[[gkv(V&t3P*CRޑc(T8`B^=+@+ѱSO;>Qvno.Wp/z}JdTzh6(ц_tZM -k[kFW4̩+쀋 Ѷ "B<(F7 \s$`LE2錡׏ܵzyTʖ~ps0')BD("`sm&Qo>Lb^L=%a- E>yTD*^^/eMXg2hTNs!R YDYoF3&oDj6#ĬJeYف^^XұQ6٭==iX>cj1]'<8(Ϧa0-i'z(rr]΃CYeq,Oܫ5:νJn >$Id.scMc ]~vy]!!Ġ.'(xfhZqVd\΅وdg!+u|-M]'36Te8H[nxE5E~䲺ƺ碬O ݼp cjܱq-Yy = {n![om;2g7voZPjP;3ONEp;i[NN8o,ۛ`}giBk^{ӗxt\2h2u.%-d Jb9bS܉pSh}k?3Da+Vvyok-%kW#R5!H$ f>}B/g]nCMF^CF 2W˻P.NJ{Șwc<=jI+Sis]Im 8C ÀǬW)o O/''?e(xlY8oE߁,rĊ j tTud_¾Q7o +4?@ s9@} a+n^Dwq͗Ii"myZkz|FV5T=\ڶ_QC*%{u쮀(c:\xi#"(r"_.O$R1gr0E4ˑ~f)E/nmG+PŘR~S錱7NJt5X\\ 軚GP5 7?RD X¼ 6lr:~56x :els}J1BFqԎ\/AzՈUFF7 o,?;\+hbk% bB|;*;17нZVTg] ִ Dl'L\b uȜ}k؂N`:^%sIq߀wBTxWEE}p$c~.Wp/D'6=.rKoyUC\OmHW DDI Nm~]^CJwQொtղ3"h3:w:|qgl èMqi4)jAԬ*+f=МG >veZjJyb|}ޝ[R?}VPLJuin06[=rorC}#}l3%P8P; z"qGf &H7/22=/-ztϬj~~Znt^_̹pNn^d$U _+ Na+:Zݑ4P(;нSwu%{$;<\*!|it-H4ѵGROInJ[ gfFuѓ@C6inWzn.33)FC n !n!kʮ_^ESYym .)+cJzbvHس}Y\,-t. ڋ.6ތcLVA*qٓyISnhwϬί\o1%SwN#v}1`^^MT$ݻPP;2'ov[me[2K+@#T!q#' <]^FH[upr)I݉>A{ёUK,$KCYCź ILG.OLd4z&ؕtQR6nA ۏ&R)7)sہ+[ ]Z$nڲ־}d)GKꮲ!QYй.k`;RvSHXD :nd,-17ohϢc'_Å y.]\:;?Gqc6"em\O`0ݗ>ݦVG dfҧ=B1?qq̚o?5Q@Q(xƨa5TOM=eeMO<sMkO-+PGUnSy;ju[Q_q>ɔyVWnQ__RJJ((+G9FC]0k)K,ԟ:cPE&dpa݆Պk  $F=UD*EמPx k:F1R0hYc:PҠ?>(i_¾~*+7TѼz}i#6wNOԌTLHT,kNI ~Ϗ+WӇC#2a䓶vQ?BxFȳ%:Պ\X\>7֡IyRv}вbbm@((+ӧ Jy q?Vv" FE1QK$trb^$'{͋USR0fsT)I كUkC7;2nݯ~U#9{gmm[n)PW&47[*`1ZoDFSau!;e.? D}p7uq;_r򝜰rJw-J1;FluSLn.;oyX>ÎePx LEY_cd?tX[W@DGcgGF|PFlj\A+J$mBRGeuevkhqsW! /u2hHXHxAT I\Om=( űRWv=DBn.*0 g3ocXE+8+ro:9a6 HʟsTgK:Z:f5x#32,[h+93ُ?׵1"5'R;ă`F`>h6~kWYN.lrXܸƼv e'\ e\G`4=XEU5T2o>Y[IC_77!??g>H%VS;kunD9q;;yqoss;?KmvK[/h#s"}#}w]%+`mK,v^lVTc-1+Hnm[a64o%(Vs5IeUdmcď4V5%5/{ G98ʋU!}Vdʻf 0{15Ɔ=_ߥ Vd&. lPTSy򝽤۩H7$؏20=TD DS7@(L9S1_UF\F<NoOmɴ '0qkNA(97O_kצ#Dh#[q|.l9eLFb ~ԗPvH76ڶMNn3m \YsbabFy7^ͻoKX uMq$:&Jno-sQ~tqs;uhYfQi9r˲~&JjKcbFn=t eKYrdm[Fy)Xϡ%lLZ,ʼeޜ#Y.Ca+h‹`L@ 8t4s̴4]U] zO{G9=HL1H( R~_H@ XfRuuh@(Yy;yO5宙[שHBZgn83`#.t8d%qe !&nxuJsEмo.B }KoQ[NH1pe2`d ]-js9}ۆ:$0TY߾]\|yݟpxA dL1ͫKY} !ۚlȕ7 v*WFUMŏYUz?.Qz퍵 L6B%siۗlHTSulcPXM7g MFo[Z||\nd 6L$z <3*H-DDb-23?ֿF\t>i 5 kYIFNJYFVML/#i|j>]Y]o (BFW}JcJ'\~B3fS_`fϷߏ(Vz/ךJߦ_!FTut@ U}*ש<}㧘 =Q0rsNU/9G體RQBy+%oVY6?޾"$L$TQ.[ZQE(r^'If}=% " YTE+%_[TT[f|\1܃ pN't 4 VRE nTgbƈ 2|ѢEFFmz i P R҅.e|qgy]x^Y}Bjrrτ[^Gi|Hrcfƚ^)EmJo >G 5:t %X(?_iyZڣz]wdt9bQl5 OPd}@6>$>7WKT5NģʴD%K?`5k + v6 P孑QQQeee[9W8;;khOO>7+B+C`x7JoyJC_Y𤺺ܹs饥VVVC QU -(O Jbݲ"/uu)}go~eJK w>uTV^{%陘=z/R3n ]`dv tu'ZIE1U}V(j0ZS1Fro`EW$WjP/?T8du7"AcN}u))5=O/?ŔqmQy:EeX\39{i4ri `yp ڈ'URQD`}"[@|UEe**hǎG߄u򈈈\^PaD6.{c5,>8G%}w<>H)<]O83KW@mrUeñ2eSN]`Z1d}v6SQmW@.\]$l(9nrHү.|QGFWKݯ62m.""㵵ZZZSN]bEϞ=;^[yߓ]^em&XxyGvv{q4u/**?믿JdUV‰W W_}uƍ]ZmL+GAf={VxKzH4lذ4S_Hʛ"5'`㍩GsZqk{]l^,wb?3vHAYG$ \ D-Dz@,?ԩSiiizzzF1bWzn!ŗ`yZYYrs[䶟..Ugh"DW\ɝs7Hq% ølcc]v$~YڸԩS/_ox*Q>O#:p4449dɬg-ZٹjΝ}/;H ;>s‘ ^3]i:sĢAm J^ﯢ}QZFy˗kjj:tTэ/R=1! @y!m$c!8D/by91DxG7[$ c$F˙ , pfXKZ$~)7op={7xzzZXX|WmfAB7/ T )qy%2}<|2ڣ7q5bNF bD-]YiΫW:88̝;7?LwB=%7kii%$$?y(gGmI?P٬w^P~v s 7|ȑxwJ$q̙S]]rsߎWv){W׺㼇W!|7n=ظuG۸LusmZڻ !Amy: Tx ':jGGfKv>uԃ}g@:%}~}nD.7ttuHVEȝ#WzW6lؠ|̠r^?CxxxJJܹs%ɇ~hѢpɌe2Aj:hKA,o_~rG{LHOO2dHRR֭[;T6T~Q֭[:vq<x2ʦOBL=W3pA^]o_>>t<+_JB~B}>0p:oJiːBOOŋ9[z>g///oŊÇ|=pamԃ R|9"TE^^/b }5Ȝ}kԊ\dB2)Fc@DZN}Ǐ<ڵk=r^Fә+~UTTrɕ=rw0 ;#PS #<<\KKkʔ)/ߵ֭[7q)Sٳ)9cƌǏ?t?bo-аiӦ)SL2eӦM 㑑wss6mZӅ}ݰaô444:ec1p*$nh:cm~fU#VIC[sE57OGdG;v8r䈦-[f7F*1=[(%m;*xysHHH׮]x 2'HEFFFG9sfyyiۘW-eرcĉ@g)+xS>אˉm\DdŐifxX{V&Zg-TeHFqfLYN%z+flddpGvO6sǤI>أGZXX\rͭ4c}#\^@5TOÞ>>H:~Cim=1Ծ(g#jRJP5*\2O7cy \5OamFV***nnnǏ_TUU曵k׶c?^{c߾}ӧO?|E"ї_~ /SOpдnj |VuCujI*uEI7{W {3[.ZI' x??B@݌|򻄌F TܺYss1LG)}4lq#|P>>|xI:t?//oǎ۶m_ǎ۸qcs~܏]vݾ}޺uks;[nݺu]vɎ;99Z%44tɒ%cǎ m=tPuhZ0vK o4mg+ V\w& 3_J-Q9Q7Ϭni„ w~aV@q= @SRjW?3 %_H%@\^L$w"hǎ[[4U^%=~//4'rW>/I  gx ,DDƷ,RQ;7 m|śmbmmmS5Sn?~|TTsJJʬYڧNO}VS_J/8}:*N޲o'oUjPjд},[L89*ǵU+DkVk۷I>]sٵkP(OZW%.E]]]OOwU6>Cv͋+dfGU3#-30#?-$ GڸB5{=v J C})a[SsKeZN>5!$0Wbqgʂ_Y~=qS$ (v%&&N-ZkD$7=`dCCC##%KOH&lddh''֗;v߾}͕W Ti/BI[rr,#EŝY2bLj YBp<+M'N:ujee xzbLéM+qQ(? $RɚkFʮN(HP?ax2wώ;/:/|UT#د`R#0_+w7m l}<|n.OunU tgk;쨶t\P_Bs$sss}u#Ww>L3wѣƧN:x`5WƛQ%M 6]Yi^?f}wkϯZo5!ϐ@Hc R>|z[vRX״/'%bi0SΟ?AV9/DttSIдe;KMF\[LI0_lkRe2@!}/_N]!Y7>п蘅8b2ooo *d'iWl'G)--tuu,-- ***Y½ GGGϟ?~6 knnZ慅Uc6m矻6BCC?>iҤ] ^_9L6?o$1Tn}-2w6=˗xjt=8\^ch(k"88XY_ZCB8e㐏Œ?cǎ׏~RAK277~c"'4˰4ϏXJyap)ng/tƗN|ZQR׬O^TYD}5}=ʢ{O?6mwry+pފ^_jHXQBFS[,iIR@/{/@p,"/o5'BeWL o,;k. 'x9?SPxȑo:6$@UvQĥ( Vz{Em]+꾯ڪԺ[" J[uEkEz ";$1-Y0gΜ$393Z$ >>>k֬iZ &G~8+Y))zcITtbbNc2g;/l:6p&TUU:uNzDDıcǺvJ_~3ҩSSmPE cb.xx0QS޿?}d/ UEs daN:xM訩17xyy],߂a+p륯r=}(6ɓ\|:s]%%%z'==mewwtG yx { z\}4-*:Ϋ\\Q67{'.WfDebV ]p֬YwkCf)i|<>g+#'SqO֣,e>*dJHʌvv\=5kP `U$V[~ z }iiHG"uɓ'6m%4]{s(G64jѿҸׯ[[[~WmdddeeE?9rÇ |||<^^^<bGDD4QepppEEś7o5jԯȑ#\.G h?޻wo~c&E<ż1 **n(yP+];Wd) evgRC^oSSS/_N[tWX>\9Rǵd=J3\8It{(N7z͊u>d5΂AO"S5MM;}x4 UL+x}nՍ=x]S(h!]b5HSV'<,Z_.uO?yyyI,"[l%8uwkz]mv~RZҭ~<, TsuWJt4 ^o4لWWW &\pܹs맨Xf 2dǏ ܸq# .4QիWWUV 40k,ccov޼y/t ,0335ks(>>^)_ߗ;::n۶mܸq˖-?igR驭H5!4^EoEw͏;_k')\?\LD&ͷ㉎vtt(*::o怿]Q_?1z]z~x~\|fllܶ;nݒ[%5 71:Y!ϹJx 1ٰ~׉XuzMѸ;PS5rܶTӹ]qn!Xl\],VW~f2"cRY)|3_Lwͮ,0gΜۿe<Ҫnu"Ek9&΃b 5g_U^om> nU>S U⎽`]⍜̼s?Y_L!BN&0Xmo}WO 0}]vѻ )kGnx?PL~M3i%eyf3Ww: wx`[xLLLs}||f̘Q]]{n q # $8AC]:99m޼yܸq]{nR>nal)*lń% =uz-ZhW\QQQtٳg:]Р4!!!իW٦Yxq(dg(}NZf]8pʕ+<_3 JQ\\o䚆rΝ;|~akIMMݴiɓ'-LL((( *[#Ʀ2NgR`sr<[x[Z(_\'rU!7/ \(Fo"Dbcr.u322sssUTTRԪ}sӇ`С˗K[ݾ}{dd$s}hi09'V0-2>ON=[߭z{{?~800UOܲevT 1uXʍAVj1//k!їK.v֯)))U<8zVNkH~Q9{_~I[XX\|8q"="۷+&M4eʔ3g(Eq(zˋ{Z`ٖ cF(*&&t: /[%td<>PG[őM𞣧>1 jZbرc_.PdLJ@Ar;5&zΜ9L-rS7}UZZZҋOIΓ9<͍-)Wb+c}''H滤[z$B[[\t}'o޼9j(EU|鱯ҝV;<~x&[*1?y2()(ܹė\nnۣ/DQQ,_Wl#7]֘ﵱymhh(=( Jʔ$F_-Rm-'!!Gtb_ӒF BBBN:U]]=t+V e;e˗Knժ555(rvvr߶۟\FlIi;Lg@oXlv'^re-[)g~5P,EVoKQ=r s]EXGPSS35)}R~|dʨ)mTпBv./ע%Uݻw̌XӧZPP@?122l!r &Oܠm-ظqׯ_޽ǧ4aٳgWnJ! i9 nw+%t-gy(TAKltP3݂/dN4Ip_!zd5_Oe(A ]谡UYH*d[N:tH088])>LaTTT***k 444\.://OKK9͛7j + 2} "l֮TX /*--e. yyy|>ٳg={l-9nwQ+*T:0@\*=[4R)Ds-(⮆!CP]~zY=ןʹT*nٗ/_7o=jff+TƍG9bĈM6C ٺukIIIjj*N{` /^;v,EQgn-_|L,k/\tN- 7o:T Q1$&&J[Q$tܼzzuߑ}fcJ EǺcW!_-4ortv޽{'I :o҄抓]L*q?Th~BՉP% U |qAl*'6vUʄJbJQԍ7uF+WVV63VJ?w~֭K#BD}] }}}RSSSSS2z}q60!b/l}曂˗-[f`````l2fx"66AEEÌ}iii VE ߁S-QQQ:uл@*(_.HHO]iSN2Hϐ~mݺu+#$[L!OqܰLKbll|_nzZYYw^&l<}><^`eeҠrwG=z4=&glnjXYY٠lR)DXGՐwZZZZZZ|>A>\v'kooy愄6ۖ[ǹܹHJ! ė>i:k<ݩд- D/~?vFFF>>>ՒWNQ,gTQWgpg)uݞ=rfB}(OQ/XBW cA@U***֭[`ԩwgM͛7ɓ'/?{yy1 lBG\p`EyzzX`;\U^^~/߿ssq988|}:j~aaQ $r!Si -%K[X B詴VVVBRCY]>e=uֽaaa\3fѣ &u\d@YGP'>M\uuucyYI,܉  EXBBRnH*(_Nh1NaL݋5k-E,ЕlBh!%%jݲEJB% J[ @h'={Px/H|O "IO@hW!!rs-m5brBK()Cݾ]zRB{,!CA|xȜrBK`iȐ9@ªU‰r:O@ %`9\_N"/u4ƥKHMN{ m‰{{i;ėDEE‰dȜ@ 4Oc,sNe] # 5brh,2'MsZ>NY./,s uf [$@ +,djI :3˃dH ",QT2'q^h*CD2'01iiB#̉/'3Xީ֮㏘9֝!s}llУt2dN `9̛oz5 qȜrBsЃ:ajb!f!s.!+ x н;P< YGr ") G@G԰owỶ/'4G` ,WطGSHIA>> dd 7o">Ӧՙs#=]j" q2NEV|}aj*|T_wk^ ig!tpέ}`=zeeD Çcډ fc"%ElWf$!/'4GrB"ep`m-f)9d @  }/'@ Lcr999 -#2+@ TUU\rѣGEikk،?~ƌ7Jfӳ ,,,- aa M_s[negg3&&&#G\r0 ڵkFxmjj7oO?}D i #yr@1"6,!zj!#C—~ٳg6VQQuuu&+$%I[$`Q%ɫ.Yu ,[cK2+L?`C\П>K~6D*`{UM+2+LlwC UE++$)sܑ#Gvyҥ/^ܺuK$߁(۹2wҕ.{UֻtGŊ E,-I,DDDx/BQQ&f&+++srrRSS|'O X,qnՙ999UUU***vvvDbe%meee˖hee`ذaUUUY,S<6 uGsg6P\T$˅^T8ׯ7At4,LvΝ;(..JLL|_~ 22lyyy9=ztda#8,9_m6~^~ݣG{G•]#I `߾}?qcc) / `ZZZM,--upp7tda#_;555u]Q߾};0T \t$iAxbF ė$}9իcǎ?55UUUf'$$tLa@W /|rii_|,JÇ6ʕ+S@`v)S(Ś9s&Ў)@ xQrrrEoff7|z0 #Hw#)&L`N2+@ 0dddׯP6Gf|'Lfy\]]b%RD޳gOO3gffKF /DkڵRVVE!J̥bzaBGMś@VVX^Abّס@/:: @TT)S[[[GGgÆ CO&"tellV>ІXz4㉮άVPzaCؗnt ˗/EחĤ䡡zaEDGG;::R-XC9ѣ7n;v9Doww%DY<|X,"IaB]HMM*))).EM$n|>_[[;33I󳳳KMMMMM `>}СCEʐ!C:u1ՒF}>Rt@BO@555UQQqpp`BݼyV144~:dZJJJhʢ7`v$h< #$(ckS555"?< # Ik(..۷o"`8B1Ս # ~a ҄/8qbZZZII֭[]\\(:t萇! .KqDuuQw…}PUU׺&Є/ֆM B__?<<1U$^z4(?M}`6\.>pVZ%Wbbʕ+9}Z7Z# OU BԗS={ֳgOǐbooOL]t1cƚ5k֮];k,CCC:O>o[/SZ/ O_. -T ,kwŋӟ]_xѠ q4F'>їSmѭ3 mlllll 6=gΜRݭ~0Y^^A \>x;wW]߿ބbM6OF'JXhAX(: g޴iS޽lڴiѢEKPSS֭[sٿŋ%0ХQQQBG,X@w9s4XvsssssKKKrrr|'{/'@ാ`ٞtR|||aa!}H__eɒ%<4tU}Q-a,~ͼC5IDATJaee-[xxx ݙ;wK%""""rr9" pVL`pDF(a`yKi`Q?ҼV%U~Vs=>T˨=m ekO`q: <۩jﳮ`⨾o* (Nm+c4c^рhc4cAicWvI@ϲN>.-RR~ڥgeuZ7~_mm=5qlmXۺ͵᳭Al/?NӠh1Z˱S_h N`qvnsktʕPl; pVM`kb:]e')*|(.oJ?ɮ\QyfىLaWg*4*,lTmfWiAUoԶL8vT]qDDDD$.'mgq~]i3=E},lƲ-,b ?jwApVqk46j'׹s Wmchw_ֲ|>N1vW;ڵWs#wۮ1rmCߞ)Uϲ, '"'Qs&y>h.w_xDDB4ja̞EER0pq (rKՓgjO{bkw^:׽W5FWPiU]ZjEtKY]zc=T ӻs1u\j9Plp2o7T"Pgp]| 벌Iv`Qcyh2 pewzlieuS&;sy-j|櫆^S֔L,..]9ݬYJS\.\.gO[ ρ|h&4L0 ))Qև4tvً\22b==ǔNk&\{мps~'>@>.μori+ YM FTCŬGEl+s3) V| }o 9g04z$FÏ w:ǮOe^ jxbr3g<;g?bkDDNbwOW&%%$v%=GD]]9)u:8N 4Fɛ l.POlM|mF=o0겞@| jBv_p*O1ͮ}{U_Q6sVY1~1 c@1L뿬ﵷr2ĺ}<< ¦zENp,qutzKV4p:&ieU^%l=|3CV)o#hY۳M &s l Wwj7.^8g`$ 1",+Grn"O~7X1 &vulniۧ[;O1CU:.}}?sK9uoȉŤ+}L/4iQQQ嬞Kbn<^OIj:p8LNGioaRTXw>n'$FW&vWjoPPW2aWҩ6ت۽J=[vs/j 7eH@ڞq%b[G8iA3Hvo{fRGًܜ}F eѼsw:9ӣcG6^,b:w(wKb[P}\M$wO;D dz.z֥#]L@ڰՍ:cCp=Zp8c2>o{gkf5,cvOX8^`J^wuL6I&]T ?M-raY^GC''n ,KQO4܇sAQt ˪z e߳vp^ȈX'O x}]rh/Zut "xVXoƶlS)034oނX =g.Qu8A@OYu׻*ާS[ݭW;;YWxOl+)Te{lZ{clPcpʷi4繽^lۮdc CVXkq[1qo]2?7u#nH_ []PzXFvcT[˹0..;-[`ى˙t>|frΘd`thgqe=caZ?!55jn]\`>%sKBvPߤ3GNQ>ڼjPrku_Wr;#*E =Ee S\{UQQQng 02'"B}iWF=huXckg3{{X]{OkYlx]0~{jPMx*k?/.h뮿<,-y? v|BJw3xթ8jO|x~dedbl߾oA05g{멏8AQ+ٝ ,ּp=?:jXk7$A[{ql:$5Vwy=uN:I׷@ttt"MXXaZp8PiOlxۍm;n>z={vr*RSwTU#;u~$P;Ђ\r;uHH|72갘QbF3PQpJ*vP$@<3<ځ-EѶs$  /|,&{WXLxxx- XyO={y, ˲mgUb%ڵ[Y""""rB6mOkvx6װjկٶ *H}T7H J =^DDDDD$Ĕ@l"zlmFi vW`4d(R"""""([oG """"!Y #sHf9%FbOw͛EQ㴇EDDD~.Il+Md7tխѴ!cQ[/E+v͛tj[Z="""r"`ws?ÑC"""ҸTzOWlU'3欋C&(O>m\Mct8rzД{bŨXiHAb++""""/$6P)W}`?Q0 ]ġ ߳e_[?!ڀm3?5f-ö2j՟iA#"""Il}UoWߺ,z 4KO~oa> bG(n,{-fl erڧ4A' }M;?c,rw-goh[6`Dbu1Զ8${,oDzqIC:~.|V>zE5`"kw$;c[gC) 85 WLc#d[Ɯs W e{oj!w>do8"w n:.-a^u)bA4Z=;Zs>~c'͂.]Xt\,%OEm,>E\MJt㟹SaaO+tQRyƚsFb09 7G˶yd=9y]:3ClDiݷ\Q89v\3ޙIJ $Xh$u%)cso^ߛsQw͛c@;صQ+ "M@;ٽ]6YnSуHgQ8%/gp=kH[O۱^Ҟzu{)ھB)W4(اl~=k/gYWC༵8HOop9hGhq>(`#}n'ٻ{G(/_bCضo~qEDDD X(^ɇ=ʼ_*ɀŪxmaYuڨ񗒴kLhϾȭ\6PLNaXtЁǬ{O?CppVZpnt{qcWj܅zhņ ߱e`u\0uKi6[?EDDD$D;{g;H6!nfHvRVmΐ"8w)r,U$6%**3k KW9xM چmqiw`+y& ޵}#'&xAYJ_ǶHLDR:Fl2? Y?hQd^Wy8V_9.4i:OcЛLa%A.ˍZ9h8Q[kkڑ/;#VL ٶ#Q΢Ӷo{blg]/'GX,0x* 7i8EHi< 4AlNXOtAxB-""""'0UOlvwb@DDD&cκ,m?EDDDk2vUv5!zKDDDNiL 4Fbga}~ۤl ["DDDDf&}B""""xrЮMֹ.#-J]_^> Y ȰkOHOH]͚xٶm_ N """"!GI(˕ɩ.Wf[ϽЮL$ITz-7wj80`ݝ:m\)|#RDDD_fҷCnb;h$મFeODDDDð)bc7p&Əӟ"//t;ݻHV*M۸qS\]'w.gkz_rO]Y,ږ]z;@%vJŻX=>_q I#~ͅg}fϪ9/,6{379Զ86rK|V^6FG~Bn$o{{zn IO0z'|C4#︃-Qxz?K^}&@0p9?7 i2^ޫBf9i%>p;Ӿs|{0gȧO__gԕ2tD0L{RX# F /bvA3u,<€Sc)I -29XxX =t<+m%~3tTʳC>_̬wvq WLc#d[ƜsR+"""r $Ev33[icPXd9Χ(%=FsӣCkfD(Js;ewXK=Blq8;..ݻ}Eg($FJ>IVxTVOKE dݷט&AI>Qe?1ۋUfZ²:lH$٣I˲~O#3QPidT,EBnD("{~A>tM+d0دcSDDDħY˓vOyu܃VI$u̐ 73w,Xɴ:ѭWK(?O}&rɴlޖnco㬮Yx cg.e ,]3~ȵJ IDATO[+"""RsgARg<ʴɌ#[pgy|ccֻLe&#X6w]/{ǤۯmS7ļ}^黟ؙ-&-tvΟ>Ōtg@匔t7#}i;ct5(v6Nڰ""""rB!1ok~uMΰydJheP""""rĪWUDDDDS@DDDDĊ(Q+""""JbEDDDDĊLX3~ȯǶF#(U9fg>4>[bWӦVx/W:6뤶Ӓ>^Ĺ#:"wr`F7p#7(7~{&sBz2'G`$j'(x#|j!Q}p0*glat'w]̩o3EL9\6?G?@t:tmFIIOԸ-Ω~ksqEDDD~&X 1K;N+f0wQb`F /bvA3u,<€Sc1b[ckS*ٙdĺ?p#ڗվ8ΞX/G,ĶkKYу9ԕn~f&c+ax+veOBUlݰ+qA ibJN/t80{tT*ky_Lx%$+|/9y0}s8ơ[L6HLE"""" w8vƗk1vN0 ]a'̖tҒ}aA=1,}V雾'},G~񷬍eQ)vVjԯa2lx.7?bMچ=v" W?Xk?flށN7Y8yVX@Ʈ#e!+V+""""JbEDDDDB*mJ_4$`[UEDDD$X%"""""U8rpgɂux, irƙ2dX_uפ{b/Xǽל#㊳zpޚbj>:>|UZ+ᢸIM§۫iq_M0/dkyo000%tYsѹ=2""""JbO률Cvn¶unس9|uinA9S>|*Dcګ蜇xaĵ9^'k^Ӣ6[DDDIl]u:;oݻaǎ뼞 ֲdZ<^/ma6qё[aۄxc6mc0>wHm0p+9%+-3m:OHGG#XYgzնJbﶍmYAZ1"27gK86l|:KBŤ-}N10˾ +<Բ}$g5â7^Y^8,6L{Ysok~V{[6٬sm:t},b'KD6P+""$v츉C˜wy%j hϨQXx#V/Ze-ajﺉÀ֌~"?SVn%AYN EXO[9%%idzcEDD֕p޽Ç0}}-bn(Il˶,0 b܅ia/o<~%"pN߸X6Cb!.ޱG /Mb?X] ^WƶKb5nr <n;w7?ΜA8=Ɂ-lݥ̩fbjۮ2bt$Qv,4(̧NDVܓ]ā˺ѾxZԟp:MJbEDD2yG/d\裏2kɔ)%ugOh׬4B|p"I]Irx0mnR/$#n[aU6K=\ f&Y!}7rfaFIFif%WۦXKQ n'i{S!<"Oyᖍ:yӢ}:X]+^c/mͿڕ0NuuB6ۃ;t~$"""JbWqq} \piitڕgyK#j3We¹?zK{%-¹,Z1lXeY 5^m1Kd|χ|ϺpF$H;dѷ]If͡Bg~}zؚFQ9`\kh|ϖ 9 [/=F$ݻ UkgĞ8ڶ)}0+tVnC..Tm%D1wL,CFqeu3V/,#\J&UScS;6$W,$b =(Υ-ov(Ib>b ,k 6 s~#^F~[=:uœ]WaМ3:=>x :^]"?8.^zh=>}9nn>c7koSS}<>܂O?^ _YY_mY%zi4v:{fKnMĜu$\KNVDDDJ%k-"7VXGZ$VDDDJC]گ#l< tHt6( m8b4Ā8%iD.zG \כW?fyt%"""4_*m0XɲW Mi +""""!G='C|MoxrlOxW2iFZG~ 9t( mMpÎp<NTզ|| yV:ɏ(/\Nz6mkCH$͞-׺>odED'F@#T.N'\qvvY;|Q̟d{ t&a\Dٳ)صB}_gw81Ü֑1;WZ t9+#{sujŅY!y\5*W-THbfN'E 1AdP}ނB((ղ'[擹jK޶mՒK_Jjٓ&M-|߇HH&=pG5r\Ҿtz:NDQ\(}ԅh%0굾͍PCDD $>ؖu9š8HHbv)š8`4$`PCvHr$%%=~ˆX搗CNAwp9,[1LxT5iW-= 0$&LĄ)p9؝:ThqzWH:C> ׅ L}"=8szR.Y]^wJJJ##}i;ct50CrryD^{tnw ˖lMe(i[: j[Cct/׎aƎ똶t'_]Ӆ3l>R."koy'?Z=إ8 :P"""M Ճ]Cq(KbEDDDDB-Ո]Cq(Kb`PCDD$X=إ8 $Vv)š8DDD4bFRKDDFA#v5rJq4TKD$XUwzGq(:P"""M Ճ]Cq(KbEDDDDB-Ո]Cq(Kb`PCDD$X=إ8 $Vv)š8DDD4bFRKDDFA#v5rJq4TKD$XUwzGq(:P"""M Ճ]Cq(KbEDDDDB-Ո]Cq(Kb`PCDD$X=إ8 $Vv)š8DDD4bFRKDDFA#v5rJq4TKD$XUwݟqO_=?_-fвJ}FU<}{Ӿ39-Q甋p5pMe(=%"":s!\5lK^gqw uR}⯾9qxqqՖWXLdh\^T8DDD` .+Mh]#٢fʘ'cuv: ڲ tœӀq48B!uy90œa@^c }k8'rCn-mxjXYu(=~xԟˇfы?)l3vj0LES.N=䁂oV[viVD:W9YQ GS#q4]wbȬ,6-萼෗DCxqNx%11wJP)KThq\Nq(!""X=إ8 I6L:$P@5c.υ&_SJӾcxzHm\MQ,X I峌B#?Gô-DDB5-!1ok0cGuL[6 X)mRCqGvrCq(&.š8H%"""""j.š8H%zKq(!""rIRCq\P"""҈]K#])%""B#vW9t8*%"IF;=8GӏCDDDvrCq(&.š8H%"""""j.š8H%zKq(!""rIRCq\P"""҈]K#])%""B#vW9t8*%"IF;=8GӏCDDDvrCq(&.š8H%"""""j.š8H%zKq(!""rIRCq\P"""҈]K#])%""B#vW9t8*%"IF쪻P|pňϸzqß 3hY>_e\@\;UOWTЃ]""\:m.U|<wpJQWeq>W-? k8PH->W+'1!h*Cqf"""!3b 7]:sZEE{IKN驡L h(!""Jb[C'\OunθO)['&{J.+=8s/ðs,zGzLI|&ߎS}Y^XՀq48B!Ob]x)>1&n|&cz]y4rع?2wKy㷟/Zp1x׽o/OeQF2KN9jvFRq48"""'v[ދc vFĚ:\`9k\{=;C_DDDDv۟k/_?Οp6LXCD$T8؁1|y*r*˝?lDD$ 6(iIWMF]Nq(!""^_ku9š8HHb-{M\\F].P=?Gh!""r5KbŶިT8DDDN+Lσsу=9eZ bϞ[_4̪ IDATEa|m²Y]zM3rơek5+q+g!S.`Ν>^GKk_QexX(?T.7>ǔGZR_(쏀hz aGfPʎ<7\In7O\AN/@D$XxXm.U|3#Nah\^r3^=3f&⭲gK-,*LϫGw+xikl{齽I⨾>WGYؔYS}?#/>3|) :?]؋9.3?I旜m9])ؠOSt\lզHf5Fi$1 wbD$1yK'η31{:R;}϶bp/ײ[Ih_2! 95iE7T}  7D2! 9Ll>Î|B o G mɩ1O^ǒYl{F# N\ ˆ$ƻ?*}>dہF`9dcqz q{ȍ֑V- + 5'vسj6znerjiص0vxaNHp3$Cd 8Ğ]s>rVCnbz[;d"o4vBvo9CFXX13@פ>Q3/2*\͵S5t$CrJ!.uGst^k./"hFϦTXkf}+>_Cv5tz,V kaY@qL2gK™mͦfmlvj zui/ZOf 4#8U/eHrMٖfذX":]jD(@h(OAW޴;e8ϰY7/#o;Pd1,t]8g̜mto""c9d~]ؐx?d/rك3*墑Euudĵ/;m'}۸N5`Czr|m=NV@ǐoq48_tRD$dO{Iv 3v^Ǵ;.arY{>vV$'PCDD""""{\UuAP."0y)ME)eQTVf)qFfƙ攧SXe4m"3R˻ lrlx=֗ZGok}ث:8͎] Ŏ]A, 43 QuP buPupZX&Pc@ |YC Zǃܫk#4atϓ&W7dljuAmur:::|h?]ָh/:^ Nb;:EA\%^jqA@;EA8_-IJcuPut!: EA8].jc;vucYcWرmc+Vuc8qeǮꠎ_㨃:vby::p 8[e.B,/vQuPNby::pˋ]Ab.vb+`.@`Ǯ:cWNWq`.pˎ]/^k‹Sazx5B^:vۻj{Z=&ޤr/j/uAmx]UzLlᥑ}$kuSiIz*пKV:x~{oujKcOִ]^uAPtSedwqCn*)7Թn$o)k@VJfJ%j}c=i¥bǮYmQCuM'߾ӶbOYhƯz:rYݨf GքZQVܱ7ϼֱY2vkXG{VkbWCkqWb}|уY|t^OR$)SVzͱ}-N_/~Y+^u:ŮGAˋ]Aj Lâ6hlCǵc_wOzξe_=vIk?Һ8ՇǙu}]sXl;v-9xZK]gǮmr?9`S@CcW A.B,/vQuPbg EA8].B,/vQuPNby::Z֠g8-I2JEr,Ui^F\ +CdX8]ҙz zAO44`\[kx{aMzd&=2Ly#fՑMmr?a4Z ya[s|wH>&>;_ h犒 !2N}moUN>jR?9g ĶeV }y8TؠV. !s䣲G}W\%hTcqzb:Wngd?bۼ*eE4 bB,!  bB,!  bf%.#fizprԉ"qvV1q*ɡ3ae3bI|2\8H NgݴP.XbB,@ X ֈ`YV6XEzU{"@m='r^! X8;pJia*T-].EG^G7hE(n7Nb]] \6mQ~٣u(y{UmߦǦNU_ksbpEy_6&j[f*Curb-ۓܝ$1Aݡ}ݚO@s W22ei2K+5K}{~B,#oT%'ZU\.u򖥉X\+S5'Tjzۣv󑏧TZV"G h~sUXh.&`xE*[lYr4 1+(Lpo0͐dUL(lmݞ"!355+fOR-kG4or.G?|XK}#?(T㊋yYcݫtz-NHX4@?hGk7J۲@s@S[b@!X \^Z'2sw?F'b[B1|@:!V7;v8[-kvgb-A7ظ24Km B_#]80j@nZh@ j3V7TzS MH&)~.c;zeT[o gѩS`K~0a~`y[t*/M~_袾V?)OWȭnb/HrhW&@4Y.ݧ}R~)I\&y OyAqCj}3z?R="˸Oi~C򪹓؋Uƥ:zǂ/v=;ez$;mvw_OJ +[,A5OӟԤȃhko@NGkܽ1 NVYrחHr4t˟@#]xUexS{[qm2>T;ҪB @Oΰ^ݛaW:]TqwrD]!Q=tl=,@Ӡ j Tm ٲrT\T$ywWg|t8$zA༸J1sl57ܣ{*}>m/+[Ga}'$׀Q3RU[[f\=|YuX%M~=L{ ==h>]*ۣ?^}B.zh{1˕tzT?Geo sux"o_j欹덹dxBtDu+~uܺ֯j8Fvͅv:G{W+.-64YT?-|p@eߤ]:RsǏڕ:jM*Ο'p @!N΅K\EG^G7hE(cl7 y8D~r8Ç>ъO?ցrS"bҳ#jTi|=:W3XuR٣i[Z~ǦVfh%Dywk\Ҹqzz][\LhH[QuMʑ1@pi V:y-ۓ* z'wl*/oߩe;k5[|"=W+LTd@p pW)cS~ jWj Pf7`Y]d.Uyy=bCnUy:|0Q?[f3! wyU\.u֕63:E)a*JvUHCGjٱL.,>A͙jUi|bH2d[GeO_U΄}+1YV?tn鑨eM%zTjzۣ&>JJꏛ.5zT'w.ֲ=ݩOt׭X4;pW)#3]&tRԷg,M'>6JUrQXR/oYO2e^~B,yH=j?xJe%r4 W5ֽJ'O@TfzvY- 4K=48!X b@uub-3pc4b,!%'ɡ3aRjucK|2[?2D?k~EpF2D m nZ(!h ~m>ۮ vKH>w𞙺š۵yb}uTfM?o oNۏ)E q=nzU:V/MRi5g娙0M/,-K).bJ]5_k\i<$uVowY34trRYS^PܐZϪGH2 I\ڽ* z`;K_TYDNQ^,@GԠ Ѻq)}ړAFMWnY-ᄃ]Uڧ5:oYD[;j**8} эK4 ]] W IDATd|^4gE?/^ M[ismcU1LP:/Y]e @#]{d!w})ORMxp—Rj2['.95 Z U__%Wu}&<=K=vUWAya=5qž Dy*g 6+F8=p~{ϤR3Ǧ\3Bv3WpK ܣ-![V$\DU\7M?P޶Mqp Eͮ龱*%PQpM4KM%1Bݻ)(F41*tR1G_`Y"GG*5`bV֍*nFIo 4κF "|gf9NUyD 8*t;ʒ߿Q_:$\iKjGuC^N~o?VfF%?@_O/Sy^}ab M;'L>u5V6筹ĚSJݘ'@i:G{W+.ۺHon]tAWI xmت$!vq_GNPZXv1|@Pab]a; XMI.yKώGS)ٯv>H4[GuӶ8S\M+?~pKұ׆:qc潷JZX >ߣk?SU!6XÇlO쒎'&(꩟htp}հ_6{oy \ܲ3S:!%_M:%Y_^3XCqnV<1[ !<>埭QI txRN֎*.xyJ{0N*$ɡ#kXonL5B*4q>$2ɱk~4WY^ULݷRuPiECwZQք`Xb yH=jg#O['=kkt9rӕ𕯗@pNe2\.kMneee|K/&y˖Vq`KB, ں=ECfjjTV̄)ꗟd[$D?gbGϐdi/(.8]7li SH`OyHF q9X{Pz ꚝ- 3@)V^k+.eu҉#8!fVC}#?(Ut4 |Z}*']\Rh5:h| 4(ǖ*mRWgGXI2'TYq*ɡ3ae3bI|2\8H NgݴP.XbB,@ X ֈ`YV6XEzU{"@m='r^! X8;pJia*T-].EG^G7hE(n7Nb]] \6mQ~٣u(y{UmߦǦNU_ksbpEy_6&j[f*Curb-ۓܝ$1Aݡ}ݚO@s W22ei2K+5K}{~B,#oT%'ZU\.u򖥉X\+S5'Tjzۣv󑏧TZV"G h~sUXh.&`xE*[lYr4 1+(Lpo0͐dUL(lmݞ"!355+fOR-kG4or.G?|XK}#?(T㊋yYcݫtz-NHX4@?hGk7J۲@s@S[b@!X \^Z'2sw?F'b[B1|@:!V7;v8[-kvgb-z" >M m!:_k fߛY'4ѺiN{;f-R:9!M{oS,Љ}˵OK[QUs4/?Sg-A2WI5zwt*q=nzU:V/MRio =[q wG7RڙPkɑ{ 1C#M|z,7_a7*'M]3̚_@W5YwQR}Gp>USFȨQ:oS򉞣|a9,51ZogĔJT}эKu_h!zvpHwm[MrH*3Xso5w#X&NM" ޓ۵*0:q(w<;Yez]_"|Cyy:wFNWt;tLm,pD]L|ѡ:è!hȱu>T;ҪB @Oΰ^K_߁ ڧ/(Wd}ozſ+6 J:ӧ u|n,K 8֔!Y,sC ܣ-![V$̗k oSX^(В|UfZz;2:OPl*.R~+<=eG~Jr ;pWY׈8YQ)ܯ1lT^}_UCC׼͏L-_Eڻ_;xbPڧKe{٫Oȥ0Qo?Я<ްQaV>iuh[ۜX ZCnn}q}^U5U߮q"uM_%S.~m~i6l?uN =\tb'+vW;T?1O:@;R X g%.#fizprԉ"qvV1.`fky Q8X1_~m%?CtްU}*$(L!=";'it`9@'kv7`>pXzMy>5ֽJ'℄5[ uPTJK?x3_hSp wseK]蘣!B,Р[- 4K]:n=c&˜,S+Srg8!  bB,ڙNe8@3;~O%Ķc$μah@'ֲop< \0J  8uBb@!  bB,JX#kmgh[۸vbV`Bl;~ wWB!̟hx X bXb )Çop]StѳJܪ:F1Kӣ{NݠKy[8iuu5TxsڴE ;hf ֡5W~:U}O9}-ۘm9ҲFɝlOswvFukz?!-\aUL,ݯ|/,K hvRtj-Vq[&bp-bLװ ff.R-oG>RiYM'U+#Ua:neee~B,pP0+W]"?7CU}3gH2u{<Ԩ  S/?Iɶʦ06;pRѼI7˵Ja.uPԚ~S^k+.eu҉#8!A6{sb{{?n`*mRMoAޯ )=9zLm,pD]L|Qƕ vK 960KJ㭁 ܣ-![V$\{\y势44(zտ :j-J7(r3uuӤtSoUwG~Jr ;=6!5x-w\]#VjҶ[ŗ|]UY7RU7K6*< zz {&r,ΆNշU_8u+~ܰ&k%'@iu &kkW)o"u_%|ue~˝}20KG*v1|@P]Cc.! udtQ4=zzW ZD; 7hM!A5{T%=yJԩkm{ Curb-ۓܝ$1Aݡ}ݮ~|S@"pW)#3]&tRԷgJg{%Rtj-Vq[U4@m@)7+0OG})\74~-!*ӕ窰p]TD2ٲM@"3[[cLM0EldUL( ~4ZT㊋yYcݫtz-NH.I:FP\4 6(ǖ*mRWgG<(,W B,@ X vCk9;Lc -!#nLkFL>I|24}&MѿZ'bzp‹-@ ЮC_#]8X }7YN:[7-O @+kY]${3˔nҹ![{]QVF{tÀ@iEx5nzU:V/MRi7;]ƀw4ɑFo?~{2%a'35)oo>pع;hB2z2ޜ?^"GhW&@4Y.ݧ}R~)In }JGQՄ^^` >GqOU/&( :\3} d7UYqZG7.7ӔW/vvu4\=xVkF +ebd~*:Nυ:]ERt '[5ԩh7F*CRI x\-e*%\YcѣbeU4!J{d>T;ҪB @Oΰ^F?h[Hxі-+GEEwwu>b{SBS-,7: sTH?Y%R̝QO(UqQ^]鮋YUR\4tL !ad:~ W&h[8OuhK*m]7.Z#]sAmdmcOgh{j{-Sa-@cB :c퀅KB,@ X B,@ X B,@ X b@!X b@!X b@!  bB,!  bB,!  bB,! XbB,@! XbB,@! XbB,@ X B,@ X B,@ X B,X b@!X b@!X b@!  bB,y|ל%'{ YaVQnѨX­Zں\EQ 6 d !,!d#9Bd9~>Lwy|;" """"" """"" """"+""}yIDAT""+""""+"""" """"" """"" """"+""""+""""+""""+"""" """"" """"" """"+""""+""""+"""" """"" """""gɣHC+""""0ٯB4ÝfΜ_XiPs&&rFDDDD$(ĊBHCӘX9/ڷONx~mVRO۷GRR1dxųۗBbHH @Νy衇3Ÿq """"H|StЇz5kBRF 3g>MNN9}.9ܷWOĊH:G*ĊH0g =mm3^U_DDDD "XO$}yj9k۷n+""""A y :C,@N1pG-)"""d `qs v9owXw@ SswhL!ڴkWUPDDD"P.WiiIJW\蒒>$+k2OUpXnS\ 2jx/v$Պ""""|YݼyjAPjj*$~;Bl _?GzEd*#""""b[ʈHR DDDDD!VDDDDD!VDDDDD!VDDDDG%=[EqUoBBWT ~,g8w[]HQXX. z,|ަH}։z|ekj 8]:rawkO3)i CB\h,[9nbņ#F@m|bP"B}Xi@|vqX!=qmPMAV!VDD.47?AK3h׎>ȗ맱n t_HX SJLD( V622ѲW Qג!S*ef!SlRiLml?M߰r`~c37dy\,Ym˦\:`@C?b bCtZZFl+076MƑ˔1Hk+PO+fĀ,ۻ(UxOv_Ceũ募7Vg݈69Ly9nڂo}h5ml0mˆť'ݗ[̘;)rߑAY ܙƩd ID&ջ:8%~o/psCT-VT:#]uvǫB˅euKyU} q{H딎i=־(qYJϚ8XLnCbuth AފHPڱk:>o[ag2~ȞƀoU]Ⱥ\ |{,l>|w6{ءǮ4oᲝ균_JZמO3<}<ƨA=A^SuهykAahc @t:ZFwJG&+6,qvfҋХs ag ?ǟd}ŝ?m`~ WO_2KY^ƍD^2s{}D|ki֤)u zOzUoeǚ*EOcC;i 6-hI1ڞ-pn_<ȳ:ǒTj%>歯psψb>6vI  O~,nzg!,.;.`{umvHkRI|RZ9寯M߮1Gw6a"mat齮SɈX8ض]8m5 &?e٤dweܯ^-7kq+(j]r -з_oc"q1j=SYV@57 ǵsբU85oOƨ \ף^k_jٺ/W|7h# ""tVD+hʦCshk+cyٟn}d[b{ttјd}BOxlJyaA L25zGIOUHnJc>26m{&MA|^7>0pG,n,S[]t[[.?+2c 맾_bHP04z5 ,zS\mƶ,lۮCiy҃\DEF?8)Y-h&<20 Xt9bq^˂^fڌLJ &/X@qsa/}ޚBN=U-gO36)#{7v r?G;z3b]i`_L'?@Hs"Y{3uf4wCkٵw:t"|%~zѯx?awz!:^&m𞣹mn"Ӳq7+ly[t)/=X)eҕ̥j߮_su$DZ= v}1[vuw1f{~1[wuW! ((,@Q[ǩ3[S >$=$/qQTxE2d&Vգ/ồ2IyUkKI[֧fIG{pZ$6dO>~bN1F2{3{j67vCrVmAu/(=Ṱ7 &@!U׳Z=e8,pppEU$$؟CIVzU,w",! &֎ۮ {d1-._]|l~?e~ :B%SnSӥ"yF8 *};\J'`*r4i_Mb8D*Ċa,S 6qՓv\f|ݍV#ԟeqh/Wf;͞v1E yos(sٖ3>t!'V/'$W0,%Ne6r-M <.0A { 祠-bfDb/ؗ_ -^aa_MdxB t'\ͭckoz3i+;eWL荇5S60-q=F\"MOUZ1WWigb#|8o7,:I5j~GNya;8^<Xj""Ҩf0:/҇7>Nh ;*RA[b{N&QxǕYʦsc9LE٬;T{8cѷCyĚq[o*=Du\/L~H福m綼;k^LZ5 bwa%&~Ӣ`Z`6^0}i螤:K[dž#ݾ8zu8!x[`,~^F/L۶LuC cײ6Zyp#']:8l%㿲EE}<~:b4(9Ho$osSʖ }ndXiT2Ƣ+t廴B+Ŕ{2z(5ɫXNbh*+,߸'fkAmIHj}tIBZVV-[+eo p(_"{g+z]?^{ـ^ ~0| e0[ēON-پ.mAjkǑJ<"0Z/4Wm$Oc_ay/2lf7WRֈmLà&'YjX?a`Y&$? _e, g_#g&k}6_#/Mh'a iɌ\~Ӟ%{N擿;љ ͦ/eBήK DDQlˈY=gLΟ6Mn2Ln#xqΣd?A˪* $M_uBO,'z3ͯ]L+4<na仑D6K}!ӈ}cdWo Zt 7=QoGXX $:K:dpT^u+I_Oe= }9&􊾙{XvWg~}5enw;q֟>Ɓ_g1%7HTUJF |.ǪfJzvb'eE%_66<-nCDdًQnB| ^MwԟXiRF2|P|opY/s Tf-z4g?z`\ GOm-|v!Ղ@U%Uu̺)G]IwCr C-&௢H9e%Jݔ:HYQaݿeŇ(/.Hi1UG WۜO@!,^-aaačM0llq<1||=#K.y)_4&VDDeX[t vhٍ~wSY^Z=Wppݸ\n\ݞ;bt8'e3ϟ0h215=f+4$'5'mރxq{-/e r/0:Wlv{xCz|B4 [wBt]EB8c;؎8`8m8ep\/\.ؖq0 㘋n .mq`_~B/Ԝcql,4Mze(Zz[WB4f˅'xFSASa0ɏ&^_(_u[8Փ׎[^bk_ׄ؋YՑr*ʩ8B .Kyw۲ml v5kI)/9 Q!VDD}p2{Tݸz461nE}g %UpGrX{!x!x} VlS9naфEF?""""" """"" M DDAMSTo[bED$xhbv[FFF3bUi{1""""tbEDDDD!VDDDDD!VDDDDD!VDDDDbEDDDDγc扭?mHcXQihBwWIENDB`gsequencer-1.4.24/docs/images/ags_position_notation_cursor_dialog.png0000644000175000017500000003240613247044247023130 00000000000000PNG  IHDR(p%bKGD pHYs+tIME (6)D6&iTXtCommentCreated with GIMPd.e IDATxw|EǿwKJ ޻UTW(bÂk;*QTĆt^BMH#\$w$@|62;3;gݑΝ;(Zҹ@ \Aߖ$d$IIB:}t8M $ $I(|$Ir,roIvls.!ɲ0܎+)lYryK[ao4MU+e}^ưxkZ^l%)lo NuF}tZMJ<=[Z^+-()jif.q(a9[aSjr9D3ӵ)y:knE4mքfZ9*eQUsYHq2&#S~ t=;i}|.t]ʹ,:`6-8$aͷbXݬr6TS*VfIr}|ZaZ~4 WT凉;ݶ9Q$$w (64M5T$bc,JzR (拰$#TƑ'hx.-;:bSlaHֈ%@Qlgcg⁓UX<덐/>j`A tjmhLAł*NG JQ#))cdYFȒ DGG`1[*E@ʞyﰦڝ 1㬘5)&[/hn:omO~(ٳ>Y`^!<7'bq,G/yHcybtGo#~3=7̎V& SK"3x cnnW0 @_>cUv{?neh`LZD׼sKGn>ɷC=Q+* J甭sGp<#~`o]<Ѕr}Ӥz0Rn {25wjcx<4]c^_l߶fh[eqˢ2g]L=À9I}7 u/7_]7dk[3ZƎ, xz'<{vczcJ{|Y̛#ė G TNg_dYbb,:ȒIkbF$"; 6絗 %;ᄄEs[Ț\$z g}02 Kiy5g ˠ'5m0 KzZtKbErlTI-̴oW3Ow>?IXdՂq36wq2Qfy+-$Vd6$4q>͌1!= CYC>.LͨRp=[6z ,Mi |08RʹVb+_\.5OT_nzrOdGs ˹M3Hֵ Յ6 -/c{F" Oħpb  fLUu1 %}/{9ʞsr^[P^\䃲X,hݼ5-dffLJj*YYYX,V F/n⹾椊.bti:"U* ɥS;a2t>OMzX KB<'m G9 z#ϑg"ã>L;_l ɷMjIHn%ME†>G_#HWD4';Дi uҵ#ǒP5yy{:^,(sqf-]@BB<uu!갆Rg8 ~KTZ>Hj +l$U-7f}"3i. K[*z(8s6"/b?ƉsE6Sf>9}^]ϰcwêSwdjJhTUF_>N挊;3Wm|)7yN~QFZѶy1jH Ջ']w_ 1d%>8o*)q)=wE{o[]ojq^}BG.+Qzo?]@d%?&=3W/ԋ%tMKcٟg\sXZЃ~/fߞ"6'޻gtl%[ТA$dMMYP3؟ctmq|9O/1w)j4nNN_ O}|>{M)SO(Tpv_sO9 <ȳEIKMq$wmX4G_-o8}۷"!*V< h!TYP]|O6 U $/!y)y,y ^J%Vy̓li^4/ڨ*VVOCrC1ռ\Sfدgョ\O*atGԙg騪ࢗ P6siQT%*Rs]DˤVE&]el@IqTR曁Z9+a\%cMgON:, @ ~͠"d, *C荭 QSa~ 2CI䚾Et,R#,(* Ըg#Q#~6lK"#Zb[2!8ݓgc4i4ǣ3##&^vDԌ ?jn#c:6|ETi}yϓrւZcB@pUx~uHM- GSp0%;!6 j&gn ~M+h*H146jc}faMq\.~=Z !o yFo@pe ɓv>ԢYcAHv{7|kVCZV1籥u{z%0m =ùA&r6 >uGӬ7Aͣ@=`0J`!``?:@pex(], ]ADOBM>@NV| y9 {ad,֒f -"0M{.6EނI\ O^ozpǢ_ :-B5Ԕ (#>J2myS J 7(UI@ .UO\ k%$\f JX"մA(=(nrEfp=~\4KG4<`K={][U]|AjEvx]W'/XM׮"BWa @[oF@@ (Wyo5_$(1re&O/ڷesI 3k8rK9/,桛1)O}'9?8Cɏ?>6[Цu |(Jwk zCg+5>gDK2~~w&aڛz%/gXzy/8~`+o(;O %41A%XZ*~zQ2r PC g?eвi1CjF yzD9@i &4r,bݑZ}hg:Qعh&;SJ͚y9S#G232wRד*+5X`< ~zT3ػh.'O/|+&ѓDOq>vuZ(u:$ '`e{Öwqa{6mI~w%8%?vQR3Vk@ *`Rhyҕ"#P(rQ!ش4QrOGT\= 9u>wsiRM霤 "%). Ck̞2ch繹?#s:ٛ&ny;Qޢ=|iխ  讴ɾQD9@h5$<4}GSl8Mlީ͐FXL[zLl;nCW/ލ JV*'=݃搕i%^K[鬕qW@s䷝Yc`3D9O3tt^ܞz-nO',^#z:RZ ^fUj flӃT1Pǎ=Źs~LETx<1懙WZ%s_:Գ{Pݻw/wM&3;W/X~gOڵk+MrAx I*!!%~={vTx@]/7Z!4tGl_FUU) gY/d2sω J .%Lޯ=Y[l̊"@]Q7^{7[L)umpM)b @ *dTL)%kHp= A !PˋS _FL)o!&s UĝksN]3w; J*ĝbbN=q1Oyȥ`cVQ:+ĝbbN=ƀj6>ز#RSpr} 9o_sbbNuĻΩlMMb-&&iu~ڏr~'mr9IԾ>/ EZVȤ}BNWƣRQʪVo@H?:>nepWfg7Oxb}+G%9Kv}1r91g_~VAAfC4TU/$z&(*uzVZb)OؾhU3.5PY7: 3~k'g.`6DR r31Rq=h0cbiuS>^m)m+"9[/>M6H2#ۑKzAH׃@?Nn$( CRXjdU}l^KZ{Gx[#7o6}֬<ilfxoӳZy!zRNBz3XA:pO+N ֊qKʥe>yn2u>:0t2~FF$ ҳPWeo`QR$Nyмmfkج!`Ke?۞}N1>*% l6+{@H b9ZvQRUUQPU.RF_cZqniwD}ũ N/пz8̽] Ʉ!MƩki4u}̏MӘ`^u`>߽Wjg C^!ΨOWYОvEڄ\Ms= z2r:i1}[!޴l%6!YnZ\>%{K :ˆg ]+ۻ1. MЭo<0RpG4eoځO5VNq.'ޕ?j<ő3Y=ű?38z:$z!#'ϣiUaJ; UcdЭRVֲ' w4<]4 y]{shұQFSIJLga!n)F]۳ty+bBJ9/''#wt'׬$E嵐 K6 d444MB1[mĥ撛 R+m[n*@i=aC 'I-)96TEjc>~^S)Z4%n!2!QQŏ_c>5'8եE}!''p>?CziF`ۇйY;nEco~?[R+f zV̖̅e#ys麪, oBf:Y(37Q^U4T6*k3&h&î&f!!FnS9'DZ) hVEâ͢e!5  _\j @rzQU‹u<2pi9@Mz*E꽏5*W&RQT{Nي;u3 EY ׅ¦ذYPRd aɯNRq 1F|2WAu(!l驢jhv ~z8w^T[>? Yӓdrشu:9ǑtkBcEFhP.ͮ]*-Ƽ?,^& "eBj愚8Tew7Mnթѕt\à{n#q_6jEp&,MiѰ)*LH WaNM4rt R 7vi% ?5әJ"6ؔE;eb[JT(jV'yVpV A~n8ejF;{Rz4!Hi䗳%Eסωy^ȁ2Wg~v~5z/_!$G:GbVb|SoeMnZ&mк}c&hZ(&==KXlkNԢ]zʹ޹;d]ZQ]u֎?6NAd-޼*]Tc*_uФvjFW`co|2S\EG-JU ƹ+vN^)sfAnd=OEwr+HY,VTUŦ@wR*'RV mES+KfO=8w6װz|1&T>I ePެ:sC#Ncdز/ҽ[0ŊmGIKO&9~[ͧ/6 c@]l=|1>Co4MoڈYŦi8OD6_OܴLsZIhڼ7tT3*{?㯓PBnstm_]nydA]~m~ jqCz<;{=VAAҦSk4+Yj `#Yӏ, tWiHss&x6 z01+s>xE?ՂjE$1ISi6ctQin#-)__,l1151Ky+YcE\V}[Sa׏1@#ұWwS@Y<+s%4VqΈ\*.X Z fUVEv!,o48w?ݽGѸF6g#O{II}iq ,/kW41k%9?SԷ~wt0w|3/6k3ߥčDmٚ,-3SR3T8E=U lXO.õJYu5S} zl旍9t y!QUׄ_M֟Wtotάtjµׇ{F (*?sFجIo]H.бqfrT{Nb)('0s*2 t 2J _dOc6,\.j=\lb>~8Ofh{T0Uj1c3MMhѦz4r/s20e] /' s \@N͇ ϏȻ rB8,I%Q'G {F?׬&[ Z_N_ ΃Z֝™]:tj2S} $#2N, /8q17%r5?PP6BYQVl6+5qkfez:b@U >Fd)ƽسӹCG"Hд NßWNϭ\-rvjjwiDDt)U US4 YV8~DE$q. -Ȳ`e4YGd0TEA4$Iry`8?Htz-NNbD^:c4:qMSQ?W V @^ d샦PdUi&D(f{%$Io\{c01:޸ ,7C wy&&yX#EFTTEE)*련 aIDΘ3Y-0̼ [B:d Bt:@No@ϒӱl_rqYtFR$JELT^9 T>ԤI VC"z:TmzVl[nE*]yɵNemp ̸vKOұJⰞrk9}ޱ>-r|7}@PRKCb$Ү9H[>X*iu)5q@Z`䰌ʝXr#n;S8t^<n@y:8V@<|_RUFB$Qy]|mU*ߍq+xضl+*ms'Nup\m 6< <S>dMSŹ(j%B#5 + 21/@PՒSTTUeD^y-p]CxppP8J C\R7;ũAVP*<+] T|#2mhTJхiUs{Jas(s^^PPݡiMK;MQUKEۂXxsb(ȑdYvp _Wz$ ÆވjEvqr4)U($UJIV*IAIBNsp5E9UTs{iIree8&ɑsq.NB/Å]ry[]:MÐqt"8<}KN˝RVY?r|F6CDQh6// Un(j,#ddI Z?]KHS*$}_A͐m~͟x6zFhk /sA60dHڍ0;s|=}Ç#)a_'s m(mPSپGZ@>i}MU72~@SYfHl۪YʃԶ%y=`qo~5u3Ъm<=?e')o 9+ΰfey3q"~%zb6Ղ=&TN礊e"cZZGףdYҕ}M-VAI.EruU8*Isp gL[„;&p+)$taM n{WdQքKk6)Bl87=$7?5G5=| _7tA›}z`T2ndk1 )Gt3k ?-t۾s&>8 ǚ" Њ|A=Xߗyw}>O.b]puӇ5^BMWf^ r %Ą/7旿0q~~~5AI.WsK@Y{:t:^Wt:Kq媬kiyZeg-w1jʺu8m,UgU\׹sP<8J(JrwR7nYA:u,9ɺ(*ǎE%?TLZDXvK6 Eٔ>Hڴ E̊5'7 V+{tV9UU߬Mumx%$<T0ՠnο-1oHrN(U%<^+;ܑn1V.~Yey s.G8q2'&9SEd9IU\jAUt:Èn(..bRTTb4MpQ)4 @+\?5$TǓ:~"-fPb('-mꜼ>vRE{,ˆZ[5'PB[f}d&oE\lՊ^7׀6'Q$nsPVMUհX m7~@L!$yp hn)SqtkzS^Y+9fSiHt,yxS҇Vv7ͻһ I騚GXT/>bFZ$ @ygwQiв{cM:֩R˖ռR"~(شM !̜9;ӕWfSk#A4+Ѩոu:|{$ͽΗCRc{`.gyrZ gIpPreyvPn+_)#%%KAA>s?v8|\&&-i?fsiHg<Cp7b ʺOīC3~sPnES.fˡbS'Qi;3_nI 0$'==M%ů(.|4i2/7&Nį|Buwdd\1N///C8z(?7r6ţ+FAr+RUK/P!MݸJu$(tn I")ÅЊ.FŊOǚ6I7ѦeST6`a9>M/i򔳬|e0هVY$!߂԰nfL^1_vx]Ӹ]"|wW;ӜN-:ዙ3˂Du<9'O9'q>HU2w84ˡ,rVũ龿R~gLL&'Ofޗ%9)TW*ۘ6pZ?SpW$BHpGMoMrJZMWTa%䦱ʋǒGNmw?N]y%‡: .NC8w8+ϴAo,2D (Cr]@P Bfiױ6E|sp^*{NswSߊ0O[Po' &6r|7ߦëCW@d9~ k*z||@Poh9Ɓ3azY~DGƌ=P+מB^;̠oouJ ׀Yѿ)2tQQ|f_OrZ:C5Jq X"'Ǚ9$]:9=ɧMg6Il?FsS8bM'z{;$l~ه)^tinؓRTW MXC{YJQ1$`>`|NA @ZFwdO׷/>k-_k/\M8b-Am!< S3PΟhg_75cY}Iز%{6tUhfavmVE#qq6PTNA  3"lŝXgTbO?]񰀆-i+?SE{#QPAEa4iΨ/e&W(~{4~d )Wuʥ'\y*!(gO.W~]E`u렜:"{rn ;Bд Y?%-h&1YwqаHm[@|d,YjGwto.u: غn>p.o!@…uTZ>1UV ko??r*{N) saN 7.︮g#ŖIZ PG_ǯ%%1v31vҒ5㶇+.3m"o}!0. Cp8^-0~Sdeg`W. w=džU'vהּ @s  靖kP'Z PiI9?[^.RxHJ (_#13x_$q~AOix'C)BM÷x0Oݳb&l1\P.>@'euOfך_84A2ny¯|* fPǭ4kMhٮ'9q/[WuNW3BtZ&P3 -PyPStG<J@p Tڤ[3BN  (@pUr'MTia>E`z=1gΊ[@ r4nJ(]CC\c\eu@ $!Ř4}]h0'vū8]\tIt4};DMdǷۮx^nя!(ٜ;ş$SɻqwMa`( <߿CيYnͰ_!,i+mn~QlsH7Rym,YOI}Ӊ&cgl:/Fr (4a*J fߏT6J o?ۋb/CFqxa0g0O⋆pۄNd/DE3aogol˸錟jgo9}AaXv='Ζ-dT9SRҫ:/$J ! Ui҄ X";e- iP %,ߘDNn:>bMJn! vc)s:}wT=(ZΒ@%lxZ/JCI__cojyO36Ll.r4*{IABv4IS "^.g%(.)1Ԁ^R*C'ThQio@PuOT5iZ9jSZ Bg 1*-}T?CaP(4M7EdCqX3dehٲKOSҢ!]4i4WMeΐtȞC3JH:N]nՉy#mb<ڍ}qQ2w<@H8K.<<7γdg;&mmJxӟ9qn,{Faݲ6mo_Ρs6rYio71=}8VRo儮q7c-۱~HL8@v8%"ԓ& &MuBjјe C{}{~go3G@Jgs]2b❴|d䂒"xI%Wo5jx2Y_0:I0c2ә,:Ba;5im #!6l@#{ps+ ԝOG6a=wFs ۢZd̷IS Bq~&N'zVfg2]:k4ԩV~Ȯ*#7Q#3yfo:~3ᡦob{R}:tox&@PJx,ߘH$~3!1-Opf%:@ٛFJH8t7Twu $`ؤu]_v]Ej@.sfyBd=T_AAd>EYwy)g8Q\.Eh޾xCS?C87 &sЁe/؃δNj6{IYaن W$klb(C5X,HP 4Msr,Zl'[y7rlmth>vߚI0po 4`va5 YJ0!!z( PBC {c&UxpHrU]`gOZ6&-h{7\zL$vb:o"~̈́zJ&bo:B97qsط(i,P5IzNahgCQj:O;!~u{q~,}o8Zu>z.IsY/ u.Ļ@r\?d\_|OR@i+ZÎH_ϟ3hAz:櫕B;g.k_t;_nfGs_ɬqf<>/w ,8'GϾ@LzM-MzjMl"{RS]S$bu+0q'f&꺛ѫ-[֓Iiĝ5,P{uuˀ~ҳw WWw u'tНSI89E;WUhX'o Eĝv<{!bD0qxSp-rLܩLAwk3[wֱ{txS B:U&c8\|,1@T] W-@8(0',!PW7ĝbM:S U;w,$qD\ !P@@ \jj$O_.Z!IE_K TѸ[Dv.B<@P%@ (@ J .5x6},FC ]_ipqj;!~&MMdĒ-Gwh-#F4L{0ӫn /#Hh"PRw1$+fP G *mD$*y߅@S=4Ӿ0ڣi=t"UW*l:LdH+wM/jB%A=EhH,2]ϛu DZ;X#4^hs{ilӾm4fsv}i6s{ N*WđOnT>욍g }lCG+ҹdI.4$j`Sjװ)6FՆ|w.M# k/&]8% k`+(9c6оM %N%#Am9ƒ v&]I9ztәylr7#ظf ɉZ%*ʮ]PTw[5/ S9oֆc:~<_\ ,Ze)krqJl.)3g1ysdn/-̜i|abڶGM܏rf.nN6.8oCojLN;f A]jRN,h8OlAbӬ4O uA܃ےLQ"Db~rr3y+tU|s15f!;ԩʛ(Gg1j@('z9 w`tUs8 l02`ڋ d#_}ۘq9G_|nAAxI*iF:Gg"yGѡ] >ujkӿWt)=yG_/{;-l\ͧ|pPV{><ԑϓVLk2&vDpN/^YI8Crr}tmJ(j^ʁ6JH$vԵru]ZΟ/֚<=4*[iϽ}'կΞ9sn2:jОm0tNM{{:qyA-pLv,^ȉwԑea xOGGnml~" fgԻntS6 /fdB(v;jKT$ Hziܾ#)K@mr`<<5۸9ѣ۟8~!.uP"~0O-cGREtsƅ VoMFOhk:]g93Vo| ={z2!] sl_ ٿ fd5TU-8NZ 1M*N};z+<ϙ;uօ5Y_a!uH2FJr tuWRN יv-IJ/Sz|2u^:0t2>FF$ r Q?lc:NoW'gg2XT2d4dI.Iu2//K@\UoЬ+MfMt2 ]]( U-1Te'ATg쨊j;ߎD<#R`UДBY-!2BC+.#/"ihgR9ck%gp(GŽEtAÿn cվmu&ÒȔ篤_N4IHFؚl1=ΐk\Fd15N2_[(~=eUUQJ򼀆:{;bD{?o&,/ m^7'DZ+ h6Eêͪk#5|  o\j @FV> *t<$ i%gNCK諞L0O̝gɽ/%RQԒN+n()Gq*[v,B"Ԗs ]d3%//TMr*f7gMIͪ!j/#!kzWѱyw~oÌ )Eɲн8V^LwSԦꂋؽ[Ĭ*^Gz$}er"P9M@DDiht_ٶ=^G5&Zke0`I/E '5)^vECQ4UŠU{i w}k#kVqVqeיbEU: MFpϴOxϿJZGnGUUR<ٜ((NeB<)+4Y{Bg9nnuypկw_Rxs¤dRzXwXK޵zeÎs}+\!;O$_:MZ6";P\dcĶ{ZK[w-.Ƶ QӊW bŽ{[zC=&iW!> ݮk]Mg^ طc-k\]]ׯCowo$=3Md!ahۀЩe*2b;{3x X>ut8B6n^}M¡Μ>¡5g>(y&cQLxv줠jCUU$RQyZŎnfuy.u=4ߚ˖=>Ɖ>^ԗήcԴ$S/\g$a[M%;4}ЛH\:\V'l9q8\߂w%a*,2Ayj>e&|^S>qp.NsAtl8nYϙ: Etz6o+m]_]~tn CHAݲu3jYQM U+ɗtKTO#!/Hnm2CE$[Ʉl||c:٬l6$IիI9HKJs)n{{٧dG¤ٰ|)[|4<[nA1,Y,?8"z,egX] QZ2L_zɋ?o+ 3t/RΝ[|7L_??9ԏlIx1'Ѯqw#ӚL8~{_H9)C*խYd1{ƂߒWllK ܅ٟ̳/Mjb`b¯99"A-Ч1߸|]}zJu{x4o4l ջzEl"z~R۳ X 8[vZ{ѳk=_sL!|܈ ͊bi/ }(ֱi|}|ip>,'VJNTS FXD#D^+>Mo 9X* ׿I&%7f)ft ^~v>~}^>ZMqh}t0Uf`)4STGtNG~9 g-Ɯ{\,flVK:FWIBߺ?v/6n BAg&U8$IW^O4fF?ג'գu#=E::RSr6' D)KH2,#tȲNﮯZ|gF^E'ر[K݆bah(u 7UUK^No@73)TEeDii7=+Yq nUcZ hwxʕ($%.4 PCJUC$MCցQ4IKe%YQ/ & DUdMC$ D_ =ܿѻg/F㚦( v@gIJ>7J$e/4VTJFjZI Q6H$,\cc0z2daY,T`KRЌȌ[H4ɛYx**JHc{anb'J8\t .,Bt:@No@\/ zcYKo0TR/_t:h+)PՌN?+!@ !PjrP󷤉v.+hwq鏅rp~,,(@ J @ !P@ J \8r'A (@PA𜊬PIENDB`gsequencer-1.4.24/docs/images/ags_select_accelerations_dialog.png0000644000175000017500000004347413246707333022137 00000000000000PNG  IHDR(/|bKGD pHYs+tIME  /"iTXtCommentCreated with GIMPd.e IDATxw|E߻wH'B/A]`؞*(*XQ*C C Hvǥ\ aޯr33wf$l!")iR}v4i$I($I* %x_,ۉBcⶹk<]VkZ^yU~MS4x+_ժo㘭PbW4ݚ$nqwW^jp3 >ϝ;/U&57U JΩd+ފKVq@w˧T!=?K C4TR:–f^TcI[1x*6˿?}Ze8vhVqYW1J%[Nؒی$+ l'8F4i6dUFvu\T*P!!M2%0V܈%aZ#JeO8`MsBWUU"!P׏@aKoJFXV߆fW4 [Jb[zD\ʝWEi~is,*@ |5D-oͥ]1Z*Gg YRjJe*)ٍBWOC*t*oV*9ٷ[>vY6,1Ccmoܻ&UFAx~qYbYu2=.OyHkPzʺg{O% ]jj]0*/K}EZ]emE+Q*!QhWۺgڇѾMxq横JQauqY0đMo("ʪ^5@i@$oXKQQ#I"5P*tREu-S+\4VVE?FyTOKUtWg“lzckWmQh (EuVՄ,(fJ' ٌYWM[-KAyM0JTJGWѢaQIS!2f%UɈT[9(?/4088`0XeiA)瓘h3i,#ddI 0뙆;bgM`!#'/z[&5#}VVzo[# V*;OEok䁔Blu>-6[8t6ƽ>q2+ e\i<4MpwTIeYΙޛ9฾t'eQy,&]ƴ[XAfg";e5yoeǙ%Kːwr pFz.'H7gxfdܸٷXP:z\"j~P>ߍT &dͅ[faʡyx3 U#Ч^磇n[x8ӼGkK$9LK W3#g0-VZM&c{ qxv7S_8*]&ǝ|0}<)6Zę<;0SFFMA6oUxu7 %w # כK艹>mM$݆[g>= jB<7gQBR$\YorFWmmf*nUϊyc/SXOaA+,dXsb Owh,0L^ %K:;ܹ9z 5w濶yA;.d( @dQt+_~(f\>8[9^]A(9ol>SWЩ8~<2,3W"[eQ$i2˘5bMX)=>Y`㼙 o*J~-nnnL2"U*NSKZrf X*t:PXX@HAA>뇣c9q/y|ƎnmӼEKzFmOڒ[bvpOAyfw'V *Zco . ; I[UGqc[[>Ӯ eQ'y*Yu.!o}_cQtޕPӷŒ|ƎK6&Iނr7e44PU"#y̦џ^_œ$[ʣ$TU+jcTV[웒Vd砄_Ae=ypoEXU19DKYOU,%l1 ~lIS~aNm)CDŽ;J-,獉M,^+%nD,4 ep.z?ן$-aDV^lbITzԽ?>F٪)]_#ʓݲy)b+'n=72ŬcjEÿf'x8|zK'/7eV~SZe˗1u\K TOYmr9Gws₏/Tr=m<*'&dV{oʾKX^Z4$+}Q ^͌*M3#eaz4Sƕ7ɜºO'kLqEϛ-a?cxoɬ?%2P|PN)?ߙcξ, 46MF$_?asd+@V>R-r;p'.h9hCp>LX=Ruy[9Oo0Yw&ovVzY,lI߼)nyqa!3Z˛YւI5Cz`YM7yVbJoT;6XdV 4m4qw`ڴie?߷~WihI&bXA Zi5;U9:8ap|UGZ ʎ9{"j j{Z-z&5j[4jفjXaa)nVp5 T2a{yy.IA :K “rj()ԙ H8\TK9 kAp3X@ 4J(_AE@ %B(@ T9kK:种3k"Pw|`շbHU?$mHӊ0LAB((Qu -?>J WBxn-kp5GއM8xȨ[xvm^2V|KAr /.ߌKPd"TK:]nM0gOWm{ǻ!0̬ūAٸ_LAm D6%ۅ^ n`siÊOWXri;'s\0kGIɯР>2 &q3IèY8Bl!x&=G)3+8m!Qj7z$rZ=/_&H:51ԥ'x8{fHs2 8㏣&f4&||_xrVòߟ^‡zϢ(<&y9- {=?Bpf<5i"՟ j!YgQ21#i . y+x0݌[ P&+6PP$d#@CQ7\zK.tꒇ:-c(ٙ(fpG"r-#?. y /!+%#.|U 5*ӮoɊAÌyFͭqj5\pcXPO=[x AHI {VEQװl=n{mߌϼp>Hѽ\AP2ʝeDnȪ _UkBFE~HhE(.=#GKWm19Q뽳 Ov}@鸅6Dߨ ^b3VVP1xkANƳ9rv)wnA01M;2#Ը!z;c1ٸL|Za ġy7>{cBR]`4ah /tN힚@p#wJPONQR kxi)[},|K0[G1*%2`NO4!d'w;d]([Lq 6V۫"#c%t/#;I (es`x40e'a<[&Y57E[I{h/PjR6A܌'{{Z$*?u)a6UK!Rvd+\XOXWu}|E扡xvz@@PxhkgY!w"A  @ u>kD\}vIBV6?Rĵ(D\o,/߿P TpY?z׭5 ~.F] u q MD*ܯ Կ@qz1ʈ7lOTxnX#"aA %z1\~7b FerAg^l!bp{A}E__H= gƟdҨd6l'ڿ̤VSj]kXCr Nߠ]E ywl-B-ʃF@BpkAAS1 btK9q+mzyU~y>8E6+_ڦ.YPN]7>f֜77gW?\kV[#ci?^*u?cLy7?KxW8hVs`u&j,ǹl{2]w˝l̤اӘy){ɪ90/;37$ Vi{:;mqܗh= MK>(7jE!K܉r5p?ky ~&rLMb|f[?܇bKo5&s~4^ypگ?UG .n;vp+vnb׶(̊hj|44Y~1`hEddC'G4 Y*?vce"yRV-Zk/ pϟaSayv,YȏE0,.oq3uH7 z_O.}q=aS]3 s8s@KTNN v:tG1]:[;JߏhZޤ'pzqsulH8yc`|ʎ9.)}?۷Rq=>:shKcl؉)4*2zELN%n.}3Ȃڱ#QihXJ4UjY~WUc/X֚ ubt-lHLcS=$tkNշ>:]ؿԶdbw'3`XNgp[^t ]ܴ9:ۿsi ZS.x[PJqQɍh{kO}'#hT#[Z#;N֑eЍFi$e]@mٺ43/.d!/"@=DrAߢgcx O#6U$q}O=܃{Ijdhf(%֒i4X|Z%ha6U:1|3Ƅ/ߑĒ\٣PuD jTv]=pT rqsG*̧RϓJH8V{fڇnmXi7'MtJɝ,u14 -(3I[6^Ḓ1dMY@XI^R:uIG.5QU4[kote+++79 3`('KUdY8Y:'K"Ai;eq*)f bF((=!M/dr>}T Е ]lT*D,k5KtDvNh]Vp.M$+'9{S:o\غc-Khzi~R玖9$cQ]2,N y/'w׼kApB=H4\ IDAT_KA|:88:24 apSe(O~HMNBB]Ɲ#>,g;C3>~3OrqΞ:kW sSTfH8y9%ϹeQK8Cw$@NǖS@Ǿ4/.F*IpM-(3珘13 9؏>]*,-~Sl,fJz y?Eryorc0轅%-,%y3HgZ!~[}߸wX6<uoҥ/ݴuzՋlAl{}&k?{h&'\ |o+<;>{(s8{FM%{ZR'Z[2pLtFtw6#xM'_ 4uK >:{pa-v'ζ"|Cis"|dƦqoyc{2iu*c?|FWyxqת Wj6jYQeYG jгOldl\*[/pa tLSݔWظ1̮ g}wPgU;DrfFB $~˞JKxi3QI{H$Z/cB&AXU1hrIuz188"ngȀQ|weA}ځp/[1Pc=PS_ \ J ޱ)Puun'%~ 퇪.aU"J !P@@ 7,zQ<®mјU,^@XPkm̚؝Amؾпsas$?>5/@*N&cVTLsy;y+ BEU dW*Q:ѻch1l0-\PD .銪RXd"+ψi)Ca$D3iܺlh-8[̖苨/fXq(A=g(vm¬(he;O7g Md ie c!PL=qETMEU-S_ذ,rZxޞNq+[8mm5C{!;ZyRiF&e]>]p9 T5B7NӅ$$ F3\IlFr%b#;s)3eu) v+Œ,[MWq(AwNlTv3G"?}T$1>#-E'P⭍@ մ̩D-Hun$.P B=,\!PIpjJ{kHPW (+o0Ldz=G72sݺ0gЉY ‚:?3 _=?Y3OG{*o]f~/g9ƵPÕ _yDt@D< J׌I. &+m4gNx1p,Xݽ_%蟆,|o1 [,Z. ~h넒AڱUzRU@Omڷ*g%8c{Yi3>NLAi3Rykk#N6^3iH?b4t ã/kDl}BRG7GU'VGn/& yt&x ='w"˗h:5q ]p_}N|&*VMLgäٴy`ĥa[%3>{5|!Ŧiylt;>3!?#85'PkZqhŕ%N 9ALŻ;Ű-ЭF'?(w-Cc ;̋֋}2.ZV^ӹ+]5J9x![Hbz4|o =~BB$WOܤrV%ѲWy[AtlJjx!C9m(%ao~ %j_4ER`( Ws.F{![^ /4#@!LB jR:̙E|^2;v}VU _6a? \s9m7Ѻ]'ڌY>sbe ɴUOa)T^uxT#cV: yE$Wꅥ䉻;ζuɤ+>ꡤ& SQaHZZh :aj7}|>o11TG֊k)ՅoN.6o Z\:1|` w:e~%cH`q<KBʑQ'EP2P@CD=SV_+RdBsK B#_a$sfF/1aû`HO ȀGP[ Ip!.8ѸHe\*'%`Ç&'B brF/Rt\C%rK;_-D̉$o}m1hZ.X2&tp?F~9&Yi%]6{,~oǝ/x卤(z=G4ju~% qسgծ;e#*8eWӊ8Ax:K$ؑ~2s1lk`D-cCSMx-+_ae 6C4SNqC@ׯ${xG_0 Sg#f g/їzL!F=]M\:?Mӑ0oHؾ+$ڍ.,$3xqt_hrh5k^j\ zᆟe'M&3{|46l~ -"e1 +>(ĒT<=ѻw6?#&Tr^^8yr//2B\Ąusω J %Izz(̍VErjUN!@fU@ _td(Vp@ԿX)%s]\p@_EXC%@ +Pbp@XP5NݕXS3&>?M_jb wbNX(uONDej5[,)iG wf] Ъ(p@P^-Y[Apg^bNn TZ>+p}kG w^A]/Y[A(]pnя 83r2*Zl֭ͦ>6FGʪP]x-gw~,tlOAӣCV ՉJWhq#t~?ᕟpo"wn\9ş&4 lAr³a(AhC23x/䅱hq(<ӟ@O~O&($@ ]pܮhFvlNB:tbطgЭ/ OC.IIII,Nl9t*Qd"EbpxbkJ{Zzڷ #//doN(}%e:=ͩ1= ј5I))xfC:1{$h$IMCѬaR4LfB Fo\Gzu |o޾,\ڷnGGaKmNYPLgt d2%ĥ )Q$f#{5xgi$ n[C3'1ͥ%ʬYPT̲='1i'[~CT55a&0l`[\KoR!M}7KԲa_mʽ[Nɥ3b_Àfpet+*s4?L6QAI>H^@MKʜvDӤлӤ n9V>aA]mbϯpMfsO~ڼ~]<(xZ w !2hb7kJJ{?(Yf%9yhڅVnP~aca'?O:1H%Oǭɩo_m *84vhߦE>3FWoo$ UQTM4 G6:g^CͦCv:Å=W.s#)=}G_}P6X{\e4c<~l jT[dᕾCa$D3iܺ&9>_KH< n\ Z/6̘{/J` 1O^!Rֳ߯5o\ @ڭ%/; "+8}NkY@V4OGGnkP }*aجhD9hu8yy}g^~pwwb6iZ6MCSU D ksPf=Hx {ZIW.#<3܌#ǟIHDcm0v0-/I>~&u ss '~"IpkIYA2p%l~ =it#ԁ#&]p<7[ ㆝L-OKP8|W4[GPV͜ۼtyG>o%62³@ChRtEG7soS|y~]i\:x ˠI8ѠQ/hI|E-UYzh8rJ7SIvI9#[/{S9|)? gguUff$=@((j)M̉/pʽy`4i>)eT7WIÝ/07(| +~j̬ aō̹-[h\}̙] X4m" l̐)po#j@1^n~~BL$^ʪEpyE"rhOz㈎q9K) n&Яuw)6;nG"f-1ק8ɺ71qD|9s1U8v. YJL\T%NOX|I9^d4GUҨ.rI' Ȇ$7"LnJ2VݼKnf=݉S͘N(J@l1efEAQULo,K+;q t?oC2bt 5uwӯ;2ztJI)h9غN̤xy7$ w]lHiS,iyt"2:<ɔmϝ4k$+7̺?3789}8 s i>]@[nkkyF}h"Q9(1?u4 .{*I.}"F<9^"ӦO7,L؎*K1:j{]>dd1ħ !rEd;i(*ȒYY MdLf:Uʻ !]hɞ5;8}޺M4TՒ1XJ%'J-)9fTEd4^):?Yǩs)4%B!2~~e'.hhq$kҥrI$p|h6Tނ:dv} 'Ы}WڄTt7fiS'݉vz'szّ&xk Wu+bwnRf:ܣ̰s7݇R^U4TmTqk^/GLM kv}.cV@LQQ+2Q!+ό^p6H8$ r Ns.q $_,Td̤{;lKJEQ-]:l.{S<% FoWG/hZ=G%a?[OUC3teBW7'.zիj.,!kz LNmc;'?؂]b9+i|^*{'|PߩDgBj왲 s.=HFxzy!eQP،)3vќk27>?cqZ:E&p;yD?"{ r@avѹk՚QsBsP5-.{KX$.n1еw t5<^lԫ?+|9_zʰQ~vSiN)@6tiOѢ/fb6zg:whU:/ЉX/_ŒozlC0ɻp|r2MY1$QP,Jf[?DV1͘F~tx/M?UIDATq.^|ih|()e E'ooGX82/rȟN>oa)ғHǞ՟p&nCO/p-ȉMHŬm4:}"^\>eslAEi9΁{+C: |M"g[NtM+kԏy|[pwWު };@rww=;ӪmhhSgm\59&4 ¨[ۡyIV}qͧ='vM Dr9Lp˞gc+:  ?KٸU^2Hö~Rxxxi] 0~r%]߁\HN⊯I78Zٙ;o#GE@۩TW .5u:~=Dtat{(M'8`E.ԧ_9:90~h|Yb߈ Ɉb6i/M{TcǞݸ8?~ _|NN+9'g;"Gq[GdߨaՃTºcxAc.^  %cL09*zЃ cf6=]Cl&Ywve/UMf|i Y L̹2s 9bu8w-(_ү$ }!p!~] Th*tG<9`0L!cC`0ڵkqqq@``0!Tp<*`ja*QnzfffA <T|0͝ɓ'Ϛ5c4<3l LU{UXXxm(ѱalIҢi8qZjȐ!G9|o7m4d##ڷo_ss󜜜'N>}Z},+c_~]^-^z&&&6l(.}*Jyر#IXh:̟?!4k֬3f,{…oM&wӧOtܹs(J?zӱcڷoo``qF++,ai(ŋ`nnZmxxxܹʪP+׫G/$߿R*C-_}9oݺρ΢7^'x!AQT.]uuu_nbbo>us! i(~AdeeY[[w)336大[[[[[['$$Ա9r%88x֬Y?cǎ9Ѐ\|JIΝ{+/_i+E0P* 266yFGn"v0Z011ymT).*413&`0B, +%I`0$IP `0Fl U``0РeۆT)*Z$R)P V qdAr{73hUjJZqtvCl0Xe4HϭPq{D~KgOnۮEWd;u C(߬.ƽ'?gnYc4;EG*[qޘA}{v+/8TϯGunӦإYq޸a}{rfv}3.4}l?5IL_e#\X=kյ7+̻eT1&ͽҞV>`Ng[kwc͔';tyN8i;()봧o8GOg|[s|(Κ&`o[WI7k62gZMkCtNȧYrXϪeoǷ9S X aϲ"RkwoO[= +r%I?'-_Tk&jي= OHWqƥUY%K6:S|WR-;vr#Pԭ;0BeT '{VG_:"#[{`np~ p;.А40^3"eNxdɉQ$ .S4]C;2k]CMJ38ԲюOv rLh#SHxB"baZZ݊HWHy堍^:=pEUٛw_xZ?b.FDc0/oxض}bY򁃘HA7itvv7'gn~:T65O=oO@P/ѹc<%dyXH 76's%ks!kߊmKa%,B]FI}Em)V! ^y*F^z(nIϺi 6xUK]2JUs"=J?S[[, @<( "D&=SuHBOHZN;A^%/}TVJ<hI ciJjqؿUrL\y qiOc 9DHz|uI93|::\8w\\jS) ,)z)OJVXKU^Z Q3]R^|L# iuٙ˪.H$R+kmj_v Vl7 _`n``0@eH2?04dfc`0{=MzQR˘`w+Dj`u1RP=;ewCGy'Rg`\Ϭݷ+&y9Wq35O+?5He2sv3ξk(`4^ߨ BKNg]cVǨ@j~7FG6Ǫ@q mȎ#1jFdd?!2j/Ɵ~wi݇n:D V(y~z-\=: W P<߾[%ؤ?+:cx>~ŬI++MǿӀ~z>#G8IJeW3]y2 _};Qx@nBc?)mLDȼEEGD(JKfG?x^ mPm!U!Ey$yWNOײ>evf䔤KŀJlyiKgrꍑ8`ؘؘظm!z@ _'G';L+*HxbŤ~}}T֒YO-Ҳn!)I+۸B]`hL7b~ ^_ F.p76n W;XZFxzbZ? bQct%^p8O \EAT[f V`1=K@L4\I$􋜲'8laF+AI, ̤ y/6fLɫ>ܥ{tBJShy~wucw oZ˫ t68m,,JXe0M&f=xgMqgnS o4o ioF3j68뛦4c7l5MhYp[/-<~d}SgŇMY4 g`02 UyB?y}Y1 @oBc`jG4pwzw j;p LtCRYV#V\d/d}EgNNΞCv_n:^^uZڹ͡:nug?О!\=ڏ?67L'tqurmck[h~?;fPng]xO,2{bs}3,ϫeЀ%GJ"|1W4x1nrgj: ?P7=x#˨erpbiy-i̧$BEAmK FL'ж/ B׭_Iu2>(QZ(ʴm7,ԞHI?lm*"?\ XT%7/H:F:-"-S< e ?oaJGQ(TJUԑU(`U,bR NFᘜ\6~Ӥ;KPQAZN;c}RM%G,HUQ];{|aTɌɤXtflHe- E-84҂Z5]5Q)ZK+Nz$0YqHAZM.)|{O[l-!YK l{]<&2N6yW=&{ŮB/ڻ|kV:C'q**3. v?!nGk[rd}WB9tqX!7|GD_.V?fĪ5O[Ò#W`n=䯿.kDnAC V#nMh3^テ~PXr*/]z_sHCx_g=nBQaElmm-ũ1Nѫoqq/^շ?xzy~g}e @@-HRB@RRZR9JIu+u^jR"M#iY*̃ x4zPi*9G E^^qPWW+\Ai{ e{Y(t1oLҴ p7 f}2/DJEJ|w_*j@Zp*~RKԗzeA A_./\l[@J IDAT z (kQA51w-?eZ[0L#e"­=Dk%g Ӑ*S7dː chKBƏI $f}@P%w_Ztu5\& eLL"50u:~YWgDj7Sd֓w'=ʬ~LQ7AH y2j/Ɵ~wi݇n:Q 3" ѦfY|tTp{GQ7n!e%'3rҮ}1cD`w237e>3t8+ޏvg|~*ڷ4"}[6v:ޱ6&"BdyТ{Js#TI'dZ@`yKу =B $2.J{Sl,&f q0-{ j:42PܷraŏPI yoU + QZբjv!vg}w&4E} ;qLP_&-+rNTIGNDL` ?Go?+( Jʲ HGKL,-` `j:dT+U\Z%+4͔6sJ/[Bm× UV؎OLxz8YVPyMėIѴcmwBb?IP L1gĨXUE6An|رy<vnnu")U{KYVブA30q+C&cFV- m,,ZxuUA=aVv\h;6i痟ܟ&'؋PIܑ,  \~ B3>6B"1xB]'TO@p uzc0*.^W*N*Uԯ_=L$O=yd g>΂^i؄"@Cis^Lelo߶BHwslE~縁+uow /LB@>W e%0r/?X{cV5$m5e)kWNP9/aJ5950xxXXY^`[ 歬2 +QJQ5TUC_Mg}F^[PBU '2M g}ӴFsVN oDx};lIiY4f"*h [Y6yTgL)Es:8&dU!KIjz>ZiM6[%Yx9inn%#~y=nBsL/&mfτLU:9wsvy3'c#`0ochQË*ӬQ,3 ݄]Z\t>1C[)D'Zy壅V?tCRYV#V\dvBsgb(15D*Ls:=bWoXxpG۞15eh6\u닋0{)(,g.xoY5l6srNP>bS|+ruK_5vKfd?#ca43(I;PQ)6aNekVm6j )In`rnj-c2Iuֈe].sҧR˧[?v8Q-3/s)շII3k VPf#/J!/)A ƺS EWgǤ6m? Ah(XXJرAݻ>(މx-\nR٨4f/6w7'rYʔr eOD"|0Xe[l&=*t*#: qGӎ?cX=Z 'G';L+{nګup}= u%2 tFt&/kaXcd:#[^fRY|0Xe(ym 8(| i~&kVm6j @׳'!BChV}u\vئ$"ð HZ j)ʼo4oMVdf)U(J0Z8|ez2uEOiBR@8\TŰ,P( $&? 2!iT  G*&FG2LQ1V7`l ~M``02 U'>˱s[BI%Ʀ~Lza&-55"q^n` xyy E"ljlԯWRRoݺ=3EQجo0O.]x@ ĦƦxSMexGBC\\MPq KjN}ljlj3uzL;8kxYe SgLإl@xZL I6il[)W%@>oijPDj57p&Qb߅ǿB e/yhV̨!]S݅[]` #|X(v b"#{`irts`y8I*==z;1Z9{-pqv;x'|zĄ BwW8??ʟ\^I 8dKyTOIt'_ya)ZB ;t?:5/F(:G?wmbPS#b#Zb69gnE)!SxFDF?]F8ߒK.rچ)h10,(i$MF^ˠ[GLNӬDžE=&k1kf%ui3l:!@:߈C[t0V [Y\)` ?Ni^r$z,&COnd/l;N[ eZB-CGS^vƷ"A2}-$-Tk8y"Y6vB@OvN  uz|}&\MKvl:t~`sn߮P Ԓ9u[xO|ZBȦs qh^[`ע,u1Wo'v)V8'IR#%SHߺ՘'JixXslΫoNFjN)8mAk >XSL|~-PB._2-wEGlPcC|ƙ'.S{`wʎ*d;ɳKtN}b2L yfp@?;w{yH%/FHm3T? O%YӘJu XW/rǕB!8g~% yʜsſ0rK"S{yaE'>=+z[1 \o{tMĝ\T΋o_~y|׊?=Za[ǧIJޓ䜨g9EyűIA*ęta ^SShG⇿ ?'4?6_*w(_|pi+Oyl. vXa4&"=˰g&euk{4enmY̋'2{vN.~d cqVrX۴@S!!22giϢC;55ݳ={wÜtiϗ5$4ZPBǟǩ%Tu(cych&.g@V̲D2[[}=,Jv7~ZL"#BPםtRkШ)^we gޕzG'׉l H I#xx(RŰbA㕟R Adh+Cy), ^=q-M.'گ7C=!t͸S t# ۊ[tewO4]FT[D2[)k.ٝVHcDt'|ƀ5Y1%dOۯkγ,\ň)ZB%%%KG:DW{;][W=}P_`A@g]OǜZ1~z9Qy.ePML6sa{萆 kra㊈g;ZJ}ダy6ܫkd9=QG1ڴ-BTXY}z g?'ȐVCv+ѭ eto?x#M#N'rTSba#[j_:PvjMM ,`ݥ&Ap˰,C36lˢ 9(υkS}j+5J[WO?K@,6ie7TlԠ}fM_b. t!@/jtiap\ۨTʾˎ@9Ih0|žSۇM3{Yvd vB5W5J̜z~P<ޤwd/z}B^];_'UY @.-m_y4 ~iYr ǎ~8}(!i;ywo; kQesss;Z:ߔO1Tn&t]ƻY=Nhe0";=/2:^rmүTV_S? r~aAڟS_jPz%dl_vEWG7kl78岊u ~ӱ+kj˻ov}W=:2|@it)i? HwjRE 5۳woݾ%/[a,u๖왲Cb-{6k1]4ZC2ƣa[ 4M#2H即u8u-t{+|Pq{2A2V(:B y=_n}֍[jm<|(sOOm#h45pXKzjZLƍayaFt ן(zS"H$((J P% \&MAe6y+q0RyRώd^]ڴj{׮mh4t~p%EsIWWg^p4 e2>_ y$IBP(B!q"H }/+jie.<8,Bz$O7050 u΍^ l'k<#!^}xᢖXS Bl73uCAIvsA$.U\xEqAIDATAîe /W:jIdYϳBS_S zw<ǫpU,"(JM EA-3 GctL7 c~ӱZFtJOuw*2Hm̧i^΀zī BwC(vF!yAы%upI2IECCG̸)Ȇ IHd_B)H':(Φų.?3Orci'Y~/c~:_ tdfN1q>`!K͗=K)_KǫW ݸ/2OŠz:b/'D)y^$EBo]TPJrujɢ`&vR1)9 uL8 B,ic| ) kyŒHRHt  ]DlQbXİe1(Eq+N\ Q-$EJу%h/Ĵ*טC*,1@R!fAUd)2R-o/ZjfϦuV6D yYeӧ"ࣹ ae eD K*d>?L Yi^.ɆTz-X vLo s|dF\a5K"a>\Q P)bl8ւh^1-GKs,X`͇oxGK׺M+ڴ0 ېeܜ\щn F~)s2 *Yh~Uf?==23/́ydx EAL%!:'9,z}R=zks8YrDCz>JU[!۶Inn&I y\U sKL*2QhD04^`m6 d2OSd gfa*,H DZ"s hM^Yzi I wɥ\$䁫S4f8{Sݛ-y}|8ekuR7Й$: _7*i(Jr5 ΂de'W22dZ,́JyDR}TI"ѐѠ..&2&=V,Âht:}dYYX̢JBVT Aڵj#|f1iuHպ04x%o .O掩9Eyԭ݃)o'l\ԕ"[jz iU)#[nN{/ ̘4qFr{dO8ȜX6fxfxDs"fC0δ튜őe\-!yLh }r/9<,ͷ)ox肼 n< +/#qqukWf&?Xa8^ K@RJJ6 Z&FcɲlXB%$ *^]5\T*II͸O1XP*IAdذɅ/R پΰ̰IE6mChl<$Y[PP)Z PNKD`T 3r $9tIWNK^v:)Q\V^Fc^sEG'),yuMų\M)W ?WI֘X֘m|ͿVp Y+C ?'CjAzD=N ѨvA/^lN|?~#ĨZP7|qP3g"ǿ#WrA N͆05=##dī ٙ 7SK"oq {1j4U$C;/M_f!rF6gEkle|P]krµZ5Fe_l9+-79 WhӜTh*7_ 5:AUը*vjP57G/s\ɘtn JYLh>gHE *nE1mn}+94%= e[y?^,!:Y?pr~H(Y+& W7EEYIøDѰP)II֐qe\0g6O#4H1E#7+ě oVuiTպv|:W/?˘GҺ? :ty8p2+#p 7@Ł?tdgFXcx}0K1}ڃ&I\;q"=)|oY5vGmu9+,W2j]CZ/=,|h@z^*nj|ak}6@)vzbRѹAyJ7tQFѣYt5L8gj]-o/˻7~#/H/=IfM/jzq!NNJȑ\UTa"b{x ¦la)3s%RNb$/VJzbb1>+FAcxfv>##Co;`_&&,B hPW^Pm^~5ׯ_\eb*fW>?>uX_$,Nhb4H+Y e8UNmT$Ŋ>)V-Ŋ!J-)6e*"6+bҕ֟p3bWJgqh~5Y|A 7Qw׮F.YZ^J:eRX9R&)a)A((ҳa]bP(¼_٢e gnAx^ķ3ekT}BƾsO,s<j@ڍx^'8.܄6)ڸ8&Y &|>{5xTO{GO/*t9nz+dN1V`4oivF4>{YlHK:L32]_N䓷bjM@6ϥ#О01A@ b-"H;jDo9x:;4l͑_s::Cl_T[ЭA=9:Ǿc3s^63-Ql9YʹPUb&'˹ʛސ/@E/k$HuUʫ>l'+Q)iإi}ZR4nETt,))s9-۸maV8%q~PU;=pE4] H Sr$܃.?=`CQ=7&ӫ]#۷֭7O/{JQ^}4ߟƯɓa,X@TJ P` Txx L6 YE㮂"dffoP e(R$%%J4P^77Q Pp{ @ bX9+ٻ=6~λhB sjr!A7[+QaB ʉ  CAUՕO>yWWWQ @^Pu[jYN̚jw2Utg/Ժ=1(x*S#դӤlFDz<3qx:vh@8qP^;;WG-;^*|w>y΃f/a,r+v̛y/U Krޔ~?rȮ3CBޢq-yɟ@fT v\s: s,^N貒IhB^ zt;oR/ ZYBz(yaЈ$3IP~.چw +*&҈1\;3ry6!M ,"aN؋R: aW d*)N:nHoYf{9r!aD9LS$Zls*{ VLhd#.6(l(N.8ٜI7 '+YLƽ/p>bS P"'יNGEbrC֥rO5-mPP]IL-8z_a9/Z1 qK@^I=0;:GG:ăR7f;G.S7GGCutGGR r:)ylw\]PTB+|ydg0/ =wappp+*RRŃu& bhhaB8kGuG}q/go)$Sh?_'X`h=CKF;vb_V%R6g0sLdYm@ ɂ&DWarIa& & $Q !A{6*gCq )w9@Ғwz‰C IDAT0‰@@Pņ‰C"<-u@ PPNwW +ywN8/ ‰bY]CufNR^F72iFx{,  X-<2r^v%ds!;aynyU{tD^ûU.q{4ǯPjMC5T~>q,<7g&W1|t2s BxQTarEyk0᏷͔4:?/0w&O՚dyK|2s'b'e~gɐ1r"U#h:Ԑ:_?8ݟgY!#M*} uzxQ =Պkkpιb_)ԡfTx{ ~F\Wm6eap 1wZBǒsqFĭL9y$Fm /q^ƥUY|Ian?|Mh:@:o dnhV\f 1lqg>* nc\KܘVl"˹4q^U%gS+Y 9E}㧴ܑhrQ#ڲ~Ɖr,~"(0;WbSѼ[ؕ6ew[B؂78^p%7\)QP=RPİ;W'æ 8.O@]6ew_pCZв+[Ъ}kjW@1S_MHV Ufx9rk{8<A@B-dd4]B +yi,OMЙհGKLD(m/mb}1B>g!8m=89U7`ۿ>Nwv3s _dųCqbmC9 @ U*,Lh1LNe&&a@ a@P٭[@?j.B VNB yCNB *7N a lA3!p"/bhSHkʊp"/bXZ]MwbH97 դӤlFDz<_NVm력tj~ɫPݣV];>b<0w]O?SyAİ,N-9/#ys6 dϮc;6wBj#9i On68m?=szTw1,f]TZ ^G}haK/ϡA.3OLCM SuQ@9w*_\}i qo+ƖEoe`}9Ͼʦzɼ4b } X;k7> 6 3\:Ҿu'>30cs$҃vJ1T9:M/eqn1)q\LJZ )7#8V?Djv#kNѢj Y Ou2&u''>ryp"/M˰N acv/G<Ġ_p:3 ?r\k-NecorM.yb.3][vp"/Т=T#(#y {?Ϲ4oݞһ,G.Zi+7yC%ǑKo/Hޗ@E (zvɷG8j3I; q""=hmNۋGxʃJ@>+gHbU6MbP İHMGH~uCHJAN'5%MᎫNŶhb,(6L. 1Ld@ d2$*A PP>NKUΆf 1,#  '!  !CvÆ „  /-u@ PPj]9uSZD^p'^p"o=qwFQT93]A9D܊XG* ͂mGٝ˥콌ndҌTu,9rY".n[t)#yve䒽JBv6/_))8zW%Tb$(W1;6q*ն6|ÊXG.q{ D]k0ip/6N+,z!0kO[x6omBQ@Q`:o^{5ى<`WVѷG{jd\=Ջ16ť_e⭢!T?Ӛ|gɁbG潀F ιesX<:yg!8m=89U7`ۿ>Nwv3s _dųCqbmMYfa 1,\|t֝ _ܡ_rV34kvp*%;b8sqa .5;N.mr;]}K5; tpr)Lꦱ WLgU}uњ;SlaV<,7 o>O 8דF>E?2/lfp)C;&@֒/uy;%H/zZ8=SM&a^N͌ԡ?~_^`eSj1@mw 0ÒP^_K܆Wm\ơ~!S0u,˞='h6Ϯxoij@V[rhN0H6OU/zM\_ XAd?-d:ZZ?ݞॴ0="Q>DKq [4\;ΐ_CgPR/'4X':@mEy8{4\cvhCw/C Ԛ?"Cfq; raC=vo0x{4KNI EIBY;}фϽLW6Y%]L3M_ȕ{|f dscC[MU}u 6xW'g1uY>5iI=I*1O֡u<Ҵ]*oS{`> BG1ר:/r4U=,aӴԘ'ׅ[q2ͷӸC%]Sg.'x.~wfŴ+Υg?ͯya#7 gۃSoo=_0Eˢ>m;1tIwK6ԉmh7v#u& l ӂƍ Nјɻ; pE䠶VP[?֗^#A&+䄭d˾"9[NĽi+j,iY7es圎N"-$ƱLIKպѣ{..]FxT,im1n m:544pG>H N$ntO=unӉPRZV=5ASπg?q 9[сGxrв/;a0夛Ѡk5}hҝ6Ci~YN:1 !&f*#/!p3Cݰ3_E<]f ~2ce/r^"NiF6nVzHOZwnMN(k%llqJc5vrLFK~ms4j{ZxlH[⥜"{1Y&Bts cCӘՄCrWx7nC\-^KL߿=Ta\9fy87A~qnؖdi5hr:Bg,wԑzr~8X>%a?WxP}:##'NNԩאXb;Tv1L9ȑp< ^W*땴I)6ëfmj7/%JQR8{ n]ܑSX[)`߿<7^Y6lI_㏇4Ġbے3A33篓/$!Swq(nN܈M`z r# =Irt$7.k&vjAqOMϖݱwt)Tk8`I&S_~MLT݄Y;?8B75KIvrve[iֶcߚհ2džɷ/_bKOʞmnh9]5X>3 a&-PvơQɽ\>r>2\5Uc;VSȊ 'lL\  ˳62vב26]t6}ABrq&l NzRM KN:Mn)x'H8׿7` PmVάe|h7k-){f`Gç^Ϳ MP}<<->ȡGjtЯG]T݃'_b81gX*L?uW>㻁[i.[J]b߰q#; W'.^wCa$Ǔvn ;}ABiYFAmDEQQ-!arCH?z?'vWxf nkʢWЧI܈NB '~ickmooZ n@%m';&'@;TN12O|rmQDO|2x5@y.T-Қ@ wbX$V B b#T @ b(B @@ 1!@ P  C@ b(B @@ 1!@ P  C@ b(B S>PfIp-2=-O\TԷ\b,B @@ 1k؉*(Jl~v} :DE:SP@U<:8jWp̘bi|I$I4*!% ;fi=v@ VcdYf}y7N iYZ>ZgCE=$hs_?:( "@IҼ AbX2'͡}p5(/O̩O LT@||^H* EoRՉZI3XU"L mZ"336rGMp $%,ˆ9C2"p{t~DBg`%qӡ|W Uϟ?ER;$I( ɠ* 9!,CcAHw.NLr]ZkdçKSc\&>P-Zcۼ#ILέ?HЬ +3js ټ~h_Ș 7< jpWhўj.H$fƹE(/hCF!̯;׶䳋cG/0y6˗i_6]}$j}2^^K:0 ,:,QQhrn39ܪtЫyf+B#j\ZtDNoy2k0^u&\XBҡZ6Ngq?: Yn.؄iGK\0ʾ],͝3P$s=f: R^tt>u{~kۻ9q(f]pDOq9l z"Za5 ÍΛޅ3?x-ιp{r?,;U]|Ȉ#dst1kUS!̟cNQihM u::(aVC'噿}.Ml(amgM<Ǻ~@Z<>MPc7TQ#/-uM~={i$6ó侶^q(5{ ?>4NpT}X-ü4ۛǻQXޙGGUqٲBvv$~T@((hmcrbi]tVm]RR"N.A@ Q $`Bdf?& JCμ=ͺ=gQxA@Q>\VKYpnM %!QpQ~^!2!ux9;hoB5ܥyܞ> #uNrﬧ;nͦmPvEUBOϗ'4 %MYӔPWjU$KAڿe5o ؛P:͂ksfzh㹐o}4ͫQI<:HW4.LxttT%a821+Pi%P+WR*p~xCj0 bxlx:kBf_?_MCIDTʠL,Gm$FmqM֖2*|Sew> O{ƙ>_GR&0X Q1zwntL0n T]:5$LTa[$4LnPQUOtLD\O&&m` $9{@I;f፿E['Yt;/,5_s)_M xˆ-BNےagDET tk6s&%۟!gU"LP ͅ!!*."R{gOafj}P-%#| V3N^nOAA=/s&]jO*5439zbGm]gSg-=zq'O>}Xf4"hpj֩1tM7u02o8F0A ϼ (h7-I9|d:זθ'M0 tMo%Dz(5(~5],`-B* 91]M8»uCyưR\ob|xb^^bcAr%M;qZN0%.r\e{HK~0u`+EpF!.g2A;2KE!waOSe$>yu2 ;62Svq\wռNNb`b(,1qhCbJeFahRzEӯGMJ*xz<9wX/R*ˋ)_C{/=/h5YO!gxߟp 0 4]I,Y/fQ5fŊ͈3IXk."BʏqP[_{WV} &MIa5:=u?|M&fr?Kށ#TWS~h3{,DžQOlo*(,$[sهɡ!}șX@yysQDsnp34$DUha_Rл 986oB59Xq=<ٿ&;AʼnGIǰķϐλo^)l U* s}7ADti H~@'po[_|&+Iy&|NsIMc^?gypj%z$~X@ vckS4۬0$̛$+=v! wϏcG*vz/jX"=]-7 B 3ya^O!$r&dS{b%Lw,b돲A3}=Ŭ%l|l?\NҰaZ,v:Q9BIN we_p2>;' {o~C`j=e71_,{Ke14ZʗOՄnF}iS  %onĎeudoǺNHI<>5ֱjbƄ3URXcYi /_nؖ7ē\+smv+fūnoiyѼtһ2x}=PѤko>A bMqn.*V[+`~П#yb?oîщj‰=\40teln蘆-i8jмl`lAb0v5Y<<JH((᫜`T ͎f>Z4SkA+ŊfBQ>-]V  EQq Ƹa@ b(3L^_&zM[[еP { { 7w@p1k\1!@ P  C@ hu@x@ P $YnIENDB`gsequencer-1.4.24/docs/images/ags_synth.png0000644000175000017500000010576013246707333015607 00000000000000PNG  IHDRULbKGD pHYs+tIME 1)䘧 iTXtCommentCreated with GIMPd.e IDATxwXVoN\8po{dR ,M4m3-KSsTjYr Dp [}@  >>8}ѲeKky@_j |/]DDDDDDDDD$|ljvV pl._)wA~b \GDDDDDDDDjrcL3VK%&""""""""T**DDDDDDDDV0]iAnz_ޠR?=JDDDDDDDDn6HԿk.t{T(c84ۋ_0qZޛ" mn]X9 kn.I?NOxe>[N\֋Ӧ.vYşml5a7sSE:|MgYE *V+Vyғp*̇Ğd\;"8zS-],˯RB-j5px~r!.W:q]i 3*+`=3aw!!/0X,vl SqB*)+&]w#*|'<MTouy8M:|4VŜx?a =ɪۏ]Y8`܍umFjΘǞ ѐ0p1 ʝe׊Q,=D7g$p!Ѻ^e2#]6u{cil6h K:澱6tݹP/`f4;Y+1KZ,1'ONиyz0ol*ѸHzvjA%' "}KyfOXW7SecZχ[ V'S3<26`S&5=؛r9&Bzv7={Y3lqk7'D/x||ׅU6ؚ_vmNס?KqU&JաzL"8 ̚D24R=7rl_|†߫犈܆n[LO,&#s+^¾kދ>/X: 3熛/Lo? ج) :SɔDpr.t*y3HOKtE桝"""""""P+tomeOO~߾ğy]vYt$1'ժ@2WK;[R BLvn8|B]ux Jc gO Ot8˩B*bdEUdO~!X9ik74ub|nxXs knA&Vpk)3[r"ʖ6 ` "0Q'¢ohWJr"|umk=~I;JKn(ͻa0NeYtNmvm>!<8q/X Km A9̵zsoTBM7i"b-=~9",Yqkޟ298d,J XILȤ|y6*[LX:F)*Ԧn~tnJObe'[ `q,`X6߰;2C?E+uOJ]}oL츰iCv4UhPj+t/Y'?|2d$aIG>47!oE"""""""r+ݼ4n 38q2K4Ѯ nrp{>1`N8̾+ p,fǾ{W T,XKڌc;}eٸ7eGmHۂkID d=~<}cmZȷٷzZYZ2IO<ͩ06~{^l {2]r>'g,'kV/lysx]7u<=cY  %*+}NȻs$,|'H))$e˖֘QET/{^T7LnÁo3dӈߙHu~g"zg'+&bl)ot .Otu(ꂋ{[z OhH;T{^f~DDDDDDDDw-JUŠ'36Y E7oѳkMkSp*\DDDDDDDEw˪`YDDDDDDD+""""""""".L?;JDDDDDDDDVPꟈ JbA""""""""R,(ODDDDDDDDm4U<ݣF<mczW)'"""""YTy/""7K!O+kբֿ;b*#\i VlvG6߈^*HDXxu׼͸}ﰫjO%$hDDDWjJ5rU#ٹ%Mńp`'|POW ΅ =3;^TR̳DdMD[sRߜE9TGzqȌ7w_8FҳS *9Y8K34EY8{!?efUJDG< 4&5U_Yt9v8k2?)8!-LJoȷ7s| j=o7eesZ89U1筑|DS zw>~6cL<9C'"B[{4ʭX[ɳdÑγ77,;n.yd$[1uR}WtB ~/M (ӈ.ХYỦlцOnj+""r{Pꟈ([m܌^a qёdHJ93ܻw49{cb!@Y{ܨAe:4^SSݺ.*lt:!#$?)c] H{ͨף/3,漳Lѭ !t>Sό3ډCߢG,6ǩK@!1s:'3c/kf}Cx-n=xDDΠH 1rsbbފs`EFQeWYD\Js͗A[󹩲fNJW/% Sy՟z\+ ?aԟ֟uW>=XI=s+o lz)c+}Etpi-LO:ɠ\)͞.]~JK߃ 3=boDjLp]h2c4CQ9㻩B *D9'"%Q)~|h4o 0}ǘ?狿?druO,g Y!!;XЛrjwOgnUܾ j9MxH<݃՜ -C 5'dI&1!u[Bryf`8^Gvr=kB ov0Fҭq!WsF~j@t1s(hVnd'""""L[X7O?3N/hl\±ُ`d?4=_M 1X폜7SwdJ491}>`kT6߂);F}4·mP[+@}.veA(;~+-sv.Gޠorڝ7S7ի҅ TGLbeXxIjfrzw5oWYDDDG4-TrAͮ}T"""ocJz@&)6 s09a4f נ`mxIu0*ם{89?=7w'h^5iϋ'EU"""rn(XvL-7ς]*ժcQJU˓MƙHbM]!rUV2"y?ùXSI)}Tӎ46]vU% T\NɥӁb5-խmȊWY…<+Kv \3'Ät!=/݇~Vx#9a==J_obmGi]Fi~"""EvkLB(Fj |նnߺ) {{+iiXgH8o5 %Z`#XUAEkXhZ-'Ze9{3V٧8ҔSJbYҬe/dQ6n$.g=<]DD"r􆵫(U`[ۧ+˖]sqs<KJmsgs'ǖc5X]l\h| ?q5@UT2 W9,gac:䄋-gCr:'R;wk|}6ÙH"|}ͪ4?2[&%cխȝff瘶 e7ᮻ.w?+_U~F? ASĶLJ9WJtw2DDDRDDDD34/NߒNc=9ݾ1ݞEz?+1퟽dm;<6e{@>Q_/)2Ws""R8::oP݊xJˏ%]CrF=YGTݾL,zybU(f)S˳9SM b)Զ_[ pw"[w1nx_>;ꎜMeRG_I-DuΊt|c{U'gžj"D$|~{=lՆ /˳9^yQ%-0;Z#+EⓔSlkyli>a?wfe:_=*W"""%uY< ՑnC櫉Y;^ vodE*tJFt3>sǞ%v??M#1d:֣0e-dKF[#?VLfL)Dz jj޸wzS4."MG V݊EgŲo6p1>f+YdPtvI8Pʓ{Oh_ TqԂJNEay M.DI:1k_egK8qsU*txAqYZ% ajJ7.7^G?5 1|{v%coHk\ 6hxzvnIegi1!X ?;Q+_>3o$sӗ!8::Nn45b*4&s֏*{ `86tnZsaAȚ7u}smNsKͫvBٟgW_y?=ǛlĻlʳN2}ˤ IDAT8c1͵i҅la34l`79P*E#@jV';5+X2w廃jBr+ɮOXzr'V)""""Ro;I,gcKuL5pQք#ll5=EőڜCG1$3ﳓRNFߑ6X8P{2զ397peĹ\6_e?YFi H~_0Q)]ՍB=I ny>_L֍bi/Z4I{>䆼,'w7ĕ^mbOz1PxjtJ |8; /9WZ<&\~gIzgihp+TLN\gxd؅}&_[XCP?o)9=k!fewk7^iپۺ5-~bL=J}r!oZz,!*4gkҍFay@ T@[q(x$"""" TzhMiٮ%MP ׺ ¥:{==LZv*tܪ:PٿsiձZgX@((Ӟ.88g[SH;I`ANѕѣpìK&|d*Wr8 zYb9 *bD}`wGNKصmG{#xKԮa@T;Z7Kf?ıy4poA5HY̚8YnR߀JK-DUv]:웽9lMS͂ڦ?[_' ~bQx2a>g Kq@P IVHJ !¤ vGD .<*m%*[ vDDD T][,;Azu9\ec{yRn+5I9 {7z<Лp3c2ƞ8X{:R姣mF& TكuhúQgG8 OSWn+GR&"""XAQGBݘjKDB0nh#-93((5Kɀ:Cyn$ A\N4423mLF>V2},mNGhg/Ǽ ] up5݀TL&z>LX?Oh،GGtrU`(5$ҤM#f9YN] l 7aH #Z5;{lﴠ;k>}FGAzYk}Z=qhy 1.fdN+dtèq36L <{㉡qҁ" Xl^ZFܠ a }Ch?gGNt#n;e0^#)njvsGwq(""r'*YI?șJmhߪKH>IQnlCv,ֈغO\8Wgo{ AMtnofNj`=un4hIwdvb!T0O`QW;>u:aJ1|<NxJݜS+XXd2_.NԮS~۴# Y!6Ώg垘 O`=tvN2S厴P7:ZOGcxR ~a9 sպT38~Ŷ|3:U)lL& QJ)~K),]Ө}0UJ{`bG+ЧHz&x?s%d<^K՝vG^8+6B.m(_DMԦmUZE1_ԑ#O6e_ʠ^,$&dRn \SHegiSQ8pb =ҶKWDPHDDvls *SsUY1QDR'M;yh'M;_[ֱ*Zr,/kiX+_}>#1Bn]sb5? }7lׯaƌ`֭[C<3 ƿXV!C&|8/kȶ(غ}uɓ+hg4.kӴ aٖdgp3 h P%""r;RQ[Co@yjmݶ} A MNO fTї|sYɰNtf9[կKf{}ẇB&0aSD@ ˚Y`[x? czLϻ,+{2Ghݻ쏵?l_ڒ(ODTϩDmK6eW6>3~8Ö+??dmH01CUבnԮGiZ!eLa4v"΃Q=:f׻IK8^3l .㏠8u]/c1þ !\l},E!˄>'?}Q/EDvwG-Jj lږm̨NE/.\7&D3U8a Z׫j,s(͓v[17IB\YAe:4^|KdNE_'{/gߢӶ2s jenDd˷*M12c S{di?2I s,;z}ge۴cWUwKae"YD wcի[/ zSۣf "D LF>V2})2ҷDLtbeS.xI۠ & xl4]'1j\3â<{㉡qҁ )h/"">O3Uu*)raPgˬg"5j'(gVQ>.DLƊԆ*쓄>>mrd=un4hIXqX8|Y9mKo˿Ϡ] hgfŊ"""%^!E%Xf`8^Gvr=kB xL`'EPʏHDnI;ٺm#eÒqu'QL֤HBya$e[0N ml[WޞwL.M2 ֿzODD$}8)3U[6նDnsDG˳qI!&pc0"rWp@.fl {2]r>'gUv?Sxq~*9fd'zW}kŒO稝HɾQzd>ojj[nEn?nW~WTwgs||쳯`EDS /MQ-7]-*baw85LlE"""%m'r=EmSTR2SvKIIaܸU""r0VK""""""""rKʝEZ܉yqttTaڦnEDDDDnӕ\wcRWt *s)a&SE62-̦+v Ft{ &[{^OGۼ1<_[U4nu+"%NVLT)ϘR_KĎ|[l TyQxy6˳9/0 ~6p=*qDfp>KOT}|XEx'nֿׂ%mޮm<~ƧcҴ\:0~[ʯL$E&UqH/l9m)T"]㯦J| !_}}|"G:L?CB.59A4\?L1@v֝VgZ`&V_ ZFԶy{j}IY2r;߲pe*Mbueӄ{-ˡ7s;ɬ]I?HvAS݊x&N):E?Se:9&%^T)5ero txz<ݼj`w.fn),i4ze%g%kl": b 5+ؓ, `SFҳS *9Y8K34j˃cz=L_Lw8GǛ*亴|~9Jo2S]$ߜEไUGn$ox͠ڬ04˰1tiVsaAȚ$j{4ʭfrشgɜ3'5p!Ѻ^e2#sTGгsK*;H Uv,/W۱Z06^apY43 .Z:>cŤḘR<ޫ8,~ER0=hH9b6뢥eSWh)AѵeU>ln&3;A4u/Mʑb^ǵCM=y^=mo| _~?+HLھODJC;o Y%""%9P{26 u$W>k׮Ϛpi2 9PgxFq,:O*n@¾?97-=3g̮I7)> czL_ Z&7>;91^/dDߑ6X MNO fTї|sYFzL\{Wx詷ˡ#՝#P>YDum{WyCAue`[XbSog./"_W,`/?^T`W{[G ""RUחg%ulK X¶ѱ.~L,fCά_E`g]Ìo@[?y'o lKeD;zAa$$Y!) eөc;蜩Ik&͜sң4D9sg$fYb9 *b@jeG6`ms6ߞ6SDel\^{ ;r)aRM/Qفsf?D }1ԏ,É[31513iַׂa|iCiߪ#۴|h!i`mO;l|f'X#L tҟp*p-[кCcʚ-}cyEsb.S1Pѭ"pzs5L5?n8PKQPٿsiձ* PuW\#Piyȇ='.ÊQكuh \cxU+s{%"0_k{M;~ܶi%p_0#U~: f4knLݩH ՅN8‰DgTq¸@訋šDZiNJsXK?{wWUqPEpP2%2[fTjW2-몕?5yLo޲2+S3-mPQTHAdA@8~߯>Yؗ"n˵;a<ǯ% 0Uظ0R F}m/ʿ0t*99Y ""UZd6~ IDATc驼tYr$Z8 # K~&5+|fLYvo{ZGϾ1o20l*$’zڸ@a䎻K¢0 Y%ĬEI{}mnXbar$2_G\zt|5n4MѹL*|y Wp}ŦLkWv]J*jvv 9q :r8UL~#*د.,+Z]ZZ>>}GW'wc Y3`[;}ysfqg7==pY~5%%ł5c=k2h5p,V|4 :y/~8W @c# 3]65Hִ lM @Oj0G9s ϛoaWZ2f_EzkkoӓNmO';x6.v51;w_d,G{8^m}as7zR+^/͑8<~|fCx{P~n{$GVyoJ1.:W\iծ/Gdթ??DC`f7+c_Ե/J|=GOy<>z xd>JIteɌD*g Gyә v/y)u"rrQ}ЬY채c[z)aC YӿO}D+~n%z7y9wUJv`A?@ϜD$_4^ n%=JW,^x8ҥ?:k?xrVl9ȚNWXzq.6Y$E/HEK0.^L'Orp u @Hul}#B~?;@^YPJzٷ"ū\^|j~8;Ac>m3|2"WGLx.9̫؟wݚ`IK `g 'b,DD2I' ⢶wڢG\6ǶMy;c&k 2VbRąY,w~j"-;vp`JX| !!UW6 01G_iŝOmٓ|>̘xww&7vm)8$6ty-[ӷLg՜ yW eP3s=уtHźD$Ls3u^Og&N|C]&^/3Ν5>_QDDD`_887Tw Âˣt2ŋپ=iӦݠa APonM=4 d„Ly Qߊ\>4[;68I+e|vTLwzףCl[?%QJ^ øn4v ;䨅O]-1Z|O~NN'g =ja̡E,ֳS7O q~z:|~Fx07垧`y_kxWV\3)qY2'RUL89 dL4]RoӖ;|X̙-++c_SCoE !p3?¾ z3[Jn=5lԣ1S8yǟKcXwM ۹gH{Rw)POGgϲU6xSX6R)َCF0C̋"׿O |K̪@{v.#S75ż"B7)΢;_ x ^tH6]X-U~Fxs,qFOg25׉Ƚ~3\5 QHfYNEmgϜUG\6ǶMy;c&H'"""Alr5\srH 'X᜷"޽ZM}ǎnv\ ˗/!$T*44HE{[887tťy;׫uEDDS2ADn\aQtlƴi0""R]Qm ub2e4ݻ'2i$,EDD*+럖_IuYSըr9zY0 ݙN44 GkfZ\eee1f5T 7]V.}kJT rYD6{cY%RJ]0͑IϵͺqC]PRrrADD4U1ֽ_9h }h387Du$NίSI$v5Iڸ^Ptv77zQlHXћ1'GиAvAF&3&STWNI6MFpnhI T"aPU7^K ;Z= ݬ&)kZ1qNMNO=ФFJ;=V&acJȴQ TCj6p9Is{[Y*Rk.b7mW#)+RFC-er8:,ڣrkyB{Nteg}>_JQVSHMyT?(UTpqJ*dNXPc;as 4aM.ݐ)[P[غwMmDfzJ/O0#d*K^E=J1e;3>Мcn-0o Sm߻j,\ V+,\?J>s,W9 7擽?Z>wálì*ċZ13FENٹVF_dǁ2"f,%-mϚ}Xؕ߂&5;.ag\ qYO82՜Jr9,I$%k]kzRTWŘ?Bg9c@wV;jmN_O:+Jԗsg-fMtg<<0Y/݈( %IXIOŹA}szsK};'>&$D :sM]j^pxq=1lѢEsNT3":Ry<{v<"ǯSZbf)jhw OMQeP&N~ LbLF4-YE$LN]xgWXνՂR%()qsw7H]TdşTi*R&" /5>{{Vs<]IE&寋>֌ɠl[z Ӏ'Y%̭iؼ& 7[.~Y^{q8=4m׋>G@g|:G!""RT'""""cM'I, z8,~es&~_Db<;sz4[fKh\Qrؿ`T_>ZYQ}ND{6[;vqmr,_!!JVH?J0,94{ٺ e`-OrGz./CaX:o%'gJ}fӠ?!/m_u=u,X7~7~Oq-zX"""""rC)rEչJD*:>Lf-fv{/?AI45?g/+C lͩD,~烐ym(muNކFݻSx{a-JwHI1~k = H T'"ԙn]u!>O6,xa߲$t'IZ(K 42 RSHݿl¡Mx9ZH052ϱͿ+/ݨљ[rk8@ƱCĬźD?:TȥOD*nر7gXH?D^de;PԊ*;/=hgd=p4= IIgٜuqfm7ySo,y)W\'"q:atIWbJ,xl%?D >CxQyK/qcn7y[XddqE*Sm%OD*kZ}hS̿kۊF;UK =- p05E'\"U&JD* k߬+HvMp]mzҩ{!˱,iӝ}|ؗe'tMw`sjףO LtZmxY$cUT*fɓ_%'ʘ)XJ_\~Wk߾3{Y_cwEDDD❦ _gTNA4oQ]N yw}U$6D~=x*ȑ#o@;FQybYaH`ʏykpObAe$:i uMMf~UI9ﰥ ڷy'""""RQEXOV|J3Lh'o?jr/0L$"W-t%B>Iȇ3ooIʏ?c$wĖYK>8 ?H-I̚G?@AIm˝~gJ@s [\KF3AÚv@xIN|<ԻI@CZ%s(lK$zQ"x\V;T羷÷O0wKԡu=u,X7e$'HZ|41;ǭ+`IY_tctt.n?GMZ9^]l"')ES)D{p$~![]Gl=O%yk&}ONר 6QW8.ILtlVX-a,KGkwu8< dWЅO_Yz*qhl=gKoqD`yY7o_y׳#5kIgiH*!6hB?v}: V88)>O͡e ʉqhfOAv*Q Jn}o'&:0Q|3N%JǣHщsWQe5qƮI4hޔl枘w42ael>`9o,.>d=Dȼ(}h9#N5M8K#|'qfLiԽQ{"إ#_dԚA ^o\㕼_'җqEjV}9O; KϞeǴ {OV&:3- ǰ7d9c:$=ZиML.4 @HʿX=';”z6ԤMM1@^p7ٚbwp09hK^vҞԯ]d ӻ:XI߲=v=h&JDDDDUwf"6&O4"mTiI O+G{ CCRj WӒM8 X͎}uitbŽ&w%&%(fɎ d;D̊YKÿsAēijBY.5o*տ6&Q0ZTNj.]y敾$~_B3Kԟ)27>]YiͲAXtRiƭsmGOZFiDJ A[pe䅭bߙRKJiG""""rC+߻Yq`_.5fwúO#P-)-v=yw_{Ό\{hSڲǏ8lۖLj;7|hz_pQKNz- Sц}iֵmފkR\fjz6:W?NZW˵#00l$lj޶;1`Hrƿ1`)uPǎŝR_>&\?rus_mQԶR\BzR޴fs"ׁZF]Oܭw6S#KAj3+(H'+ہkyk`݂Ͼ/'1~N9eȼ{t؇{aDnbRs`d;cw315sX)x$""""7r-|`׷5 5mĦnJ0M[`%vS>{a[?aѤf}|zm %Z[Yu6&#o _̖Iٶ9{h'>?g cwSq,DNkG&A#F3Iu7-2hhL1PN)lbl_v/rgoܨ?בxe㑈ʵEbtЌc{wSpqNu[q'q L^oG_vcݙkZӢw5q2|?ّخR Q5;;GSЋ#Q|ǀL&ycJϩCŎۜ=_'q䎹>dv#활G҈شWק xj=z$Ë ~a;|5U5lL&ӯkߒf}o^jN8]Hbֶ%լ~>n>yQmʢy;Թ%I֐`)K]x$""""7"U&-%9[߆C1GO(bsNM-H4Ƨ+fNw= YӈW,ܔ58ށq]z>t*_>}'+I4v}}d㣧мm={ǫwXdG[GG{EG@g|Zw(xjM': 7 pĵp]MQ|oڶ Cˀ{!0}?߾O_t0{s+!~ q{ZѺ}sKM5\ޯ͗-=#=̚_wV$٫/w oO\j֥?uMGII)Fw(mң>m>\Ց;ȍK =U pr_$GAE(_ x ^tH6]޾G*gv瞳- 3'QzO[-[Nf$p$:U%OnxE!=ӊ}9.fTT1\>\^|$JĬǁr>i;~Y̛;a%;qt >b1_3ogt&~']s9K^ ~\E|g~_ ͚\ƞxMG0fbbW8vGBFx<{/>Xz7F7bogۈmLȌ%f _=yq؞,n_s^x8ҥ?kWܓطqq0I$|?gTA?@ϜD$(q㑈~~~֤qQz"Rɪ8⢶Ѡ?m۹6AE8z 9@r9ˠ&4oc\=ݻw?{o5;vqmr%,_SɪbW}<5)q>Ū*s!fwߛB;¶`X&bC׷^Cޥ_4uo֦w>eOt]+ODDD|ER{?f Âˣt2ŋپ=iӦ]bs+~O2N-iླྀG10.G„ o2ah&O~$Uqmm APonUJDDDD{Y+*kdi wOdҤIX,שvZ}?w;cƑȟS)ebJ+ZUYC[|5:b2gODDDDmJVTLYYY3溾|:n:fZBDDDDr럈PP~FJ-%%EPE'ũDDDD䆧?׆xd[Uv5P#HHzY5(DDDDDs6TO\{%E%"""""?/nCU)3 C,"""""""R T?]DDDAj.t?JL7%VKtof]wxSl*DDDDD_z/.jzZ*C7ŦbHU?+<< 5(6E}+\aЛ"""ReT?ˡxŦo2yS&"""U^<5Udp\9::;ŦoEDDDDSq.,WGq y\*ɯrS`&O~aЊ̄YKy{QIň+;צ޶)ȑ#o@;FQ\`az3iLbo#Ln)_l>ȶD'cWCmw&g/btz_O`[]c*K_,vn x?u'Ϯ: ..UPB>Iȇ3K[εݰ) [n#/b7& n'1k~o[ߝXXpAͻ?bֳG}]qJ/ml%/e/i|W_جؗ%bAŊoEDDDFV>w3գ+}|aM8z4^.a,w˓3KP"[I +P øn4v ;䨅tI-dx&ΟWsSy/[ 6{uFM`PyeEB.s10 od%{ޘ}ίLwקoП-K\ZVъnC[wu8< cqtNyŃvkܑϐ7s8?F_rLX kLbcz8Ųx<5Z9^]l"')E!Uk/ܶOM\FaYqA\ɛ$tؘו>HdY}O<I 01UU64э` {3K4[(=Gko)邷Y=';ӧWXgsLMz r§?ȱ?Z_2Zcwzl' hn1B!rj>=4m KN.=&O5}<<5x<븓ThECҶ}y#n5Lv=h&*{3D Dz.ND[d_bw}ǝ3xot&[JސXz߇9{VkDKpFf ka_n}⭗fg=*SS$h(\cؑ*◅sX%>WP5T8x?+[g,pyYfgeiWDƥαRƄq=mϚ}Xؕj<NՁ_KZ#dd, A[rN܁U+Eҕg^K%4Ć~XضLY1o>0#n&^<>6%o*0/'6fǾuxlG@;FP@ؼYL$H8\a>tlzwr"l.Et4[v"߬YkjXSQ0A=/A=;`KDDD*)giƚMb|* StBj vy}iYG;3&suY e>3 #&r;6GkŨM=ZOY V\ͭKEQJLT&ğYmQR̚xn=Cygp8^KT\BzRّ`D Mkc"4Y3ٵ~3g݄ vL;eȼ{tCxQojH 7}cd`maKْUI%()qs´w7H]E1!@rrrRpNd%ZIQ*G,j/cᎊ9ɍHh}IpwZV(!MeߚA~9<#vq9..pYkyzf,.=[Xض{h[nEQ9@q?- e;VX,^ⶼbIS+׍dbЈpwEyܻe[ɤ"""R2M^gݻ)gN]lJF|<'Kͺh专~XŁ sOz,Y$EfĸvkZӢn0;u 8s;{S i1"W?PBZ!hޛ6]s8qNuyyeE?T/ yQmʢy;Թ%I֐pt<6'{E%!jp5mVkGSSGgޜ٫/w oO\j֥?uM; $IDATGII`XO Z KծG=@: xN_`/?Bx98zoWMr %Ĭ5mw8rӠtۻ4  0\$5Dм4-+RGG1tR[ef4F]5J]D3AFP pDSD@p ,dua?&gy|7^jpQqVߔ( M;'dQ@ȼ/QLRd[$AS-韪ح* aa7X^nP_n oJ'I2yQ$e&=:JҐZmMԜ-9m5:TߦdOI&~A]_#J9Qr5ȋ_+"cͽf,\>5c2!(5`_̟oֹjNTW9ѿ׼DsjzˬroCB^T {5%qG w_޳VIu4zk̑D}UP٪1COyҒ|KQ€?>_O?RcE=XØ]R9m[+R2w|̰Gkw+:1VghW5æstp5Kͻu0wFR(N Ԩ毘nPӴ?\*PSO¶s16h&@\ub~*&+ϛ~mvhĪeO^ş*h-__'fjԂx7*/G:S*5Fȋ:_+ZE{;u;@4myma8 8.\@`,yf$I;&pP:-& 䛽_#2Ur_s.VNÙ709o3yҺo`l9uIt_FGlAPw^@NP2AԫAg]ٕ4 @^GZĪ#8^i)*P ;/W@96SU˞ThLN4* U S@9 yunw_sg?('_}u:j68Mͺ]%%J߿1A΄ ҋJܴQ)/1ݳO< @R5*~E`;AQtd>vd:r܇NP픗Gy&nɑjGk߈nz`S 4T\H D[(V5i+PGKَ[Sq*6 5\G`,ٮ})Sb !v)Cm6?Z{ݸn} nŪ.wR)OT(RU_,6"ee"H@/f*>= m={Q%6Wy^꾈δ i/R~DʏP?~&ܞcE+q?U`XvU`h]v?Su;*TG.k@^^TY\He޽h#@=A vG*KY3>|{7q-yPA|>2AR 0ԶT'xDR>e;m6f&?s}+*+Y6;q%0+L!zAH$Dr(ťҙ Ʌ@UU*P?biZC16zW]&`*T&mDMkٛ((zYeLA*=SyY1;bz<6n z6R1+ٯalo]Eφ9CbB'7'[[[lmmʹwRp3%11h5 (,(C?^a4P9ׄ牮 q͎b|)lQ>\/_{OjDβwyt6`}=ͽQq`Jf/#a3~'[5%lysiŽּ+_0-2WSϱyLېHnNr#L𭁒Btf|zR^Ҹ#1'm®(xNXδN"8Jxj(J¢E ǟzXXj,666h6( E[?P ʦFczt+FWPcnHR_yFfxH}TT,0 wQRœ۷gJKÉ+$[O}t{H 6\|sexV"K =Ց>LcV_O|Oڢ=|u?eD8: DK'/6UukfGSA7q{tAR_Ѣ#B4Ijuj&}-{?3L Mgm' AtX z.GkG你ä|\By.>+V1Q-oF#Ea!!;Jf!-ZĨQ+F)3bSeR": (***EQhR6D"{1f.R=}4/ f^Ull4Vywt(}Xh"mzcdk';Im帱טw:7rΡ=Nir4ђG؏o1ayz/y}C=5z=3g,plD<$*̨ѣmB~+0j(ƘGD bCEՠ{Ah "dS0J=攙bF)V(G 㛶T{UV100F1b J{\Q1vTHȑXa}j e#/7]ch1eL(A=iQV׃jMsטw{pPP/-ڰ!#XKPda]^jqdW,X 8y0WcU^ZS K= 5F%GUXλefV x9Dv(Bʊg2k XR((,@Uhr>QPXH^^.}qH GƄR6~):!ܓ-zb/o6ŽּK4>moO],F@jͨX"H$\/Faa!B ɥHWTnͭ.52Q4Fn"VkFFf}+q͔MX:tu%χ%5$a;U%b}+zy򢘨bkrDzU?Fܒ44ځ$ btzM٧ З~ώ>K5_#yHMErУk^kF{AQwm0eq,9BD.Y0~wd46(D9\O5,z%Tn4^ic5꼄_P*]/(?TX*"99Wy?03z2S0>ɄTLtEߍa8q"mےEfzu5t4Y~R/ױCQSؼa?_aŁ\Icfp"!Yg}mgz<+6 &QW`l"3G:ù tu q6Anz"Tl,XX*HF ?DuS0eQ4MլSǝg2٧ٹ}QgپcW}@[xFPyV#{ŲG#3i s*f'Vv`NyWk* O9 V{=sxz-~'; l/^/Rk} gJ~Sߑh}ĸ},߽}k]5W+1ocGʿʋO2v@g 7sPTRd9/lH h9$Gleo?LfhVűʳQ,x,SqQ5ϐ"E*[oa])f 3*uV檡\*YQ4=f yRbxXEcó|Gy_ePS:>sG238p0QQ:)@,T :kL5'b"JLAaF0\flo0J؜1<<9N\O"n>Ū֦gE\-mӫJ){aAaB\5.WvvfKz15RaʂB0%ß˗p|&:꜅ӚNBh4)mj aUXz +œ)U%QTYAc]UbuQNʜJ*MYXٟJ\/a@XU0/@*y*MgzٍުJEhQupT\gooqqQbyat ȅ9s/3RUkbcD"H$ƓۧH? E+׹q{mU4[`(<UNF܀Z\7mKmpRby1J$D"Tx]:Yi;DRP*7 ꍳ,#D"H$7rPk֓H$DrCyoD"H$MR(iD"X9bz7 # H$;]jlynƒH$Fc[f*{yk 'H#H$?ūAKt:k*n![)@)$D"]k}غu*| F"H$MGz@$3l[# ("=)@$ ${c$[ 7w)*rRr =H[H$DbӲ;Ԯ3_ kB䑻}5i-$D"1h15NxJR5(d.9$IY7FNHx7:uv;v.yKʥuր̏叒Fhߝܕ;u&8V)̅qPhSozOzPS| o>$X;Q$wm92?PF[_j0qAw()M&jS< %U/ IhΜyW_} ys8{@m8_+֐H$w!ճ7P(S]ǒdl/yM}0qV*_fPS"H$kWDĝ%OkSR J㖸8)\DIrGݭIk*5ƿڹUNH$d35M$Nopd}g(Bp:.,}VS~IahS( ᔅ5>@W@isI=M@=$&4S).-P6$~ź)h<{PϧE9x/DB~Ɠҧ{054䥞!ll + ʓRY7{.Ɠѧ[<]Ucc|vBhAocQ,Gá$T@q hUm)@w\j4;hMDipj>'Ӵ x4lpi2!N:w}/p j ֨=E1U4 .A\ԖN:DrcŊbtkH%e>NӿƠ!y\ljrIۿQb{VwɚN5> H1YSir0R>u I+lju"g`M&> [kzG3g t}ȶٲ-H'&M~8Su#NcpV31xu~/Dp8pٓȯ7y2  GkzԻvGc>5 aweYDܒ%4_^ v!gklEF$a5}CBY.X}Qde@ = HY&'>TW/[ȶu-- &Trkùuk@7/q%j<  }"N"[c04 e}oЕ&02r8.~6ݺFE,c3 [[ϣ{lCscn:\У#G!X.iiGmGȐS{"^.tZ`h3Kڶ*{=* H?aа.thǁ/r<Ħi1vI*8?݂Pnӣc#:D+#z),MC;VGupk\,NWk]M xf.]7%,"<o(29_auM!$wLh>#8R*[劊"5&t/Q÷.vFEg{-YWC(H[S c'Qfc#Z\ P(T2SS,8RAAÃs쏻hB$˧vؖ&ri l~duuGi^j;)0sA6eKݞ)UQ2vٜ<vbIV%)@xj)J%{o|?__ϡX$i9h/>5<[]rC3y_d9ԊA>DL Rte}cOypG ѣmKwBCY0ix! aۚn Ol?/=cl*®?C]-Qnh4F_N#:X1 49&K[63}:yc_-R~\#JM-|p9!W {O"3#jXV$#Y4a#'$"2%MiҵJ#kG⋗K^O;ԑzPUѸ)v,ȿU*DZ yfD {F_;$.!hJ@<5936ޞѓSz4;{{i j*APfvK&r_@w(= kl={үoPi=]@Sպ!ԥntjQFT_"h0C˻~o@ƻQ: yN~6wӣn xzP?ށwYs/iIgi"ǂhH;Zys~$ D|Cθ~`K>Ef9.$!ujQ 0w"g>M$ɋ6љgߘNVx88:KHj䶔ջ{#~ RLő>pJhA(k5coxwD69"ط5Y,}̢ 74a+€"B%зbƿσ߼YD/¬y`4zԲr'C/ˊ92AYzz?IQV*17r<;}l7M<=wϢJϗУᲪ?a>O]?Eيbl))N?&3Kа;=Z7T7i?v$`O#.5xf zuk+clh+t"9]j<'Р@ij@̶5?SD"'Eo]7#/DrLw͸Dҏѐ_u )קʼ>I$D"ؘSAneD"H$w肑H$,IKH$InD"HH$ېu$J ÕH$|E"5|J$Dr7btPۺ{{HZ:c̮rE̶5_# !e}@$7U}@ z\-DrCJܶ<+0VI׾IېX-^%=K!$^l[sU^s7ζ͓vx@D)8_}@..*kûҶ  &E6Qcr!D"HVDw;z>/+{&hoLjKߞ_h8:Cq hUm)@s@'qoԴ&5b_Bd_z@$DrR< 4siF>hJRh=]zejt=EJMF l|!̮/#_B]1H$w T[WDr|8 IDAT 3Rq>t1!5i8TܺСuXK\Ǧ[TLI!31m q/ߜ٤D"J$SQEg{-Yb{9_$~xc"42kr*OH$D [=Rwa+9W$-ŧnaTۦAQ ’1#ŇD"HVW {O"3#jX Wptv, 'nvo"%T/+UҸ)Iş ȏZMIJbMyRFH$7}3wb>wZ̾ǥQ$#u5= kl={үoЕĜIǯx+(ui@k RAd@w[ƋփQׄSCdaaB#$Zuqߘ&nYTĦ-]cA6wf~w:j<{tncEXե.vJv8yo=a_dB@Aјa@872:rs:"R|w{-wtצ2A1< suO훗VMˋĞφeo16שT\,@[(SN<|vQMzu\.@ի#+Fޤ%~?~;ڽ[UsIXŚeF#T/Xyl<ÝͿ(_ʖ%h]ߙKא&o"c;ޛ31)U$3 /m~2jY>|ll#hkd#4lw@Yoö`G8G6p}_PDfN!BT} =}Ƒ#kv$O}wK@ٌG+ӹXZ Sq.̡XD(N=;ҠݟGƮ(j;>y_!RB& CtK9~>禃(K~促gԹ|5mz9;Z1q+[Qa۟7GFwseIUԾGF!q \| pBW6Qw>CTA]BFLfK:XJIS5 a}ȶٲ-H=Erkл|1߿a{Ӯ+Vn'i`8 O"R̠ gTZ_HH5hjU$v2.gP|CUڗ1Iaۂe4(3ֹ3.a{T*~`3^a}-a ś}E%6-mN)=U.ys=fx_FZ"|bΗdn:DqKz2 =:u0_?ϓOg!nKkq u91bvYwƭxR E`7؈/Wk]M xf.]7%,"x2SB3Hz&0O{V^g]\=!؃4hqyb\H' -_F[~!z ^|?h7|4v4?~ 1g)_mعzx݃= a\8~ܼuEN4?#GTZ˽ (m,vg}&uK<5;Һ//~Fŧ}$7oP.gRe[4^R7Qΰ[su 1ĵ>+ݴWڷd|J7mJd@p)M"CI=tCUί: MQ{i5v1فaо1/QOs}[@MkҬGpy&Ԇt*fYӟ{!W=Dڡժ&t$x/,s!N W ǰOY0q6k?]wt'ݲul:>BXo4us5i*^?s_as g®TϘYq䦜&lEU!j>eV|2uFW2~-c[Y=1oc`gN4 ߜwݟGpPx*%||2~ CyRÍg&x]EBEPUtIի``-BU)+5 4<̉=dVthҢ7Nr'h=-}iybMijkkTaӹ*;=c3W6/E''V/$h X#gH9vȕGQpjӝ!ұ/m GeKYеRDX*O).l[s'-53~6J hv>цA'yzrSj½1Η4׏hd^OQayzV|1QvGdڿ{OhQ44ZGV UEQ]]omW/Dr9n2#y]߯je^is Q@ %X%?G-hX}m? G##!\ x9_F /{G'Zۼ."yUWFOdl#>G-y?\F}Qz|ߨzVCHpllwtFkkFEkk[)TW+lQPP4ۮRH$*ce6L>igݤY%;XEAѢ6岵CAѡssh4;9R{'g4L׺ɭk"VuD"H$Enjb CQ]ڢ $EAcc=Zm (D D"TZAآڔ[y;z<$RH$6H!y+r4=c۝Ӵu%K#H$]Bڶ棏7WUi][DlT|E_#Hn!'SXtL4iۚIKHpZMԺoD8SrݻԌi_RĠrN/M$9s1g,á$Tu3LAocQ,GJ[l-O6xdgǒ:ed.cy4pw@XF+-o*s`-رt]<\БH$)@nkli[?ħwkMQy,>afzԻvGc>5 aF$h w>CTA]BFLfK:XJBE 8hGl{- bQ|!N>+FYo!}OK\'ɲn6ٓȯ7y2 X=ˁFC18 [:?З^"O8Y*QmHm*F\[N6Nh/#ŇD"X8ΐvg~[wNJVSܺСuXK\Ǧ[TLI!31m q/_S.Es=KFZ" [dѩ =NJj,kWrBmFZ+릒w ۣPё~`3W\Эk]@$.L mWmYQWLh2.gpc;fZ@fw^x)|Kh~3 ?p  VZG2km5)@$7k IDAT72C?zIr (^|Z[FEKI =**,S_*S,@1b0QCa ^ƦE4u* Icx"uYPB~Y8g"MO F,^K̠̓:NI%V--uzR8\sYG%8D Ύ(zf8R <57{}<{ҙ 8|Qj5ůf& W/IHhȉC׹nxO:GEwٺ}>ROn#6vm8Su"㌉<^s},C"HiгkG o:jzjO44=7 ;$s&^k*c}a q3l8\~]BF 7q-^Udaa~j2Nx|>)쏸ƺ];-Pr(26n~4h̾ SZ~ %2 Tjl&KF湴g Ƶ~sf=ۜiE$ɝb]"VDo;%rz)>$T֜w)@nZ;-p72QB?EiD"DSzK7~p&NOlgH[Dow|u즇BB B j)"]'wq*;EE<=DTD) wB vg~$CB)%;w{ي^֧1'^&[rp =L tݷ Eޣ5obc0[\w\M܄Jv`>}0}& 12#"|@FR<ɥCiC|'|Mr-/>4,ů)(*gW=Gv;M;{{Dw{<{rQ(߲BE?wGQad>p4my}#8Ҽͯ%rJHM|ؑIEe<9E~ Z_Ά)0O0qֻ)l| ޢL+r )^/cuX%]i Z=u/qd{ _uh?irWlo_C?GuW M:c3S"U_ t#23Fdry!of) G&&Կ_%}W鐲_W&es4,yB '^ us p| !Y{3c&P <ƑK׷rC'<(v:M7y&{MR땵YS2mb+dtzV.mBQޤ=4|x pa..vQ1҄ߪj(h oFDߣ*ryPD8A@ /3 ([Ξw}ë`a+vrX`YG?29:X݇&N{vb~n8ɢդ"""3 ^[c:ڂiLٞ8q)4ЫY-VK|[{~0=Y>g0":뷆׿'wJ2N(.F 3n;fk;:ɴ\o6o~ [Gihv7)oʜy]ϰxw@ky.HZBܮ!kR;Y8#Q5F`tYHDxxkD#ĚR!5zcغEPZ: //E.gx,')*G`#8y/lz'~f V@i\ae̝}y".5cQD>cqu t>ĵ$1 5\|_op@k+sS&)Y,HXE?l-ʭd~_ú uϾi*n/ivGwpO"*׹.={!''u|9SJJFc[qErrA84g2>L'x8xc^cZn$<|NXln/sTVF$NXGGƿOUNǥc(عB݋x=dQR~ o9?yh16VjHw|~_nA:ک]L5Ĕ)0|G5&MY~'C@EYdln WMڸg;~ l!~j26z> #c=K>{5~hZ{QG}-8?|0Q6sק%6+{IXGؓU5Wo"ɟ8f_U'\nZFz`D~3s6>!Sϟ?v`yw D]e摚ZJ6hנ66 WGv#5ӂڹlǽ( ԍW{ nz#mI&)p\8+vd},l̈́Z7W{?f'foK[4m[ŕة7:ҿ}g:wn4d7ϱ(冡yuA>~i^+]}M}Ó&ňk5s\ vz >j~ǏPOAR.p}. #tº֥#v s0eFkDȉNs9g󭃏ʆqYCNRT 1H5k1?7v!t-J)2JۉYdIP:hEmv2*_S,+ NcΏس)K=FYʗ?gSREHX`tm 8Kkܜ,=Ͻ &Yّjcrj<:z4i6 -î[DACy OjyAQafML݀PD= 0eu/K-ٽ76LVi=L1pݎQy̤D (vRu Ë:;L<ȡ/"HK·^n@BلVg1)6cPZqNIZjܜbfm`n7!w;):>GEWپ?ͣa5:.?w˖-*(ygeGdg"b ?aпK0kv KɭKH߾6rkwҶ+hI-\̾⊠q7hԸ)FE` QyqI)$݇@~}0 |ݽ>B\M desb֥иQ 6?Q#(ݴ;RLo Wsvk:4p."r)yfbiP Ɋ7Qcc (ʚE14lNPYk$:OU,S`Шѧ+ey)$oaqaUܥ?}w^9|ć>nMklJrh5d8+67(^/g[l7pVܷ ]MQ=ғU 9kAp(l|æM  9$&&оA伄7۸ܟj>yl#>˶xgQǴڹkr""0=}ٸq=o #3w¶|ǰso<lhԚT0SX6qT 󮰰\+|"""rDD<ҭE@Djq*}ZϏPDDrq*Ue : "m*it#2QNr.2bĈ?SDDDD^FF """" ""Û͛_V1DD. 3g` lIGG?:]7Ogr3w:tl>")˲udeut^^>*\64e/ |RʈbWg(-Cm]ĢKAޞ,^ORJ:9! {4]XV -u{I+_?{gVf~2 )wEHvߑ^4s⇭E4z#Zi99[ȑRR2Z_H'i}bJ\f>e8݃J'ag:Ӟ4Vs͹l9Z[ѻ{sN0=|[E~#ig3אLƗՋkomogŒe=K ]Gf&,,1#GyDЏQ}E6asn]ikƐ'Ĩ7sDO1l,t>Ҭ@Z ǕQǤ`o,#VDzDzL+~'C@EYdlN}:l~%cz `ߴ{`AKݓ/Zd `;zxێb@@A݈x5ڨ!G7<a22k;]6,X^DH:m I&1i$B@Bb#m&Y@s8Oy[b6LM)Us^x%53/>ʯ&I1bD̚ 9wQ=DфWX[47)4&ij &bѱVSNأDp/5k{GFA3֭܃L%~w6ݮ p Ci`[A4?;lK%3^Qή/>ˆ.lfY$tRpX 2IM$?Q#(ݴ;RLo Wsvk:4p3ͳcAJ0=z55/ԴtRӳ)rC`P AU?xn>us+"I/ߑa92܏^#&b`ٓYv3ixΝם,S`Шѧ+ey)$oaq~Zex!aylego"<&x7iMg])ч?|.yk>qk57G>QQ_ ؎oxîF(Of||~$W>g"dGIJ~Y4kKr`oGlȟX8IKþCU @U{d'rB۷oM0,9sf/HLL 7>y=UO:6lgzFuL{ }vƍy뭷T,(;a[>cع7}Y}\64DDOVXX?BU9""rV" "5a8AZþC?Gh"rAADDD9u *0t_ Q xDΥUd*QuDDDD;&BEQJ fx=ѧu}J~GbCu='H(*B  z>>6iXe.zL–du1 ?Sl+lm'vxZEDD.H6|b|g8 8yY8-|;}Wqs2ܾ1sSꉈ(\? c݀ŢhLd-Nti;5ϥ ّ[LԎ7N/xMAMohXϒbMyo6^o{ ,NHrhƽ<$w6#o 缜ZNk^j%R%$y6|+;F;iQmk?[F^NUѤ n:9G][۩7:ҿ}g:wn4d7ϱ(冡y81pgcvbN^n>IӶpc;>[#ٸ-$mߗgLeo}^GrըT0h?x1-i>> ,|CөiU4)X;E۳pZJT IDATE|;驻0WRQ}VL #aKbv۬mbvnҳ2Ɋ[O~ómBLIٙ%- M/g1s2+Ar21dt9s CFުbz@ ACY98KhgCL2# (vRRX^xT8|nfƒx )ib}Du@XՕcӲ vUf w>LQQc7ea CD= rQNKűy|B#OXXXIfпKyz)ޙoBæßK{v#@݈LDD.%l|3֗ p;\o}3ţuDkfY[g2{:x """y!(>.@\1w Ñƶ?bjؕ7gS 3e<ĶlL uNgKB͇1ciR"X%qCMAQh`#kSLZֆu3UbP]Odݞ k֝` l;[G}4`թzA@DD\q;()s˺8z;, ˪wèQ;q;{{wD+l5n%Ď'lz8 z69X6;tp3}Q^|0J(҉ oN}<"Ъs ~e5~f6o2iqk;3eRQsb4<0 "nTL1*S>*g;"p!q%|[l6ډQyNNpX7S*q4?QЋ3~`[##ZyVg5$ ""rӎ~tV|ƀlL0pUzv_zw׳V=vnͧcWsҳ` '_Ftˊ^+{ ~V"Bfn+ṿCGh^sL """'ѧG>#i jM׾H>WY`}q$?v=V׻V ǯ;:Lih 1t(ÛV" Zub̏XPf=m:ac<2۵(ȹ`&eb:YUml\\6 [omwݚ䗹[q ggxcoÏ۞皯?d&ns$W4j;<34xx9^˄Ѿ}CkM_}Ujx$naߡ*d6]8c:RVRtTffwW7wlv /SWF5:Tƍ'Ug>V;z@DDTZ6@DD6.nW&V l100l6쮮uE@DDD*„a`ٱ\&+ """BP~0QQ9m FD"0uu ""r"""睾J.E"""" """"""""""" """" """"""""""" """"""""""" """" """"""""""" """" """"""" """" """"""""""" """" """"""" """" """"""""""" """" """"""""""" """"""""""" """" """"""""""" """"""""""" """" """"""""""" """" """"""" """" """"""""""" """" """"""" """" """"""""""" """" """"""""""" """""""qQ DDDTW0?d """rRCZ9s- """RMs>4UDDD;QKƀH4k6Y=4ݻ=yDDDDjdϞGWQٓ;aʔӛԈe٘1YBBZвeK}Y̱C """)/_y.+l1t*(/ϟ~xիZ(*:yht3z@DDDSRMo""""DMXNq*鞻?d[ȼ@.0.ARUM?l*"""w:s%qUS> R-&MnH`Tcǎ kBYkժ Rr?~e[Q1DDӇI&}ܢ"5ΧN}*đL0~rgsG7"ۘ6uuI$j'l#w """"""" """"n.rJXcpwMt4 OF\ O4Oyuڂafld8- , h&ko"">ko+nؙ۳~GmV*>|36Rׅ]4[X[!c#yB.rit@=qZL  "š[Xl3f{6tZl횴'<) ׫a/ټ5t\‡O&кE+ p8Ocvqu(ع26MZZ&A6?ob64(u@``ސˏƀxɪF1e^25ZMŇfp)w+mf.CcS@ ?ծsO@ {{ZGFQoF.ʣж's^ [Eh4 , ӂrNrEIY94\Lgk9]T^ wGd=/p&kwJy- kR{<<6>C75 pSG.4}){}>>Nb1͊2M\ /t4=oݖf@nGll9uo j߈}ZP ')g9Mk #6faFjFu@Nv.|#cPH]+7aQ{tҏWvnƓ #h:}IB_xlz xk[E,}<_àOҫDžm"~_ņsmqK=7sдeؙ1I }ό&"!p &cz SxL)a.3rRWƌɓ'Y6;~kN} H/rcT(H&!ɓX5KJ!= m.eXl˪W˓’r 1, w7W^xjʡOx6 L+*Ɛ:iV1ݙj3C"qrї@SXWhѾ&/Coyn{]Ys[;K7-Aϼ-%Ki6~"oAOW y5~_4~PiPu e r6m<q5 .z2ttbfE,9xBoZs+ow4kqZހrgmnxk`DpƏiUy8VzwoWq |iO!N.]>y#.6pՎ OwWjyc[i+RѦew >> 6CbhdݑΖ0~q];`U,]VL|ҳ ع?˪#R6#8FAZ*%GdGL_S㟸h9Rj5mcZ AtͩGrr>V/(pS^x]lHN6J#x/۟΂c><ŲՄ~o:Gg`ChEum6' [LR~4Dվ8;+J_Ӫ4gZ&Y1򻰤c3~8ꌋacQ4ZVlz=ii+-tѥmԂzVoLԔ\>´%Su!,NF,>K63IWF1gFvV^ß /!/12~9pÇ=;3{jK߈K-/gY*}geȨoS3h< x餼Lޝ҄%:kQPrQB/ ͪطj^~ע%>f};\n֗Rb PFŸ 6a ebQZ;es5# 2bY3{m#~C1ߪiq5nZXTgjlT-ve綍3_]mOEӓ|*;b׬ݚL^a/]+Jס%eNxrhgke)dZ\W˕xvlG@6lGteV;xDngY'fҎa7BT; ;1sEE̹f:X{ M?{--!.7]w,iVnqxoU!QӉ#0|RJ $J3Hx/ïoI;/x3'fMWگW̼d LiQ4qqڰʜV\lCL lJJf>AujӀHjIxQn{`n _>?w;z\brNiD}{V7 9pwGгT޻ع5ɩ l6NC7Ak#}4Zʦ3cnn+&oh}ڑF\AI`ߟLp׋ݻ 뷰~&mN!=N>Ӓ ƚMy?Gk , IM; 53V/YK(fPaG6£^m'7Udo,cѰ_7#AbP7=0|{ҷw|:Uncc_9 ]n?Ųߕ=I [ IDAToz$ՋmQFޖXR`9A6>d?uj_T#H~G=co冇8O7NڣRi1;hnܘ#{B<ߒ6N㧙hwl5$/5=;|UC+fhH(%wȾUH|oy߶bԐVۻU\ ;c`lCX=;L9ᮩ^4%Dr/{c& rm\siW?Ul+Nrcj [g|F&A'x[xhXnϢ]tfZ oŤT߭wi}:7/dPĆ} l\lwnj\<йQmi_|vCN e\z?'1[q['wSGj]ι4i6x~ϟ`agt ?n{ko~~jyq\ffxOxU]w7]LCfasqf0cmzh5FǞڲѪC^Jh{d+\}3fW_b|j5fXVox7g>ɝW_vZ8RΔ9g=iŕ;wyVuǿ9yzY7irJpVzY#x!vX4%hD QbdBhEnetIl26}׎αmɒcs7σ]G S.֖L8먮/Ǯٻt)\Ų,}{;YLLF)ށ4Tr h=[v,g7}S.ꏲƫ0!- Ovm㾮5Kmt&6osyٶw +&=V_>ʂ/{[QJc)҆H4qPZKءbio:N<ʱ[|G7>G`Ïwgۚ琿"N~JVpݓs> 0YhN6g~N,Iƽ|>%GRJmm8N޾=) _D#lڼd׫=7[כ& wf&,n[Y]~M৓Օ;Km4ڶ/)~f?U66o?ϲQeȔF[JM6cǟxv=.m\\c_fk ?9tog2o٦R/8C>bWN~Tї/s < J_o8ugR(QZA1w,D\j;SDKarU\a R ' WOa,+S;ì|V\M<VP3҃a&PZ8om/6j1kv<ɚQunub˛9xe_?u c6;Bo_Cb.^q[Rw]<ϥO~'Ao1hccmo^DLk>ϲ,V4X9ahCnV"}ЈD3wcy/gi5rmQB)E06WPiJ>jt}C1ɈRhFks:x|poTЄLґ>]3 o,10#Gr 3$pK8k3:έeOI@\3- x8Nۉ<7٠e7g;#N'' ׹,662W% B byB eB!D!y-<60(-6 H$NB$qs& A$q'qB!rB!f$ B!D!!BH"BI@B!Y瀌-B!.2"BI@B18I鶳IENDB`gsequencer-1.4.24/docs/images/ags_automation_window_drum.png0000644000175000017500000010146213246707333021233 00000000000000PNG  IHDR5LzbKGD pHYs+tIME  ciTXtCommentCreated with GIMPd.e IDATxw|TUsg&${D  vQ@QQ־?ѵ*b ((ҥPB eʽ?& i3L"@gs{ν|{j V&   0`)bMp& r~FBa6TU~W̸Q~waXB7ިvOqA]FU4{SlemuFyOݺqo|jخeCkF5 wl{vlN>u%wmu;]7ӆm7v=k_l7]z{uڗ{{.q{NzԲG/Ի׶OY0kƱ_LWQ}K:l1 S{d6`^c]S^z랣Gks{mse6PۮYgnlA>zi#mͶkzwגǶh_] vqmV{wjܫ]ڮW׈? M^ۮ?du86ìP 0p݉у~4b@LXߍ:Tq@ *3W xN; ;Ძ\y6T?Uui{iMܝsˮvׅm]5f_~{Q]# '-F c5; piZⷆ#pQik p}^Gv1Î˴'u`:у4-ONrwy^F"ᕿ|h/4p6z]4׎0 UUMSF fQo7X6ä f (IH$qa܈T;n:pDy%L|yUW~T.$M~(6.Ǩi<W.߭4I7pm)wh?

zMo-Ήmi 5g)Y[NYZRH{1Yml6gZJKKX,X,F FdХ4EML@ARR <0AN& !מӏNIy;Y>K}:Lr W HEY,1ַcJΚoa{EnL8AVxi̯Gf&>@;X1K^|=m#(Tng [~zw2\sV?:$ßY]d9{yItּ<%hٿ  ||>]:GkJoO`r]9o:[)kk/1?& @TN~z !Ri B#B=c٘1c;W]U-fKKK1ϯt ƺ'T*1Zaj-Lf3&ihʄR= yVkEǑꏽ ed;R/ouܦ7\Mqq05g7ܽ5{Dn̿ۦ|WqrsIlEd}[DR߮iF|ޣ"9x(Ɋr C;R'q\~/2Ӹ衞ک尢T(aG9HvR7Ң4l.İggul=P?X-8}0rrҍlnq, ݆rXg6u`Ϝro^dpѧk8SnxŝtN9N#\ކG02O=l썕7Ӫ(h/I$ۮ'χxg!d=,^3_Gd~Aϛ-42G^D|^˧QW_GJdVɝ҇wFr<ڞC<=y'w-, |:tȝKk>ޝ8q"x2]ܐV+v)Z5&lʚLN[5Zazz5"ޚy0?[ &}l{Ǎ:^[\# ֑ԺMTڧ~V^\ʏ'4LLݙXx+:6bj똷$nj)JFs^t55*?{OnD1AdFYj}S$GignU ϿaP}9Kr.C`:fcZ\u:;j^bNvv.:1h!Ã.Qweu:0# tٓDYu49:ؔ97[sۀi5b\`W3TE}ohMJJt7UiXh(&Nrd'N$,,_VEU+\<]^^FJYY)O```-, DbN~7k {Ulcʣ. IUy,}fn($Η~L$BP?7嗦~z"6olÇj4OË"'{4G?7Ms;ʛ[j|kw"҅5zz BS%Diǔш6*))9qf0iҤcC."բnU]CCٱc;7nwQp@ ' ]x<3<]o% ײyB>_sMǞ'ai6O'Syc1ػ{/:v39{ؓQ3Ys9ow{Y7LG}+pej zz"Kg5ó|;?qxumڑ`-|Oa]fgsUA8x݊ɓA ӔQII kkI`yӧO!ڪGΪ5kZëFGVV\{5YY,eqEd=>۔&|y2Oݞ^ܔ=]UA^|fa_WSOioH|J6OA&uU&kņ>y>ev1TaE9,z9ŽIg_&I垶g\:2;sNc4;mW/5PΣ0jeXQF@(<},zNf ~s$ gMk~U,2^U'r#O7}^i}kS5NeϞݬX;vֳ}stXhXËՆ;r'?4WW+?5  'SOɕrV~rkD 4|7ѤYӅr]P>/˳M?/ۏ]TEM=~5@* }^9{wW_Dut]0u:KFvn   ͎J3Sb5K)OsNi㪶F_u<_C Batdog5bg6k_thrAAAN$*W-={|c|1AAZu9KgY-HKق    CŞV^-AAA+Rիa! Nq   p|0]>3E99mAriWJC|-TmMA8~1y4pT :kdik YS޼   NN}wMoџ   &!;wOAᙂ5AAlKђrQti |ik ‰D)袶-&f%"+|Aj`*gž PJ1 AAA(.[R4 BK/$66VT;R/gG  "dO4q)"V8YQJCBBƎfc݁a8  ̑u!d$SVZdb1o700L\N}I  Q\JDV8Ys$&$bo}|ݷvbWw7\6ww CsAAD%E $f܃fFDzeqf6oW/=u?oJё\6+kkFRp(G(  =ťDdWѷO_W]1^{`ЪU m Fb'7]7Oq  ""f0C)XjIIdee1d XǏס$V+>0=W)  =ĥXdgF2Wyco%!>>}ƶ޽3'.AAD". kOߎ( tt܈fAhi?=YzH,f %%̛?h1MZ}ac&L|X(  ӡ }/%#Gf΂q1[h;RG8ʋCoYe/'&L{^i0 ɂ#0 GH zdkPDC?~!Ikh]RONlزWQ Cw?D`F,z_aDЪU+xp5hǮ;lמ#uf  prYVFh9B)ueB à1 RUw V;zŶ奌\!|ΏدAoزmD? x+* Iv-6%)cдc۱Z+ؗŞbA)[J7ug麁QY_x[ެVt+FRp}J_2L.'4XߐLBC{_0ճ"8?|`C*/߷[L(AAA( lAAA_mgxRz/g˷z_l ->((,M4NO1|]AIv6mVk?}|`Ѽhz=9e nmu4vϧ]w󟡣0@4lIv۸ Y` jrL913hݼvz9bY9'vᴅrhn٠v 6!(1L&rw0]??ܷ5,>`K>Ie}UH*DD9y:zK``7]w N=I#22 ݷ݄RO>7M  pb Y^FX6%'P{IIIYY)y+q(u,jԔԁC!h>Q1(f~Y#%?Ogq`65Sp ejC)nsF>ՑPFYE$%ѧg""c\.cP۰lU i;OӶM{ {h=NS ^Љ=~B:rGqKkm7rK7Qz YCuuAiq 8c$Av}3]^r(ELL I;͎o?v&b-dd~z|Z}Ƒw/rs %G_{  ' Fq$%t#~VDYr_l!lJtT[Gĥſ.mFyE)1,|*F=eVmVQV47YPނo"5)#|wT΋UW !l©O]F&l<K4jPa-g?b:Jn``!郛[аpɁu`2^T6O9M)KK%p?q)ȳK˸mtG,mMyә<06ȸLjr:a媕{.3>̰ø t4L~~֎T@n!!QZZ=Y(+-fOS8?{3YFT;fNi+X1YeGK)?LF=|V]̟!l:Sb4Y pYM)w ߏ9:BaÇeC7<X+Z@cV`Zۻo=3p[h1ԔV>aS85 IDAT80P$o7)(Es$onw2ߏpŗ2w\vxYx1 Itܑ V+;wGAd\"фFDsBO`9Y"h( # iZ.W?C,y&yg%4L0yľd] 99[u cjea![o9XDtItmcv?,K[A8-$;dێ,I8Ot0ʋѳW`=SLSЂ}UC@U ,Vlտ}.'b%F!00Bł'fhW6 ,TALݱG;̟0 kiق\i5PJmY.Vi\shR[WvӄlS (Led0>bx-ۜPPXf҈ObZ63V-G.7l6+;veҶᕑrKSam|S[7U gGf3nj珟gqf4.O 4 e%px1 (/)L@pH#% Ɍy/J}swwuɗ֌ؼFNb|}-3^K'sq|Lo/#5@fAe1Xc:Iꥱg``V9xtsA]KM)gr/wr=ʈ#b5sk7naՎB\y NݨhnbW1 @ ^GYYWaW?![-. s@(/Σn"QtxCd1~0lW4߅l0u:gRreR5h!ڶ76mbi).*s.|9Yb2)ݻi)wNCشu îO8`8&2,޳䈬aؼW_+&pŗb >oϢб$u_>|;f#,*H1^i?P׾-;Xb0⻞9.S%~_=nX~> 6X~韱~O)];ic"v̓sXEsnYiz^Z՘4n|/WneU);uo:^Cڞl9JjMKnet4d[RPjw2>-v,^~q̩Cz2Ώ1{ob7|UU#FLm\>* d +?,M2GX1ɻ]y}߀_Y7`//ɦ!i6Գo~ w;(ѕѶM/\N%NӰwdd>$<z?~AZX[V]8E۳SVVJBl<9?6IȺU١C6NIAs_3ϝBO(?Vݥ\Rx#D/ߋIC\2˗pKt>c_CiVrIðLXDJ)~^þ"bS:fZt)|\|J4~Mi(MCS V=GQgW #s_]fFm֮/$701фsְ|?GRGx"N#̆[HH!Q=.{OX4 t x ['U}X$<@>}l2q??naV`廹 hٙWF\jAac !Fe#xF˾`u$!6><[p''ML)>^mpqww ̺w<ے[޹ Ē{'gqcϝ×k2HO {k z5E*n }?|6>;qÀ)65֐Ȫ5k${W-4NiQ.s_3Ξ@c34G"<ޢ T<J(#,"bpa.diAErҪ)~sNkWqqq(euɷJUDd21j(L Ʉ4z*agZpi[߶Qp駌>synՆ`1On9Ǧv߮CRb}"9޷x0 $:Sq`|1J)z_p#hVX5X})Դ}UרWM9U$\<`WsuI:b>8Y2.7m,HP ;3 v,yd=ȩCV 2K7rToՈ OL-|z?+cҷ5`E)*8% \{hG"e3,XŐ;=F)1s &ԇoΞ;Gn)[% K>=෹k޵&J9;gFf8f y?VS|pG< Ow'd Drɫj G[8%BhN"?f͢{E~.%z 15| ŇawmMA! d `%.]LPb;B;6-J\*?WvsG:*Z0r[yTc} J4{CXb *c6u:z b&bcݜKٳ@DkIJػv&K Z1d;{s I gLP`U4 UBVi-p I31vX4 FŞq w_n@d={ލe+Vٮy`efdŞ%+RJlp Rp yجXR!2.8NTDcGMnHl}oNp;4@?CWrGuUd!99EqRPŦV$UhD pTy)~;_gֿ?XDR\tͭiw=ú7ڊI*X g~IJiG2`[e7f ߮ߓ|l Z*G|Zt|L}&=P\x ٙᓐ5׾G%Ķ/Dcb رūtyXHB<ؿmMA!zE E[~xfվ?=!3d-cϢ(NxN$%" ň#j +S2ziV\0tΞ 7(=]fO /v&sF@ٷ 2kFd/?+ԡpt؛6j'uHL&3f9R9P(Nje%ݻٷ NVx ~#Fu 0~M;zHv<;TQtM "dL ܊p!f|>C" 2CdS&^ERlٺo#mx7&.kv8dNXx4A`evX#{X]Xw3vבZpLb$,<ٿ|HoUJ͢.{)7c=1쓐f6U[V+ O][dkȯ(9S\X;Xz%[0!4/2VHF#B+RJa`yݾ^_ي\JvUBkVtvVDqE_zf!/rw+󮺃8olB=C@` n}7HnΤ[$9ȢHqSc<"2RNΗp#|'eg SYoɧ>^[ز(w Tn~ZC%rօx7{5,con<(QNPAyaN92_쨌$heLUr/[cv"g&qA~dV:7#y+%r~L!,,;Ρ^ yO,FvQ`-İ[Y<}axe+1h"]VvגZL&e :٬HOa3fT TU:0b]D!߆z!0pTuXb%6<Ņ/<3p8ud_x&((yD|u+ϡ ->+:ad쮙|2s~>1:v)zLȁ>ߴ ToJ'o~c&QeWmW ؋|ԥ3=Cߞqn"{\8CCo35a>vszF|L{2㲭 "dn(*M6Hd; ck&""ظyQi]ߘ9ҹ"riI!So'tĊatlEcˑ^Ŵ˟LZ5*(JpxfZ^48-?TX/_T kEr8r@sm o{9iJ)iժ5Qͳ5OnJafP7{~t; m~fY2p=+:10(پ\~ jҪ:mM{(]F1ᚋ*KtsRmkz_W-fsW- bʝm#.$a˼q^|{ Ͼw>䵻^=k~d21{j[廗yVCpr{M$R Obsu_Cx<11OkQ`"H67tߜqT9yL zT4 N}*^??_TAW04UlU#w*}z8o2P!۴& 1=2k;2dnB̎DZmlڲ(͜ y]^T\Μ/6ErۛrV{'"ZG$$ c-BhD[#0 { H$)eF5uT*R5"0 LV=ԺsdR`48-)%}w?r%C.i~&mڐп??1R1v8ϛ}k6_~MnO>4 Z`u#}&Y_}=zTFlW$8EDOne0` ‚Zɠ#bʛgՖ6`<128օ0?6+B<`f5Np75saS3S?,Ԛ飇2- +ϋ8fkzc5ۙo 6VbI17O ?"dbhsmFLJr MtvAtT4ٻ懹N0՘ZK8 ~!޻vT6=M^JFޕ'\* Wў C'wRt[1e±Yp/dcԯnMMdU)ulp 4u;l6so[s9ǣy{ی`zL4aPavɭ86,a6d0ۿBVGu_|ٮHd8X/"t =3s rʃ”^&A>OfOp6 '5l))lBlLEHlOvkK~SUת!5\9%-riy$>G` lE`h{9y[HhFavrK(+d6c2[6e< ]uꄫ.z5ĚhW|ٚƓzthϚgM^=>peׁaPvd;e>DΝ9cĹ>OY4tRMbM$XSU> *ܸ, p Y ;1}/խ3+׬͐K)XX_^Z\FuDJy/hp ؖJjQ559t*!fAA S mOQI.1uպbހʡYoaaIHgӭ_\r[VSX/[4d}wcAw;v&`y :ۦЭ Zr/GabC(ʸcի6W 5{DAAD֡bj۟e itEyi1 l]qYƪ+ӻObVuVRְht"ai0~"+% 9#QfRtk LA(̈́V9l @QACZb>CthcΟJ)cR0'ub[esMnͣ[KםGlrzf=*_yC(lہCOIDD!#^Gn"ko<}ō3:i2JiWcsFwU|ܼjvDAAD!<:HSe;B@pA!>P-.MceA3o>p4tVu[)fıIpXÎv9{UWJj2b2U͏mP^1q$evǑީIL&3q~~kL)q.EmVBB # (DL|Nyi1(M#-40۬R`,A.߉KF#> ?|"AA.Pph8~YS\*Q/WUӘL(>WKV%4j[W[4'Jh.*  p1 Awׂ  RK (%늯AAh@^ի.   p0状իZYy-   ]zGƧV]wv3G'=Q'LYAA Y}WKn'~:k;g+9ǽ=a٤ +' 4ؓtĄٳ=Od 釴!Nز%C"AA+ 'hgiR  I&.X   %bg  YA8VNn /rq   ttyMl 4T  YS$?)NqAM) qKj}qL&s24*%AACV-n'r 66e+BN~;#Gx٧XvB'm;oS'AtXy:[ƒ2c GR0*ݰ-Zhei-}[?"  &&$?|l6;Sc;0G,tq(X=he5y[ՇR?Gg潽M߿vi  "d˗ycᢟ:dWO.>Zo=ܘe]o{ݭCĠ_7ؖz.'lfg/UǷKvM՟rѵz)b+mw~\rgmC}G2b%ІV37lNevgr/6M6C0J#tx =ձCcA^^)gHjcml|fROpn  mYq2r: 3&}9l,Y̆M ./ǟ%227JWb- 0]*EVc2rnb\ā~qܑŊ'*$-6?B;xHEnc{]umWI~i[F7m=7fEj]gRgֆ0,D\~.G'_5 zFgã6߳-SB &XP{QbE@EǂXP JGPPEQPQ@=H[A H6 ~Kdgg>ڷ4^_(}L3KIiז[WV,Ir/rdJ~:YumgsFkleVslRv{}nW^)g^(լQCdmJBM6;LV%H '> 5R Ўβviw(9}_nyokʟӧv8(c?/SmíCqr{<%!UuP;@VE^ ?[|S:d{qn3زu`b-1S[RRM溷[(jԷyzMkڙm6|xv"/6N[zp] *ÐXJu}v]ڭXZG٪QC?,Z,q IQu"UXXw?Xl'Sq,8kz΍y'MʦodJ*pS#X%[k[r57(|ISYa l*ϐb=_J P!5UrU{Rkg:ьEvH Wz4Yw>C\zYJ0躗ݠ_I05K=׏nVo,w)YzX"y\SCԪ:K֢ӫ٨|嚒,n] *T ɐ\A8rȷ)Gł/* UuiϴjvH=]?i?׶ѭF:[k?{R^K}:W&_|_7@vfk4TΏh:w-]]M[*rfֳlU|;Ws5_/+GRWؑ/7齷TvN|3_.K b((8Hk׭QNn .-GZ}OT=qsR o|mTrH#p-Wd r1dDM=UZ=YHw*I; V@.kc /o`N7֌VMѾ=Lߦ`ժT4Hѡ#fNJN?7/;K|zuJ{{zCKlNnݺZZիWO. ')3+W5֞}դq#YeA,4Ŕ3i[]n kɐd^ rq\u@oQ!5T')VTJZVCuI~>Ѫ :z[%, U]|uWG}֞uJ{ۓuꪀZᲇmq@5|#*v(_fp+9Ji{;qZ0S= lVmv׾KTϿtd*LɇvTR54J)ߣY￘OV!LJ*Sf!}%Hy*I*Ϋ{ij>zѲ;g*(,PLLh+@S>)&*#+Mۭ ;rl~'GF͵V}2q..b{JӮt*_O)#ƩQnClf6Jy~|F˟;5A}w䜪߯ϿǞSSezR[yJ-:6RFtc$~c2Vғ;6Bei~~v~y~9nߪo帟X-}g~*D9dZR_j|}|d[~F-';BkH;T瓙)u@~Ck74š):$C Y2s+_z><.>zaWN(%&&˹r@ y\C׻N>.բPzzE/~M: +Iy9:fNSVܹônZF })_\~?з?Iުg媗:g4^=c UЕw&^(.=iIJĨqpY%kuW:ӘOf]+ب¢:{oQZFK_絙^ŅVHp ؾnժ5kj5eV5iDؾf?ulN)QC{└,Y||de7G('+@T∬L nsݙCejH ,O6`#Wm[mjCEKxD铗≉ @췚1eݒNcmYz<;IY.iժ&M6UKz~iS%Y*֭$%$_5k(77W>N>}Ζ9|8*c`D@5G-GA6svuwnr/ׂokʧ3r %T)%&(-5MS2,VAQd)A9)Pjj Cc*E֮Du9RSSeٔf in4=ZfS+oQXeXlyXI+giQ2MS9yڰ#^mլY3e̓f֚i*]/cHݐEdF/#(Be؏XIլnuen@a{> ͐dZ,Z+UngFP&ﺔ"TSL'A?z1zd{vA?@xŞ{{1.L R,Y2 C+˺~2 G , C7=Pݯ+~ͺ2,^$%mu|E?G5Yrbtۃݼ{\#_?h~L;gWNA"W޳ϨN@(D)j~{{AiSѲ}?t $%}c$>v^vLUҪ}r9soɵE_q:3{rS-BzJzʯX!E l5qI;UcVQɯ&F8t# :zjӡ*+έ(8WLU{*UrQ #8Z-[2#Wᄀvu>ruHйBO::IVX.Xᡕ}yU+,Hlo{r:oO|GTC4he\b.hKdt&lyW Q(e;(UGVoil-M*8%O^*ʆlRd/ފCr&C.Q]n`CD*/T }{o쮰Qvj3U-lG&WW|[ѓf+z07Qj>U1g78꬝*>)-'Βd%SLEsM.*fת`gq '}W[z'oq?Q}{j0mb ߿oݖ(\Qer)c,׾R-g[JPh6F VnT  y;ɐ]ުp:ǺoF>mDaW*eiQU?Vi߻Kc_֤H WS?~aꯦ}Wtr{V3?WomXmxxrTCJhW6MVR?aq yV_*+jwU8O{]njRNV$afGjݩ6Yg<۶)'+K^={2_"wɵ@/lkc)g <t ʖ~O;>yA6ȧ)`b\W|p}z\^Tۙ6UHS9g/]"Cʙ5\ 0T=*~oa1idatJ?mW%E4\CotߧChe}\ȰioEɰ*gƧ m~Y)TJ /bGc9*}U(FQ269iUR[缼d|A柣,SXdoԡkޖ.Uߢ!\I}i;65~bg= &oCC?|q*xt8vR/GkM԰-#^GGf.URP][I6)E;>+ܵQ)TNu=c1ޣ|:_|$k̇Hpb)?4R`^/Sn9W&VyBW`,eT.Iʘ_u8Gj&+'vܙ܄22#N\5k,eĦUP_LP/eJr-\Wn{Hem͕=صlryL?OgR] 5jr}7YR@`eSҖeԟ:o"ǬcI!YT]̐;K|6 +2&'gߨ%EKy$G5_>Ea|dU(خ!io^?r|rG@EJ:GAmʽq8X)2UeʹKx/sG꼩^~~XZ*HW_ iءo39E扗r?|DA|TPGYgKo離潤Avg:Fvv ?<[c)GMNTp ?v;Nyq(oxjTcN:"ȺunIƵkcgܸv׎RfzI^! /-4B޿X /U4e,9\R^X'=)kH= >.9ySb=QX2ef ݯ:!9W/+;,[7vTЇX3I,wN&(>kͧ %؇"kٖ)K=di*Y%iז ;k񩊸Vn@^֧>L\WT8eʳƱCa=9r.3v2S^_) ,KO:Dɓo'yZ9#[fw R̲S|6*˟Tw8ڂjbfMɰ*L+yci@B>U ?OSƏJR?{Sauhs eQ_VA=?!~o:SWO1Ab*`׊iLY$kCd sSOWZ8U*(k1MsdWeOS[Ul=Kcby)[ӋU n ~e/jvEDiIyak'ӕ=۷KyA!!zazeԉ!?cKdMꩀ.u eo諈;V*0*dBIF*Wym+#K[Upذ_uɴ8dh( WpP}:F9fS{U-M!_.TS>V_YCf=G'Q:k2w>0teʔ-+k cZ\nmRn _O͞,ҝ7i'GhByr,Y+|J [囼XI [P7qn{q?ח~2hR>UT' 6jo+лѳsڸq j, ;Ȉz>I\"w33ml>{J[ԿIBY[Qkd3Iڤ)t,%Z: RT'S8HVεJ{m2(wpÿ*nYZ\:) JκOa0$n^,TҬeJjrڤ%{4\o?S^TGJ~C廏5J ~XawRPSm?Y*gS]9 xm+~Zϼ8J)2lٮF.PrB"e={a_WE L]9%>s[t3{2&֑ٶFHQAC??`!y Q<]$)s->ayE(o2+OIl}+RZ\u$AMK3hq9]%el!eE0ׁ|=,/zMع$+?7+[p@u n[@Kڴߤ!_ThXRӴn_zO<{,{?p+erb*fMSfOʲR#6lՆ UD`tlZ3|N%zy͠g%,Yh߾(4N1zRTލv{޶BЬe+hѝ 55Ԉzu Tw劏]FiL[ST*Y$N_{{3vN[Lg5# R,YkVguz*Nzd3z0Um5?oiղ0M{lPYTh{xn!Oa!gk S$EP0" xfT=WkJm[ݢ'uӴ#uC-g1#J 훦ݭ>9M[Cj|zܠ:]翠-%`>AP*G5ږ/ɓNXkbf|=|f/G_Վk>|i>F^Mok*3$e[\x+Ԇ$ I-IjǽM#Ѩ.H>4ӡB*1[}i/Ͼ}WО=4n )wK3ܤj{v1 21BT#\2e+68YWڬM=Pp IHnՖCBfǾS P 13]S%#(P70_;]28M Ӑ^c*)Yk6R?Zsl4g6P&q?̩ ӜR ,*!WK:]ԭY$twh׋KKpmc5K#{Vh1y sdcЗok#Wo֬;fi{a.ynϞ(r,g_uO?L%tבBu ^'" ڻwbb͛Sg՟ɵ{wlYKRLkuԹ!Yw)?a6A+ 8+á05 tqG YUyh&>x&R Jl/c 1**9 iƌ 1ci?O dYq8T_(,PrvU6#=[ }%UaaW;MV`p0Oi??Oϸ|YO9~]=ߵ#A8q)үO{}||\-V~_ ~2LSjfS ),1,-XPFEM: PdYNnOW6OnO'*7%_[??ԧϳU+ ã-_QpfIRbf<Y@Ӥ[X~}oj-kpl>TC|sG!*G)[`=-T)Y@¡r5 ,0d4S03kwٟ;}Ş>ɞU A@ A@ A@ A@ APe(o!o@5mCZh?OIPVg~n,fL~_-[oXdZOd/WNd3|%G*ȥډ R`p0Oi??O8wnV.sdU A@ A@ A@ A@ A@ A@ A@ A@ A@ ApQ ,ѺOWշipVTfF5S='@2"i?vo+Oi??O"@G<)IGjO[S5i2m4ݒ"qحrح???.,PqxK9w%)@ arm'ndJ`L pŴRF5x&mڛ!c,PX[~eS-9FumTIY,lmuӍOˏQC\j (ׯ( "́>˽jR, Tԯvlz(@*[9ٔ# H2j7QAkox_]=5zia"Y=ڻlA){L҂85fnqb؛,PB$(z8 r6%:S;HmEb,I*AIGﲄ_kYqKi޺kM^`-2rQ xɑ={JyG{?KVwuVM3E~\kH&sd"e'+|hmlWt,p*!RGLUvM׶Yrd(>J,Me:ٓ˛G-}ɞbT8W?|vce5( :=y_}~%+%I#k3RY[̓=!zft;-zudMY!tnoI&WC;^> :Yt'~Ƽ[thUvjNu@eb?Ol"JsѝlT R=w7'̣wZո;A2ɵFMݾ? .c |黡CZh?OIPVg~4Ct '{_ W7G; ֏טYӵ<_ $SW[-Y~%xYHNdz>ϓ"]CiYpbWNdT 7Pz\O sfd W t+#}K(g,PNdOCa1 蠥UuSߋ4ՠA2qF.ևrp~.Ar-'A?xMpx,,PQt'oh4UGe Z^J,%Fܨ ҜJd/(dOn6eI?]#K,M'=ٓ'^KGݫiS*anM[\z 'sc-?@y.m6"^ba1zOkJQNNv|7F=M rFԹav=,zd}foa$@e8j{]NIR>{^{E~Z ;Ɛ"Γ$9/Tbхu⦆70" 5Js>Q-޺Yw+]j2\B\ ^T=k@\]{ik4SDžZ# q^<}k=Ǣy9)q)mW~^͘Q]!F71" ya%}5jm 0U' dʵtͽs`]q]QsMPY6 ҮEh u{Ù,P9Ybӹp,@*+{ xbe}^R* [µCsvjx#@Y8m^4U庮םzݠ.T- 3FdS[&8@k z]?e5׬!eB@bDwVk4͟4r^,/Y\;oPZY3A:7:8^5}4 _d*Atyzu~(N]$fS~ZZin^^lOdoxuN ^LB FD+U{?) 3~:ɞE@U@d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d @d) A, A, A, A, A, A, A(WA à@%v&8+i,X@L<dqXύD/9OY@;OPdU ӴxEE }P deǎԹA/?z_׮]+i$GPQc} l!IjѢ^x-X`ѐ!H;vnãupiqr)TA, L]ĥP:?pqpѥZ ['w#>_ϙ\VЄvˢlua$Y^]˛y43SZd1ԭI66Q98wνlb>znNOg\^ʤ$77֖h}[c䜟oOoKXX2~U]o_PgY''}y7JGK+w!B!B!n$TMYo*.jB!B!+3XU2^$p%B!B! +B!B!v0@yFB!B!dB!B!6d=Su6m-/R vG1oM|*OУN 619R(Vϓ;Pע/HIB!B!AeJzShjѪcc"A>8m9K ^Ϥwn_@tEm\ YΦ2oBӋ V'0s_G r/[dl?xK` Fuho=чسj1)TtP;9KucML S XǦۉSAӔ>`~$+Q;2 {hL˲E)Ië7σIVt0j* |ןˤB!B!n;0 PCݩQgtl=@R6N_XՕϼL{Kcb(OjC/Yrj8jPs*¹ES,O}EF%N<=OוEL}i!քdV ||?bu^5ss hN!ÿ׸,[P_Q\w{|vW ԥ>Zz"uo®ۋ ],0ِZ4ps,8vIUh PꃇEs"c.^VBqp^=ˡ}|$ ᳽yjx "AIW)櫣+߼ Ѥ ?ή,w/qʴ^-3 2TOɗ{9SLAqhrȜkV{@j| P31֬SM]W7圍b`[/=s,Mh˛UQJWN/ >7gڜ#:yB!Bq'0@]r[uN0]) ;R?e=|<ܽ n}ѣ?,ܢ@LLNbv6^^[|1Lݒ6a+׆;MW m(UQlcoQ@FJ:RxoHZbcMx6n#5;1{emGķBNjM +M #2o9]r 7U瑗}siB i]B!BpJ[ иU+/'^^~z]ӗ/_'ƐxdDPTQ0G[ J7d]o=>R"CKBs OjFE`/ծ4jlѠk{Wp*b0FCÌAqFrD՗歬8zbAC XoN(X\I+^#<sKs QŪ& I3}hu \._\Y,r-}VM<{EB!B!ĕnɣRo<4Paܔ|~E z##yj8l3Ft;TZ>v!<( Y[yI$Ŷ_ >bΓc=[rfEEu#r~pC}CIu9Aq9Y HV^ YdRIl*, /U|6@y-WL0݈&ѭ-?&8SE;mzq4*#[gzy%)cΓnq ;Ch[B"g#(7#mKZv4C:@xOg?g S[wEe|"/aEl*?3+8Yۗyj($/#QlrZ=eYc5x&kSy0?vfk{;~l9G,ɾp}d]ћ煗ya@tg k+!OU< ^ę+U* <9#:Zv_|XyĔB!BqOR<==+ 5 PG\h N-n8<͋3slڻ_'2ߧ n}B!B!D5K[Ӕzzdah 61z{MlxSZd(&9xN !B!Bn0aR6C {kt$[I3TZG3hȲ̻SzW!B!w˳V,7 dYSn}B!B!=Z B!B!:8uۇ !B!BuU{SI*!B!Bq0@!B!BQm0@!B!BQmTK%I!B܇[u(4+ !`tW+V]$gB!#'/GUZv$BJSwc`uzxvf)9ⶓ_HB!B<0{"(n'T!B!ăZBjzw%y+>G=_ϱ>D'F![3]֛aB DF\rߜlݿy+ănRuWEoG4ty;ZۓPļA!12 PJ*7$' y]@LV!BJ Q"1,i%o:{xS߱&)c穠iJs[?G 01˗)\-f(͗p0\̢qؕpf]$9d;/_Ex]w㏓6u>'"ڹ751Wc\ $a->%6$G؋+h|pFC~ٵ u \>ĞU̒WBQI2 P!Bܗ;= 4:ukC[Icm*?fs\*z[|Fg O{*$Wlw:ņVާoo3 QңkfMhepX1`N3zp6c$}{y}D{3O?^cwum]jEGJGzԨpNtr1gH8ƮkuM&F*9GgOT6*z.dI'uim'{rx2N] 3 WGrǨD.y)AgΓCĶMīT>!$x80ʍccsQ$E$Wt:^dj4̚.^̚.oM`g;MYW$nM;.eJVfᓉXSXx!ρ%y`RQ̹ٗZ4Z ؋0흱,g .p)b3qtB9v m q^`IX;ô3йkdž㖏QJ]ƴ^W,l dHB\ڗy7oaAz3eSC_3Q83jK q  .@UU [2r,Νz#pn~9^ c `狀+u]LЂ'۰3Emum̕5rS04GP`kTt \8RbH# VP| g z8yy޵ fJ<9*ùQ'PGÉv)W8gHT}iʊ37BTj? { ow"Z`=یcc݉0mϐO'x6To0|rJ~Y1| ,? F#MoUD^Dk]ڝ2q+W 13DwXB;K9z4\V's}i{l6w]f n0QܞKnԵ֐u_ՏQh4`:<__~JbzYKeC_n3cn˕b^m07hO칇.$©ż0||M@Vgn2: w)cfy:0 _^hmޘ5m`%]Φ<27x|͕MHfδgohoWl`} ߝ礒SH8?LL2mˠ1m4naT4u| ō!iv|Hđ6OV- $H/V68fUX@^~ gq[3y1-l,cfyQL6'',jvos-]z"ĀG8ÿxC=+teC?~2v2,hT&F4K8J)UND`0 qjքfhO'whN=O޴v^EBt ĤY܌)$0[CMwPsvuqHbgqn 7"c(~& Z Tv}| ]Gx hVjs 7F8hłCf1+ͯqX85mh:{\{>\ C?#lա mauPN{QT>:-Ŧ8j,xі6N_XՕϼL{Kcכ]JShq9KX! n/2lt6*0nýl8Ԝ OWmvY9t)Z} דMQՆ_&p=*Gvrx$&ݗbMH6`UNY1X{${ѿ{sLꪪ7@2._.15Ѣ Y9ylڶ*Cl'hqh/w덻99dN7FEQ,N~l9G,ɾp}IGye^7]YBJSض3?_Q_fe |}6F$neOPI:<&GaY)~qz ePs̋|$YɜݽOV>Y5^gҽ1IcgA*B܎`Uuf< &@FqVMݨB۸ֱ{.(:$é;s Pbtzں#4zLiԾ= -5GK /:dn[^jmM?(p!,M#<;zb[KmROhyr:ݼjjKLh!]Mtw* EVFG!ڶK UGXNDn_8S/%-F 'YVMIcW;m*)_dS HfKMr\'iOU}: v‡FZu],~: 5 XFI[2h [81Wzo"ϾC}ʬ(֙M#=/#kޓy{KֺVj"¢HT!3⅙ [-2b[t>O׼AYA{$PG^m`PUՀW#hEQ;3t#b?!#Ձ]|5mI'8=! IXE;Gy.8qXִpJm>x+uCn}ia,[tmEҳerHQDNE^C ;bJCU4cύ84A9MPdnM4뎱jwUz R[TImB+K崧 ˹搗oNM3{,.D#IUI˳A31֬ F-9[1mv.'N#yz޸ljGo,굈h=ܠKg1nե+W0oo>vy"C&5_5pKA2WL CW*__VkăC$jX\zB^X]:*BNW9}{IK+U*pCO,-P4h4ڝ\)> VUa#T}ZԴ>1Dpa0\u'zWLQO< afCQ2F{iD~ Wd7(BqS28r+#c.;Erj¿2j͗4M5 wnw.4 #Of|}W֌?6<:PE۹|p[H*dHM䂾kAIHBc}m< IDATHݛty)))Uxjuٝ.* o$H.=Mw3g ԮWi=RKyf>OHJ)|<ܽ n}ѣ?,\1Lݒ6a]9-oqEmQz}3 27'Ⱶ2')rrrVEn;F`_pR]vҩN r*:RΑRPY~;=I)B!i]*.WwJP괦SۦEOih\"9{覠d&}vr&<`]Rj!"poNmQ 3dVf4oeu׼Z[;˛?1hRҪ;G&4 Eȱ 'MZulzՕ4jlqz{Wpg0}u" xݽ1B!DeS51d'˿h5TAY PCc.` *$ǝG_N:~<]QԋH0d͒a+ %P6:?CH>)k7jămyw8ϙs_&''+ 053&;;9^gWoS7yO˂vzޕN /k;~5>?ny3=M@o ƍ_aY ɑ󌷟_H|b./e""&z6Ҵ[RS4/g'0pz_'9a!O],OT79Vsjܖ3gc oƸ1cF69_?ޙչlN~E{MbW L !3 Ss!+KuXz"fCް=LJUtW#cč15)ٙih4Z3sML n*6}u5mF-ugNIsY%Ƿ*]T9˅BqiSM.P e+SeK#.4^r[X۶rvfV#,;pTiXv,hDC|;)uç!=} AAyؾlȼyE+??+wi^ٞc*eJ!ZO?A5e:RI\a*JsrZćS{~ϐy{K0?\?Υ摗Ww105@Ѣ56hݞ% *5羹ISB<0eMWgBq/ ،s_o|we_L?9"ΥjN\Ih܌ Oa֬ϮT]ϝMSK d?kJJBۥ`db(LMl%0 h=bdl%Zc―1.T}}BB1MVV9yfΜp1ԣgy#]: !|VdX-gTh;6Qkh4YyO)FEcAUU &JGҾ`jay kL-,* (e+B`UT7ӫꓟ7ԺBQdgg[o}[΢i%3w@ֿڟ.6NE-##MLjTB!ʇ-B!JFV1F59NғJ!70@!*.vI.9NA >DwV,*Ih;%-_WX՞Ŷ?v|,fLŻarZŝ2;7)RH@jݻ*,% P}8ݛ?Hp9M+'c:gǥg8lak0K\S:,4XG׀W Ļ&!.[ o,.4PAV.C^z'Mʦ;BqhT㒗u"3.iDƗ׮iIJ%?f;6nԹ$.Q9ѕl)| ֟WGaBTÛkH )BVq%=tFwtգ@ z=*S1nJhJ MP| m@ ,MQO·?1\ *q;>jȐ?!Ϊ|(y׫WBHk UL%7'c@J"@Υ5$GEB ĜIڵuWCHL2ʩ(beH9GRJ=@ƹV xF*)5pEKe'ChU=ڇ$y+y/9NG|twcJqMox?XFס-k?`;w8nG-+dBT#lt:^dd𡸗h5fzo/fzLGo( y |^HV_4wlV E7+x &H~?B\hMӣ]PNK|'~e~%Ƿ]Ӿ˼+>ӥ忍>3Qf}ЬBTg aq-N^L²j,"4ix<`Ҥ+XXw~uYHf TJ:Zv}.?򛭯_dٔ],g ) ,4kBGM,| !B{X%48ޯϦ f-/0K +j!ZXe]6jD]BwuFzWgLi7fkyWvZ6-ȝkriv,9gxU!3U6B!j= ۴h޸;\!p7tiJZż _wL/Frt<6>-uNwia 1شr;y*`} ߝ礒lв8zvmC+gb#QmzYKeC_n3cn˕&n5 62J9NS(~k@7|ܮSfU@т_{zh3Nr􏽘nskDs[?G [v e 0 Z<,=t!Nh״.^Eu퉱I]k [7}5'#0WJ*i[͝omu #9ӞC]򛭯sߣ]Ϗ=>XNBIxobF1sq<ܮ6FIW/#C޸ MiaNC񬇒`a7J+g OmWpbٖlGzßYLrlQ]?1¾ n<=ݰi C?#lա m襬[JxRf}gnqx>hMi4ـt8ed\mҲʗ9wj SoB"rAىz^L ]Kl5YǦ[;',g0 ˬd>'sXv]ԄqζM7^ڇ/ 4 ~٨vG< EVFGw\w]zgШj,Z;8X9ED8IY 5>Da p=s'-bWw<7c^!=l\19X6Ǡ #h\y{Z̑8< |NElg 7')B!`U PυK8S=L \^ ;[3P0uG>4s3b}SD!:LjRוi9g#W-Eµ ,7Xz>ҍlyeV[{ b /o!6 V}|@Fr嚠搗oNM3ši"shp?LѾ4^)x$˰2ѥm"|}-o.[u%ep#yYP,0@Ҽ2oͨ8Q!TqKy+%UQ4v99 ՔpB,XU:pu7hZ(Wh4WK.ͼx afCQ2F[4,{>Ox4wo[i,!Ja8]!5 ZԮm%3=!uo221HIIJV9eVӼeH+~IJR\K6t1Lݒ6a'o=̒h`i!Lϲ/vs>ZOѺ e]hEz/n W|FE`s*UՖdʿh}CxnՔ][!h5F_$*ػ6L'G4v87#3*>Ђ'۰3E6ֵ1WJݙd]o=>RNǜ!Qy++,w17ƛ)4uоi:"e7.j9o ,)oJ=Sw-Q(,z UlM*_W5hP C 8ͳ ڍ8;9q7^w5>aS$ml-]!"Ν붨A__&ŐLG44! Vj6&,k2x;Efn [7j'rJLsE7sj{jpj/:#G_{UI3c*9Q˖1GWo޼ 9 P>Hx14Lɖs>.ߧtt)`oP@>vuä_I-&}==YpVSFVU4OQ:t;שHHX˙3UyEص n݄oE;o} ,AYO? mU Éym^xJŷƍ&ߦP n=L^Z35]<`[RˏFS:= W~Rdܩ=Ts&~k*<ˤ8oǬho͜JBd?ieYi!f栗s;cَSSIѬjᅤI4a_JwF~Xda"zUߓ<~WVܱG>6bB<7wPe> PHQXX Mlh̝;9 ,ꍇ֝L{k>E˴iRBTSl{ieA5BMVI\ѩn|.&ܮې3oRCeߏSY{v"oTD7 B`;shHp"%SeUB!Ddn\!Vr0?${uRD$CǝܨIfUuai".Bv/b`rk]u]G7cINR}c6Ta;>Ko:0uy ni2: 2 !V&euB!DpԿ \SleӅ,7C8'-YD@^E 2-{Ftz2xhs2< K{د+[2钮v6ߝ jѢ\ &,28ggS|N+\e"B' ,/طEjxECw!|= D~wX'&wEs;xRdV bt^X^&>//5X<.Si_ِkĄgo+MM'fɭ:u;V/5j͛;gW!G\<G!a͑|uw9s/+/[cѐ=x&a[g\Lo>+q*-}M<]8üy !}dB[=/k;[RB!F+||2ml4ZdBMZXB\Qr 2űG;AV-[!(RRR?~dBBxD!{Z9Jfgc}laRB!BB!$ PNΡw#ޭ"_:&̧,&:ɑgZbڴ/pweڴ/7vRRB~=p4 w'QW-`gxhax٨ˏ~RlOQд fǙѨK/;S;|z,˷% uSFe']kWa$ɲ}ǹpB<=gB<$ PQadO%/L֥NK= 9 `TAeц13}lOcr]cI͆Hѕn=NN*e+ *8\}^L\+ac;_FFK>TSl{iv8vme3orW"XuŘ4y%1?􏡬<hc6Z%-#sp_H./w6[MۨkPz?ku7|;CQM컌0SH՗ཝ`#vq[M m+;x^ uֺ6:?'`{n ygT umFZ}uߋ-,+i ;ONK0Fn΍*b8w%ޜĻ-cN^O:1+ɿĬ5.A`v ;Ӥg/30E9!{f׃ucI_]C (f0p8@x´wo '6gW9::0}Y4 k+@̖'h;a:\9C%*~Ljh-Ee0º |=UMФs3x"|b(& *1wOU[W $TQf&+b0! % K(+aAXBd!vꐙ`_ً`טZ 0TkDţtCa{ =_~51z^408SǦ`MxEY*W&Cxn]d٩ddutk^L?4䓉m1rmG\P+(Zhr2M{8w˚tnRt/dMKФl=ߍ7-ǹB3H#XHo8sjÉ&_Sy|֏d͗ܬؾn9[;6x(-V!p*8ORڽ gETlRS/OTLf=GAw8?^ژYҥE;H^OY? Ұh)#r,n[ tisջipBrujƮo%&cn 9g#N[6.^f]xͽ*wg _&8uS?Nl+8WYImP^M}k⠢-Р#^.卛*.dƍ;Ґ J*+도)URBQ2.QlLK %2:f(*{R8Oj7JvC̯ŕ #6>oqL][`ݭ#hCf9(8yz>{4P*W:.]ƙKHuK8t wsiIV9 *6XIϮX =cmkۻ:wo!Fuk색ݟf^N]f_#=xAڱ76EGRE9媷?z:GpGSFU*MwWMqc'B3\(px^AǝܨBfuu!4M ݋8\ R@mӐZfgϽ\FbBW4.8g¬hܼ1<;s(/@wuߤ_-nƠ?Q7f5gNg8N1V n^!Mwĭ-"qtZcjP7q9.yŦRjFX+gtwsiݵ\aM5*+S>326fnS50z"FƏGoСՂJd8ծPhM;eQz.E$2Gފ7Uu/<&xWUFV6QlJ6E&|egaaxä~!Dq&rWS4qToop9.\ AK/P1Dxho]#A@Vjr{?.` *B7 ~XK:I43.Z:k{? .bՄ\$%kZ'PqR}Gb{֪mzݙ Cjx6'~zniK-d6&ĝ7nMZO8}[a;qQuEOzA,y115csi115{|mE_&I:M4u)zΣK>¡q{S::aU5tu G ޟBʥAs|I|D<~}r'23Y.('+Ѳ{4YԻV ˥KGѰ ƊѨicWT@wW, jGt<uN4z. agr>_P$I-)W U'ZՎ]y[{m;6Heud?I.}p^%YHQ^.jW0p2pN ʜD>{_ ϩ,Y='uE>89%z}u}aݗdv/hs‹PV! +3aw2?ǥ찀A輰L6wp+w_MJ\{W>Hx14Lɖs_3= HFL~&lV*~[6rd&Npj)m(۔l¬1ю҂|aMqjjƿq-qjl[;lUIp٨uMi$~j7,`<MJ>f&$fZbf(}[k=s'%=矿(-)O`@_H'l*. ~,}] a|X6C:RoԆSܻē?g + |a Zw0ì3=Je|=tUX_{\&}3=Z9;ssAoUH]?IsUϼSCdSz IDAT^q` Q2qH wY·,1GWo޼ t4wX*] 9η|JuSW{)m%,?B(&x36Aؾr5괛0~#eVTw5Ie#[PMj<7ױj/&(>z8vme3orW".&ܮĢB%y|ȵ_nfp]8̙F\Ӎs[7Fv%ח8ő3hCߎ_3a};3!x/777]lBTp>*rr*+6cL`eF=s}[XsI*ȶh8jX~4}p~G<>:t;שHHX˙3UyEص n݄o+4[ɩ_p8N'u!jogO3=e-\IuÿYtC-pSN~WܳgbA!sUӏ~[x+3ՓN y6~;5#sq썺wMb*gƭ߿cwPT޹Q$k,u#`'GcJèsnR~P4BP[ɼ{STn6m۳ڥK/cy5Xe;l~j0fsēڅǏ寖>1Jjْ\ !pmpob}adahZ||ʻTq6]$c3 zatu'eJR-[C%Gd7طlfI:ra:RO`x :v*[B':X{-̫PIwS!$$ ))\ٿ+M|ޫksro {B'v|8+7~dP9TJO|%&XXc`Ut ʊ )%B,D BĨTTԇs&3uTOEF5h}Yc@LXn ZJJ O)ֱJDW".tj UXsw(-=DLD\'j9PNW4E]ͽ)R] 8G7ՃE?aA9H|zaS zWWXJ]a8C-ע߾~._7OAR*%Ϭa,+ʅɪ';Q-%~ObX!D&5ƍTCzJO\)Qe(9!X*rgĚZߓҠD:u3BA{xa؞\Ħ?COIhXZc¤}Wmc>1М7mu4UZrTXWCdI/BQ2X-B!Ow !٫H$:&tƀk:(ѤNV$GQЋjS Gl>8{yBth3ѥiH-s/,̫b*S=pbҀwgU2YN7.It pa2Uu/<&xӥ !#0@!Ѷ> 'PN)BxbH}GK `QӉ̵4'Zv:4!sZ!|؇:g ' Kt!Txɝ! 3\rpUnۘd.ߧtt)`oIWhڽ-N,Qҥg`Ҡ']k`av-SKpH'l*. ~,+w_MJ\VM=x&?pIsUOsz!kzŁGZZb߯~hɂw0ì3=Je|=td=zxmY(U!Qt Q"05r/åqgx`{_'DD1n߲eI{n|n;uQʲtjogO3;;FzϸL!kMI#L&!?k;-!F+||2m{&B\MQ!B!CIIIa)BQR@BBWH&R( v%#5kA !O !/(MuB!JJ \<j-w&uSBBlQГ_Yx]`Iݔ4V!UecBHepvd)l7d(BW$W(L BV< q}3'7P ϱR ?5Q!'\YHF!Qy ; )133g,Ӧ&%%E2DHRBQNٳnذA2LSbx29QNک*fArwwK4k.eaņ/i^PY4+svD [Ltl^;z✯'e+FVߒe&!]j8|ޘ:&̧߈ƶ1]!`< w֡Љt \khQSp^AMg6E`uAz{If:V-I0FCܶ)*iypBU]7Fv%ח8ő3hCߎ_3ag4PF0-t̥Wh=a>Cn׃mH?nOA!uV(~Hڻ@x´wo|'N~q23whpd&t5x!av=h^:6ՠ :s0NmcPMZqwbɸoߝ犆ȵ_nfp}K^۾t\VfL@~r3r筯CYy"wBzX&6hW&4^S@_:x*&̧љ9[ [:cx}@oW foܙ}yK]} t 0셯9㾲:a/X|m_BUhϸf= yO`l *u:AAIH =}HMM+ @L:'cD7x:ةsGu~~eɤO_Ѵ( 5 0~o6P^M4ٟ⇯gٛ9VL= c;4ߌi?j ]MrXhcfK:tj~o~CYL؃6^'G}Y+bk/x凹ծM̊[Pqڄ:t@}?~h?=*kڪ9|=?{m1*ڪQRO Z7#/CWx=@nnE4s鏍qD} aiXUKAb)-[Uۗi^ࡿdˡbqj?\Dʞ9z 7a06rkuC}eϫoW"iՉoe-@>L~=}^OΓ"/_E5﹌u tbױխ_mB֭?bB|n ⢮F@ʍxj`D"%>tM")Xd2H׻RϾfjT p3h/eޘ#ng :@u(՝nZF37~- BTBkj\c7蝬:fǯd=0;O-w[.;T6QPlQ.rBjɄ^w-poęBxcX2Y!_?ߥE;Ѩyɘ-x2KjB ܧڹ&yf+읬H&C_4Ys/U1?ѦC댅YY%QI%a?Lpkg_(|#DiM6詳UXYƹGq玂i+ai{q]2?B6hٺGpq┴;^O:Pn]q΄YѸycy6CwP^bqݝHFLrSSE. ǃLh#o(Uu/MDaeeҀ!v0z)o1ɺOOztm126f̾.Ȁ12[ٹ*=! ַ-G{m,[隆9GR1vCbi/3Ǯ |_x|sk60a1 0aό4I?)"ٸbBQdSOueU־>V5u.s_vQP_X ^4ţ '&ͮc6gQ_j3y1On;4 1)eNK3dJY ɾ\@Hv5Jy!ۅg-mn~e&Y%߯VǐyUm`jTǚKD^Ts5RBԭ`gOb,[}Q VWѱDWۍ:B2!jn棾C8[Giз+.i?[Wǻ{ ُk9[g`Ҡ']k`av-SKpH#|$'TW6$#1!ٛ\Zf|&~V\=ϼg.L<(,l ѯ=Qcu>ʾz.3gQyIsgk,"ۓ _A a|X6C:RoԆ5Q8ux .窞?dIh&Л^t{UI3c9+1oY|2=^{y6|,,`I=}~ch-} ]"AOe;C, R >\_| "LZX{#nޭ>#K,@OYtIKQá3-Bҙ7ezw82-0YC}V!{S\Lo3um{==#??;+b=&a[go4?R~u̥jU/Μʋ/®]u+lE䚡Ũ`-ž[pG6#YZ?d3;\s$=_ikߦڇO/frtt-}?jz2o"j3̛/y/G-8N8Ǘ}eq[c]:|=86 c֗/Ϳ/nU ܇)iWXBg_vHv+j9z*7$;:&tݖ#Twp[oRǒJ| m cSMٜ[֢BtifL)3x#Ɯ!@툃BkhR8d;=0|L O92nSNݾTSלwI!Y^Fo%IDAT B<-E+w,:tLŖ\%ioenIيrl%l!))p)zc$&n !B!J>LYI!MH*|B$aBQk$ P!x(@l*/a-e4 0a)!)k. xHXB/e. аB!x B׷D^AEJ9W(J F}V!%tQr?6^[P>l~s |Ρ*_oWEϓEe7.d^|.^|y2Y>oK-DY['d^-鄊 O-TTDv;Lks.Q+|^?K/_t\-.|aU%۶/cfYE/w޸*|ܬ/_yqx\VQᷕVFAߎ =./r#RR0QF)T6(*VWAy*jLZ=/퇙 'ehVLXDZ 9j"jy"F.^W#(^ٶ"TL]ce]&[k`mj*UǪZ,gm*(~ϼjIݱ4q3S4-ʗ[|DGռIoΐ9n= òC2`iQB16|Q1R]./ܯނ#(0EXg .0϶Mץbɉ)ՙX8\Ha~AbndmLDm=*g\hT(sTA# (^S@jƇ b4Q*FՈh{Ѡb6|4}i+F .eM\Wj3ѪlB)ـ2Ӕ,K) MH/܋#x!gBkVFр>>>def]43i4OC{e) 6p^jux8dn]e=$q:wӏ4#ƛs9/:LT[VF3uyg[2l|'{ VkE9̬L:lNVCh(wUcΪ!++m~FLByŪ sW8VN""|9ѵZjUs|?f!} &Ι3msa57n 0=ʫLlTmldG1dօ&{q>Ӂ*BhբspW=6u[ua? ~rOOƄ`H;mERWQ YPj1+4DaS gRz]z< 玼wTP\|-z.EqAP˺+8a,[[C&PM!FY!}+b!2bꙬ,-k"bT,-ץZ+(f.cnƫ&tnG9ӂ 1U 4`c2ہ>ϩgeft:EAQG9[M_6(͜PIlx oH(~7~'Y_Q0eLW^dp̚:_GQ|f 4?k8d&oL!t8K>}jfgT?ͯ./'Rs>_<.hRtdBWsW8|pЗ-]L\6'4EՄGGGys?o^=|pWEQy>+ A5ZZ Z67עjY=/-EX^(EW?WQ8WNnn U3pU|36w)~5Y'kgKF~yV) 7`γmg56T5Pf:]1ͬJYYז0ɉ<3/³PU0U23HKM#[]O77w\ Ryi{"2#=k"ȢǕҬgjXURZ^Zo)XP-BfD-O֊d JWaQ\2'HW͝X) Ж9ψ8xR%0g`}3>X6=kS_eY9.QKc}bOP:\H#eC{jBڕıQaNERi஥+Z5Fib;TEՓbEZԯݡzR"pЎ6_.*8x5mYܕK^o'6Zi^bM9djBbQՙڢvWڿetjJ /Q`y9h\F|ϦQQDDI&$$&t Fާ2vF [uf=MYc{YA͌#|ХO|4#FZ8~G9Ň3+Sal6\Y{#>u=ջSo>+-AIMIay{ȑs!9N^)P]zO[[[<<<9wŎm;:Ƕ;M7{}$5@*NlbYBgL&#r#{ U;j ^ZL%='2v\T{Wb1kxŊ 7XѦZ֯8fƏ'31IFlEH8WP=e]cEm}ۊkT+R2]&JYX}Q,gD2 P3F(Mi9rΨQ|fwM"Ps/Fc`d\#sYxw=NxqesA~߰ wqI /x{y>U+{a*;?ruYbX7 %-oTnujHWYU+Ue7WAb&d Dy :Te+5%44T\  ܏| D" pt) ^A^_,BAxН8D (5z|㒢A{^fωAq  ^AqPDxdM 2x]yfte7˙շՍrKk|hRnKq_2e4:9bW;OLw]+/%ȩP :o?}s~קЮs:/Lњ<-EEw+-Vn81KMbiѠr>VP;L+̒#ONLT*5ģ˓Ybm,A%*/#7Eo t~w/TZ";vgTs:^!cxNfdpj~C<2(_#dAy<V05,>TngÉԑ&Ge'&mP4Q=S&b70%,9 =Σױcjd-p8xPtNkZ6c{6+Wfj& g(mԀESQ1KV9%K_xXEUEˀm\y؍U"f1q[&ӻ9TF쪞lCzne 5̵\nX_YG[6ct/3+d p:f`'֟fJ[%ٵb3ї.߆%SFsMCbI2vbi"M`АVDӹi52ѧNyϓXA "VRVAZRteaݨ~NᬡxX_D6-F3vTD0yQT{122!0h (2Z;Bn$NnEWVO|hZk]w,.\no2!~[rHbc* zs85*v>;Z[ƜyL߂kRUO%C!omL}yQ7FRGͅ w5\ ?@mr꭭YPCǴ!)8M[v,t:Q3/y]Mwn]%V6'=svksv&VXutI^X3 ~5&#>|˺FÌ1H-?3+hqFF{s2Q)8uz^­Y9fN{ AQBCCD&Vc_߃kô#k1cfFA^(Uj{ҥs ~4:}V7q ::m'^?~:&HA >YVU4 }AA  O%BAOxbAA_@/A!y/ AA/ 8xAA  ^A  ^Aq  AA  KM#^SLq#kͅhT g; BڙDFDH:0քIKO-91!jjfߕq]DPg {=hub)yg_D+QS%~L! CRIq5w&UUE %pIjA>;b}aCǐxs{ְ@l._vMac!}TxhyamݤWR/C_a\wx%=>ѣsScO_YhW201~s!yѶ "??cx]c\_\rɴƃ/|CcaֺXT_Y{}Ͼ_zUJNZশh]f|C CupեpX n`:@U&v1ԷD=JUH^"d`8Wb_oTU8@VvޞNƉֶ7PTק8K>*Q3˷l>p$^!]yd UΝ8"VGKVp hIAch[˹ռLwYNj/}alŜ/,i3 $g9\'I5|6ڛ[!/ֈc7/Epp'u/^1uROwU'R{MYOJQ 4>`jU׫s|t\[Oa\<b閁$ 7rJoЫ~~ "3tN3\QKzh4|=ݷH-@G9r!~V1:郁.O137y?PU8gXw?qY˿{3=h;<9_|MS FJRsǹu+&KI9ɱqv]qK2b"EHSݨp}ithQω3MobXScq \*_5W5 ō9ϓ|!a{NOG6]pJ#$ 凹;Pνud+/w˺\f}:,)wbPD<1-s @Jh^JEd}{vl:ȴлG'"3=1[Y߼ͨrZ5a7G#РYaahol:(Ni6]?hUn%pvvąҤM$mѓONXݺ$[kZ55pp#)0[.o7ҙ,(?ܺ 7E֌Hl:y'+3 Syq+WbŘsF?MWw%ٜL`0g 914፛o(GZzӣfN;ڌI@\m s-^79tE&8BS)lWF谵`ƫkvgdG+P7+z4 e~(U6=:S%>LJѪ? ͭ$s7NVaSO'j b_ɕ߯o/vq+ZDƋ]._s:{벽^ѿUIɅ\XGki<.~rBΓWQj̙vMA9㯐zSjR]PeFG i;QyeTo^_h2e'lyגU-K'Ff?Sn֣Vgۣ;>Ζ wsNF@%v78pGH.4a# !>3VҵXWdc#IׯSȴǽu/s|VqKI.:-V/w .rf)0r ܻPUt:nL`l79M6![/_7iٲooS5l -PQ\Kk}P,b0'zt,҅2 XkSгB̘-l\3H2ȠFP: C늣C:{T˟ *T:89daEs\ ׊IHW`C`M5UÈ!Vy?VG'p PtoERϤmrn& V m6j˓tw!T].&Rt5T}`8XRkk?.ҢzKmzmv&m9܎e^'fbnfk_޵ X|' AÙ8J+_[vpac4 8vS׈{d` p UiR2WL4hh,hT'ǝt֣* 10uOpyғpϽŸ[iѢ)deM064wRL>79qC'b׮$h YlbO`*;ڡFg揆q}UJhRE)DXf_E);4ODKrv"e:mq}Y cCkk?8hOv4 Qu?gUܕ\LH5C=̼U4:m|  Ph^$bKnS.r]w4 cG"l= p5:={=U+YVKpK8s& ES9Y\P(p$W}RE9eX)ȱ-_n1bv hӷ~>܊'/UՇBmUFhu_9рq⿞HwgQQzwX(Cr1M{-5ǹ#܊!˥o /vU )g<ҌuTl@zJI.MK圅hcs4;(_/2 ewl[t[gxy2whIP`4nM%\%@Ppew8ݻLM$b [kS'NnEWVO|hZ3/IsP/Un`({ԍ}Uѣ7ToL ay~#o^z£=ѐSDx|ioE0 z}aϧ^'] 9!7#ݻckM`YY<#GRAJA"*]YPZz?K<]Fd?;_lî(zԷ $NtqoGS^ By@A  ^Aq  AA  <0kr'Al ^0Cџ wkj ww Ag p"^A  ^Aq  AA  AA  AA/ 8xAA/"Aq  AA  AA/ AA/ 8xAA  ^Att_;֑,T,Z]:r'yZ~_6MgzKB?vLɉt ͅ{s' 3On&ʸT`̌܊j=aTѿ8x^Q*O&4"]Pǣڕ;aƃ\M xtpWV]Y8Wo{&z6@j8B\S@KCZ(dq}X h*Y醗*OPpJ?ظV6,EnjW$"=Ol=rճ)G=GK1i8yTuOPM-Kq3"8V "qo*7#XDخޥwwԏյpjA:ۺ\2˷l>p$^!]yd UΉՔl5[]ZC笊̝#Yxm_&]Mї"7=hxF7P0lCe>>~&eoi?SG ˈgKZI.U ȥokT}&=E l_}[Dwy"RbJCwY ñ9Eqhlʨcëx=#fg,}TC ;|5M2(m)]\}.w6K'ϒZ7Rm L35WS~ɬbU nK6R.J>N$"Ik.؋SiwC?¯t} U5>yb[T;|́TV"tbO1 :@MW)EnnIeh޳wbwkG!DX=%Xj)ٶ=&0y[e_j&ﴣʹ43+\8t YBhpM\pqíت;ɚ5>&}_;{3{t?BWj:킱d/nK_m&%=bK9 J1˫yBN&ֵ =a/3nL~#~㢉SY7ܗf^-ȋf>a|yPsLCi[ y۷4qEyzŢr-eO]35A!買vZΕɫ2,WƱ~Dujksr9ª RFՠ-^A {AyV:%ȏ㩱%>.o. IDATgyabkPf nz$3 4G@~\sIǘqhF¯hZU!1q*xV5 6vZ>8䄳cbkLF Scpw >\X L!0m[V[ōI_&"(}gPJS~$u R'cKvv`4]o[Ώ}Òln[ˬLa+mwJ\m C&cڰjjKAyFy"Dikɳi> Xh4iRNBXvnn>e^EcxenF퐦>w@nγqz_zWw]7əz@T"ثCDZjĠiNNcȺ'Ѝ`GZ6̌57= (#*IJ=O| bՍDƬ?KqPF}?__;&sF|!@[D)YןQ_"bH֠_uy˭C,ݫ>:/z"M?C\ݗֵ1N)e]dڰ:jгxK+yVxI[]/>>d2o|&[mgS9Z(ai:39eƵEk__k“cs`>j1~܋>|iU=A?`벷LweylCY{L{}";b_| 8S1CCsU#8NcB|:CgNfYvP7F[ f̂^V#^=Ҥ q[#,ۮLk)SCmi>dgutr}ٳ 1GVʭBؠS;oo/ܰAQ@Bݚ&ebqOۼ4ݯ<«[j1l=&}Yye,=5oQKL|k'͡oNZ,7^zz~}GGQa!$@HiHGPREDQA4 B@B(g˼HB*s̝;y3u%>g>NdY|{(T8 6ߒK'!~ɲoW9̚3seYKrnbRq6jBZ{&oc*Vэ_{=.l?sŷ8l0m3ITr ~{)Kqz%ɽrgGwn4V< [2pyĶE{7Z_I4GVnKLTfwPkjGRN}G֝: ڪ\o)qRF_> g_ٰ ,cܐٜ׃YlMɯolvԯD_6Nb'"cYd^מ3i7(rf ;n$Q.T 9-]pQJk9~"2Mћy,07VV s td+~݇_iA/|Z!)gZ3xt:t=BgܺZߚDaDyI;h6'}Ԕ`MAŹ;ت,f.{Πelow%Ad&o֛^4=ښKK:nftfh-Z֌7߫j#x@FΨϯZxoYͩeGm5'̤ݢ neWpU;N`ܠX>/?cKs#=kcmDאMޚ>&ѮJAv{a7`ˮd:Z877ӟZjblW N{;t3%]'ISͪSMnn8ť;NM٢T(ϳB9x.fsڂ0ƍ\Z-0e/G3_:F3^(媯Ց׀i[oM& NMe-=¼>t3-J73Qc,|5S1"rդ`tT Q188w*:?jnK#Z9/;쪡c˙QML{j9O'cI2`ʿM:I5ޝRfwyI.ktcRطչIbxWM(C"T#~3,'m9C𠅸(?=x,1ƚoWl{R®',ndqҲ ܦ;iF0^<Ōoim0u [H\ 6Yj7XDW;k,czlk՚OMfxY~4x9+j Oߋ MT+L4&7IfcѨ\i+D;>"黔Ō%y;F\(եQwU {vX`e+4 #9׎<kWsNM77+xrQk7͡,'Ogq9NNNCruHt%:+nSQ gM圝 nBČMr)|9LԄ.֨Gޢ}t:Iq*Ma3*ԥj3SJSQҮ+?~qMMN=^20x.>=qlzt Ͼz}TTL:]jJ|ZRhcEQj QK}_D=?g|:şdo_ʐ?a$)aGy` ,3q; jd!N._Ë7YCmdžh5ĿX5tPPAG5&#\6]JLHV/Ocb%'E-4c4cim8Ɂ#|`><&DtBe-$ޔ/%'=S@Maە\p 'R3ALYwWIy^Pm8aoQ'ɀPuvI_p+a[{ʝֽiP_$GcH_9ژ>PjE=\Q⹭޿pO[:%mijU #Thћ?g޶OhxGvk& r'sl+~N(͋|ӟ1 ޠ͓39R_)#"~u0YEOCX+_ĄWJiXQ@&+sfz&PNz%s' BZ4:[[g03L~GnꈵG.GGM}{|'~͛%8| Oda|ÜzaދC]ڇYkˆCͬ0' h=});á܋/T\k{eΐpQ{WvO|E[eu8 @^̏|ő“֍Aa|1+\:g͙6J~8^֒_dҲ?5Y˱3y#m{d}4㤸?MNz63ᗹ%}ʹ*Zόx4h&L呟`ƚW=hVs~u{NZ,_?xbPb ,nDEy,4h8'e88;'F {o|X{[jWpBSk,]܌:1yگ1=QQ\ornUhCgaL>^:$D&)4uP]%[iUܙ+̢֮io2`g思-![O|5ndS2%߅}BxaHV|GXܗ|"5i5c3(kጝ,tX/U[yw Gc_NWp.ߌ/GlP>ٌOS}uZ펞ܱ zkH>NjET`o8||9z'Y97HLY )VΏ4N,HUX,(nՄo9ՈC{q⓻RurĂɽ61+Tnڋ}^c4E_vVޟwU|y{(8)K V*G:8rY3>ĵ'5)lݾKMCTlţ"{c x/~=ˎIJKSUi;m,%%yKCk}_X;BN^EmIYJ8;b2OFB1cӺhM'6NNNR 8:?.;KB@s|ݧ7/$$%)_Oco +&23dfdc4w$!!sK=!/7lRh O<ժ5߯x^^RˢDZAohzngps˳>Ӝ~|f,gOG|*xRbCBڶ֋1f.Ú"n0y[P^+Bvc '?W'Zߗ:%)ɯ !B!B!B!:w !B!/BH !B^!O}]kܺu[7IJJ{Gy/5+BFYqdc{~iANd;l{Rm#d͏?%Sk֥or3_ZBH/-)_Vkv͋K;4ڵk GFFF1kdc+| Z ~6ԭҜs5b-3' sCִH?&ik܎^ڢB+#ORxuY_\˱m[6F8::wnA5u&'] *U O˗&R5NrcN]SڑMPʽϏctq= Z3uCBQ˚b}'}ӉZ>͘&yR)dr5 >cᵉy13xo^[G.VĀ*Tz__ĥDM9ȗԤ5O1e%B Ⅿj8`fTP,hCmidee뱶LYOΟ"zΔgcM$] &, Ȅ}~1чW ۞1:OTIɉ+1{}{৩leNON3[}zF *9 ?1޵]+حt[[}0LW0xWؾ[^hMKlz'sZ l>`[̇!Q73R,lQ&Լ#y2{{h5zxpY9kX1kUIՄk& 6i%Kft:b$v3r#]@@Mv{ { ]^=b"tk]r}(f,WOaw6?[׸SxkϪwj+iݣ:~jK-id#tav7ZZBh}ω 9YoKكٳ{e򬀍yyP\LbeOn FF_gV ݝ|v$ěOrXl^O{;6RvgZ~ gzs#vЩc,Ho+uwk1p`( Õ,TxX%ZzCm !|1ʶLRONzPzNyhvJmDFL)yXYYk:U?:A-Ʋп7eQ0P-:1㦉z#MЪ%-{s(C3 3mztذ3W݇u͋an6\rsU,g^a;۴ơi!tjʡtt0޿]:"\!$hnH2{^!)Ny ~% g9y#9%GXb Տ]ɨ\mv%ڀk ;|׊_4Uժ GͲ)!|>}P|I?Or: W0ЩKXvh>McsUG=O{6ƝR\B GPg XN#XW[tfcnn99y]ţGJڥ܂5GutVΈ ì5a^!fVMÊ<7К^­'w;jT^\qL9KbbY9,EgR{Z ˞I}5OGq!l3KFԑ~= .-d8r/sD}P^R~)eӻ @e6OYY4r!ZjH[9 "23t"Bʔ)C K]]soS,|ɃC;1:}gSbY*k@q G6m {}9 gA -ـRA?0OSustp)z!/R pS0J !o.r1݉ԨD IMN'v999XXZ`gc$IfLGGobZľAb.(Qo%fS|Yv$}X^.^\By)=GL)I,YtZxan#jK/vzƿC X W3"~T ZZ`IiXvBTvi,9ZPS{ *c텼;OCjʼn^3rnh󡎽%U;rcAM?7ފ>͘&Ci3o u`42#f#o8в$'rBokF_``gqȑ ;wƍ[y R-vЙ)aUxu9-K"^5H=@ud>?FLI^p+ަמ3i7Uo? IDAT_.C}yYJ%ejVM&/wNdY|{(T8 6RKYĴǪX,c<};-孙5ziB!h%pEv͙3iߡ UDF](* ( FWײb3gӽnEVi˨oQ=r&c ^0|J<糋[v6S/^lU3 kOu.GykRWnosJY<9~h֛!,B_N!M_c{ 2E5* a԰z:xx4^!+5x#*:))>|Όѣ_A V*JnРAllAU1KN"s\VkR^z֣gS0"8;]5tz`I3u JMyռ-3h)_ŏ{uj9O'cI2`ʿM:I5|IeTEaIb`~]q4Ma2ɒYz!4zpUGPJ5z<Íddƫcʯٹs?}ielL^.EwoJ(rrl6hvcÎK+t~v>:0yRʻXy# w>zWRbV󛭨wnyFҊU*pwB!D1J5EoP뉷xzMbE6lذ~WOjj<ÇqDGǠ(j^W _'s0N^s/]@Maە,^ѕ˯wb+<$9Ҝ~/eʺܼJ jW?BQڽ+I~E!;+^k';+* x}AhJuR&}Uօ]"V3Նӻ{/F ueOhf #J G6jV4t:3 c:xS ~P^^ _'k~'.bH&Yr(Ws%Tq%ҵ".I5wPr?^ͮ!ՙK&G_O3_fDt"ޓN=eUÝfԡ'0u},iKB!i#xD׮!8;dj"33n< lj>[j0Zsaρ,P9<#ugRl˸^q>%Lza7^wqr|SaM790i^{ >;W~3Eb ri>ضX`^e&RM '|w4ݼ lI: E !|^^\K0,--]ƝWhMDZFlfՄ18ipl!g|ǑxS? Cvѵl.nƉQzy3eYwp7HMX&}Uօ]"V3Նӻѽ[ {?p5gcXG41r#"/Pqq*䄣3۷oAU}ԴTΞ=KM1苽~4+(Z PA{BN/ጝ,tX/U[yw J{g0nf4UmR ޻ɮ`lN,ȠAz;ZIB*&K,C+|)|G*jƝuQ}X 'Ջ4!wK !?-U.Dʜ2R"Ow lwrB,YܸGff6Jk^4fx`>: _'̨0{~x-^f^.gV GL{4c3 ThY*A!V5cNP hsVB$5`eiE~~>UU ]UUL&餧sz"wmcؐW"SUa}~1GBF2++k+kHNN. T҈'&&xRSSqvvJ\\1kdc+|1jR Cvyݚ>HVl-3'EТޅIߕh$55kX[[dBUU};FCvv#֤`ekVX܍ fNXFNgi0aTH;ͱ縕"@!wWNNg#ϐB%_?<ϟ@Ւޅ/UvQZ9׬KŏcN]SڑMP EM8pƙn>O:֦^gyt ZTc"g OWleOr%Tq%ҵ".5:S~k>ݝЗP>S _55,L}{T#idF,FTqeI3 ON!Ѐ* 77wZ-+W @ӕ028<#1GfzH*_Άkw 4epJޣ}Ϟh ܵJutu ^؍׻;}%{ޘaAON3[}zF 4sf,bcLwYű MLޚ~ux!x"> UU^ύ7z*/_&..Ʉ ׮ţj鞴eRx ޜ"1IX5Ls=_<4t6b֤G݇y-hT֟1OȻ3F6l]u<5+a} lt4>y*Ow<6ó(#S:w4])ˀըP3QqA&.R_v`oohށe=j(ʣog%$=ή:f=:Ą;f9>9=NωG8r }?^w03-wf+8<)Zdndn:mn@3EywR!0,gW*`Srtst=rB<ygonf'iiiܾ}0-,,pvvFrMt:] Ot;ɄjщR41d(>kZ/e]i=vlؙFy!R`؎hڷ}{voZs?ʗfw(h4:;Ay*Q!C3 >//sΡhZjFZZ'N@բ~bm@Maە›䤧\lJHoG~v>߭8O~:zC.a١4az@Vb4 MvB|nn.ry W\!22Ǐs)-&ӟpŽ#'ք{%#Y5a +N>tj׼Y>[GpAMg;̩ױtGY^nN-d8r/sD}P^ gʔ$n.&&1_"S)|2338p FEQPwFt:zp;B߁ yXyRew8֣E}0e>Hj}Z#*ptZcsЩ(Vd\OWoFEKy6@ XIB*&K,XpBѰhBGvV6Yd( v8:9Fh|}pww/fmt]M"1pW@E +i6 <HN!xܗ*`b2"^ͳ*/~`:}~f gw56N!o -豣zRR"/~Pzoe0;vB!3\/-@^Vď z~%-Q?ܽN+!ORkc5Ӥ- !_G~}U.BF_FFB!#x!BH !B^!B!B!$B!/BR(SRINN6௝z#?/ -=ԲB|ԅHkҊ|4 b0 d2Nzz:ׯ'}6 ! `J`y*dD!Us&++k+kHNN. T҈'&&xRSSqvvJ\\qiGwx}]ZZPɪK.]5[{ڹӶlyՔj-a'êJ:3=*w\"R"}9RjzY鷫Q7JB rss1r6 d2*V+h..Vh6WIKaz?:3vrz"{C7&9't()ywX~sa?2P뾀gϱt8~w(ϏCVh3=IMʆձT?4(!ЀlRSS뇇{Ⱦ3E|Z̬b֢3ė~x a7l6ǿf;ϟH X/7v»F0Ղ\ fh켨|繚UpV/|TR+v LPp0ٰ֖!_e[7[Jh2"~T ZZ`I瑱}2 {^^{_% c˔ݽ`fvooC=X|$̈ț6l?w:cN]SڑMP u!/JVV\T$njqww\rXXXLFf:#ǔɳ7݂mB=4N]όȎ=xԫGQb׆ݝ8G&|W#@:z'L «α/l]rRDo?Xu|?es=xqAogӡ%5B?FLI^p$]!$ ,TU%+3[=7nի\|8L&66\V%??O))&)Fg\]'P㆛+$߸.oh܌ꕺv3oe﷢^]ɖ] 5m;6t`7\e=fΦ{݊ҖQ ޢz"V`u2iB%t;S8=?-QfAMZo`:Uyg&(^!$Ljck׮q-1;P'ZEQb(+v6v:^LDsQIݴOӽ K縬֠V{YI\SZ*`~w}ή8U?99CF:Y*Gpv8jThǴ#$%DBQeYIZZo. r jܼyNm2II;Ioŭ$pi?ruPPAդy˦}^گ_\Iؗ8bV]WHq,MUy{^/ !gy)=G `=vTOJJ/ʑB!Z|1oFY IDATԘB fB x!BH !B^!B!B!$B!/B x!BH !jSRINN6C?'/?|P4l^^RB!ēQ" Q+K+h4`( |Dzz:\]6dXޮ ;ECh%RB(udeebmeMVVɅAJZZOjj*.\+6|<*Rڜn5cܸzU-|h;r;|kM9ZRͥЄB<#rss1p-kkk\0Logh.z%=20"Iv$F1cW(Xu)-RŷدyM( )M#\66Jћԟ6 O'PmubdP|XlǮ~-|1&X8-Jz %TA" )EΊ R<"U=4Bu G;3~gfDzŔsY=U^.LɃ#2ˌ&::/ G:vrرcb6),,y"N=yUHs!:-YIL\N'=v-:]M'Ylo8+FTѤm{TG2a #2&cxxtFn>@ޛz<zV,]C*DJ7e@.hn?GڶXm_2 ]f@!<0 BܱdffBbb"躎驘f˯,6ћ+ Qz8ޖ_Gx9L]isó;$@I iK޿9;Xgd0kP85cuv;Q=]-4tй+7,f$BC'+ `3jWk|.5 X~ܱ]4z ~1w!Ϡ6O١i,\@!8  l6c;1==,<==4 OO/C0(.w85j}f"Nb^iמG'm*ݭo S&i\''mEw؋ >۾e?HYC?Q÷ 0Y6}=!D9-[/zH[dp,̃B!eV΄퍳3I  _zy#A-|K?ּ%Q N5:|&OqaE$shc\mJtLE}ѰiSEq]}ȲK$%#py*`u MgϪ\n8n8nB!߃w|YYL&iҤ 5ߟ\vލlb`2]fjdoɺO?G o q=@3Xhʉ̄-dР>ԇޝt6|9˨QLQ%3 "6yKe:>.9 }URh=m{jwq+xxTnYII !08rrI:Ν;ٷov8t%Q;1xeg+}u0{9g%oG^f5 [~V3@nx9vdk^Ȭ-6ŧrǻShuy~Ko]7~ |jy$>LCq6o0z='"dPS|vg`[`FoOx[W79~`a[!63w&G c,{CvޟNƼ5Q^}Fe_L.EW|\Yi9=MPEQ*?w4H,K~fIJOzϥﷶۙKzxRNbOo2㍉D[9offf1&0恥1( r|,UE"G L:S՝|:&bd$3s &kDŽBֳz'/{FbOپc=>;;GzTZR!8ZGSbB!D- /B!$B!/B x!BH !,RqfmM"!\ѕBԞ3_zmGD\] ˭Bq}B x!BH !B^!B!+:~XrbT9[ŅyRI!5K殘L [ii),@wR#Ǣ|ĔۜO-X7"/ x8COcNÂpB+u gs62yK>Qt,{vVGqAt@O-EH !*%Eɣm} tϽoS^VOx:LJOB2W u];vBRb gs֥ޤbZ4n;[Õy/x;s?fð.L\TVeha9K?W<ǃSa8yѺoͥpT&uz̖K|qm/um+s `ػ fOFeVhKI7Q1uhL 9Mf.!y^u # \0KGyyy,{x(&[g>Yj%wj9#jcߛx!l [{z_Vl_XUilb?/>D|ݏ%G(9ξmէ-B\_VV'.e2*72`;w,^Mm@(O6;E%+`uT /3||X¨@ }7s6u$[Yă<&X¯"{zV:YHt#$4K!ĵuECa`Xa/֎ǓѲ>kĺU}1QW6S/7AFn (xP9A<oNl7et:NɕׄBԂU Ebu!zł\oYX,h0vb> &sfS^>UJ|sg*\)[}_-ri?I !{vZWuSj7G5!8{ZA /g%?Mxuys><$ek6h8ho f1RmvB\(+&S)w&_2R,_ynM ̝ɑ"^ݪ򻔡N93姪_W0_BI޼Qc*o[&p*#}߭IfB\=x {ծ*k㧪Wޯוba^ݼLjȺtk3>Ho˅}@Ƕe]KnݱZ8rR`AGrs@»!77oW}S>\87]Yz?x+n64CAA7 X+$"=iiޗn0_U!Ei>sk=4;#PvOM&44<=ҷEHqjӧ`Fex9y ?K=)ޕ7/瞽0 McPTTHnnNBa3{Rd ^ǯ_pqq0Lzz:& tS೵HOjI à0WW78mE+<͢'aAHG3}kT 媁]3vLһ}{+=aT>~ouHSG7%]3{o y [޾Wfi>JWӿgpX<Ŧqo5j(*Xڲ?}%MV`5.Ha܁` qwd;5+: wE57f5 6JBo(xUMUWt+qZ~f9HNF46f>,u}Ƶu|*_n0i?qC~M~btN*"#q2TVTVW^0 <01Me(UjN6}]`Fй__,ʵ;C+v\]Mqo5osGyhhS,JI͝L5NR=qϚ ѹ3!!]Ù1wG`4l-AsocT0[?zVy WcnS%1pzE8)vb#".zk둇 sx5kOҞ1mqYדՍO@7Dm=']iL#ܧ''EA4 ]0 f6c6sW=DƱ!%W7۹eH&q|2%kpI+ػnTk6g|~{`AB¸j?Iޚ:&S>e]fPfCx ѓ犵z`ݜ7poHЧw) qk|՟{ցw gX^ݻB^^^^ތ1igm4Nuj|-k\(l3~q<؞>.b|͎oN`̃OG2q${߸zfͯ֌=9C9AvSʀF۳{~Gil؟ՈV:JnN |K\T(=7fu[?'ff61WxAHgcRG!V&04:p*koj΀Fl2g94eGϧS='p hڦ7EE$Θ_" *afUQM~MӉ|A6ĒP5lvQzN,&`YLجP8W8j"z\p?7 ֬d玣kPjfdсL;Cn2EUh[VEASAPu]uAr|<=)۩0wB3nW>o@ט4-ԋy%Ye{-'#N֙,\'?G+?-K)=Cս23Nejz K5tl\oX16߄W>.3GY{\:%_şan&\M+( ]GPyow[ 1 a[ic -zC޾*{)>F  B&Srd']QѡQ]"{v!q6ڂ[^w_r*3`ƏˇӧSؼ7 ίB|([غLU@wp8> L[bM?Et$1э[pa hL]_oOէo*}.=4 ~~CSjϻٵu#vՅ8Y<, VX-`(X 6ﺁX Rv?fcRCJ`әMqxZi|mnH}ȍ8bpW;74_5,;jc0/W*w%w6bOIKیull<ı:ziI^uFՍ\,+&UkV޼w_2VJJ  u^-OоInIDATLNk x[xń=b`}+^&]'OSXahŔ҉"D24ox:VLa%{X=-;]SRR/eڰ+%'Սb(N_[^X=iًKǟFSURNFv0ءOTy} Nގ!A=+,"*½b;0|22 0*7(ES8 q8j4 93ws+d>Gňѽ>}t YDҮU9,P[ ߬ltL')W'd;h:U`1(89Y.E_L{0vk!T,w.*^'xi˫_Ѽ~SMqVBNquq% Ŀ04]^\s޹/Oo())׏Qwav?w̶p 5![mnX8l=,1Z1FbIл{ ]4鸻ywnC̀ _\ϋk2-a )[ycdQ;L$8vFᎺJ{8}@1czbd}gY]3(t, \#HEb2p*8[ 8۬:Sr WYEfz)]F)Ɓ8W)94c;0 +XFtǐN)5+~k/US)۫ώuBTϹy]aS~mݦ6h^rk-2&W/ZԳOrxʚIKOf#-=7779u@AnPtVw;Aѯ.<|kD/9CVF*Y)ǯc7)G`3& M$ğE7r-`ţngλߗ3X/ bIb2͹Fqv)<܏s\< 'qq[CSIZ9wn$8ɉ,YxuՁ-Uv͟Ʈd I IۨK™4aV k !Qٱ&ԫkY{nOxv@dҕ0Kz΂:CLf­-,M)& h &DסTe_)|r -619\>AfQc F|-b(w?> vRx|y]Q5~PWkiZ9P^4b/_0zߝֽ%r`=?~ .9a^6_f݆gGv$~zQϜTv~f*[SMFk)/~7ɪssGI:Hn>s6Udw:(/ oc}]7 M`X<׫5m.w{d—)ǎgJxIrΒ׉MYڥA 2>l*Qvot&bd$ۦ<, ?ݝc&%%+V;q\KKj,z9.fzk+^g'OFIڌ-ZG>K~ֹp$݃6R`&A\'/JJjV:vkד;Grrr)ҟ 3w77ݓ'OxJ Z_i~@Sr4^y!=jF9Ujf/[quq%`?,)\xLQ%| að\u(7'/"n?uGٙܓ@ { DR^^v #~ډb5V0tŊsHci3gR0lkK%KJo&ńdB7Pa2S']0`21̘Lǝ{bp *sdX͏7б}l61tq*k~XGك8kJ%o|n޸zxDyY)Rt3&'3' g jФԿu*M&m帚Uo?d6sW2eEQVRN20PAK|Rz VYl)T(T Z T@. Ky'R?@mNҿ [>3Gk.2ydó?^ޜ:І(3 a(~!ѳ89j=:+VS vS=WY/֢uWgba2yHVbV'muL*~O>HtTl5| #u>],[iWWN]ER;mZ.Qe&FQY-ҧ-U~WR8CF̟N'cL{;=gˇr*=ydb=Y]$ji[=ըo:|\_dE>Gd%}N][˺x=ja0Z6o(c:{%HC٥OGE%ƓrCvkN#'Wߡ7jͷ3n_LK3 xa:؀E/oԸ~e:\AsH:Oqi_5q= Ef\?_O.{AӮ4ujk6k̦dB^F?ܡ~.4ǔӃhDYzs|mvPؐ^o%%Goܦ:ё6Ocǔ}ꗹ6"1iXn=}juFCu nLe16IFkuݕT}u\\^VʷX(K3jMՎT}i[oyo -y:jʒ䩶c_M7}\>ULҶXeRFJ^«Kֿo6>tNg:ar/MW}EM] ^泣u8cFݧt}e3CߞJF^B xº(r$9trl-I]=W[,97ӏ(唛5^:3T̵w32u$QA)y{|/4h|v_2M8Z/R7#Iǯ7֭7dTS3Nόͱ'ܡm^7BwnިھiRs$JAe*/-Dk$ -}O #O28XCn~vb"ɖ]6i=vvqRa2$Yg[u6OCKצ2+ɡĄ1fVe%*yfGmQx5n^׃Ct8vumLx8?[J|v /'~ȷb0߯m\ZfjiWHotçhȰ6K vU>էݞ'Uѣ!5Ԭ\ݚtxFa`ShɁ+[ 5jsVK3I^sAK5S49*~YP3uCqlfz-DKY{39Ytۄ'wunm@ uY.s^b2y*,̢Y+ϖp>6X]-Ib) Ec :СYJYZEL8R{VB%P&4N)?Z[7f~7*էRPbaL<$sBז 3zZ9{seܯ_3g+'ǐ ˔d2h,kۯ#V%>RGb"Y+uW")o HJ*+v:[ݦX%pt+Zh6C7K"눣F2uH5h|JL|ߒ'鏭 Ұ;ˢ)Ux n-qf:Z=ZNC!@ 6҆j~5 Y<inlFԀ+}7#ÔJ<ّ'4ϵ\G W+Yvʑ|5n]YSNVNRGG"o;&؏ᨷ:UhQLEH[XTVW7L~WrKmp$(:2QC oGěa:\ִ %M2sak.'̌UZxIe҆< {jm;rdԎc-e+vTEdާc_HјUZY4ڪ=ӟ{2IORbV-OڸXa"[m:8L|L-[Z.RTe.FSQXЁ*S鿽/?>:gp0,#44L3Y6?[J#)y?J[ۦul.u^RubM93l)sKsO(]W^U#jxs[u-"wjy8p]Z-2>^G.4zN8ZkvՍ^v`Uuޫդܘ4cWu5mቛqpΜ(3QU:1U앙*>T(SN)VV,N_}͈ǏQzޚ93D?8JXN?8J(SN?8J(SN?8J(SN?8J(SN?8J(SN?8J\*QGUkSaQVVe~6#44L3['NJ%'l)񊏎T@0v '0~ի筙3#.;yx s~piğ-=Qp @p )P@p )P`)y#tI)?hl)񊏎T@0v '@%&Lԩ\mێZǺr~g;[gΌ(-%tnxɥJդT|3 PAis_4iRm5~LϳiZϺr~g;{a./e&J'ȩ"K"~J̥1*b?8nտO~:OPdIU'S[9ts[3 >A>WQ\F/a*g8G?/i|Gڄ> /?TI jeUGKW҉_Fy]V\q JuY1r%΋Uq S`?)@\X .p 8VK%NUq S`?)@\X .p 8VK%N K.QU\q \]|a+[cr/n?}2uw]I֝5UrJ?U}.ufWjq:-I:vRR2pTIX,jGMx˞[>yx3BǂGGQONZ?EǿG%o2ӻY]$sРW7hSi˟Jw.ռbĥ$'Al6RWlJIWZVK6q4Nj9Rp;Q/<@{61׫idHԚ7&+*~>XQGO(Tح놞~ÌmɊyCə굾Jnve]6MTkk{R#{7+2*Qݟ`ܼ<ÊnML^λf(6`z+s\u9A.[_.WNw-+wS&tubiPh Ƕj҆q襬=?k'_kOJ:TҟK?;JKK;_r8dĉװac9:-TE;XO' :\=Wh=ҥ{պiz:CY;gUy?e}[7M~@AJZL.W^PǯZ_3<;Ժ oRUVVj;Sywy@>%=G_؏^[3duTokt&͛>KqisNSHZ|ww~9UE5W`$Ojn$oTTh3Z=:L?>G-Wg /I7/)$)wW1FhlNz[JQZFE*owGМE} 5Ok:h+>xN}Tj} mx ӡ_+%zJn}:F'?5*/WG g,@u2'B+έt7џSA\ ҮSՠSzuhZ^Wt}BfjY_z\kέ rR~O~)pjz\;{IO*|“5|6FkzYI>:|Uv|s ?Ieu;-XN~ mq7drr.*L`y2$<^Cԯi Z]^W \?A> _O}ne԰u{:pȮ.27W>S[jMlLu2^T0hfkyLM?WtRCKUku^ݟ7~υ^aWVDsYI-z:8ע2&(71VIdMzɴSYԠi3^pVv6Evd#:SJNHO@ )]C /m,X<۪ӴyZF ;|hSsFmM;kVz'.sv[:,Sf6%ܪ?hi;wUA2G_51?SN*&rY;]1?.0*2K))g޷STCCW_VCU22mORRbl@L^B_7[sysaeRSTuDU9κ&-X)лTL+)ѡzaIZ9vRar8 0e^xVGb5ȆDչgZuXJp؋p!#-.cvGeU>$ ^]{9Y4N4R`FHHP^YN<$B/Z;_@u V؂҉"Wr~3'-|5 QO۾bsW G8ofT%;]=FIn*ƅlS[S>HБ i^.W]~ڽ8e~]<>E[-tS^{+m=ڵ#}6s\LԐ%Ǯ5nHEkVկ\|5hbyKK6ѱJܿI~jY I5b`&hpCd#̌uZz:"%6C.j&mt}Sڵ}g:%L$< 3n}˿+W IRfܱniU0h(f })]7hO?j?(=*/u5 Kd v>*{5Y JTtwϵtZ}"_n>Լ ]]':?}nkeMokUZي=UiW52u4fVd:dzɣhB < e'Fii]c\]^'{pǷޥpyWKuWgaZ+&jv n XMz6GU9܊}b ?qΟ5wG˖zs5ZZs?BjVőm+ujۨX e쬳R2 /iHjXQA%<\C /5'Z9_OPWD?Lрy~5 5S GG*IREɪI+[J#)L]e&i99W[9_T$yi u]jL8ۺk=pgK>"iVsr{4?5MF~uj%OOW:uX"ʔQ8ƪp$UɩKRrrbN߃o5oLVL5aHZ@l)sKsOgҥs (_'ߴ5]5U qCX-")OO/yzyˣ𧗷,{>+Q1 8.A5_]qU+O7hz6C 8A\П/BeUPPkIQ쏥pI &w4MQWv99mLj2nRFQf&R_3mԑ=繀\6RS7` V2՟Cu|˾5zGpp)U  .,F-vZנZw; \e}x1r%pqqUFMUZY]]eаPևRW q \x"\\h b?)*bD@\PLTEugvY1r%*c KeU8/VK%NUq S`?)@\X .p 8VK%NUq S`?)@\X8  ~]v% ,EU'8w O,tz48'.m(]G ۫ y0 :`%^V_q]҉)TTςU߷EOO.=G{7:XNUhju̔頴}ڴ-P?F?."Ci@*gDtv8-Z|z^E_\|!P(-X`qaxCp!*>TnZ:a%~D蕛G@9z IRʪ}G5h`iSh&U'Kʟ%LދШ.D@5YP\$GS *9zx_& ZYoN7EVK9ZY3sq}LK3 xa:G#f?jD9LW iVpk+4ijzK~]wSǏjπ4"CF,9^reAՀ-dM(]30RB mm=$^G Q BZH߻t9s8f>l:w_}Nܨ5Ժ}b=pҿՠA2UN|^8}@͛>{!{9 Vr|E{сo WvJ嵣}Mn"VpQHK_[nקK(~nw!MЏM;ϓm8u.|7آ:Ar=]j;UxT+?}Fsɓ ePozĦe QVEI"S՚,d7Z;@Zkk*-,Hc[C'7TMrm%ķzw֦#327hJ/S5^]3*:!UG7˔Zt|>B$*a]* 4㹲V+FJ5RװT4mxK {Dg(nb

PVIրje٣Ei$wQ;*Q0vD<S}=vVL\o=n'+ADV~JE|}uyx>ULXe)-!F;nQD_kުJN9] ~P#DmZYeUvmf%+6b4^ڹإ) j-6mHyzC vϑ(+kGuI*~io_M_GhgqeoВ˕^2U\~ Q'kZ>D$lj_AuϤ/*''GhSsFmM;[TPja> ]YEC-UĴYWr8Jd(9Q_l߳W:)?i|+Zռ[,QD*/.g27k,f(RUH#K)1+v4okol03RVNf4lJ>)SrG+ٯB'RK\ };P8.3#3RiZKV+}e&P^!]ΰt߹z 7Tp`s5W0[tcߵ~zհEO]sX]M Mc1:A]\txQ9dSž}j+\MF`v&I]pv=5kv_]u5j*_FS¬NVg4w{5iLUc&@+ .[VWTE{Qn(\/o]8i!=bsѢfG=q3SzvvQCbgOUD}:U l誼DY"\P3%P|tnt:)U*+>:R%\;ɵKya\-ᣞ5kE= fR)=Z_cx*++ΫӇ&b<;OǧQ^')B!NKBWS\\T""#d`߰MӨ$4$ -[QHN'=r+H S!BHB\<{n.5o@^7Gp\k  '99__vM\q B!į3-{|L'0Q=Cu!.qi{?煿LFUU,Y Za0HMHJe8]n~J`-K! !B_gyڶ$L3zE,\fg~n5vl<~ 7ew-֢ 9h7h:nc cF ho?`l5i[o3U61f[Wv*TtsTb\22M7w݇8CڜޝQ%8$EKee _~?VZo^[p!AU rB!'%;PsqDPn7JeruNee:z]ȫotN7d@ym5_fg9R_FHn{^C8>,>}t#(T q8b{|] 8I- g E'4MG/O-.ovU&k#μ_u՞ovR}%eaLhu*^s->#u^UUW&^sb?F+D9C.־Y닣2w;yoayZm|G8ZoϿ],❻^Պ{-C9zo!Gq!BV-È܃'W^Ͳ `2@oS?i٢}x}3~U٘çKwQ߬ۂsX%-b~j4l/lZZG-A4iAUU,f 񉴎kMt2C+dm:6d?~ϠE5y{ӻ/r`[;cw_>6V$ך#[^|AGg{@JJ `0x8CqIo7?j ľ?w·u|{{(,ġCT"3̢҆wbBBBX9}*1A% މ<xB!D^]onUy8mTE3١,ȮTV)63j>x6XA`jUmMLL yb { U5QS]ɸ#pi|+0 ahYwK{6 ČiQ.;浳X}CWv\b/ƲBJ!";QSS?zJޑo Я޻{̽}ͼGrոD0J6-#,|wAkmڇEsa cwalixx<21W Tг(tԕ((=1( CQVk8Ӂ${2o|C(%X&&:|7hz]u4Oh V@ѴLYDIS_7=Z({ZbyX'u7yDTnv70o|_aD-[ aXz5tHjnt7k/?w B# ?Pg~OOpBlM'#_ # NIm'e!B벇'+vge.0 qVeoYCp+q=PmM]ߥtʑ[SUz/sո؈^SF&v*,{zRF69 .tL86}H3P fr-*!h_}A ctp!9ټ53ƍh#6}=Xq!(R7bx8'; ۇʊ2uǟX+8$ח{dIMS/7޺ eFњ׶KNAۂbdj{@M Q]O6>n:y;RI$<7O &b2q= 27΃FުjV~*yt b`ys/Gva5Ʒqe8fo|nܾuo}~Z]HRg|=4A^U|53ƧՌ}}Oէ@Ȩg xB9p\X>׊o>HLs:rOWW+#~uwXz3 z\x~_)9 0_Nnu݆}ƍYԘ;Y %X]Z֋?^OsOc>ƞGkb((Vx5? '+o>K?akу+ xX GetoX77.@V.Ns,- hKI E!ޓ}p؞'}#?+PSSMxHչ%ַ4SUiD6Cm!̤`j&<7gnmYAy05/0q8BQh<>*YTUdTpUb4J6(\TMR( gao8;AAU娊pïjȇFĄfȷu K6RPPDHpv?g4j۠w~դeRa?}NPBg`痯ӯǵ%(*~6cfҾÙ4b6n$""<.KN|tv EˈMLb /f ҈uy}p's{C/Wy$ D:o,8؃k!>~ٯ㱉Del;re_6nggBּ/X}7$5p秓E\)Ι=ψ wVfOSj)[>xeE'iI&k>| U:ݼ3 >5wO#.Ey5O> 'ޙe=@I&9+NQN1XQ-9݂xVLan⧧ngCNV{^[F3捗 wP0Ay>_ͥ{/r%q3F5l L7wcutG9j!9+Ww"rm |8Հ`@U 0?p}t:їcn)^cab(eŴm1Oonb26wMݥ* 2SGؼ),?ۉ^S£i10Hqo :H,I82䓏QcuiL}Ϻ}иF.?jRo}.mW|qw6(| /X9.7jM4(X>`3I`vi1#yb^|a>rm442b7B*9Pv5ֈYV^Q~ؑlݵ}WZzM6m{KTF>ohc5%HyMFcOP.} 8{/$.}8wZl9D*P9[a0YPFݚ=h:^EUYd7T ѣF (~ԠU%el)t1ӭs'o@btYv!&MW/uVȅI77:<)gU׼ ׼ڄU?OYQ>ŸL1 & 4Pf7zSq]Ngز{NgEAѨVxBTz%6 46ޓ蘆AD!}PjĿEa{$#'uaݟ]駫+PH<=[ ۞K]"f^c/ݹ8q5櫑8mO[Uy/C;v|ͮ}Tո]0jOɷ~m M!d8#w`lC`u_Wo땳+>"w~-}&{㻌*СC< 9V.5lÁJ+ZxnWeix+˅9‰*b5^6SaФ{t F6)Qu}ݸER+`h0xTם8N֮YCNNNOYdLUރeV1rP63p`~'X|~ݮrޓ] 8i~T  EU1Yb2[vc01[nVj8y8yTN3 ͥlO(W3mr/V??h'ϐE.Y2iƟSdHo ;3iƟzѳ-SՅb8ֽ.c?ego. .ccisPuui摌_3XOaR;H_E|3||@;GxaQ ٧۶S,?ݶh/}S!%x3V3 )6#RTTȇ{7cQVH2햛];~ ks֣2Dt7+S `Cb5c]Fj{f`bng%+{ B&}ow]UW"⌞5)Slkt:ՓΝ;)QW ]1m#231J'});Zg18ou;4^0w18z/џQɌd+:)ne#iymJx Xl'IޖCdC=rEf[y<9{ܘ{OZo#@S7hE)Չx"ع^gwHXɄLۮ`زZJ$BsWo;'s#:-Oٹ0ɣCO?+2쎃ְlt3leEѣr[.}S!Ex58\\Dpp0So|Fk6 ___dϏ̴& KĔeRZdϙ%f蓬ߐN/jJ.Vmn`0PSK]+vmu9>a qx\:EP]GԾeW9_wQTݍ sv{` ˉ˄Ї?C)㈷"95F˛^R%H;?쥋FLcA%x}Чsڬ4"4|̞s2, - 7Mn[]B$cF`P { IDAT&!.S{?;تcnİaʙϽܞ dΤG>`YI{:VӺt rS] _$jY[橿VCQ 7}ˍ_ɡǏp:ӸqO}h*㌏`DUUEjۂ晲 }dZf` F#( oǻQ׮Mf:a4\}O(!B?u ɰm>?{ݝC8kK]5t!x~~dU_EHl%7za~Z>OfCXL:(@74îU7jZ Hz~|瘛t}vߓ*t/&o=0_qH4dɜ'XYIT@bX" k|=; %.Oϡѻwkx{'8GCK9A8Uy̡ DĠe"&DzGTֲ' s@ Ĩ'ӝy |IwSUpr)B!5߭[7 --ۋ8+^.'*2R$h4vع@rrrr"Nklzxr4{ #<_|ȱxg. )ic{{~GO_dXyϲp‰GSoGZH\[YxuL|ñbF#]_!=2I+2_a(ʑ޺{G$Gt]v:&yv7< ^OC,_j'(( ^| 5.*-"gOR?WM52z.YB[_Fy'?|Tv:42@q'5c,;~:p@ΡNTe`=˂J Ur~x\8/P[$P1i<-GKx8~>Zookun 'i.RG޺z].oc*B '7M 7W߽ͰA&cg:-[ıw_AAdge} gKuk_ u?5UP|a))-QFl>Fh._m~5~x M^ȕ/qL oLxtli=rsL1⌦,jt̝ILL?~,܊Ew{jǓC^y>{gSK##6wMR,X(IQvBv5YS%0f !~^]x{z'HE485NVlqXIF]A)hT9B5Pk*OHgm ;*maٻMj\n}䪿Pz5M;Kss4 cq.@ه׏jaRRUe(I,T]F^EZ5>њ/HZHkZNIDx0` i[Mܽ=4AB\ jwYx)~w1$yW!ަa ;X0>d0 d<~!Q6oȫu?ʱpngUVB"[\AøX,>xܵ$/{(&⨩`4b0~7f?M! !nOMs.S5z_>_ӥm6M k`mu%;/ Aשn ?sR{vUEtIJpq1W󼷺ᨭH ekB∋j[܃6 P»w kR1e= ۅh^:gR>O1 B .Q|`.:%qS:-N֥ar:01|7ևޓdM {~aDE2oFVk8K f6TT<MSqDAyUE(ޖ^ù+ۅ)<-[еsSxl[މnvgd64v.S5{h2gBJN WM  ڷ L/a4Ƿܩeel޼ w[rstPZGET֭{}܆Q8;弗QS-1j*}G "*i ;zO}{"mq!B!~Jd}OKSd6.֩hEjFSUP4 oXh`c0A5\V셋QJT(3G5ZQTw&ՀdF=ǰ: 63e#4pѿy+%8cd{ j$ݬv)ѳ[Ml{j(|߬~iKy|[ X>p-Hc_$3GbjC? 0Gdp&߀~TKz}{1uy/~U oGΘwYtGFz6׼фj46B!B_Pv"qJēфfl5HQ@Uؾ?,Y{4@eDI6+yܸ]7r=nY.T  Qݘ_p(ĵok FB#<©,:v5Akj#d̍r.'Vv_V[CٛB#0?j+./EQUZa=}VQV&܅~29zz(EQ}1YXvZ<~)u[) M~n-VKJod!Bqd,+(*UQ5n*\_;MnJ=~GLXLUmzS`:!GQ3U_v\P 7F,vTWȱW!B\٩޹Jq B!B\$% !B!+B!BHB!B!$ !~t)!B!Wk .KHB!xdUqgP!B B!B!$ !B!xB!B B!~;1N AȾ)0J!8>+e dBq~H B!B_%iB_YI!H!R3Kt!!8C"K!nݺiiidB!BKI?9MJsIENDB`gsequencer-1.4.24/docs/images/ags_select_notes_dialog.png0000644000175000017500000003336413246707333020450 00000000000000PNG  IHDR(1bKGD pHYs+tIME  90YciTXtCommentCreated with GIMPd.e IDATxw|U%77BB =ЛDAAPt]EVWgA]4E)6tT:{ - %!!!!&ef~ܔ[|>fΜ9sfs+Ȉp@ d7'wy~eykjkr״50oj٧oEb};\üjUUIޞP.7oU*t/(*}Hym@@5Ums/Pp(W~S>|۾%8~CPEZrVF"mk޾ Źcۦ:5,7vmF8|\ˏ/EwO5V\_Eb׈ݔ[,CΞM+oEЬYo`ڈ%79k/Px @y2V@<,8|}UՑ ;]chN F@]w# zzվ<ҖEl]Np\u: :R= <*O4A]dD)ש2 `ҾCB}(1*(I̞3*TSTIcNC=Iu!9fdAV=[bNUV[ :͐*[P0*{w:~G|-(!u$yp/;=WE¹ͨ42"\չ5;$Сmbٰ($߯q3;Ā nܓh4^O5kd^p$IBaa28YB'9kک$9*ai$ogKEmK#Tg'6,g+GC-4NV-7PrT8+-%+Y,f,*>~Q*轼utkAɲ @qq1nhh5h$ H dUӲxf:7 RHnV:7d$t! =֝~(k.OJUJMsӟC{8(Q͝ԶG0y ;q\V9M17xokm75l>3~Π2v4N(sla_QWyԧ`Yp!LMOF,^ *<0aMjdAiX.2& Qpt:ZIA#i澀LTiAIN֋leTaQIuz+sVfgϭU崭sȜ,+V b0cHqr&N|jٞ=c Zxlo3xH(HeI$`!MAl*+lFjp =<-VRThѫ q©@` J-@!lFUVfgp&mr |O`p$4 M;qi=jBjSuo8Z-bA`HVS>}ZR ƍUTVɩUmM$h?Xx&NT.^\FA8ց˵xEl2aX*,&NgVXPzcpՈXgdo 6#CǙ?>H"Eeɒ)t0_3LYE*4לÅ^ذC Xv-bk]^ħאݝ_C|[ҭ/ Ҍh(2k:ߐw1,>ZkXQ5}\u} ~L8ŋ>ʙ0q~~~.ԛl*[mbѢjeVV&b*lwlԲ +NƑÛ|=&֑>'˖ '?ł֢''f_ lq/ W&|*Iw ZT І>]c5qZTwv JM(1c3YE)tO7'mH5˨Jy Jf-hLGX=U]lO8ڴ@ᬛJ5 S:w]@-#UuEsW*sz3t-Kߟ'L*iR87 d6(2ZnF7`2)))FQ#0 &c(xn ƎC6hْ>6&参%˷qFqt&IS<'ƹ}CG=ΘJe݇R[57P}o[e]TY3R8jH@hf3 b2)6cZf!?r'I 7`x2zLUNy=<=V:(0NwUz78_r ߒo8Q,E>ݘb#Z2ghѓkWRV4ZlL1ڹT$JQ)2|ј_J5/3,YBm(y{ᇌE&̱ 2ӬcIRZV.}{nahލ~49~2Eݞu>ArY$UX%*U[5n-|En`x$^ێaRcri?nn0hBE4q~~ڽ܌<[P!R))=z.]PTTH|!WM!3OO5$TS*+șu3gH,x]GY4 ˌ19fuW>]5ۢI|]~B5&чxηX#MCO#+3fJ!'GڐpФ:(=϶QѺ?dd)z Yhw4i2Vl[h!&Nįb Buo4ZCrF///9ue2[6m%96op0lJTiA*$opy(n"cZb(9_2 }s:w# X~΄DkfO4&ޓvoeQgw5/4! eœkp%ޜ)޴iq;sbF!SKl>on|^&փ6-"祲o9\lݞׄnXJrqG*s~U`y%Uu=ˤV9̗ܶ7ɓY'%ZeGD:l|cćy{K '<,'OM|qyvqhxC=IOu"1K'thUQ~\[jrx%i‚&" Oޡf UO;7mb /t| Ԡdĸr.{s;Խ5:]#k]%%2h {SƄQa\.{ E̠cds∆n> >=FRy ac\,GW,w>L͝((gv,Pդw{QBxC4Ԝ\xniNCԍ_|JbĿu4_#gW$ WyķmWoAIx=.[,Yfa$!qlt-TB'tƺE# e?{ š"xLԩ(/ϡŰ&}R: 4ai @/}h⃔PlAb7oKnvvË>q<A|d/Bp}L,s̭,PeJS|dpSK+l|vCٳR7˩Kah MA.C>D=XL.\Hqj&sD:fV]&Ԩn,۾$?+֝Plmw Â}cF2ΝsϞȣٳ{}PQ;SBVW8 c9f_1\41HqJ"t@Wo%_g0m3Eo%lK鑝wjRQ<^>-GY1 F1Wu5Fu wj1:@ 3>?]@l|Xjq-HVRe$.v!ە(Vn&/<J'3>w-}]eJ3 1iwp>rǴ} ojB14E9&X4w}b޾brt+«) _iP.}U׍zοFuS}'!{T3<4r6"jCG6 {`:A `:F@6 05Fϯ蔝v ۠ {c5?KSe;'i2Ɲiם 'dD + z9 l`S>KHâjу% ΍TV YзWp Z?oWCuSNB CrdYYC5R%KB7WQN`\|+12*ceOs_#O7O Ħo˜6}/VɌoA#dӷ)TJ| 7=jA&植3ɪI_uce<|?NK?pUNFVMꦆlQjo|g;4yP;#*~:%t?JVX دfPe[:4Aލ6q񜭡Z8t y4g(\JJō@pxaA 7r'փ@Pk.5Ś]yu/C<H?A]oqO^8-nw xȽ?Ba +"@ %~'*C 10<)!h5f?z̙V# kT=GE1hvL.?H*oRݦ}wg H*◟ŭ:qC|v@.xGS.4'DP'0*^`y?ڎy7vQ}G/CxX0)sWsOߗ9dW;{{xY ՟Ź\Uhf%g5}`&4itmBEKİ<>^yCE1tܕM/@֢h5z[iږip  aW;SfqїwsMxj)PR43_d[Xx_lC3[<=Q'3vT_^7aLCq39~],K6jGd'O::}foGҫ1M݂LIO4R3J}/MJVv fXϖhBύ@pJFzI)PG2MLB0Yct}.ٷIIwÁx$/7e>Q?$cԤLy,ٗ H~AKٯSX~.-Mh$\][NW&"FEZ'P :*Prfv?>rN:DIE'ڧ cc3!װLեD5'JJ+ %>2ƒwbT+}Pp9IHu&n_㴫ze=?±6=hӾ3mG>῰hR4e7+>e&,,|MQkEQyؽ)Rr/#A&pݒR oŋœ,xfN`|NS53 jktT޶[ˤ(h' 8gNAD!dĵiA&)͢HK9*8{9pě]+BkѣUv'F pnџFG؅(rrԂlT@2Gkânу^w^n2U^-ƖM$>0CLg!eg ?-BUq/}ш{=8vqyۋOg+"y8^Xˎ$7GS|;gsc{вPy/67x &3m0vx A>%Gl- ˔Ջ,*̰3\IFF{Teze// CUN-,5H<t~pf a"9_a wmL}x 7yMVr=¥HsVNҿH{: 5e!;ρ8yrϏLwj5O<:X.;ί5`EՐ4֮~yl"qFVs]$\GR L߾|58wyGTN">TM!9~|'/"JIĂu?QaA n Ui:`d-{e]g3qBE Xo7VԷb"@VAE`N(uEXC%@ "0@(w^KD`NZS:SА;hvm)s @ՙg1}1>zq 嫊qלi>—EN> T ܩ{=ǒS5| Ҏ,?bn"p@P.T vdnSJ 9$@ ;E`N(;TNc[w1r@Z8 CO$ppnVla8zNS A;VNuQK{?26 >9 zQ4ҺziKMd+)/S;ˆ6Rq<&oWZA՝vi\CU+>9 S׎^"|,ޚ_c7w])s ,p_6vɯer"s u_tڧL##_|pD`NAϺ ƉaA U!s @5pjsNS #w Bj-1pg7^7DN(A!P늰1J \?D`O(97S 꺕jJ{dz?~"ɭSPh;qP; Vks= @JN3HhS*Z"X[*Pc ?ڦ! T(S UwwoGҫ1M\u"p@P.C|M(ɏK1FLLIDAT)tE6[w|ަrsdyXwV)OԟWH]Y">Qw zSPUo)')"@XP@ ,(AU!P:D`Oz)"0@T=1Br*s @ +4T<(@ Jp9B8GZ"s @՚҉ΈFksNS <郎ыKH/_UЍLCk;$Pu'pJKb2Ob;Y~x5"w [RN`{L 9u@>ݰC jcNS ʎ:S-]8+rГ.  }V-p)u+p:(ХA+S4TEN,GٻH#է-7yJ"w [Tβbtە`A=՝vi\C)p)hHԟveBNSАg;uˆt7]cO~-{w{SЀȈ>e 6&s ux}|(n`7N J % S Sw!P S U;+ 3$R\ !P@@ \kj$?ak$I9zސ TQWEOz.] A]C@ %B(@ e^ʆ]1C01#ŝq lEVUPUT([`9c=LT}1dր :$:+%˥u VҲf> z"$0Aܱ(v :?o*aU@QʜOU&NCGUU%(,Dc"1_`:&-w:CDx(FBKyqY̊ &Ybpb\5%)AbtthXjqt::mǏŃ KUPtT饇2 w̆9~ΠI,d9h$IUEQ٪bU,VRMCo\J`AGΏ!apXD6x:׸* j˞=jɫfdr9DBR>3ؼ9^ Z1L1UUico%0ow$ -biy7A05)V`_KAw`Q47ҿb[AmO;7. Rf +XM~fO?0qds+M2KQͅoڠҿc3S/dҾyKwc*y%o60p "_C6qd^~xI,* *Z-f$yб]{}+}KljJ^/xfQ#_+,(m`9]ls2}B'*"n',+g sӣH;/6e=9S9A[ÑKHqt$wDS~'K--wtBޥ|/Ėֻ _y!ݴyJ ъ"'fkt?OMTSո5q*#~Չ;x9_˽a 750݇c4駜z%Պ(b*$Z'_,+4$vDʷ+ ]\d)O!6'CzA&sˇ﷽e\¤'?o$6*;k6}ׇc;ƫNա$jߦ#<$![e#@()"(b)Uʱ_l`?`S vsD뇆WSZ|+9ơhq,&7v<24mO%>ǐo@c/3HST/*>D` Ɗ5 K,6#ީx#s+e<Yt ˊMлUS wҺW"Du ,qlx?$O6iz4n]NھۏbP 9m^]onr~Ds|rl>9Mw<RO~i)m|_=2 ZSI/=D;/Ǎ2o9e#rg;6G`! O-ac+{%ɗȘ0 c&N)zzvi'iz:}⻕k(;PdR8]TXD6FRJAEEU%tZ &//ӀI߬M.ctzx ں&P*b0L'N-)1VYb6_1ỏYeTRn¨!""*oC JT \P[ЩkΙ)\(I&Qub:_jН4%4Mx#o):&I[W犔߷p)/ES9te߷Ss(UEQm~^@EQmcHDͿwHTRBofX*ˠXd5f| FG/᭗k*V4mГSHDdh*Rs*\ToC}+=БzO~k@)ȊmH'[/uʦg8 ldAI1x s/?aԟg@M^(9\M7*Dw7'揀b-A#Quy3SL*^7RJcIgнٷЦKoB橙V~!׶Lvʩᄒ˹\cbTwӏ~dcDOt0ۉooD&aȤ唒oRjV}T,Ȋ^!χkҦ}kp7:R8n-Yc(>#{/Ӿ{kOdLOy,XՊ(V;alYJT.j2ēѱʉuk`uCPRTBg[h8`p%E7'JJ&T}'8~M_Oؼ{7| %t F}w Ht%;HiGѥ+՚%sLJD7nZIDۙQ{(Vzqr/'lHmB-pٸ-cÙt[]ߝaw򟶐C1~ QjIVtnIBZƅS\j`r&lƬKNvOUO|?…'8>xLfc]7 CQ)ق(Xe+H%edu)Gʒe+i&n>@%, $q>4o`gۓM IȀ%k#?9BMN M} _: S9ÿP6c@@]'If.vk>6 g}l?yo{@h%ٸZU10~]NS>pt^HNsg&.}42ȃ/206v+I]o>^gPhՌ|ON&ԥ% ]U@/!t݅]QLp6| kR-mH*%$[̈́',|Λ|{:XX,$IY18 Ju)nz{g4ZLfIGyVZ4qw]'?a5h)k( d'Y~)lM1wʄeld+0FpKĊZ1 ͩ_}c_I2_ hi~y_Mfha;{e*Y魄iJֹ y_9ifWRGM"F`Öj'+;@H~ӼhF[?o_t/Q|T۽ rH[{}- 4wOE@D87bj1#[-oT`Gi_2Klݱ__"G>9oo.ΉJq $w݅ïבsrߧ)#o'؜;&MeDb1b1lBVtV{i]O`10))*g:umN0"Er*s1_0STэ@е@Ջ-~LJqw3J$MNGS:n _7@ Qў@](d:EZV?>[=NxRcmAhhh4Z4kuw5 n.Յ|zȲBZ-V CmxOsQthuzt:=ZGe^4Zm)v=[6ӧg/M#QZ:_OW(n+[Qe$TU6BU JtR***#*-HjUͻV&AѠw  FKxT,QU$Ir0;NװN>7үw ٞqUUe/H@>ێy#JhiPujْJ(fժm Q>H$I$ٶ ݽy~qo@Xo*9,2*L`*6b*1b*)@F6-EUPdYYQCXa]`,j1c'*FXP6+f iрpkEBj-Zї__?tz7z7b^0TR-N /^>h:Q7RV?@QW!@ !PpY>EOz. wQ >@p=a?A@ %B(@ %,_ @@ k?pjIENDB`gsequencer-1.4.24/docs/images/ags_matrix.png0000644000175000017500000002606413246707333015745 00000000000000PNG  IHDR bKGD pHYs+tIME /l0(iTXtCommentCreated with GIMPd.e IDATxy\TvQ@sA\, SѲYrK{W^vۻE[mͰlQ\*˝0QE9?LEu/|8|?߯eZ!,#8TfJmJ*yze<Wlgo gY/\3Pz \D@. 't?@*JJcu5F2*~m 쿫{/pFp9~e/3zxT-z@~,G:MDâ %Mԛy%N&V==QKoR_'eg*SUe)Ƿs-LGNfpfmYvDv:ڑ ^=)VWdRh߱jX#_vҏ>Tu/UdquOx TkSBg6FmL#G5}-CMihwA{K+&D._@z2P,滘*oݯnmqԫO[=4tP584mP,C?LM?jSt]dcydҦСͽW_~{tۭ=Լ9:d*o:uj@%tVֳK#P>դQm p2<驈Q־2ZgI jJ Z+뻧4uvXzHGw=>ZƂCLy~Yx1-om˔juaצjdܣJ;t@6I:G[hO oggE wTZػ^?~6WkQYzLO]m*'ԻUmJ+tӓOΗ#?ϫ4?U}z9GVRጘtVԷ~]RjlxN]sؖ_k;V[8뫾BK*K,jе')Owwk6+_81 \3\]GNTCJ2\wuT5Qf#5 q(m״}dּZӯ+9g&/tmY-A=K$-SPMfz+'LyՕ϶j]?ZWOjw vg ynH%{<}+i_j{7j1xo7Uq/w'+g3<{ }]@TK<8梨[IH/{efTrJM o,˶.]ST^^e.d@ŖY隺ڽWɮ?+c/]we#ju>Vteڨ+uULޝ:y\Զ6),GEU=P|jm?R4banUzJ}zuZ,: Nlӊ鲛6TƺxgnuS7KM[}vbz&3rT/H=:O?&V\IQ3yiϻ @4t"QD%xRv4{菄l#a>o2nBK<{CZ$n](C-%˒TdѡGmHQ|Mou6睛%ּiXԮJ^oe9C>M{ϭ7Uţ|/8ɡ/<ד#][罯5룗+s'$Kp5kQs{@P=K{eayn9OoTڟKyZv.J\gKWdyY ݯ. \U5iZ_ZwQvզ4}]-H֖ 7ت[2ei˷MF7_Tzv.M ,r/1Ө:$]"e4F`կ#2 6N3aN=oF>fjֲ>ժ%e,u dnI9f>Nf/CU} \fC&9'lEuT^;IQQm}oViv/ K,/)fD)$S[OhR| ;VUJ۹Jkn_G?ОC~TѪ_=ǔ$<۪vjr%P`@=Nb)F>:,Oo/.TZsUjWNnd*I)f/M\K\su!??*)ɨ@AކRB?V/uiB;edUh HyV2MZ? =Q_G6%f3GEIպۼy(y1z}5R5N|Z] tZ08#$"ʴ&ğSϖf5!^!Q,k.u?([Ln)-H>-btMWݷp$@uR1%X-i;C;'.1o@uRUSOOx'^HNUES^I(*FSRJ_E P+ʥ1rVzoь+9ҬU? m,ZwdU\ҥ=صg#id21Pxʫޮr"'x$^}VP/6cUkB[<@Ĩs P,QU41Uz&1 ^/v=qr:d˱aԥʁUP)qo{n KX(*FSpoҖ|LuנAAn} 75qSC9X4k?tu+5k?ap1\GJg)2 ""T@NIҡC;5hГwT'~s۠ I){R|Q5:Iw걅[J8O.~XQwj?V:H:GuDr(*enM's:qjҴ:jyqC8 in6Q@ūWSMmqr4Q?iT-_QݺkٖF^{mvw8KC5 ^YziK(?jdg؃Ԥm eW¿/^z .BVȑk;s_Y;O[U弗 WwP-}__bSӓڗp~wOԩS5~|ڴ&L(z:.@ՠC'׏՚=Y2- uc. h({I6CN=Gu呱KI~C6w~}e~WGJ iչ|NѦ?,ή%y\H̢*uI]ar_RL'wlcҿZH2jQDgny8Іj_ϾQd P@B5&gkm?P&3^+W,*O<L$!]Q-Ԡ fJ>ண5xdxF3N=4S͞*=3?S? 0uDu7 $-oʔ$KC5BnC__euuݧܐVSJ1}?[Kd*}TYO6܎US|9jO ̼T l?,+wD<O{ė7f7uOO En~('IrYrH:m5Я֮}=$劘~E'7oVoW_*D5І_S4UW?'kԃ9 @]׶[Ҭ<TnTW1Z&Dl[^ӯPiROGWp*0\ Z(o;n ,JmY_nzpB<@qҿrxAGjmT9/.1IJ1{ud-mZYD_iFBB<5Ԩ*-оSr8$ţſ*~so*mU$yysCis!KS$Zк7wY믓o9(4} $Ym+sVQ.TnC5lEqiz䒙V5vM)q]?Ny9q@u[vTpP}U6:1հM'Etl5 Lђٟ)g4tEκٺ})wȽJ2(@IG0s'A'Nx˫bqXz\ Zu$<*Q@rp~ j}Oq`4$cc^ĸgGm/g֡2qcFӠq|6~@;.MyJHMy[[X7Hox8k5my2Lј/hƴo2#5w[AS׀9…K/ p U㇧y~O?W؟ժߕ5M4-za;% |<'Oԑu|Ew zp:1?`r΍v/~A;> o|v3I|{#S̽sW,LHEοCm_謲+vNdoI&AWDj?K7t]26C}GUf*1@"Fi#jݦ{){=z4k ;\ Q~Q5]&eh3G@V,]RxUMe*kZDMJ:јA& ylXNbGr{{etSU%[:}}z7e*%Cz]?oP·3ul} 9VARt-[FRN2vI.!Q5!^C&9MJNVҬ&+$"J^JK{kdxL,oRLJ5-m>rLB8c^~n5Z;9+Gk#I$-oI\PMR͢cJ iSɝ_;]/V,#M UXPVuuxtjʖfWdARnmv=Goק4w_&ꑩ}U{6my!wjz( <7RN;bz'xwYb>#QPMW1g@Z;:gtk(J{JuVfJHKQBQGZkҸ"T՛ӉWU_=;&?!N3s!Nfyk~5 +3tBK0AЊcuMh嫣?5)a1&\,*,Y8̧+!ܦ~>Mk>Y\ դ]}G5!uG W8J&uMHPy1 KQT|< M~ 5=3Ozk=ʛ{ϭ |ըxn IDAT}~9}]FS*Qy.WTON/EK@rzd Xhbڕp?T)R0B"LkBBL:rVgKʚ(yEF+)n.ƮM֒a2ML?h7"3oEǔjQAҌfWdrjºPwVWsu:U4R\k˥*[;UDUTGTٴo 0SLX>W'$?e{j1E2EQ.'_*`?jvS֑)o zz%n8zEKzEm_\)y̼b3^ gUH߹<ռd]LoOgfoR;?:g!Q5!^C&IJ@D4 Wdfi҈]%df'/$)ϼjS}GI3P%Ҭv_+W,"x'M8ITMLU$}>2Mk:P EMHwvv).GNzfoF(!ü$pRp"**KQqWڮ2DE4d:dڎhUTvF\{pU(~~:E!%9Os*ڏT]\ʣbƎQX:-ot"! rU Y_5JJ$)wV/ޫ{P_IRȶ)d]y[mz7YÞAgIxmg,Q`"Up.7,;=k~Vvؠ Ӟ6RϐdftOS`M/ؼJ&"@9(Ӛ!:=ʖf5!^!QVRl%]ڃ]%dyF> 9M]A]nO 1@ayJY6E]<lR;mjO+d5Kh{I3:TW}TR;*H1?*fWd)ܬTv κ=*t,mܣ:9-u]3W W2K5d28ĩ@E+*qUPQJ?T Rth_eU6-(Ӛ!.YeMWHD"7[qI`c&k0}3&W$TS}TR;*H1?*fWd!Y,:l#pyhjJ2]>>t Tbu3_+ۣ}шd*ۥs'!B!Ebt:t:ʩSJ=.MJ&GrEɧJJz_,S\Ntʼ|t2ZO2u*be"st)ry+*tؖfrKrm߶'̶v?m;[UyikۖZsC[U![}]cvjФ(җՒKo.R:ҫ˧S|K)[K锖L:W7+R:کb:eɞՔ*]mAWmiO{՘mcܖF[Zs>aw?/W2mMM붴j=mlsn1[wL#ےߕKrĉ+'3SN h_BY4X̧WNnlE}SZNGr=v>Ӯi;J CUb}U*$3!̙jf9sr9|+˦^NTFM뫖H{Q| UW˗vL9U24j҇Uk}bѶZ+jw.}J>lϔ^GV-V&x,h8V*sOQ48jb! А;ַ*<_b0h mOSWC_H$7OvPVO8\߮IC%QsY`&x T[fd_PbZ׿"x ;@Pn3{Q>d_mS L&kB!Š"ão;6PUɄjR1&L&YJ_g)]Vؘ2rbb9-^BV' >f-<3V=-J4ř'Eöe9+ )mI2$,<_]3:Sm~9Ę[3 6#d3lf8󄽗Vf,S̓j(5^zjX^N<#j3ҷ^WKO+8 E͛DV|6D9v !B!ut:].?h?)( )}zMAaaqzf03`iwZ׷9sT>Zn9KѬb=J6[NX۟f77 Z̬h2SZ 3Wjeai}+ieW>dag>d'!:4ōDLIgfz*|31H1yxOZũ(doXȴHp !čٳg0r*??ٳ*y3Oz}7/@Pt:tE)T?J3O"PBʽe~*Ŏ[khj%zbl-P]qbksRm5`Ugl|V!RP蛪!-}:*>?2OtcJ(LLX`2ߺn5SxC4޻+ٱ9f4?+Ll1@ɏ UVrd_^MGEr8㋧/S,Ƌo}\o|5}XΎo~ҟZɕ_rO=S>/2-m`k=OX7Ll2WЁpdI;4#Kdّ E5s'(/A4k[Y0~ i0('hs$mۯ|B$+x" sWgoX{(b'/__=5Cѫ9xlGkg4XQTTԲORW?KQ ; c7:F2_-V9A^+3l^n/-RY-Tbk6cgdժn'UHbrρl3+Z29?R5OUjT=3e\g3zYC,<BCQ+rww'!u搕%n!e^Sٸ٤Bj'_އxdbkJ'O MS5}y4~sk؀6x/c!Λ/}Ŋ8_dvf`ϑi4kJg?Np&EoFK (~B!1߼Gt$_瞢7p |F ye#3Xgx"ADD0槒u? Q*t(jҪQUjQV!*l'oU>?T?U*ӵ8kV<SU9';yR~41PۮV`X_x1/gcM?ՅLoc o lf*U*=Zd{j[m[Gp+ռm%xU p8G߭2gKWqJű/(]|N-nII[_mkU}V"m Saaa䐇G%rsr!'''%8Z2TᄬUUy|$՘p.Nd]$$$^VNPLxڙR+;jUМjϞg*TzRT1ޫT1U&x7=9w ]7'Do"}}4^G2lqcYv'ڂ2BU\ߎ}j'ˠ-|[ 'ױYb8;Rp{yy$fyJ:ħ}dd2jߊLF6É'+7a-fND(HO+ϛIG !B58.F.vUP]/\uk+rUnt2s$K5Rέ^&To.&}K9sB!¶I u7wTB!6争 H9mB!B=0"ûB!BJ*}- !B!LQ/ !B!$x(mP]FB!7 lO!B!$xB!B $zqN!BH$ˇדFB!< !B!OB!B!BLR-B!Y'"'6Nj, /{6Kz`+|/hq^z5s.{&^~FW^y%OlI-Dܿ/]qGPh5YwdIc ֿ;bw5!Cw9wwk`slC!B ̺sZf)p~)c?ح%L[F'Ch+?!3HX +G¡b91z>OC )'8rU-R__bA^䦡B!BHtI@gOH4kQ5$v q| (ݛDumu0 38o:?=ɗADZh0עK`*#{4w,;z멳Is[ ?gngqD]D⪞bOY+8@ x;"Dml;MGsPQlûE2U1~LϞt6 vvp.̞oR^C/E*\#5hG\Vnu-[X& dlCԯה](dUۃ)7t@pQĮ;O~@X}ϓ_'i[ n'曯͋ k&SF@;|1UC9ʕIQ2Is۽ϛȐO(E!BqO_fWP.\1_=9j&M{k8`LwRKD:4/dfK`so#j>K̏,;pX~cҎjaeS+4Q5ШtylNw䬠8פՠjvDǻf{֋r,¯A+|pww)#Đb8Qu{{u5==Sç&}&U$;6Ő4"7/t2z@=5PhL `,K?rH}[Ԩy]FQˏٔĹcH͉h<׃R m)XhV-XBf'쎋BOQ.<2y:ZqquO!BT| X: gG1d8y_ɹy{#BgűcI6H71:fp&.9a}OS)X$2~uWVx[߈fR> \\TPθ']jO6$6'@uã^S O~P8 mVg_N!Bܔ҈"û5X4 ;694ߛ1~T!%%tf>W-s`-e^ّgzZ-sD}/{B!.|.*Sۈt?Is=a@` pv&08ÂYB!0p0dr_dVZi;8|Q6B!& ~)?_vSM)lxk(!B!4B!B ĵ|x=i!B M íA!Bq됙'!B!@fYB!BH$QEA!B n=-FBj( u{1A!M9^Id<A!ǿfB!BOB!D%8+¿(dxזѰ%B[ҥKFwWi9M}ӥ11rB oVRg2$¬I#X B+-3O< !WaBqsŘOB!U`B\46!/ym;)bWЫt~t}BLlyГ;j lߓoJBlQŝkxcl#!DP\zi rqp>o?6ToyŒ9Qp/RrTLjy'nm!̓W9/=ȅۺ3yҵ. N@~Zqv8ky(nA7^o IDATv7dpOu\B\ .+p7sKƠx"1+LIݪzV:+?g+/7P*|N˔WF~YlIxl\Lpc`ͮci|6 &QǹL5t+l [7^nܘ_:RD֚ݎk+MI$b@2y ribRLIp>?rjԌ9t;T7FwW#Kظ R݅7^~e 8uyy^+Sy{!R98:\zz3f K>a_8Z #G4FCΕ:NG9ȏeH %TO&^VR1\PjwkmVNFXrnq 2d6x4myCsV ϘK)fn4{bdT]0_A/5v q-:yt{ &w{P;sڵEJocj gdMsX'l-ν<ԍ#_8. cxTS&wԋ,'WCVg~s"EY1?9ʽMˉ\^52>x%iR?vlK-Lؔy\qOf˨&Kwv5c#x1owB`'s N%Щ6_G^ xLiyf=gr.lNp{ߜ=o5= V&GdxZwhr4StoR\m5.|k~ 'n3u5:<"ɣJ;.[&.Iɢ;#0V9 ?a.85U6.FW-lQ4Q Nh<~;9V{8]yTOGӠ0=QC` mVo6ADQxἣci޴I_7 !F}t>-9j< ~W AB*kC3 꿋aU pK0=.:)ĵol]ggN_ɐ (I{r|[Sɹ/^]<4ҷOݎ=WM<(ufMЎ<"R9?| H] '>ol3Þ=RSͦSah7j} Xs{(ZF5r%Qvģi+<*~ړVw,fٲj%c)[0εc9{_z~OY1;Bo6s5ҼsG"cXԓtZf71SįHZ*95e.`@9dhL:z9lOZyǒm@LϮY1._Y-Oq?ǫa3|uZʤ%<񕹄`3ѨGF4?M>u;EO4܇˛9∓yF]_6 nouww6t$tkюZԈ|ObRAM]̎MyFj8;_Ik={HH*=:.)͵+hzhOH85}Kb(81P=D`^t =oOMdhxZ_ٲʁ6S>uzxI7_љ)7>CFѶk/˴ڋ>CFUØQqdz3=gG;AfNXö,܃dߘp?S( 5 A`48-$,cd$bX̦nt~]Z +) 1F֏ϊ7ᩦsh_8 ntx3o4v*i#{bL&#ńg(.Թg_pDʟ91ztx3~bY19w̠ߝy'&P'*c<^U';w0]iz}>(&.@j> \uQw(zۇF;pa#8:R5/ ƳMX:p]AuqEStqrfXCmMo|?#aIvCi6j]:ܷ֠>qil˥du!lY#'i53Hq.PP򍠞o\n6Kc=Ѩ Ǜ5>rB:7+DMC -xYjy6.芏?n^: ֨yYh=^Zz2sjK4wV9$v kMKQ}\vo;2d(R1#>>A1:ujIqģ#A)M/p%+O*Pb9Im͞56AAY6gp'v-R=' s:/\rS5ԥbRX|_QpZ d?=z~SYdg{\F7XcuWW'͛?>7 = Ull(/*}ϓ_)(E;X04>]pɮr. 5KǑWxb숪v<nLUb %fje.0j-}[b kfe w/^_`#Q VǣOS<?7We e<^XOP S1 6SUUˇuE+ot{ЯԱY o1~2?|QL&T Y冀wlp2b7f|gCqgK:2\T ܼbVVlI˾|N;nGPc[9ddzlw\1fOM@a"f|Ӹ=/._·Aڢ6Qj }ny}11{HOh?Yfu5 rդ#/+#N0o &uT"v4##ONyЮĿ;LNmydt\\ݯ٘% 56n. rDO lދ-PL9deנA>^sL073H9p6%p1ŔĹcH͉h<׃R m)(~Cq?nm$[ v %)Ժw8^s5}ǯldd'{N~=8c>~8WbD}4KzfQmڷqQnf'`,)R摝d競M,Nm?O^~+W'@¼D猡iu0;3q1ͱ}PcX61CG|+#r;kbGUT's/י0nmlAĸ4[a͕-cѷGQqߝȷKLޖ‘ڣ&vc@Wھ?tdb;M^¢-xg/5$~VrSh|2;ozCP G͟h#G@Gbz9`-o mx` y>W*SN"W|n4_Nnġal26'ȇ.Kȓſ?U8>뫞GWs|=PO=BXsH|A`"řdVi{*n^qJ1Edw%>AhߩvIzߌׇ )8iQ~:džK5n8VMfm+t2f.4 v'uIu8K*9Voxߖ5yB@>{16u[EjNyG9SцE{Ԇ۲ALOpoq̿ؿmNxeI,+ûn-e^bc9voJm{3չ jq-m3,CxF(-Y>ޕ*3& 7o=~oc=u߀*& nd"}V/f/ϊǫK_U|JIۻ z]ŧ]$_*s[ ?g<+gW܉cxo`Ofi&B!BD>}t>-9j< tödwt$ND+L!}R7L0@(> c?uNҀ#']!W;^ǬkI4Ȱ9$-sDMyU J;oT+#07WB!*qٞS1sؾ/'%pmف2,`x2ΐ $ԡ]<:ӭk3Nb&S#iT2VĔ>#WOgڷ_ٟ|䭬^G5{+xвSSIZ˱*n/?<ճK 3;q۸tuB!⺪̓shC@ܝnҙ!#iǏQz)xժkp4{k +,kC m'J3&"WvimNQ/np cN]H/B!'6z?51S61jiBU>$ $̛JtzF_G S8ͧ~1q| GS}y1,FؤuaiαLzKixcz2X~K/ĥ`…1R$xB!zR"##K3kKz6ߛ1~ܔܑ$B!ĿoVRk4G&}08֝8 !BD%Z~v/ ȄR[Y|"xB!Bt=!B!@.B!B;I$B!7L _m?[iq4"4Lr-B!]3[+8_8sirΑ zgΰ3(X-#m W_#,{%6sB!Xy*&cw,6Nz}w]q謐ud5/LLB!BP\R݉'xФs2г}ew{P;sڵE3QISyc?g!fn4{bdT]0_AġoH5vy~Lǰ.9c,<[hJѢ&m#{Ej >$_*s[ ?g<+Ĺ%J2wι B!B\ (ݝбNF@dHYr! t.K1<09x9Pypk OvVV[CV嫽jVvefQIm)ڵcUP^~xg9@fv&طq'2$B!5asLuHQT Sp׽}h 6^:+#) 72/8q8%8`p|P(LkE %D,*}Ϙt^͵mNQ/n0TqC6]7s""6nGz%B! vݺcH!T5=sWUrPP7>_wFޞC1Rp~LZ[ؾׇop>, vW[= $CvD=Ih@싣wH5CׇzO#[;rӓB!ׂ XcX61CG|+#r;kb\c"k|?{?rH71:fp&.9_OS3c&0(I쏸d v嫵&O wN%u-fc]J7Jg>)B\ fhx*\H9@)E'!B!%22>ûHM/}7e!w$ !BqsJ*}֨ gw?j>6NuNB!B{E5f :t'/^H8 o+M E+B!ae{B!Ba\'B!vI!B!uΏΓ0O}5ˡ5>fPCC!BqY=woKiݼNr8g wQgfIoH jh +.ņߺ}ﺖņ.*6DDTl Ԁ@ {OfZh~]W.23~f97Tv{5z]zN)0D㞺{p^gw1A¿i=7ū`oW\+w^+qq#5{4nr'<ςEt%.i&OOhoe¹|=}Y>Kd3:Wse2fדp=kXYB zy|>{k!DJ:[lR] O .Llb e )"""""OF@_w1*06o^˧>Ϯ(zOUS\[o;t0M㟻kv#7v?CuKȸ|zaYq l<$>Of Bο?^{{=ņɂ#g zLza|#n&~[ggYAĀ?e Տyk}4ݤ~|r6싼d2|wn*Sgl{ꀭ|5)~Х1t؇%;ʵsXVrQ_x3з{gŔ?s,jS>-aDV4}ɢvKz԰Yl.<{5,io fSF.%Y/|I .gvs:E^—9D:Z@@+8{NrF2I.ڛ >ΝC{p md k|ug8"$AK3a$!&_/Vk\'Qƽo9k3/LҖSװif4 ÓU"" Œc>fc@s8`OŤѫ/C+^΢M yx0~zM̃ c]U k:WoF33l~Uu?;77 L~W&˟̶NԵ'GOcoLv(@4Ʒ ׳yA…#8*^Ϣv< ,#?v:c !}Sа5U$;;Sj, visp#QtlirX;R`!"`lm oQ+7<+NO>NDnKΥB>tY* Җī G];DDDDDN0 Xm} 7{{&զ1݆rpe'LHpui;: "~m mul"dʻO`h.6ǩl65t%0r!'ۮdVPV@= ;n㖻s[[X)]HǘDJ8~FK UkZ[st(1Kr)5cO xaE]xs~z pZ#u0qDŴ%i`o7G &.&zaˣH=On-ȑȨ'F[ygeϾq9=ڏdeYv/\+9}OIo a]€3|'Ιpa;glLDDDDD眕ܝQ=krM4'YsnKꅻ­sB L~2|>, -"""""kx:UGct7FGggW]'N).^}bEz!_ygcwm&("}`ceDDDDDO6?"K|tzIy R2|='/oy|`Rvӊqzы hƴݔ[P^JFɢHo{_y\00\%d~_mCM)`_YM8ws+RK6"$mI!=u nNI6`Ƽ-uTSj~08j~}vL?;mѩkO:ư2əQq3 K^n^sp(mc=Fbϩ80 6ȕP'^%=d0=zgDDDDD Ob'LHpui;]Hb6ЪCO"n$L\L$AD'"–GQ [KF92O*#G⏷0|K:( 19cE:&㦫㟷(c?2@oT6+sÓFӅˮ$0Zi\wu9 O"""""" O"""""" J ""̥ T9#A O""ۙșe֪cn{""""""'AIDDDDDDIDDDDDVVe“H&Sx9(<Ó##1~8&q7q^\,.zQ@nhXQ_Qf6絙NfS^DD䧞ISgBoO,,|rwwf[!&4fՋކƧru#颦$X+CUƖEveĭ:}xE,e>x" U 9S/ڼ-^?p iwdq!womr׃ 6W`OOh; Tok~{I{ua4<w T 9“YSDA>\vi%;-cPn#.cnfy= 7ܳʝ-i}ޭ\<7ё8 J= 1w6fqaSxo2T=j\ԝm*Is5Nl#Σn`IQSyeJx7sA.?d[l9/Uیox7aÜY60| l;?]k'aoKꅻ­sB L"=A}z\Z}~E ed_ogYr:fXzsn&uf|c<..$kwČn"WED4 OGeEqlXo?Qƭ3, b2G" Jja{iߖʬ *–USBE?1ݞFy1ɋCmCNI7wSl ǤG?^:0k0B~&("9E=&i_A[`9S 1z6Yly]t:Q#-aw 3S=Y빳X'nkOi٧<`UjOB Au|lȥ$o"?^ZEVlnNK5x8HXIIǀ.CßАk|l6()9UE,cߛ}{(-abl) &edSoe_EpmRCEoDvQf%,BZo'm7奔OcJ'C1D NYGiO5 0IǚÃ+྄E!$j.k їH""r&gаNg0Ft_Y:ty3Fo8#gP]:p|vlvX pUmZF_;<^]\ZS7nu~"/Nh۾3νd?bўcvV6#,02Iɬ?X+ 2#1< sV5u{1#[}Ȯrf^-)ai0qMQH8w@^w]Ʃw>CMO=eX6ascjD^}d"iWA$Vu1}KnP⊗(u |}1(8,JXudmZB֦%kO{!#z*lK03 SnC]LLUW&˟̶NԵ'GOcoLv4NcUAuG6vj!_|#Ř*kー*)""-lL|o(mn~>sw&Nݱ#h[#[r3ȳ=dH\JK! CgnJʚ*E)Xcbr+ h}* qiskYЎ sm?Xv[h[½Ef>*!goa$_]UDLM]23;3Wl0f qCa5IDDڻv\{4<Οʎw+" #0 ׏ b'ﰹ*_Ir'ψ~ jM~w cGg\JXCCyQ#6Eɔw]lX8,طef|W"Vg ?oKxL"G dlNlUHf*C{'UQ݆ѿ{'LHpui;]',UمzzITSvţI`PIQTT× 1l}*"gjx }w(3<}-" vh3o.G!ȉxyr}н78^޾?kymsjݝgIn <Ĭ1Q{P_KNZ2K*>ʓNN(Ջ^}W0f) b]bҭ,taUmgwݭ jӨ2oisear>*g571ggQ6UF;oaԗtTQƋOԎgi3_2-dKK_ǫXƏ"۠&7oʦ7ç7: 4"Gv^0]y ݾC'2U{;O=oz"/TK9! n/sKJJjN'%ѧ:]p+,;Aw8a_3W8 BF<丯׌T2.`N ""Y2jB_x3kU&_OlO;$yV8}[}Nb<9ůpaP$""""_I+tgmfړn7}vSV9>'VDDDDD pm//"""""r"""""" O"""""rjBt}\DDDDDDjy9 jy_ͬU*(<a*(L o=+-ܵd֎]_U`&"cJbv4MWbHY˘~^OM*aorg-7%0: `-_'}}ܿ% #ܡ-vZw+Mtd0ΆBREmeZ7k뫤CߎnÆ9ϳ`mnc#Σn`IQSyeJqB]UDbd_ogYr:fXzsn&uf|c<..$kwČn"WED4 OGeEqlиC/d+rc#7읍CήCId VHSHw(7dd Wٙ{xGϿm4O$|+NxqklL2K=p=LH,9Q#xI`w줬 b64 q`Ȥ\uYBL!lxSm *1wz|"6 '9SS 1z6Yly]t:Q#-aw 3S=Y빳X'nkOi٧<`UjOBI0\;iŸ-u+IIǀ.4ßА]uM HsRojjm*ٳc/.mS@b1&6!Trrޠ:m6eR^E7XD4xxjgX䕿0UIifcxGٽmsq3q}l?M8m/Aٚ^wsG`g V-#ֆNصi o'cخC~2wVad9:u`7ª5r3ȳ,Ll6WIJpaH\JK! cOuVAOxcv}9CrSlB9 J1rgdo`{ ,j=ɵwM#2ix:?=EVEFGla OasZ.Hb}mG/=;;g$i.2Dݩd*_Ir'ψ~ jM~w c`VPV@= 1,2 xn$=ǍYKK|bv#|#/z̢GX}ILeh"0wș@!yy 6O?7a#oa9=Yrt/78 p}wn{^}>@mYSX$ם`XR6Z]k1kHxN=xU,J."""""gzTW<<ȯf֪LADDDDD0 ADDDDDNEDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDDIDDDDDP DDDDde.]"J vh4“,s2T_ڬUiZC۞““““F퉈iYJܖeXtމK."X?Qs\Q)<4MhO2 _/'neiAyZ)8HtnSXр?=/ѣHhq~DDDDT_gsfz~>',S*j4ڮ'ٟ1Y]EFJ-p5}m,eǜGx/;!q>}6gЭs|in7ibYel[o{bW6m$+{5[{W̿ɉ=^30oܥ\_}ݞ{bWxm{ԡ #tx:#?n7ޯ#\s!eG~ȫcD4GI &_/?{00#>y^g ~E67dC#v, 4, 40 :۾|oo ;#Ic2w+ W>[?oWH~_l ϯYSIDDDDN+ㅌDb\ks*. vO;8=8681 (*6׳e/jN |O֯N*`ˬdKgDyQ54 ptTa]d&ۍiʲhrm_ohNxV:6o7Hq̎/B6!K7k7?4{nnU@k ')#[""mTQkuçiuo0ޑQg5x!e\5fu&5x6[sKRuNnl,,,aQ㎼‹жpC 9.i G;n HF“uHh:qMC}OY;uYKg߰co>n,w5GIx6F\/g %5V^yV<=:}}]MEb'{)~ O""""rs` 4-& MY  eZ`/E4/"XHZ=|f6y&~xrE\uMwt\?3&?e6]D->5{p]7~_(#4cxa9}&se:vo1]V hc'^gF_p2~պ>O""""rZ{%xm+*k+Em!?.m6M<6}yo&:uM8xЇnMv,^D-_J׾ G{k@j3$\n~:04yCaÔ]-Lrpdx C:rnj*q奱^v۴&0(Ѻ=.2vVlOq*ށ EEC [}&^gbsE\x چz.d/輆)cZdKfWZ1={`'TLN$ {P*zqRFՃsby9ٮO\,lH(YՀyD#[PY[kgUx~D8r<޻7ӛ,'KUC۞^'Հrv8X* k܆ffc;986qiaӿo_BtXpprf;b,N.#6^~p>QxӋUԲjЀ@t`~?*ˊ1M͆p`wxpx`ttbw ix'Dž$Xsje$wKPB7^L&Q=9}NN %8вغ<<;<;NGLow8!A7K'??|ool6~b>valZDDDDalx8px:ny\d7v;efck OuUTQWSMChrv`Z&metcV15R\ 8}q O""""rZ(;v*)qp:pz«p\ Mmn{No<}DDDDD P1~!jQxQx'9%Ve“q>$%%YF"""""""M5kDDDDDDN“““““<: ''_t``IENDB`gsequencer-1.4.24/docs/images/AGS_recall_lifecycle.png0000644000175000017500000007722313246707333017565 00000000000000PNG  IHDRqiEbKGD IDATxy@T?gXdLEq+5Wҟw4q!FVovӺUBQA]E֙i893_Ù9foy9ϑhZfBѤ_p!---;;P޻wOV ])F& 6l?uH)f/EDRSO=3m4k SĮtÆ ? !^^^O>ĉ}||lll.߿rΝ7o/}/h!Fھ}{xx5!Z+Fmmmϟ?hKDmN TTT]TwL3f*/**"jllܽ{w޽ !Νn "F*G!﫯PTT4eBC.x蔔L81//Go=<3^)b\PP}oBcÔ[1%|>`k֬Kn:B͛{A?E,yk׮%''GFF ]wOuu?+3w$%^ Fd)B>}z'G;+++77 v֭[nioiiiBmtN!33{CkjjmZuVL/>x744,_u3طoT*}G333ꩧKVPSSf=zGZNNμy󜝝̙S^^l{nJ_m۶Bx?ᕖBx|NFSVVo3w(3gΤ577J|`s3gTTTL>}崱… tɓcbbzjMW^yhׯg6>{?Ls{Tgx{{_d0 tvܹ*7W&]z(88vYY7痝Mogee)v]]9sرcڍ7JR??7x鶰cft)v_M1c_OO4[{ݗ_~966T`:v-^RRKonnnF=ȩSx zq˖->}vP)£ ݻwߧׯ\.]//&qe |_7SGQ*ΝcZt7ZxqnnnKKKeeܺ[Mvmm-!Ka 2Ex ;v wWXlٲ즦̨(ھp5k֔Z@uuuNNEɓܹ\PPnݺ &dgg3sttٳJ1z 2KBYCCMCCC'Juvv5kVnn.ZNJJ :tѣGi{}}}LLL&߿-[lmmһ{~i1%%eΜ92L*+GvrrrbAAA^^^IIIΈ&|ᇝ*0#Fddd>}zqʕٳg h!!!V2AUR222.t)|SBN8!W^]VVR֬Y3{lc`]vMRoذaB] SDa޼yÇ rEAѣG3/!! < O>2o<8},೏X`ݻw׷_~=zt览믿NٴiSKKеX{VUUM4 bJ览֎֎ )bagg~BB?|C2ED|ɗ_~aw3f͚KT ]K>8y~ 0z0TzY,Ckz览c222&NUں'Fz͛7[[[:t"d{GOí["""J~#`Huu3{4"+ݻwӻϝ;'tE2E4{GOҷ>w] m۶1/XB袺;ъ]ii 677B|ɉ'8;;RXmmF1~ܹs͋/:u_~55jX )桰/0jK*>˖-6mеo)DѤ_pŋ*F!G߯L& 7n?3ŋ81ڄ3zVAeCgVVV>s!S3S28C?X S3S28C?X S3S28d ~ >@)),)h28w,)),)),)),) d p,))aX S3| ,)),)),)2X S3| h28_~)HD}W***t)/^_2k֬իW ],O*9((ҫW{n =z_M])F%K͍7|}}MY>Q tѢE)`6dmm~zLc-Z(44u… L_2%HZwU|MAqBs=zn˼yBBBDH$\.T1 NfΜ9cǎgΜ9rHaAg7n7֭['l% B1i$TzI A@1/d#t,>!SO2L>!SO2L>!SO2L>!SO2L>!SO2L>!SO2!Hᮡ5d < |BxoooLk.(HIh|}},YRWWG7qۧOsVTT;)zxeBc]zeLm>P1)dϟOMM/..fϞ=?k4BROOxyy04DZxqnnnKKKee%ӮSF  L1'/ʕ+󫫫W^6+VXlYvvvSSSfffTTmsttٳJawqqn\`oSK?Yu&ozxxdݻwFꤤ`{{C=z?~<((+))yԮ]ε 殡!SO2xS S_ȔnA$=] |BX>IH$󳷷2dȅ >@יyWW׾}MMMz{q0;˧HO:UUU>S_}շ~[QQ1sLMN:~ʕ~[o<G,!-B)))i&YYYիW ɵZ@ﯨ|hE>ZDD"444d2lҁZ@ﯨOЁER37SjL:H իW߾}۫W^hOy\̏>cY46rb`۷_&XAoj񿿢h^UlI|B)> d |B)'d |B)'d |B)'d |B)'d |B)'d |2sLKXHea} X~ $ɱcDŽtj9s+k1D"t ଩ήQZ@tc4 !M8,3d a!S ,pXg`8C 2Xΐ)pL8,3d a!S ,pXg`8C 2Xΐ)pL8,3d a!S ,pXg`8C 2Xΐ)pL8,3d a!S ,pXg`@â]Z"H|ږؿujjj73h֬Y[}`){> ڵkÇ mfLܹS&ٳgڴi666 bL?8::kw}7vfgʮ]֮]{=[[ۤ-Dj*'''Bȝ;w^u={nc(SJoQ[[K[^|E;;;bL?ӧk-++[f޽{di)III2lLBlmmkA,)oκ-Mjkku3eƍ{^jUݥKJR "! 򊊊6SO}GÆ uVuu'3f  ppp <ҧO 1K,aP3gTTz駟}#""~e˖;w΂ӳlٲ3gdзaÆ+W|cǎ5~yni~3egΜ$''B"##K.1"/M2bʝ6űfeƍ-O4img7nܘ4iJEEŻkA,)'GͥNzPmڜp̙+W9iܲeKח L?h4[B"""Ο?w=mnF ̣2dHZZZVV֨Q!~aW L?:thȐ!/_>uԄ  m>xbII7mh.ԩS >ѣ?%!SliMN}3,pXg`8C 2Xΐ)pL8,3d a!S ,pXg`8C 2Xΐ)pL8,3d aiZ>.d #++KV꧔,+d >hii-zV?k׮ V%21n8OOϗ^z),,쫯PVV1c/^ܫWa=ZhƍdffΝ;wȑ˗/6*..27mڴ1c/__%_b6|xRRRee?~;ws5X S#G<...ʯP(rrr׮]O|BW q \>`zxFFF:uJVnVϟ?ӣGSLLLzzP5eBHJJ)wJA߿ݹÆ S*9p<8114d ԩSюxݻwLLLZZʒcooO;8+C) ;w$&&@"DDD$''?|3OА}0*:۷o0Lr=a)wMLLԽ\9_z(7 @PXP.27z޽{/^41)6lJZ߲_@C>>>9LhM4ׯ\~rJs_mll+:eh(7##C:b 㭬~bAYH6L1oz={잃q ƚP.2,+!dDժ[d_|t7zyy999ܹS>9<*j555Զهo>oooT裏fff˗;;;n߾]G`}}Y"S 3joo;z5K33ܾ}ݵkԩS󫪪{5kɓ'VUUkZo a.t6Ȕٳg}۷o߾O,**js(Q)N@_;z1S@,RVVMo4J0F}!V{ :C[)*uuuWVV@EZ]]]̟}#00]wN ѣAAA--- .LJJbٲLisTʜlUvm IDAT__oFG`UUՁ;{L)|{\x1 uC :tڵ>>>L-맴&\d|?~D8j$XTFDD\vʕ+ ,oɓtGIZ_|A裏64>S DfPn``BPTLcǎEFF૑bZloo?tУG7|C&޽ȑ#LK[)1112[l؆r)3WӘ9sÇ/_EOnbt(7229!9&&&"փ5j|̗^{pԩW'P"a2… aSu֍7:tB̙3,Y2m4"2@H$>>>G5jϼwޝ;w655=3JYߒhs/>|Hqrrzg,YNW?}tJJJxxxHVe< O2d~֬޽++fǎR9BCCv&Lлwo߯T;w]dIDD) .|Gihh 8::FEE-YdرB֕Lfzh?ʕ+&o477X Hط!2%*St8-44y593+HH)Bf ΌtvvfFvcI믿899κ> 2EBȜ gIDY$etLyyykjj "LaܸqCPx{{ӗ,Nr7Њ'mo3oyWZB- """^ͼ2%??_.{xx Ზ dx3ah(BfC+Z glh݋E|૑)) ޽{GGG(q=t=zH r;LTzxxٲezUQQaFBXl0e(ׂi4: ૑))Tƶx7jmmmFBtLa*aÆuۡ\W#!S]0r-{(4,xHȔ)T`RJRwhW#!S{0 ^ 0"tիB&d 2OZZZZ7n]rOO3j$d 2mmSw|52CCBej.]'uW#!S)FyaCwz5,,B&Rd 7ׯ_nnn6C S:P͛7.0IdJСܡC 2ԛF|MLLuХd 2t(W^f7zV׎A Sz(7$$DC| dJCbkWC SP\wwwr 1jd)8WC SLP.|upp S)w=k+r1*,d 2EH<|۷/_ML\c^XXP(c% ]@ SDDTݡ\ 2"FzC}૘!S)UYYw^ݫ;vʔ)n``o}m+?)6slllll쯿>|&sK.0a/0ȑ#Gk.gg ]Jvvvf@2LV#d ,)2X SO `LΘL:uwwߍ.d tܶmvBinn޵k׶mۄ. LΘ~رcCCC>L9|njh|}},YRWWGG @WBg)o֎;j;!J̙3yyyQqqq555Ν駟2:eȐ!K.1b]?||}}e2Ν;KMIIݻwO`L{-[!S3,)2X SO `Lΐ)|Bg d pL28C?X S3d @))!S2LO ,)'d p~ @))!S2LO ,)'d p~ @g`L>!S3S28C d ,)2X SO `Lΐ)|Bg d pL28C?X S3d @@;>䓪*m4͡CrrrLS2aeeK/ݾ}SZZZ>?? Y(2ڱpB> 88xݺu4Sjurr_z%Jn:+Q@@;lmm!<ؾ}J"< ,"9򩧞Pd /::zРAv]]]II !$?? >>v^)>M61cf͚er@Ԑ)` כ3d PWeѳg6y9 ^0ւ BBB7l H1 Z0u||n˨Q0z)AddĶoL7oLoΟ?_z@)󃃃 !ׯǜhF?PQQ!t&5k֬Tz1k1W*YqqqgΜ tïSSSL"tbLǸq̂BWa)HHH_0 6eʔ)'d |B)'d |B)'d |B)'d |B)'d |B)'d |B)3D"t $d ҭ{{{d]vFDgOOO+++BFIHHuvv^dI]]ƍ۷o>}Ν[QQA~H$b`)ϟ?_\\̴={h4Ry̙ԼxMdd+R\\\TT4pBZ-/ppZ 2rkɓ'BRSS.# H),,d_~.++n<ud)SBRRRLSGF(..4hPv///J fD4\~ҥjBu0pTx5OOxyy0j5mZxqnnnKKKee%ӮBtk/ʕ+󫫫W^6+VXlYvvvSSSfffTTmsttٳJawqqn`)ڵkǍ7i$;V\9k֬s:::.Zh…Ǻuz=eʔI&1ۯ[nܸqLo™r GhA]p2L>!SO0UPggLp3dرfǎ~\\\f̘qM|w '(!SB۷oϞ=w )xb+@)bq Lrʾ}~L{cc+;00>Hvڌ z"&m(:'~ֶYCwdg>>>=իW_40dX*!_~J´GGGԜ;w~{wygСEL\?ͅQuxwqqq[lae[lYjU>} -ɓ'Ϝ9SQQ1}˗h`:sZm^^^~Zm}}}~,LJJ***}t 1is]m.BR'w7zCi7nxxxڲJKK:07/"+//wppH$?*))=z455uĈ'N`[%H1nnnnݢm6uTgggDҧOR;;UQ o[= m&777zG/)L)cH~~>mah777zW*޽{Z6((H z>>,[{S/bر>>>LQB.\f͚5k0,\ڵki^^^&L8|01IZ]w'Hvرa;;;-gE1eA?eԨQ;6zhV[__#e[[[$JG]EOˋL1>իWT5k̞=[rh> 7>>>Gnjjzg.O>>>G}=} ~DbVZj*.;sǂ_4g2L>!SO2L>!SO2L>!SO2L>!SO2L>!SO2L>>߿/tU*++.l SaKdJg?wBWaR?Ceeq+t-&"t fYZ? o>ak-pV !BbL4 ! p~ @g ),pXg d p~ a,))p~ @g ),pXg d p~ a,))p~ @g 2XX S3S ,pX7FZYYI$k1B7; h2A?nOvMuu1pdoT*ոqkOvÝg͚~yCpd !O8qԩS/\zS20f̘3g۩?xOC;'qqqwYf=?mA?]o녮ȰaæO~ SN:ujܸq֭>|8A? K=Z?ìY&NHOÄT*Jh%Vvrr"觀agŋ.駟^z5k455;v 0mORRR@X[[?s/_޻w7vS@T6lܶy׽F|)bcchѢmOvæMlll{A )9{lXXÇ===Y6C?!S7ƍ4iR~ckkkf; )ܠpd7;d p~ Ñܠ) )Gp~ C7; )ܠpd7`#g`LnOv82S2A?6555z-)& l Ə´ZJT P2،1gϞ3gμts?*>>>88K.Vd cƍofȑ/..&455>>>[n}לDABjlʔ)gΜ酓mmmgg>}V~锔pTZa{qBGwD_G:uqQ~bccM\2y6zeb@̐)`5zxxKLc曭[R ŀh!SXӧO ezzz.YDz@)`,Di&B)d p0k֬B|}}.XYY) B͛.ܾ};??%%%%%%BbL>|/޽n://z/@ j.\8x#GݻGJ{'N<_8qĉ}_xqI$qȈuww3>|l䈈&G{e+jʔ)SL?ܽ{711~C&&&<֭[̣FT*MV9Ag̘|ybccKޞnr08|LL mddc:4ll~svv_y!SJKK>1BT𸗒R9|pf/NLL,++q/&d B]]#""U/˯^ڥz\.߿?3q.owL.hN:ͬfggyԩxرHf)&&det "((yǏj:pj, "??_, 2t}YoGP\vMڵk ۛieeE#Bf)'22={>uZ:j5hֳgOZ#-: r \AMDBAkkk.:L7o4LP*#GdGDJ%tiRߋṊ4L(Z{:Uj5׻wokJR:%YFtRllfccC' ]Z'+Θ1V!tiL6wћ:l0R~j)..NLL d^:1ݻB&:hCcc#/Yz }Ypd Gd>@Ǖlmm %\K2ZPP0KXX؁};z#> ]`)!L6Moy̴WWWWgyp"B… }]FaԾ=z<򴴴8T>}\d o!AAAٺFCCêU\]]]]]WZ%D^^\./D"é}ZdŠnr"27w9}Qo_pƍnݺu֔)SMY۽{+Z^-ɊtbnrrrccХb}NNNEcNa'+"SD@P3/1UUU%ti`R cBQXX(ti)binnnr6-z+=0̣]o)"œH_׮yѓ{A񜬈L\\I_fkMMХ1'+2sry^^P%!SDOӝP(_.ti`fɊg":v=WL@+ZtS!wH$VY}y{{KG}433v'is˗;;;n߾݂:*"zs}|0S~/wߑnΝ;~inn.m;v?,lm&pٟݝ}'O9s_~vZ| }lBBJ$|Z"bee5a„ &l۶?O/^xȑ#G>9`i-[֭/!~I S\m}6c^ꬬ,bֲtc*<T1ZSRn߾T*CCC幹B%o޼fL>}۷o߾{yBMf)2Extfd~Caȑ| إG}T*z{{])Bh߲e-hTTT-տ,EEcc#[a4yD˾BW3κFNUUe!tif^+---,,:uի.S.],EWVVBLT*޽+tiGTzxxٲefzmw-E/r5Kdص=g"YlPܳgO1ϺF88;;c!k Fgd2vU)GR]Ɓ.YL!VZZǼ.L1Wbe蒥4nC*zbms-W>}gTAXz݉AAA "??_Ҡ yyy "00y;dq`&2ܿ_@{}ņ;dj}:L =N{ S,\z͛7.[q\.`^QM{2ʒ #BfZ-iCt;\28YGk8{{{ٓ#iCt_'溻^tIRzzzllm/L&.H'dEcܹsGoګbbJ4a S7'W/#""ջwos;d {!`d2:1WDA>s;d T\\;ѳ;XXXP(BBBW#44TT ] S}tb dee}NV|ީ}gC)`scWi}j-ƽAD щ E^^Х 77W.^ތN{4LWa&Ɋ;M.gee ]A@gMeNVі+Zѣ[M{2xS]]71C.߸qCڐ#ͧ~B`.{Ntbyyީ}~~~y+)UzzdE̩}tګhha)ZO0`@lllzz 믿2֘ڥ)`:njsb;wxWYYީ}Æ ôW@&ҫrÇ81'rqqWSB`ZOɊt ^Lᕔ(ʰ0sJHHB(,,l "88X;&L{2DNuuue&9#<mN{+Z/d N뉹Ɋbz^[ZZ.ZA3Ej aeee:x`ff&m۷oee%xg}׀>}:%%%<!SO2L>!SO2L>!SNFDDX2:h۶m;wlii!477ڵk۶mBC@;644ÄÇ>|̘1&!!yɒ%uuut㔔0>H¡k!Sz;v;v$$$BJ3gRSS򚛛qqq555Ν駟2:nȐ!K.1bĐ!C!~{+v_-mllJJJ޽~eC@lٲ7owU*UppD"H$nnnnݢGMMM1bD``'2:Ϗ/!˫YTV|Ϟ=K,\zӊ+-[ԔE.\xڵf,֎>\jܹ[n<ܹsU*UHHg}&lХ)Y^Zrʕ+b,` >!S+H$B"L>!SO2L>!SO2L>!SO2L>!SO2L>!SO2L>!SO2}2L>!SO2L>!SO2L>!SO2L>!SO2L6>}Kl`_a&##c̙~ɪ1CaÆXHK.=zt~~ٳllmm⚚+ܻwR]]lٲ?eƍVV8B$ttC ]kkkZmeehh333)~锔pTZ8vѮ sWVB@!p(@y__64x& U(mh褀. `{.((H144t޼yLX[[_^qÆ )A}YQϝ;Wz@)`,Q@pLLW00]tR 0{SNmll j...JRT ]8::? L[e UQQ!t &%Ʉ.l Sbgg't?SBWaN)7nT* _UU% )'d |B)'d |B)'d |B)'d |B)'\)'dJ-vE%ɞ={<=={4MBB%Kf7nܘ?~߾}3w\>H$b`)ϟ?_\\̴={h4Ry̙ԼxMdd+R\\\TT4p@zyvVKKo<,:ޞR__/t! 4(33SRXX ~:]VVyjkk=<<Ș\ee%!D& ]7SL!r}4us[R3w뙦K.UWWB܅{}yzzn˫CVi{TTŋsss[ZZ*++v} =,2zV\_]]z6YbŲe˲233h{]]cϞ=U*ULL KvvvKfʏ[|S|ML{nڨwHꤤ`{{C=z?~<((+))yԮ]nF0b<:">D#JqmSTUUշo_Lf^9 ?}tJJJxxvj0fB)'d L0 cܭ St.2vacccǎ?w...3f̸y&'.==}„ ={ xyNh2Ť4;}ٳ~:AcŋXa*H]EEE-Y/^fiv>>2_|monn޸qΝ;icNNμy󜝝̙S^^{1Tmll|;~ΆUVZ o>oooT裏>Ӛ0`ӭAW2ƬR777zK\VVVF$HB;55ۚ4hs⯡JI(C@@@aa!Ln H4o3XzhJMM LII4h_M˽Y^ /6CZ%3_ 7bf/˙HWW3gASJURR駟q͍D"f]|9""ٙVsX6{O bFtK4x༼`Μ97ւy~ ?x_?իeeel OSʆ jkk+**"##.a|s6k֬۷ ]#Bx*>'d NvL0g2,qׯϝ;յwޡǏG4 K;dIY)SO=5qğѣG91KF1쬒կx۷}:%,{{C㆞nj^[фOpႡqKX6nh㆞.~[.1eY%_?г#F]q74ni )a~X)BZ vqCu3Һ#hA^?EV/^xǎz_N7n豴zFzb+Z))&eBx={TVVOcog_@W2ƬuB͞={z =vJn4zFb+Z0O1OOnX?xjbV~ Xu`.~ Xd)`)'d |B)'d |B)'d |B)'d c666BW L/t fU]6us+V] ]@tĉ.+BWxxе9{ | Lnhv8A7R)t!`) ) S2A;d pS2<!Sd C7`Ln~ C7;d pLv) Ov`Ln) S2)`) 2!Sd C7x?!SS2A;d pLv;d py C7`Ln)`Ln0Ov) z`Ln0Ov) 2!S) ) S2A;d pS2<!Sd C7`Ln~ C7;d pLv) Ov`Ln) S2)`) 2!Sd Cg`L6-@g d PZz3tBH4{wtthLQ(;wݻ0U9AHpիW=ѣ4GST*աCFiӦh:=2:p?OR?t|g#Fd%%%>>>BW fDo|uLCBHLLLQQOLLիPYA@̙\:$D666SLhll4tRyX0L&;J2e@>|FF!%%%ݸq466fddL2Ɔn'11*) =bh8\]~=))O'jjjx`LS+++444J}D&Lijjq|}}_}Р 6,)) =QA@q⤤$___D ݥ<))iذa̧q}}P%'2d LLLL,..E2yT^^.ti`zR8\%&&2EOu*OUGG D S555C*LᑘXXX(ti=Q!SW^?((Hs SP{xxxxx?EX!gƌ999q\]]_=nܸ6AZy)SܹsΝ;&MڲeEX{8bĈ*K3nr "''gƌD qW^yEkP"0Ydkmmq\]]-$Sp߫JNN\gKNNe^ֱc cb\.rX,6r F{ggg_=fO?|A Sz"'00099R8C%iO=y^wy'::|טS"""^u#7L=N~bccͳǹqܹs]\\fϞֵk׺xxxڵKswܘmjݸmvІTVV&'':;z"MRM6qqqʼn3~Lyyy=8#GmiiihhxW\IǓLRYYI&0qci(S m6L3AOEu]gСw4n倀. MCbh]@('ZE ]!SN[[8\|9""BsnEǵ&:ʠw0MCbh]?!;w$''hDw4d9q藓ù!\dddutt;\vqc)%jjj:ݦStўo߾Z=6CO HNN}Х=:OO>LPΝ;W-SVVVVVVN2qco655͜9mvІiii\\\ꉐ)=Ό35KAAA>>>Z֬Yy,и1,((0aX,ݷo_ udD"`OL+Wbcc5YtfHTC2=Q^BDߴz䊊 KHMꉮ\}Lv=8`***z~0Slj5j%%%oߦ#!!!111/f0gϦ>}bkkepBDD/4ZDv&{<444755ѫD"0+=ݻGQ*UUUUUUB럧PJ믿<~8Հ,X ÅG);!t$,,駟>|cw< LSzsCCCNNNffKã===ͬ=6SrcDzkRI\ Laeff߽{bkk;iҤYf1z`|wYYY999 ^z͚5+66vҤI9֤g E{8qa<|D9r̢":5|D3KƎ˼@&X7L|W!!!#~!$AXΝ;a}___XbiTSNyzzҫS4\5lZɓVsLy;wuE:ujt7^{5 eV,wg=4$$$--N 2KjjjRRRFu`ȑ#AAAb8$$$772\.o@oݺ^ZW -bq;ynnnqX SA{"t޽{[YO_~n?[\5d  퉘4hкu ]֯__SSs֭ɓ'oذAr5*%%Z,2[TWW5/ǎ|xyyZYjwl]f"lz>{޽~騨ٳg3s/رct;;ٳgdS2S|lj233ˎB͛bŊ#G ]]u޽Çgeeӑ#G._|6L1cǎ|%%%tdرR_~f&t{~IR8BAX=Qllɓ~)SRRrÇWVVBlll&OGXK"O:~m//%KZ* @LD XjՒ%K 2Bݹs';;?,--#'Zxq߾} .߿ԩSt}.^=AX0Jgeeeggӯmupp1cDeeeξsqf̘ tu b t{"ooo7\"]#jjj׿EOuH$t.-tu`2Ūܾ}PVVFDO>dTTDӹհaÄ8C7oȸu艖,Y(HI=%KX:dJ̙&nݺ~ȑ7og֬Y7M })=Qcc'4{EuӃ677'YYY󋎎JAAA`zȔƍGIOO DL6o޼>}LsFBH>}Ν STO>ҿ dG***>裣G޸qbcc3qĨ DZbƏ?833ҥKt$88x…˖-5r#---Ǐq|}}cbb-Z]@ׯ_?zG}D?*bdOweee4448=2 bzǏ `Lܬ6#####EEE-X`”A@jjj:^TTDGBCCcbb5Y*Ą Z/ OGgmmmM=k,|q S3Bqĉ+W655K >` S >8h=y'zalWNa!S3Sv `L0O-3S28C d pX`0OLa,[g d pL na,))pI C7`Ln; )`g7;d py Þ`) ){py C7; ) S2Ag7;d py Þ`) ){py C7; )`g7;d py Þ`) ){py C7; )`g7;d pLv`HާteCR9f̘+J:;Oiiiٹs / L`f)eԩW0aٳgSZ[[+ \+gwJ$BHXXؒ%K֮];f̘]vUUUBfΜy +jHL%$$ٳGsޞyʕ+G40#0VMMD"Q(z:wǏ$0C4S~ tnРAV#Ho0kQjkk%\._tiVV %<8\r֠]RR B׿[sdҥC0O0WTTsW_0O`ͽz-[(l=`)%K!6m0G&))W^+WH$BǒJPL2E*Lۛize˖XB*=l'tOT^tI*LVL*""B,2bBWKOO?xUXd ?D"QxxUrss.=Z2L>!SO2L>!SO2L>!SO2L>!SO2L>!SO2L>!SO%)'dJѱe___ggotfϞ="Ro|fz7oΛ7յs̹wcbccV 2ڹsŋsss*++?J"|7[l? /PYYy!C+ZMXL ]DӧЅp6tЂABȭ[ׯ_kkk}}}u]G̽曄͛7 ] 4ReeСCu}||UBzBއ0twb?KJJt53J%_hQtttIIIGGG]]3u!Sz 6?jժⶶEf'''GGNJX,..`Ő)=ƍ'N?9 @7s9s899-YD*nڴ_~&M~ӦM'Ndf+VF[hۧO(J[nMJJڼy֭[ܩj3~!SO2LmQO26ͳ*KLʯ1"" S{n;;ݻw?l0p3f}\\\"##/\`} SLMR{9W~ƍcƌB*S .;}tCCÍ7/^m۶{8NZR\K>uԘ1cjuhhӧqBf;w25_}UHHX,܃eRm6???gge˖555͛7 0ߦ7nܘ;wٳwk>v!jkkڵkٵk6 E||G||B z_:}!X,0asuϔK6cy۷_$]v޽+** \ !2^khhoݿ׮]#FW Wwkp-ې;vܼyիyyygϞս[oUXXw;vz*66ҥKr Vs}7ݛ>}5kBW mC7ZTk׮EGG?쳺Z*gbcBT*MHHNHH`n#Jۉu|||óJ.bh Ne;nnn.//_z5sŋoذjJ񕕕2O=TNNݻw7m{_!F>Sf񌟧7i^'O Ur<66}֭G !!!tP?ܹsRLMM ݻ#>szW_};<}tPPOjj*10Oa/`„ Ծ}C3=#q8pٳb /PWW{_10O!SO2L>!SO2L>!SO2L>!SO2L>!SO2Bpw LJtUU/^ ӹ|rBB¸q#t-#t U"Gu=r2`xxL>!SO2L>!SO2L>!SO2L>!SO2L>!SO2L>!SO2L>!SO2L>!SO2L>!SO2L> ]XjsLGq!C]nlIENDB`gsequencer-1.4.24/docs/images/ags_midi_import_wizard_no1.png0000644000175000017500000012623013246707333021106 00000000000000PNG  IHDR} bKGD pHYs+tIME  ,<iTXtCommentCreated with GIMPd.e IDATxwxևߙs{@B TEDQgxm׊]ZQ, (]t$PJ$!䜙RNN )}I2e:{{(X!4$XGAA,9qJzҁz1N) WB?k?R3ʹ*S)W)T SbVi+̪kN[9m5Ļ49 /k?MI[ΔIxUΖ2mMeRņ3eR-<#ϡeshX}/x%M^:%VY:u?kQ6òf]%vd+m5ĿƴYwe[´?NI ΫLHeR/eS jΟZ2wL-*6)sh8:Z&>9u.꜈>AD;xݖHaSk!cCT~YT|&8).k#k'u'z5AxϷQTiPAA|!ZE$ZlahhiܾW_}ۆ+,G$zѭ{gj8뜩z*+Sb'"֦k@jF6]2SlS-/>e`o@iO =ּ(V<V*{;=}}ݑq1-+گꝳu)Ԛ²cӧcþ=O[:dF J^@?lM ہT^BCu5-ZeJC4 AA0ZM5*¢ (*/EՕ~}Sd2UG 뷪+aŚƉR2%ytk nþR]+U׭YM6NPi5^vZ;FjX\5}p!P0U,f՝ yӬQC{װF⟶WXNa}_blφz!ߦa&W&N]G |ےwYY@`tL0*8ш`DQUTŀR.]+Q&S^; Zㅪ{i F'Uze/RQ=ccJ#TuyŁLsL)w ]b-jisD1g,yTbqw)8Q,&x홡4Wؿa< kԂ񛺍 ˼7d4DO2mnu ^` ya<\+(䑮XLPz1´˛Vw=Fû8tzMJA̻1`&;-Z 4%FY.͹G=N+=٘t ńv:䡲Ԟ-lh97ņ=`V;z/C:UqyֶU-ؗN~ȾgϦ>mi[jy2z߿:EQQU+z"5(*=}Jkѥҽ \&p{o-o?c30ߺMXF-e:-:`$ ēBР'4ȷ>Lf>Ucd;/-o<˲l;Lt @G;fEt{3Ft<=yO8 S<43\|4;,0URˋѣ0}4z=z4^^^2Zv> \"Th(P *E%°lL*6=_**MwB9y|=qU[qFڜ._?D.9YJ\ϦܛfĜl8n%Av’_> QДCBI/΅l,Nlʽ aUz5sc4T,Kɂ&=KO/M'q-S"s&R^NQrPw2#KtI{jҺO-0<}۹őϩ]N䍓yk++;a+ɴ_bŘ1c>mZ7o/oppM_TY0 >UXX@DAA>[=smh`:~eFq4lԈnֳ)ѓXXf ZJsihQrX4UWo,S]pwahi#̊SEihccڅ|]We ^d2i:EE&)6WxK5xnzWUnHUa9qOP +VQh}69;~#Nj;uǽo:duWuVʥH i446gGo_.t*o EzmfGޘ2}H,(4ZR8jAwEgj݉NޕR|u0AuGڹ)"K:WX;%;%Ln>[إ-CFtatpsa` n^^_aX \=1m}7@iS1f SVJPP0ת5$`ժ5Vw6(NzYLcߑu`owR;Y9+'Yxx;]/x:뙾=|8ʬWo!9'ɉ 1bӻX"-biO8OORP8ɢ0.Йi{#v[sPi|y'QƜW (ٕ`bo1-dۅo~DeP@zE%Vj_r̒g|ʝ3+-㨟vr؄R\˰s;yC.>>=vl+dk˺JhHZ?1䳏ͱҿ*̾pp';3M+-.s|:XqʾaNVJm쟏Q.}} ^Ad"Rw{Hƴޮ ri3?P ͸O]6g>}\ai:oKwܬۯթU>LE%+]V\]\quuS'K=}U:" ]y v?z͛R:U :M{QKM'WMdzZH'YѢ8yKmF*Nޢ8苿f D|onk2tjIA̪i= #M3Pj3OI񼅌9)V>!aQj^?Wsb-[f٪:U笮KKMih?Y4ÇH#Wio=[3{ӢsO|Ŝ9ג&[PA. А`=<"BSSuT|$*,w*EJDayȡ:[f EH~U8\c  \(oҊΥU A\?_ J۶mAA©#/ZrDA ! ;wAA ʖC+](BBSQ_)Qh_' yEbCY1.3%C):/A“pP<ʂ A  AAD  Nӊ)<`.yGk1(SAABg$XڛnǷLޕ~XMh"-Xba< ClSF`0H  \R\+^ 4 ]~/_d2lf_[CȎii( [H  \@-UPUM@AA0LxFgOe$Y+l_wf^vurRm+I 5JA+CȽc, S`2Q/*_ӮwK'9rc^̬c khZB_Aub4}Pg3]EYqO)\<̉8C*.ݸ֏ ST]ESpnjWt$do2.8b:6l#dB{-.}Sf@cb2Ϝd*bk?>D&ڲ'M<^-hGHq=ɛa_Kf 0kk/np{e(\ vT F7Ƨ'P-{q@oy (EQ>{n-:QtyU}?{SEV G?{߱#l& Yq5{ 2+'3ٛᥣH`bi N=՛`4ND9ń%$')ص i4"qkҖŻibt"A"D _i3:i 0hFəi{:[6oTlÃ^=oߟ]ၫK""b1-NV}zW/Laӏ_|~ބC;F,kc>Io_mQ߅#qm#SzķCroL`W; ˶IK012>D+A/8/^cŖ#y7)䥑/Nji3Yzp{z}..uLvdECop8!SReqw4h@]M/ $D"#%ItV3d-0}Gz$:u.{ y+88k:k="Axz7m'Cg]|q 4}F\e!pD( b۱i8+iNfgj!M>{{-~uMcР!:Q4rsX~ ;wݍP3avx6< ܎{|3HCɳ^dNJ'np/ 9~ >ϗ-Y/1ck}?9!FY_ XLfNխOssT 97Lj#qptloqC|83~ =C;B_ ![/sz}Az{;=OǀNVKӹr%&Ld{Ϧy 2QؽޛOyluolN58S (^D&x'%FƞN*08G{qk_Vws 7}z9Z^܀{EW# ԢSU[$Y-a4ez,ĔL*z.了???p,=#Xt;woiִ%@Ҟ%Zf\|~OZDoGGÉN_fu^5cul814;[Iq^jv<37bJ_i$1(F\܉IND`\/҅Ip0 GqKBKBC[i kLv ^kcИJ5\N#*F:H3cI;@D IW~"n"0uJdʊy7eukD]=HG74޷i9_igeCu4-Vl䑸Oyʄ_۶mu̖yoR?̓ƾg$OJ#$,™3[7F >(ZL4mւ9s~Tt逗':zF*4}sYoBYs )(Hfsҝ"[emטalgERmLYaӍNQ }GNk[);yfd ?< *?(2*^x w/yzS@K=*~!!O , no8y*cFe阓vR`ᛛp#C ~s9KFx- E}eTD4r3$&'9Lob'(#xE|،(<ʖҤYsnr'N" {)a*KsS|ӻLh:KGvZI׸ $JYjUCJ0pːxГKt8/*Ub*\WՐQ\nH›Of?y>c!Y;/$sv?#>A"b1g&Ǩ|"3j$܍{H<*3Q 8mZs|<<RA %LY]9t Qhrwן9XNH^K"֣Dd=E^2*bs&Η4ƑgB9(}0sA~6DH`oa9yZ1 ix]SK6ynBog`E̋[k=>A+6lH4vH'3%Dͯ'0ed\lFQ į?LHZǟDChz2w3bLŅ网CFv3iƗԻVbݏY[Q גp1tŜ-]kT͝wq/~^epK _]I3ivr% B{%Ɓ:ZFmd-O? 8mo|V¯;eyu!A>س#kk\Sw/g;dx۾GogT Jv2X| ]m޼#)H^ШMSWEGGCJY(,(̬LLEE㙙g:>?Zy?~Ɠm"y?gFLbzUŸ@/{_G|+, Ze t^f0~;]z'2,m6q1x` 8?Q9{] M#Y'5NDay+(! IDAT>;p,xֲ/?KdA=B۶me>b3V87m79u=z{tMâ1FU`(k+|CQPظiI>4h]X0* 79y>Ejؗʶۛ6X=9ENhNכS1D>YvPVbw&.R/ Y2B i;+yP:]`4bY %K}eE/7Bb[iS"m4~|d*bVovNBrӷ|܃p?|  7NM*#ၢ(\e?˅K> u.#'ה9s1Ty9mЌct\'­X4 pEO 'cѲ8ʬAKde)"7qGmz?O}~NAA.S6diH jxg  ) F > 9' p!/AA'  AAD  5n䘶e %AAj%.W\xke ͔L puo  ?+kAAD  AAD  "AA}  >AAAD   OAA'  OAA0Z;h8*9#]% :& N'jm煁xi͎>Iy'IA'?r dEu]Rj(OuRAۿ+mx;n+2rF{fcCN]/uL+R۶!jyFAA}   ..Yjo\\D  \j!-[>C`F}B}  WѼ$|}wC'奉AARhCT:{b>4Χ ӑM܂  0wj{XC][WBQZ׶zOJɓǾ)wmHw\$A̰dnalڕBv"_GCr#eOFy^wN`߈(g^dCv=qNg:g}˟'so醛]:\K7wxD5gqi65AMaqÝD%?AY^π~B~!H#Ghx$ߗ ɸ6BKv/'@|raR54Ξ: )9-nlK}G!&{HO|4 :_Dz-gRLL j|=ÒՉ?ҘC`` I~%mdw.9k`"c7**Hp~_Bdg>4ܿe0@18ߘ@RLjOmЃstqYͯf35&(z5=Aht;o֬?C9lHl2ru>Hbx_ڮOx㽅h'@P;?~_Gٚ6> g:ĸrS|)Laӏ_|~ބC;F,fմOY_SLTʳHs+z\mmwꆋfX`:Ŗ@Z47Gb1?10mr%?}7ii,:ҫo2 G:C}'X0<B=ăI_~:hy+Le͗3w~{Nk OuG>9O^x8) /,]#>&FQ.ʭmۭgކP)JFԣpVVlƳ5Ov<DYl:N%p/QS6鴭;m'$`|y7/lA)̧Ё#OJ_ jmXXA8V-6iӋkgkrq"JEFĽwtY*m:O9|57E)I(mL|qxũ_;m!EtzUs 9גk"6*?((-K%<0%?᱄)ػ+w^4IarUlOHkr%ւ-8h6 tXcG B]a &(@TO̩0{[4A=˭R riՓ&V^!6|H#45!QN<7NdaRm/ߔ:+ e8 0ɻ`Od]ŧݯqcwbAΜ>Ʊذ#|%:_vxśqq'obɬO`9?~_EJj:Y'Hۚq- ٺ{6Nqk^j*$;uOYYjs2u7;~%;Ķj{Uwh3f·ia.6a..F.J >鄛~̖_%%cYCFFtjņT1`>_r |.1+hnk/~k?xԂ.HWZ/ {|ŒO$W# 톶<1>SX2EVeND||TW acd踇Ǹ6\Dߕ;nu;GֱZa Ժ_lLF;ظsϤHw; #^oB( +JDw^pOaKn-G[eFb̋ 7l!q=È0zSdN'eҼ +u%V۶m[.]dhR";5,P`X'܄ġjHJnjH_ ^N[0*):/ s6%AA|D  AAD  "AA}  E{}Cc H&iag룽PHA6Ip >] Aϛ^3IQ UΤ %Y' p OAAD  p%`tB3-=g؝z_:6 n\AAE߆<=y-BЖ)4ؗ-:%>DrVAI'xP/lcyp,㉧ݔw)Xt-{pǧihR'.e~_}WL_:_e0 } | /,p&.#elc›1> %ApY/}q۸}IXOVo ;YP=\jiN[^f֒و#y蝉t *)AMz_(z0EnPGn}gCsdX;8c`؜GQq6ELt&USw[4Pع!'줸{J#ԁv}ɓKKMF?:Qw+wgX˾kbN")eџn䎮J/s[Js$%Ok<6Dvgh@ Sy,*nsM6lu0ϛ<~5rEi4yA;g_\FVxx@ b)؞5354͉r0 v I۝ԟV9S?)TO/?K=[0;#;sC =J{Ji]Nyxp i٣,(f A'| y3*D/t NWh#Z6jZ͞&m-odi\xOԻ㧘ը-Dž$nq2)75F@@~<%)ױ_s ߰oSpR{bb.4Ӹ?!c04F??_ac&;hO ' ;o"ǵTE3o9SD7O ͳ_AWg-G3x;n4:s)f㿻3~^<~5 sv bv~&ѯǷ/6ap"pKL7S=g=hZWbt]attۛr~L;ū =djr&]jh3dO>?Lt314**hN[s֭?G}X \:s15M?;r;Wo?'/eWoY~\20 G]47cL~ e-CsR1 ?i_e`)O%#ď IW̎&rR<6r$ǿ(^_Y , f[J.:@Y͟>ePyao`-#s'fD F`6՟G^NJ~" ݐLlgi 0T ҽgSR sgqVp %od}FS WW7P *R_5ꆋѝ9h梚 E4fw}L֓џM06v),8 m{v$.&z]qv}[Ӑ7fDߘLP2/wOrq=8diE>lƒ=d+c*4kfe0{-ifTlےfXsv x7cp7WV9Iddf{;Ζv:Wٚ#fdy:6jQ1{׬bqR:i9?߇W&Ī%oRp&gNt1WKZ,۶RI;Ί8Fi{ s$ZO&@bdq<59pX9)Vc,?ũ)a "qctMӰhJp;8RKY^foYO{s1E Ro34d2L>S2޼Z%1Z(+5NDtm| TTo:œ-_;wsg5iy*Aţ#5̚]stbt<;fylϜÃ} 0jifc'h ІEWb߇+Iܴ?#ߙ̿-­=W>?FۿI_r!2hd3LK5PY#ʶXmc=q^E|0Kz,G%( :^`Enh`|xӳt c_mNCègurQSzs OV+!%zDbtME5n|U0=.?ǝSCJ' OOyjY09wͿ%=ũy?Yǝ))'CH0Qds=}}ٞĆy/{zW&uܳf\JzM3k1\To!D'Xz6K#ZC:sloAp#h 隣.7ƓeWw,cF/7;3NN9rӽ 3ӭnmcB"ض#Oy<|-[hԨ&ӿo#4aAV9 yuwG D_,3W Fz`PϢfYy;`ֿ?aG>݁vN^*GJqo}E|{!ݩU0~d:ӂCRu]GkHϊb;/}ƍ,3mLzw1 -ZS:װe`n7}dKi^Z)9YVMhX*Uk\+ :2jԧY`-_|ꖢ'$\ݯPOO%DOlZwR-?#2J0Nb #3]HFnO7rH&.@%ńW$Z7臦k;lbC(hMذKO[֐x:Fr[r2lд [ظ$4sk8_uRz1%`"rGpZƹ9?HcC[h;o?~: Iۻ_~ ,`k@sz4pfǼrd(4wn@G/DvĄV:e5{/Ik]IFG UX?&mU(h%!Lk_0o-dCMvsV^so5l$<\|\{(F{oװO\|r/}U3F֬a[;Z`<=Xp=v˭סWmɁkX|ؕN{:q IDAT#xoFIaߙ638;Y<3Px`o攌r+cdބL^ٵx3F!e*1?bT3 %^W~_e&QѠ8368xsbFЖa05jZv&'-!ip i+o\][@argH"ۈ~?^vp*LD\,Ў•IUφY0+| 5"&f֡n-{vߩ&M޼}/1UlsT"3l'*_:_Zbkʨ\ӕ}%-,6m`۵[UU\BQQQNL2PoeZT\ƼosIQZm1=7U/g4`Qʛ_B\0{pvF]{Mg3cHR,`1r1\Mq[&&)rpq>,m-_QANѺb&FMVw&mdUU@I[.VLԑLYS*E! }'O@1ͫ)͠p!u3 ů'7n჉DDDs u# $D?;~7̘7bQۅ7ڵ]yW1O7:2a,վwf/S:Vq@{&[/z@V!(9~J1#kU^\U.G=Kl' U#F=z+݃i5o'?IsgNKB!P BqurTCU8)Mfծ/XI|V-B28EݎM q|q:ְzsV-%=VmU1] 2F0b }:)`cWZRth=V\!U՞\g8y / hn}`g;h|kQ˷quu##3uV"~ iپM68 w_d]VIZrͪ#?5!` +,Q' ׿ ATd5e,5v_6tĩ^B!=bZ$sp{ 6aggGi3ibhդGpœ\395ܓmq]<1ā9~|T~-NZH߹Sٹsl Do1@cz=B]0r0&3?|kYdk]Է|ټo.Ӧ͞9ʡm%:(9/fow9o}IZ`He;s9j\!w7n;Tדp(* z=O]ԩ]_~5jвe*WF[`;h63Yvڅ *kkR[+>́y$#^ZBQ 8j-BldZ~:޴h2Dh=#@6nuoUs,jk^bxp}d$udEUdI0F<[p^gP>dP@m OCwBJTTT_L2P\aa'M$"2VmZ"JKKf#nN2}qss綞aS#1>īՍS| *DŽBͨ8RbԪxO(_=^q;.y,tvZjak#l: /Ra?<(CI zKB!ߛNwpssc $ 1qԬYA {GC%OL 0~9FB!?,]Ѳe~m'f*B!i!B }B!BBB!'B!$ !B }B!+[-OVwlݠB![!'ûB!B!>!B!O!BHB!]U6uoXbFUՊJDxSiI!B*mܼ6m:ݡ#ҮmdggQ,Lދ}yw&vvƽ)Ju )BQEU3 XfN>vuD~%F̜\ 1jD wLt#gB!g6))-B< __J3XW(i\Zm6vZ#BT]U}%-,s ~#nnn=zd22Nl0-7)](oFw Ӟ`_F =jFCY+*'?- bIX'N\ȇ1N)7K5z2y$wTp_mFk{3U)1P-\iއ{ ';y2s̉[r'': !Ó#1 \]ٳg'[-;8>|h4`6W!>9lӝwCxaC2ӣtF 2a{ OdljLgAκt :3c b/dwy܋,>SMGOq͛xg܉đO J'C~|eU R:;(33v5m#kv-$:^ SyQr:I 6-1q|%ETwdztl޼-|Oauczyd5&i٦#-Y4 :5_w{>p@}F/vuHZ^~fjk4V 2oW2Zz!BTixl2sxOv)VիְzV FMpD BwSp,/=GgwF4>.$nLXq斓̧vC~aQY /P{WuwSg!B; }f3Fg8s( %%⫼⫔`E%34N'3`J91 ebK/Ci2g8:mP1j'0xΤpbZOxͷ<=3Y4= ֺs8Y[Z#)3Pvj9?+O}wSg!B; }& e\*# P>?4=/m6 ϣ LUxŋN0E2u Y${6δ.t gWY]:޷;-5bFx;ӷݼMt$pZkV" FEbB!U]_l$3)wvcޖNprr"2"~#+WnTFF2?S(>uQϧcB!|_^Ԍ#%AIz9~pUW*J9Bo_t[Fx.?t 6ݷc3uxKB!T)2Ӧ7l6UՍ4^>z.ǩt?TMB!%ޛ>;>B!B!>!B!O!BHB!B!>!B!O!BHB!B!U +1[̨Zށ1Co*-)BqWӦM4Ubnb<}Yuftd۠d']B!w;F̩Ǯ.3ϻh+7A#FR=?e(ht8%Egz>ǀh?lCxfsu% !BBl H7|}+3XJ*8÷S:5Sp0};/㧏w0gt}B!Rժr`>RϒzD?77722NUl0-u# $46K~a|}.\~vИ7bQۅ7ڵ]y-g ajרG8}CyOjKXy[/z@V!(9~3Z7;iO/LbYHaA{'LєȔUi^B!XzV+={^ݣ+Y)Ojv4iq9h4W; b5c6YF0neH%W}H OL1h,r4|0 _o xJл_K^x[2ut,]Ϫnfe9쿬5c3 $|>Ϩ}B!;lUE͝tƖ ع+`6[l~ 5l@U1,wU1ÖQOl hƐ!qrgy4s޼.>eN&UqS ۜ\N2v**J`/珝D'!Bϡd2* :[};; :[&3OEv$:VgЧ@t6(wg=wԂjFcuc+)5F0b }:)`cWZqz5t^vVo:P+f5K;B!>Ɍl8XP8s(~ :222cAQ]=#an68 m<۷\'n{8Sxle|xS>.$nLXq Z5MSpjˌ`(]5C{iBq_>ESw-EzzEe/0c8u43kmLݏQ=7œv&{ֲ|s,=hƼo.Ӧ͞9ʡm%:םg,ߞxkݹ4ԨU[9K~~11 ebK/Ci2g8:N1x{fdc4BU,b2ط?գz긹q:T\\0MsQڷkdT3}*E*EksL܆XrfgZM\q| 3 ԣa`֠ڣi:?8BkN̳Ȓ IDAT@K,,wgȃ/NoS)eɉ4{ _~mtO2k4r6?7u#ymkF]!BOE#ےGquyk  %8'(**tPDϕR h?a'd]͡~c/EX`C!󐫛Tk>5ùZ7  !B'1F@!BBB!'B!$ !B }B!BBB!'B!$ !B }B!&nwc'(--@U֛L&#/,Bqc'h}5{F#UU1!jRXXHaa!eqF ug5fS%m\}4[B!r*.`@qq1/^wAJJ JJc{i>Aف9c#ƶ!ہ`GWZ5?OϞ\l= 8 KB!eeeX,XVTUKh4ܢ$PlcSW^0saf~B_[LN B!ǻR&!??\=~Z։ӽ!QQ^4 ɒq3c[߈GmBhv( wq~;kv~=N25jBnOѣd~a9bfË 2N/{OVFxz<[/z@JmgMaA{gMhH>S>q.'ѕΓG{"B!4%K //oZ-ԪU ;;;ܪS/Bݦn{|W&ld8i1,7Y7DK <8^7oi-?+,e҃^b=c7i[ϤahDS9eQ91-mR?Gf ,߿͏2><3n'Q6fBs>i0=*B?7*z=NNL&Ο?ٳgIMM%==Պ#YYhZF-JT)Xܝgl95 m:gݛǯ!fDVϽϵq3PiZ "y-aŧ}:~N j?-݀}!vkN9> ?]#Sp~P3zFP!?=ԉaIEnR!BOVTENN...X,\\\YVygVO`G#룽M=,9~3"tW'2uOn2$lK=7'ѫ g=Ȏ_ ;CcZŠ^[=6 v.1kIa ǜ/qXRQ0W.'n6u v,n^PTH !D>[jRPPK*hZ.\NML o7 jE5$ ű6' {u4ko?{t f/%q.6Nl߶Scp>um~@A\EVs}(|B!< h4Jpp0^^^VE.Hlr?ki)-,,fZ;bWz"8uñ Żf.kƛ ZlB!ǪWVV?~ Μ9(VNw&** ޿NǨ7cV2Wo:pן_lZˮS>M4=N;mb-Ep0y\͕ͩM04ԨU[95j8߮~r !o eFz=C b( TbNxrW0?ӀO=Fi{thogUuQϧݰfB!ߗ4H}oR^=i|7{zaF*e9ݷJf3g6Q|)K凒'B*|^ bJx77,7B!š˶SL{A!`2@!BBB!'B!$ !B }B!BBB!'B!$ !B }B!*UE;Dii ^d2a41  FP4D??ie!B%;DTDSc4h4lVB 9w.[60b(iek&K:["՗.V!B=8;P\\ŋ+]~~>dddBFF{p&=D7xs3=oߞ[W@cUDž<6n, ;(Vkceu64iHWor |ˍWPxj_a9nJ!y転 B~~>GAII VUUqp//XDŧ0/n[ +疎d'h:} ?6ˉ. o= ٟ{yo@ l[}P{&8jxqHgMKٖg+<@PB!R&!??Q.?~ V^_\I)Z<.M|`栖S30A9{"MNc](B g?D]^M] ~pu(8z:\ j[Y:kWuZѫ}4E|3ўҭ$5x?̅+IuQI?‚ Eő}}\^iO+ѝ' jLc1Be!BB_B^Zo)++\\\X,R/ZEQQ5UT{| N=>fՁD8usnsi2m2T,gt2j_m\Drj(+{fS`NJE`9K:q&{; !^U~erOM5|}})((ҥKwwwZ-.\@ݳЧqC{\3\搓 'u +Ua&YI7)UEA,Xqrt6{u?n7F\AP Xvݘ~B!a< h4Jpp0^^^VE.MlTFxNt#E lҬZBqqe}bZQZU;== rW'X39E`ǍOqYE_PT 9id 68 m<۷\\!B]+++CUU?l̙3$%%~:DFF& prrj|@Q-HXb"NǠsX"IrNfKSʇZz E ^dڊ:cp h$-;cIK:i\y&1z>wO!ZO`Qj0/8٣HHIBK5H\*jILE{~ɶ.3)سcAB!ĿXw eFz=C b( TbNx!r +/,׽)45.)(eٴƐ[/=<;  SW)Z]WC[E!1mzDؕPgK >l4ӱNqyd͌?p9i5}3s1.4`Sуy[~D!7S*F]0dp2enHzz:%%K))-CQpNAAǎ ^li=P|ꢞOa1!B/iFő ߤV{X?8E*o@ŒUysػoofSȕB!r苊jgΕB!Ƀ^B!B!>!B!O!BHB!B!>!B!O!BH2ŧ.O]i!BBSϧc4Bϰ]$JKKʿU& hh0!K+ |B!L"*)1h4TUl6W@Jaa!;-1lX3Y)U6?NrBH3Fq{xbEϧ RRR ??wwΤWt~}I7Kc[zէszy*ԫhiFLS5[5B=jh$+?cf̣4rpip~S(@Ϗ}+Y_gC# 9| |ˍWPxj_a9nM!-ݝPVVb!??̬ pjEUUtFCII 142!Quq&Nf~Zn3YN˕TWQak1쮓xsujh H.Q!Mɳycy 4灶){7R'z6ʏ{NN5q:>{..8\[E!2z)ru zEO"P+7ڕI4i !/pǣM:B~~]j7/ĶmYP;޵ιe@HTQQFELy*`_ tЂvxtTox3xUM фGg!k] ~pu(8z Q.CxVVe,eݹV_MQ"ߌ@=.t3g͕}ؕˌW6~254;#M0OĹڟpGW;Ofw5ݏ4C.8ѮPCo6yO!B_qqy]$<=FMZ+OMn)*1`.)R̓]u*Ak';1pGϽLiS!K)fkޗ`iX_4txf$7kM% a$} keӼ>7ȹ#{WgɪH}E\"t^ؐ(dzdftw0Qf<чg$jFZHt6m"vʄ큌>'v3-&F:*O!wm+FUUz0L?gϒJzz:V'GG2jƪ_ xh;,a̛8.;^~q %B?ޟՌ 2Iʒv 6 +N [AvSE,lu^'v"^{T{jFV5nH/<έdj}>IfuFx#e[KV.O`tdµх{c1\]axSY`4k?*cGgԸILiKdFLlD%}<L&U դۜ\O䡶˦N`tZj=qKPcEwrBUOl1VB }/Tח.]TpwwGrt:C_Yu㓒gY|Sj>9 Dz鬣F@*v' @Cn9~?`2'!ҵ|u^sm:HBm,֤dd>]=`2=ѥ۰﹂.ls]wڭ֮囫kh4hj/#Yvݘ~_rD!U]}y3 $''h'44`((( !!VN]0};׃Aaη##G 6Q4nbi_XHOWU㆓RjtK;+;>]QUPK(.7-([VXʪtRO9DҊ"0ƀ8쬢/(֜42~VI6[.7nȮ\BrO_YYrq8s *Z;;;t:޽(JB%wMxea IJɂ7Щ |]0nfp4сCױtPQmI[OE276gLaSWx~M{՟Ȫ9ne) 1tX)7Sg8+o.Mcn=Oi&8c-^zGs{#2MkҬm ,]/bY$EV1jt `=ĘAlF'B'PfD3d, (J|, t:LJųy egxmo/φ8c} z4{,::3+9=q .adMih, d,n1/AG`.Z9@hSt](lkn8Mn@ZtӶ'A]Ek|-l~Y_ 0-M&cOǮf8ƍ53evW0?ӀO=Fi?7@dBQ*F]0dp2enHzz:%%K))-CQpNAAǎ ^li=P|9cB!|_ӌ#%AIz9~pU;(w*m͘+)u!9BTC_TTc>tkWa^!ϧ&fB!_C'M ,'BuO!BBSb2B!$0yO!'$ !L!BC_iJ⎭TWA!B|y{A~C!k3}O# !>!BO#9B !BHސ_B!ZUuoXbFU.oP"›JKۺ\ !зqjڴFVOYY߭\5k7Z0/ҘsȤv IDATtd۠dwc5%BX-oK=|B!>jcWL]hwxTeH!H ]iUl^]u], bY "{ B!Fʜ9#!$0u+S9{Μ9%oOZ&s۸fu C` k?o_̼xDs>JS{xgq ^uD4?v!LUz>1O~UV`FGpQH ۏ`c>0>3N|n`~%R=-+h4ht/yJHqc[GϏ1M:f^-\"""rHeY z "ʳmQXx l>J1MpŜ;G۹8wEyXi\4 Ίē9WHz/_㷌`Y4{¶1KY,J'18 VM<]+ nk o,n6*޶H]}ypwLL>8qܗeQϷ6 \ns0 <5m0\կUG \.W맍)6NÁڻ4J b/GcKdA k˧dǹ1U )H }.9MAwےd`}[H-9)))&7Dfv[UeL+p:ݸ\.\.7ea^驸lonfYҿA}`D'bgCeLDDDߗ'/=Ȟ}yoۙ2yck!4;PyUmۦ):4?7qnڴIVoj&Lx^z_pNlٚ{}XU /::W_jQ@DDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDD~Kj9y_yՍthYoO8maYSII ͚FTd4 u e Co>Z*DDDJK,ݩO{4RV-m܃LxqQrx Ɓ8\nL[C%θ#iG 3Ԋy|oD*$A#dIY8Wv!LUz>1O~UuOktw\:&䩏Pkt  E_(O-MDDD.HeY z "CmQXx Gv4Oo/} Oݵ7~pd7WYp`|%1v7r>|5j3e<>Y98F!:"3Αo4v.)5}|k3MDDD>RBCC<;30ebzj}ٙd;7hM\YLň Dƿn><ս6s vkN aͬZahl>5s_b@;_ _E=yjy4`۸\smLE]F1jЎ7YCo6LuC\;bm9Kj|9B *ƻ{iF ;V>ݾ+Ɂ?`'sg>ΥM͟bP&J^18mlѶvA F 퓭.Ϊwr7L]s 7 ec)L z<8uk+jebCf[E`+ qVvs6oKO@zm!yߡ41>g85aK/dTӛDN3ì٫R9eom5L1>E6]yu֙:#v8 b3V&&"""RW<}/2OTl`50/V ؀z^S>}F?_#ɡ<=6i*7rQc|>oP;y}qIzx6zx.Jޱ7> j1o""""8=BpppAN˅Ʋ,LӃ4=M8gy~ލgen\7 Gag;PƛДq W>wW^P=FW}̽T\8׶M;>S:th~Noܸ6mUe&Lx^z_pNlٚ{}XU /::W_jQ@DDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDDDDDDODDDDDDDD<:۝}B""""9%G'jܼn]D"""3YiW ADD<9DDDDDDDDDODDDDDDDDDODDDDDDDDDODDDDDDDDg }_M;]UUϡoƌ3FUϡo̘1̘1CU9ϸ~NMZR/M[v~2U{m̙shTP~ct"vV9Љ9/03غ&>۶U(MK3AgeΜڷ7;k!4;p͟ruIG(􉈈~SLZR󉈈ZxON=3sv=P6wEDDDswG||juޝ7j׆Byζ|ĴM6<̙`>zc޼i"^|E6lchzDDDD0>eV c8~u|""""uGv6\qŹ?O#}""""9OMCJ.ADDs?i{5^W|QDDDj}!I4RRR*[ MPEDDDy*/@>>Q:A-LEAރ7QQ9W55L[Q߈77Ui󮈈oBB(􉈈BtH}WV AH_W]~n8 >F8bb.К6d m[[1dDl afp0T3>0Ja"۝Ž[ٚWn*ݕKEӨׅ;˧?ç a*N=bY,/#m`Z`ِ)!l !E1ٶͦm[ g(mJv|ɠiR3JQm~}7PF\9`8uG-2bS:_oL,X{@?wŨ&l$!Em)**رBڵN&>IHFTd>m r(,pAk^C,{(8p`?mSXO@@ ]űU[x7|1Ŭ7oiǶTޝ|t0 m,<6Ǵ))(T_ȑ4 vVԉ<<DT#IU2 A!9fu67yx-`Hrs(WOP5AKΉ;0C+i/Wr1ѱ˜a{3v5ZռWz`n4uB.a╤nAYkp2x-0- jl7,=[[$0m6:/<㺔YYI _zQ#HrT=&g铔Á4+R<,m;InkfYk)T^3g ?ͺͻ) Ns𕴌pK(ԯgn z[|AQMu;FegfɼA,U4Rp,Ill\ek2]q6|;mÓ9 g(?jڸs*+ɇ_C7\CΦJ,Y16nZ.3Wwgܟ+^Gpg&'4;8[t+M6E+);I-FowD2ޟ5<շ`LVtw?%y<]^zj{Oipy6e6 ~"Iiׁ=UC&Xzh$1'Ą$Ņ%8nYo{'-2>eCr Sܙm"0lt opAPymto̯DO͟3+ <%-z)p)%%RqG&׼΀yn[FAbҶ7ajSvdҲ9|F#sѸKǷ;ls*jLR^Ͳ~QG3gxY_9ItX|3OLӁZ}gy|/qϐFǾe:'N>@C| ;#AP븴M8NٰMYHeؼs;VSГ>?ܟWoq{Ovn ng j7Xr=cNP?3 qy pev:˯74ؕM|TX>'>9 IaOtYxZIl'k\ e(܉ͺUC߉Uq^DkYxN }gwTe=ujhrZ76p1VrnC\yp=ǺMt'"xb7% c\n'# \A;W^FqqRp`#8q12#q`Ә>5Mæ4} >SXY`g%nFgмxϕuEro>Jqq"Szx -zS}(.>Nè\@`C"hq?Ƀ=49:%f<5OOX$+;l+_E kIBh>`W𘸓+9̏ջvc`_aKzLȒu/w>ZNp|ztI'v {Sp4C{SXj]LpTܕgaؘ8`cc.RqƝؙ9tpPWΨ8 D賫#~1^z؀Fp2223%#3@n3ayp(M?LE+p5 5z_Opxa!m1s?ZBAd -b8G궣x|1K/e#=.ed^$s"۔]eeh6n5}o?ͧr5~A^ïm?!+US f}u,#m[yg۷̣>F׎&kߛ=\?$#?]y# CiIBXkٜ#Wۖ&;P8Oa]^L0dрrI ?/[#N0z{h.nݐ-rAMyHlL= ^F˟]:T(.}= 2Y}Y;پ LZ\ֲ5|Gr}W/5s $y, [_qE3kYb45&2) |@CW&r623H߼z7??bYܟeFHwz a{˂wsR经&2Yͻ"+(KF1t.ٝXqD~whr8|aD5okWNpkoDқ7Œ "bfb·aaÖtv[Kʤ=˼{6Ω ~ yb2wG`Pv$4$}I>8CI)/ryf Qm2֫uI4mNJV4mRiLc81BYsÍ?tQ$@T\?ji٘c+\oFi٦ӄaH|ǍSYS|'$6댹))) M7,mgg\p`4.ՃؘXhԜ^D32ych{7eGIOmk6BCHOOyIq?&o~^Ru7?Ai+p#x'_Qd2 aD_<\S4;Pg+HȼEK8pAAع >+HC2 d~fBɤY_5=2Q۶Usd7C%NV|^;%ϏSŵ%˯sET'RFx-rQy fǮqlvp4u=q IK%4$ә<ڏ_SVJ" tI sT-;JQ^. (=^"rEoM D>^`a᨜\.w7F˗K"%'3>}"kRKqa~-{y݃Maz|"48Z\wG4eKcwj*s/ aa]Gb$x0M bEŲ, ˅rtqzX^/n_N Ͽe0˗zCc'trW_q'ĞהP) }"5%E#x1y p'նNjp`?S+(9.y éÁp` Gu$2׋ö1 Ӊ(܉;].sΦ]޼-{nU] ۲b& \L3?VD~{C%,*<%Xޞ8.ܾ~զ_1VT]Wea'>މ}NwrE)=^DiqD`근 ,Zx+mb[6؍c2| T1D~_Xٗ j<׷3rLOYŁ2f徑'FO]n\nܾ~]%DDD.p:]b4,"""'"""" }""""R'h>_i*F7Qto7UJJJ? MPEDDDDy*/k>>>Q>Q_HU=WDDDD􉈈(􉈈H}Gt IENDB`gsequencer-1.4.24/docs/images/ags_performance_preferences.png0000644000175000017500000005530613246707333021324 00000000000000PNG  IHDR _! bKGD pHYs+tIME )t9iTXtCommentCreated with GIMPd.e IDATxwx7H@:Tʽ(r *]kk/\T* W  lƶФ|^Cv3̙39ΙYU 4114kMDDDD{k|xUO=OÚk``uU`TUb}==T_e[uRrPRnWeno{U~yoxeٯmς2NExGN?ޔii/|.]žh_]q7]k?4`?S!^2Uu~Ꝁ5L]2uoez뫷x/We,}ᩌl_xUnzQ~ޕqݯ(S> ic˸ٯޔRX.3} 0 >ܰU#FMpbymV͚hPQݖY[O`ǨYY3fziPqp݆M}Qw9v]/M<\g7\w*F+?_ gSP=T@5=țz0{tQY-礌צq.\d:/e:OD̀z]li{ݴlWFrF7uAMn UKYaZ QfbBb`Xx1 7i.PEFiwdYM]Bӛ@ׁp0y9c`DNp1v`s`Qo)OH݅ML7azȧqMc_,pT'lκ3k3fӴcncDGE!!!"q/@n]=䦉t8Lk72vܫxa8;{7Em8\^iXј]gkf F3{%Uf\>W"} v-Б_=b:;wcf]frSJM'A1/2rNN6:[W!`67!d:-_p"|}ԻvJNxb]GN#;[4|3NA>5+6\e,86>wwNI/Lw^f|_[vuƴr* ?%%f @۫&%%%;lłjbXXm:F4T >|8X3]6M h;s'O䥹i[̉Q< OыN8rwxcjvBvxƜ[7~~~YJ]]w/QƁ/OܜtJjpλ nr]ZaeclƾvӺ}+x&Br/yn&9$L2'((&^:uj7\xZy (/P``X,X k)LGUdS^nj>;7ܜΜk0)p7g7wEMky? 3' a˄kNޥn2%frGOۍwt2Vo _.\>10O//Ƭ\a,"='rӎ>+FCNV.g1GUnܔ loߕ|1 y~Jwdnʎ]F0ݠ|$~Rوiݑy<`q!X$2hwvG⌹lp4Bly>.<-"DL݊&!|-ޞZ.3/`:7=M2@uD^=|6[Eywt\prX4d:L70'\:u*ÇQʊL ȁff>>>b`ɀ5)eEД--O/!&\=}9' +~#g<߁3 } zvVb^ԩpƀkJޝ0"x>& ƙ"M&\\m\?;zƌ'8?=gvbҞb,mrXG{F*E&%=kBxsZ8vȸ_Tj>DDQ! fL<)ِNppWOqQ@˩WV+V: bb`+ R茁|&3]tЖF>셗˸Rlkc8 Fgp'z&q`[ɶہZ 9]KhMNvvr* Б?VЊqV0\w;Xr;#<b8&VUW*fE{)Ļu9VgUE l7Og_E^N6Oo~q22#g@ܯYt|(>6n^6vxӷ>?Cғ8!u:s r a+pرZ\VVQWQDZv,X}}\Sv*vޝ-vvqxI݂N5=e>1V'sE~@s p;&Ȁjʊ0;vlg уB+9ƞpOCf~,~fEճ:,KS~b#|?=mBxl.;Jzt#;a;Hu:u~b]+ݞ<*uOiɶ4=DP駓kO?rU]bipL(l*~~~4kɶm۸,^;% MMfċ(ϋ 9#37uo糘 wx.~nn"v7)r{ƃkP;eX;R_>yVDuG {yV۳iCm[.M>Ѿ(X]hð[wTwxYr<7q| oYqH odvy݆lU#hLbh8EXu6υ9 {R{opT}\͗9kW"""dtTۼѨNڏ||mGrDx*o96=> !Wc4ٷGylpFz1ȱpO3cUyoq8%kG'D G"""rL՛I+{j~9|<-kv1 utRx6.i\R|33E ""'.K0"""r) """DDDDQ^dv<:Ru(s}[;}75FѤS-Q=AK,#I}+"O]p'bizjsoc3l<jP>s2 ,ܭE'Lxz -b<(?srTTo1v>_H|z潘Cih1:N"~9G%Q4"*6%)͵hJ%TlI?Q| l7ԁcrO ,=.S2B:bE7Yqxu;f<힏('}=.?et>a2~rwįy}'"󹔗5mZ%Ib ؗDoSXяf\Gp\߲okDDQf-"';AZ|#mNwxϠ}w2F9ٿ%ɋ0Lܦ .M>&8+;rg1Hi: *W%39ֵ_FZ?C5kq9lx Ʒ%MKo9;UB8l/t[Bz7tjLT <%L;&R=}5̤ŅwaͰm܁ {&JIKع6 ?RD V]?J*LIeGZ[@ݍ6mivr 7Y,Pm4%SC_rgƯ/Ğm"3Q nI"$cEW|D$̀QDO똙l ]h61: &t>mw%?ˏWn2rr9ś${wEy_†]C}Yvg.Ĝ]!?1o#kذ vǼ&-ZHzj*g͍we{5v N"wSY0w %y/|F(%K aQqBb ïy(F;뜪оg=Qr!ƾO$6,x:*m&4o_`;}CxUR6^72Kp 40N3Adܶ!v @jq n !u4V+X0X8ܻNӞIyzYM(* @"rR 1G&gk%ɮ ê#ChuU)i׾B֪<~gυ?=0̙UҲo!u~L>:]|]aY~`Mªy!]3D{/>D& 卨s'^'20gN/Me8aiO~VYc*S(xNJ;E`3IgN0b%~"g,NWé-m6w1r g;Crބ؆~8-FZʬi!"r" FWTv]FLhA$[j"*K5._=Wp# 'xi٦ &|H>}yWA@"=,| ;j'fo M`)2Kp PFgT21`X\^J>Q: @@x>B(2٠ZLTl\@5Dv+m?,u'@R:Hi?rmop FLgSկJH,~DDw忲[Lum^7vgɉ]풋}ÔlL,@#}wP^h|J2.!ws Ķu?Mү9W]լ @TU ‹W?o Q>2[ B 7;r9OCZBd* Xג-K(Xt51%1qK'QÖNݩ > m6g}[O۰?J:78)>+XG:Q`Fџ>d:dP;6Q츂E1;f:.&2v>|F|aci o|NwR0^bߺ3/Pm͙F騛h=;2%Sc w{Sqٓt~ k竉G | (- 2@)eӟ&p$>GX/fA_Gn35v۶9GuRm(X)=n,2gEp""a!11&EIzܵp;PrEs8-K<)fZ<-{u۹l]GL< ciOߎ%mK Zfg͔O_^}_KYp&#foɤyeI.R̔ׯ|2OBգEDxRWf%Dk3 d=y7/@݂7&8Mob}?6V~8o؝řaBΦ§iҗćT^M֫KY7yxue@!w _޽SnG4̀莿 `q%ߐٴ͟EP[;DDDNr]0D?8bȦ)l|ne?DDD-?dojm"""DDDD(WP"1kFi3d{j,ߥ4nbZa g6ET""Zf@;v-w&GOnv6u';nh[J,~5YDX =E(ؖYu7h>tSݥKg&qC.`x @Ft3kjlwh5#ylKebyKp0a_fB^99Iw>⤷IgOVD'o8*o$*:hEbtEH VKI\Hiq#`FS23p` YNhRs)G\FQ^ ָGh. K'5$MLo-0k3^g$"*U 6 -V*2bޞJ#0}G"\AXeg CAN L-'4:{Ey$Su?V71uD֔,_:ޞLxo0wq x<~#-SNH)73ooO93!*@z<^5K_c- ;=H-`]ư.qפ >7wa1 nb0h;t;ghG݋O:@8[ "'e~;ku[=m""T᳔&7QAFOGol&|:Op݄QF*ink~.tӕ/Naiޤ)=f`<1 nLvzQ%[Rmkc{vॴa:L9VodHyrI'^-,uݖHb IDAT;gоN"mlh5q(wgB$}v4]A8}n!-/""CTPo|Wޕg~,Z{AgclB0ir6W{jV_2[|h7p!Dȥk˟\>'2/?ﲅ]R#}=XZ.ᴊ+yQ]y93 >_"g/ [j!/@Hpt~@9Vދp͜p:/nS Uj]hz 7,ׇi$, j>=9s_KqfKXɦe]MI1g)g9iM35 ?urYoӋˋFbbbQqV~Y$Ԓc]A)ؚ#/qc'b魬tL#l6Y" ͡CoGiXZu91t4}@^I1cޠuV_w^R`{qHt9QTfeUp {WS)^A}W/$v`1#^fr /٬k\,?dzuev?>?Aض/뉓DDD8^k+i 4  hӞ@s#kw4$QX<1Z'T|T\Caf!maY>!dT_x$4!$y2ے* ,N8pe5DMaǘt|'>OO&hTcKNY[73?:GS?ƞFid7Eē˾neS?y.,LfTL^N;>n=u5 WT`a ʀ m2:9=:S2 e@D̀<:R^rrɈ>GNe@D Nn822 rP""ǭSq0>. "XA} 36f٣~77[bL>kקW56|i ?^d6/GAYl^ÌS~0VD+ ز.{tιAѫ؍<$7|f%s]OWn5<@x涳"tv5vsԴ/e\O7x柕OT5Rf> Ѽ168zY9Uxudmk{">ۏGi[ÚEb9T}zw}['q3Lߗ ֪w[>z@ٕODs;ScahGK?e@D̀vZv:؍o{]}M-c@b }I,mU-.^dVbϻU+4o%h6cFbEYX<Ϭg_g] ]|̮ <@3U3ᇤ,~#v^c(0he3uPk9MȒmU_#Mo~ĆY(Nf7~5yx==9V?m"oL}4oehY׏o:ħ slεn$^XU3d %ϸ8z,~qV D|r{\1$^9ol9wP^7|k{y|B[+9N>`;;oϥF^{Ȩob$|pocp/\tIo@ OFٝ0UI?+|kZ;4q8v\3'Y3v79U32|,Oyl;yY;Ҵ~DE=C5y ˜y \3Kπ_ANޚkR{&e5YiQ!f@gqt:Eob "[eOh.ԷSk'gj%dֲ~r3jΖض˸o\JօcI m'Ɗ I\D]\ 6"ʞ07H:YB-m)iY;7}ȟf&1l%%ElZwq6axt(1zg&&\4Cz6h7FZ뤸 w 6>DZ}bR{b1p4b`TdϳIdc`k[);,:v=N<ɠ!?3y$\] f=w!lЮhLpnnLGmsA8;\!꥖rq->[F;mYϋ_z#npzml;FB,9VM~uTB°;ᓷcu5ԝaw>b>9Iә_ٹ7<$:!#QX݂ F\Lg9Xj۞sKSRĹL:=W 킼޴_ͤInڟ`3+liݦtۈ@\| V?2U F~7vm$&ٚ躙/ps">g 3mA#lY~M'}[V%, =iաI53{ ))gvYƎ2w)z;==7싇dmcƱ;vst  G^C3 >9I|`,:j.ÒalsfBڑaEl` u}H QpކYjg/:k&VN|{.RvxɅ#<9GR^AZicVz; dmeoNW3tH fl`'o$q|6Ly﮿ FGb7᳏$~!b#i&}|WsnS0X;"F͝lRz# ]7FꞏY6z#lٸ`7|?:G\ .+hҖV{[kV+͹3ſ,ϟ^03@B¹m DNbFbbb&6ܒl~ǣ4:x@y^R̔&t^z7;wȉ؟Ɛ^$ۛ2ۑ5LwY[f("5fH~w}t%~:Rb[xK0Ὀ{q,q1WwwwxsFTHfΓW0W\]0j0t)S %t-z5_5HxC>ދ—畏l9mtF$&Цlb +njbhl2mP>9SQr0M\IIZ&̤U'*>CڲdJ7DՋgi XL /ok?ů Dft&yCTApIF)Xɖ[(,`|dpC./1SAMliv̺PvL..^dvMrkWz/˯brxN yBҘa>&򯺔][7"qmvq6\Pʂ'mGnÕpOɚKiUd=4R3jb}6DWDNn'b#{KFcM`4/rj"rtOB=AlN'qO( """" @DDDD9|OcDS>1b5 QK0"""DDDD( """" @DDDs<4̀;VӇfsv~vM ^%F^LJf{6#rT&(wcv]H?$ee3uPk9MȒmo-/W64 2+qMJI+G^hSDt6kQSO ?ڷ:$ؗĂOfYE?.q(-_NE&`%hPOZ5bIv\lOruZ,X5MfȨN PYo}RgODDNag(  ⼃6Bh2zufۧ3q9kR@^[3=ֳƳ(^t[un)SX,6xWuU n}+l_e 7sy?_,@! ]IC|5g2%Mzm"蜑eab%"-%I_`l",_v dg.L䢛Τpb2*hw ??W_B,ҲL}Q%fg@[AmNՙ%(Nцi,Ғ^җε'vgSIi"=\3)YI Fx_4m"I)Y䧯f3Bz?iPOy%`Ro";3?#32X%}`a2au!PIiXLvn;~oxzo􌃼Y_3+;ڊڗY3ME^n:i|>/DDDNM0 N=T#%dֲm lGq0^Jօc`faDE I)aOVѼy(F2.q!Y\@=̌ੴ3 57AC\4V, XL8ήdbPf $"I m%oǾeQPZ b%3~NWKlU`wx" Y/[cbp8'YGn53׿soyyI73vi#]~_(9P\ڿ#M[n L߷(XEtQՁfĶ; 4ɇ7gD82sY=$ı?r}!""r2khoҪ͘x'bt^z7$Jq2{/{7̀KSR{DDDXS""""\82mP~SaPDDDD """rs; 2{zX툨933] SCm(S</QC.>+""rQ"""" @DDDD """DDDDD( """" @DDDDQ""""DDDD( """DDDDD(Q"""" @DDDDQ""""DDDD( """" @DDDDQ"""" @DDDD """DDDDD( """" @DDDDQ""""DDDD( """DDDDD(Q"""" @DDDDQ""""DDDD( """" @DDDDQ"""" @DDDD """DDDDD( """" @DDDDQ""""DDDD( """DDDDD(Q"""" @DDDDQ""""DDDD(<<̒HB!@7WPk-ʭxVE}zk[+(ba@A KB*KB l$9IBª-Hy!2dLy@ @@  @  @@   @  @@   @@  @@@  @@  @@  @  @@  @@@  @@4-C #?1߮2 ր 9g-b.20ιf&@|#og .978u @pѱeWxl6Y>osNJhoqutcfTzH5!mQgkd98rIr$I;c,Zvrn-^ڰ!G3@_#>mQjGo8g[8;KǶ,'DضKVVDOcȴ%ۑNO6zR=g*-^A?-6W[>a}^c.QrQFtUVV4g{=^_ӈ̀<d\kBSP~:jPZ=%QqzHx6k~:F6]ikBTm|ZXUe_> r]fZN,}D.뢟<1E)uwlԻN/>g]~H}oPeeϞ}eFE#2M9#۶7Ǒc:HLY?23z(R;ckOC?%%R*-cTT%K_K+|1Ӧ֡Mblߺfh`PEE4Β*AO+si☽N[E+t$ul>>YU7tS\S_eTiOڅr+kE4H}6MVJf{v&eD\14 4i/a2SNmtض-۲dv0BGmMSfhhr+d |P=upc[y+do5v QFڔSunť:7•CW?휻.Ciќ,Cjkӎhoڣn)\y\>WuDlY٪ٖ%GRݦ޶m\|飔mVIJ,՘8,;x2SvkY! WI2-Ke b9\-4S_RAh*6''uUKv3F雳MmGn}7yvq0-Kr$[Rrly,JSy\¼BBۑ\RϫrHmĞ빱HȮ m0luǔzӬ׼Y9)mVfxTeЮ%Ѷ ?Q^Z?v-ZީfQ՛i^۴ j'K[Kf;5 mE''׮BwY֯ݥ)2o9MӔm۲LOނkQ-iq ƈYDG3TUqR摝2C?RmSӬcGJ4rsܷGJׄI7]vp2*.\UWTߖi͑i9,Gmq)&"LssN,["q؝<n};c)NVͿ+oSM 5K6lc(b[Z2*7+jC*;֪W.tV~픔-}%ѦGhn?O_PV;_۲_J͓w,%)PB.ޮ_3>mro[u[JC4|XvZ=:V\ܿiݻ/)jM#'UpX]Rv3Iû'jHztIP >AmZCZNV-So^z4znNSj]y:rxv-{^_Βg5yL]ܢ 蕿lTEN"iMǟTZMM)F"PLH˭3 IIwHҪE>Ӣ<ѩjyn<юN٭~E*2E_3u,{`/u&uxe}@J OqOh̨tEi($fiꙡ{\1233_cRzHoǿ~M}WtԟѷVC>xO .N}LE`H?|-9j=|?5FŹէg/(+oO)ZzC]|xA%L(e^rw3%Wb?گo04ato=҇xKR҃TڦZS}l ܮDw!^jj*up}bąփUX֚u  W¤jt iqG܃T- ˗x^bMkZWJ,3 3eߑ\͟q_ToW&2 y:Q3D~0OE ~.n?W |x3 @|{Hx㒍? | @7: p0phIENDB`gsequencer-1.4.24/docs/images/ags_audio_connection_output_bulk.png0000644000175000017500000006413213246707333022414 00000000000000PNG  IHDR;bKGD pHYs+tIME 7qVFiTXtCommentCreated with GIMPd.e IDATxwxe즇4HJE +DTQAivE.ETTEH4HOvw?ғ͆"|_;SfyffWtzPwv"BnmFAբhh4(/^, }zRQQ0^R@QPP .7Rf.Z~—˯SR^rn:]:1ݦPLm*jwunreʭЦr5տF[EVܮuʌk6Jk>SqƿbW-J_ո+{kSUQAUQUPQU[/WZu(Z:eXNkF)] u-Nr).R*S\nu*L]RnT,G6N5&cbMq5ҿU] ҸߊUX3ӊkaM)Jttti`.˕s/G̲f/n"WL{dۦۨXX~6*%PԳF׵|#(maEU=FWVsmT*7S`S}QK1nr*n gnUkIeڨFjAjž2Y7ȶJ^҇_vl݌5F}bWEբDDDp}L`TpbJm ,&ʩ2p eN7CZrˇ/N'\9Fes'P5=8]N511Mu*ZPʁ 3mnO@*TdtLln|UMg ]1 yB!jOwN:%M`瘪`@5TO2o&=Me}ʲ˘6=bqf^634͚κJ59eC*g &YB)xfnnD2ʗi2ѿS{O+fV泩ʙ3>c,X\vf2[Lo",m&ܔZ!sƢYdfѶƂ\,6Tff&Vv6iTi@^n섨Q{^ZGl|$)BO+h*enuf`mcFS,B"e.Dfe&R*(^$W*n*{ ,PfnQMgʧ̈d}u= GA'G:*3*2YLVV1M4Ē2Je0Q~Q,YxU&b+*.Âc63es^@vv6qqqFhh5h ( @~^ŭOJɁi]%3cNNkw {'t=ݳ%+r8CŻ<ǽHv|[˗rCo'Zz;bH$d|yUtx϶,CSXOeo׫XӴ׃47aSAJb,geS$&nXPy|͊+xNj%V[G~~`keeVkѠQ%[¨l&^1{4qUZujY%ZYI ]1̶ W Uefj h^qUb(Ubfdk ř~/惁hёAw0 o6ouG_!| gt~^WkEu9F-D}cTP,]΅{ͻx•H} ֝tLjyz"IU!-IѠd?СQFA?JkM&*tGI_y`iVYj6s6^b66]j$*3We&f*_U6\e5W1JFlZk<[63T}0i-~+=f +V(݄FA՘ssq@ˣ$SBQ4mI\X3\[.in܇ђÑ/3iE2Up~w1;C Mŝ5y󡌻c.-OwV":WД&&r>< K^x"u(Yb2{g؏Lo$|8l-!aӮb\6ZyJVy85oq[qttd,_˖=nK2i^qpGbVJ[=kh5k榵k@K ^U*a*T㌨׍)afw_mkoĬj";UM2Jw%3#d5$grjҌZ 06D/،d@#-_SP s>}q#hОM=-YO?ףK35Ajd9N~M D &}I܀ pVn(|E)U= 8]6ϟp d醇Iɩl__5j.C<4s6]$+f\uu-uPM$je^5ǰ|ٲrcFSl`tϒל߼< =Z搗ONN6wwlmm֑YF꜡=/7P+_Bl9 ~r:鉎16/u,o!^U,XŇYFxFcf;-6_oDb+S`A>_ ԅV]{43 C)z8|9ul@Vmu8#gl0يMhHżL%JUv+gL7V}[51\}̂ZÈbLF)(;v8Pƕ›5U6]pW=<˽/?ϸ1t"233gsǽ;gbgoGzj!!?i|gSEۭj0LO[V(SXRN5g!"8apgW*֩l5շj5{ɭ _]u'E5666frRbQ\QUg&=[.U\x!DDDV?;;R, swhzX2K[CnNR,XL-ł,xܒz7"f[ O o%٧jIj|E涪 bR;PUT-;& 抩N[ml|_8;9\#Es1O/`(10Rq}Q !:P<=UoY%g)ױujrݺ %KhV7Vujz~nT;V״4> !5K_`ot9-D!@+\UO)AAArxB!jZ\,եBqǔ[9 !59s)^~2ڷ5!J:A!6f9:wmqB ΕoF VKNBHp6wB@nB!$8 !BB!Y!B 捚_Yw5j&i: ڢ80|:\eYO+( (.!5>ű͓4 /WU)Mk+uq-Az/yD|u $8sHӃ]Mݽ8Z3ܖu\:L,jEzcc((ӦK)8ņD !FMWN" GHp+\up֑~0fM qW[VT^A}Rp5/`V4-Em4jtałiZ45)qŢh-Xi*H8T~/"IѨMfݚ%ĸk^Zhd)*e"WQrsK8yjT -M)ԥa\t.S!Ug59j+ؕW SLtYuS~ٗUR&&AmЖpjEW]4kBzm= Zvèskx>vBй9L䎆ZuS Pi{\qttWSiص^ /L#mimhZ^-KIirC e !(#i =G˙4kd/\1\ Ip%Yl!<;vq}y22nhva, 'zeg[٪Yʜ.d'Ⱥ#|6Hiq"~v-qz9Dɲq 6^n_'.0yo]IxXnHRUGGE  EEئ-=XTm :MeH8{-x˔G%(($~sv 7BDQ([W6;`H<Ϸct"4cikZ%aYѣTgSh% oM'b [2+tE8;?.yN9uO%nUTU}<|$a:#g\ڴ) HLQeWE2RB!jE1к\OwC|\7Q-B!uдBW' jop\3gq`ni=q2מv2`>@Q2-xj 9CMA4Yh4nqCSpu$2ck\ ù/J)2WBʡN+\Nƥ/!׽(!^xI*ײ%L|2^z-9{2̂>zHd*1/upyY)%{nIǸ.1O 6u?c$8<jEĻC> ^B_8LK}m룸8U\.\8:*G ! T:&MA&>}k>yy[>쾂unu=ol:4l"N \MGgh](ׁ F^-rnd\.\\U}ya@l嚳BZV9|{Wff1qvFO]g,H]Qi8*]rnH': Ow"H9->jYj$?!#][jsBQ|e|M >qF4+QnYJ,S|flݤWv2 #'I_l=S!uU,_)BԠ|~B!E仵B B!,BB j&]Rt$8%a!D %!Y!č itg!7d&BHpBqy7qttΐ }K<7w=GK׾|!}ߠG0yO3W[!jFÜ9ҥsGyFZ=ݞ|e_^ٜ{m_Y<-ja;9]{GKG~`}Ne$}o-{ԩOܡ1uS)) o1V_MLo_cboa |9K"bS=9Oeɖ8Tw6O.!:5ƾ ë!$'Lx:Ȍ>U_\okid|ӏW8?y=Obdw5GpH IDATf!MȢxm)s>+Q ]t+==)gSX2񡡿z 86ŶkV4ݛӋf\Mc'pmg0l6CCXҬ:a>Kozg`rP ^2#$ܕ]zBQ{e dfǩ a댓S]QJiʹ}>ßI#-Gѣ{c ׯl ֙@izRW˺2O"2@ WJp@$@cuXqRgj =)4VͳNA>3Υ@-6T ʭ7/F][[:_ FC `(|[tE`{Z~l77/F QP 9̺!%d}=ݭxb[ぇ;M ˗/K'B7!9CIvwBhT h7lj|$ jsZq=hA)~xJݝ8~Li !i2^7ՋA$lCik/WgaZ]jttn{=o:s#)9~]'ʰ4mן'?{qܩ-j^>v-2l/. 9ac<·$rcX=^oC8ϩY]JܹHK AgEcgqSǍ߿ƋŸ$lZ5&Z!jfQUPUXƃ{N:6dV YCNR8G}`OG'pWXe?t48w>uŏ İ`~=Nf汐xaL`,X@:B380|:\eYO+( (.!%dtL\ž$~{2?]%''K'Hp6ड़عy4ă\HM;KL3>>N(ҬX&77;EF^f2zGmec'NHզR$Jх eFZ#Z3r&_̓C>tt3ɢH8T~/"IѨMiXukNCt2P!7WѾ$d+NX -صw<͐!9GӮ uۦ/wjE ۑ~6B@Tx* VAÃi02HO+^x:hWk[yc(gBv uɎ,˦,Wbex}uTrdP [>NŸXetr ?|8= 3&..-M[ z*u%'c>JP#l1s/NY|B/{Đ!JM,xtL x#lr#8,5ۏ炧{#=󇱧{3lzނ |?sCIr'|A Ў/SnS aBq ̚B1k[ Z9 !鲲>MɜB!YT⯕BQ[ȴB`X ΢i{tE} F>E:A!$830;u„B B!,BBs SK\Q}Sō:R@aen2-BHpB!g!a폒ih!Y!jM#g!BB!jIp/@s{2C,soΣJo^m͗_K VfE1\r39:ɞMf4jK'; ?繭'y#3dТl9w3zK4mc:35'@ Q$}xV|rƯJ~2XpnOhn>;'װ˭$@Ss\2I Vq:Ef ;?CEgV3,g9c'^yc_ P괢טj6 ~݋P4ũ-%^? ϻ8nR^Hb=E+OcQUũE/NuQXEG3 /vxׯR 4Z:G5[NЀa4X%'Nħ辁k9ߟ!]AMl<{.]C86hbSV\2Gw8y^mMNYn^V}=½Hz8 D JiNq|!R vkЕ_Hzv.]C=tjj Tb H i] 4ҢvsB~\Ɖd˶;H/d(NӞ+x4i)q\ QqqJBLJ_)vfjvJA(plv{5#6X -Vx |'<+wץhA8܊N ɗ4q \yڴ;m>_p ;`n[j/Łnߡ];[ɏlw\Rc1TQ>Ҷ]'+&r{ ?+_mp OyW:-KYZƚ{N:SA1hrwm NDZe䊂uz̢W3P/\U:tzǹ2ClPMgc"Yԩ[ 2/'ݯ>2-c |dD/ɜA{xp%<Bx4ă(BgIw %k4IevZ5<{φxɁ27ScNW+^MRs\m>}` zhEu8j.*)JLUmf9>@=pdg2CpJ[4/ ڦq( %Hρ49Ro  6>AܪmK8BBf(b{;guCUhZjPW,_Ksɉ]zZ-`pj;۔N7*^yN7ygǢ/9{*jrFkǂMÙυCV~ (mޒxl 2$ u:yT5 #z>M%lȧ^BxeZ\rEҩ]o-!n/kQ/۔niNb\*9*;ڗ씊'6HRYZU{#<-$4 p|fՊF''=- ݱW~{7]COw2uÑe<~ωKFpW{Lqe2ZW<E'~FU;Zƥ1oRpQ%JFaMM"-L2-ſ=ٗ\G2W\pKNxOێ8e76Ca2Jx(ǸS &Oz(UYFbWobX 4i'\Hq2c}Z?KReIG[\1.ܴ96Ҹ5KFbVa 5q]0 r@hɌ(WojA֖1S_çAO?L} [[Z|2^7ՋA$l@MV@n{0m# DҰk?l[_?2~5-'_u_'>w|O=M IYMAb0`tڠnXKQpk8Mt šlE6qDF >VفfOAgYϧyMVڊH{s?n8F8x߀q9CѝWC; ݜH{}2_z Dd֦捳G<,޺lq4a_M>u]yrڛj!%(($MuiPCMBK4=Xz?s#_ybFo;5[5!S!9+^Jn-XdCѥEi aAƱe6nO}0$voD3agщ,Nnog,ET_99?]QN<ˑuGn۵!bLecr&J=K'2i_3\)(ED;6u7ԭ fb0ұ,9>-wkG<ƌG`Y?fx-܂IΤ/G=0ƍg"Z^Ő[s^|$M:y_|5o5yN2G IP7]ͪf0W8^a k|>JY?"LSvgJB_J6c"_hY` p1 )gg-ŇYkY>z a6S*6V\"1zK."Js#;iReђIlݺӪ6][h^EoHk gDaY&ő+H01Pt\+ΎCݴ&iB^~onYp%" Wrm>GNx,n8ugtfpzLgcD,"r)q]b*9mY,G}Uv[9)\OJEjmHrm"ճٻyI/;+ZȴyKi7:`SNO }ZY""<<9=iȶmcؖe }i㼉|%!nHx'(D|ȥN" g(d(EDD"""p9Klm9clP'(Eе" gbtg#1g(EDD"""pQ8YDDD,""" g(EDDD,""pYDDD""" gQ8(EDDD,""" g(EDD"""pQ8YDDD,""" gQ8(EDDD,""pYDDD""" gQ8YDDD,""" g(EDD"""pQ8YDDD""" gQ8(EDDD,""pYDDD"""pQ8YDDD,""" g(EDD"""pYDDD"""Տx^as3,ˢqZ+DD3gwG٠ADD k(EDDD,""pYDDDNK3c1mο={SyŌލ{oɠ9m\Í9v5]òq\pDP8!eO}OLDD's]K J_Xn笥y~_Oc&""gSvCA|ؕOkll۪1EDDpݑSn1e`T_ɬ%[%(**cҶe#Odn~>M}; =q~F1Kپã]Z$]߳Đ Xhlݧ3ٽ3zFBlx-눕xXa2ڵ)JMҶdrJK{еÛ|4q sv} [<"\"""?e؟"Ǘ"g{ FG 0G"m->rkϲ9B(@;N)|3\Kޗ?N M/ݲIeS"""?GgcOgcpB!B%x k\Q-ߋml'*:@TfJtO2p, ,5>޷wr`Rh)&O>צ>{\;w+", JC.ujzϦs1n)""r*g˶GEaY^0:‡xn$33D`>|C""" Ζḿ(1\з3]{xm#&>`l\dh۲g9i\XVq< p@TϯjYDD:-Zw-Av.=bcX|)ZH~rGYzYa:A|W8[/ϖՏeuicn$²-LL&).i 'Y:PZhXVEE4HӮu:8N]붰r)ZD~*C阳H_Uŀ.`/\DŽٶcjeq7s?ʹA+Ʋ#aYg A1]C1jCE4LUgZ|TZɬ}ЮU[[$ZHܳ9Orfa6Dά۱{ #m%)0KͫhIJSrX|%SŁpvѷtlM>k}W{eBխw/A]{u~Me۸S(,-eyF/-2vvg]]Шc_.p-kT9ntjܗs Mcz0qkdw~%RaO~qZ46+ ۶?^F+rg"raa &M0ǙWґ~}۴%%6=lC0kGcz\{?Yxxg*Y9 oAP<_&Z.\N\ɂmlZWr aƌG`iiSnKՐNCb }ߗĔI+o,;{؃^wY\ܵw_ߗ]yN1ze[zi-il=˗;pUC޷e?[֦qtiR X⋬~2`,˶|CLd ,9>-wkGb[ʴZ-b+䵉 5,,6w<]ǐ7 yENŬ}~^mE7>iQm]&Ŭ;nI0s^bرĎ̤Sק9͊W]~"K `=yظuv;L ӟGX0w-gG.=]8Cl!\, mjf)^ٹ| "zɬR}MyڔX%Ujnmƶٹmǘck {M]@kQMT.wԟM0G~cpqfuq]"k<>jV1F-S6ኁ)Y5[QWǵd]/%w10}F1q'7FKP0MthBb͆d]@Szb*g(y ɛS擙ӻDG0c s{l.YLۄKYkn8vMcaQ&Wl|iYKEI^>vZՉKoBcrLJuVW&ګ;вkr%aTjaOٿ'EAdžFYX]Q G3\lX``0cٔˏ@4ڕI07|% ܲ.?/Xʕ+{<% ȧSq*_~ AAŸEp^y jT΁]'+`1{ fz")o[,=Sp9|5oB&l+]ΈKF3{GL#Rm~;H`W{(k1bݷqrPICA)?s] P;wpM|ʂ}ig%˟ʺZҿiڬ8 < Bߵ1!B 6,g!:`ԩ[Kr*Oپ2mf66tҗr ]ߞw,Ͽ׿̢F54"خ8aҳ/uR9[ɩ[D-AbgڵX53vBђv{2mۢ_zGVz=Kux^]қԡydJ# 䏡Su24/uX-X1i^|n* M?|\9d07BܼyTx:`Y*]!8CQ̮Ch۫,\Ζظd*_'jB ;.߃ wLOr]f%=,x .ZϞ[زK. YNdg߬bml[ sy". kF /wĻ?Š/X[8RS1~ OO3Y9F6lη>e)/sހSw7&ˈW/2{Ҳh6_}rCy-[0ݲtjg'፺ ԪYh٦鿒D>{ۊѿo:qG.pa^cC;T~ Ca,ˢӰʫbA|Mwa>JCU+it 3&?g04θ+/o?0Lxvy#m޷&gxZq b1u[ipCkↄ|L&*1mz'Z=7"iI__=r~7ѦA7rZ$^ˎ{h9d}rfz=aDÏH|tܘt~ÛҸ׀Sǫ$&ep;κda:wľ<:~%|`sםԽf(q L9r{q~6"gFӴA Ç>/3WtMN=_:xNV`7g~|ztNlt0:knHBd{o: ppřJUql+1kn1Խf(﹛z̵= !ዯ$P@uY̋ì6wBצ?NFe%\ZB8T שjdb>}3OOCi]<¡RJ ).ȧ[t:d. oy{)ڟGiQ!PiZ6eoыN3&&&C{],VX+mQk` _L|+= s9!yoٴ#&f|GzpZ[Ʋmla…'pቶĠ}`*0n8iV.FA<+{?>?sxK *{+eӦ{~ʴ38[wjDU0}> /Z4j}eY tņʋ\gi /&ȗxϸX`2׋zciCvٖmxwlcHWuv*ZcD'*;# @@`4XbbG g9|>?1'3N(EDDh4-٠NPE,RU o׽EDD<[[DD S8(EDDD,""pY+-"""EDDD,""R?YŨaIENDB`gsequencer-1.4.24/docs/images/ags_machine_envelope_pattern.png0000644000175000017500000014265313246707333021502 00000000000000PNG  IHDRJbKGD pHYs+tIME PO7iTXtCommentCreated with GIMPd.e IDATxw|uA*!;H @+V( zzz;,<' Ҕ*M H !ewGB|x~d-v sMDDDD~٣b +[]&AT E \((X,Ϩg>u*m[汖4:24~fw/rTkUy,|x/Q?=F-cSǨ y<8j}ܷ[L,T'yl}ځ綗WvTܿiV%[Eqej3f[Y%q,Yh 0L7&v7_E]aßb]?O Em<1u"Ŭҋl֨PĚ> tKSwOţ$>y`{AjX)|Q+*E6x) ţ}+*ncT탕"GF =kxަ{c/LKM_uao"7{kY~bHL3߉a I$0Sg=[ځtL._mgY-<~>>>TVa>Q^Lieg6ݯ}loZ8kl&ny8Mnkg-?vxl2g~֙ؐ֜^}qm\} z%X:OzJgݷ)'(2,^"u>Ǭy1n~ 8v3'N_Wqֈ/pq G/pkizI뼇ǫEmnZ } >e'^[ykX[Ư2{2-{y=_Κhaaa!E 6,3 @xx8>gb΢W\86ffa3l`@JJJG~^D$0/2d/ <ڸX6Rnܙ5s\99y>LGsYGVCX#]=.=Rqe`kHv < A pfa_Ymk)/0Ў؜̝<'TAD)`vYS_ۻ؊^a?^>Er~/y}~AU@,yS8I[NLQdAtp `;sѭ9缮$,/sb90o\$H;@|gw{tneQM\.bv20]prJέХc2ťܹWҝN իwߍvigsQh [ ؚߙY;r>٫o5vo}aӬFMݨYjְ^r-L<ѣGSݽA>=u65 ˉn/9/$<"))mt&VDCEYD7yg\\?8ٰ`;ngy ܳuaO\ d^W_˿x۰Nl.63;8u6$?: #,rS7{5~ZTpDrp1%lї|ld&%7)?ǘ[k/=ߠq$'_jű,Vwx@,b_`TykT?=Q穉ͨQ+"#Nym\x+ct!VĚ\(b¬FTTh70ŋ bbbʭDDD.>[M<4ÝOž=i*v/  s>Iw< ~0P5QV2QՌ*lfTaFH[y`*rNIo2Y+kXu{M={q\\.L,"ŒKٵk^DDDDNM̔fp>Wum@hl{';v"RLKjtkzɬn0hͺ=jmW_džH)vղcED$t VO`(*%DDDD$+3zDDDDDRc{KDDDD$脩 jѴmg4@P*` ޮh3h\DDD귈ݵp{Pk3C@dh{mې?$"""_AlY@H n ?EDDDK=[~&n&;&t|< MX9V'X-T;6IZ9KSuklmq9gtJA.VOȗ+"teADDD~+ElxKIڎ@Dٿ0 ZZ nCga&:h`' sxf4AO= @Vd7=>֗&2?!m8[kZNC duKY(t%_ފ&-5IK$R&` }m_%Ut8xs8c>~a|[/c03X?r_΄^ }7]od[we\ޘ{_a pSl/άp=k ϱةvOګcJa4/=^>I9pM"""R G'R-si4mj#&ϾN?땃Yy۸xwWhpٶ6ڲh$=R X~nILIN܍,Owv.`= +0'̊~}_hc$'r痿vX +&?O燴81`Y~+GH3WРי4cԌs8 }u;r3a4wwf`ĴO'嶔ʽ&}2]+"""ASbP=[`̢,{Jtb:~?鬡.0}?|g'}G䚀-V9g~'#>.FfI].J^̃;8dKX~^~]x!"""R:gmÅ7|VNҞ6EѢ3 40]qJ\RRkAz궯ⵤFry]HLhNw2n~qrCD@xA {逹9UH㎽iGttv7lǗpq0LRR:QsV+{AĊHS3i˴֛[}4{xͻ\DA$ъ?Hgqe(}$s?7O'z 7_Mכ][|~1;??5vwN6 &EkwBL2~AĊH}+NKƣ}d -S"pMҙ>>Mpf>p$zA,ơɬ4#eD'wGlk8r ⵤfFf!K_ե[dn5v}OT8#nG:_lEk܇ 7˜[k<KFjjjeE3gZ Pv{NQMaYI.IkU#}6͠ZRJQBZR]+""")L]PJ~WCDDDLlәXAgĊH}ҍ]]!D7vH]Ѝ]""""ܞ5UԐP? [`q#"""5l/0_]DDDׯrS2Em~>Z ojڻ+f'CϬYdzd\DDDDj,6o""""tTĊXoóτggѣǣ$&`Gi$OE.pѭmM4."""":v|ƍ[qƍ{ݿ};EDDD.lz??wYNR+""""讻+V=""""tTĊH""""RN%"VDDDD¬YFWE40|*bEDDDVMa}vZZOEl s%>ye;?48^Geiя \^P(Lg߰% vbϿ+zmf%73c\~.W +"""*bƊ\ &q9(pBa~4nsXQ+]F}d:E##hTQ+55 i=p0bthJ[.[L9OdntZ8Ə>dE*bEDD$4Ʈ@El''Vqҿ""""@gbEDDDDEHm LÆ;dHmygStDoa "45iû^|fVMْǔoVZﶇ[{=exPѪWL^EDħܸ 2,=׻a!#TC9k=ЙX "/&r>SP(bkgtC9CDD$X`+b]5r(r@k.P "V7v)r(HK9C9DDDeOIIpyQq1 p" Wn6Ih۹jX Ⓐb\&EzlzieI[^-y􅱌חQ}ԸGٝ(sx(G0]""AT YpovlȲ{6E|dy\- xSSSK12[-lNطq5m. K3v2=[\/g$d\?͠*f. "Elq ym4;c|}c;4y|@rhcƮ:^O9C9DDDO7vzʡ!""EnRP IDAT+bEDDDDՌ]ʡ!""tEnRP+bucr(r]C9CDD_K3vi+Ќ]""R#4c+LWQ[94cHtr(Gэ]ur(r@C9CDD$X`+b5cr(r]C9CDD$Xإʡ"""AW.PfҌ]J94cf 4ӕrV%"Ef:݀9DDDtcWʡ"""!P.P "VDDDD$؊Xإʡ"""AW.P "V7v)r(HK9C9DDD4cfR%""5B3vk=tC3vq.o\1bz31, 3/1۱Lv4ώًoVip7wY>ᵜ#TC9tc>UUfٕgq},{w_Hb}to_a=ˏ_/`x؉:J۞Wix gǟ2 9DDDtcW箈Mn vGy@d ̹|>6Cy8Z $+m49>Óh]9Be<#rhƮzpE"" ˡXhЊ#[6%%lr֨!1ö =SDDDDEli.'g.瓥C?7Wu%/eS2O-[~\: 6=ꀓ߮cQ,;]9Be<#r{ j.+z9kZfhD.?rd$ 2?U;6@"Q_01gmV]6RHZ*CDDD7vzʡ!""EnRPaUֵٖ^ 2l$Fv'Kn3jƔ:xi<#*bM3$g욲%)t[zkxPȡIDD*U)r(HK9C9DDDՍ]ʡ!""|EHK9C9DDDՍ]ʡ!""tEnRP+bucr(r˞2?0bDlжsհ%mŰM~ؤr⓶oa@[v c5/(q} ;mQPaogDD!KՎ YvofȕL`;oE/wjjj;Ff|ˢMbډ#}6͠օ3vy}ƮɡrLDD-!O0u}L^olǻ&Smtlo?nRPƮ:^O9C9DDDBՍ]ʡ!""|EHK9C9DDDՍ]ʡ!""tEnRP+bucr(rK3vi.tKDDjfrC3vzJ9j+f "V3vUnQ"""SP(bucr(r_+""""lEfRP+bucr(r]C9CDD$Xإʡ"""Ҍ]K3])fЌ]fRʡDDՌ]UpC9B?nC9CDD$Xإʡ"""WĊ[C9CDD$Xإʡ"""AW.P "V7v)r(4cfLWʡDDFh.74cW`rh. .b5cW+FLoF9;>3sx gǟ2 9DDDƮF[Z/n\ 6 ą5N\$.~xMk,Grgk!:NgXa."J?8: \P֞ nz oȽؒ'15tc+b\'K|o:K^\Kq;e̟Z3uҖ. Yv,sx(G0"ֵ?ͧkHd-~ǃ]]Ow!;fZf=1/w#g7⢑CpCW$3:ŗt-Ga-P!""R7'9{ #Ҿew "֑<ĥי& R5""""R5>~QL.13DD!t @""bM] """"*bEDDDDBzGC9CDD$`M@ʡ"""!Pĺ][O^|^Ϫ@*CDD5 aiU#TC93HŖ upLo?rd1;_5*7ͪt=~MlmWmJoWp/ٜ#]ԭOv>^xָKs۶]2k`w[ [{dO]߂ng(`K9~< l}~a뉳sљe'qYlpg8Ң+9P""AĚ-b4,￐ec /OTX :) ~"xۼ?[q+rS{~olfc/f6Ϝμ_R~83r""*b~2hevkWZYN{nER 8lDs0к˖rk|7N]7S֓f(>ט~]mGwn%e]$%v4M>OF'Kn/P"ĵGTxDirv-E+mK`7KFAقYnaЖrۚs},5̮sie7(`$2z;QN4l a%GGׇ}d1Z\Hv؄&q9(pBa~4nsX`S-+qwtB&{Mp"\D4006{KhЊfϲJ`f 6qliLNpPLN]RH{\:2sU$uԽiNvmwoO/^ޯW.ڧ/}MZ-cԸLgm/}8m$n6mylcÞ.mˮ/dYhJceހؚmx7#%*cGٻ  #p(NNů hi}/IVY0mogm_#iqtoOen+~,wzNՐ%{jdž,X7m3^G&07բ ;554Mf|ˢMbډ#}6͠`oev39%nt]}gu@*f ",92n1yNf<>OZѱYzI}ʡ"""gSX?Y*إ9DDDf.4cr(GjX3zʡ!""EnRPb"?7 (cK-OZ> e90Q2j\_ח;|PF vFDDo{b]'6>y_]zV'6sx(GĊqXإʡ"""~ҍ]ur(r@C9CDD$X`+b5cr(r]C9CDD$Xإʡ"""AW.PfҌ]J94cf 4ӕrV%"Ef:݀9DDDtcWʡ"""!P.P "VDDDD$؊Xإʡ"""AW.P "V7v)r(HK9C9DDD4cfR%""5B3vk=tC3vq.o\1bz31,$]_ccyi3<;f/2Wr11fP"""N+ YXR9;D >z/+sqvٻlG+bhC29DDDtcWWY8]OcnOAق,s.ogKӑn#:lۗ𫃒m]f(\R+,29DDDpck=_̜zl-kfϖ}@O⡫b #^\uܕ^,6n-/29DDDtcWʡ"""!P.PW_N`6Zumi]!F2lh}J˾=fL 'C9 ] "4CrƮ)[2M\PADDҌ]ur(r@C9CDD$Xإʡ"""WĊ[C9CDD$Xإʡ"""AW.P "V7v)r()))N#/*#&Nd&; m;^ A\V $WMZ/-,>i+ e90Q2j\_ח;|PF vFDDΩ}^ؐe}kfmƋ\FZA}cdƷ,Zش-桝8oj Qka]!9c'g J9j+t]@D$XHiSwXe;vi>jF.PnC9CDD$Xإʡ"""WĊ[C9CDD$Xإʡ"""AW.P "V7v)r(꽆ŠUiY]/ >aFɒK`t>%sx(G`/eYi:J㲅p4}@P^VӿХ"""""*bEDDDDT/A*_~B+YDDDDT*o)#ې`\_gQ;xW[z^z'}]R`W pm^gf8éKPWu""""*b]8ͯx~_9G]?LuHXQ+"""""VDDDDDEQ+"""""VDDDDTĊQ+""""*bEDDDDTĊTGv.2 ki-":6DǀC'͠WLQ3yNEYDdžP(p%]N """"AGEQ+"""""VDDDDTZXgg:^ësP_nQ%q ówGsuLcl1 u渫#&=ӥEt^{X-1 u;:6D?گq831t:a+:t qұ!,?q.b$-^l6gq10s6h,\W|\9ǩ'seս˝C|%s8lG0;horaC drha}=l楱7sĐb.zNKt6rn/i!b.dǾ, };o"v0np헐l6QW\:_}2OU\~429O^ruG?ݎ<S.syM0p>I^ӈgTyT믓lWf{6CeK/p£I8ƺ)# fKNVW8n{2b}W&^E^N<˃8ۼ,L'CU#Kauu|G{pdǴ?{o|ZG?͵Cb2bRLՏpYDYX8u>_+=.+lI>\݊ o'7 &̒Bk߼$^=WŒk|2ڜ(Z`…v[o^R}cK4~V챒qQF>}<1u-|@Lmq`4>+_KƊOЯKf<@ױ/<͜$cnW%d Ǖ[Ѣ1q-'.P1hw綏NL8^~Z gϥ,[m Ӷ R|5< ?msA[l&b7/\/G6Ҧk{Hhޕh=0Z ~=;ؘC~Y[ 1<3{)~8IϠmHHlFsfϤ->7rŠ4Ini#m ;v;-fp!a4w1X?""tlam{/_^9 Ϻ˺{o{yx q/O`.=\Gvs8x fw鑓mޕ5oND"UPz8eʞc4iQmҗE#Mr u/NX洰mճ8mbjZq%'h@Tܓ%mf&1{\vvl˭lciL}TswcZ<:6ب~6W.G?V3?5tk3y>Qß̛n΋c3w9zW* IDAT|,H8~X)X7s=]/g%>!#r(8'NtKϾ㶯~h?UU {ѱ2o_YYHD\ ͺbH z~^㍇>$<6]B_z_$.o}+p?N Gdy8r?3JGO[Od޿#nCi(-8ALc'MRsb=b b[^|g._#1[<:6ب~6WG?َ@$|,!^M0 L^ ?y-‚hX?]Fjjj E <G>m\iLQ l'_خ|[mٯ1$`[j% :^ V}fЈHi_}}jf<>6͠4:tz 6*bEDDD$f}l-""zS~"""""VDDDDDEHylg4ZmQѱ!:ʭ<*b}2;EYDdžP("o#}o"_DD$TXmڷqo*ok.7ˈs#G3a"""*bEߑ#G """!J_%""""*bEVg |icÆ8i0V""""V~Cf:Φ_\><(m۽deয়∎~MX CMoƓr1=qzF~;u44aڴd^ Hҷ5\yP߾禮~3IndG8q"'NX;v:Wg2Ww[c4ڌΖ¹M  j3{Mj؇Xhŋ\rk=]?K"""Rd@lٗNf_?Ø[b?(]J'$6M8{=cDDDDElm9lk<f儼Q2^t+b =.Cf,<žU33։O?Kg7ſl;k _1]98gsǶ P+_90#=ϐ3:C|'lp/ E禒gdV7` :ܧ59yD\yl)Kt[[\RhPէxqۺ]>I]+I,ٖm, \uyI™$2u6\G͇9l~sF7,> 統e_V2q٘08uA-$X^3h.|kn`g}8z1ht&~5/\On:2mt$#ZnkLe:hHkM6JK()[\4fIi_:=2~~8wk7Dqy}b -e:e~Ŷ@DDDBY1+o%=(i3{ :f`$C^'Yd~w3w|?UOb;McoK8cۈ=m'p.2|Vr3[3]l]]hn1eh{6.dfǩ?nĜ{q{$Nq>o5&<ĮMid"k&/ WuEʩߔtPP=m|bMkѱE{1l}?{wUu?PE6Q\5BQ(5d4friRkYe|ӬTi3ۘ%2&jTDEqCdQ■,_~rι\|?s$"""UMؠpzTߊVdKlxA2DvZVxB|3̼oLӦ0v3/c/ {*1FN3wSO1G\*̳u8Q숫q~x;sώV!.y}:m')q= Sl^XIO̫62xQ3Rshg:[ii|YL6zܖHvM7f7;)*a-kVs/3e ͼTv3.2Oߦtc#<6J[ ߘd~+x-M.)|g;u]PGn2a?)*+jfqPNy'z@t{N>;XJ ^pƚoN~^4vLh<ΉNgrz>Gi4lux:T:#ɤ-Z; ]ϑ e'aڿewj[[ڵotρc9Lg֓`?+`bb㹰0l8;{--[>}!֖N%nX{^tvg[)I'}x_ZXgcC ]탻=`Ep|* VfZ:d$~Mq>Dp,\8,\˪5t&>kKKՆ؂ĭ( pȋ&xwOҡ*?ߦ8xѼS^ m`+$?&riO8k2]3al64,#vD G)Nץq 8uJٿd+x'"4/Cb{ #!j #b;()$eOl PY%߯}~&vEdn_~M4H s?NGзɱ#ټp3\"]خqEO p"^=' 9#eQfInp 'iN$4.7_ rf=:/**bܸqN:u>׹^03R(L%u&ZꯞcN}M֫W*oGc03R4"""W,3iϳo؝D'Wu)85GyY5ЙR[鵳"""B\TM _xYJ-""+Ac """+5Kɶu£^DDD!Vj~cҍ]""" ""VU3a""" "7^u(ĊTSNNNL2 '''uBHgX ۹a״aΕ}v%7}]۔.ylTrTzQ_oE{_}W18u(ּ= `:=HHpODL DF*ȊDUN` 6|t;gBqN0ptr<#F;eÞ 7 ײjM1yzƭ>v!`5q+ ":Ž7t_fRvZτ l@DDt 1t&(;_7t*e|iҼ9H눧0J 3IYۂTbI<}]×,pEE$}#Sؑl^..K:ξ D_ītdA:wı}_1n8勈pFN:BV)f}-{WO1Ǿ&իW1)|+ 47N^FԺ~ښOsM#,vvn """B\TM _xYJ-""+Ac """+5Kɶu£^DDD!Vj~cҍ]""" ""VU3a""" "7^u(ĊTSNNNL2 '''uBHgXa$rvJ '=_?id ?q{_'fCæ54%n`?>`"Sf`Agt:ϖDw),=&/"""enrlV+¤sYJ)ak9[܅0\98b[j6|F5nB#3;WG^HN.^)6nfRN,_=|;?4z,":ܗ>xФjq\Wq%CgL<Ƒ7&lP8m}=qobmpɬ?PrC;I-C+ِr>œ [)zAn9ibxld|8LkprwO|EN!xY2ζt˥1NN|a9d2]3al6].kNl/ 9<1CbosE\j&q|ގ3?(Eى4))xQ 0?-h@5'q~"}pv48O:\+O;>|Ӌ_#j"ƍ;!̣Y>i]̵[:}|3,?wc;E.%ń%/h|#U)GDDDDjWI """ Rտƶ𲎳[DDօX[?Kju+uRɶu£^DDD!Vj<3#E/""+rcCiU|=S&""+r骪HeQBH5Ĕ)prrRg(ĊTVɓӥ-L<EB FnyK/`G~mM;v!3v(H w}Wݓwpk0u1>ջf9mQDD$pp ?~7ד%FN| :bBoZjt :/^͆$:t %Ro;nYsؚUzv-,pU6fjDDDbn300kTo +vEDDFxs?fEPSW̓l~`ÊOP7u~IXN >F@z><|b㷫J+m'7I;Y9obnY$5ȭmq,ϦHlHv%Er2.kP`rVebmR1'֎{rr˼;Q"??@c/ҫ0u[?w#r < '} ߼S[LiidTR#ra˔qgƆ|B\Ջ' +O.X<[33mzйM[vS DDDD!ɱ X2&eŮf#+ˆIddo/^cpZpFl*m O IDATJlR+ɔFnޣ5~FBr:Iit"CcNf#oXyKWǞov|nlY$żMRLE+YF+ػ᥈+ODDDDjgI """ Rտƶ𲎳[DDօX[?Kju+uRɶu£^DDD!Vj<3#E/""+rcCiU|=S&""+r骪HeQBH5Ĕ)prrRg(ĊTVɓӥ-L<EB FnyK/`G~mM;v!3v(H w}Wݓwpk0u1>ջf9mQDD$pp ?~7ד%FN| X1WSRvx5\%zHDDD?Aq!ifHպ7k[J.en^XjT BlTXt20jW:]:b&a eZq+&tx. 'ւ߇zxt{{er>. hc%|$ ySWdq0~!͍% o v~Ⱦf]s7r>$LGd]ww;8=⁇;V ۜ!^ʷ0fSt«s۟gxGr=aS|PF ?OךEo$52`z Ű{9w;۴݇}Ldʌ={NpgK Քtn{wv!LMLH=>pMGK&423ؼcy&䑗vzeEr0n.OYCxipFo/_nhȡ (;Yѻ0H^ir^&4#GDDDcl9$UrJ6=Om$%'aVr+^jP߷7aiS}+kXNVm#'=MWn_<(L|w)܊93^x?# )9㳘6m"5""">bPi[l`k# U)KSX(vLe&ꍏSQqhq6ANQ1gynme6؍dfqPNyM{bc """5Qo7t$0N|?>}n<.pP[;jt>~}In= &6X,gwzikYFrj:yyG㢉rD*= #޽E`˖xO!hH 9dzecP kprwO|EN!xY2ζt˥1NNZE]Ao\(EOvK!..Cصk=&Lfӕ}J {ogٛ8\ /ܞ8dexz"?tPLOsI~/Ry:o=]KYJ+ٿ/&,9`-Z{_|#U)GDDDDbEjluBE-{m/lQڠ1QdL/""+5YMux[ QRQtUUDD DDDDD!VrrrbʔI8993DDDbE?&OբS_DDD!V <%?6w׈;А`BC;vSDDӍ]R;^>b+?;]O:ui6K(""RkHUXgt8?˛IG_'HvTBlBoZ A'ؼ"EëِB.XC"""r=@m7k[J.en^XjT Bmfjm~Uva{ŮHF02cD8~y:ٔ_Fnޣ5~FBr:Iit"CcNEQybo!6J3;KѺå(fS+KWqH^L@p_eB>?"""r]U}N-at=_>JH~x;swޚRҶ`P <c(vŃd(9$8L#vqFy`KV̡UBIIϑ6gŴia!M`;O\Y-Foa2Ut-ާrku eΝhiڰL؍dfqPNyM{bc """5Qk4Ha~2ћ}xTpP3= -7JfGi4l,-t|2ayݻhl1""": x`4!Gxl}a`&nEC^_綸7ۿ3]x~, .tQ9- a׮L0ͦN4A|å@zb-όX_g_ G/Uzs ;XVX`5O1af' ЈU)**bܸqbm}>/eRy:o=}lY$żMRLE+YF+]T^8[Cv|n@#&""""zc^XZ_c^xYJ-""+Ac """+5hjɢ.X?\ш6bh.4w8I,7sK+ض _=ݨW=?oYdv KyѤ0~~O'""+"R\2W9Nt O!|p "0\a Isx(-eӱ]I}""" "ra[Pm' 8M3ѻ|<M̋t΂$Nĭ:}GSKm38ҫODDD!VD.P?鋠fvg7f>Xp(Xa--<̡X"_n@LaKH:f^DDDbEX L+վ;=~%R̩}?&uIy x?s{DDD=bK< 4np3NPxiK&2{"^¡(K׆+ODDD!VD8}ZhH&GINMx~]sz?0ŒyI.xǒKQە'""+"1X>!#y0 >^?X'^ 70qd廥k9ܚ~jFc;];m#?.i9\VDDD4͉<Œ9=ɰC Y~aNtt3[ ]{7vm mぽCz},e^{? 0OdDC'""" "Uʱ$yIk*ZYF%+E`'"""i:(Ċ(Ċ(ĊBBB2u9kEDDDWI PZSg\nLa+(Ċ\[_ԺuEhNFHEDDbEjR'(ĊBBBB(Ċ(Ċ(Ċ zFC+}V:B `:ADDD!y;5r5 """ 7Τ{hEDDDj%"""" """"" """"" """"R[""""5[a<Z~7s؋=UhDF1[;$Rfu+""""54/W! ۻel/ʲ<^ """"rI62}μ֥S|ǚ>tʱMsm7i1&=Mѻu_+""""\=!`5{y˖s[eO 䦻nlxfNͿkшN]3a46fh4EDDDbK[sغ-PLvA"ngGcXfvLK49ο[)h 9/Q/yI4 gDLdH|L2K5"""" W<1g/]h,PnÑ-"z äXC@.H)((VĠooV,8 ' `ju/j=*߂_fHf7d""""RCC(EӍYr8cFX/ΰKsz@30Oڂ-!AMٹ* ]{A^pƚoN~^4v8.m6X/T9fz2?TbfIPDDDD!"tl-t {"; +I@G\䀵e%1 ײjM1yzƭ>㜋&GOi$9""""W>#8,#vD G)Nץq 8}_yVӋc4LoCcGvyf8I9<~QfȊH]to݊ZWs7v}>XyKWǞ%|1aUPNI\pa+Vʳf oщ+"""uaߤr:EDDVy>NI Й."""R X""""+""""+""""+""""5@"FmCuI.eA̿٘[ZMh}ڇF,?}"ml^o&xSPDDDbETkXjº2'ӉNaykΗ$nsK 4ЖYz8NAƳ˘b2S8iow!x:+ODDD!VD.̰>tʱMd޶ݔc z!zOo_yQY2_މ@8zjxQz(ĊQ¾{9},˞+`RTbYv,/7^I&w0%$3A}""" "uLccF|Q\%F q yP `#;"Ba`rbү>X LU~Sq ,bN،6HkkۛưU'""R["0OQh6qsLqv£M;_z?0T^GI^l6\y}""" "rɽ˴ǯ?EF@69JrjZS<f̛Orţ>\ڮ>X94ɃAmDxdDz<$`e^M'3g/-] ִW3@?ށhӬdqIe*'"""iNH)܄xI}J: s˟jږ6޻kKh<p׳Ŕc.8/hy"&%U>QR-$iLZSRv0O,YW\/˯>9M DDDDD!VDDDDD!VDDDDD!VDDDDbEDDDDbEDDDDbEDDDSω|^#."""rrLgBТǝ:,ouc5 ^ɦ@DDD!VD'_֥EDD.BsbE0@*""+R0:ADDD!VDDDDbEDDDDbEDDDDbEDDDDbEDDDD!VDDDDD!VDDDDD!V3bEDDzH\[֩DDDbEn0 """ 7+wߩHNQq&3@#."""R .QQQN .ڧK^:F#6ݺ$Y l-6#]! Yb U5x,c{'L]VZWKsŰ.%K=[PmümIď1iҏޭ]zXQ¾/2 w;!` """"r46 )8f;gi>EШac,W^!VDDDDWk!#y0 >^?X'י^v """RC<c_æg[.˿|k[x._o9=ɰC Y~aNt4ebBTmo2r[w0]`m&d]i:8 """"+""""+""""+"""" """"" """""WkF\DDDy;tE;uƉe IDATHՍ0 5oq]""""5\t/j] ?+k}Ӣ/H9XDDD&ZR- """"R0BPF@z><|b㷫JϔGx6qtzVΛ=oQ g&yT'KX(͛R$ nn,i'%uﳓ>'V^W[xb4"""" %X'=_?idG#^~ ,1)yx6gؤ7sd䗨<$ 0{k[Œ\5|=H"7="s`EDDD*M'0\98b[j6||}nޣ5~FBr:Iit"Cc,G|I&-q)eaRlؚDfN698ŵ_OlHm7JF#nv %[t%Ńd(9NRNџXL,%m x{IsҩۛAĩs? ߅ HTQYvg6[n-Foa2][Kӗl+(!ώ,f9E?1#g.o_J9&+ŠUUN`9@ /ϳ[[p*dmi׾Q9zZ7`+NX2S˃8[PvѶtvVn(^,cC ]탻=`Ep|ʃYy~ot} Z1 ײjM1yzƭ>37<[Kݰ+w +%umл^6m82թψN'0H눧0J 3IYۂop}*AWjɂtcY ")mhrn6/܌YG:CRȯK`= e+|h0aǗ5Y'"""RJߺsĚEY>0v۲HyJ (M'q$.pU`-[,qr:k)eX èmWXZo-7sa_N"""R<[7!֮w$n編:qEMgtt6E+)gQBB"a4mڭ Nup) b ^{l4}!kؿG ;Ly6s=O)DDDbETkXjº2'ӉNaykΗ$nsK 4ЖYz8NAƳ˘b2S8iow!xz.>X0ЭK(6yvS&虇z>{N}&Em:g|y'V#詥HG'""+"珟G VEPprK3,{R RTbYv,/7^I&w0%$3A}""" "uLccF|Q\%F q yP `#;"Ba`rbү}WQ%l-BBB AJ"]D uE]ʮ6ֲꮺbYņ EP!H^H HOHμ$@Bh yO43\s=sFDDD!VD9v6Q;#bJClP>ޭl雯F |c4Ė XEYAU|y'&$W;umwf֧~Q#Jv|It&miO޴Ou4ȧ#?AJɣa4,mODDD!VDalj:O`L\ 2t42撘Ri֏0"=)GdeiD4Mãr\>tlV؆њ00j<|f*ث=]90?tR}K?aY퉈BHrlۗ+t[OB&?$+K%q#$V{{"""RN DDDDD!VDDDDD!VDDDDD!VDDDDbEDDDDbEDDDDbEDDDSƉM3."""rukjNDDD!V<0 C ""{Pz=845+"""rZa&bma~xwnX@js`c"[֕'"""rۼVwN`ةkNDDDΪb"׭\;/9ɡM3$!O?K|U֮zϸޘWm'XvaʰXwX03CPNOFvb/=m.iEViwa"d6WL9+ck\57v$lc4IZŦfN\ϼ9V.5g~?7O_m}hگ[&? k"Vvmy5yβH] PtnN&;ׂl nv/?3<<;o::&Ipg&MY!ֳg+R/皧_ӆl߸u+֓Yle g!no;6>,`s Ghؗ>@DDDΆXܩ,lFl\G }AC~`a0qgwh՛r3F~F_8""""epps"?/<C!RTd{d,#!*,ka`ُjoKS ,r>){ A UJ7•W%I#ӸSgmdd`=&=/%uCijl9.B[u$^>Y6ѲmvٰC.OejPVq >mF0jH$7YL~3E_;;|NTab?sz=>eԸWqdly fו&"""r}Ԥ{U yϼ܂ҝTqYe|Yׯs9N\/{IKFgѳXTqfVyxhFsKUt欺y+{ +]DDDDDDDD!VDDDDD!VDDDDD!VDDDDj;@$@bz^iS¡<Ve3o(/i0C[>KXC +|z[=gsQRw{Si}>Nof5}!SǠ'ߟEUZOᅟ6. ٞB>Fҫ{<<Ƨ%L'b);J߳O0a3)&{TW&=tYήɸOw{""" ";^-sp'占Vfe%*ێԲ`N/< \֑i>Gr׭ a[g`{""" "uLG1 q Ӆg]1IήtO*feobbinODDD!VDj>ٜKG=Hx~F) fC<{=ۏoK%yilODD["'`egWeL?8n:\>׉JIYoODDD!VD(IA'[b/duh>){ӎ?ј#bߏLt)'Dڲ7=X9Ʋ<1q1DwbѴʘKbJ `YGxhX?B Q܂4 "roۉXڶ]#R/m.Ky=)>"'Nd{Wd0š]?2e1[ |&&bNGkcp:wS$3}b\vP|I/8=fU'""" "Uʱyl_͖on?] “,ęX퉈H9u'XXXQQQ L'6aθUt0si$6??5 ~)NBHLO9ۛJ9 9aTTDDD!VflsUB(Ċ(Ċ(Ċ(ĊBBBy1bEDD=vV ԭI;X0 UBUtݜeDDDbϟI .QQQNClJ!ӽ -"ƴfF1yzuO vX>3ZbEDDDjiu: vĬKɨ;˽"11|?,1cha? """"R) RS\ٰF$sx>ݰ5|0bEDDDjItԝx&Yyٖ@HlY+""""gLGar 0 i+ĊوXXg\!VDDDD0(<+ /`){0O\!VDDDDiHh4~h7%4 GXi,[Cdx' M$~9RVɑ,/sEǷNߚmeY^;? qqh׏L>ϙ(W*(6|7p[ Vۗ'Xt!u'ZG!VDDDDbEDDDDbEDDDDbEDDDD!VDDDDD!VDDDD8 uEDDDΐ'k)Ğ M{'"""ga@uގ[O妧MMJ=|B CזH35)FҚbEDDDflbmʿ""""r~TOlGg-kl8y׾-쒎4 4u9>’y!N8KA4nTo!vVd^kY<39ife:bAI~I59/-F=ψ̚N{¨{X}i9'?id2go&zwv7/Mۄ'R#]z4Z&LfA1o6SY;ۍظ(g!uC XSHZ>JV6=-M7ONv65f7'3o=//""""RWCl,̥؇ܭ5 B#hٍ#oG)of'lF˶!g~ <ڛʫݤiܩ3t22Sci=v35;};)Ͼ gV>eԸWqdly VB|ڌ`ԐH} od{/dY}pT[Sj1W9.zv~;<؞p%2X(Uy~^;f꒹e;t""""&è)u`jt\GïS!v5t\lQQQZN؅HL;׫;}J8{'|,w?r:kPý/sw"O_n3""""[iWx§o#t0[x[."""" jItԝx&Yyٖ@WDen=>y6+L!0Nq~iDDDDbc[."""" ɳxC^~feYx+"""[$tݼ%miO4Stu퉈(VJcu";1dhZe%1Ӭ#<4!F?r:u8GLN~kb"[."""" Uʱyl_͖on*EDDDZ4\(Ċ(Ċ(ĊBBB\`8 uEDDDΐ'k)Ğ AKWBlLO9ۛ+MDDD :}bmzpw iQ +kjRbma~xwnx4Zֽؘkm}3 lqo^c]DDDDE ⶼErt 'yU\1(ƍ:_0{\ҊU`ľ?ǂ1Gw'nO`@;9q.~)[2=:;""""rz!4?ן_s{9dL<:;n^Mo͜׹hys,[(Wiw m;#7y)NJqBXә9妤 bvff#0QDˊWY#VDDDfSV>eԸWqdly VU4Rn]8x/~bIv.*n}gqd>ukj.Zb=;ELqqpkc.[a_s)Oya*آd0?7ls+"""RgB@."""[{Lfθ*ڦJ-sTS,uGPXkj67T!"{)u*hPBcu+""uBBBߐ IDAT(Ċ(ĊCU K7lzܦfWqq{UHغ̽̍ZKgi'ڜ& |;Gn&s̙{QQ:b=;M,% A}+ ,n0W6!62>K.⮿QySXf>o ǽ>Sa/3hփ>Ow߿ GɼcuuNsdpi bs1V(4y\٥),: ֧a%+\';ū^_r?nݢ`3mtF\+o7:^Y}?ftWw8ciRT"˲0= Vb;g 1&Ϊ[%57Fq aϒ+Vv',zBlyWw^`w?JO1o7K̄x&^ƩOu"iE>OQ4=w_OfMa%[݉Bvx/1?Ҽ1y2~!~uJ\HgK7łepfC$%NOtrkE0{g{n<efp3z]6<̓wE]y΁~.ZDzEp{餤iPK6lBgfrב6?-]F^&eq~-Y}c* ;e1aS!r).pEXXeA"fLfϙ ow^OodձdZہeiEi5˴*4- Kc ܾw^~o%}H\î~xJ fi}B j]in7R, 21M0 "sW00 0 ]^r8ۖ'{To?šuyXyUR~:_񔷺ZUzQz=GiX;#aY9.GرvTv=y׸kbEDbO-0i40ӣu?c| f|_0w1[.h[jfa92O5*q=C~;ǃudn 7 cذٌ*ƭc(n{!I'kCz RIY&OZicX(fK{;q9aPvcp\Bdeg0y6e\D~JU^OXWl=a]eWQKٵlTveh͉PO1һ_;qQ=M#]߶u`"ݨܝ1`F䬂һllݘGAUDX.‰Xy.hx-;("33)EG^Pua4lJ&JSyh,"?>- V~Ѽ%$,}[8Z}]ܷ#Jx{ys,ِF@_6nÅG W>JֲfI[_f@ ;+%>RzUZo'/?SZ'D}d+=]ѧt>DS}m׻(Ğ܋ٴ)4:Zm4vŨGnq$|9%v~_FA ޝ/nKtf5Vql4Obҏpvy !-_0ga8u$kSrZ]PuaIytR鬛i&a ckЖlM=l [%4f~g/fЅ㏙ă% }>>+ݢPh q YC*JLk.SoZg?'i'j]DDbbr#'ӷŻqnoI#G~{9Cc+ _<͍Ì'Y+(Fm1 vk6LyG]9_UNԥ#h^dt7E/0Ƈz 8hroS :ڇ%DB2F[#,=!2n7i1q:xx2MJ :͆f0~7vi[$:GSB/z^OX9NpXOu)=[~ɏl[OU_""R:u:ܸtbxsTw,bzxec_n58וSRv\ .Γԫ*). z u-K7 o͎aa;njU0wn emD8To{Yg5G}|zb*0%STTn0޾~TY|,J*)""uBOu6;Moo<.N͘lLn#S3N/};lvN)}^2M*8```lXEDDbAGgGAvfe+eY\2 z2M o?|/RP6aXp:VXAtT0tbK-*""r+bl 'vjc˫}ޗb CpC#*W*!FFYt+: """"RT;ٸR]^u""" noՅU*""rbb^"2r獵 g|EDDDtqݺb%Gݛ7߄'VDDDD ˲1cDDm۶<$$ظS[B3.~[w_|;<XrsWϓTaS_v """"p_^-""""R%VDDDDΪ>JV!VDDDDj3>z!U""""rʞjdY>:¢SuDDDDMfY[nZG!VDDDDjv'M*yg AC,@ܧNy eL2a0t縄U[SU_aqB-&v;W'VDDDDj&ZJsYCVL\$>uREDDD.tQQ3v$b:v| p}:""""uAZBFxb۴yM:""""ugiР-[%2ΠHԮ];^xQ>X+|,!}套^b`nXyIt4RgSDDDػw$&M믽8:6&O-tREDDD.t;v0q"5`-,lp:""""uAM}U }XGHq>%{FClBQ/"""R U7՘U ҙbXxՐԎ٫]!YlQQQZΡ*%5q* 3 7`Ur}+Ċ95=EupTqo\;: """"+""""+""""KDDjb,ķ{fz|_Ha ²,]˰ ,`IgsF CB\h<"毸݂ݰYAATAi4w1>o<ӂn{ۺb-C8ACNO-bprtTU -бe'4hů+ǘ#o]Wd f`6Â(1 P1ԩIYl 8A6((v?9o[7¡u6PoOZٖCy?h=n}w`x}ԕuN>z3 [i2 ,  %n (*qaA̲XG@7:_=';qAС_kB-""Rk-^5}ǒm&ǵ~]H>}tۉPwxsT/x^;7o}d6c4𘐝wu_ʂ/dҮXhS0[irS|%<ƥklefqHM6-ZeqOaY-'ڴܼOj ">ųd͆slLӎ3*Z:/kP[wۙEfI)UB ߞ|}|P"xd9[heZyEX%y5owS7+:2ɧ?=_>Dwf6>}y'TS,&ĕطaǓa`z~OW2x\̧f:|R}?A@Ʋ,L,,,iOz Ǥŝө}{VC> s_GQI/†7?fϾ, h?&8zݷ1{gr~ 4Qz]waZiDp`)4A'лU gB:6Fn 0 ܕjC#n\.aE`^ǂG_6aveaͮ hsթHs01 6;2sֱ{ t΂Ez< ߦgq:NaYs&{t;]/DO?v7v+(Z k A|\>6زl^h]kwUo"#-Ӵش+{rض'{ّö=Yl۝`V>[MDz̖CidY h$z Ć.c+)F mzwcDv@DmkϿ'/3W#$`!~^vea6 2pmxy{' 9)t6BCky:LOX ,= OYP-]֪^+Ȗ.xpTgNY߱mKzaِdAb-9p{ܔ%hIa$&k^{σYq] Fk䄟8L ٕQ~kf:UwQLw!N_Г͖thѝF=VFed!w ~v-n"H#p9>QTbetn;Z+ݢjv@·f#R/p+Yi SVثX~,Q~sƵ]ΧȯAąi=n0 ˂8?cl aqݸJ~/[]@΋of{C"y}GP+;7g\jbo~"RH#mO _ 6OsWlP~\ϟI;HAkHZ{/0^W|"R#; Pl60Np}+ɰlZMooEҮs?%-$KGp+>@1$q"qEe P?gϟ'VDDjQ1|WK\fs0pۋ˖K#i[ 6ۑT#4?NRXa4+cgs7͙Hl7ұJ ͆nfc+87}[}A]3w]q.)kiu\.G!4Ͳw`w8;8NN'vn{av|ςŋս##Xytز݁ŏs+}Fv2XAY:Nez=b&iaZ f*oIJ a6Æfìfòi^fYq̇2G >أ{rp\/Z@)f^Ӗexp<4ue.DX Q^K#O4ү ʟU ÆaN3N>8KυU:y>-e![.øceL e{0E3PZXR(Y e7,D/ Q"Sxjvm'*&uzM^\Sqj?X8 >&%'IǡA)IJJloj?NSk:J[G]f~ }kbݴ40mv}]R6%`JiMNMN9NN?AFx]fgf?.$A:y>; QbPb@%%=?-Ce  FZC$IENDB`gsequencer-1.4.24/docs/images/ags_crop_notes_dialog.png0000644000175000017500000003643213246707333020133 00000000000000PNG  IHDR(ւ@bKGD pHYs+tIME :6TiTXtCommentCreated with GIMPd.e IDATxw|C B ]R*RTTTzQ,?{6T,("6BQ:!!@H^M %|>N9s̜;gZ  RhEDײ$ ']1 $tD I*>rw$WL.!ɲ2얫lϭle;ۧsw}z?/[eO4M*>U9nWz>44>e;/Cmh5VTRk.'zX #MJ M"TJҏirnneQ6MB,EY}4@8lIH@BUo^?,}jYF=G"ULvd_ʶP\d:eR|*hVeYg_N[ɲUwXN>V_Nohm*~W/Y>$Ut}NKvf n#i q lyl-iĒjqI+[mc#IKa;nY[ѨFT[ F+P tgBRLyh@@ЁؖDlW-UPlv>` TOl$@urOhV6 xTА`zyҹhT5UU9t(^~ˉ{%*4Ir`}Pm}8ZjGYPv`9T$U:X]/Coa{ȿ-jw+=!"ua,Y@5Uiz !\+P)PF#fl#YN'*(NPnX`!QòTeX+koUͳ*faf<.~'>]ʉEVÂf<ʡE%ziӞV:WXgѩ4jU k؜c9f(ZC<v䢩PmAtt[O;FyθiIY!zjbT2UpARU|S'mb,O4>_, Cs!]ǰ,Z5cLCpί5@-ڬ#bkPճ4;#̶ɉʹi3X\!RU4RTQn$ FFtCyyRTU%88777q\`j5U 8vEFdt.5 Ɗ˄Z[Pw5S  6~ⴊ''-Q1_0,F .] h4iҒRLf œ$'B wpfhTq+ur4'GQvO5b[r| 5)N: e]z0%Wp23ҬV4$M]r ڹpu_~ې[^ l&V T-by68Bïj!9TxmkWuI3׳ Z+^(4(NXWv!{pxշ.'J= +cɂ=,+sO{:GTo+ʑERUQUҩ+V`6֋Hޞ&iuhNS 뀒"/^T#dbOe${k/˹ev̦5|M//8|8={R\\DA^ rN{edh~gox5=%>0̈g>dlZFvෆfAF W$5u+wsVPz8}4*qAh gOxyD ny:>YZoG+}̟po$%9}$4C Uq]JXdw>}UM[xӧMëjB,xq²JPP0Ǐλgu6yy;VN ɡKmv ]I4w`Xס%&Y)zl|L;OL*"e!MF$l I1V1u*ՇV()l'>t5J5$]:EV=)>_:#9ضiG|a&jAN]܏Ś<_חNѮ8;5@;18 vǓį%rf999Qc[TU*KmplUYIԔ;3X%&%UVkcy%8$fc73Q\\TZDPP0AK<;y޽Z:JN!/:[VjSH'%9US'uv<}ltf|ŕms.P?(.@9v'-븞Z'р⦙ͼJ=quuŵV:UaAٍ6hfyN:ɞINNq 6W9 #-"L $gNx9"۳wV4#ōZNQp&py gj LЪQs Gaٞ+n-3; m#1ӧxQUUk5w@UTm9,+RhH,53РgѤlFj%5`a[ .{7PrZLkȖ.9á{y33ґ &+o3h Ws]VDU.h6 5`vj-CtG@x-JZUE J 4Z.@Ū+@ 8?Ġ.;chi@\+I%41JR.w.rΝTgi,yEG< Vg\aNίWgZ`7iC{f[Є8 M1(@p/FAqXZ4 tSekI/zwg>0]#$g/ WBM*4W5d m3wdǯHLK0VbDߛo=i>cݑ?I⓹"ԝPB/B@Jr9+JEЩ2S0w/h1by߾{K 0I̥l7NN6>@#f3ix$C0e/.'AA'?}U.Q3nV.ٳ)}ei"%451sj2vL$;7 r̪ښH~A)k?d}rKzlo>N$$_O~z%Wc-[Ⱦ, 2ظh]KvG% h/q %¼S$Y֬$,(i[Pn>n4"Cr!HAC $TVK]?_5AJ<ޖp(:Q6s̤GW%4{,c}/~-1@TgNer$18fGcK\"6RKa|>wi+}=%Zb,Wiuahu~@JZ&(i{49m(LO^\@bաe"ִlUd)~de92%<> ˟fq FMϐd$lbCj B4t$}V 4=s тV \J J}|:yg mFt<a QTyAӡ..Ώ7;ah~M;b6q6$#״ۇob?ZLn31w?2jv"%߽EЇyLwGE=oRX$R[P>?J,M,߸oLDG6X݆Eisv'^>R riI'qk.~ut| O$e[ NI9xӥæeLĔ9y?B׽/23|6Of`_Oѡ=߁-4%%ekR.H~Vݰ=m[Lǯdg[iO)w.]e% @~5Z)\HiAEh:};dHCU} ځOIfD=V/!됨L} ΉK#cr~L@)1J ]W-G$ig}b!EAsW~➻ٹiܴ'j^$ǝ`8)4,WpjWEĭM jzz F 넛!~؀!-s~>O0r庙)(,@m;7=_<,451I Fj%ᜧ7zW_Zw@h_m;^CLj+;"RPGT/Pm_6"p2!PͅxNK@g@p]x}تyxx?  ucSAA _ M)[MR9'?7~Ch%-{첻*j1J(i fbLDA*"PVtgҩ[o~E37'vXnz`o>}$y*AEg.C4AQ~Zq;x&<,޾䑔p?z"YN@x{z(X .@5 L _H8nx@ %B(@ %@ Ac%Mp߰.~7_bbC,X!^"4:oI;MI&❷ aWtj$/u^&w'L!]#eO[Νޖ>߿#,39OG̑OHn~(Z(n 39;>*'v囅l;^+!qChR+Xuxrh|l4Lʲ{xm>N#.@'MpFU҄ OO1#5߅38{6Ͻ~i7NN6>GE+?f~T~O 1OGÃng_(xIj t+c׋9CaN._OT=¾e ٗEAFtkΙ^\͌ɥEHɤ0k5="ᣝDB2'pp^rIPUEUBGqXV#ڷ#+[PIj Rh$!뤩J9}4pHBHe_Z#qf|9pTr3ӫ, )-Qt~i%u_[؝z-7=#1~v$P͈lLG:#*A&F&h ]WplC)Vi+}=%%br$18fGcKq-<1j?W;ʝP 'M&hY'ɖZI9%UNMkZrևDQ]|KZBvF~?>{qCVP OG9ihv( ΨO-kvata4=\+Ύ}zb'$m3"zq4XĩncB:M˨> '<n~:tGsCh ?0ZI|A(}Lɱ/WFY{;"x5iρů0c1SQ6p(flBd>v#缏ëȨ2?8!. 3HĆ"È{ LDYfR;n4E0I0y+m)LOЎX4Tlp}N!T,ҧ}>w' Tves֭ ADtN!;w}SF'0vH4DŰ6'W;{S(7Ԯ;axy#74Ur箷ybbu]#6S( JH\ fWQuQHQ%du{'7CW)l:STH\o7G T,{C73%魋xt⋍~ # 7\WMzgugve\SXFz6g5A:Nyٍ}ǟF;b/}PFuVeHt$3y0 $m{uooz-SfLdI zewČ<'(DMτNlx!^|כ!g3A=*nk_g!P~V-6͜ڴ!7y܅G4A@nez1r(L)ҧ;D~ݵ˖r8=Œ=r9DbPĠF-1a 7xu/HBHaISuifnuw&(NyE++0:DbPĠF$P$te̿ޏYc%ʃ3tW~M5ؚZuȺ;jvEbI.h<.DJX'Zz7IA~>Qul9a- ( 8ȖZӼy"A.Pm2W[):T`t .>n7&B Jߤ;i_DF:sDbP Ġ%/_F3q<5xvD۱JW 1{ߘ(k83~(yDŽǠ?ʞ'>rgGO)))l69xz=]:x8{`aI9QŠ 9 czNBџĬ",p%0rD>\&$odK$ 4 U FI05ʍ&+si9USk`0~IZ%%tٿi*Hɸ!WOQ`:MK^$g #~=vvfPE^b?7CZ?gl]YO%ʬYPT/(rX1/6#qS3 I^U rBj$}<_n1h[N9i-WSOI<ڴUQO@4Y5ʙ}:g(E&>-hA.‚$ZK=[]CJNL6qRZb;Q;h7j8ʮM)Bdw_ 3n;SU"JFJьEĴ١V7Sޝ>τa!,Xg[5c<Ò-n {Y7vq|s-ѥcE>>G@\% UQTM4 7:?O҂)..k=5mgXKljE;g;oi ~o\dy$ۘĀl8=a!+g+qi1 o㓉lyy6w3("yC\+vZ;h^9Ӱ|󔏹W= vhלQqsl{$Fiw\قb;fϲjv;OXYּ1 Ѯvrgf_HW@=4]@B/C6znXL֎Mx+ˍ2::Sɍi?%mNɡtl g~ jI4ogi:CFӗ[4]qJM>߭a̐tjNbF1[ApՁ7 ޞnH(jU1w][%Nmu 6w1Dw9 ~8uM % f=>H\ZDIUUTEAUUHimf/ͦ݁/F kM+]-NU̘@`ӒXc$s&ufNnD/lK>U']FҷHFL{;RiUHZ,'aho̎/X{x>$~WZ'_@nNe`tI$lP"o"+6Jn[>%3zWFl;g 1}=ێWuͷ*ɷ1q3Vđ{q()N` xz1qdGOptiO/#?JIh;Gڵ͈]x;[qՌtko@$ɠ8,7.e24pt؇U74 ؗns:5+[CQnSnJA%5 OW I,"KICQA4 hhh^'c0qu9ĵ暓\Z\n3kjS*D2nZ{ҬڒcFULFlér5NfQlTДRDZiT_F$O+ΤpF[{Ϛ%g&s,yXkgEtGûi Ԇ=Х7[ ӐkWGwZF'WOL_^v[^#+rE_[am.e.H*ëY⼀Fuͷƭ5t_g 78Qmfr*`R4^ь %f$4\]S5̜ͅ"BBu<8@i g!U8) w.Zѕ|OpόMIT)fsM"e-N+Y1ce_^2Nz%-/T5M6]UT ͥ7x"NjNvTs.LHZ#_( 䘒75ѪD^pyt~Ϝ VN>^NJ7""NU|K}gbzql~Co&zm;7႙A))LQŬ`0+*.z?/=@tL+W]ګ[,ŶC}gݡrw<2 ˝MDfTUE1+U;fbXJT)j\œ|{ѵƱk9cCPV\L'KpMWӦy8~Hg)%!LJ"xy8_tI^5lٳ~M{kI*JK7FNj."ܻR^fb\&mف b٧-[U:_CL1ʨzGg楓zSZv9l>`(D=h㮮қQc߷C>d51^CJ! ́L^r F=t:B=vZ/w"H2gҏqd|p#08[ L}fg쥸 hBUŮ$ Q2;Tƣ*Xae)ٌh7\;h%);N =-S6᳹|S"/ )!0embxt]Fҷx ܜt΃;C|IX*kwlN&I8u8\pǻ-gGl csJaЊ1{_30::A9NtΟ;6sf0@G=.׉3:oSGoc]YthɠP5xޱ$0=Щm8?Ɵ~d?PP34^`5rlne&>k|[53L&$I/:E" bTHq#pݝO<$0 5,(}X g˪k:VU.Ƙ;ykobwPWS@$/OzIn\Kxvmo}>_nųl3NNC_=zTZ_ n\ќ;fqtjї6&62| k>eGB\kS>_*70]g~5{~أ s8~9{ˏ 47wWn:`"6bl2MUw4dA*2ul۹OOBofO>)ww5C|3nna=}lj1({=Z1fKwb(QY ڵPht \uqA~w'ʥD_&LU1 JK(+.ot^(,y9U r))ȣCi &qK$o?l+[L"I$r'U'ennnqͮ+j=HM{ԋݝgR^Rd#H!::}y+|kVOo%/@Q̘لb2a6h<KqA.V=: :UQpquCh4ܿװiGa V^Gӣwq (u u+JZ]hA# gyRP5IӐu iGT4MBВ,˨YFu* !IBlq{]dZˆ-nnYqMSQ̺?S,] y)Je+^xeZ!JQfq$*G1[:$He7wnO[Vƛ*cN B*W %J0b LFv-USQ\EUT Hz0Ɉn^1/e-y(N] 7w\q:Xq:Ziq]\ѻ掛'tzѐRN/޾1WB4@ %BBbPwv.KhwWq@p1d AC%@ (@ J @ +qPַ@XP@ J 45?;)hJCIENDB`gsequencer-1.4.24/docs/images/ags_audio_connection_output_line.png0000644000175000017500000005620413246707333022407 00000000000000PNG  IHDR;bKGD pHYs+tIME @ߙiTXtCommentCreated with GIMPd.e IDATxwx즑H$!J E9 bA`v#9 *JS@zJBB ew?ғdܟvgyݹvM```BM&"""rYk760 0 .*e?0rj`ȹȾ; 9 /W1ً~Lͅ^rXoc;o}*r)urcr-O-^g)0Y{.п.=g_UW6Ic S}- y>6 ˹cr ۆkɹcȶ~Lrn}*v >>胂)}z Av"p}r-u\oпI}QZ3 3`qs'rՄ&@f`#nw#=fNn/o 0sVi~lF0"|v G\x /F?H_[?֕c]7豎1^ߝQD.a3v̂^[cc7W 9Vc]i>}u}h_96е .c:ݶOS^[$߅(оQlsof5LA`Y\0GK G;_l_L_-o37L8<)0rY09 tGONc>Ir<% p,ctY.pvzwJEÍbY8Y,J*1qXevS| f KvLz7ΎQ|ӊu*L =H9E45ʕ+J #i vLݴcٲyǿdu2)_J)2w^NIt;TΆJN╳R/ҎR*g3/%ϒrBx _Oد4M+jVŎ+•"uT;qIt\쳃b5t0U8MVx<!.aT==FѴQtkv;gu)|&^b/a ӧOsQhXX-X PfM23t ˟Տw=$ Fj6eנ[2{Uv-࣯>Z ucgw5ui,#|rntg/ j`O߿iؗ^vLF/yϛF& c5c@eo{I嵏N3-㑙Bb\,;`&W̌ :0>}4_O{7']B7lzF: bbX>oiڳS?##kJh*V}E?UvsT3qX%U.Vf a^tbQ88VF=57{Jɇq^z4|z,Xvؽu|VQleĚs" 6puX^9Ng͟mҖܟQ&ZtCo𡭄L[8 oISdաy>(}t &o`p?[yLJ2udNR5޿|r]VᜑA-+;-VV V7kNlb~6;sߛ.iZ8 4̰F3L2v3%lc wk>l:NM' Qï y|֧X̹HewlʡXR0 Gm+W&b޿YqnԪDswϰa8z>16L+ &2RhhPˍ*FIn~ {kM>na}JOl߲_gq[;T!^ٺZ96_JU\ʹ?mp_ tھQ[NRU@* b,snnj³gϐ3ԨgcT9 f䜾r[(-gfqgl8lǬu1u\G{_o*Ok[ õpRU / .JcWߋ.yo1JUٮLJCHs6Tܜl i TR‭#ݣuk(N;@iZcGIؿDGѵ/?gtGAN31LFPVrYYŝճxgDv p?FjFg3S^`#3{+}x (mS?ZJy[&Pճ+j ˜WezWzEZrekLs3fW`"8[Yl9tZj*SL-MSLexuN*}߾l۶-[BrRNyf;+-$}v͌-Wՠۋ2o<gw䫿l1➼->&o{#㻎6>x;qn(6N+rGKh7NfѓdUoL{_3}?{+FZj*LbS&O 9s.rviRs<<<^{a| e+/oj2\81\91K8)svg{c8<2}ul8?1vPlq,0{e`v4nߑ\Ō?!%#}Ww07#{=>rG>.-"ZMǷ.f/~(~qӤcia+pJ1YJunɘsg2F %ڞXއ/&0:jKn0kOp߀IMMqp5^5`]xU"9${8p| pi is׶v W)kSZYټLgNjRSl25υ.nMZ;IMM)l(qLOTE)=#4ytc>Cu۷SpJBgRP]v.te bw.,]n}\7 .dB{T+e *5Ĝeu!M6tXb:kr<=ܝg?~v:7DݨݥsFֈAL ?KPy"P=!Vl[o׽f}>M~u:lIiɓT 9&쇭D?ً:㚿7aY;{zèԧk+LYoگmM·/.:x ?GY%m9uJ[< + Ek}ã6a?l#~D|1KWsat.mE("r^l]KV6Mu1q$pʹ<3X/ g(m:Db{oToDr#~]ړcgrF5jz{FVq^w!TU0?m[T0j C?sU>~ K ۖISٳ:;n8K;ɬ;Q:ܩrߝc틻j5p;6ED9p0&#?VOpr}, k4qGDžj=Cܘ'9d'G|&Gtq||88?Կssv{ZI&gObFK~y#^'~A2!9|#]K6Wv"Gp "c{ZA^MuAH99rp† GmՊׂb=6KݍMl!fM4jGRgoxy'75rS/Kx5gG ,%lKV9^<ӻ0+{l"Ԯճ߀ZU9r4oΞ5S LL .'hv o.+xG8mjԪ[Ssl 'ƹ8;q(T d8T|9 V'R [)0ܬݦ(XrL`CZsބ]{~Ijߍ O3֜=䓙TlA_||S4R/z=ХAyYN)~+Θ+ƚT JޤuZG2o6@(r۟JVXhZ^RwtSYmDƞ}ιM9pLfԱWg^|?gpŁ,;N?nT O~%BmORVýwⴴTxP.O[Iu!_-Y|7fm<6ED$7T5!p1&?>WN8>?Yn[)~Gmj<>:$&>_O/--t?7=feTTۍSs.rkI/5%,` Wg*~ g/q,QicTq| :;oO7_%mUq;9/L֣Wfut]@eϓ5Nk8ʳPؕ"mb%E|X,2VNHʙYDN ?&fBDD\>9;  J""" gQ8\FB9#(\#.""F~t }v[DDBUY! e΋v-oZl6껮eng<ssW)OKۯؿED1oˆ|r%~vwRg8+DDrTw',$껮e#G$:*`{&,5x±_O8:OL8Э%z>Y+^Y6}*Uӫ,^<8 0\^}J 004i2*UpvzԩHK+Ds.GzYD.ի(t۶m+wZ/p\a_dҥ\ h@-pc?>iiq&*7%iM"c߭X2On& ."lݧ UJ~kF P1U>Bf!c*g>|8CQ#xKT9?"5b׶.TΕ3ꍏra~NLwٹ3#30_00|c&idԹ4&݊MpGF % |NaJ#񫾑/?Hs0; Cl%5auD$;]./*_KLǰ%HƧYd{S0"k/jWm+EinMfbY~'X[ã^me%I[ߎ{缴ϐN&`]Ew2xs־=ZѢ];=0wkS,8J0BKdt`ЛW­RN\ ~׃JzZr,`#3f/yg{`P Ҷ'~Rfux7:P@% / n]>:>./ 2p⩗IMu+qsnjEfoǖٟCmOܓ;ɯYDjWr^pBaǟЪ .=./'B(_RW*{5g fNvH*zXjdznu1G(mOA2#6j CUi<ゴ{^98^@FzK{ N-=wgo5[kͤcdո`vƯGTzSSCCU$eŞ\\If?|q[wS9\L, Z9l|D3n4SÿXc:F%$Ko6F/; _fb!!y;M$9ത1O6u[ēd!iMo/t⡀|e8\V~sO Ԅ`$y??3{/%hR&&m%m+֢ED\9}%gY\EBvxţ.YDD gHsJ[DD|yWx%U ˾1(x Yn[OηDD̜l̫n?ɾ~]Q}U ZX×r)EDD"""re[KQ+UlUqk sF>xSQ| yo2ON*ED䪮-5%jLT?C=毋Î獭 3qlvi#tj5y'k\mXL9Q+;'V}O?]}9E3&MzVC IDATÇdNWUK'v=ŧ<0Y:D6zӹC!&MFG#{DGhc!u:ԉeX|iZ{ >II+V7tdbR) `rz KFi,JXВiy7 $欦Rv[𻖶SU,~1F~Ic;K*""WQc_~gb1`0Ǝ{`{̼<=MܑD.쵺pA@|C1kF@"rNAh~Uwx./3=QD,"ïkKTKER(ED*&^%|||p`챬Ǘ؋؞E̾63W /]ּH.rهIڬ;ЋA*TH#-l˄[3w.Է0/wGd*Lhϻ}drNH蓓2/A*n=փv_88~Y7G_M6!Zl@6!=) lz?[bJrm%+G7oλ,-;,޾ 9%+I_ww|{Ӈzz\ |b{O/y1lN4=5靏GzȕS9qw'Z>MlXWe&-cɣ̛oʼ}Čo(wF^.7Ը-}6!صt 6´֗9j3/Gu)ʌaUď{gBI6lMx0id[ϳ9,;_ub̭c8Z>Jߣ:FJZv&؍dϼ\->C[gH*8; 6|3^}ޡmjܝǽ@X̥9X#|~#YW0}TQY|*gq~-sv7`cX7޳'ԲUcfMI <%sFE!pxc Ԩ=3ϲD~ 6Ex`:qsG03AZL{S{hvI#fv&lҧl1X=7qG?066;'O!{7G9f[r6/8;:gY]^zUX?ɶ{wj }ScRKϻ˻-βuNۏ~tou6eζ lKA=o؝z3Q<#kVi\c[O_ GH%}4~-P=HgJ؏YߗO4`o&JX4h^?0Vw谨% )t#!5Xl%sם4k>n↨VX9?a"}<>wh٬N#M֮AHs qKZƝZCCa\>בrçt*w|NxZz6XqY2m|@(7=LvK2Ύ8Vn ROė8s$'voNiFzտljT&DRO .Z8_i_-* -{p{3V"* Hm1nьv j&;phm؇Q2gS6\߃F]mUtgfc~vL`|EneM+a] O][Hht$ ^Z;&4ٞM-Kl4w#vNi4zjKh Ols &;ak{ ig03Oqޜq^9" %~\IzOj עQNE/f+EsvNM&ўp쨟xe~lapנa>߸55hQ rb./; R* @R\,S[N-plmRoDtoN)h'v;>?DoS7y{ ~3V7o*RDA4q]uvLܵtlRZNN/4K@n}3m6oK@4oJ')>*m!? Ʊq獹a$>%mDI<60_YYy{ebe~ؚi/ 0ܰ, 7V#9^A?AT$AxRrRcbgꝱ۱9F3XF$تSNl[;qR@* ,W6jkk6wCޟǾAorĎQ15mZ.pp]?:<%f|H߱iculEPD`/Rkfb 'ϔTNeD в+xN~Aiǥvi~^ so"rf͍:M06qpk: 0:Flb561hYN\;^6J` 8Dn3O(55"^#"+߸M؏pxD6"34 *8;gV58ˡ"ҥ'"8,{(8,FynǍظՋNfM,5;жI6ޣE/M,ʹْMԼ?QuWa^̠;i)Gu!w&dm',;mKr~cTq=Gk8krhW?mbͦIp0q=PҺwѩO vL,XM‘}_Ssbv),~SSдZ;F{v"e؍F=w@td݄'Xq/IW|6KgK5y7NүֶEg޿b2LcGי7}%vGX9wz ƶPIYTҁl~tHgGH,7q;~a8״whJ><84kόëy|m?~3Oml~8V??,r^f<~\M!kڀ7ci z~G}li=|MvDʉ|)&^u'.• <=3:>w5Q>Do;>._"{׉=Xv,KꖼEma]ik<sk;MWAMI#s4#F4)Wk5rK+9'z/? ` 0?q{tѩAmhtNv[ZAnެMp+~]Ϲ71rNzf ?x̟q\ŏ|;vϘӯZ:O/gvΑ#9ԯ?I)!7+T5,y;%KR^)_2}ڤe=Ν;'iS n-y0iRv@/YD|fN6~}u*ݶ:o?p9Te6jBa%bo9 ˉQaj2kV6n\ǻᆱKlzu  =1q+Œ9cb)r决cXe\A)tTJƈ#riO"""Wa,"ïNHHYD*Jۙ+R+2m(p+Gx SVƨDP}6XBsuFDDD.h82Ӊ g8ȕCo\p9YWA3 T* gU(+(Eɝ>^z̙3D\\'NhBwk(ED*,6oHV:C={'5-s a 4-l:vOW"{8ͺ x͔ϓqH%4x>FL;sgo lK} #r(>yIV<„AۗO&>9)8 tf}3l=yI;݅kD:{,㾺NسqNl5UEr9=sQol%6<7Vэx]<Fzj܉ϾICZm {Ta˜όv#O)ʌaUď{gBI6lMx0id[ϳ9,;_ub̭c8Z0.bv|26μѺ/4!/hOg1TbedNؗeQ>p"Adq|L.{1M$#ifc>䍏ּ5 7vE13/`l=O``o 7v¶ Wwy[;wq/P;3V4;6bKth[z~֕ı'~/h޲M.3i6+f{swѼ~aaQK6,9Atot Q,b'-/Yp7Di/ [ YՍVCfp:ovBڜX2j7z[rŗ8,0_Sz,럶^ı ,nfl,L/_#'M>]k󒌳?4{5Bx[%?)I]eZwwl J2ٶ[6%ֿ.l#&U<F35p{55هCk>9=Կ6J5o#;3#`cz>+zv󧬿wSҺ}8K Ixv,Mhܳ=?O[[h8F<0Ӫivx1\IoXCڙ,S7m8fpkIWҵ^ӯZFhT%02SvA6J뜴DӶgu';'+8;.&&Papנa>߸55heSM-J \ @R\,S[N-Pq=[Qݛq.]Ǝ͎<c𓝱yS9>r&l Wsq]uvLܵtlRZNN/4K@n}3m6oK@4oJ')>*m!? Ʊq獹a$>%mDI<60_YYy{ebe~ؚi/ 0ܰ, 7V#9^A?AT$AxRrRcbgꝱ۱9F3l+~5 !c_ `7l9bǨݘfbwtög-GO8XA3>ش1yK:6"(n~0S)y531%]ad]FD -ٹ"AJ?4nR;F4k}m?/eй79F&85bjQ}`mevɝvmA@8q(bG'PYo\&G8U"quPhJ\rqW+uy+#EKOO EpXQpX8SGP&g|fZlIPyj^ן0/fНغɻkI2 |%9n?[1{]5594+61fӤ8(i]Fԧ;&_&>o c`)9wqs`?Չ)_QWhZp#=;2 ~YF]/pMLMx{zhʽ}TJ k#.ii(jmKP~-(6 4~,n\q|yWxl7>%h}gk`l k|N%!?HNTqv$_N΂8pMJ.ڽ*3hЬ5<3J Z_8i\?OÇi" EkZیgۏ )}[z,;A/|({-=Ɏ7zޕH_9"9īDErA|Fg6#hmKspo:ˎQ#}RݒwBrvüzP7}Sms5+xwCݗ`nm]ܢɸy:)ə~\ }_{`7WٛPwh>arw/jmF_n}i%35q\5eAS;aF|8n~;:5~Z^ܱ-`_NcpV=H?͛xnϿ9&>Wn`IO /Q|*~Kr&ykl?ƴ[0KO ;zϤw>RJ%aDGG%U 9.c!+>m1M\1 ~P}Ѿn;s=a^)_2}ڤe=:o˯),.IDAT&1V-n&F<3=KƼSO_2nr__%С=Ǵê%HԎ,-M`D(W2΋/⋯ flzu  =1q+\ZZ>:Bpv,޾̕8Z"8=VHuUX9H6rc5piڵO?ʕdee)EDDΛFL 998tǯC'a{~vW,""RϨs N gsTbqV¹T}#QEDaKJ x< 3"tC\<_UDDy >:&N@FmMiv 5o}Ny.^|>RRQEDa۲>^|Ǝ\Q)omQEDOyvJ|.{4|ܒ̙i0 m}wN7M8?rs9A8{wPf7UHDD>sއzH 2"""牞,""pYDDDNG%9=y3T30㞐zr"gT3TnzrҴH=pQ8YDD a"\d+ 1Ren{>-[b98|z_j0l] !jJeNcfT"M:/pih,9ۮ%n͗KfcG@m| "B}Xi@!'~~qo%ͣ=8ׯ}+)뢀V84,+6ɯ a8l!`:T.րq W W_eVl79G˯PVVJz4GD[Iܳ9&9S ~YSAlݳ]K㍒-xg\NC[is]߬Am86X6ec_sNeźmtߞ+<#5/Ƨw3vQc.\MHWM0o}u>8Wrafͫ=8\z、uH^kw;fm[ƂSYf3JxӢ@r=x9ȹu|tm9me 8~R05{2':'6a-NK7]iԠSl'~ J*p%;:Tv~ʤeiEq_ٔSK);^ed?>(k0хI4H `ˣKa`[m8sv}%JK10ٹ[OpOKz?ꮟ:0>_DžW,R,a=l50nk|`%{J "[[!Mg YYf<}ү *1Ϥ yf3rfO\ucҢ\۾ÿh;)u(ek 0SY^B@'SX56rm6 /ngG_2_['yW)]Zq#6qq0epfvw_Sյ4sXtCڧ{Y3M>Yu}CD L3?g\^2@m۲m;ЎCiaC\QDEF;I/eFvw_[5܄GF&+NqCR,+LجԪ3a\:~ hsDZvx~.O_<èZɝ(owӪQ9o2 b^M5-r*gL-9`*µ]-On171e^o y++] |q+\~x0w#0pE;XpKɖYSto*g&S†E6K} k,n9_L[$1>-ضúظM;ؼ [ش.(ew8UǤe_>f'u%=3]5>Xn0 /'Fs9b>?g#y?%X0+{GhhwΊդE]ˆ%/9붶en182IyJH]=IRYbw'$ˏ8jD!'3&e{SgU.ah:ؠO?EvcJ+mb`\5p8ep0 pY8ʀIHXm՝xB:s% YU\}^DfN(1-:w*g_=-\N]݂iڴv'W΁rg6v;ҹmk.\֏WGt퉝pYEthAAzflP7ړonzzD]xjims6A6}E^ BC62oZVzʗߧei+X6z[kpnfb-S~oOtbbq-?K[6-ŒEhڧ lT~uؚŋI&ᔖ[(̤ocZy9e9X"&"_}Z0Nz[Mbux(Z3wǑ֣QPFɢъy|4m˴jfJ;82* vu:-OqHH!eۖCYkK gs(_ϖG۰bɭX@w##%$v~O]{v36G4ϟĿˊ [ٝ _bkx5pK.mLà*c?W,iqG1WS:sr=;ؾ&9oWm 4r|ZNdFT_.NJϑj _-WLfWľ r^%gٽK"PTdkZNΊѼ0uwOD&rRbڕtK3#q$Y{HKʑ'bI9}l{b:;8{Gs'#|v%.mۊL] .ہ؃QQ6nD>]iױlȞ6/ En›'u Jqef/Ŀ>Ûٹ^-0 6O?IcO\YIݏbaJҸ0\n*Gus|gL㻷fFIOtsZf\ ץv2j#S޻ދ$IgS O#Y:_g.5k֎30ZwDSeށ! \ұ?nQS15z|߿m'䬸c^|\zDž]j=d~q~=y{} dˏ\Ϭg ̘ӾsRNߚBCJOUe|FƓ~ʸ /& w"'ˎ'"o^MCGE?.dh\vZC4!W0}Ln"1Nej=Tc,O.;KBCD5O`̀ ԜY\O 7 NGrɃʑ^;uɘ?;b>_̙A'f g/2%Cp,g?O*l&{6-%Ռ@ee0,ғͫ5.^[o}hmWRybzNsxnJ@a͟E)+:"*W֯ms.k`w7r=6`ayy<4Ď91\rٰߖ"c"!l ,\$;d挱4B{(+ ^kk0\.\n7.WnϏ\ \1~ WF e `fIٵ(-ڏmUxp{x<^^/nˋmYxC|Cmu_2w|MÈqS{_ 9s8K+n##" k*;xjz>$v qppqC2\\.;C.M\|cl8qNRݝ'sqsw>]s%O_|Ъ{j?ӎccYi7)uGѢuz *EcrqxU{G R paə&^_(_7ɨ>\}98cQ_WŬPeT"ʮE{؎mX5ml v5II׾ E ЇQ,rvn\V=61nEܩGBB t5f_u]3 oo^_(pBqG g9naфEFgDDD"""r" &- gB7LPUo9k׽EDD?[[DDS8(EDDD,""p-"""EDDD,""Rԧ*b IENDB`gsequencer-1.4.24/docs/images/ags_machine_properties-input.png0000644000175000017500000014005013246707333021446 00000000000000PNG  IHDRc;bKGD pHYs+tIME  uNiTXtCommentCreated with GIMPd.e IDATxg|E7Ph!zMDDR젯E@ETTl`A"zoP$HϽv%η̾)ni1}}☿U1cűn1fq߷,XnsqT@˽4 4F޶쓻wrcZv>lдKS|sX!3uߐq4Swi1E]Xϛ/:׼xO`^P>_ hXS 1f6-uJ)N-lieb 1W9_A$T7%.V)z4|Y֙VQ|{ͼ ZI[4{}J>[3+ [WPyG+>`N46c#vUP,̵;O}Q>=4rb 3ƚ(2ߖ)qQ7cV..%LW,(s^m1Vo(*V|-ds1} {W"LօVohMcăiX% ͢rDYIfBKlk5;8V_*kdzⳅNT9W  ƜjU5"+zo M"mh*`p|LD0&Yz,dpeG|P0kpvOj̘bg\Bv: 3/Ke+%L2cPV ;U- gư'{Q2#+[ٌV"UrZXN-̸d%3fՇ"(i1ZXeIUY\i|;0L>d]jj*.&4id>TU%+3K= Ȫ^ǽZ.>8@E2=+:dvFQXbYYŕ(ѷdeg-O0F(lk13RhDdJQXQVtmių3lV+%z_|͞_mmoe YE}1q.:eK YkmܖL2u l$N75N_F3"1@h@1fQW\޼5~uݲY^ՋCTa ֲJ/dgw e[΄,[s*WlŪ潙Y62\vWlTD*VlRX^߬g_11s]J&G~G6 k):}Rf,_egeSP ) 2c+MC晌x*1h)nŧ֑`rs$ZQʩ)xO3AAl7WObX503Nd Jhwlg)˶ Iqou'glFl4+ގ p!Er7Æg̙3aÆmWY.%BV`4 /^Eӣls˜TfS%ъ-3MR Vݦ5 IT9Ό b& 2NeƜ~)Ƨ?Sh#$@vة1nujQGg$dӫRVZz k?k6'q|AMO֫~=գ!Ϩ"֠AM= K@5ܹduJ?z! EK#Έٝ+kf4|+,q"g5>dư;3fGLs Cf'Ms],GL9w} 1l0|LX5{gPU#zȧS233&##UUZyHfL' .:tzW T%%9p=Z SE?aYդ4glq.c&^=wtmp֫G#أ!.dLX) [~R#++tr 9&o|}pq)?`gƮ7ۙ}Dbdc`9EWۓ'{fuPFvTӬd43Y6+~R$8ؘ _Oӹ- ~[!BS:4bNr`DљVf,@X 9Klْ+$rzQ5칽WU Egm\T='V͚ݻ*_ תK d^ҊLжVvr%_;kp{_x.V#~=jd2X鳨ǵ3e.]wcJmG]G{̻p=~1Tuc䵱P^IKKf#F0 ~1ܮycy+4PN+\ܨR*ǎF~c f}f/(UfplO(B̼_s4ce;M&wG0+oS^m4e4, 'pU;soS4bcϓ}r#noKú1&`Ӳ?ؗY1o%Ì׎]z쾒Y8ח|t [נFDSBv͑Q/uh/҈ۿ%s3Y2{3GdvY9oլV.C6G 2] W{Vl9yizn+~-)Y. #F#G܇u6æVUXdcbtRSn)TRUr<<=HIJf֝&T*|Rlk+VNWåc|#UvOgW=M)ƴD/|nl13iN՜*̗t䕆O-RSSWYbB|^f؅(+;Mxzls9s4۷$&&*UAPl 9Pvqw5|9nuTX(|;|_#+LICM^pC 5ޣYsPht0;Vcvv.vB Ev1W mrwwl~yY+--sΞ9gOCUs?]Ap3NF 7qi9  8Xząe_UE\è(4W]r e#Y(TԮak5|]QjE\X\8O  µ&iJdn9,< UqMԕ-ZȥUA(2?R  5& le|RA q(*Aa7ZI陂  b| IZBw BEc' il5$Ė_ojw+ؔ˶ܓuDL;˩%@m Ħܵd|Ra'Y-z}Ab#m'MEڢePdؚՋk % 1${`pe4^IleIfL7AQ!؍64(C  bBQUK7L%1AA1V(DiYñi~_S}?2c`BOk1?͇TО~h9׭W>! $tT#ki(-KkNeƴ ." e>"7 79.邧uU—~Gut"hg)v͛mPS5o#2$O }ҝ>/;r"܆?M9z4wzi1_5߭tN-^%Yn=h B/û1!F݇+mz!yNߌ:+v]{p&wG+ΛJtn1-^~ovV:sLӺqVM1KD{J^4=´OSї^]o#p9įkŇvi jXBm{a>2?N tm[Y-_Wɯ:K'Q\kP兯ii?]Gahퟷ;^wI5z]vgCҗ]6 ӟY<:A t=+nM>m1K6t޷ix=(Z;oŁ6GJ A1f2U~G8-lCh(|lBmM#.D cm7H67d C֭;^;B_PUi=3fsY{ *䐡!uj!5wκ44Ӧs==Ӕn=p'ڬڶ5;>[VU!`"c;]nۺTeW ? cK"ϦA~vtTƗ73>vXN=j.Qa"cmܟͣzoS_Dr!{ڳѓYC2=r`Fۅ1ֻēhvƶUmcr"F;1AX!} c$nʛE%:NW!UL ^g<5yz&J%%!pNf'{ *>̮$4r\:76ODtǑ^&ጡ\uϩ26*K?x4̀ѽ5܄H{ HMΞB`*AgHxK:GindSSь4j=@Ig fB@_r_j &9uH]kаcJ$~516py'\K d㟬ĥ-m#+š PqhGUO qљ p%.p2/#Ԯ~49VNzJe:`;NoqOPP~d-BMŐYǡ.9W~YHu+uӄ*ˏVR paP/_A`T%~&2ӭ< Ւڟת(\*rT)u8r0Kd_Ώ~v\}pa).z`OY^oۗNPc&fN"=D⢿2M&JOzx(H]ej֩sdAf' 9@|QUL[ig4ͥc=Zvͥ'l?Ezuϡ26X5}$vENz7 Br9'RO}Gdkc6X?Tnݨx/l'39Zջzl|;^A& )S"kQ0~AOR1ϧp}xx*&'|S Z4A.fAdt3QWFЭ!Cw=fc8NMf+(4?y'V )9Tל ?=s=b!Ƭk4#5uY{%6ZAT`%v r{DBŬ_C>-lj]Mo=dX*mG I9rKP%RjDG}q, 'έp!hk5G~g4>Grag-;gKI&+. ֝k%ݎwKgX7zX#`~bOS?7DCֽ̦5uEa2tRYc.Di;)5]~Q?sN-Is0x=?ٴ5I岭,~Nq#&b_x^C`7ԋIݴӗT¥S4| ۈ{EbcntlOu|H)odgSBa2Nn`ۥy% __NSȎ9lieZ%J AP(-Z(T)?A1oUfϜפŝ,[s_yxMoH%.~2:^x拟Fjw/rB@Y us# BuzH0fY# MOgӜy͆f!AA H^ Ѝ[2c Pq) ׁR(2I]bSN& BOAAQ0Sʕ7KVHÔ6A>/pf\ʓ) ͆W[b%B  TLTzu?t9ѓ[9'ƀ  )1J9,Y@oWyGA,ЯNAA(CD  AApuMiq&;]C {ǿ2ԏ.yHs*t|KZF?Σ9s0Q7HA NI&;ȠAYzV<ؽMZJAr4n<??A0gxaJAAWSTPdفxO+˥L=q ǹKs}UROmeYl8v-o1LVHxb׼i,v=]-{E\_\faFNiLӵi(lKwƣ:jDmh5 ErJAAX=:c2jTuU1O̠,{weRkuq$>.DGh DWiW{$a0=1g&fOLzQi6Un?<ǟ-~x+#A2z4(JGX1ŧ#]:g{pt,ǷeS?r%J湬=~IVrА:3Q:L? IDAT-( HYߋ٬!&^g$ĊE;hο#me싽-b  \e6LYo-O5E$$>騥IGnf̽fn/ jGƒx wHZI\¯z(n\t]`Mqs "6E  |b /43O]sWỊ{_菃$eAa<3R\φ=fD5l<1* {?qtS1 4lˎ-~ϗ>(Zc '2rEZ%x*I[Q-.y24@@*\>qlODc_l"UE9雂 PYM*9c DLĐӶU\-}5m?&] YM݈-C ڐ3^پFђ7m?EUW%f*sABi?P f$f_IJ ?Ś+b.%?6dyuh*ieuLU Hh,<jYk4#Cmأ%w{œ>HΕN]ξ;A0|Ү-ZȶJ5rŝĐK]o/!  8IG1]0]O'wy!xjg53GEOpwK+js3;ׯ+8 MS<)tgQrqˏ kC*/ %Z4oʴio[\?vmZ=q |wGyltǚXW}" eql"Fft$}ilثR5ߦi4V؝_z@mj4  7 Sر^= + Փ$B @#}﬋ICH_Y{:m:C3Q-( HYߋ٬!:P;ҶY~;K\ŠyIQ NZ |Q4  7S7?`Ƃ̞ßyS>!\=KN~J'\"~Cqjrg_ ]NցXj`"6iAAA*3dӦmGF^ChE$dW, iYPwό4#𣦢2 _Aܽ'~-@Ozx-*SNe.;1(ZN^ %9♷:A"0AA &223 tkHePE:پ9IHVkS72z5;}o,0NK̶U] KhSm;' @kApBk֢:AAʆW#Y> gOT(ؐC?ա]ϖQ1~xɹɵ9;tm({S~B75-?2_Ar-@K=ӟfM59$l(t }? V^Ϥ0aÄ-  8ȇAAD  TL0zuo f[AAA1& P1k%R PPK n610KAnffo>)AŘ  CBl3ժA"rG}Ϡŝ1& B?8C5#1 sj! 4,XP.ZĘ  ܠ,Vl_xµBAAĘ  BI o`1f &`Jc=}?CV>b5*bRcX/tlv>nŏV(ǯ#q2?_׮l$Lmz )ow]5O!1YY+bÕ&mܿ*IkO8uGR6?O T{I:Ql⠞f_e݌xm( ^E|Oe(/7"esP^{;үYR33"ZǽbؔՓ; vՈ?ٿ4drC>z#d8C+?"<ܥOY`_\Mh"ULڙkk[yS>ݶf~r8lccHNn~x{NWZ=R+UDՍLqpKKZɡmheca F[4eGS -bw})Ole5oDÐv΁D/I1.XCc3޻x &/aԟ[x=s}{}q-"b^*g|4X΂Tq/<܏CΗ~i"4 4 ϯƘ1cʝ)S3sWf2ii-mgf>U %>QO@:έ*qe36}gdnZsWee,cr{^KS~z;;$">˩Bi<8Ք?Ќ?OپmfԛiV|)KmëSA?]1ދ3vϩ,gY@svFGvQh>œe<ǠO <9~^\~@Z<{GkpȬB[vP:6F MbENp%O~+ gWwIųf[0Zժ8lj*wL`w(ًo9ڍ.@4t:ǮZ)x Zj̡߭Fٿ$+"=POb̮Sv/_6mӦMq3bÞ2bgK؏ytLe~ͼ/RZT6Q?}־ |s5Nq.s.Vb+պ>LigkTo{3 R 8N! ^6>})-*C۳l½k0~Ɠ'I? P]-b{A6Jܡ~/) IUJ#h$hw6t3Lƚb/~c9;AwGCj9n9=apW;({殎dY4ZL_;?osǩ}wr/qu}00wo#ez$bUW+j =N:C%r$?.݆UNϝKoel ֽcgmz4lvq)D3 yT5>=uVo6^n<܁8%>UCɑP* ;LplËoKfGPO\s.#`Zl&;fm t /4en.㊮;J:dP_* }$zv AVe(X GD~3'ԼutkCTnHfbpQ\CKqlRNZuN" xD-[h=ʇ6%AuWQI-ڕye Wj'lF}86;dʴ8GWFWr4`][VA}[~lKGqa;,={zOT kC'Fxv/^}Nq7k˕H2xCSkT+MfV75gRy[rdƕ툫o&.dWhlukH]B m7kC'va.YKqDž'^mQ2]ZO0;aW;{$6A>\1SXչbu[nӺ-wct24M,R<K.#1gXnRwrvVȡ0?7Ÿw)ExAmx'Q\TҮA__5!yqǿf>+4l[i6=Jfpw}ώM TFP!Y2e2r~]u$2ȱ3[1;o1]MZgf8]q5SOmWW{W[ѬCmqy6{. {S2C׿W+әB #J%riL3slg)U[5[.EG%==XѲ=>,8 1`JÆ v߾}"Vq% \ZiIepmFGholC3fG_b;uy-ǟB83Uvʌb6،qaa"Cٽ>?s"~nmfQ\Л*^)RZX;kW@1sѬ~Glfi/myHAAGbÿUo {q }}ܼl+@,vՁ9c6M+h.{_X4X洜S?z#:_@3 zhF}YŤAD%\xtƞRǖ3}ʐN'_O&s(`yx }%6T7`G(p8A8gPݴηcמ$]ƚ [1ڴrE 6:u!}Ůb#n&ypiǿ_$-% >a}jO>>a]9=`^`;<6쌫19 vsgqRKl*]^ycQQ{H=ʹuٺ4X8N'p`7NƑq9f7rf&Q?qHZԠIOpaDǯc$^8J7]gTuh=-jw#g ;3~濗Jdopq7zj_汗Рik{i Wz?-k]R)ـ&%\JaI,[W>_1"!}?|ocYm,˿8:6슫FֿſE}*MJD ˹y}+cƔcusfǓ.ǰ#6OpڈڽFɮIp8o帞. qP{RVϣϿQ|#ocPjVϮ =~5#xwBGܹ;  ]D5J- ZRy0b= MEv>{9$47eoaˍژsC<|wuQ=_ \BekT]wgwh <ȣ(6|CJ;{I C-=Ą7ϕн{nHN{ҫXK,*xXTTa=wR*H><1t=}έ=rd|FFw7qE. be*;3}#IJvĖ$sbVO+mu3]b,7rHQTi$:]fBسg'~iסQ- KaalB)_:ٛycٙ\4C'=AgwqiSm/q({7kputWï3ydTU-w>ʬ<\pfw_j;N&Kᦸ"+t1:bŶG1nܸ{xI  AC*3G"A&zŠ彏P>ޟ+m_>1AAfc7h ByW~M%\C1AARcZi}jGQ7okcAA,!]G Öwo BEG3&  bLAAĘ   bLAAĘ   bLA|s>e>6ƠttڔHAALfy~h;&=>jȰ g~sAA#,3fTUÕgŏF.~̳wLvO_wf jhkwo*  h$#,T,ћS-o"5Q]džRkԃ=s.LFDYj!5pCqZ(x5Ev{>8X89"#j91r ]ױhT>@:Wgں !)],|C2~̓mMr µceӺF4ME4*x M͕7@44MC@[$񛣸~O IDATS;7Eӷa+dy/vIoPclq4Zس}\[TAM"Zǩ6wG#_gAL[ߣ{OiU HRQO9v1?Owa iݙ }Bj$o#M"Aᚋ kwsgx^5MèII"+G4 gMօ-4 j hF+"=AKĶ}a8MUs!o6_;MY@#Wj[U5R3ǖ@ƆLOs.5u榩n{.;ǰ+2-(xz]"p  AKؾIjUR6yVcUH92i>M;NrKm"GQMmVIc pŘ!@f[N MCTTE!-3OSE*W`cR1&=zgTϮWh- ԡ]aK}FTwc6֗ϫ˜44-gEFBz>x'5FK=͞EH0vzc1e;YQd=MptT ^а =㋒N&%!t E5m?q*M i35B9Θ9d6}6Н-1wfZ C_u{R8)5fNʦUDnvLK:™JMԎf#j~jfc랷p$ "[tѪȲ^_/7<<[A_7~6)7`B"W*:w?Cj#Rw8y6'M PPZhQ"*]wCB,viN/@5";3h*FC{;8:gM@WDq_Dq+L+-KjVZfjj~f235,MMT@q7TpAd1`"|=r̙sg,ca/4t݄&']\1;[M~d^q~Vzp|2 ?LӴ2[]c!,M={\777^15$9߁N+@9pmBQVØ&tg~13J)lKNMPXqn?TuMbB!h'hli&j?J4t''L&r13g!B[]Ǥ1~;τ !B6a,O !BH$B!0&B!aL!Bd36/x+NEB!`W@UB!(3ȃ^B!D٧iFƀ"0B!96cB!(cW%aL!>=.aL!%+NΟ-S}c?ѢEb[KB!ʨWs/\PᶳU!B˜B!YDG.azTfžlf&^nV=h#G*_Bީ8+ŷomKXrGMl̸QYǭhGa^uݎCsZ0V{;Ǻ1_b RWR+P;ǺڿD|rgli0ﵵrӮlQf8NNKwAo5u.A̝:C17zSY{7cڎx^c,;>lIVO`m+tԻ0pZ`WjV-oϠY-o">V2l2l8*,U:T;nQ=<)=CPn6pF^//t{+:Xl vᅡ{kT'zK[V_}Mp DhBT(<^]*7],:P}cx¯}Lh?W@ | \봧??68HQUA,aک|Ey(.< Èu:dH%{ڿOYRf /8>%}q_OzRI*(V{4/c"cUK>MBRج])3Ae֬Y̚5˜?;͘{L~uk~t$rXk҉[6=ҟhSќؕI4cz+ZW,W1$\ܙa?ITŖЯyG3*??'8L}zȰbB'_}?hsSdmkpcR@ (fWlL}=< T, fm@39U6,j;gV\Q>I̷3<ӟ gɤ9WVsF|C%?@kx>ȃ CYNFo}j5V bnrRǿ-Ǻ? q+č;|Vє@HD]@SyzG|F9 7q`Ku\m􏵋gHSSU0cZ~q&͌ޣuhX|CCVǽHSSff }vO#?eszu~;'py<] Tyn;4oT C)O;ډ)Ц?^ ی}so@̶>t:5lП/=JeX=ڦ :Tk:GǵxMq!;_g|QT; GKǎͨ>=؞ f~X0Tw,*R `5m}\;cHՁލ=1xi1Jk m_jvAЂym?qH~5Esy Ăޏ۟r(FNj{% 'mH/q/:GfƊƎF}㚁\[MZa t*cNT7~?ciDuK`7-g*'akÑuT lJכ/I$$+@[jEe^!HeompFu(iqdRBԦ*3Nqb}3Kuy֟'qA"ՏUg]qAkIFWM US=qqKrw[B N1=F4U4S󮊛ٟs$']<'4^6'm=1kɩ9wk*E׌9{kf<ꙋye;8#VEFEOT~YY=rO'{1yDHUYO&W?G4/5ɕɠ#tÁ1P[mU+'1$/-oڦ#CE׸qc{n cEf( Y(V΅Fuk;/&,@s+;H~5sk??Τ&':t~E'9#N*eL:BtM աviQ/Sw]rhNr' I˳3XX1Z>8PH?!*5hG,d,g=GsN kwhx& l b(P]pX!cتr6CJKv?w|rlBb7yd)Iw?FbPV+*gD*l¯ jRYأSӞWX[UqJtac^dsttMZ2l̋ՆrRxztcT]v%1ԥ\NU?<ⱟxvt-E]GdB(w<7 Z5pTu5^ cBy[FPkFUuW'=%_Zfj8'-Z@M9xN9u_bBPX? :Ialob#b~vYf8Y᝿_ܱX}Xu-f_WU8ɫZm;,*ϳ_Mw۷>s#7r~vҲ b3x6lDAҵhNq_u_[kOI+qX9~ ~SpX 2͡.9Jllyo<"w9bVrl(Mں]r1LsMQC_NZDo}GH;58gԧJ{#Om͑g' PX c6= ӆsV^ueˇp18FO9S@C5xg&;|ȝG?NyO.،V^څ^bˌ)9pCYkCcԡ~=t^7v6\9ę ز$*Zي+97scT\9ř}{"5[>߆Zyo!jő-,1KqqE7m Qv=6Hğ9Scݿه[&G@SH]ʙb\1n|8Vn`[ċiԲ-O8CJB\ybS*+I{"rv(/?|&ݾl8s: {P\Mipeo c?ˋc"]LZ14[;Ӿ.8HB¥~WޚKS>E[ǵZݯEhzKޞ^]0Z•1i-ֺU\9]N7~q|*N>u$-6}XPV?ւLo|;?ɰw^~gSfتuh}LΚc FcR4t} kgx|{x^X.h,8?eT#|9q}N>uƿƕ?o8TWE|&o߽IyypJVȚkpgZ\1OXs e^_kjγyמ0ejDӞ Xl>q>RqbIT[sB ԁ+e6~"|ɯqڄz=e8_1P\'FɭGrHm-pOoZ /rB_?}_;A9С9sfPk\J``ͅ3jg}bc=CHRWviJTѭ[\\#vUgOX /_s߱0|{RVʙ={i{d{nbjH01{#mN:>Q{庢nF[nz9$bo+l⸲km^>0fRc!f(;_abعs~aSn>[nF[nz9dElh~ڛv]oOSS $rn1#}D.<>yEփ &QTq#n'R8*:a>:f{s_nZxѿ.F ˏtoQQ4iRݽd !B:23&BA+.O?s$aL!݌2L^$#JB!* "nal^qBQ}kʽD)߅B!n0T]*Mr{|2\c!B0-9(ðeB!DE'B!0&B!aL!BHB!0&B!$ !BosHm X ']玮-عT\!"R۴!:0uTgلaQ7GH?7{[.Bq̘04z w3 ?3xwn$d r|l5Ù#tg|Ҥ( TB!1G6iV$c a+.q{%1i¥=KX-~ڸ#yL!0X2 3IH@)a+^S7Ӝ.Ot{DF˓~¢0؆ IDAT`x5&.XsueZ_8r:|"@ifc/Ɲ%jxHׇFҰq o?VvAU hy }*F0xأJ;>mHzۼ7?DK&3kCKƽ>)ɌH>>cx;w(M !6m l(eÕL$)研B)AhtcA0.4JG>m-M8-\ƃ^. %+Y^}Vod])aϹ9k`nmAʑh{=8ޙFeٸ6`/1k~wX߉S/OZ<=N,/fCM1{1XLةCkB+>~So b`sw(M% !G1(1./k6@BR:64lBJAbJ\p01% ‚:6sRi fr?GҢB{; Y~} }6(@0I^XLPњAѓnˣhU>Mg4]vL 2 mh.M1U"%Bn@mu[ζM{7R%a3&'&FQpp;h WHضX%T%cB!Di1k ++:f$Ja(MHNdն蚆i BN cgJ0`B DJYJS>^=li݄Z0Vm'eς)R>k=i9}M41NswG&ĦaߔA 5[^FatԬa5wO\Mթ^%<*8Vzw#j{]DT*4k߄VsΌ&zAƹ$aL!(0B@C#-FJw7Pb'V+ufptF/_d޸JaARpL/tt=ao[ꌦ{ecb@а 볝KZ8Oi|=C6IPv<+ȧƹ0ZdUy^٦ LaT-fg!mB!D釱Ρٸv;6-kvl>>w%W>HJJjTѳ_WEdA>G\OƯc눾t'wTClAZa\8I\&}!+*wk4aDv,'Z| gTAN%xQ/| m{ZM%5JMB!" іy{挋 3ɼ $}u+Rw~̃aɵȯ'ͫ/'rY:DVuZZZ,{.xyIٱSԸb~;x'"NE|5߬G6S܁j9^wЩ|~9uGO}3~!1~0kxh4kߜK>gUO$Rp}HB[ƔaZ1 #lvbFi9Dut''tMG;D[yC&`MzbCN `ZwҩVMǦ3\X*3q_nT[j^4*w|;2!( ],a@ŕ%&!тrRDWmQDZ!fo$J)FfF:i6=6{{^wfa/4t݄&']\1;[M~d^q~Vzp|2 ?LӴ2[]c!,M={\777^15$9߁N+@9pmBQVØ&tg~13J)lKNMPXqn?TuMbB!h'hli&j?J4t''L&r13g!B[]Ǥ1~;τ !B6a,O !BH$B!0&B!aL!Bd36/x+NEB!`W@UB!(3a"~B!n9gL!B˜B!1!B!aANmyIB!nHSqbg>Lm[sbp􊒑 B cҨ6'cIԜ΃3j]CB!kkuluܯ2 >bŎ8 L{Sۯ2 ڱ_L}JhJq)ވ`/Rxs^ĩ5_ߋ>N[Ҹv4 dvL!e<nɬYo]wϿLU9Mý<1_tğ1f%òKؼ[mwYbռi5ezU qc-5^LC\&3zf")ĄBqk<\gX4K1Ep4=YBbʩl>KtO~]VAR\9s[uͦ%r, /gU\Nr^EjWWK5"6z>V셜JsńBq1Դl7=Ic^$6&3z4h 0WF>s.Gu7IU3TVR3'iTj?'' zנ7Tko&J}j fZxe !ָzq0?L Py`yyX01e1v7˘xW=W;RՔF4k勓ٗ{&uլzyȍƄBQ4mI&7̜y4|U&ee]')WĔUyzzB!(S…B!$ !BTL70q o>B!D23&B!aL!br0uˤR4zH!BHXpL%nyǥB!$ qYǔηlT!%fodϠbB!aLC#;W~<.ZHB cxؿWxB!nB!B˜?՝wZݥB!$ q3)gt.]@z|*IQB܌0αLnTG<3? `nw^<`3^^-g}nLׯX}-VWؗG-m|9m2[bB!n;%۔:lZkُ{h0<|f{ҳOK\ӎphDvoټ IƯ3Nu;tyΜ5(BQã֟$:c1uuŷ;;/2eP>sg&5l!UkWUzU|9r1!c{BM3zΝx1ܹ?P #B˜7mg~0m4 Ð!(@̤IB!Ǽ@!֑1qV<_!-?$B˜(+m@wb/E!1q{)B c"KP2BT0iTJ!V1T(i9&_LFG)X!E8Ly3NҾ; [\j,BTtr1!B cB!ƄB!1!B cB!B˜B!DVj?צl0puڒ[HŅB!r)M8SGuMuszdds#YZB!7Q͌ Mbqw1YH8wFRyL/Vӈ=;2 Mwͷ!Mz.J%BHsafJR:@b"Ghػq[ˆOS(.m-0)\ڳe WOx;DŽB ce( -= R1uq#Q1ToNGGailJ`ϼ7XӞ{_H N:!^SW>%q 6wTYBQa,|}BlVJa3` $$a_Hc,&$(Q]ѐ ,ޮ3n3q(5殠.of.Ws$-j*o7!ZPgC @ CH M e=) :v[,R(eﳦكgTh,Ac3*$;.|qtaB>JlMĪ<0Qe@JZ9VsT5\ͣZZ i:ggx7ΞMD5BMmu8gm@hw4 `+MƄBRc~0^nY!442ldXqqsq %pa XgG7m$E[M$u ẅ́JMGs}@nh'ZVP? f  >T?dS enB;|`˩oAVWmPoDF+ٯ2k{&!B~ښkcٲf ,L3xWreOk=\iQDFzzud:~KwrG=eOƅĥ)jZ!K]Br7YK#V:ImGqҪN }vLT5N@۶: ۡX^_$BH+m W^Jnθ`q1[pMW"uןW<>\zҼr"SNo5_;Ųk11tK?E+w7"t ]W*}$m<^>ʼnOЩV1uSww9Î7A MYsVehdKjj!߇D!aL00a f',.X,faHt]GwrBtk+ݼM7kҬM D'C/O_s%_CbﲜQ3V` `u',at~l:#*叅>>g5FJżErgH۬/_Npkݕbk4νQ\ ZmB!*-((('E{ն?X{bFbW`ldfaڃa㽷qinISAMhnrtgOEam-sϪ4M+s}5B!l@B9:uAA{sSCX9tJާA,=5M etSSΨd{JY"!B 1Mqr_QhX,23Yc` tNpP=X\1 \ue&-2 WHjhh~Y!e5inBw3;K϶ehWO,nCY}д}.Ƌo> !pf˖i{`214MCwrldr*3C}B!a,OHuL)ωLB!m/B!DLr!B cB!ƄB!M9c"WT> ! x\)B2E!J#X !0(?)čCB!$ QXǔηlT!%fodϠbB!aLC#;W~<.ZHB cxؿWxB!nU!B˜?՝wZݥB!$ q3)gt.]@z|*IQB܌0αLnTa38r5^}G2lQߍًwc+ύkueBѪXz `M:|x/m'_o!LΉ#dJAEÿW}ҝ  3f©ܺV矗( 2a\B! UWSzx>?WE15q}IN^Lȸt ú䕩ifb֬YB0xc;fr{ԳHa+c݊ }^CHWLiDXl8[yӻCCL+y !)aWf(k<˨jHe+CF5}Nې^2H}cD\g9|M c/^ -1{::ٟсKe+8MxRRߖ7mӑ!GӊzP[CuȭԸqc{nB!J7v=]8<89+iiyFUt,[uac^dsttMZ2l̋źиE[Vu/Uy:5 IDAT-er~!%JkBʹ/PbeM$%wK#SrX9~ ~Sp”BPh07k>2[bB!n;%۔:lZkُ{h0<|f{ҳOK\ӎphDvoټ IƯ3Nu;tyΜ5(BQã֟$:c1uuŷ;;/2eP>sg&5l!UkWUzU|9r1!c{BM3zΝx1ܹ?P #B˜7mg~0m4 Ð!(@̤IB!Ǽ@!֑1qV<_!-?$B˜(+m@wb/E!1q{)B c"KP2BT0iTJ!V1T(i9&_LFG)X!E8Ly3NҾ; [\j,BTtr1!B cB!ƄB!1!B cB!B˜B!DVj?צl0puڒ[HŅB!r)M8SGuMuszdds#YZB!7Q͌ Mbqw1YH8wFRyL/Vӈ=;2 Mwͷ!Mz.J%BHsafJR:@b"Ghػq[ˆOS(.m-0)\ڳe WOx;DŽB ce( -= R1uq#Q1ToNGGailJ`ϼ7XӞ{_H N:!^SW>%q 6wTYBQa,|}BlVJa3` $$a_Hc,&$(Q]ѐ ,ޮ3n3q(5殠.of.Ws$-j*o7!ZPgC @ CH M e=) :v[,R(eﳦكgTh,Ac3*$;.|qtaB>JlMĪ<0Qe@JZ9VsT5\ͣZZ i:ggx7ΞMD5BM;:?;77$$N}Q4 XKUE"TRm]XZ-J  }WHHBBB{(BNz t,%e}gre3~4 z@QJÁQ_s(40Jb(GY+ 2q6&"r\NsXYX6_wn})7[_舦}&|#đ o_Pc.O[> ?*3T1һ+Ƞw߇Y? Q}&5pD~^M72[Q :]MOf[ j[DDD.!FΝ+SDne_F^}dެtҷŶmf=,Oi EX>oYP|<,ݖIH>5p0w0dz>ޜؗ陗ٮya]뺎EDD.ڀT*8}=#9m6޻6ӕ-k+y+Q}ZJN`PRqH ť8L%E'p4({O$TKqL'X> k8~1p8LL?hr2ۖ}wHG-\a0p8Lc6WF-  U?0w\eEDD" c)[al-Oe?I UYDDDI!40MIsOH c'/կLr11x}\\e0]w@Ohإ.A?QDDD.QQ3W3$("""7vΝ:nzTT?b=!\{);ߞV[:P랱ɓsv.~2o-6x{1ƭ """u&>Lz2G~b I %>ڙL,L\7 JӨP\X3Of$Q\ge4'I/ x˖]Sfs:Ax8͇.>Ć;~Rk =x&>9i/ҹx~ZƘƏ38w#n/KF#3 |=s&+v:V=G\(gX"A+zpY6RzRS>5&O~U6'VbBl|l1t /RgrNrٳ 'Q0BGb+?ΦlӗQy[Y Ie{muT/0{3bY0yB/s<}bSં,T7Gڅ;r!7 (%~iiԳ0VvR[!kL[I~\=Km!eCT_!yV叹㘐ϪNdι\Dp1KӅ[Y9zDDDDDDDDDDDDDaLDDDDaLDDDDDDDD.N. yu:C:"""r酱Ν:RH]l"@@DDD_^ym.޾!Ш{hq-pPt9 i싈Hci)L'?amgxO!6> 6`i3Xq'Y9YgsWؓ(!W#LgSz6I^\ iw~9aƎOqqI kN?2? 3#hفۏ7 Ml.7KtKcbjo^2Sgs䨅!"""?MљD02Z&sl%Zd]fUf}XeyA:wYu,0 tciB8#Iq ѕ (3Ӕ.:ʑo9\ɤȲ)ϑ,; >&3aFʪ^ 5݇M*k˭ç2~xٛY ͊4Ɔz(iY[W$4fݔJV"""Scal!eX%δe7ն-BԇHBs1!,ƻ """uJ(\.0ubշI3&"""0&"""0&"""" c"""" c""""0&"""0vqrvaȫYijaNk~ʺ-"%PEOk-H} c'?رY lxfo*_6zԿ00xfҋ52G~b I %>ڙL,L\7 JӨP\X3Of$Ql`4'I/ x˖]SfsҕUxCo'"""R؃ aڬ,Y$v2~;=8 6~W>MHߑ3LB O忓f?sǃt4XW8Zp.WfJH_7/g~ʾ[-ADDD9MOKMaט<9nW kۜX={ QyнO+LHʍ;&gB>ĞD9E`:ҳO_NUMDŽ1Sy./1oqLݣo):rN=c3vxKjXGvA<9D~ i mb#t8YBX=U{;gqGW}ъ?ξ x?{<ث)"""RؙQq&P> ,[ʠG'j̝h9wU]wmaY6=LzC)EDD10iܢEGOM,;v (_OCdD:›QZ&Ѧ-p䒟)EDDciB8#Iq ѕY (3ӕȌ#յ3hK^3AMf>Hݨ0?_Gd&>Qy[Y Ie{muT/0{3bY0yB/s<}bSંt7]D}~=`7vj.Bʔ߱{K~u+V a1.Jm5ga `Ⓩ̤kd&\÷דJ}3_5X4nЕQMHߑ3LB O忓f?sǃt4XW8Z˜يv9؟~w:_'s#NvNRS>5&O~U6'VbBl|l1t /RgrNrٳ 'Q0BGb+?Φlӗ}^GWH. 9JWa6pशDr(5ϪG0L//O<8X+7HoHte31 %t%q"JɍI D6iI_OȽJۣ!J,}.NOvgmZԟ06ys;2kaiT~ՠym[wzDDD~1O>3^99pSH^OBT(|dbaa@WF|2#baHRh̼x N[0L2).&/}/yF[Sn l4g[0ܩf( /PIDAT;=o 9l诼1^^<#qw1h8r<3g}\}oC`U/34QϰDFtm])Q;RS>5&O~U6'VbBl|l1t /RgrNrٳ 'Q0BGb+?ΦlӗZh!"""6Ն])cxZ:Ӗ~ҷ$W۶p )S" ɳ*MDŽ%D'^DDD.zQ˜ȥ SZY,V}D=c"""" c"""" c""""0&"""0&"""" c"""" c'g:! NEvԱ溺[Fö\y܊PCY3mW§ """u=c'?GNQQnhuiOO6h֊H81O>3^фBw6zB vk|& &W= 4*(d IA:FcmgKp޲xaWfŔNu DrhLVnMΝKcjbB """9u =x&>9i/ҹx~ZƘƏ38w#n/KF#3 |=s&+v:U{#Eӕ:́wJYn UKRS>5&O~U6'VbBl|l1t /RgrNrٳ 'Q0BGb+?Φlӗ1 "???~'~/"""r?C9Cg#1ٙoKSr ƜcKӿ| """"uHaLDDD0GUC"""ryלס3c w:om:"""Rg `Р#m~XA?c^5;shΘH:0fѪTՠ+eŪa(!!ibbf:"""Rbذq:KgˣS/`T_221tX_kY,Hv~g gal۶ DGz}{1OC$EU% 8 coODDji^L^V}: S!1114_D"r7/%.ZK'mml}Ƕ rݥ]AMPz jޠh/KPRx|,\+F.LOjc5 ̲,N^Ÿ@ۅ6Z`ِ_cM4 vҡ,۶ٸu3]O~x'21׺mSĆUw@R.la8 n0I]Rˠ %>c{. ttMthמ^ϩIv }3@~zȾKsDD.;ٱ1zkҋ7=$2υ? +e/ʴ/qd[wp0lXPl<^RK5P6 2+7䳰p> OX8;th@ӆGS/yoB=c""%妤a9HؓC9])\g^xw-77]a.[dAn[AUZk,8w*=9sXe/%&mio]O`)fݔm0 ('K5?rm7Ҵ2ym<'5oÁ?a6-G"]YCadSyf'sXi'G{p5Y\='߭HsC\~txRfN$uWYi1m7oE*>*-0O;|1FT}. `>8^X]zÿ"2ٗXU܉bhGxN?O.Ȁ5mhС]BY{47 ,۲m۶q&L]oL 4 ۿ/s5YɌė7³ϿOgLD.À8֏!W\nMd,;).=_dĶ-9/͇r)2br-GMOMO%d#W]BV1\׻-.?>=N4Y֌?G X5}D=4kdLbm^&_Jƶ.-\u8ӡ@ ;z):|^/mcYVǶ- ?à?Y4>:wHdB(f}#xCiRP6'C qk8x(pba6}QNU;SGrc&eڛɶr8&qk:}_t ÛɖOK֓yܠa\/սiVC7Mw ek<"\px\,ڰۮ[Zdrn؂n./]{ٟ֏>pS6ykdyUQYg1.%SBOnPؾ=dW JL|&rnM; VQw-r!W`PUAכŦѦhnxqzG׋3 z=lxQzgeûvy, ò@f4z6DyA )x>hbv6 bL4 x|at21a6X־>2U|j|, /!Fiva-7x YU&Hj'=~F;va_ƢEtXv#$,X+ ͛K媈uݘ^odQϘygͣ0#e_.~?nw3x^lXA~?I~p߾=?ѕ.\fL:4zӾWŐe1MzDD_F~z4awDAӃODڔ``WxN#nKAž"GeOW<1k66m4x\Xbhvt-?{f֗0fcYeysj!zY6^,Oiim~;%Rz؟IAwbЪbrШq㪨l4*">#vK[7HnNEw<>R.W 3p?ۖ p8}aUY5<0+dCwmth##~y oӏCH=m U6,zn0)HE *]q>/3£ =]V(^üWPx]ػ!Ψޭwl~ݹ3ĬV9O,o~I IlޓNϞed{гpZ;&$xkZ$*cZѡ4ޑƜ+=Ƭ!8:|^YM˿ەӞ=ٱ3V,FI4gW@|I*~xivY |.&KqGg, ?F m.bǂd2}'>c͑pEׯM1v!&o]aŲ,|^_+(=kUb~oF66;$s죨#[_؁+o1Mh3C44']'Nl7S9OtyūVhП0v/FVHq[%%(ڰmvWhAO$D`Cֶ|h;9 R60pɜ\ї3H%]z4+skK8MAзc$}Gҫ]ZGЩe/oLpN{ٰ0ϾRg]z$V6_4}y߬۶#;ض`5\e[\j .@VZ,>/E{O VZ{yxxJ~Gc fMdڄǷޚdW9*3+]{R6%';M_|coR0[g+Y>M߇jhRD< j؂%mC:gwp> .kЩML }?f@ Y,-@Gi݉hwii8~I̵CS?8Q<}1f8]˿όIsu@?:'зl}9f mqUVX6<ʬS_  j@Xh]{wM|_PoƇz#MDM{O[]V3rw:'meyȢ\M5AFΝ+k,QSSD|̽~oGm~C|Ӟ'Y+2hVw[ 945-?V>wӨ^/7'Rg93?'72~rǪoc7\([.#s[TbK0%9n?_TyŊc0_|%/}+iЧ˛y dspLV^An)78>Z)Tg_ob]bo F8v{#jA첱v-\_cv=oR*\X Ʊ4()xKj6 Gb<%eA|ő6لi~ ۲Pr|zjObv8M9G)ͮwA^y8GɉB<%׹ gdyYl)v ca0pT~9a r1?e!F#r|]4gLD<_-0}tjgfO%a'zeϺ20qTl:h>.բ C6!?sy|y=<^McB`YVy;1NLN߅4/Fm gW.Y={q-Cq]^ʊi:q3BNqշ c""rY*{Αm}hk]K-a6 yMm#sVp`;L#C|>a'at:/ V-К-z)S \.w;)ڴm[|>^/3fWPO QaLDu"88βVv*Pne]O/ 0ʾ8]e.{(i9be=a0v)+9QHIQ!%E'e̘ma,|m|۲q]e]0^O)@\ DD.`0zL`>.sb&`b:P_͙q5rrr3:V :qr h@LSCaLDDDj44 &a*Go1K)ED}շ[DDPV}yRDDDһ)EDDD. c"""" c"""" c""""0&"""0&""""I~Q4Rv}IENDB`gsequencer-1.4.24/docs/usersBook.xml0000644000175000017500000000375013246707333014327 00000000000000 ]> Advanced Gtk+ Sequencer User's Handbook Copyright (C) &jkraehemann;. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Joël Krähemann This book is dedicated to my father †Hans-Jörg Krähemann. gsequencer-1.4.24/docs/developersBook/0000755000175000017500000000000013256233676014674 500000000000000gsequencer-1.4.24/docs/developersBook/chap10.xml0000644000175000017500000001122313247044247016403 00000000000000 AgsRecall implementations There a well know set of recalls described here. Additionally you might want to take advantage of recalls interfacing plugin APIs like LADSPA, DSSI or LV2. You can instantiate them simply with GList* ags_recall_factory_create(AgsAudio*, AgsRecallContainer*, AgsRecallContainer, gchar*, guint, guint, guint, guint, guint, guint) ags-delay The delay until next tic, it loops endless. ags-count-beats Keep track of what beat you are playing by counting them, may loop endless. ags-stream Streams your audio data of AgsAudioSignal. ags-loop Allocate audio signals within a loop. Used to produce destination buffers. Listens to AgsCountBeatsAudioRun::sequencer_loop ags-play-master Master playback to soundcard, stops if no more producers streaming. ags-copy Copy audio data from one audio signal to an other. ags-buffer Buffer audio data, produces new destination as on source occurs AgsAudioSignal::add_audio_signal. ags-play Simple playback. ags-copy-pattern Copy audio data based on boolean patterns. ags-play-notation Copy audio data based on notation. ags-peak Calculate peak of audio data. ags-mute Mutes your audio data. ags-volume Adjust volume of audio data. ags-ladspa Interface LADSPA plugins. ags-dssi Interface DSSI plugins. ags-lv2 Interface LV2 plugins. ags-route-dssi Route notation into DSSI plugin. ags-route-lv2 Route notation into LV2 plugin. ags-record-midi Record MIDI data and convert to notation. gsequencer-1.4.24/docs/developersBook/chap3.xml0000644000175000017500000002330113247044247016325 00000000000000 ]> Multi-/Super-threaded tree Advanced Gtk+ Sequencer comes with an AgsThread object. It is organized as a tree structure. The API provides many functions to work with it. These threads do the ::clock event where all threads synchronize. The AgsTaskThread runs synchronized as well but is going to be waited after syncing to run all tasks. The AgsTask signal ::launch runs asynchronous exclusively. So the task thread implements AgsAsyncQueue interface. Every thread tree shall have at toplevel a thread implementing AgsMainLoop interface. There is an object call AgsThreadPool serving prelaunched threads. It returns on pull AgsReturnableThread instances. They can be used with a callback ::safe-run. There is a interface to implement by your application context. Thus the AgsConcurrencyProvider interface is used. It has some common get/set functions to do basic multi-threaded work by well defined objects. The main loop interface AgsMainLoop should be implemented by toplevel threads. Within a thread tree this is the topmost element. It has various get and set methods you would expect. ::set_tic and ::get_tic is used for synchronization purpose as well ::set_last_sync and ::get_last_sync. ::get_async_queue should return an instance implementing AgsAsyncQueue eg. AgsTaskThread. ::get_application_context returns the AgsApplicationContext. Threads in general Within thread tree context you have to take care not to hang it up with a dead-lock. Usually you have to use the :start_queue to start threads. Protect it with :start_mutex. Alternatively you may want to use void ags_thread_start(AgsThread*). The :start_cond notifies about thread being started. The following example creates a thread and does add an other thread to :start_queue. This causes it to be started as well. Note you want to access :start_queue using atomic operations since it is volatile. Starting threads There many other functions not covered like mutex wrappers ags_thread_lock() and ags_thread_unlock(). As doing a closer look to the API there are functions to lock different parts of the tree. But all these functions should be carefully used, since you might run into a dead-lock. ags_thread_resume() and ags_suspend() wakes-up or suspends threads. But they both should be used within same tic of ::clock. ags_thread_timelock() is used for suspending computing expensive threads and passing ::clock within its run. To find a specific thread type use ags_thread_find(). You can use ags_thread_self() to retrieve your own running thread in case your using Advanced Gtk+ Sequencer thread wrapper. Pulling threads of thread pool AgsThreadPool serves you instantiated and running threads. To pull an AgsReturnableThread issue ags_thread_pool_pull(). The following example does instantiate a thread pool and starts it. After, it pulls two threads and the callbacks are invoked. Pulling threads of thread-pool Worker-threads to do tic-less parallelism Worker threads are used to perform heavy load tasks that run completely asynchronous. This means they don't do any sync with the tree. You start worker threads like any other thread by calling void ags_thread_start(AgsThread*) or void ags_thread_stop(AgsThread*) to stop it. The AgsWorkerThread overrides ::start of AgsThread class and won't do any synchronization. The worker implementation is responsible to delay computation by calling usleep() or nanosleep(). You can either connect to the ::do-poll signal or inherit of the AgsWorkerThread object. This requires to override ::do-poll. Asynchronously destroy objects AgsDestroyWorker is intended to unref or free objects asynchrously. Note the use of this worker for one certain instance, requires it to do it throughout with the worker for all unref calls. Else you would probably end in a data-race ending in accessing a freed instance. This can especially happen as using g_object_run_dispose(). The destroy function takes exactly one parameter like g_free() or g_object_unref(). To add an entry call ags_destroy_worker_add(). The first parameter is the worker, second the pointer to free/unref and third the destroy function. Poll for file descriptors The AgsPollingThread polls your file descriptors. Since it is derived by AgsThread it runs tic based like other threads. Call ags_polling_thread_add_poll_fd() and pass an AgsPollFd to it, in order to poll a resource. Note the resource won't be polled unless the thread was started by calling void ags_thread_start(AgsThread*). The ::dispatch signal notifies about a ressource to be ready for Input/Output. To stop poll a resource either remove the poll file descriptor by calling void ags_polling_thread_remove_poll_fd(AgsPollingThread*, GObject*). Or just stop the polling thread by ags_thread_stop() so any resource won't be polled. Launching tasks It's for thread-safety for sure to run tasks asynchronously exclusive. This means what ever you do it's safe exceptional in view of third-party libraries that might have their own threads. To do your own task you should inherit AgsTask base object and implement ::launch. This signal is invoked after syncing the thread tree. You can use either ags_task_thread_append_task() or ags_task_thread_append_tasks() to add one respectively a GList of tasks. The task shall report failures by calling ::failure signal. Mutex and condition manager The AgsMutexManager and AgsConditionManager are singletons. You might want to retrieve an instance by calling ags_mutex_manager_get_instance() or ags_condition_manager_get_instance(). To use the managers you call during instatiation of your object ags_mutex_manager_insert() by providing the lock object and the initialized mutex. There is the ags_condition_manager_insert() function available for conditions. During finalization of your object you should remove the mutex of the manager. This is done by calling ags_mutex_manager_remove() or ags_condition_manager_remove() for conditions. The benefit of providing these managers is, it can be used by interface implementations. For instance AgsSoundcard derived objects can be reused by a generic procedure. Guaranteeing that no concurrent access is performed by locking the mutex. Async message delivery AgsMessageDelivery is a singleton. In order to get the instance of it call AgsMessageDelivery* ags_message_delivery_get_instance(). The library routines only provide messages until you have added an AgsMessageQueue with the appropriate namespace. libags - namespace used by &libagsso;, &libagsthreadso; and &libagsserverso; libags-audio - namespace used by &libagsaudioso; As you usually have one object or widget mapped to a specific object, you can poll the queue by guint g_timeout_add(guint, GSourceFunc, gpointer). Then forward the event as you like. GSequencer does look for matching messages by sender using following GList* ags_message_queue_find_sender(AgsMessageQueue*, GObject*). This not at least because the recipient is most of the time not defined. gsequencer-1.4.24/docs/developersBook/chap8.xml0000644000175000017500000000355013247044247016336 00000000000000 Your audio data in AgsAudioSignal AgsAudioSignal is the object orientated representation of your audio data. It has a GList with data pointer to audio buffers. There convenience functions to resize the stream. void ags_audio_signal_stream_resize(AgsAudioSignal*, guint) void ags_audio_signal_stream_safe_resize(AgsAudioSignal*, guint) void ags_audio_signal_add_stream(AgsAudioSignal*) There exists a safe resize function because the audio signal might be in use and it doesn't allow to shrink beyond used entries. This could be fatal if an effect processor is using the stream and it gets freed as it uses it. void ags_audio_signal_duplicate_stream(AgsAudioSignal*, AgsAudioSignal*) can be used to blue-print one audio signals buffer to an other audio signal. Or you might call AgsAudioSignal* ags_audio_signal_get_template(GList*) from your AgsRecycling internal GList of audio signals to get the template. gsequencer-1.4.24/docs/developersBook/chap5.xml0000644000175000017500000001517713247044247016343 00000000000000 AgsAudio a container of AgsChannel AgsAudio contains a pointer to your notation and automation data. It has its own recall context, AgsRecallAudio. It organizes your recycling contices and thus having an associated AgsRecallID for running contices. Further AgsAudio is your topmost nesting level of AgsAudioSignal. You might traverse the layers in following order: AgsAudio AgsChannel AgsRecycling AgsAudioSignal AgsAudioSignal keeps your audio data as a GList of buffers. AgsRecycling is your nested tree to AgsChannel, giving you the opportunity to emit ::add_audio_signal or ::remove_audio_signal by producer and havig many consumers. AgsChannel is your opposite to an audio channel representing a single line. AgsAudio keeps track of all of them. You might want to add your audio object to an AgsSoundcard. You may resize the count of pads or audio channels with void ags_audio_set_pads(AgsAudio*, GType, guint, guint) and void ags_audio_set_audio_channels(AgsAudio*, guint, guint). Like in the following example the channels are adjusted and notation is added. Using AgsAudio AgsNotation and AgsNote The notation object stores your notes as a GList. You can add or remove a note by calling appropriate function: void ags_notation_add_note(AgsNotation*, AgsNote*, gboolean) gboolean ags_notation_remove_note_at_position(AgsNotation, guint, guint) The notation object supports selection of notes. There are functions available to select a single point or a region of the notation. You may find specific notes by calling: AgsNote* ags_notation_find_point(AgsNotation*, guint, guint, gboolean) GList* ags_notation_find_region(AgsNotation*, guint, guint, guint, guint, gboolean) AgsAutomation and AgsAcceleration The automation objects stores your accelerations as a GList. There are analogous to notation functions to add or remove accelerations. void ags_automation_add_acceleration(AgsAutomation*, AgsAcceleration*, gboolean) gboolean ags_automation_remove_acceleration_at_position(AgsAutomation*, guint, gdouble) The automation object provides functions to lookup a specific point or region, too. AgsAcceleration* ags_automation_find_point(AgsAutomation*, guint, gdouble, gboolean) GList* ags_automation_find_region(AgsAutomation*, guint, gdouble, guint, gdouble, gboolean) AgsRecallID and AgsRecyclingContext As mentioned previously in this chapter AgsAudio organizes your recall ids and recycling contices. The following functions are here to add and remove them. void ags_audio_add_recall_id(AgsAudio*, GObject*) void ags_audio_remove_recall_id(AgsAudio*, GObject*) void ags_audio_add_recycling_context(AgsAudio*, GObject*) void ags_audio_remove_recycling_context(AgsAudio*, GObject*) Dealing with recalls Since AgsAudio is your entry point to do sound processing there are some useful functions to set it up, but later on them. Instances of AgsRecallAudio base object may be added or removed with void ags_audio_add_recall(AgsAudio*, GObject*, gboolean) and void ags_audio_remove_recall(AgsAudio*, GObject*, gboolean). You can initialize the sound processing tree with AgsRecallID* ags_audio_recursive_play_init(AgsAudio, gint, gboolean, gboolean, gboolean, gboolean, AgsRecallID*). This invokes successive void ags_audio_init_recall(AgsAudio*, gint, AgsRecallID*), void ags_channel_init_recall(AgsAudio*, gint, AgsRecallID*) and related within your tree. The following signals are triggered during playback ::play, ::tact and ::done - ::cancel and ::remove during termination. Open audio files There is a handy function called void ags_audio_open_files(AgsAudio*, GSList*, gboolean, gboolean) taking as parameter filenames as GSList, overwrite_channels and create_channels as boolean. Filenames is a single linked list of strings, overwrite_channels means use pre-allocated channels and create_channels to allow instantiate new channels. The boolean parameters can be combined as you want. gsequencer-1.4.24/docs/developersBook/chap9.xml0000644000175000017500000002056013246707333016340 00000000000000 Effects You may directly inherit by <ags/audio/ags_recall.h> to do some wicked stuff. But generally you should inherit by these subclasses of AgsRecall: <ags/audio/ags_recall_audio.h> <ags/audio/ags_recall_audio_run.h> <ags/audio/ags_recall_channel.h> <ags/audio/ags_recall_channel_run.h> <ags/audio/ags_recall_recycling.h> <ags/audio/ags_recall_audio_signal.h> You probably wish to have different context for fields of an effect, that's what these objects take on. But before we cover them in detail, we take a look at the lifecycle an effect must accomplish. Play/recall context Don't mix this context up with static/runtime context we talked before. The AgsRecall may have two faces or may be just one for play context. The play context will be called in case the higher level of AgsRecycling will output to a device e.g. the soundcard and no further processing will be done. The recall context means that the AgsRecall will pass one or more cycles of copying or sequencing. This design is intended to make ags as modular and reusable over different use cases as possible. Practically it should be possible to chain up several sequencers. Hands-On instantiating an effect After you got an overview of the basic lifecycle of an effect it's time to create an effect. In this guide we will cover instatiating an effect by using the echo effect. In the following chapter we'll take a look inside the echo effect. AgsRecallContainer AgsRecallContainer isn't a recall itself but you can use it to retrieve a different context. Creating AgsRecallContainer AgsRecallAudio context This is a context you want to use for fields applicable to the entire AgsAudio object. Creating AgsEchoAudio AgsRecallChannel context This context you can use for fields applicable to the AgsChannel you want to modify. Creating AgsEchoChannel AgsRecallAudioRun context The AgsRecallAudioRun class will be duplicated for a parental running AgsChannel. There may be several AgsChannel objects as parental owning a run. Creating AgsEchoAudioRun AgsRecallChannelRun context The AgsRecallChannelRun behaves like an AgsRecallAudioRun but is designated to an AgsChannel object. Creating AgsEchoChannelRun The basic lifecycle of an effect In this section I'll introduce the keyword run which can be understood as a playing instance. But I rather talk about run because it's not guaranted that the recall outputs directly to a device. AgsRecall life-cycle The implemented effect as a subclass of AgsRecall resides as template on the appropriate AgsAudio or AgsChannel. When recycling changes on input, new AgsRecallRecycling will be added. This class function may be of relevancy: channel_class->recycling_changed As a new run occures the AgsRecallAudioRun and AgsRecallChannelRun will be duplicated, dependencies resolved, state initialized and enter the play loop hierarchy. These class functions will be called on the recall: channel_class->duplicate This function will be called on the template object to instantiate the the object which will pass further processing. Further processing: recall_class->resolve_dependencies The recall may want to depend on a other recall (eg. a counter) and may ignore following calls while rather do processing on an event of the dependency. recall_class->run_init_pre, recall_class->run_init_inter & recall_class->run_init_post Will be called only once for the run reffering to dedicated AgsGroupId. recall_class->run_pre, recall_class->run_inter & recall_class->run_post Will be called for each cycle of a run reffering to AgsGroupId. There may be more than one AgsGroupId for a template i.e. there can exist more than one run at the very same time. As soon as an add_audio_signal event will be emitted on an AgsRecycling, the AgsRecallAudioSignal subclass will be instantiated which performs audio stream manipulation. These class functions will be called on the recall: recall_class->run_init_pre, recall_class->run_init_inter & recall_class->run_init_post recall_class->automate, recall_class->run_pre, recall_class->run_inter & recall_class->run_post When you're done with processing call: recall_class->done A closer look at effects As mentioned before audio processing will be done within an AgsRecallAudioSignal subclass. gsequencer-1.4.24/docs/developersBook/chap6.xml0000644000175000017500000001625113247044247016336 00000000000000 Your tree linked with AgsChannel AgsChannel forms your audio processing tree and contains recalls, too. You might want to iterate the channels of your audio object or just call one of these functions: AgsChannel* ags_channel_first(AgsChannel*) AgsChannel* ags_channel_last(AgsChannel*) AgsChannel* ags_channel_nth(AgsChannel*, guint) AgsChannel* ags_channel_pad_first(AgsChannel*) AgsChannel* ags_channel_pad_last(AgsChannel*) AgsChannel* ags_channel_pad_nth(AgsChannel*, guint) As you see there is a grained access to channels. You can lookup channels from with the same audio channel with the functions containing pad in its name. An other exciting feature is finding channels having an assigned recycling. These functions operate on the very same audio channel. AgsChannel* ags_channel_first_with_recycling(AgsChannel*) AgsChannel* ags_channel_last_with_recycling(AgsChannel*) AgsChannel* ags_channel_prev_with_recycling(AgsChannel*) AgsChannel* ags_channel_next_with_recycling(AgsChannel*) The pattern There can AgsPattern being added to a channel by void ags_channel_add_pattern(AgsChannel*, GObject*). Later if not used anymore likewise call void ags_channel_remove_pattern(AgsChannel*, GObject*). Adding AgsPattern Linking overview In this section you get some knowledge about AgsChannel internals. Here you get an overview of the audio layer. All code related to it is located in subdirectory <ags/audio>. Linking AgsChannel is a quiet complex thing but If you wish to do so you can just call void ags_channel_set_link(AgsChannel*, AgsChannel*, GError**) and this will the especially covered here. AgsAudio, AgsChannel and AgsRecycling are involved in linking. When talking about linking we should view AgsChannel objects as networked and therefore exists an additional nested network of AgsRecycling objects. The AgsAudio object gives clarification about how AgsChannel has to be accessed either synchronously or asynchronously. Further it tells us whether AgsOutput or AgsInput has a new audio stream which causes in conjunction a dedicated AgsRecycling associated with the appropriate AgsChannel. AGS network layer table object flags Audio#0 AGS_AUDIO_SYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING Audio#1 AGS_AUDIO_ASYNC Audio#2 AGS_AUDIO_ASYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING Audio#3 AGS_AUDIO_ASYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING Audio#4 AGS_AUDIO_ASYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING
green: Bidirectional linked AgsChannel to an other AgsChannel. Generally you link an AgsOutput to an AgsInput. red: Bidirectional linked AgsRecycling to an other AgsRecycling on the same level. They are linked across AgsAudio objects. Same level means the linked AgsRecycling are all child nodes of a parent AgsRecycling. yellow: Unidirectional linked AgsRecycling to an AgsChannel. First AgsRecycling of an AgsOutput and last AgsRecycling of an (other) AgsOutput are linked to an AgsChannel.
Limitations You may not create any kind of loops. You may not set AGS_AUDIO_INPUT_HAS_RECYCLING without setting AGS_AUDIO_OUTPUT_HAS_RECYCLING flag. Hands-On There may be two ways how you can link AgsChannel objects. Prerequisites Assumed you know really what you do, you may be interested in following code. Thread-Unsafe way But generally you wish to create an AgsTask object and let it to link the AgsChannel for you. Multithread-Safe way
gsequencer-1.4.24/docs/developersBook/preface.xml0000644000175000017500000000315613246707333016743 00000000000000 Foreword I began to code with C in spring 2002 and hadn't much programming skills, yet. You may ask me why the C programming language? Well, my friend who was already a convient free software user and hacker recomended me it. He told me that C is a standard on Unix like operating systems so it would be a good choice. After started with language basics and several discussions with my friend about pointers he advised me of Gtk+. While I was doing my first steps in GUI programming with C, I was sure to extensively use it and became a persuaded free software user and programmer. A year later I really understood the object orientated matter of GObject and how to write objects and widgets myself. C wasn't like Java where you just couldn't implement no classes just everything was a class or at least a method. First output with AGS happend via Open Sound System device drivers but the entire application lacked of a thread safe concept. But for now you may write tasks. Be part of the fun. gsequencer-1.4.24/docs/developersBook/appb.xml0000644000175000017500000000543413246707333016261 00000000000000 Related projects Project Websites Gtk+ Gimp Tool Kit - http://www.gtk.org Libinstpatch Instrument patch library - http://www.swamiproject.org Libxml2 XML library - http://www.xmlsoft.org Libsndfile Sound file library - http://www.mega-nerd.com Alsa Advanced Linux Sound Architecture - http://www.alsa-project.org JACK Jack audio connection kit - http://www.jackaudio.org LADSPA Linux Audio Developer's Simple Plugin API - http://www.ladspa.org DSSI Disposable Soft Synth Interface - http://dssi.sourceforge.net Lv2 LADSPA version 2 - http://www.lv2plug.in gsequencer-1.4.24/docs/developersBook/chap4.xml0000644000175000017500000000377013247044247016336 00000000000000 The soundcard and sequencer interface With AgsSoundcard and AgsSequencer interface you can obtain information about output or input devices. Getting the next buffer for playback something can be achieved, too. As well reading MIDI data from current buffer is supported. Note these operations are performed all delayed in order to avoid concurrent memory access. Latency is at most one buffer time. Operations on buffers might be performed non-blocking so the thread returns earlier than expected. This has the advantage of controlling timings and let the thread continue to do more synchronization runs. Real-time behaviour is indicated as all pending sync operations were fulfilled as the next buffer is needed. Gathering PCM information of soundcard In this short example we just get some information out of AgsSoundcard by using void ags_soundcard_pcm_info(AgsSoundcard*, gchar*, guint*, guint*, guint*, guint*, guint*, guint*, GError*). It tells us the card identifier, minimum and maximum supported audio channels, samplerate and buffer size. PCM information from AgsSoundcard gsequencer-1.4.24/docs/developersBook/chap2.xml0000644000175000017500000000476213246707333016337 00000000000000 XML Input/Output Saving and restoring your files is done by using XML supporting XPath. The complete persistence layer is described by ags_file.dtd installed on your system. There various classes involved by doing XML IO. It does it in stages as following for reading: Parsing the XML tree and map nodes and objects. Resolving XPath expressions retrieve objects by their nodes. Do as needed callbacks of AgsFileLaunch to setup up the application. Writing files does ommit the last step. The current AgsConfig is going to be embedded in your file. So you can have per project configuration. Certain objects implement AgsPlugin interface to do an abstraction of reading and writing xmlNode. Writing XML files Writing files is pretty easy. You just have to instantiate AgsFile, set the application context, open it in read-write mode, call ags_file_write() and finally ags_file_close(). Writing XML Reading XML files Normally you instantiate a new application context to be used to load objects into. Create a file object by passing the application context and filename. Then open it and read the content. At the end you close the file descriptor. To use your application start the main loop. Reading XML gsequencer-1.4.24/docs/developersBook/chap7.xml0000644000175000017500000000525513247044247016341 00000000000000 The recycling tree AgsRecycling has a strong relation to AgsChannel although not every channel might have its very own recycling. Rather having a reference to a start and end region of an inter-connnected AgsRecycling. It may create or destroy audio signals event based. Inter-connected gets its meaning as void ags_channel_set_recycling(AgsChannel*, AgsRecycling*, AgsRecycling*, gboolean, gboolean) invoked by void ags_channel_set_link(AgsChannel*, AgsChannel*, GError**) connects AgsRecycling:next and AgsRecycling:prev together from different channels. Providing you the AgsRecyclingContext. A recycling context has generally one parent and many children from different channels. AgsRecallID points to one recycling context in order to make decisions of what level you are running in. Theoretically super-threaded tree can run upto the recycling context level. Note, recyclings have they own recall base object AgsRecallRecycling. Usually, you do void ags_recall_add_child(AgsRecall*, AgsRecall*) to instances inherit of AgsRecallChannelRun. Add and remove audio signal The two signals ::add_audio_signal and ::remove_audio_signal should be invoked as adding or removing AgsAudioSignal to an AgsRecycling. Recalls act as producer or consumer of AgsAudioSignal. They do basically play notation or process your effects. Its are located in AgsAudio or AgsChannel. There is generally a need for providing a template audio signal within your recycling. As this does this example. This reduces the overhead of reading files for every playing during a button click, notation or pattern. AgsRecycling and AgsAudioSignal gsequencer-1.4.24/docs/developersBook/chap11.xml0000644000175000017500000000261113246707333016406 00000000000000 Thread-safe audio ports The AgsPort object provides you a well defined API to safe read or write data to the AgsPort. Its access is protected by mutices. All actions on ports shall happen through ::safe-read, ::safe-write, ::safe-get-property or ::safe-set-property. AgsPort can contain various data types. But of only one type at the time. Automation happens by adjusting ports and perhaps even applying an AgsConversion. Further it contains some meta-information about plugin name and port specifier. Get and set values You can achieve this by using GValue like: gsequencer-1.4.24/docs/developersBook/chap12.xml0000644000175000017500000000252113246707333016407 00000000000000 Putting all together So far we have seen the most important objects involved doing an audio processing tree. Now we want to do complete example putting all together. In this example we instantiate AgsAudioThread and AgsChannelThread to play a simple pattern. The sound we use is generated using a sinus wave. In order that the threads are used we provide an appropriate AgsConfig. Further we define an AgsPattern and add the needed recalls to do playback using the AgsRecallFactory. Simple pattern sequencer with master playback gsequencer-1.4.24/docs/developersBook/chap1.xml0000644000175000017500000002201013247044247016317 00000000000000 ]> The application context Making Advanced Gtk+ Sequencer objects reachable from different contices was mandatory as introducing AgsApplicationContext. Imagine you are within a GUI callback and want to lookup a soundcard or sequencer the application context shall provide this functioanlity and provide access to its objects through a well defined interface. As doing it with interfaces you are not limited to one specific implementation rather having the option to choose the appropriate one implementing the interfaces. There are different contices available e.g. AgsThreadApplicationContext providing its functionality by AgsConcurrencyProvider, AgsAudioApplicationContext giving you the wished objects by implementing AgsConcurrencyProvider and AgsSoundProvider. For example the code below should each giving you the same meaning object but using different contices. Implementations and their interfaces Creating a AgsThreadApplicationContext and then get the task thread by calling AgsThread* ags_concurrency_provider_get_task_thread(AgsConcurrencyProvider*). Since the AgsConcurrency interface is implemented by the context, we retrieve the task thread. The AgsTaskThread gives you a thread safe signal. It is used to launch AgsTask objects to do thread safe operations but later on this. Thread application context The AgsAudioApplicationContext inherites from AgsApplicationContext and implements the AgsConcurrency interface, too. So you can retrieve the task thread the same way. But the context implements one more, the AgsSoundProvider interface. Giving you objects related to threading and audio processing. Audio application context The main loop property AgsApplicationContext:main-loop does usually point to an AgsThread implementing AgsMainLoop interface. &libagsthreadso; provides you the AgsGenericMainLoop object or if you intend to use &libagsaudioso;, this property shall point to AgsAudioLoop. AgsMainLoop interface As it shall be implemented by AGS_TYPE_THREAD subtypes, this parent object provides a mutex to properly lock the object. You should obtain the pthread_mutex_t pointer by calling pthread_mutex_t* ags_mutex_manager_lookup(AgsMutexManager*, GObject*). The main loop specifies some signals like ::interrupt, ::monitor and ::change-frequency. They are all related to realtime behavior of an application. Assumed you have a thread you want to run within the thread tree, but it is not mandatory to run it. With these functions you can determine if you shall pause your thread during ::interrupt signal. How many time you are allowed to consume or running at all, can be concluded by using ::monitor. In order to get notified about modified refreshing rate of your thread, listen to ::change-frequency signal. The interface provides some other function pointers. If you want to provide AgsTaskThread to your application, use void ags_main_loop_set_async_queue(AgsMainLoop*, GObject*) and GObject* ags_main_loop_get_async_queue(AgsMainLoop*). To control the AgsThread::clock signal AgsMainLoop's methods are going to be invoked. The involved functions are: void ags_main_loop_set_tic(AgsMainLoop*, guint) guint ags_main_loop_get_tic(AgsMainLoop*) void ags_main_loop_set_last_sync(AgsMainLoop*, guint) guint ags_main_loop_get_last_sync(AgsMainLoop*) The config property The AgsApplicationContext base class provides you an AgsConfig instance. It might load a default configuration or from current users home directory. The config should be obtained as property using void g_object_get(gpointer, gchar*, ...) or similar. AgsConfig stores its properties as key value pairs within appropriate group. In order to get the config instance, load default configuration and get the threading model do the following. Get config value The file property You might want to set an AgsFile or AgsSimpleFile instance within your application context. This in view of having your application persisted. The application context :file property The application mutex The probably most important property is :application-mutex. You should get it and copy to your very own toplevel object. Since all access to AgsApplicationContext should be protected by the mutex of concurrent access. This property is provided by AgsMutexManager, too. The application mutex Program start and termination The application context provides signals to make your application ready to run. You basically implement AgsApplicationContext::prepare, AgsApplicationContext::setup and AgsApplicationContext::register-types. It is upto you how the application shall behave. AgsApplicationContext::quit signal terminates your application. Feel free to provide your own implementation. Abstract data connection AgsDataConnectionManager is a singleton you can retrieve its instance by calling AgsConnectionManager* ags_connection_manager_get_instance(). It usually provides AGS_TYPE_CONNECTION subtypes, like AgsAudioConnection which does provide about assigned soundcard and its channel mapping. AgsConnection contains one single property :data-object. As you provide a message queue consuming &libagsso;, you can retrieve modifications asynchronously. How the message queue is polled is explained in &chap3;. Common interfaces Use AgsConnectable or AgsDynamicConnectable if you intend to listen to a particular event. If you want to connect an event of an object known during instantiation time use ::connect and ::disconnect. Assumed the object needs to be resolved, you can ::connect-dynamic ::disconnect-dynamic, later. AgsPlugin interface provides persistence to a well known abstract base type. Since it has various implementations, this interface provides void ags_plugin_read(AgsFile*, xmlNode*, AgsPlugin*) and xmlNode* ags_plugin_write(AgsFile*, xmlNode*, AgsPlugin*) Likewise there are the interfaces intended to use with sound related objects AgsSoundcard, AgsSequencer, AgsMutable and AgsSeekable. gsequencer-1.4.24/docs/listings/0000755000175000017500000000000013256233676013545 500000000000000gsequencer-1.4.24/docs/listings/audio_application_context.c0000644000175000017500000000052413246707333021055 00000000000000#include #include #include #include AgsApplicationContext *application_context; AgsThread *task_thread; application_context = (AgsApplicationContext *) ags_audio_application_context_new(); task_thread = ags_concurrency_provider(AGS_CONCURRENCY_PROVIDER(application_context)); gsequencer-1.4.24/docs/listings/application_mutex.c0000644000175000017500000000112113246707333017344 00000000000000#include #include #include #include AgsApplicationContext *application_context; AgsThread *main_loop; AgsMutexManager *mutex_manager; pthread_mutex_t *application_mutex; mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); pthread_mutex_lock(application_mutex); application_context = ags_application_context_get_instance(); g_object_get(application_context, "main-loop\0", &main_loop, NULL); pthread_mutex_unlock(application_mutex); gsequencer-1.4.24/docs/listings/effects_echo_audio.c0000644000175000017500000000072613246707333017427 00000000000000#include #include #include #include AgsEchoAudio *echo_audio; echo_audio = (AgsEchoAudio *) g_object_new(AGS_TYPE_ECHO_AUDIO, "soundcard\0", soundcard, "audio\0", audio, "recall-container\0", echo_container, NULL); AGS_RECALL(echo_audio)->flags = AGS_RECALL_TEMPLATE; gsequencer-1.4.24/docs/listings/effects_echo_channel.c0000644000175000017500000000143113246707333017730 00000000000000#include #include #include #include AgsEchoChannel *echo_channel; echo_channel = (AgsEchoChannel *) g_object_new(AGS_TYPE_ECHO_CHANNEL, "soundcard\0", soundcard, "channel\0", channel, "recall-container\0", echo_container, "delay\0", (devout->frequency * (60 / devout->bpm) / 4), "repeat\0", 3, "fade\0", -0.25, "dry\0", 0.5, NULL); AGS_RECALL(echo_channel)->flags = AGS_RECALL_TEMPLATE; gsequencer-1.4.24/docs/listings/complete_example.c0000644000175000017500000003331713246707333017156 00000000000000#include #include #include #include #include AgsAudio* setup_master(AgsApplicationContext *application_context); AgsAudio* setup_slave(AgsApplicationContext *application_context); AgsAudio* setup_master(AgsApplicationContext *application_context) { AgsAudio *audio; AgsChannel *channel; GObject *soundcard; GList *list; GList *recall; guint n_audio_channels, n_output_pads, n_input_pads; /* get soundcard */ list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); soundcard = list->data; /* create master playback */ audio = ags_audio_new(soundcard); n_audio_channels = 2; n_output_pads = 1; n_input_pads = 1; ags_audio_set_audio_channels(audio, n_audio_channels); ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, n_output_pads); ags_audio_set_pads(audio, AGS_TYPE_INPUT, n_input_pads); /* add ags-play-master recall */ ags_recall_factory_create(audio, NULL, NULL, "ags-play-master\0", 0, n_audio_channels, 0, n_output_pads, (AGS_RECALL_FACTORY_INPUT, AGS_RECALL_FACTORY_PLAY | AGS_RECALL_FACTORY_ADD), 0); /* set audio channel on play channel */ channel = audio->output; while(channel != NULL){ recall = channel->play; while((recall = ags_recall_template_find_type(recall, AGS_TYPE_PLAY_CHANNEL)) != NULL){ GValue audio_channel_value = {0,}; play_channel = AGS_PLAY_CHANNEL(recall->data); g_value_init(&audio_channel_value, G_TYPE_UINT64); g_value_set_uint64(&audio_channel_value, channel->audio_channel); ags_port_safe_write(play_channel->audio_channel, &audio_channel_value); recall = recall->next; } channel = channel->next; } return(audio); } AgsAudio* setup_slave(AgsApplicationContext *application_context) { AgsAudio *audio; AgsChannel *channel; AgsAudioSignal *audio_signal; AgsPattern *pattern; AgsDelayAudioRun *play_delay_audio_run; AgsCountBeatsAudioRun *play_count_beats_audio_run; GObject *soundcard; GList *list; GList *recall; guint n_audio_channels, n_output_pads, n_input_pads; gdouble volume; guint current_phase, prev_phase; guint i, j, k; GValue value; /* get soundcard */ list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); soundcard = list->data; /* create master playback */ audio = ags_audio_new(soundcard); audio->flags |= (AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING); n_audio_channels = 2; n_output_pads = 1; n_input_pads = 1; ags_audio_set_audio_channels(audio, n_audio_channels); ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, n_output_pads); ags_audio_set_pads(audio, AGS_TYPE_INPUT, n_input_pads); /* add pattern and generate sound */ channel = audio->input; for(i = 0; i < n_input_pads; i++){ for(j = 0; j < n_audio_channels; j++){ /* pattern */ pattern = ags_pattern_new(); ags_pattern_set_dim(pattern, 1, 1, 16); ags_channel_add_pattern(channel, pattern); for(k = 0; k < 16;){ ags_pattern_toggle_bit(pattern, 0, 0, k); k += 4; } /* sound */ audio_signal = ags_audio_signal_new(); ags_audio_signal_stream_resize(audio_signal, 5); stream = audio_signal->stream; current_phase = 0; volume = 1.0; k = 0; while(stream != NULL){ ags_synth_sin(soundcard, (signed short *) stream->data, 0, 440.0, current_phase, audio_signal->buffer_size, volume); prev_phase = current_phase; current_phase = (prev_phase + (audio_signal->buffer_size) + k * audio_signal->buffer_size) % 440.0; stream = stream->next; k++; } channel = channel->next; } } /* add ags-delay recall */ ags_recall_factory_create(audio, NULL, NULL, "ags-delay\0", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); recall = ags_recall_find_type(audio->play, AGS_TYPE_DELAY_AUDIO_RUN); if(recall != NULL){ play_delay_audio_run = AGS_DELAY_AUDIO_RUN(recall->data); } /* ags-count-beats */ ags_recall_factory_create(audio, NULL, NULL, "ags-count-beats\0", 0, 0, 0, 0, (AGS_RECALL_FACTORY_OUTPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_PLAY), 0); recall = ags_recall_find_type(audio->play, AGS_TYPE_COUNT_BEATS_AUDIO_RUN); if(recall != NULL){ play_count_beats_audio_run = AGS_COUNT_BEATS_AUDIO_RUN(recall->data); /* set dependency */ g_object_set(G_OBJECT(play_count_beats_audio_run), "delay-audio-run\0", play_delay_audio_run, NULL); /* make it loop */ g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, gtk_toggle_button_get_active(window->navigation->loop)); ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(play_count_beats_audio_run)->recall_audio)->notation_loop, &value); } /* ags-copy-pattern */ ags_recall_factory_create(audio, NULL, NULL, "ags-copy-pattern\0", 0, n_audio_channels, 0, n_input_pads, (AGS_RECALL_FACTORY_INPUT | AGS_RECALL_FACTORY_ADD | AGS_RECALL_FACTORY_RECALL), 0); recall = ags_recall_find_type(audio->recall, AGS_TYPE_COPY_PATTERN_AUDIO_RUN); if(recall != NULL){ recall_copy_pattern_audio_run = AGS_COPY_PATTERN_AUDIO_RUN(recall->data); /* set dependency */ g_object_set(G_OBJECT(recall_copy_pattern_audio_run), "delay-audio-run\0", play_delay_audio_run, "count-beats-audio-run\0", play_count_beats_audio_run, NULL); } /* set pattern object on port */ channel = ags_channel_pad_nth(audio->input, 0); for(i = 0; i < n_input_pads; i++){ for(j = 0; j < n_audio_channels; j++){ GList *list; recall = ags_recall_template_find_type(channel->recall, AGS_TYPE_COPY_PATTERN_CHANNEL); copy_pattern_channel = AGS_COPY_PATTERN_CHANNEL(recall->data); list = channel->pattern; pattern = AGS_PATTERN(list->data); copy_pattern_channel->pattern->port_value.ags_port_object = (GObject *) pattern; ags_portlet_set_port(AGS_PORTLET(pattern), copy_pattern_channel->pattern); channel = channel->next; } } return(audio); } int main(int argc, char **argv) { AgsAudio *master, *slave; AgsChannel *output, *input; AgsThread *main_loop; AgsApplicationContext *application_context; AgsConfig *config; GList *playback; GList *start_queue; GError *error; pthread_mutex_t *application_mutex; pthread_mutex_t *main_loop_mutex; pthread_mutex_t *audio_thread_mutex; /* create application context */ application_context = ags_audio_application_context_new(); /* set config */ config = application_context->config; ags_config_set_value(config, AGS_CONFIG_THREAD, "model\0", "super-threaded\0"); ags_config_set_value(config, AGS_CONFIG_THREAD, "super-threaded-scope\0", "channel\0"); /* get mutex manager and application mutex */ mutex_manager = ags_mutex_manager_get_instance(); application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager); /* main loop */ main_loop = application_context->main_loop; pthread_mutex_lock(application_mutex); main_loop_mutex = ags_mutex_manager_lookup(mutex_manager, main_loop); pthread_mutex_unlock(application_mutex); /* setup audio tree */ master = setup_master(application_context); slave = setup_slave(application_context); /* set link */ input = master->input; output = slave->output; while(input != NULL && output != NULL){ error = NULL; ags_channel_set_link(input, output, &error); if(error != NULL){ g_message("%s\0", error->message); } input = input->next; output = output->next; } /* initialize tree */ g_atomic_int_or(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->flags), AGS_PLAYBACK_DOMAIN_SEQUENCER); playback = AGS_PLAYBACK_DOMAIN(audio->playback_domain)->playback; list = ags_audio_recursive_play_init(audio, FALSE, TRUE, FALSE); while(playback != NULL){ g_atomic_int_or(&(AGS_PLAYBACK(playback->data)->flags), AGS_PLAYBACK_SEQUENCER); playback = playback->next; } /* parent mutex */ pthread_mutex_lock(application_mutex); audio_thread_mutex = ags_mutex_manager_lookup(mutex_manager, AGS_PLAYBACK_DOMAIN(slave->playback_domain)->audio_thread[1]); pthread_mutex_unlock(application_mutex); /* append to AgsAudioLoop */ ags_audio_loop_add_audio(main_loop, slave); /* add audio and channel threads */ output = slave->output; start_queue = NULL; while(output != NULL){ g_atomic_int_or(&(AGS_CHANNEL_THREAD(AGS_PLAYBACK(output->playback)->channel_thread[1])->flags), (AGS_CHANNEL_THREAD_WAIT | AGS_CHANNEL_THREAD_DONE | AGS_CHANNEL_THREAD_WAIT_SYNC | AGS_CHANNEL_THREAD_DONE_SYNC)); start_queue = g_list_prepend(start_queue, AGS_PLAYBACK(output->playback)->channel_thread[1]); if(AGS_PLAYBACK(output->playback)->channel_thread[1]->parent == NULL){ ags_thread_add_child_extended(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1], AGS_PLAYBACK(output->playback)->channel_thread[1], TRUE, TRUE); ags_connectable_connect(AGS_CONNECTABLE(AGS_PLAYBACK(output->playback)->channel_thread[1])); } output = output->next; } /* start queue */ start_queue = g_list_reverse(start_queue); pthread_mutex_lock(audio_thread_mutex); if(start_queue != NULL){ if(g_atomic_pointer_get(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]->start_queue)) != NULL){ g_atomic_pointer_set(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]->start_queue)))); }else{ g_atomic_pointer_set(&(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]->start_queue), start_queue); } } pthread_mutex_unlock(audio_thread_mutex); /* super threaded setup - audio */ start_queue = NULL; if(append_audio->do_sequencer){ g_atomic_int_or(&(AGS_AUDIO_THREAD(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1])->flags), (AGS_AUDIO_THREAD_WAIT | AGS_AUDIO_THREAD_DONE | AGS_AUDIO_THREAD_WAIT_SYNC | AGS_AUDIO_THREAD_DONE_SYNC)); start_queue = g_list_prepend(start_queue, AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]); if(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1]->parent == NULL){ ags_thread_add_child_extended(main_loop, AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1], TRUE, TRUE); ags_connectable_connect(AGS_CONNECTABLE(AGS_PLAYBACK_DOMAIN(audio->playback_domain)->audio_thread[1])); } } /* start queue */ start_queue = g_list_reverse(start_queue); pthread_mutex_lock(main_loop_mutex); if(start_queue != NULL){ if(g_atomic_pointer_get(&(AGS_THREAD(main_loop)->start_queue)) != NULL){ g_atomic_pointer_set(&(AGS_THREAD(main_loop)->start_queue), g_list_concat(start_queue, g_atomic_pointer_get(&(AGS_THREAD(main_loop)->start_queue)))); }else{ g_atomic_pointer_set(&(AGS_THREAD(main_loop)->start_queue), start_queue); } } pthread_mutex_unlock(main_loop_mutex); /* start threads and join main loop */ ags_thread_start(main_loop); pthread_join(*(main_loop->thread), NULL); return(0); } gsequencer-1.4.24/docs/listings/effects_echo_audio_run.c0000644000175000017500000000105713246707333020311 00000000000000#include #include #include #include echo_audio_run = (AgsEchoAudioRun *) g_object_new(AGS_TYPE_ECHO_AUDIO_RUN, "soundcard\0", soundcard, "audio\0", audio, "recall-audio\0", echo_audio, "recall-container\0", echo_container, NULL); AGS_RECALL(echo_audio_run)->flags = AGS_RECALL_TEMPLATE; gsequencer-1.4.24/docs/listings/linking_unsafe.c0000644000175000017500000000176113246707333016625 00000000000000#include #include #include #include AgsAudio *master_audio, *slave_audio; AgsLinkChannel *linkChannel; GObject *soundcard; GError *error; /* instantiate AgsDevout */ soundcard = ags_devout_new(NULL); /* create AgsAudio objects */ master_audio = (AgsAudio *) g_object_new(AGS_TYPE_AUDIO, "soundcard\0", soundcard, NULL); slave_audio = (AgsAudio *) g_object_new(AGS_TYPE_AUDIO, "soundcard\0", soundcard, NULL); /* link master_audio's input with slave_audio's output */ ags_channel_set_link(ags_channel_nth(master_audio->input, 0), ags_channel_nth(slave_audio->output, 0), &error); ags_channel_set_link(ags_channel_nth(master_audio->input, 1), ags_channel_nth(slave_audio->output, 1), &error); gsequencer-1.4.24/docs/listings/file_property.c0000644000175000017500000000045213246707333016510 00000000000000#include #include #include AgsApplicationContext *application_context; AgsFile *file; application_context = ags_application_context_get_instance(); file = ags_file_new(); g_object_set(application_context, "file\0", file, NULL); gsequencer-1.4.24/docs/listings/effects_recall_container.c0000644000175000017500000000077713246707333020642 00000000000000#include #include #include #include AgsAudio *audio; AgsChannel *channel; AgsRecallContainer *echo_container; GObject *soundcard; soundcard = ags_devout_new(NULL); audio = ags_audio_new(devout); /* create the container */ recall_container = (AgsRecallContainer *) g_object_new(AGS_TYPE_RECALL_CONTAINER, NULL); ags_audio_add_recall_container(audio, (GObject *) recall_container); gsequencer-1.4.24/docs/listings/pcm_info.c0000644000175000017500000000146713246707333015426 00000000000000#include #include #include #include AgsApplicationContext *application_context; GObject *soundcard; GList *list; guint channels_min, channels_max; guint rate_min, rate_max; guint buffer_size_min, buffer_size_max; GError *error; application_context = ags_application_context_get_instance(); list = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); if(list != NULL){ soundcard = G_OBJECT(list->data); error = NULL; ags_soundcard_pcm_info(AGS_SOUNDCARD(soundcard), &channels_min, &channels_max, &rate_min, &rate_max, &buffer_size_min, &buffer_size_max, &error); if(error != NULL){ g_warning("%s\0", error->msg); } } gsequencer-1.4.24/docs/listings/linking_safe.c0000644000175000017500000000140613246707333016256 00000000000000#include #include #include #include AgsApplicationContext *application_context; AgsTaskThread *task_thread; application_context = ags_application_context_get_instance(); task_thread = application_context->task_thread; /* creating AgsLink task and add it to AgsDevout */ link_channel = ags_link_channel_new(ags_channel_nth(master_audio->input, 0), ags_channel_nth(slave_audio->output, 0)); ags_task_thread_append_task(task_thread, link_channel); link_channel = ags_link_channel_new(ags_channel_nth(master_audio->input, 1), ags_channel_nth(slave_audio->output, 1)); ags_task_thread_append_task(task_thread, link_channel); gsequencer-1.4.24/docs/listings/start_thread.c0000644000175000017500000000133713246707333016314 00000000000000#include #include #include AgsThread *main_loop; AgsThread *thread; AgsApplicationContext *application_context; application_context = ags_application_context_get_instance(); main_loop = ags_generic_main_loop_new(application_context); g_object_set(application_context, "main-loop\0", main_loop, NULL); thread = ags_thread_new(NULL); ags_thread_add_child_extended(main_loop, thread, TRUE, TRUE); g_atomic_pointer_set(&(main_loop->start_queue), g_list_prepend(g_atomic_pointer_get(&(main_loop->start_queue)), thread)); ags_thread_start(main_loop); gsequencer-1.4.24/docs/listings/file_write.c0000644000175000017500000000114013246707333015751 00000000000000#include #include #include AgsApplicationContext *application_context; AgsFile *file; GError *error; static const gchar *filename = "my_file.xml\0"; application_context = ags_application_context_get_instance(); file = (AgsFile *) g_object_new(AGS_TYPE_FILE, "application-context\0", application_context, "filename\0", filename, NULL); error = NULL; ags_file_rw_open(file, TRUE, &error); ags_file_write(file); ags_file_close(file); gsequencer-1.4.24/docs/listings/file_read.c0000644000175000017500000000110613246707333015534 00000000000000#include #include #include AgsApplicationContext *application_context; AgsFile *file; GError *error; static const gchar *filename = "my_file.xml\0"; application_context = ags_audio_application_context_new(); file = g_object_new(AGS_TYPE_FILE, "application-context\0", application_context, "filename\0", filename, NULL); error = NULL; ags_file_open(file, &error); ags_file_read(file); ags_file_close(file); ags_thread_start(application_context->main_loop); gsequencer-1.4.24/docs/listings/effects_echo_channel_run.c0000644000175000017500000000117013246707333020614 00000000000000#include #include #include #include AgsEchoChannelRun *echo_channel_run; echo_channel_run = (AgsEchoChannelRun *) g_object_new(AGS_TYPE_ECHO_CHANNEL_RUN, "soundcard\0", soundcard, "channel\0", channel "recall-channel\0", echo_channel, "recall-container\0", echo_container, NULL); AGS_RECALL(echo_channel_run)->flags = AGS_RECALL_TEMPLATE; gsequencer-1.4.24/docs/listings/add_pattern.c0000644000175000017500000000105213246707333016107 00000000000000#include #include #include #include AgsChannel *channel; AgsPattern *pattern; guint n_bank_0, n_bank_1; guint length; /* create channel */ channel = ags_channel_new(NULL); /* create pattern, set dimension and add it to channel */ n_bank_0 = 4; n_bank_1 = 12; length = 64; pattern = ags_pattern_new(); ags_pattern_set_dim(pattern, n_bank_0, n_bank_1, length); ags_channel_add_pattern(channel, pattern); gsequencer-1.4.24/docs/listings/recycling.c0000644000175000017500000000153113246707333015603 00000000000000#include #include #include #include AgsRecycling *recycling; AgsAudioSignal *template; AgsApplicationContext *application_context; GList *soundcard; guint stream_length; application_context = ags_application_context_get_instance(); soundcard = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); /* create recycling */ recycling = ags_recycling_new(soundcard->data); /* create audio signal and add to recycling */ stream_length = 5; audio_signal = ags_audio_signal_new(soundcard->data, recycling, NULL, stream_length); audio_signal->flags |= AGS_AUDIO_SIGNAL_TEMPLATE; ags_recycling_add_audio_signal(recyclig, audio_signal); gsequencer-1.4.24/docs/listings/pull_thread.c0000644000175000017500000000365213246707333016135 00000000000000#include #include #include void thread_run_callback(AgsThread *thread, gpointer data); void thread_run_callback(AgsThread *thread, gpointer data) { g_message("%s\0", (gchar *) data); } int main(int argc, char **argv) { AgsThread *main_loop; AgsThread *thread_0, *thread_1; AgsThreadPool *thread_pool; AgsApplicationContext *application_context; application_context = ags_thread_application_context(); main_loop = application_context->main_loop; thread_pool = ags_concurrency_provider_get_thread_pool(AGS_CONCURRENCY_PROVIDER(application_context)); ags_thread_start(main_loop); ags_thread_pool_start(thread_pool); /* create thread 0 */ thread_0 = ags_thread_pool_pull(task_thread->thread_pool); pthread_mutex_lock(AGS_RETURNABLE_THREAD(thread_0)->reset_mutex); g_atomic_pointer_set(&(AGS_RETURNABLE_THREAD(thread_0)->safe_data), "thread 0\0"); ags_returnable_thread_connect_safe_run(AGS_RETURNABLE_THREAD(thread_0), ags_task_thread_append_task_queue); g_atomic_int_or(&(AGS_RETURNABLE_THREAD(thread_0)->flags), AGS_RETURNABLE_THREAD_IN_USE); pthread_mutex_unlock(AGS_RETURNABLE_THREAD(thread_0)->reset_mutex); /* create thread 1 */ thread_1 = ags_thread_pool_pull(task_thread->thread_pool); pthread_mutex_lock(AGS_RETURNABLE_THREAD(thread_1)->reset_mutex); g_atomic_pointer_set(&(AGS_RETURNABLE_THREAD(thread_1)->safe_data), "thread 1\0"); ags_returnable_thread_connect_safe_run(AGS_RETURNABLE_THREAD(thread_1), ags_task_thread_append_task_queue); g_atomic_int_or(&(AGS_RETURNABLE_THREAD(thread_1)->flags), AGS_RETURNABLE_THREAD_IN_USE); pthread_mutex_unlock(AGS_RETURNABLE_THREAD(thread_1)->reset_mutex); /* */ pthread_join(*(main_loop->thread)); return(0); } gsequencer-1.4.24/docs/listings/config.c0000644000175000017500000000043513246707333015073 00000000000000#include #include #include AgsConfig *config; gchar *str; config = ags_config_get_instance(); ags_config_load_defaults(config); str = ags_config_get_value(config, "thread\0", "model\0"); gsequencer-1.4.24/docs/listings/thread_application_context.c0000644000175000017500000000051013246707333021216 00000000000000#include #include #include AgsApplicationContext *application_context; AgsThread *task_thread; application_context = (AgsApplicationContext *) ags_thread_application_context_new(); task_thread = ags_concurrency_provider_get_task_thread(AGS_CONCURRENCY_PROVIDER(application_context)); gsequencer-1.4.24/docs/listings/linking_prerequisites.c0000644000175000017500000000244113246707333020244 00000000000000#include #include #include #include AgsAudio *master_audio, *slave_audio; AgsLinkChannel *linkChannel; GObject *soundcard; GError *error; /* instantiate AgsDevout */ soundcard = ags_devout_new(NULL); /* create AgsAudio objects */ master_audio = (AgsAudio *) g_object_new(AGS_TYPE_AUDIO, "soundcard\0", soundcard, NULL); slave_audio = (AgsAudio *) g_object_new(AGS_TYPE_AUDIO, "soundcard\0", soundcard, NULL); /* assign AgsAudioSignal objects to master_audio and slave_audio */ ags_audio_set_flags(master_audio, AGS_AUDIO_OUTPUT_HAS_RECYCLING); ags_audio_set_flags(slave_audio, (AGS_AUDIO_ASYNC | AGS_AUDIO_OUTPUT_HAS_RECYCLING | AGS_AUDIO_INPUT_HAS_RECYCLING)); /* create AgsChannel objects within master_audio and slave_audio */ ags_audio_set_audio_channels(master_audio, 2); ags_audio_set_pads(master_audio, AGS_TYPE_OUTPUT, 1); ags_audio_set_pads(master_audio, AGS_TYPE_INPUT, 1); ags_audio_set_audio_channels(slave_audio, 2); ags_audio_set_pads(slave_audio, AGS_TYPE_OUTPUT, 1); ags_audio_set_pads(slave_audio, AGS_TYPE_INPUT, 8); gsequencer-1.4.24/docs/listings/audio.c0000644000175000017500000000172013246707333014725 00000000000000#include #include #include #include AgsApplicationContext *application_context; GList *soundcard; AgsAudio *audio; AgsNotation *notation; guint audio_channels; guint i; /* get application context and soundcard */ application_context = ags_application_context_get_instance(); soundcard = ags_sound_provider_get_soundcard(AGS_SOUND_PROVIDER(application_context)); /* creat audio and resize channels */ audio_channels = 2; audio = ags_audio_new(soundcard->data); ags_audio_set_audio_channels(audio, audio_channels); ags_audio_set_pads(audio, AGS_TYPE_OUTPUT, 1); ags_audio_set_pads(audio, AGS_TYPE_INPUT, 1); /* add notation */ for(i = 0; i < audio_channels; i++){ notation = ags_notation_new(audio, i); ags_audio_add_notation(audio, notation); } gsequencer-1.4.24/docs/developersBook.xml0000644000175000017500000000461213247044247015333 00000000000000 ]> Advanced Gtk+ Sequencer Developer's Book Copyright (C) &jkraehemann;. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Joël Krähemann This book is dedicated to my friend. gsequencer-1.4.24/docs/reference/0000755000175000017500000000000013256233673013644 500000000000000gsequencer-1.4.24/docs/reference/libags/0000755000175000017500000000000013256233676015110 500000000000000gsequencer-1.4.24/docs/reference/libags/Makefile.in0000644000175000017500000012470113256226517017076 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ 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 \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/reference/libags ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ags/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = ags-docs-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__DIST_COMMON = $(srcdir)/./gtk-doc.make $(srcdir)/Makefile.in \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CORE_AUDIO_CFLAGS = @CORE_AUDIO_CFLAGS@ CORE_AUDIO_LIBS = @CORE_AUDIO_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ GOBJECT_LIBS = @GOBJECT_LIBS@ GREP = @GREP@ GSEQUENCER_CFLAGS = @GSEQUENCER_CFLAGS@ GSEQUENCER_FUNCTIONAL_TEST_LDADD = @GSEQUENCER_FUNCTIONAL_TEST_LDADD@ GSEQUENCER_LDFLAGS = @GSEQUENCER_LDFLAGS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@ GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBASOUND2_CFLAGS = @LIBASOUND2_CFLAGS@ LIBASOUND2_LIBS = @LIBASOUND2_LIBS@ LIBGSEQUENCER_TEST_LIBADD = @LIBGSEQUENCER_TEST_LIBADD@ LIBICONV = @LIBICONV@ LIBINSTPATCH_CFLAGS = @LIBINSTPATCH_CFLAGS@ LIBINSTPATCH_LIBS = @LIBINSTPATCH_LIBS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MIDI2XML_CFLAGS = @MIDI2XML_CFLAGS@ MIDI2XML_LDFLAGS = @MIDI2XML_LDFLAGS@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE_CFLAGS = @PCRE_CFLAGS@ PCRE_LIBS = @PCRE_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PULSE_CFLAGS = @PULSE_CFLAGS@ PULSE_LIBS = @PULSE_LIBS@ RANLIB = @RANLIB@ SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@ SAMPLERATE_LIBS = @SAMPLERATE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ SNDFILE_LIBS = @SNDFILE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ XMLRPC_CLIENT_CFLAGS = @XMLRPC_CLIENT_CFLAGS@ XMLRPC_CLIENT_LIBS = @XMLRPC_CLIENT_LIBS@ XMLRPC_C_CONFIG = @XMLRPC_C_CONFIG@ XMLRPC_SERVER_ABYSS_CFLAGS = @XMLRPC_SERVER_ABYSS_CFLAGS@ XMLRPC_SERVER_ABYSS_LIBS = @XMLRPC_SERVER_ABYSS_LIBS@ XMLRPC_SERVER_CGI_CFLAGS = @XMLRPC_SERVER_CGI_CFLAGS@ XMLRPC_SERVER_CGI_LIBS = @XMLRPC_SERVER_CGI_LIBS@ XMLRPC_UTIL_CFLAGS = @XMLRPC_UTIL_CFLAGS@ XMLRPC_UTIL_LIBS = @XMLRPC_UTIL_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module, e.g. 'glib'. DOC_MODULE = libags # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 # The top-level XML file. DOC_MAIN_SGML_FILE = $(DOC_MODULE).xml # Directories containing the source code. # gtk-doc will search all .c and .h files beneath these paths # for inline comments documenting functions and macros. # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR = $(top_srcdir)/ags/util $(top_srcdir)/ags/lib $(top_srcdir)/ags/object $(top_srcdir)/ags/file $(top_srcdir)/ags/thread $(top_srcdir)/ags/server # Extra options to pass to gtkdoc-scangobj. Normally not needed. SCANGOBJ_OPTIONS = --cflags="$(CFLAGS) $(UUID_CFLAGS) $(LIBXML2_CFLAGS) $(OPENSSL_CFLAGS) $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) $(XMLRPC_SERVER_CFLAGS) $(GOBJECT_CFLAGS)" --ldflags="-static -ldl -lm -lrt -pthread $(LDFLAGS) $(UUID_LIBS) $(LIBXML2_LIBS) $(OPENSSL_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) $(XMLRPC_SERVER_LIBS) $(GOBJECT_LIBS) -L$(top_builddir) $(top_builddir)/libags.la $(top_builddir)/libags_thread.la $(top_builddir)/libags_server.la" # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" # SCAN_OPTIONS=--rebuild-types --rebuild-sections # Extra options to supply to gtkdoc-mkdb # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml MKDB_OPTIONS = --xml-mode --output-format=xml --name-space=libags --module=libags # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS = # Extra options to supply to gtkdoc-fixref. Normally not needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = --module=libags --module-dir=./libags-html/ --html-dir=$(DESTDIR)/$(datadir)/doc/libags-doc/api # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB = CFILE_GLOB = # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES = # Header files or dirs to ignore when scanning. Use base file/dir names # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES = # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = # Extra files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.xml building.xml changes-2.0.xml content_files = # Files where gtk-doc abbrevations (#GtkWidget) are expanded # e.g. expand_content_files=running.xml expand_content_files = AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS = $(gsequencer_CFLAGS) -DGTK_IS_WIDGET_CLASS=1 GTKDOC_LIBS = \ $(top_builddir)/libags.la \ $(top_builddir)/libags_thread.la \ $(top_builddir)/libags_server.la @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test @GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = @GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp #### setup #### GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; #### scan #### GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; #### xml #### GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0 = @echo " DOC Building XML"; #### html #### GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; #### pdf #### GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; # This includes the standard gtk-doc make rules, copied by gtkdocize. # Comment this out if you want 'make check' to test you doc status # and run some sanity checks @ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = \ @ENABLE_GTK_DOC_TRUE@ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ @ENABLE_GTK_DOC_TRUE@ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) @ENABLE_GTK_DOC_TRUE@TESTS = $(GTKDOC_CHECK) all: all-am .SUFFIXES: .SUFFIXES: .log .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/./gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/libags/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/reference/libags/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(srcdir)/./gtk-doc.make $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ags-docs-local: tags TAGS: ctags CTAGS: cscope cscopelist: # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am @ENABLE_GTK_DOC_FALSE@all-local: all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." ags-docs: ags-docs-am ags-docs-am: ags-docs-local clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: check-am install-am install-strip .PHONY: ags-docs-am ags-docs-local all all-am all-local check \ check-TESTS check-am clean clean-generic clean-libtool \ clean-local cscopelist-am ctags-am dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \ uninstall uninstall-am uninstall-local .PRECIOUS: Makefile gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ chmod +x $@ all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) .PHONY: all-gtk-doc @ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi $(AM_V_at)touch setup-build.stamp scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ ) > $@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf libags-html && mkdir libags-html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd libags-html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/libags-html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/libags-html; \ fi; \ test -f $$file && cp $$file $(abs_builddir)/libags-html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=libags-html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ rm -f $(DOC_MODULE)-sections.txt; \ fi distclean-local: @rm -rf xml libags-html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @rm -rf xml libags-html install-data-local: @installfiles=`echo $(builddir)/libags-html/*`; \ if test "$$installfiles" = '$(builddir)/libags-html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs @HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: @HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" @HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" @HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" @HAVE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/libags-html @cp ./libags-html/* $(distdir)/libags-html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/libags-html .PHONY : dist-hook-local docs -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gsequencer-1.4.24/docs/reference/libags/git.mk0000644000175000017500000002441413246707333016144 00000000000000# git.mk # # Copyright 2009, Red Hat, Inc. # Copyright 2010,2011,2012,2013 Behdad Esfahbod # Written by Behdad Esfahbod # # Copying and distribution of this file, with or without modification, # is permitted in any medium without royalty provided the copyright # notice and this notice are preserved. # # The latest version of this file can be downloaded from: # https://raw.github.com/behdad/git.mk/master/git.mk # Bugs, etc, should be reported upstream at: # https://github.com/behdad/git.mk # # To use in your project, import this file in your git repo's toplevel, # then do "make -f git.mk". This modifies all Makefile.am files in # your project to -include git.mk. Remember to add that line to new # Makefile.am files you create in your project, or just rerun the # "make -f git.mk". # # This enables automatic .gitignore generation. If you need to ignore # more files, add them to the GITIGNOREFILES variable in your Makefile.am. # But think twice before doing that. If a file has to be in .gitignore, # chances are very high that it's a generated file and should be in one # of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. # # The only case that you need to manually add a file to GITIGNOREFILES is # when remove files in one of mostlyclean-local, clean-local, distclean-local, # or maintainer-clean-local make targets. # # Note that for files like editor backup, etc, there are better places to # ignore them. See "man gitignore". # # If "make maintainer-clean" removes the files but they are not recognized # by this script (that is, if "git status" shows untracked files still), send # me the output of "git status" as well as your Makefile.am and Makefile for # the directories involved and I'll diagnose. # # For a list of toplevel files that should be in MAINTAINERCLEANFILES, see # Makefile.am.sample in the git.mk git repo. # # Don't EXTRA_DIST this file. It is supposed to only live in git clones, # not tarballs. It serves no useful purpose in tarballs and clutters the # build dir. # # This file knows how to handle autoconf, automake, libtool, gtk-doc, # gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata, # appstream. # # This makefile provides the following targets: # # - all: "make all" will build all gitignore files. # - gitignore: makes all gitignore files in the current dir and subdirs. # - .gitignore: make gitignore file for the current dir. # - gitignore-recurse: makes all gitignore files in the subdirs. # # KNOWN ISSUES: # # - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the # submodule doesn't find us. If you have configure.{in,ac} files in # subdirs, add a proxy git.mk file in those dirs that simply does: # "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. # And add those files to git. See vte/gnome-pty-helper/git.mk for # example. # ############################################################################### # Variables user modules may want to add to toplevel MAINTAINERCLEANFILES: ############################################################################### # # Most autotools-using modules should be fine including this variable in their # toplevel MAINTAINERCLEANFILES: GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \ $(srcdir)/aclocal.m4 \ $(srcdir)/autoscan.log \ $(srcdir)/configure.scan \ `AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \ test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \ for x in \ ar-lib \ compile \ config.guess \ config.sub \ depcomp \ install-sh \ ltmain.sh \ missing \ mkinstalldirs \ test-driver \ ylwrap \ ; do echo "$$AUX_DIR/$$x"; done` \ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \ head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done` # # All modules should also be fine including the following variable, which # removes automake-generated Makefile.in files: GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \ while read f; do \ case $$f in Makefile|*/Makefile) \ test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \ done` # # Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this, # though it's harmless to include regardless. GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \ `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \ if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \ for x in \ libtool.m4 \ ltoptions.m4 \ ltsugar.m4 \ ltversion.m4 \ lt~obsolete.m4 \ ; do echo "$$MACRO_DIR/$$x"; done; \ fi` ############################################################################### # Default rule is to install ourselves in all Makefile.am files: ############################################################################### git-all: git-mk-install git-mk-install: @echo "Installing git makefile" @any_failed=; \ find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ if grep 'include .*/git.mk' $$x >/dev/null; then \ echo "$$x already includes git.mk"; \ else \ failed=; \ echo "Updating $$x"; \ { cat $$x; \ echo ''; \ echo '-include $$(top_srcdir)/git.mk'; \ } > $$x.tmp || failed=1; \ if test x$$failed = x; then \ mv $$x.tmp $$x || failed=1; \ fi; \ if test x$$failed = x; then : else \ echo "Failed updating $$x"; >&2 \ any_failed=1; \ fi; \ fi; done; test -z "$$any_failed" .PHONY: git-all git-mk-install ############################################################################### # Actual .gitignore generation: ############################################################################### $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk @echo "git.mk: Generating $@" @{ \ if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ for x in \ $(DOC_MODULE)-decl-list.txt \ $(DOC_MODULE)-decl.txt \ tmpl/$(DOC_MODULE)-unused.sgml \ "tmpl/*.bak" \ xml html \ ; do echo "/$$x"; done; \ FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \ case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \ fi; \ if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ for lc in $(DOC_LINGUAS); do \ for x in \ $(if $(DOC_MODULE),$(DOC_MODULE).xml) \ $(DOC_PAGES) \ $(DOC_INCLUDES) \ ; do echo "/$$lc/$$x"; done; \ done; \ for x in \ $(_DOC_OMF_ALL) \ $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) \ $(_DOC_MOFILES) \ $(DOC_H_FILE) \ "*/.xml2po.mo" \ "*/*.omf.out" \ ; do echo /$$x; done; \ fi; \ if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ for lc in $(HELP_LINGUAS); do \ for x in \ $(HELP_FILES) \ "$$lc.stamp" \ "$$lc.mo" \ ; do echo "/$$lc/$$x"; done; \ done; \ fi; \ if test "x$(gsettings_SCHEMAS)" = x; then :; else \ for x in \ $(gsettings_SCHEMAS:.xml=.valid) \ $(gsettings__enum_file) \ ; do echo "/$$x"; done; \ fi; \ if test "x$(appdata_XML)" = x; then :; else \ for x in \ $(appdata_XML:.xml=.valid) \ ; do echo "/$$x"; done; \ fi; \ if test "x$(appstream_XML)" = x; then :; else \ for x in \ $(appstream_XML:.xml=.valid) \ ; do echo "/$$x"; done; \ fi; \ if test -f $(srcdir)/po/Makefile.in.in; then \ for x in \ po/Makefile.in.in \ po/Makefile.in.in~ \ po/Makefile.in \ po/Makefile \ po/Makevars.template \ po/POTFILES \ po/Rules-quot \ po/stamp-it \ po/.intltool-merge-cache \ "po/*.gmo" \ "po/*.header" \ "po/*.mo" \ "po/*.sed" \ "po/*.sin" \ po/$(GETTEXT_PACKAGE).pot \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ ; do echo "/$$x"; done; \ fi; \ if test -f $(srcdir)/configure; then \ for x in \ autom4te.cache \ configure \ config.h \ stamp-h1 \ libtool \ config.lt \ ; do echo "/$$x"; done; \ fi; \ if test "x$(DEJATOOL)" = x; then :; else \ for x in \ $(DEJATOOL) \ ; do echo "/$$x.sum"; echo "/$$x.log"; done; \ echo /site.exp; \ fi; \ if test "x$(am__dirstamp)" = x; then :; else \ echo "$(am__dirstamp)"; \ fi; \ if test "x$(LTCOMPILE)" = x -a "x$(LTCXXCOMPILE)" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ for x in \ "*.lo" \ ".libs" "_libs" \ ; do echo "$$x"; done; \ fi; \ for x in \ .gitignore \ $(GITIGNOREFILES) \ $(CLEANFILES) \ $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \ $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \ $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \ so_locations \ $(MOSTLYCLEANFILES) \ $(TEST_LOGS) \ $(TEST_LOGS:.log=.trs) \ $(TEST_SUITE_LOG) \ "*.gcda" \ "*.gcno" \ $(DISTCLEANFILES) \ $(am__CONFIG_DISTCLEAN_FILES) \ $(CONFIG_CLEAN_FILES) \ TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ "*.tab.c" \ $(MAINTAINERCLEANFILES) \ $(BUILT_SOURCES) \ $(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \ $(filter %_vala.stamp,$(DIST_COMMON)) \ $(filter %.vapi,$(DIST_COMMON)) \ $(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \ Makefile \ Makefile.in \ "*.orig" \ "*.rej" \ "*.bak" \ "*~" \ ".*.sw[nop]" \ ".dirstamp" \ ; do echo "/$$x"; done; \ for x in \ "*.$(OBJEXT)" \ $(DEPDIR) \ ; do echo "$$x"; done; \ } | \ sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ sed 's@/[.]/@/@g' | \ LC_ALL=C sort | uniq > $@.tmp && \ mv $@.tmp $@; all: $(srcdir)/.gitignore gitignore-recurse-maybe gitignore: $(srcdir)/.gitignore gitignore-recurse gitignore-recurse-maybe: @for subdir in $(DIST_SUBDIRS); do \ case " $(SUBDIRS) " in \ *" $$subdir "*) :;; \ *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \ esac; \ done gitignore-recurse: @for subdir in $(DIST_SUBDIRS); do \ test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \ done maintainer-clean: gitignore-clean gitignore-clean: -rm -f $(srcdir)/.gitignore .PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe gsequencer-1.4.24/docs/reference/libags/libags.interfaces0000644000175000017500000000234213247044247020331 00000000000000AgsApplicationContext AgsConnectable AgsServerApplicationContext AgsConnectable AgsConcurrencyProvider AgsServiceProvider AgsThreadApplicationContext AgsConnectable AgsConcurrencyProvider AgsThread AgsConnectable AgsAutosaveThread AgsConnectable AgsMainLoop AgsWorkerThread AgsConnectable AgsDestroyWorker AgsConnectable AgsGenericMainLoop AgsConnectable AgsMainLoop AgsPollingThread AgsConnectable AgsTaskThread AgsConnectable AgsAsyncQueue AgsRemoteTaskThread AgsConnectable AgsAsyncQueue AgsReturnableThread AgsConnectable AgsSingleThread AgsConnectable AgsTimestampThread AgsConnectable AgsConditionManager AgsConnectable AgsConfig AgsConnectable AgsFileLink AgsPlugin AgsFrontController AgsConnectable AgsHistory AgsConnectable AgsMessageDelivery AgsConnectable AgsMessageQueue AgsConnectable AgsMutexManager AgsConnectable AgsPollFd AgsConnectable AgsRegistry AgsConnectable AgsRemoteTask AgsConnectable AgsServer AgsConnectable AgsServerStatus AgsConnectable AgsTaskCompletion AgsConnectable AgsTask AgsConnectable AgsThreadPool AgsConnectable AgsThreadXmlSerializationFactory AgsConnectable AgsXmlAuthentication AgsAuthentication AgsXmlCertificate AgsCertificate AgsXmlPasswordStore AgsPasswordStore AgsXmlSerializationFactory AgsConnectable gsequencer-1.4.24/docs/reference/libags/libags.xml0000644000175000017500000001610713256163135017010 00000000000000 %gtkdocentities; ]> Advanced Gtk+ Sequencer Reference Manual for libags. The latest version of this documentation can be found on-line at http://nongnu.org/gsequencer/api/libags/. Library - Completion routines Util - Helper functions Object - Interfaces and marshallers XML Input/Output - Persist project Thread - Multi-threaded tree Thread files - Reading/Writing audio data from disk XML-RPC - server Controller - providing context path Security - basic authentication Thread - multi-threaded routines API Index Index of deprecated API gsequencer-1.4.24/docs/reference/libags/libags-sections.txt0000644000175000017500000013646213247044247020665 00000000000000

ags_applicable AgsApplicable ags_applicable_set_update ags_applicable_apply ags_applicable_reset AGS_APPLICABLE AGS_APPLICABLE_GET_INTERFACE AGS_APPLICABLE_INTERFACE AGS_IS_APPLICABLE AGS_IS_APPLICABLE_INTERFACE AGS_TYPE_APPLICABLE AgsApplicable AgsApplicableInterface ags_applicable_get_type
ags_application_context AgsApplicationContext AGS_VERSION AGS_BUILD_ID AGS_DEFAULT_DIRECTORY AGS_DEFAULT_CONFIG AgsApplicationContextFlags ags_application_context_load_config ags_application_context_prepare ags_application_context_setup ags_application_context_register_types ags_application_context_add_sibling ags_application_context_remove_sibling ags_application_context_find_default ags_application_context_find_main_loop ags_application_context_quit ags_application_context_get_instance ags_application_context_new AGS_APPLICATION_CONTEXT AGS_APPLICATION_CONTEXT_CLASS AGS_APPLICATION_CONTEXT_GET_CLASS AGS_IS_APPLICATION_CONTEXT AGS_TYPE_APPLICATION_CONTEXT AgsApplicationContext AgsApplicationContextClass ags_application_context_get_type
ags_async_queue AgsAsyncQueue ags_async_queue_increment_wait_ref ags_async_queue_get_wait_ref ags_async_queue_set_run_mutex ags_async_queue_get_run_mutex ags_async_queue_set_run_cond ags_async_queue_get_run_cond ags_async_queue_set_run ags_async_queue_is_run ags_async_queue_schedule_task ags_async_queue_schedule_task_list AGS_ASYNC_QUEUE AGS_ASYNC_QUEUE_GET_INTERFACE AGS_ASYNC_QUEUE_INTERFACE AGS_IS_ASYNC_QUEUE AGS_IS_ASYNC_QUEUE_INTERFACE AGS_TYPE_ASYNC_QUEUE AgsAsyncQueue AgsAsyncQueueInterface ags_async_queue_get_type
ags_authentication AgsAuthentication ags_authentication_get_authentication_module ags_authentication_login ags_authentication_logout ags_authentication_generate_token ags_authentication_get_groups ags_authentication_get_permission ags_authentication_is_session_active AGS_AUTHENTICATION AGS_AUTHENTICATION_GET_INTERFACE AGS_AUTHENTICATION_INTERFACE AGS_IS_AUTHENTICATION AGS_IS_AUTHENTICATION_INTERFACE AGS_TYPE_AUTHENTICATION AgsAuthentication AgsAuthenticationInterface ags_authentication_get_type
ags_authentication_manager AgsAuthenticationManager ags_authentication_manager_get_authentication ags_authentication_manager_add_authentication ags_authentication_manager_remove_authentication ags_authentication_manager_login ags_authentication_manager_is_session_active ags_authentication_manager_get_instance ags_authentication_manager_new AGS_AUTHENTICATION_MANAGER AGS_AUTHENTICATION_MANAGER_CLASS AGS_AUTHENTICATION_MANAGER_GET_CLASS AGS_IS_AUTHENTICATION_MANAGER AGS_TYPE_AUTHENTICATION_MANAGER AgsAuthenticationManager AgsAuthenticationManagerClass ags_authentication_manager_get_type
ags_autosave_thread AgsAutosaveThread AGS_AUTOSAVE_THREAD_DEFAULT_JIFFIE AGS_AUTOSAVE_THREAD_DEFAULT_FILENAME ags_autosave_thread_new AGS_AUTOSAVE_THREAD AGS_AUTOSAVE_THREAD_CLASS AGS_AUTOSAVE_THREAD_GET_CLASS AGS_IS_AUTOSAVE_THREAD AGS_TYPE_AUTOSAVE_THREAD AgsAutosaveThread AgsAutosaveThreadClass ags_autosave_thread_get_type
ags_buffer_util ags_buffer_util_s8_to_char_buffer ags_buffer_util_s16_to_char_buffer ags_buffer_util_s24_to_char_buffer ags_buffer_util_s32_to_char_buffer ags_buffer_util_s64_to_char_buffer ags_buffer_util_char_buffer_to_s8 ags_buffer_util_char_buffer_to_s16 ags_buffer_util_char_buffer_to_s24 ags_buffer_util_char_buffer_to_s32 ags_buffer_util_char_buffer_to_s64
ags_business_group AgsBusinessGroup ags_business_group_set_business_group_name ags_business_group_get_business_group_name ags_business_group_set_user_id ags_business_group_get_user_id ags_business_group_set_context_path_with_read_permission ags_business_group_get_context_path_with_read_permission ags_business_group_set_context_path_with_write_permission ags_business_group_get_context_path_with_write_permission ags_business_group_set_context_path_with_execute_permission ags_business_group_get_context_path_with_execute_permission AGS_BUSINESS_GROUP AGS_BUSINESS_GROUP_GET_INTERFACE AGS_BUSINESS_GROUP_INTERFACE AGS_IS_BUSINESS_GROUP AGS_IS_BUSINESS_GROUP_INTERFACE AGS_TYPE_BUSINESS_GROUP AgsBusinessGroup AgsBusinessGroupInterface ags_business_group_get_type
ags_certificate AgsCertificate ags_certificate_verify AGS_CERTIFICATE AGS_CERTIFICATE_GET_INTERFACE AGS_CERTIFICATE_INTERFACE AGS_IS_CERTIFICATE AGS_IS_CERTIFICATE_INTERFACE AGS_TYPE_CERTIFICATE AgsCertificate AgsCertificateInterface ags_certificate_get_type
ags_certificate_manager AgsCertificateManager ags_certificate_manager_get_certificate ags_certificate_manager_add_certificate ags_certificate_manager_remove_certificate ags_certificate_manager_verify_certificate ags_certificate_manager_get_instance ags_certificate_manager_new AGS_CERTIFICATE_MANAGER AGS_CERTIFICATE_MANAGER_CLASS AGS_CERTIFICATE_MANAGER_GET_CLASS AGS_IS_CERTIFICATE_MANAGER AGS_TYPE_CERTIFICATE_MANAGER AgsCertificateManager AgsCertificateManagerClass ags_certificate_manager_get_type
ags_complex ags_complex_alloc ags_complex_copy ags_complex_free ags_complex_get ags_complex_set AGS_TYPE_COMPLEX AgsComplex ags_complex_get_type
ags_concurrency_provider AgsConcurrencyProvider ags_concurrency_provider_get_mutex_manager ags_concurrency_provider_get_main_loop ags_concurrency_provider_get_task_thread ags_concurrency_provider_get_thread_pool ags_concurrency_provider_get_worker ags_concurrency_provider_set_worker AGS_CONCURRENCY_PROVIDER AGS_CONCURRENCY_PROVIDER_GET_INTERFACE AGS_CONCURRENCY_PROVIDER_INTERFACE AGS_IS_CONCURRENCY_PROVIDER AGS_IS_CONCURRENCY_PROVIDER_INTERFACE AGS_TYPE_CONCURRENCY_PROVIDER AgsConcurrencyProvider AgsConcurrencyProviderInterface ags_concurrency_provider_get_type
ags_concurrent_tree AgsConcurrentTree ags_concurrent_tree_set_parent_locked ags_concurrent_tree_get_parent_locked ags_concurrent_tree_get_lock ags_concurrent_tree_get_parent_lock ags_concurrent_tree_lock_context ags_concurrent_tree_unlock_context AGS_CONCURRENT_TREE AGS_CONCURRENT_TREE_GET_INTERFACE AGS_CONCURRENT_TREE_INTERFACE AGS_IS_CONCURRENT_TREE AGS_IS_CONCURRENT_TREE_INTERFACE AGS_TYPE_CONCURRENT_TREE AgsConcurrentTree AgsConcurrentTreeInterface ags_concurrent_tree_get_type
ags_condition_manager AgsConditionManager ags_condition_manager_insert ags_condition_manager_remove ags_condition_manager_lookup ags_condition_manager_get_instance ags_condition_manager_new AGS_CONDITION_MANAGER AGS_CONDITION_MANAGER_CLASS AGS_CONDITION_MANAGER_GET_CLASS AGS_IS_CONDITION_MANAGER AGS_TYPE_CONDITION_MANAGER AgsConditionManager AgsConditionManagerClass ags_condition_manager_get_type
ags_config AgsConfig AGS_CONFIG_DEFAULT_VERSION AGS_CONFIG_DEFAULT_BUILD_ID AGS_CONFIG_GENERIC AGS_CONFIG_THREAD AGS_CONFIG_SOUNDCARD AGS_CONFIG_SOUNDCARD_0 AGS_CONFIG_SEQUENCER AGS_CONFIG_SEQUENCER_0 AGS_CONFIG_RECALL AgsConfigFlags ags_config_load_defaults ags_config_load_from_file ags_config_load_from_data ags_config_set_value ags_config_get_value ags_config_to_data ags_config_save ags_config_clear ags_config_get_instance ags_config_new AGS_CONFIG AGS_CONFIG_CLASS AGS_CONFIG_GET_CLASS AGS_IS_CONFIG AGS_TYPE_CONFIG AgsConfig AgsConfigClass ags_config_get_type
ags_connectable AgsConnectable ags_connectable_add_to_registry ags_connectable_remove_from_registry ags_connectable_update ags_connectable_is_ready ags_connectable_is_connected ags_connectable_connect ags_connectable_disconnect ags_connectable_connect_scope ags_connectable_disconnect_scope AGS_CONNECTABLE AGS_CONNECTABLE_GET_INTERFACE AGS_CONNECTABLE_INTERFACE AGS_IS_CONNECTABLE AGS_IS_CONNECTABLE_INTERFACE AGS_TYPE_CONNECTABLE AgsConnectable AgsConnectableInterface ags_connectable_get_type
ags_connection AgsConnection ags_connection_find_type ags_connection_find_type_and_data_object_type ags_connection_new AGS_CONNECTION AGS_CONNECTION_CLASS AGS_CONNECTION_GET_CLASS AGS_IS_CONNECTION AGS_TYPE_CONNECTION AgsConnection AgsConnectionClass ags_connection_get_type
ags_connection_manager AgsConnectionManager ags_connection_manager_get_connection ags_connection_manager_add_connection ags_connection_manager_remove_connection ags_connection_manager_get_instance ags_connection_manager_new AGS_CONNECTION_MANAGER AGS_CONNECTION_MANAGER_CLASS AGS_CONNECTION_MANAGER_GET_CLASS AGS_IS_CONNECTION_MANAGER AGS_TYPE_CONNECTION_MANAGER AgsConnectionManager AgsConnectionManagerClass ags_connection_manager_get_type
ags_controller AgsController AGS_CONTROLLER_BASE_PATH AgsControllerResource ags_controller_resource_alloc ags_controller_resource_free ags_controller_add_resource ags_controller_remove_resource ags_controller_lookup_resource ags_controller_query_security_context ags_controller_new AGS_CONTROLLER AGS_CONTROLLER_CLASS AGS_CONTROLLER_GET_CLASS AGS_IS_CONTROLLER AGS_TYPE_CONTROLLER AgsController AgsControllerClass ags_controller_get_type
ags_conversion AgsConversion ags_conversion_convert ags_conversion_new AGS_CONVERSION AGS_CONVERSION_CLASS AGS_CONVERSION_GET_CLASS AGS_IS_CONVERSION AGS_TYPE_CONVERSION AgsConversion AgsConversionClass ags_conversion_get_type
ags_countable AgsCountable ags_countable_get_notation_counter ags_countable_get_sequencer_counter AGS_COUNTABLE AGS_COUNTABLE_GET_INTERFACE AGS_COUNTABLE_INTERFACE AGS_IS_COUNTABLE AGS_IS_COUNTABLE_INTERFACE AGS_TYPE_COUNTABLE AgsCountable AgsCountableInterface ags_countable_get_type
ags_destroy_util ags_destroy_util_dispose_and_unref
ags_destroy_worker AgsDestroyWorker AGS_DESTROY_ENTRY AgsDestroyFunc AgsDestroyEntry ags_destroy_entry_alloc ags_destroy_worker_add ags_destroy_worker_new AGS_DESTROY_WORKER AGS_DESTROY_WORKER_CLASS AGS_DESTROY_WORKER_GET_CLASS AGS_IS_DESTROY_WORKER AGS_TYPE_DESTROY_WORKER AgsDestroyWorker AgsDestroyWorkerClass ags_destroy_worker_get_type
ags_distributed_manager AgsDistributedManager ags_distributed_manager_set_url ags_distributed_manager_get_url ags_distributed_manager_set_ports ags_distributed_manager_get_ports ags_distributed_manager_set_soundcard ags_distributed_manager_get_soundcard ags_distributed_manager_set_sequencer ags_distributed_manager_get_sequencer ags_distributed_manager_register_soundcard ags_distributed_manager_unregister_soundcard ags_distributed_manager_register_sequencer ags_distributed_manager_unregister_sequencer AGS_DISTRIBUTED_MANAGER AGS_DISTRIBUTED_MANAGER_GET_INTERFACE AGS_DISTRIBUTED_MANAGER_INTERFACE AGS_IS_DISTRIBUTED_MANAGER AGS_IS_DISTRIBUTED_MANAGER_INTERFACE AGS_TYPE_DISTRIBUTED_MANAGER AgsDistributedManager AgsDistributedManagerInterface ags_distributed_manager_get_type
ags_dynamic_connectable AgsDynamicConnectable ags_dynamic_connectable_connect_dynamic ags_dynamic_connectable_disconnect_dynamic AGS_DYNAMIC_CONNECTABLE AGS_DYNAMIC_CONNECTABLE_GET_INTERFACE AGS_DYNAMIC_CONNECTABLE_INTERFACE AGS_IS_DYNAMIC_CONNECTABLE AGS_IS_DYNAMIC_CONNECTABLE_INTERFACE AGS_TYPE_DYNAMIC_CONNECTABLE AgsDynamicConnectable AgsDynamicConnectableInterface ags_dynamic_connectable_get_type
ags_endian ags_endian_swap_float
ags_file AgsFile AGS_FILE_DEFAULT_ENCODING AGS_FILE_DEFAULT_DTD AGS_FILE_CHECKSUM_LENGTH AGS_FILE_DEFAULT_AUDIO_FORMAT AGS_FILE_DEFAULT_AUDIO_ENCODING AgsFileFlags AGS_FILE_ERROR AgsFileError ags_file_str2md5 ags_file_add_id_ref ags_file_find_id_ref_by_node ags_file_find_id_ref_by_xpath ags_file_find_id_ref_by_reference ags_file_add_lookup ags_file_add_launch ags_file_open ags_file_open_from_data ags_file_rw_open ags_file_open_filename ags_file_close ags_file_write ags_file_write_concurrent ags_file_write_resolve ags_file_read ags_file_read_resolve ags_file_read_start ags_file_read_config ags_file_write_config ags_file_read_application_context ags_file_write_application_context ags_file_new AGS_FILE AGS_FILE_CLASS AGS_FILE_GET_CLASS AGS_IS_FILE AGS_TYPE_FILE AgsFile AgsFileClass ags_file_get_type
ags_file_id_ref AgsFileIdRef AGS_FILE_RESOLVE AGS_FILE_ID_REF_SERIALIZE_DATA AGS_FILE_ID_REF_RESOLVE_DATA AgsFileResolve ags_file_id_ref_resolved ags_file_id_ref_new AGS_FILE_ID_REF AGS_FILE_ID_REF_CLASS AGS_FILE_ID_REF_GET_CLASS AGS_IS_FILE_ID_REF AGS_TYPE_FILE_ID_REF AgsFileIdRef AgsFileIdRefClass ags_file_id_ref_get_type
ags_file_launch AgsFileLaunch ags_file_launch_start ags_file_launch_new AGS_FILE_LAUNCH AGS_FILE_LAUNCH_CLASS AGS_FILE_LAUNCH_GET_CLASS AGS_IS_FILE_LAUNCH AGS_TYPE_FILE_LAUNCH AgsFileLaunch AgsFileLaunchClass ags_file_launch_get_type
ags_file_link AgsFileLink AGS_FILE_LINK_DEFAULT_VERSION AGS_FILE_LINK_DEFAULT_BUILD_ID ags_file_link_new AGS_FILE_LINK AGS_FILE_LINK_CLASS AGS_FILE_LINK_GET_CLASS AGS_IS_FILE_LINK AGS_TYPE_FILE_LINK AgsFileLink AgsFileLinkClass ags_file_link_get_type
ags_file_lookup AgsFileLookup ags_file_lookup_find_by_node ags_file_lookup_find_by_reference ags_file_lookup_resolve ags_file_lookup_new AGS_FILE_LOOKUP AGS_FILE_LOOKUP_CLASS AGS_FILE_LOOKUP_GET_CLASS AGS_IS_FILE_LOOKUP AGS_TYPE_FILE_LOOKUP AgsFileLookup AgsFileLookupClass ags_file_lookup_get_type
ags_file_stock AGS_FILE_DEFAULT_VERSION AGS_FILE_EFFECTS_DEFAULT_VERSION AGS_CLIPBOARD_DEFAULT_VERSION AGS_FILE_FALSE AGS_FILE_TRUE AGS_FILE_BOOLEAN_PROP AGS_FILE_CHAR_PROP AGS_FILE_INT64_PROP AGS_FILE_UINT64_PROP AGS_FILE_FLOAT_PROP AGS_FILE_DOUBLE_PROP AGS_FILE_POINTER_PROP AGS_FILE_OBJECT_PROP AGS_FILE_BOOLEAN_POINTER_PROP AGS_FILE_CHAR_POINTER_PROP AGS_FILE_INT64_POINTER_PROP AGS_FILE_UINT64_POINTER_PROP AGS_FILE_FLOAT_POINTER_PROP AGS_FILE_DOUBLE_POINTER_PROP AGS_FILE_ID_PROP AGS_FILE_NAME_PROP AGS_FILE_TYPE_PROP AGS_FILE_SCOPE_PROP AGS_FILE_VERSION_PROP AGS_FILE_BUILD_ID_PROP AGS_FILE_XPATH_PROP AGS_FILE_FLAGS_PROP AGS_FILE_CONTEXT_PROP
ags_file_util ags_file_util_read_value ags_file_util_write_value ags_file_util_read_parameter ags_file_util_write_parameter ags_file_util_read_dependency ags_file_util_write_dependency ags_file_util_read_object ags_file_util_write_object ags_file_util_read_history ags_file_util_write_history ags_file_read_file_link ags_file_write_file_link ags_file_read_file_link_list ags_file_write_file_link_list
ags_front_controller AgsFrontController ags_front_controller_authenticate ags_front_controller_do_request ags_front_controller_new AGS_FRONT_CONTROLLER AGS_FRONT_CONTROLLER_CLASS AGS_FRONT_CONTROLLER_GET_CLASS AGS_IS_FRONT_CONTROLLER AGS_TYPE_FRONT_CONTROLLER AgsFrontController AgsFrontControllerClass ags_front_controller_get_type
ags_function AgsFunction AGS_SYMBOLIC_EULER AGS_SYMBOLIC_PI AGS_SYMBOLIC_INFINIT AGS_SYMBOLIC_COMPLEX_UNIT AgsFunctionFlags AgsSolverMatrix AgsSolverVector ags_function_collapse_parantheses ags_function_find_literals ags_function_literal_solve ags_function_push_equation ags_function_pop_equation ags_function_get_expanded ags_funciton_get_normalized ags_function_compute_term ags_function_symbolic_translate_value ags_function_substitute_values ags_function_translate_value ags_function_new AGS_FUNCTION AGS_FUNCTION_CLASS AGS_FUNCTION_GET_CLASS AGS_IS_FUNCTION AGS_TYPE_FUNCTION AgsFunction AgsFunctionClass ags_function_get_type
ags_generic_main_loop AgsGenericMainLoop AGS_GENERIC_MAIN_LOOP_DEFAULT_JIFFIE ags_generic_main_loop_new AGS_GENERIC_MAIN_LOOP AGS_GENERIC_MAIN_LOOP_CLASS AGS_GENERIC_MAIN_LOOP_GET_CLASS AGS_IS_GENERIC_MAIN_LOOP AGS_TYPE_GENERIC_MAIN_LOOP AgsGenericMainLoop AgsGenericMainLoopClass ags_generic_main_loop_get_type
ags_history AgsHistory ags_history_new AgsHistoryAppend AGS_HISTORY AGS_HISTORY_CLASS AGS_HISTORY_GET_CLASS AGS_IS_HISTORY AGS_TYPE_HISTORY AgsHistory AgsHistoryClass ags_history_get_type
ags_id_generator ags_id_generator_create_uuid
ags_list_util ags_list_util_find_type ags_list_util_copy_and_ref
ags_local_factory_controller AgsLocalFactoryController AGS_LOCAL_FACTORY_CONTROLLER_CONTEXT_PATH AGS_LOCAL_FACTORY_CONTROLLER_RESOURCE_CREATE_INSTANCE ags_local_factory_controller_create_instance ags_local_factory_controller_new AGS_IS_LOCAL_FACTORY_CONTROLLER AGS_LOCAL_FACTORY_CONTROLLER AGS_LOCAL_FACTORY_CONTROLLER_CLASS AGS_LOCAL_FACTORY_CONTROLLER_GET_CLASS AGS_TYPE_LOCAL_FACTORY_CONTROLLER AgsLocalFactoryController AgsLocalFactoryControllerClass ags_local_factory_controller_get_type
ags_local_registry_controller AgsLocalRegistryController AGS_LOCAL_REGISTRY_CONTROLLER_CONTEXT_PATH ags_local_registry_controller_entry_bulk ags_local_registry_controller_new AGS_IS_LOCAL_REGISTRY_CONTROLLER AGS_LOCAL_REGISTRY_CONTROLLER AGS_LOCAL_REGISTRY_CONTROLLER_CLASS AGS_LOCAL_REGISTRY_CONTROLLER_GET_CLASS AGS_TYPE_LOCAL_REGISTRY_CONTROLLER AgsLocalRegistryController AgsLocalRegistryControllerClass ags_local_registry_controller_get_type
ags_local_serialization_controller AgsLocalSerializationController AGS_LOCAL_SERIALIZATION_CONTROLLER_CONTEXT_PATH ags_local_serialization_controller_send_object ags_local_serialization_controller_send_object_property ags_local_serialization_controller_receive_object ags_local_serialization_controller_receive_object_property ags_local_serialization_controller_new AGS_IS_LOCAL_SERIALIZATION_CONTROLLER AGS_LOCAL_SERIALIZATION_CONTROLLER AGS_LOCAL_SERIALIZATION_CONTROLLER_CLASS AGS_LOCAL_SERIALIZATION_CONTROLLER_GET_CLASS AGS_TYPE_LOCAL_SERIALIZATION_CONTROLLER AgsLocalSerializationController AgsLocalSerializationControllerClass ags_local_serialization_controller_get_type
ags_local_task_controller AgsLocalTaskController AGS_LOCAL_TASK_CONTROLLER_CONTEXT_PATH ags_local_task_controller_launch ags_local_task_controller_launch_timed ags_local_task_controller_new AGS_IS_LOCAL_TASK_CONTROLLER AGS_LOCAL_TASK_CONTROLLER AGS_LOCAL_TASK_CONTROLLER_CLASS AGS_LOCAL_TASK_CONTROLLER_GET_CLASS AGS_TYPE_LOCAL_TASK_CONTROLLER AgsLocalTaskController AgsLocalTaskControllerClass ags_local_task_controller_get_type
ags_log AgsLog ags_log_add_message ags_log_get_messages ags_log_get_instance ags_log_new AGS_IS_LOG AGS_LOG AGS_LOG_CLASS AGS_LOG_GET_CLASS AGS_TYPE_LOG AgsLog AgsLogClass ags_log_get_type
ags_macros AGS_DECLARE_INTERFACE
ags_main_loop AgsMainLoop ags_main_loop_get_tree_lock ags_main_loop_set_application_context ags_main_loop_get_application_context ags_main_loop_set_async_queue ags_main_loop_get_async_queue ags_main_loop_set_tic ags_main_loop_get_tic ags_main_loop_set_last_sync ags_main_loop_get_last_sync ags_main_loop_interrupt ags_main_loop_monitor ags_main_loop_change_frequency AGS_IS_MAIN_LOOP AGS_IS_MAIN_LOOP_INTERFACE AGS_MAIN_LOOP AGS_MAIN_LOOP_GET_INTERFACE AGS_MAIN_LOOP_INTERFACE AGS_TYPE_MAIN_LOOP AgsMainLoop AgsMainLoopInterface ags_main_loop_get_type
ags_marshal g_cclosure_user_marshal_VOID__BOOLEAN_POINTER g_cclosure_user_marshal_VOID__INT_UINT_POINTER g_cclosure_user_marshal_VOID__UINT_BOOLEAN g_cclosure_user_marshal_VOID__UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_BOOLEAN g_cclosure_user_marshal_VOID__UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT g_cclosure_user_marshal_VOID__UINT_INT g_cclosure_user_marshal_VOID__UINT_DOUBLE g_cclosure_user_marshal_VOID__UINT_STRING_UINT g_cclosure_user_marshal_VOID__UINT_POINTER_UINT g_cclosure_user_marshal_VOID__ULONG_UINT g_cclosure_user_marshal_VOID__ULONG_UINT_BOOLEAN g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE g_cclosure_user_marshal_VOID__ULONG_UINT_UINT g_cclosure_user_marshal_VOID__STRING_UINT g_cclosure_user_marshal_VOID__STRING_UINT_DOUBLE g_cclosure_user_marshal_VOID__STRING_UINT_POINTER g_cclosure_user_marshal_VOID__STRING_UINT_STRING_DOUBLE g_cclosure_user_marshal_VOID__STRING_POINTER g_cclosure_user_marshal_VOID__STRING_STRING_STRING g_cclosure_user_marshal_VOID__POINTER_UINT g_cclosure_user_marshal_VOID__POINTER_UINT_UINT g_cclosure_user_marshal_VOID__POINTER_UINT_POINTER g_cclosure_user_marshal_VOID__POINTER_POINTER_UINT g_cclosure_user_marshal_VOID__POINTER_POINTER_POINTER g_cclosure_user_marshal_VOID__OBJECT_UINT g_cclosure_user_marshal_VOID__OBJECT_OBJECT g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_INT_BOOLEAN g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_UINT_INT_BOOLEAN g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT g_cclosure_user_marshal_ULONG__VOID g_cclosure_user_marshal_INT__VOID g_cclosure_user_marshal_UINT__VOID g_cclosure_user_marshal_BOOLEAN__UINT_POINTER g_cclosure_user_marshal_BOOLEAN__OBJECT_OBJECT g_cclosure_user_marshal_UINT__INT_UINT_POINTER g_cclosure_user_marshal_DOUBLE__DOUBLE_BOOLEAN g_cclosure_user_marshal_STRING__STRING_STRING g_cclosure_user_marshal_STRING__ULONG_STRING_STRING_STRING_STRING_UINT_POINTER g_cclosure_user_marshal_POINTER__VOID g_cclosure_user_marshal_POINTER__UINT g_cclosure_user_marshal_POINTER__POINTER_UINT g_cclosure_user_marshal_POINTER__STRING_STRING g_cclosure_user_marshal_POINTER__STRING_STRING_STRING g_cclosure_user_marshal_POINTER__STRING_STRING_STRING_STRING g_cclosure_user_marshal_POINTER__ULONG_POINTER_UINT g_cclosure_user_marshal_POINTER__OBJECT g_cclosure_user_marshal_POINTER__OBJECT_OBJECT g_cclosure_user_marshal_POINTER__OBJECT_STRING_STRING_STRING_POINTER g_cclosure_user_marshal_POINTER__OBJECT_STRING_STRING_STRING_STRING_POINTER g_cclosure_user_marshal_POINTER__POINTER_STRING_STRING g_cclosure_user_marshal_OBJECT__VOID g_cclosure_user_marshal_OBJECT__OBJECT g_cclosure_user_marshal_OBJECT__STRING_STRING_STRING g_cclosure_user_marshal_OBJECT__OBJECT_POINTER_POINTER g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT
ags_message_delivery AgsMessageDelivery ags_message_delivery_add_queue ags_message_delivery_remove_queue ags_message_delivery_find_namespace ags_message_delivery_add_message ags_message_delivery_remove_message ags_message_delivery_find_sender ags_message_delivery_find_recipient ags_message_delivery_query_message ags_message_delivery_get_instance ags_message_delivery_new AGS_IS_MESSAGE_DELIVERY AGS_MESSAGE_DELIVERY AGS_MESSAGE_DELIVERY_CLASS AGS_MESSAGE_DELIVERY_GET_CLASS AGS_TYPE_MESSAGE_DELIVERY AgsMessageDelivery AgsMessageDeliveryClass ags_message_delivery_get_type
ags_message_queue AgsMessageQueue AGS_MESSAGE_ENVELOPE AgsMessageEnvelope ags_message_envelope_alloc ags_message_envelope_free ags_message_queue_add_message ags_message_queue_remove_message ags_message_queue_find_sender ags_message_queue_find_recipient ags_message_queue_query_message ags_message_queue_new AGS_IS_MESSAGE_QUEUE AGS_MESSAGE_QUEUE AGS_MESSAGE_QUEUE_CLASS AGS_MESSAGE_QUEUE_GET_CLASS AGS_TYPE_MESSAGE_QUEUE AgsMessageQueue AgsMessageQueueClass ags_message_queue_get_type
ags_mutable AgsMutable ags_mutable_set_muted AGS_IS_MUTABLE AGS_IS_MUTABLE_INTERFACE AGS_MUTABLE AGS_MUTABLE_GET_INTERFACE AGS_MUTABLE_INTERFACE AGS_TYPE_MUTABLE AgsMutable AgsMutableInterface ags_mutable_get_type
ags_mutex_manager AgsMutexManager ags_mutex_manager_get_application_mutex ags_mutex_manager_insert ags_mutex_manager_remove ags_mutex_manager_lookup ags_mutex_manager_get_instance ags_mutex_manager_new AGS_IS_MUTEX_MANAGER AGS_MUTEX_MANAGER AGS_MUTEX_MANAGER_CLASS AGS_MUTEX_MANAGER_GET_CLASS AGS_TYPE_MUTEX_MANAGER AgsMutexManager AgsMutexManagerClass ags_mutex_manager_get_type
ags_packable AgsPackable ags_packable_pack ags_packable_unpack AGS_IS_PACKABLE AGS_IS_PACKABLE_INTERFACE AGS_PACKABLE AGS_PACKABLE_GET_INTERFACE AGS_PACKABLE_INTERFACE AGS_TYPE_PACKABLE AgsPackable AgsPackableInterface ags_packable_get_type
ags_parameter ags_parameter_grow ags_parameter_find
ags_password_store AgsPasswordStore ags_password_store_set_login_name ags_password_store_get_login_name ags_password_store_set_password ags_password_store_get_password ags_password_store_encrypt_password AGS_IS_PASSWORD_STORE AGS_IS_PASSWORD_STORE_INTERFACE AGS_PASSWORD_STORE AGS_PASSWORD_STORE_GET_INTERFACE AGS_PASSWORD_STORE_INTERFACE AGS_TYPE_PASSWORD_STORE AgsPasswordStore AgsPasswordStoreInterface ags_password_store_get_type
ags_password_store_manager AgsPasswordStoreManager ags_password_store_manager_get_password_store ags_password_store_manager_add_password_store ags_password_store_manager_remove_password_store ags_password_store_manager_check_password ags_password_store_manager_get_instance ags_password_store_manager_new AGS_IS_PASSWORD_STORE_MANAGER AGS_PASSWORD_STORE_MANAGER AGS_PASSWORD_STORE_MANAGER_CLASS AGS_PASSWORD_STORE_MANAGER_GET_CLASS AGS_TYPE_PASSWORD_STORE_MANAGER AgsPasswordStoreManager AgsPasswordStoreManagerClass ags_password_store_manager_get_type
ags_plugin AgsPlugin ags_plugin_get_name ags_plugin_set_name ags_plugin_get_version ags_plugin_set_version ags_plugin_get_build_id ags_plugin_set_build_id ags_plugin_get_xml_type ags_plugin_set_xml_type ags_plugin_get_ports ags_plugin_set_ports ags_plugin_read ags_plugin_write AGS_IS_PLUGIN AGS_IS_PLUGIN_INTERFACE AGS_PLUGIN AGS_PLUGIN_GET_INTERFACE AGS_PLUGIN_INTERFACE AGS_TYPE_PLUGIN AgsPlugin AgsPluginInterface ags_plugin_get_type
ags_poll_fd AgsPollFd AgsPollFdFlags ags_poll_fd_dispatch ags_poll_fd_new AGS_IS_POLL_FD AGS_POLL_FD AGS_POLL_FD_CLASS AGS_POLL_FD_GET_CLASS AGS_TYPE_POLL_FD AgsPollFd AgsPollFdClass ags_poll_fd_get_type
ags_polling_thread AgsPollingThread AGS_POLLING_THREAD_RT_PRIORITY AGS_POLLING_THREAD_DEFAULT_JIFFIE AGS_POLLING_THREAD_UNDERLOAD AgsPollingThreadFlags ags_polling_thread_fd_position ags_polling_thread_add_poll_fd ags_polling_thread_remove_poll_fd ags_polling_thread_new AGS_IS_POLLING_THREAD AGS_POLLING_THREAD AGS_POLLING_THREAD_CLASS AGS_POLLING_THREAD_GET_CLASS AGS_TYPE_POLLING_THREAD AgsPollingThread AgsPollingThreadClass ags_polling_thread_get_type
ags_portlet AgsPortlet ags_portlet_get_port ags_portlet_set_port ags_portlet_list_safe_properties ags_portlet_safe_get_property ags_portlet_safe_set_property AGS_IS_PORTLET AGS_IS_PORTLET_INTERFACE AGS_PORTLET AGS_PORTLET_GET_INTERFACE AGS_PORTLET_INTERFACE AGS_TYPE_PORTLET AgsPortlet AgsPortletInterface ags_portlet_get_type
ags_regex ags_regcomp ags_regexec
ags_registry AgsRegistry AGS_REGISTRY_DEFAULT_ID_LENGTH AgsRegistryFlags AgsRegistryEntry ags_registry_entry_alloc ags_registry_entry_free ags_registry_add_entry ags_registry_find_entry ags_registry_new AGS_IS_REGISTRY AGS_REGISTRY AGS_REGISTRY_CLASS AGS_REGISTRY_GET_CLASS AGS_TYPE_REGISTRY AgsRegistry AgsRegistryClass ags_registry_get_type
ags_remote_task AgsRemoteTask ags_remote_task_launch ags_remote_task_launch_timed ags_remote_task_new AGS_IS_REMOTE_TASK AGS_REMOTE_TASK AGS_REMOTE_TASK_CLASS AGS_REMOTE_TASK_GET_CLASS AGS_TYPE_REMOTE_TASK AgsRemoteTask AgsRemoteTaskClass ags_remote_task_get_type
ags_remote_task_thread AgsRemoteTaskThread AGS_REMOTE_TASK_THREAD_RT_PRIORITY AGS_REMOTE_TASK_THREAD_DEFAULT_JIFFIE ags_remote_task_thread_new AGS_IS_REMOTE_TASK_THREAD AGS_REMOTE_TASK_THREAD AGS_REMOTE_TASK_THREAD_CLASS AGS_REMOTE_TASK_THREAD_GET_CLASS AGS_TYPE_REMOTE_TASK_THREAD AgsRemoteTaskThread AgsRemoteTaskThreadClass ags_remote_task_thread_get_type
ags_returnable_thread AgsReturnableThread AGS_RETURNABLE_THREAD_DEFAULT_JIFFIE AgsReturnableThreadCallback AgsReturnableThreadFlags ags_returnable_thread_safe_run ags_returnable_thread_connect_safe_run ags_returnable_thread_disconnect_safe_run ags_returnable_thread_new AGS_IS_RETURNABLE_THREAD AGS_RETURNABLE_THREAD AGS_RETURNABLE_THREAD_CLASS AGS_RETURNABLE_THREAD_GET_CLASS AGS_TYPE_RETURNABLE_THREAD AgsReturnableThread AgsReturnableThreadClass ags_returnable_thread_get_type
ags_security_context AgsSecurityContext AgsSecurityContextMode ags_security_context_add_server_context ags_security_context_remove_server_context ags_security_context_new AGS_IS_SECURITY_CONTEXT AGS_SECURITY_CONTEXT AGS_SECURITY_CONTEXT_CLASS AGS_SECURITY_CONTEXT_GET_CLASS AGS_TYPE_SECURITY_CONTEXT AgsSecurityContext AgsSecurityContextClass ags_security_context_get_type
ags_seekable AgsSeekable ags_seekable_seek AGS_IS_SEEKABLE AGS_IS_SEEKABLE_INTERFACE AGS_SEEKABLE AGS_SEEKABLE_GET_INTERFACE AGS_SEEKABLE_INTERFACE AGS_TYPE_SEEKABLE AgsSeekable AgsSeekableInterface ags_seekable_get_type
ags_sequencer AgsSequencer AGS_SEQUENCER_DEFAULT_SAMPLERATE AGS_SEQUENCER_DEFAULT_BUFFER_SIZE AGS_SEQUENCER_DEFAULT_DEVICE AGS_SEQUENCER_DEFAULT_BPM AGS_SEQUENCER_DEFAULT_DELAY_FACTOR AGS_SEQUENCER_DEFAULT_JIFFIE AGS_SEQUENCER_DEFAULT_TACT AGS_SEQUENCER_DEFAULT_TACT_JIFFIE AGS_SEQUENCER_DEFAULT_TACTRATE AGS_SEQUENCER_DEFAULT_SCALE AGS_SEQUENCER_DEFAULT_DELAY AGS_SEQUENCER_DEFAULT_PERIOD AGS_SEQUENCER_DEFAULT_LATENCY ags_sequencer_set_application_context ags_sequencer_get_application_context ags_sequencer_set_application_mutex ags_sequencer_get_application_mutex ags_sequencer_set_device ags_sequencer_get_device ags_sequencer_list_cards ags_sequencer_is_starting ags_sequencer_is_playing ags_sequencer_is_recording ags_sequencer_play_init ags_sequencer_play ags_sequencer_record_init ags_sequencer_record ags_sequencer_stop ags_sequencer_tic ags_sequencer_offset_changed ags_sequencer_get_buffer ags_sequencer_get_next_buffer ags_sequencer_set_bpm ags_sequencer_get_bpm ags_sequencer_set_delay_factor ags_sequencer_get_delay_factor ags_sequencer_set_note_offset ags_sequencer_get_note_offset ags_sequencer_set_audio ags_sequencer_get_audio AGS_IS_SEQUENCER AGS_IS_SEQUENCER_INTERFACE AGS_SEQUENCER AGS_SEQUENCER_GET_INTERFACE AGS_SEQUENCER_INTERFACE AGS_TYPE_SEQUENCER AgsSequencer AgsSequencerInterface ags_sequencer_get_type
ags_server AgsServer AGS_SERVER_DEFAULT_AUTH_MODULE AgsServerFlags AgsServerInfo ags_server_info_alloc ags_server_start ags_server_lookup ags_server_new AGS_IS_SERVER AGS_SERVER AGS_SERVER_CLASS AGS_SERVER_GET_CLASS AGS_TYPE_SERVER AgsServer AgsServerClass ags_server_get_type
ags_server_application_context AgsServerApplicationContext AGS_SERVER_BUILD_ID AGS_SERVER_DEFAULT_VERSION AgsServerApplicationContextFlags ags_server_application_context_new AGS_IS_SERVER_APPLICATION_CONTEXT AGS_SERVER_APPLICATION_CONTEXT AGS_SERVER_APPLICATION_CONTEXT_CLASS AGS_SERVER_APPLICATION_CONTEXT_GET_CLASS AGS_TYPE_SERVER_APPLICATION_CONTEXT AgsServerApplicationContext AgsServerApplicationContextClass ags_server_application_context_get_type
ags_server_status AgsServerStatus AgsServerStatusFlags ags_server_status_new AGS_IS_SERVER_STATUS AGS_SERVER_STATUS AGS_SERVER_STATUS_CLASS AGS_SERVER_STATUS_GET_CLASS AGS_TYPE_SERVER_STATUS AgsServerStatus AgsServerStatusClass ags_server_status_get_type
ags_service_provider AgsServiceProvider ags_service_provider_is_operating ags_service_provider_server_status ags_service_provider_get_env ags_service_provider_set_registry ags_service_provider_get_registry ags_service_provider_set_server ags_service_provider_get_server ags_service_provider_set_certificate_manager ags_service_provider_get_certificate_manager ags_service_provider_set_password_store_manager ags_service_provider_get_password_store_manager ags_service_provider_set_authentication_manager ags_service_provider_get_authentication_manager AGS_IS_SERVICE_PROVIDER AGS_IS_SERVICE_PROVIDER_INTERFACE AGS_SERVICE_PROVIDER AGS_SERVICE_PROVIDER_GET_INTERFACE AGS_SERVICE_PROVIDER_INTERFACE AGS_TYPE_SERVICE_PROVIDER AgsServiceProvider AgsServiceProviderInterface ags_service_provider_get_type
ags_single_thread AgsSingleThread AGS_SINGLE_THREAD_DEFAULT_JIFFIE ags_single_thread_new AGS_IS_SINGLE_THREAD AGS_SINGLE_THREAD AGS_SINGLE_THREAD_CLASS AGS_SINGLE_THREAD_GET_CLASS AGS_TYPE_SINGLE_THREAD AgsSingleThread AgsSingleThreadClass ags_single_thread_get_type
ags_soundcard AgsSoundcard AGS_SOUNDCARD_DEFAULT_DSP_CHANNELS AGS_SOUNDCARD_DEFAULT_PCM_CHANNELS AGS_SOUNDCARD_DEFAULT_SAMPLERATE AGS_SOUNDCARD_DEFAULT_FORMAT AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE AGS_SOUNDCARD_DEFAULT_BPM AGS_SOUNDCARD_DEFAULT_DELAY_FACTOR AGS_SOUNDCARD_DEFAULT_JIFFIE AGS_SOUNDCARD_DEFAULT_TACT AGS_SOUNDCARD_DEFAULT_TACT_JIFFIE AGS_SOUNDCARD_DEFAULT_TACTRATE AGS_SOUNDCARD_DEFAULT_SCALE AGS_SOUNDCARD_DEFAULT_DELAY AGS_SOUNDCARD_DEFAULT_PERIOD AGS_SOUNDCARD_DEFAULT_LOOP_LEFT AGS_SOUNDCARD_DEFAULT_LOOP_RIGHT AGS_SOUNDCARD_DEFAULT_OVERCLOCK AgsSoundcardFormat ags_soundcard_set_application_context ags_soundcard_get_application_context ags_soundcard_set_application_mutex ags_soundcard_get_application_mutex ags_soundcard_set_device ags_soundcard_get_device ags_soundcard_set_presets ags_soundcard_get_presets ags_soundcard_list_cards ags_soundcard_pcm_info ags_soundcard_get_poll_fd ags_soundcard_is_available ags_soundcard_is_starting ags_soundcard_is_playing ags_soundcard_is_recording ags_soundcard_get_uptime ags_soundcard_play_init ags_soundcard_play ags_soundcard_record_init ags_soundcard_record ags_soundcard_stop ags_soundcard_tic ags_soundcard_offset_changed ags_soundcard_get_buffer ags_soundcard_get_next_buffer ags_soundcard_get_prev_buffer ags_soundcard_set_bpm ags_soundcard_get_bpm ags_soundcard_set_delay_factor ags_soundcard_get_delay_factor ags_soundcard_get_absolute_delay ags_soundcard_get_delay ags_soundcard_get_attack ags_soundcard_get_delay_counter ags_soundcard_set_note_offset ags_soundcard_get_note_offset ags_soundcard_set_note_offset_absolute ags_soundcard_get_note_offset_absolute ags_soundcard_set_loop ags_soundcard_get_loop ags_soundcard_get_loop_offset ags_soundcard_set_audio ags_soundcard_get_audio AGS_IS_SOUNDCARD AGS_IS_SOUNDCARD_INTERFACE AGS_SOUNDCARD AGS_SOUNDCARD_GET_INTERFACE AGS_SOUNDCARD_INTERFACE AGS_TYPE_SOUNDCARD AgsSoundcard AgsSoundcardInterface ags_soundcard_get_type
ags_string_util ags_string_util_escape_single_quote ags_strv_length ags_strv_contains
ags_tactable AgsTactable ags_tactable_get_sequencer_duration ags_tactable_get_notation_duration ags_tactable_get_tact ags_tactable_get_bpm ags_tactable_change_sequencer_duration ags_tactable_change_notation_duration ags_tactable_change_tact ags_tactable_change_bpm AGS_IS_TACTABLE AGS_IS_TACTABLE_INTERFACE AGS_TACTABLE AGS_TACTABLE_GET_INTERFACE AGS_TACTABLE_INTERFACE AGS_TYPE_TACTABLE AgsTactable AgsTactableInterface ags_tactable_get_type
ags_task AgsTask AgsTaskFlags ags_task_launch ags_task_failure ags_task_new AGS_IS_TASK AGS_TASK AGS_TASK_CLASS AGS_TASK_GET_CLASS AGS_TYPE_TASK AgsTask AgsTaskClass ags_task_get_type
ags_task_completion AgsTaskCompletion AgsTaskCompletionFlags ags_task_completion_complete ags_task_completion_new AGS_IS_TASK_COMPLETION AGS_TASK_COMPLETION AGS_TASK_COMPLETION_CLASS AGS_TASK_COMPLETION_GET_CLASS AGS_TYPE_TASK_COMPLETION AgsTaskCompletion AgsTaskCompletionClass ags_task_completion_get_type
ags_task_thread AgsTaskThread AGS_TASK_THREAD_RT_PRIORITY AGS_TASK_THREAD_DEFAULT_JIFFIE AgsTaskThreadFlags AgsTaskThreadAppend ags_task_thread_append_task ags_task_thread_append_tasks ags_task_thread_append_cyclic_task ags_task_thread_remove_cyclic_task ags_task_thread_clear_cache ags_task_thread_new AGS_IS_TASK_THREAD AGS_TASK_THREAD AGS_TASK_THREAD_CLASS AGS_TASK_THREAD_GET_CLASS AGS_TYPE_TASK_THREAD AgsTaskThread AgsTaskThreadClass ags_task_thread_get_type
ags_thread-posix AgsThread AGS_THREAD_RESUME_SIG AGS_THREAD_SUSPEND_SIG AGS_RT_PRIORITY AGS_THREAD_HERTZ_JIFFIE AGS_THREAD_YIELD_JIFFIE AGS_THREAD_DEFAULT_JIFFIE AGS_THREAD_DEFAULT_MAX_PRECISION AGS_THREAD_MAX_PRECISION AGS_THREAD_DEFAULT_ATTACK AGS_THREAD_TOLERANCE AgsThreadFlags AgsThreadSyncFlags ags_thread_resume_handler ags_thread_suspend_handler ags_thread_set_sync ags_thread_set_sync_all ags_thread_reset_all ags_thread_lock ags_thread_trylock ags_thread_unlock ags_thread_get_toplevel ags_thread_first ags_thread_last ags_thread_remove_child ags_thread_add_child ags_thread_add_child_extended ags_thread_parental_is_locked ags_thread_sibling_is_locked ags_thread_children_is_locked ags_thread_is_current_ready ags_thread_is_tree_ready ags_thread_next_parent_locked ags_thread_next_sibling_locked ags_thread_next_children_locked ags_thread_lock_parent ags_thread_lock_sibling ags_thread_lock_children ags_thread_lock_all ags_thread_unlock_parent ags_thread_unlock_sibling ags_thread_unlock_children ags_thread_unlock_all ags_thread_wait_parent ags_thread_wait_sibling ags_thread_wait_children ags_thread_signal_parent ags_thread_signal_sibling ags_thread_signal_children ags_thread_clock ags_thread_add_start_queue ags_thread_add_start_queue_all ags_thread_start ags_thread_run ags_thread_suspend ags_thread_resume ags_thread_timelock ags_thread_stop ags_thread_interrupted ags_thread_hangcheck ags_thread_find_type ags_thread_self ags_thread_chaos_tree ags_thread_is_chaos_tree ags_thread_new AGS_IS_THREAD AGS_THREAD AGS_THREAD_CLASS AGS_THREAD_GET_CLASS AGS_TYPE_THREAD AgsThread AgsThreadClass ags_thread_get_type
ags_thread_application_context AgsThreadApplicationContext AGS_THREAD_DEFAULT_VERSION AGS_THREAD_BUILD_ID AgsThreadApplicationContextFlags ags_thread_application_context_register_types ags_thread_application_context_new AGS_IS_THREAD_APPLICATION_CONTEXT AGS_THREAD_APPLICATION_CONTEXT AGS_THREAD_APPLICATION_CONTEXT_CLASS AGS_THREAD_APPLICATION_CONTEXT_GET_CLASS AGS_TYPE_THREAD_APPLICATION_CONTEXT AgsThreadApplicationContext AgsThreadApplicationContextClass ags_thread_application_context_get_type
ags_thread_file_xml ags_file_read_thread ags_file_write_thread ags_file_read_thread_list ags_file_write_thread_list ags_file_read_thread_pool ags_file_write_thread_pool ags_file_read_timestamp ags_file_write_timestamp ags_file_read_timestamp_list ags_file_write_timestamp_list
ags_thread_pool AgsThreadPool AGS_THREAD_POOL_RT_PRIORITY AgsThreadPoolFlags ags_thread_pool_pull ags_thread_pool_start ags_thread_pool_new AGS_IS_THREAD_POOL AGS_THREAD_POOL AGS_THREAD_POOL_CLASS AGS_THREAD_POOL_GET_CLASS AGS_TYPE_THREAD_POOL AgsThreadPool AgsThreadPoolClass ags_thread_pool_get_type
ags_thread_xml_serialization_factory AgsThreadXmlSerializationFactory ags_thread_xml_serialization_factory_create ags_thread_xml_serialization_factory_get_instance ags_thread_xml_serialization_factory_new AGS_IS_THREAD_XML_SERIALIZATION_FACTORY AGS_THREAD_XML_SERIALIZATION_FACTORY AGS_THREAD_XML_SERIALIZATION_FACTORY_CLASS AGS_THREAD_XML_SERIALIZATION_FACTORY_GET_CLASS AGS_TYPE_THREAD_XML_SERIALIZATION_FACTORY AgsThreadXmlSerializationFactory AgsThreadXmlSerializationFactoryClass ags_thread_xml_serialization_factory_get_type
ags_time AGS_TIME_ZERO USEC_PER_SEC NSEC_PER_SEC ags_time_get_uptime_from_offset
ags_timestamp AgsTimestamp AgsTimestampFlags ags_timestamp_new AGS_IS_TIMESTAMP AGS_TIMESTAMP AGS_TIMESTAMP_CLASS AGS_TIMESTAMP_GET_CLASS AGS_TYPE_TIMESTAMP AgsTimestamp AgsTimestampClass ags_timestamp_get_type
ags_timestamp_factory AgsTimestampFactory AgsTimestampFactoryFlags AGS_IS_TIMESTAMP_FACTORY AGS_TIMESTAMP_FACTORY AGS_TIMESTAMP_FACTORY_CLASS AGS_TIMESTAMP_FACTORY_GET_CLASS AGS_TYPE_TIMESTAMP_FACTORY AgsTimestampFactory AgsTimestampFactoryClass
ags_timestamp_thread AgsTimestampThread AGS_MICROSECONDS_PER_SECOND AGS_TIMESTAMP_THREAD_DEFAULT_BPM AGS_TIMESTAMP_THREAD_DEFAULT_SAMPLERATE AGS_TIMESTAMP_THREAD_DEFAULT_BUFFER_SIZE AGS_TIMESTAMP_THREAD_DEFAULT_JIFFIE AGS_TIMESTAMP_THREAD_DEFAULT_TIC ags_timestamp_thread_new AGS_IS_TIMESTAMP_THREAD AGS_TIMESTAMP_THREAD AGS_TIMESTAMP_THREAD_CLASS AGS_TIMESTAMP_THREAD_GET_CLASS AGS_TYPE_TIMESTAMP_THREAD AgsTimestampThread AgsTimestampThreadClass ags_timestamp_thread_get_type
ags_tree_iterator AgsTreeIterator ags_tree_iterator_set_inverse_mode ags_tree_iterator_is_inverse_mode ags_tree_iterator_iterate ags_tree_iterator_iterate_nested ags_tree_iterator_safe_iterate ags_tree_iterator_safe_iterate_nested AGS_IS_TREE_ITERATOR AGS_IS_TREE_ITERATOR_INTERFACE AGS_TREE_ITERATOR AGS_TREE_ITERATOR_GET_INTERFACE AGS_TREE_ITERATOR_INTERFACE AGS_TYPE_TREE_ITERATOR AgsTreeIterator AgsTreeIteratorInterface ags_tree_iterator_get_type
ags_turtle AgsTurtle AGS_TURTLE_DEFAULT_ENCODING AGS_TURTLE_DEFAULT_VERSION AgsTurtleFlags ags_turtle_read_iriref ags_turtle_read_pname_ns ags_turtle_read_pname_ln ags_turtle_read_blank_node_label ags_turtle_read_langtag ags_turtle_read_boolean ags_turtle_read_integer ags_turtle_read_decimal ags_turtle_read_double ags_turtle_read_exponent ags_turtle_read_string ags_turtle_read_string_literal_quote ags_turtle_read_string_literal_single_quote ags_turtle_read_string_literal_long_quote ags_turtle_read_string_literal_long_single_quote ags_turtle_read_uchar ags_turtle_read_echar ags_turtle_read_ws ags_turtle_read_anon ags_turtle_read_pn_chars_base ags_turtle_read_pn_chars_u ags_turtle_read_pn_chars ags_turtle_read_pn_prefix ags_turtle_read_pn_local ags_turtle_read_plx ags_turtle_read_percent ags_turtle_read_hex ags_turtle_read_pn_local_esc ags_turtle_find_xpath ags_turtle_find_xpath_with_context_node ags_turtle_string_convert ags_turtle_load ags_turtle_new AGS_IS_TURTLE AGS_TURTLE AGS_TURTLE_CLASS AGS_TURTLE_GET_CLASS AGS_TYPE_TURTLE AgsTurtle AgsTurtleClass ags_turtle_get_type
ags_turtle_manager AgsTurtleManager ags_turtle_manager_find ags_turtle_manager_add ags_turtle_manager_get_instance ags_turtle_manager_new AGS_IS_TURTLE_MANAGER AGS_TURTLE_MANAGER AGS_TURTLE_MANAGER_CLASS AGS_TURTLE_MANAGER_GET_CLASS AGS_TYPE_TURTLE_MANAGER AgsTurtleManager AgsTurtleManagerClass ags_turtle_manager_get_type
ags_worker_thread AgsWorkerThread AGS_WORKER_THREAD_DEFAULT_JIFFIE AgsWorkerThreadFlags ags_woker_thread_do_poll_loop ags_worker_thread_do_poll ags_worker_thread_new AGS_IS_WORKER_THREAD AGS_TYPE_WORKER_THREAD AGS_WORKER_THREAD AGS_WORKER_THREAD_CLASS AGS_WORKER_THREAD_GET_CLASS AgsWorkerThread AgsWorkerThreadClass ags_worker_thread_get_type
ags_xml_authentication AgsXmlAuthentication ags_xml_authentication_find_user_uuid ags_xml_authentication_new AGS_IS_XML_AUTHENTICATION AGS_TYPE_XML_AUTHENTICATION AGS_XML_AUTHENTICATION AGS_XML_AUTHENTICATION_CLASS AGS_XML_AUTHENTICATION_GET_CLASS AgsXmlAuthentication AgsXmlAuthenticationClass ags_xml_authentication_get_type
ags_xml_certificate AgsXmlCertificate ags_xml_certificate_new AGS_IS_XML_CERTIFICATE AGS_TYPE_XML_CERTIFICATE AGS_XML_CERTIFICATE AGS_XML_CERTIFICATE_CLASS AGS_XML_CERTIFICATE_GET_CLASS AgsXmlCertificate AgsXmlCertificateClass ags_xml_certificate_get_type
ags_xml_password_store AgsXmlPasswordStore ags_xml_password_store_find_login ags_xml_password_store_new AGS_IS_XML_PASSWORD_STORE AGS_TYPE_XML_PASSWORD_STORE AGS_XML_PASSWORD_STORE AGS_XML_PASSWORD_STORE_CLASS AGS_XML_PASSWORD_STORE_GET_CLASS AgsXmlPasswordStore AgsXmlPasswordStoreClass ags_xml_password_store_get_type
ags_xml_serialization_factory AgsXmlSerializationFactory ags_xml_serialization_factory_create ags_xml_serialization_factory_get_instance ags_xml_serialization_factory_new AGS_IS_XML_SERIALIZATION_FACTORY AGS_TYPE_XML_SERIALIZATION_FACTORY AGS_XML_SERIALIZATION_FACTORY AGS_XML_SERIALIZATION_FACTORY_CLASS AGS_XML_SERIALIZATION_FACTORY_GET_CLASS AgsXmlSerializationFactory AgsXmlSerializationFactoryClass ags_xml_serialization_factory_get_type
gsequencer-1.4.24/docs/reference/libags/gtk-doc.make0000644000175000017500000002375413246707333017225 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ chmod +x $@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else HTML_BUILD_STAMP= endif if GTK_DOC_BUILD_PDF PDF_BUILD_STAMP=pdf-build.stamp else PDF_BUILD_STAMP= endif all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) .PHONY: all-gtk-doc if ENABLE_GTK_DOC all-local: all-gtk-doc endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi $(AM_V_at)touch setup-build.stamp #### scan #### GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### xml #### GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0=@echo " DOC Building XML"; sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ ) > $@ #### html #### GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf libags-html && mkdir libags-html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd libags-html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/libags-html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/libags-html; \ fi; \ test -f $$file && cp $$file $(abs_builddir)/libags-html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=libags-html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp #### pdf #### GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ rm -f $(DOC_MODULE)-sections.txt; \ fi distclean-local: @rm -rf xml libags-html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @rm -rf xml libags-html install-data-local: @installfiles=`echo $(builddir)/libags-html/*`; \ if test "$$installfiles" = '$(builddir)/libags-html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if HAVE_GTK_DOC dist-check-gtkdoc: docs else dist-check-gtkdoc: @echo "*** gtk-doc is needed to run 'make dist'. ***" @echo "*** gtk-doc was not found when 'configure' ran. ***" @echo "*** please install gtk-doc and rerun 'configure'. ***" @false endif dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/libags-html @cp ./libags-html/* $(distdir)/libags-html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/libags-html .PHONY : dist-hook-local docs gsequencer-1.4.24/docs/reference/libags/Makefile.am0000644000175000017500000000747413246707333017073 00000000000000# This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE=libags # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 # The top-level XML file. DOC_MAIN_SGML_FILE=$(DOC_MODULE).xml # Directories containing the source code. # gtk-doc will search all .c and .h files beneath these paths # for inline comments documenting functions and macros. # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR=$(top_srcdir)/ags/util $(top_srcdir)/ags/lib $(top_srcdir)/ags/object $(top_srcdir)/ags/file $(top_srcdir)/ags/thread $(top_srcdir)/ags/server # Extra options to pass to gtkdoc-scangobj. Normally not needed. SCANGOBJ_OPTIONS=--cflags="$(CFLAGS) $(UUID_CFLAGS) $(LIBXML2_CFLAGS) $(OPENSSL_CFLAGS) $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) $(XMLRPC_SERVER_CFLAGS) $(GOBJECT_CFLAGS)" --ldflags="-static -ldl -lm -lrt -pthread $(LDFLAGS) $(UUID_LIBS) $(LIBXML2_LIBS) $(OPENSSL_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) $(XMLRPC_SERVER_LIBS) $(GOBJECT_LIBS) -L$(top_builddir) $(top_builddir)/libags.la $(top_builddir)/libags_thread.la $(top_builddir)/libags_server.la" # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" # SCAN_OPTIONS=--rebuild-types --rebuild-sections # Extra options to supply to gtkdoc-mkdb # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml MKDB_OPTIONS=--xml-mode --output-format=xml --name-space=libags --module=libags # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= # Extra options to supply to gtkdoc-fixref. Normally not needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS=--module=libags --module-dir=./libags-html/ --html-dir=$(DESTDIR)/$(datadir)/doc/libags-doc/api # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB= CFILE_GLOB= # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES= # Header files or dirs to ignore when scanning. Use base file/dir names # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES= # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES= # Extra files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.xml building.xml changes-2.0.xml content_files= # Files where gtk-doc abbrevations (#GtkWidget) are expanded # e.g. expand_content_files=running.xml expand_content_files= AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS=$(gsequencer_CFLAGS) -DGTK_IS_WIDGET_CLASS=1 GTKDOC_LIBS = \ $(top_builddir)/libags.la \ $(top_builddir)/libags_thread.la \ $(top_builddir)/libags_server.la # This includes the standard gtk-doc make rules, copied by gtkdocize. include ./gtk-doc.make # Comment this out if you want 'make check' to test you doc status # and run some sanity checks if ENABLE_GTK_DOC TESTS_ENVIRONMENT = \ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) TESTS = $(GTKDOC_CHECK) endif -include $(top_srcdir)/git.mk gsequencer-1.4.24/docs/reference/libags/libags.types0000644000175000017500000000423313247044247017353 00000000000000ags_applicable_get_type ags_application_context_get_type ags_async_queue_get_type ags_authentication_get_type ags_authentication_manager_get_type ags_autosave_thread_get_type ags_business_group_get_type ags_certificate_get_type ags_certificate_manager_get_type ags_complex_get_type ags_concurrency_provider_get_type ags_concurrent_tree_get_type ags_condition_manager_get_type ags_config_get_type ags_connectable_get_type ags_connection_get_type ags_connection_manager_get_type ags_controller_get_type ags_conversion_get_type ags_countable_get_type ags_destroy_worker_get_type ags_distributed_manager_get_type ags_dynamic_connectable_get_type ags_file_get_type ags_file_id_ref_get_type ags_file_launch_get_type ags_file_link_get_type ags_file_lookup_get_type ags_front_controller_get_type ags_function_get_type ags_generic_main_loop_get_type ags_history_get_type ags_local_factory_controller_get_type ags_local_registry_controller_get_type ags_local_serialization_controller_get_type ags_local_task_controller_get_type ags_log_get_type ags_main_loop_get_type ags_message_delivery_get_type ags_message_queue_get_type ags_mutable_get_type ags_mutex_manager_get_type ags_packable_get_type ags_password_store_get_type ags_password_store_manager_get_type ags_plugin_get_type ags_poll_fd_get_type ags_polling_thread_get_type ags_portlet_get_type ags_registry_get_type ags_remote_task_get_type ags_remote_task_thread_get_type ags_returnable_thread_get_type ags_security_context_get_type ags_seekable_get_type ags_sequencer_get_type ags_server_application_context_get_type ags_server_get_type ags_server_status_get_type ags_service_provider_get_type ags_single_thread_get_type ags_soundcard_get_type ags_tactable_get_type ags_task_completion_get_type ags_task_get_type ags_task_thread_get_type ags_thread_application_context_get_type ags_thread_get_type ags_thread_pool_get_type ags_thread_xml_serialization_factory_get_type ags_timestamp_get_type ags_timestamp_thread_get_type ags_tree_iterator_get_type ags_turtle_get_type ags_turtle_manager_get_type ags_worker_thread_get_type ags_xml_authentication_get_type ags_xml_certificate_get_type ags_xml_password_store_get_type ags_xml_serialization_factory_get_type gsequencer-1.4.24/docs/reference/libags/libags-overrides.txt0000644000175000017500000000000013246707333021013 00000000000000gsequencer-1.4.24/docs/reference/libags-audio/0000755000175000017500000000000013256233676016207 500000000000000gsequencer-1.4.24/docs/reference/libags-audio/libags_audio.xml0000644000175000017500000003652513256163135021276 00000000000000 %gtkdocentities; ]> Advanced Gtk+ Sequencer Audio Reference Manual for libags_audio. The latest version of this documentation can be found on-line at http://nongnu.org/gsequencer/api/libags-audio/. Plugin - API of plugins The audio layer Audio thread - multi-threaded audio Audio JACK - JACK support Audio Pulseaudio - pulseaudio server support Audio core-audio - core-audio server support Audio MIDI - MIDI support Audio files - Reading/Writing audio data from disk Recalls - Effect processors Audio tasks - Data exchanged between Audio and GUI API Index Index of deprecated API gsequencer-1.4.24/docs/reference/libags-audio/Makefile.in0000644000175000017500000012547113256226517020202 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ 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 \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/reference/libags-audio ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ags/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = ags-docs-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__DIST_COMMON = $(srcdir)/./gtk-doc.make $(srcdir)/Makefile.in \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CORE_AUDIO_CFLAGS = @CORE_AUDIO_CFLAGS@ CORE_AUDIO_LIBS = @CORE_AUDIO_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ GOBJECT_LIBS = @GOBJECT_LIBS@ GREP = @GREP@ GSEQUENCER_CFLAGS = @GSEQUENCER_CFLAGS@ GSEQUENCER_FUNCTIONAL_TEST_LDADD = @GSEQUENCER_FUNCTIONAL_TEST_LDADD@ GSEQUENCER_LDFLAGS = @GSEQUENCER_LDFLAGS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@ GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBASOUND2_CFLAGS = @LIBASOUND2_CFLAGS@ LIBASOUND2_LIBS = @LIBASOUND2_LIBS@ LIBGSEQUENCER_TEST_LIBADD = @LIBGSEQUENCER_TEST_LIBADD@ LIBICONV = @LIBICONV@ LIBINSTPATCH_CFLAGS = @LIBINSTPATCH_CFLAGS@ LIBINSTPATCH_LIBS = @LIBINSTPATCH_LIBS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MIDI2XML_CFLAGS = @MIDI2XML_CFLAGS@ MIDI2XML_LDFLAGS = @MIDI2XML_LDFLAGS@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE_CFLAGS = @PCRE_CFLAGS@ PCRE_LIBS = @PCRE_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PULSE_CFLAGS = @PULSE_CFLAGS@ PULSE_LIBS = @PULSE_LIBS@ RANLIB = @RANLIB@ SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@ SAMPLERATE_LIBS = @SAMPLERATE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ SNDFILE_LIBS = @SNDFILE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ XMLRPC_CLIENT_CFLAGS = @XMLRPC_CLIENT_CFLAGS@ XMLRPC_CLIENT_LIBS = @XMLRPC_CLIENT_LIBS@ XMLRPC_C_CONFIG = @XMLRPC_C_CONFIG@ XMLRPC_SERVER_ABYSS_CFLAGS = @XMLRPC_SERVER_ABYSS_CFLAGS@ XMLRPC_SERVER_ABYSS_LIBS = @XMLRPC_SERVER_ABYSS_LIBS@ XMLRPC_SERVER_CGI_CFLAGS = @XMLRPC_SERVER_CGI_CFLAGS@ XMLRPC_SERVER_CGI_LIBS = @XMLRPC_SERVER_CGI_LIBS@ XMLRPC_UTIL_CFLAGS = @XMLRPC_UTIL_CFLAGS@ XMLRPC_UTIL_LIBS = @XMLRPC_UTIL_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module, e.g. 'glib'. DOC_MODULE = libags_audio # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 # The top-level XML file. DOC_MAIN_SGML_FILE = $(DOC_MODULE).xml # Directories containing the source code. # gtk-doc will search all .c and .h files beneath these paths # for inline comments documenting functions and macros. # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR = $(top_srcdir)/ags/plugin $(top_srcdir)/ags/audio # Extra options to pass to gtkdoc-scangobj. Normally not needed. SCANGOBJ_OPTIONS = --cflags="$(CFLAGS) $(UUID_CFLAGS) $(LIBXML2_CFLAGS) $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) $(XMLRPC_SERVER_CFLAGS) $(OPENSSL_CFLAGS) $(GOBJECT_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBAO_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(JACK_CFLAGS)" --ldflags="-static -ldl -lm -lrt -pthread $(LDFLAGS) $(UUID_LIBS) $(LIBASOUND2_LIBS) $(LIBAO_LIBS) $(LIBXML2_LIBS) $(OPENSSL_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) $(XMLRPC_SERVER_LIBS) $(GOBJECT_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(JACK_LIBS) -L$(top_builddir) $(top_builddir)/libags.la $(top_builddir)/libags_thread.la $(top_builddir)/libags_server.la $(top_builddir)/libags_audio.la" # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" # SCAN_OPTIONS=--rebuild-types --rebuild-sections # Extra options to supply to gtkdoc-mkdb # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml MKDB_OPTIONS = --xml-mode --output-format=xml --name-space=libags_audio --module=libags_audio # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS = # Extra options to supply to gtkdoc-fixref. Normally not needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = --module=libags_audio --module-dir=./libags-audio-html/ --html-dir=$(DESTDIR)/$(datadir)/doc/libags-audio-doc/api --extra-dir=$(top_srcdir)/docs/reference/libags/libags-html # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB = CFILE_GLOB = # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES = # Header files or dirs to ignore when scanning. Use base file/dir names # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES = ags_lv2_state_manager.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = # Extra files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.xml building.xml changes-2.0.xml content_files = # Files where gtk-doc abbrevations (#GtkWidget) are expanded # e.g. expand_content_files=running.xml expand_content_files = AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS = $(gsequencer_CFLAGS) -DGTK_IS_WIDGET_CLASS=1 GTKDOC_LIBS = \ $(top_builddir)/libags.la \ $(top_builddir)/libags_thread.la \ $(top_builddir)/libags_server.la \ $(top_builddir)/libags_audio.la @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test @GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = @GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp #### setup #### GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; #### scan #### GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; #### xml #### GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0 = @echo " DOC Building XML"; #### html #### GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; #### pdf #### GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; # This includes the standard gtk-doc make rules, copied by gtkdocize. # Comment this out if you want 'make check' to test you doc status # and run some sanity checks @ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = \ @ENABLE_GTK_DOC_TRUE@ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ @ENABLE_GTK_DOC_TRUE@ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) @ENABLE_GTK_DOC_TRUE@TESTS = $(GTKDOC_CHECK) all: all-am .SUFFIXES: .SUFFIXES: .log .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/./gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/libags-audio/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/reference/libags-audio/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(srcdir)/./gtk-doc.make $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ags-docs-local: tags TAGS: ctags CTAGS: cscope cscopelist: # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am @ENABLE_GTK_DOC_FALSE@all-local: all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." ags-docs: ags-docs-am ags-docs-am: ags-docs-local clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: check-am install-am install-strip .PHONY: ags-docs-am ags-docs-local all all-am all-local check \ check-TESTS check-am clean clean-generic clean-libtool \ clean-local cscopelist-am ctags-am dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \ uninstall uninstall-am uninstall-local .PRECIOUS: Makefile gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ chmod +x $@ all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) .PHONY: all-gtk-doc @ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi $(AM_V_at)touch setup-build.stamp scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ ) > $@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf libags-audio-html && mkdir libags-audio-html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd libags-audio-html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/libags-audio-html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/libags-audio-html; \ fi; \ test -f $$file && cp $$file $(abs_builddir)/libags-audio-html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=libags-audio-html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ rm -f $(DOC_MODULE)-sections.txt; \ fi distclean-local: @rm -rf xml libags-audio-html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @rm -rf xml libags-audio-html install-data-local: @installfiles=`echo $(builddir)/libags-audio-html/*`; \ if test "$$installfiles" = '$(builddir)/libags-audio-html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs @HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: @HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" @HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" @HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" @HAVE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/libags-audio-html @cp ./libags-audio-html/* $(distdir)/libags-audio-html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/libags-audio-html .PHONY : dist-hook-local docs -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gsequencer-1.4.24/docs/reference/libags-audio/libags_audio-sections.txt0000644000175000017500000034312313247044247023137 00000000000000
ags_acceleration AgsAcceleration AgsAccelerationFlags ags_acceleration_duplicate ags_acceleration_new AGS_ACCELERATION AGS_ACCELERATION_CLASS AGS_ACCELERATION_GET_CLASS AGS_IS_ACCELERATION AGS_TYPE_ACCELERATION AgsAcceleration AgsAccelerationClass ags_acceleration_get_type
ags_add_audio AgsAddAudio ags_add_audio_new AGS_ADD_AUDIO AGS_ADD_AUDIO_CLASS AGS_ADD_AUDIO_GET_CLASS AGS_IS_ADD_AUDIO AGS_TYPE_ADD_AUDIO AgsAddAudio AgsAddAudioClass ags_add_audio_get_type
ags_add_audio_signal AgsAddAudioSignal ags_add_audio_signal_new AGS_ADD_AUDIO_SIGNAL AGS_ADD_AUDIO_SIGNAL_CLASS AGS_ADD_AUDIO_SIGNAL_GET_CLASS AGS_IS_ADD_AUDIO_SIGNAL AGS_TYPE_ADD_AUDIO_SIGNAL AgsAddAudioSignal AgsAddAudioSignalClass ags_add_audio_signal_get_type
ags_add_effect AgsAddEffect ags_add_effect_new AGS_ADD_EFFECT AGS_ADD_EFFECT_CLASS AGS_ADD_EFFECT_GET_CLASS AGS_IS_ADD_EFFECT AGS_TYPE_ADD_EFFECT AgsAddEffect AgsAddEffectClass ags_add_effect_get_type
ags_add_note AgsAddNote ags_add_note_new AGS_ADD_NOTE AGS_ADD_NOTE_CLASS AGS_ADD_NOTE_GET_CLASS AGS_IS_ADD_NOTE AGS_TYPE_ADD_NOTE AgsAddNote AgsAddNoteClass ags_add_note_get_type
ags_add_point_to_selection AgsAddPointToSelection ags_add_point_to_selection_new AGS_ADD_POINT_TO_SELECTION AGS_ADD_POINT_TO_SELECTION_CLASS AGS_ADD_POINT_TO_SELECTION_GET_CLASS AGS_IS_ADD_POINT_TO_SELECTION AGS_TYPE_ADD_POINT_TO_SELECTION AgsAddPointToSelection AgsAddPointToSelectionClass ags_add_point_to_selection_get_type
ags_add_recall AgsAddRecall ags_add_recall_new AGS_ADD_RECALL AGS_ADD_RECALL_CLASS AGS_ADD_RECALL_GET_CLASS AGS_IS_ADD_RECALL AGS_TYPE_ADD_RECALL AgsAddRecall AgsAddRecallClass ags_add_recall_get_type
ags_add_recall_container AgsAddRecallContainer ags_add_recall_container_new AGS_ADD_RECALL_CONTAINER AGS_ADD_RECALL_CONTAINER_CLASS AGS_ADD_RECALL_CONTAINER_GET_CLASS AGS_IS_ADD_RECALL_CONTAINER AGS_TYPE_ADD_RECALL_CONTAINER AgsAddRecallContainer AgsAddRecallContainerClass ags_add_recall_container_get_type
ags_add_region_to_selection AgsAddRegionToSelection ags_add_region_to_selection_new AGS_ADD_REGION_TO_SELECTION AGS_ADD_REGION_TO_SELECTION_CLASS AGS_ADD_REGION_TO_SELECTION_GET_CLASS AGS_IS_ADD_REGION_TO_SELECTION AGS_TYPE_ADD_REGION_TO_SELECTION AgsAddRegionToSelection AgsAddRegionToSelectionClass ags_add_region_to_selection_get_type
ags_add_soundcard AgsAddSoundcard ags_add_soundcard_new AGS_ADD_SOUNDCARD AGS_ADD_SOUNDCARD_CLASS AGS_ADD_SOUNDCARD_GET_CLASS AGS_IS_ADD_SOUNDCARD AGS_TYPE_ADD_SOUNDCARD AgsAddSoundcard AgsAddSoundcardClass ags_add_soundcard_get_type
ags_append_audio AgsAppendAudio ags_append_audio_new AGS_APPEND_AUDIO AGS_APPEND_AUDIO_CLASS AGS_APPEND_AUDIO_GET_CLASS AGS_IS_APPEND_AUDIO AGS_TYPE_APPEND_AUDIO AgsAppendAudio AgsAppendAudioClass ags_append_audio_get_type
ags_append_audio_threaded AgsAppendAudioThreaded ags_append_audio_threaded_new AGS_APPEND_AUDIO_THREADED AGS_APPEND_AUDIO_THREADED_CLASS AGS_APPEND_AUDIO_THREADED_GET_CLASS AGS_IS_APPEND_AUDIO_THREADED AGS_TYPE_APPEND_AUDIO_THREADED AgsAppendAudioThreaded AgsAppendAudioThreadedClass ags_append_audio_threaded_get_type
ags_append_channel AgsAppendChannel ags_append_channel_new AGS_APPEND_CHANNEL AGS_APPEND_CHANNEL_CLASS AGS_APPEND_CHANNEL_GET_CLASS AGS_IS_APPEND_CHANNEL AGS_TYPE_APPEND_CHANNEL AgsAppendChannel AgsAppendChannelClass ags_append_channel_get_type
ags_append_recall AgsAppendRecall ags_append_recall_new AGS_APPEND_RECALL AGS_APPEND_RECALL_CLASS AGS_APPEND_RECALL_GET_CLASS AGS_IS_APPEND_RECALL AGS_TYPE_APPEND_RECALL AgsAppendRecall AgsAppendRecallClass ags_append_recall_get_type
ags_apply_bpm AgsApplyBpm ags_apply_bpm_new AGS_APPLY_BPM AGS_APPLY_BPM_CLASS AGS_APPLY_BPM_GET_CLASS AGS_IS_APPLY_BPM AGS_TYPE_APPLY_BPM AgsApplyBpm AgsApplyBpmClass ags_apply_bpm_get_type
ags_apply_presets AgsApplyPresets ags_apply_presets_soundcard ags_apply_presets_new AGS_APPLY_PRESETS AGS_APPLY_PRESETS_CLASS AGS_APPLY_PRESETS_GET_CLASS AGS_IS_APPLY_PRESETS AGS_TYPE_APPLY_PRESETS AgsApplyPresets AgsApplyPresetsClass ags_apply_presets_get_type
ags_apply_sequencer_length AgsApplySequencerLength ags_apply_sequencer_length_new AGS_APPLY_SEQUENCER_LENGTH AGS_APPLY_SEQUENCER_LENGTH_CLASS AGS_APPLY_SEQUENCER_LENGTH_GET_CLASS AGS_IS_APPLY_SEQUENCER_LENGTH AGS_TYPE_APPLY_SEQUENCER_LENGTH AgsApplySequencerLength AgsApplySequencerLengthClass ags_apply_sequencer_length_get_type
ags_apply_synth AgsApplySynth AgsApplySynthWave ags_apply_synth_new AGS_APPLY_SYNTH AGS_APPLY_SYNTH_CLASS AGS_APPLY_SYNTH_GET_CLASS AGS_IS_APPLY_SYNTH AGS_TYPE_APPLY_SYNTH AgsApplySynth AgsApplySynthClass ags_apply_synth_get_type
ags_apply_tact AgsApplyTact ags_apply_tact_new AGS_APPLY_TACT AGS_APPLY_TACT_CLASS AGS_APPLY_TACT_GET_CLASS AGS_IS_APPLY_TACT AGS_TYPE_APPLY_TACT AgsApplyTact AgsApplyTactClass ags_apply_tact_get_type
ags_audio AgsAudio AgsAudioFlags ags_audio_set_soundcard ags_audio_set_flags ags_audio_unset_flags ags_audio_check_connection ags_audio_set_audio_channels ags_audio_set_pads ags_audio_set_samplerate ags_audio_set_buffer_size ags_audio_set_format ags_audio_set_sequence_length ags_audio_add_audio_connection ags_audio_remove_audio_connection ags_audio_add_preset ags_audio_remove_preset ags_audio_add_notation ags_audio_remove_notation ags_audio_add_automation ags_audio_remove_automation ags_audio_add_wave ags_audio_remove_wave ags_audio_add_recall_id ags_audio_remove_recall_id ags_audio_add_recycling_context ags_audio_remove_recycling_context ags_audio_add_recall_container ags_audio_remove_recall_container ags_audio_add_recall ags_audio_remove_recall ags_audio_init_run ags_audio_duplicate_recall ags_audio_init_recall ags_audio_resolve_recall ags_audio_is_playing ags_audio_play ags_audio_tact ags_audio_done ags_audio_cancel ags_audio_remove ags_audio_find_port ags_audio_find_port_by_specifier_and_scope ags_audio_open_files ags_audio_recursive_set_property ags_audio_recursive_play_init ags_audio_new AGS_AUDIO AGS_AUDIO_CLASS AGS_AUDIO_GET_CLASS AGS_IS_AUDIO AGS_TYPE_AUDIO AgsAudio AgsAudioClass ags_audio_get_type
ags_audio_application_context AgsAudioApplicationContext AGS_AUDIO_RT_PRIORITY AGS_AUDIO_DEFAULT_VERSION AGS_AUDIO_BUILD_ID AGS_EFFECTS_DEFAULT_VERSION AgsAudioApplicationContextFlags ags_audio_application_context_new AGS_AUDIO_APPLICATION_CONTEXT AGS_AUDIO_APPLICATION_CONTEXT_CLASS AGS_AUDIO_APPLICATION_CONTEXT_GET_CLASS AGS_IS_AUDIO_APPLICATION_CONTEXT AGS_TYPE_AUDIO_APPLICATION_CONTEXT AgsAudioApplicationContext AgsAudioApplicationContextClass ags_audio_application_context_get_type
ags_audio_buffer_util AGS_AUDIO_BUFFER_S8 AGS_AUDIO_BUFFER_S16 AGS_AUDIO_BUFFER_S24 AGS_AUDIO_BUFFER_S32 AGS_AUDIO_BUFFER_S64 AGS_AUDIO_BUFFER_FLOAT AGS_AUDIO_BUFFER_DOUBLE AgsAudioBufferUtilFormat AgsAudioBufferUtilSamplerate AgsAudioBufferUtilCopyMode ags_audio_buffer_util_format_from_soundcard ags_audio_buffer_util_get_copy_mode ags_audio_buffer_util_clear_float ags_audio_buffer_util_clear_float32 ags_audio_buffer_util_clear_double ags_audio_buffer_util_clear_buffer ags_audio_buffer_util_envelope_s8 ags_audio_buffer_util_envelope_s16 ags_audio_buffer_util_envelope_s24 ags_audio_buffer_util_envelope_s32 ags_audio_buffer_util_envelope_s64 ags_audio_buffer_util_envelope_float ags_audio_buffer_util_envelope_double ags_audio_buffer_util_envelope ags_audio_buffer_util_volume_s8 ags_audio_buffer_util_volume_s16 ags_audio_buffer_util_volume_s24 ags_audio_buffer_util_volume_s32 ags_audio_buffer_util_volume_s64 ags_audio_buffer_util_volume_float ags_audio_buffer_util_volume_double ags_audio_buffer_util_volume ags_audio_buffer_util_resample_s8 ags_audio_buffer_util_resample_s16 ags_audio_buffer_util_resample_s24 ags_audio_buffer_util_resample_s32 ags_audio_buffer_util_resample_s64 ags_audio_buffer_util_resample_float ags_audio_buffer_util_resample_double ags_audio_buffer_util_resample ags_audio_buffer_util_peak_s8 ags_audio_buffer_util_peak_s16 ags_audio_buffer_util_peak_s24 ags_audio_buffer_util_peak_s32 ags_audio_buffer_util_peak_s64 ags_audio_buffer_util_peak_float ags_audio_buffer_util_peak_double ags_audio_buffer_util_peak ags_audio_buffer_util_copy_s8_to_s8 ags_audio_buffer_util_copy_s8_to_s16 ags_audio_buffer_util_copy_s8_to_s24 ags_audio_buffer_util_copy_s8_to_s32 ags_audio_buffer_util_copy_s8_to_s64 ags_audio_buffer_util_copy_s8_to_float ags_audio_buffer_util_copy_s8_to_double ags_audio_buffer_util_copy_s16_to_s8 ags_audio_buffer_util_copy_s16_to_s16 ags_audio_buffer_util_copy_s16_to_s24 ags_audio_buffer_util_copy_s16_to_s32 ags_audio_buffer_util_copy_s16_to_s64 ags_audio_buffer_util_copy_s16_to_float ags_audio_buffer_util_copy_s16_to_double ags_audio_buffer_util_copy_s24_to_s8 ags_audio_buffer_util_copy_s24_to_s16 ags_audio_buffer_util_copy_s24_to_s24 ags_audio_buffer_util_copy_s24_to_s32 ags_audio_buffer_util_copy_s24_to_s64 ags_audio_buffer_util_copy_s24_to_float ags_audio_buffer_util_copy_s24_to_double ags_audio_buffer_util_copy_s32_to_s8 ags_audio_buffer_util_copy_s32_to_s16 ags_audio_buffer_util_copy_s32_to_s24 ags_audio_buffer_util_copy_s32_to_s32 ags_audio_buffer_util_copy_s32_to_s64 ags_audio_buffer_util_copy_s32_to_float ags_audio_buffer_util_copy_s32_to_double ags_audio_buffer_util_copy_s64_to_s8 ags_audio_buffer_util_copy_s64_to_s16 ags_audio_buffer_util_copy_s64_to_s24 ags_audio_buffer_util_copy_s64_to_s32 ags_audio_buffer_util_copy_s64_to_s64 ags_audio_buffer_util_copy_s64_to_float ags_audio_buffer_util_copy_s64_to_double ags_audio_buffer_util_copy_float_to_s8 ags_audio_buffer_util_copy_float_to_s16 ags_audio_buffer_util_copy_float_to_s24 ags_audio_buffer_util_copy_float_to_s32 ags_audio_buffer_util_copy_float_to_s64 ags_audio_buffer_util_copy_float_to_float ags_audio_buffer_util_copy_float_to_double ags_audio_buffer_util_copy_double_to_s8 ags_audio_buffer_util_copy_double_to_s16 ags_audio_buffer_util_copy_double_to_s24 ags_audio_buffer_util_copy_double_to_s32 ags_audio_buffer_util_copy_double_to_s64 ags_audio_buffer_util_copy_double_to_float ags_audio_buffer_util_copy_double_to_double ags_audio_buffer_util_copy_s8_to_float32 ags_audio_buffer_util_copy_s16_to_float32 ags_audio_buffer_util_copy_s24_to_float32 ags_audio_buffer_util_copy_s32_to_float32 ags_audio_buffer_util_copy_s64_to_float32 ags_audio_buffer_util_copy_buffer_to_buffer
ags_audio_connection AgsAudioConnection AgsAudioConnectionFlags ags_audio_connection_find ags_audio_connection_new AGS_AUDIO_CONNECTION AGS_AUDIO_CONNECTION_CLASS AGS_AUDIO_CONNECTION_GET_CLASS AGS_IS_AUDIO_CONNECTION AGS_TYPE_AUDIO_CONNECTION AgsAudioConnection AgsAudioConnectionClass ags_audio_connection_get_type
ags_audio_file AgsAudioFile ags_audio_file_check_suffix ags_audio_file_open ags_audio_file_open_from_data ags_audio_file_rw_open ags_audio_file_close ags_audio_file_read_audio_signal ags_audio_file_seek ags_audio_file_write ags_audio_file_flush ags_audio_file_new AGS_AUDIO_FILE AGS_AUDIO_FILE_CLASS AGS_AUDIO_FILE_GET_CLASS AGS_IS_AUDIO_FILE AGS_TYPE_AUDIO_FILE AgsAudioFile AgsAudioFileClass ags_audio_file_get_type
ags_audio_file_link AgsAudioFileLink ags_audio_file_link_new AGS_AUDIO_FILE_LINK AGS_AUDIO_FILE_LINK_CLASS AGS_AUDIO_FILE_LINK_GET_CLASS AGS_IS_AUDIO_FILE_LINK AGS_TYPE_AUDIO_FILE_LINK AgsAudioFileLink AgsAudioFileLinkClass ags_audio_file_link_get_type
ags_audio_file_xml ags_file_read_soundcard ags_file_write_soundcard ags_file_read_soundcard_list ags_file_write_soundcard_list ags_file_read_playback ags_file_write_playback ags_file_read_playback_list ags_file_write_playback_list ags_file_read_audio ags_file_write_audio ags_file_read_audio_list ags_file_write_audio_list ags_file_read_channel ags_file_write_channel ags_file_read_channel_list ags_file_write_channel_list ags_file_read_input ags_file_write_input ags_file_read_output ags_file_write_output ags_file_read_recall ags_file_write_recall ags_file_read_recall_list ags_file_write_recall_list ags_file_read_recall_container ags_file_write_recall_container ags_file_read_recall_container_list ags_file_write_recall_container_list ags_file_read_recall_audio ags_file_write_recall_audio ags_file_read_recall_audio_run ags_file_write_recall_audio_run ags_file_read_recall_channel ags_file_write_recall_channel ags_file_read_recall_channel_run ags_file_write_recall_channel_run ags_file_read_recall_recycling ags_file_write_recall_recycling ags_file_read_recall_audio_signal ags_file_write_recall_audio_signal ags_file_read_port ags_file_write_port ags_file_read_port_list ags_file_write_port_list ags_file_read_recycling ags_file_write_recycling ags_file_read_recycling_list ags_file_write_recycling_list ags_file_read_audio_signal ags_file_write_audio_signal ags_file_read_audio_signal_list ags_file_write_audio_signal_list ags_file_read_stream ags_file_write_stream ags_file_read_stream_list ags_file_write_stream_list ags_file_read_pattern ags_file_write_pattern ags_file_read_pattern_list ags_file_write_pattern_list ags_file_read_pattern_data ags_file_write_pattern_data ags_file_read_pattern_data_list ags_file_write_pattern_data_list ags_file_read_notation ags_file_write_notation ags_file_read_notation_list ags_file_write_notation_list ags_file_read_note ags_file_write_note ags_file_read_note_list ags_file_write_note_list ags_file_read_automation ags_file_write_automation ags_file_read_automation_list ags_file_write_automation_list ags_file_read_acceleration ags_file_write_acceleration ags_file_read_acceleration_list ags_file_write_acceleration_list ags_file_read_task ags_file_write_task ags_file_read_task_list ags_file_write_task_list ags_file_read_embedded_audio ags_file_write_embedded_audio ags_file_read_embedded_audio_list ags_file_write_embedded_audio_list
ags_audio_loop AgsAudioLoop AGS_AUDIO_LOOP_DEFAULT_JIFFIE AgsAudioLoopFlags AgsAudioLoopTimingFlags ags_audio_loop_add_audio ags_audio_loop_remove_audio ags_audio_loop_add_channel ags_audio_loop_remove_channel ags_audio_loop_add_recall ags_audio_loop_remove_recall ags_audio_loop_new AGS_AUDIO_LOOP AGS_AUDIO_LOOP_CLASS AGS_AUDIO_LOOP_GET_CLASS AGS_IS_AUDIO_LOOP AGS_TYPE_AUDIO_LOOP AgsAudioLoop AgsAudioLoopClass ags_audio_loop_get_type
ags_audio_signal AgsAudioSignal AgsAudioSignalFlags ags_stream_alloc ags_stream_free ags_audio_signal_set_samplerate ags_audio_signal_set_buffer_size ags_audio_signal_set_format ags_audio_signal_get_length_till_current ags_audio_signal_add_stream ags_audio_signal_stream_resize ags_audio_signal_stream_safe_resize ags_audio_signal_realloc_buffer_size ags_audio_signal_duplicate_stream ags_audio_signal_add_note ags_audio_signal_remove_note ags_audio_signal_get_template ags_audio_signal_get_stream_current ags_audio_signal_get_by_recall_id ags_audio_signal_tile ags_audio_signal_scale ags_audio_signal_feed ags_audio_signal_envelope ags_audio_signal_is_active ags_audio_signal_new ags_audio_signal_new_with_length AGS_AUDIO_SIGNAL AGS_AUDIO_SIGNAL_CLASS AGS_AUDIO_SIGNAL_GET_CLASS AGS_IS_AUDIO_SIGNAL AGS_TYPE_AUDIO_SIGNAL AgsAudioSignal AgsAudioSignalClass ags_audio_signal_get_type
ags_audio_thread AgsAudioThread AGS_AUDIO_THREAD_DEFAULT_JIFFIE AgsAudioThreadFlags ags_audio_thread_new AGS_AUDIO_THREAD AGS_AUDIO_THREAD_CLASS AGS_AUDIO_THREAD_GET_CLASS AGS_IS_AUDIO_THREAD AGS_TYPE_AUDIO_THREAD AgsAudioThread AgsAudioThreadClass ags_audio_thread_get_type
ags_audio_xml_serialization_factory AgsAudioXmlSerializationFactory ags_audio_xml_serialization_factory_create ags_audio_xml_serialization_factory_get_instance ags_audio_xml_serialization_factory_new AGS_AUDIO_XML_SERIALIZATION_FACTORY AGS_AUDIO_XML_SERIALIZATION_FACTORY_CLASS AGS_AUDIO_XML_SERIALIZATION_FACTORY_GET_CLASS AGS_IS_AUDIO_XML_SERIALIZATION_FACTORY AGS_TYPE_AUDIO_XML_SERIALIZATION_FACTORY AgsAudioXmlSerializationFactory AgsAudioXmlSerializationFactoryClass ags_audio_xml_serialization_factory_get_type
ags_automation AgsAutomation AGS_AUTOMATION_DEFAULT_BPM AGS_AUTOMATION_TICS_PER_BEAT AGS_AUTOMATION_MINIMUM_ACCELERATION_LENGTH AGS_AUTOMATION_MAXIMUM_ACCELERATION_LENGTH AGS_AUTOMATION_DEFAULT_LENGTH AGS_AUTOMATION_DEFAULT_JIFFIE AGS_AUTOMATION_DEFAULT_DURATION AGS_AUTOMATION_DEFAULT_OFFSET AGS_AUTOMATION_DEFAULT_PRECISION AGS_AUTOMATION_MAXIMUM_STEPS AGS_AUTOMATION_CLIPBOARD_VERSION AGS_AUTOMATION_CLIPBOARD_TYPE AGS_AUTOMATION_CLIPBOARD_FORMAT AGS_AUTOMATION_CLIPBOARD_LEGACY_FORMAT AgsAutomationFlags ags_automation_find_port ags_automation_find_near_timestamp ags_automation_find_near_timestamp_extended ags_automation_add ags_automation_add_acceleration ags_automation_remove_acceleration_at_position ags_automation_get_selection ags_automation_is_acceleration_selected ags_automation_find_point ags_automation_find_region ags_automation_free_selection ags_automation_add_point_to_selection ags_automation_remove_point_from_selection ags_automation_add_region_to_selection ags_automation_remove_region_from_selection ags_automation_add_all_to_selection ags_automation_copy_selection ags_automation_cut_selection ags_automation_merge_clipboard ags_automation_insert_from_clipboard ags_automation_insert_from_clipboard_extended ags_automation_get_current ags_automation_get_specifier_unique ags_automation_get_specifier_unique_with_channel_type ags_automation_find_specifier ags_automation_find_channel_type_with_control_name ags_automation_find_specifier_with_type_and_line ags_automation_get_value ags_automation_new AGS_AUTOMATION AGS_AUTOMATION_CLASS AGS_AUTOMATION_GET_CLASS AGS_IS_AUTOMATION AGS_TYPE_AUTOMATION AgsAutomation AgsAutomationClass ags_automation_get_type
ags_base_plugin AgsBasePlugin AGS_PORT_DESCRIPTOR AgsBasePluginFlags AgsPortDescriptorFlags AgsPortDescriptor ags_port_descriptor_alloc ags_port_descriptor_free ags_port_descriptor_find_symbol ags_base_plugin_find_filename ags_base_plugin_find_effect ags_base_plugin_find_ui_effect_index ags_base_plugin_sort ags_base_plugin_apply_port_group_by_prefix ags_base_plugin_instantiate ags_base_plugin_connect_port ags_base_plugin_activate ags_base_plugin_deactivate ags_base_plugin_run ags_base_plugin_load_plugin ags_base_plugin_new AGS_BASE_PLUGIN AGS_BASE_PLUGIN_CLASS AGS_BASE_PLUGIN_GET_CLASS AGS_IS_BASE_PLUGIN AGS_TYPE_BASE_PLUGIN AgsBasePlugin AgsBasePluginClass ags_base_plugin_get_type
ags_buffer AgsBuffer AgsBufferFlags ags_buffer_set_samplerate ags_buffer_set_buffer_size ags_buffer_set_format ags_buffer_sort_func ags_buffer_duplicate ags_buffer_new AGS_BUFFER AGS_BUFFER_CLASS AGS_BUFFER_GET_CLASS AGS_IS_BUFFER AGS_TYPE_BUFFER AgsBuffer AgsBufferClass ags_buffer_get_type
ags_buffer_audio_signal AgsBufferAudioSignal ags_buffer_audio_signal_new AGS_BUFFER_AUDIO_SIGNAL AGS_BUFFER_AUDIO_SIGNAL_CLASS AGS_BUFFER_AUDIO_SIGNAL_GET_CLASS AGS_IS_BUFFER_AUDIO_SIGNAL AGS_TYPE_BUFFER_AUDIO_SIGNAL AgsBufferAudioSignal AgsBufferAudioSignalClass ags_buffer_audio_signal_get_type
ags_buffer_channel AgsBufferChannel ags_buffer_channel_new AGS_BUFFER_CHANNEL AGS_BUFFER_CHANNEL_CLASS AGS_BUFFER_CHANNEL_GET_CLASS AGS_IS_BUFFER_CHANNEL AGS_TYPE_BUFFER_CHANNEL AgsBufferChannel AgsBufferChannelClass ags_buffer_channel_get_type
ags_buffer_channel_run AgsBufferChannelRun ags_buffer_channel_run_new AGS_BUFFER_CHANNEL_RUN AGS_BUFFER_CHANNEL_RUN_CLASS AGS_BUFFER_CHANNEL_RUN_GET_CLASS AGS_IS_BUFFER_CHANNEL_RUN AGS_TYPE_BUFFER_CHANNEL_RUN AgsBufferChannelRun AgsBufferChannelRunClass ags_buffer_channel_run_get_type
ags_buffer_recycling AgsBufferRecycling ags_buffer_recycling_new AGS_BUFFER_RECYCLING AGS_BUFFER_RECYCLING_CLASS AGS_BUFFER_RECYCLING_GET_CLASS AGS_IS_BUFFER_RECYCLING AGS_TYPE_BUFFER_RECYCLING AgsBufferRecycling AgsBufferRecyclingClass ags_buffer_recycling_get_type
ags_cancel_audio AgsCancelAudio ags_cancel_audio_new AGS_CANCEL_AUDIO AGS_CANCEL_AUDIO_CLASS AGS_CANCEL_AUDIO_GET_CLASS AGS_IS_CANCEL_AUDIO AGS_TYPE_CANCEL_AUDIO AgsCancelAudio AgsCancelAudioClass ags_cancel_audio_get_type
ags_cancel_channel AgsCancelChannel ags_cancel_channel_new AGS_CANCEL_CHANNEL AGS_CANCEL_CHANNEL_CLASS AGS_CANCEL_CHANNEL_GET_CLASS AGS_IS_CANCEL_CHANNEL AGS_TYPE_CANCEL_CHANNEL AgsCancelChannel AgsCancelChannelClass ags_cancel_channel_get_type
ags_cancel_recall AgsCancelRecall ags_cancel_recall_new AGS_CANCEL_RECALL AGS_CANCEL_RECALL_CLASS AGS_CANCEL_RECALL_GET_CLASS AGS_IS_CANCEL_RECALL AGS_TYPE_CANCEL_RECALL AgsCancelRecall AgsCancelRecallClass ags_cancel_recall_get_type
ags_capture_sound_audio AgsCaptureSoundAudio ags_capture_sound_audio_new AGS_CAPTURE_SOUND_AUDIO AGS_CAPTURE_SOUND_AUDIO_CLASS AGS_CAPTURE_SOUND_AUDIO_GET_CLASS AGS_IS_CAPTURE_SOUND_AUDIO AGS_TYPE_CAPTURE_SOUND_AUDIO AgsCaptureSoundAudio AgsCaptureSoundAudioClass ags_capture_sound_audio_get_type
ags_capture_sound_audio_run AgsCaptureSoundAudioRun ags_capture_sound_audio_run_new AGS_CAPTURE_SOUND_AUDIO_RUN AGS_CAPTURE_SOUND_AUDIO_RUN_CLASS AGS_CAPTURE_SOUND_AUDIO_RUN_GET_CLASS AGS_IS_CAPTURE_SOUND_AUDIO_RUN AGS_TYPE_CAPTURE_SOUND_AUDIO_RUN AgsCaptureSoundAudioRun AgsCaptureSoundAudioRunClass ags_capture_sound_audio_run_get_type
ags_change_soundcard AgsChangeSoundcard ags_change_soundcard_new AGS_CHANGE_SOUNDCARD AGS_CHANGE_SOUNDCARD_CLASS AGS_CHANGE_SOUNDCARD_GET_CLASS AGS_IS_CHANGE_SOUNDCARD AGS_TYPE_CHANGE_SOUNDCARD AgsChangeSoundcard AgsChangeSoundcardClass ags_change_soundcard_get_type
ags_channel AgsChannel AgsChannelFlags AgsChannelRecallIDMode AGS_CHANNEL_ERROR AgsChannelError ags_channel_error_quark ags_channel_find_recall ags_channel_first ags_channel_last ags_channel_nth ags_channel_pad_first ags_channel_pad_last ags_channel_pad_nth ags_channel_first_with_recycling ags_channel_last_with_recycling ags_channel_prev_with_recycling ags_channel_next_with_recycling ags_channel_set_soundcard ags_channel_set_samplerate ags_channel_set_buffer_size ags_channel_set_format ags_channel_add_remote_channel ags_channel_remove_remote_channel ags_channel_add_recall_id ags_channel_remove_recall_id ags_channel_add_recall_container ags_channel_remove_recall_container ags_channel_add_recall ags_channel_remove_recall ags_channel_add_pattern ags_channel_remove_pattern ags_channel_add_effect ags_channel_remove_effect ags_channel_safe_resize_audio_signal ags_channel_duplicate_recall ags_channel_resolve_recall ags_channel_init_recall ags_channel_play ags_channel_done ags_channel_cancel ags_channel_remove ags_channel_recall_id_set ags_channel_find_port ags_channel_find_port_by_specifier_and_scope ags_channel_set_link ags_channel_set_recycling ags_channel_recursive_reset_recycling_context ags_channel_recycling_changed ags_channel_recursive_set_property ags_channel_recursive_play_init ags_channel_recursive_play_threaded ags_channel_recursive_play ags_channel_tillrecycling_cancel ags_channel_recursive_reset_recall_ids ags_channel_get_level ags_channel_recursive_reset_recall_id ags_channel_recursive_init ags_channel_recursive_run ags_channel_recursive_cancel ags_channel_new AGS_CHANNEL AGS_CHANNEL_CLASS AGS_CHANNEL_GET_CLASS AGS_IS_CHANNEL AGS_TYPE_CHANNEL AgsChannel AgsChannelClass ags_channel_get_type
ags_channel_iter AgsChannelIterFlags AgsChannelIterMode AgsChannelIter ags_channel_iter_alloc ags_channel_iter_free ags_channel_iter_prev ags_channel_iter_next ags_channel_iter_init
ags_channel_thread AgsChannelThread AGS_CHANNEL_THREAD_DEFAULT_JIFFIE AgsChannelThreadFlags ags_channel_thread_new AGS_CHANNEL_THREAD AGS_CHANNEL_THREAD_CLASS AGS_CHANNEL_THREAD_GET_CLASS AGS_IS_CHANNEL_THREAD AGS_TYPE_CHANNEL_THREAD AgsChannelThread AgsChannelThreadClass ags_channel_thread_get_type
ags_clear_audio_signal AgsClearAudioSignal ags_clear_audio_signal_new AGS_CLEAR_AUDIO_SIGNAL AGS_CLEAR_AUDIO_SIGNAL_CLASS AGS_CLEAR_AUDIO_SIGNAL_GET_CLASS AGS_IS_CLEAR_AUDIO_SIGNAL AGS_TYPE_CLEAR_AUDIO_SIGNAL AgsClearAudioSignal AgsClearAudioSignalClass ags_clear_audio_signal_get_type
ags_clear_buffer AgsClearBuffer ags_clear_buffer_new AGS_CLEAR_BUFFER AGS_CLEAR_BUFFER_CLASS AGS_CLEAR_BUFFER_GET_CLASS AGS_IS_CLEAR_BUFFER AGS_TYPE_CLEAR_BUFFER AgsClearBuffer AgsClearBufferClass ags_clear_buffer_get_type
ags_copy_audio_signal AgsCopyAudioSignal ags_copy_audio_signal_new AGS_COPY_AUDIO_SIGNAL AGS_COPY_AUDIO_SIGNAL_CLASS AGS_COPY_AUDIO_SIGNAL_GET_CLASS AGS_IS_COPY_AUDIO_SIGNAL AGS_TYPE_COPY_AUDIO_SIGNAL AgsCopyAudioSignal AgsCopyAudioSignalClass ags_copy_audio_signal_get_type
ags_copy_channel AgsCopyChannel ags_copy_channel_new AGS_COPY_CHANNEL AGS_COPY_CHANNEL_CLASS AGS_COPY_CHANNEL_GET_CLASS AGS_IS_COPY_CHANNEL AGS_TYPE_COPY_CHANNEL AgsCopyChannel AgsCopyChannelClass ags_copy_channel_get_type
ags_copy_channel_run AgsCopyChannelRun AgsCopyChannelRunFlags ags_copy_channel_run_new AGS_COPY_CHANNEL_RUN AGS_COPY_CHANNEL_RUN_CLASS AGS_COPY_CHANNEL_RUN_GET_CLASS AGS_IS_COPY_CHANNEL_RUN AGS_TYPE_COPY_CHANNEL_RUN AgsCopyChannelRun AgsCopyChannelRunClass ags_copy_channel_run_get_type
ags_copy_notation_audio AgsCopyNotationAudio AgsCopyNotationAudioFlags ags_copy_notation_audio_new AGS_COPY_NOTATION_AUDIO AGS_COPY_NOTATION_AUDIO_CLASS AGS_COPY_NOTATION_AUDIO_GET_CLASS AGS_IS_COPY_NOTATION_AUDIO AGS_TYPE_COPY_NOTATION_AUDIO AgsCopyNotationAudio AgsCopyNotationAudioClass ags_copy_notation_audio_get_type
ags_copy_notation_audio_run AgsCopyNotationAudioRun ags_copy_notation_audio_run_new AGS_COPY_NOTATION_AUDIO_RUN AGS_COPY_NOTATION_AUDIO_RUN_CLASS AGS_COPY_NOTATION_AUDIO_RUN_GET_CLASS AGS_IS_COPY_NOTATION_AUDIO_RUN AGS_TYPE_COPY_NOTATION_AUDIO_RUN AgsCopyNotationAudioRun AgsCopyNotationAudioRunClass ags_copy_notation_audio_run_get_type
ags_copy_pattern_audio AgsCopyPatternAudio ags_copy_pattern_audio_new AGS_COPY_PATTERN_AUDIO AGS_COPY_PATTERN_AUDIO_CLASS AGS_COPY_PATTERN_AUDIO_GET_CLASS AGS_IS_COPY_PATTERN_AUDIO AGS_TYPE_COPY_PATTERN_AUDIO AgsCopyPatternAudio AgsCopyPatternAudioClass ags_copy_pattern_audio_get_type
ags_copy_pattern_audio_run AgsCopyPatternAudioRun ags_copy_pattern_audio_run_new AGS_COPY_PATTERN_AUDIO_RUN AGS_COPY_PATTERN_AUDIO_RUN_CLASS AGS_COPY_PATTERN_AUDIO_RUN_GET_CLASS AGS_IS_COPY_PATTERN_AUDIO_RUN AGS_TYPE_COPY_PATTERN_AUDIO_RUN AgsCopyPatternAudioRun AgsCopyPatternAudioRunClass ags_copy_pattern_audio_run_get_type
ags_copy_pattern_channel AgsCopyPatternChannel ags_copy_pattern_channel_template_find_source_and_destination ags_copy_pattern_channel_new AGS_COPY_PATTERN_CHANNEL AGS_COPY_PATTERN_CHANNEL_CLASS AGS_COPY_PATTERN_CHANNEL_GET_CLASS AGS_IS_COPY_PATTERN_CHANNEL AGS_TYPE_COPY_PATTERN_CHANNEL AgsCopyPatternChannel AgsCopyPatternChannelClass ags_copy_pattern_channel_get_type
ags_copy_pattern_channel_run AgsCopyPatternChannelRun ags_copy_pattern_channel_run_new AGS_COPY_PATTERN_CHANNEL_RUN AGS_COPY_PATTERN_CHANNEL_RUN_CLASS AGS_COPY_PATTERN_CHANNEL_RUN_GET_CLASS AGS_IS_COPY_PATTERN_CHANNEL_RUN AGS_TYPE_COPY_PATTERN_CHANNEL_RUN AgsCopyPatternChannelRun AgsCopyPatternChannelRunClass ags_copy_pattern_channel_run_get_type
ags_copy_recycling AgsCopyRecycling ags_copy_recycling_new AGS_COPY_RECYCLING AGS_COPY_RECYCLING_CLASS AGS_COPY_RECYCLING_GET_CLASS AGS_IS_COPY_RECYCLING AGS_TYPE_COPY_RECYCLING AgsCopyRecycling AgsCopyRecyclingClass ags_copy_recycling_get_type
ags_core_audio_client AgsCoreAudioClient AgsCoreAudioClientFlags ags_core_audio_client_find_uuid ags_core_audio_client_find ags_core_audio_client_open ags_core_audio_client_add_device ags_core_audio_client_remove_device ags_core_audio_client_add_port ags_core_audio_client_remove_port ags_core_audio_client_activate ags_core_audio_client_deactivate ags_core_audio_client_new AGS_CORE_AUDIO_CLIENT AGS_CORE_AUDIO_CLIENT_CLASS AGS_CORE_AUDIO_CLIENT_GET_CLASS AGS_IS_CORE_AUDIO_CLIENT AGS_TYPE_CORE_AUDIO_CLIENT AgsCoreAudioClient AgsCoreAudioClientClass ags_core_audio_client_get_type
ags_core_audio_devout AgsCoreAudioDevout AgsCoreAudioDevoutFlags AgsCoreAudioDevoutSyncFlags AGS_CORE_AUDIO_DEVOUT_ERROR AgsCoreAudioDevoutError ags_core_audio_devout_error_quark ags_core_audio_devout_switch_buffer_flag ags_core_audio_devout_adjust_delay_and_attack ags_core_audio_devout_realloc_buffer ags_core_audio_devout_new AGS_CORE_AUDIO_DEVOUT AGS_CORE_AUDIO_DEVOUT_CLASS AGS_CORE_AUDIO_DEVOUT_GET_CLASS AGS_IS_CORE_AUDIO_DEVOUT AGS_TYPE_CORE_AUDIO_DEVOUT AgsCoreAudioDevout AgsCoreAudioDevoutClass ags_core_audio_devout_get_type
ags_core_audio_midiin AgsCoreAudioMidiin AGS_CORE_AUDIO_MIDIIN_DEFAULT_BUFFER_SIZE AgsCoreAudioMidiinFlags AgsCoreAudioMidiinSyncFlags AGS_CORE_AUDIO_MIDIIN_ERROR AgsCoreAudioMidiinError ags_core_audio_midiin_error_quark ags_core_audio_midiin_switch_buffer_flag ags_core_audio_midiin_new AGS_CORE_AUDIO_MIDIIN AGS_CORE_AUDIO_MIDIIN_CLASS AGS_CORE_AUDIO_MIDIIN_GET_CLASS AGS_IS_CORE_AUDIO_MIDIIN AGS_TYPE_CORE_AUDIO_MIDIIN AgsCoreAudioMidiin AgsCoreAudioMidiinClass ags_core_audio_midiin_get_type
ags_core_audio_port AgsCoreAudioPort AgsCoreAudioPortFlags ags_core_audio_port_find ags_core_audio_port_register ags_core_audio_port_unregister ags_core_audio_port_set_format ags_core_audio_port_set_samplerate ags_core_audio_port_set_pcm_channels ags_core_audio_port_set_buffer_size ags_core_audio_port_new AGS_CORE_AUDIO_PORT AGS_CORE_AUDIO_PORT_CLASS AGS_CORE_AUDIO_PORT_GET_CLASS AGS_IS_CORE_AUDIO_PORT AGS_TYPE_CORE_AUDIO_PORT AgsCoreAudioPort AgsCoreAudioPortClass ags_core_audio_port_get_type
ags_core_audio_server AgsCoreAudioServer AgsCoreAudioServerFlags ags_core_audio_server_find_url ags_core_audio_server_find_client ags_core_audio_server_find_port ags_core_audio_server_add_client ags_core_audio_server_remove_client ags_core_audio_server_connect_client ags_core_audio_server_start_poll ags_core_audio_server_new AGS_CORE_AUDIO_SERVER AGS_CORE_AUDIO_SERVER_CLASS AGS_CORE_AUDIO_SERVER_GET_CLASS AGS_IS_CORE_AUDIO_SERVER AGS_TYPE_CORE_AUDIO_SERVER AgsCoreAudioServer AgsCoreAudioServerClass ags_core_audio_server_get_type
ags_count_beats_audio AgsCountBeatsAudio ags_count_beats_audio_new AGS_COUNT_BEATS_AUDIO AGS_COUNT_BEATS_AUDIO_CLASS AGS_COUNT_BEATS_AUDIO_GET_CLASS AGS_IS_COUNT_BEATS_AUDIO AGS_TYPE_COUNT_BEATS_AUDIO AgsCountBeatsAudio AgsCountBeatsAudioClass ags_count_beats_audio_get_type
ags_count_beats_audio_run AgsCountBeatsAudioRun ags_count_beats_audio_run_notation_start ags_count_beats_audio_run_notation_loop ags_count_beats_audio_run_notation_stop ags_count_beats_audio_run_sequencer_start ags_count_beats_audio_run_sequencer_loop ags_count_beats_audio_run_sequencer_stop ags_count_beats_audio_run_new AGS_COUNT_BEATS_AUDIO_RUN AGS_COUNT_BEATS_AUDIO_RUN_CLASS AGS_COUNT_BEATS_AUDIO_RUN_GET_CLASS AGS_IS_COUNT_BEATS_AUDIO_RUN AGS_TYPE_COUNT_BEATS_AUDIO_RUN AgsCountBeatsAudioRun AgsCountBeatsAudioRunClass ags_count_beats_audio_run_get_type
ags_crop_note AgsCropNote AGS_CROP_NOTE_DEFAULT_X_LENGTH ags_crop_note_new AGS_CROP_NOTE AGS_CROP_NOTE_CLASS AGS_CROP_NOTE_GET_CLASS AGS_IS_CROP_NOTE AGS_TYPE_CROP_NOTE AgsCropNote AgsCropNoteClass ags_crop_note_get_type
ags_delay_audio AgsDelayAudio ags_delay_audio_notation_duration_changed ags_delay_audio_sequencer_duration_changed ags_delay_audio_new AGS_DELAY_AUDIO AGS_DELAY_AUDIO_CLASS AGS_DELAY_AUDIO_GET_CLASS AGS_IS_DELAY_AUDIO AGS_TYPE_DELAY_AUDIO AgsDelayAudio AgsDelayAudioClass ags_delay_audio_get_type
ags_delay_audio_run AgsDelayAudioRun ags_delay_audio_run_notation_alloc_output ags_delay_audio_run_notation_alloc_input ags_delay_audio_run_notation_count ags_delay_audio_run_sequencer_alloc_output ags_delay_audio_run_sequencer_alloc_input ags_delay_audio_run_sequencer_count ags_delay_audio_run_new AGS_DELAY_AUDIO_RUN AGS_DELAY_AUDIO_RUN_CLASS AGS_DELAY_AUDIO_RUN_GET_CLASS AGS_IS_DELAY_AUDIO_RUN AGS_TYPE_DELAY_AUDIO_RUN AgsDelayAudioRun AgsDelayAudioRunClass ags_delay_audio_run_get_type
ags_devin AgsDevin AGS_DEVIN_DEFAULT_ALSA_DEVICE AGS_DEVIN_DEFAULT_OSS_DEVICE AGS_DEVIN_DEFAULT_RING_BUFFER_SIZE AgsDevinFlags AGS_DEVIN_ERROR AgsDevinError ags_devin_error_quark ags_devin_switch_buffer_flag ags_devin_adjust_delay_and_attack ags_devin_realloc_buffer ags_devin_new AGS_DEVIN AGS_DEVIN_CLASS AGS_DEVIN_GET_CLASS AGS_IS_DEVIN AGS_TYPE_DEVIN AgsDevin AgsDevinClass ags_devin_get_type
ags_devout AgsDevout AGS_DEVOUT_DEFAULT_ALSA_DEVICE AGS_DEVOUT_DEFAULT_OSS_DEVICE AGS_DEVOUT_DEFAULT_RING_BUFFER_SIZE AgsDevoutFlags AGS_DEVOUT_ERROR AgsDevoutError ags_devout_error_quark ags_devout_switch_buffer_flag ags_devout_adjust_delay_and_attack ags_devout_realloc_buffer ags_devout_new AGS_DEVOUT AGS_DEVOUT_CLASS AGS_DEVOUT_GET_CLASS AGS_IS_DEVOUT AGS_TYPE_DEVOUT AgsDevout AgsDevoutClass ags_devout_get_type
ags_dssi_manager AgsDssiManager ags_dssi_manager_get_default_path ags_dssi_manager_set_default_path ags_dssi_manager_get_filenames ags_dssi_manager_find_dssi_plugin ags_dssi_manager_load_blacklist ags_dssi_manager_load_file ags_dssi_manager_load_default_directory ags_dssi_manager_get_instance ags_dssi_manager_new AGS_DSSI_MANAGER AGS_DSSI_MANAGER_CLASS AGS_DSSI_MANAGER_GET_CLASS AGS_IS_DSSI_MANAGER AGS_TYPE_DSSI_MANAGER AgsDssiManager AgsDssiManagerClass ags_dssi_manager_get_type
ags_dssi_plugin AgsDssiPlugin AGS_DSSI_PLUGIN_DESCRIPTOR ags_dssi_plugin_change_program ags_dssi_plugin_new AGS_DSSI_PLUGIN AGS_DSSI_PLUGIN_CLASS AGS_DSSI_PLUGIN_GET_CLASS AGS_IS_DSSI_PLUGIN AGS_TYPE_DSSI_PLUGIN AgsDssiPlugin AgsDssiPluginClass ags_dssi_plugin_get_type
ags_effect AGS_EFFECT_COPY_STREAM AGS_EFFECT_COPY_BUFFER AGS_EFFECT_DOWN_MIX
ags_envelope_audio_signal AgsEnvelopeAudioSignal ags_envelope_audio_signal_new AGS_ENVELOPE_AUDIO_SIGNAL AGS_ENVELOPE_AUDIO_SIGNAL_CLASS AGS_ENVELOPE_AUDIO_SIGNAL_GET_CLASS AGS_IS_ENVELOPE_AUDIO_SIGNAL AGS_TYPE_ENVELOPE_AUDIO_SIGNAL AgsEnvelopeAudioSignal AgsEnvelopeAudioSignalClass ags_envelope_audio_signal_get_type
ags_envelope_channel AgsEnvelopeChannel ags_envelope_channel_new AGS_ENVELOPE_CHANNEL AGS_ENVELOPE_CHANNEL_CLASS AGS_ENVELOPE_CHANNEL_GET_CLASS AGS_IS_ENVELOPE_CHANNEL AGS_TYPE_ENVELOPE_CHANNEL AgsEnvelopeChannel AgsEnvelopeChannelClass ags_envelope_channel_get_type
ags_envelope_channel_run AgsEnvelopeChannelRun ags_envelope_channel_run_new AGS_ENVELOPE_CHANNEL_RUN AGS_ENVELOPE_CHANNEL_RUN_CLASS AGS_ENVELOPE_CHANNEL_RUN_GET_CLASS AGS_IS_ENVELOPE_CHANNEL_RUN AGS_TYPE_ENVELOPE_CHANNEL_RUN AgsEnvelopeChannelRun AgsEnvelopeChannelRunClass ags_envelope_channel_run_get_type
ags_envelope_recycling AgsEnvelopeRecycling ags_envelope_recycling_new AGS_ENVELOPE_RECYCLING AGS_ENVELOPE_RECYCLING_CLASS AGS_ENVELOPE_RECYCLING_GET_CLASS AGS_IS_ENVELOPE_RECYCLING AGS_TYPE_ENVELOPE_RECYCLING AgsEnvelopeRecycling AgsEnvelopeRecyclingClass ags_envelope_recycling_get_type
ags_export_output AgsExportOutput AgsExportOutputFormat ags_export_output_new AGS_EXPORT_OUTPUT AGS_EXPORT_OUTPUT_CLASS AGS_EXPORT_OUTPUT_GET_CLASS AGS_IS_EXPORT_OUTPUT AGS_TYPE_EXPORT_OUTPUT AgsExportOutput AgsExportOutputClass ags_export_output_get_type
ags_export_thread AgsExportThread AGS_EXPORT_THREAD_DEFAULT_JIFFIE AgsExportThreadFlags ags_export_thread_find_soundcard ags_export_thread_new AGS_EXPORT_THREAD AGS_EXPORT_THREAD_CLASS AGS_EXPORT_THREAD_GET_CLASS AGS_IS_EXPORT_THREAD AGS_TYPE_EXPORT_THREAD AgsExportThread AgsExportThreadClass ags_export_thread_get_type
ags_feed_audio_signal AgsFeedAudioSignal ags_feed_audio_signal_new AGS_FEED_AUDIO_SIGNAL AGS_FEED_AUDIO_SIGNAL_CLASS AGS_FEED_AUDIO_SIGNAL_GET_CLASS AGS_IS_FEED_AUDIO_SIGNAL AGS_TYPE_FEED_AUDIO_SIGNAL AgsFeedAudioSignal AgsFeedAudioSignalClass ags_feed_audio_signal_get_type
ags_feed_channel AgsFeedChannel ags_feed_channel_new AGS_FEED_CHANNEL AGS_FEED_CHANNEL_CLASS AGS_FEED_CHANNEL_GET_CLASS AGS_IS_FEED_CHANNEL AGS_TYPE_FEED_CHANNEL AgsFeedChannel AgsFeedChannelClass ags_feed_channel_get_type
ags_feed_channel_run AgsFeedChannelRun ags_feed_channel_run_new AGS_FEED_CHANNEL_RUN AGS_FEED_CHANNEL_RUN_CLASS AGS_FEED_CHANNEL_RUN_GET_CLASS AGS_IS_FEED_CHANNEL_RUN AGS_TYPE_FEED_CHANNEL_RUN AgsFeedChannelRun AgsFeedChannelRunClass ags_feed_channel_run_get_type
ags_feed_recycling AgsFeedRecycling ags_feed_recycling_new AGS_FEED_RECYCLING AGS_FEED_RECYCLING_CLASS AGS_FEED_RECYCLING_GET_CLASS AGS_IS_FEED_RECYCLING AGS_TYPE_FEED_RECYCLING AgsFeedRecycling AgsFeedRecyclingClass ags_feed_recycling_get_type
ags_fifoout AgsFifoout AGS_FIFOOUT_DEFAULT_ALSA_DEVICE AGS_FIFOOUT_DEFAULT_OSS_DEVICE AgsFifooutFlags AGS_FIFOOUT_ERROR AgsFifooutError ags_fifoout_error_quark ags_fifoout_adjust_delay_and_attack ags_fifoout_realloc_buffer ags_fifoout_new AGS_FIFOOUT AGS_FIFOOUT_CLASS AGS_FIFOOUT_GET_CLASS AGS_IS_FIFOOUT AGS_TYPE_FIFOOUT AgsFifoout AgsFifooutClass ags_fifoout_get_type
ags_free_selection AgsFreeSelection ags_free_selection_new AGS_FREE_SELECTION AGS_FREE_SELECTION_CLASS AGS_FREE_SELECTION_GET_CLASS AGS_IS_FREE_SELECTION AGS_TYPE_FREE_SELECTION AgsFreeSelection AgsFreeSelectionClass ags_free_selection_get_type
ags_init_audio AgsInitAudio ags_init_audio_new AGS_INIT_AUDIO AGS_INIT_AUDIO_CLASS AGS_INIT_AUDIO_GET_CLASS AGS_IS_INIT_AUDIO AGS_TYPE_INIT_AUDIO AgsInitAudio AgsInitAudioClass ags_init_audio_get_type
ags_init_channel AgsInitChannel ags_init_channel_new AGS_INIT_CHANNEL AGS_INIT_CHANNEL_CLASS AGS_INIT_CHANNEL_GET_CLASS AGS_IS_INIT_CHANNEL AGS_TYPE_INIT_CHANNEL AgsInitChannel AgsInitChannelClass ags_init_channel_get_type
ags_input AgsInput AGS_INPUT_SYNTH_BASE_NOTE ags_input_open_file ags_input_apply_synth ags_input_apply_synth_extended ags_input_is_active ags_input_next_active ags_input_new AGS_INPUT AGS_INPUT_CLASS AGS_INPUT_GET_CLASS AGS_IS_INPUT AGS_TYPE_INPUT AgsInput AgsInputClass ags_input_get_type
ags_ipatch AgsIpatch AGS_IPATCH_DEFAULT_CHANNELS AGS_IPATCH_READ AGS_IPATCH_WRITE AgsIpatchFlags ags_ipatch_check_suffix ags_ipatch_new AGS_IPATCH AGS_IPATCH_CLASS AGS_IPATCH_GET_CLASS AGS_IS_IPATCH AGS_TYPE_IPATCH AgsIpatch AgsIpatchClass ags_ipatch_get_type
ags_ipatch_dls2_reader AgsIpatchDLS2Reader AgsDLS2Levels ags_ipatch_dls2_reader_new AGS_IPATCH_DLS2_READER AGS_IPATCH_DLS2_READER_CLASS AGS_IPATCH_DLS2_READER_GET_CLASS AGS_IS_IPATCH_DLS2_READER AGS_TYPE_IPATCH_DLS2_READER AgsIpatchDLS2Reader AgsIpatchDLS2ReaderClass ags_ipatch_dls2_reader_get_type
ags_ipatch_sf2_reader AgsIpatchSF2Reader AgsSF2Levels ags_ipatch_sf2_reader_new AGS_IPATCH_SF2_READER AGS_IPATCH_SF2_READER_CLASS AGS_IPATCH_SF2_READER_GET_CLASS AGS_IS_IPATCH_SF2_READER AGS_TYPE_IPATCH_SF2_READER AgsIpatchSF2Reader AgsIpatchSF2ReaderClass ags_ipatch_sf2_reader_get_type
ags_iterator_thread AgsIteratorThread AgsIteratorThreadFlags ags_iterator_thread_children_ready ags_iterator_thread_new AGS_IS_ITERATOR_THREAD AGS_ITERATOR_THREAD AGS_ITERATOR_THREAD_CLASS AGS_ITERATOR_THREAD_GET_CLASS AGS_TYPE_ITERATOR_THREAD AgsIteratorThread AgsIteratorThreadClass ags_iterator_thread_get_type
ags_jack_client AgsJackClient AgsJackClientFlags ags_jack_client_find_uuid ags_jack_client_find ags_jack_client_open ags_jack_client_add_device ags_jack_client_remove_device ags_jack_client_add_port ags_jack_client_remove_port ags_jack_client_activate ags_jack_client_deactivate ags_jack_client_new AGS_IS_JACK_CLIENT AGS_JACK_CLIENT AGS_JACK_CLIENT_CLASS AGS_JACK_CLIENT_GET_CLASS AGS_TYPE_JACK_CLIENT AgsJackClient AgsJackClientClass ags_jack_client_get_type
ags_jack_devin AgsJackDevin AgsJackDevinFlags AgsJackDevinSyncFlags AGS_JACK_DEVIN_ERROR AgsJackDevinError ags_jack_devin_error_quark ags_jack_devin_switch_buffer_flag ags_jack_devin_adjust_delay_and_attack ags_jack_devin_realloc_buffer ags_jack_devin_new AGS_IS_JACK_DEVIN AGS_JACK_DEVIN AGS_JACK_DEVIN_CLASS AGS_JACK_DEVIN_GET_CLASS AGS_TYPE_JACK_DEVIN AgsJackDevin AgsJackDevinClass ags_jack_devin_get_type
ags_jack_devout AgsJackDevout AgsJackDevoutFlags AgsJackDevoutSyncFlags AGS_JACK_DEVOUT_ERROR AgsJackDevoutError ags_jack_devout_error_quark ags_jack_devout_switch_buffer_flag ags_jack_devout_adjust_delay_and_attack ags_jack_devout_realloc_buffer ags_jack_devout_new AGS_IS_JACK_DEVOUT AGS_JACK_DEVOUT AGS_JACK_DEVOUT_CLASS AGS_JACK_DEVOUT_GET_CLASS AGS_TYPE_JACK_DEVOUT AgsJackDevout AgsJackDevoutClass ags_jack_devout_get_type
ags_jack_midiin AgsJackMidiin AGS_JACK_MIDIIN_DEFAULT_BUFFER_SIZE AgsJackMidiinFlags AgsJackMidiinSyncFlags AGS_JACK_MIDIIN_ERROR AgsJackMidiinError ags_jack_midiin_error_quark ags_jack_midiin_switch_buffer_flag ags_jack_midiin_new AGS_IS_JACK_MIDIIN AGS_JACK_MIDIIN AGS_JACK_MIDIIN_CLASS AGS_JACK_MIDIIN_GET_CLASS AGS_TYPE_JACK_MIDIIN AgsJackMidiin AgsJackMidiinClass ags_jack_midiin_get_type
ags_jack_port AgsJackPort AgsJackPortFlags ags_jack_port_find ags_jack_port_register ags_jack_port_unregister ags_jack_port_new AGS_IS_JACK_PORT AGS_JACK_PORT AGS_JACK_PORT_CLASS AGS_JACK_PORT_GET_CLASS AGS_TYPE_JACK_PORT AgsJackPort AgsJackPortClass ags_jack_port_get_type
ags_jack_server AgsJackServer AGS_JACK_SERVER_DEFAULT_PROTOCOL AGS_JACK_SERVER_DEFAULT_HOST AGS_JACK_SERVER_DEFAULT_PORT AgsJackServerFlags ags_jack_server_find_url ags_jack_server_find_client ags_jack_server_find_port ags_jack_server_add_client ags_jack_server_remove_client ags_jack_server_connect_client ags_jack_server_new AGS_IS_JACK_SERVER AGS_JACK_SERVER AGS_JACK_SERVER_CLASS AGS_JACK_SERVER_GET_CLASS AGS_TYPE_JACK_SERVER AgsJackServer AgsJackServerClass ags_jack_server_get_type
ags_ladspa_conversion AgsLadspaConversion AgsLadspaConversionFlags ags_ladspa_conversion_new AGS_IS_LADSPA_CONVERSION AGS_LADSPA_CONVERSION AGS_LADSPA_CONVERSION_CLASS AGS_LADSPA_CONVERSION_GET_CLASS AGS_TYPE_LADSPA_CONVERSION AgsLadspaConversion AgsLadspaConversionClass ags_ladspa_conversion_get_type
ags_ladspa_manager AgsLadspaManager ags_ladspa_manager_get_default_path ags_ladspa_manager_set_default_path ags_ladspa_manager_get_filenames ags_ladspa_manager_find_ladspa_plugin ags_ladspa_manager_load_blacklist ags_ladspa_manager_load_file ags_ladspa_manager_load_default_directory ags_ladspa_manager_get_instance ags_ladspa_manager_new AGS_IS_LADSPA_MANAGER AGS_LADSPA_MANAGER AGS_LADSPA_MANAGER_CLASS AGS_LADSPA_MANAGER_GET_CLASS AGS_TYPE_LADSPA_MANAGER AgsLadspaManager AgsLadspaManagerClass ags_ladspa_manager_get_type
ags_ladspa_plugin AgsLadspaPlugin AGS_LADSPA_PLUGIN_DESCRIPTOR ags_ladspa_plugin_new AGS_IS_LADSPA_PLUGIN AGS_LADSPA_PLUGIN AGS_LADSPA_PLUGIN_CLASS AGS_LADSPA_PLUGIN_GET_CLASS AGS_TYPE_LADSPA_PLUGIN AgsLadspaPlugin AgsLadspaPluginClass ags_ladspa_plugin_get_type
ags_link_channel AgsLinkChannel ags_link_channel_new AGS_IS_LINK_CHANNEL AGS_LINK_CHANNEL AGS_LINK_CHANNEL_CLASS AGS_LINK_CHANNEL_GET_CLASS AGS_TYPE_LINK_CHANNEL AgsLinkChannel AgsLinkChannelClass ags_link_channel_get_type
ags_loop_channel AgsLoopChannel ags_loop_channel_new AGS_IS_LOOP_CHANNEL AGS_LOOP_CHANNEL AGS_LOOP_CHANNEL_CLASS AGS_LOOP_CHANNEL_GET_CLASS AGS_TYPE_LOOP_CHANNEL AgsLoopChannel AgsLoopChannelClass ags_loop_channel_get_type
ags_loop_channel_run AgsLoopChannelRun ags_loop_channel_run_new AGS_IS_LOOP_CHANNEL_RUN AGS_LOOP_CHANNEL_RUN AGS_LOOP_CHANNEL_RUN_CLASS AGS_LOOP_CHANNEL_RUN_GET_CLASS AGS_TYPE_LOOP_CHANNEL_RUN AgsLoopChannelRun AgsLoopChannelRunClass ags_loop_channel_run_get_type
ags_lv2_conversion AgsLv2Conversion AgsLv2ConversionFlaags ags_lv2_conversion_new AGS_IS_LV2_CONVERSION AGS_LV2_CONVERSION AGS_LV2_CONVERSION_CLASS AGS_LV2_CONVERSION_GET_CLASS AGS_TYPE_LV2_CONVERSION AgsLv2Conversion AgsLv2ConversionClass ags_lv2_conversion_get_type
ags_lv2_event_manager AgsLv2EventManager ags_lv2_event_manager_lv2_event_ref ags_lv2_event_manager_lv2_event_unref ags_lv2_event_manager_get_instance ags_lv2_event_manager_new AGS_IS_LV2_EVENT_MANAGER AGS_LV2_EVENT_MANAGER AGS_LV2_EVENT_MANAGER_CLASS AGS_LV2_EVENT_MANAGER_GET_CLASS AGS_TYPE_LV2_EVENT_MANAGER AgsLv2EventManager AgsLv2EventManagerClass ags_lv2_event_manager_get_type
ags_lv2_log_manager AgsLv2LogManager ags_lv2_log_manager_printf ags_lv2_log_manager_vprintf ags_lv2_log_manager_get_instance ags_lv2_log_manager_new AGS_IS_LV2_LOG_MANAGER AGS_LV2_LOG_MANAGER AGS_LV2_LOG_MANAGER_CLASS AGS_LV2_LOG_MANAGER_GET_CLASS AGS_TYPE_LV2_LOG_MANAGER AgsLv2LogManager AgsLv2LogManagerClass ags_lv2_log_manager_get_type
ags_lv2_manager AgsLv2Manager AGS_LV2_MANAGER_DEFAULT_LOCALE ags_lv2_manager_get_default_path ags_lv2_manager_set_default_path ags_lv2_manager_get_filenames ags_lv2_manager_find_lv2_plugin ags_lv2_manager_load_blacklist ags_lv2_manager_load_file ags_lv2_manager_load_preset ags_lv2_manager_load_default_directory ags_lv2_manager_get_instance ags_lv2_manager_new AGS_IS_LV2_MANAGER AGS_LV2_MANAGER AGS_LV2_MANAGER_CLASS AGS_LV2_MANAGER_GET_CLASS AGS_TYPE_LV2_MANAGER AgsLv2Manager AgsLv2ManagerClass ags_lv2_manager_get_type
ags_lv2_option_manager AgsLv2OptionManager AGS_LV2_OPTION_RESSOURCE AGS_LV2_OPTIONS_OPTION AgsLv2OptionRessource ags_lv2_option_ressource_alloc ags_lv2_option_manager_ressource_insert ags_lv2_option_manager_ressource_remove ags_lv2_option_manager_ressource_lookup ags_lv2_option_manager_ressource_lookup_extended ags_lv2_option_manager_get_option ags_lv2_option_manager_set_option ags_lv2_option_manager_lv2_options_get ags_lv2_option_manager_lv2_options_set ags_lv2_option_manager_get_instance ags_lv2_option_manager_new AGS_IS_LV2_OPTION_MANAGER AGS_LV2_OPTION_MANAGER AGS_LV2_OPTION_MANAGER_CLASS AGS_LV2_OPTION_MANAGER_GET_CLASS AGS_TYPE_LV2_OPTION_MANAGER AgsLv2OptionManager AgsLv2OptionManagerClass ags_lv2_option_manager_get_type
ags_lv2_plugin AgsLv2Plugin AGS_LV2_PLUGIN_DESCRIPTOR AGS_LV2_EVENT_BUFFER AGS_LV2_EVENT AGS_LV2_EVENT_DATA AGS_LV2_ATOM_SEQUENCE AGS_LV2_ATOM_EVENT AgsLv2PluginFlags ags_lv2_plugin_event_buffer_alloc ags_lv2_plugin_event_buffer_realloc_data ags_lv2_plugin_event_buffer_concat ags_lv2_plugin_event_buffer_append_midi ags_lv2_plugin_event_buffer_remove_midi ags_lv2_plugin_clear_event_buffer ags_lv2_plugin_alloc_atom_sequence ags_lv2_plugin_concat_atom_sequence ags_lv2_plugin_atom_sequence_append_midi ags_lv2_plugin_atom_sequence_remove_midi ags_lv2_plugin_clear_atom_sequence ags_lv2_plugin_find_pname ags_lv2_plugin_change_program ags_lv2_plugin_new AGS_IS_LV2_PLUGIN AGS_LV2_PLUGIN AGS_LV2_PLUGIN_CLASS AGS_LV2_PLUGIN_GET_CLASS AGS_TYPE_LV2_PLUGIN AgsLv2Plugin AgsLv2PluginClass ags_lv2_plugin_get_type
ags_lv2_preset AgsLv2Preset AGS_LV2_PORT_PRESET AgsLv2PresetFlags AgsLv2PortPreset ags_lv2_port_preset_alloc ags_lv2_port_preset_free ags_lv2_preset_parse_turtle ags_lv2_preset_find_preset_label ags_lv2_preset_new AGS_IS_LV2_PRESET AGS_LV2_PRESET AGS_LV2_PRESET_CLASS AGS_LV2_PRESET_GET_CLASS AGS_TYPE_LV2_PRESET AgsLv2Preset AgsLv2PresetClass ags_lv2_preset_get_type
ags_lv2_uri_map_manager AgsLv2UriMapManager ags_lv2_uri_map_manager_insert ags_lv2_uri_map_manager_remove ags_lv2_uri_map_manager_lookup ags_lv2_uri_map_manager_load_default ags_lv2_uri_map_manager_uri_to_id ags_lv2_uri_map_manager_get_instance ags_lv2_uri_map_manager_new AGS_IS_LV2_URI_MAP_MANAGER AGS_LV2_URI_MAP_MANAGER AGS_LV2_URI_MAP_MANAGER_CLASS AGS_LV2_URI_MAP_MANAGER_GET_CLASS AGS_TYPE_LV2_URI_MAP_MANAGER AgsLv2UriMapManager AgsLv2UriMapManagerClass ags_lv2_uri_map_manager_get_type
ags_lv2_urid_manager AgsLv2UridManager ags_lv2_urid_manager_insert ags_lv2_urid_manager_remove ags_lv2_urid_manager_lookup ags_lv2_urid_manager_load_default ags_lv2_urid_manager_map ags_lv2_urid_manager_unmap ags_lv2_urid_manager_get_instance ags_lv2_urid_manager_new AGS_IS_LV2_URID_MANAGER AGS_LV2_URID_MANAGER AGS_LV2_URID_MANAGER_CLASS AGS_LV2_URID_MANAGER_GET_CLASS AGS_TYPE_LV2_URID_MANAGER AgsLv2UridManager AgsLv2UridManagerClass ags_lv2_urid_manager_get_type
ags_lv2_worker AgsLv2Worker AGS_LV2_WORKER_RESPONSE_DATA AgsLv2WorkerFlags AgsLv2WorkerResponseData ags_lv2_worker_alloc_response_data ags_lv2_worker_free_response_data ags_lv2_worker_respond ags_lv2_worker_schedule_work ags_lv2_worker_safe_run ags_lv2_worker_interrupted_callback ags_lv2_worker_new AGS_IS_LV2_WORKER AGS_LV2_WORKER AGS_LV2_WORKER_CLASS AGS_LV2_WORKER_GET_CLASS AGS_TYPE_LV2_WORKER AgsLv2Worker AgsLv2WorkerClass ags_lv2_worker_get_type
ags_lv2_worker_manager AgsLv2WorkerManager ags_lv2_worker_manager_pull_worker ags_lv2_worker_manager_get_instance ags_lv2_worker_manager_new AGS_IS_LV2_WORKER_MANAGER AGS_LV2_WORKER_MANAGER AGS_LV2_WORKER_MANAGER_CLASS AGS_LV2_WORKER_MANAGER_GET_CLASS AGS_TYPE_LV2_WORKER_MANAGER AgsLv2WorkerManager AgsLv2WorkerManagerClass ags_lv2_worker_manager_get_type
ags_lv2ui_manager AgsLv2uiManager ags_lv2ui_manager_get_default_path ags_lv2ui_manager_set_default_path ags_lv2ui_manager_get_filenames ags_lv2ui_manager_find_lv2ui_plugin ags_lv2ui_manager_find_lv2ui_plugin_with_index ags_lv2ui_manager_load_blacklist ags_lv2ui_manager_load_file ags_lv2ui_manager_load_default_directory ags_lv2ui_manager_get_instance ags_lv2ui_manager_new AGS_IS_LV2UI_MANAGER AGS_LV2UI_MANAGER AGS_LV2UI_MANAGER_CLASS AGS_LV2UI_MANAGER_GET_CLASS AGS_TYPE_LV2UI_MANAGER AgsLv2uiManager AgsLv2uiManagerClass ags_lv2ui_manager_get_type
ags_lv2ui_plugin AgsLv2uiPlugin AgsLv2uiPluginFlags ags_lv2ui_plugin_find_gui_uri ags_lv2ui_plugin_new AGS_IS_LV2UI_PLUGIN AGS_LV2UI_PLUGIN AGS_LV2UI_PLUGIN_CLASS AGS_LV2UI_PLUGIN_GET_CLASS AGS_TYPE_LV2UI_PLUGIN AgsLv2uiPlugin AgsLv2uiPluginClass ags_lv2ui_plugin_get_type
ags_message AgsMessage AgsMessageMode ags_message_key_on ags_message_key_off ags_message_key_pressure ags_message_change_parameter ags_message_change_mode ags_message_pitch_bend ags_message_set_bpm ags_message_set_delay_factor AGS_IS_MESSAGE AGS_IS_MESSAGE_INTERFACE AGS_MESSAGE AGS_MESSAGE_GET_INTERFACE AGS_MESSAGE_INTERFACE AGS_TYPE_MESSAGE AgsMessage AgsMessageInterface
ags_midi_buffer_util AgsMidiBufferUtilMtcQuarterFrameMessageType AgsMidiBufferUtilSmtpeFrameRate ags_midi_buffer_util_get_varlength_size ags_midi_buffer_util_put_varlength ags_midi_buffer_util_get_varlength ags_midi_buffer_util_put_int16 ags_midi_buffer_util_get_int16 ags_midi_buffer_util_put_int24 ags_midi_buffer_util_get_int24 ags_midi_buffer_util_put_int32 ags_midi_buffer_util_get_int32 ags_midi_buffer_util_put_header ags_midi_buffer_util_get_header ags_midi_buffer_util_put_track ags_midi_buffer_util_get_track ags_midi_buffer_util_put_key_on ags_midi_buffer_util_get_key_on ags_midi_buffer_util_put_key_off ags_midi_buffer_util_get_key_off ags_midi_buffer_util_put_key_pressure ags_midi_buffer_util_get_key_pressure ags_midi_buffer_util_put_change_parameter ags_midi_buffer_util_get_change_parameter ags_midi_buffer_util_put_pitch_bend ags_midi_buffer_util_get_pitch_bend ags_midi_buffer_util_put_change_program ags_midi_buffer_util_get_change_program ags_midi_buffer_util_put_change_pressure ags_midi_buffer_util_get_change_pressure ags_midi_buffer_util_put_sysex ags_midi_buffer_util_get_sysex ags_midi_buffer_util_put_quarter_frame ags_midi_buffer_util_get_quarter_frame ags_midi_buffer_util_put_song_position ags_midi_buffer_util_get_song_position ags_midi_buffer_util_put_song_select ags_midi_buffer_util_get_song_select ags_midi_buffer_util_put_tune_request ags_midi_buffer_util_get_tune_request ags_midi_buffer_util_put_sequence_number ags_midi_buffer_util_get_sequence_number ags_midi_buffer_util_put_smtpe ags_midi_buffer_util_get_smtpe ags_midi_buffer_util_put_tempo ags_midi_buffer_util_get_tempo ags_midi_buffer_util_put_time_signature ags_midi_buffer_util_get_time_signature ags_midi_buffer_util_put_key_signature ags_midi_buffer_util_get_key_signature ags_midi_buffer_util_put_sequencer_meta_event ags_midi_buffer_util_get_sequencer_meta_event ags_midi_buffer_util_put_text_event ags_midi_buffer_util_get_text_event ags_midi_buffer_util_put_end_of_track ags_midi_buffer_util_get_end_of_track ags_midi_buffer_util_seek_message ags_midi_buffer_util_decode
ags_midi_builder AgsMidiBuilder AGS_MIDI_BUILDER_HEADER AGS_MIDI_BUILDER_TRACK AgsMidiBuilderFlags AgsMidiBuilderHeader AgsMidiBuilderTrack ags_midi_builder_header_alloc ags_midi_builder_header_free ags_midi_builder_track_alloc ags_midi_builder_track_free ags_midi_builder_track_find_delta_time_with_track_name ags_midi_builder_track_insert_midi_message ags_midi_builder_track_get_delta_time_offset ags_midi_builder_midi_putc ags_midi_builder_on_error ags_midi_builder_append_header ags_midi_builder_append_track ags_midi_builder_append_key_on ags_midi_builder_append_key_off ags_midi_builder_append_key_pressure ags_midi_builder_append_change_parameter ags_midi_builder_append_change_pitch_bend ags_midi_builder_append_change_program ags_midi_builder_append_change_pressure ags_midi_builder_append_sysex ags_midi_builder_append_quarter_frame ags_midi_builder_append_song_position ags_midi_builder_append_song_select ags_midi_builder_append_tune_request ags_midi_builder_append_sequence_number ags_midi_builder_append_smtpe ags_midi_builder_append_tempo ags_midi_builder_append_time_signature ags_midi_builder_append_key_signature ags_midi_builder_append_sequencer_meta_event ags_midi_builder_append_text_event ags_midi_builder_append_xml_node ags_midi_builder_from_xml_doc ags_midi_builder_build ags_midi_builder_new AGS_IS_MIDI_BUILDER AGS_MIDI_BUILDER AGS_MIDI_BUILDER_CLASS AGS_MIDI_BUILDER_GET_CLASS AGS_TYPE_MIDI_BUILDER AgsMidiBuilder AgsMidiBuilderClass ags_midi_builder_get_type
ags_midi_file AgsMidiFile AGS_MIDI_FILE_TRACK AGS_MIDI_FILE_MAX_TEXT_LENGTH AGS_MIDI_FILE_MTHD AGS_MIDI_FILE_MTRK AGS_MIDI_FILE_DEFAULT_OFFSET AGS_MIDI_FILE_DEFAULT_FORMAT AGS_MIDI_FILE_DEFAULT_BEATS AGS_MIDI_FILE_DEFAULT_FPS AGS_MIDI_FILE_DEFAULT_TICKS AgsMidiFileStatus AgsMidiFileFlags AgsMidiFileTrack ags_midi_file_open ags_midi_file_open_from_data ags_midi_file_rw_open ags_midi_file_close ags_midi_file_read ags_midi_file_write ags_midi_file_seek ags_midi_file_flush ags_midi_file_read_gint16 ags_midi_file_read_gint24 ags_midi_file_read_gint32 ags_midi_file_read_varlength ags_midi_file_read_text ags_midi_file_write_gint16 ags_midi_file_write_gint24 ags_midi_file_write_gint32 ags_midi_file_write_varlength ags_midi_file_write_text ags_midi_file_read_header ags_midi_file_write_header ags_midi_file_read_track_data ags_midi_file_write_track_data ags_midi_file_new AGS_IS_MIDI_FILE AGS_MIDI_FILE AGS_MIDI_FILE_CLASS AGS_MIDI_FILE_GET_CLASS AGS_TYPE_MIDI_FILE AgsMidiFile AgsMidiFileClass ags_midi_file_get_type
ags_midi_parser AgsMidiParser AGS_MIDI_PARSER_MAX_TEXT_LENGTH AGS_MIDI_PARSER_MTHD AGS_MIDI_PARSER_MTCK AGS_MIDI_EVENT AgsMidiParserFlags AgsMidiChunkFlags ags_midi_parser_read_gint16 ags_midi_parser_read_gint24 ags_midi_parser_read_gint32 ags_midi_parser_read_varlength ags_midi_parser_read_text ags_midi_parser_ticks_to_sec ags_midi_parser_midi_getc ags_midi_parser_on_error ags_midi_parser_parse_full ags_midi_parser_parse_bytes ags_midi_parser_parse_header ags_midi_parser_parse_track ags_midi_parser_channel_message ags_midi_parser_key_on ags_midi_parser_key_off ags_midi_parser_key_pressure ags_midi_parser_change_parameter ags_midi_parser_change_pitch_bend ags_midi_parser_change_program ags_midi_parser_change_channel_pressure ags_midi_parser_not_defined ags_midi_parser_sysex ags_midi_parser_system_common ags_midi_parser_meta_event ags_midi_parser_sequence_number ags_midi_parser_end_of_track ags_midi_parser_smtpe ags_midi_parser_tempo ags_midi_parser_time_signature ags_midi_parser_key_signature ags_midi_parser_sequencer_meta_event ags_midi_parser_meta_misc ags_midi_parser_text_event ags_midi_parser_new AGS_IS_MIDI_PARSER AGS_MIDI_PARSER AGS_MIDI_PARSER_CLASS AGS_MIDI_PARSER_GET_CLASS AGS_TYPE_MIDI_PARSER AgsMidiParser AgsMidiParserClass ags_midi_parser_get_type
ags_midi_util ags_midi_util_is_key_on ags_midi_util_is_key_off ags_midi_util_is_key_pressure ags_midi_util_is_change_parameter ags_midi_util_is_pitch_bend ags_midi_util_is_change_program ags_midi_util_is_change_pressure ags_midi_util_is_sysex ags_midi_util_is_quarter_frame ags_midi_util_is_song_position ags_midi_util_is_song_select ags_midi_util_is_tune_request ags_midi_util_is_meta_event ags_midi_util_to_smf ags_midi_util_envelope_to_velocity ags_midi_util_velocity_to_envelope ags_midi_util_envelope_to_pressure ags_midi_util_pressure_to_envelope ags_midi_util_delta_time_to_offset ags_midi_util_offset_to_delta_time
ags_midiin AgsMidiin AGS_MIDIIN_DEFAULT_ALSA_DEVICE AGS_MIDIIN_DEFAULT_OSS_DEVICE AGS_MIDIIN_DEFAULT_BUFFER_SIZE AgsMidiinFlags AgsMidiinSyncFlags AGS_MIDIIN_ERROR AgsMidiinError ags_midiin_error_quark ags_midiin_switch_buffer_flag ags_midiin_new AGS_IS_MIDIIN AGS_MIDIIN AGS_MIDIIN_CLASS AGS_MIDIIN_GET_CLASS AGS_TYPE_MIDIIN AgsMidiin AgsMidiinClass ags_midiin_get_type
ags_move_note AgsMoveNote AGS_MOVE_NOTE_DEFAULT_X_LENGTH AGS_MOVE_NOTE_DEFAULT_Y_LENGTH ags_move_note_new AGS_IS_MOVE_NOTE AGS_MOVE_NOTE AGS_MOVE_NOTE_CLASS AGS_MOVE_NOTE_GET_CLASS AGS_TYPE_MOVE_NOTE AgsMoveNote AgsMoveNoteClass ags_move_note_get_type
ags_mute_audio AgsMuteAudio ags_mute_audio_new AGS_IS_MUTE_AUDIO AGS_MUTE_AUDIO AGS_MUTE_AUDIO_CLASS AGS_MUTE_AUDIO_GET_CLASS AGS_TYPE_MUTE_AUDIO AgsMuteAudio AgsMuteAudioClass ags_mute_audio_get_type
ags_mute_audio_run AgsMuteAudioRun ags_mute_audio_run_new AGS_IS_MUTE_AUDIO_RUN AGS_MUTE_AUDIO_RUN AGS_MUTE_AUDIO_RUN_CLASS AGS_MUTE_AUDIO_RUN_GET_CLASS AGS_TYPE_MUTE_AUDIO_RUN AgsMuteAudioRun AgsMuteAudioRunClass ags_mute_audio_run_get_type
ags_mute_audio_signal AgsMuteAudioSignal ags_mute_audio_signal_new AGS_IS_MUTE_AUDIO_SIGNAL AGS_MUTE_AUDIO_SIGNAL AGS_MUTE_AUDIO_SIGNAL_CLASS AGS_MUTE_AUDIO_SIGNAL_GET_CLASS AGS_TYPE_MUTE_AUDIO_SIGNAL AgsMuteAudioSignal AgsMuteAudioSignalClass ags_mute_audio_signal_get_type
ags_mute_channel AgsMuteChannel ags_mute_channel_new AGS_IS_MUTE_CHANNEL AGS_MUTE_CHANNEL AGS_MUTE_CHANNEL_CLASS AGS_MUTE_CHANNEL_GET_CLASS AGS_TYPE_MUTE_CHANNEL AgsMuteChannel AgsMuteChannelClass ags_mute_channel_get_type
ags_mute_channel_run AgsMuteChannelRun ags_mute_channel_run_new AGS_IS_MUTE_CHANNEL_RUN AGS_MUTE_CHANNEL_RUN AGS_MUTE_CHANNEL_RUN_CLASS AGS_MUTE_CHANNEL_RUN_GET_CLASS AGS_TYPE_MUTE_CHANNEL_RUN AgsMuteChannelRun AgsMuteChannelRunClass ags_mute_channel_run_get_type
ags_mute_recycling AgsMuteRecycling ags_mute_recycling_new AGS_IS_MUTE_RECYCLING AGS_MUTE_RECYCLING AGS_MUTE_RECYCLING_CLASS AGS_MUTE_RECYCLING_GET_CLASS AGS_TYPE_MUTE_RECYCLING AgsMuteRecycling AgsMuteRecyclingClass ags_mute_recycling_get_type
ags_notation AgsNotation AGS_NOTATION_DEFAULT_BPM AGS_NOTATION_TICS_PER_BEAT AGS_NOTATION_MINIMUM_NOTE_LENGTH AGS_NOTATION_MAXIMUM_NOTE_LENGTH AGS_NOTATION_DEFAULT_LENGTH AGS_NOTATION_DEFAULT_JIFFIE AGS_NOTATION_DEFAULT_DURATION AGS_NOTATION_DEFAULT_OFFSET AGS_NOTATION_CLIPBOARD_VERSION AGS_NOTATION_CLIPBOARD_TYPE AGS_NOTATION_CLIPBOARD_FORMAT AgsNotationFlags ags_notation_find_near_timestamp ags_notation_add ags_notation_add_note ags_notation_remove_note ags_notation_remove_note_at_position ags_notation_get_selection ags_notation_is_note_selected ags_notation_find_point ags_notation_find_region ags_notation_free_selection ags_notation_add_all_to_selection ags_notation_add_point_to_selection ags_notation_remove_point_from_selection ags_notation_add_region_to_selection ags_notation_remove_region_from_selection ags_notation_copy_selection ags_notation_cut_selection ags_notation_insert_from_clipboard ags_notation_insert_from_clipboard_extended ags_notation_get_current ags_notation_to_raw_midi ags_notation_from_raw_midi ags_notation_new AGS_IS_NOTATION AGS_NOTATION AGS_NOTATION_CLASS AGS_NOTATION_GET_CLASS AGS_TYPE_NOTATION AgsNotation AgsNotationClass ags_notation_get_type
ags_note AgsNote AgsNoteFlags ags_note_sort_func ags_note_find_prev ags_note_find_next ags_note_length_to_smf_delta_time ags_note_smf_delta_time_to_length ags_note_to_raw_midi ags_note_to_raw_midi_extended ags_note_to_seq_event ags_note_to_seq_event_extended ags_note_from_raw_midi ags_note_from_raw_midi_extended ags_note_from_seq_event ags_note_from_seq_event_extended ags_note_duplicate ags_note_new ags_note_new_with_offset AGS_IS_NOTE AGS_NOTE AGS_NOTE_CLASS AGS_NOTE_GET_CLASS AGS_TYPE_NOTE AgsNote AgsNoteClass ags_note_get_type
ags_notify_soundcard AgsNotifySoundcard AgsNotifySoundcardFlags ags_notify_soundcard_new AGS_IS_NOTIFY_SOUNDCARD AGS_NOTIFY_SOUNDCARD AGS_NOTIFY_SOUNDCARD_CLASS AGS_NOTIFY_SOUNDCARD_GET_CLASS AGS_TYPE_NOTIFY_SOUNDCARD AgsNotifySoundcard AgsNotifySoundcardClass ags_notify_soundcard_get_type
ags_open_file AgsOpenFile ags_open_file_new AGS_IS_OPEN_FILE AGS_OPEN_FILE AGS_OPEN_FILE_CLASS AGS_OPEN_FILE_GET_CLASS AGS_TYPE_OPEN_FILE AgsOpenFile AgsOpenFileClass ags_open_file_get_type
ags_open_sf2_sample AgsOpenSf2Sample ags_open_sf2_sample_new AGS_IS_OPEN_SF2_SAMPLE AGS_OPEN_SF2_SAMPLE AGS_OPEN_SF2_SAMPLE_CLASS AGS_OPEN_SF2_SAMPLE_GET_CLASS AGS_TYPE_OPEN_SF2_SAMPLE AgsOpenSf2Sample AgsOpenSf2SampleClass ags_open_sf2_sample_get_type
ags_open_single_file AgsOpenSingleFile ags_open_single_file_new AGS_IS_OPEN_SINGLE_FILE AGS_OPEN_SINGLE_FILE AGS_OPEN_SINGLE_FILE_CLASS AGS_OPEN_SINGLE_FILE_GET_CLASS AGS_TYPE_OPEN_SINGLE_FILE AgsOpenSingleFile AgsOpenSingleFileClass ags_open_single_file_get_type
ags_output AgsOutput ags_output_find_first_input_recycling ags_output_find_last_input_recycling ags_output_new AGS_IS_OUTPUT AGS_OUTPUT AGS_OUTPUT_CLASS AGS_OUTPUT_GET_CLASS AGS_TYPE_OUTPUT AgsOutput AgsOutputClass ags_output_get_type
ags_pattern AgsPattern AGS_PATTERN_DEFAULT_BPM AGS_PATTERN_TICS_PER_BEAT AGS_PATTERN_MINIMUM_NOTE_LENGTH AGS_PATTERN_MAXIMUM_NOTE_LENGTH AGS_PATTERN_DEFAULT_LENGTH AGS_PATTERN_DEFAULT_JIFFIE AGS_PATTERN_DEFAULT_DURATION AgsPatternFlags ags_pattern_find_near_timestamp ags_pattern_set_dim ags_pattern_is_empty ags_pattern_get_bit ags_pattern_toggle_bit ags_pattern_new AGS_IS_PATTERN AGS_PATTERN AGS_PATTERN_CLASS AGS_PATTERN_GET_CLASS AGS_TYPE_PATTERN AgsPattern AgsPatternClass ags_pattern_get_type
ags_peak_audio_signal AgsPeakAudioSignal ags_peak_audio_signal_new AGS_IS_PEAK_AUDIO_SIGNAL AGS_PEAK_AUDIO_SIGNAL AGS_PEAK_AUDIO_SIGNAL_CLASS AGS_PEAK_AUDIO_SIGNAL_GET_CLASS AGS_TYPE_PEAK_AUDIO_SIGNAL AgsPeakAudioSignal AgsPeakAudioSignalClass ags_peak_audio_signal_get_type
ags_peak_channel AgsPeakChannel ags_peak_channel_buffer_add ags_peak_channel_retrieve_peak_internal ags_peak_channel_new AGS_IS_PEAK_CHANNEL AGS_PEAK_CHANNEL AGS_PEAK_CHANNEL_CLASS AGS_PEAK_CHANNEL_GET_CLASS AGS_TYPE_PEAK_CHANNEL AgsPeakChannel AgsPeakChannelClass ags_peak_channel_get_type
ags_peak_channel_run AgsPeakChannelRun ags_peak_channel_run_new AGS_IS_PEAK_CHANNEL_RUN AGS_PEAK_CHANNEL_RUN AGS_PEAK_CHANNEL_RUN_CLASS AGS_PEAK_CHANNEL_RUN_GET_CLASS AGS_TYPE_PEAK_CHANNEL_RUN AgsPeakChannelRun AgsPeakChannelRunClass ags_peak_channel_run_get_type
ags_peak_recycling AgsPeakRecycling ags_peak_recycling_new AGS_IS_PEAK_RECYCLING AGS_PEAK_RECYCLING AGS_PEAK_RECYCLING_CLASS AGS_PEAK_RECYCLING_GET_CLASS AGS_TYPE_PEAK_RECYCLING AgsPeakRecycling AgsPeakRecyclingClass ags_peak_recycling_get_type
ags_play_audio AgsPlayAudio ags_play_audio_new AGS_IS_PLAY_AUDIO AGS_PLAY_AUDIO AGS_PLAY_AUDIO_CLASS AGS_PLAY_AUDIO_GET_CLASS AGS_TYPE_PLAY_AUDIO AgsPlayAudio AgsPlayAudioClass ags_play_audio_get_type
ags_play_audio_file AgsPlayAudioFile ags_play_audio_file_new AGS_IS_PLAY_AUDIO_FILE AGS_PLAY_AUDIO_FILE AGS_PLAY_AUDIO_FILE_CLASS AGS_PLAY_AUDIO_FILE_GET_CLASS AGS_TYPE_PLAY_AUDIO_FILE AgsPlayAudioFile AgsPlayAudioFileClass ags_play_audio_file_get_type
ags_play_audio_signal AgsPlayAudioSignal ags_play_audio_signal_new AGS_IS_PLAY_AUDIO_SIGNAL AGS_PLAY_AUDIO_SIGNAL AGS_PLAY_AUDIO_SIGNAL_CLASS AGS_PLAY_AUDIO_SIGNAL_GET_CLASS AGS_TYPE_PLAY_AUDIO_SIGNAL AgsPlayAudioSignal AgsPlayAudioSignalClass ags_play_audio_signal_get_type
ags_play_channel AgsPlayChannel ags_play_channel_new AGS_IS_PLAY_CHANNEL AGS_PLAY_CHANNEL AGS_PLAY_CHANNEL_CLASS AGS_PLAY_CHANNEL_GET_CLASS AGS_TYPE_PLAY_CHANNEL AgsPlayChannel AgsPlayChannelClass ags_play_channel_get_type
ags_play_channel_run AgsPlayChannelRun AgsPlayChannelRunFlags ags_play_channel_run_new AGS_IS_PLAY_CHANNEL_RUN AGS_PLAY_CHANNEL_RUN AGS_PLAY_CHANNEL_RUN_CLASS AGS_PLAY_CHANNEL_RUN_GET_CLASS AGS_TYPE_PLAY_CHANNEL_RUN AgsPlayChannelRun AgsPlayChannelRunClass ags_play_channel_run_get_type
ags_play_channel_run_master AgsPlayChannelRunMaster AGS_PLAY_CHANNEL_RUN_MASTER_STREAMER AgsPlayChannelRunMasterFlags AgsPlayChannelRunMasterStreamer ags_play_channel_run_master_streamer_free ags_play_channel_run_master_streamer_alloc ags_play_channel_run_master_find_streamer ags_play_channel_run_master_new AGS_IS_PLAY_CHANNEL_RUN_MASTER AGS_PLAY_CHANNEL_RUN_MASTER AGS_PLAY_CHANNEL_RUN_MASTER_CLASS AGS_PLAY_CHANNEL_RUN_MASTER_GET_CLASS AGS_TYPE_PLAY_CHANNEL_RUN_MASTER AgsPlayChannelRunMaster AgsPlayChannelRunMasterClass ags_play_channel_run_master_get_type
ags_play_dssi_audio AgsPlayDssiAudio ags_play_dssi_audio_load ags_play_dssi_audio_load_ports ags_play_dssi_audio_load_conversion ags_play_dssi_audio_find ags_play_dssi_audio_new AGS_IS_PLAY_DSSI_AUDIO AGS_PLAY_DSSI_AUDIO AGS_PLAY_DSSI_AUDIO_CLASS AGS_PLAY_DSSI_AUDIO_GET_CLASS AGS_TYPE_PLAY_DSSI_AUDIO AgsPlayDssiAudio AgsPlayDssiAudioClass ags_play_dssi_audio_get_type
ags_play_dssi_audio_run AgsPlayDssiAudioRun AGS_PLAY_DSSI_AUDIO_DEFAULT_MIDI_LENGHT AgsPlayDssiAudioRunFlags ags_play_dssi_audio_run_load_ports ags_play_dssi_audio_run_new AGS_IS_PLAY_DSSI_AUDIO_RUN AGS_PLAY_DSSI_AUDIO_RUN AGS_PLAY_DSSI_AUDIO_RUN_CLASS AGS_PLAY_DSSI_AUDIO_RUN_GET_CLASS AGS_TYPE_PLAY_DSSI_AUDIO_RUN AgsPlayDssiAudioRun AgsPlayDssiAudioRunClass ags_play_dssi_audio_run_get_type
ags_play_lv2_audio AgsPlayLv2Audio AgsPlayLv2AudioFLags ags_play_lv2_audio_load ags_play_lv2_audio_load_ports ags_play_lv2_audio_load_conversion ags_play_lv2_audio_find ags_play_lv2_audio_new AGS_IS_PLAY_LV2_AUDIO AGS_PLAY_LV2_AUDIO AGS_PLAY_LV2_AUDIO_CLASS AGS_PLAY_LV2_AUDIO_GET_CLASS AGS_TYPE_PLAY_LV2_AUDIO AgsPlayLv2Audio AgsPlayLv2AudioClass ags_play_lv2_audio_get_type
ags_play_lv2_audio_run AgsPlayLv2AudioRun AGS_PLAY_LV2_AUDIO_DEFAULT_MIDI_LENGHT AgsPlayLv2AudioRunFlags ags_play_lv2_audio_run_load_ports ags_play_lv2_audio_run_new AGS_IS_PLAY_LV2_AUDIO_RUN AGS_PLAY_LV2_AUDIO_RUN AGS_PLAY_LV2_AUDIO_RUN_CLASS AGS_PLAY_LV2_AUDIO_RUN_GET_CLASS AGS_TYPE_PLAY_LV2_AUDIO_RUN AgsPlayLv2AudioRun AgsPlayLv2AudioRunClass ags_play_lv2_audio_run_get_type
ags_play_notation_audio AgsPlayNotationAudio ags_play_notation_audio_new AGS_IS_PLAY_NOTATION_AUDIO AGS_PLAY_NOTATION_AUDIO AGS_PLAY_NOTATION_AUDIO_CLASS AGS_PLAY_NOTATION_AUDIO_GET_CLASS AGS_TYPE_PLAY_NOTATION_AUDIO AgsPlayNotationAudio AgsPlayNotationAudioClass ags_play_notation_audio_get_type
ags_play_notation_audio_run AgsPlayNotationAudioRun AgsPlayNotationAudioRunFlags ags_play_notation_audio_run_new AGS_IS_PLAY_NOTATION_AUDIO_RUN AGS_PLAY_NOTATION_AUDIO_RUN AGS_PLAY_NOTATION_AUDIO_RUN_CLASS AGS_PLAY_NOTATION_AUDIO_RUN_GET_CLASS AGS_TYPE_PLAY_NOTATION_AUDIO_RUN AgsPlayNotationAudioRun AgsPlayNotationAudioRunClass ags_play_notation_audio_run_get_type
ags_play_note AgsPlayNote ags_play_note_new AGS_IS_PLAY_NOTE AGS_PLAY_NOTE AGS_PLAY_NOTE_CLASS AGS_PLAY_NOTE_GET_CLASS AGS_TYPE_PLAY_NOTE AgsPlayNote AgsPlayNoteClass ags_play_note_get_type
ags_play_recycling AgsPlayRecycling ags_play_recycling_new AGS_IS_PLAY_RECYCLING AGS_PLAY_RECYCLING AGS_PLAY_RECYCLING_CLASS AGS_PLAY_RECYCLING_GET_CLASS AGS_TYPE_PLAY_RECYCLING AgsPlayRecycling AgsPlayRecyclingClass ags_play_recycling_get_type
ags_playable AgsPlayable AGS_PLAYABLE_ERROR AgsPlayableError ags_playable_error_quark ags_playable_open ags_playable_rw_open ags_playable_level_count ags_playable_nth_level ags_playable_selected_level ags_playable_sublevel_names ags_playable_level_select ags_playable_level_up ags_playable_iter_start ags_playable_iter_next ags_playable_info ags_playable_get_samplerate ags_playable_get_format ags_playable_read ags_playable_write ags_playable_flush ags_playable_seek ags_playable_close ags_playable_read_audio_signal AGS_IS_PLAYABLE AGS_IS_PLAYABLE_INTERFACE AGS_PLAYABLE AGS_PLAYABLE_GET_INTERFACE AGS_PLAYABLE_INTERFACE AGS_TYPE_PLAYABLE AgsPlayable AgsPlayableInterface ags_playable_get_type
ags_playback AgsPlayback AgsPlaybackFlags AgsPlaybackScope ags_playback_set_channel_thread ags_playback_get_channel_thread ags_playback_set_iterator_thread ags_playback_get_iterator_thread ags_playback_set_recycling_thread ags_playback_get_recycling_thread ags_playback_set_recall_id ags_playback_get_recall_id ags_playback_find_source ags_playback_new AGS_IS_PLAYBACK AGS_PLAYBACK AGS_PLAYBACK_CLASS AGS_PLAYBACK_GET_CLASS AGS_TYPE_PLAYBACK AgsPlayback AgsPlaybackClass ags_playback_get_type
ags_playback_domain AgsPlaybackDomain AgsPlaybackDomainFlags AgsPlaybackDomainScope ags_playback_domain_set_audio_thread ags_playback_domain_get_audio_thread ags_playback_domain_add_playback ags_playback_domain_remove_playback ags_playback_domain_new AGS_IS_PLAYBACK_DOMAIN AGS_PLAYBACK_DOMAIN AGS_PLAYBACK_DOMAIN_CLASS AGS_PLAYBACK_DOMAIN_GET_CLASS AGS_TYPE_PLAYBACK_DOMAIN AgsPlaybackDomain AgsPlaybackDomainClass ags_playback_domain_get_type
ags_plugin_factory AgsPluginFactory AgsPluginMetadata ags_plugin_factory_read_file ags_plugin_factory_list_by_name ags_plugin_factory_add ags_plugin_factory_create ags_plugin_factory_get_instance ags_plugin_factory_new_from_file ags_plugin_factory_new AGS_IS_PLUGIN_FACTORY AGS_PLUGIN_FACTORY AGS_PLUGIN_FACTORY_CLASS AGS_PLUGIN_FACTORY_GET_CLASS AGS_TYPE_PLUGIN_FACTORY AgsPluginFactory AgsPluginFactoryClass ags_plugin_factory_get_type
ags_plugin_stock AGS_PLUGIN_NAME_VOLUME
ags_port AgsPort AgsPortFlags ags_port_safe_read ags_port_safe_write ags_port_safe_write_raw ags_port_safe_get_property ags_port_safe_set_property ags_port_find_specifier ags_port_new AGS_IS_PORT AGS_PORT AGS_PORT_CLASS AGS_PORT_GET_CLASS AGS_TYPE_PORT AgsPort AgsPortClass ags_port_get_type
ags_prepare_audio_signal AgsPrepareAudioSignal ags_prepare_audio_signal_new AGS_IS_PREPARE_AUDIO_SIGNAL AGS_PREPARE_AUDIO_SIGNAL AGS_PREPARE_AUDIO_SIGNAL_CLASS AGS_PREPARE_AUDIO_SIGNAL_GET_CLASS AGS_TYPE_PREPARE_AUDIO_SIGNAL AgsPrepareAudioSignal AgsPrepareAudioSignalClass ags_prepare_audio_signal_get_type
ags_prepare_channel AgsPrepareChannel ags_prepare_channel_new AGS_IS_PREPARE_CHANNEL AGS_PREPARE_CHANNEL AGS_PREPARE_CHANNEL_CLASS AGS_PREPARE_CHANNEL_GET_CLASS AGS_TYPE_PREPARE_CHANNEL AgsPrepareChannel AgsPrepareChannelClass ags_prepare_channel_get_type
ags_prepare_channel_run AgsPrepareChannelRun ags_prepare_channel_run_new AGS_IS_PREPARE_CHANNEL_RUN AGS_PREPARE_CHANNEL_RUN AGS_PREPARE_CHANNEL_RUN_CLASS AGS_PREPARE_CHANNEL_RUN_GET_CLASS AGS_TYPE_PREPARE_CHANNEL_RUN AgsPrepareChannelRun AgsPrepareChannelRunClass ags_prepare_channel_run_get_type
ags_prepare_recycling AgsPrepareRecycling ags_prepare_recycling_new AGS_IS_PREPARE_RECYCLING AGS_PREPARE_RECYCLING AGS_PREPARE_RECYCLING_CLASS AGS_PREPARE_RECYCLING_GET_CLASS AGS_TYPE_PREPARE_RECYCLING AgsPrepareRecycling AgsPrepareRecyclingClass ags_prepare_recycling_get_type
ags_preset AgsPreset AgsPresetFlags AGS_PRESET_ERROR AgsPresetError ags_preset_error_quark ags_preset_find_scope ags_preset_find_name ags_preset_add_parameter ags_preset_remove_parameter ags_preset_get_parameter ags_preset_new AGS_IS_PRESET AGS_PRESET AGS_PRESET_CLASS AGS_PRESET_GET_CLASS AGS_TYPE_PRESET AgsPreset AgsPresetClass ags_preset_get_type
ags_pulse_client AgsPulseClient AgsPulseClientFlags ags_pulse_client_find_uuid ags_pulse_client_find ags_pulse_client_open ags_pulse_client_add_device ags_pulse_client_remove_device ags_pulse_client_add_port ags_pulse_client_remove_port ags_pulse_client_activate ags_pulse_client_deactivate ags_pulse_client_new AGS_IS_PULSE_CLIENT AGS_PULSE_CLIENT AGS_PULSE_CLIENT_CLASS AGS_PULSE_CLIENT_GET_CLASS AGS_TYPE_PULSE_CLIENT AgsPulseClient AgsPulseClientClass ags_pulse_client_get_type
ags_pulse_devin AgsPulseDevin AgsPulseDevinFlags AgsPulseDevinSyncFlags AGS_PULSE_DEVIN_ERROR AgsPulseDevinError ags_pulse_devin_error_quark ags_pulse_devin_switch_buffer_flag ags_pulse_devin_adjust_delay_and_attack ags_pulse_devin_realloc_buffer ags_pulse_devin_new AGS_IS_PULSE_DEVIN AGS_PULSE_DEVIN AGS_PULSE_DEVIN_CLASS AGS_PULSE_DEVIN_GET_CLASS AGS_TYPE_PULSE_DEVIN AgsPulseDevin AgsPulseDevinClass ags_pulse_devin_get_type
ags_pulse_devout AgsPulseDevout AgsPulseDevoutFlags AgsPulseDevoutSyncFlags AGS_PULSE_DEVOUT_ERROR AgsPulseDevoutError ags_pulse_devout_error_quark ags_pulse_devout_switch_buffer_flag ags_pulse_devout_adjust_delay_and_attack ags_pulse_devout_realloc_buffer ags_pulse_devout_new AGS_IS_PULSE_DEVOUT AGS_PULSE_DEVOUT AGS_PULSE_DEVOUT_CLASS AGS_PULSE_DEVOUT_GET_CLASS AGS_TYPE_PULSE_DEVOUT AgsPulseDevout AgsPulseDevoutClass ags_pulse_devout_get_type
ags_pulse_port AgsPulsePort AgsPulsePortFlags ags_pulse_port_find ags_pulse_port_register ags_pulse_port_unregister ags_pulse_port_get_fixed_size ags_pulse_port_set_samplerate ags_pulse_port_set_pcm_channels ags_pulse_port_set_buffer_size ags_pulse_port_set_format ags_pulse_port_get_latency ags_pulse_port_new AGS_IS_PULSE_PORT AGS_PULSE_PORT AGS_PULSE_PORT_CLASS AGS_PULSE_PORT_GET_CLASS AGS_TYPE_PULSE_PORT AgsPulsePort AgsPulsePortClass ags_pulse_port_get_type
ags_pulse_server AgsPulseServer AgsPulseServerFlags ags_pulse_server_find_url ags_pulse_server_find_client ags_pulse_server_find_port ags_pulse_server_add_client ags_pulse_server_remove_client ags_pulse_server_connect_client ags_pulse_server_start_poll ags_pulse_server_new AGS_IS_PULSE_SERVER AGS_PULSE_SERVER AGS_PULSE_SERVER_CLASS AGS_PULSE_SERVER_GET_CLASS AGS_TYPE_PULSE_SERVER AgsPulseServer AgsPulseServerClass ags_pulse_server_get_type
ags_recall AgsRecall AGS_RECALL_HANDLER AGS_RECALL_DEFAULT_VERSION AGS_RECALL_DEFAULT_BUILD_ID AgsRecallFlags AgsRecallNotifyDependencyMode AgsRecallHandler ags_recall_set_flags ags_recall_load_automation ags_recall_unload_automation ags_recall_resolve_dependencies ags_recall_child_added ags_recall_run_init_pre ags_recall_run_init_inter ags_recall_run_init_post ags_recall_check_rt_stream ags_recall_automate ags_recall_run_pre ags_recall_run_inter ags_recall_run_post ags_recall_stop_persistent ags_recall_done ags_recall_cancel ags_recall_remove ags_recall_is_done ags_recall_duplicate ags_recall_set_recall_id ags_recall_set_soundcard_recursive ags_recall_notify_dependency ags_recall_add_dependency ags_recall_remove_dependency ags_recall_get_dependencies ags_recall_remove_child ags_recall_add_child ags_recall_get_children ags_recall_get_by_effect ags_recall_find_recall_id_with_effect ags_recall_find_type ags_recall_find_template ags_recall_template_find_type ags_recall_template_find_all_type ags_recall_find_type_with_recycling_context ags_recall_find_recycling_context ags_recall_find_provider ags_recall_template_find_provider ags_recall_find_provider_with_recycling_context ags_recall_run_init ags_recall_handler_alloc ags_recall_add_handler ags_recall_remove_handler ags_recall_lock_port ags_recall_unlock_port ags_recall_new AGS_IS_RECALL AGS_RECALL AGS_RECALL_CLASS AGS_RECALL_GET_CLASS AGS_TYPE_RECALL AgsRecall AgsRecallClass ags_recall_get_type
ags_recall_adaptor_run AgsRecallAdaptorRun ags_recall_adaptor_run_new AGS_IS_RECALL_ADAPTOR_RUN AGS_RECALL_ADAPTOR_RUN AGS_RECALL_ADAPTOR_RUN_CLASS AGS_RECALL_ADAPTOR_RUN_GET_CLASS AGS_TYPE_RECALL_ADAPTOR_RUN AgsRecallAdaptorRun AgsRecallAdaptorRunClass ags_recall_adaptor_run_get_type
ags_recall_audio AgsRecallAudio AgsRecallAudioFlags ags_recall_audio_new AGS_IS_RECALL_AUDIO AGS_RECALL_AUDIO AGS_RECALL_AUDIO_CLASS AGS_RECALL_AUDIO_GET_CLASS AGS_TYPE_RECALL_AUDIO AgsRecallAudio AgsRecallAudioClass ags_recall_audio_get_type
ags_recall_audio_run AgsRecallAudioRun ags_recall_audio_run_new AGS_IS_RECALL_AUDIO_RUN AGS_RECALL_AUDIO_RUN AGS_RECALL_AUDIO_RUN_CLASS AGS_RECALL_AUDIO_RUN_GET_CLASS AGS_TYPE_RECALL_AUDIO_RUN AgsRecallAudioRun AgsRecallAudioRunClass ags_recall_audio_run_get_type
ags_recall_audio_signal AgsRecallAudioSignal AgsRecallAudioSignalFlags ags_recall_audio_signal_new AGS_IS_RECALL_AUDIO_SIGNAL AGS_RECALL_AUDIO_SIGNAL AGS_RECALL_AUDIO_SIGNAL_CLASS AGS_RECALL_AUDIO_SIGNAL_GET_CLASS AGS_TYPE_RECALL_AUDIO_SIGNAL AgsRecallAudioSignal AgsRecallAudioSignalClass ags_recall_audio_signal_get_type
ags_recall_channel AgsRecallChannel ags_recall_channel_find_channel ags_recall_channel_new AGS_IS_RECALL_CHANNEL AGS_RECALL_CHANNEL AGS_RECALL_CHANNEL_CLASS AGS_RECALL_CHANNEL_GET_CLASS AGS_TYPE_RECALL_CHANNEL AgsRecallChannel AgsRecallChannelClass ags_recall_channel_get_type
ags_recall_channel_run AgsRecallChannelRun ags_recall_channel_run_run_order_changed ags_recall_channel_run_new AGS_IS_RECALL_CHANNEL_RUN AGS_RECALL_CHANNEL_RUN AGS_RECALL_CHANNEL_RUN_CLASS AGS_RECALL_CHANNEL_RUN_GET_CLASS AGS_TYPE_RECALL_CHANNEL_RUN AgsRecallChannelRun AgsRecallChannelRunClass ags_recall_channel_run_get_type
ags_recall_channel_run_dummy AgsRecallChannelRunDummy ags_recall_channel_run_dummy_new AGS_IS_RECALL_CHANNEL_RUN_DUMMY AGS_RECALL_CHANNEL_RUN_DUMMY AGS_RECALL_CHANNEL_RUN_DUMMY_CLASS AGS_RECALL_CHANNEL_RUN_DUMMY_GET_CLASS AGS_TYPE_RECALL_CHANNEL_RUN_DUMMY AgsRecallChannelRunDummy AgsRecallChannelRunDummyClass ags_recall_channel_run_dummy_get_type
ags_recall_container AgsRecallContainer AgsRecallContainerFlags AgsRecallContainerFindFlags ags_recall_container_get_recall_audio ags_recall_container_get_recall_audio_run ags_recall_container_get_recall_channel ags_recall_container_get_recall_channel_run ags_recall_container_find ags_recall_container_new AGS_IS_RECALL_CONTAINER AGS_RECALL_CONTAINER AGS_RECALL_CONTAINER_CLASS AGS_RECALL_CONTAINER_GET_CLASS AGS_TYPE_RECALL_CONTAINER AgsRecallContainer AgsRecallContainerClass ags_recall_container_get_type
ags_recall_dependency AgsRecallDependency AgsRecallDependencyFlags ags_recall_dependency_find_dependency ags_recall_dependency_find_dependency_by_provider ags_recall_dependency_resolve ags_recall_dependency_new AGS_IS_RECALL_DEPENDENCY AGS_RECALL_DEPENDENCY AGS_RECALL_DEPENDENCY_CLASS AGS_RECALL_DEPENDENCY_GET_CLASS AGS_TYPE_RECALL_DEPENDENCY AgsRecallDependency AgsRecallDependencyClass ags_recall_dependency_get_type
ags_recall_dssi AgsRecallDssi ags_recall_dssi_load ags_recall_dssi_load_ports ags_recall_dssi_load_conversion ags_recall_dssi_find ags_recall_dssi_new AGS_IS_RECALL_DSSI AGS_RECALL_DSSI AGS_RECALL_DSSI_CLASS AGS_RECALL_DSSI_GET_CLASS AGS_TYPE_RECALL_DSSI AgsRecallDssi AgsRecallDssiClass ags_recall_dssi_get_type
ags_recall_dssi_run AgsRecallDssiRun ags_recall_dssi_run_new AGS_IS_RECALL_DSSI_RUN AGS_RECALL_DSSI_RUN AGS_RECALL_DSSI_RUN_CLASS AGS_RECALL_DSSI_RUN_GET_CLASS AGS_TYPE_RECALL_DSSI_RUN AgsRecallDssiRun AgsRecallDssiRunClass ags_recall_dssi_run_get_type
ags_recall_factory AgsRecallFactory AgsRecallFactoryCreateFlags ags_recall_factory_create ags_recall_factory_get_instance ags_recall_factory_new AGS_IS_RECALL_FACTORY AGS_RECALL_FACTORY AGS_RECALL_FACTORY_CLASS AGS_RECALL_FACTORY_GET_CLASS AGS_TYPE_RECALL_FACTORY AgsRecallFactory AgsRecallFactoryClass ags_recall_factory_get_type
ags_recall_id AgsRecallID AgsRecallIDFlags ags_recall_id_get_run_stage ags_recall_id_set_run_stage ags_recall_id_unset_run_stage ags_recall_id_find_recycling_context ags_recall_id_find_parent_recycling_context ags_recall_id_new AGS_IS_RECALL_ID AGS_RECALL_ID AGS_RECALL_ID_CLASS AGS_RECALL_ID_GET_CLASS AGS_TYPE_RECALL_ID AgsRecallID AgsRecallIDClass ags_recall_id_get_type
ags_recall_ladspa AgsRecallLadspa ags_recall_ladspa_load ags_recall_ladspa_load_ports ags_recall_ladspa_load_conversion ags_recall_ladspa_find ags_recall_ladspa_new AGS_IS_RECALL_LADSPA AGS_RECALL_LADSPA AGS_RECALL_LADSPA_CLASS AGS_RECALL_LADSPA_GET_CLASS AGS_TYPE_RECALL_LADSPA AgsRecallLadspa AgsRecallLadspaClass ags_recall_ladspa_get_type
ags_recall_ladspa_run AgsRecallLadspaRun ags_recall_ladspa_run_new AGS_IS_RECALL_LADSPA_RUN AGS_RECALL_LADSPA_RUN AGS_RECALL_LADSPA_RUN_CLASS AGS_RECALL_LADSPA_RUN_GET_CLASS AGS_TYPE_RECALL_LADSPA_RUN AgsRecallLadspaRun AgsRecallLadspaRunClass ags_recall_ladspa_run_get_type
ags_recall_lv2 AgsRecallLv2 AgsRecallLv2FLags ags_recall_lv2_load ags_recall_lv2_load_ports ags_recall_lv2_load_conversion ags_recall_lv2_find ags_recall_lv2_new AGS_IS_RECALL_LV2 AGS_RECALL_LV2 AGS_RECALL_LV2_CLASS AGS_RECALL_LV2_GET_CLASS AGS_TYPE_RECALL_LV2 AgsRecallLv2 AgsRecallLv2Class ags_recall_lv2_get_type
ags_recall_lv2_run AgsRecallLv2Run AGS_RECALL_LV2_DEFAULT_MIDI_LENGHT ags_recall_lv2_run_new AGS_IS_RECALL_LV2_RUN AGS_RECALL_LV2_RUN AGS_RECALL_LV2_RUN_CLASS AGS_RECALL_LV2_RUN_GET_CLASS AGS_TYPE_RECALL_LV2_RUN AgsRecallLv2Run AgsRecallLv2RunClass ags_recall_lv2_run_get_type
ags_recall_recycling AgsRecallRecycling AgsRecallRecyclingFlags ags_recall_recycling_get_child_source ags_recall_recycling_new AGS_IS_RECALL_RECYCLING AGS_RECALL_RECYCLING AGS_RECALL_RECYCLING_CLASS AGS_RECALL_RECYCLING_GET_CLASS AGS_TYPE_RECALL_RECYCLING AgsRecallRecycling AgsRecallRecyclingClass ags_recall_recycling_get_type
ags_recall_recycling_dummy AgsRecallRecyclingDummy ags_recall_recycling_dummy_new AGS_IS_RECALL_RECYCLING_DUMMY AGS_RECALL_RECYCLING_DUMMY AGS_RECALL_RECYCLING_DUMMY_CLASS AGS_RECALL_RECYCLING_DUMMY_GET_CLASS AGS_TYPE_RECALL_RECYCLING_DUMMY AgsRecallRecyclingDummy AgsRecallRecyclingDummyClass ags_recall_recycling_dummy_get_type
ags_record_midi_audio AgsRecordMidiAudio ags_record_midi_audio_new AGS_IS_RECORD_MIDI_AUDIO AGS_RECORD_MIDI_AUDIO AGS_RECORD_MIDI_AUDIO_CLASS AGS_RECORD_MIDI_AUDIO_GET_CLASS AGS_TYPE_RECORD_MIDI_AUDIO AgsRecordMidiAudio AgsRecordMidiAudioClass ags_record_midi_audio_get_type
ags_record_midi_audio_run AgsRecordMidiAudioRun AgsRecordMidiAudioRunFlags ags_record_midi_audio_run_new AGS_IS_RECORD_MIDI_AUDIO_RUN AGS_RECORD_MIDI_AUDIO_RUN AGS_RECORD_MIDI_AUDIO_RUN_CLASS AGS_RECORD_MIDI_AUDIO_RUN_GET_CLASS AGS_TYPE_RECORD_MIDI_AUDIO_RUN AgsRecordMidiAudioRun AgsRecordMidiAudioRunClass ags_record_midi_audio_run_get_type
ags_record_thread AgsRecordThread AGS_RECORD_THREAD_DEFAULT_DELAY ags_record_thread_new AGS_IS_RECORD_THREAD AGS_RECORD_THREAD AGS_RECORD_THREAD_CLASS AGS_RECORD_THREAD_GET_CLASS AGS_TYPE_RECORD_THREAD AgsRecordThread AgsRecordThreadClass ags_record_thread_get_type
ags_recycling AgsRecycling AgsRecyclingFlags ags_recycling_set_soundcard ags_recycling_add_audio_signal ags_recycling_remove_audio_signal ags_recycling_create_audio_signal_with_defaults ags_recycling_create_audio_signal_with_frame_count ags_recycling_position ags_recycling_find_next_channel ags_recycling_is_active ags_recycling_new AGS_IS_RECYCLING AGS_RECYCLING AGS_RECYCLING_CLASS AGS_RECYCLING_GET_CLASS AGS_TYPE_RECYCLING AgsRecycling AgsRecyclingClass ags_recycling_get_type
ags_recycling_context AgsRecyclingContext ags_recycling_context_replace ags_recycling_context_add ags_recycling_context_remove ags_recycling_context_insert ags_recycling_context_get_toplevel ags_recycling_context_find ags_recycling_context_find_child ags_recycling_context_find_parent ags_recycling_context_add_child ags_recycling_context_remove_child ags_recycling_context_get_child_recall_id ags_recycling_context_reset_recycling ags_recycling_context_new AGS_IS_RECYCLING_CONTEXT AGS_RECYCLING_CONTEXT AGS_RECYCLING_CONTEXT_CLASS AGS_RECYCLING_CONTEXT_GET_CLASS AGS_TYPE_RECYCLING_CONTEXT AgsRecyclingContext AgsRecyclingContextClass ags_recycling_context_get_type
ags_recycling_thread AgsRecyclingThread AGS_RECYCLING_THREAD_DEFAULT_JIFFIE AgsRecyclingThreadFlags AgsRecyclingThreadWorker ags_recycling_thread_worker_alloc ags_recycling_thread_add_worker ags_recycling_thread_remove_worker ags_recycling_thread_play_channel ags_recycling_thread_play_audio ags_recycling_thread_find_child ags_recycling_thread_fifo ags_recycling_thread_new AGS_IS_RECYCLING_THREAD AGS_RECYCLING_THREAD AGS_RECYCLING_THREAD_CLASS AGS_RECYCLING_THREAD_GET_CLASS AGS_TYPE_RECYCLING_THREAD AgsRecyclingThread AgsRecyclingThreadClass ags_recycling_thread_get_type
ags_recycling_thread_callbacks ags_recycling_thread_iterate_callback
ags_remote_channel AgsRemoteChannel AgsRemoteChannelFlags AgsRemoteChannelProtocolFlags AgsRemoteChannelError ags_remote_channel_error_quark ags_remote_channel_new AGS_IS_REMOTE_CHANNEL AGS_REMOTE_CHANNEL AGS_REMOTE_CHANNEL_CLASS AGS_REMOTE_CHANNEL_GET_CLASS AGS_TYPE_REMOTE_CHANNEL AgsRemoteChannel AgsRemoteChannelClass ags_remote_channel_get_type
ags_remote_input AgsRemoteInput ags_remote_input_new AGS_IS_REMOTE_INPUT AGS_REMOTE_INPUT AGS_REMOTE_INPUT_CLASS AGS_REMOTE_INPUT_GET_CLASS AGS_TYPE_REMOTE_INPUT AgsRemoteInput AgsRemoteInputClass ags_remote_input_get_type
ags_remote_output AgsRemoteOutput ags_remote_output_new AGS_IS_REMOTE_OUTPUT AGS_REMOTE_OUTPUT AGS_REMOTE_OUTPUT_CLASS AGS_REMOTE_OUTPUT_GET_CLASS AGS_TYPE_REMOTE_OUTPUT AgsRemoteOutput AgsRemoteOutputClass ags_remote_output_get_type
ags_remove_audio AgsRemoveAudio ags_remove_audio_new AGS_IS_REMOVE_AUDIO AGS_REMOVE_AUDIO AGS_REMOVE_AUDIO_CLASS AGS_REMOVE_AUDIO_GET_CLASS AGS_TYPE_REMOVE_AUDIO AgsRemoveAudio AgsRemoveAudioClass ags_remove_audio_get_type
ags_remove_audio_signal AgsRemoveAudioSignal ags_remove_audio_signal_new AGS_IS_REMOVE_AUDIO_SIGNAL AGS_REMOVE_AUDIO_SIGNAL AGS_REMOVE_AUDIO_SIGNAL_CLASS AGS_REMOVE_AUDIO_SIGNAL_GET_CLASS AGS_TYPE_REMOVE_AUDIO_SIGNAL AgsRemoveAudioSignal AgsRemoveAudioSignalClass ags_remove_audio_signal_get_type
ags_remove_note AgsRemoveNote ags_remove_note_new AGS_IS_REMOVE_NOTE AGS_REMOVE_NOTE AGS_REMOVE_NOTE_CLASS AGS_REMOVE_NOTE_GET_CLASS AGS_TYPE_REMOVE_NOTE AgsRemoveNote AgsRemoveNoteClass ags_remove_note_get_type
ags_remove_point_from_selection AgsRemovePointFromSelection ags_remove_point_from_selection_new AGS_IS_REMOVE_POINT_FROM_SELECTION AGS_REMOVE_POINT_FROM_SELECTION AGS_REMOVE_POINT_FROM_SELECTION_CLASS AGS_REMOVE_POINT_FROM_SELECTION_GET_CLASS AGS_TYPE_REMOVE_POINT_FROM_SELECTION AgsRemovePointFromSelection AgsRemovePointFromSelectionClass ags_remove_point_from_selection_get_type
ags_remove_recall AgsRemoveRecall ags_remove_recall_new AGS_IS_REMOVE_RECALL AGS_REMOVE_RECALL AGS_REMOVE_RECALL_CLASS AGS_REMOVE_RECALL_GET_CLASS AGS_TYPE_REMOVE_RECALL AgsRemoveRecall AgsRemoveRecallClass ags_remove_recall_get_type
ags_remove_recall_container AgsRemoveRecallContainer ags_remove_recall_container_new AGS_IS_REMOVE_RECALL_CONTAINER AGS_REMOVE_RECALL_CONTAINER AGS_REMOVE_RECALL_CONTAINER_CLASS AGS_REMOVE_RECALL_CONTAINER_GET_CLASS AGS_TYPE_REMOVE_RECALL_CONTAINER AgsRemoveRecallContainer AgsRemoveRecallContainerClass ags_remove_recall_container_get_type
ags_remove_region_from_selection AgsRemoveRegionFromSelection ags_remove_region_from_selection_new AGS_IS_REMOVE_REGION_FROM_SELECTION AGS_REMOVE_REGION_FROM_SELECTION AGS_REMOVE_REGION_FROM_SELECTION_CLASS AGS_REMOVE_REGION_FROM_SELECTION_GET_CLASS AGS_TYPE_REMOVE_REGION_FROM_SELECTION AgsRemoveRegionFromSelection AgsRemoveRegionFromSelectionClass ags_remove_region_from_selection_get_type
ags_remove_soundcard AgsRemoveSoundcard ags_remove_soundcard_new AGS_IS_REMOVE_SOUNDCARD AGS_REMOVE_SOUNDCARD AGS_REMOVE_SOUNDCARD_CLASS AGS_REMOVE_SOUNDCARD_GET_CLASS AGS_TYPE_REMOVE_SOUNDCARD AgsRemoveSoundcard AgsRemoveSoundcardClass ags_remove_soundcard_get_type
ags_reset_audio_connection AgsResetAudioConnection ags_reset_audio_connection_new AGS_IS_RESET_AUDIO_CONNECTION AGS_RESET_AUDIO_CONNECTION AGS_RESET_AUDIO_CONNECTION_CLASS AGS_RESET_AUDIO_CONNECTION_GET_CLASS AGS_TYPE_RESET_AUDIO_CONNECTION AgsResetAudioConnection AgsResetAudioConnectionClass ags_reset_audio_connection_get_type
ags_reset_peak AgsResetPeak ags_reset_peak_add ags_reset_peak_remove ags_reset_peak_get_instance ags_reset_peak_new AGS_IS_RESET_PEAK AGS_RESET_PEAK AGS_RESET_PEAK_CLASS AGS_RESET_PEAK_GET_CLASS AGS_TYPE_RESET_PEAK AgsResetPeak AgsResetPeakClass ags_reset_peak_get_type
ags_resize_audio AgsResizeAudio ags_resize_audio_new AGS_IS_RESIZE_AUDIO AGS_RESIZE_AUDIO AGS_RESIZE_AUDIO_CLASS AGS_RESIZE_AUDIO_GET_CLASS AGS_TYPE_RESIZE_AUDIO AgsResizeAudio AgsResizeAudioClass ags_resize_audio_get_type
ags_route_dssi_audio AgsRouteDssiAudio ags_route_dssi_audio_new AGS_IS_ROUTE_DSSI_AUDIO AGS_ROUTE_DSSI_AUDIO AGS_ROUTE_DSSI_AUDIO_CLASS AGS_ROUTE_DSSI_AUDIO_GET_CLASS AGS_TYPE_ROUTE_DSSI_AUDIO AgsRouteDssiAudio AgsRouteDssiAudioClass ags_route_dssi_audio_get_type
ags_route_dssi_audio_run AgsRouteDssiAudioRun ags_route_dssi_audio_run_new AGS_IS_ROUTE_DSSI_AUDIO_RUN AGS_ROUTE_DSSI_AUDIO_RUN AGS_ROUTE_DSSI_AUDIO_RUN_CLASS AGS_ROUTE_DSSI_AUDIO_RUN_GET_CLASS AGS_TYPE_ROUTE_DSSI_AUDIO_RUN AgsRouteDssiAudioRun AgsRouteDssiAudioRunClass ags_route_dssi_audio_run_get_type
ags_route_lv2_audio AgsRouteLv2Audio ags_route_lv2_audio_new AGS_IS_ROUTE_LV2_AUDIO AGS_ROUTE_LV2_AUDIO AGS_ROUTE_LV2_AUDIO_CLASS AGS_ROUTE_LV2_AUDIO_GET_CLASS AGS_TYPE_ROUTE_LV2_AUDIO AgsRouteLv2Audio AgsRouteLv2AudioClass ags_route_lv2_audio_get_type
ags_route_lv2_audio_run AgsRouteLv2AudioRun ags_route_lv2_audio_run_new AGS_IS_ROUTE_LV2_AUDIO_RUN AGS_ROUTE_LV2_AUDIO_RUN AGS_ROUTE_LV2_AUDIO_RUN_CLASS AGS_ROUTE_LV2_AUDIO_RUN_GET_CLASS AGS_TYPE_ROUTE_LV2_AUDIO_RUN AgsRouteLv2AudioRun AgsRouteLv2AudioRunClass ags_route_lv2_audio_run_get_type
ags_rt_stream_audio_signal AgsRtStreamAudioSignal ags_rt_stream_audio_signal_new AGS_IS_RT_STREAM_AUDIO_SIGNAL AGS_RT_STREAM_AUDIO_SIGNAL AGS_RT_STREAM_AUDIO_SIGNAL_CLASS AGS_RT_STREAM_AUDIO_SIGNAL_GET_CLASS AGS_TYPE_RT_STREAM_AUDIO_SIGNAL AgsRtStreamAudioSignal AgsRtStreamAudioSignalClass ags_rt_stream_audio_signal_get_type
ags_rt_stream_channel AgsRtStreamChannel ags_rt_stream_channel_new AGS_IS_RT_STREAM_CHANNEL AGS_RT_STREAM_CHANNEL AGS_RT_STREAM_CHANNEL_CLASS AGS_RT_STREAM_CHANNEL_GET_CLASS AGS_TYPE_RT_STREAM_CHANNEL AgsRtStreamChannel AgsRtStreamChannelClass ags_rt_stream_channel_get_type
ags_rt_stream_channel_run AgsRtStreamChannelRun ags_rt_stream_channel_run_new AGS_IS_RT_STREAM_CHANNEL_RUN AGS_RT_STREAM_CHANNEL_RUN AGS_RT_STREAM_CHANNEL_RUN_CLASS AGS_RT_STREAM_CHANNEL_RUN_GET_CLASS AGS_TYPE_RT_STREAM_CHANNEL_RUN AgsRtStreamChannelRun AgsRtStreamChannelRunClass ags_rt_stream_channel_run_get_type
ags_rt_stream_recycling AgsRtStreamRecycling ags_rt_stream_recycling_new AGS_IS_RT_STREAM_RECYCLING AGS_RT_STREAM_RECYCLING AGS_RT_STREAM_RECYCLING_CLASS AGS_RT_STREAM_RECYCLING_GET_CLASS AGS_TYPE_RT_STREAM_RECYCLING AgsRtStreamRecycling AgsRtStreamRecyclingClass ags_rt_stream_recycling_get_type
ags_save_file AgsSaveFile ags_save_file_new AGS_IS_SAVE_FILE AGS_SAVE_FILE AGS_SAVE_FILE_CLASS AGS_SAVE_FILE_GET_CLASS AGS_TYPE_SAVE_FILE AgsSaveFile AgsSaveFileClass ags_save_file_get_type
ags_seek_soundcard AgsSeekSoundcard ags_seek_soundcard_new AGS_IS_SEEK_SOUNDCARD AGS_SEEK_SOUNDCARD AGS_SEEK_SOUNDCARD_CLASS AGS_SEEK_SOUNDCARD_GET_CLASS AGS_TYPE_SEEK_SOUNDCARD AgsSeekSoundcard AgsSeekSoundcardClass ags_seek_soundcard_get_type
ags_sequencer_thread AgsSequencerThread AGS_SEQUENCER_THREAD_DEFAULT_JIFFIE ags_sequencer_thread_interval_timeout ags_sequencer_thread_find_sequencer ags_sequencer_thread_new AGS_IS_SEQUENCER_THREAD AGS_SEQUENCER_THREAD AGS_SEQUENCER_THREAD_CLASS AGS_SEQUENCER_THREAD_GET_CLASS AGS_TYPE_SEQUENCER_THREAD AgsSequencerThread AgsSequencerThreadClass ags_sequencer_thread_get_type
ags_set_audio_channels AgsSetAudioChannels ags_set_audio_channels_new AGS_IS_SET_AUDIO_CHANNELS AGS_SET_AUDIO_CHANNELS AGS_SET_AUDIO_CHANNELS_CLASS AGS_SET_AUDIO_CHANNELS_GET_CLASS AGS_TYPE_SET_AUDIO_CHANNELS AgsSetAudioChannels AgsSetAudioChannelsClass ags_set_audio_channels_get_type
ags_set_buffer_size AgsSetBufferSize ags_set_buffer_size_new AGS_IS_SET_BUFFER_SIZE AGS_SET_BUFFER_SIZE AGS_SET_BUFFER_SIZE_CLASS AGS_SET_BUFFER_SIZE_GET_CLASS AGS_TYPE_SET_BUFFER_SIZE AgsSetBufferSize AgsSetBufferSizeClass ags_set_buffer_size_get_type
ags_set_format AgsSetFormat ags_set_format_new AGS_IS_SET_FORMAT AGS_SET_FORMAT AGS_SET_FORMAT_CLASS AGS_SET_FORMAT_GET_CLASS AGS_TYPE_SET_FORMAT AgsSetFormat AgsSetFormatClass ags_set_format_get_type
ags_set_input_device AgsSetInputDevice ags_set_input_device_new AGS_IS_SET_INPUT_DEVICE AGS_SET_INPUT_DEVICE AGS_SET_INPUT_DEVICE_CLASS AGS_SET_INPUT_DEVICE_GET_CLASS AGS_TYPE_SET_INPUT_DEVICE AgsSetInputDevice AgsSetInputDeviceClass ags_set_input_device_get_type
ags_set_muted AgsSetMuted ags_set_muted_new AGS_IS_SET_MUTED AGS_SET_MUTED AGS_SET_MUTED_CLASS AGS_SET_MUTED_GET_CLASS AGS_TYPE_SET_MUTED AgsSetMuted AgsSetMutedClass ags_set_muted_get_type
ags_set_output_device AgsSetOutputDevice ags_set_output_device_new AGS_IS_SET_OUTPUT_DEVICE AGS_SET_OUTPUT_DEVICE AGS_SET_OUTPUT_DEVICE_CLASS AGS_SET_OUTPUT_DEVICE_GET_CLASS AGS_TYPE_SET_OUTPUT_DEVICE AgsSetOutputDevice AgsSetOutputDeviceClass ags_set_output_device_get_type
ags_set_samplerate AgsSetSamplerate ags_set_samplerate_new AGS_IS_SET_SAMPLERATE AGS_SET_SAMPLERATE AGS_SET_SAMPLERATE_CLASS AGS_SET_SAMPLERATE_GET_CLASS AGS_TYPE_SET_SAMPLERATE AgsSetSamplerate AgsSetSamplerateClass ags_set_samplerate_get_type
ags_sndfile AgsSndfile AgsSndfileFlags ags_sndfile_new AGS_IS_SNDFILE AGS_SNDFILE AGS_SNDFILE_CLASS AGS_SNDFILE_GET_CLASS AGS_TYPE_SNDFILE AgsSndfile AgsSndfileClass ags_sndfile_get_type
ags_sound_provider AgsSoundProvider ags_sound_provider_set_soundcard ags_sound_provider_get_soundcard ags_sound_provider_set_default_soundcard_thread ags_sound_provider_get_default_soundcard_thread ags_sound_provider_set_sequencer ags_sound_provider_get_sequencer ags_sound_provider_set_distributed_manager ags_sound_provider_get_distributed_manager AGS_IS_SOUND_PROVIDER AGS_IS_SOUND_PROVIDER_INTERFACE AGS_SOUND_PROVIDER AGS_SOUND_PROVIDER_GET_INTERFACE AGS_SOUND_PROVIDER_INTERFACE AGS_TYPE_SOUND_PROVIDER AgsSoundProvider AgsSoundProviderInterface ags_sound_provider_get_type
ags_soundcard_thread AgsSoundcardThread AGS_SOUNDCARD_THREAD_DEFAULT_JIFFIE ags_soundcard_thread_find_soundcard ags_soundcard_thread_new AGS_IS_SOUNDCARD_THREAD AGS_SOUNDCARD_THREAD AGS_SOUNDCARD_THREAD_CLASS AGS_SOUNDCARD_THREAD_GET_CLASS AGS_TYPE_SOUNDCARD_THREAD AgsSoundcardThread AgsSoundcardThreadClass ags_soundcard_thread_get_type
ags_start_sequencer AgsStartSequencer ags_start_sequencer_new AGS_IS_START_SEQUENCER AGS_START_SEQUENCER AGS_START_SEQUENCER_CLASS AGS_START_SEQUENCER_GET_CLASS AGS_TYPE_START_SEQUENCER AgsStartSequencer AgsStartSequencerClass ags_start_sequencer_get_type
ags_start_soundcard AgsStartSoundcard ags_start_soundcard_new AGS_IS_START_SOUNDCARD AGS_START_SOUNDCARD AGS_START_SOUNDCARD_CLASS AGS_START_SOUNDCARD_GET_CLASS AGS_TYPE_START_SOUNDCARD AgsStartSoundcard AgsStartSoundcardClass ags_start_soundcard_get_type
ags_stream_audio_signal AgsStreamAudioSignal ags_stream_audio_signal_new AGS_IS_STREAM_AUDIO_SIGNAL AGS_STREAM_AUDIO_SIGNAL AGS_STREAM_AUDIO_SIGNAL_CLASS AGS_STREAM_AUDIO_SIGNAL_GET_CLASS AGS_TYPE_STREAM_AUDIO_SIGNAL AgsStreamAudioSignal AgsStreamAudioSignalClass ags_stream_audio_signal_get_type
ags_stream_channel AgsStreamChannel ags_stream_channel_new AGS_IS_STREAM_CHANNEL AGS_STREAM_CHANNEL AGS_STREAM_CHANNEL_CLASS AGS_STREAM_CHANNEL_GET_CLASS AGS_TYPE_STREAM_CHANNEL AgsStreamChannel AgsStreamChannelClass ags_stream_channel_get_type
ags_stream_channel_run AgsStreamChannelRun ags_stream_channel_run_new AGS_IS_STREAM_CHANNEL_RUN AGS_STREAM_CHANNEL_RUN AGS_STREAM_CHANNEL_RUN_CLASS AGS_STREAM_CHANNEL_RUN_GET_CLASS AGS_TYPE_STREAM_CHANNEL_RUN AgsStreamChannelRun AgsStreamChannelRunClass ags_stream_channel_run_get_type
ags_stream_recycling AgsStreamRecycling ags_stream_recycling_new AGS_IS_STREAM_RECYCLING AGS_STREAM_RECYCLING AGS_STREAM_RECYCLING_CLASS AGS_STREAM_RECYCLING_GET_CLASS AGS_TYPE_STREAM_RECYCLING AgsStreamRecycling AgsStreamRecyclingClass ags_stream_recycling_get_type
ags_switch_buffer_flag AgsSwitchBufferFlag ags_switch_buffer_flag_new AGS_IS_SWITCH_BUFFER_FLAG AGS_SWITCH_BUFFER_FLAG AGS_SWITCH_BUFFER_FLAG_CLASS AGS_SWITCH_BUFFER_FLAG_GET_CLASS AGS_TYPE_SWITCH_BUFFER_FLAG AgsSwitchBufferFlag AgsSwitchBufferFlagClass ags_switch_buffer_flag_get_type
ags_synth_generator AgsSynthGenerator AgsSynthGeneratorOscillator AgsSynthGeneratorComputeFlags ags_synth_generator_compute ags_synth_generator_compute_with_audio_signal ags_synth_generator_compute_extended ags_synth_generator_new AGS_IS_SYNTH_GENERATOR AGS_SYNTH_GENERATOR AGS_SYNTH_GENERATOR_CLASS AGS_SYNTH_GENERATOR_GET_CLASS AGS_TYPE_SYNTH_GENERATOR AgsSynthGenerator AgsSynthGeneratorClass ags_synth_generator_get_type
ags_synth_util ags_synth_util_get_xcross_count_s8 ags_synth_util_get_xcross_count_s16 ags_synth_util_get_xcross_count_s24 ags_synth_util_get_xcross_count_s32 ags_synth_util_get_xcross_count_s64 ags_synth_util_get_xcross_count_float ags_synth_util_get_xcross_count_double ags_synth_util_get_xcross_count ags_synth_util_sin_s8 ags_synth_util_sin_s16 ags_synth_util_sin_s24 ags_synth_util_sin_s32 ags_synth_util_sin_s64 ags_synth_util_sin_float ags_synth_util_sin_double ags_synth_util_sawtooth_s8 ags_synth_util_sawtooth_s16 ags_synth_util_sawtooth_s24 ags_synth_util_sawtooth_s32 ags_synth_util_sawtooth_s64 ags_synth_util_sawtooth_float ags_synth_util_sawtooth_double ags_synth_util_triangle_s8 ags_synth_util_triangle_s16 ags_synth_util_triangle_s24 ags_synth_util_triangle_s32 ags_synth_util_triangle_s64 ags_synth_util_triangle_float ags_synth_util_triangle_double ags_synth_util_square_s8 ags_synth_util_square_s16 ags_synth_util_square_s24 ags_synth_util_square_s32 ags_synth_util_square_s64 ags_synth_util_square_float ags_synth_util_square_double ags_synth_util_sin ags_synth_util_sawtooth ags_synth_util_triangle ags_synth_util_square
ags_tic_device AgsTicDevice ags_tic_device_new AGS_IS_TIC_DEVICE AGS_TIC_DEVICE AGS_TIC_DEVICE_CLASS AGS_TIC_DEVICE_GET_CLASS AGS_TYPE_TIC_DEVICE AgsTicDevice AgsTicDeviceClass ags_tic_device_get_type
ags_toggle_pattern_bit AgsTogglePatternBit ags_toggle_pattern_bit_refresh_gui ags_toggle_pattern_bit_new AGS_IS_TOGGLE_PATTERN_BIT AGS_TOGGLE_PATTERN_BIT AGS_TOGGLE_PATTERN_BIT_CLASS AGS_TOGGLE_PATTERN_BIT_GET_CLASS AGS_TYPE_TOGGLE_PATTERN_BIT AgsTogglePatternBit AgsTogglePatternBitClass ags_toggle_pattern_bit_get_type
ags_unref_audio_signal AgsUnrefAudioSignal ags_unref_audio_signal_new AGS_IS_UNREF_AUDIO_SIGNAL AGS_TYPE_UNREF_AUDIO_SIGNAL AGS_UNREF_AUDIO_SIGNAL AGS_UNREF_AUDIO_SIGNAL_CLASS AGS_UNREF_AUDIO_SIGNAL_GET_CLASS AgsUnrefAudioSignal AgsUnrefAudioSignalClass ags_unref_audio_signal_get_type
ags_volume_audio_signal AgsVolumeAudioSignal ags_volume_audio_signal_new AGS_IS_VOLUME_AUDIO_SIGNAL AGS_TYPE_VOLUME_AUDIO_SIGNAL AGS_VOLUME_AUDIO_SIGNAL AGS_VOLUME_AUDIO_SIGNAL_CLASS AGS_VOLUME_AUDIO_SIGNAL_GET_CLASS AgsVolumeAudioSignal AgsVolumeAudioSignalClass ags_volume_audio_signal_get_type
ags_volume_channel AgsVolumeChannel ags_volume_channel_new AGS_IS_VOLUME_CHANNEL AGS_TYPE_VOLUME_CHANNEL AGS_VOLUME_CHANNEL AGS_VOLUME_CHANNEL_CLASS AGS_VOLUME_CHANNEL_GET_CLASS AgsVolumeChannel AgsVolumeChannelClass ags_volume_channel_get_type
ags_volume_channel_run AgsVolumeChannelRun ags_volume_channel_run_new AGS_IS_VOLUME_CHANNEL_RUN AGS_TYPE_VOLUME_CHANNEL_RUN AGS_VOLUME_CHANNEL_RUN AGS_VOLUME_CHANNEL_RUN_CLASS AGS_VOLUME_CHANNEL_RUN_GET_CLASS AgsVolumeChannelRun AgsVolumeChannelRunClass ags_volume_channel_run_get_type
ags_volume_recycling AgsVolumeRecycling ags_volume_recycling_new AGS_IS_VOLUME_RECYCLING AGS_TYPE_VOLUME_RECYCLING AGS_VOLUME_RECYCLING AGS_VOLUME_RECYCLING_CLASS AGS_VOLUME_RECYCLING_GET_CLASS AgsVolumeRecycling AgsVolumeRecyclingClass ags_volume_recycling_get_type
ags_wave AgsWave AGS_WAVE_DEFAULT_BPM AGS_WAVE_TICS_PER_BEAT AGS_WAVE_MINIMUM_BUFFER_LENGTH AGS_WAVE_DEFAULT_LENGTH AGS_WAVE_DEFAULT_JIFFIE AGS_WAVE_DEFAULT_DURATION AGS_WAVE_DEFAULT_OFFSET AGS_WAVE_CLIPBOARD_VERSION AGS_WAVE_CLIPBOARD_TYPE AGS_WAVE_CLIPBOARD_FORMAT AgsWaveFlags ags_wave_set_samplerate ags_wave_set_buffer_size ags_wave_set_format ags_wave_find_near_timestamp ags_wave_add ags_wave_add_buffer ags_wave_remove_buffer ags_wave_get_selection ags_wave_is_buffer_selected ags_wave_find_region ags_wave_free_selection ags_wave_add_region_to_selection ags_wave_remove_region_from_selection ags_wave_add_all_to_selection ags_wave_copy_selection ags_wave_cut_selection ags_wave_insert_from_clipboard ags_wave_insert_from_clipboard_extended ags_wave_new AGS_IS_WAVE AGS_TYPE_WAVE AGS_WAVE AGS_WAVE_CLASS AGS_WAVE_GET_CLASS AgsWave AgsWaveClass ags_wave_get_type
gsequencer-1.4.24/docs/reference/libags-audio/libags_audio.interfaces0000644000175000017500000002716013247044247022616 00000000000000AgsAcceleration AgsConnectable AgsTask AgsConnectable AgsAddAudio AgsConnectable AgsAddAudioSignal AgsConnectable AgsAddEffect AgsConnectable AgsAddNote AgsConnectable AgsAddPointToSelection AgsConnectable AgsAddRecallContainer AgsConnectable AgsAddRecall AgsConnectable AgsAddRegionToSelection AgsConnectable AgsAddSoundcard AgsConnectable AgsAppendAudio AgsConnectable AgsAppendAudioThreaded AgsConnectable AgsAppendChannel AgsConnectable AgsAppendRecall AgsConnectable AgsApplyBpm AgsConnectable AgsApplyPresets AgsConnectable AgsApplySequencerLength AgsConnectable AgsApplySynth AgsConnectable AgsApplyTact AgsConnectable AgsCancelAudio AgsConnectable AgsCancelChannel AgsConnectable AgsCancelRecall AgsConnectable AgsChangeSoundcard AgsConnectable AgsClearAudioSignal AgsConnectable AgsClearBuffer AgsConnectable AgsCropNote AgsConnectable AgsExportOutput AgsConnectable AgsFreeSelection AgsConnectable AgsInitAudio AgsConnectable AgsInitChannel AgsConnectable AgsLinkChannel AgsConnectable AgsMoveNote AgsConnectable AgsNotifySoundcard AgsConnectable AgsOpenFile AgsConnectable AgsOpenSf2Sample AgsConnectable AgsOpenSingleFile AgsConnectable AgsRemoveAudio AgsConnectable AgsRemoveAudioSignal AgsConnectable AgsRemoveNote AgsConnectable AgsRemovePointFromSelection AgsConnectable AgsRemoveRecallContainer AgsConnectable AgsRemoveRecall AgsConnectable AgsRemoveRegionFromSelection AgsConnectable AgsRemoveSoundcard AgsConnectable AgsResetAudioConnection AgsConnectable AgsResetPeak AgsConnectable AgsResizeAudio AgsConnectable AgsSaveFile AgsConnectable AgsSeekSoundcard AgsConnectable AgsSetAudioChannels AgsConnectable AgsSetBufferSize AgsConnectable AgsSetFormat AgsConnectable AgsSetInputDevice AgsConnectable AgsSetMuted AgsConnectable AgsSetOutputDevice AgsConnectable AgsSetSamplerate AgsConnectable AgsStartSequencer AgsConnectable AgsStartSoundcard AgsConnectable AgsSwitchBufferFlag AgsConnectable AgsTicDevice AgsConnectable AgsTogglePatternBit AgsConnectable AgsUnrefAudioSignal AgsConnectable AgsApplicationContext AgsConnectable AgsAudioApplicationContext AgsConnectable AgsConcurrencyProvider AgsSoundProvider AgsAudioFile AgsConnectable AgsFileLink AgsPlugin AgsAudioFileLink AgsPlugin AgsAudio AgsConnectable AgsThread AgsConnectable AgsAudioLoop AgsConnectable AgsMainLoop AgsAudioThread AgsConnectable AgsChannelThread AgsConnectable AgsExportThread AgsConnectable AgsIteratorThread AgsConnectable AgsRecordThread AgsConnectable AgsRecyclingThread AgsConnectable AgsSequencerThread AgsConnectable AgsSoundcardThread AgsConnectable AgsTaskThread AgsConnectable AgsAsyncQueue AgsAudioSignal AgsConnectable AgsAudioXmlSerializationFactory AgsConnectable AgsAutomation AgsConnectable AgsPortlet AgsRecall AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsBufferAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCopyAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsEnvelopeAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsFeedAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMuteAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPeakAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPrepareAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallDssiRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallLadspaRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallLv2Run AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRtStreamAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsStreamAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsVolumeAudioSignal AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsBufferChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMutable AgsCopyChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMutable AgsCopyPatternChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsEnvelopeChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsFeedChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsLoopChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMuteChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMutable AgsPeakChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMutable AgsPrepareChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallDssi AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallLadspa AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallLv2 AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRtStreamChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsStreamChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsVolumeChannel AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsBufferChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCopyChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCopyPatternChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsEnvelopeChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsFeedChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsLoopChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMuteChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPeakChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayChannelRunMaster AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPrepareChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallChannelRunDummy AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRtStreamChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsStreamChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsVolumeChannelRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsBufferRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCopyRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsEnvelopeRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsFeedRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMuteRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPeakRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPrepareRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallRecyclingDummy AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRtStreamRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsStreamRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsVolumeRecycling AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCaptureSoundAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCopyNotationAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCopyPatternAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCountBeatsAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsTactable AgsDelayAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsTactable AgsMuteAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMutable AgsPlayAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayDssiAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayLv2Audio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayNotationAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecordMidiAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRouteDssiAudio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRouteLv2Audio AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCaptureSoundAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCopyNotationAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCopyPatternAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCountBeatsAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsCountable AgsSeekable AgsTactable AgsDelayAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsMuteAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayDssiAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayLv2AudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayNotationAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecallAdaptorRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRecordMidiAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRouteDssiAudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsRouteLv2AudioRun AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayAudioFile AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsPlayNote AgsConnectable AgsPackable AgsDynamicConnectable AgsPlugin AgsBuffer AgsConnectable AgsChannel AgsConnectable AgsInput AgsConnectable AgsOutput AgsConnectable AgsCoreAudioClient AgsConnectable AgsCoreAudioDevout AgsConnectable AgsSoundcard AgsCoreAudioMidiin AgsConnectable AgsSequencer AgsCoreAudioPort AgsConnectable AgsCoreAudioServer AgsConnectable AgsDistributedManager AgsDevin AgsConnectable AgsSoundcard AgsConcurrentTree AgsDevout AgsConnectable AgsSoundcard AgsConcurrentTree AgsFifoout AgsConnectable AgsSoundcard AgsConcurrentTree AgsIpatchDLS2Reader AgsConnectable AgsIpatch AgsConnectable AgsPlayable AgsIpatchSF2Reader AgsConnectable AgsJackClient AgsConnectable AgsJackDevin AgsConnectable AgsSoundcard AgsJackDevout AgsConnectable AgsSoundcard AgsJackMidiin AgsConnectable AgsSequencer AgsJackPort AgsConnectable AgsJackServer AgsConnectable AgsDistributedManager AgsSynthGenerator AgsPlugin AgsLv2EventManager AgsConnectable AgsLv2LogManager AgsConnectable AgsLv2OptionManager AgsConnectable AgsLv2Preset AgsConnectable AgsLv2UriMapManager AgsConnectable AgsLv2UridManager AgsConnectable AgsLv2Worker AgsConnectable AgsLv2WorkerManager AgsConnectable AgsMidiin AgsConnectable AgsSequencer AgsNotation AgsConnectable AgsTactable AgsPortlet AgsNote AgsConnectable AgsPattern AgsConnectable AgsTactable AgsPortlet AgsPlaybackDomain AgsConnectable AgsPlayback AgsConnectable AgsPort AgsConnectable AgsPulseClient AgsConnectable AgsPulseDevin AgsConnectable AgsSoundcard AgsPulseDevout AgsConnectable AgsSoundcard AgsPulsePort AgsConnectable AgsPulseServer AgsConnectable AgsDistributedManager AgsRecallContainer AgsConnectable AgsRecallDependency AgsConnectable AgsRecallFactory AgsConnectable AgsRecallID AgsConnectable AgsRecycling AgsConnectable AgsConcurrentTree AgsRemoteChannel AgsConnectable AgsRemoteInput AgsConnectable AgsRemoteOutput AgsConnectable AgsSndfile AgsConnectable AgsPlayable AgsWave AgsConnectable AgsRegistry AgsConnectable gsequencer-1.4.24/docs/reference/libags-audio/git.mk0000644000175000017500000002441413246707333017243 00000000000000# git.mk # # Copyright 2009, Red Hat, Inc. # Copyright 2010,2011,2012,2013 Behdad Esfahbod # Written by Behdad Esfahbod # # Copying and distribution of this file, with or without modification, # is permitted in any medium without royalty provided the copyright # notice and this notice are preserved. # # The latest version of this file can be downloaded from: # https://raw.github.com/behdad/git.mk/master/git.mk # Bugs, etc, should be reported upstream at: # https://github.com/behdad/git.mk # # To use in your project, import this file in your git repo's toplevel, # then do "make -f git.mk". This modifies all Makefile.am files in # your project to -include git.mk. Remember to add that line to new # Makefile.am files you create in your project, or just rerun the # "make -f git.mk". # # This enables automatic .gitignore generation. If you need to ignore # more files, add them to the GITIGNOREFILES variable in your Makefile.am. # But think twice before doing that. If a file has to be in .gitignore, # chances are very high that it's a generated file and should be in one # of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. # # The only case that you need to manually add a file to GITIGNOREFILES is # when remove files in one of mostlyclean-local, clean-local, distclean-local, # or maintainer-clean-local make targets. # # Note that for files like editor backup, etc, there are better places to # ignore them. See "man gitignore". # # If "make maintainer-clean" removes the files but they are not recognized # by this script (that is, if "git status" shows untracked files still), send # me the output of "git status" as well as your Makefile.am and Makefile for # the directories involved and I'll diagnose. # # For a list of toplevel files that should be in MAINTAINERCLEANFILES, see # Makefile.am.sample in the git.mk git repo. # # Don't EXTRA_DIST this file. It is supposed to only live in git clones, # not tarballs. It serves no useful purpose in tarballs and clutters the # build dir. # # This file knows how to handle autoconf, automake, libtool, gtk-doc, # gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata, # appstream. # # This makefile provides the following targets: # # - all: "make all" will build all gitignore files. # - gitignore: makes all gitignore files in the current dir and subdirs. # - .gitignore: make gitignore file for the current dir. # - gitignore-recurse: makes all gitignore files in the subdirs. # # KNOWN ISSUES: # # - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the # submodule doesn't find us. If you have configure.{in,ac} files in # subdirs, add a proxy git.mk file in those dirs that simply does: # "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. # And add those files to git. See vte/gnome-pty-helper/git.mk for # example. # ############################################################################### # Variables user modules may want to add to toplevel MAINTAINERCLEANFILES: ############################################################################### # # Most autotools-using modules should be fine including this variable in their # toplevel MAINTAINERCLEANFILES: GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \ $(srcdir)/aclocal.m4 \ $(srcdir)/autoscan.log \ $(srcdir)/configure.scan \ `AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \ test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \ for x in \ ar-lib \ compile \ config.guess \ config.sub \ depcomp \ install-sh \ ltmain.sh \ missing \ mkinstalldirs \ test-driver \ ylwrap \ ; do echo "$$AUX_DIR/$$x"; done` \ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \ head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done` # # All modules should also be fine including the following variable, which # removes automake-generated Makefile.in files: GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \ while read f; do \ case $$f in Makefile|*/Makefile) \ test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \ done` # # Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this, # though it's harmless to include regardless. GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \ `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \ if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \ for x in \ libtool.m4 \ ltoptions.m4 \ ltsugar.m4 \ ltversion.m4 \ lt~obsolete.m4 \ ; do echo "$$MACRO_DIR/$$x"; done; \ fi` ############################################################################### # Default rule is to install ourselves in all Makefile.am files: ############################################################################### git-all: git-mk-install git-mk-install: @echo "Installing git makefile" @any_failed=; \ find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ if grep 'include .*/git.mk' $$x >/dev/null; then \ echo "$$x already includes git.mk"; \ else \ failed=; \ echo "Updating $$x"; \ { cat $$x; \ echo ''; \ echo '-include $$(top_srcdir)/git.mk'; \ } > $$x.tmp || failed=1; \ if test x$$failed = x; then \ mv $$x.tmp $$x || failed=1; \ fi; \ if test x$$failed = x; then : else \ echo "Failed updating $$x"; >&2 \ any_failed=1; \ fi; \ fi; done; test -z "$$any_failed" .PHONY: git-all git-mk-install ############################################################################### # Actual .gitignore generation: ############################################################################### $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk @echo "git.mk: Generating $@" @{ \ if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ for x in \ $(DOC_MODULE)-decl-list.txt \ $(DOC_MODULE)-decl.txt \ tmpl/$(DOC_MODULE)-unused.sgml \ "tmpl/*.bak" \ xml html \ ; do echo "/$$x"; done; \ FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \ case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \ fi; \ if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ for lc in $(DOC_LINGUAS); do \ for x in \ $(if $(DOC_MODULE),$(DOC_MODULE).xml) \ $(DOC_PAGES) \ $(DOC_INCLUDES) \ ; do echo "/$$lc/$$x"; done; \ done; \ for x in \ $(_DOC_OMF_ALL) \ $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) \ $(_DOC_MOFILES) \ $(DOC_H_FILE) \ "*/.xml2po.mo" \ "*/*.omf.out" \ ; do echo /$$x; done; \ fi; \ if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ for lc in $(HELP_LINGUAS); do \ for x in \ $(HELP_FILES) \ "$$lc.stamp" \ "$$lc.mo" \ ; do echo "/$$lc/$$x"; done; \ done; \ fi; \ if test "x$(gsettings_SCHEMAS)" = x; then :; else \ for x in \ $(gsettings_SCHEMAS:.xml=.valid) \ $(gsettings__enum_file) \ ; do echo "/$$x"; done; \ fi; \ if test "x$(appdata_XML)" = x; then :; else \ for x in \ $(appdata_XML:.xml=.valid) \ ; do echo "/$$x"; done; \ fi; \ if test "x$(appstream_XML)" = x; then :; else \ for x in \ $(appstream_XML:.xml=.valid) \ ; do echo "/$$x"; done; \ fi; \ if test -f $(srcdir)/po/Makefile.in.in; then \ for x in \ po/Makefile.in.in \ po/Makefile.in.in~ \ po/Makefile.in \ po/Makefile \ po/Makevars.template \ po/POTFILES \ po/Rules-quot \ po/stamp-it \ po/.intltool-merge-cache \ "po/*.gmo" \ "po/*.header" \ "po/*.mo" \ "po/*.sed" \ "po/*.sin" \ po/$(GETTEXT_PACKAGE).pot \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ ; do echo "/$$x"; done; \ fi; \ if test -f $(srcdir)/configure; then \ for x in \ autom4te.cache \ configure \ config.h \ stamp-h1 \ libtool \ config.lt \ ; do echo "/$$x"; done; \ fi; \ if test "x$(DEJATOOL)" = x; then :; else \ for x in \ $(DEJATOOL) \ ; do echo "/$$x.sum"; echo "/$$x.log"; done; \ echo /site.exp; \ fi; \ if test "x$(am__dirstamp)" = x; then :; else \ echo "$(am__dirstamp)"; \ fi; \ if test "x$(LTCOMPILE)" = x -a "x$(LTCXXCOMPILE)" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ for x in \ "*.lo" \ ".libs" "_libs" \ ; do echo "$$x"; done; \ fi; \ for x in \ .gitignore \ $(GITIGNOREFILES) \ $(CLEANFILES) \ $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \ $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \ $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \ so_locations \ $(MOSTLYCLEANFILES) \ $(TEST_LOGS) \ $(TEST_LOGS:.log=.trs) \ $(TEST_SUITE_LOG) \ "*.gcda" \ "*.gcno" \ $(DISTCLEANFILES) \ $(am__CONFIG_DISTCLEAN_FILES) \ $(CONFIG_CLEAN_FILES) \ TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ "*.tab.c" \ $(MAINTAINERCLEANFILES) \ $(BUILT_SOURCES) \ $(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \ $(filter %_vala.stamp,$(DIST_COMMON)) \ $(filter %.vapi,$(DIST_COMMON)) \ $(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \ Makefile \ Makefile.in \ "*.orig" \ "*.rej" \ "*.bak" \ "*~" \ ".*.sw[nop]" \ ".dirstamp" \ ; do echo "/$$x"; done; \ for x in \ "*.$(OBJEXT)" \ $(DEPDIR) \ ; do echo "$$x"; done; \ } | \ sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ sed 's@/[.]/@/@g' | \ LC_ALL=C sort | uniq > $@.tmp && \ mv $@.tmp $@; all: $(srcdir)/.gitignore gitignore-recurse-maybe gitignore: $(srcdir)/.gitignore gitignore-recurse gitignore-recurse-maybe: @for subdir in $(DIST_SUBDIRS); do \ case " $(SUBDIRS) " in \ *" $$subdir "*) :;; \ *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \ esac; \ done gitignore-recurse: @for subdir in $(DIST_SUBDIRS); do \ test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \ done maintainer-clean: gitignore-clean gitignore-clean: -rm -f $(srcdir)/.gitignore .PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe gsequencer-1.4.24/docs/reference/libags-audio/gtk-doc.make0000644000175000017500000002410613246707333020314 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ chmod +x $@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else HTML_BUILD_STAMP= endif if GTK_DOC_BUILD_PDF PDF_BUILD_STAMP=pdf-build.stamp else PDF_BUILD_STAMP= endif all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) .PHONY: all-gtk-doc if ENABLE_GTK_DOC all-local: all-gtk-doc endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi $(AM_V_at)touch setup-build.stamp #### scan #### GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### xml #### GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0=@echo " DOC Building XML"; sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ ) > $@ #### html #### GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf libags-audio-html && mkdir libags-audio-html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd libags-audio-html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/libags-audio-html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/libags-audio-html; \ fi; \ test -f $$file && cp $$file $(abs_builddir)/libags-audio-html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=libags-audio-html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp #### pdf #### GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ rm -f $(DOC_MODULE)-sections.txt; \ fi distclean-local: @rm -rf xml libags-audio-html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @rm -rf xml libags-audio-html install-data-local: @installfiles=`echo $(builddir)/libags-audio-html/*`; \ if test "$$installfiles" = '$(builddir)/libags-audio-html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if HAVE_GTK_DOC dist-check-gtkdoc: docs else dist-check-gtkdoc: @echo "*** gtk-doc is needed to run 'make dist'. ***" @echo "*** gtk-doc was not found when 'configure' ran. ***" @echo "*** please install gtk-doc and rerun 'configure'. ***" @false endif dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/libags-audio-html @cp ./libags-audio-html/* $(distdir)/libags-audio-html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/libags-audio-html .PHONY : dist-hook-local docs gsequencer-1.4.24/docs/reference/libags-audio/Makefile.am0000644000175000017500000001011013246707333020147 00000000000000# This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE=libags_audio # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 # The top-level XML file. DOC_MAIN_SGML_FILE=$(DOC_MODULE).xml # Directories containing the source code. # gtk-doc will search all .c and .h files beneath these paths # for inline comments documenting functions and macros. # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR=$(top_srcdir)/ags/plugin $(top_srcdir)/ags/audio # Extra options to pass to gtkdoc-scangobj. Normally not needed. SCANGOBJ_OPTIONS=--cflags="$(CFLAGS) $(UUID_CFLAGS) $(LIBXML2_CFLAGS) $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) $(XMLRPC_SERVER_CFLAGS) $(OPENSSL_CFLAGS) $(GOBJECT_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBAO_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(JACK_CFLAGS)" --ldflags="-static -ldl -lm -lrt -pthread $(LDFLAGS) $(UUID_LIBS) $(LIBASOUND2_LIBS) $(LIBAO_LIBS) $(LIBXML2_LIBS) $(OPENSSL_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) $(XMLRPC_SERVER_LIBS) $(GOBJECT_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(JACK_LIBS) -L$(top_builddir) $(top_builddir)/libags.la $(top_builddir)/libags_thread.la $(top_builddir)/libags_server.la $(top_builddir)/libags_audio.la" # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" # SCAN_OPTIONS=--rebuild-types --rebuild-sections # Extra options to supply to gtkdoc-mkdb # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml MKDB_OPTIONS=--xml-mode --output-format=xml --name-space=libags_audio --module=libags_audio # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= # Extra options to supply to gtkdoc-fixref. Normally not needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS=--module=libags_audio --module-dir=./libags-audio-html/ --html-dir=$(DESTDIR)/$(datadir)/doc/libags-audio-doc/api --extra-dir=$(top_srcdir)/docs/reference/libags/libags-html # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB= CFILE_GLOB= # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES= # Header files or dirs to ignore when scanning. Use base file/dir names # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES=ags_lv2_state_manager.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES= # Extra files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.xml building.xml changes-2.0.xml content_files= # Files where gtk-doc abbrevations (#GtkWidget) are expanded # e.g. expand_content_files=running.xml expand_content_files= AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS=$(gsequencer_CFLAGS) -DGTK_IS_WIDGET_CLASS=1 GTKDOC_LIBS = \ $(top_builddir)/libags.la \ $(top_builddir)/libags_thread.la \ $(top_builddir)/libags_server.la \ $(top_builddir)/libags_audio.la # This includes the standard gtk-doc make rules, copied by gtkdocize. include ./gtk-doc.make # Comment this out if you want 'make check' to test you doc status # and run some sanity checks if ENABLE_GTK_DOC TESTS_ENVIRONMENT = \ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) TESTS = $(GTKDOC_CHECK) endif -include $(top_srcdir)/git.mk gsequencer-1.4.24/docs/reference/libags-audio/libags_audio.types0000644000175000017500000001533513247044247021640 00000000000000ags_acceleration_get_type ags_add_audio_get_type ags_add_audio_signal_get_type ags_add_effect_get_type ags_add_note_get_type ags_add_point_to_selection_get_type ags_add_recall_container_get_type ags_add_recall_get_type ags_add_region_to_selection_get_type ags_add_soundcard_get_type ags_append_audio_get_type ags_append_audio_threaded_get_type ags_append_channel_get_type ags_append_recall_get_type ags_apply_bpm_get_type ags_apply_presets_get_type ags_apply_sequencer_length_get_type ags_apply_synth_get_type ags_apply_tact_get_type ags_audio_application_context_get_type ags_audio_connection_get_type ags_audio_file_get_type ags_audio_file_link_get_type ags_audio_get_type ags_audio_loop_get_type ags_audio_signal_get_type ags_audio_thread_get_type ags_audio_xml_serialization_factory_get_type ags_automation_get_type ags_base_plugin_get_type ags_buffer_audio_signal_get_type ags_buffer_channel_get_type ags_buffer_channel_run_get_type ags_buffer_get_type ags_buffer_recycling_get_type ags_cancel_audio_get_type ags_cancel_channel_get_type ags_cancel_recall_get_type ags_capture_sound_audio_get_type ags_capture_sound_audio_run_get_type ags_change_soundcard_get_type ags_channel_get_type ags_channel_thread_get_type ags_clear_audio_signal_get_type ags_clear_buffer_get_type ags_copy_audio_signal_get_type ags_copy_channel_get_type ags_copy_channel_run_get_type ags_copy_notation_audio_get_type ags_copy_notation_audio_run_get_type ags_copy_pattern_audio_get_type ags_copy_pattern_audio_run_get_type ags_copy_pattern_channel_get_type ags_copy_pattern_channel_run_get_type ags_copy_recycling_get_type ags_core_audio_client_get_type ags_core_audio_devout_get_type ags_core_audio_midiin_get_type ags_core_audio_port_get_type ags_core_audio_server_get_type ags_count_beats_audio_get_type ags_count_beats_audio_run_get_type ags_crop_note_get_type ags_delay_audio_get_type ags_delay_audio_run_get_type ags_devin_get_type ags_devout_get_type ags_dssi_manager_get_type ags_dssi_plugin_get_type ags_envelope_audio_signal_get_type ags_envelope_channel_get_type ags_envelope_channel_run_get_type ags_envelope_recycling_get_type ags_export_output_get_type ags_export_thread_get_type ags_feed_audio_signal_get_type ags_feed_channel_get_type ags_feed_channel_run_get_type ags_feed_recycling_get_type ags_fifoout_get_type ags_free_selection_get_type ags_init_audio_get_type ags_init_channel_get_type ags_input_get_type ags_ipatch_dls2_reader_get_type ags_ipatch_get_type ags_ipatch_sf2_reader_get_type ags_iterator_thread_get_type ags_jack_client_get_type ags_jack_devin_get_type ags_jack_devout_get_type ags_jack_midiin_get_type ags_jack_port_get_type ags_jack_server_get_type ags_ladspa_conversion_get_type ags_ladspa_manager_get_type ags_ladspa_plugin_get_type ags_link_channel_get_type ags_loop_channel_get_type ags_loop_channel_run_get_type ags_lv2_conversion_get_type ags_lv2_event_manager_get_type ags_lv2_log_manager_get_type ags_lv2_manager_get_type ags_lv2_option_manager_get_type ags_lv2_plugin_get_type ags_lv2_preset_get_type ags_lv2_uri_map_manager_get_type ags_lv2_urid_manager_get_type ags_lv2_worker_get_type ags_lv2_worker_manager_get_type ags_lv2ui_manager_get_type ags_lv2ui_plugin_get_type ags_midi_builder_get_type ags_midi_file_get_type ags_midi_parser_get_type ags_midiin_get_type ags_move_note_get_type ags_mute_audio_get_type ags_mute_audio_run_get_type ags_mute_audio_signal_get_type ags_mute_channel_get_type ags_mute_channel_run_get_type ags_mute_recycling_get_type ags_notation_get_type ags_note_get_type ags_notify_soundcard_get_type ags_open_file_get_type ags_open_sf2_sample_get_type ags_open_single_file_get_type ags_output_get_type ags_pattern_get_type ags_peak_audio_signal_get_type ags_peak_channel_get_type ags_peak_channel_run_get_type ags_peak_recycling_get_type ags_play_audio_file_get_type ags_play_audio_get_type ags_play_audio_signal_get_type ags_play_channel_get_type ags_play_channel_run_get_type ags_play_channel_run_master_get_type ags_play_dssi_audio_get_type ags_play_dssi_audio_run_get_type ags_play_lv2_audio_get_type ags_play_lv2_audio_run_get_type ags_play_notation_audio_get_type ags_play_notation_audio_run_get_type ags_play_note_get_type ags_play_recycling_get_type ags_playable_get_type ags_playback_domain_get_type ags_playback_get_type ags_plugin_factory_get_type ags_port_get_type ags_prepare_audio_signal_get_type ags_prepare_channel_get_type ags_prepare_channel_run_get_type ags_prepare_recycling_get_type ags_preset_get_type ags_pulse_client_get_type ags_pulse_devin_get_type ags_pulse_devout_get_type ags_pulse_port_get_type ags_pulse_server_get_type ags_recall_adaptor_run_get_type ags_recall_audio_get_type ags_recall_audio_run_get_type ags_recall_audio_signal_get_type ags_recall_channel_get_type ags_recall_channel_run_dummy_get_type ags_recall_channel_run_get_type ags_recall_container_get_type ags_recall_dependency_get_type ags_recall_dssi_get_type ags_recall_dssi_run_get_type ags_recall_factory_get_type ags_recall_get_type ags_recall_id_get_type ags_recall_ladspa_get_type ags_recall_ladspa_run_get_type ags_recall_lv2_get_type ags_recall_lv2_run_get_type ags_recall_recycling_dummy_get_type ags_recall_recycling_get_type ags_record_midi_audio_get_type ags_record_midi_audio_run_get_type ags_record_thread_get_type ags_recycling_context_get_type ags_recycling_get_type ags_recycling_thread_get_type ags_remote_channel_get_type ags_remote_input_get_type ags_remote_output_get_type ags_remove_audio_get_type ags_remove_audio_signal_get_type ags_remove_note_get_type ags_remove_point_from_selection_get_type ags_remove_recall_container_get_type ags_remove_recall_get_type ags_remove_region_from_selection_get_type ags_remove_soundcard_get_type ags_reset_audio_connection_get_type ags_reset_peak_get_type ags_resize_audio_get_type ags_route_dssi_audio_get_type ags_route_dssi_audio_run_get_type ags_route_lv2_audio_get_type ags_route_lv2_audio_run_get_type ags_rt_stream_audio_signal_get_type ags_rt_stream_channel_get_type ags_rt_stream_channel_run_get_type ags_rt_stream_recycling_get_type ags_save_file_get_type ags_seek_soundcard_get_type ags_sequencer_thread_get_type ags_set_audio_channels_get_type ags_set_buffer_size_get_type ags_set_format_get_type ags_set_input_device_get_type ags_set_muted_get_type ags_set_output_device_get_type ags_set_samplerate_get_type ags_sndfile_get_type ags_sound_provider_get_type ags_soundcard_thread_get_type ags_start_sequencer_get_type ags_start_soundcard_get_type ags_stream_audio_signal_get_type ags_stream_channel_get_type ags_stream_channel_run_get_type ags_stream_recycling_get_type ags_switch_buffer_flag_get_type ags_synth_generator_get_type ags_tic_device_get_type ags_toggle_pattern_bit_get_type ags_unref_audio_signal_get_type ags_volume_audio_signal_get_type ags_volume_channel_get_type ags_volume_channel_run_get_type ags_volume_recycling_get_type ags_wave_get_type gsequencer-1.4.24/docs/reference/libags-audio/libags_audio-overrides.txt0000644000175000017500000000000013246707333023273 00000000000000gsequencer-1.4.24/docs/reference/libags-gui/0000755000175000017500000000000013256233676015672 500000000000000gsequencer-1.4.24/docs/reference/libags-gui/libags_gui.interfaces0000644000175000017500000000324013247044247021755 00000000000000GtkWidget AtkImplementorIface GtkBuildable AgsCartesian AtkImplementorIface GtkBuildable AgsDial AtkImplementorIface GtkBuildable GtkContainer AtkImplementorIface GtkBuildable GtkBin AtkImplementorIface GtkBuildable GtkExpander AtkImplementorIface GtkBuildable AgsExpander AtkImplementorIface GtkBuildable GtkAlignment AtkImplementorIface GtkBuildable AgsLedArray AtkImplementorIface GtkBuildable AgsHLedArray AtkImplementorIface GtkBuildable AgsVLedArray AtkImplementorIface GtkBuildable AgsLed AtkImplementorIface GtkBuildable AgsScrolledLevelBox AtkImplementorIface GtkBuildable AgsScrolledPiano AtkImplementorIface GtkBuildable AgsScrolledScaleBox AtkImplementorIface GtkBuildable GtkTable AtkImplementorIface GtkBuildable AgsExpanderSet AtkImplementorIface GtkBuildable AgsTable AtkImplementorIface GtkBuildable GtkBox AtkImplementorIface GtkBuildable GtkOrientable AgsLevelBox AtkImplementorIface GtkBuildable GtkOrientable AgsHLevelBox AtkImplementorIface GtkBuildable GtkOrientable AgsVLevelBox AtkImplementorIface GtkBuildable GtkOrientable AgsScaleBox AtkImplementorIface GtkBuildable GtkOrientable AgsHScaleBox AtkImplementorIface GtkBuildable GtkOrientable AgsVScaleBox AtkImplementorIface GtkBuildable GtkOrientable GtkVBox AtkImplementorIface GtkBuildable GtkOrientable AgsNotebook AtkImplementorIface GtkBuildable GtkOrientable AgsIndicator AtkImplementorIface GtkBuildable AgsHIndicator AtkImplementorIface GtkBuildable AgsVIndicator AtkImplementorIface GtkBuildable AgsLevel AtkImplementorIface GtkBuildable AgsPiano AtkImplementorIface GtkBuildable AgsRuler AtkImplementorIface GtkBuildable AgsScale AtkImplementorIface GtkBuildable AgsWaveform AtkImplementorIface GtkBuildable gsequencer-1.4.24/docs/reference/libags-gui/Makefile.in0000644000175000017500000012412713256226517017662 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ 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 \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/reference/libags-gui ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ags/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = ags-docs-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__DIST_COMMON = $(srcdir)/./gtk-doc.make $(srcdir)/Makefile.in \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CORE_AUDIO_CFLAGS = @CORE_AUDIO_CFLAGS@ CORE_AUDIO_LIBS = @CORE_AUDIO_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ GOBJECT_LIBS = @GOBJECT_LIBS@ GREP = @GREP@ GSEQUENCER_CFLAGS = @GSEQUENCER_CFLAGS@ GSEQUENCER_FUNCTIONAL_TEST_LDADD = @GSEQUENCER_FUNCTIONAL_TEST_LDADD@ GSEQUENCER_LDFLAGS = @GSEQUENCER_LDFLAGS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@ GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBASOUND2_CFLAGS = @LIBASOUND2_CFLAGS@ LIBASOUND2_LIBS = @LIBASOUND2_LIBS@ LIBGSEQUENCER_TEST_LIBADD = @LIBGSEQUENCER_TEST_LIBADD@ LIBICONV = @LIBICONV@ LIBINSTPATCH_CFLAGS = @LIBINSTPATCH_CFLAGS@ LIBINSTPATCH_LIBS = @LIBINSTPATCH_LIBS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MIDI2XML_CFLAGS = @MIDI2XML_CFLAGS@ MIDI2XML_LDFLAGS = @MIDI2XML_LDFLAGS@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE_CFLAGS = @PCRE_CFLAGS@ PCRE_LIBS = @PCRE_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PULSE_CFLAGS = @PULSE_CFLAGS@ PULSE_LIBS = @PULSE_LIBS@ RANLIB = @RANLIB@ SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@ SAMPLERATE_LIBS = @SAMPLERATE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ SNDFILE_LIBS = @SNDFILE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ XMLRPC_CLIENT_CFLAGS = @XMLRPC_CLIENT_CFLAGS@ XMLRPC_CLIENT_LIBS = @XMLRPC_CLIENT_LIBS@ XMLRPC_C_CONFIG = @XMLRPC_C_CONFIG@ XMLRPC_SERVER_ABYSS_CFLAGS = @XMLRPC_SERVER_ABYSS_CFLAGS@ XMLRPC_SERVER_ABYSS_LIBS = @XMLRPC_SERVER_ABYSS_LIBS@ XMLRPC_SERVER_CGI_CFLAGS = @XMLRPC_SERVER_CGI_CFLAGS@ XMLRPC_SERVER_CGI_LIBS = @XMLRPC_SERVER_CGI_LIBS@ XMLRPC_UTIL_CFLAGS = @XMLRPC_UTIL_CFLAGS@ XMLRPC_UTIL_LIBS = @XMLRPC_UTIL_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module, e.g. 'glib'. DOC_MODULE = libags_gui # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 # The top-level XML file. DOC_MAIN_SGML_FILE = $(DOC_MODULE).xml # Directories containing the source code. # gtk-doc will search all .c and .h files beneath these paths # for inline comments documenting functions and macros. # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR = $(top_srcdir)/ags/widget # Extra options to pass to gtkdoc-scangobj. Normally not needed. SCANGOBJ_OPTIONS = --cflags="$(CFLAGS) $(GOBJECT_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS)" --ldflags="-static -ldl -lm -lrt -pthread $(LDFLAGS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) -L$(top_builddir) $(top_builddir)/libags_gui.la" # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" # SCAN_OPTIONS=--rebuild-types --rebuild-sections # Extra options to supply to gtkdoc-mkdb # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml MKDB_OPTIONS = --xml-mode --output-format=xml --name-space=libags_gui --module=libags_gui # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS = # Extra options to supply to gtkdoc-fixref. Normally not needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = --module=libags_gui --module-dir=./libags-gui-html/ --html-dir=$(DESTDIR)/$(datadir)/doc/libags-gui-doc/api # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB = CFILE_GLOB = # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES = # Header files or dirs to ignore when scanning. Use base file/dir names # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES = # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = # Extra files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.xml building.xml changes-2.0.xml content_files = # Files where gtk-doc abbrevations (#GtkWidget) are expanded # e.g. expand_content_files=running.xml expand_content_files = AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS = $(gsequencer_CFLAGS) -DGTK_IS_WIDGET_CLASS=1 GTKDOC_LIBS = \ $(top_builddir)/libags_gui.la @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test @GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = @GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp #### setup #### GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; #### scan #### GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; #### xml #### GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0 = @echo " DOC Building XML"; #### html #### GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; #### pdf #### GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; # This includes the standard gtk-doc make rules, copied by gtkdocize. # Comment this out if you want 'make check' to test you doc status # and run some sanity checks @ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = \ @ENABLE_GTK_DOC_TRUE@ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ @ENABLE_GTK_DOC_TRUE@ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) @ENABLE_GTK_DOC_TRUE@TESTS = $(GTKDOC_CHECK) all: all-am .SUFFIXES: .SUFFIXES: .log .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/./gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/libags-gui/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/reference/libags-gui/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(srcdir)/./gtk-doc.make $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ags-docs-local: tags TAGS: ctags CTAGS: cscope cscopelist: # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am @ENABLE_GTK_DOC_FALSE@all-local: all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." ags-docs: ags-docs-am ags-docs-am: ags-docs-local clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: check-am install-am install-strip .PHONY: ags-docs-am ags-docs-local all all-am all-local check \ check-TESTS check-am clean clean-generic clean-libtool \ clean-local cscopelist-am ctags-am dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \ uninstall uninstall-am uninstall-local .PRECIOUS: Makefile gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ chmod +x $@ all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) .PHONY: all-gtk-doc @ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi $(AM_V_at)touch setup-build.stamp scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ ) > $@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf libags-gui-html && mkdir libags-gui-html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd libags-gui-html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/libags-gui-html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/libags-gui-html; \ fi; \ test -f $$file && cp $$file $(abs_builddir)/libags-gui-html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=libags-gui-html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ rm -f $(DOC_MODULE)-sections.txt; \ fi distclean-local: @rm -rf xml libags-gui-html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @rm -rf xml libags-gui-html install-data-local: @installfiles=`echo $(builddir)/libags-gui-html/*`; \ if test "$$installfiles" = '$(builddir)/libags-gui-html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs @HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: @HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" @HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" @HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" @HAVE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/libags-gui-html @cp ./libags-gui-html/* $(distdir)/libags-gui-html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/libags-gui-html .PHONY : dist-hook-local docs -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gsequencer-1.4.24/docs/reference/libags-gui/git.mk0000644000175000017500000002441413246707333016726 00000000000000# git.mk # # Copyright 2009, Red Hat, Inc. # Copyright 2010,2011,2012,2013 Behdad Esfahbod # Written by Behdad Esfahbod # # Copying and distribution of this file, with or without modification, # is permitted in any medium without royalty provided the copyright # notice and this notice are preserved. # # The latest version of this file can be downloaded from: # https://raw.github.com/behdad/git.mk/master/git.mk # Bugs, etc, should be reported upstream at: # https://github.com/behdad/git.mk # # To use in your project, import this file in your git repo's toplevel, # then do "make -f git.mk". This modifies all Makefile.am files in # your project to -include git.mk. Remember to add that line to new # Makefile.am files you create in your project, or just rerun the # "make -f git.mk". # # This enables automatic .gitignore generation. If you need to ignore # more files, add them to the GITIGNOREFILES variable in your Makefile.am. # But think twice before doing that. If a file has to be in .gitignore, # chances are very high that it's a generated file and should be in one # of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. # # The only case that you need to manually add a file to GITIGNOREFILES is # when remove files in one of mostlyclean-local, clean-local, distclean-local, # or maintainer-clean-local make targets. # # Note that for files like editor backup, etc, there are better places to # ignore them. See "man gitignore". # # If "make maintainer-clean" removes the files but they are not recognized # by this script (that is, if "git status" shows untracked files still), send # me the output of "git status" as well as your Makefile.am and Makefile for # the directories involved and I'll diagnose. # # For a list of toplevel files that should be in MAINTAINERCLEANFILES, see # Makefile.am.sample in the git.mk git repo. # # Don't EXTRA_DIST this file. It is supposed to only live in git clones, # not tarballs. It serves no useful purpose in tarballs and clutters the # build dir. # # This file knows how to handle autoconf, automake, libtool, gtk-doc, # gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata, # appstream. # # This makefile provides the following targets: # # - all: "make all" will build all gitignore files. # - gitignore: makes all gitignore files in the current dir and subdirs. # - .gitignore: make gitignore file for the current dir. # - gitignore-recurse: makes all gitignore files in the subdirs. # # KNOWN ISSUES: # # - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the # submodule doesn't find us. If you have configure.{in,ac} files in # subdirs, add a proxy git.mk file in those dirs that simply does: # "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. # And add those files to git. See vte/gnome-pty-helper/git.mk for # example. # ############################################################################### # Variables user modules may want to add to toplevel MAINTAINERCLEANFILES: ############################################################################### # # Most autotools-using modules should be fine including this variable in their # toplevel MAINTAINERCLEANFILES: GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \ $(srcdir)/aclocal.m4 \ $(srcdir)/autoscan.log \ $(srcdir)/configure.scan \ `AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \ test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \ for x in \ ar-lib \ compile \ config.guess \ config.sub \ depcomp \ install-sh \ ltmain.sh \ missing \ mkinstalldirs \ test-driver \ ylwrap \ ; do echo "$$AUX_DIR/$$x"; done` \ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \ head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done` # # All modules should also be fine including the following variable, which # removes automake-generated Makefile.in files: GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \ while read f; do \ case $$f in Makefile|*/Makefile) \ test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \ done` # # Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this, # though it's harmless to include regardless. GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \ `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \ if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \ for x in \ libtool.m4 \ ltoptions.m4 \ ltsugar.m4 \ ltversion.m4 \ lt~obsolete.m4 \ ; do echo "$$MACRO_DIR/$$x"; done; \ fi` ############################################################################### # Default rule is to install ourselves in all Makefile.am files: ############################################################################### git-all: git-mk-install git-mk-install: @echo "Installing git makefile" @any_failed=; \ find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ if grep 'include .*/git.mk' $$x >/dev/null; then \ echo "$$x already includes git.mk"; \ else \ failed=; \ echo "Updating $$x"; \ { cat $$x; \ echo ''; \ echo '-include $$(top_srcdir)/git.mk'; \ } > $$x.tmp || failed=1; \ if test x$$failed = x; then \ mv $$x.tmp $$x || failed=1; \ fi; \ if test x$$failed = x; then : else \ echo "Failed updating $$x"; >&2 \ any_failed=1; \ fi; \ fi; done; test -z "$$any_failed" .PHONY: git-all git-mk-install ############################################################################### # Actual .gitignore generation: ############################################################################### $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk @echo "git.mk: Generating $@" @{ \ if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ for x in \ $(DOC_MODULE)-decl-list.txt \ $(DOC_MODULE)-decl.txt \ tmpl/$(DOC_MODULE)-unused.sgml \ "tmpl/*.bak" \ xml html \ ; do echo "/$$x"; done; \ FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \ case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \ fi; \ if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ for lc in $(DOC_LINGUAS); do \ for x in \ $(if $(DOC_MODULE),$(DOC_MODULE).xml) \ $(DOC_PAGES) \ $(DOC_INCLUDES) \ ; do echo "/$$lc/$$x"; done; \ done; \ for x in \ $(_DOC_OMF_ALL) \ $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) \ $(_DOC_MOFILES) \ $(DOC_H_FILE) \ "*/.xml2po.mo" \ "*/*.omf.out" \ ; do echo /$$x; done; \ fi; \ if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ for lc in $(HELP_LINGUAS); do \ for x in \ $(HELP_FILES) \ "$$lc.stamp" \ "$$lc.mo" \ ; do echo "/$$lc/$$x"; done; \ done; \ fi; \ if test "x$(gsettings_SCHEMAS)" = x; then :; else \ for x in \ $(gsettings_SCHEMAS:.xml=.valid) \ $(gsettings__enum_file) \ ; do echo "/$$x"; done; \ fi; \ if test "x$(appdata_XML)" = x; then :; else \ for x in \ $(appdata_XML:.xml=.valid) \ ; do echo "/$$x"; done; \ fi; \ if test "x$(appstream_XML)" = x; then :; else \ for x in \ $(appstream_XML:.xml=.valid) \ ; do echo "/$$x"; done; \ fi; \ if test -f $(srcdir)/po/Makefile.in.in; then \ for x in \ po/Makefile.in.in \ po/Makefile.in.in~ \ po/Makefile.in \ po/Makefile \ po/Makevars.template \ po/POTFILES \ po/Rules-quot \ po/stamp-it \ po/.intltool-merge-cache \ "po/*.gmo" \ "po/*.header" \ "po/*.mo" \ "po/*.sed" \ "po/*.sin" \ po/$(GETTEXT_PACKAGE).pot \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ ; do echo "/$$x"; done; \ fi; \ if test -f $(srcdir)/configure; then \ for x in \ autom4te.cache \ configure \ config.h \ stamp-h1 \ libtool \ config.lt \ ; do echo "/$$x"; done; \ fi; \ if test "x$(DEJATOOL)" = x; then :; else \ for x in \ $(DEJATOOL) \ ; do echo "/$$x.sum"; echo "/$$x.log"; done; \ echo /site.exp; \ fi; \ if test "x$(am__dirstamp)" = x; then :; else \ echo "$(am__dirstamp)"; \ fi; \ if test "x$(LTCOMPILE)" = x -a "x$(LTCXXCOMPILE)" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ for x in \ "*.lo" \ ".libs" "_libs" \ ; do echo "$$x"; done; \ fi; \ for x in \ .gitignore \ $(GITIGNOREFILES) \ $(CLEANFILES) \ $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \ $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \ $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \ so_locations \ $(MOSTLYCLEANFILES) \ $(TEST_LOGS) \ $(TEST_LOGS:.log=.trs) \ $(TEST_SUITE_LOG) \ "*.gcda" \ "*.gcno" \ $(DISTCLEANFILES) \ $(am__CONFIG_DISTCLEAN_FILES) \ $(CONFIG_CLEAN_FILES) \ TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ "*.tab.c" \ $(MAINTAINERCLEANFILES) \ $(BUILT_SOURCES) \ $(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \ $(filter %_vala.stamp,$(DIST_COMMON)) \ $(filter %.vapi,$(DIST_COMMON)) \ $(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \ Makefile \ Makefile.in \ "*.orig" \ "*.rej" \ "*.bak" \ "*~" \ ".*.sw[nop]" \ ".dirstamp" \ ; do echo "/$$x"; done; \ for x in \ "*.$(OBJEXT)" \ $(DEPDIR) \ ; do echo "$$x"; done; \ } | \ sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ sed 's@/[.]/@/@g' | \ LC_ALL=C sort | uniq > $@.tmp && \ mv $@.tmp $@; all: $(srcdir)/.gitignore gitignore-recurse-maybe gitignore: $(srcdir)/.gitignore gitignore-recurse gitignore-recurse-maybe: @for subdir in $(DIST_SUBDIRS); do \ case " $(SUBDIRS) " in \ *" $$subdir "*) :;; \ *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \ esac; \ done gitignore-recurse: @for subdir in $(DIST_SUBDIRS); do \ test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \ done maintainer-clean: gitignore-clean gitignore-clean: -rm -f $(srcdir)/.gitignore .PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe gsequencer-1.4.24/docs/reference/libags-gui/libags_gui-sections.txt0000644000175000017500000003516313247044247022307 00000000000000
ags_cartesian AgsCartesian AGS_PLOT AGS_CARTESIAN_STEP_CONVERSION_FUNC AGS_CARTESIAN_TRANSLATE_FUNCT AGS_CARTESIAN_SCALE_FUNC AGS_CARTESIAN_LABEL_FUNC AGS_CARTESIAN_DEFAULT_X_MARGIN AGS_CARTESIAN_DEFAULT_Y_MARGIN AGS_CARTESIAN_DEFAULT_X_STEP_WIDTH AGS_CARTESIAN_DEFAULT_Y_STEP_HEIGHT AGS_CARTESIAN_DEFAULT_X_SCALE_STEP_WIDTH AGS_CARTESIAN_DEFAULT_Y_SCALE_STEP_HEIGHT AGS_CARTESIAN_DEFAULT_X_STEP AGS_CARTESIAN_DEFAULT_Y_STEP AGS_CARTESIAN_DEFAULT_X_START AGS_CARTESIAN_DEFAULT_X_END AGS_CARTESIAN_DEFAULT_Y_START AGS_CARTESIAN_DEFAULT_Y_END AGS_CARTESIAN_DEFAULT_X_LABEL_START AGS_CARTESIAN_DEFAULT_X_LABEL_STEP_WIDTH AGS_CARTESIAN_DEFAULT_Y_LABEL_START AGS_CARTESIAN_DEFAULT_Y_LABEL_STEP_HEIGHT AgsCartesianStepConversionFunc AgsCartesianTranslateFunc AgsCartesianScaleFunc AgsCartesianLabelFunc AgsCartesianFlags AgsPlotFillFlags AgsPlot ags_plot_alloc ags_plot_free ags_cartesian_add_plot ags_cartesian_remove_plot ags_cartesian_linear_step_conversion_func ags_cartesian_linear_translate_func ags_cartesian_linear_x_small_scale_func ags_cartesian_linear_x_big_scale_func ags_cartesian_linear_y_small_scale_func ags_cartesian_linear_y_big_scale_func ags_cartesian_linear_x_label_func ags_cartesian_linear_y_label_func ags_cartesian_reallocate_label ags_cartesian_fill_label ags_cartesian_new AGS_CARTESIAN AGS_CARTESIAN_CLASS AGS_CARTESIAN_GET_CLASS AGS_IS_CARTESIAN AGS_TYPE_CARTESIAN AgsCartesian AgsCartesianClass ags_cartesian_get_type
ags_container ags_container_add_all
ags_dial AgsDial AGS_DIAL_DEFAULT_PRECISION AGS_DIAL_DEFAULT_RADIUS AGS_DIAL_DEFAULT_OUTLINE_STRENGTH AGS_DIAL_DEFAULT_BUTTON_WIDTH AGS_DIAL_DEFAULT_MARGIN AGS_DIAL_DEFAULT_HEIGHT AGS_DIAL_DEFAULT_WIDTH AgsDialFlags AgsDialAction ags_dial_draw ags_dial_value_changed ags_dial_set_value ags_dial_new AGS_DIAL AGS_DIAL_CLASS AGS_DIAL_GET_CLASS AGS_IS_DIAL AGS_TYPE_DIAL AgsDial AgsDialClass ags_dial_get_type
ags_expander AgsExpander AGS_EXPANDER_CHILD AgsExpanderFlags AgsExpanderChild ags_expander_child_alloc ags_expander_child_find ags_expander_add ags_expander_remove ags_expander_new AGS_EXPANDER AGS_EXPANDER_CLASS AGS_EXPANDER_GET_CLASS AGS_IS_EXPANDER AGS_TYPE_EXPANDER AgsExpander AgsExpanderClass ags_expander_get_type
ags_expander_set AgsExpanderSet AGS_EXPANDER_SET_CHILD AgsExpanderSetFlags AgsExpanderSetChild ags_expander_set_child_alloc ags_expander_set_child_find ags_expander_set_set_flags ags_expander_set_add ags_expander_set_remove ags_expander_set_new AGS_EXPANDER_SET AGS_EXPANDER_SET_CLASS AGS_EXPANDER_SET_GET_CLASS AGS_IS_EXPANDER_SET AGS_TYPE_EXPANDER_SET AgsExpanderSet AgsExpanderSetClass ags_expander_set_get_type
ags_hindicator AgsHIndicator ags_hindicator_new AGS_HINDICATOR AGS_HINDICATOR_CLASS AGS_HINDICATOR_GET_CLASS AGS_IS_HINDICATOR AGS_TYPE_HINDICATOR AgsHIndicator AgsHIndicatorClass ags_hindicator_get_type
ags_hled_array AgsHLedArray ags_hled_array_new AGS_HLED_ARRAY AGS_HLED_ARRAY_CLASS AGS_HLED_ARRAY_GET_CLASS AGS_IS_HLED_ARRAY AGS_TYPE_HLED_ARRAY AgsHLedArray AgsHLedArrayClass ags_hled_array_get_type
ags_hlevel_box AgsHLevelBox ags_hlevel_box_new AGS_HLEVEL_BOX AGS_HLEVEL_BOX_CLASS AGS_HLEVEL_BOX_GET_CLASS AGS_IS_HLEVEL_BOX AGS_TYPE_HLEVEL_BOX AgsHLevelBox AgsHLevelBoxClass ags_hlevel_box_get_type
ags_hscale_box AgsHScaleBox ags_hscale_box_new AGS_HSCALE_BOX AGS_HSCALE_BOX_CLASS AGS_HSCALE_BOX_GET_CLASS AGS_IS_HSCALE_BOX AGS_TYPE_HSCALE_BOX AgsHScaleBox AgsHScaleBoxClass ags_hscale_box_get_type
ags_htimebar AgsHTimebar ags_htimebar_new AGS_HTIMEBAR AGS_HTIMEBAR_CLASS AGS_HTIMEBAR_GET_CLASS AGS_IS_HTIMEBAR AGS_TYPE_HTIMEBAR AgsHTimebar AgsHTimebarClass
ags_indicator AgsIndicator ags_indicator_new AGS_INDICATOR AGS_INDICATOR_CLASS AGS_INDICATOR_GET_CLASS AGS_IS_INDICATOR AGS_TYPE_INDICATOR AgsIndicator AgsIndicatorClass ags_indicator_get_type
ags_led AgsLed AGS_LED_DEFAULT_WIDTH AGS_LED_DEFAULT_HEIGHT AgsLedFlags ags_led_set_active ags_led_unset_active ags_led_new AGS_IS_LED AGS_LED AGS_LED_CLASS AGS_LED_GET_CLASS AGS_TYPE_LED AgsLed AgsLedClass ags_led_get_type
ags_led_array AgsLedArray AgsLedArrayFlags ags_led_array_set_led_count ags_led_array_unset_all ags_led_array_set_nth ags_led_array_new AGS_IS_LED_ARRAY AGS_LED_ARRAY AGS_LED_ARRAY_CLASS AGS_LED_ARRAY_GET_CLASS AGS_TYPE_LED_ARRAY AgsLedArray AgsLedArrayClass ags_led_array_get_type
ags_level AgsLevel AGS_LEVEL_DEFAULT_WIDTH AGS_LEVEL_DEFAULT_HEIGHT AGS_LEVEL_DEFAULT_LOWER AGS_LEVEL_DEFAULT_UPPER AGS_LEVEL_DEFAULT_NORMALIZED_VOLUME AGS_LEVEL_DEFAULT_STEP_COUNT AGS_LEVEL_DEFAULT_PAGE_SIZE AGS_LEVEL_DEFAULT_SAMPLERATE AgsLevelFlags AgsLevelButtonState AgsLevelKeyMask AgsLevelLayout AgsLevelAction ags_level_new AGS_IS_LEVEL AGS_LEVEL AGS_LEVEL_CLASS AGS_LEVEL_GET_CLASS AGS_TYPE_LEVEL AgsLevel AgsLevelClass ags_level_get_type
ags_level_box AgsLevelBox AGS_LEVEL_BOX_DEFAULT_FIXED_LEVEL_WIDTH AGS_LEVEL_BOX_DEFAULT_FIXED_LEVEL_HEIGHT AgsLevelBoxFlags ags_level_box_new AGS_IS_LEVEL_BOX AGS_LEVEL_BOX AGS_LEVEL_BOX_CLASS AGS_LEVEL_BOX_GET_CLASS AGS_TYPE_LEVEL_BOX AgsLevelBox AgsLevelBoxClass ags_level_box_get_type
ags_notebook AgsNotebook AGS_NOTEBOOK_TAB AGS_NOTEBOOK_TAB_DEFAULT_WIDTH AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT AGS_NOTEBOOK_TAB_DEFAULT_PREFIX AgsNotebookTab ags_notebook_tab_alloc ags_notebook_tab_free ags_notebook_tab_set_data ags_notebook_tab_index ags_notebook_next_active_tab ags_notebook_add_tab ags_notebook_add_tab_with_label ags_notebook_insert_tab ags_notebook_insert_tab_with_label ags_notebook_remove_tab ags_notebook_remove_tab_with_data ags_notebook_new AGS_IS_NOTEBOOK AGS_NOTEBOOK AGS_NOTEBOOK_CLASS AGS_NOTEBOOK_GET_CLASS AGS_TYPE_NOTEBOOK AgsNotebook AgsNotebookClass ags_notebook_get_type
ags_piano AgsPiano AGS_PIANO_DEFAULT_BASE_NOTE AGS_PIANO_DEFAULT_BASE_KEY_CODE AGS_PIANO_DEFAULT_KEY_WIDTH AGS_PIANO_DEFAULT_KEY_HEIGHT AGS_PIANO_DEFAULT_KEY_COUNT AgsPianoFlags AgsPianoButtonState AgsPianoLayout AgsPianoAction AgsPianoOctave ags_piano_key_code_to_note ags_piano_key_pressed ags_piano_key_released ags_piano_key_clicked ags_piano_get_active_key ags_piano_new AGS_IS_PIANO AGS_PIANO AGS_PIANO_CLASS AGS_PIANO_GET_CLASS AGS_TYPE_PIANO AgsPiano AgsPianoClass ags_piano_get_type
ags_piano_keys AGS_PIANO_KEYS_OCTAVE_0_C AGS_PIANO_KEYS_OCTAVE_0_CIS AGS_PIANO_KEYS_OCTAVE_0_D AGS_PIANO_KEYS_OCTAVE_0_DIS AGS_PIANO_KEYS_OCTAVE_0_E AGS_PIANO_KEYS_OCTAVE_0_F AGS_PIANO_KEYS_OCTAVE_0_FIS AGS_PIANO_KEYS_OCTAVE_0_G AGS_PIANO_KEYS_OCTAVE_0_GIS AGS_PIANO_KEYS_OCTAVE_0_A AGS_PIANO_KEYS_OCTAVE_0_AIS AGS_PIANO_KEYS_OCTAVE_0_H AGS_PIANO_KEYS_OCTAVE_1_C AGS_PIANO_KEYS_OCTAVE_1_CIS AGS_PIANO_KEYS_OCTAVE_1_D AGS_PIANO_KEYS_OCTAVE_1_DIS AGS_PIANO_KEYS_OCTAVE_1_E AGS_PIANO_KEYS_OCTAVE_1_F AGS_PIANO_KEYS_OCTAVE_1_FIS AGS_PIANO_KEYS_OCTAVE_1_G AGS_PIANO_KEYS_OCTAVE_1_GIS AGS_PIANO_KEYS_OCTAVE_1_A AGS_PIANO_KEYS_OCTAVE_1_AIS AGS_PIANO_KEYS_OCTAVE_1_H AGS_PIANO_KEYS_OCTAVE_2_C AGS_PIANO_KEYS_OCTAVE_2_CIS AGS_PIANO_KEYS_OCTAVE_2_D AGS_PIANO_KEYS_OCTAVE_2_DIS AGS_PIANO_KEYS_OCTAVE_2_E AGS_PIANO_KEYS_OCTAVE_2_F AGS_PIANO_KEYS_OCTAVE_2_FIS AGS_PIANO_KEYS_OCTAVE_2_G AGS_PIANO_KEYS_OCTAVE_2_GIS AGS_PIANO_KEYS_OCTAVE_2_A AGS_PIANO_KEYS_OCTAVE_2_AIS AGS_PIANO_KEYS_OCTAVE_2_H AGS_PIANO_KEYS_OCTAVE_3_C AGS_PIANO_KEYS_OCTAVE_3_CIS AGS_PIANO_KEYS_OCTAVE_3_D AGS_PIANO_KEYS_OCTAVE_3_DIS AGS_PIANO_KEYS_OCTAVE_3_E AGS_PIANO_KEYS_OCTAVE_3_F AGS_PIANO_KEYS_OCTAVE_3_FIS AGS_PIANO_KEYS_OCTAVE_3_G AGS_PIANO_KEYS_OCTAVE_3_GIS AGS_PIANO_KEYS_OCTAVE_3_A AGS_PIANO_KEYS_OCTAVE_3_AIS AGS_PIANO_KEYS_OCTAVE_3_H AGS_PIANO_KEYS_OCTAVE_4_C AGS_PIANO_KEYS_OCTAVE_4_CIS AGS_PIANO_KEYS_OCTAVE_4_D AGS_PIANO_KEYS_OCTAVE_4_DIS AGS_PIANO_KEYS_OCTAVE_4_E AGS_PIANO_KEYS_OCTAVE_4_F AGS_PIANO_KEYS_OCTAVE_4_FIS AGS_PIANO_KEYS_OCTAVE_4_G AGS_PIANO_KEYS_OCTAVE_4_GIS AGS_PIANO_KEYS_OCTAVE_4_A AGS_PIANO_KEYS_OCTAVE_4_AIS AGS_PIANO_KEYS_OCTAVE_4_H AGS_PIANO_KEYS_OCTAVE_5_C AGS_PIANO_KEYS_OCTAVE_5_CIS AGS_PIANO_KEYS_OCTAVE_5_D AGS_PIANO_KEYS_OCTAVE_5_DIS AGS_PIANO_KEYS_OCTAVE_5_E AGS_PIANO_KEYS_OCTAVE_5_F AGS_PIANO_KEYS_OCTAVE_5_FIS AGS_PIANO_KEYS_OCTAVE_5_G AGS_PIANO_KEYS_OCTAVE_5_GIS AGS_PIANO_KEYS_OCTAVE_5_A AGS_PIANO_KEYS_OCTAVE_5_AIS AGS_PIANO_KEYS_OCTAVE_5_H AGS_PIANO_KEYS_OCTAVE_6_C AGS_PIANO_KEYS_OCTAVE_6_CIS AGS_PIANO_KEYS_OCTAVE_6_D AGS_PIANO_KEYS_OCTAVE_6_DIS AGS_PIANO_KEYS_OCTAVE_6_E AGS_PIANO_KEYS_OCTAVE_6_F AGS_PIANO_KEYS_OCTAVE_6_FIS AGS_PIANO_KEYS_OCTAVE_6_G AGS_PIANO_KEYS_OCTAVE_6_GIS AGS_PIANO_KEYS_OCTAVE_6_A AGS_PIANO_KEYS_OCTAVE_6_AIS AGS_PIANO_KEYS_OCTAVE_6_H AGS_PIANO_KEYS_OCTAVE_7_C AGS_PIANO_KEYS_OCTAVE_7_CIS AGS_PIANO_KEYS_OCTAVE_7_D AGS_PIANO_KEYS_OCTAVE_7_DIS AGS_PIANO_KEYS_OCTAVE_7_E AGS_PIANO_KEYS_OCTAVE_7_F AGS_PIANO_KEYS_OCTAVE_7_FIS AGS_PIANO_KEYS_OCTAVE_7_G AGS_PIANO_KEYS_OCTAVE_7_GIS AGS_PIANO_KEYS_OCTAVE_7_A AGS_PIANO_KEYS_OCTAVE_7_AIS AGS_PIANO_KEYS_OCTAVE_7_H AGS_PIANO_KEYS_OCTAVE_8_C AGS_PIANO_KEYS_OCTAVE_8_CIS AGS_PIANO_KEYS_OCTAVE_8_D AGS_PIANO_KEYS_OCTAVE_8_DIS AGS_PIANO_KEYS_OCTAVE_8_E AGS_PIANO_KEYS_OCTAVE_8_F AGS_PIANO_KEYS_OCTAVE_8_FIS AGS_PIANO_KEYS_OCTAVE_8_G AGS_PIANO_KEYS_OCTAVE_8_GIS AGS_PIANO_KEYS_OCTAVE_8_A AGS_PIANO_KEYS_OCTAVE_8_AIS AGS_PIANO_KEYS_OCTAVE_8_H AGS_PIANO_KEYS_OCTAVE_9_C AGS_PIANO_KEYS_OCTAVE_9_CIS AGS_PIANO_KEYS_OCTAVE_9_D AGS_PIANO_KEYS_OCTAVE_9_DIS AGS_PIANO_KEYS_OCTAVE_9_E AGS_PIANO_KEYS_OCTAVE_9_F AGS_PIANO_KEYS_OCTAVE_9_FIS AGS_PIANO_KEYS_OCTAVE_9_G AGS_PIANO_KEYS_OCTAVE_9_GIS AGS_PIANO_KEYS_OCTAVE_9_A AGS_PIANO_KEYS_OCTAVE_9_AIS AGS_PIANO_KEYS_OCTAVE_9_H AGS_PIANO_KEYS_OCTAVE_10_C AGS_PIANO_KEYS_OCTAVE_10_CIS AGS_PIANO_KEYS_OCTAVE_10_D AGS_PIANO_KEYS_OCTAVE_10_DIS AGS_PIANO_KEYS_OCTAVE_10_E AGS_PIANO_KEYS_OCTAVE_10_F AGS_PIANO_KEYS_OCTAVE_10_FIS AGS_PIANO_KEYS_OCTAVE_10_G AGS_PIANO_KEYS_OCTAVE_10_GIS AGS_PIANO_KEYS_OCTAVE_10_A AGS_PIANO_KEYS_OCTAVE_10_AIS AGS_PIANO_KEYS_OCTAVE_10_H
ags_ruler AgsRuler AGS_RULER_FONT_SIZE AGS_RULER_FREE_SPACE AGS_RULER_DEFAULT_STEP AGS_RULER_LARGE_STEP AGS_RULER_SMALL_STEP ags_ruler_new AGS_IS_RULER AGS_RULER AGS_RULER_CLASS AGS_RULER_GET_CLASS AGS_TYPE_RULER AgsRuler AgsRulerClass ags_ruler_get_type
ags_scale AgsScale AGS_SCALE_DEFAULT_WIDTH AGS_SCALE_DEFAULT_HEIGHT AGS_SCALE_DEFAULT_LOWER AGS_SCALE_DEFAULT_UPPER AGS_SCALE_DEFAULT_VALUE AGS_SCALE_DEFAULT_STEP_COUNT AGS_SCALE_DEFAULT_PAGE_SIZE AgsScaleFlags AgsScaleButtonState AgsScaleKeyMask AgsScaleLayout AgsScaleAction ags_scale_value_changed ags_scale_new AGS_IS_SCALE AGS_SCALE AGS_SCALE_CLASS AGS_SCALE_GET_CLASS AGS_TYPE_SCALE AgsScale AgsScaleClass ags_scale_get_type
ags_scale_box AgsScaleBox AGS_SCALE_BOX_DEFAULT_FIXED_SCALE_WIDTH AGS_SCALE_BOX_DEFAULT_FIXED_SCALE_HEIGHT AgsScaleBoxFlags ags_scale_box_new AGS_IS_SCALE_BOX AGS_SCALE_BOX AGS_SCALE_BOX_CLASS AGS_SCALE_BOX_GET_CLASS AGS_TYPE_SCALE_BOX AgsScaleBox AgsScaleBoxClass ags_scale_box_get_type
ags_scrolled_level_box AgsScrolledLevelBox ags_scrolled_level_box_new AGS_IS_SCROLLED_LEVEL_BOX AGS_SCROLLED_LEVEL_BOX AGS_SCROLLED_LEVEL_BOX_CLASS AGS_SCROLLED_LEVEL_BOX_GET_CLASS AGS_TYPE_SCROLLED_LEVEL_BOX AgsScrolledLevelBox AgsScrolledLevelBoxClass ags_scrolled_level_box_get_type
ags_scrolled_piano AgsScrolledPiano ags_scrolled_piano_new AGS_IS_SCROLLED_PIANO AGS_SCROLLED_PIANO AGS_SCROLLED_PIANO_CLASS AGS_SCROLLED_PIANO_GET_CLASS AGS_TYPE_SCROLLED_PIANO AgsScrolledPiano AgsScrolledPianoClass ags_scrolled_piano_get_type
ags_scrolled_scale_box AgsScrolledScaleBox ags_scrolled_scale_box_new AGS_IS_SCROLLED_SCALE_BOX AGS_SCROLLED_SCALE_BOX AGS_SCROLLED_SCALE_BOX_CLASS AGS_SCROLLED_SCALE_BOX_GET_CLASS AGS_TYPE_SCROLLED_SCALE_BOX AgsScrolledScaleBox AgsScrolledScaleBoxClass ags_scrolled_scale_box_get_type
ags_table AgsTable ags_table_new AGS_IS_TABLE AGS_TABLE AGS_TABLE_CLASS AGS_TABLE_GET_CLASS AGS_TYPE_TABLE AgsTable AgsTableClass ags_table_get_type
ags_timebar AgsTimebar ags_timebar_new AGS_IS_TIMEBAR AGS_TIMEBAR AGS_TIMEBAR_CLASS AGS_TIMEBAR_GET_CLASS AGS_TYPE_TIMEBAR AgsTimebar AgsTimebarClass
ags_vindicator AgsVIndicator ags_vindicator_new AGS_IS_VINDICATOR AGS_TYPE_VINDICATOR AGS_VINDICATOR AGS_VINDICATOR_CLASS AGS_VINDICATOR_GET_CLASS AgsVIndicator AgsVIndicatorClass ags_vindicator_get_type
ags_vled_array AgsVLedArray ags_vled_array_new AGS_IS_VLED_ARRAY AGS_TYPE_VLED_ARRAY AGS_VLED_ARRAY AGS_VLED_ARRAY_CLASS AGS_VLED_ARRAY_GET_CLASS AgsVLedArray AgsVLedArrayClass ags_vled_array_get_type
ags_vlevel_box AgsVLevelBox ags_vlevel_box_new AGS_IS_VLEVEL_BOX AGS_TYPE_VLEVEL_BOX AGS_VLEVEL_BOX AGS_VLEVEL_BOX_CLASS AGS_VLEVEL_BOX_GET_CLASS AgsVLevelBox AgsVLevelBoxClass ags_vlevel_box_get_type
ags_vscale_box AgsVScaleBox ags_vscale_box_new AGS_IS_VSCALE_BOX AGS_TYPE_VSCALE_BOX AGS_VSCALE_BOX AGS_VSCALE_BOX_CLASS AGS_VSCALE_BOX_GET_CLASS AgsVScaleBox AgsVScaleBoxClass ags_vscale_box_get_type
ags_waveform AgsWaveform ags_waveform_new AGS_IS_WAVEFORM AGS_TYPE_WAVEFORM AGS_WAVEFORM AGS_WAVEFORM_CLASS AGS_WAVEFORM_GET_CLASS AgsWaveform AgsWaveformClass ags_waveform_get_type
ags_widget_marshal ags_widget_cclosure_marshal_VOID__STRING_INT
gsequencer-1.4.24/docs/reference/libags-gui/libags_gui.xml0000644000175000017500000000507613247044247020443 00000000000000 %gtkdocentities; ]> Advanced Gtk+ Sequencer UI Reference Manual for libags_gui. The latest version of this documentation can be found on-line at http://nongnu.org/gsequencer/api/libags-gui/. UI Widgets Object Hierarchy API Index Index of deprecated API gsequencer-1.4.24/docs/reference/libags-gui/gtk-doc.make0000644000175000017500000002405013246707333017775 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ chmod +x $@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else HTML_BUILD_STAMP= endif if GTK_DOC_BUILD_PDF PDF_BUILD_STAMP=pdf-build.stamp else PDF_BUILD_STAMP= endif all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) .PHONY: all-gtk-doc if ENABLE_GTK_DOC all-local: all-gtk-doc endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi $(AM_V_at)touch setup-build.stamp #### scan #### GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### xml #### GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0=@echo " DOC Building XML"; sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ ) > $@ #### html #### GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf libags-gui-html && mkdir libags-gui-html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd libags-gui-html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/libags-gui-html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/libags-gui-html; \ fi; \ test -f $$file && cp $$file $(abs_builddir)/libags-gui-html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=libags-gui-html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp #### pdf #### GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ rm -f $(DOC_MODULE)-sections.txt; \ fi distclean-local: @rm -rf xml libags-gui-html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @rm -rf xml libags-gui-html install-data-local: @installfiles=`echo $(builddir)/libags-gui-html/*`; \ if test "$$installfiles" = '$(builddir)/libags-gui-html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if HAVE_GTK_DOC dist-check-gtkdoc: docs else dist-check-gtkdoc: @echo "*** gtk-doc is needed to run 'make dist'. ***" @echo "*** gtk-doc was not found when 'configure' ran. ***" @echo "*** please install gtk-doc and rerun 'configure'. ***" @false endif dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/libags-gui-html @cp ./libags-gui-html/* $(distdir)/libags-gui-html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/libags-gui-html .PHONY : dist-hook-local docs gsequencer-1.4.24/docs/reference/libags-gui/Makefile.am0000644000175000017500000000661213246707333017646 00000000000000# This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE=libags_gui # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 # The top-level XML file. DOC_MAIN_SGML_FILE=$(DOC_MODULE).xml # Directories containing the source code. # gtk-doc will search all .c and .h files beneath these paths # for inline comments documenting functions and macros. # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR=$(top_srcdir)/ags/widget # Extra options to pass to gtkdoc-scangobj. Normally not needed. SCANGOBJ_OPTIONS=--cflags="$(CFLAGS) $(GOBJECT_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS)" --ldflags="-static -ldl -lm -lrt -pthread $(LDFLAGS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) -L$(top_builddir) $(top_builddir)/libags_gui.la" # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" # SCAN_OPTIONS=--rebuild-types --rebuild-sections # Extra options to supply to gtkdoc-mkdb # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml MKDB_OPTIONS=--xml-mode --output-format=xml --name-space=libags_gui --module=libags_gui # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= # Extra options to supply to gtkdoc-fixref. Normally not needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS=--module=libags_gui --module-dir=./libags-gui-html/ --html-dir=$(DESTDIR)/$(datadir)/doc/libags-gui-doc/api # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB= CFILE_GLOB= # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES= # Header files or dirs to ignore when scanning. Use base file/dir names # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES= # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES= # Extra files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.xml building.xml changes-2.0.xml content_files= # Files where gtk-doc abbrevations (#GtkWidget) are expanded # e.g. expand_content_files=running.xml expand_content_files= AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS=$(gsequencer_CFLAGS) -DGTK_IS_WIDGET_CLASS=1 GTKDOC_LIBS = \ $(top_builddir)/libags_gui.la # This includes the standard gtk-doc make rules, copied by gtkdocize. include ./gtk-doc.make # Comment this out if you want 'make check' to test you doc status # and run some sanity checks if ENABLE_GTK_DOC TESTS_ENVIRONMENT = \ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) TESTS = $(GTKDOC_CHECK) endif -include $(top_srcdir)/git.mk gsequencer-1.4.24/docs/reference/libags-gui/libags_gui-overrides.txt0000644000175000017500000000000013246707333022441 00000000000000gsequencer-1.4.24/docs/reference/libags-gui/libags_gui.types0000644000175000017500000000115513247044247021001 00000000000000ags_cartesian_get_type ags_dial_get_type ags_expander_get_type ags_expander_set_get_type ags_hindicator_get_type ags_hled_array_get_type ags_hlevel_box_get_type ags_hscale_box_get_type ags_indicator_get_type ags_led_array_get_type ags_led_get_type ags_level_box_get_type ags_level_get_type ags_notebook_get_type ags_piano_get_type ags_ruler_get_type ags_scale_box_get_type ags_scale_get_type ags_scrolled_level_box_get_type ags_scrolled_piano_get_type ags_scrolled_scale_box_get_type ags_table_get_type ags_vindicator_get_type ags_vled_array_get_type ags_vlevel_box_get_type ags_vscale_box_get_type ags_waveform_get_type gsequencer-1.4.24/docs/reference/libgsequencer/0000755000175000017500000000000013256233676016477 500000000000000gsequencer-1.4.24/docs/reference/libgsequencer/libgsequencer-overrides.txt0000644000175000017500000000000013246707333023771 00000000000000gsequencer-1.4.24/docs/reference/libgsequencer/Makefile.in0000644000175000017500000012633113256226517020466 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ 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 \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/reference/libgsequencer ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ags/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__extra_recursive_targets = ags-docs-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__DIST_COMMON = $(srcdir)/./gtk-doc.make $(srcdir)/Makefile.in \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CORE_AUDIO_CFLAGS = @CORE_AUDIO_CFLAGS@ CORE_AUDIO_LIBS = @CORE_AUDIO_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ GOBJECT_LIBS = @GOBJECT_LIBS@ GREP = @GREP@ GSEQUENCER_CFLAGS = @GSEQUENCER_CFLAGS@ GSEQUENCER_FUNCTIONAL_TEST_LDADD = @GSEQUENCER_FUNCTIONAL_TEST_LDADD@ GSEQUENCER_LDFLAGS = @GSEQUENCER_LDFLAGS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@ GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBASOUND2_CFLAGS = @LIBASOUND2_CFLAGS@ LIBASOUND2_LIBS = @LIBASOUND2_LIBS@ LIBGSEQUENCER_TEST_LIBADD = @LIBGSEQUENCER_TEST_LIBADD@ LIBICONV = @LIBICONV@ LIBINSTPATCH_CFLAGS = @LIBINSTPATCH_CFLAGS@ LIBINSTPATCH_LIBS = @LIBINSTPATCH_LIBS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MIDI2XML_CFLAGS = @MIDI2XML_CFLAGS@ MIDI2XML_LDFLAGS = @MIDI2XML_LDFLAGS@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE_CFLAGS = @PCRE_CFLAGS@ PCRE_LIBS = @PCRE_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PULSE_CFLAGS = @PULSE_CFLAGS@ PULSE_LIBS = @PULSE_LIBS@ RANLIB = @RANLIB@ SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@ SAMPLERATE_LIBS = @SAMPLERATE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ SNDFILE_LIBS = @SNDFILE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ XMLRPC_CLIENT_CFLAGS = @XMLRPC_CLIENT_CFLAGS@ XMLRPC_CLIENT_LIBS = @XMLRPC_CLIENT_LIBS@ XMLRPC_C_CONFIG = @XMLRPC_C_CONFIG@ XMLRPC_SERVER_ABYSS_CFLAGS = @XMLRPC_SERVER_ABYSS_CFLAGS@ XMLRPC_SERVER_ABYSS_LIBS = @XMLRPC_SERVER_ABYSS_LIBS@ XMLRPC_SERVER_CGI_CFLAGS = @XMLRPC_SERVER_CGI_CFLAGS@ XMLRPC_SERVER_CGI_LIBS = @XMLRPC_SERVER_CGI_LIBS@ XMLRPC_UTIL_CFLAGS = @XMLRPC_UTIL_CFLAGS@ XMLRPC_UTIL_LIBS = @XMLRPC_UTIL_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module, e.g. 'glib'. DOC_MODULE = libgsequencer # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 # The top-level XML file. DOC_MAIN_SGML_FILE = $(DOC_MODULE).xml # Directories containing the source code. # gtk-doc will search all .c and .h files beneath these paths # for inline comments documenting functions and macros. # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR = $(top_srcdir)/ags/X # Extra options to pass to gtkdoc-scangobj. Normally not needed. SCANGOBJ_OPTIONS = --cflags="$(CFLAGS) $(UUID_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBAO_CFLAGS) $(LIBXML2_CFLAGS) $(OPENSSL_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) $(XMLRPC_SERVER_CFLAGS) $(PTH_FLAGS) $(JACK_CFLAGS)" --ldflags="-static -ldl -lm -lrt -pthread $(LDFLAGS) $(UUID_LIBS) $(LIBASOUND2_LIBS) $(LIBAO_LIBS) $(LIBXML2_LIBS) $(OPENSSL_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) $(XMLRPC_SERVER_LIBS) $(JACK_LIBS) -L$(top_builddir) $(top_builddir)/libags.la $(top_builddir)/libags_thread.la $(top_builddir)/libags_server.la $(top_builddir)/libags_audio.la $(top_builddir)/libags_gui.la $(top_builddir)/libgsequencer.la" # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" # SCAN_OPTIONS=--rebuild-types --rebuild-sections # Extra options to supply to gtkdoc-mkdb # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml MKDB_OPTIONS = --xml-mode --output-format=xml --name-space=libgsequencer --module=libgsequencer # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS = # Extra options to supply to gtkdoc-fixref. Normally not needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = --module=libgsequencer --module-dir=./libgsequencer-html/ --html-dir=$(DESTDIR)/$(datadir)/doc/libgsequencer-doc/api --extra-dir=$(top_srcdir)/docs/reference/libags/libags-html --extra-dir=$(top_srcdir)/docs/reference/libags-audio/libags-audio-html --extra-dir=$(top_srcdir)/docs/reference/libags-gui/libags-gui-html # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB = CFILE_GLOB = # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES = # Header files or dirs to ignore when scanning. Use base file/dir names # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES = # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = # Extra files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.xml building.xml changes-2.0.xml content_files = # Files where gtk-doc abbrevations (#GtkWidget) are expanded # e.g. expand_content_files=running.xml expand_content_files = AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS = $(gsequencer_CFLAGS) -DGTK_IS_WIDGET_CLASS=1 GTKDOC_LIBS = \ $(top_builddir)/libags.la \ $(top_builddir)/libags_thread.la \ $(top_builddir)/libags_server.la \ $(top_builddir)/libags_audio.la \ $(top_builddir)/libags_gui.la \ $(top_builddir)/libgsequencer.la \ $(gsequencer_LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test @GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = @GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp #### setup #### GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; #### scan #### GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; #### xml #### GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0 = @echo " DOC Building XML"; #### html #### GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; #### pdf #### GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; # This includes the standard gtk-doc make rules, copied by gtkdocize. # Comment this out if you want 'make check' to test you doc status # and run some sanity checks @ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = \ @ENABLE_GTK_DOC_TRUE@ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ @ENABLE_GTK_DOC_TRUE@ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) @ENABLE_GTK_DOC_TRUE@TESTS = $(GTKDOC_CHECK) all: all-am .SUFFIXES: .SUFFIXES: .log .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/./gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/libgsequencer/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/reference/libgsequencer/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(srcdir)/./gtk-doc.make $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ags-docs-local: tags TAGS: ctags CTAGS: cscope cscopelist: # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am @ENABLE_GTK_DOC_FALSE@all-local: all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." ags-docs: ags-docs-am ags-docs-am: ags-docs-local clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: check-am install-am install-strip .PHONY: ags-docs-am ags-docs-local all all-am all-local check \ check-TESTS check-am clean clean-generic clean-libtool \ clean-local cscopelist-am ctags-am dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \ uninstall uninstall-am uninstall-local .PRECIOUS: Makefile gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ chmod +x $@ all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) .PHONY: all-gtk-doc @ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi $(AM_V_at)touch setup-build.stamp scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ ) > $@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf libgsequencer-html && mkdir libgsequencer-html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd libgsequencer-html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/libgsequencer-html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/libgsequencer-html; \ fi; \ test -f $$file && cp $$file $(abs_builddir)/libgsequencer-html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=libgsequencer-html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ rm -f $(DOC_MODULE)-sections.txt; \ fi distclean-local: @rm -rf xml libgsequencer-html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @rm -rf xml libgsequencer-html install-data-local: @installfiles=`echo $(builddir)/libgsequencer-html/*`; \ if test "$$installfiles" = '$(builddir)/libgsequencer-html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs @HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: @HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" @HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" @HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" @HAVE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/libgsequencer-html @cp ./libgsequencer-html/* $(distdir)/libgsequencer-html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/libgsequencer-html .PHONY : dist-hook-local docs -include $(top_srcdir)/git.mk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gsequencer-1.4.24/docs/reference/libgsequencer/libgsequencer.types0000644000175000017500000000764713247044247022345 00000000000000ags_add_bulk_member_get_type ags_add_line_member_get_type ags_add_sequencer_editor_jack_get_type ags_add_soundcard_editor_sink_get_type ags_audio_preferences_get_type ags_audiorec_get_type ags_automation_edit_box_get_type ags_automation_edit_get_type ags_automation_editor_get_type ags_automation_toolbar_get_type ags_automation_window_get_type ags_blink_cell_pattern_cursor_get_type ags_bulk_member_get_type ags_cell_pattern_get_type ags_change_indicator_get_type ags_change_tact_get_type ags_connection_editor_get_type ags_context_menu_get_type ags_crop_note_dialog_get_type ags_display_tact_get_type ags_drum_get_type ags_drum_input_line_get_type ags_drum_input_pad_get_type ags_drum_output_line_get_type ags_drum_output_pad_get_type ags_dssi_bridge_get_type ags_dssi_browser_get_type ags_effect_bridge_get_type ags_effect_bulk_get_type ags_effect_line_get_type ags_effect_pad_get_type ags_effect_separator_get_type ags_envelope_dialog_get_type ags_envelope_editor_get_type ags_envelope_info_get_type ags_export_soundcard_get_type ags_export_window_get_type ags_ffplayer_bridge_get_type ags_ffplayer_bulk_input_get_type ags_ffplayer_get_type ags_ffplayer_input_line_get_type ags_ffplayer_input_pad_get_type ags_file_selection_get_type ags_generic_preferences_get_type ags_gui_thread_get_type ags_history_browser_get_type ags_inline_player_get_type ags_ladspa_bridge_get_type ags_ladspa_browser_get_type ags_line_editor_get_type ags_line_get_type ags_line_member_editor_get_type ags_line_member_get_type ags_link_collection_editor_get_type ags_link_editor_get_type ags_listing_editor_get_type ags_live_dssi_bridge_get_type ags_live_lv2_bridge_get_type ags_lv2_bridge_get_type ags_lv2_browser_get_type ags_machine_collection_entry_get_type ags_machine_collection_get_type ags_machine_editor_get_type ags_machine_get_type ags_machine_radio_button_get_type ags_machine_selection_get_type ags_machine_selector_get_type ags_matrix_bridge_get_type ags_matrix_bulk_input_get_type ags_matrix_get_type ags_menu_bar_get_type ags_midi_dialog_get_type ags_midi_export_wizard_get_type ags_midi_import_wizard_get_type ags_midi_preferences_get_type ags_mixer_get_type ags_mixer_input_line_get_type ags_mixer_input_pad_get_type ags_move_note_dialog_get_type ags_navigation_get_type ags_notation_edit_get_type ags_notation_editor_get_type ags_notation_toolbar_get_type ags_oscillator_get_type ags_output_collection_editor_get_type ags_output_editor_get_type ags_output_listing_editor_get_type ags_pad_editor_get_type ags_pad_get_type ags_panel_get_type ags_panel_input_line_get_type ags_panel_input_pad_get_type ags_pattern_box_get_type ags_pattern_envelope_get_type ags_performance_preferences_get_type ags_playback_window_get_type ags_plugin_browser_get_type ags_plugin_preferences_get_type ags_position_automation_cursor_dialog_get_type ags_position_notation_cursor_dialog_get_type ags_preferences_get_type ags_property_collection_editor_get_type ags_property_editor_get_type ags_property_listing_editor_get_type ags_ramp_acceleration_dialog_get_type ags_remove_sequencer_editor_jack_get_type ags_remove_soundcard_editor_sink_get_type ags_scrolled_automation_edit_box_get_type ags_scrolled_wave_edit_box_get_type ags_select_acceleration_dialog_get_type ags_select_note_dialog_get_type ags_sequencer_editor_get_type ags_server_preferences_get_type ags_sf2_chooser_get_type ags_simple_autosave_thread_get_type ags_simple_file_get_type ags_simple_file_read_get_type ags_simple_file_write_get_type ags_soundcard_editor_get_type ags_syncsynth_get_type ags_synth_get_type ags_synth_input_line_get_type ags_synth_input_pad_get_type ags_toggle_led_get_type ags_track_collection_get_type ags_track_collection_mapper_get_type ags_ui_provider_get_type ags_update_bulk_member_get_type ags_vautomation_edit_box_get_type ags_vwave_edit_box_get_type ags_wave_edit_box_get_type ags_wave_edit_get_type ags_wave_editor_get_type ags_wave_toolbar_get_type ags_wave_window_get_type ags_window_get_type ags_xorg_application_context_get_type gsequencer-1.4.24/docs/reference/libgsequencer/libgsequencer.xml0000644000175000017500000003401713247044247021770 00000000000000 %gtkdocentities; ]> Advanced Gtk+ Sequencer Application Reference Manual for libgsequencer. The latest version of this documentation can be found on-line at http://nongnu.org/gsequencer/api/libgsequencer/. GSequencer UI Library GUI Editor Audio machines GUI files GUI threads GUI tasks Object Hierarchy API Index Index of deprecated API gsequencer-1.4.24/docs/reference/libgsequencer/git.mk0000644000175000017500000002441413246707333017533 00000000000000# git.mk # # Copyright 2009, Red Hat, Inc. # Copyright 2010,2011,2012,2013 Behdad Esfahbod # Written by Behdad Esfahbod # # Copying and distribution of this file, with or without modification, # is permitted in any medium without royalty provided the copyright # notice and this notice are preserved. # # The latest version of this file can be downloaded from: # https://raw.github.com/behdad/git.mk/master/git.mk # Bugs, etc, should be reported upstream at: # https://github.com/behdad/git.mk # # To use in your project, import this file in your git repo's toplevel, # then do "make -f git.mk". This modifies all Makefile.am files in # your project to -include git.mk. Remember to add that line to new # Makefile.am files you create in your project, or just rerun the # "make -f git.mk". # # This enables automatic .gitignore generation. If you need to ignore # more files, add them to the GITIGNOREFILES variable in your Makefile.am. # But think twice before doing that. If a file has to be in .gitignore, # chances are very high that it's a generated file and should be in one # of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. # # The only case that you need to manually add a file to GITIGNOREFILES is # when remove files in one of mostlyclean-local, clean-local, distclean-local, # or maintainer-clean-local make targets. # # Note that for files like editor backup, etc, there are better places to # ignore them. See "man gitignore". # # If "make maintainer-clean" removes the files but they are not recognized # by this script (that is, if "git status" shows untracked files still), send # me the output of "git status" as well as your Makefile.am and Makefile for # the directories involved and I'll diagnose. # # For a list of toplevel files that should be in MAINTAINERCLEANFILES, see # Makefile.am.sample in the git.mk git repo. # # Don't EXTRA_DIST this file. It is supposed to only live in git clones, # not tarballs. It serves no useful purpose in tarballs and clutters the # build dir. # # This file knows how to handle autoconf, automake, libtool, gtk-doc, # gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata, # appstream. # # This makefile provides the following targets: # # - all: "make all" will build all gitignore files. # - gitignore: makes all gitignore files in the current dir and subdirs. # - .gitignore: make gitignore file for the current dir. # - gitignore-recurse: makes all gitignore files in the subdirs. # # KNOWN ISSUES: # # - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the # submodule doesn't find us. If you have configure.{in,ac} files in # subdirs, add a proxy git.mk file in those dirs that simply does: # "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. # And add those files to git. See vte/gnome-pty-helper/git.mk for # example. # ############################################################################### # Variables user modules may want to add to toplevel MAINTAINERCLEANFILES: ############################################################################### # # Most autotools-using modules should be fine including this variable in their # toplevel MAINTAINERCLEANFILES: GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \ $(srcdir)/aclocal.m4 \ $(srcdir)/autoscan.log \ $(srcdir)/configure.scan \ `AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \ test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \ for x in \ ar-lib \ compile \ config.guess \ config.sub \ depcomp \ install-sh \ ltmain.sh \ missing \ mkinstalldirs \ test-driver \ ylwrap \ ; do echo "$$AUX_DIR/$$x"; done` \ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \ head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done` # # All modules should also be fine including the following variable, which # removes automake-generated Makefile.in files: GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \ `cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \ while read f; do \ case $$f in Makefile|*/Makefile) \ test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \ done` # # Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this, # though it's harmless to include regardless. GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \ `MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \ if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \ for x in \ libtool.m4 \ ltoptions.m4 \ ltsugar.m4 \ ltversion.m4 \ lt~obsolete.m4 \ ; do echo "$$MACRO_DIR/$$x"; done; \ fi` ############################################################################### # Default rule is to install ourselves in all Makefile.am files: ############################################################################### git-all: git-mk-install git-mk-install: @echo "Installing git makefile" @any_failed=; \ find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ if grep 'include .*/git.mk' $$x >/dev/null; then \ echo "$$x already includes git.mk"; \ else \ failed=; \ echo "Updating $$x"; \ { cat $$x; \ echo ''; \ echo '-include $$(top_srcdir)/git.mk'; \ } > $$x.tmp || failed=1; \ if test x$$failed = x; then \ mv $$x.tmp $$x || failed=1; \ fi; \ if test x$$failed = x; then : else \ echo "Failed updating $$x"; >&2 \ any_failed=1; \ fi; \ fi; done; test -z "$$any_failed" .PHONY: git-all git-mk-install ############################################################################### # Actual .gitignore generation: ############################################################################### $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk @echo "git.mk: Generating $@" @{ \ if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ for x in \ $(DOC_MODULE)-decl-list.txt \ $(DOC_MODULE)-decl.txt \ tmpl/$(DOC_MODULE)-unused.sgml \ "tmpl/*.bak" \ xml html \ ; do echo "/$$x"; done; \ FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \ case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \ fi; \ if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ for lc in $(DOC_LINGUAS); do \ for x in \ $(if $(DOC_MODULE),$(DOC_MODULE).xml) \ $(DOC_PAGES) \ $(DOC_INCLUDES) \ ; do echo "/$$lc/$$x"; done; \ done; \ for x in \ $(_DOC_OMF_ALL) \ $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) \ $(_DOC_MOFILES) \ $(DOC_H_FILE) \ "*/.xml2po.mo" \ "*/*.omf.out" \ ; do echo /$$x; done; \ fi; \ if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ for lc in $(HELP_LINGUAS); do \ for x in \ $(HELP_FILES) \ "$$lc.stamp" \ "$$lc.mo" \ ; do echo "/$$lc/$$x"; done; \ done; \ fi; \ if test "x$(gsettings_SCHEMAS)" = x; then :; else \ for x in \ $(gsettings_SCHEMAS:.xml=.valid) \ $(gsettings__enum_file) \ ; do echo "/$$x"; done; \ fi; \ if test "x$(appdata_XML)" = x; then :; else \ for x in \ $(appdata_XML:.xml=.valid) \ ; do echo "/$$x"; done; \ fi; \ if test "x$(appstream_XML)" = x; then :; else \ for x in \ $(appstream_XML:.xml=.valid) \ ; do echo "/$$x"; done; \ fi; \ if test -f $(srcdir)/po/Makefile.in.in; then \ for x in \ po/Makefile.in.in \ po/Makefile.in.in~ \ po/Makefile.in \ po/Makefile \ po/Makevars.template \ po/POTFILES \ po/Rules-quot \ po/stamp-it \ po/.intltool-merge-cache \ "po/*.gmo" \ "po/*.header" \ "po/*.mo" \ "po/*.sed" \ "po/*.sin" \ po/$(GETTEXT_PACKAGE).pot \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ ; do echo "/$$x"; done; \ fi; \ if test -f $(srcdir)/configure; then \ for x in \ autom4te.cache \ configure \ config.h \ stamp-h1 \ libtool \ config.lt \ ; do echo "/$$x"; done; \ fi; \ if test "x$(DEJATOOL)" = x; then :; else \ for x in \ $(DEJATOOL) \ ; do echo "/$$x.sum"; echo "/$$x.log"; done; \ echo /site.exp; \ fi; \ if test "x$(am__dirstamp)" = x; then :; else \ echo "$(am__dirstamp)"; \ fi; \ if test "x$(LTCOMPILE)" = x -a "x$(LTCXXCOMPILE)" = x -a "x$(GTKDOC_RUN)" = x; then :; else \ for x in \ "*.lo" \ ".libs" "_libs" \ ; do echo "$$x"; done; \ fi; \ for x in \ .gitignore \ $(GITIGNOREFILES) \ $(CLEANFILES) \ $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \ $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \ $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \ so_locations \ $(MOSTLYCLEANFILES) \ $(TEST_LOGS) \ $(TEST_LOGS:.log=.trs) \ $(TEST_SUITE_LOG) \ "*.gcda" \ "*.gcno" \ $(DISTCLEANFILES) \ $(am__CONFIG_DISTCLEAN_FILES) \ $(CONFIG_CLEAN_FILES) \ TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ "*.tab.c" \ $(MAINTAINERCLEANFILES) \ $(BUILT_SOURCES) \ $(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \ $(filter %_vala.stamp,$(DIST_COMMON)) \ $(filter %.vapi,$(DIST_COMMON)) \ $(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \ Makefile \ Makefile.in \ "*.orig" \ "*.rej" \ "*.bak" \ "*~" \ ".*.sw[nop]" \ ".dirstamp" \ ; do echo "/$$x"; done; \ for x in \ "*.$(OBJEXT)" \ $(DEPDIR) \ ; do echo "$$x"; done; \ } | \ sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ sed 's@/[.]/@/@g' | \ LC_ALL=C sort | uniq > $@.tmp && \ mv $@.tmp $@; all: $(srcdir)/.gitignore gitignore-recurse-maybe gitignore: $(srcdir)/.gitignore gitignore-recurse gitignore-recurse-maybe: @for subdir in $(DIST_SUBDIRS); do \ case " $(SUBDIRS) " in \ *" $$subdir "*) :;; \ *) test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir");; \ esac; \ done gitignore-recurse: @for subdir in $(DIST_SUBDIRS); do \ test "$$subdir" = . -o -e "$$subdir/.git" || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) gitignore || echo "Skipping $$subdir"); \ done maintainer-clean: gitignore-clean gitignore-clean: -rm -f $(srcdir)/.gitignore .PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe gsequencer-1.4.24/docs/reference/libgsequencer/gtk-doc.make0000644000175000017500000002412513246707333020605 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ chmod +x $@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else HTML_BUILD_STAMP= endif if GTK_DOC_BUILD_PDF PDF_BUILD_STAMP=pdf-build.stamp else PDF_BUILD_STAMP= endif all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) .PHONY: all-gtk-doc if ENABLE_GTK_DOC all-local: all-gtk-doc endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi $(AM_V_at)touch setup-build.stamp #### scan #### GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### xml #### GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0=@echo " DOC Building XML"; sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ ) > $@ #### html #### GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf libgsequencer-html && mkdir libgsequencer-html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd libgsequencer-html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/libgsequencer-html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/libgsequencer-html; \ fi; \ test -f $$file && cp $$file $(abs_builddir)/libgsequencer-html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=libgsequencer-html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp #### pdf #### GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ rm -f $(DOC_MODULE)-sections.txt; \ fi distclean-local: @rm -rf xml libgsequencer-html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @rm -rf xml libgsequencer-html install-data-local: @installfiles=`echo $(builddir)/libgsequencer-html/*`; \ if test "$$installfiles" = '$(builddir)/libgsequencer-html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if HAVE_GTK_DOC dist-check-gtkdoc: docs else dist-check-gtkdoc: @echo "*** gtk-doc is needed to run 'make dist'. ***" @echo "*** gtk-doc was not found when 'configure' ran. ***" @echo "*** please install gtk-doc and rerun 'configure'. ***" @false endif dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/libgsequencer-html @cp ./libgsequencer-html/* $(distdir)/libgsequencer-html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/libgsequencer-html .PHONY : dist-hook-local docs gsequencer-1.4.24/docs/reference/libgsequencer/libgsequencer.interfaces0000644000175000017500000002631713247044247023317 00000000000000AgsTask AgsConnectable AgsAddBulkMember AgsConnectable AgsAddLineMember AgsConnectable AgsAddSequencerEditorJack AgsConnectable AgsAddSoundcardEditorSink AgsConnectable AgsBlinkCellPatternCursor AgsConnectable AgsChangeIndicator AgsConnectable AgsChangeTact AgsConnectable AgsDisplayTact AgsConnectable AgsRemoveSequencerEditorJack AgsConnectable AgsRemoveSoundcardEditorSink AgsConnectable AgsSimpleFileRead AgsConnectable AgsSimpleFileWrite AgsConnectable AgsToggleLed AgsConnectable AgsUpdateBulkMember AgsConnectable GtkWidget AtkImplementorIface GtkBuildable GtkContainer AtkImplementorIface GtkBuildable GtkBox AtkImplementorIface GtkBuildable GtkOrientable GtkVBox AtkImplementorIface GtkBuildable GtkOrientable AgsAudioPreferences AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsAutomationEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsLine AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsDrumInputLine AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsDrumOutputLine AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsMixerInputLine AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsPanelInputLine AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsSynthInputLine AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsPad AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsDrumInputPad AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsDrumOutputPad AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsMixerInputPad AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsPanelInputPad AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsSynthInputPad AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsDssiBrowser AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsEffectBridge AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsFFPlayerBridge AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsMatrixBridge AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsEffectBulk AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsFFPlayerBulkInput AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsMatrixBulkInput AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsEffectLine AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsFFPlayerInputLine AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsEffectPad AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsFFPlayerInputPad AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPlugin AgsEnvelopeEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsEnvelopeInfo AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsExportSoundcard AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsFileSelection AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsGenericPreferences AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsInlinePlayer AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsLadspaBrowser AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsLineEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsLineMemberEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsPropertyEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPropertyListingEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsListingEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsOutputListingEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsPropertyCollectionEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsLv2Browser AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsMachineCollection AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsMachineSelector AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsMidiPreferences AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsNavigation AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsNotationEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsPadEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsPatternEnvelope AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsPerformancePreferences AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsPluginPreferences AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsSequencerEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsServerPreferences AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsSF2Chooser AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsSoundcardEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsTrackCollection AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsWaveEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsAutomationEditBox AtkImplementorIface GtkBuildable GtkOrientable AgsVAutomationEditBox AtkImplementorIface GtkBuildable GtkOrientable GtkHBox AtkImplementorIface GtkBuildable GtkOrientable AgsEffectSeparator AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsLinkEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsOutputEditor AtkImplementorIface GtkBuildable GtkOrientable AgsConnectable AgsApplicable AgsWaveEditBox AtkImplementorIface GtkBuildable GtkOrientable AgsVWaveEditBox AtkImplementorIface GtkBuildable GtkOrientable GtkBin AtkImplementorIface GtkBuildable GtkHandleBox AtkImplementorIface GtkBuildable AgsMachine AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsAudiorec AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsDrum AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsDssiBridge AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsFFPlayer AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsLadspaBridge AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsLiveDssiBridge AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsLiveLv2Bridge AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsLv2Bridge AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsMatrix AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsMixer AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsPanel AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsSyncsynth AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin AgsSynth AtkImplementorIface GtkBuildable AgsConnectable AgsPlugin GtkWindow AtkImplementorIface GtkBuildable AgsAutomationWindow AtkImplementorIface GtkBuildable AgsConnectable GtkDialog AtkImplementorIface GtkBuildable AgsConnectionEditor AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsCropNoteDialog AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsEnvelopeDialog AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsMachineEditor AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsMachineSelection AtkImplementorIface GtkBuildable AgsConnectable AgsMidiDialog AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsMidiExportWizard AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsMidiImportWizard AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsMoveNoteDialog AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsPluginBrowser AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsPositionAutomationCursorDialog AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsPositionNotationCursorDialog AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsPreferences AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsRampAccelerationDialog AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsSelectAccelerationDialog AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsSelectNoteDialog AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsExportWindow AtkImplementorIface GtkBuildable AgsConnectable AgsHistoryBrowser AtkImplementorIface GtkBuildable AgsConnectable AgsPlaybackWindow AtkImplementorIface GtkBuildable AgsConnectable AgsWaveWindow AtkImplementorIface GtkBuildable AgsConnectable AgsWindow AtkImplementorIface GtkBuildable AgsConnectable GtkFrame AtkImplementorIface GtkBuildable AgsBulkMember AtkImplementorIface GtkBuildable AgsConnectable AgsLineMember AtkImplementorIface GtkBuildable AgsConnectable AgsOscillator AtkImplementorIface GtkBuildable AgsConnectable GtkButton AtkImplementorIface GtkBuildable GtkActivatable GtkToggleButton AtkImplementorIface GtkBuildable GtkActivatable GtkCheckButton AtkImplementorIface GtkBuildable GtkActivatable GtkRadioButton AtkImplementorIface GtkBuildable GtkActivatable AgsMachineRadioButton AtkImplementorIface GtkBuildable GtkActivatable AgsConnectable AgsScrolledAutomationEditBox AtkImplementorIface GtkBuildable AgsScrolledWaveEditBox AtkImplementorIface GtkBuildable GtkTable AtkImplementorIface GtkBuildable AgsAutomationEdit AtkImplementorIface GtkBuildable AgsConnectable AgsCellPattern AtkImplementorIface GtkBuildable AgsConnectable AgsLinkCollectionEditor AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsMachineCollectionEntry AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsNotationEdit AtkImplementorIface GtkBuildable AgsConnectable AgsOutputCollectionEditor AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsPatternBox AtkImplementorIface GtkBuildable AgsConnectable AgsTrackCollectionMapper AtkImplementorIface GtkBuildable AgsConnectable AgsApplicable AgsWaveEdit AtkImplementorIface GtkBuildable AgsConnectable GtkToolbar AtkImplementorIface GtkBuildable GtkToolShell GtkOrientable AgsAutomationToolbar AtkImplementorIface GtkBuildable GtkToolShell GtkOrientable AgsConnectable AgsNotationToolbar AtkImplementorIface GtkBuildable GtkToolShell GtkOrientable AgsConnectable AgsWaveToolbar AtkImplementorIface GtkBuildable GtkToolShell GtkOrientable AgsConnectable GtkMenuShell AtkImplementorIface GtkBuildable GtkMenu AtkImplementorIface GtkBuildable AgsContextMenu AtkImplementorIface GtkBuildable AgsConnectable GtkMenuBar AtkImplementorIface GtkBuildable AgsMenuBar AtkImplementorIface GtkBuildable AgsConnectable AgsThread AgsConnectable AgsGuiThread AgsConnectable AgsSimpleAutosaveThread AgsConnectable AgsTaskThread AgsConnectable AgsAsyncQueue AgsApplicationContext AgsConnectable AgsXorgApplicationContext AgsConnectable AgsConcurrencyProvider AgsSoundProvider AgsUiProvider AgsAudio AgsConnectable GdkPixbuf GIcon GLoadableIcon AgsPort AgsConnectable AgsChannel AgsConnectable GtkAction GtkBuildable AgsIpatch AgsConnectable AgsPlayable gsequencer-1.4.24/docs/reference/libgsequencer/Makefile.am0000644000175000017500000001072613246707333020454 00000000000000# This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE=libgsequencer # Uncomment for versioned docs and specify the version of the module, e.g. '2'. #DOC_MODULE_VERSION=2 # The top-level XML file. DOC_MAIN_SGML_FILE=$(DOC_MODULE).xml # Directories containing the source code. # gtk-doc will search all .c and .h files beneath these paths # for inline comments documenting functions and macros. # e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR=$(top_srcdir)/ags/X # Extra options to pass to gtkdoc-scangobj. Normally not needed. SCANGOBJ_OPTIONS=--cflags="$(CFLAGS) $(UUID_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBAO_CFLAGS) $(LIBXML2_CFLAGS) $(OPENSSL_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) $(XMLRPC_SERVER_CFLAGS) $(PTH_FLAGS) $(JACK_CFLAGS)" --ldflags="-static -ldl -lm -lrt -pthread $(LDFLAGS) $(UUID_LIBS) $(LIBASOUND2_LIBS) $(LIBAO_LIBS) $(LIBXML2_LIBS) $(OPENSSL_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) $(XMLRPC_SERVER_LIBS) $(JACK_LIBS) -L$(top_builddir) $(top_builddir)/libags.la $(top_builddir)/libags_thread.la $(top_builddir)/libags_server.la $(top_builddir)/libags_audio.la $(top_builddir)/libags_gui.la $(top_builddir)/libgsequencer.la" # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" # SCAN_OPTIONS=--rebuild-types --rebuild-sections # Extra options to supply to gtkdoc-mkdb # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml MKDB_OPTIONS=--xml-mode --output-format=xml --name-space=libgsequencer --module=libgsequencer # Extra options to supply to gtkdoc-mkhtml MKHTML_OPTIONS= # Extra options to supply to gtkdoc-fixref. Normally not needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS=--module=libgsequencer --module-dir=./libgsequencer-html/ --html-dir=$(DESTDIR)/$(datadir)/doc/libgsequencer-doc/api --extra-dir=$(top_srcdir)/docs/reference/libags/libags-html --extra-dir=$(top_srcdir)/docs/reference/libags-audio/libags-audio-html --extra-dir=$(top_srcdir)/docs/reference/libags-gui/libags-gui-html # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB= CFILE_GLOB= # Extra header to include when scanning, which are not under DOC_SOURCE_DIR # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h EXTRA_HFILES= # Header files or dirs to ignore when scanning. Use base file/dir names # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES= # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES= # Extra files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.xml building.xml changes-2.0.xml content_files= # Files where gtk-doc abbrevations (#GtkWidget) are expanded # e.g. expand_content_files=running.xml expand_content_files= AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) GTKDOC_CFLAGS=$(gsequencer_CFLAGS) -DGTK_IS_WIDGET_CLASS=1 GTKDOC_LIBS = \ $(top_builddir)/libags.la \ $(top_builddir)/libags_thread.la \ $(top_builddir)/libags_server.la \ $(top_builddir)/libags_audio.la \ $(top_builddir)/libags_gui.la \ $(top_builddir)/libgsequencer.la \ $(gsequencer_LDFLAGS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include ./gtk-doc.make # Comment this out if you want 'make check' to test you doc status # and run some sanity checks if ENABLE_GTK_DOC TESTS_ENVIRONMENT = \ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) TESTS = $(GTKDOC_CHECK) endif -include $(top_srcdir)/git.mk gsequencer-1.4.24/docs/reference/libgsequencer/libgsequencer-sections.txt0000644000175000017500000026177513247044247023651 00000000000000
ags_add_bulk_member AgsAddBulkMember ags_add_bulk_member_new AGS_ADD_BULK_MEMBER AGS_ADD_BULK_MEMBER_CLASS AGS_ADD_BULK_MEMBER_GET_CLASS AGS_IS_ADD_BULK_MEMBER AGS_TYPE_ADD_BULK_MEMBER AgsAddBulkMember AgsAddBulkMemberClass ags_add_bulk_member_get_type
ags_add_line_member AgsAddLineMember ags_add_line_member_new AGS_ADD_LINE_MEMBER AGS_ADD_LINE_MEMBER_CLASS AGS_ADD_LINE_MEMBER_GET_CLASS AGS_IS_ADD_LINE_MEMBER AGS_TYPE_ADD_LINE_MEMBER AgsAddLineMember AgsAddLineMemberClass ags_add_line_member_get_type
ags_add_sequencer_editor_jack AgsAddSequencerEditorJack ags_add_sequencer_editor_jack_new AGS_ADD_SEQUENCER_EDITOR_JACK AGS_ADD_SEQUENCER_EDITOR_JACK_CLASS AGS_ADD_SEQUENCER_EDITOR_JACK_GET_CLASS AGS_IS_ADD_SEQUENCER_EDITOR_JACK AGS_TYPE_ADD_SEQUENCER_EDITOR_JACK AgsAddSequencerEditorJack AgsAddSequencerEditorJackClass ags_add_sequencer_editor_jack_get_type
ags_add_soundcard_editor_sink AgsAddSoundcardEditorSink ags_add_soundcard_editor_sink_new AGS_ADD_SOUNDCARD_EDITOR_SINK AGS_ADD_SOUNDCARD_EDITOR_SINK_CLASS AGS_ADD_SOUNDCARD_EDITOR_SINK_GET_CLASS AGS_IS_ADD_SOUNDCARD_EDITOR_SINK AGS_TYPE_ADD_SOUNDCARD_EDITOR_SINK AgsAddSoundcardEditorSink AgsAddSoundcardEditorSinkClass ags_add_soundcard_editor_sink_get_type
ags_audio_preferences AgsAudioPreferences AgsAudioPreferencesFlags ags_audio_preferences_new AGS_AUDIO_PREFERENCES AGS_AUDIO_PREFERENCES_CLASS AGS_AUDIO_PREFERENCES_GET_CLASS AGS_IS_AUDIO_PREFERENCES AGS_TYPE_AUDIO_PREFERENCES AgsAudioPreferences AgsAudioPreferencesClass ags_audio_preferences_get_type
ags_audio_preferences_callbacks ags_audio_preferences_parent_set_callback ags_audio_preferences_connect_sink_callback ags_audio_preferences_add_callback ags_audio_preferences_remove_soundcard_editor_callback ags_audio_preferences_enable_jack_callback ags_audio_preferences_start_jack_callback ags_audio_preferences_stop_jack_callback
ags_audiorec AgsAudiorec ags_audiorec_open_filename ags_audiorec_new AGS_AUDIOREC AGS_AUDIOREC_CLASS AGS_AUDIOREC_GET_CLASS AGS_IS_AUDIOREC AGS_TYPE_AUDIOREC AgsAudiorec AgsAudiorecClass ags_audiorec_get_type
ags_audiorec_callbacks ags_audiorec_open_callback ags_audiorec_keep_data_callback ags_audiorec_replace_data_callback ags_audiorec_mix_data_callback
ags_automation_edit AgsAutomationEdit AGS_AUTOMATION_EDIT_DEFAULT_HEIGHT AGS_AUTOMATION_EDIT_DEFAULT_WIDTH AGS_AUTOMATION_EDIT_DEFAULT_POINT_RADIUS AGS_AUTOMATION_EDIT_DEFAULT_SCAN_HEIGHT AGS_AUTOMATION_EDIT_DEFAULT_SCAN_WIDTH AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_WIDTH AGS_AUTOMATION_EDIT_DEFAULT_CONTROL_HEIGHT AGS_AUTOMATION_EDIT_DEFAULT_STEP_COUNT AGS_AUTOMATION_EDIT_DEFAULT_CURSOR_POSITION_X AGS_AUTOMATION_EDIT_DEFAULT_CURSOR_POSITION_Y AGS_AUTOMATION_EDIT_DEFAULT_FADER_WIDTH AGS_AUTOMATION_EDIT_CURSOR_WIDTH AGS_AUTOMATION_EDIT_CURSOR_HEIGHT AGS_AUTOMATION_EDIT_MIN_ZOOM AGS_AUTOMATION_EDIT_MAX_ZOOM AGS_AUTOMATION_EDIT_DEFAULT_LOWER AGS_AUTOMATION_EDIT_DEFAULT_UPPER AGS_AUTOMATION_EDIT_DEFAULT_VALUE AGS_AUTOMATION_EDIT_DEFAULT_PADDING AgsAutomationEditFlags AgsAutomationEditMode AgsAutomationEditButtonMask AgsAutomationEditKeyMask ags_automation_edit_reset_vscrollbar ags_automation_edit_reset_hscrollbar ags_automation_edit_draw_segment ags_automation_edit_draw_position ags_automation_edit_draw_cursor ags_automation_edit_draw_selection ags_automation_edit_draw_acceleration ags_automation_edit_draw_automation ags_automation_edit_draw ags_automation_edit_new AGS_AUTOMATION_EDIT AGS_AUTOMATION_EDIT_CLASS AGS_AUTOMATION_EDIT_GET_CLASS AGS_IS_AUTOMATION_EDIT AGS_TYPE_AUTOMATION_EDIT AgsAutomationEdit AgsAutomationEditClass ags_automation_edit_get_type
ags_automation_edit_box AgsAutomationEditBox AGS_AUTOMATION_EDIT_BOX_DEFAULT_FIXED_EDIT_HEIGHT AgsAutomationEditBoxFlags ags_automation_edit_box_new AGS_AUTOMATION_EDIT_BOX AGS_AUTOMATION_EDIT_BOX_CLASS AGS_AUTOMATION_EDIT_BOX_GET_CLASS AGS_IS_AUTOMATION_EDIT_BOX AGS_TYPE_AUTOMATION_EDIT_BOX AgsAutomationEditBox AgsAutomationEditBoxClass ags_automation_edit_box_get_type
ags_automation_edit_callbacks ags_automation_edit_drawing_area_expose_event ags_automation_edit_drawing_area_configure_event ags_automation_edit_drawing_area_button_press_event ags_automation_edit_drawing_area_button_release_event ags_automation_edit_drawing_area_motion_notify_event ags_automation_edit_drawing_area_key_press_event ags_automation_edit_drawing_area_key_release_event ags_automation_edit_vscrollbar_value_changed ags_automation_edit_hscrollbar_value_changed
ags_automation_editor AgsAutomationEditor AGS_AUTOMATION_EDITOR_CHILD AGS_AUTOMATION_EDITOR_MAX_VALUE_COUNT AGS_AUTOMATION_EDITOR_MAX_CONTROLS AGS_AUTOMATION_EDITOR_DEFAULT_VERSION AGS_AUTOMATION_EDITOR_DEFAULT_BUILD_ID AgsAutomationEditorFlags ags_automation_editor_reset_audio_scrollbar ags_automation_editor_reset_output_scrollbar ags_automation_editor_reset_input_scrollbar ags_automation_editor_machine_changed ags_automation_editor_add_acceleration ags_automation_editor_delete_acceleration ags_automation_editor_select_region ags_automation_editor_select_all ags_automation_editor_paste ags_automation_editor_copy ags_automation_editor_cut ags_automation_editor_invert ags_automation_editor_new AGS_AUTOMATION_EDITOR AGS_AUTOMATION_EDITOR_CLASS AGS_AUTOMATION_EDITOR_GET_CLASS AGS_IS_AUTOMATION_EDITOR AGS_TYPE_AUTOMATION_EDITOR AgsAutomationEditor AgsAutomationEditorClass ags_automation_editor_get_type
ags_automation_editor_callbacks ags_automation_editor_audio_edit_expose_event ags_automation_editor_audio_edit_configure_event ags_automation_editor_output_edit_expose_event ags_automation_editor_output_edit_configure_event ags_automation_editor_input_edit_expose_event ags_automation_editor_input_edit_configure_event ags_automation_editor_audio_vscrollbar_value_changed ags_automation_editor_audio_hscrollbar_value_changed ags_automation_editor_output_vscrollbar_value_changed ags_automation_editor_output_hscrollbar_value_changed ags_automation_editor_input_vscrollbar_value_changed ags_automation_editor_input_hscrollbar_value_changed ags_automation_editor_audio_automation_edit_hscrollbar_value_changed ags_automation_editor_output_automation_edit_hscrollbar_value_changed ags_automation_editor_input_automation_edit_hscrollbar_value_changed ags_automation_editor_machine_changed_callback ags_automation_editor_resize_audio_channels_callback ags_automation_editor_resize_pads_callback
ags_automation_toolbar AgsAutomationToolbar AGS_AUTOMATION_TOOLBAR_DATA_CHANNEL AGS_AUTOMATION_TOOLBAR_DATA_PORT AgsAutomationToolbarFlags ags_automation_toolbar_load_port ags_automation_toolbar_apply_port ags_automation_toolbar_tool_popup_new ags_automation_toolbar_new AGS_AUTOMATION_TOOLBAR AGS_AUTOMATION_TOOLBAR_CLASS AGS_AUTOMATION_TOOLBAR_GET_CLASS AGS_IS_AUTOMATION_TOOLBAR AGS_TYPE_AUTOMATION_TOOLBAR AgsAutomationToolbar AgsAutomationToolbarClass ags_automation_toolbar_get_type
ags_automation_toolbar_callbacks ags_automation_toolbar_machine_changed_callback ags_automation_toolbar_position_callback ags_automation_toolbar_edit_callback ags_automation_toolbar_clear_callback ags_automation_toolbar_select_callback ags_automation_toolbar_copy_or_cut_callback ags_automation_toolbar_paste_callback ags_automation_toolbar_match_line_callback ags_automation_toolbar_no_duplicates_callback ags_automation_toolbar_tool_popup_select_acceleration_callback ags_automation_toolbar_tool_popup_ramp_acceleration_callback ags_automation_toolbar_tool_popup_position_cursor_callback ags_automation_toolbar_zoom_callback ags_automation_toolbar_port_callback
ags_automation_window AgsAutomationWindow AgsAutomationWindowFlags ags_automation_window_new AGS_AUTOMATION_WINDOW AGS_AUTOMATION_WINDOW_CLASS AGS_AUTOMATION_WINDOW_GET_CLASS AGS_IS_AUTOMATION_WINDOW AGS_TYPE_AUTOMATION_WINDOW AgsAutomationWindow AgsAutomationWindowClass ags_automation_window_get_type
ags_automation_window_callbacks
ags_blink_cell_pattern_cursor AgsBlinkCellPatternCursor ags_blink_cell_pattern_cursor_new AGS_BLINK_CELL_PATTERN_CURSOR AGS_BLINK_CELL_PATTERN_CURSOR_CLASS AGS_BLINK_CELL_PATTERN_CURSOR_GET_CLASS AGS_IS_BLINK_CELL_PATTERN_CURSOR AGS_TYPE_BLINK_CELL_PATTERN_CURSOR AgsBlinkCellPatternCursor AgsBlinkCellPatternCursorClass ags_blink_cell_pattern_cursor_get_type
ags_bulk_member AgsBulkMember AGS_BULK_PORT AGS_BULK_MEMBER_DEFAULT_VERSION AGS_BULK_MEMBER_DEFAULT_BUILD_ID AgsBulkMemberFlags AgsBulkMemberPortFlags AgsBulkPort ags_bulk_port_alloc ags_bulk_port_find ags_bulk_member_get_widget ags_bulk_member_set_label ags_bulk_member_change_port ags_bulk_member_find_port ags_bulk_member_new AGS_BULK_MEMBER AGS_BULK_MEMBER_CLASS AGS_BULK_MEMBER_GET_CLASS AGS_IS_BULK_MEMBER AGS_TYPE_BULK_MEMBER AgsBulkMember AgsBulkMemberClass ags_bulk_member_get_type
ags_bulk_member_callbacks ags_bulk_member_parent_set_callback ags_bulk_member_dial_changed_callback ags_bulk_member_vscale_changed_callback ags_bulk_member_hscale_changed_callback ags_bulk_member_spin_button_changed_callback ags_bulk_member_check_button_clicked_callback ags_bulk_member_toggle_button_clicked_callback ags_bulk_member_button_clicked_callback ags_bulk_member_port_safe_write_callback
ags_cell_pattern AgsCellPattern AGS_CELL_PATTERN_DEFAULT_CELL_WIDTH AGS_CELL_PATTERN_DEFAULT_CELL_HEIGHT AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_HORIZONTALLY AGS_CELL_PATTERN_MAX_CONTROLS_SHOWN_VERTICALLY AGS_CELL_PATTERN_DEFAULT_CONTROLS_HORIZONTALLY AGS_CELL_PATTERN_DEFAULT_CONTROLS_VERTICALLY AgsCellPatternFlags AgsCellPatternKeyMask AgsCellPatternAction ags_cell_pattern_paint ags_cell_pattern_draw_gutter ags_cell_pattern_draw_matrix ags_cell_pattern_draw_cursor ags_cell_pattern_redraw_gutter_point ags_cell_pattern_highlight_gutter_point ags_cell_pattern_unpaint_gutter_point ags_cell_pattern_blink_worker ags_cell_pattern_led_queue_draw_timeout ags_cell_pattern_new AGS_CELL_PATTERN AGS_CELL_PATTERN_CLASS AGS_CELL_PATTERN_GET_CLASS AGS_IS_CELL_PATTERN AGS_TYPE_CELL_PATTERN AgsCellPattern AgsCellPatternClass ags_cell_pattern_get_type
ags_cell_pattern_callbacks ags_cell_pattern_focus_in_callback ags_cell_pattern_drawing_area_configure_callback ags_cell_pattern_drawing_area_expose_callback ags_cell_pattern_drawing_area_button_press_callback ags_cell_pattern_drawing_area_key_press_event ags_cell_pattern_drawing_area_key_release_event ags_cell_pattern_adjustment_value_changed_callback
ags_change_indicator AgsChangeIndicator ags_change_indicator_new AGS_CHANGE_INDICATOR AGS_CHANGE_INDICATOR_CLASS AGS_CHANGE_INDICATOR_GET_CLASS AGS_IS_CHANGE_INDICATOR AGS_TYPE_CHANGE_INDICATOR AgsChangeIndicator AgsChangeIndicatorClass ags_change_indicator_get_type
ags_change_tact AgsChangeTact ags_change_tact_new AGS_CHANGE_TACT AGS_CHANGE_TACT_CLASS AGS_CHANGE_TACT_GET_CLASS AGS_IS_CHANGE_TACT AGS_TYPE_CHANGE_TACT AgsChangeTact AgsChangeTactClass ags_change_tact_get_type
ags_connection_editor AgsConnectionEditor AGS_CONNECTION_EDITOR_DEFAULT_VERSION AGS_CONNECTION_EDITOR_DEFAULT_BUILD_ID AgsConnectionEditorFlags ags_connection_editor_set_machine ags_connection_editor_new AGS_CONNECTION_EDITOR AGS_CONNECTION_EDITOR_CLASS AGS_CONNECTION_EDITOR_GET_CLASS AGS_IS_CONNECTION_EDITOR AGS_TYPE_CONNECTION_EDITOR AgsConnectionEditor AgsConnectionEditorClass ags_connection_editor_get_type
ags_connection_editor_callbacks ags_connection_editor_switch_page_callback ags_connection_editor_apply_callback ags_connection_editor_ok_callback ags_connection_editor_cancel_callback ags_connection_editor_delete_event
ags_context_menu AgsContextMenu AGS_MENU_ITEM_FILENAME_KEY AGS_MENU_ITEM_EFFECT_KEY ags_context_menu_new AGS_CONTEXT_MENU AGS_CONTEXT_MENU_CLASS AGS_CONTEXT_MENU_GET_CLASS AGS_IS_CONTEXT_MENU AGS_TYPE_CONTEXT_MENU AgsContextMenu AgsContextMenuClass ags_context_menu_get_type
ags_crop_note_dialog AgsCropNoteDialog AGS_CROP_NOTE_DIALOG_MAX_WIDTH AgsCropNoteDialogFlags ags_crop_note_dialog_new AGS_CROP_NOTE_DIALOG AGS_CROP_NOTE_DIALOG_CLASS AGS_CROP_NOTE_DIALOG_GET_CLASS AGS_IS_CROP_NOTE_DIALOG AGS_TYPE_CROP_NOTE_DIALOG AgsCropNoteDialog AgsCropNoteDialogClass ags_crop_note_dialog_get_type
ags_crop_note_dialog_callbacks ags_crop_note_dialog_response_callback ags_crop_note_dialog_absolute_callback
ags_display_tact AgsDisplayTact ags_display_tact_new AGS_DISPLAY_TACT AGS_DISPLAY_TACT_CLASS AGS_DISPLAY_TACT_GET_CLASS AGS_IS_DISPLAY_TACT AGS_TYPE_DISPLAY_TACT AgsDisplayTact AgsDisplayTactClass ags_display_tact_get_type
ags_drum AgsDrum ags_drum_new AGS_DRUM AGS_DRUM_CLASS AGS_DRUM_GET_CLASS AGS_IS_DRUM AGS_TYPE_DRUM AgsDrum AgsDrumClass ags_drum_get_type
ags_drum_callbacks ags_drum_parent_set_callback ags_drum_destroy_callback ags_drum_open_callback ags_drum_loop_button_callback ags_drum_length_spin_callback ags_drum_index0_callback ags_drum_index1_callback ags_drum_done_callback
ags_drum_input_line AgsDrumInputLine ags_drum_input_line_new AGS_DRUM_INPUT_LINE AGS_DRUM_INPUT_LINE_CLASS AGS_DRUM_INPUT_LINE_GET_CLASS AGS_IS_DRUM_INPUT_LINE AGS_TYPE_DRUM_INPUT_LINE AgsDrumInputLine AgsDrumInputLineClass ags_drum_input_line_get_type
ags_drum_input_line_callbacks
ags_drum_input_pad AgsDrumInputPad AgsDrumInputPadFlags ags_drum_input_pad_new AGS_DRUM_INPUT_PAD AGS_DRUM_INPUT_PAD_CLASS AGS_DRUM_INPUT_PAD_GET_CLASS AGS_IS_DRUM_INPUT_PAD AGS_TYPE_DRUM_INPUT_PAD AgsDrumInputPad AgsDrumInputPadClass ags_drum_input_pad_get_type
ags_drum_input_pad_callbacks ags_drum_input_pad_open_callback ags_drum_input_pad_play_callback ags_drum_input_pad_edit_callback
ags_drum_output_line AgsDrumOutputLine ags_drum_output_line_new AGS_DRUM_OUTPUT_LINE AGS_DRUM_OUTPUT_LINE_CLASS AGS_DRUM_OUTPUT_LINE_GET_CLASS AGS_IS_DRUM_OUTPUT_LINE AGS_TYPE_DRUM_OUTPUT_LINE AgsDrumOutputLine AgsDrumOutputLineClass ags_drum_output_line_get_type
ags_drum_output_line_callbacks ags_drum_output_line_resize_pads_callback
ags_drum_output_pad AgsDrumOutputPad AgsDrumOutputPadFlags ags_drum_output_pad_new AGS_DRUM_OUTPUT_PAD AGS_DRUM_OUTPUT_PAD_CLASS AGS_DRUM_OUTPUT_PAD_GET_CLASS AGS_IS_DRUM_OUTPUT_PAD AGS_TYPE_DRUM_OUTPUT_PAD AgsDrumOutputPad AgsDrumOutputPadClass ags_drum_output_pad_get_type
ags_drum_output_pad_callbacks
ags_dssi_bridge AgsDssiBridge AGS_DSSI_BRIDGE_DEFAULT_VERSION AGS_DSSI_BRIDGE_DEFAULT_BUILD_ID AgsDssiBridgeFlags ags_dssi_bridge_input_map_recall ags_dssi_bridge_output_map_recall ags_dssi_bridge_load ags_dssi_bridge_new AGS_DSSI_BRIDGE AGS_DSSI_BRIDGE_CLASS AGS_DSSI_BRIDGE_GET_CLASS AGS_IS_DSSI_BRIDGE AGS_TYPE_DSSI_BRIDGE AgsDssiBridge AgsDssiBridgeClass ags_dssi_bridge_get_type
ags_dssi_bridge_callbacks ags_dssi_bridge_parent_set_callback ags_dssi_bridge_program_changed_callback
ags_dssi_browser AgsDssiBrowser ags_dssi_browser_get_plugin_filename ags_dssi_browser_get_plugin_effect ags_dssi_browser_combo_box_controls_new ags_dssi_browser_preview_new ags_dssi_browser_new AGS_DSSI_BROWSER AGS_DSSI_BROWSER_CLASS AGS_DSSI_BROWSER_GET_CLASS AGS_IS_DSSI_BROWSER AGS_TYPE_DSSI_BROWSER AgsDssiBrowser AgsDssiBrowserClass ags_dssi_browser_get_type
ags_dssi_browser_callbacks ags_dssi_browser_plugin_filename_callback ags_dssi_browser_plugin_effect_callback
ags_effect_bridge AgsEffectBridge AGS_EFFECT_BRIDGE_DEFAULT_VERSION AGS_EFFECT_BRIDGE_DEFAULT_BUILD_ID AGS_EFFECT_BRIDGE_MAX_COLUMNS AgsEffectBridgeFlags ags_effect_bridge_resize_audio_channels ags_effect_bridge_resize_pads ags_effect_bridge_map_recall ags_effect_bridge_find_port ags_effect_bridge_new AGS_EFFECT_BRIDGE AGS_EFFECT_BRIDGE_CLASS AGS_EFFECT_BRIDGE_GET_CLASS AGS_IS_EFFECT_BRIDGE AGS_TYPE_EFFECT_BRIDGE AgsEffectBridge AgsEffectBridgeClass ags_effect_bridge_get_type
ags_effect_bridge_callbacks ags_effect_bridge_resize_audio_channels_callback ags_effect_bridge_resize_pads_callback
ags_effect_bulk AgsEffectBulk AGS_EFFECT_BULK_PLUGIN AGS_EFFECT_BULK_DEFAULT_VERSION AGS_EFFECT_BULK_DEFAULT_BUILD_ID AGS_EFFECT_BULK_COLUMNS_COUNT AgsEffectBulkFlags AgsEffectBulkPlugin ags_effect_bulk_plugin_alloc ags_effect_bulk_plugin_free ags_effect_bulk_add_effect ags_effect_bulk_remove_effect ags_effect_bulk_resize_audio_channels ags_effect_bulk_resize_pads ags_effect_bulk_map_recall ags_effect_bulk_find_port ags_effect_bulk_indicator_queue_draw_timeout ags_effect_bulk_new AGS_EFFECT_BULK AGS_EFFECT_BULK_CLASS AGS_EFFECT_BULK_GET_CLASS AGS_IS_EFFECT_BULK AGS_TYPE_EFFECT_BULK AgsEffectBulk AgsEffectBulkClass ags_effect_bulk_get_type
ags_effect_bulk_callbacks ags_effect_bulk_add_callback ags_effect_bulk_remove_callback ags_effect_bulk_plugin_browser_response_callback ags_effect_bulk_resize_audio_channels_callback ags_effect_bulk_resize_pads_callback
ags_effect_line AgsEffectLine AGS_EFFECT_LINE_DEFAULT_VERSION AGS_EFFECT_LINE_DEFAULT_BUILD_ID AGS_EFFECT_LINE_COLUMNS_COUNT AGS_EFFECT_LINE_SEPARATOR_FILENAME AGS_EFFECT_LINE_SEPARATOR_EFFECT AgsEffectLineFlags ags_effect_line_set_channel ags_effect_line_add_effect ags_effect_line_remove_effect ags_effect_line_map_recall ags_effect_line_find_port ags_effect_line_find_next_grouped ags_effect_line_indicator_queue_draw_timeout ags_effect_line_new AGS_EFFECT_LINE AGS_EFFECT_LINE_CLASS AGS_EFFECT_LINE_GET_CLASS AGS_IS_EFFECT_LINE AGS_TYPE_EFFECT_LINE AgsEffectLine AgsEffectLineClass ags_effect_line_get_type
ags_effect_line_callbacks ags_effect_line_remove_recall_callback ags_effect_line_add_effect_callback ags_effect_line_remove_effect_callback ags_effect_line_output_port_run_post_callback
ags_effect_pad AgsEffectPad AGS_EFFECT_PAD_DEFAULT_VERSION AGS_EFFECT_PAD_DEFAULT_BUILD_ID AGS_EFFECT_PAD_COLUMNS_COUNT AgsEffectPadFlags ags_effect_pad_set_channel ags_effect_pad_resize_lines ags_effect_pad_map_recall ags_effect_pad_find_port ags_effect_pad_new AGS_EFFECT_PAD AGS_EFFECT_PAD_CLASS AGS_EFFECT_PAD_GET_CLASS AGS_IS_EFFECT_PAD AGS_TYPE_EFFECT_PAD AgsEffectPad AgsEffectPadClass ags_effect_pad_get_type
ags_effect_pad_callbacks
ags_effect_separator AgsEffectSeparator ags_effect_separator_new AGS_EFFECT_SEPARATOR AGS_EFFECT_SEPARATOR_CLASS AGS_EFFECT_SEPARATOR_GET_CLASS AGS_IS_EFFECT_SEPARATOR AGS_TYPE_EFFECT_SEPARATOR AgsEffectSeparator AgsEffectSeparatorClass ags_effect_separator_get_type
ags_envelope_dialog AgsEnvelopeDialog AGS_ENVELOPE_DIALOG_DEFAULT_VERSION AGS_ENVELOPE_DIALOG_DEFAULT_BUILD_ID AgsEnvelopeDialogFlags ags_envelope_dialog_load_preset ags_envelope_dialog_add_pattern_tab ags_envelope_dialog_new AGS_ENVELOPE_DIALOG AGS_ENVELOPE_DIALOG_CLASS AGS_ENVELOPE_DIALOG_GET_CLASS AGS_IS_ENVELOPE_DIALOG AGS_TYPE_ENVELOPE_DIALOG AgsEnvelopeDialog AgsEnvelopeDialogClass ags_envelope_dialog_get_type
ags_envelope_dialog_callbacks ags_envelope_dialog_apply_callback ags_envelope_dialog_ok_callback ags_envelope_dialog_cancel_callback ags_envelope_dialog_delete_event
ags_envelope_editor AgsEnvelopeEditor AGS_ENVELOPE_EDITOR_DEFAULT_VERSION AGS_ENVELOPE_EDITOR_DEFAULT_BUILD_ID AgsEnvelopeEditorFlags ags_envelope_editor_get_active_preset ags_envelope_editor_load_preset ags_envelope_editor_add_preset ags_envelope_editor_remove_preset ags_envelope_editor_reset_control ags_envelope_editor_plot ags_envelope_editor_new AGS_ENVELOPE_EDITOR AGS_ENVELOPE_EDITOR_CLASS AGS_ENVELOPE_EDITOR_GET_CLASS AGS_IS_ENVELOPE_EDITOR AGS_TYPE_ENVELOPE_EDITOR AgsEnvelopeEditor AgsEnvelopeEditorClass ags_envelope_editor_get_type
ags_envelope_editor_callbacks ags_envelope_editor_preset_callback ags_envelope_editor_preset_add_callback ags_envelope_editor_preset_remove_callback ags_envelope_editor_preset_rename_response_callback ags_envelope_editor_attack_x_callback ags_envelope_editor_attack_y_callback ags_envelope_editor_decay_x_callback ags_envelope_editor_decay_y_callback ags_envelope_editor_sustain_x_callback ags_envelope_editor_sustain_y_callback ags_envelope_editor_release_x_callback ags_envelope_editor_release_y_callback ags_envelope_editor_ratio_callback
ags_envelope_info AgsEnvelopeInfo AGS_ENVELOPE_INFO_DEFAULT_VERSION AGS_ENVELOPE_INFO_DEFAULT_BUILD_ID AgsEnvelopeInfoFlags AgsEnvelopeInfoColumn ags_envelope_info_plot ags_envelope_info_new AGS_ENVELOPE_INFO AGS_ENVELOPE_INFO_CLASS AGS_ENVELOPE_INFO_GET_CLASS AGS_IS_ENVELOPE_INFO AGS_TYPE_ENVELOPE_INFO AgsEnvelopeInfo AgsEnvelopeInfoClass ags_envelope_info_get_type
ags_envelope_info_callbacks ags_envelope_info_plot_callback
ags_export_soundcard AgsExportSoundcard AGS_EXPORT_SOUNDCARD_FORMAT_WAV AGS_EXPORT_SOUNDCARD_FORMAT_FLAC AGS_EXPORT_SOUNDCARD_FORMAT_OGG AgsExportSoundcardFlags ags_export_soundcard_set_backend ags_export_soundcard_refresh_card ags_export_soundcard_set_card ags_export_soundcard_set_filename ags_export_soundcard_set_format ags_export_soundcard_new AGS_EXPORT_SOUNDCARD AGS_EXPORT_SOUNDCARD_CLASS AGS_EXPORT_SOUNDCARD_GET_CLASS AGS_IS_EXPORT_SOUNDCARD AGS_TYPE_EXPORT_SOUNDCARD AgsExportSoundcard AgsExportSoundcardClass ags_export_soundcard_get_type
ags_export_soundcard_callbacks ags_export_soundcard_backend_callback ags_export_soundcard_card_callback ags_export_soundcard_file_chooser_button_callback
ags_export_window AgsExportWindow AgsExportWindowFlags ags_export_window_reload_soundcard_editor ags_export_window_new AGS_EXPORT_WINDOW AGS_EXPORT_WINDOW_CLASS AGS_EXPORT_WINDOW_GET_CLASS AGS_IS_EXPORT_WINDOW AGS_TYPE_EXPORT_WINDOW AgsExportWindow AgsExportWindowClass ags_export_window_get_type
ags_export_window_callbacks ags_export_window_add_export_soundcard_callback ags_export_window_remove_export_soundcard_callback ags_export_window_tact_callback ags_export_window_export_callback
ags_ffplayer AgsFFPlayer AgsFFPlayerFlags ags_ffplayer_paint ags_ffplayer_open_filename ags_ffplayer_load_preset ags_ffplayer_load_instrument ags_ffplayer_new AGS_FFPLAYER AGS_FFPLAYER_CLASS AGS_FFPLAYER_GET_CLASS AGS_IS_FFPLAYER AGS_TYPE_FFPLAYER AgsFFPlayer AgsFFPlayerClass ags_ffplayer_get_type
ags_ffplayer_bridge AgsFFPlayerBridge ags_ffplayer_bridge_new AGS_FFPLAYER_BRIDGE AGS_FFPLAYER_BRIDGE_CLASS AGS_FFPLAYER_BRIDGE_GET_CLASS AGS_IS_FFPLAYER_BRIDGE AGS_TYPE_FFPLAYER_BRIDGE AgsFFPlayerBridge AgsFFPlayerBridgeClass ags_ffplayer_bridge_get_type
ags_ffplayer_bridge_callbacks
ags_ffplayer_bulk_input AgsFFPlayerBulkInput AGS_FFPLAYER_BULK_INPUT_DEFAULT_VERSION AGS_FFPLAYER_BULK_INPUT_DEFAULT_BUILD_ID AgsFFPlayerBulkInputFlags ags_ffplayer_bulk_input_new AGS_FFPLAYER_BULK_INPUT AGS_FFPLAYER_BULK_INPUT_CLASS AGS_FFPLAYER_BULK_INPUT_GET_CLASS AGS_IS_FFPLAYER_BULK_INPUT AGS_TYPE_FFPLAYER_BULK_INPUT AgsFFPlayerBulkInput AgsFFPlayerBulkInputClass ags_ffplayer_bulk_input_get_type
ags_ffplayer_bulk_input_callbacks
ags_ffplayer_callbacks ags_ffplayer_parent_set_callback ags_ffplayer_destroy_callback ags_ffplayer_open_clicked_callback ags_ffplayer_open_dialog_response_callback ags_ffplayer_preset_changed_callback ags_ffplayer_instrument_changed_callback ags_ffplayer_drawing_area_expose_callback ags_ffplayer_drawing_area_configure_callback ags_ffplayer_drawing_area_button_press_callback ags_ffplayer_hscrollbar_value_changed
ags_ffplayer_input_line AgsFFPlayerInputLine ags_ffplayer_input_line_new AGS_FFPLAYER_INPUT_LINE AGS_FFPLAYER_INPUT_LINE_CLASS AGS_FFPLAYER_INPUT_LINE_GET_CLASS AGS_IS_FFPLAYER_INPUT_LINE AGS_TYPE_FFPLAYER_INPUT_LINE AgsFFPlayerInputLine AgsFFPlayerInputLineClass ags_ffplayer_input_line_get_type
ags_ffplayer_input_line_callbacks ags_ffplayer_input_line_notify_channel_callback
ags_ffplayer_input_pad AgsFFPlayerInputPad ags_ffplayer_input_pad_new AGS_FFPLAYER_INPUT_PAD AGS_FFPLAYER_INPUT_PAD_CLASS AGS_FFPLAYER_INPUT_PAD_GET_CLASS AGS_IS_FFPLAYER_INPUT_PAD AGS_TYPE_FFPLAYER_INPUT_PAD AgsFFPlayerInputPad AgsFFPlayerInputPadClass ags_ffplayer_input_pad_get_type
ags_ffplayer_input_pad_callbacks
ags_file_selection AgsFileSelection AGS_FILE_SELECTION_ENTRY AgsFileSelectionFlags AgsFileSelectionEntry ags_file_selection_entry_alloc ags_file_selection_set_entry ags_file_selection_add_entry ags_file_selection_remove_entry ags_file_selection_contains_file ags_file_selection_completed ags_file_selection_new AGS_FILE_SELECTION AGS_FILE_SELECTION_CLASS AGS_FILE_SELECTION_GET_CLASS AGS_IS_FILE_SELECTION AGS_TYPE_FILE_SELECTION AgsFileSelection AgsFileSelectionClass ags_file_selection_get_type
ags_file_selection_callbacks ags_file_selection_remove_callback
ags_generic_preferences AgsGenericPreferences AgsGenericPreferencesFlags ags_generic_preferences_new AGS_GENERIC_PREFERENCES AGS_GENERIC_PREFERENCES_CLASS AGS_GENERIC_PREFERENCES_GET_CLASS AGS_IS_GENERIC_PREFERENCES AGS_TYPE_GENERIC_PREFERENCES AgsGenericPreferences AgsGenericPreferencesClass ags_generic_preferences_get_type
ags_generic_preferences_callbacks ags_generic_preferences_autosave_thread_clicked_callback
ags_gui_file_xml ags_file_read_widget ags_file_write_widget ags_file_read_window ags_file_write_window ags_file_read_menu_bar ags_file_write_menu_bar ags_file_read_machine_counter ags_file_write_machine_counter ags_file_read_machine_counter_list ags_file_write_machine_counter_list ags_file_read_machine ags_file_write_machine ags_file_read_machine_resolve_audio ags_file_read_machine_list ags_file_write_machine_list ags_file_read_pad ags_file_write_pad ags_file_read_pad_list ags_file_write_pad_list ags_file_read_mixer_input_pad ags_file_write_mixer_input_pad ags_file_read_mixer_output_pad ags_file_write_mixer_output_pad ags_file_read_line ags_file_write_line ags_file_read_line_list ags_file_write_line_list ags_file_read_line_member ags_file_write_line_member ags_file_read_line_member_list ags_file_write_line_member_list ags_file_read_effect_bridge ags_file_write_effect_bridge ags_file_read_effect_bridge_resolve_audio ags_file_read_effect_bridge_list ags_file_write_effect_bridge_list ags_file_read_effect_bulk ags_file_write_effect_bulk ags_file_read_effect_bulk_list ags_file_write_effect_bulk_list ags_file_read_effect_bulk_resolve_audio ags_file_read_bulk_member ags_file_write_bulk_member ags_file_read_bulk_member_list ags_file_write_bulk_member_list ags_file_read_effect_pad ags_file_write_effect_pad ags_file_read_effect_pad_list ags_file_write_effect_pad_list ags_file_read_effect_line ags_file_write_effect_line ags_file_read_effect_line_list ags_file_write_effect_line_list ags_file_read_dialog ags_file_write_dialog ags_file_read_dialog_list ags_file_write_dialog_list ags_file_read_machine_editor ags_file_write_machine_editor ags_file_read_machine_editor_list ags_file_write_machine_editor_list ags_file_read_pad_editor ags_file_write_pad_editor ags_file_read_line_editor ags_file_write_line_editor ags_file_read_link_editor ags_file_write_link_editor ags_file_read_line_member_editor ags_file_write_line_member_editor ags_file_read_link_collection_editor ags_file_write_link_collection_editor ags_file_read_resize_editor ags_file_write_resize_editor ags_file_read_notation_editor ags_file_write_notation_editor ags_file_read_notation_toolbar ags_file_write_notation_toolbar ags_file_read_machine_selector ags_file_write_machine_selector ags_file_read_navigation ags_file_write_navigation ags_file_read_automation_window ags_file_write_automation_window ags_file_read_automation_window_list ags_file_write_automation_window_list ags_file_read_automation_editor ags_file_write_automation_editor ags_file_read_automation_editor_list ags_file_write_automation_editor_list ags_file_read_automation_toolbar ags_file_write_automation_toolbar ags_file_read_automation_toolbar_list ags_file_write_automation_toolbar_list ags_file_read_automation_edit ags_file_write_automation_edit ags_file_read_automation_edit_list ags_file_write_automation_edit_list
ags_gui_thread AgsGuiThread AGS_GUI_THREAD_RT_PRIORITY AGS_GUI_THREAD_DEFAULT_JIFFIE AGS_GUI_THREAD_SYNC_DELAY AGS_GUI_THREAD_SYNC_AVAILABLE_TIMEOUT AgsGuiThreadFlags ags_gui_thread_complete_task ags_gui_thread_do_poll_loop ags_gui_thread_run ags_gui_init ags_gui_thread_enter ags_gui_thread_leave ags_gui_thread_get_dispatch_mutex ags_gui_thread_show_file_error ags_gui_thread_launch ags_gui_thread_launch_filename ags_gui_thread_timer_start ags_gui_thread_timer_launch ags_gui_thread_timer_launch_filename ags_gui_thread_do_animation ags_gui_thread_do_run ags_gui_thread_schedule_task ags_gui_thread_schedule_task_list ags_gui_thread_new AGS_GUI_THREAD AGS_GUI_THREAD_CLASS AGS_GUI_THREAD_GET_CLASS AGS_IS_GUI_THREAD AGS_TYPE_GUI_THREAD AgsGuiThread AgsGuiThreadClass ags_gui_thread_get_type
ags_history_browser AgsHistoryBrowser AgsHistoryBrowserFlags ags_history_browser_new AGS_HISTORY_BROWSER AGS_HISTORY_BROWSER_CLASS AGS_HISTORY_BROWSER_GET_CLASS AGS_IS_HISTORY_BROWSER AGS_TYPE_HISTORY_BROWSER AgsHistoryBrowser AgsHistoryBrowserClass ags_history_browser_get_type
ags_history_browser_callbacks
ags_inline_player AgsInlinePlayer ags_inline_player_new AGS_INLINE_PLAYER AGS_INLINE_PLAYER_CLASS AGS_INLINE_PLAYER_GET_CLASS AGS_IS_INLINE_PLAYER AGS_TYPE_INLINE_PLAYER AgsInlinePlayer AgsInlinePlayerClass ags_inline_player_get_type
ags_inline_player_callbacks
ags_ladspa_bridge AgsLadspaBridge AGS_LADSPA_BRIDGE_DEFAULT_VERSION AGS_LADSPA_BRIDGE_DEFAULT_BUILD_ID AgsLadspaBridgeFlags ags_ladspa_bridge_load ags_ladspa_bridge_new AGS_IS_LADSPA_BRIDGE AGS_LADSPA_BRIDGE AGS_LADSPA_BRIDGE_CLASS AGS_LADSPA_BRIDGE_GET_CLASS AGS_TYPE_LADSPA_BRIDGE AgsLadspaBridge AgsLadspaBridgeClass ags_ladspa_bridge_get_type
ags_ladspa_bridge_callbacks ags_ladspa_bridge_parent_set_callback
ags_ladspa_browser AgsLadspaBrowser ags_ladspa_browser_get_plugin_filename ags_ladspa_browser_get_plugin_effect ags_ladspa_browser_combo_box_output_boolean_controls_new ags_ladspa_browser_combo_box_output_controls_new ags_ladspa_browser_combo_box_boolean_controls_new ags_ladspa_browser_combo_box_controls_new ags_ladspa_browser_preview_new ags_ladspa_browser_new AGS_IS_LADSPA_BROWSER AGS_LADSPA_BROWSER AGS_LADSPA_BROWSER_CLASS AGS_LADSPA_BROWSER_GET_CLASS AGS_TYPE_LADSPA_BROWSER AgsLadspaBrowser AgsLadspaBrowserClass ags_ladspa_browser_get_type
ags_ladspa_browser_callbacks ags_ladspa_browser_plugin_filename_callback ags_ladspa_browser_plugin_effect_callback
ags_level_callbacks ags_level_expose_event ags_level_configure_event
ags_line AgsLine AGS_LINE_DEFAULT_VERSION AGS_LINE_DEFAULT_BUILD_ID AGS_LINE_COLUMNS_COUNT AGS_LINE_SEPARATOR_FILENAME AGS_LINE_SEPARATOR_EFFECT AgsLineFlags ags_line_set_channel ags_line_group_changed ags_line_add_effect ags_line_remove_effect ags_line_map_recall ags_line_find_port ags_line_done ags_line_find_next_grouped ags_line_message_monitor_timeout ags_line_indicator_queue_draw_timeout ags_line_new AGS_IS_LINE AGS_LINE AGS_LINE_CLASS AGS_LINE_GET_CLASS AGS_TYPE_LINE AgsLine AgsLineClass ags_line_get_type
ags_line_callbacks ags_line_parent_set_callback ags_line_remove_recall_callback ags_line_group_clicked_callback ags_line_volume_callback ags_line_done_callback
ags_line_editor AgsLineEditor AGS_LINE_EDITOR_DEFAULT_VERSION AGS_LINE_EDITOR_DEFAULT_BUILD_ID AgsLineEditorFlags ags_line_editor_set_channel ags_line_editor_new AGS_IS_LINE_EDITOR AGS_LINE_EDITOR AGS_LINE_EDITOR_CLASS AGS_LINE_EDITOR_GET_CLASS AGS_TYPE_LINE_EDITOR AgsLineEditor AgsLineEditorClass ags_line_editor_get_type
ags_line_editor_callbacks ags_line_editor_parent_set_callback ags_line_editor_show_callback
ags_line_member AgsLineMember AGS_LINE_MEMBER_DEFAULT_VERSION AGS_LINE_MEMBER_DEFAULT_BUILD_ID Agslinememberflags AgsLineMemberPortFlags ags_line_member_get_widget ags_line_member_set_label ags_line_member_change_port ags_line_member_find_port ags_line_member_chained_event ags_line_member_new AGS_IS_LINE_MEMBER AGS_LINE_MEMBER AGS_LINE_MEMBER_CLASS AGS_LINE_MEMBER_GET_CLASS AGS_TYPE_LINE_MEMBER AgsLineMember AgsLineMemberClass ags_line_member_get_type
ags_line_member_callbacks ags_line_member_parent_set_callback ags_line_member_dial_changed_callback ags_line_member_vscale_changed_callback ags_line_member_hscale_changed_callback ags_line_member_spin_button_changed_callback ags_line_member_check_button_clicked_callback ags_line_member_toggle_button_clicked_callback ags_line_member_button_clicked_callback ags_line_member_port_safe_write_callback
ags_line_member_editor AgsLineMemberEditor AgsLineMemberEditorFlags ags_line_member_editor_new AGS_IS_LINE_MEMBER_EDITOR AGS_LINE_MEMBER_EDITOR AGS_LINE_MEMBER_EDITOR_CLASS AGS_LINE_MEMBER_EDITOR_GET_CLASS AGS_TYPE_LINE_MEMBER_EDITOR AgsLineMemberEditor AgsLineMemberEditorClass ags_line_member_editor_get_type
ags_line_member_editor_callbacks ags_line_member_editor_add_callback ags_line_member_editor_remove_callback ags_line_member_editor_plugin_browser_response_callback
ags_link_collection_editor AgsLinkCollectionEditor AgsLinkCollectionEditorFlags ags_link_collection_editor_check ags_link_collection_editor_check_first_line ags_link_collection_editor_check_first_link ags_link_collection_editor_check_count ags_link_collection_editor_new AGS_IS_LINK_COLLECTION_EDITOR AGS_LINK_COLLECTION_EDITOR AGS_LINK_COLLECTION_EDITOR_CLASS AGS_LINK_COLLECTION_EDITOR_GET_CLASS AGS_TYPE_LINK_COLLECTION_EDITOR AgsLinkCollectionEditor AgsLinkCollectionEditorClass ags_link_collection_editor_get_type
ags_link_collection_editor_callbacks ags_link_collection_editor_parent_set_callback ags_link_collection_editor_link_callback ags_link_collection_editor_first_line_callback ags_link_collection_editor_first_link_callback ags_link_collection_editor_count_callback
ags_link_editor AgsLinkEditor AgsLinkEditorFlags ags_link_editor_new AGS_IS_LINK_EDITOR AGS_LINK_EDITOR AGS_LINK_EDITOR_CLASS AGS_LINK_EDITOR_GET_CLASS AGS_TYPE_LINK_EDITOR AgsLinkEditor AgsLinkEditorClass ags_link_editor_get_type
ags_link_editor_callbacks ags_link_editor_parent_set_callback ags_link_editor_combo_callback
ags_listing_editor AgsListingEditor ags_listing_editor_add_children ags_listing_editor_new AGS_IS_LISTING_EDITOR AGS_LISTING_EDITOR AGS_LISTING_EDITOR_CLASS AGS_LISTING_EDITOR_GET_CLASS AGS_TYPE_LISTING_EDITOR AgsListingEditor AgsListingEditorClass ags_listing_editor_get_type
ags_listing_editor_callbacks ags_listing_editor_parent_set_callback ags_listing_editor_resize_pads_callback
ags_live_dssi_bridge AgsLiveDssiBridge AGS_LIVE_DSSI_BRIDGE_DEFAULT_VERSION AGS_LIVE_DSSI_BRIDGE_DEFAULT_BUILD_ID AgsLiveDssiBridgeFlags ags_live_dssi_bridge_input_map_recall ags_live_dssi_bridge_output_map_recall ags_live_dssi_bridge_load ags_live_dssi_bridge_new AGS_IS_LIVE_DSSI_BRIDGE AGS_LIVE_DSSI_BRIDGE AGS_LIVE_DSSI_BRIDGE_CLASS AGS_LIVE_DSSI_BRIDGE_GET_CLASS AGS_TYPE_LIVE_DSSI_BRIDGE AgsLiveDssiBridge AgsLiveDssiBridgeClass ags_live_dssi_bridge_get_type
ags_live_dssi_bridge_callbacks ags_live_dssi_bridge_program_changed_callback
ags_live_lv2_bridge AgsLiveLv2Bridge AGS_LIVE_LV2_BRIDGE_DEFAULT_VERSION AGS_LIVE_LV2_BRIDGE_DEFAULT_BUILD_ID AgsLiveLv2BridgeFlags ags_live_lv2_bridge_input_map_recall ags_live_lv2_bridge_output_map_recall ags_live_lv2_bridge_load_program ags_live_lv2_bridge_load_preset ags_live_lv2_bridge_load_midi ags_live_lv2_bridge_load_gui ags_live_lv2_bridge_load ags_live_lv2_bridge_lv2ui_idle_timeout ags_live_lv2_bridge_new AGS_IS_LIVE_LV2_BRIDGE AGS_LIVE_LV2_BRIDGE AGS_LIVE_LV2_BRIDGE_CLASS AGS_LIVE_LV2_BRIDGE_GET_CLASS AGS_TYPE_LIVE_LV2_BRIDGE AgsLiveLv2Bridge AgsLiveLv2BridgeClass ags_live_lv2_bridge_get_type
ags_live_lv2_bridge_callbacks ags_live_lv2_bridge_show_gui_callback ags_live_lv2_bridge_delete_event_callback ags_live_lv2_bridge_lv2ui_cleanup_function ags_live_lv2_bridge_lv2ui_write_function ags_live_lv2_bridge_program_changed_callback ags_live_lv2_bridge_preset_changed_callback
ags_lv2_bridge AgsLv2Bridge AGS_LV2_BRIDGE_DEFAULT_VERSION AGS_LV2_BRIDGE_DEFAULT_BUILD_ID AgsLv2BridgeFlags ags_lv2_bridge_input_map_recall ags_lv2_bridge_output_map_recall ags_lv2_bridge_load_program ags_lv2_bridge_load_preset ags_lv2_bridge_load_midi ags_lv2_bridge_load_gui ags_lv2_bridge_load ags_lv2_bridge_lv2ui_idle_timeout ags_lv2_bridge_new AGS_IS_LV2_BRIDGE AGS_LV2_BRIDGE AGS_LV2_BRIDGE_CLASS AGS_LV2_BRIDGE_GET_CLASS AGS_TYPE_LV2_BRIDGE AgsLv2Bridge AgsLv2BridgeClass ags_lv2_bridge_get_type
ags_lv2_bridge_callbacks ags_lv2_bridge_parent_set_callback ags_lv2_bridge_show_gui_callback ags_lv2_bridge_delete_event_callback ags_lv2_bridge_lv2ui_cleanup_function ags_lv2_bridge_lv2ui_write_function ags_lv2_bridge_program_changed_callback ags_lv2_bridge_preset_changed_callback ags_lv2_bridge_dial_changed_callback ags_lv2_bridge_vscale_changed_callback ags_lv2_bridge_hscale_changed_callback ags_lv2_bridge_spin_button_changed_callback ags_lv2_bridge_check_button_clicked_callback ags_lv2_bridge_toggle_button_clicked_callback ags_lv2_bridge_button_clicked_callback
ags_lv2_browser AgsLv2Browser ags_lv2_browser_get_plugin_filename ags_lv2_browser_get_plugin_effect ags_lv2_browser_combo_box_output_boolean_controls_new ags_lv2_browser_combo_box_output_controls_new ags_lv2_browser_combo_box_boolean_controls_new ags_lv2_browser_combo_box_controls_new ags_lv2_browser_preview_new ags_lv2_browser_new AGS_IS_LV2_BROWSER AGS_LV2_BROWSER AGS_LV2_BROWSER_CLASS AGS_LV2_BROWSER_GET_CLASS AGS_TYPE_LV2_BROWSER AgsLv2Browser AgsLv2BrowserClass ags_lv2_browser_get_type
ags_lv2_browser_callbacks ags_lv2_browser_plugin_filename_callback ags_lv2_browser_plugin_uri_callback
ags_machine AgsMachine AGS_MACHINE_AUTOMATION_PORT AGS_MACHINE_DEFAULT_VERSION AGS_MACHINE_DEFAULT_BUILD_ID AgsMachineFlags AgsMachineFileInputFlags AgsMachineMappingFlags AgsMachineEditOptions AgsMachineConnectionOptions AgsMachineAutomationPort ags_machine_automation_port_alloc ags_machine_automation_port_free ags_machine_automation_port_find_channel_type_with_control_name ags_machine_resize_audio_channels ags_machine_resize_pads ags_machine_map_recall ags_machine_find_port ags_machine_done ags_machine_add_default_recalls ags_machine_find_by_name ags_machine_set_run ags_machine_set_run_extended ags_machine_get_possible_links ags_machine_get_possible_audio_output_connections ags_machine_file_chooser_dialog_new ags_machine_open_files ags_machine_copy_pattern ags_machine_popup_add_edit_options ags_machine_popup_add_connection_options ags_machine_message_monitor_timeout ags_machine_new AGS_IS_MACHINE AGS_MACHINE AGS_MACHINE_CLASS AGS_MACHINE_GET_CLASS AGS_TYPE_MACHINE AgsMachine AgsMachineClass ags_machine_get_type
ags_machine_callbacks ags_machine_button_press_callback ags_machine_popup_move_up_activate_callback ags_machine_popup_move_down_activate_callback ags_machine_popup_hide_activate_callback ags_machine_popup_show_activate_callback ags_machine_popup_destroy_activate_callback ags_machine_popup_rename_activate_callback ags_machine_popup_properties_activate_callback ags_machine_popup_sticky_controls_toggled_callback ags_machine_popup_copy_pattern_callback ags_machine_popup_paste_pattern_callback ags_machine_popup_envelope_callback ags_machine_popup_connection_editor_callback ags_machine_popup_midi_dialog_callback ags_machine_open_response_callback ags_machine_play_callback ags_machine_resize_audio_channels_callback ags_machine_resize_pads_callback ags_machine_done_callback
ags_machine_collection AgsMachineCollection ags_machine_collection_reload ags_machine_collection_add_entry ags_machine_collection_new AGS_IS_MACHINE_COLLECTION AGS_MACHINE_COLLECTION AGS_MACHINE_COLLECTION_CLASS AGS_MACHINE_COLLECTION_GET_CLASS AGS_TYPE_MACHINE_COLLECTION AgsMachineCollection AgsMachineCollectionClass ags_machine_collection_get_type
ags_machine_collection_callbacks
ags_machine_collection_entry AgsMachineCollectionEntry ags_machine_collection_entry_new AGS_IS_MACHINE_COLLECTION_ENTRY AGS_MACHINE_COLLECTION_ENTRY AGS_MACHINE_COLLECTION_ENTRY_CLASS AGS_MACHINE_COLLECTION_ENTRY_GET_CLASS AGS_TYPE_MACHINE_COLLECTION_ENTRY AgsMachineCollectionEntry AgsMachineCollectionEntryClass ags_machine_collection_entry_get_type
ags_machine_collection_entry_callbacks
ags_machine_editor AgsMachineEditor AGS_MACHINE_EDITOR_DEFAULT_VERSION AGS_MACHINE_EDITOR_DEFAULT_BUILD_ID AgsMachineEditorFlags ags_machine_editor_add_children ags_machine_editor_set_machine ags_machine_editor_add_input ags_machine_editor_add_output ags_machine_editor_remove_input ags_machine_editor_remove_output ags_machine_editor_new AGS_IS_MACHINE_EDITOR AGS_MACHINE_EDITOR AGS_MACHINE_EDITOR_CLASS AGS_MACHINE_EDITOR_GET_CLASS AGS_TYPE_MACHINE_EDITOR AgsMachineEditor AgsMachineEditorClass ags_machine_editor_get_type
ags_machine_editor_callbacks ags_machine_editor_switch_page_callback ags_machine_editor_apply_callback ags_machine_editor_ok_callback ags_machine_editor_cancel_callback
ags_machine_radio_button AgsMachineRadioButton ags_machine_radio_button_new AGS_IS_MACHINE_RADIO_BUTTON AGS_MACHINE_RADIO_BUTTON AGS_MACHINE_RADIO_BUTTON_CLASS AGS_MACHINE_RADIO_BUTTON_GET_CLASS AGS_TYPE_MACHINE_RADIO_BUTTON AgsMachineRadioButton AgsMachineRadioButtonClass ags_machine_radio_button_get_type
ags_machine_radio_button_callbacks ags_machine_radio_button_notify_machine_name_callback
ags_machine_selection AgsMachineSelection AGS_MACHINE_SELECTION_INDEX AgsMachineSelectionFlags ags_machine_selection_load_defaults ags_machine_selection_new AGS_IS_MACHINE_SELECTION AGS_MACHINE_SELECTION AGS_MACHINE_SELECTION_CLASS AGS_MACHINE_SELECTION_GET_CLASS AGS_TYPE_MACHINE_SELECTION AgsMachineSelection AgsMachineSelectionClass ags_machine_selection_get_type
ags_machine_selector AgsMachineSelector AgsMachineSelectorFlags ags_machine_selector_add_index ags_machine_selector_remove_index ags_machine_selector_link_index ags_machine_selector_changed ags_machine_selector_popup_new ags_machine_selector_new AGS_IS_MACHINE_SELECTOR AGS_MACHINE_SELECTOR AGS_MACHINE_SELECTOR_CLASS AGS_MACHINE_SELECTOR_GET_CLASS AGS_TYPE_MACHINE_SELECTOR AgsMachineSelector AgsMachineSelectorClass ags_machine_selector_get_type
ags_machine_selector_callbacks ags_machine_selector_popup_add_tab_callback ags_machine_selector_popup_remove_tab_callback ags_machine_selector_popup_add_index_callback ags_machine_selector_popup_remove_index_callback ags_machine_selector_popup_link_index_callback ags_machine_selector_popup_reverse_mapping_callback ags_machine_selector_popup_shift_piano_callback ags_machine_selector_radio_changed
ags_matrix AgsMatrix ags_matrix_input_map_recall ags_matrix_output_map_recall ags_matrix_new AGS_IS_MATRIX AGS_MATRIX AGS_MATRIX_CLASS AGS_MATRIX_GET_CLASS AGS_TYPE_MATRIX AgsMatrix AgsMatrixClass ags_matrix_get_type
ags_matrix_bridge AgsMatrixBridge ags_matrix_bridge_new AGS_IS_MATRIX_BRIDGE AGS_MATRIX_BRIDGE AGS_MATRIX_BRIDGE_CLASS AGS_MATRIX_BRIDGE_GET_CLASS AGS_TYPE_MATRIX_BRIDGE AgsMatrixBridge AgsMatrixBridgeClass ags_matrix_bridge_get_type
ags_matrix_bridge_callbacks
ags_matrix_bulk_input AgsMatrixBulkInput ags_matrix_bulk_input_new AGS_IS_MATRIX_BULK_INPUT AGS_MATRIX_BULK_INPUT AGS_MATRIX_BULK_INPUT_CLASS AGS_MATRIX_BULK_INPUT_GET_CLASS AGS_TYPE_MATRIX_BULK_INPUT AgsMatrixBulkInput AgsMatrixBulkInputClass ags_matrix_bulk_input_get_type
ags_matrix_bulk_input_callbacks
ags_matrix_callbacks ags_matrix_parent_set_callback ags_matrix_index_callback ags_matrix_drawing_area_configure_callback ags_matrix_drawing_area_expose_callback ags_matrix_drawing_area_button_press_callback ags_matrix_adjustment_value_changed_callback ags_matrix_bpm_callback ags_matrix_length_spin_callback ags_matrix_loop_button_callback ags_matrix_done_callback
ags_menu_action_callbacks ags_menu_action_open_callback ags_menu_action_save_callback ags_menu_action_save_as_callback ags_menu_action_export_callback ags_menu_action_quit_callback ags_menu_action_add_callback ags_menu_action_add_panel_callback ags_menu_action_add_mixer_callback ags_menu_action_add_drum_callback ags_menu_action_add_matrix_callback ags_menu_action_add_synth_callback ags_menu_action_add_syncsynth_callback ags_menu_action_add_ffplayer_callback ags_menu_action_add_audiorec_callback ags_menu_action_add_ladspa_bridge_callback ags_menu_action_add_dssi_bridge_callback ags_menu_action_add_lv2_bridge_callback ags_menu_action_add_live_dssi_bridge_callback ags_menu_action_add_live_lv2_bridge_callback ags_menu_action_automation_callback ags_menu_action_wave_callback ags_menu_action_preferences_callback ags_menu_action_midi_import_callback ags_menu_action_midi_export_track_callback ags_menu_action_midi_playback_callback ags_menu_action_about_callback
ags_menu_bar AgsMenuBar AGS_MENU_ITEM_FILENAME_KEY AGS_MENU_ITEM_EFFECT_KEY ags_zoom_menu_new ags_tact_menu_new ags_zoom_combo_box_new ags_tact_combo_box_new ags_ladspa_bridge_menu_new ags_dssi_bridge_menu_new ags_lv2_bridge_menu_new ags_live_dssi_bridge_menu_new ags_live_lv2_bridge_menu_new ags_menu_bar_new AGS_IS_MENU_BAR AGS_MENU_BAR AGS_MENU_BAR_CLASS AGS_MENU_BAR_GET_CLASS AGS_TYPE_MENU_BAR AgsMenuBar AgsMenuBarClass ags_menu_bar_get_type
ags_midi_dialog AgsMidiDialog AGS_MIDI_DIALOG_DEFAULT_VERSION AGS_MIDI_DIALOG_DEFAULT_BUILD_ID AgsMidiDialogFlags ags_midi_dialog_load_sequencers ags_midi_dialog_new AGS_IS_MIDI_DIALOG AGS_MIDI_DIALOG AGS_MIDI_DIALOG_CLASS AGS_MIDI_DIALOG_GET_CLASS AGS_TYPE_MIDI_DIALOG AgsMidiDialog AgsMidiDialogClass ags_midi_dialog_get_type
ags_midi_dialog_callbacks ags_midi_dialog_apply_callback ags_midi_dialog_ok_callback ags_midi_dialog_cancel_callback ags_midi_dialog_delete_event
ags_midi_export_wizard AgsMidiExportWizard AGS_MIDI_EXPORT_WIZARD_DEFAULT_FILENAME AGS_MIDI_EXPORT_WIZARD_DEFAULT_TIMES AGS_MIDI_EXPORT_WIZARD_DEFAULT_CLICKS AGS_MIDI_EXPORT_WIZARD_DEFAULT_DIVISION AGS_MIDI_EXPORT_WIZARD_DEFAULT_PULSE_UNIT AgsMidiExportWizardFlags ags_midi_export_wizard_new AGS_IS_MIDI_EXPORT_WIZARD AGS_MIDI_EXPORT_WIZARD AGS_MIDI_EXPORT_WIZARD_CLASS AGS_MIDI_EXPORT_WIZARD_GET_CLASS AGS_TYPE_MIDI_EXPORT_WIZARD AgsMidiExportWizard AgsMidiExportWizardClass ags_midi_export_wizard_get_type
ags_midi_export_wizard_callbacks ags_midi_export_wizard_response_callback
ags_midi_import_wizard AgsMidiImportWizard AgsMidiImportWizardFlags ags_midi_import_wizard_new AGS_IS_MIDI_IMPORT_WIZARD AGS_MIDI_IMPORT_WIZARD AGS_MIDI_IMPORT_WIZARD_CLASS AGS_MIDI_IMPORT_WIZARD_GET_CLASS AGS_TYPE_MIDI_IMPORT_WIZARD AgsMidiImportWizard AgsMidiImportWizardClass ags_midi_import_wizard_get_type
ags_midi_import_wizard_callbacks ags_midi_import_wizard_response_callback
ags_midi_preferences AgsMidiPreferences AgsMidiPreferencesFlags ags_midi_preferences_new AGS_IS_MIDI_PREFERENCES AGS_MIDI_PREFERENCES AGS_MIDI_PREFERENCES_CLASS AGS_MIDI_PREFERENCES_GET_CLASS AGS_TYPE_MIDI_PREFERENCES AgsMidiPreferences AgsMidiPreferencesClass ags_midi_preferences_get_type
ags_midi_preferences_callbacks ags_midi_preferences_parent_set_callback ags_midi_preferences_add_callback ags_midi_preferences_remove_sequencer_editor_callback
ags_mixer AgsMixer ags_mixer_new AGS_IS_MIXER AGS_MIXER AGS_MIXER_CLASS AGS_MIXER_GET_CLASS AGS_TYPE_MIXER AgsMixer AgsMixerClass ags_mixer_get_type
ags_mixer_callbacks ags_mixer_parent_set_callback
ags_mixer_input_line AgsMixerInputLine ags_mixer_input_line_new AGS_IS_MIXER_INPUT_LINE AGS_MIXER_INPUT_LINE AGS_MIXER_INPUT_LINE_CLASS AGS_MIXER_INPUT_LINE_GET_CLASS AGS_TYPE_MIXER_INPUT_LINE AgsMixerInputLine AgsMixerInputLineClass ags_mixer_input_line_get_type
ags_mixer_input_pad AgsMixerInputPad ags_mixer_input_pad_new AGS_IS_MIXER_INPUT_PAD AGS_MIXER_INPUT_PAD AGS_MIXER_INPUT_PAD_CLASS AGS_MIXER_INPUT_PAD_GET_CLASS AGS_TYPE_MIXER_INPUT_PAD AgsMixerInputPad AgsMixerInputPadClass ags_mixer_input_pad_get_type
ags_move_note_dialog AgsMoveNoteDialog AGS_MOVE_NOTE_DIALOG_MAX_X AGS_MOVE_NOTE_DIALOG_MAX_Y AgsMoveNoteDialogFlags ags_move_note_dialog_new AGS_IS_MOVE_NOTE_DIALOG AGS_MOVE_NOTE_DIALOG AGS_MOVE_NOTE_DIALOG_CLASS AGS_MOVE_NOTE_DIALOG_GET_CLASS AGS_TYPE_MOVE_NOTE_DIALOG AgsMoveNoteDialog AgsMoveNoteDialogClass ags_move_note_dialog_get_type
ags_move_note_dialog_callbacks ags_move_note_dialog_response_callback ags_move_note_dialog_relative_callback ags_move_note_dialog_absolute_callback
ags_navigation AgsNavigation AGS_NAVIGATION_DEFAULT_TACT_STEP AGS_NAVIGATION_SEEK_STEPS AGS_NAVIGATION_REWIND_STEPS AgsNavigationFlags ags_navigation_tact_to_time_string ags_navigation_relative_tact_to_time_string ags_navigation_absolute_tact_to_time_string ags_navigation_update_time_string ags_navigation_set_seeking_sensitive ags_navigation_change_position ags_navigation_duration_time_queue_draw ags_navigation_new AGS_IS_NAVIGATION AGS_NAVIGATION AGS_NAVIGATION_CLASS AGS_NAVIGATION_GET_CLASS AGS_TYPE_NAVIGATION AgsNavigation AgsNavigationClass ags_navigation_get_type
ags_navigation_callbacks ags_navigation_parent_set_callback ags_navigation_expander_callback ags_navigation_bpm_callback ags_navigation_rewind_callback ags_navigation_prev_callback ags_navigation_play_callback ags_navigation_stop_callback ags_navigation_next_callback ags_navigation_forward_callback ags_navigation_loop_callback ags_navigation_position_tact_callback ags_navigation_duration_tact_callback ags_navigation_loop_left_tact_callback ags_navigation_loop_right_tact_callback ags_navigation_raster_callback ags_navigation_soundcard_stop_callback
ags_notation_edit AgsNotationEdit AGS_NOTATION_EDIT_DEFAULT_CONTROL_WIDTH AGS_NOTATION_EDIT_DEFAULT_CONTROL_HEIGHT AGS_NOTATION_EDIT_DEFAULT_CONTROL_MARGIN_X AGS_NOTATION_EDIT_DEFAULT_CONTROL_MARGIN_Y AGS_NOTATION_EDIT_DEFAULT_CURSOR_POSITION_X AGS_NOTATION_EDIT_DEFAULT_CURSOR_POSITION_Y AGS_NOTATION_EDIT_DEFAULT_FADER_WIDTH AGS_NOTATION_EDIT_MIN_ZOOM AGS_NOTATION_EDIT_MAX_ZOOM AGS_NOTATION_EDIT_MAX_ZOOM_CONTROL_WIDTH AgsNotationEditFlags AgsNotationEditMode AgsNotationEditButtonMask AgsNotationEditKeyMask ags_notation_edit_reset_vscrollbar ags_notation_edit_reset_hscrollbar ags_notation_edit_draw_segment ags_notation_edit_draw_position ags_notation_edit_draw_cursor ags_notation_edit_draw_selection ags_notation_edit_draw_note ags_notation_edit_draw_notation ags_notation_edit_draw ags_notation_edit_new AGS_IS_NOTATION_EDIT AGS_NOTATION_EDIT AGS_NOTATION_EDIT_CLASS AGS_NOTATION_EDIT_GET_CLASS AGS_TYPE_NOTATION_EDIT AgsNotationEdit AgsNotationEditClass ags_notation_edit_get_type
ags_notation_edit_callbacks ags_notation_edit_drawing_area_expose_event ags_notation_edit_drawing_area_configure_event ags_notation_edit_drawing_area_button_press_event ags_notation_edit_drawing_area_button_release_event ags_notation_edit_drawing_area_motion_notify_event ags_notation_edit_drawing_area_key_press_event ags_notation_edit_drawing_area_key_release_event ags_notation_edit_vscrollbar_value_changed ags_notation_edit_hscrollbar_value_changed
ags_notation_editor AgsNotationEditor AGS_NOTATION_EDITOR_DEFAULT_VERSION AGS_NOTATION_EDITOR_DEFAULT_BUILD_ID AGS_NOTATION_EDITOR_MAX_CONTROLS AgsNotationEditorFlags ags_notation_editor_machine_changed ags_notation_editor_add_note ags_notation_editor_delete_note ags_notation_editor_select_region ags_notation_editor_do_feedback ags_notation_editor_select_all ags_notation_editor_paste ags_notation_editor_copy ags_notation_editor_cut ags_notation_editor_invert ags_notation_editor_new AGS_IS_NOTATION_EDITOR AGS_NOTATION_EDITOR AGS_NOTATION_EDITOR_CLASS AGS_NOTATION_EDITOR_GET_CLASS AGS_TYPE_NOTATION_EDITOR AgsNotationEditor AgsNotationEditorClass ags_notation_editor_get_type
ags_notation_editor_callbacks ags_notation_editor_machine_changed_callback ags_notation_editor_resize_audio_channels_callback ags_notation_editor_resize_pads_callback ags_notation_editor_init_channel_launch_callback
ags_notation_toolbar AgsNotationToolbar AgsNotationToolbarFlags ags_notation_toolbar_tool_popup_new ags_notation_toolbar_new AGS_IS_NOTATION_TOOLBAR AGS_NOTATION_TOOLBAR AGS_NOTATION_TOOLBAR_CLASS AGS_NOTATION_TOOLBAR_GET_CLASS AGS_TYPE_NOTATION_TOOLBAR AgsNotationToolbar AgsNotationToolbarClass ags_notation_toolbar_get_type
ags_notation_toolbar_callbacks ags_notation_toolbar_position_callback ags_notation_toolbar_edit_callback ags_notation_toolbar_clear_callback ags_notation_toolbar_select_callback ags_notation_toolbar_copy_or_cut_callback ags_notation_toolbar_paste_callback ags_notation_toolbar_invert_callback ags_notation_toolbar_match_audio_channel_callback ags_notation_toolbar_no_duplicates_callback ags_notation_toolbar_tool_popup_move_note_callback ags_notation_toolbar_tool_popup_crop_note_callback ags_notation_toolbar_tool_popup_select_note_callback ags_notation_toolbar_tool_popup_position_cursor_callback ags_notation_toolbar_zoom_callback ags_notation_toolbar_mode_callback
ags_oscillator AgsOscillator AGS_OSCILLATOR_DEFAULT_FRAME_COUNT AGS_OSCILLATOR_DEFAULT_SYNC_POINT_COUNT AgsOscillatorFlags ags_file_read_oscillator ags_file_write_oscillator ags_oscillator_control_changed ags_oscillator_new AGS_IS_OSCILLATOR AGS_OSCILLATOR AGS_OSCILLATOR_CLASS AGS_OSCILLATOR_GET_CLASS AGS_TYPE_OSCILLATOR AgsOscillator AgsOscillatorClass ags_oscillator_get_type
ags_oscillator_callbacks ags_oscillator_wave_callback ags_oscillator_attack_callback ags_oscillator_frame_count_callback ags_oscillator_frequency_callback ags_oscillator_phase_callback ags_oscillator_volume_callback ags_oscillator_sync_point_callback
ags_output_collection_editor AgsOutputCollectionEditor ags_output_collection_editor_check ags_output_collection_editor_new AGS_IS_OUTPUT_COLLECTION_EDITOR AGS_OUTPUT_COLLECTION_EDITOR AGS_OUTPUT_COLLECTION_EDITOR_CLASS AGS_OUTPUT_COLLECTION_EDITOR_GET_CLASS AGS_TYPE_OUTPUT_COLLECTION_EDITOR AgsOutputCollectionEditor AgsOutputCollectionEditorClass ags_output_collection_editor_get_type
ags_output_collection_editor_callbacks ags_output_collection_editor_parent_set_callback ags_output_collection_editor_soundcard_callback
ags_output_editor AgsOutputEditor AGS_OUTPUT_EDITOR_DEFAULT_VERSION AGS_OUTPUT_EDITOR_DEFAULT_BUILD_ID AgsOutputEditorFlags ags_output_editor_check ags_output_editor_new AGS_IS_OUTPUT_EDITOR AGS_OUTPUT_EDITOR AGS_OUTPUT_EDITOR_CLASS AGS_OUTPUT_EDITOR_GET_CLASS AGS_TYPE_OUTPUT_EDITOR AgsOutputEditor AgsOutputEditorClass ags_output_editor_get_type
ags_output_editor_callbacks ags_output_editor_parent_set_callback ags_output_editor_soundcard_callback
ags_output_listing_editor AgsOutputListingEditor ags_output_listing_editor_add_children ags_output_listing_editor_new AGS_IS_OUTPUT_LISTING_EDITOR AGS_OUTPUT_LISTING_EDITOR AGS_OUTPUT_LISTING_EDITOR_CLASS AGS_OUTPUT_LISTING_EDITOR_GET_CLASS AGS_TYPE_OUTPUT_LISTING_EDITOR AgsOutputListingEditor AgsOutputListingEditorClass ags_output_listing_editor_get_type
ags_output_listing_editor_callbacks ags_output_listing_editor_parent_set_callback ags_output_listing_editor_resize_pads_callback
ags_pad AgsPad AGS_PAD_DEFAULT_VERSION AGS_PAD_DEFAULT_BUILD_ID AgsPadFlags ags_pad_set_channel ags_pad_resize_lines ags_pad_map_recall ags_pad_find_port ags_pad_play ags_pad_new AGS_IS_PAD AGS_PAD AGS_PAD_CLASS AGS_PAD_GET_CLASS AGS_TYPE_PAD AgsPad AgsPadClass ags_pad_get_type
ags_pad_callbacks ags_pad_group_clicked_callback ags_pad_mute_clicked_callback ags_pad_solo_clicked_callback ags_pad_init_channel_launch_callback
ags_pad_editor AgsPadEditor AGS_PAD_EDITOR_DEFAULT_VERSION AGS_PAD_EDITOR_DEFAULT_BUILD_ID AgsPadEditorFlags ags_pad_editor_set_channel ags_pad_editor_new AGS_IS_PAD_EDITOR AGS_PAD_EDITOR AGS_PAD_EDITOR_CLASS AGS_PAD_EDITOR_GET_CLASS AGS_TYPE_PAD_EDITOR AgsPadEditor AgsPadEditorClass ags_pad_editor_get_type
ags_pad_editor_callbacks ags_pad_editor_parent_set_callback ags_pad_editor_resize_audio_channels_callback
ags_panel AgsPanel ags_panel_new AGS_IS_PANEL AGS_PANEL AGS_PANEL_CLASS AGS_PANEL_GET_CLASS AGS_TYPE_PANEL AgsPanel AgsPanelClass ags_panel_get_type
ags_panel_callbacks ags_panel_parent_set_callback
ags_panel_input_line AgsPanelInputLine ags_panel_input_line_message_monitor_timeout ags_panel_input_line_new AGS_IS_PANEL_INPUT_LINE AGS_PANEL_INPUT_LINE AGS_PANEL_INPUT_LINE_CLASS AGS_PANEL_INPUT_LINE_GET_CLASS AGS_TYPE_PANEL_INPUT_LINE AgsPanelInputLine AgsPanelInputLineClass ags_panel_input_line_get_type
ags_panel_input_line_callbacks
ags_panel_input_pad AgsPanelInputPad ags_panel_input_pad_new AGS_IS_PANEL_INPUT_PAD AGS_PANEL_INPUT_PAD AGS_PANEL_INPUT_PAD_CLASS AGS_PANEL_INPUT_PAD_GET_CLASS AGS_TYPE_PANEL_INPUT_PAD AgsPanelInputPad AgsPanelInputPadClass ags_panel_input_pad_get_type
ags_pattern_box AgsPatternBox AGS_PATTERN_BOX_DEFAULT_PAD_WIDTH AGS_PATTERN_BOX_DEFAULT_PAD_HEIGHT AGS_PATTERN_BOX_LED_DEFAULT_WIDTH AGS_PATTERN_BOX_LED_DEFAULT_HEIGHT AGS_PATTERN_BOX_N_CONTROLS AGS_PATTERN_BOX_N_INDICES AgsPatternBoxFlags AgsPatternBoxKeyMask AgsPatternBoxAction ags_pattern_box_led_queue_draw_timeout ags_pattern_box_set_pattern ags_pattern_box_new AGS_IS_PATTERN_BOX AGS_PATTERN_BOX AGS_PATTERN_BOX_CLASS AGS_PATTERN_BOX_GET_CLASS AGS_TYPE_PATTERN_BOX AgsPatternBox AgsPatternBoxClass ags_pattern_box_get_type
ags_pattern_box_callbacks ags_pattern_box_focus_in_callback ags_pattern_box_focus_out_callback ags_pattern_box_key_press_event ags_pattern_box_key_release_event ags_pattern_box_pad_callback ags_pattern_box_offset_callback
ags_pattern_envelope AgsPatternEnvelope AGS_PATTERN_ENVELOPE_DEFAULT_VERSION AGS_PATTERN_ENVELOPE_DEFAULT_BUILD_ID AgsPatternEnvelopeFlags AgsPatternEnvelopeColumn ags_pattern_envelope_set_preset_property ags_pattern_envelope_get_active_preset ags_pattern_envelope_load_preset ags_pattern_envelope_add_preset ags_pattern_envelope_remove_preset ags_pattern_envelope_reset_control ags_pattern_envelope_reset_tree_view ags_pattern_envelope_plot ags_pattern_envelope_new AGS_IS_PATTERN_ENVELOPE AGS_PATTERN_ENVELOPE AGS_PATTERN_ENVELOPE_CLASS AGS_PATTERN_ENVELOPE_GET_CLASS AGS_TYPE_PATTERN_ENVELOPE AgsPatternEnvelope AgsPatternEnvelopeClass ags_pattern_envelope_get_type
ags_pattern_envelope_callbacks ags_pattern_envelope_edit_callback ags_pattern_envelope_plot_callback ags_pattern_envelope_audio_channel_start_callback ags_pattern_envelope_audio_channel_end_callback ags_pattern_envelope_pad_start_callback ags_pattern_envelope_pad_end_callback ags_pattern_envelope_x_start_callback ags_pattern_envelope_x_end_callback ags_pattern_envelope_attack_x_callback ags_pattern_envelope_attack_y_callback ags_pattern_envelope_decay_x_callback ags_pattern_envelope_decay_y_callback ags_pattern_envelope_sustain_x_callback ags_pattern_envelope_sustain_y_callback ags_pattern_envelope_release_x_callback ags_pattern_envelope_release_y_callback ags_pattern_envelope_ratio_callback ags_pattern_envelope_preset_move_up_callback ags_pattern_envelope_preset_move_down_callback ags_pattern_envelope_preset_add_callback ags_pattern_envelope_preset_remove_callback ags_pattern_envelope_preset_rename_response_callback
ags_performance_preferences AgsPerformancePreferences AgsPerformancePreferencesFlags ags_performance_preferences_new AGS_IS_PERFORMANCE_PREFERENCES AGS_PERFORMANCE_PREFERENCES AGS_PERFORMANCE_PREFERENCES_CLASS AGS_PERFORMANCE_PREFERENCES_GET_CLASS AGS_TYPE_PERFORMANCE_PREFERENCES AgsPerformancePreferences AgsPerformancePreferencesClass ags_performance_preferences_get_type
ags_performance_preferences_callbacks ags_performance_preferences_max_precision_callback
ags_playback_window AgsPlaybackWindow AgsPlaybackWindowFlags ags_playback_window_new AGS_IS_PLAYBACK_WINDOW AGS_PLAYBACK_WINDOW AGS_PLAYBACK_WINDOW_CLASS AGS_PLAYBACK_WINDOW_GET_CLASS AGS_TYPE_PLAYBACK_WINDOW AgsPlaybackWindow AgsPlaybackWindowClass ags_playback_window_get_type
ags_playback_window_callbacks
ags_plugin_browser AgsPluginBrowser AgsPluginBrowserFlags ags_plugin_browser_get_plugin_filename ags_plugin_browser_get_plugin_effect ags_plugin_browser_new AGS_IS_PLUGIN_BROWSER AGS_PLUGIN_BROWSER AGS_PLUGIN_BROWSER_CLASS AGS_PLUGIN_BROWSER_GET_CLASS AGS_TYPE_PLUGIN_BROWSER AgsPluginBrowser AgsPluginBrowserClass ags_plugin_browser_get_type
ags_plugin_browser_callbacks ags_plugin_browser_plugin_type_changed_callback ags_plugin_browser_ok_callback ags_plugin_browser_cancel_callback
ags_plugin_preferences AgsPluginPreferences AgsLadspaPluginPreferences ags_ladspa_plugin_preferences_alloc ags_plugin_preferences_new AGS_IS_PLUGIN_PREFERENCES AGS_PLUGIN_PREFERENCES AGS_PLUGIN_PREFERENCES_CLASS AGS_PLUGIN_PREFERENCES_GET_CLASS AGS_TYPE_PLUGIN_PREFERENCES AgsPluginPreferences AgsPluginPreferencesClass ags_plugin_preferences_get_type
ags_plugin_preferences_callbacks
ags_position_automation_cursor_dialog AgsPositionAutomationCursorDialog AGS_POSITION_AUTOMATION_CURSOR_MAX_BEATS AgsPositionAutomationCursorDialogFlags ags_position_automation_cursor_dialog_new AGS_IS_POSITION_AUTOMATION_CURSOR_DIALOG AGS_POSITION_AUTOMATION_CURSOR_DIALOG AGS_POSITION_AUTOMATION_CURSOR_DIALOG_CLASS AGS_POSITION_AUTOMATION_CURSOR_DIALOG_GET_CLASS AGS_TYPE_POSITION_AUTOMATION_CURSOR_DIALOG AgsPositionAutomationCursorDialog AgsPositionAutomationCursorDialogClass ags_position_automation_cursor_dialog_get_type
ags_position_automation_cursor_dialog_callbacks ags_position_automation_cursor_dialog_response_callback
ags_position_notation_cursor_dialog AgsPositionNotationCursorDialog AGS_POSITION_NOTATION_CURSOR_MAX_BEATS AGS_POSITION_NOTATION_CURSOR_MAX_KEYS AgsPositionNotationCursorDialogFlags ags_position_notation_cursor_dialog_new AGS_IS_POSITION_NOTATION_CURSOR_DIALOG AGS_POSITION_NOTATION_CURSOR_DIALOG AGS_POSITION_NOTATION_CURSOR_DIALOG_CLASS AGS_POSITION_NOTATION_CURSOR_DIALOG_GET_CLASS AGS_TYPE_POSITION_NOTATION_CURSOR_DIALOG AgsPositionNotationCursorDialog AgsPositionNotationCursorDialogClass ags_position_notation_cursor_dialog_get_type
ags_position_notation_cursor_dialog_callbacks ags_position_notation_cursor_dialog_response_callback
ags_preferences AgsPreferences AGS_PREFERENCES_DEFAULT_FILENAME AgsPreferencesFlags ags_preferences_new AGS_IS_PREFERENCES AGS_PREFERENCES AGS_PREFERENCES_CLASS AGS_PREFERENCES_GET_CLASS AGS_TYPE_PREFERENCES AgsPreferences AgsPreferencesClass ags_preferences_get_type
ags_preferences_callbacks ags_preferences_response_callback ags_preferences_notebook_switch_page_callback
ags_property_collection_editor AgsPropertyCollectionEditor ags_property_collection_editor_new AGS_IS_PROPERTY_COLLECTION_EDITOR AGS_PROPERTY_COLLECTION_EDITOR AGS_PROPERTY_COLLECTION_EDITOR_CLASS AGS_PROPERTY_COLLECTION_EDITOR_GET_CLASS AGS_TYPE_PROPERTY_COLLECTION_EDITOR AgsPropertyCollectionEditor AgsPropertyCollectionEditorClass ags_property_collection_editor_get_type
ags_property_collection_editor_callbacks ags_property_collection_editor_add_collection_callback ags_property_collection_editor_remove_collection_callback
ags_property_editor AgsPropertyEditor AgsPropertyEditorFlags ags_property_editor_new AGS_IS_PROPERTY_EDITOR AGS_PROPERTY_EDITOR AGS_PROPERTY_EDITOR_CLASS AGS_PROPERTY_EDITOR_GET_CLASS AGS_TYPE_PROPERTY_EDITOR AgsPropertyEditor AgsPropertyEditorClass ags_property_editor_get_type
ags_property_editor_callbacks ags_property_editor_enable_callback
ags_property_listing_editor AgsPropertyListingEditor ags_property_listing_editor_new AGS_IS_PROPERTY_LISTING_EDITOR AGS_PROPERTY_LISTING_EDITOR AGS_PROPERTY_LISTING_EDITOR_CLASS AGS_PROPERTY_LISTING_EDITOR_GET_CLASS AGS_TYPE_PROPERTY_LISTING_EDITOR AgsPropertyListingEditor AgsPropertyListingEditorClass ags_property_listing_editor_get_type
ags_ramp_acceleration_dialog AgsRampAccelerationDialog AGS_RAMP_ACCELERATION AGS_RAMP_ACCELERATION_MAX_BEATS AGS_RAMP_ACCELERATION_MAX_STEPS AGS_RAMP_ACCELERATION_DEFAULT_WIDTH AgsRampAccelerationDialogFlags ags_ramp_acceleration_dialog_new AgsRampAutomation AGS_IS_RAMP_ACCELERATION_DIALOG AGS_RAMP_ACCELERATION_DIALOG AGS_RAMP_ACCELERATION_DIALOG_CLASS AGS_RAMP_ACCELERATION_DIALOG_GET_CLASS AGS_TYPE_RAMP_ACCELERATION_DIALOG AgsRampAccelerationDialog AgsRampAccelerationDialogClass ags_ramp_acceleration_dialog_get_type
ags_ramp_acceleration_dialog_callbacks ags_ramp_acceleration_dialog_response_callback ags_ramp_acceleration_dialog_port_callback ags_ramp_acceleration_dialog_machine_changed_callback
ags_remove_sequencer_editor_jack AgsRemoveSequencerEditorJack ags_remove_sequencer_editor_jack_new AGS_IS_REMOVE_SEQUENCER_EDITOR_JACK AGS_REMOVE_SEQUENCER_EDITOR_JACK AGS_REMOVE_SEQUENCER_EDITOR_JACK_CLASS AGS_REMOVE_SEQUENCER_EDITOR_JACK_GET_CLASS AGS_TYPE_REMOVE_SEQUENCER_EDITOR_JACK AgsRemoveSequencerEditorJack AgsRemoveSequencerEditorJackClass ags_remove_sequencer_editor_jack_get_type
ags_remove_soundcard_editor_sink AgsRemoveSoundcardEditorSink ags_remove_soundcard_editor_sink_new AGS_IS_REMOVE_SOUNDCARD_EDITOR_SINK AGS_REMOVE_SOUNDCARD_EDITOR_SINK AGS_REMOVE_SOUNDCARD_EDITOR_SINK_CLASS AGS_REMOVE_SOUNDCARD_EDITOR_SINK_GET_CLASS AGS_TYPE_REMOVE_SOUNDCARD_EDITOR_SINK AgsRemoveSoundcardEditorSink AgsRemoveSoundcardEditorSinkClass ags_remove_soundcard_editor_sink_get_type
ags_resize_editor AgsResizeEditor ags_resize_editor_new AGS_IS_RESIZE_EDITOR AGS_RESIZE_EDITOR AGS_RESIZE_EDITOR_CLASS AGS_RESIZE_EDITOR_GET_CLASS AGS_TYPE_RESIZE_EDITOR AgsResizeEditor AgsResizeEditorClass
ags_scrolled_automation_edit_box AgsScrolledAutomationEditBox ags_scrolled_automation_edit_box_new AGS_IS_SCROLLED_AUTOMATION_EDIT_BOX AGS_SCROLLED_AUTOMATION_EDIT_BOX AGS_SCROLLED_AUTOMATION_EDIT_BOX_CLASS AGS_SCROLLED_AUTOMATION_EDIT_BOX_GET_CLASS AGS_TYPE_SCROLLED_AUTOMATION_EDIT_BOX AgsScrolledAutomationEditBox AgsScrolledAutomationEditBoxClass ags_scrolled_automation_edit_box_get_type
ags_scrolled_wave_edit_box AgsScrolledWaveEditBox ags_scrolled_wave_edit_box_new AGS_IS_SCROLLED_WAVE_EDIT_BOX AGS_SCROLLED_WAVE_EDIT_BOX AGS_SCROLLED_WAVE_EDIT_BOX_CLASS AGS_SCROLLED_WAVE_EDIT_BOX_GET_CLASS AGS_TYPE_SCROLLED_WAVE_EDIT_BOX AgsScrolledWaveEditBox AgsScrolledWaveEditBoxClass ags_scrolled_wave_edit_box_get_type
ags_select_acceleration_dialog AgsSelectAccelerationDialog AGS_SELECT_ACCELERATION AGS_SELECT_ACCELERATION_MAX_BEATS AGS_SELECT_ACCELERATION_DEFAULT_WIDTH AgsSelectAccelerationDialogFlags ags_select_acceleration_dialog_new AgsSelectAutomation AGS_IS_SELECT_ACCELERATION_DIALOG AGS_SELECT_ACCELERATION_DIALOG AGS_SELECT_ACCELERATION_DIALOG_CLASS AGS_SELECT_ACCELERATION_DIALOG_GET_CLASS AGS_TYPE_SELECT_ACCELERATION_DIALOG AgsSelectAccelerationDialog AgsSelectAccelerationDialogClass ags_select_acceleration_dialog_get_type
ags_select_acceleration_dialog_callbacks ags_select_acceleration_dialog_response_callback ags_select_acceleration_dialog_add_callback ags_select_acceleration_dialog_remove_callback ags_select_acceleration_dialog_machine_changed_callback
ags_select_note_dialog AgsSelectNoteDialog AGS_SELECT_NOTE_MAX_BEATS AGS_SELECT_NOTE_MAX_KEYS AgsSelectNoteDialogFlags ags_select_note_dialog_new AGS_IS_SELECT_NOTE_DIALOG AGS_SELECT_NOTE_DIALOG AGS_SELECT_NOTE_DIALOG_CLASS AGS_SELECT_NOTE_DIALOG_GET_CLASS AGS_TYPE_SELECT_NOTE_DIALOG AgsSelectNoteDialog AgsSelectNoteDialogClass ags_select_note_dialog_get_type
ags_select_note_dialog_callbacks ags_select_note_dialog_response_callback
ags_sequencer_editor AgsSequencerEditor AgsSequencerEditorFlags ags_sequencer_editor_add_jack ags_sequencer_editor_remove_jack ags_sequencer_editor_add_sequencer ags_sequencer_editor_remove_sequencer ags_sequencer_editor_load_jack_card ags_sequencer_editor_load_alsa_card ags_sequencer_editor_load_oss_card ags_sequencer_editor_new AGS_IS_SEQUENCER_EDITOR AGS_SEQUENCER_EDITOR AGS_SEQUENCER_EDITOR_CLASS AGS_SEQUENCER_EDITOR_GET_CLASS AGS_TYPE_SEQUENCER_EDITOR AgsSequencerEditor AgsSequencerEditorClass ags_sequencer_editor_get_type
ags_sequencer_editor_callbacks ags_sequencer_editor_backend_changed_callback ags_sequencer_editor_card_changed_callback ags_sequencer_editor_add_jack_callback ags_sequencer_editor_remove_jack_callback
ags_server_preferences AgsServerPreferences ags_server_preferences_new AGS_IS_SERVER_PREFERENCES AGS_SERVER_PREFERENCES AGS_SERVER_PREFERENCES_CLASS AGS_SERVER_PREFERENCES_GET_CLASS AGS_TYPE_SERVER_PREFERENCES AgsServerPreferences AgsServerPreferencesClass ags_server_preferences_get_type
ags_server_preferences_callbacks
ags_sf2_chooser AgsSF2Chooser ags_sf2_chooser_open ags_sf2_chooser_completed ags_sf2_chooser_remove_all_from_combo ags_sf2_chooser_new AGS_IS_SF2_CHOOSER AGS_SF2_CHOOSER AGS_SF2_CHOOSER_CLASS AGS_SF2_CHOOSER_GET_CLASS AGS_TYPE_SF2_CHOOSER AgsSF2Chooser AgsSF2ChooserClass ags_sf2_chooser_get_type
ags_sf2_chooser_callbacks ags_sf2_chooser_preset_changed ags_sf2_chooser_instrument_changed ags_sf2_chooser_sample_changed
ags_simple_autosave_thread AgsSimpleAutosaveThread AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_JIFFIE AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_DELAY AGS_SIMPLE_AUTOSAVE_THREAD_DEFAULT_FILENAME ags_simple_autosave_thread_new AGS_IS_SIMPLE_AUTOSAVE_THREAD AGS_SIMPLE_AUTOSAVE_THREAD AGS_SIMPLE_AUTOSAVE_THREAD_CLASS AGS_SIMPLE_AUTOSAVE_THREAD_GET_CLASS AGS_TYPE_SIMPLE_AUTOSAVE_THREAD AgsSimpleAutosaveThread AgsSimpleAutosaveThreadClass ags_simple_autosave_thread_get_type
ags_simple_file AgsSimpleFile AGS_SIMPLE_FILE_DEFAULT_ENCODING AGS_SIMPLE_FILE_DEFAULT_DTD AGS_SIMPLE_FILE_CHECKSUM_LENGTH AGS_SIMPLE_FILE_DEFAULT_AUDIO_FORMAT AGS_SIMPLE_FILE_DEFAULT_AUDIO_ENCODING AgsSimpleFileFlags AGS_SIMPLE_FILE_ERROR AgsSimpleFileError ags_simple_file_str2md5 ags_simple_file_add_id_ref ags_simple_file_find_id_ref_by_node ags_simple_file_find_id_ref_by_xpath ags_simple_file_find_id_ref_by_reference ags_simple_file_add_lookup ags_simple_file_add_launch ags_simple_file_open ags_simple_file_open_from_data ags_simple_file_rw_open ags_simple_file_open_filename ags_simple_file_close ags_simple_file_write ags_simple_file_write_resolve ags_simple_file_read ags_simple_file_read_resolve ags_simple_file_read_start ags_simple_file_new AGS_IS_SIMPLE_FILE AGS_SIMPLE_FILE AGS_SIMPLE_FILE_CLASS AGS_SIMPLE_FILE_GET_CLASS AGS_TYPE_SIMPLE_FILE AgsSimpleFile AgsSimpleFileClass ags_simple_file_get_type
ags_simple_file_read AgsSimpleFileRead ags_simple_file_read_new AGS_IS_SIMPLE_FILE_READ AGS_SIMPLE_FILE_READ AGS_SIMPLE_FILE_READ_CLASS AGS_SIMPLE_FILE_READ_GET_CLASS AGS_TYPE_SIMPLE_FILE_READ AgsSimpleFileRead AgsSimpleFileReadClass ags_simple_file_read_get_type
ags_simple_file_write AgsSimpleFileWrite ags_simple_file_write_new AGS_IS_SIMPLE_FILE_WRITE AGS_SIMPLE_FILE_WRITE AGS_SIMPLE_FILE_WRITE_CLASS AGS_SIMPLE_FILE_WRITE_GET_CLASS AGS_TYPE_SIMPLE_FILE_WRITE AgsSimpleFileWrite AgsSimpleFileWriteClass ags_simple_file_write_get_type
ags_soundcard_editor AgsSoundcardEditor AgsSoundcardEditorFlags ags_soundcard_editor_add_sink ags_soundcard_editor_remove_sink ags_soundcard_editor_add_soundcard ags_soundcard_editor_remove_soundcard ags_soundcard_editor_load_core_audio_card ags_soundcard_editor_load_pulse_card ags_soundcard_editor_load_jack_card ags_soundcard_editor_load_alsa_card ags_soundcard_editor_load_oss_card ags_soundcard_editor_new AGS_IS_SOUNDCARD_EDITOR AGS_SOUNDCARD_EDITOR AGS_SOUNDCARD_EDITOR_CLASS AGS_SOUNDCARD_EDITOR_GET_CLASS AGS_TYPE_SOUNDCARD_EDITOR AgsSoundcardEditor AgsSoundcardEditorClass ags_soundcard_editor_get_type
ags_soundcard_editor_callbacks ags_soundcard_editor_backend_changed_callback ags_soundcard_editor_card_changed_callback ags_soundcard_editor_add_sink_callback ags_soundcard_editor_remove_sink_callback ags_soundcard_editor_audio_channels_changed_callback ags_soundcard_editor_samplerate_changed_callback ags_soundcard_editor_buffer_size_changed_callback ags_soundcard_editor_format_changed_callback
ags_syncsynth AgsSyncsynth AGS_SYNCSYNTH_BASE_NOTE_MAX AGS_SYNCSYNTH_BASE_NOTE_MIN AgsSyncsynthFlags ags_syncsynth_add_oscillator ags_syncsynth_remove_oscillator ags_syncsynth_reset_loop ags_syncsynth_update ags_syncsynth_new AGS_IS_SYNCSYNTH AGS_SYNCSYNTH AGS_SYNCSYNTH_CLASS AGS_SYNCSYNTH_GET_CLASS AGS_TYPE_SYNCSYNTH AgsSyncsynth AgsSyncsynthClass ags_syncsynth_get_type
ags_syncsynth_callbacks ags_syncsynth_parent_set_callback ags_syncsynth_auto_update_callback ags_syncsynth_update_callback ags_syncsynth_add_callback ags_syncsynth_remove_callback ags_syncsynth_oscillator_control_changed_callback
ags_synth AgsSynth AGS_SYNTH_BASE_NOTE_MAX AGS_SYNTH_BASE_NOTE_MIN AgsSynthFlags ags_synth_update ags_synth_new AGS_IS_SYNTH AGS_SYNTH AGS_SYNTH_CLASS AGS_SYNTH_GET_CLASS AGS_TYPE_SYNTH AgsSynth AgsSynthClass ags_synth_get_type
ags_synth_callbacks ags_synth_parent_set_callback ags_synth_lower_callback ags_synth_auto_update_callback ags_synth_update_callback
ags_synth_input_line AgsSynthInputLine ags_synth_input_line_new AGS_IS_SYNTH_INPUT_LINE AGS_SYNTH_INPUT_LINE AGS_SYNTH_INPUT_LINE_CLASS AGS_SYNTH_INPUT_LINE_GET_CLASS AGS_TYPE_SYNTH_INPUT_LINE AgsSynthInputLine AgsSynthInputLineClass ags_synth_input_line_get_type
ags_synth_input_line_callbacks ags_synth_input_line_oscillator_control_changed_callback
ags_synth_input_pad AgsSynthInputPad ags_synth_input_pad_new AGS_IS_SYNTH_INPUT_PAD AGS_SYNTH_INPUT_PAD AGS_SYNTH_INPUT_PAD_CLASS AGS_SYNTH_INPUT_PAD_GET_CLASS AGS_TYPE_SYNTH_INPUT_PAD AgsSynthInputPad AgsSynthInputPadClass ags_synth_input_pad_get_type
ags_toggle_led AgsToggleLed ags_toggle_led_new AGS_IS_TOGGLE_LED AGS_TOGGLE_LED AGS_TOGGLE_LED_CLASS AGS_TOGGLE_LED_GET_CLASS AGS_TYPE_TOGGLE_LED AgsToggleLed AgsToggleLedClass ags_toggle_led_get_type
ags_track_collection AgsTrackCollection ags_track_collection_parse ags_track_collection_add_mapper ags_track_collection_new AGS_IS_TRACK_COLLECTION AGS_TRACK_COLLECTION AGS_TRACK_COLLECTION_CLASS AGS_TRACK_COLLECTION_GET_CLASS AGS_TYPE_TRACK_COLLECTION AgsTrackCollection AgsTrackCollectionClass ags_track_collection_get_type
ags_track_collection_callbacks
ags_track_collection_mapper AgsTrackCollectionMapper AGS_TRACK_COLLECTION_MAPPER_DEFAULT_BEATS AGS_MIDI_DEFAULT_BEATS ags_track_collection_mapper_find_instrument_with_sequence ags_track_collection_mapper_map ags_track_collection_mapper_new AGS_IS_TRACK_COLLECTION_MAPPER AGS_TRACK_COLLECTION_MAPPER AGS_TRACK_COLLECTION_MAPPER_CLASS AGS_TRACK_COLLECTION_MAPPER_GET_CLASS AGS_TYPE_TRACK_COLLECTION_MAPPER AgsTrackCollectionMapper AgsTrackCollectionMapperClass ags_track_collection_mapper_get_type
ags_track_collection_mapper_callbacks
ags_ui_provider AgsUiProvider ags_ui_provider_get_window ags_ui_provider_set_window ags_ui_provider_get_gui_thread ags_ui_provider_set_gui_thread ags_ui_provider_get_show_animation ags_ui_provider_set_show_animation ags_ui_provider_get_gui_ready ags_ui_provider_set_gui_ready AGS_IS_UI_PROVIDER AGS_IS_UI_PROVIDER_INTERFACE AGS_TYPE_UI_PROVIDER AGS_UI_PROVIDER AGS_UI_PROVIDER_GET_INTERFACE AGS_UI_PROVIDER_INTERFACE AgsUiProvider AgsUiProviderInterface ags_ui_provider_get_type
ags_update_bulk_member AgsUpdateBulkMember ags_update_bulk_member_new AGS_IS_UPDATE_BULK_MEMBER AGS_TYPE_UPDATE_BULK_MEMBER AGS_UPDATE_BULK_MEMBER AGS_UPDATE_BULK_MEMBER_CLASS AGS_UPDATE_BULK_MEMBER_GET_CLASS AgsUpdateBulkMember AgsUpdateBulkMemberClass ags_update_bulk_member_get_type
ags_vautomation_edit_box AgsVAutomationEditBox ags_vautomation_edit_box_new AGS_IS_VAUTOMATION_EDIT_BOX AGS_TYPE_VAUTOMATION_EDIT_BOX AGS_VAUTOMATION_EDIT_BOX AGS_VAUTOMATION_EDIT_BOX_CLASS AGS_VAUTOMATION_EDIT_BOX_GET_CLASS AgsVAutomationEditBox AgsVAutomationEditBoxClass ags_vautomation_edit_box_get_type
ags_vwave_edit_box AgsVWaveEditBox ags_vwave_edit_box_new AGS_IS_VWAVE_EDIT_BOX AGS_TYPE_VWAVE_EDIT_BOX AGS_VWAVE_EDIT_BOX AGS_VWAVE_EDIT_BOX_CLASS AGS_VWAVE_EDIT_BOX_GET_CLASS AgsVWaveEditBox AgsVWaveEditBoxClass ags_vwave_edit_box_get_type
ags_wave_edit AgsWaveEdit AGS_WAVE_EDIT_DEFAULT_HEIGHT AGS_WAVE_EDIT_DEFAULT_WIDTH AGS_WAVE_EDIT_DEFAULT_CONTROL_WIDTH AGS_WAVE_EDIT_DEFAULT_CONTROL_HEIGHT AGS_WAVE_EDIT_DEFAULT_STEP_COUNT AGS_WAVE_EDIT_DEFAULT_CURSOR_POSITION_X AGS_WAVE_EDIT_DEFAULT_CURSOR_POSITION_Y AGS_WAVE_EDIT_DEFAULT_FADER_WIDTH AGS_WAVE_EDIT_CURSOR_WIDTH AGS_WAVE_EDIT_CURSOR_HEIGHT AGS_WAVE_EDIT_MIN_ZOOM AGS_WAVE_EDIT_MAX_ZOOM AGS_WAVE_EDIT_DEFAULT_LOWER AGS_WAVE_EDIT_DEFAULT_UPPER AGS_WAVE_EDIT_DEFAULT_VALUE AGS_WAVE_EDIT_DEFAULT_PADDING AgsWaveEditFlags AgsWaveEditMode AgsWaveEditKeyMask ags_wave_edit_new AGS_IS_WAVE_EDIT AGS_TYPE_WAVE_EDIT AGS_WAVE_EDIT AGS_WAVE_EDIT_CLASS AGS_WAVE_EDIT_GET_CLASS AgsWaveEdit AgsWaveEditClass ags_wave_edit_get_type
ags_wave_edit_box AgsWaveEditBox AGS_WAVE_EDIT_BOX_DEFAULT_FIXED_EDIT_HEIGHT AgsWaveEditBoxFlags ags_wave_edit_box_new AGS_IS_WAVE_EDIT_BOX AGS_TYPE_WAVE_EDIT_BOX AGS_WAVE_EDIT_BOX AGS_WAVE_EDIT_BOX_CLASS AGS_WAVE_EDIT_BOX_GET_CLASS AgsWaveEditBox AgsWaveEditBoxClass ags_wave_edit_box_get_type
ags_wave_edit_callbacks
ags_wave_editor AgsWaveEditor AGS_WAVE_EDITOR_MAX_VALUE_COUNT AGS_WAVE_EDITOR_MAX_CONTROLS AGS_WAVE_EDITOR_DEFAULT_VERSION AGS_WAVE_EDITOR_DEFAULT_BUILD_ID AgsWaveEditorFlags ags_wave_editor_reset_audio_scrollbar ags_wave_editor_reset_output_scrollbar ags_wave_editor_reset_input_scrollbar ags_wave_editor_machine_changed ags_wave_editor_select_region ags_wave_editor_select_all ags_wave_editor_paste ags_wave_editor_copy ags_wave_editor_cut ags_wave_editor_invert ags_wave_editor_new AGS_IS_WAVE_EDITOR AGS_TYPE_WAVE_EDITOR AGS_WAVE_EDITOR AGS_WAVE_EDITOR_CLASS AGS_WAVE_EDITOR_GET_CLASS AgsWaveEditor AgsWaveEditorClass ags_wave_editor_get_type
ags_wave_editor_callbacks ags_wave_editor_parent_set_callback ags_wave_editor_machine_changed_callback
ags_wave_toolbar AgsWaveToolbar AgsWaveToolbarFlags ags_wave_toolbar_tool_popup_new ags_wave_toolbar_new AGS_IS_WAVE_TOOLBAR AGS_TYPE_WAVE_TOOLBAR AGS_WAVE_TOOLBAR AGS_WAVE_TOOLBAR_CLASS AGS_WAVE_TOOLBAR_GET_CLASS AgsWaveToolbar AgsWaveToolbarClass ags_wave_toolbar_get_type
ags_wave_toolbar_callbacks ags_wave_toolbar_tool_popup_select_audio_data_callback ags_wave_toolbar_tool_popup_position_cursor_callback
ags_wave_window AgsWaveWindow AgsWaveWindowFlags ags_wave_window_new AGS_IS_WAVE_WINDOW AGS_TYPE_WAVE_WINDOW AGS_WAVE_WINDOW AGS_WAVE_WINDOW_CLASS AGS_WAVE_WINDOW_GET_CLASS AgsWaveWindow AgsWaveWindowClass ags_wave_window_get_type
ags_wave_window_callbacks
ags_window AgsWindow AGS_MACHINE_COUNTER AgsWindowFlags AgsMachineCounter ags_window_standard_machine_counter_alloc ags_window_find_machine_counter ags_window_increment_machine_counter ags_window_decrement_machine_counter ags_machine_counter_alloc ags_window_show_error ags_window_load_file_timeout ags_window_new AGS_IS_WINDOW AGS_TYPE_WINDOW AGS_WINDOW AGS_WINDOW_CLASS AGS_WINDOW_GET_CLASS AgsWindow AgsWindowClass ags_window_get_type
ags_window_callbacks ags_window_delete_event_callback ags_window_button_press_event
ags_xorg_application_context AgsXorgApplicationContext AGS_XORG_VERSION AGS_XORG_BUILD_ID AgsXorgApplicationContextFlags ags_xorg_application_context_new AGS_IS_XORG_APPLICATION_CONTEXT AGS_TYPE_XORG_APPLICATION_CONTEXT AGS_XORG_APPLICATION_CONTEXT AGS_XORG_APPLICATION_CONTEXT_CLASS AGS_XORG_APPLICATION_CONTEXT_GET_CLASS AgsXorgApplicationContext AgsXorgApplicationContextClass ags_xorg_application_context_get_type
gsequencer-1.4.24/docs/appa.xml0000644000175000017500000006711513246707333013301 00000000000000 GNU Free Documentation License Version 1.3, 3 November 2008 Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document “free” in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”. Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text. The “publisher” means any person or entity that distributes copies of the Document to the public. A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. State on the Title page the name of the publisher of the Modified Version, as the publisher. Preserve all the copyright notices of the Document. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice. Include an unaltered copy of this License. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles. You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties — for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements”. 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See Copyleft. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site. “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. “Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright © 2013 Joël Krähemann Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with… Texts.” line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. gsequencer-1.4.24/docs/usersBook/0000755000175000017500000000000013256233676013665 500000000000000gsequencer-1.4.24/docs/usersBook/chap3.xml0000644000175000017500000003440013246707333015321 00000000000000 ]> Editor 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. Linking Before you might perform any task with the editor you have to link engines by adding an index. Then you should link it with an engine. That can all be done by using the menu button of the index list. The corresponding editor appears as you click appropriate link. Toolbar The editor's toolbar screenshot In the table below are the various buttons explained you may use for editing. AGS editor toolbar controls table. icon action description cursor You may want to set the cursor to paste notes at the position where it is located. notes Add notes by clicking within the piano roll and move to till them having the wished duration. delete Delete notes by clicking on the note you don't want anymore. select Select notes to copy or cut them. copy Copy notes to the clipboard. cut Cut notes to the clipboard. paste Paste the previously copied or cutted notes at the cursor position or just insert them where they are/were located. invert Invert entire notation in conjunction with reverse mapping or MIDI import.
Editing tools The tools menu button contains items that opens dialogs to do common editing tasks. Like move, crop or select notes. Move notes The move note dialog screenshot The move notes dialog allows you to move selected notes to a given position. AGS move note dialog controls. control description relative Radio button to choose relative positioning. The x- and y-offset are going to be added to current selections insets. absolute Radio button to choose absolute positioning. The x- and y-offset are goint to be added to most upper-left position x = 0 and y = 0. x The x-offset to position the selected notes. y The y-offset to position the selected notes.
Crop notes The crop note dialog screenshot The crop notes dialog allows you to crop selected notes to a specified width or insert desired padding. Per default the values are added or subtracted of each note and doesn't require any additional space. AGS crop note dialog controls. control description absolute Modify behavior of crop, if checked it does use crop note control as absolute value, rather than add/subtract the value of current insets. in-place Radio button to specify that all crop happens in-place i.e. no additional space is used. do resize Radio button to specify that all crop adds some extra space i.e. the padding is increased as well. crop note Set the crop note value to resize the selected notes. This may be a relative or absolute value. padding Set the padding per tic to use.
Select notes The select note dialog screenshot The select note dialog allows you to select notes of given position and region. AGS select note dialog controls. control description copy selection Check button to say if you would like to copy selection to clipboard. select x0 Set the x0 offset of region to select. select y0 Set the y0 offset of region to select. select x1 Set the x1 offset of region to select. select y1 Set the y1 offset of region to select.
Pattern edit The pattern edit widget is available as linking an editor index with a pattern sequencer e.g. drum or matrix. Left, Left-Arrow Move within notation left, as there is a pattern you get an audible feedback. Right, Right-Arrow Move within notation right, audible feedback as above. Up, Up-Arrow Move within notation up, audible feedback as above. Down, Down-Arrow Move within notation down, audible feedback as above. Space Add audio pattern and give audible feedback. Delete Remove audio pattern and give audible feedback. Ctrl+c Copy the selected pattern to clipboard. Ctrl+x Cut the selected pattern to clipboard. Ctrl+v Paste pattern from clipboard. Ctrl+a Select all. Ctrl+i Invert all. Tab Leave notation focus. Note edit The note edit widget is available as linking an editor index with a notes sequencer e.g. Soundfont2 file player. Left, Left-Arrow Move within notation left, as there is a note you get an audible feedback. Right, Right-Arrow Move within notation right, audible feedback as above. Up, Up-Arrow Move within notation up, audible feedback as above. Down, Down-Arrow Move within notation down, audible feedback as above. Space Add audio notes and give audible feedback. Delete Remove audio notes and give audible feedback. Ctrl+c Copy the selected notes to clipboard. Ctrl+x Cut the selected notes to clipboard. Ctrl+v Paste notes from clipboard. Ctrl+a Select all. Ctrl+i Invert all. Tab Leave notation focus.
gsequencer-1.4.24/docs/usersBook/chap5.xml0000644000175000017500000001762613246707333015336 00000000000000 ]> The automation window The automation window screenshot showing drum The automation window is accessed by edit menu item automation. There are basic edit tools available to do your automation. You can use keyboard bindings to do your tasks are select appropriate edit tool of toolbar. As the appropriate port is checked it enables the automation of it. Else it is by-passed and won't see any automation data. By enabling a port it gets visible within the editor. Position cursor. Use arrow keys. Page-Up and Page-Down switches the automation area. Add automation point applied horizontally by time and vertically as value. Add by enter space. Delete automation point. Use delete key. Select automation. Alternatively do select all, note selects everything visible within scope tab. Copy automation. Control-C key-stroke. Cut automation. Control-X key-stroke. Paste automation. Control-V key-stroke. Adjust zoom by combo-box and add/remove automation area to editor by combo-box selection. Automation toolbar The automation editor's toolbar screenshot In the table below are the various buttons explained you may use for editing. AGS automation editor toolbar controls table. icon action description cursor You may want to set the cursor to paste accelerations at the position where it is located. accelerations Add accelerations by clicking within the automation area. delete Delete accelerations by clicking on the acceleration you don't want anymore. select Select accelerations to copy or cut them. copy Copy accelerations to the clipboard. cut Cut accelerations to the clipboard. paste Paste the previously copied or cutted accelerations at the cursor position or just insert them where they are/were located.
Editing tools The tools menu button contains items that opens dialogs to do common editing tasks. Like move, crop or select accelerations. Select accelerations The select acceleration dialog screenshot The select acceleration dialog allows you to select accelerations of given position and selected controls. AGS select acceleration dialog controls. control description copy selection Check button to say if you would like to copy selection to clipboard. add/remove Add/remove controls to enable/disable for selecting automation area. select x0 Set the x0 offset of region to select. select x1 Set the x1 offset of region to select.
Ramp accelerations The ramp acceleration dialog screenshot The ramp acceleration dialog allows you to ramp accelerations to a specified value using given number of steps. AGS ramp acceleration dialog controls. control description ramp control Select the control to ramp. ramp x0 The x0-offset to start ramp from. ramp y0 The y0-value to use as first value. ramp x1 The x1-offset to stop ramp to. ramp y1 The y1-value to use as last value. step count The number of steps to use to ramp value y0 to y1 from offset x0 to x1.
gsequencer-1.4.24/docs/usersBook/preface.xml0000644000175000017500000000347713246707333015742 00000000000000 ]> Foreword When I started to use GNU/Linux in 2001 I missed only one thing. A sequencer with a nice GUI. There was already rosegarden available. But who didn't get stuck of midi setup, yet? The time before I was using free software and became an affiliate to its community I was using &win98; on my father's desktop computer and did my first steps in &java2;. My very first own Notebook was a &n160; and it's preinstalled &win98; had to vanish because I became a fellow of &stallman;. Soon, I begun to code and older I became my demands to ags increased. I developed the concept of the underlying audio library myself as not graduated college student. October 2005, I decided to reimplement &ags; from scratch in order to get rid of inherited burden. And it was one big development process until I was almost satisfied with it's design. There was a time in 2007 where I even wanted to replace GObject and Gtk+ dependencies with my own libraries I begun to develop. I'm glad of didn't doing so. Thank you! gsequencer-1.4.24/docs/usersBook/appb.xml0000644000175000017500000000116113246707333015243 00000000000000 Resources gsequencer-1.4.24/docs/usersBook/chap4.xml0000644000175000017500000001011013246707333015312 00000000000000 ]> The navigation The navigation screenshot With the navigation you have overall control of your song. Settings you perform here may influence the behaviour of AGS. There's a duration label doing a time approximation. It is really unreliable and may differ about 30 seconds after 3 minutes of playback. Note with higher frequency of the audio related threads it may differ less. An other factor is bpm what has an influence, as well. BPM The beats per minute (BPM for short) indicates the velocity of a song being played. To adjust the BPM of the project in-/decrement the spinner labeled with bpm. To edit patterns or notes at a more granular rate select the wished tact within the appropriate engine or editor. To calculate timings you divide 1 minute with the entered BPM and divide it with basic. For example you have a BPM rate of 120 and a 4/4 tact you would calculate the timing as follow: t = 1 / 120 * (1 / 4) Playback controls With these controls you can play/stop a song or seek to the wished position. AGS playback controls table icon action description backward Seeking back until it's pressed again. previous Seeking back until it's not pressed anymore. play Starts the engines and the piano roll. stop Stops the engines and the piano roll. next Seeking forward until it's not pressed anymore. forward Seeking forward until it's pressed again.
The loop checkbox enables the loop L and loop R settings below. It causes the notation to loop playback. Auto-Scroll checkbox animates the horizontal scrollbars to follow playback position. Use exclude sequencers checkbox to enable/disable pattern based sequencers.
gsequencer-1.4.24/docs/usersBook/chap2.xml0000644000175000017500000004407013246707333015324 00000000000000 Engines You can add engines by activating the appropriate menu item within the "add" submenu of the "edit" menu item. You may change the properties of an engine by opening the properties dialog from the context menu at the top of each machine within vertical order. From the context menu you may perform some other tasks, as well. The edit submenu is only available by sequencers like AgsDrum and AgsMatrix. To move up or down an engine open context menu and activate "up" respectively "down" entry. To show or hide an engine open context menu and activate "show" respectively "hide" entry. Note the engines won't be hidden entirely they are just collapsed. To rename an engine open context menu and activate "rename" entry. To remove an engine open context menu and activate "destroy" entry. To open properties dialog open context menu and activate "properties" entry. There you might link, resize or asign LADSPA effects to channels. NOTE for LADSPA sink or generators aren't supported, yet. To change multiple grouped controls at once check sticky controls. Edit gives you editing options. Copy pattern does convert your pattern bitmap into a pattern based notation suitable to paste in notation editor. Machine properties Within properties dialog you can link lines either in single channel or in bulk mode, add effects and adjust audio-channels/pads. Output tab The machine properties dialog screenshot - output tab The output tab lets you mainly perform linking lines and adding effects to them. For each line there's a combo box listing available linking engines, on the right of it there is a spin button let you choose the input line to be linked. As you have added a plugin by clicking add and selected appropriate effect by using plugin browser dialog. You may remove it by clicking checkbox of the listed plugin and finally click remove. Note you can have a effect only once per channel. Input tab The machine properties dialog screenshot - input tab The input tab does the mainly same as output tab in view of input lines. If supported you might assign files, too. In general you connect output to input. Link input tab The machine properties dialog screenshot - link input tab Do linking in batch mode. This means you're able to assign multiple lines at once. Thus you have to decide what start channel on each side to use and the count of lines to be linked. Resize channels tab The machine properties dialog screenshot - resize tab Adjust audio channels or input/output pads. If supported the GUI may provide more lines and pads as increasing the amount. LADSPA browser dialog The LADSPA browser dialog screenshot The plugin browser gives you choice of available LADSPA or Lv2 plugins. It lets you modify the controls to be used. The added plugin can be removed by activating checkbox in output/input tab and clicking remove. Audio connection dialog The audio connection dialog allows you to specify to what soundcard to output. This can be modified either by assigning single channels or in bulk mode. Audio connection output line The audio connection output line screenshot Select the desired soundcard and don't forget to click enable. In order apply your modifications. After click OK. Audio connection output bulk The audio connection output bulk screenshot The output connection tab allows you to link a bunch of channel at once. Envelope dialog The envelope dialog allows you to display and display envlope information assigned either as preset or to a specific note. Envelope editor The envelope dialog's editor tab screenshot Modify or create presets and apply it to selected notes. Envelope info The envelope dialog's info tab screenshot Show envelope information of selected notes. Envelope pattern The envelope dialog's pattern tab screenshot Modify and create pattern related envelope presets. MIDI dialog The MIDI dialog screenshot The MIDI dialog allows you to select the MIDI sequencer to assign of the current machine. You might want to perform start and end key. Further you can adjust the start and end channel. Panel The panel screenshot The panel is used for outputting to your soundcard and should be at topmost of your audio processing tree. It contains per audio channel a mute check box. Due the synchroneous nature of the output engine you're just able to adjust the audio channels. The output pads aren't visible and the ones available for input are packed vertically. Mixer The mixer screenshot Bundle audio lines with the mixer and perform toplevel stream manipulation. It contains per audio channel a volume indicator and may contain LADSPA or Lv2 plugins. Due the limitation of recycling it is just able to handle multiple input lines and only one output pad. Whereas the output is hidden. They are locate just below the machine's menu tool button. Drum The drum screenshot Produce an audio stream by defining a pattern. The drum supports opening audio files and associate to its input. You might doing it by open button located preceeding to pattern box. Thus multi-selection of files is supported and assigning can be controlled by the controls just above the action widgets. The drum input pad contains an open button, too. It assigns available audio channels of the file to the grouped lines. One more way to assign audio files is doing it so by link editor of machine's property dialog. The drum may contain LADSPA plugins, too. The drum may contain multiple input as well output pads. They are packed on top of the composite widget, just below the machine's menu tool button. The input is packed horizontally followed by vertically packed output. The edit button within every input pad enables it as current input for editing pattern data. Further you may de-/activate the group toggle button to control audio channel assignment. Next to the multi-selection enable open button there's a loop check-box followed by the run button what starts the drum sequencer. It follows the into a two dimensional matrix packed pattern banks. Labeled from 1 to 12 and an the combined index labeled a throughout d. The length spin-button controls the number of pattern pads to be played in sequence which may be looped. The pattern box As entering to pattern box with focus the only way to get out of it is by tabulator key. With arrow keys you may navigate within pattern or toggle with space. Left, Left-Arrow Move within pattern box left, as the pattern pad control is activate you get an audible feedback. Right, Right-Arrow Move within pattern box right, audible feedback as above. Up, Up-Arrow Decrease pattern box offset about available number of pattern pads, audible feedback as above. Down, Down-Arrow Increase pattern box offset about available number of pattern pads, audible feedback as above. Space Toggle audio pattern and give audible feedback. Ctrl+c Copy the current pattern to clipboard Tab Leave pattern box focus. Matrix The matrix screenshot Produce an audio stream by defining a pattern. The matrix itselves doesn't have any audio signals on its own input you may rather link it to a synth engine. The matrix is a rectangular area you may navigate within by arrow keys or toggle pattern by hiting space. The matrix is a true mono device but you may emulate multiple channels by doing multi-output. This is fulfilled by adjusting output pads within machine's properties dialog. Run button comes first and is followed by a one dimensional vector bank index labeled from 1 to 9. Then follows the matrix you have to leave it by hiting tab then you might modify sequence length or do loop control of the sequence. Left, Left-Arrow Move within matrix left, as the pattern pad control is activate you get an audible feedback. Right, Right-Arrow Move within matrix right, audible feedback as above. Up, Up-Arrow Decrease matrix offset about available number of pattern pads, audible feedback as above. Down, Down-Arrow Increase matrix offset about available number of pattern pads, audible feedback as above. Space Toggle audio pattern and give audible feedback. Ctrl+c Copy the current pattern to clipboard Tab Leave matrix focus. Synth The synth screenshot Produce audio data using its oscillators. The count of oscillators depends on number of input lines. They are adjusted vertically. You have on the right the option to auto-update changes you do with the controls or do it manually by the update button. Warning: There are some disabled controls. Syncsynth The synced synth screenshot Produce audio data using its oscillators. The count of oscillators can be adjusted by clicking add/remove. You have on the right the option to auto-update changes you do with the controls or do it manually by the update button. Loop start and loop end allows you to specify what region of the audio data shall be looped in order to get the desired note length. FFPlayer The ffplayer screenshot Produce audio data by opening Soundfont2 audio file container format. There three available controls, preset and instrument to navigate within container format and a open button to read Soundfont2 files and assign the selected instrument to the input. The ffplayer contains recently the bridge widget. You can add plugins in bulk mode by click Add or Remove within AgsFFPlayer's bridge, what you can collapse/expand. To add an effect to a line, you have open as usual input/output of machine properties. gsequencer-1.4.24/docs/usersBook/chap1.xml0000644000175000017500000002371013246707333015321 00000000000000 ]> The menubar Within the menubar you may do basic tasks like open/close files. In this section we cover briefly the the different entries. The menus have mnemonics e.g. press ALT and F key in order to open File menu. File The file menu lets you do maintenance related to files or quit application. Note there was a simple XML file format introduced in 0.7.x to speed up things. The advanced file format needs optimization work to fulfill. The file format can be modified by configuration file located in your home directory $(HOME)/.gsequencer/ags.conf. The simple file interface is defaulted and can be altered by section generic and simple-file key set to false. Open - open an &ags; XML file. Uses per configuration the simple XML Input/Ouput interface. Save - save your current work. Uses per configuration the simple XML Input/Ouput interface. Save as - save your current work as a different filename. Uses per configuration the simple XML Input/Ouput interface. Export - export to PCM audio file. Quit - leave &ags;. Export to PCM audio file The export window screenshot This shows you the export dialog. Exclude sequencers affect mainly AgsDrum and AgsMatrix pattern sequencers to be started to output. You may select filename to export to and duration of the exported track. BPM adjustment is take from the navigation. Basically &ags; exports what you hear of the speakers. With the export toggle button you can start exporting to PCM audio file or stop it at an arbitrary time. Edit The edit menu lets you add audio machines of the related submenu, open automation window or preferences dialog. Add - select of different machines. You might want to add the bridged machines of plugins like LADSPA, DSSI or Lv2. Instrument plugins are available within notation editor. Panel - acts as your default sink. Mixer - enables you to bundle your different output engines. Drum - is used to do pattern editing using PCM audio files. Matrix - is used to pattern editing, intended to be linked against Synth. Synth - is a software synthesizer supporting variable oscillator count. FFPlayer - may be used to open Soundfont2 audio file container format in order to do notation. Preferences - open preferences dialog. Preferences dialog Within preferences dialog you may choose between different topics. For each one one tab. The configuration is applied in place after click Apply or OK. There is no need to restart the application. Generic The preferences dialog screenshot - generic tab The autosave thread option enables auto-saving to $HOME/.gsequencer directory. Segmentation is used as a delay factor, you can do tactation with it. Audio The preferences dialog screenshot - audio tab Sound card is your physical devices to do playback. Audio channels specifies the audio channels to allocate for output device. Samplerate affects the entire project. Your audio files have to be at very same rate further your device has to support the given rate. Like buffer size this affects the thread's related to audio processing their frequencies. Note a too low frequency may cause unexpected behavior like no proper velocity. Buffer size is used for all audio buffers. Your soundcard has to support the passed buffer size. This preference affects thread's frequencies. Format determines the storage size of one frame. All available formats are signed integers. The following sizes in bits are available: 8, 16, 24, 32 and 64. Your hardware has a need to support the format in order to get sounds. MIDI The preferences dialog screenshot - midi tab You can add MIDI sequencers to the configured project. These are intended to connect by the MIDI dialog, later. There is a combo box availabe to choose your backend like ALSA, OSS or JACK. The second combo box lets you choose the device. The JACK backend allows you to add MIDI ports. Performance The preferences dialog screenshot - performance tab Auto-sense on stream is required for certain plugins and recalls but may cause additional performance losses. The maximum precision of threads allows you to fine tune performance. A higher frequency allows you to use smaller buffer size and a higher samplerate. But causes a higher synchronization over-head. MIDI The MIDI sub-menu provides functionality related to MIDI like the import or export wizards. The MIDI import wizard The MIDI import wizard allows you to import Standard MIDI Files. You might choose the machine which will be added after import. The notation is available within the pattern or notation editor. Step #1 - file chooser The MIDI import wizard - step #1 First you have to choose the Standard MIDI File you would like to import. As selected the desired file you might want to click Forward. Step #2 - mapping The MIDI import wizard - step #2 After parsing the MIDI file there is one more step involved. You have to enable the appropriate track. There are 2 labels visible showing meta information. Below there is a combo box allowing you to choose the machine getting mapped. The spin buttons let you adjust the number of audio channels to create. As well the first offset. The MIDI export wizard The MIDI export wizard allows you to export Standard MIDI Files. You might choose the machine which will be exported. Step #1 - select machines The MIDI import wizard - step #1 First you have to enable the machines you wish to export. The entry allows you to set the sequence meta information. Step #2 - file chooser The MIDI import wizard - step #2 After enabled the machines to export you shall specify the filename. As next you click OK in order to write the MIDI file. gsequencer-1.4.24/functional-tests.mk0000644000175000017500000002170613247044247014534 00000000000000libgsequencer_test_LIBADD = @LIBGSEQUENCER_TEST_LIBADD@ gsequencer_functional_test_LDADD = @GSEQUENCER_FUNCTIONAL_TEST_LDADD@ # libadd and ldadd libgsequencer_test_LIBADD += libgsequencer.la libags_gui.la libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) gsequencer_functional_test_LDADD += libgsequencer.la libags_gui.la libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la libgsequencer_test.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) check_LTLIBRARIES = libgsequencer_test.la #TODO:JK: fix tests after refactoring # functional tests check_PROGRAMS += \ ags_functional_audio_test \ ags_functional_machine_add_and_destroy_test \ ags_functional_machine_link_test \ ags_functional_line_member_add_and_destroy_test \ ags_functional_editor_workflow_test \ ags_functional_panel_test \ ags_functional_mixer_test \ ags_functional_drum_test \ ags_functional_matrix_test \ ags_functional_synth_test \ ags_functional_ffplayer_test \ ags_functional_notation_edit_test # functional test util library libgsequencer_test_la_SOURCES = ags/test/X/gsequencer_setup_util.c ags/test/X/gsequencer_setup_util.h ags/test/X/ags_functional_test_util.c ags/test/X/ags_functional_test_util.h ags/test/X/libgsequencer.h libgsequencer_test_la_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) libgsequencer_test_la_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" libgsequencer_test_la_LDFLAGS = -pthread $(LDFLAGS) libgsequencer_test_la_LIBADD = $(libgsequencer_test_LIBADD) # functional audio test ags_functional_audio_test_SOURCES = ags/test/audio/ags_functional_audio_test.c ags_functional_audio_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_functional_audio_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_audio_test_LDADD = $(gsequencer_functional_test_LDADD) # functional machine add and destroy test ags_functional_machine_add_and_destroy_test_SOURCES = ags/test/X/ags_functional_machine_add_and_destroy_test.c ags_functional_machine_add_and_destroy_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_machine_add_and_destroy_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_machine_add_and_destroy_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_machine_add_and_destroy_test_LDADD = $(gsequencer_functional_test_LDADD) # functional machine link test ags_functional_machine_link_test_SOURCES = ags/test/X/ags_functional_machine_link_test.c ags_functional_machine_link_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_machine_link_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_machine_link_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_machine_link_test_LDADD = $(gsequencer_functional_test_LDADD) # functional line member add and destroy test ags_functional_line_member_add_and_destroy_test_SOURCES = ags/test/X/ags_functional_line_member_add_and_destroy_test.c ags_functional_line_member_add_and_destroy_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_line_member_add_and_destroy_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_line_member_add_and_destroy_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_line_member_add_and_destroy_test_LDADD = $(gsequencer_functional_test_LDADD) # functional editor workflow test ags_functional_editor_workflow_test_SOURCES = ags/test/X/ags_functional_editor_workflow_test.c ags_functional_editor_workflow_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_editor_workflow_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_editor_workflow_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_editor_workflow_test_LDADD = $(gsequencer_functional_test_LDADD) # functional panel test ags_functional_panel_test_SOURCES = ags/test/X/machine/ags_functional_panel_test.c ags_functional_panel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_panel_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_panel_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_panel_test_LDADD = $(gsequencer_functional_test_LDADD) # functional mixer test ags_functional_mixer_test_SOURCES = ags/test/X/machine/ags_functional_mixer_test.c ags_functional_mixer_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_mixer_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_mixer_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_mixer_test_LDADD = $(gsequencer_functional_test_LDADD) # functional drum test ags_functional_drum_test_SOURCES = ags/test/X/machine/ags_functional_drum_test.c ags_functional_drum_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_drum_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_drum_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_drum_test_LDADD = $(gsequencer_functional_test_LDADD) # functional matrix test ags_functional_matrix_test_SOURCES = ags/test/X/machine/ags_functional_matrix_test.c ags_functional_matrix_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_matrix_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_matrix_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_matrix_test_LDADD = $(gsequencer_functional_test_LDADD) # functional synth test ags_functional_synth_test_SOURCES = ags/test/X/machine/ags_functional_synth_test.c ags_functional_synth_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_synth_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_synth_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_synth_test_LDADD = $(gsequencer_functional_test_LDADD) # functional ffplayer test ags_functional_ffplayer_test_SOURCES = ags/test/X/machine/ags_functional_ffplayer_test.c ags_functional_ffplayer_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_ffplayer_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_ffplayer_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_ffplayer_test_LDADD = $(gsequencer_functional_test_LDADD) # functional note edit test ags_functional_notation_edit_test_SOURCES = ags/test/X/ags_functional_notation_edit_test.c ags_functional_notation_edit_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_functional_notation_edit_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"gsequencer.share\" ags_functional_notation_edit_test_LDFLAGS = -pthread $(LDFLAGS) ags_functional_notation_edit_test_LDADD = $(gsequencer_functional_test_LDADD) gsequencer-1.4.24/libgsequencer.pc.in0000644000175000017500000000123513246707333014456 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libgsequencer Description: Advanced Gtk+ Sequencer audio processing engine URL: http://nongnu.org/gsequencer Version: @PACKAGE_VERSION@ Requires: uuid >= 1.0.2 alsa >= 1.0.25 jack libxml-2.0 >= 2.8.0 sndfile >= 1.0.25 libinstpatch-1.0 >= 1.0 gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3 gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 fontconfig >= 2.11.0 gdk-pixbuf-2.0 >= 2.26.1 cairo >= 1.12.0 gtk+-2.0 >= 2.24.10 Libs: -L${libdir} -lags-1.0 -lags_thread-1.0 -lags_server-0.7 -lags_audio-1.0 -lags_gui-0.7 -lgsequencer-0.7 Cflags: -I${includedir} gsequencer-1.4.24/acsite.m40000644000175000017500000000056513246707333012414 00000000000000# check for the presence of help2man # if it is available then set MANPAGES to # the list of man page files to create # # AC_PROG_HELP2MAN(list-of-man-pages) AC_DEFUN([AC_PROG_HELP2MAN], [{ AC_CHECK_PROGS([HELP2MAN], [help2man]) if ! test -z "$HELP2MAN" then AC_SUBST(MANPAGES, $1) HAVE_HELP2MAN=true fi AM_CONDITIONAL([HAVE_HELP2MAN], [test x$HAVE_HELP2MAN = xtrue]) }]) gsequencer-1.4.24/clean-gtk-doc.sh0000755000175000017500000000677013246707333013655 00000000000000#!/bin/bash rm -rf docs/reference/libags-audio/.libs/ rm -f docs/reference/libags-audio/html-build.stamp rm -f docs/reference/libags-audio/html.stamp rm -f docs/reference/libags-audio/libags_audio-decl-list.txt rm -f docs/reference/libags-audio/libags_audio-decl-list.txt.bak rm -f docs/reference/libags-audio/libags_audio-decl.txt rm -f docs/reference/libags-audio/libags_audio-decl.txt.bak rm -f docs/reference/libags-audio/libags_audio-undeclared.txt rm -f docs/reference/libags-audio/libags_audio-undocumented.txt rm -f docs/reference/libags-audio/libags_audio-unused.txt rm -f docs/reference/libags-audio/libags_audio.args rm -f docs/reference/libags-audio/libags_audio.hierarchy rm -f docs/reference/libags-audio/libags_audio.prerequisites rm -f docs/reference/libags-audio/libags_audio.signals rm -f docs/reference/libags-audio/libags_audio.types.bak rm -f docs/reference/libags-audio/scan-build.stamp rm -f docs/reference/libags-audio/setup-build.stamp rm -f docs/reference/libags-audio/sgml-build.stamp rm -f docs/reference/libags-audio/sgml.stamp rm -rf docs/reference/libags-gui/.libs/ rm -f docs/reference/libags-gui/html-build.stamp rm -f docs/reference/libags-gui/html.stamp rm -f docs/reference/libags-gui/libags_gui-decl-list.txt rm -f docs/reference/libags-gui/libags_gui-decl.txt rm -f docs/reference/libags-gui/libags_gui-undeclared.txt rm -f docs/reference/libags-gui/libags_gui-undocumented.txt rm -f docs/reference/libags-gui/libags_gui-unused.txt rm -f docs/reference/libags-gui/libags_gui.args rm -f docs/reference/libags-gui/libags_gui.hierarchy rm -f docs/reference/libags-gui/libags_gui.prerequisites rm -f docs/reference/libags-gui/libags_gui.signals rm -f docs/reference/libags-gui/scan-build.stamp rm -f docs/reference/libags-gui/setup-build.stamp rm -f docs/reference/libags-gui/sgml-build.stamp rm -f docs/reference/libags-gui/sgml.stamp rm -rf docs/reference/libags/.libs/ rm -f docs/reference/libags/html-build.stamp rm -f docs/reference/libags/html.stamp rm -f docs/reference/libags/libags-decl-list.txt rm -f docs/reference/libags/libags-decl.txt rm -f docs/reference/libags/libags-undeclared.txt rm -f docs/reference/libags/libags-undocumented.txt rm -f docs/reference/libags/libags-unused.txt rm -f docs/reference/libags/libags.args rm -f docs/reference/libags/libags.hierarchy rm -f docs/reference/libags/libags.prerequisites rm -f docs/reference/libags/libags.signals rm -f docs/reference/libags/libags.types.bak rm -f docs/reference/libags/scan-build.stamp rm -f docs/reference/libags/setup-build.stamp rm -f docs/reference/libags/sgml-build.stamp rm -f docs/reference/libags/sgml.stamp rm -rf docs/reference/libgsequencer/.libs/ rm -f docs/reference/libgsequencer/html-build.stamp rm -f docs/reference/libgsequencer/html.stamp rm -f docs/reference/libgsequencer/libgsequencer-decl-list.txt rm -f docs/reference/libgsequencer/libgsequencer-decl.txt rm -f docs/reference/libgsequencer/libgsequencer-undeclared.txt rm -f docs/reference/libgsequencer/libgsequencer-undocumented.txt rm -f docs/reference/libgsequencer/libgsequencer-unused.txt rm -f docs/reference/libgsequencer/libgsequencer.args rm -f docs/reference/libgsequencer/libgsequencer.hierarchy rm -f docs/reference/libgsequencer/libgsequencer.prerequisites rm -f docs/reference/libgsequencer/libgsequencer.signals rm -f docs/reference/libgsequencer/libgsequencer.types.bak rm -f docs/reference/libgsequencer/scan-build.stamp rm -f docs/reference/libgsequencer/setup-build.stamp rm -f docs/reference/libgsequencer/sgml-build.stamp rm -f docs/reference/libgsequencer/sgml.stamp gsequencer-1.4.24/ags_functional_notation_edit_test.xml0000644000175000017500000025326313247044247020403 00000000000000 gsequencer-1.4.24/ABOUT-NLS0000644000175000017500000026747413256163135012144 000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this 'ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU 'gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU 'gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. 1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU 'gettext'. Other packages have their own ways to internationalization, predating GNU 'gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU 'gettext' functions. Installers may use special options at configuration time for changing the default behaviour. The command: ./configure --disable-nls will _totally_ disable translation of messages. When you already have GNU 'gettext' installed on your system and run configure without an option for your new package, 'configure' will probably detect the previously built and installed 'libintl' library and will decide to use it. If not, you may have to to use the '--with-libintl-prefix' option to tell 'configure' where to look for it. Internationalized packages usually have many 'po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at 'configure' time by using the '--disable-nls' switch, all available translations are installed together with the package. However, the environment variable 'LINGUAS' may be set, prior to configuration, to limit the installed set. 'LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.2 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the 'LANG' environment variable to the appropriate 'LL_CC' combination. If you happen to have the 'LC_ALL' or some other 'LC_xxx' environment variables set, you should unset them before setting 'LANG', otherwise the setting of 'LANG' will not have the desired effect. Here 'LL' is an ISO 639 two-letter language code, and 'CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute 'setenv LANG de_DE' (in 'csh'), 'export LANG; LANG=de_DE' (in 'sh') or 'export LANG=de_DE' (in 'bash'). This can be done from your '.login' or '.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, 'de_AT' is used for Austria, and 'pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of 'LL_CC', with 'LL' denoting the language and 'CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as 'LL' or 'LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command 'locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called 'LANGUAGE'. GNU 'gettext' gives preference to 'LANGUAGE' over 'LANG' for the purpose of message handling, but you still need to have 'LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set 'LANGUAGE' to 'sv:de' while leaving 'LANG' to 'sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from 'no' to 'nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under 'nb' and some older ones under 'no', it's recommended for Norwegian users to set 'LANGUAGE' to 'nb:no' so that both newer and older translations are used. In the 'LANGUAGE' environment variable, but not in the 'LANG' environment variable, 'LL_CC' combinations can be abbreviated as 'LL' to denote the language's main dialect. For example, 'de' is equivalent to 'de_DE' (German as spoken in Germany), and 'pt' to 'pt_PT' (Portuguese as spoken in Portugal) in this context. 1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, 'http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has '-request' appended. For example, speakers of Swedish can send a message to 'sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to 'coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.4 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of Jun 2014. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am an ar as ast az be bg bn bn_IN bs ca crh cs +---------------------------------------------------+ a2ps | [] [] [] | aegis | | anubis | | aspell | [] [] [] | bash | [] [] [] | bfd | | binutils | [] | bison | | bison-runtime | [] | buzztrax | [] | ccd2cue | | ccide | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | [] | datamash | | denemo | [] [] | dfarc | [] | dialog | [] [] [] | dico | | diffutils | [] | dink | [] | direvent | | doodle | [] | dos2unix | | dos2unix-man | | e2fsprogs | [] [] | enscript | [] | exif | [] | fetchmail | [] [] | findutils | [] | flex | [] | freedink | [] [] | fusionforge | | gas | | gawk | [] | gcal | [] | gcc | | gdbm | | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gjay | | glunarclock | [] [] [] | gnubiff | [] | gnubik | [] | gnucash | () () [] | gnuchess | | gnulib | [] | gnunet | | gnunet-gtk | | gold | | gphoto2 | [] | gprof | [] | gramadoir | | grep | [] [] [] | grub | [] | gsasl | | gss | | gst-plugins-bad | [] [] | gst-plugins-base | [] [] [] | gst-plugins-good | [] [] [] | gst-plugins-ugly | [] [] [] | gstreamer | [] [] [] [] | gtick | [] | gtkam | [] [] | gtkspell | [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] | hello | [] | help2man | | help2man-texi | | hylafax | | idutils | | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | iso_639_5 | | jwhois | | kbd | [] | klavaro | [] [] [] [] [] | ld | [] | leafpad | [] [] [] [] | libc | [] [] [] | libexif | () | libextractor | | libgnutls | [] | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | | libiconv | [] [] | libidn | [] | liferea | [] [] [] [] | lilypond | [] [] | lordsawar | [] | lprng | | lynx | [] [] | m4 | [] | mailfromd | | mailutils | | make | [] | man-db | [] [] | man-db-manpages | | midi-instruments | [] [] [] | minicom | [] | mkisofs | [] | myserver | [] | nano | [] [] [] | opcodes | | parted | [] | pies | | pnmixer | | popt | [] | procps-ng | | procps-ng-man | | psmisc | [] | pspp | [] | pushover | [] | pwdutils | | pyspread | | radius | [] | recode | [] [] [] | recutils | | rpm | | rush | | sarg | | sed | [] [] [] [] | sharutils | [] | shishi | | skribilo | | solfege | [] [] | solfege-manual | | spotmachine | | sudo | [] [] | sudoers | [] [] | sysstat | [] | tar | [] [] [] | texinfo | [] [] | texinfo_document | [] [] | tigervnc | [] | tin | | tin-man | | tracgoogleappsa... | | trader | | util-linux | [] | ve | | vice | | vmm | | vorbis-tools | [] | wastesedge | | wcd | | wcd-man | | wdiff | [] [] | wget | [] | wyslij-po | | xboard | | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ af am an ar as ast az be bg bn bn_IN bs ca crh cs 4 0 2 5 3 11 0 8 25 3 3 1 55 4 74 da de el en en_GB en_ZA eo es et eu fa fi fr +--------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] [] | aegis | [] [] [] [] | anubis | [] [] [] [] [] | aspell | [] [] [] [] [] [] [] | bash | [] [] [] | bfd | [] [] [] [] | binutils | [] [] [] | bison | [] [] [] [] [] [] [] [] | bison-runtime | [] [] [] [] [] [] [] [] | buzztrax | [] [] [] [] | ccd2cue | [] [] [] [] | ccide | [] [] [] [] [] [] | cflow | [] [] [] [] [] | clisp | [] [] [] [] [] | coreutils | [] [] [] [] [] | cpio | [] [] [] [] [] | cppi | [] [] [] [] [] | cpplib | [] [] [] [] [] [] | cryptsetup | [] [] [] [] [] | datamash | [] [] [] [] | denemo | [] | dfarc | [] [] [] [] [] [] | dialog | [] [] [] [] [] [] [] [] [] | dico | [] [] [] [] | diffutils | [] [] [] [] [] [] | dink | [] [] [] [] [] [] | direvent | [] [] [] [] | doodle | [] [] [] [] | dos2unix | [] [] [] [] [] | dos2unix-man | [] [] [] | e2fsprogs | [] [] [] [] [] | enscript | [] [] [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] () [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] | flex | [] [] [] [] [] [] | freedink | [] [] [] [] [] [] [] [] | fusionforge | [] [] [] | gas | [] [] [] | gawk | [] [] [] [] [] | gcal | [] [] [] [] | gcc | [] | gdbm | [] [] [] [] [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] | gjay | [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | () [] [] () | gnubik | [] [] [] [] [] | gnucash | [] () () () () () () | gnuchess | [] [] [] [] | gnulib | [] [] [] [] [] [] [] | gnunet | [] | gnunet-gtk | [] | gold | [] [] [] | gphoto2 | [] () [] [] | gprof | [] [] [] [] [] [] | gramadoir | [] [] [] [] [] | grep | [] [] [] [] [] [] [] | grub | [] [] [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | [] () [] [] [] | gtkam | [] () [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] | guix | [] [] | guix-packages | | gutenprint | [] [] [] [] | hello | [] [] [] [] [] [] [] [] | help2man | [] [] [] [] [] [] [] | help2man-texi | [] [] [] | hylafax | [] [] | idutils | [] [] [] [] [] | iso_15924 | [] () [] [] () [] () | iso_3166 | [] () [] [] [] [] () [] () | iso_3166_2 | [] () () () | iso_4217 | [] () [] [] [] () [] () | iso_639 | [] () [] [] () [] () | iso_639_3 | () () () | iso_639_5 | () () () | jwhois | [] [] [] [] [] | kbd | [] [] [] [] [] [] | klavaro | [] [] [] [] [] [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] [] () [] [] | libextractor | [] | libgnutls | [] [] [] [] | libgphoto2 | [] () [] | libgphoto2_port | [] () [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] [] [] | libidn | [] [] [] [] [] | liferea | [] () [] [] [] [] [] | lilypond | [] [] [] [] [] [] | lordsawar | [] [] | lprng | | lynx | [] [] [] [] [] [] | m4 | [] [] [] [] [] [] | mailfromd | [] | mailutils | [] [] [] [] | make | [] [] [] [] [] | man-db | [] [] [] [] | man-db-manpages | [] [] | midi-instruments | [] [] [] [] [] [] [] [] [] | minicom | [] [] [] [] [] | mkisofs | [] [] [] | myserver | [] [] [] [] | nano | [] [] [] [] [] [] [] | opcodes | [] [] [] [] [] | parted | [] [] [] | pies | [] | pnmixer | [] [] | popt | [] [] [] [] [] [] | procps-ng | [] [] | procps-ng-man | [] [] | psmisc | [] [] [] [] [] [] [] | pspp | [] [] [] | pushover | () [] [] [] | pwdutils | [] [] [] | pyspread | [] [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | recutils | [] [] [] [] | rpm | [] [] [] [] [] | rush | [] [] [] | sarg | [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] [] [] | skribilo | [] [] [] | solfege | [] [] [] [] [] [] [] [] | solfege-manual | [] [] [] [] [] | spotmachine | [] [] [] [] [] | sudo | [] [] [] [] [] [] | sudoers | [] [] [] [] [] [] | sysstat | [] [] [] [] [] [] | tar | [] [] [] [] [] [] [] | texinfo | [] [] [] [] [] | texinfo_document | [] [] [] [] | tigervnc | [] [] [] [] [] [] | tin | [] [] [] [] | tin-man | [] | tracgoogleappsa... | [] [] [] [] [] | trader | [] [] [] [] [] [] | util-linux | [] [] [] [] | ve | [] [] [] [] [] | vice | () () () | vmm | [] [] | vorbis-tools | [] [] [] [] | wastesedge | [] | wcd | [] [] [] [] | wcd-man | [] | wdiff | [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] | wyslij-po | [] [] [] [] | xboard | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] [] | +--------------------------------------------------+ da de el en en_GB en_ZA eo es et eu fa fi fr 119 131 32 1 6 0 94 95 22 13 4 102 139 ga gd gl gu he hi hr hu hy ia id is it ja ka kk +-------------------------------------------------+ a2ps | [] [] [] [] | aegis | [] | anubis | [] [] [] [] | aspell | [] [] [] [] [] | bash | [] [] [] [] | bfd | [] [] | binutils | [] [] [] | bison | [] | bison-runtime | [] [] [] [] [] [] [] [] | buzztrax | | ccd2cue | [] | ccide | [] [] | cflow | [] [] [] | clisp | | coreutils | [] [] | cpio | [] [] [] [] [] [] | cppi | [] [] [] [] [] | cpplib | [] [] | cryptsetup | [] | datamash | | denemo | [] | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] | dink | [] | direvent | [] | doodle | [] [] | dos2unix | [] [] | dos2unix-man | | e2fsprogs | [] [] | enscript | [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] [] [] [] [] | flex | [] | freedink | [] [] [] [] | fusionforge | | gas | [] | gawk | [] () [] | gcal | | gcc | | gdbm | | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] | gettext-tools | [] [] [] | gjay | [] | glunarclock | [] [] [] [] [] [] | gnubiff | [] [] () | gnubik | [] [] [] | gnucash | () () () () () | gnuchess | | gnulib | [] [] [] [] [] | gnunet | | gnunet-gtk | | gold | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] [] | gramadoir | [] [] [] | grep | [] [] [] [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] [] [] | hello | [] [] [] [] [] | help2man | [] [] [] | help2man-texi | | hylafax | [] | idutils | [] [] | iso_15924 | [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] | iso_4217 | [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | iso_639_5 | | jwhois | [] [] [] [] | kbd | [] [] [] | klavaro | [] [] [] [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] () | libc | [] [] [] [] [] | libexif | [] | libextractor | | libgnutls | [] | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] [] [] | libidn | [] [] [] [] | liferea | [] [] [] [] [] | lilypond | [] | lordsawar | | lprng | [] | lynx | [] [] [] [] | m4 | [] [] [] [] [] | mailfromd | | mailutils | | make | [] [] [] [] | man-db | [] [] | man-db-manpages | [] [] | midi-instruments | [] [] [] [] [] [] [] [] [] | minicom | [] [] [] | mkisofs | [] [] | myserver | [] | nano | [] [] [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] [] [] | pies | | pnmixer | [] [] | popt | [] [] [] [] [] [] [] [] [] [] | procps-ng | | procps-ng-man | | psmisc | [] [] [] [] | pspp | [] [] | pushover | [] | pwdutils | [] | pyspread | | radius | [] | recode | [] [] [] [] [] [] [] | recutils | | rpm | [] | rush | [] | sarg | | sed | [] [] [] [] [] [] [] | sharutils | | shishi | | skribilo | [] | solfege | [] [] | solfege-manual | | spotmachine | | sudo | [] [] [] [] | sudoers | [] [] [] | sysstat | [] [] [] [] | tar | [] [] [] [] [] [] | texinfo | [] [] [] | texinfo_document | [] [] [] | tigervnc | | tin | | tin-man | | tracgoogleappsa... | [] [] [] [] | trader | [] [] | util-linux | [] | ve | [] | vice | () () | vmm | | vorbis-tools | [] [] | wastesedge | [] | wcd | | wcd-man | | wdiff | [] [] [] | wget | [] [] [] [] | wyslij-po | [] [] [] | xboard | | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] | +-------------------------------------------------+ ga gd gl gu he hi hr hu hy ia id is it ja ka kk 35 2 47 4 8 2 60 71 2 6 81 11 87 57 0 3 kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl +--------------------------------------------------+ a2ps | [] [] | aegis | [] | anubis | [] [] [] | aspell | [] [] | bash | [] [] | bfd | | binutils | | bison | [] | bison-runtime | [] [] [] [] [] [] | buzztrax | | ccd2cue | | ccide | [] [] | cflow | [] | clisp | [] | coreutils | [] [] | cpio | [] | cppi | | cpplib | [] | cryptsetup | [] | datamash | [] [] | denemo | | dfarc | [] [] | dialog | [] [] [] [] [] [] | dico | | diffutils | [] [] [] | dink | [] | direvent | [] | doodle | [] | dos2unix | [] [] | dos2unix-man | [] | e2fsprogs | [] | enscript | [] | exif | [] [] [] | fetchmail | [] | findutils | [] [] | flex | [] | freedink | [] [] | fusionforge | | gas | | gawk | [] | gcal | | gcc | | gdbm | | gettext-examples | [] [] [] [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] | gjay | | glunarclock | [] [] | gnubiff | [] | gnubik | [] [] | gnucash | () () () () () () () [] | gnuchess | [] [] | gnulib | [] | gnunet | | gnunet-gtk | | gold | | gphoto2 | [] | gprof | [] [] | gramadoir | [] | grep | [] [] | grub | [] [] [] | gsasl | [] | gss | | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] [] | gst-plugins-good | [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | [] [] [] | gtick | [] | gtkam | [] [] | gtkspell | [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] | hello | [] [] [] | help2man | [] | help2man-texi | | hylafax | [] | idutils | [] | iso_15924 | () [] [] | iso_3166 | [] [] [] () [] [] [] [] [] [] | iso_3166_2 | () [] | iso_4217 | () [] [] [] | iso_639 | [] [] () [] [] [] [] | iso_639_3 | [] () [] | iso_639_5 | () | jwhois | [] [] | kbd | [] | klavaro | [] [] | ld | | leafpad | [] [] [] [] [] | libc | [] [] | libexif | [] | libextractor | [] | libgnutls | [] [] | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | [] | libiconv | [] [] | libidn | [] | liferea | [] [] [] | lilypond | [] | lordsawar | | lprng | | lynx | [] | m4 | [] | mailfromd | | mailutils | | make | [] [] | man-db | [] | man-db-manpages | [] | midi-instruments | [] [] [] [] [] [] [] | minicom | [] | mkisofs | [] | myserver | | nano | [] [] [] | opcodes | [] | parted | [] [] | pies | | pnmixer | [] | popt | [] [] [] [] [] | procps-ng | | procps-ng-man | | psmisc | [] | pspp | [] [] | pushover | | pwdutils | [] | pyspread | | radius | [] | recode | [] [] | recutils | [] | rpm | [] | rush | [] | sarg | | sed | [] [] | sharutils | [] | shishi | | skribilo | | solfege | [] [] | solfege-manual | [] | spotmachine | [] | sudo | [] [] [] | sudoers | [] [] [] | sysstat | [] [] | tar | [] [] [] | texinfo | [] | texinfo_document | [] | tigervnc | [] | tin | | tin-man | | tracgoogleappsa... | [] [] [] | trader | [] | util-linux | [] | ve | [] | vice | [] | vmm | [] | vorbis-tools | [] | wastesedge | [] | wcd | [] | wcd-man | [] | wdiff | [] | wget | [] [] | wyslij-po | [] | xboard | [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +--------------------------------------------------+ kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl 5 15 4 6 0 13 23 3 3 3 4 11 2 42 1 125 nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr +------------------------------------------------+ a2ps | [] [] [] [] [] [] [] | aegis | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] [] [] | bash | [] [] [] [] [] [] | bfd | [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] [] | buzztrax | [] | ccd2cue | [] [] | ccide | [] [] [] | cflow | [] [] [] | clisp | [] | coreutils | [] [] [] [] | cpio | [] [] [] | cppi | [] [] [] | cpplib | [] [] [] | cryptsetup | [] [] [] | datamash | [] [] | denemo | | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] | dico | [] | diffutils | [] [] [] | dink | | direvent | [] [] [] | doodle | [] [] | dos2unix | [] [] [] [] | dos2unix-man | [] [] | e2fsprogs | [] | enscript | [] [] [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] [] [] [] | fusionforge | | gas | | gawk | [] | gcal | | gcc | | gdbm | [] [] [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gjay | [] | glunarclock | [] [] [] [] [] [] | gnubiff | [] | gnubik | [] [] [] [] | gnucash | () () () () () [] | gnuchess | [] [] | gnulib | [] [] [] [] [] | gnunet | | gnunet-gtk | | gold | | gphoto2 | [] [] [] [] [] | gprof | [] [] [] [] | gramadoir | [] [] | grep | [] [] [] [] [] [] | grub | [] [] [] [] [] | gsasl | [] [] [] | gss | [] [] [] [] | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] [] | hello | [] [] [] [] [] [] | help2man | [] [] [] [] | help2man-texi | [] | hylafax | | idutils | [] [] [] | iso_15924 | [] () [] [] [] [] | iso_3166 | [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] () [] | iso_4217 | [] [] () [] [] [] [] [] | iso_639 | [] [] [] () [] [] [] [] [] [] | iso_639_3 | [] () | iso_639_5 | () [] | jwhois | [] [] [] [] | kbd | [] [] | klavaro | [] [] [] [] [] | ld | | leafpad | [] [] [] [] [] [] [] [] | libc | [] [] [] | libexif | [] () [] | libextractor | [] | libgnutls | [] | libgphoto2 | [] | libgphoto2_port | [] [] [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] [] | liferea | [] [] [] [] () [] [] | lilypond | | lordsawar | | lprng | [] | lynx | [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | midi-instruments | [] [] [] [] [] [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | [] [] | nano | [] [] [] [] [] [] | opcodes | | parted | [] [] [] [] [] [] | pies | [] | pnmixer | [] | popt | [] [] [] [] [] [] | procps-ng | [] | procps-ng-man | [] | psmisc | [] [] [] [] | pspp | [] [] | pushover | | pwdutils | [] | pyspread | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | recutils | [] [] | rpm | [] | rush | [] [] [] | sarg | [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] | shishi | [] [] | skribilo | [] | solfege | [] [] [] | solfege-manual | [] [] | spotmachine | [] [] | sudo | [] [] [] [] [] [] | sudoers | [] [] [] [] | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | texinfo_document | [] [] | tigervnc | [] [] [] | tin | [] | tin-man | | tracgoogleappsa... | [] [] [] [] | trader | [] [] | util-linux | [] [] | ve | [] [] [] | vice | | vmm | | vorbis-tools | [] [] [] | wastesedge | | wcd | | wcd-man | | wdiff | [] [] [] [] [] | wget | [] [] [] [] [] | wyslij-po | [] [] [] [] | xboard | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | +------------------------------------------------+ nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr 7 3 6 114 1 12 88 32 82 3 40 45 7 101 sv sw ta te tg th tr uk ur vi wa wo zh_CN +----------------------------------------------+ a2ps | [] [] [] [] [] | aegis | [] | anubis | [] [] [] [] | aspell | [] [] [] [] [] | bash | [] [] [] [] | bfd | [] [] [] | binutils | [] [] [] | bison | [] [] [] [] | bison-runtime | [] [] [] [] [] [] | buzztrax | [] [] [] | ccd2cue | [] [] [] | ccide | [] [] [] [] | cflow | [] [] [] [] | clisp | | coreutils | [] [] [] | cpio | [] [] [] [] [] | cppi | [] [] [] [] | cpplib | [] [] [] [] [] | cryptsetup | [] [] [] | datamash | [] [] [] | denemo | [] | dfarc | [] [] | dialog | [] [] [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] | dink | [] | direvent | [] [] | doodle | [] [] | dos2unix | [] [] [] [] | dos2unix-man | [] [] [] | e2fsprogs | [] [] [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] | freedink | [] [] [] | fusionforge | | gas | [] | gawk | [] [] [] | gcal | [] [] [] | gcc | [] | gdbm | [] [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] [] [] | gjay | [] [] [] | glunarclock | [] [] [] [] | gnubiff | [] [] | gnubik | [] [] [] [] | gnucash | () () () () [] | gnuchess | [] [] [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gold | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] [] | gramadoir | [] [] [] | grep | [] [] [] [] [] | grub | [] [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] [] [] [] | hello | [] [] [] [] [] [] | help2man | [] [] [] | help2man-texi | [] | hylafax | [] | idutils | [] [] [] | iso_15924 | [] () [] [] () [] | iso_3166 | [] [] () [] [] () [] [] | iso_3166_2 | () [] [] () [] | iso_4217 | [] () [] [] () [] | iso_639 | [] [] [] () [] [] () [] [] | iso_639_3 | [] () [] [] () | iso_639_5 | () [] () | jwhois | [] [] [] [] | kbd | [] [] [] [] | klavaro | [] [] [] [] [] [] | ld | [] [] [] [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] [] () | libextractor | [] [] | libgnutls | [] [] [] [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] | libidn | () [] [] [] | liferea | [] [] [] [] [] | lilypond | [] | lordsawar | | lprng | [] | lynx | [] [] [] [] | m4 | [] [] [] | mailfromd | [] [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] | midi-instruments | [] [] [] [] [] [] | minicom | [] [] | mkisofs | [] [] [] | myserver | [] | nano | [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] [] [] | pies | [] [] | pnmixer | [] [] [] | popt | [] [] [] [] [] [] [] | procps-ng | [] [] | procps-ng-man | [] | psmisc | [] [] [] [] | pspp | [] [] [] | pushover | [] | pwdutils | [] [] | pyspread | [] | radius | [] [] | recode | [] [] [] [] | recutils | [] [] [] | rpm | [] [] [] [] | rush | [] [] | sarg | | sed | [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] [] | skribilo | [] [] | solfege | [] [] [] [] | solfege-manual | [] | spotmachine | [] [] [] | sudo | [] [] [] [] [] | sudoers | [] [] [] [] | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | texinfo_document | [] | tigervnc | [] [] [] | tin | [] | tin-man | | tracgoogleappsa... | [] [] [] [] [] | trader | [] | util-linux | [] [] [] [] | ve | [] [] [] [] | vice | () () | vmm | | vorbis-tools | [] [] | wastesedge | | wcd | [] [] [] | wcd-man | [] | wdiff | [] [] [] [] | wget | [] [] [] | wyslij-po | [] [] | xboard | [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | +----------------------------------------------+ sv sw ta te tg th tr uk ur vi wa wo zh_CN 106 1 4 3 0 13 51 115 1 125 7 1 100 zh_HK zh_TW +-------------+ a2ps | | 30 aegis | | 9 anubis | | 19 aspell | | 29 bash | [] | 23 bfd | | 11 binutils | | 12 bison | [] | 18 bison-runtime | [] | 38 buzztrax | | 9 ccd2cue | | 10 ccide | | 17 cflow | | 16 clisp | | 10 coreutils | | 18 cpio | | 20 cppi | | 17 cpplib | [] | 19 cryptsetup | | 14 datamash | | 11 denemo | | 5 dfarc | | 17 dialog | [] | 42 dico | | 6 diffutils | | 22 dink | | 10 direvent | | 11 doodle | | 12 dos2unix | [] | 18 dos2unix-man | | 9 e2fsprogs | | 15 enscript | | 21 exif | | 27 fetchmail | | 19 findutils | | 29 flex | [] | 19 freedink | | 24 fusionforge | | 3 gas | | 5 gawk | | 13 gcal | | 8 gcc | | 2 gdbm | | 10 gettext-examples | [] [] | 40 gettext-runtime | [] [] | 35 gettext-tools | [] | 24 gjay | | 9 glunarclock | [] | 27 gnubiff | | 9 gnubik | | 19 gnucash | () | 6 gnuchess | | 11 gnulib | | 23 gnunet | | 1 gnunet-gtk | | 1 gold | | 7 gphoto2 | [] | 19 gprof | | 21 gramadoir | | 14 grep | [] | 31 grub | | 21 gsasl | [] | 19 gss | | 17 gst-plugins-bad | | 21 gst-plugins-base | | 27 gst-plugins-good | | 32 gst-plugins-ugly | | 34 gstreamer | [] | 32 gtick | | 19 gtkam | | 24 gtkspell | [] [] | 48 guix | | 2 guix-packages | | 0 gutenprint | | 15 hello | [] | 30 help2man | | 18 help2man-texi | | 5 hylafax | | 5 idutils | | 14 iso_15924 | [] | 23 iso_3166 | [] [] | 58 iso_3166_2 | | 9 iso_4217 | [] [] | 28 iso_639 | [] [] | 46 iso_639_3 | | 10 iso_639_5 | | 2 jwhois | [] | 20 kbd | | 17 klavaro | | 30 ld | [] | 15 leafpad | [] | 39 libc | [] | 24 libexif | | 10 libextractor | | 5 libgnutls | | 13 libgphoto2 | | 10 libgphoto2_port | [] | 19 libgsasl | | 18 libiconv | [] | 29 libidn | | 17 liferea | | 29 lilypond | | 11 lordsawar | | 3 lprng | | 3 lynx | | 19 m4 | [] | 22 mailfromd | | 4 mailutils | | 6 make | | 19 man-db | | 15 man-db-manpages | | 10 midi-instruments | [] | 43 minicom | [] | 17 mkisofs | | 13 myserver | | 9 nano | [] | 30 opcodes | | 12 parted | [] | 23 pies | | 4 pnmixer | | 9 popt | [] | 36 procps-ng | | 5 procps-ng-man | | 4 psmisc | [] | 22 pspp | | 13 pushover | | 6 pwdutils | | 8 pyspread | | 6 radius | | 9 recode | | 31 recutils | | 10 rpm | [] | 13 rush | | 10 sarg | | 4 sed | [] | 35 sharutils | | 13 shishi | | 7 skribilo | | 7 solfege | | 21 solfege-manual | | 9 spotmachine | | 11 sudo | | 26 sudoers | | 22 sysstat | | 23 tar | [] | 30 texinfo | | 17 texinfo_document | | 13 tigervnc | | 14 tin | [] | 7 tin-man | | 1 tracgoogleappsa... | [] | 22 trader | | 12 util-linux | | 13 ve | | 14 vice | | 1 vmm | | 3 vorbis-tools | | 13 wastesedge | | 3 wcd | | 8 wcd-man | | 3 wdiff | [] | 23 wget | | 21 wyslij-po | | 14 xboard | | 10 xdg-user-dirs | [] [] | 68 xkeyboard-config | [] | 28 +-------------+ 89 teams zh_HK zh_TW 166 domains 7 42 2809 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If Jun 2014 seems to be old, you may fetch a more recent copy of this 'ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at 'http://translationproject.org/extra/matrix.html'. 1.5 Using 'gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU 'gettext' in your package. Of course you have to respect the GNU Lesser General Public License which covers the use of the GNU 'gettext' library. This means in particular that even non-free programs can use 'libintl' as a shared library, whereas only free software can use 'libintl' as a static library or use modified versions of 'libintl'. Once the sources are changed appropriately and the setup can handle the use of 'gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact 'coordinator@translationproject.org' to make the '.pot' files available to the translation teams. gsequencer-1.4.24/NEWS0000644000175000017500000001165013247044247011375 00000000000000Overview of Changes in AGS 1.3.0 ================================ * Supporting 4 different paste modes by allowing the user to activate do 2 different check menu tool buttons. Switches are match audio channel or line as well no duplicates. * New widget AgsScale available. It visualizes a control's possible value. It is accessible, implements AtkValue and AtkAction interface to control the ::value-changed signal or retrieving the range. * New widgets AgsScaleBox, AgsVScaleBox and AgsHScaleBox available. It is responsible to layout your AgsScale. It inherits of GtkBox and overrides GtkWidget::size-allocate and GtkWidget::size-request. * New widget AgsScrolledScaleBox available. It shall contain a AgsScaleBox and make it scrollable. * Refactored automation editor by removing AgsAutomationArea and using AgsAutomationEdit instead. The editor supports segmented automation. Overview of Changes in AGS 1.2.7 ================================ * Completed migrating to asynchronous communication from libags*.so.1 to libgsequencer.so. * Refactored large parts of ags_channel.c to remove redundant code and make all functions thread-safe. Fixed some regression related to linking. Overview of Changes in AGS 1.2.0 ================================ * Audio input support for all common backends like ALSA, OSS4, JACK and Pulseaudio. * New widget AgsPiano available. It is an accessible widget which draws a piano. It has events like ::key-pressed, ::key-released and ::key-clicked. * New widget AgsScrolledPiano available. It contains an AgsPiano and addtional scrolling capabilities. * New widget AgsNotebook available. It is has been moved from libgsequencer to libags-gui. It was refactored to be generic. * Refactored notation editor by replacing AgsEditor with AgsNotationEditor. Notes have an alpha channel now. The editor supports segmented notation. Overview of Changes in AGS 1.0.0 ================================ * Sticky controls allows you to adjust multiple controls at once. * Various bug-fixes especially improved Lv2ui syncing controls. Overview of Changes in AGS 1.0.0-beta ================================ * Experimental XMLRPC-C service prototype. Overview of Changes in AGS 0.9.29 ================================ * New automation editor dialogs to select or ramp acceleration. * New editor dialog to select notes. Overview of Changes in AGS 0.9.28 ================================ * all functional tests pass now again, since gtk_main() integration. Overview of Changes in AGS 0.9.26 ================================ * full gtk_main() support you might want to run it by calling ags_gui_thread_do_run(). Overview of Changes in AGS 0.9.24 ================================ * Support for LADSPA_PATH, DSSI_PATH and LV2_PATH environment variables * Core-audio audio unit backend in order to port the application to Apple OS X. Overview of Changes in AGS 0.9.10 ================================ * Pulseaudio sink support. AgsPulseDevout has got a bigger ring-buffer to avoid caching and allow slower write functions. Overview of Changes in AGS 0.9.8 ================================ * You may now specify base note of AgsSynth or AgsSyncsynth. Overview of Changes in AGS 0.9.7 ================================ * Implemented new functions to handle LV2_Event_Buffer. Note the old functions to do so are deprecated and are incompatible to the newer API. * AgsSyncsynth is a new AgsMachine object, allowing you to edit synth notation. * Smaller refactoring of AgsApplySynth to use new AgsSynthGenerator API. Overview of Changes in AGS 0.9.0 ================================ * Using destroy worker for AgsRecall related unref resulting in much better performance. * Many new unit tests and improved code by detecting errors. * Extended chapter 3 about concurrency of developer's book. Overview of Changes in AGS 0.8.9 ================================ * Lots of properties applied during AgsTask sub-type instantiation. Thus implemented missing ::finalize() and ::dispose(). Overview of Changes in AGS 0.8.8 ================================ * Additional editing tools available. After a Standard MIDI File import you might want to move or crop notes. There are 2 dialogs available of the toolbar allowing you to do so. Overview of Changes in AGS 0.8.5 ================================ * Envelope is ready now for use. Featuring envelope editor with presets, pattern presets and information tab. * Envelope dialog available trough machine's context menu. Supported by AgsDrum, AgsMatrix, AgsFFPlayer, AgsDssiBridge and AgsLv2Bridge. * Fixed missing persistence of AgsLiveDssiBridge and AgsLiveLv2Bridge Overview of Changes in AGS 0.8.2 ================================ * Added gettext support Overview of Changes in AGS 0.8.0 ================================ * Added MIDI import wizard * Added MIDI export wizard Overview of Changes in AGS 0.7.0 ================================ * provide GSequencer functionality as libraries gsequencer-1.4.24/COPYING.docs0000644000175000017500000005466213246707333012673 00000000000000 GNU Free Documentation License Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The "publisher" means any person or entity that distributes copies of the Document to the public. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. gsequencer-1.4.24/mkinstalldirs0000755000175000017500000000672213256226517013512 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the 'mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because '.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gsequencer-1.4.24/functional-system-tests.mk.am0000644000175000017500000002601113247044247016444 00000000000000# Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. AUTOMAKE_OPTIONS = foreign SUBDIRS = po # libadd and ldadd libgsequencer_check_system_test_LIBADD = -L$(libdir) -lags -lags_thread -lags_server -lags_audio -lags_gui -L$(libdir)/gsequencer/ -lgsequencer -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) gsequencer_check_system_functional_test_LDADD = -lags -lags_thread -lags_server -lags_audio -lags_gui -L$(DESTDIR)/$(libdir)/gsequencer/ -lgsequencer libgsequencer_check_system_test.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) localedir = $(datadir)/locale DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ AGS_RESOURCES = -DAGS_RC_FILENAME=\"/usr/share/gsequencer/styles/ags.rc\" -DAGS_ANIMATION_FILENAME=\"/usr/share/gsequencer/images/ags_supermoon-800x450.png\" -DAGS_LOGO_FILENAME=\"/usr/share/gsequencer/images/ags.png\" -DAGS_LICENSE_FILENAME=\"/usr/share/common-licenses/GPL-3\" noinst_LTLIBRARIES = libgsequencer_check_system_test.la # functional system tests - edit target installcheck_programs = \ ags_check_system_functional_audio_test \ ags_check_system_functional_machine_add_and_destroy_test \ ags_check_system_functional_machine_link_test \ ags_check_system_functional_line_member_add_and_destroy_test \ ags_check_system_functional_editor_workflow_test \ ags_check_system_functional_panel_test \ ags_check_system_functional_mixer_test \ ags_check_system_functional_drum_test \ ags_check_system_functional_matrix_test \ ags_check_system_functional_synth_test \ ags_check_system_functional_ffplayer_test \ ags_check_system_functional_notation_edit_test noinst_PROGRAMS = $(installcheck_programs) # functional test util library libgsequencer_check_system_test_la_SOURCES = ags/test/X/gsequencer_setup_util.c ags/test/X/gsequencer_setup_util.h ags/test/X/ags_functional_test_util.c ags/test/X/ags_functional_test_util.h ags/test/X/libgsequencer.h libgsequencer_check_system_test_la_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) libgsequencer_check_system_test_la_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) libgsequencer_check_system_test_la_LIBADD = $(libgsequencer_check_system_test_LIBADD) # functional audio test ags_check_system_functional_audio_test_SOURCES = ags/test/audio/ags_functional_audio_test.c ags_check_system_functional_audio_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_check_system_functional_audio_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_audio_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional machine add and destroy test ags_check_system_functional_machine_add_and_destroy_test_SOURCES = ags/test/X/ags_functional_machine_add_and_destroy_test.c ags_check_system_functional_machine_add_and_destroy_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_machine_add_and_destroy_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_machine_add_and_destroy_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_machine_add_and_destroy_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional machine link test ags_check_system_functional_machine_link_test_SOURCES = ags/test/X/ags_functional_machine_link_test.c ags_check_system_functional_machine_link_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_machine_link_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_machine_link_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_machine_link_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional line member add and destroy test ags_check_system_functional_line_member_add_and_destroy_test_SOURCES = ags/test/X/ags_functional_line_member_add_and_destroy_test.c ags_check_system_functional_line_member_add_and_destroy_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_line_member_add_and_destroy_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_line_member_add_and_destroy_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_line_member_add_and_destroy_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional editor workflow test ags_check_system_functional_editor_workflow_test_SOURCES = ags/test/X/ags_functional_editor_workflow_test.c ags_check_system_functional_editor_workflow_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_editor_workflow_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_editor_workflow_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_editor_workflow_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional panel test ags_check_system_functional_panel_test_SOURCES = ags/test/X/machine/ags_functional_panel_test.c ags_check_system_functional_panel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_panel_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_panel_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_panel_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional mixer test ags_check_system_functional_mixer_test_SOURCES = ags/test/X/machine/ags_functional_mixer_test.c ags_check_system_functional_mixer_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_mixer_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_mixer_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_mixer_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional drum test ags_check_system_functional_drum_test_SOURCES = ags/test/X/machine/ags_functional_drum_test.c ags_check_system_functional_drum_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_drum_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_drum_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_drum_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional matrix test ags_check_system_functional_matrix_test_SOURCES = ags/test/X/machine/ags_functional_matrix_test.c ags_check_system_functional_matrix_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_matrix_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_matrix_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_matrix_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional synth test ags_check_system_functional_synth_test_SOURCES = ags/test/X/machine/ags_functional_synth_test.c ags_check_system_functional_synth_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_synth_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_synth_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_synth_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional ffplayer test ags_check_system_functional_ffplayer_test_SOURCES = ags/test/X/machine/ags_functional_ffplayer_test.c ags_check_system_functional_ffplayer_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_ffplayer_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_ffplayer_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_ffplayer_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional note edit test ags_check_system_functional_notation_edit_test_SOURCES = ags/test/X/ags_functional_notation_edit_test.c ags_check_system_functional_notation_edit_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_notation_edit_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_notation_edit_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_notation_edit_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) ags-check-system: $(installcheck_programs) ./ags_check_system_functional_audio_test ./ags_check_system_functional_machine_add_and_destroy_test ./ags_check_system_functional_machine_link_test ./ags_check_system_functional_line_member_add_and_destroy_test ./ags_check_system_functional_editor_workflow_test ./ags_check_system_functional_panel_test ./ags_check_system_functional_mixer_test ./ags_check_system_functional_drum_test ./ags_check_system_functional_matrix_test ./ags_check_system_functional_synth_test ./ags_check_system_functional_ffplayer_test ./ags_check_system_functional_notation_edit_test gsequencer-1.4.24/ChangeLog0000644000175000017500000030036613256230424012447 00000000000000ags (1.4.24) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * reverted write double as exporting to audio file ags (1.4.23) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented MIDI input callback of AgsCoreAudioPort * implemented ags_playable_read_int() and ags_playable_write_int() * implemented new AgsPlayable interface functions in ags_sndfile.c and ags_ipatch.c * refactored AgsSequencerEditor to support AgsCoreAudioMidiin * added AgsCoreAudioMidiin support to ags_core_audio_server.c ags (1.4.22) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed do async start of AgsWindow * fixed concurrent access during animation ags (1.4.21) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * work-around reverted pulseaudio GMainLoop integration * implemented property AgsBasePlugin:id * improved ags_lv2_manager.c to be faster ags (1.4.20) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_functional_audio_test.c to create notation as needed * defaulted to disable OSS4 dependency ags (1.4.19) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_audio_set_audio_channels() to remove unneeded notation, automation and wave objects ags (1.4.18) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed copy to clipboard in AgsMatrix and AgsDrum ags (1.4.17) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed playback scope * fixed wrong count of runs and init code in ags_channel.c * minor-fixes ags (1.4.16) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed potential SIGSEGV during ags_recall_dssi_run_finalize() * fixed potential SIGSEGV during ags_recall_lv2_run_finalize() * removed redundant code in ags_simple_file.c ags (1.4.15) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * replaced pa_mainloop_new() by pa_glib_main_loop_new() * minor changes ags (1.4.14) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsLiveDssiBridge and AgsLiveLv2Bridge notation editor channel mapping ags (1.4.13) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed restore of AgsPattern * fixed ags_open_file.c to use correct file link * fixed async-safe ags_simple_file_read_machine() ags (1.4.12) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved ags_apply_synth.c to update rt-template * improved ags_clear_audio_signal.c to update rt-template ags (1.4.11) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsRecallID:recycling property * improved mutex lookup of rt-safe functions gs (1.4.10) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * minor-fixes to updating AGS_AUDIO_SIGNAL_RT_TEMPLATE ags (1.4.9) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AGS_AUDIO_SIGNAL_RT_TEMPLATE * implemented AgsAudioSignal::rt-template property * improved rt-safe option ags (1.4.8) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added missing rt-safe configuration option ags (1.4.7) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented configuration of AgsThreadPool:max-unused-threads and AgsThreadPool:max-threads * improved ags_performance_preferences_reset() to reset super-threaded scope ags (1.4.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved AgsPreferences to apply conservative default configuration ags (1.4.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * conservative default configuration * fixed SIGSEGV as configuring super-threaded scope audio * fixed SIGSEGV during ags_channel_recursive_cancel() ags (1.4.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed mutex access in ags_apply_bpm.c * fixed crash during ags_recycling_context_reset() and ags_channel_recursive_play_down() * updated gtk-doc related files ags (1.4.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed looped audio signal ags (1.4.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * more-fixes to return from unneeded processing ags (1.4.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed return from unneeded processing ags (1.4.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented rt-safe mode * implemented ags-rt-stream recall * implemented AgsLevel, AgsLevelBox, AgsVLevelBox, AgsHScaleBox and AgsScrolledScaleBox in libags-gui * fixed potential SIGSEGV in ags_devout_pcm_info() ags (1.3.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved use of paned widgets to use GtkViewport ags (1.3.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_notation.c and ags_automation.c to always match timestamp * increased timeouts of functional tests because build environment might have not much power ags (1.3.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed paste only as within defined offset of AgsNotation and AgsAutomation * fixed ags_notation_edit_draw_selection() to use vscrollbar to determine y offset * improved selection to select only within area ags (1.3.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed buffer-overflow in ags_synth_generator.c * improved ags.rc ags (1.3.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed possible unitialized AgsAudioSignal in AgsApplySynth * fixed all wrong string vector static initializers from char **strv to char *strv[] * fixed arbritary return in drawing functions without destroying cairo_t ags (1.3.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed accessing uninitialized pointer in ags_simple_file.c * fixed cursor positioning in AgsAutomationEditor * improved position labels of AgsNotationToolbar and AgsAutomationToolbar * updated ags_notation_test_find_near_timestamp() and ags_automation_test_find_near_timestamp() * minor-fixes in ags.rc ags (1.3.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented 4 paste modes of notation and automation editor * implemented AgsScale, AgsScaleBox, AgsVScaleBox, AgsHScaleBox and AgsScrolledScaleBox in libags-gui * implemented segmented automation * refactored AgsAutomationEditor * extended chap1.xml added sections about AgsMainLoop and common interfaces * extended all chapters to provide code tag to functions and added parameter types * fixed direct callback connect from libags-audio in ags_notation_editor.c * fixed missing callback AgsMachine::resize-audio-channels connect in ags_notation_editor.c ags (1.2.7) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_channel_get_level() * implemented ags_channel_recursive_reset_recall_id() * implemented ags_channel_recursive_init() * implemented ags_channel_recursive_run() * implemented ags_channel_recursive_cancel() * refactored ags_channel_recursive_play_init() * refactored ags_channel_recursive_play() * refactored ags_channel_recursive_play_threaded() * refactored ags_channel_recursive_reset_recall_ids() * improved ags_channel_set_recycling() * improved ags_channel_recursive_reset_recycling_context() ags (1.2.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * disable fatal mask * minor fixes ags (1.2.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed potential SIGSEGV due to NULL pointer dereference in ags_append_audio.c task ags (1.2.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * minor-fixes ags (1.2.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed SIGSEGV in ags_channel_set_recycling() and make ags_functional_machine_link_test pass * rollback ags_channel_recursive_play_init(), ags_channel_recursive_play() and ags_channel_tillrecycling_cancel() ags (1.2.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented async message AgsConnection:data-object and AgsAudioConnection:mapped-line * implemented ags_audio_disconnect() * improved thread-safety to AgsLine:channel and AgsEffectLine:channel properties * improved thread-safety AgsPatternBox and AgsCellPattern * improved thread-safety all audio tasks * improved thread-safety during ags_channel_set_link() and related * improved thread-safety during ags_channel_recursive_play_init() and related * improved thread-safety during ags_channel_recursive_cancel() * improved tasks which need to lock audio especially using AgsCropNote and AgsMoveNote * fixed change soundcard task since data-object was resetted for all connections * fixed AgsMoveNote and AgsCropNote to support segmented notation * fixed various NULL pointer dereference of mutices * minor-fixes ags (1.2.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed remaining launch callback of AgsTask while destroy AgsMachine * minor-fixes ags (1.2.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsNotationEditor and AgsNotationEdit * replaced AgsEditor by AgsNotationEditor and supporting segmented notation * replaced AgsNoteEdit and AgsPatternEdit by AgsNotationEdit * implemented AgsMessageDelivery and AgsMessageQueue * implemented messages of AgsAudio ::set-audio-channels, ::set-pads and ::done * implemented messages of AgsChannel ::add-effect, ::remove-effect and ::done * implemented AgsPiano and AgsScrolledPiano * implemented AgsDevin * implemented AgsJackDevin * implemented AgsPulseDevin * refactored direct callbacks to UI by replacing with messages * refactored ::set-audio-channels and ::set-pads of AgsAudio callbacks to be thread-safe * disabled AgsGuiThread synchronization with AgsTaskThread * extended AgsJackServer and AgsJackClient to support AgsJackDevin * extended AgsPulseServer, AgsPulseClient and AgsPulsePort to support AgsPulseDevin * extended AgsSwitchBufferFlag and AgsClearBuffer to support AgsDevin, AgsJackDevin and AgsPulseDevin * refactored AgsNotebook to be generic and move to libags-gui * improved ags-play-notation to support segmented notation * improved ags-record-midi to support segmented notation * improved ags-route-dssi to support segmented notation * improved ags-route-lv2 to support segmented notation * improved AgsSimpleFile to support segmented notation * fixed missing any_signal:: prefix of strings passing as pspec to g_object_disconnect() * use $(docdir) in Makefile.am ags (1.1.7) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * moved GtkStyle allocation to GtkWidget::realize() * fixed potential infinite loop during audio port related automation * fixed ags.rc * increased AGS_THREAD_POOL_DEFAULT_MAX_UNUSED_THREADS ags (1.1.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing style initializer of some widgets ags (1.1.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added support for ALSA default device * modified functional tests to use default device * modified ags_devout.c to apply device identifier fixup * minor bug-fixes ags (1.1.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_synth_generator_compute_extended() to deal with x <= 0.0 using floor() * fixed if-statements in ags_synth_generator_compute_extended() not to do array index excess ags (1.1.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_synth_generator_compute_extended() to deal with x <= 0.0 ags (1.1.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_cancel_audio_new() to use properties * fixed ags_set_samplerate_new() to use properties ags (1.1.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed SIGSEGV in ags_synth_generator_compute_extended() because NULL pointer dereference * fixed SIGSEGV in ags_oscillator.c caused by wrong assigned array index ags (1.1.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_synth_generator_compute_extended() * implemented AgsSynthGenerator:delay property * implemented needed properties of AgsApplySynth in order to use ags_synth_generator_compute_extended() * implemented AgsPositionNotationCursor * implemented AgsPositionAutomationCursor * refactored AgsApplySynth to use ags_synth_generator_compute_extended() * refactored ags_syncsynth_update() and ags_synth_update() to apply triple sync * refactored AgsOscillator to have triple sync * refactored AgsOscillator persistence in ags_simple_file.c * refactored ags_oscillator_disconnect() to use g_object_disconnect() * fixed possible SIGSEGV due to AgsXorgApplicationContext::dispose() as not using property in ags_start_soundcard_new() ags (1.0.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * extended documentation of libags and libags-audio to have comments for enums * fixed missing xinclude ags (1.0.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing ags-prepare recall related gtk-doc * fixed all interfaces to name inherited type field ginterface instead of interface * fixed gtk-doc fixup to do sed using globbing * fixed following additional / by gtk-doc fixup ags (1.0.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed possible SIGSEGV in ags_synth_generator_compute_with_audio_signal() * fixed missing includes of stdlib.h * fixed user's handbook removed unneeded column in tables ags (1.0.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added missing screenshots to tarball ags (1.0.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved max-precision configuration preferences to proper reset * improved ags_notebook_size_request() to always use -1 as requisition width * improved AgsRampAccelerationDialog to use 2 digits after decimal point * improved AgsSelectAccelerationDialog to use 2 digits after decimal point * extended user's manual and replaced all screenshots * added section "Envelope editor" to chapter 2 * added section "Envelope info" to chapter 2 * added section "Envelope pattern" to chapter 2 * added section "Move notes" to chapter 3 * added section "Crop notes" to chapter 3 * added section "Select notes" to chapter 3 * added section "Select acceleration" to chapter 5 * added section "Ramp acceleration" to chapter 5 * updated gtk-doc related Since field to have value 1.0.0 * fixed missing ags.rc entries of AgsSelectNoteDialog, AgsMoveAccelerationDialog, AgsSelectAccelerationDialog and AgsRampAccelerationDialog ags (1.0.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented :thread-pool property of AgsReturnableThread * implemented :max-precision of AgsThread * implemented configuration option of thread's max-precision property * implemented sticky controls * improved LV2UI plugin support to set controls value * fixed wrecked widget allocation of AgsEditor and AgsAutomationEditor ags (1.0.0-beta) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsPasswordStore and AgsAuthentication interfaces * TODO:JK: implemented destroy functions * TODO:JK: implemented iterator and recycling thread * TODO:JK: implemented AgsAbstractBasePluginManager * TODO:JK: implemented AgsPluginFactory * TODO:JK: implemented missing interface functions of AgsConnectable, ... * TODO:JK: implemented MIDI and sequencer API * TODO:JK: refactored AgsLadspaManager, AgsDssiManager, AgsLv2Manager and AgsLv2uiManager to inherit of AgsAbstractBasePluginManager * TODO:JK: extended AgsSoundProvider interface to provide plugin managers * extended AgsServiceProvider interface to provide managers ags (0.9.29) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsRampAccelerationDialog * implemented AgsSelectAccelerationDialog * implemented AgsSelectNoteDialog * improved functional-tests.mk to solve linker issue with circular dependency * improved unit-tests.mk to linker issue with circular dependency * added AGS_RECALL_RUN_FIRST and AGS_RECALL_RUN_LAST flags * fixed ags_turtle_load() buffer index excess * fixed ags_functional_note_edit_test.c array index excess in main() * fixed double free of string in ags_lv2_browser_plugin_uri_callback() ags (0.9.28) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsGuiThread minimum sync count with AgsTaskThread ags (0.9.27) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved conversion to floating point numbers by division instead of multiplication ags (0.9.26) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * non-destructive soundcard/sequencer preferences notify about restart GSequencer * removed all calls to gdk_threads_enter() and gdk_threads_leave() because the GSource it is synced with owns the lock. * full gtk_main() support by calling ags_gui_thread_do_run() * refactored ags_gui_thread.[ch] * refactored functional tests to run with gtk_main() ags (0.9.25) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved JACK latency but may cause bigger load ags (0.9.24) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented core-audio related code but without MIDI instrument support * refactored UI to schedule tasks by AgsGuiThread * fixed memory-leaks related to cairo_t * improved plugins search path you may now specify by environment variable ags (0.9.23) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed possible SIGSEGV as accessing removed soundcard or midi sequencer ags (0.9.22) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * trick pulseaudio pass to pa_stream_begin_write() n_bytes 0 ags (0.9.21) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved pulseaudio restart stream ags (0.9.20) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved pulseaudio eliminate feedback ags (0.9.19) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * provide quadratic and practical icon size * improved pulseaudio underflow detection * fixed pulseaudio non-initialized value might be a buffer-overflow ags (0.9.18) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags-oscillator-list restore failed due to typo ags (0.9.17) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed read of not finished write buffer during export audio file * fixed AgsExportWindow file exists response * fixed AgsExportWindow dead-lock during cancel of not existing playback * improved gsequencer.desktop to provide png file ags (0.9.16) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * provide context menu ags (0.9.15) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved gtk-doc installation and introduced fix-local-html and fix-online-html target * fixed missing check for NULL of gtk_combo_box_text_append_text() parameter in all source code * fixed missing LV2_UI cleanup handling * fixed missing pulseaudio backend in AgsExportSoundcard ags (0.9.14) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_pulse_port_get_latency() * improved throughput of pulseaudio by timed cond on stream request callback * fixed possible SIGSEGV as ags_channel_reset_recall_id() ags (0.9.13) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved ags_devout_adjust_delay_and_attack() and related * improved AgsPulsePort to omit polling thread twice * fixed missing volatile of AgsPollingThread's flags * fixed destroy machine crash during playback ags (0.9.12) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added mutices to AgsJackServer and AgsPulseServer * fixed memory leaks of mutices in AgsPulseClient, AgsJackClient, AgsPulsePort and AgsJackPort * fixed wrong parent class of dispose in ags_pulse_server.c and ags_jack_server.c * fixed data-race during playback termination in ags_pulse_devout_port_free() * fixed ags_application_context initialization if NULL (note might be reverted, soon) ags (0.9.11) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing initial configuration of pulseaudio * improved throughput of pulseaudio by using maxlength of stream -1 * improved clear buffer task to let ring-buffer being valid longer ags (0.9.10) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_pulse_server.c, ags_pulse_client.c and ags_pulse_port.c * implemented ags_pulse_devout.c * refactored AgsSoundcardEditor to work with pulseaudio, too * fixed memory leak related to mutex and its attributes for AgsDevout, AgsMidiin, AgsJackDevout and AgsJackMidiin * fixed missing paranthesis to check flags in ags_devout.c, ags_midiin.c, ags_jack_devout.c and ags_clear_buffer.c ags (0.9.9) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_input_apply_synth() and ags_input_apply_synth_extended() * fixed ags_syncsynth_reset_loop() to use attack to calculate loop upper * fixed ags_recall_container_find() and its flags to enumerate correctly * fixed ags_thread_pool_creation_thread() to check parent for NULL * enabled unit-test ags_input_test.c because not tested * new unit-test ags_midiin_test.c * new unit-test ags_output_test.c * new unit-test ags_playback_domain_test.c * new unit-test ags_playback_test.c * new unit-test ags_preset_test.c * new unit-test ags_recall_channel_test.c * new unit-test ags_recall_channel_run_test.c * new unit-test ags_recall_container_test.c * new unit-test ags_recall_dependency_test.c ags (0.9.8) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented pass base-note to AgsApplySynth * fixed missing base-note, audio-loop-start and audio-loop-end while read/write XML * fixed missing attack as calculating stream size * fixed ags_synth_util_get_xcross_count() and related functions ags (0.9.7) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_lv2_option_manager_lookup_extended() * implemented ags_lv2_plugin_event_buffer_alloc() * implemented ags_lv2_plugin_event_buffer_realloc_data() * implemented ags_lv2_plugin_event_buffer_concat() * implemented ags_synth_util_get_xcross_count() and related type specific implementations * implemented ags_synth_generator_compute() * implemented ags_synth_generator_compute_with_audio_signal() * deprecated ags_lv2_plugin_alloc_event_buffer() * deprecated ags_lv2_plugin_concat_event_buffer() * implemented ags_lv2_urid_manager_unmap() * implemented AgsSyncsynth in order to have true notation available to a synth * implemented ags_synth_generator_compute() * implemented ags_synth_generator_compute_with_audio_signal() * refactored AgsOscillator in order to be reusable * refactored AgsApplySynth task to use new synth generator functions * completed missing gtk-doc comments in ags_input.c and other files * fixed AgsExportSoundcard to don't add device as being NULL * fixed ags_lv2_option_manager_get_option() to lookup correctly * fixed ags_lv2_option_manager_set_option() to lookup correctly * new unit-test ags_lv2_option_manager_test.c * new unit-test ags_lv2_plugin_test.c * new unit-test ags_lv2_preset_test.c * new unit-test ags_lv2_uri_map_manager_test.c * new unit-test ags_lv2_urid_manager_test.c * new unit-test ags_lv2_worker_manager_test.c * new unit-test ags_lv2ui_manager_test.c * new unit-test ags_lv2ui_plugin_test.c * new unit-test ags_audio_connection_test.c * disabled new unit-test ags_input_test.c because not tested ags (0.9.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented new task AgsResetPeak * implemented ags_audio_buffer_util_peak() and related * refactored ags-peak recall to use above and compute only as needed ags (0.9.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed memory leak related to mutex attributes * fixed deny multi-start of AgsChannelThread or AgsAudioThread * fixed deny multi-stop of AgsChannelThread or AgsAudioThread * minor code improvements ags (0.9.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed many missing return values * fixed some unitialized pointers * fixed 64 bit portability issue in ags_recall_template_find_all_type() ags (0.9.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed unitialized pointer in AgsCellPattern and AgsPatternBox animation ags (0.9.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed possible concurrent access in ags-peak related code * fixed led array related bug that didn't show animation of AgsCellPattern and AgsPatternBox ags (0.9.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash after drum restore and doing sequencer playback ags (0.9.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed possible concurrent access in ags_cell_pattern.c * fixed finalize to call parent class of managers * fixed finalize to reset global variable after finalize of managers * fixed g_list_position() call to have nested g_list_find() in ags_polling_thread.c * fixed missing return in ags_destroy_entry_alloc() * fixed AGS_TASK_GET_CLASS() macro to remove not opened paranthesis * fixed ags_thread_init() to correct assign condition manager * fixed AGS_FILE_CHECKSUM_LENGTH macro to use string representation length * fixed missing serialization of thread frequency * fixed missing return of ags_file_write_thread() * extended chap3.xml to include documentation about workers * extended chap3.xml to include documentation about poll fds * extended chap3.xml to include documentation about mutex and condition manager * provide new prototypes in ags_notation.c and ags_note.c to work with SMF * new unit-test ags_complex_test.c * new unit-test ags_turtle_manager_test.c * new unit-test ags_log_test.c * new unit-test ags_application_context_test.c * new unit-test ags_connection_manager_test.c * new unit-test ags_config_test.c * new unit-test ags_condition_manager_test.c * new unit-test ags_mutex_manager_test.c * new unit-test ags_destroy_worker_test.c * new unit-test ags_polling_thread_test.c * new unit-test ags_poll_fd_test.c * new unit-test ags_returnable_thread_test.c * new unit-test ags_task_test.c * new unit-test ags_thread_pool_test * new unit-test ags_worker_thread_test * new unit-test ags_file_test * new unit-test ags_file_id_ref_test * new unit-test ags_file_launch_test * new unit-test ags_base_plugin_test.c * new unit-test ags_dssi_plugin_test.c * new unit-test ags_dssi_manager_test.c * new unit-test ags_ladspa_manager_test.c * new unit-test ags_lv2_manager_test.c * new unit-test ags_note_test.c * new unit-test ags_acceleration_test.c ags (0.8.10) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed orphaned AgsAudio after removing all soundcards to add again ags (0.8.9) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented move note task * implmeneted crop note task * implemented all task's finalize function * improved all task's to use properties to instantiate ags (0.8.8) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsMoveNoteDialog as additional editing tool * implemented AgsCropNoteDialog as additional editing tool * implmeneted missing ags_toolbar_disconnect() function ags (0.8.7) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsEnvelopeInfo plot * enable grid lines of tree view * added property AgsMachine:machine-name and thus did a small refactoring ags (0.8.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags-envelope to apply ratio * fixed various issues related to AgsEnvelopeDialog ags (0.8.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsPreset applicable to line ranges and store parameters * implemented to persist AgsLiveDssiBridge and AgsLiveLv2Bridge * implemented to store presets in AgsSimpleFile * extended ags-copy-pattern to use preset scope ags-envelope * extended AgsEnvelopeDialog to support presets and apply to pattern * improved ags-envelope to read frame count once ags (0.8.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsAddSoundcardEditor and AgsAddSequencerEditor dereference to wrong type * fixed not showing AgsPad as resize from 0 * fixed crash in AgsMeter as resize to 0 * fixed resize of AgsNotebook in AgsPatternEdit and AgsNoteEdit related resize to/from 0 * fixed shrink of AgsNotebook in AgsAutomationEdit ags (0.8.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsMidiParser to don't skip length of status messages * fixed libags-audio.h to not include removed header * fixed Makefile.am to use correct symlink of gtk-doc ags (0.8.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved ags.rc to support AgsMidiExportWizard and AgsMidiImportWizard * improved ags.rc to provide better color of active text * improved Makefile.am * added gettext support ags (0.8.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * optional libinstpatch dependency * implemented AgsEnvelopeDialog * refactored ags-envelope recall to use AgsComplex fields of AgsNote * added AgsEnvelopeDialog to AgsDrum, AgsMatrix, AgsDssiBridge and AgsLv2Bridge * added ags-envelope recall to ags_recall_factory.c * fixed unavailable AgsMidiDialog as doing delete-event * fixed functional test timed access to widget ags (0.8.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented MIDI import tracks * implemented MIDI export tracks * fixed AgsMidiBuilder serious problems * fixed ags_midi_buffer_util_seek() * fixed AgsMidiParser using wrong tempo and time signature allocation * fixed ags_midi_buffer_util.c same issue as above with tempo and time signature ags (0.7.136) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved performance of AgsGuiThread to consume less power * improved AgsMidiin to don't poll anymore in dedicated thread * improved AgsLog to have a mutex and use it during splash-screen ags (0.7.135) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented Lv2 program interface * implemented ags-play-dssi and ags-play-lv2 recall * implemented AgsLiveDssiBridge and AgsLiveLv2Bridge * fixed non-interleave lv2 audio data processing * support NULL input ags (0.7.134) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * merge stable * ? ags (0.7.133) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing reset of connection editor field of machine * fixed wrong subtract one of audio channels in bulk connection * fixed configuration to clear old config * fixed soundcard editor pcm info fails if soundcard busy, use default values ags (0.7.132) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented seperator within AgsLine and AgsEffectLine * implemented seemless mode of AgsDial * improved theme, dial style to have dark background ags (0.7.131) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented output listing editor to assign soundcard * improved theme and disable option ags (0.7.130) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved stability ags (0.7.129) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags-simple.xsl * improved mutices in ags_pad_play() and ags_line_channel_done_callback() * fixed missing persisting of machine name ags (0.7.128) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsLv2OptionManager * implemented passing options for AgsRecallLv2Run * modified UI to show visualization widgets for plugin output ports * modified ags-peak, ags-volume and ags-mute recalls to use float ports * disabled loading automation of output ports * fixed buggy code in ags_machine_selector_remove_index() by a work-around has a need for refactoring ags (0.7.127) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented LV2UI related code to do idle and show interface * improved splash picture to refresh frequently ags (0.7.126) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved mutices for recalls * improved AGS_THREAD_INTERMEDIATE_POST_SYNC * disabled ags_main_loop_interrupt() in ags_jack_client_process_callback() ags (0.7.125) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash in ags_jack_midiin_port_free() NULL pointer access * improved mutices doing playback ags (0.7.124) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed asynchronous ALSA output by incrementing ring-buffer size * fixed proper use of ppoll() with AgsDevout prior events wasn't set * implemented wait playback until device is available with AgsDevout * implemented AgsClearBuffer task * refactored AgsDevout and AgsJackDevout to use AgsClearBuffer task ags (0.7.123) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed distorted sound by clearing buffer that just was memcpy to ring buffer ags (0.7.122.24) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed NULL input * fixed non-interleaved Lv2 audio data ags (0.7.122.23) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented missing ags_route_lv2_audio_run_dispose() * fixed in ags-route-dssi use of parent ::finalize() during ::dispose() * fixed switch buffer flag to be done during poll MIDI device ags (0.7.122.22) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed LIBADD nad LDADD of GSequencer system check automake file ags (0.7.122.21) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing length of pattern ags (0.7.122.20) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed automation to use previous value if range doesn't match * added functional test to check editor workflow ags (0.7.122.19) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsEffectSeparator for AgsLine and AgsEffectLine * removed gtk separator in AgsLine and AgsEffectLine * disabled AgsDestroyWorker ags (0.7.122.18) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed dead-lock as removing line member * improved plugin browser to reset plugin type * improved the speed of functional tests * added functional test to check line member sanity ags (0.7.122.17) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsClearAudioSignal task * fixed ags_synth_update() it didn't clear the buffers correctly * added functional test to check link sanity ags (0.7.122.16) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed memory corruption of AgsFFPlayer destruction * fixed some AgsConnectable::disconnect() of machines * fixed potential infinite loop in ags_machine_resize_audio_channels() * added functional test add and destroy machine * added functional tests resize pads and audio channels ags (0.7.122.15) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing connect of AgsOscillator * fixed noise creation in AgsSynth * fixed SIGSEGV as adding plugin to AgsLine ags (0.7.122.14) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented notebook resize in automation editor * fixed NULL pointer dereference in ags_matrix.c * fixed resize pad to distinguish between input and output ags (0.7.122.13) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * stability improvements ags (0.7.122.12) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * decoupled gui thread ags (0.7.122.11) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixes to configuration in place * fixes to audio connection editor ags (0.7.122.10) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * TODO:JK: implemented ags-play-pattern recall * fixed broken optical feedback of peak * removed auto-scroll feature because it costs too much performance ags (0.7.122.9) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented non-deterministic mode i.e. performance mode * implemented ags_input_next_active() and ags_input_is_active() * implemented restore and persist of AgsLv2Bridge preset * disabled lv2 worker feature if not requested by plugin * fixed memory leak related to AgsReturnableThread * fixed crash related to notation offset cached * note disabled some signals ags (0.7.122.8) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * refactored ags-copy recall to instantiate like ags-buffer * implemented LV2 presets * implemented presets in AgsLv2Bridge * implemented ags-prepare recall * implemented AgsConditionManager to use with AgsThread tree lock functions * implemented worker threads * implemented destroy worker * improved AgsDelayAudio port instantiation to use default values * fixed using default values as no soundcard available * fixed crash as no soundcard configured within GUI * fixed AgsThread tree lock functions * added more unit tests in ags_thread_test.c ags (0.7.122.7) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsHLedArray and AgsVLedArray * implemented missing properties of AgsPlaybackDomain and AgsPlayback * implemented GObject::dispose() * refactored AgsCellPattern and AgsPatternBox to use AgsHLedArray * fixed reference counting of libags, libags_audio * fixed division by zero caused by AgsOscillator * fixed serious memory corruption in ags_pattern_set_dim() * fixed segmentation fault of AgsFFPlayer restore * fixed missing connection menu of AgsLv2Bridge after restore * extended unit tests ags (0.7.122.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * back-ported seemless mode of AgsDial * back-ported Lv2ui support * improved default theme * fixed configuration to use default values as soundcard busy * fixed clear configuration and provide default values as applying ags (0.7.122.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * providing default theme * fixed ags.rc support * fixed cell pattern painting * minor fixes ags (0.7.122.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * minor fixes ags (0.7.122.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * minor fixes ags (0.7.122.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * back-ported enable output ports to plugins * back-ported disable output ports on automation * back-ported enable built-in effects to do automation * fixed configuration in-place to reset frequency of appropriate thread * minor fixes ags (0.7.122.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * minor fixes ags (0.7.122) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented intermediate pre and post sync * refactored interfacing soundcard to do intermediate post sync * refactored interfacing sequencer to do intermediate pre sync * refactored ags_devout.c tightened the code and intermediate post sync * refactored ags_midiin.c intermediate pre sync * improved XPath doing lv2 turtle * fixed stop export and sequencer thread during soundcard stop * fixed ags_start_soundcard_finalize() without configured sequencer crashing * fixed potential dead-lock in ags_midiin_oss_poll() and ags_midiin_alsa_poll() * fixed proper termination of OSS and ALSA poll ags (0.7.121) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed Makefile.am to use -p and -m 644 parameter ags (0.7.120) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved Makefile.am use install instead of cp ags (0.7.119) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_export_window_reload_soundcard_editor() * implemented AgsExportSoundcard UI * refactored AgsExportWindow to allow export multiple soundcards * improved mutices in ags_record_midi_audio_run.c * improved mutices in ags_route_dssi_audio_run.c * improved mutices in ags_route_lv2_audio_run.c * fixed ags-audio.h to remove unused headers * fixed AgsSoundcardEditor and AgsSequencerEditor to remove JACK device ags (0.7.118) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed API reference removed unused objects * added COPYING.docs ags (0.7.117) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsAudio:midi-channel * implemented midi channel in AgsMidiDialog * implemented using midi channel in ags-record-midi * back-ported properties of tasks of branch 1.0 * fixed ags-record-midi recall to proper key-on and key-off ags (0.7.116) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_midiin_alsa_poll() and ags_midiin_oss_poll() * fixed possible NULL pointer access in ags_midiin_list_cards() * fixed AgsMidiin to always set nth_buffer during record * fixed in ags_midiin_set_device() to duplicate string and handle OSS4 >>>>>>> master ags (0.7.115) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed copyright statements replaced deprecated * fixed exclude OSS in GUI if not provided ags (0.7.114) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * disabled unused buttons yet * improved ags-record-midi recall ags (0.7.113) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed API docs and updated sections gs (0.7.112) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * providing headers libags.h, libags-audio.h and libags-gui.h * improved API reference ags (0.7.111) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented experimental MIDI support for ALSA, OSS4 and JACK ags (0.7.110) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * critical bug-fix data-race in ags_thread-posix.c resume interrupted threads after AgsAsyncQueue run * implemented ags_thread_reset_all() see above ags (0.7.109) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed data-race of AgsCellPattern and AgsMatrix callbacks ags (0.7.108) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented blacklist of plugins for AgsLadspaManager, AgsDssiManager, AgsLv2Manager and AgsLv2uiManager ags (0.7.107) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_base_plugin_sort() alphabetically plugins by effect name * improved AgsMenuBar to have sorted plugins by effect name see above ags (0.7.106) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsCartesian * fixed case-sensitive iriref in ags_turtle.c * added additional parameter to ags_lv2_manager_load_file() and ags_lv2ui_manager_load_file() in order to provide manifest ags (0.7.105) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsTicSoundcard task and fixed thereby data-race ags (0.7.104) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented splash-screen ags (0.7.103) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_soundcard_get_note_offset_absolute() * improved mutices in ags_navigation.c * fixed possible access of uninitialized memory in ags_cell_pattern_led_queue_draw_timeout() * fixed possible access of uninitialized memory in ags_pattern_box_led_queue_draw_timeout() * simplified seeking ags (0.7.102) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed use AgsSwitchBufferFlag task in ags_jack_client.c ags (0.7.101) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed rounding fault in ags_devout.c and ags_jack_devout.c ags (0.7.100) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed devhelp link to docs use underscore instead of minus * fixed in ags_lv2_plugin.c XPath no .// rather // as expression * improved timing issue as exporting audio data ags (0.7.99) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_turtle_read_langtag() for not being greedy. ags (0.7.98) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixes to ags_turtle.c UTF-8 ranges and other issues * added ags_turtle_test unit test ags (0.7.97) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_midi_buffer_util_test.c using wrong variable * improved test suite to have LC_ALL and LANG set to C ags (0.7.96) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed in ags_midi_buffer_util.c some missing return values and other issues * improved test coverage of ags_midi_buffer_util.c to almost completed ags (0.7.95) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed unit test ags_midi_buffer_util_get_song_select() ags (0.7.94) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed unit test ags_recall_test_duplicate() to have proper type in callback * extended ags_midi_test.c to provide more unit tests ags (0.7.93) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed automation edit restore from simple file ags (0.7.92) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added unit tests of ags_midi_buffer_util.c * fixed ags_midi_buffer_put_varlength(), it was defunctional * fixed missing check of AgsRecallDssi in ags_channel.c ags (0.7.91) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added unit tests in ags_automation_test.c and ags_recall_test.c * fixed automation toolbar to toggle port correctly and added empty port * fixed ags_midi_buffer_util.c, ags_midi_builder.c and ags_midi_parser.c to conform MIDI specs * NOTE arguments are shifted for MIDI SMTPE related functions ags (0.7.90) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed handle NULL pointer client don't pass it to JACK * back-ported ags_midi_buffer_util.[ch] from 1.0 * back-ported ags_midi_builder.[ch] from 1.0 ags (0.7.89) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash after opening file with unavailable audio file link * improved mutices in ags_editor_tic_callback() ags (0.7.88) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing usage of attack affects BPM * fixed code performance issue in ags-play-notation recall * removed free-wheel within jack client because not supported * modified default buffer size to 1024 ags (0.7.87) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsSoundcardEditor not allowed free of string * fixed ags_soundcard_editor_add_soundcard() ignore AgsJackDevout * fixed ags_soundcard_editor_remove_soundcard() ignore AgsJackDevout ags (0.7.86) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsNotifySoundcard to fast lock AgsSoundcard * implemented cyclic tasks in ags_task_thread_run() * implemented ags_task_thread_append_cyclic_task() * implemented ags_task_thread_remove_cyclic_task() * refactored ags_thread-posix.c to set AgsThread->tic_delay to be reset synced ags (0.7.85) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsThread detach thread if not running while finalize * fixed AgsReturnableThread is not detached by default * fixed detach thread as calling AgsThread::stop() ags (0.7.84) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed wrong type of ags_recycling_context_new()'s function argument * fixed integer overflow in ags_channel.c while allocating AgsRecyclingContext ags (0.7.83) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed potential infinite-loop * fixed race-condition as resizing audio channels and pads within gui thread ags (0.7.82) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_playable_read_audio_signal() without resampling frame count ags (0.7.81) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed not negated if condition in ags_ladspa_manager_get_filenames() * fixed non-synth lv2 plugins accessing NULL pointer ags-count-beats recall * fixed potential NULL pointer access in ags_recall_lv2_run_finalize() * fixed AgsRecallLv2Run to have :run-inter() for non-synths * fixed AgsRecallLadpsaRun, AgsRecallDssiRun and AgsRecallLv2Run to use correct copy mode * implemented ags_audio_buffer_util_clear_buffer() ags (0.7.80) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed restore of AgsBulkMember toggle button ags (0.7.79) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed potential NULL pointer access in ags_recycling_create_audio_signal_with_frame_count() ags (0.7.78) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_audio_file_write() to have additional format parameter * fixed potential NULL pointer in ags_audio_file_write() ags (0.7.77) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsCellPattern to shrink vertical scrollbar in AgsMatrix * fixed AgsMidiDialog reset * improved clear JACK buffer during no playback ags (0.7.76) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed sample selection of AgsIpatch * improved open multi-channel samples in ags_ffplayer_callbacks.c ags (0.7.75) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed synth generator * fixed ags_recall_find_all_type() ags (0.7.74) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_midi_buffer_util_put_varlength() to encode multi-byte properly * reverted AgsThread frequency * added additional parameter to ags_ladspa_manager.c to pass instance * added additional parameter to ags_dssi_manager.c to pass instance * added additional parameter to ags_lv2_manager.c to pass instance * added additional parameter to ags_lv2ui_manager.c to pass instance * improved AgsFFPlayer to resize audio channels * fixed relevant clang scan-build errors ags (0.7.73) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed removed types of libags_gui.types of gtkdoc * fixed return value to be void * of ags_stream_alloc() * fixed ags_audio_set_pads() to shrink correctly * improved ags_recycling_create_audio_signal_with_frame_count() to reduce overhead * improved JACK synchronization ags (0.7.72) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed configuration ags (0.7.71) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed restore JACK from file ags (0.7.70) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed most compiler warnings ags (0.7.69) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * minor fixes to API removed non-existing symbols and alike * added symbols file libags.sym, libags_audio.sym and libags_gui.sym ags (0.7.69) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed stop all soundcard threads because only one was stopped ags (0.7.68) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed close JACK client while ags_application_context_quit() * fixed configure.ac to check for atk-1.0 with AC_CHECK_LIB * fixed add/remove soundcards using AgsAudioPreferences * modified on file open failure to call ags_application_context_quit() instead of exit(-1) because JACK needs clean-up * improved configure.ac to give hint that ALSA and OSS is enabled * added --enable-oss argument to configure.ac ags (0.7.67) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing soundcard info of ags-sf-line * updated ags_simple_file.dtd ags (0.7.66) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed chrash while reading configuration with AgsSimpleFile * fixed persisting/restore of AgsSoundcard from configuration with AgsSimpleFile ags (0.7.65) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented JACK audio output support * implemented configuration of multiple soundcard support * implemented AgsAudioSettings to configure your soundcards * implemented AgsConnectionEditor to assign your soundcards * implemented ags_jack_devout.c missing functions ags_jack_devout_list_cards() and ags_jack_devout_pcm_info() * implemented ags_jack_devout.c adjusting pcm channels * implemented ags_time_get_uptime_from_offset() * implemented AgsConnectionManager and AgsConnection * implemented AgsAudioConnection to assign ressources to channels * implemented ags_jack_server_connect_client() to connect at an arbitrary time * implemented AgsChangeSoundcard task to reset AgsAudioConnection * implemented AgsAddSoundcard and AgsRemoveSoundcard task * implemented resampling in ags-buffer, ags-copy and ags-play recalls * refactored configuration access and minor fixes to it * refactored AgsAudioPreferences to use AgsAudioSettings * refactored AgsAudioApplicationContext and AgsXorgApplicationContext to load multiple soundcards * extended AgsAudio to use AgsAudioConnection * extended AgsChannel to use AgsRemoteChannel * minor-fixes caused accessing NULL pointers ags (0.7.64) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented OSS support ags_devout_oss_init(), ags_devout_oss_play() and ags_devout_oss_stop() * implemented OSS part of ags_devout_get_poll_fd() and ags_devout_get_pcm_info() * fixed potential dead-locks in ags_devout.c * fixed string format in ags_devout.c * replaced ALSA MIDI decoder with ags_midi_buffer_util_decode() * added library completion routines ags_strv_contains() and ags_strv_length() * improvded configure.ac to partially disable ALSA support ags (0.7.63) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed possible NULL pointer access caused by ags_audio_application_context.c and ags_xorg_application_context.c * fixed possible dead-lock in ags_play_audio_signal.c * fixed format configuration issues in ags_audio_signal.c * fixed ags_functional_audio_test.c * fixed ags_audio_test.c * fixed ags_channel_test.c * fixed ags_notation_test.c * fixed ags_pattern_test.c * fixed ags_recycling_test.c * fixed ags_thread_test.c * improved ags_devout.c to not allow set non-existing soundcard except default hw:0 ags (0.7.62) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved build system * improved ags_functional_audio_test.c to provide configuration ags (0.7.61) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed build system ags (0.7.60) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed spelling error unknow to unknown * fixed underscore to score of installation directories * modified libgsequencer to be private ags (0.7.59) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed package name in .pc files ags (0.7.58) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * split API reference ags (0.7.57) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * relicensed docs to be GFDL+3 without invariant sections ags (0.7.56) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed Makefile.am to install libags-1.0.pc * improved developer manual * improved set AgsApplicationContext's instance in gsequencer_main.c * implemented timestamp property of AgsAutomation * implemented ags_thread_add_start_queue() and ags_thread_add_start_queue_all() ags (0.7.55) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash on missing poll descriptor * fixed first connect and then reset AgsPreferences in order to get valid configuration * improved error setting and handling in ags_devout_alsa_init() handling now wrong configuration * disabled Lv2 context menu of AgsMachine * added libags.pc.in file ags (0.7.54) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing addition of overclock value of soundcard in ags_simple_file.c * fixed wrong sequencer duration calculated by wrong delay now it gets it of AgsSoundcard * fixed use of uninitialized value in ags_cell_pattern.c and ags_pattern_box.c * fixed persist virtual audio and midi mapping * fixed reset buffer-size and samplerate of AgsAudio as setting AgsSoundcard * fixed default frequency of AgsAudioThread and AgsChannelThread * implemented character ring-buffer in ags_devout.c * implemented to interrupt AgsLv2Worker thread * implemented time_late field of AgsThread and thereby reduced distortion * updated ags_simple_file.dtd in order to enable midi mapping ags (0.7.53) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed readjust delay as modify buffer size or samplerate of soundcard * fixed tempo divide delay by 16.0 and corrected bpm calculation * implemented ags_soundcard_get_uptime() * implemented ags_cell_pattern_led_queue_draw_timeout() and ags_pattern_box_led_queue_draw_timeout() ags (0.7.52) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed resetting buffer size and samplerate because threads might not have been added to the tree, yet * implemented midi mapping of DSSI and Lv2 synths ags (0.7.51) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed freed overwritten temporary string in ags_set_output_device.c * fixed reset frequency of main loop in ags_apply_presets.c ags (0.7.50) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_polling_thread.[ch] and ags_poll_fd.[ch] * implemented ags_soundcard_get_poll_fd() and ags_soundcard_is_avialable() * using AgsPollingThread in ags_soundcard_thread.c and ags_gui_thread.c * fixed use of freed string in ags_audio_preferences.c as apply soundcard * improved priorities ags (0.7.49) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed data-race of resetting soundcard device and apply presets * improved API reference manual * deleted ags_perform_automation_audio.[ch] and ags_perform_automation_audio_run.[ch] because it is not needed, see AgsRecall::automate ags (0.7.48) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed restart soundcard playback as doing ags_apply_presets_launch() * implemented AgsNote in AgsAudioSignal * improved gtk-doc related files ags (0.7.47) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * modified Makefile.am to use -Wformat and -Werror=format-security * modified Makefile.am to include docs/images/ags_automation_window_dssi_xsynth.png * fixed format security errors ags (0.7.46) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsMainLoop::interrupt and AgsMainLoop::monitor * implemented AgsThread::interrupted and use it in ags_gui_thread.c * implemented ags_audio_loop_timing_thread() to emit AgsMainLoop::interrupt * fixed configuration in place of AgsSynth and AgsFFPlayer by using AgsSynthGenerator repectively AgsAudioFileLink * fixed AgsTactable signals to be emitted * fixed configuration in place to reset thread frequency * added thread posix signals to AgsGuiThread ags (0.7.45) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented resetting samplerate, buffer size and format. Thus added properties to AgsAudio and AgsChannel. * implemented ags_audio_file_check_suffix() and ags_ipatch_check_suffix() * implemented ags_input_open_file() * implemented soundcard property of AgsIpatch * implemented preset, instrument and sample property of AgsAudioFileLink * implemented AgsSynthGenerator and ags_synth_util.c * implemented copy functions in ags_audio_buffer_util.c * implemented AgsApplyPresets recall * refactored replacing template AgsAudioSignal as adding new template * improved mutices in ags_audio_open_files() * fixed ags_devout_realloc_buffer() to use pcm_channels instead of dsp_channels ags (0.7.44) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing parsing of alsa-handle key of configuration within AGS simple file * fixed AgsExportThread JIFFIE and AGS_THREAD_START_SYNCED_FREQ flag * fine-tuned performance and thus providing some fixes ags (0.7.43) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags-count-beats recall to ommit tics * fixed timing issue of toplevel AgsThread limit nanosleep() to band * fixed missing read of config values in ags_soundcard_thread() to calculate its frequency * improved ref/unref AgsAudioSignal because it wasn't properly done * modified ags_recall_recycling.c to not cache AgsAudioSignal * modified default frequency to 1000 Hz and buffer size of 512 ags (0.7.42) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed dead-lock caused by adjusting buffer size or samplerate as reading config from file * fixed really bad memory leak during playback of audio signal on AgsInput because of missing g_object_unref() * fixed ags_notation_test.c - it crashed because of wrong data type for ags_note_new_with_offset() * implemented properties of AgsNote ags (0.7.41) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ommiting delayed playback in ags_play_notation_audio_run.c * fixed crash during load of lv2 directories without manifest.ttl * fixed don't queue draw destroyed widgets * fixed remove audio from soundcard as destroying AgsMachine * fixed crash during playback after destroy of AgsMachine NOTE: see below * NOTE: you have to do proper clean the audio tree ags (0.7.40) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed zero-length notes in ags_note_duplicate() and return NULL * fixed negative-length notes in ags_note_duplicate() by swapping x values * fixed encoding special char of strings in ags_turtle.c * fixed AgsNotebook fixed width to resizeable * fixed use of previous value on reenter loop in automation * improved regexp to read string literals in ags_turtle.c * improved AgsLineMember and AgsBulkMember to escape their strings * implemented resize of AgsNotebook previously it was fixed size * implemented abort on not present plugin during file open since you will damage your file ags (0.7.39) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsLv2Worker to return from AgsReturnableThread * fixed some memory leaks in ags_recall_lv2_run.c * fixed annoying painting mistake in ags_meter.c missing padding caused ugly effect on top * fixed AGS_MACHINE_SELECTOR_SHOW_REVERSE_MAPPING and AGS_MACHINE_SELECTOR_SHOW_SHIFT_PIANO are removed from ags_automation_editor.c because it is not supported * improved AgsThreadPool to take from the end of the list because previously it took the ones just instantiated ags (0.7.38) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed remove of effects because refactoring broke it * fixed remove of automation as removing effect because before it was left there * fixed remove automation as shrink audio channels or pads * fixed XPath and xmlNode names of turtles to lower-case * fixed XPath expressions in ags_lv2_plugin.c to access plugin correctly because it returned all plugins instead of one * implemented update automation editor on add/remove effect look at ags_automation_editor_reset_port(), it is new * implemented prefix of AgsNotebook now for automation line and notation channel * added mutices to ags_toolbar.c ags (0.7.37) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed infinite loop in ags_automation_editor.c - line = line++ * fixed restore of controls * fixed AgsNavigation set bpm * fixed missing length of AgsDrum and AgsMatrix * optimized XML file output ags (0.7.36) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash in ags_recycling_create_audio_signal_with_frame_count() because premature end wasn't handled * fixed dead-lock caused by AgsNavigation callbacks * fixed missing AgsThreadPool for AgsLv2WorkerManager in ags_setup() * fixed unlock libinstpatch mutices in ags_ipatch.c because else ending in dead-lock * fixed looped AgsRecallDssiRun and AgsRecallLv2Run * improved AgsLadspaBrowser and AgsLv2Browser to not load default directory every time ags (0.7.35) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed clip-board by merging values since automation ports can occur multiple times * fixed map width of automation editor * fixed clipped selection * fixed reset automation editor position * fixed ruler widget because the previous code obviously did wrong use of ceil() * fixed translate values in automation editor * fixed line member editor hide bulk * fixed not available line member port it was broke because of refactoring * implemented Atk interfaces in ags_automation_edit.c * implemented selection of automation editor * implemented ags_soundcard_get_loop(), ags_soundcard_set_loop() and ags_soundcard_get_loop_offset() * improved loop mode * improved AgsPad mutices in ags_pad_init_channel_launch_callback() * improved remove line effect and effect line effect * improved remove effect bulk effect * improved ags_channel_remove_effect() to work with LADSPA and Lv2 because it was only usable with LADSPA * added mutices automation editor * added missing mutices to ags_navigation_callbacks.c * added mutices in ags_effect_bulk.c * added mutices in ags_line.c and ags_effect_line.c ags (0.7.34) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed disapearing automation caused by missing tact factor appliance * fixed y value in ags_automation.c to gdouble because it was y previously * fixed missing souncard identifier in audio preferences * improved remove of notes by specify number of attempts until giving up * implemented cursor in automation editor * implemented copy, cut and paste in AgsAutomationEditor * implemented key-strokes in ags_automation_edit_callbacks.c * introduced new config key disable-feature because you don't want experimental code in production ags (0.7.33) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * using AgsConversion in ags_line_member.c and ags_bulk_member.c if available * using bypass flag in ags_recall_audio_automate() and ags_recall_channel_automate() * using AgsConversion in automation editor * implemented reset of AGS_AUTOMATION_BYPASS in automation toolbar ags (0.7.32) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed remove of menu after rename of AgsMachine * fixed update editor and automation editor after rename * fixed automation data * fixed missing XPath preamble of automation editor's machine radio button * fixed NULL pointer access in ags_automation_toolbar_apply_port() * implemented save/restore of ports within automation editor ags (0.7.31) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed automation editor drawing while setting value with a different lower bound than 0.0 * fixed setting value on AgsAcceleration likewise above * fixed freed name string of AgsMachine * optimized drawing of values by ommiting already drawn values within AgsAutomationArea ags (0.7.30) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented loading automation ports of LADSPA, DSSI and Lv2 plugins * implemented adding automation data * implemented removing automation data ags (0.7.29) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_audio_set_audio_channels() to do proper setup * fixed ags_lv2_bridge_set_audio_channels() and ags_dssi_bridge_set_audio_channels() to iterate correctly * fixed show of newly created AgsLine as calling ags_machine_resize_audio_channels() * fixed scroll of AgsNotebook ags (0.7.28) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed worst memory leaks * refactored gsequencer_main.c because it was a mess * refactored peak callback to use g_timeout_add() giving better performance * improved timer support * provided example file ags (0.7.27) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed format string ags (0.7.26) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * removed wrong envelop information from notation in ags_simple_file.c * fixed Makefile.am to include aclocal.m4 ags (0.7.25) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsLadspaBridge, AgsDssiBridge and AgsLv2Bridge restore from XML * implemented AgsSimpleFile which is much faster than AgsFile * implemented AgsSimpleFileRead task for reading files using simple API * implemented AgsSimpleFileWrite task for writing files using simple API * implemented AgsSimpleAutosaveThread that makes use of AgsSimpleFile to save its files * implemented :control_type_name parameter of ags_line_add_effect() * fixed duplicated entries in plugins manager: AgsLadspaManager, AgsDssiManager and AgsLv2Manager ags (0.7.24) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed Makefile.am to include entire documentation and having a build * fixed ags_config.c to use working default values ags (0.7.23) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed proper license information and notes in README * included ags_marshallers.list in tarball ags (0.7.22) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_update_bulk_member.c to work with DSSI and improved the code * fixed Lv2 playback * fixed Lv2 atom sequence type and Lv2 atom body access in ags_lv2_plugin.c ags (0.7.21) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented support for integer adjustments of LADSPA, DSSI and Lv2 * improved configure.ac * fixed DSSI playback and bank selection * fixed finding AgsBulkMember ports ags (0.7.20) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed proper version information of *.so, *.a and *.la * fixed version information in --version to use AGS_VERSION macro * improved ags_dial.c by clearing background ags (0.7.19) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed dead-lock in ags_thread_loop() * fixed inresponsive AgsDrumInputPad * fixed unset AGS_DEVOUT_INITIALIZED flag as stopping the device ags (0.7.18) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed not nul-terminated string in ags_export_window.c * fixed missing include in ags_export_window.c * fixed initialization and reference count of async_queue in AgsAudioLoop * set environment variables LANG and LC_ALL programmatically to C ags (0.7.17) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed wrong reference count in ags_recycling_real_add_audio_signal() * refactored ags_thread_pool.c due to performance impact of new code * refactored AgsThread flags * implemented threads to start synced * implemented AgsSwitchBufferFlag task because of data-race * implemented ags_thread_chaos_tree() ags (0.7.16) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed uninitialized values in ags_ipatch_sf2_reader.c * fixed Soundfont2 playback ags (0.7.15) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed Soundfont2 support * fixed dead-lock while stop multi-channel playback * fixed open WAV files within AgsDrum * implemented ags_open_sf2_sample.c ags (0.7.14) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented AgsConcurrentTree in ags_devout.c and using it in ags_channel.c * added task_completion_mutex to AgsGuiThread * fixed memory-leak in ags_thread_pool.c ags (0.7.13) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * reverted changes of AgsTaskThread and AgsThreadPool * extended developers book * fixed dead-lock with AgsTaskThread ags (0.7.12) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed all unit tests * fixed ags_recycling_create_audio_signal_with_frame_count() * implemented timestamp property of AgsPattern and AgsNotation ags (0.7.11) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed unit tests * fixed editor bug * refactored ags_recycling_create_audio_signal_with_frame_count() * implemented AgsGenericMainLoop * added many unit tests in ags_thread_test.c ags (0.7.10) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed XML IO * implemented read and write functions of AgsLadspaBridge, AgsDssiBridge and AgsLv2Bridge * fixed lock AgsPort as running recall ags (0.7.9) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented conversion objects AgsLadspaConversion and AgsLv2Conversion * implemended lv2 feature AgsLv2UridManager * improved AgsLadspaPlugin, AgsDssiPlugin and AgsLv2Plugin to relay on conversion objects * removed JACK server functions because of duplicated symbols * fixed integer support of plugins in ags_line_member.c and ags_bulk_member.c * fixed editing notation especially ags_notation_add_note() that was broken ags (0.7.8) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed lv2 event buffer functions * fixed wrong property mapping in ags_recall_lv2.c * implemented ags_lv2_uri_map_manager.c * implemented ags_lv2_log_manager.c * implemented ags_lv2_worker_manager.c * implemented ags_lv2_event_manager.c * implemented ::find-port in ags_machine.c, ags_pad.c ags_line.c, ags_line_member.c, ags_effect_bridge.c, ags_effect_bulk.c, ags_bulk_member.c, ags_effect_pad.c and ags_effect_line.c * refactored ags_machine_set_audio_channels() to ags_machine_set_audio_channels_callback() and added ags_machine_resize_audio_channels() in order to have a straight forward API * refactored ags_machine_set_pads() to ags_machine_set_pads_callback() and added ags_machine_resize_pads() in order to have a straight forward API * implemented XML IO of ags_effect_bridge.c and related * implemented XML IO of ags_automation_window.c and related * added AgsConversion prototype ags (0.7.7) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed XML IO * implemented ags_route_lv2_audio.c and ags_route_lv2_audio_run.c ags (0.7.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed Lv2 XPath and thus refactored code * implemented ags_base_plugin.c, ags_ladpsa_plugin.c, ags_dssi_plugin.c and ags_lv2_plugin.c to reduce over-head * implemented contextual XPath lookup in ags_turtle.c * refactored ags_recall_ladspa{,_run}.c, ags_recall_dssi{,_run}.c and ags_recall_lv2{,_run}.c to use the new plugins API * refactored ags_effect_bulk.c, ags_effect_line.c and ags_line.c to use the new plugins API * added ags_string_util.c ags (0.7.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed DSSI support ags (0.7.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * forwarded changes since 0.6.18 * fixed dead-lock, initial run of thread won't skipped anymore * migrated lv2 related XPath queries to new DTD * implemented adding dssi plugin to effect bulk within the effect bridge * implemented effect bridge menus of ladspa, dssi and lv2 * implemented ags_thread_clock() as signal * implemented ags_dssi_bridge.c ags (0.7.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved AgsMidiDialog * implemented many properties get and set functionality * implemented JACK support * refactored ags_turtle.c * added AgsFunction prototype ags (0.7.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags_midi_file.c * implemented ags-route-dssi recall to route MIDI events to DSSI * implemented ags_midi_dialog{,_callbacks}.[ch] to select MIDI input device * fixed some of the API Documentation ags (0.7.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added AgsComplex boxed type * added skelletons to interface with JACK * implemented DSSI support * added AgsMidiBuilder prototype * improved AgsMachineSelector ags (0.7.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * refactored renaming AgsRecyclingContainer to AgsRecyclingContext * refactored implenting AgsApplicationContext to superseed AgsMain * implemented providing library support ags (0.6.56) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed do proper unlink channel as destroying it ags (0.6.55) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed don't do pthread_yield() at the end of last tic per cycle * fixed removed struct in struct of AgsThread * fixed ags_config_get() non-static mutex with static initializer ags (0.6.54) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed optimal through-put strategy to achieve better performance, by skipping very first cycle's nanosleep() call ags (0.6.53) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed distortion because of false recycling context allocation * fixed restore from XML removed inverted audio channel ags (0.6.52) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing call to gdk_threads_enter() and gdk_threads_leave() in main.c ags (0.6.51) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed NULL pointer access during main() by waiting gui thread to be started * fixed two race-conditions by editing ags_thread_pool.c ags (0.6.50) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * grained timing in ags_thread_clock() * fixed dead-lock during initial thread run of AgsAsyncQueue see ags_task_thread.c and ags_thread-posix.c ags (0.6.49) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed find child recall in ags_play_notation_audio_run.c ags (0.6.48) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed wrong parameter to nanosleep() in ags_thread_real_clock() ags (0.6.47) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * definitely-fixed wrong parameter to nanosleep() in ags_thread_real_clock() * fixed data-race in ::tact callback of AgsDrum and AgsMatrix and possible NULL pointer access ags (0.6.46) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed wrong parameter to nanosleep() in ags_thread_real_clock() ags (0.6.45) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed recently introduced bug that caused AgsMixer to be muted ags (0.6.44) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed call to nanosleep() to use correct tact information ags (0.6.43) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed seeking playable after read in order to work with libsndfile * fixed usage of gdk_threads_enter() and gdk_threads_leave() because some were missing ags (0.6.42) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved performance by optimizing computing time ags (0.6.41) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed proper restore of GtkVScale digits * fixed proper restore of edit button of AgsDrum ags (0.6.40) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed memory leak in ags_generic_preferences.c but wasn't that bad * fixed using prefered gtk_main_iteration_do() what gives you better program stability ags (0.6.39) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed stack-corruption caused by integer overflow while doing variable typo ags (0.6.38) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * work-around dead-lock as doing ipatch_file_identify_open() from different threads ags (0.6.37) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing GMainContext acquire in ags_gui_thread.c * fixed NULL pointer accessing by moving code * fixed buffer-overflow because of swapped indices in ags_recycling.c ags (0.6.36) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed introduced bug in ags_ffplayer.c because of missing mapping recalls ags (0.6.35) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed SIGINT while accessing recycling_container being NULL in ags_channel_init_recall() ags (0.6.34) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed wrong acquisition of AgsAudioSignal in ags_recall_recycling.c ags (0.6.33) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed restore of AgsFFPlayer * implemented AgsStartReadFile task * modified startup of thread and file launch as reading from files ags (0.6.32) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing offset of loop audio data with lower frame count ags (0.6.31) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed loop audio data with lower frame count than buffer size * fixed memory corruption with freed list in ags_notation_cut_selection() * fixed toggling toolbar editing tool after restoring from XML file * work-around deleting GList notes of AgsNotation ags (0.6.30) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsFFPlayer loading Soundfont2 ags (0.6.29) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed dead-lock while selecting notes within note edit * fixed integer-overflow in ags_delay_audio_run_notation_alloc_output(), ags_delay_audio_run_notation_alloc_input() and ags_delay_audio_run_notation_count() * fixed wrong-lock order in ags_play_notation_audio_run.c * fixed buffer-overflow in ags_audio_signal_create_audio_signal_with_frame_count() ags (0.6.28) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed non-atomic access to atomic flags of AgsThread in ags_start_devout.c * reverted ags_gui_thread_run() functionality * fixed initial value of LADSPA plugin as reading from file ags (0.6.27) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * work-around in ags_notation_remove_note_at_position() to fix memory corruption ags (0.6.26) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed NULL pointer during key editing in editor * fixed race conditions in pattern and note edit * fixed missing reset link in ags_notation_add_note() * fixed access to invalidated pointer in ags_notation_remove_note_at_position() ags (0.6.25) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_thread_find_type() and ::run of all thread implementations to be safer * fixed dead-lock while pasting notes that caused application to crash ags (0.6.24) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed dead-lock while open XML files * fixed misconfigured port ags (0.6.23) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed REVERSE_TAB to escape focus of AgsDial by forward control keys * fixed _File mnemonic in menubar ags (0.6.22) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed relative path to gsequencer while applying properties ags (0.6.21) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed restoring and allocation of AgsLineMember dimensions * fixed SIGINT while reading XML files including AgsRecallLadspa ags (0.6.20) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed unrolled functions to have correct stop * fixed selection in ags_pattern_edit_callbacks.c and ags_note_edit_callbacks.c because it used wrong context * fixed ags_recall_real_cancel() because children field might have changed ags (0.6.19) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed accessing NULL pointer in ags_synth.c * fixed accessing NULL pointer in ags_ipatch.c * fixed accessing NULL pointer in ags_ffplayer_callbacks.c * fixed missing lock of mutex in ags_playable.c ags (0.6.18) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed volatile thread tree accessors * refactored by removing AgsAudioLoop fields and replacing with ags_thread_find_type() * work-around for resetting link and causing crash ags (0.6.17) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * enrolled built-in functions ags (0.6.16) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed refactored code of ags_channel.c because of bugs ags (0.6.15) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash while unlink channel and then do playback because recycling wasn't updated properly * fixed dead-lock while muting pad * enhaced AgsMachineEditor to be thread-safe * modified ags_audio_loop.c and ags_gui_thread.c to process in parallel ags (0.6.14) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed NULL pointer in ags_line.c as accessing mutex manager * fixed NULL pointer in ags_drum_output_line.c as accessing machine while setting channel ags (0.6.13) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added even more mutices to guarantee thread-safety ags (0.6.12) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added more mutices to guarantee thread-safety ags (0.6.11) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed race condition caused as stopping the engine ended in a dead-lock ags (0.6.10) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed startup dead-lock * implemented ags_main_loop_get_tree_lock() ags (0.6.9) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed missing notation due to refactoring of 0.6.8 ags (0.6.8) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed super-threaded scope audio and channel to be thread-safe * refactored ags_audio_set_audio_channels() and ags_audio_set_pads() * improved ags_channel_set_recycling() to instantiate AgsRecallID * enhanced super-threaded scope recycling but is probably not yet ready * enhanced ags_recycling.c to use mutices in view of super-threaded computing * enhanced ags_audio.c and ags_channel.c the use of mutices ags (0.6.7) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash related to XML IO of AgsFileLink * implemented ags-envelope recall but it's not tested, yet ags (0.6.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed modified default thread model in ags_config.c what caused certain crashes without ECC * extended AgsFileLink with field audio_channel see next * improved link editor file chooser to let you select audio channel ags (0.6.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_pad_play() to contain cancel code instead of playing again on toggle * modified default thread model in ags_config.c what caused certain crashes without ECC * implemented loading GTKRC from $(HOME)/.gsequencer/ags.rc ags (0.6.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed audible feedback of note edit to play actual length of note * fixed not connected line member * fixed missing value_changed event in ags_dial.c * removed built-in styles ags (0.6.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed to shrink of notes by keyboard to enable initial size * improved user's manual docbook XML documentation * implemented AtkAction interface in ags_dial.c and key-bindings ags (0.6.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed buffer attack in ags_buffer_audio_signal_run_inter() * fixed NULL link within link editor to be shown correctly * fixed playback of linked input * implemented file link in link editor * implemented audible feedback of AgsPatternBox, AgsCellPattern, AgsPatternEdit and AgsNoteEdit ags (0.6.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash while clicking AgsPatternBox pad * fixed toggling all selected pads of AgsPatternBox pattern * enhanced prelight of focused AgsPatternBox pad ags (0.6.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * Implemented basic accessibility thus refactored AgsDrum and AgsMatrix. Further enhanced AgsPatternEdit and AgsNoteEdit. ags (0.5.12) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags_channel_set_link() and ags_channel_set_recycling() * fixed unlink while ags_audio_set_pads() and ags_audio_set_audio_channels() ags (0.5.11) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed time calculation using absolute position for AgsExportWindow and AgsNavigation * fixed fundamental timing issue which caused the engine to be delayed 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) ] * fixed cliped LADSPA data ags (0.5.8) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed auto-scroll * fixed time calculation * fixed copy & paste * fixed ruler * fixed crash during extensive scrolling * fixed export duration and difference to playback time ags (0.5.7) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash during unavailable audio file * fixed buffer size preference for thread frequencies ags (0.5.6) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed memory leaks related to GValue in recalls * fixed memory leaks in ags_display_tact_launch() as well for ags_toggle_led_launch() and in some GUI callbacks of them * fixed memory leak AgsReturnableThread to clean disconnect handler * fixed thread frequencies and delays * implemented code alter macro AGS_USE_TIMER ags (0.5.5) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * enhanced thread-safety * fixed ags.conf per file base * reducing thread-cycles per second in order to target performance problems * fixed allocation of ags-buffer ags (0.5.4) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented ags.conf per file base * cleaned-up recalls allocation ags (0.5.3) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed export duration * fixed improved AgsDial * fixed dead-lock for to many calls to AgsChannelThread ags (0.5.2) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed memory leaks accessing AgsConfig * fixed dead-lock while stop playback * improved drawing of animations ags (0.5.1) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed ags.xsl removed wrong division, note use segmentation to adjust appropriate playback rate * fixed file open dialog callback * fxied calculate time by segmentation * fixed pattern mode hint for notation * fixed reading bpm setting from ags.xsl generated files ags (0.5.0) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemnted first super-threaded context for AgsAudio and AgsChannel * fixed replace deprecated GtkFileSelector for opening files ags (0.4.2.92) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed crash while hot-link matrix and synth with multi-output * implemnted segmentation ags (0.4.2.91) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed multiple occurence of recalls * fixed potential infinite loop while reset recall ids * migrated away from hide references to recall id status * fixed proper unlink as adjusting channels * fixed allocation of ags-buffer * fixed selective creation of recalls in ags_recall_recycling.c * fixed remap of recycling recalls for available destination in ags_recall_channel_run.c * minor bug-fixes * note speed may differ for now ags (0.4.2.90) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed led in sequencers * fixed missing mutex in matrix tact callback * fixed cut to nowhere * fixed ags.xsl notation translate * fixed redraw of piano * fixed redraw of matrix * fixed deny output pads to be resize for mixer ags (0.4.2.89) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed bug in ags_recall_channel_run.c that caused destination not being mapped ags (0.4.2.88) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * improved auto-scroll to be loop aware ags (0.4.2.87) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed auto-scroll ags (0.4.2.86) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed version string from autoconf * fixed chrash during removing not existing machine selector * added experimental auto-scroll capabilities ags (0.4.2.85) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed allocation of piano * fixed grained mutices for accessing notation * fixed cursor in edit widgets ags (0.4.2.84) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed dialog owned by machines to destroy * fixed make machine selection dialog modal ags (0.4.2.83) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed playback within AgsDrumInputPad * fixed thread-safety of editor with AgsMutexManager * hided playback button of AgsDrumInputPad open dialog * fixed spin button in AgsDrumInputPad open dialog ags (0.4.2.82) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed default device as reading XML files * fixed floor to round in XSL for reading MIDI notes * fixed unlink AgsAudio on remove * fixed termination of sequencer in ags_machine_play_callback() * fixed crash during channel resize if not shown in editor, hide widgets instead of remove * fixed destroying of machines removing editor widget * fixed paste notes * added flag to AgsDevout to fix unavailable soundcard ags (0.4.2.81) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * removed useless controls add/remove in machine property editor * fixed navigation duration * fixed seeking * fixed crash according not properbly cleaning up after playing ags (0.4.2.80) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed renaming * fixed audio channel bug in notation recall ags (0.4.2.79) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * renamed binary and project * added missing copyright notice ags (0.4.2-78) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented distinct between sequencer and notation loop * fixed unnecessary return if notation reaches notation-loop-end * fixed selection for pattern and notation editor * refactored fix auto-scroll * added exclude sequencer for export dialog ags (0.4.2-77) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed possible NULL pointer in ags_play_notation.c * fixed editor crash and missing notebook * implemented AGS_AUDIO_REVERSE_MAPPING flag, it indicates channel mapping should be interpreted in reverse order * implemented invert tool for notation editor ags (0.4.2-76) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed boundary for matrix clipboard * fixed paste to mono or different audio allocation * fixed piano shift to correct direction * fixed reset vscrollbar in editor widgets * refactored ags_editor.c * fixed already selected machines in editor not to add again * fixed audio channel resize for mono machines, disabled it in machine properties dialog * enhanced LADSPA browser refresh ags (0.4.2-75) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed deactivate led in AgsDrum and AgsMatrix * fixed multi-output * fixed adjusting audio channels for tabs of editor * implemented shift piano thereby fixed piano allocation ags (0.4.2-74) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * fixed AgsPatternEdit focus, selection, coloring of selected notes and a crash related to wrong function call * added exclusion for sequencers by using "exclude sequencers" checkbutton in navigation * added copy & paste pattern context menu items to drum and matrix * fixed AgsMatrix input * fixed NULL pointer error in ags_count_beats_audio_run.c ags (0.4.2-73) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * back-ported AgsPatternEdit * implemented basic editing key strokes like Ctrl-c, Ctrl-v and Ctrl-x for AgsPatternEdit ags (0.4.2-72) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * implemented basic editing key strokes like Ctrl-c, Ctrl-v and Ctrl-x * implemented seeking for paste if position tool is selected * updated clipboard version to 0.4.2 ags (0.4.2-71) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * commented-out two unimplemented menu entries in editor's machine selector. Add and remove tab you may do so by using resize tab of machine properties dialog. * implemented select-all in editor * fixed multi-channel editing mode * fixed refresh of GUI after cut or paste * fixed crash related to XML IO ags (0.4.2-70) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * minor bug-fixes ags (0.4.2-69) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added XSL file to transform output of `midi2xml` using `xsltproc` ags (0.4.2-68) [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ] * added `midi2xml` the MIDI file to XML parser gsequencer-1.4.24/configure.ac0000644000175000017500000002235213256226476013173 00000000000000# -*- Autoconf -*- # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([gsequencer],[1.4.24],[jkraehemann@gmail.com]) AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_SRCDIR([ags/config.h.in]) AC_CONFIG_HEADERS([ags/config.h]) AC_CONFIG_MACRO_DIR([m4]) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.19.8]) # options AC_ARG_ENABLE(rt, [AS_HELP_STRING([--enable-rt], [enable rt (default is yes)])], [], [enable_rt=yes]) AC_ARG_ENABLE(alsa, [AS_HELP_STRING([--enable-alsa], [enable alsa (default is yes)])], [], [enable_alsa=yes]) AC_ARG_ENABLE(oss, [AS_HELP_STRING([--enable-oss], [enable oss (default is no)])], [], [enable_oss=no]) AC_ARG_ENABLE(jack, [AS_HELP_STRING([--enable-jack], [enable jack (default is yes)])], [], [enable_jack=yes]) AC_ARG_ENABLE(pulse, [AS_HELP_STRING([--enable-pulse], [enable pulse (default is yes)])], [], [enable_pulse=yes]) AC_ARG_ENABLE(core-audio, [AS_HELP_STRING([--enable-core-audio], [enable core audio (default is no)])], [], [enable_core_audio=no]) AC_ARG_ENABLE(libinstpatch, [AS_HELP_STRING([--enable-libinstpatch], [enable libinstpatch (default is yes)])], [], [enable_libinstpatch=yes]) AC_ARG_ENABLE(xmlrpc, [AS_HELP_STRING([--enable-xmlrpc], [enable xmlrpc (default is no)])], [], [enable_xmlrpc=no]) AC_ARG_ENABLE(quartz, [AS_HELP_STRING([--enable-quartz], [enable quartz (default is no)])], [], [enable_quartz=no]) # Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL # libtool LT_PREREQ([2.4.2]) LT_INIT AC_SUBST([LIBTOOL_DEPS]) AC_ENABLE_SHARED AC_SUBST([GSEQUENCER_CFLAGS]) AC_SUBST([GSEQUENCER_LDFLAGS]) AC_SUBST([MIDI2XML_CFLAGS]) AC_SUBST([MIDI2XML_LDFLAGS]) AC_SUBST([LIBGSEQUENCER_TEST_LIBADD]) AC_SUBST([GSEQUENCER_FUNCTIONAL_TEST_LDADD]) # Checks for libraries. # FIXME: Replace `main' with a function in `-lX11': AS_IF([test "x$enable_quartz" != xno], [AC_DEFINE([AGS_WITH_QUARTZ], [1], [quartz enabled]) PKG_CHECK_MODULES([GTK_MAC_INTEGRATION], [gtk-mac-integration-gtk2 >= 2.0.7]) AC_SUBST(GTK_MAC_INTEGRATION_CFLAGS) AC_SUBST(GTK_MAC_INTEGRATION_LIBS) AC_MSG_NOTICE([quartz enabled])], [AC_MSG_NOTICE([quartz disabled]) AC_CHECK_LIB([X11], [main], , AC_MSG_ERROR("No X11 library present")) X11_LIBS="-lX11" ]) # FIXME: Replace `main' with a function in `-ldl': AC_CHECK_LIB([dl], [main], , AC_MSG_ERROR("No dl library present")) # FIXME: Replace `main' with a function in `-lm': AC_CHECK_LIB([m], [main], , AC_MSG_ERROR("No math library present")) # FIXME: Replace `main' with a function in `-lrt': AS_IF([test "x$enable_rt" != xno], [AC_DEFINE([AGS_WITH_RT], [1], [rt enabled]) RT_LIBS="-lrt" AC_CHECK_LIB([rt], [main], , AC_MSG_ERROR("No rt library present")) AC_MSG_NOTICE([rt enabled])], [AC_MSG_NOTICE([rt disabled]) ]) # Checks for header files. AC_PATH_X AC_FUNC_ALLOCA AC_CHECK_HEADERS([fcntl.h float.h inttypes.h langinfo.h libintl.h limits.h locale.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h ladspa.h lv2.h], , AC_MSG_ERROR("missing headers")) # Checks for typedefs, structures, and compiler characteristics. AC_CHECK_HEADER_STDBOOL AC_C_INLINE AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT8_T AC_CHECK_TYPES([ptrdiff_t]) PKG_CHECK_MODULES([UUID], [uuid >= 1.0.2]) AC_SUBST(UUID_CFLAGS) AC_SUBST(UUID_LIBS) AS_IF([test "x$enable_alsa" != xno], [PKG_CHECK_MODULES([LIBASOUND2], [alsa >= 1.0.25]) AC_SUBST(LIBASOUND2_CFLAGS) AC_SUBST(LIBASOUND2_LIBS) AC_DEFINE([AGS_WITH_ALSA], [1], [ALSA enabled]) AC_MSG_NOTICE([ALSA enabled])], [AC_MSG_NOTICE([ALSA disabled]) AC_CHECK_HEADERS([alsa/seq_event.h], [AC_DEFINE([HAVE_ALSA_SEQ_EVENT_H], [1], [ALSA sequencer event available])] [PKG_CHECK_MODULES([LIBASOUND2], [alsa >= 1.0.5]) AC_SUBST(LIBASOUND2_CFLAGS) AC_SUBST(LIBASOUND2_LIBS)], [AC_MSG_NOTICE([ALSA sequencer event not available])],[ #if HAVE_ALSA_SEQ_EVENT_H # include # include #endif ])]) AS_IF([test "x$enable_oss" != xno], [AC_DEFINE([AGS_WITH_OSS], [1], [OSS enabled]) AC_MSG_NOTICE([OSS enabled])], AC_MSG_NOTICE([OSS disabled])) AS_IF([test "x$enable_core_audio" != xno], [AC_DEFINE([AGS_WITH_CORE_AUDIO], [1], [core-audio enabled]) CORE_AUDIO_CFLAGS= CORE_AUDIO_LIBS="-framework CoreAudio -framework AudioUnit -framework AudioToolbox -framework CoreMIDI" AC_SUBST(CORE_AUDIO_CFLAGS) AC_SUBST(CORE_AUDIO_LIBS) AC_MSG_NOTICE([core audio enabled])], AC_MSG_NOTICE([core audio disabled])) AS_IF([test "x$enable_jack" != xno], [AC_DEFINE([AGS_WITH_JACK], [1], [JACK enabled]) PKG_CHECK_MODULES([JACK], [jack]) AC_SUBST(JACK_CFLAGS) AC_SUBST(JACK_LIBS) AC_CHECK_FUNC([jack_port_uuid], [AC_DEFINE([HAVE_JACK_PORT_UUID], [1], [Jack port uuid available])]) AC_MSG_NOTICE([JACK enabled])], AC_MSG_NOTICE([JACK disabled])) AS_IF([test "x$enable_pulse" != xno], [AC_DEFINE([AGS_WITH_PULSE], [1], [PULSE enabled]) PKG_CHECK_MODULES([PULSE], [libpulse-mainloop-glib]) AC_SUBST(PULSE_CFLAGS) AC_SUBST(PULSE_LIBS) AC_MSG_NOTICE([PULSE enabled])], AC_MSG_NOTICE([PULSE disabled])) PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.8.0]) AC_SUBST(LIBXML2_CFLAGS) AC_SUBST(LIBXML2_LIBS) PKG_CHECK_MODULES([SAMPLERATE], [samplerate >= 0.1.8]) AC_SUBST(SAMPLERATE_CFLAGS) AC_SUBST(SAMPLERATE_LIBS) PKG_CHECK_MODULES([SNDFILE], [sndfile >= 1.0.25]) AC_SUBST(SNDFILE_CFLAGS) AC_SUBST(SNDFILE_LIBS) PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3]) AC_SUBST(GOBJECT_CFLAGS) AC_SUBST(GOBJECT_LIBS) AC_CHECK_LIB(glib-2.0, g_strv_length, AC_DEFINE([HAVE_GLIB_2_6], [1], [GLib 2.6 available])) AC_CHECK_LIB(glib-2.0, g_strv_contains, AC_DEFINE([HAVE_GLIB_2_44], [1], [GLib 2.44 available])) PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3]) AC_SUBST(GIO_CFLAGS) AC_SUBST(GIO_LIBS) PKG_CHECK_MODULES([PCRE], [libpcre >= 3.39]) AC_SUBST(PCRE_CFLAGS) AC_SUBST(PCRE_LIBS) AC_CHECK_LIB(atk-1.0, atk_value_get_value_and_text, [AC_DEFINE([HAVE_ATK_2_12], [1], [Atk 2.12 available])]) AS_IF([test "x$enable_libinstpatch" != xno], [PKG_CHECK_MODULES([LIBINSTPATCH], [libinstpatch-1.0 >= 1.0]) AC_SUBST(LIBINSTPATCH_CFLAGS) AC_SUBST(LIBINSTPATCH_LIBS) AC_DEFINE([AGS_WITH_LIBINSTPATCH], [1], [Disable if you don't want libinstpatch])], AC_MSG_NOTICE([libinstpatch disabled])) PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.9.0]) AC_SUBST(FONTCONFIG_CFLAGS) AC_SUBST(FONTCONFIG_LIBS) PKG_CHECK_MODULES([GDKPIXBUF], [gdk-pixbuf-2.0 >= 2.36.5]) AC_SUBST(GDKPIXBUF_CFLAGS) AC_SUBST(GDKPIXBUF_LIBS) PKG_CHECK_MODULES([CAIRO], [cairo >= 1.12.0]) AC_SUBST(CAIRO_CFLAGS) AC_SUBST(CAIRO_LIBS) PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.24.10]) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) AS_IF([test "x$enable_xmlrpc" != xno], [AC_CHECK_PROG([XMLRPC_C_CONFIG], [xmlrpc-c-config], [1], [0], [$PATH], [1]) AC_SUBST(XMLRPC_UTIL_CFLAGS, $(xmlrpc-c-config server-util --cflags)) AC_SUBST(XMLRPC_UTIL_LIBS, $(xmlrpc-c-config server-util --libs)) AC_SUBST(XMLRPC_CLIENT_CFLAGS, $(xmlrpc-c-config client --cflags)) AC_SUBST(XMLRPC_CLIENT_LIBS, $(xmlrpc-c-config client --libs)) # AC_SUBST(XMLRPC_SERVER_CFLAGS, $(xmlrpc-c-config abyss --cflags)) # AC_SUBST(XMLRPC_SERVER_LIBS, $(xmlrpc-c-config abyss --libs)) AC_SUBST(XMLRPC_SERVER_CGI_CFLAGS, $(xmlrpc-c-config cgi-server --cflags)) AC_SUBST(XMLRPC_SERVER_CGI_LIBS, $(xmlrpc-c-config cgi-server --libs)) AC_SUBST(XMLRPC_SERVER_ABYSS_CFLAGS, $(xmlrpc-c-config abyss-server --cflags)) AC_SUBST(XMLRPC_SERVER_ABYSS_LIBS, $(xmlrpc-c-config abyss-server --libs)) AC_MSG_NOTICE([xmlrpc-c enabled]) AC_DEFINE([AGS_WITH_XMLRPC_C], [1], [Disable if you don't want xmlrpc-c])], AC_MSG_NOTICE([xmlrpc-c disabled])) # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_MMAP AC_FUNC_REALLOC AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify atexit clock_gettime floor getcwd localeconv mblen mbrlen memchr mempcpy memset munmap nl_langinfo setlocale socket sqrt stpcpy strcasecmp strchr strcspn strdup strstr strtol strtoul]) # check for gtk-doc m4_ifdef([GTK_DOC_CHECK], [ GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) ],[ AM_CONDITIONAL([ENABLE_GTK_DOC], false) ]) AM_EXTRA_RECURSIVE_TARGETS([ags-docs]) AC_CONFIG_FILES([ Makefile docs/reference/libags/Makefile docs/reference/libags-audio/Makefile docs/reference/libags-gui/Makefile docs/reference/libgsequencer/Makefile m4/Makefile po/Makefile.in libags.pc libags_audio.pc libags_gui.pc libgsequencer.pc]) AC_OUTPUT gsequencer-1.4.24/ags.xsl0000644000175000017500000002525113246707333012203 00000000000000 ]> 60.0 1000000.0 floor($division div 256) floor($division div 256) * 256 60.0 1000000.0 floor($division div 256) floor($division div 256) * 256 note- 0 notation- 0 C note-list- _ 13f 0 &audiochannels; 1 128 xpath=//ags-devout notation-list- AgsFFPlayer machine- 628 &version; &buildid; 0 - xpath=//ags-audio[@id='_'] ffplayer- &defaultsf2; &preset; &instrument; ags-main- devout-list- ags-devout- 100 ags-audio-list- ags-audio-list window- 0 xpath=//ags-devout machine-list- ags-machine-list gsequencer-1.4.24/test-driver0000755000175000017500000001104013256226517013067 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program 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 this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>$log_file # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gsequencer-1.4.24/functional-system-tests.mk.in0000644000175000017500000034326213247044247016467 00000000000000# functional-system-tests.mk.in generated by automake 1.15.1 from functional-system-tests.mk.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = $(am__EXEEXT_1) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/functional-system-tests.mk.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 = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/ags/config.h CONFIG_CLEAN_FILES = libags.pc libags_audio.pc libags_gui.pc \ libgsequencer.pc CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) libgsequencer_check_system_test_la_DEPENDENCIES = \ $(am__DEPENDENCIES_2) am__dirstamp = $(am__leading_dot)dirstamp am_libgsequencer_check_system_test_la_OBJECTS = ags/test/X/libgsequencer_check_system_test_la-gsequencer_setup_util.lo \ ags/test/X/libgsequencer_check_system_test_la-ags_functional_test_util.lo libgsequencer_check_system_test_la_OBJECTS = \ $(am_libgsequencer_check_system_test_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgsequencer_check_system_test_la_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(libgsequencer_check_system_test_la_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__EXEEXT_1 = ags_check_system_functional_audio_test$(EXEEXT) \ ags_check_system_functional_machine_add_and_destroy_test$(EXEEXT) \ ags_check_system_functional_machine_link_test$(EXEEXT) \ ags_check_system_functional_line_member_add_and_destroy_test$(EXEEXT) \ ags_check_system_functional_editor_workflow_test$(EXEEXT) \ ags_check_system_functional_panel_test$(EXEEXT) \ ags_check_system_functional_mixer_test$(EXEEXT) \ ags_check_system_functional_drum_test$(EXEEXT) \ ags_check_system_functional_matrix_test$(EXEEXT) \ ags_check_system_functional_synth_test$(EXEEXT) \ ags_check_system_functional_ffplayer_test$(EXEEXT) \ ags_check_system_functional_note_edit_test$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_ags_check_system_functional_audio_test_OBJECTS = ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.$(OBJEXT) ags_check_system_functional_audio_test_OBJECTS = \ $(am_ags_check_system_functional_audio_test_OBJECTS) am__DEPENDENCIES_3 = libgsequencer_check_system_test.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) ags_check_system_functional_audio_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_audio_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_check_system_functional_audio_test_CFLAGS) \ $(CFLAGS) $(ags_check_system_functional_audio_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_drum_test_OBJECTS = ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.$(OBJEXT) ags_check_system_functional_drum_test_OBJECTS = \ $(am_ags_check_system_functional_drum_test_OBJECTS) ags_check_system_functional_drum_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_drum_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_check_system_functional_drum_test_CFLAGS) \ $(CFLAGS) $(ags_check_system_functional_drum_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_editor_workflow_test_OBJECTS = ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.$(OBJEXT) ags_check_system_functional_editor_workflow_test_OBJECTS = $(am_ags_check_system_functional_editor_workflow_test_OBJECTS) ags_check_system_functional_editor_workflow_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_editor_workflow_test_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) \ $(ags_check_system_functional_editor_workflow_test_CFLAGS) \ $(CFLAGS) \ $(ags_check_system_functional_editor_workflow_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_ffplayer_test_OBJECTS = ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.$(OBJEXT) ags_check_system_functional_ffplayer_test_OBJECTS = \ $(am_ags_check_system_functional_ffplayer_test_OBJECTS) ags_check_system_functional_ffplayer_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_ffplayer_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_check_system_functional_ffplayer_test_CFLAGS) \ $(CFLAGS) $(ags_check_system_functional_ffplayer_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_line_member_add_and_destroy_test_OBJECTS = ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.$(OBJEXT) ags_check_system_functional_line_member_add_and_destroy_test_OBJECTS = $(am_ags_check_system_functional_line_member_add_and_destroy_test_OBJECTS) ags_check_system_functional_line_member_add_and_destroy_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_line_member_add_and_destroy_test_LINK = \ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_check_system_functional_line_member_add_and_destroy_test_CFLAGS) \ $(CFLAGS) \ $(ags_check_system_functional_line_member_add_and_destroy_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_machine_add_and_destroy_test_OBJECTS = ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.$(OBJEXT) ags_check_system_functional_machine_add_and_destroy_test_OBJECTS = $(am_ags_check_system_functional_machine_add_and_destroy_test_OBJECTS) ags_check_system_functional_machine_add_and_destroy_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_machine_add_and_destroy_test_LINK = \ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(ags_check_system_functional_machine_add_and_destroy_test_CFLAGS) \ $(CFLAGS) \ $(ags_check_system_functional_machine_add_and_destroy_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_machine_link_test_OBJECTS = ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.$(OBJEXT) ags_check_system_functional_machine_link_test_OBJECTS = \ $(am_ags_check_system_functional_machine_link_test_OBJECTS) ags_check_system_functional_machine_link_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_machine_link_test_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) \ $(ags_check_system_functional_machine_link_test_CFLAGS) \ $(CFLAGS) \ $(ags_check_system_functional_machine_link_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_matrix_test_OBJECTS = ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.$(OBJEXT) ags_check_system_functional_matrix_test_OBJECTS = \ $(am_ags_check_system_functional_matrix_test_OBJECTS) ags_check_system_functional_matrix_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_matrix_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_check_system_functional_matrix_test_CFLAGS) \ $(CFLAGS) $(ags_check_system_functional_matrix_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_mixer_test_OBJECTS = ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.$(OBJEXT) ags_check_system_functional_mixer_test_OBJECTS = \ $(am_ags_check_system_functional_mixer_test_OBJECTS) ags_check_system_functional_mixer_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_mixer_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_check_system_functional_mixer_test_CFLAGS) \ $(CFLAGS) $(ags_check_system_functional_mixer_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_note_edit_test_OBJECTS = ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.$(OBJEXT) ags_check_system_functional_note_edit_test_OBJECTS = \ $(am_ags_check_system_functional_note_edit_test_OBJECTS) ags_check_system_functional_note_edit_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_note_edit_test_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) \ $(ags_check_system_functional_note_edit_test_CFLAGS) $(CFLAGS) \ $(ags_check_system_functional_note_edit_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_panel_test_OBJECTS = ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.$(OBJEXT) ags_check_system_functional_panel_test_OBJECTS = \ $(am_ags_check_system_functional_panel_test_OBJECTS) ags_check_system_functional_panel_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_panel_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_check_system_functional_panel_test_CFLAGS) \ $(CFLAGS) $(ags_check_system_functional_panel_test_LDFLAGS) \ $(LDFLAGS) -o $@ am_ags_check_system_functional_synth_test_OBJECTS = ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.$(OBJEXT) ags_check_system_functional_synth_test_OBJECTS = \ $(am_ags_check_system_functional_synth_test_OBJECTS) ags_check_system_functional_synth_test_DEPENDENCIES = \ $(am__DEPENDENCIES_3) ags_check_system_functional_synth_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(ags_check_system_functional_synth_test_CFLAGS) \ $(CFLAGS) $(ags_check_system_functional_synth_test_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/ags depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgsequencer_check_system_test_la_SOURCES) \ $(ags_check_system_functional_audio_test_SOURCES) \ $(ags_check_system_functional_drum_test_SOURCES) \ $(ags_check_system_functional_editor_workflow_test_SOURCES) \ $(ags_check_system_functional_ffplayer_test_SOURCES) \ $(ags_check_system_functional_line_member_add_and_destroy_test_SOURCES) \ $(ags_check_system_functional_machine_add_and_destroy_test_SOURCES) \ $(ags_check_system_functional_machine_link_test_SOURCES) \ $(ags_check_system_functional_matrix_test_SOURCES) \ $(ags_check_system_functional_mixer_test_SOURCES) \ $(ags_check_system_functional_note_edit_test_SOURCES) \ $(ags_check_system_functional_panel_test_SOURCES) \ $(ags_check_system_functional_synth_test_SOURCES) DIST_SOURCES = $(libgsequencer_check_system_test_la_SOURCES) \ $(ags_check_system_functional_audio_test_SOURCES) \ $(ags_check_system_functional_drum_test_SOURCES) \ $(ags_check_system_functional_editor_workflow_test_SOURCES) \ $(ags_check_system_functional_ffplayer_test_SOURCES) \ $(ags_check_system_functional_line_member_add_and_destroy_test_SOURCES) \ $(ags_check_system_functional_machine_add_and_destroy_test_SOURCES) \ $(ags_check_system_functional_machine_link_test_SOURCES) \ $(ags_check_system_functional_matrix_test_SOURCES) \ $(ags_check_system_functional_mixer_test_SOURCES) \ $(ags_check_system_functional_note_edit_test_SOURCES) \ $(ags_check_system_functional_panel_test_SOURCES) \ $(ags_check_system_functional_synth_test_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__extra_recursive_targets = ags-docs-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/functional-system-tests.mk.in \ $(srcdir)/libags.pc.in $(srcdir)/libags_audio.pc.in \ $(srcdir)/libags_gui.pc.in $(srcdir)/libgsequencer.pc.in \ $(top_srcdir)/ags/config.h.in ABOUT-NLS AUTHORS COPYING \ ChangeLog INSTALL NEWS README TODO compile config.guess \ config.rpath config.sub depcomp install-sh ltmain.sh missing \ mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CORE_AUDIO_CFLAGS = @CORE_AUDIO_CFLAGS@ CORE_AUDIO_LIBS = @CORE_AUDIO_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ GOBJECT_LIBS = @GOBJECT_LIBS@ GREP = @GREP@ GSEQUENCER_CFLAGS = @GSEQUENCER_CFLAGS@ GSEQUENCER_FUNCTIONAL_TEST_LDADD = @GSEQUENCER_FUNCTIONAL_TEST_LDADD@ GSEQUENCER_LDFLAGS = @GSEQUENCER_LDFLAGS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@ GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBASOUND2_CFLAGS = @LIBASOUND2_CFLAGS@ LIBASOUND2_LIBS = @LIBASOUND2_LIBS@ LIBGSEQUENCER_TEST_LIBADD = @LIBGSEQUENCER_TEST_LIBADD@ LIBICONV = @LIBICONV@ LIBINSTPATCH_CFLAGS = @LIBINSTPATCH_CFLAGS@ LIBINSTPATCH_LIBS = @LIBINSTPATCH_LIBS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MIDI2XML_CFLAGS = @MIDI2XML_CFLAGS@ MIDI2XML_LDFLAGS = @MIDI2XML_LDFLAGS@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCRE_CFLAGS = @PCRE_CFLAGS@ PCRE_LIBS = @PCRE_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PULSE_CFLAGS = @PULSE_CFLAGS@ PULSE_LIBS = @PULSE_LIBS@ RANLIB = @RANLIB@ SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@ SAMPLERATE_LIBS = @SAMPLERATE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ SNDFILE_LIBS = @SNDFILE_LIBS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ XMLRPC_CLIENT_CFLAGS = @XMLRPC_CLIENT_CFLAGS@ XMLRPC_CLIENT_LIBS = @XMLRPC_CLIENT_LIBS@ XMLRPC_C_CONFIG = @XMLRPC_C_CONFIG@ XMLRPC_SERVER_ABYSS_CFLAGS = @XMLRPC_SERVER_ABYSS_CFLAGS@ XMLRPC_SERVER_ABYSS_LIBS = @XMLRPC_SERVER_ABYSS_LIBS@ XMLRPC_SERVER_CGI_CFLAGS = @XMLRPC_SERVER_CGI_CFLAGS@ XMLRPC_SERVER_CGI_LIBS = @XMLRPC_SERVER_CGI_LIBS@ XMLRPC_UTIL_CFLAGS = @XMLRPC_UTIL_CFLAGS@ XMLRPC_UTIL_LIBS = @XMLRPC_UTIL_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = $(datadir)/locale localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. AUTOMAKE_OPTIONS = foreign SUBDIRS = po # libadd and ldadd libgsequencer_check_system_test_LIBADD = -L$(libdir) -lags -lags_thread -lags_server -lags_audio -lags_gui -L$(libdir)/gsequencer/ -lgsequencer -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) gsequencer_check_system_functional_test_LDADD = -lags -lags_thread -lags_server -lags_audio -lags_gui -L$(DESTDIR)/$(libdir)/gsequencer/ -lgsequencer libgsequencer_check_system_test.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) AGS_RESOURCES = -DAGS_RC_FILENAME=\"/usr/share/gsequencer/styles/ags.rc\" -DAGS_ANIMATION_FILENAME=\"/usr/share/gsequencer/images/ags_supermoon-800x450.png\" -DAGS_LOGO_FILENAME=\"/usr/share/gsequencer/images/ags.png\" -DAGS_LICENSE_FILENAME=\"/usr/share/common-licenses/GPL-3\" noinst_LTLIBRARIES = libgsequencer_check_system_test.la # functional system tests - edit target installcheck_programs = \ ags_check_system_functional_audio_test \ ags_check_system_functional_machine_add_and_destroy_test \ ags_check_system_functional_machine_link_test \ ags_check_system_functional_line_member_add_and_destroy_test \ ags_check_system_functional_editor_workflow_test \ ags_check_system_functional_panel_test \ ags_check_system_functional_mixer_test \ ags_check_system_functional_drum_test \ ags_check_system_functional_matrix_test \ ags_check_system_functional_synth_test \ ags_check_system_functional_ffplayer_test \ ags_check_system_functional_note_edit_test # functional test util library libgsequencer_check_system_test_la_SOURCES = ags/test/X/gsequencer_setup_util.c ags/test/X/gsequencer_setup_util.h ags/test/X/ags_functional_test_util.c ags/test/X/ags_functional_test_util.h ags/test/X/libgsequencer.h libgsequencer_check_system_test_la_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) libgsequencer_check_system_test_la_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) libgsequencer_check_system_test_la_LIBADD = $(libgsequencer_check_system_test_LIBADD) # functional audio test ags_check_system_functional_audio_test_SOURCES = ags/test/audio/ags_functional_audio_test.c ags_check_system_functional_audio_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_check_system_functional_audio_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_audio_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional machine add and destroy test ags_check_system_functional_machine_add_and_destroy_test_SOURCES = ags/test/X/ags_functional_machine_add_and_destroy_test.c ags_check_system_functional_machine_add_and_destroy_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_machine_add_and_destroy_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_machine_add_and_destroy_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_machine_add_and_destroy_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional machine link test ags_check_system_functional_machine_link_test_SOURCES = ags/test/X/ags_functional_machine_link_test.c ags_check_system_functional_machine_link_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_machine_link_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_machine_link_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_machine_link_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional line member add and destroy test ags_check_system_functional_line_member_add_and_destroy_test_SOURCES = ags/test/X/ags_functional_line_member_add_and_destroy_test.c ags_check_system_functional_line_member_add_and_destroy_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_line_member_add_and_destroy_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_line_member_add_and_destroy_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_line_member_add_and_destroy_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional editor workflow test ags_check_system_functional_editor_workflow_test_SOURCES = ags/test/X/ags_functional_editor_workflow_test.c ags_check_system_functional_editor_workflow_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_editor_workflow_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_editor_workflow_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_editor_workflow_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional panel test ags_check_system_functional_panel_test_SOURCES = ags/test/X/machine/ags_functional_panel_test.c ags_check_system_functional_panel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_panel_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_panel_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_panel_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional mixer test ags_check_system_functional_mixer_test_SOURCES = ags/test/X/machine/ags_functional_mixer_test.c ags_check_system_functional_mixer_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_mixer_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_mixer_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_mixer_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional drum test ags_check_system_functional_drum_test_SOURCES = ags/test/X/machine/ags_functional_drum_test.c ags_check_system_functional_drum_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_drum_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_drum_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_drum_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional matrix test ags_check_system_functional_matrix_test_SOURCES = ags/test/X/machine/ags_functional_matrix_test.c ags_check_system_functional_matrix_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_matrix_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_matrix_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_matrix_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional synth test ags_check_system_functional_synth_test_SOURCES = ags/test/X/machine/ags_functional_synth_test.c ags_check_system_functional_synth_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_synth_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_synth_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_synth_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional ffplayer test ags_check_system_functional_ffplayer_test_SOURCES = ags/test/X/machine/ags_functional_ffplayer_test.c ags_check_system_functional_ffplayer_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_ffplayer_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_ffplayer_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_ffplayer_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) # functional note edit test ags_check_system_functional_note_edit_test_SOURCES = ags/test/X/ags_functional_note_edit_test.c ags_check_system_functional_note_edit_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_check_system_functional_note_edit_test_CPPFLAGS = -DSRCDIR=\"$(srcdir)\" $(AGS_RESOURCES) ags_check_system_functional_note_edit_test_LDFLAGS = -pthread $(LDFLAGS) ags_check_system_functional_note_edit_test_LDADD = $(gsequencer_check_system_functional_test_LDADD) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: functional-system-tests.mk @: $(srcdir)/functional-system-tests.mk.in: $(srcdir)/functional-system-tests.mk.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign functional-system-tests.mk'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign functional-system-tests.mk functional-system-tests.mk: $(srcdir)/functional-system-tests.mk.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): ags/config.h: ags/stamp-h1 @test -f $@ || rm -f ags/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) ags/stamp-h1 ags/stamp-h1: $(top_srcdir)/ags/config.h.in $(top_builddir)/config.status @rm -f ags/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status ags/config.h $(top_srcdir)/ags/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f ags/stamp-h1 touch $@ distclean-hdr: -rm -f ags/config.h ags/stamp-h1 libags.pc: $(top_builddir)/config.status $(srcdir)/libags.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libags_audio.pc: $(top_builddir)/config.status $(srcdir)/libags_audio.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libags_gui.pc: $(top_builddir)/config.status $(srcdir)/libags_gui.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libgsequencer.pc: $(top_builddir)/config.status $(srcdir)/libgsequencer.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } ags/test/X/$(am__dirstamp): @$(MKDIR_P) ags/test/X @: > ags/test/X/$(am__dirstamp) ags/test/X/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/X/$(DEPDIR) @: > ags/test/X/$(DEPDIR)/$(am__dirstamp) ags/test/X/libgsequencer_check_system_test_la-gsequencer_setup_util.lo: \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags/test/X/libgsequencer_check_system_test_la-ags_functional_test_util.lo: \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) libgsequencer_check_system_test.la: $(libgsequencer_check_system_test_la_OBJECTS) $(libgsequencer_check_system_test_la_DEPENDENCIES) $(EXTRA_libgsequencer_check_system_test_la_DEPENDENCIES) $(AM_V_CCLD)$(libgsequencer_check_system_test_la_LINK) $(libgsequencer_check_system_test_la_OBJECTS) $(libgsequencer_check_system_test_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ags/test/audio/$(am__dirstamp): @$(MKDIR_P) ags/test/audio @: > ags/test/audio/$(am__dirstamp) ags/test/audio/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/audio/$(DEPDIR) @: > ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.$(OBJEXT): \ ags/test/audio/$(am__dirstamp) \ ags/test/audio/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_audio_test$(EXEEXT): $(ags_check_system_functional_audio_test_OBJECTS) $(ags_check_system_functional_audio_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_audio_test_DEPENDENCIES) @rm -f ags_check_system_functional_audio_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_audio_test_LINK) $(ags_check_system_functional_audio_test_OBJECTS) $(ags_check_system_functional_audio_test_LDADD) $(LIBS) ags/test/X/machine/$(am__dirstamp): @$(MKDIR_P) ags/test/X/machine @: > ags/test/X/machine/$(am__dirstamp) ags/test/X/machine/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ags/test/X/machine/$(DEPDIR) @: > ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_drum_test$(EXEEXT): $(ags_check_system_functional_drum_test_OBJECTS) $(ags_check_system_functional_drum_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_drum_test_DEPENDENCIES) @rm -f ags_check_system_functional_drum_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_drum_test_LINK) $(ags_check_system_functional_drum_test_OBJECTS) $(ags_check_system_functional_drum_test_LDADD) $(LIBS) ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_editor_workflow_test$(EXEEXT): $(ags_check_system_functional_editor_workflow_test_OBJECTS) $(ags_check_system_functional_editor_workflow_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_editor_workflow_test_DEPENDENCIES) @rm -f ags_check_system_functional_editor_workflow_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_editor_workflow_test_LINK) $(ags_check_system_functional_editor_workflow_test_OBJECTS) $(ags_check_system_functional_editor_workflow_test_LDADD) $(LIBS) ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_ffplayer_test$(EXEEXT): $(ags_check_system_functional_ffplayer_test_OBJECTS) $(ags_check_system_functional_ffplayer_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_ffplayer_test_DEPENDENCIES) @rm -f ags_check_system_functional_ffplayer_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_ffplayer_test_LINK) $(ags_check_system_functional_ffplayer_test_OBJECTS) $(ags_check_system_functional_ffplayer_test_LDADD) $(LIBS) ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_line_member_add_and_destroy_test$(EXEEXT): $(ags_check_system_functional_line_member_add_and_destroy_test_OBJECTS) $(ags_check_system_functional_line_member_add_and_destroy_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_line_member_add_and_destroy_test_DEPENDENCIES) @rm -f ags_check_system_functional_line_member_add_and_destroy_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_line_member_add_and_destroy_test_LINK) $(ags_check_system_functional_line_member_add_and_destroy_test_OBJECTS) $(ags_check_system_functional_line_member_add_and_destroy_test_LDADD) $(LIBS) ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_machine_add_and_destroy_test$(EXEEXT): $(ags_check_system_functional_machine_add_and_destroy_test_OBJECTS) $(ags_check_system_functional_machine_add_and_destroy_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_machine_add_and_destroy_test_DEPENDENCIES) @rm -f ags_check_system_functional_machine_add_and_destroy_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_machine_add_and_destroy_test_LINK) $(ags_check_system_functional_machine_add_and_destroy_test_OBJECTS) $(ags_check_system_functional_machine_add_and_destroy_test_LDADD) $(LIBS) ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_machine_link_test$(EXEEXT): $(ags_check_system_functional_machine_link_test_OBJECTS) $(ags_check_system_functional_machine_link_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_machine_link_test_DEPENDENCIES) @rm -f ags_check_system_functional_machine_link_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_machine_link_test_LINK) $(ags_check_system_functional_machine_link_test_OBJECTS) $(ags_check_system_functional_machine_link_test_LDADD) $(LIBS) ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_matrix_test$(EXEEXT): $(ags_check_system_functional_matrix_test_OBJECTS) $(ags_check_system_functional_matrix_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_matrix_test_DEPENDENCIES) @rm -f ags_check_system_functional_matrix_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_matrix_test_LINK) $(ags_check_system_functional_matrix_test_OBJECTS) $(ags_check_system_functional_matrix_test_LDADD) $(LIBS) ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_mixer_test$(EXEEXT): $(ags_check_system_functional_mixer_test_OBJECTS) $(ags_check_system_functional_mixer_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_mixer_test_DEPENDENCIES) @rm -f ags_check_system_functional_mixer_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_mixer_test_LINK) $(ags_check_system_functional_mixer_test_OBJECTS) $(ags_check_system_functional_mixer_test_LDADD) $(LIBS) ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.$(OBJEXT): \ ags/test/X/$(am__dirstamp) \ ags/test/X/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_note_edit_test$(EXEEXT): $(ags_check_system_functional_note_edit_test_OBJECTS) $(ags_check_system_functional_note_edit_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_note_edit_test_DEPENDENCIES) @rm -f ags_check_system_functional_note_edit_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_note_edit_test_LINK) $(ags_check_system_functional_note_edit_test_OBJECTS) $(ags_check_system_functional_note_edit_test_LDADD) $(LIBS) ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_panel_test$(EXEEXT): $(ags_check_system_functional_panel_test_OBJECTS) $(ags_check_system_functional_panel_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_panel_test_DEPENDENCIES) @rm -f ags_check_system_functional_panel_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_panel_test_LINK) $(ags_check_system_functional_panel_test_OBJECTS) $(ags_check_system_functional_panel_test_LDADD) $(LIBS) ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.$(OBJEXT): \ ags/test/X/machine/$(am__dirstamp) \ ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) ags_check_system_functional_synth_test$(EXEEXT): $(ags_check_system_functional_synth_test_OBJECTS) $(ags_check_system_functional_synth_test_DEPENDENCIES) $(EXTRA_ags_check_system_functional_synth_test_DEPENDENCIES) @rm -f ags_check_system_functional_synth_test$(EXEEXT) $(AM_V_CCLD)$(ags_check_system_functional_synth_test_LINK) $(ags_check_system_functional_synth_test_OBJECTS) $(ags_check_system_functional_synth_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f ags/test/X/*.$(OBJEXT) -rm -f ags/test/X/*.lo -rm -f ags/test/X/machine/*.$(OBJEXT) -rm -f ags/test/audio/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/libgsequencer_check_system_test_la-ags_functional_test_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/$(DEPDIR)/libgsequencer_check_system_test_la-gsequencer_setup_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_drum_test-ags_functional_drum_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_matrix_test-ags_functional_matrix_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_mixer_test-ags_functional_mixer_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_panel_test-ags_functional_panel_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_synth_test-ags_functional_synth_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ags/test/audio/$(DEPDIR)/ags_check_system_functional_audio_test-ags_functional_audio_test.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ags/test/X/libgsequencer_check_system_test_la-gsequencer_setup_util.lo: ags/test/X/gsequencer_setup_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsequencer_check_system_test_la_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_check_system_test_la_CFLAGS) $(CFLAGS) -MT ags/test/X/libgsequencer_check_system_test_la-gsequencer_setup_util.lo -MD -MP -MF ags/test/X/$(DEPDIR)/libgsequencer_check_system_test_la-gsequencer_setup_util.Tpo -c -o ags/test/X/libgsequencer_check_system_test_la-gsequencer_setup_util.lo `test -f 'ags/test/X/gsequencer_setup_util.c' || echo '$(srcdir)/'`ags/test/X/gsequencer_setup_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/libgsequencer_check_system_test_la-gsequencer_setup_util.Tpo ags/test/X/$(DEPDIR)/libgsequencer_check_system_test_la-gsequencer_setup_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/gsequencer_setup_util.c' object='ags/test/X/libgsequencer_check_system_test_la-gsequencer_setup_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsequencer_check_system_test_la_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_check_system_test_la_CFLAGS) $(CFLAGS) -c -o ags/test/X/libgsequencer_check_system_test_la-gsequencer_setup_util.lo `test -f 'ags/test/X/gsequencer_setup_util.c' || echo '$(srcdir)/'`ags/test/X/gsequencer_setup_util.c ags/test/X/libgsequencer_check_system_test_la-ags_functional_test_util.lo: ags/test/X/ags_functional_test_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsequencer_check_system_test_la_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_check_system_test_la_CFLAGS) $(CFLAGS) -MT ags/test/X/libgsequencer_check_system_test_la-ags_functional_test_util.lo -MD -MP -MF ags/test/X/$(DEPDIR)/libgsequencer_check_system_test_la-ags_functional_test_util.Tpo -c -o ags/test/X/libgsequencer_check_system_test_la-ags_functional_test_util.lo `test -f 'ags/test/X/ags_functional_test_util.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_test_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/libgsequencer_check_system_test_la-ags_functional_test_util.Tpo ags/test/X/$(DEPDIR)/libgsequencer_check_system_test_la-ags_functional_test_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_test_util.c' object='ags/test/X/libgsequencer_check_system_test_la-ags_functional_test_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgsequencer_check_system_test_la_CPPFLAGS) $(CPPFLAGS) $(libgsequencer_check_system_test_la_CFLAGS) $(CFLAGS) -c -o ags/test/X/libgsequencer_check_system_test_la-ags_functional_test_util.lo `test -f 'ags/test/X/ags_functional_test_util.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_test_util.c ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.o: ags/test/audio/ags_functional_audio_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_audio_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.o -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_check_system_functional_audio_test-ags_functional_audio_test.Tpo -c -o ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.o `test -f 'ags/test/audio/ags_functional_audio_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_functional_audio_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_check_system_functional_audio_test-ags_functional_audio_test.Tpo ags/test/audio/$(DEPDIR)/ags_check_system_functional_audio_test-ags_functional_audio_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_functional_audio_test.c' object='ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_audio_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.o `test -f 'ags/test/audio/ags_functional_audio_test.c' || echo '$(srcdir)/'`ags/test/audio/ags_functional_audio_test.c ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.obj: ags/test/audio/ags_functional_audio_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_audio_test_CFLAGS) $(CFLAGS) -MT ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.obj -MD -MP -MF ags/test/audio/$(DEPDIR)/ags_check_system_functional_audio_test-ags_functional_audio_test.Tpo -c -o ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.obj `if test -f 'ags/test/audio/ags_functional_audio_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_functional_audio_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_functional_audio_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/audio/$(DEPDIR)/ags_check_system_functional_audio_test-ags_functional_audio_test.Tpo ags/test/audio/$(DEPDIR)/ags_check_system_functional_audio_test-ags_functional_audio_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/audio/ags_functional_audio_test.c' object='ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_audio_test_CFLAGS) $(CFLAGS) -c -o ags/test/audio/ags_check_system_functional_audio_test-ags_functional_audio_test.obj `if test -f 'ags/test/audio/ags_functional_audio_test.c'; then $(CYGPATH_W) 'ags/test/audio/ags_functional_audio_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/audio/ags_functional_audio_test.c'; fi` ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.o: ags/test/X/machine/ags_functional_drum_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_drum_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_drum_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_drum_test-ags_functional_drum_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.o `test -f 'ags/test/X/machine/ags_functional_drum_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_drum_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_drum_test-ags_functional_drum_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_drum_test-ags_functional_drum_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_drum_test.c' object='ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_drum_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_drum_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.o `test -f 'ags/test/X/machine/ags_functional_drum_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_drum_test.c ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.obj: ags/test/X/machine/ags_functional_drum_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_drum_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_drum_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_drum_test-ags_functional_drum_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.obj `if test -f 'ags/test/X/machine/ags_functional_drum_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_drum_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_drum_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_drum_test-ags_functional_drum_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_drum_test-ags_functional_drum_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_drum_test.c' object='ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_drum_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_drum_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_drum_test-ags_functional_drum_test.obj `if test -f 'ags/test/X/machine/ags_functional_drum_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_drum_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_drum_test.c'; fi` ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.o: ags/test/X/ags_functional_editor_workflow_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_editor_workflow_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_editor_workflow_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.Tpo -c -o ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.o `test -f 'ags/test/X/ags_functional_editor_workflow_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_editor_workflow_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_editor_workflow_test.c' object='ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_editor_workflow_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_editor_workflow_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.o `test -f 'ags/test/X/ags_functional_editor_workflow_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_editor_workflow_test.c ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj: ags/test/X/ags_functional_editor_workflow_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_editor_workflow_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_editor_workflow_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.Tpo -c -o ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj `if test -f 'ags/test/X/ags_functional_editor_workflow_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_editor_workflow_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_editor_workflow_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_editor_workflow_test.c' object='ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_editor_workflow_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_editor_workflow_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_editor_workflow_test-ags_functional_editor_workflow_test.obj `if test -f 'ags/test/X/ags_functional_editor_workflow_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_editor_workflow_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_editor_workflow_test.c'; fi` ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.o: ags/test/X/machine/ags_functional_ffplayer_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_ffplayer_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_ffplayer_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.o `test -f 'ags/test/X/machine/ags_functional_ffplayer_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_ffplayer_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_ffplayer_test.c' object='ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_ffplayer_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_ffplayer_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.o `test -f 'ags/test/X/machine/ags_functional_ffplayer_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_ffplayer_test.c ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.obj: ags/test/X/machine/ags_functional_ffplayer_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_ffplayer_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_ffplayer_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.obj `if test -f 'ags/test/X/machine/ags_functional_ffplayer_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_ffplayer_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_ffplayer_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_ffplayer_test.c' object='ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_ffplayer_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_ffplayer_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_ffplayer_test-ags_functional_ffplayer_test.obj `if test -f 'ags/test/X/machine/ags_functional_ffplayer_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_ffplayer_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_ffplayer_test.c'; fi` ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o: ags/test/X/ags_functional_line_member_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_line_member_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_line_member_add_and_destroy_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Tpo -c -o ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o `test -f 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_line_member_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_line_member_add_and_destroy_test.c' object='ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_line_member_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_line_member_add_and_destroy_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.o `test -f 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_line_member_add_and_destroy_test.c ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj: ags/test/X/ags_functional_line_member_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_line_member_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_line_member_add_and_destroy_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Tpo -c -o ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj `if test -f 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_line_member_add_and_destroy_test.c' object='ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_line_member_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_line_member_add_and_destroy_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_line_member_add_and_destroy_test-ags_functional_line_member_add_and_destroy_test.obj `if test -f 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_line_member_add_and_destroy_test.c'; fi` ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o: ags/test/X/ags_functional_machine_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_machine_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_machine_add_and_destroy_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Tpo -c -o ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o `test -f 'ags/test/X/ags_functional_machine_add_and_destroy_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_machine_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_machine_add_and_destroy_test.c' object='ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_machine_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_machine_add_and_destroy_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.o `test -f 'ags/test/X/ags_functional_machine_add_and_destroy_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_machine_add_and_destroy_test.c ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj: ags/test/X/ags_functional_machine_add_and_destroy_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_machine_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_machine_add_and_destroy_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Tpo -c -o ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj `if test -f 'ags/test/X/ags_functional_machine_add_and_destroy_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_machine_add_and_destroy_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_machine_add_and_destroy_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_machine_add_and_destroy_test.c' object='ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_machine_add_and_destroy_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_machine_add_and_destroy_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_machine_add_and_destroy_test-ags_functional_machine_add_and_destroy_test.obj `if test -f 'ags/test/X/ags_functional_machine_add_and_destroy_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_machine_add_and_destroy_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_machine_add_and_destroy_test.c'; fi` ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.o: ags/test/X/ags_functional_machine_link_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_machine_link_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_machine_link_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.Tpo -c -o ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.o `test -f 'ags/test/X/ags_functional_machine_link_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_machine_link_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_machine_link_test.c' object='ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_machine_link_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_machine_link_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.o `test -f 'ags/test/X/ags_functional_machine_link_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_machine_link_test.c ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.obj: ags/test/X/ags_functional_machine_link_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_machine_link_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_machine_link_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.Tpo -c -o ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.obj `if test -f 'ags/test/X/ags_functional_machine_link_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_machine_link_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_machine_link_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_machine_link_test.c' object='ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_machine_link_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_machine_link_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_machine_link_test-ags_functional_machine_link_test.obj `if test -f 'ags/test/X/ags_functional_machine_link_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_machine_link_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_machine_link_test.c'; fi` ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.o: ags/test/X/machine/ags_functional_matrix_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_matrix_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_matrix_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_matrix_test-ags_functional_matrix_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.o `test -f 'ags/test/X/machine/ags_functional_matrix_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_matrix_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_matrix_test-ags_functional_matrix_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_matrix_test-ags_functional_matrix_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_matrix_test.c' object='ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_matrix_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_matrix_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.o `test -f 'ags/test/X/machine/ags_functional_matrix_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_matrix_test.c ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.obj: ags/test/X/machine/ags_functional_matrix_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_matrix_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_matrix_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_matrix_test-ags_functional_matrix_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.obj `if test -f 'ags/test/X/machine/ags_functional_matrix_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_matrix_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_matrix_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_matrix_test-ags_functional_matrix_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_matrix_test-ags_functional_matrix_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_matrix_test.c' object='ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_matrix_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_matrix_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_matrix_test-ags_functional_matrix_test.obj `if test -f 'ags/test/X/machine/ags_functional_matrix_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_matrix_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_matrix_test.c'; fi` ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.o: ags/test/X/machine/ags_functional_mixer_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_mixer_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_mixer_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_mixer_test-ags_functional_mixer_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.o `test -f 'ags/test/X/machine/ags_functional_mixer_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_mixer_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_mixer_test-ags_functional_mixer_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_mixer_test-ags_functional_mixer_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_mixer_test.c' object='ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_mixer_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_mixer_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.o `test -f 'ags/test/X/machine/ags_functional_mixer_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_mixer_test.c ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.obj: ags/test/X/machine/ags_functional_mixer_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_mixer_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_mixer_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_mixer_test-ags_functional_mixer_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.obj `if test -f 'ags/test/X/machine/ags_functional_mixer_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_mixer_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_mixer_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_mixer_test-ags_functional_mixer_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_mixer_test-ags_functional_mixer_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_mixer_test.c' object='ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_mixer_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_mixer_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_mixer_test-ags_functional_mixer_test.obj `if test -f 'ags/test/X/machine/ags_functional_mixer_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_mixer_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_mixer_test.c'; fi` ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.o: ags/test/X/ags_functional_note_edit_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_note_edit_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_note_edit_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.o -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.Tpo -c -o ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.o `test -f 'ags/test/X/ags_functional_note_edit_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_note_edit_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_note_edit_test.c' object='ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_note_edit_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_note_edit_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.o `test -f 'ags/test/X/ags_functional_note_edit_test.c' || echo '$(srcdir)/'`ags/test/X/ags_functional_note_edit_test.c ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.obj: ags/test/X/ags_functional_note_edit_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_note_edit_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_note_edit_test_CFLAGS) $(CFLAGS) -MT ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.obj -MD -MP -MF ags/test/X/$(DEPDIR)/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.Tpo -c -o ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.obj `if test -f 'ags/test/X/ags_functional_note_edit_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_note_edit_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_note_edit_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/$(DEPDIR)/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.Tpo ags/test/X/$(DEPDIR)/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/ags_functional_note_edit_test.c' object='ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_note_edit_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_note_edit_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/ags_check_system_functional_note_edit_test-ags_functional_note_edit_test.obj `if test -f 'ags/test/X/ags_functional_note_edit_test.c'; then $(CYGPATH_W) 'ags/test/X/ags_functional_note_edit_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/ags_functional_note_edit_test.c'; fi` ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.o: ags/test/X/machine/ags_functional_panel_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_panel_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_panel_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_panel_test-ags_functional_panel_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.o `test -f 'ags/test/X/machine/ags_functional_panel_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_panel_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_panel_test-ags_functional_panel_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_panel_test-ags_functional_panel_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_panel_test.c' object='ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_panel_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_panel_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.o `test -f 'ags/test/X/machine/ags_functional_panel_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_panel_test.c ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.obj: ags/test/X/machine/ags_functional_panel_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_panel_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_panel_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_panel_test-ags_functional_panel_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.obj `if test -f 'ags/test/X/machine/ags_functional_panel_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_panel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_panel_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_panel_test-ags_functional_panel_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_panel_test-ags_functional_panel_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_panel_test.c' object='ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_panel_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_panel_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_panel_test-ags_functional_panel_test.obj `if test -f 'ags/test/X/machine/ags_functional_panel_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_panel_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_panel_test.c'; fi` ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.o: ags/test/X/machine/ags_functional_synth_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_synth_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_synth_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.o -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_synth_test-ags_functional_synth_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.o `test -f 'ags/test/X/machine/ags_functional_synth_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_synth_test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_synth_test-ags_functional_synth_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_synth_test-ags_functional_synth_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_synth_test.c' object='ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_synth_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_synth_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.o `test -f 'ags/test/X/machine/ags_functional_synth_test.c' || echo '$(srcdir)/'`ags/test/X/machine/ags_functional_synth_test.c ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.obj: ags/test/X/machine/ags_functional_synth_test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_synth_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_synth_test_CFLAGS) $(CFLAGS) -MT ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.obj -MD -MP -MF ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_synth_test-ags_functional_synth_test.Tpo -c -o ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.obj `if test -f 'ags/test/X/machine/ags_functional_synth_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_synth_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_synth_test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_synth_test-ags_functional_synth_test.Tpo ags/test/X/machine/$(DEPDIR)/ags_check_system_functional_synth_test-ags_functional_synth_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ags/test/X/machine/ags_functional_synth_test.c' object='ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ags_check_system_functional_synth_test_CPPFLAGS) $(CPPFLAGS) $(ags_check_system_functional_synth_test_CFLAGS) $(CFLAGS) -c -o ags/test/X/machine/ags_check_system_functional_synth_test-ags_functional_synth_test.obj `if test -f 'ags/test/X/machine/ags_functional_synth_test.c'; then $(CYGPATH_W) 'ags/test/X/machine/ags_functional_synth_test.c'; else $(CYGPATH_W) '$(srcdir)/ags/test/X/machine/ags_functional_synth_test.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf ags/test/X/.libs ags/test/X/_libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ags-docs-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @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 shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) 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/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: functional-system-tests.mk $(LTLIBRARIES) $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f ags/test/X/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/X/$(am__dirstamp) -rm -f ags/test/X/machine/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/X/machine/$(am__dirstamp) -rm -f ags/test/audio/$(DEPDIR)/$(am__dirstamp) -rm -f ags/test/audio/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." ags-docs: ags-docs-recursive ags-docs-am: ags-docs-local clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ags/test/X/$(DEPDIR) ags/test/X/machine/$(DEPDIR) ags/test/audio/$(DEPDIR) -rm -f functional-system-tests.mk distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ags/test/X/$(DEPDIR) ags/test/X/machine/$(DEPDIR) ags/test/audio/$(DEPDIR) -rm -f functional-system-tests.mk maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS ags-docs-am \ ags-docs-local all all-am am--refresh check check-am clean \ clean-cscope clean-generic clean-libtool \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: functional-system-tests.mk ags-check-system: $(installcheck_programs) ./ags_check_system_functional_audio_test ./ags_check_system_functional_machine_add_and_destroy_test ./ags_check_system_functional_machine_link_test ./ags_check_system_functional_line_member_add_and_destroy_test ./ags_check_system_functional_editor_workflow_test ./ags_check_system_functional_panel_test ./ags_check_system_functional_mixer_test ./ags_check_system_functional_drum_test ./ags_check_system_functional_matrix_test ./ags_check_system_functional_synth_test ./ags_check_system_functional_ffplayer_test ./ags_check_system_functional_note_edit_test # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gsequencer-1.4.24/libags_audio.sym0000644000175000017500000012721313256163135014053 00000000000000ags_lv2_option_manager_get_type ags_lv2_option_ressource_alloc ags_lv2_option_manager_ressource_insert ags_lv2_option_manager_ressource_remove ags_lv2_option_manager_ressource_lookup ags_lv2_option_manager_ressource_lookup_extended ags_lv2_option_manager_get_option ags_lv2_option_manager_set_option ags_lv2_option_manager_lv2_options_get ags_lv2_option_manager_lv2_options_set ags_lv2_option_manager_get_instance ags_lv2_option_manager_new ags_lv2_manager_get_type ags_lv2_manager_get_default_path ags_lv2_manager_set_default_path ags_lv2_manager_get_filenames ags_lv2_manager_find_lv2_plugin ags_lv2_manager_load_blacklist ags_lv2_manager_load_file ags_lv2_manager_load_preset ags_lv2_manager_load_default_directory ags_lv2_manager_get_instance ags_lv2_manager_new ags_lv2_log_manager_get_type ags_lv2_log_manager_printf ags_lv2_log_manager_vprintf ags_lv2_log_manager_get_instance ags_lv2_log_manager_new ags_lv2ui_plugin_get_type ags_lv2ui_plugin_find_gui_uri ags_lv2ui_plugin_new ags_lv2_conversion_get_type ags_lv2_conversion_new ags_lv2_state_manager_get_type ags_lv2_state_manager_get_instance ags_lv2_state_manager_new ags_dssi_plugin_get_type ags_dssi_plugin_change_program ags_dssi_plugin_new ags_lv2_plugin_get_type ags_lv2_plugin_alloc_event_buffer ags_lv2_plugin_concat_event_buffer ags_lv2_plugin_event_buffer_alloc ags_lv2_plugin_event_buffer_realloc_data ags_lv2_plugin_event_buffer_concat ags_lv2_plugin_event_buffer_append_midi ags_lv2_plugin_event_buffer_remove_midi ags_lv2_plugin_clear_event_buffer ags_lv2_plugin_alloc_atom_sequence ags_lv2_plugin_concat_atom_sequence ags_lv2_plugin_atom_sequence_append_midi ags_lv2_plugin_atom_sequence_remove_midi ags_lv2_plugin_clear_atom_sequence ags_lv2_plugin_find_pname ags_lv2_plugin_change_program ags_lv2_plugin_new ags_lv2ui_manager_get_type ags_lv2ui_manager_get_default_path ags_lv2ui_manager_set_default_path ags_lv2ui_manager_get_filenames ags_lv2ui_manager_find_lv2ui_plugin ags_lv2ui_manager_find_lv2ui_plugin_with_index ags_lv2ui_manager_load_blacklist ags_lv2ui_manager_load_file ags_lv2ui_manager_load_default_directory ags_lv2ui_manager_get_instance ags_lv2ui_manager_new ags_lv2_worker_manager_get_type ags_lv2_worker_manager_pull_worker ags_lv2_worker_manager_get_instance ags_lv2_worker_manager_new ags_base_plugin_get_type ags_port_descriptor_alloc ags_port_descriptor_free ags_port_descriptor_find_symbol ags_base_plugin_find_filename ags_base_plugin_find_effect ags_base_plugin_find_ui_effect_index ags_base_plugin_sort ags_base_plugin_apply_port_group_by_prefix ags_base_plugin_instantiate ags_base_plugin_connect_port ags_base_plugin_activate ags_base_plugin_deactivate ags_base_plugin_run ags_base_plugin_load_plugin ags_base_plugin_new ags_lv2_preset_get_type ags_lv2_port_preset_alloc ags_lv2_port_preset_free ags_lv2_preset_parse_turtle ags_lv2_preset_find_preset_label ags_lv2_preset_new ags_ladspa_manager_get_type ags_ladspa_manager_get_default_path ags_ladspa_manager_set_default_path ags_ladspa_manager_get_filenames ags_ladspa_manager_find_ladspa_plugin ags_ladspa_manager_load_blacklist ags_ladspa_manager_load_file ags_ladspa_manager_load_default_directory ags_ladspa_manager_get_instance ags_ladspa_manager_new ags_ladspa_conversion_get_type ags_ladspa_conversion_new ags_plugin_factory_get_type ags_plugin_factory_read_file ags_plugin_factory_list_by_name ags_plugin_factory_add ags_plugin_factory_create ags_plugin_factory_get_instance ags_plugin_factory_new_from_file ags_plugin_factory_new ags_lv2_event_manager_get_type ags_lv2_event_manager_lv2_event_ref ags_lv2_event_manager_lv2_event_unref ags_lv2_event_manager_get_instance ags_lv2_event_manager_new ags_lv2_worker_get_type ags_lv2_worker_alloc_response_data ags_lv2_worker_free_response_data ags_lv2_worker_respond ags_lv2_worker_schedule_work ags_lv2_worker_safe_run ags_lv2_worker_interrupted_callback ags_lv2_worker_new ags_dssi_manager_get_type ags_dssi_manager_get_default_path ags_dssi_manager_set_default_path ags_dssi_manager_get_filenames ags_dssi_manager_find_dssi_plugin ags_dssi_manager_load_blacklist ags_dssi_manager_load_file ags_dssi_manager_load_default_directory ags_dssi_manager_get_instance ags_dssi_manager_new ags_lv2_urid_manager_get_type ags_lv2_urid_manager_insert ags_lv2_urid_manager_remove ags_lv2_urid_manager_lookup ags_lv2_urid_manager_load_default ags_lv2_urid_manager_map ags_lv2_urid_manager_unmap ags_lv2_urid_manager_get_instance ags_lv2_urid_manager_new ags_ladspa_plugin_get_type ags_ladspa_plugin_new ags_lv2_uri_map_manager_get_type ags_lv2_uri_map_manager_insert ags_lv2_uri_map_manager_remove ags_lv2_uri_map_manager_lookup ags_lv2_uri_map_manager_load_default ags_lv2_uri_map_manager_uri_to_id ags_lv2_uri_map_manager_get_instance ags_lv2_uri_map_manager_new ags_recall_dependency_get_type ags_recall_dependency_find_dependency ags_recall_dependency_find_dependency_by_provider ags_recall_dependency_resolve ags_recall_dependency_new ags_recall_lv2_get_type ags_recall_lv2_load ags_recall_lv2_load_ports ags_recall_lv2_load_conversion ags_recall_lv2_find ags_recall_lv2_new ags_audio_connection_get_type ags_audio_connection_find ags_audio_connection_new ags_recall_factory_get_type ags_recall_factory_create ags_recall_factory_get_instance ags_recall_factory_new ags_recall_audio_get_type ags_recall_audio_new ags_devin_get_type ags_devin_error_quark ags_devin_switch_buffer_flag ags_devin_adjust_delay_and_attack ags_devin_realloc_buffer ags_devin_new ags_input_get_type ags_input_open_file ags_input_apply_synth ags_input_apply_synth_extended ags_input_is_active ags_input_next_active ags_input_new ags_recall_audio_run_get_type ags_recall_audio_run_new ags_acceleration_get_type ags_acceleration_duplicate ags_acceleration_new ags_recall_id_get_type ags_recall_id_get_run_stage ags_recall_id_set_run_stage ags_recall_id_unset_run_stage ags_recall_id_find_recycling_context ags_recall_id_find_parent_recycling_context ags_recall_id_new ags_recall_get_type ags_recall_set_flags ags_recall_load_automation ags_recall_unload_automation ags_recall_resolve_dependencies ags_recall_child_added ags_recall_run_init_pre ags_recall_run_init_inter ags_recall_run_init_post ags_recall_check_rt_stream ags_recall_automate ags_recall_run_pre ags_recall_run_inter ags_recall_run_post ags_recall_stop_persistent ags_recall_done ags_recall_cancel ags_recall_remove ags_recall_is_done ags_recall_duplicate ags_recall_set_recall_id ags_recall_set_soundcard_recursive ags_recall_notify_dependency ags_recall_add_dependency ags_recall_remove_dependency ags_recall_get_dependencies ags_recall_remove_child ags_recall_add_child ags_recall_get_children ags_recall_get_by_effect ags_recall_find_recall_id_with_effect ags_recall_find_type ags_recall_find_template ags_recall_template_find_type ags_recall_template_find_all_type ags_recall_find_type_with_recycling_context ags_recall_find_recycling_context ags_recall_find_provider ags_recall_template_find_provider ags_recall_find_provider_with_recycling_context ags_recall_run_init ags_recall_handler_alloc ags_recall_add_handler ags_recall_remove_handler ags_recall_lock_port ags_recall_unlock_port ags_recall_new ags_output_get_type ags_output_map_audio_signal ags_output_find_first_input_recycling ags_output_find_last_input_recycling ags_output_new ags_remote_input_get_type ags_remote_input_new ags_remote_output_get_type ags_remote_output_new ags_remote_channel_get_type ags_remote_channel_error_quark ags_remote_channel_new ags_playback_domain_get_type ags_playback_domain_set_audio_thread ags_playback_domain_get_audio_thread ags_playback_domain_add_playback ags_playback_domain_remove_playback ags_playback_domain_new ags_automation_get_type ags_automation_find_port ags_automation_find_near_timestamp ags_automation_find_near_timestamp_extended ags_automation_add ags_automation_add_acceleration ags_automation_remove_acceleration_at_position ags_automation_get_selection ags_automation_is_acceleration_selected ags_automation_find_point ags_automation_find_region ags_automation_free_selection ags_automation_add_point_to_selection ags_automation_remove_point_from_selection ags_automation_add_region_to_selection ags_automation_remove_region_from_selection ags_automation_add_all_to_selection ags_automation_copy_selection ags_automation_cut_selection ags_automation_merge_clipboard ags_automation_insert_from_clipboard ags_automation_insert_from_clipboard_extended ags_automation_get_current ags_automation_get_specifier_unique ags_automation_get_specifier_unique_with_channel_type ags_automation_find_specifier ags_automation_find_channel_type_with_control_name ags_automation_find_specifier_with_type_and_line ags_automation_get_value ags_automation_new ags_audio_buffer_util_format_from_soundcard ags_audio_buffer_util_get_copy_mode ags_audio_buffer_util_clear_float ags_audio_buffer_util_clear_float32 ags_audio_buffer_util_clear_double ags_audio_buffer_util_clear_buffer ags_audio_buffer_util_envelope_s8 ags_audio_buffer_util_envelope_s16 ags_audio_buffer_util_envelope_s24 ags_audio_buffer_util_envelope_s32 ags_audio_buffer_util_envelope_s64 ags_audio_buffer_util_envelope_float ags_audio_buffer_util_envelope_double ags_audio_buffer_util_envelope ags_audio_buffer_util_volume_s8 ags_audio_buffer_util_volume_s16 ags_audio_buffer_util_volume_s24 ags_audio_buffer_util_volume_s32 ags_audio_buffer_util_volume_s64 ags_audio_buffer_util_volume_float ags_audio_buffer_util_volume_double ags_audio_buffer_util_volume ags_audio_buffer_util_resample_s8 ags_audio_buffer_util_resample_s16 ags_audio_buffer_util_resample_s24 ags_audio_buffer_util_resample_s32 ags_audio_buffer_util_resample_s64 ags_audio_buffer_util_resample_float ags_audio_buffer_util_resample_double ags_audio_buffer_util_resample ags_audio_buffer_util_peak_s8 ags_audio_buffer_util_peak_s16 ags_audio_buffer_util_peak_s24 ags_audio_buffer_util_peak_s32 ags_audio_buffer_util_peak_s64 ags_audio_buffer_util_peak_float ags_audio_buffer_util_peak_double ags_audio_buffer_util_peak ags_audio_buffer_util_copy_s8_to_s8 ags_audio_buffer_util_copy_s8_to_s16 ags_audio_buffer_util_copy_s8_to_s24 ags_audio_buffer_util_copy_s8_to_s32 ags_audio_buffer_util_copy_s8_to_s64 ags_audio_buffer_util_copy_s8_to_float ags_audio_buffer_util_copy_s8_to_double ags_audio_buffer_util_copy_s16_to_s8 ags_audio_buffer_util_copy_s16_to_s16 ags_audio_buffer_util_copy_s16_to_s24 ags_audio_buffer_util_copy_s16_to_s32 ags_audio_buffer_util_copy_s16_to_s64 ags_audio_buffer_util_copy_s16_to_float ags_audio_buffer_util_copy_s16_to_double ags_audio_buffer_util_copy_s24_to_s8 ags_audio_buffer_util_copy_s24_to_s16 ags_audio_buffer_util_copy_s24_to_s24 ags_audio_buffer_util_copy_s24_to_s32 ags_audio_buffer_util_copy_s24_to_s64 ags_audio_buffer_util_copy_s24_to_float ags_audio_buffer_util_copy_s24_to_double ags_audio_buffer_util_copy_s32_to_s8 ags_audio_buffer_util_copy_s32_to_s16 ags_audio_buffer_util_copy_s32_to_s24 ags_audio_buffer_util_copy_s32_to_s32 ags_audio_buffer_util_copy_s32_to_s64 ags_audio_buffer_util_copy_s32_to_float ags_audio_buffer_util_copy_s32_to_double ags_audio_buffer_util_copy_s64_to_s8 ags_audio_buffer_util_copy_s64_to_s16 ags_audio_buffer_util_copy_s64_to_s24 ags_audio_buffer_util_copy_s64_to_s32 ags_audio_buffer_util_copy_s64_to_s64 ags_audio_buffer_util_copy_s64_to_float ags_audio_buffer_util_copy_s64_to_double ags_audio_buffer_util_copy_float_to_s8 ags_audio_buffer_util_copy_float_to_s16 ags_audio_buffer_util_copy_float_to_s24 ags_audio_buffer_util_copy_float_to_s32 ags_audio_buffer_util_copy_float_to_s64 ags_audio_buffer_util_copy_float_to_float ags_audio_buffer_util_copy_float_to_double ags_audio_buffer_util_copy_double_to_s8 ags_audio_buffer_util_copy_double_to_s16 ags_audio_buffer_util_copy_double_to_s24 ags_audio_buffer_util_copy_double_to_s32 ags_audio_buffer_util_copy_double_to_s64 ags_audio_buffer_util_copy_double_to_float ags_audio_buffer_util_copy_double_to_double ags_audio_buffer_util_copy_s8_to_float32 ags_audio_buffer_util_copy_s16_to_float32 ags_audio_buffer_util_copy_s24_to_float32 ags_audio_buffer_util_copy_s32_to_float32 ags_audio_buffer_util_copy_s64_to_float32 ags_audio_buffer_util_copy_buffer_to_buffer ags_channel_get_type ags_channel_error_quark ags_channel_find_recall ags_channel_first ags_channel_last ags_channel_nth ags_channel_pad_first ags_channel_pad_last ags_channel_pad_nth ags_channel_first_with_recycling ags_channel_last_with_recycling ags_channel_prev_with_recycling ags_channel_next_with_recycling ags_channel_set_soundcard ags_channel_set_samplerate ags_channel_set_buffer_size ags_channel_set_format ags_channel_add_remote_channel ags_channel_remove_remote_channel ags_channel_add_recall_id ags_channel_remove_recall_id ags_channel_add_recall_container ags_channel_remove_recall_container ags_channel_add_recall ags_channel_remove_recall ags_channel_add_pattern ags_channel_remove_pattern ags_channel_add_effect ags_channel_remove_effect ags_channel_safe_resize_audio_signal ags_channel_duplicate_recall ags_channel_resolve_recall ags_channel_init_recall ags_channel_play ags_channel_done ags_channel_cancel ags_channel_remove ags_channel_recall_id_set ags_channel_find_port ags_channel_find_port_by_specifier_and_scope ags_channel_set_link ags_channel_set_recycling ags_channel_recursive_reset_recycling_context ags_channel_recycling_changed ags_channel_recursive_set_property ags_channel_recursive_play_init ags_channel_recursive_play_threaded ags_channel_recursive_play ags_channel_tillrecycling_cancel ags_channel_recursive_reset_recall_ids ags_channel_get_level ags_channel_recursive_reset_recall_id ags_channel_recursive_init ags_channel_recursive_run ags_channel_recursive_cancel ags_channel_new ags_core_audio_devout_get_type ags_core_audio_devout_error_quark ags_core_audio_devout_switch_buffer_flag ags_core_audio_devout_adjust_delay_and_attack ags_core_audio_devout_realloc_buffer ags_core_audio_devout_new ags_core_audio_midiin_get_type ags_core_audio_midiin_error_quark ags_core_audio_midiin_switch_buffer_flag ags_core_audio_midiin_new ags_core_audio_server_get_type ags_core_audio_server_find_url ags_core_audio_server_find_client ags_core_audio_server_find_port ags_core_audio_server_add_client ags_core_audio_server_remove_client ags_core_audio_server_connect_client ags_core_audio_server_start_poll ags_core_audio_server_new ags_core_audio_port_get_type ags_core_audio_port_find ags_core_audio_port_register ags_core_audio_port_unregister ags_core_audio_port_set_format ags_core_audio_port_set_samplerate ags_core_audio_port_set_pcm_channels ags_core_audio_port_set_buffer_size ags_core_audio_port_new ags_core_audio_client_get_type ags_core_audio_client_find_uuid ags_core_audio_client_find ags_core_audio_client_open ags_core_audio_client_add_device ags_core_audio_client_remove_device ags_core_audio_client_add_port ags_core_audio_client_remove_port ags_core_audio_client_activate ags_core_audio_client_deactivate ags_core_audio_client_new ags_port_get_type ags_port_safe_read ags_port_safe_write ags_port_safe_write_raw ags_port_safe_get_property ags_port_safe_set_property ags_port_find_specifier ags_port_new ags_set_audio_channels_get_type ags_set_audio_channels_new ags_apply_synth_get_type ags_apply_synth_new ags_add_recall_container_get_type ags_add_recall_container_new ags_cancel_audio_get_type ags_cancel_audio_new ags_switch_buffer_flag_get_type ags_switch_buffer_flag_new ags_open_sf2_sample_get_type ags_open_sf2_sample_new ags_open_single_file_get_type ags_open_single_file_new ags_remove_audio_signal_get_type ags_remove_audio_signal_new ags_crop_note_get_type ags_crop_note_new ags_link_channel_get_type ags_link_channel_new ags_remove_recall_get_type ags_remove_recall_new ags_open_file_get_type ags_open_file_new ags_add_effect_get_type ags_add_effect_new ags_append_recall_get_type ags_append_recall_new ags_apply_presets_get_type ags_apply_presets_soundcard ags_apply_presets_new ags_append_channel_get_type ags_append_channel_new ags_start_sequencer_get_type ags_start_sequencer_new ags_start_soundcard_get_type ags_start_soundcard_new ags_save_file_get_type ags_save_file_new ags_set_input_device_get_type ags_set_input_device_new ags_add_note_get_type ags_add_note_new ags_resize_audio_get_type ags_resize_audio_new ags_init_channel_get_type ags_init_channel_new ags_add_point_to_selection_get_type ags_add_point_to_selection_new ags_notify_soundcard_get_type ags_notify_soundcard_new ags_init_audio_get_type ags_init_audio_new ags_change_soundcard_get_type ags_change_soundcard_new ags_set_output_device_get_type ags_set_output_device_new ags_free_selection_get_type ags_free_selection_new ags_seek_soundcard_get_type ags_seek_soundcard_new ags_toggle_pattern_bit_get_type ags_toggle_pattern_bit_refresh_gui ags_toggle_pattern_bit_new ags_remove_recall_container_get_type ags_remove_recall_container_new ags_append_audio_get_type ags_append_audio_new ags_tic_device_get_type ags_tic_device_new ags_remove_point_from_selection_get_type ags_remove_point_from_selection_new ags_apply_bpm_get_type ags_apply_bpm_new ags_apply_sequencer_length_get_type ags_apply_sequencer_length_new ags_set_muted_get_type ags_set_muted_new ags_apply_tact_get_type ags_apply_tact_new ags_reset_peak_get_type ags_reset_peak_add ags_reset_peak_remove ags_reset_peak_get_instance ags_reset_peak_new ags_clear_buffer_get_type ags_clear_buffer_new ags_remove_note_get_type ags_remove_note_new ags_remove_soundcard_get_type ags_remove_soundcard_new ags_add_recall_get_type ags_add_recall_new ags_reset_audio_connection_get_type ags_reset_audio_connection_new ags_set_samplerate_get_type ags_set_samplerate_new ags_remove_audio_get_type ags_remove_audio_new ags_move_note_get_type ags_move_note_new ags_set_buffer_size_get_type ags_set_buffer_size_new ags_add_soundcard_get_type ags_add_soundcard_new ags_append_audio_threaded_get_type ags_append_audio_threaded_new ags_remove_region_from_selection_get_type ags_remove_region_from_selection_new ags_add_audio_signal_get_type ags_add_audio_signal_new ags_add_region_to_selection_get_type ags_add_region_to_selection_new ags_add_audio_get_type ags_add_audio_new ags_clear_audio_signal_get_type ags_clear_audio_signal_new ags_cancel_channel_get_type ags_cancel_channel_new ags_cancel_recall_get_type ags_cancel_recall_new ags_unref_audio_signal_get_type ags_unref_audio_signal_new ags_set_format_get_type ags_set_format_new ags_export_output_get_type ags_export_output_new ags_recall_channel_get_type ags_recall_channel_find_channel ags_recall_channel_new ags_recall_dssi_get_type ags_recall_dssi_load ags_recall_dssi_load_ports ags_recall_dssi_load_conversion ags_recall_dssi_find ags_recall_dssi_new ags_audio_signal_get_type ags_stream_alloc ags_stream_free ags_audio_signal_set_samplerate ags_audio_signal_set_buffer_size ags_audio_signal_set_format ags_audio_signal_get_length_till_current ags_audio_signal_add_stream ags_audio_signal_stream_resize ags_audio_signal_stream_safe_resize ags_audio_signal_realloc_buffer_size ags_audio_signal_duplicate_stream ags_audio_signal_add_note ags_audio_signal_remove_note ags_audio_signal_get_template ags_audio_signal_get_stream_current ags_audio_signal_get_by_recall_id ags_audio_signal_tile ags_audio_signal_scale ags_audio_signal_feed ags_audio_signal_envelope ags_audio_signal_is_active ags_audio_signal_new ags_audio_signal_new_with_length ags_midi_parser_get_type ags_midi_parser_read_gint16 ags_midi_parser_read_gint24 ags_midi_parser_read_gint32 ags_midi_parser_read_varlength ags_midi_parser_read_text ags_midi_parser_ticks_to_sec ags_midi_parser_midi_getc ags_midi_parser_on_error ags_midi_parser_parse_full ags_midi_parser_parse_bytes ags_midi_parser_parse_header ags_midi_parser_parse_track ags_midi_parser_channel_message ags_midi_parser_key_on ags_midi_parser_key_off ags_midi_parser_key_pressure ags_midi_parser_change_parameter ags_midi_parser_change_pitch_bend ags_midi_parser_change_program ags_midi_parser_change_channel_pressure ags_midi_parser_not_defined ags_midi_parser_sysex ags_midi_parser_system_common ags_midi_parser_meta_event ags_midi_parser_sequence_number ags_midi_parser_end_of_track ags_midi_parser_smtpe ags_midi_parser_tempo ags_midi_parser_time_signature ags_midi_parser_key_signature ags_midi_parser_sequencer_meta_event ags_midi_parser_meta_misc ags_midi_parser_text_event ags_midi_parser_new ags_midi_buffer_util_get_varlength_size ags_midi_buffer_util_put_varlength ags_midi_buffer_util_get_varlength ags_midi_buffer_util_put_int16 ags_midi_buffer_util_get_int16 ags_midi_buffer_util_put_int24 ags_midi_buffer_util_get_int24 ags_midi_buffer_util_put_int32 ags_midi_buffer_util_get_int32 ags_midi_buffer_util_put_header ags_midi_buffer_util_get_header ags_midi_buffer_util_put_track ags_midi_buffer_util_get_track ags_midi_buffer_util_put_key_on ags_midi_buffer_util_get_key_on ags_midi_buffer_util_put_key_off ags_midi_buffer_util_get_key_off ags_midi_buffer_util_put_key_pressure ags_midi_buffer_util_get_key_pressure ags_midi_buffer_util_put_change_parameter ags_midi_buffer_util_get_change_parameter ags_midi_buffer_util_put_pitch_bend ags_midi_buffer_util_get_pitch_bend ags_midi_buffer_util_put_change_program ags_midi_buffer_util_get_change_program ags_midi_buffer_util_put_change_pressure ags_midi_buffer_util_get_change_pressure ags_midi_buffer_util_put_sysex ags_midi_buffer_util_get_sysex ags_midi_buffer_util_put_quarter_frame ags_midi_buffer_util_get_quarter_frame ags_midi_buffer_util_put_song_position ags_midi_buffer_util_get_song_position ags_midi_buffer_util_put_song_select ags_midi_buffer_util_get_song_select ags_midi_buffer_util_put_tune_request ags_midi_buffer_util_get_tune_request ags_midi_buffer_util_put_sequence_number ags_midi_buffer_util_get_sequence_number ags_midi_buffer_util_put_smtpe ags_midi_buffer_util_get_smtpe ags_midi_buffer_util_put_tempo ags_midi_buffer_util_get_tempo ags_midi_buffer_util_put_time_signature ags_midi_buffer_util_get_time_signature ags_midi_buffer_util_put_key_signature ags_midi_buffer_util_get_key_signature ags_midi_buffer_util_put_sequencer_meta_event ags_midi_buffer_util_get_sequencer_meta_event ags_midi_buffer_util_put_text_event ags_midi_buffer_util_get_text_event ags_midi_buffer_util_put_end_of_track ags_midi_buffer_util_get_end_of_track ags_midi_buffer_util_seek_message ags_midi_buffer_util_decode ags_midi_util_is_key_on ags_midi_util_is_key_off ags_midi_util_is_key_pressure ags_midi_util_is_change_parameter ags_midi_util_is_pitch_bend ags_midi_util_is_change_program ags_midi_util_is_change_pressure ags_midi_util_is_sysex ags_midi_util_is_quarter_frame ags_midi_util_is_song_position ags_midi_util_is_song_select ags_midi_util_is_tune_request ags_midi_util_is_meta_event ags_midi_util_to_smf ags_midi_util_envelope_to_velocity ags_midi_util_velocity_to_envelope ags_midi_util_envelope_to_pressure ags_midi_util_pressure_to_envelope ags_midi_util_delta_time_to_offset ags_midi_util_offset_to_delta_time ags_midi_builder_get_type ags_midi_builder_header_alloc ags_midi_builder_header_free ags_midi_builder_track_alloc ags_midi_builder_track_free ags_midi_builder_track_find_delta_time_with_track_name ags_midi_builder_track_insert_midi_message ags_midi_builder_track_get_delta_time_offset ags_midi_builder_midi_putc ags_midi_builder_on_error ags_midi_builder_append_header ags_midi_builder_append_track ags_midi_builder_append_key_on ags_midi_builder_append_key_off ags_midi_builder_append_key_pressure ags_midi_builder_append_change_parameter ags_midi_builder_append_change_pitch_bend ags_midi_builder_append_change_program ags_midi_builder_append_change_pressure ags_midi_builder_append_sysex ags_midi_builder_append_quarter_frame ags_midi_builder_append_song_position ags_midi_builder_append_song_select ags_midi_builder_append_tune_request ags_midi_builder_append_sequence_number ags_midi_builder_append_smtpe ags_midi_builder_append_tempo ags_midi_builder_append_time_signature ags_midi_builder_append_key_signature ags_midi_builder_append_sequencer_meta_event ags_midi_builder_append_text_event ags_midi_builder_append_xml_node ags_midi_builder_from_xml_doc ags_midi_builder_build ags_midi_builder_new ags_midi_file_get_type ags_midi_file_open ags_midi_file_open_from_data ags_midi_file_rw_open ags_midi_file_close ags_midi_file_read ags_midi_file_write ags_midi_file_seek ags_midi_file_flush ags_midi_file_read_gint16 ags_midi_file_read_gint24 ags_midi_file_read_gint32 ags_midi_file_read_varlength ags_midi_file_read_text ags_midi_file_write_gint16 ags_midi_file_write_gint24 ags_midi_file_write_gint32 ags_midi_file_write_varlength ags_midi_file_write_text ags_midi_file_read_header ags_midi_file_write_header ags_midi_file_read_track_data ags_midi_file_write_track_data ags_midi_file_new ags_devout_get_type ags_devout_error_quark ags_devout_switch_buffer_flag ags_devout_adjust_delay_and_attack ags_devout_realloc_buffer ags_devout_new ags_recall_adaptor_run_get_type ags_recall_adaptor_run_new ags_audio_application_context_get_type ags_audio_application_context_new ags_channel_iter_alloc ags_channel_iter_free ags_channel_iter_prev ags_channel_iter_next ags_channel_iter_init ags_fifoout_get_type ags_fifoout_error_quark ags_fifoout_adjust_delay_and_attack ags_fifoout_realloc_buffer ags_fifoout_new ags_audio_get_type ags_audio_set_soundcard ags_audio_set_flags ags_audio_unset_flags ags_audio_check_connection ags_audio_set_audio_channels ags_audio_set_pads ags_audio_set_samplerate ags_audio_set_buffer_size ags_audio_set_format ags_audio_set_sequence_length ags_audio_add_audio_connection ags_audio_remove_audio_connection ags_audio_add_preset ags_audio_remove_preset ags_audio_add_notation ags_audio_remove_notation ags_audio_add_automation ags_audio_remove_automation ags_audio_add_wave ags_audio_remove_wave ags_audio_add_recall_id ags_audio_remove_recall_id ags_audio_add_recycling_context ags_audio_remove_recycling_context ags_audio_add_recall_container ags_audio_remove_recall_container ags_audio_add_recall ags_audio_remove_recall ags_audio_init_run ags_audio_duplicate_recall ags_audio_init_recall ags_audio_resolve_recall ags_audio_is_playing ags_audio_play ags_audio_tact ags_audio_done ags_audio_cancel ags_audio_remove ags_audio_find_port ags_audio_find_port_by_specifier_and_scope ags_audio_open_files ags_audio_recursive_set_property ags_audio_recursive_play_init ags_audio_new ags_audio_thread_get_type ags_audio_thread_new ags_recycling_thread_iterate_callback ags_audio_loop_get_type ags_audio_loop_add_audio ags_audio_loop_remove_audio ags_audio_loop_add_channel ags_audio_loop_remove_channel ags_audio_loop_add_recall ags_audio_loop_remove_recall ags_audio_loop_new ags_sequencer_thread_get_type ags_sequencer_thread_interval_timeout ags_sequencer_thread_find_sequencer ags_sequencer_thread_new ags_soundcard_thread_get_type ags_soundcard_thread_find_soundcard ags_soundcard_thread_new ags_channel_thread_get_type ags_channel_thread_new ags_record_thread_get_type ags_record_thread_new ags_iterator_thread_get_type ags_iterator_thread_children_ready ags_iterator_thread_new ags_export_thread_get_type ags_export_thread_find_soundcard ags_export_thread_new ags_recycling_thread_get_type ags_recycling_thread_worker_alloc ags_recycling_thread_add_worker ags_recycling_thread_remove_worker ags_recycling_thread_play_channel ags_recycling_thread_play_audio ags_recycling_thread_find_child ags_recycling_thread_fifo ags_recycling_thread_new ags_jack_port_get_type ags_jack_port_find ags_jack_port_register ags_jack_port_unregister ags_jack_port_new ags_jack_devin_get_type ags_jack_devin_error_quark ags_jack_devin_switch_buffer_flag ags_jack_devin_adjust_delay_and_attack ags_jack_devin_realloc_buffer ags_jack_devin_new ags_jack_devout_get_type ags_jack_devout_error_quark ags_jack_devout_switch_buffer_flag ags_jack_devout_adjust_delay_and_attack ags_jack_devout_realloc_buffer ags_jack_devout_new ags_jack_midiin_get_type ags_jack_midiin_error_quark ags_jack_midiin_switch_buffer_flag ags_jack_midiin_new ags_jack_client_get_type ags_jack_client_find_uuid ags_jack_client_find ags_jack_client_open ags_jack_client_add_device ags_jack_client_remove_device ags_jack_client_add_port ags_jack_client_remove_port ags_jack_client_activate ags_jack_client_deactivate ags_jack_client_new ags_jack_server_get_type ags_jack_server_find_url ags_jack_server_find_client ags_jack_server_find_port ags_jack_server_add_client ags_jack_server_remove_client ags_jack_server_connect_client ags_jack_server_new ags_recall_dssi_run_get_type ags_recall_dssi_run_new ags_synth_generator_get_type ags_synth_generator_compute ags_synth_generator_compute_with_audio_signal ags_synth_generator_compute_extended ags_synth_generator_new ags_playback_get_type ags_playback_set_channel_thread ags_playback_get_channel_thread ags_playback_set_iterator_thread ags_playback_get_iterator_thread ags_playback_set_recycling_thread ags_playback_get_recycling_thread ags_playback_set_recall_id ags_playback_get_recall_id ags_playback_find_source ags_playback_new ags_pattern_get_type ags_pattern_find_near_timestamp ags_pattern_set_dim ags_pattern_is_empty ags_pattern_get_bit ags_pattern_toggle_bit ags_pattern_new ags_ipatch_sf2_reader_get_type ags_ipatch_sf2_reader_new ags_audio_xml_serialization_factory_get_type ags_audio_xml_serialization_factory_create ags_audio_xml_serialization_factory_get_instance ags_audio_xml_serialization_factory_new ags_audio_file_get_type ags_audio_file_check_suffix ags_audio_file_open ags_audio_file_open_from_data ags_audio_file_rw_open ags_audio_file_close ags_audio_file_read_audio_signal ags_audio_file_seek ags_audio_file_write ags_audio_file_flush ags_audio_file_new ags_ipatch_dls2_reader_get_type ags_ipatch_dls2_reader_new ags_file_read_soundcard ags_file_write_soundcard ags_file_read_soundcard_list ags_file_write_soundcard_list ags_file_read_playback ags_file_write_playback ags_file_read_playback_list ags_file_write_playback_list ags_file_read_audio ags_file_write_audio ags_file_read_audio_list ags_file_write_audio_list ags_file_read_channel ags_file_write_channel ags_file_read_channel_list ags_file_write_channel_list ags_file_read_input ags_file_write_input ags_file_read_output ags_file_write_output ags_file_read_recall ags_file_write_recall ags_file_read_recall_list ags_file_write_recall_list ags_file_read_recall_container ags_file_write_recall_container ags_file_read_recall_container_list ags_file_write_recall_container_list ags_file_read_recall_audio ags_file_write_recall_audio ags_file_read_recall_audio_run ags_file_write_recall_audio_run ags_file_read_recall_channel ags_file_write_recall_channel ags_file_read_recall_channel_run ags_file_write_recall_channel_run ags_file_read_recall_recycling ags_file_write_recall_recycling ags_file_read_recall_audio_signal ags_file_write_recall_audio_signal ags_file_read_port ags_file_write_port ags_file_read_port_list ags_file_write_port_list ags_file_read_recycling ags_file_write_recycling ags_file_read_recycling_list ags_file_write_recycling_list ags_file_read_audio_signal ags_file_write_audio_signal ags_file_read_audio_signal_list ags_file_write_audio_signal_list ags_file_read_stream ags_file_write_stream ags_file_read_stream_list ags_file_write_stream_list ags_file_read_pattern ags_file_write_pattern ags_file_read_pattern_list ags_file_write_pattern_list ags_file_read_pattern_data ags_file_write_pattern_data ags_file_read_pattern_data_list ags_file_write_pattern_data_list ags_file_read_notation ags_file_write_notation ags_file_read_notation_list ags_file_write_notation_list ags_file_read_note ags_file_write_note ags_file_read_note_list ags_file_write_note_list ags_file_read_automation ags_file_write_automation ags_file_read_automation_list ags_file_write_automation_list ags_file_read_acceleration ags_file_write_acceleration ags_file_read_acceleration_list ags_file_write_acceleration_list ags_file_read_task ags_file_write_task ags_file_read_task_list ags_file_write_task_list ags_file_read_embedded_audio ags_file_write_embedded_audio ags_file_read_embedded_audio_list ags_file_write_embedded_audio_list ags_ipatch_get_type ags_ipatch_check_suffix ags_ipatch_new ags_sndfile_get_type ags_sndfile_new ags_audio_file_link_get_type ags_audio_file_link_new ags_recall_recycling_get_type ags_recall_recycling_get_child_source ags_recall_recycling_new ags_record_midi_audio_get_type ags_record_midi_audio_new ags_stream_recycling_get_type ags_stream_recycling_new ags_peak_channel_get_type ags_peak_channel_retrieve_peak ags_peak_channel_buffer_add ags_peak_channel_retrieve_peak_internal ags_peak_channel_new ags_mute_audio_signal_get_type ags_mute_audio_signal_new ags_play_dssi_audio_get_type ags_play_dssi_audio_load ags_play_dssi_audio_load_ports ags_play_dssi_audio_load_conversion ags_play_dssi_audio_find ags_play_dssi_audio_new ags_buffer_recycling_get_type ags_buffer_recycling_new ags_play_dssi_audio_run_get_type ags_play_dssi_audio_run_load_ports ags_play_dssi_audio_run_new ags_route_lv2_audio_run_get_type ags_route_lv2_audio_run_new ags_play_lv2_audio_get_type ags_play_lv2_audio_load ags_play_lv2_audio_load_ports ags_play_lv2_audio_load_conversion ags_play_lv2_audio_find ags_play_lv2_audio_new ags_prepare_channel_get_type ags_prepare_channel_new ags_copy_notation_audio_run_get_type ags_copy_notation_audio_run_new ags_mute_channel_get_type ags_mute_channel_new ags_stream_channel_get_type ags_stream_channel_new ags_copy_channel_run_get_type ags_copy_channel_run_new ags_volume_channel_run_get_type ags_volume_channel_run_new ags_play_lv2_audio_run_get_type ags_play_lv2_audio_run_load_ports ags_play_lv2_audio_run_new ags_envelope_channel_run_get_type ags_envelope_channel_run_new ags_count_beats_audio_run_get_type ags_count_beats_audio_run_notation_start ags_count_beats_audio_run_notation_loop ags_count_beats_audio_run_notation_stop ags_count_beats_audio_run_sequencer_start ags_count_beats_audio_run_sequencer_loop ags_count_beats_audio_run_sequencer_stop ags_count_beats_audio_run_new ags_feed_recycling_get_type ags_feed_recycling_new ags_copy_pattern_audio_run_get_type ags_copy_pattern_audio_run_new ags_buffer_channel_get_type ags_buffer_channel_new ags_mute_audio_run_get_type ags_mute_audio_run_new ags_peak_audio_signal_get_type ags_peak_audio_signal_new ags_volume_recycling_get_type ags_volume_recycling_new ags_copy_notation_audio_get_type ags_copy_notation_audio_new ags_stream_audio_signal_get_type ags_stream_audio_signal_new ags_feed_audio_signal_get_type ags_feed_audio_signal_new ags_buffer_audio_signal_get_type ags_buffer_audio_signal_new ags_prepare_recycling_get_type ags_prepare_recycling_new ags_copy_pattern_audio_get_type ags_copy_pattern_audio_new ags_copy_pattern_channel_run_get_type ags_copy_pattern_channel_run_new ags_play_note_get_type ags_play_note_new ags_play_audio_get_type ags_play_audio_new ags_loop_channel_run_get_type ags_loop_channel_run_new ags_copy_recycling_get_type ags_copy_recycling_new ags_rt_stream_recycling_get_type ags_rt_stream_recycling_new ags_play_notation_audio_get_type ags_play_notation_audio_new ags_buffer_channel_run_get_type ags_buffer_channel_run_new ags_route_dssi_audio_get_type ags_route_dssi_audio_new ags_play_channel_run_get_type ags_play_channel_run_new ags_capture_sound_audio_get_type ags_capture_sound_audio_new ags_peak_channel_run_get_type ags_peak_channel_run_new ags_play_recycling_get_type ags_play_recycling_new ags_play_audio_signal_get_type ags_play_audio_signal_new ags_mute_audio_get_type ags_mute_audio_new ags_delay_audio_run_get_type ags_delay_audio_run_notation_alloc_output ags_delay_audio_run_notation_alloc_input ags_delay_audio_run_notation_count ags_delay_audio_run_sequencer_alloc_output ags_delay_audio_run_sequencer_alloc_input ags_delay_audio_run_sequencer_count ags_delay_audio_run_new ags_copy_pattern_channel_get_type ags_copy_pattern_channel_template_find_source_and_destination ags_copy_pattern_channel_new ags_count_beats_audio_get_type ags_count_beats_audio_new ags_mute_channel_run_get_type ags_mute_channel_run_new ags_prepare_audio_signal_get_type ags_prepare_audio_signal_new ags_rt_stream_channel_run_get_type ags_rt_stream_channel_run_new ags_stream_channel_run_get_type ags_stream_channel_run_new ags_play_audio_file_get_type ags_play_audio_file_new ags_envelope_recycling_get_type ags_envelope_recycling_new ags_delay_audio_get_type ags_delay_audio_notation_duration_changed ags_delay_audio_sequencer_duration_changed ags_delay_audio_new ags_copy_channel_get_type ags_copy_channel_new ags_loop_channel_get_type ags_loop_channel_new ags_prepare_channel_run_get_type ags_prepare_channel_run_new ags_record_midi_audio_run_get_type ags_record_midi_audio_run_new ags_copy_audio_signal_get_type ags_copy_audio_signal_new ags_envelope_audio_signal_get_type ags_envelope_audio_signal_new ags_mute_recycling_get_type ags_mute_recycling_new ags_route_dssi_audio_run_get_type ags_route_dssi_audio_run_new ags_feed_channel_get_type ags_feed_channel_new ags_envelope_channel_get_type ags_envelope_channel_new ags_capture_sound_audio_run_get_type ags_capture_sound_audio_run_new ags_play_channel_run_master_get_type ags_play_channel_run_master_streamer_free ags_play_channel_run_master_streamer_alloc ags_play_channel_run_master_find_streamer ags_play_channel_run_master_new ags_play_channel_get_type ags_play_channel_new ags_route_lv2_audio_get_type ags_route_lv2_audio_new ags_play_notation_audio_run_get_type ags_play_notation_audio_run_new ags_peak_recycling_get_type ags_peak_recycling_new ags_rt_stream_channel_get_type ags_rt_stream_channel_new ags_feed_channel_run_get_type ags_feed_channel_run_new ags_volume_channel_get_type ags_volume_channel_new ags_volume_audio_signal_get_type ags_volume_audio_signal_new ags_rt_stream_audio_signal_get_type ags_rt_stream_audio_signal_new ags_recall_ladspa_get_type ags_recall_ladspa_load ags_recall_ladspa_load_ports ags_recall_ladspa_load_conversion ags_recall_ladspa_find ags_recall_ladspa_new ags_note_get_type ags_note_sort_func ags_note_find_prev ags_note_find_next ags_note_length_to_smf_delta_time ags_note_smf_delta_time_to_length ags_note_to_raw_midi ags_note_to_raw_midi_extended ags_note_to_seq_event ags_note_to_seq_event_extended ags_note_from_raw_midi ags_note_from_raw_midi_extended ags_note_from_seq_event ags_note_from_seq_event_extended ags_note_duplicate ags_note_new ags_note_new_with_offset ags_message_key_on ags_message_key_off ags_message_key_pressure ags_message_change_parameter ags_message_change_mode ags_message_pitch_bend ags_message_set_bpm ags_message_set_delay_factor ags_recall_channel_run_get_type ags_recall_channel_run_run_order_changed ags_recall_channel_run_new ags_recall_audio_signal_get_type ags_recall_audio_signal_new ags_playable_get_type ags_playable_error_quark ags_playable_open ags_playable_rw_open ags_playable_level_count ags_playable_nth_level ags_playable_selected_level ags_playable_sublevel_names ags_playable_level_select ags_playable_level_up ags_playable_iter_start ags_playable_iter_next ags_playable_info ags_playable_get_samplerate ags_playable_get_format ags_playable_read ags_playable_write ags_playable_flush ags_playable_seek ags_playable_close ags_playable_read_audio_signal ags_pulse_server_get_type ags_pulse_server_find_url ags_pulse_server_find_client ags_pulse_server_find_port ags_pulse_server_add_client ags_pulse_server_remove_client ags_pulse_server_connect_client ags_pulse_server_start_poll ags_pulse_server_new ags_pulse_port_get_type ags_pulse_port_find ags_pulse_port_register ags_pulse_port_unregister ags_pulse_port_get_fixed_size ags_pulse_port_set_samplerate ags_pulse_port_set_pcm_channels ags_pulse_port_set_buffer_size ags_pulse_port_set_format ags_pulse_port_get_latency ags_pulse_port_new ags_pulse_devin_get_type ags_pulse_devin_error_quark ags_pulse_devin_switch_buffer_flag ags_pulse_devin_adjust_delay_and_attack ags_pulse_devin_realloc_buffer ags_pulse_devin_new ags_pulse_client_get_type ags_pulse_client_find_uuid ags_pulse_client_find ags_pulse_client_open ags_pulse_client_add_device ags_pulse_client_remove_device ags_pulse_client_add_port ags_pulse_client_remove_port ags_pulse_client_activate ags_pulse_client_deactivate ags_pulse_client_new ags_pulse_devout_get_type ags_pulse_devout_error_quark ags_pulse_devout_switch_buffer_flag ags_pulse_devout_adjust_delay_and_attack ags_pulse_devout_realloc_buffer ags_pulse_devout_new ags_recall_channel_run_dummy_get_type ags_recall_channel_run_dummy_new ags_sound_provider_get_type ags_sound_provider_set_soundcard ags_sound_provider_get_soundcard ags_sound_provider_set_default_soundcard_thread ags_sound_provider_get_default_soundcard_thread ags_sound_provider_set_sequencer ags_sound_provider_get_sequencer ags_sound_provider_set_distributed_manager ags_sound_provider_get_distributed_manager ags_recall_ladspa_run_get_type ags_recall_ladspa_run_new ags_recall_container_get_type ags_recall_container_get_recall_audio ags_recall_container_get_recall_audio_run ags_recall_container_get_recall_channel ags_recall_container_get_recall_channel_run ags_recall_container_find ags_recall_container_new ags_synth_util_get_xcross_count_s8 ags_synth_util_get_xcross_count_s16 ags_synth_util_get_xcross_count_s24 ags_synth_util_get_xcross_count_s32 ags_synth_util_get_xcross_count_s64 ags_synth_util_get_xcross_count_float ags_synth_util_get_xcross_count_double ags_synth_util_get_xcross_count ags_synth_util_sin_s8 ags_synth_util_sin_s16 ags_synth_util_sin_s24 ags_synth_util_sin_s32 ags_synth_util_sin_s64 ags_synth_util_sin_float ags_synth_util_sin_double ags_synth_util_sawtooth_s8 ags_synth_util_sawtooth_s16 ags_synth_util_sawtooth_s24 ags_synth_util_sawtooth_s32 ags_synth_util_sawtooth_s64 ags_synth_util_sawtooth_float ags_synth_util_sawtooth_double ags_synth_util_triangle_s8 ags_synth_util_triangle_s16 ags_synth_util_triangle_s24 ags_synth_util_triangle_s32 ags_synth_util_triangle_s64 ags_synth_util_triangle_float ags_synth_util_triangle_double ags_synth_util_square_s8 ags_synth_util_square_s16 ags_synth_util_square_s24 ags_synth_util_square_s32 ags_synth_util_square_s64 ags_synth_util_square_float ags_synth_util_square_double ags_synth_util_sin ags_synth_util_sawtooth ags_synth_util_triangle ags_synth_util_square ags_recall_recycling_dummy_get_type ags_recall_recycling_dummy_new ags_recall_lv2_run_get_type ags_recall_lv2_run_new ags_wave_get_type ags_wave_set_samplerate ags_wave_set_buffer_size ags_wave_set_format ags_wave_find_near_timestamp ags_wave_add ags_wave_add_buffer ags_wave_remove_buffer ags_wave_get_selection ags_wave_is_buffer_selected ags_wave_find_region ags_wave_free_selection ags_wave_add_region_to_selection ags_wave_remove_region_from_selection ags_wave_add_all_to_selection ags_wave_copy_selection ags_wave_cut_selection ags_wave_insert_from_clipboard ags_wave_insert_from_clipboard_extended ags_wave_new ags_buffer_get_type ags_buffer_set_samplerate ags_buffer_set_buffer_size ags_buffer_set_format ags_buffer_sort_func ags_buffer_duplicate ags_buffer_new ags_recycling_context_get_type ags_recycling_context_replace ags_recycling_context_add ags_recycling_context_remove ags_recycling_context_insert ags_recycling_context_get_toplevel ags_recycling_context_find ags_recycling_context_find_child ags_recycling_context_find_parent ags_recycling_context_add_child ags_recycling_context_remove_child ags_recycling_context_get_child_recall_id ags_recycling_context_reset_recycling ags_recycling_context_new ags_midiin_get_type ags_midiin_error_quark ags_midiin_switch_buffer_flag ags_midiin_new ags_notation_get_type ags_notation_find_near_timestamp ags_notation_add ags_notation_add_note ags_notation_remove_note ags_notation_remove_note_at_position ags_notation_get_selection ags_notation_is_note_selected ags_notation_find_point ags_notation_find_region ags_notation_free_selection ags_notation_add_all_to_selection ags_notation_add_point_to_selection ags_notation_remove_point_from_selection ags_notation_add_region_to_selection ags_notation_remove_region_from_selection ags_notation_copy_selection ags_notation_cut_selection ags_notation_insert_from_clipboard ags_notation_insert_from_clipboard_extended ags_notation_get_current ags_notation_to_raw_midi ags_notation_from_raw_midi ags_notation_new ags_preset_get_type ags_preset_error_quark ags_preset_find_scope ags_preset_find_name ags_preset_add_parameter ags_preset_remove_parameter ags_preset_get_parameter ags_preset_new ags_recycling_get_type ags_recycling_set_soundcard ags_recycling_add_audio_signal ags_recycling_remove_audio_signal ags_recycling_create_audio_signal_with_defaults ags_recycling_create_audio_signal_with_frame_count ags_recycling_position ags_recycling_find_next_channel ags_recycling_is_active ags_recycling_new gsequencer-1.4.24/ags_example.xml0000644000175000017500000037167713246707333013730 00000000000000 gsequencer-1.4.24/install-sh0000755000175000017500000003546313256226515012712 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -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) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) 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. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 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 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # 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 "$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 dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false 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. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/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. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift 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/ 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 fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # 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" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gsequencer-1.4.24/libags_audio.pc.in0000644000175000017500000000077113246707333014254 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libags-audio Description: Advanced Gtk+ Sequencer audio processing engine URL: http://nongnu.org/gsequencer Version: @PACKAGE_VERSION@ Requires: uuid >= 1.0.2 alsa >= 1.0.25 jack libxml-2.0 >= 2.8.0 sndfile >= 1.0.25 libinstpatch-1.0 >= 1.0 gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3 gio-2.0 >= 2.32.3 libags >= 0.7.62 Libs: -L${libdir} -lags_audio Cflags: -I${includedir} gsequencer-1.4.24/aclocal.m40000644000175000017500000015046413256226513012543 00000000000000# generated automatically by aclocal 1.15.1 -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29) dnl dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # 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.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.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_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.15.1])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-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*- # Copyright (C) 2012-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_EXTRA_RECURSIVE_TARGETS # -------------------------- # Define the list of user recursive targets. This macro exists only to # be traced by Automake, which will ensure that a proper definition of # user-defined recursive targets (and associated rules) is propagated # into all the generated Makefiles. # TODO: We should really reject non-literal arguments here... AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], []) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # 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 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. 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 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gettext.m4]) m4_include([m4/gtk-doc.m4]) m4_include([m4/iconv.m4]) m4_include([m4/intlmacosx.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) gsequencer-1.4.24/AUTHORS0000644000175000017500000000002113246707333011735 00000000000000Joël Krähemann gsequencer-1.4.24/gsequencer.1.xml0000644000175000017500000001054113256163135013714 00000000000000 2017-10-12 2017 Joël Krähemann gsequencer 1 gsequencer v1.0.0 gsequencer Advanced Gtk+ Sequencer is an audio sequencer and composition editor /usr/bin/gsequencer --help --version --single-thread --no-builtin-theme --filename file Description Advanced GTK+ Sequencer is intended to use for music composition. It features a piano roll, as well a synth, matrix editor, drum machine, soundfont2 player, mixer and an output panel. It’s designed to be highly configurable. You may add effects to its effect chain; and add or remove audio channels/pads. You may set up a fully functional network of engines, thus there is a link editor for linking audio lines. As version 1.0.0 it supports LADSPA, DSSI and Lv2 plugin format. And provides the ability to export to WAV, FLAC and OGG audio files. It can run on various soundcard backends including ALSA, OSS4, JACK Audio Connection Kit, Pulseaudio and Core-Audio. OPTIONS The program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the info 1 files. Run in single thread mode. Disable built-in theme in order to display default theme. Open file from command line. Show summary of options. Show version of program. ENVIRONMENT VARIABLES The program interprets following environment variables if set. LADSPA_PATH LADSPA plugin search path DSSI_PATH DSSI plugin search path LV2_PATH LV2 plugin search path BUGS None. So far I know. AUTHOR Joël Krähemann Original author gsequencer-1.4.24/gsequencer.share/0000755000175000017500000000000013246707333014216 500000000000000gsequencer-1.4.24/gsequencer.share/images/0000755000175000017500000000000013246707333015463 500000000000000gsequencer-1.4.24/gsequencer.share/images/ags.png0000644000175000017500000006352513246707333016676 00000000000000PNG  IHDRuFgAMA abKGD pHYs--tIME tEXtCommentCreated with GIMPW IDATx]Yl\u8 3Mi%Y$kpiA (оcCiЦ m4c'[,Y[WY8r~syd?0R޹_s$` KXD*B> Z&455hnnRu*JKzX,hZT*B!hZXV455mlEk!z^zt J62 J<,<2T*ZZZ ÁbsAR)9sT%A7 R JEfB*鴐t:-$ !V}{O(˂ҨT*B\f9ҥKBR~ JEr$z4MMMH$կ~mZ Jl6/ _ZZZ3 # A>rrַ~X,VE{{;z{{!2 ? ]fOL&A\"q'?ɺٯT*^u!JrRfffxVkyAfbZVQ|J%" LɓhmmegDU}{g_|QvR؃ ctt^xvr* ,&&&cddT xFBLJe\r'OTܚAB*]FLTb1h}ׄl6+U\. |P^򟛙Fo~۷aeeEXZZVWWb(]hp:s  MMM(Jx7/t?Gyl[4}X/~ 9r{A(*YR bRZFٳgqQ4P(PT"2Դ:}T*!N#ɚ8j& PTT*H$H$wLMJJbzL1Ija0`X`a6"J\.?)v;Ο?v ᡇb&@\F.t j5=D"ytvvX,رc_Ff |8vrqi=z9luJ"?EgA[[r 㣏>Ÿ~m>|x}}}_2??gbϞ=h4hjjbA{{;z=^/Dp)ٳgɛ4@\~ BA|SSTzKD"ºE^s>oZ&|P|OVڵk\gfv|Ibݻ* ܌~w{ P(`ddDևWTҗp8 /8u" g&{S:մ $f3Z-N'^}U& N' wwױX,})˟~<̆yss3jCO^z .\#<JF0x'_(xioKKK˥lBsѣx.J̄/}6ARʕ+8z( B=q%<ӵ/xzJZn__>@$dckMMM1_駟ҬJ333x@ eǕ+W/y2OZZZ$A23 f3\tZW:|>H$b>C&<6&3d2M;fz0^hb^yIAVVVFk$%W;fp:h4|KKK~:b1::> ãihT8u@H$ NQTt:-?N:%DQT* |^^{5! nw_]B\rp5}{JՃst/^N#BXāP,c޽BP nݺX,BP%rzzz`2RL&qYcxx0L8x ,e_ϋJd"L$׋}sUヒt:ÇcttFs* "B8$NX,nT*5\gΜ۷~tuu1/ h40LByT*/#Ncbb7n@4ydӊbZ`0۷}}}w)e\|'NbN;BBnb nXÓ^.X,6Vߏ'|s4---ػw/_|; Jш#G`#fT*;w~!> @wܵZ-/N}޽f#KJX,"arr?8N<Тr9|[8FFFk.hZ_{it1JٌcǎF̰ KV@^/K_<OCRpa??Y"(>,}ٚ}8x`C\yr!# "\.CjtnF}088XӉ* xwQTpl6e,../ R sssxwpIA h4n#HR闿%l6 EE0`@gg'l6[] X,5Aq *Qjx`ZLi;F"~fU)HT*z=l6<aZ g|dO>yŐ $455h4񠧧v(tD;B")t br9B!>}O=˘X\\ĭ[|Do&L&ZZZ[ R >gΜ@[pmmmصkn߾SNAӡjtSSShmmɓ'75(ҥK,F#z=\.nϺ!dzzS@ǞRCbdJb^j# bzzvH$ğɟfP Z0|>_ֆ~,h0L1DR^r|ۇ_|M8Py9M_P*J/"FFFT* Zæi?1vލu;o6ͬB*ѕnC=SNattPH`bcR, F# b.H&xK/z^^M`6WnT*|_4UňthmmE>gA7Z{ v]V3E '$~* ڻwoUޗFH~񠵵uNJfC:ްH\׮]Õ+WϢ%RQKԄV ƍ8rHUFOO>ŵ`_טġC;ai4 Juɣ ΍, fX]]C&A:^}Ն"A}K`5rƍb\Kӡ XYYadbb 8~8;paJ^'Y'b,Xǃ˿ YH;J0+RFZx7SOappލ(( fl|'łnV?%"4 4\^{jq:Єʥ^L&:tXlnZVjFNe,.. vBOOOU-$?[$dŘL&VO7oVYY8VC>FTP9O!F199 .Z[[d~Nj2f3# ȂеZ ,E. F񮕩hnns= f\*G=$V&&& 0L upU RoDz2"JV07.ZB?d0 H$?y3E]~`׮]p8 U*d 033'|/B( h+ X[[G}/}K^@ !+z뭷f/Qؿ?ø/h46,N֖: &''204 { F{3B.ñcvL:A`2`Z??GGlp |xObhhN)BroyZ6>)е5D"*:zp\U2+*`v#|bCr" V(R<_q^/Zvhooh䓭)٘Q|*ŪŠMv;_%uRBF^t t:pO&a% b^d8t3jp#J>Nʐ7r(ސ;I% ;cGb팝qXxpF-¬ͬ}@x7S.asj3JHύ?垽J#%<Ǘ H͉sS*5xMAcKB|L<܂5jmZfCӡUWt r9b^hHK.`~HUcԑjqxl3 H L"Bt:L&~$<(Dā49HpHhdf%m-%4K1ͦ50ptpb "&*Jrì8:QKa#J/qt##H #jE (7.h EdV1<< F%x^ . U%V(Jܾ}bk{'NM_&Ri&Õ+Wߏ.8N<;8m5~B)#ceeH&xꩧYU|NonzÁݻwcqqݻwq4`s^SSSrWdz=L[丗ed2x^b1x<*@كj#GpyX,sO~ Jczz +T*d2L&b?%Q:yu;NI& zUv^]vnٳaqv2U~?~~mܼH>`Sk4j5pnΛddZi}uYGֆR;ɍb*Sgkjj޳@ j'eիXYYje҄ߴ|QCvF*y( L"!LbطoZ Fł~7AGGr Z򑍦,odl[n͛HLMb ڑ6|5#KiZ ǃ~ZXidchnHK H٧\d5be[8tV+|ޱl􁕒jč@)D"XYY/~ 'R\ ^2o4k3T*!H۸x"8:;;vqqƴ"O{.^/){w>ex;Cc޽<]gfU-!@MYVEKK F#, R,I))5'*hb9*].ɶX,@^Wnȑ#%"^d2~\v e %}:|-ltvj&09Nv:tb\\Npmtki#RRlp7n@6eđPWD !fNPV$e IDATG9T3n4a2Ql'o\l@X^^FGG:::0<<)xѩ,~੧BOO, olr 8׋wy5b#68&=z$hptMB!X]]<mvJr7 0mb}\t:l6VXLoQ f3La1xt q g?[ykX=䩧•+WpY~twwp05Ty7ROs5,.."W^aǶbpit:7޽Gb/M~F`0tDX z*RR~Ҟ|Lb !;::4B5Ѡ>(>#fڶT͈DZ~Pz`4a4%і zA@1$"ك'x]]]ԅm$Sᅬ9F*Cj~CC(ΉmzTbvA/ղ&6i˗cǎᡇRDP7SPup&h4V#,vtz6_jqT ٬籰?XLd2r 0UNjͫ97A24Ll6:MOOge7^1h&R4ܓ7> |G*Ղ 㬪Bv#X,2HBp9ܛ)Ȕ#_H4\)SۮFI4*x Tf0LbQޠmHRF|XZZB&a}U)U,qm`Ku/Ẽ+w(d 8T > X\\D$n.*0wxgq99svBGGGTa2md2H$@ ׋!8qRExgx*甲 FkaS2i$2fggӃ-Y4J]-۵5|Ǹx"xpС*>/p0o>4y!USPp?ÇcaaSSSOhJEj|!looݻ166QE$-lZVnB>wq= iI ̩!Y4xTeerl%z'IrIp8˗/ʕ+?rpA.4K)>o&O0r0L&ӺFè"t---رc,%!ͲG;hj"✢Z=2.JHӌ4 " !2+eH͓8£gZFV8zhU׫튣 aZ/BAi@9jnnկֆ'O6(=zfN ~l6GE{{ &T*!̙3H&a>Iv݈F裏jƲU6..|ߙp9dY v3H$1??D"z>hUBjԜWY|oƙ3g022RUVl6 ڵkhnnjERA(˗{J2E7x JV8tuuԩSHR8tz{{4S>o D"LNNbrrv0`6`fX,6'KKK~ݎ{28W.qpzWlV 4Z2#Egg'+{ ,cɾ۸V-~ƍ;r]BIŋC?㘬VJ#d2d.n7ژi"UQ/M&FD"D"bZ߈\Jf. E)z⃕NŪʎ#I2`|LI)[@{xDvvs^؄2VWW]A>9FԋIVRSl)j}J<{I@I\pq"DGnӥ&[DZ@Ȓ8D &Vy! ifNqJίR_Rte"biU}EnOKVKKK q%H=jQ2n^zl$ndgo41PܧUobUv9t9N\'vG?c+nAw3v;;cg3v;dg;ADڵ n˗Y+i ۷V3T1HmzntV[V8k׮_b`NX,cnWW0??ϚU%<#سgky7iFS勴̙36J2z^d2<3T%—^'IB!>|fJFtuuիH$ʰAx@ E<ec#ln͒I{A:͛7Y+27d|>=z1|mk2g|<:u,pT#tl6l6#H VO hkk:Q#-(b^M_FzX,V;+Oڊ܋-žXS|>_B*>0f0͒tf+:!Ygbz)l6^ <G]nsd7 \u:CdS& F*1ۇ7p:4:::)_-=;wǜm4%^/=Q)os#r93kJ3mż5OKU8V+d;[GB!! !@-kՑ"fcMk M@ss3\.f33#x~h{jQDܻgELhnnn8<2U^RArOd aZ@oG;FFҏ$5>eIF ~?&&&pU455nn[ RPXSlif:F8pp\?Eť+^ x+++t:vМ+I[[[ڽ5\3F`޽Nc~l#[kq"1mAHAbf! P.\zzzRe򈹳rrnFxwQ,Cf)7553[Ēt;aR4t:1::HͤTʧ &Iů6Jjž}N1==|7~0ޔZyi<K*L#K E8SR)͛bz'$ۜlejsy5+e?׭Է]$amm 7oĕ+Wt:166vмN\ěsrfVgg'{1l6\~^VpnB>4 r`Z(b)B@ x<~JRO M4>^*jw=Fa20:: V/QWՂyvzɄ~8Ig%0L&twwgn tJ7n ɰFObSMEaٱ|VFŋN֔t:}[6?(d011itwwmmmZlFWz0 ZpݘD{{{3@`4:{#_s4p88}40lɟ@Tqw{"._]/,1N8i a\Ly;? `ZB)};[o&h4D6ťK`X&pJSIiFuOvv%ө򫶫KH$X܂ ̹ Eɗ_cB.,n޼rQ8Ϊ.PrHRн$}=ڊ^LLL  tJAT#FD",×|ľݘFl# ʅB!,..bvvkkkLԪj҂]vl6W(|{!M6 b||UJ cqv>lF__fggH$0%e+٨mmm"A{[}HxS2Ox O?VCP`&׮]C>xU`O\`0X*okog2DpyT*3yIڜ|cVFVpsNv\rURlL+9Xj6 C8:tc+D"7n`rr{Aww7cyDD.n5Ey@lȱ0Nl6dYdYd2)x^%/<[ . chhVLsLARaYihii$_%&fp'f2$ l68qwdIs[5"|>\^|iP){{+\vq/ F,7R6.ϳ B}6N8Al!jzESjݻ ǫTU-$&zش`Xw\UR"r9@ӱ"^x\2mL&3OJ|P(1Q#L߃rl6F#nݺWflkW\Fٌ F&E؜~.vkE{`3 , 3ACnSk)QPTRP(͛صkK6O&߁{!fEt:-Dx_OC߱XQFj2tĖʮgXJTB2MoǼU9Rɛ3 {/iNq^ >Njp8@ ׋h4.hZܺu mmml9tA6R̅'3LX]]evG$Aj1[Cc,JU54[Ȥ"wuuo߆ij> ۍ&cNv J˯^dōlKT)Ӫi 1"v;DrdzG=sb7" 8* CCC,GvnJ12!c))hԱ(#N3S (Li;$A:::000ˊA`XjO)SARkO 9jyf0x011T*Řk4e7Kdx]]],!ދ a,..baa^|~3R`2Յtvvl6*Ij5v;ۇz T*rePy2ԂI\'ҌR'N`hh)kVa2 C(9݈|0H0)رc0*b144Fـ%XGjw ^YYan===^ *%RHӘٳgQ,166tȞ y9 arr8t6N*QZ 8<< Ʉ`iidh[a2"ɠ8~8)Geub]RZG)sBPX[[ك$*dټlt:9:u Fx<NI łUWc=Qm9$z~]R TRk0>>`0%# <&giZL& kXXMIrRZ&"d2YIԊBԄÇ3!+ǨU1bo#rrXZZӧڊttttk HٳgQ*o߾-=$|/nͩjT:rforɋRiba"+޼!ĈpP1d2u=L-93. ###,ud2mQTfY4bi§n&/x"ߏN8)2i&&rf?ChZݻwCdrd2[nAղW E)ǪVp'=X,U%nT)H$XXX ,g2p8,..Bb||.J󊹃L*)v aY, Wu)sAB36W<Ǎ7D0<<Ƈ%97>ۗ?P|Z-!٬x I9\r{f: X5jX~m)\pwfs@f OCKdhh}VNn Ż &IM `0JӘō7gttt Zá4!r`Ϝ9R!l6ܺ^%:8<:;;DVV}h4Ckk&Enf(bƹsLcLi\.1A EB +T yݎY Ll6?}}}̬p; R.\@0n:4Qt:;wf===p\UcT*wehj4 $8D= 033twwv3KNsVϵ6}Jl@.]cbj0p\H&8ń1<< u IDATZ%PRDͷdPA|y& XW\:w(n@D~Hb---p8̀Pnɉ}98""HU69& |;Hxph4p8Z$ h4[IUm6\g}5eTfc~v;Ŭ$t=jIi+b:PPje7Vc>RKe5Nvxv%o82 A>bB͢Rg2Eqr&|#n[-R)d2TF:Dmc(|?4C5h/hOP/TM^);Wi6aZ'O a5%xอ(3\#ڨ%IA~m5 Ey]8!ᩆK,XJArd-m?󬑴nXX; M7f7J26>6(lo)z&7yIHߊ*Xz^[rS).N79r>B=k#CjOT} bJZI2%m}]&{+G=$D5Wj zK3J=a]zKi^j/W%OdH譢ב,Hs3Fەf=F8l\/ U]dgw?Kϻ~ӝ3vRng v9 ;cgX;cg쌝3v,3v; dg쌝3vƎ;cg쌝3v;cg쌻{񥵲ե(4ors!E?#U ƵпuT'չC<_ft,,f+ѾBZ=ba!.n"WVo!(wfzVfJzSt3>CTԆRb S*4W6QiRP(}fIK lmPRK.).)z7z+q*IF˟g2!fJ v@B=]Ӓs^+(/ w4YLĿv)!Ŝ(;w{Y\G!?4GJ׵ĝ h:j(o}BP{@+%oQ7"\UZqI4 ЧbPD|[.>#nFO-;CRFGG PM\]$pZUQ J#$%4B0\.ytttH6DގYXrʗFh0`Xt:xz1;;y\.8N]d2R@AboAb1ڵ hkk[5w/Ĩ}(8.ҵ#ȞffR}(ʚG"b1jJqAXedm!bddYSmDhcQ !fwJ)*OwbfggYP[U0o=H$022*[;\/T jrH$zX]]df>Vr!eVbUPTj0 Zp8X]]h``ЪFs8,;0~?2N[[g~Aej7+)!NGN9RiYP~սct|_ty!Dkk+Zgz zSʝp@bV,FqIR0䉴1Ț7&_HX,,--!HTebޑy߽cHSKy-NڔP|cccLhcg2/[\lojgbIVԠF^(/R+(qNLFFss3N':;;tbBq!~^y#<\*G@<|x"J= 5 xu)UFRsiA8IfYb1,//cqqXՋL&Se.5!J],Oj\1==rv.}#>/x![Ros) 9᡻x<>l:7l6@u=OɚUK,1dի6 !`0z=077x&'2Ć).^^4BfJh4 ̬>`ii ^)Rb%Ry/G5\d"22x\(Hd!,=SʕpFa :Bx^333bAGGV+l 9Q9ZٔU/_I!|>rN'z}Ê\Jh>hʠxOHi|>,.."l6j[_86:Vޚ "/hZR)d2T(z"3p:gS$aLu*t.e$IA,..QmPn:U/pڈBV..SF ~\.l6 ״R)DQAj&i D=rF o0P.bwR UӘ40[ű7,áQZ*GОD"zXZZNc ʲxErIH7zx!4 KKr?SisfIT| (tUσ,RYkR/tχ5h4X, V) )]\#)݋}U^y yojjn޼昼6qjwZ taݎ6tvv X\\D:f7bϮj4Qzf|O=VA:0Ji\96!5CJx H$@ \.шV 0PګkJ~?:4g2r0088(s`Ix /hzSSSF\|b4 l6\.|>L&)RO3'Ґ*#t˧9SgD*ϽD8n޼7n f {7U|Q:OgYK6u"j~M8Ppd2¡\.@ 2|8rApJ+ J-Fҩ =8/  " LBRUe u'RpɖPR"R(@5Jve^*ŹbSJ`J!!z*(wi]]]GW$j!U[@\.xXZZjHE=+x^{~Z,p)<)(sMQb(hC=>VPW=7QqP2fv]]]UCQۻڟĎ.. *͚4Mi4m]-/"|:{WDnb9g69i*u6)цK:aQ l\.f@~) ~4ϐ$rMvCk''hl}-˜R 2#L"˗/==@H>"a{{۠AB m3VfKPGy<<< c vm5kk {kd9m>)LZ8>>>V )!>?bw۶o-h5K+51t $#UU9l..&l=::2fX__G<G${eM{ t2v&Sps27٭sssXYYA:ƧO3 *T6 v@) Mtn!GVCPϱd2ixg#{dt%'K\h D%/+۬v]/u/Oy}PDN%]ӧOF,P'-!jW'j %x<(HdSRdAI$4.[jp}}m{\%ytI [#0IMl^%凇: 9/)(XFAà'qx~/iC"B'ts433c8HX'hHt#R0&W%e^'U~N*ggg8>>65nξO 2ARHOBŞ\2Cq̸5nS$˛j5u,//kvF4cvvGLiD^rFP6:PK'kuS"t-Q0|Ϙ t]XX0bbjaNIӓ)ezy> {>_JkIn.M9ԛOOOr_{Dnd2H$ TfQ>4 2^N,eD&M&.|>o曣h$u* J ~;%B#T:666t:X,#ZKO X,t:ު]*i۴F%xؼx$(+ 220r$)їkЇ0AzyybVeH.2X<,~<4dҐ2*B_6 {~Fz/OVVVp||_\.#&:H/Se 3?%Tऩ ۈm֘&q@2?d2it|M i| "Bh6=}(/t&l]-ǥvMsFTBTB4r8ߤ cHe>\.'''( Ɵ{N,TfZesMR)$ ~lq"$9y HΆ2T*m\\\|nȬs\Z;]Λ4yٮ KP(h4jX\sd1 a52~6^j6*g_=N%O{Бӓ L+++fgE'7w $wrro߾h ǏV$ƃ(+8<<,,666J80]!UI]r=釽jT*;U]ٰH4ޑsRgfK2dhE0[^Vɸ9n6L3Dء &>Ag2ϟd2U:N', rM G>!Zְad,zZ«#4BDdd2-J5ٳJC0ڴ"VWW59QaZمg2ɓ>/W;)UONem_鴀H&Lgz0m;,?Dr\h4g0NI$㵻;#1%qDs2ءP虨FR cssSA@loTʬ7(+ ~7$ loocsskkkFgޣ$^@^7@zHb6xfv{{k6^3glI(O:heךT\~]~ס=].~PP~h F:qhA Ah6Np8ld:bqzzmd2b1s ?7MT*jTʈR/l6 Y @ ܠl2gq8h#J%$ b /=p$5 )T*T*Bd2q>.> RB8Vj3bzzgON/L{5(xlsii 777XN R |5!>IDAT:u*_d`mB(R#L(P E65*5Yf,^_,..SG;i٧ sssXZZ2nR?jL& AD56#yTVf`eel埅zV v?2hAcƮDtKVGF:6{3O <"9sjj = Zb#|ცJ\^ &I-.."`uuXbmm ldhpY6| hRl6 湡y\y˒|GGGrX__75d/1FckS_h899VVVi5|M-q$F}.(!_kSRP(`v (dIZhahWWWB ;>>F(ܡ_phdnʺ&Ѩ؄ f`^\hlP( |^VcտyPSKKK=fX4$R*PVl63 *<\< 0~]e|yr$D#GGQXRI[{'j07(5XÃQO* >:;PJK A˥p9үMdz%[%Jg$ZC^繸ApV6 -iMQ^k(WiEfe/jjƚ3i5rOtKNLT*t:i$ ,//8lH{mҚ צ۠6O`U,֯5DuBlbaa'}=$W |OM RZ>3|4X(Hw8[Di$]{45 ~rRC?(sѸ6Lx11c5Vo!'w399sdOȃ%2qND|_%jڲ m9(wou%2b+_ڛyR)h6 kmQ )s;I|aT2CǂFx|hkGppK V~]$˴tY\mA 2Ԓs,5;4OL\cB^dG*eS_VU6z9Ҧ+6 ̐&l,緔%jLe) QykSp.a|yC[7%_9jƭ v*զ嫜Y%%Hl~m\K+ ۂɖx։WP t[M tɊEB O=y1zkmlzYFR%G/-1&a:ic;I5$khZqh58*l~ﱷMPAwN ALo%~=ͿǸFm/C^ @&ndoihzkiJ6T?a}?kF2}b@&\kru&C0&\k@&\kr}ɒ:uIENDB`gsequencer-1.4.24/gsequencer.share/images/ags_supermoon-800x450.png0000644000175000017500000166656613246707333021752 00000000000000PNG  IHDR cbKGD pHYs--tIME  ,ڸ iTXtCommentCreated with GIMPd.e IDATx\ieKvb<2+ ݯ٤ !P6,$Zaٟ 3m?ェ;!&X;f̛ͪDaVJ뢴h롴FZ gH rp~v9'B(c2%gqx ğ=q()" u0|>e JJP@x o+Lףm-Һ@Y ;L1 o+츇^a2К0# e HaE".0݀3 P)?|p~}{>~ˏr @L? -7䔀篍ȶBSkt=CZf(0y[ ( ?#e a=3t! q'P]ٕ3J)hס3B)"ϱ6(%# %g@%%a:(9i][;{H.ߛa}SB n:`=`,JYMۂ6(cOP ^^sw y ;=aF?" 0~J0H\s`1 eBgc,P2.x=]C(-9%#8 m+Ҷf`qYRwXh!\^QBg)q1OP홣sJ8P0Cw/?0vZJ1wVsuq9/geT:h}"8A P2uۊpN;%FynOk"K9SwWY ]13a{|g2*͜uvҺŏw ֳv1.3nx1 ϔ1(t=rk5>[xFsdNTvw+M?~ D@Uڱ Wu|J)nu(wX># Tnwi'k9V[=υPY*e=r (=<ZCH,ÌPG{JÎҺ1 _NRPp*_) $IQZk^X(JQJƄ.H -Cfέ7{~6%KqB^ gμ(Ҹ0!w|`FfTasOޡXxؖ l{HSZTN8PJma\*#wPHpy#ӄ"` Ϛ4 %lHҚ)6`y۠JqYuuv!EM 3`|25 K d&֬"͔UG8$šPH˕gJi`ܴ;;"6vA(ۆB+0J#uB?w1#=/Pm*cFN} gEnۉ (f"5 <&x̶bNwޠ,)<$`|Ϥ ^ܐnyKfC Ӎ ۅcـդg}$UY'2q"\^pH+cbsqIŸ@@DLva2zF۝3o4p),X~-r&@[yog)xj롥)7gC\n.~A8Z^ p9(0 ;X_>#.W@k+MF)]G4r ZiJ)l/f#J.1Ģha=>m,J 4䵙!7h1o+zclH󕅢6,z%.򌦀r eAY-H 99Նvl%aV[?C{;N2sD 'FӍ0y P0GH|xzj}@% l]ߞe%G9aҊwu-.fi6|kGXάK&;BܐgiA:~zf&Bp=3okk|M?"^Pc%P9d] ?"QrBJ,VkNw rP2%`Fj0K7V6{{gM[X'(͢F%E6a5u=RX[8V~ <Ѯv(( &r&sv]7L06kE <(* ;v0ㄴΜ0i"(48G)\ *X* P9m(03aX6oY{/HO63Crq^}Vt|p/`ǏB ^O[ !W)|%nk9sY7!Uō]K:(&%ENGㆴC1ySR9 + . Ҧy& ȟ"R qԾ6  A8YЎXiTس˼JkJ6ڱy rLq& QѼ-P躑)wPH<; i 4'Ry.-9CX8Z>?[PZ#b+-h/[o'@V-VAErHۏu~iۀ# @i"h0_&mi$whw-ݞR`yhE/r#wWЪ[*CVc+r9JÎq4U{#\yU8RZ."Ҫ miS8_P31(18"͔X?0>utC[OB L [<ލ;tGqH!h =8 zzk}a, X/Ԙk:6Y@l;pӞLKɈ+JXə/'讇ynqJ+W޶{S#A200۹ 9rVU ǖKF{n;)31uspr2}$ Xdꮇ?<H^LMRxd-9B':;gNggUN5!s (S N,"Rxad ֶZG%Pš^E:2ɉ)/½iKRw=i0I&q%ER/w":^bdavAL!lDcC"t v ܴ:JkRPQۤXlBT)qI+9AqFA)1Fɲ,<u7%IRSCPMXV\oe9N""R|2Y:Y.c:`QNN|w[Y"h ֎i\ 885 ~Cd`: <@"͎DB ބU$&=c[*2 lӍ\ Jʍ6{FfA[)ҀҸhJCҚobDm&DwZ@)#(#7@R?kyо'U9_gNb'NARڰ)&s2UJnzLs=`}J ί@^f3X| |wꏵLIY-;Cfm/ H+)jȴ{(<$y*@k;tOHR+ۏH }TrR)ִn'FTGe @0۹Q8I2qs'#o:Ý'E6'"QaDfidA F(mBhi"%(RSmi?%SIdڰeR`$lϟdoy _GnC[K[~*Pzv"m'; 2oHy(x;3Ԛ+M[Tۀ:i! ե}B-4g,_~DAz~vz_-O>p|<=~i^/^/ȅp8JFCN6(Rj\iaZfɩ'2&Gt: ~NBˌ$TNPdwc%@@dhD6DLȻ{s(y ixy2wzOAhJz 1>yv&LV ۴6fiŒX@56EIMFqcN  PJTJ&Uiy>vfs'x^1Kw\)y'2#\ϰrx6o6NH@va=2c*{U^& ,gSKA^W2#֙ʷu(cg[ ekjS7nD`O@mT]x|x:h#vΎ;ֳZ M Sv=KLT tJ|Rίy[k3L=iaI uKr酟)E Eە:9z \~#ϼ{h4p;46HYAʆD)+eNη %mн{X?{x߸:"mOa /v0`| %cKCPcLX.' 8NOGLO9YpODa幖8 p.'Ǯ=0^JΪE=c9avza* N6^4]oqJ&XB*Ǽ()81^O"M ?v}ovG[sHJz#\Xm,EOeQt}%ei *un5d $#ϼuF(Ogpa)spvv촧.l`4WNujONI q[U(ߩ4B9'6/ ?m?+M^IIQ.%V{s#'B.~KdCHk֡.uWѿQ@rj+M;< m+rfH5{Yl@}!Od^gnu)<"#:MF^{V1(r*BmեPp';JhN)L*b}Dsd(X`<(ePDTiޱB  9B`ad4zrv~'I83=(j2S3w"' OD yrJe&7r%mmEIYDE[P^+?@)rfWO2@+3c)ʴ ya1ҐZ$& S6/Mtl]KtJ{UZN&BSZ9P ="8 Η =@)iTHwOНoEWM̕2xamm7ֲߤHW@w|b(wNu+MMtg/$#%"}/aaEg(:s!1]Oﰾ~irgv9v#ߵ'm JBÙ kFD9F9(&W&ngT)J Eh#ni8*$f-މ-;ㅀ4y YL#t.m6Eck eO>~CM&PtB[R% 4rWhÍ1>-ݮ8XrzaR}Na QJ'̷2(X?*;3{ZVfV e.Akˉm!=EЛ=G8JS$[pz'h),ىX~ӳ!I&??<ƄLlRYhX  #c IDATcm|Oo ;6~, yBCެ*'p@).N9։<~^UZιqG оGk|e )=𛯰=?pbe8m2nh&<6] sFdXۙaZVkjޔr#(5UgFDR "2Zoj*m\ "'DfLmv^(*5'&=`{8.Z Dې4= J6ITb֥iP8D~hҶ!Bg)3Ŏig'Z_yЗڡTssF)R_"uZ)CT@sr,qI[(pmNogv.Wկ~oAAV2R@?(,\7.\2u30trF\dg N#>}o?5#^Op/2hFtm MUM&Mt^ih5PPc4'O63'zOM.sBSb"@\QB@OVx'8\k򋲜̚lZlSR+kݴuB&i4RPAi/kO*E'XyXC˩'aƠ UP2Q$MF/nkl e=%ߝEQRͱwvX" ]Y;X~GN6:4Nu, 8m6Ç,59(hawV(,?hk -צQěh-"8"miTx! BP"FXD̡$f| r"Q\gU2޿qa,(__??8oo-5)'td`K0 -i10?=ap4L8<5cJ&(S;m-[ RĊӶ4{nMA/UMV-21g-G-u|Rl[sT7jG]CLrwS{;nuδ]:b7l&qo~@5JAƈo(XUD! rͽx҆7VVjS[+XrGHh|*@ !r~pgwFFMVE}-v,ܶtץ:4=jK!X2y6шEwל+* r;Au; (Q˔6t]Pݑ(N7*$ "RLlDZ!A{8)2)TXPէ"YkqJw.>jQYQu*)%lb[gˤmF~AZ5' C+BbiC /:A! r"'Za هbT^>88_o<%C]:,>,uy&i/$DN,ٕcN_icu4t&#m|'Vi$M J}+X߿-}%,9QT i]ng'pzAkfqYM(ȲʑI5FP:DL뫖NӎM9FN-EJ#;</BpڞT{ B #Fbg*L~ k'ٽ&(9IK x^K[;ꮍf,SČZƥb3*l9ճ:9فeޓWix"{xjO )M2@sચ8i=;<`{O$I +8vwhj'LH W46KAfڲm x=IG\X9K£昚nbcX-1+kdOݹQJF9sT7d#Z ֓Ovy[ӑa}sfj:Mrvs pӁbX)=_[Ls9Ёm-; ׸:j Ȯ+J[ -U^';uxGPr#ADu<(j%KuKT)M7SVu@VޖdsOkscJ-v!ۗOFFv%E5Yb*]G8 0ӞgF&5i ][wm/|nq],'eU`$\DGx;M(!/v`CYI"tMb{' 'O zm6IrY`"Z 3SD_@˧߶)Qz.?8Q'HG:|JrZ P@sT= r-uka^7LmwPm1S8ˉÈ__#ş~ݷ{<=4a: ÄwsDg(;n@Vj 8(u60~im~;i iCO?k ^e-X"g$(ߠO"w606Ů%W 2A#;Xf %ڣ:y1.!\N7%7:vCwzU(-7~l\Jꄂt:INVhb&BZoem1jmE˜sn9<.LVpWt ōe]51dBQF3zRgί)Zʁ/b54pk3al0%Pw]dWE$=.@T"fS[ۉW_lU76Kkl6HU#:: ,=<~:&Mt={R򛾯% Z(EM|Z0וS9~uDIMe=!UQiImt+t-nuUEuJ:3DJY 1Ru41!p%sӫbH΃ؐ!i׵1yi)\OsTZ0,r@4W>JY "R..mS+ DZ:Tgu}hnl}DI-41Wd[YJ2{pb} |:i z6OrZ ^-VT%c{}h w8oݍ\e-4>g;<6",,;OR.-ynNIYWFE> >nߣ ySpf2D1o?;&ɮ%ʫ.2zxߵW@{[cRry6B|-KKZl/먘K7W'o֩4M4ǝT6؞Y &GV6=v:{xr/iF\nk rcm((FCʈWrib͑{ufi~V&SN`}@.#ϽV}f:7$U57_bl|G y/F<нx9V۵7b~aDZ9ig(}iu0y3@q<z?B)?b}; ?y@&4,ȲkkРH3'UG,֢k}Q@Yg?~_;/;<==P\axxh;bE{'"C] ̸G`zl 2c^ |lȦd/|nø;`& `5c?gǏ_bŐ˧%O&Nvx~}cw˜ս]Dnq7L'a@Nt2bk]Ӫ֩{;V5H/#EnXv{xhf4Ӡ%|FZNB rc`$6p~JO|W"bdS'uJn $4yJWhehx'WFЅf8v)Dãf3Tw%Yv <Bm÷%W~ыT '.܎FR'iB$IJ B6${>|zV=g8"xa8jf͋ØNl/m4N9nvDhv BnډV0ʂ\̴ u ^x=,bКN'!Ӡc O|eh6eF.B? 1Qo:-|x:G_yCT/":19nΊB*a#,O]gI+s? kQ]6nsR-kاOLenYի͖m`['B,NĺV[udۂpyAp'nE8TYc; e÷|ύԾk؊; 6ԾIqӪ[v02 JÊ7M<%o=WrҖŰӡmXݱc9F+خkϻNHڂuᒸ 2̴dsTյ)|Uqҵ9ΗhBu(6y KWm۱LtcUqsNweI d4T{*Cj>B9 ܖl唄4{ym;zÅMܹ5aF1TP0@ܰw Ȉ;^/H̽/eƩ%Jsu4 es@N0.ԥIf o<^ɄHXFl~ V%'hA~x!K %k[)];h'k+ BJ]GzةbjcNxb>3744(LLNk 9&tGG|MU5zUXU,fvs[vV5to𸕂'&L w˴]y8F'^`F.3CZ9EJoghaw.2 p9Yp=݁>(c\5;Q`%6v ګmO#'xo~w?%*P)O{6gXӐ^,JQ=7kyeYT}6h.βt@m C_ c 5VZ;_ᗿTG,PZlV}>W03#2=Bd^]kAvHMX,P=*KQ$Rw咵"=X5xW1qSaut@6g=;7TY/{iU]'k,Wk(UrW,b(om­ ChYJh`q),͈;<6Jkv;oxi)0r0ʷ ]Aj]ku'tYjUrL"wq(9ʽpG툛vDً4y[چ۴-N1UnmUsc[@jhE%VR(Hqȶ۞1bXHc-y~$lCEL!Lzi6"-1!W5ZrFLCm33 l.=E;ft?G{A.gixIpx/` C/"Ѵ-S,^w wNYXZ2yW$ޗّHw,dr7F|hr+/ٍܛ=`M&UseqE/&ofҴ*c0|I{$TaiXÿ ?/񫯰:tF(@nʼn;Yl×1z -Σ3x3ແy3l(B(ƢH.-\٧pf]U7 IdtΡ;?PT%PiůmUVŏc,SF:MRR= P#L:DO+Z"rnm`Km20ElUT6M07&RWmS F*r"Ս96*umgB7chʴ%kz P"EJ:wHsZc#s3JKwwʪ_*#Tu(bqjoCo{'ٴIvqPUcD'HͶr_Һ*ȍ=Y'ٙa'ISz.z Ese@~i(-i]5&ɶx9sb$:ˌeĮ!0f0;`UϖFhNbaEBAi  Ҳ4Sk78No3Nt5 d{s >l+WRaU4{kDΪC.tBCؚw*\ɮQ[0)͊Gљ0s)%~.(NYxrHJZ(. S3 7:7eՉDa'JiirRR 7;|M;XU`4(D+'.="ۜsfPX-t%n<{8Yº 傔2EofPKX0U pՇ_ ob$WΈ%e uVchEų5VenjcP!_n,{,Mv6u`Bɲ!!irXezߚ @nH2)${Rꤑ- |j~8JҐo5BG@,㍁QuKV5}{$wFZceV sy:5!zL%措'K m SgE1w8]"u"TJB^6!N_i[,7ْe "ۛYC[HS=u~scȬdsh)q0` e0%C55 GĽ;aO*3saegT?𢦈ffiqfw $5D:S'MpNLm$,8BJOZߩ#esC$Jo veZfH)KlU%y^bz(jVph[꽃͟"N#J2lRyůn*yx?&Lx0llZbP@W,eQ6HI3[>ȃv0fX\csB=<5&iZ8ƒzn8P[icmORO$VDꪞw"2H;>c b|JI?X54w٭"Aκ3YV;L 2󖖝)S? D\rE 2 z`<7K j_HVlKZs ƤQzsk^%K|dHT1&qǡ,DpEJW4c/9k_ngL˨AA+#5\'O_,k6J4*}ӧ_A6{LR;cE PRܝ Tw:>#~!*w2JHGuRnWrA2Ѳea$Ozw|~7/*ٳӠNݑf>1h*^+îj#M'x4ZRBtfw,tR Yj/P .Ʒ/y"$v ]͊h FWmguYPp:-4>(,]5N$a؁Y |<-dW#&}?OIow~tqKC`]tۡ,.&٠E\NSk|;ijmfjR"!:tKzxU'|gS :MӄKvo *hFZ2w-3b=8Z={5D(l刻;ΖCbW! &1k>?&&NE=k֎6ed6;&t|0>őiw?jup0 \$'iN %s^b 8b g&K?$ACềK5֮eʃ2dL_RQaG=DaH*ݭN%=tFI,n6Vh(J:J! Q%:Di h4uRяJQM/$Mu˴)z<#~3moxkAeUe}™r$D»nhFwAǔ6;7MӝaI]&Y^$_Of,iz00t6xHTľ[gvtm0/O;3`O$|;e?{+IJ^ j]U¬)g|V bcM:>IDЉ^` B6y.L&tA tT/oR'UBTw,®eanKgގ5N|_;I8@#JEw~lhYm>~g|o}Dg{^Pホߚ)bF)Rml4DzvOk rn||S`r;ȱ)ѶqwlQN ~L"Pd縴7RP<4~Mr:oP^f(^"7HNUCG]Xb/^ 4ghimưz [f)y&7BSNkIqESѸVEe{ܧ^,9wf$-2N_~mlzG)d1g!Ss&n$>Î) ƉׅOb\ 6lȂ_{Ø_G7Xfz! *EsM kaR1 JRLv!O+8C| iK[\&*gڗMh.En tG4Cg6M%8gtGw<7 .#'5B>͇$ (MVz"U2.㙳?D+~:M!"6)__DB/ 7)! :p6!e+Y,vx{vX3oun-|"覝8^0J5V %:~G&Zqq5'_Owモ"t1xִͫ5eIɢ׳f ,׋8i2<~@7Ҝ<2߮2߯ I9SP~?GaJPk2l%hQINǣD~񋿗8%O4N#kNN&qAF,:r2(Fo}6mvo1r~e8t|e v;qڦ=O|Ž\O2^;G"hs0)aJ , E"l4r⿻5q/hJo:I[&Yng`?'  5raJkrnzbr ـ\?|ͷk^:нm?R5Y22#EI(êNi !akߤ̋Ԛ1ɋ.UHqEbĺĢAv J~EG(iG^~\s+9 1YQfC NJKë|[@S-.n'L)W .ʸl M'snxyA.X/b{wb{j5 k),ֺux$h,Jyw= D [":"{WW u }QT8O//h᜷S-S"џK3'bh-ydqz,읈 <+;KYH"5ZI, @RU-$'4;#E1K2,l|slX~TJi: Wml!qнZc^BƎy0}"~ąuv+F;Myu/V;BP^,3 JeT}v#=cz Aimq|0Xɂ?k˦˧5U581^tҡ\*:K}V IDATfh l6Gi{X;)xQ$&5XuYV2in>+gI|*sʂP=]/qwn`Y0 }@;>HZRӚBZHQS_FdzV 8qGX7BV25 q{ og ni28#-<K_s%V),^Z/?"'ІςPc:FJ׋M#}v|;Ku?ŤT0Lf#UƩ7LNےY =P$31~ΣP  aC{H=;ѿj{U)aw{vtE-=aNT.P~t_ F7lTf8h7j@p;<,Z|>v{*6"T̗7+*Bf"N7T/:>&b-y?>5<_Rn7SKh;>Q}S UEUjW@EFuin@&_8^^N_7Z~TV V<`&r͇P*Ղ47[ZMЬ"}?HB3 TUew*!*V(8h}%צ)>u8$w?6oh3Eo^bp>b7hqyK kG㕽ȓzꝏ|&jq(.Wx|+.F ='<.{d;okYjd0.]&1rv -]Y mͬH4p kΗ̴F rza#n<߅Q=3j g0/Eˊt֋NXb-?F*afL?zLi =Nwq pkWoW} q^VTYCl奈?gTB~w~Wml$ [RhlNLԋNr2ݭ*nw|L_~-H:SE<IqH U( 55q塒Ky?n Xg1J˷}'/ E[vD?q$9/GIa@]?6l-=9.{("o$doY"hvƎ{U $h8Hg:xhKVx噃6 )G/폆o,p4+#w k> mm6\4%>ҚueSIkk0{~PRM ;lt+"hM3 i7`|ÞS$Fr2j5fZ&ySeƮ]T}=jN$i,",G ˲lWD{+FzFHkq4/߯GLwb'eLH_?4М0\OTw$lوg˺ ;^UŴYQ́>ZGN%55 !V voi(є[`yIX-7D qJBY߸ٳG"hafR2xl]gZ2MgT%M'5' .Zz#PBq؉AO4 gbeHiᓥ=v6O,6F(1w mBX֖S\/=-PPh9vHkG-NŃ,@:."vus,sxF+aA$|MdׂovHGVjiLHԉ >a^޴]{ CxxW"h9)Yƫf~|۴!pa>lp f>{#A't>%l"3vrr2~x.trD$R\S;װgN_p'1%7LIk@I=.e§ BxҝigP:vgL#U?ZXhEgZU:Ѫ2К f0J4l{XJۯ.#]^*Nhe>iyglj(N-I†;`@D\- iz[ ¦J@I,a"yAKY3'{T~K&͈[ ORk??'?QRA<40u񁟷Y€, ȱTJ4 eŔוPŒ 4N({XگJ2K(u*UAmDb-{Hm(UГpE6O8d/}?BN \^x0l%!p}{u:$ rjktKnAm]'^T>tđ\dXyB׉c L:A)Qe]vQ=|l8]/PDt rtκ4<@XaTCaZL cC"\tmt&:r҇9}W7)q jT 3jo;%84`ͷE*uѵ@{Plg4t|- vR qsU );V- F!rT$(ژ?OzZ-yV\ۓӎb@.I|bEA¥Rlĉ".J|”U9_>1+3ǧ0iX8a0K_0z ;3T>j<hVDp_']LJFh G_.IߠVd2iF߈`a/[^0rS[$J;ڤ(c"s&hIlkRl@o|?N|9I"=x-3@Ej/3qɉG{2Kg6k\HT>bRN_~-zBy)RrH|efi"qwxAw~'+IB;>CJF%EuvO{fyq=fyAR?S- dy{ښ+a֐nM3 L ~S "]柌w7 v2| `y#Fc,VY<Σ̯(Z*bG@(Sv1i"!kq[54'aCfcb=d4 !˷MS݈ Ɲ5[ ^U-N=e#jEOÁA}je?w[~a9 0 z DMiڃ{<,g1od?П<ީCE(a@9ƙW_@ߵ\ެQ'oB;XSitxC{Wn aѠ͉F:`z8^I߫0pB{N }mvǼcn}y%O=X*h]=z ,qqek*6EQS N:bvVeg1^`;Iʦj!`4V ꇭ vڰ_Xj7ܴ/*88%߯Z'# ].絬NZ慔 <qg}¸,:87qGku܄vFSs  -f> OPNOi2^XN H"pX( m+≆ CBJtЂSLoz9O>#WrA;>nu>X`\7db7HU(""2{X&S{vs8#'J"qqQY2.5/@qj> iBf[@-l5_ZC3\P.9FMDS@:T8 F(~zm12\^; 3zq"Gۉx_-)zq)XN|B?>Hn;~A  ãZ南M-\'"X]͡Np\ FuüV o_pȟ& "qi:[YʼX| z8'uDPcpGDDP(&8'G(rPLнIy"QHNoHxZAM=sI&NF ##}y7bjŬS-8b~*+5B&͖}V{7D J׋*<ùFp0s(X5PbÖX `~ئ~C'qq~oG4TQ(íS+aN* ) \W 2v5>wzw`!R6z*^G$NTE5!^QgJC\/-IB?U:/rzblݼ*kPFËZ]m_ F \A_RŸJ Zv Pl~_'9>8S YPMX5;ܯhҾ,Г= !x o;)M"/!>z8(tB6͂:<3y͈pcqCgKC5Pބ ɂY *ZF:Rmj)u=jB8hD|=#ߡH̓1mć#Q.t2ծv0"T4PF0ŢUm^,jP.-eՃ!jpWU\ |ͳ,o_p dGG^ y#$=``XԔٕ0l!W5i"(8JN9tGɚvn $@#hA GZC^c{;a6(Ӊa+ pEp 0M8VlM7'HyQ~DfmŒ,ӗu`4i+}O7e{ϙ;Q!qaN)OFC.' Nq(^>Rh`m9 _s,}k|:ʌ:^m=TGg~n]וsR$){tlTp. G] /*͉Z 4 ^ڌ.WtG>NA!vҎQ/|Ao$ QRpR4{^L} }/ zng ߖE/fYo8Rx\/+&ڿ<IP&r~AJ3$l!Df+&kD\{ qK19ݸ" (TǛHXmz s ĉ-"KNa}"$LZvZhXˠoٔ|z\u<|LE|7!r~"ud>s ^а ǎ8TD_]3glZ@PޚNZEP5W8yjmEL `$Yڰve)qr{jz.uG-L<7 pwMr .`$oSEsy8*е㌎Wh+{EaQ8ѪQnLA &:"0JD߰pA\)訐kzjz8+JZaiXw(IUQR jLEy |]/'LAó7|Q[ua#ue,mzXG3[J LMD}B zoͺj{|bo~uW5WMxh`\3B8H:j/0;O)2^%gNh[fp) !r=1l(z]xqݼI6Ia83p.0W DcX-ڟfpv +hyP/mmsNgj}hU^u:+HA-yYѪ}`0=@/7PKϼHKSN$*ݴARLY22KogpWĶw%|¼<ã?J[K=ԤR(M(g .6_/\89Ihwmu-$oZ蔣wCA+ab)\& |J@1j\p,?xNif+R,ד8'l[@z yzd?"_ &U׸#?b:ppJ K0 : MR?V zòfҤ!ߴ A@wYί"Y<9'ӿ7ſVv}/ÃXL0(ǔռZC=Hə= B0T3+<Zx鴿%{-J2j!Hp V% ._Abד䧖%EK]">8HN27~'˒&QROIjijCt|rAFw S\UBoܽ3ޤ{|@qLj='NϜDwKqlYR waԉ #OQ?q$YATܯ&GXckWirtU( (AZY# B4=ZεO*qX sŐ:E|% | utu 5@iakWj 眧~JhӋs'n,pE#Z!4jtxBvΥȼ)\,#>_(&;8QyFt,J~^@s`!]t?c_e!g:ň17U?ʒ1 E'i 5c&1*봃#r`mLM-J9lv,Ct:!e;̗/b JkkC ^А o&Ib:1dk 3_N(Hdq_Fqݰf?xh 5T2K0}òкR|j}T,?qfPCJh`d"_P2Kbj@:JvLD~nC?QO*Vix;߯w{iO`8 8v-Cc|y7i?HHع|lDR/ߠ쓨5u)vo6 ~ba;i%  IDATs5,X.4L?ٌ "5;l9eqĩS8fY",Jw{66\&W*[RtU^t8}5 I7I#(ىsN뉗+5.! 6;OŌ>-rޱ ߶E{@#y؄xi_Q wB9'J#VtA]yB[ ,8`Jx>neЩˇN/ð XY?T^o Kg*b5.n$Eң=ܕMѨW_J]`DvrrzDeYµQs|u:x ???ݟIBT(kttauG)rK0tc.H{x/8PM-(r_uNj)Iɋ?Qk8S@ $ø'!(".Sg3%/$ =N'EwI2e7_|ԎYL#2YyWA]CJ$?e%l6ާA$D>}G$DY óaC̴?k:Tp<De?J_rw! LEZ&)&d9`fŊ*yiJ{D=HL[Ax֌W]<Ä3f`t=<:T^bnv >&I'Nes4^ :X8 j%M3L!t( $lvR'*JeƁx*(ыtGIGSc-$؂!gBjP,OPƶ\[[4[;Fd"ݎ D@o`8Rgfch3fY*X0b.}oqp vx#͒9T*:z9KPŮxXHE}Wi%8$yk^]KԲ6j+k腰.37R"U&een(ՂjPxpZ+Y mMRk2~%>8KLG Z\|#=QrXp Ϫla7|m諿cQ!J9Ew<5^5vz{% KYB?]ezRGn,ұ5+A+,ж+¯9I'2}eS-w,D,o8e9}Au (f_dErz͆ d%nԣcsV|`s_8X/'6(+, ߎisjFlb@;0 ߛZXvOhG]% LjJi%(f,WX4,2;̅)Ғ8T{鎰'O=*i{XsB8XRPW~cٰB*Q ^|NL`]c u9qkOB4@?zV/Vqͳ,W>ہ+-=+E\.c0h4Qg:vd$_X@KvzLov|F#ua/C%a;{/&LV,i/"ۧg"V)HaJ+AqD.ݺA+p*5Lᚶc x]%å8@s"JFN;zSz6f'eP&nN^},:ӒK:d1]-zF{ [NHَ^id ee!ܠQ4j 1`a.L_ y->5RԵ\󖊭h^#`pPwRjyL^!w$fؚ`'ݰ(7$FsT7mP>Gs߯p&PT @-+̋pN#LvIU#G;Ԯ#e;;aHl YA(Wv;|Z_!,Pg,ZO/NpBpwػ G*!| c 5[ƛu5-CHtbFK&[nGшʪmv 4@ lwڤC"O"Gjv+DUY͋pL ]ٔΓuh^cqHœ>Dxʖu<:f,F^)uH6h.EnaE8(wY' mUb]5`VA w-f8x.g?e3@W^,A?ͥ;<`ta`#yf)Q#T#4c~2O(=XH\qvP1@b6A$hZQuӺ+NxqڡēA~w-㻳ߤ/D'D]p)ţ5ѿeFR4Ei4%_N)}:ݥ\QcɄ*xRcCQ^0[Mx3qDq1߬@H\AT?W$!Hђ;)8j_V%r]?->SmY-Wjl<_BQL7k5Ȃ-.(T[WX .+]l;:/BuKt(`c!'YmȪ0 溞xB2]yQ%ެGe:PqQtG%z6ww|FlJОZ˂^RޙV*F3/??dlc3xe晶BRJ#/{ `G=(!_ZJal:<ӁӵtP/(8J&P4p"8lrڀYiE{7)3.8F7=&5 飗.yK)U~>_~zV%ZEߣd N `Yv;>d3m&XJyo)"Щ RFWxd6uPmO;/ͦ✤0k~˳$s`'Ұ̺a:sL`ڠ{f]N#ǀBdy!v>;!V ;qp 횱A.!>^ [)[Oг/ӳugfLK4dÇ '1ڷjD P2N{ˤDqƳs,'-erj<Aq_:AN-~$*Ux$ ?FA镛-T|Px`@ańOR٬"b1EGjЇ-B^KT}96m(ҒTNj)+M'VI,y aߙe0;rvwIxL"<0jqCPw(3ﳗn`Gzakwk8TiBBߘZyZJIrR<=[ۋ6,r 7H:>XCZq6#K]fٸ5^>`X8Zxs`]H5 M(rMXI-J¿SC;/t}Lǒn͋@e)V"8K&QT[m־mHc4u܀-d#!j-\JZ!B5 [=`}]c>@X/an,&PwX4*iKJfsZчC,-T޺PPx+ ;Ϥh÷` lPLRlŦAX'@#68lx@;TC@r~NKHaߘgiږsPɐ^ ϋ|~A<b/R[v=pi*\pWdQ|8i$pmKe&W%\v(Λ!e||C_E'ʿ|Wz$.OIĖē#y^v'I]0 =YFQtvH^di-Ej)%cKv]f: I Xw鴘%a39 A6HMh^%v AB e9Z`^"Gv_H-!6\Ѱu!\|F"ܨxxؚ_Ju>*Fq|,D#'=4 8m?Ѫl"2^֚Lh w>%:ƀuWPX :voҹtRg>'Xx]NxfoSh+(5XuVՠv@2(6d %5vAĹ,#KL>Nwϯ؈[euZTmqfBn+.ѭoWK6O[}*[HL9q fCv~"nY|=zta{>o03G'J9 [{|XAXӵy6*βmLu9HZ(qG?q_"eYpXd(}| (9XvGflNE*bܥFX:I#ξh؁(R}OHx YlaTU?|`'4jE6: L;,Rw >E"]-N`S,WkAzgqI?/wk^ 4ji͊}p9K:74SO_~myKT@rl4O6zsgJZ^ I-Nθ措Nlxa(p %ucʬn/gzRH'xd)q(2_O(oX+~ 2mvlN=DJh_?ʪ0+WrԚe ?M7$qNԭV{CpF"iI{b<M[۩,NT[y.9Kw"IG OhbD%ϓL/RE[4ID8%ItMKΦ')HMZs%W<樂/RJ_WE&0o,w?Xt5>WYZ pjh[/:#:'깣-4'i8 I'ixճ79P3V#.8:ǥc#6ݜ+|Qq[(J:-i; b@9KT᮵C$g^{Uj<8'!L2~2Z`߯uLS׳8ސ3u(^4khRitd>x"˫u%- @F;>DX Jea>MqFtn=/}=k!Z%sִ j1H™(Lr@9J3v"᰽St U X㲰hNz1VI\nZE" uI+>:l#kYU >l%Զ]((p%/^x;fx-b͸꨺(ӲCsdY줸>N8RVgRbPT[N/EVA{Q@5 -DUl̛o6)1#j)B#PUO+Q+2|-G7g/6{;ZbYb,L=\4OQ;62: ()>6„ZG69-uCԞ9YN T H.L/MylY6xvO*4rdǬB#yUeń řEI`_uc!HǸ;mW RԙWTѾ&i&@<*B{_xhn}JJBmoR<_c4{ʻ17+D%.nw):ZpJ!H?Hw|Ф)EIyRX+x@5ƼXD.;f&ss*,7 "PYUxຢXGrV,[=;J (vzW QDx뫚-<^Ff'e iۙ%u7& ӧecBv V̧xي\N tP-:XѤ$g /ѻM-t֏c'!E}x:QMxYWq=5<|L!&~镎1!m DFL+lON/ezڤ&U }'ů|22HS,~`O ,rB\EBeXzEH!j+?8,Sƻ4?_a'յ @GpŬjV_ڵ6ڇ _P9'I(sO+`wV `4RLky.Hv6Dj i&ڕxx Y칽]FfƜXG@xb ,t 'qtHiN0aH3oM|,9^ٛ? {&c%23{p$N"‰/:z@t6 Yn+Br)lv)4PZ2Nwmhtרܧx}\dxJBo%,xG#B22ݨ@14J1]ZTv Ku4>+b"*C"7lbY]3kkcy hJ,Ψ8&68D |)+ZKSN>v"!Hhe+ F4I/3Ց:*՞k"I8t_{>MPC56"0jԦ@!Zl,eyf+M(R^%@2ubc|j%rBR`]紦hY8.,XCf#_iŊ/븒V,܆oDJiƹ e#pD9iDӂC|d?DN{pж=tV([ra.Rt1mB<Oi*]Ұk(1XrRϢυJn)Mm˲+ݜ"dp[e0FRIoCB*Y4((qJgFnsݬc̹oJ3^{{ٌT16WIB)&R18kE S bI,v SHՀ65 [^"JykGfd ju)&F ެ5R5L|%fG gqRy* [@2qu{C`,挻oyloA `E7ƻ;Ç?~8ЭRDʬJ$r95ZLFrd;P0M܅ft[+Z"dAɷa\؅e;씌j*ɦW3_\ɣK ϋLCgFJ{o&7fcknF IU#d< D\޾E"t ._03XFvEWb~/uDHarg%zzc7ӷyNvhaFV'; [IMm"?dJV+S%FIV8.*uY]x2"K>LW`\$Lc[!]Z8f=PoSKC5 [RϢ7[vfpJϖt-V);_M(h ¡0HEf݌ad{(TyƉYÆW=`#]؎gXqOtde?`{D% ؀ul4})MWW)SQ.PJߝ'6KR>\VWVC7ntZ,o_wЭilD#y#~L`D閽Q9Yn˂MCL6P(BxB?{с =PY/[2sRI :S()ԐpEB"Xy)$yY z%YB&$vt{]'i%F?$|T 5(̼M[|$OM¸szĦ7m^?x,UBWҘz?C}IMW-ӜBs)N;>XD+08Jͼ>%N:1|,qT5)SIАfLNt3C4 Jҩ+&Ұ DA7 %с@+N5Y~yaB}DO֜;$O3 JM+|﹞߈G=8nF^Z+}J7K˛YG9Efh#VRȑ2.$ 0㻣Qc[.|g lZN30HY)CD2cDi4G_d^Py4󛬗9YOo?sֈ}y`Cza>$ȿ?Cy|x)" EHR[RYA$8}E<̜>ub/tɈB>럎VUNeR+7WI9 cb4B@zH2tt$TI8suUik߳IEi_!]: 2Ra-#8&:=؏8[^ OiPFoA|QpZH/VIU'8d]ou'ڨ/@y=؀1ד>jyeVV۶y7,_Q[È[^ARd|88h/择= CVi/5MU9;˞|=U ]mHrVehr0%r0 I.0`Hƃ>oby{R \le;g. əӖG#~$"j•3:lE°7f)eu,oPXJT&رJ,3{IMX!.Ԛ1hŦjQiPjN ʇHuɍ~0GW;KK[;Z\,8y`vn7ʐҬm?`>z À÷(jS+ sJ?FHГAfOL]g[ն;j ,܅cR=jS8L׵(<׽.%!}IJGC-NiO ՙ/ox/iσ!0Zql=M;0B0J . Jus {p hw>J:9oҷu>#tG;DBC""M3oCoY#Մ8{x@?h8A dUbM/h3l .XI3C7ry6>l9/gJfFs9jJz]fY߾?gOz^-\@]`>[pagX$0н5̉H{BqU!e{EY߁''Mt|k#y]`h[79 c=KF~FbB26Ӛ,/?Pˬw؝,t1@ZY@)С>x5t}dALzfWʷ?$<}Ia;8%NWӔ;,TLsTs&c'7=08l[>7=jwX`ysR%У IL 1HWUn(iylދGCzțL]/'6_gJp/H^Jy1cf-dԿ°r=a46 'Ij5i,_A ?[/'n 7/RJt䏚a :!H R$ʳa`XR#~NM5N5^ME[ .(*-['%e1>l"tq[Zf߾`؅b\LT'aAAY7d£ASϞfsC˻& y'n%̫[^j ,NwS /$LMBYI:>XJ]oQAQ R@H9eN-`A/>gYE y{@s 8, )еށKNtsw?Д09H&E 0L,_ \3Hf]z#YK|a0yT-d}*pމ.U]gI:IwH ܑal"T‰/_ϖ^.'HHtRYX#A!l^-<gʝ^!p-wGY^viF [FoVaX47?̶'-0"*1KMb< KAFǪ~5w6x$fhx3=@,PwLvҰbUjY60 FZF#,Iqt mr5'ZV6ADo-͚`32|p0}F:Ùƃy 9NuRz1+T5: 29 Mw821!ZMGLgܛbDH )EYD:3Iȶm,|j+%e]Dh aד8x}VCYk'Q5Oiv]\ռH7q狀D"Ur~,yHC[`xV)~N ^&?m%#J(4'M5JsXOo"ޡQc ',%/yt>6ӻ;B9֟WX»'`I#zH:dPAboͅ2 B!5-lMǃtfGvpAuHwt68R*#pHIB:/]5jFO Z5ld8Wj^lg giEs 'Qg1 eS& IdCߛa 2 &jtO;+)fVc| j,B?JƍbX~IYBZr\j±s@ॿVQ<XVRM|,@MDw9(_i$,!a_ęTG1F2w]KAf#_N8 T=,WQH[ҷO2!gF/[^M”-P4fnS~SrɅצLJP6vRgҏ ag_3^eHO;"&*^#lӄ-\,]7Btt*Xm&3 +HLL+_`ZO4Z̴-IOAL|9!); ԑ-2&(P y5 H.W>v$#_NAS)Fd6 %[[={? H@Y7p:l4k1x*:eGbcaU1po#udL μ"m @PF 9R-uKNVJ=~8(7%HvʊXLRg+dcmJV{x6z ԃʍЍXU/D 7Ewzj҃5ljG +z&6nn7tJk{RBM1&φ)lB棋-"դF7d($hҮ>9oXM9(*yo3·.~Fev07%byʐ*ۋy84 ow 3),| f@˻,Wq RHFҚGǿ+wO Qr˭)zHőd:>`6Qb<4<}B6 ش8%D'⣓% ݐK'-P]/!%|wyT2 IIzzT(@߽|;o6eZU Tr_3mjH>`6R{ZY kaMDB(U<ˡ?HdgC;Z gPM+x0 ag1ui7x!08m0ARbϝ: pU jF?D2iFx/qqJ}&RB s1<8\ ΘIu8A* Él;1~]H!9XF) %N%K>Kln|=oC6|9DD+AB]'%3)^ii>ۂ{>O ;μ֞:FӻǑ+9c=$+Bj}pԚ<[ zNJOv&DnZzȮ7MtTp7~ĉ9:LJu4t+D Uz))Rsj]W{i4 =r|\[ 3S$!;N|ptQXds(w  a1ęH8J@֕C*>-zgNleEĂ Qu&Q)J3Աp:R43tP3Z)44nA?v\;祬$ ;ѱ\/'6[(Y(`ᶞ C/%L,2den fshQ~FSu sݶÉ轈TP8q$\)ːG~._#Pwxl|]Lԕe2&Ek:e^u xL<|d;2fdm<ϐ*شNI>ޣ:!J>Db"ܑ,Q:VQ h*D7 'JĄtCIJc(01;%\)e lC?绚x{^' IDAT<"(-H9'mNJ|W 7h atDo#8]1Iw]]O%s8f7zD1Ooq Ӕ[9~:_%ti250V+*4J3,_MS kVI ho^/?"~-KoW晈*Luݕ+3MDZ&TtftԵN5"Y'qH F8P*FIό)\,&f46&s=|˺,2MRU.g,K[gq!f&]I GSi3jL ÓBrO75$NDXBpxKJOi󸝥;>pⴝL|l+d;M`Ao~MlV񀢞[QeSAOÁ[f9И*A@b`Iq!Je}E OãG`  0g3k_thzF?ʤ|6иr=o#n"JH榒j&M#]걥R~oWm8EmZ9;G` UŁx4ya3^p>|ǃS4 X-&YfiXFYQ]!m8S oƏO;@$r-iB }K([ f杤݁Qt8I ?~bփ` 28břOo(vшZ4y?]"2w< 4gZ'G2̻Ereacfx`:*qc!zOm!2 ?zfLۺ[kv 54`ntJrs\%O0$H5e-ejo0WL RˤTɬ*G|gD60Gw 7Rqt!]y;xh(h| n$UϔNKwN9K,4-d[.N% bծU ^]Y k9Kw1Ef*t`E%5予Wf?_>.6nq&8@oQ2hp5#3$2y6J)Ot*!ˆ WNh!Z3f< ءIg FN]'p'A+bNPA)DvQ|fRKj3Ӥx2Ow3۳7'5hÅy*Xiک,H֓Wxᮛ9mɪ4!O*Xk4/:>tw">wbL)n ?unPfZP^}T^f EC?|Y֏{Ӹ3kنuaSAhG" 鰥 =g|)Vڠ>Z$xC3ۋ3IW@-Ɉ}c/Rպхj+SNju,K{ӁET\b\^ヤý~&qw6[yqO^ubrtfzz4fM{H : P0ui0[YLsg$'02.b"oln(t2' p8FHw(4,55DT曬o l 6-F.<P~K,gttYhZM*C}I4@ hfYWStL󆼥l=pjApUn8]c}ckYn<[D$u`T̴)d‰.7p#8'G N=ko=apxma[~4Ib˘^Hn6wG\&_lBË`&ݚi@iYnWRŊ$дQI;YN0 ۙ)'q .|z su|H2<< H%s/ 0 }h|uX.bYf9;4@rEpп"NNnɅ|f7"g ƍ7& lRGH8|lAT7tpW4|D1pZxʐUJҢ?ae7#?OA€]JnzyYuXNʋIY[CcV >zIDB@< ^8]0dE|E\2Cj|[ʳObz?a3ý-n]u,^M"%lE&4gևZ'$2yn/_ӈ?ۋ2 Ųd =?,! (ç*K[WkZmJYgIs:L 82]%;OoΓD.5J Y18 ^ ifjH.Y`:[n+X΁v{f,hR)W?H"(;ܤÝQny~qڪQ>U?-5NM: L+n=!Ǡ/g]߿VR8R|7J52,:'Q"j8$Ǟtň[e!Zl苃IL PІ.&vgn53{zϔha9 TڡT(\B2 A+yyl7x1xG* m6~W2|yiBD۳I5 aKN؈]Y.;6|Q} p4{Hmjn+u~T:\QlN=°B.8u,Oϟdw8U4wXmbPAPP`q$A=^.0WBP|줮EjKqMBҚ~$Fȯj.o4qϳ̧ۜ4 <㟡6_:@hIt2rќ qa}/|yTfZ)b(A Mb""Y~_~y4 Rk:to]3Lv#Z5 P--%;w>"MeY ==?c6.>2:m`Z)H8 ,+-0 lM8s[5 iTCh Bާ!Ԥ5zdRE~:ww)WøqoY#3f/TZzjuyF_}[K,j8+ uL{9*h#*e1R6Y_r;AGA Kw^5 `.VhH/Xm|ӎU3롇.l5 Će*ƉfypR`S}aj0STv, Bs* v0.o_7 ͘mR-{Ò3"ޭ4ܮFrLR&&[z/틭 &2OQooaا^e5JmO]g\zPs #R.|?`F1AĢ.~xz I܀[ 7Bg %%8906BqG$;t\ׂf$_d'RLԗu槜hH2/G12@Z23Fr6 t.F͛A3q۠AͰ!PF[g*P&y%2߮"'tt=p~@)007&|SΑ:ХB2'QwJY3kSڨ>`Aj.{iNX~ e N7E 8PSc 3y艳|ac3_Ln<_)T*֭P~쀆C,=`ۻUYtYNRY e{@e\ l*/s3sڇ0YP:ݾ0 L{(7dd8Obtۆ2#tqH(j,!EÐ#[S!I7C.~w@[iuYͅlMI٬z?\ŀ9=5g9<>oo ~/mp Ҋ$<,%z/yA.FIJffny ꋨ v<O"_]ԵJY>`#$e e"1p(nx3yERI3h[cBgY~μfyBf4i>mef_ pr<JJd"EqZ<lA诠G N Qs>=íEpz|P-1Дt+hdkد[+h焤D3YT\3ll! yv֨4И.0,Ỿߌ*:|$aTa5ѧ 5 r f[M& !tf/ 1>H{d @zÃc{>JHIYWj,LuۙX깖DZ,FCce`Oa+>}w LyT aU_l V>rd|ˌMx;t<0Mr%Dқ.4v .yT|=1+d>x&lrStiԌտ>Tz23Zla!Md=Ѵ)EJ|>TG[&qgx?L~'yxz.4[w;N\?Ju^JEzg8_+NZsLYuu(ZȦo6d'6)9K $ C,)к~,{ˀ{ヴ ĉ{9#ڦrcF rvxln``4*_/_giynnYnvw{׊j:x=V8,V $|_uP2%^al2t 3BVaἊ;\TG$ҖfI25EQ\GۏL&C ́Jn6: i]LIgMG'°cØ\8O7 _4h D+/B|s?Z8zH JظuohRh"RYuNB~gR9`$ǚ0j܄BtsT5>mE>CǚSX- 2(Y?[#m] Qw>|(hUf~1Q9kPVVGc*Jj'R+2i7!~ vy0RTtt07>RD'Hc=K>$t{)ܮ(> --8k"ų 4:0ZU:(q0< /f5u*b+: ei늭n1yGCٺ\ ՊeI u&ݭV#LyCO:!aS*Yp^Bj:O)q{?~cEEFPЩ4&f#V=<%*̗J_J޸˴!tGLCN@])va 8H+9< .4@ "=flb5ѯ!tw# nJ8 ¬ 6s/ݎt{4U>K Wi0#ޛ>d?U6c;;|?M7rӱ@_AYTtzH =m2 (MR`!Dd;zdB_DȦ9-Gdp|ߐ1%I vU;'KVd>M$7*Mf,@NѓT )X`,ͪbs79Bb&çGHAn? 2͘ʬ'yE Vt,jXXw/icP>,|9"CLMzf]! IDAT .ˇ]gWt:hCt|#HO <C܊".&FIKF6ILwCL kUb=^2]%v=lDQԏSS1ٰ0N-"VhJqzz PY:qw"a=FI,4Cd^j6̧WLf Elcj,&Ss4:O%@7W.^V@EҰ&Ftf`P!J?7\i+en4%^HBe; ;ĺRpUb7IF6E zT Qf1~$v&klg=!NvVc㧟Y9m=XuUӋm<}7ڹBAӋt%&ht,cjAֳͷ Cz_j0ʷ"FJBq+++ ,&vFG6HL!~θ;J,"^};:A}"DfTkoJ%̂>Tj2V7s=6զ~$_<IO*)=02I|'.v.&\⇝&jP[ *I8w!baH#~-HF)\4'.APgܤ uGv=>9 7ZV`0HaG w4~6 (qwV=u"ﯯo߿߂>w m6kO gU=},yΚK(-Ϣ"YF`]Ã!w vDkYoW\I"D`E&dUvwWWlr? ۄF_ݖW6,7x>5O=[a Pn ek,UM毟!V b(1m(x M nRJ1眓;J%݂E-a.FY>Hg`=vX[; G"}A:Կ IZ,+(]nO,o_-;uUː$; ˫ Q\Lݞ&(ԗWBuɫz$e*G]^?Xq(B5:Njtzgp^]ʙE/ 8*%QtYfAU:T4К,P7C~5TL7W4RxYH,@W#];.G^dgd~ε7&͖ۅģDqiZhH.\- ȕ DհlG Tו[&MXtMep2OĚΨ#? m;hT~*2E//L u]?WyGN8}lRANfLjI_,*=[̯EFCiq MRI?>wdnjog Mr,Z9Jy5qHq"z.hHRlæ*a6 /Q84e|(Z2;- [F5C$ Eh^N8Vt?RPVs$%K-+&JT;_Iډ(xDiBC%+R5I~)u1yZ߿w]X$Mp;)Gc4{0\1@<)EI*yżQ]  ٦ dw'j O{/ wQQ8J*(!ɷJ^VYEj.,!>'PgA3:Y6yNdz|e]|K6IQQ{p:P=)8ud ޣR3 J43[eg4!-ǦY&;&EW庮?ȿ뿖~ K:>H ʊaEv%n z0alDRoݏˁ`]YoO 8J)ɷ 7+K3pk5'CZøÆ9 ހ.EgL=y@S7S4"g=3b觢j`^4g&hoO}^@'H՗{c궴 mފw#.[<^>~NHNg GPq1/ q>n*iOU<7IyI+OCWuiGl@Qpo=b}3xƹ2~ :Q_fNAvuiwoO݃i; MͯJ;DhCmU3ڇA6G2-p,>Qȉ,),a VvK:[Vׅ4ϕ/=R,Xu غz̉`ϐfA`!%RQ=\>u8WB0t]Wt5*,FK);=I?_x/Tݯ@*糿#FRɌKtg(cЦHռ~5{x HFлu6~ W]jG ^uLf>Hwzޒ?xK`ޑ [rM _ǴԏD6>DY_Qw"> ;,&Vw9lf mS"}P69tBḿ9+SɕzUw1RQ?Hr6qú{to$'❗2a;k6&PkAPdRq'hWwHЁCY!4$ x'b5i>HV^=K'(A{{qB2qkFɫ l:J%1%%8!Djr-,?-d0{#8j "{= 12т$0'ICBQ\I0P<ْ5MV7xӊ*fߌ s1#Uby*ӅBx=,;6 7(u"_O|@&Χ7rbjnvs b3_խg9CҒqɆoY 4i:N 񅃥ƦİdπNڝD&/ Arzx buOq6fgMPm|*BT[Y7/_䐚P I`NA7cT+kD|8e*˄,Yc$%hbTQ8̣!l9۟Yhz34+@!8DPfy/iLGIˬ\5?}ba N9 Vgg OFh$lA>н-vf>j(a^r4zz7j52_Od\Bńe30bS"u0bZi@SIM5;CܷL[-;C!(Iu3ڪm#@ݻRebP͌ 4Ӊ_nw]y%:Z.0%`b#Y </vWJmF}GeY)cn5g94[/s!ya#O}wAtqD RRKfЯa$<]=|z,Z)zR9L6ʣU6˯>QfГq3EFZAoh_읷4khNH-[9醠=J,! BbA1NXT%F#tSO_fq,4Ywf`Gኤ%)df3|4p)~㭠T~pojNgPSVzc7XtSR]=ٰġAzP+Z CoBRJv?udn`Ϻn9k^AY=敨s0)Hwh_ +$ %@$$s+QBsvt';[^da>jP7| W:pPuCp5Ug]1mY/'"ZMi:넃 TX_~Ӆd&0U^φ_Ĥ ,o7響02OqȞo|o4*a[8aLwG|l\"8ipA˻4~˄Nkn idcWhe-Mgrw$ˮyF}fVv I$%!,6?Y$_3  Ӗ%CLqș鮪̼ψ8Xk=@c=UFkVħAzRW8ļ*e=Y-tG:O@,_pZ;܆Z(ɢȨԕ۟t*U= !$:mX޾P4B{uab2\7fٰsSZsbӨ l-5F'*sQ Ebn+ | Е4|o;yL8 υ߫v/J˴I""]\zz3\]L[h ӯI&AM\ V 78Q+!x>IlexpƊ1lxd|00C>mU毟aE:VIeQ4CfI-6;jr5a2z(qw> ǁY2(Hʊi hLRقI%$."癸nxxzhm1'e=3⾗B>Ǵ=`Df l1Y&c\!A[h>`??ߔ4Hȴ!IL[QN2q!Yˌw:)A |t|92yAucR_e91 [TNEd9c׻Yןd1ɇB-mCa ␓獣{]dyxG Y4 ¡O$r`RW 0nLyx'ۀT1myγ{ óKڬyVi]o v.Wȶ{%7~>a0q!2Gs]ϐ;,^$F)>U5 e0@$%c|7)J0鄊޻!h@j&RYN_HyL[^H0!?~p'p3{IgS6|@|Ħ'8W0=3:H؎Cns#Ut&`5tb/)L`ZSiu]`ˠ.0XqzڴQEe~ԓ& u }[LctKh-˃8e6#Iΐtyy);HaNvh |-4yj3&I.$CIah =A(qSΎ!тj:3}]/!(ƀG:nˣj^H^R#׸T^VLLR*F8H_(SO՞K`& 1.+FQN:1͝S"WW>湩;;] # Ҕ?ᾜ ǍmkB$m2}[`과hSAA#찹PB̜΁0@r-#q)©-\BbA8{~32KIm%1:na㟇aF3/Ŧ|X4r~zd(󷤔\-$q{`b]>n/^yDX }Uc~z\/[[=nW7;N)}ZA^WBXg"/?3 <\M´4A&Hc)U?rC`m>>cbfY3VK^  |28RKLI`+o\/6[>zzOpmT%HxT!oF6G2"oA\J}(Vi#q&7q|9Ki]j.5D6}1gda#7;y3. Vd,!)̗iڢ{9$n~f+iqaqBg~Q !6+B`GiJ]I&zJ> RJ)嗿{?g+L"] 9YH<˄:\/P<\au-}rpPU>$u5Y9/'"qrTxa,6N$?s @5 m! N>8mR~5Ρg0s*l8~B@v sZNב{~1UO ʹ^S֙r7 hj Z܂cMiNl@7B:8XF9_;Aα~ # ,a UrC ?-P!\%O"|>< r~oL2:BO^QI# e'WS x`0|!rf'Aj`c #i0Ȇ"Cp> Ԓ-S4ORﲼT8?=R̩W[Gn~(-17lQe1 \i@݃ω;оω*ހemr2L}HH-/P! 9/1˅>zE%iJLƭ Fodid0Q^,74;4qt9J/3MT.Gܫ4me|6MC4 VPw2<ׂ*gKlpFx7 F&m2oIm°-PZ`OQ¸}H续vQZ11y*$̖ԺRw3}b'ILOknL_L39Ɏ-8F R :,*|xxu#zrLD5ч(iq+ЙQ9E92I+*nȵ3Z%=dALg[7M)y~L' kB xV`(FoRnWKꌛ8e9}6 >o^ Gl@K]dNTR73B%wB;jDߐG37\ ~Acy{+ŊUp/H °/-a$DN'4g17E'2)z|@ i3ONsƩM"wT&F SJrb&]D#:Lt%UQ"ٛӒiu]ފl0/ ٧Ik *#.珞hG/>-sAuziBb%ȯftB7ä<=@}>C{lqIbf6 %[X[@Nx Oxo.&sTDQ*ەR-l. M q)̄i+ܜ6ɉ<4ʚf50鹘P3 b2qd` JD`yx<qN$إ([@.2OMr/#9lr pz[D_ =tAk i뽁hԪ,7JMوb%$I.M"' 0!iw<; RUQr }z0Mmyv=yieP׍݁:ldC$wfLv~a:O = mEe 7'.i֢kB<ؔ d_v7q0Q U#'S$W%PѶBl۵LGr#4BzyxW>\̈́FNrfsqPV˝>F4>-;SFR~b`e_k Yv̡]Esee+Z[OUiwd> cCGƞQueJ!԰{5RVҜk/kk)rIhʃu‡.uuZS;gUcZ` x<(%n(tFꇚӓ7iѥ7Hƍ*-dw#Gm$"uCh c ]zŖ-$>= ^V V g ;nv}V )8lMc0,#S'l5\ i#%T<22az~0DO j3N43hK H ΐf~Nzt;S C)%^xWgմiAW-l*Nz&])3g7=8&sE\|4&E4=|ͳ7[ɇ'vGI >xq9KNyƇ4Ce&a0SV8/3uew0զܭqiD!0`r,hXt}dէ󁡺E y1~*?|"_Aˊ *'zwI;Ӡhaf _͇ aS)d8s@cJ&$? /D?H2<`rY *Wɛ J~t&;ro@ʨ^N1u_7@,&!1Z >N`MWi*)&7lr_Pz3XjZ^\ޭpQ!ZjIss6mn󫴅AuE*U/Mwgcwd`q;pGJ3|6"P`avUuB;vBblsdJ^*p]ǰ Ti \3=X=M[[ô3O 0h~N|`z=z>ɸZ1%jC2q5r-"&;~ 4׷ zz X[޿+~L-@ta*kN[,d399q,N"_A /a=}%/? \Y&$󃤥O>z~&guzHf J0?}'qz9D0I6bsE1QqX&a_~ zL$2 Ŷ B9XP}eFQlqӡ Ibtq43IV1y@ #6wfȌ MX!^NbA$FJ9#F\C)cX^N68 Uʦ11AѨ7)1@/FθI>|'`T^cBNYpQLPyܤ/@ϯ.e$7$]084{h3hHlP:9 kHRߜHM[-,f4HQ~0Qv\4G9ç,maHT[@i욙;K0A~q";s⸱L JPrz3ʎ=[=,f'"R"y~z~/;qIQoL)I)t8ndxQDKȓ!;SjVZ{8"]$ u6bIcfz>IA"4V NZ'a$HLQZM“딛EU)к0us~gb u_WJ"E~_? 84 rPz~D$Uһ/=hn)YJ1;kjk!KJ,t#ST; IP/(v3߯D){]:H4hfד5&@3a!dүABA6>&ͳ kTǼlqV\ IA>c1>ͼ`M,&~z;Gqesl%u¨ !+^AGWI3C͹֠~8T=B>&DIgIÓHgHAGZvL_q6mbb޹e -r{Ƀ %4dI/|9 +ڻ4mOmuO"ށ`\VV3CV{lHy`Zø59LhRnT$xE;J3ܻ.VyvHbeŃOTYM[K >M\nU\HЄ D^DY;n blt= G6RP M5eY!vu/YQI7X*0%N:'IX$nx!ʶ f&&QH,Îh`#G2K J|ydV"6Sx6Y j%fT_J[Oak9C@/#(])լ>#tB#0rxyϢ>die6}󀍍ݰ^I \ϔKYN]'aQ΁w P O;6lJGhRFԶpV7 UAm|ӛq{!#r"ቘņ -]ʀdhF-(Ul(5?0}CmÕyV{]1iMc$`11i>`ZܰaPhPRM*QVr FxVlE8֨31U:~H^/]g Ę_ѿn'AbJ DbC{N!5˻HmbW"qKH(_,/I<4,-OLD9dg4> 󏿴-]PJ$'mU|93c  a ; : ^ϯn )kMd }8參Gan8ܩBvCt@[r~ zz=~cN"3:_CSgnYR&'X, G)+>p|IqwY0Lܢǖ\%$uF2 9$M;Z )A !b>N&ӷHtg*d 8z)E2rUB{!bzDK&c\=q9 Wْ[yppÊa&H/nh<~ffdDjXHCZV7&EM7EzL{l !@1(tbxרDjGAԳnc&Z:ݺ6r)[a]P,^V%_, OD!+uDHj&C>edt BLy#ְx/ ֪c!E^hUò$cN4#hA i4bP'Xgv dҷ=z( d#l`tEy]/t&FTqj:M")s)gȡB$v@Y$xY^yRFVa|jmD`ܥpxb"7J  ǻ]yQQբבHe![8"RUUHH2GGey$ Tnں|HeEF*/ϦHۚnҿ4S! v6)R4M `B BBXJ7Dʠ J90+ aĄP *~8T&FCa'R.gY/'Z"VYށ@6v9J_g3|[7DuU&ez&滭ަƣp^wk.+pOIZ8'$ai(ݑ4';l6C١ 5㯤,U)L*6q%vI4N%DY.J<Rs6iO1׫>k0^ɇC^O( mޤ3wü< "2P^p6xSBM@r%a0$)i#B,W*4=C4q]5~$Q%bEA6fP/~aly5`z2NnJJ}u10ՙq*#pXc3 RʹH3hgM\߾T!1&8DMle%HRեj0RWZ,mWgfVlK216#'݁?&>'3?H0 2/}5tI vԇT䢔iUF|KWu!!ޤ'^a"N{&-qWhdE#FI#uG?[tQ,^UfbGk9x"@:!"e7߭s3L:$iҸJLkf@9xM` 8nGtwR7fckcQJ+X2\LWC.BCl f B SiR@5" ~in%ͤ^.MHrH^`-% 0jyJ&[  hgPP| %gȑAsu}i2z, f]hC#k?)Pݴ7W!Vv ]̘jQV& e$ ĕ"~Ȥ,RUҲ=$My+4Km-183d7,|-5f y2òNN5>D3:ns*.dJR$ %$jėEZR-`[va'27q#}޻Wkr"@rF%}QzG3XKֻ E"~%ymcsҝ2S0<r n7ܺG9 2nU}b6㽮( t+7;VVz7x([?P ohNmӊA U euM}O fK)g8]-c*HOPݥ6V+Nc!9cĀ֤\h6)}bKR&TNJ0Ro7n8p]JuhBkYMWߊȼՔL urJ.wӀIq]]FF缸|&CG70]w H\0*IBo&zPU^.J|8Ѵo:ӎuw(y§$. SrJK_LO S0O/ft#n$mؔ.i:H7#^L{H'I-$owVAutkZ xq= Jj4:x-4hS#kmڌR%u"!IU:aCz ߖIR8)e&] ;q}OP&\ff `$m)"u@L:̬Rŀ.rwn l\u+AYn9[W)A!Ei0kG$M[ 1JI|k"5qMÖmiqǠG OUjgYw9,i!sH<%X(yl,MM{]fq1H=_%nFs)K9KT]r.y$WHJu)+ : P{QY6HfKD|'2pŷ.]|Ċ)`FڪﯶAܒr=3Cd,w))#RN6[(wżFHH0\Yg'8)w]E2|H-e2Z)P?A"U žV_*SW#%A'8P9|L -b7RW&aۛT G4j(԰Hdt:[kqb\%nl#D3"=J+-zcŧVÆ|,"i;q%A ZwLO`XRl%>}km]e꽙\6:[zJ~zry?y 4=X2)1R&&8=:=M %0ڄ=M[n!F(IEZLogQj(T:~29{-吀lRB4vӸV38rze f,]aq?4y%B·g!||DcAN>s0P;r1 7A>[^/ 3ị Cӈ:exzCC$Sekn.'$vh0I h>rq" AE.,B5za1 Q6X:'.8g'Kv\'c }V0L<`-aU=*pf\3Z 2/W? }s/G"Vff CU*|#4 _4n[w^DFr2F̓-ey |/h.nv$1A Sڂ:/F tP#BH2P/SB;Bj%)&s[Mhwԗۅ44հ?˖:ϜxWJ='He$\ꤟuno9{qiY΀Jy,vy Jsjr`s\2Vik侀i8Ow~nq3IYfc_yHbQ9\Yҗ9V"H wsRD\NGJȰG)eĕE0xxG,dzV ?8]fq?[e_@~QѶ[(S), *1;&G p9Ӏe|Nn7@SA]^QoKމت ѻQ"3ɥ nv8~2o)4rPeA;<ۦX?nD:v7 HtrF;I+`51*^,_/?P@dv&Aںuv7 rM$^냨ɼ[&C1Nbs7~ίJ& ab(f.@68H#6zxfo큁[ V%2V YTz_49iZ],STJa0Fr8}u ԺƯ睳|e{$aö}}ˆ%hR/o)=?"D@@&q>DN ЄLy2\u)\ (_lވ^fPN:uaɜląA*Ir`c{_0in,ͧdi”g-j.J#t1hVv{Be(QYsZv t8,DHHWzBSi}=+ IWlQҏbNT n.CpDŽ?gQl霬iY߾e9P.kZ*?0r(!#Tz Fl\7Ѥ`h7N8fR?dk)I^vRxܿln]L:& zo4'KEַ/ck^Ћ-nv2|z2lvP( H֏~UO ynhZh,WK.WɄ44Fm _4שI((c hc]rFe&Rp3aNӔr7x8m]I#Bq;D~>N[$4i'_~_edڝzIw^z!"Llλ82 }'p^ܴRp$.B ]z:IkUZz-hRUǣ~")'ɻ eNY'ΑHy4RqC0> O=EH ytV\tb$5I[MqVF޸y{)r^ooٟIb I_7#N;N4X-TaN*%np,DZs^"MDl8((i 'A=LɊvjӖQB & wJRe>~2T@B]b8nޑH}`y"BOdŸ2U#28$3|Y1 xr;0)E,-"GȁI:a!{^ t~X`tɆ6WT qע/F*t4ꡮD0CyNl7i#wU?i&3J^vsCӤ)-V aژWޱX>ƱSezy:X7 r~{C7?'(3V__r5o|uba;n Y;|O(70nO2<cF{mrNDHv G٘@:M $i+aE":w;3r6oD O:u#*Ll&Л؜u6_]~Bh)*\5ě9>3R ? U]Ig LV%ܺN9#RT^;vi h4nGƦfςϣexz&bSd т٣H~/l@ֿH& hoh:'ަ8>f4Ȳ2&A^'r)ìE,cSӋMZ91fg|GNQݖY9nw9*::n..ݪy@Rz975فzDŽNux$̄a1A(id8M47G}q$S^H*,9~"@&45J;am&_C,rzzwcKKq;HH'郬*M'!@pPVIN4w"ie:n%$fqF+AG"%,e}hL$6ow7[ q͛af4ԤVWL ڝ~ JJ"^!YwN ސ2h2 &uE^>@ Fez])YmWWow exzAQ:؁Deح646 Lovo7f 8;W/@._'4HH "qAr)#Hr0P[a(φ*Ϧ1>ڄRW3D|-N[ʀ L(ӃJdwJ#Z^?35pxG -/0u( npPڲ)j:i4 zݱe_qK*G^*Ximo,du5YY[V6j E7Y&\U؈[F6L#߇A<`J_`Fq",$d5uG,TZ Uae8:5:Wl [&uӑ$Mej4πTlv' ^!p<N)8ѫ"k͞mFtC?BHlZUagn#TJ)T0!Je$agg*>U>IGIݚNvFK i{^r̘bx^t tNX5:m*Ph0H 9fk^+Sm> S,PfGt{ӘXcԔM QcBͿeXv  M0dYg >̂5b,$]t~=Iq5zkR+QP`H`"[#͎~Ylu˵ޥA7~J]Mju LIw'*3j@ӜRW "%=D3 w45wGاqMW^jSr͛ LA9Y[.ﲞO$o҈8kVЫH?kD8ʡZ]=0*KHzT78O">8Ӈ$G B j\/ӾCBwWPf"S5D%=|'h4O1Au$1PNlBb>?qYhzƹmka_A69ʐ׋47ff,h=!ť-mlţ~qtg*N [)1OaCmХI6aA8~BJv1E:R8j~J dn~376{?ab0F "-kCVǐr6m QL'Hۃ?| _" mʮų)8`o 1 f\/?G Z 6;}M2RCv,uҡwg{#6lXg $xf2sFy-+V\CuIVrI-ڊnQptxCV'y'UM[*GQ=0Ċo;HN=5gƔA:z  {5DL`;~lxWOfF\\r0Z8 ÀVV:Xj킟cD#&۝0FsFxsT H⦥ޮ@=#cgh&.>27ȯ& /-6u}bmd*VLmYdm3&7,8WzP J3h~.[aI蜱ô3S@k>8aE[u_3=Yy;9;/Syj>8ə4R) YА y.fIHIsPC;|~!2!m(@sAzy3u=W/1K-~6u$@!R8,(|BH8\4J~  IDATXV"&oN7i)SF28ِ 1Pp]!a6ηa5d.q|Mli{c,؇0 ~fIm^oRW [7l#Rt3L賂#  ( -?8ϯ|7P;0FS!hƮx0Yfoy[Jɏu>V'ANFk;2_ UB5WX/$͐Dzg1N"1X N/R;7MTWg9?ί[ʋ{[4<Aң\'J#j{Q_(]/?udut] 4G:Toljzi /$\Q(i{4ig߹ZAN4^ \2?pcaXЉ=yaՕ"94u\YNJeH:LƠ5-Θ@$t{GodgxSbN5$mC؜G8i$b26"=UK PU&81 zǏ=E"o?0XV4/@>`3S4|| A8Izm\S ')̬Ǫ8x`zŁi0H霷-E*J/t|aK ۶RP~xkA I:|' t†$,;IOMLM?7G R8ܕiE2dhiv_?N|O9qi Q'J.}zi"1GcEڥ{ui2ҽ? R 1JlV? 'mwz ]72_."x8:ɋ^BtY'\K' C4Cv;[H]Ru7 HWáV~I]€A1]zs~c8)~W?? [ߧ-2B f Qx*xg"ϻۅ=Aʁ5e}q`A91Nd}]$_t_^X_^?KG˴!əjU8Tc!VBG[HA#diЬ= ZoJ R)QiFihZph$vO/0i{hsGG!|76$B"sP!C-q~}X *M>$+A1̤I+2RIdROpo?[o֤Kf=7F99tрP?1w2@2IfLdh0f44CUf{Zm(t>^85=orP2eYL.i:?m1#Ƨ ꙟlFLl4O߹YƄrLKV̍JL4M|}&ѩ.ߙ~>?!mB/кp2=?0kRqDnJ} ac.h{J6n0Z^r[Gm6wn1g2ÁOTzC>(Hd#ZX 3 'x>Sia?DŽֈ|BeQyJŎ ƀ, /%6)E6iv#7XlUYsH?ƻ058 NdCAՈd==2vnPf^ g=#Hj'Rqd4RW\>P&Dn{BzL!v8i(Da'jd>?0)ւ8Y]J`\Pؐqb[39N8HN˃>ƖiSSCkΝgg4rOTHi IIzSr"iݜ6W93#lJ3 e{on<7"cZ]y9+77^'61 s\^{7C7/Zr錺X^B_H?Oefr]= 7Nof7 ȜȂq?S0LOtl kYEY*"[f~3ITClT'| -Z#BYȇ3u!w 73f~MpMIdhiC9|:WuDӆM}>şg!곏27Wl8Qr螢ˏ$)`ͯLw;ØFIzvPi'-YXCoBf_48RVDoMQ/%ʍ YRx~F^gז A^<'|: =\z_bhIE';9ݿ3gA oHd)yȃtvԜCCwFY i;eH(KŲVH3 q°9 *? @ƳRPh\lDn)[Ҙ1w衣mm96)jUf@;69ΆIL-=8oOrŰ;XƨQͪaoy&$g,$&,_~S0}Ny y0edNJƘw[b@P#Q)cfٍ&(eS&6^0DT+<.DJ]V )d\]?r'?}ǔ]݌ݶ0ԭ4FrJ׺PKʂ:&qSqk^~ieSHpD>>16i;P3JF_|l0Hm5Dсe7J-(+&yOwA+GcT'AF ׯ[@*nn\x%YdBJt> PD0{Rq\OÈv; i1Y~Ωl 6`5[pz3 se+ԎNJYDrr+1Ӿ;`xz &R6Sx|7P#+ q+ Y4K>eaiʘ>!O"L%uFp\Wzco1${NU;NDldyjrb8HZ+i} ER ##G_ jdMycIPehi6JRA%Rp o?vlجkҋW6U-5FMs67(FZݲlbR :5B&>nV1 1K$Q~dXqȮ5ɟ3*M)4$`$,qHĔz6#Rg#+|@C2?pYIWe0Y(Nźzw(=I0Cg}0a$ؐB6_7D>u=;!A_Jib y1umHH) :/iDOh -<-J'jHۓ0DڐCDe}Bg߂KCoQh؀ā r@H<1 v1RSQ^:[J4 e#Z Ijفdhv +ſ23n[l^8 iK)<+3qI8h*V"=I( lTKa՚Фj5ifE] (zqҷE?N)A:8m9#o+^5H6P>Ew6ʟ|=)T4$[8 ݨ tǴ[103 $q&<ɭim0 K䃆F4ŸFA!Du}xp|b8BФ{Y0R T TVh!M&k.JHRǾ[h#݁hÇ̞ՊѶAaͅZĘNEuݰl!J)Q:JTʊVW Fq2iӓ 46uRNdo²Hۇ=6d6nߴMǧ:7PC&WLknVgL!i:,WT%d8T=)3>Aڌ;UmIFӴ6ޚY#&('5MEzxJ)[Ɨo d7ts/+Z/p:`7M=`<=56c.Pƀڸy-;xx><|5M;:5~P^^զhW UhwYFKmp$iy44}N>3R@|A6-0]wla^ J9i,2&Zn~k5ěNZE +]R[OMJNf 0|hcѻsfFS33%K#}.HVv#BQ%cVHI2U5r4 ANsxJP^ &ָ0HYܕB n3?ZC] !rezl23pff1v IDATפz E t! )~4lj[WOЭ߯Mèͤ|.ev(Hrt'.$U# GV}u媦F3O:ndnƞ/Zfmwm,qp$ a{'vUIBհƗo|cI/q.>gvGD E^WGv%B/lA4xv[# j] z'e#)%Rj9/(5;o4Z.o%CbyrW YPɐӳKoxIJZְgIY k ٖq|mrփ'ǣW)BRU! ˆLqG.^$-+چKm} h'\~ 6ӈ)%$}:k\!I܁uA32 1EUĜR}3vLҀei-4ڜ| Hg4!0`fٽ2VoRe4)tVQKBnws@eTɥ-\YѣBJg,$1M|@02bUDʇ=5r{Pպ̔g6&57Tw5wqu̫I|= {и|kÍ33RH;W,o):(? 1zW3I d}{n>yȇobLHagxFd3yTnel,>ie~FXpPz>!3' XOI G5.48L? 4÷bDTA%ʱ3*7 w43ilɶnWƧȇYF˻1k]>Je( P"t:-$p[2tyI S[oXVgv4Ureׅa٤p|̖[E:jJ(cs' U242.Nx[ۅ?**W?g}ݒCwL4qQ3N#t.!-AVW4ybpr LK70k.oTO4)Bj_tw5Y޾j Cqк,)ĤҨrsBh"z:DC!Vm&)L 6 Ii`_bW ;[y^dD=k2ڹj]rtj̐ٸҞDd]L֤0Ƅ"tqȒ55D磟Ӓysj2.1lM/_?b >9#u/+ɃR鼚4 EJ-f Tl'`j%NQfiC7?vVS1+J}cn*+0b|F*6%MI-gcPfT jh݇[ A(5+hxr涯+wZ&P1Mpv{#/h@3M95tTp{l PrK`"N}B=!rT5-Fj%-E҆zT`2Cc(mx~BLlL^a!I +E rI/z|tMl& p0>}vcn &I0S4GQ7EPV- <6U$oR!YNJ/S)0-PiΆeʬBnHu4E-DIs8MJKBd_8 NϨWNflr|dkG O}[r)S!W@dX+^ҧ{SD/ /˄4D"mgW#סFQKh:ըMg,_ڐ:_'i@LQQLnVHF;`ٮIZ羑0xR~B ]'%疁k,#Zw߈|4##;]IA-OCiߊ+ V()+E @аqD^~wH27ڕ2W ˭4h]6ż sv7&uy,%՛@g8=:K&Uß7wƉ-A>Me{;&_S{G5iÑ ߡq7lm( ۙ&&*;OO`:V]傺TiY*ytE` |Po+e=b&Y=$Ô1 6 pث)B) H2CwRq<CFD@3ݠhHasd!EnbR#Y1_/9??r'Qp-(3Mh#H<$~Q!do'1Q0&f| uA]}, Ns5.B45KÇc"PZ> To n&g0,K f'OAy,.yQ%SLg3ɇ3iT~BrP'zf06eV#Ц :8$}(S&7}[.43Al9!{)#40ȋi\\Y#&HjS 8R6f}b~ e -$P)"(yF4gۤYukzs-J 'W'2dC)n/w_>kؘgBfBӒ KIOB ;"nW;Qp3j[/&bLNgh@'zϘMV<[׃1>}LkOöںZZnhں7iqtӔe?|QzUNt^WQMTkbX_xCs+*2ٻ65dxzte te8qnKSzӤGqbiFQ6maw{TqY>\k$?{U;CH÷>>- u-rD m ]6>[zVAiR4#7:,tMں;tle(T7xzx;ӷ QirWC4`AJNLȧo2ѓR4CnVKm m UƑV {JsTčIQ1tԂT{6"= MM ӭ6q]%YĶ \tdhe_DWQi.zp_pa{70ٗ5!!;%#U ._ $2ͤT;a4v Ж A1 |Ŝy"z.(7cv;! ېb@/T+X(Gض'ж$/6 =MU[֙# ) ƀ!䔐 Ho᳞wRt&&!)1k)=?M0mQmc0j|oFz4 RMϯ ! Ϯ!W28u]6Z-\uuxm?yS8Ɔu杤i'=Q{mC$e:u?;-Ly]@9 Ҟy7&:MHM ATY:?Xw9˫2yhꨐYiCVV;@6Ĝ. 5351BDQM Ng4/GKewKRLeL72 3{ot=ryJH6?)fɢ̞QLx1 `9-w6!DRq:άtM"mz5򠐧2O^!;Ϥ%m  ŏ Q~82v@MIl| s֗ hc1ܛ>4%ZuzܱWҽ_=e40=9c$qs"mc&[8J> lpsED>r`^ ~=?=!7 RD=l Cj #C {i i@R09S6 QT瀬,¿Q]A1r} M8J?!T/'L>}mٸ=Ɇh ˲~ů7???fr2DHT8eMg7%!_f $b66 I=娙T' NL*iu'=;i:|s<Ȧ7]%¡F˗=!)\^9 _f~H[/G<^n̄;a[iG=[kv<"F.*|)*776~znRyN3o~GAzϞFH4;(CqGϡj9SBhү7p:,*JHm]a}0tۚ[A۽eyBQ7.Pi33eFmͫck}WlAvMJBZ%d &]|0&qtQQ$uuSbLn2.Lj㨵Uv>wtM,Ǵ&;IY e܉8Ѡ{ѿ&`߇r#{)3"#*M\S,l0FH7_>}Bł9+y2!3J2\^EiѤduUE'Vؼ,<e' N[ւ?_g 1b'ٳ2[;w0!%^]Y=㞾u騈D"'6QE|Ķi٦[CVFL|%kی)Rg,㍏c|&dR+n;~4F&Liv`;D(ԲnIGYz}Y:JM$ۅALt> 48^Yxv6 L~xZxP? }#$5uqFa0BhQzyf0`ٴkÑY`bWC!t}g߬{_WWeY;Ym q'"xߺ̼b<:zYZEJ-*N,/k Xq#WgN[:.A64O֘CEmLzgt>WQ\nY@2cPf;Ld] i90'yzZ+o-IZ!H~[їEAywj^eDZu_\N 6pVqɀGyl@۞Ay/ˆ52I`fNICe0OFkvtu}}YJRqEb vYrEw6Ӌ ;8BZPUH`uCr$WQ\6ۜ}K4.{p=dABHʢVSFij;k<P2)[f}tx# n@{꼒@)VYRqsA=;R}!e)SB"nQ^^ku%ۿW;XQ[,ɕG7^"4,U ʽF/HhV֎@甤`ݾQ[1O? V!LZ #x$^8YӞ)RQ\Dt1Q{>lXY[ ňi;B ]Jl "=J'n!R”Y@ uACf7H&nFȻzLɂw`n|wQ)`9hFäk6>M26^͇0ן-o DoKGRhg[U75 ʕ|<@S)pPݘ@iĤyu; IDAT#'ak5iC7xgf1h:3tg`GA锦$DwQ&2͸~U8XEX;I Z}=68z@54oaHLsɝD#yVa3M{Nwj3z{G# iROu7ko^VY-~G3~fe~#- ;O/ dxљĎ:FӺqŔ=rBl:Pי8)P يP-:3UHܮb+ K#Q53u$5.,Џguj(Sb8SBgp`s,?a~ ϿzEy ˗b[Q!IAge;'˛0zmh;<5}q*i(!,?oʓ&vXXI VxfXAձ j\ d,m=ABɍ4d 7s{l z {mMnz~n&+4'Vh6Cu ]Zˏ#6yw@+äiU>)Z!E[WkQ jz Q&wpEޚ( R4m]|MtY)릉X $qR7=8O4_a4M(7ˏ1ENݢepkMtj6"/W+v,h8lK12xPje &%i$wu8yׂ_忂_8i4($QKY$}D[p6떦HQ`o2HoE6b fDll{>l3&B&Pt*Yaa@ak N-w!u,zC Hݾ.91Q{Ǻ\ooĿs$,K>n 5p(,-r-[Pukhj'}E\d/A5u4$)HDƷ1)])!#P0}jl@cAQT&SG X"Ι- ^ں #}?:ny,QT94I틂)N`Ua]d<{4"Z1ط0$4> Zc&v^ik@cY_~Î\:j3Ndʹz,z4HN4!j8ʫRu"doMci뢋LL>o&jOBIV]Tb#Lf9,~~Y9**Ҷ#yFiZCڶЩQ],zV7vҥ8ܽR-5 !DZz S,l,Y?}֤ 9 Eaq&nkP^ސZ)L74ݦm`|zWjR.6(V|״d|zӷqCF$W4{S#CRD=Gj 42THyw&%Gڀ´iw*4q0|D˩%}ІD:8nqݤ](Hۘb m6mz"x>ra~`923im(ه^}ğ!DS^]l_5$<{njY|O>u~0BA&^T'0 7ԅթfӎqi!g³S,[o譡\޽j;o_f`ѧ0hknڸV>a(8e 'gTM &bоJ0W~CA3qBg(_"mQ}BG#ӄR;e+ZLSa5$Z@҆jFB*r&+)p` B+>" &u+"b8 ]Am:j=ɟ9pk@W0a%e{/KA]d{Hg>76iV+#/zhveE3FNj238|KiAT ,hN@Ѓ"o[™g#3,,?cC Bitp;YM3l)tWU R3XWH̀?m$Do?Ӹnn@ȀVV,﬑exq5}i@>=\-h];\z#IJ!ٌ֖#%GB3B_Sڲ$.UC4~ ZPcP>\(wʜNottᓗo8Q-qk) <[,_X Iúw.eA+!ӣm:dü*C`}E: |O/yIƧo6|kJ_=!EKӂ# M2vnIӤуh^"ͧޮ^QS8퀐TG@:8N(\_a`->L`xOot`}]}rVLLB4ͲLoJzAExg ·ٙ a}]Qϲ0,!o&rWKiq{q'tHث]>YFMYA6GT)(:G v%CxM` ZӖ(c 5;>+˛g*I}DQI&!;Q;|Nꓽ3}}RɘH3zyG53~9&7FlFrk23ȃY]jai(w85|wV,ݟX ݼlMm  ko<#WӁBeOoL1>}@ o\E$itsp~@& "en ,A[$dԙþ2& QMҪUmOBkA /V>,lHIX⒭Gqj yۢZ.F,LMggbB[G 6 |8bx̳J>VVV44ʇYy/f8=` -̲"hCfyO<7h_7>a:_qx )8i@SYÎ4 /kGYab-J`ؐ~" ?$|g1@0#ZP? [bMGoզdPá2mmk0%LRCD2,].__#;]9!$w>H3iD?KzlD gɮnmͨL)8,ʭQ>S˖cق~ mnwz:&oI207qGQgKĽɻ(ԷBhgb7&afZL> xǭ?+v8!)J?;B$Ž*;oppiMkq4 ._276gᲣᡸN(@j =y/$5#Zm6HFkͯ^XQ癙\mNY@_Dܥޯ 4PUYCT6%KD/?p&5qn?䯤89웑07@Y0M۪6H QO4͔pӤ!ӞadHXݕV!Qb] 'uY2t<;zѧ>IKۺr*%2 d`°|IDxIˠmFx3gQI2}WLc+M]s;`4/5&6i`>OD8m.ɞxΓ$C@myHˢaeYCwKC6g7/rɦl*\1(`m2z%I]r=hQ68oI<9]~J(5I E!ЀY) 0~͛hϽ5!Z돢 5:O$O Ն> <=lMB@)۽(2@), LX51Gg0* x8ew '=*é  kw|¢ !&vBru&Awn,r0ƌ]gk O\ V YiquI{L mm!&_8OS"rXet5+s_.o1,|ڌuK$uaB)`)dlIJ8^K%8 %^(m)m+Eb+wg7ra *)q#Ob]ZQnd1D@7P{k,6?Q"G{ O4XWKEx*do bШ^"_OCd 0]r'S[щZ =gkI4(}hix&1-8g=E1I'P IX"e KmFZ֕ k*PHtbݨ+痕e@\,Njb23װϚ,7Onôzur 񀆝q؞[ъKJ8pgd+Pny(sUcNX߾/p@wsW}MemO(ZChҝR3kVWNl˪ix~qi ?[IFnNGmNS1Nk @$ gan2$gv-gϽq Yn1}icĩ|)!5uyypѽ03ŰyXL3Y##h]8쎼?g8?T4)bu#f> i>qp8SqdPo\7qHP04J9`4HR,#Zc|:|W9U| gN"Fr$\M?ɷ>nST}#kY%RZ7lY n;|yO?? 槕$-@ 8|S#gGh.Jl4l* k!XI4&'q צ]ۖFڤxҪvfBz*:6<'[sJ\+/Bcv n!r\AC0,wCYS]o3O# 3P}asMpɥhauupJ?_c֬X-w6'ږBu syF|zy)ྏEPU%y8 @y -I:?GL/nWS,w+f3s0;FȆͽ+.ZC5|v[&7#V@VOPɸf^W>1vAߐ|&퍘-ij2Zho[^…ʂM$ڐHKGvܪdf h—z8 ߧløHKoޖV}CZM@|L;A=%Zgm+u[H^G(΂BcgձaҸ ]9Kt:ODR*, z |A09t ᐂiKyuo8?;S[ ٖ[]L2?ZQ\ ʃU,-T[:E?Q */@4^+7쿧r!嫲TYum;e:6Tvne"}Fӄv4/ 7de^5&! l htQm|[M̆oXnwt$Oz[` ',@ޓ,HsU{g3I'qB3a.O+թEIڲhV Lt~-@N (ZCd6E$mŻ`Ff0,Ma 7&6]L>Y39ⴧ\E^֦|ϚHqSV3;~#N/cDN S@@T怨B}4nv:${2; D綿 ?΀L8d؟!8{6bT GnMDmV<3^᧟?_dN$.$bqݣ{q9!nmvi q#Gc0Oz.KJo7iJJ? R1TP4bPAOdC&d~Z3۝\Nm"<1{5s~ Et;omB5l6lvTw3_atz'(qZYLv2Da,1G&I'FRp|iQn>i&;df<簑+XbrR*% 4 A4Ĺ@Zo0zrw dAJ`i-ϸw{Y^?A_MDk3-'lzcWzJd9ҐóQz:pXx6킉1Ӟ̼ǖ~@B*5.n@q;(Y(""qZgm1" Pjп0G/ M" %cmR7[;8uMg(f ^V5{b3 K6VrLw،0خL7ԝTa#q$`4VOԏΒ'Kr98nͿO .Ρn<` Tfh ]dhE$Ժ m#bX#F'yFI }J 9[հݙ3ѪNeМob L5nQu4"Q\X7nT,OR;ԕowwI'ټcV%4lL UQa[Y7J-۝6yvύGlf|q.Lߙ~_^ǝl.2n;An~_5ЍFB}៩*p+EߨVbwǯo6 IDAT[77UDuݲ."m%.@HPE"wr_dn7?|Rmclj,xx"WFR' ~2BJۂ$o* 0y+`]M\R>૪4o`~$y|%{F2 㻯9@m3bD ԩx' Xt;OXrqDSa]"Bf韵-&4ِ`=%&1I6m~)D]^)o EB VOWYN!Hy>`ۛ:)Ie|{ Uڪpȡ'7DW.0GGy|}75m&daw8Rd/|;POVf4ՙ 8j @dkf)(X&q#$͉9M=>2<+:h$=j5r"ǟWDŽip@T@maㆧ-LT%f0̟Ł[/iw ,K0 nNc{H^0!N3]5=`H727Lgƨ\_ /Cd؍Epjæ^EDgׅ[U0˲2Y`|]Z^0Vv'NL%'wbܕ&rɱYn=4Ż@(25ng}%(ۆy4'iy=Jםmf'0iFY=ZL'ίD%fע Pl!4FX餏9*|Evz]YAsI }N;XsC+f0T_PnT2H.w.+ E]zB6ӧr %jea P损3&<@"Hr,uƥwǵɬ,93@/h2^1T94ܧd!R(Pږz_,Y%vg:q%,b?n) G&DM4_d,ձ9sq4q9(痂6cgp3Fˀ˸;@_ª֜y"bYwf:ߘ.Y*|n}M^9LS/A& =5LBCeTZ30D֫jQ]7KxxF 6[ wy#VJe  ja WɧW2lP݄#qZ#/,IܐY &#dv#W"/exbF1P29BCcNZTvO+jr;Ӽ<OJ*wlB i"Vƭ!)aT;X4̓ /%[N$m9H ^2>mlQлl*(+>9ЄpS#qJS60}FHC y# pa Zfe^tAq8݂ W(4CI/,+¤f<=pka< "+)q4DAS{ !r[R8ͤeQl5l}f!IzY딽SWYlsǑxd۟ sWeQbb@`ڤ.Y%%Uh7?Qdi|Ew~n =;iܸwy#PJxqr,i7ɿL~D?H?b_* =GnU`ʂ\FI1}{X&,UXWF ۝mi1Az[Um0cq\rz%3;8pRTu[ӹ!Iy෈<ߩg3̴jF@Z@M `-t8<^X2SjsoM6 0D+j},hu]8ˍ| #ɫγH'O bQjHG*^<9<=CsQqؾUwWdxaF] ,^^jI nl];~z u_ )wNw +/Oic/D4!ZJ28iVQjCP'mzMr0!ņ$n+&kF=wHyX% h]΃P5Ii*+▞Bt/VO`dwT$';#ca%cPf '$QoW$s-hk&E`$R _b5lj1e|ƧtĀϐ` ifnfzG1\oL5,`p^*Ce83dӓފ(U`:Rul(4$1 [` ELY'/=} xtl¨4{Y>˵p5U>eqpkV/WS0 Jb& GT=ucAD^nzAR"`GC!5^U!uheaI0BOHP5YPwaWʴ=/´h|tg`D{д2@Zx!Kd>Am3qBhD k95wWiiS&6pTj>丱ȑ(?#"DV7*Ed Q<}AaN<ϲ>lYgHNفl0pH__b/~]֜ѱ4ox'l%rO?OGodHp=pu"ա˚C$lvRo1s(`,NJ%du{gYLny'!ts$y&rBCm# ̠X . +vN9ɾu[bXN]a$~TNw-gȓ}JR/c%12Q5q0,M5ֲ\(M@\ɏ ޿:]hTz1LtϬ[Z]ئAx%la@AOT,ow3d*9P_{gtSa 0AmA%T}YZ۴%K'_;45@sk8 VpHzRy $UFޑa [VIƑ#p6BUxa(Ƈ`H/JYb]qVWfzyS?lwxa:RTf*[P @<""io?F87D` /MּV?D I ܡdnm>} D+# υZJ0}R[VܮwM~o7_KL ek6XC谮)H{{a Ŭ.l7he3V}'8!!\(m}SXwd b^6Suە$#o TZ])BϟuqH4a{m.DViS (=%jL^gC|6!(H\,U49AȰ/d-/hdʘϓ2#3;fƩ7A>Xl $;`T?Ž nۅ!d:\{XcrjSݯȺz ?̔ۜ@J`#J'L1pK1u{_Ĥ Ce&92}1/0ZܶL0T\C('l&APa'a?.-S.wcd'|J T7t!7A'Ja'Ч~1:Tަpzzu5-<*o*](h qcIhTYPY80ry k-_^MI@2}&m^,Y'4Q e/ۍJ`ey (mÉH<>aĆ ?g$[v] Ft4P=mc+Lf/Ѧκ^O䠄4g2<=̬SEG5)!Y"pxz1rE$_ =IiE=MM935!E|-* WrԹ4X m 9\ (<$U﹦]DrDBD%~Y!ҙD1j qdoX]6B6NE'18!&-,4ߗQSn'$,-#@ λƵ2P'iy|zρS$^a8A=r\y &{zׂFacfGp5R( <{3{+އ QjÓmD,'9G.> f·DM^zaJr@/U B*M%q,G/@j*ǍD Fm]xѿLf+0}s ?!umvw3뻬r048hezfD `^ovhn Zl;*axJrNӰnYiDL8o)(awd w'I1ӭ6A%!җlr>8 (i$_ϒWa'a$-5zS`ۉuUt۟2I>phROlpk{ۚJŰ&A5ξwdNY-3#l, Z]-3ĉlh]/7m9r6eP2g0!y?b赘FVc`BF68]Jٔ*/b0PhF0v!|- 3~W7N )Q6DA# zy hNCm#ka[IHufl) qNjgT;ǢD1 6FPNDJ6Bl'x&s<.;NHjsҜ ݄ÑCJY&%Z 1Ncvc6 P+TRM7!=̽:p0P@*<ꉓ7N3rȢ6 1㨷H l;,W'۴Az^^؈!|A8yCF,XMh@#*\! { A,?42;b^ǿ AЌ Rҁz%&UNoyɿߤ;nX(Z$(jM$bA^T~$=@@ukL$ԫU^!Σu>RJB*4p3_NXk6 c6ɴ -B3tr]V"4# 5]pW$~֎d+,,K>Vnb^e(0i{Qs ٛ@ P +QJrd 0zӣ.JAca_f8+^\WgAT2h*6M-+}l'*0 ekhfJ^}NJ`vJ=EPg Պ̟QDjJaG^.$mrf'0l_kɎx$NP1J%>p$%jYۡt}Q aP=0@#֭-:d2 ~94KS=<+t+8LMx\y1 %dylX aXlh)*df K'jUL*r.Sz=~{6S[iKkX'KViʖ4@zDcMHyiyTjd!kȡv,tH Ê)A*!0c|/K>Jo9j0$)9j(QHe Hfş&뙇xbVaVJ}%p$e?m 8^@G~=KQ 8hu#R=5zi0z{ ,D2 }&Ph$ q]:r1V qtɯ0-ݶ?G DX*.;"I%NDlQ߭ϽJLI-DrAު>*T~g)|ş9fg"Eaz#)̐`ed&ܰK_ټF͆]Ӹ=Xu?N^S?7&`oJe_'0EB໡U+Jr~( IDAT,VM[&ۚc(k<)a{7k5*3SR.Gy|$NoKX)sH& 3P?/ҽ+mbЕf)(F@c|Q_զ{zb`tյWKe/@ (-Gs%_7+, p,+$?CRE&5c;ٓ(E[9jD4M&9]?ۿ/g!a]p7>${[a>H&[1>@.FʌV>һ4n c: #ѨbYV䢁]NiE), y1mTZslܱ~MOϨ)Iˊ3f5ׄo91Լ 8 q{2n-h!D'刂}T &;?e\QCkfHcwA.UJ04wA7ɕfF lm,r⯇f!y.Bûi2IZQywꏘ|Ea2~kCO$Ise#fk:Z:̒H< _j8mZ,m#'%& )'5N&\ƃ?1{^`'Ȉ7}y:J4YV}z}峋[5~~hY0".Y#"\O@U'Cb_, }DH6*[ͭ|:MfՔZ AeĔlŝvG zk݊=F g ⚍UYX{n5z4tP <Idv'q~PL-^2= SNyN' `Z^i wQQ1 F(=d#e# W+ lfABɆJ,s^$xN~; yakr5z"WNƭ S 9,%qpvkupVXtׇ(IO/ ۽-6,qH%zZF`,RaBL대SLeH"U%9Y~_/Ϙ弗 4qD6"!Ŭd{2 큈g \DC. *__ۏ}/G~țez"I]t,@:zu覒8RZ6:@{Ljg`1P񃢇 Y?I S2OX' g SbNJTq149(. 7*<43Pjܘє!jhJ3|F̯ISVAUGsLDnL;Eby$EWMl 4$cQ_!%'zEwȴiZ. (6UːQA fdL1 Fs9C^6%x淏T88 +`\N BNV)^/NIYE EZa ^H~Ni`X/^/Dжt@hح>nhMc4mTb~Kl>EJ!;p( ռ༔;W06o,͂(p$> ~ᗥbJFy/R,o0IzHnֲXHUhd:emmXhr~fLVB Ƽ-jqD }5I5&4O_cĈu2|.ߗ)w K۽I'7_>gʣ@ uv' ;ÑHLi -;@(_P4 {0#n(eE:Cwm>gTnRVKw+{j4f<Ӡ|7Fe ҆ΉgVЗ$zȚǢSs?,5Xwk| ḨO0E# JlZܮ2_`d@FdiL2| i;xT! FMeW:fÆy fb ڹuImLKw+$ x a[B1&!_9s u۬@f(ե\/3"P:-]%j0xFI2d|AOqG_߽^KJ@5@Ҳz-R'@˝@ e$+(m.D:AjA)]ϐuE+_q긋H {'q䶿; 5vZ̀)fD[53,D[7%iK$x HHk,I ,ɿۿ˟C7FX7y"p!w{6&aH{/va4ýK-v'läcƁ&z2{@2C~4po͸]n061gs!6X7lOlv#OnA:A&uARIֳұ 鹙O3=p68#d qmD[} g|oݰ9L{Vݪ en}C6sJ>}Ɵ:OG)׳Q:q݀K J硒h1 mxzglq ؕ.qܢi4?+,?S_lHr$fA gI]fl7:vGޚ/@& NL芭4bd1Ye|zLM쇲N&EdxH^,/A-msZd &ܚ4s5p[ e>DG{ ٜRa1$ jw_hx~/'n0 Ah`:ngJfk}a0` L׫;0MEih&m V0>&ꟑPW91Jf4(iJ t 1] m/;L aj]⸳Jw,j„Au3nxѓMܙw[&Wxj!齅,!7JS#9@|x1h6`ǭ;V։`aE _rl͵@n]F Qs>9ы֥Lf0#I !ҥ͒ -/hfSQ*g9ɧWqir? )'k im*XU٦ [UaU7Lvev|~Jw)[?pCIR6DF{D19&lj]B0j6(tpb2u9M'^1"rqyD(ݶ&!E}tDCZ.p$媘M7P_ 6Ĥx ȗ7"Ig\y/IDc3֥A>s*r []JϠuktc@R s R{s:n)J& 6j^ls0)h:r^6cR3$IеFu.>yfce>a;W"нK01pX߻.)ifbF b.4䞫E$iY^?[Ri43]Cx1X [|Ghtl]V>JG|[@i UU;"ZU8m,J ^/=O k)'KLyYoMemш٤q$mA|ƳIUZ@脌"OG-/*ʲ}{%!/I3C`)6#ZvkMFFYI)`/y:r;[Jw"˧oc h0JLTڲdM7chwّL4 ndxz'ΰdk*%*JD3rAhE&vy']ռu`V];lta/>L$O<\o_!@Rʣ83sɻ;uj 0՝'`HP!$[4@ӭnT>+,i3;5iW4lc%==sP옃(kHeL@{24q@2u:RG{w{%/1 Qw_6"x!w&}V¢ DT%sm$fϧʭEϜ&(bI!i[. &=jH膪U gl?M)SCiw_f09>0u D8<IoeECLjgVWHg.y|@u-iۅy&iDk0(jϗ# E![t|gD. AnI.ǍZz:.CHrA:;~27jѐ (Vu/>v Wj((Z&k3e4Y[{ tEG'Ҝ&r=xp֤&Sm2ݲ,-v~o?}/Z~_İ1!x 6ܚ#Z<3CwN'n#cSm$$_:ie%h\8Hp.~C4T+~yg;{sA ڈ`!z9,Tt2d!6hv Y}e\E%[ogbY[B3R\ie| 騚8M=z56t:WFƇ(a@:<[f lLAӊIu`|=erرU{c}TnW2T0lᆺe=1dϖqٓA킳{ ÖSLF_f F@G4xgW8׏xQȧSR&B fRRzY:Ze:^h|vN\DgNau62ڡbA14E4i݇UL-0Z5j4 &3HmLz`˺,Bz-YWtSc G4 dV9_ DE C'LawNEj4O;#-iݍ/e9 C!C/{N5RC%GbTkJFub\LfmHT-ƭOI7^iP5[(kˌqk̊s\ g ث_$_L`FK*VtJtkangEFw%;3vU֍4ia\))Wokx N+`"jԬ J1jl 1:߱dV 5ΌFk V!)_P1؅hhTTӌMrAØOׁ /b [@־ĕbUli|׀Eʗ7jă"L*v#6dd'EٲRܢH[Иi[mS5߅1iR8$)ϓYaԋ3?gL0W{tE;6; v&Q# uM&n~^FJϔ&ilf8Ogy"qm\8n|?ϟ^e3َR5+#h+򎯛ҥ6m5dݪ_%t.,bɜL"$UN瓜',,*G2rL2yI9CPi n?Zޘ]TBPT)/T33X2.@[`KEwsnfgNTĬ9Fyb& -jtk IV_e2 mdRYUoQZl2@ww0 vFcM\=0a֐+ }T~13|J_ȅj,Dn::"ݓ435i<>Fa$v1,zfAii܎?+zZܬ@ݕ ~mGR+~Ϡ`+UId3Htk 8x$fndt*|ٍ :F[bG[Tp; 7Eea;ƔG@< >j1FͩKdly5b}hxzAxʇۿ@ '̳M Rg,[Cl<[JK ia |!(OzJ9Ya滅FIt{aixI$~>Եt+F}X'FOm$Z>3gE8O.R7Kzl`5<Ԅ0\iKDGli Wp;4PbHZF8YGks݋[?6qXi*u 0 (0P\R>j8oBnk0uid/t+=Գ۫d^85LG+)/ ۜpꆍD`MO4m4*.y-3w) Y,+1 $TͲ˞ IDATtHk^ӜE.ahzEcN,$J|.yN*U=B0@Yސ @`4np@nhxj),3yh`)+߇0 2ou`d6R ,J#o&pacU+riM~]SfO|B4=EFp|@(cyY߾(?|Q,i*^ 3'>bew$gwErR،/+1:r!xZf9g׳o_?Z%,ܶ Npiuv#?tJ~Z-^Stm} m:yX cf^HfaCyKV8PJsG9Y/Xs&n:5_[xf&ZVYfδPuAs ͒πx6տbL6H,7-=FЊ\n%5UN5b1I˓mt(Wyz~+ k6?b=[?fБPvޥɂSտ[ Sn6_?(2T6wdt 1?ʳ-sAp^4lNRtEt`~G|%mv("GU /ixz@6a\2dғ^UeEպ:o Q.NwR畔b ٜy/P:`|;K_fLGDYh^l6&'k`Xf لu&d'6*E5U1I^lZ1`)Ϭu;6;gwܧ s"tP[#M1bM?Ԩ;ifCVc]c}3!& //$Ņ$ӋizB Q+0*6 Vi ShyTѲ],8a#(, !wEic VQbw~OF|h:8q+;rCMtNuq{CLnL(h{NjT@<4'L0)(S*̘Z&H5-9L?ԛ=yza2<2^JY.r9ٴkhjC] ҥmrz0N x5^W!nxz."\t|4,~z@[B|'TNUOn3tQ."r( %0 0ѭeP*g&pqh6,2DӋiyo"eg :c@?3&?h0;ĝ@7\w{NX-,l65<MaJ`Pln?4a^ /˙e 3dV\)eƂ* Bu^RV ZΦmDO%Ӱ=𹬫aغ[6Bv#ād`B9(0R°J~X偂\zS$;2zeQCv aGN.hЕؘڤ $O,㞊^]jeEjmUR+uغHH/MZoREҤ+*x{K,]+~~_'?M|">fh>Kǫ@`,)!@bI4cSlSr,K*j|yŽa>c=O ACp0A+L7 3Tj<{[ahv+GQÕ`qFCC^uT'׍cDHJzzG"Wϼ @  A]^ES3+TU1[T\kg )$^C7V* ˄f6*GPA`Ehy}z)LW'=6e(3/olhf *?j?l0d[:إL͒JL8 'X.~ Igsiգϲ|HH5_*aGա8]Rb2Ir!c%\ mEy&dWdxAx/d[Lk0IU .Ÿ@@`OqT [;aqc+^5)\8áf`1bkjtLv-!AR=1J跐&mb-`/#JJ,(5MzǐFF+2nsWHM\ BZE,0o9)IZd^"i&UNW\"'/9/3Ç$e+Cemۏ7b~ ;0bn!ًTYl-\t ȭXd9.rZT k4?$~2?`!`٠mBm0lfEtun4Y{|vlR!RW|'qh>DApmblFnlDT2 lBz-S%`|0CYK!Z=3Se0O lߪOXsż|*o^< M#UHߕH*3J-_V] Q8Ap 2Op r9)~rka31 bPkDם):s]' -A^>Q]8dx~1j#U׫]$gcwkcay\c}OCwH6ճB/N>^%uB`[amJR.nAli ڮzv53&tƖ 8N6kX-/,77tPz-dRHyON3e5j2'0p fdo=8@fuX(aC.aģ.u" IOe8R8'v̩;P66 ϪQ!P9ar`[8eA ˌC˰[6Zxyw_/ctj)=WVjFU/T>eu="igac:iJs{S_ o6j1ViqP&仮vL t:ȠψwGN?zqg)dY$YvwfoY{Ctefo݅BUeٽgQnO)}[8>܏O|6t1l:AaM^F=d1\Q/\n pҦvڳmc>HYS^ yZ<-<o.N?Rk[J/wp4Crl5RAk+/K؇hx Sό]ҝ;--p·ݯ"$GjuU*8V"pU29jj.M%ۄ(7 3E'/'È@;@Ƴp ͱ|DD%G-⸺I?S9$" Xh }Luۧ4/^b\Vq8r r(U)kޅ(N SYk&J椃+뢗D #ȆH޸`Mg˛Ywҿ&fٞ7<(Y'&~g4jfO]iGǓ4Ow!mߠgUI* / :HHJ+j0WɗYj~nf]Z8$/ 9nCӫFV^?HzF!0%n/ s5 5%jd$e)S&NSqoY&ÓjJ{K}璭y.Ub->u>є 2 k!e&βix ~3@-vMp؉ZhSW7i OeƏzE%H28Eu6I qFgZvwWx"c ro*o烤%()BX# fUe͛i~}Cnw'K,ӼJBcMYDW7RL'2ID`zÙ=stL#/a#~Knԯ] ܴk(aq{2;QTK5ln.j$:'lH߲oz%D$^d["IK{1I3΃exz$oj0fq$4,o(A^9n$~;&%eM qqx-`FOO|FS@[`0trrVbz&eAi&!TXAVJ; UWn[O,H KM3ϩ КaߞfE|G9$q嬨}ʺ Be%ȶHx5̃~EZ:IT.tj$?̟!`jddl}A~Q^ΨrF.:42 G0tͷ/M|L~k+ 6q]o͔J0"ER&æ ydtB.J~a~>E]?% t7=,@$vF+7ϑyZ-牓L$:~t{n!j D^H Nda &r"eysZ0f f)pwBBv0zK$ŋP kHZ&qCGr̡N# (L } ~x8k"NS= /tyR޿$MkXʶ\׭#7,˲Fk` \;iJ4zDsfk;]>$5b '$=d@?XDb'Y2ҙd-AtԘeF^%*L4kdgmZ BSᓢSIE/!zN0F}u./.C8~4*u[z!h(gл9|Kؚb2ІnLj?!ƴipdfSܼׯ/lFxu(nC8!1;G|%/>݈hOeH)K?lP^L}b-gY^!i'=V,ȫ7iyn5)jHlMy-&vM L ;$)}+hP[;qn0PjM'<.T `3/Rk9jɒdeI<I 0\JVz,F $^egq݀Gqr5 ].$9. IDATLRN߳CuL&"ꓐĥNBm+١T0㉤,UIIr٩B3>GQbN6DG 0& 3C}-H0 HM3#5aDp}YJ_8І{KAעȇ(ŭ`vݘi#KwbYxԱk.-DŽI eLiuL2q9/!mÉ?G6Lq@^3h:'M'1k7죭C?ъt Q0Jɫl+4, 꺊މ {$l]lgGdffJ$]ȭ ؏Yrhذ}>pS,Ye.?$} dS&bKs"p3DJeC`J*}qM)|h~֯F1cKܒ.;=ωz!b𽘔HwVIFK-ǿHpw< %)=W4{8y3*wEbHȢJGb2>KVw˻־L*I6oAphJ|FY,*i$Z@U:'#eeyt&{-(wo(X#I5e^ݰt4)kARۗC4fM4KhՃSe3$ jFev>UW0;gu[SI[oRqNTwlaʖzGHNՈg=%HEe4i<6x<)cnAQpYؽi +K( .@i/iȎ8|7hu>Zx_j:eBO]LOZw)"*B7f18M7 . @:ۈ; \KL1٬ϔfxؗ6w2u7? SΏ5M}8gsXr:9(h$zF=/%J1бqOo,ГU¨2x8U v(/yl3dn){`;f3r{|QCk?/ݚjar)JAsĴVk`?t>Ϣ5`36֐QO9Udh5乾;;b6c$2[f2A>ͅ dUUyzÉ`Tؓi#W>%IKI0q8 ۃBzgL7nXνڔpۂ q (yCb$%Z+s,𰳬?`6^%IK ;No4n6ʣ&A'¢32"5Tt]quiT#-<ŦVՆsRi<XQx3,DnoԎ6٧B)u #TL;:i2A7bЏVp!6[ִ+yeeL: f˛SEٺ0ڄAR.jH&']/gu[εJs?t bx~~!¶lm礞諰m7JBIC}R)4nĔEZ$! +µ;& O)y*Y0$\'!h+0S;硟&/ U`ف{0 ͚Gd}6!eO*PL}X8i2m:9}h,l' 'CvFљօK4ybϕd9I&'n Jo<)xH<{ԳL Sz!^LhW6h3'? ͧˈĢTcҏ/_F#1ԱmW" ~4g"Tz /di4 ;ee5)TM4C g殉L]Tw陧QZu[L%}vu[RVyA;N|?MhP{J1 ,ӝ h^el< ^̌m00a?]lŨ8 +r7.(2( !, E5}<`]153Nd&3wvqhGC#]˻kCdfY4yb? |8YPC[L5!=E3[Se4ͫQB7Ԝw d:v0;~fڬ6a?Ů.)Bj9@߻to,HJ/5jͤ38l+f4{"L8;?>M/4ʼn}>I+ DZ5l<؈Ƣ|B-b;Փ+5Y0,& ^ۧITxI*g^3^)p>0a /OYt_Tbr[&8\fwlMw,$5;wOs(øESU5d(ۆgCOgJy* S15>'%УЁ:e3QMJ:^W ٤P )$3*ӏC F V:㳤"80j QHֲNoVR=va `n7S 'Aa؟wӨ͠WDG[.&\,@KkގT2`$hu(HeA?f?8-8&G4#[9d0[+uSIT2}'f'<;_*64 ){|?Hz&w8#hcNR.N||Xb :(Q蟎#Jwz3ٕ󁛧T M҅!|k!̺`k͡CI,y TE?2 ZC ֊ tf L6Z@@Vz}~IMDD]a0͸MFg{qۆ $^_֝m%{[q9붣5C' i0(`yGG 42B4C@H<^NI|H:0E25tFt: WOL7&z#.֭HN"SVٮ-E]֯ƷΏ:hHdMuE[!o<Ρ1*LTB4DZmO!UF=C<@hkԚASOl_Vta G*R]foH&. qA^Z̷BѤS;wb7X`hi7j89V& hM{H~ArS,StJg0d 9yN:ҁi"-$,R'+h,1힍t8A7K#:xwVJƴB-(uey+tB[ Hd*_&3Q'bY FSgȶ`ʞ',:AHWE%yn)S;4Bd^v>F3h)18G3.M,`&!(f,UTZ7Nx{ʚI|t3wo $Bd1pvpq<@υ,!X턭 z0к&\i "t { <'+ap3Lކ#,I"DٲZؐz ȲNx,9[q<CRn4oI jDO܋Y~KL[H` *CtA}h9za_?$"ap4tkR{]f TBw#DJ0=Xʻ0l R&#T|:CSbSJT=YnQږil 6 1I^4r&POd 6(bLl}ܤ6t(۾u& xܺIQp5&9Uǿ3wWMUB z(ɋFс8fB 'o{FhZ>.a_-  ؠY՟.gER&Н;0ßjXG-r7`Jٶ맬OY>XҵN\HYp7ym6*ݨ@Dwj!}`u]g|auX',Ec $)$H-Rh}d#\x u9PoUj^;qPu]^ )<țL!te:R=Fw4:2% 7`RFnOZO!E`3dL&1ԆQ%JZ06iBЀhST2D' EMk,f6$]Z}%?U>,xʿ`nx[٘:]3 knd F4i2IPg&~'z2U3xV ( d;P˯a8ujLݿn:Bֱv$ż!5\{UVLM*ChL#, IDATOowK(S uY$C>L) *w@>B!&oGR#- i28jIl0,mQ7'XѬSe{:|ha0T ^![5 J|U<6{@1!(P0̠:A%3Veez`&RȐ5ʎ|v o(\٠.ꕖ77IQ֯yg5ݿr5iU4b q$98q[褸! 5U7i:!(A\(Y8dMS:=[ Se3#Kyu~*="J<]pNt8) h:=ۓfyvX֌E+.pMDj5fxUWnㄆ1zv!>:Y%҉ج;9CrmUnJ4Hk,-\CZD}yuxxQMÞ=^ȧgF{hb,pz-A',xGNvWNZ`vEHշK c6R=w+ cz&[!i8zBVzk?_F`Py}Jf wXv3ԛ;t**LnVշ+inHW4S*lzʪ1S|=t*QC&lDķzE04fe`>LNXڋ;[sxVXż)&ŏ9r~0]W\f Ȩ5WVF cBёzRzv{@ :Ws*a0iڥ d;kxz!x̳M75X^+m@Z@ּJ `'dD`"-ujs 2EmP5h}Z!`>Vho&a⥉[B +J{6tB 1? tyR`sBnK7\li,׹/Qh BJn' +mrRy[S,CF&!D;SO.zhzJ;Vd"}&id0g&4|}kG=7Gm!_OR/C$d2\m͆'rsa<^^p b3{W1JR(W+ɤ-db&6!x~a/f.Z4 4*z0I5JڟvD4J0۞7f /j&CSrx668(}Vb`d<1Fi.Ld yud!(2o5 <:Ы(akj0uJbΧN*I[@>; R XD4kF)hNyFɼ-0(> E36Z`ZRP:np/9qfHu`IX=oZ<[85%A} 4ښRW/Dt+ݞĪG x<%0F5Єa;^:ji96gG,*}:w$' ơ;L&kتŤlPټmDIzc瞨snMZ2LFV$N J:AB74qGh>%)S W|Cb]{&gk 9K!)q>p(BRv7iӳ=&S6QߋJrr:̫dV:n{ˍG+H+Ù)3L6'oǃyA ߧTinEUO[!x~7z,R#hb'ӏpcS?f^ GBb](7wO3r(f} g,eRe=q82> U3q]$vm╸iۺRYX'/MU!SBu WK6UqAņm0P#|1F'FrE=ـR) _ROlЏ/9$|7JFIoI uQ)<&m]ûUɃ*TYњ`Wt}0 {2DfXSfW;UI`K{jujÚF]'/L&Z,Gקf^@N9gJBҠp`$'鰯?BB4đw܄a@=0q$dDdN8I HcI"SNskx8S&rQZbL=YKfX2lhmhTu/DaL'c(=LCh8PΠ+Ζ ΦjVWcnbglx*| t0G.38O)p?&|GQ.&J4{CCE_6 ڊ(jeaaЬ`^>W= mj&JڒR_]"nq0,Xun򌘲12Fۇv,3$ip4zW`IV(yK\ p<+(:+n,owq1ajSm뜓 t lfʓ0Ŕ_&Ղㄓ<=l8HQz d19LqNOXLzfjٶdQ{ $RgR|{oּm' ̈?P(5cbhEXl6ˊ6 !5o7yܐpN`AGJQܸGʴxΉ4yR B->y!bgLϳD,JmM5~I1O{' Hln:ځy \7p"p]W) ȕM {U*4ݺS\5t6Pi'8j#YMÑ3JÔn8-8QT79xYC,w&*G+r2ېM:QB4}s8,K~@BIs&-M蠇MDy>$? 6X[D\Ѱ' t:$DH @BoRlB'd{Ňy]d:C'.Fv n$ԓ ]"k*x8hdgn lڢLR`y:;pfi)A"7 OC"J޲\Jż}=1U;`5h>U*Wqvz(*>?ئ^nx2?Y(SkHzL' OP(9rST)TK$ Xg=)ARXKV&c=88z!O>GuqEy|V(\6\ZGwnC15+>H:I:$]= aEAI u[c¤-rBIi*7 MiA,HCa 36x];4.Q^ERTgFNDQ4k(z5| dPS46(,)qO7ej\,q{wzZ'iVx7il(;?v(ԍ\F #&ϥZ8ʑb`eztH@L4%J}Fl"! rH#Q7E7JM]q'z^g-!y5G2_s))L7 ۈf{4ESOs10~5skD']$0i(T~a sGPET &3HHl붊K`8";Hli>NJ"n_zF(e:&)CB9ĤsB$ 4R p8ږ;0dD7"I '}Zlؓ(rwYc~AEH ņm]pd^]?9r(5Q#]pmh_9Nƽi;_sQ6 FB eAì80}Zf U&P61H˅+@/yi)Zɸ+7R]?%Λ'?yP؉l-;O6CP5r{ـ@M}ͧpةyzu4 +U 5O~, ㍫;y=( ǝڤ{e+WB҉zWҕR7NXu^WXÄ4đbٱ@d9$WMQ--Bq4]>.vY5>xʟA8m4taJYf |8 ٓ3N1MNʋޛOlȅ(e :]є^%30 b'kQ(sarg&GN"Ѻ_TwVZ'`2| hþu' iIʄ n"5CWŴP_h& SRe]m .uxS/jGyFa[;YI|AC Ĥ߭צɔ-|[ZnC["N * J&{T"(|Ew״lTq`H'{F3]5|.eGu{ Cw3T.|l6)ݶY![%oj,c#|GE_i8zv(,˓c M/Bo~d[wli(ͷ h$rAu0Fd0Y}GjU%l+yB=O<0Η[wTx(r5㜫f@RHIfH˷g~oo_`(}J<2?0֙O2QF#񵚗: 78 'ilt&<=X5/w:&Im0ۮKy>=m>sp  z<|]#GY+ ؾ5r 4+CZ&4:#%`/< xA8ywHKL r;Iڰx8nLMD zM\ :U0)xS״ `lS=X ޽#|h'b t ūٺ.;iNLD dW[ LSQ =ұ( $Z&@R9*-Pkd%8-˲~$Ss$Bף!a'HQ35MM[a^@kl3-;#ui+M,Q +u bؾ~ ؤ tjMjT 'heb%L x;C`x4-c^,0Ӿ6nS{ 8 +x橛>~Z2>4奋<7HR/;^1L 1M91iw }o 伙̧ )$GM8C?HKn7%45ІMn)¤aEՂ'$5\ F"Q;&rK KxbI;ZDhk^!`IGfdO"C|=q{4l.|yezT8ӓ>hTm͞6iCN8>AXnQKLӆwmbsО5L|͎,ިѬ0Liց_K}\w?~0x3Jc1qi IDATr~<Ǟ[:Ϳ@Oe\z#rPm!T`СFaK-Ŕ7-g uR%x od6yA}?_'b6 zevS73(4Us:]3=Ӡ1+(&t~%= 0nu0D3':M4h2˟qa[gJ&/e i84$Rs $;3h5I~5pJHFqH^to,pr]>$RXhו/.>DszN`bI] x WTI?l!Ix( K \a8a:Lt%ń&E|a;h,[٧j} I!Bِ*.4SƆd#[ljsZ^ݥhƒ SKFN0ON5CsN8" yppp 9!>n+Iq].*aIR ݚiBEtZٲ%0D(Q: Sd&>\?5ׄFVDu YTG$ (nP}whXS4qlyHJ5|Med޴&;yt|y7)`1܇JvR7mg!\]}v\Z`0G#(Ra͖PrDn3^$n,9'3J>lMT ?ǣErrƃtoF脬L@g Hrl5cCGJA< Go|yAjAɡL:P lh[3p^9,S]R GUa#@~PT2?.x4223zhj:)ۂ(܉q'ji/= 7ظ("v%縉RgH_q3)7Du>&֛ZވH3}89`Y4fb6Sz E,NJϩ! .{{? ,WHiqơlgWɏmyRIH3rkRw!M1 ZMޖd\Z=^"c 6Z I, *C?ϙ_$vy]yp+ eMMGrk+I<%]q? Mz3U;I TYg4x6X8"Q/)6C5ݫT*1˶ppi_gܾÀ<3jK0!RICB7H:M2D U(N-eBM.Iќ4}|Wɏ/ԁhv^Ful(18Z^*wF$Vr(<d{\ 4]WQ>Fwofo%Oݓ}8k{<kZPtzC{턙2ga<酀&AF8 aJ4H'؄@>WQ{E~A䉱ED_65o<[ Sq:l͸IobT4N] u(*h&.jxk¶6N]pIꇗtM[\`PZBJ49zUC"Gҽ}XjRC6';=?FQP 4G]+L1֙)3I!DŽbDLyA_}8 }M*Um}7r8\HBOIk҉1If*)lyjle#}RN1D0ﱝq]EdLwRkDzi~pu'biRUlLngs LnM!;,kD .h)l_ GIylbXAq`H/cmӪ萑{-ؘ;gEiKJe4Ӷ!Ϟah,*  U=Gdddw~:hNV7H, RVJU]ޚRԣ爁ZugI`JJ|]ϑ f-ތ#ۇ gz$omzn AY~C><1wtv |&w{X" ϮT ÝH.- '`tKy8 ^'[ƋZC"h52~[dN1?Cz`EgV[qYiz,@!'p:u<`"ZAbHbYzN..|>: ~A2 ')0r[|&~u*Bn0Ǎ >tC[kㆵ\`"&2SZYZg'2Ir'?/b:TJ&Z3>4SA y<4>–x ILJ>Yw\] bkQ/pdR(Ѻ,(_E%ֿ߶_aZwpX#VZU$]UT2>AZl&L6(J8oi.L~40R[w6&䓯|pkQX='!\[i.pyK{ 3tY~z1$ S=X)#f)% y0@a!%<0l#DAd, E-Cs>|`5Qykztt][l|r*Ȫ0, ʤ54 e;-WHE׍`zXcUeWG \ ̽?Z7) RfrZ${U(%d#:\>N75Ws)w7*Ɇӛ+E>*?Y4̔׶#U"3Qme;4{0wfڞXÞUպKۓeGwF KR=*bt o.r'0lulFرk:^xٺ~ŵX7QߧK=\жS_Buމ4L xi VLmYqF$ q #~9<`xy w9lĄNP(*& rH-f!Y7h;WU Rkƻ\m]܉`.f~ a}Uw bx سc~5Rh\'IU7r:X2Ɋޤ&+aӁRby-ib!1#,݌G9 O,$RsX..(FGߋMRX7ưCO4 ["_0bqׁi ^ 5nmhA,4v"ָnGNsVO2; ";0m.5GjF8Vpm@&#8۽!myp#g(If|'q =jR^әs/yP(`+m_0^V^m7p/o{hdM~<)&PfI A8避o)^&נ0az{~qi% 71Nj5mRһfp⩭Oc6W{i RzC U$1Ƌ+{lnÆw7MD ~ rhbT:_@33hh;q.O[unV>7bI,Dn,-1U`Yow˶ rt~bC j]2(wloX$CnN ^Gj#+ [A D3~8 V þa~A3%|1lAs:a %!D~ EobgV}'/fvi;(Z ]&{y\=\vbt80_;ٺRp_zi:So,,OGܷt_W+ ֜OŦpinbГ=Ց1o1&끈Z&G2l&,⤉v8v H7`LVz /o\9!t8_,\Dq ~xCИ/N/>C'Jwh\NN~P6vސ" Vpśa$&<L+4jSST`W`yzY8P+4}f:a7]{gˍUB@M+F/ ÌZg[&u K2[s4(~ %dC)`W aCVp@ ӫ5NidfԖfy`nQ|Z>Jv[Hv ELY_?}&D&UĨ*K1i\ o> LuA$.pzhfqx': @~RV'aNhҀiO&'Ìi=|00.w'@a0]{r&Jb)˯M.`a]l7"N KS$Epܑ~!) }< Aa9vD\ 7x%Q6/HR(ߑVR$ Z0H$"Sλ~N+ђ*j:SK3 f'dh'Ԧ¢h#er+\⛤}ng S` R%f q8d'&L̨Ia:33fO%FǶ{mÞx`YX\bLٚ.oYph$1J|0Yl$da7Ğ8p?{[ inbbn0O33,9P%ƙfPV674y}],̘+<ߤ{i>b5}|mO$i7c3Dt ivs89WzxlmBL-Xo@6I*u "$Q#0/qR] @˫;6,zPdɪ.$ TM!,QtwҾ6].*Ő@H,'ICiCv7=F R׶5ߪ Inodm7YјI,m9@ptfd&Ү Vύc7ԍ/lwP#ԈZy)YHͧW4+>huK J2$WƪD)`:] aD0G$;h^7 4Vi֭pz%iz[4t|=B-. 8tKrqzv*uJfJt߼/cuN<u؜OVwoo$_J<螞&Y%h`j%d`]=' QIݹƼ,w#ƔOuS]I ΣS ާ^w郒gC'#P/@h˂7 ^Sbohe q ]n:J9(9x?sN MFqnfd-t>ھ~1p$@X-}sLr*oĆabA*l"ͤ;6s$!w! ܚ~vڃ8hVHwl[K_Vֹ0LaɭBcz60B9b=PAlY(|s*SY\Hߥ2ղp<3!as/TF)mmLoZ hsFdVFrA.Jfr]A| Jq*= f/G;Am,*ᦼh!@\]vDS~Z08(hTS1`3hxyaQ3bζ~lRTP5 Q%GoB֯_xO0hLxhq H)6暴}XYD;GFe=2H^ ϫjlqޭKZtH`ҡ*<4Ղ 0L>aց}:85ONz.n$ P/`V5pD@MDlO uQ$ū';V6S 1`L4y dd)y?^ ^9MDFTpsNu+X'ɘ$FmE X}]26:5Tݱd ti.; D>i9 rUqL]ۮʼnޕFCw? R! X'ztg2L _[Pin>d0:e|}`XvxT233 RFy> ]frcƕ[!EMEE0uo@^8mwMWDt<򌬜,lʚtBQ\8UO@t1A(MJ. hǺcI۶]*h.4^)cbQ0#{4qqo:2Hnm&<{`?'"P} Ibk <'nX5v B<1.&SFLa T{@#ض31`C*fN&RWw B I'9LL]rdx|HbO.z0Z>?_1-1aRV 5w,ax|`aq5͵(j˚I&c%2MYZ# {LcFK~.W!KзDQ.᩸K7+S;4VȇMrƦA@ xI܁@Sh'W ԟM |#v;J(llvucrarHD 灜!pSd6'ĩ]ÄO4O5O& 9G49l}17Q1m,!wء"ݚtֺ"C*MhHφ#s< 4!k ߑh5 iR]ei)ilxMren=bf(u9Haۮ-?C¼7*"EOLȃ0MFNqB8QbI*VnR0#mr#< QĠ=2\]V 21d)߯0t]H[mۯ~6uK|P#YS)= `~DʐS_8oꝐ"@'CI~vP2p/սB+3'G@u=t 7_wn0Zu!/غ 5\?پ$5f\7.C̐V=1&rr2E'Da~)`JXZorLu}[pBY9!D_Y>XO1Љl8[1sōoa8mj 1 6qImzD"g2UREӁ~štJll!$'"Xrr֖k}~Xy\m!*{2ȐA vYZ'۶#2Qa7ZQR&6\zC.ENr7@&[d0T' ŠV6+.硅7xZqLdH{~xGdBg!.>e\$5INq=t sgu27Lyd<F%^q%& E,]*8]P8L66^Ah2 Z4wnm_͈[Di$apPE# P*p<1wQd^4@h=5SR|zDna 2L4'=捻EC2 ܨO5ov|ᅰ<qcwRI" $=i>"O)tm޴#I Vc0p{m8\QARK<-_xr\:Ɂ?]+p̬lybHVj !U}z}^m*3VJs] HN$Äv2=JYˏZWZh\ۗqk%e cR.(6Cw3z%Eq, 7A փ?y8 [6OOs]pNC% zJ 맧 <;2ˆ774O.3! 2"Q.UCA`@9cxw:]3Rx)JidZl_?)HaM cf dey4d'wV˛ p9it@Vf\躼҈uDmZq\?-OB fCIiݺM $y:KI/%0ۑdA)A/>Qc޾\D &?.b .*2 bC 8k3N( ʇ ZCgn,*C]Z~TkRն7yB7H;լ냈iH)aE){Erx.AHH"'Z|Yũ`2ߛ%t/ŧ0kpԩwÍ\7K0^ ə@x+} ~.%r=yA~D ̄,d]734N񶎴qxIۺZ>k-Sp04hl|aP74n6][fovof<k=Oề%YJg:hClnML!YiȖ1}/[)ne5et oKC_BWa 2bCs,f6dۯ8si!6Nֶa aDD[2Qrܹ1:BWt^A{Dֳq"2`-@hl5Æ74 eg{].< 8`lO\AP\V ly#*E*l 3  Èabs:n_`W^AUp" [HalY2X{U.o.?Q_`к]=4*HPhZӀ@x[TL "0lƥ캭0Uy1,1?@GgLIbމ@G/Y8k꾕L00m'l|W4ͥ_!Lӫת~{V6^y-O#S^h'%8:г.4cZ H]?]azzaTo?$<"bՈ\)TŦ?K+!-xq~ak!9au@`px L^ld#9^मj D~iǾq5N9. R^7V!7N.\0꯿KO/>X_p}.A-OHi.ЄҕQD(551,1Ĵm|=ai>>)gR\>-N6}/n"{t48IS'sG\,u8p|`)zqTٟ)< ,k {Xa\8 0 nSvF|);Gw I/l%f8M@i4UENCএTLk{)D6G m2H=#w8xiL37EVMͥ %8䶷Fxwt1qbʡ@w%bKѲOa,_-N 7H872x-Te\1Z{<0?#Z)AC{6whKpA|nvxZ03֜&6|m1e<. 18*ޯ47G#c''UyhJrʕ oDbB]>=d SlҨ3m?]?i 0-mv uN |Eq..JʡC,:=!Ohuy< v震߬X@ 7/DjTR>L+֗);8YGfy더O|<_0١u[N4BCOhBk6ќY "|48>eF7[m*I` HW[>e;PӤUխ3 Ǘ?Vn`;BÎ Ͼ@ꃚ772ueX^7OO SC8;iC'`x; ᙉ' lMn(Wɜi[_`\}[)4YnVV1HDQz>BkCf&I#bjƳRM}t6>?D[V\'^})ڏ2/ISKǙr8X>㩳(|8!˃:~MWM[TNI۶x|)zY\7˛> hl;><2 Ȑ{+/fdf{Lw)+I[v+yB!-$=]~8=3huY DNS3Sc0whP Ep|a0ąMJFWv<;<{UW~$l67,7P_׈74"㑊![oM̮9RO, EƌFRNvOXztO lU8))ÊؼCBzxC")Gq|_n_f{کsgQ>'U[r{Br9l}CFܹAЪV[]e9~ORHQ -Y<\]0z.A'zWʕ/r_[|gfgI/8WGÕZ+\S A͌rMe۶Ǥ޻KǠ!|IaD>&+oL #MIWm kWhck}~DtRl |n6^^LxǗw4n>?kԬwj|L 7AaO1Z6}fÉSEsӔV86c-  MJ4B-\|!׹s ϶.w0`/$F3=.e&/. }$DoSnNW1Gץ\=t: VM I=ffˏ;^D+(@{o5Jsϰ|~.AF\2WO4?entD^Z0 < {@IHs|!~r9;)Ό~w ݉I?@֤̀koLNf."ˍ*jE\+u|nei>vM?-&$oDPȭZp{jՇ-Ұ$ ~a62tȝV}ʶB| +(  V󩠙Qh/qǿ]{{ 鷔xQ`D&+b__|Ifbe}Џhӷ9@9 $HXu"8֠BD{ plC,@S}ߪ|j ΂ˎv;YS^YIo5o~mh"- YpcNIπԦ<(4$}N<6!f5 `?~4x]kl&ʕ*`+tS",.B"9ъ(mŔh r̐tO 5a0jk_A OM7n бBؒ HNgW"^ӪLҤDȠ'2J/һQ0î[/[{ dBr1|NB:к,>͵k!m%4mۈqD:aiDQ6H5@ jٮnԐ2qwg%~ߝhW7Pt/ᔻ=GȰ>a8ALwo9躬mV=x3':^,Б8SDK@T-M#7P%)rڧ`6?[>&[~hӷ̆Ӂ8 Qk<'OSD#zVd)\T,cpbSB5!eS ۮ/@4hDGٺ!OhNawOUK vfjw`WHa4DY˞`;@ }K<1d{#xmc$< #01l{vU+R^]nP0CjeuN$=ny>큯QA*HX@zJO<-1zKR|Iؔ | xIxtT2܋%] qߚcȄ^[T+H m],y܃뤣&JJ9V18I LY]F2N@(A~ꗉ, yϐ5їKe2LAV;]ZdbMp>${ͱoJba׀Kc_)9z s}@CM/CdNU;.4A2ώyӰHSgjLHGn{ `xиi7}Mj(IljHtl/p"P%HO9"P~H#?'0Ew 0brJaJ9/=5P_FxF`nO\neڭ 2p0Co [ N)H6+ȝyߞp}'tVI{j$E&S#p""d< G$v&Lj,9-,Rn^_S΃fgtJ tz-5FWn/n$T!NV> * 11%" \@eiZdٕCݾhxo{DJ#&ZXЫd) ,}mbdں2$+$e|xKH% 0էaͶ,UB rC$\m\OLg |AC! *pIW/LsA*ŇNBHIzlf V8R<V9΄d ~jY: #%;j% DeqU;s*!HL *HOV\Q@f-pɛȟKog*Rbn5얰MtaF)@IOڥ`x_Rf\࿿<gE%LQ)~7n>TB6mC@[:2f5U!-w:@[-X5bI~Sju Nz2ppU@`g0|py]>)MyamE9]A[m0}s& ?ޙ.LMDe/q)UBu“Ù{|f쒂'IJBi'G w"K֙?s}^~%zgm~ 6 Sfm+aK)tI51S#Npu6yG, zY_:NT6gNFUkA}O`/U;j78=8-)7 ũL{9K|R_|o#,wO4N/ox=y>Tn$4Է#~h%K }ѽXIrgۼXC&:s-$EhPG'&$vo6}ӷ4hXO7n3rܱ#4V!R]&d\'y fJ~Nlz'0MiyM9C~X,̂)҅yG"ʤatYp!& r!x~(Cr(HN k)Y'БGzBJ )CMN^`cc; n>98\sĄ=_om֖>c!rW.l ]:|~>%bml(}M<6VA+]^L:khe27 fkf*2{ z&TM F_nu͜x촵r妶-7o=Z0X^w/0%F<;BooClz_4As$~Kh1dp y ry@n4H&Zy/LF-OoO ݼ JuJ"<#U_j˔oSWƉ4 3N=oӒF^D1,|KQޔȀ$F-ar >i璮qYO;M2O߬ՊĄ|8!>. .0$DB3vYn䅳tƭ@>kYG+_o> Rkjvaޱe1@zۺxx^hY:NMAV IDAT5Hv쓬VTOI +/l6/NgNox(֬nAt̂R`DQưvԶRJ˿/À=O/~ら y׍T91Ng?3UcOs7'>bQR.Ä|_f-Qh.?ԟzR &U0wJ|"B?|b]3o4$d ' st'.;ᆠS$$%f GS6_"IT70>i{ˇ#} '4 <+e!A<I?Z?VnW[>}dXEf[~R-Y.mO,l/M$ & ͺb A9:mR ׇ1& Q(}պ% hk;¾1!] &&SKHVgCg[9͇kaJuuzU<WO¶V>!ApP`&Q|Ɔs5c ~ܙCQꮌ@ON3$֟5y f nŘZ5 D@q*n9X:/ 9 OfMZn ^P6k Vs0K-"QmίdS_7V};]~9'"5#ظtY+N(Iv%0,XLnZL0>_zKJ4L>Ŵ/ F_^N HqHO݆4ꉮ|rG Xst ֽ4J8uxxULaA"C˔d4tγ}~xZXb}RS:AlOTu>awIYwY=s i\+gIy+ZD&gLЪӋLc.X7 ,T)vJ>= ׶ʼnc"i#(}k!Yg,bf͟ߐ]ޟʁ`r3Jx@Yg`7Nw GN +B^" AY8;X"!$xRc,n=$MscN^L#`D]|KM?Qޠ=7Ǎ\eӫ1'@bot3$GKؠkEoꂈ`­%G2uD)|V(&ћr&)ӽh. Ol=Gdy8vW<7Pl%ԹKV_]f$o.Y6qBZ]tacX^ E>cK#`>nt=1Tc`?.\ ϖ%XEVnWvE>`"et+7)RBHۮ<#73h1P}pB=|~2|:X=sXnPFhijf[W# T/:'e؋\K~uvDu1:Y2umz3O6wj8wȃ$i)03$8= ]:ItB"0ڃ[" R0x++Zk,̗9k| Sɽ)% 0kqmz_ˍSHy{z'g8ޘ>M4j̢-\cz{^\??MFm d|8 Πl]vY7狎o;+ (flv5| - rPI V^" z|kyIAr8&8 (8%pGπaT#Ytu)IdQ dzOlE:PH}4>?%gDl I$DC3ʻt`irY #m+/d$H̍kttkbrd$qsd3…ڸìvmm&yoIȉb(7[$9t_bYdyzܙYU 6w\z d1p7EC7qaF=Y t~&_ ըK]VS@$?7J,w6}0g Mr=zi)/ӧ! ^P t|E0Xh@1x` ,{p=' }k;"tL$uwӑaK/ER<ij+{N!ֶUgLUY9y'p;BXP@V-2%z=5'ΆZl_4u3\/u/& 9-<{DWbC!2i__y$os^4쮐,.Og[$˧ ~״1ӑ:뗛!()+07m\IMDKePv~^3h$)s^ 0m roL;zmpM|`.2EvL!0;atZ@).?:q4|qS繲 FhXBzpΐ4diSvrJAr7TmI+`8TN1 ) w{Ͽ( J:ciG;/ n'l) 8ԣq) W0`>:~F2gand5)xO23_$[E{nu*Z3 4?L`Wvcr5O'!DK1z{̂_|],vEQuy=ZDQ\>^l}8[fuYKN0N;ݯ481˧JǩQ|Tn|j"+%xRS4 yG<1M^ b}>.Nli>Yb&?>a|AseX@!Nd*\Qb2٫;y~wEDy8%(ͬaTgVH**E6?zk {g~Q͍CxvXbHq$IVPL[@ X WV?4IӁz۴Ǚ gƢ~+#) @r;ف)"! ',qL~mvITB.ɥexgW+&7m]l83({fm@—.2[ GGz:u1|49u܇Ĕwpi6Kp8٥ѐ\\sDJdpd,ex iqR8m[aMZ9Yf9HHsW T չSnp+Anj!LIџՌu|eW~a xUESWF\ak'BB8z?㔤ɇںdVWs4iɺFꩍ;S{.Mş^4x~'.re)H7/Ŀ)\yaNÖdw !5NEIJ:`#>ǭ#ȏ!@Y}m%%(HLr`Eg`믿}#j!df^!-hPn_V=^(37 L!e7$syrAH:&Lmcp\D=/kLB:;Ύþ㎊;)ܫśw5LT_eh#$4v뎃-PCb- OE 2t<2yo"ˇ"Î}XgU!iayA%D}MVVp(ƙhFF}aU@6\~X'~ gq,4/|c(} p]}ZAmAh|8.=ΐBoЬpGrvh)C믿'%/_̎b\frt06 ˧?qjU(_{Abf0FlA}:m=ܾ,Om+ o{.BVGʄޝo/K2iI5p:SN\<ӉCw /4|Ҭ. 8 :אIފKh# -FA>Q-I OL٥A|<[v2SҠ]Uwۮ_))иʼnx8}bSu(2QY,ODHq*۶0xBi]@g;3"[A(6KKVO EhqmL[ ' o?m810txfǁXGQ/?01d FLˇPZ g4BI"9Y@-i<ɸ ́ 󾭶]}&F\ŵ!WធG0V4βD,N±/2aubKS&:79|MWJ~z|p<"<4>6D!rb8JM #=HΚ7:S 7rsa>->4KoGx.i\К`M`h,n}7,f/ 80Ԙ6FJrF9g@+wʇ)J @5`[̄ᔄ pfId)m߿r@Zo |Y뽗_b8H`?VNH4kQnW(e( 3yfy$W z6BrX4-8A n̈ [N ->QQ LToHlÈ>΅Hĸۺo0.H/jd{~֚~tDn ' &1& Nf)V1$Lv!%Y6 z(׀6xt*L>5Ю4r:bTn伀4\>,l35N@(9egXBiQ|(';} (!=3.{b?D;_Dϧ6oeD\ۭdU[w b{~LDV#َ{`-|12IUMd/ nL\}(gvd"H!8`B5 Shb@(,2nCaŸ>0]&Fa֕'>6J7JF|05dF̦Mw]? qFll-w>m|w& @& aCuۀˉ4O" d8W{6%ۆnyxXa^*,I@pzKL QJU*1=[1crVBE^6B kO7Dxi> 3V 4#\.(5EUgd1tj|`ȰC o5٥.0q\Nr4|*$t|f?7pHBFjJ,ߞ}:) talo[?=4P[РT*0R$7Je>ƙɇ U/BB>x(;sVW/|+Ó uӟK l)?-R,<|ʄt~70͆.#c$xz'XtZr0Jt͞.s>=ȂlOH|ZX+R;xhq:w2)GKW+eCr8ĸF: H2MHɎa >LU̠ $᭻ ):?gN=J.*o(FLݙҿIa?BӔff%(d*$YC&-iͷeO.~_E_w(g@'ܛc鴽$O :8U4>8Z6_os!z 8Rݧ1l,GL'23k;ab7 IDAT+ HITqiY4?("m.':0@ֽG@ | $Ωixن͢Y}<ܘ̈ 1J펧k8VvYr@M<5geN~vD8{";}GƜꍀ׾ Ȉ˳$ۆO9(4L\YH\)~vHҞip Z=/ϛ&1qeAA 巠YATJBd""0Zx ŋgԍ{kz8lX (2:m}B>qQ~.Xn[0R4ݾ!/榻l}K/91. uxMǣ\U퀉t8ҿ3'N܈4CUp}[Ka&W1Ų^lg"!amLFR 2ۣ:`Ad4&4(k 8қUfdi^\ m/]l+rwTqN 4._Dd~i[vadjF3vDLB $#vi lqg=!3Ґ$(r͇;]`I*Dm8\1Z) #~\OuW푫/ZFyB +Y ks)zݮ]#If]7b #)'n2wbxzV|m4P %ZUq lTKipM o8d(dlO)R;)i25pfrTI]$TYw2RF\#D(@RlKqLD#rxI=onŧDޡ}-+MQ;׻fV77R >^Wӂ|0LY\ܯ .j<YU#D@VQL=trEy^K1sb.|A?2@A;xЏ&%4зb +8SEt8`L;w>ln~,ϛ_J7!tGį@WX};rNZ)فp~cnqc1q(ͅyn_q"؅48==KHlņ# UG`¿~to sIޯLEpױ.߿ĕ=YФ@f . j([?f ՋMA>!gP̵Jh e̸3Nh!Efi?Ep}|$"YӅ8]˩ в<,͚x|T'@bB7ΐJ_q~ډ+ /GŐ I_pP:F:ׂjĒ:G4v<Ҙ4.6\IޜU/}g}}JTVHEeDc?r"(i9BI!7ML491jeiK҇_yxr ]d6@y\dv&//j?A@R&:1/*۶Xg棭ߟ77On$j;{1;.ЙH֥xyԤaP,`GFr WaG&7_(h'Hp |h߿}sb gĤ};,6lgsSi:Xw4T@[765ܸh3.|n^ԀsT5AbcΩ&+Q=53 BT5ŝ6&8[$A$@Q' FazM RвXY,Ÿ"EˢQ& Ő 9"%< Qhnʡk6Ҡ4[a_%us_hfNX ):Ty k)s7{]%3T-OE3 7,T%lu(aSm|25f w28#M& y|9z'ȧC!%UL4Y .  8b&Fq:R^?*|<]/04gr ERlǿp״M%S%!'agGQ|@\}s7B:8l7$Q˓[8M[<̞wW,rZb u[tdAG>)o(xP F*OBKn6܉! MV.++4Ƀs@`[A~e??>v]@<8SO\V7wr0U4xʊ֠S{!Db!1;o 7 2:* BIh+1$1bUNo/W᳠w8Vlq4"~s >ΰni ]_[M,]rRf?@{1(sJ9 6ژg`tC:k肇Ӂ4i+N ѨİݻY{> L[5J<{@IJ&*GlɳoϻStn^δOel<X]ܤw]jj!DgY D0ez$Y|MvLSaM@a%; Ol:5ʊM_(%~[- \?wN6F$&[ NIZ77'l/P* 7ɩWڲLݥFUG{ra"3N9!eB ͷh?BHӅR#`1E+.ZW7}? )ĶVm[PKq J2O۰ .=NE6<_WiXƏ6 j8rSm>m0Nyϵ#.qx4KAZdzqسPzmfu(vO 60#o_v\cmOۮ"#A}xm^,6/h5HmeR u&ÆAl[q>AM2_ؘvΣso+&(N$Y ˧7oF}Gyͱp}{4\d,c`S?YSҮ\M|5.u4[7s`|ZkϝF"UBB-O4rm>TwP(9I+ҲNler8\ZVߨ;"wE4.iuR[YqFdl+L Kܬ4 P[q6+$h%hpMl7л8A0调.HCoG ;Mk%uk0\n~6er2 ̰)6PNIL;G̘Dl틍21N: |vi8T xF ,q:YY))Ac ҶHB A +RW/Ey!NΤCtih%@8_u}zKdR]_Rs,:esوU-F07n%8asj&ߥ ukj6HʐlC]F 0qՖ1q" wBR8ƝYI@WQ&cc<?Hv?n!ی[҅qsީo+Ev‡u$l Zxo'*%fDJr&GtHCma1!俛m %..mzʙܷͲ`7%O۞>m~lf3j4XC!H:lqQp.{4PS/=vx WV[4zTuR;ܩ(M0PD޾J_k{-7R=F*NR>̏f %Hq▤]ZVФ4^<)7`/G* b*ckƏ|)g˧3"T,U kmgKXh<;V5HiX0Z I]!0m+&h#X:ew6GBiTm?mqhcD(ѷ@2yB5ુh#J_t0|%!#㵾Ga96 sS&պq99amA.٥" L$["v @c%-VHc|gHCRq63g!n>!Uy0Mm_]*5-̜a3׈7"P÷°6YoWHyʙJa-Q<0LlYrN RZJ3/6zfk ӠJQT)zx%ۘ[BϋI6-izSH+D y/$qƚ!)֑P?apzC &3HɤE4 a B5nBZ3PnUYIu6hJ |zk0m]I33ߓt|>W\?[4VꔿY}}Ke>g`|@ ~x-)CD'WTX)(2Fz}K}q0Nn^GϭZ7JcА>ӻԠyUG"L]AsA]]W%h Ri{ppyl2򰔦Om߿إmE9a #Ng깣k zK[!/ `8]OwbDS{8o;my"4QԤR\(mXbIJ<|Jzw}<HKo Ѷ~Ced 4[S%'3.ݱJ'N3C{&JXߞ?O"|- 4I]5cB nEyR7V|ئlߟn&ӊݬ&7lB:]lzAN{īۺ9M8d1"k}B;YDL/yҍ Ŭnd2(L3_>t~`8Ŵb8Nu8)ϾOƷ(fbvlӏLrc $xt: MNjعEf%++$5R!5VV- Rƫ!a78[(==ztӫ_Мqi)M+ydFͧM?=f \. M`PA҅86ij8LsyHq@c5 [:d W߼4`_dnRr1y lbpX/.{`m{:<(ic LCF+0ǿWbD(HȭH սL&}v7/ބ4.;ޯ˱6Ƞ0a?q 1j$ʑY3z!+ϧ}a<#ƍh<&M9 1l˃uCh|~c'8@0(%¾xn p 7g`LBKZG ,dHpqϗ=( 7 y!Q: 7;zCzk޸ z3Q>- $1bҚ5bqgW@aQ\/fmP} *)J:?xv.^r!`>L40<%8(DˠQql8JFͬHX 0+h@X7$TUIZI`$8ɺ>ꛌHFPt <+%M;uXe .KhVnd$Iȧ!ʓ.<:n+6.LL!Dov .Mo[g 6 sT8$Xe,0x*wEvhjx@ s'v)֭9qR\1*$ S#a 3AAɧМ83D|+A98m!/)/!]K$1fỤi< It5$8/6~wgB@|D^Co۾?}P~KNQ{_Zř)PHuM,ϖ:FdyN3Mƀwt @"lI9pp8BGЦW aᄆtF5 ,pז 7lJl<ϻmߟ;,FN2vt5.`2AFGXqƖܿ-MޑKҭC f}Zߊm߿]<ᆬ$\(ne`%2;[%8K*5{SZa 6=|R%E8i$: !o(; J vk q7GFoƏ?@pf(IcZ)d P9..2kܬBѴKy!RtnUI\w✵y~rIQqFeHӘvH>9!;>j| o-uaS{8ww#{<mO'ڥarG۰YdtmMlȺAQ4nL֟4 mȐ u#2b)NMi<;')RĔm%Θ}>m=|=?Pd S=ѕ0 IIo[T)$h 5QMh)50ngY/7xM!Qhl${!^{0tOl<?W~Kgz(p\u`Զ 7?yNdu!B!s˿W&qaM!aIvU9ʮW}+ņ/ 4`:D* 'R$%GR0QSc@- ideC``ڽӎ4Hii~?jhLP㎳KT?-J,X[t%1Mҝe_ 5 $ &4 :Z2Ya7G YH1iՍxFn!G]kxiy#y)$ܿϪc1se, 6kFex/.dk |rK ad|p!҈'>HGAΔV~0b:t`Zez5ί0 \v<(mެ,Otʚ&juͽr&!9nXl*HlyمAASxuz46|8t-qdft;pxpĖ9HCug3K:M$OE6 J$Jx7̿q]syLI dN8 M0,2 d|GiȊHU0yvgOP$~wlNdZzy"}EK )'Jd4>` 7U {~fKם>+sYOKp}z4FZ Dm ռǮƽ^`3M惥D8O.i<`Z3msd}>lx{4l_4`e+I:;c#))S<,kXЪO|ۻh-4}1и+ߟCη3޼0^Mޮ?/=qz4D{<\ 8tsU+nQh]O'gj=@BZ8wZËYX(0 o||a *~XFif]AS,!J44"hڟ. p?{70"li20S =׼I޶m߼Up6ΘjX0]d:fsVI0.^n0Ȕ-tJ14"~2j&c˧76CN(V*MԯfvZ~4BrKY2g.O Hx@yC٬}ZnC5tB*?hޣ;iXy>ZxZfʶTiz%|z̙4i{q\HHnKW8GJt oi|44'!=HtCBV$'ke7L; :l,Δ*<R%J!6w-{>\ )cD#"=:oA.R}OȒݏ1'g k\W`VqB ߭o3&ք\^i'JH+Q9̞^,ik¨aJ^XHڌuS9A?vQ9$r؃7Q [kz$@@mX3ܮ<;0?"OCthq)z@E{/|T//)!E[ugtou^(S"R.$myܐAJ4Y(/ͤY! ?!89`X@4A9A@HƷwo>* :^2|Fϧai>+2kʝ`e56qV{8<|Ùpf#G]".} U&2I'ߐ&Ĝ釬! N~/50 gq3,$|W2N)'/'۶Z"5hfo k"0[q2 <*qχ 3Br^S^ 3`- [xrXV[SmuDdJMd YQf]IzDt}8|}f.>ʻ#κ)qZi&(2)j0lt F,4,TRQPv8~舀R~ Zs=I9OdYw&tۗ<ƒ?¡f\\fG`1a4'By9bJЅѦG C_ sZLbMo?ЬPՆ.-!du'6Ff1ϧIA{p:#CC!ӢqZ*#UD957_{@,Sᄰ0J-Z+}euC,*߿fm!(r }O,Pm?40`o.Hsx89,R.74@ʐ-# To[d%&m_)VVrf/@#*2l1$c>8%H$Ƿ>0ㄍڭn6ޯjۊϕᐲ{W24MMyZ?Fj0b!Dg0 st%6mYPHhkR -I6p7 m{'cI]bpƴHjʁ"<롻+ks}9Yj}ʏMm`s{`kRYhR4 @UH/{,:=~s9@Ms2jyJˀUw_mpyy}r 'd.O6jP8ܟ*__ 0w&O4l:=Ы:xpUҺ8aW~ ʾE# gC!v0?p|pglܹ<.%K;T7SV[{<! 7Y[4R$EnAHn_JS8 <[^ȶ)9HC!GFI%NVdsi;En]fi+  ,t8&@M} !gQla9ފwF@Qa]֫*ߺ,/ڍЈ1e: #Vvu yj3L/R}F].0@ a}U'&E÷O1"yԃvTU6'i!"&/ 2N>dn84!%Bj3dtiP-y)\׉ғyd}.Io+ɓA;:uૡV/.)m. t%/ Tf-9Y[VDʧ3ש=LX(!^G9@v$#@'a'ĺ`p~Ċ*\rooj#5ف>'{RGB7'"H"/K/*s[V{ lOK󌐹+qK5BƊdWOksBʤ-VwyaRL#sv b[9ęv'uh 9tGY?[[Ii 2@Orҭ6GvkIrwH#L x K͆㙒ۛ+@9p)luH CC:rMSX8p>ȇx%+D NQ1hi 9} j3 Ϗ2m:U{X\'I1q;w+bu0Ј<5ް-xx靗*FÀV, IDAT 8c+E2<8.@PBG$N ,2_ *ϻ5%jE4:`]P3l/w!o ^IiU`A%M>@IvYQpԯ_} {C*>#}ߔt|+^8N`xD"ANcst8}{" gu3f39.^3-߽kvἇ=rӴzק%I{7>BIzχz,v+Epb*_Ix^+{qpEX @<4|^{PbvfDxE*gӅCov Т3[yڸr^G3<4"JӪS@,i=Zwu)UOsuFiwIMٝ]i`"Lh=4 yteep:D~c|8F< [VrGg0&ܻe}IIq03|p\9Y]$D SưO z8Ma,DҁsVDQ7 UfG|%P3=[G;ti+I?K[-E 4 U'A V$Sr泳8 EjMV- 7412ɼ8f/ ؈$8lYo 5^RX7JCaYw˧lք72U۾A?Kֺ&2XN.S2|?^$Ʒ?x],O8zAHiOk 1:>sڶ{}zsm+63M]k˝Է䍧L֝D"?U8tIz}>𹲘meZe_hQK r!~@ $H XNX 2 y^;HYY(@Bl7ϯxj**U}1Ng2NyvP #H~+R;yb4#V`<=>FY$gPunFodM ROHH(wp14/$|3ˆ҉r鉹,3ѱ)z mB΢>FY"Ljbo`SBFyIWɟClP e1B67O/Frlpl/QlNT,emsִ d3ɕ#p4!#10sp%hM?;Rn}gszCP@L|fR7&i}ilcFj0O~|/3@)j=k2gRpm; ^0FG(Tu_YW|"#Saިv8_E.\5/OH 4q?ރ+njR|χBc1:^Qv1e>} sݺ|u +i)&"=& 1=dx'LF'W!Pq$ tݧ41 sKIa hvYKKdᗙ1?YsQӨw3U9?.Ü]ZJQ5iLQzn mֶzQ8bs֥,tgZ)Oc*z mM'Bg%wm=hƆ)-_,uヤྖV  7Nc+rjr۩gnݚ҃<)?Zԡ ^d奬udXš1$Ǹ74 = on;qEU9290|nsmۥr+ @ [ݍ,zDQqRDYe1@]CUnWO8mD*Dj sLYpܧ2l\ǯGm~!w8(5'b}uWHS\79·01?S@U>7hTFOaqD`XkHFpە |2R!W@}wir-S1gu}rl8L jV\.DOV PVWibt>$ Arnf,Q|!vI ʳhb9;W40$MzQ bByY޹eH-&R&曆y_BJʆ9W1%/#Y}'Jf37O{)OqoR: yS2z_ >~G3l`Vo6|$cbLS"b#rYRƗt-t"=g CD<^ n)i UlOH3w0Bɚ+p`Э=0@Aυ+x| hFH` ӑɶ&^ e{ Q0rs5ՙ pbhh9JrNwt0&5'4X:ZR[WcKh׻+T160'K#uJ}X gy &ZwYP16|Rz@(u^/.MD#/ѺrBPS4ԡ^YVn76>FVƻVǒSZ͕侩MIʽOCHh΃zm6ˮ7+LM~\ 4?JKZyA2^n6N0M޾[7c`03ai~^VW aO37Dґ%;B÷8t 4#F#u9l2d/XFb1[>xc%}5l慨}ÁF_y Z)` '&dFvY@DpLd^#Y~ysd$W ~q jdVh ʶ7$76iATY.i ށKV_7K;7) {ؘ|Kݘi4E[ˇKB)*M'5q f0<`7fHN|&D*1VW4 MAiBHljtϞRGjK Gd*V(ø4a,-(yFIl4BbPB?MQX. D~=<ԔI < d|qYm6xZo>wJO͋$~G& ސi6*C@,.l$ 8'UWRA; l81{-`_̞hp|~E!NN6wd;<ĂH"?vRR77gJtgQ) X $p!ŃŪfb*~VWP ,ܼeKybNhn'zUR,m}igHzx5t>FRFd4xQH~،(\4Z@jt|~}n//R43%s#D<qgz76!Ӡ7.|2|Cڷ$ֻm `9gI<]9 Կ~&6y2{ag:r[lǿ0 !c)>% ~;=[&x)NV)t#h;ȋmwf_KϏ֫\>woNNl.]sۃu[~iۙtK.c򷚀STAw 4m SN,rb"N.G@y@<[ ΙwFޯɲ'"h͟1\?kt)7Eʰq'"WT-|4 u(F*jmԂY]xFx}B>x>Ṛ 3,)杜!MU%`^x _|D9P@[9N#bN ux\!1ϯ.YsD~zc-֖Ŷ]Rd|dc!EOmYD$䃲'TW5=gD+T?^KB)9y-; GD׾<<ĞFMJ~6&Ȑl6e=V?anRʿա E*ad&|U$]5 4~ubR5\ELҙH>y"u&Ie4BSLԍ# 6ON/xg9^.6E^&iB+ Iy(S'Np+HU#Pepzqݪ& t`M4i3tf8dz/߀;CVOWM_];^=Q{o8Fry+`Þ6ˮ>|dHC4I|< O^WQ_oW 'u}8IǍEzH)P yt7BZ .CaW2ԝ=rHJ)|>j-Cx[""=y[k(P's nvwn0PKUJ½DQP;1BS[\R&/?;b;rg_<HW ~sv $/~yO뗅aL@ VpX~,()h@p&J <%mfO !젊3hy@8jAADF{/?fܮ $) ח;%jnYf(08DRB~NbsdbHq/s0}(/s[c6('fݗIł y:w;ȭwZ1m z8_Ũ6!Tѐ`=NxOuaRs77w$xMPJl<4pp :ɍd'4띄/h('$X؍IͨzsH>'#R8qfY/1kC{=|K6恊<"4O3}-u!Xe+CODڶаb7Y #4˻#dzO/MXe$[IA454 /_WXLD/WS}sc8ЕZ(oz/L|8a ~=0d8M (%zhM:J&FSAl֍\/Yn s%NG%,CV}~{Luq[ᣍ9Ywz ĥ]?Sأ򛑥4B[^'6Ϫ23ǭJǟ3W><|5l I$9m9OK$%tdS1J6RWrlgBZ#)1Ύ~, +B)˕)Tq-ƠUB#H\"@*q:@  1j4mj%:χӋ+Balxq%=DGӐVDdFuFɤy7:c EqN3DrAL.Pg_ޚ7j4쉪1`mY5lϯܮC}9_!Os5g P3Deϵwo](_JFw IDATCmWy/ k]'ɼ<,a^ !4hܐF%~fBPNԳʻܸ 5&)oTO@gȐѡL6E 魢6F8⽔wEW?Y>-MgMq8Z>x~VYCh fN92-uvs(5[Ô{F1/n-d}gXqA}i"1dZ_)Xk?gp9 r5}1 6}G0˛onڶZ>2|yqBdQA_z$zP^|L„@^,\c 4;N4z64w+{wzr2W M)fT7pX#QaFkV6DYoWB/(n4nׇ#iG``h$69Okim|yp]lpwߺpքLfC1|l7̦q+SjCBNPGncG*ա[ Q{I!E25V_3]K I%8V4[!0as'/OzmM p+ųc1$`p''[wds6~ mu]iqgRό4_KDʪi '";fv,N*U_^7 7 /̪C}g"WZ4T bybͶx~H]&&TPX ԝCFn)FyyݡCsail]׈-O1LLQFHB) '` mO7KPOP&W]nV~ s j2ɼ(XQD<ۖ=۞18 _zGa 7eܭvCRijBҝ=}aC^yݫfl3aF$E FO R% cx،}(` %za!J1S\7_[;`~h T3K1rRSc<0%:^x(Tza[3=&3FOU3dyO~SycϹRJ7s&}Vu0l{;I1( Ů?Kv>8YIfASQC S>8T(>͎JIK~{mK@9Ͽ}KSu ' k~I`Az+xPku? qBu97 C.SWj FHLg,XpݰheRK& 1;KoBܯG *(T҈k{36͍#%F 1=O>جV {<=L:#ARO`DԽ Rr`_=g Sr\ǶbUi I,3p4EpOAAK 0}optE:6>33koԤesO@&/T>/8@&yaaf5}E[HSU'N@囸zBwL 3skVHښ+m0u;~m}شf͇p"CuzBzJ٦=ve+/08{ &\CV]lF0yXgqY8HWK/ƭ¯Ry?V %ѥ"v`Ji}[nͥ{vպٺrYx{gˇl.e^>E!rA4!)G[߷z/,W' /߼&~Q>/0^QʂQ+Ɣl~o($í$S&%+|p~q|Eb /(yK+  '4B C) Cv+^Q;ߠ ȭbdQkan&q7 >XN4jӶ#$z5,.z6υk, 납UiKjQ/ (0*> mj=Cܔ/:޺!LDf"TM' ~ݽ)񲍾Y$֧]jOζk6LsЬ;qdjez')nԳs28aBNi8ZȐTeFhMo -JO8,->~76ӝy0 O;*(ݛ]j|i` _tܑ,\YQ8,%U恇BQԖDwL3?|FSoh I"yn):{+ ^u rq?6-~}Z͖sey0ӧxm쪌 l SDdq9)Q%4G9KR JϿy/@SH2"wͩD8i2ōeɈnRD4jp#,(z'_*Zo_XBQ_lެOLE adq_3k"Md_)Fn'4]oU %itm{U_-.MDȐ:4uބUD 48`].Qy]s;H<2@!J Ri@y74"5ѡ)Yfj%nccg pց>K|=r@i2L60~=xf̺(r`y05p>@Z3V@@CӠX##l1SR$y|tRQrZ+1@8z;N9Y{Ae8*iG#*!^Y&lui&zTyb[ i ֝vA:N@O05Jҍ62sЛ#mLN͡ɍtŨ*bmZ(e@縛ی|p_ɯSmG^ &U(@Jscgl8p~$':a&dY xhu]=6 ,X}pIu:Qn2B*l) >I٥>nN^\S0gE6}7zah>ŗBn۰ ;/xA4j En39%vy2da5Rm.uفVdil;XȥEǵݬn ci=k5브Ū&a/o9Tߧt2||qKmL5:|A<!FMx~NAK19(T\CVp ',ݿNcqk' =RʉeU7eMg *7fӷݨJ).JIr*l cw}\8A]mB?8_E)J4O5OH24X2S4}2w D|da=S49w?U)9|8ϯ6 6`|Myܭ-7Ry>Uq!ҋ}xEKh)[o!4#wܾcZmʊ `2FlƗo}Vd3 ;yMע')SNJgP([ៃj"Tϻ0ud:!c@=-w4q4|'tw.ECP`q@t04m.j# 6p<_9'߸'J};IV [ϐF ufw@r x |3X)JnY258,xQ OĚK˛n0ZӫE|$a/'jgLc|:yG5# ,`kB/VW2BxA807J&x Żx!` hu.ꆟJU7C!K T2u(`0KKYVOK'^yg ֛ WTPNiͧԍy3=sr9ŦL&6w_3>nZAհ+dPAHɶw;g]ʆ3ɬLԦn>,(l"[s^2^hfY!66ܿyu:G Kə?ڮS3mY7|7^$·) %`Pg_r]sL=m|4LDH]Ǚߝmo+g6FuM6-, <݉H9u01xF\/6kӭɣWq_0DTQ]ˀ^lz\r~;ma=(fD=ЋMr|BMDDDmK*aL)CfY+#Tto:7j 0Ļ7)o[龟ɌPCiͬ$;7+4m F;a!Ζ_d:(寣 D)il^`z4`%[ރ"ဣ'S y~0V=?mǂ&~6lL3Zw ]%iɲƒ VC0O(cn=qJQ&n>hCa/.rݗ(z/qtL..{'O]3 1@msK>%ۤ73ONbEh"߼6po^"3q e#Mi7CWr t'ъ{xە#$GiN|p~񜉶<,2X(&!lwG;Z"X' <:ʛmuz+(. /ox'}f)\tEb"ضwu0f/t7jj"/Oxy\(hSQ !bNdƷ?hRO K  3L[F2 ߎ̘hB^g]bһ}oJ~}1ta;^8{ʲtw/|^}(ɴgw+ S/Q#rR syvyGؾ>Pĭ|/ O`D1\l}aXyGuf#5P3@~V@ŵi**6( ^kVo_&%3?g@)VVo7*D;kśxRՅs(jL]b{vt>m'Hfq s-'W?<֍0*6,^NG` ҥU 8͖gLt;BJh> qSCN޾>\&=к2-^]\\7O%T._nWƈu9vzgZC+r @iW}\SͱZK I)euu#xNQ'O5N4}Ћ&Bʒ5ÈjS,NbNczO?o$Sެ yt8Kh~KlDZH%N_ ~cѧhjfJ$Wido(p{zw5!fop=xa`谲X͉,.kA"+Su`E a7a<Τ}|e ݝtuqP8yRF%^H9蒕Li͔qށe7'[L>ھ0gk|'Aqpyъul#oqnFg `r1= ZFbjg\㓆gYjkh蜶v$gO!eBMR )q2W7+ONm7W LJ4ZR 0H+"$S %mJ8&qertq0J>(A1Sc$uTV7}@}M7._p's'T7n $ӁUt<#U{Ix8"TF-oј1{LN#d!e_h9ZNOԚ#o#~..'bir|bMImI m_{ W5$!UeA y6V=||wD`0a*}8~J, 6 00"89~r1Y~IY[r'C ȚbZ-d)HUk|~g֨!tJe >7[4>޳"xUds)kKDu!,e/Gp.' oS %C>P*@)K IDAToUK<{N/>>18c;ʌ5xʈgNW˧~0U:MIe$8MfvnS1d@84Y,`/ D&-QyPag@-~ഽ?e,J9qE'bUު|<. '#.ǍR=KnMtg8N%`BeVYN3 _yG NMR>l8!@e4O3TrQma2JTB?߽}}X8Tijimϟ Spuc2ύv3'7NDUHӧa58A_~9V]4?pK懡xP,2l͗Pl8S:X}9W'=uJ+wmr<֐Һޜ$VB3#%d4`j/eqt#~8T 4L@FFɠ S.Ly>QB0Kk2 =\RA4ѥ4^|q: |1CmL(̔xڽ#$]* ><|Dofp/~ܩː7Ҡ&̩hz8Y2'&Gaƿzx\{ܝߩ)ջ,ꘊ}5̩lV.~<烍/ߞ F&Q @p fWf@$=: '(2KF & )2_qv].s^͠O34×6ߜMP%*XMqvIC5L<zAzݟ^ PًC5tH $ӋF g\pNP0_Hq'&!] lg ȉa#Vw0G>:y{t yE4h:Ff+h*"ao0[p} q BB;;$@arT$T¼8eyN;ۓF|C%\\}jQja! fg-"y+LgPɍw"g;B|}BWTN^?Cf{7E|0Q[J lq~^&UfulgwgTՂ:){dqHwe<7Gi;\}[({!Z ު˽f`ڸ?*.L){z0\g շ:uݛ97Dn`*)gy56}{g(F 4`i\(9b F2CqHfʺxo){|/?R9xkWo 8Kö2W ?{jbp8gLh$A?|qn+.L} Z3e6"[/?c>Bo~ض7jeNlz {\dK4! @ՆX3 lmf$KL4{xr6lhNO(3$S^xt<{Kcmw 5a3f"LԸSSˋP6zk|[73;[5 LqϞqH};=9 G4+ 9<4$l˝~&lշI\PEQYl_NNy,Wz=wS8wl0FN_{[iy*ܟj AIx_- $YC:|]a8N꽹LS4(@6dPxNk 7[N0GhpzrsyCrYO,_/1]Ɖ^O3ҋm[>bڷe/WZI`OIpoQfGmm4NA@=SB6曌V6!0mG+0V4BH6l|s{|*I,.P(tX炉HhfK?#р3K'2,gҀղ7'+˰ M3 Nw,DheࡪVViU>=tN9t(TwN65WFv}Y#LO #" (nQY`CHl wjTK!p@4Dn*'a%+Eql'Ϟp\ V"=Ґ]>ߝM>8L޶ڪbexyC62EmtτvV1bd6ޣ:{LxLӴ:bDj/*8V,@p &.Ǹ'!{rs2_x˷4LhGJÀ@0bdLu4=G"$0C2_nr2 e͹z]{<2VŚw;uEn˫7pI͐!hM4Br ?HP"5Ƚmc63b<͇y~,$ξ1`mۇbg7pmoNL&X~rbmd][FNG(.4 (ol|݃Awxض6~T$; &@YF߃Xxt8[L.maŘloM`f"yRxfv;LDRq}."RYm}]+tFn[W[?m"17S,V@aLwhlϯ|Ֆ%<'5ޔN /xȉSo9yp2T|5,<HxxdO%HںQNvzN&';gm'Iz.s.Dv쥐D,öYŴˉf{RYTGے":&2:n֜Om5`<]Cȓd&ANjo ӛ<&N7uoQwm^5I \ W3rQ0cw[ßubKj|Da>pa_l*0yvxy2;s+hq9ō42+g'J'PYKy֌|zm&=  Rdhyv"O$7Mb^8i=$;#Y(lMK;k(87W޹!NFԆ׋LP4nkge@r`^na~A"$0|Um݆7g]mx>4VEMن7'h!=K1| )1ULnILgrp[縀||ىW^A`^N/ϯU׻͆ѳ4շq"ya"y-ɍڸhA_f3l0$d7;}`>fxIzXk'AD~Aafh3^:mO*''m6m&+aYMF&J> ֍.}?ś- =5z#kE0V_#=(Z}]l;XÉ赌64N}}^)8cck톻mu!.='=.GǢ>#@YH1w0 D[~zyR %(йJ /H>7ںrI/ KxO<5x,3H B' I.ziFO?˃1UHL"OAAq:r>Q|$x6',z*D =3u76)@ɪ͢Eײ:o qxRW%ol|p?!GD \r%.Mm3Z4 L2vm6nIğfEFM}Ӡ1Y$eJGio<]lO ZN߶")> VeNqbzV5F^8l1`IiZg:1 {% H\~E7>/5x m/?AFO {@ 2͞fwV.Y`Y>9i ;YC8[7eP=m?1Rx}`K{f4@.y<;VzWZV n;?ѡ"getdW-8v;M0^]6 :IҸk.f2&P-#& V37>y> Ь x$8SBY!W760ej )??B+ي 0fjs@H}?}6x1l8s(Yr*gwk6JbxW[?w,Lxәd@1QT#H(smt8!% y ZŀM5/r:1f˃'ygNR@hNxvo)T#7ޱB}X)3ZIHdr\9[`V0] .fƳ; %jz`=oprs=01O+$y>ym&9{ݷnRpc!U>/̵Z8|[-AiY:HǓzXZcwݳx$`p$w YژO6Bgi3w Aymgٵ?OA)H"<8DJթ ^hWkҸ@/M6I4 byTzX=$FA8^RƱR=}F+CtքОWr#CUaݜz]I85<޸y^({yp lީcx5m ͰoX'aIok>hA,8y2b66X4)={ 76f Do].D4n2yэ"MO}0F S瀈[%J4M~!*?UEk=zdV!b){ D]b#Q1REGolovQy4h yFel 6/}+;m)&? _$nKbdjDgo;Y!):H2zKhv.wXM)0pi8K{!sʹ(K-3z y $SgS'?ǭIAipl_@HsàqWqK^[WNσo%$Xu1g~8si)d mTFl}Q1Pdmxhy]sSpz%E]4$  .mCJ$hM:[:ʀ^8N o 0L .\!2s)WEET1iT D} b f#hg._oeTÓA5f 4ZJ\IY@#Uጻ"FyJ͡ )TuVfHn딬8ְQuvۂS#s;^aS PCk')gc jU|x 2ϧWXb!8 R]>!]p\tǥrr Q? S!;z1-۳" aL u7N 궂NeugXt">._0Og've|rʜ S`I@b 8t.'!DVA(D dxGGjI=QJi;pw3>0j IDATmQŌ5+4уOt(F)iE'X}+.nשf)uMSЌ@ tѧL4"ifm&qr8hZ)r$YM'5 4^"3$zSOE!sx3p/qUdbnkܗ^5ڪ [Lq2|w>;|f2reHfO!fG 6 :oѣw5çnL0YS-DSnyłLhnN"v3Sf49  \on\4ˇ.m|H1me7fxPyc1OPf!`Se>`cL!(H?\ tpƆJI6Y8˳B-OGHbb3ܾvoLWDMҁMŶ!lL-O&n'Y) ; /f6/4> ;iWЖǓ\&2޳3i:c`+<))Ƅ?;fV%B'oLYt,4L^ĴIߗH_'J͡z,QAϽs0"g,:p˘ #Bz~KXa@ *X%'}fM -1kެ\lT|yCxdchJH酾?B%#4'q-op~xZY?q[{9MG3 $}`w"G ܌>D9Y I<_AȜwb-'˵ܠǧs3^R=~QYR3"$>hFnw@RAl0KTZ,IGNU+W/4& LǔpfMv$YޱdlPOq7wz=2-% ^w~zsrUXю~ƈÔ yco$&ЮtR]7JE3 ehd*ARfbxg. !Q_ :{y q |61giw/ YG <8^<0)R*mA$,ç|˻ja4i##h ʷH6#M;ӴMкS21l[(SEN~B &hQ\?뛯epЙ)W<|B\'66W/ @|L6]ԷLo߸)(PgP*Mgr.@40?'LلDrՃR%1n¨!XAϼpcb Xm>Edx2MXo:@ 9+H'C|81+gTw[]B{t[Luሴ&R̘>{2K$Ek<ɹSTz LV"P!j*XHM7[ 957[xTjģfHj Yi~nxO2\,"́a̻+Fn_QsN&[ jam\aN=[=Vz`C oŃv!nK=h!7Q'{w7$W_]/oͬ~lO3H<,pKF6e&yϬty/F/g/K<5}F$^mӅUӥzWuDꔸ`3D U3G\@@!+%τBꄢdzi'^d& ):M9dQ VfiIU6lOrgk*83k &ëwx?lI}]^0`~11y"HX:}-+r0<=#D1X~4gT;h+3;jsFM2bv6PEH]<]96g~C&hx]| *l%] Q0NG׹F'q0- _BA<#b|YMSA.b M,/q_OEB2/rvuyazPG-_n\Is8  &_% YMR913 dQ/Owk1u9vL8cBiLgU@yHKVGꆵ&vh5DƬ@4/I=ۆ5g>ijhH9Asm( ar26S(*l1%/O -+LuJ(@m~LUMLIK.nL'E h$Il0-)6*(0n .=9Ѕ:01-lrnYy}YdDIYXGNǹ ,d\51#TszE*7egJlxzAm%Wv7[Po C[m{Ju_V.+e~$/Ͽ5eqI\;W|su[lOsPe/o{1Zdh¸==V<3qo URrPބ 0ۇC;?ait;*jD6f;1dw+U8x8䋇uKsJIԮe?dɇ0C:LQzpfm2U7VWZ} d__uXs],ii㙝bJ6ǎl=&;Lh+Pp^o#4Q@5;qi~fVd$?`uߠ̓Y3/h9ОX38F@gAa"TZ/2jUw-$r=vSd iz |-1 f.qB '?_V~%p3!˚~K f6\ 0EaMHaIwӦU(3,,PwF b <1NCD9Tɋooh @PmHEdX$f-SrF,:~ٷ֨э|6T7gR:=s|/IFώgn:z1m_O+Ah@&:LH$ C|y'/" :J"| ^47,}yB3=&s7@ osmz<Xlos<6=`tv7Σ|Fhej5}|&LbUgح+?,ɯҦ@t89ncB+E|>Y\63_߭oegA8J{=g]f0a X^/`0aj8&U\Du[ H͂2]A'f =wmc'vxN$?HHUV^Hy9i"ZR{}qUYg#.ByZu/lq6V)V"HM@BFVn*z3g")&J 11;A藁j|qcaIA+ƑMg7bꔃ')mc$%u){Q씰<{rQ"yQ-Bד>+\QKdݬ1+cş.oI5K剎#Bbk( EÇg`10G a@i.<2xVɍ#d7R9t}w#ɷ꒫i,R 4 mUc-Ly+\ƅr#iԐL,EO~/yB5 !8-@i"tAWp@y9sri#> 2fa V b&0H8@.Gh%ID*$NfaVG*YyݮQ™2S6d۷@w~9e taW*~ bPBr#hQYtdjtxNŸ tÔ+|`U)y`0[ې)O)[O^rF|Lm[GC\_>Wlyx8rz^'oyR8q̻#dbNHӀނXSGOfN BFǟĬe:b\je<{xQ8W`~K;t1W.̉͸sU[6 7CÅFԾPJOK&;> ) 6N`)eul$We.зG1fGyGu0w᛿KpgrI$nۋ[ ݤ<T:)b:]ѓIeVACV͈T.8kHghl2g =a4=6< ;|}$lM /A"ՂlU J^𣼅1hBtv+t1g3u1q])M!F.Fޜ)ߛ+]| e12.[}_W{p'Ĵ.R= >nfu>8zHZ"ccr_%mJB0i rߟ@?Uy܀[|-M3 /ku"$Mo8`}:B/"^)sl?,/(|bUp ~_SyP4-qۉggtO")3^k57jL!lzI @zZ_)Z*mOk+ }D^MmO>Oz0dzs߰ yac`c6 97bЗHy95HEng0́?*M@r6N>HB#0|~zL[KpF[Mv:Pjpm6ږh{EoVOmlz+h8400 :0 T h^|x޷ w8 NB}Xۇ^ .{WbYmJ{ Wbk'4 =s A4y'ɦ}ZIAHpS7_0:bz^c);.gaQ)hTo$btWV' cj.C^<En ,q,g*/B_? nhbj&Cu0a5P9+Wѷ ZY3]irGQ/jO6{hՋaHO+ B֊Kxp֖ɉ,xI5dkz?÷.QhHl<3[$A@ujG_;iɺ)N-6 Ldzād҃ F@78:I8 fTS݄pK IDATe<̔)[{oҫMjآOX %5D>̊qGɶ j&ZeJzMgf}ܼ!YFӳ7MRB^Չ}*%"Yx9uۆ&C^_Cߡh"xJH8KV?V~e˿_$GٝTZJɬxDMV3Թ*ߤmڨz1HJ*אjr:_}cضDžVX\AA]ǖ>-ϻVxC|yw)j|] ppw9)^);'ۋ2c8 O?_VCo˂l\‰)aI 3h̀Tl"ЀZ{>(XDŽ􃪴mBL`GAbZp@(sMdm3qݿ"} I>[b[q{PͿ7)SȜSws"Q)J1s≴; $gB=J{e*Akucge7,yQC4-alS꼧r=[W_O5[g}Hl ew&\.ejrqo&2_> hIitrNrv,+茦@mYD ]F[Рf&G螉@:L8C7j@BvB|z|s"^Qo QA~26/h*"ЬRaGS(N(Z%z< <A{_o^5z IC,Onc%|>:PGĐo4d6&[Yp9=H:tye],N]<(IػGlxA|zZ]Vw[?G.qwg%=ì 2ޯwlxW}hP˛v+_81,6&$wj8a޷ ~OT gMJuL28mPHw D<}4ʁƁ4`݉yx&lV9 ҩ(|;Xwtzu[~(!ϿB1 PI21Sp?c,B|Pȇ o ިY8@8"XyRh|0b:fOwBNt`IZۆbxt}KULgZqz{D Pyu:`{$jAGSHkX7NJux<9u?BG. e:u&aLËS3fAhyz'~HD'_*P)Ř`I'֣; uCI Fq\Iuizp^{gweGh?(jHߍpBquT0%m:9^pp̾&zq":Q?O5!F<_ؙU.[=X9; [^FIe4E58f`6Q!Zy-t3 Ê,D^2-sUnTO! LHq@-ԸIҁV6lgSVbc. 01g22\ H˚bcg"kf~׷Ph0]+;1NzV7K`?stf6$cׂƆ Fcc`4- ;Z]q[;h[Y] }krucPLDcZ,bؤ&]_ I"~:x>t0ݎ.Ͱ&.a| Í!(}l3̊vTf1̩wVG>],tVs>:Bw 8%N<((pUU{R?E  i[OlY%A+2ͬ/4?u䒙4T{`#y="DdtD.TQͩ|xeuàYof|y{A@ܕ/w<9Ղ6ƃ&}u0Am]?~44|1y\f8k00v24 }ņ1 kyפ#<4/ƙ@3rPW[ɶqF/_G6<:?9Ā /֐ɽ&8ȍ^ݙ&!NcßMFJYds [NW| yӉ"~7RRfkTbǠB,t׫R1^-q♎<1t'E5ے[1c)ݍEq`}zЀ(oG8-̞o3q,#yOl2ϧ@:i<ٻܼs20ZxcXx~?Y֪4IҤȀ)5E:ã4G؁BI+^:[#hBF|&̒ib6 =KKSv#; 4(_-Iwxl *#ܖ6LN6}B[=׊m$]3kJG$(I}=G7ͶAXϔ֕[Gq1nn\[0@f5ϻEL :^R @9 | =fs:__9yY;憜Z?%/+H9s>o4әRúl7>Z1e&TGL 2N)+)ѰBEu&K_`CEmbqD&D)o CҪrtO}&> 9-fOW.sγdqT(,}D<P647Jl0qpW . sBcڦ>,+8 Vtֹry-bj!YrO2~?@Y׊mWNHLpF0 Iwxե^u[MqxInq'E y4"Znm;9 W ^f3 dD:jz?ΖW d__?s5i iY C 틩] bIcj?0ri3`]U.^VOxzprtyR`?I(&4ehPv1 \fzeBKŦ?/>D:P"1:΂y#Eg>`؉.W'( . IZ5ٷ3!2ᔭ" @W:gJyVci"AĕxfAs, !jkRp} a i΋_KdY 0F)P_^Nّ[1}GC?sbќ(. aUfX3s8aʢMyKSQA `hgz'RV |ϿUywєF͜.>%?[\槍 7<X]ɦ&z*/ fu}]l6jb_V 738o}Y3A]CGjϐ#F^OtPwP;HsܤշdɸFĬ Ȅ77Apr@)#?(M-?ͳ k@C5*KdؕY',z|oնϟYcī %L?i?I<ͦ;aٰEo hB)q= 0346θo837MP8CȖ'8u}@)%ʪ;31ϓe\g>dҥhZܼAg'K2fnҰTz[V>`}Z9.@_|zA!b(G8o .Wp'sڍ!OW|C^F(H@٥av-_ )zèp4$*݇t/%x#N Fʎzw<уbɓ@O\#ιug{ O/@@ߍ ),}4[gݵ>mY}ݬ|0[H7`(=nm;TqKPt̳{  L:^]FO6dno|l>蕻(}= d4"Ii\^Ykֱv w&3dԠ>`TFTMDֺYضŖ_*.X0+N3W|r*}sIC}ݡ{&Э_htjҶZѪŌl}c&L5JQK4e5 %CjCo]4'HSzD2VLӘ+Η7ʾnU`)P5"o8@6V+י:ŕH:$iIf]]|u@mRymńh$sL A ,'oPDq[|d< JސC/7[~m}E:q.c=PzFm0w#S+#:0~B ,Ɠ$wҍ-cvN܉c ugVENr5ϗA` t%"7*~P+ Ѓ@wy=RRK/Xm$&s9QV4cf\wЍ1貴Sjkq'IFvf_}VNLiFU ҧHYQ'Ff\ꈾ}L 'G q0Ϸ/Q#N3&(>tMcL8m0ͤd4R_]7ft ,_>('ˇk,m y?]#h!zGz79xr$ŋ) g[nB!Tleun^`L~& N"Y btb$>!(A&Ԡ#mV7G}]q9amU[d!fɸ'X<,W@_ß%D+Nl7)pB~՚EzCF+\qgR0h 3|Avx*鯦)-R:٫09$oaRn.nBz.Iu|s?q}93 g/?ZOyriAZ=eWq)_&~I%ZDzYe0aGLKCwዤm%.X\o]IoWΒpRTFf!'iԁy!E-j:gݬo1坐70Ƚ+Rݓ=^˛K&UݻYH݋}=w4&Fm2? JGp끍@IvR;`bV}U.`590A_I!_}a0xJ: .4{d@|n Ѭ|1XPpH"1)yvM)dBT1#aٙ޶ I~”]Vw8uoN\Z:'ңF)NB)@&-i_k1!$pA }쳘\(I?AH#L9>ͣE0 3(EspNlna0Rrؐ_?U{ 6Ku@< B{ J%OA> 52<*`H_rssʖl r)" 7Q̄ B[ qLc.C+SB/@j )[TU X.%@a!=hs2P@5m*^҇.D.:0T/ZK gq|>ߙpl#0ЈcӔռ[ ff|&{q-2:d0aPŞ& F h҇;''"M&A N!&@gu1$Ԑ:MԴp" Y )j nK+^u09iɧ 5,FI쒏x!"|j(E ٶx idaA}A*k`*ɣ\*;Xtax&Ǫ"Li54O MlWU`F~Wծ.甶,280wm_1׋3AQ~L/u_`~^Bp ڜʼ$ɕVӺ; /8$\LpOUmR@_B%/ !B Zp)yC c%i$, Re(YW U^:3^JeJgsFu E ^(Q+zߠH\ l3fJwLF5A$*MPɵ:yUs9m`  J_Vlf8|KX66ѕHiZs'frt6 i'g>2EBd r<{OF/E/#+ Y鄸Ɖn>_}g u`cIᶡs^ BOQ,ܾl{|7d֊ِ\n13O&߾P)4M0yE(y4Ē'Ӷ^ j-t+R/P"'C}ܑ# Iφސ'.5d^~F]|z0C \}enޛn{+eC |/'TSqmE!MQwRm!N>E V ")~G9Nͱ[8r hjr97L.ϡ̴*-L$gxTv=$&h8ֳi8o ?#e8 ‚:8={ǘgQ}dNQNrp2!~Vz`t| 5k |?'̤{،!RHg@vÅz&}#D{>p5 ABbCUWyvNQ~Eyw];i{@h<0P5ӳs3yms05ؙ/)q1b61½V^' u [^0HJC1%/c8iDD$fNrѶn~8nQf^*W-ҶWV` MmuH&$K C5e'H()M.߿;-4c )tJF|epP2"Ͳ(pi;b_ZCvٚ *ϓxێ|6NPPEg |B|5ZqW6&Aېu@~&axŜw]GT;R[یPҜt*Cʦ5Ly@>p!i}pz]ts#d4!USD4p[`,ENxg_np(,06&;҃M 1:@`ft*MԨ }tuM:DsqYGb6Eo^!jsdnFWM m`@eJfL[Nt.nO6l˖[ s3o?yT'INh9_7&o HNLImh UN3ejV1;raU2t8T~ .TdͥxbR%iJh# 4[!ۊAGjAC"BVOf'8bL|;3[uP%vz$cF|.VO(N6}ס[E֑pB`1lMIOΌ;LA3$:iO3zKi U,jX1#Qh^7, 4+*ɳΤ|(O{?çV uyZN'z>@̫Fd^mw? 2Xbm۶Y&=ypB>]m~ QN|g ,J񜓶QA}<7k!\tڧ`93ևqd4$,^[P~H 7:Xu}y5qX~qk=,Umf ~^#4_Y$ݼ(WE+[/Nt VXeb/Y[~SNϋ_»Zt8KE.9ʓIQ:E4SV{"#=0wU~k^hJfw]<=1,;&]N}V/b,_ެ aH^adHA5 E8o,;}It9c惛?5m4qvV_+^ɷ0\m,cyz%L&tlhf+Vl9D!^g`wk~P/63ȦnVk^'Ll搔b84Cp=[vT`Ea,i݄E40hz:O`󚕾BRd .-yll~Yty<ρϋE8\2M<(N,f?|5v.ހU޹Ԗd/~tiE2k)Az *irzXHHFGCa> #(WݞA3|GD˃b>)!YC\[mcvM& iI]H!F1>ĵ!3ru۟ZlSŔ̦ՋJx<Ǩj`KU_tڍJͧ*LaI]9U\޿\txHq4\|TpJK[_^7&x&4ӆ;A!9!9z[n`*66iw>hS8k <}tz @iȭXvjZ_em6l3}A |O!i,t%N5{o m7n8=>rck3F9&1@C4d*!>̷l&=ߓNΛ_p&HQ P-7k5"EgHWc'|VYţ"TLa$9Q+s +Oa-򐾭ϟ..a0үpY==0R Mr?yQ<8Fl{ VP{/0L I~PN>{>L:=&/p(mbR8ZZQL&]r'K@9զ˧ [cEiMg0Y[]B$a ➤, ߕT HqsOI,1a!^3S$pkdg?ݠ")cd;4HO4ͺ1F]B#D<ӷ &(U<ɛ|4Ҡ'rS5,T4EXcۜ$˙fk/ ﭸYS;('k`3kj"11M0GaA0!&H_Uu]xݺQD6.Kƃ_nj#1|')8A68^/8P* Rg(}aZ΍t(@Qf!RE̼:*G7/郐ryCk۶pteqs䉡I 4=1[E!z6rkUBNYP[hpe1{$h'al@'o{<x6J4tZGP ^4B/`@\Nn5rE#7ϻ8̙ݬ+Bl-L3P[ nAQqеJYI ~>_,=˥R_H10@qyprHf 뒊+c;7;HfWqMwKOHh?|0_2s S̳A^H].##Kȍy Mń&j[m)f>VϚHۭ |8ܙR_D2(^sm[-3sI0d6|bӷ%ar4IL84Dew)$ 4> F>22³< ]n_.t"K('7G34 _)#~#y{JBH=3zzfY>Vw6@v9}g&y4ԕ9,P"ӐaF4aLڬ1` ݟgRI8h*͡F)@*0 k>d VSBr+# $Lu(pMScVsd1A@z g/OAn}9<]/t1P c 琒v ,"6ʌ//|]sd!B-YӇ# ю]irBt~Nf:zMj25mSWDae/qšHl1r=s$?p5is<.7#sfk^aQTj鱐Oz^)Y -q,*3y|~Kc *ꗛ&bi>zzPs,c5vlnaAj>r4l3=={Ŷ fÉBi)/$,e L|ǐfwH/Ɍ ̃(Cyifj旿m<6}sD*̶0RR!*4 !M;;|uP'T!qtvJ>^,O#/$csU&nV 1Odw]a<^}P d:-%ݨ2XI?.L,$Sx8(EzzdJϔۖBI|̇L4ȄxbX$ʍ1䮐$߲GG.#:pt)n`/0 =]ߙ`cpym @T'$y IDATE"¬FqV6KKw ]{6}6#ѳnpd$D]ni$yêO&kEpVm~ek̫0/6LƭGRbHN))4ѧP;~0931Ø\jWio9'1 :zϹ1)A`4tUߪq/E:|EDP6 M6o,_D6uAq[6`dԔ6"HQS1&i\5='1| 0@6^2&&k?xP5]nf"HnwO p$i|M(8 R ojM<2OȊ8)<(B1mOz%rPL2@[låXw*?[У .UlNUf^;uX/p="]NXC)%|FT<(ܦ0)ǀ_ ^z0=>o~ae>m@fF =N3{eǖ%kG::*!h.:@ :4hHG7@!@B WtT"/fFcǡRܹVĜfeoM2?pCf^h%.o6i 7ώi{mz)GjȞ=+x`Y> 5_ǀDq_δ1}d*Bm~0 Eâq: P+' D_pXfJj,M>ywM36dTlb%M/% (gtBj! ]-χ+FP&s;K2qb i{G3gd36 kmϻ<* m9,Nc j188YLԭ~ $>ǡ?1{:ɷO!bZiVg<6͍O6k*NE1g4S+VUZ>R~8H,*j)vlYnk{Eĥ$<ׯp'. V%A[aփ9dA C9QCxuF!%a^N1,=[$d:EqЦA1E3EHȬxrrzR%1a#h8 ڙ`凑M6_f4x6;oAnv֪5zd4B{֑e~Z[UAD}HǏ4_#‡#g^cb$!ၔJi<0|4z֏W^}[ +fWUЩ.ρlBLo *f1SvwԲK?r6F( l|dh8.,'l^dRBLgbmx_;7}R'm,qrcN?7rBvE n]L ^&s28ѧSˋg&pW3had8E.NY{\hkʫI B"sf ͷ$= 378.ryk3Q;{'H˘/n4Q]4催 Td YHW!ECMƀHZ-.!ãY 5;=W+hvFCOc"/ =ET+D+lVVq[4=3^[8M_̋ڸ蜮W=Aqy7 "<︃JBf,2ϩF{ܴ\r=m9/Ob6RNU$sf.. E>Lmqgc|JWᐓu^#cĦbc`ŝMpkmq=Ҿl6Uc úȰGdԝ\ )bH,|K]ZHᜲz"4`!ښ5/ KnS^h#$=ÔcKL;_'s7Mb==RX\N#uwv H~\_W4ГikV n4$J4+)/w͑K/;@ӧnhI\oSNc@ 3P-T2n,g@^-RI̓ι%@J5:xʴ$ ;yـ'2b-DqϺOfQp BNӑٟDV )Yo]ˑ3uG~3^'Cۛv-xj;jX R1$b@&Px6eXǍպuy)s37 /ʼn_"hPzM p[ (u@t8Z>^ܟB 6sXs; T,$ O2@yP}Rz,.ݏҐ5b3{C RtԱTd ~6j* ސ'3(yze\y8\IEϒiSk7IM3Znb[׬ %SF/o=yğw#N{઴Hx>'B*kat@[j{1Pf. @+!]8g.Yhl{4'7߶ҨkJ(yR*LL 7K+~FdH^6)%'@G`ĝ觇N۾~!Ó *+ l] cݰSGci\oO4΋ŜlDxQ0cpEGKdzA)Ci@O|[2k }h fmwIsɀJ+Nz Xq .&<׭aSg&H^:.Ɲd)jQ>xZYm.CP%V_խ+{#A }:408i?ໜȢǣBS/z_!dʇig$$1 s Z˗Wa |DBpAр|` Ɋ~E"g:cEʋ< f&|~)q,Q?B(Qc>w `:L0U7@$M9x +C F=d!+jMH,C@ 0w !ࡦ.픗"2}6!P޵i=z#uL*D*O&NښoD3Axf[]N]4ҫ a9FkdN`Kp|>kʶR@f S_xuFnwa|aeAg(o&w$9C،l8s5hӕ̬ᢒZvHIBm a֮_.٨]6ՊgJؔ]o Iu$Ph kDʠ ?#Vh$zZγ oim$Mo5#<0|YEQ?bv û5b{!p/)[:a)J۞41ںKZ{lw.f0O[A%On~$twisrG:w! g62/lrv)z;,l{@BX`m|ut88r,'2M"ŞbI2!pA6K1g[_$4_ۇo} V<~C#{tiQǺ,KH,,]V.h&qN(廵X^s-]);"`6cA$B6LLΜ3`(lH2u{}\WQOh(,Z.'q;By0$F M~yJ]AJjچ9'dj]հ Osݤ \Φ5eyu߈n{֬Q 3 )ʕn ׷I'1A;}C}aHb8m iaw c'YP@O|Hz&iT Ik|fE١,$Db3\좛=o^VsW%Fo F >d:b3#wnO3OPu7 B=|xhVHW!1&iSڑřᥥŹ u9ыWsQ󏬝>5Vzpox86,N6\`65HwxrݺF±@gqur3/P R,/$e"D'φ)>@mCJ>ok-жZ]b) Vه,w&>!ӧ;ȁu9 ;zI1BPS`{jc&;9QYm#7H>$iZIu w amLK-N޸nD/@}КEdۥKқ oB$v΅Of (_ '܍OJcƌM!AMQ}[SWyH[ gN<}ZPV{KVKtvU:6"bጟ͌Q m|@ܾ93rDV ڏ'0̶ۧ! l+T2Bf5m|~ӄ2Zl}ޭno! ˨6 |.eka$*I^~k6{R| gl}WK?gƯ:Kc.FrYu)ˠ*5ڦC B|<0sl–{}"K=>i[DmtCzH[FsM e{7G41zo j@)tZl| yp&، (A=$.`YԊ2).Mv`!wڶpGl~13ZZLfxMΡޡ3%;Sy:3D9^= Q<ղ?k~PgX|Ci˷tt8< J$g( 1=kC;I4[Ni `*wb^9鰓]d1X $%K-k6h}%~ۗ֓buQ]JB+p = 3 vqiT>_m_Hsdݴ/-?W>j0OSɺ,<7,)N'` =bL4LgzF.g@kyYKa;s6'uNgpaq ՞H, 8PhW' !+>0`,٠]{?>B2М柁tP@,7O"XF(<kApq8t@-.o9zK8yxjj;n+=KV֗Ysd 7j"3$a_`ą48I9Xlv6EQ(iH;wݯ;A$%$!mLud}2zr@ &H\Ŧ?ˤH~V+/6+O[٬QR-sb2s0܊eJeuc@ɳЌ&Od -*3M-ͽi żLlxYYmA(K!wzت xnNa`V́Dv|r+Z,wB ӻq)p&lY]e%wܰEIQ}=p*@fY,??!glfirjEDxv ciixg rM80,uiQˤÿ2_v],[ w&fسQʺ3׎ Mk!=`EXNd^BFEQٜ\6hvn#;"ĘeY 3(7 Ct$*&7. l9 ;)xqYP1݄œ/[i+Kd2^`i&{yvt+KBenN֧zUx½'ʯg+"6\i<G!K*spCRWh;Mq4/K;jxt33 f+ˎd\ %J'jbٶN=^N+%du|ՍgھyAY@ZiȹἬؖۺXUŵޟnlnFpb@X^Pq̩3w3b</q.cRZNW"%@+T IDAT:BRӖ|#{eZ/^H)җI-/^`?'\ nQ<̧oՆɊ yNhӪ r4j4\^*ʶR"C0@=K"ڤ5ڋY >BY@ A#Ԓ(vy4iɪ@4dτ ;M7Lң8XzS#R6! 0=ۀ[}Y 늁LșC5] 3_'1Qab1'KY j8_jA<V g>:3,0Oolÿ#`Ul֖|qcma^Q{5t%:)hWlľ`DRC%3ZVo8`[T7 ߌ┊ӵgBg}h0srV֩Q, 9Dx֬n>xWZwE7H̨!q>׺4`vqH4@G^T2cXo-@xܵJ!^Jwb\ .c?67li<<LɛUIrһ]B}RǷwJiVnIQ&a24 ͹0muDL$oi'b"9-ni  .ऌ&/4.lKl'K>$wC"p.N钗Lk 6T>}-j]vYZn_D,V'F% K(3"&l 1 n+;}:v8q,7FfQ9ljDk;dG{) &=P4 €}x ph\ (L#82D"ϪإQ $ ui4KžIi"ao3nI҆ ߉==? _&\7n Jnz\" .0007ʰ&p[Y}40>3fJ-^(hmv!S/+VJ$|.tW`0=$w|{,N'eV:``~F`J}dֲN9]hh>ThbxW]j=y ۺ60FHFJ`<e(HsAθ 5ޭ7FN|}g0kriOtuu[}mnxS,xhTM)pWgJ&љm#,CsQu*BkץO}7#IǠ-|s ΝƄQyS tqBEtb9& #Jl¬.]SNHbBT(} 4?bㅅGm8YL\is5G d+ԈH]NDye0f8{n uPbd ؽ?iHE%glVj ̂4ldYORN  qaºMi#- F7U)6 v3sz8zvșOX4N;,'\zᵣéT?NDfQ4/1Q2{Ђ_N1D Pf"ocq) $>eީmgNF^YyX+VD]>l{=<U^m]'6"ɗ q1.8x8bƷ7S߅3s.WE{`X/0P k]Q/xﺇ.(֠`٤YDE\yT}{(Y܋U'L<ЋS6, жutozV!qecj/1ptR# J|'/KEtOkFGrl|*LN3s1rU+`N42:0ȉLםu=|TKuL,xa$e"X4 c(Zu7GNpǁ 1VŻfnhӊ1ֶ; fHfD*o=UVדZRQ0mmp@<)~Hz203r`)O6 9 xMy~8}Q`ӾhӄGHi=L4r m01 &QPeJq\oфv{ShP%h̫h;Z5FlPFɧLe~dN~mb>Knϡ:"Zz8k>)c/,3R2V^w7u6i*0pAPl'i_D' z-ݻheK)fg7o6 g{<!=`sgrGd=J>6B"$FUzrP(FԄ;UM+W+j&?w/H_uf4`q:Zbd(ٛ=q٪nзmXC_']5N>8|Tm7Х*)M B n@l^RFʛ8v"Id Iչ#'f9MHYaߗg10Ls5`> ߴ!XGᷢ =2Ʀw5%Nw"HPI)K.NGɩK `5IÓ' e]+VjF*h>_{6C` 6;|{>f+BSiFqE9Vڙ枾Vaq-Wu2Rn0>X~G k2cTx8aOR>y.cQ균#+ =[1Qۃ2 @Sw%b*43Nn'>߷| 2JI1x _@XV %9qEJP,}ty>7TPOLBzƗhBb{R<2z6 ^̸֝QxKZDه<%8›\F:^:`fq:(eH]g`=P)!kHzW^l#r-D搛5yGզ=Pq8r9.["2KyH5DJ1U*@\ܭ7M`=:vӡѦ0G"]+W&v-4 w3^l;ʭh*RZY \ڴHAa8}:py)~FM֚u۠NN9svT(qj<>76V7`"1|tX 1N!>\vK',1nc6w|)͏M:_aOZaxRk7#Paӏӑr*YY7f=H6V|g*B}b$րM ZpI+LwxExaH0w B J-t8rbwO+&􍛲en[qcv^;N6}pKۺ@2p*\_ 3gZ[^7G75|Kd3uWNYdv˷k~r\6W+kF{sB˹ 3bʶ=,,`]aIXdfm[1y<,_ѐ_w Ȟ2BןeRJTQ&צǐneFr,yDĦ K!\j(dMYWٹn2Š%Rt3V) x 8J6+@uNVKxֹEUIۛB:H],,Crf CHNM*'*e!&Ks7A)ΤEՔK^kø>52`K.Lvz^ ˆѳ2 |&(4dhk]ObYjˋeh9ۡ>ݳ"GS<._G6Jmn֡xJ)ov!Y!tψ ~wgd'{tɈȡᜪqt1 oJX`Dy㐦FN.bT0|IhV8ɧExѠ DC:9Svh|Z&\ȍXgv>_ȸˣV(aQ!o<#\ 62 򼜲qeMI/[zBؚ_Jq"1N *r3jN@D>kyۂؔ1= }BncLJ!]@O.4Wz4gkd;yŇޔihү7|@K֪evicU0RԾk2]r@ӈ L D,D҅,[H L=ů&!$k [NWqEM;9\~cB(ZXa^=؞wJk:g̿dp^|xېv&_NQuz]A0JM>Z= L.TCoPj&lpt8la I} i`!Gh3kazd+ W⩵ D|+Z0WjF^7i 2#ⶓX .k SڣXKWl]&uyէ{ip}-.]Y整eUJTÈ[xZw/C&_H<Ϻ|{j)X~ z몟dN)؃-f+?YNEk杸D4pyUk@c(Hθ T%tߞ$:KLjVD~=BU?X8(e=I4Ήa!ࢹk@ iI-߸!l%IkƉ>M^ۊHLB d(iNl ٓuVKTG,6nՖ<=<@? ;!MAlSsJ$Cz>gޘ٥ub#WxĀyG9y!($0bW( oCN^NkiGvZm3[$d뗣l4u>eaF`3 oйTd*>b  Ȕ`ir=n@@c0XJfZ5L_km?` mWhғ%*>AV2/m/,GfR$%Q ~}-&tF;Gin&#7\xBH`* 9ljr o.]y7lkBЦ̶Wq&`tAaۉnwRːO~jx*%N eƂ6nlh>\9礿ҌݶϵGRFZ>%4n)gz/ ,/ŐHᛢisIeHY+yY'z-3;%h/F2HΏoKTVm5л"zgO+_}~@_;I~N<Ȏ+0EsPl1KZ(GoZ%v˓ݧD=)3%/zPp:)2tGñj)gL$إ_n1B0FwefV- H-':=Ј0Ku†(`):H:qciB&0D*&evdkիuL+0&ĕDEӳ7QލPIOVڶ 27Q$pH˜~ISH$Y&#e}dn{ts_^~(+kGʃ f8ߍ9L uS擧 ӂrXyђ׸z](ltmu:_8Pe* 57* ` Լю)%hĹ㙈̓a(L>pH,juYo/taA1P xK[[8\aZ \[5h5ͥKԝU^ @ NE0 ߮e$0epV6Lփ$цM}2in,N'l,/C]{;/l8_:GA4.V3'"˕?G! J@ %q1)Yr|Z>^,1ʺ )).ikGyKHzO˓1HydaoN| ܐ N3@$VgVm5%W+=?pXS=#> m1溠Y_WbL<:QoEu}?PN 4?M;T'R(+ꇧEJy;ylX^]ʥu'$5χ3bN/G uUL!*&}NV8sky2f+J~Df!}m2OXCH5 sRјm_>!Ϩ?tdMz"C|<}qx៎g**P|ʬ!'wm$kC2߱޿:\Tsm[1 N=(MaTCļȌf1x''VQ`_8Ѐ`~j' IDATHCq< <~I%ྟq|XZ:]2c4]8b=<4nnbUR$Hbhttk_m{,L/+ B7JO!CGxrZ&_ǾN=0-2ȉ XrwXQ#SUe7nL\Nذ&L[ iyrttL=˩k=8鴶 5(fevс9Ҷ<`Myip"BVLrIҡ%|-$\_BKllO5ma6.F˗wi"9*m%@ =vBAH3sޓ]YtTyƆ7~sisj\btchj%Yp:59ʾ՝zef< qZ6ˇ3h j:FNK [IxatBHFJt~ӱ!3/'`UC(Id|*1߭l> .o= <'槅ZrS~YcX]݀q3"|2T]=ܓYEms)Pݗ]#7oV6^lJꍺ0~ yccl-М$uYmχO2NؐMDARP6Qżf|u߂2@# l\<]f Cн ^ģy1lOn1H trd``*d/̔jY )P[ E z70>S`l@Z-?5!8.͍49[:]>xEغxf7_fgc>Z-?<<c[M" N‚ٔjuYH69(bij 2ps f*I{ȉ*A3%c0dIi[2M/wIE}ʺלQɣسXlV%q?4ʉiT׏o.WJ\tɴyˊ\"\|8p4FseEX6)QNr0$y36=G8e2?m}!e?vԦaXָǓSmWy>I8P|e9;8N~xųŒէoVZ, C O8nlmF'v&x^TS1{-[n_M Cf.=9xӲl'SStiLb/PYlgځҧrN OIVq5\@ zo)jrTz]6%ن*H>0as_6p'']iȚ(otqss^")`'ˋz oDӊ&pmw'm*Ialmgl33pSSi6֚|MʕBgLF(WvAڬZ4 t(0Q.PeIK꓂=g:8b 0 hNw(4N;Fy:W4T29~@D6_ G99эV)wÃ4cs4},V-߰F=P*04yai| j(5*D:;.6biN~JTD]-+ t 9JW_i{dQBndçmKPŅ9gG܌ǐG4׋)͂`j[Y4&Zւ~ |D)KFS3~O7(|煝. `aEkQ1+w?߱RPଲExSʁV<;yC6=v.zf//lmKi:̚ղveӎVp-ݷpry{`6\i\=D'ИnZϨ)J>FA:J6<{]x aa?|5!L財</=Ut1NHhtkd48%KY" /P0Q./vwk8v}]ŵ!lQmJVG zT abu_W]uϬ2}Hɓ_cL&>^ޜu)DO7=Kߞyt|0.(*69p{nmHj SR,W{V) dl.3IL\ߠ%_*|H`}c!c,i.'Lۻw My!n6NjK 5%b>D:YgU)?BZi)d]^z}Q0a>XժAeɑ),$aDS}ꁎl#zDozÍDuY8^(jWnVrݯ)2!e7Eܨm| ]^NJutfE6wNZE̍p];R'A\ك;XY>]mv SrQ: E* ' oK$|iF~>=Vj:ξRbW/p[qwS*3gg})=#;#ՁZ_xKP7\߱ BN6y fyҫޤmh @>6p^߰j\IJ6t*};}?Pqr Qyq_sBcؤeAF݋8qcۨ|]bN':'7>1֖^q.c8d'̓3;]28Kd;n@M,H5Qn[" M+ /ł۶ >5z/u "^mL7ɸl"@OeFly;T)W.9u?UL 2`;,߼D&CCȇ)j?`"=KV؞LPxr@\Fh> fx!Xz^qf'\ s`dOc16:8xH[bO@)R\vG:@]>. С)E"\'Rsf9(zxNr̡{m(gVFTqr1<ԧi!f5@M DDDEَU 4ְtu<,IXSvBy"e.&|&tvyO(doEK\b|R:r/27y<,Ξɓ~xȟx2?,e&$|z6? c#ɲ6P>m7d uMtowײ"IwG2yXAо㯭 Anf-A8^p藷lP#q)єԐ%F]bW<BF\x]ge zuOѩ2]{e?5y)M@w& ą]bw/LiwL\-s#)l&0lg'8K;/dͬs'(6^?8(|x9tKOk\֬T꺭Ceb=?%&ȑ~tId`= Rjo8-@!zv}<{B33~,>ѤLk$\VRkS8 gDm̤ha` GDSݼ{Szxscw-~nf>ʳ(@ɦIV<Ȱ nU"}DIEw!@J~;&vy{@*9"2|QAms *PTI6O=U*uYv٥h|IN9n yx`ZBgwR(4ׇiKVqo%gZ,( 3+[흦!B6NhixB@tw]"B馭~0+[C ,4| 㒛l߈LKFu8)sYB=o$`!%Ӭ:_,j7ZbҬCqJ4+ӼӲO޿ [!?g#c|V' $)Ս|ϟW@cMw:!ـ39շ‘ 7z8t$_(h5g_٤;}ǛD&.W:Ƅh;ypD5O-WC 5%. LQe_dwV+m KTZ77z4?cʪab_qggD'27 ŦƐɘ Q{)[=yp@n_l/,' $wohљaK ԯgOۂ^s X!3cF@B"js?^ #>y]C|F(.1feC6 pMl5ɟEF2"R J#%@0n.13.WPhgJPg@9 ;t&e!bی:vbMAh3d а{RMdjl}b;|Zy>欼Olwbe9r>㏿} pዘ([q(ǦaЗM0}YZcȃi#g~EAR{m}nߡQ8Zn+CF5PiuppyYpDpϋ43*=M4Ǔp{8ϖ/o&]\Ry->9Lg$ 9e |Y4{L g!_6xaUY(Tk^C7:ѪL Nauie_X. ms3n 0c|jj#ͭݣɿ4bf18jxoֿဦI/T4ޘ61lwj_g15wiЊtS?.$Or2I[S7g6-I0e=Yx;5kfmFkAf5:8C܄)ӺugH٦vXt`PQfĞF GGӢ y,iw.tNVm_f,Eje$u~!o]z %]ejň}sDh\yAfiec}[!l)9QagB;b _D9;l\U{ræD!gAx^L;khhcp1a!b3K3wkϵne)y?gW|Tty>,}5 5˓ɳ` NuٻٷF}]^>S*%n!{m<%Q`&?'0Hy;r8p~-$6=eXf22}]x't3p~iziou3)B #t T'Fȧ: rS&aهy:0-y.&wlVbW^(U_ymߨ @`H<|ϥ|YeQ~9/}YE(87q/5'"}@qꌇr+'izV:@q8_\YGNHB8ϯ<4eEAWgЏYs8`*Z槓zO8t nFŗtf$DnǑ >؜Y.3GB#&PuN#bo%YTL4'&ӂ&]ގ] L7UgB&olZwѩ'  /(К0U:YN=썅#d͋ƶ<`f=Ju(L$K\) 00RnL&fB3':́#rN 9O1g}r ^ ř&gI]k"R ݲ!I_+ŖϿYwJRMvbA&?o\fArx&AՈj"MF@4iMI=|&ߴhJ٣*ZPB T\OIƟ IDATL1fIr, ޒѷ's8mt)4!a9Dl&@ND|y#Ql¶v|hC!Ƣ eK<y(xn/hN%vTfyl=+dI&OAlJ-$} _XkK![ne8s:!e+y&ٟdZ >z%N\~%mato !}#Z{pgBH[F Mmdx<4@ll{ ap|,/[_ n]BM= aB/kw=q,*>&~%p)f`KF7J9i /;D-MLc`-+jR5p7l7@%YԶ.c͝{*\!af77o7)b̤N.]Vd].M~.aЖ^qoi-no[|\m,l#l*2#٩rLi>B'No?TD7=֕T9 :Q1{mo3l !oWb#lsյtl&W\8|vm`VK'Y>ab4`xT2 MѤ0z#90mV>FbGy&"$,UׂBD骒Hkɛpւփ؈4+ȵ06/42Hv[b %e9zgacNDQ&TLLs4K@}\x*Q2x)v+z\Qb p'?di)/qg.)ĕ4bv5M_S}%iZ'Y,s4"}ni:T䝒X/{zk>5YQ0j$&"S׳aW(tlt e1?i8 L3HP*S&ȧ%R[DC#yXkSzaBg\x)T5JC'ZX8"I/ 5ϗbsq1p֦b|Z_?ΰ3:IOjoPQ~A H({eo(\ "|\X./jC˴tYX95n6{xp;`Q߁CۡbF V+t.7]/AkI [dl X%3*R؅sh6{ Ѽ.@dGZloP= f)s#jbYpgaX& UklX,a*A"7N<LZsFol6x9q3T=p{r@fG a>gAr 5eد8(s#nwMPmv̜ zfA&#<pRh!P&xt4^t呖5 0蔑t*䑮C!qCɴ![ дKҫ p(i 7M\N i8 ۽ & gll4>yf:ŀ2/|rPNGAW%O7:])db$BbvK HV[gʔIPmgHjf. LͲm/lgƫk. $󇖔i$sZj$4>m5Pr< *4XSF6daZm}#y5l&ƋIm*jQy.-S[ِ1QGxbjդ.4W[s(7 ᭬pAP14/ J{HQeoWpJc)"f~+qm~,Erڽ4L[KF 8ͧ'i ~Z+L,nehRόGDA js%wi .n =X`H h FR$ zT8z߉WK>|9A-O5.V[UV{Y $M,B-M6/L&?ݞJC`s^vL[#Ud R,Vm>ZꦠRÂ<σi'v\\%.W[gNԪ+BZć nQt%L`.Q"i֖ʇ{xעP!.Z5]NV$N!>xp@:_(sH(*]0=nRB%^I +7 " Lf|äfT-920Dj1'&FR/ix G4y(%)x? u醐~I&Ro;&*U҆͊DM]^ 0ZY.2hc/Sə,ɱ:rNE"iѾ#a5^sTcX2$f[idDyN-nI?- K"ϖ|9@ig ` iryD.Xl0}z^Q:A2.'(Wi_U 6va3"n0`)}K*5? )t1: 6'^:LL_sMw6(i^hb? )(MqiC ')^gfN"0P$0PUs3j4^_YRZjz:mP~*ZIRTøZvf&OhƋuIBlEB+4-1){py1Oll>>|ԛݍ].La=Z#t+ Ћ,~Bkg*O-mDstc\%m05{y 3MN%;hxJū7|O*/UQPp |۠ 376"8 mKYOg'UJDp"9SDޞMj<TMͱQBG<]\<ײRimygw)O^gj`oMbg[ڦS3Π9!yB4kt-xRy9a>[zlE-'uM #e >M.Ja@P둧p#2/QT 2ulHC2=2h}pMU3t* ~/d%2eAXo#1C/ׅۛt:ȴJʊGg4345CS/ՏLUF$/r7WfFh#b#x^nh+-~/oAZ!xWk:$IF e< N'̗y0<8?F**?zE|U4ޣj}gN'<{O>?)ƻ;L?ODT*JpYh& 0]ot4i1́24)x T>0 ΓmjlwBxhU2h0<|p r 5{֟i : 'ަ W!"kl-T-Ջ AWaf:^ Z>WʪT9ˢuD ĈڴH糼-@ n.՗ڤW^z`{)xCOM%3OQfzX!jMIY tbV&88h2my<ךCPmؑDo;6 c^>VCd64V( 1nĝkk&{ЮdCMijkRr r1P)"3RC<`V쮐Š i>͋nq8L<_j#BYi|L }f]b/v+#Aju/H-C?U: GҲV)Jve[YdF-ƺ,P4m!bǃ͛f3A$84yFXo鿀mL>/p懒";#RX'wL4&XbL S bͪ"@L3 iEQ+)N5 nUA_ pꆽxv!:Tx@GJ(vϾ(M^pRd8C(8q]GSZ5Suʐft-%Åo{jkZ)"67yϭAKzesIa!LI ܌%c{-ơTGy^2~IGŪGvw[t4qB{4Kiqó|?#L؆zwDNpoR?hBA'\D7H `-nv#?|!?wmIRq-iP%&i fӂY6q1 ?{*^<EDh{\gYDTՒɌ$fѴ7/E`\'ggRPlݰdld&J?bBӠ5V׫64| AŗPVXXpˆ 5{ $n/EcC]]*!F-.zz3i7pL4~L"E1,9Nt۾[yëhXTԙ)Bӽ41X?]vIQ)+,B:VI%g6CYBFk|j$"ءh=&EQ\fv8IEɢ]H1**BhQ~YJ&.:Ge#8Knct%Ԋ %K KlWٌq[m6sjvV*!BR6)4ko:q8e!TʇN G8D0Q<1DțuW)-P*Py9U E7Q6@vSu%E3*Dt [>1iZ*G޿r1Zjx1Tr;PCC'd~|sbCyAY%K'TssDX鼇V/(6`b,l4{:M [WC"{%% p#ruad[$7'^dsnnEg~GE>(˂n}AcDވVnZFSb4Pf&wHpLK #@,S>%єL-ѪX}/ZQx3'\>KtyZ N[zWp1T ' ȢJ+`R; MfulbjL@:&=\)p]/#u#BbMcf$9( -hHo[fw"3uz4ِ8deʀZfGNy uV4%LԊfooq֏`K<|-Mq*y18~lL3w;! IDATQr|:!7ogb_RGv'lo$wm w[F/J])&'[Q4o~eܼ.n| ~#/ko Ɯ}?c2/*D`QʔUg5BVM R)0VvF{/LgJ&זΛ/'KFultup"E>iD)jsִ !ܭ$+D4=̟5Sap%d1k*w!'.ɅkV*݊$3^DіtGE61b|DB6dvT fWbl)qf.ZTK{$+Q(4-*޵vժMZ VWb+Vv&h(p-[ZJg_v /NR(iȪr5@ 9QkJxF3*PA>Cw'`1g "ATŏ dt g>%LnAmbng ǿWj$:x1>ba5N$;RKBB|N'@J˕R8QqZK@ F,00*4n%>fw#XEW"V(9xVDž։4^a8p%t>D5mTY8 (Pr^h f ^:eE yY< @F%"gKIE&7 0&1wT`.]!1 EkJjdEi ֡`):d|=zƎ:N`I#Tz?|+hv7-6HE."*TYuisK }L}gږI'Inr]hMI5@epӠnQt0)q|[)X^L쨕^[2nW0lB>kR}h/MJrang-=.={S稓R<& C:JDĖ>)a: KWt/z7{!krj_W x9]hqȺ' ըm*ӀZa1ow}?^_{m|sҞ'.~~ o$Ǒ:_z?H; g1̧aC R*eYY2gtrm҈V҃~-5YULHm{Bۛ:nh.~;Qs'+RT95%B6Ho Ϛh[& :قkk)B$z,['Kz)e9\pᐥ&09Yѥ1R͡_[9 %QϜ3\)Zn:vc~.E=u%"MG_< 7L8|'pjVOe[TA3ײ)Q@}N|kP!GN|y OA5>>'}/PW'ȰBhl뭬8%iD}0S՜N:pÝ6۽up>5^$U. W(fzlED- I-W(Y/E{gCaFW͗>Q{ Jއ+~tdi)=cv2 v!Vsb`Ir!3iYD34(nos?_o|?x~v2쟚~'KB{/y&.E6zx[ܼ6?y-^{ /v=G| _},X}?nMH$87k(5gA/xI}V%˧?iC{y B m I֜"TO4_!B9?Qd-\jXj=4@ZұyhF4 ;']}lF.&MzѣR1m1NmqVK5N*ube\8z,7Ai&jjfRlHJpSat^~E{g4G Ze%tIϢЯ,Jgx'^'-4Lm' r9JGd gӯF4EXu:CGj0}_h abd6%Rt'`0#n2zԊf8Mqw#䗄0у^ELWT9<l8 Ng SNVr^m;HgY-<5H!׬L3$KrStqJ7"cmsV˗#\;omCJd0b zEf!* [ě;OwDz ss,*j\uZ #4hiv60Q~GBdU1#f1t-*~-y/ܢ֙'։ePLS.&.ʠ/*2Z=cUҨ-LJ `%\6ߚ%[r{5u^2B9 ]Yܔyn%w ]hv7 @Lj V QNBB"倸޲8~sJHnD.j,f-i.0jf[g'YsIp.▌2N,+~?S΃^~|uY''%MH)Ѱ,[<59 ZRs{ W#0>{?W|7Oկ_*{M3_"~w_8;?xk_[onn[Ljp$9g 0xħO~C|wH@5y!+Ɨ/i$N Od"W+iѸ2,BYf|L#͆Lv(WɣQB@p- "ɬ+0: 8r! 9OKސdz[3ȣ 1)}zC2ۣT#LIM4 M(&M9/qHt"Hݸ|w[aC)dv@`El'\w;Ս-:e vL5AfFSh*pJr#m j BNj]IvFfB[W;Gג[$A2zL m<ﵔfKhszn uP6[s =g8xQ'-3Qs2z5:_O֗y$8 5ݼV7ll].[2.Q2HDA#A F9^ ApEYM<[T#4J%Y>DtW?7,x6?vvy%hzuүlv2Ḛp*b*2*WEw#wo}}~8 ^_~U|-7?/Ǐqݢ)fetmӠk[lW+8Dr5b "͸{Κ&51fH./dm%8[ [ܚ\$ϸ~%DjC;aT@>ׁ(j yAiV[vi|\iE=w3Is,!'L;6SJ*!s>{@Q&Dux^k!rk"aIjeia|O9QDn2DU Y$퍁Q~(QS[yz{uÆDGĎgOf2v /vBCS=Hd B$cjYL :To9 u3187n4K "mwrh٦]j.W1Ն:b& fRC&b:McEƒa$!͂ޥtW-ͻ6[1I:QV.p^%!qeScq;-W]/],ypTqxA:-YS)Mv^K%g8c b'Zkmފkx%^[+ggzQw#ؠytdS?\;O׾-|7ǟ~VLbZQrHW)֊BxKP >8z} 4e YN6-,jV`Mj/2rY-f^/WH/dk9X  dk.B^i0]-;+G{ Af4N3%6R_Bэ'H0qcTGUMkF{AH*:f34e;H0Z[\Y1+v(͓ xY.9J"WYKa:̇; O5IYM8ugҟtJ!gW9Ad|* a]Κt9KzHA߯(? h=j&~eR$ LV?^ҍQsW\$aBf5)oɽxK4dzg[Y" $(ax&m5B dk|в$P Ӽϭ%ODWR™$XBï~A "Zed;BՇ!]ONr ń*E|abC(4۟Y+gg kfz޴. n$6e tL?4.bd3HɟH1"+ l4`7nqp,ࢢ^޲s"$P<%2J{柛clB aO|>YHd)A42dγȿxg[nV':3 f%#H"A//\Ko:a)bRcG_a+[΃qUW삤"Ȗ*R"ϫ0O>h;opHMch|92gAi$*3 \Ʈ)9XjcC]46n!v{# ϋCWFV/I2_`d<Bw1[G /tpW~ $hWz.7@.TJ-\2" Fſ?GAT8d&H21k$@So/'\giӼTI.p. O3>o8gٟşz}|eտW|n̵au8^оjɶe'!p n,1"tń3\52%5eQ ՘]%\[\|PBI&+C-ؼ ;dI,Kz(0(Yf.: ^=W ݢh#yŦ`JP VaH= VkqS\h,WЍc8Hvi93owd̀|<#&[ F*3N Q~ϪC9PcE|t{m̤n4(K|r4P _w޶b^J-{s`pyftyiH+sdC![%Mq/kaM*항xsfU-9g^@i`%譈_Kx e3녮FzS7F&r 8X#QHA{ʤa7VkAв07 {@͆]jR=Q>Z;o9]" oP IDATB~z)4g @_cMLEFPh!%%eh7}/e8Ŷ4Ih=^lȬ^T|7fdz) ~BPCoaj8G h;8qfP Hќ 0sPVs2o|&nt:ۼ+I,2Ͱ\ 5eޕ RMQM3 Ea?֠NH6C`2ei7q :|heWk7, Ԝ/J#7[T w{f:1(/VM9\'ڒLi* @S7-*/YQhL]rU,ĝV ͒J]ƋiUAŠz7\2Q|4B \3҅v_‚ϒ:3 /91TK;rߑhA=\ݻ1o\mcX U<~`zw@pR Qh;τd%\!nw9~mck?7Έ_t@끿{<-%hx~\N2b# ӳ-]Cv=5+*U,_q ~q.YXP{|x_+b+KH1=eQwR HJZ$Yr(94W$ WdsWk9i)CW)U Fu㡑v6UD^zf5m^#ҔzVTz:1˪_ϴ4[E%+tR@kVW2qMTa[KA*.,J?iLE^t1`2QQJ3|y0DZg]ϰǼlnx_-fHdRVed;/^⍮Z/BKĨ|>2"O"A&zؿ;i`Xiq+ };-ă|/'iUh-"Ysќ,]j݊jzxH9qc TBd4fɏӑ`y9cRW,3uS[zgkZnEv4R"rBQ t48kV#wMdK(z,k}b*Q~ɥsl-LQ׾4\O:*I,Ϡ\ gdEUɺ@Kl՜lw6I$Ѿ;X᭒j6CBOl -] q e=v7?{I^ȵd't>LV=PhVFjvkP%NxRDžd7'1?C唐3s;׾e_u$HDHp-vAh4 ~ x%\1DE3y< d'̗ 4!Θ5SxxDadBțNfUsWZqݸwVɴ̲fEQ h*t- Aͺ|83%N6КO8],\ItTlolk` s~ nu WS53G2 3IBci`hmRNY y32FN%KLTZD^kګPޤ}0koa,E9☓$I zb@al Yp2 ))$|:,П 럇H%$ pl*:9XؘBTG#$gЙS`ŅVh>9,~rJpL0^RhFt  叵T#\q4Z-*,^"`^% )iiV8="69tvb_έjh`$~}Pm`{t\ʶl>%0 @`3Nf*Vxn_Ks_%- KqS_u=wv h:BN= Pe%00= B|lf#qn-p'FU5@lWG\m.G %p|Эd$ŷZtV&Zghfg{TWMr%Pw*jtL3pLiՋU% iB3LBs|f2x^_Spí|q+U=ƿ}-|`-7ԛ/|?kLSA4]q/n'|>JZz dI녓r;pZ0&ꘫ[™4.'6(?`u8q1b].wӄf?/Gʏ(~0>˯Y-Ff%i r5Z$X!FqP3V?u<qvucZaumA8I-R镩 "13qeq'Y5ւȴziar|9RQl$tE"-;`ឈg ̠1i7[:ė !0C7a~ôqJF74=&,i5Vw= ajcL̬x &3r{ކ ̮yr[/0IzyJ596qZ߯%eM <M#CYnrb<'4XC<="^SJl0_)1VjAlf{l) =hIf=`,a'|mkb^Q,*k˙X_MOtH6yA>y`{ۺkڕWHǩ(5274+QBVEֻdy8# ѴId&Jw' 8KBub$:~)$G^d1M:o1(Ù$D"v:Pss=Q|C\Ƌrc|:"a%RILiӄ+/okxwWy=xiL))%ErPRJH~A-{iQCJ8#G|~gp1\sF AS5u7n)*O!"(;1l#2d1ڻ+ $ۯx_J!e43Pm%`fTNp%0t:iwPsGē&)ulHmU-]վWˢPh ⌤hw4fSSz0C21[2X͂/(rU>/)gC%31]G$i3߿N9 D&W.JOiޝINa&jÜs5 j/f@PWNܢpHIpm%<(Y52P)QTpNhw7ie^ɍY'5)~>LV/G)=x:f5 d@\آ& wJ[a|dY^RWchFbЗtPr_2([+i@4 RByn[!f4i"b,yURPKA~1:1?XdGɉ~4y #b(ea1D!pfŨfyp_2[mK4.K|||n_C{?sx7:|sǗ_~^.ȵn_+~<)6\s l3;hHaF{Fњo^~ oOୟ);)g9{X7?>m,CSeKskk!.2/]…ǹ{tò̈Je/ù!u -< 09 _zӤ16~tfb%7+@Pm:Hz3dN7E|P>`_Mf<΀f.!Aaio qFNy!Yb"{S  <7JluԄe~mmZ'qEAMᵃSH'2e/ Oh~ǽf޲,|=(IB(=BTDbL4Ձ;!d\KwX$ |̊!\pF-:LV`LШtfS NQmj c -:?%0)H}딞B Y~ٸ6tKӑBDHo-Tf\f,JB$c! x1}kp곟{`q>MVy*RNi6RP 4)V|_!}:=s- zLwI3$ǎ Jv _˵eZr󱀔i$=i% ٞHFc2퇁(%^Ԇ%StB w0-ڠ gf|HBO1lY"Mi(%&$ij=+2ˉȲ$q@zkhbR! Dnua-ܡvw6Xl! I{M+Պ8 lL|vBi ci38W388"W(u| P%u]y2͘MM CY.fѲdfr9&!e՞񝂏M ɺoB|$ÁG6 9*$%tb:\ Hg|%!ׇ1W~ dGdN@&9>NRE/K@ F3C()!D7 L1BGXN%hPre7!ա^6y)s  yޒ7 T9H1 W @޴6枑HFcFF ]wB7 T Ū,YRϼe Y4LlFD~]?AQxmfHrI!hQH J0gY2%aU6 /f$< aYV7Gd¢J8Ra=n#,ӌ_261*4yk.R=""(&XZqh0"C#@5q0BuܜFTHW7ꅐM ;({CPԚtYy;ͅ$%)xJ%#JVi0dl P&&qdǓ߀ju;P[n(y_UbSdHhK<8a6ÅAy%ތTUhO*m5,F%bq*͎d%вXy4 5HZ8{NG|n|/$O)$ː9jaVŹM,.-agž 7yi4%e§Zy GT?“!jERڲl҆ ׄL@]v;E'p ` Vt$EBuz,&3b 9CdЖ{9iI#Vpп4ޥ1MCGv<h$.FQ-yth dD3 SP&s!yCw&#H4`_wu$?ZMD25"B=7”q#vSĹi8g4, x l>N\K>6q g(9C;H.L3 Xjx xӌ? @ (A'4%iZǀ@v cܠp{!uS6Zs1H:}XR@aSCdED"@ "yh:&juHe]*܎O(Gbd+ԕ1tD {&4f<| X`?*6JiGd ر!1Z o]DLYhnI5WPXc[JqZ8xC(g"dBj;4 1yDB&7%&;$oxd3!W~`jkJh^1Tey$ĢDmZ)ci^_ILh+Nn;|~]|Ӊ>.P;=$L:"QUtKR%q4AtPO0[R4 %H =Il{V*$v A颂7%dᩨszșW2^ӥ)F݅o5%0~Ʌ ~]f%.cr0JQp8i[Iކr[<Д2FPɥ9Ct*omoM7܀~clz#l5\͛&U\|&\="rEY%N2<Ӎ֖vt#uMxk_t?y$yQ/رcCJ 0Jx5\{7ލln~,=ʍ Sa,P$!{K?*| ^ɣs;W!{,фUc$iDsX; !(R(55Oҩ9ȉӇ+$.}!T$BvLJF}DRP-vaZi- p<*eZyL(Sv4x0&b'IM33Hg"m)0.e<[OiLb4'I]L5ne}ʹByPL}Gpây >2nx4f`w~G (ח!C6(R'46_IJ :eJ{Mo=܌Ri$n*ެN7j;xx#ÿ?1u7_!Y,=*% [| LxY[5ҽ2МW30Ӗ( ey;Z9߫ ]7 Br^ͪD0C \p/SU͕&?aRV@Ze{8DM< o isUsD pUZt~ 6R g{1P$Iݠ>-sf&d$*C7}N#kC>e9n&J ]TU ST TD$3`CNXw{Q>SѫR?7( {#f@EBHj*}y<#SPpOѩ6hvZ-Ȥw2AX $i'zDG\ڛI֔0[lBT_xs5BןcmLO'JW l^c3eTxܟӚPQ[שּŀ䉗,s*x:a-fg1nu(<cqq^ _TZRp_za'1XL(jWR-a %mGn'9EYtfgvoӗJktv-| 7W_a]c;ˌӚ Ag!1`]$7oBVcD3]s1͈EJ'7W$*9aʡ)pU䟨&-;LQp 4;v-R@,]SJs3ben;f,g!dU*-hY.$%J=OE9{ABF5i0$n)Q6Ƞ_/ILG_w0U lmb +HM!!>eiH8 8yCa읣3omZA UR±y 7@]#vu$=}{ҽ-BB/fHk9w} > `~7ގ/]̧yZiJ*Ő$|=Ebǡ[0MkI["M%Mn6RbZ3t30l \~'M2n.wHhMN6 _s]ڤkef4fh@:ÄɌ2 S󳼊Rz&nDé1 KWq'gIBf놼=-8'28cL2mKP UsPBJ{b 3܊Rlng -[Hzy76Q:!O CϔElnlU5 ev0 }js io&0"Nȳ!`&1P_Bi )1J%$ N'C AX^W6Ìtb*jݢSJ[Z'SOt5f^i\[KF(0ct/b>s0RLfM:s]Y|×<)Qy'n1q+ WkBPiFGC#=L ;uIYn212?@6=$V{hYCOsUA -2"-=N]pAg >YeA "fw̎ 1NxɼU+{x_c1\~BM!Kv*v]x%8~㍸!L9. p{t!#¬*ޣ頬*H!st![)VP1 2Wlܽ T& a=.Ŀ_PP ~#B {5B"{1Kn"ŋq쭁`Tf<)37œZH:}T[kQJ!9k<fϏT靅cG ٢j[xkMzAQ` K4pU?yxW]8M&H]);q8!'tIl d=}+yLz8uYP8 RPa$u.bS T4<-HBdG7Oo//@ +@x6'\U@9c m:LioNBha3N3 k`*jj>= kWE/?I@軕i f & ;֐s%q8ZK[VÉ2^@f4mbcCh Na7, 4`,@![GP9b!3$Ђ[lWdC~$6YiiSQOӅ j|X87VZC7A%BsFEY|>9g A#tpN!e4@bF1s7H$KM ތxBgdp|)u3vP4^!EA;wcb #Pi16rTH&-F1ӏf8"r9!Ӧ 8?5} Ɵ={Bv!Eh;y=N齪F.ED ,y+eYn/m%=`~7xS^ _+mx-^ɓOfcx kHtc ԥ"Q~(@rآΗ_ozV0 `ieC T҅ XY\tۅV NkZZ !`O?s/eġCZ$B$U^Z?G>)nl;Gu9F}F YeO[dxGnAfKӝ~OJ\-SiQ&#eE{ eN耶 2˚TNk#^,/5gkMgNI|aJC94''NhmMv=&l&ՙ9&# D U2eyGxk}:8>b:6(p"Pxnm/ן9v??==zv,&In@F rĝ5#8G%YӤ k%q`ǾwV/l(gj%[Xm/!AS=dikidr'D`YKlXhLA tpשSxÍ7w/.^v$P5Jc0qJ`5҄:?k9b&%瓗.ٳxVKjI)E.|-8r[ou`*'y}0o ب*& T4˶{@B7ȶC0Z_njsf~ff0by8gO٧
lB196ɕ aa 59Q(Eu\h?/-e{}RՆ 3BZ /]< TCC!_4?<$l+*!!U^61T2zr N6S>8 0 s: X8H/I8I;_9Q7B˗Obd{k}6h>7tn.K 7L0M1XJO4(4 K i<_rЀHA5D\ :07Q=P)`c xA:< |c]x0į2o~f@HU١35y/幦9}Gm52vxk#GGtKl>Eo g,g*f?MMI{25ؐ**I$>颎9jr\]''H$vϛ(ɓ+wj2jR&!섦KqM'MX!M#MB\w1\c.L!Hn3u Y%.σr* bዉ\2huب1Uކ/7"D N|atoR7(qtERʩ^sdFF"EABk%5KB@^_ }\_މO?eGRl)q:=Oɣ/zgNЎnj*PR( FC2a(>28w|'ۿccK<쳘޹ϟ}I|<9y|Aql><{VWi[(pCJ믺 W؁ͺmqnm =ӏ=G>Q,=(qLIqpij!{h!PPZcfN:xY4w( V, X1`I#i ׫r^+7/x22Ƙ2l9↎Վ;_հ՘>ۀ OFMl]XX l윞Ɩ1C]\^7qyk4XQG?z} W k1zzqpOZ߄jx8E# $y Y޽_ 7@)O=3HJ6uבi{cXj>pmh T`c8%æ)i4Q6ԙ [z8pLz0bq}9g Gi313 I%bZZT5Bg Ѩ DŽ&^4M(Cڀ(wZSeG$>ji]u4OX Yӣ/7f"2, (6VY!D1 ;MУ-H1G3>óVe-aԝ@aS0P&4J 3"#l:Jh$~.l! 30}sHWkn78ǃ=/x1xdhjQC:$m"4*{SMqS!XvdK5߈7t1\pʬ"N*09yOhDLŐ !`МGC'?z;fAO|s;pոцkh2+洈6 rpآ _:`g;tK} *[/a [_;/4`!sO:g.nDBʓz) #+B$- ^Sʰ5;Ȼo{t@ !հZJqm=Ϝ;3ȡC8?vu:"~<{psɓH:}Ϊ)!wH:].܁={`zvV 4L~NimX)ah<ʥK88w4.=4VW!t}څ96Oϣ?=<`esU NJ8!" Wl8(ؓ-Z(kphv!hKK8xYn'o z1MxʾNw4?57%UEH]Q7ՄT%%4`Uu||x@n>Le0D8)ߍlbd31βiӝ"_*} P MSɇGȁS'DJ9~ZAuzT'p}stSclTxkifuŗs;_\w8~t~5c[[t ցMZ4E<kI4\i Àp6:lF*6ң9npf6Bh+SfitO8 E߄ep s+Sӳ1;^re@CSuov/P4PfY`2oJѽrշ|-ǃ-zO=y_9Ї Ҕs YCIݱ8X][̞BoQՂM.9wj=H ;1<-@Pl9z+61IBdTFtwPh퓂Gsb%$\UFtl\]7޷D8K'%!-I˲{;|%i:6iFC a#H [tSJblI^WXk4Dk~'#j EVeԲE,Es_QSuqk!`!|9cmx!MQX!<gBSXi%ʂ1f:Խ5AO?CM0~`*Kn\2X(o?1s+h/<}3dsA-r `bU ɴi6o> |:~3]+@Px篾 ϮffvT1HC9CZ1BZ5km]$KZ%&:{v}~M'HB,>ρʍ˗sǵG]N\3xI~Xy!زR/js';۷cCؽ9zw:eR!c05cXU(q{8JL) vvY&(x5,]cEl@$OMafNػ;r4)=F[*tX,]ޥԀlmt159Կ@M*nh5 ,ĠNHz$T+r π<Lj x@KxLN~^a_D8LIJ&16ItK9Ta)i]Uнf/@ۿx-wQal Kgs,_"p@۞0w EWl. L{n GD+$Mye0GN4WIEh^anӭѐRiQas`1k!i]^}xKtnpZ?PNz˖%.8T6J+5- Cf#OO>HFnx .].63]DC y}o{;e(;P#q)Hu-& B [dP4CқjS01Tm _ u$1SI(W1ь7a'I<136G!Iڤ5LE~jsS2zEtmL$9ٲhz`*fVEۄ$y8㩌?KlYDwbT#ErѐV)FܺIh < ^feСhk`Ҩ =݃@($Nz C4B&E Fd2|b XcXFr( $ӳJ9TLڳQ0-. TeMל&Id$5)݃4x9Wt5P <ׅP~ͤ35ѯ$cC)'z{z -Y%/Y="QrocE욶84s @:gLs6| '0Ő4S Gم-VwњFE\g-Ӕ|C)`N`;qci<.gu" y.޸%0s˰a8t46i %%ʲ&N_c.k6E1u 9CB @WkLZpQ\CJ11:6VW˗cake,Zعg= {=x!PQYbT* lXZ_2OH{RbY9z4Ei-psX^_8ͅ#<{|iFE2 >I3OP㱼D纞غ^Qtq& ɟ }*}~TXm*S~d)Y[3p:"y`z^?n *m9d;2Wk+IN: %;"ȼռ@"c!C᫨{ClYjN>< $1T+AΥX '1a7)HRh %sN%Nbw|m R-|d-o?{?;ۿFPu$ ]t~#P%)mw} =P` Eh$m\ˁRmq԰ ҜU^I3،| ݋CN ٍphH;}㽇la1T[pB o!DBq$sɔ7gɚR&RpUEHzWM:&֙X{%{Ga}V`XS9ш5:!Xa`di!mhtx:>$Yuu$Ie-)CpƂdi m_D@@i䝨8_+ XK٧)onxī" Sd8M wI nk:7y$xUpFW{oO>wxiC4it|$t1=1K"ߣJ}Q3}kw$d!`!zq aCmi-ƀv!BT1޷9%Cb QXUF1p.^܎8z؁9<{VWWqh>zxS ՆLS[oMGb4b]^pm8a S'V?O `93vqxΡ5m옚v kXc-L]c\x!s^Xqq>|w@0ac0@B._ƅaki ˧O}a97 y9M[dӧGxq $l(´Rk&8Nvԩt #Ƴk-ERMM~(pk׾8038D14_Hk#A[ZHV"JT+Tl=~z'M{95ɪ2/~_\=p'!Zm?O% D=5-z𻊚MHGۄC$aZ[Mǝ^] ^JO}aFv \M2Q*\ ͒6 0Ghv*`j =mm`f>+kOu3z{st]w7O+_eB:!O"W3S=HR)ފL.)II%ΰ0z4JZp"\!jC!X2iu]UB%)˂KQ R]ua/|B9d )l1s.FQ֔=,1K:=}-YQ̌T!Yk9˪@82 5B]UFFڟ%SZḼEB\V찔 i7 ^t#![Hj˂+ƧM\1 2)Xr<72 PS1⪊I؜R*2P:dI22U%#MS͟JRXPmWdZ25Tu!s@R|ґŌG"-Py|( '55Jz >rg!8Rҍd!$\(blQ$@`9T5nM6 8`.WBq="3zA D H%N6mtJ͒Y:tLYlK5]kغco1`8ph)e_jtfftzkk{gg1 2.%L!v܉tRת='㒌:ϣaZ,U^Z?wsJ9}v[-]߷7U`qɓ1ZY;pw+^5έ2.^ /]O`i=8xL|I ff職B/|?h_;Sd9O l>8}*;gXe$g)T̤ϫH leUtJב^}WOS>DGې`z _J{O,+K.>D4`7gӵ3u zEap+I7x|~hŤ6Arذɋz.v'O~ ~/JC$9Ɇ.aCR3K57oN? |~66\u[J?c d;t?2oX%B[RrD|xh4e"δ7z8LECY6&Il[ j@8[*zAy:' V$=dNJjEIV2VI)5;^ QUW0-V'xm|Su<y8q]\_qW _. I–9w=ISȰ_!RNH#iiڣÀl1)ITuŞ KTH̐*ͼ1H 2>r"_aiB7Y|侃xxuf‰H1MZ1ഥrU1bV~]}?#t ^ fg4Gޔٸ겡Y k1 Qg-2FZ^͊&꙳ axiP51(c:RuZkIvN9HSJFg.`mu,1=57ߌ^xT\ p)>q2O{GYvu 7խ\Y[jE˲l%'Y&`f bkͬy= !&`dȒmYVpKVPUu'snu%+X kݪM8w[|br4 5z24eܩSD C&zvF3!۶mcϞ=}`0H[G~A3KciFBy]HuY&d+͘-y"Č`Jliԃn,V)&A_>gcw{sO~Dnx ;Eq?i~-vʡȪB3>6H|ê,:x͛cq9Iß.I7CWZ]p+u~_/22>kϧu3t]Z@Z]RHD? l {/H@Xgv".CTÄ~i믷9I$rDi iƱe/)'}ʒxS>,`LN c[FPҹFA-$-U E Z)X` ­v% maשɫ˕U >Z̪D<xk2/Whɳ:("kR`LDYyrPoT8G01re313Uie' {WtˆGRxɟքi(n-XuW.Q$VQ@ s?OXY)A 2/qFi P"M0AKC:Sߎ [KJf#fBbJ1b yV4m * K*2D0l|vRu%EUx)WY(-_W& xVA]Y$E"Vpz4Ô;WZİMg(uԙs\QJ VDs>j[<EF›%} `ȝuNs(F#9in_uT  R^X}聩/ QNmf%[3Ӭ{k?IK0gkYzEA ݆Ͱ}^Gi+nGٍ;o]~|AdK(XlV/%,/~VOdXiapB\__{ICcmw'<~oRZA.  kc4,̣OxraKW93^H>)LN:^d*zW&`@Q s Rh J-*>@D1**otnAk&KD$HW5+ܚټ7X㵱"QB{B2 R *l^F sIƈo՞`-cgcT7_X)3I+B')w*^d)mR|$!'A_@sǚ  RP^Lf(17l?,OxHîmWrÎqZϳma6}~f!\\fLnB_ ^1"OLYoPt߇8QirÒ$C~FCˮ"j3ɆBAk-z$|!ܛ^Ky#r JMSpJ,%Ea81W\}3R'ɱY̺qpcQ2ONn9|.$}u0Iv- E.#-Que9s(|x*͉1Mdz9eFlqEmޏv DR+EXo'Hq]|1$=K lOS |ץ.P $٪qE$h>שbV=]yXўfc,aa$6/լ:OJqsU"Xrija,,/LY8rH (AuyFGH4ZCHjfju?pkO>h Z*vJ/3!:ՠfZ mFVQ3l2n3l2hP+Cǎ! ]4%KS4%H,qѨh5OMѬ׉0 "MxMch<ɣ=F5[w0d"cNFl*^? nzӛnNvv|A./Ӛ' n -g!&8ɝc(ce;eke[{.Yσ_CzG#Zff r#(]֗e. aBC I}\ Iz{ފ?'=֎ͰUqҘ06Wɰ+6l#=0CV濄&Io9OhwL^)SFY*g껃uTN'f噀7*b^^*%kUA#6M Bs\T>E,K׮EpݵĬ\|f۶b<)rW@XB^Ѻ<+P8G@@W}wޤg0xF|d}\u<5<2~׿:#,EܐxzN~uN ?7⾠$u,WP'K I 1&1Z=K<5K 1AHM/xEkb206&ueżT88 )I6T{[|ڶQi"LW _=UڮX\8Rf <[(k QRJTJyO!`#w+ g eRZ0TF|嘚leO'nyITRgj 0IY1!Hw44vbɼ) Aiz$L% |NRJ(zj,FC@ӑOMqM "/o-/qeߜ m``:ǿgƏ0vp|8dۑu9*CpFQM˰,02X)I;G(eA9 SS4ffh.3~=9IV 8jMMkbK[(M9'F#QJ,vb}EGaPhjfgi|4lKJpy sy?8b֭3QL,0Ts|7lٲJ9݇ӫ [xf IpTk919nW=!) *c`E^Hf#M/Z`d 7aI `Yee8;nqʕdFUu1 a J{`a{ 4%.9GJG@\y2|$Tפ7*{UjcG=DO juCaܷG1akRpCU21w}dxz]TJg4R`jMQZQgN J J@HJ9Qu扤K7N)\2ict~G"z He*6K>'I }e拔A(ʭJ$TǛVXn2X 'F֠L aPYcb A%feA5~uEAZNފRj:"IHk>HfY"᲌p>)wAA1k$1L)+;CZsϳ"v \^Qr/#IsoW3AIm\g9ɷE!/HIFBѤܣrlt`G5H<+>(mqD{S+r *j h%X+0:VO @QMP009RA&/"7^u) >77=o"tk-&3ˀYFL0Aè@ևy ~ˤHs hhel$[R=J "q }jFd0>|٤lVE2sɰ% N;.*}r@>(RlغU(",/k CsԶm\w9vw߽=|jrWm\qlYsGyY)Ecz} 0G#?yٿ[pɺu߷/_=qz+CDn 0ތz (8o P4k(Kֶ5a-_:.0["߫y~ܭif^_73 S:mRHyaIjJ4M7?J7+m|BסG+/n [ 𱛿5ދ~zc$csI'`K}pu}0TN? D= *1EErl7#|{%_p,zE! cҗ^sgB+i|WG=_gfP{/=r@.^q"fg)= ygr~!^rW:s!8.~e~b4B5U2>5o`4eXLdY4d=#cX i JtnȺR\kPdi^zu~pZI[QHjo8EQT|Cπxω)ޖAPͼe MB|ҥMKŢY2M>d{W286K 404(*c>Ϫr#%.zFUo>JcBQ$hy3y &'={ IDAT"$8)e M5)b e YUʤFI*%: ^d(# =ȓDybx`n6ٴe hl3SnJ;jtv,CmEx#y'[-^c?ƕ^^\2=i= [Bg$VlQGYw/ݾK7of˗Go>1N6C{T] (CL hMúHa*i(=èӥ9IfeQd& 1a,q9. E8{~h UI_Ft ,-b*K\ԌHN5Kw.b~c͔5m/%x!s׋mLQ3[cTʬ'ˑ-^؟ h 1Nǩ_/_/ܷfqpZcJ sH<fR@:ygQ}!rmY }Q-X?'v㘠ޒAZ)yzBjBA QJ EO)AkR2:1*2^GhכU?/.=Z)ޔN8` SkV"S&nB_iUZML˘0$!<a;Xբ]"*{lB1"GBeI{nbe, FhrD1&*Gf|`h!Qԛ,s|i1`˜pbb1 #Rc\R(=Jhƣ<||Mbjw>r0ɠ8YF[A5u/@tD Uç2bF%,u.oVy&1alEeB@>פXp|1`Rd#@n,G† :LR ahlue q1 :< VDa}%z?aEc#ca~mN}0 \`Pq L ps B&• #!UIBV#w4͙Kqw_Rԃnp<{M#~grXc,cE{uA<*9t qm 2-~EnĴl'ھЫ̚aWE_d8@Un(^vi(-,FʠŞ ʡ{)Ga?;IdZuYvh;A'26(-ldB+T[09#^]p/Koq >7⮾p~=F2\b"6Zey_PZ7o-_X;7=(ecűաK}[uuܖ(޸Y'WߢzN^nUoB) wnA:>6ma hjk*a.Ҕ9!J4D" y"MI`51=^` 9 lr 1l aFӧ,Jqd. ѹWlHL6G1&z/EAeo(Bsg \Q'aYTmK9BJSJr{-9TFⷤ)%r` Xgp@41 R`+XP $bԩ:?orB(b i!kl[~#j^BUqX05.3ǥ4UWI5F=POdþVAWoDෂHk;Ǘ|,^r VEq)aʌV\ϸ b>ɬ 7%/9|wŁ?Sڭ_ ݿ+gr`rc㘸\yʳyݝw욜d׆ _=[6nν{=1dPʹͶ mz'tL4.H4L_Ь tDaIA}'lBQ@Ϭ@7Qq&2J\yE)*RUE,4V g)\>*tVt;L=/O x@49u z/<)9!@XZ~1{Ɇ=L$1ÁHuqNÏ c1%NQMŸ6BBT.]HBFX^Z>1݀í{~nٳy\w^w9#Nqڐ_=dO; ƈq=-)pEg{F~d8f3 ,L3&! y/G_{-̂ZY>(HHEU]"Z"`CiI^\䊂Jȇqvq>7[N([*(A&@AhTN[ŎdQYwEws1l@YNA ɍ>] o=xS-Ԛ^K;euΉDP9yW~Ga#ϥj9=RJDBm){R.E@J/[bU3lwD-+ 7DHȐ^pmQ_u':A!q(b~0e>oh}79Զ( Mif8xw4[UbZqY bu(Hە:'5N\2-.bqsOy:ŗ; C `* @j- JQ7/sOv!IJ1cd-=0_¾}8s{/Їذcx}l^\q*O_h%AG1=M'M{u˼dVٱi6m0}#Ƥbd>;'6sU7&a%8f-|P\=?@p-(!Ϡ<%PK)8{F|Z=H8FxC®:<="> {^r-p$+Kν Տo,~B^#/<#LG%rJYaV[Z3sH.^"`˜l BkF^R'@$Iy@Ck$SR>&Ny)LaZ V͏y:TXTkL c2@;V^{A9@G1NS aчE! E{򽽷HrŬ*,Ek2~1Q\ ]}mZ&8I Dnr/-/a'-t'J[đ0Ltkޑ']&g>8'lΒ rQ$fJQdJNಌs|},Op]J-eK2LU2:@# Z'~o&&}/8ƍlf5M)_|dy]<—KK۳Cǎqz'1ej)q<Ǥ) }@f 3suhͱ/ex|sɻE33l$<95[.!LNÁ\EW073g{Kt>C66:i lmYV R/gi Ú'9_|YtNw~]hxq~3.>)x+wD|PJF2PiSϜfnzi7RYernhz L6·L rȇG $$7 Dua=h嬟A%Bv[%kRBm$U5뮈=OfدL%ΧYjdv4U(R?-| BD?1=ι/NDn֚$PaL~^WT YVu{v>Bd2˖ɕ+=LUlГZ" iP2UzghⵦHH~¸&Ay! 3 aeo\ZCymJ )-:tT7#2lQcUySRZ5.zDIRRJäSɍij-JvE5JV(jaQLToeǯ~fDi6 ˎlQuI$e9)S\HԝRA![qHLk {&j읏}Omv9P˖CUo|QSk2T̄mCn=`Q. J4Yِ#$@x!wdx(#8ЊQ6gf)v`}--P8w,)r?̗>)/!'e6*,_$nʣw;w AƆ}}m X՞Y;ϊL!k83+ع4%@ٴw!H2}ًox2-cm;l)iRa%sSOB1Ν,­r0q~o 8u &KHUsH-n$vK0JWDZ{RIEζ)JؔQ(?p C>MLV0'KyEIYxrVLuYiqGk欭Z"y(lU~-3V4u偯@F%O lMˆJ VT-Ű 1xHDiX/dD?ghѵ;P7iFJgV{hM] jc3sb\ @LCkdIΞod 7|'| 6lYX`~j2<:wUH}a J1a;۹v׮~ʪ:f%f.س.'!ؠ 8 GOσ_GE1Z_ cmYFu^bK3t&L*#pߵ 4{034mxLHSbH7m2l 3l@Ϳ Mx)l$ IDAT*<<<9.d(~ΪO\fZ2~$~F\(QaTdEi?EIGs-v)}Snp>س6I ܇#dS{14)%zL"A"Rsp0 |^8U9Ξʣ=7~pxu#GPQ ]&E2?qcDSߜPA9 9ΜuP7/,<,^o_|)Ǟ8-gGg)m| KnAcy])IMQ$U&Qy"@Ƹd v/]3q ;JdaeP&9 Ecjzz`(s SoWMEp*VDY*;Jȇ})Jc5lj*ăeU4pj %F!!8& l\hؒeIVr?s; ,ϨN-?x 28+E5(zGՈxGErk9q61;nk/ou{<)ڲcVb,[cÐpp~}8p$QFa7%ZFnpn]ˡ>{u~8$xYp3a ^:}I2uFcFV}۔r!l#VӓmP7Chq'+:C DgBZO^#C ̻b"V<;,rV[/(Bm9 LÎ{MX\[yl{UcfxU-ZQXߪx8x8v t>woÕWHoh> #C=(~ݜ[P>^.(|`~W0ഷ NiSU y >WB57^G{apqdhi8v~4'!c‡σ_5'lptVw;J=\r8whHl6wNYqz X"堏35h-e|*99h 4Š ^lcLXc%5NA:3Y#׹J0Q5ctwn5Y_lx 6!*$ذk!c-0uBi$)Җ0L92r¨ﭱH )9`u]e%KFŲa1A)GJ)a-?ZL{=( jNk 1v˜BR}a˒;WׄwV ʍZ.4NuԈǴ fk-̠+ri Q݆&6tu q6`%+ !ͱwn=0IBh%H I5|{vټ7n䎓Obosςeÿ}wg?<TiꈔgwDVy.UêPu]B*7)Mɰ/?>/ixÆip 9iLL=j]@AS~!,9y&[&z88ɣoBU;TOWU%Uvl:6A'x~'{~4/|JqODpxJ?L7cwl=OƉ-HVIQ[:k밾Q֖{Xce۝w׊+ Rs_+֩O< 'o*|P F$AO͠{ů-ehY1>A3&/֐%\͇5++ZReP8G;tRu:)jVDYQ[f(%C)! @EITi2 }To87p3qui~=+=kYv+u`ꞻpiz/A^fo&=: oIh{@vƅ (V @ڞ7t>MN5O D!& qͲeY:k*c4=^QtSAcBl}O fZ 6^"5rYYQ{ ƵE)x'k4@K VfCt ϯ40" L7˾'nmBrxJl(Zu N 4qucQV0 XZNY=n Bey*͓G ꗣGt@1P&>E9T-}nGY}I 5 ߾ 6dx}L ̧f)LO< 聍w= тg>*?Sտg=֮1cz } F5L [XѓqPFW{uFH]4k {6_><rЗg{ඛĞy.lE)گ y'i9rm"ڞSπo] Y p¹_br'r:| z-ikgᵰ~fk5H%Fk('J=|Y ,\Esf~J$ hgQ:9ko,L^!TqЄ6?RlF -fDVB9b[AQ!SZ F*7 *ym*jseAKP"fzuh8FS9A(>9;6[s5UyJZ bip|(YN$m "tr=~VIuBïqa/. !;Ő4}pSxľxܦZMg٨ S9jzE^KnIq{=;Bl&DAkr6MY bHiyceZcc` pȮ;vǝ̜lǍ_"9۶qyh9%/a9z1,'5EJq|f4MI[-v]߽lv}1m;)+X ن ꩰn LOIĀφusav4-d3-Tޣ殃ȆTZhQjhPu #i0=P]5BAg3Y?>ys^+D7@կu 3F1Ζ^.?0VfCkJBMjB.Y H9OgRiN*˭ N|qzk8beR)IqQ34 #r!MuƽzhX/|Y6G|=k%qSi֘n2/p˥rod3xNA',cr|h&flk߷dbe6`wywiJDICsrŋYʢ,f|lNE`l C(ʒ``@7c91 !w҇0$jzDI.LnGͻvpO: ^bOLu.Ft6=ͷ@?z^VFtkA2k@2mMI@kuȫ몂ڼ n]kĺ1\bڸFS4!?aSd0 ab:췾:qZS3hSYAҒw j(!($X@2%8=rkwɂ+Uv<;E_P,D neӟ)s)ϐc>tH[aZ ZvG}ݼ(!ɵȣ]>R5 R%7Zx3Y_oxO>yދ15dz/O2/qE.l^]"QXlYj$77reE/a roRV'Ŗޱʧl >=HB-0*-Cxja#Ԡ '0Ί$GN^:~c^!ujt9*??B6$L~%Y &@aҔYɎ\T%N Ql  :!O|?FA~q!>-!BP]TؓB3l4-0zJ׻Y;%jW\P:9&҂l ŷ'""I [YvfV=;-"S8d=G>7S{rh6Vsk^2] ed0W񬳸 o`lYg<ښA+8Hfir ϡbݺtr;pb_9t6&9yds]zj?6FJsjcK3l˖3>5XxDx8&(K +KdP^3/ iNh?`7etʒS7n{^FWx_ KXXiZ,ȍpg ~w{5m-(k2D jV# MՍ%d:>>)1¦3iEJC|cpf,r r( #,-lvAMtWM1 9:vŰg/mn ,ZiqҁS[UBF_j1D~}*<kJq ̥k8'HMpu~*I_io&Z0hƎC) g J7՝}[`qs˿ ߸?Nz Y'ؘ IDAT쁑)pJ=RJVJ1Oٟ宯mW_Ud X8P, khv& cR2VZE$6|S:ZÈ JQt4~9Pmӆ=^7O9q;EHg_;hMOZŴ-9>Nf|lv1Oj4GaH#I^^}XߨdE ;vp5pGEp0p`߃L^W N? _J@Ma*dn|%AP}ћiB 3`ʂN1 b)H>74**@ThA"TϮqxݜ»Qa U齂iXB%m$wn|^DWa^"*{yk >OpEHaiK'?aZ WA n8e:;uO^ ;f-;Fx'쭖Wɰz O_Y)p?opD}kAw/&@,*˱[e* vV)C,f $e᜷BJNЩu?F,ACBt%M-B!w8t:\D7P,17z(-bed,Yb 18_rfA8T~ _.;spebJ60n6xJBp#$;f9'xͅ5x(tEYQj(525He?e5pd mcUaVA]A@`=>uܠf Y]$W#B)Ua'ʗ $qJm\YM$FRq!1yVC(<ϼ\60mBpN])%Sg4bA@46s]v֐t&Za=ן᠆f[~s/s8eY>|w~>Z Ü&̕aγ/hQk:+M居pRXL8˧qLإ UW*#p1ӓǰkY3v0ٷowv{n@݊ޢ¨N4ZLoXʕ4ӔG$AD w*M?{)eO9]wٿ};,MVdb2ZSSZDZ3o5C-YB$&{oSZ!T +L(<ÖE¸qƼ;,,]`] ."nT1qC21A:9I<1A:1!nZ&iI$qLE(OCdbooO5?Dh# TmpZл ԈCO%!̇8*PFinIï^, O͖%A3ai$BXX̔ D\z0@yGM6lE@׆#^ Vt ـGƅ_b-o"_u(KD'y \Z&i)~Bz,OT-מhwJp1{TBhjz4 mӞO9/:׻NwGH&jxm]_? l[cF\u:貀\e)EQ,a,`qTճ"<_(>ڠCp vF#AwBrP(osڏObS)d-(l2x+on9nqK&ڑ)q.%% DK/͕l6?BbDaﶭ]~R54;cPa =kGT I1EQ,ֲY]5Y#1Eo mI`,rl>4G\74w,S秳jhyq5ѽ'4v5 ZQWd(0bkڌf9/z;}& F+&״od3R|vR`#!\12cU'mE,nNP$9))iРf.`6}nfw1{;bj0KQg/icӳb8O||~֟uz~e@Sj͎+gviLNzlZ/9N'qzv*泌L1Q,cz"0$xϱu}(sQÉg{F%VrTB؃l:js3ܿ#Qc4E1AFĵ0KQn:y/}|{Bc%| u7}jԴ S&o iJ|*Q5sOK]YJUe; Ur/T5.}mӦNY -W%wg~cf!EH\jk/<,akE~a7a?/B6Ӟ0|:)j6 ÅODgeD&A坆$%" J0m)6aI2yx1s%'??[6@>|} 5&v[،U8gK\1 k/mr }>XLѝXJ*5ym!(骒JPq,#CJr}Q5\UzPڳzܽ,R3vR)HBUH-GBLp_SVK8;w `0LVS4d7FM~rlRx'%4 ? "}M1Y^ 2x=fu=߼7Jφ֢rf`]WAbyؾ]iԉe.Z mtn8$H"e {HL6Sp(1"LRq̪6DII 24ؼ Ito'C^ظNn=n 7rf0EQT5҆i03GuDx {|:Z' UeAUJ)1u=BbZc ^!lEY* 3@$;(lbY(9>fg)<pٗam~wOS0$gЗ?cG;>p8&Idڞ2<)t7 0F~ްݞw''ehG[X"o' PI8Ypw׌ J ].{|>peABk}j8V6 bq ctbJRE "HucD$>j^y[G)7Tho՜iF+) 8G1wTu`;QĮBeo!`U#$ Y<|Z=SG Ak=t"TTJu&Mou3=̕7{ّA-H[7!+|L͢GZD!Ԍ-sj?j:vi& BـqylbVa5w%ֈ{%:qx iOMLSR"{1έ[r̖-r?0+5"Ϲc93PA@+ is ÐaКfMqr?|M,^{}V4&F 61QKU 6j*3Fѝe)Te;GћESHAڐ^#(YE_p $dCL/S]OorV(cEvB("ˏ`)R|ĵvtx@؄8@e-37c ө % Ciӆm,A_H'opbHc qҁh"4H1sĐ8Y#4|sG*x 6Z 5K4A i J復PcPwTτU$i%C_ˠ8)y-7^|i@dclN:]߿^hkA e!(>DC|a #@ |'N,M䣌 />t5X!Mak7׿ }Ju{)4RiD]/(ɻ${]}zFʹJ F 7v0ax4vA }`гҦlDYСd ht5IZ*N:%[~RP0tB!+=T%xn19et"ŀd[lf^ce`M V'$8? rؓs4E\g5#`6kA[c+mMpWM~鎎Rq_x3{ "RBI,F  jH]@D?*4,*XAD X2=VF7݃9βKpknZ\NkYh97UǓc&)ȅ(F6(f@[09Qp(A vӉQ\exs5۰r}/}1e?Ϡ'E60Ѓ{͇Eoλp"r S>LDGIURX%0y <*;w@(xYudZY 34yNh6b\Dq1Ay(SJ^bla=Jcm^o0ż':Fw#DZ̠'ScFԑ0@`kJoG,t1Dp A;.￲/!O(<]v-bk +TOϏq%1tDD{_sl 2̍:Pu㰘AS>2f5t.aAoݿ;o_=7 Nq>}xk7l`||KV8,˭̋kez&QT?XG##Cc؟evK-渳fo1,ISB9Z'v { ֛wP6~oD=G)Շ)]D hFg`w_2KlI] IDAT CB8+ 5BiֈVNlL"ɟ(]q ING'";I䎚-!`W 8-2ı)B{-2ezkro^vaL86>y8u),0l(W悊?~ʪnUjxE9T{;l᯿{c78 S+dB1Q=P }_V Z/hL._"& eRzؼfx??Z[ ?K{(shbqS Ci|= HY?uաN/&{9:Ei)eo#jQ{XSxqք rث!ӸّioHZ̰/v~_ϻw8VC;Q"PT\FzP_b}T(3@QyL la9⥼r{rAQB9Gs&ܩ\B&U(BkRS:,08 "L"&7gfr)c(9ﻏ;.&I}?H.O8ŋ1I<;wtz0ZуPA E^*SS|eɦ?yΒ8f"ρC;T"Uw(_ h=*yG~*D,E%B#l$4=Q$D')ʉVᩐAڒkvhR>ɏµs^k&z—>g#ǟ,kUywg,=>wZs;!UƊ !)TJfK +^! 3&e lw`p]Fr1eIћ#j5ΔAڨ]l>$^eo}蕷`X1>pmXT$=@`L1ib!A,'ޏ[|M>eivlmHtās%,)!8] ڲ #MEN5|O}!ڊ*%-BՎS`S#DEN7ef&''k-Gw8dΝu7(2$X9#5yQpngO'j *En-KZ~<338h(XLFR2N:\0+?Β%,;$Ҳd"h{dppȊ)Ple ׊S嬇G@P\e|^SLpe^s]VM;x48zThX#^ӂ)[Mh-^\'UM/>'%1p@4EEP,nLHJGT~*Oo_PchYt")RZ&ёAjl F]d0B8/}q8N~𫍿XFHP;F=^HΙIq^]?K8|:'L46%KZi暀dbF =m),*!D6(]y/^ڵ:sEÆaqBIFC{a.YOkrj^XX+Cg MqXӁW7_ O=k/ t y*&G1a˜xy@~)MMDd)F=u9Ruu#HcU\&6bfӖ-o۸_o1uq4&2(~𡏒Wt6l7d;lQMHlXzuYlη?_t$!Q!cXYa5N: ]M|O:S\ПEZpTK+CM׎P%ZE::^ 8QڢFIVkOf ])Sb;2Wcy :@UoV9Cʤb"7&"*0X^͈#1H F,$ɶ2 6ݖؓ{Is7`;b[k`nxWNu{9&42 Qc$Hj I2Y& eIQim4*5<&L,'&#R6b[Q٘Y[j"<khFx䃽yG'7+G ~9?&4˞SgvdxDi-xP&^#! A=uFZ :Nq-2L^ˎ͓_#+JX_*'Hr7@eA֚ĵiee ZZ >h6HDCjxcGi8lkQPҔ7НSd(N($lKD\)|y_^J05һ84cj¿P:ŸE{! &UJb׋6'CbIȘ\(xi&$aݐȊ6h-XZE^h!QSti"h)tsHP"'>J]ItbKͨL˟wwq sɒ0%x[aiBrHTwT>}kj}h' G)핂v5)]Y/{ A4~I'c~)ь^_iIRA@)T(o΋^QIA\\+3Z5Xj%}T;[oyO$&%ʘӋ,xYryᶂf8]% ӉU)>SD[%k)_J0Q6C-n=_> ԫczw0ԅ,nR,M"PO-mgԑYFV={u~5QeFα8U!ް377Oԧp֭L$FUo<*0etC-_/xW뿲P+Vv12 Q~9߽ցyL=!{ЗBAw2}PũZ:$xgdŔipp>4F/={ (|7` zY+W&dXJm,}ya`Xt}[ i !1`5j%Bt436ؾO τ+/4`4|oO=6nLVl"Y|KR(uFDG͢CEoi"iH]DSJc +q_zpL3TKsd Fo)"ti F;u6Ld98mQ!=e3A-Je("ol5S,y Y8g+}&&!"QrR*SYyA.BtHzѰpJ{~4{+]s?|*@"/!!9~V2aj3e 'ôwlή[na׵ױۘ{P=[`C^vTq qWҝzrQdJ#2h-#p~HȊZ.q?җ8٢QҗB`V#FGYe =\ؿ$ }DD?i:VҨL*)]ΊH{Q6.,kY)K k߀Fe702G*CS^d^8u|-(GTDG-4qm➣48+=Z-l-&E\%UމYMИf5lp6>cPABF3Y Zf"{+Zhm(ڋz&T9쇅? }CGc;Qx4N<\\֬ apfذFJiK;ԢFӕuj w?~Cfg_N?guo!`PQ%â1T5 JsnG/DS%3cH\œIZiRup1 )h: d)qVr`U*m b,!c y[k贕4$mI\l&J]Ss(-?$KG`pץXQ=WY/o"VߺVNpm6iBѐ֢4" n?кj%'"u5hǶdiUsQx~z󗔱BlBvav_' Yk}7?bf&f"ONCGY d:ɆGš%"Fq)*7ZU::4&KLV^ɀIQFX( l:m+AȈmRͭ-4súTD.LL-ŇEhP5(C}#{11FZhWMV ތLZW-C]#5.LyWJ\17‡2ћ:H7S] v {(~PHUa X͠3<+g]jkETM#*&k9=5lŦMwܺ?;vw,Blxj˄]ikQc$[*/,;iyVQxYuhYdQ{tDk&ҔZs‹^o8%/AP@naYF=kV`xKIC2弯IUEQ}~`C8CvӭbWo2mNsZibƢ։:)]:0Y-"(Н!ZtqNൔ.{MP+Ei&P)ܬkյ:%Tc^lzn JZy^(]u*C['ԩJj aC:斨^ .:D +$bD:౭6b<ųNpndS{U:_!as"XWӚ4e69O:iH긢.ݣP4,H2{bFQ0܀3τo^,_'cBm7x ^ =Ӹ<J]*.V ĨGNz 46mHǣ;a{ṇLJFEpgKx{moYO3[epwM/~9s.leh6OAg+_)LganFP(VuQ 4=F`Z߹-IYo]ҳBqewG֢ T~駾-jY~:{s;r iw"ټF=M"I=#W֒l8iɆRjơKʔЇP݈X N/=t{Q]."==i-!mF|"5QQE|FTE)a@gCu6yt̂ЌV7i@'jDIse&IiW jBP ,WLv|dj'ML31>/yy0 YE݅αyl;J,2<ئ ^.?:S|F?3LV.zBvz' zvgX99)(W`RIecf]i9X-B+j#.p&Á.bgp ^5\K/W [/&PR!?ry9uk1$e|dU6:$w]TJѵ0W&X U RӦ|zJm8{OoGZO(hB؇]Le7xH ۑ,nmZm4݅w|k:ǟ,!ieQo\upl..&3$Y srY_w7YM'WP Vfng;p%_w>RqSC᲋W-8lt00^|QC@Q͸k_kE/rJC!*l& #lVM%Z5@uNѳS]@XjWy_Nˤ/7f(/rkqr5]QV5Uj;nu"P.j#V/`߇gܬCãr-_? noùσN &ƀ1(B+gs(H#Cm.L67Ld2єPk.ϥI+Hb=U2erzae?ve0'v HS*VDZb _藍H Hg||ciKjہfSNX.*{G'$0=noeZJ7]`'Dy:!!}@".SѶR^u5ZҀ7i.,4B ө?Kb3b+r _PäFQl'xN_V'r5'(0lX{|mNP"Cqq1ϧUh!G4%c7u/}wCɪ?!ϴ/Sfv؇J KB<5l1b&quZB\Jh[Шװ51bwmdrK<տÍ}/ֳ?z5w,*mOu 3sl>4't(rb*~m:nj#uNA6T#oaV39C <+o S0aݤ6:XV˥u0%tV9b.FO1P$.^Һ;_`Ҝh Yd 6Ͼ82P5glX'kqShLgd|1;_9ldvp !ԲJl-YP&3x.Z @L &;O4U lz'ٮp_RLLJ1q裯 Dұ 򑉥B:t+p z{ŗ+&E#Nz8IBH~t ͏'> IBP:fD)ͳ _~Mso}_$d0~9eKEBh/%/v.{nF|QP}]eMbM_{5|%P>lKRCV FSGFXFnl8D4j0l x\Di,;.&dJ(~ ƛ@SjȖԨ2p`3/j4R-)@0גbxfV쓆dzLfa:Q5h]hv͊f/ ]`[oJoGBu/P_l2 -U9aedɫUrZI aT;Tň1.߂?y\=ї SaeTґYZ 0Ff\–LjªFB-jMF WwHB!!_ 3 U$q @/,Ü5ȼ+9슸1$0Ck7'dmq&]>+: ̒hG 2[r~(‘5nIj&ݾɹnHrKIWpY X }VK1cҝsaqG>W]/9Gp;vؼzgCl OS6[NF{а5 Cs'~,VO(9gU//|Ks_g/c͑'_crw mFт,@ѵ@6Jn@鵄ޤ&ɒuȰVcH)Eb$T =b2ML>Ү hi t{djy,~d hTQ㭋\BPr.d [vNRHRe׵ɭN z:LN z;C[8U+)HЮG\ :N:: _&./oHQp_$SNU+嵽D$HCvE; Fd$g }_T{LUz RB_9BKP끥NA6|y6kuG]F|IZ -j)7e)5R[YAjT|P] /c=Lo|SHҌl=F~6$>?6ԥ 6ln(dM`3 } @1q4[af}k; {w ҽoPf{ud<fgkJeHwMnn3yU $ZC>ze"O8 EЀD' YhLcN[A*ךj.D]Y:.[?=!e2LlшPF)DI~Hѵh/|5aFGLҜ>pX1FnѣYNj+Apnq1taH.NaZoPҌYj8/t?;kA¯MgtJ4*: ¡'V%$T+tbp=آIe*P O*q~'Uog:~+QyzTݷ?D# \ɞmXe .{Q0Uz,w]dqy[gK2Y T/=4-H)u߽n&E>)w.Q!'&׿_GÏbt<+F}\OjIN4>wWZ.kI :h% C%aֹä=Jlb>ОҒaRMR3di X,Ej5tr2Mə C$-Hb"t<)F~7an<3w/2 *^ '.co~VZQkhm2;w*Rp>n#SφkR]o. },_,FQ _ɿX'+W0ԅU"ɍדv>I fB, @( 2W: 4rS@]Pz@qפHB*{Dx↥M SF:2i$#nxpw tV!xyAtdtEEGOw_go7zXٿk3>)E|^l %cdj F$cf6KCE NNO"t{B<0I"}#B%DDl f=vM]w7 wǝܿW΅vmBJG., eyǝpXۀcpVi@^D\~)k#7>Q F L'B#6)YFڑP'H#8 nn@i& Q"J ,$dXgy,b`Zi5lW DCR\J)B+%ڗ+F)Ԓyץwj >ڐA]|Cs8iBB7c=uyΛGZw-Nmm4u;$7ڌԾ]SMFalϣLZD;kqzVL|&&%6[ Ч=_:l.|;ȳ^:Ɩ-v &4!R Imޛo#_*d{V1!k䭢_^j wظtO p ^}^2цL-|𮷑' b:~G\JɖOؼ4${х#kRPԛ-`p'~M<ݖ{-GUP8:!j |} L8HN"&#BPRz+&߄*DU 艊K"]}] 4 vbP(U9,*hH /33b",/*ke @RQYF2tCy)PbC*Z[͉Kݕ_C\CظMy$JmAf$nnff$(=7Z u7 X~x4l`5FRX; Gm7ISռveA/xqqAl Ҁ42A.I,.F8r3o4#yAZW@ x/&YA5nf p=-Rt#.W8\!;et,DKpӹJD#MJQnPB'p9w$uCo!G[&̔wBE ԃɭc=~jOzi/81IYhXM?!&+sj;q.=1Jx;5_7p- %TH h:$1Z#*d..`{lϡSC}8;#m:Z6.yOoy \?c֬v 7xH𞩍{u8pC h2WSW1MiUZC3֊ião@ >,5?'oч@)pZ+lעjHY*b2a~ pK. “φ kȯ*tVBt{ @]"o\zs;$nZlk@GVZ|(s*\YD OAVWrʿ*3CTSQ+dr݉9?pz1(ghjeb*.jz?H67s `mT/1fg#s<'?(=SZFz\=V!X ?9>6MY!ږd_oN,@)\}+$mi W 㢕$!Dyx7L%E4жFwRѹhzMhĮRZE&¢JkdC2- DLlnނxof ,QU:LIt_o|$[VÜd@ ?`¤ofsx28[ f"Pyx1>h{|ǏjQ3~d<yFѵ8 EѶ}}5ItzjJEu+Qq9lOwS{[_ vxⓞW.}kYn{]VKtF'V.;GIf+Z|%bYaaUd?b.IÆQx MOObzBy+oVRrwX+'rB-i$۬^+F]B~$u/_-lE\N'Ⰸ?W"֐bhzt*llVx?iրC63:ذRwoKvMԮ":Y̞]i<"$ʊw$"WyL)ޔײdJX8SJD$}C Bp⥯wGMo'ދCkG4 ~cFgؔ1#ڃFJ/8 ia} \u䞬 G' GnmLj8reш,+wkҀLE@/ZuX*80k%I#Eh{j5fD#m*;A)҆Nޖ}N4?SA, Mz#=Km:ji]оp@e.Z"%.Xa>P U>f(fwdU'(Ni i:zCS sfy сӒ,8Hd> pj~,Q.tJO IDATEFϑfbj{"]FxΞzP:(HR/e2 MZOʅ'Tp?W.{]`2qb6FG)Fc랏!cXКqVw_xj<,A?Ѧ_8+S։e9 |}7iS^~6EyHpw o!MR#ϙ0<͊R_SZ4A +/yEAe.v]kҝ2-tM"AE8r`(U:T_fGgNTo/t8e 5E 4fL`t(Ⱦ,I S5_t*^. ~}!W_w[eZ"I@QH;(BIŲV~Rm4' MJ։֒Yq %⬳3`ZI2괄jV}AB>^3UZRiqi>򼟩k '!(TPhP 8 ([\Ovz ]=DQp+;~#"Z``$bThҚT 0xrz"b>U+6*64 %qRu!zGK@ztέNC2tH3VG 4|?4 IC"GP(Em8$ u`g|9e%ɺiV(z$VvhDU zR mn e"^r4:%9 h.]43?g>g]Mob!nQ $|Uך/ o>6K_"NvI#/7A Ob'. U r-Q SRZrHƒqY0W<ߡcHCё/>Dױ"n_#B~,+jcx&m=l4[@߇w/Hޫ~ 0rh~K4ou012|u<֣C ( h9or[]ĩޱb;4ġe1.ʫ>Q?pJ]R T,?j}KG R\A[V鬥Ti+YV1%=u:GԸv~O\Rj14 Crr\\=l@֦͕Z^^{$&KN<ދ_=,ش~6a ?Vpg;pӭ-=\0:eX/A,ZK (Elj$IɲaC{Ǚ8l+7_x$ iY# jB}7VLul$s - 8aa"R_BÍ$59<ʼn&~F罩ztq'0Hu"laع]'a]=Um8T=Hr|W`Ӛeox&x_C-ݯGyxP!t+4g\t 1rp.sV'딢[H0!'c Q5ibfs/F.됒ZDtU)\e2$D5"P35`,#&E+%ѹ3.5"D4H (vMA/ D`n\:dRÇBЯ*kؿNJub 17u/04BsɟBϩ,yW@/EO(Z]?pjt A\}ÂcöBW}B=o9w|Bbc_2ԤIYR_ ox-%/q ;E$_<=ފ9a)2oaFMESIվ,YqhUf{"lWyL=8%{_!4]gh2yu©F4 &=t!4isD/z!0(z-T&/z7-_R 'i@Z78pv_9Brp%Y? [u8nb''*AKb1\o|38g^&ѫ LM;~odv|Yt^R}`PAAؘl5&!J+lF9/4 E2+y&k.kәV>ەbɪ0Q . l8)pEqgǙ:G9|ٺ(Sk1S ZEsj>ouo$lqbmwEDFf+vrbJ6S΄-GJn ~B6ZC&CY]$1i9( &&⡢ifp'vm}p.N"ma {D&@g# Hl]!A":6 M>]N񓟇]tW?vL- k葡J&o[B..Tޅip*|-DsRG{[Sѩ61;lu hCU_)  5v%@I;THJbEd^ KDHD J[ɐ TV>A&(AiTHX>1@0ƛDD_"> '!c=p$+;KѪ9) ^Zm[=Ec8Шpʗ5~:~>4Dpp`8f=AxK q6[")S u'54^}%/Ő)BC6ÝM4r=W<=4L/,}h,$^\J4RwiP1}.N<}/[FS}2bqkgsE^TVt%/h-GHc kӳ1l3vY}(*;`MyIX[ U`qʲ )L4aCS|IGwh$G\)þLs3 ׹o5!T:cw15&DR+u_Y89k.3ٶ0LAF C5 ,H5ɘ1.ӵD+V PZBoWM.6g L*X6z= Now=6d{ٹm={B`:Aknq;߉j?.3DR4uccLl08ҼXBh}qAP;'|JT$1"R߳K@[?p*{\@m(_;ڲToVlB+!D9fl0~<^ߚ,{xؘ`cclc0&gHeuK(uR١v %DZwu~7P:){ӽ5oPZij)6 lnfJFʃۗ~ lד܋VV_CM/d1nZ ޙ5PX<> f0 ':=MeMI0p"7hW9[D vqhkwMraSWy'v+ROD.sEV! -hdI֥/c`@F,[{Q%>dxʗ͒y;;߾^3x-/th0!GuhsT[c}.y5W-;Bo]-*fF x܍yoՆp\= mؔk%a|`y@,cڅ^!j;oC~Su V9r셗O {ygy,ְ.w98p0h: #s ;~WDYذQ{$daADq!4u8fxu(w:7)l%]oxg7Ne*%'jK:_G޴]1 \zOr͂R%@D635>؎)4ᰵa'B0cib鳘S i<U5#,4ݪvmghܾcG0TJUA wfMUŃDrC5 NY3obğ7l٫ 2 Pdjpˎ{&Ѕӭ PMz6uرPi%at^Pbzh(U3Z1GO\ բg[FTfݩG;?EW2sT7U{'e/cy |JQhM5Ln+GcP_x$C{`rF{Vp](־*NMAN wW=vho48]?zH aa񃺃d)l= ul n 7Ti0E 4.侈)IvZ7 ՓC[RR -!W(epBFS3b,cQJ]~M[6~gԴ-Z *ҊULFN"kzh 6 FW{n/A7TMo|F}p%/~?0(>edK}U Z$&6%*%u3䙩NI)HCQj"%tq17@VLFNEe}Ѐa%;R Vyz)l?khv\H}Uحb/=^dn[j-g>_?Ewwf^ւDǬvOc_䴖@: qh%n꜍J6UYuiJAl6,N8B A|m}`ͣ2#jבO{2[9\#\(`3Z҈×* BlfjȸQM,;̐[}6gBA!:X<˾㜗5X 0)+py6aӋo_Kc'ya\)-- YߐrBE# ^rU/y\OY K gkGRiZ6LeT+7qfWJYue>򖷰i6|kZfzv꽧o +MC0~Q|7nǫ iOBƢ)["໌qx]+{ܥ""ǧV(#9/OqNd64kv`@cu*Sl-J]v#z|b0{ȇY6E56sU&q0,DL^54~mmqeF=ZAgc@Q-Kt?¾F"0:662h1QTǁhDP|zcptb bthhBNw{>-</5w+?U 'uKAQk\;c|@twz) c0yh#yqRjTE(sbD\}qKkIP?Y򛥁2{#{EN~ LSy^?!OFLD<س[ F.ڔ BNBqDo{ PILýLi`D*͕ejT@8'a" ȯs>8n_?/Q>*XA0%l`fb+g<ikIۆDջq݄qyhPD6criBguJa++J#T=ު֚d jI dl(&9 *,h͡JҼǫ|moКgʯ`}f1V*,\>hR{.$r[R,!M.)HNI2@E i:1h]kNY(Pu`:.GDɊBzfgaL#=/@#69>Iބ4{8 CoXPW qd,5Tuk-ŷ']XeUZّ 0֢LleEVhZ :34etnR_5Ff7awxyх׫ G%Vİ 5F%!n)FzP.:${zVgZT;ڀ[ngo_*f:@%3;s36,qlk{,֢8"Eˈ-TL)\m&9Î3 c4ZNgQ/ͣ Jz441ͻc}[HˣpC>ܾwNcMv< >ax_+^&M5O>qxs힙mAg碸ƃ:Otڹ:34֣%ˍ ~TjCQ%J4Hru't1Щ]-9aJ+(Q1u.hɺlΓ3=qMF8V{5.لa#E; ~ӦGZ=T?'M{"%Y&ͫ& hA3Yܷ#AyŖSaAJvFXT%:w!y8wo1+_đ|xVY"}lѱWAg+ݤxTk 9&ќe34֚%C%>adSKhbZ!f:96hVg ڣ:^m,&3:frJ\Y2S?ү?:x~ω%OSO|.zL < T8R1V!&#(EB J=޵|p]LJO)F+RE,r&`3/愨,жjiJ5J8Ձ:T2󍧚Wzԫ7b1xd/lF\a9 'u&a'_u{!np{*2b}Ɍ:JkB []` D\}{xir"2arxaFfMPPv[y^h*v.{zy{9ǁC[3^2flY|9%{Ǒ}]e"$T;:FOcZ@8ne_1k7;Ah5^-{OS;r6X>)?,0-z҄Ǔj IDAT >30V :T↧"R%W;t+u(e%PHR2@'dZQ 3l(yBXdBwyAnA&.D60tFM Jhhڂ㔭mB [dYRz'ʯy˹@qŞrdppj .'^ ;.FdjJ YOvAnR{\_ANaPl%4 ȏgeښ Z 8"*y| ͅ#g%cL_S?|3 (w[4W/y\'=UnEY4Ybx#X@2h3\-ME3Ak Ħ;鸈ZcLgjqCeɂ\Er-.suxţwp~SO? w/n?w ,Ia)fYlzJ,5 s:rvɾ?޽]|XzgE+܎yQsp3S=pe0&gZW8Hl@\Lb$ h <4;oaTcs m|pTdf87\ ,*4%>'rDdi*T ij$T*3&&W nWu%qNY&fk1rjB8Tp\M։Ws k=|W3 nY9JZ˳pUpsf [^` kϭ׳ EOk_veW0?~+ C )@Srj^*n\)Mwšrj[Z^d}*j; 4yQϨ^cb֛y($zԥ_bVTrM\p'FRx%uNmT?y'πm k_k'Mck8֑q~=xkNYk9.Dc8"}pɈ)3n@CԳ6ӇTW1[0Y[7.y].XGJ v\ZZ"4m;֭nj0W`'(ꡰ8 K<׼~s Fli[!qDgC}?MHe E.W{lٕ3z MxήjN; < #~R "B7khkl5`a#@8Oo28`blj.bY^;v}]JEV#;ct3ٺ},4 ;,A?xwݟ}u1w1zrv"Zl"ǧ%GAz}ɕѡZ49'!"KA]m)q0UVâ-QKTl2J z_¼?%I5c:JvAȐPkuj&yv7 ͸*Y8ocZĺ"e%: F m#q,_[]Kgvzzڒryփi.wUPSWs9pr{NLzWS^y&7ofj8BW*,/sAu7_ڏuℭ'gA2D:멚&qхʨeZU ᏽ!LPm{1兗ډAŅ!8ĸx2W+|`4lQ֓e Sݽd| )=Ɋ k- 4'^b"GzT dD|Mbu5[-j5.5Q}!Z#M4BB"uHA8pb&85 t<0rA&ϖp~Lӽ*!4NM`7˸\dl?OB? JRWl Γwk@:5j@U׌"0IESƈtBASHk\Z$t"BETfuuT9|ãwuzcht|Vc[sZa ,B_o'sN-|st>¿Ayro gǼIΜP mm4r6,vWA* -0 8G⁼Q/d,a9%*1Q$ۣZ.ѹZuzTkpfgav>u:T Pt'ImbpsQXdbzaCnzf+Pc4灓L'GuQ𼩥Qz ^v|Fǵ*13-JV= K=M쳧{i?e 6IM$& `d5ftxL2@Д2tU1-B 4LˆE&rw\QW ͨi<& K:is8tJ4TGY]wB\ zܰE!!<7g^ߗprñ|zl8{dL|cs_*HATSW%|cbSl:B?h8$O;lVG9aZǚTNӈkmȣ zޘXouRAU~tlEc LBc vʐсEMw,9qEnfn%E8 тd-Ԫ;ـ<DE@#BLcc kb3R2(|HW^ BYAjlgIHT!gDE(dB+rQsU}gOCudˌ/J/وK=Q('G9U*`Jy.r/?:^|-Sam#t´!JXiʦ_ szgm(xaNRk=П j8xOa\O3{e~ϑy;8&&WߚckG:.8z" {?=wen Wƥsb|L1yY?kElab"+ەdzt>^<>}&dKi.BaziAV4ezdNmpz Y!J,S0YP=yL} 't0c!=eY~[ 꽚N,Sn`L.mB@L.VYhfQ#4^ժ=miw/N~1m\xmZ(ߦ@&-)ZAzmDEo@YcrӐҴ<-KW勦L8lrLNЭp(?!ZAJ4.Ȅ-o+~lkXC{. G^;Sa`9E,]HMjCCmBbmJz *L.m4Mf>84 6i:-2h*Ry}MG+>8k4VЖ}r|([bXCP'*8qWU"T:|%h˱la-Z鶎YͨI4b fJv a8q7da)LWlxYtGpa::|/ "Zkݫ;Nuj@`cF'7h*D .ܠ.eb>)%]Qr$aK{V4S:Oͣs&€% K趮aNԖ~h᪒ pB#TW;\(UKRF'5".8"q08,{jX}C$~$d1T׵c >}:NzjݱӀ|[nloڮl~;8H <}ʫPWNlȻ7axAezU`gҳ"MHn5lpvDx#ړ1|s<۶a# YM=Ko--Œ|Lӌjlm9j%PQzD˅n5C]zP^>0" 40ue" QhC.Xvy܋BHUfŸY(vbD뾵/M9$]esRh^K*Y?=Rh@*v>(ƑsaLW^-Ąg ^rK_ħ?B9E㍗K-LR4cNVJҵJnY4ڇFRܢnRraFhj!zB&ukti:ε(z 2T\JQ)CŅ\L|*>pt..--y3F mu޷>9k~&DHE-OӆAP!PT㨳()UעM KJQ#iTD\й7´`I$5VжZ$ *#j)."f)#Up]ޅZùiNOk U$ݕ6Zu 6$~ &\hD\ѧ;%Jypr29'n;@n<+&vZY_3)ȇ;-v-~,qbU@̏b-v>tpY7m]_?f6V^6BRJĂS!XY j%ZBo_ZJҞC֧<3Π?0Z^fna7>"ӳFFt 7W[QCD3ЛV*tfYW.UqEA&3cF5>:/C_M,XfL?C ĩȅ nrt'#6 pa4hd">IZrUKӴsx/w>T.(AO'm^6r$C{`!qDRWKPVP]/g/]v7m5aj^Uuҏ@IuDb#J 9 [a+UA\ r&FuЙTD:+vԡ0uuuR*IuM-#N[6G'NsKμyn\>]SM%Ϟ4Eѣ B5۔&-mXht=l6\<6\t>pHʾ[oa׮CغxщˍYViF74eC z($ ;LOӪ Ij{1jk6B?ě461(n8!cSf3=+0;tҝ ۦ#6HxDK BdK<ݔf1tiv~Ҁ./áCg7{/Y[9/s8, d:^;-FLM:J)& pm26&V>h"KO8L [ dPԔ.m>PZ\6UwH YKEMVI ո@ atx,_;WO.9yέ]7_)`PM٪PasKߏ}ղNxUgggɵN^Ā̤Q;Ic:ϹÍٵ֢Պ,ѱLnDʓwݐB,ALw4#u]MGqNTз@އ\P#ʬZ 1P-4S}Sܼ <fMYCk(,Nb\y}fZ)~XtKwピ06(d@; .ա!jFҲp!{zq:Awy\kz8G=Z d;Ec:nG{omiI[geBq <{ʼnAiFVdku"'F@g4z.^ 9 wg/}H\/&L@ع8_š/n9ؠň Ѷ) h|g [HMRUOVczꪥyAۺVHZ")"1:hJÄ0ZdZG ԋ6A?-c㑐)deqףrqDS#) b*imrF붲 B@A8w4\||cpZk%3;+kh4ѡtO!*ut&[UFYQkt@]@cmz7c!(kIT^kB5{IFa`-ͮ qdX$ égu:ykg&)ZlaUtXR ctbΖf 7C؀0~fYӯ}]!OtA76dBuZ%ܹnzܳKK B6:AO;2~SZsٰAXz}6o[<3А},/SC5P~uG. 6 +Xs nXל}N;&$ o o7|jLݡ;"#+49: R$Fz,5 2`BDDϵ[;&ivj#sg]^||/~\v5uPs 2O#TڨX] "u_',eP;Zs 7BQ5z@  fFc Zm~0'k&"VgzTdxhƂGMjC6RD |#7˲ݒYPM+gI.Y&S[yඃr˝/%WȠiu |e~й^DNH M׮ m1 *E7^r<"XVcA M)r}CKG]Rۭ<ʑ,8}64gTsa_)`ijTtBWFR!~ kiD kXdFeݮff֜m~X2Ys gp3D~Ӧ8}v Vʒ~q+bNznLF+הKbYL˶nΤQJџQV\hK dћ*OI cfᬣ)-Pڮc< 񂟞3aEpUpp箲p}‡? _3QfLR(8}3Kᚫ ;`ÔF\ {Vfݽ vOH#xlBN`Ќk|{z/ >$ᤠ!\ ~bVo*3/ML׋k=&K{7>Y!Qeu':)k\0Z~5ZT}!XS)ɤ)Wt 9*t2 ^0C \Hl)hP}YaPF) [7KG3sp_%v-7߽['fzч4tLjĥlc9P1E@Jba }&1 f!:*dNaoQ)#ӝ3Q"tΥt Nh޳ga!?I؄p{{򷌨>n뜏iZz['6!7^33߸w3|o)֝q6M={{Rp̦3x&d,qʥ2bFEq vT!tPkr$FVjjJ咄%ݨvzA6 '#x3Lp{YZcJ#BM]J&"J4H y B:Q|B9hWMq)2vh7`4+|MpJ9;+s-o 'cFV->k3_ =RA(VA\2rc8CLnB`S+hƍm/gAyqkzrƒea+eX3B 佌;7WE͘+=nMwSNE7l /JA:WOPM+Ш>e6ߜOvǏ] ^n[}y^YzޠBezsImŰ'Q#BLh. X,d}1|1*,@1{@"$4=C3jBQ]L w u2 =UA=ƨ5/Ra:A^`U_$|jZs.'= v\(g[;6 kߝ$'L:<>x,`oB]{p40"gز,pKT+uH ]iJ'yXl- VY/6Ra`8D58K ;7`J_2 7=A mƜU9  j?v5G٣u9|= $;&ףc=6K<Ű,T( i,҈eh#b2If,:^Mbϧ3Jg "TZћ((W$$Gkߴ #5djv^uǵφKϔid<]ux_<463Ө0R@fiāk)tYW'_/}2u\q6 ZwN6!k؆:M7ws("U\ JxXh"gn ޹RXRܰ.BN7 }r2l 9"^hKUi{}*B8_Q') MQxTh>BKAuԄA<:یĉmζ,gB<ǫY^4zΆ?;ayB"]ES9tcDlkj#4!&i?BI=wdUPs C$Q1w﮺]]t" 0QA" a&Lꪺs?soU!qCLW< NA3|.u?o!U5?G "@\Oe2Qs~pEαVM<~ʻaq0 ݰ*Oj)K❜YH0L..nsRP&4*R(m(,s( ,I8zJwJqh4cB Cpj>Vf-M/Ϭﮇ45Z xM|k*!gTI3/⃠y;CY *I'RfCu`bH@P&kfN:.jRajX ǚxYD3H:N5}BcZ?:Y4ٚoI+VáG`?{X{jLuz@t$fIKHK@٧­7K_]C.o$:hb!E&x23]'wu;᧓y ^t,9uOuYsd"fIs>pťr^SV%⥞==r2yjԃ ɵӦiwȏk|x|MgSG vxi@ûF|l#[%ct_| Ҥ-w8|z_l'k揭1p`wƚz^CξtMU EDd,k\|B8焲DgC }6IL K!垒 iD\hf$ By Nґ:/Ӆ|} >R ^'+s̯Ubxq䲧5 QGT(Ɩ*"D$/{zw<'D@Rh{,[7\+v?a~`8@9m:6ώiޯ"ߩSzt[:gIf1suA%tc5TH:6B|3^(<IDnAM08(>Vk֡|(jw{d''whʲvA+Kۿ[C Y5F^'-]ۼ@)2fO?YYp9ʁZDZʤsc֮)I%ʑOF>Z( ;iPҐkRS9q{CV%?ZhӘz`P)<ԭG6M̚ 'PO hpwwz8zBi|z]\-#qs"I#eMVaޭ&P @x⽝< (w qI'RR\F;#MX X9爠vpѰϒNpg ?Is<}Yu3/QF/q):%IJ"5`:Y+JA׍WʔT#M21RX|;p^.΂_^&N.oy,3s;ߏ׽\No)j_[[}j^fͬuS&9 T[h;tq2{V9b5IFm+q@T}LEHnzL ht "S'}sG}"@{bsXa;~M[}KS̀l&536qV,ŢXJ2\+Ϥi5,m `sI= + 8ueP;=ygBYLZ{mil] >rrb%j4&MH3K%l&?V7- dBlp:-`UBM|f`2q J7T31ܠBLfilmU"3,̑@ H"F-NIe#;N9r@ 5Q *m`[Q.CMTK7h4)uŔ{$ a{vmǦ;qYQ)0fhEA. ,^{CVN=0?u*X}[JL3R&C6~PJµƶL$igiHiByz XqՌ}YWG>. tuK\q|淾 N<U},gρh]@djRwuK%vӤV^4f&eEVR&47ckEr-6RD|(rl;닚-)(A8yb(jkH1'y;7/f+,hfnC(+dLqHTo`[n>S\qEdJ~7ԭQoU^2AyX`I'۳0ȟ>EIK>oڥx|XהJUy6w@wm ':FFhS\&3E"4ed-$DRUA!8ס *\&BtK;h$R@~S&ᫎ4AܦeؖZ#-3w:?y=.ݤ;1;uKVi~|4p3k aîxkGh(}e;\%mfE.ld<HnxZ-3Ct#q5Ê @GbZa3IKާjO Jq-&*LlmRqF?OT& a9LA|4Jnk5m+sm3}5{nxlK$G)I8zJTi&`XFY" k~ʾ8;O$c{^OaӟN=&N J+B]N>J))󋡯$> ՚~j\ %ȭ{U1f K57A9H);R՞iȚ*Z 7eR(Jg6 *X蝯\SYiZ#״(؉ξcv\݃*e72֑QK[DaơM*l,%kpho1)1/*&&z88Ank AS%&*t}s꼱n4zR>Zdjr"jD2HZXSx:90_O2VRT٣[h$o]=I Ʃy CW~Ƣ8OPJghnC-4#tWp_ѵ)Ϲrі4bxۋ| #ySV/~I R,]p3YHU_ wŸKvS^p$JBn =]D5R+9?O1&Xl*pwcB@ƀN ];Ph`ke6bc/Bo'`RX٭u=?L?kcQY*rc2V|\*u][[*ó_ Z--܎\(ܷ}x`·cOA5_#`nnP:s³ @%%55Χ{G*;.>ɇ Sj {Rε$pA+ W΃`~%P:Hl!iҘBbghޑqNY;iٿp\nNj,$aN1'ȘfUse.,.xfχe+zЁ^ǰ_p +旸0lf@T6Wo$\%hKK79v\cR㶙ZJp3(oܠ;ru]Q<(W%cjXz}=V}O3E;\w.9b!~x.uI`:'e:3Lf1Cii\r3v),&&q_nf"`g9p>ɺBD$ O!4Xj 3]22f^د{ޤ1Z_Yl XqR"Rzu,ea.α(p̋Rf2z^͔3'k<~9qIR@RSWbCRWVɹw[c--GSuMjOӎáÎ&5mƨ$U,ݲ D: CqK`^prv߿ݍ_cb8`_&슡\[ u5²1gl1A&T8Hqy(Xf06%> -N&);Ô{6~|4p!ɘg?O{,_m Kiww ?𔁁!X {.n;\q |Sӟ{g7MFЋo?fCk{|٠f5  C4HlnHҟp;˭;tR<{t+ .T֬"~p6_QNRLJإ;P(1[ebxBֿc V8KkycÜhrGXYO]x Y~,X-x}Pֿ"` o| 4򬰰˩2qJ{U5'wQUx6Z9P]|g֊D:ͮgX?2-bt jӖl lй\8AoTAauQ5*eKQ%ǐ}" Jl@8ǢhRBХ,8f9\gYCâjʼ,R%Ch+5k/iK䌋65@c 4I+MдrMge͘C1K2.TD:IZ_@2}RHȠ{Ɔe2OixY6ƄTw'!9\A \Y_< ̆ρŬ˾U,EN3h(N&5ws;*ui##mHB-*PXH[F.@#^wcnx[jS!'q{3`Lr KҖ@Ƅq;AX-T|x6l~h^#;oGbVqHk{se޲Igҽ썑mpB[uyFԦQ /qN6:oI`urnj_, =8֮h7GOoZ ÚqV,aSЭ `t7W (8_>w6?k㝢96oҪLY Ӻj[CkO~l8@j9~ °sjaй#, u"$@)C#MVXZbB"16O/6yB8''m@@zh(wE:d|7wkYvӲZnjg j1C"Rj4lnj1LVDK-m3o]vbO֏ ??rȞ[81~;6 Ї}R@Kѥ<1A1щ-4`Q9$"VBLKEyև4Y+#md{K!ׅQr8\]L:xdY06&ugS>|Wi''xY [MͦҦh(qIZ^f\Ucr* q)i"mUqh6ѡcf~˷~>2>-#e# G?]:L?V/BeT. mx ;)fŃl }A'?n諯$mZP W' ~. 5õNWW\OE< Fۖ cW_̝mj*xpp60n8czYC) XTdf0N4r/Z"rE;o|sL"eo @vl._G5$_Kq6Z3*"Bב8h_lX'I'KZŅ20IFDkËʑnVrQӰ kDVԵF+QB;&fdZkJ]1lbɬk Mƞ&?6ozdɈB7Crܤ 3Tk|ɂc@ʢ!Y.GwUZś?tGM?a|s5| .nP 9wEA,^M"pU20@q5*&amw`͜)Mbj5K]Zyjt^=ϬL:qГan>:1MSxo|.ȜM$L7  NdT Jmk;;_)4Zq 6,]ҦwElD h//ʞ2o|O>Eeyf?)X-Ē{hPJ/{52N υ ΁. kx,@;lu)pYەl|".p;/E 9x̯` ?P?~-M7PŤ5mf(iyZ}Xآ펕Ჳ=O Ê``z Bx+`y_%0)BN!G(UPbS$ݱ,bkD@9son͛OQ%{OEw |%kPzJCN\]>Lm1D% $k3=:=xFw ZbK>'%]jŦ{7]jbu-dtw)ZAŜ>Ü>PavaVe AwɭoBto8bV>߇k1DgڕӱPRHkl&i7p.-[S"Hm+g_4M6G >jcZ\VҖ~gêYӝa%.>፨r q̬,d|HS|-tdM#6kL4,xr0UqϲXkE4ES[7s=|xKE2w!<9Smz|h|@G$vT[Eܑӆ}{S|{|~T|}Z,Ɋ}KrqI(_}po`C[OC^bc~ 5UZ>tS]'N <xӋ=P@|<@mNVw|+ooCg?kJ|6Abip="q+JzDgRDi#К'vy$*X(MARF6oJidɱad';0 .R;–Z wmI5#l2lJ O(`BmF ]5=Yݖ9}=MX΃s ד60,vͫsonZBv8,hp>\iJi.uyEbpʒ1K⶧$aw,"~[ n-rXP\ +:Y='? IDATZJiN䈧03VZ3'TӴS8PLGkEX $;I™%v)"4_hAIBLbQe>]=7M գ. ?.̧KXa7O]c~l$iya"4OYKޢ3<؇U=ßk淋'õM=K46V ҅YƷB6HAxKc S&-a#Hsn0MlJs8y|k <?рsS3G<:h8a^7-b0!}Z5©O|D.3=>zM_itI֕֘DPn⾬-֛f>@bڽ&-3zd}7)#ůnU6EyP^kaCaEG#O3&e_4A|gͬONT'*RVFˈ/Y"С$;d0^\)`B*-h:Y|Cd-C\ 1#mbڒ ! 4adYqG k96 #;tӲn6%J;Â)ik#5ϩ {jcbdE54䎆Ʈ7(kQ΢J+,OXbjo41'MiT.]5xa|m_qrҽ&jV̐zLKԪ%|T I|.qԯ7"vЙwOrmB f\IgR[[͆t{zaX78hOkCbs[_Ns)U-+2̓~. lP QArCB!6&PAHʸZQ1S2mw]15 .׽NtdWm?$ax aa vYȴ;;%,`|\HcheylpfݣG~|P<ݼR>֭yx ,myW~TW=OJ?e- O޲o~o g+ db?G~>u3e]0kO?/c^) HVSX!Gn'Lί _# Osvbw{- nsgs %>cD7^9Ċ]w^,;H);Y۶5`$iD=#G؎ Et큞~n+\(tUᮧ)9}̀iL'?Ƕ}o:&aV]<7[( =УÖ>4k~s9 6#HD0_DPWb5Z E,NU85 JG4BE, 0+*\Zժ]hC%\G Ҟ,P2:D=FĖ =$RR-vڑH|=Y_-ZBG~DJ N; j7]K%Jy'$e>TqK'$Z{;^)T%\~ czZʚ_o&~$`EѦF;JF\~(Gl<C-Ȫ5m>a1;lx`e"BX<'!?7JmX:c"fm6prӴLGLtM=Lg1ť6\^}OC|5 :P&?{!_?ҍQ;dǡ&dY_XQ5BkEwLiϢq%g4FrHz?2р * ,oÃalӸOQo65! Y*M¹">Lu;'Hmc TGc0Gr-Vk\3W KWE?1u|}??B럣K! |H}[/#y '{n<= f/y#l{^Pl%QN83ΉjtI7ki|Orzg+f:w$l88Xn&fwi+J-˿Ҡ*)WX  mtI:&vVN}<pJKp:Kui*a!,u+&{M^ 2WZ)lGiĦSk]`)0udsI a94 KkUr*VAp )84XlڽOAe]5vlQnCH逸 MN3h`eS)HMZ-ST c% #_RNjolUMÖ7:_lQR)}Uâ!YK:q @o]*TJiL>SqS`|)?M@#ׇYcQ[t⬵j2)u]зsb;4|k?x2I(A ]իaݞE6Ih/| D} ZCĐNa̭q_FF0ᮩ30qB'BGT㓌']1ȚY3>Bm5`םxcP[.XxR,űpѻzʟHY/#0;րQ2 [J~do}wsԍHޞz5KNF>$ %h}0{6 Y0+lw=7Ο?xӛ 6o`]o9 9j;~(,P*~Y1|^2碿20-_ygs^OZ&\}|[F`&ؼE 2)Tcxw>/Š >7n|sh~ D{n|!ڧG~zQ_? A a3}Sd] yoUԾUf$.y6[d ;F( "*{sg|QOT ;7">:ʛk:qNBkR)C_cz {,{ sz sz av?8-Wy?[KX %ÂrR]PQh fFP ܇VJ^z=^\xE9>*ɽ?.hN! *9a/)' ~cR*sO~qf8׸5֯h~Bxr-$)'rN#7+҉ XdҐavȑQ)k~ປSE|7)H6mD:> O;Z s{&2PoxSRp 7[R@tAiEn ԝ\h^n*C5Κg4g~ Oo~ d'%~Mq_ u^~? Mc͖&xd2߶2I^{{,׶bh FmZN[[mS8RQg8\egprHc=qÉ: ;:׏͝ u T0jWw 5C6e%L:8|ק x/~>ڧ?FPX*,Bu&A&ͫ·$̓w*f x!xhh6?M^M6Lh?$`LpL@ˁAǤs'O#&}灞ZC_t;T{׽{mcЁLjtL+뫚^FBS4M#kNkL64tz0{\Ow|tg~Sg[uq83A{j\?EGyȠ WwN$(,":cX ;2-z 7c|g5؊O[:TAl 8qt#$z'jO kQVCtl|EngAtn 唜|>.u{q37˽#C%F6@ĭu(C9:1ϲ`аxȰt,'NL``Fg^TfsB=;2P>x3h? N9߽ ʁZ)vb6Bs.pQWL&!x+a%Еw+wnτ/#S'Ϟ#7ȃU?6>\Q˴# JͷulT =̉ 8VlRɌʡ7/rVґOlmw§΅{%db,CHal78;p̔Nj|7.Ix?ﲫ)j'OM];?@C \{\p>B3X .!쳒X `iO:%IVut:=g~.-">^F9y\!88`Xzks@+`V 'wRN-EJbtM'څoSR@talLwvPP~.P A9%,\s|+ú^[sQ Iў^PEld"F1%KJq^Rxa&Bg}IJL$i6 -PF] }N2m`I͇O?tǚ ;'^O6?aN\)@`w)HqAs֪Нi*PΘ~IvZ'-Bu|}.XסaR2)U upG%+iMk/}܍gAp㯠T*  jSW8Ml)=JytL++6COZk1Eh`o<ߜځP+Ubf+6iV5Q5*nިmEbeQF?: vXt8?3Co'[zKed6WzRKo'z IZMLIdXOے) +RHAC]s&BLlAAJ~/Ųs9ؑNIWlZA #K3&VXV,CJwsZaeAZk 3ܡ܆[L\YpP^ n-bts`6~#ܴ |xl3=N9f*JT)Z 5J&hѢ SXIiX6U\#$ *,1 :j'p)tl6j GxIq^ ΃كS}F$r5z.'7Ot0<w~+ѱ4&Ui`aJ?!Bl[xy9pN8 0JILT2*ޢW0v\ N9]oOatS,Z I^ vSP/Ow=IQh7 WLo*xUT?{=j]SANM|jZ!9D5K\&u$y|'ziv,ש=l)ae3lMmB#o+poK^w?f 8饄JϳEA(¤7\A#fB-?lP=@((JIwzs• B,Q9",N@GXxߩ@|s> "luy C\R92['C_5躨0fw=cs|6BqOduq#Q;R'A]9a`;IIBTd^ ( 4DZ[:@iY/{@=k2c):K.[lU+}$Q6JbjaJdRYoXjpiBs ׾'9ؽͩK~&ptG=9ob; *fbkh4RrLiͭ AgfWeґk|D.,jyf^%*K)mY۟{3^'F'dpb\\yNxҒ.~&Ӧ^fIG, v |O_P,hsf2yϤ%Vo \6cO9T/*x#AW'0޹B롵F4ׇDptA[Ƣ[ &5ء9p-pĥ6u$z;Y*@jlD\Jz}sDm_rɊu56ɴI))6 E`o J|smIh0U#{gݣm7\k}=nzRTA 6mMˆqc& IDATa-hM(o J**n{9g֜?ǜܢ:c8J=ךk~?=[;#D;oٟ!#\sp+Z32FVE.Oa;<3D(MrrBM}c{|YF;*=`cxiG<޵3ckhF=ݨnhjr Oj0}2mnE'ZZdg kv)]fG'zJctP{,h",%9HAv#gE1?Hq ޻DN`T;Уv33$TbGFZ0۬4) U[M1VoKD 9Dm!-Re8A bBd:\&40&1^oU~ m[,^r4`/y<6|>-O|||vBA nV)>'yo H1*E!QqLwfvf@m V/$ Pl in؀U/aTlnX=/!Fo3*1ϭ3.)m-|m$ˀg>Gy.4;_UWC8eeoBr !Lil+-a ~wP|E?$lkv8`VL6cq S\RmEH!*A^BK%yuR(2W פ ^ kqK+:X _r>i@\·nWaoR_,@.wM+:ʙ.-;SlMOֻ5J5'^I\tWP(́!Ldz7:Ie_7R))肦ڑF- R[Bx[{"*txpA}O,n{n֯Dx:63N;gG;Q w4;1fa05^ǪXJ^`Y4{IBRuhB@kxzF]oQu+>_%ͷrW!6{\ZPd>o[E:V<v_U'|Z,C(_'OR81mdK r<߉~7?^*AB&.*<Zs2enoPߛǎr;V? MH|?>볁׼X/aQcrD.o j([ ԩwlmyp?:~Ar3mА2PXd|}, Q5K9Es^Qw;NSt˱8iRD Iv^9Ys8mXP&2e_<ތ?"Nb:;{~>cVȁ/z*QcC 8hE4ucduƒNѝ_dJH:*>Ժ+ӅTm>`xUo{L;' ?} x c(."և[<:߅C~ l ]K[ͤW"!`!ً^C1fj9߿oZ#4)}A EeOs ;k")Ժ1.o0!<$":.Ep#VszXqvebӻ!"u³Ia582Ly__5-ϾxK;L&GBٜH/O~ŸEi0LJJ( dEn՟'G@q"XYf b@ZJ1OS:]+8)g5H Ky6.#TE7hHXmWF bqN>Ӵ*_^}L{H6ܦ覇=*Z ~gwx?c_|ן j.0:MHsVU^t@=xtiM?:G6l>9z''=w ]; ao. 60k1ngws#""o 68ݨM"Pdhpg{*$ 7;!x(m b:`"l9J쨑>2 E?@qol!FR` \ɚ&>WGa8ď ] PK g~ nI^j58A?#38(9='oK7J4f\YG2X5 \QY?{RˈhvH~o1 nܛ{ǓSo&I'n׳8͟Iy͇>/oۀ?#e ]Kq467M/[vlmtd|gQOs^忍yKYJ)J]P P{v1g\f4!A؞&I@\`9+1?Q;^&_6d<8'b}x݈ae w݉w#b2XӲ*Y.ARnv-. 쾀̨GkLOz ? s_8~EW xIwJ9;I7 aF\sxGd g@emǵ8?@"x d*܆B@dD#Ae#EpUfIJ]o.|\s=pI= aua2,dѣy難^,koнugi{zjW2,p)0:$>9\P>Q.֖Nz/`M_ oaKsBtS.RLei~H4p"r]!rlڑ_Ujh iLN9Ǯ;_aH(o 1V?`= ,ej\>ڻ3߲h>?Wn <DB} F;;fh"uwSOC߫N!9F4FEsA, {h'0[F JW \do,i b6jKlQWŤ1 Z/1}0?I(O| 8FlZ7W.wWpۗ!6 AR"JW-jTD_; k +1 )`^g*ȼb2fB! Qly1"hŴ:aO?l̏y<@&3]@]XFoyT2JU[x8πMu݋F]聐j>/1F oL;Y+cXFmPP2h"?CozO4Ox2㟀rMspE൯΍f; Si4[nVSs,oN`܊T+>?Vq_{w #,ocu[qp7UڱbMH讞.(+[% DZfR]*a 2]FiOO|&ͷ ^/n_J;giBNʽNĝO9E'<c?TW{ު3P ;8 |+׽'SKX=yU3A ߉+&P"Tu#b8J4Pn>Ձ#x7|8࿯M5&;3("ץ^ͩ p.ҩ>^*ʮ4CZjMЄIrjE, :D9λz"(E,O0TZH;"t3iJbd">"7 븊SY'L0'SOVdy=csyRNq >1%Mn&Q.,ZdBzbje%BN9+F z3j7C ;oG8ܗiB8 |9F睠1J?; Gu|XYk1DT6!RQ 0b"C(s̲H,9-(P_ > '|8=S> v /+TS2^b5MLNԋ4k}7z\||; h0$/[Pj0eBLye?o2+gFfd|raAe=l%W-l DVly|'2:YZ^!2w}z! Aﯯ;A%9>Mw):uެz,j?}޾ ɯ啑{»1 .v{Q9I m5EbLV.1] b;่-)dvCIoV\)"acJc}aƾ̈82A!3gTy3~w{4a?7ꕬ ,: L д3> P< W;0v~w 5sCLvgiu߲SvsA5❷2hn]._:UQMvl9S1Y^*Hf02=1;;aHs$H="PN7g4ʼs)`6uhILivQso: Qgf(*(U Ze3O.TQV\$ MIiMc\57LUbblI&Ą' oG-g/?K8NtV0IG(S0i܏+f,n=%}|uxSGBzḟAXъr&+,U.5TFtZ.6SFf!S  kS|VFLvڦl ~6Z3Ќe!  7$r@M++͊eP:gT!Rdy.Vk^?fmXTK3,Oxʚ _Q-fӴ:&}S ED hX]Kż2Waot2c%*KF-BV%Ifeo.Mtgy3{(b~t:QӬy=_Pm*$KsBte7)|JMnE}=쀬#&k3}7 tSiI*)vnHCKu_te[AI!a͋q} A7p /s sɔaɵB>J Dl󌣯 A.:Л/=+3F@"jwYZAIr<|ǗF)don{ök^, uIFܰҊWPȽ}H*xJ޹h6Ll{P9:j8O}%rsY'W~qӳM!Pk^ب4AF fh!,RfHxQG&셝Ζ̺X(m{&( B Aʹ`E%`dE1o3gFH Pe_58`uv9zQCؕ" {$N0;zP csCA/l]`$Y(y.Њ[SȠ=(:qSСiq mk&d]Yeܣ@k(">FKf]cZ=oQQ?CeX ko3P7!4Y*@Pz|ﱠyJ[7}ǀ4JeɌF;yS:dPÏAqo`K K[u3d/nts @a6.s%њ ,òYBSċRS>YҐj&\$ytOIXy#EqfώjBbŸȀŃ`{AښZhl8gLVE\l-09e׆y4 ICO6CiZ-+1\-} a`Y.@):,`A Q; ܦɡ8 P.:Ƀ;WtRZHfcTR-V(- -҈?Z?| $7PA\#O6XR6]*@Ec@Tـpz>|<0VuO_l{A> R3jk3y[0,"pj7ZfԱG*Y)-PQwрEH&Oqn츈,%?tM`H Rډ6A ^4S X?wuAuU k81e䛭êZʴSscC E\t*?u*h]۔M*_)5twj{yZӛⶲy2=3j)*B+;lƥNYm|JA(DBvCvܲ&7'&PTvѫ BmtR]BKcި -'mDFA a ^NJ鸹 NcgFl3CbCƽAP"Rz4Nxp 1ŠyޡrPGj4L) "d:Ipk|jT) 橶|1!.ז!VD囂y-yjć @nD!z@6c{Ys*A➧ȋsD^:C_r+Ibߜ:Kki ٟ*٢0³B5nVüɊ$vhjXZ˂ݍJ2P*6)NB*k',}ڹ3v:-c+Y%o@sd n^Db%2s-0]iy#d0Tᮚ}Ik++ 2g_LirM*PH\Ѽ-o@҅i#WիNp*p}QЗ#Ip{_Hy'9 A6.P\Of|䓶ڇh1?7pD*#ま*@'A *ɡ)3FF&D;;I'ajp> Z HE~3t0JXҖe(Q !Pp X(5gMλ*"Z4 r}TUܜmZ_rx-ΌO^1yq*.Fe 3-O*w "$vNϾK CМO=K 2ք8W̛yJ/ی)#*oL/C D ͅ N $B fAL6."xՂ0+| 'I\Ze[| Qݸ'p ZA;4DfL*=3)Z>>>*}5ǚ4F;phH]Ěb|G][6 ӂLܖwwv;͏?bBUYcbL[HGL'4PL.Øg:ƃ٩>.!—ܰ.o/9eJЦLbe0OYyu `Nb!tz[o=128՟߄0§ŗk{d)4 ]H!׮(E'67'+@;zSeRl<rK؍抒]}":L.Q;vA)J (.Ê >Y.@yObFK$S!)݆(U 2KZf W _ԙD.UVU)q!ΏfBp=ћ4Hs ϙ<2 qTyLP1/UO;ԑ {8/<'lȤzh[E[ݞ) qe'njp(:-N,,bt,T#rR͇nǴe:K Xq-}GoZfM])2j Ԏc\ ။}1kNx׿sV(TAa5 B y[` %-D7ƽ >o>W=;oP͠>K/Q Qg1O#I.m!- L؛ӂeKttÙb Xv 8N\V>kvSHGDvzgqEMqr_%k3D51M0W,F0q>Y sS ;5; T:E`ھ.@0qQY 8yR/OX`(bu[ƺnP?J1Պ|""ir~%bx'G?$x=Wo¯fhne[C*| ;00HS6%kͻP[h0W\Rb`"r7#.,am[DEvu#Hw7mqJU5]]XZk9` 9v!pOUtGw AikBIlyʾ)vĨ"NKOr HAK,ǜ(%;HWlvXֹ @}:\c:= -+_%1 ȩ&p>cN)MDlt[IPUfk(]s##70 ;@71T;00 4z2jsVG=ulAe͑kHIu+ƪa+rɸs=!byЦYF?X*fty0J6z6 cİ3Z+4a! pUV(f5Pײ8Ex)GQ( !%ˢ;{(-`\}> Y8 X-ԳizϜ"& JXZVxd7u1!x`zK?Zaipv'2, ГV񐝳YDbڳZt6S>+-SkLNڤ"Mk+V fF(Ƈ(ps=4W%ZpA,le$ZQj~uF:@]BfD}Mj,MxC"ϝPM&r+j9&^OEIau;2,LSQ .fn2.hl  ׁbKapۭ9*WԭFF&SS {clzCwBVv5oڜj@Q!8e o juKSdQ -O#[u˂LlO5kbdFmx'芔N'"9; #qe*~r‡u1_BӃvd^bLNQכE6ʛd14Z b oEHN4pӚknD;+C{W0Ȑ1yo=mjXD2oMlj F 1dFT\țYm_)59qXsևD4a< Ӳod/PkeZpuZ{nIloqx&3N?sT4C팆ж6lZb1q8E&#P\Zw|BaC@-y7I1fKO95WC7f >-[[yAشL2y*͊zg~Txx W-f[7M λ%MRZsZwyFAD1D۹A pkЮ \Oq= PuadBe)œ `j)@@2+x,Ŧ[A)P+!頻F+`AQ#,wv\5hMw:5 |fqcjZ.UYZ?&Ҥmt5A@,!;nﮣ"Hm[9}j&:ހH Tr!`ɩU 7s1z#w.u+Ʋ4;Q>B1:+Plűue}VЬ}.TƗиZ \]SH { 'NU!f1ٰfn=[F߇IZJSfQ-KܼXg\8X#@&ܞA)'E8mvjmdT-xt4y &73b»ssP D:h6փ\#g0acdpb8`Gfb65+ע3iIbCV- `uTٵ׋Bj6\[ eG]s1E0ݼ3'Gr〾ASڑ~M=άob:!M)ZοuH=id!h*y{BTh0,$?$(3#\0dbE=-2Ǔ;$uIX]h9ǭ>DŽ{<@#Y] To }/&|ҰCW& IDAT/![mj/ ACFl>,D N( |cA?N7h= Q d}KQ= wrg.i7 ٵԃnjUйrL{A;7TRpm ֑\)haFZwt;<*4+ݏ]X@2P<ɝvL5FƴH; ͚V&a'EBϖ r4pyGw$.]v&Vb_+\X CsMk#6}ND5.ٴ[RjDs}Qfn4 -sTG 7b[kܟ||&I4]Ky5MbV1g5 D\bИ͞1O}ф2QЂBmAdl&#P/m*Q^2G[,\D0O{-ۣ-j.H lL"jF0 O5 JэiI U ijq%7Yzϗg䇌f~~%{r(8u t>>܀WzB}఺S سy7KIE]vϝq7vh&BPQiQe!5L-д.^.!$xY ӆgX`0b ch!k+2@|ףzKà2$ED0k\Z|6KK'&k,xh.3{ o-ymjj~VƝp, ,>6:kS\\nkRBk6n%5OCyMK9.Y36dm暝o\DuK B"8 ||qb.gnC-Wϸ?6$xfG, yӐ $ ,Y)bX ZƪZ)eBE)=Ni$NLi/b{ҭHSbsiqQ4 "j7Y4M3,5ayvYfq!yf{l/O5<ֵ6;èA䍢Qg %¼1hX*vɕ&ôV@#[v #bp䎃8XY ⮃0eڔE+PM" (2ӴKNm\T+¡i#jCu濸Y'f~]E4t6AKYF;@-O>ڴ"l5F t/ru"AJq\s Kĕ4-^2ç#'ahp3` sOUEX]m (sŸP"#xZuZx SuXV')U 0(&ZqLeI5,6ڄtprQ_>uJ^^\$s!Fܺ5AFH|G,M޽o?r_|sim |]o!Lч7QrsiPN>K08 .&fY!Fݨ𳖺oIL0#`lV|X7s{2նm6P5C%M7q &:0엩zeewA*miSZ$3=AI-&]qrduQb v-n?~8w'|U]}8Dw3΍;d͚@ N(vBvN{{笆 iG,ot OkmܾПOc9 f9ty:;OGhk=(t44O%ᐟό>{کm=<2s}DC (Z^wH.biDN LǓO ԜyqUua?lakl*#1{""ͬ]SCV>aj4 eX<܅Ġe N niZSF\M\">Y[KD@N&EE ;XCs YciѼ}B-2w'Px1#o.-QquU1,9,㯫 HlڜeVIEIu:иg|.ӜFK˺g~?+?|/c["gP١9keV<5ۦ;KėnqP7 <BUVBպsՒ0Ej I"OGVElz.R4v EčiMAם ٔhqDOL e`iM` {P24MZJ(xAuhڊnCxL+NšF % ّM &vnb 4v{lZ9*gc8@NFM |:p.n"b=p20`@>rz.Uh -d(aRVh3/&yM M7Y,|b^WR4!VBj4d?y }-EU!H6Аřr=rEP}j]K T5¼;Eh0J(MSq*'w3#Fu C,I,Yq~fՀ #(hӈٽ ssEsQOȆ9}2hc^^ܭ/mF(P<BKR1:V``k-SF,ERT7Cp+X5с6-eFTG\u5y~}*tk eK%nHs؜j6+ܐBG+ Oz(PZ%n䲭gnh[/8K_w+Ck3邚6hP}՟i={ :# m:1BV!L F:;}}]d)+:0ŭջ@H(Zj<;Q =%u@];ultB̺fV5}>@n.rF3}'⧿KyA: O>0rqdDPa L'Lj+Vk CHr$P\46E&rPqŰ< `Gnt^g拓"b8;sWЂAޛ#C-8vW;˄hm;$-!;Da\'dE9<[AQaj 8.v=ﺞcιzIMܦ~6*GOĠqUPA Rm%R *H, 41Uc[kI9}_cv {» d5?vѱ{?$QìrJSj19ŲHLhqcFm&}s&ofP[S9H]XG;bC 3lŨNa4R_c6|6I2|rpf7QDޞD=炋MaDM|r(/Q!1Gl zŋʸ/iA(& m4p>a`1`4oZߌ4vVsl.L+9HCr2Z/䳪!yBy'qٺ 1^ʏapck3?i])IN uiu˿g\rkm< M%{M_nކ"NOZm8^:$$hQ >ԎRzy.i.|AQp*շ ѦAFbjL(s3&|.c`skshn̕/CSm>Ұ|#9G&x" ֲc9pAtǵj/$Ht̹T3^nj{aqAD%9X΁u^F Ldyo75Ns[0A_f4#ə[4fԿ &? 2 ~ᆟ}n[u80~y.F?:YH/x393Ӹ?+%P@xC(#&˪iJP̘ ظGfd:0k6L9˾Oi Y 1CsjͬJhϋ2+,$wfO!st5.ҿK$"{0=;( %>)k{3IݵwAJf܉\. zeT!ylO KYNͳ4x4S6zWH EGU6!mz0q͢wC=MU%[7j;h"hmy*]H|#2Xk] ͋7l >xsB~aÁZJ*GZL u*7kRpunV3"&؟n=%4#`y4%I\W>u+)l(>G64(!xsFHA h*"6Ck63ӳ h%b{Fsʏ])**ת0/&wԛ0i"׊ׯ]NQ*cߛKGD Ezs{T{"uѡ1,)\P.I*ʓI.r/n*8 ˏQj>xr]r;U|/44z  hG :}U >(݊w@9u RUjT[iz"QN0Mœ=^>D|׬הp3r[?m0Y:C1 Zðq_E rjL4,&Cm;Z. R/HC6czM`Wh;>fk2Zm:0$+.lt3ygkÂ!'~E Û$-"ZSu]M?G7ԧ9- Dq3,@w~ U>QymrJzInNY+aMǨ<8xFZu`}-9cK^1thI2S?Ne:m/,ߧf!~37u70c6vBeY_3,8DL7%B heC |tqCc pa݅ '46 >*iv]Ui>A7}vLOLۅ( Hb" k̜I?=eA\%řIH:/vmѐlpp_d&eJaL.JjNdÓ5>zS.@ 0 ne{**D(PV7<4ݾXGuz!`Iڢ5=!㡛M9ލl6!hcYQ=a$.p[!Mp̡ۇ]$J&f:ګNuˀ>pzpGZP ~z32 qx=8%WPjuOD%Tβ"z8=IuzQC{ssJz?nɞ8=e>pzW}X1q)*ĝAm&;4*+ fQ4h*)=Cf́k,ƳY-rh%CD5¡k%Nn6ڮp &.aJSz*M5|/HXh upaCs'R }mb\weٛܯMx4!M 1qd8_:Hʶ&`жFfa j !&tn'xɌ1B6tnɲ !Ƀު,_{3 >J>F(<=mb53O4gJw%k@N2y<;8~o~oߠA$솜G%s`YNR{(@~-@?K6Cx+eiș81Lsɔa+mg}_Lۏ>5=TC 8,>@6mͅHz`G 싉p 1[@& k+&&ro™SD>Px R$;[5LK4'd`87 7UM:p=uxm*3 4ޫK$y Ťhey)"<>ZG<CUHAѸf IDATI4|~eXlJ7f&ufi KNŤ[j*V:zJ~(xm$)\ݕ|LR4B Jjix׮;i,_[Ul<;\sM ~S;zOH*Q);^E3 1ǍsHgi>^mc!uL/ [ &8~^f)Xop<2YW)פPdNBCJ|q vdf=,_?:ƒ#BZVڢp&p^eoDG6*~n{ŇCӮ&͍4|>xٸ᥉ j-P6ls;1.,"UW !$8iX|~&m{vPp@IT9N~-k;tzӣAOڏrmvCjUe6a;$AhsA_|Z:; Mql:]_,rwؗS<\j[|ϻi?ʹc1t b5;!> чB ycrN'`2`]m7j_Wq3gݔi._U- 9Үi$ɤr-H׃GZ-؟w)N4i<]r_^ ,!l7iPNQ.k_||_?v_Oȁ$Yy.!Bp4>0^;\|]>gd/ntVg 1$/lWT-y31\>R^]31 lPSH'henkZ`lzNP>9[<7=hw$Pڒ {-xŧ0Muvdf. 6)^ҭ&(3 ձxdž1?)RN. } ĤV{E6qpF~\wvчfX"$kfؖTL- 9 QL_#8oOY}4/&e H5?8=eiXԄKRTq H:OeKN&L{YlRFt)G.VTj/IVD^ ~/}aGn -+B\** 2p+̷%0}{;&t:/a1 ޭmUz LLe\{䍞ē=86_u2=Ö}aԃ\@>9lO WZou^'K%.ɴZ9sFӵrI`Kp~N6 ^%&obsggj09[zEzAx&u4A2N96G\pA*EעMTSr&*͢X4&C#[`NO" ntJ6fq \t gKYς!^\(ٝRM%qbf +>@"&))ncS }v×wtF12œbpI3]8$=i,i>8 N"MO/݆͚Z@%s)B9^ŋnRSZVP^"){V=`&2퐿sԫ).fҥ7jNKGkS]AGR:%NMIKMXk&_7Owc{3ym Am2˺u4s9n,m Z75UPW$YSWBG<*ۥ`wRrFjC$ۼ9kS37?!u0ʐAB 3ͻ%Dt2g${Kwyog{/r^2ǩ/s?3si-@V8p}Cmʶ#pO3c9ݺ`pnuf~ -Lr1:Wq) ui:%Ί8+ ̰锄LZ&<v740jqJѬɣ踃6]ryqA" sak6/mA&&(JYn{M<8} =wgOmq0zXχVsM#po 3yck3qnXA 5aRB:T2lbb)s#u}G&,uCtnA 7=b٦hӭ8Ч2xk" cމLn'Jtѭ` C$"O^\}cȅ_oUiZ/j&pյqX,50Փ:96mDOഉAkq&JYjZ*2 u LDIpRW؇Iy;ׂ pۗM)ड़jTnWgѭ=bNf-=%"6AG"y+Z8dBQXm|qNI+ДAxRj6 lM%Q>!9e/?n;ѐOѦ1G^5@E_mؓdT厢;V@~Vq܊<1 nӓHgOyWN/}:%!0~~MXUSfk qx 钤1bNQq:'~ӓG(}dI=?"V Dv8nUە-䜰4"D8!21[ "#NOք,5`q{E6O_~H[R\4n n:'TPN3| _'G3,ϮѠæY4l&)6hyVNU 4ϻը >d6S0bI\>HՔfrwp(h 5G=-Q+L}e[oHZZ568;ag|apBL{>"鱬{ 9$gVŸ- =s4N iΔu}2`5t+$IM1%%r/$ŷj(C#𰘄L1&!&)'Zc??/6f_dƟwHѡhg l"ɠJ8^ ~p^ˡ^~oʖaIp%!锠a+;C=l!jEk./QY|ݨL99kgi ͨA< h *zpZiU]$ItwƠ9N)]ҹ>99$꧐-B 6a>w-lADpũ0ۧ4]j%5FJc+e RNШ;F:$Эt85bfm/n1O[wxE9?$.h1Oxny~\Ik*Sd*ņ+nc>2&Xi[An4>Z\LYԯC9@8%[Fg p^ٔ\o̩ܪN8m٤)_F[Bc !ۏޤ:@k24Hs"J焘9!k"[0 %+x9= PRBܠ(|6΋蠜f3!@'}SٖFbi="%_?#P̡g.73&. 5CDny1W t "\" \w#yw\aٹ9;4Sմ`]`Im"igx$.cziIsPoMBgϽSH`|E3`;ٖnۦwg`~-~H-/D Sm-g/R=ЍUG:HCQ.b0FQɣ|2״Zӳ鸸2^ ޠagܢLӧH;h?5ఫ/q h@ŜXvӿ}x?N玦8R*|qȤ!=[@@ jMaIPvw%+Ͼ{=u&3`e*O<*fдo?*ŮvkбLqf0] L6c|hDһĴq>S~fcL7M͆nxQm78"h$?l(BIW <5bʍ)LRh,5\JȒM 9iO4 rsR-toC7%37onZm喿[n1l`!먁4.'6SŒ:(8 EF^_dhZTsBSH$6DvyT!xPMBq! !%?HCC(;(NQ,X^:Ľ>~e֎l |r:IoF9r{zJ*7K,ޤ<=f{-XDS4oBQ<0ݪzħ6Pi,,)VV5}+g$'Qͱm&.ڙg!kCePҐ>^ 20"1)?0?kwˎSTK83p ܵ)GI;YWYEͨer2v@+mf0'E(6E{r063p52TjCaLQѣ y9QOqNpʺ;=)N<>E)&bnH_$̸f}U$6QB(\~`'Ke<]܌.R1iWCSxl|̃*Xfp(DV: ə%O (+Vp  3/7)ڤa~5rjڧ$J~z#&a%)YPj6%t Ԓ8Pdcɹc°l47ks"wGu3~Z#B[C6t' *wߝ C'bNd2nN :b/9>V?mQ1N*#^=f'/ KvB#| /NS"dES\knbޞnLc|o_ˍq@md Խ"-z|aUS_mcUn2Q s$`Lb^g0spmfFj}Mp:!L_"8.$a +(Ir3L L͈bt尭Fk ]b.JNo[@>z9FobIaSluHFrl u-DSU)S9FCiq!8h c4дƌŲ4|AC 9`;^4#\I̛fA6xM@Ae!F.e=*{!YЮ鋃{ŨBAb)U^Me@Q(B+((ngEe}ȡ%爪zckQS>0Pi6TI(k?BuN[!;{T3u].ĘaGY Y[PIZ.~Dmd׽Ym!9|$>Cyaf6~ޫPp*#LdhM1%-~i+ŶL{֘ <_5;\CB.Y/$-M'Co@?]+)ɬ, Q>⽷m1d Ja;M}:m,nnљ2O`@Nv{Yʧ[oްSZ%D[utNn2hh)ƫ~eRM>Sp4aKG~1c`{4NiZĸMI<%e]4ƂMi(-~zEyܖl2KAܒlCrNY[&w s\[5c3$>/iTX0 IDAT!d~LW))saO&5EYڑN"k9C nu;ޞ68?%Sx*t=Z9˔K;M A^vgj!"ZY$e$Ű oM*y*s}8År=f#օW_pzܬWn%u{^YI6{k#ͰXyk g(6ܖ[Eۻ U3 S|nwI^yzVrKyp:GklzzH޲7?t&Q9=N9k8b@ߨ ݵ]$+~ a&NtG[/j2breϻټ.Fٜ^1M񴄫v4ӡ$K\ejLI8`0&̒qns$Ep3*Z+W7_ 2^zLʡծiBr֪Oh6z1-X.EQV+KGk_{?͔O£ G׀2As\yI˄g/o:oU#:56sC "N3@0TnwX·Np,v$;$4z$蚠8םd"LwJrtwr㝇-t6ь"vu] |8ƚ7j8sRD^}2r2vF锦9]+wʭ&U@HB)rԎ%k^O(AmDT)O^Y@y׭lDoTB 57Ǥ<}n($;z!}7n/]- !*~+᧖5++p=n;z8=J:8S=_'̼"2 9ֆm뭪&`>tfȭ G2=,R .`޺˿ub"BxW anS¤l8s| mq +4:1hhGy{Xr6RU:=aW/tY$Dm e(dSL1p\ųO71+z*pAN0nfܛoZLʄd¬%cS\?uv !d+e}9c ) }vCB?K #Ђ@lBٺf. i\p~(ղxsO@e!z~ly85K(-oSJ6wEy?4G{8>-j>}-)/MyވC$dY9qFBM} sC w[,߻1 fs@or [zTY_L )E XR ×._uN&#^vۻ5"̀JYGЂŶ2KyLԾ.<-:mC&lDfZ\xN6/_G2=Nr!hz-h9 {w~~ S-~#M^krP xa7:zI}* 3|Uj3G_3lZO2x)x_`E㑆1[ ^|MbFGhMpFdFYxQ]'='We [ L!ʎ u4;A8@4V$Ef)*礯L&'?D"d>JW:'^}%&kEV̀IU'zk6kiIҗ[ m&q0jNC5dd8_ύR(1cʤ좡Gl~k.7ͫ<"n"ʗtQn({SKS?飯\>I3K.Mi=`!7Ŏ:L.TחlWZ,TFbNӀ{ LhI QmJwܖ.8ՎmoEQI8"k@RV$Z.2?+G4t[*1DndOU5%~<'ޘ#J쎃&ߛ4| &̣*`,aaҖMQTca:hvR\esB3WneNuX^IUmVJP kszYd0G)u.|rygg ?b*j}o2K %ۜnϩy##BJ ]OPL)M{ RjuZpk4p*rtaN4`jcO|;#+j1IeJ7v;s_|m) lƢևiJ<Ȯ8 ⩻ِ~M#&p  /|a>c0( GH:Ei([Ib܅ 2P GPR( j<^ +9ˆ 6[(С@Jt-n[ӉzXt;*h0x\ DNԽQht iD;vs<){k@YP$x=r"]'8+ġa!\e[nU ?lMvNʫ$s.`aa<gyY9ژoez a]08^>&AJglOpfC o$[cλ,sӡ,=z6"fiz?V h[CO:ng)2l4 \}T[?Cj=?=)bS"c ]%dDxKG ([ R@i{H$moJS_Nm::lRPǍH%=!!RVþȧ jpt9V8 +*w&_"я` ⱹmLX|̍[.u]^o^)uy \o <>M˺L 0&S@7e57]VǔD;/ٜeha$Kek BۢdNǀ#SZnoO"%|rzQCLg-& 67%3oY.b xVR`)CyLZ=8 s~%Ƈl4[vBOZd.[zW]&x)Fiw70>p7v[/JD>1󲝑&,%/'lDFիgSX}aaG=_(Wsv ɵ:Mi\'(5U[w;0vhU0C+?NohImMtn6 Q\i!3@KkI G+;ս9V^ ]j_?ԕ:i8^q6%\9ٴުxDLʿ^)KpT&SbzŘk cO(FyWOJs3oW%,r@HXM=Lq1$d;iu},lVC qT*.ܙ^׮xN)zFY;?=S5lC7Tt60c5V/!s*WC3/^ kGLPQ0])o r ZJY̠+oi0K1f+*JX6 ޒ,U4 JJD!)|xSiIh8l+ߐ>;R[/fH&Ѭ $J"?*Jy-t+-yIZWDor <[|E 6;^ΰbȭ&eH1kP֔IA ; {:ES2D9[ y 緛me)㉧77%[W<#94!~za{x׼ _$IYXX8=IAR 1 אdw>RE *U>5|Ow81kH-$r'kQ/ByH"-8 y)oN8ٰ=$rMP0!lf[n888&&1#Yr,feTîghj>-[y*H ~O( ȗ3- n:B `2aX'kAn5\x^Hij 4"chQ. +=iW1GzF_.C"Zl@ufQPm$>WzeeR.Rh69&E|) 7Ra9^Oa[l`myMn4=OS *ͿIz&sͻRl ޺ժ7)I+瀘z aPR_X]2Ԕ| z-?ۀ5,e<ݰiPr?Z`JNk0jWH-1/ɧ1ݔL:Q^?9]-"ݽ֓:c3>A.Svfi/hZtcsVߠU1&ڲH9Ly/jwL<͸ԨYz6;DIxILdC|q\uYSCWÚ یrm+zPQw碐lxC 05z6Ƃ0~}s3'948L^C˭ᬸS\t:%ԙgsBS6&^fqr{ + S;(JiG*b9:tnAtkbqC'N#xAT[3#l$]Kic0y!dK{>;EtZ],r%+ פ4c3]pfaIV k.3Z03LC %)iѣ(BaF >^${y-?Bζ,LP281|E@ dKI/n;^^<> >n&6/z ?t&c 6^^dе k/4;b8 x JsޡݚO; ʵ mIp5oJZTMgG~. BȒL?)9+7X8^Jyy-nĤ™ ̚r碤*Վr׬I_G6-=NgG0!}`^8d_- qd4xhfyRB Smo]5 Me=Rz-EE!eKz.ةV(T6ͬhՓC6QA)z 4rMDL[ޔUGa@Q4ɪOy~ýwOIgtmnP#K%Mov&3 NyVH*5p׮ }1ayObU"ɳq#FܚLϯI-A&Kf!q2fA ^slbmRي`v4JH%ݵ6 N(+}^4λI&?mTjotL7sZ3$9wC,@V `aks1/Dlhht|W){̺0˼y}K!/m&L'ǜm\@W>LhfSDb|U4>=b8$-iRIrG?|O{ďrbភS5:AB=|=דD4X֌lzkK-2cg__x?w[˒BcpxOFa6{p쀀9Rܠ :ѱ˵, gN锬RKS]UFQ[eN4u.Qz@rkx;+1h!D]C>?+ M0Ӂx[搐0YS4 ԥ7-xԣN@:_IC:eZ-k@Hx< r#& /MWHZ?OPD%Ұt; i 4dJRzT>ˆx^%-[1Wo,2]y5FM(^1 ILJi` -GL 36)lA43נ\% 0/^r-!m-IP>ʶ.GgW0241d6J+4'Ű8R6'KDۃLo^LdsɆIXjd;/<#pR,x9O#3-L|T>Ȅ)ԓ8pL`iMY&`#n)ʖfQ\PhXI\qڨo8\+ ֭f* gi&\ FZ50k(aBINK nŰoɅl S ߶}_#?G 9K }jD+7'0$aP0(RSD Vo+Jvh,} !؎SyY,rT$x8@r [M$XxIATR$&ҝ r`T5og^׃:94R'wsjBY}5YxD@ hvDܤP&% MG5YlUNдywY;'RN{mJm s,X^5A߫ʙ=l[ (2R[A:gP>8 "яʵagtq-MT0&sҕ> s)E[ L9bv 6 ߞEAH/d3-),9V;WځtI8Ys?=l2l-$'dxi%6)؄<`ZCNѮ`iL K$]Wf7Eh-4-pFÄnD׆Mj ݘr™4!5!7qrx5SybZp Ilj33 <<(]~6hzf .*=e 2]_~ #Z=alE)ˏٶVQ7q!ƸES۠9ێT,̈́df1ʢ׮ye"&P+J%hu7'狧8\AqƲt4 ~=- gRlY D0sİ.I>:ԛ`y80>ʿ;_E el] U*"FV7ki4/)ϽɔsVϻa[b 3]h`jϯwe1C~W`U4Ű1ˡeGgX`~P0(k KZM95 M7۬8ӆOG+ xӟ=_LaJ445ݤB!}|8X}SĠ'Q3$G7^un d>zk(/YM9,n }sMA(JMa=Bdڊ?'ܘ˙léTҩ@7@**AԺ a͜ҦgK@V.9,z .ɶ ېpzs6Ylb` z+8@ ˤt6=dLI!fSCˀ󸣙MZ)-Bf5o 7*˶Z KT%Sc->7U^Fƴ1Zc0I/!Hn"줏) =S:˻WWTōY4|pA4cnjZ0OPB=MG2GbV"y *=uN֒"wj^KhpEɰȆi"C PK[V0JOܢ'"  |$d- 1t=_O O|&g]sW2/4@JN6Qr>cƳk*6`ސUFgw ܃4zAjHNޤ拊9X!T^'/|q?zIv܄*:u^o&c!7!*51OtYda%6A';P.!sϠ\$QJA6Şh-FCmQ "!JQ Ǽ{"[~im`z"LUz)<%fߞ{(Dۏ|xJZC/{k[g2\k_ΩjW۱P87d?\$ !F,ŠP,bb qC$Q 89vu:g֚s ?Ƙk}m ruթe1>,[”e#ZģdR*v$ʚ&.8 /BMvx3Y#޵0EM3^zkj[{JBED^B1XjP$Qf5 #yUs^r. 1(dO#Nxd$-Y}CK s>8ׇazJXV3\O4ؼHa|tHǴkW&ñf>J[bs0]5`t؏vo5b Cw& WPtҗW a|.Iks-14,q *mpꄴaúh{X_M>ڠe ѓgCiRD ٭ՊҼ<| C<`7'~0\k(UT Ao94Kj9ia)!Y!zKXר/Ʌ-ܨXe5IsZRޓy]SM>Asݢ5]#,8`_1}EӯӜ,YR!a=eS!Orrz ⱇ H߀m1稅Q^Zl$ysjM.7b>Ev5?LeSJ3eE4: (K!Hd1ύ*;#U)ь>Lm3wMq t NCt=ؖe=%5 ~d"9(KB ?|pC2 m\ ?z GnUڴT> Nt'Iֱ [jPF/[;s ߑsA@Ռa'ac,b(MqzX1ގWT$8P5|k-@kމ!Wk݀tZQC@-qP d "xA ڤ)j ? PI|r3ϲo MW5'( :L tJؿ1wTvV*JL=4Y$T.a! vd~2C0 %BQ yIhgy-ȹy`P46cqWɐɷ$Fdh=n}p|x/Y+cx!IGɋ65͇ZdL $]>Qdჵk(Ơu 4fFCĭy0=zV5ݚ Q[[9dքyp(ֿY=O<>*b!g"Aq ~%Mf#d +͂LER qF(,ٶ.:ZBV| fVe摖;L'&iNά"AL7n߹QaI}~~h]AUI,zcqdIHoe8IB !V0Mǩ5;_w+ħ_}g|%Y`{%P%);B{ :IGA* J4µv*dd7XYqJD8ԎrӹC ڽ&eMRkؚn8ױa !y%n+!+*hT p2TYX5y<$LLz ,T,7Y^ܶ(WBY圚_-nMf26R \l2ok`ǝ62ipGO5Uձk͉%$' 'az:& JhZ ;8_i1g$r$FzHRDY?DFTcA*ZrnFm4e`3)1lGOD-LsgzI]\= 71]n:Nt~ 䢾 N*"> Lp9$69iQp(SgmE R?xS2i-ly(G,"1 "8i\J59$=kyQk5L9*5jRHMFN"Mٮe6bk>L)޽aVh=mb3E?DY%@ﯫM2iE,[ˈjvŤ`G4 QQ:!ԠOxتX'<׸!N=I-g-:iAw ԌW:̛,d:8>;-DWsKA)Rj !72:5:l>fC@+0֚FH#Bzsfw7db3s^Vn|PlM$E†&FQaҀP$yagLf$UڢKT]A9@N[JfA9kZ]4H k3/lM&Mµ{tY |Ń7i_*[FS%Q'm))nDYK=JMbF N@̍S0jE"N9|(Ym0#VRZ뢆 ,WS)x4i%>go$e ']y~k4!87ږ(lm0knLːqkA^7^yPHT2&$F©d9k"{,@ pu lֱ!k9wgnZ֌^z:Perm3(I,pt=j̶=0ixg>jzZ7{j WAҼFѰka5lm6%6J{0t[RfA4 3p-rIGhL"UMPG(Spit;J'IL k>ElJ!2tJqNJo7H$)=ϽWN CSrX1L4nl,Y8LrQlRPKK_rj׃ NVkEMDyz>P~jՏP^Ԓ66wYx8wMV:I!`[ tI\D4(ǖӧ3{t5cԂKfp~:5s*%|5qE >lҒd;p+|E5kQلbxɒ Q4yyM粉Urݩ=&K c((ۨVٲUuz.VL { ˚PGɃp%&N%X8 &t=h%@Y7D(˃`Ca'ZjNɊJmjyҌd6R&uN1s3YAlkw;R0ȭUZ݌\Ц<&jFw\,TKw,$rI-Ú_Uu*>4bj&S:&pa7ٖ~w̹p?veh\&3*Z<;C$F)a *X  IDATYP6 9ɴMCQzSPA ӊZe(nn{)!RSr{#0Z%]d!-Wm˚Ke+X# 2?!UATF7&l9p$ZCJM fIg U6D}J)+6߃€|MU*5TYq?twx(eEgY[^B<#}/]H-µ<}8ׅ*P@7\1=%Z6R87'HC8uq"i1/6khۍF]yf(wڐ剺mR`Ӄz0",Utʴ [,`Jr.*:}͂Ɍvdr~Nj s>D͍7BlHkR0t3Kڕ4](ǫi^sg?]-7\KbOhw`B($(Q;i::{pf> }w 4rUfY-CVxG08b3H8T>FEU1bKdI2gJ3/ q|q ̤X:òL,zBf`6xޠnVeCS"@wQ!(J8YC&[656Ѽ X*feh7;SR(a4ZƠ,{̣pݬSEgGs ,HL*: 4ru"uRA? JeΥZ6Fժ:MtBJ88?`MdFSra$x(V/jab2ݏAzFM7JkfTy_=yQ`nT\]$G Pɟ 5/UJ-A2&=brj$+JX>fk]W5Q]YssBW6b,qL+pˍ*ySŹq͙dW%^PGtm3lgQ]7v?Ml%Y-CL!QyY!:`. 3IWQ]5n,׳LmlSs|)n.ex)"IKIp]7^R"% qRQu‘D(P>ʡ+a?`z6Vw=^AJn[rt+xMQ/h~/CԤCtCF׽s*> ?O-Bla':QA3LDE1c'g^:V3Q9& "^aI514K; bKX< WMp/3,}wՈ&JzZ; GXvZ]İJpzu\gȴgVvU8I^B>"㠲rV`m)P&u*>*aoa SDfO)/e > &gL> 2 {Rͭ+lW0RML,FTI1;_ـP߭cn鴾=JKUmDXRgzf4өPm> =)c*àNgajz甭:)nI\%i^M-t;I{7*l 62h1i[Oũq9dmV"wN"ujI u5A*9ҫH2q+j4p0N"'_lACYe?^ &GB*Wp_DZ3^k1|`1tL^EI"b k<_@};8 A SjQ k o跂",NQg ݳM2q1alY9| Kt:!_MtV  b'X̲Y~2_C"b:d4{"+|Thwy@%y}t J[5rˬ`~YẗUE/+b=)@@t3ip-<% >0 9'DqVmY1;iXnHXheE:l&ERt"âhW cyZAURz x<-I7oOi0t~|Bh6 4:'9vnСB"8&oRrf&mryMA?wVT**}d׭"I(gLjsIU}r^ͦeJ˾kn&02k'X!dj; ~ku :Qaa)j1(~%OhͭdZ\wɀT@ k^6X}(rt Yry4"V|A} qvҤ9eNpl> ]·MI2МvWd wJ'Ln&ܜi^֥mw>ȏww<4g)ʕ 9Aص`r3XZ6IWYR?'j*.(p }ܼ Jq&ja{n#Bmr]pg ^CggUf.,aFJŰSDz cWFÉLw/f]WA&wIr\3zZ{6$3%Z+t5Ċq=RDj1L," 7HJذ%c3܏RQb$')E۸bHWW-5Q%H }I Oq V\ JT$hNFi3vV0$E8ݳI6IK2-91_#IĖÂ7T̥S:'56C  _rE'Gd*WCku,).x?al2 r4j ׋wrWB=mmҕ5cyX{3YMNerMWݷSAM |Nٟ(.99̆ 1&"/hnCY’ڷ n ۮ,>]Ti0 fyR5Czv멵,d=a2=nA` jҶɏMxm^ o"} q ]L wSл궜$j,0_-F;[\\ڈ^Um^{vZ];ӗ~'k5ldbddCY^Ӕ9jShc]4ZYՊܴJ(t;D{ȴnĴ9ݎAXT0LҩRHrXP&S6㋓l><*}|7~>w8m1T}GZ;2B,0bT!W'{x9-*xFFb`>D6mɇ)F _zM)C/1&PC3vѼEҨpqA(~ iC_riHo׿"5:K=$"F էTR|`{Ww-E@07)1H:4e4c(R4/I6uN3o_ 6#{QTt3XSH`w;!-"dnDt\=+,` ac,"}дV;Nf[PodflOUM 0+> q@XV5;ˎEg\MjfR(54Ιi=BNtr41]J0a88ٰt@UD>3+uyXm\4QąlOFQL\NY0J3#EN(], 0T3e;QQsjvPj+R&|&vԍfkNZ?& Sǹ"(UC[J4}2IS& ,F47ԧvx͗|AÊ8&V|]8Ԭ彐jg+C$-@PD"(oYSuhz=?[٪ FUd&V Yn- ]1}xV4)0-}XᤲzыZtr**  \覢G> ҶS iΊWyΛџ.4,I(Irg#,!O5 R7Lucc{óO~j~5ƕZ["$x!@B(Р@]MO7u>s ; - ӱwwn4qNa{="W{ ФX!'=gˁdJ)`|Jj4d(fXId=1p/; Od{iQ g|"< i&&5N^ Nw3"ӝH`8ѢYEW`=fN:4@>%vBJ|"Z@^1 #($Cb)W)Y jUgC /AB8>x,>_}gjE@<N `2m@x}ɽY 'S^f[a!锞!Skb!4-mzt(/-ilU {oʯH"R|#z֬d^*nzy[s_J0Q$E==yVS mSeW@DM"ΠH0)鳊ߎ6(߫W"RzĐ3ʈ)ᩥ8k5fë_̐pN.vtC7Ωr۾>d dyp^$͐,ûMkMIېslr5*,6/)"i_J=3wiaMFIs@zc)uqP):ؙP:56'# KExGg1C7.p}ɾd9DoHRHbnEBS7^1J\8-8|hѕg5ly% 5I?ʹB×(M+37^~zm,hd<#YhemӢ̓d4H<>aKD&kR:%)r\_4aMׁ /#UĊwL}A3`=w3vx }N uoMy8OznABTʑȚИZ=Чt/8mGXg ZÃkRd`PX4*{̢&%ߏ":|3m+ 6d$6t9RAdBDF5Δ*Rpz膾IC#Iq(Kl K@O NeS P ߇E^Tӹ%dMyC D}^#yi`(W͙`ai4k1.kRҜ㪙}}'vrYKyK#mjQ\lS0GHUa:s߿>(Y)ouu)4F7jKYKVőkfI3nF ,azIkt5,}FWy7&Q=0dJBI#l-sZpGF1 F+3\}tfhnys 郳ͯcѤWŒE~b<k>:^-ohl#-yCcT[MҶr4E!9ڰlq?bPH2lZ?;*KR yNH]tAq?I"6.IיkF^$/ oL2 +zu4WW E"r=Mxۂ{k> Eyq_2K)QX$ćX~ȵmIQ::ӨkW+GW;aClB`֏!|'XW+\;h>ԜfP;ڛk[usK ҷsxdk}DoARlz WoLX5+)k3qU%W}0w+**Zɳd=%jvǗ*I8&w8 O>DnB1$2I荠^>/o_ F!=[tJ6a3:,ޥbj!Հ~ǯmÔIL! WE'rW?R5+V "C: 6P \ގhqp3Ii3;BԴtfe5M3pޘG)zY$E2ݎ퐌Ql3/.1W2'SY7.RdiHDŽ NuJ` "g4- VE{h(e/ϏI?PCVEY3gE z^kJyU$iI(F}@#o~֍Iz:]4ByAJPƺd)I r=81m`vlzFTkY$x.x1آvr0Sf]0OġU) B`'IiT-uxRǗhS2 IDAT}7=T96E`f,[:ߜqpFidbծO^km[w@n;kgMq3`Юgת(R_H݄.z-hDWb02l&1~´qiB%5| *]|?!]Q7'JrX{#ʿ6/ƣ8Կqp8%~w҃G k, IݨNTS@_t]6ʸKff+"s9ᜐ|pj `J qZ5DaXRBvT9`DfQ!)nmS>E >Z^J4j E]F3!NASi , fYH=,&wwn#D]?3Jw*鱮ދ),WPâTøp 鐍0ԧPu0uN(ErX5iZU&iuS1ۏt,A3 'iЁdx WqS(5v~`'3I ͡Ψ8 `!cH'A$БHӫYdW5ղ9'ȩH<a5Ѥ46Do_ć=TE2@/N9KLRq?ص΍wY#r\VkB _$jCZըpnypl;/܇h7%HZlO-pt㶃!^8_CiPMk-enҴ^[->kMϓT6!YFB*0zʜVr 5]o?|n 9wj`ٖy WMǬ7i9aF] vg=-* H{#4Iua͊4ۍH=C~[sw޼K{bPRんIbix-6Q} xx_:b[t{&dU% :xXV{p5yi(Atix;aU}<%WWQ7¾5[Jt_ ww[/yFr&f 9b2z@A<[3R5^f4=y)XiLC@:$N\%cy*]>8Y|7آB7A D˕b0} qiR`iQn|Mg, k׎n_%̇Uq]/KKfQJbs[$朲%W@M(j~Eg$:R2V5={GGiQVrZy%6IF0c(0K57Gd>ֹm*dx;߆g5i߄T7pkr_挞 ρNmV5GrLQEI9|nhqHjkXDِpjANL9# 9gLH8gcP lb =xNiNzaf鐯~\3C5ƦffrH$"^2sN"ܤ7RGBII:xI#~p6U7KG4CFQXP0J~-ݾVQBxU%/%넒#C6k1%}'t>[\/7u}VG||  saaajaЕtk&!RC xt⑔ݪn~]7r%UDlvjsB_c?/*6 V-M* 犴_qB $7v7յ}u-5ԕ`]d:V2yvQj+Tj{K.vכZ`8rReF_,P)S|>t_+&a|h(aEͰ\szMj|:3PG XΡ#SvU:ho9 ]Ѭo-:-Jj6 ob{Ϙrw%? 7?0Ȃ^yQ ;rɴ}y-mg]}xQGsa@SzN9zF ErVAqgn\2:k+"(וmD?Kd^9喼hG1<5|T:mnF L(FI TU>-.06 hsD i7k&Mc0*7NӸsCtw>sM/d1}JJO h>`Zڽ e ApK$([OkRLnؼ^v%UlX7<4V$jɅVnXpΆX46yOSI73zo✷9iqkC fӪ\s)F?df-@f"G\0?K ( 7hUy9\?za{vF]*/nBH}ق l 錆T?/(d\sS(@jM* xdAXj!]ʙѷa Fڶ܌o+o4T<&$BR!ZE1(o6m{]oF6K[:(-8\]Tm)`&)w|oi{+{{~wg{+?^w>Le4UҐ}!iU(7v%QePjob^~43I2.`Qu!w%((I  a6G2t3d{9g?wx~!g v#P /w*'yyM' jҩj_S.1D|Wpm^W籘t#\bS]nT:h(&ŤnȗG񁮼$b(n #C<8+dՀamFݼdDz0?u#;Iz5m' 5>:η&Ϯg% ^6 d$?s=)U3h\e˫2(0i ]"۵6یׇ}~~tS菌!Yn l 5@IŲ /; j*1]I)fnwњ9c[̋ 3W *$+6Eqam &\ C+v|'.m>"8Y_w0u46#^oj׹&-RA>c ~jCYk6.UfDQe")jPQ!xɵ)%\84EQp(̆!7$iAs"6uiõ6:զJcP?yϋǻYPr)c՟ɽ|d24QC8}C0੻ lu5kH5/4Y>³iUdf1\,)[1/˾`[`k:JVO?po+ѤcWZajaL^魽ƚך״=FZQ4.'44MIUIam,u]WT#-Q8hh׸r6:򰘴)iV,)iAFZJ o)G_T{I*?H})P0ިQXyQA"򨦳vgm+vUcXY %H$!K6;"!H|0VDx񃓽n_:7W;Cj<->lS\#{Iܬ$v_︱v5LziHEs~&\ͻx.q(fu2?]:'#BQ*{PEhZ} G[BaUϊ'%No_Z6x2=p>p]xL#lxcTѓ0Zr=ŵm.yw.R:St s:/6c)l[%um%ÛD's&炂ɮKvnz8Tݘ9gϡZΟdm_aR54 pi%IN n5dfIjX5HbBv֙\}r]sm7v6j.ڄyS-{ "*Eփ0OzY~eoϰFy`S ) 𧫆rj:验Hg G#`a2)^muk{Pw quSW\֑Nd X x7` 4^RW .ý?zV/=O_m6!iNX_әjhIw޾D؞QhR._mȽ(ZjCjmGY"sPMzD^FoH &栛!|;ChU{@mb}t]ҘӍ 6&V<,Ǡ0 uk=7:޼1.o6QGM SI]4IЬML4z1tX'ek n3mjZ4q:,LsHKK6ɑ mC:eې| Jsx=PTz5!'EmkkzyA< $Qq{4sg,(oe| ΧAڢ hMT?`:~ĞV_wMߞ(qxGO!v}+_V'JEEקztkrYPQiPo+zk,l:_$' $0 Pn72u! W˂G?(_5|b{;=ދ.]ܩkL"PKOg$2⬁_~v֔ZA]j/ZDX{m5UBE[p^֎'ezk?ךvH@uP,fDfШ`y&_"OQH`m0KZkW[ևs0:M2l!ɸ5vūh^,yzTބU:ijT31 x=R7 B0XS|WhaV[Ɓg x[;.XJ^ԊJHng(ϊl[9'0cyOf~>ևEB *Ā7-'d2H w5eFA>ٗH]E5>]#Rސ9F?hN֊6(~mC+fmvlbz){R"wN%Tjϙ kF0 Oل]פ_2=hF0Ű0"SrX?Rő{=;T-f3kʭZ!|gZ[qXhWSd<]8[K3Sw͛{ .mc26۟uȦ) oÌ6Ζp]P7rbѩjwӣG(Σh8>^z@ CyRpε1`"ևE*`DϤ]3A5LoNP)PK붢")2pX jpUٜz99٦5h(yN^??EnOO_8FdLyڂskẉBy cK')MV+0N^gp7! gA2v{4 i[zs, /NQD,[ۈȷcZWN(?xB{|9ԡ3jp~O ܩgyPK#.s`}h\ϙvwL`vS+Wx P&Oz`͊wƏ:bqg+RzZ;'Lj,%T=U kҴP>ww`q0N:rHpY\6%ԕwcG}w59M^eqqzyI_Zil"i8"HmA`8w뿦\46͟oO?\#U!(f3?Z{mg"YmȶJ=U"FjQ$ڔ[:D_fG4a'pQѲ, _l V3{i1sulUM44^[:Y&Gnu͡fYT8dZF g¾uu̐F4{z.Mwe=½M5pU7i(4sU)O$SK9fN\'iᙲy!Kl ~Q2HY0E|j*vުZr`]>cKtmЕ{ut2h]Jvw{$6KfpŜjI$rx MiI OkPrg V,v'ܤ}hO~AΑa/8|JXDK_jh2 XjJ77r |\F5UۥIQx,qݤuҔK|~;(q7o$(mpφ$-17<mYkz$o5O.36')'dgg{Y8aU͊R}GdcnkI̥`Mz sldKnIpqCX^кUkaƿ1SȚa5h>@&5)͆ oR1^!xA~}Dx&NXhsgtIS@ś(%7_񅗛{+DWP@Q{p2]5ergENBuNGK4ޝvšH'M=4l.-~N[ژ0)X6E׭AdؖN; 8TXhPܸ/&_sϯy-Zc:=5!5][A'[\kj)$?^dnkAiH*mnzv^Bd%7CR᧠RW~ ɉ;ӻg=],)9d[R%U1FMi^93H<[ -X/Y9ݳ 1a]VzHL%Oz.ϰlC^iTrۇj o^wzӃQ׺Z 6R:Szh[č >lÀzscjNm˞T{zz tR emq}\ݳ X- VP[\SKQtgcæ6jB޼}ȍ{۳ƫnpR`!3.].؜Զ94N7L;C2拏ZC~PQ#fʜSRG]aռ὘72)Nl m۔!z/ .~={A8 :ۢa!lg4JӀ 7fAj 6 ټzJMMI-r3]?3v֭Sۜ4hfoh3m6\GkZ#zqs::g07k][ZϚAn9@]Vk}}TΥC<}$s[ݾ^&qD^9:ζ5Կ{iNj{VDQt]9E)y˒>{lca13Kd#2BH) ?" 0@8 ™#쐀 rή"XuyMO3휳kU=\] {pbɢ~D/_͗ tQP >@9Mx~or-u燙f9@Gѻozo=`jiGә ] wipKF"h}# !cpN jIvx!4EG[U"V8DcqԈ!I(H'(J,T)kY]f1|J+dL)JujjE en f=L$PYI<Ŧ`=%COѱùG+u*pWVFdE *;Rܿ ޤ~ eCg/$s/KC6xg R Ǻ6+g=L:ג놎wkxHRO|RD/"{N,y?uR?N>Ma}> Iswptt~ބ8-D7^a<X/'8y ɢnmcG~n o4es%ؓUx$@;)Pas?qm>Js?# KѶ)>1Vkj/Sv-=NiHVQ49*M)gT5^%Ǒ{>?Ț @G/!DWJ9,WR~Am)LVtJY28-bMϽkh.nzNR534oNUjF3Xs4= !Q9;s1{ª|wi1.N_ ~郎I2&fȻοl]-ŚgI%-z"sDBN9HZB.|Ɲ;__D_?/c*yi|Rw_XeA8;r@{ i >[qHttՠaB$6]:c4ءIi'rI(N/ AUX\d*ۦp qHZQ+wCU % i^ :h@BzȤSaO~P8 %p">eEE 'NY(Y#w}r<G;5t rf!4Dǃ]F45/mB CeM-2 oDε5CQ8Փ+h ӳ܃ T IZ=GcGt wSJњ 3$; j`T4~9u$DM`lFz7Ι"LnUmkS_"~u8^0{SX5_%gb?$ޙxqfwϰe%Vo8PԡNީ3nĎz-퇷b-z7pAgh=x0|vapNf=,}:&On(hS<-jE U0ĸ &jd@D+(\7 t:ͩo))@yEES,o 'h JN#f#Z ;e[اЙ,Ѝh %`D %qybGU n>YԂl7==Aau$)L a3DssStu#PsMҥ]=hP@e:@RՒ6ckEv 5/nP6ϼt*82Jempv7Uh6 BQ}6iDχ, {.gXB( Yt[8k( ܸsU;\o[){<o/EDmh _}7%eїQ05(ΨsǓr DU=uak;\OEj23Gf?x, H>И>YZq܏lD鴆CQB j iXN4kGGzKht0FSʁmYF@g펣)ep)mM)*q<T϶&90-?&hTp1ʵZ:惏An|a)&8P0+0L5\Stq};i>f>Jq0$RTltEqkBE/ *8ϊ_gDs|:nyy5ib(qe߸vh.JBx{Ry;azgA̶l2 7{b%#U(@t IM3iMD(Rmg䲂h</BD]N8ns"Mp{1N&gU9=D: nŃWnhž}&,BYV ;E|HnD%g'GFHcCޠ|fSoaᅆs/{a/fS ݹedPkϩGnn>&f#hST$O\6˞A6}~ $;;KuRuT6l@oHmEw:0h]k-TGUZD]3} &ս#vz‡5h]T'mcɴ?)?LVyc߯Uh@]o@iIJ s>d>Xs]n*nh@Yk#͛' L66ѽ9/gÎsU'GI촼B ŴfEv/(bts3kaE[Mi%!ufbǺ7sĥю8p!]!@?"J~{ g05vS+߇ԑT[?~G_ z }GA9:@Sp7Rq$7)ݟø]wog&]{ Ma0qa>ba\]I0~gd[@q0yzWZFP}D"܊_D&q6 |O\pz7ȢK<(h=:sV i]|APŦ!x(Gt1ƻzsM]NH<jf *4(ؚ{ŷAJwcZ{Cme\;BȄ8't[fp Gx~8#;mP9lg>H).易Kw~>Nf*Jɤr|2UwĂOvt!HebY$"rXL< ٯC5t })BH V)1StRt2}jp 錧i)xӺ[Vƛ%5ga P5J#ĎnE-G܄%Qw{Q^vZ+Gʠ57>" Ů?$S;l[&Zv pqTt#/q:>E~BȤ)"IP `[>эX*Skmke_yc)8H IDATshpȍچG%[xMv` 8nXnZ ݉DcQw7LϽC?c/=&p""1\SGLJ#.%$FDEU2meD3 E&$F7c!pyicG-Bߘ$G:4=qNθ }vGc"!l%&nKgyfQHp ˩tPr<2 Z sfM a9↛1"iDఄ|I=g~T$9Ƽb("('^ZP =j\D$¹/G3ih\(3C6n>T;_<>©fA"Y[UQ/%yR2~vIyx9h{y3 GQOs@nX#Ryud!GEd ͞P ߏ#6V}Z+`jبưob&/ vŁbOXv㠒¤h>1UP̲%b oߗBPo x=7TWsK{ؼz35@J.u[Li,EШРC0 R 5YZB-O`s{,)aK^hx$gJK ѢwЇ\R8MTy'H3lӕ?Lp4X:) idP|O-_g2jX)`$rRUÉ0M~7~T8]ݩ7ɦy4_ڧ^~ǝ녵[7}+DwǛ/4 uF$F "ڢtD)DK'Ww֩b7h[O yFJEхI{vbZ6}ryvйRXb>G;N1jE8Y`K9zd<5Z60 cDC?7T3p$ cXy1w hLt{9fJ8LQC ݲ6qK+CCvbqӲO GXWpfSt=ΐA~~}Rl:dFpěD WtY/F |}P ѿԹ@Dk:eR@v D+9;Q70ệ.$҆+_j4=_)LHeٝ==Ɲ_F'}hQ(hX1kg|fknM_w }MƱiteP'm}F-pPmn*FrB6ZQdk:,{ ߬"rbLͺ5 Fh?ƼQU~\,p&'QqӀPZ7RX7J_߉ىV~|IB_mȠ@'ϵ"i1i"8."|m߾{ĝʋ\\ }_:^hQU h&S<+UXR{a7@Hb(4UӈD#L-˹p4y r9ʬ(͙6>wE F o>MMqaڸ@{PS̤1֟_5MDŽS .Qn&ќ)u[8lg H4|ݩf[ƹ4(TD}#̯t)Drl(wzS(yE^v)U[Z*`!?s:<%V;N\̜5 S+ Bl qFr1"]nsǶH8@A SM[O#=4IWieKVјP+D,6n}:JٛO 7{,yBsi 6*ƍ;D1u(>(M& zPl&vLEЧ7 ;9ͦxIUoS.( C7$BI}aMŴRK;π>Y8tψkRrmGcY4Eld*mP&YTv~qYk..ZCG"T n $!KޫQ\ \P67D6O̙]ngr# )<HV*ꗓ602LS^-rkS+iJ=]!5hhC^@!zR5yQ%s.}?R+E{OlPK% s2>x\^ua|Kc͒7lO0=. &Z(N8q{\cqb/DtNLj*L) NPl*ɧ euTդiht٘3sirkbtR?s :^/^V.V-bӫ)셮B:fdp"MivF ^l04ɳFs ,/.ߠH($@Έf2apc2Uw%n)M TڤOr3F3Xo(lX&Ȼ{q;!Ɗgv\# 5_捵IG:ߗVR `/3w;@`h9: tݏ ttUNIDkFwMtJpJr stfR)̃ǿ83ݐ:G°5m;=8垑Tq;L N &;_|/|6B3 BFE<$<F,X/7ݯ8 4k3{@Aځe٥&J S:gR~эE'pvG>Upys/Z R8?Cf@<݄\?0mMy5'j3n Y OH CΉi&Ơhĕ/Yx9YzC[ӪheQwk%ġDgcφGA.jy2>̩aeM@&/ Cn'ߴO4(rF-N8[bKΐYb{$]Q7Ec颰 ֩ kK@kVSGXm7rS,St.0fxFU EWQGLB>t[l=G~փkMyo$vfyvYp-KO ˠ4FpV[ G&DP]xN6g0앀6 !;!}T/^Ï۰=%S]p.u1<+-!I֥h&R7ncE@Ht&nZLmb 79*4Q^x 'lbpc< OXˢX#_YO*^R: >@wpXU|rG3B%մ\Gpgb3 :>Ksc # rȎ1IT0'2K.2=(I9nS[5 8|sL2*h6:^% 뚉9]H'-D#Gcf:,k@h@H c ZH,U?>`)v7";khi+F Fa{ lS.ie;y4^\6Ȣ =6 ͮ58lI}򗺯<&_/녋+tnA:*~N2)6mK T^ꓨ5leʼKhA:>þ/o_9}D\!Yt Wz vDҐ4f Wz`diQL1&L^p;Mf1M4vB864%:J{!9'~Pip}ߌxM yF>-AJKmH5Lچ7 8u$/kXÁ|"|ZMb6 7seKa#CN i)]鋛&[ޫee" ],|Ɛ6-%l$:>7W3ap֤u-,G_۰uk{{i.u>ŎٚEŀѯV:N'{Ƃ6a,9c^ icY,f~ ǭ(1||NHmxƉ38DdrpG194݁8{͚NU"`RTvB+&2b4Q"Ӡ+yћ)HBkiHr: ecZ#W81e!ܩuT΂1©躏:<|4.Z7zxɕPuh^nΧ%4sB".5NuB6ljtK6h4o+`+B#WTpJ7J ӞSI!Sned ,T/}SI}4<{ +μhMڅ-=1IE6&-3gJ?TbDܧP$4hzsiZdb>D3At)C f*o)8MY2qD+cq# Ґ,@A5ҿkT7n^&]o32JCYcPR17ߕdzuxr7Rޞ !y]AsS( Kt['*ֽ y] :Xf#g-!ʫIm Xr!:G$;X̀.2? 7 O+$nSAeyH[ss#KJ D @h69̲q*߮ MRA>oܻnUJ S=Q̡l4 < 04dMC^@CltAyHbMbdEυ_71gȢ"4/3R RW]Ө7GsHOכ B^)EgtHe2†\pBi8pC[}X!Tæ5V'@) N+Ȱφ^+HE J+@}z)Aj4wΦO1١Ҁw+fI1xѸQd+`O\Y-c FA.6Q $5K!Yq]q}>EhH\AJ?[L0{&&O0Lo!;峠Q63ykd_Mxf6x&vU ԕ9)@.'hk{neqX[OZ{k~:c{T37MzvS8?W8&خdҋWn:/׊OCU*ъ9Len1jRAP?_2Guqh<̧7%D9\j!gb=s=:|>JÂL*iaq ~G"B*Z\@eAQi儇8 okH Tq:q\)2t>&:El?1( %WIx9ͪ'#A,f$q`ŵ(O.ܦ<bp t0Ǡ >'X*њw^,Ԕ`]ź"ԫv:n p-܏&Zh C6hmGǽOޗzMPq;wQ̴p!Ն hC144[BDZi(iPļ5x^Z~~1꼗|9]xC̫j"w.kc&/یQsp]R a孁$"wB)5-/ ]iNf_  EzRꫴqn,`5K2 EZ2 5q>n* :)kPYm: Қ\{{ F.qթ\ 8G0= &lXN+ 83R=:t?&#T.c,6'9l{}tNX8LŭGCh{cBwKV$hj*,O-iK >Fzq G^םKK~X11VE=ArPe9Ex9MҧC3⊆hwe-R2?V^oaRױ`k|Ə% j2C#<ĩZ9 UC :%W v#ؚ q6E=-y3B O@e+EN <8w*fnܸw7՞%BKS7ju(꫏NYhM5"}l W-ʤ#}֔')0N5=n_cVb7H4D˄퓻cɒ!/Ni*[wT݊T~fp6yy:D mbS Wi6u 'e\ C]Y[M4Z}*^=^^([ EVӣQJ ]x![G@w=įk:Lg,tNKJO{rvNc: b7@vhz]ՁтbTbi IDAT ӵ}QnrfRSng7ݜZ|VapZ23)/gtmu\iX ^) ù=v~G+R N3Z]&}´sPY X-4o5n:N9g7Li"0zօ=G畚AO07:q;bl%&. s"9Vȣa'^(Ե.ֆA&(J1?> ?oZ(;tVJ̦2LEl*.E@k*'gL7_oG59]:bۧF tb 22\9TH4SN6ab aIސfQ;I Ĩxxx0:2?ISt."g@8>,$!ީ֌7EwʰD^t6C"}-.*s!Knu;ӽv5\N틺-HGRrr>jJ1hb?6̗]BHfN[KqT  ?[Xϔ\6vūr . _DFq]ð9p`֚BpjhJ9J +$aJq">E,/ r .\Eι5J#:_ P_V+LJDhL2Iqw_5D[6 1~Ah靋S%mqh ([aR,<<ҽpA Q+@E;,dVTC⛅<6= 8HÆs т>M&㶧=4koQOq:{tSb=.UrcqVkTU-9Dfhp}XjR<{"Z,7`o CxqSD|TEE <eg \6yw=i:j(#r(|A}ܒװՖ>>G :v@L Ifl-)DЍKejJP;|,ф08s ?_17b9 7iiEZ6u7pZ,'ρY'kj9e2)@XtMΪ 0I[s -uxJZ:V:#B8ݸjB>|/9+~ZQVytmR=CSsF Y9.X1Uk{6QLFa#:<*v4Xl:tu9Sx`^L?J/}zv-_ӆ^|a⸨w[8r?X1vfvN M07FɹWRWqBDfNH\=BXGPWZb0(*PQREbEb *J XXE~} F'-tU ?:iHYw)I)'yuf/O47.Y)u>VԁGŝ7aOpgͤLMxQ5b3DݤF9L h$d+\DQe Ċ{n0ݬtB;Er03ݘەO:㽙a"ԔA0ºS\3E7Q|,SagMA/dA-{TB[QuB 8h K"Xs;G`=hr6.)@~텪en^%^ݬ5Ǜ`q/(k )ס :(Z_6^)F?GQ_4 ~NsRL8%ɼ/;*܋p7%G#0F$T}͖u=81k.t?5f՞ L_O0&*/fNMnך$|Y?)kIpIENDB`gsequencer-1.4.24/gsequencer.share/styles/0000755000175000017500000000000013247044247015540 500000000000000gsequencer-1.4.24/gsequencer.share/styles/ags.rc0000644000175000017500000001172513247044247016566 00000000000000# GTK theme pixmap_path "/usr/share/icons/hicolor" gtk-icon-theme-name = "gnome" gtk_color_scheme = "fg_color:#c0ddff\nbg_color:#203f4c" gtk_color_scheme = "base_color:#000000" gtk_color_scheme = "text_color:#ddfcff" gtk_color_scheme = "selected_fg_color:#220200\nselected_bg_color:#000020" gtk_color_scheme = "tooltip_bg_color:#000000\ntooltip_fg_color: #c0ddff" style "default" { GtkScrollbar::has-backward-stepper = 1 GtkScrollbar::has-forward-stepper = 1 GtkScrollbar::stepper-size = 14 GtkScale::slider-length = 31 GtkScale::slider-width = 14 engine "clearlooks" {} } style "default_widget" = "default" { bg[PRELIGHT] = { 0.25, 0.25, 1.0 } fg[PRELIGHT] = { 0.125, 0.5, 1.0 } bg[ACTIVE] = { 0.0, 0.0, 0.125 } fg[ACTIVE] = { 0.25, 0.875, 1.0 } bg[NORMAL] = { 0.125, 0.25, 0.3 } fg[NORMAL] = { 0.66, 0.87, 1.0 } bg[INSENSITIVE] = { 0.25, 0.25, 0.25 } fg[INSENSITIVE] = { 0.0, 0.0, 1.0 } base[NORMAL] = { 0.0, 0.0, 0.0 } base[ACTIVE] = { 0.0, 0.0, 0.0 } text[NORMAL] = { 0.87, 0.99, 1.0 } text[NORMAL] = { 0.87, 0.99, 1.0 } } style "inverse_widget" = "default" { bg[PRELIGHT] = { 0.125, 0.5, 1.0 } fg[PRELIGHT] = { 0.0, 0.0, 1.0 } bg[ACTIVE] = { 0.25, 0.875, 1.0 } fg[ACTIVE] = { 0.0, 0.0, 0.125 } bg[NORMAL] = { 0.66, 0.87, 1.0 } fg[NORMAL] = { 0.125, 0.25, 0.3 } bg[INSENSITIVE] = { 0.0, 0.0, 1.0 } fg[INSENSITIVE] = { 0.25, 0.25, 0.25 } base[NORMAL] = { 1.0, 1.0, 1.0 } base[ACTIVE] = { 1.0, 1.0, 1.0 } text[NORMAL] = { 0.13, 0.01, 0.0 } text[NORMAL] = { 0.13, 0.01, 0.0 } } style "scale_widget" = "inverse_widget" { fg[NORMAL] = { 0.75, 0.75, 1.0 } fg[ACTIVE] = { 0.66, 0.87, 1.0 } } style "cartesian_widget" = "default_widget" { base[NORMAL] = { 0.0, 0.0, 0.1 } base[ACTIVE] = { 0.0, 0.0, 0.1 } } style "main_window" = "default_widget" { bg[NORMAL] = { 0.125, 0.25, 0.3 } fg[NORMAL] = { 0.87, 0.99, 1.0 } } widget_class "AgsWindow*" style "main_window" widget_class "AgsAutomationWindow*" style "main_window" widget_class "AgsWaveWindow*" style "main_window" widget_class "GtkWindow*" style "main_window" widget_class "AgsPreferences*" style "main_window" widget_class "AgsMidiImportWizard*" style "main_window" widget_class "AgsMidiExportWizard*" style "main_window" widget_class "AgsExportWindow*" style "main_window" widget_class "AgsMachineEditor*" style "main_window" widget_class "AgsMidiDialog*" style "main_window" widget_class "AgsEnvelopeDialog*" style "main_window" widget_class "AgsCropNoteDialog*" style "main_window" widget_class "AgsMoveNoteDialog*" style "main_window" widget_class "AgsSelectNoteDialog*" style "main_window" widget_class "AgsMoveAccelerationDialog*" style "main_window" widget_class "AgsSelectAccelerationDialog*" style "main_window" widget_class "AgsRampAccelerationDialog*" style "main_window" widget_class "AgsPositionNotationCursorDialog*" style "main_window" widget_class "AgsPositionAutomationCursorDialog*" style "main_window" widget_class "AgsConnectionEditor*" style "main_window" widget_class "AgsMachineSelection*" style "main_window" widget_class "AgsPluginBrowser*" style "main_window" widget_class "Gtk*Dialog*" style "main_window" widget_class "*GtkLabel*" style "default_widget" widget_class "*GtkMenuShell*" style "inverse_widget" widget_class "*GtkHandleBox*" style "default_widget" widget_class "*AgsNotationToolbar*" style "inverse_widget" widget_class "*AgsAutomationToolbar*" style "inverse_widget" widget_class "*AgsWaveToolbar*" style "inverse_widget" widget_class "*AgsMenuBar*" style "inverse_widget" widget_class "*AgsContextMenu*" style "inverse_widget" widget_class "*AgsNotebook*" style "default_widget" widget_class "*AgsNaviation*" style "inverse_widget" widget_class "*GtkMenu*" style "inverse_widget" widget_class "*Gtk*Scale*" style "scale_widget" widget_class "*Gtk*Scrollbar*" style "inverse_widget" widget_class "*GtkTreeView" style "inverse_widget" widget_class "*GtkButton*" style "inverse_widget" widget_class "*GtkToggleButton*" style "inverse_widget" widget_class "*GtkRadioButton*" style "default_widget" widget_class "*GtkCheckButton*" style "default_widget" widget_class "*GtkToolbar*GtkMenuToolButton*" style "inverse_widget" widget_class "*GtkToolbar*GtkMenuToolButton*GtkArrow" style "inverse_widget" widget_class "*GtkToolbar*GtkToolButton*" style "inverse_widget" widget_class "*GtkToolbar*GtkToggleToolButton*" style "inverse_widget" widget_class "*GtkEntry*" style "default_widget" widget_class "*GtkTextView*" style "default_widget" widget_class "*AgsLed*" style "inverse_widget" widget_class "*AgsDial*" style "inverse_widget" widget_class "*Ags*Indicator*" style "inverse_widget" widget_class "*GtkComboBox*" style "inverse_widget" widget_class "*.*" style "default_widget" widget_class "*AgsNotebook*GtkButton*" style "default_widget" widget_class "*AgsNotebook*GtkToggleButton*" style "inverse_widget" widget_class "*AgsMachineSelector*GtkMenuToolButton*" style "default_widget" widget_class "*AgsCartesian" style "cartesian_widget" widget "*.ags-navigation-expander*" style "default_widget" gsequencer-1.4.24/gsequencer.share/icons/0000755000175000017500000000000013246707333015331 500000000000000gsequencer-1.4.24/gsequencer.share/icons/jumper.png0000644000175000017500000005371313246707333017272 00000000000000PNG  IHDRP+j &gAMA abKGD pHYs--tIME  5HiTXtCommentCreated with GIMPd.e IDATx}yx\ŕvjd˒lcHB&2$03̛0$$@ncےM$k߷ۋz]d#N`K}nU:uSB!#wE555p8X,)}Ͷiҥ$!d`hh~``ոkdŊM&3guK>~/p@AT\.WG}TQQQl6 t: .K\w&]w8o裏H8ن?=sݻwCfKD(}kهz\S*|0ۋH haNp3^z^ttt}vB^)׿& [СC>IbXMXlp8fٔJ6?\⮮.foqh``x^4sd2zR|IG{{;9zzzIOO$sϑ }|>,k]]^o+B*l߾TWWc%3O?+w[n555ׯ_{ooFMMozgd`` g${9^iJ꿔v"PS}>D"ƍOytvtt_ڲe Yr呏>hڵkQRRB&011A~m"J!LOl6d2|+xVp0 " ;wG>LJ%xۉFA}}=5sرFXVlOqq1v܉naZ~Z6 hnnhĒ%K>Fu*VZ}LPQQL71 3O?5\C?~jz/LV^MdӲ?!8 x衇2~">?22` r, z{{a6Ɇ B0   A4f[dP^^~IRԊ+ݻロx>ro޼D{{(~cɒ%=;vPoذF Z#?Sy۷@ `F嫯J)d=n:Gyd( CCCKRAϫg;v 4MCRaʕg|zR)\lB~?^JT2<(++tzJ0Dgg' e .k3SHe˖F={buuu;w.uUo?A*ʕ+Q^^4M|>?yd2_D"bd8|G@Rvccc;۷oq~٬i1 hN;dɒ%o,L$Ball >4MCף&i-MӻJl~衦&_>^]]-yȃ>xnn,\<7Rǎ#Z---CѼy^vر j,l6;kb1̛7BͰZH$`YH@K,t{kVebbWf7lܸo~C ͛7}{j4gd2'IISSu]GacppfzlH&Jx`Z*G⦦c7|{e{2Ch`bb& & 4Mw?#uǏx^tww'xtGՑ2a<3S`moo'l[/ڷo瞅}}}$fE"K(njjj3V'm6! .Ϸc^*]`MG%K,I{{;PSSC͆! [Zgs:::Ə?rx<~0oppvۡ@ pVn^ǙI'l!uV200kjjvlݺ믿~^7 b3_kPwwY+'/t8_$V^xYp8v?W_%7x#z6HO޽{V* rT*U,Ko@:^O Aaa!-[F {[o4͙PRQQ1=-<G0w\$I]Ve;P<޽;ЀBp8\:222T*EE/"w9rdd… 3L˲Qb:tVCCCaX$۷oE"Qvnd2j^ڟH$t}}}g!ϓQ_B3)56ӄu\|I244DlBvI\.bw^z۴iaFU[4<,aF󞐦&ߟ>C^u//d||lڴ߿^xà3!P($޼y3F¿K/zqYV7g%7o>Ǐ'_rirr|j9~8laV`ڏ|j\|e^ѿ;,F:RFJBH$zO$}OP.``0BG"RdPgpIET -‡~D"^"zH$i\.h4WRuXV {. N,B&d2aFK&C:tuu(4 v;`4=4N?099Y6221<P(={

߼NӉq\.*VwL)>CCC(++y-5B @2ldf Bftn> ٳ?>b<B1zIz?E4Euu5f"R~^xa5kPXX_*~#NFGGIss3|r st?9rh4 a>V)P#6{^vZ<7o***`6P(~j?tww.{VypT</o]LebA"ʕ+|>_844Ypu:ݯ?PrmRՍ>Naҥ:Sac?)SYY,N&r7,/pr` a2j!˳4MvcttaZޖh4z||mkkZ x%dxxB Fse||?NXիW(oHӿپ}_WNE"eoook׮Q^^t?YyСCNNN"""B$A,O_ym+i:B{|> B1p܏\.O>񠪪 wF:Ɔ P^^c~u2s&~s̹j߾}$͢ PH2 J|>\.(Mju4I^PP9!ϭr1k /"e".##!H N#3r  ! J!PPPTZEfjaF̝;qN"H X211q$Nh`x1m޼,[l_ BII ,t+===EDǹꛘ ͘;w. s5( U[[ϟs0ͷ_L1vPɄh4SU0XhѬ@9"L~BR)J; D"Q>";UUUN'^- ,`E D;v7ͅBr\}A\xp6 lllD(BAA$i&vY#KKK)wX 'D* pt5&''?}Æ P4j.UNw$xFQPP9s8Fyƌ)[[[qw?BbոgϞϬV5xx8zi:hD8, br9~ꫯxzIOO*++Q[[ˣ(*sXp8\K/ ]uUp\brXhϟdٮXp!V+vm6[ő#GPUU+VpE"QbIqm}_###6L&2 PZZi jdd뮻>W_y]Xy2 l6|. A"H뮻. bsΝ^Hcc#VXJχ'N@рeY̟??\UUuAQ҂I$I`0(DQ$ p8p\x<LaRtN;0 Rkpw7UVj E" 4͓H$lQ1BM66lBhhn, Ʉr4a [o}D"A>|k_N>^ىl6jr)M-OͽWvvv555B{~?0w_j[N,eۺڴ,~V\"J ~)ދ)6m"֭7"r8?~sl @, ˖-Nki~ŧ~;3k.… !YC4R@ @?P(rtUjq6?ە@7n{މ={VX/A6oLQTTdB^\.tMI緻+ VMkk+ , JI$D'}~P/C}}=u:|H$'NPr9|ԱcH~TUUq(½f h4~l6_a 199I>3\jEMMAPxf{(|2)0"0w\UuP}ѥ\.x^,\g E*"}}}rĹ:[[OLL0p8p8LOOhVFRT*?tϟˣv1?˲JBwa266f;rlyyl _f@ `^`R,;y!xRtF鸬 #Gu]ӉÇC.b`Μ9P(rD"$`Z]ft>/lO =\Z T p8`dd֭T*G|\.wݡj߿073 Sxt:  p XJaGbժUhkkCqq1\.8@ l6e˖h4۳g0 wlP*hcc#7͢& "  hvLY@]]݇\.7dLF˲eYs2NNN" ab1dYp\i_JZ\.ST~] /tn t:122X,߱`[ :::H8Ɗ+hLH$"HӴBr9U6-rulvy"|>t,ݧ/I}} ҋ& 9qf3P[[ {s&!ٙٳggY7|-Zm箽{%%%t}&iH$zAݎ~;v ^{-Losܴrʕd`00|8qP(y/ |>(aDDx˗/+///-|||ݻW_>hXԗLmPD5550*<,몾Ǐ_zJx<|L&QSS*tfѸ",6|{7(r:BRJ,/IAzӉL&EEExW`4aX`6T*!| s W>S^{-jkkWi4K! LIb|L*NO*&Ϗ>h¡(ꕿu]%K B)"qJjT*P(V0%0 ~!QTTJD"x<@ VXV\}P*~'éiZu.b8?~HP`rrL!6KQZ)R.[1<<Ç}5@p'`ZT̼?N####j\b01 2xާ"q1t:~ꫨAuu5֮] V4baEQ|n۶ B0u˲( "*b+;v L&}Çr!Mǎ]w[|F@ L&>X, B~RySPr-?hkkL&1>>|߅dB,C:ISET* ^"o_2 7.~k.DQ䗡:WssQTμaѢE@"PwAtA+noo;c:)l Lƚd~L&ÛoM6iffB$r0`||LFs\.^Ê+^da hP(h|oH$F_Y]O AP@RvYVVLybLy1<<&" ى *3 SF!G3 (B&˅X,P(\l@ \.Vw|~4Fy FqlL&0 wy֭C:_dypܝ[Q8FYYv;i[ZvnjQW^y%'NS d t=mV^R ߇atww#"OgV$(4 @pP(D"c QPPc4k@}gDatttWt LJP!s@ @P캘JRurr< őHdtTd2t:'D"QR>;@鏏; B׿pmkkc||B(**Jkr҄q.fYvi,B!z||6 fL&:HvqFbt:̟?p:Bp8L9@ًX .vMM In aT`c2]p 뇇/T(Jp8Xz5jR(g`?iڌnŋQVVX,a H~L!p8Ν+ϿueyBW5\t:!_:z(կdYy!mrCo\pj5o6ڵkQXXXCt~;eYLm~\Er|>8wll cccb1,YСCXbVk݅t555;ؒL&gJsz>|Xߏp80 C)J: !&IV<;/KiD"xg. S'D;J͟?_lٲoݠX}ng^3رcZq8vlܸqg ÀBr8oݺucUU099.p8{ 'Zi2\nS:?OQcMlP(5kDZvW  QSSbv477d2a0LJZ%ĢEPWWGD(>j6/9>Bqٖ6xа/>y$n7*++a00 Z[[`,]R;mmmE!Q7ώrݔߤYSSÈD"U!H$XjUBG6o J ZE, Bwvwwb7o}v"0iXd rTfAQKKKe˖[k֬dāf͚tSgèbNSor8ذaß!P`Xj O|&UUUEQXj,Y2WxSAȁpUW\uV"HpE˶d4d221ׇ~u]r;jRS)vA͛S|>z{׮]ǏR)466bdd|>J/.`2`01[[CɓF_ 9۶mjZչf_`\`Y&UM<ѣGA׿ .;x&,J7|}~rW|M?6_jL9r߇pBTUUyA611!H&P*D"Xh(2ےdL&|ĉG ju,hW$ɘzjX,4M2m/WE3K)HZ?VbΜ939N@& n;= O%IH$bKX/ab]]]JɄCPE,7oe… P(VvL&K3 C0ä8<enP(dۖ`qp/{g$A<G>-& 1\.w/>S*#3oYVaax\.v;\. DHDH$Jџ"(:N%fT{5wFQS<*J]Ųt6Nst\]>A(N E"Vm!8XDтt:]t2<oPPb`0hb~_ϸ>u4R?+$r>&)*rT*%bp8oM<V,naiH$tΟt:X,h4`0ߝ4=( \.wPp8^lS*\E9)p8@ H$7ƛ! ,{[&eD"d2wp#J!͂ib(|nJF3e`0h=>Ot:a٠0z~C.C~~2!<d:M\.D"@ 8%L&`VZD"yAVRDAAftr'#\d2yM0@,C*$x< ykl)EQ:Gpxg~OM)W~Njq4Mo-((8p)f&[2̏SԼX,IDQaB!D1OgL\.WxJJϹ aaXl$HJBee%8:::@9eP( Sb;Z훳, pXD Ï`||,˞rvL&D"P( 4?RΙAv|׎"͢%C2̓ϘzǍt0Xs5rl63˲x!/eս J!J%H$Mpܗ|~#^L%ɹLL&d2)FFB @jBRYRytp86vtt?<ŢR0H~u\'`kZ011V ^N\~`0\;do󅪸~R'Q8N BR+lZ MLLNjdL&_վ PFH$>j*" ~&><ϔNsa a0 \.$VBLK)pzs^0-YfN! dp8vtB$T H4mUF.;݆|ɟR>SdYd2d2,;}0F(..g/JKVz>@ (hllDUUJKKRh4 0  p$n7p8099 V X|V}R~<(GFF011+%%%_l6ۛ0 tnC"`-B\PxD @Rg,-eM&h>ŋQRR7(?f^ykWtϱW_'''g2HRXVBV(vttt`ttdrZ=˫j3e5S0Yl!BqH&b<|~3}YY4z_#v1o!S"T /^\.X6]r{8οtg7K=<͖EGG*++Q__̼^SR0>IJ?qi F), B1W&E"[ x<^ MӇbQXW P(<=z hnn@aa!PZZ9s@Rl0>ǟ C@Qr9t: d2#:7Grttmmm;4˲bEHdڀ F3gf3JD"X"<5[2wFD"L&s;˲TH_eP(! *AEP@*f|w9.lVdVbnhjQPPŷꏆ{*L&***VW_Ly tN PjДZBh4p80gZjɒJ~HPPL? {6}lhhFMM /^?(*=11FKK 2 ; \7+3 42 NÑH( UUU7o^DPl7 QK"ɂ0445fYve:X,H$p8h4 eՅ`0ZNXp!bqJ 4  cx|4EJzz:N#,C$sgn[H$BEEF#D"vhBxww78X0WT7R l<tRY'F?f"l㔣?9CY5Ha|> -JYQNl_9UfnW* ܖoO(%?)k---p:FJa0pQi tH$zPV,[7X"蓂ǗBr\]>#LB(BAV5Krݍi6 a,;z*Z}:N1۽LVZ7>>or7ofsd{6f+عs'a\s5X,/,PPH̲$h\dHR+hC6Fd#i4W& d LOSV(>YRsomm4<<Ϥ"r/\d2;84^r^VE.\.JJJxR7xHoccc0PTf|Alm"@4… T*rjn8|X χND"YuiJIDAT8jlugX^z%<;>xuP(hͦjeYȲ(nYGeY^j _'Oċ/R ?uJ [|N-[F,YՊfFyp?X]׿W.EJR)yjAt:R)LMMbn?p8FZ9B9scccn&Q*CՅB (~kfn0 , {9;op8 χFIpmahhfe `nnnfϞ=}vxV~|}50V^%K|F1qܱݻwd2a``~/rnx<!F}vj,QAL&h4Gh8$'z]i-zIcGH\:[4Mj5OA~e2J_mZ$و i$¼\.##ZI#t ySL&)AX h4bE4===5JQa0 s,˧[ g2 i$Id2)gzx`~ɲrCbb,3:u J֭`PjFż!3At[R*EQTKRT*UIRe:gi> BtT& Cͺ68jP(P$X>U VŎ;ՅnAx<w=7=@Rԋ|Oz>~j]LRqLLLdwލK*fcL (p8H,t*jjE!^ 7V_lRTVZG].3oR-yjj |wygcpp5bbQl6= :IIR,1<$Vzk[_Z;vGIw~qG_R)ϋ aST?n'].Ws,:]T*]ԩSWz,˖-C(BP@"x n~zo{3N*r]EȲY,Zd^+T, a4o6LբnLA$YƢ^}B&b>ajj $a˖-1B$Z6j1t$HAD} S;.ҥ'"XHUfzHjfh4nx<tR[x<T*:L 9rV4AQzqYt:X,v}H>ħi#z{2^zAZ|ӠL&S pI4MZ<* j`Zt:w]ky~A&V[nPOO9qR郤d/ bt:eٜjj?t8.y~E|oѸ\.<"`YFZ :~@@gt:݇)jW$M_144|>Q `ao_5jm -,^!>sw8q8nx:KV@ yNdzZ BDW:yFy4 EQR%[,:C8bSSSG*"TX}JVX,l$3g ppx70(~ַ'|tl6)1;;KMOOCPG:KGYilIђe9 T*S>qZ-ab(V6j=FQTLV?l W(K&&&BF4-k4YFIZzrl$ (BEHAf8NB?s!L&sR\.GR)DQe]ݟz_tZɓ'rJ^I2|R.,,hΞ=jdt:udYE컺 ˲2hZqw- xDbݠȋj~|RSETAx'Q!NnV + E30X%* 2E53v[) z=w("CUEeY\V$yE! on2 \*d2_DT͛ >t'CQ?L&d2 JףjP( L(zށ_JL&b3yfxޥ#233#۷OS.ׇ@ KeBuъRt<*8jZZv? 3AZN177RC `xZO^XXaXd, rV>l6?PT* l6Gرc曱~z|^.Rv|>?n]4MXVh'N?>977t:uֵ\.69zץRim>7'Ij~~ZMQteBǡj) X0 j') 8HR 6mB 0m\}}}dw]hťTYI. Vh40LlQ}cdd,ˢlbaaX ~;(sȚf[qܱ{zzzaZhڍF"l* 4Mc۶m3WtxAwyeX)=V YQ. 8WN(:"T!$dYnWNݮrZc4M?rj?Jam2D$AXƍx<;pۋP(a8m60HnS$=l6nj^.A$I})D?F199 ZχBߗNߟL&o>%0Hij5yBaʕxnEױX Hj`fl6t㸕Jh9yVXXX@`.KH|յZ#4Mow:Te>_177f7e[no `0a$p8rx ,Z'N_~eEf=l2((JEF>kIi% dի0,˾|1H8nxǭ7>_ #&(bt<#   t~ .rǏN8xb0zdk[fŊ0͏Ito<WܴZ x<$lu]񞞞%L}p8wh4Eps\ؘ_k'@t:xqeyɓjǏ#J8twwcڵp:nl6 ^4m6[\$LR'rX:R`ΝUGFa.H nwTJ׃e٣6mrff9˲0LPO_T*h49~}ݓxٽ{69Ӊe˖,{/JR\.J50333sNJ%L&Ȳ ш~,]Vu˲ϥiR+N!~~~~08þ} avzw^ ǧ' jժtO>}!Xސ=EQ<0<< V. SN!vd2}v?q-_?A`f7tN7jwhjqKZī}χaD"lذ>:;;uaNo\TDcYnLNN*NPvq/wjiqFAoo/VZt8N-}=8Ņ,vT4UdPm6(8B3r@Zn4MO:cȥWERL&f^] ӗjRD5 ?0׿]<ϓT*T*t:vM_:w|}]_uMZp@kZIENDB`gsequencer-1.4.24/gsequencer.share/icons/ags.png0000644000175000017500000005151313246707333016536 00000000000000PNG  IHDR6bKGD pHYs--tIME(+iTXtCommentCreated with GIMPd.e IDATxydU̘22##"k@b@EZ?q@e(.?v/ik36-BaUQY9WCF9Ďzc>'NDfVef=bETV콟B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!dx Yy,ϱ#YA"UÀ;q}dtW\rxk8GZ>>ex_2BVUUA8L߳v`>ƽcX`xt,ƆC~.yiܒe4,݉[&J,~EXk}{6v%xo6nZݿ""^ Riay,$*v.ٍS<[GhrZƂb aZYȜj"Uǰ0;. qR&A9l:>'JĴpMrz$muT2bxLF b|w˧er$ka&XPG py=pؑXڎ~ S0=l\i'b-PgqxcoUoﶪ|[_mpĂ׍d@GK{s .>WH2~U ^i;:Y`ա쎦Xnj! ig/׶AXzzozk} x9jc?_4>;شj=X~,q`H)S^f;" }' Z0AVcauww4g h"a pى֋ܕBeVF-օ}W?ݒTcksW~.P|#(DDofYU / QZ .>;h?(t|,-~1y#h"'X.'?ks (*lP -lh /U@0hu1vhd5r(is^bTV.!uATtiJW]Ѵ@jy䞘3,\0e[xȍ!C{=s-qz6k0#,mG^\qVz r ^: Eͱ٩T*c۶.-fZ!+T@*IgPۍkD[5]]]ֶl8, e^Uq8μYUuyZ[[7ؾ7{@ߎm annm?/ҫ}}}b..ij7)& 鬳.X,P(Bt:l6/˟m;Lgv,d2|r S6 O|/ۏC0D8F(BCCQWWW6I'f}ryM#-bbm@"˕BgyR0S| HVX%+"m0ԆA߅D.⏝p /mvVξ˂]Bnsk}ȿ5R2;;l6l6iyٳx[I1FY0P[ G=yxL@:~X/~(ec4Z7( n~k)rhxg|^ FЀ`0X:2)M,Ӥ;I,`J=۶]HG>/[,4$RZ[[܌X,Vfq444l! 8ʏTB) eyyr9d2R)LNN;3LbΝW%Q6278\W m! mmmhjjB$A(*sY0]% _ D.jqWk,/Ard~.U¶풐r9`||h'x{yM;pXrD4uP[niiiAoo/QWWqDЀ@ yI<ɐa+D@*E]]gL8Dkk+؈`0`08oX( .r~]bʽ\[|ġCpmݕfqUW}VXS`~cOwgq)YxS%$E1,J^Dh{{R@PhiiA"?M?~Qkn, 2Rܽu%weGssszzz7 ,jZvyYTDԄ6`g?ƁgxT\V^[<4P(u֡d}3}rjde܃%L5Ӽ, HSSSK,Csss-jLP(X,x<3~VHE.P8SZ[[KAhmEXZcTW"`jj ccckBTXBmmmF{AD"rF72c7z$7)}׹a2kq;Cp;5J~nL^kiiA.C:ƙgm*$'zy)(GA8ɗ2*ozzccc@?oR 2VHCCC-4۴ihh@(B4iv /put+Daie* h]wuWuww$b! ` Sw^c~^JbeJ2ὲD Fhmm-~_s5YMDK@xÆ kJK4ѩvS.R J<LƷɝ-#2@HY&ؔ(N>S^xɩ }X #."b===+ZCO 3l칹CAdS&p%гߥ`鋅.t6,*EՕyp""%|ikkC&A2D hm;P}vE}&H{ϰ#6:^ ? PV|W^yLo% i! smUXԟ~2~>tB!oބ7 6r47<0 ^wuWnϞx^k5HkqǎWpy/Q<޳TZj[lyX(Ut|ޡ.2I-DT&x*&&&JIiGy_| [LIHv 0 RMlٮͶ_|q_TglڴP(&D---%q4:FTJ NvTV01JiR)dYСCFGG HƕwpmnL=ahs=mqdZ5;W%s='|Bq}31g RnETx9 (6v*^ˎX)WǩbxxO=w|1_Wke d:8Z?яD"Hg?OoذaCww7 S#tQmvP)☙0::6NM 5CM $ 0Lzâ]{"#zzzN~o|<#Bkk/3YL*37Qpyvrs=1Kg!M۶KnQ8p{/oázv9&XJLlm;skn;w[ȡpXdžcոd8dI8:!8p`ݻCy%ٜ^"[  RX(j=?TVPV477Ό>kx;_iϢ_N!VwUxƆl(W@yO+ zM 3u+]W޽{od2INv8N7' XlDDFe zWxw*YӁ1lnrrD2֭[,єԸ9v˒\t<%c_n({|__?=5Yx +E@,9}ҭYY KE4^l6T*C[?E;a؋4h'r5%"MD bzM7ݴKꋐw eKVpAnےNp8Bo,< 10mCrea*ю;^FsQ^ F4- z>S{'k \h'~ iV_\6|n!E.brrŽ5%"+69,T>Dw(52[== ww_looG<G4- 6g|e188_\[n zk8e|9e fE[!so~}93˕B؛,䎊]]]XvO~O~JvU# V s<۶ CE!~.Rх,rh5<4&&&044;vl)NH51[@|LFg bD(N:iQ~сr, 9R.q ~_i̯!f,kaϖO~@ߓL&K/h"%"TT*T*p g{geYΖDK&]M-y[znJ2)[-}߽~ C0>,|V5>NªCT* LOOCiaZ}G5ªr=&+m'bu> ܽs+RrhUnyut:&''e˖pTX]q5qVŧL<ڶUtYi# ^`Q6HS,YBg,gwkUTz6eUc\cN>w?q<} P\:̯[@j1\WEbw%KKݜB#9ʪ⫟6888:99Rr!.ib``lyבtq4-+1,$KwcIQ4ӟ[TVq(*eWX*H$Rq IDATVFe/7-V&w2U֋%UlS%&OmڴS/?c{xaWc&MjPL&%r$AxTh_k -y-m'rl333e;EDԄ088}{_{~]==R K5rfQ^I`REY .,G@a3<D)0spYǿJ;N8^ۃIrP:.t h"jF^kcG+U^mabZDL䙝&''q! bdd?Ͼ裏>e>\Ve嬰1)bmd}ѧ7mtj.U\,Mc[q ?W_0WP_Z?7Ʊ݉l^]l(fD%Z[ 2\qwp$ p(yK \DD-ؚ +WFAP(i՛-֮ڮ*RKڰaúgP^SXk0j2OeBd aceu*nb_RY aZU 5峞Bty睻`:lWj>JDrsx>g|~9 X PNU\M2B=T`tgk`0BkfET> ]z[n,XXc /ܢ(L&m۶;vܹ+֡&̉ xGPXZ\~Wq]mmmH5WCD__ư}q8V/^8j2=5^rkLf:&dN-xI?s{oDz{{?O|}r(זHu-DW 0G[ʅJh4H$p8`0ht-fr՛^Zj;555M};v\,YF,Fw#[S?6( ͛7_ٹaÆ F<G$Y[T[i {[&DT9^ܬJ͖f6X>{"]aι;s@ timKC,"^S:_־7V8F,C,CSSSS2Cy[ N`;Lq}{vq0XJI֨Kw]G͛pC{{{"5:yaϞ=x ;SżڙV~-Ũ< Q!f۶_xᅡ^xyOsɿY&uC=k. WSs'oRѡ---hiiA<G<GSSSFVKlll9sc=vQvnYsTg!2첡7t;wx,>ȕ#($RW]]׹Y kzJDTD48}K/~yĪɂK.ds<GwwwiR)+5CP FFFpߏý7ه/-^h~lpW!z~bY.\\=訪y/_d*գLo _ID"3Lnv˖-,l.[`e' RDD)Xb-},Xnݙ6m:sff|+######cjN[,vikD:::N9唷tttmC8Fss38DedZȫn+8\Wv RtlERoG~Fm֞3EP^ 5 ,ݕ}{m_:mWP[n-[|U-;-t&x/=&Z+XU`%"Xj1mkk 2 2L'P(T@ >3nE9EƥBR䇌!+5\^UTVd2S8\Jo\WnDĭjHBA4Qs-]?ng%RH Iπ $~Àf(K$˝[n媭[ޥ"nX!ټ{Q_r[Ky^2L5WqJ8dƩDYe&]8VᝊWJ^h sgJnֲЭ[MydJ>u5YI@!"Eu,u7| vWTA$ ֒'}}J*z(rQ|d9,ܕX% 333xGYnn ű忕H"P$dyyZKd¨Ώ+r`|4O||URM~_-cʁ[K齐Y1Y ~[&Ȭ^m7apppe7U>0хTyrS! I*Q "Z nD?֋׭fzmK:`<}yӃV466 ~q+'@*jgZ T̯]w# Jܬr"BH*23²ѯ($GS$}_?R_|gg`vvy @\ʏ[mǾXǽ\ݱ.;Xopsssg>7ο?gϞp$ M VY-#ֽY~>t:yW۲zx9kA-=aɔD}m P%pvqWSS8Bl駟gdsU{ُ>zI)K}u\=>@*B6-ar҅PHHcG%F"z^z3̏YmBse΂:p4755ulݺkXf ۶U[_\~w?C=C@70qH<+ 9j^ v>^nJmllą^/K[Aص.PWRUCUmɟ_Yk׮-NSo 2L)o0ߪv:ZU,؈bCBD. n- dHee%CEXExo8 66m۪r&&&p{Aqo0pc-QWCτ7K?&BwK-zyL=dC^U:\T+Dd@5"сs=E1*$Y#7{]%=>Zr njE#@m:xذaTi,+k*666شiӧuau ]'VZLKjJK KI} RRZՂ@ +ބFOskUIȹLj;|_`~iiQo*Q ԰,aerYHyǭz,ƍvڲv%pTl" 4'BY93iYQrslMMM II*Wʙ( CU4E@feBTw1}r##"ʍ ގl߾;v|Yp"/ajG?%^x4;vnkkƍ]j64fJ??}G {s5^jm{f_җ2+pʭd% |ltt333Hd2f-dBDBCQ ed5dJZ#GZB(199O~ַm{%C.cIஃny֭[/߼ySSStttZ*jy֠K*"20DҲo_Wq9}ܭnK/JIPsWuQ@. yeʭ] ݋zѨ}>묳.ܸq#֬YS>py'[*-\.i:tطoư}p/ީ7߻)Oٽ{Wh 7p$$VJRt5\deԜ%+V$A<G{{;vq8?3N'5Wf Oˤ;-A$w6mH8F"@kk+ڠI0mpucܪEMuwVmju%ߣLҌh'?SN9?(Y̴lu dbQE-{ o~iQ<5#gX, [Ȧ-[.ݼyUgffJENcFZ&WbHR["@WWaÆ oy[vLOO#?#O`Zضmۮ[k׮Egg'xt5y'Lr, ڶ\.d2Y^{ l[lf}H0 NbKݻwmo{i @`9>^KLTy X ---d2pnX~\pvPC:tp;]ںQ0ϗ-_답궐 sɬp  JaPd|=+/e5G:}M6}RST!QIzkq D؈X,&466\`$"r;Օ&"J,}idJ055Y5f=Γ-7J4hz;q\py4E</`vzy#?issIDATEDw!h*y՜kC*mYcJy YBD C?묳N?x)S^V}P'cnf J7sln>Y@(]<`rrCCC8pm&1?Tԋ% (}w} AGGļc7B?g-ctGV:'C3qw-ݕԻբJD ]Fd2 8"M<sse]vmvK+qy 5"C򔀫|C뮻`]|f"I}3H$oD?t^H75[ QYK)jȈG5l+DȼF^K s#S[ck1WY333@: n,?a1`V*zCrPt ( x^w`eV}\]Xd2iG?>+H(tAtDv_T_*c}3,o]w}ya9P ĩQ5_u~W)T_P#iGvpá!똞ó>"CS?< % &ދʡQVAr\ddM:.W_oD@Buc*VZrsj/[$RYt亚D___f4L'zmm૯w777V ^}}}/uG?4O{] L;8p`|߾}:餓d2~#H]%̕x mlrʓ5M_R Z>ӿxqh')K=y.*$S.ߏ! >/vhB\6Ȏ}^f 4FtqwoDn}mF`Rɹw]4ݥw/C.RD쉉O<>CJ*φ*$n-o[rY]Z8݋l6Fԛ[ڻEO8fqz6Ħ#jEZ-Sw^LOOkxbbb@äxԵcy{_弻[ՎZbgCG3a}V3Ws>N7k+'pzzzK2YG e])T>J"C@׿o_hkk+scUS֍AORG+x77VݾG'2*mpWmcbVv-ϲZ@$oB!wqhkkC4Ζٳe˖DGdž#ӟKD0f~K_T27dly%qb ݄p:T*;v\L&G qJוWep_E&C^@ |VaJؒ%;L c-oێRYtTs||O=Է{g]mR)+ӽR[sssϮ]~ztwwՆKD\,~vܵ[3:6i fggy*nViMb,"t5p 6o|]Z%jܹv1p59m᲏ B(MMM/| ttth\(E5 Ir#L"Ncnn;w*LX8zi}BH4h Mv=uuuF$ YkiY+nH%pCIdYg?>|K4C1`SȼZxytwwKDo=ҮnTH\ G^A$>N011L&kKmOW2ஐ'si\P?70#)-jvor,zMYȈ݄ţDHdB6װ!4Yo}:;;{:::z ###}!Hl\)e'266=E wH3(,-p)_@3RlƋ/c'tһeI yf%x*}0<<<~X`|||&ͪn Ϧ3Z%:Uz]=Sz/m,HF[:UFʩ‚& ~r Q]97%wn%36nf P{6O?."yz4q5 ߻[{M(d5WQ_k@̉5k07YnmcYby {xm$47zCp_}"Yr}6r&e\cJ&1-0]ݫy,z1,, [Yu~ ^_4Jm*11eMX],3?}D>+U@sy!]Db^i_߸@ xK+M,}@+U|OnЮ !i%V ciߨێӏewxlY5.|LJ>\Z}(k 'JBJŜVֹHYujYLJ`)WV3f|ZĴ 8..,k raGrAs\?h]jBm~W }8T:̵*x2%.\Zr[,oQƈoz^#`&q,m#eگD*숭epv,9 Ͻ=]+Uld]ci%ג,{Z] mQDBwzpB!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!#NbyIENDB`gsequencer-1.4.24/gsequencer.share/icons/ags.xpm0000644000175000017500000000401113246707333016545 00000000000000/* XPM */ static char * ags_xpm[] = { "32 32 57 1", " c None", ". c #C0C0C0", "+ c #C1C1C1", "@ c #BEBEBE", "# c #BDBDBD", "$ c #C2C2C2", "% c #C3C3C3", "& c #C7C7C7", "* c #FFFFFF", "= c #E9E9E9", "- c #E5E5E5", "; c #E7E7E7", "> c #E6E6E6", ", c #F5F5F5", "' c #FCFCFC", ") c #A9A9A9", "! c #EAEAEA", "~ c #E8E8E8", "{ c #F4F4F4", "] c #BCBCBC", "^ c #E4E4E4", "/ c #DADADA", "( c #B3B3B3", "_ c #A6A6A6", ": c #FEFEFE", "< c #F9F9F9", "[ c #A1A1A1", "} c #EBEBEB", "| c #F3F3F3", "1 c #C5C5C5", "2 c #C6C6C6", "3 c #E2E2E2", "4 c #B7B7B7", "5 c #A7A7A7", "6 c #B0B0B0", "7 c #BABABA", "8 c #B4B4B4", "9 c #AAAAAA", "0 c #D6D6D6", "a c #BBBBBB", "b c #E0E0E0", "c c #B6B6B6", "d c #B2B2B2", "e c #C8C8C8", "f c #ACACAC", "g c #C9C9C9", "h c #CCCCCC", "i c #B5B5B5", "j c #D2D2D2", "k c #D3D3D3", "l c #D5D5D5", "m c #CBCBCB", "n c #DBDBDB", "o c #D8D8D8", "p c #D4D4D4", "q c #CFCFCF", "r c #CACACA", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " .++++. @#@@.+$ % ", " &*=-;>-,') *****!!~ {] ", " ^/ *(_:*<=[ }|1&222&% ", " 3} 4*(5*6 @.@;****+", " 3*'<*****(5' 7 ****&", " -> 8:***(9:04a]#&*b 8cde****1", " 4 fgha ijklllk2 mnopqrer$ ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; gsequencer-1.4.24/gsequencer.share/demo-songs/0000755000175000017500000000000013246707333016271 500000000000000gsequencer-1.4.24/gsequencer.share/demo-songs/agsly.xml0000644000175000017500000100175113246707333020057 00000000000000 gsequencer-1.4.24/COPYING.server0000644000175000017500000010333013246707333013234 00000000000000 GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . gsequencer-1.4.24/config.rpath0000755000175000017500000004421613256163135013210 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2016 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < .\" Date: 2017-10-12 .\" Manual: gsequencer v1.0.0 .\" Source: gsequencer v1.0.0 .\" Language: English .\" .TH "GSEQUENCER" "1" "2017\-10\-12" "gsequencer v1.0.0" "gsequencer v1.0.0" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" gsequencer \- Advanced Gtk+ Sequencer is an audio sequencer and composition editor .SH "SYNOPSIS" .HP \w'\fB/usr/bin/gsequencer\fR\ 'u \fB/usr/bin/gsequencer\fR [\-\-help] [\-\-version] [\-\-single\-thread] [\-\-no\-builtin\-theme] [\-\-filename\ \fIfile\fR...] .SH "DESCRIPTION" .PP Advanced GTK+ Sequencer is intended to use for music composition\&. It features a piano roll, as well a synth, matrix editor, drum machine, soundfont2 player, mixer and an output panel\&. It\(cqs designed to be highly configurable\&. You may add effects to its effect chain; and add or remove audio channels/pads\&. You may set up a fully functional network of engines, thus there is a link editor for linking audio lines\&. .PP As version 1\&.0\&.0 it supports LADSPA, DSSI and Lv2 plugin format\&. And provides the ability to export to WAV, FLAC and OGG audio files\&. It can run on various soundcard backends including ALSA, OSS4, JACK Audio Connection Kit, Pulseaudio and Core\-Audio\&. .PP \&... .SH "OPTIONS" .PP The program follows the usual GNU command line syntax, with long options starting with two dashes (`\-\*(Aq)\&. A summary of options is included below\&. For a complete description, see the \fBinfo\fR(1) files\&. .PP \fB\-\-single\-thread\fR .RS 4 Run in single thread mode\&. .RE .PP \fB\-\-no\-builtin\-theme\fR .RS 4 Disable built\-in theme in order to display default theme\&. .RE .PP \fB\-\-filename file\fR .RS 4 Open file from command line\&. .RE .PP \fB\-\-help\fR .RS 4 Show summary of options\&. .RE .PP \fB\-\-version\fR .RS 4 Show version of program\&. .RE .SH "ENVIRONMENT VARIABLES" .PP The program interprets following environment variables if set\&. .PP LADSPA_PATH .RS 4 LADSPA plugin search path .RE .PP DSSI_PATH .RS 4 DSSI plugin search path .RE .PP LV2_PATH .RS 4 LV2 plugin search path .RE .SH "BUGS" .PP None\&. So far I know\&. .SH "AUTHOR" .PP Joël Krähemann .SH "COPYRIGHT" .br Copyright \(co 2017 Joël Krähemann .br gsequencer-1.4.24/libags_gui.sym0000644000175000017500000000456313247044247013542 00000000000000ags_piano_get_type ags_piano_key_code_to_note ags_piano_key_pressed ags_piano_key_released ags_piano_key_clicked ags_piano_get_active_key ags_piano_new ags_vled_array_get_type ags_vled_array_new ags_led_get_type ags_led_set_active ags_led_unset_active ags_led_new ags_level_get_type ags_level_new ags_scale_get_type ags_scale_value_changed ags_scale_new ags_table_get_type ags_table_new ags_container_add_all ags_hindicator_get_type ags_hindicator_new ags_level_box_get_type ags_level_box_new ags_hled_array_get_type ags_hled_array_new ags_scale_box_get_type ags_scale_box_new ags_hscale_box_get_type ags_hscale_box_new ags_cartesian_get_type ags_plot_alloc ags_plot_free ags_cartesian_add_plot ags_cartesian_remove_plot ags_cartesian_linear_step_conversion_func ags_cartesian_linear_translate_func ags_cartesian_linear_x_small_scale_func ags_cartesian_linear_x_big_scale_func ags_cartesian_linear_y_small_scale_func ags_cartesian_linear_y_big_scale_func ags_cartesian_linear_x_label_func ags_cartesian_linear_y_label_func ags_cartesian_reallocate_label ags_cartesian_fill_label ags_cartesian_new ags_vindicator_get_type ags_vindicator_new ags_dial_get_type ags_dial_draw ags_dial_value_changed ags_dial_set_value ags_dial_new ags_notebook_get_type ags_notebook_tab_alloc ags_notebook_tab_free ags_notebook_tab_set_data ags_notebook_tab_index ags_notebook_next_active_tab ags_notebook_add_tab ags_notebook_add_tab_with_label ags_notebook_insert_tab ags_notebook_insert_tab_with_label ags_notebook_remove_tab ags_notebook_remove_tab_with_data ags_notebook_new ags_expander_get_type ags_expander_child_alloc ags_expander_child_find ags_expander_add ags_expander_remove ags_expander_new ags_scrolled_piano_get_type ags_scrolled_piano_new ags_vlevel_box_get_type ags_vlevel_box_new ags_htimebar_new ags_indicator_get_type ags_indicator_new ags_timebar_new ags_expander_set_get_type ags_expander_set_child_alloc ags_expander_set_child_find ags_expander_set_set_flags ags_expander_set_add ags_expander_set_remove ags_expander_set_new ags_vscale_box_get_type ags_vscale_box_new ags_scrolled_level_box_get_type ags_scrolled_level_box_new ags_ruler_get_type ags_ruler_new ags_waveform_get_type ags_waveform_new ags_led_array_get_type ags_led_array_set_led_count ags_led_array_unset_all ags_led_array_set_nth ags_led_array_new ags_hlevel_box_get_type ags_hlevel_box_new ags_scrolled_scale_box_get_type ags_scrolled_scale_box_new gsequencer-1.4.24/configure0000755000175000017500000237737313256226514012627 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for gsequencer 1.4.24. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: jkraehemann@gmail.com about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gsequencer' PACKAGE_TARNAME='gsequencer' PACKAGE_VERSION='1.4.24' PACKAGE_STRING='gsequencer 1.4.24' PACKAGE_BUGREPORT='jkraehemann@gmail.com' PACKAGE_URL='' ac_unique_file="ags/config.h.in" gt_needs= # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS GTK_DOC_USE_REBASE_FALSE GTK_DOC_USE_REBASE_TRUE GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_BUILD_PDF_FALSE GTK_DOC_BUILD_PDF_TRUE GTK_DOC_BUILD_HTML_FALSE GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE HAVE_GTK_DOC_FALSE HAVE_GTK_DOC_TRUE GTKDOC_DEPS_LIBS GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE GTKDOC_CHECK_PATH GTKDOC_CHECK LIBOBJS XMLRPC_SERVER_ABYSS_LIBS XMLRPC_SERVER_ABYSS_CFLAGS XMLRPC_SERVER_CGI_LIBS XMLRPC_SERVER_CGI_CFLAGS XMLRPC_CLIENT_LIBS XMLRPC_CLIENT_CFLAGS XMLRPC_UTIL_LIBS XMLRPC_UTIL_CFLAGS XMLRPC_C_CONFIG GTK_LIBS GTK_CFLAGS CAIRO_LIBS CAIRO_CFLAGS GDKPIXBUF_LIBS GDKPIXBUF_CFLAGS FONTCONFIG_LIBS FONTCONFIG_CFLAGS LIBINSTPATCH_LIBS LIBINSTPATCH_CFLAGS PCRE_LIBS PCRE_CFLAGS GIO_LIBS GIO_CFLAGS GOBJECT_LIBS GOBJECT_CFLAGS SNDFILE_LIBS SNDFILE_CFLAGS SAMPLERATE_LIBS SAMPLERATE_CFLAGS LIBXML2_LIBS LIBXML2_CFLAGS PULSE_LIBS PULSE_CFLAGS JACK_LIBS JACK_CFLAGS CORE_AUDIO_LIBS CORE_AUDIO_CFLAGS LIBASOUND2_LIBS LIBASOUND2_CFLAGS UUID_LIBS UUID_CFLAGS ALLOCA XMKMF GTK_MAC_INTEGRATION_LIBS GTK_MAC_INTEGRATION_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG GSEQUENCER_FUNCTIONAL_TEST_LDADD LIBGSEQUENCER_TEST_LIBADD MIDI2XML_LDFLAGS MIDI2XML_CFLAGS GSEQUENCER_LDFLAGS GSEQUENCER_CFLAGS LIBTOOL_DEPS LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP LIBTOOL POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS EGREP GREP CPP host_os host_vendor host_cpu host build_os build_vendor build_cpu build am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS SED AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_nls enable_dependency_tracking with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix enable_rt enable_alsa enable_oss enable_jack enable_pulse enable_core_audio enable_libinstpatch enable_xmlrpc enable_quartz enable_shared enable_static with_pic enable_fast_install with_aix_soname with_sysroot enable_libtool_lock with_x with_html_dir enable_gtk_doc enable_gtk_doc_html enable_gtk_doc_pdf ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP LT_SYS_LIBRARY_PATH PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR GTK_MAC_INTEGRATION_CFLAGS GTK_MAC_INTEGRATION_LIBS XMKMF UUID_CFLAGS UUID_LIBS LIBASOUND2_CFLAGS LIBASOUND2_LIBS JACK_CFLAGS JACK_LIBS PULSE_CFLAGS PULSE_LIBS LIBXML2_CFLAGS LIBXML2_LIBS SAMPLERATE_CFLAGS SAMPLERATE_LIBS SNDFILE_CFLAGS SNDFILE_LIBS GOBJECT_CFLAGS GOBJECT_LIBS GIO_CFLAGS GIO_LIBS PCRE_CFLAGS PCRE_LIBS LIBINSTPATCH_CFLAGS LIBINSTPATCH_LIBS FONTCONFIG_CFLAGS FONTCONFIG_LIBS GDKPIXBUF_CFLAGS GDKPIXBUF_LIBS CAIRO_CFLAGS CAIRO_LIBS GTK_CFLAGS GTK_LIBS GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # 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 1.4.24 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/gsequencer] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of gsequencer 1.4.24:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --disable-nls do not use Native Language Support --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-rpath do not hardcode runtime library paths --enable-rt enable rt (default is yes) --enable-alsa enable alsa (default is yes) --enable-oss enable oss (default is no) --enable-jack enable jack (default is yes) --enable-pulse enable pulse (default is yes) --enable-core-audio enable core audio (default is no) --enable-libinstpatch enable libinstpatch (default is yes) --enable-xmlrpc enable xmlrpc (default is no) --enable-quartz enable quartz (default is no) --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-x use the X Window System --with-html-dir=PATH path to installed docs Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor LT_SYS_LIBRARY_PATH User-defined run-time library search path. PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path GTK_MAC_INTEGRATION_CFLAGS C compiler flags for GTK_MAC_INTEGRATION, overriding pkg-config GTK_MAC_INTEGRATION_LIBS linker flags for GTK_MAC_INTEGRATION, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System UUID_CFLAGS C compiler flags for UUID, overriding pkg-config UUID_LIBS linker flags for UUID, overriding pkg-config LIBASOUND2_CFLAGS C compiler flags for LIBASOUND2, overriding pkg-config LIBASOUND2_LIBS linker flags for LIBASOUND2, overriding pkg-config JACK_CFLAGS C compiler flags for JACK, overriding pkg-config JACK_LIBS linker flags for JACK, overriding pkg-config PULSE_CFLAGS C compiler flags for PULSE, overriding pkg-config PULSE_LIBS linker flags for PULSE, overriding pkg-config LIBXML2_CFLAGS C compiler flags for LIBXML2, overriding pkg-config LIBXML2_LIBS linker flags for LIBXML2, overriding pkg-config SAMPLERATE_CFLAGS C compiler flags for SAMPLERATE, overriding pkg-config SAMPLERATE_LIBS linker flags for SAMPLERATE, overriding pkg-config SNDFILE_CFLAGS C compiler flags for SNDFILE, overriding pkg-config SNDFILE_LIBS linker flags for SNDFILE, overriding pkg-config GOBJECT_CFLAGS C compiler flags for GOBJECT, overriding pkg-config GOBJECT_LIBS linker flags for GOBJECT, overriding pkg-config GIO_CFLAGS C compiler flags for GIO, overriding pkg-config GIO_LIBS linker flags for GIO, overriding pkg-config PCRE_CFLAGS C compiler flags for PCRE, overriding pkg-config PCRE_LIBS linker flags for PCRE, overriding pkg-config LIBINSTPATCH_CFLAGS C compiler flags for LIBINSTPATCH, overriding pkg-config LIBINSTPATCH_LIBS linker flags for LIBINSTPATCH, overriding pkg-config FONTCONFIG_CFLAGS C compiler flags for FONTCONFIG, overriding pkg-config FONTCONFIG_LIBS linker flags for FONTCONFIG, overriding pkg-config GDKPIXBUF_CFLAGS C compiler flags for GDKPIXBUF, overriding pkg-config GDKPIXBUF_LIBS linker flags for GDKPIXBUF, overriding pkg-config CAIRO_CFLAGS C compiler flags for CAIRO, overriding pkg-config CAIRO_LIBS linker flags for CAIRO, overriding pkg-config GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config GTKDOC_DEPS_CFLAGS C compiler flags for GTKDOC_DEPS, overriding pkg-config GTKDOC_DEPS_LIBS linker flags for GTKDOC_DEPS, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF gsequencer configure 1.4.24 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------ ## ## Report this to jkraehemann@gmail.com ## ## ------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t 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 1.4.24, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gt_needs="$gt_needs " as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='gsequencer' VERSION='1.4.24' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # 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}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers ags/config.h" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.19 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" # options # Check whether --enable-rt was given. if test "${enable_rt+set}" = set; then : enableval=$enable_rt; else enable_rt=yes fi # Check whether --enable-alsa was given. if test "${enable_alsa+set}" = set; then : enableval=$enable_alsa; else enable_alsa=yes fi # Check whether --enable-oss was given. if test "${enable_oss+set}" = set; then : enableval=$enable_oss; else enable_oss=no fi # Check whether --enable-jack was given. if test "${enable_jack+set}" = set; then : enableval=$enable_jack; else enable_jack=yes fi # Check whether --enable-pulse was given. if test "${enable_pulse+set}" = set; then : enableval=$enable_pulse; else enable_pulse=yes fi # Check whether --enable-core-audio was given. if test "${enable_core_audio+set}" = set; then : enableval=$enable_core_audio; else enable_core_audio=no fi # Check whether --enable-libinstpatch was given. if test "${enable_libinstpatch+set}" = set; then : enableval=$enable_libinstpatch; else enable_libinstpatch=yes fi # Check whether --enable-xmlrpc was given. if test "${enable_xmlrpc+set}" = set; then : enableval=$enable_xmlrpc; else enable_xmlrpc=no fi # Check whether --enable-quartz was given. if test "${enable_quartz+set}" = set; then : enableval=$enable_quartz; else enable_quartz=no fi # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # libtool case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Checks for libraries. # FIXME: Replace `main' with a function in `-lX11': if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi if test "x$enable_quartz" != xno; then : $as_echo "#define AGS_WITH_QUARTZ 1" >>confdefs.h pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK_MAC_INTEGRATION" >&5 $as_echo_n "checking for GTK_MAC_INTEGRATION... " >&6; } if test -n "$GTK_MAC_INTEGRATION_CFLAGS"; then pkg_cv_GTK_MAC_INTEGRATION_CFLAGS="$GTK_MAC_INTEGRATION_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-mac-integration-gtk2 >= 2.0.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-mac-integration-gtk2 >= 2.0.7") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_MAC_INTEGRATION_CFLAGS=`$PKG_CONFIG --cflags "gtk-mac-integration-gtk2 >= 2.0.7" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK_MAC_INTEGRATION_LIBS"; then pkg_cv_GTK_MAC_INTEGRATION_LIBS="$GTK_MAC_INTEGRATION_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-mac-integration-gtk2 >= 2.0.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-mac-integration-gtk2 >= 2.0.7") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_MAC_INTEGRATION_LIBS=`$PKG_CONFIG --libs "gtk-mac-integration-gtk2 >= 2.0.7" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_MAC_INTEGRATION_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk-mac-integration-gtk2 >= 2.0.7" 2>&1` else GTK_MAC_INTEGRATION_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk-mac-integration-gtk2 >= 2.0.7" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK_MAC_INTEGRATION_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gtk-mac-integration-gtk2 >= 2.0.7) were not met: $GTK_MAC_INTEGRATION_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_MAC_INTEGRATION_CFLAGS and GTK_MAC_INTEGRATION_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_MAC_INTEGRATION_CFLAGS and GTK_MAC_INTEGRATION_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTK_MAC_INTEGRATION_CFLAGS=$pkg_cv_GTK_MAC_INTEGRATION_CFLAGS GTK_MAC_INTEGRATION_LIBS=$pkg_cv_GTK_MAC_INTEGRATION_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: quartz enabled" >&5 $as_echo "$as_me: quartz enabled" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: quartz disabled" >&5 $as_echo "$as_me: quartz disabled" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lX11" >&5 $as_echo_n "checking for main in -lX11... " >&6; } if ${ac_cv_lib_X11_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_X11_main=yes else ac_cv_lib_X11_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_main" >&5 $as_echo "$ac_cv_lib_X11_main" >&6; } if test "x$ac_cv_lib_X11_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBX11 1 _ACEOF LIBS="-lX11 $LIBS" else as_fn_error $? "\"No X11 library present\"" "$LINENO" 5 fi X11_LIBS="-lX11" fi # FIXME: Replace `main' with a function in `-ldl': { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5 $as_echo_n "checking for main in -ldl... " >&6; } if ${ac_cv_lib_dl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_main=yes else ac_cv_lib_dl_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_main" >&5 $as_echo "$ac_cv_lib_dl_main" >&6; } if test "x$ac_cv_lib_dl_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" else as_fn_error $? "\"No dl library present\"" "$LINENO" 5 fi # FIXME: Replace `main' with a function in `-lm': { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 $as_echo_n "checking for main in -lm... " >&6; } if ${ac_cv_lib_m_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_main=yes else ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 $as_echo "$ac_cv_lib_m_main" >&6; } if test "x$ac_cv_lib_m_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else as_fn_error $? "\"No math library present\"" "$LINENO" 5 fi # FIXME: Replace `main' with a function in `-lrt': if test "x$enable_rt" != xno; then : $as_echo "#define AGS_WITH_RT 1" >>confdefs.h RT_LIBS="-lrt" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrt" >&5 $as_echo_n "checking for main in -lrt... " >&6; } if ${ac_cv_lib_rt_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_main=yes else ac_cv_lib_rt_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_main" >&5 $as_echo "$ac_cv_lib_rt_main" >&6; } if test "x$ac_cv_lib_rt_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" else as_fn_error $? "\"No rt library present\"" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: rt enabled" >&5 $as_echo "$as_me: rt enabled" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: rt disabled" >&5 $as_echo "$as_me: rt disabled" >&6;} fi # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in fcntl.h float.h inttypes.h langinfo.h libintl.h limits.h locale.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h ladspa.h lv2.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else as_fn_error $? "\"missing headers\"" "$LINENO" 5 fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then $as_echo "#define uid_t int" >>confdefs.h $as_echo "#define gid_t int" >>confdefs.h fi ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" case $ac_cv_c_uint16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define uint16_t $ac_cv_c_uint16_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) $as_echo "#define _UINT8_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint8_t $ac_cv_c_uint8_t _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTRDIFF_T 1 _ACEOF fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UUID" >&5 $as_echo_n "checking for UUID... " >&6; } if test -n "$UUID_CFLAGS"; then pkg_cv_UUID_CFLAGS="$UUID_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid >= 1.0.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_UUID_CFLAGS=`$PKG_CONFIG --cflags "uuid >= 1.0.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$UUID_LIBS"; then pkg_cv_UUID_LIBS="$UUID_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid >= 1.0.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_UUID_LIBS=`$PKG_CONFIG --libs "uuid >= 1.0.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then UUID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "uuid >= 1.0.2" 2>&1` else UUID_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "uuid >= 1.0.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$UUID_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (uuid >= 1.0.2) were not met: $UUID_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables UUID_CFLAGS and UUID_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables UUID_CFLAGS and UUID_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else UUID_CFLAGS=$pkg_cv_UUID_CFLAGS UUID_LIBS=$pkg_cv_UUID_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test "x$enable_alsa" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBASOUND2" >&5 $as_echo_n "checking for LIBASOUND2... " >&6; } if test -n "$LIBASOUND2_CFLAGS"; then pkg_cv_LIBASOUND2_CFLAGS="$LIBASOUND2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.0.25\""; } >&5 ($PKG_CONFIG --exists --print-errors "alsa >= 1.0.25") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBASOUND2_CFLAGS=`$PKG_CONFIG --cflags "alsa >= 1.0.25" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBASOUND2_LIBS"; then pkg_cv_LIBASOUND2_LIBS="$LIBASOUND2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.0.25\""; } >&5 ($PKG_CONFIG --exists --print-errors "alsa >= 1.0.25") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBASOUND2_LIBS=`$PKG_CONFIG --libs "alsa >= 1.0.25" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBASOUND2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "alsa >= 1.0.25" 2>&1` else LIBASOUND2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "alsa >= 1.0.25" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBASOUND2_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (alsa >= 1.0.25) were not met: $LIBASOUND2_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBASOUND2_CFLAGS and LIBASOUND2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBASOUND2_CFLAGS and LIBASOUND2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBASOUND2_CFLAGS=$pkg_cv_LIBASOUND2_CFLAGS LIBASOUND2_LIBS=$pkg_cv_LIBASOUND2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi $as_echo "#define AGS_WITH_ALSA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: ALSA enabled" >&5 $as_echo "$as_me: ALSA enabled" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: ALSA disabled" >&5 $as_echo "$as_me: ALSA disabled" >&6;} for ac_header in alsa/seq_event.h do : ac_fn_c_check_header_compile "$LINENO" "alsa/seq_event.h" "ac_cv_header_alsa_seq_event_h" " #if HAVE_ALSA_SEQ_EVENT_H # include # include #endif " if test "x$ac_cv_header_alsa_seq_event_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ALSA_SEQ_EVENT_H 1 _ACEOF $as_echo "#define HAVE_ALSA_SEQ_EVENT_H 1" >>confdefs.h pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBASOUND2" >&5 $as_echo_n "checking for LIBASOUND2... " >&6; } if test -n "$LIBASOUND2_CFLAGS"; then pkg_cv_LIBASOUND2_CFLAGS="$LIBASOUND2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.0.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "alsa >= 1.0.5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBASOUND2_CFLAGS=`$PKG_CONFIG --cflags "alsa >= 1.0.5" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBASOUND2_LIBS"; then pkg_cv_LIBASOUND2_LIBS="$LIBASOUND2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.0.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "alsa >= 1.0.5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBASOUND2_LIBS=`$PKG_CONFIG --libs "alsa >= 1.0.5" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBASOUND2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "alsa >= 1.0.5" 2>&1` else LIBASOUND2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "alsa >= 1.0.5" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBASOUND2_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (alsa >= 1.0.5) were not met: $LIBASOUND2_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBASOUND2_CFLAGS and LIBASOUND2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBASOUND2_CFLAGS and LIBASOUND2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBASOUND2_CFLAGS=$pkg_cv_LIBASOUND2_CFLAGS LIBASOUND2_LIBS=$pkg_cv_LIBASOUND2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: ALSA sequencer event not available" >&5 $as_echo "$as_me: ALSA sequencer event not available" >&6;} fi done fi if test "x$enable_oss" != xno; then : $as_echo "#define AGS_WITH_OSS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: OSS enabled" >&5 $as_echo "$as_me: OSS enabled" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: OSS disabled" >&5 $as_echo "$as_me: OSS disabled" >&6;} fi if test "x$enable_core_audio" != xno; then : $as_echo "#define AGS_WITH_CORE_AUDIO 1" >>confdefs.h CORE_AUDIO_CFLAGS= CORE_AUDIO_LIBS="-framework CoreAudio -framework AudioUnit -framework AudioToolbox -framework CoreMIDI" { $as_echo "$as_me:${as_lineno-$LINENO}: core audio enabled" >&5 $as_echo "$as_me: core audio enabled" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: core audio disabled" >&5 $as_echo "$as_me: core audio disabled" >&6;} fi if test "x$enable_jack" != xno; then : $as_echo "#define AGS_WITH_JACK 1" >>confdefs.h pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK" >&5 $as_echo_n "checking for JACK... " >&6; } if test -n "$JACK_CFLAGS"; then pkg_cv_JACK_CFLAGS="$JACK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack\""; } >&5 ($PKG_CONFIG --exists --print-errors "jack") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags "jack" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$JACK_LIBS"; then pkg_cv_JACK_LIBS="$JACK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack\""; } >&5 ($PKG_CONFIG --exists --print-errors "jack") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs "jack" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "jack" 2>&1` else JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "jack" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$JACK_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (jack) were not met: $JACK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables JACK_CFLAGS and JACK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables JACK_CFLAGS and JACK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else JACK_CFLAGS=$pkg_cv_JACK_CFLAGS JACK_LIBS=$pkg_cv_JACK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi ac_fn_c_check_func "$LINENO" "jack_port_uuid" "ac_cv_func_jack_port_uuid" if test "x$ac_cv_func_jack_port_uuid" = xyes; then : $as_echo "#define HAVE_JACK_PORT_UUID 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: JACK enabled" >&5 $as_echo "$as_me: JACK enabled" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: JACK disabled" >&5 $as_echo "$as_me: JACK disabled" >&6;} fi if test "x$enable_pulse" != xno; then : $as_echo "#define AGS_WITH_PULSE 1" >>confdefs.h pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PULSE" >&5 $as_echo_n "checking for PULSE... " >&6; } if test -n "$PULSE_CFLAGS"; then pkg_cv_PULSE_CFLAGS="$PULSE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-mainloop-glib\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpulse-mainloop-glib") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PULSE_CFLAGS=`$PKG_CONFIG --cflags "libpulse-mainloop-glib" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PULSE_LIBS"; then pkg_cv_PULSE_LIBS="$PULSE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-mainloop-glib\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpulse-mainloop-glib") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PULSE_LIBS=`$PKG_CONFIG --libs "libpulse-mainloop-glib" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PULSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpulse-mainloop-glib" 2>&1` else PULSE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpulse-mainloop-glib" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PULSE_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libpulse-mainloop-glib) were not met: $PULSE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PULSE_CFLAGS and PULSE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PULSE_CFLAGS and PULSE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else PULSE_CFLAGS=$pkg_cv_PULSE_CFLAGS PULSE_LIBS=$pkg_cv_PULSE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: PULSE enabled" >&5 $as_echo "$as_me: PULSE enabled" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: PULSE disabled" >&5 $as_echo "$as_me: PULSE disabled" >&6;} fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML2" >&5 $as_echo_n "checking for LIBXML2... " >&6; } if test -n "$LIBXML2_CFLAGS"; then pkg_cv_LIBXML2_CFLAGS="$LIBXML2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.8.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.8.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.8.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBXML2_LIBS"; then pkg_cv_LIBXML2_LIBS="$LIBXML2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.8.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.8.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.8.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.8.0" 2>&1` else LIBXML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.8.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBXML2_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libxml-2.0 >= 2.8.0) were not met: $LIBXML2_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBXML2_CFLAGS and LIBXML2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBXML2_CFLAGS and LIBXML2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBXML2_CFLAGS=$pkg_cv_LIBXML2_CFLAGS LIBXML2_LIBS=$pkg_cv_LIBXML2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SAMPLERATE" >&5 $as_echo_n "checking for SAMPLERATE... " >&6; } if test -n "$SAMPLERATE_CFLAGS"; then pkg_cv_SAMPLERATE_CFLAGS="$SAMPLERATE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"samplerate >= 0.1.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "samplerate >= 0.1.8") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SAMPLERATE_CFLAGS=`$PKG_CONFIG --cflags "samplerate >= 0.1.8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SAMPLERATE_LIBS"; then pkg_cv_SAMPLERATE_LIBS="$SAMPLERATE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"samplerate >= 0.1.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "samplerate >= 0.1.8") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SAMPLERATE_LIBS=`$PKG_CONFIG --libs "samplerate >= 0.1.8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "samplerate >= 0.1.8" 2>&1` else SAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "samplerate >= 0.1.8" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SAMPLERATE_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (samplerate >= 0.1.8) were not met: $SAMPLERATE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables SAMPLERATE_CFLAGS and SAMPLERATE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables SAMPLERATE_CFLAGS and SAMPLERATE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else SAMPLERATE_CFLAGS=$pkg_cv_SAMPLERATE_CFLAGS SAMPLERATE_LIBS=$pkg_cv_SAMPLERATE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SNDFILE" >&5 $as_echo_n "checking for SNDFILE... " >&6; } if test -n "$SNDFILE_CFLAGS"; then pkg_cv_SNDFILE_CFLAGS="$SNDFILE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.25\""; } >&5 ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.25") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SNDFILE_CFLAGS=`$PKG_CONFIG --cflags "sndfile >= 1.0.25" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SNDFILE_LIBS"; then pkg_cv_SNDFILE_LIBS="$SNDFILE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.25\""; } >&5 ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.25") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SNDFILE_LIBS=`$PKG_CONFIG --libs "sndfile >= 1.0.25" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SNDFILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sndfile >= 1.0.25" 2>&1` else SNDFILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sndfile >= 1.0.25" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SNDFILE_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (sndfile >= 1.0.25) were not met: $SNDFILE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables SNDFILE_CFLAGS and SNDFILE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables SNDFILE_CFLAGS and SNDFILE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else SNDFILE_CFLAGS=$pkg_cv_SNDFILE_CFLAGS SNDFILE_LIBS=$pkg_cv_SNDFILE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GOBJECT" >&5 $as_echo_n "checking for GOBJECT... " >&6; } if test -n "$GOBJECT_CFLAGS"; then pkg_cv_GOBJECT_CFLAGS="$GOBJECT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GOBJECT_LIBS"; then pkg_cv_GOBJECT_LIBS="$GOBJECT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3" 2>&1` else GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GOBJECT_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gobject-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3) were not met: $GOBJECT_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GOBJECT_CFLAGS and GOBJECT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GOBJECT_CFLAGS and GOBJECT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GOBJECT_CFLAGS=$pkg_cv_GOBJECT_CFLAGS GOBJECT_LIBS=$pkg_cv_GOBJECT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g_strv_length in -lglib-2.0" >&5 $as_echo_n "checking for g_strv_length in -lglib-2.0... " >&6; } if ${ac_cv_lib_glib_2_0_g_strv_length+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lglib-2.0 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char g_strv_length (); int main () { return g_strv_length (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_glib_2_0_g_strv_length=yes else ac_cv_lib_glib_2_0_g_strv_length=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glib_2_0_g_strv_length" >&5 $as_echo "$ac_cv_lib_glib_2_0_g_strv_length" >&6; } if test "x$ac_cv_lib_glib_2_0_g_strv_length" = xyes; then : $as_echo "#define HAVE_GLIB_2_6 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g_strv_contains in -lglib-2.0" >&5 $as_echo_n "checking for g_strv_contains in -lglib-2.0... " >&6; } if ${ac_cv_lib_glib_2_0_g_strv_contains+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lglib-2.0 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char g_strv_contains (); int main () { return g_strv_contains (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_glib_2_0_g_strv_contains=yes else ac_cv_lib_glib_2_0_g_strv_contains=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glib_2_0_g_strv_contains" >&5 $as_echo "$ac_cv_lib_glib_2_0_g_strv_contains" >&6; } if test "x$ac_cv_lib_glib_2_0_g_strv_contains" = xyes; then : $as_echo "#define HAVE_GLIB_2_44 1" >>confdefs.h fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO" >&5 $as_echo_n "checking for GIO... " >&6; } if test -n "$GIO_CFLAGS"; then pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GIO_LIBS"; then pkg_cv_GIO_LIBS="$GIO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3" 2>&1` else GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GIO_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gio-2.0 >= 2.32.3 glib-2.0 >= 2.32.3 gmodule-2.0 >= 2.32.3 gthread-2.0 >= 2.32.3) were not met: $GIO_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GIO_CFLAGS and GIO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GIO_CFLAGS and GIO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GIO_CFLAGS=$pkg_cv_GIO_CFLAGS GIO_LIBS=$pkg_cv_GIO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCRE" >&5 $as_echo_n "checking for PCRE... " >&6; } if test -n "$PCRE_CFLAGS"; then pkg_cv_PCRE_CFLAGS="$PCRE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre >= 3.39\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpcre >= 3.39") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCRE_CFLAGS=`$PKG_CONFIG --cflags "libpcre >= 3.39" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PCRE_LIBS"; then pkg_cv_PCRE_LIBS="$PCRE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre >= 3.39\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpcre >= 3.39") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCRE_LIBS=`$PKG_CONFIG --libs "libpcre >= 3.39" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PCRE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre >= 3.39" 2>&1` else PCRE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre >= 3.39" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PCRE_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libpcre >= 3.39) were not met: $PCRE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PCRE_CFLAGS and PCRE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PCRE_CFLAGS and PCRE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else PCRE_CFLAGS=$pkg_cv_PCRE_CFLAGS PCRE_LIBS=$pkg_cv_PCRE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atk_value_get_value_and_text in -latk-1.0" >&5 $as_echo_n "checking for atk_value_get_value_and_text in -latk-1.0... " >&6; } if ${ac_cv_lib_atk_1_0_atk_value_get_value_and_text+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-latk-1.0 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char atk_value_get_value_and_text (); int main () { return atk_value_get_value_and_text (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_atk_1_0_atk_value_get_value_and_text=yes else ac_cv_lib_atk_1_0_atk_value_get_value_and_text=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atk_1_0_atk_value_get_value_and_text" >&5 $as_echo "$ac_cv_lib_atk_1_0_atk_value_get_value_and_text" >&6; } if test "x$ac_cv_lib_atk_1_0_atk_value_get_value_and_text" = xyes; then : $as_echo "#define HAVE_ATK_2_12 1" >>confdefs.h fi if test "x$enable_libinstpatch" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBINSTPATCH" >&5 $as_echo_n "checking for LIBINSTPATCH... " >&6; } if test -n "$LIBINSTPATCH_CFLAGS"; then pkg_cv_LIBINSTPATCH_CFLAGS="$LIBINSTPATCH_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libinstpatch-1.0 >= 1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libinstpatch-1.0 >= 1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBINSTPATCH_CFLAGS=`$PKG_CONFIG --cflags "libinstpatch-1.0 >= 1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBINSTPATCH_LIBS"; then pkg_cv_LIBINSTPATCH_LIBS="$LIBINSTPATCH_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libinstpatch-1.0 >= 1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libinstpatch-1.0 >= 1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBINSTPATCH_LIBS=`$PKG_CONFIG --libs "libinstpatch-1.0 >= 1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBINSTPATCH_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libinstpatch-1.0 >= 1.0" 2>&1` else LIBINSTPATCH_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libinstpatch-1.0 >= 1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBINSTPATCH_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libinstpatch-1.0 >= 1.0) were not met: $LIBINSTPATCH_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBINSTPATCH_CFLAGS and LIBINSTPATCH_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBINSTPATCH_CFLAGS and LIBINSTPATCH_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBINSTPATCH_CFLAGS=$pkg_cv_LIBINSTPATCH_CFLAGS LIBINSTPATCH_LIBS=$pkg_cv_LIBINSTPATCH_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi $as_echo "#define AGS_WITH_LIBINSTPATCH 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: libinstpatch disabled" >&5 $as_echo "$as_me: libinstpatch disabled" >&6;} fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FONTCONFIG" >&5 $as_echo_n "checking for FONTCONFIG... " >&6; } if test -n "$FONTCONFIG_CFLAGS"; then pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.9.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.9.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.9.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FONTCONFIG_LIBS"; then pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.9.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.9.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.9.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fontconfig >= 2.9.0" 2>&1` else FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fontconfig >= 2.9.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FONTCONFIG_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (fontconfig >= 2.9.0) were not met: $FONTCONFIG_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables FONTCONFIG_CFLAGS and FONTCONFIG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables FONTCONFIG_CFLAGS and FONTCONFIG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else FONTCONFIG_CFLAGS=$pkg_cv_FONTCONFIG_CFLAGS FONTCONFIG_LIBS=$pkg_cv_FONTCONFIG_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDKPIXBUF" >&5 $as_echo_n "checking for GDKPIXBUF... " >&6; } if test -n "$GDKPIXBUF_CFLAGS"; then pkg_cv_GDKPIXBUF_CFLAGS="$GDKPIXBUF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0 >= 2.36.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0 >= 2.36.5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GDKPIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-2.0 >= 2.36.5" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GDKPIXBUF_LIBS"; then pkg_cv_GDKPIXBUF_LIBS="$GDKPIXBUF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0 >= 2.36.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0 >= 2.36.5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GDKPIXBUF_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-2.0 >= 2.36.5" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gdk-pixbuf-2.0 >= 2.36.5" 2>&1` else GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gdk-pixbuf-2.0 >= 2.36.5" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GDKPIXBUF_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gdk-pixbuf-2.0 >= 2.36.5) were not met: $GDKPIXBUF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GDKPIXBUF_CFLAGS and GDKPIXBUF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GDKPIXBUF_CFLAGS and GDKPIXBUF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GDKPIXBUF_CFLAGS=$pkg_cv_GDKPIXBUF_CFLAGS GDKPIXBUF_LIBS=$pkg_cv_GDKPIXBUF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5 $as_echo_n "checking for CAIRO... " >&6; } if test -n "$CAIRO_CFLAGS"; then pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.12.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cairo >= 1.12.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.12.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CAIRO_LIBS"; then pkg_cv_CAIRO_LIBS="$CAIRO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.12.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cairo >= 1.12.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.12.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cairo >= 1.12.0" 2>&1` else CAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cairo >= 1.12.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CAIRO_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (cairo >= 1.12.0) were not met: $CAIRO_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables CAIRO_CFLAGS and CAIRO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables CAIRO_CFLAGS and CAIRO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS CAIRO_LIBS=$pkg_cv_CAIRO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 $as_echo_n "checking for GTK... " >&6; } if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.24.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.24.10") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.24.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.24.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.24.10") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.24.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0 >= 2.24.10" 2>&1` else GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0 >= 2.24.10" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gtk+-2.0 >= 2.24.10) were not met: $GTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test "x$enable_xmlrpc" != xno; then : # Extract the first word of "xmlrpc-c-config", so it can be a program name with args. set dummy xmlrpc-c-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_XMLRPC_C_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XMLRPC_C_CONFIG"; then ac_cv_prog_XMLRPC_C_CONFIG="$XMLRPC_C_CONFIG" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "1"; then ac_prog_rejected=yes continue fi ac_cv_prog_XMLRPC_C_CONFIG="1" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_XMLRPC_C_CONFIG shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set XMLRPC_C_CONFIG to just the basename; use the full file name. shift ac_cv_prog_XMLRPC_C_CONFIG="$as_dir/$ac_word${1+' '}$@" fi fi test -z "$ac_cv_prog_XMLRPC_C_CONFIG" && ac_cv_prog_XMLRPC_C_CONFIG="0" fi fi XMLRPC_C_CONFIG=$ac_cv_prog_XMLRPC_C_CONFIG if test -n "$XMLRPC_C_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLRPC_C_CONFIG" >&5 $as_echo "$XMLRPC_C_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi XMLRPC_UTIL_CFLAGS=$(xmlrpc-c-config server-util --cflags) XMLRPC_UTIL_LIBS=$(xmlrpc-c-config server-util --libs) XMLRPC_CLIENT_CFLAGS=$(xmlrpc-c-config client --cflags) XMLRPC_CLIENT_LIBS=$(xmlrpc-c-config client --libs) # AC_SUBST(XMLRPC_SERVER_CFLAGS, $(xmlrpc-c-config abyss --cflags)) # AC_SUBST(XMLRPC_SERVER_LIBS, $(xmlrpc-c-config abyss --libs)) XMLRPC_SERVER_CGI_CFLAGS=$(xmlrpc-c-config cgi-server --cflags) XMLRPC_SERVER_CGI_LIBS=$(xmlrpc-c-config cgi-server --libs) XMLRPC_SERVER_ABYSS_CFLAGS=$(xmlrpc-c-config abyss-server --cflags) XMLRPC_SERVER_ABYSS_LIBS=$(xmlrpc-c-config abyss-server --libs) { $as_echo "$as_me:${as_lineno-$LINENO}: xmlrpc-c enabled" >&5 $as_echo "$as_me: xmlrpc-c enabled" >&6;} $as_echo "#define AGS_WITH_XMLRPC_C 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: xmlrpc-c disabled" >&5 $as_echo "$as_me: xmlrpc-c disabled" >&6;} fi # Checks for library functions. for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); free (data); free (data3); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "#define HAVE_REALLOC 1" >>confdefs.h else $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac $as_echo "#define realloc rpl_realloc" >>confdefs.h fi for ac_func in __argz_count __argz_next __argz_stringify atexit clock_gettime floor getcwd localeconv mblen mbrlen memchr mempcpy memset munmap nl_langinfo setlocale socket sqrt stpcpy strcasecmp strchr strcspn strdup strstr strtol strtoul do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # check for gtk-doc gtk_doc_requires="gtk-doc >= 1.14" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5 $as_echo_n "checking for gtk-doc... " >&6; } if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gtk_doc_requires") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then have_gtk_doc=yes else have_gtk_doc=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5 $as_echo "$have_gtk_doc" >&6; } if test "$have_gtk_doc" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You will not be able to create source packages with 'make dist' because $gtk_doc_requires is not found." >&5 $as_echo "$as_me: WARNING: You will not be able to create source packages with 'make dist' because $gtk_doc_requires is not found." >&2;} fi # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GTKDOC_CHECK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GTKDOC_CHECK"; then ac_cv_prog_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GTKDOC_CHECK="gtkdoc-check.test" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi GTKDOC_CHECK=$ac_cv_prog_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_CHECK_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK_PATH="$GTKDOC_CHECK_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_CHECK_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_CHECK_PATH=$ac_cv_path_GTKDOC_CHECK_PATH if test -n "$GTKDOC_CHECK_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5 $as_echo "$GTKDOC_CHECK_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in gtkdoc-rebase do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_REBASE+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_REBASE in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE if test -n "$GTKDOC_REBASE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 $as_echo "$GTKDOC_REBASE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_REBASE" && break done test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. set dummy gtkdoc-mkpdf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_MKPDF+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_MKPDF in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF if test -n "$GTKDOC_MKPDF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 $as_echo "$GTKDOC_MKPDF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then : withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then : enableval=$enable_gtk_doc; else enable_gtk_doc=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then as_fn_error $? " You must have $gtk_doc_requires installed to build documentation for $PACKAGE_NAME. Please install gtk-doc or disable building the documentation by adding '--disable-gtk-doc' to '$0'." "$LINENO" 5 fi if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 $as_echo_n "checking for GTKDOC_DEPS... " >&6; } if test -n "$GTKDOC_DEPS_CFLAGS"; then pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTKDOC_DEPS_LIBS"; then pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` else GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 : elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : else GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : enableval=$enable_gtk_doc_html; else enable_gtk_doc_html=yes fi # Check whether --enable-gtk-doc-pdf was given. if test "${enable_gtk_doc_pdf+set}" = set; then : enableval=$enable_gtk_doc_pdf; else enable_gtk_doc_pdf=no fi if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi if test -z "$AM_DEFAULT_VERBOSITY"; then AM_DEFAULT_VERBOSITY=1 fi if test x$have_gtk_doc = xyes; then HAVE_GTK_DOC_TRUE= HAVE_GTK_DOC_FALSE='#' else HAVE_GTK_DOC_TRUE='#' HAVE_GTK_DOC_FALSE= fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test x$enable_gtk_doc_html = xyes; then GTK_DOC_BUILD_HTML_TRUE= GTK_DOC_BUILD_HTML_FALSE='#' else GTK_DOC_BUILD_HTML_TRUE='#' GTK_DOC_BUILD_HTML_FALSE= fi if test x$enable_gtk_doc_pdf = xyes; then GTK_DOC_BUILD_PDF_TRUE= GTK_DOC_BUILD_PDF_FALSE='#' else GTK_DOC_BUILD_PDF_TRUE='#' GTK_DOC_BUILD_PDF_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi if test -n "$GTKDOC_REBASE"; then GTK_DOC_USE_REBASE_TRUE= GTK_DOC_USE_REBASE_FALSE='#' else GTK_DOC_USE_REBASE_TRUE='#' GTK_DOC_USE_REBASE_FALSE= fi ac_config_files="$ac_config_files Makefile docs/reference/libags/Makefile docs/reference/libags-audio/Makefile docs/reference/libags-gui/Makefile docs/reference/libgsequencer/Makefile m4/Makefile po/Makefile.in libags.pc libags_audio.pc libags_gui.pc libgsequencer.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GTK_DOC_TRUE}" && test -z "${HAVE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"HAVE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_HTML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_PDF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # 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 1.4.24, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _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 1.4.24 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "ags/config.h") CONFIG_HEADERS="$CONFIG_HEADERS ags/config.h" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "docs/reference/libags/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/libags/Makefile" ;; "docs/reference/libags-audio/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/libags-audio/Makefile" ;; "docs/reference/libags-gui/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/libags-gui/Makefile" ;; "docs/reference/libgsequencer/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/libgsequencer/Makefile" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "libags.pc") CONFIG_FILES="$CONFIG_FILES libags.pc" ;; "libags_audio.pc") CONFIG_FILES="$CONFIG_FILES libags_audio.pc" ;; "libags_gui.pc") CONFIG_FILES="$CONFIG_FILES libags_gui.pc" ;; "libgsequencer.pc") CONFIG_FILES="$CONFIG_FILES libgsequencer.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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 this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gsequencer-1.4.24/gtk-doc.make0000644000175000017500000002504013241120100013034 00000000000000# -*- mode: makefile -*- # # gtk-doc.make - make rules for gtk-doc # Copyright (C) 2003 James Henstridge # 2004-2007 Damon Chaplin # 2007-2017 Stefan Sauer # # 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 # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program 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 this program. If not, see . #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(expand_content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt gtkdoc-check.test: Makefile $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ chmod +x $@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else HTML_BUILD_STAMP= endif if GTK_DOC_BUILD_PDF PDF_BUILD_STAMP=pdf-build.stamp else PDF_BUILD_STAMP= endif all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) .PHONY: all-gtk-doc if ENABLE_GTK_DOC all-local: all-gtk-doc endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_@AM_V@) GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_@AM_DEFAULT_V@) GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ destdir=`dirname $(abs_builddir)/$$file`; \ test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi $(AM_V_at)touch setup-build.stamp #### scan #### GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_@AM_V@) GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_@AM_DEFAULT_V@) GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_@AM_V@) GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### xml #### GTK_DOC_V_XML=$(GTK_DOC_V_XML_@AM_V@) GTK_DOC_V_XML_=$(GTK_DOC_V_XML_@AM_DEFAULT_V@) GTK_DOC_V_XML_0=@echo " DOC Building XML"; sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true $(DOC_MAIN_SGML_FILE): sgml-build.stamp @true xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ echo ""; \ ) > $@ #### html #### GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_@AM_V@) GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_@AM_DEFAULT_V@) GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_@AM_V@) GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_@AM_DEFAULT_V@) GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$$?" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ test -f $$file && cp $$file $(abs_builddir)/html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp #### pdf #### GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_@AM_V@) GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_@AM_DEFAULT_V@) GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$$?" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ rm -f $(DOC_MODULE).types; \ fi @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ rm -f $(DOC_MODULE)-sections.txt; \ fi distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ fi maintainer-clean-local: @rm -rf xml html install-data-local: @installfiles=`echo $(builddir)/html/*`; \ if test "$$installfiles" = '$(builddir)/html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if HAVE_GTK_DOC dist-check-gtkdoc: docs else dist-check-gtkdoc: @echo "*** gtk-doc is needed to run 'make dist'. ***" @echo "*** gtk-doc was not found when 'configure' ran. ***" @echo "*** please install gtk-doc and rerun 'configure'. ***" @false endif dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/html @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs gsequencer-1.4.24/Makefile.am0000644000175000017500000024723313256163135012740 00000000000000# Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. AUTOMAKE_OPTIONS = foreign SUBDIRS = po ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -std=gnu99 -include /usr/include/errno.h -I$(top_srcdir) -DSRCDIR=\"$(srcdir)\" -DDESTDIR=\"$(DESTDIR)$(datadir)\" -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -DAGS_LIBRARY_SUFFIX=\".so\" -DAGS_RT_PRIORITY=99 -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security # -msse2 -O3 -ftree-vectorize -ftree-slp-vectorize -ffast-math -ftree-vectorizer-verbose=2 # what flags you want to pass to the C compiler & linker CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ $(LTLIBINTL) LIBTOOL_DEPS = @LIBTOOL_DEPS@ gsequencer_CFLAGS = @GSEQUENCER_CFLAGS@ gsequencer_LDFLAGS = @GSEQUENCER_LDFLAGS@ midi2xml_CFLAGS = @GSEQUENCER_CFLAGS@ midi2xml_LDFLAGS = @GSEQUENCER_LDFLAGS@ # # TARGETS = gsequencer localedir = $(datadir)/locale DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ # this lists the binaries to produce, the (non-PHONY, binary) targets in # the previous manual Makefile lib_LTLIBRARIES = libags.la libags_thread.la libags_server.la libags_audio.la libags_gui.la # lib_LTLIBRARIES += libgsequencer.la bin_PROGRAMS = gsequencer midi2xml libgsequencerdir = $(libdir)/gsequencer libgsequencer_LTLIBRARIES = libgsequencer.la EXTRA_DIST = config.rpath \ COPYING.server \ COPYING.docs \ ags/config.h.in \ gtk-doc.make \ gsequencer.share \ acsite.m4 \ aclocal.m4 \ gsequencer.1 \ README \ ags_example.xml \ midi2xml.1 \ ags_functional_notation_edit_test.xml \ mkinstalldirs \ m4/Makefile.am \ m4/Makefile.in \ ags/i18n.h \ ags/gettext.h EXTRA_DIST += \ functional-system-tests.mk.am \ functional-system-tests.mk.in EXTRA_DIST += \ docs/reference/libags/libags-sections.txt \ docs/reference/libags/libags.types \ docs/reference/libags/libags.interfaces \ docs/reference/libags-audio/libags_audio-sections.txt \ docs/reference/libags-audio/libags_audio.types \ docs/reference/libags-audio/libags_audio.interfaces \ docs/reference/libags-gui/libags_gui-sections.txt \ docs/reference/libags-gui/libags_gui.types \ docs/reference/libags-gui/libags_gui.interfaces \ docs/reference/libgsequencer/libgsequencer-sections.txt \ docs/reference/libgsequencer/libgsequencer.types \ docs/reference/libgsequencer/libgsequencer.interfaces \ clean-gtk-doc.sh EXTRA_DIST += \ lv2/lv2plug.in/ns/lv2ext/lv2_programs.h EXTRA_DIST += \ lv2.lib/mda/EPiano-presets.ttl EXTRA_DIST += \ apple_script.sh \ gsequencer-mac-os-x.patch man1_MANS = gsequencer.1 midi2xml.1 CLEANFILES = \ functional-system-tests.mk \ m4/Makefile # pkg-config pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libags.pc libags_audio.pc libags_gui.pc # pkgconfig_DATA += libgsequencer.pc EXTRA_DIST += libags.pc.in libags_audio.pc.in libags_gui.pc.in libgsequencer.pc.in # EXTRA_DIST += libgsequencer.pc.in # desktop file appdatadir = $(datadir)/applications appdata_DATA = gsequencer.desktop EXTRA_DIST += gsequencer.desktop.in # clean CLEANFILES += $(appdata_DATA) $(pkgconfig_DATA) # extra EXTRA_DIST += \ libags.sym \ libags_thread.sym \ libags_server.sym \ libags_audio.sym \ libags_gui.sym EXTRA_DIST += docs/reference/libags/git.mk docs/reference/libags/gtk-doc.make docs/reference/libags/Makefile.am docs/reference/libags/Makefile.in EXTRA_DIST += docs/reference/libags/libags-overrides.txt docs/reference/libags/libags-sections.txt docs/reference/libags/libags.types docs/reference/libags/libags.xml EXTRA_DIST += docs/reference/libags-audio/git.mk docs/reference/libags-audio/gtk-doc.make docs/reference/libags-audio/Makefile.am docs/reference/libags-audio/Makefile.in EXTRA_DIST += docs/reference/libags-audio/libags_audio-overrides.txt docs/reference/libags-audio/libags_audio-sections.txt docs/reference/libags-audio/libags_audio.types docs/reference/libags-audio/libags_audio.xml EXTRA_DIST += docs/reference/libags-gui/git.mk docs/reference/libags-gui/gtk-doc.make docs/reference/libags-gui/Makefile.am docs/reference/libags-gui/Makefile.in EXTRA_DIST += docs/reference/libags-gui/libags_gui-overrides.txt docs/reference/libags-gui/libags_gui-sections.txt docs/reference/libags-gui/libags_gui.types docs/reference/libags-gui/libags_gui.xml EXTRA_DIST += docs/reference/libgsequencer/git.mk docs/reference/libgsequencer/gtk-doc.make docs/reference/libgsequencer/Makefile.am docs/reference/libgsequencer/Makefile.in EXTRA_DIST += docs/reference/libgsequencer/libgsequencer-overrides.txt docs/reference/libgsequencer/libgsequencer.xml # EXTRA_DIST += docs/reference/libgsequencer # include otherincludedir = $(includedir)/ags nobase_include_HEADERS = $(libags_la_HEADERS_0) $(libags_thread_la_HEADERS_0) $(libags_server_la_HEADERS_0) $(libags_audio_la_HEADERS_0) $(libags_gui_la_HEADERS_0) # nobase_include_HEADERS += $(libgsequencer_la_HEADERS_0) # doc # docdir = $(datadir)/doc/gsequencer doc_DATA = README ags_example.xml # documentation manpages = \ gsequencer.1.xml \ midi2xml.1.xml userdoc = \ docs/usersBook.xml \ docs/appa.xml \ docs/usersBook/appb.xml \ docs/usersBook/chap1.xml \ docs/usersBook/chap2.xml \ docs/usersBook/chap3.xml \ docs/usersBook/chap4.xml \ docs/usersBook/chap5.xml \ docs/usersBook/preface.xml devdoc = \ docs/developersBook.xml \ docs/developersBook/preface.xml \ docs/developersBook/chap1.xml \ docs/developersBook/chap2.xml \ docs/developersBook/chap3.xml \ docs/developersBook/chap4.xml \ docs/developersBook/chap5.xml \ docs/developersBook/chap6.xml \ docs/developersBook/chap7.xml \ docs/developersBook/chap8.xml \ docs/developersBook/chap9.xml \ docs/developersBook/chap10.xml \ docs/developersBook/chap11.xml \ docs/developersBook/chap12.xml \ docs/developersBook/appb.xml devdoclistings = \ docs/listings/add_pattern.c \ docs/listings/application_mutex.c \ docs/listings/audio_application_context.c \ docs/listings/audio.c \ docs/listings/complete_example.c \ docs/listings/config.c \ docs/listings/effects_echo_audio.c \ docs/listings/effects_echo_audio_run.c \ docs/listings/effects_echo_channel.c \ docs/listings/effects_echo_channel_run.c \ docs/listings/effects_recall_container.c \ docs/listings/file_property.c \ docs/listings/file_read.c \ docs/listings/file_write.c \ docs/listings/linking_prerequisites.c \ docs/listings/linking_safe.c \ docs/listings/linking_unsafe.c \ docs/listings/pcm_info.c \ docs/listings/pull_thread.c \ docs/listings/recycling.c \ docs/listings/start_thread.c \ docs/listings/thread_application_context.c devdocimages = \ $(top_srcdir)/docs/images/AGS_iterator.png \ $(top_srcdir)/docs/images/AGS_recall_lifecycle.png \ $(top_srcdir)/docs/images/AGS_super-threaded.png \ $(top_srcdir)/docs/images/AGS_linking.png userdocimages = \ $(top_srcdir)/docs/images/ags-automation-toolbar.png \ $(top_srcdir)/docs/images/ags_automation_window_drum.png \ $(top_srcdir)/docs/images/ags_export_window.png \ $(top_srcdir)/docs/images/ags_machine_properties-input.png \ $(top_srcdir)/docs/images/ags_machine_properties-resize_channels.png \ $(top_srcdir)/docs/images/ags_navigation.png \ $(top_srcdir)/docs/images/ags_synth.png \ $(top_srcdir)/docs/images/ags_syncsynth.png \ $(top_srcdir)/docs/images/ags_audio_preferences.png \ $(top_srcdir)/docs/images/ags_audio_connection_output_bulk.png \ $(top_srcdir)/docs/images/ags_audio_connection_output_line.png \ $(top_srcdir)/docs/images/ags_midi_dialog.png \ $(top_srcdir)/docs/images/ags_midi_export_wizard_no1.png \ $(top_srcdir)/docs/images/ags_midi_export_wizard_no2.png \ $(top_srcdir)/docs/images/ags_midi_import_wizard_no1.png \ $(top_srcdir)/docs/images/ags_midi_import_wizard_no2.png \ $(top_srcdir)/docs/images/ags_midi_preferences.png \ $(top_srcdir)/docs/images/ags_ffplayer.png \ $(top_srcdir)/docs/images/ags_ladspa_browser.png \ $(top_srcdir)/docs/images/ags_machine_properties-link_input.png \ $(top_srcdir)/docs/images/ags_matrix.png \ $(top_srcdir)/docs/images/ags_panel.png \ $(top_srcdir)/docs/images/ags-toolbar.png \ $(top_srcdir)/docs/images/ags_drum.png \ $(top_srcdir)/docs/images/ags_generic_preferences.png \ $(top_srcdir)/docs/images/ags_machine_properties-output.png \ $(top_srcdir)/docs/images/ags_mixer.png \ $(top_srcdir)/docs/images/ags_performance_preferences.png \ $(top_srcdir)/docs/images/ags_server_preferences.png \ $(top_srcdir)/docs/images/ags_machine_envelope_editor.png \ $(top_srcdir)/docs/images/ags_machine_envelope_info.png \ $(top_srcdir)/docs/images/ags_machine_envelope_pattern.png \ $(top_srcdir)/docs/images/ags_move_notes_dialog.png \ $(top_srcdir)/docs/images/ags_crop_notes_dialog.png \ $(top_srcdir)/docs/images/ags_position_notation_cursor_dialog.png \ $(top_srcdir)/docs/images/ags_position_automation_cursor_dialog.png \ $(top_srcdir)/docs/images/ags_select_notes_dialog.png \ $(top_srcdir)/docs/images/ags_select_accelerations_dialog.png \ $(top_srcdir)/docs/images/ags_ramp_accelerations_dialog.png EXTRA_DIST += $(manpages) $(userdoc) $(userdocimages) $(devdoc) $(devdocimages) $(devdoclistings) EXTRA_DIST += \ $(top_srcdir)/ags/server/security/ags_authentication.dtd \ $(top_srcdir)/ags/server/security/ags_certificate.dtd \ $(top_srcdir)/ags/server/security/ags_password_store.dtd \ $(top_srcdir)/ags/audio/midi/ags_midi_file.dtd \ $(top_srcdir)/ags/file/ags_file.dtd \ $(top_srcdir)/ags/X/file/ags_simple_file.dtd \ $(top_srcdir)/ags.xsl $(top_srcdir)/ags-simple.xsl $(top_srcdir)/ags/object/ags_marshallers.list # libraries and gsequencer libags_la_SOURCES = $(libags_c_sources) $(libags_util_c_sources) $(libags_object_c_sources) $(libags_file_c_sources) $(libags_file_task_c_sources) libags_la_HEADERS_0 = ags/libags.h $(libags_h_sources) $(libags_util_h_sources) $(libags_object_h_sources) $(libags_file_h_sources) $(libags_file_task_h_sources) libags_thread_la_SOURCES = $(libags_thread_c_sources) $(libags_thread_file_c_sources) $(libags_thread_task_c_sources) libags_thread_la_HEADERS_0 = $(libags_thread_h_sources) $(libags_thread_file_h_sources) $(libags_thread_task_h_sources) libags_server_la_SOURCES = $(libags_server_c_sources) $(libags_server_security_c_sources) $(libags_server_controller_c_sources) $(libags_server_thread_c_sources) libags_server_la_HEADERS_0 = $(libags_server_h_sources) $(libags_server_security_h_sources) $(libags_server_controller_h_sources) $(libags_server_thread_h_sources) libags_audio_la_SOURCES = $(libags_audio_c_sources) $(libags_audio_client_c_sources) $(libags_audio_thread_c_sources) $(libags_audio_file_c_sources) $(libags_audio_midi_c_sources) $(libags_audio_jack_c_sources) $(libags_audio_pulse_c_sources) $(libags_audio_core_audio_c_sources) $(libags_audio_task_c_sources) $(libags_audio_task_recall_c_sources) $(libags_audio_recall_c_sources) $(libags_plugin_c_sources) libags_audio_la_HEADERS_0 = ags/libags-audio.h $(libags_audio_h_sources) $(libags_audio_client_h_sources) $(libags_audio_thread_h_sources) $(libags_audio_file_h_sources) $(libags_audio_midi_h_sources) $(libags_audio_jack_h_sources) $(libags_audio_pulse_h_sources) $(libags_audio_core_audio_h_sources) $(libags_audio_task_h_sources) $(libags_audio_task_recall_h_sources) $(libags_audio_recall_h_sources) $(libags_plugin_h_sources) libags_gui_la_SOURCES = $(libags_gui_c_sources) libags_gui_la_HEADERS_0 = ags/libags-gui.h $(libags_gui_h_sources) libgsequencer_la_HEADERS_0 = $(libgsequencer_h_sources) $(libgsequencer_file_h_sources) $(libgsequencer_thread_h_sources) $(libgsequencer_task_h_sources) $(libgsequencer_import_h_sources) $(libgsequencer_export_h_sources) $(libgsequencer_machine_h_sources) $(libgsequencer_editor_h_sources) libgsequencer_la_SOURCES = $(libgsequencer_la_HEADERS_0) $(libgsequencer_c_sources) $(libgsequencer_file_c_sources) $(libgsequencer_thread_c_sources) $(libgsequencer_task_c_sources) $(libgsequencer_import_c_sources) $(libgsequencer_export_c_sources) $(libgsequencer_machine_c_sources) $(libgsequencer_editor_c_sources) # library libags libags_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(UUID_CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) $(GIO_CFLAGS) libags_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags.sym -version-info 1:0:0 -shared -fPIC -Wl,-soname,libags.so -pthread libags_la_LIBADD = -ldl -lm $(UUID_LIBS) $(LIBXML2_LIBS) $(GOBJECT_LIBS) $(GIO_LIBS) # library libags-thread libags_thread_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) libags_thread_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_thread.sym -version-info 1:0:0 -shared -fPIC -Wl,-soname,libags_thread.so -pthread libags_thread_la_LIBADD = libags.la -ldl -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # library libags-server libags_server_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) libags_server_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_server.sym -version-info 1:0:0 -shared -fPIC -Wl,-soname,libags_server.so -pthread libags_server_la_LIBADD = libags_thread.la libags.la -ldl -lm -lcrypt $(LIBXML2_LIBS) $(GOBJECT_LIBS) # library libags-audio libags_audio_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(CORE_AUDIO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SAMPLERATE_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(PULSE_CFLAGS) libags_audio_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_audio.sym -version-info 1:0:0 -shared -fPIC -soname,libags_audio.so -pthread libags_audio_la_LIBADD = libags_server.la libags_thread.la libags.la -ldl -lm $(CORE_AUDIO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SAMPLERATE_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(PULSE_LIBS) # library libags-gui libags_gui_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(GOBJECT_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) libags_gui_la_LDFLAGS = $(LDFLAGS) -export-symbols $(top_srcdir)/libags_gui.sym -version-info 1:0:0 -shared -fPIC -Wl,-soname,libags_gui.so -pthread libags_gui_la_LIBADD = -ldl -lm $(GOBJECT_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) # library libgsequencer libgsequencer_la_CFLAGS = $(CFLAGS) $(COMPILER_FLAGS) $(WARN_FLAGS) -O -I./ -I/usr/include $(CORE_AUDIO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(JACK_CFLAGS) $(PULSE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) $(GTK_MAC_INTEGRATION_CFLAGS) libgsequencer_la_LDFLAGS = $(LDFLAGS) -version-info 0:1:0 -shared -fPIC -Wl,-soname,libgsequencer.so -pthread libgsequencer_la_LIBADD = libags_audio.la libags_server.la libags_gui.la libags_thread.la libags.la -ldl -lm $(CORE_AUDIO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(JACK_LIBS) $(PULSE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) $(GTK_MAC_INTEGRATION_LIBS) # gsequencer gsequencer_SOURCES = $(gsequencer_c_sources) $(gsequencerheaders) gsequencer_CFLAGS += $(LIBASOUND2_CFLAGS) $(LIBAO_CFLAGS) $(LIBXML2_CFLAGS) $(OPENSSL_CFLAGS) $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) $(XMLRPC_SERVER_CFLAGS) $(SNDFILE_CFLAGS) $(JACK_CFLAGS) $(PULSE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) $(GTK_MAC_INTEGRATION_CFLAGS) gsequencer_LDFLAGS += -pthread gsequencer_LDADD = libgsequencer.la libags_audio.la libags_server.la libags_gui.la libags_thread.la libags.la -ldl -lm $(RT_LIBS) $(X11_LIBS) $(CORE_AUDIO_CFLAGS) $(LIBASOUND2_LIBS) $(LIBAO_LIBS) $(LIBXML2_LIBS) $(OPENSSL_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) $(XMLRPC_SERVER_LIBS) $(SNDFILE_LIBS) $(JACK_LIBS) $(PULSE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) $(GTK_MAC_INTEGRATION_LIBS) # unit and functional tests check_PROGRAMS = include $(top_srcdir)/unit-tests.mk include $(top_srcdir)/functional-tests.mk TESTS = $(check_PROGRAMS) # internationalization noinst_HEADERS = ags/i18n.h # libags all files deprecated_libags_h_sources = libags_h_sources = \ $(deprecated_libags_h_sources) \ ags/lib/ags_buffer_util.h \ ags/lib/ags_complex.h \ ags/lib/ags_conversion.h \ ags/lib/ags_endian.h \ ags/lib/ags_function.h \ ags/lib/ags_log.h \ ags/lib/ags_parameter.h \ ags/lib/ags_regex.h \ ags/lib/ags_string_util.h \ ags/lib/ags_time.h \ ags/lib/ags_turtle.h \ ags/lib/ags_turtle_manager.h deprecated_libags_c_sources = libags_c_sources = \ $(deprecated_libags_c_sources) \ ags/lib/ags_buffer_util.c \ ags/lib/ags_complex.c \ ags/lib/ags_conversion.c \ ags/lib/ags_endian.c \ ags/lib/ags_function.c \ ags/lib/ags_log.c \ ags/lib/ags_parameter.c \ ags/lib/ags_regex.c \ ags/lib/ags_string_util.c \ ags/lib/ags_time.c \ ags/lib/ags_turtle.c \ ags/lib/ags_turtle_manager.c deprecated_libags_util_h_sources = # libags - util libags_util_h_sources = \ $(deprecated_libags_util_h_sources) \ ags/util/ags_destroy_util.h \ ags/util/ags_id_generator.h \ ags/util/ags_list_util.h deprecated_libags_util_c_sources = libags_util_c_sources = \ $(deprecated_libags_util_c_sources) \ ags/util/ags_destroy_util.c \ ags/util/ags_id_generator.c \ ags/util/ags_list_util.c deprecated_libags_object_h_sources = # libags - object libags_object_h_sources = \ $(deprecated_libags_object_h_sources) \ ags/object/ags_applicable.h \ ags/object/ags_application_context.h \ ags/object/ags_async_queue.h \ ags/object/ags_config.h \ ags/object/ags_connectable.h \ ags/object/ags_connection.h \ ags/object/ags_connection_manager.h \ ags/object/ags_countable.h \ ags/object/ags_concurrent_tree.h \ ags/object/ags_distributed_manager.h \ ags/object/ags_dynamic_connectable.h \ ags/object/ags_macros.h \ ags/object/ags_main_loop.h \ ags/object/ags_marshal.h \ ags/object/ags_mutable.h \ ags/object/ags_packable.h \ ags/object/ags_plugin.h \ ags/object/ags_portlet.h \ ags/object/ags_seekable.h \ ags/object/ags_sequencer.h \ ags/object/ags_soundcard.h \ ags/object/ags_tactable.h \ ags/object/ags_tree_iterator.h deprecated_libags_object_c_sources = libags_object_c_sources = \ $(deprecated_libags_object_c_sources) \ ags/object/ags_applicable.c \ ags/object/ags_application_context.c \ ags/object/ags_async_queue.c \ ags/object/ags_config.c \ ags/object/ags_connectable.c \ ags/object/ags_connection.c \ ags/object/ags_connection_manager.c \ ags/object/ags_countable.c \ ags/object/ags_concurrent_tree.c \ ags/object/ags_distributed_manager.c \ ags/object/ags_dynamic_connectable.c \ ags/object/ags_main_loop.c \ ags/object/ags_marshal.c \ ags/object/ags_mutable.c \ ags/object/ags_packable.c \ ags/object/ags_plugin.c \ ags/object/ags_portlet.c \ ags/object/ags_seekable.c \ ags/object/ags_sequencer.c \ ags/object/ags_soundcard.c \ ags/object/ags_tactable.c \ ags/object/ags_tree_iterator.c deprecated_libags_file_h_sources = # libags - file libags_file_h_sources = \ $(deprecated_libags_file_h_sources) \ ags/file/ags_file.h \ ags/file/ags_file_id_ref.h \ ags/file/ags_file_launch.h \ ags/file/ags_file_link.h \ ags/file/ags_file_lookup.h \ ags/file/ags_file_stock.h \ ags/file/ags_file_util.h \ ags/file/ags_xml_serialization_factory.h deprecated_libags_file_c_sources = libags_file_c_sources = \ $(deprecated_libags_file_c_sources) \ ags/file/ags_file.c \ ags/file/ags_file_id_ref.c \ ags/file/ags_file_launch.c \ ags/file/ags_file_link.c \ ags/file/ags_file_lookup.c \ ags/file/ags_file_util.c \ ags/file/ags_xml_serialization_factory.c # libags-thread all files deprecated_libags_thread_h_sources = libags_thread_h_sources = \ $(deprecated_libags_thread_h_sources) \ ags/thread/ags_autosave_thread.h \ ags/thread/ags_concurrency_provider.h \ ags/thread/ags_condition_manager.h \ ags/thread/ags_destroy_worker.h \ ags/thread/ags_generic_main_loop.h \ ags/thread/ags_history.h \ ags/thread/ags_message_delivery.h \ ags/thread/ags_message_queue.h \ ags/thread/ags_mutex_manager.h \ ags/thread/ags_poll_fd.h \ ags/thread/ags_polling_thread.h \ ags/thread/ags_returnable_thread.h \ ags/thread/ags_single_thread.h \ ags/thread/ags_task_completion.h \ ags/thread/ags_task.h \ ags/thread/ags_task_thread.h \ ags/thread/ags_thread_application_context.h \ ags/thread/ags_thread_pool.h \ ags/thread/ags_thread-posix.h \ ags/thread/ags_timestamp_factory.h \ ags/thread/ags_timestamp_thread.h \ ags/thread/ags_timestamp.h \ ags/thread/ags_worker_thread.h deprecated_libags_thread_c_sources = libags_thread_c_sources = \ $(deprecated_libags_thread_c_sources) \ ags/thread/ags_autosave_thread.c \ ags/thread/ags_concurrency_provider.c \ ags/thread/ags_condition_manager.c \ ags/thread/ags_destroy_worker.c \ ags/thread/ags_generic_main_loop.c \ ags/thread/ags_history.c \ ags/thread/ags_message_delivery.c \ ags/thread/ags_message_queue.c \ ags/thread/ags_mutex_manager.c \ ags/thread/ags_poll_fd.c \ ags/thread/ags_polling_thread.c \ ags/thread/ags_returnable_thread.c \ ags/thread/ags_single_thread.c \ ags/thread/ags_task_completion.c \ ags/thread/ags_task.c \ ags/thread/ags_task_thread.c \ ags/thread/ags_thread_application_context.c \ ags/thread/ags_thread_pool.c \ ags/thread/ags_thread-posix.c \ ags/thread/ags_timestamp_factory.c \ ags/thread/ags_timestamp_thread.c \ ags/thread/ags_timestamp.c \ ags/thread/ags_worker_thread.c # libags-thread - file deprecated_libags_thread_file_h_sources = libags_thread_file_h_sources = \ $(deprecated_libags_thread_file_h_sources) \ ags/thread/file/ags_thread_file_xml.h \ ags/thread/file/ags_thread_xml_serialization_factory.h deprecated_libags_thread_file_c_sources = libags_thread_file_c_sources = \ $(deprecated_libags_thread_file_c_sources) \ ags/thread/file/ags_thread_file_xml.c \ ags/thread/file/ags_thread_xml_serialization_factory.c # libags-server all files deprecated_libags_server_h_sources = libags_server_h_sources = \ $(deprecated_libags_server_h_sources) \ ags/server/ags_registry.h \ ags/server/ags_server.h \ ags/server/ags_server_application_context.h \ ags/server/ags_server_status.h \ ags/server/ags_service_provider.h deprecated_libags_server_c_sources = libags_server_c_sources = \ $(deprecated_libags_server_c_sources) \ ags/server/ags_registry.c \ ags/server/ags_server.c \ ags/server/ags_server_application_context.c \ ags/server/ags_server_status.c \ ags/server/ags_service_provider.c # libags-server - security deprecated_libags_server_security_h_sources = libags_server_security_h_sources = \ $(deprecated_libags_server_security_h_sources) \ ags/server/security/ags_authentication.h \ ags/server/security/ags_authentication_manager.h \ ags/server/security/ags_business_group.h \ ags/server/security/ags_certificate.h \ ags/server/security/ags_certificate_manager.h \ ags/server/security/ags_password_store.h \ ags/server/security/ags_password_store_manager.h \ ags/server/security/ags_security_context.h \ ags/server/security/ags_xml_authentication.h \ ags/server/security/ags_xml_certificate.h \ ags/server/security/ags_xml_password_store.h deprecated_libags_server_security_c_sources = libags_server_security_c_sources = \ $(deprecated_libags_server_security_c_sources) \ ags/server/security/ags_authentication.c \ ags/server/security/ags_authentication_manager.c \ ags/server/security/ags_business_group.c \ ags/server/security/ags_certificate.c \ ags/server/security/ags_certificate_manager.c \ ags/server/security/ags_password_store.c \ ags/server/security/ags_password_store_manager.c \ ags/server/security/ags_security_context.c \ ags/server/security/ags_xml_authentication.c \ ags/server/security/ags_xml_certificate.c \ ags/server/security/ags_xml_password_store.c # libags-server - controller deprecated_libags_server_controller_h_sources = libags_server_controller_h_sources = \ $(deprecated_libags_server_controller_h_sources) \ ags/server/controller/ags_controller.h \ ags/server/controller/ags_front_controller.h \ ags/server/controller/ags_local_factory_controller.h \ ags/server/controller/ags_local_registry_controller.h \ ags/server/controller/ags_local_serialization_controller.h \ ags/server/controller/ags_local_task_controller.h deprecated_libags_server_controller_c_sources = libags_server_controller_c_sources = \ $(deprecated_libags_server_controller_c_sources) \ ags/server/controller/ags_controller.c \ ags/server/controller/ags_front_controller.c \ ags/server/controller/ags_local_factory_controller.c \ ags/server/controller/ags_local_registry_controller.c \ ags/server/controller/ags_local_serialization_controller.c \ ags/server/controller/ags_local_task_controller.c # libags-server - file deprecated_libags_server_file_h_sources = libags_server_file_h_sources = \ $(deprecated_libags_server_file_h_sources) deprecated_libags_server_file_c_sources = libags_server_file_c_sources = \ $(deprecated_libags_server_file_c_sources) # libags-server - thread deprecated_libags_server_thread_h_sources = libags_server_thread_h_sources = \ $(deprecated_libags_server_thread_h_sources) \ ags/server/thread/ags_remote_task.h \ ags/server/thread/ags_remote_task_thread.h deprecated_libags_server_thread_c_sources = libags_server_thread_c_sources = \ $(deprecated_libags_server_thread_c_sources) \ ags/server/thread/ags_remote_task.c \ ags/server/thread/ags_remote_task_thread.c # libags-audio all files deprecated_libags_audio_h_sources = libags_audio_h_sources = \ $(deprecated_libags_audio_h_sources) \ ags/audio/ags_acceleration.h \ ags/audio/ags_audio.h \ ags/audio/ags_audio_application_context.h \ ags/audio/ags_audio_buffer_util.h \ ags/audio/ags_audio_connection.h \ ags/audio/ags_audio_signal.h \ ags/audio/ags_automation.h \ ags/audio/ags_buffer.h \ ags/audio/ags_channel.h \ ags/audio/ags_channel_iter.h \ ags/audio/ags_devout.h \ ags/audio/ags_devin.h \ ags/audio/ags_effect.h \ ags/audio/ags_fifoout.h \ ags/audio/ags_input.h \ ags/audio/ags_message.h \ ags/audio/ags_midiin.h \ ags/audio/ags_notation.h \ ags/audio/ags_note.h \ ags/audio/ags_output.h \ ags/audio/ags_pattern.h \ ags/audio/ags_playable.h \ ags/audio/ags_playback.h \ ags/audio/ags_playback_domain.h \ ags/audio/ags_port.h \ ags/audio/ags_preset.h \ ags/audio/ags_recall_audio.h \ ags/audio/ags_recall_audio_run.h \ ags/audio/ags_recall_audio_signal.h \ ags/audio/ags_recall_channel.h \ ags/audio/ags_recall_channel_run_dummy.h \ ags/audio/ags_recall_channel_run.h \ ags/audio/ags_recall_container.h \ ags/audio/ags_recall_dependency.h \ ags/audio/ags_recall_factory.h \ ags/audio/ags_recall.h \ ags/audio/ags_recall_dssi.h \ ags/audio/ags_recall_dssi_run.h \ ags/audio/ags_recall_id.h \ ags/audio/ags_recall_ladspa.h \ ags/audio/ags_recall_ladspa_run.h \ ags/audio/ags_recall_lv2.h \ ags/audio/ags_recall_lv2_run.h \ ags/audio/ags_recall_adaptor_run.h \ ags/audio/ags_recall_recycling_dummy.h \ ags/audio/ags_recall_recycling.h \ ags/audio/ags_recycling_context.h \ ags/audio/ags_recycling.h \ ags/audio/ags_sound_provider.h \ ags/audio/ags_synth_generator.h \ ags/audio/ags_synth_util.h \ ags/audio/ags_wave.h deprecated_libags_audio_c_sources = libags_audio_c_sources = \ $(deprecated_libags_audio_c_sources) \ ags/audio/ags_acceleration.c \ ags/audio/ags_audio.c \ ags/audio/ags_audio_application_context.c \ ags/audio/ags_audio_buffer_util.c \ ags/audio/ags_audio_connection.c \ ags/audio/ags_audio_signal.c \ ags/audio/ags_automation.c \ ags/audio/ags_buffer.c \ ags/audio/ags_channel.c \ ags/audio/ags_channel_iter.c \ ags/audio/ags_devout.c \ ags/audio/ags_devin.c \ ags/audio/ags_input.c \ ags/audio/ags_fifoout.c \ ags/audio/ags_message.c \ ags/audio/ags_midiin.c \ ags/audio/ags_notation.c \ ags/audio/ags_note.c \ ags/audio/ags_output.c \ ags/audio/ags_pattern.c \ ags/audio/ags_playable.c \ ags/audio/ags_playback.c \ ags/audio/ags_playback_domain.c \ ags/audio/ags_port.c \ ags/audio/ags_preset.c \ ags/audio/ags_recall_audio.c \ ags/audio/ags_recall_audio_run.c \ ags/audio/ags_recall_audio_signal.c \ ags/audio/ags_recall.c \ ags/audio/ags_recall_channel.c \ ags/audio/ags_recall_channel_run.c \ ags/audio/ags_recall_channel_run_dummy.c \ ags/audio/ags_recall_container.c \ ags/audio/ags_recall_dependency.c \ ags/audio/ags_recall_factory.c \ ags/audio/ags_recall_dssi.c \ ags/audio/ags_recall_dssi_run.c \ ags/audio/ags_recall_id.c \ ags/audio/ags_recall_ladspa.c \ ags/audio/ags_recall_ladspa_run.c \ ags/audio/ags_recall_lv2.c \ ags/audio/ags_recall_lv2_run.c \ ags/audio/ags_recall_adaptor_run.c \ ags/audio/ags_recall_recycling.c \ ags/audio/ags_recall_recycling_dummy.c \ ags/audio/ags_recycling.c \ ags/audio/ags_recycling_context.c \ ags/audio/ags_sound_provider.c \ ags/audio/ags_synth_generator.c \ ags/audio/ags_synth_util.c \ ags/audio/ags_wave.c # libags-audio - client deprecated_libags_audio_client_h_sources = libags_audio_client_h_sources = \ $(deprecated_libags_audio_client_h_sources) \ ags/audio/client/ags_remote_channel.h \ ags/audio/client/ags_remote_input.h \ ags/audio/client/ags_remote_output.h deprecated_libags_audio_client_c_sources = libags_audio_client_c_sources = \ $(deprecated_libags_audio_client_c_sources) \ ags/audio/client/ags_remote_channel.c \ ags/audio/client/ags_remote_input.c \ ags/audio/client/ags_remote_output.c # libags-audio - thread deprecated_libags_audio_thread_h_sources = libags_audio_thread_h_sources = \ $(deprecated_libags_audio_thread_h_sources) \ ags/audio/thread/ags_audio_loop.h \ ags/audio/thread/ags_audio_thread.h \ ags/audio/thread/ags_channel_thread.h \ ags/audio/thread/ags_sequencer_thread.h \ ags/audio/thread/ags_soundcard_thread.h \ ags/audio/thread/ags_export_thread.h \ ags/audio/thread/ags_iterator_thread.h \ ags/audio/thread/ags_record_thread.h \ ags/audio/thread/ags_recycling_thread_callbacks.h \ ags/audio/thread/ags_recycling_thread.h deprecated_libags_audio_thread_c_sources = libags_audio_thread_c_sources = \ $(deprecated_libags_audio_thread_c_sources) \ ags/audio/thread/ags_audio_loop.c \ ags/audio/thread/ags_audio_thread.c \ ags/audio/thread/ags_channel_thread.c \ ags/audio/thread/ags_sequencer_thread.c \ ags/audio/thread/ags_soundcard_thread.c \ ags/audio/thread/ags_export_thread.c \ ags/audio/thread/ags_iterator_thread.c \ ags/audio/thread/ags_record_thread.c \ ags/audio/thread/ags_recycling_thread.c \ ags/audio/thread/ags_recycling_thread_callbacks.c # libags-audio - plugin deprecated_libags_plugin_h_sources = libags_plugin_h_sources = \ $(deprecated_libags_plugin_h_sources) \ ags/plugin/ags_base_plugin.h \ ags/plugin/ags_dssi_manager.h \ ags/plugin/ags_dssi_plugin.h \ ags/plugin/ags_ladspa_conversion.h \ ags/plugin/ags_ladspa_manager.h \ ags/plugin/ags_ladspa_plugin.h \ ags/plugin/ags_plugin_factory.h \ ags/plugin/ags_lv2_conversion.h \ ags/plugin/ags_lv2_manager.h \ ags/plugin/ags_lv2_plugin.h \ ags/plugin/ags_lv2_preset.h \ ags/plugin/ags_lv2_event_manager.h \ ags/plugin/ags_lv2_log_manager.h \ ags/plugin/ags_lv2_option_manager.h \ ags/plugin/ags_lv2_uri_map_manager.h \ ags/plugin/ags_lv2_urid_manager.h \ ags/plugin/ags_lv2_worker_manager.h \ ags/plugin/ags_lv2_worker.h \ ags/plugin/ags_lv2ui_manager.h \ ags/plugin/ags_lv2ui_plugin.h \ ags/plugin/ags_plugin_stock.h deprecated_libags_plugin_c_sources = libags_plugin_c_sources = \ $(deprecated_libags_plugin_c_sources) \ ags/plugin/ags_base_plugin.c \ ags/plugin/ags_dssi_manager.c \ ags/plugin/ags_dssi_plugin.c \ ags/plugin/ags_ladspa_conversion.c \ ags/plugin/ags_ladspa_manager.c \ ags/plugin/ags_ladspa_plugin.c \ ags/plugin/ags_lv2_conversion.c \ ags/plugin/ags_lv2_manager.c \ ags/plugin/ags_lv2_plugin.c \ ags/plugin/ags_lv2_preset.c \ ags/plugin/ags_lv2_log_manager.c \ ags/plugin/ags_lv2_event_manager.c \ ags/plugin/ags_lv2_option_manager.c \ ags/plugin/ags_lv2_uri_map_manager.c \ ags/plugin/ags_lv2_urid_manager.c \ ags/plugin/ags_lv2_worker_manager.c \ ags/plugin/ags_lv2_worker.c \ ags/plugin/ags_lv2ui_manager.c \ ags/plugin/ags_lv2ui_plugin.c \ ags/plugin/ags_plugin_factory.c # libags-audio - file deprecated_libags_audio_file_h_sources = libags_audio_file_h_sources = \ $(deprecated_libags_audio_file_h_sources) \ ags/audio/file/ags_audio_file.h \ ags/audio/file/ags_audio_file_link.h \ ags/audio/file/ags_audio_file_xml.h \ ags/audio/file/ags_audio_xml_serialization_factory.h \ ags/audio/file/ags_ipatch.h \ ags/audio/file/ags_ipatch_dls2_reader.h \ ags/audio/file/ags_ipatch_sf2_reader.h \ ags/audio/file/ags_sndfile.h deprecated_libags_audio_file_c_sources = libags_audio_file_c_sources = \ $(deprecated_libags_audio_file_c_sources) \ ags/audio/file/ags_audio_file.c \ ags/audio/file/ags_audio_file_link.c \ ags/audio/file/ags_audio_file_xml.c \ ags/audio/file/ags_audio_xml_serialization_factory.c \ ags/audio/file/ags_ipatch.c \ ags/audio/file/ags_ipatch_dls2_reader.c \ ags/audio/file/ags_ipatch_sf2_reader.c \ ags/audio/file/ags_sndfile.c # libags-audio - midi deprecated_libags_audio_midi_h_sources = libags_audio_midi_h_sources = \ $(deprecated_libags_audio_midi_h_sources) \ ags/audio/midi/ags_midi_buffer_util.h \ ags/audio/midi/ags_midi_util.h \ ags/audio/midi/ags_midi_builder.h \ ags/audio/midi/ags_midi_file.h \ ags/audio/midi/ags_midi_parser.h deprecated_libags_audio_midi_c_sources = libags_audio_midi_c_sources = \ $(deprecated_libags_audio_midi_c_sources) \ ags/audio/midi/ags_midi_buffer_util.c \ ags/audio/midi/ags_midi_util.c \ ags/audio/midi/ags_midi_builder.c \ ags/audio/midi/ags_midi_file.c \ ags/audio/midi/ags_midi_parser.c # libags-audio - jack deprecated_libags_audio_jack_h_sources = libags_audio_jack_h_sources = \ $(deprecated_libags_audio_jack_h_sources) \ ags/audio/jack/ags_jack_client.h \ ags/audio/jack/ags_jack_midiin.h \ ags/audio/jack/ags_jack_devout.h \ ags/audio/jack/ags_jack_devin.h \ ags/audio/jack/ags_jack_port.h \ ags/audio/jack/ags_jack_server.h deprecated_libags_audio_jack_c_sources = libags_audio_jack_c_sources = \ $(deprecated_libags_audio_jack_c_sources) \ ags/audio/jack/ags_jack_client.c \ ags/audio/jack/ags_jack_midiin.c \ ags/audio/jack/ags_jack_devout.c \ ags/audio/jack/ags_jack_devin.c \ ags/audio/jack/ags_jack_port.c \ ags/audio/jack/ags_jack_server.c # libags-audio - pulse deprecated_libags_audio_pulse_h_sources = libags_audio_pulse_h_sources = \ $(deprecated_libags_audio_pulse_h_sources) \ ags/audio/pulse/ags_pulse_client.h \ ags/audio/pulse/ags_pulse_devout.h \ ags/audio/pulse/ags_pulse_devin.h \ ags/audio/pulse/ags_pulse_port.h \ ags/audio/pulse/ags_pulse_server.h deprecated_libags_audio_pulse_c_sources = libags_audio_pulse_c_sources = \ $(deprecated_libags_audio_pulse_c_sources) \ ags/audio/pulse/ags_pulse_client.c \ ags/audio/pulse/ags_pulse_devout.c \ ags/audio/pulse/ags_pulse_devin.c \ ags/audio/pulse/ags_pulse_port.c \ ags/audio/pulse/ags_pulse_server.c # libags-audio - core-audio deprecated_libags_audio_core_audio_h_sources = libags_audio_core_audio_h_sources = \ $(deprecated_libags_audio_core_audio_h_sources) \ ags/audio/core-audio/ags_core_audio_client.h \ ags/audio/core-audio/ags_core_audio_midiin.h \ ags/audio/core-audio/ags_core_audio_devout.h \ ags/audio/core-audio/ags_core_audio_port.h \ ags/audio/core-audio/ags_core_audio_server.h deprecated_libags_audio_core_audio_c_sources = libags_audio_core_audio_c_sources = \ $(deprecated_libags_audio_core_audio_c_sources) \ ags/audio/core-audio/ags_core_audio_client.c \ ags/audio/core-audio/ags_core_audio_midiin.c \ ags/audio/core-audio/ags_core_audio_devout.c \ ags/audio/core-audio/ags_core_audio_port.c \ ags/audio/core-audio/ags_core_audio_server.c # libags-audio - recall deprecated_libags_audio_recall_h_sources = libags_audio_recall_h_sources = \ $(deprecated_libags_audio_recall_h_sources) \ ags/audio/recall/ags_buffer_audio_signal.h \ ags/audio/recall/ags_buffer_channel.h \ ags/audio/recall/ags_buffer_channel_run.h \ ags/audio/recall/ags_buffer_recycling.h \ ags/audio/recall/ags_capture_sound_audio.h \ ags/audio/recall/ags_capture_sound_audio_run.h \ ags/audio/recall/ags_copy_audio_signal.h \ ags/audio/recall/ags_copy_channel.h \ ags/audio/recall/ags_copy_channel_run.h \ ags/audio/recall/ags_copy_notation_audio.h \ ags/audio/recall/ags_copy_notation_audio_run.h \ ags/audio/recall/ags_copy_pattern_audio.h \ ags/audio/recall/ags_copy_pattern_audio_run.h \ ags/audio/recall/ags_copy_pattern_channel.h \ ags/audio/recall/ags_copy_pattern_channel_run.h \ ags/audio/recall/ags_copy_recycling.h \ ags/audio/recall/ags_count_beats_audio.h \ ags/audio/recall/ags_count_beats_audio_run.h \ ags/audio/recall/ags_delay_audio.h \ ags/audio/recall/ags_delay_audio_run.h \ ags/audio/recall/ags_envelope_audio_signal.h \ ags/audio/recall/ags_envelope_channel.h \ ags/audio/recall/ags_envelope_channel_run.h \ ags/audio/recall/ags_envelope_recycling.h \ ags/audio/recall/ags_feed_audio_signal.h \ ags/audio/recall/ags_feed_channel.h \ ags/audio/recall/ags_feed_channel_run.h \ ags/audio/recall/ags_feed_recycling.h \ ags/audio/recall/ags_loop_channel.h \ ags/audio/recall/ags_loop_channel_run.h \ ags/audio/recall/ags_mute_audio.h \ ags/audio/recall/ags_mute_audio_run.h \ ags/audio/recall/ags_mute_audio_signal.h \ ags/audio/recall/ags_mute_channel.h \ ags/audio/recall/ags_mute_channel_run.h \ ags/audio/recall/ags_mute_recycling.h \ ags/audio/recall/ags_peak_audio_signal.h \ ags/audio/recall/ags_peak_channel.h \ ags/audio/recall/ags_peak_channel_run.h \ ags/audio/recall/ags_peak_recycling.h \ ags/audio/recall/ags_play_audio_file.h \ ags/audio/recall/ags_play_audio.h \ ags/audio/recall/ags_play_audio_signal.h \ ags/audio/recall/ags_play_channel.h \ ags/audio/recall/ags_play_channel_run.h \ ags/audio/recall/ags_play_channel_run_master.h \ ags/audio/recall/ags_play_dssi_audio.h \ ags/audio/recall/ags_play_dssi_audio_run.h \ ags/audio/recall/ags_play_lv2_audio.h \ ags/audio/recall/ags_play_lv2_audio_run.h \ ags/audio/recall/ags_play_notation_audio.h \ ags/audio/recall/ags_play_notation_audio_run.h \ ags/audio/recall/ags_play_note.h \ ags/audio/recall/ags_play_recycling.h \ ags/audio/recall/ags_prepare_audio_signal.h \ ags/audio/recall/ags_prepare_channel.h \ ags/audio/recall/ags_prepare_channel_run.h \ ags/audio/recall/ags_prepare_recycling.h \ ags/audio/recall/ags_record_midi_audio.h \ ags/audio/recall/ags_record_midi_audio_run.h \ ags/audio/recall/ags_route_dssi_audio.h \ ags/audio/recall/ags_route_dssi_audio_run.h \ ags/audio/recall/ags_route_lv2_audio.h \ ags/audio/recall/ags_route_lv2_audio_run.h \ ags/audio/recall/ags_rt_stream_audio_signal.h \ ags/audio/recall/ags_rt_stream_channel.h \ ags/audio/recall/ags_rt_stream_channel_run.h \ ags/audio/recall/ags_rt_stream_recycling.h \ ags/audio/recall/ags_stream_audio_signal.h \ ags/audio/recall/ags_stream_channel.h \ ags/audio/recall/ags_stream_channel_run.h \ ags/audio/recall/ags_stream_recycling.h \ ags/audio/recall/ags_volume_audio_signal.h \ ags/audio/recall/ags_volume_channel.h \ ags/audio/recall/ags_volume_channel_run.h \ ags/audio/recall/ags_volume_recycling.h deprecated_libags_audio_recall_c_sources = libags_audio_recall_c_sources = \ $(deprecated_libags_audio_recall_c_sources) \ ags/audio/recall/ags_buffer_audio_signal.c \ ags/audio/recall/ags_buffer_channel.c \ ags/audio/recall/ags_buffer_channel_run.c \ ags/audio/recall/ags_buffer_recycling.c \ ags/audio/recall/ags_capture_sound_audio.c \ ags/audio/recall/ags_capture_sound_audio_run.c \ ags/audio/recall/ags_copy_audio_signal.c \ ags/audio/recall/ags_copy_channel.c \ ags/audio/recall/ags_copy_channel_run.c \ ags/audio/recall/ags_copy_notation_audio.c \ ags/audio/recall/ags_copy_notation_audio_run.c \ ags/audio/recall/ags_copy_pattern_audio.c \ ags/audio/recall/ags_copy_pattern_audio_run.c \ ags/audio/recall/ags_copy_pattern_channel.c \ ags/audio/recall/ags_copy_pattern_channel_run.c \ ags/audio/recall/ags_copy_recycling.c \ ags/audio/recall/ags_count_beats_audio.c \ ags/audio/recall/ags_count_beats_audio_run.c \ ags/audio/recall/ags_delay_audio.c \ ags/audio/recall/ags_delay_audio_run.c \ ags/audio/recall/ags_envelope_audio_signal.c \ ags/audio/recall/ags_envelope_channel.c \ ags/audio/recall/ags_envelope_channel_run.c \ ags/audio/recall/ags_envelope_recycling.c \ ags/audio/recall/ags_feed_audio_signal.c \ ags/audio/recall/ags_feed_channel.c \ ags/audio/recall/ags_feed_channel_run.c \ ags/audio/recall/ags_feed_recycling.c \ ags/audio/recall/ags_loop_channel.c \ ags/audio/recall/ags_loop_channel_run.c \ ags/audio/recall/ags_mute_audio.c \ ags/audio/recall/ags_mute_audio_run.c \ ags/audio/recall/ags_mute_audio_signal.c \ ags/audio/recall/ags_mute_channel.c \ ags/audio/recall/ags_mute_channel_run.c \ ags/audio/recall/ags_mute_recycling.c \ ags/audio/recall/ags_peak_audio_signal.c \ ags/audio/recall/ags_peak_channel.c \ ags/audio/recall/ags_peak_channel_run.c \ ags/audio/recall/ags_peak_recycling.c \ ags/audio/recall/ags_play_audio.c \ ags/audio/recall/ags_play_audio_file.c \ ags/audio/recall/ags_play_audio_signal.c \ ags/audio/recall/ags_play_channel.c \ ags/audio/recall/ags_play_channel_run.c \ ags/audio/recall/ags_play_channel_run_master.c \ ags/audio/recall/ags_play_dssi_audio.c \ ags/audio/recall/ags_play_dssi_audio_run.c \ ags/audio/recall/ags_play_lv2_audio.c \ ags/audio/recall/ags_play_lv2_audio_run.c \ ags/audio/recall/ags_play_notation_audio.c \ ags/audio/recall/ags_play_notation_audio_run.c \ ags/audio/recall/ags_play_note.c \ ags/audio/recall/ags_play_recycling.c \ ags/audio/recall/ags_prepare_audio_signal.c \ ags/audio/recall/ags_prepare_channel.c \ ags/audio/recall/ags_prepare_channel_run.c \ ags/audio/recall/ags_prepare_recycling.c \ ags/audio/recall/ags_record_midi_audio.c \ ags/audio/recall/ags_record_midi_audio_run.c \ ags/audio/recall/ags_route_dssi_audio.c \ ags/audio/recall/ags_route_dssi_audio_run.c \ ags/audio/recall/ags_route_lv2_audio.c \ ags/audio/recall/ags_route_lv2_audio_run.c \ ags/audio/recall/ags_rt_stream_audio_signal.c \ ags/audio/recall/ags_rt_stream_channel.c \ ags/audio/recall/ags_rt_stream_channel_run.c \ ags/audio/recall/ags_rt_stream_recycling.c \ ags/audio/recall/ags_stream_audio_signal.c \ ags/audio/recall/ags_stream_channel.c \ ags/audio/recall/ags_stream_channel_run.c \ ags/audio/recall/ags_stream_recycling.c \ ags/audio/recall/ags_volume_audio_signal.c \ ags/audio/recall/ags_volume_channel.c \ ags/audio/recall/ags_volume_channel_run.c \ ags/audio/recall/ags_volume_recycling.c # libags-audio - task deprecated_libags_audio_task_h_sources = libags_audio_task_h_sources = \ $(deprecated_libags_audio_task_h_sources) \ ags/audio/task/ags_add_audio.h \ ags/audio/task/ags_add_audio_signal.h \ ags/audio/task/ags_add_effect.h \ ags/audio/task/ags_add_note.h \ ags/audio/task/ags_add_point_to_selection.h \ ags/audio/task/ags_add_recall_container.h \ ags/audio/task/ags_add_recall.h \ ags/audio/task/ags_add_region_to_selection.h \ ags/audio/task/ags_add_soundcard.h \ ags/audio/task/ags_append_audio.h \ ags/audio/task/ags_append_audio_threaded.h \ ags/audio/task/ags_append_channel.h \ ags/audio/task/ags_append_recall.h \ ags/audio/task/ags_apply_presets.h \ ags/audio/task/ags_apply_synth.h \ ags/audio/task/ags_cancel_audio.h \ ags/audio/task/ags_cancel_channel.h \ ags/audio/task/ags_cancel_recall.h \ ags/audio/task/ags_change_soundcard.h \ ags/audio/task/ags_clear_audio_signal.h \ ags/audio/task/ags_clear_buffer.h \ ags/audio/task/ags_crop_note.h \ ags/audio/task/ags_export_output.h \ ags/audio/task/ags_free_selection.h \ ags/audio/task/ags_init_audio.h \ ags/audio/task/ags_init_channel.h \ ags/audio/task/ags_link_channel.h \ ags/audio/task/ags_move_note.h \ ags/audio/task/ags_notify_soundcard.h \ ags/audio/task/ags_open_file.h \ ags/audio/task/ags_open_sf2_sample.h \ ags/audio/task/ags_open_single_file.h \ ags/audio/task/ags_remove_audio.h \ ags/audio/task/ags_remove_audio_signal.h \ ags/audio/task/ags_remove_note.h \ ags/audio/task/ags_remove_point_from_selection.h \ ags/audio/task/ags_remove_recall_container.h \ ags/audio/task/ags_remove_recall.h \ ags/audio/task/ags_remove_region_from_selection.h \ ags/audio/task/ags_remove_soundcard.h \ ags/audio/task/ags_reset_audio_connection.h \ ags/audio/task/ags_resize_audio.h \ ags/audio/task/ags_save_file.h \ ags/audio/task/ags_seek_soundcard.h \ ags/audio/task/ags_set_audio_channels.h \ ags/audio/task/ags_set_buffer_size.h \ ags/audio/task/ags_set_format.h \ ags/audio/task/ags_set_input_device.h \ ags/audio/task/ags_set_output_device.h \ ags/audio/task/ags_set_samplerate.h \ ags/audio/task/ags_start_sequencer.h \ ags/audio/task/ags_start_soundcard.h \ ags/audio/task/ags_switch_buffer_flag.h \ ags/audio/task/ags_tic_device.h \ ags/audio/task/ags_toggle_pattern_bit.h \ ags/audio/task/ags_unref_audio_signal.h \ ags/audio/task/recall/ags_apply_bpm.h \ ags/audio/task/recall/ags_apply_sequencer_length.h \ ags/audio/task/recall/ags_apply_tact.h \ ags/audio/task/recall/ags_reset_peak.h \ ags/audio/task/recall/ags_set_muted.h deprecated_libags_audio_task_c_sources = libags_audio_task_c_sources = \ $(deprecated_libags_audio_task_c_sources) \ ags/audio/task/ags_add_audio.c \ ags/audio/task/ags_add_audio_signal.c \ ags/audio/task/ags_add_effect.c \ ags/audio/task/ags_add_note.c \ ags/audio/task/ags_add_point_to_selection.c \ ags/audio/task/ags_add_recall.c \ ags/audio/task/ags_add_recall_container.c \ ags/audio/task/ags_add_region_to_selection.c \ ags/audio/task/ags_add_soundcard.c \ ags/audio/task/ags_append_audio.c \ ags/audio/task/ags_append_audio_threaded.c \ ags/audio/task/ags_append_channel.c \ ags/audio/task/ags_append_recall.c \ ags/audio/task/ags_apply_presets.c \ ags/audio/task/ags_apply_synth.c \ ags/audio/task/ags_cancel_audio.c \ ags/audio/task/ags_cancel_channel.c \ ags/audio/task/ags_cancel_recall.c \ ags/audio/task/ags_change_soundcard.c \ ags/audio/task/ags_clear_audio_signal.c \ ags/audio/task/ags_clear_buffer.c \ ags/audio/task/ags_crop_note.c \ ags/audio/task/ags_export_output.c \ ags/audio/task/ags_free_selection.c \ ags/audio/task/ags_init_audio.c \ ags/audio/task/ags_init_channel.c \ ags/audio/task/ags_link_channel.c \ ags/audio/task/ags_move_note.c \ ags/audio/task/ags_notify_soundcard.c \ ags/audio/task/ags_open_file.c \ ags/audio/task/ags_open_sf2_sample.c \ ags/audio/task/ags_open_single_file.c \ ags/audio/task/ags_remove_audio.c \ ags/audio/task/ags_remove_audio_signal.c \ ags/audio/task/ags_remove_note.c \ ags/audio/task/ags_remove_point_from_selection.c \ ags/audio/task/ags_remove_recall.c \ ags/audio/task/ags_remove_recall_container.c \ ags/audio/task/ags_remove_region_from_selection.c \ ags/audio/task/ags_remove_soundcard.c \ ags/audio/task/ags_reset_audio_connection.c \ ags/audio/task/ags_resize_audio.c \ ags/audio/task/ags_save_file.c \ ags/audio/task/ags_seek_soundcard.c \ ags/audio/task/ags_set_audio_channels.c \ ags/audio/task/ags_set_buffer_size.c \ ags/audio/task/ags_set_format.c \ ags/audio/task/ags_set_input_device.c \ ags/audio/task/ags_set_output_device.c \ ags/audio/task/ags_set_samplerate.c \ ags/audio/task/ags_start_sequencer.c \ ags/audio/task/ags_start_soundcard.c \ ags/audio/task/ags_switch_buffer_flag.c \ ags/audio/task/ags_tic_device.c \ ags/audio/task/ags_toggle_pattern_bit.c \ ags/audio/task/ags_unref_audio_signal.c \ ags/audio/task/recall/ags_apply_bpm.c \ ags/audio/task/recall/ags_apply_sequencer_length.c \ ags/audio/task/recall/ags_apply_tact.c \ ags/audio/task/recall/ags_reset_peak.c \ ags/audio/task/recall/ags_set_muted.c # libags-gui all files deprecated_libags_gui_h_sources = libags_gui_h_sources = \ $(deprecated_libags_gui_h_sources) \ ags/widget/ags_cartesian.h \ ags/widget/ags_dial.h \ ags/widget/ags_expander.h \ ags/widget/ags_expander_set.h \ ags/widget/ags_hindicator.h \ ags/widget/ags_hled_array.h \ ags/widget/ags_htimebar.h \ ags/widget/ags_indicator.h \ ags/widget/ags_led.h \ ags/widget/ags_led_array.h \ ags/widget/ags_level.h \ ags/widget/ags_level_box.h \ ags/widget/ags_hlevel_box.h \ ags/widget/ags_vlevel_box.h \ ags/widget/ags_notebook.h \ ags/widget/ags_piano_keys.h \ ags/widget/ags_piano.h \ ags/widget/ags_scrolled_piano.h \ ags/widget/ags_scale.h \ ags/widget/ags_scale_box.h \ ags/widget/ags_vscale_box.h \ ags/widget/ags_hscale_box.h \ ags/widget/ags_scrolled_level_box.h \ ags/widget/ags_scrolled_scale_box.h \ ags/widget/ags_ruler.h \ ags/widget/ags_table.h \ ags/widget/ags_timebar.h \ ags/widget/ags_vindicator.h \ ags/widget/ags_vled_array.h \ ags/widget/ags_waveform.h \ ags/widget/ags_widget_marshal.h \ ags/widget/ags_container.h deprecated_libags_gui_c_sources = libags_gui_c_sources = \ $(deprecated_libags_gui_c_sources) \ ags/widget/ags_cartesian.c \ ags/widget/ags_dial.c \ ags/widget/ags_expander.c \ ags/widget/ags_expander_set.c \ ags/widget/ags_hindicator.c \ ags/widget/ags_hled_array.c \ ags/widget/ags_htimebar.c \ ags/widget/ags_indicator.c \ ags/widget/ags_led.c \ ags/widget/ags_led_array.c \ ags/widget/ags_level.c \ ags/widget/ags_level_box.c \ ags/widget/ags_hlevel_box.c \ ags/widget/ags_vlevel_box.c \ ags/widget/ags_notebook.c \ ags/widget/ags_piano.c \ ags/widget/ags_scrolled_piano.c \ ags/widget/ags_scale.c \ ags/widget/ags_scale_box.c \ ags/widget/ags_vscale_box.c \ ags/widget/ags_hscale_box.c \ ags/widget/ags_scrolled_scale_box.c \ ags/widget/ags_scrolled_level_box.c \ ags/widget/ags_ruler.c \ ags/widget/ags_table.c \ ags/widget/ags_timebar.c \ ags/widget/ags_vindicator.c \ ags/widget/ags_vled_array.c \ ags/widget/ags_waveform.c \ ags/widget/ags_widget_marshal.c \ ags/widget/ags_container.c # libgsequencer all files deprecated_libgsequencer_h_sources = libgsequencer_h_sources = \ $(deprecated_libgsequencer_h_sources) \ ags/X/ags_automation_editor_callbacks.h \ ags/X/ags_automation_editor.h \ ags/X/ags_automation_window_callbacks.h \ ags/X/ags_automation_window.h \ ags/X/ags_audio_preferences_callbacks.h \ ags/X/ags_audio_preferences.h \ ags/X/ags_bulk_member_callbacks.h \ ags/X/ags_bulk_member.h \ ags/X/ags_connection_editor_callbacks.h \ ags/X/ags_connection_editor.h \ ags/X/ags_context_menu.h \ ags/X/ags_dssi_browser_callbacks.h \ ags/X/ags_dssi_browser.h \ ags/X/ags_effect_bridge_callbacks.h \ ags/X/ags_effect_bridge.h \ ags/X/ags_effect_bulk_callbacks.h \ ags/X/ags_effect_bulk.h \ ags/X/ags_effect_line_callbacks.h \ ags/X/ags_effect_line.h \ ags/X/ags_effect_pad_callbacks.h \ ags/X/ags_effect_pad.h \ ags/X/ags_effect_separator.h \ ags/X/ags_export_soundcard_callbacks.h \ ags/X/ags_export_soundcard.h \ ags/X/ags_export_window_callbacks.h \ ags/X/ags_export_window.h \ ags/X/ags_generic_preferences_callbacks.h \ ags/X/ags_generic_preferences.h \ ags/X/ags_history_browser_callbacks.h \ ags/X/ags_history_browser.h \ ags/X/ags_ladspa_browser_callbacks.h \ ags/X/ags_ladspa_browser.h \ ags/X/ags_lv2_browser_callbacks.h \ ags/X/ags_lv2_browser.h \ ags/X/ags_line_callbacks.h \ ags/X/ags_line_editor_callbacks.h \ ags/X/ags_line_editor.h \ ags/X/ags_line.h \ ags/X/ags_line_member_callbacks.h \ ags/X/ags_line_member_editor_callbacks.h \ ags/X/ags_line_member_editor.h \ ags/X/ags_line_member.h \ ags/X/ags_link_collection_editor_callbacks.h \ ags/X/ags_link_collection_editor.h \ ags/X/ags_link_editor_callbacks.h \ ags/X/ags_link_editor.h \ ags/X/ags_listing_editor_callbacks.h \ ags/X/ags_listing_editor.h \ ags/X/ags_machine_callbacks.h \ ags/X/ags_machine_editor_callbacks.h \ ags/X/ags_machine_editor.h \ ags/X/ags_machine.h \ ags/X/ags_menu_action_callbacks.h \ ags/X/ags_menu_bar.h \ ags/X/ags_midi_dialog_callbacks.h \ ags/X/ags_midi_dialog.h \ ags/X/ags_midi_preferences.h \ ags/X/ags_midi_preferences_callbacks.h \ ags/X/ags_navigation_callbacks.h \ ags/X/ags_navigation.h \ ags/X/ags_notation_editor_callbacks.h \ ags/X/ags_notation_editor.h \ ags/X/ags_output_collection_editor_callbacks.h \ ags/X/ags_output_collection_editor.h \ ags/X/ags_output_editor_callbacks.h \ ags/X/ags_output_editor.h \ ags/X/ags_output_listing_editor_callbacks.h \ ags/X/ags_output_listing_editor.h \ ags/X/ags_pad_callbacks.h \ ags/X/ags_pad_editor_callbacks.h \ ags/X/ags_pad_editor.h \ ags/X/ags_pad.h \ ags/X/ags_performance_preferences_callbacks.h \ ags/X/ags_performance_preferences.h \ ags/X/ags_playback_window_callbacks.h \ ags/X/ags_playback_window.h \ ags/X/ags_plugin_browser_callbacks.h \ ags/X/ags_plugin_browser.h \ ags/X/ags_plugin_preferences_callbacks.h \ ags/X/ags_plugin_preferences.h \ ags/X/ags_preferences_callbacks.h \ ags/X/ags_preferences.h \ ags/X/ags_property_collection_editor_callbacks.h \ ags/X/ags_property_collection_editor.h \ ags/X/ags_property_editor_callbacks.h \ ags/X/ags_property_editor.h \ ags/X/ags_property_listing_editor.h \ ags/X/ags_resize_editor.h \ ags/X/ags_sequencer_editor_callbacks.h \ ags/X/ags_sequencer_editor.h \ ags/X/ags_server_preferences_callbacks.h \ ags/X/ags_server_preferences.h \ ags/X/ags_soundcard_editor_callbacks.h \ ags/X/ags_soundcard_editor.h \ ags/X/ags_ui_provider.h \ ags/X/ags_wave_window_callbacks.h \ ags/X/ags_wave_window.h \ ags/X/ags_wave_editor_callbacks.h \ ags/X/ags_wave_editor.h \ ags/X/ags_window.h \ ags/X/ags_window_callbacks.h \ ags/X/ags_xorg_application_context.h deprecated_libgsequencer_c_sources = libgsequencer_c_sources = \ $(deprecated_libgsequencer_c_sources) \ ags/X/ags_automation_editor.c \ ags/X/ags_automation_editor_callbacks.c \ ags/X/ags_automation_window.c \ ags/X/ags_automation_window_callbacks.c \ ags/X/ags_audio_preferences.c \ ags/X/ags_audio_preferences_callbacks.c \ ags/X/ags_bulk_member.c \ ags/X/ags_bulk_member_callbacks.c \ ags/X/ags_connection_editor_callbacks.c \ ags/X/ags_connection_editor.c \ ags/X/ags_context_menu.c \ ags/X/ags_dssi_browser_callbacks.c \ ags/X/ags_dssi_browser.c \ ags/X/ags_effect_bridge.c \ ags/X/ags_effect_bridge_callbacks.c \ ags/X/ags_effect_bulk.c \ ags/X/ags_effect_bulk_callbacks.c \ ags/X/ags_effect_line.c \ ags/X/ags_effect_line_callbacks.c \ ags/X/ags_effect_pad.c \ ags/X/ags_effect_pad_callbacks.c \ ags/X/ags_effect_separator.c \ ags/X/ags_export_soundcard.c \ ags/X/ags_export_soundcard_callbacks.c \ ags/X/ags_export_window.c \ ags/X/ags_export_window_callbacks.c \ ags/X/ags_generic_preferences.c \ ags/X/ags_generic_preferences_callbacks.c \ ags/X/ags_history_browser.c \ ags/X/ags_history_browser_callbacks.c \ ags/X/ags_ladspa_browser.c \ ags/X/ags_ladspa_browser_callbacks.c \ ags/X/ags_lv2_browser.c \ ags/X/ags_lv2_browser_callbacks.c \ ags/X/ags_line.c \ ags/X/ags_line_callbacks.c \ ags/X/ags_line_editor.c \ ags/X/ags_line_editor_callbacks.c \ ags/X/ags_line_member.c \ ags/X/ags_line_member_callbacks.c \ ags/X/ags_line_member_editor.c \ ags/X/ags_line_member_editor_callbacks.c \ ags/X/ags_link_collection_editor.c \ ags/X/ags_link_collection_editor_callbacks.c \ ags/X/ags_link_editor.c \ ags/X/ags_link_editor_callbacks.c \ ags/X/ags_listing_editor.c \ ags/X/ags_listing_editor_callbacks.c \ ags/X/ags_machine.c \ ags/X/ags_machine_callbacks.c \ ags/X/ags_machine_editor.c \ ags/X/ags_machine_editor_callbacks.c \ ags/X/ags_menu_action_callbacks.c \ ags/X/ags_menu_bar.c \ ags/X/ags_midi_dialog.c \ ags/X/ags_midi_dialog_callbacks.c \ ags/X/ags_midi_preferences.c \ ags/X/ags_midi_preferences_callbacks.c \ ags/X/ags_navigation.c \ ags/X/ags_navigation_callbacks.c \ ags/X/ags_notation_editor.c \ ags/X/ags_notation_editor_callbacks.c \ ags/X/ags_output_collection_editor_callbacks.c \ ags/X/ags_output_collection_editor.c \ ags/X/ags_output_editor_callbacks.c \ ags/X/ags_output_editor.c \ ags/X/ags_output_listing_editor_callbacks.c \ ags/X/ags_output_listing_editor.c \ ags/X/ags_pad.c \ ags/X/ags_pad_callbacks.c \ ags/X/ags_pad_editor.c \ ags/X/ags_pad_editor_callbacks.c \ ags/X/ags_performance_preferences.c \ ags/X/ags_performance_preferences_callbacks.c \ ags/X/ags_playback_window.c \ ags/X/ags_playback_window_callbacks.c \ ags/X/ags_plugin_browser.c \ ags/X/ags_plugin_browser_callbacks.c \ ags/X/ags_plugin_preferences.c \ ags/X/ags_plugin_preferences_callbacks.c \ ags/X/ags_preferences.c \ ags/X/ags_preferences_callbacks.c \ ags/X/ags_property_collection_editor.c \ ags/X/ags_property_collection_editor_callbacks.c \ ags/X/ags_property_editor.c \ ags/X/ags_property_editor_callbacks.c \ ags/X/ags_property_listing_editor.c \ ags/X/ags_resize_editor.c \ ags/X/ags_sequencer_editor_callbacks.c \ ags/X/ags_sequencer_editor.c \ ags/X/ags_server_preferences.c \ ags/X/ags_server_preferences_callbacks.c \ ags/X/ags_ui_provider.c \ ags/X/ags_wave_window_callbacks.c \ ags/X/ags_wave_window.c \ ags/X/ags_wave_editor.c \ ags/X/ags_wave_editor_callbacks.c \ ags/X/ags_window.c \ ags/X/ags_soundcard_editor_callbacks.c \ ags/X/ags_soundcard_editor.c \ ags/X/ags_window_callbacks.c \ ags/X/ags_xorg_application_context.c # libgsequencer - file deprecated_libgsequencer_file_h_sources = libgsequencer_file_h_sources = \ $(deprecated_libgsequencer_file_h_sources) \ ags/X/file/ags_gui_file_xml.h \ ags/X/file/ags_simple_file.h deprecated_libgsequencer_file_c_sources = libgsequencer_file_c_sources = \ $(deprecated_libgsequencer_file_c_sources) \ ags/X/file/ags_gui_file_xml.c \ ags/X/file/ags_simple_file.c # libgsequencer-thread - thread deprecated_libgsequencer_thread_h_sources = libgsequencer_thread_h_sources = \ $(deprecated_libgsequencer_thread_h_sources) \ ags/X/thread/ags_gui_thread.h \ ags/X/thread/ags_simple_autosave_thread.h deprecated_libgsequencer_thread_c_sources = libgsequencer_thread_c_sources = \ $(deprecated_libgsequencer_thread_c_sources) \ ags/X/thread/ags_gui_thread.c \ ags/X/thread/ags_simple_autosave_thread.c # libgsequencer - task deprecated_libgsequencer_task_h_sources = libgsequencer_task_h_sources = \ $(deprecated_libgsequencer_task_h_sources) \ ags/X/task/ags_add_bulk_member.h \ ags/X/task/ags_add_line_member.h \ ags/X/task/ags_add_sequencer_editor_jack.h \ ags/X/task/ags_add_soundcard_editor_sink.h \ ags/X/task/ags_blink_cell_pattern_cursor.h \ ags/X/task/ags_change_indicator.h \ ags/X/task/ags_change_tact.h \ ags/X/task/ags_display_tact.h \ ags/X/task/ags_remove_sequencer_editor_jack.h \ ags/X/task/ags_remove_soundcard_editor_sink.h \ ags/X/task/ags_simple_file_read.h \ ags/X/task/ags_simple_file_write.h \ ags/X/task/ags_toggle_led.h \ ags/X/task/ags_update_bulk_member.h deprecated_libgsequencer_task_c_sources = libgsequencer_task_c_sources = \ $(deprecated_libgsequencer_task_c_sources) \ ags/X/task/ags_add_bulk_member.c \ ags/X/task/ags_add_line_member.c \ ags/X/task/ags_add_sequencer_editor_jack.c \ ags/X/task/ags_add_soundcard_editor_sink.c \ ags/X/task/ags_blink_cell_pattern_cursor.c \ ags/X/task/ags_change_indicator.c \ ags/X/task/ags_change_tact.c \ ags/X/task/ags_display_tact.c \ ags/X/task/ags_remove_sequencer_editor_jack.c \ ags/X/task/ags_remove_soundcard_editor_sink.c \ ags/X/task/ags_simple_file_read.c \ ags/X/task/ags_simple_file_write.c \ ags/X/task/ags_toggle_led.c \ ags/X/task/ags_update_bulk_member.c # libgsequencer - import deprecated_libgsequencer_import_h_sources = libgsequencer_import_h_sources = \ $(deprecated_libgsequencer_import_h_sources) \ ags/X/import/ags_midi_import_wizard.h \ ags/X/import/ags_midi_import_wizard_callbacks.h \ ags/X/import/ags_track_collection.h \ ags/X/import/ags_track_collection_callbacks.h \ ags/X/import/ags_track_collection_mapper.h \ ags/X/import/ags_track_collection_mapper_callbacks.h deprecated_libgsequencer_import_c_sources = libgsequencer_import_c_sources = \ $(deprecated_libgsequencer_import_c_sources) \ ags/X/import/ags_midi_import_wizard.c \ ags/X/import/ags_midi_import_wizard_callbacks.c \ ags/X/import/ags_track_collection.c \ ags/X/import/ags_track_collection_callbacks.c \ ags/X/import/ags_track_collection_mapper.c \ ags/X/import/ags_track_collection_mapper_callbacks.c # libgsequencer - export deprecated_libgsequencer_export_h_sources = libgsequencer_export_h_sources = \ $(deprecated_libgsequencer_export_h_sources) \ ags/X/export/ags_midi_export_wizard.h \ ags/X/export/ags_midi_export_wizard_callbacks.h \ ags/X/export/ags_machine_collection.h \ ags/X/export/ags_machine_collection_callbacks.h \ ags/X/export/ags_machine_collection_entry.h \ ags/X/export/ags_machine_collection_entry_callbacks.h deprecated_libgsequencer_export_c_sources = libgsequencer_export_c_sources = \ $(deprecated_libgsequencer_export_c_sources) \ ags/X/export/ags_midi_export_wizard.c \ ags/X/export/ags_midi_export_wizard_callbacks.c \ ags/X/export/ags_machine_collection.c \ ags/X/export/ags_machine_collection_callbacks.c \ ags/X/export/ags_machine_collection_entry.c \ ags/X/export/ags_machine_collection_entry_callbacks.c # libgsequencer - machine deprecated_libgsequencer_machine_h_sources = libgsequencer_machine_h_sources = \ $(deprecated_libgsequencer_machine_h_sources) \ ags/X/machine/ags_audiorec.h \ ags/X/machine/ags_audiorec_callbacks.h \ ags/X/machine/ags_cell_pattern_callbacks.h \ ags/X/machine/ags_cell_pattern.h \ ags/X/machine/ags_drum_callbacks.h \ ags/X/machine/ags_drum.h \ ags/X/machine/ags_drum_input_line_callbacks.h \ ags/X/machine/ags_drum_input_line.h \ ags/X/machine/ags_drum_input_pad_callbacks.h \ ags/X/machine/ags_drum_input_pad.h \ ags/X/machine/ags_drum_output_line_callbacks.h \ ags/X/machine/ags_drum_output_line.h \ ags/X/machine/ags_drum_output_pad_callbacks.h \ ags/X/machine/ags_drum_output_pad.h \ ags/X/machine/ags_dssi_bridge_callbacks.h \ ags/X/machine/ags_dssi_bridge.h \ ags/X/machine/ags_ffplayer_callbacks.h \ ags/X/machine/ags_ffplayer.h \ ags/X/machine/ags_ffplayer_bridge_callbacks.h \ ags/X/machine/ags_ffplayer_bridge.h \ ags/X/machine/ags_ffplayer_bulk_input_callbacks.h \ ags/X/machine/ags_ffplayer_bulk_input.h \ ags/X/machine/ags_ffplayer_input_line_callbacks.h \ ags/X/machine/ags_ffplayer_input_line.h \ ags/X/machine/ags_ffplayer_input_pad_callbacks.h \ ags/X/machine/ags_ffplayer_input_pad.h \ ags/X/machine/ags_ladspa_bridge_callbacks.h \ ags/X/machine/ags_ladspa_bridge.h \ ags/X/machine/ags_live_dssi_bridge_callbacks.h \ ags/X/machine/ags_live_dssi_bridge.h \ ags/X/machine/ags_live_lv2_bridge_callbacks.h \ ags/X/machine/ags_live_lv2_bridge.h \ ags/X/machine/ags_lv2_bridge_callbacks.h \ ags/X/machine/ags_lv2_bridge.h \ ags/X/machine/ags_matrix_callbacks.h \ ags/X/machine/ags_matrix.h \ ags/X/machine/ags_matrix_bridge_callbacks.h \ ags/X/machine/ags_matrix_bridge.h \ ags/X/machine/ags_matrix_bulk_input_callbacks.h \ ags/X/machine/ags_matrix_bulk_input.h \ ags/X/machine/ags_mixer_callbacks.h \ ags/X/machine/ags_mixer.h \ ags/X/machine/ags_mixer_input_line.h \ ags/X/machine/ags_mixer_input_pad.h \ ags/X/machine/ags_oscillator_callbacks.h \ ags/X/machine/ags_oscillator.h \ ags/X/machine/ags_panel_callbacks.h \ ags/X/machine/ags_panel.h \ ags/X/machine/ags_panel_input_line.h \ ags/X/machine/ags_panel_input_line_callbacks.h \ ags/X/machine/ags_panel_input_pad.h \ ags/X/machine/ags_pattern_box_callbacks.h \ ags/X/machine/ags_pattern_box.h \ ags/X/machine/ags_synth_callbacks.h \ ags/X/machine/ags_syncsynth.h \ ags/X/machine/ags_syncsynth_callbacks.h \ ags/X/machine/ags_synth.h \ ags/X/machine/ags_synth_input_line.h \ ags/X/machine/ags_synth_input_line_callbacks.h \ ags/X/machine/ags_synth_input_pad.h deprecated_libgsequencer_machine_c_sources = libgsequencer_machine_c_sources = \ $(deprecated_libgsequencer_machine_c_sources) \ ags/X/machine/ags_audiorec.c \ ags/X/machine/ags_audiorec_callbacks.c \ ags/X/machine/ags_cell_pattern.c \ ags/X/machine/ags_cell_pattern_callbacks.c \ ags/X/machine/ags_drum.c \ ags/X/machine/ags_drum_callbacks.c \ ags/X/machine/ags_drum_input_line.c \ ags/X/machine/ags_drum_input_line_callbacks.c \ ags/X/machine/ags_drum_input_pad.c \ ags/X/machine/ags_drum_input_pad_callbacks.c \ ags/X/machine/ags_drum_output_line.c \ ags/X/machine/ags_drum_output_line_callbacks.c \ ags/X/machine/ags_drum_output_pad.c \ ags/X/machine/ags_drum_output_pad_callbacks.c \ ags/X/machine/ags_dssi_bridge.c \ ags/X/machine/ags_dssi_bridge_callbacks.c \ ags/X/machine/ags_ffplayer.c \ ags/X/machine/ags_ffplayer_callbacks.c \ ags/X/machine/ags_ffplayer_bridge.c \ ags/X/machine/ags_ffplayer_bridge_callbacks.c \ ags/X/machine/ags_ffplayer_bulk_input.c \ ags/X/machine/ags_ffplayer_bulk_input_callbacks.c \ ags/X/machine/ags_ffplayer_input_line.c \ ags/X/machine/ags_ffplayer_input_line_callbacks.c \ ags/X/machine/ags_ffplayer_input_pad.c \ ags/X/machine/ags_ffplayer_input_pad_callbacks.c \ ags/X/machine/ags_ladspa_bridge.c \ ags/X/machine/ags_ladspa_bridge_callbacks.c \ ags/X/machine/ags_live_dssi_bridge.c \ ags/X/machine/ags_live_dssi_bridge_callbacks.c \ ags/X/machine/ags_live_lv2_bridge.c \ ags/X/machine/ags_live_lv2_bridge_callbacks.c \ ags/X/machine/ags_lv2_bridge.c \ ags/X/machine/ags_lv2_bridge_callbacks.c \ ags/X/machine/ags_matrix.c \ ags/X/machine/ags_matrix_callbacks.c \ ags/X/machine/ags_matrix_bridge.c \ ags/X/machine/ags_matrix_bridge_callbacks.c \ ags/X/machine/ags_matrix_bulk_input.c \ ags/X/machine/ags_matrix_bulk_input_callbacks.c \ ags/X/machine/ags_mixer.c \ ags/X/machine/ags_mixer_callbacks.c \ ags/X/machine/ags_mixer_input_line.c \ ags/X/machine/ags_mixer_input_pad.c \ ags/X/machine/ags_oscillator.c \ ags/X/machine/ags_oscillator_callbacks.c \ ags/X/machine/ags_panel.c \ ags/X/machine/ags_panel_callbacks.c \ ags/X/machine/ags_panel_input_line.c \ ags/X/machine/ags_panel_input_line_callbacks.c \ ags/X/machine/ags_panel_input_pad.c \ ags/X/machine/ags_pattern_box_callbacks.c \ ags/X/machine/ags_pattern_box.c \ ags/X/machine/ags_syncsynth.c \ ags/X/machine/ags_syncsynth_callbacks.c \ ags/X/machine/ags_synth.c \ ags/X/machine/ags_synth_callbacks.c \ ags/X/machine/ags_synth_input_line.c \ ags/X/machine/ags_synth_input_line_callbacks.c \ ags/X/machine/ags_synth_input_pad.c # libgsequencer - editor deprecated_libgsequencer_editor_h_sources = libgsequencer_editor_h_sources = \ $(deprecated_libgsequencer_editor_h_sources) \ ags/X/editor/ags_automation_edit_callbacks.h \ ags/X/editor/ags_automation_edit_box.h \ ags/X/editor/ags_automation_edit.h \ ags/X/editor/ags_automation_toolbar_callbacks.h \ ags/X/editor/ags_automation_toolbar.h \ ags/X/editor/ags_crop_note_dialog_callbacks.h \ ags/X/editor/ags_crop_note_dialog.h \ ags/X/editor/ags_envelope_dialog_callbacks.h \ ags/X/editor/ags_envelope_dialog.h \ ags/X/editor/ags_envelope_editor_callbacks.h \ ags/X/editor/ags_envelope_editor.h \ ags/X/editor/ags_envelope_info_callbacks.h \ ags/X/editor/ags_envelope_info.h \ ags/X/editor/ags_file_selection_callbacks.h \ ags/X/editor/ags_file_selection.h \ ags/X/editor/ags_inline_player_callbacks.h \ ags/X/editor/ags_inline_player.h \ ags/X/editor/ags_machine_radio_button.h \ ags/X/editor/ags_machine_radio_button_callbacks.h \ ags/X/editor/ags_machine_selection.h \ ags/X/editor/ags_machine_selector_callbacks.h \ ags/X/editor/ags_machine_selector.h \ ags/X/editor/ags_move_note_dialog_callbacks.h \ ags/X/editor/ags_move_note_dialog.h \ ags/X/editor/ags_notation_edit_callbacks.h \ ags/X/editor/ags_notation_edit.h \ ags/X/editor/ags_notation_toolbar_callbacks.h \ ags/X/editor/ags_notation_toolbar.h \ ags/X/editor/ags_pattern_envelope_callbacks.h \ ags/X/editor/ags_pattern_envelope.h \ ags/X/editor/ags_position_automation_cursor_dialog.h \ ags/X/editor/ags_position_automation_cursor_dialog_callbacks.h \ ags/X/editor/ags_position_notation_cursor_dialog.h \ ags/X/editor/ags_position_notation_cursor_dialog_callbacks.h \ ags/X/editor/ags_ramp_acceleration_dialog.h \ ags/X/editor/ags_ramp_acceleration_dialog_callbacks.h \ ags/X/editor/ags_scrolled_automation_edit_box.h \ ags/X/editor/ags_scrolled_wave_edit_box.h \ ags/X/editor/ags_sf2_chooser_callbacks.h \ ags/X/editor/ags_sf2_chooser.h \ ags/X/editor/ags_select_acceleration_dialog.h \ ags/X/editor/ags_select_acceleration_dialog_callbacks.h \ ags/X/editor/ags_select_note_dialog.h \ ags/X/editor/ags_select_note_dialog_callbacks.h \ ags/X/editor/ags_vautomation_edit_box.h \ ags/X/editor/ags_vwave_edit_box.h \ ags/X/editor/ags_wave_edit_callbacks.h \ ags/X/editor/ags_wave_edit.h \ ags/X/editor/ags_wave_edit_box.h \ ags/X/editor/ags_wave_toolbar_callbacks.h \ ags/X/editor/ags_wave_toolbar.h deprecated_libgsequencer_editor_c_sources = libgsequencer_editor_c_sources = \ $(deprecated_libgsequencer_editor_c_sources) \ ags/X/editor/ags_automation_edit.c \ ags/X/editor/ags_automation_edit_box.c \ ags/X/editor/ags_automation_edit_callbacks.c \ ags/X/editor/ags_automation_toolbar.c \ ags/X/editor/ags_automation_toolbar_callbacks.c \ ags/X/editor/ags_crop_note_dialog_callbacks.c \ ags/X/editor/ags_crop_note_dialog.c \ ags/X/editor/ags_envelope_dialog_callbacks.c \ ags/X/editor/ags_envelope_dialog.c \ ags/X/editor/ags_envelope_editor_callbacks.c \ ags/X/editor/ags_envelope_editor.c \ ags/X/editor/ags_envelope_info_callbacks.c \ ags/X/editor/ags_envelope_info.c \ ags/X/editor/ags_file_selection_callbacks.c \ ags/X/editor/ags_file_selection.c \ ags/X/editor/ags_inline_player.c \ ags/X/editor/ags_inline_player_callbacks.c \ ags/X/editor/ags_machine_radio_button.c \ ags/X/editor/ags_machine_radio_button_callbacks.c \ ags/X/editor/ags_machine_selection.c \ ags/X/editor/ags_machine_selector.c \ ags/X/editor/ags_machine_selector_callbacks.c \ ags/X/editor/ags_move_note_dialog_callbacks.c \ ags/X/editor/ags_move_note_dialog.c \ ags/X/editor/ags_notation_edit.c \ ags/X/editor/ags_notation_edit_callbacks.c \ ags/X/editor/ags_notation_toolbar.c \ ags/X/editor/ags_notation_toolbar_callbacks.c \ ags/X/editor/ags_pattern_envelope_callbacks.c \ ags/X/editor/ags_pattern_envelope.c \ ags/X/editor/ags_position_automation_cursor_dialog.c \ ags/X/editor/ags_position_automation_cursor_dialog_callbacks.c \ ags/X/editor/ags_position_notation_cursor_dialog.c \ ags/X/editor/ags_position_notation_cursor_dialog_callbacks.c \ ags/X/editor/ags_ramp_acceleration_dialog.c \ ags/X/editor/ags_ramp_acceleration_dialog_callbacks.c \ ags/X/editor/ags_scrolled_automation_edit_box.c \ ags/X/editor/ags_scrolled_wave_edit_box.c \ ags/X/editor/ags_select_acceleration_dialog.c \ ags/X/editor/ags_select_acceleration_dialog_callbacks.c \ ags/X/editor/ags_select_note_dialog.c \ ags/X/editor/ags_select_note_dialog_callbacks.c \ ags/X/editor/ags_sf2_chooser.c \ ags/X/editor/ags_sf2_chooser_callbacks.c \ ags/X/editor/ags_vautomation_edit_box.c \ ags/X/editor/ags_vwave_edit_box.c \ ags/X/editor/ags_wave_edit.c \ ags/X/editor/ags_wave_edit_box.c \ ags/X/editor/ags_wave_edit_callbacks.c \ ags/X/editor/ags_wave_toolbar.c \ ags/X/editor/ags_wave_toolbar_callbacks.c # libgsequencer all files gsequencerheaders = \ ags/gsequencer_main.h gsequencer_c_sources = \ ags/gsequencer_main.c midi2xml_CFLAGS += -I./ -I/usr/include $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) $(GIO_CFLAGS) $(XMLRPC_CFLAGS) $(XMLRPC_UTIL_CFLAGS) $(XMLRPC_SERVER_ABYSS_CFLAGS) $(XMLRPC_SERVER_CGI_CFLAGS) $(XMLRPC_SERVER_CFLAGS) midi2xml_LDFLAGS += -ldl $(LIBXML2_LIBS) $(GOBJECT_LIBS) $(XMLRPC_LIBS) $(XMLRPC_UTIL_LIBS) $(XMLRPC_SERVER_ABYSS_LIBS) $(XMLRPC_SERVER_CGI_LIBS) $(XMLRPC_SERVER_LIBS) midi2xml_LDADD = libags_audio.la libags_server.la libags_gui.la libags_thread.la libags.la midi2xml_SOURCES = ags/midi2xml_main.c ags-integration-test: $(MAKE) -C $(top_srcdir) -f functional-system-tests.mk ags-check-system libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status libtool gsequencer.1: xsltproc --nonet --param make.year.ranges 1 --param make.single.year.ranges 1 --param man.charmap.use.subset 0 -o $(top_srcdir) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl gsequencer.1.xml midi2xml.1: xsltproc --nonet --param make.year.ranges 1 --param make.single.year.ranges 1 --param man.charmap.use.subset 0 -o $(top_srcdir)/ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl midi2xml.1.xml gsequencer.desktop: gsequencer.desktop.in $(AM_V_GEN)sed -e 's,\@datadir\@,$(datadir),g' < "$<" > $@ html: mkdir -p $(top_builddir)/html/ mkdir -p $(top_builddir)/html/{developer-docs,user-docs} xsltproc --output $(top_builddir)/html/user-docs/ --xinclude /usr/share/xml/docbook/stylesheet/docbook-xsl/htmlhelp/htmlhelp.xsl $(top_srcdir)/docs/usersBook.xml xsltproc --output $(top_builddir)/html/developer-docs/ --xinclude /usr/share/xml/docbook/stylesheet/docbook-xsl/htmlhelp/htmlhelp.xsl $(top_srcdir)/docs/developersBook.xml $(MAKE) -C $(top_srcdir)/docs/reference/libags cd $(top_srcdir) $(MAKE) -C $(top_srcdir)/docs/reference/libags-audio cd $(top_srcdir) $(MAKE) -C $(top_srcdir)/docs/reference/libags-gui cd $(top_srcdir) $(MAKE) -C $(top_srcdir)/docs/reference/libgsequencer cd $(top_srcdir) install-data-local: mkdir -p $(DESTDIR)/$(datadir)/doc-base mkdir -p $(DESTDIR)/$(datadir)/gsequencer/icons mkdir -p $(DESTDIR)/$(datadir)/gsequencer/images mkdir -p $(DESTDIR)/$(datadir)/gsequencer/styles mkdir -p $(DESTDIR)/$(datadir)/xml/gsequencer/{schema/dtd/$(PACKAGE_VERSION)/,stylesheet/ags-xsl/midi-xml/} install -c -p -m 644 $(top_srcdir)/gsequencer.share/icons/ags.xpm $(DESTDIR)/$(datadir)/gsequencer/icons/ags.xpm install -c -p -m 644 $(top_srcdir)/gsequencer.share/icons/jumper.png $(DESTDIR)/$(datadir)/gsequencer/icons/jumper.png install -c -p -m 644 $(top_srcdir)/gsequencer.share/icons/ags.png $(DESTDIR)/$(datadir)/gsequencer/icons/ags.png install -c -p -m 644 $(top_srcdir)/gsequencer.share/images/ags.png $(DESTDIR)/$(datadir)/gsequencer/images/ags.png install -c -p -m 644 $(top_srcdir)/gsequencer.share/images/ags_supermoon-800x450.png $(DESTDIR)/$(datadir)/gsequencer/images/ags_supermoon-800x450.png install -c -p -m 644 $(top_srcdir)/gsequencer.share/styles/ags.rc $(DESTDIR)/$(datadir)/gsequencer/styles/ags.rc install -c -p -m 644 $(top_srcdir)/ags/X/file/ags_simple_file.dtd $(DESTDIR)/$(datadir)/xml/gsequencer/schema/dtd/$(PACKAGE_VERSION)/ install -c -p -m 644 $(top_srcdir)/ags/audio/midi/ags_midi_file.dtd $(DESTDIR)/$(datadir)/xml/gsequencer/schema/dtd/$(PACKAGE_VERSION)/ install -c -p -m 644 $(top_srcdir)/ags/file/ags_file.dtd $(DESTDIR)/$(datadir)/xml/gsequencer/schema/dtd/$(PACKAGE_VERSION)/ install -c -p -m 644 $(top_srcdir)/ags.xsl $(DESTDIR)/$(datadir)/xml/gsequencer/stylesheet/ags-xsl/midi-xml/ install -c -p -m 644 $(top_srcdir)/ags-simple.xsl $(DESTDIR)/$(datadir)/xml/gsequencer/stylesheet/ags-xsl/midi-xml/ mkdir -p $(DESTDIR)/$(docdir)/ gzip -9 -c $(top_srcdir)/ChangeLog > $(DESTDIR)/$(docdir)/changelog.gz fix-local-html: html find $(top_srcdir)/docs/reference/libags/libags-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/\/usr\/share\/doc\/libglib2.0-doc\/gobject/g' {} \; find $(top_srcdir)/docs/reference/libags-audio/libags-audio-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/\/usr\/share\/doc\/libglib2.0-doc\/gobject/g' {} \; find $(top_srcdir)/docs/reference/libags-audio/libags-audio-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-html/\/usr\/share\/doc\/libags-doc\/api/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/\/usr\/share\/doc\/libglib2.0-doc\/gobject/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk2/\/usr\/share\/doc\/libgtk2.0-doc\/gtk2/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk3/\/usr\/share\/doc\/libgtk2.0-doc\/gtk2/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/\/usr\/share\/doc\/libglib2.0-doc\/gobject/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk2/\/usr\/share\/doc\/libgtk2.0-doc\/gtk2/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk3/\/usr\/share\/doc\/libgtk2.0-doc\/gtk2/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-html/\/usr\/share\/doc\/libags-doc\/api/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-audio-html/\/usr\/share\/doc\/libags-audio-doc\/api/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-gui-html/\/usr\/share\/doc\/libags-gui-doc\/api/g' {} \; fix-online-html: html find $(top_srcdir)/docs/reference/libags/libags-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/https\:\/\/developer\.gnome\.org\/gobject\/stable/g' {} \; find $(top_srcdir)/docs/reference/libags-audio/libags-audio-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/https\:\/\/developer\.gnome\.org\/gobject\/stable/g' {} \; find $(top_srcdir)/docs/reference/libags-audio/libags-audio-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-html/\.\.\/libags/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/https\:\/\/developer\.gnome\.org\/gobject\/stable/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk2/https\:\/\/developer\.gnome\.org\/gtk2\/stable/g' {} \; find $(top_srcdir)/docs/reference/libags-gui/libags-gui-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk3/https\:\/\/developer\.gnome\.org\/gtk2\/stable/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gobject/https\:\/\/developer\.gnome\.org\/gobject\/stable/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk2/https\:\/\/developer\.gnome\.org\/gtk2\/stable/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/gtk3/https\:\/\/developer\.gnome\.org\/gtk2\/stable/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-html/\.\.\/libags/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-audio-html/\.\.\/libags-audio/g' {} \; find $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html -name "*.html" -type f -exec sed -i 's/\.\.\/libags-gui-html/\.\.\/libags-gui/g' {} \; install-html: fix-local-html mkdir -p $(DESTDIR)/$(docdir)/{images,html}/ mkdir -p $(DESTDIR)/$(datadir)/doc/libags-audio-doc/{images,html}/ install -c -p -m 644 $(userdocimages) $(DESTDIR)/$(docdir)/images/ install -c -p -m 644 $(devdocimages) $(DESTDIR)/$(datadir)/doc/libags-audio-doc/images/ install -c -p -m 644 $(top_builddir)/html/user-docs/* $(DESTDIR)/$(docdir)/html/ install -c -p -m 644 $(top_builddir)/html/developer-docs/* $(DESTDIR)/$(datadir)/doc/libags-audio-doc/html/ mkdir -p $(DESTDIR)/$(datadir)/gtk-doc/html mkdir -p $(DESTDIR)/$(datadir)/doc/libags-doc/api mkdir -p $(DESTDIR)/$(datadir)/doc/libags-audio-doc/api mkdir -p $(DESTDIR)/$(datadir)/doc/libags-gui-doc/api mkdir -p $(DESTDIR)/$(datadir)/doc/libgsequencer-doc/api ln -s ../../../gtk-doc/html/libags $(DESTDIR)/$(datadir)/doc/libags-doc/api ln -s ../../../gtk-doc/html/libags_audio $(DESTDIR)/$(datadir)/doc/libags-audio-doc/api ln -s ../../../gtk-doc/html/libags_gui $(DESTDIR)/$(datadir)/doc/libags-gui-doc/api ln -s ../../../gtk-doc/html/libgsequencer $(DESTDIR)/$(datadir)/doc/libgsequencer-doc/api install -c -p -m 644 $(top_srcdir)/docs/reference/libags/libags-html/* $(DESTDIR)/$(datadir)/doc/libags-doc/api install -c -p -m 644 $(top_srcdir)/docs/reference/libags-audio/libags-audio-html/* $(DESTDIR)/$(datadir)/doc/libags-audio-doc/api install -c -p -m 644 $(top_srcdir)/docs/reference/libags-gui/libags-gui-html/* $(DESTDIR)/$(datadir)/doc/libags-gui-doc/api install -c -p -m 644 $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html/* $(DESTDIR)/$(datadir)/doc/libgsequencer-doc/api uninstall-hook: rm -rf $(DESTDIR)/$(datadir)/gsequencer rm -rf $(DESTDIR)/$(docdir) rm -rf $(DESTDIR)/$(datadir)/xml/gsequencer rm -rf $(DESTDIR)/$(datadir)/doc/libags-doc rm -rf $(DESTDIR)/$(datadir)/doc/libags-audio-doc rm -rf $(DESTDIR)/$(datadir)/doc/libags-gui-doc rm -rf $(DESTDIR)/$(datadir)/doc/libgsequencer-doc rm -rf $(DESTDIR)/$(datadir)/gtk-doc/html/libags rm -rf $(DESTDIR)/$(datadir)/gtk-doc/html/libags_audio rm -rf $(DESTDIR)/$(datadir)/gtk-doc/html/libags_gui rm -rf $(DESTDIR)/$(datadir)/gtk-doc/html/libgsequencer rm -f $(DESTDIR)/$(pkgconfigdir)/libags.pc rm -f $(DESTDIR)/$(pkgconfigdir)/libags_audio.pc rm -f $(DESTDIR)/$(pkgconfigdir)/libags_gui.pc rm -f $(DESTDIR)/$(pkgconfigdir)/libgsequencer.pc clean-local: rm -rf $(top_srcdir)/html rm -rf $(top_srcdir)/docs/reference/libags/xml rm -rf $(top_srcdir)/docs/reference/libags/libags-html rm -rf $(top_srcdir)/docs/reference/libags/tmpl rm -rf $(top_srcdir)/docs/reference/libags-audio/xml rm -rf $(top_srcdir)/docs/reference/libags-audio/libags-audio-html rm -rf $(top_srcdir)/docs/reference/libags-audio/tmpl rm -rf $(top_srcdir)/docs/reference/libags-gui/xml rm -rf $(top_srcdir)/docs/reference/libags-gui/libags-gui-html rm -rf $(top_srcdir)/docs/reference/libags-gui/tmpl rm -rf $(top_srcdir)/docs/reference/libgsequencer/xml rm -rf $(top_srcdir)/docs/reference/libgsequencer/libgsequencer-html rm -rf $(top_srcdir)/docs/reference/libgsequencer/tmpl rm -f $(top_builddir)/docs/reference/libags/Makefile rm -f $(top_builddir)/docs/reference/libags-audio/Makefile rm -f $(top_builddir)/docs/reference/libags-gui/Makefile rm -f $(top_builddir)/docs/reference/libgsequencer/Makefile rm -f $(top_builddir)/functional-system-tests.mk gen-symbols-ags: rm -f libags.sym touch libags.sym find ags/util -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags.sym find ags/lib -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags.sym echo "ags_application_context" >> libags.sym find ags/object -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags.sym find ags/object -name "ags_marshal.h" | xargs grep --no-filename -o -P "(g_cclosure_user_marshal_[a-zA-Z0-9_]+)" >> libags.sym find ags/file -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags.sym gen-symbols-ags-thread: rm -f libags_thread.sym touch libags_thread.sym find ags/thread -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_thread.sym gen-symbols-ags-server: rm -f libags_server.sym touch libags_server.sym find ags/server -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_server.sym gen-symbols-ags-audio: rm -f libags_audio.sym touch libags_audio.sym find ags/plugin -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_audio.sym find ags/audio -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_audio.sym gen-symbols-ags-gui: rm -f libags_gui.sym touch libags_gui.sym find ags/widget -name "*.h" | xargs grep --no-filename -o -P "(?<=\s)(ags_[a-z0-9_]+)(?=[\s]*\()" >> libags_gui.sym gen-symbols-all: gen-symbols-ags gen-symbols-ags-thread gen-symbols-ags-server gen-symbols-ags-audio gen-symbols-ags-gui echo "Generated all symbols" check-gettext: @if test x$(USE_NLS) != "xyes" ; then echo "Missing gettext. Rerun configure and check for" \ "'checking whether to use NLS... yes'!" ; exit 1 ; fi update-po: check-gettext @find $(srcdir)/ags/{util,lib,object,thread,file,server,plugin,audio,widget,X}/ -name "*.c" -print | sort > $(srcdir)/po/POTFILES.in.2 ; \ if diff $(srcdir)/po/POTFILES.in $(srcdir)/po/POTFILES.in.2 >/dev/null 2>&1 ; then \ rm -f $(srcdir)/po/POTFILES.in.2 ; \ else \ mv $(srcdir)/po/POTFILES.in.2 $(srcdir)/po/POTFILES.in ; \ fi cd po && $(MAKE) $(AM_MAKEFLAGS) update-po update-gmo: check-gettext cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo force-update-gmo: check-gettext touch po/*.po cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo force-update-gmo-%: check-gettext @language=`echo $@ | sed s/force-update-gmo-//` ; \ if test ! -f po/$$language.po ; then echo "file po/$$language.po does not exist" ; exit 1 ; fi ; \ touch po/$$language.po ; \ cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo .PHONY: check-gettext update-po update-gmo force-update-gmo gsequencer-1.4.24/missing0000755000175000017500000001533013256226515012274 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program 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 this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gsequencer-1.4.24/unit-tests.mk0000644000175000017500000007722713246707333013363 00000000000000# unit tests check_PROGRAMS += \ ags_application_context_test \ ags_config_test \ ags_connection_manager_test \ ags_condition_manager_test \ ags_destroy_worker_test \ ags_mutex_manager_test \ ags_poll_fd_test \ ags_polling_thread_test \ ags_returnable_thread_test \ ags_task_test \ ags_task_thread_test \ ags_thread_test \ ags_thread_pool_test \ ags_worker_thread_test \ ags_thread_file_xml_test \ ags_file_test \ ags_file_id_ref_test \ ags_file_launch_test \ ags_file_lookup_test \ ags_complex_test \ ags_log_test \ ags_turtle_test \ ags_turtle_manager_test \ ags_base_plugin_test \ ags_dssi_manager_test \ ags_dssi_plugin_test \ ags_ladspa_manager_test \ ags_lv2_manager_test \ ags_lv2_option_manager_test \ ags_lv2_plugin_test \ ags_lv2_preset_test \ ags_lv2_uri_map_manager_test \ ags_lv2_urid_manager_test \ ags_lv2_worker_manager_test \ ags_lv2ui_manager_test \ ags_lv2ui_plugin_test \ ags_audio_application_context_test \ ags_devout_test \ ags_midiin_test \ ags_audio_test \ ags_audio_connection_test \ ags_playback_domain_test \ ags_playback_test \ ags_preset_test \ ags_channel_test \ ags_input_test \ ags_output_test \ ags_recycling_test \ ags_audio_signal_test \ ags_recall_test \ ags_recall_channel_test \ ags_recall_channel_run_test \ ags_recall_container_test \ ags_recall_dependency_test \ ags_port_test \ ags_pattern_test \ ags_notation_test \ ags_note_test \ ags_automation_test \ ags_acceleration_test \ ags_midi_buffer_util_test \ ags_midi_builder_test \ ags_xorg_application_context_test # application context unit test ags_application_context_test_SOURCES = ags/test/object/ags_application_context_test.c ags_application_context_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_application_context_test_LDFLAGS = -pthread $(LDFLAGS) ags_application_context_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # config unit test ags_config_test_SOURCES = ags/test/object/ags_config_test.c ags_config_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_config_test_LDFLAGS = -pthread $(LDFLAGS) ags_config_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # connection manager unit test ags_connection_manager_test_SOURCES = ags/test/object/ags_connection_manager_test.c ags_connection_manager_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_connection_manager_test_LDFLAGS = -pthread $(LDFLAGS) ags_connection_manager_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # condition manager unit test ags_condition_manager_test_SOURCES = ags/test/thread/ags_condition_manager_test.c ags_condition_manager_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_condition_manager_test_LDFLAGS = -pthread $(LDFLAGS) ags_condition_manager_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # destroy worker unit test ags_destroy_worker_test_SOURCES = ags/test/thread/ags_destroy_worker_test.c ags_destroy_worker_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_destroy_worker_test_LDFLAGS = -pthread $(LDFLAGS) ags_destroy_worker_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # mutex manager unit test ags_mutex_manager_test_SOURCES = ags/test/thread/ags_mutex_manager_test.c ags_mutex_manager_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_mutex_manager_test_LDFLAGS = -pthread $(LDFLAGS) ags_mutex_manager_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # poll fd unit test ags_poll_fd_test_SOURCES = ags/test/thread/ags_poll_fd_test.c ags_poll_fd_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_poll_fd_test_LDFLAGS = -pthread $(LDFLAGS) ags_poll_fd_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # polling thread unit test ags_polling_thread_test_SOURCES = ags/test/thread/ags_polling_thread_test.c ags_polling_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_polling_thread_test_LDFLAGS = -pthread $(LDFLAGS) ags_polling_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # returnable thread unit test ags_returnable_thread_test_SOURCES = ags/test/thread/ags_returnable_thread_test.c ags_returnable_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_returnable_thread_test_LDFLAGS = -pthread $(LDFLAGS) ags_returnable_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # task unit test ags_task_test_SOURCES = ags/test/thread/ags_task_test.c ags_task_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_task_test_LDFLAGS = -lcunit -lm -pthread -lrt $(LDFLAGS) $(LIBXML2_LIBS) $(GOBJECT_LIBS) ags_task_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # task thread unit test ags_task_thread_test_SOURCES = ags/test/thread/ags_task_thread_test.c ags_task_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_task_thread_test_LDFLAGS = -pthread $(LDFLAGS) ags_task_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # thread unit test ags_thread_test_SOURCES = ags/test/thread/ags_thread_test.c ags_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_thread_test_LDFLAGS = -lcunit -lm -pthread -lrt $(LDFLAGS) $(LIBXML2_LIBS) $(GOBJECT_LIBS) ags_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # thread pool unit test ags_thread_pool_test_SOURCES = ags/test/thread/ags_thread_pool_test.c ags_thread_pool_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_thread_pool_test_LDFLAGS = -pthread $(LDFLAGS) ags_thread_pool_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # worker thread unit test ags_worker_thread_test_SOURCES = ags/test/thread/ags_worker_thread_test.c ags_worker_thread_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_worker_thread_test_LDFLAGS = -pthread $(LDFLAGS) ags_worker_thread_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # thread file xml unit test ags_thread_file_xml_test_SOURCES = ags/test/thread/file/ags_thread_file_xml_test.c ags_thread_file_xml_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_thread_file_xml_test_LDFLAGS = -pthread $(LDFLAGS) ags_thread_file_xml_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # file unit test ags_file_test_SOURCES = ags/test/file/ags_file_test.c ags_file_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_file_test_LDFLAGS = -pthread $(LDFLAGS) ags_file_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # file id ref unit test ags_file_id_ref_test_SOURCES = ags/test/file/ags_file_id_ref_test.c ags_file_id_ref_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_file_id_ref_test_LDFLAGS = -pthread $(LDFLAGS) ags_file_id_ref_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # file launch unit test ags_file_launch_test_SOURCES = ags/test/file/ags_file_launch_test.c ags_file_launch_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_file_launch_test_LDFLAGS = -pthread $(LDFLAGS) ags_file_launch_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # file lookup unit test ags_file_lookup_test_SOURCES = ags/test/file/ags_file_lookup_test.c ags_file_lookup_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_file_lookup_test_LDFLAGS = -pthread $(LDFLAGS) ags_file_lookup_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # complex unit test ags_complex_test_SOURCES = ags/test/lib/ags_complex_test.c ags_complex_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_complex_test_LDFLAGS = -pthread $(LDFLAGS) ags_complex_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # log unit test ags_log_test_SOURCES = ags/test/lib/ags_log_test.c ags_log_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_log_test_LDFLAGS = -pthread $(LDFLAGS) ags_log_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # turtle unit test ags_turtle_test_SOURCES = ags/test/lib/ags_turtle_test.c ags_turtle_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_turtle_test_LDFLAGS = -pthread $(LDFLAGS) ags_turtle_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # turtle manager unit test ags_turtle_manager_test_SOURCES = ags/test/lib/ags_turtle_manager_test.c ags_turtle_manager_test_CFLAGS = $(CFLAGS) $(LIBXML2_CFLAGS) $(GOBJECT_CFLAGS) ags_turtle_manager_test_LDFLAGS = -pthread $(LDFLAGS) ags_turtle_manager_test_LDADD = libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBXML2_LIBS) $(GOBJECT_LIBS) # base plugin unit test ags_base_plugin_test_SOURCES = ags/test/plugin/ags_base_plugin_test.c ags_base_plugin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_base_plugin_test_LDFLAGS = $(LDFLAGS) -pthread ags_base_plugin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # dssi manager unit test ags_dssi_manager_test_SOURCES = ags/test/plugin/ags_dssi_manager_test.c ags_dssi_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_dssi_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_dssi_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # dssi plugin unit test ags_dssi_plugin_test_SOURCES = ags/test/plugin/ags_dssi_plugin_test.c ags_dssi_plugin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_dssi_plugin_test_LDFLAGS = $(LDFLAGS) -pthread ags_dssi_plugin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # ladspa manager unit test ags_ladspa_manager_test_SOURCES = ags/test/plugin/ags_ladspa_manager_test.c ags_ladspa_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_ladspa_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_ladspa_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 manager unit test ags_lv2_manager_test_SOURCES = ags/test/plugin/ags_lv2_manager_test.c ags_lv2_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 option manager unit test ags_lv2_option_manager_test_SOURCES = ags/test/plugin/ags_lv2_option_manager_test.c ags_lv2_option_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_option_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_option_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 plugin unit test ags_lv2_plugin_test_SOURCES = ags/test/plugin/ags_lv2_plugin_test.c ags_lv2_plugin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_plugin_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_plugin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 preset unit test ags_lv2_preset_test_SOURCES = ags/test/plugin/ags_lv2_preset_test.c ags_lv2_preset_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_preset_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_preset_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 uri map manager unit test ags_lv2_uri_map_manager_test_SOURCES = ags/test/plugin/ags_lv2_uri_map_manager_test.c ags_lv2_uri_map_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_uri_map_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_uri_map_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 urid manager unit test ags_lv2_urid_manager_test_SOURCES = ags/test/plugin/ags_lv2_urid_manager_test.c ags_lv2_urid_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_urid_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_urid_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2 worker manager unit test ags_lv2_worker_manager_test_SOURCES = ags/test/plugin/ags_lv2_worker_manager_test.c ags_lv2_worker_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2_worker_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2_worker_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2ui manager unit test ags_lv2ui_manager_test_SOURCES = ags/test/plugin/ags_lv2ui_manager_test.c ags_lv2ui_manager_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2ui_manager_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2ui_manager_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # lv2ui plugin unit test ags_lv2ui_plugin_test_SOURCES = ags/test/plugin/ags_lv2ui_plugin_test.c ags_lv2ui_plugin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_lv2ui_plugin_test_LDFLAGS = $(LDFLAGS) -pthread ags_lv2ui_plugin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # audio application context unit test ags_audio_application_context_test_SOURCES = ags/test/audio/ags_audio_application_context_test.c ags_audio_application_context_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_audio_application_context_test_LDFLAGS = $(LDFLAGS) -pthread ags_audio_application_context_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # devout unit test ags_devout_test_SOURCES = ags/test/audio/ags_devout_test.c ags_devout_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_devout_test_LDFLAGS = -pthread $(LDFLAGS) ags_devout_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # midiin unit test ags_midiin_test_SOURCES = ags/test/audio/ags_midiin_test.c ags_midiin_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_midiin_test_LDFLAGS = -pthread $(LDFLAGS) ags_midiin_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # audio unit test ags_audio_test_SOURCES = ags/test/audio/ags_audio_test.c ags_audio_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_audio_test_LDFLAGS = -pthread $(LDFLAGS) ags_audio_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # audio connection unit test ags_audio_connection_test_SOURCES = ags/test/audio/ags_audio_connection_test.c ags_audio_connection_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_audio_connection_test_LDFLAGS = -pthread $(LDFLAGS) ags_audio_connection_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # playback domain unit test ags_playback_domain_test_SOURCES = ags/test/audio/ags_playback_domain_test.c ags_playback_domain_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_playback_domain_test_LDFLAGS = -pthread $(LDFLAGS) ags_playback_domain_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # playback unit test ags_playback_test_SOURCES = ags/test/audio/ags_playback_test.c ags_playback_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_playback_test_LDFLAGS = -pthread $(LDFLAGS) ags_playback_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # preset unit test ags_preset_test_SOURCES = ags/test/audio/ags_preset_test.c ags_preset_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_preset_test_LDFLAGS = -pthread $(LDFLAGS) ags_preset_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # channel unit test ags_channel_test_SOURCES = ags/test/audio/ags_channel_test.c ags_channel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_channel_test_LDFLAGS = -pthread $(LDFLAGS) ags_channel_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # input unit test ags_input_test_SOURCES = ags/test/audio/ags_input_test.c ags_input_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_input_test_LDFLAGS = -pthread $(LDFLAGS) ags_input_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # output unit test ags_output_test_SOURCES = ags/test/audio/ags_output_test.c ags_output_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_output_test_LDFLAGS = -pthread $(LDFLAGS) ags_output_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recycling unit test ags_recycling_test_SOURCES = ags/test/audio/ags_recycling_test.c ags_recycling_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recycling_test_LDFLAGS = -pthread $(LDFLAGS) ags_recycling_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # audio signal unit test ags_audio_signal_test_SOURCES = ags/test/audio/ags_audio_signal_test.c ags_audio_signal_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_audio_signal_test_LDFLAGS = -pthread $(LDFLAGS) ags_audio_signal_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall unit test ags_recall_test_SOURCES = ags/test/audio/ags_recall_test.c ags_recall_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall channel unit test ags_recall_channel_test_SOURCES = ags/test/audio/ags_recall_channel_test.c ags_recall_channel_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_channel_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_channel_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall channel run unit test ags_recall_channel_run_test_SOURCES = ags/test/audio/ags_recall_channel_run_test.c ags_recall_channel_run_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_channel_run_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_channel_run_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall container unit test ags_recall_container_test_SOURCES = ags/test/audio/ags_recall_container_test.c ags_recall_container_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_container_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_container_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # recall dependency unit test ags_recall_dependency_test_SOURCES = ags/test/audio/ags_recall_dependency_test.c ags_recall_dependency_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_recall_dependency_test_LDFLAGS = -pthread $(LDFLAGS) ags_recall_dependency_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # port unit test ags_port_test_SOURCES = ags/test/audio/ags_port_test.c ags_port_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_port_test_LDFLAGS = -pthread $(LDFLAGS) ags_port_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # pattern unit test ags_pattern_test_SOURCES = ags/test/audio/ags_pattern_test.c ags_pattern_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_pattern_test_LDFLAGS = -pthread $(LDFLAGS) ags_pattern_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # notation unit test ags_notation_test_SOURCES = ags/test/audio/ags_notation_test.c ags_notation_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_notation_test_LDFLAGS = -pthread $(LDFLAGS) ags_notation_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # note unit test ags_note_test_SOURCES = ags/test/audio/ags_note_test.c ags_note_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_note_test_LDFLAGS = -pthread $(LDFLAGS) ags_note_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # automation unit test ags_automation_test_SOURCES = ags/test/audio/ags_automation_test.c ags_automation_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_automation_test_LDFLAGS = -pthread $(LDFLAGS) ags_automation_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # acceleration unit test ags_acceleration_test_SOURCES = ags/test/audio/ags_acceleration_test.c ags_acceleration_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_acceleration_test_LDFLAGS = -pthread $(LDFLAGS) ags_acceleration_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lrt -lm $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # midi buffer util unit test ags_midi_buffer_util_test_SOURCES = ags/test/audio/midi/ags_midi_buffer_util_test.c ags_midi_buffer_util_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_midi_buffer_util_test_LDFLAGS = -pthread $(LDFLAGS) ags_midi_buffer_util_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # midi builder unit test ags_midi_builder_test_SOURCES = ags/test/audio/midi/ags_midi_builder_test.c ags_midi_builder_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) ags_midi_builder_test_LDFLAGS = -pthread $(LDFLAGS) ags_midi_builder_test_LDADD = libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) # xorg application context unit test ags_xorg_application_context_test_SOURCES = ags/test/X/ags_xorg_application_context_test.c ags_xorg_application_context_test_CFLAGS = $(CFLAGS) $(LIBAO_CFLAGS) $(LIBASOUND2_CFLAGS) $(LIBXML2_CFLAGS) $(SNDFILE_CFLAGS) $(LIBINSTPATCH_CFLAGS) $(GOBJECT_CFLAGS) $(JACK_CFLAGS) $(FONTCONFIG_CFLAGS) $(GDKPIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(GTK_CFLAGS) ags_xorg_application_context_test_LDFLAGS = -pthread $(LDFLAGS) ags_xorg_application_context_test_LDADD = libgsequencer.la libags_gui.la libags_audio.la libags_server.la libags_thread.la libags.la libags_thread.la -lcunit -lm -lrt $(LIBAO_LIBS) $(LIBASOUND2_LIBS) $(LIBXML2_LIBS) $(SNDFILE_LIBS) $(LIBINSTPATCH_LIBS) $(GOBJECT_LIBS) $(JACK_LIBS) $(FONTCONFIG_LIBS) $(GDKPIXBUF_LIBS) $(CAIRO_LIBS) $(GTK_LIBS) gsequencer-1.4.24/config.sub0000755000175000017500000010645013256226515012664 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-02-22' # This file 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. # # This program 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 this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo "$1" | sed 's/-[^-]*$//'` if [ "$basic_machine" != "$1" ] then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pru-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2*) basic_machine=m68k-bull os=-sysv3 ;; e500v[12]) basic_machine=powerpc-unknown os=$os"spe" ;; e500v[12]-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=$os"spe" ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; nsv-tandem) basic_machine=nsv-tandem ;; nsx-tandem) basic_machine=nsx-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh5el) basic_machine=sh5le-unknown ;; simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; x64) basic_machine=x86_64-pc ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases that might get confused # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) -es1800*) os=-ose ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -xray | -os68k* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4*) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. case $basic_machine in arm*) os=-eabi ;; *) os=-elf ;; esac ;; -nacl*) ;; -ios) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; pru-*) os=-elf ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac echo "$basic_machine$os" exit # Local variables: # eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gsequencer-1.4.24/config.guess0000755000175000017500000012637313256226515013227 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-02-24' # This file 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. # # This program 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 this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval "$set_cc_for_build" cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" # If ldd exists, use it to detect musl libc. if command -v ldd >/dev/null && \ ldd --version 2>&1 | grep -q ^musl then LIBC=musl fi ;; esac # Note: order is significant - the case branches are not exclusive. case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ "/sbin/$sysctl" 2>/dev/null || \ "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine="${arch}${endian}"-unknown ;; *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval "$set_cc_for_build" SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ [ "$TARGET_BINARY_INTERFACE"x = x ] then echo m88k-dg-dgux"$UNAME_RELEASE" else echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if [ "$HP_ARCH" = "" ]; then eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ "$HP_ARCH" = hppa2.0w ] then eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo "$UNAME_MACHINE"-unknown-osf1mk else echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) case "$UNAME_MACHINE" in x86) echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; i*:UWIN*:*) echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) if objdump -f /bin/sh | grep -q elf32-x86-64; then echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 else echo "$UNAME_MACHINE"-pc-linux-"$LIBC" fi exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv"$UNAME_RELEASE" else echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; NSV-*:NONSTOP_KERNEL:*:*) echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; esac echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: # eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gsequencer-1.4.24/lv2.lib/0000755000175000017500000000000013256233673012226 500000000000000gsequencer-1.4.24/lv2.lib/mda/0000755000175000017500000000000013256233676012772 500000000000000gsequencer-1.4.24/lv2.lib/mda/EPiano-presets.ttl0000644000175000017500000001005213246707333016266 00000000000000@prefix lv2: . @prefix pset: . @prefix rdfs: . a pset:Preset ; lv2:appliesTo ; rdfs:label "Default" ; lv2:port [ lv2:symbol "env_decay" ; pset:value 0.5 ] , [ lv2:symbol "env_release" ; pset:value 0.5 ] , [ lv2:symbol "hardness" ; pset:value 0.5 ] , [ lv2:symbol "treble_boost" ; pset:value 0.5 ] , [ lv2:symbol "modulation" ; pset:value 0.5 ] , [ lv2:symbol "lfo_rate" ; pset:value 0.65 ] , [ lv2:symbol "vel_sense" ; pset:value 0.25 ] , [ lv2:symbol "stereo_width" ; pset:value 0.5 ] , [ lv2:symbol "polyphonic" ; pset:value 1.0 ] , [ lv2:symbol "fine_tuning" ; pset:value 0.5 ] , [ lv2:symbol "random_tuning" ; pset:value 0.146 ] , [ lv2:symbol "overdrive" ; pset:value 0.0 ] . a pset:Preset ; lv2:appliesTo ; rdfs:label "Bright" ; lv2:port [ lv2:symbol "env_decay" ; pset:value 0.5 ] , [ lv2:symbol "env_release" ; pset:value 0.5 ] , [ lv2:symbol "hardness" ; pset:value 1.0 ] , [ lv2:symbol "treble_boost" ; pset:value 0.8 ] , [ lv2:symbol "modulation" ; pset:value 0.5 ] , [ lv2:symbol "lfo_rate" ; pset:value 0.65 ] , [ lv2:symbol "vel_sense" ; pset:value 0.25 ] , [ lv2:symbol "stereo_width" ; pset:value 0.5 ] , [ lv2:symbol "polyphonic" ; pset:value 1.0 ] , [ lv2:symbol "fine_tuning" ; pset:value 0.5 ] , [ lv2:symbol "random_tuning" ; pset:value 0.146 ] , [ lv2:symbol "overdrive" ; pset:value 0.5 ] . a pset:Preset ; lv2:appliesTo ; rdfs:label "Mellow" ; lv2:port [ lv2:symbol "env_decay" ; pset:value 0.5 ] , [ lv2:symbol "env_release" ; pset:value 0.5 ] , [ lv2:symbol "hardness" ; pset:value 0.0 ] , [ lv2:symbol "treble_boost" ; pset:value 0.0 ] , [ lv2:symbol "modulation" ; pset:value 0.5 ] , [ lv2:symbol "lfo_rate" ; pset:value 0.65 ] , [ lv2:symbol "vel_sense" ; pset:value 0.25 ] , [ lv2:symbol "stereo_width" ; pset:value 0.5 ] , [ lv2:symbol "polyphonic" ; pset:value 1.0 ] , [ lv2:symbol "fine_tuning" ; pset:value 0.5 ] , [ lv2:symbol "random_tuning" ; pset:value 0.246 ] , [ lv2:symbol "overdrive" ; pset:value 0.0 ] . a pset:Preset ; lv2:appliesTo ; rdfs:label "Autopan" ; lv2:port [ lv2:symbol "env_decay" ; pset:value 0.5 ] , [ lv2:symbol "env_release" ; pset:value 0.5 ] , [ lv2:symbol "hardness" ; pset:value 0.5 ] , [ lv2:symbol "treble_boost" ; pset:value 0.5 ] , [ lv2:symbol "modulation" ; pset:value 0.25 ] , [ lv2:symbol "lfo_rate" ; pset:value 0.65 ] , [ lv2:symbol "vel_sense" ; pset:value 0.25 ] , [ lv2:symbol "stereo_width" ; pset:value 0.5 ] , [ lv2:symbol "polyphonic" ; pset:value 1.0 ] , [ lv2:symbol "fine_tuning" ; pset:value 0.5 ] , [ lv2:symbol "random_tuning" ; pset:value 0.246 ] , [ lv2:symbol "overdrive" ; pset:value 0.0 ] . a pset:Preset ; lv2:appliesTo ; rdfs:label "Tremolo" ; lv2:port [ lv2:symbol "env_decay" ; pset:value 0.5 ] , [ lv2:symbol "env_release" ; pset:value 0.5 ] , [ lv2:symbol "hardness" ; pset:value 0.5 ] , [ lv2:symbol "treble_boost" ; pset:value 0.5 ] , [ lv2:symbol "modulation" ; pset:value 0.75 ] , [ lv2:symbol "lfo_rate" ; pset:value 0.65 ] , [ lv2:symbol "vel_sense" ; pset:value 0.25 ] , [ lv2:symbol "stereo_width" ; pset:value 0.5 ] , [ lv2:symbol "polyphonic" ; pset:value 1.0 ] , [ lv2:symbol "fine_tuning" ; pset:value 0.5 ] , [ lv2:symbol "random_tuning" ; pset:value 0.246 ] , [ lv2:symbol "overdrive" ; pset:value 0.0 ] . gsequencer-1.4.24/libags.sym0000644000175000017500000003065013256163135012670 00000000000000ags_destroy_util_dispose_and_unref ags_list_util_find_type ags_list_util_copy_and_ref ags_id_generator_create_uuid ags_log_get_type ags_log_add_message ags_log_get_messages ags_log_get_instance ags_log_new ags_function_get_type ags_function_collapse_parantheses ags_function_find_literals ags_function_literal_solve ags_function_push_equation ags_function_pop_equation ags_function_get_expanded ags_funciton_get_normalized ags_function_compute_term ags_function_symbolic_translate_value ags_function_substitute_values ags_function_translate_value ags_function_new ags_buffer_util_s8_to_char_buffer ags_buffer_util_s16_to_char_buffer ags_buffer_util_s24_to_char_buffer ags_buffer_util_s32_to_char_buffer ags_buffer_util_s64_to_char_buffer ags_buffer_util_char_buffer_to_s8 ags_buffer_util_char_buffer_to_s16 ags_buffer_util_char_buffer_to_s24 ags_buffer_util_char_buffer_to_s32 ags_buffer_util_char_buffer_to_s64 ags_string_util_escape_single_quote ags_strv_length ags_strv_contains ags_regcomp ags_regexec ags_time_get_uptime_from_offset ags_complex_get_type ags_complex_alloc ags_complex_copy ags_complex_free ags_complex_get ags_complex_set ags_endian_swap_float ags_turtle_get_type ags_turtle_read_iriref ags_turtle_read_pname_ns ags_turtle_read_pname_ln ags_turtle_read_blank_node_label ags_turtle_read_langtag ags_turtle_read_boolean ags_turtle_read_integer ags_turtle_read_decimal ags_turtle_read_double ags_turtle_read_exponent ags_turtle_read_string ags_turtle_read_string_literal_quote ags_turtle_read_string_literal_single_quote ags_turtle_read_string_literal_long_quote ags_turtle_read_string_literal_long_single_quote ags_turtle_read_uchar ags_turtle_read_echar ags_turtle_read_ws ags_turtle_read_anon ags_turtle_read_pn_chars_base ags_turtle_read_pn_chars_u ags_turtle_read_pn_chars ags_turtle_read_pn_prefix ags_turtle_read_pn_local ags_turtle_read_plx ags_turtle_read_percent ags_turtle_read_hex ags_turtle_read_pn_local_esc ags_turtle_find_xpath ags_turtle_find_xpath_with_context_node ags_turtle_string_convert ags_turtle_load ags_turtle_new ags_turtle_manager_get_type ags_turtle_manager_find ags_turtle_manager_add ags_turtle_manager_get_instance ags_turtle_manager_new ags_parameter_grow ags_parameter_find ags_conversion_get_type ags_conversion_convert ags_conversion_new ags_application_context ags_applicable_get_type ags_applicable_set_update ags_applicable_apply ags_applicable_reset ags_sequencer_get_type ags_sequencer_set_application_context ags_sequencer_get_application_context ags_sequencer_set_application_mutex ags_sequencer_get_application_mutex ags_sequencer_set_device ags_sequencer_get_device ags_sequencer_list_cards ags_sequencer_is_starting ags_sequencer_is_playing ags_sequencer_is_recording ags_sequencer_play_init ags_sequencer_play ags_sequencer_record_init ags_sequencer_record ags_sequencer_stop ags_sequencer_tic ags_sequencer_offset_changed ags_sequencer_get_buffer ags_sequencer_get_next_buffer ags_sequencer_set_bpm ags_sequencer_get_bpm ags_sequencer_set_delay_factor ags_sequencer_get_delay_factor ags_sequencer_set_note_offset ags_sequencer_get_note_offset ags_sequencer_set_audio ags_sequencer_get_audio ags_packable_get_type ags_packable_pack ags_packable_unpack ags_tactable_get_type ags_tactable_get_sequencer_duration ags_tactable_get_notation_duration ags_tactable_get_tact ags_tactable_get_bpm ags_tactable_change_sequencer_duration ags_tactable_change_notation_duration ags_tactable_change_tact ags_tactable_change_bpm ags_config_get_type ags_config_load_defaults ags_config_load_from_file ags_config_load_from_data ags_config_set_value ags_config_get_value ags_config_to_data ags_config_save ags_config_clear ags_config_get_instance ags_config_new ags_main_loop_get_type ags_main_loop_get_tree_lock ags_main_loop_set_application_context ags_main_loop_get_application_context ags_main_loop_set_async_queue ags_main_loop_get_async_queue ags_main_loop_set_tic ags_main_loop_get_tic ags_main_loop_set_last_sync ags_main_loop_get_last_sync ags_main_loop_interrupt ags_main_loop_monitor ags_main_loop_change_frequency ags_distributed_manager_get_type ags_distributed_manager_set_url ags_distributed_manager_get_url ags_distributed_manager_set_ports ags_distributed_manager_get_ports ags_distributed_manager_set_soundcard ags_distributed_manager_get_soundcard ags_distributed_manager_set_sequencer ags_distributed_manager_get_sequencer ags_distributed_manager_register_soundcard ags_distributed_manager_unregister_soundcard ags_distributed_manager_register_sequencer ags_distributed_manager_unregister_sequencer ags_countable_get_type ags_countable_get_notation_counter ags_countable_get_sequencer_counter ags_connection_manager_get_type ags_connection_manager_get_connection ags_connection_manager_add_connection ags_connection_manager_remove_connection ags_connection_manager_get_instance ags_connection_manager_new ags_seekable_get_type ags_seekable_seek ags_tree_iterator_get_type ags_tree_iterator_set_inverse_mode ags_tree_iterator_is_inverse_mode ags_tree_iterator_iterate ags_tree_iterator_iterate_nested ags_tree_iterator_safe_iterate ags_tree_iterator_safe_iterate_nested ags_portlet_get_type ags_portlet_get_port ags_portlet_set_port ags_portlet_list_safe_properties ags_portlet_safe_get_property ags_portlet_safe_set_property ags_application_context_get_type ags_application_context_load_config ags_application_context_prepare ags_application_context_setup ags_application_context_register_types ags_application_context_add_sibling ags_application_context_remove_sibling ags_application_context_find_default ags_application_context_find_main_loop ags_application_context_quit ags_application_context_get_instance ags_application_context_new ags_concurrent_tree_get_type ags_concurrent_tree_set_parent_locked ags_concurrent_tree_get_parent_locked ags_concurrent_tree_get_lock ags_concurrent_tree_get_parent_lock ags_concurrent_tree_lock_context ags_concurrent_tree_unlock_context ags_dynamic_connectable_get_type ags_dynamic_connectable_connect_dynamic ags_dynamic_connectable_disconnect_dynamic ags_connectable_get_type ags_connectable_add_to_registry ags_connectable_remove_from_registry ags_connectable_update ags_connectable_is_ready ags_connectable_is_connected ags_connectable_connect ags_connectable_disconnect ags_connectable_connect_scope ags_connectable_disconnect_scope ags_soundcard_get_type ags_soundcard_set_application_context ags_soundcard_get_application_context ags_soundcard_set_application_mutex ags_soundcard_get_application_mutex ags_soundcard_set_device ags_soundcard_get_device ags_soundcard_set_presets ags_soundcard_get_presets ags_soundcard_list_cards ags_soundcard_pcm_info ags_soundcard_get_poll_fd ags_soundcard_is_available ags_soundcard_is_starting ags_soundcard_is_playing ags_soundcard_is_recording ags_soundcard_get_uptime ags_soundcard_play_init ags_soundcard_play ags_soundcard_record_init ags_soundcard_record ags_soundcard_stop ags_soundcard_tic ags_soundcard_offset_changed ags_soundcard_get_buffer ags_soundcard_get_next_buffer ags_soundcard_get_prev_buffer ags_soundcard_set_bpm ags_soundcard_get_bpm ags_soundcard_set_delay_factor ags_soundcard_get_delay_factor ags_soundcard_get_absolute_delay ags_soundcard_get_delay ags_soundcard_get_attack ags_soundcard_get_delay_counter ags_soundcard_set_note_offset ags_soundcard_get_note_offset ags_soundcard_set_note_offset_absolute ags_soundcard_get_note_offset_absolute ags_soundcard_set_loop ags_soundcard_get_loop ags_soundcard_get_loop_offset ags_soundcard_set_audio ags_soundcard_get_audio ags_async_queue_get_type ags_async_queue_increment_wait_ref ags_async_queue_get_wait_ref ags_async_queue_set_run_mutex ags_async_queue_get_run_mutex ags_async_queue_set_run_cond ags_async_queue_get_run_cond ags_async_queue_set_run ags_async_queue_is_run ags_async_queue_schedule_task ags_async_queue_schedule_task_list ags_mutable_get_type ags_mutable_set_muted ags_connection_get_type ags_connection_find_type ags_connection_find_type_and_data_object_type ags_connection_new ags_plugin_get_type ags_plugin_get_name ags_plugin_set_name ags_plugin_get_version ags_plugin_set_version ags_plugin_get_build_id ags_plugin_set_build_id ags_plugin_get_xml_type ags_plugin_set_xml_type ags_plugin_get_ports ags_plugin_set_ports ags_plugin_read ags_plugin_write g_cclosure_user_marshal_VOID__BOOLEAN_POINTER g_cclosure_user_marshal_VOID__INT_UINT_POINTER g_cclosure_user_marshal_VOID__UINT_BOOLEAN g_cclosure_user_marshal_VOID__UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_BOOLEAN g_cclosure_user_marshal_VOID__UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_UINT_UINT_UINT_UINT_UINT_UINT g_cclosure_user_marshal_VOID__UINT_DOUBLE_UINT g_cclosure_user_marshal_VOID__UINT_INT g_cclosure_user_marshal_VOID__UINT_DOUBLE g_cclosure_user_marshal_VOID__UINT_STRING_UINT g_cclosure_user_marshal_VOID__UINT_POINTER_UINT g_cclosure_user_marshal_VOID__ULONG_UINT g_cclosure_user_marshal_VOID__ULONG_UINT_BOOLEAN g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE g_cclosure_user_marshal_VOID__ULONG_UINT_UINT g_cclosure_user_marshal_VOID__STRING_UINT g_cclosure_user_marshal_VOID__STRING_UINT_DOUBLE g_cclosure_user_marshal_VOID__STRING_UINT_POINTER g_cclosure_user_marshal_VOID__STRING_UINT_STRING_DOUBLE g_cclosure_user_marshal_VOID__STRING_POINTER g_cclosure_user_marshal_VOID__STRING_STRING_STRING g_cclosure_user_marshal_VOID__POINTER_UINT g_cclosure_user_marshal_VOID__POINTER_UINT_UINT g_cclosure_user_marshal_VOID__POINTER_UINT_POINTER g_cclosure_user_marshal_VOID__POINTER_POINTER_UINT g_cclosure_user_marshal_VOID__POINTER_POINTER_POINTER g_cclosure_user_marshal_VOID__OBJECT_UINT g_cclosure_user_marshal_VOID__OBJECT_OBJECT g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_INT_BOOLEAN g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_UINT_INT_BOOLEAN g_cclosure_user_marshal_VOID__OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT_OBJECT g_cclosure_user_marshal_ULONG__VOID g_cclosure_user_marshal_INT__VOID g_cclosure_user_marshal_UINT__VOID g_cclosure_user_marshal_BOOLEAN__UINT_POINTER g_cclosure_user_marshal_BOOLEAN__OBJECT_OBJECT g_cclosure_user_marshal_UINT__INT_UINT_POINTER g_cclosure_user_marshal_DOUBLE__DOUBLE_BOOLEAN g_cclosure_user_marshal_STRING__STRING_STRING g_cclosure_user_marshal_STRING__ULONG_STRING_STRING_STRING_STRING_UINT_POINTER g_cclosure_user_marshal_POINTER__VOID g_cclosure_user_marshal_POINTER__UINT g_cclosure_user_marshal_POINTER__POINTER_UINT g_cclosure_user_marshal_POINTER__STRING_STRING g_cclosure_user_marshal_POINTER__STRING_STRING_STRING g_cclosure_user_marshal_POINTER__STRING_STRING_STRING_STRING g_cclosure_user_marshal_POINTER__ULONG_POINTER_UINT g_cclosure_user_marshal_POINTER__OBJECT g_cclosure_user_marshal_POINTER__OBJECT_OBJECT g_cclosure_user_marshal_POINTER__OBJECT_STRING_STRING_STRING_POINTER g_cclosure_user_marshal_POINTER__OBJECT_STRING_STRING_STRING_STRING_POINTER g_cclosure_user_marshal_POINTER__POINTER_STRING_STRING g_cclosure_user_marshal_OBJECT__VOID g_cclosure_user_marshal_OBJECT__OBJECT g_cclosure_user_marshal_OBJECT__STRING_STRING_STRING g_cclosure_user_marshal_OBJECT__OBJECT_POINTER_POINTER g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT ags_file_get_type ags_file_str2md5 ags_file_add_id_ref ags_file_find_id_ref_by_node ags_file_find_id_ref_by_xpath ags_file_find_id_ref_by_reference ags_file_add_lookup ags_file_add_launch ags_file_open ags_file_open_from_data ags_file_rw_open ags_file_open_filename ags_file_close ags_file_write ags_file_write_concurrent ags_file_write_resolve ags_file_read ags_file_read_resolve ags_file_read_start ags_file_read_config ags_file_write_config ags_file_read_application_context ags_file_write_application_context ags_file_new ags_file_launch_get_type ags_file_launch_start ags_file_launch_new ags_file_lookup_get_type ags_file_lookup_find_by_node ags_file_lookup_find_by_reference ags_file_lookup_resolve ags_file_lookup_new ags_xml_serialization_factory_get_type ags_xml_serialization_factory_create ags_xml_serialization_factory_get_instance ags_xml_serialization_factory_new ags_file_link_get_type ags_file_link_new ags_file_id_ref_get_type ags_file_id_ref_resolved ags_file_id_ref_new ags_file_util_read_value ags_file_util_write_value ags_file_util_read_parameter ags_file_util_write_parameter ags_file_util_read_dependency ags_file_util_write_dependency ags_file_util_read_object ags_file_util_write_object ags_file_util_read_history ags_file_util_write_history ags_file_read_file_link ags_file_write_file_link ags_file_read_file_link_list ags_file_write_file_link_list gsequencer-1.4.24/ltmain.sh0000644000175000017500000117147413256226510012525 00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-2" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # 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 # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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 this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # 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 # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program 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 this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname $scriptversion Debian-2.4.6-2 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: gsequencer-1.4.24/depcomp0000755000175000017500000005601713256226515012261 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2016-01-11.22; # UTC # Copyright (C) 1999-2017 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program 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 this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: gsequencer-1.4.24/midi2xml.1.xml0000644000175000017500000000500213256163135013274 00000000000000 2015-06-15 2015 Joël Krähemann midi2xml 1 midi2xml v0.4.2 midi2xml midi2xml converts your MIDI files to XML format /usr/bin/midi2xml --help --version file Description midi2xml takes your MIDI file from command line and outputs the resulting XML to stdout. OPTIONS The program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the info 1 files. Open file from command line. Show summary of options. Show version of program. BUGS None. So far I know. AUTHOR Joël Krähemann Original author gsequencer-1.4.24/compile0000755000175000017500000001624513256226515012261 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program 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 this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: